[
  {
    "path": ".gitattributes",
    "content": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs     diff=csharp\n*.sln    merge=union\n*.csproj merge=union\n*.vbproj merge=union\n*.fsproj merge=union\n*.dbproj merge=union\n\n# Standard to msysgit\n*.doc\t diff=astextplain\n*.DOC\t diff=astextplain\n*.docx diff=astextplain\n*.DOCX diff=astextplain\n*.dot  diff=astextplain\n*.DOT  diff=astextplain\n*.pdf  diff=astextplain\n*.PDF\t diff=astextplain\n*.rtf\t diff=astextplain\n*.RTF\t diff=astextplain\n"
  },
  {
    "path": ".gitignore",
    "content": "/Framework/Platforms/Windows/Framework.vcxproj.user\n/CodeTool/.vs\n/Editor/Platforms/Windows/Editor.vcxproj.user\n/Framework/Platforms/Windows/3rdPartyLibs.vcxproj.user\n/CodeTool/x64\n/CodeTool/build\n/CodeTool/Bin/*.pdb\n/CodeTool/Bin/*.iobj\n/CodeTool/Bin/*.ipdb\n/CodeTool/CodeTool.vcxproj.user\n/Framework/Sources/o2/CodeToolCache.xml\n/Editor/Sources/CodeToolCache.xml\n*.DS_Store\nEditor/Platforms/Mac/build\nFramework/Platforms/Mac/build\nEditor/Platforms/Mac/build\nFramework/Platforms/Mac/3rdPartyLibs.xcodeproj/xcuserdata\nFramework/Platforms/Mac/build\nEditor/Sources/o2Editor/CodeToolCache.xml\nCodeTool/Bin/o2CodeTool.exe\nAssetsBuildTool/Sources/CodeToolCache.xml\nEditor/Assets/Editor UI styles/rebuildDate.json\nCodeTool/Bin\nFramework/Platforms/__pycache__\nEditor/Assets/Editor UI styles\n.cache\nbuild\nTests/Sources/CodeToolCache.xml\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"Framework/3rdPartyLibs/tracy\"]\n\tpath = Framework/3rdPartyLibs/tracy\n\turl = https://github.com/wolfpld/tracy\n[submodule \"Framework/3rdPartyLibs/boost/stacktrace\"]\n\tpath = Framework/3rdPartyLibs/boost/stacktrace\n\turl = https://github.com/boostorg/stacktrace.git\n[submodule \"Framework/3rdPartyLibs/boost/config\"]\n\tpath = Framework/3rdPartyLibs/boost/config\n\turl = https://github.com/boostorg/config.git\n[submodule \"Framework/3rdPartyLibs/boost/container_hash\"]\n\tpath = Framework/3rdPartyLibs/boost/container_hash\n\turl = https://github.com/boostorg/container_hash.git\n[submodule \"Framework/3rdPartyLibs/boost/core\"]\n\tpath = Framework/3rdPartyLibs/boost/core\n\turl = https://github.com/boostorg/core.git\n[submodule \"Framework/3rdPartyLibs/boost/predef\"]\n\tpath = Framework/3rdPartyLibs/boost/predef\n\turl = https://github.com/boostorg/predef.git\n[submodule \"Framework/3rdPartyLibs/boost/winapi\"]\n\tpath = Framework/3rdPartyLibs/boost/winapi\n\turl = https://github.com/boostorg/winapi.git\n[submodule \"Framework/3rdPartyLibs/boost/describe\"]\n\tpath = Framework/3rdPartyLibs/boost/describe\n\turl = https://github.com/boostorg/describe.git\n[submodule \"Framework/3rdPartyLibs/boost/mp11\"]\n\tpath = Framework/3rdPartyLibs/boost/mp11\n\turl = https://github.com/boostorg/mp11.git\n[submodule \"Framework/3rdPartyLibs/boost/assert\"]\n\tpath = Framework/3rdPartyLibs/boost/assert\n\turl = https://github.com/boostorg/assert.git\n[submodule \"Framework/3rdPartyLibs/boost/static_assert\"]\n\tpath = Framework/3rdPartyLibs/boost/static_assert\n\turl = https://github.com/boostorg/static_assert.git\n[submodule \"Framework/3rdPartyLibs/boost/throw_exception\"]\n\tpath = Framework/3rdPartyLibs/boost/throw_exception\n\turl = https://github.com/boostorg/throw_exception.git\n"
  },
  {
    "path": "AssetsBuildTool/CMakeLists.txt",
    "content": "add_library(o2AssetsBuilder STATIC)\n\nadd_compile_definitions(${O2_COMPILE_DEFINITIONS_EXPORT})\n\nfile(GLOB_RECURSE o2AssetsBuilder_SOURCES \n    \"Sources/*.cpp\" \"Sources/*.h\"\n)\nsource_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${o2AssetsBuilder_SOURCES})\n\ntarget_include_directories(o2AssetsBuilder PUBLIC \"Sources\")\ntarget_sources(o2AssetsBuilder PRIVATE ${o2AssetsBuilder_SOURCES})\n\ntarget_link_libraries(o2AssetsBuilder \n    PUBLIC\n    o2Framework\n)\n\nif(WIN32)\n    add_custom_command(TARGET o2AssetsBuilder PRE_BUILD\n                       COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../CodeTool/Bin/o2CodeTool \n                            -project AssetsBuildTool \n                            -sources \"${CMAKE_CURRENT_SOURCE_DIR}/Sources\" \n                            -parent_projects \"${CMAKE_CURRENT_SOURCE_DIR}/../Framework/Sources/o2/CodeToolCache.xml\"\n                       COMMENT \"Run CodeTool:\"\n                            \"-project AssetsBuildTool \"\n                            \"-sources \\\"${CMAKE_CURRENT_SOURCE_DIR}/Sources\\\" \"\n                            \"-parent_projects \\\"${CMAKE_CURRENT_SOURCE_DIR}/../Framework/Sources/o2/CodeToolCache.xml\\\"\")\nendif()\n\nadd_dependencies(o2AssetsBuilder o2Framework)\n\nif(MSVC)\n    target_compile_options(o2AssetsBuilder PUBLIC ${O2_MSVC_MP_FLAG} \"/Zc:__cplusplus\")\nelseif (UNIX)\n    target_compile_options(o2AssetsBuilder PUBLIC ${DEMO_WARNING_OPTION} -Wno-pedantic)\nendif()"
  },
  {
    "path": "AssetsBuildTool/Sources/AssetsBuildTool.cpp",
    "content": "extern void __RegisterClass__o2__AtlasAssetConverter();\nextern void __RegisterClass__o2__AtlasAssetConverter__Image();\nextern void __RegisterClass__o2__FolderAssetConverter();\nextern void __RegisterClass__o2__IAssetConverter();\nextern void __RegisterClass__o2__ImageAssetConverter();\nextern void __RegisterClass__o2__StdAssetConverter();\nextern void __RegisterClass__o2__ImageCompressor__Config();\n\n\nextern void InitializeTypesAssetsBuildTool()\n{\n    __RegisterClass__o2__AtlasAssetConverter();\n    __RegisterClass__o2__AtlasAssetConverter__Image();\n    __RegisterClass__o2__FolderAssetConverter();\n    __RegisterClass__o2__IAssetConverter();\n    __RegisterClass__o2__ImageAssetConverter();\n    __RegisterClass__o2__StdAssetConverter();\n    __RegisterClass__o2__ImageCompressor__Config();\n}"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/AssetsBuilder.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AssetsBuilder.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/AtlasAsset.h\"\n#include \"o2/Assets/Types/DataAsset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Assets/Types/SceneAsset.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n#include \"o2AssetBuilder/ImageCompressor.h\"\n\nnamespace o2\n{\n    AssetsBuilder::AssetsBuilder()\n    {\n        srand((UInt)time(NULL));\n\n        mLog = mmake<LogStream>(\"Assets builder\");\n        o2Debug.GetLog()->BindStream(mLog);\n\n        InitializeConverters();\n    }\n\n    AssetsBuilder::~AssetsBuilder()\n    {\n    }\n\n    const Vector<UID>& AssetsBuilder::BuildAssets(Platform platform, const String& assetsPath, const String& builtAssetsPath,\n                                                  const String& dataAssetsTreePath, const String& compressorConfig, bool forcible /*= false*/)\n    {\n        mPlatform = platform;\n        mSourceAssetsPath = assetsPath;\n        mBuiltAssetsPath = builtAssetsPath;\n        mBuiltAssetsTreePath = dataAssetsTreePath;\n\n        ImageCompressor::LoadConfig(compressorConfig);\n\n        mLog->Out(\"Started assets building from: \" + mSourceAssetsPath + \" to: \" + mBuiltAssetsPath);\n\n        Timer timer;\n\n        if (forcible)\n            RemoveBuiltAssets();\n\n        FolderInfo folderInfo = o2FileSystem.GetFolderInfo(mSourceAssetsPath);\n        folderInfo.ClampPathNames();\n\n        ProcessMissingMetasCreation(folderInfo);\n\n        mSourceAssetsTree = mmake<AssetsTree>();\n        mSourceAssetsTree->assetsPath = assetsPath;\n        mSourceAssetsTree->log = mLog;\n        mSourceAssetsTree->Build(folderInfo);\n\n        DataDocument builtAssetsTreeDoc;\n        builtAssetsTreeDoc.LoadFromFile(mBuiltAssetsTreePath);\n\n        mBuiltAssetsTree = mmake<AssetsTree>();\n        mBuiltAssetsTree->Deserialize(builtAssetsTreeDoc);\n\n        mBuiltAssetsTree->log = mLog;\n\n        ProcessRemovedAssets();\n        ProcessNewAssets();\n        ProcessModifiedAssets();\n        ConvertersPostProcess();\n\n        if (!mModifiedAssets.IsEmpty())\n        {\n            mBuiltAssetsTree->assetsPath = mSourceAssetsPath;\n            mBuiltAssetsTree->builtAssetsPath = mBuiltAssetsPath;\n            o2FileSystem.WriteFile(mBuiltAssetsTreePath, mBuiltAssetsTree->SerializeToString());\n        }\n\n        mLog->Out(\"Assets builder: Completed. Source: \" + mSourceAssetsPath + \", Target: \" + mBuiltAssetsPath + \", Time: \" + (String)timer.GetDeltaTime() + \" seconds\");\n\n        return mModifiedAssets;\n    }\n\n    const String& AssetsBuilder::GetSourceAssetsPath() const\n    {\n        return mSourceAssetsPath;\n    }\n\n    const String& AssetsBuilder::GetBuiltAssetsPath() const\n    {\n        return mBuiltAssetsPath;\n    }\n\n    Platform AssetsBuilder::GetPlatform() const\n    {\n        return mPlatform;\n    }\n\n    void AssetsBuilder::InitializeConverters()\n    {\n        auto converterTypes = TypeOf(IAssetConverter).GetDerivedTypes();\n        for (auto converterType : converterTypes)\n        {\n            IAssetConverter* converter = (IAssetConverter*)converterType->CreateSample();\n            converter->SetAssetsBuilder(this);\n            auto availableAssetTypes = converter->GetProcessingAssetsTypes();\n            for (auto tp : availableAssetTypes)\n                mAssetConverters.Add(tp, converter);\n        }\n\n        mStdAssetConverter.SetAssetsBuilder(this);\n    }\n\n    void AssetsBuilder::RemoveBuiltAssets()\n    {\n        o2FileSystem.FileDelete(mBuiltAssetsTreePath);\n        o2FileSystem.FolderRemove(mBuiltAssetsPath);\n        o2FileSystem.FolderCreate(mBuiltAssetsPath);\n    }\n\n    void AssetsBuilder::ProcessMissingMetasCreation(FolderInfo& folder)\n    {\n        for (auto fileInfo : folder.files)\n        {\n            if (fileInfo.path.EndsWith(\".meta\"))\n            {\n                String metaFullPath = mSourceAssetsPath + fileInfo.path;\n                String assetForMeta = o2FileSystem.GetFileNameWithoutExtension(metaFullPath);\n                bool isExistAssetForMeta = o2FileSystem.IsFileExist(assetForMeta) || o2FileSystem.IsFolderExist(assetForMeta);\n                if (!isExistAssetForMeta)\n                {\n                    mLog->Warning(\"Missing asset for meta: \" + fileInfo.path + \" - removing meta\");\n                    o2FileSystem.FileDelete(metaFullPath);\n                }\n            }\n            else\n            {\n                String assetFullPath = mSourceAssetsPath + fileInfo.path;\n                String metaFullPath = assetFullPath + \".meta\";\n                bool isExistMetaForAsset = o2FileSystem.IsFileExist(metaFullPath);\n                if (!isExistMetaForAsset)\n                {\n                    auto assetType = Assets::GetAssetTypeByExtension(o2FileSystem.GetFileExtension(fileInfo.path));\n                    GenerateMeta(*assetType, metaFullPath);\n                }\n            }\n        }\n\n        for (auto subFolder : folder.folders)\n        {\n            String subFolderPath = subFolder.path;\n            subFolderPath.Erase(subFolderPath.Length() - 1);\n\n            String folderFullPath = mSourceAssetsPath + subFolderPath;\n\n            String metaFullPath = folderFullPath + \".meta\";\n            bool isExistMetaForFolder = o2FileSystem.IsFileExist(metaFullPath);\n            if (!isExistMetaForFolder)\n            {\n                auto& assetType = TypeOf(FolderAsset);\n                GenerateMeta(assetType, metaFullPath);\n            }\n\n            ProcessMissingMetasCreation(subFolder);\n        }\n    }\n\n    void AssetsBuilder::ProcessRemovedAssets()\n    {\n        const Type* folderTypeId = &TypeOf(FolderAsset);\n\n        mBuiltAssetsTree->SortAssetsInverse();\n\n        // in first pass processing files, in second - folders\n        for (int pass = 0; pass < 2; pass++)\n        {\n            for (auto builtAssetInfoIt = mBuiltAssetsTree->allAssets.Begin(); builtAssetInfoIt != mBuiltAssetsTree->allAssets.End(); )\n            {\n                auto builtAssetInfo = (*builtAssetInfoIt).Lock();\n                bool isFolder = builtAssetInfo->meta->GetAssetType() == folderTypeId;\n                bool skip = pass == 0 ? isFolder : !isFolder;\n                if (skip)\n                {\n                    ++builtAssetInfoIt;\n                    continue;\n                }\n\n                auto fnd = mSourceAssetsTree->allAssetsByUID.find(builtAssetInfo->meta->ID());\n                bool needRemove = fnd == mSourceAssetsTree->allAssetsByUID.end();\n\n                if (!needRemove)\n                {\n                    ++builtAssetInfoIt;\n                    continue;\n                }\n\n                GetAssetConverter(builtAssetInfo->meta->GetAssetType())->RemoveAsset(*builtAssetInfo);\n\n                mModifiedAssets.Add(builtAssetInfo->meta->ID());\n\n                mLog->OutStr(\"Removed asset: \" + builtAssetInfo->path);\n\n                mBuiltAssetsTree->allAssetsByUID.Remove(builtAssetInfo->meta->ID());\n                mBuiltAssetsTree->allAssetsByPath.Remove(builtAssetInfo->path);\n\n                builtAssetInfoIt = mBuiltAssetsTree->allAssets.Remove(builtAssetInfoIt);\n\n                if (builtAssetInfo->parent)\n                    builtAssetInfo->parent.Lock()->RemoveChild(builtAssetInfo);\n                else\n                    mBuiltAssetsTree->rootAssets.Remove(builtAssetInfo);\n            }\n        }\n    }\n\n    void AssetsBuilder::ProcessModifiedAssets()\n    {\n        const Type* folderType = &TypeOf(FolderAsset);\n\n        mSourceAssetsTree->SortAssets();\n\n        // in first pass processing folders, in second - files\n        for (int pass = 0; pass < 2; pass++)\n        {\n            for (auto sourceAssetInfoWeak : mSourceAssetsTree->allAssets)\n            {\n                auto sourceAssetInfo = sourceAssetInfoWeak.Lock();\n\n                if (!sourceAssetInfo->meta)\n                    continue;\n\n                bool isFolder = sourceAssetInfo->meta->GetAssetType() == folderType;\n                bool skip = pass == 0 ? !isFolder : isFolder;\n                if (skip)\n                    continue;\n\n                WeakRef<AssetInfo> builtAssetInfoWeak;\n                if (mBuiltAssetsTree->allAssetsByUID.TryGetValue(sourceAssetInfo->meta->ID(), builtAssetInfoWeak))\n                {\n                    auto builtAssetInfo = builtAssetInfoWeak.Lock();\n\n                    if (sourceAssetInfo->path == builtAssetInfo->path)\n                    {\n                        if (sourceAssetInfo->editTime != builtAssetInfo->editTime ||\n                            !sourceAssetInfo->meta->IsEqual(builtAssetInfo->meta.Get()))\n                        {\n                            GetAssetConverter(sourceAssetInfo->meta->GetAssetType())->ConvertAsset(*sourceAssetInfo);\n\n                            mModifiedAssets.Add(sourceAssetInfo->meta->ID());\n\n                            builtAssetInfo->editTime = sourceAssetInfo->editTime;\n                            builtAssetInfo->meta = sourceAssetInfo->meta->CloneAsRef<AssetMeta>();\n\n                            mLog->Out(\"Modified asset: \" + sourceAssetInfo->path);\n                        }\n                    }\n                    else\n                    {\n                        if (sourceAssetInfo->editTime != builtAssetInfo->editTime ||\n                            !sourceAssetInfo->meta->IsEqual(builtAssetInfo->meta.Get()))\n                        {\n                            GetAssetConverter(builtAssetInfo->meta->GetAssetType())->RemoveAsset(*builtAssetInfo);\n\n                            mBuiltAssetsTree->RemoveAsset(builtAssetInfo);\n\n                            mLog->Out(\"Modified and moved to \" + sourceAssetInfo->path + \" asset: \" + builtAssetInfo->path);\n\n                            builtAssetInfo->path = sourceAssetInfo->path;\n                            builtAssetInfo->editTime = sourceAssetInfo->editTime;\n\n                            builtAssetInfo->meta = sourceAssetInfo->meta->CloneAsRef<AssetMeta>();\n\n                            GetAssetConverter(sourceAssetInfo->meta->GetAssetType())->ConvertAsset(*sourceAssetInfo);\n\n                            mModifiedAssets.Add(sourceAssetInfo->meta->ID());\n                            mBuiltAssetsTree->AddAsset(builtAssetInfo);\n                        }\n                        else\n                        {\n                            GetAssetConverter(sourceAssetInfo->meta->GetAssetType())->MoveAsset(*builtAssetInfo, *sourceAssetInfo);\n                            mLog->Out(\"Moved asset from \" + builtAssetInfo->path + \" to \" + sourceAssetInfo->path);\n\n                            mBuiltAssetsTree->RemoveAsset(builtAssetInfo);\n\n                            builtAssetInfo->path = sourceAssetInfo->path;\n                            builtAssetInfo->editTime = sourceAssetInfo->editTime;\n\n                            builtAssetInfo->meta = sourceAssetInfo->meta->CloneAsRef<AssetMeta>();\n\n                            mModifiedAssets.Add(sourceAssetInfo->meta->ID());\n                            mBuiltAssetsTree->AddAsset(builtAssetInfo);\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    void AssetsBuilder::ProcessNewAssets()\n    {\n        const Type* folderType = &TypeOf(FolderAsset);\n\n        mSourceAssetsTree->SortAssets();\n\n        // in first pass processing folders, in second - files\n        for (int pass = 0; pass < 2; pass++)\n        {\n            for (auto sourceAssetInfoIt = mSourceAssetsTree->allAssets.Begin(); sourceAssetInfoIt != mSourceAssetsTree->allAssets.End(); ++sourceAssetInfoIt)\n            {\n                auto sourceAssetInfo = (*sourceAssetInfoIt).Lock();\n\n                if (!sourceAssetInfo->meta)\n                    continue;\n\n                bool isFolder = sourceAssetInfo->meta->GetAssetType() == folderType;\n                bool skip = pass == 0 ? !isFolder : isFolder;\n\n                if (skip)\n                    continue;\n\n                auto fnd = mBuiltAssetsTree->allAssetsByUID.find(sourceAssetInfo->meta->ID());\n                bool isNew = fnd == mBuiltAssetsTree->allAssetsByUID.end();\n\n                if (!isNew)\n                    continue;\n\n                GetAssetConverter(sourceAssetInfo->meta->GetAssetType())->ConvertAsset(*sourceAssetInfo);\n\n                mModifiedAssets.Add(sourceAssetInfo->meta->ID());\n\n                mLog->Out(\"New asset: \" + sourceAssetInfo->path);\n\n                Ref<AssetInfo> newBuiltAsset = mmake<AssetInfo>();\n                newBuiltAsset->path = sourceAssetInfo->path;\n                newBuiltAsset->editTime = sourceAssetInfo->editTime;\n                newBuiltAsset->meta = sourceAssetInfo->meta->CloneAsRef<AssetMeta>();\n\n                mBuiltAssetsTree->AddAsset(newBuiltAsset);\n            }\n        }\n    }\n\n    void AssetsBuilder::ConvertersPostProcess()\n    {\n        for (auto it = mAssetConverters.Begin(); it != mAssetConverters.End(); ++it)\n            mModifiedAssets.Add(it->second->AssetsPostProcess());\n\n        mModifiedAssets.Add(mStdAssetConverter.AssetsPostProcess());\n    }\n\n    void AssetsBuilder::GenerateMeta(const Type& assetType, const String& metaFullPath)\n    {\n        auto assetTypeSample = (Asset*)assetType.CreateSample();\n        auto assetTypeSampleMeta = assetTypeSample->GetMeta();\n\n        DataDocument metaData;\n        metaData = assetTypeSampleMeta;\n        metaData[\"Value\"][\"mId\"] = UID();\n\n        metaData.SaveToFile(metaFullPath);\n\n        delete assetTypeSample;\n    }\n\n    IAssetConverter* AssetsBuilder::GetAssetConverter(const Type* assetType)\n    {\n        if (mAssetConverters.ContainsKey(assetType))\n            return mAssetConverters[assetType];\n\n        return &mStdAssetConverter;\n    }\n}\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/AssetsBuilder.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetInfo.h\"\n#include \"o2/Assets/AssetsTree.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2AssetBuilder/Converters/StdAssetConverter.h\"\n\nnamespace o2\n{\n    class FolderInfo;\n    class IAssetConverter;\n\n    // -------------\n    // Asset builder\n    // -------------\n    class AssetsBuilder\n    {\n    public:\n        // Default constructor\n        AssetsBuilder();\n\n        // Destructor\n        ~AssetsBuilder();\n\n        // Builds asset from assets path to dataAssetsPath. Removes all built assets if forcible is true\n        const Vector<UID>& BuildAssets(Platform platform, const String& assetsPath, const String& dataAssetsPath, \n                                       const String& dataAssetsTreePath, const String& compressorConfig, bool forcible = false);\n\n        // Returns source assets path in building\n        const String& GetSourceAssetsPath() const;\n\n        // Returns built assets path in building\n        const String& GetBuiltAssetsPath() const;\n\n        // Returns current platform\n        Platform GetPlatform() const;\n\n    protected:\n        Ref<LogStream> mLog; // Asset builder log stream\n\n        Platform mPlatform; // Current platform\n\n        String          mSourceAssetsPath; // Source assets path\n        Ref<AssetsTree> mSourceAssetsTree; // Source assets tree\n\n        String          mBuiltAssetsPath;     // Built assets path\n        String          mBuiltAssetsTreePath; // Built assets tree data path\n        Ref<AssetsTree> mBuiltAssetsTree;     // Built assets tree\n\n        Vector<UID> mModifiedAssets; // Modified assets infos\n\n        Map<const Type*, IAssetConverter*> mAssetConverters;   // Assets converters by type\n        StdAssetConverter                  mStdAssetConverter; // Standard assets converter\n\n    protected:\n        // Initializes converters\n        void InitializeConverters();\n\n        // Removes all built assets\n        void RemoveBuiltAssets();\n\n        // Searching and removing assets\n        void ProcessRemovedAssets();\n\n        // Searching modified and moved assets\n        void ProcessModifiedAssets();\n\n        // Searches new assets\n        void ProcessNewAssets();\n\n        // Launches converters post process\n        void ConvertersPostProcess();\n        \n        // Processes folder for missing metas\n        void ProcessMissingMetasCreation(FolderInfo& folder);\n        \n        // Generates meta information file for asset\n        void GenerateMeta(const Type& assetType, const String& metaFullPath);\n\n        // Returns assets converter by asset type\n        IAssetConverter* GetAssetConverter(const Type* assetType);\n\n        friend class AtlasAssetConverter;\n    };\n}\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/AssetsBuilderRunner.cpp",
    "content": "#include \"o2/O2.h\"\n\n#include \"o2AssetBuilder/AssetsBuilder.h\"\n#include \"o2/Utils/System/CommandLineOptions.h\"\n\nusing namespace o2;\n\nextern void InitializeTypesGameLib();\nextern void InitializeTypesAssetsBuildTool();\n\nint main(int argc, char* argv[])\n{\n    INITIALIZE_O2;\n    InitializeTypesGameLib();\n    InitializeTypesAssetsBuildTool();\n\n    const auto platformKey = \"-platform\";\n    const auto sourceDirKey = \"-source\";\n    const auto targetDirKey = \"-target\";\n    const auto targetAssetsTreeKey = \"-target-tree\";\n    const auto compressorConfigPathKey = \"-compressor-config\";\n    const auto forcibleKey = \"-forcible\";\n\n    Map<String, String> options = CommandLineOptions::Parse(argc, argv);\n\n    Platform platform = Platform::Windows;\n    if (options.ContainsKey(platformKey))\n        platform = Reflection::Instance().GetEnumValue<Platform>(options[platformKey]);\n    else\n    {\n        std::cout << \"Platform must be specified via \" << platformKey << std::endl;\n        return -1;\n    }\n\n    String sourceDir;\n    if (options.ContainsKey(sourceDirKey))\n        sourceDir = options[sourceDirKey];\n    else\n    {\n        std::cout << \"Source assets directory must be specified via \" << sourceDirKey << std::endl;\n        return -1;\n    }\n\n    String targetDir;\n    if (options.ContainsKey(targetDirKey))\n        targetDir = options[targetDirKey];\n    else\n    {\n        std::cout << \"Target built assets directory must be specified via \" << targetDirKey << std::endl;\n        return -1;\n    }\n\n    String targetTreeDir;\n    if (options.ContainsKey(targetAssetsTreeKey))\n        targetTreeDir = options[targetAssetsTreeKey];\n    else\n    {\n        std::cout << \"Target built assets tree path must be specified via \" << targetAssetsTreeKey << std::endl;\n        return -1;\n    }\n\n    String compressorConfigPath;\n    if (options.ContainsKey(compressorConfigPathKey))\n        compressorConfigPath = options[compressorConfigPathKey];\n    else\n    {\n        std::cout << \"Images compressor config path must be specified via \" << compressorConfigPathKey << std::endl;\n        return -1;\n    }\n\n    bool forcible = false;\n    if (options.ContainsKey(forcibleKey))\n        forcible = (bool)options[forcibleKey];\n\n    AssetsBuilder builder;\n    builder.BuildAssets(platform, sourceDir, targetDir, targetTreeDir, compressorConfigPath, forcible);\n\n    return 0;\n}\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/AtlasAssetConverter.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AtlasAssetConverter.h\"\n\n#include \"o2/Assets/Types/AtlasAsset.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Utils/Bitmap/Bitmap.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2AssetBuilder/ImageCompressor.h\"\n\nnamespace o2\n{\n    Vector<const Type*> AtlasAssetConverter::GetProcessingAssetsTypes() const\n    {\n        Vector<const Type*> res;\n        res.Add(&TypeOf(AtlasAsset));\n        return res;\n    }\n\n    void AtlasAssetConverter::ConvertAsset(const AssetInfo& node)\n    {\n        String sourceAssetPath = mAssetsBuilder->GetSourceAssetsPath() + node.path;\n        String buildedAssetPath = mAssetsBuilder->GetBuiltAssetsPath() + node.path;\n\n        if (!o2FileSystem.IsFileExist(buildedAssetPath))\n            o2FileSystem.WriteFile(buildedAssetPath, \"\");\n    }\n\n    void AtlasAssetConverter::RemoveAsset(const AssetInfo& node)\n    {\n        String buildedAssetPath = mAssetsBuilder->GetBuiltAssetsPath() + node.path;\n\n        DataDocument atlasData;\n        atlasData.LoadFromFile(buildedAssetPath);\n        int pagesCount = atlasData[\"mPages\"].GetMembersCount();\n\n        for (int i = 0; i < pagesCount; i++)\n            o2FileSystem.FileDelete(buildedAssetPath + (String)i + \".png\");\n\n        o2FileSystem.FileDelete(buildedAssetPath);\n    }\n\n    void AtlasAssetConverter::MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo)\n    {\n        String fullPathFrom = mAssetsBuilder->GetBuiltAssetsPath() + nodeFrom.path;\n        String fullPathTo = mAssetsBuilder->GetBuiltAssetsPath() + nodeTo.path;\n\n        DataDocument atlasData;\n        atlasData.LoadFromFile(fullPathFrom);\n        int pagesCount = atlasData[\"mPages\"].GetMembersCount();\n\n        for (int i = 0; i < pagesCount; i++)\n            o2FileSystem.FileMove(fullPathFrom + (String)i + \".png\", fullPathTo + (String)i + \".png\");\n\n        o2FileSystem.FileMove(fullPathFrom, fullPathTo);\n    }\n\n    Vector<UID> AtlasAssetConverter::AssetsPostProcess()\n    {\n        return CheckRebuildingAtlases();\n    }\n\n    void AtlasAssetConverter::Reset()\n    {}\n\n    Vector<UID> AtlasAssetConverter::CheckRebuildingAtlases()\n    {\n        Vector<UID> res;\n        const Type* atlasAssetType = &TypeOf(AtlasAsset);\n\n        for (auto& info : mAssetsBuilder->mBuiltAssetsTree->allAssets)\n        {\n            auto infoStrong = info.Lock();\n            if (infoStrong->meta->GetAssetType() == atlasAssetType)\n            {\n                if (CheckAtlasRebuilding(infoStrong))\n                    res.Add(infoStrong->meta->ID());\n            }\n        }\n\n        return res;\n    }\n\n    bool AtlasAssetConverter::CheckAtlasRebuilding(const Ref<AssetInfo>& atlasInfo)\n    {\n        DataDocument atlasData;\n        atlasData.LoadFromFile(mAssetsBuilder->mBuiltAssetsPath + atlasInfo->path);\n\n        Vector<Image> lastImages;\n        lastImages = atlasData[\"mImages\"];\n\n        Vector<Image> currentImages;\n        const Type* imageType = &TypeOf(ImageAsset);\n        const UID& atlasId = atlasInfo->meta->ID();\n        for (auto& assetInfo : mAssetsBuilder->mBuiltAssetsTree->allAssets)\n        {\n            auto assetInfoStrong = assetInfo.Lock();\n            if (assetInfoStrong->meta->GetAssetType() == imageType)\n            {\n                Ref<ImageAsset::Meta> imageMeta = DynamicCast<ImageAsset::Meta>(assetInfoStrong->meta);\n                if (imageMeta->atlasId == atlasId)\n                    currentImages.Add(Image(imageMeta->ID(), assetInfoStrong->editTime));\n            }\n        }\n\n        bool isModified = mAssetsBuilder->mModifiedAssets.Contains(atlasInfo->meta->ID());\n        if (isModified || ImagesListChanged(currentImages, lastImages))\n        {\n            RebuildAtlas(atlasInfo, currentImages);\n            return true;\n        }\n\n        return false;\n    }\n\n    bool AtlasAssetConverter::ImagesListChanged(Vector<Image>& currentImages, Vector<Image>& lastImages)\n    {\n        if (currentImages.Count() != lastImages.Count())\n            return true;\n\n        for (auto lastImg : lastImages)\n        {\n            bool found = false;\n            for (auto curImg : currentImages)\n            {\n                if (lastImg.id == curImg.id)\n                {\n                    if (lastImg.time != curImg.time)\n                    {\n                        return true;\n                    }\n                    else\n                    {\n                        found = true;\n                        break;\n                    }\n                }\n            }\n\n            if (!found)\n                return true;\n        }\n\n        for (auto curImg : currentImages)\n        {\n            if (mAssetsBuilder->mModifiedAssets.Contains(curImg.id))\n                return true;\n        }\n\n        return false;\n    }\n\n    void AtlasAssetConverter::RebuildAtlas(const Ref<AssetInfo>& atlasInfo, Vector<Image>& images)\n    {\n        auto meta = DynamicCast<AtlasAsset::Meta>(atlasInfo->meta)->GetResultPlatformMeta(mAssetsBuilder->GetPlatform());\n\n        RectsPacker packer(meta.maxSize);\n        float imagesBorder = (float)meta.border;\n\n        // Initialize pack images\n        Vector<ImagePackDef> packImages;\n        for (auto img : images)\n        {\n            // Find image info\n            WeakRef<AssetInfo> imgInfo;\n            mAssetsBuilder->mBuiltAssetsTree->allAssetsByUID.TryGetValue(img.id, imgInfo);\n            if (!imgInfo)\n            {\n                mAssetsBuilder->mLog->Error(\"Can't find asset info by id: \" + (String)img.id);\n                continue;\n            }\n\n            auto imgInfoStong = imgInfo.Lock();\n\n            String assetFullPath = mAssetsBuilder->GetSourceAssetsPath() + imgInfoStong->path;\n\n            // Load bitmap\n            auto bitmap = mmake<Bitmap>();\n            if (!bitmap->Load(assetFullPath))\n            {\n                mAssetsBuilder->mLog->Error(\"Can't load bitmap for image asset: \" + imgInfoStong->path);\n                continue;\n            }\n\n            // Create packing rect\n            auto packRect = packer.AddRect(bitmap->GetSize() + Vec2F(imagesBorder*2.0f, imagesBorder*2.0f));\n\n            ImagePackDef imagePackDef;\n            imagePackDef.assetInfo = imgInfoStong;\n            imagePackDef.bitmap = bitmap;\n            imagePackDef.packRect = packRect;\n\n            packImages.Add(imagePackDef);\n        }\n\n        // Try to pack\n        if (!packer.Pack())\n        {\n            mAssetsBuilder->mLog->Warning(\"Atlas \" + atlasInfo->path + \" packing failed\");\n            return;\n        }\n        else mAssetsBuilder->mLog->Out(\"Atlas \" + atlasInfo->path + \" successfully packed\");\n\n        // Initialize bitmaps and pages\n        int pagesCount = packer.GetPagesCount();\n        Vector<Ref<Bitmap>> resAtlasBitmaps;\n        Vector<AtlasAsset::Page> resAtlasPages;\n        for (int i = 0; i < pagesCount; i++)\n        {\n            AtlasAsset::Page atlasPage;\n            atlasPage.mId = i;\n            atlasPage.mSize = packer.GetMaxSize();\n            resAtlasPages.Add(atlasPage);\n\n            auto newBitmap = mmake<Bitmap>(PixelFormat::R8G8B8A8, packer.GetMaxSize());\n            newBitmap->Fill(Color4(255, 255, 255, 0));\n\n            resAtlasBitmaps.Add(newBitmap);\n        }\n\n        // Save image assets data and fill pages\n        for (auto imgDef : packImages)\n        {\n            imgDef.packRect->rect.left += imagesBorder;\n            imgDef.packRect->rect.right -= imagesBorder;\n            imgDef.packRect->rect.top -= imagesBorder;\n            imgDef.packRect->rect.bottom += imagesBorder;\n\n            resAtlasBitmaps[imgDef.packRect->page]->CopyImage(*imgDef.bitmap,\n                                                              imgDef.packRect->rect.LeftBottom());\n\n            resAtlasPages[imgDef.packRect->page].mImagesRects.Add(imgDef.assetInfo.Lock()->meta->ID(),\n                                                                  imgDef.packRect->rect);\n\n            SaveImageAsset(imgDef);\n        }\n\n        // Save pages bitmaps\n        for (int i = 0; i < pagesCount; i++)\n        {\n            String builtPath = mAssetsBuilder->GetBuiltAssetsPath() + atlasInfo->path + (String)i;\n            resAtlasBitmaps[i]->Save(builtPath + \".png\", Bitmap::ImageType::Png);\n\n            ImageCompressor::CompressImage(builtPath + \".png\", builtPath, meta.format, 100);\n        }\n\n        // Save atlas data\n        String atlasFullPath = mAssetsBuilder->GetSourceAssetsPath() + atlasInfo->path;\n        String atlasFullBuiltPath = mAssetsBuilder->GetBuiltAssetsPath() + atlasInfo->path;\n\n        DataDocument atlasData;\n        atlasData.LoadFromFile(atlasFullPath);\n        atlasData[\"mPages\"] = resAtlasPages;\n        atlasData[\"mImages\"] = images;\n\n        atlasData.SaveToFile(atlasFullPath);\n        atlasData.SaveToFile(atlasFullBuiltPath);\n\n        atlasInfo->editTime = o2FileSystem.GetFileInfo(atlasFullPath).editDate;\n    }\n\n    void AtlasAssetConverter::SaveImageAsset(ImagePackDef& imgDef)\n    {\n        DataDocument imgData;\n        imgData[\"mAtlasPage\"] = imgDef.packRect->page;\n        imgData[\"mSourceRect\"] = (RectI)(imgDef.packRect->rect);\n        String imageFullPath = mAssetsBuilder->GetBuiltAssetsPath() + imgDef.assetInfo.Lock()->path;\n        imgData.SaveToFile(imageFullPath);\n\n        DataDocument metaData;\n        metaData = imgDef.assetInfo.Lock()->meta;\n        metaData.SaveToFile(mAssetsBuilder->GetSourceAssetsPath() + imgDef.assetInfo.Lock()->path + \".meta\");\n    }\n\n    AtlasAssetConverter::Image::Image(const UID& id, const TimeStamp& time):\n        id(id), time(time)\n    {}\n\n    bool AtlasAssetConverter::Image::operator==(const Image& other) const\n    {\n        return id == other.id;\n    }\n\n    bool AtlasAssetConverter::ImagePackDef::operator==(const ImagePackDef& other) const\n    {\n        return assetInfo == other.assetInfo && bitmap == other.bitmap && packRect == other.packRect;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AtlasAssetConverter, o2__AtlasAssetConverter);\n\nDECLARE_CLASS(o2::AtlasAssetConverter::Image, o2__AtlasAssetConverter__Image);\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/AtlasAssetConverter.h",
    "content": "#pragma once\n\n#include \"IAssetConverter.h\"\n#include \"o2/Utils/Tools/RectPacker.h\"\n#include \"o2AssetBuilder/AssetsBuilder.h\"\n\nnamespace o2\n{\n    class Bitmap;\n\n    // -----------------\n    // Atlases converter\n    // -----------------\n    class AtlasAssetConverter : public IAssetConverter\n    {\n    public:\n        // Returns vector of processing assets types\n        Vector<const Type*> GetProcessingAssetsTypes() const override;\n\n        // Converts atlas by path\n        void ConvertAsset(const AssetInfo& node) override;\n\n        // Removes atlas by path\n        void RemoveAsset(const AssetInfo& node) override;\n\n        // Moves atlas\n        void MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo) override;\n\n        // Post processing atlases. Here checking atlases for rebuild\n        Vector<UID> AssetsPostProcess() override;\n\n        // Resets converter\n        void Reset() override;\n\n        IOBJECT(AtlasAssetConverter);\n\n    public:\n        // ----------------\n        // Atlas image info\n        // ----------------\n        struct Image : public ISerializable\n        {\n            UID       id;   // Image asset id @SERIALIZABLE\n            TimeStamp time; // Image asset edited date @SERIALIZABLE\n\n        public:\n            // Default constructor\n            Image() {}\n\n            // Constructor\n            Image(const UID& id, const TimeStamp& time);\n\n            // Check equal operator\n            bool operator==(const Image& other) const;\n\n            SERIALIZABLE(Image);\n        };\n\n        // ------------------------\n        // Image packing definition\n        // ------------------------\n        struct ImagePackDef\n        {\n            Ref<Bitmap>            bitmap;    // Image bitmap pointer\n            Ref<RectsPacker::Rect> packRect;  // Image pack rectangle pointer\n\n            WeakRef<AssetInfo> assetInfo; // Asset information\n\n            // Check equal operator\n            bool operator==(const ImagePackDef& other) const;\n        };\n\n    protected:\n        // Checks atlases for rebuilding\n        Vector<UID> CheckRebuildingAtlases();\n\n        // Checks atlas for rebuilding\n        bool CheckAtlasRebuilding(const Ref<AssetInfo>& atlasInfo);\n\n        // Returns true if atlas needs to rebuild\n        bool ImagesListChanged(Vector<Image>& currentImages, Vector<Image>& lastImages);\n\n        // Rebuilds atlas\n        void RebuildAtlas(const Ref<AssetInfo>& atlasInfo, Vector<Image>& images);\n\n        // Saves image asset data\n        void SaveImageAsset(ImagePackDef& imgDef);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AtlasAssetConverter)\n{\n    BASE_CLASS(o2::IAssetConverter);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AtlasAssetConverter)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::AtlasAssetConverter)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vector<const Type*>, GetProcessingAssetsTypes);\n    FUNCTION().PUBLIC().SIGNATURE(void, ConvertAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveAsset, const AssetInfo&, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<UID>, AssetsPostProcess);\n    FUNCTION().PUBLIC().SIGNATURE(void, Reset);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<UID>, CheckRebuildingAtlases);\n    FUNCTION().PROTECTED().SIGNATURE(bool, CheckAtlasRebuilding, const Ref<AssetInfo>&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, ImagesListChanged, Vector<Image>&, Vector<Image>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildAtlas, const Ref<AssetInfo>&, Vector<Image>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveImageAsset, ImagePackDef&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AtlasAssetConverter::Image)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AtlasAssetConverter::Image)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(id);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(time);\n}\nEND_META;\nCLASS_METHODS_META(o2::AtlasAssetConverter::Image)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const UID&, const TimeStamp&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/FolderAssetConverter.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FolderAssetConverter.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/BinaryAsset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2AssetBuilder/AssetsBuilder.h\"\n\nnamespace o2\n{\n    Vector<const Type*> FolderAssetConverter::GetProcessingAssetsTypes() const\n    {\n        Vector<const Type*> res;\n        res.Add(&TypeOf(FolderAsset));\n        return res;\n    }\n\n    void FolderAssetConverter::ConvertAsset(const AssetInfo& node)\n    {\n        String sourceAssetPath = mAssetsBuilder->GetSourceAssetsPath() + node.path;\n        String buildedAssetPath = mAssetsBuilder->GetBuiltAssetsPath() + node.path;\n\n        o2FileSystem.FolderCreate(buildedAssetPath);\n    }\n\n    void FolderAssetConverter::RemoveAsset(const AssetInfo& node)\n    {\n        String buildedAssetPath = mAssetsBuilder->GetBuiltAssetsPath() + node.path;\n\n        o2FileSystem.FolderRemove(buildedAssetPath);\n    }\n\n    void FolderAssetConverter::MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo)\n    {\n        String fullPathFrom = mAssetsBuilder->GetBuiltAssetsPath() + nodeFrom.path;\n        String fullPathTo = mAssetsBuilder->GetBuiltAssetsPath() + nodeTo.path;\n\n        o2FileSystem.FolderCreate(fullPathTo);\n\n        mRemovedFolders.Add(fullPathFrom);\n        mRemovedFolders.Remove(fullPathTo);\n    }\n\n    Vector<UID> FolderAssetConverter::AssetsPostProcess()\n    {\n        for (auto fold : mRemovedFolders)\n            o2FileSystem.FolderRemove(fold);\n\n        return Vector<UID>();\n    }\n\n    void FolderAssetConverter::Reset()\n    {\n        mRemovedFolders.Clear();\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::FolderAssetConverter, o2__FolderAssetConverter);\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/FolderAssetConverter.h",
    "content": "#pragma once\n\n#include \"IAssetConverter.h\"\n\nnamespace o2\n{\n    // ----------------\n    // Folder converter\n    // ----------------\n    class FolderAssetConverter: public IAssetConverter\n    {\n    public:\n        // Returns vector of processing assets types\n        Vector<const Type*> GetProcessingAssetsTypes() const override;\n\n        // Converts folder by path\n        void ConvertAsset(const AssetInfo& node) override;\n\n        // Removes folder by path\n        void RemoveAsset(const AssetInfo& node) override;\n\n        // Moves folder to new path\n        void MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo) override;\n\n        // Post processing folders\n        Vector<UID> AssetsPostProcess() override;\n\n        // Resets converter\n        void Reset() override;\n\n        IOBJECT(FolderAssetConverter);\n\n    protected:\n        Vector<String> mRemovedFolders; // Removes folders\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::FolderAssetConverter)\n{\n    BASE_CLASS(o2::IAssetConverter);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FolderAssetConverter)\n{\n    FIELD().PROTECTED().NAME(mRemovedFolders);\n}\nEND_META;\nCLASS_METHODS_META(o2::FolderAssetConverter)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vector<const Type*>, GetProcessingAssetsTypes);\n    FUNCTION().PUBLIC().SIGNATURE(void, ConvertAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveAsset, const AssetInfo&, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<UID>, AssetsPostProcess);\n    FUNCTION().PUBLIC().SIGNATURE(void, Reset);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/IAssetConverter.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"IAssetConverter.h\"\n\n#include \"o2AssetBuilder/AssetsBuilder.h\"\n\nnamespace o2\n{\n    Vector<const Type*> IAssetConverter::GetProcessingAssetsTypes() const\n    {\n        return Vector<const Type*>();\n    }\n\n    void IAssetConverter::ConvertAsset(const AssetInfo& node)\n    {}\n\n    void IAssetConverter::RemoveAsset(const AssetInfo& node)\n    {}\n\n    void IAssetConverter::MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo)\n    {}\n\n    Vector<UID> IAssetConverter::AssetsPostProcess()\n    {\n        return Vector<UID>();\n    }\n\n    void IAssetConverter::Reset()\n    {}\n\n    void IAssetConverter::SetAssetsBuilder(AssetsBuilder* builder)\n    {\n        mAssetsBuilder = builder;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::IAssetConverter, o2__IAssetConverter);\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/IAssetConverter.h",
    "content": "#pragma once\n\n#include \"o2/Assets/AssetsTree.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Memory/MemoryManager.h\"\n\n#include \"o2/Utils/Reflection/Type.h\"\n\nnamespace o2\n{\n    class AssetsBuilder;\n\n    // --------------------------------------\n    // Asset converter interface\n    // Converts assets with specialized types\n    //---------------------------------------\n    class IAssetConverter: public IObject\n    {\n    public:\n        // Virtual destructor\n        virtual ~IAssetConverter() {}\n\n        // Returns vector of processing assets types\n        virtual Vector<const Type*> GetProcessingAssetsTypes() const;\n\n        // Converts asset by path\n        virtual void ConvertAsset(const AssetInfo& node);\n\n        // Removes asset by path\n        virtual void RemoveAsset(const AssetInfo& node);\n\n        // Moves asset to new path\n        virtual void MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo);\n\n        // Post processing\n        virtual Vector<UID> AssetsPostProcess();\n\n        // Resets converter\n        virtual void Reset();\n\n        // Sets owner assets builder\n        void SetAssetsBuilder(AssetsBuilder* builder);\n\n        IOBJECT(IAssetConverter);\n\n    protected:\n        // Assets builder pointer\n        AssetsBuilder* mAssetsBuilder = nullptr;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::IAssetConverter)\n{\n    BASE_CLASS(o2::IObject);\n}\nEND_META;\nCLASS_FIELDS_META(o2::IAssetConverter)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mAssetsBuilder);\n}\nEND_META;\nCLASS_METHODS_META(o2::IAssetConverter)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vector<const Type*>, GetProcessingAssetsTypes);\n    FUNCTION().PUBLIC().SIGNATURE(void, ConvertAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveAsset, const AssetInfo&, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<UID>, AssetsPostProcess);\n    FUNCTION().PUBLIC().SIGNATURE(void, Reset);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAssetsBuilder, AssetsBuilder*);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/ImageAssetConverter.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ImageAssetConverter.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2AssetBuilder/AssetsBuilder.h\"\n\nnamespace o2\n{\n    Vector<const Type*> ImageAssetConverter::GetProcessingAssetsTypes() const\n    {\n        Vector<const Type*> res;\n        res.Add(&TypeOf(ImageAsset));\n        return res;\n    }\n\n    void ImageAssetConverter::ConvertAsset(const AssetInfo& node)\n    {\n        String sourceAssetPath = mAssetsBuilder->GetSourceAssetsPath() + node.path;\n        String builtAssetPath = mAssetsBuilder->GetBuiltAssetsPath() + node.path;\n\n        o2FileSystem.FileCopy(sourceAssetPath, builtAssetPath);\n    }\n\n    void ImageAssetConverter::RemoveAsset(const AssetInfo& node)\n    {\n        String builtAssetPath = mAssetsBuilder->GetBuiltAssetsPath() + node.path;\n\n        o2FileSystem.FileDelete(builtAssetPath);\n    }\n\n    void ImageAssetConverter::MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo)\n    {\n        String fullPathFrom = mAssetsBuilder->GetBuiltAssetsPath() + nodeFrom.path;\n        String fullPathTo = mAssetsBuilder->GetBuiltAssetsPath() + nodeTo.path;\n\n        o2FileSystem.FileMove(fullPathFrom, fullPathTo);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ImageAssetConverter, o2__ImageAssetConverter);\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/ImageAssetConverter.h",
    "content": "#pragma once\n\n#include \"IAssetConverter.h\"\n\nnamespace o2\n{\n    // ---------------------\n    // Image asset converter\n    // ---------------------\n    class ImageAssetConverter: public IAssetConverter\n    {\n    public:\n        // Returns vector of processing assets types\n        Vector<const Type*> GetProcessingAssetsTypes() const override;\n\n        // Converts image\n        void ConvertAsset(const AssetInfo& node) override;\n\n        // Removes image\n        void RemoveAsset(const AssetInfo& node) override;\n\n        // Moves image to new path\n        void MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo) override;\n\n        IOBJECT(ImageAssetConverter);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ImageAssetConverter)\n{\n    BASE_CLASS(o2::IAssetConverter);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ImageAssetConverter)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::ImageAssetConverter)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vector<const Type*>, GetProcessingAssetsTypes);\n    FUNCTION().PUBLIC().SIGNATURE(void, ConvertAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveAsset, const AssetInfo&, const AssetInfo&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/StdAssetConverter.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"StdAssetConverter.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/BinaryAsset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2AssetBuilder/AssetsBuilder.h\"\n\nnamespace o2\n{\n    Vector<const Type*> StdAssetConverter::GetProcessingAssetsTypes() const\n    {\n        Vector<const Type*> res;\n        res.Add(&TypeOf(BinaryAsset));\n        return res;\n    }\n\n    void StdAssetConverter::ConvertAsset(const AssetInfo& node)\n    {\n        String sourceAssetPath = mAssetsBuilder->GetSourceAssetsPath() + node.path;\n        String buildedAssetPath = mAssetsBuilder->GetBuiltAssetsPath() + node.path;\n\n        o2FileSystem.FileCopy(sourceAssetPath, buildedAssetPath);\n    }\n\n    void StdAssetConverter::RemoveAsset(const AssetInfo& node)\n    {\n        String buildedAssetPath = mAssetsBuilder->GetBuiltAssetsPath() + node.path;\n\n        o2FileSystem.FileDelete(buildedAssetPath);\n    }\n\n    void StdAssetConverter::MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo)\n    {\n        String fullPathFrom = mAssetsBuilder->GetBuiltAssetsPath() + nodeFrom.path;\n        String fullPathTo = mAssetsBuilder->GetBuiltAssetsPath() + nodeTo.path;\n\n        o2FileSystem.FileMove(fullPathFrom, fullPathTo);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::StdAssetConverter, o2__StdAssetConverter);\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/Converters/StdAssetConverter.h",
    "content": "#pragma once\n\n#include \"IAssetConverter.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------------------\n    // Standard assets converter. Copying file and meta without changing\n    // -----------------------------------------------------------------\n    class StdAssetConverter: public IAssetConverter\n    {\n    public:\n        // Returns vector of processing assets types\n        Vector<const Type*> GetProcessingAssetsTypes() const override;\n\n        // Copies asset\n        void ConvertAsset(const AssetInfo& node) override;\n\n        // Removes asset\n        void RemoveAsset(const AssetInfo& node) override;\n\n        // Moves asset to new path\n        void MoveAsset(const AssetInfo& nodeFrom, const AssetInfo& nodeTo) override;\n\n        IOBJECT(StdAssetConverter);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::StdAssetConverter)\n{\n    BASE_CLASS(o2::IAssetConverter);\n}\nEND_META;\nCLASS_FIELDS_META(o2::StdAssetConverter)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::StdAssetConverter)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vector<const Type*>, GetProcessingAssetsTypes);\n    FUNCTION().PUBLIC().SIGNATURE(void, ConvertAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAsset, const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveAsset, const AssetInfo&, const AssetInfo&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/ImageCompressor.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ImageCompressor.h\"\n\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    void ImageCompressor::CompressImage(const String& path, const String& outPath, TextureFormat format, int quality)\n    {\n        o2Debug.Log(\"Compress image from \" + path + \" to \" + outPath + \" format \" + o2Reflection.GetEnumName(format));\n\n        String command = mConfig.formatCommands[::GetEnginePlatform()][format];\n        if (command.IsEmpty())\n            return;\n\n        if (::GetEnginePlatform() == Platform::Windows)\n            command = \"\\\"\" + command + \"\\\"\";\n\n        command.ReplaceAll(\"{quality}\", String(quality));\n        command.ReplaceAll(\"{input}\", path);\n        command.ReplaceAll(\"{output}\", outPath);\n\n        o2Debug.Log(\"Run compress command:\" + command);\n        int res = system(command.c_str());\n\n        if (res != 0)\n            o2Debug.Log(\"Something wrong, non-zero result\");\n\n        o2FileSystem.FileDelete(path);\n    }\n\n    void ImageCompressor::LoadConfig(const String& path)\n    {\n        DataDocument doc;\n        o2Debug.Log(\"Load compressions config: \" + path);\n        doc.LoadFromFile(path);\n        mConfig = doc;\n    }\n\n    void ImageCompressor::GenerateDefaultConfig()\n    {\n        mConfig.formatCommands =\n        {\n            { \n                Platform::Windows, \n                {\n                    { TextureFormat::DXT5, \"\\\"../../deps/o2/AssetsBuildTool/Bin/nvcompress.exe\\\" -nomips -bc3 -alpha \\\"{input}\\\" \\\"{output}.dds\\\"\" }\n                } \n            }\n        };\n\n        DataDocument doc;\n        doc = mConfig;\n        doc.SaveToFile(::GetProjectRootPath() + String(\"deps/o2/CompressToolsConfig.json\"));\n    }\n\n    ImageCompressor::Config ImageCompressor::mConfig;\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ImageCompressor::Config, o2__ImageCompressor__Config);\n// --- END META ---\n"
  },
  {
    "path": "AssetsBuildTool/Sources/o2AssetBuilder/ImageCompressor.h",
    "content": "#pragma once\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nnamespace o2\n{\n    class ImageCompressor\n    {\n    public:\n        // Compresses image\n        static void CompressImage(const String& path, const String& outPath, TextureFormat format, int quality);\n\n        // Loads config\n        static void LoadConfig(const String& path);\n\n        // Generates default config\n        static void GenerateDefaultConfig();\n\n    public:\n        // -------------------------\n        // Compressions tools config\n        // -------------------------\n        struct Config : public ISerializable\n        {\n            // The format is:\n            // path/to/executable custom parameters {quality 0-100} {input} {output}\n\n            Map<Platform, Map<TextureFormat, String>> formatCommands; // Texture formats compression commands @SERIALIZABLE\n\n            SERIALIZABLE(Config);\n        };\n\n    public:\n        static Config mConfig;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ImageCompressor::Config)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ImageCompressor::Config)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(formatCommands);\n}\nEND_META;\nCLASS_METHODS_META(o2::ImageCompressor::Config)\n{\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "CMake/CMakeDetermineMetalCompiler.cmake",
    "content": "# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying\n# file LICENCE.txt or https://cmake.org/licensing for details.\n\n# CMakeDetermine(LANG)Compiler.cmake -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in\n\ninclude(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)\n\nif(NOT CMAKE_Metal_COMPILER_NAMES)\n    set(CMAKE_Metal_COMPILER_NAMES metal)\nendif()\n\nif(\"${CMAKE_GENERATOR}\" STREQUAL \"Xcode\")\n    set(CMAKE_Metal_COMPILER_XCODE_TYPE sourcecode.metal)\n\n    execute_process(COMMAND xcrun --find metal\n            OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE\n            ERROR_VARIABLE _xcrun_err RESULT_VARIABLE _xcrun_result\n            )\n\n    if(_xcrun_result EQUAL 0 AND EXISTS \"${_xcrun_out}\")\n        set(CMAKE_Metal_COMPILER \"${_xcrun_out}\")\n    else()\n        _cmake_find_compiler_path(Metal)\n    endif()\nelse()\n    if(CMAKE_Metal_COMPILER)\n        _cmake_find_compiler_path(Metal)\n    else()\n        set(CMAKE_Metal_COMPILER_INIT NOTFOUND)\n\n        if(NOT $ENV{METALC} STREQUAL \"\")\n            get_filename_component(CMAKE_Metal_COMPILER_INIT $ENV{METALC} PROGRAM PROGRAM_ARGS CMAKE_Metal_FLAGS_ENV_INIT)\n            if(CMAKE_Metal_FLAGS_ENV_INIT)\n                set(CMAKE_Metal_COMPILER_ARG1 \"${CMAKE_Metal_FLAGS_ENV_INIT}\" CACHE STRING \"Arguments to the Metal compiler\")\n            endif()\n            if(NOT EXISTS ${CMAKE_Metal_COMPILER_INIT})\n                message(FATAL_ERROR \"Could not find compiler set in environment variable METALC\\n$ENV{METALC}.\\n${CMAKE_Metal_COMPILER_INIT}\")\n            endif()\n        endif()\n\n        if(NOT CMAKE_Metal_COMPILER_INIT)\n            set(CMAKE_Metal_COMPILER_LIST metal ${_CMAKE_TOOLCHAIN_PREFIX}metal)\n        endif()\n\n        _cmake_find_compiler(Metal)\n    endif()\n\n    mark_as_advanced(CMAKE_Metal_COMPILER)\nendif()\n\n# For Metal we need to explicitly query the version.\nif(CMAKE_Metal_COMPILER AND NOT CMAKE_Metal_COMPILER_VERSION)\n    execute_process(\n            COMMAND \"${CMAKE_Metal_COMPILER}\" --version\n            OUTPUT_VARIABLE output ERROR_VARIABLE output\n            RESULT_VARIABLE result\n            TIMEOUT 10\n    )\n    message(CONFIGURE_LOG\n            \"Running the Metal compiler: \\\"${CMAKE_Metal_COMPILER}\\\" --version\\n\"\n            \"${output}\\n\"\n            )\n\n    if(output MATCHES [[metal version ([0-9]+\\.[0-9]+(\\.[0-9]+)?)]])\n        set(CMAKE_Metal_COMPILER_VERSION \"${CMAKE_MATCH_1}\")\n        if(NOT CMAKE_Metal_COMPILER_ID)\n            set(CMAKE_Metal_COMPILER_ID \"Apple\")\n        endif()\n    endif()\nendif()\n\nif(NOT _CMAKE_TOOLCHAIN_LOCATION)\n    get_filename_component(_CMAKE_TOOLCHAIN_LOCATION \"${CMAKE_Metal_COMPILER}\" PATH)\nendif ()\n\nset(_CMAKE_PROCESSING_LANGUAGE \"Metal\")\ninclude(CMakeFindBinUtils)\nunset(_CMAKE_PROCESSING_LANGUAGE)\n\nconfigure_file(\n        ${CMAKE_CURRENT_LIST_DIR}/CMakeMetalCompiler.cmake.in\n        ${CMAKE_PLATFORM_INFO_DIR}/CMakeMetalCompiler.cmake\n)\n\nset(CMAKE_Metal_COMPILER_ENV_VAR \"METALC\")"
  },
  {
    "path": "CMake/CMakeMetalCompiler.cmake.in",
    "content": "# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying\n# file LICENCE.txt or https://cmake.org/licensing for details.\n\n# CMake(LANG)Compiler.cmake.in  -> used by CMakeDetermine(LANG)Compiler.cmake\n# This file is used to store compiler information and is copied down into try\n# compile directories so that try compiles do not need to re-determine and test\n# the LANG\n\nset(CMAKE_Metal_COMPILER \"@CMAKE_Metal_COMPILER@\")\nset(CMAKE_Metal_COMPILER_ID \"@CMAKE_Metal_COMPILER_ID@\")\nset(CMAKE_Metal_COMPILER_VERSION \"@CMAKE_Metal_COMPILER_VERSION@\")\n\nset(CMAKE_Metal_COMPILER_LOADED 1)\nset(CMAKE_Metal_COMPILER_WORKS \"@CMAKE_Metal_COMPILER_WORKS@\")\n\nset(CMAKE_Metal_COMPILER_ENV_VAR \"METALC\")\n\nset(CMAKE_Metal_COMPILER_ID_RUN \"@CMAKE_Metal_COMPILER_ID_RUN@\")\nset(CMAKE_Metal_SOURCE_FILE_EXTENSIONS metal)\nset(CMAKE_Metal_OUTPUT_EXTENSION \".air\")\nset(CMAKE_STATIC_LIBRARY_PREFIX_Metal \"\")\nset(CMAKE_STATIC_LIBRARY_SUFFIX_Metal \".metal-ar\")\nset(CMAKE_SHARED_LIBRARY_PREFIX_Metal \"\")\nset(CMAKE_SHARED_LIBRARY_SUFFIX_Metal \".metallib\")\nset(CMAKE_SHARED_MODULE_PREFIX_Metal \"\")\nset(CMAKE_SHARED_MODULE_SUFFIX_Metal \".metallib\")\nset(CMAKE_EXECUTABLE_SUFFIX_Metal \".metallib\")"
  },
  {
    "path": "CMake/CMakeMetalInformation.cmake",
    "content": "# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying\n# file LICENCE.txt or https://cmake.org/licensing for details.\n\n#  CMake(LANG)Information.cmake  -> set up rule variables for LANG :\n#    CMAKE_(LANG)_CREATE_SHARED_LIBRARY\n#    CMAKE_(LANG)_CREATE_SHARED_MODULE\n#    CMAKE_(LANG)_CREATE_STATIC_LIBRARY\n#    CMAKE_(LANG)_COMPILE_OBJECT\n#    CMAKE_(LANG)_LINK_EXECUTABLE\n\ninclude(CMakeCommonLanguageInclude)\n\nset(CMAKE_Metal_FLAGS_INIT \"-ffast-math\")\nset(CMAKE_Metal_FLAGS_DEBUG_INIT \"-gline-tables-only -frecord-sources\")\nset(CMAKE_Metal_FLAGS_RELWITHDEBINFO_INIT \"-gline-tables-only -frecord-sources\")\n\ncmake_initialize_per_config_variable(CMAKE_Metal_FLAGS \"Flags used by the Metal compiler\")\n\nset(CMAKE_INCLUDE_FLAG_Metal \"-I \")\nset(CMAKE_Metal_COMPILER_ARG1 \"\")\nset(CMAKE_Metal_DEFINE_FLAG -D)\nset(CMAKE_Metal_FRAMEWORK_SEARCH_FLAG \"-F \")\nset(CMAKE_Metal_LIBRARY_PATH_FLAG \"-L \")\nset(CMAKE_Metal_SYSROOT_FLAG \"-isysroot\")\nset(CMAKE_Metal_COMPILE_OPTIONS_TARGET \"-target \")\nset(CMAKE_DEPFILE_FLAGS_Metal \"-MMD -MT dependencies -MF <DEP_FILE>\")\n\nif(CMAKE_GENERATOR MATCHES \"Makefiles\")\n    set(CMAKE_Metal_DEPFILE_FORMAT gcc)\n    set(CMAKE_Metal_DEPENDS_USE_COMPILER TRUE)\nendif()\n\nset(CMAKE_Metal_COMPILER_PREDEFINES_COMMAND \"${CMAKE_Metal_COMPILER}\")\nif(CMAKE_Metal_COMPILER_TARGET)\n    list(APPEND CMAKE_Metal_COMPILER_PREDEFINES_COMMAND \"-target\" \"${CMAKE_Metal_COMPILER_TARGET}\")\nendif()\n\n# now define the following rule variables\n\n# CMAKE_Metal_CREATE_SHARED_LIBRARY\n# CMAKE_Metal_CREATE_SHARED_MODULE\n# CMAKE_Metal_COMPILE_OBJECT\n# CMAKE_Metal_LINK_EXECUTABLE\n\n# variables supplied by the generator at use time\n# <TARGET>\n# <TARGET_BASE> the target without the suffix\n# <OBJECTS>\n# <OBJECT>\n# <LINK_LIBRARIES>\n# <FLAGS>\n# <LINK_FLAGS>\n\n# Metal compiler information\n# <CMAKE_Metal_COMPILER>\n# <CMAKE_SHARED_LIBRARY_CREATE_Metal_FLAGS>\n# <CMAKE_SHARED_MODULE_CREATE_Metal_FLAGS>\n# <CMAKE_Metal_LINK_FLAGS>\n\nif(NOT CMAKE_Metal_COMPILE_OBJECT)\n    set(CMAKE_Metal_COMPILE_OBJECT\n            \"<CMAKE_Metal_COMPILER> -c <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>\"\n            )\nendif()\n\nif(NOT CMAKE_Metal_CREATE_SHARED_LIBRARY)\n    set(CMAKE_Metal_CREATE_SHARED_LIBRARY\n            \"<CMAKE_Metal_COMPILER> <CMAKE_SHARED_LIBRARY_Metal_FLAGS> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Metal_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>\"\n            )\nendif()\n\nif(NOT CMAKE_Metal_CREATE_SHARED_MODULE)\n    set(CMAKE_Metal_CREATE_SHARED_MODULE\n            \"${CMAKE_Metal_CREATE_SHARED_LIBRARY}\"\n            )\nendif()\n\nif(NOT CMAKE_Metal_LINK_EXECUTABLE)\n    # Metal shaders don't really have \"executables\", but we need this for the try_compile to work properly, so we'll just have it output a metallib file\n    set(CMAKE_Metal_LINK_EXECUTABLE\n            \"<CMAKE_Metal_COMPILER> <FLAGS> <CMAKE_Metal_LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>\"\n            )\nendif()\n\nset(CMAKE_Metal_INFORMATION_LOADED 1)"
  },
  {
    "path": "CMake/CMakeTestMetalCompiler.cmake",
    "content": "# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying\n# file LICENCE.txt or https://cmake.org/licensing for details.\n\n# CMakeTest(LANG)Compiler.cmake -> test the compiler and set:\n#     SET(CMAKE_(LANG)_COMPILER_WORKS 1 CACHE INTERNAL \"\")\n\nif(CMAKE_Metal_COMPILER_FORCED)\n    # The compiler configuration was forced by the user.\n    # Assume the user has configured all compiler information.\n    set(CMAKE_Metal_COMPILER_WORKS TRUE)\n    return()\nendif()\n\ninclude(CMakeTestCompilerCommon)\n\nif(\"${CMAKE_GENERATOR}\" STREQUAL \"Xcode\")\n    if(XCODE_VERSION VERSION_GREATER 7.0)\n        set(CMAKE_Metal_COMPILER_WORKS 1)\n    endif()\nendif()\n\n# This file is used by EnableLanguage in cmGlobalGenerator to\n# determine that that selected Metal compiler can actually compile\n# and link the most basic of programs.   If not, a fatal error\n# is set and cmake stops processing commands and will not generate\n# any makefiles or projects.\nif(NOT CMAKE_Metal_COMPILER_WORKS)\n    PrintTestCompilerStatus(\"Metal\")\n    __TestCompiler_setTryCompileTargetType()\n\n    string(CONCAT __TestCompiler_testMetalCompilerSource\n            \"#ifndef __METAL_VERSION__\\n\"\n            \"# error \\\"The CMAKE_Metal_COMPILER is not a Metal compiler\\\"\\n\"\n            \"#endif\\n\"\n            \"#import <metal_stdlib>\\n\"\n            \"using namespace metal;\\n\"\n            )\n\n    # Clear result from normal variable.\n    unset(CMAKE_Metal_COMPILER_WORKS)\n\n    # Puts test result in cache variable.\n    try_compile(CMAKE_Metal_COMPILER_WORKS\n            SOURCE_FROM_VAR testMetalCompiler.metal __TestCompiler_testMetalCompilerSource\n            OUTPUT_VARIABLE __CMAKE_Metal_COMPILER_OUTPUT\n            )\n    unset(__TestCompiler_testMetalCompilerSource)\n\n    # Move result from cache to normal variable.\n    set(CMAKE_Metal_COMPILER_WORKS ${CMAKE_Metal_COMPILER_WORKS})\n    unset(CMAKE_Metal_COMPILER_WORKS CACHE)\n    __TestCompiler_restoreTryCompileTargetType()\n    set(METAL_TEST_WAS_RUN 1)\nendif()\n\nif(NOT CMAKE_Metal_COMPILER_WORKS)\n    PrintTestCompilerResult(CHECK_FAIL \"broken\")\n    string(REPLACE \"\\n\" \"\\n  \" _output \"${__CMAKE_Metal_COMPILER_OUTPUT}\")\n    message(FATAL_ERROR \"The Metal compiler\\n  \\\"${CMAKE_Metal_COMPILER}\\\"\\n\"\n            \"is not able to compile a simple test program.\\nIt fails \"\n            \"with the following output:\\n  ${_output}\\n\\n\"\n            \"CMake will not be able to correctly generate this project.\"\n            )\nelse()\n    if(METAL_TEST_WAS_RUN)\n        PrintTestCompilerResult(CHECK_PASS \"works\")\n    endif()\n\n    # Re-configure to save learned information.\n    configure_file(\n            ${CMAKE_CURRENT_LIST_DIR}/CMakeMetalCompiler.cmake.in\n            ${CMAKE_PLATFORM_INFO_DIR}/CMakeMetalCompiler.cmake\n            @ONLY\n    )\n    include(${CMAKE_PLATFORM_INFO_DIR}/CMakeMetalCompiler.cmake)\nendif()\n\nunset(__CMAKE_Metal_COMPILER_OUTPUT)"
  },
  {
    "path": "CMake/CheckLanguage.cmake",
    "content": "# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying\n# file LICENCE.txt or https://cmake.org/licensing for details.\n\n#[=======================================================================[.rst:\nCheckLanguage\n-------------\n\nCheck whether a language can be enabled by the :command:`enable_language`\nor :command:`project` commands:\n\n.. command:: check_language\n\n  .. code-block:: cmake\n\n    check_language(<lang>)\n\n  Try enabling language ``<lang>`` in a test project and record results\n  in the cache:\n\n  :variable:`CMAKE_<LANG>_COMPILER`\n    If the language can be enabled, this variable is set to the compiler\n    that was found.  If the language cannot be enabled, this variable is\n    set to ``NOTFOUND``.\n\n    If this variable is already set, either explicitly or cached by\n    a previous call, the check is skipped.\n\n  :variable:`CMAKE_<LANG>_HOST_COMPILER`\n    This variable is set when ``<lang>`` is ``CUDA`` or ``HIP``.\n\n    If the check detects an explicit host compiler that is required for\n    compilation, this variable will be set to that compiler.\n    If the check detects that no explicit host compiler is needed,\n    this variable will be cleared.\n\n    If this variable is already set, its value is preserved only if\n    :variable:`CMAKE_<LANG>_COMPILER` is also set.\n    Otherwise, the check runs and overwrites\n    :variable:`CMAKE_<LANG>_HOST_COMPILER` with a new result.\n    Note that :variable:`CMAKE_<LANG>_HOST_COMPILER` documents it should\n    not be set without also setting\n    :variable:`CMAKE_<LANG>_COMPILER` to a NVCC compiler.\n\n  :variable:`CMAKE_<LANG>_PLATFORM <CMAKE_HIP_PLATFORM>`\n    This variable is set to the detected GPU platform when ``<lang>`` is ``HIP``.\n\n    If the variable is already set its value is always preserved. Only compatible values\n    will be considered for :variable:`CMAKE_<LANG>_COMPILER`.\n\nFor example:\n\n.. code-block:: cmake\n\n  check_language(Fortran)\n  if(CMAKE_Fortran_COMPILER)\n    enable_language(Fortran)\n  else()\n    message(STATUS \"No Fortran support\")\n  endif()\n#]=======================================================================]\n\n# This file has been modified to take into account the CMAKE_MODULES path when trying to build the test project\n# Ref https://gitlab.kitware.com/cmake/cmake/-/issues/26020\n# This was merged in to CMake 3.30.0, so we only need this for older versions\n\nif(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.30)\n    include(${CMAKE_ROOT}/Modules/CheckLanguage.cmake)\nelse()\n    include_guard(GLOBAL)\n\n    block(SCOPE_FOR POLICIES)\n        cmake_policy(SET CMP0126 NEW)\n\n        macro(check_language lang)\n            if(NOT DEFINED CMAKE_${lang}_COMPILER)\n                set(_desc \"Looking for a ${lang} compiler\")\n                message(CHECK_START \"${_desc}\")\n                file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang})\n\n                set(extra_compiler_variables)\n                if(\"${lang}\" MATCHES \"^(CUDA|HIP)$\" AND NOT CMAKE_GENERATOR MATCHES \"Visual Studio\")\n                    set(extra_compiler_variables \"set(CMAKE_${lang}_HOST_COMPILER \\\\\\\"\\${CMAKE_${lang}_HOST_COMPILER}\\\\\\\")\")\n                endif()\n\n                if(\"${lang}\" STREQUAL \"HIP\")\n                    list(APPEND extra_compiler_variables \"set(CMAKE_${lang}_PLATFORM \\\\\\\"\\${CMAKE_${lang}_PLATFORM}\\\\\\\")\")\n                endif()\n\n                list(TRANSFORM extra_compiler_variables PREPEND \"\\\"\")\n                list(TRANSFORM extra_compiler_variables APPEND \"\\\\n\\\"\")\n                list(JOIN extra_compiler_variables \"\\n  \" extra_compiler_variables)\n\n                set(_cl_content\n                        \"cmake_minimum_required(VERSION ${CMAKE_VERSION})\n    set(CMAKE_MODULE_PATH \\\"${CMAKE_MODULE_PATH}\\\")\n    project(Check${lang} ${lang})\n    file(WRITE \\\"\\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\\\"\n      \\\"set(CMAKE_${lang}_COMPILER \\\\\\\"\\${CMAKE_${lang}_COMPILER}\\\\\\\")\\\\n\\\"\n      ${extra_compiler_variables}\n      )\"\n                )\n\n                file(WRITE \"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang}/CMakeLists.txt\"\n                        \"${_cl_content}\")\n                if(CMAKE_GENERATOR_INSTANCE)\n                    set(_D_CMAKE_GENERATOR_INSTANCE \"-DCMAKE_GENERATOR_INSTANCE:INTERNAL=${CMAKE_GENERATOR_INSTANCE}\")\n                else()\n                    set(_D_CMAKE_GENERATOR_INSTANCE \"\")\n                endif()\n                if(CMAKE_GENERATOR MATCHES \"^(Xcode$|Green Hills MULTI$|Visual Studio)\")\n                    set(_D_CMAKE_MAKE_PROGRAM \"\")\n                else()\n                    set(_D_CMAKE_MAKE_PROGRAM \"-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}\")\n                endif()\n                if(CMAKE_TOOLCHAIN_FILE)\n                    set(_D_CMAKE_TOOLCHAIN_FILE \"-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE}\")\n                else()\n                    set(_D_CMAKE_TOOLCHAIN_FILE \"\")\n                endif()\n                if(CMAKE_${lang}_PLATFORM)\n                    set(_D_CMAKE_LANG_PLATFORM \"-DCMAKE_${lang}_PLATFORM:STRING=${CMAKE_${lang}_PLATFORM}\")\n                else()\n                    set(_D_CMAKE_LANG_PLATFORM \"\")\n                endif()\n                execute_process(\n                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang}\n                        COMMAND ${CMAKE_COMMAND} . -G ${CMAKE_GENERATOR}\n                        -A \"${CMAKE_GENERATOR_PLATFORM}\"\n                        -T \"${CMAKE_GENERATOR_TOOLSET}\"\n                        ${_D_CMAKE_GENERATOR_INSTANCE}\n                        ${_D_CMAKE_MAKE_PROGRAM}\n                        ${_D_CMAKE_TOOLCHAIN_FILE}\n                        ${_D_CMAKE_LANG_PLATFORM}\n                        OUTPUT_VARIABLE _cl_output\n                        ERROR_VARIABLE _cl_output\n                        RESULT_VARIABLE _cl_result\n                )\n                include(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang}/result.cmake OPTIONAL)\n                if(CMAKE_${lang}_COMPILER AND \"${_cl_result}\" STREQUAL \"0\")\n                    message(CONFIGURE_LOG\n                            \"${_desc} passed with the following output:\\n\"\n                            \"${_cl_output}\\n\")\n                    set(_CHECK_COMPILER_STATUS CHECK_PASS)\n                else()\n                    set(CMAKE_${lang}_COMPILER NOTFOUND)\n                    set(_CHECK_COMPILER_STATUS CHECK_FAIL)\n                    message(CONFIGURE_LOG\n                            \"${_desc} failed with the following output:\\n\"\n                            \"${_cl_output}\\n\")\n                endif()\n                message(${_CHECK_COMPILER_STATUS} \"${CMAKE_${lang}_COMPILER}\")\n                set(CMAKE_${lang}_COMPILER \"${CMAKE_${lang}_COMPILER}\" CACHE FILEPATH \"${lang} compiler\")\n                mark_as_advanced(CMAKE_${lang}_COMPILER)\n\n                if(CMAKE_${lang}_HOST_COMPILER)\n                    message(STATUS \"Looking for a ${lang} host compiler - ${CMAKE_${lang}_HOST_COMPILER}\")\n                    set(CMAKE_${lang}_HOST_COMPILER \"${CMAKE_${lang}_HOST_COMPILER}\" CACHE FILEPATH \"${lang} host compiler\")\n                    mark_as_advanced(CMAKE_${lang}_HOST_COMPILER)\n                endif()\n\n                if(CMAKE_${lang}_PLATFORM)\n                    set(CMAKE_${lang}_PLATFORM \"${CMAKE_${lang}_PLATFORM}\" CACHE STRING \"${lang} platform\")\n                    mark_as_advanced(CMAKE_${lang}_PLATFORM)\n                endif()\n            endif()\n        endmacro()\n\n    endblock()\nendif()"
  },
  {
    "path": "CMake/MetalShaderSupport.cmake",
    "content": "# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying\n# file LICENCE.txt or https://cmake.org/licensing for details.\n\nfunction(add_metal_shader_library TARGET)\n    cmake_parse_arguments(PARSE_ARGV 1 _amsl\n            \"\"\n            \"STANDARD\"\n            \"\"\n            )\n\n    add_library(${TARGET} MODULE ${_amsl_UNPARSED_ARGUMENTS})\n\n    set_target_properties(${TARGET} PROPERTIES\n            DEBUG_POSTFIX \"\"\n            XCODE_PRODUCT_TYPE com.apple.product-type.metal-library\n            XCODE_ATTRIBUTE_MTL_FAST_MATH \"YES\"\n            XCODE_ATTRIBUTE_MTL_ENABLE_DEBUG_INFO[variant=Debug] \"INCLUDE_SOURCE\"\n            XCODE_ATTRIBUTE_MTL_ENABLE_DEBUG_INFO[variant=RelWithDebInfo] \"INCLUDE_SOURCE\"\n            XCODE_ATTRIBUTE_MTL_HEADER_SEARCH_PATHS \"$(HEADER_SEARCH_PATHS)\"\n            )\n\n    if(_amsl_STANDARD AND _amsl_STANDARD MATCHES \"metal([0-9]+)\\.([0-9]+)\")\n        target_compile_options(${TARGET}\n                PRIVATE \"-std=${_amsl_STANDARD}\"\n                )\n\n        set_target_properties(${TARGET} PROPERTIES\n                XCODE_ATTRIBUTE_MTL_LANGUAGE_REVISION \"Metal${CMAKE_MATCH_1}${CMAKE_MATCH_2}\"\n                )\n    endif()\nendfunction()\n\nfunction(target_embed_metal_shader_libraries TARGET)\n    cmake_parse_arguments(PARSE_ARGV 1 _temsl\n            \"\"\n            \"\"\n            \"\"\n            )\n\n    if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.28 AND ${CMAKE_GENERATOR} STREQUAL \"Xcode\")\n        set_target_properties(${TARGET} PROPERTIES\n                XCODE_EMBED_RESOURCES \"${_temsl_UNPARSED_ARGUMENTS}\"\n                )\n    else()\n        foreach(SHADERLIB IN LISTS _temsl_UNPARSED_ARGUMENTS)\n            add_dependencies(${TARGET} ${SHADERLIB})\n            add_custom_command(TARGET ${TARGET} POST_BUILD\n                    COMMAND ${CMAKE_COMMAND} -E copy \"$<TARGET_FILE:${SHADERLIB}>\" \"$<TARGET_BUNDLE_CONTENT_DIR:${TARGET}>/Resources/$<TARGET_FILE_NAME:${SHADERLIB}>\"\n                    VERBATIM\n                    )\n        endforeach()\n    endif()\nendfunction()\n\nfunction(target_metal_shader_libraries TARGET)\n    cmake_parse_arguments(PARSE_ARGV 1 _temsl\n            \"\"\n            \"\"\n            \"\"\n    )\n\n    foreach(SHADERLIB IN LISTS _temsl_UNPARSED_ARGUMENTS)\n        add_dependencies(${TARGET} ${SHADERLIB})\n        add_custom_command(TARGET ${TARGET} POST_BUILD\n                COMMAND ${CMAKE_COMMAND} -E copy \"$<TARGET_FILE:${SHADERLIB}>\" \"${CMAKE_CURRENT_SOURCE_DIR}/Bin/${O2_PLATFORM}/$<TARGET_FILE_NAME:${SHADERLIB}>\"\n                VERBATIM\n        )\n    endforeach()\nendfunction()"
  },
  {
    "path": "CMakeLists.txt",
    "content": "if(APPLE)\n    project(o2 LANGUAGES C CXX OBJC OBJCXX)\nelse()\n    project(o2 LANGUAGES C CXX)\nendif()\n\nset(CMAKE_CXX_STANDARD 20)\n\nlist(APPEND CMAKE_MODULE_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/CMake\")\n\nif(APPLE)\n    include(CheckLanguage)\n    include(MetalShaderSupport)\n    check_language(Metal)\n    \n    if(CMAKE_Metal_COMPILER)\n       enable_language(Metal)\n    else ()\n       message(FATAL_ERROR \"Could not find compiler for metal\")\n    endif()\nendif()\n\n# Force off editor and tests for iOS\nif(CMAKE_SYSTEM_NAME STREQUAL \"iOS\")\n    set(O2_EDITOR OFF CACHE BOOL \"\" FORCE)\n    set(O2_TESTS OFF CACHE BOOL \"\" FORCE)\nendif()\n\n# Force off editor and tests for WebAssembly / Emscripten\nif(EMSCRIPTEN)\n    set(O2_EDITOR OFF CACHE BOOL \"\" FORCE)\n    set(O2_TESTS OFF CACHE BOOL \"\" FORCE)\nendif()\n\n# Force off editor and tests for Android\nif(ANDROID)\n    set(O2_EDITOR OFF CACHE BOOL \"\" FORCE)\n    set(O2_TESTS OFF CACHE BOOL \"\" FORCE)\nendif()\n\n# Options\noption(O2_SELFPROFILE \"Enable profiling o2 benchmark.\" OFF)\noption(O2_EDITOR \"Enables o2 editor.\" ON)\noption(O2_ASAN \"Enables ASAN (address sanitizer).\" OFF)\noption(O2_TRACY \"Enables Tracy profiling\" OFF)\noption(O2_MEMORY_ANALYZE \"Enables memory analyzing (slows down)\" OFF)\noption(O2_PLATFORM_INITIALIZATION_ENABLED \"Enables platform initialization\" ON)\noption(O2_ENABLE_LINK_ZLIB \"Enables linking zlib library\" ON)\noption(O2_ENABLE_LINK_LIBPNG \"Enables linking libpng library\" ON)\noption(O2_DISABLE_O2FRAMEWORK_PCH \"Disables precompiled headers for o2Framework\" OFF)\n\nif(MSVC AND NOT DEFINED O2_MSVC_MP_FLAG)\n    set(O2_MSVC_MP_COUNT \"\" CACHE STRING \"MSVC /MP process count; empty uses compiler default, 0 disables /MP\")\n\n    if(O2_MSVC_MP_COUNT STREQUAL \"0\")\n        set(O2_MSVC_MP_FLAG \"\")\n    elseif(O2_MSVC_MP_COUNT STREQUAL \"\")\n        set(O2_MSVC_MP_FLAG \"/MP\")\n    else()\n        set(O2_MSVC_MP_FLAG \"/MP${O2_MSVC_MP_COUNT}\")\n    endif()\nendif()\n\n# Common definitions\nset(O2_COMPILE_DEFINITIONS SCRIPTING_BACKEND_JERRYSCRIPT _CRT_SECURE_NO_WARNINGS)\n\nif (EMSCRIPTEN)\n    list(APPEND O2_COMPILE_DEFINITIONS PLATFORM_WASM)\n    list(APPEND O2_COMPILE_DEFINITIONS BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED)\nelseif (ANDROID)\n    list(APPEND O2_COMPILE_DEFINITIONS PLATFORM_ANDROID)\n    list(APPEND O2_COMPILE_DEFINITIONS BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED)\nelseif (WIN32)\n    list(APPEND O2_COMPILE_DEFINITIONS PLATFORM_WINDOWS)\nelseif (CMAKE_SYSTEM_NAME STREQUAL \"iOS\")\n    list(APPEND O2_COMPILE_DEFINITIONS PLATFORM_IOS)\n    list(APPEND O2_COMPILE_DEFINITIONS BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED)\nelseif (APPLE)\n    list(APPEND O2_COMPILE_DEFINITIONS PLATFORM_MAC)\n    list(APPEND O2_COMPILE_DEFINITIONS BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED)\nelseif (UNIX)\n    list(APPEND O2_COMPILE_DEFINITIONS PLATFORM_LINUX)\nendif()\n\nif (O2_IS_FILESYSTEM_EXPERIMENTAL)\n    list(APPEND O2_COMPILE_DEFINITIONS O2_FILESYSTEM_EXPERIMENTAL)\nendif()\n\nif (O2_RENDER_API STREQUAL \"gles2\")\n    list(APPEND O2_COMPILE_DEFINITIONS O2_RENDER_GLES2)\n    list(APPEND O2_COMPILE_DEFINITIONS O2_DISABLE_PLATFORM)\nendif()\n\nif (O2_SELFPROFILE)\n    list(APPEND O2_COMPILE_DEFINITIONS O2_PROFILE_STATS)\nendif()\n\nif (O2_EDITOR)\n    list(APPEND O2_COMPILE_DEFINITIONS O2_EDITOR_ENABLED)\nendif()\n\nif (O2_TRACY)\n    list(APPEND O2_COMPILE_DEFINITIONS TRACY_ENABLE)\nendif()\n\nif (O2_MEMORY_ANALYZE)\n    list(APPEND O2_COMPILE_DEFINITIONS MEMORY_ANALYZE_ENABLE)\nendif()\n\nif (O2_PLATFORM_INITIALIZATION_ENABLED)\n    list(APPEND O2_COMPILE_DEFINITIONS O2_PLATFORM_INITIALIZATION_ENABLED)\nendif()\n\nif (EMSCRIPTEN)\n    set(O2_PLATFORM \"WebAssembly\")\n    set(O2_PLATFORM \"WebAssembly\" PARENT_SCOPE)\nelseif (ANDROID)\n    set(O2_PLATFORM \"Android\")\n    set(O2_PLATFORM \"Android\" PARENT_SCOPE)\nelseif (CMAKE_SYSTEM_NAME STREQUAL \"iOS\")\n    set(O2_PLATFORM \"iOS\")\n    set(O2_PLATFORM \"iOS\" PARENT_SCOPE)\nelseif (APPLE)\n    set(O2_PLATFORM \"Mac\")\n    set(O2_PLATFORM \"Mac\" PARENT_SCOPE)\nelseif (UNIX)\n    set(O2_PLATFORM \"Linux\")\n    set(O2_PLATFORM \"Linux\" PARENT_SCOPE)\nelseif (WIN32)\n    set(O2_PLATFORM \"Windows\")\n    set(O2_PLATFORM \"Windows\" PARENT_SCOPE)\nelse()\n    message(FATAL_ERROR \"Unknown platform, please set O2_PLATFORM manually\")\nendif()\n\nset(O2_COMPILE_DEFINITIONS_EXPORT ${O2_COMPILE_DEFINITIONS} PARENT_SCOPE)\n\n# warings and errors\nif (MSVC)\n    add_compile_options(/W2)   \n\n    if(O2_ASAN)\n        add_compile_options(/fsanitize=address)\n        add_compile_definitions(_DISABLE_STRING_ANNOTATION _DISABLE_VECTOR_ANNOTATION _DISABLE_ITERATOR_ANNOTATION)\n    endif()\nelse()\n    set(O2_C_FLAGS \"-Wall -Werror\")\n\n    if (EMSCRIPTEN)\n        # Emscripten's Clang vintage varies between local dev and CI; tolerate unknown\n        # warning flags rather than erroring out, and silence diagnostics that older\n        # 3rd-party code in this repo trips on.\n        set(O2_C_FLAGS \"${O2_C_FLAGS} -Wno-unknown-warning-option -Wno-error=misleading-indentation -Wno-error=enum-enum-conversion -Wno-error=unterminated-string-initialization\")\n    endif()\n\n    if (ANDROID)\n        # NDK 28 Clang rejects unknown -Werror= options entirely, so we keep the\n        # list minimal and tolerate unknown warning flags rather than erroring out.\n        set(O2_C_FLAGS \"${O2_C_FLAGS} -Wno-error=misleading-indentation -Wno-error=enum-enum-conversion -Wno-unknown-warning-option\")\n    endif()\n    \n    set(O2_CXX_FLAGS \"-Wall -Wno-error=format -Wno-error=format-extra-args -Wno-error=conversion \\\n                         -Wno-error=incompatible-pointer-types -Wno-error=sign-conversion -Wno-error=pointer-sign \\\n                         -Wno-error=deprecated -Wno-reorder -Wno-unused-variable -Wno-unused-local-typedef \\\n                         -Wno-undefined-var-template -Wno-overloaded-virtual -Wno-deprecated-declarations \\\n                         -Wno-delete-non-abstract-non-virtual-dtor -Wno-unused-but-set-variable \\\n                         -Wno-inconsistent-missing-override -Wno-shorten-64-to-32 -Wno-switch -Wno-delete-incomplete \\\n                         -Wno-potentially-evaluated-expression -Wno-deprecated-this-capture -Wno-invalid-offsetof\")\n    \n    set(O2_OBJCXX_FLAGS \"-Wall -Wno-error=format -Wno-error=format-extra-args -Wno-error=conversion \\\n                         -Wno-error=incompatible-pointer-types -Wno-error=sign-conversion -Wno-error=pointer-sign \\\n                         -Wno-error=deprecated -Wno-reorder -Wno-unused-variable -Wno-unused-local-typedef \\\n                         -Wno-undefined-var-template -Wno-overloaded-virtual -Wno-deprecated-declarations \\\n                         -Wno-delete-non-abstract-non-virtual-dtor -Wno-unused-but-set-variable \\\n                         -Wno-inconsistent-missing-override -Wno-shorten-64-to-32 -Wno-switch -Wno-delete-incomplete \\\n                         -Wno-potentially-evaluated-expression -Wno-deprecated-this-capture -Wno-invalid-offsetof\")\n\n    if (EMSCRIPTEN)\n        set(O2_CXX_FLAGS \"${O2_CXX_FLAGS} -Wno-unknown-warning-option -Wno-error=missing-template-arg-list-after-template-kw -Wno-error=deprecated-declarations -Wno-error=unused-command-line-argument\")\n    endif()\n\n    if (ANDROID)\n        set(O2_CXX_FLAGS \"${O2_CXX_FLAGS} -Wno-error=deprecated-declarations -Wno-error=unused-command-line-argument -Wno-unknown-warning-option\")\n    endif()\n\n    set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} ${O2_C_FLAGS}\")\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${O2_CXX_FLAGS}\")\n    set(CMAKE_OBJCXX_FLAGS \"${CMAKE_OBJCXX_FLAGS} ${O2_OBJCXX_FLAGS}\")\n    \n    set(O2_C_FLAGS ${O2_C_FLAGS} PARENT_SCOPE)\n    set(O2_CXX_FLAGS ${O2_CXX_FLAGS} PARENT_SCOPE)\n    set(O2_OBJCXX_FLAGS ${O2_OBJCXX_FLAGS} PARENT_SCOPE)\nendif()\n\n# dependencies\nadd_subdirectory(Framework/3rdPartyLibs)\n\n# code tool (native host-only — skip when cross-compiling to iOS / WebAssembly / Android)\nif(NOT CMAKE_SYSTEM_NAME STREQUAL \"iOS\" AND NOT EMSCRIPTEN AND NOT ANDROID)\n    add_subdirectory(CodeTool)\nendif()\n\n# o2 copy builtin framework assets\nadd_custom_target(o2CopyBuiltinAssets\n                  COMMAND ${CMAKE_COMMAND} -E copy_directory \"${CMAKE_CURRENT_SOURCE_DIR}/Framework/Assets\" \n                                                             \"${CMAKE_CURRENT_SOURCE_DIR}/../BuiltAssets/${O2_PLATFORM}/FrameworkData\"\n                  COMMENT \"Copy o2 builtin assets from ${CMAKE_CURRENT_SOURCE_DIR}/Framework/Assets to ${CMAKE_CURRENT_SOURCE_DIR}/../BuiltAssets/${O2_PLATFORM}/FrameworkData\"\n)\n\n# o2 Framework library\nadd_library(o2Framework STATIC)\n\nset(o2Framework_SOURCES_DIRS \"Framework/Sources/*.h\" \"Framework/Sources/*.cpp\")\nif (APPLE)\n    list(APPEND o2Framework_SOURCES_DIRS \"Framework/Sources/*.mm\" \"Framework/Sources/*.m\")\nendif()\n\nfile(GLOB_RECURSE o2Framework_SOURCES ${o2Framework_SOURCES_DIRS})\n\nsource_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${o2Framework_SOURCES})\n\nset(o2Framework_INCLUDES \n        \"Framework/Sources\"\n        \"Framework/3rdPartyLibs/rapidjson/include\"\n        \"Framework/3rdPartyLibs/FreeType/include\"\n        \"Framework/3rdPartyLibs/jerryscript/jerry-core/include\"\n        \"Framework/3rdPartyLibs/jerryscript\"\n        \"Framework/3rdPartyLibs/boost/stacktrace/include\"\n        \"Framework/3rdPartyLibs/boost/config/include\"\n        \"Framework/3rdPartyLibs/boost/predef/include\"\n        \"Framework/3rdPartyLibs/boost/core/include\"\n        \"Framework/3rdPartyLibs/boost/container_hash/include\"\n        \"Framework/3rdPartyLibs/boost/winapi/include\"\n        \"Framework/\"\n)\n\ntarget_sources(o2Framework PRIVATE ${o2Framework_SOURCES})\ntarget_include_directories(o2Framework PUBLIC ${o2Framework_INCLUDES})\nif(NOT O2_DISABLE_O2FRAMEWORK_PCH)\n    target_precompile_headers(o2Framework PUBLIC \"Framework/Sources/o2/stdafx.h\")\nendif()\ntarget_compile_definitions(o2Framework PUBLIC ${O2_COMPILE_DEFINITIONS})\n\ntarget_link_libraries(o2Framework \n    PUBLIC \n        Box2D \n        FreeType \n        pugixml \n        jerry-core \n        jerry-ext \n        jerry-port-default\n        spine-cpp\n)\n\nif (O2_ENABLE_LINK_LIBPNG)\n    target_link_libraries(o2Framework PUBLIC libpng)\nendif()\n\nif (O2_ENABLE_LINK_ZLIB)\n    target_link_libraries(o2Framework PUBLIC zlib)\nendif()\n\nif (O2_TRACY)\n    list(APPEND o2Framework_INCLUDES \"Framework/3rdPartyLibs/tracy/public\")\n    target_link_libraries(o2Framework PUBLIC Tracy::TracyClient)\nendif()\n\nif (O2_MEMORY_ANALYZE)\n    target_link_libraries(o2Framework PUBLIC boost_stacktrace_basic)\n\n    if(WIN32)\n        target_link_libraries(o2Framework PUBLIC boost_stacktrace_windbg boost_stacktrace_noop)\n    endif()\nendif()\n\nif (EMSCRIPTEN)\n    target_compile_options(o2Framework PUBLIC \"-sUSE_WEBGL2=1\" \"-sMIN_WEBGL_VERSION=2\" \"-sMAX_WEBGL_VERSION=2\" \"-sFULL_ES3=1\")\n    target_link_options(o2Framework PUBLIC \"-sUSE_WEBGL2=1\" \"-sMIN_WEBGL_VERSION=2\" \"-sMAX_WEBGL_VERSION=2\" \"-sFULL_ES3=1\")\nelseif (ANDROID)\n    find_library(ANDROID_EGL_LIB EGL)\n    find_library(ANDROID_GLES2_LIB GLESv2)\n    find_library(ANDROID_LOG_LIB log)\n    find_library(ANDROID_LIB android)\n    target_link_libraries(o2Framework\n            PRIVATE\n                ${ANDROID_EGL_LIB}\n                ${ANDROID_GLES2_LIB}\n                ${ANDROID_LOG_LIB}\n                ${ANDROID_LIB}\n    )\nelseif (UNIX)\n    if (NOT APPLE)\n        find_package(X11 REQUIRED)\n        target_link_libraries(o2Framework PUBLIC ${X11_LIBRARIES})\n    endif()\n\n    if (O2_RENDER_API STREQUAL \"gles2\")\n        list(APPEND CMAKE_MODULE_PATH \"${CMAKE_CURRENT_SOURCE_DIR}\")\n        find_package(OpenGLES2 REQUIRED)\n        target_link_libraries(o2Framework PRIVATE OpenGLES2::OpenGLES2)\n    elseif(NOT APPLE)\n        find_package(OpenGL REQUIRED COMPONENTS GLX)\n        target_link_libraries(o2Framework PUBLIC OpenGL::GL OpenGL::GLX)\n    elseif(CMAKE_SYSTEM_NAME STREQUAL \"iOS\")\n        find_library(METAL Metal)\n        find_library(METALKIT MetalKit)\n        find_library(FOUNDATION Foundation)\n        find_library(OBJC objc)\n        find_library(UIKIT UIKit)\n\n        target_link_libraries(o2Framework\n                PRIVATE\n                    ${METAL}\n                    ${FOUNDATION}\n                    ${OBJC}\n                    ${METALKIT}\n                    ${UIKIT}\n        )\n\n        set(METAL_SHADERS_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/Framework/Sources/o2/Render/iOS\")\n        add_subdirectory(${METAL_SHADERS_DIR})\n\n        target_include_directories(o2Framework\n                PRIVATE\n                ${METAL_SHADERS_DIR}\n        )\n    else()\n        find_library(CORE_GRAPHICS CoreGraphics)\n        find_library(METAL Metal)\n        find_library(APP_KIT AppKit)\n        find_library(METALKIT MetalKit)\n        find_library(FOUNDATION Foundation)\n        find_library(OBJC objc)\n        find_library(APPLICATION_SERVICES ApplicationServices)\n\n        target_link_libraries(o2Framework\n                PRIVATE\n                    ${CORE_GRAPHICS}\n                    ${METAL}\n                    ${APP_KIT}\n                    ${FOUNDATION}\n                    ${OBJC}\n                    ${METALKIT}\n                    ${APPLICATION_SERVICES}\n        )\n\n        set(METAL_SHADERS_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/Framework/Sources/o2/Render/Mac\")\n        add_subdirectory(${METAL_SHADERS_DIR})\n\n        target_include_directories(o2Framework\n                PRIVATE\n                ${METAL_SHADERS_DIR}\n        )\n    endif()\nendif()\n\nif(WIN32)\n    target_link_libraries(o2Framework PRIVATE Shlwapi.lib)\n    target_link_libraries(o2Framework PRIVATE opengl32.lib)  \nendif()\n\nif (UNIX)\n    target_compile_options(o2Framework PRIVATE -Wno-pedantic)\nelseif(MSVC)\n    target_compile_options(o2Framework PUBLIC ${O2_MSVC_MP_FLAG} \"/Zc:__cplusplus\" \"/bigobj\")\n    target_sources(o2Framework PRIVATE \"Framework/Platforms/Windows/Framework.natvis\")\nendif()\n\n# Codegen (native host-only — skip under iOS / EMSCRIPTEN / Android; assume codegen was run during native build)\nif(NOT CMAKE_SYSTEM_NAME STREQUAL \"iOS\" AND NOT EMSCRIPTEN AND NOT ANDROID)\n    add_custom_target(o2FrameworkCodegen\n                      COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/CodeTool/Bin/o2CodeTool -project o2Framework -sources \"${CMAKE_CURRENT_SOURCE_DIR}/Framework/Sources/o2\"\n                      COMMENT \"Run CodeTool: ${CMAKE_CURRENT_SOURCE_DIR}/CodeTool/Bin/o2CodeTool -project o2Framework -sources \\\"${CMAKE_CURRENT_SOURCE_DIR}/Framework/Sources/o2\\\"\"\n    )\n    add_dependencies(o2FrameworkCodegen o2CodeTool)\nendif()\n\n# dependencies\nadd_dependencies(o2Framework Box2D jerry-core jerry-ext jerry-port-default FreeType)\n\nif (O2_ENABLE_LINK_LIBPNG)\n    add_dependencies(o2Framework libpng)\nendif()\n\nadd_dependencies(o2Framework o2CopyBuiltinAssets)\n\nif(NOT CMAKE_SYSTEM_NAME STREQUAL \"iOS\" AND NOT EMSCRIPTEN AND NOT ANDROID)\n    add_dependencies(o2Framework o2CodeTool)\n    add_dependencies(o2Framework o2FrameworkCodegen)\nendif()\n\n# o2 Editor Library\nif (O2_EDITOR)\n    add_library(o2Editor STATIC)\n\n    set(o2Editor_SOURCES_DIRS \"Editor/Sources/*.cpp\" \"Editor/Sources/*.h\")\n    if (APPLE)\n        list(APPEND o2Editor_SOURCES_DIRS \"Editor/Sources/*.mm\" \"Editor/Sources/*.m\")\n    endif()\n\n    file(GLOB_RECURSE o2Framework_SOURCES ${o2Editor_SOURCES_DIRS})\n\n    source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${o2Framework_SOURCES})\n\n    target_sources(o2Editor PRIVATE ${o2Framework_SOURCES})\n    target_include_directories(o2Editor \n        PUBLIC \n            \"Editor/Sources\"\n            ${o2Framework_INCLUDES}\n    )\n\n    target_precompile_headers(o2Editor PRIVATE \"Editor/Sources/o2Editor/stdafx.h\")\n    target_compile_definitions(o2Editor PUBLIC ${O2_COMPILE_DEFINITIONS})\n    target_link_libraries(o2Editor PUBLIC o2Framework)\n\n    if(MSVC)\n        target_compile_options(o2Editor PRIVATE ${O2_MSVC_MP_FLAG} \"/Zc:__cplusplus\" \"/bigobj\")\n    endif()\n\n    # Codegen\n    add_custom_target(o2EditorCodegen\n                      COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/CodeTool/Bin/o2CodeTool -project o2Editor -sources \"${CMAKE_CURRENT_SOURCE_DIR}/Editor/Sources/o2Editor\" -parent_projects \"${CMAKE_CURRENT_SOURCE_DIR}/Framework/Sources/o2/CodeToolCache.xml\"\n                      COMMENT \"Run CodeTool: ${CMAKE_CURRENT_SOURCE_DIR}/CodeTool/Bin/o2CodeTool -project o2Editor -sources \\\"${CMAKE_CURRENT_SOURCE_DIR}/Editor/Sources/o2Editor\\\" -parent_projects \\\"${CMAKE_CURRENT_SOURCE_DIR}/Framework/Sources/o2/CodeToolCache.xml\\\"\"\n    )\n    add_dependencies(o2EditorCodegen o2CodeTool o2FrameworkCodegen)\n\n    add_dependencies(o2Editor o2Framework)\n    add_dependencies(o2Editor o2EditorCodegen)\n    set_target_properties(o2Editor PROPERTIES FOLDER o2)\n    set_target_properties(o2EditorCodegen PROPERTIES FOLDER o2/Codegen)\nendif()\n\n# assets build tool (native host-only — skip when cross-compiling to WebAssembly / Android)\nif(NOT EMSCRIPTEN AND NOT ANDROID)\n    add_subdirectory(AssetsBuildTool)\nendif()\n\n# tests\nif(O2_TESTS)\n    add_subdirectory(Tests)\nendif()\n\n# group in IDE\nset_target_properties(o2Framework PROPERTIES FOLDER o2)\nif(NOT CMAKE_SYSTEM_NAME STREQUAL \"iOS\" AND NOT EMSCRIPTEN AND NOT ANDROID)\n    set_target_properties(o2AssetsBuilder PROPERTIES FOLDER o2)\n    set_target_properties(o2CopyBuiltinAssets PROPERTIES FOLDER o2)\n    set_target_properties(o2FrameworkCodegen PROPERTIES FOLDER o2/Codegen)\n    set_target_properties(o2CodeTool PROPERTIES FOLDER o2/Codegen)\nendif()\n\n"
  },
  {
    "path": "CodeTool/CMakeLists.txt",
    "content": "file(GLOB_RECURSE o2CodeTool_SOURCES \"Src/*.cpp\" \"Src/*.h\")\nsource_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${o2CodeTool_SOURCES})\n\nadd_executable(o2CodeTool ${o2CodeTool_SOURCES} ${o2CodeTool_SOURCES})\n\nif(MSVC)\n    target_compile_options(o2CodeTool PUBLIC ${O2_MSVC_MP_FLAG} \"/Zc:__cplusplus\")\nelseif (UNIX)\n    target_compile_options(o2CodeTool PUBLIC ${DEMO_WARNING_OPTION} -Wno-pedantic)\nendif()\n\nset(O2CODE_TOOL_BIN_OUTPUTDIR \"${CMAKE_CURRENT_SOURCE_DIR}/Bin\")\n\nset_target_properties(o2CodeTool PROPERTIES \n    RUNTIME_OUTPUT_DIRECTORY ${O2CODE_TOOL_BIN_OUTPUTDIR}\n    RUNTIME_OUTPUT_DIRECTORY_DEBUG ${O2CODE_TOOL_BIN_OUTPUTDIR}\n    RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${O2CODE_TOOL_BIN_OUTPUTDIR}\n    RUNTIME_OUTPUT_DIRECTORY_RELEASE ${O2CODE_TOOL_BIN_OUTPUTDIR}\n    RUNTIME_OUTPUT_DIRECTORY_RELEASEWITHDEBUGINFO ${O2CODE_TOOL_BIN_OUTPUTDIR}\n)       \n\nif(MSVC)\n  set_property(TARGET o2CodeTool PROPERTY VS_DEBUGGER_WORKING_DIRECTORY \"$<TARGET_FILE_DIR:o2CodeTool>\")\nendif()"
  },
  {
    "path": "CodeTool/Src/CodeTool.cpp",
    "content": "#include \"CodeToolApp.h\"\n\n\nint main(int nargs, char** agrs)\n{\n\n    CodeToolApplication app;\n    app.SetArguments(agrs, nargs);\n    app.Process();\n\n    return 0;\n}\n\n"
  },
  {
    "path": "CodeTool/Src/CodeToolApp.cpp",
    "content": "#include \"CodeToolApp.h\"\n\n#include <algorithm>\n#include <fstream>\n#include <functional> \n#include <iostream>\n#include <filesystem>\n#include <cstdarg>\n#include <cstring>\n\n#undef GetClassName\n\nTimer::Timer()\n{\n    Reset();\n}\n\nvoid Timer::Reset()\n{\n    mLastElapsedTime = std::chrono::steady_clock::now();\n}\n\nfloat Timer::GetTime() //TODO maybe unused\n{\n    using float_sec = std::chrono::duration<float, std::chrono::seconds::period>;\n    mLastElapsedTime = std::chrono::steady_clock::now();\n    auto res = std::chrono::time_point_cast<float_sec>(mLastElapsedTime);\n    return res.time_since_epoch().count();\n}\n\nfloat Timer::GetDeltaTime()\n{\n    auto curTime = std::chrono::steady_clock::now();\n    std::chrono::duration<float> res = curTime - mLastElapsedTime;\n    mLastElapsedTime = curTime;\n    return res.count();\n}\n\nCodeToolApplication::CodeToolApplication()\n{}\n\nCodeToolApplication::~CodeToolApplication()\n{}\n\nvoid CodeToolApplication::SetArguments(char** args, int nargs)\n{\n    auto argsMap = ParseArguments(args, nargs);\n\n    mProjectName = argsMap[\"project\"];\n    mSourcesPath = argsMap[\"sources\"];\n    mMSVCProjectPath = argsMap[\"msvs_project\"];\n    mXCodeProjectPath = argsMap[\"xcode_project\"];\n    mNeedReset = argsMap.find(\"reset\") != argsMap.end() || argsMap.find(\"r\") != argsMap.end() || true;\n    mVerbose = argsMap.find(\"verbose\") != argsMap.end() || argsMap.find(\"v\") != argsMap.end();\n\n    mCache.parentProjects = Split(argsMap[\"parent_projects\"], ' ');\n}\n\nvoid CodeToolApplication::Process()\n{\n    Timer t;\n\n    LoadCache();\n    UpdateCodeReflection();\n    UpdateRegistratorsSource();\n    SaveCache();\n\n    UpdateProjectFilesFilter();\n\n    Log(\"Code reflection generated for %.3f seconds\", t.GetDeltaTime());\n}\n\nbool CodeToolApplication::mVerbose = true;\n\nvoid CodeToolApplication::Log(const char* format, ...)\n{\n    va_list vlist;\n    va_start(vlist, format);\n\n    vprintf(format, vlist);\n\n    va_end(vlist);\n}\n\nvoid CodeToolApplication::VerboseLog(const char* format, ...)\n{\n    if (!mVerbose)\n        return;\n\n    va_list vlist;\n    va_start(vlist, format);\n\n    vprintf(format, vlist);\n\n    va_end(vlist);\n}\n\nmap<string, TimeStamp> CodeToolApplication::GetFolderFiles(const string& path)\n{\n    map<string, TimeStamp> res;\n\n    for (const auto& entry : filesystem::directory_iterator(path))\n    {\n        if (entry.is_directory())\n        {\n            auto subFolderFiles = GetFolderFiles(entry.path().string());\n            for (const auto& x : subFolderFiles)\n            {\n                res[x.first] = x.second;\n            }\n        }\n        else\n        {\n            const string filePath = entry.path().string();\n            res[filePath] = GetFileEditedDate(filePath);\n        }\n    }\n\n    return res;\n}\n\ntime_t last_write_time_to_time_t(filesystem::file_time_type const& tp)\n{\n    auto sctp = chrono::time_point_cast<chrono::system_clock::duration>(tp - filesystem::file_time_type::clock::now()\n                                                                        + chrono::system_clock::now());\n    return chrono::system_clock::to_time_t(sctp);\n}\n\nTimeStamp CodeToolApplication::GetFileEditedDate(const string& path)\n{\n    const filesystem::directory_entry file{ path };\n\n    if (!file.exists())\n    {\n        return TimeStamp();\n    }\n\n    auto const& lwTime = file.last_write_time();\n    time_t cftime = last_write_time_to_time_t(lwTime);\n    auto const& stLocal = std::localtime(&cftime);\n    if (!stLocal)\n    {\n        return TimeStamp();\n    }\n\n    TimeStamp res(stLocal->tm_sec, stLocal->tm_min, stLocal->tm_hour, stLocal->tm_mday, stLocal->tm_mon, stLocal->tm_year);\n\n    return res;\n}\n\nmap<string, string> CodeToolApplication::ParseArguments(char** args, int nargs)\n{\n    map<string, string> res;\n    string lastArgName = \"unnamed\";\n    for (int i = 0; i < nargs; i++)\n    {\n        if (args[i][0] == '-')\n        {\n            lastArgName = args[i] + 1;\n            res[lastArgName] = \"\";\n        }\n        else\n        {\n            if (res[lastArgName].empty())\n                res[lastArgName] = args[i];\n            else\n                res[lastArgName] += string(\" \") + args[i];\n        }\n    }\n\n    return res;\n}\n\nvoid CodeToolApplication::WriteFile(const string& path, const string& data) const\n{\n    ofstream fout;\n    fout.open(path.c_str());\n    if (!fout.is_open())\n        return;\n\n    fout.write(data.c_str(), data.length());\n\n    fout.close();\n}\n\nstring CodeToolApplication::ReadFile(const string& path) const\n{\n    ifstream fin;\n    fin.open(path.c_str());\n    if (!fin.is_open())\n        return string();\n\n    string res = string((istreambuf_iterator<char>(fin)), istreambuf_iterator<char>());\n\n    fin.close();\n\n    return res;\n}\n\nbool CodeToolApplication::IsFileExist(const string& path) const\n{\n    filesystem::directory_entry entry{ path };\n    if (entry.is_directory()) {\n        return false;\n    }\n\n    return entry.exists();\n}\n\nstring CodeToolApplication::GetPathWithoutDirectories(const string& path)\n{\n    filesystem::path p{ path };\n    return p.filename().string();\n}\n\nstring CodeToolApplication::GetParentPath(const string& path)\n{\n    filesystem::path p{ path };\n    return p.parent_path().string();\n}\n\nstring CodeToolApplication::GetRelativePath(const string& from, const string& to)\n{\n    return filesystem::relative(to, from).string();\n}\n\nvoid CodeToolApplication::LoadCache()\n{\n    if (mNeedReset)\n    {\n        for (auto& file : mCache.parentProjects)\n            mCache.Load(file, false);\n\n        return;\n    }\n\n    mCache.Load(mSourcesPath + \"/\" + mCachePath);\n}\n\nvoid CodeToolApplication::SaveCache()\n{\n    mCache.Save(mSourcesPath + \"/\" + mCachePath);\n}\n\n\nvoid CodeToolApplication::UpdateProjectFilesFilter()\n{\n    if (mMSVCProjectPath.empty())\n        return;\n\n    pugi::xml_document doc;\n    doc.load_file((mMSVCProjectPath + \".filters\").c_str());\n\n    pugi::xml_node projectNode = doc.child(\"Project\");\n    if (!projectNode)\n        return;\n\n    string MSVCProjectDir = GetParentPath(mMSVCProjectPath);\n\n    vector<string> filters;\n    vector<string> files;\n    for (auto file : mSourceFiles)\n    {\n        string filePath = file.first;\n\n        if (!EndsWith(filePath, \".h\") && !EndsWith(filePath, \".cpp\"))\n            continue;\n\n        for (int i = 0; i < filePath.length(); i++)\n        {\n            if (filePath[i] == '/')\n                filePath[i] = '\\\\';\n        }\n\n        string dir = GetRelativePath(MSVCProjectDir, GetParentPath(filePath));\n\n        while (!dir.empty() && dir[0] == '.')\n        {\n            auto slashPos = std::min(dir.find('/'), dir.find('\\\\'));\n            if (slashPos != string::npos)\n                dir.erase(0, slashPos + 1);\n            else\n                break;\n        }\n\n        if (dir.find(\"OSX\") != string::npos)\n            continue;\n\n        if (dir.find(\"Android\") != string::npos)\n            continue;\n\n        while (!dir.empty() && find(filters.begin(), filters.end(), dir) == filters.end())\n        {\n            filters.push_back(dir);\n            dir = GetParentPath(dir);\n        }\n\n        string relativePath = GetRelativePath(MSVCProjectDir, filePath);\n\n        if (relativePath.length() > 1 && relativePath[0] == '.' && relativePath[1] == '\\\\')\n            relativePath.erase(0, 2);\n\n        files.push_back(relativePath);\n    }\n\n    vector<pugi::xml_node> oldFiltersNodes, ignoringGroups;\n    vector<string> oldFilters, oldFiles, newFilters, newFiles;\n\n    bool projectStructureChanged = false;\n    for (auto groupNode : projectNode)\n    {\n        for (auto itemNode : groupNode)\n        {\n            if ((string)\"Filter\" == itemNode.name())\n            {\n                string filter = itemNode.attribute(\"Include\").as_string();\n                if (find(filters.begin(), filters.end(), filter) != filters.end())\n                {\n                    oldFiltersNodes.push_back(itemNode);\n                    oldFilters.push_back(filter);\n                }\n                else\n                {\n                    VerboseLog(\"Project changed: %s - removed filter\\n\", filter.c_str());\n                    projectStructureChanged = true;\n                }\n            }\n            else if ((string)\"ClInclude\" == itemNode.name() || (string)\"ClCompile\" == itemNode.name())\n            {\n                string file = itemNode.attribute(\"Include\").as_string();\n                if (find(files.begin(), files.end(), file) != files.end())\n                    oldFiles.push_back(file);\n                else\n                {\n                    VerboseLog(\"Project changed: %s - removed file\\n\", file.c_str());\n                    projectStructureChanged = true;\n                }\n            }\n            else\n            {\n                ignoringGroups.push_back(groupNode);\n                break;\n            }\n        }\n    }\n\n    for (auto& filter : filters)\n        if (find(oldFilters.begin(), oldFilters.end(), filter) == oldFilters.end())\n            newFilters.push_back(filter);\n\n    for (auto& file : files)\n        if (find(oldFiles.begin(), oldFiles.end(), file) == oldFiles.end())\n            newFiles.push_back(file);\n\n    projectStructureChanged = projectStructureChanged || !newFiles.empty() || !newFilters.empty() || mNeedReset;\n\n    if (!projectStructureChanged)\n    {\n        VerboseLog(\"Project wasn't changed\\n\");\n        return;\n    }\n\n    VerboseLog(\"Project changed. New files:%i, new filters:%i, need reset:%s\\n\", newFiles.size(), newFilters.size(),\n               (mNeedReset ? \"true\" : \"false\"));\n\n    // generate new filters file\n    pugi::xml_document newDoc;\n    pugi::xml_node newProjectNode = newDoc.append_child(\"Project\");\n    newProjectNode.append_attribute(\"ToolsVersion\") = projectNode.attribute(\"ToolsVersion\").as_string();\n    newProjectNode.append_attribute(\"xmlns\") = projectNode.attribute(\"xmlns\").as_string();\n\n    // filters\n    pugi::xml_node filtersNode = newProjectNode.append_child(\"ItemGroup\");\n    for (auto& oldFilterNode : oldFiltersNodes)\n        filtersNode.append_copy(oldFilterNode);\n\n    for (auto& newFilter : newFilters)\n        filtersNode.append_child(\"Filter\").append_attribute(\"Include\") = newFilter.c_str();\n\n    // includes\n    pugi::xml_node headersNode = newProjectNode.append_child(\"ItemGroup\");\n    for (auto& file : files)\n    {\n        if (EndsWith(file, \".h\"))\n        {\n            auto node = headersNode.append_child(\"ClInclude\");\n            node.append_attribute(\"Include\") = file.c_str();\n\n            auto slashPos = file.find('\\\\');\n            if (slashPos != string::npos)\n            {\n                while (file[slashPos + 1] == '.')\n                    slashPos = file.find('\\\\', slashPos + 1);\n\n                string filter = GetParentPath(file.substr(slashPos + 1));\n                if (!filter.empty())\n                    node.append_child(\"Filter\").append_child(pugi::node_pcdata).set_value(filter.c_str());\n            }\n        }\n    }\n\n    // sources\n    pugi::xml_node sourcesNode = newProjectNode.append_child(\"ItemGroup\");\n    for (auto& file : files)\n    {\n        if (EndsWith(file, \".cpp\"))\n        {\n            auto node = sourcesNode.append_child(\"ClCompile\");\n            node.append_attribute(\"Include\") = file.c_str();\n\n            auto slashPos = file.find('\\\\');\n            if (slashPos != string::npos)\n            {\n                while (file[slashPos + 1] == '.')\n                    slashPos = file.find('\\\\', slashPos + 1);\n\n                string filter = GetParentPath(file.substr(slashPos + 1));\n                if (!filter.empty())\n                    node.append_child(\"Filter\").append_child(pugi::node_pcdata).set_value(filter.c_str());\n            }\n        }\n    }\n\n    // ignored\n    for (auto& x : ignoringGroups)\n        newProjectNode.append_copy(x);\n\n    newDoc.save_file((mMSVCProjectPath + \".filters\").c_str());\n\n    //and update project\n    pugi::xml_document projectDoc, newProjectDoc;\n    projectDoc.load_file(mMSVCProjectPath.c_str());\n\n    projectNode = projectDoc.child(\"Project\");\n    newProjectNode = newProjectDoc.append_child(\"Project\");\n    newProjectNode.append_attribute(\"DefaultTargets\") = projectNode.attribute(\"DefaultTargets\").as_string();\n    newProjectNode.append_attribute(\"ToolsVersion\") = projectNode.attribute(\"ToolsVersion\").as_string();\n    newProjectNode.append_attribute(\"xmlns\") = projectNode.attribute(\"xmlns\").as_string();\n\n    for (auto node : projectNode)\n    {\n        if ((string)\"ItemGroup\" != node.name() || node.attribute(\"Label\") || (!node.child(\"ClInclude\") && !node.child(\"ClCompile\")))\n            newProjectNode.append_copy(node);\n    }\n\n    // headers\n    pugi::xml_node newProjectHeadersGroup = newProjectNode.append_child(\"ItemGroup\");\n    for (auto& file : files)\n    {\n        if (EndsWith(file, \".h\"))\n            newProjectHeadersGroup.append_child(\"ClInclude\").append_attribute(\"Include\") = file.c_str();\n    }\n\n    // sources\n    pugi::xml_node newProjectSourcesGroup = newProjectNode.append_child(\"ItemGroup\");\n    for (auto& file : files)\n    {\n        if (EndsWith(file, \".cpp\"))\n        {\n            auto clCompile = newProjectSourcesGroup.append_child(\"ClCompile\");\n            clCompile.append_attribute(\"Include\") = file.c_str();\n\n            if (EndsWith(file, \"stdafx.cpp\"))\n            {\n                auto headerDebug = clCompile.append_child(\"PrecompiledHeader\");\n                headerDebug.append_child(pugi::node_pcdata).set_value(\"Create\");\n\n                auto headerRelease = clCompile.append_child(\"PrecompiledHeader\");\n                headerRelease.append_child(pugi::node_pcdata).set_value(\"Create\");\n            }\n        }\n    }\n\n    newProjectDoc.save_file(mMSVCProjectPath.c_str());\n}\n\nvoid CodeToolApplication::UpdateCodeReflection()\n{\n    mParser = new CppSyntaxParser();\n\n    // get all files in sources path\n    mSourceFiles = GetFolderFiles(mSourcesPath);\n\n    // parse all headers\n    for (auto fileInfo : mSourceFiles)\n    {\n        if (!EndsWith(fileInfo.first, \".h\"))\n            continue;\n\n        ParseSource(fileInfo.first, fileInfo.second);\n    }\n\n    // remove old sources from cache\n    for (auto parseFileInfo = mCache.originalFiles.begin(); parseFileInfo != mCache.originalFiles.end();)\n    {\n        auto fnd = find_if(mSourceFiles.begin(), mSourceFiles.end(), [&](auto x) { return x.first == (*parseFileInfo)->GetPath(); });\n        if (fnd == mSourceFiles.end())\n        {\n            delete* parseFileInfo;\n            parseFileInfo = mCache.originalFiles.erase(parseFileInfo);\n            mCache.files.erase(find(mCache.files.begin(), mCache.files.end(), *parseFileInfo));\n        }\n        else ++parseFileInfo;\n    }\n\n    mCache.UpdateGlobalNamespace();\n\n    // update reflection\n    for (auto file : mParsedFiles)\n        UpdateSourceReflection(file);\n\n    // collect enum registrator ids from all .cpp files, including hand-written\n    // ENUM_META in @CODETOOLIGNORE sources that don't pass through the metas pipeline\n    CollectEnumRegistrators();\n\n    // collect template-class registrator ids from orphan .cpp files (no DECLARE_CLASS\n    // in the same TU to anchor it against linker pruning)\n    CollectTemplateClassManualRegistrators();\n\n    delete mParser;\n}\n\nvoid CodeToolApplication::CollectEnumRegistrators()\n{\n    mEnumRegistratorsList.clear();\n\n    for (auto& fileInfo : mSourceFiles)\n    {\n        const string& path = fileInfo.first;\n        if (!EndsWith(path, \".cpp\"))\n            continue;\n\n        string data = ReadFile(path);\n\n        size_t pos = 0;\n        while ((pos = data.find(\"ENUM_META(\", pos)) != string::npos)\n        {\n            size_t start = pos + strlen(\"ENUM_META(\");\n            size_t end = data.find(')', start);\n            if (end == string::npos)\n                break;\n\n            string args = data.substr(start, end - start);\n            size_t comma = args.find(',');\n            if (comma == string::npos)\n            {\n                pos = end + 1;\n                continue;\n            }\n\n            string id = args.substr(comma + 1);\n            // trim whitespace\n            size_t first = id.find_first_not_of(\" \\t\\n\\r\");\n            size_t last = id.find_last_not_of(\" \\t\\n\\r\");\n            if (first == string::npos)\n            {\n                pos = end + 1;\n                continue;\n            }\n            id = id.substr(first, last - first + 1);\n\n            if (find(mEnumRegistratorsList.begin(), mEnumRegistratorsList.end(), id) == mEnumRegistratorsList.end())\n                mEnumRegistratorsList.push_back(id);\n\n            pos = end + 1;\n        }\n    }\n}\n\nvoid CodeToolApplication::CollectTemplateClassManualRegistrators()\n{\n    mTemplateClassManualRegistratorsList.clear();\n\n    const string needle = \"DECLARE_TEMPLATE_CLASS_MANUAL_ID(\";\n\n    for (auto& fileInfo : mSourceFiles)\n    {\n        const string& path = fileInfo.first;\n        if (!EndsWith(path, \".cpp\"))\n            continue;\n\n        string data = ReadFile(path);\n\n        size_t pos = 0;\n        while ((pos = data.find(needle, pos)) != string::npos)\n        {\n            size_t start = pos + needle.length();\n\n            // scan forward tracking template-angle nesting to find the top-level comma\n            int angle = 0;\n            size_t commaPos = string::npos;\n            size_t endPos = string::npos;\n            for (size_t i = start; i < data.size(); ++i)\n            {\n                char c = data[i];\n                if (c == '<') ++angle;\n                else if (c == '>') --angle;\n                else if (c == ',' && angle == 0)\n                {\n                    commaPos = i;\n                }\n                else if (c == ')' && angle == 0)\n                {\n                    endPos = i;\n                    break;\n                }\n            }\n\n            if (commaPos == string::npos || endPos == string::npos)\n                break;\n\n            string id = data.substr(commaPos + 1, endPos - commaPos - 1);\n            size_t first = id.find_first_not_of(\" \\t\\n\\r\");\n            size_t last = id.find_last_not_of(\" \\t\\n\\r\");\n            if (first == string::npos)\n            {\n                pos = endPos + 1;\n                continue;\n            }\n            id = id.substr(first, last - first + 1);\n\n            if (find(mTemplateClassManualRegistratorsList.begin(), mTemplateClassManualRegistratorsList.end(), id) == mTemplateClassManualRegistratorsList.end())\n                mTemplateClassManualRegistratorsList.push_back(id);\n\n            pos = endPos + 1;\n        }\n    }\n}\n\nvoid CodeToolApplication::UpdateRegistratorsSource()\n{\n    string registratorSourceFileName = mProjectName + \".cpp\";\n    string registratorSourcePath = mSourcesPath + \"/\" + registratorSourceFileName;\n\n    string fileData;\n\n    for (auto& regi : mEnumRegistratorsList)\n        fileData += \"extern void __RegisterEnum__\" + regi + \"();\\n\";\n\n    for (auto& regi : mTemplateClassManualRegistratorsList)\n        fileData += \"extern void __RegisterTemplateClass__\" + regi + \"();\\n\";\n\n    for (auto& regi : mRegistatorsList)\n        fileData += \"extern void __RegisterClass__\" + regi + \"();\\n\";\n\n    fileData += \"\\n\\n\";\n\n    fileData += \"extern void InitializeTypes\" + mProjectName + \"()\\n{\\n\";\n\n    for (auto& regi : mEnumRegistratorsList)\n        fileData += \"    __RegisterEnum__\" + regi + \"();\\n\";\n\n    for (auto& regi : mTemplateClassManualRegistratorsList)\n        fileData += \"    __RegisterTemplateClass__\" + regi + \"();\\n\";\n\n    for (auto& regi : mRegistatorsList)\n        fileData += \"    __RegisterClass__\" + regi + \"();\\n\";\n\n    fileData += \"}\";\n\n    string oldFileData = ReadFile(registratorSourcePath);\n\n    if (oldFileData != fileData)\n        WriteFile(registratorSourcePath, fileData);\n}\n\nvoid CodeToolApplication::ParseSource(const string& path, const TimeStamp& editDate)\n{\n    // check edit date\n    for (auto cacheFile : mCache.originalFiles)\n    {\n        if (path == cacheFile->GetPath())\n        {\n            if (editDate == cacheFile->GetLastEditedDate())\n                return;\n\n            delete cacheFile;\n            mCache.originalFiles.erase(find(mCache.originalFiles.begin(), mCache.originalFiles.end(), cacheFile));\n            mCache.files.erase(find(mCache.files.begin(), mCache.files.end(), cacheFile));\n\n            break;\n        }\n    }\n\n    // parse source\n    SyntaxFile* syntaxFile = new SyntaxFile();\n    mParser->ParseFile(*syntaxFile, path, editDate);\n    mParsedFiles.push_back(syntaxFile);\n\n    mCache.originalFiles.push_back(syntaxFile);\n    mCache.files.push_back(syntaxFile);\n\n    VerboseLog(\"Parsed %s\\n\", path.c_str());\n}\n\nvoid CodeToolApplication::UpdateSourceReflection(SyntaxFile* file)\n{\n    string cppSource, cppSourceInitial;\n    bool cppLoaded = false;\n\n    string hSource = file->GetData();\n\n    if (hSource.find(\"@CODETOOLIGNORE\") != string::npos)\n        return;\n\n    bool hasHeaderMeta = false;\n    bool hasSourceMeta = false;\n\n    RemoveMetas(hSource, \"META_TEMPLATES(\", \"END_META;\");\n    RemoveMetas(hSource, \"CLASS_BASES_META(\", \"END_META;\");\n    RemoveMetas(hSource, \"CLASS_FIELDS_META(\", \"END_META;\");\n    RemoveMetas(hSource, \"CLASS_METHODS_META(\", \"END_META;\");\n    RemoveMetas(hSource, \"DECLARE_CLASS(\", \");\", false);\n    RemoveMetas(hSource, \"PRE_ENUM_META(\", \");\", false);\n    RemoveMetas(hSource, \"// --- META ---\", \"// --- END META ---\");\n\n    string cppSourcePath = file->GetPath().substr(0, file->GetPath().rfind('.')) + \".cpp\";\n\n    SyntaxClass* baseObjectClass = (SyntaxClass*)(mCache.FindSection(\"o2::IObject\"));\n\n    auto checkCppLoad = [&]()\n    {\n        if (!cppLoaded)\n        {\n            if (IsFileExist(cppSourcePath))\n            {\n                cppSource = ReadFile(cppSourcePath);\n                cppSourceInitial = cppSource;\n                RemoveMetas(cppSource, \"ENUM_META(\", \"END_ENUM_META;\");\n                RemoveMetas(cppSource, \"ENUM_META_(\", \"END_ENUM_META;\");\n                RemoveMetas(cppSource, \"CLASS_META(\", \"END_META;\");\n                RemoveMetas(cppSource, \"CLASS_TEMPLATE_META(\", \"END_META;\");\n                RemoveMetas(cppSource, \"CLASS_BASES_META(\", \"END_META;\");\n                RemoveMetas(cppSource, \"CLASS_FIELDS_META(\", \"END_META;\");\n                RemoveMetas(cppSource, \"CLASS_METHODS_META(\", \"END_META;\");\n                RemoveMetas(cppSource, \"DECLARE_CLASS(\", \");\", false);\n                RemoveMetas(cppSource, \"PRE_ENUM_META(\", \");\", false);\n                RemoveMetas(cppSource, \"// --- META ---\", \"// --- END META ---\");\n            }\n            else cppSource = \"#include \\\"\" + GetPathWithoutDirectories(file->GetPath()) + \"\\\"\\n\\n\";\n\n            cppLoaded = true;\n        }\n    };\n\n    // Enums\n    SyntaxEnumsVec allEnums = file->GetGlobalNamespace()->GetAllEnums();\n    SyntaxEnumsVec metaEnums;\n\n    for (auto enm : allEnums)\n    {\n        auto owner = enm->GetOwnerSyntaxSection();\n        if (owner && owner->IsClass() && ((SyntaxClass*)owner)->IsTemplate())\n            continue;\n\n        // Skip non-public enums inside classes (they can't be accessed from outside)\n        if (owner && owner->IsClass() && enm->GetClassSection() != SyntaxProtectionSection::Public)\n            continue;\n\n        metaEnums.push_back(enm);\n    }\n\n    if (!metaEnums.empty())\n        checkCppLoad();\n\n    for (auto enm : metaEnums)\n    {\n        AddBeginMeta(hasSourceMeta, cppSource);\n        cppSource += GetEnumMeta(enm);\n\n        AddBeginMeta(hasHeaderMeta, hSource);\n        hSource += GetEnumPreMeta(enm);\n\n        VerboseLog(\"Generated meta for enum:%s\\n\", enm->GetFullName().c_str());\n    }\n\n    // Classes\n    auto classes = file->GetGlobalNamespace()->GetAllClasses();\n\n    for (auto cls : classes)\n    {\n        bool hasIObject = std::find_if(cls->GetFunctions().begin(), cls->GetFunctions().end(),\n                                       [](SyntaxFunction* x) { return x->GetName() == \"IOBJECT\" || x->GetName() == \"SERIALIZABLE\" || x->GetName() == \"ASSET_TYPE\"; }) != cls->GetFunctions().end();\n\n        if ((!mCache.IsClassBasedOn(cls, baseObjectClass) && !cls->IsMetaClass()) || !hasIObject || cls == baseObjectClass)\n            continue;\n\n        if (!cls->IsTemplate())\n        {\n            checkCppLoad();\n\n            AddBeginMeta(hasSourceMeta, cppSource);\n            cppSource += GetClassDeclaration(cls);\n        }\n\n        AddBeginMeta(hasHeaderMeta, hSource);\n        hSource += GetClassMeta(cls);\n\n        VerboseLog(\"Generated meta for class:%s\\n\", cls->GetFullName().c_str());\n    }\n\n    AddEndMeta(hasSourceMeta, cppSource);\n    AddEndMeta(hasHeaderMeta, hSource);\n\n    // Write\n    if (cppLoaded && cppSource != cppSourceInitial)\n        WriteFile(cppSourcePath, cppSource);\n\n    if (hSource != file->GetData())\n    {\n        WriteFile(file->GetPath(), hSource);\n        file->mLastEditedDate = GetFileEditedDate(file->GetPath());\n    }\n\n    VerboseLog(\"Reflection generated for %s\\n\", file->GetPath().c_str());\n}\n\nvoid CodeToolApplication::AddBeginMeta(bool& hasMeta, string& res)\n{\n    if (!hasMeta)\n        res += \"// --- META ---\\n\";\n\n    hasMeta = true;\n}\n\nvoid CodeToolApplication::AddEndMeta(bool hasMeta, string& res)\n{\n    if (hasMeta)\n        res += \"// --- END META ---\\n\";\n}\n\nstring CodeToolApplication::GetClassDeclaration(SyntaxClass* cls)\n{\n    string res = \"\\n\";\n\n    string nspace;\n    int nspaceDelimer = (int)cls->GetFullName().rfind(\"::\");\n    if (nspaceDelimer != cls->GetFullName().npos)\n        nspace = cls->GetFullName().substr(0, nspaceDelimer);\n\n    if (cls->GetDefine())\n        res += \"#if \" + cls->GetDefine()->GetDefinition() + \"\\n\";\n\n    string className = GetClassNormalizedTemplates(cls->GetFullName(), nspace);\n\n    string classRegisterId = className;\n    for (int i = 0; i < classRegisterId.length(); i++)\n    {\n        auto& c = classRegisterId[i];\n        if (c == '<' || c == '>' || c == ':')\n            c = '_';\n    }\n\n    mRegistatorsList.push_back(classRegisterId);\n\n    res += \"DECLARE_CLASS(\" + className + \", \" + classRegisterId + \");\\n\";\n\n    if (cls->GetDefine())\n        res += \"#endif\\n\";\n\n    return res;\n}\n\nstring CodeToolApplication::GetClassMeta(SyntaxClass* cls)\n{\n    string res = \"\\n\";\n    res.reserve(cls->GetData().length() * 2);\n\n    string nspace;\n    int nspaceDelimer = (int)cls->GetFullName().rfind(\"::\");\n    if (nspaceDelimer != cls->GetFullName().npos)\n        nspace = cls->GetFullName().substr(0, nspaceDelimer);\n\n    string classDef;\n    string templates;\n\n    if (!cls->IsTemplate())\n        classDef = GetClassNormalizedTemplates(cls->GetFullName(), nspace);\n    else\n        AggregateTemplates(cls, templates, classDef);\n\n    // defines\n    if (cls->GetDefine())\n        res += \"#if \" + cls->GetDefine()->GetDefinition() + \"\\n\";\n\n    // base classes\n    res += templates;\n    res += \"CLASS_BASES_META(\" + classDef + \")\\n{\\n\";\n\n    int typedefs = 0;\n    for (auto x : cls->GetBaseClasses())\n    {\n        auto classInfo = mCache.FindSection(x.GetClassName(), nspace, false);\n        auto className = classInfo ? classInfo->GetFullName() : x.GetClassName();\n        if (className.find(',') != string::npos)\n        {\n            typedefs++;\n            auto newClassName = string(\"_tmp\") + to_string(typedefs);\n            res += string(\"    typedef \") + className + ' ' + newClassName + \";\\n\";\n            className = newClassName;\n        }\n\n        res += string(\"    BASE_CLASS(\") + className + +\");\\n\";\n    }\n    res += \"}\\nEND_META;\\n\";\n\n    // fields\n    res += templates;\n    res += \"CLASS_FIELDS_META(\" + classDef + \")\\n{\\n\";\n\n    SyntaxDefineIf* currentIf = nullptr;\n\n    for (auto variable : cls->GetVariables())\n    {\n        if (variable->IsStatic() || variable->GetName().empty())\n            continue;\n\n        // try search comment\n        SyntaxComment* synComment = cls->FindCommentNearLine(variable->GetLine());\n\n        if (synComment) {\n            string ignore{ \"@IGNORE\" };\n            auto fnd = synComment->GetData().find(ignore);\n            if (fnd != string::npos)\n            {\n                auto nextSymbol = synComment->GetData()[fnd + ignore.size()];\n                if (nextSymbol == ' ' || nextSymbol == '\\t' || nextSymbol == '\\n' || nextSymbol == '\\0')\n                    continue;\n            }\n        }\n\n        CheckIfDefines(variable, currentIf, res);\n\n        res += \"    FIELD()\";\n\n        if (variable->GetClassSection() == SyntaxProtectionSection::Public)\n            res += \".PUBLIC()\";\n        else if (variable->GetClassSection() == SyntaxProtectionSection::Private)\n            res += \".PRIVATE()\";\n        else if (variable->GetClassSection() == SyntaxProtectionSection::Protected)\n            res += \".PROTECTED()\";\n\n        res += GetAttributes(cls, variable->GetLine(), synComment);\n\n        if (!variable->GetDefaultValue().empty() && variable->GetDefaultValue().find(\"this\") == string::npos)\n            res += \".DEFAULT_VALUE(\" + variable->GetDefaultValue() + \")\";\n\n        res += \".NAME(\" + variable->GetName() + \");\\n\";\n\n    }\n\n    CompleteIfDefines(currentIf, res);\n    res += \"}\\nEND_META;\\n\";\n\n    // functions\n    res += templates;\n    res += \"CLASS_METHODS_META(\" + classDef + \")\\n{\\n\";\n\n    int supportingTypedefsPos = (int)res.length();\n    vector<string> supportingTypedefs;\n\n    bool firstFunction = true;\n    for (auto function : cls->GetFunctions())\n    {\n        if (!IsFunctionReflectable(function, cls))\n            continue;\n\n        // try search comment\n        SyntaxComment* synComment = cls->FindCommentNearLine(function->GetLine());\n\n        if (IsIgnoreComment(synComment))\n            continue;\n\n        if (firstFunction)\n        {\n            firstFunction = false;\n            res += \"\\n\";\n        }\n\n        CheckIfDefines(function, currentIf, res);\n\n        res += \"    FUNCTION()\";\n\n        if (function->GetClassSection() == SyntaxProtectionSection::Public)\n            res += \".PUBLIC()\";\n        else if (function->GetClassSection() == SyntaxProtectionSection::Private)\n            res += \".PRIVATE()\";\n        else if (function->GetClassSection() == SyntaxProtectionSection::Protected)\n            res += \".PROTECTED()\";\n\n        res += GetAttributes(cls, function->GetLine(), synComment);\n\n        bool isConstructor = StartsWith(cls->GetName(), function->GetName());\n\n        if (function->IsStatic())\n            res += \".SIGNATURE_STATIC(\";\n        else if (isConstructor)\n            res += \".CONSTRUCTOR(\";\n        else\n            res += \".SIGNATURE(\";\n\n        if (!isConstructor)\n        {\n            auto returnTypeName = (function->GetReturnType().IsConstant() ? \"const \" : \"\") + function->GetReturnType().GetName();\n\n            if (returnTypeName.find(',') != returnTypeName.npos)\n            {\n                supportingTypedefs.push_back(returnTypeName);\n                returnTypeName = (string)\"_tmp\" + to_string((int)supportingTypedefs.size());\n            }\n\n            res += returnTypeName;\n            res += string(\", \") + function->GetName();\n        }\n\n        bool first = isConstructor;\n        for (auto param : function->GetParameters())\n        {\n            string parameterName = (param->GetVariableType().IsConstant() ? \"const \" : \"\") + param->GetVariableType().GetName();\n\n            if (parameterName.find(',') != parameterName.npos)\n            {\n                supportingTypedefs.push_back(parameterName);\n                parameterName = string(\"_tmp\") + to_string((int)supportingTypedefs.size());\n            }\n\n            if (!first)\n                res += string(\", \");\n            else\n                first = false;\n\n            res += parameterName;\n        }\n\n        res += \");\\n\";\n    }\n\n    CompleteIfDefines(currentIf, res);\n\n    // supporting typedefs\n    if (!supportingTypedefs.empty())\n    {\n        string supportingTypedefsStr = \"\\n\";\n        for (int i = 0; i < supportingTypedefs.size(); i++)\n            supportingTypedefsStr += (string)\"    typedef \" + supportingTypedefs[i] + \" _tmp\" + to_string(i + 1) + \";\\n\";\n\n        res.insert(supportingTypedefsPos, supportingTypedefsStr);\n    }\n\n    res += \"}\\nEND_META;\\n\";\n\n    if (cls->GetDefine())\n        res += \"#endif\\n\";\n\n    return res;\n}\n\nbool CodeToolApplication::IsIgnoreComment(SyntaxComment* synComment)\n{\n    if (synComment) {\n        auto fnd = synComment->GetData().find(\"@IGNORE\");\n        if (fnd != string::npos)\n        {\n            auto nextSymbol = synComment->GetData()[fnd + strlen(\"@IGNORE\")];\n            if (nextSymbol == ' ' || nextSymbol == '\\t' || nextSymbol == '\\n' || nextSymbol == '\\0')\n                return true;\n        }\n    }\n\n    return false;\n}\n\nvoid CodeToolApplication::CheckIfDefines(ISyntaxExpression* item, SyntaxDefineIf*& prevDefine, string& data)\n{\n    if (item->GetDefine() != prevDefine)\n    {\n        if (prevDefine)\n            data += \"#endif\\n\";\n\n        if (item->GetDefine())\n            data += \"#if \" + item->GetDefine()->GetDefinition() + \"\\n\";\n\n        prevDefine = item->GetDefine();\n    }\n}\n\nvoid CodeToolApplication::CompleteIfDefines(SyntaxDefineIf*& prevDefine, string& data)\n{\n    if (prevDefine)\n        data += \"#endif\\n\";\n\n    prevDefine = nullptr;\n}\n\nstring CodeToolApplication::GetAttributes(SyntaxClass* cls, int line, SyntaxComment* synComment)\n{\n    string attributes;\n\n    SyntaxAttributes* synAttributes = nullptr;\n    for (auto attr : cls->GetAttributes())\n    {\n        if (attr->GetLine() == line - 1)\n        {\n            synAttributes = attr;\n            break;\n        }\n    }\n\n    if (synAttributes)\n    {\n        for (auto& attributeEntry : synAttributes->GetAttributesList())\n        {\n            SyntaxClass* attributeClass = dynamic_cast<SyntaxClass*>(mCache.FindSection(attributeEntry, cls));\n            if (attributeClass)\n            {\n                if (!attributeClass->GetAttributeShortDef().empty())\n                    attributes += string(\".\") + attributeClass->GetAttributeShortDef();\n                else\n                    attributes += string(\".ATTRIBUTE(\") + attributeClass->GetFullName() + \")\";\n            }\n            else attributes += string(\".ATTRIBUTE(\") + attributeEntry + \")\";\n        }\n    }\n\n    if (synComment)\n    {\n        for (auto attributeClass : mCache.attributes)\n        {\n            auto fnd = synComment->GetData().find(attributeClass->GetAttributeCommentDef());\n            if (!attributeClass->GetAttributeCommentDef().empty() && fnd != string::npos)\n            {\n                auto nextSymbol = synComment->GetData()[fnd + attributeClass->GetAttributeCommentDef().length()];\n                if ((nextSymbol == ' ' || nextSymbol == '\\t' || nextSymbol == '\\n' || nextSymbol == '\\0' || nextSymbol == '(') && synComment->GetData()[fnd - 1] == '@')\n                {\n                    string parameters = \"()\";\n                    auto parametersBegin = fnd + attributeClass->GetAttributeCommentDef().length();\n                    if (synComment->GetData()[parametersBegin] == '(')\n                    {\n                        auto parametersEnd = synComment->GetData().find(')', parametersBegin) + 1;\n                        parameters = synComment->GetData().substr(parametersBegin, parametersEnd - parametersBegin);\n                    }\n\n                    if (!attributeClass->GetAttributeShortDef().empty())\n                        attributes += string(\".\") + attributeClass->GetAttributeShortDef() + parameters;\n                    else\n                        attributes += string(\".ATTRIBUTE(\") + attributeClass->GetFullName() + parameters + \")\";\n                }\n            }\n        }\n    }\n\n    return attributes;\n}\n\nstring CodeToolApplication::GetEnumMeta(SyntaxEnum* enm)\n{\n    string res;\n    res.reserve(enm->GetEntries().size() * 15);\n\n    string enumFullName = enm->GetFullName();\n\n    string enumRegisterId = enumFullName;\n    for (int i = 0; i < enumRegisterId.length(); i++)\n    {\n        auto& c = enumRegisterId[i];\n        if (c == '<' || c == '>' || c == ':')\n            c = '_';\n    }\n\n    res += \"\\nENUM_META(\" + enumFullName + \", \" + enumRegisterId + \")\\n{\\n\";\n\n    for (auto e : enm->GetEntries())\n    {\n        if (!e.first.empty())  // Skip empty enum entry names\n            res += \"    ENUM_ENTRY(\" + e.first + \");\\n\";\n    }\n\n    res += \"}\\nEND_ENUM_META;\\n\";\n\n    return res;\n}\n\nstring CodeToolApplication::GetEnumPreMeta(SyntaxEnum* enm)\n{\n    string res = \"\\nPRE_ENUM_META(\" + enm->GetFullName() + \");\\n\";\n    return res;\n}\n\nvoid RemoveSubstrs(string& s, string const& p)\n{\n    string::size_type n = p.length();\n    for (string::size_type i = s.find(p); i != string::npos; i = s.find(p))\n        s.erase(i, n);\n}\n\nvoid CodeToolApplication::AggregateTemplates(SyntaxSection* sec, string& templates, string& fullName)\n{\n    if (sec->GetParentSection())\n        AggregateTemplates(sec->GetParentSection(), templates, fullName);\n\n    if (fullName.empty())\n        fullName = sec->GetName();\n    else\n        fullName += \"::\" + sec->GetName();\n\n    if (sec->IsClass())\n    {\n        SyntaxClass* cls = dynamic_cast<SyntaxClass*>(sec);\n        if (!cls->GetTemplateParameters().empty())\n        {\n            templates += \"META_TEMPLATES(\" + cls->GetTemplateParameters() + \")\\n\";\n\n            string classTemplates = cls->GetTemplateParameters();\n            RemoveSubstrs(classTemplates, (std::string)\"typename \");\n\n            fullName += \"<\" + classTemplates + \">\";\n        }\n    }\n}\n\nstring CodeToolApplication::GetClassNormalizedTemplates(const string& name, const string& nspace)\n{\n    string fullName;\n    int nameLenght = (int)name.length();\n    int fnd = 0;\n    int lastFnd = fnd;\n    while (fnd >= 0)\n    {\n        lastFnd = fnd;\n        fnd = (int)name.find('<', fnd);\n\n        if (fnd == name.npos)\n            break;\n\n        int begin = fnd + 1;\n        int braces = 0, trBraces = 0, sqBraces = 0;\n        for (bool stop = false; !stop && fnd < nameLenght; fnd++)\n        {\n            switch (name[fnd])\n            {\n            case '(': braces++; break;\n            case ')': braces--; break;\n            case '[': sqBraces++; break;\n            case ']': sqBraces--; break;\n            case '<': trBraces++; break;\n            case '>':\n            trBraces--;\n            if (trBraces == 0 && braces == 0 && sqBraces == 0)\n            {\n                stop = true;\n                fnd--;\n            }\n            break;\n            }\n        }\n\n        string templateParamsStr = name.substr(begin, fnd - begin);\n        vector<string> templateParams = Split(templateParamsStr, ',');\n\n        fullName += name.substr(lastFnd, begin - lastFnd);\n        bool firstParam = true;\n        for (auto& templateParam : templateParams)\n        {\n            Trim(templateParam);\n            string typename_str{ \"typename \" };\n            if (StartsWith(templateParam, typename_str))\n                templateParam.erase(0, typename_str.size());\n\n            if (!firstParam)\n                fullName += \", \";\n            else\n                firstParam = false;\n\n            auto classInfo = mCache.FindSection(templateParam, nspace);\n            fullName += classInfo ? classInfo->GetFullName() : templateParam;\n        }\n    }\n\n    fullName += name.substr(lastFnd);\n    return fullName;\n}\n\nvoid CodeToolApplication::RemoveMetas(string& data, const char* keyword, const char* endword,\n                                      bool allowMultiline /*= true*/)\n{\n    auto isSkipingChar = [](char x) { return x == '\\n' || x == '\\r' || x == '\\t' || x == '\\0' || x == ' '; };\n\n    auto caret = data.find(keyword);\n    while (caret != string::npos)\n    {\n        auto end = data.find(endword, caret);\n        if (end == string::npos)\n            break;\n\n        while (caret > 0 && isSkipingChar(data[caret - 1]))\n            caret--;\n\n        if (caret > 0 && isSkipingChar(data[caret]))\n            caret--;\n\n        if (!allowMultiline)\n        {\n            string keyword_str{ keyword };\n            auto newLinePos = data.find(\"\\n\", caret + keyword_str.size());\n            if (newLinePos != string::npos && newLinePos < end)\n                return;\n        }\n\n        string endword_str{ endword };\n        data.erase(caret + 1, end + endword_str.size() - caret - 1);\n        caret = data.find(keyword);\n    }\n\n    caret = data.length();\n    while (caret > 0 && isSkipingChar(data[caret - 1]))\n        caret--;\n\n    data.erase(caret);\n    data += '\\n';\n}\n\nbool CodeToolApplication::IsFunctionReflectable(SyntaxFunction* function, SyntaxSection* owner) const\n{\n    static vector<string> ignoringNames = { \"SERIALIZABLE\", \"PROPERTY\", \"GETTER\", \"SETTER\", \"IOBJECT\", \"ASSET_TYPE\",\n        \"ATTRIBUTE_COMMENT_DEFINITION\", \"ATTRIBUTE_SHORT_DEFINITION\", \"BASE_REF_IMPLEMETATION\", \"FRIEND_REF_MAKE\", \"CLONEABLE_REF\", \"REF_COUNTERABLE_IMPL\" };\n\n    return !StartsWith(function->GetName(), string(\"~\") + owner->GetName()) &&\n        function->GetName().find('~') == string::npos &&\n        function->GetName().find(\"operator\") == function->GetName().npos &&\n        !function->IsTemplate() &&\n        find(ignoringNames.begin(), ignoringNames.end(), function->GetName()) == ignoringNames.end();\n}\n\nvoid CodeToolCache::UpdateGlobalNamespace()\n{\n    for (auto file : files)\n    {\n        SyntaxSection* fileGlobalNamespace = file->GetGlobalNamespace();\n\n        globalNamespace.mVariables.insert(globalNamespace.mVariables.end(),\n                                          fileGlobalNamespace->mVariables.begin(),\n                                          fileGlobalNamespace->mVariables.end());\n\n        globalNamespace.mFunctions.insert(globalNamespace.mFunctions.end(),\n                                          fileGlobalNamespace->mFunctions.begin(),\n                                          fileGlobalNamespace->mFunctions.end());\n\n        globalNamespace.mTypedefs.insert(globalNamespace.mTypedefs.end(),\n                                         fileGlobalNamespace->mTypedefs.begin(),\n                                         fileGlobalNamespace->mTypedefs.end());\n\n        globalNamespace.mUsingNamespaces.insert(globalNamespace.mUsingNamespaces.end(),\n                                                fileGlobalNamespace->mUsingNamespaces.begin(),\n                                                fileGlobalNamespace->mUsingNamespaces.end());\n\n        globalNamespace.mEnums.insert(globalNamespace.mEnums.end(),\n                                      fileGlobalNamespace->mEnums.begin(),\n                                      fileGlobalNamespace->mEnums.end());\n\n        for (auto childSection : fileGlobalNamespace->mSections)\n            AppendSection(&globalNamespace, childSection);\n    }\n\n    ResolveDependencies(&globalNamespace);\n    ResolveBaseClassDependencies(&globalNamespace);\n\n    SyntaxClass* attributeClass = dynamic_cast<SyntaxClass*>(FindSection(\"o2::IAttribute\"));\n    SearchAttributes(&globalNamespace, attributeClass);\n}\n\nbool CodeToolCache::IsClassBasedOn(SyntaxClass* _class, SyntaxClass* baseClass)\n{\n    if (!_class || !baseClass)\n        return false;\n\n    if (_class->mSourceClass)\n        _class = _class->mSourceClass;\n\n    if (_class == baseClass)\n        return true;\n\n    for (auto baseClassDef : _class->GetBaseClasses())\n        if (IsClassBasedOn(baseClassDef.GetClass(), baseClass))\n            return true;\n\n    return false;\n}\n\nSyntaxSection* CodeToolCache::FindSection(const string& fullName, bool withTypedefs /*= true*/)\n{\n    return FindSection(fullName, &globalNamespace, withTypedefs);\n}\n\nSyntaxSection* CodeToolCache::FindSection(const string& what, const string& where, bool withTypedefs /*= true*/)\n{\n    return FindSection(what, FindSection(where), withTypedefs);\n}\n\nSyntaxSection* CodeToolCache::FindSection(const string& what, SyntaxSection* where, bool withTypedefs /*= true*/)\n{\n    SyntaxSectionsVec passed;\n    return FindSection(what, where, passed, withTypedefs);\n}\n\nSyntaxSection* CodeToolCache::FindSection(const string& what, SyntaxSection* where, SyntaxSectionsVec& processedSections, bool withTypedefs /*= true*/)\n{\n    if (!where)\n        return nullptr;\n\n    if (find(processedSections.begin(), processedSections.end(), where) != processedSections.end())\n        return nullptr;\n\n    processedSections.push_back(where);\n\n    int braces = 0, trBraces = 0, sqBraces = 0;\n    int delPos = -1;\n\n    int whatLength = (int)what.length();\n    for (int i = 0; i < whatLength - 1; i++)\n    {\n        switch (what[i])\n        {\n        case '(': braces++; break;\n        case ')': braces--; break;\n        case '<': trBraces++; break;\n        case '>': trBraces--; break;\n        case '[': sqBraces++; break;\n        case ']': sqBraces--; break;\n        }\n\n        if (what[i] == ':' && what[i + 1] == ':' && braces == 0 && trBraces == 0 && sqBraces == 0)\n        {\n            delPos = i;\n            break;\n        }\n    }\n\n    string searchName;\n    if (delPos < 0)\n        searchName = what;\n    else\n        searchName = what.substr(0, delPos);\n\n    int templatesPos = (int)searchName.find('<');\n    if (templatesPos != searchName.npos)\n        searchName.erase(templatesPos);\n\n    for (auto child : where->mSections)\n    {\n        if (child->mName != searchName)\n            continue;\n\n        if (delPos < 0)\n        {\n            if (templatesPos >= 0)\n            {\n                SyntaxClass* newSpecializedClass = new SyntaxClass();\n                newSpecializedClass->mName = what;\n                if (child->mParentSection)\n                {\n                    newSpecializedClass->mFullName = child->mParentSection->mFullName + \"::\" + what;\n                    child->mParentSection->mSections.push_back(newSpecializedClass);\n                }\n                else\n                    newSpecializedClass->mFullName = what;\n\n                newSpecializedClass->mParentSection = child->mParentSection;\n                newSpecializedClass->mSourceClass = (SyntaxClass*)child;\n\n                return newSpecializedClass;\n            }\n\n            return child;\n        }\n\n        if (auto res = FindSection(what.substr(delPos + 2), child, processedSections))\n            return res;\n    }\n\n    if (auto res = FindSection(what, where->mParentSection, processedSections))\n        return res;\n\n    if (where->IsClass())\n    {\n        SyntaxClass* whereClass = dynamic_cast<SyntaxClass*>(where);\n        for (auto& baseClass : whereClass->mBaseClasses)\n        {\n            if (baseClass.GetClass())\n            {\n                if (auto res = FindSection(what, baseClass.GetClass(), processedSections))\n                    return res;\n            }\n        }\n    }\n\n    if (withTypedefs)\n    {\n        for (auto tdef : where->mTypedefs)\n        {\n            if (tdef->GetNewDefName() != searchName)\n                continue;\n\n            if (delPos < 0)\n                return tdef->GetWhat();\n\n            if (auto res = FindSection(what.substr(delPos + 2), tdef->GetWhat(), processedSections))\n                return res;\n        }\n\n        for (auto nspace : where->mUsingNamespaces)\n        {\n            if (auto res = FindSection(what, nspace->GetUsingNamespace(), processedSections))\n                return res;\n        }\n    }\n\n    return nullptr;\n}\n\nvoid CodeToolCache::SearchAttributes(SyntaxSection* section, SyntaxClass* attributeClass)\n{\n    for (auto childSection : section->mSections)\n    {\n        if (childSection->IsClass())\n        {\n            SyntaxClass* childClass = dynamic_cast<SyntaxClass*>(childSection);\n            if (IsClassBasedOn(childClass, attributeClass))\n                attributes.push_back(childClass);\n        }\n\n        SearchAttributes(childSection, attributeClass);\n    }\n}\n\nvoid CodeToolCache::Save(const string& file) const\n{\n    pugi::xml_document doc;\n\n    pugi::xml_node filesNode = doc.append_child(\"files\");\n    for (auto file : originalFiles) {\n        auto file_node = filesNode.append_child(\"file\");\n        file->SaveTo(file_node);\n    }\n\n    pugi::xml_node parentProjsNode = doc.append_child(\"parentProjects\");\n    for (auto& proj : parentProjects)\n        parentProjsNode.append_child(\"project\").append_attribute(\"path\") = proj.c_str();\n\n    doc.save_file(file.c_str());\n}\n\nvoid CodeToolCache::Load(const string& file, bool original /*= true*/)\n{\n    pugi::xml_document doc;\n    doc.load_file(file.c_str());\n\n    pugi::xml_node filesNode = doc.child(\"files\");\n    for (auto x : filesNode)\n    {\n        SyntaxFile* newFile = new SyntaxFile();\n        newFile->LoadFrom(x);\n        files.push_back(newFile);\n\n        if (original)\n            originalFiles.push_back(newFile);\n    }\n\n    if (original)\n    {\n        for (auto x : parentProjects)\n            Load(x, false);\n    }\n    else\n    {\n        pugi::xml_node parentProjsNode = doc.child(\"parentProjects\");\n        for (auto x : parentProjsNode)\n        {\n            string path = x.attribute(\"path\").as_string();\n            parentProjects.push_back(path);\n            Load(path, false);\n        }\n    }\n}\n\nvoid CodeToolCache::AppendSection(SyntaxSection* currentSection, SyntaxSection* newSection)\n{\n    if (newSection->IsClass())\n    {\n        SyntaxClass* childClass = (SyntaxClass*)newSection;\n\n        currentSection->mSections.push_back(childClass);\n        childClass->mParentSection = currentSection;\n\n        auto oldSections = newSection->mSections;\n        newSection->mSections.clear();\n        for (auto childSection : oldSections)\n            AppendSection(childClass, childSection);\n    }\n    else\n    {\n        SyntaxSection* childNamespace = nullptr;\n\n        auto fnd = find_if(currentSection->mSections.begin(), currentSection->mSections.end(),\n                           [=](SyntaxSection* x) {\n                               return !x->IsClass() && x->GetName() == newSection->GetName();\n                           });\n\n        if (fnd != currentSection->mSections.end())\n            childNamespace = *fnd;\n\n        if (!childNamespace)\n        {\n            childNamespace = new SyntaxNamespace();\n            childNamespace->mName = newSection->mName;\n            childNamespace->mFullName = newSection->mFullName;\n\n            currentSection->mSections.push_back(childNamespace);\n            childNamespace->mParentSection = currentSection;\n        }\n\n\n        childNamespace->mVariables.insert(childNamespace->mVariables.end(),\n                                          newSection->mVariables.begin(),\n                                          newSection->mVariables.end());\n\n        childNamespace->mFunctions.insert(childNamespace->mFunctions.end(),\n                                          newSection->mFunctions.begin(),\n                                          newSection->mFunctions.end());\n\n        childNamespace->mTypedefs.insert(childNamespace->mTypedefs.end(),\n                                         newSection->mTypedefs.begin(),\n                                         newSection->mTypedefs.end());\n\n        childNamespace->mUsingNamespaces.insert(childNamespace->mUsingNamespaces.end(),\n                                                newSection->mUsingNamespaces.begin(),\n                                                newSection->mUsingNamespaces.end());\n\n        childNamespace->mEnums.insert(childNamespace->mEnums.end(),\n                                      newSection->mEnums.begin(),\n                                      newSection->mEnums.end());\n\n        for (auto childSection : newSection->mSections)\n            AppendSection(childNamespace, childSection);\n    }\n}\n\nvoid CodeToolCache::ResolveDependencies(SyntaxSection* section)\n{\n    for (auto tdef : section->mTypedefs)\n    {\n        tdef->mWhatSection = FindSection(tdef->mWhatName, section);\n\n        if (!tdef->mWhatSection)\n            CodeToolApplication::VerboseLog(\"Not found section for typedef: %s\\n\", tdef->mWhatName.c_str());\n    }\n\n    for (auto nspace : section->mUsingNamespaces)\n    {\n        nspace->mUsingNamespace = FindSection(nspace->mUsingNamespaceName);\n\n        if (!nspace->mUsingNamespace)\n            CodeToolApplication::VerboseLog(\"Not found section for using namespace: %s\\n\", nspace->mUsingNamespaceName.c_str());\n    }\n\n    auto sections = section->mSections;\n    for (auto childSection : sections)\n        ResolveDependencies(childSection);\n}\n\nvoid CodeToolCache::ResolveBaseClassDependencies(SyntaxSection* section)\n{\n    if (section->IsClass())\n    {\n        SyntaxClass* cls = (SyntaxClass*)section;\n        for (auto& baseClass : cls->mBaseClasses)\n        {\n            baseClass.mClass = (SyntaxClass*)FindSection(baseClass.mClassName, section);\n\n            if (!baseClass.mClass)\n                CodeToolApplication::VerboseLog(\"Not found base class: %s\\n\", baseClass.mClassName.c_str());\n        }\n    }\n\n    auto sections = section->mSections;\n    for (auto childSection : sections)\n        ResolveBaseClassDependencies(childSection);\n}\n"
  },
  {
    "path": "CodeTool/Src/CodeToolApp.h",
    "content": "#pragma once\n\n#include <chrono>\n#include \"CppSyntaxParser.h\"\n\nclass Timer\n{\npublic:\n    // Default constructor\n    Timer();\n\n    // Resets time\n    void Reset();\n\n    // Returns time in seconds from last Reset() call\n    float GetTime(); //TODO maybe unused\n\n    // Returns time in seconds from last Reset() or GetElapsedTime() call\n    float GetDeltaTime();\n\nprivate:\n    std::chrono::time_point<std::chrono::steady_clock> mLastElapsedTime;\n};\n\nclass CodeToolCache\n{\npublic:\n    SyntaxFilesVec   files;           // All syntax files list, including parent projects\n    SyntaxFilesVec   originalFiles;   // Original syntax files list\n    SyntaxSection    globalNamespace; // Global syntax namespace\n    SyntaxClassesVec attributes;      // Allattribute classes\n    vector<string>   parentProjects;  // Parent projects code tool caches, that used in current project\n\n    // Updates global namespace\n    void UpdateGlobalNamespace();\n\n    // Returns is class based on other class\n    bool IsClassBasedOn(SyntaxClass* _class, SyntaxClass* baseClass);\n\n    // Returns section by name in global space\n    SyntaxSection* FindSection(const string& fullName, bool withTypedefs = true);\n\n    // Returns section by name in where\n    SyntaxSection* FindSection(const string& what, const string& where, bool withTypedefs = true);\n\n    // Returns section by name in where\n    SyntaxSection* FindSection(const string& what, SyntaxSection* where, bool withTypedefs = true);\n\n    // Saves data to file\n    void Save(const string& file) const;\n\n    // Loads data from file\n    void Load(const string& file, bool original = true);\n\nprotected:\n    void AppendSection(SyntaxSection* currentSection, SyntaxSection* newSection);\n    void ResolveDependencies(SyntaxSection* section);\n    void ResolveBaseClassDependencies(SyntaxSection* section);\n    SyntaxSection* FindSection(const string& what, SyntaxSection* where, SyntaxSectionsVec& processedSections, bool withTypedefs = true);\n    void SearchAttributes(SyntaxSection* section, SyntaxClass* attributeClass);\n};\n\n// ---------------------\n// Code tool application\n// ---------------------\nclass CodeToolApplication\n{\npublic:\n    // Default constructor. Initializes all editor components\n    CodeToolApplication();\n\n    // Destructor\n    ~CodeToolApplication();\n\n    // Sets arguments from main()\n    void SetArguments(char** args, int nargs);\n\n    // Generates new reflection\n    void Process();\n\n    // Outs string to log\n    static void Log(const char* format, ...);\n\n    // Outs string to log if verbose move is enabled\n    static void VerboseLog(const char* format, ...);\n\nprotected:\n    string                 mCachePath = \"CodeToolCache.xml\";\n                           \n    string                 mProjectName;\n    string                 mSourcesPath;\n    string                 mMSVCProjectPath;\n    string                 mXCodeProjectPath;\n    bool                   mNeedReset = true;\n    static bool            mVerbose;\n                           \n    CppSyntaxParser*       mParser;\n    vector<SyntaxFile*>    mParsedFiles;\n    CodeToolCache          mCache;\n    map<string, TimeStamp> mSourceFiles;\n\n    vector<string>         mRegistatorsList;\n    vector<string>         mEnumRegistratorsList;\n    vector<string>         mTemplateClassManualRegistratorsList;\n\nprotected:\n    // Returns list of all files in path and in sub paths\n    map<string, TimeStamp> GetFolderFiles(const string& path);\n\n    // Returns last edited date for file\n    TimeStamp GetFileEditedDate(const string& path);\n\n    // Parses startup arguments and puts into map\n    map<string, string> ParseArguments(char** args, int nargs);\n\n    // Returns is file exist\n    bool IsFileExist(const string& path) const;\n\n    // Writes data to file\n    void WriteFile(const string& path, const string& data) const;\n\n    // Reads data from file\n    string ReadFile(const string& path) const;\n\n    // Returns path without parent directories\n    string GetPathWithoutDirectories(const string& path);\n\n    // Returns parent path\n    string GetParentPath(const string& path);\n\n    // Returns relative path\n    string GetRelativePath(const string& from, const string& to);\n\n    // Loads files parsing cache\n    void LoadCache();\n\n    // Saves files parsing cache\n    void SaveCache();\n\n    // Updates project files structure\n    void UpdateProjectFilesFilter();\n\n    // Updates code reflection\n    void UpdateCodeReflection();\n\n    // Scans all .cpp files for ENUM_META calls and collects REG_IDs\n    void CollectEnumRegistrators();\n\n    // Scans all .cpp files for DECLARE_TEMPLATE_CLASS_MANUAL_ID calls and collects REG_IDs\n    void CollectTemplateClassManualRegistrators();\n\n    // Generates classes registrators list source file\n    void UpdateRegistratorsSource();\n\n    // Parses source file\n    void ParseSource(const string& path, const TimeStamp& editDate);\n\n    // Updates reflection for classes in source\n    void UpdateSourceReflection(SyntaxFile* file);\n\n    // Adds meta comment begin section\n    void AddBeginMeta(bool& hasMeta, string& res);\n\n    // Adds meta comment end section\n    void AddEndMeta(bool hasMeta, string& res);\n\n    // Returns class declaration meta\n    string GetClassDeclaration(SyntaxClass* cls);\n\n    // Returns class reflection meta\n    string GetClassMeta(SyntaxClass* cls);\n\n    // Returns is comment ignoring\n    bool IsIgnoreComment(SyntaxComment* synComment);\n\n    // Adds #if if required\n    void CheckIfDefines(ISyntaxExpression* item, SyntaxDefineIf*& prevDefine, string& data);\n\n    // Adds #endif if required\n    void CompleteIfDefines(SyntaxDefineIf*& prevDefine, string& data);\n\n    // Returns class field attributes\n    string GetAttributes(SyntaxClass* cls, int line, SyntaxComment* synComment);\n\n    // Return enum reflection meta\n    string GetEnumMeta(SyntaxEnum* enm);\n\n    // Return enum reflection meta for header\n    string GetEnumPreMeta(SyntaxEnum* enm);\n\n    // Builds meta templates parameters for template classes\n    void AggregateTemplates(SyntaxSection* sec, string& templates, string& fullName);\n\n    // Returns class full name with template parameters in global space\n    string GetClassNormalizedTemplates(const string& name, const string& nspace);\n\n    // Removes class metas from source\n    void RemoveMetas(string& data, const char* keyword, const char* endword, bool allowMultiline = true);\n\n    // Returns is function reflectable\n    bool IsFunctionReflectable(SyntaxFunction* function, SyntaxSection* owner) const;\n};\n"
  },
  {
    "path": "CodeTool/Src/CppSyntaxParser.cpp",
    "content": "#include \"CppSyntaxParser.h\"\n\n#include <algorithm>\n#include <fstream>\n#include <functional>\n#include <locale>\n#include <sstream>\n#include <cstring>\n\nstring& TrimStart(string& str, const string& chars /*= \" \"*/)\n{\n    int l = (int)str.length();\n    int i = 0;\n    for (; i < l; i++)\n    {\n        if (chars.find(str[i]) == string::npos)\n            break;\n    }\n\n    str.erase(0, i);\n\n    return str;\n}\n\nstring& TrimEnd(string& str, const string& chars /*= \" \"*/)\n{\n    int l = (int)str.length();\n    int i = l - 1;\n    for (; i >= 0; i--)\n    {\n        if (chars.find(str[i]) == string::npos)\n            break;\n    }\n\n    str.erase(i + 1);\n\n    return str;\n}\n\nstring& Trim(string& str, const string& chars /*= \" \"*/)\n{\n    return TrimStart(TrimEnd(str, chars), chars);\n}\n\nbool StartsWith(const string& str, const string& starts)\n{\n    int l1 = (int)str.length(), l2 = (int)starts.length();\n\n    if (l1 < l2)\n        return false;\n\n    for (int i = 0; i < l1 && i < l2; i++)\n    {\n        if (str[i] != starts[i])\n            return false;\n    }\n\n    return true;\n}\n\nbool EndsWith(const string& str, const string& ends)\n{\n    int l1 = (int)str.length(), l2 = (int)ends.length();\n\n    if (l1 < l2)\n        return false;\n\n    for (int i = 0; i < l1 && i < l2; i++)\n    {\n        if (str[l1 - i - 1] != ends[l2 - i - 1])\n            return false;\n    }\n\n    return true;\n}\n\nvoid Split(const string& s, char delim, vector<string>& elems)\n{\n    stringstream ss;\n    ss.str(s);\n    string item;\n    while (getline(ss, item, delim))\n        elems.push_back(item);\n}\n\nvector<string> Split(const string& s, char delim)\n{\n    vector<string> elems;\n    Split(s, delim, elems);\n    return elems;\n}\n\nCppSyntaxParser::CppSyntaxParser()\n{\n    InitializeParsers();\n}\n\nCppSyntaxParser::~CppSyntaxParser()\n{\n    for (auto x : mParsers)\n        delete x;\n}\n\nvoid CppSyntaxParser::InitializeParsers()\n{\n    mParsers.push_back(new ExpressionParser(\"namespace\", &CppSyntaxParser::ParseNamespace, false, true));\n    mParsers.push_back(new ExpressionParser(\"namespace\", &CppSyntaxParser::ParseNamespace, true, true));\n    mParsers.push_back(new ExpressionParser(\"//\", &CppSyntaxParser::ParseComment, true, true));\n    mParsers.push_back(new ExpressionParser(\"/*\", &CppSyntaxParser::ParseMultilineComment, true, true));\n    mParsers.push_back(new ExpressionParser(\"#pragma\", &CppSyntaxParser::ParsePragma, false, true));\n    mParsers.push_back(new ExpressionParser(\"#include\", &CppSyntaxParser::ParseInclude, false, true));\n    mParsers.push_back(new ExpressionParser(\"#define\", &CppSyntaxParser::ParseDefine, true, true));\n    mParsers.push_back(new ExpressionParser(\"#undef\", &CppSyntaxParser::ParseDefine, true, true));\n    mParsers.push_back(new ExpressionParser(\"#ifdef\", &CppSyntaxParser::ParseIfdefMacros, true, true));\n    mParsers.push_back(new ExpressionParser(\"#if\", &CppSyntaxParser::ParseIfMacros, true, true));\n    mParsers.push_back(new ExpressionParser(\"#endif\", &CppSyntaxParser::ParseEndIfMacros, true, true));\n    mParsers.push_back(new ExpressionParser(\"#else\", &CppSyntaxParser::ParseElseMacros, true, true));\n    mParsers.push_back(new ExpressionParser(\"#elif\", &CppSyntaxParser::ParseElifMacros, true, true));\n    mParsers.push_back(new ExpressionParser(\"meta class\", &CppSyntaxParser::ParseMetaClass, true, true));\n    mParsers.push_back(new ExpressionParser(\"class\", &CppSyntaxParser::ParseClass, true, true));\n    mParsers.push_back(new ExpressionParser(\"struct\", &CppSyntaxParser::ParseStruct, true, true));\n    mParsers.push_back(new ExpressionParser(\"template\", &CppSyntaxParser::ParseTemplate, true, true));\n    mParsers.push_back(new ExpressionParser(\"typedef\", &CppSyntaxParser::ParseTypedef, true, true));\n    mParsers.push_back(new ExpressionParser(\"enum\", &CppSyntaxParser::ParseEnum, true, true));\n    mParsers.push_back(new ExpressionParser(\"using\", &CppSyntaxParser::ParseUsing, true, true));\n    mParsers.push_back(new ExpressionParser(\"public:\", &CppSyntaxParser::ParsePublicSection, true, false));\n    mParsers.push_back(new ExpressionParser(\"private:\", &CppSyntaxParser::ParsePrivateSection, true, false));\n    mParsers.push_back(new ExpressionParser(\"protected:\", &CppSyntaxParser::ParseProtectedSection, true, false));\n    mParsers.push_back(new ExpressionParser(\"friend\", &CppSyntaxParser::ParseFriend, true, false));\n    mParsers.push_back(new ExpressionParser(\"ATTRIBUTE_COMMENT_DEFINITION\", &CppSyntaxParser::ParseAttributeCommentDef, true, false));\n    mParsers.push_back(new ExpressionParser(\"ATTRIBUTE_SHORT_DEFINITION\", &CppSyntaxParser::ParseAttributeShortDef, true, false));\n    mParsers.push_back(new ExpressionParser(\"ATTRIBUTES\", &CppSyntaxParser::ParseAttributes, true, false));\n    mParsers.push_back(new ExpressionParser(\"PROPERTIES\", &CppSyntaxParser::ParseProperties, true, false));\n    mParsers.push_back(new ExpressionParser(\"PROPERTY\", &CppSyntaxParser::ParseProperty, true, false));\n    mParsers.push_back(new ExpressionParser(\"GETTER\", &CppSyntaxParser::ParseGetter, true, false));\n    mParsers.push_back(new ExpressionParser(\"SETTER\", &CppSyntaxParser::ParseSetter, true, false));\n    mParsers.push_back(new ExpressionParser(\"ACCESSOR\", &CppSyntaxParser::ParseAccessor, true, false));\n}\n\nvoid CppSyntaxParser::ParseFile(SyntaxFile& file, const string& filePath, const TimeStamp& fileEditDate)\n{\n    file.mPath = filePath;\n    file.mLastEditedDate = fileEditDate;\n\n    ifstream fin;\n    fin.open(filePath.c_str());\n    if (!fin.is_open())\n        return;\n\n    file.mData = string((std::istreambuf_iterator<char>(fin)), std::istreambuf_iterator<char>());\n\n    fin.close();\n\n    if (file.mData.find(\"@CODETOOLIGNORE\") != string::npos)\n        return;\n\n    ParseSyntaxSection(*file.mGlobalNamespace, file.mData, file, SyntaxProtectionSection::Public);\n}\n\nvoid CppSyntaxParser::ParseSyntaxSection(SyntaxSection& section, const string& source, SyntaxFile& file,\n                                         SyntaxProtectionSection protectionSection)\n{\n    section.mLength = (int)source.length();\n    section.mData = source;\n    section.mFile = &file;\n\n    string skipSymbols = \" \\r\\n\\t;\";\n\n    int caret = 0;\n    while (caret < section.mLength)\n    {\n        if (skipSymbols.find(source[caret]) != string::npos)\n        {\n            caret++;\n            continue;\n        }\n\n        bool parsedByKeywork = false;\n        for (auto parser : mParsers)\n        {\n            const char* keyWord = parser->keyWord;\n\n            int i = 0;\n            bool success = true;\n            while (keyWord[i] != '\\0')\n            {\n                if (source[i + caret] != keyWord[i])\n                {\n                    success = false;\n                    break;\n                }\n                i++;\n            }\n\n            if (!success)\n                continue;\n\n            ParserDelegate pd = parser->parser;\n            (this->*pd)(section, caret, protectionSection);\n            parsedByKeywork = true;\n\n            break;\n        }\n\n        if (parsedByKeywork)\n            continue;\n\n        int blockbegin = caret;\n        string block = ReadBlock(section.mData, caret);\n        Trim(block, \" \\r\\t\\n\");\n        if (block[0] == '{' && block[block.length() - 1] == '}')\n        {\n            block.erase(block.length() - 1, 1);\n            block.erase(0, 1);\n        }\n\n        if (!block.empty())\n            TryParseBlock(section, block, blockbegin, caret, protectionSection);\n        else\n            caret++;\n    }\n}\n\nint CppSyntaxParser::GetLineNumber(const string& data, int caret)\n{\n    int res = 0;\n    for (int i = 0; i < caret; i++)\n        if (data[i] == '\\n')\n            res++;\n\n    return res;\n}\n\nvoid CppSyntaxParser::TryParseBlock(SyntaxSection& section, const string& block, int blockBegin, int& caret,\n                                    SyntaxProtectionSection& protectionSection)\n{\n    if (IsFunction(block))\n    {\n        auto func = ParseFunction(block, protectionSection, blockBegin, caret);\n        func->mFile = section.mFile;\n        func->mLine = GetLineNumber(section.mData, caret);\n        section.mFunctions.push_back(func);\n    }\n    else\n    {\n        auto var = ParseVariable(block, protectionSection, blockBegin, caret);\n        var->mFile = section.mFile;\n        var->mLine = GetLineNumber(section.mData, caret);\n        section.mVariables.push_back(var);\n    }\n}\n\nbool CppSyntaxParser::IsFunction(const string& data)\n{\n    int locCaret = 0;\n    bool isFunction = false;\n\n    string firstWord = ReadWord(data, locCaret, \" \\n\\r(){}[]\");\n\n    if (firstWord.empty())\n        return false;\n\n    if (firstWord == \"virtual\")\n        firstWord = ReadWord(data, locCaret, \" \\n\\r(){}[]\");\n\n    if (firstWord == \"static\")\n        firstWord = ReadWord(data, locCaret, \" \\n\\r(){}[]\");\n\n    if (firstWord == \"typename\")\n        firstWord = ReadWord(data, locCaret, \" \\n\\r(){}[]\");\n\n    if (firstWord == \"inline\")\n        firstWord = ReadWord(data, locCaret, \" \\n\\r(){}[]\");\n\n    if (firstWord == \"explicit\")\n        firstWord = ReadWord(data, locCaret, \" \\n\\r(){}[]\");\n\n    if (GetNextSymbol(data, locCaret, \" \\n\\r\\t\") == '(')\n    {\n        string braces = ReadBraces(data, locCaret);\n        Trim(braces, \" \\n\\t\\r()\");\n\n        int tmpCaret = 0;\n        string word = ReadWord(braces, tmpCaret);\n\n        isFunction = GetNextSymbol(braces, tmpCaret, \" \\n\\r\\t\") != ':';\n\n        if (!isFunction && StartsWith(braces, \"std\"))\n            isFunction = true;\n    }\n    else\n    {\n        if (firstWord == \"const\")\n            ReadWord(data, locCaret, \" \\n\\r(){}[]\");\n\n        if (firstWord == \"operator\")\n            ReadWord(data, locCaret, \" \\n\\r(){}[]\");\n\n        string thirdWord = ReadWord(data, locCaret, \" \\n\\r(){}[]<>-\");\n\n        if (thirdWord == \"operator\")\n            thirdWord = ReadWord(data, locCaret, \" \\n\\r(){}\", \"\\n\\r\", true, true, false);\n\n        if (GetNextSymbol(data, locCaret, \" \\n\\r\\t\") == '(')\n            isFunction = true;\n    }\n\n    return isFunction;\n}\n\nSyntaxVariable* CppSyntaxParser::ParseVariable(const string& data, SyntaxProtectionSection& protectionSection,\n                                               int begin, int end)\n{\n    SyntaxVariable* res = new SyntaxVariable();\n    res->mBegin = begin;\n    res->mLength = end - begin;\n    res->mData = data;\n\n    if (mCurrentDefine)\n        res->mDefine = mCurrentDefine;\n\n    int caret = 0;\n    string typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n    string typeDefinition = typeWord;\n\n    if (typeWord == \"static\")\n    {\n        typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n        typeDefinition += \" \" + typeWord;\n        res->mIsStatic = true;\n    }\n\n    if (typeWord == \"const\")\n    {\n        typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n        res->mType.mIsContant = true;\n\n        typeDefinition += \" \" + typeWord;\n    }\n\n    if (typeWord == \"mutable\")\n    {\n        typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n        res->mType.mIsMutable = true;\n\n        typeDefinition += \" \" + typeWord;\n    }\n\n    if (!typeWord.empty() && typeWord[typeWord.length() - 1] == '&')\n        res->mType.mIsReference = true;\n\n    if (!typeWord.empty() && typeWord[typeWord.length() - 1] == '*')\n        res->mType.mIsPointer = true;\n\n    res->mType.mName = typeWord;\n\n    res->mClassSection = protectionSection;\n\n    if (GetNextSymbol(data, caret, \" \\n\\r\\t\") == '(')\n    {\n        string bracesRaw = ReadBraces(data, caret);\n        string braces = Trim(bracesRaw, \" \\r\\t\\t()\");\n\n        string nextBracesRaw = ReadBraces(data, caret);\n        string nextBraces = Trim(nextBracesRaw, \" \\r\\t\\t()\");\n\n        int tmpCaret = 0;\n        string bracesFirst = ReadWord(braces, tmpCaret);\n        if (braces[tmpCaret] == '*')\n        {\n            tmpCaret += 3;\n            res->mName = braces.substr(tmpCaret);\n\n            res->mType.mName += \" (\" + bracesFirst + \"*)(\" + nextBraces + \")\";\n        }\n    }\n    else\n    {\n        string nextWord = ReadWord(data, caret, \" (){}[]\");\n        if (nextWord == \"const\")\n            res->mName = ReadWord(data, caret, \" (){}[]\");\n        else\n            res->mName = nextWord;\n\n        nextWord = ReadWord(data, caret, \" (){}[]\");\n        if (nextWord == \"=\")\n            res->mDefaultValue = ReadWord(data, caret, \";\");\n    }\n\n    return res;\n}\n\nSyntaxFunction* CppSyntaxParser::ParseFunction(const string& data, SyntaxProtectionSection& protectionSection,\n                                               int begin, int end)\n{\n    SyntaxFunction* res = new SyntaxFunction();\n    res->mBegin = begin;\n    res->mLength = end - begin;\n    res->mData = data;\n\n    if (mCurrentDefine)\n        res->mDefine = mCurrentDefine;\n\n    res->mClassSection = protectionSection;\n\n    int caret = 0;\n    string typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n\n    if (typeWord == \"virtual\")\n    {\n        res->mIsVirtual = true;\n        typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n    }\n\n    if (typeWord == \"static\")\n    {\n        res->mIsStatic = true;\n        typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n    }\n\n    if (typeWord == \"inline\")\n        typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n\n    if (typeWord == \"typename\")\n        typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n\n    if (typeWord == \"explicit\")\n        typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n\n    if (typeWord == \"operator\")\n    {\n        string nextWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n        res->mName = typeWord + nextWord;\n        res->mReturnType.mName = \"void\";\n    }\n    else\n    {\n        if (GetNextSymbol(data, caret, \" \\n\\r\\t\") == '(')\n        {\n            res->mName = typeWord;\n            res->mReturnType.mName = \"void\";\n        }\n        else\n        {\n            string typeDefinition = typeWord;\n\n            if (typeWord == \"const\")\n            {\n                typeWord = ReadWord(data, caret, \" \\n\\r(){}[]\");\n                res->mReturnType.mIsContant = true;\n\n                typeDefinition += \" \" + typeWord;\n            }\n\n            if (!typeWord.empty() && typeWord[typeWord.length() - 1] == '&')\n                res->mReturnType.mIsReference = true;\n\n            if (!typeWord.empty() && typeWord[typeWord.length() - 1] == '*')\n                res->mReturnType.mIsPointer = true;\n\n            res->mReturnType.mName = typeWord;\n\n            res->mName = ReadWord(data, caret, \" \\n\\r(){}[]\");\n\n            if (res->mName == \"operator\")\n                res->mName += \" \" + ReadWord(data, caret, \" \\n\\r(){}\");\n        }\n    }\n\n    string braces = ReadBraces(data, caret);\n    string paramsStr = Trim(braces, \" \\n\\r\\t\");\n    string afterParamWord = ReadWord(data, caret);\n\n    if (afterParamWord == \"const\")\n        res->mIsContstant = true;\n\n    if (!paramsStr.empty())\n    {\n        auto paramsArr = Split(paramsStr, ',');\n        for (auto& prm : paramsArr)\n        {\n            Trim(prm, \" \\r\\n\\t\");\n            SyntaxProtectionSection tempProtectSection = SyntaxProtectionSection::Public;\n            res->mParameters.push_back(ParseVariable(prm, tempProtectSection, begin, end));\n        }\n    }\n\n    return res;\n}\n\nvoid CppSyntaxParser::ParseNamespace(SyntaxSection& section, int& caret,\n                                     SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n    caret += (int)strlen(\"namespace\");\n\n    string namespaceName = ReadWord(section.mData, caret);\n    string blockRaw = ReadBlock(section.mData, caret);\n    string block = Trim(blockRaw, \" \\r\\t\\n\");\n\n    SyntaxNamespace* newNamespace = new SyntaxNamespace();\n    newNamespace->mBegin = begin;\n    newNamespace->mLength = caret - begin;\n    newNamespace->mLine = GetLineNumber(section.mData, caret);\n\n    string blockSubstr = block.substr(1, block.length() - 1);\n    newNamespace->mData = Trim(blockSubstr, \" \\r\\t\\n\");\n    newNamespace->mName = namespaceName;\n    newNamespace->mFullName = section.mFullName.empty() ? namespaceName : section.mFullName + \"::\" + namespaceName;\n    newNamespace->mFile = section.mFile;\n    newNamespace->mParentSection = &section;\n    section.mSections.push_back(newNamespace);\n\n    ParseSyntaxSection(*newNamespace, newNamespace->mData, *section.mFile, SyntaxProtectionSection::Public);\n}\n\nvoid CppSyntaxParser::ParseComment(SyntaxSection& section, int& caret,\n                                   SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n    caret += (int)strlen(\"//\");\n\n    SyntaxComment* comment = new SyntaxComment();\n\n    int dataLength = (int)section.mData.length();\n    string skipSymbols = \" \\r\\t;\";\n    int tmpCaret = caret;\n    bool first = true;\n    int line = 0;\n    do\n    {\n        caret = tmpCaret;\n\n        if (!first)\n        {\n            caret += 2;\n            comment->mData += '\\n';\n        }\n\n        string buffRaw = ReadWord(section.mData, caret, \"\\n\", \"\");\n        string buff = Trim(buffRaw, \" \\r\");\n        comment->mData += buff;\n\n        line = GetLineNumber(section.mData, caret);\n\n        tmpCaret = caret + 1;\n        for (; tmpCaret < dataLength; tmpCaret++)\n        {\n            if (skipSymbols.find(section.mData[tmpCaret]) == string::npos)\n                break;\n        }\n\n        if (first)\n            first = false;\n    } while (tmpCaret < dataLength - 2 && section.mData[tmpCaret] == '/' && section.mData[tmpCaret + 1] == '/');\n\n    caret = tmpCaret;\n\n    comment->mBegin = begin;\n    comment->mLength = caret - begin;\n    comment->mFile = section.mFile;\n    comment->mLine = line;\n\n    section.mComments.push_back(comment);\n}\n\nvoid CppSyntaxParser::ParseMultilineComment(SyntaxSection& section, int& caret,\n                                            SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n    caret += (int)strlen(\"/*\");\n    int end = (int)section.mData.find(\"*/\", caret);\n    caret = end;\n\n    SyntaxComment* comment = new SyntaxComment();\n    string sub = section.mData.substr(begin + 2, end - 4 - begin);\n    comment->mData = Trim(sub, \" \\r\\t\\n\");\n    comment->mBegin = begin;\n    comment->mLength = caret - begin;\n    comment->mFile = section.mFile;\n\n    section.mComments.push_back(comment);\n}\n\nvoid CppSyntaxParser::ParsePragma(SyntaxSection& section, int& caret,\n                                  SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"#pragma\");\n    ReadWord(section.mData, caret, \"\\n\", \"\");\n}\n\nvoid CppSyntaxParser::ParseInclude(SyntaxSection& section, int& caret,\n                                   SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"#include\");\n    ReadWord(section.mData, caret, \"\\n\", \"\");\n}\n\nvoid CppSyntaxParser::ParseDefine(SyntaxSection& section, int& caret,\n                                  SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"#define\");\n    ReadWord(section.mData, caret, \"\\n\", \"\");\n}\n\nvoid CppSyntaxParser::ParseUndef(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"#undef\");\n    ReadWord(section.mData, caret, \"\\n\", \"\");\n}\n\nvoid CppSyntaxParser::ParseIfdefMacros(SyntaxSection& section, int& caret,\n                                    SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"#ifdef\");\n\n    SyntaxDefineIf* newDefine = new SyntaxDefineIf();\n    newDefine->mDefintion = \"defined \" + ReadWord(section.mData, caret, \"\\n\", \"\");\n\n    section.mDefines.push_back(newDefine);\n    mCurrentDefine = newDefine;\n}\n\nvoid CppSyntaxParser::ParseIfMacros(SyntaxSection& section, int& caret,\n                                    SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"#if\");\n\n    SyntaxDefineIf* newDefine = new SyntaxDefineIf();\n    newDefine->mDefintion = ReadWord(section.mData, caret, \"\\n\", \"\");\n\n    section.mDefines.push_back(newDefine);\n    mCurrentDefine = newDefine;\n}\n\nvoid CppSyntaxParser::ParseEndIfMacros(SyntaxSection& section, int& caret,\n                                    SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"#endif\");\n    ReadWord(section.mData, caret, \"\\n\", \"\");\n    mCurrentDefine = nullptr;\n}\n\nvoid CppSyntaxParser::ParseElifMacros(SyntaxSection& section, int& caret,\n                                    SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"#elif\");\n\n    SyntaxDefineIf* newDefine = new SyntaxDefineIf();\n    newDefine->mDefintion = ReadWord(section.mData, caret, \"\\n\", \"\");\n\n    section.mDefines.push_back(newDefine);\n    mCurrentDefine = newDefine;\n}\n\nvoid CppSyntaxParser::ParseElseMacros(SyntaxSection& section, int& caret,\n                                    SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"#else\");\n    ReadWord(section.mData, caret, \"\\n\", \"\");\n\n    if (mCurrentDefine)\n    {\n        SyntaxDefineIf* newDefine = new SyntaxDefineIf();\n        newDefine->mDefintion = \"!(\" + mCurrentDefine->mDefintion + \")\";\n\n        section.mDefines.push_back(newDefine);\n        mCurrentDefine = newDefine;\n    }\n}\n\nvoid CppSyntaxParser::ParseMetaClass(SyntaxSection& section, int& caret,\n                                     SyntaxProtectionSection& protectionSection)\n{\n    ParseClassOrStruct(section, caret, protectionSection, true, true, \"\");\n}\n\nvoid CppSyntaxParser::ParseClass(SyntaxSection& section, int& caret,\n                                 SyntaxProtectionSection& protectionSection)\n{\n    ParseClassOrStruct(section, caret, protectionSection, true, false, \"\");\n}\n\nvoid CppSyntaxParser::ParseStruct(SyntaxSection& section, int& caret,\n                                  SyntaxProtectionSection& protectionSection)\n{\n    ParseClassOrStruct(section, caret, protectionSection, false, false, \"\");\n}\n\nvoid CppSyntaxParser::ParseClassOrStruct(SyntaxSection& section, int& caret,\n                                         SyntaxProtectionSection& protectionSection,\n                                         bool isClass, bool isMeta, const string& templates)\n{\n    int begin = caret;\n\n    if (isMeta)\n        caret += (int)strlen(\"meta\");\n\n    if (isClass) caret += (int)strlen(\"class\");\n    else         caret += (int)strlen(\"struct\");\n\n    string className = ReadWord(section.mData, caret, \" \\n\\t\\r:;/\");\n    string afterNameRaw = ReadWord(section.mData, caret, \";{/\");\n    string afterName = Trim(afterNameRaw, \" :\\r\\n\\t\");\n\n    string shortClassName = className;\n    className = section.mFullName.empty() ? className : section.mFullName + \"::\" + className;\n\n    SyntaxClass* newClass = new SyntaxClass();\n\n    newClass->mBegin = begin;\n    newClass->mLength = caret - begin;\n    newClass->mLine = GetLineNumber(section.mData, caret);\n    newClass->mData = section.mData.substr(begin, caret - begin);\n    newClass->mName = shortClassName;\n    newClass->mFullName = className;\n    newClass->mFile = section.mFile;\n    newClass->mParentSection = &section;\n    newClass->mClassSection = protectionSection;\n    newClass->mTemplateParameters = templates;\n\n    if (mCurrentDefine)\n        newClass->mDefine = mCurrentDefine;\n\n    if (!afterName.empty())\n    {\n        auto baseClasses = Split(afterName, ',');\n\n        for (auto& baseClass : baseClasses)\n        {\n            Trim(baseClass);\n\n            int spacePos = (int)baseClass.find(' ');\n            if (spacePos == baseClass.npos)\n                newClass->mBaseClasses.push_back(SyntaxClassInheritance(baseClass, SyntaxProtectionSection::Private));\n            else\n            {\n                if (StartsWith(baseClass, \"virtual\"))\n                {\n                    baseClass.erase(0, strlen(\"virtual\") + 1);\n                    spacePos = (int)baseClass.find(' ');\n                }\n\n                string sectionTypeName = baseClass.substr(0, spacePos);\n                string baseClassName = baseClass.substr(spacePos + 1);\n\n                if (StartsWith(baseClassName, \"virtual\"))\n                    baseClassName.erase(0, strlen(\"virtual\") + 1);\n\n                SyntaxProtectionSection sectionType = SyntaxProtectionSection::Private;\n\n                if (sectionTypeName == \"public\")\n                    sectionType = SyntaxProtectionSection::Public;\n                else if (sectionTypeName == \"protected\")\n                    sectionType = SyntaxProtectionSection::Protected;\n\n                newClass->mBaseClasses.push_back(SyntaxClassInheritance(baseClassName, sectionType));\n            }\n        }\n    }\n\n    int dataLength = (int)section.mData.length();\n\n    if (caret < dataLength && section.mData[caret] == '/')\n    {\n        string comment = ReadWord(section.mData, caret, \"\\n\");\n        ReadWord(section.mData, caret, \";{/\");\n    }\n\n    if (caret < dataLength && section.mData[caret] == '{')\n    {\n        string block = ReadBlock(section.mData, caret);\n        newClass->mData = Trim(block, \"{} \\n\\r\\t\");\n\n        section.mSections.push_back(newClass);\n\n        // For class, default protection is Private; for struct, it's Public\n        SyntaxProtectionSection initialProtection = isClass ? SyntaxProtectionSection::Private : SyntaxProtectionSection::Public;\n        ParseSyntaxSection(*newClass, newClass->mData, *newClass->mFile, initialProtection);\n    }\n}\n\nvoid CppSyntaxParser::ParseTemplate(SyntaxSection& section, int& caret,\n                                    SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"template\");\n\n    int dataLen = (int)section.mData.length();\n\n    for (; caret < dataLen; caret++)\n        if (section.mData[caret] == '<')\n            break;\n\n    caret++;\n    int braces = 1;\n    int begin = caret;\n\n    for (; caret < dataLen; caret++)\n    {\n        if (section.mData[caret] == '<')\n            braces++;\n\n        if (section.mData[caret] == '>')\n        {\n            braces--;\n\n            if (braces == 0)\n                break;\n        }\n    }\n\n    string tempInside = section.mData.substr(begin, caret - begin);\n\n    int tmpCaret = caret + 1;\n    string blockRaw = ReadBlock(section.mData, tmpCaret);\n    string block = Trim(blockRaw, \" \\n\\r\\t\");\n\n    if (StartsWith(block, \"class\"))\n    {\n        caret = (int)section.mData.find(\"class\", caret + 1);\n        ParseClassOrStruct(section, caret, protectionSection, true, false, tempInside);\n    }\n    else if (StartsWith(block, \"struct\"))\n    {\n        caret = (int)section.mData.find(\"struct\", caret + 1);\n        ParseClassOrStruct(section, caret, protectionSection, false, false, tempInside);\n    }\n    else if (StartsWith(block, \"metaclass\"))\n    {\n        caret = (int)section.mData.find(\"metaclass\", caret + 1);\n        ParseClassOrStruct(section, caret, protectionSection, true, true, tempInside);\n    }\n    else if (StartsWith(block, \"friend\"))\n    {\n        caret = (int)section.mData.find(\"friend\", caret + 1);\n        ParseFriend(section, caret, protectionSection);\n    }\n    else if (IsFunction(block))\n    {\n        auto func = ParseFunction(block, protectionSection, 0, (int)block.length());\n        func->mTemplates = tempInside;\n        func->mFile = section.mFile;\n        func->mLine = GetLineNumber(section.mData, caret);\n        section.mFunctions.push_back(func);\n\n        caret = tmpCaret;\n    }\n    else caret = tmpCaret;\n}\n\nvoid CppSyntaxParser::ParseTypedef(SyntaxSection& section, int& caret,\n                                   SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n    caret += (int)strlen(\"typedef\");\n    string word = ReadWord(section.mData, caret, \";\");\n    string temp = Trim(word, \" \\r\\n\\t\");\n\n    int lastSpace = (int)temp.rfind(' ');\n\n    string valueRaw = temp.substr(0, lastSpace);\n    string value = Trim(valueRaw, \" \\r\\t\\n\");\n\n    string nameRaw = temp.substr(lastSpace + 1);\n    string name = Trim(nameRaw, \" \\r\\t\\n;\");\n\n    if (StartsWith(value, \"typename\"))\n        value.erase(0, strlen(\"typename \"));\n\n    SyntaxTypedef* synTypedef = new SyntaxTypedef();\n    synTypedef->mBegin = begin;\n    synTypedef->mLength = caret - begin;\n    synTypedef->mLine = GetLineNumber(section.mData, caret);\n    synTypedef->mData = section.mData.substr(begin, caret - begin);\n    synTypedef->mWhatName = value;\n    synTypedef->mNewDefName = name;\n\n    section.mTypedefs.push_back(synTypedef);\n}\n\nvoid CppSyntaxParser::ParseEnum(SyntaxSection& section, int& caret,\n                                SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n    caret += (int)strlen(\"enum\");\n\n    string name = ReadWord(section.mData, caret);\n\n    if (name == \"class\")\n        name = ReadWord(section.mData, caret);\n\n    string blockRaw = ReadBlock(section.mData, caret);\n    string block = Trim(blockRaw, \" {}\\r\\t\\n\");\n    RemoveComments(block);\n    auto content = Split(block, ',');\n\n    SyntaxEnum* newEnum = new SyntaxEnum();\n    newEnum->mBegin = begin;\n    newEnum->mLength = caret - begin;\n    newEnum->mLine = GetLineNumber(section.mData, caret);\n    newEnum->mData = section.mData.substr(begin, caret - begin);\n    newEnum->mName = name;\n    newEnum->mFullName = section.GetFullName().empty() ? name : section.GetFullName() + \"::\" + name;\n    newEnum->mFile = section.mFile;\n    newEnum->mOwnerSection = &section;\n    newEnum->mClassSection = protectionSection;\n\n    for (auto& x : content)\n    {\n        Trim(x, \" \\n\\t\\r\");\n\n        string name, value;\n        int valuePos = (int)x.find('=');\n\n        if (valuePos != x.npos)\n        {\n            string sub = x.substr(0, valuePos);\n            name = Trim(sub, \" \\n\\t\\r\");\n\n            string sub2 = x.substr(valuePos + 1);\n            value = Trim(sub2, \" \\n\\t\\r\");\n        }\n        else name = x;\n\n        newEnum->mEntries[name] = value;\n    }\n\n    section.mEnums.push_back(newEnum);\n}\n\nvoid CppSyntaxParser::ParseUsing(SyntaxSection& section, int& caret,\n                                 SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n    caret += (int)strlen(\"using\");\n\n    int tmpCaret = caret;\n    string allWord = ReadWord(section.mData, tmpCaret, \";\");\n    if (allWord.find(':') != string::npos)\n    {\n        caret = tmpCaret + 1;\n        return;\n    }\n\n    ReadWord(section.mData, caret);\n    string word = ReadWord(section.mData, caret);\n    string name = Trim(word, \" \\r\\n;\");\n\n    SyntaxUsingNamespace* newUsing = new SyntaxUsingNamespace();\n\n    newUsing->mBegin = begin;\n    newUsing->mLength = caret - begin;\n    newUsing->mLine = GetLineNumber(section.mData, caret);\n    newUsing->mData = section.mData.substr(begin, caret - caret);\n    newUsing->mUsingNamespaceName = name;\n\n    section.mUsingNamespaces.push_back(newUsing);\n}\n\nvoid CppSyntaxParser::ParsePublicSection(SyntaxSection& section, int& caret,\n                                         SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"public:\");\n    protectionSection = SyntaxProtectionSection::Public;\n}\n\nvoid CppSyntaxParser::ParsePrivateSection(SyntaxSection& section, int& caret,\n                                          SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"private:\");\n    protectionSection = SyntaxProtectionSection::Private;\n}\n\nvoid CppSyntaxParser::ParseProtectedSection(SyntaxSection& section, int& caret,\n                                            SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"protected:\");\n    protectionSection = SyntaxProtectionSection::Protected;\n}\n\nvoid CppSyntaxParser::ParseFriend(SyntaxSection& section, int& caret,\n                                  SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"friend\");\n    ReadWord(section.mData, caret, \" \\n\\r\\t\");\n    ReadWord(section.mData, caret, \" \\n\\r\\t\");\n}\n\nvoid CppSyntaxParser::ParseAttributeCommentDef(SyntaxSection& section, int& caret,\n                                               SyntaxProtectionSection& protectionSection)\n{\n    SyntaxClass* classSection = dynamic_cast<SyntaxClass*>(&section);\n\n    caret += (int)strlen(\"ATTRIBUTE_COMMENT_DEFINITION\");\n    caret = (int)section.mData.find('\"', caret) + 1;\n    int begin = caret;\n    caret = (int)section.mData.find('\"', caret);\n\n    classSection->mAttributeCommentDef = section.mData.substr(begin, caret - begin);\n\n    caret = (int)section.mData.find(';', caret) + 1;\n}\n\nvoid CppSyntaxParser::ParseAttributeShortDef(SyntaxSection& section, int& caret,\n                                             SyntaxProtectionSection& protectionSection)\n{\n    SyntaxClass* classSection = dynamic_cast<SyntaxClass*>(&section);\n\n    caret += (int)strlen(\"ATTRIBUTE_SHORT_DEFINITION\");\n    caret = (int)section.mData.find('\"', caret) + 1;\n    int begin = caret;\n    caret = (int)section.mData.find('\"', caret);\n\n    classSection->mAttributeShortDef = section.mData.substr(begin, caret - begin);\n\n    caret = (int)section.mData.find(';', caret) + 1;\n}\n\nvoid CppSyntaxParser::ParseAttributes(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n\n    caret += (int)strlen(\"ATTRIBUTES\");\n    caret = (int)section.mData.find('(', caret) + 1;\n    string bracesRaw = ReadBraces(section.mData, caret);\n    string braces = Trim(bracesRaw, \" \\n\\r\\t()\");\n    caret = (int)section.mData.find(';', caret);\n\n    vector<string> separated = Split(braces, ',');\n    for (auto& x : separated)\n        Trim(x, \" \\n\\r\\t,\");\n\n    SyntaxAttributes* attributes = new SyntaxAttributes();\n    attributes->mBegin = begin;\n    attributes->mLength = caret - begin;\n    attributes->mLine = GetLineNumber(section.mData, caret);\n    attributes->mData = section.mData.substr(begin, caret - caret);\n    attributes->mAttributesList = separated;\n\n    section.mAttributes.push_back(attributes);\n}\n\nvoid CppSyntaxParser::ParseProperties(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection)\n{\n    caret += (int)strlen(\"PROPERTIES\");\n    caret = (int)section.mData.find('(', caret);\n    string bracesRaw = ReadBraces(section.mData, caret);\n    string braces = Trim(bracesRaw, \" \\n\\r\\t()\");\n    caret = (int)section.mData.find(';', caret);\n}\n\nvoid CppSyntaxParser::ParseProperty(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n\n    caret += (int)strlen(\"PROPERTY\");\n    caret = (int)section.mData.find('(', caret);\n    string bracesRaw = ReadBraces(section.mData, caret);\n    string braces = Trim(bracesRaw, \" \\n\\r\\t()\");\n    caret = (int)section.mData.find(';', caret);\n\n    vector<string> separated = Split(braces, ',');\n    for (auto& x : separated)\n        Trim(x, \" \\n\\r\\t,\");\n\n    SyntaxVariable* res = new SyntaxVariable();\n    res->mBegin = begin;\n    res->mLength = caret - begin;\n    res->mData = section.mData.substr(begin, caret - caret);\n    res->mLine = GetLineNumber(section.mData, caret);\n    res->mName = separated[1];\n    res->mType.mName = separated[0];\n\n    if (mCurrentDefine)\n        res->mDefine = mCurrentDefine;\n\n    section.mVariables.push_back(res);\n}\n\nvoid CppSyntaxParser::ParseGetter(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n\n    caret += (int)strlen(\"GETTER\");\n    caret = (int)section.mData.find('(', caret);\n    string bracesRaw = ReadBraces(section.mData, caret); ReadBraces(section.mData, caret);\n    string braces = Trim(bracesRaw, \" \\n\\r\\t()\");\n    caret = (int)section.mData.find(';', caret);\n\n    vector<string> separated = Split(braces, ',');\n    for (auto& x : separated)\n        Trim(x, \" \\n\\r\\t,\");\n\n    SyntaxVariable* res = new SyntaxVariable();\n    res->mBegin = begin;\n    res->mLength = caret - begin;\n    res->mData = section.mData.substr(begin, caret - caret);\n    res->mLine = GetLineNumber(section.mData, caret);\n    res->mName = separated[1];\n    res->mType.mName = separated[0];\n\n    if (mCurrentDefine)\n        res->mDefine = mCurrentDefine;\n\n    section.mVariables.push_back(res);\n}\n\nvoid CppSyntaxParser::ParseSetter(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n\n    caret += (int)strlen(\"SETTER\");\n    caret = (int)section.mData.find('(', caret);\n    string bracesRaw = ReadBraces(section.mData, caret);\n    string braces = Trim(bracesRaw, \" \\n\\r\\t()\");\n    caret = (int)section.mData.find(';', caret);\n\n    vector<string> separated = Split(braces, ',');\n    for (auto& x : separated)\n        Trim(x, \" \\n\\r\\t,\");\n\n    SyntaxVariable* res = new SyntaxVariable();\n    res->mBegin = begin;\n    res->mLength = caret - begin;\n    res->mData = section.mData.substr(begin, caret - caret);\n    res->mLine = GetLineNumber(section.mData, caret);\n    res->mName = separated[1];\n    res->mType.mName = separated[0];\n\n    if (mCurrentDefine)\n        res->mDefine = mCurrentDefine;\n\n    section.mVariables.push_back(res);\n}\n\nvoid CppSyntaxParser::ParseAccessor(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection)\n{\n    int begin = caret;\n\n    caret += (int)strlen(\"ACCESSOR\");\n    caret = (int)section.mData.find('(', caret);\n    string bracesRaw = ReadBraces(section.mData, caret);\n    string braces = Trim(bracesRaw, \" \\n\\r\\t()\");\n    caret = (int)section.mData.find(';', caret);\n\n    vector<string> separated = Split(braces, ',');\n    for (auto& x : separated)\n        Trim(x, \" \\n\\r\\t,\");\n\n    SyntaxVariable* res = new SyntaxVariable();\n    res->mBegin = begin;\n    res->mLength = caret - begin;\n    res->mData = section.mData.substr(begin, caret - caret);\n    res->mLine = GetLineNumber(section.mData, caret);\n    res->mName = separated[1];\n    res->mType.mName = separated[0];\n\n    if (mCurrentDefine)\n        res->mDefine = mCurrentDefine;\n\n    section.mVariables.push_back(res);\n}\n\nstring CppSyntaxParser::ReadWord(const string& data, int& caret,\n                                 const char* breakSymbols /*= \" \\n\\r(){}.,;+-* /=@!|&*:~\\\\\"*/,\n                                 const char* skipSymbols /*= \" \\n\\r\"*/,\n                                 bool checkBraces /*= true*/, bool checkFgBraces /*= true*/, bool checkTrBraces /*= true*/)\n{\n    string res = \"\";\n    int braces = 0, sqBraces = 0, trBraces = 0, fgBraces = 0;\n    int dataLen = (int)data.length();\n\n    for (; caret < dataLen; caret++)\n    {\n        int i = 0;\n        bool stop = true;\n        char s = data[caret];\n\n        while (skipSymbols[i] != '\\0')\n        {\n            if (skipSymbols[i] == s)\n            {\n                stop = false;\n                break;\n            }\n\n            i++;\n        }\n\n        if (stop)\n            break;\n    }\n\n    for (; caret < dataLen; caret++)\n    {\n        int i = 0;\n        bool stop = false;\n        char s = data[caret];\n\n        if ((fgBraces == 0 || !checkFgBraces) && (braces == 0 || !checkBraces) && (trBraces == 0 || !checkTrBraces))\n        {\n            while (breakSymbols[i] != '\\0')\n            {\n                if (breakSymbols[i] == s)\n                {\n                    stop = true;\n                    break;\n                }\n\n                i++;\n            }\n\n            if (stop)\n                break;\n        }\n\n        switch (s)\n        {\n        case '{': fgBraces++; break;\n        case '}': fgBraces--; if (fgBraces < 0) fgBraces = 0; break;\n\n        case ')': braces--; if (braces < 0) braces = 0; break;\n        case '(': braces++; break;\n\n        case '[': sqBraces++; break;\n        case ']': sqBraces--; if (sqBraces < 0) sqBraces = 0; break;\n\n        case '<': trBraces++; break;\n        case '>': trBraces--; if (trBraces < 0) trBraces = 0; break;\n        }\n\n        res += s;\n    }\n\n    return res;\n}\n\nstring CppSyntaxParser::ReadBlock(const string& data, int& caret)\n{\n    int begin = caret;\n    int braces = 0, fgBraces = 0, sqBraces = 0, trBraces = 0;\n    bool isInstring = false;\n    int dataLen = (int)data.length();\n\n    for (; caret < dataLen; caret++)\n    {\n        if (data[caret] == '{')\n            break;\n\n        if (data[caret] == ';')\n            return data.substr(begin, caret - begin);\n    }\n\n    caret++;\n    fgBraces++;\n\n    bool complete = false;\n    for (; caret < dataLen && !complete; caret++)\n    {\n        if (isInstring)\n        {\n            if (data[caret] == '\"' && data[caret - 1] != '\\\\')\n                isInstring = false;\n\n            continue;\n        }\n\n        switch (data[caret])\n        {\n        case '{': fgBraces++; break;\n        case '}':\n            fgBraces--;\n            if (fgBraces == 0 && braces == 0 && sqBraces == 0)\n                complete = true;\n            break;\n\n        case ')': braces--; break;\n        case '(': braces++; break;\n\n        case '[': sqBraces++; break;\n        case ']': sqBraces--; break;\n\n        case '<': trBraces++; break;\n        case '>': trBraces--; break;\n\n        case '\"':\n            isInstring = true;\n            break;\n        }\n    }\n\n    return data.substr(begin, min(caret, dataLen - 1) - begin);\n}\n\nstring CppSyntaxParser::ReadBraces(const string& data, int& caret)\n{\n    int begin = caret;\n    int braces = 0, fgBraces = 0, sqBraces = 0, trBraces = 0;\n    bool isInstring = false;\n    int dataLen = (int)data.length();\n\n    for (; caret < dataLen; caret++)\n    {\n        if (data[caret] == '(')\n            break;\n\n        if (data[caret] == ';')\n            return data.substr(begin, caret - begin);\n    }\n\n    caret++;\n    braces++;\n\n    bool complete = false;\n    for (; caret < dataLen && !complete; caret++)\n    {\n        if (isInstring)\n        {\n            if (data[caret] == '\"' && data[caret - 1] != '\\\\')\n                isInstring = false;\n\n            continue;\n        }\n\n        switch (data[caret])\n        {\n        case '}': fgBraces--; break;\n        case '{': fgBraces++; break;\n\n        case '[': sqBraces++; break;\n        case ']': sqBraces--; break;\n\n        case '<': trBraces++; break;\n        case '>': trBraces--; break;\n\n        case '(': braces++; break;\n        case ')':\n            braces--;\n            if (fgBraces == 0 && braces == 0 && sqBraces == 0 && trBraces == 0)\n                complete = true;\n            break;\n\n        case '\"':\n            isInstring = true;\n            break;\n        }\n    }\n\n    string res = data.substr(begin, min(caret, dataLen) - begin);\n    int resLen = (int)res.length();\n\n    if (!res.empty() && res[resLen - 1] == ')')\n        res.erase(resLen - 1, 1);\n\n    if (!res.empty() && res[0] == '(')\n        res.erase(0, 1);\n\n    return res;\n}\n\nchar CppSyntaxParser::GetNextSymbol(const string& data, int begin, const char* skipSymbols /*= \" \\n\\r\\t()[]{}\"*/)\n{\n    int dataLen = (int)data.length();\n    for (; begin < dataLen; begin++)\n    {\n        int i = 0;\n        bool stop = true;\n        char s = data[begin];\n\n        while (skipSymbols[i] != '\\0')\n        {\n            if (skipSymbols[i] == s)\n            {\n                stop = false;\n                break;\n            }\n\n            i++;\n        }\n\n        if (stop)\n            return s;\n    }\n\n    return '\\0';\n}\n\nvector<string> CppSyntaxParser::Split(const string& data, char splitSymbol)\n{\n    vector<string> res;\n    int braces = 0, sqBraces = 0, trBraces = 0, fgBraces = 0;\n    int dataLen = (int)data.length();\n\n    int lastSplit = 0;\n    for (int i = 0; i < dataLen; i++)\n    {\n        switch (data[i])\n        {\n        case '{': fgBraces++; break;\n        case '}': fgBraces--; break;\n\n        case '(': braces++; break;\n        case ')': braces--; break;\n\n        case '<': trBraces++; break;\n        case '>': trBraces--; break;\n\n        case '[': sqBraces++; break;\n        case ']': sqBraces--; break;\n        }\n\n        if (braces == 0 && sqBraces == 0 && trBraces == 0 && fgBraces == 0 && data[i] == splitSymbol)\n        {\n            res.push_back(data.substr(lastSplit, i - lastSplit));\n            lastSplit = i + 1;\n        }\n    }\n\n    res.push_back(data.substr(lastSplit));\n\n    return res;\n}\n\nvoid CppSyntaxParser::RemoveComments(string& input)\n{\n    size_t p;\n    do\n    {\n        p = input.find(\"/*\");\n\n        if (p == string::npos)\n            break;\n\n        size_t end = input.find(\"*/\", p);\n\n        if (end == string::npos)\n            end = input.length();\n        else\n            end += 2;\n\n        input.erase(p, end - p);\n    } while (p != string::npos);\n\n    do\n    {\n        p = input.find(\"//\");\n\n        if (p == string::npos)\n            break;\n\n        size_t end = input.find('\\n', p);\n\n        if (end == string::npos)\n            end = input.length();\n        else\n            end++;\n\n        input.erase(p, end - p);\n    } while (p != string::npos);\n}\n\nCppSyntaxParser::ExpressionParser::ExpressionParser(const char* keyWord, ParserDelegate parser,\n                                                    bool isPossibleInClass /*= true*/,\n                                                    bool isPossibleInNamespace /*= true*/) :\n    keyWord(keyWord), parser(parser), isPossibleInClass(isPossibleInClass), isPossibleInNamespace(isPossibleInNamespace)\n{}\n"
  },
  {
    "path": "CodeTool/Src/CppSyntaxParser.h",
    "content": "#pragma once\n\n#include \"SyntaxTree.h\"\n\nbool EndsWith(const string& str, const string& ends);\nbool StartsWith(const string& str, const string& starts);\nstring& Trim(string& str, const string& chars = \" \");\nstring& TrimEnd(string& str, const string& chars = \" \");\nstring& TrimStart(string& str, const string& chars = \" \");\nvoid Split(const string& s, char delim, vector<string>& elems);\nvector<string> Split(const string& s, char delim);\n\nclass CppSyntaxParser\n{\npublic:\n    CppSyntaxParser();\n    ~CppSyntaxParser();\n\n    void ParseFile(SyntaxFile& file, const string& filePath, const TimeStamp& fileEditDate);\n\nprotected:\n    typedef void(CppSyntaxParser::* ParserDelegate)(SyntaxSection&, int&, SyntaxProtectionSection&);\n\n    struct ExpressionParser\n    {\n        const char* keyWord = nullptr;\n        bool           isPossibleInClass = true;\n        bool           isPossibleInNamespace = true;\n        ParserDelegate parser;\n\n        ExpressionParser() {}\n        ExpressionParser(const char* keyWord, ParserDelegate parser, bool isPossibleInClass = true,\n                         bool isPossibleInNamespace = true);\n    };\n    typedef vector<ExpressionParser*> ParsersVec;\n\nprotected:\n    string      mSourcesPath;\n    ParsersVec  mParsers;\n\n    SyntaxDefineIf* mCurrentDefine = nullptr;\n\nprotected:\n    void InitializeParsers();\n\n    void ParseSyntaxSection(SyntaxSection& section, const string& source, SyntaxFile& file,\n                            SyntaxProtectionSection protectionSection);\n\n    int GetLineNumber(const string& data, int caret);\n\n    string ReadWord(const string& data, int& caret,\n                    const char* breakSymbols = \" \\n\\r(){}.,;+-*/=@!|&*:~\\\\\",\n                    const char* skipSymbols = \" \\n\\r\",\n                    bool checkBraces = true, bool checkFgBraces = true, bool checkTrBraces = true);\n\n    string ReadBlock(const string& data, int& caret);\n\n    string ReadBraces(const string& data, int& caret);\n\n    char GetNextSymbol(const string& data, int begin, const char* skipSymbols = \" \\n\\r\\t()[]{}\");\n\n    vector<string> Split(const string& data, char splitSymbol);\n\n    void RemoveComments(string& input);\n\n    void TryParseBlock(SyntaxSection& section, const string& block, int blockBegin, int& caret,\n                       SyntaxProtectionSection& protectionSection);\n\n    bool IsFunction(const string& data);\n\n    SyntaxVariable* ParseVariable(const string& data, SyntaxProtectionSection& protectionSection, int begin, int end);\n\n    SyntaxFunction* ParseFunction(const string& data, SyntaxProtectionSection& protectionSection, int begin, int end);\n\n    void ParseNamespace(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseComment(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseMultilineComment(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParsePragma(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseInclude(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseDefine(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseUndef(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseIfdefMacros(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseIfMacros(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseEndIfMacros(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseElifMacros(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseElseMacros(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseMetaClass(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseClass(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseStruct(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseClassOrStruct(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection,\n                            bool isClass, bool isMeta, const string& templates);\n\n    void ParseTemplate(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseTypedef(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseEnum(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseUsing(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParsePublicSection(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParsePrivateSection(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseProtectedSection(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseFriend(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseAttributeCommentDef(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseAttributeShortDef(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseAttributes(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseProperties(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseProperty(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseGetter(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseSetter(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n\n    void ParseAccessor(SyntaxSection& section, int& caret, SyntaxProtectionSection& protectionSection);\n};\n"
  },
  {
    "path": "CodeTool/Src/SyntaxTree.cpp",
    "content": "#include \"SyntaxTree.h\"\n\n#include <algorithm>\n\nSyntaxFile::SyntaxFile():\n    mGlobalNamespace(new SyntaxNamespace())\n{}\n\nSyntaxFile::~SyntaxFile()\n{\n    delete mGlobalNamespace;\n}\n\nconst string& SyntaxFile::GetPath() const\n{\n    return mPath;\n}\n\nconst string& SyntaxFile::GetData() const\n{\n    return mData;\n}\n\nconst TimeStamp& SyntaxFile::GetLastEditedDate() const\n{\n    return mLastEditedDate;\n}\n\nSyntaxNamespace* SyntaxFile::GetGlobalNamespace() const\n{\n    return mGlobalNamespace;\n}\n\nvoid SyntaxFile::SaveTo(pugi::xml_node& node) const\n{\n    node.append_attribute(\"path\") = mPath.c_str();\n    auto date = node.append_child(\"date\");\n    mLastEditedDate.SaveTo(date);\n    auto globalNamespace = node.append_child(\"globalNamespace\");\n    mGlobalNamespace->SaveTo(globalNamespace);\n}\n\nvoid SyntaxFile::LoadFrom(const pugi::xml_node& node)\n{\n    mPath = node.attribute(\"path\").as_string();\n    mLastEditedDate.LoadFrom(node.child(\"date\"));\n\n    delete mGlobalNamespace;\n    mGlobalNamespace = new SyntaxNamespace();\n    mGlobalNamespace->LoadFrom(node.child(\"globalNamespace\"));\n}\n\nint ISyntaxExpression::GetBegin() const\n{\n    return mBegin;\n}\n\nint ISyntaxExpression::GetLength() const\n{\n    return mLength;\n}\n\nint ISyntaxExpression::GetEnd() const\n{\n    return mBegin + mLength;\n}\n\nint ISyntaxExpression::GetLine() const\n{\n    return mLine;\n}\n\nconst string& ISyntaxExpression::GetData() const\n{\n    return mData;\n}\n\nSyntaxFile* ISyntaxExpression::GetOwnerFile() const\n{\n    return mFile;\n}\n\nSyntaxDefineIf* ISyntaxExpression::GetDefine() const\n{\n    return mDefine;\n}\n\nSyntaxSection::SyntaxSection()\n{}\n\nSyntaxSection::~SyntaxSection()\n{\n//     for (auto x : mFunctions)\n//         delete x;\n// \n//     for (auto x : mVariables)\n//         delete x;\n// \n//     for (auto x : mEnums)\n//         delete x;\n// \n//     for (auto x : mSections)\n//         delete x;\n// \n//     for (auto x : mComments)\n//         delete x;\n// \n//     for (auto x : mTypedefs)\n//         delete x;\n// \n//     for (auto x : mUsingNamespaces)\n//         delete x;\n// \n//     for (auto x : mDefines)\n//         delete x;\n}\n\nSyntaxSection* SyntaxSection::GetParentSection() const\n{\n    return mParentSection;\n}\n\nconst string& SyntaxSection::GetName() const\n{\n    return mName;\n}\n\nconst string& SyntaxSection::GetFullName() const\n{\n    return mFullName;\n}\n\nconst SyntaxFunctionsVec& SyntaxSection::GetFunctions() const\n{\n    return mFunctions;\n}\n\nconst SyntaxVariablesVec& SyntaxSection::GetVariables() const\n{\n    return mVariables;\n}\n\nconst SyntaxSectionsVec& SyntaxSection::GetSections() const\n{\n    return mSections;\n}\n\nconst SyntaxEnumsVec& SyntaxSection::GetEnums() const\n{\n    return mEnums;\n}\n\nconst SyntaxTypedefsVec& SyntaxSection::GetTypedefs() const\n{\n    return mTypedefs;\n}\n\nconst SyntaxUsingNamespacesVec& SyntaxSection::GetUsingNamespaces() const\n{\n    return mUsingNamespaces;\n}\n\nconst SyntaxCommentsVec& SyntaxSection::GetComments() const\n{\n    return mComments;\n}\n\nSyntaxComment* SyntaxSection::FindCommentNearLine(int line) const\n{\n    SyntaxComment* synComment = nullptr;\n    for (auto comment : mComments)\n    {\n        // comment is on same line as variable\n        if (comment->GetLine() == line)\n        {\n            synComment = comment;\n            break;\n        }\n\n        // comment is on up line to variable\n        if (comment->GetLine() == line - 1)\n        {\n            // check other variable on this line\n            bool success = true;\n            for (auto v :mVariables)\n            {\n                if (v->GetLine() == comment->GetLine())\n                {\n                    success = false;\n                    break;\n                }\n            }\n\n            if (success)\n            {\n                synComment = comment;\n                break;\n            }\n        }\n    }\n\n    return synComment;\n}\n\nSyntaxSectionsVec SyntaxSection::GetAllSections() const\n{\n    SyntaxSectionsVec res = mSections;\n\n    for (auto x : mSections)\n    {\n        for (auto y : x->GetAllSections())\n            res.push_back(y);\n    }\n\n    return res;\n}\n\nSyntaxClassesVec SyntaxSection::GetAllClasses() const\n{\n    SyntaxClassesVec res;\n    \n    for (auto x : mSections)\n    {\n        if (x->IsClass())\n            res.push_back(dynamic_cast<SyntaxClass*>(x));\n    }\n\n    for (auto x : mSections)\n    {\n        for (auto y : x->GetAllClasses())\n            res.push_back(y);\n    }\n\n    return res;\n}\n\nSyntaxEnumsVec SyntaxSection::GetAllEnums() const\n{\n    SyntaxEnumsVec res = mEnums;\n\n    for (auto x : mSections)\n    {\n        for (auto y : x->GetAllEnums())\n            res.push_back(y);\n    }\n\n    return res;\n}\n\nbool SyntaxSection::IsClass() const\n{\n    return false;\n}\n\nconst SyntaxAttributesVec& SyntaxSection::GetAttributes() const\n{\n    return mAttributes;\n}\n\nvoid SyntaxSection::SaveTo(pugi::xml_node& node) const\n{\n    node.append_attribute(\"name\") = mName.c_str();\n    node.append_attribute(\"fullname\") = mFullName.c_str();\n\n    pugi::xml_node sectionsNode = node.append_child(\"sections\");\n    for (auto x : mSections) {\n        auto section = sectionsNode.append_child(\"section\");\n        x->SaveTo(section);\n    }\n\n    pugi::xml_node typedefsNode = node.append_child(\"typedefs\");\n    for (auto x : mTypedefs) {\n        auto td = typedefsNode.append_child(\"typedef\");\n        x->SaveTo(td);\n    }\n\n    pugi::xml_node usingsNode = node.append_child(\"usings\");\n    for (auto x : mUsingNamespaces) {\n        auto td = usingsNode.append_child(\"typedef\");\n        x->SaveTo(td);\n    }\n}\n\nvoid SyntaxSection::LoadFrom(const pugi::xml_node& node)\n{\n    mName = node.attribute(\"name\").as_string();\n    mFullName = node.attribute(\"fullname\").as_string();\n\n    pugi::xml_node sectionsNode = node.child(\"sections\");\n    for (auto node:sectionsNode)\n    {\n        if (node.type() != pugi::node_element)\n            continue;\n\n        SyntaxSection* newSection;\n        if (node.attribute(\"isClass\"))\n            newSection = new SyntaxClass();\n        else\n            newSection = new SyntaxNamespace();\n\n        newSection->LoadFrom(node);\n        newSection->mParentSection = this;\n        mSections.push_back(newSection);\n    }\n\n    pugi::xml_node typedefsNode = node.child(\"typedefs\");\n    for (auto node:typedefsNode)\n    {\n        if (node.type() != pugi::node_element)\n            continue;\n\n        SyntaxTypedef* newTypedef = new SyntaxTypedef();\n        newTypedef->LoadFrom(node);\n        mTypedefs.push_back(newTypedef);\n    }\n\n    pugi::xml_node usingsNode = node.child(\"usings\");\n    for (auto node:usingsNode)\n    {\n        if (node.type() != pugi::node_element)\n            continue;\n\n        SyntaxUsingNamespace* newUsing = new SyntaxUsingNamespace();\n        newUsing->LoadFrom(node);\n        mUsingNamespaces.push_back(newUsing);\n    }\n}\n\nSyntaxNamespace::SyntaxNamespace()\n{}\n\nconst SyntaxFunctionsVec& SyntaxClass::GetFunctions() const\n{\n    if (mSourceClass)\n        return mSourceClass->GetFunctions();\n\n    return SyntaxSection::GetFunctions();\n}\n\nconst SyntaxVariablesVec& SyntaxClass::GetVariables() const\n{\n    if (mSourceClass)\n        return mSourceClass->GetVariables();\n\n    return SyntaxSection::GetVariables();\n}\n\nconst SyntaxSectionsVec& SyntaxClass::GetSections() const\n{\n    if (mSourceClass)\n        return mSourceClass->GetSections();\n\n    return SyntaxSection::GetSections();\n}\n\nconst SyntaxEnumsVec& SyntaxClass::GetEnums() const\n{\n    if (mSourceClass)\n        return mSourceClass->GetEnums();\n\n    return SyntaxSection::GetEnums();\n}\n\nconst SyntaxTypedefsVec& SyntaxClass::GetTypedefs() const\n{\n    if (mSourceClass)\n        return mSourceClass->GetTypedefs();\n\n    return SyntaxSection::GetTypedefs();\n}\n\nconst SyntaxUsingNamespacesVec& SyntaxClass::GetUsingNamespaces() const\n{\n    if (mSourceClass)\n        return mSourceClass->GetUsingNamespaces();\n\n    return SyntaxSection::GetUsingNamespaces();\n}\n\nSyntaxSectionsVec SyntaxClass::GetAllSections() const\n{\n    if (mSourceClass)\n        return mSourceClass->GetAllSections();\n\n    return SyntaxSection::GetAllSections();\n}\n\nSyntaxClassesVec SyntaxClass::GetAllClasses() const\n{\n    if (mSourceClass)\n        return mSourceClass->GetAllClasses();\n\n    return SyntaxSection::GetAllClasses();\n}\n\nbool SyntaxClass::IsClass() const\n{\n    return true;\n}\n\nconst SyntaxClassInheritancsVec& SyntaxClass::GetBaseClasses() const\n{\n    return mBaseClasses;\n}\n\nbool SyntaxClass::IsTemplate() const\n{\n    if (!mTemplateParameters.empty())\n        return true;\n\n    if (mParentSection)\n    {\n        SyntaxClass* cls = dynamic_cast<SyntaxClass*>(mParentSection);\n        return cls && cls->IsTemplate();\n    }\n\n    return false;\n}\n\nbool SyntaxClass::IsMetaClass() const\n{\n    return mIsMeta;\n}\n\nconst string& SyntaxClass::GetTemplateParameters() const\n{\n    return mTemplateParameters;\n}\n\nSyntaxProtectionSection SyntaxClass::GetClassSection() const\n{\n    return mClassSection;\n}\n\nconst string& SyntaxClass::GetAttributeCommentDef() const\n{\n    return mAttributeCommentDef;\n}\n\nconst string& SyntaxClass::GetAttributeShortDef() const\n{\n    return mAttributeShortDef;\n}\n\nconst SyntaxAttributesVec& SyntaxClass::GetAttributes() const\n{\n    if (mSourceClass)\n        return mSourceClass->GetAttributes();\n\n    return SyntaxSection::GetAttributes();\n}\n\nvoid SyntaxClass::SaveTo(pugi::xml_node& node) const\n{\n    SyntaxSection::SaveTo(node);\n\n    node.append_attribute(\"isClass\") = true;\n    node.append_attribute(\"isMeta\") = mIsMeta;\n    node.append_attribute(\"templates\") = mTemplateParameters.c_str();\n    node.append_attribute(\"protection\") = (int)mClassSection;\n    node.append_attribute(\"attributeCommentDef\") = mAttributeCommentDef.c_str();\n    node.append_attribute(\"attributeShortDef\") = mAttributeShortDef.c_str();\n\n    pugi::xml_node baseClassesNode = node.append_child(\"baseClasses\");\n    for (auto& x : mBaseClasses) {\n        auto nc = baseClassesNode.append_child(\"class\");\n        x.SaveTo(nc);\n    }\n}\n\nvoid SyntaxClass::LoadFrom(const pugi::xml_node& node)\n{\n    SyntaxSection::LoadFrom(node);\n\n    mIsMeta = node.attribute(\"isMeta\").as_bool();\n    mTemplateParameters = node.attribute(\"templates\").as_string();\n    mClassSection = (SyntaxProtectionSection)node.attribute(\"protection\").as_int();\n    mAttributeCommentDef = node.attribute(\"attributeCommentDef\").as_string();\n    mAttributeShortDef = node.attribute(\"attributeShortDef\").as_string();\n\n    pugi::xml_node baseClassesNode = node.child(\"baseClasses\");\n    for (auto node : baseClassesNode)\n    {\n        SyntaxClassInheritance x;\n        x.LoadFrom(node);\n        mBaseClasses.push_back(x);\n    }\n}\n\nconst string& SyntaxType::GetName() const\n{\n    return mName;\n}\n\nbool SyntaxType::IsConstant() const\n{\n    return mIsContant;\n}\n\nbool SyntaxType::IsReference() const\n{\n    return mIsReference;\n}\n\nbool SyntaxType::IsPointer() const\n{\n    return mIsPointer;\n}\n\nconst SyntaxType& SyntaxVariable::GetVariableType() const\n{\n    return mType;\n}\n\nconst string& SyntaxVariable::GetName() const\n{\n    return mName;\n}\n\nconst std::string& SyntaxVariable::GetDefaultValue() const\n{\n    return mDefaultValue;\n}\n\nSyntaxProtectionSection SyntaxVariable::GetClassSection() const\n{\n    return mClassSection;\n}\n\nbool SyntaxVariable::IsStatic() const\n{\n    return mIsStatic;\n}\n\nSyntaxFunction::SyntaxFunction()\n{}\n\nSyntaxFunction::~SyntaxFunction()\n{\n    for (auto x : mParameters)\n        delete x;\n}\n\nconst SyntaxType& SyntaxFunction::GetReturnType() const\n{\n    return mReturnType;\n}\n\nconst string& SyntaxFunction::GetName() const\n{\n    return mName;\n}\n\nconst SyntaxVariablesVec& SyntaxFunction::GetParameters() const\n{\n    return mParameters;\n}\n\nSyntaxProtectionSection SyntaxFunction::GetClassSection() const\n{\n    return mClassSection;\n}\n\nbool SyntaxFunction::IsTemplate() const\n{\n    return !mTemplates.empty();\n}\n\nconst string& SyntaxFunction::GetTemplates() const\n{\n    return mTemplates;\n}\n\nbool SyntaxFunction::IsStatic() const\n{\n    return mIsStatic;\n}\n\nconst string& SyntaxEnum::GetName() const\n{\n    return mName;\n}\n\nconst string& SyntaxEnum::GetFullName() const\n{\n    return mFullName;\n}\n\nconst StringStringDict& SyntaxEnum::GetEntries() const\n{\n    return mEntries;\n}\n\nSyntaxProtectionSection SyntaxEnum::GetClassSection() const\n{\n    return mClassSection;\n}\n\nSyntaxSection* SyntaxEnum::GetOwnerSyntaxSection() const\n{\n    return mOwnerSection;\n}\n\nSyntaxClassInheritance::SyntaxClassInheritance(const string& className, SyntaxProtectionSection type):\n    mClassName(className), mInheritanceType(type)\n{}\n\nconst string& SyntaxClassInheritance::GetClassName() const\n{\n    return mClassName;\n}\n\nSyntaxClass* SyntaxClassInheritance::GetClass()\n{\n    return mClass;\n}\n\nSyntaxProtectionSection SyntaxClassInheritance::GetInheritanceType() const\n{\n    return mInheritanceType;\n}\n\nvoid SyntaxClassInheritance::SaveTo(pugi::xml_node& node) const\n{\n    node.append_attribute(\"name\") = mClassName.c_str();\n    node.append_attribute(\"protection\") = (int)mInheritanceType;\n}\n\nvoid SyntaxClassInheritance::LoadFrom(const pugi::xml_node& node)\n{\n    mClassName = node.attribute(\"name\").as_string();\n    mInheritanceType = (SyntaxProtectionSection)node.attribute(\"protection\").as_int();\n}\n\nbool SyntaxClassInheritance::operator==(const SyntaxClassInheritance& other) const\n{\n    return mInheritanceType == other.mInheritanceType && mClassName == other.mClassName;\n}\n\nconst string& SyntaxUsingNamespace::GetUsingNamespaceName() const\n{\n    return mUsingNamespaceName;\n}\n\nSyntaxSection* SyntaxUsingNamespace::GetUsingNamespace() const\n{\n    return mUsingNamespace;\n}\n\nvoid SyntaxUsingNamespace::SaveTo(pugi::xml_node& node) const\n{\n    node.append_attribute(\"name\") = mUsingNamespaceName.c_str();\n}\n\nvoid SyntaxUsingNamespace::LoadFrom(const pugi::xml_node& node)\n{\n    mUsingNamespaceName = node.attribute(\"name\").as_string();\n}\n\nconst string& SyntaxTypedef::GetWhatName() const\n{\n    return mWhatName;\n}\n\nconst string& SyntaxTypedef::GetNewDefName() const\n{\n    return mNewDefName;\n}\n\nSyntaxSection* SyntaxTypedef::GetWhat() const\n{\n    return mWhatSection;\n}\n\nSyntaxSection* SyntaxTypedef::GetNewDef() const\n{\n    return mWhatSection;\n}\n\nvoid SyntaxTypedef::SaveTo(pugi::xml_node& node) const\n{\n    node.append_attribute(\"what\") = mWhatName.c_str();\n    node.append_attribute(\"newDef\") = mNewDefName.c_str();\n}\n\nvoid SyntaxTypedef::LoadFrom(const pugi::xml_node& node)\n{\n    mWhatName = node.attribute(\"what\").as_string();\n    mNewDefName = node.attribute(\"newDef\").as_string();\n}\n\nTimeStamp::TimeStamp(int seconds /*= 0*/, int minutes /*= 0*/, int hours /*= 0*/, int days /*= 0*/, int months /*= 0*/,\n                     int years /*= 0*/):\n    second(seconds), minute(minutes), hour(hours), day(days), month(months), year(years)\n{}\n\nvoid TimeStamp::SaveTo(pugi::xml_node& node) const\n{\n    node.append_attribute(\"year\") = year;\n    node.append_attribute(\"month\") = month;\n    node.append_attribute(\"day\") = day;\n    node.append_attribute(\"hour\") = hour;\n    node.append_attribute(\"minute\") = minute;\n    node.append_attribute(\"second\") = second;\n}\n\nvoid TimeStamp::LoadFrom(const pugi::xml_node& node)\n{\n    year = node.attribute(\"year\").as_int();\n    month = node.attribute(\"month\").as_int();\n    day = node.attribute(\"day\").as_int();\n    hour = node.attribute(\"hour\").as_int();\n    minute = node.attribute(\"minute\").as_int();\n    second = node.attribute(\"second\").as_int();\n}\n\nbool TimeStamp::operator!=(const TimeStamp& wt) const\n{\n    return !(*this == wt);\n}\n\nbool TimeStamp::operator==(const TimeStamp& wt) const\n{\n    return second == wt.second && minute == wt.minute && hour == wt.hour && day == wt.day && month == wt.month &&\n        year == wt.year;\n}\n\nconst vector<string>& SyntaxAttributes::GetAttributesList() const\n{\n    return mAttributesList;\n}\n\nconst std::string& SyntaxDefineIf::GetDefinition() const\n{\n    return mDefintion;\n}\n"
  },
  {
    "path": "CodeTool/Src/SyntaxTree.h",
    "content": "#pragma once\n\n#include <string>\n#include <vector>\n#include <map>\n#include \"pugixml/pugixml.hpp\"\n\n#undef GetClassName\n\nusing namespace std;\n\nclass SyntaxAttributes;\nclass SyntaxClass;\nclass SyntaxClassInheritance;\nclass SyntaxComment;\nclass SyntaxEnum;\nclass SyntaxFile;\nclass SyntaxFunction;\nclass SyntaxNamespace;\nclass SyntaxSection;\nclass SyntaxType;\nclass SyntaxTypedef;\nclass SyntaxUsingNamespace;\nclass SyntaxVariable;\nclass SyntaxDefineIf;\n\ntypedef map<string, string>           StringStringDict;\ntypedef vector<SyntaxAttributes*>     SyntaxAttributesVec;\ntypedef vector<SyntaxClass*>          SyntaxClassesVec;\ntypedef vector<SyntaxComment*>        SyntaxCommentsVec;\ntypedef vector<SyntaxEnum*>           SyntaxEnumsVec;\ntypedef vector<SyntaxFile*>           SyntaxFilesVec;\ntypedef vector<SyntaxFunction*>       SyntaxFunctionsVec;\ntypedef vector<SyntaxSection*>        SyntaxSectionsVec;\ntypedef vector<SyntaxTypedef*>        SyntaxTypedefsVec;\ntypedef vector<SyntaxUsingNamespace*> SyntaxUsingNamespacesVec;\ntypedef vector<SyntaxVariable*>       SyntaxVariablesVec;\ntypedef vector<SyntaxDefineIf*>       SyntaxDefinesVec;\ntypedef vector<string>                StringsVec;\n\nenum class SyntaxProtectionSection { Public, Private, Protected };\n\n// Date time stamp\nstruct TimeStamp\n{\n    int year, month, day, hour, minute, second; \n\n    TimeStamp(int seconds = 0, int minutes = 0, int hours = 0, int days = 0, int months = 0, int years = 0);\n\n    bool operator==(const TimeStamp& wt) const;\n    bool operator!=(const TimeStamp& wt) const;\n\n    // Saves data to xml node\n    void SaveTo(pugi::xml_node& node) const;\n\n    // Loads data from xml node\n    void LoadFrom(const pugi::xml_node& node);\n};\n\n// Abstract syntax tree file\nclass SyntaxFile\n{\npublic:\n    // Default constructor\n    SyntaxFile();\n\n    // Destructor\n    ~SyntaxFile();\n\n    // Returns file path\n    const string& GetPath() const;\n\n    // Returns file's data\n    const string& GetData() const;\n\n    // Returns file last edit date\n    const TimeStamp& GetLastEditedDate() const;\n\n    // Returns global syntax namespace in this file\n    SyntaxNamespace* GetGlobalNamespace() const;\n\n    // Saves data to xml node\n    void SaveTo(pugi::xml_node& node) const;\n\n    // Loads data from xml node\n    void LoadFrom(const pugi::xml_node& node);\n\nprotected:\n    string mPath; // File path\n    string mData; // File data\n\n    TimeStamp mLastEditedDate; // Last file edited date\n\n    SyntaxNamespace* mGlobalNamespace = nullptr; // Global syntax namespace in file\n\n    friend class CppSyntaxParser;\n    friend class CodeToolApplication;\n};\n\n// Syntax expression base\nclass ISyntaxExpression\n{\npublic:\n    // Returns start of expression in owner file data\n    int GetBegin() const;\n\n    // Returns length of expression text\n    int GetLength() const;\n\n    // Returns end of expression\n    int GetEnd() const;\n\n    // Returns line of expression\n    int GetLine() const;\n\n    // Returns expression text\n    const string& GetData() const;\n\n    // Returns pointer to owner file\n    SyntaxFile* GetOwnerFile() const;\n\n    // Returns pointer to owner define\n    SyntaxDefineIf* GetDefine() const;\n\nprotected:\n    int mBegin = 0;  // Data begin position\n    int mLength = 0; // Data length\n    int mLine = 0;   // Data line number\n\n    string mData; // Expression text\n\n    SyntaxFile* mFile = nullptr; // Owner file\n\n    SyntaxDefineIf* mDefine = nullptr; // Owner define\n\n    friend class CppSyntaxParser;\n};\n\n// Syntax single/multiline comment\nclass SyntaxComment: public ISyntaxExpression\n{\n};\n\n// Syntax using namespace ...\nclass SyntaxUsingNamespace: public ISyntaxExpression\n{\npublic:\n    // Returns using namespace name\n    const string& GetUsingNamespaceName() const;\n\n    // Returns using namespace (if found)\n    SyntaxSection* GetUsingNamespace() const;\n\n    // Saves data to xml node\n    void SaveTo(pugi::xml_node& node) const;\n\n    // Loads data from xml node\n    void LoadFrom(const pugi::xml_node& node);\n\nprotected:\n    string         mUsingNamespaceName;       // Using namespace name\n    SyntaxSection* mUsingNamespace = nullptr; // Using namespace (if found)\n\n    friend class CodeToolCache;\n    friend class CppSyntaxParser;\n};\n\n// Syntax typedef X Y;\nclass SyntaxTypedef: public ISyntaxExpression\n{\npublic:\n    // Returns what was defined (X)\n    const string& GetWhatName() const;\n\n    // Returns new defined name (Y)\n    const string& GetNewDefName() const;\n\n    // Returns what was defined (X)\n    SyntaxSection* GetWhat() const;\n\n    // Returns new defined name (Y)\n    SyntaxSection* GetNewDef() const;\n\n    // Saves data to xml node\n    void SaveTo(pugi::xml_node& node) const;\n\n    // Loads data from xml node\n    void LoadFrom(const pugi::xml_node& node);\n\nprotected:\n    string         mWhatName;              // What was used to defined name (X)\n    string         mNewDefName;            // What was new defined name (Y)\n    SyntaxSection* mWhatSection = nullptr; // What section used to define (X)\n\n    friend class CodeToolCache;\n    friend class CppSyntaxParser;\n};\n\n// Syntax names section, base for namespaces or classes\nclass SyntaxSection: public ISyntaxExpression\n{\npublic:\n    // Default constructor\n    SyntaxSection();\n\n    // Destructor\n    ~SyntaxSection();\n\n    // Returns parent section\n    virtual SyntaxSection* GetParentSection() const;\n\n    // Returns section name\n    virtual const string& GetName() const;\n\n    // Returns full section name including all parent names (something like A::B::C)\n    virtual const string& GetFullName() const;\n\n    // Returns array of functions\n    virtual const SyntaxFunctionsVec& GetFunctions() const;\n\n    // Returns array of variables\n    virtual const SyntaxVariablesVec& GetVariables() const;\n\n    // Returns nested sections\n    virtual const SyntaxSectionsVec& GetSections() const;\n\n    // Returns nested enums\n    virtual const SyntaxEnumsVec& GetEnums() const;\n\n    // Returns typedefs defined in this section\n    virtual const SyntaxTypedefsVec& GetTypedefs() const;\n\n    // Returns using namespaces in this section\n    virtual const SyntaxUsingNamespacesVec& GetUsingNamespaces() const;\n\n    // Returns comment in section\n    virtual const SyntaxCommentsVec& GetComments() const;\n\n    // Returns comment above or on this line\n    SyntaxComment* FindCommentNearLine(int line) const;\n\n    // Returns all inside sections\n    virtual SyntaxSectionsVec GetAllSections() const;\n\n    // Returns all inside classes\n    virtual SyntaxClassesVec GetAllClasses() const;\n\n    // Returns all enums\n    virtual SyntaxEnumsVec GetAllEnums() const;\n\n    // Returns is this section is class\n    virtual bool IsClass() const;\n\n    // Returns attributes definitions\n    virtual const SyntaxAttributesVec& GetAttributes() const;\n\n    // Saves data to xml node\n    virtual void SaveTo(pugi::xml_node& node) const;\n\n    // Loads data from xml node\n    virtual void LoadFrom(const pugi::xml_node& node);\n\nprotected:\n    string mName;     // Short name of section\n    string mFullName; // Full name of section with all parents names\n\n    SyntaxSection* mParentSection = nullptr; // Pointer to parent section (nullptr of section is global)\n\n    SyntaxFunctionsVec       mFunctions;       // List of functions\n    SyntaxVariablesVec       mVariables;       // List of variables\n    SyntaxSectionsVec        mSections;        // List of nested sections (classes or namespaces)\n    SyntaxEnumsVec           mEnums;           // List of enum\n    SyntaxCommentsVec        mComments;        // List of comments\n    SyntaxTypedefsVec        mTypedefs;        // List of typedefs\n    SyntaxUsingNamespacesVec mUsingNamespaces; // List of using namespaces\n    SyntaxAttributesVec      mAttributes;      // List of attributes\n    SyntaxDefinesVec         mDefines;         // List of defines\n\n    friend class CodeToolCache;\n    friend class CppSyntaxParser;\n};\n\n// Syntax namespace\nclass SyntaxNamespace: public SyntaxSection\n{\npublic:\n    SyntaxNamespace();\n\n    friend class CodeToolCache;\n    friend class CppSyntaxParser;\n};\n\n// Syntax class inheritance definition\nclass SyntaxClassInheritance: public ISyntaxExpression\n{\npublic:\n    // Default constructor\n    SyntaxClassInheritance() {}\n\n    // Constructor by class name and inheritance protection type\n    SyntaxClassInheritance(const string& className, SyntaxProtectionSection type);\n\n    // Returns class name\n    const string& GetClassName() const;\n\n    // Returns class\n    SyntaxClass* GetClass();\n\n    // Returns class inheritance protection type\n    SyntaxProtectionSection GetInheritanceType() const;\n\n    // Check equality operator\n    bool operator==(const SyntaxClassInheritance& other) const;\n\n    // Saves data to xml node\n    void SaveTo(pugi::xml_node& node) const;\n\n    // Loads data from xml node\n    void LoadFrom(const pugi::xml_node& node);\n\nprotected:\n    string                  mClassName;       // Inheritance class name\n    SyntaxClass*            mClass = nullptr; // Inheritance class (if found)\n    SyntaxProtectionSection mInheritanceType; // Inheritance protection type\n\n    friend class CodeToolCache;\n    friend class CppSyntaxParser;\n};\ntypedef vector<SyntaxClassInheritance> SyntaxClassInheritancsVec;\n\n// Syntax class or struct\nclass SyntaxClass: public SyntaxSection\n{\npublic:\n    // Returns array of functions\n    const SyntaxFunctionsVec& GetFunctions() const;\n\n    // Returns array of variables\n    const SyntaxVariablesVec& GetVariables() const;\n\n    // Returns nested sections\n    const SyntaxSectionsVec& GetSections() const;\n\n    // Returns nested enums\n    const SyntaxEnumsVec& GetEnums() const;\n\n    // Returns typedefs defined in this section\n    const SyntaxTypedefsVec& GetTypedefs() const;\n\n    // Returns using namespaces in this section\n    const SyntaxUsingNamespacesVec& GetUsingNamespaces() const;\n\n    // Returns all inside sections\n    SyntaxSectionsVec GetAllSections() const;\n\n    // Returns all inside classes\n    SyntaxClassesVec GetAllClasses() const;\n\n    // Returns is this section is class\n    bool IsClass() const;\n\n    // Returns base classes\n    const SyntaxClassInheritancsVec& GetBaseClasses() const;\n\n    // Returns is class template\n    bool IsTemplate() const;\n\n    // Returns is class meta (defined as \"meta class name { ... };\")\n    bool IsMetaClass() const;\n\n    // Returns template parameters (if exist)\n    const string& GetTemplateParameters() const;\n\n    // Returns parent class protection section\n    SyntaxProtectionSection GetClassSection() const;\n\n    // Returns comment definition for attribute (empty for not attribute classes)\n    const string& GetAttributeCommentDef() const;\n\n    // Returns short definition for attribute (empty for not attribute classes)\n    const string& GetAttributeShortDef() const;\n\n    // Returns attributes definitions\n    const SyntaxAttributesVec& GetAttributes() const;\n\n    // Saves data to xml node\n    void SaveTo(pugi::xml_node& node) const;\n\n    // Loads data from xml node\n    void LoadFrom(const pugi::xml_node& node);\n\nprotected:\n    SyntaxClassInheritancsVec mBaseClasses; // Base classe\n\n    string mTemplateParameters; // Template parameters (empty if class isn't template)\n\n    bool mIsMeta = false; // Is class meta (defined as \"meta class name { ... };\")\n    SyntaxProtectionSection mClassSection = SyntaxProtectionSection::Public; // protection section of parent class\n\n    SyntaxClass* mSourceClass = nullptr; // Source class for template specialized classes\n\n    string  mAttributeCommentDef; // Attribute comment definition\n    string  mAttributeShortDef;   // Attribute short definition\n\n    friend class CodeToolCache;\n    friend class CppSyntaxParser;\n};\n\n// Syntax attributes list\nclass SyntaxAttributes: public ISyntaxExpression\n{\npublic:\n    // Returns list of attributes\n    const vector<string>& GetAttributesList() const;\n\nprotected:\n    vector<string> mAttributesList;\n\n    friend class CodeToolCache;\n    friend class CppSyntaxParser;\n};\n\n// Syntax variable type\nclass SyntaxType: public ISyntaxExpression\n{\npublic:\n    // Returns name of type\n    const string& GetName() const;\n\n    // Returns is type is constant\n    bool IsConstant() const;\n\n    // Returns is type is reference\n    bool IsReference() const;\n\n    // Returns is type is pointer\n    bool IsPointer() const;\n\nprotected:\n    string mName;    \n\n    bool mIsContant = false;\n    bool mIsReference = false;\n    bool mIsPointer = false;\n    bool mIsMutable = false;\n\n    friend class CppSyntaxParser;\n};\n\n// Syntax variable\nclass SyntaxVariable: public ISyntaxExpression\n{\npublic:\n    // Returns type of variable\n    const SyntaxType& GetVariableType() const;\n\n    // Returns name of variable\n    const string& GetName() const;\n\n    // Returns default value\n    const string& GetDefaultValue() const;\n\n    // Returns class definition section\n    SyntaxProtectionSection GetClassSection() const;\n\n    // Returns is variable is static\n    bool IsStatic() const;\n\nprotected:\n    SyntaxType mType; // Type of variable\n\n    string mName;         // Name of variable\n    string mDefaultValue; // Default variable value\n\n    SyntaxProtectionSection mClassSection = SyntaxProtectionSection::Public; // Protection section\n\n    bool mIsStatic = false; // Is variable static\n\n    friend class CppSyntaxParser;\n};\n\n// Syntax function\nclass SyntaxFunction: public ISyntaxExpression\n{\npublic:\n    // Default constructor\n    SyntaxFunction();\n\n    // Destructor\n    ~SyntaxFunction();\n\n    // Returns function's returning type\n    const SyntaxType& GetReturnType() const;\n\n    // Returns name of function\n    const string& GetName() const;\n\n    // Returns list of function's parameters\n    const SyntaxVariablesVec& GetParameters() const;\n\n    // Returns protection section\n    SyntaxProtectionSection GetClassSection() const;\n\n    // Returns is function template\n    bool IsTemplate() const;\n\n    // Returns function templates (if have)\n    const string& GetTemplates() const;\n\n    // Returns is function static\n    bool IsStatic() const;\n\nprotected:\n    SyntaxType mReturnType; // Returning type\n\n    string mTemplates; // Function templates\n    string mName; // Name of function\n\n    SyntaxVariablesVec mParameters; // List of parameters\n\n    SyntaxProtectionSection mClassSection = SyntaxProtectionSection::Public; // Protection Section\n\n    bool mIsStatic = false;    // Is function static\n    bool mIsVirtual = false;   // Is function virtual\n    bool mIsContstant = false; // Is function constant\n\n\n    friend class CppSyntaxParser;\n};\n\n// Syntax enum\nclass SyntaxEnum: public ISyntaxExpression\n{\npublic:\n    // Returns name of enum\n    const string& GetName() const;\n\n    // Returns full name of enum with all parent spaces names\n    const string& GetFullName() const;\n\n    // Returns enum entries\n    const StringStringDict& GetEntries() const;\n\n    // Returns protection section\n    SyntaxProtectionSection GetClassSection() const;\n\n    // Returns owner syntax section\n    SyntaxSection* GetOwnerSyntaxSection() const;\n\nprotected:\n    string mName;     // Name of enum\n    string mFullName; // Full enum name with all parent spaces names\n\n    StringStringDict mEntries; // Entries of enum\n\n    SyntaxSection*          mOwnerSection = nullptr; // Owner syntax section\n    SyntaxProtectionSection mClassSection = SyntaxProtectionSection::Public;\n\n    friend class CppSyntaxParser;\n};\n\n\n// Syntax #define\nclass SyntaxDefineIf : public ISyntaxExpression\n{\npublic:\n    const string& GetDefinition() const;\n\nprotected:\n    string mDefintion; // Definition statement after #define\n\n    friend class CppSyntaxParser;\n};"
  },
  {
    "path": "CodeTool/Src/pugixml/pugiconfig.hpp",
    "content": "/*\n * pugixml parser - version 1.6\n * --------------------------------------------------------\n * Copyright (C) 2006-2015, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)\n * Report bugs and download new versions at http://pugixml.org/\n *\n * This library is distributed under the MIT License. See notice at the end\n * of this file.\n *\n * This work is based on the pugxml parser, which is:\n * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)\n */\n\n#ifndef HEADER_PUGICONFIG_HPP\n#define HEADER_PUGICONFIG_HPP\n\n// Uncomment this to enable wchar_t mode\n//#define PUGIXML_WCHAR_MODE\n\n// Uncomment this to disable XPath\n// #define PUGIXML_NO_XPATH\n\n// Uncomment this to disable STL\n// #define PUGIXML_NO_STL\n\n// Uncomment this to disable exceptions\n// #define PUGIXML_NO_EXCEPTIONS\n\n// Set this to control attributes for public classes/functions, i.e.:\n// #define PUGIXML_API __declspec(dllexport) // to export all public symbols from DLL\n// #define PUGIXML_CLASS __declspec(dllimport) // to import all classes from DLL\n// #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall\n// In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead\n\n// Tune these constants to adjust memory-related behavior\n// #define PUGIXML_MEMORY_PAGE_SIZE 32768\n// #define PUGIXML_MEMORY_OUTPUT_STACK 10240\n// #define PUGIXML_MEMORY_XPATH_PAGE_SIZE 4096\n\n// Uncomment this to switch to header-only version\n// #define PUGIXML_HEADER_ONLY\n\n// Uncomment this to enable long long support\n// #define PUGIXML_HAS_LONG_LONG\n\n#endif\n\n/*\n * Copyright (c) 2006-2015 Arseny Kapoulkine\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n"
  },
  {
    "path": "CodeTool/Src/pugixml/pugixml.cpp",
    "content": "/*\n * pugixml parser - version 1.6\n * --------------------------------------------------------\n * Copyright (C) 2006-2015, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)\n * Report bugs and download new versions at http://pugixml.org/\n *\n * This library is distributed under the MIT License. See notice at the end\n * of this file.\n *\n * This work is based on the pugxml parser, which is:\n * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)\n */\n\n#ifndef SOURCE_PUGIXML_CPP\n#define SOURCE_PUGIXML_CPP\n\n#include \"pugixml.hpp\"\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <assert.h>\n\n#ifdef PUGIXML_WCHAR_MODE\n#    include <wchar.h>\n#endif\n\n#ifndef PUGIXML_NO_XPATH\n#    include <math.h>\n#    include <float.h>\n#    ifdef PUGIXML_NO_EXCEPTIONS\n#        include <setjmp.h>\n#    endif\n#endif\n\n#ifndef PUGIXML_NO_STL\n#    include <istream>\n#    include <ostream>\n#    include <string>\n#endif\n\n// For placement new\n#include <new>\n\n#ifdef _MSC_VER\n#    pragma warning(push)\n#    pragma warning(disable: 4127) // conditional expression is constant\n#    pragma warning(disable: 4324) // structure was padded due to __declspec(align())\n#    pragma warning(disable: 4611) // interaction between '_setjmp' and C++ object destruction is non-portable\n#    pragma warning(disable: 4702) // unreachable code\n#    pragma warning(disable: 4996) // this function or variable may be unsafe\n#    pragma warning(disable: 4793) // function compiled as native: presence of '_setjmp' makes a function unmanaged\n#endif\n\n#ifdef __INTEL_COMPILER\n#    pragma warning(disable: 177) // function was declared but never referenced \n#    pragma warning(disable: 279) // controlling expression is constant\n#    pragma warning(disable: 1478 1786) // function was declared \"deprecated\"\n#    pragma warning(disable: 1684) // conversion from pointer to same-sized integral type\n#endif\n\n#if defined(__BORLANDC__) && defined(PUGIXML_HEADER_ONLY)\n#    pragma warn -8080 // symbol is declared but never used; disabling this inside push/pop bracket does not make the warning go away\n#endif\n\n#ifdef __BORLANDC__\n#    pragma option push\n#    pragma warn -8008 // condition is always false\n#    pragma warn -8066 // unreachable code\n#endif\n\n#ifdef __SNC__\n// Using diag_push/diag_pop does not disable the warnings inside templates due to a compiler bug\n#    pragma diag_suppress=178 // function was declared but never referenced\n#    pragma diag_suppress=237 // controlling expression is constant\n#endif\n\n// Inlining controls\n#if defined(_MSC_VER) && _MSC_VER >= 1300\n#    define PUGI__NO_INLINE __declspec(noinline)\n#elif defined(__GNUC__)\n#    define PUGI__NO_INLINE __attribute__((noinline))\n#else\n#    define PUGI__NO_INLINE \n#endif\n\n// Branch weight controls\n#if defined(__GNUC__)\n#    define PUGI__UNLIKELY(cond) __builtin_expect(cond, 0)\n#else\n#    define PUGI__UNLIKELY(cond) (cond)\n#endif\n\n// Simple static assertion\n#define PUGI__STATIC_ASSERT(cond) { static const char condition_failed[(cond) ? 1 : -1] = {0}; (void)condition_failed[0]; }\n\n// Digital Mars C++ bug workaround for passing char loaded from memory via stack\n#ifdef __DMC__\n#    define PUGI__DMC_VOLATILE volatile\n#else\n#    define PUGI__DMC_VOLATILE\n#endif\n\n// Borland C++ bug workaround for not defining ::memcpy depending on header include order (can't always use std::memcpy because some compilers don't have it at all)\n#if defined(__BORLANDC__) && !defined(__MEM_H_USING_LIST)\nusing std::memcpy;\nusing std::memmove;\n#endif\n\n// In some environments MSVC is a compiler but the CRT lacks certain MSVC-specific features\n#if defined(_MSC_VER) && !defined(__S3E__)\n#    define PUGI__MSVC_CRT_VERSION _MSC_VER\n#endif\n\n#ifdef PUGIXML_HEADER_ONLY\n#    define PUGI__NS_BEGIN namespace pugi { namespace impl {\n#    define PUGI__NS_END } }\n#    define PUGI__FN inline\n#    define PUGI__FN_NO_INLINE inline\n#else\n#    if defined(_MSC_VER) && _MSC_VER < 1300 // MSVC6 seems to have an amusing bug with anonymous namespaces inside namespaces\n#        define PUGI__NS_BEGIN namespace pugi { namespace impl {\n#        define PUGI__NS_END } }\n#    else\n#        define PUGI__NS_BEGIN namespace pugi { namespace impl { namespace {\n#        define PUGI__NS_END } } }\n#    endif\n#    define PUGI__FN\n#    define PUGI__FN_NO_INLINE PUGI__NO_INLINE\n#endif\n\n// uintptr_t\n#if !defined(_MSC_VER) || _MSC_VER >= 1600\n#    include <stdint.h>\n#else\n#    ifndef _UINTPTR_T_DEFINED\n// No native uintptr_t in MSVC6 and in some WinCE versions\ntypedef size_t uintptr_t;\n#define _UINTPTR_T_DEFINED\n#    endif\nPUGI__NS_BEGIN\n    typedef unsigned __int8 uint8_t;\n    typedef unsigned __int16 uint16_t;\n    typedef unsigned __int32 uint32_t;\nPUGI__NS_END\n#endif\n\n// Memory allocation\nPUGI__NS_BEGIN\n    PUGI__FN void* default_allocate(size_t size)\n    {\n        return malloc(size);\n    }\n\n    PUGI__FN void default_deallocate(void* ptr)\n    {\n        free(ptr);\n    }\n\n    template <typename T>\n    struct xml_memory_management_function_storage\n    {\n        static allocation_function allocate;\n        static deallocation_function deallocate;\n    };\n\n    // Global allocation functions are stored in class statics so that in header mode linker deduplicates them\n    // Without a template<> we'll get multiple definitions of the same static\n    template <typename T> allocation_function xml_memory_management_function_storage<T>::allocate = default_allocate;\n    template <typename T> deallocation_function xml_memory_management_function_storage<T>::deallocate = default_deallocate;\n\n    typedef xml_memory_management_function_storage<int> xml_memory;\nPUGI__NS_END\n\n// String utilities\nPUGI__NS_BEGIN\n    // Get string length\n    PUGI__FN size_t strlength(const char_t* s)\n    {\n        assert(s);\n\n    #ifdef PUGIXML_WCHAR_MODE\n        return wcslen(s);\n    #else\n        return strlen(s);\n    #endif\n    }\n\n    // Compare two strings\n    PUGI__FN bool strequal(const char_t* src, const char_t* dst)\n    {\n        assert(src && dst);\n\n    #ifdef PUGIXML_WCHAR_MODE\n        return wcscmp(src, dst) == 0;\n    #else\n        return strcmp(src, dst) == 0;\n    #endif\n    }\n\n    // Compare lhs with [rhs_begin, rhs_end)\n    PUGI__FN bool strequalrange(const char_t* lhs, const char_t* rhs, size_t count)\n    {\n        for (size_t i = 0; i < count; ++i)\n            if (lhs[i] != rhs[i])\n                return false;\n    \n        return lhs[count] == 0;\n    }\n\n    // Get length of wide string, even if CRT lacks wide character support\n    PUGI__FN size_t strlength_wide(const wchar_t* s)\n    {\n        assert(s);\n\n    #ifdef PUGIXML_WCHAR_MODE\n        return wcslen(s);\n    #else\n        const wchar_t* end = s;\n        while (*end) end++;\n        return static_cast<size_t>(end - s);\n    #endif\n    }\n\n#ifdef PUGIXML_WCHAR_MODE\n    // Convert string to wide string, assuming all symbols are ASCII\n    PUGI__FN void widen_ascii(wchar_t* dest, const char* source)\n    {\n        for (const char* i = source; *i; ++i) *dest++ = *i;\n        *dest = 0;\n    }\n#endif\nPUGI__NS_END\n\n#if !defined(PUGIXML_NO_STL) || !defined(PUGIXML_NO_XPATH)\n// auto_ptr-like buffer holder for exception recovery\nPUGI__NS_BEGIN\n    struct buffer_holder\n    {\n        void* data;\n        void (*deleter)(void*);\n\n        buffer_holder(void* data_, void (*deleter_)(void*)): data(data_), deleter(deleter_)\n        {\n        }\n\n        ~buffer_holder()\n        {\n            if (data) deleter(data);\n        }\n\n        void* release()\n        {\n            void* result = data;\n            data = 0;\n            return result;\n        }\n    };\nPUGI__NS_END\n#endif\n\nPUGI__NS_BEGIN\n    static const size_t xml_memory_page_size =\n    #ifdef PUGIXML_MEMORY_PAGE_SIZE\n        PUGIXML_MEMORY_PAGE_SIZE\n    #else\n        32768\n    #endif\n        ;\n\n    static const uintptr_t xml_memory_page_alignment = 64;\n    static const uintptr_t xml_memory_page_pointer_mask = ~(xml_memory_page_alignment - 1);\n    static const uintptr_t xml_memory_page_contents_shared_mask = 32;\n    static const uintptr_t xml_memory_page_name_allocated_mask = 16;\n    static const uintptr_t xml_memory_page_value_allocated_mask = 8;\n    static const uintptr_t xml_memory_page_type_mask = 7;\n    static const uintptr_t xml_memory_page_name_allocated_or_shared_mask = xml_memory_page_name_allocated_mask | xml_memory_page_contents_shared_mask;\n    static const uintptr_t xml_memory_page_value_allocated_or_shared_mask = xml_memory_page_value_allocated_mask | xml_memory_page_contents_shared_mask;\n\n    #define PUGI__NODETYPE(n) static_cast<xml_node_type>(((n)->header & impl::xml_memory_page_type_mask) + 1)\n\n    struct xml_allocator;\n\n    struct xml_memory_page\n    {\n        static xml_memory_page* construct(void* memory)\n        {\n            xml_memory_page* result = static_cast<xml_memory_page*>(memory);\n\n            result->allocator = 0;\n            result->prev = 0;\n            result->next = 0;\n            result->busy_size = 0;\n            result->freed_size = 0;\n\n            return result;\n        }\n\n        xml_allocator* allocator;\n\n        xml_memory_page* prev;\n        xml_memory_page* next;\n\n        size_t busy_size;\n        size_t freed_size;\n    };\n\n    struct xml_memory_string_header\n    {\n        uint16_t page_offset; // offset from page->data\n        uint16_t full_size; // 0 if string occupies whole page\n    };\n\n    struct xml_allocator\n    {\n        xml_allocator(xml_memory_page* root): _root(root), _busy_size(root->busy_size)\n        {\n        }\n\n        xml_memory_page* allocate_page(size_t data_size)\n        {\n            size_t size = sizeof(xml_memory_page) + data_size;\n\n            // allocate block with some alignment, leaving memory for worst-case padding\n            void* memory = xml_memory::allocate(size + xml_memory_page_alignment);\n            if (!memory) return 0;\n\n            // align to next page boundary (note: this guarantees at least 1 usable byte before the page)\n            char* page_memory = reinterpret_cast<char*>((reinterpret_cast<uintptr_t>(memory) + xml_memory_page_alignment) & ~(xml_memory_page_alignment - 1));\n\n            // prepare page structure\n            xml_memory_page* page = xml_memory_page::construct(page_memory);\n            assert(page);\n\n            page->allocator = _root->allocator;\n\n            // record the offset for freeing the memory block\n            assert(page_memory > memory && page_memory - static_cast<char*>(memory) <= 127);\n            page_memory[-1] = static_cast<char>(page_memory - static_cast<char*>(memory));\n\n            return page;\n        }\n\n        static void deallocate_page(xml_memory_page* page)\n        {\n            char* page_memory = reinterpret_cast<char*>(page);\n\n            xml_memory::deallocate(page_memory - page_memory[-1]);\n        }\n\n        void* allocate_memory_oob(size_t size, xml_memory_page*& out_page);\n\n        void* allocate_memory(size_t size, xml_memory_page*& out_page)\n        {\n            if (_busy_size + size > xml_memory_page_size) return allocate_memory_oob(size, out_page);\n\n            void* buf = reinterpret_cast<char*>(_root) + sizeof(xml_memory_page) + _busy_size;\n\n            _busy_size += size;\n\n            out_page = _root;\n\n            return buf;\n        }\n\n        void deallocate_memory(void* ptr, size_t size, xml_memory_page* page)\n        {\n            if (page == _root) page->busy_size = _busy_size;\n\n            assert(ptr >= reinterpret_cast<char*>(page) + sizeof(xml_memory_page) && ptr < reinterpret_cast<char*>(page) + sizeof(xml_memory_page) + page->busy_size);\n            (void)!ptr;\n\n            page->freed_size += size;\n            assert(page->freed_size <= page->busy_size);\n\n            if (page->freed_size == page->busy_size)\n            {\n                if (page->next == 0)\n                {\n                    assert(_root == page);\n\n                    // top page freed, just reset sizes\n                    page->busy_size = page->freed_size = 0;\n                    _busy_size = 0;\n                }\n                else\n                {\n                    assert(_root != page);\n                    assert(page->prev);\n\n                    // remove from the list\n                    page->prev->next = page->next;\n                    page->next->prev = page->prev;\n\n                    // deallocate\n                    deallocate_page(page);\n                }\n            }\n        }\n\n        char_t* allocate_string(size_t length)\n        {\n            static const size_t max_encoded_offset = (1 << 16) * sizeof(void*);\n\n            PUGI__STATIC_ASSERT(xml_memory_page_size <= max_encoded_offset);\n\n            // allocate memory for string and header block\n            size_t size = sizeof(xml_memory_string_header) + length * sizeof(char_t);\n            \n            // round size up to pointer alignment boundary\n            size_t full_size = (size + (sizeof(void*) - 1)) & ~(sizeof(void*) - 1);\n\n            xml_memory_page* page;\n            xml_memory_string_header* header = static_cast<xml_memory_string_header*>(allocate_memory(full_size, page));\n\n            if (!header) return 0;\n\n            // setup header\n            ptrdiff_t page_offset = reinterpret_cast<char*>(header) - reinterpret_cast<char*>(page) - sizeof(xml_memory_page);\n\n            assert(page_offset % sizeof(void*) == 0);\n            assert(page_offset >= 0 && static_cast<size_t>(page_offset) < max_encoded_offset);\n            header->page_offset = static_cast<uint16_t>(static_cast<size_t>(page_offset) / sizeof(void*));\n\n            // full_size == 0 for large strings that occupy the whole page\n            assert(full_size % sizeof(void*) == 0);\n            assert(full_size < max_encoded_offset || (page->busy_size == full_size && page_offset == 0));\n            header->full_size = static_cast<uint16_t>(full_size < max_encoded_offset ? full_size / sizeof(void*) : 0);\n\n            // round-trip through void* to avoid 'cast increases required alignment of target type' warning\n            // header is guaranteed a pointer-sized alignment, which should be enough for char_t\n            return static_cast<char_t*>(static_cast<void*>(header + 1));\n        }\n\n        void deallocate_string(char_t* string)\n        {\n            // this function casts pointers through void* to avoid 'cast increases required alignment of target type' warnings\n            // we're guaranteed the proper (pointer-sized) alignment on the input string if it was allocated via allocate_string\n\n            // get header\n            xml_memory_string_header* header = static_cast<xml_memory_string_header*>(static_cast<void*>(string)) - 1;\n            assert(header);\n\n            // deallocate\n            size_t page_offset = sizeof(xml_memory_page) + header->page_offset * sizeof(void*);\n            xml_memory_page* page = reinterpret_cast<xml_memory_page*>(static_cast<void*>(reinterpret_cast<char*>(header) - page_offset));\n\n            // if full_size == 0 then this string occupies the whole page\n            size_t full_size = header->full_size == 0 ? page->busy_size : header->full_size * sizeof(void*);\n\n            deallocate_memory(header, full_size, page);\n        }\n\n        xml_memory_page* _root;\n        size_t _busy_size;\n    };\n\n    PUGI__FN_NO_INLINE void* xml_allocator::allocate_memory_oob(size_t size, xml_memory_page*& out_page)\n    {\n        const size_t large_allocation_threshold = xml_memory_page_size / 4;\n\n        xml_memory_page* page = allocate_page(size <= large_allocation_threshold ? xml_memory_page_size : size);\n        out_page = page;\n\n        if (!page) return 0;\n\n        if (size <= large_allocation_threshold)\n        {\n            _root->busy_size = _busy_size;\n\n            // insert page at the end of linked list\n            page->prev = _root;\n            _root->next = page;\n            _root = page;\n\n            _busy_size = size;\n        }\n        else\n        {\n            // insert page before the end of linked list, so that it is deleted as soon as possible\n            // the last page is not deleted even if it's empty (see deallocate_memory)\n            assert(_root->prev);\n\n            page->prev = _root->prev;\n            page->next = _root;\n\n            _root->prev->next = page;\n            _root->prev = page;\n        }\n\n        // allocate inside page\n        page->busy_size = size;\n\n        return reinterpret_cast<char*>(page) + sizeof(xml_memory_page);\n    }\nPUGI__NS_END\n\nnamespace pugi\n{\n    /// A 'name=value' XML attribute structure.\n    struct xml_attribute_struct\n    {\n        /// Default ctor\n        xml_attribute_struct(impl::xml_memory_page* page): header(reinterpret_cast<uintptr_t>(page)), name(0), value(0), prev_attribute_c(0), next_attribute(0)\n        {\n        }\n\n        uintptr_t header;\n\n        char_t* name;    ///< Pointer to attribute name.\n        char_t*    value;    ///< Pointer to attribute value.\n\n        xml_attribute_struct* prev_attribute_c;    ///< Previous attribute (cyclic list)\n        xml_attribute_struct* next_attribute;    ///< Next attribute\n    };\n\n    /// An XML document tree node.\n    struct xml_node_struct\n    {\n        /// Default ctor\n        /// \\param type - node type\n        xml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(reinterpret_cast<uintptr_t>(page) | (type - 1)), parent(0), name(0), value(0), first_child(0), prev_sibling_c(0), next_sibling(0), first_attribute(0)\n        {\n        }\n\n        uintptr_t header;\n\n        xml_node_struct*        parent;                    ///< Pointer to parent\n\n        char_t*                    name;                    ///< Pointer to element name.\n        char_t*                    value;                    ///< Pointer to any associated string data.\n\n        xml_node_struct*        first_child;            ///< First child\n        \n        xml_node_struct*        prev_sibling_c;            ///< Left brother (cyclic list)\n        xml_node_struct*        next_sibling;            ///< Right brother\n        \n        xml_attribute_struct*    first_attribute;        ///< First attribute\n    };\n}\n\nPUGI__NS_BEGIN\n    struct xml_extra_buffer\n    {\n        char_t* buffer;\n        xml_extra_buffer* next;\n    };\n\n    struct xml_document_struct: public xml_node_struct, public xml_allocator\n    {\n        xml_document_struct(xml_memory_page* page): xml_node_struct(page, node_document), xml_allocator(page), buffer(0), extra_buffers(0)\n        {\n        }\n\n        const char_t* buffer;\n\n        xml_extra_buffer* extra_buffers;\n    };\n\n    inline xml_allocator& get_allocator(const xml_node_struct* node)\n    {\n        assert(node);\n\n        return *reinterpret_cast<xml_memory_page*>(node->header & xml_memory_page_pointer_mask)->allocator;\n    }\n\n    template <typename Object> inline xml_document_struct& get_document(const Object* object)\n    {\n        assert(object);\n\n        return *static_cast<xml_document_struct*>(reinterpret_cast<xml_memory_page*>(object->header & xml_memory_page_pointer_mask)->allocator);\n    }\nPUGI__NS_END\n\n// Low-level DOM operations\nPUGI__NS_BEGIN\n    inline xml_attribute_struct* allocate_attribute(xml_allocator& alloc)\n    {\n        xml_memory_page* page;\n        void* memory = alloc.allocate_memory(sizeof(xml_attribute_struct), page);\n\n        return new (memory) xml_attribute_struct(page);\n    }\n\n    inline xml_node_struct* allocate_node(xml_allocator& alloc, xml_node_type type)\n    {\n        xml_memory_page* page;\n        void* memory = alloc.allocate_memory(sizeof(xml_node_struct), page);\n\n        return new (memory) xml_node_struct(page, type);\n    }\n\n    inline void destroy_attribute(xml_attribute_struct* a, xml_allocator& alloc)\n    {\n        uintptr_t header = a->header;\n\n        if (header & impl::xml_memory_page_name_allocated_mask) alloc.deallocate_string(a->name);\n        if (header & impl::xml_memory_page_value_allocated_mask) alloc.deallocate_string(a->value);\n\n        alloc.deallocate_memory(a, sizeof(xml_attribute_struct), reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask));\n    }\n\n    inline void destroy_node(xml_node_struct* n, xml_allocator& alloc)\n    {\n        uintptr_t header = n->header;\n\n        if (header & impl::xml_memory_page_name_allocated_mask) alloc.deallocate_string(n->name);\n        if (header & impl::xml_memory_page_value_allocated_mask) alloc.deallocate_string(n->value);\n\n        for (xml_attribute_struct* attr = n->first_attribute; attr; )\n        {\n            xml_attribute_struct* next = attr->next_attribute;\n\n            destroy_attribute(attr, alloc);\n\n            attr = next;\n        }\n\n        for (xml_node_struct* child = n->first_child; child; )\n        {\n            xml_node_struct* next = child->next_sibling;\n\n            destroy_node(child, alloc);\n\n            child = next;\n        }\n\n        alloc.deallocate_memory(n, sizeof(xml_node_struct), reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask));\n    }\n\n    inline void append_node(xml_node_struct* child, xml_node_struct* node)\n    {\n        child->parent = node;\n\n        xml_node_struct* head = node->first_child;\n\n        if (head)\n        {\n            xml_node_struct* tail = head->prev_sibling_c;\n\n            tail->next_sibling = child;\n            child->prev_sibling_c = tail;\n            head->prev_sibling_c = child;\n        }\n        else\n        {\n            node->first_child = child;\n            child->prev_sibling_c = child;\n        }\n    }\n\n    inline void prepend_node(xml_node_struct* child, xml_node_struct* node)\n    {\n        child->parent = node;\n\n        xml_node_struct* head = node->first_child;\n\n        if (head)\n        {\n            child->prev_sibling_c = head->prev_sibling_c;\n            head->prev_sibling_c = child;\n        }\n        else\n            child->prev_sibling_c = child;\n\n        child->next_sibling = head;\n        node->first_child = child;\n    }\n\n    inline void insert_node_after(xml_node_struct* child, xml_node_struct* node)\n    {\n        xml_node_struct* parent = node->parent;\n\n        child->parent = parent;\n\n        if (node->next_sibling)\n            node->next_sibling->prev_sibling_c = child;\n        else\n            parent->first_child->prev_sibling_c = child;\n\n        child->next_sibling = node->next_sibling;\n        child->prev_sibling_c = node;\n\n        node->next_sibling = child;\n    }\n\n    inline void insert_node_before(xml_node_struct* child, xml_node_struct* node)\n    {\n        xml_node_struct* parent = node->parent;\n\n        child->parent = parent;\n\n        if (node->prev_sibling_c->next_sibling)\n            node->prev_sibling_c->next_sibling = child;\n        else\n            parent->first_child = child;\n\n        child->prev_sibling_c = node->prev_sibling_c;\n        child->next_sibling = node;\n\n        node->prev_sibling_c = child;\n    }\n\n    inline void remove_node(xml_node_struct* node)\n    {\n        xml_node_struct* parent = node->parent;\n\n        if (node->next_sibling)\n            node->next_sibling->prev_sibling_c = node->prev_sibling_c;\n        else\n            parent->first_child->prev_sibling_c = node->prev_sibling_c;\n\n        if (node->prev_sibling_c->next_sibling)\n            node->prev_sibling_c->next_sibling = node->next_sibling;\n        else\n            parent->first_child = node->next_sibling;\n\n        node->parent = 0;\n        node->prev_sibling_c = 0;\n        node->next_sibling = 0;\n    }\n\n    inline void append_attribute(xml_attribute_struct* attr, xml_node_struct* node)\n    {\n        xml_attribute_struct* head = node->first_attribute;\n\n        if (head)\n        {\n            xml_attribute_struct* tail = head->prev_attribute_c;\n\n            tail->next_attribute = attr;\n            attr->prev_attribute_c = tail;\n            head->prev_attribute_c = attr;\n        }\n        else\n        {\n            node->first_attribute = attr;\n            attr->prev_attribute_c = attr;\n        }\n    }\n\n    inline void prepend_attribute(xml_attribute_struct* attr, xml_node_struct* node)\n    {\n        xml_attribute_struct* head = node->first_attribute;\n\n        if (head)\n        {\n            attr->prev_attribute_c = head->prev_attribute_c;\n            head->prev_attribute_c = attr;\n        }\n        else\n            attr->prev_attribute_c = attr;\n\n        attr->next_attribute = head;\n        node->first_attribute = attr;\n    }\n\n    inline void insert_attribute_after(xml_attribute_struct* attr, xml_attribute_struct* place, xml_node_struct* node)\n    {\n        if (place->next_attribute)\n            place->next_attribute->prev_attribute_c = attr;\n        else\n            node->first_attribute->prev_attribute_c = attr;\n\n        attr->next_attribute = place->next_attribute;\n        attr->prev_attribute_c = place;\n        place->next_attribute = attr;\n    }\n\n    inline void insert_attribute_before(xml_attribute_struct* attr, xml_attribute_struct* place, xml_node_struct* node)\n    {\n        if (place->prev_attribute_c->next_attribute)\n            place->prev_attribute_c->next_attribute = attr;\n        else\n            node->first_attribute = attr;\n\n        attr->prev_attribute_c = place->prev_attribute_c;\n        attr->next_attribute = place;\n        place->prev_attribute_c = attr;\n    }\n\n    inline void remove_attribute(xml_attribute_struct* attr, xml_node_struct* node)\n    {\n        if (attr->next_attribute)\n            attr->next_attribute->prev_attribute_c = attr->prev_attribute_c;\n        else\n            node->first_attribute->prev_attribute_c = attr->prev_attribute_c;\n\n        if (attr->prev_attribute_c->next_attribute)\n            attr->prev_attribute_c->next_attribute = attr->next_attribute;\n        else\n            node->first_attribute = attr->next_attribute;\n\n        attr->prev_attribute_c = 0;\n        attr->next_attribute = 0;\n    }\n\n    PUGI__FN_NO_INLINE xml_node_struct* append_new_node(xml_node_struct* node, xml_allocator& alloc, xml_node_type type = node_element)\n    {\n        xml_node_struct* child = allocate_node(alloc, type);\n        if (!child) return 0;\n\n        append_node(child, node);\n\n        return child;\n    }\n\n    PUGI__FN_NO_INLINE xml_attribute_struct* append_new_attribute(xml_node_struct* node, xml_allocator& alloc)\n    {\n        xml_attribute_struct* attr = allocate_attribute(alloc);\n        if (!attr) return 0;\n\n        append_attribute(attr, node);\n\n        return attr;\n    }\nPUGI__NS_END\n\n// Helper classes for code generation\nPUGI__NS_BEGIN\n    struct opt_false\n    {\n        enum { value = 0 };\n    };\n\n    struct opt_true\n    {\n        enum { value = 1 };\n    };\nPUGI__NS_END\n\n// Unicode utilities\nPUGI__NS_BEGIN\n    inline uint16_t endian_swap(uint16_t value)\n    {\n        return static_cast<uint16_t>(((value & 0xff) << 8) | (value >> 8));\n    }\n\n    inline uint32_t endian_swap(uint32_t value)\n    {\n        return ((value & 0xff) << 24) | ((value & 0xff00) << 8) | ((value & 0xff0000) >> 8) | (value >> 24);\n    }\n\n    struct utf8_counter\n    {\n        typedef size_t value_type;\n\n        static value_type low(value_type result, uint32_t ch)\n        {\n            // U+0000..U+007F\n            if (ch < 0x80) return result + 1;\n            // U+0080..U+07FF\n            else if (ch < 0x800) return result + 2;\n            // U+0800..U+FFFF\n            else return result + 3;\n        }\n\n        static value_type high(value_type result, uint32_t)\n        {\n            // U+10000..U+10FFFF\n            return result + 4;\n        }\n    };\n\n    struct utf8_writer\n    {\n        typedef uint8_t* value_type;\n\n        static value_type low(value_type result, uint32_t ch)\n        {\n            // U+0000..U+007F\n            if (ch < 0x80)\n            {\n                *result = static_cast<uint8_t>(ch);\n                return result + 1;\n            }\n            // U+0080..U+07FF\n            else if (ch < 0x800)\n            {\n                result[0] = static_cast<uint8_t>(0xC0 | (ch >> 6));\n                result[1] = static_cast<uint8_t>(0x80 | (ch & 0x3F));\n                return result + 2;\n            }\n            // U+0800..U+FFFF\n            else\n            {\n                result[0] = static_cast<uint8_t>(0xE0 | (ch >> 12));\n                result[1] = static_cast<uint8_t>(0x80 | ((ch >> 6) & 0x3F));\n                result[2] = static_cast<uint8_t>(0x80 | (ch & 0x3F));\n                return result + 3;\n            }\n        }\n\n        static value_type high(value_type result, uint32_t ch)\n        {\n            // U+10000..U+10FFFF\n            result[0] = static_cast<uint8_t>(0xF0 | (ch >> 18));\n            result[1] = static_cast<uint8_t>(0x80 | ((ch >> 12) & 0x3F));\n            result[2] = static_cast<uint8_t>(0x80 | ((ch >> 6) & 0x3F));\n            result[3] = static_cast<uint8_t>(0x80 | (ch & 0x3F));\n            return result + 4;\n        }\n\n        static value_type any(value_type result, uint32_t ch)\n        {\n            return (ch < 0x10000) ? low(result, ch) : high(result, ch);\n        }\n    };\n\n    struct utf16_counter\n    {\n        typedef size_t value_type;\n\n        static value_type low(value_type result, uint32_t)\n        {\n            return result + 1;\n        }\n\n        static value_type high(value_type result, uint32_t)\n        {\n            return result + 2;\n        }\n    };\n\n    struct utf16_writer\n    {\n        typedef uint16_t* value_type;\n\n        static value_type low(value_type result, uint32_t ch)\n        {\n            *result = static_cast<uint16_t>(ch);\n\n            return result + 1;\n        }\n\n        static value_type high(value_type result, uint32_t ch)\n        {\n            uint32_t msh = static_cast<uint32_t>(ch - 0x10000) >> 10;\n            uint32_t lsh = static_cast<uint32_t>(ch - 0x10000) & 0x3ff;\n\n            result[0] = static_cast<uint16_t>(0xD800 + msh);\n            result[1] = static_cast<uint16_t>(0xDC00 + lsh);\n\n            return result + 2;\n        }\n\n        static value_type any(value_type result, uint32_t ch)\n        {\n            return (ch < 0x10000) ? low(result, ch) : high(result, ch);\n        }\n    };\n\n    struct utf32_counter\n    {\n        typedef size_t value_type;\n\n        static value_type low(value_type result, uint32_t)\n        {\n            return result + 1;\n        }\n\n        static value_type high(value_type result, uint32_t)\n        {\n            return result + 1;\n        }\n    };\n\n    struct utf32_writer\n    {\n        typedef uint32_t* value_type;\n\n        static value_type low(value_type result, uint32_t ch)\n        {\n            *result = ch;\n\n            return result + 1;\n        }\n\n        static value_type high(value_type result, uint32_t ch)\n        {\n            *result = ch;\n\n            return result + 1;\n        }\n\n        static value_type any(value_type result, uint32_t ch)\n        {\n            *result = ch;\n\n            return result + 1;\n        }\n    };\n\n    struct latin1_writer\n    {\n        typedef uint8_t* value_type;\n\n        static value_type low(value_type result, uint32_t ch)\n        {\n            *result = static_cast<uint8_t>(ch > 255 ? '?' : ch);\n\n            return result + 1;\n        }\n\n        static value_type high(value_type result, uint32_t ch)\n        {\n            (void)ch;\n\n            *result = '?';\n\n            return result + 1;\n        }\n    };\n\n    template <size_t size> struct wchar_selector;\n\n    template <> struct wchar_selector<2>\n    {\n        typedef uint16_t type;\n        typedef utf16_counter counter;\n        typedef utf16_writer writer;\n    };\n\n    template <> struct wchar_selector<4>\n    {\n        typedef uint32_t type;\n        typedef utf32_counter counter;\n        typedef utf32_writer writer;\n    };\n\n    typedef wchar_selector<sizeof(wchar_t)>::counter wchar_counter;\n    typedef wchar_selector<sizeof(wchar_t)>::writer wchar_writer;\n\n    template <typename Traits, typename opt_swap = opt_false> struct utf_decoder\n    {\n        static inline typename Traits::value_type decode_utf8_block(const uint8_t* data, size_t size, typename Traits::value_type result)\n        {\n            const uint8_t utf8_byte_mask = 0x3f;\n\n            while (size)\n            {\n                uint8_t lead = *data;\n\n                // 0xxxxxxx -> U+0000..U+007F\n                if (lead < 0x80)\n                {\n                    result = Traits::low(result, lead);\n                    data += 1;\n                    size -= 1;\n\n                    // process aligned single-byte (ascii) blocks\n                    if ((reinterpret_cast<uintptr_t>(data) & 3) == 0)\n                    {\n                        // round-trip through void* to silence 'cast increases required alignment of target type' warnings\n                        while (size >= 4 && (*static_cast<const uint32_t*>(static_cast<const void*>(data)) & 0x80808080) == 0)\n                        {\n                            result = Traits::low(result, data[0]);\n                            result = Traits::low(result, data[1]);\n                            result = Traits::low(result, data[2]);\n                            result = Traits::low(result, data[3]);\n                            data += 4;\n                            size -= 4;\n                        }\n                    }\n                }\n                // 110xxxxx -> U+0080..U+07FF\n                else if (static_cast<unsigned int>(lead - 0xC0) < 0x20 && size >= 2 && (data[1] & 0xc0) == 0x80)\n                {\n                    result = Traits::low(result, ((lead & ~0xC0) << 6) | (data[1] & utf8_byte_mask));\n                    data += 2;\n                    size -= 2;\n                }\n                // 1110xxxx -> U+0800-U+FFFF\n                else if (static_cast<unsigned int>(lead - 0xE0) < 0x10 && size >= 3 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80)\n                {\n                    result = Traits::low(result, ((lead & ~0xE0) << 12) | ((data[1] & utf8_byte_mask) << 6) | (data[2] & utf8_byte_mask));\n                    data += 3;\n                    size -= 3;\n                }\n                // 11110xxx -> U+10000..U+10FFFF\n                else if (static_cast<unsigned int>(lead - 0xF0) < 0x08 && size >= 4 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80 && (data[3] & 0xc0) == 0x80)\n                {\n                    result = Traits::high(result, ((lead & ~0xF0) << 18) | ((data[1] & utf8_byte_mask) << 12) | ((data[2] & utf8_byte_mask) << 6) | (data[3] & utf8_byte_mask));\n                    data += 4;\n                    size -= 4;\n                }\n                // 10xxxxxx or 11111xxx -> invalid\n                else\n                {\n                    data += 1;\n                    size -= 1;\n                }\n            }\n\n            return result;\n        }\n\n        static inline typename Traits::value_type decode_utf16_block(const uint16_t* data, size_t size, typename Traits::value_type result)\n        {\n            const uint16_t* end = data + size;\n\n            while (data < end)\n            {\n                unsigned int lead = opt_swap::value ? endian_swap(*data) : *data;\n\n                // U+0000..U+D7FF\n                if (lead < 0xD800)\n                {\n                    result = Traits::low(result, lead);\n                    data += 1;\n                }\n                // U+E000..U+FFFF\n                else if (static_cast<unsigned int>(lead - 0xE000) < 0x2000)\n                {\n                    result = Traits::low(result, lead);\n                    data += 1;\n                }\n                // surrogate pair lead\n                else if (static_cast<unsigned int>(lead - 0xD800) < 0x400 && data + 1 < end)\n                {\n                    uint16_t next = opt_swap::value ? endian_swap(data[1]) : data[1];\n\n                    if (static_cast<unsigned int>(next - 0xDC00) < 0x400)\n                    {\n                        result = Traits::high(result, 0x10000 + ((lead & 0x3ff) << 10) + (next & 0x3ff));\n                        data += 2;\n                    }\n                    else\n                    {\n                        data += 1;\n                    }\n                }\n                else\n                {\n                    data += 1;\n                }\n            }\n\n            return result;\n        }\n\n        static inline typename Traits::value_type decode_utf32_block(const uint32_t* data, size_t size, typename Traits::value_type result)\n        {\n            const uint32_t* end = data + size;\n\n            while (data < end)\n            {\n                uint32_t lead = opt_swap::value ? endian_swap(*data) : *data;\n\n                // U+0000..U+FFFF\n                if (lead < 0x10000)\n                {\n                    result = Traits::low(result, lead);\n                    data += 1;\n                }\n                // U+10000..U+10FFFF\n                else\n                {\n                    result = Traits::high(result, lead);\n                    data += 1;\n                }\n            }\n\n            return result;\n        }\n\n        static inline typename Traits::value_type decode_latin1_block(const uint8_t* data, size_t size, typename Traits::value_type result)\n        {\n            for (size_t i = 0; i < size; ++i)\n            {\n                result = Traits::low(result, data[i]);\n            }\n\n            return result;\n        }\n\n        static inline typename Traits::value_type decode_wchar_block_impl(const uint16_t* data, size_t size, typename Traits::value_type result)\n        {\n            return decode_utf16_block(data, size, result);\n        }\n\n        static inline typename Traits::value_type decode_wchar_block_impl(const uint32_t* data, size_t size, typename Traits::value_type result)\n        {\n            return decode_utf32_block(data, size, result);\n        }\n\n        static inline typename Traits::value_type decode_wchar_block(const wchar_t* data, size_t size, typename Traits::value_type result)\n        {\n            return decode_wchar_block_impl(reinterpret_cast<const wchar_selector<sizeof(wchar_t)>::type*>(data), size, result);\n        }\n    };\n\n    template <typename T> PUGI__FN void convert_utf_endian_swap(T* result, const T* data, size_t length)\n    {\n        for (size_t i = 0; i < length; ++i) result[i] = endian_swap(data[i]);\n    }\n\n#ifdef PUGIXML_WCHAR_MODE\n    PUGI__FN void convert_wchar_endian_swap(wchar_t* result, const wchar_t* data, size_t length)\n    {\n        for (size_t i = 0; i < length; ++i) result[i] = static_cast<wchar_t>(endian_swap(static_cast<wchar_selector<sizeof(wchar_t)>::type>(data[i])));\n    }\n#endif\nPUGI__NS_END\n\nPUGI__NS_BEGIN\n    enum chartype_t\n    {\n        ct_parse_pcdata = 1,    // \\0, &, \\r, <\n        ct_parse_attr = 2,        // \\0, &, \\r, ', \"\n        ct_parse_attr_ws = 4,    // \\0, &, \\r, ', \", \\n, tab\n        ct_space = 8,            // \\r, \\n, space, tab\n        ct_parse_cdata = 16,    // \\0, ], >, \\r\n        ct_parse_comment = 32,    // \\0, -, >, \\r\n        ct_symbol = 64,            // Any symbol > 127, a-z, A-Z, 0-9, _, :, -, .\n        ct_start_symbol = 128    // Any symbol > 127, a-z, A-Z, _, :\n    };\n\n    static const unsigned char chartype_table[256] =\n    {\n        55,  0,   0,   0,   0,   0,   0,   0,      0,   12,  12,  0,   0,   63,  0,   0,   // 0-15\n        0,   0,   0,   0,   0,   0,   0,   0,      0,   0,   0,   0,   0,   0,   0,   0,   // 16-31\n        8,   0,   6,   0,   0,   0,   7,   6,      0,   0,   0,   0,   0,   96,  64,  0,   // 32-47\n        64,  64,  64,  64,  64,  64,  64,  64,     64,  64,  192, 0,   1,   0,   48,  0,   // 48-63\n        0,   192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192, // 64-79\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 0,   0,   16,  0,   192, // 80-95\n        0,   192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192, // 96-111\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 0, 0, 0, 0, 0,           // 112-127\n\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192, // 128+\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192\n    };\n\n    enum chartypex_t\n    {\n        ctx_special_pcdata = 1,   // Any symbol >= 0 and < 32 (except \\t, \\r, \\n), &, <, >\n        ctx_special_attr = 2,     // Any symbol >= 0 and < 32 (except \\t), &, <, >, \"\n        ctx_start_symbol = 4,      // Any symbol > 127, a-z, A-Z, _\n        ctx_digit = 8,              // 0-9\n        ctx_symbol = 16              // Any symbol > 127, a-z, A-Z, 0-9, _, -, .\n    };\n    \n    static const unsigned char chartypex_table[256] =\n    {\n        3,  3,  3,  3,  3,  3,  3,  3,     3,  0,  2,  3,  3,  2,  3,  3,     // 0-15\n        3,  3,  3,  3,  3,  3,  3,  3,     3,  3,  3,  3,  3,  3,  3,  3,     // 16-31\n        0,  0,  2,  0,  0,  0,  3,  0,     0,  0,  0,  0,  0, 16, 16,  0,     // 32-47\n        24, 24, 24, 24, 24, 24, 24, 24,    24, 24, 0,  0,  3,  0,  3,  0,     // 48-63\n\n        0,  20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,    // 64-79\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 0,  0,  0,  0,  20,    // 80-95\n        0,  20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,    // 96-111\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 0,  0,  0,  0,  0,     // 112-127\n\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,    // 128+\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n        20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20\n    };\n    \n#ifdef PUGIXML_WCHAR_MODE\n    #define PUGI__IS_CHARTYPE_IMPL(c, ct, table) ((static_cast<unsigned int>(c) < 128 ? table[static_cast<unsigned int>(c)] : table[128]) & (ct))\n#else\n    #define PUGI__IS_CHARTYPE_IMPL(c, ct, table) (table[static_cast<unsigned char>(c)] & (ct))\n#endif\n\n    #define PUGI__IS_CHARTYPE(c, ct) PUGI__IS_CHARTYPE_IMPL(c, ct, chartype_table)\n    #define PUGI__IS_CHARTYPEX(c, ct) PUGI__IS_CHARTYPE_IMPL(c, ct, chartypex_table)\n\n    PUGI__FN bool is_little_endian()\n    {\n        unsigned int ui = 1;\n\n        return *reinterpret_cast<unsigned char*>(&ui) == 1;\n    }\n\n    PUGI__FN xml_encoding get_wchar_encoding()\n    {\n        PUGI__STATIC_ASSERT(sizeof(wchar_t) == 2 || sizeof(wchar_t) == 4);\n\n        if (sizeof(wchar_t) == 2)\n            return is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n        else \n            return is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n    }\n\n    PUGI__FN xml_encoding guess_buffer_encoding(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)\n    {\n        // look for BOM in first few bytes\n        if (d0 == 0 && d1 == 0 && d2 == 0xfe && d3 == 0xff) return encoding_utf32_be;\n        if (d0 == 0xff && d1 == 0xfe && d2 == 0 && d3 == 0) return encoding_utf32_le;\n        if (d0 == 0xfe && d1 == 0xff) return encoding_utf16_be;\n        if (d0 == 0xff && d1 == 0xfe) return encoding_utf16_le;\n        if (d0 == 0xef && d1 == 0xbb && d2 == 0xbf) return encoding_utf8;\n\n        // look for <, <? or <?xm in various encodings\n        if (d0 == 0 && d1 == 0 && d2 == 0 && d3 == 0x3c) return encoding_utf32_be;\n        if (d0 == 0x3c && d1 == 0 && d2 == 0 && d3 == 0) return encoding_utf32_le;\n        if (d0 == 0 && d1 == 0x3c && d2 == 0 && d3 == 0x3f) return encoding_utf16_be;\n        if (d0 == 0x3c && d1 == 0 && d2 == 0x3f && d3 == 0) return encoding_utf16_le;\n        if (d0 == 0x3c && d1 == 0x3f && d2 == 0x78 && d3 == 0x6d) return encoding_utf8;\n\n        // look for utf16 < followed by node name (this may fail, but is better than utf8 since it's zero terminated so early)\n        if (d0 == 0 && d1 == 0x3c) return encoding_utf16_be;\n        if (d0 == 0x3c && d1 == 0) return encoding_utf16_le;\n\n        // no known BOM detected, assume utf8\n        return encoding_utf8;\n    }\n\n    PUGI__FN xml_encoding get_buffer_encoding(xml_encoding encoding, const void* contents, size_t size)\n    {\n        // replace wchar encoding with utf implementation\n        if (encoding == encoding_wchar) return get_wchar_encoding();\n\n        // replace utf16 encoding with utf16 with specific endianness\n        if (encoding == encoding_utf16) return is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n        // replace utf32 encoding with utf32 with specific endianness\n        if (encoding == encoding_utf32) return is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n        // only do autodetection if no explicit encoding is requested\n        if (encoding != encoding_auto) return encoding;\n\n        // skip encoding autodetection if input buffer is too small\n        if (size < 4) return encoding_utf8;\n\n        // try to guess encoding (based on XML specification, Appendix F.1)\n        const uint8_t* data = static_cast<const uint8_t*>(contents);\n\n        PUGI__DMC_VOLATILE uint8_t d0 = data[0], d1 = data[1], d2 = data[2], d3 = data[3];\n\n        return guess_buffer_encoding(d0, d1, d2, d3);\n    }\n\n    PUGI__FN bool get_mutable_buffer(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)\n    {\n        size_t length = size / sizeof(char_t);\n\n        if (is_mutable)\n        {\n            out_buffer = static_cast<char_t*>(const_cast<void*>(contents));\n            out_length = length;\n        }\n        else\n        {\n            char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n            if (!buffer) return false;\n\n            if (contents)\n                memcpy(buffer, contents, length * sizeof(char_t));\n            else\n                assert(length == 0);\n\n            buffer[length] = 0;\n\n            out_buffer = buffer;\n            out_length = length + 1;\n        }\n\n        return true;\n    }\n\n#ifdef PUGIXML_WCHAR_MODE\n    PUGI__FN bool need_endian_swap_utf(xml_encoding le, xml_encoding re)\n    {\n        return (le == encoding_utf16_be && re == encoding_utf16_le) || (le == encoding_utf16_le && re == encoding_utf16_be) ||\n               (le == encoding_utf32_be && re == encoding_utf32_le) || (le == encoding_utf32_le && re == encoding_utf32_be);\n    }\n\n    PUGI__FN bool convert_buffer_endian_swap(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)\n    {\n        const char_t* data = static_cast<const char_t*>(contents);\n        size_t length = size / sizeof(char_t);\n\n        if (is_mutable)\n        {\n            char_t* buffer = const_cast<char_t*>(data);\n\n            convert_wchar_endian_swap(buffer, data, length);\n\n            out_buffer = buffer;\n            out_length = length;\n        }\n        else\n        {\n            char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n            if (!buffer) return false;\n\n            convert_wchar_endian_swap(buffer, data, length);\n            buffer[length] = 0;\n\n            out_buffer = buffer;\n            out_length = length + 1;\n        }\n\n        return true;\n    }\n\n    PUGI__FN bool convert_buffer_utf8(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size)\n    {\n        const uint8_t* data = static_cast<const uint8_t*>(contents);\n        size_t data_length = size;\n\n        // first pass: get length in wchar_t units\n        size_t length = utf_decoder<wchar_counter>::decode_utf8_block(data, data_length, 0);\n\n        // allocate buffer of suitable length\n        char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n        if (!buffer) return false;\n\n        // second pass: convert utf8 input to wchar_t\n        wchar_writer::value_type obegin = reinterpret_cast<wchar_writer::value_type>(buffer);\n        wchar_writer::value_type oend = utf_decoder<wchar_writer>::decode_utf8_block(data, data_length, obegin);\n\n        assert(oend == obegin + length);\n        *oend = 0;\n\n        out_buffer = buffer;\n        out_length = length + 1;\n\n        return true;\n    }\n\n    template <typename opt_swap> PUGI__FN bool convert_buffer_utf16(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)\n    {\n        const uint16_t* data = static_cast<const uint16_t*>(contents);\n        size_t data_length = size / sizeof(uint16_t);\n\n        // first pass: get length in wchar_t units\n        size_t length = utf_decoder<wchar_counter, opt_swap>::decode_utf16_block(data, data_length, 0);\n\n        // allocate buffer of suitable length\n        char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n        if (!buffer) return false;\n\n        // second pass: convert utf16 input to wchar_t\n        wchar_writer::value_type obegin = reinterpret_cast<wchar_writer::value_type>(buffer);\n        wchar_writer::value_type oend = utf_decoder<wchar_writer, opt_swap>::decode_utf16_block(data, data_length, obegin);\n\n        assert(oend == obegin + length);\n        *oend = 0;\n\n        out_buffer = buffer;\n        out_length = length + 1;\n\n        return true;\n    }\n\n    template <typename opt_swap> PUGI__FN bool convert_buffer_utf32(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)\n    {\n        const uint32_t* data = static_cast<const uint32_t*>(contents);\n        size_t data_length = size / sizeof(uint32_t);\n\n        // first pass: get length in wchar_t units\n        size_t length = utf_decoder<wchar_counter, opt_swap>::decode_utf32_block(data, data_length, 0);\n\n        // allocate buffer of suitable length\n        char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n        if (!buffer) return false;\n\n        // second pass: convert utf32 input to wchar_t\n        wchar_writer::value_type obegin = reinterpret_cast<wchar_writer::value_type>(buffer);\n        wchar_writer::value_type oend = utf_decoder<wchar_writer, opt_swap>::decode_utf32_block(data, data_length, obegin);\n\n        assert(oend == obegin + length);\n        *oend = 0;\n\n        out_buffer = buffer;\n        out_length = length + 1;\n\n        return true;\n    }\n\n    PUGI__FN bool convert_buffer_latin1(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size)\n    {\n        const uint8_t* data = static_cast<const uint8_t*>(contents);\n        size_t data_length = size;\n\n        // get length in wchar_t units\n        size_t length = data_length;\n\n        // allocate buffer of suitable length\n        char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n        if (!buffer) return false;\n\n        // convert latin1 input to wchar_t\n        wchar_writer::value_type obegin = reinterpret_cast<wchar_writer::value_type>(buffer);\n        wchar_writer::value_type oend = utf_decoder<wchar_writer>::decode_latin1_block(data, data_length, obegin);\n\n        assert(oend == obegin + length);\n        *oend = 0;\n\n        out_buffer = buffer;\n        out_length = length + 1;\n\n        return true;\n    }\n\n    PUGI__FN bool convert_buffer(char_t*& out_buffer, size_t& out_length, xml_encoding encoding, const void* contents, size_t size, bool is_mutable)\n    {\n        // get native encoding\n        xml_encoding wchar_encoding = get_wchar_encoding();\n\n        // fast path: no conversion required\n        if (encoding == wchar_encoding) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable);\n\n        // only endian-swapping is required\n        if (need_endian_swap_utf(encoding, wchar_encoding)) return convert_buffer_endian_swap(out_buffer, out_length, contents, size, is_mutable);\n\n        // source encoding is utf8\n        if (encoding == encoding_utf8) return convert_buffer_utf8(out_buffer, out_length, contents, size);\n\n        // source encoding is utf16\n        if (encoding == encoding_utf16_be || encoding == encoding_utf16_le)\n        {\n            xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n            return (native_encoding == encoding) ?\n                convert_buffer_utf16(out_buffer, out_length, contents, size, opt_false()) :\n                convert_buffer_utf16(out_buffer, out_length, contents, size, opt_true());\n        }\n\n        // source encoding is utf32\n        if (encoding == encoding_utf32_be || encoding == encoding_utf32_le)\n        {\n            xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n            return (native_encoding == encoding) ?\n                convert_buffer_utf32(out_buffer, out_length, contents, size, opt_false()) :\n                convert_buffer_utf32(out_buffer, out_length, contents, size, opt_true());\n        }\n\n        // source encoding is latin1\n        if (encoding == encoding_latin1) return convert_buffer_latin1(out_buffer, out_length, contents, size);\n\n        assert(!\"Invalid encoding\");\n        return false;\n    }\n#else\n    template <typename opt_swap> PUGI__FN bool convert_buffer_utf16(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)\n    {\n        const uint16_t* data = static_cast<const uint16_t*>(contents);\n        size_t data_length = size / sizeof(uint16_t);\n\n        // first pass: get length in utf8 units\n        size_t length = utf_decoder<utf8_counter, opt_swap>::decode_utf16_block(data, data_length, 0);\n\n        // allocate buffer of suitable length\n        char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n        if (!buffer) return false;\n\n        // second pass: convert utf16 input to utf8\n        uint8_t* obegin = reinterpret_cast<uint8_t*>(buffer);\n        uint8_t* oend = utf_decoder<utf8_writer, opt_swap>::decode_utf16_block(data, data_length, obegin);\n\n        assert(oend == obegin + length);\n        *oend = 0;\n\n        out_buffer = buffer;\n        out_length = length + 1;\n\n        return true;\n    }\n\n    template <typename opt_swap> PUGI__FN bool convert_buffer_utf32(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)\n    {\n        const uint32_t* data = static_cast<const uint32_t*>(contents);\n        size_t data_length = size / sizeof(uint32_t);\n\n        // first pass: get length in utf8 units\n        size_t length = utf_decoder<utf8_counter, opt_swap>::decode_utf32_block(data, data_length, 0);\n\n        // allocate buffer of suitable length\n        char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n        if (!buffer) return false;\n\n        // second pass: convert utf32 input to utf8\n        uint8_t* obegin = reinterpret_cast<uint8_t*>(buffer);\n        uint8_t* oend = utf_decoder<utf8_writer, opt_swap>::decode_utf32_block(data, data_length, obegin);\n\n        assert(oend == obegin + length);\n        *oend = 0;\n\n        out_buffer = buffer;\n        out_length = length + 1;\n\n        return true;\n    }\n\n    PUGI__FN size_t get_latin1_7bit_prefix_length(const uint8_t* data, size_t size)\n    {\n        for (size_t i = 0; i < size; ++i)\n            if (data[i] > 127)\n                return i;\n\n        return size;\n    }\n\n    PUGI__FN bool convert_buffer_latin1(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)\n    {\n        const uint8_t* data = static_cast<const uint8_t*>(contents);\n        size_t data_length = size;\n\n        // get size of prefix that does not need utf8 conversion\n        size_t prefix_length = get_latin1_7bit_prefix_length(data, data_length);\n        assert(prefix_length <= data_length);\n\n        const uint8_t* postfix = data + prefix_length;\n        size_t postfix_length = data_length - prefix_length;\n\n        // if no conversion is needed, just return the original buffer\n        if (postfix_length == 0) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable);\n\n        // first pass: get length in utf8 units\n        size_t length = prefix_length + utf_decoder<utf8_counter>::decode_latin1_block(postfix, postfix_length, 0);\n\n        // allocate buffer of suitable length\n        char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n        if (!buffer) return false;\n\n        // second pass: convert latin1 input to utf8\n        memcpy(buffer, data, prefix_length);\n\n        uint8_t* obegin = reinterpret_cast<uint8_t*>(buffer);\n        uint8_t* oend = utf_decoder<utf8_writer>::decode_latin1_block(postfix, postfix_length, obegin + prefix_length);\n\n        assert(oend == obegin + length);\n        *oend = 0;\n\n        out_buffer = buffer;\n        out_length = length + 1;\n\n        return true;\n    }\n\n    PUGI__FN bool convert_buffer(char_t*& out_buffer, size_t& out_length, xml_encoding encoding, const void* contents, size_t size, bool is_mutable)\n    {\n        // fast path: no conversion required\n        if (encoding == encoding_utf8) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable);\n\n        // source encoding is utf16\n        if (encoding == encoding_utf16_be || encoding == encoding_utf16_le)\n        {\n            xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n            return (native_encoding == encoding) ?\n                convert_buffer_utf16(out_buffer, out_length, contents, size, opt_false()) :\n                convert_buffer_utf16(out_buffer, out_length, contents, size, opt_true());\n        }\n\n        // source encoding is utf32\n        if (encoding == encoding_utf32_be || encoding == encoding_utf32_le)\n        {\n            xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n            return (native_encoding == encoding) ?\n                convert_buffer_utf32(out_buffer, out_length, contents, size, opt_false()) :\n                convert_buffer_utf32(out_buffer, out_length, contents, size, opt_true());\n        }\n\n        // source encoding is latin1\n        if (encoding == encoding_latin1) return convert_buffer_latin1(out_buffer, out_length, contents, size, is_mutable);\n\n        assert(!\"Invalid encoding\");\n        return false;\n    }\n#endif\n\n    PUGI__FN size_t as_utf8_begin(const wchar_t* str, size_t length)\n    {\n        // get length in utf8 characters\n        return utf_decoder<utf8_counter>::decode_wchar_block(str, length, 0);\n    }\n\n    PUGI__FN void as_utf8_end(char* buffer, size_t size, const wchar_t* str, size_t length)\n    {\n        // convert to utf8\n        uint8_t* begin = reinterpret_cast<uint8_t*>(buffer);\n        uint8_t* end = utf_decoder<utf8_writer>::decode_wchar_block(str, length, begin);\n    \n        assert(begin + size == end);\n        (void)!end;\n\n        // zero-terminate\n        buffer[size] = 0;\n    }\n    \n#ifndef PUGIXML_NO_STL\n    PUGI__FN std::string as_utf8_impl(const wchar_t* str, size_t length)\n    {\n        // first pass: get length in utf8 characters\n        size_t size = as_utf8_begin(str, length);\n\n        // allocate resulting string\n        std::string result;\n        result.resize(size);\n\n        // second pass: convert to utf8\n        if (size > 0) as_utf8_end(&result[0], size, str, length);\n\n        return result;\n    }\n\n    PUGI__FN std::basic_string<wchar_t> as_wide_impl(const char* str, size_t size)\n    {\n        const uint8_t* data = reinterpret_cast<const uint8_t*>(str);\n\n        // first pass: get length in wchar_t units\n        size_t length = utf_decoder<wchar_counter>::decode_utf8_block(data, size, 0);\n\n        // allocate resulting string\n        std::basic_string<wchar_t> result;\n        result.resize(length);\n\n        // second pass: convert to wchar_t\n        if (length > 0)\n        {\n            wchar_writer::value_type begin = reinterpret_cast<wchar_writer::value_type>(&result[0]);\n            wchar_writer::value_type end = utf_decoder<wchar_writer>::decode_utf8_block(data, size, begin);\n\n            assert(begin + length == end);\n            (void)!end;\n        }\n\n        return result;\n    }\n#endif\n\n    inline bool strcpy_insitu_allow(size_t length, uintptr_t header, uintptr_t header_mask, char_t* target)\n    {\n        // never reuse shared memory\n        if (header & xml_memory_page_contents_shared_mask) return false;\n\n        size_t target_length = strlength(target);\n\n        // always reuse document buffer memory if possible\n        if ((header & header_mask) == 0) return target_length >= length;\n\n        // reuse heap memory if waste is not too great\n        const size_t reuse_threshold = 32;\n\n        return target_length >= length && (target_length < reuse_threshold || target_length - length < target_length / 2);\n    }\n\n    PUGI__FN bool strcpy_insitu(char_t*& dest, uintptr_t& header, uintptr_t header_mask, const char_t* source)\n    {\n        assert(header);\n\n        size_t source_length = strlength(source);\n\n        if (source_length == 0)\n        {\n            // empty string and null pointer are equivalent, so just deallocate old memory\n            xml_allocator* alloc = reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask)->allocator;\n\n            if (header & header_mask) alloc->deallocate_string(dest);\n            \n            // mark the string as not allocated\n            dest = 0;\n            header &= ~header_mask;\n\n            return true;\n        }\n        else if (dest && strcpy_insitu_allow(source_length, header, header_mask, dest))\n        {\n            // we can reuse old buffer, so just copy the new data (including zero terminator)\n            memcpy(dest, source, (source_length + 1) * sizeof(char_t));\n            \n            return true;\n        }\n        else\n        {\n            xml_allocator* alloc = reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask)->allocator;\n\n            // allocate new buffer\n            char_t* buf = alloc->allocate_string(source_length + 1);\n            if (!buf) return false;\n\n            // copy the string (including zero terminator)\n            memcpy(buf, source, (source_length + 1) * sizeof(char_t));\n\n            // deallocate old buffer (*after* the above to protect against overlapping memory and/or allocation failures)\n            if (header & header_mask) alloc->deallocate_string(dest);\n            \n            // the string is now allocated, so set the flag\n            dest = buf;\n            header |= header_mask;\n\n            return true;\n        }\n    }\n\n    struct gap\n    {\n        char_t* end;\n        size_t size;\n            \n        gap(): end(0), size(0)\n        {\n        }\n            \n        // Push new gap, move s count bytes further (skipping the gap).\n        // Collapse previous gap.\n        void push(char_t*& s, size_t count)\n        {\n            if (end) // there was a gap already; collapse it\n            {\n                // Move [old_gap_end, new_gap_start) to [old_gap_start, ...)\n                assert(s >= end);\n                memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));\n            }\n                \n            s += count; // end of current gap\n                \n            // \"merge\" two gaps\n            end = s;\n            size += count;\n        }\n            \n        // Collapse all gaps, return past-the-end pointer\n        char_t* flush(char_t* s)\n        {\n            if (end)\n            {\n                // Move [old_gap_end, current_pos) to [old_gap_start, ...)\n                assert(s >= end);\n                memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));\n\n                return s - size;\n            }\n            else return s;\n        }\n    };\n    \n    PUGI__FN char_t* strconv_escape(char_t* s, gap& g)\n    {\n        char_t* stre = s + 1;\n\n        switch (*stre)\n        {\n            case '#':    // &#...\n            {\n                unsigned int ucsc = 0;\n\n                if (stre[1] == 'x') // &#x... (hex code)\n                {\n                    stre += 2;\n\n                    char_t ch = *stre;\n\n                    if (ch == ';') return stre;\n\n                    for (;;)\n                    {\n                        if (static_cast<unsigned int>(ch - '0') <= 9)\n                            ucsc = 16 * ucsc + (ch - '0');\n                        else if (static_cast<unsigned int>((ch | ' ') - 'a') <= 5)\n                            ucsc = 16 * ucsc + ((ch | ' ') - 'a' + 10);\n                        else if (ch == ';')\n                            break;\n                        else // cancel\n                            return stre;\n\n                        ch = *++stre;\n                    }\n                    \n                    ++stre;\n                }\n                else    // &#... (dec code)\n                {\n                    char_t ch = *++stre;\n\n                    if (ch == ';') return stre;\n\n                    for (;;)\n                    {\n                        if (static_cast<unsigned int>(static_cast<unsigned int>(ch) - '0') <= 9)\n                            ucsc = 10 * ucsc + (ch - '0');\n                        else if (ch == ';')\n                            break;\n                        else // cancel\n                            return stre;\n\n                        ch = *++stre;\n                    }\n                    \n                    ++stre;\n                }\n\n            #ifdef PUGIXML_WCHAR_MODE\n                s = reinterpret_cast<char_t*>(wchar_writer::any(reinterpret_cast<wchar_writer::value_type>(s), ucsc));\n            #else\n                s = reinterpret_cast<char_t*>(utf8_writer::any(reinterpret_cast<uint8_t*>(s), ucsc));\n            #endif\n                    \n                g.push(s, stre - s);\n                return stre;\n            }\n\n            case 'a':    // &a\n            {\n                ++stre;\n\n                if (*stre == 'm') // &am\n                {\n                    if (*++stre == 'p' && *++stre == ';') // &amp;\n                    {\n                        *s++ = '&';\n                        ++stre;\n                            \n                        g.push(s, stre - s);\n                        return stre;\n                    }\n                }\n                else if (*stre == 'p') // &ap\n                {\n                    if (*++stre == 'o' && *++stre == 's' && *++stre == ';') // &apos;\n                    {\n                        *s++ = '\\'';\n                        ++stre;\n\n                        g.push(s, stre - s);\n                        return stre;\n                    }\n                }\n                break;\n            }\n\n            case 'g': // &g\n            {\n                if (*++stre == 't' && *++stre == ';') // &gt;\n                {\n                    *s++ = '>';\n                    ++stre;\n                    \n                    g.push(s, stre - s);\n                    return stre;\n                }\n                break;\n            }\n\n            case 'l': // &l\n            {\n                if (*++stre == 't' && *++stre == ';') // &lt;\n                {\n                    *s++ = '<';\n                    ++stre;\n                        \n                    g.push(s, stre - s);\n                    return stre;\n                }\n                break;\n            }\n\n            case 'q': // &q\n            {\n                if (*++stre == 'u' && *++stre == 'o' && *++stre == 't' && *++stre == ';') // &quot;\n                {\n                    *s++ = '\"';\n                    ++stre;\n                    \n                    g.push(s, stre - s);\n                    return stre;\n                }\n                break;\n            }\n\n            default:\n                break;\n        }\n        \n        return stre;\n    }\n\n    // Parser utilities\n    #define PUGI__ENDSWITH(c, e)        ((c) == (e) || ((c) == 0 && endch == (e)))\n    #define PUGI__SKIPWS()              { while (PUGI__IS_CHARTYPE(*s, ct_space)) ++s; }\n    #define PUGI__OPTSET(OPT)           ( optmsk & (OPT) )\n    #define PUGI__PUSHNODE(TYPE)        { cursor = append_new_node(cursor, alloc, TYPE); if (!cursor) PUGI__THROW_ERROR(status_out_of_memory, s); }\n    #define PUGI__POPNODE()             { cursor = cursor->parent; }\n    #define PUGI__SCANFOR(X)            { while (*s != 0 && !(X)) ++s; }\n    #define PUGI__SCANWHILE(X)          { while (X) ++s; }\n    #define PUGI__SCANWHILE_UNROLL(X)   { for (;;) { char_t ss = s[0]; if (PUGI__UNLIKELY(!(X))) { break; } ss = s[1]; if (PUGI__UNLIKELY(!(X))) { s += 1; break; } ss = s[2]; if (PUGI__UNLIKELY(!(X))) { s += 2; break; } ss = s[3]; if (PUGI__UNLIKELY(!(X))) { s += 3; break; } s += 4; } }\n    #define PUGI__ENDSEG()              { ch = *s; *s = 0; ++s; }\n    #define PUGI__THROW_ERROR(err, m)   return error_offset = m, error_status = err, static_cast<char_t*>(0)\n    #define PUGI__CHECK_ERROR(err, m)   { if (*s == 0) PUGI__THROW_ERROR(err, m); }\n\n    PUGI__FN char_t* strconv_comment(char_t* s, char_t endch)\n    {\n        gap g;\n        \n        while (true)\n        {\n            PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_comment));\n        \n            if (*s == '\\r') // Either a single 0x0d or 0x0d 0x0a pair\n            {\n                *s++ = '\\n'; // replace first one with 0x0a\n                \n                if (*s == '\\n') g.push(s, 1);\n            }\n            else if (s[0] == '-' && s[1] == '-' && PUGI__ENDSWITH(s[2], '>')) // comment ends here\n            {\n                *g.flush(s) = 0;\n                \n                return s + (s[2] == '>' ? 3 : 2);\n            }\n            else if (*s == 0)\n            {\n                return 0;\n            }\n            else ++s;\n        }\n    }\n\n    PUGI__FN char_t* strconv_cdata(char_t* s, char_t endch)\n    {\n        gap g;\n            \n        while (true)\n        {\n            PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_cdata));\n            \n            if (*s == '\\r') // Either a single 0x0d or 0x0d 0x0a pair\n            {\n                *s++ = '\\n'; // replace first one with 0x0a\n                \n                if (*s == '\\n') g.push(s, 1);\n            }\n            else if (s[0] == ']' && s[1] == ']' && PUGI__ENDSWITH(s[2], '>')) // CDATA ends here\n            {\n                *g.flush(s) = 0;\n                \n                return s + 1;\n            }\n            else if (*s == 0)\n            {\n                return 0;\n            }\n            else ++s;\n        }\n    }\n    \n    typedef char_t* (*strconv_pcdata_t)(char_t*);\n        \n    template <typename opt_trim, typename opt_eol, typename opt_escape> struct strconv_pcdata_impl\n    {\n        static char_t* parse(char_t* s)\n        {\n            gap g;\n\n            char_t* begin = s;\n\n            while (true)\n            {\n                PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_pcdata));\n\n                if (*s == '<') // PCDATA ends here\n                {\n                    char_t* end = g.flush(s);\n\n                    if (opt_trim::value)\n                        while (end > begin && PUGI__IS_CHARTYPE(end[-1], ct_space))\n                            --end;\n\n                    *end = 0;\n                    \n                    return s + 1;\n                }\n                else if (opt_eol::value && *s == '\\r') // Either a single 0x0d or 0x0d 0x0a pair\n                {\n                    *s++ = '\\n'; // replace first one with 0x0a\n                    \n                    if (*s == '\\n') g.push(s, 1);\n                }\n                else if (opt_escape::value && *s == '&')\n                {\n                    s = strconv_escape(s, g);\n                }\n                else if (*s == 0)\n                {\n                    char_t* end = g.flush(s);\n\n                    if (opt_trim::value)\n                        while (end > begin && PUGI__IS_CHARTYPE(end[-1], ct_space))\n                            --end;\n\n                    *end = 0;\n\n                    return s;\n                }\n                else ++s;\n            }\n        }\n    };\n    \n    PUGI__FN strconv_pcdata_t get_strconv_pcdata(unsigned int optmask)\n    {\n        PUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_trim_pcdata == 0x0800);\n\n        switch (((optmask >> 4) & 3) | ((optmask >> 9) & 4)) // get bitmask for flags (eol escapes trim)\n        {\n        case 0: return strconv_pcdata_impl<opt_false, opt_false, opt_false>::parse;\n        case 1: return strconv_pcdata_impl<opt_false, opt_false, opt_true>::parse;\n        case 2: return strconv_pcdata_impl<opt_false, opt_true, opt_false>::parse;\n        case 3: return strconv_pcdata_impl<opt_false, opt_true, opt_true>::parse;\n        case 4: return strconv_pcdata_impl<opt_true, opt_false, opt_false>::parse;\n        case 5: return strconv_pcdata_impl<opt_true, opt_false, opt_true>::parse;\n        case 6: return strconv_pcdata_impl<opt_true, opt_true, opt_false>::parse;\n        case 7: return strconv_pcdata_impl<opt_true, opt_true, opt_true>::parse;\n        default: assert(false); return 0; // should not get here\n        }\n    }\n\n    typedef char_t* (*strconv_attribute_t)(char_t*, char_t);\n    \n    template <typename opt_escape> struct strconv_attribute_impl\n    {\n        static char_t* parse_wnorm(char_t* s, char_t end_quote)\n        {\n            gap g;\n\n            // trim leading whitespaces\n            if (PUGI__IS_CHARTYPE(*s, ct_space))\n            {\n                char_t* str = s;\n                \n                do ++str;\n                while (PUGI__IS_CHARTYPE(*str, ct_space));\n                \n                g.push(s, str - s);\n            }\n\n            while (true)\n            {\n                PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr_ws | ct_space));\n                \n                if (*s == end_quote)\n                {\n                    char_t* str = g.flush(s);\n                    \n                    do *str-- = 0;\n                    while (PUGI__IS_CHARTYPE(*str, ct_space));\n                \n                    return s + 1;\n                }\n                else if (PUGI__IS_CHARTYPE(*s, ct_space))\n                {\n                    *s++ = ' ';\n        \n                    if (PUGI__IS_CHARTYPE(*s, ct_space))\n                    {\n                        char_t* str = s + 1;\n                        while (PUGI__IS_CHARTYPE(*str, ct_space)) ++str;\n                        \n                        g.push(s, str - s);\n                    }\n                }\n                else if (opt_escape::value && *s == '&')\n                {\n                    s = strconv_escape(s, g);\n                }\n                else if (!*s)\n                {\n                    return 0;\n                }\n                else ++s;\n            }\n        }\n\n        static char_t* parse_wconv(char_t* s, char_t end_quote)\n        {\n            gap g;\n\n            while (true)\n            {\n                PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr_ws));\n                \n                if (*s == end_quote)\n                {\n                    *g.flush(s) = 0;\n                \n                    return s + 1;\n                }\n                else if (PUGI__IS_CHARTYPE(*s, ct_space))\n                {\n                    if (*s == '\\r')\n                    {\n                        *s++ = ' ';\n                \n                        if (*s == '\\n') g.push(s, 1);\n                    }\n                    else *s++ = ' ';\n                }\n                else if (opt_escape::value && *s == '&')\n                {\n                    s = strconv_escape(s, g);\n                }\n                else if (!*s)\n                {\n                    return 0;\n                }\n                else ++s;\n            }\n        }\n\n        static char_t* parse_eol(char_t* s, char_t end_quote)\n        {\n            gap g;\n\n            while (true)\n            {\n                PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr));\n                \n                if (*s == end_quote)\n                {\n                    *g.flush(s) = 0;\n                \n                    return s + 1;\n                }\n                else if (*s == '\\r')\n                {\n                    *s++ = '\\n';\n                    \n                    if (*s == '\\n') g.push(s, 1);\n                }\n                else if (opt_escape::value && *s == '&')\n                {\n                    s = strconv_escape(s, g);\n                }\n                else if (!*s)\n                {\n                    return 0;\n                }\n                else ++s;\n            }\n        }\n\n        static char_t* parse_simple(char_t* s, char_t end_quote)\n        {\n            gap g;\n\n            while (true)\n            {\n                PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr));\n                \n                if (*s == end_quote)\n                {\n                    *g.flush(s) = 0;\n                \n                    return s + 1;\n                }\n                else if (opt_escape::value && *s == '&')\n                {\n                    s = strconv_escape(s, g);\n                }\n                else if (!*s)\n                {\n                    return 0;\n                }\n                else ++s;\n            }\n        }\n    };\n\n    PUGI__FN strconv_attribute_t get_strconv_attribute(unsigned int optmask)\n    {\n        PUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_wconv_attribute == 0x40 && parse_wnorm_attribute == 0x80);\n        \n        switch ((optmask >> 4) & 15) // get bitmask for flags (wconv wnorm eol escapes)\n        {\n        case 0:  return strconv_attribute_impl<opt_false>::parse_simple;\n        case 1:  return strconv_attribute_impl<opt_true>::parse_simple;\n        case 2:  return strconv_attribute_impl<opt_false>::parse_eol;\n        case 3:  return strconv_attribute_impl<opt_true>::parse_eol;\n        case 4:  return strconv_attribute_impl<opt_false>::parse_wconv;\n        case 5:  return strconv_attribute_impl<opt_true>::parse_wconv;\n        case 6:  return strconv_attribute_impl<opt_false>::parse_wconv;\n        case 7:  return strconv_attribute_impl<opt_true>::parse_wconv;\n        case 8:  return strconv_attribute_impl<opt_false>::parse_wnorm;\n        case 9:  return strconv_attribute_impl<opt_true>::parse_wnorm;\n        case 10: return strconv_attribute_impl<opt_false>::parse_wnorm;\n        case 11: return strconv_attribute_impl<opt_true>::parse_wnorm;\n        case 12: return strconv_attribute_impl<opt_false>::parse_wnorm;\n        case 13: return strconv_attribute_impl<opt_true>::parse_wnorm;\n        case 14: return strconv_attribute_impl<opt_false>::parse_wnorm;\n        case 15: return strconv_attribute_impl<opt_true>::parse_wnorm;\n        default: assert(false); return 0; // should not get here\n        }\n    }\n\n    inline xml_parse_result make_parse_result(xml_parse_status status, ptrdiff_t offset = 0)\n    {\n        xml_parse_result result;\n        result.status = status;\n        result.offset = offset;\n\n        return result;\n    }\n\n    struct xml_parser\n    {\n        xml_allocator alloc;\n        char_t* error_offset;\n        xml_parse_status error_status;\n        \n        xml_parser(const xml_allocator& alloc_): alloc(alloc_), error_offset(0), error_status(status_ok)\n        {\n        }\n\n        // DOCTYPE consists of nested sections of the following possible types:\n        // <!-- ... -->, <? ... ?>, \"...\", '...'\n        // <![...]]>\n        // <!...>\n        // First group can not contain nested groups\n        // Second group can contain nested groups of the same type\n        // Third group can contain all other groups\n        char_t* parse_doctype_primitive(char_t* s)\n        {\n            if (*s == '\"' || *s == '\\'')\n            {\n                // quoted string\n                char_t ch = *s++;\n                PUGI__SCANFOR(*s == ch);\n                if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);\n\n                s++;\n            }\n            else if (s[0] == '<' && s[1] == '?')\n            {\n                // <? ... ?>\n                s += 2;\n                PUGI__SCANFOR(s[0] == '?' && s[1] == '>'); // no need for ENDSWITH because ?> can't terminate proper doctype\n                if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);\n\n                s += 2;\n            }\n            else if (s[0] == '<' && s[1] == '!' && s[2] == '-' && s[3] == '-')\n            {\n                s += 4;\n                PUGI__SCANFOR(s[0] == '-' && s[1] == '-' && s[2] == '>'); // no need for ENDSWITH because --> can't terminate proper doctype\n                if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);\n\n                s += 3;\n            }\n            else PUGI__THROW_ERROR(status_bad_doctype, s);\n\n            return s;\n        }\n\n        char_t* parse_doctype_ignore(char_t* s)\n        {\n            size_t depth = 0;\n\n            assert(s[0] == '<' && s[1] == '!' && s[2] == '[');\n            s += 3;\n\n            while (*s)\n            {\n                if (s[0] == '<' && s[1] == '!' && s[2] == '[')\n                {\n                    // nested ignore section\n                    s += 3;\n                    depth++;\n                }\n                else if (s[0] == ']' && s[1] == ']' && s[2] == '>')\n                {\n                    // ignore section end\n                    s += 3;\n\n                    if (depth == 0)\n                        return s;\n\n                    depth--;\n                }\n                else s++;\n            }\n\n            PUGI__THROW_ERROR(status_bad_doctype, s);\n        }\n\n        char_t* parse_doctype_group(char_t* s, char_t endch)\n        {\n            size_t depth = 0;\n\n            assert((s[0] == '<' || s[0] == 0) && s[1] == '!');\n            s += 2;\n\n            while (*s)\n            {\n                if (s[0] == '<' && s[1] == '!' && s[2] != '-')\n                {\n                    if (s[2] == '[')\n                    {\n                        // ignore\n                        s = parse_doctype_ignore(s);\n                        if (!s) return s;\n                    }\n                    else\n                    {\n                        // some control group\n                        s += 2;\n                        depth++;\n                    }\n                }\n                else if (s[0] == '<' || s[0] == '\"' || s[0] == '\\'')\n                {\n                    // unknown tag (forbidden), or some primitive group\n                    s = parse_doctype_primitive(s);\n                    if (!s) return s;\n                }\n                else if (*s == '>')\n                {\n                    if (depth == 0)\n                        return s;\n\n                    depth--;\n                    s++;\n                }\n                else s++;\n            }\n\n            if (depth != 0 || endch != '>') PUGI__THROW_ERROR(status_bad_doctype, s);\n\n            return s;\n        }\n\n        char_t* parse_exclamation(char_t* s, xml_node_struct* cursor, unsigned int optmsk, char_t endch)\n        {\n            // parse node contents, starting with exclamation mark\n            ++s;\n\n            if (*s == '-') // '<!-...'\n            {\n                ++s;\n\n                if (*s == '-') // '<!--...'\n                {\n                    ++s;\n\n                    if (PUGI__OPTSET(parse_comments))\n                    {\n                        PUGI__PUSHNODE(node_comment); // Append a new node on the tree.\n                        cursor->value = s; // Save the offset.\n                    }\n\n                    if (PUGI__OPTSET(parse_eol) && PUGI__OPTSET(parse_comments))\n                    {\n                        s = strconv_comment(s, endch);\n\n                        if (!s) PUGI__THROW_ERROR(status_bad_comment, cursor->value);\n                    }\n                    else\n                    {\n                        // Scan for terminating '-->'.\n                        PUGI__SCANFOR(s[0] == '-' && s[1] == '-' && PUGI__ENDSWITH(s[2], '>'));\n                        PUGI__CHECK_ERROR(status_bad_comment, s);\n\n                        if (PUGI__OPTSET(parse_comments))\n                            *s = 0; // Zero-terminate this segment at the first terminating '-'.\n\n                        s += (s[2] == '>' ? 3 : 2); // Step over the '\\0->'.\n                    }\n                }\n                else PUGI__THROW_ERROR(status_bad_comment, s);\n            }\n            else if (*s == '[')\n            {\n                // '<![CDATA[...'\n                if (*++s=='C' && *++s=='D' && *++s=='A' && *++s=='T' && *++s=='A' && *++s == '[')\n                {\n                    ++s;\n\n                    if (PUGI__OPTSET(parse_cdata))\n                    {\n                        PUGI__PUSHNODE(node_cdata); // Append a new node on the tree.\n                        cursor->value = s; // Save the offset.\n\n                        if (PUGI__OPTSET(parse_eol))\n                        {\n                            s = strconv_cdata(s, endch);\n\n                            if (!s) PUGI__THROW_ERROR(status_bad_cdata, cursor->value);\n                        }\n                        else\n                        {\n                            // Scan for terminating ']]>'.\n                            PUGI__SCANFOR(s[0] == ']' && s[1] == ']' && PUGI__ENDSWITH(s[2], '>'));\n                            PUGI__CHECK_ERROR(status_bad_cdata, s);\n\n                            *s++ = 0; // Zero-terminate this segment.\n                        }\n                    }\n                    else // Flagged for discard, but we still have to scan for the terminator.\n                    {\n                        // Scan for terminating ']]>'.\n                        PUGI__SCANFOR(s[0] == ']' && s[1] == ']' && PUGI__ENDSWITH(s[2], '>'));\n                        PUGI__CHECK_ERROR(status_bad_cdata, s);\n\n                        ++s;\n                    }\n\n                    s += (s[1] == '>' ? 2 : 1); // Step over the last ']>'.\n                }\n                else PUGI__THROW_ERROR(status_bad_cdata, s);\n            }\n            else if (s[0] == 'D' && s[1] == 'O' && s[2] == 'C' && s[3] == 'T' && s[4] == 'Y' && s[5] == 'P' && PUGI__ENDSWITH(s[6], 'E'))\n            {\n                s -= 2;\n\n                if (cursor->parent) PUGI__THROW_ERROR(status_bad_doctype, s);\n\n                char_t* mark = s + 9;\n\n                s = parse_doctype_group(s, endch);\n                if (!s) return s;\n\n                assert((*s == 0 && endch == '>') || *s == '>');\n                if (*s) *s++ = 0;\n\n                if (PUGI__OPTSET(parse_doctype))\n                {\n                    while (PUGI__IS_CHARTYPE(*mark, ct_space)) ++mark;\n\n                    PUGI__PUSHNODE(node_doctype);\n\n                    cursor->value = mark;\n                }\n            }\n            else if (*s == 0 && endch == '-') PUGI__THROW_ERROR(status_bad_comment, s);\n            else if (*s == 0 && endch == '[') PUGI__THROW_ERROR(status_bad_cdata, s);\n            else PUGI__THROW_ERROR(status_unrecognized_tag, s);\n\n            return s;\n        }\n\n        char_t* parse_question(char_t* s, xml_node_struct*& ref_cursor, unsigned int optmsk, char_t endch)\n        {\n            // load into registers\n            xml_node_struct* cursor = ref_cursor;\n            char_t ch = 0;\n\n            // parse node contents, starting with question mark\n            ++s;\n\n            // read PI target\n            char_t* target = s;\n\n            if (!PUGI__IS_CHARTYPE(*s, ct_start_symbol)) PUGI__THROW_ERROR(status_bad_pi, s);\n\n            PUGI__SCANWHILE(PUGI__IS_CHARTYPE(*s, ct_symbol));\n            PUGI__CHECK_ERROR(status_bad_pi, s);\n\n            // determine node type; stricmp / strcasecmp is not portable\n            bool declaration = (target[0] | ' ') == 'x' && (target[1] | ' ') == 'm' && (target[2] | ' ') == 'l' && target + 3 == s;\n\n            if (declaration ? PUGI__OPTSET(parse_declaration) : PUGI__OPTSET(parse_pi))\n            {\n                if (declaration)\n                {\n                    // disallow non top-level declarations\n                    if (cursor->parent) PUGI__THROW_ERROR(status_bad_pi, s);\n\n                    PUGI__PUSHNODE(node_declaration);\n                }\n                else\n                {\n                    PUGI__PUSHNODE(node_pi);\n                }\n\n                cursor->name = target;\n\n                PUGI__ENDSEG();\n\n                // parse value/attributes\n                if (ch == '?')\n                {\n                    // empty node\n                    if (!PUGI__ENDSWITH(*s, '>')) PUGI__THROW_ERROR(status_bad_pi, s);\n                    s += (*s == '>');\n\n                    PUGI__POPNODE();\n                }\n                else if (PUGI__IS_CHARTYPE(ch, ct_space))\n                {\n                    PUGI__SKIPWS();\n\n                    // scan for tag end\n                    char_t* value = s;\n\n                    PUGI__SCANFOR(s[0] == '?' && PUGI__ENDSWITH(s[1], '>'));\n                    PUGI__CHECK_ERROR(status_bad_pi, s);\n\n                    if (declaration)\n                    {\n                        // replace ending ? with / so that 'element' terminates properly\n                        *s = '/';\n\n                        // we exit from this function with cursor at node_declaration, which is a signal to parse() to go to LOC_ATTRIBUTES\n                        s = value;\n                    }\n                    else\n                    {\n                        // store value and step over >\n                        cursor->value = value;\n                        PUGI__POPNODE();\n\n                        PUGI__ENDSEG();\n\n                        s += (*s == '>');\n                    }\n                }\n                else PUGI__THROW_ERROR(status_bad_pi, s);\n            }\n            else\n            {\n                // scan for tag end\n                PUGI__SCANFOR(s[0] == '?' && PUGI__ENDSWITH(s[1], '>'));\n                PUGI__CHECK_ERROR(status_bad_pi, s);\n\n                s += (s[1] == '>' ? 2 : 1);\n            }\n\n            // store from registers\n            ref_cursor = cursor;\n\n            return s;\n        }\n\n        char_t* parse_tree(char_t* s, xml_node_struct* root, unsigned int optmsk, char_t endch)\n        {\n            strconv_attribute_t strconv_attribute = get_strconv_attribute(optmsk);\n            strconv_pcdata_t strconv_pcdata = get_strconv_pcdata(optmsk);\n            \n            char_t ch = 0;\n            xml_node_struct* cursor = root;\n            char_t* mark = s;\n\n            while (*s != 0)\n            {\n                if (*s == '<')\n                {\n                    ++s;\n\n                LOC_TAG:\n                    if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) // '<#...'\n                    {\n                        PUGI__PUSHNODE(node_element); // Append a new node to the tree.\n\n                        cursor->name = s;\n\n                        PUGI__SCANWHILE_UNROLL(PUGI__IS_CHARTYPE(ss, ct_symbol)); // Scan for a terminator.\n                        PUGI__ENDSEG(); // Save char in 'ch', terminate & step over.\n\n                        if (ch == '>')\n                        {\n                            // end of tag\n                        }\n                        else if (PUGI__IS_CHARTYPE(ch, ct_space))\n                        {\n                        LOC_ATTRIBUTES:\n                            while (true)\n                            {\n                                PUGI__SKIPWS(); // Eat any whitespace.\n                        \n                                if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) // <... #...\n                                {\n                                    xml_attribute_struct* a = append_new_attribute(cursor, alloc); // Make space for this attribute.\n                                    if (!a) PUGI__THROW_ERROR(status_out_of_memory, s);\n\n                                    a->name = s; // Save the offset.\n\n                                    PUGI__SCANWHILE_UNROLL(PUGI__IS_CHARTYPE(ss, ct_symbol)); // Scan for a terminator.\n                                    PUGI__ENDSEG(); // Save char in 'ch', terminate & step over.\n\n                                    if (PUGI__IS_CHARTYPE(ch, ct_space))\n                                    {\n                                        PUGI__SKIPWS(); // Eat any whitespace.\n\n                                        ch = *s;\n                                        ++s;\n                                    }\n                                    \n                                    if (ch == '=') // '<... #=...'\n                                    {\n                                        PUGI__SKIPWS(); // Eat any whitespace.\n\n                                        if (*s == '\"' || *s == '\\'') // '<... #=\"...'\n                                        {\n                                            ch = *s; // Save quote char to avoid breaking on \"''\" -or- '\"\"'.\n                                            ++s; // Step over the quote.\n                                            a->value = s; // Save the offset.\n\n                                            s = strconv_attribute(s, ch);\n                                        \n                                            if (!s) PUGI__THROW_ERROR(status_bad_attribute, a->value);\n\n                                            // After this line the loop continues from the start;\n                                            // Whitespaces, / and > are ok, symbols and EOF are wrong,\n                                            // everything else will be detected\n                                            if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) PUGI__THROW_ERROR(status_bad_attribute, s);\n                                        }\n                                        else PUGI__THROW_ERROR(status_bad_attribute, s);\n                                    }\n                                    else PUGI__THROW_ERROR(status_bad_attribute, s);\n                                }\n                                else if (*s == '/')\n                                {\n                                    ++s;\n                                    \n                                    if (*s == '>')\n                                    {\n                                        PUGI__POPNODE();\n                                        s++;\n                                        break;\n                                    }\n                                    else if (*s == 0 && endch == '>')\n                                    {\n                                        PUGI__POPNODE();\n                                        break;\n                                    }\n                                    else PUGI__THROW_ERROR(status_bad_start_element, s);\n                                }\n                                else if (*s == '>')\n                                {\n                                    ++s;\n\n                                    break;\n                                }\n                                else if (*s == 0 && endch == '>')\n                                {\n                                    break;\n                                }\n                                else PUGI__THROW_ERROR(status_bad_start_element, s);\n                            }\n\n                            // !!!\n                        }\n                        else if (ch == '/') // '<#.../'\n                        {\n                            if (!PUGI__ENDSWITH(*s, '>')) PUGI__THROW_ERROR(status_bad_start_element, s);\n\n                            PUGI__POPNODE(); // Pop.\n\n                            s += (*s == '>');\n                        }\n                        else if (ch == 0)\n                        {\n                            // we stepped over null terminator, backtrack & handle closing tag\n                            --s;\n                            \n                            if (endch != '>') PUGI__THROW_ERROR(status_bad_start_element, s);\n                        }\n                        else PUGI__THROW_ERROR(status_bad_start_element, s);\n                    }\n                    else if (*s == '/')\n                    {\n                        ++s;\n\n                        char_t* name = cursor->name;\n                        if (!name) PUGI__THROW_ERROR(status_end_element_mismatch, s);\n                        \n                        while (PUGI__IS_CHARTYPE(*s, ct_symbol))\n                        {\n                            if (*s++ != *name++) PUGI__THROW_ERROR(status_end_element_mismatch, s);\n                        }\n\n                        if (*name)\n                        {\n                            if (*s == 0 && name[0] == endch && name[1] == 0) PUGI__THROW_ERROR(status_bad_end_element, s);\n                            else PUGI__THROW_ERROR(status_end_element_mismatch, s);\n                        }\n                            \n                        PUGI__POPNODE(); // Pop.\n\n                        PUGI__SKIPWS();\n\n                        if (*s == 0)\n                        {\n                            if (endch != '>') PUGI__THROW_ERROR(status_bad_end_element, s);\n                        }\n                        else\n                        {\n                            if (*s != '>') PUGI__THROW_ERROR(status_bad_end_element, s);\n                            ++s;\n                        }\n                    }\n                    else if (*s == '?') // '<?...'\n                    {\n                        s = parse_question(s, cursor, optmsk, endch);\n                        if (!s) return s;\n\n                        assert(cursor);\n                        if (PUGI__NODETYPE(cursor) == node_declaration) goto LOC_ATTRIBUTES;\n                    }\n                    else if (*s == '!') // '<!...'\n                    {\n                        s = parse_exclamation(s, cursor, optmsk, endch);\n                        if (!s) return s;\n                    }\n                    else if (*s == 0 && endch == '?') PUGI__THROW_ERROR(status_bad_pi, s);\n                    else PUGI__THROW_ERROR(status_unrecognized_tag, s);\n                }\n                else\n                {\n                    mark = s; // Save this offset while searching for a terminator.\n\n                    PUGI__SKIPWS(); // Eat whitespace if no genuine PCDATA here.\n\n                    if (*s == '<' || !*s)\n                    {\n                        // We skipped some whitespace characters because otherwise we would take the tag branch instead of PCDATA one\n                        assert(mark != s);\n\n                        if (!PUGI__OPTSET(parse_ws_pcdata | parse_ws_pcdata_single) || PUGI__OPTSET(parse_trim_pcdata))\n                        {\n                            continue;\n                        }\n                        else if (PUGI__OPTSET(parse_ws_pcdata_single))\n                        {\n                            if (s[0] != '<' || s[1] != '/' || cursor->first_child) continue;\n                        }\n                    }\n\n                    if (!PUGI__OPTSET(parse_trim_pcdata))\n                        s = mark;\n                            \n                    if (cursor->parent || PUGI__OPTSET(parse_fragment))\n                    {\n                        PUGI__PUSHNODE(node_pcdata); // Append a new node on the tree.\n                        cursor->value = s; // Save the offset.\n\n                        s = strconv_pcdata(s);\n                                \n                        PUGI__POPNODE(); // Pop since this is a standalone.\n                        \n                        if (!*s) break;\n                    }\n                    else\n                    {\n                        PUGI__SCANFOR(*s == '<'); // '...<'\n                        if (!*s) break;\n                        \n                        ++s;\n                    }\n\n                    // We're after '<'\n                    goto LOC_TAG;\n                }\n            }\n\n            // check that last tag is closed\n            if (cursor != root) PUGI__THROW_ERROR(status_end_element_mismatch, s);\n\n            return s;\n        }\n\n    #ifdef PUGIXML_WCHAR_MODE\n        static char_t* parse_skip_bom(char_t* s)\n        {\n            unsigned int bom = 0xfeff;\n            return (s[0] == static_cast<wchar_t>(bom)) ? s + 1 : s;\n        }\n    #else\n        static char_t* parse_skip_bom(char_t* s)\n        {\n            return (s[0] == '\\xef' && s[1] == '\\xbb' && s[2] == '\\xbf') ? s + 3 : s;\n        }\n    #endif\n\n        static bool has_element_node_siblings(xml_node_struct* node)\n        {\n            while (node)\n            {\n                if (PUGI__NODETYPE(node) == node_element) return true;\n\n                node = node->next_sibling;\n            }\n\n            return false;\n        }\n\n        static xml_parse_result parse(char_t* buffer, size_t length, xml_document_struct* xmldoc, xml_node_struct* root, unsigned int optmsk)\n        {\n            // allocator object is a part of document object\n            xml_allocator& alloc_ = *static_cast<xml_allocator*>(xmldoc);\n\n            // early-out for empty documents\n            if (length == 0)\n                return make_parse_result(PUGI__OPTSET(parse_fragment) ? status_ok : status_no_document_element);\n\n            // get last child of the root before parsing\n            xml_node_struct* last_root_child = root->first_child ? root->first_child->prev_sibling_c : 0;\n    \n            // create parser on stack\n            xml_parser parser(alloc_);\n\n            // save last character and make buffer zero-terminated (speeds up parsing)\n            char_t endch = buffer[length - 1];\n            buffer[length - 1] = 0;\n            \n            // skip BOM to make sure it does not end up as part of parse output\n            char_t* buffer_data = parse_skip_bom(buffer);\n\n            // perform actual parsing\n            parser.parse_tree(buffer_data, root, optmsk, endch);\n\n            // update allocator state\n            alloc_ = parser.alloc;\n\n            xml_parse_result result = make_parse_result(parser.error_status, parser.error_offset ? parser.error_offset - buffer : 0);\n            assert(result.offset >= 0 && static_cast<size_t>(result.offset) <= length);\n\n            if (result)\n            {\n                // since we removed last character, we have to handle the only possible false positive (stray <)\n                if (endch == '<')\n                    return make_parse_result(status_unrecognized_tag, length - 1);\n\n                // check if there are any element nodes parsed\n                xml_node_struct* first_root_child_parsed = last_root_child ? last_root_child->next_sibling : root->first_child;\n\n                if (!PUGI__OPTSET(parse_fragment) && !has_element_node_siblings(first_root_child_parsed))\n                    return make_parse_result(status_no_document_element, length - 1);\n            }\n            else\n            {\n                // roll back offset if it occurs on a null terminator in the source buffer\n                if (result.offset > 0 && static_cast<size_t>(result.offset) == length - 1 && endch == 0)\n                    result.offset--;\n            }\n\n            return result;\n        }\n    };\n\n    // Output facilities\n    PUGI__FN xml_encoding get_write_native_encoding()\n    {\n    #ifdef PUGIXML_WCHAR_MODE\n        return get_wchar_encoding();\n    #else\n        return encoding_utf8;\n    #endif\n    }\n\n    PUGI__FN xml_encoding get_write_encoding(xml_encoding encoding)\n    {\n        // replace wchar encoding with utf implementation\n        if (encoding == encoding_wchar) return get_wchar_encoding();\n\n        // replace utf16 encoding with utf16 with specific endianness\n        if (encoding == encoding_utf16) return is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n        // replace utf32 encoding with utf32 with specific endianness\n        if (encoding == encoding_utf32) return is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n        // only do autodetection if no explicit encoding is requested\n        if (encoding != encoding_auto) return encoding;\n\n        // assume utf8 encoding\n        return encoding_utf8;\n    }\n\n#ifdef PUGIXML_WCHAR_MODE\n    PUGI__FN size_t get_valid_length(const char_t* data, size_t length)\n    {\n        if (length < 1) return 0;\n\n        // discard last character if it's the lead of a surrogate pair \n        return (sizeof(wchar_t) == 2 && static_cast<unsigned int>(static_cast<uint16_t>(data[length - 1]) - 0xD800) < 0x400) ? length - 1 : length;\n    }\n\n    PUGI__FN size_t convert_buffer_output(char_t* r_char, uint8_t* r_u8, uint16_t* r_u16, uint32_t* r_u32, const char_t* data, size_t length, xml_encoding encoding)\n    {\n        // only endian-swapping is required\n        if (need_endian_swap_utf(encoding, get_wchar_encoding()))\n        {\n            convert_wchar_endian_swap(r_char, data, length);\n\n            return length * sizeof(char_t);\n        }\n    \n        // convert to utf8\n        if (encoding == encoding_utf8)\n        {\n            uint8_t* dest = r_u8;\n            uint8_t* end = utf_decoder<utf8_writer>::decode_wchar_block(data, length, dest);\n\n            return static_cast<size_t>(end - dest);\n        }\n\n        // convert to utf16\n        if (encoding == encoding_utf16_be || encoding == encoding_utf16_le)\n        {\n            uint16_t* dest = r_u16;\n\n            // convert to native utf16\n            uint16_t* end = utf_decoder<utf16_writer>::decode_wchar_block(data, length, dest);\n\n            // swap if necessary\n            xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n            if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));\n\n            return static_cast<size_t>(end - dest) * sizeof(uint16_t);\n        }\n\n        // convert to utf32\n        if (encoding == encoding_utf32_be || encoding == encoding_utf32_le)\n        {\n            uint32_t* dest = r_u32;\n\n            // convert to native utf32\n            uint32_t* end = utf_decoder<utf32_writer>::decode_wchar_block(data, length, dest);\n\n            // swap if necessary\n            xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n            if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));\n\n            return static_cast<size_t>(end - dest) * sizeof(uint32_t);\n        }\n\n        // convert to latin1\n        if (encoding == encoding_latin1)\n        {\n            uint8_t* dest = r_u8;\n            uint8_t* end = utf_decoder<latin1_writer>::decode_wchar_block(data, length, dest);\n\n            return static_cast<size_t>(end - dest);\n        }\n\n        assert(!\"Invalid encoding\");\n        return 0;\n    }\n#else\n    PUGI__FN size_t get_valid_length(const char_t* data, size_t length)\n    {\n        if (length < 5) return 0;\n\n        for (size_t i = 1; i <= 4; ++i)\n        {\n            uint8_t ch = static_cast<uint8_t>(data[length - i]);\n\n            // either a standalone character or a leading one\n            if ((ch & 0xc0) != 0x80) return length - i;\n        }\n\n        // there are four non-leading characters at the end, sequence tail is broken so might as well process the whole chunk\n        return length;\n    }\n\n    PUGI__FN size_t convert_buffer_output(char_t* /* r_char */, uint8_t* r_u8, uint16_t* r_u16, uint32_t* r_u32, const char_t* data, size_t length, xml_encoding encoding)\n    {\n        if (encoding == encoding_utf16_be || encoding == encoding_utf16_le)\n        {\n            uint16_t* dest = r_u16;\n\n            // convert to native utf16\n            uint16_t* end = utf_decoder<utf16_writer>::decode_utf8_block(reinterpret_cast<const uint8_t*>(data), length, dest);\n\n            // swap if necessary\n            xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n            if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));\n\n            return static_cast<size_t>(end - dest) * sizeof(uint16_t);\n        }\n\n        if (encoding == encoding_utf32_be || encoding == encoding_utf32_le)\n        {\n            uint32_t* dest = r_u32;\n\n            // convert to native utf32\n            uint32_t* end = utf_decoder<utf32_writer>::decode_utf8_block(reinterpret_cast<const uint8_t*>(data), length, dest);\n\n            // swap if necessary\n            xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n            if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));\n\n            return static_cast<size_t>(end - dest) * sizeof(uint32_t);\n        }\n\n        if (encoding == encoding_latin1)\n        {\n            uint8_t* dest = r_u8;\n            uint8_t* end = utf_decoder<latin1_writer>::decode_utf8_block(reinterpret_cast<const uint8_t*>(data), length, dest);\n\n            return static_cast<size_t>(end - dest);\n        }\n\n        assert(!\"Invalid encoding\");\n        return 0;\n    }\n#endif\n\n    class xml_buffered_writer\n    {\n        xml_buffered_writer(const xml_buffered_writer&);\n        xml_buffered_writer& operator=(const xml_buffered_writer&);\n\n    public:\n        xml_buffered_writer(xml_writer& writer_, xml_encoding user_encoding): writer(writer_), bufsize(0), encoding(get_write_encoding(user_encoding))\n        {\n            PUGI__STATIC_ASSERT(bufcapacity >= 8);\n        }\n\n        ~xml_buffered_writer()\n        {\n            flush();\n        }\n\n        size_t flush()\n        {\n            flush(buffer, bufsize);\n            bufsize = 0;\n            return 0;\n        }\n\n        void flush(const char_t* data, size_t size)\n        {\n            if (size == 0) return;\n\n            // fast path, just write data\n            if (encoding == get_write_native_encoding())\n                writer.write(data, size * sizeof(char_t));\n            else\n            {\n                // convert chunk\n                size_t result = convert_buffer_output(scratch.data_char, scratch.data_u8, scratch.data_u16, scratch.data_u32, data, size, encoding);\n                assert(result <= sizeof(scratch));\n\n                // write data\n                writer.write(scratch.data_u8, result);\n            }\n        }\n\n        void write_direct(const char_t* data, size_t length)\n        {\n            // flush the remaining buffer contents\n            flush();\n\n            // handle large chunks\n            if (length > bufcapacity)\n            {\n                if (encoding == get_write_native_encoding())\n                {\n                    // fast path, can just write data chunk\n                    writer.write(data, length * sizeof(char_t));\n                    return;\n                }\n\n                // need to convert in suitable chunks\n                while (length > bufcapacity)\n                {\n                    // get chunk size by selecting such number of characters that are guaranteed to fit into scratch buffer\n                    // and form a complete codepoint sequence (i.e. discard start of last codepoint if necessary)\n                    size_t chunk_size = get_valid_length(data, bufcapacity);\n                    assert(chunk_size);\n\n                    // convert chunk and write\n                    flush(data, chunk_size);\n\n                    // iterate\n                    data += chunk_size;\n                    length -= chunk_size;\n                }\n\n                // small tail is copied below\n                bufsize = 0;\n            }\n\n            memcpy(buffer + bufsize, data, length * sizeof(char_t));\n            bufsize += length;\n        }\n\n        void write_buffer(const char_t* data, size_t length)\n        {\n            size_t offset = bufsize;\n\n            if (offset + length <= bufcapacity)\n            {\n                memcpy(buffer + offset, data, length * sizeof(char_t));\n                bufsize = offset + length;\n            }\n            else\n            {\n                write_direct(data, length);\n            }\n        }\n\n        void write_string(const char_t* data)\n        {\n            // write the part of the string that fits in the buffer\n            size_t offset = bufsize;\n\n            while (*data && offset < bufcapacity)\n                buffer[offset++] = *data++;\n\n            // write the rest\n            if (offset < bufcapacity)\n            {\n                bufsize = offset;\n            }\n            else\n            {\n                // backtrack a bit if we have split the codepoint\n                size_t length = offset - bufsize;\n                size_t extra = length - get_valid_length(data - length, length);\n\n                bufsize = offset - extra;\n\n                write_direct(data - extra, strlength(data) + extra);\n            }\n        }\n\n        void write(char_t d0)\n        {\n            size_t offset = bufsize;\n            if (offset > bufcapacity - 1) offset = flush();\n\n            buffer[offset + 0] = d0;\n            bufsize = offset + 1;\n        }\n\n        void write(char_t d0, char_t d1)\n        {\n            size_t offset = bufsize;\n            if (offset > bufcapacity - 2) offset = flush();\n\n            buffer[offset + 0] = d0;\n            buffer[offset + 1] = d1;\n            bufsize = offset + 2;\n        }\n\n        void write(char_t d0, char_t d1, char_t d2)\n        {\n            size_t offset = bufsize;\n            if (offset > bufcapacity - 3) offset = flush();\n\n            buffer[offset + 0] = d0;\n            buffer[offset + 1] = d1;\n            buffer[offset + 2] = d2;\n            bufsize = offset + 3;\n        }\n\n        void write(char_t d0, char_t d1, char_t d2, char_t d3)\n        {\n            size_t offset = bufsize;\n            if (offset > bufcapacity - 4) offset = flush();\n\n            buffer[offset + 0] = d0;\n            buffer[offset + 1] = d1;\n            buffer[offset + 2] = d2;\n            buffer[offset + 3] = d3;\n            bufsize = offset + 4;\n        }\n\n        void write(char_t d0, char_t d1, char_t d2, char_t d3, char_t d4)\n        {\n            size_t offset = bufsize;\n            if (offset > bufcapacity - 5) offset = flush();\n\n            buffer[offset + 0] = d0;\n            buffer[offset + 1] = d1;\n            buffer[offset + 2] = d2;\n            buffer[offset + 3] = d3;\n            buffer[offset + 4] = d4;\n            bufsize = offset + 5;\n        }\n\n        void write(char_t d0, char_t d1, char_t d2, char_t d3, char_t d4, char_t d5)\n        {\n            size_t offset = bufsize;\n            if (offset > bufcapacity - 6) offset = flush();\n\n            buffer[offset + 0] = d0;\n            buffer[offset + 1] = d1;\n            buffer[offset + 2] = d2;\n            buffer[offset + 3] = d3;\n            buffer[offset + 4] = d4;\n            buffer[offset + 5] = d5;\n            bufsize = offset + 6;\n        }\n\n        // utf8 maximum expansion: x4 (-> utf32)\n        // utf16 maximum expansion: x2 (-> utf32)\n        // utf32 maximum expansion: x1\n        enum\n        {\n            bufcapacitybytes =\n            #ifdef PUGIXML_MEMORY_OUTPUT_STACK\n                PUGIXML_MEMORY_OUTPUT_STACK\n            #else\n                10240\n            #endif\n            ,\n            bufcapacity = bufcapacitybytes / (sizeof(char_t) + 4)\n        };\n\n        char_t buffer[bufcapacity];\n\n        union\n        {\n            uint8_t data_u8[4 * bufcapacity];\n            uint16_t data_u16[2 * bufcapacity];\n            uint32_t data_u32[bufcapacity];\n            char_t data_char[bufcapacity];\n        } scratch;\n\n        xml_writer& writer;\n        size_t bufsize;\n        xml_encoding encoding;\n    };\n\n    PUGI__FN void text_output_escaped(xml_buffered_writer& writer, const char_t* s, chartypex_t type)\n    {\n        while (*s)\n        {\n            const char_t* prev = s;\n            \n            // While *s is a usual symbol\n            PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPEX(ss, type));\n        \n            writer.write_buffer(prev, static_cast<size_t>(s - prev));\n\n            switch (*s)\n            {\n                case 0: break;\n                case '&':\n                    writer.write('&', 'a', 'm', 'p', ';');\n                    ++s;\n                    break;\n                case '<':\n                    writer.write('&', 'l', 't', ';');\n                    ++s;\n                    break;\n                case '>':\n                    writer.write('&', 'g', 't', ';');\n                    ++s;\n                    break;\n                case '\"':\n                    writer.write('&', 'q', 'u', 'o', 't', ';');\n                    ++s;\n                    break;\n                default: // s is not a usual symbol\n                {\n                    unsigned int ch = static_cast<unsigned int>(*s++);\n                    assert(ch < 32);\n\n                    writer.write('&', '#', static_cast<char_t>((ch / 10) + '0'), static_cast<char_t>((ch % 10) + '0'), ';');\n                }\n            }\n        }\n    }\n\n    PUGI__FN void text_output(xml_buffered_writer& writer, const char_t* s, chartypex_t type, unsigned int flags)\n    {\n        if (flags & format_no_escapes)\n            writer.write_string(s);\n        else\n            text_output_escaped(writer, s, type);\n    }\n\n    PUGI__FN void text_output_cdata(xml_buffered_writer& writer, const char_t* s)\n    {\n        do\n        {\n            writer.write('<', '!', '[', 'C', 'D');\n            writer.write('A', 'T', 'A', '[');\n\n            const char_t* prev = s;\n\n            // look for ]]> sequence - we can't output it as is since it terminates CDATA\n            while (*s && !(s[0] == ']' && s[1] == ']' && s[2] == '>')) ++s;\n\n            // skip ]] if we stopped at ]]>, > will go to the next CDATA section\n            if (*s) s += 2;\n\n            writer.write_buffer(prev, static_cast<size_t>(s - prev));\n\n            writer.write(']', ']', '>');\n        }\n        while (*s);\n    }\n\n    PUGI__FN void text_output_indent(xml_buffered_writer& writer, const char_t* indent, size_t indent_length, unsigned int depth)\n    {\n        switch (indent_length)\n        {\n        case 1:\n        {\n            for (unsigned int i = 0; i < depth; ++i)\n                writer.write(indent[0]);\n            break;\n        }\n\n        case 2:\n        {\n            for (unsigned int i = 0; i < depth; ++i)\n                writer.write(indent[0], indent[1]);\n            break;\n        }\n\n        case 3:\n        {\n            for (unsigned int i = 0; i < depth; ++i)\n                writer.write(indent[0], indent[1], indent[2]);\n            break;\n        }\n\n        case 4:\n        {\n            for (unsigned int i = 0; i < depth; ++i)\n                writer.write(indent[0], indent[1], indent[2], indent[3]);\n            break;\n        }\n\n        default:\n        {\n            for (unsigned int i = 0; i < depth; ++i)\n                writer.write_buffer(indent, indent_length);\n        }\n        }\n    }\n\n    PUGI__FN void node_output_comment(xml_buffered_writer& writer, const char_t* s)\n    {\n        writer.write('<', '!', '-', '-');\n\n        while (*s)\n        {\n            const char_t* prev = s;\n\n            // look for -\\0 or -- sequence - we can't output it since -- is illegal in comment body\n            while (*s && !(s[0] == '-' && (s[1] == '-' || s[1] == 0))) ++s;\n\n            writer.write_buffer(prev, static_cast<size_t>(s - prev));\n\n            if (*s)\n            {\n                assert(*s == '-');\n\n                writer.write('-', ' ');\n                ++s;\n            }\n        }\n\n        writer.write('-', '-', '>');\n    }\n\n    PUGI__FN void node_output_pi_value(xml_buffered_writer& writer, const char_t* s)\n    {\n        while (*s)\n        {\n            const char_t* prev = s;\n\n            // look for ?> sequence - we can't output it since ?> terminates PI\n            while (*s && !(s[0] == '?' && s[1] == '>')) ++s;\n\n            writer.write_buffer(prev, static_cast<size_t>(s - prev));\n\n            if (*s)\n            {\n                assert(s[0] == '?' && s[1] == '>');\n\n                writer.write('?', ' ', '>');\n                s += 2;\n            }\n        }\n    }\n\n    PUGI__FN void node_output_attributes(xml_buffered_writer& writer, xml_node_struct* node, unsigned int flags)\n    {\n        const char_t* default_name = PUGIXML_TEXT(\":anonymous\");\n\n        for (xml_attribute_struct* a = node->first_attribute; a; a = a->next_attribute)\n        {\n            writer.write(' ');\n            writer.write_string(a->name ? a->name : default_name);\n            writer.write('=', '\"');\n\n            if (a->value)\n                text_output(writer, a->value, ctx_special_attr, flags);\n\n            writer.write('\"');\n        }\n    }\n\n    PUGI__FN bool node_output_start(xml_buffered_writer& writer, xml_node_struct* node, unsigned int flags)\n    {\n        const char_t* default_name = PUGIXML_TEXT(\":anonymous\");\n        const char_t* name = node->name ? node->name : default_name;\n\n        writer.write('<');\n        writer.write_string(name);\n\n        if (node->first_attribute)\n            node_output_attributes(writer, node, flags);\n\n        if (!node->first_child)\n        {\n            writer.write(' ', '/', '>');\n\n            return false;\n        }\n        else\n        {\n            writer.write('>');\n\n            return true;\n        }\n    }\n\n    PUGI__FN void node_output_end(xml_buffered_writer& writer, xml_node_struct* node)\n    {\n        const char_t* default_name = PUGIXML_TEXT(\":anonymous\");\n        const char_t* name = node->name ? node->name : default_name;\n\n        writer.write('<', '/');\n        writer.write_string(name);\n        writer.write('>');\n    }\n\n    PUGI__FN void node_output_simple(xml_buffered_writer& writer, xml_node_struct* node, unsigned int flags)\n    {\n        const char_t* default_name = PUGIXML_TEXT(\":anonymous\");\n\n        switch (PUGI__NODETYPE(node))\n        {\n            case node_pcdata:\n                text_output(writer, node->value ? node->value : PUGIXML_TEXT(\"\"), ctx_special_pcdata, flags);\n                break;\n\n            case node_cdata:\n                text_output_cdata(writer, node->value ? node->value : PUGIXML_TEXT(\"\"));\n                break;\n\n            case node_comment:\n                node_output_comment(writer, node->value ? node->value : PUGIXML_TEXT(\"\"));\n                break;\n\n            case node_pi:\n                writer.write('<', '?');\n                writer.write_string(node->name ? node->name : default_name);\n\n                if (node->value)\n                {\n                    writer.write(' ');\n                    node_output_pi_value(writer, node->value);\n                }\n\n                writer.write('?', '>');\n                break;\n\n            case node_declaration:\n                writer.write('<', '?');\n                writer.write_string(node->name ? node->name : default_name);\n                node_output_attributes(writer, node, flags);\n                writer.write('?', '>');\n                break;\n\n            case node_doctype:\n                writer.write('<', '!', 'D', 'O', 'C');\n                writer.write('T', 'Y', 'P', 'E');\n\n                if (node->value)\n                {\n                    writer.write(' ');\n                    writer.write_string(node->value);\n                }\n\n                writer.write('>');\n                break;\n\n            default:\n                assert(!\"Invalid node type\");\n        }\n    }\n\n    enum indent_flags_t\n    {\n        indent_newline = 1,\n        indent_indent = 2\n    };\n\n    PUGI__FN void node_output(xml_buffered_writer& writer, xml_node_struct* root, const char_t* indent, unsigned int flags, unsigned int depth)\n    {\n        size_t indent_length = ((flags & (format_indent | format_raw)) == format_indent) ? strlength(indent) : 0;\n        unsigned int indent_flags = indent_indent;\n\n        xml_node_struct* node = root;\n\n        do\n        {\n            assert(node);\n\n            // begin writing current node\n            if (PUGI__NODETYPE(node) == node_pcdata || PUGI__NODETYPE(node) == node_cdata)\n            {\n                node_output_simple(writer, node, flags);\n\n                indent_flags = 0;\n            }\n            else\n            {\n                if ((indent_flags & indent_newline) && (flags & format_raw) == 0)\n                    writer.write('\\n');\n\n                if ((indent_flags & indent_indent) && indent_length)\n                    text_output_indent(writer, indent, indent_length, depth);\n\n                if (PUGI__NODETYPE(node) == node_element)\n                {\n                    indent_flags = indent_newline | indent_indent;\n\n                    if (node_output_start(writer, node, flags))\n                    {\n                        node = node->first_child;\n                        depth++;\n                        continue;\n                    }\n                }\n                else if (PUGI__NODETYPE(node) == node_document)\n                {\n                    indent_flags = indent_indent;\n\n                    if (node->first_child)\n                    {\n                        node = node->first_child;\n                        continue;\n                    }\n                }\n                else\n                {\n                    node_output_simple(writer, node, flags);\n\n                    indent_flags = indent_newline | indent_indent;\n                }\n            }\n\n            // continue to the next node\n            while (node != root)\n            {\n                if (node->next_sibling)\n                {\n                    node = node->next_sibling;\n                    break;\n                }\n\n                node = node->parent;\n\n                // write closing node\n                if (PUGI__NODETYPE(node) == node_element)\n                {\n                    depth--;\n\n                    if ((indent_flags & indent_newline) && (flags & format_raw) == 0)\n                        writer.write('\\n');\n\n                    if ((indent_flags & indent_indent) && indent_length)\n                        text_output_indent(writer, indent, indent_length, depth);\n\n                    node_output_end(writer, node);\n\n                    indent_flags = indent_newline | indent_indent;\n                }\n            }\n        }\n        while (node != root);\n\n        if ((indent_flags & indent_newline) && (flags & format_raw) == 0)\n            writer.write('\\n');\n    }\n\n    PUGI__FN bool has_declaration(xml_node_struct* node)\n    {\n        for (xml_node_struct* child = node->first_child; child; child = child->next_sibling)\n        {\n            xml_node_type type = PUGI__NODETYPE(child);\n\n            if (type == node_declaration) return true;\n            if (type == node_element) return false;\n        }\n\n        return false;\n    }\n\n    PUGI__FN bool is_attribute_of(xml_attribute_struct* attr, xml_node_struct* node)\n    {\n        for (xml_attribute_struct* a = node->first_attribute; a; a = a->next_attribute)\n            if (a == attr)\n                return true;\n\n        return false;\n    }\n\n    PUGI__FN bool allow_insert_attribute(xml_node_type parent)\n    {\n        return parent == node_element || parent == node_declaration;\n    }\n\n    PUGI__FN bool allow_insert_child(xml_node_type parent, xml_node_type child)\n    {\n        if (parent != node_document && parent != node_element) return false;\n        if (child == node_document || child == node_null) return false;\n        if (parent != node_document && (child == node_declaration || child == node_doctype)) return false;\n\n        return true;\n    }\n\n    PUGI__FN bool allow_move(xml_node parent, xml_node child)\n    {\n        // check that child can be a child of parent\n        if (!allow_insert_child(parent.type(), child.type()))\n            return false;\n\n        // check that node is not moved between documents\n        if (parent.root() != child.root())\n            return false;\n\n        // check that new parent is not in the child subtree\n        xml_node cur = parent;\n\n        while (cur)\n        {\n            if (cur == child)\n                return false;\n\n            cur = cur.parent();\n        }\n\n        return true;\n    }\n\n    PUGI__FN void node_copy_string(char_t*& dest, uintptr_t& header, uintptr_t header_mask, char_t* source, uintptr_t& source_header, xml_allocator* alloc)\n    {\n        assert(!dest && (header & header_mask) == 0);\n\n        if (source)\n        {\n            if (alloc && (source_header & header_mask) == 0)\n            {\n                dest = source;\n\n                // since strcpy_insitu can reuse document buffer memory we need to mark both source and dest as shared\n                header |= xml_memory_page_contents_shared_mask;\n                source_header |= xml_memory_page_contents_shared_mask;\n            }\n            else\n                strcpy_insitu(dest, header, header_mask, source);\n        }\n    }\n\n    PUGI__FN void node_copy_contents(xml_node_struct* dn, xml_node_struct* sn, xml_allocator* shared_alloc)\n    {\n        node_copy_string(dn->name, dn->header, xml_memory_page_name_allocated_mask, sn->name, sn->header, shared_alloc);\n        node_copy_string(dn->value, dn->header, xml_memory_page_value_allocated_mask, sn->value, sn->header, shared_alloc);\n\n        for (xml_attribute_struct* sa = sn->first_attribute; sa; sa = sa->next_attribute)\n        {\n            xml_attribute_struct* da = append_new_attribute(dn, get_allocator(dn));\n\n            if (da)\n            {\n                node_copy_string(da->name, da->header, xml_memory_page_name_allocated_mask, sa->name, sa->header, shared_alloc);\n                node_copy_string(da->value, da->header, xml_memory_page_value_allocated_mask, sa->value, sa->header, shared_alloc);\n            }\n        }\n    }\n\n    PUGI__FN void node_copy_tree(xml_node_struct* dn, xml_node_struct* sn)\n    {\n        xml_allocator& alloc = get_allocator(dn);\n        xml_allocator* shared_alloc = (&alloc == &get_allocator(sn)) ? &alloc : 0;\n\n        node_copy_contents(dn, sn, shared_alloc);\n\n        xml_node_struct* dit = dn;\n        xml_node_struct* sit = sn->first_child;\n\n        while (sit && sit != sn)\n        {\n            if (sit != dn)\n            {\n                xml_node_struct* copy = append_new_node(dit, alloc, PUGI__NODETYPE(sit));\n\n                if (copy)\n                {\n                    node_copy_contents(copy, sit, shared_alloc);\n\n                    if (sit->first_child)\n                    {\n                        dit = copy;\n                        sit = sit->first_child;\n                        continue;\n                    }\n                }\n            }\n\n            // continue to the next node\n            do\n            {\n                if (sit->next_sibling)\n                {\n                    sit = sit->next_sibling;\n                    break;\n                }\n\n                sit = sit->parent;\n                dit = dit->parent;\n            }\n            while (sit != sn);\n        }\n    }\n\n    inline bool is_text_node(xml_node_struct* node)\n    {\n        xml_node_type type = PUGI__NODETYPE(node);\n\n        return type == node_pcdata || type == node_cdata;\n    }\n\n    // get value with conversion functions\n    PUGI__FN int get_integer_base(const char_t* value)\n    {\n        const char_t* s = value;\n\n        while (PUGI__IS_CHARTYPE(*s, ct_space))\n            s++;\n\n        if (*s == '-')\n            s++;\n\n        return (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) ? 16 : 10;\n    }\n\n    PUGI__FN int get_value_int(const char_t* value, int def)\n    {\n        if (!value) return def;\n\n        int base = get_integer_base(value);\n\n    #ifdef PUGIXML_WCHAR_MODE\n        return static_cast<int>(wcstol(value, 0, base));\n    #else\n        return static_cast<int>(strtol(value, 0, base));\n    #endif\n    }\n\n    PUGI__FN unsigned int get_value_uint(const char_t* value, unsigned int def)\n    {\n        if (!value) return def;\n\n        int base = get_integer_base(value);\n\n    #ifdef PUGIXML_WCHAR_MODE\n        return static_cast<unsigned int>(wcstoul(value, 0, base));\n    #else\n        return static_cast<unsigned int>(strtoul(value, 0, base));\n    #endif\n    }\n\n    PUGI__FN double get_value_double(const char_t* value, double def)\n    {\n        if (!value) return def;\n\n    #ifdef PUGIXML_WCHAR_MODE\n        return wcstod(value, 0);\n    #else\n        return strtod(value, 0);\n    #endif\n    }\n\n    PUGI__FN float get_value_float(const char_t* value, float def)\n    {\n        if (!value) return def;\n\n    #ifdef PUGIXML_WCHAR_MODE\n        return static_cast<float>(wcstod(value, 0));\n    #else\n        return static_cast<float>(strtod(value, 0));\n    #endif\n    }\n\n    PUGI__FN bool get_value_bool(const char_t* value, bool def)\n    {\n        if (!value) return def;\n\n        // only look at first char\n        char_t first = *value;\n\n        // 1*, t* (true), T* (True), y* (yes), Y* (YES)\n        return (first == '1' || first == 't' || first == 'T' || first == 'y' || first == 'Y');\n    }\n\n#ifdef PUGIXML_HAS_LONG_LONG\n    PUGI__FN long long get_value_llong(const char_t* value, long long def)\n    {\n        if (!value) return def;\n\n        int base = get_integer_base(value);\n\n    #ifdef PUGIXML_WCHAR_MODE\n        #ifdef PUGI__MSVC_CRT_VERSION\n            return _wcstoi64(value, 0, base);\n        #else\n            return wcstoll(value, 0, base);\n        #endif\n    #else\n        #ifdef PUGI__MSVC_CRT_VERSION\n            return _strtoi64(value, 0, base);\n        #else\n            return strtoll(value, 0, base);\n        #endif\n    #endif\n    }\n\n    PUGI__FN unsigned long long get_value_ullong(const char_t* value, unsigned long long def)\n    {\n        if (!value) return def;\n\n        int base = get_integer_base(value);\n\n    #ifdef PUGIXML_WCHAR_MODE\n        #ifdef PUGI__MSVC_CRT_VERSION\n            return _wcstoui64(value, 0, base);\n        #else\n            return wcstoull(value, 0, base);\n        #endif\n    #else\n        #ifdef PUGI__MSVC_CRT_VERSION\n            return _strtoui64(value, 0, base);\n        #else\n            return strtoull(value, 0, base);\n        #endif\n    #endif\n    }\n#endif\n\n    // set value with conversion functions\n    PUGI__FN bool set_value_buffer(char_t*& dest, uintptr_t& header, uintptr_t header_mask, char (&buf)[128])\n    {\n    #ifdef PUGIXML_WCHAR_MODE\n        char_t wbuf[128];\n        impl::widen_ascii(wbuf, buf);\n\n        return strcpy_insitu(dest, header, header_mask, wbuf);\n    #else\n        return strcpy_insitu(dest, header, header_mask, buf);\n    #endif\n    }\n\n    PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, int value)\n    {\n        char buf[128];\n        sprintf(buf, \"%d\", value);\n    \n        return set_value_buffer(dest, header, header_mask, buf);\n    }\n\n    PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, unsigned int value)\n    {\n        char buf[128];\n        sprintf(buf, \"%u\", value);\n\n        return set_value_buffer(dest, header, header_mask, buf);\n    }\n\n    PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, float value)\n    {\n        char buf[128];\n        sprintf(buf, \"%.9g\", value);\n\n        return set_value_buffer(dest, header, header_mask, buf);\n    }\n    \n    PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, double value)\n    {\n        char buf[128];\n        sprintf(buf, \"%.17g\", value);\n\n        return set_value_buffer(dest, header, header_mask, buf);\n    }\n    \n    PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, bool value)\n    {\n        return strcpy_insitu(dest, header, header_mask, value ? PUGIXML_TEXT(\"true\") : PUGIXML_TEXT(\"false\"));\n    }\n\n#ifdef PUGIXML_HAS_LONG_LONG\n    PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, long long value)\n    {\n        char buf[128];\n        sprintf(buf, \"%lld\", value);\n    \n        return set_value_buffer(dest, header, header_mask, buf);\n    }\n\n    PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, unsigned long long value)\n    {\n        char buf[128];\n        sprintf(buf, \"%llu\", value);\n    \n        return set_value_buffer(dest, header, header_mask, buf);\n    }\n#endif\n\n    // we need to get length of entire file to load it in memory; the only (relatively) sane way to do it is via seek/tell trick\n    PUGI__FN xml_parse_status get_file_size(FILE* file, size_t& out_result)\n    {\n    #if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE)\n        // there are 64-bit versions of fseek/ftell, let's use them\n        typedef __int64 length_type;\n\n        _fseeki64(file, 0, SEEK_END);\n        length_type length = _ftelli64(file);\n        _fseeki64(file, 0, SEEK_SET);\n    #elif defined(__MINGW32__) && !defined(__NO_MINGW_LFS) && (!defined(__STRICT_ANSI__) || defined(__MINGW64_VERSION_MAJOR))\n        // there are 64-bit versions of fseek/ftell, let's use them\n        typedef off64_t length_type;\n\n        fseeko64(file, 0, SEEK_END);\n        length_type length = ftello64(file);\n        fseeko64(file, 0, SEEK_SET);\n    #else\n        // if this is a 32-bit OS, long is enough; if this is a unix system, long is 64-bit, which is enough; otherwise we can't do anything anyway.\n        typedef long length_type;\n\n        fseek(file, 0, SEEK_END);\n        length_type length = ftell(file);\n        fseek(file, 0, SEEK_SET);\n    #endif\n\n        // check for I/O errors\n        if (length < 0) return status_io_error;\n        \n        // check for overflow\n        size_t result = static_cast<size_t>(length);\n\n        if (static_cast<length_type>(result) != length) return status_out_of_memory;\n\n        // finalize\n        out_result = result;\n\n        return status_ok;\n    }\n\n    PUGI__FN size_t zero_terminate_buffer(void* buffer, size_t size, xml_encoding encoding) \n    {\n        // We only need to zero-terminate if encoding conversion does not do it for us\n    #ifdef PUGIXML_WCHAR_MODE\n        xml_encoding wchar_encoding = get_wchar_encoding();\n\n        if (encoding == wchar_encoding || need_endian_swap_utf(encoding, wchar_encoding))\n        {\n            size_t length = size / sizeof(char_t);\n\n            static_cast<char_t*>(buffer)[length] = 0;\n            return (length + 1) * sizeof(char_t);\n        }\n    #else\n        if (encoding == encoding_utf8)\n        {\n            static_cast<char*>(buffer)[size] = 0;\n            return size + 1;\n        }\n    #endif\n\n        return size;\n    }\n\n    PUGI__FN xml_parse_result load_file_impl(xml_document& doc, FILE* file, unsigned int options, xml_encoding encoding)\n    {\n        if (!file) return make_parse_result(status_file_not_found);\n\n        // get file size (can result in I/O errors)\n        size_t size = 0;\n        xml_parse_status size_status = get_file_size(file, size);\n\n        if (size_status != status_ok)\n        {\n            fclose(file);\n            return make_parse_result(size_status);\n        }\n        \n        size_t max_suffix_size = sizeof(char_t);\n\n        // allocate buffer for the whole file\n        char* contents = static_cast<char*>(xml_memory::allocate(size + max_suffix_size));\n\n        if (!contents)\n        {\n            fclose(file);\n            return make_parse_result(status_out_of_memory);\n        }\n\n        // read file in memory\n        size_t read_size = fread(contents, 1, size, file);\n        fclose(file);\n\n        if (read_size != size)\n        {\n            xml_memory::deallocate(contents);\n            return make_parse_result(status_io_error);\n        }\n\n        xml_encoding real_encoding = get_buffer_encoding(encoding, contents, size);\n        \n        return doc.load_buffer_inplace_own(contents, zero_terminate_buffer(contents, size, real_encoding), options, real_encoding);\n    }\n\n#ifndef PUGIXML_NO_STL\n    template <typename T> struct xml_stream_chunk\n    {\n        static xml_stream_chunk* create()\n        {\n            void* memory = xml_memory::allocate(sizeof(xml_stream_chunk));\n            \n            return new (memory) xml_stream_chunk();\n        }\n\n        static void destroy(void* ptr)\n        {\n            xml_stream_chunk* chunk = static_cast<xml_stream_chunk*>(ptr);\n\n            // free chunk chain\n            while (chunk)\n            {\n                xml_stream_chunk* next_ = chunk->next;\n\n                xml_memory::deallocate(chunk);\n\n                chunk = next_;\n            }\n        }\n\n        xml_stream_chunk(): next(0), size(0)\n        {\n        }\n\n        xml_stream_chunk* next;\n        size_t size;\n\n        T data[xml_memory_page_size / sizeof(T)];\n    };\n\n    template <typename T> PUGI__FN xml_parse_status load_stream_data_noseek(std::basic_istream<T>& stream, void** out_buffer, size_t* out_size)\n    {\n        buffer_holder chunks(0, xml_stream_chunk<T>::destroy);\n\n        // read file to a chunk list\n        size_t total = 0;\n        xml_stream_chunk<T>* last = 0;\n\n        while (!stream.eof())\n        {\n            // allocate new chunk\n            xml_stream_chunk<T>* chunk = xml_stream_chunk<T>::create();\n            if (!chunk) return status_out_of_memory;\n\n            // append chunk to list\n            if (last) last = last->next = chunk;\n            else chunks.data = last = chunk;\n\n            // read data to chunk\n            stream.read(chunk->data, static_cast<std::streamsize>(sizeof(chunk->data) / sizeof(T)));\n            chunk->size = static_cast<size_t>(stream.gcount()) * sizeof(T);\n\n            // read may set failbit | eofbit in case gcount() is less than read length, so check for other I/O errors\n            if (stream.bad() || (!stream.eof() && stream.fail())) return status_io_error;\n\n            // guard against huge files (chunk size is small enough to make this overflow check work)\n            if (total + chunk->size < total) return status_out_of_memory;\n            total += chunk->size;\n        }\n\n        size_t max_suffix_size = sizeof(char_t);\n\n        // copy chunk list to a contiguous buffer\n        char* buffer = static_cast<char*>(xml_memory::allocate(total + max_suffix_size));\n        if (!buffer) return status_out_of_memory;\n\n        char* write = buffer;\n\n        for (xml_stream_chunk<T>* chunk = static_cast<xml_stream_chunk<T>*>(chunks.data); chunk; chunk = chunk->next)\n        {\n            assert(write + chunk->size <= buffer + total);\n            memcpy(write, chunk->data, chunk->size);\n            write += chunk->size;\n        }\n\n        assert(write == buffer + total);\n\n        // return buffer\n        *out_buffer = buffer;\n        *out_size = total;\n\n        return status_ok;\n    }\n\n    template <typename T> PUGI__FN xml_parse_status load_stream_data_seek(std::basic_istream<T>& stream, void** out_buffer, size_t* out_size)\n    {\n        // get length of remaining data in stream\n        typename std::basic_istream<T>::pos_type pos = stream.tellg();\n        stream.seekg(0, std::ios::end);\n        std::streamoff length = stream.tellg() - pos;\n        stream.seekg(pos);\n\n        if (stream.fail() || pos < 0) return status_io_error;\n\n        // guard against huge files\n        size_t read_length = static_cast<size_t>(length);\n\n        if (static_cast<std::streamsize>(read_length) != length || length < 0) return status_out_of_memory;\n\n        size_t max_suffix_size = sizeof(char_t);\n\n        // read stream data into memory (guard against stream exceptions with buffer holder)\n        buffer_holder buffer(xml_memory::allocate(read_length * sizeof(T) + max_suffix_size), xml_memory::deallocate);\n        if (!buffer.data) return status_out_of_memory;\n\n        stream.read(static_cast<T*>(buffer.data), static_cast<std::streamsize>(read_length));\n\n        // read may set failbit | eofbit in case gcount() is less than read_length (i.e. line ending conversion), so check for other I/O errors\n        if (stream.bad() || (!stream.eof() && stream.fail())) return status_io_error;\n\n        // return buffer\n        size_t actual_length = static_cast<size_t>(stream.gcount());\n        assert(actual_length <= read_length);\n        \n        *out_buffer = buffer.release();\n        *out_size = actual_length * sizeof(T);\n\n        return status_ok;\n    }\n\n    template <typename T> PUGI__FN xml_parse_result load_stream_impl(xml_document& doc, std::basic_istream<T>& stream, unsigned int options, xml_encoding encoding)\n    {\n        void* buffer = 0;\n        size_t size = 0;\n        xml_parse_status status = status_ok;\n\n        // if stream has an error bit set, bail out (otherwise tellg() can fail and we'll clear error bits)\n        if (stream.fail()) return make_parse_result(status_io_error);\n\n        // load stream to memory (using seek-based implementation if possible, since it's faster and takes less memory)\n        if (stream.tellg() < 0)\n        {\n            stream.clear(); // clear error flags that could be set by a failing tellg\n            status = load_stream_data_noseek(stream, &buffer, &size);\n        }\n        else\n            status = load_stream_data_seek(stream, &buffer, &size);\n\n        if (status != status_ok) return make_parse_result(status);\n\n        xml_encoding real_encoding = get_buffer_encoding(encoding, buffer, size);\n        \n        return doc.load_buffer_inplace_own(buffer, zero_terminate_buffer(buffer, size, real_encoding), options, real_encoding);\n    }\n#endif\n\n#if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && (!defined(__STRICT_ANSI__) || defined(__MINGW64_VERSION_MAJOR)))\n    PUGI__FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)\n    {\n        return _wfopen(path, mode);\n    }\n#else\n    PUGI__FN char* convert_path_heap(const wchar_t* str)\n    {\n        assert(str);\n\n        // first pass: get length in utf8 characters\n        size_t length = strlength_wide(str);\n        size_t size = as_utf8_begin(str, length);\n\n        // allocate resulting string\n        char* result = static_cast<char*>(xml_memory::allocate(size + 1));\n        if (!result) return 0;\n\n        // second pass: convert to utf8\n        as_utf8_end(result, size, str, length);\n\n        return result;\n    }\n\n    PUGI__FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)\n    {\n        // there is no standard function to open wide paths, so our best bet is to try utf8 path\n        char* path_utf8 = convert_path_heap(path);\n        if (!path_utf8) return 0;\n\n        // convert mode to ASCII (we mirror _wfopen interface)\n        char mode_ascii[4] = {0};\n        for (size_t i = 0; mode[i]; ++i) mode_ascii[i] = static_cast<char>(mode[i]);\n\n        // try to open the utf8 path\n        FILE* result = fopen(path_utf8, mode_ascii);\n\n        // free dummy buffer\n        xml_memory::deallocate(path_utf8);\n\n        return result;\n    }\n#endif\n\n    PUGI__FN bool save_file_impl(const xml_document& doc, FILE* file, const char_t* indent, unsigned int flags, xml_encoding encoding)\n    {\n        if (!file) return false;\n\n        xml_writer_file writer(file);\n        doc.save(writer, indent, flags, encoding);\n\n        int result = ferror(file);\n\n        fclose(file);\n\n        return result == 0;\n    }\n\n    PUGI__FN xml_parse_result load_buffer_impl(xml_document_struct* doc, xml_node_struct* root, void* contents, size_t size, unsigned int options, xml_encoding encoding, bool is_mutable, bool own, char_t** out_buffer)\n    {\n        // check input buffer\n        if (!contents && size) return make_parse_result(status_io_error);\n\n        // get actual encoding\n        xml_encoding buffer_encoding = impl::get_buffer_encoding(encoding, contents, size);\n\n        // get private buffer\n        char_t* buffer = 0;\n        size_t length = 0;\n\n        if (!impl::convert_buffer(buffer, length, buffer_encoding, contents, size, is_mutable)) return impl::make_parse_result(status_out_of_memory);\n        \n        // delete original buffer if we performed a conversion\n        if (own && buffer != contents && contents) impl::xml_memory::deallocate(contents);\n\n        // store buffer for offset_debug\n        doc->buffer = buffer;\n\n        // parse\n        xml_parse_result res = impl::xml_parser::parse(buffer, length, doc, root, options);\n\n        // remember encoding\n        res.encoding = buffer_encoding;\n\n        // grab onto buffer if it's our buffer, user is responsible for deallocating contents himself\n        if (own || buffer != contents) *out_buffer = buffer;\n\n        return res;\n    }\nPUGI__NS_END\n\nnamespace pugi\n{\n    PUGI__FN xml_writer_file::xml_writer_file(void* file_): file(file_)\n    {\n    }\n\n    PUGI__FN void xml_writer_file::write(const void* data, size_t size)\n    {\n        size_t result = fwrite(data, 1, size, static_cast<FILE*>(file));\n        (void)!result; // unfortunately we can't do proper error handling here\n    }\n\n#ifndef PUGIXML_NO_STL\n    PUGI__FN xml_writer_stream::xml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream): narrow_stream(&stream), wide_stream(0)\n    {\n    }\n\n    PUGI__FN xml_writer_stream::xml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream): narrow_stream(0), wide_stream(&stream)\n    {\n    }\n\n    PUGI__FN void xml_writer_stream::write(const void* data, size_t size)\n    {\n        if (narrow_stream)\n        {\n            assert(!wide_stream);\n            narrow_stream->write(reinterpret_cast<const char*>(data), static_cast<std::streamsize>(size));\n        }\n        else\n        {\n            assert(wide_stream);\n            assert(size % sizeof(wchar_t) == 0);\n\n            wide_stream->write(reinterpret_cast<const wchar_t*>(data), static_cast<std::streamsize>(size / sizeof(wchar_t)));\n        }\n    }\n#endif\n\n    PUGI__FN xml_tree_walker::xml_tree_walker(): _depth(0)\n    {\n    }\n    \n    PUGI__FN xml_tree_walker::~xml_tree_walker()\n    {\n    }\n\n    PUGI__FN int xml_tree_walker::depth() const\n    {\n        return _depth;\n    }\n\n    PUGI__FN bool xml_tree_walker::begin(xml_node&)\n    {\n        return true;\n    }\n\n    PUGI__FN bool xml_tree_walker::end(xml_node&)\n    {\n        return true;\n    }\n\n    PUGI__FN xml_attribute::xml_attribute(): _attr(0)\n    {\n    }\n\n    PUGI__FN xml_attribute::xml_attribute(xml_attribute_struct* attr): _attr(attr)\n    {\n    }\n\n    PUGI__FN static void unspecified_bool_xml_attribute(xml_attribute***)\n    {\n    }\n\n    PUGI__FN xml_attribute::operator xml_attribute::unspecified_bool_type() const\n    {\n        return _attr ? unspecified_bool_xml_attribute : 0;\n    }\n\n    PUGI__FN bool xml_attribute::operator!() const\n    {\n        return !_attr;\n    }\n\n    PUGI__FN bool xml_attribute::operator==(const xml_attribute& r) const\n    {\n        return (_attr == r._attr);\n    }\n    \n    PUGI__FN bool xml_attribute::operator!=(const xml_attribute& r) const\n    {\n        return (_attr != r._attr);\n    }\n\n    PUGI__FN bool xml_attribute::operator<(const xml_attribute& r) const\n    {\n        return (_attr < r._attr);\n    }\n    \n    PUGI__FN bool xml_attribute::operator>(const xml_attribute& r) const\n    {\n        return (_attr > r._attr);\n    }\n    \n    PUGI__FN bool xml_attribute::operator<=(const xml_attribute& r) const\n    {\n        return (_attr <= r._attr);\n    }\n    \n    PUGI__FN bool xml_attribute::operator>=(const xml_attribute& r) const\n    {\n        return (_attr >= r._attr);\n    }\n\n    PUGI__FN xml_attribute xml_attribute::next_attribute() const\n    {\n        return _attr ? xml_attribute(_attr->next_attribute) : xml_attribute();\n    }\n\n    PUGI__FN xml_attribute xml_attribute::previous_attribute() const\n    {\n        return _attr && _attr->prev_attribute_c->next_attribute ? xml_attribute(_attr->prev_attribute_c) : xml_attribute();\n    }\n\n    PUGI__FN const char_t* xml_attribute::as_string(const char_t* def) const\n    {\n        return (_attr && _attr->value) ? _attr->value : def;\n    }\n\n    PUGI__FN int xml_attribute::as_int(int def) const\n    {\n        return impl::get_value_int(_attr ? _attr->value : 0, def);\n    }\n\n    PUGI__FN unsigned int xml_attribute::as_uint(unsigned int def) const\n    {\n        return impl::get_value_uint(_attr ? _attr->value : 0, def);\n    }\n\n    PUGI__FN double xml_attribute::as_double(double def) const\n    {\n        return impl::get_value_double(_attr ? _attr->value : 0, def);\n    }\n\n    PUGI__FN float xml_attribute::as_float(float def) const\n    {\n        return impl::get_value_float(_attr ? _attr->value : 0, def);\n    }\n\n    PUGI__FN bool xml_attribute::as_bool(bool def) const\n    {\n        return impl::get_value_bool(_attr ? _attr->value : 0, def);\n    }\n\n#ifdef PUGIXML_HAS_LONG_LONG\n    PUGI__FN long long xml_attribute::as_llong(long long def) const\n    {\n        return impl::get_value_llong(_attr ? _attr->value : 0, def);\n    }\n\n    PUGI__FN unsigned long long xml_attribute::as_ullong(unsigned long long def) const\n    {\n        return impl::get_value_ullong(_attr ? _attr->value : 0, def);\n    }\n#endif\n\n    PUGI__FN bool xml_attribute::empty() const\n    {\n        return !_attr;\n    }\n\n    PUGI__FN const char_t* xml_attribute::name() const\n    {\n        return (_attr && _attr->name) ? _attr->name : PUGIXML_TEXT(\"\");\n    }\n\n    PUGI__FN const char_t* xml_attribute::value() const\n    {\n        return (_attr && _attr->value) ? _attr->value : PUGIXML_TEXT(\"\");\n    }\n\n    PUGI__FN size_t xml_attribute::hash_value() const\n    {\n        return static_cast<size_t>(reinterpret_cast<uintptr_t>(_attr) / sizeof(xml_attribute_struct));\n    }\n\n    PUGI__FN xml_attribute_struct* xml_attribute::internal_object() const\n    {\n        return _attr;\n    }\n\n    PUGI__FN xml_attribute& xml_attribute::operator=(const char_t* rhs)\n    {\n        set_value(rhs);\n        return *this;\n    }\n    \n    PUGI__FN xml_attribute& xml_attribute::operator=(int rhs)\n    {\n        set_value(rhs);\n        return *this;\n    }\n\n    PUGI__FN xml_attribute& xml_attribute::operator=(unsigned int rhs)\n    {\n        set_value(rhs);\n        return *this;\n    }\n\n    PUGI__FN xml_attribute& xml_attribute::operator=(double rhs)\n    {\n        set_value(rhs);\n        return *this;\n    }\n    \n    PUGI__FN xml_attribute& xml_attribute::operator=(float rhs)\n    {\n        set_value(rhs);\n        return *this;\n    }\n    \n    PUGI__FN xml_attribute& xml_attribute::operator=(bool rhs)\n    {\n        set_value(rhs);\n        return *this;\n    }\n\n#ifdef PUGIXML_HAS_LONG_LONG\n    PUGI__FN xml_attribute& xml_attribute::operator=(long long rhs)\n    {\n        set_value(rhs);\n        return *this;\n    }\n\n    PUGI__FN xml_attribute& xml_attribute::operator=(unsigned long long rhs)\n    {\n        set_value(rhs);\n        return *this;\n    }\n#endif\n\n    PUGI__FN bool xml_attribute::set_name(const char_t* rhs)\n    {\n        if (!_attr) return false;\n        \n        return impl::strcpy_insitu(_attr->name, _attr->header, impl::xml_memory_page_name_allocated_mask, rhs);\n    }\n        \n    PUGI__FN bool xml_attribute::set_value(const char_t* rhs)\n    {\n        if (!_attr) return false;\n\n        return impl::strcpy_insitu(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n    }\n\n    PUGI__FN bool xml_attribute::set_value(int rhs)\n    {\n        if (!_attr) return false;\n\n        return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n    }\n\n    PUGI__FN bool xml_attribute::set_value(unsigned int rhs)\n    {\n        if (!_attr) return false;\n\n        return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n    }\n\n    PUGI__FN bool xml_attribute::set_value(double rhs)\n    {\n        if (!_attr) return false;\n\n        return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n    }\n    \n    PUGI__FN bool xml_attribute::set_value(float rhs)\n    {\n        if (!_attr) return false;\n\n        return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n    }\n    \n    PUGI__FN bool xml_attribute::set_value(bool rhs)\n    {\n        if (!_attr) return false;\n\n        return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n    }\n\n#ifdef PUGIXML_HAS_LONG_LONG\n    PUGI__FN bool xml_attribute::set_value(long long rhs)\n    {\n        if (!_attr) return false;\n\n        return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n    }\n\n    PUGI__FN bool xml_attribute::set_value(unsigned long long rhs)\n    {\n        if (!_attr) return false;\n\n        return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n    }\n#endif\n\n#ifdef __BORLANDC__\n    PUGI__FN bool operator&&(const xml_attribute& lhs, bool rhs)\n    {\n        return (bool)lhs && rhs;\n    }\n\n    PUGI__FN bool operator||(const xml_attribute& lhs, bool rhs)\n    {\n        return (bool)lhs || rhs;\n    }\n#endif\n\n    PUGI__FN xml_node::xml_node(): _root(0)\n    {\n    }\n\n    PUGI__FN xml_node::xml_node(xml_node_struct* p): _root(p)\n    {\n    }\n    \n    PUGI__FN static void unspecified_bool_xml_node(xml_node***)\n    {\n    }\n\n    PUGI__FN xml_node::operator xml_node::unspecified_bool_type() const\n    {\n        return _root ? unspecified_bool_xml_node : 0;\n    }\n\n    PUGI__FN bool xml_node::operator!() const\n    {\n        return !_root;\n    }\n\n    PUGI__FN xml_node::iterator xml_node::begin() const\n    {\n        return iterator(_root ? _root->first_child : 0, _root);\n    }\n\n    PUGI__FN xml_node::iterator xml_node::end() const\n    {\n        return iterator(0, _root);\n    }\n    \n    PUGI__FN xml_node::attribute_iterator xml_node::attributes_begin() const\n    {\n        return attribute_iterator(_root ? _root->first_attribute : 0, _root);\n    }\n\n    PUGI__FN xml_node::attribute_iterator xml_node::attributes_end() const\n    {\n        return attribute_iterator(0, _root);\n    }\n    \n    PUGI__FN xml_object_range<xml_node_iterator> xml_node::children() const\n    {\n        return xml_object_range<xml_node_iterator>(begin(), end());\n    }\n\n    PUGI__FN xml_object_range<xml_named_node_iterator> xml_node::children(const char_t* name_) const\n    {\n        return xml_object_range<xml_named_node_iterator>(xml_named_node_iterator(child(name_)._root, _root, name_), xml_named_node_iterator(0, _root, name_));\n    }\n\n    PUGI__FN xml_object_range<xml_attribute_iterator> xml_node::attributes() const\n    {\n        return xml_object_range<xml_attribute_iterator>(attributes_begin(), attributes_end());\n    }\n\n    PUGI__FN bool xml_node::operator==(const xml_node& r) const\n    {\n        return (_root == r._root);\n    }\n\n    PUGI__FN bool xml_node::operator!=(const xml_node& r) const\n    {\n        return (_root != r._root);\n    }\n\n    PUGI__FN bool xml_node::operator<(const xml_node& r) const\n    {\n        return (_root < r._root);\n    }\n    \n    PUGI__FN bool xml_node::operator>(const xml_node& r) const\n    {\n        return (_root > r._root);\n    }\n    \n    PUGI__FN bool xml_node::operator<=(const xml_node& r) const\n    {\n        return (_root <= r._root);\n    }\n    \n    PUGI__FN bool xml_node::operator>=(const xml_node& r) const\n    {\n        return (_root >= r._root);\n    }\n\n    PUGI__FN bool xml_node::empty() const\n    {\n        return !_root;\n    }\n    \n    PUGI__FN const char_t* xml_node::name() const\n    {\n        return (_root && _root->name) ? _root->name : PUGIXML_TEXT(\"\");\n    }\n\n    PUGI__FN xml_node_type xml_node::type() const\n    {\n        return _root ? PUGI__NODETYPE(_root) : node_null;\n    }\n    \n    PUGI__FN const char_t* xml_node::value() const\n    {\n        return (_root && _root->value) ? _root->value : PUGIXML_TEXT(\"\");\n    }\n    \n    PUGI__FN xml_node xml_node::child(const char_t* name_) const\n    {\n        if (!_root) return xml_node();\n\n        for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n            if (i->name && impl::strequal(name_, i->name)) return xml_node(i);\n\n        return xml_node();\n    }\n\n    PUGI__FN xml_attribute xml_node::attribute(const char_t* name_) const\n    {\n        if (!_root) return xml_attribute();\n\n        for (xml_attribute_struct* i = _root->first_attribute; i; i = i->next_attribute)\n            if (i->name && impl::strequal(name_, i->name))\n                return xml_attribute(i);\n        \n        return xml_attribute();\n    }\n    \n    PUGI__FN xml_node xml_node::next_sibling(const char_t* name_) const\n    {\n        if (!_root) return xml_node();\n        \n        for (xml_node_struct* i = _root->next_sibling; i; i = i->next_sibling)\n            if (i->name && impl::strequal(name_, i->name)) return xml_node(i);\n\n        return xml_node();\n    }\n\n    PUGI__FN xml_node xml_node::next_sibling() const\n    {\n        return _root ? xml_node(_root->next_sibling) : xml_node();\n    }\n\n    PUGI__FN xml_node xml_node::previous_sibling(const char_t* name_) const\n    {\n        if (!_root) return xml_node();\n        \n        for (xml_node_struct* i = _root->prev_sibling_c; i->next_sibling; i = i->prev_sibling_c)\n            if (i->name && impl::strequal(name_, i->name)) return xml_node(i);\n\n        return xml_node();\n    }\n\n    PUGI__FN xml_node xml_node::previous_sibling() const\n    {\n        if (!_root) return xml_node();\n        \n        if (_root->prev_sibling_c->next_sibling) return xml_node(_root->prev_sibling_c);\n        else return xml_node();\n    }\n\n    PUGI__FN xml_node xml_node::parent() const\n    {\n        return _root ? xml_node(_root->parent) : xml_node();\n    }\n\n    PUGI__FN xml_node xml_node::root() const\n    {\n        return _root ? xml_node(&impl::get_document(_root)) : xml_node();\n    }\n\n    PUGI__FN xml_text xml_node::text() const\n    {\n        return xml_text(_root);\n    }\n\n    PUGI__FN const char_t* xml_node::child_value() const\n    {\n        if (!_root) return PUGIXML_TEXT(\"\");\n        \n        for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n            if (i->value && impl::is_text_node(i))\n                return i->value;\n\n        return PUGIXML_TEXT(\"\");\n    }\n\n    PUGI__FN const char_t* xml_node::child_value(const char_t* name_) const\n    {\n        return child(name_).child_value();\n    }\n\n    PUGI__FN xml_attribute xml_node::first_attribute() const\n    {\n        return _root ? xml_attribute(_root->first_attribute) : xml_attribute();\n    }\n\n    PUGI__FN xml_attribute xml_node::last_attribute() const\n    {\n        return _root && _root->first_attribute ? xml_attribute(_root->first_attribute->prev_attribute_c) : xml_attribute();\n    }\n\n    PUGI__FN xml_node xml_node::first_child() const\n    {\n        return _root ? xml_node(_root->first_child) : xml_node();\n    }\n\n    PUGI__FN xml_node xml_node::last_child() const\n    {\n        return _root && _root->first_child ? xml_node(_root->first_child->prev_sibling_c) : xml_node();\n    }\n\n    PUGI__FN bool xml_node::set_name(const char_t* rhs)\n    {\n        switch (type())\n        {\n        case node_pi:\n        case node_declaration:\n        case node_element:\n            return impl::strcpy_insitu(_root->name, _root->header, impl::xml_memory_page_name_allocated_mask, rhs);\n\n        default:\n            return false;\n        }\n    }\n        \n    PUGI__FN bool xml_node::set_value(const char_t* rhs)\n    {\n        switch (type())\n        {\n        case node_pi:\n        case node_cdata:\n        case node_pcdata:\n        case node_comment:\n        case node_doctype:\n            return impl::strcpy_insitu(_root->value, _root->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\n        default:\n            return false;\n        }\n    }\n\n    PUGI__FN xml_attribute xml_node::append_attribute(const char_t* name_)\n    {\n        if (!impl::allow_insert_attribute(type())) return xml_attribute();\n        \n        xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));\n        if (!a) return xml_attribute();\n\n        impl::append_attribute(a._attr, _root);\n\n        a.set_name(name_);\n        \n        return a;\n    }\n\n    PUGI__FN xml_attribute xml_node::prepend_attribute(const char_t* name_)\n    {\n        if (!impl::allow_insert_attribute(type())) return xml_attribute();\n        \n        xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));\n        if (!a) return xml_attribute();\n\n        impl::prepend_attribute(a._attr, _root);\n\n        a.set_name(name_);\n\n        return a;\n    }\n\n    PUGI__FN xml_attribute xml_node::insert_attribute_after(const char_t* name_, const xml_attribute& attr)\n    {\n        if (!impl::allow_insert_attribute(type())) return xml_attribute();\n        if (!attr || !impl::is_attribute_of(attr._attr, _root)) return xml_attribute();\n        \n        xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));\n        if (!a) return xml_attribute();\n\n        impl::insert_attribute_after(a._attr, attr._attr, _root);\n\n        a.set_name(name_);\n\n        return a;\n    }\n\n    PUGI__FN xml_attribute xml_node::insert_attribute_before(const char_t* name_, const xml_attribute& attr)\n    {\n        if (!impl::allow_insert_attribute(type())) return xml_attribute();\n        if (!attr || !impl::is_attribute_of(attr._attr, _root)) return xml_attribute();\n        \n        xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));\n        if (!a) return xml_attribute();\n\n        impl::insert_attribute_before(a._attr, attr._attr, _root);\n\n        a.set_name(name_);\n\n        return a;\n    }\n\n    PUGI__FN xml_attribute xml_node::append_copy(const xml_attribute& proto)\n    {\n        if (!proto) return xml_attribute();\n\n        xml_attribute result = append_attribute(proto.name());\n        result.set_value(proto.value());\n\n        return result;\n    }\n\n    PUGI__FN xml_attribute xml_node::prepend_copy(const xml_attribute& proto)\n    {\n        if (!proto) return xml_attribute();\n\n        xml_attribute result = prepend_attribute(proto.name());\n        result.set_value(proto.value());\n\n        return result;\n    }\n\n    PUGI__FN xml_attribute xml_node::insert_copy_after(const xml_attribute& proto, const xml_attribute& attr)\n    {\n        if (!proto) return xml_attribute();\n\n        xml_attribute result = insert_attribute_after(proto.name(), attr);\n        result.set_value(proto.value());\n\n        return result;\n    }\n\n    PUGI__FN xml_attribute xml_node::insert_copy_before(const xml_attribute& proto, const xml_attribute& attr)\n    {\n        if (!proto) return xml_attribute();\n\n        xml_attribute result = insert_attribute_before(proto.name(), attr);\n        result.set_value(proto.value());\n\n        return result;\n    }\n\n    PUGI__FN xml_node xml_node::append_child(xml_node_type type_)\n    {\n        if (!impl::allow_insert_child(type(), type_)) return xml_node();\n        \n        xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n        if (!n) return xml_node();\n\n        impl::append_node(n._root, _root);\n\n        if (type_ == node_declaration) n.set_name(PUGIXML_TEXT(\"xml\"));\n\n        return n;\n    }\n\n    PUGI__FN xml_node xml_node::prepend_child(xml_node_type type_)\n    {\n        if (!impl::allow_insert_child(type(), type_)) return xml_node();\n        \n        xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n        if (!n) return xml_node();\n\n        impl::prepend_node(n._root, _root);\n                \n        if (type_ == node_declaration) n.set_name(PUGIXML_TEXT(\"xml\"));\n\n        return n;\n    }\n\n    PUGI__FN xml_node xml_node::insert_child_before(xml_node_type type_, const xml_node& node)\n    {\n        if (!impl::allow_insert_child(type(), type_)) return xml_node();\n        if (!node._root || node._root->parent != _root) return xml_node();\n    \n        xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n        if (!n) return xml_node();\n\n        impl::insert_node_before(n._root, node._root);\n\n        if (type_ == node_declaration) n.set_name(PUGIXML_TEXT(\"xml\"));\n\n        return n;\n    }\n\n    PUGI__FN xml_node xml_node::insert_child_after(xml_node_type type_, const xml_node& node)\n    {\n        if (!impl::allow_insert_child(type(), type_)) return xml_node();\n        if (!node._root || node._root->parent != _root) return xml_node();\n    \n        xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n        if (!n) return xml_node();\n\n        impl::insert_node_after(n._root, node._root);\n\n        if (type_ == node_declaration) n.set_name(PUGIXML_TEXT(\"xml\"));\n\n        return n;\n    }\n\n    PUGI__FN xml_node xml_node::append_child(const char_t* name_)\n    {\n        xml_node result = append_child(node_element);\n\n        result.set_name(name_);\n\n        return result;\n    }\n\n    PUGI__FN xml_node xml_node::prepend_child(const char_t* name_)\n    {\n        xml_node result = prepend_child(node_element);\n\n        result.set_name(name_);\n\n        return result;\n    }\n\n    PUGI__FN xml_node xml_node::insert_child_after(const char_t* name_, const xml_node& node)\n    {\n        xml_node result = insert_child_after(node_element, node);\n\n        result.set_name(name_);\n\n        return result;\n    }\n\n    PUGI__FN xml_node xml_node::insert_child_before(const char_t* name_, const xml_node& node)\n    {\n        xml_node result = insert_child_before(node_element, node);\n\n        result.set_name(name_);\n\n        return result;\n    }\n\n    PUGI__FN xml_node xml_node::append_copy(const xml_node& proto)\n    {\n        xml_node_type type_ = proto.type();\n        if (!impl::allow_insert_child(type(), type_)) return xml_node();\n\n        xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n        if (!n) return xml_node();\n\n        impl::append_node(n._root, _root);\n        impl::node_copy_tree(n._root, proto._root);\n\n        return n;\n    }\n\n    PUGI__FN xml_node xml_node::prepend_copy(const xml_node& proto)\n    {\n        xml_node_type type_ = proto.type();\n        if (!impl::allow_insert_child(type(), type_)) return xml_node();\n\n        xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n        if (!n) return xml_node();\n\n        impl::prepend_node(n._root, _root);\n        impl::node_copy_tree(n._root, proto._root);\n\n        return n;\n    }\n\n    PUGI__FN xml_node xml_node::insert_copy_after(const xml_node& proto, const xml_node& node)\n    {\n        xml_node_type type_ = proto.type();\n        if (!impl::allow_insert_child(type(), type_)) return xml_node();\n        if (!node._root || node._root->parent != _root) return xml_node();\n\n        xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n        if (!n) return xml_node();\n\n        impl::insert_node_after(n._root, node._root);\n        impl::node_copy_tree(n._root, proto._root);\n\n        return n;\n    }\n\n    PUGI__FN xml_node xml_node::insert_copy_before(const xml_node& proto, const xml_node& node)\n    {\n        xml_node_type type_ = proto.type();\n        if (!impl::allow_insert_child(type(), type_)) return xml_node();\n        if (!node._root || node._root->parent != _root) return xml_node();\n\n        xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n        if (!n) return xml_node();\n\n        impl::insert_node_before(n._root, node._root);\n        impl::node_copy_tree(n._root, proto._root);\n\n        return n;\n    }\n\n    PUGI__FN xml_node xml_node::append_move(const xml_node& moved)\n    {\n        if (!impl::allow_move(*this, moved)) return xml_node();\n\n        // disable document_buffer_order optimization since moving nodes around changes document order without changing buffer pointers\n        impl::get_document(_root).header |= impl::xml_memory_page_contents_shared_mask;\n\n        impl::remove_node(moved._root);\n        impl::append_node(moved._root, _root);\n\n        return moved;\n    }\n\n    PUGI__FN xml_node xml_node::prepend_move(const xml_node& moved)\n    {\n        if (!impl::allow_move(*this, moved)) return xml_node();\n\n        // disable document_buffer_order optimization since moving nodes around changes document order without changing buffer pointers\n        impl::get_document(_root).header |= impl::xml_memory_page_contents_shared_mask;\n\n        impl::remove_node(moved._root);\n        impl::prepend_node(moved._root, _root);\n\n        return moved;\n    }\n\n    PUGI__FN xml_node xml_node::insert_move_after(const xml_node& moved, const xml_node& node)\n    {\n        if (!impl::allow_move(*this, moved)) return xml_node();\n        if (!node._root || node._root->parent != _root) return xml_node();\n        if (moved._root == node._root) return xml_node();\n\n        // disable document_buffer_order optimization since moving nodes around changes document order without changing buffer pointers\n        impl::get_document(_root).header |= impl::xml_memory_page_contents_shared_mask;\n\n        impl::remove_node(moved._root);\n        impl::insert_node_after(moved._root, node._root);\n\n        return moved;\n    }\n\n    PUGI__FN xml_node xml_node::insert_move_before(const xml_node& moved, const xml_node& node)\n    {\n        if (!impl::allow_move(*this, moved)) return xml_node();\n        if (!node._root || node._root->parent != _root) return xml_node();\n        if (moved._root == node._root) return xml_node();\n\n        // disable document_buffer_order optimization since moving nodes around changes document order without changing buffer pointers\n        impl::get_document(_root).header |= impl::xml_memory_page_contents_shared_mask;\n\n        impl::remove_node(moved._root);\n        impl::insert_node_before(moved._root, node._root);\n\n        return moved;\n    }\n\n    PUGI__FN bool xml_node::remove_attribute(const char_t* name_)\n    {\n        return remove_attribute(attribute(name_));\n    }\n\n    PUGI__FN bool xml_node::remove_attribute(const xml_attribute& a)\n    {\n        if (!_root || !a._attr) return false;\n        if (!impl::is_attribute_of(a._attr, _root)) return false;\n\n        impl::remove_attribute(a._attr, _root);\n        impl::destroy_attribute(a._attr, impl::get_allocator(_root));\n\n        return true;\n    }\n\n    PUGI__FN bool xml_node::remove_child(const char_t* name_)\n    {\n        return remove_child(child(name_));\n    }\n\n    PUGI__FN bool xml_node::remove_child(const xml_node& n)\n    {\n        if (!_root || !n._root || n._root->parent != _root) return false;\n\n        impl::remove_node(n._root);\n        impl::destroy_node(n._root, impl::get_allocator(_root));\n\n        return true;\n    }\n\n    PUGI__FN xml_parse_result xml_node::append_buffer(const void* contents, size_t size, unsigned int options, xml_encoding encoding)\n    {\n        // append_buffer is only valid for elements/documents\n        if (!impl::allow_insert_child(type(), node_element)) return impl::make_parse_result(status_append_invalid_root);\n\n        // get document node\n        impl::xml_document_struct* doc = &impl::get_document(_root);\n\n        // disable document_buffer_order optimization since in a document with multiple buffers comparing buffer pointers does not make sense\n        doc->header |= impl::xml_memory_page_contents_shared_mask;\n        \n        // get extra buffer element (we'll store the document fragment buffer there so that we can deallocate it later)\n        impl::xml_memory_page* page = 0;\n        impl::xml_extra_buffer* extra = static_cast<impl::xml_extra_buffer*>(doc->allocate_memory(sizeof(impl::xml_extra_buffer), page));\n        (void)page;\n\n        if (!extra) return impl::make_parse_result(status_out_of_memory);\n\n        // save name; name of the root has to be NULL before parsing - otherwise closing node mismatches will not be detected at the top level\n        char_t* rootname = _root->name;\n        _root->name = 0;\n\n        // parse\n        char_t* buffer = 0;\n        xml_parse_result res = impl::load_buffer_impl(doc, _root, const_cast<void*>(contents), size, options, encoding, false, false, &buffer);\n\n        // restore name\n        _root->name = rootname;\n\n        // add extra buffer to the list\n        extra->buffer = buffer;\n        extra->next = doc->extra_buffers;\n        doc->extra_buffers = extra;\n\n        return res;\n    }\n\n    PUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* name_, const char_t* attr_name, const char_t* attr_value) const\n    {\n        if (!_root) return xml_node();\n        \n        for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n            if (i->name && impl::strequal(name_, i->name))\n            {\n                for (xml_attribute_struct* a = i->first_attribute; a; a = a->next_attribute)\n                    if (a->name && impl::strequal(attr_name, a->name) && impl::strequal(attr_value, a->value ? a->value : PUGIXML_TEXT(\"\")))\n                        return xml_node(i);\n            }\n\n        return xml_node();\n    }\n\n    PUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const\n    {\n        if (!_root) return xml_node();\n        \n        for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n            for (xml_attribute_struct* a = i->first_attribute; a; a = a->next_attribute)\n                if (a->name && impl::strequal(attr_name, a->name) && impl::strequal(attr_value, a->value ? a->value : PUGIXML_TEXT(\"\")))\n                    return xml_node(i);\n\n        return xml_node();\n    }\n\n#ifndef PUGIXML_NO_STL\n    PUGI__FN string_t xml_node::path(char_t delimiter) const\n    {\n        xml_node cursor = *this; // Make a copy.\n        \n        string_t result = cursor.name();\n\n        while (cursor.parent())\n        {\n            cursor = cursor.parent();\n            \n            string_t temp = cursor.name();\n            temp += delimiter;\n            temp += result;\n            result.swap(temp);\n        }\n\n        return result;\n    }\n#endif\n\n    PUGI__FN xml_node xml_node::first_element_by_path(const char_t* path_, char_t delimiter) const\n    {\n        xml_node found = *this; // Current search context.\n\n        if (!_root || !path_ || !path_[0]) return found;\n\n        if (path_[0] == delimiter)\n        {\n            // Absolute path; e.g. '/foo/bar'\n            found = found.root();\n            ++path_;\n        }\n\n        const char_t* path_segment = path_;\n\n        while (*path_segment == delimiter) ++path_segment;\n\n        const char_t* path_segment_end = path_segment;\n\n        while (*path_segment_end && *path_segment_end != delimiter) ++path_segment_end;\n\n        if (path_segment == path_segment_end) return found;\n\n        const char_t* next_segment = path_segment_end;\n\n        while (*next_segment == delimiter) ++next_segment;\n\n        if (*path_segment == '.' && path_segment + 1 == path_segment_end)\n            return found.first_element_by_path(next_segment, delimiter);\n        else if (*path_segment == '.' && *(path_segment+1) == '.' && path_segment + 2 == path_segment_end)\n            return found.parent().first_element_by_path(next_segment, delimiter);\n        else\n        {\n            for (xml_node_struct* j = found._root->first_child; j; j = j->next_sibling)\n            {\n                if (j->name && impl::strequalrange(j->name, path_segment, static_cast<size_t>(path_segment_end - path_segment)))\n                {\n                    xml_node subsearch = xml_node(j).first_element_by_path(next_segment, delimiter);\n\n                    if (subsearch) return subsearch;\n                }\n            }\n\n            return xml_node();\n        }\n    }\n\n    PUGI__FN bool xml_node::traverse(xml_tree_walker& walker)\n    {\n        walker._depth = -1;\n        \n        xml_node arg_begin = *this;\n        if (!walker.begin(arg_begin)) return false;\n\n        xml_node cur = first_child();\n                \n        if (cur)\n        {\n            ++walker._depth;\n\n            do \n            {\n                xml_node arg_for_each = cur;\n                if (!walker.for_each(arg_for_each))\n                    return false;\n                        \n                if (cur.first_child())\n                {\n                    ++walker._depth;\n                    cur = cur.first_child();\n                }\n                else if (cur.next_sibling())\n                    cur = cur.next_sibling();\n                else\n                {\n                    // Borland C++ workaround\n                    while (!cur.next_sibling() && cur != *this && !cur.parent().empty())\n                    {\n                        --walker._depth;\n                        cur = cur.parent();\n                    }\n                        \n                    if (cur != *this)\n                        cur = cur.next_sibling();\n                }\n            }\n            while (cur && cur != *this);\n        }\n\n        assert(walker._depth == -1);\n\n        xml_node arg_end = *this;\n        return walker.end(arg_end);\n    }\n\n    PUGI__FN size_t xml_node::hash_value() const\n    {\n        return static_cast<size_t>(reinterpret_cast<uintptr_t>(_root) / sizeof(xml_node_struct));\n    }\n\n    PUGI__FN xml_node_struct* xml_node::internal_object() const\n    {\n        return _root;\n    }\n\n    PUGI__FN void xml_node::print(xml_writer& writer, const char_t* indent, unsigned int flags, xml_encoding encoding, unsigned int depth) const\n    {\n        if (!_root) return;\n\n        impl::xml_buffered_writer buffered_writer(writer, encoding);\n\n        impl::node_output(buffered_writer, _root, indent, flags, depth);\n    }\n\n#ifndef PUGIXML_NO_STL\n    PUGI__FN void xml_node::print(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent, unsigned int flags, xml_encoding encoding, unsigned int depth) const\n    {\n        xml_writer_stream writer(stream);\n\n        print(writer, indent, flags, encoding, depth);\n    }\n\n    PUGI__FN void xml_node::print(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent, unsigned int flags, unsigned int depth) const\n    {\n        xml_writer_stream writer(stream);\n\n        print(writer, indent, flags, encoding_wchar, depth);\n    }\n#endif\n\n    PUGI__FN ptrdiff_t xml_node::offset_debug() const\n    {\n        if (!_root) return -1;\n\n        impl::xml_document_struct& doc = impl::get_document(_root);\n\n        // we can determine the offset reliably only if there is exactly once parse buffer\n        if (!doc.buffer || doc.extra_buffers) return -1;\n\n        switch (type())\n        {\n        case node_document:\n            return 0;\n\n        case node_element:\n        case node_declaration:\n        case node_pi:\n            return _root->name && (_root->header & impl::xml_memory_page_name_allocated_or_shared_mask) == 0 ? _root->name - doc.buffer : -1;\n\n        case node_pcdata:\n        case node_cdata:\n        case node_comment:\n        case node_doctype:\n            return _root->value && (_root->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0 ? _root->value - doc.buffer : -1;\n\n        default:\n            return -1;\n        }\n    }\n\n#ifdef __BORLANDC__\n    PUGI__FN bool operator&&(const xml_node& lhs, bool rhs)\n    {\n        return (bool)lhs && rhs;\n    }\n\n    PUGI__FN bool operator||(const xml_node& lhs, bool rhs)\n    {\n        return (bool)lhs || rhs;\n    }\n#endif\n\n    PUGI__FN xml_text::xml_text(xml_node_struct* root): _root(root)\n    {\n    }\n\n    PUGI__FN xml_node_struct* xml_text::_data() const\n    {\n        if (!_root || impl::is_text_node(_root)) return _root;\n\n        for (xml_node_struct* node = _root->first_child; node; node = node->next_sibling)\n            if (impl::is_text_node(node))\n                return node;\n\n        return 0;\n    }\n\n    PUGI__FN xml_node_struct* xml_text::_data_new()\n    {\n        xml_node_struct* d = _data();\n        if (d) return d;\n\n        return xml_node(_root).append_child(node_pcdata).internal_object();\n    }\n\n    PUGI__FN xml_text::xml_text(): _root(0)\n    {\n    }\n\n    PUGI__FN static void unspecified_bool_xml_text(xml_text***)\n    {\n    }\n\n    PUGI__FN xml_text::operator xml_text::unspecified_bool_type() const\n    {\n        return _data() ? unspecified_bool_xml_text : 0;\n    }\n\n    PUGI__FN bool xml_text::operator!() const\n    {\n        return !_data();\n    }\n\n    PUGI__FN bool xml_text::empty() const\n    {\n        return _data() == 0;\n    }\n\n    PUGI__FN const char_t* xml_text::get() const\n    {\n        xml_node_struct* d = _data();\n\n        return (d && d->value) ? d->value : PUGIXML_TEXT(\"\");\n    }\n\n    PUGI__FN const char_t* xml_text::as_string(const char_t* def) const\n    {\n        xml_node_struct* d = _data();\n\n        return (d && d->value) ? d->value : def;\n    }\n\n    PUGI__FN int xml_text::as_int(int def) const\n    {\n        xml_node_struct* d = _data();\n\n        return impl::get_value_int(d ? d->value : 0, def);\n    }\n\n    PUGI__FN unsigned int xml_text::as_uint(unsigned int def) const\n    {\n        xml_node_struct* d = _data();\n\n        return impl::get_value_uint(d ? d->value : 0, def);\n    }\n\n    PUGI__FN double xml_text::as_double(double def) const\n    {\n        xml_node_struct* d = _data();\n\n        return impl::get_value_double(d ? d->value : 0, def);\n    }\n\n    PUGI__FN float xml_text::as_float(float def) const\n    {\n        xml_node_struct* d = _data();\n\n        return impl::get_value_float(d ? d->value : 0, def);\n    }\n\n    PUGI__FN bool xml_text::as_bool(bool def) const\n    {\n        xml_node_struct* d = _data();\n\n        return impl::get_value_bool(d ? d->value : 0, def);\n    }\n\n#ifdef PUGIXML_HAS_LONG_LONG\n    PUGI__FN long long xml_text::as_llong(long long def) const\n    {\n        xml_node_struct* d = _data();\n\n        return impl::get_value_llong(d ? d->value : 0, def);\n    }\n\n    PUGI__FN unsigned long long xml_text::as_ullong(unsigned long long def) const\n    {\n        xml_node_struct* d = _data();\n\n        return impl::get_value_ullong(d ? d->value : 0, def);\n    }\n#endif\n\n    PUGI__FN bool xml_text::set(const char_t* rhs)\n    {\n        xml_node_struct* dn = _data_new();\n\n        return dn ? impl::strcpy_insitu(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n    }\n\n    PUGI__FN bool xml_text::set(int rhs)\n    {\n        xml_node_struct* dn = _data_new();\n\n        return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n    }\n\n    PUGI__FN bool xml_text::set(unsigned int rhs)\n    {\n        xml_node_struct* dn = _data_new();\n\n        return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n    }\n\n    PUGI__FN bool xml_text::set(float rhs)\n    {\n        xml_node_struct* dn = _data_new();\n\n        return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n    }\n\n    PUGI__FN bool xml_text::set(double rhs)\n    {\n        xml_node_struct* dn = _data_new();\n\n        return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n    }\n\n    PUGI__FN bool xml_text::set(bool rhs)\n    {\n        xml_node_struct* dn = _data_new();\n\n        return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n    }\n\n#ifdef PUGIXML_HAS_LONG_LONG\n    PUGI__FN bool xml_text::set(long long rhs)\n    {\n        xml_node_struct* dn = _data_new();\n\n        return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n    }\n\n    PUGI__FN bool xml_text::set(unsigned long long rhs)\n    {\n        xml_node_struct* dn = _data_new();\n\n        return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n    }\n#endif\n\n    PUGI__FN xml_text& xml_text::operator=(const char_t* rhs)\n    {\n        set(rhs);\n        return *this;\n    }\n\n    PUGI__FN xml_text& xml_text::operator=(int rhs)\n    {\n        set(rhs);\n        return *this;\n    }\n\n    PUGI__FN xml_text& xml_text::operator=(unsigned int rhs)\n    {\n        set(rhs);\n        return *this;\n    }\n\n    PUGI__FN xml_text& xml_text::operator=(double rhs)\n    {\n        set(rhs);\n        return *this;\n    }\n\n    PUGI__FN xml_text& xml_text::operator=(float rhs)\n    {\n        set(rhs);\n        return *this;\n    }\n\n    PUGI__FN xml_text& xml_text::operator=(bool rhs)\n    {\n        set(rhs);\n        return *this;\n    }\n\n#ifdef PUGIXML_HAS_LONG_LONG\n    PUGI__FN xml_text& xml_text::operator=(long long rhs)\n    {\n        set(rhs);\n        return *this;\n    }\n\n    PUGI__FN xml_text& xml_text::operator=(unsigned long long rhs)\n    {\n        set(rhs);\n        return *this;\n    }\n#endif\n\n    PUGI__FN xml_node xml_text::data() const\n    {\n        return xml_node(_data());\n    }\n\n#ifdef __BORLANDC__\n    PUGI__FN bool operator&&(const xml_text& lhs, bool rhs)\n    {\n        return (bool)lhs && rhs;\n    }\n\n    PUGI__FN bool operator||(const xml_text& lhs, bool rhs)\n    {\n        return (bool)lhs || rhs;\n    }\n#endif\n\n    PUGI__FN xml_node_iterator::xml_node_iterator()\n    {\n    }\n\n    PUGI__FN xml_node_iterator::xml_node_iterator(const xml_node& node): _wrap(node), _parent(node.parent())\n    {\n    }\n\n    PUGI__FN xml_node_iterator::xml_node_iterator(xml_node_struct* ref, xml_node_struct* parent): _wrap(ref), _parent(parent)\n    {\n    }\n\n    PUGI__FN bool xml_node_iterator::operator==(const xml_node_iterator& rhs) const\n    {\n        return _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root;\n    }\n    \n    PUGI__FN bool xml_node_iterator::operator!=(const xml_node_iterator& rhs) const\n    {\n        return _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root;\n    }\n\n    PUGI__FN xml_node& xml_node_iterator::operator*() const\n    {\n        assert(_wrap._root);\n        return _wrap;\n    }\n\n    PUGI__FN xml_node* xml_node_iterator::operator->() const\n    {\n        assert(_wrap._root);\n        return const_cast<xml_node*>(&_wrap); // BCC32 workaround\n    }\n\n    PUGI__FN const xml_node_iterator& xml_node_iterator::operator++()\n    {\n        assert(_wrap._root);\n        _wrap._root = _wrap._root->next_sibling;\n        return *this;\n    }\n\n    PUGI__FN xml_node_iterator xml_node_iterator::operator++(int)\n    {\n        xml_node_iterator temp = *this;\n        ++*this;\n        return temp;\n    }\n\n    PUGI__FN const xml_node_iterator& xml_node_iterator::operator--()\n    {\n        _wrap = _wrap._root ? _wrap.previous_sibling() : _parent.last_child();\n        return *this;\n    }\n\n    PUGI__FN xml_node_iterator xml_node_iterator::operator--(int)\n    {\n        xml_node_iterator temp = *this;\n        --*this;\n        return temp;\n    }\n\n    PUGI__FN xml_attribute_iterator::xml_attribute_iterator()\n    {\n    }\n\n    PUGI__FN xml_attribute_iterator::xml_attribute_iterator(const xml_attribute& attr, const xml_node& parent): _wrap(attr), _parent(parent)\n    {\n    }\n\n    PUGI__FN xml_attribute_iterator::xml_attribute_iterator(xml_attribute_struct* ref, xml_node_struct* parent): _wrap(ref), _parent(parent)\n    {\n    }\n\n    PUGI__FN bool xml_attribute_iterator::operator==(const xml_attribute_iterator& rhs) const\n    {\n        return _wrap._attr == rhs._wrap._attr && _parent._root == rhs._parent._root;\n    }\n    \n    PUGI__FN bool xml_attribute_iterator::operator!=(const xml_attribute_iterator& rhs) const\n    {\n        return _wrap._attr != rhs._wrap._attr || _parent._root != rhs._parent._root;\n    }\n\n    PUGI__FN xml_attribute& xml_attribute_iterator::operator*() const\n    {\n        assert(_wrap._attr);\n        return _wrap;\n    }\n\n    PUGI__FN xml_attribute* xml_attribute_iterator::operator->() const\n    {\n        assert(_wrap._attr);\n        return const_cast<xml_attribute*>(&_wrap); // BCC32 workaround\n    }\n\n    PUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator++()\n    {\n        assert(_wrap._attr);\n        _wrap._attr = _wrap._attr->next_attribute;\n        return *this;\n    }\n\n    PUGI__FN xml_attribute_iterator xml_attribute_iterator::operator++(int)\n    {\n        xml_attribute_iterator temp = *this;\n        ++*this;\n        return temp;\n    }\n\n    PUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator--()\n    {\n        _wrap = _wrap._attr ? _wrap.previous_attribute() : _parent.last_attribute();\n        return *this;\n    }\n\n    PUGI__FN xml_attribute_iterator xml_attribute_iterator::operator--(int)\n    {\n        xml_attribute_iterator temp = *this;\n        --*this;\n        return temp;\n    }\n\n    PUGI__FN xml_named_node_iterator::xml_named_node_iterator(): _name(0)\n    {\n    }\n\n    PUGI__FN xml_named_node_iterator::xml_named_node_iterator(const xml_node& node, const char_t* name): _wrap(node), _parent(node.parent()), _name(name)\n    {\n    }\n\n    PUGI__FN xml_named_node_iterator::xml_named_node_iterator(xml_node_struct* ref, xml_node_struct* parent, const char_t* name): _wrap(ref), _parent(parent), _name(name)\n    {\n    }\n\n    PUGI__FN bool xml_named_node_iterator::operator==(const xml_named_node_iterator& rhs) const\n    {\n        return _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root;\n    }\n\n    PUGI__FN bool xml_named_node_iterator::operator!=(const xml_named_node_iterator& rhs) const\n    {\n        return _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root;\n    }\n\n    PUGI__FN xml_node& xml_named_node_iterator::operator*() const\n    {\n        assert(_wrap._root);\n        return _wrap;\n    }\n\n    PUGI__FN xml_node* xml_named_node_iterator::operator->() const\n    {\n        assert(_wrap._root);\n        return const_cast<xml_node*>(&_wrap); // BCC32 workaround\n    }\n\n    PUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator++()\n    {\n        assert(_wrap._root);\n        _wrap = _wrap.next_sibling(_name);\n        return *this;\n    }\n\n    PUGI__FN xml_named_node_iterator xml_named_node_iterator::operator++(int)\n    {\n        xml_named_node_iterator temp = *this;\n        ++*this;\n        return temp;\n    }\n\n    PUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator--()\n    {\n        if (_wrap._root)\n            _wrap = _wrap.previous_sibling(_name);\n        else\n        {\n            _wrap = _parent.last_child();\n\n            if (!impl::strequal(_wrap.name(), _name))\n                _wrap = _wrap.previous_sibling(_name);\n        }\n\n        return *this;\n    }\n\n    PUGI__FN xml_named_node_iterator xml_named_node_iterator::operator--(int)\n    {\n        xml_named_node_iterator temp = *this;\n        --*this;\n        return temp;\n    }\n\n    PUGI__FN xml_parse_result::xml_parse_result(): status(status_internal_error), offset(0), encoding(encoding_auto)\n    {\n    }\n\n    PUGI__FN xml_parse_result::operator bool() const\n    {\n        return status == status_ok;\n    }\n\n    PUGI__FN const char* xml_parse_result::description() const\n    {\n        switch (status)\n        {\n        case status_ok: return \"No error\";\n\n        case status_file_not_found: return \"File was not found\";\n        case status_io_error: return \"Error reading from file/stream\";\n        case status_out_of_memory: return \"Could not allocate memory\";\n        case status_internal_error: return \"Internal error occurred\";\n\n        case status_unrecognized_tag: return \"Could not determine tag type\";\n\n        case status_bad_pi: return \"Error parsing document declaration/processing instruction\";\n        case status_bad_comment: return \"Error parsing comment\";\n        case status_bad_cdata: return \"Error parsing CDATA section\";\n        case status_bad_doctype: return \"Error parsing document type declaration\";\n        case status_bad_pcdata: return \"Error parsing PCDATA section\";\n        case status_bad_start_element: return \"Error parsing start element tag\";\n        case status_bad_attribute: return \"Error parsing element attribute\";\n        case status_bad_end_element: return \"Error parsing end element tag\";\n        case status_end_element_mismatch: return \"Start-end tags mismatch\";\n\n        case status_append_invalid_root: return \"Unable to append nodes: root is not an element or document\";\n\n        case status_no_document_element: return \"No document element found\";\n\n        default: return \"Unknown error\";\n        }\n    }\n\n    PUGI__FN xml_document::xml_document(): _buffer(0)\n    {\n        create();\n    }\n\n    PUGI__FN xml_document::~xml_document()\n    {\n        destroy();\n    }\n\n    PUGI__FN void xml_document::reset()\n    {\n        destroy();\n        create();\n    }\n\n    PUGI__FN void xml_document::reset(const xml_document& proto)\n    {\n        reset();\n\n        for (xml_node cur = proto.first_child(); cur; cur = cur.next_sibling())\n            append_copy(cur);\n    }\n\n    PUGI__FN void xml_document::create()\n    {\n        assert(!_root);\n\n        // initialize sentinel page\n        PUGI__STATIC_ASSERT(sizeof(impl::xml_memory_page) + sizeof(impl::xml_document_struct) + impl::xml_memory_page_alignment - sizeof(void*) <= sizeof(_memory));\n\n        // align upwards to page boundary\n        void* page_memory = reinterpret_cast<void*>((reinterpret_cast<uintptr_t>(_memory) + (impl::xml_memory_page_alignment - 1)) & ~(impl::xml_memory_page_alignment - 1));\n\n        // prepare page structure\n        impl::xml_memory_page* page = impl::xml_memory_page::construct(page_memory);\n        assert(page);\n\n        page->busy_size = impl::xml_memory_page_size;\n\n        // allocate new root\n        _root = new (reinterpret_cast<char*>(page) + sizeof(impl::xml_memory_page)) impl::xml_document_struct(page);\n        _root->prev_sibling_c = _root;\n\n        // setup sentinel page\n        page->allocator = static_cast<impl::xml_document_struct*>(_root);\n\n        // verify the document allocation\n        assert(reinterpret_cast<char*>(_root) + sizeof(impl::xml_document_struct) <= _memory + sizeof(_memory));\n    }\n\n    PUGI__FN void xml_document::destroy()\n    {\n        assert(_root);\n\n        // destroy static storage\n        if (_buffer)\n        {\n            impl::xml_memory::deallocate(_buffer);\n            _buffer = 0;\n        }\n\n        // destroy extra buffers (note: no need to destroy linked list nodes, they're allocated using document allocator)\n        for (impl::xml_extra_buffer* extra = static_cast<impl::xml_document_struct*>(_root)->extra_buffers; extra; extra = extra->next)\n        {\n            if (extra->buffer) impl::xml_memory::deallocate(extra->buffer);\n        }\n\n        // destroy dynamic storage, leave sentinel page (it's in static memory)\n        impl::xml_memory_page* root_page = reinterpret_cast<impl::xml_memory_page*>(_root->header & impl::xml_memory_page_pointer_mask);\n        assert(root_page && !root_page->prev);\n        assert(reinterpret_cast<char*>(root_page) >= _memory && reinterpret_cast<char*>(root_page) < _memory + sizeof(_memory));\n\n        for (impl::xml_memory_page* page = root_page->next; page; )\n        {\n            impl::xml_memory_page* next = page->next;\n\n            impl::xml_allocator::deallocate_page(page);\n\n            page = next;\n        }\n\n        _root = 0;\n    }\n\n#ifndef PUGIXML_NO_STL\n    PUGI__FN xml_parse_result xml_document::load(std::basic_istream<char, std::char_traits<char> >& stream, unsigned int options, xml_encoding encoding)\n    {\n        reset();\n\n        return impl::load_stream_impl(*this, stream, options, encoding);\n    }\n\n    PUGI__FN xml_parse_result xml_document::load(std::basic_istream<wchar_t, std::char_traits<wchar_t> >& stream, unsigned int options)\n    {\n        reset();\n\n        return impl::load_stream_impl(*this, stream, options, encoding_wchar);\n    }\n#endif\n\n    PUGI__FN xml_parse_result xml_document::load_string(const char_t* contents, unsigned int options)\n    {\n        // Force native encoding (skip autodetection)\n    #ifdef PUGIXML_WCHAR_MODE\n        xml_encoding encoding = encoding_wchar;\n    #else\n        xml_encoding encoding = encoding_utf8;\n    #endif\n\n        return load_buffer(contents, impl::strlength(contents) * sizeof(char_t), options, encoding);\n    }\n\n    PUGI__FN xml_parse_result xml_document::load(const char_t* contents, unsigned int options)\n    {\n        return load_string(contents, options);\n    }\n\n    PUGI__FN xml_parse_result xml_document::load_file(const char* path_, unsigned int options, xml_encoding encoding)\n    {\n        reset();\n\n        FILE* file = fopen(path_, \"rb\");\n\n        return impl::load_file_impl(*this, file, options, encoding);\n    }\n\n    PUGI__FN xml_parse_result xml_document::load_file(const wchar_t* path_, unsigned int options, xml_encoding encoding)\n    {\n        reset();\n\n        FILE* file = impl::open_file_wide(path_, L\"rb\");\n\n        return impl::load_file_impl(*this, file, options, encoding);\n    }\n\n    PUGI__FN xml_parse_result xml_document::load_buffer(const void* contents, size_t size, unsigned int options, xml_encoding encoding)\n    {\n        reset();\n\n        return impl::load_buffer_impl(static_cast<impl::xml_document_struct*>(_root), _root, const_cast<void*>(contents), size, options, encoding, false, false, &_buffer);\n    }\n\n    PUGI__FN xml_parse_result xml_document::load_buffer_inplace(void* contents, size_t size, unsigned int options, xml_encoding encoding)\n    {\n        reset();\n\n        return impl::load_buffer_impl(static_cast<impl::xml_document_struct*>(_root), _root, contents, size, options, encoding, true, false, &_buffer);\n    }\n\n    PUGI__FN xml_parse_result xml_document::load_buffer_inplace_own(void* contents, size_t size, unsigned int options, xml_encoding encoding)\n    {\n        reset();\n\n        return impl::load_buffer_impl(static_cast<impl::xml_document_struct*>(_root), _root, contents, size, options, encoding, true, true, &_buffer);\n    }\n\n    PUGI__FN void xml_document::save(xml_writer& writer, const char_t* indent, unsigned int flags, xml_encoding encoding) const\n    {\n        impl::xml_buffered_writer buffered_writer(writer, encoding);\n\n        if ((flags & format_write_bom) && encoding != encoding_latin1)\n        {\n            // BOM always represents the codepoint U+FEFF, so just write it in native encoding\n        #ifdef PUGIXML_WCHAR_MODE\n            unsigned int bom = 0xfeff;\n            buffered_writer.write(static_cast<wchar_t>(bom));\n        #else\n            buffered_writer.write('\\xef', '\\xbb', '\\xbf');\n        #endif\n        }\n\n        if (!(flags & format_no_declaration) && !impl::has_declaration(_root))\n        {\n            buffered_writer.write_string(PUGIXML_TEXT(\"<?xml version=\\\"1.0\\\"\"));\n            if (encoding == encoding_latin1) buffered_writer.write_string(PUGIXML_TEXT(\" encoding=\\\"ISO-8859-1\\\"\"));\n            buffered_writer.write('?', '>');\n            if (!(flags & format_raw)) buffered_writer.write('\\n');\n        }\n\n        impl::node_output(buffered_writer, _root, indent, flags, 0);\n    }\n\n#ifndef PUGIXML_NO_STL\n    PUGI__FN void xml_document::save(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent, unsigned int flags, xml_encoding encoding) const\n    {\n        xml_writer_stream writer(stream);\n\n        save(writer, indent, flags, encoding);\n    }\n\n    PUGI__FN void xml_document::save(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent, unsigned int flags) const\n    {\n        xml_writer_stream writer(stream);\n\n        save(writer, indent, flags, encoding_wchar);\n    }\n#endif\n\n    PUGI__FN bool xml_document::save_file(const char* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const\n    {\n        FILE* file = fopen(path_, (flags & format_save_file_text) ? \"w\" : \"wb\");\n        return impl::save_file_impl(*this, file, indent, flags, encoding);\n    }\n\n    PUGI__FN bool xml_document::save_file(const wchar_t* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const\n    {\n        FILE* file = impl::open_file_wide(path_, (flags & format_save_file_text) ? L\"w\" : L\"wb\");\n        return impl::save_file_impl(*this, file, indent, flags, encoding);\n    }\n\n    PUGI__FN xml_node xml_document::document_element() const\n    {\n        assert(_root);\n\n        for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n            if (PUGI__NODETYPE(i) == node_element)\n                return xml_node(i);\n\n        return xml_node();\n    }\n\n#ifndef PUGIXML_NO_STL\n    PUGI__FN std::string PUGIXML_FUNCTION as_utf8(const wchar_t* str)\n    {\n        assert(str);\n\n        return impl::as_utf8_impl(str, impl::strlength_wide(str));\n    }\n\n    PUGI__FN std::string PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t>& str)\n    {\n        return impl::as_utf8_impl(str.c_str(), str.size());\n    }\n    \n    PUGI__FN std::basic_string<wchar_t> PUGIXML_FUNCTION as_wide(const char* str)\n    {\n        assert(str);\n\n        return impl::as_wide_impl(str, strlen(str));\n    }\n    \n    PUGI__FN std::basic_string<wchar_t> PUGIXML_FUNCTION as_wide(const std::string& str)\n    {\n        return impl::as_wide_impl(str.c_str(), str.size());\n    }\n#endif\n\n    PUGI__FN void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate)\n    {\n        impl::xml_memory::allocate = allocate;\n        impl::xml_memory::deallocate = deallocate;\n    }\n\n    PUGI__FN allocation_function PUGIXML_FUNCTION get_memory_allocation_function()\n    {\n        return impl::xml_memory::allocate;\n    }\n\n    PUGI__FN deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()\n    {\n        return impl::xml_memory::deallocate;\n    }\n}\n\n#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))\nnamespace std\n{\n    // Workarounds for (non-standard) iterator category detection for older versions (MSVC7/IC8 and earlier)\n    PUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_node_iterator&)\n    {\n        return std::bidirectional_iterator_tag();\n    }\n\n    PUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_attribute_iterator&)\n    {\n        return std::bidirectional_iterator_tag();\n    }\n\n    PUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_named_node_iterator&)\n    {\n        return std::bidirectional_iterator_tag();\n    }\n}\n#endif\n\n#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)\nnamespace std\n{\n    // Workarounds for (non-standard) iterator category detection\n    PUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_node_iterator&)\n    {\n        return std::bidirectional_iterator_tag();\n    }\n\n    PUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_attribute_iterator&)\n    {\n        return std::bidirectional_iterator_tag();\n    }\n\n    PUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_named_node_iterator&)\n    {\n        return std::bidirectional_iterator_tag();\n    }\n}\n#endif\n\n#ifndef PUGIXML_NO_XPATH\n// STL replacements\nPUGI__NS_BEGIN\n    struct equal_to\n    {\n        template <typename T> bool operator()(const T& lhs, const T& rhs) const\n        {\n            return lhs == rhs;\n        }\n    };\n\n    struct not_equal_to\n    {\n        template <typename T> bool operator()(const T& lhs, const T& rhs) const\n        {\n            return lhs != rhs;\n        }\n    };\n\n    struct less\n    {\n        template <typename T> bool operator()(const T& lhs, const T& rhs) const\n        {\n            return lhs < rhs;\n        }\n    };\n\n    struct less_equal\n    {\n        template <typename T> bool operator()(const T& lhs, const T& rhs) const\n        {\n            return lhs <= rhs;\n        }\n    };\n\n    template <typename T> void swap(T& lhs, T& rhs)\n    {\n        T temp = lhs;\n        lhs = rhs;\n        rhs = temp;\n    }\n\n    template <typename I, typename Pred> I min_element(I begin, I end, const Pred& pred)\n    {\n        I result = begin;\n\n        for (I it = begin + 1; it != end; ++it)\n            if (pred(*it, *result))\n                result = it;\n\n        return result;\n    }\n\n    template <typename I> void reverse(I begin, I end)\n    {\n        while (end - begin > 1) swap(*begin++, *--end);\n    }\n\n    template <typename I> I unique(I begin, I end)\n    {\n        // fast skip head\n        while (end - begin > 1 && *begin != *(begin + 1)) begin++;\n\n        if (begin == end) return begin;\n\n        // last written element\n        I write = begin++; \n\n        // merge unique elements\n        while (begin != end)\n        {\n            if (*begin != *write)\n                *++write = *begin++;\n            else\n                begin++;\n        }\n\n        // past-the-end (write points to live element)\n        return write + 1;\n    }\n\n    template <typename I> void copy_backwards(I begin, I end, I target)\n    {\n        while (begin != end) *--target = *--end;\n    }\n\n    template <typename I, typename Pred, typename T> void insertion_sort(I begin, I end, const Pred& pred, T*)\n    {\n        assert(begin != end);\n\n        for (I it = begin + 1; it != end; ++it)\n        {\n            T val = *it;\n\n            if (pred(val, *begin))\n            {\n                // move to front\n                copy_backwards(begin, it, it + 1);\n                *begin = val;\n            }\n            else\n            {\n                I hole = it;\n\n                // move hole backwards\n                while (pred(val, *(hole - 1)))\n                {\n                    *hole = *(hole - 1);\n                    hole--;\n                }\n\n                // fill hole with element\n                *hole = val;\n            }\n        }\n    }\n\n    // std variant for elements with ==\n    template <typename I, typename Pred> void partition(I begin, I middle, I end, const Pred& pred, I* out_eqbeg, I* out_eqend)\n    {\n        I eqbeg = middle, eqend = middle + 1;\n\n        // expand equal range\n        while (eqbeg != begin && *(eqbeg - 1) == *eqbeg) --eqbeg;\n        while (eqend != end && *eqend == *eqbeg) ++eqend;\n\n        // process outer elements\n        I ltend = eqbeg, gtbeg = eqend;\n\n        for (;;)\n        {\n            // find the element from the right side that belongs to the left one\n            for (; gtbeg != end; ++gtbeg)\n                if (!pred(*eqbeg, *gtbeg))\n                {\n                    if (*gtbeg == *eqbeg) swap(*gtbeg, *eqend++);\n                    else break;\n                }\n\n            // find the element from the left side that belongs to the right one\n            for (; ltend != begin; --ltend)\n                if (!pred(*(ltend - 1), *eqbeg))\n                {\n                    if (*eqbeg == *(ltend - 1)) swap(*(ltend - 1), *--eqbeg);\n                    else break;\n                }\n\n            // scanned all elements\n            if (gtbeg == end && ltend == begin)\n            {\n                *out_eqbeg = eqbeg;\n                *out_eqend = eqend;\n                return;\n            }\n\n            // make room for elements by moving equal area\n            if (gtbeg == end)\n            {\n                if (--ltend != --eqbeg) swap(*ltend, *eqbeg);\n                swap(*eqbeg, *--eqend);\n            }\n            else if (ltend == begin)\n            {\n                if (eqend != gtbeg) swap(*eqbeg, *eqend);\n                ++eqend;\n                swap(*gtbeg++, *eqbeg++);\n            }\n            else swap(*gtbeg++, *--ltend);\n        }\n    }\n\n    template <typename I, typename Pred> void median3(I first, I middle, I last, const Pred& pred)\n    {\n        if (pred(*middle, *first)) swap(*middle, *first);\n        if (pred(*last, *middle)) swap(*last, *middle);\n        if (pred(*middle, *first)) swap(*middle, *first);\n    }\n\n    template <typename I, typename Pred> void median(I first, I middle, I last, const Pred& pred)\n    {\n        if (last - first <= 40)\n        {\n            // median of three for small chunks\n            median3(first, middle, last, pred);\n        }\n        else\n        {\n            // median of nine\n            size_t step = (last - first + 1) / 8;\n\n            median3(first, first + step, first + 2 * step, pred);\n            median3(middle - step, middle, middle + step, pred);\n            median3(last - 2 * step, last - step, last, pred);\n            median3(first + step, middle, last - step, pred);\n        }\n    }\n\n    template <typename I, typename Pred> void sort(I begin, I end, const Pred& pred)\n    {\n        // sort large chunks\n        while (end - begin > 32)\n        {\n            // find median element\n            I middle = begin + (end - begin) / 2;\n            median(begin, middle, end - 1, pred);\n\n            // partition in three chunks (< = >)\n            I eqbeg, eqend;\n            partition(begin, middle, end, pred, &eqbeg, &eqend);\n\n            // loop on larger half\n            if (eqbeg - begin > end - eqend)\n            {\n                sort(eqend, end, pred);\n                end = eqbeg;\n            }\n            else\n            {\n                sort(begin, eqbeg, pred);\n                begin = eqend;\n            }\n        }\n\n        // insertion sort small chunk\n        if (begin != end) insertion_sort(begin, end, pred, &*begin);\n    }\nPUGI__NS_END\n\n// Allocator used for AST and evaluation stacks\nPUGI__NS_BEGIN\n    struct xpath_memory_block\n    {    \n        xpath_memory_block* next;\n        size_t capacity;\n\n        char data[\n    #ifdef PUGIXML_MEMORY_XPATH_PAGE_SIZE\n            PUGIXML_MEMORY_XPATH_PAGE_SIZE\n    #else\n            4096\n    #endif\n        ];\n    };\n        \n    class xpath_allocator\n    {\n        xpath_memory_block* _root;\n        size_t _root_size;\n\n    public:\n    #ifdef PUGIXML_NO_EXCEPTIONS\n        jmp_buf* error_handler;\n    #endif\n\n        xpath_allocator(xpath_memory_block* root, size_t root_size = 0): _root(root), _root_size(root_size)\n        {\n        #ifdef PUGIXML_NO_EXCEPTIONS\n            error_handler = 0;\n        #endif\n        }\n        \n        void* allocate_nothrow(size_t size)\n        {\n            // align size so that we're able to store pointers in subsequent blocks\n            size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);\n\n            if (_root_size + size <= _root->capacity)\n            {\n                void* buf = _root->data + _root_size;\n                _root_size += size;\n                return buf;\n            }\n            else\n            {\n                // make sure we have at least 1/4th of the page free after allocation to satisfy subsequent allocation requests\n                size_t block_capacity_base = sizeof(_root->data);\n                size_t block_capacity_req = size + block_capacity_base / 4;\n                size_t block_capacity = (block_capacity_base > block_capacity_req) ? block_capacity_base : block_capacity_req;\n\n                size_t block_size = block_capacity + offsetof(xpath_memory_block, data);\n\n                xpath_memory_block* block = static_cast<xpath_memory_block*>(xml_memory::allocate(block_size));\n                if (!block) return 0;\n                \n                block->next = _root;\n                block->capacity = block_capacity;\n                \n                _root = block;\n                _root_size = size;\n                \n                return block->data;\n            }\n        }\n\n        void* allocate(size_t size)\n        {\n            void* result = allocate_nothrow(size);\n\n            if (!result)\n            {\n            #ifdef PUGIXML_NO_EXCEPTIONS\n                assert(error_handler);\n                longjmp(*error_handler, 1);\n            #else\n                throw std::bad_alloc();\n            #endif\n            }\n\n            return result;\n        }\n\n        void* reallocate(void* ptr, size_t old_size, size_t new_size)\n        {\n            // align size so that we're able to store pointers in subsequent blocks\n            old_size = (old_size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);\n            new_size = (new_size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);\n\n            // we can only reallocate the last object\n            assert(ptr == 0 || static_cast<char*>(ptr) + old_size == _root->data + _root_size);\n\n            // adjust root size so that we have not allocated the object at all\n            bool only_object = (_root_size == old_size);\n\n            if (ptr) _root_size -= old_size;\n\n            // allocate a new version (this will obviously reuse the memory if possible)\n            void* result = allocate(new_size);\n            assert(result);\n\n            // we have a new block\n            if (result != ptr && ptr)\n            {\n                // copy old data\n                assert(new_size >= old_size);\n                memcpy(result, ptr, old_size);\n\n                // free the previous page if it had no other objects\n                if (only_object)\n                {\n                    assert(_root->data == result);\n                    assert(_root->next);\n\n                    xpath_memory_block* next = _root->next->next;\n\n                    if (next)\n                    {\n                        // deallocate the whole page, unless it was the first one\n                        xml_memory::deallocate(_root->next);\n                        _root->next = next;\n                    }\n                }\n            }\n\n            return result;\n        }\n\n        void revert(const xpath_allocator& state)\n        {\n            // free all new pages\n            xpath_memory_block* cur = _root;\n\n            while (cur != state._root)\n            {\n                xpath_memory_block* next = cur->next;\n\n                xml_memory::deallocate(cur);\n\n                cur = next;\n            }\n\n            // restore state\n            _root = state._root;\n            _root_size = state._root_size;\n        }\n\n        void release()\n        {\n            xpath_memory_block* cur = _root;\n            assert(cur);\n\n            while (cur->next)\n            {\n                xpath_memory_block* next = cur->next;\n\n                xml_memory::deallocate(cur);\n\n                cur = next;\n            }\n        }\n    };\n\n    struct xpath_allocator_capture\n    {\n        xpath_allocator_capture(xpath_allocator* alloc): _target(alloc), _state(*alloc)\n        {\n        }\n\n        ~xpath_allocator_capture()\n        {\n            _target->revert(_state);\n        }\n\n        xpath_allocator* _target;\n        xpath_allocator _state;\n    };\n\n    struct xpath_stack\n    {\n        xpath_allocator* result;\n        xpath_allocator* temp;\n    };\n\n    struct xpath_stack_data\n    {\n        xpath_memory_block blocks[2];\n        xpath_allocator result;\n        xpath_allocator temp;\n        xpath_stack stack;\n\n    #ifdef PUGIXML_NO_EXCEPTIONS\n        jmp_buf error_handler;\n    #endif\n\n        xpath_stack_data(): result(blocks + 0), temp(blocks + 1)\n        {\n            blocks[0].next = blocks[1].next = 0;\n            blocks[0].capacity = blocks[1].capacity = sizeof(blocks[0].data);\n\n            stack.result = &result;\n            stack.temp = &temp;\n\n        #ifdef PUGIXML_NO_EXCEPTIONS\n            result.error_handler = temp.error_handler = &error_handler;\n        #endif\n        }\n\n        ~xpath_stack_data()\n        {\n            result.release();\n            temp.release();\n        }\n    };\nPUGI__NS_END\n\n// String class\nPUGI__NS_BEGIN\n    class xpath_string\n    {\n        const char_t* _buffer;\n        bool _uses_heap;\n        size_t _length_heap;\n\n        static char_t* duplicate_string(const char_t* string, size_t length, xpath_allocator* alloc)\n        {\n            char_t* result = static_cast<char_t*>(alloc->allocate((length + 1) * sizeof(char_t)));\n            assert(result);\n\n            memcpy(result, string, length * sizeof(char_t));\n            result[length] = 0;\n\n            return result;\n        }\n\n        xpath_string(const char_t* buffer, bool uses_heap_, size_t length_heap): _buffer(buffer), _uses_heap(uses_heap_), _length_heap(length_heap)\n        {\n        }\n\n    public:\n        static xpath_string from_const(const char_t* str)\n        {\n            return xpath_string(str, false, 0);\n        }\n\n        static xpath_string from_heap_preallocated(const char_t* begin, const char_t* end)\n        {\n            assert(begin <= end && *end == 0);\n\n            return xpath_string(begin, true, static_cast<size_t>(end - begin));\n        }\n\n        static xpath_string from_heap(const char_t* begin, const char_t* end, xpath_allocator* alloc)\n        {\n            assert(begin <= end);\n\n            size_t length = static_cast<size_t>(end - begin);\n\n            return length == 0 ? xpath_string() : xpath_string(duplicate_string(begin, length, alloc), true, length);\n        }\n\n        xpath_string(): _buffer(PUGIXML_TEXT(\"\")), _uses_heap(false), _length_heap(0)\n        {\n        }\n\n        void append(const xpath_string& o, xpath_allocator* alloc)\n        {\n            // skip empty sources\n            if (!*o._buffer) return;\n\n            // fast append for constant empty target and constant source\n            if (!*_buffer && !_uses_heap && !o._uses_heap)\n            {\n                _buffer = o._buffer;\n            }\n            else\n            {\n                // need to make heap copy\n                size_t target_length = length();\n                size_t source_length = o.length();\n                size_t result_length = target_length + source_length;\n\n                // allocate new buffer\n                char_t* result = static_cast<char_t*>(alloc->reallocate(_uses_heap ? const_cast<char_t*>(_buffer) : 0, (target_length + 1) * sizeof(char_t), (result_length + 1) * sizeof(char_t)));\n                assert(result);\n\n                // append first string to the new buffer in case there was no reallocation\n                if (!_uses_heap) memcpy(result, _buffer, target_length * sizeof(char_t));\n\n                // append second string to the new buffer\n                memcpy(result + target_length, o._buffer, source_length * sizeof(char_t));\n                result[result_length] = 0;\n\n                // finalize\n                _buffer = result;\n                _uses_heap = true;\n                _length_heap = result_length;\n            }\n        }\n\n        const char_t* c_str() const\n        {\n            return _buffer;\n        }\n\n        size_t length() const\n        {\n            return _uses_heap ? _length_heap : strlength(_buffer);\n        }\n        \n        char_t* data(xpath_allocator* alloc)\n        {\n            // make private heap copy\n            if (!_uses_heap)\n            {\n                size_t length_ = strlength(_buffer);\n\n                _buffer = duplicate_string(_buffer, length_, alloc);\n                _uses_heap = true;\n                _length_heap = length_;\n            }\n\n            return const_cast<char_t*>(_buffer);\n        }\n\n        bool empty() const\n        {\n            return *_buffer == 0;\n        }\n\n        bool operator==(const xpath_string& o) const\n        {\n            return strequal(_buffer, o._buffer);\n        }\n\n        bool operator!=(const xpath_string& o) const\n        {\n            return !strequal(_buffer, o._buffer);\n        }\n\n        bool uses_heap() const\n        {\n            return _uses_heap;\n        }\n    };\nPUGI__NS_END\n\nPUGI__NS_BEGIN\n    PUGI__FN bool starts_with(const char_t* string, const char_t* pattern)\n    {\n        while (*pattern && *string == *pattern)\n        {\n            string++;\n            pattern++;\n        }\n\n        return *pattern == 0;\n    }\n\n    PUGI__FN const char_t* find_char(const char_t* s, char_t c)\n    {\n    #ifdef PUGIXML_WCHAR_MODE\n        return wcschr(s, c);\n    #else\n        return strchr(s, c);\n    #endif\n    }\n\n    PUGI__FN const char_t* find_substring(const char_t* s, const char_t* p)\n    {\n    #ifdef PUGIXML_WCHAR_MODE\n        // MSVC6 wcsstr bug workaround (if s is empty it always returns 0)\n        return (*p == 0) ? s : wcsstr(s, p);\n    #else\n        return strstr(s, p);\n    #endif\n    }\n\n    // Converts symbol to lower case, if it is an ASCII one\n    PUGI__FN char_t tolower_ascii(char_t ch)\n    {\n        return static_cast<unsigned int>(ch - 'A') < 26 ? static_cast<char_t>(ch | ' ') : ch;\n    }\n\n    PUGI__FN xpath_string string_value(const xpath_node& na, xpath_allocator* alloc)\n    {\n        if (na.attribute())\n            return xpath_string::from_const(na.attribute().value());\n        else\n        {\n            xml_node n = na.node();\n\n            switch (n.type())\n            {\n            case node_pcdata:\n            case node_cdata:\n            case node_comment:\n            case node_pi:\n                return xpath_string::from_const(n.value());\n            \n            case node_document:\n            case node_element:\n            {\n                xpath_string result;\n\n                xml_node cur = n.first_child();\n                \n                while (cur && cur != n)\n                {\n                    if (cur.type() == node_pcdata || cur.type() == node_cdata)\n                        result.append(xpath_string::from_const(cur.value()), alloc);\n\n                    if (cur.first_child())\n                        cur = cur.first_child();\n                    else if (cur.next_sibling())\n                        cur = cur.next_sibling();\n                    else\n                    {\n                        while (!cur.next_sibling() && cur != n)\n                            cur = cur.parent();\n\n                        if (cur != n) cur = cur.next_sibling();\n                    }\n                }\n                \n                return result;\n            }\n            \n            default:\n                return xpath_string();\n            }\n        }\n    }\n    \n    PUGI__FN bool node_is_before_sibling(xml_node_struct* ln, xml_node_struct* rn)\n    {\n        assert(ln->parent == rn->parent);\n\n        // there is no common ancestor (the shared parent is null), nodes are from different documents\n        if (!ln->parent) return ln < rn;\n\n        // determine sibling order\n        xml_node_struct* ls = ln;\n        xml_node_struct* rs = rn;\n\n        while (ls && rs)\n        {\n            if (ls == rn) return true;\n            if (rs == ln) return false;\n\n            ls = ls->next_sibling;\n            rs = rs->next_sibling;\n        }\n\n        // if rn sibling chain ended ln must be before rn\n        return !rs;\n    }\n    \n    PUGI__FN bool node_is_before(xml_node_struct* ln, xml_node_struct* rn)\n    {\n        // find common ancestor at the same depth, if any\n        xml_node_struct* lp = ln;\n        xml_node_struct* rp = rn;\n\n        while (lp && rp && lp->parent != rp->parent)\n        {\n            lp = lp->parent;\n            rp = rp->parent;\n        }\n\n        // parents are the same!\n        if (lp && rp) return node_is_before_sibling(lp, rp);\n\n        // nodes are at different depths, need to normalize heights\n        bool left_higher = !lp;\n\n        while (lp)\n        {\n            lp = lp->parent;\n            ln = ln->parent;\n        }\n\n        while (rp)\n        {\n            rp = rp->parent;\n            rn = rn->parent;\n        }\n\n        // one node is the ancestor of the other\n        if (ln == rn) return left_higher;\n\n        // find common ancestor... again\n        while (ln->parent != rn->parent)\n        {\n            ln = ln->parent;\n            rn = rn->parent;\n        }\n\n        return node_is_before_sibling(ln, rn);\n    }\n\n    PUGI__FN bool node_is_ancestor(xml_node_struct* parent, xml_node_struct* node)\n    {\n        while (node && node != parent) node = node->parent;\n\n        return parent && node == parent;\n    }\n\n    PUGI__FN const void* document_buffer_order(const xpath_node& xnode)\n    {\n        xml_node_struct* node = xnode.node().internal_object();\n\n        if (node)\n        {\n            if ((get_document(node).header & xml_memory_page_contents_shared_mask) == 0)\n            {\n                if (node->name && (node->header & impl::xml_memory_page_name_allocated_or_shared_mask) == 0) return node->name;\n                if (node->value && (node->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0) return node->value;\n            }\n\n            return 0;\n        }\n\n        xml_attribute_struct* attr = xnode.attribute().internal_object();\n\n        if (attr)\n        {\n            if ((get_document(attr).header & xml_memory_page_contents_shared_mask) == 0)\n            {\n                if ((attr->header & impl::xml_memory_page_name_allocated_or_shared_mask) == 0) return attr->name;\n                if ((attr->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0) return attr->value;\n            }\n\n            return 0;\n        }\n\n        return 0;\n    }\n    \n    struct document_order_comparator\n    {\n        bool operator()(const xpath_node& lhs, const xpath_node& rhs) const\n        {\n            // optimized document order based check\n            const void* lo = document_buffer_order(lhs);\n            const void* ro = document_buffer_order(rhs);\n\n            if (lo && ro) return lo < ro;\n\n            // slow comparison\n            xml_node ln = lhs.node(), rn = rhs.node();\n\n            // compare attributes\n            if (lhs.attribute() && rhs.attribute())\n            {\n                // shared parent\n                if (lhs.parent() == rhs.parent())\n                {\n                    // determine sibling order\n                    for (xml_attribute a = lhs.attribute(); a; a = a.next_attribute())\n                        if (a == rhs.attribute())\n                            return true;\n                    \n                    return false;\n                }\n                \n                // compare attribute parents\n                ln = lhs.parent();\n                rn = rhs.parent();\n            }\n            else if (lhs.attribute())\n            {\n                // attributes go after the parent element\n                if (lhs.parent() == rhs.node()) return false;\n                \n                ln = lhs.parent();\n            }\n            else if (rhs.attribute())\n            {\n                // attributes go after the parent element\n                if (rhs.parent() == lhs.node()) return true;\n                \n                rn = rhs.parent();\n            }\n\n            if (ln == rn) return false;\n\n            if (!ln || !rn) return ln < rn;\n            \n            return node_is_before(ln.internal_object(), rn.internal_object());\n        }\n    };\n\n    struct duplicate_comparator\n    {\n        bool operator()(const xpath_node& lhs, const xpath_node& rhs) const\n        {\n            if (lhs.attribute()) return rhs.attribute() ? lhs.attribute() < rhs.attribute() : true;\n            else return rhs.attribute() ? false : lhs.node() < rhs.node();\n        }\n    };\n    \n    PUGI__FN double gen_nan()\n    {\n    #if defined(__STDC_IEC_559__) || ((FLT_RADIX - 0 == 2) && (FLT_MAX_EXP - 0 == 128) && (FLT_MANT_DIG - 0 == 24))\n        union { float f; uint32_t i; } u[sizeof(float) == sizeof(uint32_t) ? 1 : -1];\n        u[0].i = 0x7fc00000;\n        return u[0].f;\n    #else\n        // fallback\n        const volatile double zero = 0.0;\n        return zero / zero;\n    #endif\n    }\n    \n    PUGI__FN bool is_nan(double value)\n    {\n    #if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__)\n        return !!_isnan(value);\n    #elif defined(fpclassify) && defined(FP_NAN)\n        return fpclassify(value) == FP_NAN;\n    #else\n        // fallback\n        const volatile double v = value;\n        return v != v;\n    #endif\n    }\n    \n    PUGI__FN const char_t* convert_number_to_string_special(double value)\n    {\n    #if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__)\n        if (_finite(value)) return (value == 0) ? PUGIXML_TEXT(\"0\") : 0;\n        if (_isnan(value)) return PUGIXML_TEXT(\"NaN\");\n        return value > 0 ? PUGIXML_TEXT(\"Infinity\") : PUGIXML_TEXT(\"-Infinity\");\n    #elif defined(fpclassify) && defined(FP_NAN) && defined(FP_INFINITE) && defined(FP_ZERO)\n        switch (fpclassify(value))\n        {\n        case FP_NAN:\n            return PUGIXML_TEXT(\"NaN\");\n\n        case FP_INFINITE:\n            return value > 0 ? PUGIXML_TEXT(\"Infinity\") : PUGIXML_TEXT(\"-Infinity\");\n\n        case FP_ZERO:\n            return PUGIXML_TEXT(\"0\");\n\n        default:\n            return 0;\n        }\n    #else\n        // fallback\n        const volatile double v = value;\n\n        if (v == 0) return PUGIXML_TEXT(\"0\");\n        if (v != v) return PUGIXML_TEXT(\"NaN\");\n        if (v * 2 == v) return value > 0 ? PUGIXML_TEXT(\"Infinity\") : PUGIXML_TEXT(\"-Infinity\");\n        return 0;\n    #endif\n    }\n    \n    PUGI__FN bool convert_number_to_boolean(double value)\n    {\n        return (value != 0 && !is_nan(value));\n    }\n    \n    PUGI__FN void truncate_zeros(char* begin, char* end)\n    {\n        while (begin != end && end[-1] == '0') end--;\n\n        *end = 0;\n    }\n\n    // gets mantissa digits in the form of 0.xxxxx with 0. implied and the exponent\n#if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE)\n    PUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent)\n    {\n        // get base values\n        int sign, exponent;\n        _ecvt_s(buffer, buffer_size, value, DBL_DIG + 1, &exponent, &sign);\n\n        // truncate redundant zeros\n        truncate_zeros(buffer, buffer + strlen(buffer));\n\n        // fill results\n        *out_mantissa = buffer;\n        *out_exponent = exponent;\n    }\n#else\n    PUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent)\n    {\n        // get a scientific notation value with IEEE DBL_DIG decimals\n        sprintf(buffer, \"%.*e\", DBL_DIG, value);\n        assert(strlen(buffer) < buffer_size);\n        (void)!buffer_size;\n\n        // get the exponent (possibly negative)\n        char* exponent_string = strchr(buffer, 'e');\n        assert(exponent_string);\n\n        int exponent = atoi(exponent_string + 1);\n\n        // extract mantissa string: skip sign\n        char* mantissa = buffer[0] == '-' ? buffer + 1 : buffer;\n        assert(mantissa[0] != '0' && mantissa[1] == '.');\n\n        // divide mantissa by 10 to eliminate integer part\n        mantissa[1] = mantissa[0];\n        mantissa++;\n        exponent++;\n\n        // remove extra mantissa digits and zero-terminate mantissa\n        truncate_zeros(mantissa, exponent_string);\n\n        // fill results\n        *out_mantissa = mantissa;\n        *out_exponent = exponent;\n    }\n#endif\n\n    PUGI__FN xpath_string convert_number_to_string(double value, xpath_allocator* alloc)\n    {\n        // try special number conversion\n        const char_t* special = convert_number_to_string_special(value);\n        if (special) return xpath_string::from_const(special);\n\n        // get mantissa + exponent form\n        char mantissa_buffer[32];\n\n        char* mantissa;\n        int exponent;\n        convert_number_to_mantissa_exponent(value, mantissa_buffer, sizeof(mantissa_buffer), &mantissa, &exponent);\n\n        // allocate a buffer of suitable length for the number\n        size_t result_size = strlen(mantissa_buffer) + (exponent > 0 ? exponent : -exponent) + 4;\n        char_t* result = static_cast<char_t*>(alloc->allocate(sizeof(char_t) * result_size));\n        assert(result);\n\n        // make the number!\n        char_t* s = result;\n\n        // sign\n        if (value < 0) *s++ = '-';\n\n        // integer part\n        if (exponent <= 0)\n        {\n            *s++ = '0';\n        }\n        else\n        {\n            while (exponent > 0)\n            {\n                assert(*mantissa == 0 || static_cast<unsigned int>(static_cast<unsigned int>(*mantissa) - '0') <= 9);\n                *s++ = *mantissa ? *mantissa++ : '0';\n                exponent--;\n            }\n        }\n\n        // fractional part\n        if (*mantissa)\n        {\n            // decimal point\n            *s++ = '.';\n\n            // extra zeroes from negative exponent\n            while (exponent < 0)\n            {\n                *s++ = '0';\n                exponent++;\n            }\n\n            // extra mantissa digits\n            while (*mantissa)\n            {\n                assert(static_cast<unsigned int>(*mantissa - '0') <= 9);\n                *s++ = *mantissa++;\n            }\n        }\n\n        // zero-terminate\n        assert(s < result + result_size);\n        *s = 0;\n\n        return xpath_string::from_heap_preallocated(result, s);\n    }\n    \n    PUGI__FN bool check_string_to_number_format(const char_t* string)\n    {\n        // parse leading whitespace\n        while (PUGI__IS_CHARTYPE(*string, ct_space)) ++string;\n\n        // parse sign\n        if (*string == '-') ++string;\n\n        if (!*string) return false;\n\n        // if there is no integer part, there should be a decimal part with at least one digit\n        if (!PUGI__IS_CHARTYPEX(string[0], ctx_digit) && (string[0] != '.' || !PUGI__IS_CHARTYPEX(string[1], ctx_digit))) return false;\n\n        // parse integer part\n        while (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string;\n\n        // parse decimal part\n        if (*string == '.')\n        {\n            ++string;\n\n            while (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string;\n        }\n\n        // parse trailing whitespace\n        while (PUGI__IS_CHARTYPE(*string, ct_space)) ++string;\n\n        return *string == 0;\n    }\n\n    PUGI__FN double convert_string_to_number(const char_t* string)\n    {\n        // check string format\n        if (!check_string_to_number_format(string)) return gen_nan();\n\n        // parse string\n    #ifdef PUGIXML_WCHAR_MODE\n        return wcstod(string, 0);\n    #else\n        return atof(string);\n    #endif\n    }\n\n    PUGI__FN bool convert_string_to_number_scratch(char_t (&buffer)[32], const char_t* begin, const char_t* end, double* out_result)\n    {\n        size_t length = static_cast<size_t>(end - begin);\n        char_t* scratch = buffer;\n\n        if (length >= sizeof(buffer) / sizeof(buffer[0]))\n        {\n            // need to make dummy on-heap copy\n            scratch = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n            if (!scratch) return false;\n        }\n\n        // copy string to zero-terminated buffer and perform conversion\n        memcpy(scratch, begin, length * sizeof(char_t));\n        scratch[length] = 0;\n\n        *out_result = convert_string_to_number(scratch);\n\n        // free dummy buffer\n        if (scratch != buffer) xml_memory::deallocate(scratch);\n\n        return true;\n    }\n    \n    PUGI__FN double round_nearest(double value)\n    {\n        return floor(value + 0.5);\n    }\n\n    PUGI__FN double round_nearest_nzero(double value)\n    {\n        // same as round_nearest, but returns -0 for [-0.5, -0]\n        // ceil is used to differentiate between +0 and -0 (we return -0 for [-0.5, -0] and +0 for +0)\n        return (value >= -0.5 && value <= 0) ? ceil(value) : floor(value + 0.5);\n    }\n    \n    PUGI__FN const char_t* qualified_name(const xpath_node& node)\n    {\n        return node.attribute() ? node.attribute().name() : node.node().name();\n    }\n    \n    PUGI__FN const char_t* local_name(const xpath_node& node)\n    {\n        const char_t* name = qualified_name(node);\n        const char_t* p = find_char(name, ':');\n        \n        return p ? p + 1 : name;\n    }\n\n    struct namespace_uri_predicate\n    {\n        const char_t* prefix;\n        size_t prefix_length;\n\n        namespace_uri_predicate(const char_t* name)\n        {\n            const char_t* pos = find_char(name, ':');\n\n            prefix = pos ? name : 0;\n            prefix_length = pos ? static_cast<size_t>(pos - name) : 0;\n        }\n\n        bool operator()(xml_attribute a) const\n        {\n            const char_t* name = a.name();\n\n            if (!starts_with(name, PUGIXML_TEXT(\"xmlns\"))) return false;\n\n            return prefix ? name[5] == ':' && strequalrange(name + 6, prefix, prefix_length) : name[5] == 0;\n        }\n    };\n\n    PUGI__FN const char_t* namespace_uri(xml_node node)\n    {\n        namespace_uri_predicate pred = node.name();\n        \n        xml_node p = node;\n        \n        while (p)\n        {\n            xml_attribute a = p.find_attribute(pred);\n            \n            if (a) return a.value();\n            \n            p = p.parent();\n        }\n        \n        return PUGIXML_TEXT(\"\");\n    }\n\n    PUGI__FN const char_t* namespace_uri(xml_attribute attr, xml_node parent)\n    {\n        namespace_uri_predicate pred = attr.name();\n        \n        // Default namespace does not apply to attributes\n        if (!pred.prefix) return PUGIXML_TEXT(\"\");\n        \n        xml_node p = parent;\n        \n        while (p)\n        {\n            xml_attribute a = p.find_attribute(pred);\n            \n            if (a) return a.value();\n            \n            p = p.parent();\n        }\n        \n        return PUGIXML_TEXT(\"\");\n    }\n\n    PUGI__FN const char_t* namespace_uri(const xpath_node& node)\n    {\n        return node.attribute() ? namespace_uri(node.attribute(), node.parent()) : namespace_uri(node.node());\n    }\n\n    PUGI__FN char_t* normalize_space(char_t* buffer)\n    {\n        char_t* write = buffer;\n\n        for (char_t* it = buffer; *it; )\n        {\n            char_t ch = *it++;\n\n            if (PUGI__IS_CHARTYPE(ch, ct_space))\n            {\n                // replace whitespace sequence with single space\n                while (PUGI__IS_CHARTYPE(*it, ct_space)) it++;\n\n                // avoid leading spaces\n                if (write != buffer) *write++ = ' ';\n            }\n            else *write++ = ch;\n        }\n\n        // remove trailing space\n        if (write != buffer && PUGI__IS_CHARTYPE(write[-1], ct_space)) write--;\n\n        // zero-terminate\n        *write = 0;\n\n        return write;\n    }\n\n    PUGI__FN char_t* translate(char_t* buffer, const char_t* from, const char_t* to, size_t to_length)\n    {\n        char_t* write = buffer;\n\n        while (*buffer)\n        {\n            PUGI__DMC_VOLATILE char_t ch = *buffer++;\n\n            const char_t* pos = find_char(from, ch);\n\n            if (!pos)\n                *write++ = ch; // do not process\n            else if (static_cast<size_t>(pos - from) < to_length)\n                *write++ = to[pos - from]; // replace\n        }\n\n        // zero-terminate\n        *write = 0;\n\n        return write;\n    }\n\n    PUGI__FN unsigned char* translate_table_generate(xpath_allocator* alloc, const char_t* from, const char_t* to)\n    {\n        unsigned char table[128] = {0};\n\n        while (*from)\n        {\n            unsigned int fc = static_cast<unsigned int>(*from);\n            unsigned int tc = static_cast<unsigned int>(*to);\n\n            if (fc >= 128 || tc >= 128)\n                return 0;\n\n            // code=128 means \"skip character\"\n            if (!table[fc])\n                table[fc] = static_cast<unsigned char>(tc ? tc : 128);\n\n            from++;\n            if (tc) to++;\n        }\n\n        for (int i = 0; i < 128; ++i)\n            if (!table[i])\n                table[i] = static_cast<unsigned char>(i);\n\n        void* result = alloc->allocate_nothrow(sizeof(table));\n\n        if (result)\n        {\n            memcpy(result, table, sizeof(table));\n        }\n\n        return static_cast<unsigned char*>(result);\n    }\n\n    PUGI__FN char_t* translate_table(char_t* buffer, const unsigned char* table)\n    {\n        char_t* write = buffer;\n\n        while (*buffer)\n        {\n            char_t ch = *buffer++;\n            unsigned int index = static_cast<unsigned int>(ch);\n\n            if (index < 128)\n            {\n                unsigned char code = table[index];\n\n                // code=128 means \"skip character\" (table size is 128 so 128 can be a special value)\n                // this code skips these characters without extra branches\n                *write = static_cast<char_t>(code);\n                write += 1 - (code >> 7);\n            }\n            else\n            {\n                *write++ = ch;\n            }\n        }\n\n        // zero-terminate\n        *write = 0;\n\n        return write;\n    }\n\n    inline bool is_xpath_attribute(const char_t* name)\n    {\n        return !(starts_with(name, PUGIXML_TEXT(\"xmlns\")) && (name[5] == 0 || name[5] == ':'));\n    }\n\n    struct xpath_variable_boolean: xpath_variable\n    {\n        xpath_variable_boolean(): value(false)\n        {\n        }\n\n        bool value;\n        char_t name[1];\n    };\n\n    struct xpath_variable_number: xpath_variable\n    {\n        xpath_variable_number(): value(0)\n        {\n        }\n\n        double value;\n        char_t name[1];\n    };\n\n    struct xpath_variable_string: xpath_variable\n    {\n        xpath_variable_string(): value(0)\n        {\n        }\n\n        ~xpath_variable_string()\n        {\n            if (value) xml_memory::deallocate(value);\n        }\n\n        char_t* value;\n        char_t name[1];\n    };\n\n    struct xpath_variable_node_set: xpath_variable\n    {\n        xpath_node_set value;\n        char_t name[1];\n    };\n\n    static const xpath_node_set dummy_node_set;\n\n    PUGI__FN unsigned int hash_string(const char_t* str)\n    {\n        // Jenkins one-at-a-time hash (http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time)\n        unsigned int result = 0;\n\n        while (*str)\n        {\n            result += static_cast<unsigned int>(*str++);\n            result += result << 10;\n            result ^= result >> 6;\n        }\n    \n        result += result << 3;\n        result ^= result >> 11;\n        result += result << 15;\n    \n        return result;\n    }\n\n    template <typename T> PUGI__FN T* new_xpath_variable(const char_t* name)\n    {\n        size_t length = strlength(name);\n        if (length == 0) return 0; // empty variable names are invalid\n\n        // $$ we can't use offsetof(T, name) because T is non-POD, so we just allocate additional length characters\n        void* memory = xml_memory::allocate(sizeof(T) + length * sizeof(char_t));\n        if (!memory) return 0;\n\n        T* result = new (memory) T();\n\n        memcpy(result->name, name, (length + 1) * sizeof(char_t));\n\n        return result;\n    }\n\n    PUGI__FN xpath_variable* new_xpath_variable(xpath_value_type type, const char_t* name)\n    {\n        switch (type)\n        {\n        case xpath_type_node_set:\n            return new_xpath_variable<xpath_variable_node_set>(name);\n\n        case xpath_type_number:\n            return new_xpath_variable<xpath_variable_number>(name);\n\n        case xpath_type_string:\n            return new_xpath_variable<xpath_variable_string>(name);\n\n        case xpath_type_boolean:\n            return new_xpath_variable<xpath_variable_boolean>(name);\n\n        default:\n            return 0;\n        }\n    }\n\n    template <typename T> PUGI__FN void delete_xpath_variable(T* var)\n    {\n        var->~T();\n        xml_memory::deallocate(var);\n    }\n\n    PUGI__FN void delete_xpath_variable(xpath_value_type type, xpath_variable* var)\n    {\n        switch (type)\n        {\n        case xpath_type_node_set:\n            delete_xpath_variable(static_cast<xpath_variable_node_set*>(var));\n            break;\n\n        case xpath_type_number:\n            delete_xpath_variable(static_cast<xpath_variable_number*>(var));\n            break;\n\n        case xpath_type_string:\n            delete_xpath_variable(static_cast<xpath_variable_string*>(var));\n            break;\n\n        case xpath_type_boolean:\n            delete_xpath_variable(static_cast<xpath_variable_boolean*>(var));\n            break;\n\n        default:\n            assert(!\"Invalid variable type\");\n        }\n    }\n\n    PUGI__FN xpath_variable* get_variable_scratch(char_t (&buffer)[32], xpath_variable_set* set, const char_t* begin, const char_t* end)\n    {\n        size_t length = static_cast<size_t>(end - begin);\n        char_t* scratch = buffer;\n\n        if (length >= sizeof(buffer) / sizeof(buffer[0]))\n        {\n            // need to make dummy on-heap copy\n            scratch = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n            if (!scratch) return 0;\n        }\n\n        // copy string to zero-terminated buffer and perform lookup\n        memcpy(scratch, begin, length * sizeof(char_t));\n        scratch[length] = 0;\n\n        xpath_variable* result = set->get(scratch);\n\n        // free dummy buffer\n        if (scratch != buffer) xml_memory::deallocate(scratch);\n\n        return result;\n    }\nPUGI__NS_END\n\n// Internal node set class\nPUGI__NS_BEGIN\n    PUGI__FN xpath_node_set::type_t xpath_get_order(const xpath_node* begin, const xpath_node* end)\n    {\n        if (end - begin < 2)\n            return xpath_node_set::type_sorted;\n\n        document_order_comparator cmp;\n\n        bool first = cmp(begin[0], begin[1]);\n\n        for (const xpath_node* it = begin + 1; it + 1 < end; ++it)\n            if (cmp(it[0], it[1]) != first)\n                return xpath_node_set::type_unsorted;\n\n        return first ? xpath_node_set::type_sorted : xpath_node_set::type_sorted_reverse;\n    }\n\n    PUGI__FN xpath_node_set::type_t xpath_sort(xpath_node* begin, xpath_node* end, xpath_node_set::type_t type, bool rev)\n    {\n        xpath_node_set::type_t order = rev ? xpath_node_set::type_sorted_reverse : xpath_node_set::type_sorted;\n\n        if (type == xpath_node_set::type_unsorted)\n        {\n            xpath_node_set::type_t sorted = xpath_get_order(begin, end);\n\n            if (sorted == xpath_node_set::type_unsorted)\n            {\n                sort(begin, end, document_order_comparator());\n\n                type = xpath_node_set::type_sorted;\n            }\n            else\n                type = sorted;\n        }\n        \n        if (type != order) reverse(begin, end);\n            \n        return order;\n    }\n\n    PUGI__FN xpath_node xpath_first(const xpath_node* begin, const xpath_node* end, xpath_node_set::type_t type)\n    {\n        if (begin == end) return xpath_node();\n\n        switch (type)\n        {\n        case xpath_node_set::type_sorted:\n            return *begin;\n\n        case xpath_node_set::type_sorted_reverse:\n            return *(end - 1);\n\n        case xpath_node_set::type_unsorted:\n            return *min_element(begin, end, document_order_comparator());\n\n        default:\n            assert(!\"Invalid node set type\");\n            return xpath_node();\n        }\n    }\n\n    class xpath_node_set_raw\n    {\n        xpath_node_set::type_t _type;\n\n        xpath_node* _begin;\n        xpath_node* _end;\n        xpath_node* _eos;\n\n    public:\n        xpath_node_set_raw(): _type(xpath_node_set::type_unsorted), _begin(0), _end(0), _eos(0)\n        {\n        }\n\n        xpath_node* begin() const\n        {\n            return _begin;\n        }\n\n        xpath_node* end() const\n        {\n            return _end;\n        }\n\n        bool empty() const\n        {\n            return _begin == _end;\n        }\n\n        size_t size() const\n        {\n            return static_cast<size_t>(_end - _begin);\n        }\n\n        xpath_node first() const\n        {\n            return xpath_first(_begin, _end, _type);\n        }\n\n        void push_back_grow(const xpath_node& node, xpath_allocator* alloc);\n\n        void push_back(const xpath_node& node, xpath_allocator* alloc)\n        {\n            if (_end != _eos)\n                *_end++ = node;\n            else\n                push_back_grow(node, alloc);\n        }\n\n        void append(const xpath_node* begin_, const xpath_node* end_, xpath_allocator* alloc)\n        {\n            if (begin_ == end_) return;\n\n            size_t size_ = static_cast<size_t>(_end - _begin);\n            size_t capacity = static_cast<size_t>(_eos - _begin);\n            size_t count = static_cast<size_t>(end_ - begin_);\n\n            if (size_ + count > capacity)\n            {\n                // reallocate the old array or allocate a new one\n                xpath_node* data = static_cast<xpath_node*>(alloc->reallocate(_begin, capacity * sizeof(xpath_node), (size_ + count) * sizeof(xpath_node)));\n                assert(data);\n\n                // finalize\n                _begin = data;\n                _end = data + size_;\n                _eos = data + size_ + count;\n            }\n\n            memcpy(_end, begin_, count * sizeof(xpath_node));\n            _end += count;\n        }\n\n        void sort_do()\n        {\n            _type = xpath_sort(_begin, _end, _type, false);\n        }\n\n        void truncate(xpath_node* pos)\n        {\n            assert(_begin <= pos && pos <= _end);\n\n            _end = pos;\n        }\n\n        void remove_duplicates()\n        {\n            if (_type == xpath_node_set::type_unsorted)\n                sort(_begin, _end, duplicate_comparator());\n        \n            _end = unique(_begin, _end);\n        }\n\n        xpath_node_set::type_t type() const\n        {\n            return _type;\n        }\n\n        void set_type(xpath_node_set::type_t value)\n        {\n            _type = value;\n        }\n    };\n\n    PUGI__FN_NO_INLINE void xpath_node_set_raw::push_back_grow(const xpath_node& node, xpath_allocator* alloc)\n    {\n        size_t capacity = static_cast<size_t>(_eos - _begin);\n\n        // get new capacity (1.5x rule)\n        size_t new_capacity = capacity + capacity / 2 + 1;\n\n        // reallocate the old array or allocate a new one\n        xpath_node* data = static_cast<xpath_node*>(alloc->reallocate(_begin, capacity * sizeof(xpath_node), new_capacity * sizeof(xpath_node)));\n        assert(data);\n\n        // finalize\n        _begin = data;\n        _end = data + capacity;\n        _eos = data + new_capacity;\n\n        // push\n        *_end++ = node;\n    }\nPUGI__NS_END\n\nPUGI__NS_BEGIN\n    struct xpath_context\n    {\n        xpath_node n;\n        size_t position, size;\n\n        xpath_context(const xpath_node& n_, size_t position_, size_t size_): n(n_), position(position_), size(size_)\n        {\n        }\n    };\n\n    enum lexeme_t\n    {\n        lex_none = 0,\n        lex_equal,\n        lex_not_equal,\n        lex_less,\n        lex_greater,\n        lex_less_or_equal,\n        lex_greater_or_equal,\n        lex_plus,\n        lex_minus,\n        lex_multiply,\n        lex_union,\n        lex_var_ref,\n        lex_open_brace,\n        lex_close_brace,\n        lex_quoted_string,\n        lex_number,\n        lex_slash,\n        lex_double_slash,\n        lex_open_square_brace,\n        lex_close_square_brace,\n        lex_string,\n        lex_comma,\n        lex_axis_attribute,\n        lex_dot,\n        lex_double_dot,\n        lex_double_colon,\n        lex_eof\n    };\n\n    struct xpath_lexer_string\n    {\n        const char_t* begin;\n        const char_t* end;\n\n        xpath_lexer_string(): begin(0), end(0)\n        {\n        }\n\n        bool operator==(const char_t* other) const\n        {\n            size_t length = static_cast<size_t>(end - begin);\n\n            return strequalrange(other, begin, length);\n        }\n    };\n\n    class xpath_lexer\n    {\n        const char_t* _cur;\n        const char_t* _cur_lexeme_pos;\n        xpath_lexer_string _cur_lexeme_contents;\n\n        lexeme_t _cur_lexeme;\n\n    public:\n        explicit xpath_lexer(const char_t* query): _cur(query)\n        {\n            next();\n        }\n        \n        const char_t* state() const\n        {\n            return _cur;\n        }\n        \n        void next()\n        {\n            const char_t* cur = _cur;\n\n            while (PUGI__IS_CHARTYPE(*cur, ct_space)) ++cur;\n\n            // save lexeme position for error reporting\n            _cur_lexeme_pos = cur;\n\n            switch (*cur)\n            {\n            case 0:\n                _cur_lexeme = lex_eof;\n                break;\n            \n            case '>':\n                if (*(cur+1) == '=')\n                {\n                    cur += 2;\n                    _cur_lexeme = lex_greater_or_equal;\n                }\n                else\n                {\n                    cur += 1;\n                    _cur_lexeme = lex_greater;\n                }\n                break;\n\n            case '<':\n                if (*(cur+1) == '=')\n                {\n                    cur += 2;\n                    _cur_lexeme = lex_less_or_equal;\n                }\n                else\n                {\n                    cur += 1;\n                    _cur_lexeme = lex_less;\n                }\n                break;\n\n            case '!':\n                if (*(cur+1) == '=')\n                {\n                    cur += 2;\n                    _cur_lexeme = lex_not_equal;\n                }\n                else\n                {\n                    _cur_lexeme = lex_none;\n                }\n                break;\n\n            case '=':\n                cur += 1;\n                _cur_lexeme = lex_equal;\n\n                break;\n            \n            case '+':\n                cur += 1;\n                _cur_lexeme = lex_plus;\n\n                break;\n\n            case '-':\n                cur += 1;\n                _cur_lexeme = lex_minus;\n\n                break;\n\n            case '*':\n                cur += 1;\n                _cur_lexeme = lex_multiply;\n\n                break;\n\n            case '|':\n                cur += 1;\n                _cur_lexeme = lex_union;\n\n                break;\n            \n            case '$':\n                cur += 1;\n\n                if (PUGI__IS_CHARTYPEX(*cur, ctx_start_symbol))\n                {\n                    _cur_lexeme_contents.begin = cur;\n\n                    while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;\n\n                    if (cur[0] == ':' && PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // qname\n                    {\n                        cur++; // :\n\n                        while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;\n                    }\n\n                    _cur_lexeme_contents.end = cur;\n                \n                    _cur_lexeme = lex_var_ref;\n                }\n                else\n                {\n                    _cur_lexeme = lex_none;\n                }\n\n                break;\n\n            case '(':\n                cur += 1;\n                _cur_lexeme = lex_open_brace;\n\n                break;\n\n            case ')':\n                cur += 1;\n                _cur_lexeme = lex_close_brace;\n\n                break;\n            \n            case '[':\n                cur += 1;\n                _cur_lexeme = lex_open_square_brace;\n\n                break;\n\n            case ']':\n                cur += 1;\n                _cur_lexeme = lex_close_square_brace;\n\n                break;\n\n            case ',':\n                cur += 1;\n                _cur_lexeme = lex_comma;\n\n                break;\n\n            case '/':\n                if (*(cur+1) == '/')\n                {\n                    cur += 2;\n                    _cur_lexeme = lex_double_slash;\n                }\n                else\n                {\n                    cur += 1;\n                    _cur_lexeme = lex_slash;\n                }\n                break;\n        \n            case '.':\n                if (*(cur+1) == '.')\n                {\n                    cur += 2;\n                    _cur_lexeme = lex_double_dot;\n                }\n                else if (PUGI__IS_CHARTYPEX(*(cur+1), ctx_digit))\n                {\n                    _cur_lexeme_contents.begin = cur; // .\n\n                    ++cur;\n\n                    while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++;\n\n                    _cur_lexeme_contents.end = cur;\n                    \n                    _cur_lexeme = lex_number;\n                }\n                else\n                {\n                    cur += 1;\n                    _cur_lexeme = lex_dot;\n                }\n                break;\n\n            case '@':\n                cur += 1;\n                _cur_lexeme = lex_axis_attribute;\n\n                break;\n\n            case '\"':\n            case '\\'':\n            {\n                char_t terminator = *cur;\n\n                ++cur;\n\n                _cur_lexeme_contents.begin = cur;\n                while (*cur && *cur != terminator) cur++;\n                _cur_lexeme_contents.end = cur;\n                \n                if (!*cur)\n                    _cur_lexeme = lex_none;\n                else\n                {\n                    cur += 1;\n                    _cur_lexeme = lex_quoted_string;\n                }\n\n                break;\n            }\n\n            case ':':\n                if (*(cur+1) == ':')\n                {\n                    cur += 2;\n                    _cur_lexeme = lex_double_colon;\n                }\n                else\n                {\n                    _cur_lexeme = lex_none;\n                }\n                break;\n\n            default:\n                if (PUGI__IS_CHARTYPEX(*cur, ctx_digit))\n                {\n                    _cur_lexeme_contents.begin = cur;\n\n                    while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++;\n                \n                    if (*cur == '.')\n                    {\n                        cur++;\n\n                        while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++;\n                    }\n\n                    _cur_lexeme_contents.end = cur;\n\n                    _cur_lexeme = lex_number;\n                }\n                else if (PUGI__IS_CHARTYPEX(*cur, ctx_start_symbol))\n                {\n                    _cur_lexeme_contents.begin = cur;\n\n                    while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;\n\n                    if (cur[0] == ':')\n                    {\n                        if (cur[1] == '*') // namespace test ncname:*\n                        {\n                            cur += 2; // :*\n                        }\n                        else if (PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // namespace test qname\n                        {\n                            cur++; // :\n\n                            while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;\n                        }\n                    }\n\n                    _cur_lexeme_contents.end = cur;\n                \n                    _cur_lexeme = lex_string;\n                }\n                else\n                {\n                    _cur_lexeme = lex_none;\n                }\n            }\n\n            _cur = cur;\n        }\n\n        lexeme_t current() const\n        {\n            return _cur_lexeme;\n        }\n\n        const char_t* current_pos() const\n        {\n            return _cur_lexeme_pos;\n        }\n\n        const xpath_lexer_string& contents() const\n        {\n            assert(_cur_lexeme == lex_var_ref || _cur_lexeme == lex_number || _cur_lexeme == lex_string || _cur_lexeme == lex_quoted_string);\n\n            return _cur_lexeme_contents;\n        }\n    };\n\n    enum ast_type_t\n    {\n        ast_unknown,\n        ast_op_or,                        // left or right\n        ast_op_and,                        // left and right\n        ast_op_equal,                    // left = right\n        ast_op_not_equal,                // left != right\n        ast_op_less,                    // left < right\n        ast_op_greater,                    // left > right\n        ast_op_less_or_equal,            // left <= right\n        ast_op_greater_or_equal,        // left >= right\n        ast_op_add,                        // left + right\n        ast_op_subtract,                // left - right\n        ast_op_multiply,                // left * right\n        ast_op_divide,                    // left / right\n        ast_op_mod,                        // left % right\n        ast_op_negate,                    // left - right\n        ast_op_union,                    // left | right\n        ast_predicate,                    // apply predicate to set; next points to next predicate\n        ast_filter,                        // select * from left where right\n        ast_string_constant,            // string constant\n        ast_number_constant,            // number constant\n        ast_variable,                    // variable\n        ast_func_last,                    // last()\n        ast_func_position,                // position()\n        ast_func_count,                    // count(left)\n        ast_func_id,                    // id(left)\n        ast_func_local_name_0,            // local-name()\n        ast_func_local_name_1,            // local-name(left)\n        ast_func_namespace_uri_0,        // namespace-uri()\n        ast_func_namespace_uri_1,        // namespace-uri(left)\n        ast_func_name_0,                // name()\n        ast_func_name_1,                // name(left)\n        ast_func_string_0,                // string()\n        ast_func_string_1,                // string(left)\n        ast_func_concat,                // concat(left, right, siblings)\n        ast_func_starts_with,            // starts_with(left, right)\n        ast_func_contains,                // contains(left, right)\n        ast_func_substring_before,        // substring-before(left, right)\n        ast_func_substring_after,        // substring-after(left, right)\n        ast_func_substring_2,            // substring(left, right)\n        ast_func_substring_3,            // substring(left, right, third)\n        ast_func_string_length_0,        // string-length()\n        ast_func_string_length_1,        // string-length(left)\n        ast_func_normalize_space_0,        // normalize-space()\n        ast_func_normalize_space_1,        // normalize-space(left)\n        ast_func_translate,                // translate(left, right, third)\n        ast_func_boolean,                // boolean(left)\n        ast_func_not,                    // not(left)\n        ast_func_true,                    // true()\n        ast_func_false,                    // false()\n        ast_func_lang,                    // lang(left)\n        ast_func_number_0,                // number()\n        ast_func_number_1,                // number(left)\n        ast_func_sum,                    // sum(left)\n        ast_func_floor,                    // floor(left)\n        ast_func_ceiling,                // ceiling(left)\n        ast_func_round,                    // round(left)\n        ast_step,                        // process set left with step\n        ast_step_root,                    // select root node\n\n        ast_opt_translate_table,        // translate(left, right, third) where right/third are constants\n        ast_opt_compare_attribute        // @name = 'string'\n    };\n\n    enum axis_t\n    {\n        axis_ancestor,\n        axis_ancestor_or_self,\n        axis_attribute,\n        axis_child,\n        axis_descendant,\n        axis_descendant_or_self,\n        axis_following,\n        axis_following_sibling,\n        axis_namespace,\n        axis_parent,\n        axis_preceding,\n        axis_preceding_sibling,\n        axis_self\n    };\n    \n    enum nodetest_t\n    {\n        nodetest_none,\n        nodetest_name,\n        nodetest_type_node,\n        nodetest_type_comment,\n        nodetest_type_pi,\n        nodetest_type_text,\n        nodetest_pi,\n        nodetest_all,\n        nodetest_all_in_namespace\n    };\n\n    enum predicate_t\n    {\n        predicate_default,\n        predicate_posinv,\n        predicate_constant,\n        predicate_constant_one\n    };\n\n    enum nodeset_eval_t\n    {\n        nodeset_eval_all,\n        nodeset_eval_any,\n        nodeset_eval_first\n    };\n\n    template <axis_t N> struct axis_to_type\n    {\n        static const axis_t axis;\n    };\n\n    template <axis_t N> const axis_t axis_to_type<N>::axis = N;\n        \n    class xpath_ast_node\n    {\n    private:\n        // node type\n        char _type;\n        char _rettype;\n\n        // for ast_step\n        char _axis;\n\n        // for ast_step/ast_predicate/ast_filter\n        char _test;\n\n        // tree node structure\n        xpath_ast_node* _left;\n        xpath_ast_node* _right;\n        xpath_ast_node* _next;\n\n        union\n        {\n            // value for ast_string_constant\n            const char_t* string;\n            // value for ast_number_constant\n            double number;\n            // variable for ast_variable\n            xpath_variable* variable;\n            // node test for ast_step (node name/namespace/node type/pi target)\n            const char_t* nodetest;\n            // table for ast_opt_translate_table\n            const unsigned char* table;\n        } _data;\n\n        xpath_ast_node(const xpath_ast_node&);\n        xpath_ast_node& operator=(const xpath_ast_node&);\n\n        template <class Comp> static bool compare_eq(xpath_ast_node* lhs, xpath_ast_node* rhs, const xpath_context& c, const xpath_stack& stack, const Comp& comp)\n        {\n            xpath_value_type lt = lhs->rettype(), rt = rhs->rettype();\n\n            if (lt != xpath_type_node_set && rt != xpath_type_node_set)\n            {\n                if (lt == xpath_type_boolean || rt == xpath_type_boolean)\n                    return comp(lhs->eval_boolean(c, stack), rhs->eval_boolean(c, stack));\n                else if (lt == xpath_type_number || rt == xpath_type_number)\n                    return comp(lhs->eval_number(c, stack), rhs->eval_number(c, stack));\n                else if (lt == xpath_type_string || rt == xpath_type_string)\n                {\n                    xpath_allocator_capture cr(stack.result);\n\n                    xpath_string ls = lhs->eval_string(c, stack);\n                    xpath_string rs = rhs->eval_string(c, stack);\n\n                    return comp(ls, rs);\n                }\n            }\n            else if (lt == xpath_type_node_set && rt == xpath_type_node_set)\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                xpath_node_set_raw ls = lhs->eval_node_set(c, stack, nodeset_eval_all);\n                xpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n                for (const xpath_node* li = ls.begin(); li != ls.end(); ++li)\n                    for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n                    {\n                        xpath_allocator_capture cri(stack.result);\n\n                        if (comp(string_value(*li, stack.result), string_value(*ri, stack.result)))\n                            return true;\n                    }\n\n                return false;\n            }\n            else\n            {\n                if (lt == xpath_type_node_set)\n                {\n                    swap(lhs, rhs);\n                    swap(lt, rt);\n                }\n\n                if (lt == xpath_type_boolean)\n                    return comp(lhs->eval_boolean(c, stack), rhs->eval_boolean(c, stack));\n                else if (lt == xpath_type_number)\n                {\n                    xpath_allocator_capture cr(stack.result);\n\n                    double l = lhs->eval_number(c, stack);\n                    xpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n                    for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n                    {\n                        xpath_allocator_capture cri(stack.result);\n\n                        if (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str())))\n                            return true;\n                    }\n\n                    return false;\n                }\n                else if (lt == xpath_type_string)\n                {\n                    xpath_allocator_capture cr(stack.result);\n\n                    xpath_string l = lhs->eval_string(c, stack);\n                    xpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n                    for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n                    {\n                        xpath_allocator_capture cri(stack.result);\n\n                        if (comp(l, string_value(*ri, stack.result)))\n                            return true;\n                    }\n\n                    return false;\n                }\n            }\n\n            assert(!\"Wrong types\");\n            return false;\n        }\n\n        static bool eval_once(xpath_node_set::type_t type, nodeset_eval_t eval)\n        {\n            return type == xpath_node_set::type_sorted ? eval != nodeset_eval_all : eval == nodeset_eval_any;\n        }\n\n        template <class Comp> static bool compare_rel(xpath_ast_node* lhs, xpath_ast_node* rhs, const xpath_context& c, const xpath_stack& stack, const Comp& comp)\n        {\n            xpath_value_type lt = lhs->rettype(), rt = rhs->rettype();\n\n            if (lt != xpath_type_node_set && rt != xpath_type_node_set)\n                return comp(lhs->eval_number(c, stack), rhs->eval_number(c, stack));\n            else if (lt == xpath_type_node_set && rt == xpath_type_node_set)\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                xpath_node_set_raw ls = lhs->eval_node_set(c, stack, nodeset_eval_all);\n                xpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n                for (const xpath_node* li = ls.begin(); li != ls.end(); ++li)\n                {\n                    xpath_allocator_capture cri(stack.result);\n\n                    double l = convert_string_to_number(string_value(*li, stack.result).c_str());\n\n                    for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n                    {\n                        xpath_allocator_capture crii(stack.result);\n\n                        if (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str())))\n                            return true;\n                    }\n                }\n\n                return false;\n            }\n            else if (lt != xpath_type_node_set && rt == xpath_type_node_set)\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                double l = lhs->eval_number(c, stack);\n                xpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n                for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n                {\n                    xpath_allocator_capture cri(stack.result);\n\n                    if (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str())))\n                        return true;\n                }\n\n                return false;\n            }\n            else if (lt == xpath_type_node_set && rt != xpath_type_node_set)\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                xpath_node_set_raw ls = lhs->eval_node_set(c, stack, nodeset_eval_all);\n                double r = rhs->eval_number(c, stack);\n\n                for (const xpath_node* li = ls.begin(); li != ls.end(); ++li)\n                {\n                    xpath_allocator_capture cri(stack.result);\n\n                    if (comp(convert_string_to_number(string_value(*li, stack.result).c_str()), r))\n                        return true;\n                }\n\n                return false;\n            }\n            else\n            {\n                assert(!\"Wrong types\");\n                return false;\n            }\n        }\n\n        static void apply_predicate_boolean(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack, bool once)\n        {\n            assert(ns.size() >= first);\n            assert(expr->rettype() != xpath_type_number);\n\n            size_t i = 1;\n            size_t size = ns.size() - first;\n\n            xpath_node* last = ns.begin() + first;\n\n            // remove_if... or well, sort of\n            for (xpath_node* it = last; it != ns.end(); ++it, ++i)\n            {\n                xpath_context c(*it, i, size);\n\n                if (expr->eval_boolean(c, stack))\n                {\n                    *last++ = *it;\n\n                    if (once) break;\n                }\n            }\n\n            ns.truncate(last);\n        }\n\n        static void apply_predicate_number(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack, bool once)\n        {\n            assert(ns.size() >= first);\n            assert(expr->rettype() == xpath_type_number);\n\n            size_t i = 1;\n            size_t size = ns.size() - first;\n\n            xpath_node* last = ns.begin() + first;\n\n            // remove_if... or well, sort of\n            for (xpath_node* it = last; it != ns.end(); ++it, ++i)\n            {\n                xpath_context c(*it, i, size);\n\n                if (expr->eval_number(c, stack) == i)\n                {\n                    *last++ = *it;\n\n                    if (once) break;\n                }\n            }\n\n            ns.truncate(last);\n        }\n\n        static void apply_predicate_number_const(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack)\n        {\n            assert(ns.size() >= first);\n            assert(expr->rettype() == xpath_type_number);\n\n            size_t size = ns.size() - first;\n\n            xpath_node* last = ns.begin() + first;\n\n            xpath_context c(xpath_node(), 1, size);\n\n            double er = expr->eval_number(c, stack);\n\n            if (er >= 1.0 && er <= size)\n            {\n                size_t eri = static_cast<size_t>(er);\n\n                if (er == eri)\n                {\n                    xpath_node r = last[eri - 1];\n\n                    *last++ = r;\n                }\n            }\n\n            ns.truncate(last);\n        }\n\n        void apply_predicate(xpath_node_set_raw& ns, size_t first, const xpath_stack& stack, bool once)\n        {\n            if (ns.size() == first) return;\n\n            assert(_type == ast_filter || _type == ast_predicate);\n\n            if (_test == predicate_constant || _test == predicate_constant_one)\n                apply_predicate_number_const(ns, first, _right, stack);\n            else if (_right->rettype() == xpath_type_number)\n                apply_predicate_number(ns, first, _right, stack, once);\n            else\n                apply_predicate_boolean(ns, first, _right, stack, once);\n        }\n\n        void apply_predicates(xpath_node_set_raw& ns, size_t first, const xpath_stack& stack, nodeset_eval_t eval)\n        {\n            if (ns.size() == first) return;\n\n            bool last_once = eval_once(ns.type(), eval);\n\n            for (xpath_ast_node* pred = _right; pred; pred = pred->_next)\n                pred->apply_predicate(ns, first, stack, !pred->_next && last_once);\n        }\n\n        bool step_push(xpath_node_set_raw& ns, xml_attribute_struct* a, xml_node_struct* parent, xpath_allocator* alloc)\n        {\n            assert(a);\n\n            const char_t* name = a->name ? a->name : PUGIXML_TEXT(\"\");\n\n            switch (_test)\n            {\n            case nodetest_name:\n                if (strequal(name, _data.nodetest) && is_xpath_attribute(name))\n                {\n                    ns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc);\n                    return true;\n                }\n                break;\n                \n            case nodetest_type_node:\n            case nodetest_all:\n                if (is_xpath_attribute(name))\n                {\n                    ns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc);\n                    return true;\n                }\n                break;\n                \n            case nodetest_all_in_namespace:\n                if (starts_with(name, _data.nodetest) && is_xpath_attribute(name))\n                {\n                    ns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc);\n                    return true;\n                }\n                break;\n            \n            default:\n                ;\n            }\n\n            return false;\n        }\n        \n        bool step_push(xpath_node_set_raw& ns, xml_node_struct* n, xpath_allocator* alloc)\n        {\n            assert(n);\n\n            xml_node_type type = PUGI__NODETYPE(n);\n\n            switch (_test)\n            {\n            case nodetest_name:\n                if (type == node_element && n->name && strequal(n->name, _data.nodetest))\n                {\n                    ns.push_back(xml_node(n), alloc);\n                    return true;\n                }\n                break;\n                \n            case nodetest_type_node:\n                ns.push_back(xml_node(n), alloc);\n                return true;\n                \n            case nodetest_type_comment:\n                if (type == node_comment)\n                {\n                    ns.push_back(xml_node(n), alloc);\n                    return true;\n                }\n                break;\n                \n            case nodetest_type_text:\n                if (type == node_pcdata || type == node_cdata)\n                {\n                    ns.push_back(xml_node(n), alloc);\n                    return true;\n                }\n                break;\n                \n            case nodetest_type_pi:\n                if (type == node_pi)\n                {\n                    ns.push_back(xml_node(n), alloc);\n                    return true;\n                }\n                break;\n                                    \n            case nodetest_pi:\n                if (type == node_pi && n->name && strequal(n->name, _data.nodetest))\n                {\n                    ns.push_back(xml_node(n), alloc);\n                    return true;\n                }\n                break;\n                \n            case nodetest_all:\n                if (type == node_element)\n                {\n                    ns.push_back(xml_node(n), alloc);\n                    return true;\n                }\n                break;\n                \n            case nodetest_all_in_namespace:\n                if (type == node_element && n->name && starts_with(n->name, _data.nodetest))\n                {\n                    ns.push_back(xml_node(n), alloc);\n                    return true;\n                }\n                break;\n\n            default:\n                assert(!\"Unknown axis\");\n            }\n\n            return false;\n        }\n\n        template <class T> void step_fill(xpath_node_set_raw& ns, xml_node_struct* n, xpath_allocator* alloc, bool once, T)\n        {\n            const axis_t axis = T::axis;\n\n            switch (axis)\n            {\n            case axis_attribute:\n            {\n                for (xml_attribute_struct* a = n->first_attribute; a; a = a->next_attribute)\n                    if (step_push(ns, a, n, alloc) & once)\n                        return;\n                \n                break;\n            }\n            \n            case axis_child:\n            {\n                for (xml_node_struct* c = n->first_child; c; c = c->next_sibling)\n                    if (step_push(ns, c, alloc) & once)\n                        return;\n                    \n                break;\n            }\n            \n            case axis_descendant:\n            case axis_descendant_or_self:\n            {\n                if (axis == axis_descendant_or_self)\n                    if (step_push(ns, n, alloc) & once)\n                        return;\n                    \n                xml_node_struct* cur = n->first_child;\n                \n                while (cur)\n                {\n                    if (step_push(ns, cur, alloc) & once)\n                        return;\n                    \n                    if (cur->first_child)\n                        cur = cur->first_child;\n                    else\n                    {\n                        while (!cur->next_sibling)\n                        {\n                            cur = cur->parent;\n\n                            if (cur == n) return;\n                        }\n                    \n                        cur = cur->next_sibling;\n                    }\n                }\n                \n                break;\n            }\n            \n            case axis_following_sibling:\n            {\n                for (xml_node_struct* c = n->next_sibling; c; c = c->next_sibling)\n                    if (step_push(ns, c, alloc) & once)\n                        return;\n                \n                break;\n            }\n            \n            case axis_preceding_sibling:\n            {\n                for (xml_node_struct* c = n->prev_sibling_c; c->next_sibling; c = c->prev_sibling_c)\n                    if (step_push(ns, c, alloc) & once)\n                        return;\n                \n                break;\n            }\n            \n            case axis_following:\n            {\n                xml_node_struct* cur = n;\n\n                // exit from this node so that we don't include descendants\n                while (!cur->next_sibling)\n                {\n                    cur = cur->parent;\n\n                    if (!cur) return;\n                }\n\n                cur = cur->next_sibling;\n\n                while (cur)\n                {\n                    if (step_push(ns, cur, alloc) & once)\n                        return;\n\n                    if (cur->first_child)\n                        cur = cur->first_child;\n                    else\n                    {\n                        while (!cur->next_sibling)\n                        {\n                            cur = cur->parent;\n\n                            if (!cur) return;\n                        }\n\n                        cur = cur->next_sibling;\n                    }\n                }\n\n                break;\n            }\n\n            case axis_preceding:\n            {\n                xml_node_struct* cur = n;\n\n                // exit from this node so that we don't include descendants\n                while (!cur->prev_sibling_c->next_sibling)\n                {\n                    cur = cur->parent;\n\n                    if (!cur) return;\n                }\n\n                cur = cur->prev_sibling_c;\n\n                while (cur)\n                {\n                    if (cur->first_child)\n                        cur = cur->first_child->prev_sibling_c;\n                    else\n                    {\n                        // leaf node, can't be ancestor\n                        if (step_push(ns, cur, alloc) & once)\n                            return;\n\n                        while (!cur->prev_sibling_c->next_sibling)\n                        {\n                            cur = cur->parent;\n\n                            if (!cur) return;\n\n                            if (!node_is_ancestor(cur, n))\n                                if (step_push(ns, cur, alloc) & once)\n                                    return;\n                        }\n\n                        cur = cur->prev_sibling_c;\n                    }\n                }\n\n                break;\n            }\n            \n            case axis_ancestor:\n            case axis_ancestor_or_self:\n            {\n                if (axis == axis_ancestor_or_self)\n                    if (step_push(ns, n, alloc) & once)\n                        return;\n\n                xml_node_struct* cur = n->parent;\n                \n                while (cur)\n                {\n                    if (step_push(ns, cur, alloc) & once)\n                        return;\n                    \n                    cur = cur->parent;\n                }\n                \n                break;\n            }\n\n            case axis_self:\n            {\n                step_push(ns, n, alloc);\n\n                break;\n            }\n\n            case axis_parent:\n            {\n                if (n->parent)\n                    step_push(ns, n->parent, alloc);\n\n                break;\n            }\n                \n            default:\n                assert(!\"Unimplemented axis\");\n            }\n        }\n        \n        template <class T> void step_fill(xpath_node_set_raw& ns, xml_attribute_struct* a, xml_node_struct* p, xpath_allocator* alloc, bool once, T v)\n        {\n            const axis_t axis = T::axis;\n\n            switch (axis)\n            {\n            case axis_ancestor:\n            case axis_ancestor_or_self:\n            {\n                if (axis == axis_ancestor_or_self && _test == nodetest_type_node) // reject attributes based on principal node type test\n                    if (step_push(ns, a, p, alloc) & once)\n                        return;\n\n                xml_node_struct* cur = p;\n                \n                while (cur)\n                {\n                    if (step_push(ns, cur, alloc) & once)\n                        return;\n                    \n                    cur = cur->parent;\n                }\n                \n                break;\n            }\n\n            case axis_descendant_or_self:\n            case axis_self:\n            {\n                if (_test == nodetest_type_node) // reject attributes based on principal node type test\n                    step_push(ns, a, p, alloc);\n\n                break;\n            }\n\n            case axis_following:\n            {\n                xml_node_struct* cur = p;\n                \n                while (cur)\n                {\n                    if (cur->first_child)\n                        cur = cur->first_child;\n                    else\n                    {\n                        while (!cur->next_sibling)\n                        {\n                            cur = cur->parent;\n\n                            if (!cur) return;\n                        }\n\n                        cur = cur->next_sibling;\n                    }\n\n                    if (step_push(ns, cur, alloc) & once)\n                        return;\n                }\n\n                break;\n            }\n\n            case axis_parent:\n            {\n                step_push(ns, p, alloc);\n\n                break;\n            }\n\n            case axis_preceding:\n            {\n                // preceding:: axis does not include attribute nodes and attribute ancestors (they are the same as parent's ancestors), so we can reuse node preceding\n                step_fill(ns, p, alloc, once, v);\n                break;\n            }\n            \n            default:\n                assert(!\"Unimplemented axis\");\n            }\n        }\n\n        template <class T> void step_fill(xpath_node_set_raw& ns, const xpath_node& xn, xpath_allocator* alloc, bool once, T v)\n        {\n            const axis_t axis = T::axis;\n            const bool axis_has_attributes = (axis == axis_ancestor || axis == axis_ancestor_or_self || axis == axis_descendant_or_self || axis == axis_following || axis == axis_parent || axis == axis_preceding || axis == axis_self);\n\n            if (xn.node())\n                step_fill(ns, xn.node().internal_object(), alloc, once, v);\n            else if (axis_has_attributes && xn.attribute() && xn.parent())\n                step_fill(ns, xn.attribute().internal_object(), xn.parent().internal_object(), alloc, once, v);\n        }\n\n        template <class T> xpath_node_set_raw step_do(const xpath_context& c, const xpath_stack& stack, nodeset_eval_t eval, T v)\n        {\n            const axis_t axis = T::axis;\n            const bool axis_reverse = (axis == axis_ancestor || axis == axis_ancestor_or_self || axis == axis_preceding || axis == axis_preceding_sibling);\n            const xpath_node_set::type_t axis_type = axis_reverse ? xpath_node_set::type_sorted_reverse : xpath_node_set::type_sorted;\n\n            bool once =\n                (axis == axis_attribute && _test == nodetest_name) ||\n                (!_right && eval_once(axis_type, eval)) ||\n                (_right && !_right->_next && _right->_test == predicate_constant_one);\n\n            xpath_node_set_raw ns;\n            ns.set_type(axis_type);\n\n            if (_left)\n            {\n                xpath_node_set_raw s = _left->eval_node_set(c, stack, nodeset_eval_all);\n\n                // self axis preserves the original order\n                if (axis == axis_self) ns.set_type(s.type());\n\n                for (const xpath_node* it = s.begin(); it != s.end(); ++it)\n                {\n                    size_t size = ns.size();\n\n                    // in general, all axes generate elements in a particular order, but there is no order guarantee if axis is applied to two nodes\n                    if (axis != axis_self && size != 0) ns.set_type(xpath_node_set::type_unsorted);\n                    \n                    step_fill(ns, *it, stack.result, once, v);\n                    if (_right) apply_predicates(ns, size, stack, eval);\n                }\n            }\n            else\n            {\n                step_fill(ns, c.n, stack.result, once, v);\n                if (_right) apply_predicates(ns, 0, stack, eval);\n            }\n\n            // child, attribute and self axes always generate unique set of nodes\n            // for other axis, if the set stayed sorted, it stayed unique because the traversal algorithms do not visit the same node twice\n            if (axis != axis_child && axis != axis_attribute && axis != axis_self && ns.type() == xpath_node_set::type_unsorted)\n                ns.remove_duplicates();\n\n            return ns;\n        }\n        \n    public:\n        xpath_ast_node(ast_type_t type, xpath_value_type rettype_, const char_t* value):\n            _type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0)\n        {\n            assert(type == ast_string_constant);\n            _data.string = value;\n        }\n\n        xpath_ast_node(ast_type_t type, xpath_value_type rettype_, double value):\n            _type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0)\n        {\n            assert(type == ast_number_constant);\n            _data.number = value;\n        }\n        \n        xpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_variable* value):\n            _type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0)\n        {\n            assert(type == ast_variable);\n            _data.variable = value;\n        }\n        \n        xpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_ast_node* left = 0, xpath_ast_node* right = 0):\n            _type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(left), _right(right), _next(0)\n        {\n        }\n\n        xpath_ast_node(ast_type_t type, xpath_ast_node* left, axis_t axis, nodetest_t test, const char_t* contents):\n            _type(static_cast<char>(type)), _rettype(xpath_type_node_set), _axis(static_cast<char>(axis)), _test(static_cast<char>(test)), _left(left), _right(0), _next(0)\n        {\n            assert(type == ast_step);\n            _data.nodetest = contents;\n        }\n\n        xpath_ast_node(ast_type_t type, xpath_ast_node* left, xpath_ast_node* right, predicate_t test):\n            _type(static_cast<char>(type)), _rettype(xpath_type_node_set), _axis(0), _test(static_cast<char>(test)), _left(left), _right(right), _next(0)\n        {\n            assert(type == ast_filter || type == ast_predicate);\n        }\n\n        void set_next(xpath_ast_node* value)\n        {\n            _next = value;\n        }\n\n        void set_right(xpath_ast_node* value)\n        {\n            _right = value;\n        }\n\n        bool eval_boolean(const xpath_context& c, const xpath_stack& stack)\n        {\n            switch (_type)\n            {\n            case ast_op_or:\n                return _left->eval_boolean(c, stack) || _right->eval_boolean(c, stack);\n                \n            case ast_op_and:\n                return _left->eval_boolean(c, stack) && _right->eval_boolean(c, stack);\n                \n            case ast_op_equal:\n                return compare_eq(_left, _right, c, stack, equal_to());\n\n            case ast_op_not_equal:\n                return compare_eq(_left, _right, c, stack, not_equal_to());\n    \n            case ast_op_less:\n                return compare_rel(_left, _right, c, stack, less());\n            \n            case ast_op_greater:\n                return compare_rel(_right, _left, c, stack, less());\n\n            case ast_op_less_or_equal:\n                return compare_rel(_left, _right, c, stack, less_equal());\n            \n            case ast_op_greater_or_equal:\n                return compare_rel(_right, _left, c, stack, less_equal());\n\n            case ast_func_starts_with:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                xpath_string lr = _left->eval_string(c, stack);\n                xpath_string rr = _right->eval_string(c, stack);\n\n                return starts_with(lr.c_str(), rr.c_str());\n            }\n\n            case ast_func_contains:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                xpath_string lr = _left->eval_string(c, stack);\n                xpath_string rr = _right->eval_string(c, stack);\n\n                return find_substring(lr.c_str(), rr.c_str()) != 0;\n            }\n\n            case ast_func_boolean:\n                return _left->eval_boolean(c, stack);\n                \n            case ast_func_not:\n                return !_left->eval_boolean(c, stack);\n                \n            case ast_func_true:\n                return true;\n                \n            case ast_func_false:\n                return false;\n\n            case ast_func_lang:\n            {\n                if (c.n.attribute()) return false;\n                \n                xpath_allocator_capture cr(stack.result);\n\n                xpath_string lang = _left->eval_string(c, stack);\n                \n                for (xml_node n = c.n.node(); n; n = n.parent())\n                {\n                    xml_attribute a = n.attribute(PUGIXML_TEXT(\"xml:lang\"));\n                    \n                    if (a)\n                    {\n                        const char_t* value = a.value();\n                        \n                        // strnicmp / strncasecmp is not portable\n                        for (const char_t* lit = lang.c_str(); *lit; ++lit)\n                        {\n                            if (tolower_ascii(*lit) != tolower_ascii(*value)) return false;\n                            ++value;\n                        }\n                        \n                        return *value == 0 || *value == '-';\n                    }\n                }\n                \n                return false;\n            }\n\n            case ast_opt_compare_attribute:\n            {\n                const char_t* value = (_right->_type == ast_string_constant) ? _right->_data.string : _right->_data.variable->get_string();\n\n                xml_attribute attr = c.n.node().attribute(_left->_data.nodetest);\n\n                return attr && strequal(attr.value(), value) && is_xpath_attribute(attr.name());\n            }\n\n            case ast_variable:\n            {\n                assert(_rettype == _data.variable->type());\n\n                if (_rettype == xpath_type_boolean)\n                    return _data.variable->get_boolean();\n\n                // fallthrough to type conversion\n            }\n\n            default:\n            {\n                switch (_rettype)\n                {\n                case xpath_type_number:\n                    return convert_number_to_boolean(eval_number(c, stack));\n                    \n                case xpath_type_string:\n                {\n                    xpath_allocator_capture cr(stack.result);\n\n                    return !eval_string(c, stack).empty();\n                }\n                    \n                case xpath_type_node_set:                \n                {\n                    xpath_allocator_capture cr(stack.result);\n\n                    return !eval_node_set(c, stack, nodeset_eval_any).empty();\n                }\n\n                default:\n                    assert(!\"Wrong expression for return type boolean\");\n                    return false;\n                }\n            }\n            }\n        }\n\n        double eval_number(const xpath_context& c, const xpath_stack& stack)\n        {\n            switch (_type)\n            {\n            case ast_op_add:\n                return _left->eval_number(c, stack) + _right->eval_number(c, stack);\n                \n            case ast_op_subtract:\n                return _left->eval_number(c, stack) - _right->eval_number(c, stack);\n\n            case ast_op_multiply:\n                return _left->eval_number(c, stack) * _right->eval_number(c, stack);\n\n            case ast_op_divide:\n                return _left->eval_number(c, stack) / _right->eval_number(c, stack);\n\n            case ast_op_mod:\n                return fmod(_left->eval_number(c, stack), _right->eval_number(c, stack));\n\n            case ast_op_negate:\n                return -_left->eval_number(c, stack);\n\n            case ast_number_constant:\n                return _data.number;\n\n            case ast_func_last:\n                return static_cast<double>(c.size);\n            \n            case ast_func_position:\n                return static_cast<double>(c.position);\n\n            case ast_func_count:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                return static_cast<double>(_left->eval_node_set(c, stack, nodeset_eval_all).size());\n            }\n            \n            case ast_func_string_length_0:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                return static_cast<double>(string_value(c.n, stack.result).length());\n            }\n            \n            case ast_func_string_length_1:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                return static_cast<double>(_left->eval_string(c, stack).length());\n            }\n            \n            case ast_func_number_0:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                return convert_string_to_number(string_value(c.n, stack.result).c_str());\n            }\n            \n            case ast_func_number_1:\n                return _left->eval_number(c, stack);\n\n            case ast_func_sum:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                double r = 0;\n                \n                xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_all);\n                \n                for (const xpath_node* it = ns.begin(); it != ns.end(); ++it)\n                {\n                    xpath_allocator_capture cri(stack.result);\n\n                    r += convert_string_to_number(string_value(*it, stack.result).c_str());\n                }\n            \n                return r;\n            }\n\n            case ast_func_floor:\n            {\n                double r = _left->eval_number(c, stack);\n                \n                return r == r ? floor(r) : r;\n            }\n\n            case ast_func_ceiling:\n            {\n                double r = _left->eval_number(c, stack);\n                \n                return r == r ? ceil(r) : r;\n            }\n\n            case ast_func_round:\n                return round_nearest_nzero(_left->eval_number(c, stack));\n            \n            case ast_variable:\n            {\n                assert(_rettype == _data.variable->type());\n\n                if (_rettype == xpath_type_number)\n                    return _data.variable->get_number();\n\n                // fallthrough to type conversion\n            }\n\n            default:\n            {\n                switch (_rettype)\n                {\n                case xpath_type_boolean:\n                    return eval_boolean(c, stack) ? 1 : 0;\n                    \n                case xpath_type_string:\n                {\n                    xpath_allocator_capture cr(stack.result);\n\n                    return convert_string_to_number(eval_string(c, stack).c_str());\n                }\n                    \n                case xpath_type_node_set:\n                {\n                    xpath_allocator_capture cr(stack.result);\n\n                    return convert_string_to_number(eval_string(c, stack).c_str());\n                }\n                    \n                default:\n                    assert(!\"Wrong expression for return type number\");\n                    return 0;\n                }\n                \n            }\n            }\n        }\n        \n        xpath_string eval_string_concat(const xpath_context& c, const xpath_stack& stack)\n        {\n            assert(_type == ast_func_concat);\n\n            xpath_allocator_capture ct(stack.temp);\n\n            // count the string number\n            size_t count = 1;\n            for (xpath_ast_node* nc = _right; nc; nc = nc->_next) count++;\n\n            // gather all strings\n            xpath_string static_buffer[4];\n            xpath_string* buffer = static_buffer;\n\n            // allocate on-heap for large concats\n            if (count > sizeof(static_buffer) / sizeof(static_buffer[0]))\n            {\n                buffer = static_cast<xpath_string*>(stack.temp->allocate(count * sizeof(xpath_string)));\n                assert(buffer);\n            }\n\n            // evaluate all strings to temporary stack\n            xpath_stack swapped_stack = {stack.temp, stack.result};\n\n            buffer[0] = _left->eval_string(c, swapped_stack);\n\n            size_t pos = 1;\n            for (xpath_ast_node* n = _right; n; n = n->_next, ++pos) buffer[pos] = n->eval_string(c, swapped_stack);\n            assert(pos == count);\n\n            // get total length\n            size_t length = 0;\n            for (size_t i = 0; i < count; ++i) length += buffer[i].length();\n\n            // create final string\n            char_t* result = static_cast<char_t*>(stack.result->allocate((length + 1) * sizeof(char_t)));\n            assert(result);\n\n            char_t* ri = result;\n\n            for (size_t j = 0; j < count; ++j)\n                for (const char_t* bi = buffer[j].c_str(); *bi; ++bi)\n                    *ri++ = *bi;\n\n            *ri = 0;\n\n            return xpath_string::from_heap_preallocated(result, ri);\n        }\n\n        xpath_string eval_string(const xpath_context& c, const xpath_stack& stack)\n        {\n            switch (_type)\n            {\n            case ast_string_constant:\n                return xpath_string::from_const(_data.string);\n            \n            case ast_func_local_name_0:\n            {\n                xpath_node na = c.n;\n                \n                return xpath_string::from_const(local_name(na));\n            }\n\n            case ast_func_local_name_1:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);\n                xpath_node na = ns.first();\n                \n                return xpath_string::from_const(local_name(na));\n            }\n\n            case ast_func_name_0:\n            {\n                xpath_node na = c.n;\n                \n                return xpath_string::from_const(qualified_name(na));\n            }\n\n            case ast_func_name_1:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);\n                xpath_node na = ns.first();\n                \n                return xpath_string::from_const(qualified_name(na));\n            }\n\n            case ast_func_namespace_uri_0:\n            {\n                xpath_node na = c.n;\n                \n                return xpath_string::from_const(namespace_uri(na));\n            }\n\n            case ast_func_namespace_uri_1:\n            {\n                xpath_allocator_capture cr(stack.result);\n\n                xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);\n                xpath_node na = ns.first();\n                \n                return xpath_string::from_const(namespace_uri(na));\n            }\n\n            case ast_func_string_0:\n                return string_value(c.n, stack.result);\n\n            case ast_func_string_1:\n                return _left->eval_string(c, stack);\n\n            case ast_func_concat:\n                return eval_string_concat(c, stack);\n\n            case ast_func_substring_before:\n            {\n                xpath_allocator_capture cr(stack.temp);\n\n                xpath_stack swapped_stack = {stack.temp, stack.result};\n\n                xpath_string s = _left->eval_string(c, swapped_stack);\n                xpath_string p = _right->eval_string(c, swapped_stack);\n\n                const char_t* pos = find_substring(s.c_str(), p.c_str());\n                \n                return pos ? xpath_string::from_heap(s.c_str(), pos, stack.result) : xpath_string();\n            }\n            \n            case ast_func_substring_after:\n            {\n                xpath_allocator_capture cr(stack.temp);\n\n                xpath_stack swapped_stack = {stack.temp, stack.result};\n\n                xpath_string s = _left->eval_string(c, swapped_stack);\n                xpath_string p = _right->eval_string(c, swapped_stack);\n                \n                const char_t* pos = find_substring(s.c_str(), p.c_str());\n                if (!pos) return xpath_string();\n\n                const char_t* rbegin = pos + p.length();\n                const char_t* rend = s.c_str() + s.length();\n\n                return s.uses_heap() ? xpath_string::from_heap(rbegin, rend, stack.result) : xpath_string::from_const(rbegin);\n            }\n\n            case ast_func_substring_2:\n            {\n                xpath_allocator_capture cr(stack.temp);\n\n                xpath_stack swapped_stack = {stack.temp, stack.result};\n\n                xpath_string s = _left->eval_string(c, swapped_stack);\n                size_t s_length = s.length();\n\n                double first = round_nearest(_right->eval_number(c, stack));\n                \n                if (is_nan(first)) return xpath_string(); // NaN\n                else if (first >= s_length + 1) return xpath_string();\n                \n                size_t pos = first < 1 ? 1 : static_cast<size_t>(first);\n                assert(1 <= pos && pos <= s_length + 1);\n\n                const char_t* rbegin = s.c_str() + (pos - 1);\n                const char_t* rend = s.c_str() + s.length();\n                \n                return s.uses_heap() ? xpath_string::from_heap(rbegin, rend, stack.result) : xpath_string::from_const(rbegin);\n            }\n            \n            case ast_func_substring_3:\n            {\n                xpath_allocator_capture cr(stack.temp);\n\n                xpath_stack swapped_stack = {stack.temp, stack.result};\n\n                xpath_string s = _left->eval_string(c, swapped_stack);\n                size_t s_length = s.length();\n\n                double first = round_nearest(_right->eval_number(c, stack));\n                double last = first + round_nearest(_right->_next->eval_number(c, stack));\n                \n                if (is_nan(first) || is_nan(last)) return xpath_string();\n                else if (first >= s_length + 1) return xpath_string();\n                else if (first >= last) return xpath_string();\n                else if (last < 1) return xpath_string();\n                \n                size_t pos = first < 1 ? 1 : static_cast<size_t>(first);\n                size_t end = last >= s_length + 1 ? s_length + 1 : static_cast<size_t>(last);\n\n                assert(1 <= pos && pos <= end && end <= s_length + 1);\n                const char_t* rbegin = s.c_str() + (pos - 1);\n                const char_t* rend = s.c_str() + (end - 1);\n\n                return (end == s_length + 1 && !s.uses_heap()) ? xpath_string::from_const(rbegin) : xpath_string::from_heap(rbegin, rend, stack.result);\n            }\n\n            case ast_func_normalize_space_0:\n            {\n                xpath_string s = string_value(c.n, stack.result);\n\n                char_t* begin = s.data(stack.result);\n                char_t* end = normalize_space(begin);\n\n                return xpath_string::from_heap_preallocated(begin, end);\n            }\n\n            case ast_func_normalize_space_1:\n            {\n                xpath_string s = _left->eval_string(c, stack);\n\n                char_t* begin = s.data(stack.result);\n                char_t* end = normalize_space(begin);\n            \n                return xpath_string::from_heap_preallocated(begin, end);\n            }\n\n            case ast_func_translate:\n            {\n                xpath_allocator_capture cr(stack.temp);\n\n                xpath_stack swapped_stack = {stack.temp, stack.result};\n\n                xpath_string s = _left->eval_string(c, stack);\n                xpath_string from = _right->eval_string(c, swapped_stack);\n                xpath_string to = _right->_next->eval_string(c, swapped_stack);\n\n                char_t* begin = s.data(stack.result);\n                char_t* end = translate(begin, from.c_str(), to.c_str(), to.length());\n\n                return xpath_string::from_heap_preallocated(begin, end);\n            }\n\n            case ast_opt_translate_table:\n            {\n                xpath_string s = _left->eval_string(c, stack);\n\n                char_t* begin = s.data(stack.result);\n                char_t* end = translate_table(begin, _data.table);\n\n                return xpath_string::from_heap_preallocated(begin, end);\n            }\n\n            case ast_variable:\n            {\n                assert(_rettype == _data.variable->type());\n\n                if (_rettype == xpath_type_string)\n                    return xpath_string::from_const(_data.variable->get_string());\n\n                // fallthrough to type conversion\n            }\n\n            default:\n            {\n                switch (_rettype)\n                {\n                case xpath_type_boolean:\n                    return xpath_string::from_const(eval_boolean(c, stack) ? PUGIXML_TEXT(\"true\") : PUGIXML_TEXT(\"false\"));\n                    \n                case xpath_type_number:\n                    return convert_number_to_string(eval_number(c, stack), stack.result);\n                    \n                case xpath_type_node_set:\n                {\n                    xpath_allocator_capture cr(stack.temp);\n\n                    xpath_stack swapped_stack = {stack.temp, stack.result};\n\n                    xpath_node_set_raw ns = eval_node_set(c, swapped_stack, nodeset_eval_first);\n                    return ns.empty() ? xpath_string() : string_value(ns.first(), stack.result);\n                }\n                \n                default:\n                    assert(!\"Wrong expression for return type string\");\n                    return xpath_string();\n                }\n            }\n            }\n        }\n\n        xpath_node_set_raw eval_node_set(const xpath_context& c, const xpath_stack& stack, nodeset_eval_t eval)\n        {\n            switch (_type)\n            {\n            case ast_op_union:\n            {\n                xpath_allocator_capture cr(stack.temp);\n\n                xpath_stack swapped_stack = {stack.temp, stack.result};\n\n                xpath_node_set_raw ls = _left->eval_node_set(c, swapped_stack, eval);\n                xpath_node_set_raw rs = _right->eval_node_set(c, stack, eval);\n\n                // we can optimize merging two sorted sets, but this is a very rare operation, so don't bother\n                rs.set_type(xpath_node_set::type_unsorted);\n\n                rs.append(ls.begin(), ls.end(), stack.result);\n                rs.remove_duplicates();\n\n                return rs;\n            }\n\n            case ast_filter:\n            {\n                xpath_node_set_raw set = _left->eval_node_set(c, stack, _test == predicate_constant_one ? nodeset_eval_first : nodeset_eval_all);\n\n                // either expression is a number or it contains position() call; sort by document order\n                if (_test != predicate_posinv) set.sort_do();\n\n                bool once = eval_once(set.type(), eval);\n\n                apply_predicate(set, 0, stack, once);\n            \n                return set;\n            }\n            \n            case ast_func_id:\n                return xpath_node_set_raw();\n            \n            case ast_step:\n            {\n                switch (_axis)\n                {\n                case axis_ancestor:\n                    return step_do(c, stack, eval, axis_to_type<axis_ancestor>());\n                    \n                case axis_ancestor_or_self:\n                    return step_do(c, stack, eval, axis_to_type<axis_ancestor_or_self>());\n\n                case axis_attribute:\n                    return step_do(c, stack, eval, axis_to_type<axis_attribute>());\n\n                case axis_child:\n                    return step_do(c, stack, eval, axis_to_type<axis_child>());\n                \n                case axis_descendant:\n                    return step_do(c, stack, eval, axis_to_type<axis_descendant>());\n\n                case axis_descendant_or_self:\n                    return step_do(c, stack, eval, axis_to_type<axis_descendant_or_self>());\n\n                case axis_following:\n                    return step_do(c, stack, eval, axis_to_type<axis_following>());\n                \n                case axis_following_sibling:\n                    return step_do(c, stack, eval, axis_to_type<axis_following_sibling>());\n                \n                case axis_namespace:\n                    // namespaced axis is not supported\n                    return xpath_node_set_raw();\n                \n                case axis_parent:\n                    return step_do(c, stack, eval, axis_to_type<axis_parent>());\n                \n                case axis_preceding:\n                    return step_do(c, stack, eval, axis_to_type<axis_preceding>());\n\n                case axis_preceding_sibling:\n                    return step_do(c, stack, eval, axis_to_type<axis_preceding_sibling>());\n                \n                case axis_self:\n                    return step_do(c, stack, eval, axis_to_type<axis_self>());\n\n                default:\n                    assert(!\"Unknown axis\");\n                    return xpath_node_set_raw();\n                }\n            }\n\n            case ast_step_root:\n            {\n                assert(!_right); // root step can't have any predicates\n\n                xpath_node_set_raw ns;\n\n                ns.set_type(xpath_node_set::type_sorted);\n\n                if (c.n.node()) ns.push_back(c.n.node().root(), stack.result);\n                else if (c.n.attribute()) ns.push_back(c.n.parent().root(), stack.result);\n\n                return ns;\n            }\n\n            case ast_variable:\n            {\n                assert(_rettype == _data.variable->type());\n\n                if (_rettype == xpath_type_node_set)\n                {\n                    const xpath_node_set& s = _data.variable->get_node_set();\n\n                    xpath_node_set_raw ns;\n\n                    ns.set_type(s.type());\n                    ns.append(s.begin(), s.end(), stack.result);\n\n                    return ns;\n                }\n\n                // fallthrough to type conversion\n            }\n\n            default:\n                assert(!\"Wrong expression for return type node set\");\n                return xpath_node_set_raw();\n            }\n        }\n\n        void optimize(xpath_allocator* alloc)\n        {\n            if (_left) _left->optimize(alloc);\n            if (_right) _right->optimize(alloc);\n            if (_next) _next->optimize(alloc);\n\n            // Rewrite [position()=expr] with [expr]\n            // Note that this step has to go before classification to recognize [position()=1]\n            if ((_type == ast_filter || _type == ast_predicate) &&\n                _right->_type == ast_op_equal && _right->_left->_type == ast_func_position && _right->_right->_rettype == xpath_type_number)\n            {\n                _right = _right->_right;\n            }\n\n            // Classify filter/predicate ops to perform various optimizations during evaluation\n            if (_type == ast_filter || _type == ast_predicate)\n            {\n                assert(_test == predicate_default);\n\n                if (_right->_type == ast_number_constant && _right->_data.number == 1.0)\n                    _test = predicate_constant_one;\n                else if (_right->_rettype == xpath_type_number && (_right->_type == ast_number_constant || _right->_type == ast_variable || _right->_type == ast_func_last))\n                    _test = predicate_constant;\n                else if (_right->_rettype != xpath_type_number && _right->is_posinv_expr())\n                    _test = predicate_posinv;\n            }\n\n            // Rewrite descendant-or-self::node()/child::foo with descendant::foo\n            // The former is a full form of //foo, the latter is much faster since it executes the node test immediately\n            // Do a similar kind of rewrite for self/descendant/descendant-or-self axes\n            // Note that we only rewrite positionally invariant steps (//foo[1] != /descendant::foo[1])\n            if (_type == ast_step && (_axis == axis_child || _axis == axis_self || _axis == axis_descendant || _axis == axis_descendant_or_self) && _left &&\n                _left->_type == ast_step && _left->_axis == axis_descendant_or_self && _left->_test == nodetest_type_node && !_left->_right &&\n                is_posinv_step())\n            {\n                if (_axis == axis_child || _axis == axis_descendant)\n                    _axis = axis_descendant;\n                else\n                    _axis = axis_descendant_or_self;\n\n                _left = _left->_left;\n            }\n\n            // Use optimized lookup table implementation for translate() with constant arguments\n            if (_type == ast_func_translate && _right->_type == ast_string_constant && _right->_next->_type == ast_string_constant)\n            {\n                unsigned char* table = translate_table_generate(alloc, _right->_data.string, _right->_next->_data.string);\n\n                if (table)\n                {\n                    _type = ast_opt_translate_table;\n                    _data.table = table;\n                }\n            }\n\n            // Use optimized path for @attr = 'value' or @attr = $value\n            if (_type == ast_op_equal &&\n                _left->_type == ast_step && _left->_axis == axis_attribute && _left->_test == nodetest_name && !_left->_left && !_left->_right &&\n                (_right->_type == ast_string_constant || (_right->_type == ast_variable && _right->_rettype == xpath_type_string)))\n            {\n                _type = ast_opt_compare_attribute;\n            }\n        }\n        \n        bool is_posinv_expr() const\n        {\n            switch (_type)\n            {\n            case ast_func_position:\n            case ast_func_last:\n                return false;\n\n            case ast_string_constant:\n            case ast_number_constant:\n            case ast_variable:\n                return true;\n\n            case ast_step:\n            case ast_step_root:\n                return true;\n\n            case ast_predicate:\n            case ast_filter:\n                return true;\n\n            default:\n                if (_left && !_left->is_posinv_expr()) return false;\n                \n                for (xpath_ast_node* n = _right; n; n = n->_next)\n                    if (!n->is_posinv_expr()) return false;\n                    \n                return true;\n            }\n        }\n\n        bool is_posinv_step() const\n        {\n            assert(_type == ast_step);\n\n            for (xpath_ast_node* n = _right; n; n = n->_next)\n            {\n                assert(n->_type == ast_predicate);\n\n                if (n->_test != predicate_posinv)\n                    return false;\n            }\n\n            return true;\n        }\n\n        xpath_value_type rettype() const\n        {\n            return static_cast<xpath_value_type>(_rettype);\n        }\n    };\n\n    struct xpath_parser\n    {\n        xpath_allocator* _alloc;\n        xpath_lexer _lexer;\n\n        const char_t* _query;\n        xpath_variable_set* _variables;\n\n        xpath_parse_result* _result;\n\n        char_t _scratch[32];\n\n    #ifdef PUGIXML_NO_EXCEPTIONS\n        jmp_buf _error_handler;\n    #endif\n\n        void throw_error(const char* message)\n        {\n            _result->error = message;\n            _result->offset = _lexer.current_pos() - _query;\n\n        #ifdef PUGIXML_NO_EXCEPTIONS\n            longjmp(_error_handler, 1);\n        #else\n            throw xpath_exception(*_result);\n        #endif\n        }\n\n        void throw_error_oom()\n        {\n        #ifdef PUGIXML_NO_EXCEPTIONS\n            throw_error(\"Out of memory\");\n        #else\n            throw std::bad_alloc();\n        #endif\n        }\n\n        void* alloc_node()\n        {\n            void* result = _alloc->allocate_nothrow(sizeof(xpath_ast_node));\n\n            if (!result) throw_error_oom();\n\n            return result;\n        }\n\n        const char_t* alloc_string(const xpath_lexer_string& value)\n        {\n            if (value.begin)\n            {\n                size_t length = static_cast<size_t>(value.end - value.begin);\n\n                char_t* c = static_cast<char_t*>(_alloc->allocate_nothrow((length + 1) * sizeof(char_t)));\n                if (!c) throw_error_oom();\n                assert(c); // workaround for clang static analysis\n\n                memcpy(c, value.begin, length * sizeof(char_t));\n                c[length] = 0;\n\n                return c;\n            }\n            else return 0;\n        }\n\n        xpath_ast_node* parse_function_helper(ast_type_t type0, ast_type_t type1, size_t argc, xpath_ast_node* args[2])\n        {\n            assert(argc <= 1);\n\n            if (argc == 1 && args[0]->rettype() != xpath_type_node_set) throw_error(\"Function has to be applied to node set\");\n\n            return new (alloc_node()) xpath_ast_node(argc == 0 ? type0 : type1, xpath_type_string, args[0]);\n        }\n\n        xpath_ast_node* parse_function(const xpath_lexer_string& name, size_t argc, xpath_ast_node* args[2])\n        {\n            switch (name.begin[0])\n            {\n            case 'b':\n                if (name == PUGIXML_TEXT(\"boolean\") && argc == 1)\n                    return new (alloc_node()) xpath_ast_node(ast_func_boolean, xpath_type_boolean, args[0]);\n                    \n                break;\n            \n            case 'c':\n                if (name == PUGIXML_TEXT(\"count\") && argc == 1)\n                {\n                    if (args[0]->rettype() != xpath_type_node_set) throw_error(\"Function has to be applied to node set\");\n                    return new (alloc_node()) xpath_ast_node(ast_func_count, xpath_type_number, args[0]);\n                }\n                else if (name == PUGIXML_TEXT(\"contains\") && argc == 2)\n                    return new (alloc_node()) xpath_ast_node(ast_func_contains, xpath_type_boolean, args[0], args[1]);\n                else if (name == PUGIXML_TEXT(\"concat\") && argc >= 2)\n                    return new (alloc_node()) xpath_ast_node(ast_func_concat, xpath_type_string, args[0], args[1]);\n                else if (name == PUGIXML_TEXT(\"ceiling\") && argc == 1)\n                    return new (alloc_node()) xpath_ast_node(ast_func_ceiling, xpath_type_number, args[0]);\n                    \n                break;\n            \n            case 'f':\n                if (name == PUGIXML_TEXT(\"false\") && argc == 0)\n                    return new (alloc_node()) xpath_ast_node(ast_func_false, xpath_type_boolean);\n                else if (name == PUGIXML_TEXT(\"floor\") && argc == 1)\n                    return new (alloc_node()) xpath_ast_node(ast_func_floor, xpath_type_number, args[0]);\n                    \n                break;\n            \n            case 'i':\n                if (name == PUGIXML_TEXT(\"id\") && argc == 1)\n                    return new (alloc_node()) xpath_ast_node(ast_func_id, xpath_type_node_set, args[0]);\n                    \n                break;\n            \n            case 'l':\n                if (name == PUGIXML_TEXT(\"last\") && argc == 0)\n                    return new (alloc_node()) xpath_ast_node(ast_func_last, xpath_type_number);\n                else if (name == PUGIXML_TEXT(\"lang\") && argc == 1)\n                    return new (alloc_node()) xpath_ast_node(ast_func_lang, xpath_type_boolean, args[0]);\n                else if (name == PUGIXML_TEXT(\"local-name\") && argc <= 1)\n                    return parse_function_helper(ast_func_local_name_0, ast_func_local_name_1, argc, args);\n            \n                break;\n            \n            case 'n':\n                if (name == PUGIXML_TEXT(\"name\") && argc <= 1)\n                    return parse_function_helper(ast_func_name_0, ast_func_name_1, argc, args);\n                else if (name == PUGIXML_TEXT(\"namespace-uri\") && argc <= 1)\n                    return parse_function_helper(ast_func_namespace_uri_0, ast_func_namespace_uri_1, argc, args);\n                else if (name == PUGIXML_TEXT(\"normalize-space\") && argc <= 1)\n                    return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_normalize_space_0 : ast_func_normalize_space_1, xpath_type_string, args[0], args[1]);\n                else if (name == PUGIXML_TEXT(\"not\") && argc == 1)\n                    return new (alloc_node()) xpath_ast_node(ast_func_not, xpath_type_boolean, args[0]);\n                else if (name == PUGIXML_TEXT(\"number\") && argc <= 1)\n                    return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_number_0 : ast_func_number_1, xpath_type_number, args[0]);\n            \n                break;\n            \n            case 'p':\n                if (name == PUGIXML_TEXT(\"position\") && argc == 0)\n                    return new (alloc_node()) xpath_ast_node(ast_func_position, xpath_type_number);\n                \n                break;\n            \n            case 'r':\n                if (name == PUGIXML_TEXT(\"round\") && argc == 1)\n                    return new (alloc_node()) xpath_ast_node(ast_func_round, xpath_type_number, args[0]);\n\n                break;\n            \n            case 's':\n                if (name == PUGIXML_TEXT(\"string\") && argc <= 1)\n                    return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_0 : ast_func_string_1, xpath_type_string, args[0]);\n                else if (name == PUGIXML_TEXT(\"string-length\") && argc <= 1)\n                    return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_number, args[0]);\n                else if (name == PUGIXML_TEXT(\"starts-with\") && argc == 2)\n                    return new (alloc_node()) xpath_ast_node(ast_func_starts_with, xpath_type_boolean, args[0], args[1]);\n                else if (name == PUGIXML_TEXT(\"substring-before\") && argc == 2)\n                    return new (alloc_node()) xpath_ast_node(ast_func_substring_before, xpath_type_string, args[0], args[1]);\n                else if (name == PUGIXML_TEXT(\"substring-after\") && argc == 2)\n                    return new (alloc_node()) xpath_ast_node(ast_func_substring_after, xpath_type_string, args[0], args[1]);\n                else if (name == PUGIXML_TEXT(\"substring\") && (argc == 2 || argc == 3))\n                    return new (alloc_node()) xpath_ast_node(argc == 2 ? ast_func_substring_2 : ast_func_substring_3, xpath_type_string, args[0], args[1]);\n                else if (name == PUGIXML_TEXT(\"sum\") && argc == 1)\n                {\n                    if (args[0]->rettype() != xpath_type_node_set) throw_error(\"Function has to be applied to node set\");\n                    return new (alloc_node()) xpath_ast_node(ast_func_sum, xpath_type_number, args[0]);\n                }\n\n                break;\n            \n            case 't':\n                if (name == PUGIXML_TEXT(\"translate\") && argc == 3)\n                    return new (alloc_node()) xpath_ast_node(ast_func_translate, xpath_type_string, args[0], args[1]);\n                else if (name == PUGIXML_TEXT(\"true\") && argc == 0)\n                    return new (alloc_node()) xpath_ast_node(ast_func_true, xpath_type_boolean);\n                    \n                break;\n\n            default:\n                break;\n            }\n\n            throw_error(\"Unrecognized function or wrong parameter count\");\n\n            return 0;\n        }\n\n        axis_t parse_axis_name(const xpath_lexer_string& name, bool& specified)\n        {\n            specified = true;\n\n            switch (name.begin[0])\n            {\n            case 'a':\n                if (name == PUGIXML_TEXT(\"ancestor\"))\n                    return axis_ancestor;\n                else if (name == PUGIXML_TEXT(\"ancestor-or-self\"))\n                    return axis_ancestor_or_self;\n                else if (name == PUGIXML_TEXT(\"attribute\"))\n                    return axis_attribute;\n                \n                break;\n            \n            case 'c':\n                if (name == PUGIXML_TEXT(\"child\"))\n                    return axis_child;\n                \n                break;\n            \n            case 'd':\n                if (name == PUGIXML_TEXT(\"descendant\"))\n                    return axis_descendant;\n                else if (name == PUGIXML_TEXT(\"descendant-or-self\"))\n                    return axis_descendant_or_self;\n                \n                break;\n            \n            case 'f':\n                if (name == PUGIXML_TEXT(\"following\"))\n                    return axis_following;\n                else if (name == PUGIXML_TEXT(\"following-sibling\"))\n                    return axis_following_sibling;\n                \n                break;\n            \n            case 'n':\n                if (name == PUGIXML_TEXT(\"namespace\"))\n                    return axis_namespace;\n                \n                break;\n            \n            case 'p':\n                if (name == PUGIXML_TEXT(\"parent\"))\n                    return axis_parent;\n                else if (name == PUGIXML_TEXT(\"preceding\"))\n                    return axis_preceding;\n                else if (name == PUGIXML_TEXT(\"preceding-sibling\"))\n                    return axis_preceding_sibling;\n                \n                break;\n            \n            case 's':\n                if (name == PUGIXML_TEXT(\"self\"))\n                    return axis_self;\n                \n                break;\n\n            default:\n                break;\n            }\n\n            specified = false;\n            return axis_child;\n        }\n\n        nodetest_t parse_node_test_type(const xpath_lexer_string& name)\n        {\n            switch (name.begin[0])\n            {\n            case 'c':\n                if (name == PUGIXML_TEXT(\"comment\"))\n                    return nodetest_type_comment;\n\n                break;\n\n            case 'n':\n                if (name == PUGIXML_TEXT(\"node\"))\n                    return nodetest_type_node;\n\n                break;\n\n            case 'p':\n                if (name == PUGIXML_TEXT(\"processing-instruction\"))\n                    return nodetest_type_pi;\n\n                break;\n\n            case 't':\n                if (name == PUGIXML_TEXT(\"text\"))\n                    return nodetest_type_text;\n\n                break;\n            \n            default:\n                break;\n            }\n\n            return nodetest_none;\n        }\n\n        // PrimaryExpr ::= VariableReference | '(' Expr ')' | Literal | Number | FunctionCall\n        xpath_ast_node* parse_primary_expression()\n        {\n            switch (_lexer.current())\n            {\n            case lex_var_ref:\n            {\n                xpath_lexer_string name = _lexer.contents();\n\n                if (!_variables)\n                    throw_error(\"Unknown variable: variable set is not provided\");\n\n                xpath_variable* var = get_variable_scratch(_scratch, _variables, name.begin, name.end);\n\n                if (!var)\n                    throw_error(\"Unknown variable: variable set does not contain the given name\");\n\n                _lexer.next();\n\n                return new (alloc_node()) xpath_ast_node(ast_variable, var->type(), var);\n            }\n\n            case lex_open_brace:\n            {\n                _lexer.next();\n\n                xpath_ast_node* n = parse_expression();\n\n                if (_lexer.current() != lex_close_brace)\n                    throw_error(\"Unmatched braces\");\n\n                _lexer.next();\n\n                return n;\n            }\n\n            case lex_quoted_string:\n            {\n                const char_t* value = alloc_string(_lexer.contents());\n\n                xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_string_constant, xpath_type_string, value);\n                _lexer.next();\n\n                return n;\n            }\n\n            case lex_number:\n            {\n                double value = 0;\n\n                if (!convert_string_to_number_scratch(_scratch, _lexer.contents().begin, _lexer.contents().end, &value))\n                    throw_error_oom();\n\n                xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_number_constant, xpath_type_number, value);\n                _lexer.next();\n\n                return n;\n            }\n\n            case lex_string:\n            {\n                xpath_ast_node* args[2] = {0};\n                size_t argc = 0;\n                \n                xpath_lexer_string function = _lexer.contents();\n                _lexer.next();\n                \n                xpath_ast_node* last_arg = 0;\n                \n                if (_lexer.current() != lex_open_brace)\n                    throw_error(\"Unrecognized function call\");\n                _lexer.next();\n\n                if (_lexer.current() != lex_close_brace)\n                    args[argc++] = parse_expression();\n\n                while (_lexer.current() != lex_close_brace)\n                {\n                    if (_lexer.current() != lex_comma)\n                        throw_error(\"No comma between function arguments\");\n                    _lexer.next();\n                    \n                    xpath_ast_node* n = parse_expression();\n                    \n                    if (argc < 2) args[argc] = n;\n                    else last_arg->set_next(n);\n\n                    argc++;\n                    last_arg = n;\n                }\n                \n                _lexer.next();\n\n                return parse_function(function, argc, args);\n            }\n\n            default:\n                throw_error(\"Unrecognizable primary expression\");\n\n                return 0;\n            }\n        }\n        \n        // FilterExpr ::= PrimaryExpr | FilterExpr Predicate\n        // Predicate ::= '[' PredicateExpr ']'\n        // PredicateExpr ::= Expr\n        xpath_ast_node* parse_filter_expression()\n        {\n            xpath_ast_node* n = parse_primary_expression();\n\n            while (_lexer.current() == lex_open_square_brace)\n            {\n                _lexer.next();\n\n                xpath_ast_node* expr = parse_expression();\n\n                if (n->rettype() != xpath_type_node_set) throw_error(\"Predicate has to be applied to node set\");\n\n                n = new (alloc_node()) xpath_ast_node(ast_filter, n, expr, predicate_default);\n\n                if (_lexer.current() != lex_close_square_brace)\n                    throw_error(\"Unmatched square brace\");\n            \n                _lexer.next();\n            }\n            \n            return n;\n        }\n        \n        // Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep\n        // AxisSpecifier ::= AxisName '::' | '@'?\n        // NodeTest ::= NameTest | NodeType '(' ')' | 'processing-instruction' '(' Literal ')'\n        // NameTest ::= '*' | NCName ':' '*' | QName\n        // AbbreviatedStep ::= '.' | '..'\n        xpath_ast_node* parse_step(xpath_ast_node* set)\n        {\n            if (set && set->rettype() != xpath_type_node_set)\n                throw_error(\"Step has to be applied to node set\");\n\n            bool axis_specified = false;\n            axis_t axis = axis_child; // implied child axis\n\n            if (_lexer.current() == lex_axis_attribute)\n            {\n                axis = axis_attribute;\n                axis_specified = true;\n                \n                _lexer.next();\n            }\n            else if (_lexer.current() == lex_dot)\n            {\n                _lexer.next();\n                \n                return new (alloc_node()) xpath_ast_node(ast_step, set, axis_self, nodetest_type_node, 0);\n            }\n            else if (_lexer.current() == lex_double_dot)\n            {\n                _lexer.next();\n                \n                return new (alloc_node()) xpath_ast_node(ast_step, set, axis_parent, nodetest_type_node, 0);\n            }\n        \n            nodetest_t nt_type = nodetest_none;\n            xpath_lexer_string nt_name;\n            \n            if (_lexer.current() == lex_string)\n            {\n                // node name test\n                nt_name = _lexer.contents();\n                _lexer.next();\n\n                // was it an axis name?\n                if (_lexer.current() == lex_double_colon)\n                {\n                    // parse axis name\n                    if (axis_specified) throw_error(\"Two axis specifiers in one step\");\n\n                    axis = parse_axis_name(nt_name, axis_specified);\n\n                    if (!axis_specified) throw_error(\"Unknown axis\");\n\n                    // read actual node test\n                    _lexer.next();\n\n                    if (_lexer.current() == lex_multiply)\n                    {\n                        nt_type = nodetest_all;\n                        nt_name = xpath_lexer_string();\n                        _lexer.next();\n                    }\n                    else if (_lexer.current() == lex_string)\n                    {\n                        nt_name = _lexer.contents();\n                        _lexer.next();\n                    }\n                    else throw_error(\"Unrecognized node test\");\n                }\n                \n                if (nt_type == nodetest_none)\n                {\n                    // node type test or processing-instruction\n                    if (_lexer.current() == lex_open_brace)\n                    {\n                        _lexer.next();\n                        \n                        if (_lexer.current() == lex_close_brace)\n                        {\n                            _lexer.next();\n\n                            nt_type = parse_node_test_type(nt_name);\n\n                            if (nt_type == nodetest_none) throw_error(\"Unrecognized node type\");\n                            \n                            nt_name = xpath_lexer_string();\n                        }\n                        else if (nt_name == PUGIXML_TEXT(\"processing-instruction\"))\n                        {\n                            if (_lexer.current() != lex_quoted_string)\n                                throw_error(\"Only literals are allowed as arguments to processing-instruction()\");\n                        \n                            nt_type = nodetest_pi;\n                            nt_name = _lexer.contents();\n                            _lexer.next();\n                            \n                            if (_lexer.current() != lex_close_brace)\n                                throw_error(\"Unmatched brace near processing-instruction()\");\n                            _lexer.next();\n                        }\n                        else\n                            throw_error(\"Unmatched brace near node type test\");\n\n                    }\n                    // QName or NCName:*\n                    else\n                    {\n                        if (nt_name.end - nt_name.begin > 2 && nt_name.end[-2] == ':' && nt_name.end[-1] == '*') // NCName:*\n                        {\n                            nt_name.end--; // erase *\n                            \n                            nt_type = nodetest_all_in_namespace;\n                        }\n                        else nt_type = nodetest_name;\n                    }\n                }\n            }\n            else if (_lexer.current() == lex_multiply)\n            {\n                nt_type = nodetest_all;\n                _lexer.next();\n            }\n            else throw_error(\"Unrecognized node test\");\n            \n            xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step, set, axis, nt_type, alloc_string(nt_name));\n            \n            xpath_ast_node* last = 0;\n            \n            while (_lexer.current() == lex_open_square_brace)\n            {\n                _lexer.next();\n                \n                xpath_ast_node* expr = parse_expression();\n\n                xpath_ast_node* pred = new (alloc_node()) xpath_ast_node(ast_predicate, 0, expr, predicate_default);\n                \n                if (_lexer.current() != lex_close_square_brace)\n                    throw_error(\"Unmatched square brace\");\n                _lexer.next();\n                \n                if (last) last->set_next(pred);\n                else n->set_right(pred);\n                \n                last = pred;\n            }\n\n            return n;\n        }\n        \n        // RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | RelativeLocationPath '//' Step\n        xpath_ast_node* parse_relative_location_path(xpath_ast_node* set)\n        {\n            xpath_ast_node* n = parse_step(set);\n            \n            while (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash)\n            {\n                lexeme_t l = _lexer.current();\n                _lexer.next();\n\n                if (l == lex_double_slash)\n                    n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);\n                \n                n = parse_step(n);\n            }\n            \n            return n;\n        }\n        \n        // LocationPath ::= RelativeLocationPath | AbsoluteLocationPath\n        // AbsoluteLocationPath ::= '/' RelativeLocationPath? | '//' RelativeLocationPath\n        xpath_ast_node* parse_location_path()\n        {\n            if (_lexer.current() == lex_slash)\n            {\n                _lexer.next();\n                \n                xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set);\n\n                // relative location path can start from axis_attribute, dot, double_dot, multiply and string lexemes; any other lexeme means standalone root path\n                lexeme_t l = _lexer.current();\n\n                if (l == lex_string || l == lex_axis_attribute || l == lex_dot || l == lex_double_dot || l == lex_multiply)\n                    return parse_relative_location_path(n);\n                else\n                    return n;\n            }\n            else if (_lexer.current() == lex_double_slash)\n            {\n                _lexer.next();\n                \n                xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set);\n                n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);\n                \n                return parse_relative_location_path(n);\n            }\n\n            // else clause moved outside of if because of bogus warning 'control may reach end of non-void function being inlined' in gcc 4.0.1\n            return parse_relative_location_path(0);\n        }\n        \n        // PathExpr ::= LocationPath\n        //                | FilterExpr\n        //                | FilterExpr '/' RelativeLocationPath\n        //                | FilterExpr '//' RelativeLocationPath\n        // UnionExpr ::= PathExpr | UnionExpr '|' PathExpr\n        // UnaryExpr ::= UnionExpr | '-' UnaryExpr\n        xpath_ast_node* parse_path_or_unary_expression()\n        {\n            // Clarification.\n            // PathExpr begins with either LocationPath or FilterExpr.\n            // FilterExpr begins with PrimaryExpr\n            // PrimaryExpr begins with '$' in case of it being a variable reference,\n            // '(' in case of it being an expression, string literal, number constant or\n            // function call.\n\n            if (_lexer.current() == lex_var_ref || _lexer.current() == lex_open_brace || \n                _lexer.current() == lex_quoted_string || _lexer.current() == lex_number ||\n                _lexer.current() == lex_string)\n            {\n                if (_lexer.current() == lex_string)\n                {\n                    // This is either a function call, or not - if not, we shall proceed with location path\n                    const char_t* state = _lexer.state();\n                    \n                    while (PUGI__IS_CHARTYPE(*state, ct_space)) ++state;\n                    \n                    if (*state != '(') return parse_location_path();\n\n                    // This looks like a function call; however this still can be a node-test. Check it.\n                    if (parse_node_test_type(_lexer.contents()) != nodetest_none) return parse_location_path();\n                }\n                \n                xpath_ast_node* n = parse_filter_expression();\n\n                if (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash)\n                {\n                    lexeme_t l = _lexer.current();\n                    _lexer.next();\n                    \n                    if (l == lex_double_slash)\n                    {\n                        if (n->rettype() != xpath_type_node_set) throw_error(\"Step has to be applied to node set\");\n\n                        n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);\n                    }\n    \n                    // select from location path\n                    return parse_relative_location_path(n);\n                }\n\n                return n;\n            }\n            else if (_lexer.current() == lex_minus)\n            {\n                _lexer.next();\n\n                // precedence 7+ - only parses union expressions\n                xpath_ast_node* expr = parse_expression_rec(parse_path_or_unary_expression(), 7);\n\n                return new (alloc_node()) xpath_ast_node(ast_op_negate, xpath_type_number, expr);\n            }\n            else\n                return parse_location_path();\n        }\n\n        struct binary_op_t\n        {\n            ast_type_t asttype;\n            xpath_value_type rettype;\n            int precedence;\n\n            binary_op_t(): asttype(ast_unknown), rettype(xpath_type_none), precedence(0)\n            {\n            }\n\n            binary_op_t(ast_type_t asttype_, xpath_value_type rettype_, int precedence_): asttype(asttype_), rettype(rettype_), precedence(precedence_)\n            {\n            }\n\n            static binary_op_t parse(xpath_lexer& lexer)\n            {\n                switch (lexer.current())\n                {\n                case lex_string:\n                    if (lexer.contents() == PUGIXML_TEXT(\"or\"))\n                        return binary_op_t(ast_op_or, xpath_type_boolean, 1);\n                    else if (lexer.contents() == PUGIXML_TEXT(\"and\"))\n                        return binary_op_t(ast_op_and, xpath_type_boolean, 2);\n                    else if (lexer.contents() == PUGIXML_TEXT(\"div\"))\n                        return binary_op_t(ast_op_divide, xpath_type_number, 6);\n                    else if (lexer.contents() == PUGIXML_TEXT(\"mod\"))\n                        return binary_op_t(ast_op_mod, xpath_type_number, 6);\n                    else\n                        return binary_op_t();\n\n                case lex_equal:\n                    return binary_op_t(ast_op_equal, xpath_type_boolean, 3);\n\n                case lex_not_equal:\n                    return binary_op_t(ast_op_not_equal, xpath_type_boolean, 3);\n\n                case lex_less:\n                    return binary_op_t(ast_op_less, xpath_type_boolean, 4);\n\n                case lex_greater:\n                    return binary_op_t(ast_op_greater, xpath_type_boolean, 4);\n\n                case lex_less_or_equal:\n                    return binary_op_t(ast_op_less_or_equal, xpath_type_boolean, 4);\n\n                case lex_greater_or_equal:\n                    return binary_op_t(ast_op_greater_or_equal, xpath_type_boolean, 4);\n\n                case lex_plus:\n                    return binary_op_t(ast_op_add, xpath_type_number, 5);\n\n                case lex_minus:\n                    return binary_op_t(ast_op_subtract, xpath_type_number, 5);\n\n                case lex_multiply:\n                    return binary_op_t(ast_op_multiply, xpath_type_number, 6);\n\n                case lex_union:\n                    return binary_op_t(ast_op_union, xpath_type_node_set, 7);\n\n                default:\n                    return binary_op_t();\n                }\n            }\n        };\n\n        xpath_ast_node* parse_expression_rec(xpath_ast_node* lhs, int limit)\n        {\n            binary_op_t op = binary_op_t::parse(_lexer);\n\n            while (op.asttype != ast_unknown && op.precedence >= limit)\n            {\n                _lexer.next();\n\n                xpath_ast_node* rhs = parse_path_or_unary_expression();\n\n                binary_op_t nextop = binary_op_t::parse(_lexer);\n\n                while (nextop.asttype != ast_unknown && nextop.precedence > op.precedence)\n                {\n                    rhs = parse_expression_rec(rhs, nextop.precedence);\n\n                    nextop = binary_op_t::parse(_lexer);\n                }\n\n                if (op.asttype == ast_op_union && (lhs->rettype() != xpath_type_node_set || rhs->rettype() != xpath_type_node_set))\n                    throw_error(\"Union operator has to be applied to node sets\");\n\n                lhs = new (alloc_node()) xpath_ast_node(op.asttype, op.rettype, lhs, rhs);\n\n                op = binary_op_t::parse(_lexer);\n            }\n\n            return lhs;\n        }\n\n        // Expr ::= OrExpr\n        // OrExpr ::= AndExpr | OrExpr 'or' AndExpr\n        // AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr\n        // EqualityExpr ::= RelationalExpr\n        //                    | EqualityExpr '=' RelationalExpr\n        //                    | EqualityExpr '!=' RelationalExpr\n        // RelationalExpr ::= AdditiveExpr\n        //                      | RelationalExpr '<' AdditiveExpr\n        //                      | RelationalExpr '>' AdditiveExpr\n        //                      | RelationalExpr '<=' AdditiveExpr\n        //                      | RelationalExpr '>=' AdditiveExpr\n        // AdditiveExpr ::= MultiplicativeExpr\n        //                    | AdditiveExpr '+' MultiplicativeExpr\n        //                    | AdditiveExpr '-' MultiplicativeExpr\n        // MultiplicativeExpr ::= UnaryExpr\n        //                          | MultiplicativeExpr '*' UnaryExpr\n        //                          | MultiplicativeExpr 'div' UnaryExpr\n        //                          | MultiplicativeExpr 'mod' UnaryExpr\n        xpath_ast_node* parse_expression()\n        {\n            return parse_expression_rec(parse_path_or_unary_expression(), 0);\n        }\n\n        xpath_parser(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result): _alloc(alloc), _lexer(query), _query(query), _variables(variables), _result(result)\n        {\n        }\n\n        xpath_ast_node* parse()\n        {\n            xpath_ast_node* result = parse_expression();\n            \n            if (_lexer.current() != lex_eof)\n            {\n                // there are still unparsed tokens left, error\n                throw_error(\"Incorrect query\");\n            }\n            \n            return result;\n        }\n\n        static xpath_ast_node* parse(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result)\n        {\n            xpath_parser parser(query, variables, alloc, result);\n\n        #ifdef PUGIXML_NO_EXCEPTIONS\n            int error = setjmp(parser._error_handler);\n\n            return (error == 0) ? parser.parse() : 0;\n        #else\n            return parser.parse();\n        #endif\n        }\n    };\n\n    struct xpath_query_impl\n    {\n        static xpath_query_impl* create()\n        {\n            void* memory = xml_memory::allocate(sizeof(xpath_query_impl));\n\n            return new (memory) xpath_query_impl();\n        }\n\n        static void destroy(void* ptr)\n        {\n            if (!ptr) return;\n            \n            // free all allocated pages\n            static_cast<xpath_query_impl*>(ptr)->alloc.release();\n\n            // free allocator memory (with the first page)\n            xml_memory::deallocate(ptr);\n        }\n\n        xpath_query_impl(): root(0), alloc(&block)\n        {\n            block.next = 0;\n            block.capacity = sizeof(block.data);\n        }\n\n        xpath_ast_node* root;\n        xpath_allocator alloc;\n        xpath_memory_block block;\n    };\n\n    PUGI__FN xpath_string evaluate_string_impl(xpath_query_impl* impl, const xpath_node& n, xpath_stack_data& sd)\n    {\n        if (!impl) return xpath_string();\n\n    #ifdef PUGIXML_NO_EXCEPTIONS\n        if (setjmp(sd.error_handler)) return xpath_string();\n    #endif\n\n        xpath_context c(n, 1, 1);\n\n        return impl->root->eval_string(c, sd.stack);\n    }\n\n    PUGI__FN impl::xpath_ast_node* evaluate_node_set_prepare(xpath_query_impl* impl)\n    {\n        if (!impl) return 0;\n\n        if (impl->root->rettype() != xpath_type_node_set)\n        {\n        #ifdef PUGIXML_NO_EXCEPTIONS\n            return 0;\n        #else\n            xpath_parse_result res;\n            res.error = \"Expression does not evaluate to node set\";\n\n            throw xpath_exception(res);\n        #endif\n        }\n\n        return impl->root;\n    }\nPUGI__NS_END\n\nnamespace pugi\n{\n#ifndef PUGIXML_NO_EXCEPTIONS\n    PUGI__FN xpath_exception::xpath_exception(const xpath_parse_result& result_): _result(result_)\n    {\n        assert(_result.error);\n    }\n    \n    PUGI__FN const char* xpath_exception::what() const throw()\n    {\n        return _result.error;\n    }\n\n    PUGI__FN const xpath_parse_result& xpath_exception::result() const\n    {\n        return _result;\n    }\n#endif\n    \n    PUGI__FN xpath_node::xpath_node()\n    {\n    }\n        \n    PUGI__FN xpath_node::xpath_node(const xml_node& node_): _node(node_)\n    {\n    }\n        \n    PUGI__FN xpath_node::xpath_node(const xml_attribute& attribute_, const xml_node& parent_): _node(attribute_ ? parent_ : xml_node()), _attribute(attribute_)\n    {\n    }\n\n    PUGI__FN xml_node xpath_node::node() const\n    {\n        return _attribute ? xml_node() : _node;\n    }\n        \n    PUGI__FN xml_attribute xpath_node::attribute() const\n    {\n        return _attribute;\n    }\n    \n    PUGI__FN xml_node xpath_node::parent() const\n    {\n        return _attribute ? _node : _node.parent();\n    }\n\n    PUGI__FN static void unspecified_bool_xpath_node(xpath_node***)\n    {\n    }\n\n    PUGI__FN xpath_node::operator xpath_node::unspecified_bool_type() const\n    {\n        return (_node || _attribute) ? unspecified_bool_xpath_node : 0;\n    }\n    \n    PUGI__FN bool xpath_node::operator!() const\n    {\n        return !(_node || _attribute);\n    }\n\n    PUGI__FN bool xpath_node::operator==(const xpath_node& n) const\n    {\n        return _node == n._node && _attribute == n._attribute;\n    }\n    \n    PUGI__FN bool xpath_node::operator!=(const xpath_node& n) const\n    {\n        return _node != n._node || _attribute != n._attribute;\n    }\n\n#ifdef __BORLANDC__\n    PUGI__FN bool operator&&(const xpath_node& lhs, bool rhs)\n    {\n        return (bool)lhs && rhs;\n    }\n\n    PUGI__FN bool operator||(const xpath_node& lhs, bool rhs)\n    {\n        return (bool)lhs || rhs;\n    }\n#endif\n\n    PUGI__FN void xpath_node_set::_assign(const_iterator begin_, const_iterator end_)\n    {\n        assert(begin_ <= end_);\n\n        size_t size_ = static_cast<size_t>(end_ - begin_);\n\n        if (size_ <= 1)\n        {\n            // deallocate old buffer\n            if (_begin != &_storage) impl::xml_memory::deallocate(_begin);\n\n            // use internal buffer\n            if (begin_ != end_) _storage = *begin_;\n\n            _begin = &_storage;\n            _end = &_storage + size_;\n        }\n        else\n        {\n            // make heap copy\n            xpath_node* storage = static_cast<xpath_node*>(impl::xml_memory::allocate(size_ * sizeof(xpath_node)));\n\n            if (!storage)\n            {\n            #ifdef PUGIXML_NO_EXCEPTIONS\n                return;\n            #else\n                throw std::bad_alloc();\n            #endif\n            }\n\n            memcpy(storage, begin_, size_ * sizeof(xpath_node));\n            \n            // deallocate old buffer\n            if (_begin != &_storage) impl::xml_memory::deallocate(_begin);\n\n            // finalize\n            _begin = storage;\n            _end = storage + size_;\n        }\n    }\n\n    PUGI__FN xpath_node_set::xpath_node_set(): _type(type_unsorted), _begin(&_storage), _end(&_storage)\n    {\n    }\n\n    PUGI__FN xpath_node_set::xpath_node_set(const_iterator begin_, const_iterator end_, type_t type_): _type(type_), _begin(&_storage), _end(&_storage)\n    {\n        _assign(begin_, end_);\n    }\n\n    PUGI__FN xpath_node_set::~xpath_node_set()\n    {\n        if (_begin != &_storage) impl::xml_memory::deallocate(_begin);\n    }\n        \n    PUGI__FN xpath_node_set::xpath_node_set(const xpath_node_set& ns): _type(ns._type), _begin(&_storage), _end(&_storage)\n    {\n        _assign(ns._begin, ns._end);\n    }\n    \n    PUGI__FN xpath_node_set& xpath_node_set::operator=(const xpath_node_set& ns)\n    {\n        if (this == &ns) return *this;\n        \n        _type = ns._type;\n        _assign(ns._begin, ns._end);\n\n        return *this;\n    }\n\n    PUGI__FN xpath_node_set::type_t xpath_node_set::type() const\n    {\n        return _type;\n    }\n        \n    PUGI__FN size_t xpath_node_set::size() const\n    {\n        return _end - _begin;\n    }\n        \n    PUGI__FN bool xpath_node_set::empty() const\n    {\n        return _begin == _end;\n    }\n        \n    PUGI__FN const xpath_node& xpath_node_set::operator[](size_t index) const\n    {\n        assert(index < size());\n        return _begin[index];\n    }\n\n    PUGI__FN xpath_node_set::const_iterator xpath_node_set::begin() const\n    {\n        return _begin;\n    }\n        \n    PUGI__FN xpath_node_set::const_iterator xpath_node_set::end() const\n    {\n        return _end;\n    }\n    \n    PUGI__FN void xpath_node_set::sort(bool reverse)\n    {\n        _type = impl::xpath_sort(_begin, _end, _type, reverse);\n    }\n\n    PUGI__FN xpath_node xpath_node_set::first() const\n    {\n        return impl::xpath_first(_begin, _end, _type);\n    }\n\n    PUGI__FN xpath_parse_result::xpath_parse_result(): error(\"Internal error\"), offset(0)\n    {\n    }\n\n    PUGI__FN xpath_parse_result::operator bool() const\n    {\n        return error == 0;\n    }\n\n    PUGI__FN const char* xpath_parse_result::description() const\n    {\n        return error ? error : \"No error\";\n    }\n\n    PUGI__FN xpath_variable::xpath_variable(): _type(xpath_type_none), _next(0)\n    {\n    }\n\n    PUGI__FN const char_t* xpath_variable::name() const\n    {\n        switch (_type)\n        {\n        case xpath_type_node_set:\n            return static_cast<const impl::xpath_variable_node_set*>(this)->name;\n\n        case xpath_type_number:\n            return static_cast<const impl::xpath_variable_number*>(this)->name;\n\n        case xpath_type_string:\n            return static_cast<const impl::xpath_variable_string*>(this)->name;\n\n        case xpath_type_boolean:\n            return static_cast<const impl::xpath_variable_boolean*>(this)->name;\n\n        default:\n            assert(!\"Invalid variable type\");\n            return 0;\n        }\n    }\n\n    PUGI__FN xpath_value_type xpath_variable::type() const\n    {\n        return _type;\n    }\n\n    PUGI__FN bool xpath_variable::get_boolean() const\n    {\n        return (_type == xpath_type_boolean) ? static_cast<const impl::xpath_variable_boolean*>(this)->value : false;\n    }\n\n    PUGI__FN double xpath_variable::get_number() const\n    {\n        return (_type == xpath_type_number) ? static_cast<const impl::xpath_variable_number*>(this)->value : impl::gen_nan();\n    }\n\n    PUGI__FN const char_t* xpath_variable::get_string() const\n    {\n        const char_t* value = (_type == xpath_type_string) ? static_cast<const impl::xpath_variable_string*>(this)->value : 0;\n        return value ? value : PUGIXML_TEXT(\"\");\n    }\n\n    PUGI__FN const xpath_node_set& xpath_variable::get_node_set() const\n    {\n        return (_type == xpath_type_node_set) ? static_cast<const impl::xpath_variable_node_set*>(this)->value : impl::dummy_node_set;\n    }\n\n    PUGI__FN bool xpath_variable::set(bool value)\n    {\n        if (_type != xpath_type_boolean) return false;\n\n        static_cast<impl::xpath_variable_boolean*>(this)->value = value;\n        return true;\n    }\n\n    PUGI__FN bool xpath_variable::set(double value)\n    {\n        if (_type != xpath_type_number) return false;\n\n        static_cast<impl::xpath_variable_number*>(this)->value = value;\n        return true;\n    }\n\n    PUGI__FN bool xpath_variable::set(const char_t* value)\n    {\n        if (_type != xpath_type_string) return false;\n\n        impl::xpath_variable_string* var = static_cast<impl::xpath_variable_string*>(this);\n\n        // duplicate string\n        size_t size = (impl::strlength(value) + 1) * sizeof(char_t);\n\n        char_t* copy = static_cast<char_t*>(impl::xml_memory::allocate(size));\n        if (!copy) return false;\n\n        memcpy(copy, value, size);\n\n        // replace old string\n        if (var->value) impl::xml_memory::deallocate(var->value);\n        var->value = copy;\n\n        return true;\n    }\n\n    PUGI__FN bool xpath_variable::set(const xpath_node_set& value)\n    {\n        if (_type != xpath_type_node_set) return false;\n\n        static_cast<impl::xpath_variable_node_set*>(this)->value = value;\n        return true;\n    }\n\n    PUGI__FN xpath_variable_set::xpath_variable_set()\n    {\n        for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i) _data[i] = 0;\n    }\n\n    PUGI__FN xpath_variable_set::~xpath_variable_set()\n    {\n        for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i)\n        {\n            xpath_variable* var = _data[i];\n\n            while (var)\n            {\n                xpath_variable* next = var->_next;\n\n                impl::delete_xpath_variable(var->_type, var);\n\n                var = next;\n            }\n        }\n    }\n\n    PUGI__FN xpath_variable* xpath_variable_set::find(const char_t* name) const\n    {\n        const size_t hash_size = sizeof(_data) / sizeof(_data[0]);\n        size_t hash = impl::hash_string(name) % hash_size;\n\n        // look for existing variable\n        for (xpath_variable* var = _data[hash]; var; var = var->_next)\n            if (impl::strequal(var->name(), name))\n                return var;\n\n        return 0;\n    }\n\n    PUGI__FN xpath_variable* xpath_variable_set::add(const char_t* name, xpath_value_type type)\n    {\n        const size_t hash_size = sizeof(_data) / sizeof(_data[0]);\n        size_t hash = impl::hash_string(name) % hash_size;\n\n        // look for existing variable\n        for (xpath_variable* var = _data[hash]; var; var = var->_next)\n            if (impl::strequal(var->name(), name))\n                return var->type() == type ? var : 0;\n\n        // add new variable\n        xpath_variable* result = impl::new_xpath_variable(type, name);\n\n        if (result)\n        {\n            result->_type = type;\n            result->_next = _data[hash];\n\n            _data[hash] = result;\n        }\n\n        return result;\n    }\n\n    PUGI__FN bool xpath_variable_set::set(const char_t* name, bool value)\n    {\n        xpath_variable* var = add(name, xpath_type_boolean);\n        return var ? var->set(value) : false;\n    }\n\n    PUGI__FN bool xpath_variable_set::set(const char_t* name, double value)\n    {\n        xpath_variable* var = add(name, xpath_type_number);\n        return var ? var->set(value) : false;\n    }\n\n    PUGI__FN bool xpath_variable_set::set(const char_t* name, const char_t* value)\n    {\n        xpath_variable* var = add(name, xpath_type_string);\n        return var ? var->set(value) : false;\n    }\n\n    PUGI__FN bool xpath_variable_set::set(const char_t* name, const xpath_node_set& value)\n    {\n        xpath_variable* var = add(name, xpath_type_node_set);\n        return var ? var->set(value) : false;\n    }\n\n    PUGI__FN xpath_variable* xpath_variable_set::get(const char_t* name)\n    {\n        return find(name);\n    }\n\n    PUGI__FN const xpath_variable* xpath_variable_set::get(const char_t* name) const\n    {\n        return find(name);\n    }\n\n    PUGI__FN xpath_query::xpath_query(const char_t* query, xpath_variable_set* variables): _impl(0)\n    {\n        impl::xpath_query_impl* qimpl = impl::xpath_query_impl::create();\n\n        if (!qimpl)\n        {\n        #ifdef PUGIXML_NO_EXCEPTIONS\n            _result.error = \"Out of memory\";\n        #else\n            throw std::bad_alloc();\n        #endif\n        }\n        else\n        {\n            impl::buffer_holder impl_holder(qimpl, impl::xpath_query_impl::destroy);\n\n            qimpl->root = impl::xpath_parser::parse(query, variables, &qimpl->alloc, &_result);\n\n            if (qimpl->root)\n            {\n                qimpl->root->optimize(&qimpl->alloc);\n\n                _impl = static_cast<impl::xpath_query_impl*>(impl_holder.release());\n                _result.error = 0;\n            }\n        }\n    }\n\n    PUGI__FN xpath_query::~xpath_query()\n    {\n        impl::xpath_query_impl::destroy(_impl);\n    }\n\n    PUGI__FN xpath_value_type xpath_query::return_type() const\n    {\n        if (!_impl) return xpath_type_none;\n\n        return static_cast<impl::xpath_query_impl*>(_impl)->root->rettype();\n    }\n\n    PUGI__FN bool xpath_query::evaluate_boolean(const xpath_node& n) const\n    {\n        if (!_impl) return false;\n        \n        impl::xpath_context c(n, 1, 1);\n        impl::xpath_stack_data sd;\n\n    #ifdef PUGIXML_NO_EXCEPTIONS\n        if (setjmp(sd.error_handler)) return false;\n    #endif\n        \n        return static_cast<impl::xpath_query_impl*>(_impl)->root->eval_boolean(c, sd.stack);\n    }\n    \n    PUGI__FN double xpath_query::evaluate_number(const xpath_node& n) const\n    {\n        if (!_impl) return impl::gen_nan();\n        \n        impl::xpath_context c(n, 1, 1);\n        impl::xpath_stack_data sd;\n\n    #ifdef PUGIXML_NO_EXCEPTIONS\n        if (setjmp(sd.error_handler)) return impl::gen_nan();\n    #endif\n\n        return static_cast<impl::xpath_query_impl*>(_impl)->root->eval_number(c, sd.stack);\n    }\n\n#ifndef PUGIXML_NO_STL\n    PUGI__FN string_t xpath_query::evaluate_string(const xpath_node& n) const\n    {\n        impl::xpath_stack_data sd;\n\n        impl::xpath_string r = impl::evaluate_string_impl(static_cast<impl::xpath_query_impl*>(_impl), n, sd);\n\n        return string_t(r.c_str(), r.length());\n    }\n#endif\n\n    PUGI__FN size_t xpath_query::evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const\n    {\n        impl::xpath_stack_data sd;\n\n        impl::xpath_string r = impl::evaluate_string_impl(static_cast<impl::xpath_query_impl*>(_impl), n, sd);\n\n        size_t full_size = r.length() + 1;\n        \n        if (capacity > 0)\n        {\n            size_t size = (full_size < capacity) ? full_size : capacity;\n            assert(size > 0);\n\n            memcpy(buffer, r.c_str(), (size - 1) * sizeof(char_t));\n            buffer[size - 1] = 0;\n        }\n        \n        return full_size;\n    }\n\n    PUGI__FN xpath_node_set xpath_query::evaluate_node_set(const xpath_node& n) const\n    {\n        impl::xpath_ast_node* root = impl::evaluate_node_set_prepare(static_cast<impl::xpath_query_impl*>(_impl));\n        if (!root) return xpath_node_set();\n\n        impl::xpath_context c(n, 1, 1);\n        impl::xpath_stack_data sd;\n\n    #ifdef PUGIXML_NO_EXCEPTIONS\n        if (setjmp(sd.error_handler)) return xpath_node_set();\n    #endif\n\n        impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_all);\n\n        return xpath_node_set(r.begin(), r.end(), r.type());\n    }\n\n    PUGI__FN xpath_node xpath_query::evaluate_node(const xpath_node& n) const\n    {\n        impl::xpath_ast_node* root = impl::evaluate_node_set_prepare(static_cast<impl::xpath_query_impl*>(_impl));\n        if (!root) return xpath_node();\n\n        impl::xpath_context c(n, 1, 1);\n        impl::xpath_stack_data sd;\n\n    #ifdef PUGIXML_NO_EXCEPTIONS\n        if (setjmp(sd.error_handler)) return xpath_node();\n    #endif\n\n        impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_first);\n\n        return r.first();\n    }\n\n    PUGI__FN const xpath_parse_result& xpath_query::result() const\n    {\n        return _result;\n    }\n\n    PUGI__FN static void unspecified_bool_xpath_query(xpath_query***)\n    {\n    }\n\n    PUGI__FN xpath_query::operator xpath_query::unspecified_bool_type() const\n    {\n        return _impl ? unspecified_bool_xpath_query : 0;\n    }\n\n    PUGI__FN bool xpath_query::operator!() const\n    {\n        return !_impl;\n    }\n\n    PUGI__FN xpath_node xml_node::select_node(const char_t* query, xpath_variable_set* variables) const\n    {\n        xpath_query q(query, variables);\n        return select_node(q);\n    }\n\n    PUGI__FN xpath_node xml_node::select_node(const xpath_query& query) const\n    {\n        return query.evaluate_node(*this);\n    }\n\n    PUGI__FN xpath_node_set xml_node::select_nodes(const char_t* query, xpath_variable_set* variables) const\n    {\n        xpath_query q(query, variables);\n        return select_nodes(q);\n    }\n\n    PUGI__FN xpath_node_set xml_node::select_nodes(const xpath_query& query) const\n    {\n        return query.evaluate_node_set(*this);\n    }\n\n    PUGI__FN xpath_node xml_node::select_single_node(const char_t* query, xpath_variable_set* variables) const\n    {\n        xpath_query q(query, variables);\n        return select_single_node(q);\n    }\n\n    PUGI__FN xpath_node xml_node::select_single_node(const xpath_query& query) const\n    {\n        return query.evaluate_node(*this);\n    }\n}\n\n#endif\n\n#ifdef __BORLANDC__\n#    pragma option pop\n#endif\n\n// Intel C++ does not properly keep warning state for function templates,\n// so popping warning state at the end of translation unit leads to warnings in the middle.\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#    pragma warning(pop)\n#endif\n\n// Undefine all local macros (makes sure we're not leaking macros in header-only mode)\n#undef PUGI__NO_INLINE\n#undef PUGI__UNLIKELY\n#undef PUGI__STATIC_ASSERT\n#undef PUGI__DMC_VOLATILE\n#undef PUGI__MSVC_CRT_VERSION\n#undef PUGI__NS_BEGIN\n#undef PUGI__NS_END\n#undef PUGI__FN\n#undef PUGI__FN_NO_INLINE\n#undef PUGI__NODETYPE\n#undef PUGI__IS_CHARTYPE_IMPL\n#undef PUGI__IS_CHARTYPE\n#undef PUGI__IS_CHARTYPEX\n#undef PUGI__ENDSWITH\n#undef PUGI__SKIPWS\n#undef PUGI__OPTSET\n#undef PUGI__PUSHNODE\n#undef PUGI__POPNODE\n#undef PUGI__SCANFOR\n#undef PUGI__SCANWHILE\n#undef PUGI__SCANWHILE_UNROLL\n#undef PUGI__ENDSEG\n#undef PUGI__THROW_ERROR\n#undef PUGI__CHECK_ERROR\n\n#endif\n\n/*\n * Copyright (c) 2006-2015 Arseny Kapoulkine\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n"
  },
  {
    "path": "CodeTool/Src/pugixml/pugixml.hpp",
    "content": "/*\n * pugixml parser - version 1.6\n * --------------------------------------------------------\n * Copyright (C) 2006-2015, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)\n * Report bugs and download new versions at http://pugixml.org/\n *\n * This library is distributed under the MIT License. See notice at the end\n * of this file.\n *\n * This work is based on the pugxml parser, which is:\n * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)\n */\n\n#ifndef PUGIXML_VERSION\n// Define version macro; evaluates to major * 100 + minor so that it's safe to use in less-than comparisons\n#    define PUGIXML_VERSION 160\n#endif\n\n// Include user configuration file (this can define various configuration macros)\n#include \"pugiconfig.hpp\"\n\n#ifndef HEADER_PUGIXML_HPP\n#define HEADER_PUGIXML_HPP\n\n// Include stddef.h for size_t and ptrdiff_t\n#include <stddef.h>\n\n// Include exception header for XPath\n#if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)\n#    include <exception>\n#endif\n\n// Include STL headers\n#ifndef PUGIXML_NO_STL\n#    include <iterator>\n#    include <iosfwd>\n#    include <string>\n#endif\n\n// Macro for deprecated features\n#ifndef PUGIXML_DEPRECATED\n#    if defined(__GNUC__)\n#        define PUGIXML_DEPRECATED __attribute__((deprecated))\n#    elif defined(_MSC_VER) && _MSC_VER >= 1300\n#        define PUGIXML_DEPRECATED __declspec(deprecated)\n#    else\n#        define PUGIXML_DEPRECATED\n#    endif\n#endif\n\n// If no API is defined, assume default\n#ifndef PUGIXML_API\n#    define PUGIXML_API\n#endif\n\n// If no API for classes is defined, assume default\n#ifndef PUGIXML_CLASS\n#    define PUGIXML_CLASS PUGIXML_API\n#endif\n\n// If no API for functions is defined, assume default\n#ifndef PUGIXML_FUNCTION\n#    define PUGIXML_FUNCTION PUGIXML_API\n#endif\n\n// If the platform is known to have long long support, enable long long functions\n#ifndef PUGIXML_HAS_LONG_LONG\n#    if defined(__cplusplus) && __cplusplus >= 201103\n#        define PUGIXML_HAS_LONG_LONG\n#    elif defined(_MSC_VER) && _MSC_VER >= 1400\n#        define PUGIXML_HAS_LONG_LONG\n#    endif\n#endif\n\n// Character interface macros\n#ifdef PUGIXML_WCHAR_MODE\n#    define PUGIXML_TEXT(t) L ## t\n#    define PUGIXML_CHAR wchar_t\n#else\n#    define PUGIXML_TEXT(t) t\n#    define PUGIXML_CHAR char\n#endif\n\nnamespace pugi\n{\n    // Character type used for all internal storage and operations; depends on PUGIXML_WCHAR_MODE\n    typedef PUGIXML_CHAR char_t;\n\n#ifndef PUGIXML_NO_STL\n    // String type used for operations that work with STL string; depends on PUGIXML_WCHAR_MODE\n    typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> > string_t;\n#endif\n}\n\n// The PugiXML namespace\nnamespace pugi\n{\n    // Tree node types\n    enum xml_node_type\n    {\n        node_null,            // Empty (null) node handle\n        node_document,        // A document tree's absolute root\n        node_element,        // Element tag, i.e. '<node/>'\n        node_pcdata,        // Plain character data, i.e. 'text'\n        node_cdata,            // Character data, i.e. '<![CDATA[text]]>'\n        node_comment,        // Comment tag, i.e. '<!-- text -->'\n        node_pi,            // Processing instruction, i.e. '<?name?>'\n        node_declaration,    // Document declaration, i.e. '<?xml version=\"1.0\"?>'\n        node_doctype        // Document type declaration, i.e. '<!DOCTYPE doc>'\n    };\n\n    // Parsing options\n\n    // Minimal parsing mode (equivalent to turning all other flags off).\n    // Only elements and PCDATA sections are added to the DOM tree, no text conversions are performed.\n    const unsigned int parse_minimal = 0x0000;\n\n    // This flag determines if processing instructions (node_pi) are added to the DOM tree. This flag is off by default.\n    const unsigned int parse_pi = 0x0001;\n\n    // This flag determines if comments (node_comment) are added to the DOM tree. This flag is off by default.\n    const unsigned int parse_comments = 0x0002;\n\n    // This flag determines if CDATA sections (node_cdata) are added to the DOM tree. This flag is on by default.\n    const unsigned int parse_cdata = 0x0004;\n\n    // This flag determines if plain character data (node_pcdata) that consist only of whitespace are added to the DOM tree.\n    // This flag is off by default; turning it on usually results in slower parsing and more memory consumption.\n    const unsigned int parse_ws_pcdata = 0x0008;\n\n    // This flag determines if character and entity references are expanded during parsing. This flag is on by default.\n    const unsigned int parse_escapes = 0x0010;\n\n    // This flag determines if EOL characters are normalized (converted to #xA) during parsing. This flag is on by default.\n    const unsigned int parse_eol = 0x0020;\n    \n    // This flag determines if attribute values are normalized using CDATA normalization rules during parsing. This flag is on by default.\n    const unsigned int parse_wconv_attribute = 0x0040;\n\n    // This flag determines if attribute values are normalized using NMTOKENS normalization rules during parsing. This flag is off by default.\n    const unsigned int parse_wnorm_attribute = 0x0080;\n    \n    // This flag determines if document declaration (node_declaration) is added to the DOM tree. This flag is off by default.\n    const unsigned int parse_declaration = 0x0100;\n\n    // This flag determines if document type declaration (node_doctype) is added to the DOM tree. This flag is off by default.\n    const unsigned int parse_doctype = 0x0200;\n\n    // This flag determines if plain character data (node_pcdata) that is the only child of the parent node and that consists only\n    // of whitespace is added to the DOM tree.\n    // This flag is off by default; turning it on may result in slower parsing and more memory consumption.\n    const unsigned int parse_ws_pcdata_single = 0x0400;\n\n    // This flag determines if leading and trailing whitespace is to be removed from plain character data. This flag is off by default.\n    const unsigned int parse_trim_pcdata = 0x0800;\n\n    // This flag determines if plain character data that does not have a parent node is added to the DOM tree, and if an empty document\n    // is a valid document. This flag is off by default.\n    const unsigned int parse_fragment = 0x1000;\n\n    // The default parsing mode.\n    // Elements, PCDATA and CDATA sections are added to the DOM tree, character/reference entities are expanded,\n    // End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.\n    const unsigned int parse_default = parse_cdata | parse_escapes | parse_wconv_attribute | parse_eol;\n\n    // The full parsing mode.\n    // Nodes of all types are added to the DOM tree, character/reference entities are expanded,\n    // End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.\n    const unsigned int parse_full = parse_default | parse_pi | parse_comments | parse_declaration | parse_doctype;\n\n    // These flags determine the encoding of input data for XML document\n    enum xml_encoding\n    {\n        encoding_auto,        // Auto-detect input encoding using BOM or < / <? detection; use UTF8 if BOM is not found\n        encoding_utf8,        // UTF8 encoding\n        encoding_utf16_le,    // Little-endian UTF16\n        encoding_utf16_be,    // Big-endian UTF16\n        encoding_utf16,        // UTF16 with native endianness\n        encoding_utf32_le,    // Little-endian UTF32\n        encoding_utf32_be,    // Big-endian UTF32\n        encoding_utf32,        // UTF32 with native endianness\n        encoding_wchar,        // The same encoding wchar_t has (either UTF16 or UTF32)\n        encoding_latin1\n    };\n\n    // Formatting flags\n    \n    // Indent the nodes that are written to output stream with as many indentation strings as deep the node is in DOM tree. This flag is on by default.\n    const unsigned int format_indent = 0x01;\n    \n    // Write encoding-specific BOM to the output stream. This flag is off by default.\n    const unsigned int format_write_bom = 0x02;\n\n    // Use raw output mode (no indentation and no line breaks are written). This flag is off by default.\n    const unsigned int format_raw = 0x04;\n    \n    // Omit default XML declaration even if there is no declaration in the document. This flag is off by default.\n    const unsigned int format_no_declaration = 0x08;\n\n    // Don't escape attribute values and PCDATA contents. This flag is off by default.\n    const unsigned int format_no_escapes = 0x10;\n\n    // Open file using text mode in xml_document::save_file. This enables special character (i.e. new-line) conversions on some systems. This flag is off by default.\n    const unsigned int format_save_file_text = 0x20;\n\n    // The default set of formatting flags.\n    // Nodes are indented depending on their depth in DOM tree, a default declaration is output if document has none.\n    const unsigned int format_default = format_indent;\n        \n    // Forward declarations\n    struct xml_attribute_struct;\n    struct xml_node_struct;\n\n    class xml_node_iterator;\n    class xml_attribute_iterator;\n    class xml_named_node_iterator;\n\n    class xml_tree_walker;\n\n    struct xml_parse_result;\n\n    class xml_node;\n\n    class xml_text;\n    \n    #ifndef PUGIXML_NO_XPATH\n    class xpath_node;\n    class xpath_node_set;\n    class xpath_query;\n    class xpath_variable_set;\n    #endif\n\n    // Range-based for loop support\n    template <typename It> class xml_object_range\n    {\n    public:\n        typedef It const_iterator;\n        typedef It iterator;\n\n        xml_object_range(It b, It e): _begin(b), _end(e)\n        {\n        }\n\n        It begin() const { return _begin; }\n        It end() const { return _end; }\n\n    private:\n        It _begin, _end;\n    };\n\n    // Writer interface for node printing (see xml_node::print)\n    class PUGIXML_CLASS xml_writer\n    {\n    public:\n        virtual ~xml_writer() {}\n\n        // Write memory chunk into stream/file/whatever\n        virtual void write(const void* data, size_t size) = 0;\n    };\n\n    // xml_writer implementation for FILE*\n    class PUGIXML_CLASS xml_writer_file: public xml_writer\n    {\n    public:\n        // Construct writer from a FILE* object; void* is used to avoid header dependencies on stdio\n        xml_writer_file(void* file);\n\n        virtual void write(const void* data, size_t size);\n\n    private:\n        void* file;\n    };\n\n    #ifndef PUGIXML_NO_STL\n    // xml_writer implementation for streams\n    class PUGIXML_CLASS xml_writer_stream: public xml_writer\n    {\n    public:\n        // Construct writer from an output stream object\n        xml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream);\n        xml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream);\n\n        virtual void write(const void* data, size_t size);\n\n    private:\n        std::basic_ostream<char, std::char_traits<char> >* narrow_stream;\n        std::basic_ostream<wchar_t, std::char_traits<wchar_t> >* wide_stream;\n    };\n    #endif\n\n    // A light-weight handle for manipulating attributes in DOM tree\n    class PUGIXML_CLASS xml_attribute\n    {\n        friend class xml_attribute_iterator;\n        friend class xml_node;\n\n    private:\n        xml_attribute_struct* _attr;\n    \n        typedef void (*unspecified_bool_type)(xml_attribute***);\n\n    public:\n        // Default constructor. Constructs an empty attribute.\n        xml_attribute();\n        \n        // Constructs attribute from internal pointer\n        explicit xml_attribute(xml_attribute_struct* attr);\n\n        // Safe bool conversion operator\n        operator unspecified_bool_type() const;\n\n        // Borland C++ workaround\n        bool operator!() const;\n\n        // Comparison operators (compares wrapped attribute pointers)\n        bool operator==(const xml_attribute& r) const;\n        bool operator!=(const xml_attribute& r) const;\n        bool operator<(const xml_attribute& r) const;\n        bool operator>(const xml_attribute& r) const;\n        bool operator<=(const xml_attribute& r) const;\n        bool operator>=(const xml_attribute& r) const;\n\n        // Check if attribute is empty\n        bool empty() const;\n\n        // Get attribute name/value, or \"\" if attribute is empty\n        const char_t* name() const;\n        const char_t* value() const;\n\n        // Get attribute value, or the default value if attribute is empty\n        const char_t* as_string(const char_t* def = PUGIXML_TEXT(\"\")) const;\n\n        // Get attribute value as a number, or the default value if conversion did not succeed or attribute is empty\n        int as_int(int def = 0) const;\n        unsigned int as_uint(unsigned int def = 0) const;\n        double as_double(double def = 0) const;\n        float as_float(float def = 0) const;\n\n    #ifdef PUGIXML_HAS_LONG_LONG\n        long long as_llong(long long def = 0) const;\n        unsigned long long as_ullong(unsigned long long def = 0) const;\n    #endif\n\n        // Get attribute value as bool (returns true if first character is in '1tTyY' set), or the default value if attribute is empty\n        bool as_bool(bool def = false) const;\n\n        // Set attribute name/value (returns false if attribute is empty or there is not enough memory)\n        bool set_name(const char_t* rhs);\n        bool set_value(const char_t* rhs);\n\n        // Set attribute value with type conversion (numbers are converted to strings, boolean is converted to \"true\"/\"false\")\n        bool set_value(int rhs);\n        bool set_value(unsigned int rhs);\n        bool set_value(double rhs);\n        bool set_value(float rhs);\n        bool set_value(bool rhs);\n\n    #ifdef PUGIXML_HAS_LONG_LONG\n        bool set_value(long long rhs);\n        bool set_value(unsigned long long rhs);\n    #endif\n\n        // Set attribute value (equivalent to set_value without error checking)\n        xml_attribute& operator=(const char_t* rhs);\n        xml_attribute& operator=(int rhs);\n        xml_attribute& operator=(unsigned int rhs);\n        xml_attribute& operator=(double rhs);\n        xml_attribute& operator=(float rhs);\n        xml_attribute& operator=(bool rhs);\n\n    #ifdef PUGIXML_HAS_LONG_LONG\n        xml_attribute& operator=(long long rhs);\n        xml_attribute& operator=(unsigned long long rhs);\n    #endif\n\n        // Get next/previous attribute in the attribute list of the parent node\n        xml_attribute next_attribute() const;\n        xml_attribute previous_attribute() const;\n\n        // Get hash value (unique for handles to the same object)\n        size_t hash_value() const;\n\n        // Get internal pointer\n        xml_attribute_struct* internal_object() const;\n    };\n\n#ifdef __BORLANDC__\n    // Borland C++ workaround\n    bool PUGIXML_FUNCTION operator&&(const xml_attribute& lhs, bool rhs);\n    bool PUGIXML_FUNCTION operator||(const xml_attribute& lhs, bool rhs);\n#endif\n\n    // A light-weight handle for manipulating nodes in DOM tree\n    class PUGIXML_CLASS xml_node\n    {\n        friend class xml_attribute_iterator;\n        friend class xml_node_iterator;\n        friend class xml_named_node_iterator;\n\n    protected:\n        xml_node_struct* _root;\n\n        typedef void (*unspecified_bool_type)(xml_node***);\n\n    public:\n        // Default constructor. Constructs an empty node.\n        xml_node();\n\n        // Constructs node from internal pointer\n        explicit xml_node(xml_node_struct* p);\n\n        // Safe bool conversion operator\n        operator unspecified_bool_type() const;\n\n        // Borland C++ workaround\n        bool operator!() const;\n    \n        // Comparison operators (compares wrapped node pointers)\n        bool operator==(const xml_node& r) const;\n        bool operator!=(const xml_node& r) const;\n        bool operator<(const xml_node& r) const;\n        bool operator>(const xml_node& r) const;\n        bool operator<=(const xml_node& r) const;\n        bool operator>=(const xml_node& r) const;\n\n        // Check if node is empty.\n        bool empty() const;\n\n        // Get node type\n        xml_node_type type() const;\n\n        // Get node name, or \"\" if node is empty or it has no name\n        const char_t* name() const;\n\n        // Get node value, or \"\" if node is empty or it has no value\n        // Note: For <node>text</node> node.value() does not return \"text\"! Use child_value() or text() methods to access text inside nodes.\n        const char_t* value() const;\n    \n        // Get attribute list\n        xml_attribute first_attribute() const;\n        xml_attribute last_attribute() const;\n\n        // Get children list\n        xml_node first_child() const;\n        xml_node last_child() const;\n\n        // Get next/previous sibling in the children list of the parent node\n        xml_node next_sibling() const;\n        xml_node previous_sibling() const;\n        \n        // Get parent node\n        xml_node parent() const;\n\n        // Get root of DOM tree this node belongs to\n        xml_node root() const;\n\n        // Get text object for the current node\n        xml_text text() const;\n\n        // Get child, attribute or next/previous sibling with the specified name\n        xml_node child(const char_t* name) const;\n        xml_attribute attribute(const char_t* name) const;\n        xml_node next_sibling(const char_t* name) const;\n        xml_node previous_sibling(const char_t* name) const;\n\n        // Get child value of current node; that is, value of the first child node of type PCDATA/CDATA\n        const char_t* child_value() const;\n\n        // Get child value of child with specified name. Equivalent to child(name).child_value().\n        const char_t* child_value(const char_t* name) const;\n\n        // Set node name/value (returns false if node is empty, there is not enough memory, or node can not have name/value)\n        bool set_name(const char_t* rhs);\n        bool set_value(const char_t* rhs);\n        \n        // Add attribute with specified name. Returns added attribute, or empty attribute on errors.\n        xml_attribute append_attribute(const char_t* name);\n        xml_attribute prepend_attribute(const char_t* name);\n        xml_attribute insert_attribute_after(const char_t* name, const xml_attribute& attr);\n        xml_attribute insert_attribute_before(const char_t* name, const xml_attribute& attr);\n\n        // Add a copy of the specified attribute. Returns added attribute, or empty attribute on errors.\n        xml_attribute append_copy(const xml_attribute& proto);\n        xml_attribute prepend_copy(const xml_attribute& proto);\n        xml_attribute insert_copy_after(const xml_attribute& proto, const xml_attribute& attr);\n        xml_attribute insert_copy_before(const xml_attribute& proto, const xml_attribute& attr);\n\n        // Add child node with specified type. Returns added node, or empty node on errors.\n        xml_node append_child(xml_node_type type = node_element);\n        xml_node prepend_child(xml_node_type type = node_element);\n        xml_node insert_child_after(xml_node_type type, const xml_node& node);\n        xml_node insert_child_before(xml_node_type type, const xml_node& node);\n\n        // Add child element with specified name. Returns added node, or empty node on errors.\n        xml_node append_child(const char_t* name);\n        xml_node prepend_child(const char_t* name);\n        xml_node insert_child_after(const char_t* name, const xml_node& node);\n        xml_node insert_child_before(const char_t* name, const xml_node& node);\n\n        // Add a copy of the specified node as a child. Returns added node, or empty node on errors.\n        xml_node append_copy(const xml_node& proto);\n        xml_node prepend_copy(const xml_node& proto);\n        xml_node insert_copy_after(const xml_node& proto, const xml_node& node);\n        xml_node insert_copy_before(const xml_node& proto, const xml_node& node);\n\n        // Move the specified node to become a child of this node. Returns moved node, or empty node on errors.\n        xml_node append_move(const xml_node& moved);\n        xml_node prepend_move(const xml_node& moved);\n        xml_node insert_move_after(const xml_node& moved, const xml_node& node);\n        xml_node insert_move_before(const xml_node& moved, const xml_node& node);\n\n        // Remove specified attribute\n        bool remove_attribute(const xml_attribute& a);\n        bool remove_attribute(const char_t* name);\n\n        // Remove specified child\n        bool remove_child(const xml_node& n);\n        bool remove_child(const char_t* name);\n\n        // Parses buffer as an XML document fragment and appends all nodes as children of the current node.\n        // Copies/converts the buffer, so it may be deleted or changed after the function returns.\n        // Note: append_buffer allocates memory that has the lifetime of the owning document; removing the appended nodes does not immediately reclaim that memory.\n        xml_parse_result append_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n        // Find attribute using predicate. Returns first attribute for which predicate returned true.\n        template <typename Predicate> xml_attribute find_attribute(Predicate pred) const\n        {\n            if (!_root) return xml_attribute();\n            \n            for (xml_attribute attrib = first_attribute(); attrib; attrib = attrib.next_attribute())\n                if (pred(attrib))\n                    return attrib;\n        \n            return xml_attribute();\n        }\n\n        // Find child node using predicate. Returns first child for which predicate returned true.\n        template <typename Predicate> xml_node find_child(Predicate pred) const\n        {\n            if (!_root) return xml_node();\n    \n            for (xml_node node = first_child(); node; node = node.next_sibling())\n                if (pred(node))\n                    return node;\n        \n            return xml_node();\n        }\n\n        // Find node from subtree using predicate. Returns first node from subtree (depth-first), for which predicate returned true.\n        template <typename Predicate> xml_node find_node(Predicate pred) const\n        {\n            if (!_root) return xml_node();\n\n            xml_node cur = first_child();\n            \n            while (cur._root && cur._root != _root)\n            {\n                if (pred(cur)) return cur;\n\n                if (cur.first_child()) cur = cur.first_child();\n                else if (cur.next_sibling()) cur = cur.next_sibling();\n                else\n                {\n                    while (!cur.next_sibling() && cur._root != _root) cur = cur.parent();\n\n                    if (cur._root != _root) cur = cur.next_sibling();\n                }\n            }\n\n            return xml_node();\n        }\n\n        // Find child node by attribute name/value\n        xml_node find_child_by_attribute(const char_t* name, const char_t* attr_name, const char_t* attr_value) const;\n        xml_node find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const;\n\n    #ifndef PUGIXML_NO_STL\n        // Get the absolute node path from root as a text string.\n        string_t path(char_t delimiter = '/') const;\n    #endif\n\n        // Search for a node by path consisting of node names and . or .. elements.\n        xml_node first_element_by_path(const char_t* path, char_t delimiter = '/') const;\n\n        // Recursively traverse subtree with xml_tree_walker\n        bool traverse(xml_tree_walker& walker);\n    \n    #ifndef PUGIXML_NO_XPATH\n        // Select single node by evaluating XPath query. Returns first node from the resulting node set.\n        xpath_node select_node(const char_t* query, xpath_variable_set* variables = 0) const;\n        xpath_node select_node(const xpath_query& query) const;\n\n        // Select node set by evaluating XPath query\n        xpath_node_set select_nodes(const char_t* query, xpath_variable_set* variables = 0) const;\n        xpath_node_set select_nodes(const xpath_query& query) const;\n\n        // (deprecated: use select_node instead) Select single node by evaluating XPath query.\n        xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const;\n        xpath_node select_single_node(const xpath_query& query) const;\n\n    #endif\n        \n        // Print subtree using a writer object\n        void print(xml_writer& writer, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;\n\n    #ifndef PUGIXML_NO_STL\n        // Print subtree to stream\n        void print(std::basic_ostream<char, std::char_traits<char> >& os, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;\n        void print(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& os, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, unsigned int depth = 0) const;\n    #endif\n\n        // Child nodes iterators\n        typedef xml_node_iterator iterator;\n\n        iterator begin() const;\n        iterator end() const;\n\n        // Attribute iterators\n        typedef xml_attribute_iterator attribute_iterator;\n\n        attribute_iterator attributes_begin() const;\n        attribute_iterator attributes_end() const;\n\n        // Range-based for support\n        xml_object_range<xml_node_iterator> children() const;\n        xml_object_range<xml_named_node_iterator> children(const char_t* name) const;\n        xml_object_range<xml_attribute_iterator> attributes() const;\n\n        // Get node offset in parsed file/string (in char_t units) for debugging purposes\n        ptrdiff_t offset_debug() const;\n\n        // Get hash value (unique for handles to the same object)\n        size_t hash_value() const;\n\n        // Get internal pointer\n        xml_node_struct* internal_object() const;\n    };\n\n#ifdef __BORLANDC__\n    // Borland C++ workaround\n    bool PUGIXML_FUNCTION operator&&(const xml_node& lhs, bool rhs);\n    bool PUGIXML_FUNCTION operator||(const xml_node& lhs, bool rhs);\n#endif\n\n    // A helper for working with text inside PCDATA nodes\n    class PUGIXML_CLASS xml_text\n    {\n        friend class xml_node;\n\n        xml_node_struct* _root;\n\n        typedef void (*unspecified_bool_type)(xml_text***);\n\n        explicit xml_text(xml_node_struct* root);\n\n        xml_node_struct* _data_new();\n        xml_node_struct* _data() const;\n\n    public:\n        // Default constructor. Constructs an empty object.\n        xml_text();\n\n        // Safe bool conversion operator\n        operator unspecified_bool_type() const;\n\n        // Borland C++ workaround\n        bool operator!() const;\n\n        // Check if text object is empty\n        bool empty() const;\n\n        // Get text, or \"\" if object is empty\n        const char_t* get() const;\n\n        // Get text, or the default value if object is empty\n        const char_t* as_string(const char_t* def = PUGIXML_TEXT(\"\")) const;\n\n        // Get text as a number, or the default value if conversion did not succeed or object is empty\n        int as_int(int def = 0) const;\n        unsigned int as_uint(unsigned int def = 0) const;\n        double as_double(double def = 0) const;\n        float as_float(float def = 0) const;\n\n    #ifdef PUGIXML_HAS_LONG_LONG\n        long long as_llong(long long def = 0) const;\n        unsigned long long as_ullong(unsigned long long def = 0) const;\n    #endif\n\n        // Get text as bool (returns true if first character is in '1tTyY' set), or the default value if object is empty\n        bool as_bool(bool def = false) const;\n\n        // Set text (returns false if object is empty or there is not enough memory)\n        bool set(const char_t* rhs);\n\n        // Set text with type conversion (numbers are converted to strings, boolean is converted to \"true\"/\"false\")\n        bool set(int rhs);\n        bool set(unsigned int rhs);\n        bool set(double rhs);\n        bool set(float rhs);\n        bool set(bool rhs);\n\n    #ifdef PUGIXML_HAS_LONG_LONG\n        bool set(long long rhs);\n        bool set(unsigned long long rhs);\n    #endif\n\n        // Set text (equivalent to set without error checking)\n        xml_text& operator=(const char_t* rhs);\n        xml_text& operator=(int rhs);\n        xml_text& operator=(unsigned int rhs);\n        xml_text& operator=(double rhs);\n        xml_text& operator=(float rhs);\n        xml_text& operator=(bool rhs);\n\n    #ifdef PUGIXML_HAS_LONG_LONG\n        xml_text& operator=(long long rhs);\n        xml_text& operator=(unsigned long long rhs);\n    #endif\n\n        // Get the data node (node_pcdata or node_cdata) for this object\n        xml_node data() const;\n    };\n\n#ifdef __BORLANDC__\n    // Borland C++ workaround\n    bool PUGIXML_FUNCTION operator&&(const xml_text& lhs, bool rhs);\n    bool PUGIXML_FUNCTION operator||(const xml_text& lhs, bool rhs);\n#endif\n\n    // Child node iterator (a bidirectional iterator over a collection of xml_node)\n    class PUGIXML_CLASS xml_node_iterator\n    {\n        friend class xml_node;\n\n    private:\n        mutable xml_node _wrap;\n        xml_node _parent;\n\n        xml_node_iterator(xml_node_struct* ref, xml_node_struct* parent);\n\n    public:\n        // Iterator traits\n        typedef ptrdiff_t difference_type;\n        typedef xml_node value_type;\n        typedef xml_node* pointer;\n        typedef xml_node& reference;\n\n    #ifndef PUGIXML_NO_STL\n        typedef std::bidirectional_iterator_tag iterator_category;\n    #endif\n\n        // Default constructor\n        xml_node_iterator();\n\n        // Construct an iterator which points to the specified node\n        xml_node_iterator(const xml_node& node);\n\n        // Iterator operators\n        bool operator==(const xml_node_iterator& rhs) const;\n        bool operator!=(const xml_node_iterator& rhs) const;\n\n        xml_node& operator*() const;\n        xml_node* operator->() const;\n\n        const xml_node_iterator& operator++();\n        xml_node_iterator operator++(int);\n\n        const xml_node_iterator& operator--();\n        xml_node_iterator operator--(int);\n    };\n\n    // Attribute iterator (a bidirectional iterator over a collection of xml_attribute)\n    class PUGIXML_CLASS xml_attribute_iterator\n    {\n        friend class xml_node;\n\n    private:\n        mutable xml_attribute _wrap;\n        xml_node _parent;\n\n        xml_attribute_iterator(xml_attribute_struct* ref, xml_node_struct* parent);\n\n    public:\n        // Iterator traits\n        typedef ptrdiff_t difference_type;\n        typedef xml_attribute value_type;\n        typedef xml_attribute* pointer;\n        typedef xml_attribute& reference;\n\n    #ifndef PUGIXML_NO_STL\n        typedef std::bidirectional_iterator_tag iterator_category;\n    #endif\n\n        // Default constructor\n        xml_attribute_iterator();\n\n        // Construct an iterator which points to the specified attribute\n        xml_attribute_iterator(const xml_attribute& attr, const xml_node& parent);\n\n        // Iterator operators\n        bool operator==(const xml_attribute_iterator& rhs) const;\n        bool operator!=(const xml_attribute_iterator& rhs) const;\n\n        xml_attribute& operator*() const;\n        xml_attribute* operator->() const;\n\n        const xml_attribute_iterator& operator++();\n        xml_attribute_iterator operator++(int);\n\n        const xml_attribute_iterator& operator--();\n        xml_attribute_iterator operator--(int);\n    };\n\n    // Named node range helper\n    class PUGIXML_CLASS xml_named_node_iterator\n    {\n        friend class xml_node;\n\n    public:\n        // Iterator traits\n        typedef ptrdiff_t difference_type;\n        typedef xml_node value_type;\n        typedef xml_node* pointer;\n        typedef xml_node& reference;\n\n    #ifndef PUGIXML_NO_STL\n        typedef std::bidirectional_iterator_tag iterator_category;\n    #endif\n\n        // Default constructor\n        xml_named_node_iterator();\n\n        // Construct an iterator which points to the specified node\n        xml_named_node_iterator(const xml_node& node, const char_t* name);\n\n        // Iterator operators\n        bool operator==(const xml_named_node_iterator& rhs) const;\n        bool operator!=(const xml_named_node_iterator& rhs) const;\n\n        xml_node& operator*() const;\n        xml_node* operator->() const;\n\n        const xml_named_node_iterator& operator++();\n        xml_named_node_iterator operator++(int);\n\n        const xml_named_node_iterator& operator--();\n        xml_named_node_iterator operator--(int);\n\n    private:\n        mutable xml_node _wrap;\n        xml_node _parent;\n        const char_t* _name;\n\n        xml_named_node_iterator(xml_node_struct* ref, xml_node_struct* parent, const char_t* name);\n    };\n\n    // Abstract tree walker class (see xml_node::traverse)\n    class PUGIXML_CLASS xml_tree_walker\n    {\n        friend class xml_node;\n\n    private:\n        int _depth;\n    \n    protected:\n        // Get current traversal depth\n        int depth() const;\n    \n    public:\n        xml_tree_walker();\n        virtual ~xml_tree_walker();\n\n        // Callback that is called when traversal begins\n        virtual bool begin(xml_node& node);\n\n        // Callback that is called for each node traversed\n        virtual bool for_each(xml_node& node) = 0;\n\n        // Callback that is called when traversal ends\n        virtual bool end(xml_node& node);\n    };\n\n    // Parsing status, returned as part of xml_parse_result object\n    enum xml_parse_status\n    {\n        status_ok = 0,                // No error\n\n        status_file_not_found,        // File was not found during load_file()\n        status_io_error,            // Error reading from file/stream\n        status_out_of_memory,        // Could not allocate memory\n        status_internal_error,        // Internal error occurred\n\n        status_unrecognized_tag,    // Parser could not determine tag type\n\n        status_bad_pi,                // Parsing error occurred while parsing document declaration/processing instruction\n        status_bad_comment,            // Parsing error occurred while parsing comment\n        status_bad_cdata,            // Parsing error occurred while parsing CDATA section\n        status_bad_doctype,            // Parsing error occurred while parsing document type declaration\n        status_bad_pcdata,            // Parsing error occurred while parsing PCDATA section\n        status_bad_start_element,    // Parsing error occurred while parsing start element tag\n        status_bad_attribute,        // Parsing error occurred while parsing element attribute\n        status_bad_end_element,        // Parsing error occurred while parsing end element tag\n        status_end_element_mismatch,// There was a mismatch of start-end tags (closing tag had incorrect name, some tag was not closed or there was an excessive closing tag)\n\n        status_append_invalid_root,    // Unable to append nodes since root type is not node_element or node_document (exclusive to xml_node::append_buffer)\n\n        status_no_document_element    // Parsing resulted in a document without element nodes\n    };\n\n    // Parsing result\n    struct PUGIXML_CLASS xml_parse_result\n    {\n        // Parsing status (see xml_parse_status)\n        xml_parse_status status;\n\n        // Last parsed offset (in char_t units from start of input data)\n        ptrdiff_t offset;\n\n        // Source document encoding\n        xml_encoding encoding;\n\n        // Default constructor, initializes object to failed state\n        xml_parse_result();\n\n        // Cast to bool operator\n        operator bool() const;\n\n        // Get error description\n        const char* description() const;\n    };\n\n    // Document class (DOM tree root)\n    class PUGIXML_CLASS xml_document: public xml_node\n    {\n    private:\n        char_t* _buffer;\n\n        char _memory[192];\n        \n        // Non-copyable semantics\n        xml_document(const xml_document&);\n        const xml_document& operator=(const xml_document&);\n\n        void create();\n        void destroy();\n\n    public:\n        // Default constructor, makes empty document\n        xml_document();\n\n        // Destructor, invalidates all node/attribute handles to this document\n        ~xml_document();\n\n        // Removes all nodes, leaving the empty document\n        void reset();\n\n        // Removes all nodes, then copies the entire contents of the specified document\n        void reset(const xml_document& proto);\n\n    #ifndef PUGIXML_NO_STL\n        // Load document from stream.\n        xml_parse_result load(std::basic_istream<char, std::char_traits<char> >& stream, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n        xml_parse_result load(std::basic_istream<wchar_t, std::char_traits<wchar_t> >& stream, unsigned int options = parse_default);\n    #endif\n\n        // (deprecated: use load_string instead) Load document from zero-terminated string. No encoding conversions are applied.\n        xml_parse_result load(const char_t* contents, unsigned int options = parse_default);\n\n        // Load document from zero-terminated string. No encoding conversions are applied.\n        xml_parse_result load_string(const char_t* contents, unsigned int options = parse_default);\n\n        // Load document from file\n        xml_parse_result load_file(const char* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n        xml_parse_result load_file(const wchar_t* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n        // Load document from buffer. Copies/converts the buffer, so it may be deleted or changed after the function returns.\n        xml_parse_result load_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n        // Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data).\n        // You should ensure that buffer data will persist throughout the document's lifetime, and free the buffer memory manually once document is destroyed.\n        xml_parse_result load_buffer_inplace(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n        // Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data).\n        // You should allocate the buffer with pugixml allocation function; document will free the buffer when it is no longer needed (you can't use it anymore).\n        xml_parse_result load_buffer_inplace_own(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n        // Save XML document to writer (semantics is slightly different from xml_node::print, see documentation for details).\n        void save(xml_writer& writer, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;\n\n    #ifndef PUGIXML_NO_STL\n        // Save XML document to stream (semantics is slightly different from xml_node::print, see documentation for details).\n        void save(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;\n        void save(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default) const;\n    #endif\n\n        // Save XML to file\n        bool save_file(const char* path, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;\n        bool save_file(const wchar_t* path, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;\n\n        // Get document element\n        xml_node document_element() const;\n    };\n\n#ifndef PUGIXML_NO_XPATH\n    // XPath query return type\n    enum xpath_value_type\n    {\n        xpath_type_none,      // Unknown type (query failed to compile)\n        xpath_type_node_set,  // Node set (xpath_node_set)\n        xpath_type_number,      // Number\n        xpath_type_string,      // String\n        xpath_type_boolean      // Boolean\n    };\n\n    // XPath parsing result\n    struct PUGIXML_CLASS xpath_parse_result\n    {\n        // Error message (0 if no error)\n        const char* error;\n\n        // Last parsed offset (in char_t units from string start)\n        ptrdiff_t offset;\n\n        // Default constructor, initializes object to failed state\n        xpath_parse_result();\n\n        // Cast to bool operator\n        operator bool() const;\n\n        // Get error description\n        const char* description() const;\n    };\n\n    // A single XPath variable\n    class PUGIXML_CLASS xpath_variable\n    {\n        friend class xpath_variable_set;\n\n    protected:\n        xpath_value_type _type;\n        xpath_variable* _next;\n\n        xpath_variable();\n\n        // Non-copyable semantics\n        xpath_variable(const xpath_variable&);\n        xpath_variable& operator=(const xpath_variable&);\n        \n    public:\n        // Get variable name\n        const char_t* name() const;\n\n        // Get variable type\n        xpath_value_type type() const;\n\n        // Get variable value; no type conversion is performed, default value (false, NaN, empty string, empty node set) is returned on type mismatch error\n        bool get_boolean() const;\n        double get_number() const;\n        const char_t* get_string() const;\n        const xpath_node_set& get_node_set() const;\n\n        // Set variable value; no type conversion is performed, false is returned on type mismatch error\n        bool set(bool value);\n        bool set(double value);\n        bool set(const char_t* value);\n        bool set(const xpath_node_set& value);\n    };\n\n    // A set of XPath variables\n    class PUGIXML_CLASS xpath_variable_set\n    {\n    private:\n        xpath_variable* _data[64];\n\n        // Non-copyable semantics\n        xpath_variable_set(const xpath_variable_set&);\n        xpath_variable_set& operator=(const xpath_variable_set&);\n\n        xpath_variable* find(const char_t* name) const;\n\n    public:\n        // Default constructor/destructor\n        xpath_variable_set();\n        ~xpath_variable_set();\n\n        // Add a new variable or get the existing one, if the types match\n        xpath_variable* add(const char_t* name, xpath_value_type type);\n\n        // Set value of an existing variable; no type conversion is performed, false is returned if there is no such variable or if types mismatch\n        bool set(const char_t* name, bool value);\n        bool set(const char_t* name, double value);\n        bool set(const char_t* name, const char_t* value);\n        bool set(const char_t* name, const xpath_node_set& value);\n\n        // Get existing variable by name\n        xpath_variable* get(const char_t* name);\n        const xpath_variable* get(const char_t* name) const;\n    };\n\n    // A compiled XPath query object\n    class PUGIXML_CLASS xpath_query\n    {\n    private:\n        void* _impl;\n        xpath_parse_result _result;\n\n        typedef void (*unspecified_bool_type)(xpath_query***);\n\n        // Non-copyable semantics\n        xpath_query(const xpath_query&);\n        xpath_query& operator=(const xpath_query&);\n\n    public:\n        // Construct a compiled object from XPath expression.\n        // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on compilation errors.\n        explicit xpath_query(const char_t* query, xpath_variable_set* variables = 0);\n\n        // Destructor\n        ~xpath_query();\n\n        // Get query expression return type\n        xpath_value_type return_type() const;\n        \n        // Evaluate expression as boolean value in the specified context; performs type conversion if necessary.\n        // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.\n        bool evaluate_boolean(const xpath_node& n) const;\n        \n        // Evaluate expression as double value in the specified context; performs type conversion if necessary.\n        // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.\n        double evaluate_number(const xpath_node& n) const;\n        \n    #ifndef PUGIXML_NO_STL\n        // Evaluate expression as string value in the specified context; performs type conversion if necessary.\n        // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.\n        string_t evaluate_string(const xpath_node& n) const;\n    #endif\n        \n        // Evaluate expression as string value in the specified context; performs type conversion if necessary.\n        // At most capacity characters are written to the destination buffer, full result size is returned (includes terminating zero).\n        // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.\n        // If PUGIXML_NO_EXCEPTIONS is defined, returns empty  set instead.\n        size_t evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const;\n\n        // Evaluate expression as node set in the specified context.\n        // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on type mismatch and std::bad_alloc on out of memory errors.\n        // If PUGIXML_NO_EXCEPTIONS is defined, returns empty node set instead.\n        xpath_node_set evaluate_node_set(const xpath_node& n) const;\n\n        // Evaluate expression as node set in the specified context.\n        // Return first node in document order, or empty node if node set is empty.\n        // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on type mismatch and std::bad_alloc on out of memory errors.\n        // If PUGIXML_NO_EXCEPTIONS is defined, returns empty node instead.\n        xpath_node evaluate_node(const xpath_node& n) const;\n\n        // Get parsing result (used to get compilation errors in PUGIXML_NO_EXCEPTIONS mode)\n        const xpath_parse_result& result() const;\n\n        // Safe bool conversion operator\n        operator unspecified_bool_type() const;\n\n        // Borland C++ workaround\n        bool operator!() const;\n    };\n    \n    #ifndef PUGIXML_NO_EXCEPTIONS\n    // XPath exception class\n    class PUGIXML_CLASS xpath_exception: public std::exception\n    {\n    private:\n        xpath_parse_result _result;\n\n    public:\n        // Construct exception from parse result\n        explicit xpath_exception(const xpath_parse_result& result);\n\n        // Get error message\n        virtual const char* what() const throw();\n\n        // Get parse result\n        const xpath_parse_result& result() const;\n    };\n    #endif\n    \n    // XPath node class (either xml_node or xml_attribute)\n    class PUGIXML_CLASS xpath_node\n    {\n    private:\n        xml_node _node;\n        xml_attribute _attribute;\n    \n        typedef void (*unspecified_bool_type)(xpath_node***);\n\n    public:\n        // Default constructor; constructs empty XPath node\n        xpath_node();\n        \n        // Construct XPath node from XML node/attribute\n        xpath_node(const xml_node& node);\n        xpath_node(const xml_attribute& attribute, const xml_node& parent);\n\n        // Get node/attribute, if any\n        xml_node node() const;\n        xml_attribute attribute() const;\n        \n        // Get parent of contained node/attribute\n        xml_node parent() const;\n\n        // Safe bool conversion operator\n        operator unspecified_bool_type() const;\n        \n        // Borland C++ workaround\n        bool operator!() const;\n\n        // Comparison operators\n        bool operator==(const xpath_node& n) const;\n        bool operator!=(const xpath_node& n) const;\n    };\n\n#ifdef __BORLANDC__\n    // Borland C++ workaround\n    bool PUGIXML_FUNCTION operator&&(const xpath_node& lhs, bool rhs);\n    bool PUGIXML_FUNCTION operator||(const xpath_node& lhs, bool rhs);\n#endif\n\n    // A fixed-size collection of XPath nodes\n    class PUGIXML_CLASS xpath_node_set\n    {\n    public:\n        // Collection type\n        enum type_t\n        {\n            type_unsorted,            // Not ordered\n            type_sorted,            // Sorted by document order (ascending)\n            type_sorted_reverse        // Sorted by document order (descending)\n        };\n        \n        // Constant iterator type\n        typedef const xpath_node* const_iterator;\n\n        // We define non-constant iterator to be the same as constant iterator so that various generic algorithms (i.e. boost foreach) work\n        typedef const xpath_node* iterator;\n    \n        // Default constructor. Constructs empty set.\n        xpath_node_set();\n\n        // Constructs a set from iterator range; data is not checked for duplicates and is not sorted according to provided type, so be careful\n        xpath_node_set(const_iterator begin, const_iterator end, type_t type = type_unsorted);\n\n        // Destructor\n        ~xpath_node_set();\n        \n        // Copy constructor/assignment operator\n        xpath_node_set(const xpath_node_set& ns);\n        xpath_node_set& operator=(const xpath_node_set& ns);\n\n        // Get collection type\n        type_t type() const;\n        \n        // Get collection size\n        size_t size() const;\n\n        // Indexing operator\n        const xpath_node& operator[](size_t index) const;\n        \n        // Collection iterators\n        const_iterator begin() const;\n        const_iterator end() const;\n\n        // Sort the collection in ascending/descending order by document order\n        void sort(bool reverse = false);\n        \n        // Get first node in the collection by document order\n        xpath_node first() const;\n        \n        // Check if collection is empty\n        bool empty() const;\n    \n    private:\n        type_t _type;\n        \n        xpath_node _storage;\n        \n        xpath_node* _begin;\n        xpath_node* _end;\n\n        void _assign(const_iterator begin, const_iterator end);\n    };\n#endif\n\n#ifndef PUGIXML_NO_STL\n    // Convert wide string to UTF8\n    std::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const wchar_t* str);\n    std::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >& str);\n    \n    // Convert UTF8 to wide string\n    std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const char* str);\n    std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >& str);\n#endif\n\n    // Memory allocation function interface; returns pointer to allocated memory or NULL on failure\n    typedef void* (*allocation_function)(size_t size);\n    \n    // Memory deallocation function interface\n    typedef void (*deallocation_function)(void* ptr);\n\n    // Override default memory management functions. All subsequent allocations/deallocations will be performed via supplied functions.\n    void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate);\n    \n    // Get current memory management functions\n    allocation_function PUGIXML_FUNCTION get_memory_allocation_function();\n    deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function();\n}\n\n#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))\nnamespace std\n{\n    // Workarounds for (non-standard) iterator category detection for older versions (MSVC7/IC8 and earlier)\n    std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_node_iterator&);\n    std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_attribute_iterator&);\n    std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_named_node_iterator&);\n}\n#endif\n\n#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)\nnamespace std\n{\n    // Workarounds for (non-standard) iterator category detection\n    std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_node_iterator&);\n    std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_attribute_iterator&);\n    std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_named_node_iterator&);\n}\n#endif\n\n#endif\n\n// Make sure implementation is included in header-only mode\n// Use macro expansion in #include to work around QMake (QTBUG-11923)\n#if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE)\n#    define PUGIXML_SOURCE \"pugixml.cpp\"\n#    include PUGIXML_SOURCE\n#endif\n\n/*\n * Copyright (c) 2006-2015 Arseny Kapoulkine\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n"
  },
  {
    "path": "CompressToolsConfig.json",
    "content": "{\n    \"formatCommands\": [\n        {\n            \"Key\": \"Windows\",\n            \"Value\": [\n                {\n                    \"Key\": \"DXT5\",\n                    \"Value\": \"\\\"../../o2/AssetsBuildTool/Bin/nvcompress.exe\\\" -nomips -bc3 -alpha \\\"{input}\\\" \\\"{output}.dds\\\"\"\n                }\n            ]\n        },\n        {\n            \"Key\": \"Linux\",\n            \"Value\": [\n                {\n                    \"Key\": \"DXT5\",\n                    \"Value\": \"/home/vboxuser/Desktop/NVIDIA_Texture_Tools_Linux_x86_64_3.2.1/nvcompress -nomips -bc3 -alpha \\\"{input}\\\" \\\"{output}.dds\\\"\"\n                }\n            ]\n        }\n    ]\n}\n"
  },
  {
    "path": "Docs/en/Architecture/architecture.md",
    "content": "# Engine Architecture\n\nThe architecture is divided into three layers:\n\n- **High-level**: scene, actors, components, UI, editor  \n- **Low-level**: application wrapper, assets, rendering, animations, input, physics, scripting, sound  \n- **Utility**: reflection and serialization, memory management, file system, debugging and logging, math, delegates, properties, data containers, timers  \n\nThe entry point is the application wrapper (`o2::Application`), which provides a cross-platform API for managing the application. It has platform-specific implementations for Windows, macOS, Linux, iOS, Android, and Emscripten (WIP). Some low-level and utility subsystems (rendering, file system, timers) also have platform-specific implementations. All subsystems are implemented as singletons for convenient access.\n\nBefore the application starts, certain utility systems (such as memory management and reflection) are statically initialized. Then, at startup, an instance of the application is created, which initializes the remaining subsystems, and after that the main game loop begins.\n\nThe game loop has two phases: update and rendering. Everything takes place inside `o2::Application::ProcessFrame`, where the input system, scene, physics, rendering, etc. are updated.\n\nA developer can override the logic of `o2::Application` by inheriting a custom class and implementing the necessary functionality such as initialization, startup, rendering, updates, minimizing, and restoring the application.\n\n## Memory Management [(detailed documentation)](/Docs/en/Architecture/Utils/memory.md)\n\nThe engine uses its own smart pointers with an external reference counter, but each object internally holds a reference to that counter. This allows converting a “raw” pointer into a smart pointer if the object inherits from `RefCounterable`, which stores a pointer to the counter. A strong reference `Ref<>` is used to manage object lifetime, while `WeakRef<>` does not affect it. Objects for these smart pointers are created only through the `mmake<T>(...)` function, which allocates a single memory block for both the counter and the object, ensuring the counter is always placed before the object (cache-friendly). In debug mode, the engine has a GC that points out potential memory leaks and cyclic references but does not destroy objects itself. It is only used for analysis. The editor includes a tool that displays the memory tree and highlights issues. In addition, there are specialized reference types for serializing unique identifiers: `AssetRef` (for assets) and `LinkRef` (for actors and components).\n\n<details>\n<summary>Example</summary>\n\n```C++\nclass MyObject: public o2::RefCounterable \n{};\n\nRef<MyObject> myObjectSample = mmake<MyObject>(...);\nmyObjectSample->DoSmth();\n\nWeakRef<MyObject> myWeakObject = WeakRef(myObjectSample);\n\nMyObject* rawObject = myObjectSample.Get();\nRef<MyObject> myObjectSample2 = Ref(rawObject);\n```\n</details>\n\n## Reflection [(detailed documentation)](/Docs/en/Architecture/Utils/reflection.md)\n\nReflection is used to access type structures at runtime (for finding animatable values by a string path, calling callbacks by name, serialization/deserialization, automatic script bindings). It relies on type metadata generated by the **o2CodeTool** utility. This tool parses header files (`.h`), finds C++ classes, analyzes their structure (including inheritance), locates `IObject` descendants, and generates type metadata at the end of the `.h` file. This metadata is stored in a shared repository and built incrementally: the code generator caches parsed files and updates only those that have changed.\n\n<details>\n<summary>Example</summary>\n\n```C++\nstruct MyObject: public o2::IObject \n{\n    float value = 0.0f;\n\n    float DoSmth(float arg);\n\n    IOBJECT(MyObject);\n};\n\nMyObject myObjectSample;\nauto& type = TypeOf(MyObject);\n\nassert(myObjectSample.GetType() == type);\n\nfloat floatValue = type.GetField(\"value\").GetValue(&myObjectSample);\nfloat funcResult = type.Invoke<float>(\"DoSmth\", &myObjectSample, floatValue);\n```\n</details>\n\n## Serialization [(detailed documentation)](/Docs/en/Architecture/Utils/serialization.md)\n\nJSON and a binary format (in development) are used for internal data storage. The `o2::DataValue` structure (similar to RapidJSON or PugiXML) stores arrays, tables, or simple values (numbers, strings, booleans, etc.). A `DataValue` can be loaded from a file and then converted into a C++ object, or vice versa — an object can be serialized into `o2::DataValue` and saved.\n\nSerialization is performed via reflection, specifically the generated type metadata. A special object writes data to `o2::DataValue`. To be serialized, a class must implement the `o2::ISerializable` interface, and the fields to be serialized must be marked with the `@SERIALIZABLE` attribute. Only these types and fields are serialized, including primitives, containers, and smart pointers.\n\n<details>\n<summary>Example</summary>\n\n```C++\nclass Reel : public ISerializable\n{\npublic:\n\tLinkRef<Actor> imagesContainer; // @SERIALIZABLE\n\n\tVector<AssetRef<ImageAsset>> images;        // @SERIALIZABLE\n\tVector<AssetRef<ImageAsset>> blurredImages; // @SERIALIZABLE\n\n\tfloat imagesDistance = 100.0f; // @SERIALIZABLE\n\n\tbool disableExtendedSymbols = false; // @SERIALIZABLE\n\n\tSERIALIZABLE(Reel);\n};\n```\n</details>\n\n## Properties [(detailed documentation)](/Docs/en/Architecture/Utils/properties.md)\n\nProperties allow declaring variables that use getter and setter “under the hood,” making the code more concise. Instead of `object.SetValue(object.GetValue() + 200.0f);`, you can write `object.value += 200.0f;`, similar to properties in C#.\n\nTo declare properties in a class, first use the `PROPERTIES(class_name)` macro. Then for each property, use the `PROPERTY(type, name, setter, getter)` macro, where `setter` and `getter` are class functions handling read and write operations.\n\n<details>\n<summary>Example</summary>\n\n```C++\nclass MyObject\n{\npublic:\n\tPROPERTIES(MyObject);\n    PROPERTY(float, value, SetValue, GetValue);\n\npublic:\n    void SetValue(float value);\n    float GetValue() const;\n};\n\nMyObject object;\n\nobject.value = object.value + 100.0f; // object.SetValue(object.GetValue() + 100.0f);\n```\n</details>\n\n## Delegates [(detailed documentation)](/Docs/en/Architecture/Utils/function.md)\n\n`o2::Function<>` is an analog of `std::function<>` with extended functionality that allows storing multiple delegates simultaneously. This approach simplifies subscription and event systems. For example, in a button class, you can declare `o2::Function<void()> onClick;` and add several listeners to it.\n\n<details>\n<summary>Example</summary>\n\n```C++\nclass MyButton\n{\npublic:\n\tFunction<void()> onClicked;\n\n    ...\n};\n\nMyButton button;\nbutton.onClicked += []() { ... };\nbutton.onClicked += []() { ... };\nbutton.onClicked += []() { ... };\n```\n</details>\n\n## Application Wrapper [(detailed documentation)](/Docs/en/Architecture/LowLevel/application.md)\n\nAs mentioned above, this is the entry point and the main system of the engine. During initialization, it sets up the other subsystems. Then the game loop begins, processed in the `ProcessFrame()` function, where the scene, input, and all other subsystems are updated, and a frame is rendered. The application wrapper also handles system messages (activation, deactivation, etc.).\n\nA user can hook into any of these points by overriding special functions in their custom application class.\n\n<details>\n<summary>Example</summary>\n\n```C++\nclass MyApplication: public o2::Application\n{\nprivate:\n    void OnUpdate(float dt) override;\n    void OnDraw() override;\n    void OnActivated() override;\n    void OnDeactivated() override;\n    void OnStarted() override;\n    void OnClosing() override;\n    void OnResizing() override;\n};\n```\n</details>\n\n## Assets [(detailed documentation)](/Docs/en/Architecture/LowLevel/assets.md)\n\nThe engine treats various resources (textures, sounds, text configs, etc.) as assets provided in raw form. For faster loading at runtime, they are pre-built: textures are packed into atlases and compressed, sounds are converted, and configs are turned into binary form.\n\nEach asset has a unique `id` stored in a `.meta` file alongside the asset itself. That file may also contain compression info and other data not suitable for the original file. In addition, a tree of assets is built for efficient metadata loading.\n\nAssets are processed by the **AssetsBuilder** tool, which detects changed resources and updates their built versions. It runs before the editor starts, during its operation, and when building the final release.\n\nThe engine provides the `o2::Assets` subsystem (a singleton) accessed from anywhere via the `o2Assets` macro. It loads the asset tree on startup and offers an easy interface to retrieve assets. Smart pointers `o2::AssetRef<>` are used; they serialize, cache the loading process, and automatically unload the asset when no references remain.\n\nAssets can be individual files or “embedded” (instance). In the latter case, the asset is stored directly within a scene or a prefab.\n\n<details>\n<summary>Example</summary>\n\n```C++\nAssetRef<ImageAsset> image = o2Assets.GetAssetRef(id);\nsprite.Load(image);\n```\n</details>\n\n## Rendering [(detailed documentation)](/Docs/en/Architecture/LowLevel/render.md)\n\nThe rendering subsystem is available via the `o2Render` singleton. It can draw triangle meshes with materials (shaders, textures, parameters (WIP)) and uses batching: meshes with identical materials are combined and submitted to the render in a single call. It supports scissor test, stencil masks, and render targets.\n\nAbove the mesh rendering, there are abstractions: sprites, text, skinned meshes, particle effects, and Spine animations. They all implement `o2::IDrawable`; objects with rectangular dimensions also implement `o2::IRectDrawable`. The parameters of `o2::IRectDrawable` include position, size, rotation, scale, skew, or setting the transform via `o2::Basis`.\n\n- **Sprites** support display modes: normal, 9-slice, tiled, progress filled. They have color, transparency, and are loaded from textures.\n- **Text** works with both bitmap and vector fonts (via FreeType). CPU-based effects (shadow, outline, gradient, etc.) are available, along with formatting and alignment settings.\n- **Particle systems** are single emitters with a set of effects. Rendering can be a regular sprite or a frame-by-frame animation. Emission parameters are adjustable, and in the editor, the effect can be rewound backward.\n\nRendering also includes camera support (`o2::Camera`), which sets the viewport in the engine’s logical rendering coordinates.\n\n<details>\n<summary>Example</summary>\n\n```C++\nAssetRef<ImageAsset> imageAsset = o2Assets.GetAssetRef(id);\nauto sprite = mmake<Sprite>(imageAsset);\n...\nsprite->position = Vec2F(10, 10);\nsprite->mode = SpriteMode::FixedAspect;\nsprite->transparency = 0.5f;\n...\nsprite->Draw();\n```\n</details>\n\n## Animations [(detailed documentation)](/Docs/en/Architecture/LowLevel/animations.md)\n\nThe engine has a built-in animation system and Spine integration. Spine animations are loaded from an asset, can be played, mixed, and have skins switched.\n\nThe built-in format is deeply integrated into the engine and can animate any field, including custom ones. The basic unit is **`o2::AnimationClip`**, which can be saved as an asset (`o2::AnimationAsset`). Clips consist of tracks, each animating one field identified by a string path (e.g., `\"myStructure/myFolder/myParameter\"`). Tracks contain key frames with a specific value and time.\n\nTo play a clip, use **`o2::AnimationPlayer`**: it takes an animation clip and a target object. By string paths, reflection finds the required fields. When the time updates, the player interpolates between key frames in the tracks, ensuring smooth animation at any framerate.\n\nOn the scene, there is an **`o2::AnimationComponent`** that can play multiple animations on an actor simultaneously and blend them by weights. It stores a list of states (clips) and switches among them.\n\nAbove it, there is **`o2::AnimationStateGraphComponent`** — a state machine for animations. It includes nodes (states) with several clips and transitions defining start time, duration, and easing functions. A developer specifies a target node, and the graph automatically finds a route, applying transitions and blending. This system works with both the built-in and Spine animations.\n\nThe editor has a special built-in animation editor. [More details](/Docs/en/Editor/Animation/animation.md).  \nAnimations can also be constructed from code via the **`o2::Animate`** interface.\n\n<details>\n<summary>Example</summary>\n\n```C++\nsample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n```\n</details>\n\n## Input Handling [(detailed documentation)](/Docs/en/Architecture/LowLevel/input.md)\n\nThe input system is accessed through the singleton `o2Events`. It provides basic handlers for system events (key presses, cursor position, etc.) and a higher-level logic (clicks, multi-touch). The high-level layer takes rendering scissor and element overlap into account.\n\nFor handling touch/click (hover, pressed, etc.), inherit from `o2::CursorAreaEventsListener` and implement the required methods (pressed, released, enter, exit, etc.). Two methods are mandatory:\n1. Checking if a click is valid (for example, whether the cursor is inside the object bounds).\n2. `OnDraw` — called during rendering to record the object’s order and current scissor state.\n\nAfterwards, the input system automatically determines which object was clicked and calls the appropriate callbacks.\n\n<details>\n<summary>Example</summary>\n\n```C++\nclass MyInteractiveObject: public o2::CursorAreaEventsListener\n{\npublic:\n    bool IsUnderPoint(const Vec2F& point) override { return _rectangle.IsInside(point); }\n\n    void Draw()\n    {\n        sprite.Draw();\n\n        o2::CursorAreaEventsListener::OnDrawn();\n    }\n\nprivate:\n    void OnCursorPressed(const Input::Cursor& cursor) override { o2Debug.Log(\"Pressed!\"); }\n    void OnCursorReleased(const Input::Cursor& cursor) override { o2Debug.Log(\"Released!\"); }\n};\n...\nauto object = mmake<MyInteractiveObject>();\n...\nobject.Draw();\n```\n</details>\n\n## Scripting [(detailed documentation)](/Docs/en/Architecture/LowLevel/scripting.md)\n\nThe engine uses **JerryScript** — a compact and performant JavaScript runtime, which also allows using TypeScript if you want static typing.\n\nOn top of JerryScript, the engine has a wrapper accessible via the `o2Scripts` singleton and a JavaScript-value wrapper `o2::ScriptValue`.  \n- `o2Scripts` can load and run scripts from files or strings and work with the global namespace via `o2::ScriptValue`.  \n- `o2::ScriptValue` represents any JS variable (number, string, boolean, function, array, or object) and provides a convenient interface for handling these types, classes, and prototypes.\n\nC++ type binding is done through reflection: at application startup, the engine registers the required classes in the global JavaScript runtime, using the generated type metadata.\n\n<details>\n<summary>Example</summary>\n\n```C++\no2Scripts.GetGlobal().SetProperty(\"myValue\", 256);\no2Scripts.Eval(\"print('myValue is ' + myValue)\");\n...\no2Scripts.Eval(\"let myObject = new MyObject\");\nauto myJSObject = o2Scripts.GetGlobal().GetProperty(\"myObject\");\nauto myProperty = myJSObject[\"propName\"];\nif (myProperty.GetValueType() == o2::ScriptValue::ValueType::Number)\n{\n    float myPropertyValue = myProperty.ToNumber();\n    ...\n}\n```\n</details>\n\n## Physics [(detailed documentation)](/Docs/en/Architecture/LowLevel/physics.md)\n\nThe engine has Box2D integrated. When the application starts, it initializes the physics world, into which objects can be added via scene primitives. You can configure how the engine’s coordinate units scale to the physics world, solver precision, and collision between layers.\n\nThe base scene primitive is `o2::RigidBody`. It contains the physical parameters of the body and integrates it into the physics world. Colliders (`o2::ICollider`) such as `BoxCollider` or `CircleCollider` can be attached to it.\n\nAll physics configuration and management happens through the scene and editor.\n\n## Sound (TBD)\n\nNot yet implemented in the engine.\n\n## Scene and Actors [(detailed documentation)](/Docs/en/Architecture/HighLevel/scene.md)\n\nAbove all subsystems is the scene system, accessed via the `o2Scene` singleton. It stores a list of actors (`o2::Actor`), which have components defining logic and rendering. Actors can belong to different types, such as `o2::Widget` (UI), `o2::RigidBody` (physics), or any user-defined class.\n\nA scene can be saved and loaded from an asset, including incremental loading. Logically, there is only one scene instance (at least for now). The scene updates and renders itself automatically.\n\n### Actors\n\nEach actor (`o2::Actor`) has a transform, visibility and activity flags, plus child actors and components. Child actors inherit their parent’s transform and flags. If a parent actor moves, all its children move accordingly. The same applies to enabling or disabling them.\n\nThe engine provides basic actor types like sprites, animations, cameras, particles, UI, etc. A developer can inherit custom classes from `o2::Actor` and override the needed methods (`OnStart`, `OnEnabled/Disabled`, `OnDraw`, `OnUpdate`, etc.). This allows actors to represent specific entities (for instance, `o2::Button` inherits from `o2::Widget`, which inherits from `o2::Actor`).\n\n### Components\n\nActors can contain a list of components that define their logic and rendering. To create a custom component, inherit from `o2::Component` and implement the required interface (`OnStart`, `OnEnabled/Disabled`, `OnDraw`, `OnUpdate`, etc.). This lets you compose logic: a single base actor can have multiple components.\n\n### Prototypes\n\nFor faster and simpler development, the engine supports prototypes (similar to Unity’s prefabs). An actor can be saved as an asset and become a prototype, which can be inherited by other prototypes that modify the base. From one prototype, you can create many copies on the scene and then edit them.\n\nThis is especially useful for UI. You might have a base button prototype with specific graphics and logic, then derive several variations (green, blue, red). If you need to change the blue button’s color to purple, you only edit the prototype. Likewise, changes to the base button prototype propagate to all its inheritors.\n\n### Scene Rendering\n\nScene rendering uses cameras and layers:\n- The scene is divided into named layers, each with a specified rendering order.\n- Cameras (at least one) are placed in the scene, each with its own transform and a list of layers to render.\n\nActors are assigned to layers and have a numerical priority defined in the actor itself. It can also inherit the layer and priority from its parent, so children render immediately after the parent and share its layer/priority. If inheritance is disabled, they render on their own layer based on the sorting order. By default, the scene is drawn according to the hierarchy, but you can manually adjust this using priorities and layers.\n\n### Editor\n\nThere’s a built-in editor for editing scenes, prototypes, components, and assets. It includes various specialized tools (asset settings, log, parameters window, game window, scene hierarchy, scene editor, animation editor). [More on the editor](/Docs/en/Editor/editor.md).\n\n## UI [(detailed documentation)](/Docs/en/Architecture/HighLevel/ui.md)\n\nUI in the engine is part of the scene and follows its paradigm. The base UI element is `o2::Widget` (inheriting from `o2::Actor`), which overrides the actor logic:\n\n- **Adaptive Layout**  \n  The transform includes anchors for flexible positioning relative to the parent, enabling adaptive UI layout.  \n  <img src=\"HighLevel/ui anchors.gif\" width=\"30%\">\n\n- **Internal Widgets**  \n  A widget can contain child controls that aren’t “full-fledged children” in the scene hierarchy, which is convenient for complex UI elements (e.g., a window with a header and a close button).\n\n- **Layer System**  \n  A widget holds layers (`o2::WidgetLayer`) that can have their own graphics (sprite, text, etc.), transform with anchors, nested layers, and names. Layers are a simplified analog of actors, easing rendering and preventing the scene hierarchy from becoming overloaded.\n\n- **Animation States**  \n  A widget can have multiple named states that can be turned on or off independently. Switching a state triggers an animation defined in code or in the editor (see the animation section).\n\n### Layout Containers\n\nFor adaptive interfaces, there are special container widgets (`o2::HorizontalLayout`, `o2::VerticalLayout`, `o2::GridLayout`). They arrange their child elements according to the given rules, stretching/shrinking them or adjusting to their sizes.\n\n<img src=\"HighLevel/layouts.gif\" width=\"30%\">\n\n### Built-in UI Widgets\n\nThe engine provides many basic UI controls: images, text, buttons, checkboxes, text fields, progress bars, scrollers, lists (regular or drop-down), trees, popups, windows, and so on.\n\nSince the UI subsystem extends the scene system, UI elements can coexist with any game objects. The entire o2 editor is built on this UI system ([details in the Habr article](https://habr.com/ru/articles/521306/))."
  },
  {
    "path": "Docs/en/main.md",
    "content": "## Motivation\n\nThe engine is designed as a professional tool for developing 2D mobile games. Its design is guided by two key objectives: development speed and performance.\n\nDevelopment speed is ensured by an intuitive API, an editor, and a scripting language.\n- A user-friendly API means it covers all the developer's use cases, is easy to understand, and has minimal hidden pitfalls. Unity3D's internal API served as a reference in many aspects.  \n- The editor provides all the essential tools for game development: scene, assets, parameters, animations, particles. It is convenient and follows the modern standards of engines with editors, such as Unity3D, Unreal Engine, Unigine, etc.  \n- The scripting language simplifies writing game logic and makes the engine's API even more accessible. o2 uses JavaScript and TypeScript for scripting, as these are popular languages, especially among web developers, who have very few available game engines.\n\nPerformance is achieved by implementing the engine in C++ and allowing game logic to be written in C++. The engine also has different abstraction layers, so for maximum performance, the developer can work directly with the low-level subsystems like rendering, resource loading, etc.\n\nCombining all these approaches results in efficient game development, rapid prototyping, and high technical quality.\n\n## General Engine Concept\n\nThe engine’s core concept is a scene with a component-based approach. The scene is a tree structure of actors with specific types. Each actor has a transform that depends on its parent, as well as a set of components defining behavior and rendering. Rendering is divided into layers; actors can be assigned to specific layers or inherit the rendering order from their parent.\n\nYou configure the scene and its assets in the editor. Actor, component, and game code can be written in C++ or in a scripting language (JS/TS).\n\nThe scene subsystem is high-level and is built atop the low-level subsystems: assets, application, rendering, animation, physics, scripting, input. When working at the high level, you can still use the low-level layer directly for more optimizations. For instance, if you need to display a large number of sprites, instead of creating multiple heavy actors, you can implement a single actor that draws many sprites directly via the low-level renderer.\n\nThe low-level layer relies on utilities that provide support for all subsystems: memory management, reflection, serialization, properties, math, file system, debugging, and logging.\n\n## The Concept of Integrating o2 Into Other Engines\n\no2 can be used not only as a standalone engine but also as an embedded one. Essentially, it integrates into the game loop of another engine, hooks into its rendering and input processing, and interacts with it according to clearly defined boundaries.\n\nThere are two approaches: **dominant** and **subordinate**. In the first approach, o2 wraps the other engine inside itself, controlling its input handling, frame updates, and rendering. This is the preferred way. In the second approach, everything is reversed: o2 is embedded into the other engine’s game loop.\n\nTypically, other engines also have a scene hierarchy. o2 can work with it if you inherit the base object of the other engine's hierarchy from a certain o2 interface. This allows o2’s editor to display the other engine’s hierarchy and lets you edit object parameters, which become available through reflection.\n\nIt is important that the other engine uses the same render API as o2. In extreme cases, it’s possible to implement a custom rendering subsystem for the specific implementation in the other engine, since essentially all that’s needed is the ability to draw textured, shaded triangle meshes. Usually, other engines have this functionality in a separate API.\n\n## Documentation\n\n- [Architecture](/Docs/en/Architecture/architecture.md)  \n- [Editor](/Docs/en/Editor/editor.md)  \n- [Video tutorial series on setting up a test slot-game scene](https://drive.google.com/drive/folders/1m-lgSaM2hYQxbKnIwymDfMCe3SzjKrP1?usp=sharing)  "
  },
  {
    "path": "Docs/ru/Architecture/HighLevel/components.md",
    "content": "## Базовые компоненты\nВ движке есть базовый набор компонент:\n\n- `o2::ImageComponent`  \nОбертка над `o2::Sprite` из рендера, умеет все то же самое\n\n- `o2::MeshComponent`  \nОбертка над движковым `o2::Mesh`, но с добавлением функционала в редакторе по построению этого меша\n\n- `o2::SkinnedMeshComponent`  \nМеш, который может скинниться. Spine-подобные анимации могут бысть сделаны с помощью него\n\n- `o2::AnimationComponent`  \nКомпонент анимаций. В нем задается список анимаций, которые могут изменять актор, компоненты и все что есть ниже по иерархии\n\n- `o2::ParticlesEmitterComponent`  \nОбертка над партикл-эмиттером из рендера. Умеет все то же самое\n\n- `o2::ScissorClippingComponent`  \nЗадает отсечение дочерних объектов по своей трансформации. Отсечение работает только на те сущности, которые унаследовали от него приоритет отрисовки\n\n- `o2::ScriptableComponent`  \nКомпонент в котором можно задать поведение через JS-скрипт"
  },
  {
    "path": "Docs/ru/Architecture/HighLevel/scene.md",
    "content": "## Сцена\nСцена является еще одной подсистемой движка, в которой используются низкоуровенвые системы.\n\nСцена состоит из иерархии акторов и слоев. Она может быть загружена и выгружена, может быть изменена в рантайме.\n\n### Иерархия\nУ каждого актора могут быть акторы-дети. У них в свою очередь тоже могут быть дети. В сцене хранится список \"рутовых\" акторов. Таким образом получается иерархия акторов на сцене.\n\nАкторы могут быть разных типов, наследуясь от базового `o2::Actor`. \n\nНа акторах могут быть компоненты. Компоненты определяют логику актора, могут быть отрисовываемыми.\n\nЕсли компонент отрисовывается, он принажделит какому-то слою и имеет приоритет отрисовки.\n\n### Слои\nСцена разделена на слои. Эти слои задают порядок отрисовки сцены. Порядок слоев задается разработчиком, список слоев и их имена тоже.\n\nРисуемые сущности распределяются по слоям, одна сущность может быть только на одном слое.\n\nВнутри слоя сущности сортируются по приоритетам.\n\n### Актор, o2::Actor\nЭто базовый элемент сцены. У него есть имя, трансформация, список детей и список компонент. Акторы могут быть разных типов, унаследованных от `o2::Actor`.\n\nУ акторов есть цикл жизни:\n- `constructor` - конструктор актора\n- `deserialization` - десериализация данных актора. ПРоисходит автоматически\n- `OnDeserialized` - коллбек на завершение десериализации\n- `OnAddToScene`/`RemovedFromScene` - добавление/удаление из сцены\n- `OnStart` - старт актора, перед первым апдейтом\n- `OnEnabled`/`Disabled` - включение/выключение актора\n- `Update` - обновление актора и компонент\n- `OnTransformUpdated`/`Changed` - обновление и изменение трансформации\n\n### Компонент, o2::Component\nВсе компоненты наследуются от этого общего интерфейса. Внутри компоненты задается какая-то логика, которая может взаимодействовать с другими частями сцены и ассетами через ссылки.\n\nУ компонентов, как и у акторов, тоже есть такие же ивенты и цикл жизни: конструктор, десериализация, старт, обновление и тп.\n\n### Рисуемый компонент, o2::DrawableComponent\nЭтот интерфейс определяет что компонент может что-то рисовать на сцене. В нем определяется слой и индекс сортировки. Чем он больше, тем позднее он отрисуется в выбранном слое.\n\nИндекс сортировки не обязателен, он может быть унаследован от родителя. В таком случае родитель при отрисовки себя нарисует и эту сущность. Если таких сущностей несколько у родителя, он нарисует их в порядке расположения в иерархии.\n\nЕсли родителя нет, то объект помещается в специальный контейнер слоя с приоритетом 0, в котором подобные сущности рисуются так же в порядке расположения в иерархии.\n\nТаким образом, если задать отрицательный индекс, то компонент будет отрисован ранее других компонентов, у которых индекс не задан, тк он будет нулевым.\n\nПо умолчанию индекс сортировки не задан и используется родительский. То есть сцена рисуется в порядке обхода иерархии.\n\n### Прототипы\nДля ускорения создания сцены и удобства работы в сцене можно использовать прототипы. Это такие предзаготовленные куски иерархии сцены, фактически актор с его детьми, который затем можно \"инстанцировать\" на сцену, т.е. создать его копию.\n\nПри этом, если в редакторе на сцене что-то поменять в одном из инстансов прототипа, то можно это изменение применить к базовому прототипу, и все остальные инстансы получат такое же изменение. Но это работает только в редакторе.\n\nПрототипы можно создавать от прототипов, изменяя какие-либо его параметры. Тогда на конечном инстансе унаследованного прототипа будут отображаться изменения как базового прототипа, так и унаследованного\n\n### Ссылки\nДля связа компонет, акторов и ассетов между собой используются ссылки. Они ссылаются на сущности по уникальным идентификаторам, происходит это автоматически. Это нужно чтобы не искать акторы и их компоненты по пути в коде. Путь может быть нарушен при изменении иерархии, и тогда придется переписывать код. В случае ссылок изменение иерархии не приведет к нарушению ссылок, все будет работать.\n\nСсылаться можно на другие акторы через `o2::ActorRef` или `o2::Ref<ActorType>`. Точно так же на другие компоненты через `o2::ComponentRef` и `o2::Ref<ComponentType>`. На ассеты можно ссылаться через подобные же `o2::AssetRef` `o2::Ref<AssetType>`.\n\n### Камеры, o2::CameraActor\nЭто специальные акторы, которые задают отрисовку сцены. Без камеры ничего нарисовано не будет, должна быть хотя бы одна на сцене.\n\nВ камере определяется список слоев, которые она рисует. Трансформация камеры задает область видимости в сцене. Работает аналогично камере рендера, своего рода \"окно\" в пространство сцены."
  },
  {
    "path": "Docs/ru/Architecture/HighLevel/ui.md",
    "content": "## Система интерфейсов\nДля работы с пользовательским интерфейсом есть набор специальных акторов, которые могут рисовать интерфейс и обрабатывать клики по нему.\n\nВсе работает в рамках сцены, через наследника от `o2::Actor` - `o2::Widget`. Все остальные типы интерфейсных акторов наследуются от него.\n\n### o2::Widget\nНаследует все свойства актора: имя, трансформацию, компоненты, прототипирование. При этом добавляет и новые свойства:\n\n#### layout\nЭто расширение transform. которое добавляет адаптивность верстки. В нем задаются относительные координаты от родительского transform, к которым потом плюсуются числовые смещения. С помощью относительных координат можно задать выравнивание по какому-то краю или углу, а так же задать процентное отношение занимаемой площади по горизонтали и вертикали. Числовые смещения позволяют задать область более точно, или для явного указания размера\n\n#### Слои\nДля отрисовки графики UI используются слои, которые являются простой версией актора. Слои так же выстроены в структуру, для каждого слоя задается его layout, а так же графический элемент. Графический элемент - это любой наследник от `o2::IRectDrawable`: Sprite, Text, etc\n\nСлои могут отключаться и у них есть настраиваемая прозрачность, которая влияет и на дочерние слои\n\n#### Состояния\nЭто элементарная анимационная стейт-машина, где задается список состояний, и каждое состояние может быть включено либо выключено. Переход состояния из вкл в выкл и наоборот происходит через анимацию, которая задается через анимационный клип.\n\n#### Прозрачность и видимость\nПрозрачность задается на виджете и распространяется на его слои, а так же на все дочерние виджеты и так далее.\n\nВидимость управляется через интерфейс `SetEnabled()` из актора и может быть анимировано. Если задано специальное состояние с именем 'visible', то оно будет использоваться для переключения видимости\n\n#### Фокусировка\nНекоторые виджеты могут принимать на себя фокус, например кнопки, поля ввода и тд. Тогда они становятся первыми в очереди на обработку хоткеев.\n\n#### Внутренние дети\nИногда, элементы интерфейса бывают довольно сложными и одними слоями не обойтись. Например, рассмотрим окно. Гораздо удобнее когда окно представлено единым объектом, а все его дети - это его контент. Однако, на самом окне есть заголовок, кнопка закрытия. \n\nВ виджетах есть возможность сделать такие элементы внутренними, то есть они как бы являются детьми, но при этом при попытке перечислить детей - о них ничего не будет известно.\n\n## Типы встроенных виджетов\n- `Grid/Horizontal/VerticalLayout` - динамическое расположение дочерних элементов по сетке/по горизонтали/по вертикали\n- `Button` - кнопка\n- `EditBox` - поле ввода текста\n- `Image` - спрайт\n- `Label` - текст\n- `Toggle` - флаг, чекбокс\n- `Vertical/HorizontalScrillBar` - вертикальный/горизонтальный скролл-бар\n- `Vertical/HorizontalProgressBar` - прогресс-бары\n- `List/LongList` - списки\n- `DropDown` - выпадающий список\n- `Tree` - дерево\n- `ContextMenu` - контекстное меню"
  },
  {
    "path": "Docs/ru/Architecture/LowLevel/animations.md",
    "content": "## Анимации\nВсе анимации в движке наследуются от общего интерфейса `o2::IAnimation`. Он задает интерфейс сущности, которая может обновиться, у нее есть старт, длительность, окончание и текущее время. \n\nОт него наследуется основной класс анимации `o2::AnimationPlayer`. В нем задается target анимации - объект, к которому применяется анимация, и анимационный клип.\n\n### Анимационный клип, o2::AnimationClip\nАнимационный клип содержит в себе список треков с ключами. Каждый трек привязывается к определенному параметру таргета, через рефлексию. Параметр биндится через путь, наподобие пути директории \"myClass/someObject/myProperty\", в котором описано как через рефлексию искать нужное свойство объекта.\n\nТак же на треке есть набор ключей, отобращающих ключевые состояния параметра в определенный момент времени и способ интерполяции между ними.\n\nТипы треков:\n- float - числовой, представлен в виде кривой безье\n- bool - булевый, показывающие true/false на определенных частях таймлайна\n- color - изменение цвета по времени\n- vector2 - задается сплайном движения в 2D пространстве и графиком интерполяции по этому сплайну\n- любые кастомные\n\nАнимационный клип можно создать из кода или из редактора. Его можно сохранить и загрузить из ассета - `o2::AnimationClipAsset`.\n\nДля создания из кода есть 2 способа:\n- вручную добавляя треки и ключи в них\n- через вспомогательный класс `o2::Animate`\n\n### o2::Animate\nПозволяет похожим на натуральный язык задать секвенции для некоторых параметров: позиция, альфа, скейл, поворот\n\nДля этого нужно создать обхект `o2::Animate`, передав туда target анимации. Далее используя функции Move/Alpha/Scale/Rotate задается начальное состояние анимации.\n\nСледующее состояние разделяется фукнцией `Then()`, после которой можно описать следующее состояние параметров и задать время интерполяции через `.For(sec)`, в секундах. так же можно задать паузу через `.Wait(sec)`.\n\n### Target анимации и инициализация\nВ качестве таргета должен быть задан объект, отображенный в рефлексии, то есть наследованный от `o2::IObject`.\n\nДля хоть какой-либо анимации должен быть задан анимационный клип `o2::AnimationClip`.\n\nКак только эти два параметра появляются, происходит биндинг треков из клипа к конкретным параметрам таргета: для каждого трека, по его пути ищется нужное поле, и через интерфейс `o2::IValueProxy` передается под управление анимацоннным трекам.\n\nПри запуске анимации все треки стартуют синхронно, в процессе интерполяции передают новые значения через прокси в нужные поля классов или функции-сеттеры через property.\n\n### Анимация на сцене, o2::AnimationComponent\nЭтот компонент работает наподобие `o2::AnimationPlayer`, точнее использует его внутри. При этом позволяет проигрывать несколько клипов на одном объекте одновременно, смешивая треки между собой.\n\nНапример, в компоненте задано два клипа, анимирующих какое-то числовое значение. Они задаются именованными стейтами, с весом. Чем больше вес стейта, тем большее влияние он оказывает на конечное значение параметра.\n\nТаким образом можно делать плавыне переходы между анимациями и запускать несколько анимаций одновременно или по очереди."
  },
  {
    "path": "Docs/ru/Architecture/LowLevel/application.md",
    "content": "## Application, обертка приложения\nЭтот класс - точка входа в движок, он отвечает за инициализацию всех подсистем, за игровой цикл и за фрейм прилоежния (окно на РС или фулскрин приложение на других платформах).\n\nРазработчик может сделать своего наследника от этого класса и перегрузить в нем функции, отвечающие за работу приложения: OnStart, OnUpdate, OnActivated/Deactivated и тд\n\nТак же можно менять параметры фрейма: подпись, размер и тд, если это поддерживается на текущей ОС.\n\n## Инициализация\nДля старта приложения создается экземпляр класса и вызывается один или несколько методов, в зависимости от платформы: `Initialize`, `Launch`.\n\nВнутри так или иначе вызывается `BasicInitialize`, который инициализирует подсистемы.\n\nДля интеграции в mte инициализация платформо-зависимой части окна приложения и рендера отключены.\n\n## Цикл апдейта\nон происходит в методе ProcessFrame, который циклически вызывается из платформо-зависимой части.\n\nВ нем замеряется время кадра для обсчета внутренних подсистем. После этого происходит лимитирование FPS если необходимо.\n\nДалее обновляются подсистемы движка и запускается рендеринг. После запускается обработка ввода.\n\nДля внедрения кода в цикл апдейта или отрисовки можно перегрузить функции `OnUpdate()` и `OnDraw()`"
  },
  {
    "path": "Docs/ru/Architecture/LowLevel/assets.md",
    "content": "## Assets, система ассетов\nКаждый ресурс игры - это ассет. Они попадают в сыром виде в папку с ассетами, и перед запуском собираются определенным образом в конечный формат.\n\nТак, например, на этапе сборки происходит упаковка текстур в атласы и их сжатие.\n\nКаждый ассет содержит мета-данные, в которых определен уникальный идентификатор и другие параметры. Эти мета-данные леэат рядом с ассетом, имеют такое же имя файла, но с расширением .meta.\n\nСущности в движке могут ссылаться на ассет как по пути, так и по идентификатору. Второй способ является основным. Идентификатор остается неизменным если ассет переместить или переименовать. Таким образом ассеты можно перемещать как угодно и ссылки останутся неизменными.\n\n### Система ассетов\nДля базовой работы с ассетами в движке есть отдельная подсистема `o2::Assets`, с быстрым доступом по макросу `o2Assets`.\n\nОна содержит в себе кеш ресурсов, дерево жоступных ассетов и имеет функционал по работе с ассетами: создание экземпляра, перемещение, удаление и тд.\n\n### Базовый класс ассета Asset\nОн содержит в себе базовую информацию об ассете: идентификатор, путь к ассету. А так же базовый функционал - загрузка, сохранение.\n\n### Типы ассетов\nПодтипы ассетов наследуются от базового `o2::Asset`:\n- FolderAsset: папка с ассетами, которые можно получить\n- ActorAsset: прототип актора\n- AnimationAsset: анимация\n- AtlasAsset: атлас\n- ImageAsset: картинка, ссылается на атлас\n- BinaryAsset: Бинарный файл\n- DataAsset: Сериализованные данные, конфиги\n- SceneAsset: Сцена\n- Vector/BitmapFont: Векторный/Растровый шрифт\n- JavaScriptAsset: JS скрипт \n\n### Ссылки на ассеты\nБазовая ссылка на ассет - это `o2::AssetRef`. От него наследуется шаблонный класс-ссылка `o2::Ref<>`. Он функционирует как типичный умный указатель.\n\nРаботу с ассетами корректнее вести через ссылки, во избежании дублирования загрузки ассетов\n"
  },
  {
    "path": "Docs/ru/Architecture/LowLevel/input.md",
    "content": "## Система ввода, o2::EventSystem и o2::Input\n`o2::EventSystem` занимается обработкой нажатия клавишь и мышки (или тачей). Она перенаправляет сообщения в нужные сущности, разрешая внутри себя проблемы отсечения и порядка отрисовки.\n\n`o2::Input` предоставляет информацию о текущем состоянии систем ввода:\n- нажатие клавиш: только что нажата, нажата когда-либо, только что отпущена\n- нажание курсоров (тачей): нажатие, отпускание\n- положение курсора, дельта курсора за кадр\n\n### Обработка клавиш, o2::KeyboardEventsListener\nЭтот класс используется как интерфейс обработчика нажатий. От него можно наследоваться и перегрузить нужные функции. Сообщения о нажатии/отпускании клавишь приходят всем наследникам интерфейса автоматически\n\n### Обработка курсора и тачей, o2::CursorAreaEventsListener\nЭтот интерфейс обрабатывает не все нажатия и события, а только при попадании курсора в него с условием перекрытия другими обработчиками тачей.\n\nНаследовавшись от интерфейса, нужно перегрузить функцию `IsUnderPoint`, которая проверяет попадание точки в область, без учета отсечения. Например, попадание по какой-то геометрической форме или в графику. А так же необходимо вызывать функцию `OnDraw` в тот момент, когда сущность появляется графически на экране\n\nСистема ввода сама занимается вопросом отсечения и перекрытия слушателей друг другом.\n\nТак же нужно перегрузить нужные функции-сообщения курсоров и тачей:\n-`OnCursorPressed` - курсор нажат на сущности\n-`OnCursorReleased` - курсор отпущен, не обязательно над ней\n-`OnCursorPressBreak` - прерывание нажатого курсора (системное, выход за область экрана и тп)\n-`OnCursorPressedOutside` - курсор нажат снаружи\n-`OnCursorReleasedOutside` - курсор отпущен снаружи\n-`OnCursorStillDown` - курсор все еще нажат, не факт что внутри\n-`OnCursorMoved` - курсор переместился внутри области\n-`OnCursorEnter` - курсор вошел в область\n-`OnCursorExit` - курсор вышел из области\n-`OnCursorDblClicked` - двойной клик по области"
  },
  {
    "path": "Docs/ru/Architecture/LowLevel/physics.md",
    "content": "## Физика\nВ движок интегрирован физический движок Box2D. Он интегрирован в сцену, и оперируется физическими телами (RigidBody), формами (Colliders) и джоинтами (пока нет)\n\n### Физическое тело, o2::RigidBody\nЭто наследник от `o2::Actor`, который привязывается к динамике физического тела из Box2D.\n\nВ нем задается масса, инерция, скорость и поведение. Поведение может быть 3х типов:\n- Dynamic - Динамическое, влияет на другие тела и другие тела влияют на него\n- Static - статичное тело, не вдигается, отталкивает другие тела\n- Kinematic - движущееся статичное тело, отталкивает другие, но другие тела не могут на него повлиять\n\n### Формы, коллайдеры\nИспользуются для задания формы твердых тел:\n- box\n- circle"
  },
  {
    "path": "Docs/ru/Architecture/LowLevel/render.md",
    "content": "## Рендер\nЗа рендеринг отвечает отдельная подсистема Render, с макросом быстрого доступа o2Render.\n\nВ нем инициализируется рендер и нужные API, если требуется. Через него происходит отрисовка мешей, с использованием батчинга. Можно задавать камеру, отсечение, ренеринг в текстуру.\n\nТак же в подсистему рендера входят базовые примитивы: спрайт, текст и эффекты частиц.\n\n### Текстуры\nДля работы с текстурами используется класс `o2::Texture` и ссылки на них `o2::TextureRef`. Текстуры - это как правило атласы, загруженные с диска, или рендер-таргеты.\n\nВажно знать, что текстуры и ImageAsset'ы - это отдельные сущности. Текстуры - это текстуры в видеопамяти, а ImageAsset'ы могут быть отображены как частью текстуры (в атласе), так и быть самостоятельной текстурой.\n\nТекстура может быть создана сама по себе, в нее может быть загружен растр, она может быть загружена с диска в определенном формате. \n\nТекстура может быть рендер-таргетом, для этого она создается с соответствующим флагом.\n\n### Камера, o2::Camera\nЗадает транформацию, через которую сцена рендерится в текущий момент. Положение задается через интерфейс `o2::Transform`. Фактически трансформацию камеры можно воспринимать как окно, через которое мы смотрим на сцену\n\n### Меши, o2::Mesh\nДля отрисовки графики используются меши, из них строятся спрайты, текст и тд.\n\nМеш состоит из буффера вершин и индексов полигонов. В нем задается текстура.\n\nПри передаче меша в отрисовку, его вершины и индексы копируются в буффер текущего батча, если текстура не изменилась. Иначе, создается новый батч, а предыдущий отправляется на отрисовку.\n\n### IDrawable\nЭто базовый интерфейс рисуемой сущности, запоминает во время отрисовки текущий прямоугольник отсечения\n\n### IRectDrawable\nБазовый примитив прямоугольной отрисовываемой сущности. Наследуется от `o2::Transform`, имеет цвет, прохрачность и может отключаться\n\n### Спрайты, o2::Sprite\nНаследуется от `o2::IRectDrawable`. Спрайт задается текстурой и областью из нее. По умолчанию это задается через `o2::ImageAsset`. Так же спрайт можно создать без текстуры, тогда будет использована дефолтная белая текстура.\n\nУ спрайта задается режим отрисовки Mode:\n- Default - по умолчанию, арстягивается во все стороны\n- Sliced - растягивается с сохранением пропорций границ, 9-slice\n- Tiled - при растягивании текстура дублируется\n- FixedAspect - сохраняется соотношение сторон спрайта, вписывается в размер спрайта\n- FillLeftToRight, FillRightToLeft, FillUpToDown, FillDownToUp - заполнение спрайта по горизонтали/вертикали\n- Fill360CW, Fill360CCW - заполнение спрайта по/против часовой стрелки\n\nТрансформации, цвет, прозрачность - задаются через базовый класс `IRectDrawable`.\n\n### Текст, o2::Text\nНаследуется от `o2::IRectDrawable`. В нем задается шрифт (векторный или растровый), размер текста, форматирование текста и сам текст.\n\nШрифт задается через ассет `o2::FontAsset`, у которого может быть 2 реализации: `o2::VectorFontAsset` и `o2::BitmapFontAsset`.\n\nТекст форматируется относительно прямоугольной области, задаваемой `o2::IRectDrawable`. В форматировании доступны следующие параметры:\n- hor/verAlign выравнивание по горизонтали/вертикали \n- перенос слов на следующую строку при горизонтальном переполнении\n- окончание строки троеточием (...) при горизонтальном переполнении\n- коэф. межбуквенного и межстрочного расстояния\n\n### Растровый и векторный шрифты\nРастровый шрифт задается заранее заготовленными и отрендеренными символами в атласе и их описанием.\n\nВекторный шрифт генерируется в рантайме, подрендеривая и упаковывая в специальный атлас нужные глифы. \n\nНа векторный шрифт могут накладываться графические эффекты - обводка, градиент, тень и кастомные. Эти эффекты накладываются посимвольно, во время рендеринга глифифов в атлас, на CPU.\n\n### Эффекты частиц, o2::ParticleEmitter\nЭмитирует определенные частицы, занимается их динамикой и эффектами.\n\nВ нем задается форма, которая по размеру привязывается к интерфейсу `o2::IRectDrawable`. Задается лимит частиц, коло-во испускаемых в секунду частиц. Так же старотовые параметры частиц (скорость, угол)\n\nВо время апдейта к частицам применяются эффекты, например гравитация и другие кастомные"
  },
  {
    "path": "Docs/ru/Architecture/LowLevel/scripting.md",
    "content": "## Скриптинг\nВ о2 встроен скриптовый движок, с имплементацией JS на jerryscript.\n\nСкриптовым движком управляет подсистема `o2::ScriptEngine`. Она хранит глобальное состояние его можно получить через `GetGlobal`. Может парсить и запускать скрипты (`Parse`/`Run`/`Eval`)\n\nТак же он управляет подключением дебаггера.\n\n### Обертка скрипт-значения, o2::ScriptValue\nЭтот класс является универсальной оберткой любого скриптового значения. В нем может храниться как простой тип (number, string, bool ...), так и массивы, объекты и функции.\n\nДля определения типа объекта используются функции-геттеры `IsArray`/`IsObject`, или `GetValueType`.\n\nТак же класс имеет операторы конвертации в/из нужного типа\n\n#### Объекты\nДля обхектных типов есть функционал по получению property объекта: `GetProperty`, а так же перебор всех пропертей `ForEachProperties`. Так же можно добавлять и удалять проперти в объекте.\n\nЕсть функционал для прототипов объектов, можно получить или установить прототип: `Set/getPrototype`\n\nТак же есть функция `Contruct` для конструирования обхекта из функции-конструктора\n\n#### Массивы\nДля работы с массивами есть функции получения элемента: `operator[int]` и `Set/GetElement`. А так же получение длины массива `GetLength()`. И добавление/удаление элемента в массиве: `Add/RemoveElement`.\n\n#### Функции\nВ переменной так же может быть функция, которую можно вызвать. Вызвать можно с передачей С++ параметров через шаблоны, тогда внутри они сконвертируются в скриптовые значения: `Invoke`. Либо сразу с уже заготовленными скриптовыми занчениями: `InvokeRaw`.\n\nТак же при вызове функции можно задать параметр this первым аргументом\n\n#### Биндинг классов и функций в скриптинг\nКаждый объект, при включенном скриптинге может хранить в себе закешированное скриптовое значение на этот объект. Это скриптовое значение представляет из себя объект с нативным поинтером на себа внутри. Так же в нем есть поля, которые биндятся к скриптингу\n\nДля каждого типа в рефлексии генерируется прототип, на который потом ссылкаются инстансы этого типа. То есть функции фактически хранятся в прототипе. Базовые классы становятся прототипами наследников.\n"
  },
  {
    "path": "Docs/ru/Architecture/Utils/containers.md",
    "content": "# Контейнеры данных\nДля удобства работы в движке добавлены специальные контейнеры данных, которые являются обертками над контейнерами стандартной библиотеки, но привносящие удобный функционал.\n\n## `o2::Vector`\n`Vector<_type>` — шаблонный класс, наследник `std::vector<_type>`. Предоставляет расширенный набор методов для удобной работы со списком: добавление, удаление, поиск, фильтрация, сортировка и пр.\n\n### Основные операции\n- **Конструкторы** (пустой, список инициализации, копирования, перемещения).\n- **Операторы** `=`, `+`, `-`, `+=`, `-=`, `==`, `!=`:\n  - Сложение/вычитание с другим вектором или элементом.\n  - Сравнение на равенство/неравенство.\n- **Размер и память**: `Count()`, `IsEmpty()`, `Capacity()`, `Resize()`, `Reserve()`, `ShrinkToFit()`.\n- **Доступ к элементам**: `Get(idx)`, `Set(idx, value)`, `Data()`.\n- **Модификация**: `Add(...)`, `Insert(...)`, `Remove(...)`, `RemoveAt(idx)`, `PopBack()`, `Clear()`.\n- **Поиск**: `IndexOf(value)`, `Contains(value)`, `Find(...)`, `FindAll(...)`, `First()`, `Last()`.\n- **Отбор**: `Where(...)`, `All(...)`, `Any(...)`.\n- **Сортировка**: `Sort(...)`, `SortBy(...)`, `Sorted(...)`.\n- **Преобразование**: `Convert(...)`, `Cast()`, `DynamicCast()`.\n- **Итерация**: `ForEach(...)`, а также методы `Begin()`, `End()` для итераторов.\n\n### Дополнительно\n- **Take(...)** — возвращает подмножество элементов по индексу или количеству.\n- **Clone()** — создает копию текущего вектора.\n- **Min(...) / Max(...)** — находит минимальный/максимальный элемент по селектору.\n- **Sum(...)** — суммирует значения, вычисленные по селектору.\n- **Reverse()** — изменяет порядок на обратный.\n\nПри включенном `ENABLE_MEMORY_ANALYZE` доступны методы для анализа памяти.\n\n## `o2::Map`\n`Map<_key_type, _value_type>` — шаблонная обёртка над `std::map`. Хранит пары (ключ-значение) и предоставляет дополнительные методы для удобного управления данными.\n\n### Основные операции\n- **Добавление**: `Add(key, value)`, `Add(Map)`.\n- **Удаление**: `Remove(key)`, `RemoveAll(match)`, `Clear()`.\n- **Проверка наличия**: `ContainsKey(key)`, `ContainsValue(value)`, `Contains(pair)`.\n- **Поиск**: `FindKey(key)`, `FindValue(value)`, `Find(match)`, `FindAll(match)`, `First(match)`, `Last(match)`.\n- **Доступ**: `Get(key)`, `Set(key, value)`, `TryGetValue(key, outValue)`.\n- **Размер**: `Count()`, `IsEmpty()`.\n- **Итерации**: `ForEach(func)`, а также `Begin()`, `End()` для итераторов.\n- **Условия**: `All(match)`, `Any(match)`.\n- **Мин/макс/сумма**: `Min(selector)`, `Max(selector)`, `Sum(selector)`.\n\n### Дополнительно\n- **Where(...)** — фильтрация пар по условию.\n- **Сравнение**: `==`, `!=`.\n- **Операторы присваивания**: копирование и инициализация списком.\n- При `ENABLE_MEMORY_ANALYZE` доступен функционал анализа памяти.\n\n"
  },
  {
    "path": "Docs/ru/Architecture/Utils/debug.md",
    "content": "# Документация `Debug`\n\n## Описание\nСинглтон для вывода логов и отрисовки отладочных примитивов: линий, стрелок, окружностей, прямоугольников и текста.\n\n## Макрос\n- **o2Debug** — глобальная точка доступа к экземпляру `Debug`.\n\n## Конструктор и деструктор\n- **Debug(RefCounter\\* refCounter)** — инициализирует систему логирования и шрифтов.\n- **~Debug()** — освобождает ресурсы.\n\n## Методы логирования\n- **Log(format, ...)** / **LogStr(out)** — вывод информационных сообщений.\n- **LogWarning(format, ...)** / **LogWarningStr(out)** — вывод предупреждений.\n- **LogError(format, ...)** / **LogErrorStr(out)** — вывод ошибок.\n- **GetLog()** — возвращает основной лог.\n\n## Методы рисования\nОтрисовывают отладочные примитивы сразу или с заданным временем исчезновения (`delay`):\n- **DrawLine(...)**\n- **DrawArrow(...)**\n- **DrawRay(...)**\n- **DrawCircle(...)**\n- **DrawRect(...)**\n- **DrawLine(Vector<Vec2F> points, ...)**\n- **DrawText(...)**\n\n## Методы обновления и отображения\n- **Update(isEditor, dt)** — обновляет таймеры отладочных объектов.\n- **Draw(isEditor)** — рисует все активные отладочные объекты.\n\n## Внутренние структуры\n- **IDbgDrawable** — базовый интерфейс отладочного объекта (цвет, время).\n- **DbgLine**, **DbgArrow**, **DbgCircle**, **DbgRect**, **DbgPolyLine**, **DbgText** — структуры для хранения данных и отрисовки конкретных примитивов."
  },
  {
    "path": "Docs/ru/Architecture/Utils/filesystem.md",
    "content": "# Документация `FileSystem`\n\n## Описание\n`FileSystem` — синглтон для работы с файловой системой. Позволяет получать информацию о файлах и папках, копировать, удалять, создавать и перемещать их. Также содержит вспомогательные методы для работы с путями.\n\n## Макрос\n- **o2FileSystem** — глобальная точка доступа к единственному экземпляру `FileSystem`.\n\n## Конструктор и деструктор\n- **FileSystem(RefCounter\\* refCounter)** — инициализация.\n- **~FileSystem()** — освобождает ресурсы.\n\n## Платформозависимые методы\n- **GetAssetManager()** *(Android)* — возвращает `AAssetManager`.\n- **GetBundlePath()** *(iOS/Mac)* — возвращает путь к бандлу.\n\n## Основные методы\n- **GetFolderInfo(path)** — возвращает информацию о папке и файлах в ней.\n- **GetFileInfo(path)** — возвращает информацию о файле.\n- **SetFileEditDate(path, time)** — задаёт время изменения файла.\n- **FileCopy(source, dest)** — копирует файл.\n- **FileDelete(file)** — удаляет файл.\n- **FileMove(source, dest)** — перемещает файл.\n- **FolderCreate(path, recursive)** — создаёт папку (рекурсивно при необходимости).\n- **FolderCopy(from, to)** — копирует папку.\n- **FolderRemove(path, recursive)** — удаляет папку (рекурсивно при необходимости).\n- **Rename(old, newPath)** — переименовывает файл или папку.\n- **IsFolderExist(path)** — проверяет наличие папки.\n- **IsFileExist(path)** — проверяет наличие файла.\n- **ExtractPathStr(path)** — возвращает путь без имени файла.\n- **GetFileExtension(filePath)** — возвращает расширение файла.\n- **GetFileNameWithoutExtension(filePath)** — имя файла без расширения.\n- **GetPathWithoutDirectories(path)** — возвращает имя папки/файла без родительских директорий.\n- **GetParentPath(path)** — возвращает путь к родительской директории.\n- **ReadFile(path)** — читает содержимое файла.\n- **GetPathRelativeToPath(from, to)** — формирует относительный путь.\n- **CanonicalizePath(path)** — упрощает путь, убирает `.` и `..`.\n- **WriteFile(path, data)** — записывает строку в файл.\n\n## Внутренние поля\n- **mLog** — поток логирования работы с файловой системой."
  },
  {
    "path": "Docs/ru/Architecture/Utils/function.md",
    "content": "## o2::Function<>\nДля удобной работы с подписками в движке есть свой тип делегатов, наподобие `std::function<>`.\n\nНо в отличие от std варианта, `o2::Function<>` ведет себя как делегаты из C#, и фактически является массивом из функций.\n\nто есть можно описать делегат, например, на клик по кнопке:\n- `o2::Function<void()> onClicked;`\n\nи на него можно подписываться/отписываться множество раз:\n```C++\nbutton->onClicked += myFunction;\n...\nbutton->onClicked += []() { o2Debug.Log(\"Clicked!\"); };\n```\n\nПри вызове делегата (нажатии на кнопку), будут вызваны все подписчики.\n\nЭтот делегат оптимизирован и его можно относительно бесплатно использовать, внутри есть оптимизация по типу small string optimization: если хранится всего лишь одна функция, то она хранится без аллокаций"
  },
  {
    "path": "Docs/ru/Architecture/Utils/logging.md",
    "content": "## Logging\nДля вывода лога используется иерархия каналов вывода в лог `o2::LogStream`. Каждый канал имеет свой строковый идентификатор и список дочерних каналов. \n\nВывод в дочерний канал так же выводит и в родительский.\n\nВерхнеуровневыми каналами являются вывод в консоль и в файл.\n\nМожно создавать свои каналы, биндить к другим.\n\nСообщения лога делятся на 3 типа важности:\n- обычное сообщение\n- предупреждение\n- ошибка"
  },
  {
    "path": "Docs/ru/Architecture/Utils/math.md",
    "content": "## Математика\nВ движке представлены базовые типы для 2D математики:\n- `Vec2F/I` - двумерный вектор\n- `RectF/I` - прямоугольник с автосортировкой краев - left всегда меньше right, top всегда выше bottom\n- `BorderF/I` - рамка вокруг прямоугольника\n- `Basis` - базис трансформации, фактически матрица 3x2\n- `Transform` - трансормация\n- `Spline` - двумерный сплайн \n- `Curve` - кривая как функция\n\nА так же математические функции в пространстве `o2::Math`: Min, Max, Floor, Ceil, Round, Clamp, Sin, Cos и тд\n\n## Система координат\nПо умолчанию в движке используется декартова система координат: ноль в центре экрана, ось X направлена вправо, ось Y направлена вверх\n\n## Basis\nЯвляется матрицей 3x2, но в несколько непривычном, но более удобном виде. Он задается в виде пары осеч `xv` и `yv`, определяющих нормализованные направления осей X и Y. Они не обязательно могут быть единичными и перпендикулярными, повно как и в матрице. Эти оси отсчитываются от центра `origin`.\n\nТаким образом интуитивно понятно задается базис трансформации, который работает как матрица. Есть методы композиции из position/angle/scaleи обратной декомпозиции.\n\n## Transform\nБолее подробное описание трансформации, в котором содержится:\n- position - позиция относительно pivot\n- pivot - точка смещения. От нее отсчитывается позиция, то есть пивот всегда в нуле\n- size - размер\n- scale - скейл. По умолчанию (1; 1), умножает size относительно pivot\n- angle - угол поворота\n- shear - \"сдвиг/скос\", смещающий прямоугольник в параллелограмм\n\nИ много вспомогательных и полезных методов.\n\n## Spline\nКривая безье в двумерном пространстве. Задаются опорные точки, на которых могут быть заданы вспомогательные точки для предыдущего и следующего сегмента. Используется обычная интерполяция безье по 4м точкам.\n\n## Curve\nТо же кривая, но представляющая функцию с интерполяцией по оси X, возвращающей единственное значение результата функции по Y. Внутри так же используются кривые безье по 4м точкам"
  },
  {
    "path": "Docs/ru/Architecture/Utils/memory.md",
    "content": "## Менеджмент памяти\nСейчас используется ручной подход к памяти, с возможностью анализа количества аллокаций по месту их выделения. \n\nДля этого переопределены функции new() с параметрами исходника и номера строки. Для удоства они спрятаны в макрос mnew (managed new), который регистрирует аллокацию.\n\nДалее можно вывести список мест аллокации, осортированный по сумме аллокаций:\n`o2::MemoryManager::DumpInfo`.\n\nТаким образом можно вычислить утечки и расход памяти\n\n## Ссылки и GC\nЯ планирую перейти на использование умных указателей, с сохранением ссылки на счетчик внутри обёекта. Это будет представлено в типе Ref<>, который уже реализован в некотором виде для текстур, ассетов и акторов.\n\nК нему будет поставляться отладочный GC, который сможет строить дерево аллокаций и позволит более подробно изучать расход памяти. И устранит ошибки с утечками из-за ручного управления памятью"
  },
  {
    "path": "Docs/ru/Architecture/Utils/properties.md",
    "content": "## Properties\nДля удобной работы с сущностями движка и пользовательским кодом, в движке есть специальные обертки над setter/getter функциями.\n\nНапример, есть функции для значения прозрачности:\n```C++\nvoid SetTransparency(float value);\nfloat GetTransparency() const;\n```\n\nиспользовать их в математических вычислениях не удобно, особенно если вычисления сложные.\n\n`object.SetTransparency(object.GetTransparency()*0.5f);`\n\nГораздо проще оперировать значениями переменных:\n\n`object.transparency *= 0.5f;`\n\nзапись получается короче и более читаемой.\n\nДля этого в движке есть макросы, определяющие property а-ля C#.\n\n```C++\nPROPERTIES(MyClass);\nPROPERTY(float, transparency, SetTransparency, GetTransparency);\nGETTER(int, index, GetIndex);\nACCESSOR(Actor*, child, String, GetChild, GetAllChilds);\n```\n\nОни определяют новый класс, который хранит ссылку на искомый класс, и перегружает необходимые математические методы, в которых использует указанные setter/getter.\n\nЭто привносит накладные ресурсы в виде одного указателя на каждую property.\n\nВ примере выше указаны 3 типа:\n- `PROPERTY` - стандартный getter/setter\n- `GETTER`/`SETTER` - определение значения только на чтение или запись\n- `ACCESSOR` - определяет переменную с перегруженным `operator[]` указанного типа. Удобен для доступа к элементам по имени, как в данном примере доступ к детям актора: `actor->child[\"name of child\"]`;\n\nТак же property носят утилитарный характер в анимациях. Они доступны для анимирования, в тч `ACCESSOR`, что позволяет коду реагировать на изменение значения через setter."
  },
  {
    "path": "Docs/ru/Architecture/Utils/reflection.md",
    "content": "## Рефлексия\n\nВ движке используется собственная система типов. С помощью нее можно узнать параметры типа объекта в рантайме: размер, название, список полей и фукнций. Так это можно менять поля объекта по имени в рантайме, вызывать функции так же по имени. \n\nТак же поддерживаются аттрибуты для полей и функцийю. Они обозначаются в коде начиная с `@`, как правило в верхнем регистре. Например `@SERIALIZABLE`. Есть внутренние движковые аттрибуты, можно добавлять свои.\n\nИзменять тип, добавлять новые поля или функции нельзя.\n\nРефлексия используется для сериализации и десериализации, поиска анимированных полей, генерации интерфейса редактора.\n\nКонцептуально все делится на 2 подсистемы: система типов и кодогенерация. Отдельная утилита, поставляемая вместе с движком, парсит заголовочные .h/.hpp файлы, ищет там классы которые должны быть отражены в рефлексии, и генерирует мета-код описания типа, который добавляет в конец заголовочного файла.\n\nВыглядит это примерно так:\n<details>\n<summary>Пример мета-кода</summary>\n\n```\n// --- META ---\n\nCLASS_BASES_META(Reel)\n{\n\tBASE_CLASS(Component);\n}\nEND_META;\nCLASS_FIELDS_META(Reel)\n{\n\tFIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(blurredImages);\n\tFIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(100.0f).NAME(imagesDistance);\n\tFIELD().PRIVATE().NAME(mImages);\n\tFIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mRotatingOffset);\n}\nEND_META;\nCLASS_METHODS_META(Reel)\n{\n\tFUNCTION().PUBLIC().CONSTRUCTOR();\n\tFUNCTION().PRIVATE().SIGNATURE(void, OnDisabled);\n\tFUNCTION().PRIVATE().SIGNATURE(void, UpdateImagesLayout);\n}\nEND_META;\n// --- END META ---\n```\n</details>\n\nДобавление в конец не особо мешает разработке, но является оптимальным вариантом для компиляции, в сравнении с выделением всего мета-кода в один большой файл. В такой файл подключается весь проект, и при любом изменении происходит долгая компиляция.\n\nНа основе сгенеренной мета-информации происходит инициализация типов на старте приложения, регистрация скриптованных типов, а так же сериализация в нужный момент.\n\n### Система типов\nКак бы странно ни звучало, у типа тоже есть подтипы. Базовым типом является `o2::Type`. Он хранит в себе базовую информацию о типе: название, размер, уникальный id, список базовых типов, список полей, список функций-членов и список статичных функций.\n\nДля функций и полей хранится список аттрибутов, которые могут содержать мета-данные.\n\nКроме получения данных о типе, класс `o2::Type` дает дополнительный функционал:\n- создание экземпляра объекта этого типа `CreateSample()`\n- поиск указателя на поле по определенному. Поле может быть вложенным в подобъекты, тогда путь задается как путь к директории, с разделением слешами: `path/to/some/field`.\n- получение прокси-структуры для поля этого типа. Эти проксти-структуры (`IAbstractValueProxy`) объединяют в себе разные подходы владения и изменения значением. Это может быть указатель на значение, либо пара функций setter/getter, либо значение из скрипта и тд\n- сериализация/десериализация\n- проверка на равенство. `IsValueEquals` получает на вход два `void*` на значения, внутри происходит автоматическая проверка\n- копирование значения `CopyValue`\n\nОт базового `o2::Type` наследуются специализированные типы:\n- `FunctionType` - функция-делегат `Function<>`\n- `ObjectType` - объект. Имеет методы каста вверх и вниз относительно `IObject`\n- `FundamentalType` - фундаментальный тип языка (int, float, string ...)\n- `PointerType` - указатель на тип, может вернуть тип не-указатель\n- `PropertyType` - тип для проперти\n- `VectorType` - тип для `Vector<>`, может вернуть кол-во элементов и поинтер на определенный элемент по индексу\n- `MapType` - тип для `Map<>`, может возвращать значения по ключам, список ключей\n- `StringPointerAccessorType` -  тип для string pointer accessor, специальной обертки для перегрузки оператора `operator[](String& key)`\n- `EnumType` - тип для enum'ов, позволяет получить список всех возможных значеный enum'а\n\n### Аттрибуты\nДля обозначения каких-то свойств полей или функций использутся аттрибуты. Они могут показывать сериализуется поле или нет, исключается или наоборот добавляется в редактор и тп. Можно создавать пользовательские аттрибуты.\n\nАттрибут задается специальным классом, унаследованным от `IAttribute` с внутренними макросами, обозначающими именование в коде и мета-информации.\n```\nATTRIBUTE_COMMENT_DEFINITION(\"SERIALIZABLE\");         // В коде тег будет читаться как @SERIALIZABLE\nATTRIBUTE_SHORT_DEFINITION(\"SERIALIZABLE_ATTRIBUTE\"); // В мета-информацию будет добавлен как .SERIALIZABLE_ATTRIBUTE()\n```\n\n### Мета-код описания типов и его использование\nЭтот мета-код фактически является шаблонными функциями, инжектируемые в класс для которого строится тип. Он делится на 3 блока: список базовых классов, список полей и список функций. Каждый из этих блоков является шаблонной функцией.\n\nВ качестве шаблона задается специальный процессор типа наподобие `o2::BaseTypeProcessor`, в котором есть функции-обработчики записей о базовых классах, полях и методах.\n\nТаким образом можно задать какой-то процессор типа объекта, который выполняет нужную функцию при переборе данных о типе.\n\nТак происходит инициализация типов на старте. Кроме добавления в заголовочный файл мета-информации о типе, в исполняемые .cpp файлы автоматически добавляется регистрация типа, например `DECLARE_CLASS(Reel);`. Она инициирует регистрацию типа с определенным процессором. Этот процессор создает объект типа нужного типа (наследники от `o2::Type`) и заполняет его данными.\n\nТак же с помощью этого процессора происходит сериализация и десериализация, о ней в отдельном разделе\n\n### Подсистема рефлексии o2::Reflection\nВ движке есть класс-синглтон, отвечающий за систему рефлексии - `o2::Reflection`. Для более короткого доступа есть макрос `o2Reflection.`.\n\nЧерез него можно получить список всех типов, создать экземпляр типа, получить тип по имени, сконвертировать enum в строку и обратно.\n\n### Рефлексия объектов\nДля того, чтобы класс был отражен в рефлексии, его нужно унаследовать от `o2::IObject` и разместить в теле класса макрос `IOBJECT(NAME_OF_CLASS)`. Этот макрос добавит нужные поля и функции в класс. Система кодогенерирования сама поймет эти признаки и сгенерирует мета-код\n\n### Получение типа объекта\nВ классах, которые отражены в рефлексии, добавляется статичное полу `o2::Type* type`, в котором хранится тип класса. Так же добавляется **не статичный** метод `const o2::Type& GetType() const`, который в рантайме возвращает реальный тип объекта.\n\nТак же доступен метод `TypeOf(value)`, который возвращает тип для любого значения value, которое туда передается. Это может быть как обхект, так и элементарный тип int, float, bool и др.\n"
  },
  {
    "path": "Docs/ru/Architecture/Utils/serialization.md",
    "content": "## Сериализация\nС помощью сгенерированной мета-информации о классах происходит автоматическая сериализация и десериализация обхектов. Не нужно вручную писать код записи и чтения, все происходит автоматически и оптимизированно.\n\nБазово сериализаци происходит в формате Json, но может быть добавлен любой друго тип данных, например бинарный.\n\nЧтобы сделать тип сериализуемым, его нужно унаследовать от базового класса `o2::ISerializable`, который уже унаследован от `o2::IObject`. И добавить макрос `SERIALIZABLE(NAME_OF_CLASS)` внутрь класса, который уже включает в себя макрос `IOBJECT()`.\n\nСериализуемые поля должны быть отмечены тегом `@SERIALIZABLE`. Сериализуются простые типы, вложенные объекты, пользовательские типы.\n\n<details>\n<summary>Пример сериализуемого класса</summary>\n\n```C++\nclass Reel : public ISerializable\n{\npublic:\n\tActorRef imagesContainer; // @SERIALIZABLE\n\n\tVector<ImageAssetRef> images;        // @SERIALIZABLE\n\tVector<ImageAssetRef> blurredImages; // @SERIALIZABLE\n\n\tfloat imagesDistance = 100.0f; // @SERIALIZABLE\n\n\tbool disableExtendedSymbols = false; // @SERIALIZABLE\n\n\tSERIALIZABLE(Reel);\n};\n```\n</details>\n\n## DataValue\nДля работы со структурой данных (в частности json), используется древовидная структура из DataValue. Эта реализация крайне похожа на rapidjson.\n\nВ этой структуре хранится тип значения и собственно значение. Значение может быть простым (число, строка, bool, null), объектом или массивом.\n\nДля чтения и записи в файл используется обертка DataDocument."
  },
  {
    "path": "Docs/ru/Architecture/Utils/string.md",
    "content": "## String\nДля удобства добавлена обертка над `std::string`, привносящая удобный функционал:\n\n- конвертация базовых типов в/из строки\n- `Append` - добавление строки в конец\n- `Insert` - вставка строки\n- `Erase` - удаление промежутка\n- `Replace` - замена подстроки на другую\n- `Find` - поиск подстроки\n- `Contains` - содержит ли подстроку\n- `CountOf` - кол-во подстрок\n- `Starts/EndsWith` - начинается/заканчивается на опдстроку\n- `Split` - разделение на массив подстрок\n- `TrimStart/End` - обрезка в начале/конце"
  },
  {
    "path": "Docs/ru/Architecture/architecture.md",
    "content": "# Архитектура движка\n\nАрхитектура делится на три слоя:\n\n- **верхний**: сцена, акторы, компоненты, UI, редактор\n- **низкий**: обёртка приложения, ассеты, рендер, анимации, ввод, физика, скрипты, звуки\n- **утилитарный**: рефлексия и сериализация, менеджмент памяти, файловая система, отладка и логгирование, математика, делегаты, проперти, контейнеры данных, таймеры\n\nВходная точка — это обёртка приложения (`o2::Application`), которая предоставляет кроссплатформенное API для управления приложением. Она имеет платформенные реализации для Windows, macOS, Linux, iOS, Android, Emscripten (WIP). Часть низкоуровневых и утилитарных систем (рендер, файловая система, таймеры) также имеют платформенные реализации. Все подсистемы оформлены как синглтоны для удобного доступа к ним.\n\nПеред запуском приложения статически инициализируются некоторые утилитарные системы (например, менеджмент памяти, рефлексия). Затем при старте создаётся экземпляр приложения, который инициализирует остальные подсистемы, и после этого запускается игровой цикл.\n\nИгровой цикл состоит из двух фаз: обновление и отрисовка. Всё выполняется внутри o2::Application::ProcessFrame, где обновляются система ввода, сцена, физика, вызывается рендер и т. д.\n\nРазработчик может переопределить логику o2::Application, унаследовав собственный класс и реализовав там необходимые функции: инициализацию, запуск, отрисовку, обновление, сворачивание и разворачивание приложения.\n\n## Менеджмент памяти [(подробная документация)](/Docs/ru/Architecture/Utils/memory.md)\n\nВ движке используются собственные смарт-указатели, которые имеют внешний счётчик ссылок с внутренней ссылкой на него в самом объекте. Это даёт возможность преобразовывать обычный «сырой» указатель в умный, если объект унаследован от `RefCounterable`, хранящего в себе ссылку на счётчик. Для управления временем жизни используется сильная ссылка `Ref<>`, а для не влияющих на время жизни — слабая ссылка `WeakRef<>`. Объекты для умных указателей создаются только через функцию `mmake<T>(...)`, которая выделяет память под счётчик и объект одним блоком, чтобы счётчик всегда шёл перед объектом (cache-friendly). В режиме отладки в движке работает отладочный GC, указывающий на возможные утечки памяти и циклические ссылки, однако сам он объекты не уничтожает и служит лишь для анализа. В редакторе есть утилита для просмотра дерева памяти, где подсвечиваются проблемы. Кроме того, в движке предусмотрены специализированные ссылки для сериализации уникальных идентификаторов: `AssetRef` (для ассетов) и `LinkRef` (для акторов и компонентов).\n\n<details>\n<summary>Пример</summary>\n\n```C++\nclass MyObject: public o2::RefCounterable \n{};\n\nRef<MyObject> myObjectSample = mmake<MyObject>(...);\nmyObjectSample->DoSmth();\n\nWeakRef<MyObject> myWeakObject = WeakRef(myObjectSample);\n\nMyObject* rawObject = myObjectSample.Get();\nRef<MyObject> myObjectSample2 = Ref(rawObject);\n```\n</details>\n\n## Рефлексия [(подробная документация)](/Docs/ru/Architecture/Utils/reflection.md)\n\nИспользуется для доступа к структуре типов в рантайме (поиск анимируемых значений по строковому пути, вызов коллбеков по имени, сериализация/десериализация, автоматические биндинги скриптов). В основе лежит метаинформация о типах, генерируемая утилитой **o2CodeTool**. Она парсит заголовочные файлы (`.h`), находит в них классы C++ и анализирует их структуру (включая наследование). Затем определяет наследников `IObject` и в конце `.h` генерирует метаинформацию о типе. Эта метаинформация сохраняется в общий репозиторий и формируется инкрементально: кодогенератор хранит кэш проанализированных файлов и обновляет только те, что были изменены.\n\n<details>\n<summary>Пример</summary>\n\n```C++\nstruct MyObject: public o2::IObject \n{\n    float value = 0.0f;\n\n    float DoSmth(float arg);\n\n    IOBJECT(MyObject);\n};\n\nMyObject myObjectSample;\nauto& type = TypeOf(MyObject);\n\nassert(myObjectSample.GetType() == type);\n\nfloat floatValue = type.GetField(\"value\").GetValue(&myObjectSample);\nfloat funcResult = type.Invoke<float>(\"DoSmth\", &myObjectSample, floatValue);\n```\n</details>\n\n## Сериализация [(подробная документация)](/Docs/ru/Architecture/Utils/serialization.md)\n\nДля внутреннего хранения данных используются форматы JSON и бинарный (в разработке). Данные представляются в виде `o2::DataValue` — структуры наподобие RapidJSON или PugiXML, позволяющей хранить массивы, таблицы или простые значения (числа, строки, логические и т. д.). Объект `o2::DataValue` может быть загружен из файла и преобразован в C++-объект, либо наоборот — объект сериализуется в `o2::DataValue` и сохраняется.\n\nСериализация осуществляется через рефлексию, а именно с помощью генерируемой метаинформации типов. В процессе сериализации специальный объект записывает данные в `o2::DataValue`. Для этого объект обязан унаследовать интерфейс `o2::ISerializable`, а поля, подлежащие сериализации, должны быть помечены атрибутом `@SERIALIZABLE`. Таким образом, сериализуются только необходимые типы и поля, включая примитивы, контейнеры и смарт-указатели.\n\n<details>\n<summary>Пример</summary>\n\n```C++\nclass Reel : public ISerializable\n{\npublic:\n\tLinkRef<Actor> imagesContainer; // @SERIALIZABLE\n\n\tVector<AssetRef<ImageAsset>> images;        // @SERIALIZABLE\n\tVector<AssetRef<ImageAsset>> blurredImages; // @SERIALIZABLE\n\n\tfloat imagesDistance = 100.0f; // @SERIALIZABLE\n\n\tbool disableExtendedSymbols = false; // @SERIALIZABLE\n\n\tSERIALIZABLE(Reel);\n};\n```\n</details>\n\n## Проперти [(подробная документация)](/Docs/ru/Architecture/Utils/properties.md)\n\nПроперти позволяют объявлять переменные, которые используют сеттер и геттер «под капотом», упрощая код. Вместо `object.SetValue(object.GetValue() + 200.0f);` можно писать `object.value += 200.0f;`, аналогично механизму свойств из C#.\n\nЧтобы объявить проперти в классе, сначала ставится макрос `PROPERTIES(class_name)`. Затем для каждой проперти используется макрос `PROPERTY(type, name, setter, getter)`, где `setter` и `getter` — функции класса, обрабатывающие чтение и запись значения.\n\n<details>\n<summary>Пример</summary>\n\n```C++\nclass MyObject\n{\npublic:\n\tPROPERTIES(MyObject);\n    PROPERTY(float, value, SetValue, GetValue);\n\npublic:\n    void SetValue(float value);\n    float GetValue() const;\n};\n\nMyObject object;\n\nobject.value = object.value + 100.0f; // object.SetValue(object.GetValue() + 100.0f);\n```\n</details>\n\n## Делегаты [(подробная документация)](/Docs/ru/Architecture/Utils/function.md)\n\n`o2::Function<>` — это аналог `std::function<>` с расширенным функционалом, позволяющий хранить несколько делегатов одновременно. Такой подход упрощает систему подписок и событий в логике. Например, можно объявить в классе кнопки `o2::Function<void()> onClick;` и подписать на неё несколько обработчиков.\n\n<details>\n<summary>Пример</summary>\n\n```C++\nclass MyButton\n{\npublic:\n\tFunction<void()> onClicked;\n\n    ...\n};\n\nMyButton button;\nbutton.onClicked += []() { ... };\nbutton.onClicked += []() { ... };\nbutton.onClicked += []() { ... };\n```\n</details>\n\n## Обертка приложения [(подробная документация)](/Docs/ru/Architecture/LowLevel/application.md)\n\nКак было описано выше это входная точка и основная система движка. На этапе инициализации она инициализирует другие подсистемы. Далее начинается игровой цикл, который обрабатывается в функции ProcessFrame(). Там вызывается апдейт сцены, инпута и всех остальных подсистем, а так же происходит рендер кадра. Так же в обертке приложения обрабатываются системные сообщения: активация и деактивация, и т.д.\n\nПользователь может вклиниться в любой их этих точек, перегрузив специальные функции в своем кастомном классе приложения\n\n<details>\n<summary>Пример</summary>\n\n```C++\nclass MyApplication: public o2::Application\n{\nprivate:\n    void OnUpdate(float dt) override;\n    void OnDraw() override;\n    void OnActivated() override;\n    void OnDeactivated() override;\n    void OnStarted() override;\n    void OnClosing() override;\n    void OnResizing() override;\n};\n\n\n```\n</details>\n\n## Ассеты [(подробная документация)](/Docs/ru/Architecture/LowLevel/assets.md)\n\nДвижок рассматривает ресурсы (текстуры, звуки, текстовые конфиги и т. д.) как ассеты, поступающие в сыром виде. Для быстроты загрузки в рантайме они предварительно собираются: текстуры упаковываются в атласы и сжимаются, звуки конвертируются, конфиги бинаризируются.\n\nКаждый ассет имеет уникальный `id`, хранящийся в `.meta`-файле рядом с самим ассетом. В этом файле также может быть информация о сжатии и другие данные, которые нельзя разместить в исходном файле. Кроме того, создаётся дерево ассетов, позволяющее эффективно загружать их метаданные.\n\nПроцесс сборки ассетов осуществляет утилита **AssetsBuilder**, отслеживающая изменения ресурсов и обновляющая их собранные версии. Она запускается перед стартом редактора, во время его работы и при сборке финального билда.\n\nДля работы с ассетами предусмотрена подсистема `o2::Assets` (синглтон), доступная из любого места в коде через макрос `o2Assets`. Она загружает дерево ассетов при старте и предоставляет к ним удобный интерфейс. Используются умные ссылки `o2::AssetRef<>`, которые сериализуются, кешируют загрузку и автоматически выгружают ассет, если на него нет активных ссылок.\n\nАссеты могут существовать как отдельные файлы или быть «встроенными» (instance). В последнем случае ассет сохраняется непосредственно внутри сцены или префаба.\n\n<details>\n<summary>Пример</summary>\n\n```C++\nAssetRef<ImageAsset> image = o2Assets.GetAssetRef(id);\nsprite.Load(image);\n```\n</details>\n\n## Рендер [(подробная документация)](/Docs/ru/Architecture/LowLevel/render.md)\n\nПодсистема рендеринга доступна через синглтон `o2Render`. Она может рисовать треугольные меши с материалами (шейдеры, текстуры, параметры (WIP)) и использует батчинг: меши с одинаковыми материалами объединяются и отправляются на рендер одним вызовом. Поддерживается настройка отсечения, стенсил-маски и рендер-таргетов.\n\nСверху над рендером мешей есть абстракции: спрайт, текст, скиннинг-меши, эффекты частиц, Spine-анимации. Все они реализуют `o2::IDrawable`, а объекты с прямоугольными размерами — ещё и `o2::IRectDrawable`. Параметры `o2::IRectDrawable` включают позицию, размер, поворот, скейл, скос или задание трансформа через `o2::Basis`.\n\n- **Спрайты** поддерживают режимы отображения: обычный, 9-slice, tiled, progress filled. Задают цвет и прозрачность, загружаются из текстур.\n- **Текст** работает с растровыми и векторными шрифтами (через FreeType). Есть эффекты CPU (тень, обводка, градиент и т. д.), а также параметры форматирования и выравнивания.\n- **Система частиц** представлена одиночными эмиттерами с набором эффектов. Рендер осуществляется как обычный спрайт или покадровая анимация. Поддерживаются стартовые параметры, а в редакторе можно отмотать эффект назад.\n\nТак же в рендере есть поддержка камер (`o2::Camera`), задающие вьюпорт в логических координатах рендера.\n\n<details>\n<summary>Пример</summary>\n\n```C++\nAssetRef<ImageAsset> imageAsset = o2Assets.GetAssetRef(id);\nauto sprite = mmake<Sprite>(imageAsset);\n...\nsprite->position = Vec2F(10, 10);\nsprite->mode = SpriteMode::FixedAspect;\nsprite->transparency = 0.5f;\n...\nsprite->Draw();\n```\n</details>\n\n## Анимации [(подробная документация)](/Docs/ru/Architecture/LowLevel/animations.md)\n\nВ движке существует встроенная система анимаций и интеграция со Spine. Spine-анимации загружаются из ассета, умеют проигрываться, микшироваться и менять скины.\n\nВстроенный формат тесно интегрирован в движок и позволяет анимировать любые поля (включая пользовательские). Основная единица — **`o2::AnimationClip`**, который может быть сохранён как ассет (`o2::AnimationAsset`). Клипы состоят из треков, где каждый трек анимирует одно поле, определяемое строковым путём (например, `\"myStructure/myFolder/myParameter\"`). Треки включают ключевые кадры с конкретным значением и временем.\n\nДля проигрывания используется **`o2::AnimationPlayer`**: ему передаётся анимационный клип и целевой объект. По строковым путям рефлексия находит требуемые поля. При обновлении времени плеер интерполирует ключевые кадры в треках, обеспечивая плавность при любом фреймрейте.\n\nНа сцене доступен компонент **`o2::AnimationComponent`**, позволяющий одновременно проигрывать несколько анимаций на актёре и смешивать их по весам. Он хранит список состояний (клипов) и переключается между ними.\n\nСверху над ним существует **`o2::AnimationStateGraphComponent`** — анимационный граф состояний. Он содержит узлы (состояния) с несколькими анимационными клипами и переходы, задающие момент старта, длительность и easing-функцию. Разработчик указывает целевую ноду, а граф автоматически выстраивает путь, обрабатывая все переходы и блендинги. Эта система работает и со встроенными, и со Spine-анимациями.\n\nВ редакторе есть специальный редактор встроенных анимаций. [Подробнее](/Docs/ru/Editor/Animation/animation.md).\nТак же анимации возможно конструировать из кода через интерфейс **`o2::Animate`**\n\n<details>\n<summary>Пример</summary>\n\n```C++\nsample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n```\n</details>\n\n## Обработка ввода [(подробная документация)](/Docs/ru/Architecture/LowLevel/input.md)\n\nСистема ввода доступна через синглтон `o2Events`. Она предоставляет базовые обработчики системных событий (нажатие кнопок, положение курсора и т. д.) и высокоуровневую логику (клики, мультитач). Высокоуровневая часть учитывает рендер-отсечение и перекрытие элементов.\n\nДля реализации работы с тачем (кликами, наведением) следует наследоваться от `o2::CursorAreaEventsListener` и реализовать нужные методы (нажатие, отжатие, вход, выход и т. д.). Обязательны два метода:\n1. Проверка условия клика (например, попадает ли курсор в границы объекта).\n2. `OnDraw` — вызывается при отрисовке, чтобы зафиксировать порядок объектов и текущее рендер-отсечение.\n\nДалее система ввода автоматически определяет, на какой объект пришёлся клик, и вызывает соответствующие колбэки.\n\n<details>\n<summary>Пример</summary>\n\n```C++\nclass MyInteractiveObject: public o2::CursorAreaEventsListener\n{\npublic:\n    bool IsUnderPoint(const Vec2F& point) override { return _rectangle.IsInside(point); }\n\n    void Draw()\n    {\n        sprite.Draw();\n\n        o2::CursorAreaEventsListener::OnDrawn();\n    }\n\nprivate:\n    void OnCursorPressed(const Input::Cursor& cursor) override { o2Debug.Log(\"Pressed!\"); }\n    void OnCursorReleased(const Input::Cursor& cursor) override { o2Debug.Log(\"Released!\"); }\n};\n...\nauto object = mmake<MyInteractiveObject>();\n...\nobject.Draw();\n```\n</details>\n\n## Скрипты [(подробная документация)](/Docs/ru/Architecture/LowLevel/scripting.md)\n\nВ движке используется **JerryScript** — компактный и производительный JavaScript-рантайм, который также позволяет писать код на TypeScript при желании иметь статическую типизацию.\n\nСверху JerryScript реализована движковая обёртка, доступная через синглтон `o2Scripts`, и враппер JavaScript-переменных `o2::ScriptValue`.  \n- `o2Scripts` позволяет загружать и выполнять скрипты из файлов и строк, а также работать с глобальным пространством имён через `o2::ScriptValue`.  \n- `o2::ScriptValue` отражает любую JS-переменную (число, строку, булевое, функцию, массив или объект) и предоставляет удобный интерфейс для взаимодействия с этими типами, а также с классами и прототипами.\n\nБиндинг типов C++ выполняется за счёт механизма рефлексии: при запуске приложения движок регистрирует необходимые классы в глобальном пространстве рантайма JavaScript, используя сгенерированную метаинформацию.\n\n<details>\n<summary>Пример</summary>\n\n```C++\no2Scripts.GetGlobal().SetProperty(\"myValue\", 256);\no2Scripts.Eval(\"print('myValue is ' + myValue)\");\n...\no2Scripts.Eval(\"let myObject = new MyObject\");\nauto myJSObject = o2Scripts.GetGlobal().GetProperty(\"myObject\");\nauto myProperty = myJSObject[\"propName\"];\nif (myProperty.GetValueType() == o2::ScriptValue::ValueType::Number)\n{\n    float myPropertyValue = myProperty.ToNumber();\n    ...\n}\n```\n</details>\n\n## Физика [(подробная документация)](/Docs/ru/Architecture/LowLevel/physics.md)\n\nВ o2 встроен физический движок Box2D. При старте приложения инициализируется физический мир, в который можно добавлять объекты через примитивы сцены. Для игрового мира можно настраивать масштабирование движковой единицы пространства в мир физики, параметры точности солвера и коллизии между слоями.\n\nБазовый примитив на сцене — это `o2::RigidBody`. В нём задаются физические параметры тела, и оно интегрируется в физический мир. К нему могут быть прикреплены коллайдеры — `o2::ICollider`, такие как `BoxCollider`, `CircleCollider` и т. п.\n\nРабота и настройка физики происходит через сцену и редактор.\n\n## Звукци (TBD)\n\nНа текущий момент не реализованы в движке\n\n## Сцена и акторы [(подробная документация)](/Docs/ru/Architecture/HighLevel/scene.md)\n\nНад всеми подсистемами работает система сцены, доступная через синглтон `o2Scene`. В ней хранится список акторов (`o2::Actor`), имеющих свои компоненты, определяющие логику и отрисовку. Акторы могут относиться к разным типам, например `o2::Widget` (UI), `o2::RigidBody` (физическое тело) и другие пользовательские классы.\n\nСцену можно сохранять и загружать из ассета, включая инкрементальную загрузку. Логически она существует в единственном экземпляре (по крайней мере, на данный момент). Сама сцена обновляется и рендерится автоматически.\n\n### Акторы\n\nКаждый актор (`o2::Actor`) имеет трансформацию, флаги видимости и активности, а также содержит дочерних акторов и компоненты. Дочерние акторы наследуют трансформацию родителя и его флаги. Если родительский актор сдвигается, то все потомки тоже смещаются по иерархии. То же самое происходит при отключении или включении акторов.\n\nВ движке уже есть набор базовых типов: спрайты, анимации, камеры, частицы, UI и т. д. Разработчик может унаследовать собственные классы от `o2::Actor` и переопределить необходимые методы (`OnStart`, `OnEnabled/Disabled`, `OnDraw`, `OnUpdate` и т. п.). Это позволяет трактовать акторы как конкретные сущности с определёнными целями (например, `o2::Button` наследуется от `o2::Widget`, что в свою очередь является потомком `o2::Actor`).\n\n### Компоненты\n\nАкторы могут содержать список компонентов, определяющих их логику и отрисовку. Для создания пользовательской компоненты нужно унаследовать её от `o2::Component` и реализовать нужный функционал (`OnStart`, `OnEnabled/Disabled`, `OnDraw`, `OnUpdate` и т. д.). Такой подход позволяет реализовывать логику по принципу композиции: один базовый актор может включать несколько компонентов.\n\n### Прототипы\n\nДля ускорения и упрощения разработки используется механизм прототипов — аналогичный префабам в Unity3D. Актор может быть сохранён в ассет, становясь прототипом, от которого можно наследовать другие прототипы, внося изменения относительно базового. Из прототипа легко создать множество копий на сцене, а затем при необходимости модифицировать их.\n\nТакой механизм особенно полезен в UI. Можно создать базовый прототип кнопки, настроить её графику и логику, а затем сделать несколько наследованных прототипов (зелёная, синяя, красная). Если нужно изменить, к примеру, цвет синей кнопки на фиолетовый, это делается в одном месте — в самом прототипе. А изменения в базовом прототипе распространятся на все места, где он используется.\n\n### Отрисовка сцены\n\nРендер сцены осуществляется с помощью камер и слоёв:\n- Сцена делится на именованные слои, которым задаётся порядок отрисовки.\n- На сцену помещаются камеры (как минимум одна), каждая из которых имеет свою трансформацию и список слоёв для рендеринга.\n\nАкторы привязываются к слоям и имеют числовой приоритет. Он задаётся в самом акторе. При желании приоритет и слой можно наследовать от родителя, тогда дочерние акторы рисуются сразу после родителя, поддерживая его слой и приоритет. Если наследование не включено, они выводятся отдельно на своём слое согласно сортировке. Таким образом, по умолчанию иерархия определяет порядок отрисовки, но при необходимости можно вручную влиять на это при помощи приоритетов и слоёв.\n\n### Редактор\n\nДля редактирования сцены, прототипов, компонентов и ассетов существует встроенный редактор, включающий ряд специализированных утилит (настройка ассетов, лог, окно параметров, окно игры, иерархия сцены, редактор самой сцены и анимаций). [Подробнее о редакторе](/Docs/ru/Editor/editor.md).\n\n## UI [(подробная документация)](/Docs/ru/Architecture/HighLevel/ui.md)\n\nИнтерфейсы в движке являются частью сцены и основаны на её парадигме. Базовым элементом UI служит `o2::Widget` (наследник `o2::Actor`), который переопределяет логику актора:\n\n- **Адаптивная верстка:** В трансформацию добавляются якоря, позволяющие гибко привязывать виджет к родителю для построения адаптивного интерфейса.\n<img src=\"HighLevel/ui anchors.gif\" width=\"30%\">\n\n- **Внутренние виджеты:** Внутри виджета могут находиться дочерние контролы, не являющиеся полноправными «детьми» в общей иерархии, что удобно для комплексных UI-элементов (например, окно с хедером и кнопкой закрытия).\n- **Система слоёв:** Виджет содержит слои (`o2::WidgetLayer`), которые имеют собственную графику (спрайт, текст и т. д.), трансформацию с якорями, иерархию вложенных слоёв и имена. Слои представляют упрощённый аналог акторов, облегчающий отрисовку и не загромождающий иерархию сцены.\n- **Анимационные состояния:** У виджета есть набор независимых состояний (по имени), каждое из которых может включаться/выключаться. При переключении состояния проигрывается анимация, заданная в коде или в редакторе (см. раздел анимаций).\n\n### Layout-контейнеры\nДля создания адаптивного интерфейса используются специальные виджеты-контейнеры (`o2::HorizontalLayout`, `o2::VerticalLayout`, `o2::GridLayout`). Они упорядочивают дочерние элементы согласно заданным правилам, растягивая/сжимая их или подстраиваясь под размеры.\n\n<img src=\"HighLevel/layouts.gif\" width=\"30%\">\n\n### Набор готовых виджетов\nВ движке есть множество базовых UI-контролов: картинка, текст, кнопка, чекбокс, текстовое поле, прогресс-бары, скроллеры, списки (обычные и выпадающие), дерево, попап, окно и т. д.\n\nПоскольку UI-подсистема — это расширение системы сцены, её элементы могут сочетаться с любыми игровыми объектами. Собственно, весь редактор o2 построен на этой системе UI ([подробнее в статье на Habr](https://habr.com/ru/articles/521306/))."
  },
  {
    "path": "Docs/ru/Editor/Animation/animation.md",
    "content": "## Animation. Окно анимации\n![animation](animation.png)\n\nВ этом окне редактируется ассет анимаций. Функционал аналогичен другим редакторам анимаций, например Spine.\n\nВ окне есть тулбар с типичным для таких редакторов функционалом: просмотр, запись, прокрутка, плей/стоп, режим кривых, список параметров и добавление ключа.\n\nСлева в окне отображен список параметров, повторяющих иерархию на сцене (4). Справа включи на таймлайне (3). Сверху от таймлайна управление временем анимации (2).\n\n### Компонента анимации\nЧтобы добавить анимацию на актор, нужно добавить компоненту Animation через меню добавления компонент.\n\n<img src=\"image.png\" width=\"50%\">\n\nВ этом компоненте задается список анимаций (1), которые могут проигрываться одновременно. \n\nЕсли в нескольких анимациях анимируются одни и те же параметры, то вычисляется среднее, в зависимости от веса (Weight). Таким образом можно смешивать несколько анимаций и делать плавные переходы между ними.\n\nВ каждой анимации задается ссылка ассет на анимацию (4). Ее можно выбрать из готового ассета, или создать ассет inplace.\n\nЧтобя отредактировать анимацию, можно нажать иконку карандаша (3) на заголовке анимации \n\n### Параметры анимации\nЧтобы заанимировать какой-то параметр, нужно добавить его в анимацию. Для этого нужно кликнуть кнопку с полосками, откроется окно доступных параметров.\n<img src=\"image-1.png\" width=\"50%\">\n\nВ этом списке с помощью кнопок (+) и (-) можно добавлять или удалять анимируемые параметры. Анимировать можно все, что отображается в окне настроек Properties.\n\n### Ключ и параметры\n<img src=\"image-2.png\" width=\"50%\">\\\nДля каждого параметра выводится поле редактирования слева. На таймлайне столбиками отмечены ключи, в которых параметр явно задан. Между ключами происходит интерполяция, в зависимости от настройки кривой\n\n### Настройка кривых\n![Alt text](image-3.png)\nПо клику на указанную на скриншоте кнопку в тулбаре, таймлайн перезодит в режим кривых.\n\nВ нем отображаются кривые для числовых параметров. Они представляют из себя кривые безье, и редактируются как в аналогичных редакторах с помощью мышки.\n\nЗум и скролл делается как в сцене, левой кнопкой мыши и колесиком."
  },
  {
    "path": "Docs/ru/Editor/Assets/assets.md",
    "content": "## Assets. Окно ассетов\n![assets](assets.png)\n\nВ этом окне можно увидеть ассеты, которые есть в игре, отредактировать их или \"вытащить\" на сцену.\n\nСлева в окне отображена иерархия папок (2). Выбрав папку, в окне файлов (3) покажутся ассеты в выбранной папке. По кнопке (4) можно включать и выключать отображение папок.\n\nСверху есть фильтр для поиска по имени (1).\n\nАссеты и папки можно перемещать с помощью drag'n'drop в папки. Можно копировать, вставлять и удалять. Функционал практически аналогичен типичному обозревателю файлов в ОС.\n\nСоздавать новые ассеты можно через контекстное меню, пункт Create.\n\nПо клику на ассет его можно выделить, и тогда в окне Properties покажутся его настройки. Там, например, можно изменять параметры атласов и текстур, стили шрифтов.\n\nДля некоторых типов ассетов работает drag'n'drop в иерархию или сцену: текстуры и прототипы. Для этого их просто нужно перетащить в нужное место.\n\n### Настройка текстур и атласов\n\nВыбрав нужный атлас или текстуру можно настроить их параметры. настройки отобразятся в окне Properties. Как только выделение с файла будет снято - он будет автоматически созранен (будет изменено на ручное сохранение)\n\n<img src=\"image.png\" width=\"50%\">\n\nПри выборе текстуры отображается ее превью, поверх которого можно отредактировать отступы для 9-slice спрайта.\n\nВ поле Atlas задается ссылка на атлас, в который попадет текстура. Чтобы задать атлас, нужно его перетащить drg'n'drop-ом в это поле из окна ассетов.\n\n<img src=\"atlas.png\" width=\"50%\">\n\nПри выборе атласа показываются его параметры, так же в окне Properties.\n\nВ нем есть общие настройки атласа (Common) и платформо-зависимые (вам это не нужно по идее). Внутри общих настроек можно задать максимальный размер страницы атласа (может быть упакован в несколько страниц), формат сжатия и отступы для текстур при упаковке.\n"
  },
  {
    "path": "Docs/ru/Editor/Game/game.md",
    "content": "## Game. Окно игры\n<img src=\"game.png\" width=\"30%\">\n\nВ этом окне отображается игра, как будто она запущена отдельным приложением. Отрисовка происходит честно через камеры. Обрабатываются клики мышкой.\n\nСверху в панели можно выбрать эмулируемое разрешение экрана"
  },
  {
    "path": "Docs/ru/Editor/Log/log.md",
    "content": "## Log. Окно логов\n![log](log.png)\n\nВ этом окне отображаются логи, выведенные через систему отладки движка. Логи разделены по важности:\n- обычные\n- предупреждения (желтый)\n- ошибки (красный)\n\nИ выведены списком в порядке их появления (1).\n\nЛоги можно очистить (2), отключить отображение по важности (3) (4) (5).\n\nВ строке снизу показано последнее сообщение лога (6)."
  },
  {
    "path": "Docs/ru/Editor/Properties/properties.md",
    "content": "## Properties. Окно настроек\n<img src=\"properties.png\" width=\"30%\">\n\nВ этом окне происходит настройка выбранной сущности. Это может быть ассет, какие-либо настройки или актор. на скриншоте показан пример актора с типом Widget.\n\nОсобенностбю является возможность редактирования нескольких выбранных сущностей сразу. В таком случае редактор пытается отобращить общие поля и общие значения. Если он не находит общего, или эти значения различаются, то ничего не отображается или показывается прочерк вместо значения\n\nРедактор умеет показывать много типов полей, включая пользовательские:\n- числа, строки, bool, enum\n- массивы\n- вложенные объекты по значению\n- вложенные обхекты по указателю. Доступно удаление и создание с выбором типа\n- ссылки на другие акторы. Назначаются через drag'n'drop из иерархии\n- ссылки на ассеты. Назначаются через drag'n'drop из окна ассетов, либо создаются inplace. Это значит ассет сохраняется вместе с актором.\n\n### (1) Заголовок\nЗдесь отображена основная информация по актору - активность (кружок слева сверху), имя, теги, слой, залочка. Все эти контролы доступны для редактирования.\n\n### (2) Трансформация\nЗдесь отображаются параметры локальной трансформации выбранного актора:\n- Позиция\n- Pivot\n- Размеры\n- Скейл\n- Поворот и слой\n- Layout: настройка динамической верстки для виджетов\n\n### (3) Настройки актора\nЕсли редактируется не сам o2::Actor, а его наследник, тогда показываются его параметры. На примере в скриншоте показан коэффициент прозрачности и список состояний виджета.\n\nНастройки берутся их актора через рефлексию. По умолчанию показываются все публичные поля. Так же отмеченные специальным тегом в коде\n\n### (4) Компоненты\nДалее списокм поблочно показаны параметры компонентов. Точно так же показываются публичные поля, заданные в компоненте.\n\nЧерез крестик можно удалить компонент\n\n### (5) Меню добавления компоненты\nПо клику в это меню оно раскрывается, внутри показано дерево компонент. Через строку ввода можно отфильтровать по имени. По дабл-клику или клавише Enter выбранный тип компонента добавляется на выбранный актор\n\n\n"
  },
  {
    "path": "Docs/ru/Editor/Scene/scene.md",
    "content": "## Scene. Окно сцены\n<img src=\"scene.png\" width=\"50%\">\n\nВ этом окне отображаются акторы на сцене в порядке расположения на слоях, вне зависимости от камеры. Сцену можно скроллить и зумить. Скролл через зажатую левую кнопку мыши, зум колесиком.\n\nна фоне нарисована сетка, которая показывает кратные 10ти юниты сцены.\n\nЛевой кнопкой мыши можно выбирать акторы. Если кликать в одну точку, выбор происходит циклически от верхнего к нижнему. Таким образом можно выбрать нужную ноду в иерархии кликнув несколько раз.\n\nТак же отображается активный тул (2), выбранный в тулбаре. Он интерактивный, работает так же как и в других редакторах.\n\nУ активного тула может включаться специальный режим через зажатике клавиш Shift/Ctrl/Alt. Среди них - снеппинг, выравнивание по осям и др.\n\n### Слои\nВ окне сцены можно настроить слои и их порядок. Для этого нужно кликнуть Layers сверху (1).\n\nВ выпадающем меню можно их пересортировать через drag'n'drop, создать новый, удалить старый, переименовать слой через дабл-клик, включить/выключить галкой."
  },
  {
    "path": "Docs/ru/Editor/Tree/tree.md",
    "content": "\n## Tree. Окно иерахии\n\nОкно иерархии может работать в двух режимах: иерархия сцены и порядок отрисовки. режимы переключаются по кнопке (2).\n\n### Режим сцены:\n<img src=\"tree.png\" width=\"30%\">\n\nОсновная часть окна - это иерархия сцены. Каждая строка - отдельный актор. Сверху есть фильтр по имени (1).\n\nВ строке каждого актора (3) отображается его имя, которое можно редактировать по дабл-клику.\n\nТак же отображается его активность (5). Яркий заполненный кружок - нода активна. Пустой тусклый кружок (6) - нода не активна. Полный, но тусклый кружок (7) - сама нода активна, но тк кто-то из ее родителей не активен, она считается не кативной.\n\nЗалочка выбора в сцене (4). Иногда полезно отключать выбор в сцене для некоторых частей иерархии, чтобы они не мешались.\n\nТак же может быть отображен значок звена цепи (8) - это значит что актор создан из прототипа. По клику на эту иконку, в окне Assets подсветится прототип\n\nАкторы можно перетаскивать через drag'n'drop. Для этого нужно зажать мышкой нужный актор (или несколько) и начать перемещать. Наведя на нужно место нужно отпустить мышку.\n\n<img src=\"tree_context.png\" width=\"20%\">\n\nПри нажатии правой кнопки мыши откроется контекстное меню. В нем обозначены хоткеи на доступные действия. Для их работы окно Tree или Scene должны быть в фокусе. Если они в фокусе - то выбранные акторы подсечиваются зеленым цветом, иначе серым.\n\nЧерез контекстное меню можно создавать новые акторы. Для этого можно выбрать Create empty actor, для создания пустого актора, либо выбрать нужный тип через меню Create.\n\n### Режим порядка отрисовки\n<img src=\"tree_order.png\" width=\"30%\">\n\nВ этом режиме отображается иерархия отрисовки и ее порядок. На первом уровне показан список камер. В данном примере она одна - Camera.\n\nВнутри каждой камеры есть слои, в порядке их отрисовки - Background, Reels, Frame, GUI.\n\nВнутри слоев отсортированный список рисуемых сущностей, с приоритетом в конце строки. С 0-м приоритетом всегда отображается Layer roots - это контейнер обхектов, у которых не установлен числовой приоритет.\n\nЭти сущности тоже могут содержат в себе сущности, если они наследуют приоритет отрисовки от родителя.\n\nЦветом отмечены раздельные батчи, в конце которых добавляется строка End of batch #N, где N - это номер батча\n\nДля изменения очередности отрисовки можно перемещать объекты через drag'n'drop."
  },
  {
    "path": "Docs/ru/Editor/editor.md",
    "content": "## Редактор\n\nРедактор - это место, где верстается сцена и создается контент для игры. \n\nВ нем есть внутренние окна, которые могут быть прикреплены друг другу, а так же вложены в несколько вкладок. Эти окна можно перемещать, прицеплять к другим окнам (таскать за заголовок окна) и складывать во вкладки (дабл-клик в заголовок).\n\nРедактор может работать в двух режимах: редактирование и игра. В первом режиме сцена загружена, но не получает апдейт и как бы находится в статичном состоянии. В таком режиме ее можно редактировать и сохранять. Во втором режиме - режиме игры - можно проверить работу сцены, все отображаются в редакторе, но происходит обновление и обрабатывает инпут в окне игры. В это время сцену сохранять нельзя.\n\nРассмотрим окна и элементы, которые есть в редакторе в раскладке по умолчанию:\n\n![editor](editor.png)\n\n- (1) панель запуска сцены. При нажатии на Play оно разворачивается и позволяет поставить игру на паузу и проиграть один кадр. Выпадающий список не функционален, подразумевает запуск на других устройствах.\n\n- (2) панель утилит. Выбирается активный тул, который переключает режим редактирования в сцене\n\n- (3) [Tree](/Docs/ru/Editor/Tree/tree.md). Окно иерархии сцены. Показыввает акторы и их детей в сцене\n\n- (4) [Scene](/Docs/ru/Editor/Scene/scene.md). Окно редактирования сцены\n\n- (5) [Properties](/Docs/ru/Editor/Properties/properties.md). Окно настроек выбранного объекта\n\n- (5) [Game](/Docs/ru/Editor/Game/game.md). Окно игры, эмулирует вывод графики и обработку ввода как будто приложение запущено отдельно\n\n- (6) [Assets](/Docs/ru/Editor/Assets/assets.md). Окно ассетов, в нем можно перемещать, редактировать и просматривать ассеты\n\n- (6) [Log](/Docs/ru/Editor/Log/log.md). Окно лога, в него выводятся отладочные сообщения\n\n- (6) [Animation](/Docs/ru/Editor/Animation/animation.md). Редактор анимации, в нем редактируются ключи, параметры и кривые"
  },
  {
    "path": "Docs/ru/main.md",
    "content": "## Мотивация\n\nДвижок создается как профессиональный инструмент для разработки мобильных 2D игр. Его дизайн строится из двух ключевых направлений: скорость разработки и производительность. \n\nСкорость разработки обеспечивается удобством API, редактором и скриптовым языком. \n- Удобное API означает что оно покрывает все необходимые кейсы разработчика, его легко понять и использовать. В нем минимум подводных камней, оно интуитивно понятно. Во многом ориентиром было внутреннее API движка Unity3D.\n- Редактор предоставляем весь необходимый функционал для разработки игр: сцена, ассеты, параметры, анимации, частицы. Он удобный и следует современным стандартам движокв с редакторами: Unity3D, Unreal Engine, Unigine, etc\n- Скриптовый язык упрощает написание игровой логики, делает API движка еще доступнее. В о2 для скриптов выбран JavaScript и TypeScript, т.к. это довольно распространенные языки, особенно среди Web разработчиков, у которых очень мало доступных игровых движков\n\nПроизодвительность обеспечивается тем что сам движок написан на С++ и позволяет писать игровую логику на С++. Так же в движке есть разделение на уровни абстракций, и для достижения максимальной производительности разработчик может использовать низкоуровневые подсистемы движка напрямую: рендер, загрузка ресурсов и тд.\n\nКомбинация всех этих подходов обеспечивает эффективную разработку игр, быстрое прототипирование, при этом сохраняя высокую планку технического качества\n\n## Общая концепция движка\n\nБазовой концепцией движка является сцена с компонентным подходом. В сцене выстраивается древовидная структура из акторов, имеющих определенный тип. Акторы имеют трансформацию, зависящую от родителя, а так же набор компонент, определяющих поведение и отрисовку. Отрисовка сцены делится на слои, акторы могут занимать определнные слои или наследовать приоритет отрисовки от родителя.\n\nСцена и ее ассеты настраиваются в редакторе. Код акторов, компонент и игры пишется на С++ или скриптовом языке (JS/TS).\n\nПодсистема сцены является врехнеуровневой и одна основывается на низкоуровневых подсистемах: ассеты, приложение, рендер, анимации, физика, скрипты, инпут. При работе с верхним уровнем можно использовать низкий уровень напрямую для достижения наибольших оптимизаций. Например, если требуется отобразить большое количество спрайтов, вместо использования множества тяжеловесных акторов использовать один актор, отрисовывающий множество спрайтов напрямую через низкоуровневый рендер\n\nНизкий уровень основывается на утилитах, обеспечивающих поддержку всех подсистем: менеджмент памяти, рефлексия, сериализация, проперти, математика, файловая система, отладка и логгирование.\n\n## Концепция интеграции о2 в другие движки\n\nДвижок о2 можно использовать не только как самостоятельный движок, но и как встраиваемый. По сути он встраивается в игровой цикл другого движка, в его рендер и обработку инпута, и взаимодействет с ним с определенными разграничениями.\n\nЕсть два подхода: главенстрвующий и ведомый. В первом случае движок о2 оборачивает внутри себя другой движок, подчиняя себе его обработку инпута, обновление кадра и рендеринг. Это предпочтительный способ. Во втором случае все наоборот, о2 встраивается в игровой цикл другого движка.\n\nКак правило другие движки так же имеют иерархию сцены. Движок о2 так же может работать и с ней, если отнаследовать базовый объект иерархии движка от определенного интерфейса о2. Это позволит отобразить иерархию другого движка прямо в редакторе о2, а так же даст возможность редактировать параметры объектов. Они станут доступны через рефлексию\n\nВажно чтобы в другом движке использовалось то же render api, что и в o2. В крайнем случае возможна реализация подистсемы рендера под конкретную имплементацию в другом движке. Ведь по сути от нее нужен вывод мешей треугольников с текстурой и шейдером. Как правило в других движках этот функционал вынесен в отдельное API.\n\n## Документация\n- [Архитектура](/Docs/ru/Architecture/architecture.md)\n- [Редактор](/Docs/ru/Editor/editor.md)\n- [Цикл видео-туториалов по настройке тестовой сцены слот-игры](https://drive.google.com/drive/folders/1m-lgSaM2hYQxbKnIwymDfMCe3SzjKrP1?usp=sharing)\n"
  },
  {
    "path": "Editor/Assets/BasicAtlas.atlas",
    "content": "{\n    \"mPages\": [\n        {\n            \"mSize\": {\n                \"x\": 2048,\n                \"y\": 2048\n            },\n            \"mImagesRects\": [\n                {\n                    \"Key\": \"32ad3f000a6b5fda39ad54624dcd1faa\",\n                    \"Value\": {\n                        \"left\": 350,\n                        \"bottom\": 1776,\n                        \"right\": 370,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"4ca64f006ea3650561c405895d7c75bf\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1884,\n                        \"right\": 106,\n                        \"top\": 1934\n                    }\n                },\n                {\n                    \"Key\": \"57ac6501709c48d3787b437546946c28\",\n                    \"Value\": {\n                        \"left\": 15,\n                        \"bottom\": 1560,\n                        \"right\": 65,\n                        \"top\": 1610\n                    }\n                },\n                {\n                    \"Key\": \"030001020f840bd92b4509cd2d577559\",\n                    \"Value\": {\n                        \"left\": 1645,\n                        \"bottom\": 1800,\n                        \"right\": 1665,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"478514024c9c0cb854b9126c2f2d2607\",\n                    \"Value\": {\n                        \"left\": 1961,\n                        \"bottom\": 1830,\n                        \"right\": 1981,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"72381902329400821187457f66005e84\",\n                    \"Value\": {\n                        \"left\": 997,\n                        \"bottom\": 1800,\n                        \"right\": 1017,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"36942f0200314c5e55a2550f113325d4\",\n                    \"Value\": {\n                        \"left\": 422,\n                        \"bottom\": 1800,\n                        \"right\": 442,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"307655027af95f14370c2ffc61632f01\",\n                    \"Value\": {\n                        \"left\": 575,\n                        \"bottom\": 1884,\n                        \"right\": 600,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"1b293703451e37d706fb7748469e08bb\",\n                    \"Value\": {\n                        \"left\": 1046,\n                        \"bottom\": 1776,\n                        \"right\": 1066,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"6c7d7204331f14d86774363220a767b0\",\n                    \"Value\": {\n                        \"left\": 661,\n                        \"bottom\": 1858,\n                        \"right\": 681,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"52e145054c0f496f3aa67d424e485af4\",\n                    \"Value\": {\n                        \"left\": 1265,\n                        \"bottom\": 1830,\n                        \"right\": 1286,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"31a9020630255cc11b236fe16025516a\",\n                    \"Value\": {\n                        \"left\": 1525,\n                        \"bottom\": 1800,\n                        \"right\": 1545,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"19f1480664de4c0b1d4f58ef04ba19e4\",\n                    \"Value\": {\n                        \"left\": 518,\n                        \"bottom\": 1800,\n                        \"right\": 538,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"4e5b4e066f10548e335210236af46e01\",\n                    \"Value\": {\n                        \"left\": 1722,\n                        \"bottom\": 1830,\n                        \"right\": 1742,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"49be56066b956738561b3410432148f6\",\n                    \"Value\": {\n                        \"left\": 592,\n                        \"bottom\": 1938,\n                        \"right\": 622,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"699b04077c1b0a016a8f17de78fb4bf8\",\n                    \"Value\": {\n                        \"left\": 1772,\n                        \"bottom\": 1992,\n                        \"right\": 1812,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"733601084caf34553ee648723c4f35be\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1128,\n                        \"right\": 12,\n                        \"top\": 1178\n                    }\n                },\n                {\n                    \"Key\": \"681b1d0846ca2cf9407570075db31a2d\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1290,\n                        \"right\": 52,\n                        \"top\": 1340\n                    }\n                },\n                {\n                    \"Key\": \"32794f087da131ca780428ad6fd463fa\",\n                    \"Value\": {\n                        \"left\": 473,\n                        \"bottom\": 1918,\n                        \"right\": 485,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"2b19000955c963fd6c0b0af07fae2676\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1992,\n                        \"right\": 65,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"3ecc3c09309b6acd07400dab40ba53a5\",\n                    \"Value\": {\n                        \"left\": 1429,\n                        \"bottom\": 1800,\n                        \"right\": 1449,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"142469090bcb20c24bd227f674f20695\",\n                    \"Value\": {\n                        \"left\": 2029,\n                        \"bottom\": 1800,\n                        \"right\": 2039,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"41df300a33bc6fe365c7553102276156\",\n                    \"Value\": {\n                        \"left\": 1169,\n                        \"bottom\": 1830,\n                        \"right\": 1189,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"6371320a681e22eb5e37519315ad40b5\",\n                    \"Value\": {\n                        \"left\": 562,\n                        \"bottom\": 1830,\n                        \"right\": 582,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"2640510a17026a0e32b31efd3c402c0d\",\n                    \"Value\": {\n                        \"left\": 329,\n                        \"bottom\": 1918,\n                        \"right\": 341,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"788e1b0b00887b2d07756cbf62855cb3\",\n                    \"Value\": {\n                        \"left\": 297,\n                        \"bottom\": 1918,\n                        \"right\": 309,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"1f344e0b73185347370b0778377d49a9\",\n                    \"Value\": {\n                        \"left\": 958,\n                        \"bottom\": 1938,\n                        \"right\": 988,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"1f21370c782109b823d11e4a317c06ac\",\n                    \"Value\": {\n                        \"left\": 1022,\n                        \"bottom\": 1776,\n                        \"right\": 1042,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"32a2400c7dcb7aaf29e3729e0015524c\",\n                    \"Value\": {\n                        \"left\": 1643,\n                        \"bottom\": 1858,\n                        \"right\": 1663,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"36e2240d67b63628380f00e10ff525e4\",\n                    \"Value\": {\n                        \"left\": 948,\n                        \"bottom\": 1830,\n                        \"right\": 968,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"07df580d646f523814fb1dfa1a032880\",\n                    \"Value\": {\n                        \"left\": 662,\n                        \"bottom\": 1776,\n                        \"right\": 682,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"2b72590d15f550c512e446de2cd73200\",\n                    \"Value\": {\n                        \"left\": 374,\n                        \"bottom\": 1858,\n                        \"right\": 394,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"2cfd7d0d00a7628202907e0d10d33253\",\n                    \"Value\": {\n                        \"left\": 1434,\n                        \"bottom\": 1830,\n                        \"right\": 1454,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"42f7050e392b57a01bda55e42a101505\",\n                    \"Value\": {\n                        \"left\": 106,\n                        \"bottom\": 322,\n                        \"right\": 206,\n                        \"top\": 422\n                    }\n                },\n                {\n                    \"Key\": \"2bea1b0e0dc334ef4d7d73907776492b\",\n                    \"Value\": {\n                        \"left\": 686,\n                        \"bottom\": 1776,\n                        \"right\": 706,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"702f3b0e291b134e7fe656243bd33b7d\",\n                    \"Value\": {\n                        \"left\": 974,\n                        \"bottom\": 1776,\n                        \"right\": 994,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"51ce450e4dde5a940e313b1f579833ec\",\n                    \"Value\": {\n                        \"left\": 558,\n                        \"bottom\": 1938,\n                        \"right\": 588,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"121e600f2a8b13aa511c2b4a11693ee9\",\n                    \"Value\": {\n                        \"left\": 138,\n                        \"bottom\": 1830,\n                        \"right\": 162,\n                        \"top\": 1854\n                    }\n                },\n                {\n                    \"Key\": \"5ffb001041e4477b5e952bda0c994001\",\n                    \"Value\": {\n                        \"left\": 1571,\n                        \"bottom\": 1858,\n                        \"right\": 1591,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"591f03127b42058b52b7551d506b43d4\",\n                    \"Value\": {\n                        \"left\": 302,\n                        \"bottom\": 1938,\n                        \"right\": 342,\n                        \"top\": 1978\n                    }\n                },\n                {\n                    \"Key\": \"68ca46120340458a6165262e65215b32\",\n                    \"Value\": {\n                        \"left\": 134,\n                        \"bottom\": 1858,\n                        \"right\": 154,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"4b426c1230e851bb43645f874af90c0f\",\n                    \"Value\": {\n                        \"left\": 350,\n                        \"bottom\": 1858,\n                        \"right\": 370,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"5a320d131c7e7d0e31c272165b195cd1\",\n                    \"Value\": {\n                        \"left\": 755,\n                        \"bottom\": 1830,\n                        \"right\": 776,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"27c90e13537260835a33574067e879b0\",\n                    \"Value\": {\n                        \"left\": 1549,\n                        \"bottom\": 1800,\n                        \"right\": 1569,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"7b5d00142e125b0b2fcb6ab768015af3\",\n                    \"Value\": {\n                        \"left\": 643,\n                        \"bottom\": 2036,\n                        \"right\": 649,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"2b7c7314787e224a2d4e36000b1f2754\",\n                    \"Value\": {\n                        \"left\": 518,\n                        \"bottom\": 1776,\n                        \"right\": 538,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"2e1f151556f90d6c00794feb232c0812\",\n                    \"Value\": {\n                        \"left\": 398,\n                        \"bottom\": 1858,\n                        \"right\": 418,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"6bd46d174c5778235f036c466a14569c\",\n                    \"Value\": {\n                        \"left\": 566,\n                        \"bottom\": 1776,\n                        \"right\": 586,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"4bba69197e1d50a716f838f4297a08c6\",\n                    \"Value\": {\n                        \"left\": 1835,\n                        \"bottom\": 1858,\n                        \"right\": 1855,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"2b793b1a747167266984178a32e32d37\",\n                    \"Value\": {\n                        \"left\": 1938,\n                        \"bottom\": 1830,\n                        \"right\": 1957,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"5ed83b1a2d9554e654d616f1125770aa\",\n                    \"Value\": {\n                        \"left\": 1023,\n                        \"bottom\": 1918,\n                        \"right\": 1034,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"31d11d1b4ae008106f8569b959e72e8c\",\n                    \"Value\": {\n                        \"left\": 854,\n                        \"bottom\": 1776,\n                        \"right\": 874,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"37cf2b1b28ac5e1b0272688960da3faa\",\n                    \"Value\": {\n                        \"left\": 350,\n                        \"bottom\": 1800,\n                        \"right\": 370,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"0804451b664226dd06421c3039062bea\",\n                    \"Value\": {\n                        \"left\": 398,\n                        \"bottom\": 1800,\n                        \"right\": 418,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"53b81d1c1d7b359b7833213467275026\",\n                    \"Value\": {\n                        \"left\": 129,\n                        \"bottom\": 1918,\n                        \"right\": 144,\n                        \"top\": 1933\n                    }\n                },\n                {\n                    \"Key\": \"1813201c420a5b7b05ae23f244553190\",\n                    \"Value\": {\n                        \"left\": 1985,\n                        \"bottom\": 1830,\n                        \"right\": 2005,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"1b582c1d0d7c08d64ec65c182cf83ea7\",\n                    \"Value\": {\n                        \"left\": 394,\n                        \"bottom\": 1830,\n                        \"right\": 414,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"7fae2e1d1d9245d2651a47c07c2868cb\",\n                    \"Value\": {\n                        \"left\": 890,\n                        \"bottom\": 1938,\n                        \"right\": 920,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"69204e1d69a568237d6a5d6a1b7a3ef1\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 110,\n                        \"right\": 13,\n                        \"top\": 214\n                    }\n                },\n                {\n                    \"Key\": \"30c44f1d3a020549091368ee10242557\",\n                    \"Value\": {\n                        \"left\": 230,\n                        \"bottom\": 1800,\n                        \"right\": 250,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"72082a1f02b2369a6ebe44f326513324\",\n                    \"Value\": {\n                        \"left\": 1884,\n                        \"bottom\": 1800,\n                        \"right\": 1904,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"200f651f024d34763b852794303a23d2\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1938,\n                        \"right\": 52,\n                        \"top\": 1988\n                    }\n                },\n                {\n                    \"Key\": \"6eab1f21570e74c279d81a6629376682\",\n                    \"Value\": {\n                        \"left\": 1097,\n                        \"bottom\": 1830,\n                        \"right\": 1117,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"1a36752146b9557f7cd761ba79d47e94\",\n                    \"Value\": {\n                        \"left\": 158,\n                        \"bottom\": 1800,\n                        \"right\": 178,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"3ed409235a342972306c7b0933647511\",\n                    \"Value\": {\n                        \"left\": 1331,\n                        \"bottom\": 1858,\n                        \"right\": 1351,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"6e971e235a7c5b2101a4317503c85537\",\n                    \"Value\": {\n                        \"left\": 16,\n                        \"bottom\": 1128,\n                        \"right\": 66,\n                        \"top\": 1178\n                    }\n                },\n                {\n                    \"Key\": \"1db20a2430920e752fbe48f84c6c26f4\",\n                    \"Value\": {\n                        \"left\": 924,\n                        \"bottom\": 1884,\n                        \"right\": 949,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"6fd46d247f183bac5c7f17e55d937922\",\n                    \"Value\": {\n                        \"left\": 434,\n                        \"bottom\": 1884,\n                        \"right\": 484,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"44b9252613bf763933ae3d0e36504f91\",\n                    \"Value\": {\n                        \"left\": 623,\n                        \"bottom\": 2036,\n                        \"right\": 629,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"0540372660dd761419143ca574cb27e4\",\n                    \"Value\": {\n                        \"left\": 182,\n                        \"bottom\": 1800,\n                        \"right\": 202,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"5f5841267c8d387d7de441cf5c97258b\",\n                    \"Value\": {\n                        \"left\": 804,\n                        \"bottom\": 1858,\n                        \"right\": 824,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"31e057267cbf1b5444701f1722b74eb2\",\n                    \"Value\": {\n                        \"left\": 566,\n                        \"bottom\": 1858,\n                        \"right\": 586,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"124c7226031f44cd20fe5a9b6c5d1ac2\",\n                    \"Value\": {\n                        \"left\": 1162,\n                        \"bottom\": 1938,\n                        \"right\": 1192,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"07f6672722551dc57802769e0a7a4c8d\",\n                    \"Value\": {\n                        \"left\": 1482,\n                        \"bottom\": 1830,\n                        \"right\": 1502,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"2b5175271de526a5147d745d6ea900f7\",\n                    \"Value\": {\n                        \"left\": 780,\n                        \"bottom\": 1858,\n                        \"right\": 800,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"3f02032807bd607762ab0ee748924b0c\",\n                    \"Value\": {\n                        \"left\": 1355,\n                        \"bottom\": 1858,\n                        \"right\": 1375,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"44b8262876e4683548b83b554e544bd7\",\n                    \"Value\": {\n                        \"left\": 1794,\n                        \"bottom\": 1830,\n                        \"right\": 1814,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"0a1b49284a84494d362b7baf1181176b\",\n                    \"Value\": {\n                        \"left\": 295,\n                        \"bottom\": 1884,\n                        \"right\": 314,\n                        \"top\": 1910\n                    }\n                },\n                {\n                    \"Key\": \"311766284f1a03f22a5646697a2b6471\",\n                    \"Value\": {\n                        \"left\": 1594,\n                        \"bottom\": 1918,\n                        \"right\": 1624,\n                        \"top\": 1926\n                    }\n                },\n                {\n                    \"Key\": \"2e3a772860da3b1d3db2226504fe236f\",\n                    \"Value\": {\n                        \"left\": 734,\n                        \"bottom\": 1800,\n                        \"right\": 754,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"7ba135291ad820ae241238582e671ba2\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1614,\n                        \"right\": 11,\n                        \"top\": 1664\n                    }\n                },\n                {\n                    \"Key\": \"7308512942a4704708ca55320bc953a9\",\n                    \"Value\": {\n                        \"left\": 346,\n                        \"bottom\": 1830,\n                        \"right\": 366,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"7b175e291a460aec259d179c58511101\",\n                    \"Value\": {\n                        \"left\": 278,\n                        \"bottom\": 1800,\n                        \"right\": 298,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"017a2a2a1df6218e168766c171e65c33\",\n                    \"Value\": {\n                        \"left\": 230,\n                        \"bottom\": 1776,\n                        \"right\": 250,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"3d92112b49ba16f46aa3249767164401\",\n                    \"Value\": {\n                        \"left\": 1115,\n                        \"bottom\": 1858,\n                        \"right\": 1135,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"41d93c2b3a39274a7d35039540fe3aab\",\n                    \"Value\": {\n                        \"left\": 1168,\n                        \"bottom\": 1992,\n                        \"right\": 1208,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"79ab3e2b2d254269187d39fd7f766955\",\n                    \"Value\": {\n                        \"left\": 667,\n                        \"bottom\": 1992,\n                        \"right\": 707,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"4126572b2947687f44c94e68660d1bca\",\n                    \"Value\": {\n                        \"left\": 769,\n                        \"bottom\": 1884,\n                        \"right\": 794,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"3c407b2b46f807e6602877a4259c2a79\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1560,\n                        \"right\": 11,\n                        \"top\": 1610\n                    }\n                },\n                {\n                    \"Key\": \"005b202c650949397c95564d0de102f5\",\n                    \"Value\": {\n                        \"left\": 245,\n                        \"bottom\": 1992,\n                        \"right\": 295,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"16aa3d2c44704f5d76fb7ba26d833596\",\n                    \"Value\": {\n                        \"left\": 1309,\n                        \"bottom\": 1800,\n                        \"right\": 1329,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"10d90c2d06855e3e6f8d34405b4b079a\",\n                    \"Value\": {\n                        \"left\": 1588,\n                        \"bottom\": 1938,\n                        \"right\": 1618,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"7260312d19e92c0d40c307a13e7355ed\",\n                    \"Value\": {\n                        \"left\": 110,\n                        \"bottom\": 1830,\n                        \"right\": 134,\n                        \"top\": 1854\n                    }\n                },\n                {\n                    \"Key\": \"0824232e6191377627b702fc0f552603\",\n                    \"Value\": {\n                        \"left\": 855,\n                        \"bottom\": 1918,\n                        \"right\": 866,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"2e3d582e085c21d943eb68c334e954c8\",\n                    \"Value\": {\n                        \"left\": 1787,\n                        \"bottom\": 1858,\n                        \"right\": 1807,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"52c8772f641a30933b5c46be47a80b53\",\n                    \"Value\": {\n                        \"left\": 1798,\n                        \"bottom\": 1884,\n                        \"right\": 1824,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"1b6724306a1b40cf2115319d1c381026\",\n                    \"Value\": {\n                        \"left\": 1050,\n                        \"bottom\": 1884,\n                        \"right\": 1100,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"33cb3c3034c56e73099d2edc35ec4dbc\",\n                    \"Value\": {\n                        \"left\": 1404,\n                        \"bottom\": 1992,\n                        \"right\": 1444,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"35d73d3060ef522f728d654c31bb3732\",\n                    \"Value\": {\n                        \"left\": 1410,\n                        \"bottom\": 1918,\n                        \"right\": 1419,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"4d7c59300b78244b250b3f14794f7c30\",\n                    \"Value\": {\n                        \"left\": 830,\n                        \"bottom\": 1776,\n                        \"right\": 850,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"304562300aa144977c64737149537ad6\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1074,\n                        \"right\": 106,\n                        \"top\": 1124\n                    }\n                },\n                {\n                    \"Key\": \"221859314013209c72795c99260719ed\",\n                    \"Value\": {\n                        \"left\": 1635,\n                        \"bottom\": 1884,\n                        \"right\": 1685,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"12a80f3344a31e2d3354161c2f944638\",\n                    \"Value\": {\n                        \"left\": 488,\n                        \"bottom\": 1884,\n                        \"right\": 513,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"74f605357436654a0cdb0ba9699d3617\",\n                    \"Value\": {\n                        \"left\": 1788,\n                        \"bottom\": 1800,\n                        \"right\": 1808,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"435138351b066b1e08794d583f1a5840\",\n                    \"Value\": {\n                        \"left\": 710,\n                        \"bottom\": 1800,\n                        \"right\": 730,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"00533d362a0c38c31f4d66921cac0be6\",\n                    \"Value\": {\n                        \"left\": 1141,\n                        \"bottom\": 1800,\n                        \"right\": 1161,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"1efa5a3609e93b26740d4bbf59860925\",\n                    \"Value\": {\n                        \"left\": 69,\n                        \"bottom\": 1992,\n                        \"right\": 119,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"684c733646a47f364a4c3fc716dd5c63\",\n                    \"Value\": {\n                        \"left\": 318,\n                        \"bottom\": 1884,\n                        \"right\": 343,\n                        \"top\": 1910\n                    }\n                },\n                {\n                    \"Key\": \"59ea323733796f7b522f19622984279d\",\n                    \"Value\": {\n                        \"left\": 326,\n                        \"bottom\": 1800,\n                        \"right\": 346,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"1aad7e376c1866741eec7af66d88718e\",\n                    \"Value\": {\n                        \"left\": 1211,\n                        \"bottom\": 1858,\n                        \"right\": 1231,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"3e3b1639646b2d8435c4415d5d424648\",\n                    \"Value\": {\n                        \"left\": 1165,\n                        \"bottom\": 1800,\n                        \"right\": 1185,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"6338023a6c50328d3bab0bb453f864cf\",\n                    \"Value\": {\n                        \"left\": 830,\n                        \"bottom\": 1800,\n                        \"right\": 850,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"2726133a77804ef50abf7de97d40637b\",\n                    \"Value\": {\n                        \"left\": 1290,\n                        \"bottom\": 1830,\n                        \"right\": 1310,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"3ccc453a1b03741164900bd765750438\",\n                    \"Value\": {\n                        \"left\": 494,\n                        \"bottom\": 1800,\n                        \"right\": 514,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"0ca3463a618a4f0e52eb0cd473541835\",\n                    \"Value\": {\n                        \"left\": 1020,\n                        \"bottom\": 1830,\n                        \"right\": 1040,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"0096333b50663c5276a9663e2ae53701\",\n                    \"Value\": {\n                        \"left\": 1746,\n                        \"bottom\": 1830,\n                        \"right\": 1766,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"54aa383b507022dd4d0b371f2a8b24d2\",\n                    \"Value\": {\n                        \"left\": 225,\n                        \"bottom\": 1918,\n                        \"right\": 239,\n                        \"top\": 1932\n                    }\n                },\n                {\n                    \"Key\": \"749b253c0a4659251eb1169857b81aa6\",\n                    \"Value\": {\n                        \"left\": 825,\n                        \"bottom\": 1918,\n                        \"right\": 836,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"3c40393d03af1c4760f92eee1a6666f3\",\n                    \"Value\": {\n                        \"left\": 971,\n                        \"bottom\": 1858,\n                        \"right\": 991,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"69de633d136b4c903d2d39f74bc7566a\",\n                    \"Value\": {\n                        \"left\": 446,\n                        \"bottom\": 1858,\n                        \"right\": 466,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"25803a3e06cc40b82fcf214a2d4e3db6\",\n                    \"Value\": {\n                        \"left\": 1770,\n                        \"bottom\": 1830,\n                        \"right\": 1790,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"6d66543e4b014c561fc16c7c7b792e44\",\n                    \"Value\": {\n                        \"left\": 393,\n                        \"bottom\": 1918,\n                        \"right\": 405,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"7fed733e18332f2d647354bf375820be\",\n                    \"Value\": {\n                        \"left\": 768,\n                        \"bottom\": 1938,\n                        \"right\": 798,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"52375c3f583904686b61698f023f6fdd\",\n                    \"Value\": {\n                        \"left\": 566,\n                        \"bottom\": 1800,\n                        \"right\": 586,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"0b78004054635ed540d678bc332c3c87\",\n                    \"Value\": {\n                        \"left\": 1307,\n                        \"bottom\": 1858,\n                        \"right\": 1327,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"3a5d434026851c7718a1233d0ab2013f\",\n                    \"Value\": {\n                        \"left\": 110,\n                        \"bottom\": 1938,\n                        \"right\": 210,\n                        \"top\": 1978\n                    }\n                },\n                {\n                    \"Key\": \"602a754042293ca8784648ab0974477d\",\n                    \"Value\": {\n                        \"left\": 1453,\n                        \"bottom\": 1800,\n                        \"right\": 1473,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"11871a410d053f797d83262c17f5568c\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1020,\n                        \"right\": 106,\n                        \"top\": 1070\n                    }\n                },\n                {\n                    \"Key\": \"5f42584132dd50f7040b468c35b633da\",\n                    \"Value\": {\n                        \"left\": 926,\n                        \"bottom\": 1776,\n                        \"right\": 946,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"233c0d4269646e2f31e71b8d5d1e5fc4\",\n                    \"Value\": {\n                        \"left\": 806,\n                        \"bottom\": 1800,\n                        \"right\": 826,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"0064294220b1273b6b9152523b963cdc\",\n                    \"Value\": {\n                        \"left\": 1118,\n                        \"bottom\": 1918,\n                        \"right\": 1168,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"62dd34421c60266949cd2c982d905c03\",\n                    \"Value\": {\n                        \"left\": 1410,\n                        \"bottom\": 1830,\n                        \"right\": 1430,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"10b54243335e704f02303c8959e84535\",\n                    \"Value\": {\n                        \"left\": 106,\n                        \"bottom\": 738,\n                        \"right\": 176,\n                        \"top\": 809\n                    }\n                },\n                {\n                    \"Key\": \"041862435ce94df953a73a501775426b\",\n                    \"Value\": {\n                        \"left\": 1397,\n                        \"bottom\": 1918,\n                        \"right\": 1406,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"22fc284427297a99761a2732351e3bcd\",\n                    \"Value\": {\n                        \"left\": 1241,\n                        \"bottom\": 1830,\n                        \"right\": 1261,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"6c0b3f44539347465fbc4ca23cfd630b\",\n                    \"Value\": {\n                        \"left\": 1139,\n                        \"bottom\": 1858,\n                        \"right\": 1159,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"391d434423a375d232167252668112c2\",\n                    \"Value\": {\n                        \"left\": 1692,\n                        \"bottom\": 1800,\n                        \"right\": 1712,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"328477442d7b256a29de46ec652366a7\",\n                    \"Value\": {\n                        \"left\": 720,\n                        \"bottom\": 1918,\n                        \"right\": 731,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"06be084535be030858333acf49d92db4\",\n                    \"Value\": {\n                        \"left\": 166,\n                        \"bottom\": 1830,\n                        \"right\": 190,\n                        \"top\": 1854\n                    }\n                },\n                {\n                    \"Key\": \"6e5320454c85738663ce23b55dbd4dfa\",\n                    \"Value\": {\n                        \"left\": 828,\n                        \"bottom\": 1858,\n                        \"right\": 848,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"698b294551681f373f3a5d233f7c048d\",\n                    \"Value\": {\n                        \"left\": 996,\n                        \"bottom\": 1830,\n                        \"right\": 1016,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"7112354647cc3b075496797f0e634a33\",\n                    \"Value\": {\n                        \"left\": 1226,\n                        \"bottom\": 1918,\n                        \"right\": 1274,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"1a1a5d462ec011d23a095fa761211711\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1992,\n                        \"right\": 52,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"50600547271f4d2f38d4282109604b00\",\n                    \"Value\": {\n                        \"left\": 1461,\n                        \"bottom\": 1884,\n                        \"right\": 1481,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"55612948208b611c6518424a33152bfc\",\n                    \"Value\": {\n                        \"left\": 1193,\n                        \"bottom\": 1830,\n                        \"right\": 1213,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"03a5164927dd0e7d254555f3454f1205\",\n                    \"Value\": {\n                        \"left\": 1859,\n                        \"bottom\": 1858,\n                        \"right\": 1879,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"423a2e4971d01ef40b016611069c7e89\",\n                    \"Value\": {\n                        \"left\": 1818,\n                        \"bottom\": 1830,\n                        \"right\": 1838,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"60bf6b496ccd45d944ec41184aeb62c6\",\n                    \"Value\": {\n                        \"left\": 470,\n                        \"bottom\": 1776,\n                        \"right\": 490,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"04d6224a54773744177e575760953423\",\n                    \"Value\": {\n                        \"left\": 924,\n                        \"bottom\": 1830,\n                        \"right\": 944,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"3413234a0ae275d734b158ae52574be2\",\n                    \"Value\": {\n                        \"left\": 613,\n                        \"bottom\": 1858,\n                        \"right\": 633,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"6e031d4c1377202c3a5a783240f55e49\",\n                    \"Value\": {\n                        \"left\": 637,\n                        \"bottom\": 1858,\n                        \"right\": 657,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"7167574c690f33d1144a07d126c80813\",\n                    \"Value\": {\n                        \"left\": 923,\n                        \"bottom\": 1858,\n                        \"right\": 943,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"25896a4c65bb6d021da41e1540b5348f\",\n                    \"Value\": {\n                        \"left\": 1724,\n                        \"bottom\": 1938,\n                        \"right\": 1774,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"4392114d25d616c562b14a96373a52bb\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1344,\n                        \"right\": 7,\n                        \"top\": 1394\n                    }\n                },\n                {\n                    \"Key\": \"4694254d5c164bb85bae7b8c0ac82f28\",\n                    \"Value\": {\n                        \"left\": 1674,\n                        \"bottom\": 1830,\n                        \"right\": 1694,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"2c77314d33f1336a1840362b2c9d1b2a\",\n                    \"Value\": {\n                        \"left\": 1021,\n                        \"bottom\": 1800,\n                        \"right\": 1041,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"18664b4d2b3430cd005469184dcb7f59\",\n                    \"Value\": {\n                        \"left\": 1333,\n                        \"bottom\": 1800,\n                        \"right\": 1353,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"7575594d29b11a772b430135450f1abe\",\n                    \"Value\": {\n                        \"left\": 1908,\n                        \"bottom\": 1800,\n                        \"right\": 1928,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"765f0d4e10b21aec273c3d092d27126e\",\n                    \"Value\": {\n                        \"left\": 110,\n                        \"bottom\": 1918,\n                        \"right\": 125,\n                        \"top\": 1933\n                    }\n                },\n                {\n                    \"Key\": \"7c09624e7daa45ef4dd24628717942d5\",\n                    \"Value\": {\n                        \"left\": 569,\n                        \"bottom\": 1992,\n                        \"right\": 619,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"2aed7e4e04982b9d10b05c736fb253fe\",\n                    \"Value\": {\n                        \"left\": 626,\n                        \"bottom\": 1938,\n                        \"right\": 676,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"66ac154f1c1f06111075313339e66aa4\",\n                    \"Value\": {\n                        \"left\": 1554,\n                        \"bottom\": 1830,\n                        \"right\": 1574,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"13cc3f4f45710a54352307ef5f001eef\",\n                    \"Value\": {\n                        \"left\": 731,\n                        \"bottom\": 1830,\n                        \"right\": 751,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"0022335023a07b4b394c61236933222a\",\n                    \"Value\": {\n                        \"left\": 1715,\n                        \"bottom\": 1858,\n                        \"right\": 1735,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"3aa5715005765c392f0e0bc013f82e10\",\n                    \"Value\": {\n                        \"left\": 542,\n                        \"bottom\": 1858,\n                        \"right\": 562,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"15df295163e609cf295f4be120572807\",\n                    \"Value\": {\n                        \"left\": 254,\n                        \"bottom\": 1776,\n                        \"right\": 274,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"731832515faa10846a4967e973b25d43\",\n                    \"Value\": {\n                        \"left\": 691,\n                        \"bottom\": 1884,\n                        \"right\": 741,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"06a16251065b6c4308414f0b052c5a3b\",\n                    \"Value\": {\n                        \"left\": 870,\n                        \"bottom\": 1918,\n                        \"right\": 881,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"6c06665158ed26e82d8306d04f9f73c4\",\n                    \"Value\": {\n                        \"left\": 1448,\n                        \"bottom\": 1992,\n                        \"right\": 1488,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"17eb725123f5219028c552b8149f330c\",\n                    \"Value\": {\n                        \"left\": 828,\n                        \"bottom\": 1830,\n                        \"right\": 848,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"078a5c5269ee695a722144d642937467\",\n                    \"Value\": {\n                        \"left\": 1451,\n                        \"bottom\": 1858,\n                        \"right\": 1471,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"0f555e523e671f08741010d779e5363a\",\n                    \"Value\": {\n                        \"left\": 1379,\n                        \"bottom\": 1858,\n                        \"right\": 1399,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"6f632454112e23a87ded0987767167d8\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1398,\n                        \"right\": 106,\n                        \"top\": 1448\n                    }\n                },\n                {\n                    \"Key\": \"660054543ee938f231472c8a3e9115a2\",\n                    \"Value\": {\n                        \"left\": 680,\n                        \"bottom\": 1938,\n                        \"right\": 730,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"782607554b0f21084ded5ae06a3d68b6\",\n                    \"Value\": {\n                        \"left\": 409,\n                        \"bottom\": 1918,\n                        \"right\": 421,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"0824555552e83f137bea39715a717db2\",\n                    \"Value\": {\n                        \"left\": 1523,\n                        \"bottom\": 1858,\n                        \"right\": 1543,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"6935315628ef0c881f764b0a5ba74fe7\",\n                    \"Value\": {\n                        \"left\": 685,\n                        \"bottom\": 1858,\n                        \"right\": 704,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"59c96a567a71232e4a442a3f16462b5d\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 218,\n                        \"right\": 102,\n                        \"top\": 318\n                    }\n                },\n                {\n                    \"Key\": \"51ff7c566d413ee67fd406f012de66c1\",\n                    \"Value\": {\n                        \"left\": 1689,\n                        \"bottom\": 1884,\n                        \"right\": 1740,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"13591d571afc12bf6d712ee753750268\",\n                    \"Value\": {\n                        \"left\": 1314,\n                        \"bottom\": 1830,\n                        \"right\": 1334,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"657107580d8d6e2e2a095a9f3e5b2f5c\",\n                    \"Value\": {\n                        \"left\": 1474,\n                        \"bottom\": 1938,\n                        \"right\": 1504,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"3bf440583f843a155ddd77b4244706a2\",\n                    \"Value\": {\n                        \"left\": 542,\n                        \"bottom\": 1800,\n                        \"right\": 562,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"4b587658011b29bb03cd435336194c6c\",\n                    \"Value\": {\n                        \"left\": 515,\n                        \"bottom\": 1992,\n                        \"right\": 565,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"2db22e592f981ca01e47235a71625654\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1236,\n                        \"right\": 66,\n                        \"top\": 1286\n                    }\n                },\n                {\n                    \"Key\": \"74086a597ee67e91405c1a0b0efe419b\",\n                    \"Value\": {\n                        \"left\": 222,\n                        \"bottom\": 1830,\n                        \"right\": 246,\n                        \"top\": 1854\n                    }\n                },\n                {\n                    \"Key\": \"17a1715932ee790051a81af35bf310aa\",\n                    \"Value\": {\n                        \"left\": 123,\n                        \"bottom\": 1992,\n                        \"right\": 173,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"5219235a0fc2622920a3158b12741171\",\n                    \"Value\": {\n                        \"left\": 2033,\n                        \"bottom\": 1830,\n                        \"right\": 2043,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"60ed725a3d34272d059324b94e692036\",\n                    \"Value\": {\n                        \"left\": 398,\n                        \"bottom\": 1776,\n                        \"right\": 418,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"0a77395b4cd81aed6a55012160e32ffe\",\n                    \"Value\": {\n                        \"left\": 405,\n                        \"bottom\": 1884,\n                        \"right\": 430,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"13de255c0a0f177552c23a120e360df8\",\n                    \"Value\": {\n                        \"left\": 1259,\n                        \"bottom\": 1858,\n                        \"right\": 1279,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"780a1a5d6ce91d64442a0f8f708e2023\",\n                    \"Value\": {\n                        \"left\": 1690,\n                        \"bottom\": 1938,\n                        \"right\": 1720,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"3baa405d339f58ab636530c92f1310b4\",\n                    \"Value\": {\n                        \"left\": 1764,\n                        \"bottom\": 1800,\n                        \"right\": 1784,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"7d843e5e0cde648337a05bb6623a2a00\",\n                    \"Value\": {\n                        \"left\": 538,\n                        \"bottom\": 1830,\n                        \"right\": 558,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"67e9505e448369275b7a311b508f0755\",\n                    \"Value\": {\n                        \"left\": 198,\n                        \"bottom\": 1884,\n                        \"right\": 228,\n                        \"top\": 1914\n                    }\n                },\n                {\n                    \"Key\": \"3b9f525e4be211da376e4f8e667b4e95\",\n                    \"Value\": {\n                        \"left\": 1529,\n                        \"bottom\": 1918,\n                        \"right\": 1538,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"5c8f735e0626703c68375587092b511f\",\n                    \"Value\": {\n                        \"left\": 1309,\n                        \"bottom\": 1884,\n                        \"right\": 1319,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"780f085f12c9163638327be949611fc8\",\n                    \"Value\": {\n                        \"left\": 254,\n                        \"bottom\": 1858,\n                        \"right\": 274,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"07ac3a5f2251088947083bce123839b9\",\n                    \"Value\": {\n                        \"left\": 546,\n                        \"bottom\": 1884,\n                        \"right\": 571,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"18770e601cfa5abd72cb7b061296152f\",\n                    \"Value\": {\n                        \"left\": 230,\n                        \"bottom\": 1858,\n                        \"right\": 250,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"00ed1560468115f6550541dc7ac54751\",\n                    \"Value\": {\n                        \"left\": 299,\n                        \"bottom\": 1992,\n                        \"right\": 349,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"79bc326019263d237f137a627d8c1f45\",\n                    \"Value\": {\n                        \"left\": 852,\n                        \"bottom\": 1830,\n                        \"right\": 872,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"78813a607702658230400ce6143a0a8f\",\n                    \"Value\": {\n                        \"left\": 2009,\n                        \"bottom\": 1830,\n                        \"right\": 2029,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"6ca8496030160e99272a75a135454b85\",\n                    \"Value\": {\n                        \"left\": 1019,\n                        \"bottom\": 1858,\n                        \"right\": 1039,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"77d5176139101e81137d499c70052ebc\",\n                    \"Value\": {\n                        \"left\": 745,\n                        \"bottom\": 1884,\n                        \"right\": 765,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"2adb56610cab4d602fb6062b582b7c61\",\n                    \"Value\": {\n                        \"left\": 1128,\n                        \"bottom\": 1938,\n                        \"right\": 1158,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"14466d616af14fdd3d94541c058c55ae\",\n                    \"Value\": {\n                        \"left\": 798,\n                        \"bottom\": 1884,\n                        \"right\": 808,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"20d96f61176b2d6d7fb91235159d44f5\",\n                    \"Value\": {\n                        \"left\": 973,\n                        \"bottom\": 1800,\n                        \"right\": 993,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"112077614d0305be65f907c538ca1f62\",\n                    \"Value\": {\n                        \"left\": 1291,\n                        \"bottom\": 1918,\n                        \"right\": 1341,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"30f6096246af62b6395e17092ead3fa5\",\n                    \"Value\": {\n                        \"left\": 1133,\n                        \"bottom\": 1884,\n                        \"right\": 1153,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"5b492262019075be60c50c7a7a8f4439\",\n                    \"Value\": {\n                        \"left\": 1475,\n                        \"bottom\": 1858,\n                        \"right\": 1495,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"2a13006326f35cff2c0408dc48be0f54\",\n                    \"Value\": {\n                        \"left\": 1145,\n                        \"bottom\": 1830,\n                        \"right\": 1165,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"4e9c0a6367712dc71d7864e112ee1073\",\n                    \"Value\": {\n                        \"left\": 1066,\n                        \"bottom\": 1918,\n                        \"right\": 1086,\n                        \"top\": 1928\n                    }\n                },\n                {\n                    \"Key\": \"4bfd046473e85477661226ea70543b7a\",\n                    \"Value\": {\n                        \"left\": 490,\n                        \"bottom\": 1830,\n                        \"right\": 510,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"6031706418516c4355323b481f555675\",\n                    \"Value\": {\n                        \"left\": 2027,\n                        \"bottom\": 1858,\n                        \"right\": 2046,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"32d449667c0b255a7aa57d1d3b6f0f44\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1830,\n                        \"right\": 52,\n                        \"top\": 1880\n                    }\n                },\n                {\n                    \"Key\": \"318a6c664a451b14170075374d942536\",\n                    \"Value\": {\n                        \"left\": 1669,\n                        \"bottom\": 1800,\n                        \"right\": 1688,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"650c7b66370f2b0460fe0509059666e4\",\n                    \"Value\": {\n                        \"left\": 1104,\n                        \"bottom\": 1884,\n                        \"right\": 1129,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"67924967653217e15b5c266e4eed361d\",\n                    \"Value\": {\n                        \"left\": 659,\n                        \"bottom\": 1830,\n                        \"right\": 679,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"4d345a677c6e5c0e41196c7568304c76\",\n                    \"Value\": {\n                        \"left\": 887,\n                        \"bottom\": 1992,\n                        \"right\": 928,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"748d796725b867fd6135105725ee07d7\",\n                    \"Value\": {\n                        \"left\": 206,\n                        \"bottom\": 1858,\n                        \"right\": 226,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"23a50e686362786770a2329c58d95ee2\",\n                    \"Value\": {\n                        \"left\": 1508,\n                        \"bottom\": 1938,\n                        \"right\": 1516,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"562938681f5f234d3cb33c9d46e75071\",\n                    \"Value\": {\n                        \"left\": 1212,\n                        \"bottom\": 1992,\n                        \"right\": 1252,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"453a7b68174246e27a370e083f806b91\",\n                    \"Value\": {\n                        \"left\": 590,\n                        \"bottom\": 1800,\n                        \"right\": 610,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"06470f6928c4378e7c1e31f413a137dc\",\n                    \"Value\": {\n                        \"left\": 780,\n                        \"bottom\": 1918,\n                        \"right\": 791,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"4c3715695b1a3fed0d5a2a93447314df\",\n                    \"Value\": {\n                        \"left\": 106,\n                        \"bottom\": 426,\n                        \"right\": 206,\n                        \"top\": 526\n                    }\n                },\n                {\n                    \"Key\": \"2a7b1669373d57e42f9035225a4a4c22\",\n                    \"Value\": {\n                        \"left\": 322,\n                        \"bottom\": 1830,\n                        \"right\": 342,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"7da75a6938e7194d2d4a3a62615565fc\",\n                    \"Value\": {\n                        \"left\": 470,\n                        \"bottom\": 1800,\n                        \"right\": 490,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"5d65226a1e2816d050af554625192398\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1398,\n                        \"right\": 52,\n                        \"top\": 1448\n                    }\n                },\n                {\n                    \"Key\": \"09b44d6a4e8927f40a6826c07d5b69f9\",\n                    \"Value\": {\n                        \"left\": 1650,\n                        \"bottom\": 1830,\n                        \"right\": 1670,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"38515d6a082a49430c38322b35f51152\",\n                    \"Value\": {\n                        \"left\": 279,\n                        \"bottom\": 1918,\n                        \"right\": 293,\n                        \"top\": 1932\n                    }\n                },\n                {\n                    \"Key\": \"445f076b10cc17e92b30538f1c3c0bfc\",\n                    \"Value\": {\n                        \"left\": 924,\n                        \"bottom\": 1938,\n                        \"right\": 954,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"153a346b58f76ba94e416db20f587244\",\n                    \"Value\": {\n                        \"left\": 1980,\n                        \"bottom\": 1800,\n                        \"right\": 2000,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"029a646b21e3528d523f7a3f36cb4a7a\",\n                    \"Value\": {\n                        \"left\": 683,\n                        \"bottom\": 1830,\n                        \"right\": 703,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"75fd696b197523351ff218f2007b35fa\",\n                    \"Value\": {\n                        \"left\": 1073,\n                        \"bottom\": 1830,\n                        \"right\": 1093,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"425d6b6b34666dfe66c0353b60a56594\",\n                    \"Value\": {\n                        \"left\": 1447,\n                        \"bottom\": 1884,\n                        \"right\": 1457,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"6b31296c3d3c54f062913bac516e6eb8\",\n                    \"Value\": {\n                        \"left\": 1890,\n                        \"bottom\": 1830,\n                        \"right\": 1910,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"6178636c3089374f799f548b1d0d5689\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1506,\n                        \"right\": 52,\n                        \"top\": 1556\n                    }\n                },\n                {\n                    \"Key\": \"09df6a6c4d7b25e139f063be7a356bde\",\n                    \"Value\": {\n                        \"left\": 878,\n                        \"bottom\": 1800,\n                        \"right\": 898,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"68a8066d52ea4321063e1de047a508d6\",\n                    \"Value\": {\n                        \"left\": 1418,\n                        \"bottom\": 1884,\n                        \"right\": 1443,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"54540c6d09e92f2072c56ff6229c42e2\",\n                    \"Value\": {\n                        \"left\": 442,\n                        \"bottom\": 1830,\n                        \"right\": 462,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"6fe3096f11792bb14ea020781f2a1e2d\",\n                    \"Value\": {\n                        \"left\": 750,\n                        \"bottom\": 1918,\n                        \"right\": 761,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"65eb2f6f0461757f5a745acf68e36e25\",\n                    \"Value\": {\n                        \"left\": 374,\n                        \"bottom\": 1800,\n                        \"right\": 394,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"6f646670444357a320e9423f2eaa4e80\",\n                    \"Value\": {\n                        \"left\": 1924,\n                        \"bottom\": 1884,\n                        \"right\": 1974,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"23801071629939ea6a0054b87cdd16a9\",\n                    \"Value\": {\n                        \"left\": 900,\n                        \"bottom\": 1918,\n                        \"right\": 1004,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"44402071050555a124c77e7344733da4\",\n                    \"Value\": {\n                        \"left\": 1883,\n                        \"bottom\": 1858,\n                        \"right\": 1903,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"4af3567144e93bfb574d7eff08276b1f\",\n                    \"Value\": {\n                        \"left\": 686,\n                        \"bottom\": 1800,\n                        \"right\": 706,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"03d8647120c94ede2993460304155899\",\n                    \"Value\": {\n                        \"left\": 1196,\n                        \"bottom\": 1938,\n                        \"right\": 1226,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"0076397239c3101d45355ef116411c75\",\n                    \"Value\": {\n                        \"left\": 1968,\n                        \"bottom\": 1938,\n                        \"right\": 1998,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"02d76c7230fb29d76262371646dc3718\",\n                    \"Value\": {\n                        \"left\": 446,\n                        \"bottom\": 1776,\n                        \"right\": 466,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"4a446b731cad7540075e713659336d0e\",\n                    \"Value\": {\n                        \"left\": 1217,\n                        \"bottom\": 1830,\n                        \"right\": 1237,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"7172077513da491f1f1046554a7d0bcc\",\n                    \"Value\": {\n                        \"left\": 1880,\n                        \"bottom\": 1938,\n                        \"right\": 1930,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"3821097566522d056655626b4d6f6167\",\n                    \"Value\": {\n                        \"left\": 717,\n                        \"bottom\": 2036,\n                        \"right\": 767,\n                        \"top\": 2041\n                    }\n                },\n                {\n                    \"Key\": \"6a7e3675537b2d771c25300f48634962\",\n                    \"Value\": {\n                        \"left\": 302,\n                        \"bottom\": 1776,\n                        \"right\": 322,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"56585e75082216ba67755c2d5ecb6ed3\",\n                    \"Value\": {\n                        \"left\": 542,\n                        \"bottom\": 1776,\n                        \"right\": 562,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"1a0c0677587a3c73719c6aa379d113c1\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1506,\n                        \"right\": 106,\n                        \"top\": 1556\n                    }\n                },\n                {\n                    \"Key\": \"0a7e1d772d8163c74c276b82046055af\",\n                    \"Value\": {\n                        \"left\": 258,\n                        \"bottom\": 1938,\n                        \"right\": 298,\n                        \"top\": 1978\n                    }\n                },\n                {\n                    \"Key\": \"6b9e3a777ef30b0346e62cb63ca10d5a\",\n                    \"Value\": {\n                        \"left\": 106,\n                        \"bottom\": 842,\n                        \"right\": 156,\n                        \"top\": 893\n                    }\n                },\n                {\n                    \"Key\": \"43ad697756894fa942a9115f69e858d5\",\n                    \"Value\": {\n                        \"left\": 370,\n                        \"bottom\": 1830,\n                        \"right\": 390,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"69826e777c0875aa2538405f72e1787f\",\n                    \"Value\": {\n                        \"left\": 1578,\n                        \"bottom\": 1830,\n                        \"right\": 1598,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"33dc27782cbd3b856f98546a48551add\",\n                    \"Value\": {\n                        \"left\": 1846,\n                        \"bottom\": 1938,\n                        \"right\": 1876,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"127a2878256c72d05bbc46b313760577\",\n                    \"Value\": {\n                        \"left\": 586,\n                        \"bottom\": 1830,\n                        \"right\": 606,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"54533c7853254fc26d4f6bd9082129a8\",\n                    \"Value\": {\n                        \"left\": 899,\n                        \"bottom\": 1858,\n                        \"right\": 919,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"0ffc467840e900ce18ad18ce4da851da\",\n                    \"Value\": {\n                        \"left\": 1547,\n                        \"bottom\": 1858,\n                        \"right\": 1567,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"525e72785d54327e07125b1e030e72b1\",\n                    \"Value\": {\n                        \"left\": 1573,\n                        \"bottom\": 1800,\n                        \"right\": 1593,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"4e001b7940a900a748a414b035541820\",\n                    \"Value\": {\n                        \"left\": 1069,\n                        \"bottom\": 1800,\n                        \"right\": 1089,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"29821f7977603f9b4d555dd659f271a7\",\n                    \"Value\": {\n                        \"left\": 17,\n                        \"bottom\": 110,\n                        \"right\": 117,\n                        \"top\": 210\n                    }\n                },\n                {\n                    \"Key\": \"3b0a3d7952be0a6a56036a5675792f0b\",\n                    \"Value\": {\n                        \"left\": 836,\n                        \"bottom\": 1938,\n                        \"right\": 886,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"27ed427925bf0f15242e054d7d15565c\",\n                    \"Value\": {\n                        \"left\": 1656,\n                        \"bottom\": 1938,\n                        \"right\": 1686,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"0c9c7079001e4d00039e31d77b0340e1\",\n                    \"Value\": {\n                        \"left\": 170,\n                        \"bottom\": 1918,\n                        \"right\": 185,\n                        \"top\": 1933\n                    }\n                },\n                {\n                    \"Key\": \"4c237879436f27d225870c8c10c8650d\",\n                    \"Value\": {\n                        \"left\": 1870,\n                        \"bottom\": 1884,\n                        \"right\": 1920,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"35b70b7a022239575e6c5caf32445477\",\n                    \"Value\": {\n                        \"left\": 182,\n                        \"bottom\": 1776,\n                        \"right\": 202,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"6684387a17f21d804e0c625c3caf019f\",\n                    \"Value\": {\n                        \"left\": 189,\n                        \"bottom\": 1918,\n                        \"right\": 203,\n                        \"top\": 1932\n                    }\n                },\n                {\n                    \"Key\": \"781a427a28b90ffe23a75d426a9443e6\",\n                    \"Value\": {\n                        \"left\": 524,\n                        \"bottom\": 1938,\n                        \"right\": 554,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"68176d7a25466a163a972c1d02f90197\",\n                    \"Value\": {\n                        \"left\": 232,\n                        \"bottom\": 1884,\n                        \"right\": 262,\n                        \"top\": 1914\n                    }\n                },\n                {\n                    \"Key\": \"468a0f7c35cb0353298d77d67de26056\",\n                    \"Value\": {\n                        \"left\": 992,\n                        \"bottom\": 1938,\n                        \"right\": 1022,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"4b3d777c3edd7518080a277b3bfa1296\",\n                    \"Value\": {\n                        \"left\": 782,\n                        \"bottom\": 1800,\n                        \"right\": 802,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"06b2507f1dc27444485922973f1651c6\",\n                    \"Value\": {\n                        \"left\": 1932,\n                        \"bottom\": 1800,\n                        \"right\": 1952,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"3803547f5e515b5c33764a6736060bc7\",\n                    \"Value\": {\n                        \"left\": 1698,\n                        \"bottom\": 1830,\n                        \"right\": 1718,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"3f775a7f10983ba21cd81541526524cf\",\n                    \"Value\": {\n                        \"left\": 998,\n                        \"bottom\": 1776,\n                        \"right\": 1018,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"41516f7f0265318f5f6d731f16f66682\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1074,\n                        \"right\": 52,\n                        \"top\": 1124\n                    }\n                },\n                {\n                    \"Key\": \"0d090480192b622f13f708e024385b7e\",\n                    \"Value\": {\n                        \"left\": 1812,\n                        \"bottom\": 1938,\n                        \"right\": 1842,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"6daf1e8158c73247507728605cb232fe\",\n                    \"Value\": {\n                        \"left\": 1230,\n                        \"bottom\": 1938,\n                        \"right\": 1260,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"4458068263d003483fca161a66a50c84\",\n                    \"Value\": {\n                        \"left\": 976,\n                        \"bottom\": 1992,\n                        \"right\": 1016,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"5cc7078218605bcf392a532264644d1a\",\n                    \"Value\": {\n                        \"left\": 374,\n                        \"bottom\": 1776,\n                        \"right\": 394,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"01c62a82737d79b045f411651bdd2ce6\",\n                    \"Value\": {\n                        \"left\": 662,\n                        \"bottom\": 1884,\n                        \"right\": 687,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"4f482b827d0e70ac4031022c21737971\",\n                    \"Value\": {\n                        \"left\": 758,\n                        \"bottom\": 1776,\n                        \"right\": 778,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"365d6782616b35260cdd62af000c03d6\",\n                    \"Value\": {\n                        \"left\": 266,\n                        \"bottom\": 1884,\n                        \"right\": 291,\n                        \"top\": 1910\n                    }\n                },\n                {\n                    \"Key\": \"5130158340bc173258075d59545861e1\",\n                    \"Value\": {\n                        \"left\": 194,\n                        \"bottom\": 1830,\n                        \"right\": 218,\n                        \"top\": 1854\n                    }\n                },\n                {\n                    \"Key\": \"1b4e1f836afb6b7a38b32c5d7e8c31aa\",\n                    \"Value\": {\n                        \"left\": 972,\n                        \"bottom\": 1830,\n                        \"right\": 992,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"006c29830a4061c219336f376edd7408\",\n                    \"Value\": {\n                        \"left\": 1420,\n                        \"bottom\": 1938,\n                        \"right\": 1470,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"792525843ae60c666e3b7e9100bd36ac\",\n                    \"Value\": {\n                        \"left\": 1955,\n                        \"bottom\": 1858,\n                        \"right\": 1975,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"66a662840f893c5e33eb68ff57751cb1\",\n                    \"Value\": {\n                        \"left\": 517,\n                        \"bottom\": 1884,\n                        \"right\": 542,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"4f0c3185756751f601600a741a761dd6\",\n                    \"Value\": {\n                        \"left\": 494,\n                        \"bottom\": 1858,\n                        \"right\": 514,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"65472887152f187c50a824111b2646a2\",\n                    \"Value\": {\n                        \"left\": 110,\n                        \"bottom\": 1776,\n                        \"right\": 130,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"15d62b872c3534251a074af843192a3f\",\n                    \"Value\": {\n                        \"left\": 17,\n                        \"bottom\": 2,\n                        \"right\": 28,\n                        \"top\": 106\n                    }\n                },\n                {\n                    \"Key\": \"27250e883db655432ad15beb37827100\",\n                    \"Value\": {\n                        \"left\": 1121,\n                        \"bottom\": 1830,\n                        \"right\": 1141,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"3da4158824d77f8a722366e166d166ac\",\n                    \"Value\": {\n                        \"left\": 806,\n                        \"bottom\": 1776,\n                        \"right\": 826,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"08102b891cb142b90e4240df07f947c2\",\n                    \"Value\": {\n                        \"left\": 144,\n                        \"bottom\": 1884,\n                        \"right\": 194,\n                        \"top\": 1914\n                    }\n                },\n                {\n                    \"Key\": \"77c5378922e432762d8578080cbb35bd\",\n                    \"Value\": {\n                        \"left\": 1090,\n                        \"bottom\": 1918,\n                        \"right\": 1100,\n                        \"top\": 1928\n                    }\n                },\n                {\n                    \"Key\": \"18867189163f78f1110406954fc902d2\",\n                    \"Value\": {\n                        \"left\": 1052,\n                        \"bottom\": 1918,\n                        \"right\": 1062,\n                        \"top\": 1928\n                    }\n                },\n                {\n                    \"Key\": \"7d390b8a244a17b8151e2a552bff1d77\",\n                    \"Value\": {\n                        \"left\": 1979,\n                        \"bottom\": 1858,\n                        \"right\": 1999,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"7497418a192e3b84404d30cc3125162b\",\n                    \"Value\": {\n                        \"left\": 1492,\n                        \"bottom\": 1992,\n                        \"right\": 1532,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"0c6a5d8a4a661a94747c6bf051ae52cc\",\n                    \"Value\": {\n                        \"left\": 758,\n                        \"bottom\": 1800,\n                        \"right\": 778,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"0733208b08c93dd669e00f4c219c633a\",\n                    \"Value\": {\n                        \"left\": 590,\n                        \"bottom\": 1776,\n                        \"right\": 610,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"1e0d548b73bc26bc2c0e538329f5163b\",\n                    \"Value\": {\n                        \"left\": 1920,\n                        \"bottom\": 1992,\n                        \"right\": 1960,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"431f6a8b1fa51b507bcf13da74b15da5\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 946,\n                        \"right\": 72,\n                        \"top\": 1016\n                    }\n                },\n                {\n                    \"Key\": \"45a96f8d00a84100285c6c934c9a35d6\",\n                    \"Value\": {\n                        \"left\": 1186,\n                        \"bottom\": 1884,\n                        \"right\": 1196,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"1d66598e2402227f299625033b627c88\",\n                    \"Value\": {\n                        \"left\": 1298,\n                        \"bottom\": 1938,\n                        \"right\": 1348,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"36ab678e3d2829e7337c50795c776702\",\n                    \"Value\": {\n                        \"left\": 950,\n                        \"bottom\": 1776,\n                        \"right\": 970,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"34c1728e5959446a322b3abd0166447c\",\n                    \"Value\": {\n                        \"left\": 708,\n                        \"bottom\": 1858,\n                        \"right\": 728,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"717f148f5dd235e30a7732a50c550b8e\",\n                    \"Value\": {\n                        \"left\": 1187,\n                        \"bottom\": 1858,\n                        \"right\": 1207,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"4fc26f8f22f13b4d2b45412a54061211\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1938,\n                        \"right\": 106,\n                        \"top\": 1988\n                    }\n                },\n                {\n                    \"Key\": \"56130790077f636835d452e879313909\",\n                    \"Value\": {\n                        \"left\": 1237,\n                        \"bottom\": 1800,\n                        \"right\": 1257,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"06834b90737824c019bf06f575bc5511\",\n                    \"Value\": {\n                        \"left\": 1044,\n                        \"bottom\": 1830,\n                        \"right\": 1069,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"4469659002a71b5f254f744108064c02\",\n                    \"Value\": {\n                        \"left\": 755,\n                        \"bottom\": 1992,\n                        \"right\": 795,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"737a6f90605173ff5aee59a84e7456ac\",\n                    \"Value\": {\n                        \"left\": 1283,\n                        \"bottom\": 1858,\n                        \"right\": 1303,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"48bb0e912c9b39666e735b4e3a886eb5\",\n                    \"Value\": {\n                        \"left\": 2034,\n                        \"bottom\": 1884,\n                        \"right\": 2044,\n                        \"top\": 1904\n                    }\n                },\n                {\n                    \"Key\": \"729f389179896e145e2c2d9f4601358c\",\n                    \"Value\": {\n                        \"left\": 302,\n                        \"bottom\": 1858,\n                        \"right\": 322,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"0a256d914aae1bef013f020f70dc0320\",\n                    \"Value\": {\n                        \"left\": 949,\n                        \"bottom\": 1800,\n                        \"right\": 969,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"72c5439208a9592b0e70560e6dcb2704\",\n                    \"Value\": {\n                        \"left\": 1124,\n                        \"bottom\": 1992,\n                        \"right\": 1164,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"69d8209312f214ac766623ce37fc368c\",\n                    \"Value\": {\n                        \"left\": 590,\n                        \"bottom\": 1858,\n                        \"right\": 609,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"6bfe26935ff23aca66982fc5129f62a5\",\n                    \"Value\": {\n                        \"left\": 953,\n                        \"bottom\": 1884,\n                        \"right\": 963,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"106d599344ab622f788725dc1a9b2d40\",\n                    \"Value\": {\n                        \"left\": 346,\n                        \"bottom\": 1938,\n                        \"right\": 446,\n                        \"top\": 1978\n                    }\n                },\n                {\n                    \"Key\": \"38e15d9337ec6c765a613ed6385a7259\",\n                    \"Value\": {\n                        \"left\": 1093,\n                        \"bottom\": 1800,\n                        \"right\": 1113,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"15d21a945b6a61cd10eb51d973764806\",\n                    \"Value\": {\n                        \"left\": 1070,\n                        \"bottom\": 1776,\n                        \"right\": 1095,\n                        \"top\": 1795\n                    }\n                },\n                {\n                    \"Key\": \"4b7125941858520c06572f0c31a365b1\",\n                    \"Value\": {\n                        \"left\": 638,\n                        \"bottom\": 1800,\n                        \"right\": 658,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"5dc21695180c481f79594f2943d77fa5\",\n                    \"Value\": {\n                        \"left\": 1866,\n                        \"bottom\": 1830,\n                        \"right\": 1886,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"42de0d960e43186b233a053066245c1d\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 842,\n                        \"right\": 102,\n                        \"top\": 942\n                    }\n                },\n                {\n                    \"Key\": \"4be6659607ff04405eed6a4f5c7641d8\",\n                    \"Value\": {\n                        \"left\": 635,\n                        \"bottom\": 1830,\n                        \"right\": 655,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"3a16329731654e127b140d834daf3014\",\n                    \"Value\": {\n                        \"left\": 110,\n                        \"bottom\": 1884,\n                        \"right\": 140,\n                        \"top\": 1914\n                    }\n                },\n                {\n                    \"Key\": \"35d45597574d6da4125d56f026622089\",\n                    \"Value\": {\n                        \"left\": 885,\n                        \"bottom\": 1918,\n                        \"right\": 896,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"3c5000983faf14af2ff15e4628054e0f\",\n                    \"Value\": {\n                        \"left\": 2004,\n                        \"bottom\": 1800,\n                        \"right\": 2025,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"0c560598714a2c8b3eb82ae603ee78bd\",\n                    \"Value\": {\n                        \"left\": 967,\n                        \"bottom\": 1884,\n                        \"right\": 1017,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"645c0d9811e46c6a0ff0007649142762\",\n                    \"Value\": {\n                        \"left\": 1530,\n                        \"bottom\": 1830,\n                        \"right\": 1550,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"35de0b9966e72d501fd4124c61413f86\",\n                    \"Value\": {\n                        \"left\": 1091,\n                        \"bottom\": 1858,\n                        \"right\": 1111,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"66222199071f48b65a517562683657cb\",\n                    \"Value\": {\n                        \"left\": 852,\n                        \"bottom\": 1858,\n                        \"right\": 872,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"678f3b994792282b57067997708137b0\",\n                    \"Value\": {\n                        \"left\": 1828,\n                        \"bottom\": 1884,\n                        \"right\": 1838,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"6be0629a7f532e3b50cd6b8028780add\",\n                    \"Value\": {\n                        \"left\": 707,\n                        \"bottom\": 1830,\n                        \"right\": 727,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"3ffc4e9b156a328e75c2510a185e3447\",\n                    \"Value\": {\n                        \"left\": 1956,\n                        \"bottom\": 1800,\n                        \"right\": 1976,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"5a052c9c3bb10d494da427ce2dcc6d0b\",\n                    \"Value\": {\n                        \"left\": 1427,\n                        \"bottom\": 1858,\n                        \"right\": 1447,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"72b3429c340349362c50008c3bf70c58\",\n                    \"Value\": {\n                        \"left\": 1477,\n                        \"bottom\": 1800,\n                        \"right\": 1497,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"54ed149d6c4009d64c685983728a1b1b\",\n                    \"Value\": {\n                        \"left\": 840,\n                        \"bottom\": 1918,\n                        \"right\": 851,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"0e1b4c9d732143c0649c77fd4cc95098\",\n                    \"Value\": {\n                        \"left\": 1536,\n                        \"bottom\": 1992,\n                        \"right\": 1576,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"3f603a9e07a6001867272fca648e2d28\",\n                    \"Value\": {\n                        \"left\": 1200,\n                        \"bottom\": 1884,\n                        \"right\": 1251,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"2476549e78e44b98719b14da5c4134db\",\n                    \"Value\": {\n                        \"left\": 1542,\n                        \"bottom\": 1918,\n                        \"right\": 1590,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"0d1a159f71725db57bc8657c7a34211a\",\n                    \"Value\": {\n                        \"left\": 231,\n                        \"bottom\": 1992,\n                        \"right\": 241,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"6559699f7855266e0f686d614f992182\",\n                    \"Value\": {\n                        \"left\": 148,\n                        \"bottom\": 1918,\n                        \"right\": 166,\n                        \"top\": 1933\n                    }\n                },\n                {\n                    \"Key\": \"39fb6a9f2c400a6b36e0614432c44b89\",\n                    \"Value\": {\n                        \"left\": 1978,\n                        \"bottom\": 1884,\n                        \"right\": 2002,\n                        \"top\": 1908\n                    }\n                },\n                {\n                    \"Key\": \"470500a075811926793a60284b925a5f\",\n                    \"Value\": {\n                        \"left\": 1934,\n                        \"bottom\": 1938,\n                        \"right\": 1964,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"35ab75a033eb67461637458a31c20f06\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1236,\n                        \"right\": 52,\n                        \"top\": 1286\n                    }\n                },\n                {\n                    \"Key\": \"324112a175042fb832b233fb2d950b2b\",\n                    \"Value\": {\n                        \"left\": 1008,\n                        \"bottom\": 1918,\n                        \"right\": 1019,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"456610a279177bd27132039f6c9c046a\",\n                    \"Value\": {\n                        \"left\": 418,\n                        \"bottom\": 1830,\n                        \"right\": 438,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"69a564a235c80c55159e50d8601030df\",\n                    \"Value\": {\n                        \"left\": 422,\n                        \"bottom\": 1858,\n                        \"right\": 442,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"4f1e6fa245900e7f0e8954af1a505ec9\",\n                    \"Value\": {\n                        \"left\": 1038,\n                        \"bottom\": 1918,\n                        \"right\": 1048,\n                        \"top\": 1928\n                    }\n                },\n                {\n                    \"Key\": \"438b78a21bfe61f33790360a703b0b6d\",\n                    \"Value\": {\n                        \"left\": 206,\n                        \"bottom\": 1776,\n                        \"right\": 226,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"202924a37cfe76312bba65d85a083037\",\n                    \"Value\": {\n                        \"left\": 1931,\n                        \"bottom\": 1858,\n                        \"right\": 1951,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"3a5d29a31f5522ff1742339438281665\",\n                    \"Value\": {\n                        \"left\": 782,\n                        \"bottom\": 1776,\n                        \"right\": 802,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"5b4c2ea318924e6409f4639b047433f8\",\n                    \"Value\": {\n                        \"left\": 326,\n                        \"bottom\": 1776,\n                        \"right\": 346,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"06d553a32bf63e3148df5308361e31a6\",\n                    \"Value\": {\n                        \"left\": 254,\n                        \"bottom\": 1800,\n                        \"right\": 274,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"1f567fa431f2371a538646f27128767f\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 634,\n                        \"right\": 102,\n                        \"top\": 734\n                    }\n                },\n                {\n                    \"Key\": \"480277a63e4f29092bd8095a558f0cf3\",\n                    \"Value\": {\n                        \"left\": 1513,\n                        \"bottom\": 1884,\n                        \"right\": 1563,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"594e45a71e9b723423ff1c0b5c2732c9\",\n                    \"Value\": {\n                        \"left\": 1836,\n                        \"bottom\": 1800,\n                        \"right\": 1856,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"2b594da76cd63ef042d21d0f7a5541b0\",\n                    \"Value\": {\n                        \"left\": 1172,\n                        \"bottom\": 1918,\n                        \"right\": 1222,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"785d75a7453d47d907d2717527b01b21\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 2,\n                        \"right\": 13,\n                        \"top\": 106\n                    }\n                },\n                {\n                    \"Key\": \"3b1d60a914de1949664603c71e29748a\",\n                    \"Value\": {\n                        \"left\": 110,\n                        \"bottom\": 1800,\n                        \"right\": 130,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"55ed66a92fe1176674d36fa95be23741\",\n                    \"Value\": {\n                        \"left\": 1739,\n                        \"bottom\": 1858,\n                        \"right\": 1759,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"3c374faa59f4169e448640451e8c7999\",\n                    \"Value\": {\n                        \"left\": 1964,\n                        \"bottom\": 1992,\n                        \"right\": 2004,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"047125ac645757370538749441e716aa\",\n                    \"Value\": {\n                        \"left\": 1357,\n                        \"bottom\": 1800,\n                        \"right\": 1377,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"5a506fac4bd724fd7cb30e9324e33ac6\",\n                    \"Value\": {\n                        \"left\": 278,\n                        \"bottom\": 1776,\n                        \"right\": 298,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"1d7a7eac346469fc025a054e41e97b4b\",\n                    \"Value\": {\n                        \"left\": 1506,\n                        \"bottom\": 1830,\n                        \"right\": 1526,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"76b963ad2f355a7a0bfd6cfa57434173\",\n                    \"Value\": {\n                        \"left\": 1914,\n                        \"bottom\": 1830,\n                        \"right\": 1934,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"3a1771ad7b2c33446e9e4918798b0fa0\",\n                    \"Value\": {\n                        \"left\": 1264,\n                        \"bottom\": 1938,\n                        \"right\": 1294,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"661810ae7278533651ab14ce7d5b02ea\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 426,\n                        \"right\": 102,\n                        \"top\": 526\n                    }\n                },\n                {\n                    \"Key\": \"789c46ae7749792468c0759112c07c8f\",\n                    \"Value\": {\n                        \"left\": 425,\n                        \"bottom\": 1918,\n                        \"right\": 437,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"10da4daf062652a1109870f7341a00e6\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1668,\n                        \"right\": 7,\n                        \"top\": 1718\n                    }\n                },\n                {\n                    \"Key\": \"25fe24b15a643db6408474c87f060807\",\n                    \"Value\": {\n                        \"left\": 756,\n                        \"bottom\": 1858,\n                        \"right\": 776,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"2afb49b10d0a64ca2423073421b03e7c\",\n                    \"Value\": {\n                        \"left\": 1501,\n                        \"bottom\": 1800,\n                        \"right\": 1521,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"75626bb107dc2e62446319ef51b22e72\",\n                    \"Value\": {\n                        \"left\": 134,\n                        \"bottom\": 1776,\n                        \"right\": 154,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"3db124b21b76367c60276e680ddd3a9a\",\n                    \"Value\": {\n                        \"left\": 1189,\n                        \"bottom\": 1800,\n                        \"right\": 1209,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"112e27b2699838915c2728de34f6766a\",\n                    \"Value\": {\n                        \"left\": 407,\n                        \"bottom\": 1992,\n                        \"right\": 457,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"0f5f2fb233a8486f279b12b338235635\",\n                    \"Value\": {\n                        \"left\": 106,\n                        \"bottom\": 634,\n                        \"right\": 206,\n                        \"top\": 734\n                    }\n                },\n                {\n                    \"Key\": \"774865b273573cf4092515ec758a5a00\",\n                    \"Value\": {\n                        \"left\": 446,\n                        \"bottom\": 1800,\n                        \"right\": 466,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"47b36fb265a33d7264b108b71f49788d\",\n                    \"Value\": {\n                        \"left\": 732,\n                        \"bottom\": 1858,\n                        \"right\": 752,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"3ec067b34c1273214d7136f173c51c04\",\n                    \"Value\": {\n                        \"left\": 11,\n                        \"bottom\": 1668,\n                        \"right\": 61,\n                        \"top\": 1718\n                    }\n                },\n                {\n                    \"Key\": \"44f367b43ad37edf74d46dbf21954378\",\n                    \"Value\": {\n                        \"left\": 461,\n                        \"bottom\": 1992,\n                        \"right\": 511,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"05fb7cb46f9b68b21b710da4496979be\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 738,\n                        \"right\": 102,\n                        \"top\": 838\n                    }\n                },\n                {\n                    \"Key\": \"71f906b500ad3db16f2e193f720901dd\",\n                    \"Value\": {\n                        \"left\": 663,\n                        \"bottom\": 2036,\n                        \"right\": 713,\n                        \"top\": 2041\n                    }\n                },\n                {\n                    \"Key\": \"538858b561c55f5768b558d868a1494f\",\n                    \"Value\": {\n                        \"left\": 799,\n                        \"bottom\": 1992,\n                        \"right\": 839,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"425b7bb56bf153692f200f30446701b8\",\n                    \"Value\": {\n                        \"left\": 494,\n                        \"bottom\": 1776,\n                        \"right\": 514,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"5f3057b6579c79624dab3a6e6509044d\",\n                    \"Value\": {\n                        \"left\": 1405,\n                        \"bottom\": 1800,\n                        \"right\": 1425,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"4ac760b64c831cd8030c07d77097254f\",\n                    \"Value\": {\n                        \"left\": 361,\n                        \"bottom\": 1918,\n                        \"right\": 373,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"779a6db61bdb3be37c723d6d13055ba2\",\n                    \"Value\": {\n                        \"left\": 206,\n                        \"bottom\": 1800,\n                        \"right\": 226,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"466209b744113e2e2f00468514096178\",\n                    \"Value\": {\n                        \"left\": 623,\n                        \"bottom\": 1992,\n                        \"right\": 663,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"54772db77d4168b17bd54bc47eb81845\",\n                    \"Value\": {\n                        \"left\": 1667,\n                        \"bottom\": 1858,\n                        \"right\": 1687,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"54be57b767d45e0437b4256e70044b16\",\n                    \"Value\": {\n                        \"left\": 1622,\n                        \"bottom\": 1938,\n                        \"right\": 1652,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"44f97eb708244d9d3a82672828ff5ab6\",\n                    \"Value\": {\n                        \"left\": 662,\n                        \"bottom\": 1800,\n                        \"right\": 682,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"28ed12b864fb77e1596d23be6d7115ee\",\n                    \"Value\": {\n                        \"left\": 878,\n                        \"bottom\": 1776,\n                        \"right\": 898,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"190819b830c0514328f239ab1fa67c72\",\n                    \"Value\": {\n                        \"left\": 614,\n                        \"bottom\": 1800,\n                        \"right\": 634,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"36381ab856e21d206b244e1b06737b5b\",\n                    \"Value\": {\n                        \"left\": 947,\n                        \"bottom\": 1858,\n                        \"right\": 967,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"525f69b859154d322a44304944642d03\",\n                    \"Value\": {\n                        \"left\": 841,\n                        \"bottom\": 1884,\n                        \"right\": 866,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"038d77b825c407256b1a319e5c182af9\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1722,\n                        \"right\": 12,\n                        \"top\": 1772\n                    }\n                },\n                {\n                    \"Key\": \"546234b9099b361750c635157f2232cb\",\n                    \"Value\": {\n                        \"left\": 854,\n                        \"bottom\": 1800,\n                        \"right\": 874,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"559c35ba2dc500b9146c6f654b925b14\",\n                    \"Value\": {\n                        \"left\": 765,\n                        \"bottom\": 1918,\n                        \"right\": 776,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"1b107fba691359fe56301c2537d311b8\",\n                    \"Value\": {\n                        \"left\": 261,\n                        \"bottom\": 1918,\n                        \"right\": 275,\n                        \"top\": 1932\n                    }\n                },\n                {\n                    \"Key\": \"0a1801bb711a77c60d1679f411b36610\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1182,\n                        \"right\": 11,\n                        \"top\": 1232\n                    }\n                },\n                {\n                    \"Key\": \"749d29bb6c3779a535123773412905ad\",\n                    \"Value\": {\n                        \"left\": 1744,\n                        \"bottom\": 1884,\n                        \"right\": 1794,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"080c03bc303d37fc1b33333b4db333e4\",\n                    \"Value\": {\n                        \"left\": 1381,\n                        \"bottom\": 1800,\n                        \"right\": 1401,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"4c2040bc3f284f8d415e02a908746904\",\n                    \"Value\": {\n                        \"left\": 1458,\n                        \"bottom\": 1830,\n                        \"right\": 1478,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"1f5749bc6ff127440b4144807aad3926\",\n                    \"Value\": {\n                        \"left\": 76,\n                        \"bottom\": 946,\n                        \"right\": 126,\n                        \"top\": 996\n                    }\n                },\n                {\n                    \"Key\": \"455655bc15fd1b43025130401fee2903\",\n                    \"Value\": {\n                        \"left\": 1345,\n                        \"bottom\": 1918,\n                        \"right\": 1393,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"27587cbc421e343b6a172ac445976fbe\",\n                    \"Value\": {\n                        \"left\": 243,\n                        \"bottom\": 1918,\n                        \"right\": 257,\n                        \"top\": 1932\n                    }\n                },\n                {\n                    \"Key\": \"650f05bd13c30fe20cb51f072b7158ac\",\n                    \"Value\": {\n                        \"left\": 1716,\n                        \"bottom\": 1800,\n                        \"right\": 1736,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"6d8e26bf1c642edf1421275871e44c4d\",\n                    \"Value\": {\n                        \"left\": 604,\n                        \"bottom\": 1884,\n                        \"right\": 629,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"6d502dbf63ec3d501f4f242f091d31a8\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 530,\n                        \"right\": 102,\n                        \"top\": 630\n                    }\n                },\n                {\n                    \"Key\": \"00a120c04e8d576676041a9f78ed6876\",\n                    \"Value\": {\n                        \"left\": 182,\n                        \"bottom\": 1858,\n                        \"right\": 202,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"32a52dc06a01174c24c91fd0470b521f\",\n                    \"Value\": {\n                        \"left\": 345,\n                        \"bottom\": 1918,\n                        \"right\": 357,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"310c57c01d81514264a35e92147c0695\",\n                    \"Value\": {\n                        \"left\": 876,\n                        \"bottom\": 1858,\n                        \"right\": 895,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"2cd15cc006a9434340881834695b201e\",\n                    \"Value\": {\n                        \"left\": 1026,\n                        \"bottom\": 1938,\n                        \"right\": 1056,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"038b6ac03b5d39e44855155b2cfd17fb\",\n                    \"Value\": {\n                        \"left\": 1352,\n                        \"bottom\": 1938,\n                        \"right\": 1382,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"3bc720c118ed0f71156b56ff220517ad\",\n                    \"Value\": {\n                        \"left\": 812,\n                        \"bottom\": 1884,\n                        \"right\": 837,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"31d16bc164d5193d66cf30674a824bad\",\n                    \"Value\": {\n                        \"left\": 1213,\n                        \"bottom\": 1800,\n                        \"right\": 1233,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"3bb56ec16bfd38e07e6d0ebc282642fa\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1884,\n                        \"right\": 52,\n                        \"top\": 1934\n                    }\n                },\n                {\n                    \"Key\": \"0e971cc24ed76b3a01e2479e36e876fd\",\n                    \"Value\": {\n                        \"left\": 450,\n                        \"bottom\": 1938,\n                        \"right\": 490,\n                        \"top\": 1978\n                    }\n                },\n                {\n                    \"Key\": \"422043c2736f09560c6d21e658ee7683\",\n                    \"Value\": {\n                        \"left\": 15,\n                        \"bottom\": 1182,\n                        \"right\": 65,\n                        \"top\": 1232\n                    }\n                },\n                {\n                    \"Key\": \"6f1c03c31634776772b40eb339ba39a1\",\n                    \"Value\": {\n                        \"left\": 1043,\n                        \"bottom\": 1858,\n                        \"right\": 1063,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"591a19c30f2c066a3e9d0ac23d5636aa\",\n                    \"Value\": {\n                        \"left\": 1403,\n                        \"bottom\": 1858,\n                        \"right\": 1423,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"20324bc467e374d318f447cc01c33e40\",\n                    \"Value\": {\n                        \"left\": 902,\n                        \"bottom\": 1776,\n                        \"right\": 922,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"40c87ec45ab06d5067f2199828893b23\",\n                    \"Value\": {\n                        \"left\": 925,\n                        \"bottom\": 1800,\n                        \"right\": 945,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"351040c57b69389a361e3ea6791f1f9d\",\n                    \"Value\": {\n                        \"left\": 802,\n                        \"bottom\": 1938,\n                        \"right\": 832,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"489b66c526fb155d37935e626a35213e\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1020,\n                        \"right\": 52,\n                        \"top\": 1070\n                    }\n                },\n                {\n                    \"Key\": \"627879c55d55252c12e70ff81ba77503\",\n                    \"Value\": {\n                        \"left\": 1856,\n                        \"bottom\": 1884,\n                        \"right\": 1866,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"41fe49c7590a4fef6c2220df1d7b7d87\",\n                    \"Value\": {\n                        \"left\": 1067,\n                        \"bottom\": 1858,\n                        \"right\": 1087,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"78d153c7721c600652de44a443fc762d\",\n                    \"Value\": {\n                        \"left\": 326,\n                        \"bottom\": 1858,\n                        \"right\": 346,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"46566cc7182e52e65ccb23636f311aec\",\n                    \"Value\": {\n                        \"left\": 1020,\n                        \"bottom\": 1992,\n                        \"right\": 1120,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"444571c9370c6315115f10624ab0015d\",\n                    \"Value\": {\n                        \"left\": 1812,\n                        \"bottom\": 1800,\n                        \"right\": 1832,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"6c030fca2a162fbc3b713e6b347409bc\",\n                    \"Value\": {\n                        \"left\": 514,\n                        \"bottom\": 1830,\n                        \"right\": 534,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"4be121ca5a8346872dc606b94bcc4903\",\n                    \"Value\": {\n                        \"left\": 1366,\n                        \"bottom\": 1884,\n                        \"right\": 1376,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"704d3eca14ef09fe7f6403fc28b30af0\",\n                    \"Value\": {\n                        \"left\": 15,\n                        \"bottom\": 1614,\n                        \"right\": 65,\n                        \"top\": 1664\n                    }\n                },\n                {\n                    \"Key\": \"3a474acb2c6e301c56005dfa28900761\",\n                    \"Value\": {\n                        \"left\": 470,\n                        \"bottom\": 1858,\n                        \"right\": 490,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"5f116ccb51b84961716a02cf69bb3f66\",\n                    \"Value\": {\n                        \"left\": 1386,\n                        \"bottom\": 1938,\n                        \"right\": 1416,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"6cd41ccc028c51c461a5755c16c4120b\",\n                    \"Value\": {\n                        \"left\": 353,\n                        \"bottom\": 1992,\n                        \"right\": 403,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"269832cd5b6d3c22365a05c128127d44\",\n                    \"Value\": {\n                        \"left\": 1816,\n                        \"bottom\": 1992,\n                        \"right\": 1916,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"02093ccd514e707f0d97363b5a586089\",\n                    \"Value\": {\n                        \"left\": 1499,\n                        \"bottom\": 1884,\n                        \"right\": 1509,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"4b1576cd389d313448200d037bee454d\",\n                    \"Value\": {\n                        \"left\": 610,\n                        \"bottom\": 1830,\n                        \"right\": 631,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"45d262ce5cd66abb769443f0020c0644\",\n                    \"Value\": {\n                        \"left\": 810,\n                        \"bottom\": 1918,\n                        \"right\": 821,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"45cc01cf1d6114d7161a0eb3016c3940\",\n                    \"Value\": {\n                        \"left\": 614,\n                        \"bottom\": 1776,\n                        \"right\": 634,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"0bb21fcf2a9d59731e6f7bcb5f790769\",\n                    \"Value\": {\n                        \"left\": 1404,\n                        \"bottom\": 1884,\n                        \"right\": 1414,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"75de6acf151e03724be01ccc668037bf\",\n                    \"Value\": {\n                        \"left\": 313,\n                        \"bottom\": 1918,\n                        \"right\": 325,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"48a803d01eba69a826b9433d1f5c74aa\",\n                    \"Value\": {\n                        \"left\": 638,\n                        \"bottom\": 1776,\n                        \"right\": 658,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"637e18d0543970a8502250431f967c02\",\n                    \"Value\": {\n                        \"left\": 1621,\n                        \"bottom\": 1800,\n                        \"right\": 1641,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"649a34d011312f0053bb7a6049d87c68\",\n                    \"Value\": {\n                        \"left\": 1499,\n                        \"bottom\": 1858,\n                        \"right\": 1519,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"432e3cd02deb14824fb749746eb841c9\",\n                    \"Value\": {\n                        \"left\": 1691,\n                        \"bottom\": 1858,\n                        \"right\": 1711,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"49914fd04c69532e2f686e70438246c7\",\n                    \"Value\": {\n                        \"left\": 1624,\n                        \"bottom\": 1992,\n                        \"right\": 1664,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"3bf44fd06dc15be1225c471977c55e24\",\n                    \"Value\": {\n                        \"left\": 795,\n                        \"bottom\": 1918,\n                        \"right\": 806,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"36560cd15c64708710a74d6c17562771\",\n                    \"Value\": {\n                        \"left\": 518,\n                        \"bottom\": 1858,\n                        \"right\": 538,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"3d9f26d140170fd2694b3a9a0b4b01fc\",\n                    \"Value\": {\n                        \"left\": 1485,\n                        \"bottom\": 1884,\n                        \"right\": 1495,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"36552ed1342572934c84007c190968b2\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1452,\n                        \"right\": 106,\n                        \"top\": 1502\n                    }\n                },\n                {\n                    \"Key\": \"52793ad12a1d17b438a07882274801d3\",\n                    \"Value\": {\n                        \"left\": 734,\n                        \"bottom\": 1776,\n                        \"right\": 754,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"24cb3cd12ba628cd1c366e721f9767e5\",\n                    \"Value\": {\n                        \"left\": 1104,\n                        \"bottom\": 1918,\n                        \"right\": 1114,\n                        \"top\": 1928\n                    }\n                },\n                {\n                    \"Key\": \"027c5bd1366578a42cb4406a763b0c36\",\n                    \"Value\": {\n                        \"left\": 494,\n                        \"bottom\": 1938,\n                        \"right\": 520,\n                        \"top\": 1971\n                    }\n                },\n                {\n                    \"Key\": \"31bc71d11e040f296289400255cd44e0\",\n                    \"Value\": {\n                        \"left\": 1278,\n                        \"bottom\": 1918,\n                        \"right\": 1287,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"4d0a16d335cf763c4b1b298e08c07386\",\n                    \"Value\": {\n                        \"left\": 1740,\n                        \"bottom\": 1800,\n                        \"right\": 1760,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"78fd4fd32460578e71a660494ac229b5\",\n                    \"Value\": {\n                        \"left\": 1619,\n                        \"bottom\": 1858,\n                        \"right\": 1639,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"41f672d310b84eb418f54de266564b7c\",\n                    \"Value\": {\n                        \"left\": 11,\n                        \"bottom\": 1344,\n                        \"right\": 21,\n                        \"top\": 1394\n                    }\n                },\n                {\n                    \"Key\": \"74843ad46bb7716008181dde34275ad0\",\n                    \"Value\": {\n                        \"left\": 1386,\n                        \"bottom\": 1830,\n                        \"right\": 1406,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"0a0768d465c119435a1259a546b74bea\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1452,\n                        \"right\": 52,\n                        \"top\": 1502\n                    }\n                },\n                {\n                    \"Key\": \"5fff73d414ad467e03685d0a6614095a\",\n                    \"Value\": {\n                        \"left\": 177,\n                        \"bottom\": 1992,\n                        \"right\": 227,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"79930dd67ade03ed2f0317fc55680239\",\n                    \"Value\": {\n                        \"left\": 106,\n                        \"bottom\": 218,\n                        \"right\": 206,\n                        \"top\": 318\n                    }\n                },\n                {\n                    \"Key\": \"043677d61cdb5b240952141e61df282e\",\n                    \"Value\": {\n                        \"left\": 1581,\n                        \"bottom\": 1884,\n                        \"right\": 1631,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"07217ad66edd15986cda39045abb1de8\",\n                    \"Value\": {\n                        \"left\": 1842,\n                        \"bottom\": 1830,\n                        \"right\": 1862,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"3f541bd74565005f1e577dcd78607ee7\",\n                    \"Value\": {\n                        \"left\": 1256,\n                        \"bottom\": 1992,\n                        \"right\": 1356,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"54c045d717b271dc10bd5e9f69611522\",\n                    \"Value\": {\n                        \"left\": 16,\n                        \"bottom\": 1722,\n                        \"right\": 66,\n                        \"top\": 1772\n                    }\n                },\n                {\n                    \"Key\": \"560f6bd82c4c4ef635813018768d064b\",\n                    \"Value\": {\n                        \"left\": 1477,\n                        \"bottom\": 1918,\n                        \"right\": 1525,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"01f342d9768621963e463c1f6bd61e6c\",\n                    \"Value\": {\n                        \"left\": 250,\n                        \"bottom\": 1830,\n                        \"right\": 270,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"58614ed9192c5a003133737e45ec1585\",\n                    \"Value\": {\n                        \"left\": 441,\n                        \"bottom\": 1918,\n                        \"right\": 453,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"065572d91dd10e4d6ac06cf049d44336\",\n                    \"Value\": {\n                        \"left\": 653,\n                        \"bottom\": 2036,\n                        \"right\": 659,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"6a387bd918eb39f3079a75796db55d4a\",\n                    \"Value\": {\n                        \"left\": 1094,\n                        \"bottom\": 1938,\n                        \"right\": 1124,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"160104da0967563125ad686703e8527a\",\n                    \"Value\": {\n                        \"left\": 457,\n                        \"bottom\": 1918,\n                        \"right\": 469,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"1e086ada4002060e2a9a18020d915e7b\",\n                    \"Value\": {\n                        \"left\": 1811,\n                        \"bottom\": 1858,\n                        \"right\": 1831,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"29991fdb6c684da368e2435d6a7a6c92\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1776,\n                        \"right\": 106,\n                        \"top\": 1826\n                    }\n                },\n                {\n                    \"Key\": \"677c5cdb367c384b455a6201167a2109\",\n                    \"Value\": {\n                        \"left\": 711,\n                        \"bottom\": 1992,\n                        \"right\": 751,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"127e42dc65cf0e39157e1ea817ad6c4b\",\n                    \"Value\": {\n                        \"left\": 376,\n                        \"bottom\": 1884,\n                        \"right\": 401,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"665a4ddc0a1b0a0e525770675ada557c\",\n                    \"Value\": {\n                        \"left\": 1261,\n                        \"bottom\": 1800,\n                        \"right\": 1281,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"523d73dc430978bd205b62ac43d108f8\",\n                    \"Value\": {\n                        \"left\": 1597,\n                        \"bottom\": 1800,\n                        \"right\": 1617,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"082c7adc114072223f8624d3657d369c\",\n                    \"Value\": {\n                        \"left\": 106,\n                        \"bottom\": 530,\n                        \"right\": 206,\n                        \"top\": 630\n                    }\n                },\n                {\n                    \"Key\": \"048005dd1a3b5b24427623dc3ae543a2\",\n                    \"Value\": {\n                        \"left\": 1763,\n                        \"bottom\": 1858,\n                        \"right\": 1783,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"774511dd0c17278327a37a61259312ec\",\n                    \"Value\": {\n                        \"left\": 274,\n                        \"bottom\": 1830,\n                        \"right\": 294,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"091e37dd7c032c6c589424ac64c816a4\",\n                    \"Value\": {\n                        \"left\": 710,\n                        \"bottom\": 1776,\n                        \"right\": 730,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"6e6747dd38b07eb6388b25ff595e2cee\",\n                    \"Value\": {\n                        \"left\": 804,\n                        \"bottom\": 1830,\n                        \"right\": 824,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"262b5fdd68660a1c564463250003263d\",\n                    \"Value\": {\n                        \"left\": 422,\n                        \"bottom\": 1776,\n                        \"right\": 442,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"2e9d76dd344d6a7628982a922dac3778\",\n                    \"Value\": {\n                        \"left\": 278,\n                        \"bottom\": 1858,\n                        \"right\": 298,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"3e6d21de649d6d8671587a2505f42bcc\",\n                    \"Value\": {\n                        \"left\": 466,\n                        \"bottom\": 1830,\n                        \"right\": 486,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"100946df482b0cda570110de23e93351\",\n                    \"Value\": {\n                        \"left\": 1360,\n                        \"bottom\": 1992,\n                        \"right\": 1400,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"590b46df4f7122cb30614bba0f591559\",\n                    \"Value\": {\n                        \"left\": 902,\n                        \"bottom\": 1800,\n                        \"right\": 921,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"5fb07cdf72db68ec2383741603480b53\",\n                    \"Value\": {\n                        \"left\": 1595,\n                        \"bottom\": 1858,\n                        \"right\": 1615,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"299b48e027d0686405925a2412df3f79\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1830,\n                        \"right\": 106,\n                        \"top\": 1880\n                    }\n                },\n                {\n                    \"Key\": \"55864ae04d8d76e3674a5d3f210d0132\",\n                    \"Value\": {\n                        \"left\": 110,\n                        \"bottom\": 1858,\n                        \"right\": 130,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"66de7fe06fcf11d5534f7d306268399c\",\n                    \"Value\": {\n                        \"left\": 1907,\n                        \"bottom\": 1858,\n                        \"right\": 1927,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"6c1222e14ca4398d5c8d7cbc115f2840\",\n                    \"Value\": {\n                        \"left\": 1323,\n                        \"bottom\": 1884,\n                        \"right\": 1348,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"67e86ce16b231d8d36f64ec14a9a1c99\",\n                    \"Value\": {\n                        \"left\": 1380,\n                        \"bottom\": 1884,\n                        \"right\": 1400,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"72e37ae1388974ad7a993d373ab56ba1\",\n                    \"Value\": {\n                        \"left\": 1117,\n                        \"bottom\": 1800,\n                        \"right\": 1137,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"6b283ee32c6032f821dd699566a924bc\",\n                    \"Value\": {\n                        \"left\": 1626,\n                        \"bottom\": 1830,\n                        \"right\": 1646,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"1fd643e3718b28ec40157bf56fcb590d\",\n                    \"Value\": {\n                        \"left\": 1060,\n                        \"bottom\": 1938,\n                        \"right\": 1090,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"63bb6ee349d31989559f57c840d81866\",\n                    \"Value\": {\n                        \"left\": 1668,\n                        \"bottom\": 1992,\n                        \"right\": 1768,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"6ea314e470626614681843882a1803d1\",\n                    \"Value\": {\n                        \"left\": 843,\n                        \"bottom\": 1992,\n                        \"right\": 883,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"72ed0fe553872449613d43ca0be545a3\",\n                    \"Value\": {\n                        \"left\": 1021,\n                        \"bottom\": 1884,\n                        \"right\": 1046,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"5bf81ee545af13071b9d7e2877f00610\",\n                    \"Value\": {\n                        \"left\": 1045,\n                        \"bottom\": 1800,\n                        \"right\": 1065,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"6b470de62923542911ed03432213563c\",\n                    \"Value\": {\n                        \"left\": 633,\n                        \"bottom\": 1884,\n                        \"right\": 658,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"693019e64db207b44941030950950f55\",\n                    \"Value\": {\n                        \"left\": 1338,\n                        \"bottom\": 1830,\n                        \"right\": 1358,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"531d00e7050764177538268b12226ef5\",\n                    \"Value\": {\n                        \"left\": 633,\n                        \"bottom\": 2036,\n                        \"right\": 639,\n                        \"top\": 2042\n                    }\n                },\n                {\n                    \"Key\": \"607b57e75dfe1ee103b369af38ab75d0\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 322,\n                        \"right\": 102,\n                        \"top\": 422\n                    }\n                },\n                {\n                    \"Key\": \"71ab5ce818200ebe79e5421f737858b9\",\n                    \"Value\": {\n                        \"left\": 56,\n                        \"bottom\": 1290,\n                        \"right\": 106,\n                        \"top\": 1340\n                    }\n                },\n                {\n                    \"Key\": \"28ea75e86ebe4d45722a4aa63c471559\",\n                    \"Value\": {\n                        \"left\": 1602,\n                        \"bottom\": 1830,\n                        \"right\": 1622,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"631d77e84a46720c07800e75562e0706\",\n                    \"Value\": {\n                        \"left\": 1423,\n                        \"bottom\": 1918,\n                        \"right\": 1473,\n                        \"top\": 1927\n                    }\n                },\n                {\n                    \"Key\": \"5c4657e95eb356133d6102ad258b38d1\",\n                    \"Value\": {\n                        \"left\": 207,\n                        \"bottom\": 1918,\n                        \"right\": 221,\n                        \"top\": 1932\n                    }\n                },\n                {\n                    \"Key\": \"6ee211ea0b413267340a3e665c800d55\",\n                    \"Value\": {\n                        \"left\": 1362,\n                        \"bottom\": 1830,\n                        \"right\": 1382,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"19f41dea4e4a13f50a020e2f72220b70\",\n                    \"Value\": {\n                        \"left\": 2003,\n                        \"bottom\": 1858,\n                        \"right\": 2023,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"37fb3fea30e501d008a455d6364c22cc\",\n                    \"Value\": {\n                        \"left\": 995,\n                        \"bottom\": 1858,\n                        \"right\": 1015,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"0f8341ea3e692c9911eb1daf1e9b4e7e\",\n                    \"Value\": {\n                        \"left\": 1567,\n                        \"bottom\": 1884,\n                        \"right\": 1577,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"641a79ea094a621145ea6c3369474ce4\",\n                    \"Value\": {\n                        \"left\": 735,\n                        \"bottom\": 1918,\n                        \"right\": 746,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"2bc876eb20e874f138c80aa13c010fcd\",\n                    \"Value\": {\n                        \"left\": 377,\n                        \"bottom\": 1918,\n                        \"right\": 389,\n                        \"top\": 1930\n                    }\n                },\n                {\n                    \"Key\": \"3cb634ec0c2a4357104d377d5b6b70f3\",\n                    \"Value\": {\n                        \"left\": 870,\n                        \"bottom\": 1884,\n                        \"right\": 920,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"2c6a44ed41965abc1a6d17074f375ffd\",\n                    \"Value\": {\n                        \"left\": 1285,\n                        \"bottom\": 1800,\n                        \"right\": 1305,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"69056cee22f677695d9540140be069f5\",\n                    \"Value\": {\n                        \"left\": 1778,\n                        \"bottom\": 1938,\n                        \"right\": 1808,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"28e813ef74100f1012ba2a92173f42ae\",\n                    \"Value\": {\n                        \"left\": 1163,\n                        \"bottom\": 1858,\n                        \"right\": 1183,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"763732ef5458313915c3067a2b3c4e4b\",\n                    \"Value\": {\n                        \"left\": 1842,\n                        \"bottom\": 1884,\n                        \"right\": 1852,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"209332ef3b3b7c081e620ce00c9e79f6\",\n                    \"Value\": {\n                        \"left\": 298,\n                        \"bottom\": 1830,\n                        \"right\": 318,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"1f9e44ef743150ce413f35206e607f8a\",\n                    \"Value\": {\n                        \"left\": 1235,\n                        \"bottom\": 1858,\n                        \"right\": 1255,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"318353ef18463f74356c61cf62e2655d\",\n                    \"Value\": {\n                        \"left\": 2,\n                        \"bottom\": 1776,\n                        \"right\": 52,\n                        \"top\": 1826\n                    }\n                },\n                {\n                    \"Key\": \"14cf63ef797313a57f5c1d0e36954c80\",\n                    \"Value\": {\n                        \"left\": 597,\n                        \"bottom\": 1918,\n                        \"right\": 608,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"478b75ef613a0f3f560513f2505f448d\",\n                    \"Value\": {\n                        \"left\": 158,\n                        \"bottom\": 1776,\n                        \"right\": 178,\n                        \"top\": 1796\n                    }\n                },\n                {\n                    \"Key\": \"0edd5cf06d14584b2a7a6f6c109b667d\",\n                    \"Value\": {\n                        \"left\": 302,\n                        \"bottom\": 1800,\n                        \"right\": 322,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"1d7a57f110e27e926320191b2c1f3c6e\",\n                    \"Value\": {\n                        \"left\": 2006,\n                        \"bottom\": 1884,\n                        \"right\": 2030,\n                        \"top\": 1908\n                    }\n                },\n                {\n                    \"Key\": \"5dd75cf130c54760239a02887dc27cc7\",\n                    \"Value\": {\n                        \"left\": 2036,\n                        \"bottom\": 1938,\n                        \"right\": 2046,\n                        \"top\": 1963\n                    }\n                },\n                {\n                    \"Key\": \"00e30bf2552d06127c1d6bd6121b6df3\",\n                    \"Value\": {\n                        \"left\": 1520,\n                        \"bottom\": 1938,\n                        \"right\": 1550,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"500247f24466585a79427cfa01af7dce\",\n                    \"Value\": {\n                        \"left\": 1352,\n                        \"bottom\": 1884,\n                        \"right\": 1362,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"296609f45d5c66f1662224e457af5253\",\n                    \"Value\": {\n                        \"left\": 158,\n                        \"bottom\": 1858,\n                        \"right\": 178,\n                        \"top\": 1878\n                    }\n                },\n                {\n                    \"Key\": \"529e59f47958149e773d7ee574b446aa\",\n                    \"Value\": {\n                        \"left\": 2002,\n                        \"bottom\": 1938,\n                        \"right\": 2032,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"080924f564be321631537a4942fa64a9\",\n                    \"Value\": {\n                        \"left\": 1255,\n                        \"bottom\": 1884,\n                        \"right\": 1305,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"77d528f50f68274831a55392291b7727\",\n                    \"Value\": {\n                        \"left\": 1580,\n                        \"bottom\": 1992,\n                        \"right\": 1620,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"657d27f6662b025769741b7571df4551\",\n                    \"Value\": {\n                        \"left\": 932,\n                        \"bottom\": 1992,\n                        \"right\": 972,\n                        \"top\": 2032\n                    }\n                },\n                {\n                    \"Key\": \"3b8b47f65dba59ff46fa153361030882\",\n                    \"Value\": {\n                        \"left\": 1860,\n                        \"bottom\": 1800,\n                        \"right\": 1880,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"032d7cf61fd679320acb69bb42de42ce\",\n                    \"Value\": {\n                        \"left\": 214,\n                        \"bottom\": 1938,\n                        \"right\": 254,\n                        \"top\": 1978\n                    }\n                },\n                {\n                    \"Key\": \"548a54f733c041ff66a7740d3f6357c3\",\n                    \"Value\": {\n                        \"left\": 1554,\n                        \"bottom\": 1938,\n                        \"right\": 1584,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"7b1f59f85dc573751dfb30cd0f910f13\",\n                    \"Value\": {\n                        \"left\": 134,\n                        \"bottom\": 1800,\n                        \"right\": 154,\n                        \"top\": 1820\n                    }\n                },\n                {\n                    \"Key\": \"488377f87257761c278906856d810341\",\n                    \"Value\": {\n                        \"left\": 734,\n                        \"bottom\": 1938,\n                        \"right\": 764,\n                        \"top\": 1968\n                    }\n                },\n                {\n                    \"Key\": \"699270fa415802b04fdb6f4c53fc365c\",\n                    \"Value\": {\n                        \"left\": 876,\n                        \"bottom\": 1830,\n                        \"right\": 896,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"1fb37cfa09b15ef049c673f426384df2\",\n                    \"Value\": {\n                        \"left\": 612,\n                        \"bottom\": 1918,\n                        \"right\": 716,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"35ad0efb53496d0912370f7d051a1778\",\n                    \"Value\": {\n                        \"left\": 347,\n                        \"bottom\": 1884,\n                        \"right\": 372,\n                        \"top\": 1909\n                    }\n                },\n                {\n                    \"Key\": \"429c14fb5b927a6c63d37e4a16e82996\",\n                    \"Value\": {\n                        \"left\": 771,\n                        \"bottom\": 2036,\n                        \"right\": 821,\n                        \"top\": 2041\n                    }\n                },\n                {\n                    \"Key\": \"5e4c46fb29056c521b45568c43bc3c9d\",\n                    \"Value\": {\n                        \"left\": 489,\n                        \"bottom\": 1918,\n                        \"right\": 593,\n                        \"top\": 1929\n                    }\n                },\n                {\n                    \"Key\": \"089c41fc1ab81a672292049d196e2136\",\n                    \"Value\": {\n                        \"left\": 780,\n                        \"bottom\": 1830,\n                        \"right\": 800,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"683a62fd1b9a26a86d3a1c046dd871aa\",\n                    \"Value\": {\n                        \"left\": 2008,\n                        \"bottom\": 1992,\n                        \"right\": 2043,\n                        \"top\": 2027\n                    }\n                },\n                {\n                    \"Key\": \"267964fe2f9d001f378667c8063a3afc\",\n                    \"Value\": {\n                        \"left\": 900,\n                        \"bottom\": 1830,\n                        \"right\": 920,\n                        \"top\": 1850\n                    }\n                },\n                {\n                    \"Key\": \"234425ff2d201c58768a5aad661228d2\",\n                    \"Value\": {\n                        \"left\": 1157,\n                        \"bottom\": 1884,\n                        \"right\": 1182,\n                        \"top\": 1909\n                    }\n                }\n            ]\n        }\n    ],\n    \"builtImages\": [\n        {\n            \"id\": \"5c8f735e0626703c68375587092b511f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"25fe24b15a643db6408474c87f060807\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5f5841267c8d387d7de441cf5c97258b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5c4657e95eb356133d6102ad258b38d1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7167574c690f33d1144a07d126c80813\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"048005dd1a3b5b24427623dc3ae543a2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"37fb3fea30e501d008a455d6364c22cc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6684387a17f21d804e0c625c3caf019f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7d390b8a244a17b8151e2a552bff1d77\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"10b54243335e704f02303c8959e84535\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"209332ef3b3b7c081e620ce00c9e79f6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"762f0b3d5dec7cac3cab3bf517b24985\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"704d3eca14ef09fe7f6403fc28b30af0\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"31bc71d11e040f296289400255cd44e0\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0bb21fcf2a9d59731e6f7bcb5f790769\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"127a2878256c72d05bbc46b313760577\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"67924967653217e15b5c266e4eed361d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7d843e5e0cde648337a05bb6623a2a00\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"32d449667c0b255a7aa57d1d3b6f0f44\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6ea314e470626614681843882a1803d1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"33cb3c3034c56e73099d2edc35ec4dbc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"267964fe2f9d001f378667c8063a3afc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6371320a681e22eb5e37519315ad40b5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"79bc326019263d237f137a627d8c1f45\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"089c41fc1ab81a672292049d196e2136\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"431f6a8b1fa51b507bcf13da74b15da5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6eab1f21570e74c279d81a6629376682\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7b1f59f85dc573751dfb30cd0f910f13\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"318353ef18463f74356c61cf62e2655d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"30c44f1d3a020549091368ee10242557\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2b793b1a747167266984178a32e32d37\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"75626bb107dc2e62446319ef51b22e72\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"65eb2f6f0461757f5a745acf68e36e25\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4c2040bc3f284f8d415e02a908746904\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3821097566522d056655626b4d6f6167\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"76b963ad2f355a7a0bfd6cfa57434173\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"28ea75e86ebe4d45722a4aa63c471559\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0540372660dd761419143ca574cb27e4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"20324bc467e374d318f447cc01c33e40\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6178636c3089374f799f548b1d0d5689\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3f775a7f10983ba21cd81541526524cf\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"590b46df4f7122cb30614bba0f591559\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"52793ad12a1d17b438a07882274801d3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"18664b4d2b3430cd005469184dcb7f59\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3ecc3c09309b6acd07400dab40ba53a5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"68ca46120340458a6165262e65215b32\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"38e15d9337ec6c765a613ed6385a7259\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"142469090bcb20c24bd227f674f20695\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"304562300aa144977c64737149537ad6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"56585e75082216ba67755c2d5ecb6ed3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"36ab678e3d2829e7337c50795c776702\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"71f906b500ad3db16f2e193f720901dd\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0c9c7079001e4d00039e31d77b0340e1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6bd46d174c5778235f036c466a14569c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"52375c3f583904686b61698f023f6fdd\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"391d434423a375d232167252668112c2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5219235a0fc2622920a3158b12741171\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1f21370c782109b823d11e4a317c06ac\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7575594d29b11a772b430135450f1abe\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"59c96a567a71232e4a442a3f16462b5d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"435138351b066b1e08794d583f1a5840\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"31a9020630255cc11b236fe16025516a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4b7125941858520c06572f0c31a365b1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0f8341ea3e692c9911eb1daf1e9b4e7e\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"017a2a2a1df6218e168766c171e65c33\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"702f3b0e291b134e7fe656243bd33b7d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2bea1b0e0dc334ef4d7d73907776492b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"678f3b994792282b57067997708137b0\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"02d76c7230fb29d76262371646dc3718\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3bf44fd06dc15be1225c471977c55e24\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"15df295163e609cf295f4be120572807\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3a5d29a31f5522ff1742339438281665\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4d7c59300b78244b250b3f14794f7c30\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"438b78a21bfe61f33790360a703b0b6d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"28ed12b864fb77e1596d23be6d7115ee\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"31d11d1b4ae008106f8569b959e72e8c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"07df580d646f523814fb1dfa1a032880\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"35b70b7a022239575e6c5caf32445477\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4e9c0a6367712dc71d7864e112ee1073\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"425b7bb56bf153692f200f30446701b8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"262b5fdd68660a1c564463250003263d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5d65226a1e2816d050af554625192398\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"77d528f50f68274831a55392291b7727\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"36552ed1342572934c84007c190968b2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"591f03127b42058b52b7551d506b43d4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0f5f2fb233a8486f279b12b338235635\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"32ad3f000a6b5fda39ad54624dcd1faa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5a506fac4bd724fd7cb30e9324e33ac6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"48a803d01eba69a826b9433d1f5c74aa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2b7c7314787e224a2d4e36000b1f2754\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5b4c2ea318924e6409f4639b047433f8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"48bb0e912c9b39666e735b4e3a886eb5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"45cc01cf1d6114d7161a0eb3016c3940\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"60ed725a3d34272d059324b94e692036\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"71ab5ce818200ebe79e5421f737858b9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"60bf6b496ccd45d944ec41184aeb62c6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4f482b827d0e70ac4031022c21737971\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"478b75ef613a0f3f560513f2505f448d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"311766284f1a03f22a5646697a2b6471\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"27c90e13537260835a33574067e879b0\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3b8b47f65dba59ff46fa153361030882\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1f567fa431f2371a538646f27128767f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"72082a1f02b2369a6ebe44f326513324\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3baa405d339f58ab636530c92f1310b4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"72b3429c340349362c50008c3bf70c58\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"594e45a71e9b723423ff1c0b5c2732c9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"00ed1560468115f6550541dc7ac54751\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"45a96f8d00a84100285c6c934c9a35d6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"23a50e686362786770a2329c58d95ee2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5f3057b6579c79624dab3a6e6509044d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"030001020f840bd92b4509cd2d577559\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"650f05bd13c30fe20cb51f072b7158ac\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"05fb7cb46f9b68b21b710da4496979be\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"525e72785d54327e07125b1e030e72b1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4d0a16d335cf763c4b1b298e08c07386\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1f5749bc6ff127440b4144807aad3926\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"16aa3d2c44704f5d76fb7ba26d833596\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"731832515faa10846a4967e973b25d43\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"038b6ac03b5d39e44855155b2cfd17fb\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"047125ac645757370538749441e716aa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"080c03bc303d37fc1b33333b4db333e4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1b6724306a1b40cf2115319d1c381026\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2afb49b10d0a64ca2423073421b03e7c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3ffc4e9b156a328e75c2510a185e3447\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5f116ccb51b84961716a02cf69bb3f66\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"56130790077f636835d452e879313909\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"318a6c664a451b14170075374d942536\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"17a1715932ee790051a81af35bf310aa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"657d27f6662b025769741b7571df4551\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"602a754042293ca8784648ab0974477d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5bf81ee545af13071b9d7e2877f00610\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"40c87ec45ab06d5067f2199828893b23\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"453a7b68174246e27a370e083f806b91\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"12a80f3344a31e2d3354161c2f944638\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"445f076b10cc17e92b30538f1c3c0bfc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"041862435ce94df953a73a501775426b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"160104da0967563125ad686703e8527a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0804451b664226dd06421c3039062bea\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"788e1b0b00887b2d07756cbf62855cb3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"37cf2b1b28ac5e1b0272688960da3faa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2aed7e4e04982b9d10b05c736fb253fe\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"44f97eb708244d9d3a82672828ff5ab6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1d4f08fb7872523b28f226cc40766a4f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"529e59f47958149e773d7ee574b446aa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4b3d777c3edd7518080a277b3bfa1296\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"351040c57b69389a361e3ea6791f1f9d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"09df6a6c4d7b25e139f063be7a356bde\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"20d96f61176b2d6d7fb91235159d44f5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6bfe26935ff23aca66982fc5129f62a5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"11871a410d053f797d83262c17f5568c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"58614ed9192c5a003133737e45ec1585\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6cd41ccc028c51c461a5755c16c4120b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0a77395b4cd81aed6a55012160e32ffe\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"488377f87257761c278906856d810341\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4392114d25d616c562b14a96373a52bb\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1b107fba691359fe56301c2537d311b8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"68176d7a25466a163a972c1d02f90197\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"546234b9099b361750c635157f2232cb\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6d8e26bf1c642edf1421275871e44c4d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"190819b830c0514328f239ab1fa67c72\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"59ea323733796f7b522f19622984279d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"29991fdb6c684da368e2435d6a7a6c92\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"42f7050e392b57a01bda55e42a101505\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"38515d6a082a49430c38322b35f51152\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"68a8066d52ea4321063e1de047a508d6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"79930dd67ade03ed2f0317fc55680239\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"32794f087da131ca780428ad6fd463fa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"233c0d4269646e2f31e71b8d5d1e5fc4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"78813a607702658230400ce6143a0a8f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"027c5bd1366578a42cb4406a763b0c36\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"559c35ba2dc500b9146c6f654b925b14\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"53b81d1c1d7b359b7833213467275026\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1fd643e3718b28ec40157bf56fcb590d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"54be57b767d45e0437b4256e70044b16\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7b175e291a460aec259d179c58511101\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"54aa383b507022dd4d0b371f2a8b24d2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"09b44d6a4e8927f40a6826c07d5b69f9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"684c733646a47f364a4c3fc716dd5c63\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"27587cbc421e343b6a172ac445976fbe\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"66a662840f893c5e33eb68ff57751cb1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"54c045d717b271dc10bd5e9f69611522\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6f632454112e23a87ded0987767167d8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6b31296c3d3c54f062913bac516e6eb8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"785d75a7453d47d907d2717527b01b21\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3d9f26d140170fd2694b3a9a0b4b01fc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"645c0d9811e46c6a0ff0007649142762\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"562938681f5f234d3cb33c9d46e75071\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"39fb6a9f2c400a6b36e0614432c44b89\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"423a2e4971d01ef40b016611069c7e89\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"25803a3e06cc40b82fcf214a2d4e3db6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"66ac154f1c1f06111075313339e66aa4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6b470de62923542911ed03432213563c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"49914fd04c69532e2f686e70438246c7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"74843ad46bb7716008181dde34275ad0\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5130158340bc173258075d59545861e1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"25896a4c65bb6d021da41e1540b5348f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6ee211ea0b413267340a3e665c800d55\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4694254d5c164bb85bae7b8c0ac82f28\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"538858b561c55f5768b558d868a1494f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2cfd7d0d00a7628202907e0d10d33253\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3803547f5e515b5c33764a6736060bc7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4ca64f006ea3650561c405895d7c75bf\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0d090480192b622f13f708e024385b7e\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6b283ee32c6032f821dd699566a924bc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"693019e64db207b44941030950950f55\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7c09624e7daa45ef4dd24628717942d5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"07ac3a5f2251088947083bce123839b9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0a0768d465c119435a1259a546b74bea\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"57ac6501709c48d3787b437546946c28\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"13591d571afc12bf6d712ee753750268\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"10da4daf062652a1109870f7341a00e6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"100946df482b0cda570110de23e93351\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"62dd34421c60266949cd2c982d905c03\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4e5b4e066f10548e335210236af46e01\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0ca3463a618a4f0e52eb0cd473541835\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"324112a175042fb832b233fb2d950b2b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"32a52dc06a01174c24c91fd0470b521f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4ac760b64c831cd8030c07d77097254f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"749b253c0a4659251eb1169857b81aa6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6c030fca2a162fbc3b713e6b347409bc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"01c62a82737d79b045f411651bdd2ce6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4469659002a71b5f254f744108064c02\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"789c46ae7749792468c0759112c07c8f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1db20a2430920e752fbe48f84c6c26f4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4bfd046473e85477661226ea70543b7a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2bc876eb20e874f138c80aa13c010fcd\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"77c5378922e432762d8578080cbb35bd\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"792525843ae60c666e3b7e9100bd36ac\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"27250e883db655432ad15beb37827100\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"15d21a945b6a61cd10eb51d973764806\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"699270fa415802b04fdb6f4c53fc365c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6e6747dd38b07eb6388b25ff595e2cee\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"13cc3f4f45710a54352307ef5f001eef\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5a320d131c7e7d0e31c272165b195cd1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"03a5164927dd0e7d254555f3454f1205\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"24cb3cd12ba628cd1c366e721f9767e5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"677c5cdb367c384b455a6201167a2109\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4b587658011b29bb03cd435336194c6c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1a1a5d462ec011d23a095fa761211711\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6c06665158ed26e82d8306d04f9f73c4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4fc26f8f22f13b4d2b45412a54061211\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"065572d91dd10e4d6ac06cf049d44336\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"112e27b2699838915c2728de34f6766a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"489b66c526fb155d37935e626a35213e\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"005b202c650949397c95564d0de102f5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"04d6224a54773744177e575760953423\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6031706418516c4355323b481f555675\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"75fd696b197523351ff218f2007b35fa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6d66543e4b014c561fc16c7c7b792e44\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"35d73d3060ef522f728d654c31bb3732\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"765f0d4e10b21aec273c3d092d27126e\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"029a646b21e3528d523f7a3f36cb4a7a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"782607554b0f21084ded5ae06a3d68b6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"06834b90737824c019bf06f575bc5511\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3e6d21de649d6d8671587a2505f42bcc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1b582c1d0d7c08d64ec65c182cf83ea7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"30f6096246af62b6395e17092ead3fa5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"19f41dea4e4a13f50a020e2f72220b70\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4d345a677c6e5c0e41196c7568304c76\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6fe3096f11792bb14ea020781f2a1e2d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2640510a17026a0e32b31efd3c402c0d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2a13006326f35cff2c0408dc48be0f54\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"75de6acf151e03724be01ccc668037bf\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"44f367b43ad37edf74d46dbf21954378\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6b9e3a777ef30b0346e62cb63ca10d5a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3b9f525e4be211da376e4f8e667b4e95\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"41516f7f0265318f5f6d731f16f66682\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6ca8496030160e99272a75a135454b85\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"69a564a235c80c55159e50d8601030df\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"591a19c30f2c066a3e9d0ac23d5636aa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"54533c7853254fc26d4f6bd9082129a8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0824555552e83f137bea39715a717db2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"79ab3e2b2d254269187d39fd7f766955\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"737a6f90605173ff5aee59a84e7456ac\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5a052c9c3bb10d494da427ce2dcc6d0b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3d92112b49ba16f46aa3249767164401\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"42de0d960e43186b233a053066245c1d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"124c7226031f44cd20fe5a9b6c5d1ac2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"36381ab856e21d206b244e1b06737b5b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6f1c03c31634776772b40eb339ba39a1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"35de0b9966e72d501fd4124c61413f86\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"627879c55d55252c12e70ff81ba77503\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1f9e44ef743150ce413f35206e607f8a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"66222199071f48b65a517562683657cb\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"50600547271f4d2f38d4282109604b00\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"35ab75a033eb67461637458a31c20f06\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"500247f24466585a79427cfa01af7dce\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2b5175271de526a5147d745d6ea900f7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3c40393d03af1c4760f92eee1a6666f3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"631d77e84a46720c07800e75562e0706\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"03d8647120c94ede2993460304155899\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"34c1728e5959446a322b3abd0166447c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"55864ae04d8d76e3674a5d3f210d0132\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6c7d7204331f14d86774363220a767b0\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0b78004054635ed540d678bc332c3c87\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"28e813ef74100f1012ba2a92173f42ae\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"47b36fb265a33d7264b108b71f49788d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"78fd4fd32460578e71a660494ac229b5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0ffc467840e900ce18ad18ce4da851da\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6e031d4c1377202c3a5a783240f55e49\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0a1801bb711a77c60d1679f411b36610\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7497418a192e3b84404d30cc3125162b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1d7a57f110e27e926320191b2c1f3c6e\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"466209b744113e2e2f00468514096178\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"13de255c0a0f177552c23a120e360df8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"121e600f2a8b13aa511c2b4a11693ee9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0022335023a07b4b394c61236933222a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1e0d548b73bc26bc2c0e538329f5163b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5fb07cdf72db68ec2383741603480b53\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3bb56ec16bfd38e07e6d0ebc282642fa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"429c14fb5b927a6c63d37e4a16e82996\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"31e057267cbf1b5444701f1722b74eb2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"717f148f5dd235e30a7732a50c550b8e\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"749d29bb6c3779a535123773412905ad\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"748d796725b867fd6135105725ee07d7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0d1a159f71725db57bc8657c7a34211a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"18770e601cfa5abd72cb7b061296152f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"296609f45d5c66f1662224e457af5253\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6c0b3f44539347465fbc4ca23cfd630b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"69d8209312f214ac766623ce37fc368c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"780f085f12c9163638327be949611fc8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2b72590d15f550c512e446de2cd73200\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6e5320454c85738663ce23b55dbd4dfa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2e9d76dd344d6a7628982a922dac3778\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4f0c3185756751f601600a741a761dd6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"69de633d136b4c903d2d39f74bc7566a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"00a120c04e8d576676041a9f78ed6876\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"49be56066b956738561b3410432148f6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"699b04077c1b0a016a8f17de78fb4bf8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3413234a0ae275d734b158ae52574be2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"72c5439208a9592b0e70560e6dcb2704\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"36560cd15c64708710a74d6c17562771\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7da75a6938e7194d2d4a3a62615565fc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3a474acb2c6e301c56005dfa28900761\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"51ff7c566d413ee67fd406f012de66c1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"74086a597ee67e91405c1a0b0efe419b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"781a427a28b90ffe23a75d426a9443e6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"763732ef5458313915c3067a2b3c4e4b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2e1f151556f90d6c00794feb232c0812\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5e4c46fb29056c521b45568c43bc3c9d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3aa5715005765c392f0e0bc013f82e10\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4b426c1230e851bb43645f874af90c0f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"660054543ee938f231472c8a3e9115a2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"41fe49c7590a4fef6c2220df1d7b7d87\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"560f6bd82c4c4ef635813018768d064b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"78d153c7721c600652de44a443fc762d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"729f389179896e145e2c2d9f4601358c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3a16329731654e127b140d834daf3014\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"649a34d011312f0053bb7a6049d87c68\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"01f342d9768621963e463c1f6bd61e6c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4b1576cd389d313448200d037bee454d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"22fc284427297a99761a2732351e3bcd\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"36e2240d67b63628380f00e10ff525e4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"456610a279177bd27132039f6c9c046a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0a7e1d772d8163c74c276b82046055af\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"54772db77d4168b17bd54bc47eb81845\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3f02032807bd607762ab0ee748924b0c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7308512942a4704708ca55320bc953a9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"14cf63ef797313a57f5c1d0e36954c80\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"432e3cd02deb14824fb749746eb841c9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4be6659607ff04405eed6a4f5c7641d8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4bba69197e1d50a716f838f4297a08c6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5b492262019075be60c50c7a7a8f4439\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2e3d582e085c21d943eb68c334e954c8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"55612948208b611c6518424a33152bfc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"17eb725123f5219028c552b8149f330c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1b4e1f836afb6b7a38b32c5d7e8c31aa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"55ed66a92fe1176674d36fa95be23741\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1d66598e2402227f299625033b627c88\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"200f651f024d34763b852794303a23d2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"41f672d310b84eb418f54de266564b7c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4be121ca5a8346872dc606b94bcc4903\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"202924a37cfe76312bba65d85a083037\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"10d90c2d06855e3e6f8d34405b4b079a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"32a2400c7dcb7aaf29e3729e0015524c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1a0c0677587a3c73719c6aa379d113c1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0f555e523e671f08741010d779e5363a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5ffb001041e4477b5e952bda0c994001\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"683a62fd1b9a26a86d3a1c046dd871aa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"641a79ea094a621145ea6c3369474ce4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4a446b731cad7540075e713659336d0e\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"780a1a5d6ce91d64442a0f8f708e2023\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4458068263d003483fca161a66a50c84\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"69826e777c0875aa2538405f72e1787f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"35d45597574d6da4125d56f026622089\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5fff73d414ad467e03685d0a6614095a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6d502dbf63ec3d501f4f242f091d31a8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5dd75cf130c54760239a02887dc27cc7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"51ce450e4dde5a940e313b1f579833ec\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"52e145054c0f496f3aa67d424e485af4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"06a16251065b6c4308414f0b052c5a3b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1d7a7eac346469fc025a054e41e97b4b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2726133a77804ef50abf7de97d40637b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"33dc27782cbd3b856f98546a48551add\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"69056cee22f677695d9540140be069f5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0096333b50663c5276a9663e2ae53701\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6f646670444357a320e9423f2eaa4e80\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"299b48e027d0686405925a2412df3f79\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"41d93c2b3a39274a7d35039540fe3aab\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"07f6672722551dc57802769e0a7a4c8d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"44b8262876e4683548b83b554e544bd7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6fd46d247f183bac5c7f17e55d937922\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5dc21695180c481f79594f2943d77fa5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"779a6db61bdb3be37c723d6d13055ba2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6a387bd918eb39f3079a75796db55d4a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"774865b273573cf4092515ec758a5a00\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"36942f0200314c5e55a2550f113325d4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"468a0f7c35cb0353298d77d67de26056\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"525f69b859154d322a44304944642d03\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4c237879436f27d225870c8c10c8650d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"65472887152f187c50a824111b2646a2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0c560598714a2c8b3eb82ae603ee78bd\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3cb634ec0c2a4357104d377d5b6b70f3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"661810ae7278533651ab14ce7d5b02ea\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3b1d60a914de1949664603c71e29748a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"45d262ce5cd66abb769443f0020c0644\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"06470f6928c4378e7c1e31f413a137dc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"221859314013209c72795c99260719ed\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"07217ad66edd15986cda39045abb1de8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"1b293703451e37d706fb7748469e08bb\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2adb56610cab4d602fb6062b582b7c61\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"29821f7977603f9b4d555dd659f271a7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3c374faa59f4169e448640451e8c7999\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"531d00e7050764177538268b12226ef5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"422043c2736f09560c6d21e658ee7683\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0edd5cf06d14584b2a7a6f6c109b667d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1a36752146b9557f7cd761ba79d47e94\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1813201c420a5b7b05ae23f244553190\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"478514024c9c0cb854b9126c2f2d2607\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"650c7b66370f2b0460fe0509059666e4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"52c8772f641a30933b5c46be47a80b53\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"19f1480664de4c0b1d4f58ef04ba19e4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"032d7cf61fd679320acb69bb42de42ce\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"234425ff2d201c58768a5aad661228d2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0e1b4c9d732143c0649c77fd4cc95098\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2e3a772860da3b1d3db2226504fe236f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"00e30bf2552d06127c1d6bd6121b6df3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3bc720c118ed0f71156b56ff220517ad\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3ccc453a1b03741164900bd765750438\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1f344e0b73185347370b0778377d49a9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"127e42dc65cf0e39157e1ea817ad6c4b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"15d62b872c3534251a074af843192a3f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"72381902329400821187457f66005e84\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7fae2e1d1d9245d2651a47c07c2868cb\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3b0a3d7952be0a6a56036a5675792f0b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3bf440583f843a155ddd77b4244706a2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"307655027af95f14370c2ffc61632f01\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"27ed427925bf0f15242e054d7d15565c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"02093ccd514e707f0d97363b5a586089\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0c6a5d8a4a661a94747c6bf051ae52cc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6338023a6c50328d3bab0bb453f864cf\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"607b57e75dfe1ee103b369af38ab75d0\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4126572b2947687f44c94e68660d1bca\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"72ed0fe553872449613d43ca0be545a3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7172077513da491f1f1046554a7d0bcc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"365d6782616b35260cdd62af000c03d6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7b5d00142e125b0b2fcb6ab768015af3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"31d16bc164d5193d66cf30674a824bad\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2c77314d33f1336a1840362b2c9d1b2a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"4e001b7940a900a748a414b035541820\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0076397239c3101d45355ef116411c75\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6c1222e14ca4398d5c8d7cbc115f2840\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"470500a075811926793a60284b925a5f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"08102b891cb142b90e4240df07f947c2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"67e9505e448369275b7a311b508f0755\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3db124b21b76367c60276e680ddd3a9a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"35ad0efb53496d0912370f7d051a1778\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3e3b1639646b2d8435c4415d5d424648\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"665a4ddc0a1b0a0e525770675ada557c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"5ed83b1a2d9554e654d616f1125770aa\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"69204e1d69a568237d6a5d6a1b7a3ef1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"72e37ae1388974ad7a993d373ab56ba1\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"77d5176139101e81137d499c70052ebc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"44b9252613bf763933ae3d0e36504f91\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4f1e6fa245900e7f0e8954af1a505ec9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"657107580d8d6e2e2a095a9f3e5b2f5c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"4c3715695b1a3fed0d5a2a93447314df\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"18867189163f78f1110406954fc902d2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"06b2507f1dc27444485922973f1651c6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"112077614d0305be65f907c538ca1f62\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"74f605357436654a0cdb0ba9699d3617\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"548a54f733c041ff66a7740d3f6357c3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"637e18d0543970a8502250431f967c02\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1efa5a3609e93b26740d4bbf59860925\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"54ed149d6c4009d64c685983728a1b1b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"006c29830a4061c219336f376edd7408\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"14466d616af14fdd3d94541c058c55ae\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2b19000955c963fd6c0b0af07fae2676\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7112354647cc3b075496797f0e634a33\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"080924f564be321631537a4942fa64a9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"23801071629939ea6a0054b87cdd16a9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3c5000983faf14af2ff15e4628054e0f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3c407b2b46f807e6602877a4259c2a79\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7ba135291ad820ae241238582e671ba2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0064294220b1273b6b9152523b963cdc\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"082c7adc114072223f8624d3657d369c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"038d77b825c407256b1a319e5c182af9\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3f603a9e07a6001867272fca648e2d28\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2b594da76cd63ef042d21d0f7a5541b0\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3ec067b34c1273214d7136f173c51c04\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"67e86ce16b231d8d36f64ec14a9a1c99\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"06be084535be030858333acf49d92db4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1fb37cfa09b15ef049c673f426384df2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"7260312d19e92c0d40c307a13e7355ed\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2476549e78e44b98719b14da5c4134db\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"681b1d0846ca2cf9407570075db31a2d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6e971e235a7c5b2101a4317503c85537\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2db22e592f981ca01e47235a71625654\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0733208b08c93dd669e00f4c219c633a\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"425d6b6b34666dfe66c0353b60a56594\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6daf1e8158c73247507728605cb232fe\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"733601084caf34553ee648723c4f35be\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"480277a63e4f29092bd8095a558f0cf3\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"091e37dd7c032c6c589424ac64c816a4\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"043677d61cdb5b240952141e61df282e\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"328477442d7b256a29de46ec652366a7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3a1771ad7b2c33446e9e4918798b0fa0\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"455655bc15fd1b43025130401fee2903\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"523d73dc430978bd205b62ac43d108f8\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"698b294551681f373f3a5d233f7c048d\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0824232e6191377627b702fc0f552603\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"6be0629a7f532e3b50cd6b8028780add\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"06d553a32bf63e3148df5308361e31a6\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"0a256d914aae1bef013f020f70dc0320\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"7fed733e18332f2d647354bf375820be\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"2cd15cc006a9434340881834695b201e\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"43ad697756894fa942a9115f69e858d5\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"774511dd0c17278327a37a61259312ec\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"46566cc7182e52e65ccb23636f311aec\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"54540c6d09e92f2072c56ff6229c42e2\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"3f541bd74565005f1e577dcd78607ee7\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"1e086ada4002060e2a9a18020d915e7b\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"66de7fe06fcf11d5534f7d306268399c\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 24,\n                \"mHour\": 12,\n                \"mMinute\": 51,\n                \"mSecond\": 46\n            }\n        },\n        {\n            \"id\": \"269832cd5b6d3c22365a05c128127d44\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"3a5d434026851c7718a1233d0ab2013f\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"106d599344ab622f788725dc1a9b2d40\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        },\n        {\n            \"id\": \"63bb6ee349d31989559f57c840d81866\",\n            \"time\": {\n                \"mYear\": 2020,\n                \"mMonth\": 3,\n                \"mDay\": 10,\n                \"mHour\": 14,\n                \"mMinute\": 42,\n                \"mSecond\": 31\n            }\n        }\n    ],\n    \"mImages\": [\n        {\n            \"id\": \"63bb6ee349d31989559f57c840d81866\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"106d599344ab622f788725dc1a9b2d40\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3a5d434026851c7718a1233d0ab2013f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"269832cd5b6d3c22365a05c128127d44\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1e086ada4002060e2a9a18020d915e7b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"66de7fe06fcf11d5534f7d306268399c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3f541bd74565005f1e577dcd78607ee7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"46566cc7182e52e65ccb23636f311aec\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"774511dd0c17278327a37a61259312ec\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"43ad697756894fa942a9115f69e858d5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"54540c6d09e92f2072c56ff6229c42e2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7fed733e18332f2d647354bf375820be\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2cd15cc006a9434340881834695b201e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0824232e6191377627b702fc0f552603\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6be0629a7f532e3b50cd6b8028780add\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"698b294551681f373f3a5d233f7c048d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"06d553a32bf63e3148df5308361e31a6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0a256d914aae1bef013f020f70dc0320\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"523d73dc430978bd205b62ac43d108f8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"043677d61cdb5b240952141e61df282e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0733208b08c93dd669e00f4c219c633a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"480277a63e4f29092bd8095a558f0cf3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2476549e78e44b98719b14da5c4134db\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"733601084caf34553ee648723c4f35be\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1fb37cfa09b15ef049c673f426384df2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6daf1e8158c73247507728605cb232fe\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6e971e235a7c5b2101a4317503c85537\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3a1771ad7b2c33446e9e4918798b0fa0\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"328477442d7b256a29de46ec652366a7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"681b1d0846ca2cf9407570075db31a2d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2db22e592f981ca01e47235a71625654\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"425d6b6b34666dfe66c0353b60a56594\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"091e37dd7c032c6c589424ac64c816a4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"455655bc15fd1b43025130401fee2903\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7260312d19e92c0d40c307a13e7355ed\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"67e86ce16b231d8d36f64ec14a9a1c99\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"080924f564be321631537a4942fa64a9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0064294220b1273b6b9152523b963cdc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7112354647cc3b075496797f0e634a33\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3c407b2b46f807e6602877a4259c2a79\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3f603a9e07a6001867272fca648e2d28\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7ba135291ad820ae241238582e671ba2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2b594da76cd63ef042d21d0f7a5541b0\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3c5000983faf14af2ff15e4628054e0f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"06be084535be030858333acf49d92db4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"038d77b825c407256b1a319e5c182af9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3ec067b34c1273214d7136f173c51c04\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"23801071629939ea6a0054b87cdd16a9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"082c7adc114072223f8624d3657d369c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"06b2507f1dc27444485922973f1651c6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4f1e6fa245900e7f0e8954af1a505ec9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"74f605357436654a0cdb0ba9699d3617\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"637e18d0543970a8502250431f967c02\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"112077614d0305be65f907c538ca1f62\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"006c29830a4061c219336f376edd7408\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"657107580d8d6e2e2a095a9f3e5b2f5c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"54ed149d6c4009d64c685983728a1b1b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2b19000955c963fd6c0b0af07fae2676\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1efa5a3609e93b26740d4bbf59860925\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"44b9252613bf763933ae3d0e36504f91\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4c3715695b1a3fed0d5a2a93447314df\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"548a54f733c041ff66a7740d3f6357c3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"14466d616af14fdd3d94541c058c55ae\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"18867189163f78f1110406954fc902d2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"77d5176139101e81137d499c70052ebc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7b5d00142e125b0b2fcb6ab768015af3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"470500a075811926793a60284b925a5f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0076397239c3101d45355ef116411c75\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"665a4ddc0a1b0a0e525770675ada557c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"31d16bc164d5193d66cf30674a824bad\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3db124b21b76367c60276e680ddd3a9a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3e3b1639646b2d8435c4415d5d424648\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"69204e1d69a568237d6a5d6a1b7a3ef1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"08102b891cb142b90e4240df07f947c2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"72e37ae1388974ad7a993d373ab56ba1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"365d6782616b35260cdd62af000c03d6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"67e9505e448369275b7a311b508f0755\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"35ad0efb53496d0912370f7d051a1778\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6c1222e14ca4398d5c8d7cbc115f2840\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5ed83b1a2d9554e654d616f1125770aa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"72ed0fe553872449613d43ca0be545a3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4e001b7940a900a748a414b035541820\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2c77314d33f1336a1840362b2c9d1b2a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7172077513da491f1f1046554a7d0bcc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4126572b2947687f44c94e68660d1bca\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"27ed427925bf0f15242e054d7d15565c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3bc720c118ed0f71156b56ff220517ad\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0e1b4c9d732143c0649c77fd4cc95098\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"00e30bf2552d06127c1d6bd6121b6df3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"72381902329400821187457f66005e84\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6338023a6c50328d3bab0bb453f864cf\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"02093ccd514e707f0d97363b5a586089\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0c6a5d8a4a661a94747c6bf051ae52cc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"52c8772f641a30933b5c46be47a80b53\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1f344e0b73185347370b0778377d49a9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"607b57e75dfe1ee103b369af38ab75d0\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"032d7cf61fd679320acb69bb42de42ce\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2e3a772860da3b1d3db2226504fe236f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3bf440583f843a155ddd77b4244706a2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7fae2e1d1d9245d2651a47c07c2868cb\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3b0a3d7952be0a6a56036a5675792f0b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"127e42dc65cf0e39157e1ea817ad6c4b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"15d62b872c3534251a074af843192a3f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"19f1480664de4c0b1d4f58ef04ba19e4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"307655027af95f14370c2ffc61632f01\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"234425ff2d201c58768a5aad661228d2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3ccc453a1b03741164900bd765750438\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"29821f7977603f9b4d555dd659f271a7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1b293703451e37d706fb7748469e08bb\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4c237879436f27d225870c8c10c8650d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"774865b273573cf4092515ec758a5a00\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"36942f0200314c5e55a2550f113325d4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0edd5cf06d14584b2a7a6f6c109b667d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"422043c2736f09560c6d21e658ee7683\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3c374faa59f4169e448640451e8c7999\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"468a0f7c35cb0353298d77d67de26056\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"06470f6928c4378e7c1e31f413a137dc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"779a6db61bdb3be37c723d6d13055ba2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6a387bd918eb39f3079a75796db55d4a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2adb56610cab4d602fb6062b582b7c61\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"531d00e7050764177538268b12226ef5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"221859314013209c72795c99260719ed\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"661810ae7278533651ab14ce7d5b02ea\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1a36752146b9557f7cd761ba79d47e94\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"45d262ce5cd66abb769443f0020c0644\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"650c7b66370f2b0460fe0509059666e4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3b1d60a914de1949664603c71e29748a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0c560598714a2c8b3eb82ae603ee78bd\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"65472887152f187c50a824111b2646a2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3cb634ec0c2a4357104d377d5b6b70f3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1813201c420a5b7b05ae23f244553190\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"525f69b859154d322a44304944642d03\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"478514024c9c0cb854b9126c2f2d2607\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5dc21695180c481f79594f2943d77fa5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"07217ad66edd15986cda39045abb1de8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"44b8262876e4683548b83b554e544bd7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0096333b50663c5276a9663e2ae53701\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"69056cee22f677695d9540140be069f5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"06a16251065b6c4308414f0b052c5a3b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"33dc27782cbd3b856f98546a48551add\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"69826e777c0875aa2538405f72e1787f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1d7a7eac346469fc025a054e41e97b4b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"07f6672722551dc57802769e0a7a4c8d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"35d45597574d6da4125d56f026622089\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2726133a77804ef50abf7de97d40637b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6fd46d247f183bac5c7f17e55d937922\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"41d93c2b3a39274a7d35039540fe3aab\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6d502dbf63ec3d501f4f242f091d31a8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4458068263d003483fca161a66a50c84\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"51ce450e4dde5a940e313b1f579833ec\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"299b48e027d0686405925a2412df3f79\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"52e145054c0f496f3aa67d424e485af4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6f646670444357a320e9423f2eaa4e80\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5fff73d414ad467e03685d0a6614095a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5dd75cf130c54760239a02887dc27cc7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"22fc284427297a99761a2732351e3bcd\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"683a62fd1b9a26a86d3a1c046dd871aa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3a16329731654e127b140d834daf3014\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4a446b731cad7540075e713659336d0e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"55612948208b611c6518424a33152bfc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"41df300a33bc6fe365c7553102276156\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1b4e1f836afb6b7a38b32c5d7e8c31aa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"36e2240d67b63628380f00e10ff525e4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"14cf63ef797313a57f5c1d0e36954c80\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"17eb725123f5219028c552b8149f330c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"780a1a5d6ce91d64442a0f8f708e2023\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4be6659607ff04405eed6a4f5c7641d8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"10d90c2d06855e3e6f8d34405b4b079a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4b1576cd389d313448200d037bee454d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"456610a279177bd27132039f6c9c046a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7308512942a4704708ca55320bc953a9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2a7b1669373d57e42f9035225a4a4c22\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"01f342d9768621963e463c1f6bd61e6c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"200f651f024d34763b852794303a23d2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"202924a37cfe76312bba65d85a083037\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"641a79ea094a621145ea6c3369474ce4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4bba69197e1d50a716f838f4297a08c6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2e3d582e085c21d943eb68c334e954c8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"55ed66a92fe1176674d36fa95be23741\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1a0c0677587a3c73719c6aa379d113c1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"432e3cd02deb14824fb749746eb841c9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"54772db77d4168b17bd54bc47eb81845\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"32a2400c7dcb7aaf29e3729e0015524c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5ffb001041e4477b5e952bda0c994001\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4be121ca5a8346872dc606b94bcc4903\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"649a34d011312f0053bb7a6049d87c68\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"41f672d310b84eb418f54de266564b7c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1d66598e2402227f299625033b627c88\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0a7e1d772d8163c74c276b82046055af\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5b492262019075be60c50c7a7a8f4439\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"078a5c5269ee695a722144d642937467\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0f555e523e671f08741010d779e5363a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3f02032807bd607762ab0ee748924b0c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3ed409235a342972306c7b0933647511\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 4,\n                \"mDay\": 1,\n                \"mHour\": 23,\n                \"mMinute\": 15,\n                \"mSecond\": 32\n            }\n        },\n        {\n            \"id\": \"717f148f5dd235e30a7732a50c550b8e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6c0b3f44539347465fbc4ca23cfd630b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"41fe49c7590a4fef6c2220df1d7b7d87\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"749d29bb6c3779a535123773412905ad\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"429c14fb5b927a6c63d37e4a16e82996\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6e5320454c85738663ce23b55dbd4dfa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"72c5439208a9592b0e70560e6dcb2704\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"560f6bd82c4c4ef635813018768d064b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6935315628ef0c881f764b0a5ba74fe7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"36560cd15c64708710a74d6c17562771\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2b72590d15f550c512e446de2cd73200\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"51ff7c566d413ee67fd406f012de66c1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0d1a159f71725db57bc8657c7a34211a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"699b04077c1b0a016a8f17de78fb4bf8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0e971cc24ed76b3a01e2479e36e876fd\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2e9d76dd344d6a7628982a922dac3778\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"74086a597ee67e91405c1a0b0efe419b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"00a120c04e8d576676041a9f78ed6876\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7da75a6938e7194d2d4a3a62615565fc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"296609f45d5c66f1662224e457af5253\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"49be56066b956738561b3410432148f6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"748d796725b867fd6135105725ee07d7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"18770e601cfa5abd72cb7b061296152f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"780f085f12c9163638327be949611fc8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"781a427a28b90ffe23a75d426a9443e6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"729f389179896e145e2c2d9f4601358c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"78d153c7721c600652de44a443fc762d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4b426c1230e851bb43645f874af90c0f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"763732ef5458313915c3067a2b3c4e4b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2e1f151556f90d6c00794feb232c0812\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5e4c46fb29056c521b45568c43bc3c9d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"69de633d136b4c903d2d39f74bc7566a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3a474acb2c6e301c56005dfa28900761\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4f0c3185756751f601600a741a761dd6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"660054543ee938f231472c8a3e9115a2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3aa5715005765c392f0e0bc013f82e10\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"31e057267cbf1b5444701f1722b74eb2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"69d8209312f214ac766623ce37fc368c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3413234a0ae275d734b158ae52574be2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6e031d4c1377202c3a5a783240f55e49\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6c7d7204331f14d86774363220a767b0\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3bb56ec16bfd38e07e6d0ebc282642fa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"34c1728e5959446a322b3abd0166447c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"47b36fb265a33d7264b108b71f49788d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3b9f525e4be211da376e4f8e667b4e95\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2b5175271de526a5147d745d6ea900f7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"627879c55d55252c12e70ff81ba77503\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"42de0d960e43186b233a053066245c1d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"66222199071f48b65a517562683657cb\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"310c57c01d81514264a35e92147c0695\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"54533c7853254fc26d4f6bd9082129a8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"631d77e84a46720c07800e75562e0706\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"36381ab856e21d206b244e1b06737b5b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3c40393d03af1c4760f92eee1a6666f3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"124c7226031f44cd20fe5a9b6c5d1ac2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6ca8496030160e99272a75a135454b85\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6f1c03c31634776772b40eb339ba39a1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1d7a57f110e27e926320191b2c1f3c6e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"35de0b9966e72d501fd4124c61413f86\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3d92112b49ba16f46aa3249767164401\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"03d8647120c94ede2993460304155899\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"28e813ef74100f1012ba2a92173f42ae\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"79ab3e2b2d254269187d39fd7f766955\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1aad7e376c1866741eec7af66d88718e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1f9e44ef743150ce413f35206e607f8a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"13de255c0a0f177552c23a120e360df8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"737a6f90605173ff5aee59a84e7456ac\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0b78004054635ed540d678bc332c3c87\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"466209b744113e2e2f00468514096178\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"41516f7f0265318f5f6d731f16f66682\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0a1801bb711a77c60d1679f411b36610\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"591a19c30f2c066a3e9d0ac23d5636aa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5a052c9c3bb10d494da427ce2dcc6d0b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"35ab75a033eb67461637458a31c20f06\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"50600547271f4d2f38d4282109604b00\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1e0d548b73bc26bc2c0e538329f5163b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0824555552e83f137bea39715a717db2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0ffc467840e900ce18ad18ce4da851da\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"500247f24466585a79427cfa01af7dce\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5fb07cdf72db68ec2383741603480b53\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"78fd4fd32460578e71a660494ac229b5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"121e600f2a8b13aa511c2b4a11693ee9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"55864ae04d8d76e3674a5d3f210d0132\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"69a564a235c80c55159e50d8601030df\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0022335023a07b4b394c61236933222a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7497418a192e3b84404d30cc3125162b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"35d73d3060ef522f728d654c31bb3732\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6c06665158ed26e82d8306d04f9f73c4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"065572d91dd10e4d6ac06cf049d44336\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"30f6096246af62b6395e17092ead3fa5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"03a5164927dd0e7d254555f3454f1205\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"75de6acf151e03724be01ccc668037bf\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6b9e3a777ef30b0346e62cb63ca10d5a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"489b66c526fb155d37935e626a35213e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"792525843ae60c666e3b7e9100bd36ac\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"15d21a945b6a61cd10eb51d973764806\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"19f41dea4e4a13f50a020e2f72220b70\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4d345a677c6e5c0e41196c7568304c76\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6fe3096f11792bb14ea020781f2a1e2d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"77c5378922e432762d8578080cbb35bd\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1a1a5d462ec011d23a095fa761211711\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1db20a2430920e752fbe48f84c6c26f4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2640510a17026a0e32b31efd3c402c0d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1b582c1d0d7c08d64ec65c182cf83ea7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4fc26f8f22f13b4d2b45412a54061211\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"32a52dc06a01174c24c91fd0470b521f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3e6d21de649d6d8671587a2505f42bcc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4bfd046473e85477661226ea70543b7a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6c030fca2a162fbc3b713e6b347409bc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4ac760b64c831cd8030c07d77097254f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"765f0d4e10b21aec273c3d092d27126e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"749b253c0a4659251eb1169857b81aa6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4469659002a71b5f254f744108064c02\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"005b202c650949397c95564d0de102f5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2bc876eb20e874f138c80aa13c010fcd\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"029a646b21e3528d523f7a3f36cb4a7a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6d66543e4b014c561fc16c7c7b792e44\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"13cc3f4f45710a54352307ef5f001eef\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5a320d131c7e7d0e31c272165b195cd1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"24cb3cd12ba628cd1c366e721f9767e5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6e6747dd38b07eb6388b25ff595e2cee\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"677c5cdb367c384b455a6201167a2109\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6031706418516c4355323b481f555675\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"324112a175042fb832b233fb2d950b2b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"699270fa415802b04fdb6f4c53fc365c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"112e27b2699838915c2728de34f6766a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"04d6224a54773744177e575760953423\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"01c62a82737d79b045f411651bdd2ce6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"44f367b43ad37edf74d46dbf21954378\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"782607554b0f21084ded5ae06a3d68b6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0ca3463a618a4f0e52eb0cd473541835\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"06834b90737824c019bf06f575bc5511\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"75fd696b197523351ff218f2007b35fa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"789c46ae7749792468c0759112c07c8f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"27250e883db655432ad15beb37827100\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2a13006326f35cff2c0408dc48be0f54\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4b587658011b29bb03cd435336194c6c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5130158340bc173258075d59545861e1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7c09624e7daa45ef4dd24628717942d5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"538858b561c55f5768b558d868a1494f\",\n            \"time\": {\n                \"mYear\": 2026,\n                \"mMonth\": 4,\n                \"mDay\": 10,\n                \"mHour\": 22,\n                \"mMinute\": 39,\n                \"mSecond\": 23\n            }\n        },\n        {\n            \"id\": \"4ca64f006ea3650561c405895d7c75bf\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"66a662840f893c5e33eb68ff57751cb1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"13591d571afc12bf6d712ee753750268\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"693019e64db207b44941030950950f55\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6ee211ea0b413267340a3e665c800d55\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"74843ad46bb7716008181dde34275ad0\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"62dd34421c60266949cd2c982d905c03\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2cfd7d0d00a7628202907e0d10d33253\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"07ac3a5f2251088947083bce123839b9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"562938681f5f234d3cb33c9d46e75071\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6b470de62923542911ed03432213563c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"645c0d9811e46c6a0ff0007649142762\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"66ac154f1c1f06111075313339e66aa4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"100946df482b0cda570110de23e93351\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0d090480192b622f13f708e024385b7e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6b283ee32c6032f821dd699566a924bc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"09b44d6a4e8927f40a6826c07d5b69f9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4694254d5c164bb85bae7b8c0ac82f28\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3803547f5e515b5c33764a6736060bc7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4e5b4e066f10548e335210236af46e01\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"25896a4c65bb6d021da41e1540b5348f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"25803a3e06cc40b82fcf214a2d4e3db6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"54c045d717b271dc10bd5e9f69611522\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"423a2e4971d01ef40b016611069c7e89\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"785d75a7453d47d907d2717527b01b21\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"54be57b767d45e0437b4256e70044b16\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6b31296c3d3c54f062913bac516e6eb8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"53b81d1c1d7b359b7833213467275026\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"54aa383b507022dd4d0b371f2a8b24d2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"10da4daf062652a1109870f7341a00e6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"57ac6501709c48d3787b437546946c28\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"78813a607702658230400ce6143a0a8f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"49914fd04c69532e2f686e70438246c7\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"684c733646a47f364a4c3fc716dd5c63\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"27587cbc421e343b6a172ac445976fbe\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6f632454112e23a87ded0987767167d8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3d9f26d140170fd2694b3a9a0b4b01fc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0a0768d465c119435a1259a546b74bea\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1fd643e3718b28ec40157bf56fcb590d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"39fb6a9f2c400a6b36e0614432c44b89\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"559c35ba2dc500b9146c6f654b925b14\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7b175e291a460aec259d179c58511101\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"027c5bd1366578a42cb4406a763b0c36\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"59ea323733796f7b522f19622984279d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"37cf2b1b28ac5e1b0272688960da3faa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"58614ed9192c5a003133737e45ec1585\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0804451b664226dd06421c3039062bea\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"11871a410d053f797d83262c17f5568c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"351040c57b69389a361e3ea6791f1f9d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"488377f87257761c278906856d810341\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2aed7e4e04982b9d10b05c736fb253fe\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"68176d7a25466a163a972c1d02f90197\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"445f076b10cc17e92b30538f1c3c0bfc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1b107fba691359fe56301c2537d311b8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"453a7b68174246e27a370e083f806b91\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"190819b830c0514328f239ab1fa67c72\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"160104da0967563125ad686703e8527a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"44f97eb708244d9d3a82672828ff5ab6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4af3567144e93bfb574d7eff08276b1f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"788e1b0b00887b2d07756cbf62855cb3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4392114d25d616c562b14a96373a52bb\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"79930dd67ade03ed2f0317fc55680239\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4b3d777c3edd7518080a277b3bfa1296\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"233c0d4269646e2f31e71b8d5d1e5fc4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"68a8066d52ea4321063e1de047a508d6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"546234b9099b361750c635157f2232cb\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"09df6a6c4d7b25e139f063be7a356bde\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"38515d6a082a49430c38322b35f51152\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"40c87ec45ab06d5067f2199828893b23\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"32794f087da131ca780428ad6fd463fa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"20d96f61176b2d6d7fb91235159d44f5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6bfe26935ff23aca66982fc5129f62a5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"42f7050e392b57a01bda55e42a101505\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5bf81ee545af13071b9d7e2877f00610\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6d8e26bf1c642edf1421275871e44c4d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"29991fdb6c684da368e2435d6a7a6c92\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0a77395b4cd81aed6a55012160e32ffe\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"041862435ce94df953a73a501775426b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6cd41ccc028c51c461a5755c16c4120b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"12a80f3344a31e2d3354161c2f944638\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"529e59f47958149e773d7ee574b446aa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"56130790077f636835d452e879313909\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1f5749bc6ff127440b4144807aad3926\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"731832515faa10846a4967e973b25d43\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"16aa3d2c44704f5d76fb7ba26d833596\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"00ed1560468115f6550541dc7ac54751\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"047125ac645757370538749441e716aa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"080c03bc303d37fc1b33333b4db333e4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5f3057b6579c79624dab3a6e6509044d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"17a1715932ee790051a81af35bf310aa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"602a754042293ca8784648ab0974477d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"72b3429c340349362c50008c3bf70c58\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2afb49b10d0a64ca2423073421b03e7c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"23a50e686362786770a2329c58d95ee2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"27c90e13537260835a33574067e879b0\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"525e72785d54327e07125b1e030e72b1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5f116ccb51b84961716a02cf69bb3f66\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"657d27f6662b025769741b7571df4551\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"030001020f840bd92b4509cd2d577559\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"318a6c664a451b14170075374d942536\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"311766284f1a03f22a5646697a2b6471\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"650f05bd13c30fe20cb51f072b7158ac\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4d0a16d335cf763c4b1b298e08c07386\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3baa405d339f58ab636530c92f1310b4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1b6724306a1b40cf2115319d1c381026\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"444571c9370c6315115f10624ab0015d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 4,\n                \"mDay\": 1,\n                \"mHour\": 23,\n                \"mMinute\": 15,\n                \"mSecond\": 32\n            }\n        },\n        {\n            \"id\": \"594e45a71e9b723423ff1c0b5c2732c9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3b8b47f65dba59ff46fa153361030882\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"72082a1f02b2369a6ebe44f326513324\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1f567fa431f2371a538646f27128767f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"038b6ac03b5d39e44855155b2cfd17fb\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3ffc4e9b156a328e75c2510a185e3447\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"05fb7cb46f9b68b21b710da4496979be\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"45a96f8d00a84100285c6c934c9a35d6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"478b75ef613a0f3f560513f2505f448d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"35b70b7a022239575e6c5caf32445477\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"438b78a21bfe61f33790360a703b0b6d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4e9c0a6367712dc71d7864e112ee1073\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"15df295163e609cf295f4be120572807\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5a506fac4bd724fd7cb30e9324e33ac6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6a7e3675537b2d771c25300f48634962\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 4,\n                \"mDay\": 1,\n                \"mHour\": 23,\n                \"mMinute\": 15,\n                \"mSecond\": 32\n            }\n        },\n        {\n            \"id\": \"5b4c2ea318924e6409f4639b047433f8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"32ad3f000a6b5fda39ad54624dcd1faa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5cc7078218605bcf392a532264644d1a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 4,\n                \"mDay\": 1,\n                \"mHour\": 23,\n                \"mMinute\": 15,\n                \"mSecond\": 32\n            }\n        },\n        {\n            \"id\": \"60ed725a3d34272d059324b94e692036\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"262b5fdd68660a1c564463250003263d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3bf44fd06dc15be1225c471977c55e24\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"60bf6b496ccd45d944ec41184aeb62c6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"425b7bb56bf153692f200f30446701b8\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2b7c7314787e224a2d4e36000b1f2754\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"77d528f50f68274831a55392291b7727\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"36552ed1342572934c84007c190968b2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0f5f2fb233a8486f279b12b338235635\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"45cc01cf1d6114d7161a0eb3016c3940\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"48a803d01eba69a826b9433d1f5c74aa\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"07df580d646f523814fb1dfa1a032880\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5d65226a1e2816d050af554625192398\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"71ab5ce818200ebe79e5421f737858b9\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"591f03127b42058b52b7551d506b43d4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4f482b827d0e70ac4031022c21737971\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3a5d29a31f5522ff1742339438281665\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3da4158824d77f8a722366e166d166ac\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 4,\n                \"mDay\": 1,\n                \"mHour\": 23,\n                \"mMinute\": 15,\n                \"mSecond\": 32\n            }\n        },\n        {\n            \"id\": \"4d7c59300b78244b250b3f14794f7c30\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"48bb0e912c9b39666e735b4e3a886eb5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"31d11d1b4ae008106f8569b959e72e8c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"28ed12b864fb77e1596d23be6d7115ee\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"20324bc467e374d318f447cc01c33e40\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"304562300aa144977c64737149537ad6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5f42584132dd50f7040b468c35b633da\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"36ab678e3d2829e7337c50795c776702\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"59c96a567a71232e4a442a3f16462b5d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3f775a7f10983ba21cd81541526524cf\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"1f21370c782109b823d11e4a317c06ac\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"142469090bcb20c24bd227f674f20695\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"68ca46120340458a6165262e65215b32\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"702f3b0e291b134e7fe656243bd33b7d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5219235a0fc2622920a3158b12741171\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"52793ad12a1d17b438a07882274801d3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2bea1b0e0dc334ef4d7d73907776492b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0f8341ea3e692c9911eb1daf1e9b4e7e\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6bd46d174c5778235f036c466a14569c\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"56585e75082216ba67755c2d5ecb6ed3\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"02d76c7230fb29d76262371646dc3718\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"017a2a2a1df6218e168766c171e65c33\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"153a346b58f76ba94e416db20f587244\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"71f906b500ad3db16f2e193f720901dd\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7575594d29b11a772b430135450f1abe\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"391d434423a375d232167252668112c2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"678f3b994792282b57067997708137b0\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"31a9020630255cc11b236fe16025516a\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3ecc3c09309b6acd07400dab40ba53a5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"18664b4d2b3430cd005469184dcb7f59\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2c6a44ed41965abc1a6d17074f375ffd\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 4,\n                \"mDay\": 1,\n                \"mHour\": 23,\n                \"mMinute\": 15,\n                \"mSecond\": 32\n            }\n        },\n        {\n            \"id\": \"00533d362a0c38c31f4d66921cac0be6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"38e15d9337ec6c765a613ed6385a7259\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0c9c7079001e4d00039e31d77b0340e1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6178636c3089374f799f548b1d0d5689\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"590b46df4f7122cb30614bba0f591559\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"435138351b066b1e08794d583f1a5840\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4b7125941858520c06572f0c31a365b1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"52375c3f583904686b61698f023f6fdd\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"3821097566522d056655626b4d6f6167\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6559699f7855266e0f686d614f992182\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"65eb2f6f0461757f5a745acf68e36e25\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"318353ef18463f74356c61cf62e2655d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"30c44f1d3a020549091368ee10242557\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0540372660dd761419143ca574cb27e4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7b1f59f85dc573751dfb30cd0f910f13\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"75626bb107dc2e62446319ef51b22e72\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"2b793b1a747167266984178a32e32d37\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"76b963ad2f355a7a0bfd6cfa57434173\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"28ea75e86ebe4d45722a4aa63c471559\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"4c2040bc3f284f8d415e02a908746904\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6eab1f21570e74c279d81a6629376682\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"33cb3c3034c56e73099d2edc35ec4dbc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"267964fe2f9d001f378667c8063a3afc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"79bc326019263d237f137a627d8c1f45\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"089c41fc1ab81a672292049d196e2136\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"32d449667c0b255a7aa57d1d3b6f0f44\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"67924967653217e15b5c266e4eed361d\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"431f6a8b1fa51b507bcf13da74b15da5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"127a2878256c72d05bbc46b313760577\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6371320a681e22eb5e37519315ad40b5\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"31bc71d11e040f296289400255cd44e0\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7d843e5e0cde648337a05bb6623a2a00\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6ea314e470626614681843882a1803d1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0bb21fcf2a9d59731e6f7bcb5f790769\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"209332ef3b3b7c081e620ce00c9e79f6\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"10b54243335e704f02303c8959e84535\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7d390b8a244a17b8151e2a552bff1d77\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"704d3eca14ef09fe7f6403fc28b30af0\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"44402071050555a124c77e7344733da4\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"0a1b49284a84494d362b7baf1181176b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5c4657e95eb356133d6102ad258b38d1\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"6684387a17f21d804e0c625c3caf019f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"048005dd1a3b5b24427623dc3ae543a2\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"37fb3fea30e501d008a455d6364c22cc\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"7167574c690f33d1144a07d126c80813\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5f5841267c8d387d7de441cf5c97258b\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"25fe24b15a643db6408474c87f060807\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        },\n        {\n            \"id\": \"5c8f735e0626703c68375587092b511f\",\n            \"time\": {\n                \"mYear\": 2025,\n                \"mMonth\": 3,\n                \"mDay\": 27,\n                \"mHour\": 13,\n                \"mMinute\": 14,\n                \"mSecond\": 27\n            }\n        }\n    ]\n}"
  },
  {
    "path": "Editor/Assets/BasicAtlas.atlas.meta",
    "content": "{\n    \"Type\": \"o2::AtlasAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"common\": {\n            \"border\": 2\n        }\n    }\n}"
  },
  {
    "path": "Editor/Assets/Editor UI styles.meta",
    "content": "{\n    \"Type\": \"o2::DefaultAssetMeta<o2::FolderAsset>\",\n    \"Value\": {\n        \"mId\": \"02481bc9676a33e752b64cab5a7d3f9e\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/SimulationDevicesList.json",
    "content": "{\n\t\"list\": [\n\t{ \"deviceName\": \"iPhoneX Landscape\", \"resolution\": { \"x\": 2436, \"y\": 1125 } },\n\t{ \"deviceName\": \"iPhone6 Portrait\", \"resolution\": { \"x\": 750, \"y\": 1334 } },\n\t{ \"deviceName\": \"iPhone6 Landscape\", \"resolution\": { \"x\": 1334, \"y\": 750 } },\n\t{ \"deviceName\": \"iPhone4 Portrait\", \"resolution\": { \"x\": 640, \"y\": 960 } },\n\t{ \"deviceName\": \"iPhone4 Landscape\", \"resolution\": { \"x\": 960, \"y\": 640 } },\n\t{ \"deviceName\": \"iPad Portrait\", \"resolution\": { \"x\": 768, \"y\": 1024 } },\n\t{ \"deviceName\": \"iPad Landscape\", \"resolution\": { \"x\": 1024, \"y\": 768 } },\n\t{ \"deviceName\": \"iPadPro Portrait\", \"resolution\": { \"x\": 1668, \"y\": 2388 } },\n\t{ \"deviceName\": \"iPadPro Landscape\", \"resolution\": { \"x\": 2388, \"y\": 1668 } },\n\t{ \"deviceName\": \"Nexus7 Portrait\", \"resolution\": { \"x\": 1200, \"y\": 1920 } },\n\t{ \"deviceName\": \"Nexus7 Landscape\", \"resolution\": { \"x\": 1920, \"y\": 1200 } },\n\t{ \"deviceName\": \"Samsung S10 Plus Landscape\", \"resolution\": { \"x\": 3040, \"y\": 1440 } },\n\t{ \"deviceName\": \"Samsung S10 Plus Portrait\", \"resolution\": { \"x\": 1440, \"y\": 3040 } },\n\t{ \"deviceName\": \"Samsung S10 E Landscape\", \"resolution\": { \"x\": 2280, \"y\": 1080 } },\n\t{ \"deviceName\": \"Samsung S10 E Portrait\", \"resolution\": { \"x\": 1080, \"y\": 2280 } },\n\t{ \"deviceName\": \"Samsung S10 5G Landscape\", \"resolution\": { \"x\": 3040, \"y\": 1440 } },\n\t{ \"deviceName\": \"Samsung S 105G Portrait\", \"resolution\": { \"x\": 1440, \"y\": 3040 } },\n\t{ \"deviceName\": \"Samsung S 8 Landscape\", \"resolution\": { \"x\": 2960, \"y\": 1440 } },\n\t{ \"deviceName\": \"Samsung S 8 Portrait\", \"resolution\": { \"x\": 1440, \"y\": 2960 } },\n\t{ \"deviceName\": \"Kindle Fire Landscape\", \"resolution\": { \"x\": 1920, \"y\": 1200 } },\n\t{ \"deviceName\": \"Kindle Fire Portrait\", \"resolution\": { \"x\": 1200, \"y\": 1920 } },\n\t{ \"deviceName\": \"Sony Xperia 10 Landscape\", \"resolution\": { \"x\": 2520, \"y\": 1080 } },\n\t{ \"deviceName\": \"Sony Xperia 10 Portrait\", \"resolution\": { \"x\": 1080, \"y\": 2520 } },\n\t{ \"deviceName\": \"MateX Fold Portrait\", \"resolution\": { \"x\": 1148, \"y\": 2480 } },\n\t{ \"deviceName\": \"MateX Fold Landscape\", \"resolution\": { \"x\": 2480, \"y\": 1148 } },\n\t{ \"deviceName\": \"MateX Portrait\", \"resolution\": { \"x\": 2200, \"y\": 2480 } },\n\t{ \"deviceName\": \"MateX Landscape\", \"resolution\": { \"x\": 2480, \"y\": 2200 } } ]\n}"
  },
  {
    "path": "Editor/Assets/SimulationDevicesList.json.meta",
    "content": "{\n    \"Type\": \"o2::DefaultAssetMeta<o2::BinaryAsset>\",\n    \"Value\": {\n        \"mId\": \"3c6f682b546e7ed940df2de21774600f\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/debugFont.ttf.meta",
    "content": "{\n    \"Type\": \"o2::VectorFontAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"204d443723d72f2c138401f153a97a97\",\n        \"mEffects\": null\n    }\n}"
  },
  {
    "path": "Editor/Assets/stdFont.ttf.meta",
    "content": "{\n    \"Type\": \"o2::VectorFontAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"28ea3885486a6d3e5658445b2de14465\",\n        \"mEffects\": null\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/.meta",
    "content": "{\n    \"Type\": \"o2::DefaultAssetMeta<o2::FolderAsset>\",\n    \"Value\": {\n        \"mId\": \"dbfaa7613bd42d6c31f1f52c53a2f873\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/CurveHandle.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"31bc71d11e040f296289400255cd44e0\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/CurveHandleHover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"041862435ce94df953a73a501775426b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/CurveHandlePressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"35d73d3060ef522f728d654c31bb3732\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/CurveHandleSelected.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3b9f525e4be211da376e4f8e667b4e95\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/CurveSupportHandle.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"065572d91dd10e4d6ac06cf049d44336\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/CurveSupportHandleHover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"531d00e7050764177538268b12226ef5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/CurveSupportHandlePressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7b5d00142e125b0b2fcb6ab768015af3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/CurveSupportHandleSelected.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"44b9252613bf763933ae3d0e36504f91\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/JSFileIcon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0a1b49284a84494d362b7baf1181176b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/TopologyTool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6559699f7855266e0f686d614f992182\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_accept_prefab.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"07ac3a5f2251088947083bce123839b9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_accept_prefab_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"72ed0fe553872449613d43ca0be545a3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_accept_prefab_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"234425ff2d201c58768a5aad661228d2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_actor_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"77d528f50f68274831a55392291b7727\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_add_asset_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6c06665158ed26e82d8306d04f9f73c4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_anim_file_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"677c5cdb367c384b455a6201167a2109\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_asset_icon_selection.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0e1b4c9d732143c0649c77fd4cc95098\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_big_file_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"100946df482b0cda570110de23e93351\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_big_folder_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"79ab3e2b2d254269187d39fd7f766955\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_big_lock_close.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"03a5164927dd0e7d254555f3454f1205\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_big_lock_open.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"62dd34421c60266949cd2c982d905c03\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_big_lock_unknown.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"18770e601cfa5abd72cb7b061296152f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_big_text_file_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"41d93c2b3a39274a7d35039540fe3aab\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_break_prefab.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"68a8066d52ea4321063e1de047a508d6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_break_prefab_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"52c8772f641a30933b5c46be47a80b53\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_break_prefab_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"525f69b859154d322a44304944642d03\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_component_head.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"15d21a945b6a61cd10eb51d973764806\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_enable_dot_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"77c5378922e432762d8578080cbb35bd\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_enable_dot_big_unknown.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4f1e6fa245900e7f0e8954af1a505ec9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_enable_toggle_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3f02032807bd607762ab0ee748924b0c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_enable_toggle_big_focused.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"06d553a32bf63e3148df5308361e31a6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_enable_toggle_big_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"523d73dc430978bd205b62ac43d108f8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_enable_toggle_big_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"091e37dd7c032c6c589424ac64c816a4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_eye_closed_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1f9e44ef743150ce413f35206e607f8a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_eye_opened_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"66222199071f48b65a517562683657cb\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_filter_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"594e45a71e9b723423ff1c0b5c2732c9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_folder_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"72082a1f02b2369a6ebe44f326513324\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_gear_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7575594d29b11a772b430135450f1abe\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_gray_options.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"44f97eb708244d9d3a82672828ff5ab6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_gray_options_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2e3a772860da3b1d3db2226504fe236f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_gray_options_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3b1d60a914de1949664603c71e29748a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_green_edit_box.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"01c62a82737d79b045f411651bdd2ce6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_handle_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"749b253c0a4659251eb1169857b81aa6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_handle_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"324112a175042fb832b233fb2d950b2b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_handle_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"559c35ba2dc500b9146c6f654b925b14\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_handle_side_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"45d262ce5cd66abb769443f0020c0644\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_handle_side_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"06470f6928c4378e7c1e31f413a137dc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_handle_side_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"06a16251065b6c4308414f0b052c5a3b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_image_asset_back.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"72c5439208a9592b0e70560e6dcb2704\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_layer_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"02d76c7230fb29d76262371646dc3718\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_layer_icon_t.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4b3d777c3edd7518080a277b3bfa1296\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_link_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0c9c7079001e4d00039e31d77b0340e1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_log_errors_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"03d8647120c94ede2993460304155899\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_log_errors_inactive_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3a1771ad7b2c33446e9e4918798b0fa0\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_log_info_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"54be57b767d45e0437b4256e70044b16\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_log_info_inactive_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"657107580d8d6e2e2a095a9f3e5b2f5c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_log_warnings_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3a16329731654e127b140d834daf3014\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_log_warnings_inactive_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2cd15cc006a9434340881834695b201e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_move_tool_center.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"74086a597ee67e91405c1a0b0efe419b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_move_tool_center_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7260312d19e92c0d40c307a13e7355ed\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_move_tool_center_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"06be084535be030858333acf49d92db4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_pivot.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5c4657e95eb356133d6102ad258b38d1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_pivot_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3a5d29a31f5522ff1742339438281665\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_pivot_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"54aa383b507022dd4d0b371f2a8b24d2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_pivot_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1b107fba691359fe56301c2537d311b8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_position_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"09b44d6a4e8927f40a6826c07d5b69f9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_prefab_link_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"78fd4fd32460578e71a660494ac229b5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_red_edit_box.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6d8e26bf1c642edf1421275871e44c4d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_revert_prefab.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"684c733646a47f364a4c3fc716dd5c63\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_revert_prefab_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"365d6782616b35260cdd62af000c03d6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_revert_prefab_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4126572b2947687f44c94e68660d1bca\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_right_move_arrow.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5e4c46fb29056c521b45568c43bc3c9d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_right_move_arrow_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1fb37cfa09b15ef049c673f426384df2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_right_move_arrow_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"23801071629939ea6a0054b87cdd16a9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_right_scale_arrow.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"641a79ea094a621145ea6c3369474ce4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_right_scale_arrow_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0824232e6191377627b702fc0f552603\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_right_scale_arrow_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"328477442d7b256a29de46ec652366a7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_rotate_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"525e72785d54327e07125b1e030e72b1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_round_field.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"731832515faa10846a4967e973b25d43\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_round_field_focused.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0c560598714a2c8b3eb82ae603ee78bd\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_round_field_gray.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"51ff7c566d413ee67fd406f012de66c1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_round_field_gray_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"043677d61cdb5b240952141e61df282e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_round_field_gray_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3f603a9e07a6001867272fca648e2d28\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_round_field_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4c237879436f27d225870c8c10c8650d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_round_field_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6f646670444357a320e9423f2eaa4e80\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_save_gray copy 2.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3a474acb2c6e301c56005dfa28900761\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_save_gray copy.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5a320d131c7e7d0e31c272165b195cd1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_save_gray.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"68ca46120340458a6165262e65215b32\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_scale_both.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3bf44fd06dc15be1225c471977c55e24\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_scale_both_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"35d45597574d6da4125d56f026622089\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_scale_both_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"14cf63ef797313a57f5c1d0e36954c80\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_scale_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"438b78a21bfe61f33790360a703b0b6d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_scene_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"28ed12b864fb77e1596d23be6d7115ee\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_small_panel_back.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"781a427a28b90ffe23a75d426a9443e6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_small_panel_down_back.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0076397239c3101d45355ef116411c75\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_small_trash_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7da75a6938e7194d2d4a3a62615565fc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_tag_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"67924967653217e15b5c266e4eed361d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_trach_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"425b7bb56bf153692f200f30446701b8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_transform_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6e6747dd38b07eb6388b25ff595e2cee\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_up_move_arrow.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"785d75a7453d47d907d2717527b01b21\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_up_move_arrow_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"69204e1d69a568237d6a5d6a1b7a3ef1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_up_move_arrow_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"15d62b872c3534251a074af843192a3f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_up_scale_arrow.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6fe3096f11792bb14ea020781f2a1e2d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_up_scale_arrow_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"54ed149d6c4009d64c685983728a1b1b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI2_up_scale_arrow_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5ed83b1a2d9554e654d616f1125770aa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_add_btn.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"33cb3c3034c56e73099d2edc35ec4dbc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_add_btn_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"562938681f5f234d3cb33c9d46e75071\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_add_btn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7497418a192e3b84404d30cc3125162b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_anchor_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"32794f087da131ca780428ad6fd463fa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_anchor_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"789c46ae7749792468c0759112c07c8f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_anchor_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2bc876eb20e874f138c80aa13c010fcd\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_anchors_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"39fb6a9f2c400a6b36e0614432c44b89\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_anchors_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1d7a57f110e27e926320191b2c1f3c6e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_ch_arrows.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"142469090bcb20c24bd227f674f20695\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_icon_anchor.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"56130790077f636835d452e879313909\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_icon_max_size.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"423a2e4971d01ef40b016611069c7e89\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_icon_min_size.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"25803a3e06cc40b82fcf214a2d4e3db6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_icon_offsets.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"190819b830c0514328f239ab1fa67c72\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_icon_size.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"52375c3f583904686b61698f023f6fdd\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_icon_weight.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"72b3429c340349362c50008c3bf70c58\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_rotate_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"58614ed9192c5a003133737e45ec1585\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_rotate_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6d66543e4b014c561fc16c7c7b792e44\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI3_rotate_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"782607554b0f21084ded5ae06a3d68b6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Background.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0f5f2fb233a8486f279b12b338235635\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Box_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"304562300aa144977c64737149537ad6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 12,\n            \"bottom\": 13,\n            \"right\": 12,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Box_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1f5749bc6ff127440b4144807aad3926\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 12,\n            \"bottom\": 13,\n            \"right\": 12,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Box_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"00ed1560468115f6550541dc7ac54751\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 12,\n            \"bottom\": 13,\n            \"right\": 12,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Box_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"71ab5ce818200ebe79e5421f737858b9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 12,\n            \"bottom\": 13,\n            \"right\": 12,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Check_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"28ea75e86ebe4d45722a4aa63c471559\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Check_bk_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"04d6224a54773744177e575760953423\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Check_bk_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4f0c3185756751f601600a741a761dd6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Check_bk_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5fb07cdf72db68ec2383741603480b53\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Check_unknown.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6b283ee32c6032f821dd699566a924bc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Ckeck.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7167574c690f33d1144a07d126c80813\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Close_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"72381902329400821187457f66005e84\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Close_button_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"19f1480664de4c0b1d4f58ef04ba19e4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Close_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1a36752146b9557f7cd761ba79d47e94\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Context_menu.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"42f7050e392b57a01bda55e42a101505\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 25,\n            \"bottom\": 25,\n            \"right\": 25,\n            \"top\": 25\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Context_menu_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"422043c2736f09560c6d21e658ee7683\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 20,\n            \"right\": 15,\n            \"top\": 20\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Context_menu_white.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5fff73d414ad467e03685d0a6614095a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 20,\n            \"right\": 15,\n            \"top\": 20\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Down_icn.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2b793b1a747167266984178a32e32d37\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Down_icn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6935315628ef0c881f764b0a5ba74fe7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Down_icn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"310c57c01d81514264a35e92147c0695\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Down_icn_white.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6031706418516c4355323b481f555675\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Editbox_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7c09624e7daa45ef4dd24628717942d5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 13,\n            \"bottom\": 14,\n            \"right\": 14,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Editbox_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3bb56ec16bfd38e07e6d0ebc282642fa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 13,\n            \"bottom\": 14,\n            \"right\": 14,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Editbox_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"41516f7f0265318f5f6d731f16f66682\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 13,\n            \"bottom\": 14,\n            \"right\": 14,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Editbox_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4fc26f8f22f13b4d2b45412a54061211\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 13,\n            \"bottom\": 14,\n            \"right\": 14,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Hor_scrollbar_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"560f6bd82c4c4ef635813018768d064b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 4,\n            \"bottom\": 0,\n            \"right\": 4,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Hor_scrollhandle_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"455655bc15fd1b43025130401fee2903\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 4,\n            \"bottom\": 0,\n            \"right\": 4,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Hor_scrollhandle_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2476549e78e44b98719b14da5c4134db\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 4,\n            \"bottom\": 0,\n            \"right\": 4,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Hor_scrollhandle_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7112354647cc3b075496797f0e634a33\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 4,\n            \"bottom\": 0,\n            \"right\": 4,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Options_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"06b2507f1dc27444485922973f1651c6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Options_button_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"74f605357436654a0cdb0ba9699d3617\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Options_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3db124b21b76367c60276e680ddd3a9a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Radio.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"37fb3fea30e501d008a455d6364c22cc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Radio_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"30c44f1d3a020549091368ee10242557\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Radio_bk_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0ca3463a618a4f0e52eb0cd473541835\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Radio_bk_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"41fe49c7590a4fef6c2220df1d7b7d87\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Radio_bk_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"737a6f90605173ff5aee59a84e7456ac\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Record_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3ffc4e9b156a328e75c2510a185e3447\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Right_icn.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3ecc3c09309b6acd07400dab40ba53a5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Right_icn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4b1576cd389d313448200d037bee454d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Right_icn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"00a120c04e8d576676041a9f78ed6876\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Right_icn_white.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3d92112b49ba16f46aa3249767164401\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Right_icn_white_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3c5000983faf14af2ff15e4628054e0f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Right_icn_white_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"637e18d0543970a8502250431f967c02\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Separator.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"71f906b500ad3db16f2e193f720901dd\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 5,\n            \"bottom\": 0,\n            \"right\": 5,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_ToolsPanel_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"027c5bd1366578a42cb4406a763b0c36\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 2,\n            \"bottom\": 0,\n            \"right\": 3,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Up_Menu.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"32d449667c0b255a7aa57d1d3b6f0f44\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 15,\n            \"bottom\": 20,\n            \"right\": 16,\n            \"top\": 19\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Up_Menu_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"35ab75a033eb67461637458a31c20f06\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 15,\n            \"bottom\": 20,\n            \"right\": 16,\n            \"top\": 19\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Up_Menu_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"005b202c650949397c95564d0de102f5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 18,\n            \"right\": 17,\n            \"top\": 21\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Ver_scrollbar_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0d1a159f71725db57bc8657c7a34211a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 0,\n            \"bottom\": 6,\n            \"right\": 0,\n            \"top\": 5\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Ver_scrollhandle_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2db22e592f981ca01e47235a71625654\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 0,\n            \"bottom\": 6,\n            \"right\": 0,\n            \"top\": 5\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Ver_scrollhandle_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"733601084caf34553ee648723c4f35be\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 0,\n            \"bottom\": 6,\n            \"right\": 0,\n            \"top\": 5\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Ver_scrollhandle_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"038d77b825c407256b1a319e5c182af9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 0,\n            \"bottom\": 6,\n            \"right\": 0,\n            \"top\": 5\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Ver_separator.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"10da4daf062652a1109870f7341a00e6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 0,\n            \"bottom\": 4,\n            \"right\": 0,\n            \"top\": 4\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_Window_place.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"79930dd67ade03ed2f0317fc55680239\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 6,\n            \"bottom\": 6,\n            \"right\": 5,\n            \"top\": 6\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_accept_prefab.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6b470de62923542911ed03432213563c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_accept_prefab_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"35ad0efb53496d0912370f7d051a1778\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_accept_prefab_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"127e42dc65cf0e39157e1ea817ad6c4b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_actor_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"591f03127b42058b52b7551d506b43d4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_add_asset_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4d345a677c6e5c0e41196c7568304c76\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_add_btn.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6ea314e470626614681843882a1803d1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_add_btn_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"49914fd04c69532e2f686e70438246c7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_add_btn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"466209b744113e2e2f00468514096178\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_add_key.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"79bc326019263d237f137a627d8c1f45\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_add_key_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"74843ad46bb7716008181dde34275ad0\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_add_key_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"13de255c0a0f177552c23a120e360df8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anchor_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"788e1b0b00887b2d07756cbf62855cb3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anchor_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"32a52dc06a01174c24c91fd0470b521f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anchor_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4ac760b64c831cd8030c07d77097254f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anchors_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5130158340bc173258075d59545861e1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anchors_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"121e600f2a8b13aa511c2b4a11693ee9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_file_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4469659002a71b5f254f744108064c02\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_loop.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4b7125941858520c06572f0c31a365b1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_loop_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0022335023a07b4b394c61236933222a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_loop_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"32a2400c7dcb7aaf29e3729e0015524c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_loop_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0f555e523e671f08741010d779e5363a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_not_loop.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6ee211ea0b413267340a3e665c800d55\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_pause.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"262b5fdd68660a1c564463250003263d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_play.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"56585e75082216ba67755c2d5ecb6ed3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_properties_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3ccc453a1b03741164900bd765750438\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_anim_type.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0e965d945dc6039230dc70217aa93738\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_bar.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4eb376172ea1460d322b526c7010467b\",\n        \"sliceBorder\": {\n            \"left\": 4,\n            \"bottom\": 4,\n            \"right\": 4,\n            \"top\": 4\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_component.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"779a6db61bdb3be37c723d6d13055ba2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6c030fca2a162fbc3b713e6b347409bc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_state_default.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1b3e58037ba3321740c925a95a085c40\",\n        \"sliceBorder\": {\n            \"left\": 18,\n            \"bottom\": 20,\n            \"right\": 19,\n            \"top\": 17\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_state_frame.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"053d07b13b9965125f8a17a539fb42ee\",\n        \"sliceBorder\": {\n            \"left\": 18,\n            \"bottom\": 19,\n            \"right\": 19,\n            \"top\": 18\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_state_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1ce60ae16b1c39e970487a8144c63c45\",\n        \"sliceBorder\": {\n            \"left\": 18,\n            \"bottom\": 20,\n            \"right\": 19,\n            \"top\": 17\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_state_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"223424113ef646e41ddb1a0b171d766e\",\n        \"sliceBorder\": {\n            \"left\": 18,\n            \"bottom\": 20,\n            \"right\": 19,\n            \"top\": 17\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_state_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3b2e4bbe24616b710e490c194e2748dd\",\n        \"sliceBorder\": {\n            \"left\": 18,\n            \"bottom\": 20,\n            \"right\": 19,\n            \"top\": 17\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_state_shadow.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"46bd2edc70e13a7857cc0dca5b5f3402\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 19,\n            \"right\": 19,\n            \"top\": 18\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_animation_wnd_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2726133a77804ef50abf7de97d40637b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_asset_icon_selection.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"032d7cf61fd679320acb69bb42de42ce\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_file_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"538858b561c55f5768b558d868a1494f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_folder_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1e0d548b73bc26bc2c0e538329f5163b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_fragment_shader_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5751123f0006723b5344243d371025d8\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_js_file_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0e971cc24ed76b3a01e2479e36e876fd\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_lock_close.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"699270fa415802b04fdb6f4c53fc365c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_lock_open.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2cfd7d0d00a7628202907e0d10d33253\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_lock_unknown.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2b72590d15f550c512e446de2cd73200\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_material_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"48836bfb5de56a911adc361a7e7f58a7\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_text_file_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4458068263d003483fca161a66a50c84\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_big_vertex_shader_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"703d1aea0d761a32089d53700cc36075\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_bones_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3da4158824d77f8a722366e166d166ac\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_bool_type.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"435138351b066b1e08794d583f1a5840\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_break_prefab.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0a77395b4cd81aed6a55012160e32ffe\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_break_prefab_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"307655027af95f14370c2ffc61632f01\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_break_prefab_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"650c7b66370f2b0460fe0509059666e4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_brush_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"15df295163e609cf295f4be120572807\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_button_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6cd41ccc028c51c461a5755c16c4120b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 15,\n            \"right\": 15,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_button_pressed-87.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"200f651f024d34763b852794303a23d2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 15,\n            \"right\": 15,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_button_pressed-90.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"41f672d310b84eb418f54de266564b7c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 0,\n            \"bottom\": 7,\n            \"right\": 0,\n            \"top\": 6\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"112e27b2699838915c2728de34f6766a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 15,\n            \"right\": 15,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_button_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"489b66c526fb155d37935e626a35213e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 15,\n            \"right\": 15,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6f632454112e23a87ded0987767167d8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 15,\n            \"right\": 15,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_camera_icn.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6a7e3675537b2d771c25300f48634962\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_ch_arrows.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5219235a0fc2622920a3158b12741171\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_color_type.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"60ed725a3d34272d059324b94e692036\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_common_anim_track.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"683a62fd1b9a26a86d3a1c046dd871aa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 9,\n            \"right\": 8,\n            \"top\": 12\n        }\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_component_head.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"06834b90737824c019bf06f575bc5511\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 4,\n            \"bottom\": 5,\n            \"right\": 5,\n            \"top\": 4\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_component_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3e6d21de649d6d8671587a2505f42bcc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_component_icon_dark.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0edd5cf06d14584b2a7a6f6c109b667d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_create_asset_instance.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2c77314d33f1336a1840362b2c9d1b2a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_create_asset_instance_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"43ad697756894fa942a9115f69e858d5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_create_asset_instance_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1e086ada4002060e2a9a18020d915e7b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_curve_color.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2afb49b10d0a64ca2423073421b03e7c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_curves_mode.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"602a754042293ca8784648ab0974477d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_dopesheet_back.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6b9e3a777ef30b0346e62cb63ca10d5a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 9,\n            \"bottom\": 10,\n            \"right\": 10,\n            \"top\": 11\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_drag_handle.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3baa405d339f58ab636530c92f1310b4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_edit_anim_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1aad7e376c1866741eec7af66d88718e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_edit_anim_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"41df300a33bc6fe365c7553102276156\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_edit_anim_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2a7b1669373d57e42f9035225a4a4c22\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_emitter_component.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5ffb001041e4477b5e952bda0c994001\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_enable_dot_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"24cb3cd12ba628cd1c366e721f9767e5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_enable_dot_big_unknown.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"18867189163f78f1110406954fc902d2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_enable_toggle_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1b4e1f836afb6b7a38b32c5d7e8c31aa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_enable_toggle_big_focused.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"698b294551681f373f3a5d233f7c048d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_enable_toggle_big_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6be0629a7f532e3b50cd6b8028780add\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_enable_toggle_big_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0733208b08c93dd669e00f4c219c633a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_eye_closed_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6ca8496030160e99272a75a135454b85\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_eye_opened_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"69a564a235c80c55159e50d8601030df\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_filter_icon .png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"37cf2b1b28ac5e1b0272688960da3faa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_filter_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4d0a16d335cf763c4b1b298e08c07386\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_float_type.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2b7c7314787e224a2d4e36000b1f2754\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_folder_icn.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5cc7078218605bcf392a532264644d1a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_folder_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"318a6c664a451b14170075374d942536\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_folder_icon_dark.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"69d8209312f214ac766623ce37fc368c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_frame_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5b4c2ea318924e6409f4639b047433f8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_game_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"590b46df4f7122cb30614bba0f591559\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_gear_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"52793ad12a1d17b438a07882274801d3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_graph_component.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"306f0da0079e493b6c1b4ccf656c31cc\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_graph_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5e7112ec1c332d0a260a32887b1d4233\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_gray_options.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"233c0d4269646e2f31e71b8d5d1e5fc4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_gray_options_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6338023a6c50328d3bab0bb453f864cf\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_gray_options_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"36942f0200314c5e55a2550f113325d4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_green_edit_box.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1db20a2430920e752fbe48f84c6c26f4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 8,\n            \"bottom\": 9,\n            \"right\": 8,\n            \"top\": 8\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_handles_mode.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"453a7b68174246e27a370e083f806b91\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_icon_anchor.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"650f05bd13c30fe20cb51f072b7158ac\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_icon_max_size.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4694254d5c164bb85bae7b8c0ac82f28\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_icon_min_size.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3803547f5e515b5c33764a6736060bc7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_icon_offsets.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0804451b664226dd06421c3039062bea\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_icon_size.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"017a2a2a1df6218e168766c171e65c33\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_icon_weight.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3b8b47f65dba59ff46fa153361030882\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_image_asset_back.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"699b04077c1b0a016a8f17de78fb4bf8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_image_component.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2b5175271de526a5147d745d6ea900f7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_image_frame_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3ed409235a342972306c7b0933647511\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_image_icn.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2c6a44ed41965abc1a6d17074f375ffd\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_key.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5c8f735e0626703c68375587092b511f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_key_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"678f3b994792282b57067997708137b0\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_key_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"45a96f8d00a84100285c6c934c9a35d6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_keys_select border.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6230017d7be059ae0da43af543232301\",\n        \"sliceBorder\": {\n            \"left\": 1,\n            \"bottom\": 7,\n            \"right\": 3,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_keys_select border_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"12f84b277f524d8552593f4226f6678e\",\n        \"sliceBorder\": {\n            \"left\": 1,\n            \"bottom\": 7,\n            \"right\": 3,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_keys_select border_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0f97699553dd0f690bbf2e7556123dda\",\n        \"sliceBorder\": {\n            \"left\": 1,\n            \"bottom\": 8,\n            \"right\": 3,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_keys_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"657d27f6662b025769741b7571df4551\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 6,\n            \"bottom\": 6,\n            \"right\": 7,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_keys_select_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0a7e1d772d8163c74c276b82046055af\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 6,\n            \"bottom\": 6,\n            \"right\": 7,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_keys_select_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3c374faa59f4169e448640451e8c7999\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 6,\n            \"bottom\": 6,\n            \"right\": 7,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_layer_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2bea1b0e0dc334ef4d7d73907776492b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_layer_icon_t.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5bf81ee545af13071b9d7e2877f00610\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_link_icon-143.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"53b81d1c1d7b359b7833213467275026\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_link_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"00533d362a0c38c31f4d66921cac0be6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_list_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1f21370c782109b823d11e4a317c06ac\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_lock_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6bd46d174c5778235f036c466a14569c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_log_errors_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"124c7226031f44cd20fe5a9b6c5d1ac2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_log_errors_inactive_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6daf1e8158c73247507728605cb232fe\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_log_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"75626bb107dc2e62446319ef51b22e72\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_log_info_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0d090480192b622f13f708e024385b7e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_log_info_inactive_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"548a54f733c041ff66a7740d3f6357c3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_log_warnings_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"780a1a5d6ce91d64442a0f8f708e2023\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_log_warnings_inactive_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7fed733e18332f2d647354bf375820be\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_log_wnd_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"20d96f61176b2d6d7fb91235159d44f5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_map_key.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0bb21fcf2a9d59731e6f7bcb5f790769\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_map_key_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3d9f26d140170fd2694b3a9a0b4b01fc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_map_key_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"500247f24466585a79427cfa01af7dce\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_menu_new_asset.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"205825070fac326515311f4245b6347f\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_menu_open_asset.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"74696cd5175133463b9f64f874333205\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_menu_revert_asset.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4804420054634e9a08a90c1b32336b0b\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_menu_save_as_asset.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"518b628b6be73f9058764d5e69ca3fea\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_menu_save_asset.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7a725f47375b380d3f9320c0241c5f45\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_menu_toggled.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"488377f87257761c278906856d810341\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 8,\n            \"bottom\": 8,\n            \"right\": 8,\n            \"top\": 9\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_menu_toggled_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"69056cee22f677695d9540140be069f5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 8,\n            \"bottom\": 8,\n            \"right\": 8,\n            \"top\": 9\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_menu_toggled_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7fae2e1d1d9245d2651a47c07c2868cb\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 8,\n            \"bottom\": 8,\n            \"right\": 8,\n            \"top\": 9\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_minus_small_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"36e2240d67b63628380f00e10ff525e4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_minus_small_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"65472887152f187c50a824111b2646a2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_minus_small_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5dc21695180c481f79594f2943d77fa5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_move_left.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3f775a7f10983ba21cd81541526524cf\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_move_right.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"45cc01cf1d6114d7161a0eb3016c3940\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_move_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"18664b4d2b3430cd005469184dcb7f59\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_non_loop_anim_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1b293703451e37d706fb7748469e08bb\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_non_loop_anim_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3e3b1639646b2d8435c4415d5d424648\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_non_loop_anim_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4e001b7940a900a748a414b035541820\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_o2_sign.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"431f6a8b1fa51b507bcf13da74b15da5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_off_dot.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"127a2878256c72d05bbc46b313760577\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_on_dot.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7d390b8a244a17b8151e2a552bff1d77\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_on_off_dot.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"60bf6b496ccd45d944ec41184aeb62c6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_other_type.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4f482b827d0e70ac4031022c21737971\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_panel_button.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"445f076b10cc17e92b30538f1c3c0bfc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 9,\n            \"right\": 8,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_panel_button_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"33dc27782cbd3b856f98546a48551add\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 9,\n            \"right\": 8,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_panel_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"00e30bf2552d06127c1d6bd6121b6df3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 9,\n            \"right\": 8,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_panel_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2adb56610cab4d602fb6062b582b7c61\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 9,\n            \"right\": 8,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_panel_subpanel_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1d66598e2402227f299625033b627c88\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 15,\n            \"right\": 18,\n            \"top\": 13\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_panel_subpanel_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"006c29830a4061c219336f376edd7408\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 15,\n            \"right\": 18,\n            \"top\": 13\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_panel_subpanel_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"08102b891cb142b90e4240df07f947c2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 15,\n            \"right\": 18,\n            \"top\": 13\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_path_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5f42584132dd50f7040b468c35b633da\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pause_btn_inactive.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"44b8262876e4683548b83b554e544bd7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pause_btn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7308512942a4704708ca55320bc953a9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pause_btn_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4be6659607ff04405eed6a4f5c7641d8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pause_btn_select .png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"54772db77d4168b17bd54bc47eb81845\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pause_btn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2e1f151556f90d6c00794feb232c0812\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pause_green.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"345f713368971d42030d5d0979ec32e4\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pause_green_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"63be07d703c22bc170e862102cd77109\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pause_green_selected.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"22921cc073ac241b3c1920e94b385dc5\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pencil_icon_green.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"078a5c5269ee695a722144d642937467\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pivot.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6684387a17f21d804e0c625c3caf019f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pivot_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"478b75ef613a0f3f560513f2505f448d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pivot_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"27587cbc421e343b6a172ac445976fbe\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_pivot_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"38515d6a082a49430c38322b35f51152\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_anim_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"591a19c30f2c066a3e9d0ac23d5636aa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_anim_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"649a34d011312f0053bb7a6049d87c68\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_anim_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"01f342d9768621963e463c1f6bd61e6c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_btn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"748d796725b867fd6135105725ee07d7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_btn_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6c0b3f44539347465fbc4ca23cfd630b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_btn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"54533c7853254fc26d4f6bd9082129a8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_green.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6360353c0a00406e5aef0586639650b4\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_green_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"268325ac1cfa0726407e50b84494501f\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_green_selected.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"09bb28a82b5836836c7a59c14e954c65\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_play_panel_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"25896a4c65bb6d021da41e1540b5348f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 18,\n            \"bottom\": 14,\n            \"right\": 18,\n            \"top\": 14\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_plus_small_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3413234a0ae275d734b158ae52574be2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_plus_small_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0096333b50663c5276a9663e2ae53701\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_plus_small_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"07f6672722551dc57802769e0a7a4c8d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_position_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"13591d571afc12bf6d712ee753750268\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_prefab_link_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0824555552e83f137bea39715a717db2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_preview_anim.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4af3567144e93bfb574d7eff08276b1f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_red_edit_box.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"12a80f3344a31e2d3354161c2f944638\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 8,\n            \"bottom\": 8,\n            \"right\": 9,\n            \"top\": 8\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_remove_asset_instance.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"72e37ae1388974ad7a993d373ab56ba1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_remove_asset_instance_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"54540c6d09e92f2072c56ff6229c42e2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_remove_asset_instance_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"66de7fe06fcf11d5534f7d306268399c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_revert.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"44402071050555a124c77e7344733da4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_revert_prefab.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"66a662840f893c5e33eb68ff57751cb1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_revert_prefab_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6c1222e14ca4398d5c8d7cbc115f2840\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_revert_prefab_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3bc720c118ed0f71156b56ff220517ad\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_rewind_left.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"16aa3d2c44704f5d76fb7ba26d833596\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_rewind_right.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"09df6a6c4d7b25e139f063be7a356bde\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_rotate_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"160104da0967563125ad686703e8527a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_rotate_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"030001020f840bd92b4509cd2d577559\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_rotate_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"75de6acf151e03724be01ccc668037bf\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_rotate_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2640510a17026a0e32b31efd3c402c0d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_rotate_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"080c03bc303d37fc1b33333b4db333e4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_round_field.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1b6724306a1b40cf2115319d1c381026\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 12,\n            \"right\": 15,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_round_field_focused.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3cb634ec0c2a4357104d377d5b6b70f3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 12,\n            \"right\": 15,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_round_field_gray.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"749d29bb6c3779a535123773412905ad\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 12,\n            \"right\": 15,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_round_field_gray_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"480277a63e4f29092bd8095a558f0cf3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 12,\n            \"right\": 15,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_round_field_gray_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"080924f564be321631537a4942fa64a9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 12,\n            \"right\": 15,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_round_field_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"221859314013209c72795c99260719ed\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 12,\n            \"right\": 15,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_round_field_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6fd46d247f183bac5c7f17e55d937922\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 14,\n            \"bottom\": 12,\n            \"right\": 15,\n            \"top\": 12\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_save_asset_instance.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"07217ad66edd15986cda39045abb1de8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_save_asset_instance_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0a256d914aae1bef013f020f70dc0320\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_save_asset_instance_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"774511dd0c17278327a37a61259312ec\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_save_gray copy.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"792525843ae60c666e3b7e9100bd36ac\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_save_gray.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"36ab678e3d2829e7337c50795c776702\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_save_gray_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"22fc284427297a99761a2732351e3bcd\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_scale_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4d7c59300b78244b250b3f14794f7c30\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_scale_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"31d11d1b4ae008106f8569b959e72e8c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_scene_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"07df580d646f523814fb1dfa1a032880\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_search_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"13cc3f4f45710a54352307ef5f001eef\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_search_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"75fd696b197523351ff218f2007b35fa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_search_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7b175e291a460aec259d179c58511101\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_select_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"047125ac645757370538749441e716aa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_selected_key.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6bfe26935ff23aca66982fc5129f62a5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_selected_key_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5dd75cf130c54760239a02887dc27cc7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_selected_key_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"02093ccd514e707f0d97363b5a586089\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_selected_map_key.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"763732ef5458313915c3067a2b3c4e4b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_selected_map_key_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"14466d616af14fdd3d94541c058c55ae\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_selected_map_key_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"425d6b6b34666dfe66c0353b60a56594\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_selection_frame.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"42de0d960e43186b233a053066245c1d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 4,\n            \"bottom\": 5,\n            \"right\": 7,\n            \"top\": 5\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_shadow_separator.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"429c14fb5b927a6c63d37e4a16e82996\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 4,\n            \"bottom\": 0,\n            \"right\": 3,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_shear_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6454514469135ee7070c5d4f02887a76\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_small_panel_back.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"49be56066b956738561b3410432148f6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 8,\n            \"right\": 7,\n            \"top\": 8\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_small_panel_down_back.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"470500a075811926793a60284b925a5f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 8,\n            \"right\": 7,\n            \"top\": 8\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_small_trash_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"36560cd15c64708710a74d6c17562771\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_square_button.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1fd643e3718b28ec40157bf56fcb590d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 7,\n            \"right\": 8,\n            \"top\": 8\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_square_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"67e9505e448369275b7a311b508f0755\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 7,\n            \"right\": 8,\n            \"top\": 8\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_square_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1f344e0b73185347370b0778377d49a9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 7,\n            \"right\": 8,\n            \"top\": 8\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_square_field.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"529e59f47958149e773d7ee574b446aa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 6,\n            \"bottom\": 8,\n            \"right\": 8,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_step_btn_pressed .png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5b492262019075be60c50c7a7a8f4439\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_step_btn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2e9d76dd344d6a7628982a922dac3778\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_step_btn_regular .png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2e3d582e085c21d943eb68c334e954c8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_step_btn_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"780f085f12c9163638327be949611fc8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_step_btn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"36381ab856e21d206b244e1b06737b5b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_stop_anim_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6f1c03c31634776772b40eb339ba39a1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_stop_anim_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"55612948208b611c6518424a33152bfc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_stop_anim_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"17eb725123f5219028c552b8149f330c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_stop_btn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"31e057267cbf1b5444701f1722b74eb2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_stop_btn_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3aa5715005765c392f0e0bc013f82e10\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_stop_btn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"35de0b9966e72d501fd4124c61413f86\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_sub_track.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6cf040522c78223433793d2e3e1a7283\",\n        \"sliceBorder\": {\n            \"left\": 6,\n            \"bottom\": 6,\n            \"right\": 6,\n            \"top\": 7\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_tag_big.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6371320a681e22eb5e37519315ad40b5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_time_line.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0f8341ea3e692c9911eb1daf1e9b4e7e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 0,\n            \"bottom\": 3,\n            \"right\": 0,\n            \"top\": 21\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_time_line_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"627879c55d55252c12e70ff81ba77503\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 0,\n            \"bottom\": 3,\n            \"right\": 0,\n            \"top\": 21\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_time_line_left.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"30f6096246af62b6395e17092ead3fa5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 0,\n            \"right\": 8,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_time_line_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4be121ca5a8346872dc606b94bcc4903\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 0,\n            \"bottom\": 3,\n            \"right\": 0,\n            \"top\": 21\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_time_line_right.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"50600547271f4d2f38d4282109604b00\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 7,\n            \"bottom\": 0,\n            \"right\": 9,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_time_line_right_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"77d5176139101e81137d499c70052ebc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 6,\n            \"bottom\": 0,\n            \"right\": 8,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_time_line_right_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"67e86ce16b231d8d36f64ec14a9a1c99\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 6,\n            \"bottom\": 0,\n            \"right\": 8,\n            \"top\": 0\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_trach_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"35b70b7a022239575e6c5caf32445477\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_transform_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4bfd046473e85477661226ea70543b7a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_transform_icon_white.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3bf440583f843a155ddd77b4244706a2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_tree_icon-223.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"78813a607702658230400ce6143a0a8f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_tree_icon-61.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"40c87ec45ab06d5067f2199828893b23\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_tree_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"702f3b0e291b134e7fe656243bd33b7d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_tree_wnd_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4e5b4e066f10548e335210236af46e01\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_unlock_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5f3057b6579c79624dab3a6e6509044d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_vector_type.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"27c90e13537260835a33574067e879b0\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_weight_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"444571c9370c6315115f10624ab0015d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_window_frame_docked.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"29821f7977603f9b4d555dd659f271a7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 17,\n            \"right\": 17,\n            \"top\": 33\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_window_frame_docked_tab.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"082c7adc114072223f8624d3657d369c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 17,\n            \"right\": 17,\n            \"top\": 33\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_window_frame_docked_tab_active_back copy.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"63bb6ee349d31989559f57c840d81866\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 15,\n            \"right\": 18,\n            \"top\": 13\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_window_frame_docked_tab_back.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3f541bd74565005f1e577dcd78607ee7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 15,\n            \"right\": 18,\n            \"top\": 13\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_window_frame_docked_tab_inactive.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3a5d434026851c7718a1233d0ab2013f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 15,\n            \"right\": 18,\n            \"top\": 13\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI4_window_frame_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"607b57e75dfe1ee103b369af38ab75d0\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 17,\n            \"bottom\": 17,\n            \"right\": 17,\n            \"top\": 33\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Background.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"59c96a567a71232e4a442a3f16462b5d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Box_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"318353ef18463f74356c61cf62e2655d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Box_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5d65226a1e2816d050af554625192398\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Box_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"36552ed1342572934c84007c190968b2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Box_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6178636c3089374f799f548b1d0d5689\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Check_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7d843e5e0cde648337a05bb6623a2a00\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Check_bk_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"693019e64db207b44941030950950f55\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Check_bk_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3c40393d03af1c4760f92eee1a6666f3\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Check_bk_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"029a646b21e3528d523f7a3f36cb4a7a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Check_unknown.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"546234b9099b361750c635157f2232cb\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Ckeck.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"25fe24b15a643db6408474c87f060807\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Close_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1813201c420a5b7b05ae23f244553190\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Close_button_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"478514024c9c0cb854b9126c2f2d2607\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Close_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1d7a7eac346469fc025a054e41e97b4b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Context_menu.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1f567fa431f2371a538646f27128767f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 25,\n            \"bottom\": 25,\n            \"right\": 25,\n            \"top\": 25\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Context_menu_select copy.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3ec067b34c1273214d7136f173c51c04\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Context_menu_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"299b48e027d0686405925a2412df3f79\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Context_menu_white.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1a0c0677587a3c73719c6aa379d113c1\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Down_icn.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"267964fe2f9d001f378667c8063a3afc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Editbox_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"11871a410d053f797d83262c17f5568c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Editbox_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1a1a5d462ec011d23a095fa761211711\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Editbox_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4b587658011b29bb03cd435336194c6c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Editbox_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4ca64f006ea3650561c405895d7c75bf\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Hor_scrollbar_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"631d77e84a46720c07800e75562e0706\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Hor_scrollhandle_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0064294220b1273b6b9152523b963cdc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Hor_scrollhandle_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2b594da76cd63ef042d21d0f7a5541b0\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Hor_scrollhandle_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"112077614d0305be65f907c538ca1f62\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_ListBox_selection_hover.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1efa5a3609e93b26740d4bbf59860925\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_ListBox_selection_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6e971e235a7c5b2101a4317503c85537\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_ListBox_selection_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"681b1d0846ca2cf9407570075db31a2d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Options_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"665a4ddc0a1b0a0e525770675ada557c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Options_button_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"31d16bc164d5193d66cf30674a824bad\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Options_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0c6a5d8a4a661a94747c6bf051ae52cc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Radio.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5f5841267c8d387d7de441cf5c97258b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Radio_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"089c41fc1ab81a672292049d196e2136\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Radio_bk_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"645c0d9811e46c6a0ff0007649142762\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Radio_bk_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6c7d7204331f14d86774363220a767b0\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Radio_bk_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"27250e883db655432ad15beb37827100\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Right_icn.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"76b963ad2f355a7a0bfd6cfa57434173\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Right_icn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"69de633d136b4c903d2d39f74bc7566a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Right_icn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0b78004054635ed540d678bc332c3c87\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Separator.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3821097566522d056655626b4d6f6167\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_ToolsPanel_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"351040c57b69389a361e3ea6791f1f9d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Up_Menu.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"704d3eca14ef09fe7f6403fc28b30af0\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Up_Menu_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"44f367b43ad37edf74d46dbf21954378\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Up_Menu_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"54c045d717b271dc10bd5e9f69611522\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Ver_scrollbar_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0a1801bb711a77c60d1679f411b36610\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Ver_scrollhandle_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7ba135291ad820ae241238582e671ba2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Ver_scrollhandle_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3c407b2b46f807e6602877a4259c2a79\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Ver_scrollhandle_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2b19000955c963fd6c0b0af07fae2676\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Ver_separator.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4392114d25d616c562b14a96373a52bb\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_Window_place.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"05fb7cb46f9b68b21b710da4496979be\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\",\n        \"sliceBorder\": {\n            \"left\": 3,\n            \"bottom\": 4,\n            \"right\": 4,\n            \"top\": 4\n        },\n        \"defaultMode\": \"Sliced\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_brush_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"20324bc467e374d318f447cc01c33e40\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_brush_tool_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"202924a37cfe76312bba65d85a083037\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_brush_tool_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4b426c1230e851bb43645f874af90c0f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_button_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"17a1715932ee790051a81af35bf310aa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"57ac6501709c48d3787b437546946c28\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_button_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0a0768d465c119435a1259a546b74bea\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"29991fdb6c684da368e2435d6a7a6c92\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_frame_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"31a9020630255cc11b236fe16025516a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_frame_tool_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4a446b731cad7540075e713659336d0e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_frame_tool_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"729f389179896e145e2c2d9f4601358c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_link_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7b1f59f85dc573751dfb30cd0f910f13\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_list_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"65eb2f6f0461757f5a745acf68e36e25\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_lock_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6eab1f21570e74c279d81a6629376682\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_move_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0540372660dd761419143ca574cb27e4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_move_tool_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"78d153c7721c600652de44a443fc762d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_move_tool_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"34c1728e5959446a322b3abd0166447c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_o2_sign.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"10b54243335e704f02303c8959e84535\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_off_dot.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"209332ef3b3b7c081e620ce00c9e79f6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_on_dot.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"048005dd1a3b5b24427623dc3ae543a2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_on_off_dot.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"38e15d9337ec6c765a613ed6385a7259\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_panel_button.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"038b6ac03b5d39e44855155b2cfd17fb\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_panel_button_focus.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"10d90c2d06855e3e6f8d34405b4b079a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_panel_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6a387bd918eb39f3079a75796db55d4a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_panel_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"51ce450e4dde5a940e313b1f579833ec\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_panel_subpanel_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"660054543ee938f231472c8a3e9115a2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_panel_subpanel_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"7172077513da491f1f1046554a7d0bcc\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_panel_subpanel_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"3b0a3d7952be0a6a56036a5675792f0b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_pause_btn_inactive.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"55ed66a92fe1176674d36fa95be23741\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_pause_btn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"717f148f5dd235e30a7732a50c550b8e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_pause_btn_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"296609f45d5c66f1662224e457af5253\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_pause_btn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"55864ae04d8d76e3674a5d3f210d0132\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_play_btn_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5a052c9c3bb10d494da427ce2dcc6d0b\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_play_btn_select copy.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"774865b273573cf4092515ec758a5a00\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_play_btn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"19f41dea4e4a13f50a020e2f72220b70\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_play_panel_bk.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2aed7e4e04982b9d10b05c736fb253fe\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_rotate_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"32ad3f000a6b5fda39ad54624dcd1faa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_rotate_tool_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"52e145054c0f496f3aa67d424e485af4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_rotate_tool_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4bba69197e1d50a716f838f4297a08c6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_scale_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"391d434423a375d232167252668112c2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_scale_tool_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"432e3cd02deb14824fb749746eb841c9\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_scale_tool_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6e5320454c85738663ce23b55dbd4dfa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_search_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6b31296c3d3c54f062913bac516e6eb8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_search_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"66ac154f1c1f06111075313339e66aa4\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_search_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"59ea323733796f7b522f19622984279d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_select_tool.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5a506fac4bd724fd7cb30e9324e33ac6\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_select_tool_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"69826e777c0875aa2538405f72e1787f\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_select_tool_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"456610a279177bd27132039f6c9c046a\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_square_button.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"68176d7a25466a163a972c1d02f90197\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_square_button_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"27ed427925bf0f15242e054d7d15565c\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_square_button_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"468a0f7c35cb0353298d77d67de26056\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_square_field.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"5f116ccb51b84961716a02cf69bb3f66\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_step_btn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"28e813ef74100f1012ba2a92173f42ae\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_step_btn_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"47b36fb265a33d7264b108b71f49788d\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_step_btn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"1b582c1d0d7c08d64ec65c182cf83ea7\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_stop_btn_pressed.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"0ffc467840e900ce18ad18ce4da851da\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_stop_btn_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6e031d4c1377202c3a5a783240f55e49\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_stop_btn_select.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"2a13006326f35cff2c0408dc48be0f54\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_tree_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4c2040bc3f284f8d415e02a908746904\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_unlock_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"48a803d01eba69a826b9433d1f5c74aa\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_window_frame_docked.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"6d502dbf63ec3d501f4f242f091d31a8\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_window_frame_docked_tab.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4c3715695b1a3fed0d5a2a93447314df\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_window_frame_docked_tab_active_back copy.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"106d599344ab622f788725dc1a9b2d40\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_window_frame_docked_tab_back.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"46566cc7182e52e65ccb23636f311aec\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_window_frame_docked_tab_inactive.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"269832cd5b6d3c22365a05c128127d44\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/UI_window_frame_regular.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"661810ae7278533651ab14ce7d5b02ea\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/circle_hole_handle.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"765f0d4e10b21aec273c3d092d27126e\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/function_icon.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"153a346b58f76ba94e416db20f587244\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/hor_hole_handle.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"311766284f1a03f22a5646697a2b6471\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/hor_slice_line.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"4e9c0a6367712dc71d7864e112ee1073\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/ver_hole_handle.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"23a50e686362786770a2329c58d95ee2\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui/ver_slice_line.png.meta",
    "content": "{\n    \"Type\": \"o2::ImageAsset::Meta\",\n    \"Value\": {\n        \"mId\": \"48bb0e912c9b39666e735b4e3a886eb5\",\n        \"atlasId\": \"6bd459187f2675966f8c67e46e525c59\"\n    }\n}"
  },
  {
    "path": "Editor/Assets/ui.meta",
    "content": "{\n    \"Type\": \"o2::DefaultAssetMeta<o2::FolderAsset>\",\n    \"Value\": {\n        \"mId\": \"65dc37735fa861b35a0c3d4c10246e36\"\n    }\n}"
  },
  {
    "path": "Editor/Platforms/Mac/Editor.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 50;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\tA667A4552962318600B565EE /* stdafx.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3392962318600B565EE /* stdafx.h */; };\n\t\tA667A4562962318600B565EE /* EditorApplication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A33B2962318600B565EE /* EditorApplication.cpp */; };\n\t\tA667A4572962318600B565EE /* CurvePreview.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A33D2962318600B565EE /* CurvePreview.h */; };\n\t\tA667A4582962318600B565EE /* ImageSlicesEditorWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A33E2962318600B565EE /* ImageSlicesEditorWidget.cpp */; };\n\t\tA667A4592962318600B565EE /* ScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A33F2962318600B565EE /* ScrollView.h */; };\n\t\tA667A45A2962318600B565EE /* FrameScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3402962318600B565EE /* FrameScrollView.cpp */; };\n\t\tA667A45B2962318600B565EE /* ImageSlicesEditorWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3412962318600B565EE /* ImageSlicesEditorWidget.h */; };\n\t\tA667A45C2962318600B565EE /* FrameScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3422962318600B565EE /* FrameScrollView.h */; };\n\t\tA667A45D2962318600B565EE /* CurvesEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3442962318600B565EE /* CurvesEditor.cpp */; };\n\t\tA667A45E2962318600B565EE /* CurvesEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3452962318600B565EE /* CurvesEditor.h */; };\n\t\tA667A45F2962318600B565EE /* CurveActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3462962318600B565EE /* CurveActions.cpp */; };\n\t\tA667A4602962318600B565EE /* CurveActions.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3472962318600B565EE /* CurveActions.h */; };\n\t\tA667A4612962318600B565EE /* SplineEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3492962318600B565EE /* SplineEditor.h */; };\n\t\tA667A4622962318600B565EE /* SplineEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A34A2962318600B565EE /* SplineEditor.cpp */; };\n\t\tA667A4632962318600B565EE /* SpoilerWithHead.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A34B2962318600B565EE /* SpoilerWithHead.cpp */; };\n\t\tA667A4642962318600B565EE /* SpoilerWithHead.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A34C2962318600B565EE /* SpoilerWithHead.h */; };\n\t\tA667A4652962318600B565EE /* CurvePreview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A34D2962318600B565EE /* CurvePreview.cpp */; };\n\t\tA667A4662962318600B565EE /* ScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A34E2962318600B565EE /* ScrollView.cpp */; };\n\t\tA667A4672962318600B565EE /* UIRoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A34F2962318600B565EE /* UIRoot.cpp */; };\n\t\tA667A4682962318600B565EE /* DockableWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3512962318600B565EE /* DockableWindow.cpp */; };\n\t\tA667A4692962318600B565EE /* WindowsLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3522962318600B565EE /* WindowsLayout.cpp */; };\n\t\tA667A46A2962318600B565EE /* WindowsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3532962318600B565EE /* WindowsManager.h */; };\n\t\tA667A46B2962318600B565EE /* WindowsManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3542962318600B565EE /* WindowsManager.cpp */; };\n\t\tA667A46C2962318600B565EE /* IEditorWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3552962318600B565EE /* IEditorWindow.h */; };\n\t\tA667A46D2962318600B565EE /* DockWindowPlace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3562962318600B565EE /* DockWindowPlace.cpp */; };\n\t\tA667A46E2962318600B565EE /* WindowsLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3572962318600B565EE /* WindowsLayout.h */; };\n\t\tA667A46F2962318600B565EE /* DockableWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3582962318600B565EE /* DockableWindow.h */; };\n\t\tA667A4702962318600B565EE /* IEditorWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3592962318600B565EE /* IEditorWindow.cpp */; };\n\t\tA667A4712962318600B565EE /* DockWindowPlace.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A35A2962318600B565EE /* DockWindowPlace.h */; };\n\t\tA667A4722962318600B565EE /* EditorUIStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A35C2962318600B565EE /* EditorUIStyle.h */; };\n\t\tA667A4732962318600B565EE /* BasicUIStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A35D2962318600B565EE /* BasicUIStyle.cpp */; };\n\t\tA667A4742962318600B565EE /* EditorUIStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A35E2962318600B565EE /* EditorUIStyle.cpp */; };\n\t\tA667A4752962318600B565EE /* BasicUIStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A35F2962318600B565EE /* BasicUIStyle.h */; };\n\t\tA667A4762962318600B565EE /* EditorConfig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3602962318600B565EE /* EditorConfig.cpp */; };\n\t\tA667A4772962318600B565EE /* ScaleTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3622962318600B565EE /* ScaleTool.cpp */; };\n\t\tA667A4782962318600B565EE /* SelectionTool.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3632962318600B565EE /* SelectionTool.h */; };\n\t\tA667A4792962318700B565EE /* MoveTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3642962318600B565EE /* MoveTool.cpp */; };\n\t\tA667A47A2962318700B565EE /* CustomFrameTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3652962318600B565EE /* CustomFrameTool.cpp */; };\n\t\tA667A47B2962318700B565EE /* RotateTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3662962318600B565EE /* RotateTool.cpp */; };\n\t\tA667A47C2962318700B565EE /* ScaleTool.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3672962318600B565EE /* ScaleTool.h */; };\n\t\tA667A47D2962318700B565EE /* FrameTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3682962318600B565EE /* FrameTool.cpp */; };\n\t\tA667A47E2962318700B565EE /* FrameTool.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3692962318600B565EE /* FrameTool.h */; };\n\t\tA667A47F2962318700B565EE /* RotateTool.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A36A2962318600B565EE /* RotateTool.h */; };\n\t\tA667A4802962318700B565EE /* CustomFrameTool.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A36B2962318600B565EE /* CustomFrameTool.h */; };\n\t\tA667A4812962318700B565EE /* MoveTool.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A36C2962318600B565EE /* MoveTool.h */; };\n\t\tA667A4822962318700B565EE /* SplineTool.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A36D2962318600B565EE /* SplineTool.h */; };\n\t\tA667A4832962318700B565EE /* IEditorTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A36E2962318600B565EE /* IEditorTool.cpp */; };\n\t\tA667A4842962318700B565EE /* SplineTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A36F2962318600B565EE /* SplineTool.cpp */; };\n\t\tA667A4852962318700B565EE /* IEditorTool.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3702962318600B565EE /* IEditorTool.h */; };\n\t\tA667A4862962318700B565EE /* SelectionTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3712962318600B565EE /* SelectionTool.cpp */; };\n\t\tA667A4872962318700B565EE /* MenuPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3722962318600B565EE /* MenuPanel.cpp */; };\n\t\tA667A4882962318700B565EE /* EditorApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3732962318600B565EE /* EditorApplication.h */; };\n\t\tA667A4892962318700B565EE /* UIRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3742962318600B565EE /* UIRoot.h */; };\n\t\tA667A48A2962318700B565EE /* IPropertyField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3762962318600B565EE /* IPropertyField.cpp */; };\n\t\tA667A48B2962318700B565EE /* ComponentProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3782962318600B565EE /* ComponentProperty.cpp */; };\n\t\tA667A48C2962318700B565EE /* ActorProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3792962318600B565EE /* ActorProperty.cpp */; };\n\t\tA667A48D2962318700B565EE /* Vector2IntProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A37A2962318600B565EE /* Vector2IntProperty.cpp */; };\n\t\tA667A48E2962318700B565EE /* CurveProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A37B2962318600B565EE /* CurveProperty.cpp */; };\n\t\tA667A48F2962318700B565EE /* VectorProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A37C2962318600B565EE /* VectorProperty.h */; };\n\t\tA667A4902962318700B565EE /* ScriptValueProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A37D2962318600B565EE /* ScriptValueProperty.cpp */; };\n\t\tA667A4912962318700B565EE /* WStringProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A37E2962318600B565EE /* WStringProperty.h */; };\n\t\tA667A4922962318700B565EE /* CurveProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A37F2962318600B565EE /* CurveProperty.h */; };\n\t\tA667A4932962318700B565EE /* FloatProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3802962318600B565EE /* FloatProperty.h */; };\n\t\tA667A4942962318700B565EE /* IntegerProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3812962318600B565EE /* IntegerProperty.cpp */; };\n\t\tA667A4952962318700B565EE /* BorderIntProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3822962318600B565EE /* BorderIntProperty.h */; };\n\t\tA667A4962962318700B565EE /* ScriptValueProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3832962318600B565EE /* ScriptValueProperty.h */; };\n\t\tA667A4972962318700B565EE /* EnumProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3842962318600B565EE /* EnumProperty.h */; };\n\t\tA667A4982962318700B565EE /* TagProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3852962318600B565EE /* TagProperty.h */; };\n\t\tA667A4992962318700B565EE /* WStringProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3862962318600B565EE /* WStringProperty.cpp */; };\n\t\tA667A49A2962318700B565EE /* RectangleFloatProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3872962318600B565EE /* RectangleFloatProperty.h */; };\n\t\tA667A49B2962318700B565EE /* ObjectProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3882962318600B565EE /* ObjectProperty.cpp */; };\n\t\tA667A49C2962318700B565EE /* EnumProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3892962318600B565EE /* EnumProperty.cpp */; };\n\t\tA667A49D2962318700B565EE /* StringProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A38A2962318600B565EE /* StringProperty.cpp */; };\n\t\tA667A49E2962318700B565EE /* ObjectProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A38B2962318600B565EE /* ObjectProperty.h */; };\n\t\tA667A49F2962318700B565EE /* BorderFloatProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A38C2962318600B565EE /* BorderFloatProperty.h */; };\n\t\tA667A4A02962318700B565EE /* BooleanProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A38D2962318600B565EE /* BooleanProperty.h */; };\n\t\tA667A4A12962318700B565EE /* LayerProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A38E2962318600B565EE /* LayerProperty.h */; };\n\t\tA667A4A22962318700B565EE /* RectangleIntProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A38F2962318600B565EE /* RectangleIntProperty.h */; };\n\t\tA667A4A32962318700B565EE /* LayerProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3902962318600B565EE /* LayerProperty.cpp */; };\n\t\tA667A4A42962318700B565EE /* ComponentProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3912962318600B565EE /* ComponentProperty.h */; };\n\t\tA667A4A52962318700B565EE /* BorderIntProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3922962318600B565EE /* BorderIntProperty.cpp */; };\n\t\tA667A4A62962318700B565EE /* Vector2FloatProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3932962318600B565EE /* Vector2FloatProperty.cpp */; };\n\t\tA667A4A72962318700B565EE /* EnumMaskProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3942962318600B565EE /* EnumMaskProperty.h */; };\n\t\tA667A4A82962318700B565EE /* ObjectPtrProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3952962318600B565EE /* ObjectPtrProperty.cpp */; };\n\t\tA667A4A92962318700B565EE /* ColorProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3962962318600B565EE /* ColorProperty.h */; };\n\t\tA667A4AA2962318700B565EE /* SceneLayersListProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3972962318600B565EE /* SceneLayersListProperty.cpp */; };\n\t\tA667A4AB2962318700B565EE /* AssetProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3982962318600B565EE /* AssetProperty.cpp */; };\n\t\tA667A4AC2962318700B565EE /* RectangleIntProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3992962318600B565EE /* RectangleIntProperty.cpp */; };\n\t\tA667A4AD2962318700B565EE /* ObjectPtrProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A39A2962318600B565EE /* ObjectPtrProperty.h */; };\n\t\tA667A4AE2962318700B565EE /* StringProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A39B2962318600B565EE /* StringProperty.h */; };\n\t\tA667A4AF2962318700B565EE /* FloatProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A39C2962318600B565EE /* FloatProperty.cpp */; };\n\t\tA667A4B02962318700B565EE /* SceneLayersListProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A39D2962318600B565EE /* SceneLayersListProperty.h */; };\n\t\tA667A4B12962318700B565EE /* RectangleFloatProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A39E2962318600B565EE /* RectangleFloatProperty.cpp */; };\n\t\tA667A4B22962318700B565EE /* Vector2IntProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A39F2962318600B565EE /* Vector2IntProperty.h */; };\n\t\tA667A4B32962318700B565EE /* ColorProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3A02962318600B565EE /* ColorProperty.cpp */; };\n\t\tA667A4B42962318700B565EE /* TagProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3A12962318600B565EE /* TagProperty.cpp */; };\n\t\tA667A4B52962318700B565EE /* ActorProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3A22962318600B565EE /* ActorProperty.h */; };\n\t\tA667A4B62962318700B565EE /* Vector2FloatProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3A32962318600B565EE /* Vector2FloatProperty.h */; };\n\t\tA667A4B72962318700B565EE /* AssetProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3A42962318600B565EE /* AssetProperty.h */; };\n\t\tA667A4B82962318700B565EE /* BorderFloatProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3A52962318600B565EE /* BorderFloatProperty.cpp */; };\n\t\tA667A4B92962318700B565EE /* VectorProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3A62962318600B565EE /* VectorProperty.cpp */; };\n\t\tA667A4BA2962318700B565EE /* IntegerProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3A72962318600B565EE /* IntegerProperty.h */; };\n\t\tA667A4BB2962318700B565EE /* BooleanProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3A82962318600B565EE /* BooleanProperty.cpp */; };\n\t\tA667A4BC2962318700B565EE /* CameraActorViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3AA2962318600B565EE /* CameraActorViewer.cpp */; };\n\t\tA667A4BD2962318700B565EE /* SpriteViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3AB2962318600B565EE /* SpriteViewer.cpp */; };\n\t\tA667A4BE2962318700B565EE /* CameraActorViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3AC2962318600B565EE /* CameraActorViewer.h */; };\n\t\tA667A4BF2962318700B565EE /* TextViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3AD2962318600B565EE /* TextViewer.cpp */; };\n\t\tA667A4C02962318700B565EE /* DefaultObjectPropertiesViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3AE2962318600B565EE /* DefaultObjectPropertiesViewer.cpp */; };\n\t\tA667A4C12962318700B565EE /* AnimationStateViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3B02962318600B565EE /* AnimationStateViewer.h */; };\n\t\tA667A4C22962318700B565EE /* MeshComponentViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3B12962318600B565EE /* MeshComponentViewer.h */; };\n\t\tA667A4C32962318700B565EE /* MeshComponentViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3B22962318600B565EE /* MeshComponentViewer.cpp */; };\n\t\tA667A4C42962318700B565EE /* AnimationStateViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3B32962318600B565EE /* AnimationStateViewer.cpp */; };\n\t\tA667A4C52962318700B565EE /* AnimationViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3B42962318600B565EE /* AnimationViewer.cpp */; };\n\t\tA667A4C62962318700B565EE /* DefaultObjectPropertiesViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3B52962318600B565EE /* DefaultObjectPropertiesViewer.h */; };\n\t\tA667A4C72962318700B565EE /* AnimationViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3B62962318600B565EE /* AnimationViewer.h */; };\n\t\tA667A4C82962318700B565EE /* ImageAssetViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3B82962318600B565EE /* ImageAssetViewer.h */; };\n\t\tA667A4C92962318700B565EE /* ImageAssetViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3B92962318600B565EE /* ImageAssetViewer.cpp */; };\n\t\tA667A4CA2962318700B565EE /* TextViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3BA2962318600B565EE /* TextViewer.h */; };\n\t\tA667A4CB2962318700B565EE /* SpriteViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3BB2962318600B565EE /* SpriteViewer.h */; };\n\t\tA667A4CC2962318700B565EE /* ObjectViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3BC2962318600B565EE /* ObjectViewer.h */; };\n\t\tA667A4CD2962318700B565EE /* IObjectPropertiesViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3BD2962318600B565EE /* IObjectPropertiesViewer.h */; };\n\t\tA667A4CE2962318700B565EE /* ObjectViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3BE2962318600B565EE /* ObjectViewer.cpp */; };\n\t\tA667A4CF2962318700B565EE /* Properties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3BF2962318600B565EE /* Properties.cpp */; };\n\t\tA667A4D02962318700B565EE /* IPropertyField.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3C02962318600B565EE /* IPropertyField.h */; };\n\t\tA667A4D12962318700B565EE /* PropertiesContext.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3C12962318600B565EE /* PropertiesContext.h */; };\n\t\tA667A4D22962318700B565EE /* IObjectPropertiesViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3C22962318600B565EE /* IObjectPropertiesViewer.cpp */; };\n\t\tA667A4D32962318700B565EE /* PropertiesContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3C32962318600B565EE /* PropertiesContext.cpp */; };\n\t\tA667A4D42962318700B565EE /* Properties.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3C42962318600B565EE /* Properties.h */; };\n\t\tA667A4D52962318700B565EE /* ActionsList.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3C62962318600B565EE /* ActionsList.h */; };\n\t\tA667A4D62962318700B565EE /* Select.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3C72962318600B565EE /* Select.cpp */; };\n\t\tA667A4D72962318700B565EE /* Reparent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3C82962318600B565EE /* Reparent.cpp */; };\n\t\tA667A4D82962318700B565EE /* PropertyChange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3C92962318600B565EE /* PropertyChange.cpp */; };\n\t\tA667A4D92962318700B565EE /* Reparent.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3CA2962318600B565EE /* Reparent.h */; };\n\t\tA667A4DA2962318700B565EE /* Enable.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3CB2962318600B565EE /* Enable.h */; };\n\t\tA667A4DB2962318700B565EE /* Lock.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3CC2962318600B565EE /* Lock.h */; };\n\t\tA667A4DC2962318700B565EE /* Delete.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3CD2962318600B565EE /* Delete.h */; };\n\t\tA667A4DD2962318700B565EE /* Delete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3CE2962318600B565EE /* Delete.cpp */; };\n\t\tA667A4DE2962318700B565EE /* Transform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3CF2962318600B565EE /* Transform.cpp */; };\n\t\tA667A4DF2962318700B565EE /* ActionsList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3D02962318600B565EE /* ActionsList.cpp */; };\n\t\tA667A4E02962318700B565EE /* Create.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3D12962318600B565EE /* Create.cpp */; };\n\t\tA667A4E12962318700B565EE /* Transform.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3D22962318600B565EE /* Transform.h */; };\n\t\tA667A4E22962318700B565EE /* PropertyChange.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3D32962318600B565EE /* PropertyChange.h */; };\n\t\tA667A4E32962318700B565EE /* IAction.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3D42962318600B565EE /* IAction.h */; };\n\t\tA667A4E42962318700B565EE /* Enable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3D52962318600B565EE /* Enable.cpp */; };\n\t\tA667A4E52962318700B565EE /* Lock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3D62962318600B565EE /* Lock.cpp */; };\n\t\tA667A4E62962318700B565EE /* Create.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3D72962318600B565EE /* Create.h */; };\n\t\tA667A4E72962318700B565EE /* IAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3D82962318600B565EE /* IAction.cpp */; };\n\t\tA667A4E82962318700B565EE /* Select.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3D92962318600B565EE /* Select.h */; };\n\t\tA667A4E92962318700B565EE /* CurveEditorDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3DB2962318600B565EE /* CurveEditorDlg.cpp */; };\n\t\tA667A4EA2962318700B565EE /* EditNameDlg.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3DC2962318600B565EE /* EditNameDlg.h */; };\n\t\tA667A4EB2962318700B565EE /* KeyEditDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3DD2962318600B565EE /* KeyEditDlg.cpp */; };\n\t\tA667A4EC2962318700B565EE /* EditNameDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3DE2962318600B565EE /* EditNameDlg.cpp */; };\n\t\tA667A4ED2962318700B565EE /* OpenSaveDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3E02962318600B565EE /* OpenSaveDialog.h */; };\n\t\tA667A4EE2962318700B565EE /* OpenSaveDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3E22962318600B565EE /* OpenSaveDialog.cpp */; };\n\t\tA667A4EF2962318700B565EE /* OpenSaveDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3E52962318600B565EE /* OpenSaveDialog.cpp */; };\n\t\tA667A4F02962318700B565EE /* KeyEditDlg.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3E62962318600B565EE /* KeyEditDlg.h */; };\n\t\tA667A4F12962318700B565EE /* ColorPickerDlg.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3E72962318600B565EE /* ColorPickerDlg.h */; };\n\t\tA667A4F22962318700B565EE /* ColorPickerDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3E82962318600B565EE /* ColorPickerDlg.cpp */; };\n\t\tA667A4F32962318700B565EE /* CurveEditorDlg.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3E92962318600B565EE /* CurveEditorDlg.h */; };\n\t\tA667A4F42962318700B565EE /* EditorConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3EA2962318600B565EE /* EditorConfig.h */; };\n\t\tA667A4F52962318700B565EE /* MenuPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3EB2962318600B565EE /* MenuPanel.h */; };\n\t\tA667A4F62962318700B565EE /* ToolsPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3EC2962318600B565EE /* ToolsPanel.cpp */; };\n\t\tA667A4F72962318700B565EE /* ToolsPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3ED2962318600B565EE /* ToolsPanel.h */; };\n\t\tA667A4F82962318700B565EE /* SceneTree.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3EF2962318600B565EE /* SceneTree.h */; };\n\t\tA667A4F92962318700B565EE /* TreeWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3F02962318600B565EE /* TreeWindow.cpp */; };\n\t\tA667A4FA2962318700B565EE /* TreeWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3F12962318600B565EE /* TreeWindow.h */; };\n\t\tA667A4FB2962318700B565EE /* SceneTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3F22962318600B565EE /* SceneTree.cpp */; };\n\t\tA667A4FC2962318700B565EE /* FoldersTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3F42962318600B565EE /* FoldersTree.cpp */; };\n\t\tA667A4FD2962318700B565EE /* AssetsWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3F52962318600B565EE /* AssetsWindow.cpp */; };\n\t\tA667A4FE2962318700B565EE /* AssetsIconsScroll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3F62962318600B565EE /* AssetsIconsScroll.cpp */; };\n\t\tA667A4FF2962318700B565EE /* AssetsWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3F72962318600B565EE /* AssetsWindow.h */; };\n\t\tA667A5002962318700B565EE /* AssetIcon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3F82962318600B565EE /* AssetIcon.cpp */; };\n\t\tA667A5012962318700B565EE /* AssetsIconsScroll.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3F92962318600B565EE /* AssetsIconsScroll.h */; };\n\t\tA667A5022962318700B565EE /* FoldersTree.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3FA2962318600B565EE /* FoldersTree.h */; };\n\t\tA667A5032962318700B565EE /* AssetIcon.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3FB2962318600B565EE /* AssetIcon.h */; };\n\t\tA667A5042962318700B565EE /* SceneEditScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3FD2962318600B565EE /* SceneEditScreen.h */; };\n\t\tA667A5052962318700B565EE /* SceneDragHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A3FE2962318600B565EE /* SceneDragHandle.h */; };\n\t\tA667A5062962318700B565EE /* SceneEditScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A3FF2962318600B565EE /* SceneEditScreen.cpp */; };\n\t\tA667A5072962318700B565EE /* SceneEditorLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4002962318600B565EE /* SceneEditorLayer.h */; };\n\t\tA667A5082962318700B565EE /* SceneWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4012962318600B565EE /* SceneWindow.h */; };\n\t\tA667A5092962318700B565EE /* SceneWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4022962318600B565EE /* SceneWindow.cpp */; };\n\t\tA667A50A2962318700B565EE /* LayersPopup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4032962318600B565EE /* LayersPopup.cpp */; };\n\t\tA667A50B2962318700B565EE /* SceneDragHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4042962318600B565EE /* SceneDragHandle.cpp */; };\n\t\tA667A50C2962318700B565EE /* LayersPopup.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4052962318600B565EE /* LayersPopup.h */; };\n\t\tA667A50D2962318700B565EE /* stdafx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4062962318600B565EE /* stdafx.cpp */; };\n\t\tA667A50E2962318700B565EE /* PropertiesWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4082962318600B565EE /* PropertiesWindow.h */; };\n\t\tA667A50F2962318700B565EE /* AssetPropertiesViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4092962318600B565EE /* AssetPropertiesViewer.h */; };\n\t\tA667A5102962318700B565EE /* AssetPropertiesViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A40A2962318600B565EE /* AssetPropertiesViewer.cpp */; };\n\t\tA667A5112962318700B565EE /* DefaultActorComponentViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A40C2962318600B565EE /* DefaultActorComponentViewer.cpp */; };\n\t\tA667A5122962318700B565EE /* DefaultActorTransformViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A40D2962318600B565EE /* DefaultActorTransformViewer.h */; };\n\t\tA667A5132962318700B565EE /* IActorPropertiesViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A40E2962318600B565EE /* IActorPropertiesViewer.h */; };\n\t\tA667A5142962318700B565EE /* ActorViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A40F2962318600B565EE /* ActorViewer.cpp */; };\n\t\tA667A5152962318700B565EE /* IActorTransformViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4102962318600B565EE /* IActorTransformViewer.h */; };\n\t\tA667A5162962318700B565EE /* AddComponentPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4112962318600B565EE /* AddComponentPanel.cpp */; };\n\t\tA667A5172962318700B565EE /* IActorComponentViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4122962318600B565EE /* IActorComponentViewer.cpp */; };\n\t\tA667A5182962318700B565EE /* DefaultActorHeaderViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4132962318600B565EE /* DefaultActorHeaderViewer.h */; };\n\t\tA667A5192962318700B565EE /* IActorPropertiesViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4142962318600B565EE /* IActorPropertiesViewer.cpp */; };\n\t\tA667A51A2962318700B565EE /* IActorHeaderViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4152962318600B565EE /* IActorHeaderViewer.cpp */; };\n\t\tA667A51B2962318700B565EE /* ActorViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4162962318600B565EE /* ActorViewer.h */; };\n\t\tA667A51C2962318700B565EE /* DefaultActorHeaderViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4172962318600B565EE /* DefaultActorHeaderViewer.cpp */; };\n\t\tA667A51D2962318700B565EE /* IActorTransformViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4182962318600B565EE /* IActorTransformViewer.cpp */; };\n\t\tA667A51E2962318700B565EE /* DefaultActorComponentViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4192962318600B565EE /* DefaultActorComponentViewer.h */; };\n\t\tA667A51F2962318700B565EE /* DefaultActorPropertiesViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A41A2962318600B565EE /* DefaultActorPropertiesViewer.h */; };\n\t\tA667A5202962318700B565EE /* IActorHeaderViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A41B2962318600B565EE /* IActorHeaderViewer.h */; };\n\t\tA667A5212962318700B565EE /* IActorComponentViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A41C2962318600B565EE /* IActorComponentViewer.h */; };\n\t\tA667A5222962318700B565EE /* DefaultActorPropertiesViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A41D2962318600B565EE /* DefaultActorPropertiesViewer.cpp */; };\n\t\tA667A5232962318700B565EE /* AddComponentPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A41E2962318600B565EE /* AddComponentPanel.h */; };\n\t\tA667A5242962318700B565EE /* DefaultActorTransformViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A41F2962318600B565EE /* DefaultActorTransformViewer.cpp */; };\n\t\tA667A5252962318700B565EE /* IPropertiesViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4202962318600B565EE /* IPropertiesViewer.h */; };\n\t\tA667A5262962318700B565EE /* IPropertiesViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4212962318600B565EE /* IPropertiesViewer.cpp */; };\n\t\tA667A5272962318700B565EE /* DefaultPropertiesViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4222962318600B565EE /* DefaultPropertiesViewer.h */; };\n\t\tA667A5282962318700B565EE /* DefaultPropertiesViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4232962318600B565EE /* DefaultPropertiesViewer.cpp */; };\n\t\tA667A5292962318700B565EE /* PropertiesWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4242962318600B565EE /* PropertiesWindow.cpp */; };\n\t\tA667A52A2962318700B565EE /* DefaultWidgetLayerPropertiesViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4262962318600B565EE /* DefaultWidgetLayerPropertiesViewer.h */; };\n\t\tA667A52B2962318700B565EE /* IWidgetLayerLayoutViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4272962318600B565EE /* IWidgetLayerLayoutViewer.cpp */; };\n\t\tA667A52C2962318700B565EE /* IWidgetLayerHeadViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4282962318600B565EE /* IWidgetLayerHeadViewer.h */; };\n\t\tA667A52D2962318700B565EE /* DefaultWidgetLayerLayoutViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4292962318600B565EE /* DefaultWidgetLayerLayoutViewer.h */; };\n\t\tA667A52E2962318700B565EE /* WidgetLayerViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A42A2962318600B565EE /* WidgetLayerViewer.cpp */; };\n\t\tA667A52F2962318700B565EE /* IWidgetLayerLayoutViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A42B2962318600B565EE /* IWidgetLayerLayoutViewer.h */; };\n\t\tA667A5302962318700B565EE /* IWidgetLayerPropertiesViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A42C2962318600B565EE /* IWidgetLayerPropertiesViewer.cpp */; };\n\t\tA667A5312962318700B565EE /* WidgetLayerViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A42D2962318600B565EE /* WidgetLayerViewer.h */; };\n\t\tA667A5322962318700B565EE /* IWidgetLayerHeadViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A42E2962318600B565EE /* IWidgetLayerHeadViewer.cpp */; };\n\t\tA667A5332962318700B565EE /* IWidgetLayerPropertiesViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A42F2962318600B565EE /* IWidgetLayerPropertiesViewer.h */; };\n\t\tA667A5342962318700B565EE /* DefaultWidgetLayerLayoutViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4302962318600B565EE /* DefaultWidgetLayerLayoutViewer.cpp */; };\n\t\tA667A5352962318700B565EE /* DefaultWidgetLayerHeadViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4312962318600B565EE /* DefaultWidgetLayerHeadViewer.cpp */; };\n\t\tA667A5362962318700B565EE /* DefaultWidgetLayerHeadViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4322962318600B565EE /* DefaultWidgetLayerHeadViewer.h */; };\n\t\tA667A5372962318700B565EE /* DefaultWidgetLayerPropertiesViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4332962318600B565EE /* DefaultWidgetLayerPropertiesViewer.cpp */; };\n\t\tA667A5382962318700B565EE /* GameWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4352962318600B565EE /* GameWindow.cpp */; };\n\t\tA667A5392962318700B565EE /* GameWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4362962318600B565EE /* GameWindow.h */; };\n\t\tA667A53A2962318700B565EE /* LogWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4382962318600B565EE /* LogWindow.h */; };\n\t\tA667A53B2962318700B565EE /* LogWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4392962318600B565EE /* LogWindow.cpp */; };\n\t\tA667A53C2962318700B565EE /* KeyHandlesSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A43B2962318600B565EE /* KeyHandlesSheet.h */; };\n\t\tA667A53D2962318700B565EE /* AnimationKeysActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A43C2962318600B565EE /* AnimationKeysActions.cpp */; };\n\t\tA667A53E2962318700B565EE /* KeyHandlesSheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A43D2962318600B565EE /* KeyHandlesSheet.cpp */; };\n\t\tA667A53F2962318700B565EE /* Tree.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A43E2962318600B565EE /* Tree.h */; };\n\t\tA667A5402962318700B565EE /* CurvesSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A43F2962318600B565EE /* CurvesSheet.h */; };\n\t\tA667A5412962318700B565EE /* PropertiesListDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4402962318600B565EE /* PropertiesListDlg.cpp */; };\n\t\tA667A5422962318700B565EE /* PropertiesListDlg.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4412962318600B565EE /* PropertiesListDlg.h */; };\n\t\tA667A5432962318700B565EE /* Timeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4422962318600B565EE /* Timeline.cpp */; };\n\t\tA667A5442962318700B565EE /* Tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4432962318600B565EE /* Tree.cpp */; };\n\t\tA667A5452962318700B565EE /* AnimationWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4442962318600B565EE /* AnimationWindow.h */; };\n\t\tA667A5462962318700B565EE /* CurvesSheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4452962318600B565EE /* CurvesSheet.cpp */; };\n\t\tA667A5472962318700B565EE /* MapKeyFramesTrackControl.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4472962318600B565EE /* MapKeyFramesTrackControl.h */; };\n\t\tA667A5482962318700B565EE /* KeyFramesTrackControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4482962318600B565EE /* KeyFramesTrackControl.cpp */; };\n\t\tA667A5492962318700B565EE /* AnimationTrackWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4492962318600B565EE /* AnimationTrackWrapper.h */; };\n\t\tA667A54A2962318700B565EE /* MapKeyFramesTrackControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A44A2962318600B565EE /* MapKeyFramesTrackControl.cpp */; };\n\t\tA667A54B2962318700B565EE /* AnimationKeyDragHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A44B2962318600B565EE /* AnimationKeyDragHandle.cpp */; };\n\t\tA667A54C2962318700B565EE /* Vec2KeyFramesTrackControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A44C2962318600B565EE /* Vec2KeyFramesTrackControl.cpp */; };\n\t\tA667A54D2962318700B565EE /* ITrackControl.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A44D2962318600B565EE /* ITrackControl.h */; };\n\t\tA667A54E2962318700B565EE /* ITrackControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A44E2962318600B565EE /* ITrackControl.cpp */; };\n\t\tA667A54F2962318700B565EE /* KeyFramesTrackControl.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A44F2962318600B565EE /* KeyFramesTrackControl.h */; };\n\t\tA667A5502962318700B565EE /* Vec2KeyFramesTrackControl.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4502962318600B565EE /* Vec2KeyFramesTrackControl.h */; };\n\t\tA667A5512962318700B565EE /* AnimationKeyDragHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4512962318600B565EE /* AnimationKeyDragHandle.h */; };\n\t\tA667A5522962318700B565EE /* AnimationWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A667A4522962318600B565EE /* AnimationWindow.cpp */; };\n\t\tA667A5532962318700B565EE /* Timeline.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4532962318600B565EE /* Timeline.h */; };\n\t\tA667A5542962318700B565EE /* AnimationKeysActions.h in Headers */ = {isa = PBXBuildFile; fileRef = A667A4542962318600B565EE /* AnimationKeysActions.h */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\tA667A3392962318600B565EE /* stdafx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stdafx.h; sourceTree = \"<group>\"; };\n\t\tA667A33B2962318600B565EE /* EditorApplication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditorApplication.cpp; sourceTree = \"<group>\"; };\n\t\tA667A33D2962318600B565EE /* CurvePreview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurvePreview.h; sourceTree = \"<group>\"; };\n\t\tA667A33E2962318600B565EE /* ImageSlicesEditorWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageSlicesEditorWidget.cpp; sourceTree = \"<group>\"; };\n\t\tA667A33F2962318600B565EE /* ScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollView.h; sourceTree = \"<group>\"; };\n\t\tA667A3402962318600B565EE /* FrameScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameScrollView.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3412962318600B565EE /* ImageSlicesEditorWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageSlicesEditorWidget.h; sourceTree = \"<group>\"; };\n\t\tA667A3422962318600B565EE /* FrameScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameScrollView.h; sourceTree = \"<group>\"; };\n\t\tA667A3442962318600B565EE /* CurvesEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CurvesEditor.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3452962318600B565EE /* CurvesEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurvesEditor.h; sourceTree = \"<group>\"; };\n\t\tA667A3462962318600B565EE /* CurveActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CurveActions.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3472962318600B565EE /* CurveActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurveActions.h; sourceTree = \"<group>\"; };\n\t\tA667A3492962318600B565EE /* SplineEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SplineEditor.h; sourceTree = \"<group>\"; };\n\t\tA667A34A2962318600B565EE /* SplineEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SplineEditor.cpp; sourceTree = \"<group>\"; };\n\t\tA667A34B2962318600B565EE /* SpoilerWithHead.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpoilerWithHead.cpp; sourceTree = \"<group>\"; };\n\t\tA667A34C2962318600B565EE /* SpoilerWithHead.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpoilerWithHead.h; sourceTree = \"<group>\"; };\n\t\tA667A34D2962318600B565EE /* CurvePreview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CurvePreview.cpp; sourceTree = \"<group>\"; };\n\t\tA667A34E2962318600B565EE /* ScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollView.cpp; sourceTree = \"<group>\"; };\n\t\tA667A34F2962318600B565EE /* UIRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIRoot.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3512962318600B565EE /* DockableWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DockableWindow.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3522962318600B565EE /* WindowsLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowsLayout.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3532962318600B565EE /* WindowsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowsManager.h; sourceTree = \"<group>\"; };\n\t\tA667A3542962318600B565EE /* WindowsManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowsManager.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3552962318600B565EE /* IEditorWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IEditorWindow.h; sourceTree = \"<group>\"; };\n\t\tA667A3562962318600B565EE /* DockWindowPlace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DockWindowPlace.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3572962318600B565EE /* WindowsLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowsLayout.h; sourceTree = \"<group>\"; };\n\t\tA667A3582962318600B565EE /* DockableWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DockableWindow.h; sourceTree = \"<group>\"; };\n\t\tA667A3592962318600B565EE /* IEditorWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IEditorWindow.cpp; sourceTree = \"<group>\"; };\n\t\tA667A35A2962318600B565EE /* DockWindowPlace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DockWindowPlace.h; sourceTree = \"<group>\"; };\n\t\tA667A35C2962318600B565EE /* EditorUIStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorUIStyle.h; sourceTree = \"<group>\"; };\n\t\tA667A35D2962318600B565EE /* BasicUIStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicUIStyle.cpp; sourceTree = \"<group>\"; };\n\t\tA667A35E2962318600B565EE /* EditorUIStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditorUIStyle.cpp; sourceTree = \"<group>\"; };\n\t\tA667A35F2962318600B565EE /* BasicUIStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BasicUIStyle.h; sourceTree = \"<group>\"; };\n\t\tA667A3602962318600B565EE /* EditorConfig.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditorConfig.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3622962318600B565EE /* ScaleTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScaleTool.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3632962318600B565EE /* SelectionTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectionTool.h; sourceTree = \"<group>\"; };\n\t\tA667A3642962318600B565EE /* MoveTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MoveTool.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3652962318600B565EE /* CustomFrameTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomFrameTool.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3662962318600B565EE /* RotateTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RotateTool.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3672962318600B565EE /* ScaleTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScaleTool.h; sourceTree = \"<group>\"; };\n\t\tA667A3682962318600B565EE /* FrameTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameTool.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3692962318600B565EE /* FrameTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameTool.h; sourceTree = \"<group>\"; };\n\t\tA667A36A2962318600B565EE /* RotateTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RotateTool.h; sourceTree = \"<group>\"; };\n\t\tA667A36B2962318600B565EE /* CustomFrameTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomFrameTool.h; sourceTree = \"<group>\"; };\n\t\tA667A36C2962318600B565EE /* MoveTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoveTool.h; sourceTree = \"<group>\"; };\n\t\tA667A36D2962318600B565EE /* SplineTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SplineTool.h; sourceTree = \"<group>\"; };\n\t\tA667A36E2962318600B565EE /* IEditorTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IEditorTool.cpp; sourceTree = \"<group>\"; };\n\t\tA667A36F2962318600B565EE /* SplineTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SplineTool.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3702962318600B565EE /* IEditorTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IEditorTool.h; sourceTree = \"<group>\"; };\n\t\tA667A3712962318600B565EE /* SelectionTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionTool.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3722962318600B565EE /* MenuPanel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MenuPanel.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3732962318600B565EE /* EditorApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorApplication.h; sourceTree = \"<group>\"; };\n\t\tA667A3742962318600B565EE /* UIRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRoot.h; sourceTree = \"<group>\"; };\n\t\tA667A3762962318600B565EE /* IPropertyField.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IPropertyField.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3782962318600B565EE /* ComponentProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3792962318600B565EE /* ActorProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActorProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A37A2962318600B565EE /* Vector2IntProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Vector2IntProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A37B2962318600B565EE /* CurveProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CurveProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A37C2962318600B565EE /* VectorProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VectorProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A37D2962318600B565EE /* ScriptValueProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptValueProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A37E2962318600B565EE /* WStringProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WStringProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A37F2962318600B565EE /* CurveProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurveProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3802962318600B565EE /* FloatProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3812962318600B565EE /* IntegerProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntegerProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3822962318600B565EE /* BorderIntProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BorderIntProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3832962318600B565EE /* ScriptValueProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptValueProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3842962318600B565EE /* EnumProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3852962318600B565EE /* TagProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3862962318600B565EE /* WStringProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WStringProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3872962318600B565EE /* RectangleFloatProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RectangleFloatProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3882962318600B565EE /* ObjectProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3892962318600B565EE /* EnumProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EnumProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A38A2962318600B565EE /* StringProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A38B2962318600B565EE /* ObjectProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A38C2962318600B565EE /* BorderFloatProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BorderFloatProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A38D2962318600B565EE /* BooleanProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BooleanProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A38E2962318600B565EE /* LayerProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A38F2962318600B565EE /* RectangleIntProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RectangleIntProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3902962318600B565EE /* LayerProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayerProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3912962318600B565EE /* ComponentProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComponentProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3922962318600B565EE /* BorderIntProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BorderIntProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3932962318600B565EE /* Vector2FloatProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Vector2FloatProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3942962318600B565EE /* EnumMaskProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumMaskProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3952962318600B565EE /* ObjectPtrProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectPtrProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3962962318600B565EE /* ColorProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3972962318600B565EE /* SceneLayersListProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SceneLayersListProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3982962318600B565EE /* AssetProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AssetProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3992962318600B565EE /* RectangleIntProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RectangleIntProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A39A2962318600B565EE /* ObjectPtrProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectPtrProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A39B2962318600B565EE /* StringProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A39C2962318600B565EE /* FloatProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FloatProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A39D2962318600B565EE /* SceneLayersListProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneLayersListProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A39E2962318600B565EE /* RectangleFloatProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RectangleFloatProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A39F2962318600B565EE /* Vector2IntProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector2IntProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3A02962318600B565EE /* ColorProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ColorProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3A12962318600B565EE /* TagProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3A22962318600B565EE /* ActorProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActorProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3A32962318600B565EE /* Vector2FloatProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector2FloatProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3A42962318600B565EE /* AssetProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3A52962318600B565EE /* BorderFloatProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BorderFloatProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3A62962318600B565EE /* VectorProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VectorProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3A72962318600B565EE /* IntegerProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntegerProperty.h; sourceTree = \"<group>\"; };\n\t\tA667A3A82962318600B565EE /* BooleanProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BooleanProperty.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3AA2962318600B565EE /* CameraActorViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CameraActorViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3AB2962318600B565EE /* SpriteViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpriteViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3AC2962318600B565EE /* CameraActorViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CameraActorViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3AD2962318600B565EE /* TextViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3AE2962318600B565EE /* DefaultObjectPropertiesViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultObjectPropertiesViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3B02962318600B565EE /* AnimationStateViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationStateViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3B12962318600B565EE /* MeshComponentViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MeshComponentViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3B22962318600B565EE /* MeshComponentViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MeshComponentViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3B32962318600B565EE /* AnimationStateViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationStateViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3B42962318600B565EE /* AnimationViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3B52962318600B565EE /* DefaultObjectPropertiesViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultObjectPropertiesViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3B62962318600B565EE /* AnimationViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3B82962318600B565EE /* ImageAssetViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageAssetViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3B92962318600B565EE /* ImageAssetViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageAssetViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3BA2962318600B565EE /* TextViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3BB2962318600B565EE /* SpriteViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3BC2962318600B565EE /* ObjectViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3BD2962318600B565EE /* IObjectPropertiesViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IObjectPropertiesViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A3BE2962318600B565EE /* ObjectViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3BF2962318600B565EE /* Properties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Properties.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3C02962318600B565EE /* IPropertyField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IPropertyField.h; sourceTree = \"<group>\"; };\n\t\tA667A3C12962318600B565EE /* PropertiesContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PropertiesContext.h; sourceTree = \"<group>\"; };\n\t\tA667A3C22962318600B565EE /* IObjectPropertiesViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IObjectPropertiesViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3C32962318600B565EE /* PropertiesContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertiesContext.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3C42962318600B565EE /* Properties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Properties.h; sourceTree = \"<group>\"; };\n\t\tA667A3C62962318600B565EE /* ActionsList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActionsList.h; sourceTree = \"<group>\"; };\n\t\tA667A3C72962318600B565EE /* Select.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Select.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3C82962318600B565EE /* Reparent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Reparent.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3C92962318600B565EE /* PropertyChange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertyChange.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3CA2962318600B565EE /* Reparent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reparent.h; sourceTree = \"<group>\"; };\n\t\tA667A3CB2962318600B565EE /* Enable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Enable.h; sourceTree = \"<group>\"; };\n\t\tA667A3CC2962318600B565EE /* Lock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Lock.h; sourceTree = \"<group>\"; };\n\t\tA667A3CD2962318600B565EE /* Delete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Delete.h; sourceTree = \"<group>\"; };\n\t\tA667A3CE2962318600B565EE /* Delete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Delete.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3CF2962318600B565EE /* Transform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Transform.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3D02962318600B565EE /* ActionsList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActionsList.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3D12962318600B565EE /* Create.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Create.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3D22962318600B565EE /* Transform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Transform.h; sourceTree = \"<group>\"; };\n\t\tA667A3D32962318600B565EE /* PropertyChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PropertyChange.h; sourceTree = \"<group>\"; };\n\t\tA667A3D42962318600B565EE /* IAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IAction.h; sourceTree = \"<group>\"; };\n\t\tA667A3D52962318600B565EE /* Enable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Enable.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3D62962318600B565EE /* Lock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Lock.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3D72962318600B565EE /* Create.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Create.h; sourceTree = \"<group>\"; };\n\t\tA667A3D82962318600B565EE /* IAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IAction.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3D92962318600B565EE /* Select.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Select.h; sourceTree = \"<group>\"; };\n\t\tA667A3DB2962318600B565EE /* CurveEditorDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CurveEditorDlg.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3DC2962318600B565EE /* EditNameDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditNameDlg.h; sourceTree = \"<group>\"; };\n\t\tA667A3DD2962318600B565EE /* KeyEditDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyEditDlg.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3DE2962318600B565EE /* EditNameDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditNameDlg.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3E02962318600B565EE /* OpenSaveDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenSaveDialog.h; sourceTree = \"<group>\"; };\n\t\tA667A3E22962318600B565EE /* OpenSaveDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenSaveDialog.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3E52962318600B565EE /* OpenSaveDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenSaveDialog.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3E62962318600B565EE /* KeyEditDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyEditDlg.h; sourceTree = \"<group>\"; };\n\t\tA667A3E72962318600B565EE /* ColorPickerDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorPickerDlg.h; sourceTree = \"<group>\"; };\n\t\tA667A3E82962318600B565EE /* ColorPickerDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ColorPickerDlg.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3E92962318600B565EE /* CurveEditorDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurveEditorDlg.h; sourceTree = \"<group>\"; };\n\t\tA667A3EA2962318600B565EE /* EditorConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorConfig.h; sourceTree = \"<group>\"; };\n\t\tA667A3EB2962318600B565EE /* MenuPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuPanel.h; sourceTree = \"<group>\"; };\n\t\tA667A3EC2962318600B565EE /* ToolsPanel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ToolsPanel.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3ED2962318600B565EE /* ToolsPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToolsPanel.h; sourceTree = \"<group>\"; };\n\t\tA667A3EF2962318600B565EE /* SceneTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneTree.h; sourceTree = \"<group>\"; };\n\t\tA667A3F02962318600B565EE /* TreeWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TreeWindow.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3F12962318600B565EE /* TreeWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TreeWindow.h; sourceTree = \"<group>\"; };\n\t\tA667A3F22962318600B565EE /* SceneTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SceneTree.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3F42962318600B565EE /* FoldersTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FoldersTree.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3F52962318600B565EE /* AssetsWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AssetsWindow.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3F62962318600B565EE /* AssetsIconsScroll.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AssetsIconsScroll.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3F72962318600B565EE /* AssetsWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsWindow.h; sourceTree = \"<group>\"; };\n\t\tA667A3F82962318600B565EE /* AssetIcon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AssetIcon.cpp; sourceTree = \"<group>\"; };\n\t\tA667A3F92962318600B565EE /* AssetsIconsScroll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsIconsScroll.h; sourceTree = \"<group>\"; };\n\t\tA667A3FA2962318600B565EE /* FoldersTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoldersTree.h; sourceTree = \"<group>\"; };\n\t\tA667A3FB2962318600B565EE /* AssetIcon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetIcon.h; sourceTree = \"<group>\"; };\n\t\tA667A3FD2962318600B565EE /* SceneEditScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneEditScreen.h; sourceTree = \"<group>\"; };\n\t\tA667A3FE2962318600B565EE /* SceneDragHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneDragHandle.h; sourceTree = \"<group>\"; };\n\t\tA667A3FF2962318600B565EE /* SceneEditScreen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SceneEditScreen.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4002962318600B565EE /* SceneEditorLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneEditorLayer.h; sourceTree = \"<group>\"; };\n\t\tA667A4012962318600B565EE /* SceneWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneWindow.h; sourceTree = \"<group>\"; };\n\t\tA667A4022962318600B565EE /* SceneWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SceneWindow.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4032962318600B565EE /* LayersPopup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayersPopup.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4042962318600B565EE /* SceneDragHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SceneDragHandle.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4052962318600B565EE /* LayersPopup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayersPopup.h; sourceTree = \"<group>\"; };\n\t\tA667A4062962318600B565EE /* stdafx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = stdafx.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4082962318600B565EE /* PropertiesWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PropertiesWindow.h; sourceTree = \"<group>\"; };\n\t\tA667A4092962318600B565EE /* AssetPropertiesViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetPropertiesViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A40A2962318600B565EE /* AssetPropertiesViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AssetPropertiesViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A40C2962318600B565EE /* DefaultActorComponentViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultActorComponentViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A40D2962318600B565EE /* DefaultActorTransformViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultActorTransformViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A40E2962318600B565EE /* IActorPropertiesViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IActorPropertiesViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A40F2962318600B565EE /* ActorViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActorViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4102962318600B565EE /* IActorTransformViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IActorTransformViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A4112962318600B565EE /* AddComponentPanel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AddComponentPanel.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4122962318600B565EE /* IActorComponentViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IActorComponentViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4132962318600B565EE /* DefaultActorHeaderViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultActorHeaderViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A4142962318600B565EE /* IActorPropertiesViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IActorPropertiesViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4152962318600B565EE /* IActorHeaderViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IActorHeaderViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4162962318600B565EE /* ActorViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActorViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A4172962318600B565EE /* DefaultActorHeaderViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultActorHeaderViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4182962318600B565EE /* IActorTransformViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IActorTransformViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4192962318600B565EE /* DefaultActorComponentViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultActorComponentViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A41A2962318600B565EE /* DefaultActorPropertiesViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultActorPropertiesViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A41B2962318600B565EE /* IActorHeaderViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IActorHeaderViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A41C2962318600B565EE /* IActorComponentViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IActorComponentViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A41D2962318600B565EE /* DefaultActorPropertiesViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultActorPropertiesViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A41E2962318600B565EE /* AddComponentPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddComponentPanel.h; sourceTree = \"<group>\"; };\n\t\tA667A41F2962318600B565EE /* DefaultActorTransformViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultActorTransformViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4202962318600B565EE /* IPropertiesViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IPropertiesViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A4212962318600B565EE /* IPropertiesViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IPropertiesViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4222962318600B565EE /* DefaultPropertiesViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultPropertiesViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A4232962318600B565EE /* DefaultPropertiesViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultPropertiesViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4242962318600B565EE /* PropertiesWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertiesWindow.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4262962318600B565EE /* DefaultWidgetLayerPropertiesViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultWidgetLayerPropertiesViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A4272962318600B565EE /* IWidgetLayerLayoutViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IWidgetLayerLayoutViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4282962318600B565EE /* IWidgetLayerHeadViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IWidgetLayerHeadViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A4292962318600B565EE /* DefaultWidgetLayerLayoutViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultWidgetLayerLayoutViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A42A2962318600B565EE /* WidgetLayerViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WidgetLayerViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A42B2962318600B565EE /* IWidgetLayerLayoutViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IWidgetLayerLayoutViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A42C2962318600B565EE /* IWidgetLayerPropertiesViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IWidgetLayerPropertiesViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A42D2962318600B565EE /* WidgetLayerViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WidgetLayerViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A42E2962318600B565EE /* IWidgetLayerHeadViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IWidgetLayerHeadViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A42F2962318600B565EE /* IWidgetLayerPropertiesViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IWidgetLayerPropertiesViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A4302962318600B565EE /* DefaultWidgetLayerLayoutViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultWidgetLayerLayoutViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4312962318600B565EE /* DefaultWidgetLayerHeadViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultWidgetLayerHeadViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4322962318600B565EE /* DefaultWidgetLayerHeadViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultWidgetLayerHeadViewer.h; sourceTree = \"<group>\"; };\n\t\tA667A4332962318600B565EE /* DefaultWidgetLayerPropertiesViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultWidgetLayerPropertiesViewer.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4352962318600B565EE /* GameWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameWindow.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4362962318600B565EE /* GameWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameWindow.h; sourceTree = \"<group>\"; };\n\t\tA667A4382962318600B565EE /* LogWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogWindow.h; sourceTree = \"<group>\"; };\n\t\tA667A4392962318600B565EE /* LogWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogWindow.cpp; sourceTree = \"<group>\"; };\n\t\tA667A43B2962318600B565EE /* KeyHandlesSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyHandlesSheet.h; sourceTree = \"<group>\"; };\n\t\tA667A43C2962318600B565EE /* AnimationKeysActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationKeysActions.cpp; sourceTree = \"<group>\"; };\n\t\tA667A43D2962318600B565EE /* KeyHandlesSheet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyHandlesSheet.cpp; sourceTree = \"<group>\"; };\n\t\tA667A43E2962318600B565EE /* Tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tree.h; sourceTree = \"<group>\"; };\n\t\tA667A43F2962318600B565EE /* CurvesSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurvesSheet.h; sourceTree = \"<group>\"; };\n\t\tA667A4402962318600B565EE /* PropertiesListDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertiesListDlg.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4412962318600B565EE /* PropertiesListDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PropertiesListDlg.h; sourceTree = \"<group>\"; };\n\t\tA667A4422962318600B565EE /* Timeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Timeline.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4432962318600B565EE /* Tree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Tree.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4442962318600B565EE /* AnimationWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationWindow.h; sourceTree = \"<group>\"; };\n\t\tA667A4452962318600B565EE /* CurvesSheet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CurvesSheet.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4472962318600B565EE /* MapKeyFramesTrackControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapKeyFramesTrackControl.h; sourceTree = \"<group>\"; };\n\t\tA667A4482962318600B565EE /* KeyFramesTrackControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyFramesTrackControl.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4492962318600B565EE /* AnimationTrackWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationTrackWrapper.h; sourceTree = \"<group>\"; };\n\t\tA667A44A2962318600B565EE /* MapKeyFramesTrackControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MapKeyFramesTrackControl.cpp; sourceTree = \"<group>\"; };\n\t\tA667A44B2962318600B565EE /* AnimationKeyDragHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationKeyDragHandle.cpp; sourceTree = \"<group>\"; };\n\t\tA667A44C2962318600B565EE /* Vec2KeyFramesTrackControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Vec2KeyFramesTrackControl.cpp; sourceTree = \"<group>\"; };\n\t\tA667A44D2962318600B565EE /* ITrackControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ITrackControl.h; sourceTree = \"<group>\"; };\n\t\tA667A44E2962318600B565EE /* ITrackControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ITrackControl.cpp; sourceTree = \"<group>\"; };\n\t\tA667A44F2962318600B565EE /* KeyFramesTrackControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyFramesTrackControl.h; sourceTree = \"<group>\"; };\n\t\tA667A4502962318600B565EE /* Vec2KeyFramesTrackControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vec2KeyFramesTrackControl.h; sourceTree = \"<group>\"; };\n\t\tA667A4512962318600B565EE /* AnimationKeyDragHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationKeyDragHandle.h; sourceTree = \"<group>\"; };\n\t\tA667A4522962318600B565EE /* AnimationWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationWindow.cpp; sourceTree = \"<group>\"; };\n\t\tA667A4532962318600B565EE /* Timeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timeline.h; sourceTree = \"<group>\"; };\n\t\tA667A4542962318600B565EE /* AnimationKeysActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationKeysActions.h; sourceTree = \"<group>\"; };\n\t\tA6CA52A626DD1D9400EAD895 /* libEditor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libEditor.a; sourceTree = BUILT_PRODUCTS_DIR; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\tA6CA52A426DD1D9400EAD895 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\tA667A3382962318600B565EE /* o2Editor */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3392962318600B565EE /* stdafx.h */,\n\t\t\t\tA667A33A2962318600B565EE /* Core */,\n\t\t\t\tA667A3EE2962318600B565EE /* TreeWindow */,\n\t\t\t\tA667A3F32962318600B565EE /* AssetsWindow */,\n\t\t\t\tA667A3FC2962318600B565EE /* SceneWindow */,\n\t\t\t\tA667A4062962318600B565EE /* stdafx.cpp */,\n\t\t\t\tA667A4072962318600B565EE /* PropertiesWindow */,\n\t\t\t\tA667A4342962318600B565EE /* GameWindow */,\n\t\t\t\tA667A4372962318600B565EE /* LogWindow */,\n\t\t\t\tA667A43A2962318600B565EE /* AnimationWindow */,\n\t\t\t);\n\t\t\tname = o2Editor;\n\t\t\tpath = ../../Sources/o2Editor;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A33A2962318600B565EE /* Core */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A33B2962318600B565EE /* EditorApplication.cpp */,\n\t\t\t\tA667A33C2962318600B565EE /* UI */,\n\t\t\t\tA667A34F2962318600B565EE /* UIRoot.cpp */,\n\t\t\t\tA667A3502962318600B565EE /* WindowsSystem */,\n\t\t\t\tA667A35B2962318600B565EE /* UIStyle */,\n\t\t\t\tA667A3602962318600B565EE /* EditorConfig.cpp */,\n\t\t\t\tA667A3612962318600B565EE /* Tools */,\n\t\t\t\tA667A3722962318600B565EE /* MenuPanel.cpp */,\n\t\t\t\tA667A3732962318600B565EE /* EditorApplication.h */,\n\t\t\t\tA667A3742962318600B565EE /* UIRoot.h */,\n\t\t\t\tA667A3752962318600B565EE /* Properties */,\n\t\t\t\tA667A3C52962318600B565EE /* Actions */,\n\t\t\t\tA667A3DA2962318600B565EE /* Dialogs */,\n\t\t\t\tA667A3EA2962318600B565EE /* EditorConfig.h */,\n\t\t\t\tA667A3EB2962318600B565EE /* MenuPanel.h */,\n\t\t\t\tA667A3EC2962318600B565EE /* ToolsPanel.cpp */,\n\t\t\t\tA667A3ED2962318600B565EE /* ToolsPanel.h */,\n\t\t\t);\n\t\t\tpath = Core;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A33C2962318600B565EE /* UI */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A33D2962318600B565EE /* CurvePreview.h */,\n\t\t\t\tA667A33E2962318600B565EE /* ImageSlicesEditorWidget.cpp */,\n\t\t\t\tA667A33F2962318600B565EE /* ScrollView.h */,\n\t\t\t\tA667A3402962318600B565EE /* FrameScrollView.cpp */,\n\t\t\t\tA667A3412962318600B565EE /* ImageSlicesEditorWidget.h */,\n\t\t\t\tA667A3422962318600B565EE /* FrameScrollView.h */,\n\t\t\t\tA667A3432962318600B565EE /* CurveEditor */,\n\t\t\t\tA667A3482962318600B565EE /* SplineEditor */,\n\t\t\t\tA667A34B2962318600B565EE /* SpoilerWithHead.cpp */,\n\t\t\t\tA667A34C2962318600B565EE /* SpoilerWithHead.h */,\n\t\t\t\tA667A34D2962318600B565EE /* CurvePreview.cpp */,\n\t\t\t\tA667A34E2962318600B565EE /* ScrollView.cpp */,\n\t\t\t);\n\t\t\tpath = UI;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3432962318600B565EE /* CurveEditor */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3442962318600B565EE /* CurvesEditor.cpp */,\n\t\t\t\tA667A3452962318600B565EE /* CurvesEditor.h */,\n\t\t\t\tA667A3462962318600B565EE /* CurveActions.cpp */,\n\t\t\t\tA667A3472962318600B565EE /* CurveActions.h */,\n\t\t\t);\n\t\t\tpath = CurveEditor;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3482962318600B565EE /* SplineEditor */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3492962318600B565EE /* SplineEditor.h */,\n\t\t\t\tA667A34A2962318600B565EE /* SplineEditor.cpp */,\n\t\t\t);\n\t\t\tpath = SplineEditor;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3502962318600B565EE /* WindowsSystem */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3512962318600B565EE /* DockableWindow.cpp */,\n\t\t\t\tA667A3522962318600B565EE /* WindowsLayout.cpp */,\n\t\t\t\tA667A3532962318600B565EE /* WindowsManager.h */,\n\t\t\t\tA667A3542962318600B565EE /* WindowsManager.cpp */,\n\t\t\t\tA667A3552962318600B565EE /* IEditorWindow.h */,\n\t\t\t\tA667A3562962318600B565EE /* DockWindowPlace.cpp */,\n\t\t\t\tA667A3572962318600B565EE /* WindowsLayout.h */,\n\t\t\t\tA667A3582962318600B565EE /* DockableWindow.h */,\n\t\t\t\tA667A3592962318600B565EE /* IEditorWindow.cpp */,\n\t\t\t\tA667A35A2962318600B565EE /* DockWindowPlace.h */,\n\t\t\t);\n\t\t\tpath = WindowsSystem;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A35B2962318600B565EE /* UIStyle */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A35C2962318600B565EE /* EditorUIStyle.h */,\n\t\t\t\tA667A35D2962318600B565EE /* BasicUIStyle.cpp */,\n\t\t\t\tA667A35E2962318600B565EE /* EditorUIStyle.cpp */,\n\t\t\t\tA667A35F2962318600B565EE /* BasicUIStyle.h */,\n\t\t\t);\n\t\t\tpath = UIStyle;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3612962318600B565EE /* Tools */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3622962318600B565EE /* ScaleTool.cpp */,\n\t\t\t\tA667A3632962318600B565EE /* SelectionTool.h */,\n\t\t\t\tA667A3642962318600B565EE /* MoveTool.cpp */,\n\t\t\t\tA667A3652962318600B565EE /* CustomFrameTool.cpp */,\n\t\t\t\tA667A3662962318600B565EE /* RotateTool.cpp */,\n\t\t\t\tA667A3672962318600B565EE /* ScaleTool.h */,\n\t\t\t\tA667A3682962318600B565EE /* FrameTool.cpp */,\n\t\t\t\tA667A3692962318600B565EE /* FrameTool.h */,\n\t\t\t\tA667A36A2962318600B565EE /* RotateTool.h */,\n\t\t\t\tA667A36B2962318600B565EE /* CustomFrameTool.h */,\n\t\t\t\tA667A36C2962318600B565EE /* MoveTool.h */,\n\t\t\t\tA667A36D2962318600B565EE /* SplineTool.h */,\n\t\t\t\tA667A36E2962318600B565EE /* IEditorTool.cpp */,\n\t\t\t\tA667A36F2962318600B565EE /* SplineTool.cpp */,\n\t\t\t\tA667A3702962318600B565EE /* IEditorTool.h */,\n\t\t\t\tA667A3712962318600B565EE /* SelectionTool.cpp */,\n\t\t\t);\n\t\t\tpath = Tools;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3752962318600B565EE /* Properties */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3762962318600B565EE /* IPropertyField.cpp */,\n\t\t\t\tA667A3772962318600B565EE /* Basic */,\n\t\t\t\tA667A3A92962318600B565EE /* Objects */,\n\t\t\t\tA667A3BC2962318600B565EE /* ObjectViewer.h */,\n\t\t\t\tA667A3BD2962318600B565EE /* IObjectPropertiesViewer.h */,\n\t\t\t\tA667A3BE2962318600B565EE /* ObjectViewer.cpp */,\n\t\t\t\tA667A3BF2962318600B565EE /* Properties.cpp */,\n\t\t\t\tA667A3C02962318600B565EE /* IPropertyField.h */,\n\t\t\t\tA667A3C12962318600B565EE /* PropertiesContext.h */,\n\t\t\t\tA667A3C22962318600B565EE /* IObjectPropertiesViewer.cpp */,\n\t\t\t\tA667A3C32962318600B565EE /* PropertiesContext.cpp */,\n\t\t\t\tA667A3C42962318600B565EE /* Properties.h */,\n\t\t\t);\n\t\t\tpath = Properties;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3772962318600B565EE /* Basic */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3782962318600B565EE /* ComponentProperty.cpp */,\n\t\t\t\tA667A3792962318600B565EE /* ActorProperty.cpp */,\n\t\t\t\tA667A37A2962318600B565EE /* Vector2IntProperty.cpp */,\n\t\t\t\tA667A37B2962318600B565EE /* CurveProperty.cpp */,\n\t\t\t\tA667A37C2962318600B565EE /* VectorProperty.h */,\n\t\t\t\tA667A37D2962318600B565EE /* ScriptValueProperty.cpp */,\n\t\t\t\tA667A37E2962318600B565EE /* WStringProperty.h */,\n\t\t\t\tA667A37F2962318600B565EE /* CurveProperty.h */,\n\t\t\t\tA667A3802962318600B565EE /* FloatProperty.h */,\n\t\t\t\tA667A3812962318600B565EE /* IntegerProperty.cpp */,\n\t\t\t\tA667A3822962318600B565EE /* BorderIntProperty.h */,\n\t\t\t\tA667A3832962318600B565EE /* ScriptValueProperty.h */,\n\t\t\t\tA667A3842962318600B565EE /* EnumProperty.h */,\n\t\t\t\tA667A3852962318600B565EE /* TagProperty.h */,\n\t\t\t\tA667A3862962318600B565EE /* WStringProperty.cpp */,\n\t\t\t\tA667A3872962318600B565EE /* RectangleFloatProperty.h */,\n\t\t\t\tA667A3882962318600B565EE /* ObjectProperty.cpp */,\n\t\t\t\tA667A3892962318600B565EE /* EnumProperty.cpp */,\n\t\t\t\tA667A38A2962318600B565EE /* StringProperty.cpp */,\n\t\t\t\tA667A38B2962318600B565EE /* ObjectProperty.h */,\n\t\t\t\tA667A38C2962318600B565EE /* BorderFloatProperty.h */,\n\t\t\t\tA667A38D2962318600B565EE /* BooleanProperty.h */,\n\t\t\t\tA667A38E2962318600B565EE /* LayerProperty.h */,\n\t\t\t\tA667A38F2962318600B565EE /* RectangleIntProperty.h */,\n\t\t\t\tA667A3902962318600B565EE /* LayerProperty.cpp */,\n\t\t\t\tA667A3912962318600B565EE /* ComponentProperty.h */,\n\t\t\t\tA667A3922962318600B565EE /* BorderIntProperty.cpp */,\n\t\t\t\tA667A3932962318600B565EE /* Vector2FloatProperty.cpp */,\n\t\t\t\tA667A3942962318600B565EE /* EnumMaskProperty.h */,\n\t\t\t\tA667A3952962318600B565EE /* ObjectPtrProperty.cpp */,\n\t\t\t\tA667A3962962318600B565EE /* ColorProperty.h */,\n\t\t\t\tA667A3972962318600B565EE /* SceneLayersListProperty.cpp */,\n\t\t\t\tA667A3982962318600B565EE /* AssetProperty.cpp */,\n\t\t\t\tA667A3992962318600B565EE /* RectangleIntProperty.cpp */,\n\t\t\t\tA667A39A2962318600B565EE /* ObjectPtrProperty.h */,\n\t\t\t\tA667A39B2962318600B565EE /* StringProperty.h */,\n\t\t\t\tA667A39C2962318600B565EE /* FloatProperty.cpp */,\n\t\t\t\tA667A39D2962318600B565EE /* SceneLayersListProperty.h */,\n\t\t\t\tA667A39E2962318600B565EE /* RectangleFloatProperty.cpp */,\n\t\t\t\tA667A39F2962318600B565EE /* Vector2IntProperty.h */,\n\t\t\t\tA667A3A02962318600B565EE /* ColorProperty.cpp */,\n\t\t\t\tA667A3A12962318600B565EE /* TagProperty.cpp */,\n\t\t\t\tA667A3A22962318600B565EE /* ActorProperty.h */,\n\t\t\t\tA667A3A32962318600B565EE /* Vector2FloatProperty.h */,\n\t\t\t\tA667A3A42962318600B565EE /* AssetProperty.h */,\n\t\t\t\tA667A3A52962318600B565EE /* BorderFloatProperty.cpp */,\n\t\t\t\tA667A3A62962318600B565EE /* VectorProperty.cpp */,\n\t\t\t\tA667A3A72962318600B565EE /* IntegerProperty.h */,\n\t\t\t\tA667A3A82962318600B565EE /* BooleanProperty.cpp */,\n\t\t\t);\n\t\t\tpath = Basic;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3A92962318600B565EE /* Objects */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3AA2962318600B565EE /* CameraActorViewer.cpp */,\n\t\t\t\tA667A3AB2962318600B565EE /* SpriteViewer.cpp */,\n\t\t\t\tA667A3AC2962318600B565EE /* CameraActorViewer.h */,\n\t\t\t\tA667A3AD2962318600B565EE /* TextViewer.cpp */,\n\t\t\t\tA667A3AE2962318600B565EE /* DefaultObjectPropertiesViewer.cpp */,\n\t\t\t\tA667A3AF2962318600B565EE /* Components */,\n\t\t\t\tA667A3B42962318600B565EE /* AnimationViewer.cpp */,\n\t\t\t\tA667A3B52962318600B565EE /* DefaultObjectPropertiesViewer.h */,\n\t\t\t\tA667A3B62962318600B565EE /* AnimationViewer.h */,\n\t\t\t\tA667A3B72962318600B565EE /* Assets */,\n\t\t\t\tA667A3BA2962318600B565EE /* TextViewer.h */,\n\t\t\t\tA667A3BB2962318600B565EE /* SpriteViewer.h */,\n\t\t\t);\n\t\t\tpath = Objects;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3AF2962318600B565EE /* Components */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3B02962318600B565EE /* AnimationStateViewer.h */,\n\t\t\t\tA667A3B12962318600B565EE /* MeshComponentViewer.h */,\n\t\t\t\tA667A3B22962318600B565EE /* MeshComponentViewer.cpp */,\n\t\t\t\tA667A3B32962318600B565EE /* AnimationStateViewer.cpp */,\n\t\t\t);\n\t\t\tpath = Components;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3B72962318600B565EE /* Assets */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3B82962318600B565EE /* ImageAssetViewer.h */,\n\t\t\t\tA667A3B92962318600B565EE /* ImageAssetViewer.cpp */,\n\t\t\t);\n\t\t\tpath = Assets;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3C52962318600B565EE /* Actions */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3C62962318600B565EE /* ActionsList.h */,\n\t\t\t\tA667A3C72962318600B565EE /* Select.cpp */,\n\t\t\t\tA667A3C82962318600B565EE /* Reparent.cpp */,\n\t\t\t\tA667A3C92962318600B565EE /* PropertyChange.cpp */,\n\t\t\t\tA667A3CA2962318600B565EE /* Reparent.h */,\n\t\t\t\tA667A3CB2962318600B565EE /* Enable.h */,\n\t\t\t\tA667A3CC2962318600B565EE /* Lock.h */,\n\t\t\t\tA667A3CD2962318600B565EE /* Delete.h */,\n\t\t\t\tA667A3CE2962318600B565EE /* Delete.cpp */,\n\t\t\t\tA667A3CF2962318600B565EE /* Transform.cpp */,\n\t\t\t\tA667A3D02962318600B565EE /* ActionsList.cpp */,\n\t\t\t\tA667A3D12962318600B565EE /* Create.cpp */,\n\t\t\t\tA667A3D22962318600B565EE /* Transform.h */,\n\t\t\t\tA667A3D32962318600B565EE /* PropertyChange.h */,\n\t\t\t\tA667A3D42962318600B565EE /* IAction.h */,\n\t\t\t\tA667A3D52962318600B565EE /* Enable.cpp */,\n\t\t\t\tA667A3D62962318600B565EE /* Lock.cpp */,\n\t\t\t\tA667A3D72962318600B565EE /* Create.h */,\n\t\t\t\tA667A3D82962318600B565EE /* IAction.cpp */,\n\t\t\t\tA667A3D92962318600B565EE /* Select.h */,\n\t\t\t);\n\t\t\tpath = Actions;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3DA2962318600B565EE /* Dialogs */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3DB2962318600B565EE /* CurveEditorDlg.cpp */,\n\t\t\t\tA667A3DC2962318600B565EE /* EditNameDlg.h */,\n\t\t\t\tA667A3DD2962318600B565EE /* KeyEditDlg.cpp */,\n\t\t\t\tA667A3DE2962318600B565EE /* EditNameDlg.cpp */,\n\t\t\t\tA667A3DF2962318600B565EE /* System */,\n\t\t\t\tA667A3E62962318600B565EE /* KeyEditDlg.h */,\n\t\t\t\tA667A3E72962318600B565EE /* ColorPickerDlg.h */,\n\t\t\t\tA667A3E82962318600B565EE /* ColorPickerDlg.cpp */,\n\t\t\t\tA667A3E92962318600B565EE /* CurveEditorDlg.h */,\n\t\t\t);\n\t\t\tpath = Dialogs;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3DF2962318600B565EE /* System */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3E02962318600B565EE /* OpenSaveDialog.h */,\n\t\t\t\tA667A3E12962318600B565EE /* Mac */,\n\t\t\t\tA667A3E32962318600B565EE /* New Group */,\n\t\t\t\tA667A3E42962318600B565EE /* Windows */,\n\t\t\t);\n\t\t\tpath = System;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3E12962318600B565EE /* Mac */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3E22962318600B565EE /* OpenSaveDialog.cpp */,\n\t\t\t);\n\t\t\tpath = Mac;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3E32962318600B565EE /* New Group */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tpath = \"New Group\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3E42962318600B565EE /* Windows */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3E52962318600B565EE /* OpenSaveDialog.cpp */,\n\t\t\t);\n\t\t\tpath = Windows;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3EE2962318600B565EE /* TreeWindow */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3EF2962318600B565EE /* SceneTree.h */,\n\t\t\t\tA667A3F02962318600B565EE /* TreeWindow.cpp */,\n\t\t\t\tA667A3F12962318600B565EE /* TreeWindow.h */,\n\t\t\t\tA667A3F22962318600B565EE /* SceneTree.cpp */,\n\t\t\t);\n\t\t\tpath = TreeWindow;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3F32962318600B565EE /* AssetsWindow */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3F42962318600B565EE /* FoldersTree.cpp */,\n\t\t\t\tA667A3F52962318600B565EE /* AssetsWindow.cpp */,\n\t\t\t\tA667A3F62962318600B565EE /* AssetsIconsScroll.cpp */,\n\t\t\t\tA667A3F72962318600B565EE /* AssetsWindow.h */,\n\t\t\t\tA667A3F82962318600B565EE /* AssetIcon.cpp */,\n\t\t\t\tA667A3F92962318600B565EE /* AssetsIconsScroll.h */,\n\t\t\t\tA667A3FA2962318600B565EE /* FoldersTree.h */,\n\t\t\t\tA667A3FB2962318600B565EE /* AssetIcon.h */,\n\t\t\t);\n\t\t\tpath = AssetsWindow;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A3FC2962318600B565EE /* SceneWindow */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3FD2962318600B565EE /* SceneEditScreen.h */,\n\t\t\t\tA667A3FE2962318600B565EE /* SceneDragHandle.h */,\n\t\t\t\tA667A3FF2962318600B565EE /* SceneEditScreen.cpp */,\n\t\t\t\tA667A4002962318600B565EE /* SceneEditorLayer.h */,\n\t\t\t\tA667A4012962318600B565EE /* SceneWindow.h */,\n\t\t\t\tA667A4022962318600B565EE /* SceneWindow.cpp */,\n\t\t\t\tA667A4032962318600B565EE /* LayersPopup.cpp */,\n\t\t\t\tA667A4042962318600B565EE /* SceneDragHandle.cpp */,\n\t\t\t\tA667A4052962318600B565EE /* LayersPopup.h */,\n\t\t\t);\n\t\t\tpath = SceneWindow;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A4072962318600B565EE /* PropertiesWindow */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A4082962318600B565EE /* PropertiesWindow.h */,\n\t\t\t\tA667A4092962318600B565EE /* AssetPropertiesViewer.h */,\n\t\t\t\tA667A40A2962318600B565EE /* AssetPropertiesViewer.cpp */,\n\t\t\t\tA667A40B2962318600B565EE /* ActorsViewer */,\n\t\t\t\tA667A4202962318600B565EE /* IPropertiesViewer.h */,\n\t\t\t\tA667A4212962318600B565EE /* IPropertiesViewer.cpp */,\n\t\t\t\tA667A4222962318600B565EE /* DefaultPropertiesViewer.h */,\n\t\t\t\tA667A4232962318600B565EE /* DefaultPropertiesViewer.cpp */,\n\t\t\t\tA667A4242962318600B565EE /* PropertiesWindow.cpp */,\n\t\t\t\tA667A4252962318600B565EE /* WidgetLayerViewer */,\n\t\t\t);\n\t\t\tpath = PropertiesWindow;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A40B2962318600B565EE /* ActorsViewer */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A40C2962318600B565EE /* DefaultActorComponentViewer.cpp */,\n\t\t\t\tA667A40D2962318600B565EE /* DefaultActorTransformViewer.h */,\n\t\t\t\tA667A40E2962318600B565EE /* IActorPropertiesViewer.h */,\n\t\t\t\tA667A40F2962318600B565EE /* ActorViewer.cpp */,\n\t\t\t\tA667A4102962318600B565EE /* IActorTransformViewer.h */,\n\t\t\t\tA667A4112962318600B565EE /* AddComponentPanel.cpp */,\n\t\t\t\tA667A4122962318600B565EE /* IActorComponentViewer.cpp */,\n\t\t\t\tA667A4132962318600B565EE /* DefaultActorHeaderViewer.h */,\n\t\t\t\tA667A4142962318600B565EE /* IActorPropertiesViewer.cpp */,\n\t\t\t\tA667A4152962318600B565EE /* IActorHeaderViewer.cpp */,\n\t\t\t\tA667A4162962318600B565EE /* ActorViewer.h */,\n\t\t\t\tA667A4172962318600B565EE /* DefaultActorHeaderViewer.cpp */,\n\t\t\t\tA667A4182962318600B565EE /* IActorTransformViewer.cpp */,\n\t\t\t\tA667A4192962318600B565EE /* DefaultActorComponentViewer.h */,\n\t\t\t\tA667A41A2962318600B565EE /* DefaultActorPropertiesViewer.h */,\n\t\t\t\tA667A41B2962318600B565EE /* IActorHeaderViewer.h */,\n\t\t\t\tA667A41C2962318600B565EE /* IActorComponentViewer.h */,\n\t\t\t\tA667A41D2962318600B565EE /* DefaultActorPropertiesViewer.cpp */,\n\t\t\t\tA667A41E2962318600B565EE /* AddComponentPanel.h */,\n\t\t\t\tA667A41F2962318600B565EE /* DefaultActorTransformViewer.cpp */,\n\t\t\t);\n\t\t\tpath = ActorsViewer;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A4252962318600B565EE /* WidgetLayerViewer */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A4262962318600B565EE /* DefaultWidgetLayerPropertiesViewer.h */,\n\t\t\t\tA667A4272962318600B565EE /* IWidgetLayerLayoutViewer.cpp */,\n\t\t\t\tA667A4282962318600B565EE /* IWidgetLayerHeadViewer.h */,\n\t\t\t\tA667A4292962318600B565EE /* DefaultWidgetLayerLayoutViewer.h */,\n\t\t\t\tA667A42A2962318600B565EE /* WidgetLayerViewer.cpp */,\n\t\t\t\tA667A42B2962318600B565EE /* IWidgetLayerLayoutViewer.h */,\n\t\t\t\tA667A42C2962318600B565EE /* IWidgetLayerPropertiesViewer.cpp */,\n\t\t\t\tA667A42D2962318600B565EE /* WidgetLayerViewer.h */,\n\t\t\t\tA667A42E2962318600B565EE /* IWidgetLayerHeadViewer.cpp */,\n\t\t\t\tA667A42F2962318600B565EE /* IWidgetLayerPropertiesViewer.h */,\n\t\t\t\tA667A4302962318600B565EE /* DefaultWidgetLayerLayoutViewer.cpp */,\n\t\t\t\tA667A4312962318600B565EE /* DefaultWidgetLayerHeadViewer.cpp */,\n\t\t\t\tA667A4322962318600B565EE /* DefaultWidgetLayerHeadViewer.h */,\n\t\t\t\tA667A4332962318600B565EE /* DefaultWidgetLayerPropertiesViewer.cpp */,\n\t\t\t);\n\t\t\tpath = WidgetLayerViewer;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A4342962318600B565EE /* GameWindow */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A4352962318600B565EE /* GameWindow.cpp */,\n\t\t\t\tA667A4362962318600B565EE /* GameWindow.h */,\n\t\t\t);\n\t\t\tpath = GameWindow;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A4372962318600B565EE /* LogWindow */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A4382962318600B565EE /* LogWindow.h */,\n\t\t\t\tA667A4392962318600B565EE /* LogWindow.cpp */,\n\t\t\t);\n\t\t\tpath = LogWindow;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A43A2962318600B565EE /* AnimationWindow */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A43B2962318600B565EE /* KeyHandlesSheet.h */,\n\t\t\t\tA667A43C2962318600B565EE /* AnimationKeysActions.cpp */,\n\t\t\t\tA667A43D2962318600B565EE /* KeyHandlesSheet.cpp */,\n\t\t\t\tA667A43E2962318600B565EE /* Tree.h */,\n\t\t\t\tA667A43F2962318600B565EE /* CurvesSheet.h */,\n\t\t\t\tA667A4402962318600B565EE /* PropertiesListDlg.cpp */,\n\t\t\t\tA667A4412962318600B565EE /* PropertiesListDlg.h */,\n\t\t\t\tA667A4422962318600B565EE /* Timeline.cpp */,\n\t\t\t\tA667A4432962318600B565EE /* Tree.cpp */,\n\t\t\t\tA667A4442962318600B565EE /* AnimationWindow.h */,\n\t\t\t\tA667A4452962318600B565EE /* CurvesSheet.cpp */,\n\t\t\t\tA667A4462962318600B565EE /* TrackControls */,\n\t\t\t\tA667A4522962318600B565EE /* AnimationWindow.cpp */,\n\t\t\t\tA667A4532962318600B565EE /* Timeline.h */,\n\t\t\t\tA667A4542962318600B565EE /* AnimationKeysActions.h */,\n\t\t\t);\n\t\t\tpath = AnimationWindow;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA667A4462962318600B565EE /* TrackControls */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A4472962318600B565EE /* MapKeyFramesTrackControl.h */,\n\t\t\t\tA667A4482962318600B565EE /* KeyFramesTrackControl.cpp */,\n\t\t\t\tA667A4492962318600B565EE /* AnimationTrackWrapper.h */,\n\t\t\t\tA667A44A2962318600B565EE /* MapKeyFramesTrackControl.cpp */,\n\t\t\t\tA667A44B2962318600B565EE /* AnimationKeyDragHandle.cpp */,\n\t\t\t\tA667A44C2962318600B565EE /* Vec2KeyFramesTrackControl.cpp */,\n\t\t\t\tA667A44D2962318600B565EE /* ITrackControl.h */,\n\t\t\t\tA667A44E2962318600B565EE /* ITrackControl.cpp */,\n\t\t\t\tA667A44F2962318600B565EE /* KeyFramesTrackControl.h */,\n\t\t\t\tA667A4502962318600B565EE /* Vec2KeyFramesTrackControl.h */,\n\t\t\t\tA667A4512962318600B565EE /* AnimationKeyDragHandle.h */,\n\t\t\t);\n\t\t\tpath = TrackControls;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA6CA529D26DD1D9400EAD895 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA667A3382962318600B565EE /* o2Editor */,\n\t\t\t\tA6CA52A726DD1D9400EAD895 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA6CA52A726DD1D9400EAD895 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA6CA52A626DD1D9400EAD895 /* libEditor.a */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\tA6CA52A226DD1D9400EAD895 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tA667A4F82962318700B565EE /* SceneTree.h in Headers */,\n\t\t\t\tA667A4F12962318700B565EE /* ColorPickerDlg.h in Headers */,\n\t\t\t\tA667A4642962318600B565EE /* SpoilerWithHead.h in Headers */,\n\t\t\t\tA667A4F32962318700B565EE /* CurveEditorDlg.h in Headers */,\n\t\t\t\tA667A53C2962318700B565EE /* KeyHandlesSheet.h in Headers */,\n\t\t\t\tA667A4E22962318700B565EE /* PropertyChange.h in Headers */,\n\t\t\t\tA667A5502962318700B565EE /* Vec2KeyFramesTrackControl.h in Headers */,\n\t\t\t\tA667A4B22962318700B565EE /* Vector2IntProperty.h in Headers */,\n\t\t\t\tA667A45B2962318600B565EE /* ImageSlicesEditorWidget.h in Headers */,\n\t\t\t\tA667A4BA2962318700B565EE /* IntegerProperty.h in Headers */,\n\t\t\t\tA667A4C62962318700B565EE /* DefaultObjectPropertiesViewer.h in Headers */,\n\t\t\t\tA667A4E82962318700B565EE /* Select.h in Headers */,\n\t\t\t\tA667A4EA2962318700B565EE /* EditNameDlg.h in Headers */,\n\t\t\t\tA667A49A2962318700B565EE /* RectangleFloatProperty.h in Headers */,\n\t\t\t\tA667A4F72962318700B565EE /* ToolsPanel.h in Headers */,\n\t\t\t\tA667A4A42962318700B565EE /* ComponentProperty.h in Headers */,\n\t\t\t\tA667A4962962318700B565EE /* ScriptValueProperty.h in Headers */,\n\t\t\t\tA667A52C2962318700B565EE /* IWidgetLayerHeadViewer.h in Headers */,\n\t\t\t\tA667A4552962318600B565EE /* stdafx.h in Headers */,\n\t\t\t\tA667A4D92962318700B565EE /* Reparent.h in Headers */,\n\t\t\t\tA667A50E2962318700B565EE /* PropertiesWindow.h in Headers */,\n\t\t\t\tA667A50C2962318700B565EE /* LayersPopup.h in Headers */,\n\t\t\t\tA667A4A92962318700B565EE /* ColorProperty.h in Headers */,\n\t\t\t\tA667A4592962318600B565EE /* ScrollView.h in Headers */,\n\t\t\t\tA667A45E2962318600B565EE /* CurvesEditor.h in Headers */,\n\t\t\t\tA667A4C22962318700B565EE /* MeshComponentViewer.h in Headers */,\n\t\t\t\tA667A4752962318600B565EE /* BasicUIStyle.h in Headers */,\n\t\t\t\tA667A4782962318600B565EE /* SelectionTool.h in Headers */,\n\t\t\t\tA667A4D42962318700B565EE /* Properties.h in Headers */,\n\t\t\t\tA667A4E12962318700B565EE /* Transform.h in Headers */,\n\t\t\t\tA667A4DB2962318700B565EE /* Lock.h in Headers */,\n\t\t\t\tA667A5212962318700B565EE /* IActorComponentViewer.h in Headers */,\n\t\t\t\tA667A5032962318700B565EE /* AssetIcon.h in Headers */,\n\t\t\t\tA667A4BE2962318700B565EE /* CameraActorViewer.h in Headers */,\n\t\t\t\tA667A4ED2962318700B565EE /* OpenSaveDialog.h in Headers */,\n\t\t\t\tA667A46C2962318600B565EE /* IEditorWindow.h in Headers */,\n\t\t\t\tA667A52D2962318700B565EE /* DefaultWidgetLayerLayoutViewer.h in Headers */,\n\t\t\t\tA667A4E32962318700B565EE /* IAction.h in Headers */,\n\t\t\t\tA667A4B62962318700B565EE /* Vector2FloatProperty.h in Headers */,\n\t\t\t\tA667A4DA2962318700B565EE /* Enable.h in Headers */,\n\t\t\t\tA667A4572962318600B565EE /* CurvePreview.h in Headers */,\n\t\t\t\tA667A54D2962318700B565EE /* ITrackControl.h in Headers */,\n\t\t\t\tA667A48F2962318700B565EE /* VectorProperty.h in Headers */,\n\t\t\t\tA667A49F2962318700B565EE /* BorderFloatProperty.h in Headers */,\n\t\t\t\tA667A51E2962318700B565EE /* DefaultActorComponentViewer.h in Headers */,\n\t\t\t\tA667A46F2962318600B565EE /* DockableWindow.h in Headers */,\n\t\t\t\tA667A4982962318700B565EE /* TagProperty.h in Headers */,\n\t\t\t\tA667A51F2962318700B565EE /* DefaultActorPropertiesViewer.h in Headers */,\n\t\t\t\tA667A4A72962318700B565EE /* EnumMaskProperty.h in Headers */,\n\t\t\t\tA667A50F2962318700B565EE /* AssetPropertiesViewer.h in Headers */,\n\t\t\t\tA667A5052962318700B565EE /* SceneDragHandle.h in Headers */,\n\t\t\t\tA667A4DC2962318700B565EE /* Delete.h in Headers */,\n\t\t\t\tA667A4B72962318700B565EE /* AssetProperty.h in Headers */,\n\t\t\t\tA667A46A2962318600B565EE /* WindowsManager.h in Headers */,\n\t\t\t\tA667A5492962318700B565EE /* AnimationTrackWrapper.h in Headers */,\n\t\t\t\tA667A4AE2962318700B565EE /* StringProperty.h in Headers */,\n\t\t\t\tA667A47F2962318700B565EE /* RotateTool.h in Headers */,\n\t\t\t\tA667A4D02962318700B565EE /* IPropertyField.h in Headers */,\n\t\t\t\tA667A4C82962318700B565EE /* ImageAssetViewer.h in Headers */,\n\t\t\t\tA667A51B2962318700B565EE /* ActorViewer.h in Headers */,\n\t\t\t\tA667A4892962318700B565EE /* UIRoot.h in Headers */,\n\t\t\t\tA667A5022962318700B565EE /* FoldersTree.h in Headers */,\n\t\t\t\tA667A4912962318700B565EE /* WStringProperty.h in Headers */,\n\t\t\t\tA667A4722962318600B565EE /* EditorUIStyle.h in Headers */,\n\t\t\t\tA667A4B02962318700B565EE /* SceneLayersListProperty.h in Headers */,\n\t\t\t\tA667A4CC2962318700B565EE /* ObjectViewer.h in Headers */,\n\t\t\t\tA667A5082962318700B565EE /* SceneWindow.h in Headers */,\n\t\t\t\tA667A4802962318700B565EE /* CustomFrameTool.h in Headers */,\n\t\t\t\tA667A5422962318700B565EE /* PropertiesListDlg.h in Headers */,\n\t\t\t\tA667A5402962318700B565EE /* CurvesSheet.h in Headers */,\n\t\t\t\tA667A5332962318700B565EE /* IWidgetLayerPropertiesViewer.h in Headers */,\n\t\t\t\tA667A4F42962318700B565EE /* EditorConfig.h in Headers */,\n\t\t\t\tA667A4602962318600B565EE /* CurveActions.h in Headers */,\n\t\t\t\tA667A4D12962318700B565EE /* PropertiesContext.h in Headers */,\n\t\t\t\tA667A4932962318700B565EE /* FloatProperty.h in Headers */,\n\t\t\t\tA667A4A12962318700B565EE /* LayerProperty.h in Headers */,\n\t\t\t\tA667A5122962318700B565EE /* DefaultActorTransformViewer.h in Headers */,\n\t\t\t\tA667A4AD2962318700B565EE /* ObjectPtrProperty.h in Headers */,\n\t\t\t\tA667A49E2962318700B565EE /* ObjectProperty.h in Headers */,\n\t\t\t\tA667A52F2962318700B565EE /* IWidgetLayerLayoutViewer.h in Headers */,\n\t\t\t\tA667A5392962318700B565EE /* GameWindow.h in Headers */,\n\t\t\t\tA667A53A2962318700B565EE /* LogWindow.h in Headers */,\n\t\t\t\tA667A4812962318700B565EE /* MoveTool.h in Headers */,\n\t\t\t\tA667A5012962318700B565EE /* AssetsIconsScroll.h in Headers */,\n\t\t\t\tA667A5452962318700B565EE /* AnimationWindow.h in Headers */,\n\t\t\t\tA667A4922962318700B565EE /* CurveProperty.h in Headers */,\n\t\t\t\tA667A5512962318700B565EE /* AnimationKeyDragHandle.h in Headers */,\n\t\t\t\tA667A5532962318700B565EE /* Timeline.h in Headers */,\n\t\t\t\tA667A5312962318700B565EE /* WidgetLayerViewer.h in Headers */,\n\t\t\t\tA667A47C2962318700B565EE /* ScaleTool.h in Headers */,\n\t\t\t\tA667A54F2962318700B565EE /* KeyFramesTrackControl.h in Headers */,\n\t\t\t\tA667A4B52962318700B565EE /* ActorProperty.h in Headers */,\n\t\t\t\tA667A4952962318700B565EE /* BorderIntProperty.h in Headers */,\n\t\t\t\tA667A5542962318700B565EE /* AnimationKeysActions.h in Headers */,\n\t\t\t\tA667A4CD2962318700B565EE /* IObjectPropertiesViewer.h in Headers */,\n\t\t\t\tA667A5152962318700B565EE /* IActorTransformViewer.h in Headers */,\n\t\t\t\tA667A4852962318700B565EE /* IEditorTool.h in Headers */,\n\t\t\t\tA667A4612962318600B565EE /* SplineEditor.h in Headers */,\n\t\t\t\tA667A46E2962318600B565EE /* WindowsLayout.h in Headers */,\n\t\t\t\tA667A4FF2962318700B565EE /* AssetsWindow.h in Headers */,\n\t\t\t\tA667A4CA2962318700B565EE /* TextViewer.h in Headers */,\n\t\t\t\tA667A4F52962318700B565EE /* MenuPanel.h in Headers */,\n\t\t\t\tA667A4822962318700B565EE /* SplineTool.h in Headers */,\n\t\t\t\tA667A5202962318700B565EE /* IActorHeaderViewer.h in Headers */,\n\t\t\t\tA667A4A22962318700B565EE /* RectangleIntProperty.h in Headers */,\n\t\t\t\tA667A4972962318700B565EE /* EnumProperty.h in Headers */,\n\t\t\t\tA667A4C72962318700B565EE /* AnimationViewer.h in Headers */,\n\t\t\t\tA667A45C2962318600B565EE /* FrameScrollView.h in Headers */,\n\t\t\t\tA667A4A02962318700B565EE /* BooleanProperty.h in Headers */,\n\t\t\t\tA667A4E62962318700B565EE /* Create.h in Headers */,\n\t\t\t\tA667A5472962318700B565EE /* MapKeyFramesTrackControl.h in Headers */,\n\t\t\t\tA667A53F2962318700B565EE /* Tree.h in Headers */,\n\t\t\t\tA667A4D52962318700B565EE /* ActionsList.h in Headers */,\n\t\t\t\tA667A4882962318700B565EE /* EditorApplication.h in Headers */,\n\t\t\t\tA667A5182962318700B565EE /* DefaultActorHeaderViewer.h in Headers */,\n\t\t\t\tA667A4F02962318700B565EE /* KeyEditDlg.h in Headers */,\n\t\t\t\tA667A47E2962318700B565EE /* FrameTool.h in Headers */,\n\t\t\t\tA667A4712962318600B565EE /* DockWindowPlace.h in Headers */,\n\t\t\t\tA667A4C12962318700B565EE /* AnimationStateViewer.h in Headers */,\n\t\t\t\tA667A5362962318700B565EE /* DefaultWidgetLayerHeadViewer.h in Headers */,\n\t\t\t\tA667A52A2962318700B565EE /* DefaultWidgetLayerPropertiesViewer.h in Headers */,\n\t\t\t\tA667A5272962318700B565EE /* DefaultPropertiesViewer.h in Headers */,\n\t\t\t\tA667A5252962318700B565EE /* IPropertiesViewer.h in Headers */,\n\t\t\t\tA667A5232962318700B565EE /* AddComponentPanel.h in Headers */,\n\t\t\t\tA667A5132962318700B565EE /* IActorPropertiesViewer.h in Headers */,\n\t\t\t\tA667A4FA2962318700B565EE /* TreeWindow.h in Headers */,\n\t\t\t\tA667A4CB2962318700B565EE /* SpriteViewer.h in Headers */,\n\t\t\t\tA667A5072962318700B565EE /* SceneEditorLayer.h in Headers */,\n\t\t\t\tA667A5042962318700B565EE /* SceneEditScreen.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\tA6CA52A526DD1D9400EAD895 /* Editor */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = A6CA52B126DD1D9400EAD895 /* Build configuration list for PBXNativeTarget \"Editor\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tA6CA52A226DD1D9400EAD895 /* Headers */,\n\t\t\t\tA6CA52A326DD1D9400EAD895 /* Sources */,\n\t\t\t\tA6CA52A426DD1D9400EAD895 /* 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 = Editor;\n\t\t\tproductName = Editor;\n\t\t\tproductReference = A6CA52A626DD1D9400EAD895 /* libEditor.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\tA6CA529E26DD1D9400EAD895 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 1250;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\tA6CA52A526DD1D9400EAD895 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 12.5.1;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = A6CA52A126DD1D9400EAD895 /* Build configuration list for PBXProject \"Editor\" */;\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 = A6CA529D26DD1D9400EAD895;\n\t\t\tproductRefGroup = A6CA52A726DD1D9400EAD895 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\tA6CA52A526DD1D9400EAD895 /* Editor */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\tA6CA52A326DD1D9400EAD895 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tA667A50A2962318700B565EE /* LayersPopup.cpp in Sources */,\n\t\t\t\tA667A5172962318700B565EE /* IActorComponentViewer.cpp in Sources */,\n\t\t\t\tA667A4BD2962318700B565EE /* SpriteViewer.cpp in Sources */,\n\t\t\t\tA667A48C2962318700B565EE /* ActorProperty.cpp in Sources */,\n\t\t\t\tA667A53B2962318700B565EE /* LogWindow.cpp in Sources */,\n\t\t\t\tA667A4B12962318700B565EE /* RectangleFloatProperty.cpp in Sources */,\n\t\t\t\tA667A52B2962318700B565EE /* IWidgetLayerLayoutViewer.cpp in Sources */,\n\t\t\t\tA667A4E92962318700B565EE /* CurveEditorDlg.cpp in Sources */,\n\t\t\t\tA667A5262962318700B565EE /* IPropertiesViewer.cpp in Sources */,\n\t\t\t\tA667A5442962318700B565EE /* Tree.cpp in Sources */,\n\t\t\t\tA667A4652962318600B565EE /* CurvePreview.cpp in Sources */,\n\t\t\t\tA667A5102962318700B565EE /* AssetPropertiesViewer.cpp in Sources */,\n\t\t\t\tA667A4FD2962318700B565EE /* AssetsWindow.cpp in Sources */,\n\t\t\t\tA667A4D22962318700B565EE /* IObjectPropertiesViewer.cpp in Sources */,\n\t\t\t\tA667A4BF2962318700B565EE /* TextViewer.cpp in Sources */,\n\t\t\t\tA667A4DD2962318700B565EE /* Delete.cpp in Sources */,\n\t\t\t\tA667A4662962318600B565EE /* ScrollView.cpp in Sources */,\n\t\t\t\tA667A4992962318700B565EE /* WStringProperty.cpp in Sources */,\n\t\t\t\tA667A5432962318700B565EE /* Timeline.cpp in Sources */,\n\t\t\t\tA667A51D2962318700B565EE /* IActorTransformViewer.cpp in Sources */,\n\t\t\t\tA667A54C2962318700B565EE /* Vec2KeyFramesTrackControl.cpp in Sources */,\n\t\t\t\tA667A4FB2962318700B565EE /* SceneTree.cpp in Sources */,\n\t\t\t\tA667A4BB2962318700B565EE /* BooleanProperty.cpp in Sources */,\n\t\t\t\tA667A5382962318700B565EE /* GameWindow.cpp in Sources */,\n\t\t\t\tA667A4A52962318700B565EE /* BorderIntProperty.cpp in Sources */,\n\t\t\t\tA667A4F62962318700B565EE /* ToolsPanel.cpp in Sources */,\n\t\t\t\tA667A4842962318700B565EE /* SplineTool.cpp in Sources */,\n\t\t\t\tA667A4732962318600B565EE /* BasicUIStyle.cpp in Sources */,\n\t\t\t\tA667A4AB2962318700B565EE /* AssetProperty.cpp in Sources */,\n\t\t\t\tA667A48D2962318700B565EE /* Vector2IntProperty.cpp in Sources */,\n\t\t\t\tA667A4A62962318700B565EE /* Vector2FloatProperty.cpp in Sources */,\n\t\t\t\tA667A45D2962318600B565EE /* CurvesEditor.cpp in Sources */,\n\t\t\t\tA667A51A2962318700B565EE /* IActorHeaderViewer.cpp in Sources */,\n\t\t\t\tA667A5412962318700B565EE /* PropertiesListDlg.cpp in Sources */,\n\t\t\t\tA667A5222962318700B565EE /* DefaultActorPropertiesViewer.cpp in Sources */,\n\t\t\t\tA667A5092962318700B565EE /* SceneWindow.cpp in Sources */,\n\t\t\t\tA667A4C02962318700B565EE /* DefaultObjectPropertiesViewer.cpp in Sources */,\n\t\t\t\tA667A4E42962318700B565EE /* Enable.cpp in Sources */,\n\t\t\t\tA667A53D2962318700B565EE /* AnimationKeysActions.cpp in Sources */,\n\t\t\t\tA667A47D2962318700B565EE /* FrameTool.cpp in Sources */,\n\t\t\t\tA667A49D2962318700B565EE /* StringProperty.cpp in Sources */,\n\t\t\t\tA667A4772962318600B565EE /* ScaleTool.cpp in Sources */,\n\t\t\t\tA667A5002962318700B565EE /* AssetIcon.cpp in Sources */,\n\t\t\t\tA667A5372962318700B565EE /* DefaultWidgetLayerPropertiesViewer.cpp in Sources */,\n\t\t\t\tA667A4702962318600B565EE /* IEditorWindow.cpp in Sources */,\n\t\t\t\tA667A5192962318700B565EE /* IActorPropertiesViewer.cpp in Sources */,\n\t\t\t\tA667A49B2962318700B565EE /* ObjectProperty.cpp in Sources */,\n\t\t\t\tA667A4EB2962318700B565EE /* KeyEditDlg.cpp in Sources */,\n\t\t\t\tA667A4692962318600B565EE /* WindowsLayout.cpp in Sources */,\n\t\t\t\tA667A5322962318700B565EE /* IWidgetLayerHeadViewer.cpp in Sources */,\n\t\t\t\tA667A46D2962318600B565EE /* DockWindowPlace.cpp in Sources */,\n\t\t\t\tA667A4DF2962318700B565EE /* ActionsList.cpp in Sources */,\n\t\t\t\tA667A5482962318700B565EE /* KeyFramesTrackControl.cpp in Sources */,\n\t\t\t\tA667A5302962318700B565EE /* IWidgetLayerPropertiesViewer.cpp in Sources */,\n\t\t\t\tA667A4D32962318700B565EE /* PropertiesContext.cpp in Sources */,\n\t\t\t\tA667A48E2962318700B565EE /* CurveProperty.cpp in Sources */,\n\t\t\t\tA667A4D72962318700B565EE /* Reparent.cpp in Sources */,\n\t\t\t\tA667A4902962318700B565EE /* ScriptValueProperty.cpp in Sources */,\n\t\t\t\tA667A4862962318700B565EE /* SelectionTool.cpp in Sources */,\n\t\t\t\tA667A54B2962318700B565EE /* AnimationKeyDragHandle.cpp in Sources */,\n\t\t\t\tA667A4632962318600B565EE /* SpoilerWithHead.cpp in Sources */,\n\t\t\t\tA667A4EC2962318700B565EE /* EditNameDlg.cpp in Sources */,\n\t\t\t\tA667A4EE2962318700B565EE /* OpenSaveDialog.cpp in Sources */,\n\t\t\t\tA667A4682962318600B565EE /* DockableWindow.cpp in Sources */,\n\t\t\t\tA667A54A2962318700B565EE /* MapKeyFramesTrackControl.cpp in Sources */,\n\t\t\t\tA667A4942962318700B565EE /* IntegerProperty.cpp in Sources */,\n\t\t\t\tA667A4C32962318700B565EE /* MeshComponentViewer.cpp in Sources */,\n\t\t\t\tA667A51C2962318700B565EE /* DefaultActorHeaderViewer.cpp in Sources */,\n\t\t\t\tA667A5292962318700B565EE /* PropertiesWindow.cpp in Sources */,\n\t\t\t\tA667A5142962318700B565EE /* ActorViewer.cpp in Sources */,\n\t\t\t\tA667A52E2962318700B565EE /* WidgetLayerViewer.cpp in Sources */,\n\t\t\t\tA667A5242962318700B565EE /* DefaultActorTransformViewer.cpp in Sources */,\n\t\t\t\tA667A4792962318700B565EE /* MoveTool.cpp in Sources */,\n\t\t\t\tA667A46B2962318600B565EE /* WindowsManager.cpp in Sources */,\n\t\t\t\tA667A5162962318700B565EE /* AddComponentPanel.cpp in Sources */,\n\t\t\t\tA667A4A32962318700B565EE /* LayerProperty.cpp in Sources */,\n\t\t\t\tA667A4562962318600B565EE /* EditorApplication.cpp in Sources */,\n\t\t\t\tA667A4582962318600B565EE /* ImageSlicesEditorWidget.cpp in Sources */,\n\t\t\t\tA667A45F2962318600B565EE /* CurveActions.cpp in Sources */,\n\t\t\t\tA667A54E2962318700B565EE /* ITrackControl.cpp in Sources */,\n\t\t\t\tA667A4B92962318700B565EE /* VectorProperty.cpp in Sources */,\n\t\t\t\tA667A4E72962318700B565EE /* IAction.cpp in Sources */,\n\t\t\t\tA667A5352962318700B565EE /* DefaultWidgetLayerHeadViewer.cpp in Sources */,\n\t\t\t\tA667A4AC2962318700B565EE /* RectangleIntProperty.cpp in Sources */,\n\t\t\t\tA667A4CF2962318700B565EE /* Properties.cpp in Sources */,\n\t\t\t\tA667A5112962318700B565EE /* DefaultActorComponentViewer.cpp in Sources */,\n\t\t\t\tA667A5282962318700B565EE /* DefaultPropertiesViewer.cpp in Sources */,\n\t\t\t\tA667A4C42962318700B565EE /* AnimationStateViewer.cpp in Sources */,\n\t\t\t\tA667A4D62962318700B565EE /* Select.cpp in Sources */,\n\t\t\t\tA667A4EF2962318700B565EE /* OpenSaveDialog.cpp in Sources */,\n\t\t\t\tA667A4672962318600B565EE /* UIRoot.cpp in Sources */,\n\t\t\t\tA667A4762962318600B565EE /* EditorConfig.cpp in Sources */,\n\t\t\t\tA667A4CE2962318700B565EE /* ObjectViewer.cpp in Sources */,\n\t\t\t\tA667A50B2962318700B565EE /* SceneDragHandle.cpp in Sources */,\n\t\t\t\tA667A45A2962318600B565EE /* FrameScrollView.cpp in Sources */,\n\t\t\t\tA667A4FC2962318700B565EE /* FoldersTree.cpp in Sources */,\n\t\t\t\tA667A5462962318700B565EE /* CurvesSheet.cpp in Sources */,\n\t\t\t\tA667A4A82962318700B565EE /* ObjectPtrProperty.cpp in Sources */,\n\t\t\t\tA667A4AA2962318700B565EE /* SceneLayersListProperty.cpp in Sources */,\n\t\t\t\tA667A48A2962318700B565EE /* IPropertyField.cpp in Sources */,\n\t\t\t\tA667A4E52962318700B565EE /* Lock.cpp in Sources */,\n\t\t\t\tA667A5342962318700B565EE /* DefaultWidgetLayerLayoutViewer.cpp in Sources */,\n\t\t\t\tA667A4B32962318700B565EE /* ColorProperty.cpp in Sources */,\n\t\t\t\tA667A4F92962318700B565EE /* TreeWindow.cpp in Sources */,\n\t\t\t\tA667A4C92962318700B565EE /* ImageAssetViewer.cpp in Sources */,\n\t\t\t\tA667A49C2962318700B565EE /* EnumProperty.cpp in Sources */,\n\t\t\t\tA667A4742962318600B565EE /* EditorUIStyle.cpp in Sources */,\n\t\t\t\tA667A4B82962318700B565EE /* BorderFloatProperty.cpp in Sources */,\n\t\t\t\tA667A5522962318700B565EE /* AnimationWindow.cpp in Sources */,\n\t\t\t\tA667A4B42962318700B565EE /* TagProperty.cpp in Sources */,\n\t\t\t\tA667A4E02962318700B565EE /* Create.cpp in Sources */,\n\t\t\t\tA667A50D2962318700B565EE /* stdafx.cpp in Sources */,\n\t\t\t\tA667A4AF2962318700B565EE /* FloatProperty.cpp in Sources */,\n\t\t\t\tA667A4BC2962318700B565EE /* CameraActorViewer.cpp in Sources */,\n\t\t\t\tA667A48B2962318700B565EE /* ComponentProperty.cpp in Sources */,\n\t\t\t\tA667A4F22962318700B565EE /* ColorPickerDlg.cpp in Sources */,\n\t\t\t\tA667A47A2962318700B565EE /* CustomFrameTool.cpp in Sources */,\n\t\t\t\tA667A47B2962318700B565EE /* RotateTool.cpp in Sources */,\n\t\t\t\tA667A5062962318700B565EE /* SceneEditScreen.cpp in Sources */,\n\t\t\t\tA667A53E2962318700B565EE /* KeyHandlesSheet.cpp in Sources */,\n\t\t\t\tA667A4DE2962318700B565EE /* Transform.cpp in Sources */,\n\t\t\t\tA667A4D82962318700B565EE /* PropertyChange.cpp in Sources */,\n\t\t\t\tA667A4832962318700B565EE /* IEditorTool.cpp in Sources */,\n\t\t\t\tA667A4FE2962318700B565EE /* AssetsIconsScroll.cpp in Sources */,\n\t\t\t\tA667A4872962318700B565EE /* MenuPanel.cpp in Sources */,\n\t\t\t\tA667A4622962318600B565EE /* SplineEditor.cpp in Sources */,\n\t\t\t\tA667A4C52962318700B565EE /* AnimationViewer.cpp in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\tA6CA52AF26DD1D9400EAD895 /* 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_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++20\";\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_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\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\tPLATFORM_MAC,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\tSCRIPTING_BACKEND_JERRYSCRIPT,\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\tMACOSX_DEPLOYMENT_TARGET = 11.3;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_CPLUSPLUSFLAGS = (\n\t\t\t\t\t\"$(OTHER_CFLAGS)\",\n\t\t\t\t\t\"-fdeclspec\",\n\t\t\t\t);\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSYSTEM_HEADER_SEARCH_PATHS = (\n\t\t\t\t\t../../Sources,\n\t\t\t\t\t../..,\n\t\t\t\t\t../../3rdPartyLibs/FreeType/include,\n\t\t\t\t\t../../3rdPartyLibs,\n\t\t\t\t\t../../3rdPartyLibs/rapidjson/include,\n\t\t\t\t);\n\t\t\t\tUSER_HEADER_SEARCH_PATHS = (\n\t\t\t\t\t../../Sources,\n\t\t\t\t\t../..,\n\t\t\t\t\t../../3rdPartyLibs/FreeType/include,\n\t\t\t\t\t../../3rdPartyLibs,\n\t\t\t\t\t../../3rdPartyLibs/rapidjson/include,\n\t\t\t\t\t../../Sources,\n\t\t\t\t);\n\t\t\t\tUSE_HEADERMAP = YES;\n\t\t\t\tWARNING_CFLAGS = \"-Wno-undefined-var-template\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tA6CA52B026DD1D9400EAD895 /* 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_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++20\";\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_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\tPLATFORM_MAC,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\tSCRIPTING_BACKEND_JERRYSCRIPT,\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\tMACOSX_DEPLOYMENT_TARGET = 11.3;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tOTHER_CPLUSPLUSFLAGS = (\n\t\t\t\t\t\"$(OTHER_CFLAGS)\",\n\t\t\t\t\t\"-fdeclspec\",\n\t\t\t\t);\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSYSTEM_HEADER_SEARCH_PATHS = (\n\t\t\t\t\t../../Sources,\n\t\t\t\t\t../..,\n\t\t\t\t\t../../3rdPartyLibs/FreeType/include,\n\t\t\t\t\t../../3rdPartyLibs,\n\t\t\t\t\t../../3rdPartyLibs/rapidjson/include,\n\t\t\t\t);\n\t\t\t\tUSER_HEADER_SEARCH_PATHS = (\n\t\t\t\t\t../../Sources,\n\t\t\t\t\t../..,\n\t\t\t\t\t../../3rdPartyLibs/FreeType/include,\n\t\t\t\t\t../../3rdPartyLibs,\n\t\t\t\t\t../../3rdPartyLibs/rapidjson/include,\n\t\t\t\t\t../../Sources,\n\t\t\t\t);\n\t\t\t\tUSE_HEADERMAP = YES;\n\t\t\t\tWARNING_CFLAGS = \"-Wno-undefined-var-template\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tA6CA52B226DD1D9400EAD895 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = K48QWFFT79;\n\t\t\t\tEXECUTABLE_PREFIX = lib;\n\t\t\t\tGCC_ENABLE_CPP_EXCEPTIONS = YES;\n\t\t\t\tGCC_ENABLE_CPP_RTTI = YES;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSYSTEM_HEADER_SEARCH_PATHS = (\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework/Sources,\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework,\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework/3rdPartyLibs/FreeType/include,\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework/3rdPartyLibs,\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework/3rdPartyLibs/rapidjson/include,\n\t\t\t\t);\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tA6CA52B326DD1D9400EAD895 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = K48QWFFT79;\n\t\t\t\tEXECUTABLE_PREFIX = lib;\n\t\t\t\tGCC_ENABLE_CPP_EXCEPTIONS = YES;\n\t\t\t\tGCC_ENABLE_CPP_RTTI = YES;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSYSTEM_HEADER_SEARCH_PATHS = (\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework/Sources,\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework,\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework/3rdPartyLibs/FreeType/include,\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework/3rdPartyLibs,\n\t\t\t\t\t/Users/playrix/PetStory/o2/Framework/3rdPartyLibs/rapidjson/include,\n\t\t\t\t);\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\tA6CA52A126DD1D9400EAD895 /* Build configuration list for PBXProject \"Editor\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tA6CA52AF26DD1D9400EAD895 /* Debug */,\n\t\t\t\tA6CA52B026DD1D9400EAD895 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tA6CA52B126DD1D9400EAD895 /* Build configuration list for PBXNativeTarget \"Editor\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tA6CA52B226DD1D9400EAD895 /* Debug */,\n\t\t\t\tA6CA52B326DD1D9400EAD895 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = A6CA529E26DD1D9400EAD895 /* Project object */;\n}\n"
  },
  {
    "path": "Editor/Platforms/Mac/Editor.xcodeproj/xcuserdata/playrix.xcuserdatad/xcschemes/xcschememanagement.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>SchemeUserState</key>\n\t<dict>\n\t\t<key>Editor.xcscheme_^#shared#^_</key>\n\t\t<dict>\n\t\t\t<key>orderHint</key>\n\t\t\t<integer>4</integer>\n\t\t</dict>\n\t</dict>\n</dict>\n</plist>\n"
  },
  {
    "path": "Editor/Platforms/Windows/Editor.vcxproj",
    "content": "<?xml version=\"1.0\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\t<ItemGroup Label=\"ProjectConfigurations\">\n\t\t<ProjectConfiguration Include=\"Debug|Win32\">\n\t\t\t<Configuration>Debug</Configuration>\n\t\t\t<Platform>Win32</Platform>\n\t\t</ProjectConfiguration>\n\t\t<ProjectConfiguration Include=\"FastDebug|Win32\">\n\t\t\t<Configuration>FastDebug</Configuration>\n\t\t\t<Platform>Win32</Platform>\n\t\t</ProjectConfiguration>\n\t\t<ProjectConfiguration Include=\"FastDebug|x64\">\n\t\t\t<Configuration>FastDebug</Configuration>\n\t\t\t<Platform>x64</Platform>\n\t\t</ProjectConfiguration>\n\t\t<ProjectConfiguration Include=\"Release|Win32\">\n\t\t\t<Configuration>Release</Configuration>\n\t\t\t<Platform>Win32</Platform>\n\t\t</ProjectConfiguration>\n\t\t<ProjectConfiguration Include=\"Debug|x64\">\n\t\t\t<Configuration>Debug</Configuration>\n\t\t\t<Platform>x64</Platform>\n\t\t</ProjectConfiguration>\n\t\t<ProjectConfiguration Include=\"Release|x64\">\n\t\t\t<Configuration>Release</Configuration>\n\t\t\t<Platform>x64</Platform>\n\t\t</ProjectConfiguration>\n\t</ItemGroup>\n\t<PropertyGroup Label=\"Globals\">\n\t\t<ProjectGuid>{B8629B91-422C-4541-9E06-6013F5C99E66}</ProjectGuid>\n\t\t<Keyword>Win32Proj</Keyword>\n\t\t<RootNamespace>o2Test</RootNamespace>\n\t\t<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n\t\t<ProjectName>EditorLib</ProjectName>\n\t</PropertyGroup>\n\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n\t\t<ConfigurationType>StaticLibrary</ConfigurationType>\n\t\t<UseDebugLibraries>true</UseDebugLibraries>\n\t\t<PlatformToolset>v143</PlatformToolset>\n\t\t<CharacterSet>NotSet</CharacterSet>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='FastDebug|Win32'\" Label=\"Configuration\">\n\t\t<ConfigurationType>StaticLibrary</ConfigurationType>\n\t\t<UseDebugLibraries>true</UseDebugLibraries>\n\t\t<PlatformToolset>v143</PlatformToolset>\n\t\t<CharacterSet>NotSet</CharacterSet>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n\t\t<ConfigurationType>StaticLibrary</ConfigurationType>\n\t\t<UseDebugLibraries>false</UseDebugLibraries>\n\t\t<PlatformToolset>v143</PlatformToolset>\n\t\t<WholeProgramOptimization>true</WholeProgramOptimization>\n\t\t<CharacterSet>NotSet</CharacterSet>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n\t\t<ConfigurationType>StaticLibrary</ConfigurationType>\n\t\t<UseDebugLibraries>true</UseDebugLibraries>\n\t\t<PlatformToolset>v143</PlatformToolset>\n\t\t<CharacterSet>NotSet</CharacterSet>\n\t\t<EnableASAN>false</EnableASAN>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='FastDebug|x64'\" Label=\"Configuration\">\n\t\t<ConfigurationType>StaticLibrary</ConfigurationType>\n\t\t<UseDebugLibraries>true</UseDebugLibraries>\n\t\t<PlatformToolset>v143</PlatformToolset>\n\t\t<CharacterSet>NotSet</CharacterSet>\n\t\t<EnableASAN>false</EnableASAN>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n\t\t<ConfigurationType>StaticLibrary</ConfigurationType>\n\t\t<UseDebugLibraries>false</UseDebugLibraries>\n\t\t<PlatformToolset>v143</PlatformToolset>\n\t\t<WholeProgramOptimization>true</WholeProgramOptimization>\n\t\t<CharacterSet>NotSet</CharacterSet>\n\t\t<EnableASAN>false</EnableASAN>\n\t</PropertyGroup>\n\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n\t<ImportGroup Label=\"ExtensionSettings\" />\n\t<ImportGroup Label=\"Shared\" />\n\t<ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n\t</ImportGroup>\n\t<ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='FastDebug|Win32'\" Label=\"PropertySheets\">\n\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n\t</ImportGroup>\n\t<ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n\t</ImportGroup>\n\t<ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n\t</ImportGroup>\n\t<ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='FastDebug|x64'\" Label=\"PropertySheets\">\n\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n\t</ImportGroup>\n\t<ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n\t</ImportGroup>\n\t<PropertyGroup Label=\"UserMacros\" />\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n\t\t<LinkIncremental>false</LinkIncremental>\n\t\t<OutDir>$(SolutionDir)Temp\\$(Configuration)\\Libs\\</OutDir>\n\t\t<IntDir>$(SolutionDir)Temp\\$(Configuration)\\EditorLib\\</IntDir>\n\t\t<TargetName>Editor</TargetName>\n\t\t<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>\n\t\t<TargetExt>.lib</TargetExt>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='FastDebug|Win32'\">\n\t\t<LinkIncremental>false</LinkIncremental>\n\t\t<OutDir>$(SolutionDir)Temp\\$(Configuration)\\Libs\\</OutDir>\n\t\t<IntDir>$(SolutionDir)Temp\\$(Configuration)\\EditorLib\\</IntDir>\n\t\t<TargetName>Editor</TargetName>\n\t\t<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>\n\t\t<TargetExt>.lib</TargetExt>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n\t\t<LinkIncremental>true</LinkIncremental>\n\t\t<OutDir>$(SolutionDir)Temp\\$(Configuration)\\Libs\\</OutDir>\n\t\t<IntDir>$(SolutionDir)Temp\\$(Configuration)\\EditorLib\\</IntDir>\n\t\t<EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>\n\t\t<TargetName>Editor</TargetName>\n\t\t<TargetExt>.lib</TargetExt>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='FastDebug|x64'\">\n\t\t<LinkIncremental>true</LinkIncremental>\n\t\t<OutDir>$(SolutionDir)Temp\\$(Configuration)\\Libs\\</OutDir>\n\t\t<IntDir>$(SolutionDir)Temp\\$(Configuration)\\EditorLib\\</IntDir>\n\t\t<EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>\n\t\t<TargetName>Editor</TargetName>\n\t\t<TargetExt>.lib</TargetExt>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n\t\t<LinkIncremental>false</LinkIncremental>\n\t\t<OutDir>$(SolutionDir)Temp\\$(Configuration)\\Libs\\</OutDir>\n\t\t<IntDir>$(SolutionDir)Temp\\$(Configuration)\\EditorLib\\</IntDir>\n\t\t<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>\n\t\t<TargetName>Editor</TargetName>\n\t\t<TargetExt>.lib</TargetExt>\n\t</PropertyGroup>\n\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n\t\t<LinkIncremental>false</LinkIncremental>\n\t\t<OutDir>$(SolutionDir)Temp\\$(Configuration)\\Libs\\</OutDir>\n\t\t<IntDir>$(SolutionDir)Temp\\$(Configuration)\\EditorLib\\</IntDir>\n\t\t<EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>\n\t\t<TargetName>Editor</TargetName>\n\t\t<TargetExt>.lib</TargetExt>\n\t</PropertyGroup>\n\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n\t\t<ClCompile>\n\t\t\t<PrecompiledHeader>Use</PrecompiledHeader>\n\t\t\t<WarningLevel>Level3</WarningLevel>\n\t\t\t<Optimization>Disabled</Optimization>\n\t\t\t<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;DEBUG;PLATFORM_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n\t\t\t<AdditionalIncludeDirectories>..\\..\\..\\o2Engine\\;..\\..\\..\\o2Engine\\Sources\\;..\\..\\Sources\\;..\\..\\..\\o2Engine\\Dependencies\\;..\\..\\..\\o2Engine\\Dependencies\\freetype\\include\\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n\t\t\t<BrowseInformation>false</BrowseInformation>\n\t\t\t<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n\t\t\t<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>\n\t\t\t<BasicRuntimeChecks>Default</BasicRuntimeChecks>\n\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n\t\t\t<MultiProcessorCompilation>true</MultiProcessorCompilation>\n\t\t\t<MinimalRebuild />\n\t\t\t<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>\n\t\t</ClCompile>\n\t\t<Link>\n\t\t\t<SubSystem>Console</SubSystem>\n\t\t\t<GenerateDebugInformation>Debug</GenerateDebugInformation>\n\t\t\t<AdditionalDependencies>$(SolutionDir)Tmp\\o2Engine_$(Configuration).lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n\t\t\t<AssemblyDebug>false</AssemblyDebug>\n\t\t\t<OptimizeReferences>false</OptimizeReferences>\n\t\t\t<EnableCOMDATFolding>false</EnableCOMDATFolding>\n\t\t\t<AdditionalOptions>/WHOLEARCHIVE:$(SolutionDir)Tmp\\o2Engine_$(Configuration).lib %(AdditionalOptions)</AdditionalOptions>\n\t\t</Link>\n\t\t<Bscmake>\n\t\t\t<PreserveSbr>true</PreserveSbr>\n\t\t</Bscmake>\n\t\t<BuildLog>\n\t\t\t<Path>$(IntDir)$(MSBuildProjectName).log</Path>\n\t\t</BuildLog>\n\t\t<PreBuildEvent>\n\t\t\t<Command>..\\..\\..\\CodeTool\\Bin\\CodeTool.exe -sources \"$(ProjectDir)..\\..\\Sources\" -msvs_project \"$(ProjectPath)\" -parent_projects \"$(ProjectDir)..\\..\\..\\Framework\\Sources\\o2\\CodeToolCache.xml\"</Command>\n\t\t</PreBuildEvent>\n\t\t<PreBuildEvent>\n\t\t\t<Message>Generating reflection</Message>\n\t\t</PreBuildEvent>\n\t</ItemDefinitionGroup>\n\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='FastDebug|Win32'\">\n\t\t<ClCompile>\n\t\t\t<PrecompiledHeader>Use</PrecompiledHeader>\n\t\t\t<WarningLevel>Level3</WarningLevel>\n\t\t\t<Optimization>Disabled</Optimization>\n\t\t\t<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;DEBUG;PLATFORM_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n\t\t\t<AdditionalIncludeDirectories>..\\..\\..\\o2Engine\\;..\\..\\..\\o2Engine\\Sources\\;..\\..\\Sources\\;..\\..\\..\\o2Engine\\Dependencies\\;..\\..\\..\\o2Engine\\Dependencies\\freetype\\include\\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n\t\t\t<BrowseInformation>false</BrowseInformation>\n\t\t\t<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n\t\t\t<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>\n\t\t\t<BasicRuntimeChecks>Default</BasicRuntimeChecks>\n\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n\t\t\t<MultiProcessorCompilation>true</MultiProcessorCompilation>\n\t\t\t<MinimalRebuild />\n\t\t\t<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>\n\t\t</ClCompile>\n\t\t<Link>\n\t\t\t<SubSystem>Console</SubSystem>\n\t\t\t<GenerateDebugInformation>Debug</GenerateDebugInformation>\n\t\t\t<AdditionalDependencies>$(SolutionDir)Tmp\\o2Engine_$(Configuration).lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n\t\t\t<AssemblyDebug>false</AssemblyDebug>\n\t\t\t<OptimizeReferences>false</OptimizeReferences>\n\t\t\t<EnableCOMDATFolding>false</EnableCOMDATFolding>\n\t\t\t<AdditionalOptions>/WHOLEARCHIVE:$(SolutionDir)Tmp\\o2Engine_$(Configuration).lib %(AdditionalOptions)</AdditionalOptions>\n\t\t</Link>\n\t\t<Bscmake>\n\t\t\t<PreserveSbr>true</PreserveSbr>\n\t\t</Bscmake>\n\t\t<BuildLog>\n\t\t\t<Path>$(IntDir)$(MSBuildProjectName).log</Path>\n\t\t</BuildLog>\n\t\t<PreBuildEvent>\n\t\t\t<Command>..\\..\\..\\CodeTool\\Bin\\CodeTool.exe -sources \"$(ProjectDir)..\\..\\Sources\" -msvs_project \"$(ProjectPath)\" -parent_projects \"$(ProjectDir)..\\..\\..\\Framework\\Sources\\o2\\CodeToolCache.xml\"</Command>\n\t\t</PreBuildEvent>\n\t\t<PreBuildEvent>\n\t\t\t<Message>Generating reflection</Message>\n\t\t</PreBuildEvent>\n\t</ItemDefinitionGroup>\n\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n\t\t<ClCompile>\n\t\t\t<PrecompiledHeader>Use</PrecompiledHeader>\n\t\t\t<WarningLevel>Level2</WarningLevel>\n\t\t\t<Optimization>Disabled</Optimization>\n\t\t\t<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;PLATFORM_WINDOWS;SCRIPTING_BACKEND_JERRYSCRIPT;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n\t\t\t<AdditionalIncludeDirectories>$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs\\FreeType\\include;$(SolutionDir)..\\..\\o2\\Framework;$(SolutionDir)..\\..\\o2\\Framework\\Sources;$(SolutionDir)..\\..\\o2\\Editor\\Sources;$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs;$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs\\rapidjson\\include;$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs\\jerryscript\\jerry-core\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n\t\t\t<MultiProcessorCompilation>true</MultiProcessorCompilation>\n\t\t\t<PrecompiledHeaderFile>o2Editor/stdafx.h</PrecompiledHeaderFile>\n\t\t\t<ConformanceMode>false</ConformanceMode>\n\t\t\t<LanguageStandard>stdcpp20</LanguageStandard>\n\t\t\t<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n\t\t\t<SDLCheck>true</SDLCheck>\n\t\t\t<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n\t\t\t<AdditionalOptions>/bigobj</AdditionalOptions>\n\t\t</ClCompile>\n\t\t<Link>\n\t\t\t<SubSystem>Console</SubSystem>\n\t\t\t<GenerateDebugInformation>true</GenerateDebugInformation>\n\t\t\t<AdditionalDependencies>$(SolutionDir)Lib\\o2engine.lib;%(AdditionalDependencies)</AdditionalDependencies>\n\t\t</Link>\n\t\t<BuildLog>\n\t\t\t<Path>$(IntDir)$(MSBuildProjectName).log</Path>\n\t\t</BuildLog>\n\t\t<PreBuildEvent>\n\t\t\t<Command>$(ProjectDir)..\\..\\..\\CodeTool\\Bin\\CodeTool.exe -sources \"$(ProjectDir)..\\..\\Sources\" -msvs_project \"$(ProjectPath)\" -parent_projects \"$(ProjectDir)..\\..\\..\\Framework\\Sources\\o2\\CodeToolCache.xml\"</Command>\n\t\t</PreBuildEvent>\n\t\t<PreBuildEvent>\n\t\t\t<Message>Reflection generation</Message>\n\t\t</PreBuildEvent>\n\t</ItemDefinitionGroup>\n\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='FastDebug|x64'\">\n\t\t<ClCompile>\n\t\t\t<PrecompiledHeader>Use</PrecompiledHeader>\n\t\t\t<WarningLevel>Level2</WarningLevel>\n\t\t\t<Optimization>Disabled</Optimization>\n\t\t\t<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;PLATFORM_WINDOWS;SCRIPTING_BACKEND_JERRYSCRIPT;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n\t\t\t<AdditionalIncludeDirectories>$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs\\FreeType\\include;$(SolutionDir)..\\..\\o2\\Framework;$(SolutionDir)..\\..\\o2\\Framework\\Sources;$(SolutionDir)..\\..\\o2\\Editor\\Sources;$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs;$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs\\rapidjson\\include;$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs\\jerryscript\\jerry-core\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n\t\t\t<MultiProcessorCompilation>true</MultiProcessorCompilation>\n\t\t\t<PrecompiledHeaderFile>o2Editor/stdafx.h</PrecompiledHeaderFile>\n\t\t\t<LanguageStandard>stdcpp20</LanguageStandard>\n\t\t\t<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n\t\t\t<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n\t\t\t<SDLCheck>true</SDLCheck>\n\t\t\t<BasicRuntimeChecks>Default</BasicRuntimeChecks>\n\t\t\t<AdditionalOptions>/bigobj</AdditionalOptions>\n\t\t</ClCompile>\n\t\t<Link>\n\t\t\t<SubSystem>Console</SubSystem>\n\t\t\t<GenerateDebugInformation>true</GenerateDebugInformation>\n\t\t\t<AdditionalDependencies>$(SolutionDir)Lib\\o2engine.lib;%(AdditionalDependencies)</AdditionalDependencies>\n\t\t</Link>\n\t\t<BuildLog>\n\t\t\t<Path>$(IntDir)$(MSBuildProjectName).log</Path>\n\t\t</BuildLog>\n\t\t<PreBuildEvent>\n\t\t\t<Command>$(ProjectDir)..\\..\\..\\CodeTool\\Bin\\CodeTool.exe -sources \"$(ProjectDir)..\\..\\Sources\" -msvs_project \"$(ProjectPath)\" -parent_projects \"$(ProjectDir)..\\..\\..\\Framework\\Sources\\o2\\CodeToolCache.xml\"</Command>\n\t\t</PreBuildEvent>\n\t\t<PreBuildEvent>\n\t\t\t<Message>Reflection generation</Message>\n\t\t</PreBuildEvent>\n\t</ItemDefinitionGroup>\n\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n\t\t<ClCompile>\n\t\t\t<WarningLevel>Level3</WarningLevel>\n\t\t\t<PrecompiledHeader>Use</PrecompiledHeader>\n\t\t\t<Optimization>MaxSpeed</Optimization>\n\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n\t\t\t<IntrinsicFunctions>true</IntrinsicFunctions>\n\t\t\t<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;PLATFORM_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n\t\t\t<AdditionalIncludeDirectories>..\\..\\..\\o2Engine\\;..\\..\\..\\o2Engine\\Sources\\;..\\..\\Sources\\;..\\..\\..\\o2Engine\\Dependencies\\;..\\..\\..\\o2Engine\\Dependencies\\freetype\\include\\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n\t\t\t<OmitFramePointers>true</OmitFramePointers>\n\t\t\t<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>\n\t\t\t<MultiProcessorCompilation>true</MultiProcessorCompilation>\n\t\t\t<WholeProgramOptimization>true</WholeProgramOptimization>\n\t\t\t<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\n\t\t\t<MinimalRebuild />\n\t\t\t<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\n\t\t\t<ExceptionHandling>false</ExceptionHandling>\n\t\t\t<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>\n\t\t\t<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>\n\t\t</ClCompile>\n\t\t<Link>\n\t\t\t<SubSystem>Console</SubSystem>\n\t\t\t<GenerateDebugInformation>Debug</GenerateDebugInformation>\n\t\t\t<EnableCOMDATFolding>true</EnableCOMDATFolding>\n\t\t\t<OptimizeReferences>true</OptimizeReferences>\n\t\t\t<AdditionalDependencies>$(SolutionDir)Tmp\\o2Engine_$(Configuration).lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n\t\t\t<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>\n\t\t\t<AdditionalOptions>/WHOLEARCHIVE:$(SolutionDir)Tmp\\o2Engine_$(Configuration).lib %(AdditionalOptions)</AdditionalOptions>\n\t\t</Link>\n\t\t<BuildLog>\n\t\t\t<Path>$(IntDir)$(MSBuildProjectName).log</Path>\n\t\t</BuildLog>\n\t\t<PreBuildEvent>\n\t\t\t<Command>..\\..\\..\\CodeTool\\Bin\\CodeTool.exe -sources \"$(ProjectDir)..\\..\\Sources\" -msvs_project \"$(ProjectPath)\" -parent_projects \"$(ProjectDir)..\\..\\..\\Framework\\Sources\\o2\\CodeToolCache.xml\"</Command>\n\t\t</PreBuildEvent>\n\t\t<PreBuildEvent>\n\t\t\t<Message>Generating reflection</Message>\n\t\t</PreBuildEvent>\n\t</ItemDefinitionGroup>\n\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n\t\t<ClCompile>\n\t\t\t<WarningLevel>Level2</WarningLevel>\n\t\t\t<PrecompiledHeader>Use</PrecompiledHeader>\n\t\t\t<Optimization>MaxSpeed</Optimization>\n\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n\t\t\t<IntrinsicFunctions>true</IntrinsicFunctions>\n\t\t\t<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;PLATFORM_WINDOWS;SCRIPTING_BACKEND_JERRYSCRIPT;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n\t\t\t<AdditionalIncludeDirectories>$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs\\FreeType\\include;$(SolutionDir)..\\..\\o2\\Framework;$(SolutionDir)..\\..\\o2\\Framework\\Sources;$(SolutionDir)..\\..\\o2\\Editor\\Sources;$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs;$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs\\rapidjson\\include;$(SolutionDir)..\\..\\o2\\Framework\\3rdPartyLibs\\jerryscript\\jerry-core\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n\t\t\t<MultiProcessorCompilation>true</MultiProcessorCompilation>\n\t\t\t<PrecompiledHeaderFile>o2Editor/stdafx.h</PrecompiledHeaderFile>\n\t\t\t<LanguageStandard>stdcpp20</LanguageStandard>\n\t\t\t<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>\n\t\t\t<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n\t\t\t<SDLCheck>false</SDLCheck>\n\t\t\t<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>\n\t\t\t<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\n\t\t\t<AdditionalOptions>/bigobj</AdditionalOptions>\n\t\t</ClCompile>\n\t\t<Link>\n\t\t\t<SubSystem>Console</SubSystem>\n\t\t\t<GenerateDebugInformation>true</GenerateDebugInformation>\n\t\t\t<EnableCOMDATFolding>true</EnableCOMDATFolding>\n\t\t\t<OptimizeReferences>true</OptimizeReferences>\n\t\t\t<AdditionalDependencies>$(SolutionDir)Lib\\o2engine.lib;%(AdditionalDependencies)</AdditionalDependencies>\n\t\t</Link>\n\t\t<BuildLog>\n\t\t\t<Path>$(IntDir)$(MSBuildProjectName).log</Path>\n\t\t</BuildLog>\n\t\t<PreBuildEvent>\n\t\t\t<Command>$(ProjectDir)..\\..\\..\\CodeTool\\Bin\\CodeTool.exe -sources \"$(ProjectDir)..\\..\\Sources\" -msvs_project \"$(ProjectPath)\" -parent_projects \"$(ProjectDir)..\\..\\..\\Framework\\Sources\\o2\\CodeToolCache.xml\"</Command>\n\t\t</PreBuildEvent>\n\t\t<PreBuildEvent>\n\t\t\t<Message>Reflection generation</Message>\n\t\t</PreBuildEvent>\n\t</ItemDefinitionGroup>\n\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n\t<ImportGroup Label=\"ExtensionTargets\" />\n\t<ItemGroup>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\AnimationKeysActions.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\AnimationWindow.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\CurvesSheet.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\KeyHandlesSheet.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\PropertiesListDlg.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\Timeline.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\AnimationKeyDragHandle.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\AnimationTrackWrapper.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\ITrackControl.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\KeyFramesTrackControl.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\MapKeyFramesTrackControl.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\Vec2KeyFramesTrackControl.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\Tree.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetIcon.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetsIconsScroll.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetsWindow.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\FoldersTree.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\ActionsList.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Create.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Delete.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Enable.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\IAction.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Lock.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\PropertyChange.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Reparent.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Select.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Transform.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\ColorPickerDlg.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\CurveEditorDlg.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\EditNameDlg.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\KeyEditDlg.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\System\\OpenSaveDialog.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\EditorApplication.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\EditorConfig.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\MenuPanel.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ActorProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\AssetProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BooleanProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BorderFloatProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BorderIntProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ColorProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ComponentProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\CurveProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\EnumMaskProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\EnumProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\FloatProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\FunctionProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\IntegerProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ObjectProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ObjectPtrProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\RectangleFloatProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\RectangleIntProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\SceneLayerRefProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\SceneLayersListProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ScriptValueProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\StringProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\TagProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\Vector2FloatProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\Vector2IntProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\VectorProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\WStringProperty.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\IObjectPropertiesViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\IPropertyField.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\ObjectViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\AnimationViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Assets\\ImageAssetViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Assets\\VectorFontAssetViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\CameraActorViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\AnimationStateViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\MeshComponentViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshBoneComponentViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshComponentViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshEditorLayer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\DefaultObjectPropertiesViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\SpriteViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\TextViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Properties.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\PropertiesContext.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\ToolsPanel.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\CustomFrameTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\FrameTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\IEditorTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MeshTopologyTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MeshWeightsTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MoveTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\RotateTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\ScaleTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SelectionTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SkeletonTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SplineTool.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UIRoot.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UIStyle\\BasicUIStyle.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UIStyle\\EditorUIStyle.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurveEditor\\CurveActions.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurveEditor\\CurvesEditor.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurvePreview.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\FrameScrollView.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\ImageSlicesEditorWidget.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\ScrollView.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\SplineEditor\\SplineEditor.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\SpoilerWithHead.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\TexturePreview.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\DockWindowPlace.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\DockableWindow.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\IEditorWindow.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\WindowsLayout.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\WindowsManager.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\GameWindow\\GameWindow.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\LogWindow\\LogWindow.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\ActorViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\AddComponentPanel.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorComponentViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorHeaderViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorPropertiesViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorTransformViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorComponentViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorHeaderViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorPropertiesViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorTransformViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\AssetPropertiesViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\DefaultPropertiesViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\IPropertiesViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\PropertiesWindow.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerHeadViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerLayoutViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerPropertiesViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerHeadViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerLayoutViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerPropertiesViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\WidgetLayerViewer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\LayersPopup.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneDragHandle.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneEditScreen.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneEditorLayer.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneWindow.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\DrawOrderTree.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\SceneHierarchyTree.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\SceneTree.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\TreeWindow.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Utils\\CommonTextures.h\" />\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\stdafx.h\" />\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\AnimationKeysActions.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\AnimationWindow.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\CurvesSheet.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\KeyHandlesSheet.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\PropertiesListDlg.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\Timeline.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\AnimationKeyDragHandle.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\ITrackControl.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\KeyFramesTrackControl.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\MapKeyFramesTrackControl.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\Vec2KeyFramesTrackControl.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\Tree.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetIcon.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetsIconsScroll.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetsWindow.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\FoldersTree.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\ActionsList.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Create.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Delete.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Enable.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\IAction.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Lock.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\PropertyChange.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Reparent.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Select.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Transform.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\ColorPickerDlg.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\CurveEditorDlg.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\EditNameDlg.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\KeyEditDlg.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\System\\Linux\\OpenSaveDialog.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\System\\Mac\\OpenSaveDialog.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\System\\Windows\\OpenSaveDialog.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\EditorApplication.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\EditorConfig.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\MenuPanel.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ActorProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\AssetProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BooleanProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BorderFloatProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BorderIntProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ColorProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ComponentProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\CurveProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\EnumProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\FloatProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\FunctionProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\IntegerProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ObjectProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ObjectPtrProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\RectangleFloatProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\RectangleIntProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\SceneLayerRefProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\SceneLayersListProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ScriptValueProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\StringProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\TagProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\Vector2FloatProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\Vector2IntProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\VectorProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\WStringProperty.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\IObjectPropertiesViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\IPropertyField.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\ObjectViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\AnimationViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Assets\\ImageAssetViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Assets\\VectorFontAssetViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\CameraActorViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\AnimationStateViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\MeshComponentViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshBoneComponentViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshComponentViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshEditorLayer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\DefaultObjectPropertiesViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\SpriteViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\TextViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Properties.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\PropertiesContext.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\ToolsPanel.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\CustomFrameTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\FrameTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\IEditorTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MeshTopologyTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MeshWeightsTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MoveTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\RotateTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\ScaleTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SelectionTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SkeletonTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SplineTool.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UIRoot.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UIStyle\\BasicUIStyle.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UIStyle\\EditorUIStyle.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurveEditor\\CurveActions.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurveEditor\\CurvesEditor.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurvePreview.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\FrameScrollView.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\ImageSlicesEditorWidget.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\ScrollView.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\SplineEditor\\SplineEditor.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\SpoilerWithHead.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\TexturePreview.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\DockWindowPlace.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\DockableWindow.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\IEditorWindow.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\WindowsLayout.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\WindowsManager.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\GameWindow\\GameWindow.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\LogWindow\\LogWindow.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\ActorViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\AddComponentPanel.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorComponentViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorHeaderViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorPropertiesViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorTransformViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorComponentViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorHeaderViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorPropertiesViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorTransformViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\AssetPropertiesViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\DefaultPropertiesViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\IPropertiesViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\PropertiesWindow.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerHeadViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerLayoutViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerPropertiesViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerHeadViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerLayoutViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerPropertiesViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\WidgetLayerViewer.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\LayersPopup.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneDragHandle.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneEditScreen.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneWindow.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\DrawOrderTree.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\SceneHierarchyTree.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\SceneTree.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\TreeWindow.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Utils\\CommonTextures.cpp\" />\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\stdafx.cpp\">\n\t\t\t<PrecompiledHeader>Create</PrecompiledHeader>\n\t\t\t<PrecompiledHeader>Create</PrecompiledHeader>\n\t\t</ClCompile>\n\t</ItemGroup>\n</Project>\n"
  },
  {
    "path": "Editor/Platforms/Windows/Editor.vcxproj.filters",
    "content": "<?xml version=\"1.0\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\t<ItemGroup>\n\t\t<Filter Include=\"Sources\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\AnimationWindow\" />\n\t\t<Filter Include=\"Sources\\o2Editor\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\AnimationWindow\\TrackControls\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\AssetsWindow\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Actions\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Dialogs\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Properties\\Basic\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Properties\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Tools\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\UI\\CurveEditor\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\UI\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\UIStyle\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\WindowsSystem\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\LogWindow\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\PropertiesWindow\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\SceneWindow\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\TreeWindow\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\GameWindow\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Properties\\Objects\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Properties\\Objects\\Assets\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Properties\\Objects\\Components\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Dialogs\\System\">\n\t\t\t<UniqueIdentifier>{aa3f22a5-4b80-4789-a8d7-b2712c76e790}</UniqueIdentifier>\n\t\t</Filter>\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Dialogs\\System\\Windows\">\n\t\t\t<UniqueIdentifier>{41532706-fbc0-4598-ba11-545e96cab0e0}</UniqueIdentifier>\n\t\t</Filter>\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\UI\\SplineEditor\">\n\t\t\t<UniqueIdentifier>{1863c2cd-421f-497c-84ca-9ceeb95f1c4a}</UniqueIdentifier>\n\t\t</Filter>\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Dialogs\\System\\Mac\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Core\\Dialogs\\System\\Linux\" />\n\t\t<Filter Include=\"Sources\\o2Editor\\Utils\" />\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\AnimationKeysActions.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\AnimationWindow.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\CurvesSheet.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\KeyHandlesSheet.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\PropertiesListDlg.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\Timeline.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\AnimationKeyDragHandle.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\AnimationTrackWrapper.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\ITrackControl.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\KeyFramesTrackControl.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\MapKeyFramesTrackControl.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\Vec2KeyFramesTrackControl.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\Tree.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetIcon.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AssetsWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetsIconsScroll.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AssetsWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetsWindow.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AssetsWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\FoldersTree.h\">\n\t\t\t<Filter>Sources\\o2Editor\\AssetsWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\ActionsList.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Create.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Delete.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Enable.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\IAction.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Lock.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\PropertyChange.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Reparent.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Select.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Transform.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\ColorPickerDlg.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\CurveEditorDlg.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\EditNameDlg.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\KeyEditDlg.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\System\\OpenSaveDialog.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs\\System</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\EditorApplication.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\EditorConfig.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\MenuPanel.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ActorProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\AssetProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BooleanProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BorderFloatProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BorderIntProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ColorProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ComponentProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\CurveProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\EnumMaskProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\EnumProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\FloatProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\FunctionProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\IntegerProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ObjectProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ObjectPtrProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\RectangleFloatProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\RectangleIntProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\SceneLayerRefProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\SceneLayersListProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ScriptValueProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\StringProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\TagProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\Vector2FloatProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\Vector2IntProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\VectorProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\WStringProperty.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\IObjectPropertiesViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\IPropertyField.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\ObjectViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\AnimationViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Assets\\ImageAssetViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Assets</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Assets\\VectorFontAssetViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Assets</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\CameraActorViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\AnimationStateViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\MeshComponentViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshBoneComponentViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshComponentViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshEditorLayer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\DefaultObjectPropertiesViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\SpriteViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\TextViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Properties.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\PropertiesContext.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\ToolsPanel.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\CustomFrameTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\FrameTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\IEditorTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MeshTopologyTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MeshWeightsTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MoveTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\RotateTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\ScaleTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SelectionTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SkeletonTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SplineTool.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UIRoot.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UIStyle\\BasicUIStyle.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UIStyle</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UIStyle\\EditorUIStyle.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UIStyle</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurveEditor\\CurveActions.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI\\CurveEditor</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurveEditor\\CurvesEditor.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI\\CurveEditor</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurvePreview.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\FrameScrollView.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\ImageSlicesEditorWidget.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\ScrollView.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\SplineEditor\\SplineEditor.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI\\SplineEditor</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\SpoilerWithHead.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\TexturePreview.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\DockWindowPlace.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\DockableWindow.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\IEditorWindow.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\WindowsLayout.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\WindowsManager.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\GameWindow\\GameWindow.h\">\n\t\t\t<Filter>Sources\\o2Editor\\GameWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\LogWindow\\LogWindow.h\">\n\t\t\t<Filter>Sources\\o2Editor\\LogWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\ActorViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\AddComponentPanel.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorComponentViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorHeaderViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorPropertiesViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorTransformViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorComponentViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorHeaderViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorPropertiesViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorTransformViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\AssetPropertiesViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\DefaultPropertiesViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\IPropertiesViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\PropertiesWindow.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerHeadViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerLayoutViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerPropertiesViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerHeadViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerLayoutViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerPropertiesViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\WidgetLayerViewer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\LayersPopup.h\">\n\t\t\t<Filter>Sources\\o2Editor\\SceneWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneDragHandle.h\">\n\t\t\t<Filter>Sources\\o2Editor\\SceneWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneEditScreen.h\">\n\t\t\t<Filter>Sources\\o2Editor\\SceneWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneEditorLayer.h\">\n\t\t\t<Filter>Sources\\o2Editor\\SceneWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneWindow.h\">\n\t\t\t<Filter>Sources\\o2Editor\\SceneWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\DrawOrderTree.h\">\n\t\t\t<Filter>Sources\\o2Editor\\TreeWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\SceneHierarchyTree.h\">\n\t\t\t<Filter>Sources\\o2Editor\\TreeWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\SceneTree.h\">\n\t\t\t<Filter>Sources\\o2Editor\\TreeWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\TreeWindow.h\">\n\t\t\t<Filter>Sources\\o2Editor\\TreeWindow</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\Utils\\CommonTextures.h\">\n\t\t\t<Filter>Sources\\o2Editor\\Utils</Filter>\n\t\t</ClInclude>\n\t\t<ClInclude Include=\"..\\..\\Sources\\o2Editor\\stdafx.h\">\n\t\t\t<Filter>Sources\\o2Editor</Filter>\n\t\t</ClInclude>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\AnimationKeysActions.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\AnimationWindow.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\CurvesSheet.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\KeyHandlesSheet.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\PropertiesListDlg.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\Timeline.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\AnimationKeyDragHandle.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\ITrackControl.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\KeyFramesTrackControl.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\MapKeyFramesTrackControl.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\TrackControls\\Vec2KeyFramesTrackControl.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow\\TrackControls</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AnimationWindow\\Tree.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AnimationWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetIcon.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AssetsWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetsIconsScroll.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AssetsWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\AssetsWindow.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AssetsWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\AssetsWindow\\FoldersTree.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\AssetsWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\ActionsList.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Create.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Delete.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Enable.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\IAction.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Lock.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\PropertyChange.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Reparent.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Select.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Actions\\Transform.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Actions</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\ColorPickerDlg.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\CurveEditorDlg.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\EditNameDlg.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\KeyEditDlg.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\System\\Linux\\OpenSaveDialog.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs\\System\\Linux</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\System\\Mac\\OpenSaveDialog.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs\\System\\Mac</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Dialogs\\System\\Windows\\OpenSaveDialog.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Dialogs\\System\\Windows</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\EditorApplication.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\EditorConfig.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\MenuPanel.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ActorProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\AssetProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BooleanProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BorderFloatProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\BorderIntProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ColorProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ComponentProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\CurveProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\EnumProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\FloatProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\FunctionProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\IntegerProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ObjectProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ObjectPtrProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\RectangleFloatProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\RectangleIntProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\SceneLayerRefProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\SceneLayersListProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\ScriptValueProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\StringProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\TagProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\Vector2FloatProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\Vector2IntProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\VectorProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Basic\\WStringProperty.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Basic</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\IObjectPropertiesViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\IPropertyField.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\ObjectViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\AnimationViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Assets\\ImageAssetViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Assets</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Assets\\VectorFontAssetViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Assets</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\CameraActorViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\AnimationStateViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\MeshComponentViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshBoneComponentViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshComponentViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh\\SkinningMeshEditorLayer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects\\Components\\SkinnedMesh</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\DefaultObjectPropertiesViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\SpriteViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Objects\\TextViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties\\Objects</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\Properties.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Properties\\PropertiesContext.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Properties</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\ToolsPanel.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\CustomFrameTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\FrameTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\IEditorTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MeshTopologyTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MeshWeightsTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\MoveTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\RotateTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\ScaleTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SelectionTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SkeletonTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\Tools\\SplineTool.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\Tools</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UIRoot.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UIStyle\\BasicUIStyle.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UIStyle</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UIStyle\\EditorUIStyle.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UIStyle</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurveEditor\\CurveActions.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI\\CurveEditor</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurveEditor\\CurvesEditor.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI\\CurveEditor</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\CurvePreview.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\FrameScrollView.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\ImageSlicesEditorWidget.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\ScrollView.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\SplineEditor\\SplineEditor.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI\\SplineEditor</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\SpoilerWithHead.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\UI\\TexturePreview.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\UI</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\DockWindowPlace.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\DockableWindow.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\IEditorWindow.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\WindowsLayout.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Core\\WindowsSystem\\WindowsManager.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Core\\WindowsSystem</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\GameWindow\\GameWindow.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\GameWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\LogWindow\\LogWindow.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\LogWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\ActorViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\AddComponentPanel.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorComponentViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorHeaderViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorPropertiesViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\DefaultActorTransformViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorComponentViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorHeaderViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorPropertiesViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\ActorsViewer\\IActorTransformViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\ActorsViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\AssetPropertiesViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\DefaultPropertiesViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\IPropertiesViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\PropertiesWindow.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerHeadViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerLayoutViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\DefaultWidgetLayerPropertiesViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerHeadViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerLayoutViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\IWidgetLayerPropertiesViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer\\WidgetLayerViewer.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\PropertiesWindow\\WidgetLayerViewer</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\LayersPopup.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\SceneWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneDragHandle.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\SceneWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneEditScreen.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\SceneWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\SceneWindow\\SceneWindow.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\SceneWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\DrawOrderTree.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\TreeWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\SceneHierarchyTree.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\TreeWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\SceneTree.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\TreeWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\TreeWindow\\TreeWindow.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\TreeWindow</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\Utils\\CommonTextures.cpp\">\n\t\t\t<Filter>Sources\\o2Editor\\Utils</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"..\\..\\Sources\\o2Editor\\stdafx.cpp\">\n\t\t\t<Filter>Sources\\o2Editor</Filter>\n\t\t</ClCompile>\n\t</ItemGroup>\n</Project>\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/ActionsList.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ActionsList.h\"\n\n#include \"o2Editor/Actions/PropertyChange.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n\n\tActionsList::ActionsList():\n        ActionsList(nullptr)\n\t{}\n\n    ActionsList::ActionsList(RefCounter* refCounter) :\n        RefCounterable(refCounter)\n    {}\n\n\tActionsList::~ActionsList()\n    {}\n\n    int ActionsList::GetUndoActionsCount() const\n    {\n        return mActions.Count();\n    }\n\n    int ActionsList::GetRedoActionsCount() const\n    {\n        return mForwardActions.Count();\n    }\n\n    String ActionsList::GetLastActionName() const\n    {\n        if (mActions.Count() > 0)\n            return mActions.Last()->GetName();\n\n        return \"\";\n    }\n\n    String ActionsList::GetNextForwardActionName() const\n    {\n        if (mForwardActions.Count() > 0)\n            return mForwardActions.Last()->GetName();\n\n        return \"\";\n    }\n\n    void ActionsList::UndoAction()\n    {\n        if (mActions.Count() > 0)\n        {\n            auto last = mActions.Last();\n            last->Undo();\n            mForwardActions.Add(mActions.PopBack());\n            OnActionUndo(last);\n        }\n    }\n\n    void ActionsList::RedoAction()\n    {\n        if (mForwardActions.Count() > 0)\n        {\n            auto last = mForwardActions.Last();\n            last->Redo();\n            mActions.Add(mForwardActions.PopBack());\n            OnActionDone(last);\n        }\n    }\n\n    void ActionsList::DoneAction(const Ref<IAction>& action)\n    {\n        mActions.Add(action);\n\n        mForwardActions.Clear();\n\n        OnActionDone(action);\n    }\n\n    void ActionsList::DoneActorPropertyChangeAction(const String& path, const Vector<DataDocument>& prevValue,\n                                                    const Vector<DataDocument>& newValue)\n    {\n        auto action = mmake<PropertyChangeAction>(o2EditorSceneScreen.GetSelectedObjects(), path, prevValue, newValue);\n\n        DoneAction(action);\n    }\n\n    void ActionsList::ResetUndoActions()\n    {\n        mActions.Clear();\n        mForwardActions.Clear();\n    }\n\n    const Vector<Ref<IAction>> ActionsList::GetUndoActions() const\n    {\n        return mActions;\n    }\n\n    const Vector<Ref<IAction>> ActionsList::GetRedoActions() const\n    {\n        return mForwardActions;\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/ActionsList.h",
    "content": "#pragma once\n\n#include \"o2Editor/Actions/IAction.h\"\n\nnamespace Editor\n{\n    // ---------------------------------------------------\n    // Done editor actions list. Can undo and redo actions\n    // ---------------------------------------------------\n    class ActionsList: public RefCounterable\n    {\n    public:\n\t\t// Default constructor\n        ActionsList();\n\n\t\t// Constructor with ref counter\n\t\texplicit ActionsList(RefCounter* refCounter);\n\n        // Destructor. Destroys stored actions\n        ~ActionsList();\n\n        // Returns count of undo actions\n        int GetUndoActionsCount() const;\n\n        // Returns count of redo actions\n        int GetRedoActionsCount() const;\n\n        // Returns last action name\n        String GetLastActionName() const;\n\n        // Returns next forward action name\n        String GetNextForwardActionName() const;\n\n        // Undo last action\n        void UndoAction();\n\n        // Redo next action\n        void RedoAction();\n\n        // Called when action was done\n        void DoneAction(const Ref<IAction>& action);\n\n        // Called when some property changed, stores action for undo\n        void DoneActorPropertyChangeAction(const String& path, \n                                           const Vector<DataDocument>& prevValue, const Vector<DataDocument>& newValue);\n\n        // Resets undo and redo actions\n        void ResetUndoActions();\n\n        // Returns done actions\n        const Vector<Ref<IAction>> GetUndoActions() const;\n\n        // Returns redo actions\n        const Vector<Ref<IAction>> GetRedoActions() const;\n\n    protected:\n        // Called when an action has been done (including redo)\n        virtual void OnActionDone(const Ref<IAction>& action) {}\n\n        // Called when an action has been undone\n        virtual void OnActionUndo(const Ref<IAction>& action) {}\n\n    protected:\n        Vector<Ref<IAction>> mActions;        // Done actions\n        Vector<Ref<IAction>> mForwardActions; // Forward actions, what you can redo\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Create.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Create.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\nnamespace Editor\n{\n    CreateAction::CreateAction()\n    {}\n\n    CreateAction::CreateAction(const Vector<Ref<SceneEditableObject>>& objects, \n                               const Ref<SceneEditableObject>& parent, const Ref<SceneEditableObject>& prevObject)\n    {\n        objectsIds = objects.Convert<SceneUID>([](auto& x) { return x->GetID(); });\n\n        objectsData.Set(objects);\n\n        insertParentId = parent ? parent->GetID() : 0;\n        insertPrevObjectId = prevObject ? prevObject->GetID() : 0;\n    }\n\n    String CreateAction::GetName() const\n    {\n        return \"Create objects\";\n    }\n\n    void CreateAction::Redo()\n    {\n        auto parent = o2Scene.GetEditableObjectByID(insertParentId);\n        auto prevObject = o2Scene.GetEditableObjectByID(insertPrevObjectId);\n        Vector<Ref<SceneEditableObject>> objects;\n\n        if (parent)\n        {\n            int insertIdx = parent->GetEditableChildren().IndexOf(prevObject) + 1;\n\n            objectsData.Get(objects);\n\n            for (auto& object : objects)\n                parent->AddEditableChild(object, insertIdx++);\n        }\n        else\n        {\n            int insertIdx = o2Scene.GetRootEditableObjects().IndexOf(prevObject) + 1;\n\n            objectsData.Get(objects);\n\n            for (auto& object : objects)\n                object->SetIndexInSiblings(insertIdx++);\n        }\n\n        o2EditorTree.HighlightObjectTreeNode(objects.Last());\n        o2EditorSceneScreen.SelectObjectsWithoutAction(objects, false);\n    }\n\n    void CreateAction::Undo()\n    {\n        for (auto& objectId : objectsIds)\n        {\n            auto object = o2Scene.GetEditableObjectByID(objectId);\n//             if (object)\n//                 delete object;\n        }\n\n        o2EditorSceneScreen.ClearSelectionWithoutAction();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::CreateAction, Editor__CreateAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Create.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Actions/IAction.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // -----------------------------\n    // Scene objects creation action\n    // -----------------------------\n    class CreateAction: public IAction\n    {\n    public:\n        DataDocument     objectsData;        // Serialized created objects\n        Vector<SceneUID> objectsIds;         // Created objects ids\n        SceneUID         insertParentId;     // Parent id\n        SceneUID         insertPrevObjectId; // Previous object id\n\n    public:\n        // Default constructor\n        CreateAction();\n\n        // Constructor wit created actors and their places in their parents\n        CreateAction(const Vector<Ref<SceneEditableObject>>& objects, const Ref<SceneEditableObject>& parent, const Ref<SceneEditableObject>& prevObject);\n\n        // Returns name of action\n        String GetName() const override;\n\n        // Creates all objects again\n        void Redo() override;\n\n        // Removes created objects\n        void Undo() override;\n\n        SERIALIZABLE(CreateAction);\n    };\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::CreateAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CreateAction)\n{\n    FIELD().PUBLIC().NAME(objectsData);\n    FIELD().PUBLIC().NAME(objectsIds);\n    FIELD().PUBLIC().NAME(insertParentId);\n    FIELD().PUBLIC().NAME(insertPrevObjectId);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CreateAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Ref<SceneEditableObject>>&, const Ref<SceneEditableObject>&, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Delete.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Delete.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\nnamespace Editor\n{\n\n    DeleteAction::DeleteAction()\n    {}\n\n    DeleteAction::DeleteAction(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        for (auto& object : objects)\n        {\n            ObjectInfo info;\n            info.objectData.Set(object);\n            info.idx = o2Scene.GetObjectHierarchyIdx(object);\n\n            if (auto parent = object->GetEditableParent())\n            {\n                info.parentId = parent->GetID();\n\n                auto parentChilds = parent->GetEditableChildren();\n                info.prevObjectId = 0;\n\n                for (auto& child : parentChilds)\n                {\n                    if (child == object)\n                        break;\n\n                    info.prevObjectId = child->GetID();\n                }\n            }\n            else\n            {\n                info.parentId = 0;\n\n                auto rootObjects = o2Scene.GetRootEditableObjects();\n                info.prevObjectId = 0;\n\n                for (auto& child : rootObjects)\n                {\n                    if (child == object)\n                        break;\n\n                    info.prevObjectId = child->GetID();\n                }\n            }\n\n            objectsInfos.Add(info);\n        }\n\n        objectsInfos.Sort([](auto& a, auto& b) { return a.idx < b.idx; });\n    }\n\n    String DeleteAction::GetName() const\n    {\n        return \"Actors deletion\";\n    }\n\n    void DeleteAction::Redo()\n    {\n        for (auto& info : objectsInfos)\n        {\n            auto object = o2Scene.GetEditableObjectByID((SceneUID)info.objectData[\"Value\"][\"Id\"]);\n//             if (object)\n//                 delete object;\n        }\n\n        o2EditorSceneScreen.ClearSelectionWithoutAction();\n        o2EditorTree.UpdateTreeView();\n    }\n\n    void DeleteAction::Undo()\n    {\n        Ref<SceneEditableObject> lastRestored;\n\n        for (auto& info : objectsInfos)\n        {\n            auto parent = o2Scene.GetEditableObjectByID(info.parentId);\n            if (parent)\n            {\n                SceneUID prevId = info.prevObjectId;\n                int idx = parent->GetEditableChildren().IndexOf([=](auto& x) { return x->GetID() == prevId; }) + 1;\n\n                Ref<SceneEditableObject> newObject;\n                info.objectData.Get(newObject);\n                parent->AddEditableChild(newObject, idx);\n\n                o2EditorSceneScreen.SelectObjectWithoutAction(newObject);\n                lastRestored = newObject;\n            }\n            else\n            {\n                int idx = o2Scene.GetRootActors().IndexOf([&](auto& x) { return x->GetID() == info.prevObjectId; }) + 1;\n\n                Ref<SceneEditableObject> newObject;\n                info.objectData.Get(newObject);\n                newObject->SetIndexInSiblings(idx);\n\n                o2EditorSceneScreen.SelectObjectWithoutAction(newObject);\n                lastRestored = newObject;\n            }\n        }\n\n        o2EditorTree.HighlightObjectTreeNode(lastRestored);\n        o2EditorTree.UpdateTreeView();\n    }\n\n    bool DeleteAction::ObjectInfo::operator==(const ObjectInfo& other) const\n    {\n        return objectData == other.objectData && parentId == other.parentId && prevObjectId == other.prevObjectId;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DeleteAction, Editor__DeleteAction);\n\nDECLARE_CLASS(Editor::DeleteAction::ObjectInfo, Editor__DeleteAction__ObjectInfo);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Delete.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Actions/IAction.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // ---------------------\n    // Delete objects action\n    // ---------------------\n    class DeleteAction: public IAction\n    {\n    public:\n        class ObjectInfo: public ISerializable\n        {\n        public:\n            DataDocument objectData;   // Serialized object @SERIALIZABLE\n            SceneUID     parentId;       // Previous object parent @SERIALIZABLE\n            SceneUID     prevObjectId; // Previous object sibling @SERIALIZABLE\n            int          idx;          // Index in children @SERIALIZABLE\n\n            bool operator==(const ObjectInfo& other) const;\n\n            SERIALIZABLE(ObjectInfo);\n        };\n\n    public:\n        Vector<ObjectInfo> objectsInfos; // Deleted objects infos\n\n    public:\n        // Default constructor\n        DeleteAction();\n\n        // Constructor with objects, that will be deleted\n        DeleteAction(const Vector<Ref<SceneEditableObject>>& objects);\n\n        // Returns name of action\n        String GetName() const override;\n\n        // Deletes objects again\n        void Redo() override;\n\n        // Reverting deleted objects\n        void Undo() override;\n\n        SERIALIZABLE(DeleteAction);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DeleteAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DeleteAction)\n{\n    FIELD().PUBLIC().NAME(objectsInfos);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DeleteAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::DeleteAction::ObjectInfo)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DeleteAction::ObjectInfo)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(objectData);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(parentId);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(prevObjectId);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(idx);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DeleteAction::ObjectInfo)\n{\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Enable.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Enable.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    EnableAction::EnableAction()\n    {}\n\n    EnableAction::EnableAction(const Vector<Ref<SceneEditableObject>>& objects, bool enable):\n        enable(enable)\n    {\n        objectsIds = objects.Convert<SceneUID>([](auto& x) { return x->GetID(); });\n    }\n\n    String EnableAction::GetName() const\n    {\n        return enable ? \"Enable actors\" : \"Disable actors\";\n    }\n\n    void EnableAction::Redo()\n    {\n        for (auto& id : objectsIds)\n        {\n            auto object = o2Scene.GetEditableObjectByID(id);\n            if (object)\n                object->SetEnabled(enable);\n        }\n    }\n\n    void EnableAction::Undo()\n    {\n        for (auto& id : objectsIds)\n        {\n            auto object = o2Scene.GetEditableObjectByID(id);\n            if (object)\n                object->SetEnabled(!enable);\n        }\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::EnableAction, Editor__EnableAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Enable.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Actions/IAction.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // -------------------------------\n    // Enable or disable scene objects\n    // -------------------------------\n    class EnableAction: public IAction\n    {\n    public:\n        Vector<SceneUID> objectsIds; // Changed objects\n        bool             enable;     // Enabled or disabled\n\n    public:\n        // Default constructor\n        EnableAction();\n\n        // COnstructor with enabled or disabled objects\n        EnableAction(const Vector<Ref<SceneEditableObject>>& objects, bool enable);\n\n        // Returns name of action\n        String GetName() const override;\n\n        // Enable or disable again\n        void Redo() override;\n\n        // Reverts objects to previous state\n        void Undo() override;\n\n        SERIALIZABLE(EnableAction);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::EnableAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::EnableAction)\n{\n    FIELD().PUBLIC().NAME(objectsIds);\n    FIELD().PUBLIC().NAME(enable);\n}\nEND_META;\nCLASS_METHODS_META(Editor::EnableAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Ref<SceneEditableObject>>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/IAction.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IAction.h\"\n// --- META ---\n\nDECLARE_CLASS(Editor::IAction, Editor__IAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/IAction.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // -----------------------------\n    // Basic editor action interface\n    // -----------------------------\n    class IAction: public ISerializable, public RefCounterable\n    {\n    public:\n        // VIrtual destructor\n        virtual ~IAction() {}\n\n        // Returns name of action\n        virtual String GetName() const { return \"Unknown\"; }\n\n        // Does action again\n        virtual void Redo() {}\n\n        // Undoing action\n        virtual void Undo() {}\n\n        SERIALIZABLE(IAction);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IAction)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IAction)\n{\n}\nEND_META;\nCLASS_METHODS_META(Editor::IAction)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Lock.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Lock.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    LockAction::LockAction()\n    {}\n\n    LockAction::LockAction(const Vector<Ref<SceneEditableObject>>& objects, bool lock):\n        lock(lock)\n    {\n        objectsIds = objects.Convert<SceneUID>([](auto& x) { return x->GetID(); });\n    }\n\n    String LockAction::GetName() const\n    {\n        return lock ? \"Lock actors\" : \"Unlock actors\";\n    }\n\n    void LockAction::Redo()\n    {\n        for (auto& id : objectsIds)\n        {\n            auto object = o2Scene.GetEditableObjectByID(id);\n            if (object)\n                object->SetLocked(lock);\n        }\n    }\n\n    void LockAction::Undo()\n    {\n        for (auto& id : objectsIds)\n        {\n            auto object = o2Scene.GetEditableObjectByID(id);\n            if (object)\n                object->SetLocked(!lock);\n        }\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::LockAction, Editor__LockAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Lock.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Actions/IAction.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // ----------------------------------\n    // Locking or unlocking object action\n    // ----------------------------------\n    class LockAction: public IAction\n    {\n    public:\n        Vector<SceneUID> objectsIds; // Changed objects\n        bool             lock;       // Lock state\n\n    public:\n        // Default constructor\n        LockAction();\n\n        // Constructor with list of objects\n        LockAction(const Vector<Ref<SceneEditableObject>>& object, bool lock);\n\n        // Return name of action\n        String GetName() const override;\n\n        // Sets stored lock\n        void Redo() override;\n\n        // Sets previous lock \n        void Undo() override;\n\n        SERIALIZABLE(LockAction);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::LockAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::LockAction)\n{\n    FIELD().PUBLIC().NAME(objectsIds);\n    FIELD().PUBLIC().NAME(lock);\n}\nEND_META;\nCLASS_METHODS_META(Editor::LockAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Ref<SceneEditableObject>>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/PropertyChange.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"PropertyChange.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n\nnamespace Editor\n{\n\tPropertyChangeAction::PropertyChangeAction()\n\t{\n\t}\n\n\tPropertyChangeAction::PropertyChangeAction(const Vector<Ref<SceneEditableObject>>& objects,\n\t\t\t\t\t\t\t\t\t\t\t   const String& propertyPath,\n\t\t\t\t\t\t\t\t\t\t\t   const Vector<DataDocument>& beforeValues,\n\t\t\t\t\t\t\t\t\t\t\t   const Vector<DataDocument>& afterValues) :\n\t\tobjectsIds(objects.Convert<SceneUID>([](const auto& x) { return x->GetID(); })),\n\t\tpropertyPath(propertyPath), beforeValues(beforeValues), afterValues(afterValues)\n\t{\n\t}\n\n\tString PropertyChangeAction::GetName() const\n\t{\n\t\treturn \"Property changed\";\n\t}\n\n\tvoid PropertyChangeAction::Redo()\n\t{\n\t\tSetProperties(afterValues);\n\t}\n\n\tvoid PropertyChangeAction::Undo()\n\t{\n\t\tSetProperties(beforeValues);\n\t}\n\n\tvoid PropertyChangeAction::SetProperties(Vector<DataDocument>& values)\n\t{\n\t\tVector<Ref<SceneEditableObject>> objects = objectsIds.Convert<Ref<SceneEditableObject>>([](SceneUID id) {\n\t\t\treturn o2Scene.GetEditableObjectByID(id); });\n\n\t\tint idx = 0;\n\t\tfor (auto& object : objects)\n\t\t{\n\t\t\tif (!object)\n\t\t\t\tcontinue;\n\n\t\t\tconst FieldInfo* fi = nullptr;\n\t\t\tvoid* ptr = nullptr;\n\n\t\t\tif (auto objectType = dynamic_cast<const ObjectType*>(&object->GetType()))\n\t\t\t{\n\t\t\t\tvoid* realTypeObject = objectType->DynamicCastFromIObject(dynamic_cast<IObject*>(object.Get()));\n\t\t\t\tptr = objectType->GetFieldPtr(realTypeObject, propertyPath, fi);\n\t\t\t}\n\n\t\t\tif (fi && ptr)\n\t\t\t\tfi->Deserialize(ptr, values[idx]);\n\n\t\t\tobject->OnChanged();\n\n\t\t\tidx++;\n\t\t}\n\t}\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::PropertyChangeAction, Editor__PropertyChangeAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/PropertyChange.h",
    "content": "#pragma once\n\n#include \"o2Editor/Actions/IAction.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // -----------------------------------------------------\n    // Scene object property change action.\n    // Storing path to value, values before and after change\n    // -----------------------------------------------------\n    class PropertyChangeAction: public IAction\n    {\n    public:\n        Vector<SceneUID>     objectsIds;   // Changed objects\n        String               propertyPath; // Path to property\n        Vector<DataDocument> beforeValues; // Serialized values before change\n        Vector<DataDocument> afterValues;  // Serialized values after change\n\n    public:\n        // Default constructor\n        PropertyChangeAction();\n\n        // Constructor with all data\n        PropertyChangeAction(const Vector<Ref<SceneEditableObject>>& objects,\n                             const String& propertyPath,\n                             const Vector<DataDocument>& beforeValues,\n                             const Vector<DataDocument>& afterValues);\n\n        // Returns name of action\n        String GetName() const override;\n\n        // Sets object's properties value as after change\n        void Redo() override;\n\n        // Sets object's properties value as before change\n        void Undo() override;\n\n        SERIALIZABLE(PropertyChangeAction);\n\n    protected:\n        // Sets object's properties values\n        void SetProperties(Vector<DataDocument>& value);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::PropertyChangeAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::PropertyChangeAction)\n{\n    FIELD().PUBLIC().NAME(objectsIds);\n    FIELD().PUBLIC().NAME(propertyPath);\n    FIELD().PUBLIC().NAME(beforeValues);\n    FIELD().PUBLIC().NAME(afterValues);\n}\nEND_META;\nCLASS_METHODS_META(Editor::PropertyChangeAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Ref<SceneEditableObject>>&, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetProperties, Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Reparent.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Reparent.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\nnamespace Editor\n{\n    ReparentAction::ReparentAction()\n    {}\n\n    ReparentAction::ReparentAction(const Vector<Ref<SceneEditableObject>>& beginObjects)\n    {\n        for (auto& object : beginObjects)\n        {\n            ObjectInfo info;\n\n            auto parent = object->GetEditableParent();\n\n            Vector<Ref<SceneEditableObject>> parentChildren = parent ? \n                parent->GetEditableChildren() : \n                DynamicCastVector<SceneEditableObject>(o2Scene.GetRootActors());\n\n            int actorIdx = parentChildren.IndexOf(object);\n\n            info.objectId = object->GetID();\n            info.objectHierarchyIdx = o2Scene.GetObjectHierarchyIdx(object);\n            info.lastParentId = parent ? parent->GetID() : 0;\n            info.lastPrevObjectId = actorIdx > 0 ? parentChildren[actorIdx - 1]->GetID() : 0;\n            info.transform = object->GetTransform();\n\n            objectsInfos.Add(info);\n        }\n\n        objectsInfos.Sort([](auto& a, auto& b) { return a.objectHierarchyIdx < b.objectHierarchyIdx; });\n    }\n\n    ReparentAction::~ReparentAction()\n    {}\n\n    void ReparentAction::ObjectsReparented(const Ref<SceneEditableObject>& newParent, const Ref<SceneEditableObject>& prevActor)\n    {\n        newParentId = newParent ? newParent->GetID() : 0;\n        newPrevObjectId = prevActor ? prevActor->GetID() : 0;\n    }\n\n    String ReparentAction::GetName() const\n    {\n        return \"Actors rearrange\";\n    }\n\n    void ReparentAction::Redo()\n    {\n        auto parent = o2Scene.GetEditableObjectByID(newParentId);\n        auto prevObject = o2Scene.GetEditableObjectByID(newPrevObjectId);\n\n        if (parent)\n        {\n            int insertIdx = parent->GetEditableChildren().IndexOf(prevObject) + 1;\n\n            for (auto& info : objectsInfos)\n            {\n                auto object = o2Scene.GetEditableObjectByID(info.objectId);\n\n                object->SetEditableParent(nullptr);\n                parent->AddEditableChild(object, insertIdx++);\n                object->SetTransform(info.transform);\n            }\n        }\n        else\n        {\n            int insertIdx = 0;\n            \n            if (auto prevActor = DynamicCast<Actor>(prevObject))\n                insertIdx = o2Scene.GetRootActors().IndexOf(prevActor) + 1;\n\n            for (auto& info : objectsInfos)\n            {\n                auto object = o2Scene.GetEditableObjectByID(info.objectId);\n\n                object->SetEditableParent(nullptr);\n                object->SetIndexInSiblings(insertIdx++);\n                object->SetTransform(info.transform);\n            }\n        }\n\n        o2EditorTree.UpdateTreeView();\n    }\n\n    void ReparentAction::Undo()\n    {\n        for (auto& info : objectsInfos)\n        {\n            auto object = o2Scene.GetEditableObjectByID(info.objectId);\n            auto parent = o2Scene.GetEditableObjectByID(info.lastParentId);\n            auto prevObject = o2Scene.GetEditableObjectByID(info.lastPrevObjectId);\n\n            object->SetEditableParent(nullptr);\n\n            if (parent)\n            {\n                int idx = parent->GetEditableChildren().IndexOf(prevObject) + 1;\n                parent->AddEditableChild(object, idx);\n                object->SetTransform(info.transform);\n            }\n            else\n            {\n                int idx = o2Scene.GetRootEditableObjects().IndexOf(prevObject) + 1;\n                object->SetIndexInSiblings(idx);\n                object->SetTransform(info.transform);\n            }\n        }\n\n        o2EditorTree.UpdateTreeView();\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::ReparentAction, Editor__ReparentAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Reparent.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Actions/IAction.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Actor;\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // ------------------------------\n    // Change object's parents action\n    // Storing old and new parent and \n    // index in parents\n    // ------------------------------\n    class ReparentAction: public IAction\n    {\n    public:\n        struct ObjectInfo\n        {\n            SceneUID objectId;           // Object id\n            SceneUID lastParentId;       // Previous parent id\n            SceneUID lastPrevObjectId;   // Previous object id in children\n            int      objectHierarchyIdx; // Object index in hierarchy\n            Basis    transform;          // Object transform\n\n            bool operator==(const ObjectInfo& other) const\n            {\n                return objectId == other.objectId;\n            }\n        };\n\n        Vector<ObjectInfo> objectsInfos;    // Changed objects info\n        SceneUID           newParentId;     // New parent id\n        SceneUID           newPrevObjectId; // New object id in children\n\n    public:\n        // Default constructor\n        ReparentAction();\n\n        // Constructor\n        ReparentAction(const Vector<Ref<SceneEditableObject>>& beginObjects);\n\n        // Destructor\n        ~ReparentAction();\n\n        // Called when object are reparented, stores all required data to restore old objects' parents\n        void ObjectsReparented(const Ref<SceneEditableObject>& newParent, const Ref<SceneEditableObject>& prevObject);\n\n        // Returns name of action\n        String GetName() const override;\n\n        // Sets new parents again\n        void Redo() override;\n\n        // Sets previous stored parents and index in children\n        void Undo() override;\n\n        SERIALIZABLE(ReparentAction);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ReparentAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ReparentAction)\n{\n    FIELD().PUBLIC().NAME(objectsInfos);\n    FIELD().PUBLIC().NAME(newParentId);\n    FIELD().PUBLIC().NAME(newPrevObjectId);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ReparentAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ObjectsReparented, const Ref<SceneEditableObject>&, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Select.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Select.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    SelectAction::SelectAction()\n    {}\n\n    SelectAction::SelectAction(const Vector<Ref<SceneEditableObject>>& selectedObjects, \n                               const Vector<Ref<SceneEditableObject>>& prevSelectedObjects)\n    {\n        selectedObjectsIds = selectedObjects.Convert<SceneUID>([](auto& x) { return x->GetID(); });\n        prevSelectedObjectsIds = prevSelectedObjects.Convert<SceneUID>([](auto& x) { return x->GetID(); });\n    }\n\n    String SelectAction::GetName() const\n    {\n        return \"Actors selection\";\n    }\n\n    void SelectAction::Redo()\n    {\n        auto& selScreen = o2EditorSceneScreen;\n\n        selScreen.mSelectedObjects = selectedObjectsIds.Convert<Ref<SceneEditableObject>>(\n            [&](SceneUID id) { return o2Scene.GetEditableObjectByID(id); });\n\n        selScreen.UpdateTopSelectedObjects();\n        selScreen.OnObjectsSelectedFromThis();\n        selScreen.mNeedRedraw = true;\n    }\n\n    void SelectAction::Undo()\n    {\n        auto& selScreen = o2EditorSceneScreen;\n\n        selScreen.mSelectedObjects.Clear();\n        \n        prevSelectedObjectsIds.ForEach([&](SceneUID id) { \n            if (auto obj = o2Scene.GetEditableObjectByID(id))\n                selScreen.mSelectedObjects.Add(obj);\n        });\n\n        selScreen.UpdateTopSelectedObjects();\n        selScreen.OnObjectsSelectedFromThis();\n        selScreen.mNeedRedraw = true;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::SelectAction, Editor__SelectAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Select.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Actions/IAction.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // -----------------------------\n    // Scene object selection action\n    // -----------------------------\n    class SelectAction: public IAction\n    {\n    public:\n        Vector<SceneUID> selectedObjectsIds;     // Selected objects ids\n        Vector<SceneUID> prevSelectedObjectsIds; // Selected objects ids before\n\n    public:\n        // Default constructor\n        SelectAction();\n\n        // CUnstructor with new and previous selected objects\n        SelectAction(const Vector<Ref<SceneEditableObject>>& selectedObjects, const Vector<Ref<SceneEditableObject>>& prevSelectedObjects);\n\n        // Returns name of action\n        String GetName() const override;\n\n        // Selects objects again\n        void Redo() override;\n\n        // Selects previous selected objects\n        void Undo() override;\n\n        SERIALIZABLE(SelectAction);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SelectAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SelectAction)\n{\n    FIELD().PUBLIC().NAME(selectedObjectsIds);\n    FIELD().PUBLIC().NAME(prevSelectedObjectsIds);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SelectAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Ref<SceneEditableObject>>&, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Transform.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Transform.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    TransformAction::TransformAction()\n    {}\n\n    TransformAction::TransformAction(const Vector<Ref<SceneEditableObject>>& actors)\n    {\n        objectsIds = actors.Convert<UInt64>([](auto& x) { return x->GetID(); });\n        GetTransforms(objectsIds, beforeTransforms);\n    }\n\n    void TransformAction::Completed()\n    {\n        GetTransforms(objectsIds, doneTransforms);\n    }\n\n    String TransformAction::GetName() const\n    {\n        return \"Actors transformation\";\n    }\n\n    void TransformAction::Redo()\n    {\n        SetTransforms(objectsIds, doneTransforms);\n    }\n\n    void TransformAction::Undo()\n    {\n        SetTransforms(objectsIds, beforeTransforms);\n    }\n\n    void TransformAction::GetTransforms(const Vector<SceneUID>& objectIds, Vector<Transform>& transforms)\n    {\n        transforms = objectIds.Convert<Transform>([=](SceneUID id)\n        {\n            auto object = o2Scene.GetEditableObjectByID(id);\n            if (object)\n            {\n                Transform res;\n                res.transform = object->GetTransform();\n                res.layout = object->GetLayout();\n                return res;\n            }\n\n            return Transform();\n        });\n    }\n\n    void TransformAction::SetTransforms(const Vector<SceneUID>& objectIds, Vector<Transform>& transforms)\n    {\n        for (int i = 0; i < objectsIds.Count(); i++)\n        {\n            auto object = o2Scene.GetEditableObjectByID(objectsIds[i]);\n            if (object)\n            {\n                object->SetTransform(transforms[i].transform);\n                object->SetLayout(transforms[i].layout);\n            }\n        }\n    }\n\n    bool TransformAction::Transform::operator==(const Transform& other) const\n    {\n        return transform == other.transform && layout == other.layout;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::TransformAction, Editor__TransformAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Actions/Transform.h",
    "content": "#pragma once\n\n#include \"o2/Scene/ActorTransform.h\"\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2Editor/Actions/IAction.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // ---------------------------\n    // Objects transforming action\n    // ---------------------------\n    class TransformAction: public IAction\n    {\n    public:\n        struct Transform\n        {\n            Basis  transform;\n            Layout layout;\n\n            bool operator==(const Transform& other) const;\n        };\n\n        Vector<SceneUID>  objectsIds;       // Changed objects ids\n        Vector<Transform> beforeTransforms; // Transforms before changing\n        Vector<Transform> doneTransforms;   // Transforms after changing\n\n    public:\n        // Default constructor\n        TransformAction();\n\n        // Constructor with objects, stores theirs before changing transforms\n        TransformAction(const Vector<Ref<SceneEditableObject>>& objects);\n\n        // Called when transform completed, stores changed transforms\n        void Completed();\n\n        // Returns name of action\n        String GetName() const override;\n\n        // Sets new transforms again\n        void Redo() override;\n\n        // Sets transformations before transform\n        void Undo() override;\n\n        SERIALIZABLE(TransformAction);\n\n    private:\n        // Gets objects transforms and puts into transforms vector\n        void GetTransforms(const Vector<SceneUID>& objectIds, Vector<Transform>& transforms);\n\n        // Sets transformations and layouts to objects\n        void SetTransforms(const Vector<SceneUID>& objectIds, Vector<Transform>& transforms);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::TransformAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::TransformAction)\n{\n    FIELD().PUBLIC().NAME(objectsIds);\n    FIELD().PUBLIC().NAME(beforeTransforms);\n    FIELD().PUBLIC().NAME(doneTransforms);\n}\nEND_META;\nCLASS_METHODS_META(Editor::TransformAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Completed);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n    FUNCTION().PRIVATE().SIGNATURE(void, GetTransforms, const Vector<SceneUID>&, Vector<Transform>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, SetTransforms, const Vector<SceneUID>&, Vector<Transform>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/ColorPickerDlg.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ColorPickerDlg.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/DropDown.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalProgress.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Scene/UI/Widgets/VerticalProgress.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2Editor/UIRoot.h\"\n#include \"o2Editor/Utils/CommonTextures.h\"\n\nDECLARE_SINGLETON(Editor::ColorPickerDlg);\n\nnamespace Editor\n{\n    ColorPickerDlg::ColorPickerDlg(RefCounter* refCounter) :\n        CursorEventsListener(refCounter), Singleton<ColorPickerDlg>(refCounter)\n    {\n        mWindow = DynamicCast<o2::Window>(EditorUIRoot.AddWidget(o2UI.CreateWindow(\"Color picker\")));\n\n        InitializeControls();\n\n        mWindow->Hide(true);\n        mWindow->layout->size = Vec2F(400, 600);\n        mWindow->layout->worldPosition = Vec2F();\n\n        mWindow->GetBackCursorListener().onCursorReleased = [&](const Input::Cursor& c) { OnCursorPressedOutside(); };\n        mWindow->onHide = MakeFunction(this, &ColorPickerDlg::OnHide);\n    }\n\n    ColorPickerDlg::~ColorPickerDlg()\n    {}\n\n    void ColorPickerDlg::Show(const Color4& color, const Function<void(const Color4& value, bool byUser)>& onChanged,\n                              const Function<void()>& onCompleted/* = Function<void()>()*/)\n    {\n        mInstance->mColorValue = color;\n\n        mInstance->mWindow->ShowModal();\n\n        mInstance->mOnChangedCallback = onChanged;\n        mInstance->mOnCompletedCallback = onCompleted;\n\n        mInstance->UpdateValues(ParameterType::General);\n    }\n\n    void ColorPickerDlg::OnHide()\n    {\n        mOnCompletedCallback();\n    }\n\n    void ColorPickerDlg::InitializeControls()\n    {\n        InitializeChessBackTexture();\n        InitializeColorPreview();\n        InitializePickArea();\n        InitializeColorParams();\n    }\n\n    void ColorPickerDlg::InitializeChessBackTexture()\n    {\n        Color4 color1(1.0f, 1.0f, 1.0f, 1.0f), color2(0.7f, 0.7f, 0.7f, 1.0f);\n        Bitmap backLayerBitmap(PixelFormat::R8G8B8A8, Vec2I(20, 20));\n        backLayerBitmap.Fill(color1);\n        backLayerBitmap.FillRect(0, 10, 10, 0, color2);\n        backLayerBitmap.FillRect(10, 20, 20, 10, color2);\n\n        mChessBackTexture = TextureRef(backLayerBitmap);\n    }\n\n    void ColorPickerDlg::InitializeColorPreview()\n    {\n        auto colorPreviewContainer = mmake<Widget>();\n        *colorPreviewContainer->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 30, 0);\n\n        auto colorPreview = o2UI.CreateWidget<Widget>(\"colorProperty\");\n        *colorPreview->layout = WidgetLayout::BothStretch(5, 5, 5, 5);\n\n        auto backImage = mmake<Image>();\n        backImage->image = mmake<Sprite>(CommonTextures::checkedBackground, RectI(0, 0, 20, 20));\n        backImage->GetImage()->mode = SpriteMode::Tiled;\n        *backImage->layout = WidgetLayout::BothStretch(1, 1, 1, 1);\n        colorPreview->AddChild(backImage);\n\n        Bitmap colorLayerBitmap(PixelFormat::R8G8B8A8, Vec2I(20, 20));\n        colorLayerBitmap.Fill(Color4::White());\n        mColorSampleImage = mmake<Image>();\n        mColorSampleImage->image = mmake<Sprite>(colorLayerBitmap);\n        *mColorSampleImage->layout = WidgetLayout::BothStretch(1, 1, 1, 1);\n        colorPreview->AddChild(mColorSampleImage);\n        colorPreviewContainer->AddChild(colorPreview);\n\n        mWindow->AddChild(colorPreviewContainer);\n    }\n\n    void ColorPickerDlg::InitializePickArea()\n    {\n        auto pickAreaContainer = mmake<Widget>();\n        *pickAreaContainer->layout = WidgetLayout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 1.0f), Vec2F(0, 0), Vec2F(0, -30));\n\n        auto pickArea = mmake<Widget>();\n        *pickArea->layout = WidgetLayout::BothStretch(5, 5, 5, 5);\n\n        pickArea->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                           Layout::BothStretch(-9, -9, -9, -9));\n\n        mColorPickAreaBitmap = mmake<Bitmap>(PixelFormat::R8G8B8A8, Vec2I(80, 80));\n        mColorPickAreaBitmap->Clear(Color4::White());\n        mColorPickAreaTexture = TextureRef(*mColorPickAreaBitmap);\n        mColorPickAreaColor = pickArea->AddLayer(\"color\", mmake<Sprite>(mColorPickAreaTexture, RectI(0, 0, 80, 80)),\n                                                 Layout::BothStretch(1, 1, 1, 1));\n\n        mColorPickAreaHandle = o2UI.CreateImage(\"ui/circle_hole_handle.png\");\n        *mColorPickAreaHandle->layout = WidgetLayout::Based(BaseCorner::Center, Vec2F(15, 15));\n        pickArea->AddChild(mColorPickAreaHandle);\n\n        pickAreaContainer->AddChild(pickArea);\n\n        mWindow->AddChild(pickAreaContainer);\n\n        mColorPickHandle = mmake<CursorEventsArea>();\n        mColorPickAreaHandle->onDraw += [&]() { mColorPickHandle->OnDrawn(); };\n        mColorPickHandle->isUnderPoint = [&](const Vec2F& point) { return mColorPickAreaColor->IsUnderPoint(point); };\n        mColorPickHandle->onMoved = MakeFunction(this, &ColorPickerDlg::OnColorPickHandleMoved);\n    }\n\n    void ColorPickerDlg::InitializeColorParams()\n    {\n        auto colorParamsArea = mmake<VerticalLayout>();\n        *colorParamsArea->layout = WidgetLayout(Vec2F(0.0f, 0.0f), Vec2F(1.0f, 0.5f), Vec2F(0, 0), Vec2F(0, 0));\n        colorParamsArea->border = BorderF(5, 5, 5, 5);\n\n        // HSL/RGB sliders\n        auto hParamWidget = mColorHProperty.Initialize(\"Hue\", ParameterType::H, Ref(this),\n                                                       [](float value, Color4& color) { float h, s, l; color.ToHSL(h, s, l); h = value; color.SetHSL(h, s, l); },\n                                                       [](const Color4& color) { float h, s, l; color.ToHSL(h, s, l); return h; },\n                                                       [](int x) { Color4 color; float h = x/255.0f, s = 1.0f, l = 0.5f; color.SetHSL(h, s, l); return color; });\n\n        auto sParamWidget = mColorSProperty.Initialize(\"Saturation\", ParameterType::S, Ref(this),\n                                                       [](float value, Color4& color) { float h, s, l; color.ToHSL(h, s, l); s = value; color.SetHSL(h, s, l); },\n                                                       [](const Color4& color) { float h, s, l; color.ToHSL(h, s, l); return s; },\n                                                       [this](int x) { Color4 color = mColorValue; float h, s, l; color.ToHSL(h, s, l); s = x/255.0f; color.SetHSL(h, s, l); return color; });\n\n        auto lParamWidget = mColorLProperty.Initialize(\"Lightness\", ParameterType::L, Ref(this),\n                                                       [](float value, Color4& color) { float h, s, l; color.ToHSL(h, s, l); l = value; color.SetHSL(h, s, l); },\n                                                       [](const Color4& color) { float h, s, l; color.ToHSL(h, s, l); return l; },\n                                                       [this](int x) { Color4 color = mColorValue; float h, s, l; color.ToHSL(h, s, l); l = x/255.0f; color.SetHSL(h, s, l); return color; });\n\n        auto rParamWidget = mColorRProperty.Initialize(\"Red\", ParameterType::R, Ref(this),\n                                                       [](float value, Color4& color) { color.r = (int)(value*255.0f); },\n                                                       [](const Color4& color) { return color.r/255.0f; },\n                                                       [this](int x) { return Color4(x, mColorValue.g, mColorValue.b, mColorValue.a); });\n\n        auto gParamWidget = mColorGProperty.Initialize(\"Green\", ParameterType::G, Ref(this),\n                                                       [](float value, Color4& color) { color.g = (int)(value*255.0f); },\n                                                       [](const Color4& color) { return color.g/255.0f; },\n                                                       [this](int x) { return Color4(mColorValue.r, x, mColorValue.b, mColorValue.a); });\n\n        auto bParamWidget = mColorBProperty.Initialize(\"Blue\", ParameterType::B, Ref(this),\n                                                       [](float value, Color4& color) { color.b = (int)(value*255.0f); },\n                                                       [](const Color4& color) { return color.b/255.0f; },\n                                                       [this](int x) { return Color4(mColorValue.r, mColorValue.g, x, mColorValue.a); });\n\n        auto aParamWidget = mColorAProperty.Initialize(\"Alpha\", ParameterType::A, Ref(this),\n                                                       [](float value, Color4& color) { color.a = (int)(value*255.0f); },\n                                                       [](const Color4& color) { return color.a/255.0f; },\n                                                       [this](int x) { return Color4(mColorValue.r, mColorValue.g, mColorValue.b, x); });\n\n        // RGBA\n        auto rgbaContainer = mmake<Widget>();\n\n        auto rgbaLabel = o2UI.CreateLabel(\"RGBA\");\n        *rgbaLabel->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(100, 20));\n        rgbaLabel->horAlign = HorAlign::Left;\n        rgbaContainer->AddChild(rgbaLabel);\n\n        mRGBAEditBox = o2UI.CreateEditBox(\"singleline\");\n        *mRGBAEditBox->layout = WidgetLayout::HorStretch(VerAlign::Middle, 100, 0, 20);\n        mRGBAEditBox->onChangeCompleted = [&](const WString& text) { OnColorEditBoxRGBAChanged((String)text); };\n        rgbaContainer->AddChild(mRGBAEditBox);\n\n        // HEX\n        auto hexContainer = mmake<Widget>();\n\n        auto hexLabel = o2UI.CreateLabel(\"HEX\");\n        *hexLabel->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(100, 20));\n        hexLabel->horAlign = HorAlign::Left;\n        hexContainer->AddChild(hexLabel);\n\n        mHEXEditBox = o2UI.CreateEditBox(\"singleline\");\n        *mHEXEditBox->layout = WidgetLayout::HorStretch(VerAlign::Middle, 100, 0, 20);\n        mHEXEditBox->onChangeCompleted = [&](const WString& text) { OnColorEditBoxHEXChanged((String)text); };\n        hexContainer->AddChild(mHEXEditBox);\n\n        colorParamsArea->AddChild(hParamWidget);\n        colorParamsArea->AddChild(sParamWidget);\n        colorParamsArea->AddChild(lParamWidget);\n        colorParamsArea->AddChild(rParamWidget);\n        colorParamsArea->AddChild(gParamWidget);\n        colorParamsArea->AddChild(bParamWidget);\n        colorParamsArea->AddChild(aParamWidget);\n        colorParamsArea->AddChild(rgbaContainer);\n        colorParamsArea->AddChild(hexContainer);\n\n        mWindow->AddChild(colorParamsArea);\n    }\n\n    void ColorPickerDlg::OnColorPickHandleMoved(const Input::Cursor& cursor)\n    {\n        auto rt = mColorPickAreaColor->GetRect();\n\n        Vec2F anchorPos = (cursor.position - rt.LeftBottom())/rt.Size();\n        anchorPos.x = Math::Clamp01(anchorPos.x);\n        anchorPos.y = Math::Clamp01(anchorPos.y);\n\n        mColorPickAreaHandle->layout->anchorMin = anchorPos;\n        mColorPickAreaHandle->layout->anchorMax = anchorPos;\n\n        mColorValue.SetHSL(mColorHProperty.progressBar->value, anchorPos.y, anchorPos.x);\n        UpdateValues(ParameterType::Picker);\n\n        OnColorChanged(ParameterType::Picker);\n    }\n\n    void ColorPickerDlg::UpdateColorPickHandle()\n    {\n        auto rt = mColorPickAreaColor->GetRect();\n        float h, s, l; mColorValue.ToHSL(h, s, l);\n        Vec2F anchorPos = Vec2F(l, s);\n        anchorPos.x = Math::Clamp01(anchorPos.x);\n        anchorPos.y = Math::Clamp01(anchorPos.y);\n\n        mColorPickAreaHandle->layout->anchorMin = anchorPos;\n        mColorPickAreaHandle->layout->anchorMax = anchorPos;\n    }\n\n    void ColorPickerDlg::UpdateColorEditBoxeRGBA()\n    {\n        String rgbaText = String::Format(\"%d, %d, %d, %d\", mColorValue.r, mColorValue.g, mColorValue.b, mColorValue.a);\n        mRGBAEditBox->text = (WString)rgbaText;\n    }\n\n    void ColorPickerDlg::UpdateColorEditBoxHEX()\n    {\n        String hexText = String::Format(\"#%02X%02X%02X%02X\", mColorValue.r, mColorValue.g, mColorValue.b, mColorValue.a);\n        mHEXEditBox->text = (WString)hexText;\n    }\n\n    void ColorPickerDlg::OnColorEditBoxRGBAChanged(const String& text)\n    {\n        Vector<String> splitText;\n\n        // Split string by any non-digit character\n        String buffer;\n        for (int i = 0; i < text.Length(); i++)\n        {\n            if (text[i] >= '0' && text[i] <= '9')\n                buffer += text[i];\n            else\n            {\n                if (buffer.Length() > 0)\n                    splitText.Add(buffer);\n\n                buffer.Clear();\n            }\n        }\n\n        // Get available values\n        float r = splitText.Count() > 0 ? (float)splitText[0]/255.0f : 1.0f;\n        float g = splitText.Count() > 1 ? (float)splitText[1]/255.0f : 1.0f;\n        float b = splitText.Count() > 2 ? (float)splitText[2]/255.0f : 1.0f;\n        float a = splitText.Count() > 3 ? (float)splitText[3]/255.0f : 1.0f;\n\n        // Update color value\n        mColorValue = Color4(r, g, b, a);\n        UpdateValues(ParameterType::RGBABox);\n    }\n\n    void ColorPickerDlg::OnColorEditBoxHEXChanged(const String& text)\n    {\n        // Extract hex string\n        String hexText = text.Length() > 0 && text[0] == '#' ? text.SubStr(1) : text;\n        UInt32 hexValue = 0;\n\n        // Convert hex string to integer\n        for (int i = 0; i < hexText.Length(); i++)\n        {\n            hexValue <<= 4;\n            if (hexText[i] >= '0' && hexText[i] <= '9')\n                hexValue += hexText[i] - '0';\n            else if (hexText[i] >= 'A' && hexText[i] <= 'F')\n                hexValue += hexText[i] - 'A' + 10;\n            else if (hexText[i] >= 'a' && hexText[i] <= 'f')\n                hexValue += hexText[i] - 'a' + 10;\n        }\n\n        // Update color value\n        mColorValue.r = (hexValue >> 24) & 0xFF;\n        mColorValue.g = (hexValue >> 16) & 0xFF;\n        mColorValue.b = (hexValue >> 8) & 0xFF;\n        mColorValue.a = hexValue & 0xFF;\n\n        UpdateValues(ParameterType::HEXBox);\n    }\n\n    void ColorPickerDlg::OnColorChanged(ParameterType changedParameter)\n    {\n        mOnChangedCallback(mColorValue, true);\n        UpdateValues(changedParameter);\n    }\n\n    void ColorPickerDlg::UpdateValues(ParameterType changedParameter)\n    {\n        mColorSampleImage->GetImage()->SetColor(mColorValue);\n\n        if (changedParameter != ParameterType::S && changedParameter != ParameterType::L && changedParameter != ParameterType::Picker)\n            mColorHProperty.UpdateValue(mColorValue);\n\n        if (changedParameter != ParameterType::H && changedParameter != ParameterType::L)\n            mColorSProperty.UpdateValue(mColorValue);\n\n        if (changedParameter != ParameterType::H && changedParameter != ParameterType::S)\n            mColorLProperty.UpdateValue(mColorValue);\n\n        mColorRProperty.UpdateValue(mColorValue);\n        mColorGProperty.UpdateValue(mColorValue);\n        mColorBProperty.UpdateValue(mColorValue);\n        mColorAProperty.UpdateValue(mColorValue);\n\n        if (changedParameter == ParameterType::H || changedParameter == ParameterType::S || changedParameter == ParameterType::L)\n            mColorValue.SetHSL(mColorHProperty.progressBar->value, mColorSProperty.progressBar->value, mColorLProperty.progressBar->value);\n\n        UpdateColorPickBitmap();\n\n        if (changedParameter != ParameterType::Picker)\n            UpdateColorPickHandle();\n\n        if (changedParameter != ParameterType::RGBABox)\n            UpdateColorEditBoxeRGBA();\n\n        if (changedParameter != ParameterType::HEXBox)\n            UpdateColorEditBoxHEX();\n    }\n\n    void ColorPickerDlg::UpdateColorPickBitmap()\n    {\n        float h = mColorHProperty.progressBar->value;\n        Vec2I sz = mColorPickAreaBitmap->GetSize();\n\n        for (int i = 0; i < sz.x; i++)\n        {\n            for (int j = 0; j < sz.y; j++)\n            {\n                Color4 c; c.SetHSL(h, (float)i/(float)sz.x, (float)j/(float)sz.y);\n                UInt cc = c.ABGR();\n                memcpy(mColorPickAreaBitmap->GetData() + 4*i*sz.x + 4*j, &cc, 4);\n            }\n        }\n\n        mColorPickAreaTexture->SetData(*mColorPickAreaBitmap);\n    }\n\n    void ColorPickerDlg::OnCursorPressedOutside()\n    {\n        mOnChangedCallback(mColorValue, true);\n        mWindow->Hide();\n    }\n\n    Ref<Widget> ColorPickerDlg::ColorProperty::Initialize(const String& name, ParameterType type, const Ref<ColorPickerDlg>& dialog,\n                                                          const Function<void(float value, Color4& color)>& setValue,\n                                                          const Function<float(const Color4& value)>& getValue,\n                                                          const Function<Color4(int x)>& updateBitmap)\n    {\n        this->dialog = dialog;\n        this->type = type;\n        this->setValue = setValue;\n        this->getValue = getValue;\n        this->updateBitmap = updateBitmap;\n\n        auto resLayout = mmake<Widget>();\n        nameLabel = o2UI.CreateLabel(name);\n        *nameLabel->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(100, 20));\n        nameLabel->horAlign = HorAlign::Left;\n        resLayout->AddChild(nameLabel);\n\n        progressBar = o2UI.CreateWidget<HorizontalProgress>(\"wide\");\n        *progressBar->layout = WidgetLayout::HorStretch(VerAlign::Middle, 100, 50, 20);\n        progressBar->onChangeByUser = [&](float v) { OnProgressBarChanged(v); };\n\n        bitmap = mmake<Bitmap>(PixelFormat::R8G8B8A8, Vec2F(256, 256));\n        progressBarTexture = TextureRef(*bitmap);\n        progressBar->AddLayer(\"color\", mmake<Sprite>(progressBarTexture, RectI(0, 0, 256, 256)), Layout::BothStretch(1, 1, 1, 1), 0.5f);\n\n        auto backSprite = mmake<Sprite>(dialog->mChessBackTexture, RectI(0, 0, 20, 20));\n        backSprite->mode = SpriteMode::Tiled;\n        progressBar->AddLayer(\"colorBack\", backSprite, Layout::BothStretch(1, 1, 1, 1), 0.4f);\n\n        resLayout->AddChild(progressBar);\n\n        editBox = o2UI.CreateEditBox(\"singleline\");\n        *editBox->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(45, 20));\n        editBox->SetFilterInteger();\n\n        editBox->onChangeCompleted = [&](const WString& text) { progressBar->SetValue(((float)text/255.0f)); };\n\n        resLayout->AddChild(editBox);\n\n        return resLayout;\n    }\n\n    void ColorPickerDlg::ColorProperty::UpdateValue(const Color4& value)\n    {\n        if (mChanging)\n            return;\n\n        progressBar->SetValue(getValue(value));\n        editBox->text = (WString)(int)(getValue(value)*255.0f);\n\n        UpdateBitmap();\n    }\n\n    void ColorPickerDlg::ColorProperty::OnProgressBarChanged(float value)\n    {\n        mChanging = true;\n\n        if (auto dialog = this->dialog.Lock()) {\n            setValue(value, dialog->mColorValue);\n            editBox->text = (WString)(int)(value*255.0f);\n            dialog->OnColorChanged(type);\n        }\n\n        mChanging = false;\n    }\n\n    void ColorPickerDlg::ColorProperty::UpdateBitmap()\n    {\n        int bpp = 4;\n        UInt8* c1 = bitmap->GetData();\n        int h = bitmap->GetSize().y;\n        int w = bitmap->GetSize().x;\n\n        for (int i = 0; i < 256; i++)\n            *(ULong*)(c1 + bpp*i) = updateBitmap(i).ABGR();\n\n        for (int i = 1; i < h; i++)\n            memcpy(c1 + bpp*w*i, c1, bpp*w);\n\n        progressBarTexture->SetData(*bitmap);\n    }\n\n}\n// --- META ---\n\nENUM_META(Editor::ColorPickerDlg::ParameterType, Editor__ColorPickerDlg__ParameterType)\n{\n    ENUM_ENTRY(A);\n    ENUM_ENTRY(B);\n    ENUM_ENTRY(G);\n    ENUM_ENTRY(General);\n    ENUM_ENTRY(H);\n    ENUM_ENTRY(HEXBox);\n    ENUM_ENTRY(L);\n    ENUM_ENTRY(Picker);\n    ENUM_ENTRY(R);\n    ENUM_ENTRY(RGBABox);\n    ENUM_ENTRY(S);\n}\nEND_ENUM_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/ColorPickerDlg.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Math/Color.h\"\n#include \"o2/Utils/Singleton.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Bitmap;\n    class DropDown;\n    class EditBox;\n    class HorizontalProgress;\n    class Image;\n    class Label;\n    class VerticalProgress;\n    class Widget;\n    class WidgetLayer;\n    class Window;\n}\n\nnamespace Editor\n{\n    // --------------------\n    // Color picking dialog\n    // --------------------\n    class ColorPickerDlg : public Singleton<ColorPickerDlg>, public CursorEventsListener\n    {\n    public:\n        enum class ParameterType { H, S, L, R, G, B, A, General, Picker, RGBABox, HEXBox };\n\n    public:\n        // Default constructor\n        ColorPickerDlg(RefCounter* refCounter);\n\n        // Destructor\n        ~ColorPickerDlg();\n\n        // Shows color picking window. Delegate onChanged is called when color changed and onCompleted when ok pressed\n        static void Show(const Color4& color, const Function<void(const Color4& value, bool byUser)>& onChanged,\n                         const Function<void()>& onCompleted = {});\n\n        REF_COUNTERABLE_IMPL(Singleton<ColorPickerDlg>, CursorEventsListener);\n\n    protected:\n        struct ColorProperty\n        {\n            WeakRef<ColorPickerDlg> dialog;\n\n            ParameterType type;\n\n            Ref<Label>              nameLabel;\n            Ref<HorizontalProgress> progressBar;\n            Ref<EditBox>            editBox;\n            Ref<Bitmap>             bitmap;\n            TextureRef              progressBarTexture;\n\n            Function<void(float value, Color4& color)> setValue;\n            Function<float(const Color4& value)>       getValue;\n            Function<Color4(int x)>                    updateBitmap;\n\n        public:\n            Ref<Widget> Initialize(const String& name, ParameterType type, const Ref<ColorPickerDlg>& dialog,\n                                   const Function<void(float value, Color4& color)>& setValue,\n                                   const Function<float(const Color4& value)>& getValue,\n                                   const Function<Color4(int x)>& updateBitmap);\n\n            void UpdateValue(const Color4& value);\n\n        protected:\n            bool mChanging = false;\n\n        protected:\n            void OnProgressBarChanged(float value);\n            void UpdateBitmap();\n        };\n\n    protected:\n        Function<void(const Color4& value, bool byUser)> mOnChangedCallback;   // On changed callback\n        Function<void()>                                 mOnCompletedCallback; // On completed callback\n\n        Color4 mColorValue; // Current color value\n\n        Ref<o2::Window> mWindow;\n        Ref<Image>      mColorSampleImage;\n\n        TextureRef mChessBackTexture;\n\n        Ref<Image>            mColorPickAreaHandle;\n        Ref<Bitmap>           mColorPickAreaBitmap;\n        Ref<WidgetLayer>      mColorPickAreaColor;\n        TextureRef            mColorPickAreaTexture;\n        Ref<CursorEventsArea> mColorPickHandle;\n\n        Ref<EditBox> mRGBAEditBox;\n        Ref<EditBox> mHEXEditBox;\n\n        ColorProperty mColorHProperty;\n        ColorProperty mColorSProperty;\n        ColorProperty mColorLProperty;\n        ColorProperty mColorRProperty;\n        ColorProperty mColorGProperty;\n        ColorProperty mColorBProperty;\n        ColorProperty mColorAProperty;\n\n    protected:\n        // Called when color picking dialog were hidden\n        void OnHide();\n\n        // Initializes all controls\n        void InitializeControls();\n\n        // Initializes chess back texture\n        void InitializeChessBackTexture();\n\n        // Initializes color preview\n        void InitializeColorPreview();\n\n        // Initializes color pick area\n        void InitializePickArea();\n\n        // Initializes HUE/RGB bars\n        void InitializeColorParams();\n\n        // Called when color pick handle moved, updates actual color value\n        void OnColorPickHandleMoved(const Input::Cursor& cursor);\n\n        // Called when color value changed, updates all controls\n        void OnColorChanged(ParameterType changedParameter);\n\n        // Called when color changed, updates color bars\n        void UpdateValues(ParameterType changedParameter);\n\n        // Updates color pick bitmap\n        void UpdateColorPickBitmap();\n\n        // Updates color pick handle position\n        void UpdateColorPickHandle();\n\n        // Updates color edit box RGBA\n        void UpdateColorEditBoxeRGBA();\n\n        // Updates color edit box HEX\n        void UpdateColorEditBoxHEX();\n\n        // Called when color edit box RGBA changed, updates color value\n        void OnColorEditBoxRGBAChanged(const String& text);\n\n        // Called when color edit box HEX changed, updates color value\n        void OnColorEditBoxHEXChanged(const String& text);\n\n        // Called when cursor pressed outside of color picking dialog, closes it\n        void OnCursorPressedOutside();\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(Editor::ColorPickerDlg::ParameterType);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/CurveEditorDlg.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"CurveEditorDlg.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2Editor/UI/CurveEditor/CurvesEditor.h\"\n#include \"o2Editor/UIRoot.h\"\n\nDECLARE_SINGLETON(Editor::CurveEditorDlg);\n\nnamespace Editor\n{\n    CurveEditorDlg::CurveEditorDlg(RefCounter* refCounter):\n        Singleton<CurveEditorDlg>(refCounter), CursorEventsListener(refCounter)\n    {\n        mWindow = DynamicCast<o2::Window>(EditorUIRoot.AddWidget(o2UI.CreateWindow(\"Curve editor\")));\n\n        InitializeControls();\n\n        mWindow->Hide(true);\n        mWindow->layout->size = Vec2F(600, 500);\n\n        mWindow->GetBackCursorListener().onCursorReleased = [&](const Input::Cursor& c) { OnCursorPressedOutside(); };\n        mWindow->onHide = MakeFunction(this, &CurveEditorDlg::OnHide);\n    }\n\n    CurveEditorDlg::~CurveEditorDlg()\n    {}\n\n    void CurveEditorDlg::OnHide()\n    {\n        mOnChangedCallback();\n        mOnChangeCompletedCallback();\n    }\n\n    void CurveEditorDlg::InitializeControls()\n    {\n        mEditorWidget = mmake<CurvesEditor>();\n        *mEditorWidget->layout = WidgetLayout::BothStretch(0, 5, 5, 0);\n\n        auto horScroll = o2UI.CreateHorScrollBar();\n        *horScroll->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 10, -10);\n        mEditorWidget->SetHorScrollbar(horScroll);\n\n        auto verScroll = o2UI.CreateVerScrollBar();\n        *verScroll->layout = WidgetLayout::VerStretch(HorAlign::Right, 0, 0, 10, -10);\n        mEditorWidget->SetVerScrollbar(verScroll);\n\n        mEditorWidget->SetMainHandleImages(AssetRef<ImageAsset>(\"ui/CurveHandle.png\"),\n                                           AssetRef<ImageAsset>(\"ui/CurveHandleHover.png\"),\n                                           AssetRef<ImageAsset>(\"ui/CurveHandlePressed.png\"),\n                                           AssetRef<ImageAsset>(\"ui/CurveHandleSelected.png\"));\n\n        mEditorWidget->SetSupportHandleImages(AssetRef<ImageAsset>(\"ui/CurveSupportHandle.png\"),\n                                              AssetRef<ImageAsset>(\"ui/CurveSupportHandleHover.png\"),\n                                              AssetRef<ImageAsset>(\"ui/CurveSupportHandlePressed.png\"),\n                                              AssetRef<ImageAsset>(\"ui/CurveSupportHandleSelected.png\"));\n\n        mEditorWidget->SetRangeHandleImages(AssetRef<ImageAsset>(\"ui/UI2_handle_side_regular.png\"),\n                                              AssetRef<ImageAsset>(\"ui/UI2_handle_side_select.png\"),\n                                              AssetRef<ImageAsset>(\"ui/UI2_handle_side_pressed.png\"),\n                                              AssetRef<ImageAsset>(\"ui/UI2_handle_side_select.png\"));\n\n        mEditorWidget->SetSelectionSpriteImage(AssetRef<ImageAsset>(\"ui/UI_Window_place.png\"));\n\n\t\tmWindow->onFocused += [&]() { mEditorWidget->OnFocusedByRoot(); };\n\t\tmWindow->onUnfocused += [&]() { mEditorWidget->OnUnfocusedByRoot(); };\n\n        mWindow->AddChild(mEditorWidget);\n    }\n\n    void CurveEditorDlg::Show(const Function<void()>& onChanged, const Function<void()>& onCompleted /*= Function<void()>()*/)\n    {\n        mInstance->mWindow->ShowModal();\n        mInstance->mOnChangedCallback = onChanged;\n        mInstance->mOnChangeCompletedCallback = onCompleted;\n        mInstance->mEditorWidget->RemoveAllCurves();\n    }\n\n    void CurveEditorDlg::AddEditingCurve(const String& id, const Ref<Curve>& curve, const Color4& color /*= Color4::Green()*/)\n    {\n        mInstance->mEditorWidget->AddCurve(id, curve, color);\n    }\n\n    void CurveEditorDlg::RemoveEditingCurve(const Ref<Curve>& curve)\n    {\n        mInstance->mEditorWidget->RemoveCurve(curve);\n    }\n\n    void CurveEditorDlg::RemoveEditingCurve(const String& id)\n    {\n        mInstance->mEditorWidget->RemoveCurve(id);\n    }\n\n    void CurveEditorDlg::RemoveAllEditingCurves()\n    {\n        mInstance->mEditorWidget->RemoveAllCurves();\n    }\n\n    void CurveEditorDlg::OnCursorPressedOutside()\n    {\n        mOnChangedCallback();\n        mWindow->Hide();\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/CurveEditorDlg.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Math/Curve.h\"\n#include \"o2/Utils/Singleton.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Window;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(CurvesEditor);\n\n    // --------------------\n    // Curve editing dialog\n    // --------------------\n    class CurveEditorDlg: public Singleton<CurveEditorDlg>, public CursorEventsListener\n    {\n    public:\n        // Default constructor\n        CurveEditorDlg(RefCounter* refCounter);\n\n        // Destructor\n        ~CurveEditorDlg();\n\n        // Shows editor dialog\n        static void Show(const Function<void()>& onChanged, const Function<void()>& onCompleted = {});\n\n        // Adds editing curve with color. If color is default it will be randomized\n        static void AddEditingCurve(const String& id, const Ref<Curve>& curve, const Color4& color = Color4::Green());\n\n        // Removed curve from editing\n        static void RemoveEditingCurve(const Ref<Curve>& curve);\n\n        // Removed curve from editing\n        static void RemoveEditingCurve(const String& id);\n\n        // Removes all editing curves\n        static void RemoveAllEditingCurves();\n\n        REF_COUNTERABLE_IMPL(Singleton<CurveEditorDlg>, CursorEventsListener);\n\n    protected:\n        Function<void()> mOnChangedCallback;         // On changed callback\n        Function<void()> mOnChangeCompletedCallback; // On change completed callback\n\n        Ref<o2::Window>   mWindow;       // Dialog window\n        Ref<CurvesEditor> mEditorWidget; // Curves editor widget\n\n    protected:\n        // Called when hiding, calls completed callback\n        void OnHide();\n\n        // Initialize controls\n        void InitializeControls();\n\n        // Called when cursor was pressed outside, closed dialog\n        void OnCursorPressedOutside();\n    };\n     \n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/EditNameDlg.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"EditNameDlg.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2Editor/UIRoot.h\"\n\nDECLARE_SINGLETON(Editor::NameEditDlg);\n\nnamespace Editor\n{\n    NameEditDlg::NameEditDlg(RefCounter* refCounter):\n        Singleton<NameEditDlg>(refCounter), CursorEventsListener(refCounter)\n    {\n        mWindow = DynamicCast<o2::Window>(EditorUIRoot.AddWidget(o2UI.CreateWindow(\"Enter name\")));\n\n        InitializeControls();\n\n        mWindow->Hide(true);\n        mWindow->layout->size = Vec2F(300, 100);\n\n        mWindow->GetBackCursorListener().onCursorReleased = [&](const Input::Cursor& c) { OnCursorPressedOutside(); };\n        mWindow->onHide = MakeFunction(this, &NameEditDlg::OnHide);\n    }\n\n    NameEditDlg::~NameEditDlg()\n    {}\n\n    void NameEditDlg::Show(const String& name, Function<void(const String&)> onCompleted, \n                           Function<void()> onCancelled /*= Function<void()>()*/)\n    {\n        mInstance->mNameEditBox->SetText(name);\n        mInstance->mWindow->ShowModal();\n        mInstance->mOnCompletedCallback = onCompleted;\n        mInstance->mOnCancelledCallback = onCancelled;\n    }\n\n    void NameEditDlg::OnHide()\n    {\n        mOnCancelledCallback();\n    }\n\n    void NameEditDlg::InitializeControls()\n    {\n        auto verLayout = o2UI.CreateVerLayout();\n        verLayout->spacing = 10;\n\n        mNameEditBox = o2UI.CreateEditBox(\"singleline\");\n        verLayout->AddChild(mNameEditBox);\n\n        auto horLayout =  o2UI.CreateHorLayout();\n        horLayout->spacing = 10;\n        \n        auto okButton = o2UI.CreateButton(\"Ok\", MakeFunction(this, &NameEditDlg::OnOkPressed));\n        horLayout->AddChild(okButton);\n\n        auto cancelButton = o2UI.CreateButton(\"Cancel\", MakeFunction(this, &NameEditDlg::OnCancelPressed));\n        horLayout->AddChild(cancelButton);\n\n        verLayout->AddChild(horLayout);\n\n        mWindow->AddChild(verLayout);\n    }\n\n    void NameEditDlg::OnOkPressed()\n    {\n        mOnCompletedCallback(mNameEditBox->GetText());\n        mWindow->Hide();\n    }\n\n    void NameEditDlg::OnCancelPressed()\n    {\n        mOnCancelledCallback();\n        mWindow->Hide();\n    }\n\n    void NameEditDlg::OnCursorPressedOutside()\n    {\n        mOnCancelledCallback();\n        mWindow->Hide();\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/EditNameDlg.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Singleton.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class EditBox;\n    class Label;\n    class VerticalProgress;\n    class Widget;\n    class WidgetLayer;\n    class Window;\n}\n\nnamespace Editor\n{\n    // -------------------\n    // Name editing dialog\n    // -------------------\n    class NameEditDlg: public Singleton<NameEditDlg>, public CursorEventsListener\n    {\n    public:\n        // Default constructor\n        NameEditDlg(RefCounter* refCounter);\n\n        // Destructor\n        ~NameEditDlg();\n\n        // Shows name editing window. Delegate onCompleted is called when ok pressed and onCancelled when cancel\n        static void Show(const String& name, \n                         Function<void(const String&)> onCompleted,\n                         Function<void()> onCancelled = Function<void()>());\n\n        REF_COUNTERABLE_IMPL(Singleton<NameEditDlg>, CursorEventsListener);\n\n    protected:\n        Function<void(const String&)> mOnCompletedCallback; // On completed callback\n        Function<void()>              mOnCancelledCallback; // On cancelled callback\n\n        Ref<o2::Window> mWindow;      // Dialog window\n        Ref<EditBox>    mNameEditBox; // Name edit box\n\n    protected:\n        // Calls when hiding dialog\n        void OnHide();\n\n        // Initializes edit box and buttons\n        void InitializeControls();\n\n        // Called when Ok button pressed, calls mOnCompletedCallback and closes window\n        void OnOkPressed();\n\n        // Called when Cancel button pressed, calls mOnCancelledCallback and closes window\n        void OnCancelPressed();\n\n        // Called when cursor pressed outside from window\n        void OnCursorPressedOutside();\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/KeyEditDlg.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"KeyEditDlg.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2Editor/UIRoot.h\"\n\nDECLARE_SINGLETON(Editor::KeyEditDlg);\n\nnamespace Editor\n{\n\n    KeyEditDlg::KeyEditDlg(RefCounter* refCounter):\n        Singleton<KeyEditDlg>(refCounter)\n    {\n        mWindow = DynamicCast<o2::Window>(EditorUIRoot.AddWidget(o2UI.CreateWindow(\"Edit key\")));\n\n        auto verLayout = o2UI.CreateVerLayout();\n        verLayout->spacing = 10;\n        verLayout->expandHeight = false;\n        verLayout->fitByChildren = false;\n        *verLayout->layout = WidgetLayout::BothStretch(0, 30, 0, 0);\n        mWindow->AddChild(verLayout);\n\n        // Position and value\n        {\n            auto horLayout = o2UI.CreateHorLayout();\n            horLayout->spacing = 10;\n            horLayout->expandHeight = false;\n            horLayout->fitByChildren = true;\n\n            {\n                auto positionVerLayout = o2UI.CreateVerLayout();\n                positionVerLayout->expandHeight = false;\n                positionVerLayout->fitByChildren = true;\n                positionVerLayout->AddChild(o2UI.CreateLabel(\"Position\"));\n\n                mPosition = o2UI.CreateEditBox(\"singleline\");\n                mPosition->name = \"position\";\n                mPosition->SetFilterFloat();\n                positionVerLayout->AddChild(mPosition);\n                horLayout->AddChild(positionVerLayout);\n            }\n\n            {\n                auto valueVerLayout = o2UI.CreateVerLayout();\n                valueVerLayout->expandHeight = false;\n                valueVerLayout->fitByChildren = true;\n                valueVerLayout->AddChild(o2UI.CreateLabel(\"Value\"));\n\n                mValue = o2UI.CreateEditBox(\"singleline\");\n                mValue->SetFilterFloat();\n                mValue->name = \"value\";\n                valueVerLayout->AddChild(mValue);\n                horLayout->AddChild(valueVerLayout);\n            }\n\n            verLayout->AddChild(horLayout);\n        }\n\n        // left support\n        {\n            auto label = o2UI.CreateLabel(\"Left support:\");\n            auto horLayout = o2UI.CreateHorLayout();\n            horLayout->spacing = 10;\n            horLayout->expandHeight = false;\n            horLayout->fitByChildren = true;\n\n            {\n                auto positionVerLayout = o2UI.CreateVerLayout();\n                positionVerLayout->expandHeight = false;\n                positionVerLayout->fitByChildren = true;\n                positionVerLayout->AddChild(o2UI.CreateLabel(\"Position\"));\n\n                mLeftSupportPosition = o2UI.CreateEditBox(\"singleline\");\n                mLeftSupportPosition->name = \"leftSupportPosition\";\n                mLeftSupportPosition->SetFilterFloat();\n                positionVerLayout->AddChild(mLeftSupportPosition);\n                horLayout->AddChild(positionVerLayout);\n            }\n\n            {\n                auto valueVerLayout = o2UI.CreateVerLayout();\n                valueVerLayout->expandHeight = false;\n                valueVerLayout->fitByChildren = true;\n                valueVerLayout->AddChild(o2UI.CreateLabel(\"Value\"));\n\n                mLeftSupportValue = o2UI.CreateEditBox(\"singleline\");\n                mLeftSupportValue->name = \"leftSupportValue\";\n                mLeftSupportValue->SetFilterFloat();\n                valueVerLayout->AddChild(mLeftSupportValue);\n                horLayout->AddChild(valueVerLayout);\n            }\n\n            verLayout->AddChild(label);\n            verLayout->AddChild(horLayout);\n        }\n\n        // right support\n        {\n            auto label = o2UI.CreateLabel(\"Right support:\");\n            auto horLayout = o2UI.CreateHorLayout();\n            horLayout->spacing = 10;\n            horLayout->expandHeight = false;\n            horLayout->fitByChildren = true;\n\n            {\n                auto positionVerLayout = o2UI.CreateVerLayout();\n                positionVerLayout->expandHeight = false;\n                positionVerLayout->fitByChildren = true;\n                positionVerLayout->AddChild(o2UI.CreateLabel(\"Position\"));\n\n                mRightSupportPosition = o2UI.CreateEditBox(\"singleline\");\n                mRightSupportPosition->name = \"rightSupportPosition\";\n                mRightSupportPosition->SetFilterFloat();\n                positionVerLayout->AddChild(mRightSupportPosition);\n                horLayout->AddChild(positionVerLayout);\n            }\n\n            {\n                auto valueVerLayout = o2UI.CreateVerLayout();\n                valueVerLayout->expandHeight = false;\n                valueVerLayout->fitByChildren = true;\n                valueVerLayout->AddChild(o2UI.CreateLabel(\"Value\"));\n\n                mRightSupportValue = o2UI.CreateEditBox(\"singleline\");\n                mRightSupportValue->name = \"rightSupportValue\";\n                mRightSupportValue->SetFilterFloat();\n                valueVerLayout->AddChild(mRightSupportValue);\n                horLayout->AddChild(valueVerLayout);\n            }\n\n            verLayout->AddChild(label);\n            verLayout->AddChild(horLayout);\n        }\n\n        {\n            auto horLayout = o2UI.CreateHorLayout();\n            horLayout->spacing = 10;\n            horLayout->expandHeight = true;\n            *horLayout->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 25);\n\n            auto okButton = o2UI.CreateButton(\"Ok\", MakeFunction(this, &KeyEditDlg::OnOkPressed));\n            horLayout->AddChild(okButton);\n\n            auto cancelButton = o2UI.CreateButton(\"Cancel\", [&]() { mWindow->Hide(); });\n            horLayout->AddChild(cancelButton);\n\n            mWindow->AddChild(horLayout);\n        }\n\n        mWindow->Hide(true);\n        mWindow->layout->size = Vec2F(200, 300);\n\n        mWindow->GetBackCursorListener().onCursorReleased = [&](const Input::Cursor& c) { mWindow->Hide(); };\n    }\n\n    KeyEditDlg::~KeyEditDlg()\n    {}\n\n    void KeyEditDlg::Show(const Curve::Key& key, const Function<void(const Curve::Key& key)>& onClosed)\n    {\n        Instance().mPosition->SetText(String(key.position));\n        Instance().mValue->SetText(String(key.value));\n        Instance().mLeftSupportPosition->SetText(String(key.leftSupportPosition));\n        Instance().mLeftSupportValue->SetText(String(key.leftSupportValue));\n        Instance().mRightSupportPosition->SetText(String(key.rightSupportPosition));\n        Instance().mRightSupportValue->SetText(String(key.rightSupportValue));\n\n        Instance().mOnClosed = onClosed;\n\n        Instance().mWindow->ShowModal();\n    }\n\n    void KeyEditDlg::OnOkPressed()\n    {\n        Curve::Key key;\n        key.position = (float)mPosition->GetText();\n        key.value = (float)mValue->GetText();\n        key.leftSupportPosition = (float)mLeftSupportPosition->GetText();\n        key.leftSupportValue = (float)mLeftSupportValue->GetText();\n        key.rightSupportPosition = (float)mRightSupportPosition->GetText();\n        key.rightSupportValue = (float)mRightSupportValue->GetText();\n\n        mOnClosed(key);\n        mWindow->Hide();\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/KeyEditDlg.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Singleton.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class EditBox;\n    class Window;\n}\n\nnamespace Editor\n{\n    // ---------------------\n    // Curve key edit dialog\n    // ---------------------\n    class KeyEditDlg : public Singleton<KeyEditDlg>\n    {\n    public:\n        // Constructor\n        KeyEditDlg(RefCounter* refCounter);\n\n        // Destructor\n        ~KeyEditDlg();\n\n        // Show the dialog\n        static void Show(const Curve::Key& key, const Function<void(const Curve::Key& key)>& onClosed);\n\n    private:\n        Ref<o2::Window> mWindow; // Dialog window\n\n        Ref<EditBox> mPosition;             // Key position\n        Ref<EditBox> mValue;                // Key value\n        Ref<EditBox> mLeftSupportPosition;  // Left support position\n        Ref<EditBox> mLeftSupportValue;     // Left support value\n        Ref<EditBox> mRightSupportPosition; // Right support position\n        Ref<EditBox> mRightSupportValue;    // Right support value\n\n        Function<void(const Curve::Key& key)> mOnClosed; // On closed callback\n\n    private:\n        // Called when Ok button pressed, calls onClosed function with new key parameters\n        void OnOkPressed();\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/System/Linux/OpenSaveDialog.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"o2Editor/Dialogs/System/OpenSaveDialog.h\"\n\n#ifdef PLATFORM_LINUX\n\nnamespace Editor\n{\n    String GetOpenFileNameDialog(const String& title, const Map<String, String>& extensions, const String& defaultPath /*= \"\"*/)\n    {\n        return \"\";\n    }\n\n    String GetSaveFileNameDialog(const String& title, const Map<String, String>& extensions, const String& defaultPath /*= \"\"*/)\n    {\n        return \"\";\n    }\n}\n\n#endif\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/System/Mac/OpenSaveDialog.mm",
    "content": "#ifdef PLATFORM_MAC\n\n#import <Cocoa/Cocoa.h>\n\n// Helper functions that work with raw C types to avoid namespace conflicts\nstatic const char* ShowOpenDialogCocoa(const char* title, const char** extensionKeys, const char** extensionValues, int extensionCount, const char* defaultPath)\n{\n    static char* resultPath = nullptr;\n    if (resultPath) {\n        free(resultPath);\n        resultPath = nullptr;\n    }\n    \n    @autoreleasepool {\n        NSOpenPanel* openPanel = [NSOpenPanel openPanel];\n        \n        // Set title if provided\n        if (title && strlen(title) > 0) {\n            [openPanel setTitle:[NSString stringWithUTF8String:title]];\n        }\n        \n        // Set initial directory\n        if (defaultPath && strlen(defaultPath) > 0) {\n            NSString* pathStr = [NSString stringWithUTF8String:defaultPath];\n            NSURL* directoryURL = [NSURL fileURLWithPath:pathStr];\n            [openPanel setDirectoryURL:directoryURL];\n        }\n        \n        // Set allowed file types from extensions\n        if (extensionCount > 0) {\n            NSMutableArray* allowedTypes = [[NSMutableArray alloc] init];\n            \n            for (int i = 0; i < extensionCount; i++) {\n                const char* extensionPattern = extensionValues[i];\n                \n                // Parse extension pattern like \"*.txt\" or \"*.png;*.jpg\"\n                NSString* patternStr = [NSString stringWithUTF8String:extensionPattern];\n                NSArray* patterns = [patternStr componentsSeparatedByString:@\";\"];\n                \n                for (NSString* pattern in patterns) {\n                    NSString* cleanPattern = [pattern stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];\n                    if ([cleanPattern hasPrefix:@\"*.\"]) {\n                        NSString* fileExt = [cleanPattern substringFromIndex:2];\n                        [allowedTypes addObject:fileExt];\n                    }\n                    else if ([cleanPattern hasPrefix:@\"*\"]) {\n                        NSString* fileExt = [cleanPattern substringFromIndex:1];\n                        [allowedTypes addObject:fileExt];\n                    }\n                }\n            }\n            \n            if ([allowedTypes count] > 0) {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n                [openPanel setAllowedFileTypes:allowedTypes];\n#pragma clang diagnostic pop\n            }\n        }\n        \n        [openPanel setCanChooseFiles:YES];\n        [openPanel setCanChooseDirectories:NO];\n        [openPanel setAllowsMultipleSelection:NO];\n        \n        NSModalResponse response = [openPanel runModal];\n        \n        if (response == NSModalResponseOK) {\n            NSURL* selectedURL = [[openPanel URLs] firstObject];\n            NSString* selectedPath = [selectedURL path];\n            const char* cPath = [selectedPath UTF8String];\n            resultPath = (char*)malloc(strlen(cPath) + 1);\n            strcpy(resultPath, cPath);\n            return resultPath;\n        }\n        \n        return nullptr;\n    }\n}\n\nstatic const char* ShowSaveDialogCocoa(const char* title, const char** extensionKeys, const char** extensionValues, int extensionCount, const char* defaultPath)\n{\n    static char* resultPath = nullptr;\n    if (resultPath) {\n        free(resultPath);\n        resultPath = nullptr;\n    }\n    \n    @autoreleasepool {\n        NSSavePanel* savePanel = [NSSavePanel savePanel];\n        \n        // Set title if provided\n        if (title && strlen(title) > 0) {\n            [savePanel setTitle:[NSString stringWithUTF8String:title]];\n        }\n        \n        // Set initial directory and filename\n        if (defaultPath && strlen(defaultPath) > 0) {\n            NSString* pathStr = [NSString stringWithUTF8String:defaultPath];\n            NSURL* pathURL = [NSURL fileURLWithPath:pathStr];\n            \n            BOOL isDirectory;\n            NSFileManager* fileManager = [NSFileManager defaultManager];\n            \n            if ([fileManager fileExistsAtPath:pathStr isDirectory:&isDirectory]) {\n                if (isDirectory) {\n                    [savePanel setDirectoryURL:pathURL];\n                } else {\n                    // If it's a file path, set directory to parent and filename to the file\n                    NSURL* directoryURL = [pathURL URLByDeletingLastPathComponent];\n                    NSString* filename = [pathURL lastPathComponent];\n                    [savePanel setDirectoryURL:directoryURL];\n                    [savePanel setNameFieldStringValue:filename];\n                }\n            } else {\n                // Path doesn't exist, check if it looks like a file or directory\n                if ([pathStr hasSuffix:@\"/\"]) {\n                    // Looks like a directory\n                    [savePanel setDirectoryURL:pathURL];\n                } else {\n                    // Treat as a file path\n                    NSURL* directoryURL = [pathURL URLByDeletingLastPathComponent];\n                    NSString* filename = [pathURL lastPathComponent];\n                    [savePanel setDirectoryURL:directoryURL];\n                    [savePanel setNameFieldStringValue:filename];\n                }\n            }\n        }\n        \n        // Set allowed file types from extensions\n        if (extensionCount > 0) {\n            NSMutableArray* allowedTypes = [[NSMutableArray alloc] init];\n            \n            for (int i = 0; i < extensionCount; i++) {\n                const char* extensionPattern = extensionValues[i];\n                \n                // Parse extension pattern like \"*.txt\" or \"*.png;*.jpg\"\n                NSString* patternStr = [NSString stringWithUTF8String:extensionPattern];\n                NSArray* patterns = [patternStr componentsSeparatedByString:@\";\"];\n                \n                for (NSString* pattern in patterns) {\n                    NSString* cleanPattern = [pattern stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];\n                    if ([cleanPattern hasPrefix:@\"*.\"]) {\n                        NSString* fileExt = [cleanPattern substringFromIndex:2];\n                        [allowedTypes addObject:fileExt];\n                    }\n                    else if ([cleanPattern hasPrefix:@\"*\"]) {\n                        NSString* fileExt = [cleanPattern substringFromIndex:1];\n                        [allowedTypes addObject:fileExt];\n                    }\n                }\n            }\n            \n            if ([allowedTypes count] > 0) {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n                [savePanel setAllowedFileTypes:allowedTypes];\n#pragma clang diagnostic pop\n            }\n        }\n        \n        [savePanel setCanCreateDirectories:YES];\n        \n        NSModalResponse response = [savePanel runModal];\n        \n        if (response == NSModalResponseOK) {\n            NSURL* selectedURL = [savePanel URL];\n            NSString* selectedPath = [selectedURL path];\n            const char* cPath = [selectedPath UTF8String];\n            resultPath = (char*)malloc(strlen(cPath) + 1);\n            strcpy(resultPath, cPath);\n            return resultPath;\n        }\n        \n        return nullptr;\n    }\n}\n\n#include \"o2Editor/stdafx.h\"\n#include \"o2Editor/Dialogs/System/OpenSaveDialog.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    String GetOpenFileNameDialog(const String& title, const Map<String, String>& extensions, const String& defaultPath /*= \"\"*/)\n    {\n        // Convert o2 types to C types for the helper function\n        const char* titlePtr = title.IsEmpty() ? nullptr : title.Data();\n        const char* defaultPathPtr = defaultPath.IsEmpty() ? nullptr : defaultPath.Data();\n        \n        // Convert extensions map to C arrays\n        int extensionCount = extensions.Count();\n        const char** extensionKeys = nullptr;\n        const char** extensionValues = nullptr;\n        \n        if (extensionCount > 0) {\n            extensionKeys = new const char*[extensionCount];\n            extensionValues = new const char*[extensionCount];\n            \n            int i = 0;\n            for (auto it = ((std::map<String, String>&)extensions).begin(); it != ((std::map<String, String>&)extensions).end(); ++it) {\n                extensionKeys[i] = it->first.Data();\n                extensionValues[i] = it->second.Data();\n                i++;\n            }\n        }\n        \n        // Call the Cocoa helper function\n        const char* result = ShowOpenDialogCocoa(titlePtr, extensionKeys, extensionValues, extensionCount, defaultPathPtr);\n        \n        // Clean up\n        if (extensionKeys) delete[] extensionKeys;\n        if (extensionValues) delete[] extensionValues;\n        \n        return result ? String(result) : String(\"\");\n    }\n\n    String GetSaveFileNameDialog(const String& title, const Map<String, String>& extensions, const String& defaultPath /*= \"\"*/)\n    {\n        // Convert o2 types to C types for the helper function\n        const char* titlePtr = title.IsEmpty() ? nullptr : title.Data();\n        const char* defaultPathPtr = defaultPath.IsEmpty() ? nullptr : defaultPath.Data();\n        \n        // Convert extensions map to C arrays\n        int extensionCount = extensions.Count();\n        const char** extensionKeys = nullptr;\n        const char** extensionValues = nullptr;\n        \n        if (extensionCount > 0) {\n            extensionKeys = new const char*[extensionCount];\n            extensionValues = new const char*[extensionCount];\n            \n            int i = 0;\n            for (auto it = ((std::map<String, String>&)extensions).begin(); it != ((std::map<String, String>&)extensions).end(); ++it) {\n                extensionKeys[i] = it->first.Data();\n                extensionValues[i] = it->second.Data();\n                i++;\n            }\n        }\n        \n        // Call the Cocoa helper function\n        const char* result = ShowSaveDialogCocoa(titlePtr, extensionKeys, extensionValues, extensionCount, defaultPathPtr);\n        \n        // Clean up\n        if (extensionKeys) delete[] extensionKeys;\n        if (extensionValues) delete[] extensionValues;\n        \n        return result ? String(result) : String(\"\");\n    }\n}\n\n#endif"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/System/OpenSaveDialog.h",
    "content": "#pragma once\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/String.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // Show open file dialog and returns name\n    String GetOpenFileNameDialog(const String& title, const Map<String, String>& extensions, const String& defaultPath = \"\");\n\n    // Show save file dialog and returns name\n    String GetSaveFileNameDialog(const String& title, const Map<String, String>& extensions, const String& defaultPath = \"\");\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/System/Windows/OpenSaveDialog.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"o2Editor/Dialogs/System/OpenSaveDialog.h\"\n\n#ifdef PLATFORM_WINDOWS\n\nnamespace Editor\n{\n    String GetOpenFileNameDialog(const String& title, const Map<String, String>& extensions, const String& defaultPath /*= \"\"*/)\n    {\n        char szFile[MAX_PATH];\n        char oldDir[MAX_PATH];\n\n        int filterStrSize = extensions.Sum<int>([](auto& k, auto& v) { return k.Length() + v.Length() + 2; }) + 1;\n        char* filterStr = new char[filterStrSize];\n        filterStr[filterStrSize - 1] = '\\0';\n\n        int i = 0;\n        for (auto& x : extensions)\n        {\n            memcpy(filterStr + i, x.first.Data(), x.first.Length());\n            i += x.first.Length();\n            filterStr[i++] = '\\0';\n\n            memcpy(filterStr + i, x.second.Data(), x.second.Length());\n            i += x.second.Length();\n            filterStr[i++] = '\\0';\n        }\n        filterStr[i] = '\\0';\n\n        String defaultPathReplaced = defaultPath.ReplacedAll(\"/\", \"\\\\\");\n\n        GetCurrentDirectory(MAX_PATH, oldDir);\n\n        OPENFILENAME ofn;\n        ZeroMemory(&ofn, sizeof(ofn));\n        ofn.lStructSize = sizeof(ofn);\n        ofn.hwndOwner = o2Application.GetWindowHandle();\n        ofn.lpstrFile = szFile;\n        ofn.lpstrFile[0] = '\\0';\n        ofn.nMaxFile = sizeof(szFile);\n        ofn.nFilterIndex = 1;\n        ofn.lpstrFileTitle = NULL;\n        ofn.nMaxFileTitle = 0;\n        ofn.lpstrInitialDir = defaultPathReplaced.Data();\n        ofn.Flags = OFN_OVERWRITEPROMPT;\n        ofn.lpstrFilter = filterStr;\n\n        if (GetOpenFileName(&ofn)==TRUE)\n        {\n            SetCurrentDirectory(oldDir);\n            return ofn.lpstrFile;\n        }\n\n        return \"\";\n    }\n\n    String GetSaveFileNameDialog(const String& title, const Map<String, String>& extensions, const String& defaultPath /*= \"\"*/)\n    {\n        char szFile[MAX_PATH];\n        char oldDir[MAX_PATH];\n\n        int filterStrSize = extensions.Sum<int>([](auto& k, auto& v) { return k.Length() + v.Length() + 2; }) + 1;\n        char* filterStr = new char[filterStrSize];\n        filterStr[filterStrSize - 1] = '\\0';\n\n        int i = 0;\n        for (auto& x : extensions)\n        {\n            memcpy(filterStr + i, x.first.Data(), x.first.Length());\n            i += x.first.Length();\n            filterStr[i++] = '\\0';\n\n            memcpy(filterStr + i, x.second.Data(), x.second.Length());\n            i += x.second.Length();\n            filterStr[i++] = '\\0';\n        }\n        filterStr[i] = '\\0';\n\n        String defaultPathReplaced = defaultPath.ReplacedAll(\"/\", \"\\\\\");\n\n        GetCurrentDirectory(MAX_PATH, oldDir);\n\n        OPENFILENAME ofn;\n        ZeroMemory(&ofn, sizeof(ofn));\n        ofn.lStructSize = sizeof(ofn);\n        ofn.hwndOwner = o2Application.GetWindowHandle();\n        ofn.lpstrFile = szFile;\n        ofn.lpstrFile[0] = '\\0';\n        ofn.nMaxFile = sizeof(szFile);\n        ofn.nFilterIndex = 1;\n        ofn.lpstrFileTitle = NULL;\n        ofn.nMaxFileTitle = 0;\n        ofn.lpstrInitialDir = defaultPathReplaced.Data();\n        ofn.Flags = OFN_OVERWRITEPROMPT;\n        ofn.lpstrFilter = filterStr;\n\n        if (GetSaveFileName(&ofn) == TRUE)\n        {\n            SetCurrentDirectory(oldDir);\n            return ofn.lpstrFile;\n        }\n\n        return \"\";\n    }\n}\n\n#endif"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/YesNoCancelDlg.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"YesNoCancelDlg.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2Editor/UIRoot.h\"\n\nDECLARE_SINGLETON(Editor::YesNoCancelDlg);\n\nnamespace Editor\n{\n\tYesNoCancelDlg::YesNoCancelDlg(RefCounter* refCounter) :\n\t\tSingleton<YesNoCancelDlg>(refCounter), CursorEventsListener(refCounter)\n\t{\n\t\tmWindow = DynamicCast<o2::Window>(EditorUIRoot.AddWidget(o2UI.CreateWindow(\"Confirmation\")));\n\n\t\tInitializeControls();\n\n\t\tmWindow->Hide(true);\n\t\t*mWindow->layout = WidgetLayout::Based(BaseCorner::Center, Vec2F(350, 150));\n\n\t\tmWindow->GetBackCursorListener().onCursorReleased = [&](const Input::Cursor& c) { OnCursorPressedOutside(); };\n\t\tmWindow->onHide = MakeFunction(this, &YesNoCancelDlg::OnHide);\n\t}\n\n\tYesNoCancelDlg::~YesNoCancelDlg()\n\t{\n\t}\n\n\tvoid YesNoCancelDlg::ShowYesNoCancel(const String& message,\n\t\t\t\t\t\t\t\t\t\t const Function<void()>& onYes,\n\t\t\t\t\t\t\t\t\t\t const Function<void()>& onNo /*= Function<void()>()*/,\n\t\t\t\t\t\t\t\t\t\t const Function<void()>& onCancel /*= Function<void()>()*/)\n\t{\n\t\tmInstance->mMessageLabel->SetText(message);\n\t\tmInstance->mWindow->ShowModal();\n\t\tmInstance->mOnYesCallback = onYes;\n\t\tmInstance->mOnNoCallback = onNo;\n\t\tmInstance->mOnCancelCallback = onCancel;\n\t\tmInstance->mCancelButton->Show(true);\n\t}\n\n\tvoid YesNoCancelDlg::ShowYesNo(const String& message, \n\t\t\t\t\t\t\t\t   const Function<void()>& onYes, \n\t\t\t\t\t\t\t\t   const Function<void()>& onNo /*= Function<void()>()*/)\n\t{\n\t\tmInstance->mMessageLabel->SetText(message);\n\t\tmInstance->mWindow->ShowModal();\n\t\tmInstance->mOnYesCallback = onYes;\n\t\tmInstance->mOnNoCallback = onNo;\n\t\tmInstance->mOnCancelCallback = Function<void()>();\n\t\tmInstance->mCancelButton->Hide(true);\n\t}\n\n\tvoid YesNoCancelDlg::OnHide()\n\t{\n\t\tmOnCancelCallback();\n\t}\n\n\tvoid YesNoCancelDlg::InitializeControls()\n\t{\n\t\tauto verLayout = o2UI.CreateVerLayout();\n\t\tverLayout->spacing = 15;\n\n\t\tmMessageLabel = o2UI.CreateLabel(\"Confirmation message\");\n\t\tmMessageLabel->SetHorAlign(HorAlign::Middle);\n\t\tverLayout->AddChild(mMessageLabel);\n\n\t\tauto horLayout = o2UI.CreateHorLayout();\n\t\thorLayout->spacing = 10;\n\n\t\tmYesButton = o2UI.CreateButton(\"Yes\", MakeFunction(this, &YesNoCancelDlg::OnYesPressed));\n\t\thorLayout->AddChild(mYesButton);\n\n\t\tmNoButton = o2UI.CreateButton(\"No\", MakeFunction(this, &YesNoCancelDlg::OnNoPressed));\n\t\thorLayout->AddChild(mNoButton);\n\n\t\tmCancelButton = o2UI.CreateButton(\"Cancel\", MakeFunction(this, &YesNoCancelDlg::OnCancelPressed));\n\t\thorLayout->AddChild(mCancelButton);\n\n\t\tverLayout->AddChild(horLayout);\n\n\t\tmWindow->AddChild(verLayout);\n\t}\n\n\tvoid YesNoCancelDlg::OnYesPressed()\n\t{\n\t\tmOnYesCallback();\n\t\tmWindow->Hide();\n\t}\n\n\tvoid YesNoCancelDlg::OnNoPressed()\n\t{\n\t\tmOnNoCallback();\n\t\tmWindow->Hide();\n\t}\n\n\tvoid YesNoCancelDlg::OnCancelPressed()\n\t{\n\t\tmOnCancelCallback();\n\t\tmWindow->Hide();\n\t}\n\n\tvoid YesNoCancelDlg::OnCursorPressedOutside()\n\t{\n\t\tmOnCancelCallback();\n\t\tmWindow->Hide();\n\t}\n}"
  },
  {
    "path": "Editor/Sources/o2Editor/Dialogs/YesNoCancelDlg.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Singleton.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n\tclass Label;\n\tclass Widget;\n\tclass WidgetLayer;\n\tclass Window;\n}\n\nnamespace Editor\n{\n\t// -------------------------\n\t// Yes/No/Cancel confirmation dialog\n\t// -------------------------\n\tclass YesNoCancelDlg : public Singleton<YesNoCancelDlg>, public CursorEventsListener\n\t{\n\tpublic:\n\t\t// Default constructor\n\t\tYesNoCancelDlg(RefCounter* refCounter);\n\n\t\t// Destructor\n\t\t~YesNoCancelDlg();\n\n\t\t// Shows confirmation dialog with Yes/No/Cancel buttons\n\t\tstatic void ShowYesNoCancel(const String& message,\n\t\t\t\t\t\t\t\t\tconst Function<void()>& onYes,\n\t\t\t\t\t\t\t\t\tconst Function<void()>& onNo = Function<void()>(),\n\t\t\t\t\t\t\t\t\tconst Function<void()>& onCancel = Function<void()>());\n\n\t\t// Shows confirmation dialog with Yes/No buttons\n\t\tstatic void ShowYesNo(const String& message,\n\t\t\t\t\t\t\t  const Function<void()>& onYes,\n\t\t\t\t\t\t\t  const Function<void()>& onNo = Function<void()>());\n\n\t\tREF_COUNTERABLE_IMPL(Singleton<YesNoCancelDlg>, CursorEventsListener);\n\n\tprotected:\n\t\tFunction<void()> mOnYesCallback;    // On Yes button callback\n\t\tFunction<void()> mOnNoCallback;     // On No button callback\n\t\tFunction<void()> mOnCancelCallback; // On Cancel button callback\n\n\t\tRef<o2::Window> mWindow;      // Dialog window\n\t\tRef<Label>      mMessageLabel; // Message label\n\t\tRef<Button>     mYesButton;    // Yes button\n\t\tRef<Button>     mNoButton;     // No button\n\t\tRef<Button>     mCancelButton; // Cancel button\n\n\tprotected:\n\t\t// Calls when hiding dialog\n\t\tvoid OnHide();\n\n\t\t// Initializes message label and buttons\n\t\tvoid InitializeControls();\n\n\t\t// Called when Yes button pressed, calls mOnYesCallback and closes window\n\t\tvoid OnYesPressed();\n\n\t\t// Called when No button pressed, calls mOnNoCallback and closes window  \n\t\tvoid OnNoPressed();\n\n\t\t// Called when Cancel button pressed, calls mOnCancelCallback and closes window\n\t\tvoid OnCancelPressed();\n\n\t\t// Called when cursor pressed outside from window\n\t\tvoid OnCursorPressedOutside();\n\t};\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/EditorApplication.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"EditorApplication.h\"\n\n#include \"o2/Animation/Tracks/AnimationColor4Track.h\"\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Animation/Tracks/AnimationVec2FTrack.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Components/ImageComponent.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/MenuPanel.h\"\n#include \"o2/Scene/UI/Widgets/MenuPanel.h\"\n#include \"o2/Scripts/ScriptEngine.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/Function/ActorSubscription.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n#include \"o2/Utils/Tasks/TaskManager.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Actions/IAction.h\"\n#include \"o2Editor/Actions/PropertyChange.h\"\n#include \"o2Editor/MenuPanel.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/ToolsPanel.h\"\n#include \"o2Editor/UIRoot.h\"\n#include \"o2Editor/UI/Style/EditorUIStyle.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n#include \"o2Editor/Utils/CommonTextures.h\"\n\nnamespace Editor\n{\n    EditorApplication::EditorApplication(RefCounter* refCounter):\n        Application(refCounter)\n    {}\n\n    EditorApplication::~EditorApplication()\n    {}\n\n    const String& EditorApplication::GetLoadedSceneName() const\n    {\n        if (mSceneWindow && mSceneWindow->GetEditingAsset())\n            return mSceneWindow->GetEditingAsset()->GetPath();\n\n        return String::empty;\n    }\n\n    void EditorApplication::LoadScene(const AssetRef<SceneAsset>& scene)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (mSceneWindow)\n        {\n            mSceneWindow->EditAsset(AssetRef<Asset>(scene));\n            mSceneWindow->ResetUndoActions();\n        }\n    }\n\n    void EditorApplication::SaveScene()\n    {\n        if (mSceneWindow)\n            mSceneWindow->SaveEditingAsset();\n    }\n\n    void EditorApplication::SaveSceneAs(const String& path)\n    {\n        String relativePath = o2FileSystem.GetPathRelativeToPath(path, ::GetAssetsPath());\n\n        o2Scene.Save(path);\n\n        auto newSceneAsset = AssetRef<SceneAsset>::CreateAsset();\n        newSceneAsset->SetPath(relativePath);\n        newSceneAsset->Save();\n\n        if (mSceneWindow)\n        {\n            mSceneWindow->EditAsset(AssetRef<Asset>(newSceneAsset));\n            mSceneWindow->ResetUndoActions();\n        }\n    }\n\n    void EditorApplication::MakeNewScene()\n    {\n        if (mSceneWindow)\n        {\n            mSceneWindow->CreateNewAsset();\n            mSceneWindow->ResetUndoActions();\n            o2EditorPropertiesWindow.ResetTargets();\n        }\n    }\n\n    bool EditorApplication::IsSceneChanged() const\n    {\n        bool assetChanged = false;\n        if (mSceneWindow && mSceneWindow->GetEditingAsset())\n            assetChanged = mSceneWindow->GetEditingAsset()->IsDirty();\n\n        return assetChanged || (mSceneWindow ? mSceneWindow->GetUndoActionsCount() > 0 : false);\n    }\n\n    void EditorApplication::SetPlaying(bool playing)\n    {\n        if (playing == mIsPlaying)\n            return;\n\n        mPlayingChanged = true;\n        mIsPlaying = playing;\n\n        o2Scene.SetEditorPlaying(mIsPlaying);\n    }\n\n    bool EditorApplication::IsPlaying() const\n    {\n        return mIsPlaying;\n    }\n\n    Ref<RefCounterable> EditorApplication::CastToRefCounterable(const Ref<EditorApplication>& ref)\n    {\n        return DynamicCast<Application>(ref);\n    }\n    \n    void EditorApplication::InitalizeSystems()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        Application::InitalizeSystems();\n        mMainListenersLayer->SetEditorMode(true);\n        o2Scene.SetIsEditor(true);\n    }\n    \n    void EditorApplication::Deinitialize()\n    {\n        o2EditorConfig.SaveProjectConfigs();\n        o2EditorConfig.SaveGlobalConfigs();\n        \n        Application::Deinitialize();\n    }\n\n    void EditorApplication::OnStarted()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        PushEditorScopeOnStack enterScope;\n\n        o2Application.SetWindowCaption(\"o2 Editor\");\n\n        mUIRoot = mmake<UIRoot>();\n\n        mBackground = mmake<Sprite>(\"ui/UI4_Background.png\");\n        mBackSign = mmake<Sprite>(\"ui/UI4_o2_sign.png\");\n\n        CommonTextures::Initialize();\n\n        mConfig = mmake<EditorConfig>();\n        mConfig->LoadConfigs();\n\n        String lastLoadedScene = o2EditorConfig.projectConfig.lastLoadedScene;\n\n        LoadUIStyle();\n\n        mProperties = mmake<Properties>();\n        mWindowsManager = mmake<WindowsManager>();\n        mMenuPanel = mmake<MenuPanel>();\n        mToolsPanel = mmake<ToolsPanel>();\n\n        mSceneWindow = mWindowsManager->GetWindow<SceneWindow>();\n\n        if (mConfig->projectConfig.maximized)\n            o2Application.Maximize();\n        else\n        {\n            Vec2I pos = mConfig->projectConfig.windowPosition;\n            o2Application.SetWindowSize(mConfig->projectConfig.windowSize);\n            o2Application.SetWindowPosition(pos);\n            mConfig->projectConfig.windowPosition = pos;\n        }\n\n        OnResizing();\n        mScene->UpdateAddedEntities();\n        mScene->UpdateDestroyingEntities();\n\n        if (!lastLoadedScene.IsEmpty())\n            o2EditorSceneWindow.EditAsset(AssetRef<Asset>(AssetRef<SceneAsset>(lastLoadedScene)));\n\n        o2Scripts.CollectGarbage();\n\n        //o2Scripts.GetGlobal().SetProperty(\"widget\", mmake<Widget>());\n\n        //         ScriptValue tmp(Vector<int>({ 0, 1, 2, 3, 4 }));\n        // \n        //         auto typ = tmp.GetValueType();\n        //         o2Scripts.GetGlobal().SetProperty(\"tmp\", tmp);\n        //         o2Scripts.Eval(\"print(JSON.stringify(tmp));\");\n        //         auto tmp0str = tmp.GetElement(1).ToString();\n        //         o2Debug.Log(tmp0str);\n\n                //         ScriptValue tttConstruct;\n                //         tttConstruct.SetFunction(Function<void(ScriptValue, int)>([](ScriptValue xx, int x) { xx.SetProperty(\"x\", x); }));\n                //         o2Scripts.GetGlobal().SetProperty(\"ttt\", tttConstruct);\n                // \n                //         o2Scripts.Eval(\"let xttt = new ttt(5); print(JSON.stringify(xttt));\");\n                        // \n                        //float testValue = 0;\n                        //o2Scripts.GetGlobal().SetProperty(\"back\", mBackground);\n                //         o2Scripts.GetGlobal().SetPropertyWrapper<float>(ScriptValue(\"test\"),\n                //             Function<void(float)>([&](float xx) { testValue = xx; }),\n                //             Function<float()>([&]() { return testValue; }));\n                // \n                //         auto tp = o2Scripts.GetGlobal().GetProperty(\"test\").GetValueType();\n                // \n                //         o2Scripts.Eval(\"print('test is ' + test + ', and its type is ' + typeof test);\");\n\n                        //auto filename = GetAssetsPath() + String(\"test.js\");\n                        //o2Scripts.Run(o2Scripts.Parse(o2FileSystem.ReadFile(filename), filename));\n\n                        //o2Debug.LogStr(\"---Dump global---\\n\" + o2Scripts.GetGlobal().Dump() + \"\\n---------------\");\n\n                //         o2Scripts.Eval(\"let bbn = new Vec2(3, 5); print(Vec2.prototype); print(Dump(Vec2.prototype));\");\n                // \n                //         ScriptValue tmp;\n                //         tmp.Accept(jerry_object_get_property_names(o2Scripts.GetGlobal().jvalue, JERRY_PROPERTY_FILTER_ALL));\n                //         o2Debug.Log(tmp.Dump());\n                // \n                //         ScriptValue v(Vec2F(3, 2));\n                //         o2Scripts.GetGlobal().SetProperty(\"v\", v);\n                //         o2Scripts.Eval(\"print(v.Length());\");\n                // \n                //         o2Scripts.GetGlobal().SetProperty(\"back\", mBackground);\n                // \n                //         o2Debug.Log(o2Scripts.Eval(\"Vec2.prototype\").Dump());\n\n                //         o2Scripts.GetGlobal().SetProperty(\"widget\", ScriptValue(*widget));\n                //         o2Scripts.Eval(\"widget.layout.position = Vec2.New(2, 2); print(JSON.stringify(widget.GetChildren(), null, 2));\");\n                // \n                //         o2Scripts.GetGlobal().SetProperty(\"array\", ScriptValue(Vector<int>({ 0, 1, 2, 3, 4 ,5 })));\n                //         o2Scripts.Eval(\"print(JSON.stringify(array, null, 2))\");\n                // \n                //         Vector<int> arr = o2Scripts.GetGlobal().GetProperty(\"array\");\n                //         o2Scripts.Eval(\"print('hello world!');\");\n                //         o2Scripts.Eval(\"var x = 5 + 5; function myf(a, b) { print(a); print(b); var sum = a + b; print(sum); return sum; }\");\n                //         ScriptValue v2(Vec2F(3, 4));\n                //         o2Scripts.GetGlobal().SetProperty(ScriptValue(\"mm\"), v2);\n                //         o2Scripts.Eval(\"print(JSON.stringify(mm));\");\n                //         o2Scripts.CollectGarbage();\n                //         ScriptValue p(Function<float(int, float)>([](int a, float b) { o2Debug.Log(\"prived pidor \" + (String)(a + b)); return a + b + 5; }));\n                //         o2Scripts.CollectGarbage();\n                //         o2Scripts.GetGlobal().SetProperty(ScriptValue(\"myfunc\"), p);\n                //         o2Scripts.CollectGarbage();\n                //         o2Scripts.Eval(\"print(myfunc(1, 3.2));\");\n                //         o2Scripts.CollectGarbage();\n                // \n                //         std::tuple<std::remove_reference<const String&>::type> t = { \"as\" };\n                //         auto fff = [](const String& x) { o2Debug.Log(x); };\n                //         std::apply(fff, t);\n                //         ScriptValue ff(Function<void(const String&)>([](const String& xx) { o2Debug.Log(\"called ff\" + xx); }));\n                //         o2Scripts.GetGlobal().SetProperty(ScriptValue(\"ff\"), ff);\n                //         o2Scripts.Eval(\"ff('asd');\");\n                // \n                //         int testPtr = 2;\n                //         ScriptValue obj;\n                //          obj.SetPropertyWrapper(ScriptValue(\"ptrProp\"), testPtr);\n                //          obj.SetPropertyWrapper<int>(ScriptValue(\"funcProp\"), [](int v) { o2Debug.Log((String)v); }, []() { return 15; });\n                //         obj.SetProperty(ScriptValue(\"func\"), ScriptValue(Function<float()>([]() { \n                //             o2Debug.Log(\"ass\"); \n                //             return 5.0f;\n                //         })));\n                //         o2Scripts.GetGlobal().SetProperty(ScriptValue(\"obj\"), obj);\n                //         o2Scripts.Eval(\"print(JSON.stringify(obj));\");\n                //         o2Scripts.Eval(\"obj.ptrProp = obj.ptrProp + 5\");\n                //         o2Scripts.Eval(\"obj.ptrProp = obj.func() + 5\");\n                //         o2Scripts.Eval(\"obj.funcProp = obj.funcProp + 5\");\n                //         o2Scripts.GetGlobal().SetProperty(ScriptValue(\"obj\"), obj);\n                //         o2Scripts.Eval(\"print(JSON.stringify(obj));\");\n                // \n                //         o2Scripts.GetGlobal().SetProperty(ScriptValue(\"scriptValueFunc\"), ScriptValue(Function<ScriptValue()>([&]()\n                //         {\n                //             return mBackground->GetScriptValue();\n                //         })));\n                // \n                //         o2Debug.LogStr(\"---Dump global---\\n\" + o2Scripts.GetGlobal().Dump() + \"\\n---------------\");\n                // \n                //         o2Scripts.Eval(\"print(JSON.stringify(scriptValueFunc()))\");\n                // \n                //         o2Scripts.Eval(\"var testSprite = o2.Sprite.New('ui/UI4_Background.png'); testSprite.image = o2.RefImageAsset.New('ui/UI_Background.png');\");\n                // \n                //         ScriptValue prot;\n                //         prot.SetProperty(\"a\", 5);\n                //         prot.SetProperty(\"func\", Function<void()>([]() { o2Debug.Log(\"privet\"); }));\n                // \n                //         Vec2F tv2(3, 5);\n                //         o2Scripts.GetGlobal().SetProperty(\"gettt\", Function<Vec2F(const Vec2F&)>([&](const Vec2F& in) { tv2 += in; return tv2; }));\n                //         o2Scripts.Eval(\"print(JSON.stringify(gettt(Vec2.New(2, 3))));\");\n                // \n                //         ScriptValue exm = ScriptValue::EmptyObject();\n                //         exm.SetPrototype(prot);\n                //         o2Scripts.GetGlobal().SetProperty(\"exm\", exm);\n                //         o2Scripts.Eval(\"exm.func();\");\n                // \n                //         o2Scripts.Run(o2Scripts.Parse(o2FileSystem.ReadFile(GetAssetsPath() + String(\"test.js\"))));\n                // \n                //         o2Scripts.Eval(\"yy.func();\");\n                // \n                //         o2Scripts.Eval(\"function testDefault(x = 5) { print(Math.sqrt(x)); }; testDefault(); testDefault(10);\");\n                //         o2Scripts.Eval(\"let vv = Vec2.New(3, 5); let gg = vv.Add(Vec2.New(1, 1)); print(gg.x + '; ' + gg.y);\");\n                // \n                //         o2Debug.LogStr(\"---Dump mBackground---\\n\" + mBackground->GetScriptValue().Dump() + \"\\n---------------\");\n                // \n                //         o2Scripts.GetGlobal().SetProperty(ScriptValue(\"wrp\"), mBackground->GetScriptValue());\n                //         o2Scripts.Eval(\"wrp.Draw()\");\n                //         o2Scripts.Eval(\"wrp.SetFill(wrp.GetFill() - 0.1)\");\n                //         o2Scripts.Eval(\"wrp.position = wrp.position.Add(Vec2.New(2, 2));\");\n                //         o2Scripts.Eval(\"print(wrp.GetImageName()); wrp.LoadFromImage('ui/UI_Background.png')\");\n                //         auto pres = o2Scripts.Parse(\"vaddr str = 'Hello, World!';\");\n                //         if (!pres.IsOk()) {\n                //             o2Debug.Log(pres.GetError());\n                //         }\n                //         else {\n                //             o2Scripts.Run(pres);\n                //         }\n                // \n                //         auto myfuncRef = o2Scripts.GetGlobal().GetProperty(ScriptValue(\"myfunc\")).GetValue<Function<float(int, float)>>();\n                //         auto mffr = myfuncRef(2, 3.5f);\n                // \n                //         auto myfRef = o2Scripts.GetGlobal().GetProperty(ScriptValue(\"myf\")).GetValue<Function<float(int, float)>>();\n                //         auto myfr = myfRef(2, 3.5f);\n                // \n                //         ScriptValue mb; mb.SetValue(*mBackground); mb.SetProperty(ScriptValue(\"a\"), ScriptValue(\"b\"));\n                //         ScriptValue xx = mb;\n                //         auto xxxx = o2Scripts.GetGlobal().GetProperty(ScriptValue(\"myf\")).Invoke<float>(33, 56);\n                //         o2Scripts.GetGlobal().SetProperty(ScriptValue(\"myObj\"), mb);\n                //         o2Scripts.Eval(\"print(JSON.stringify(myObj));\");\n                //         o2Scripts.Eval(\"myObj.fill = 0.5\");\n                //         o2Scripts.Eval(\"print(JSON.stringify(myObj));\");\n                // \n                // //         {\n                // //             ScriptValue x([]() {\n                // //                 o2Debug.Log(\"prived pidor\");\n                // //             });\n                // //             x.Invoke();\n                // // \n                // //             ScriptValue y;\n                // //             y.SetValue([]() {\n                // //                 o2Debug.Log(\"prived pidor ti\");\n                // //             });\n                // //             y.Invoke();\n                // //         }\n                // //         o2Scripts.CollectGarbage();\n                // //         auto xx = x.ToString();\n                //          float res = o2Scripts.GetGlobal().GetProperty(ScriptValue(\"x\")).ToNumber();\n\n\n        o2Debug.LogStr(\"---Dump global---\\n\" + o2Scripts.GetGlobal().Dump() + \"\\n---------------\");\n    }\n\n    void EditorApplication::OnClosing()\n    {\n        mConfig = nullptr;\n        mWindowsManager = nullptr;\n        mSceneWindow = nullptr;\n        mBackground = nullptr;\n        mBackSign = nullptr;\n        mToolsPanel = nullptr;\n        mMenuPanel = nullptr;\n        mUIRoot = nullptr;\n    }\n\n    void EditorApplication::OnResizing()\n    {\n        mBackground->SetSize(o2Render.GetResolution() + Vec2F(20, 20));\n        mBackSign->position = (Vec2F)(o2Render.GetResolution()).InvertedX() * 0.5f + Vec2F(40.0f, -85.0f);\n\n        mConfig->OnWindowChange();\n        mUIRoot->OnApplicationSized();\n    }\n\n    void EditorApplication::OnMoved()\n    {\n        mConfig->OnWindowChange();\n    }\n\n    void EditorApplication::ProcessFrame()\n    {\n        PushEditorScopeOnStack scope;\n\n        mUpdateStep = mIsPlaying && (!isPaused || step);\n        step = false;\n\n        Application::ProcessFrame();\n\n        mDrawCalls = mRender->GetDrawCallsCount();\n        mDrawnPrimitives = mRender->GetDrawnPrimitives();\n    }\n\n    void EditorApplication::CheckPlayingSwitch()\n    {\n        if (!mPlayingChanged)\n            return;\n\n        ForcePopEditorScopeOnStack scope;\n\n        if (mIsPlaying)\n        {\n            o2EditorSceneScreen.ClearSelection();\n\n            mSceneDump.Clear();\n            o2Scene.Save(mSceneDump);\n            o2Scene.Load(mSceneDump);\n            o2EditorTree.RestoreExpandedFromCache();\n        }\n        else\n        {\n            o2EditorSceneScreen.ClearSelection();\n            o2Scene.Load(mSceneDump);\n            o2EditorTree.RestoreExpandedFromCache();\n        }\n\n        mPlayingChanged = false;\n    }\n\n    void EditorApplication::LoadUIStyle()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        EditorUIStyleBuilder builder;\n        builder.RebuildEditorUIManager(\"Editor UI styles\", true, true);\n    }\n\n    void EditorApplication::PreUpdatePhysics()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        ForcePopEditorScopeOnStack scope;\n\n        Application::PreUpdatePhysics();\n    }\n\n    void EditorApplication::UpdatePhysics(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        ForcePopEditorScopeOnStack scope;\n\n        if (mUpdateStep)\n            Application::UpdatePhysics(dt);\n    }\n\n    void EditorApplication::PostUpdatePhysics()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        ForcePopEditorScopeOnStack scope;\n\n        if (mUpdateStep)\n            Application::PostUpdatePhysics();\n    }\n\n    void EditorApplication::UpdateScene(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        ForcePopEditorScopeOnStack scope;\n\n        if (mUpdateStep)\n        {\n            mScene->Update(dt);\n            o2EditorSceneScreen.NeedRedraw();\n        }\n        else\n        {\n            mScene->UpdateAddedEntities();\n            mScene->UpdateDestroyingEntities();\n            mScene->UpdateTransforms();\n        }\n\n        CheckPlayingSwitch();\n    }\n\n    void EditorApplication::FixedUpdateScene(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        ForcePopEditorScopeOnStack scope;\n\n        if (mUpdateStep)\n            mScene->FixedUpdate(dt);\n    }\n\n    void EditorApplication::UpdateTaskManager(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        ForcePopEditorScopeOnStack scope;\n\n        if (mUpdateStep)\n            mTaskManager->Update(dt);\n    }\n\n    void EditorApplication::DrawScene()\n    {\n    }\n\n    void EditorApplication::DrawUIManager()\n    {\n        PushEditorScopeOnStack scope;\n        Application::DrawUIManager();\n    }\n\n    void EditorApplication::DrawDebug()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        o2Debug.Draw(true);\n    }\n\n    void EditorApplication::UpdateDebug(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (mUpdateStep)\n            o2Debug.Update(false, dt);\n\n        o2Debug.Update(true, dt);\n    }\n\n    void EditorApplication::UpdateEventSystem()\n    {\n        PushEditorScopeOnStack scope;\n        Application::UpdateEventSystem();\n    }\n\n    void EditorApplication::PostUpdateEventSystem()\n    {\n        PushEditorScopeOnStack scope;\n        Application::PostUpdateEventSystem();\n    }\n\n    void EditorApplication::OnUpdate(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        mWindowsManager->Update(dt);\n        mUIRoot->Update(dt);\n        mToolsPanel->Update(dt);\n\n        String currentScene = GetLoadedSceneName();\n\n        o2Application.windowCaption = String(\"o2 Editor: \") + currentScene +\n            \"; FPS: \" + (String)((int)o2Time.GetFPS()) +\n            \" DC: \" + (String)mDrawCalls +\n            \" Tris: \" + (String)mDrawnPrimitives +\n            \" Cursor: \" + (String)o2Input.GetCursorPos() +\n            \" JS: \" + (String)(o2Scripts.GetUsedMemory() / 1024) + \"kb\";\n\n        if (o2Input.IsKeyPressed('K'))\n            o2Memory.DumpInfo();\n\n#if defined(TRACY_ENABLE)\n        TracyPlot(\"FPS\", o2Time.GetFPS());\n        TracyPlot(\"Draw Calls\", (float)mDrawCalls);\n        TracyPlot(\"Drawn Primitives\", (float)mDrawnPrimitives);\n        TracyPlot(\"JS Memory\", o2Scripts.GetUsedMemory() / 1024.0f);\n#endif\n    }\n\n#undef DrawText\n\n    void EditorApplication::OnDraw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        PushEditorScopeOnStack scope;\n\n        o2Render.Clear();\n\n        mBackground->Draw();\n        mBackSign->Draw();\n        mWindowsManager->Draw();\n        mUIRoot->Draw();\n\n        // Debug draw undo actions\n        if (o2Input.IsKeyDown(VK_F6))\n        {\n            auto actions = mSceneWindow ? mSceneWindow->GetUndoActions() : Vector<Ref<IAction>>();\n            for (int i = 0; i < actions.Count(); i++)\n                o2Debug.DrawText(Vec2F(0, (float)(20 * i)), (String)i + actions[i]->GetName());\n        }\n    }\n\n    void EditorApplication::OnActivated()\n    {\n        //o2Assets.RebuildAssets();\n    }\n\n    void EditorApplication::OnDeactivated()\n    {\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::EditorApplication, Editor__EditorApplication);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/EditorApplication.h",
    "content": "#pragma once\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Events/CursorAreaEventsListenersLayer.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2Editor/EditorConfig.h\"\n#include \"o2/Assets/Types/SceneAsset.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class MenuPanel;\n}\n\n// Editor application access macros\n#define o2EditorApplication (*(EditorApplication*)(Application::InstancePtr()))\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(EditorConfig);\n    FORWARD_CLASS_REF(IAction);\n    FORWARD_CLASS_REF(MenuPanel);\n    FORWARD_CLASS_REF(Properties);\n    FORWARD_CLASS_REF(SceneWindow);\n    FORWARD_CLASS_REF(ToolsPanel);\n    FORWARD_CLASS_REF(UIRoot);\n    FORWARD_CLASS_REF(WindowsManager);\n\n    // ------------------\n    // Editor application\n    // ------------------\n    class EditorApplication: public Application\n    {\n    public:\n        bool isPaused = false;  // Is editor scene paused\n        bool step = false;      // Is needed to do one update step\n\n    public:\n        // Default constructor. Initializes all editor components\n        EditorApplication(RefCounter* refCounter);\n\n        // Destructor\n        ~EditorApplication();\n\n        // Returns current scene name\n        const String& GetLoadedSceneName() const;\n\n        // Loads scene from file\n        void LoadScene(const AssetRef<SceneAsset>& scene);\n\n        // Saves current scene\n        void SaveScene();\n\n        // Saves scene from file\n        void SaveSceneAs(const String& path);\n\n        // Makes new scene\n        void MakeNewScene();\n\n        // Returns is current scene was changed\n        bool IsSceneChanged() const;\n\n        // Runs or stops scene playing. Saving scene into temporary file before playing, restoring after stopping\n        void SetPlaying(bool playing);\n\n        // Is scene playing\n        bool IsPlaying() const;\n\n        // Dynamic cast to RefCounterable via Application\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<EditorApplication>& ref);\n\n        IOBJECT(EditorApplication);\n        REF_COUNTERABLE_IMPL(Application);\n\n    protected:\n        Ref<Sprite> mBackground; // Background sprite\n        Ref<Sprite> mBackSign;   // Background o2 signature\n\n        Ref<UIRoot>         mUIRoot;         // Root editor UI\n        Ref<WindowsManager> mWindowsManager; // Windows manager\n        Ref<EditorConfig>   mConfig;         // Application configuration\n        Ref<ToolsPanel>     mToolsPanel;     // Tools panel\n        Ref<MenuPanel>      mMenuPanel;      // Menu panel\n\n        Ref<Properties>  mProperties;  // Properties manager\n        Ref<SceneWindow> mSceneWindow; // Scene window reference\n\n        DataDocument mSceneDump; // Scene dump, created before playing\n\n        bool mIsPlaying = false;      // Is editor scene playing\n        bool mPlayingChanged = false; // True when need to update playing mode on update\n        bool mUpdateStep = false;     // True when frame updating available on this frame\n\n        int mDrawCalls = 0;       // Draw calls count, stored before beginning rendering\n        int mDrawnPrimitives = 0; // DRaw promitives at frame\n\n    protected:\n        // Initializing all systems and log. Sets up editor settings for some systems\n        void InitalizeSystems() override;\n        \n        // Deinitializes application\n        void Deinitialize() override;\n\n        // Check style rebuilding and loads editor UI style\n        void LoadUIStyle();\n\n        // Before update physics\n        void PreUpdatePhysics() override;\n\n        // Updates physics\n        void UpdatePhysics(float dt) override;\n\n        // After update physics\n        void PostUpdatePhysics() override;\n\n        // Updates scene\n        void UpdateScene(float dt) override;\n\n        // Updates scene with fixed delta time\n        void FixedUpdateScene(float dt) override;\n\n        // Updates task manager\n        void UpdateTaskManager(float dt) override;\n\n        // Draws scene\n        void DrawScene() override;\n\n        // Draws UI manager\n        void DrawUIManager() override;\n\n        // Draw debug empty stub\n        void DrawDebug() override;\n\n        // Updates debug inly in play mode\n        void UpdateDebug(float dt) override;\n\n        // Updates event system\n        void UpdateEventSystem() override;\n\n        // Post updates event system\n        void PostUpdateEventSystem() override;\n\n        // Calling on updating\n        void OnUpdate(float dt) override;\n\n        // Calling on drawing\n        void OnDraw() override;\n\n        // Calling when application activated\n        void OnActivated() override;\n\n        // Calling when application deactivated\n        void OnDeactivated() override;\n\n        // Calling when application is starting\n        void OnStarted() override;\n\n        // Calling when application is closing\n        void OnClosing() override;\n\n        // Calling when application window resized. Ignoring on mobiles/tablets\n        void OnResizing() override;\n\n        // Calling when application window moved. Ignoring on mobiles/tablets\n        void OnMoved() override;\n\n        // Processing frame update, drawing and input messages without scene\n        void ProcessFrame() override;\n\n        // Checks that required to switch playing mode\n        void CheckPlayingSwitch();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::EditorApplication)\n{\n    BASE_CLASS(o2::Application);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::EditorApplication)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(false).NAME(isPaused);\n    FIELD().PUBLIC().DEFAULT_VALUE(false).NAME(step);\n    FIELD().PROTECTED().NAME(mBackground);\n    FIELD().PROTECTED().NAME(mBackSign);\n    FIELD().PROTECTED().NAME(mUIRoot);\n    FIELD().PROTECTED().NAME(mWindowsManager);\n    FIELD().PROTECTED().NAME(mConfig);\n    FIELD().PROTECTED().NAME(mToolsPanel);\n    FIELD().PROTECTED().NAME(mMenuPanel);\n    FIELD().PROTECTED().NAME(mProperties);\n    FIELD().PROTECTED().NAME(mSceneWindow);\n    FIELD().PROTECTED().NAME(mSceneDump);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsPlaying);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPlayingChanged);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mUpdateStep);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mDrawCalls);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mDrawnPrimitives);\n}\nEND_META;\nCLASS_METHODS_META(Editor::EditorApplication)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetLoadedSceneName);\n    FUNCTION().PUBLIC().SIGNATURE(void, LoadScene, const AssetRef<SceneAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SaveScene);\n    FUNCTION().PUBLIC().SIGNATURE(void, SaveSceneAs, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, MakeNewScene);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSceneChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPlaying, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPlaying);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<EditorApplication>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitalizeSystems);\n    FUNCTION().PROTECTED().SIGNATURE(void, Deinitialize);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadUIStyle);\n    FUNCTION().PROTECTED().SIGNATURE(void, PreUpdatePhysics);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdatePhysics, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostUpdatePhysics);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateScene, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, FixedUpdateScene, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTaskManager, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawUIManager);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawDebug);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateDebug, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateEventSystem);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostUpdateEventSystem);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnActivated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeactivated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStarted);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClosing);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnResizing);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMoved);\n    FUNCTION().PROTECTED().SIGNATURE(void, ProcessFrame);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckPlayingSwitch);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/EditorConfig.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"EditorConfig.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Config/ProjectConfig.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2Editor/MenuPanel.h\"\n#include \"o2Editor/ToolsPanel.h\"\n#include \"o2Editor/Windows/DockWindowPlace.h\"\n#include \"o2Editor/Windows/DockableWindow.h\"\n#include \"o2Editor/Windows/IEditorWindow.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n\n\nnamespace Editor\n{\n    EditorConfig::EditorConfig(RefCounter* refCounter):\n        Singleton<EditorConfig>(refCounter)\n    {}\n\n    EditorConfig::~EditorConfig()\n    {}\n\n    void EditorConfig::SaveGlobalConfigs()\n    {\n        if (mSaving)\n            return;\n\n        mSaving = true;\n\n        DataDocument data;\n\n        globalConfig.mAvailableLayouts = o2EditorWindows.mAvailableLayouts;\n\n        data = globalConfig;\n        data.SaveToFile(mGlobalConfigPath);\n\n        mSaving = false;\n    }\n\n    void EditorConfig::SaveProjectConfigs()\n    {\n        if (!WindowsManager::IsSingletonInitialzed())\n            return;\n\n        if (mSaving)\n            return;\n\n        mSaving = true;\n\n        projectConfig.mLayout = o2EditorWindows.GetWindowsLayout();\n\n        DataDocument data;\n        data = projectConfig;\n        data.SaveToFile(mConfigPath);\n\n        mSaving = false;\n    }\n\n    void EditorConfig::LoadConfigs()\n    {\n        LoadGlobalConfig();\n        LoadProjectConfig();\n\n        mConfigsLoaded = true;\n    }\n\n    void EditorConfig::LoadProjectConfig()\n    {\n        DataDocument data;\n\n        if (data.LoadFromFile(mConfigPath))\n            projectConfig = data;\n        else\n        {\n            projectConfig = ProjectConfig();\n        }\n    }\n\n    void EditorConfig::LoadGlobalConfig()\n    {\n        DataDocument data;\n        if (data.LoadFromFile(mGlobalConfigPath))\n            globalConfig = data;\n        else\n            globalConfig = GlobalConfig();\n    }\n\n    void EditorConfig::OnWindowChange()\n    {\n        Vec2I newPosition = o2Application.GetWindowPosition();\n        Vec2I newSize     = o2Application.GetWindowSize();\n        bool  newMax      = o2Application.IsMaximized();\n\n        bool changed = projectConfig.mWindowPosition != newPosition ||\n                       projectConfig.mWindowSize     != newSize ||\n                       projectConfig.mMaximized      != newMax;\n\n        projectConfig.mWindowPosition = newPosition;\n        projectConfig.mWindowSize     = newSize;\n        projectConfig.mMaximized      = newMax;\n\n        if (changed)\n            OnProjectConfigChanged();\n    }\n\n    void EditorConfig::OnProjectConfigChanged()\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        auto& cfg = Instance();\n        if (!cfg.mConfigsLoaded || cfg.mSaving)\n            return;\n\n        cfg.SaveProjectConfigs();\n    }\n\n    void EditorConfig::OnGlobalConfigChanged()\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        auto& cfg = Instance();\n        if (!cfg.mConfigsLoaded || cfg.mSaving)\n            return;\n\n        cfg.SaveGlobalConfigs();\n    }\n\n    // --- ProjectConfig getters/setters ---\n\n    Vec2I EditorConfig::ProjectConfig::GetWindowSize() const\n    {\n        return mWindowSize;\n    }\n\n    void EditorConfig::ProjectConfig::SetWindowSize(const Vec2I& value)\n    {\n        if (mWindowSize == value)\n            return;\n        mWindowSize = value;\n        EditorConfig::OnProjectConfigChanged();\n    }\n\n    Vec2I EditorConfig::ProjectConfig::GetWindowPosition() const\n    {\n        return mWindowPosition;\n    }\n\n    void EditorConfig::ProjectConfig::SetWindowPosition(const Vec2I& value)\n    {\n        if (mWindowPosition == value)\n            return;\n        mWindowPosition = value;\n        EditorConfig::OnProjectConfigChanged();\n    }\n\n    bool EditorConfig::ProjectConfig::GetMaximized() const\n    {\n        return mMaximized;\n    }\n\n    void EditorConfig::ProjectConfig::SetMaximized(bool value)\n    {\n        if (mMaximized == value)\n            return;\n        mMaximized = value;\n        EditorConfig::OnProjectConfigChanged();\n    }\n\n    WindowsLayout EditorConfig::ProjectConfig::GetLayout() const\n    {\n        return mLayout;\n    }\n\n    void EditorConfig::ProjectConfig::SetLayout(const WindowsLayout& value)\n    {\n        if (mLayout == value)\n            return;\n        mLayout = value;\n        EditorConfig::OnProjectConfigChanged();\n    }\n\n    String EditorConfig::ProjectConfig::GetLastLoadedScene() const\n    {\n        return mLastLoadedScene;\n    }\n\n    void EditorConfig::ProjectConfig::SetLastLoadedScene(const String& value)\n    {\n        if (mLastLoadedScene == value)\n            return;\n        mLastLoadedScene = value;\n        EditorConfig::OnProjectConfigChanged();\n    }\n\n    // --- GlobalConfig getters/setters ---\n\n    WindowsLayout EditorConfig::GlobalConfig::GetDefaultLayout() const\n    {\n        return mDefaultLayout;\n    }\n\n    void EditorConfig::GlobalConfig::SetDefaultLayout(const WindowsLayout& value)\n    {\n        if (mDefaultLayout == value)\n            return;\n        mDefaultLayout = value;\n        EditorConfig::OnGlobalConfigChanged();\n    }\n\n    EditorLayoutsMap EditorConfig::GlobalConfig::GetAvailableLayouts() const\n    {\n        return mAvailableLayouts;\n    }\n\n    void EditorConfig::GlobalConfig::SetAvailableLayouts(const EditorLayoutsMap& value)\n    {\n        if (mAvailableLayouts == value)\n            return;\n        mAvailableLayouts = value;\n        EditorConfig::OnGlobalConfigChanged();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::EditorConfig, Editor__EditorConfig);\n\nDECLARE_CLASS(Editor::EditorConfig::GlobalConfig, Editor__EditorConfig__GlobalConfig);\n\nDECLARE_CLASS(Editor::EditorConfig::ProjectConfig, Editor__EditorConfig__ProjectConfig);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/EditorConfig.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2Editor/Windows/WindowsLayout.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n}\n\n// Editor configuration access macros\n#define o2EditorConfig EditorConfig::Instance()\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(DockWindowPlace);\n\n    using EditorLayoutsMap = Map<String, WindowsLayout>;\n\n    // -------------------------\n    // Application configuration\n    // -------------------------\n    class EditorConfig : public Singleton<EditorConfig>, public ISerializable\n    {\n    public:\n        // ---------------------------\n        // Global editor configuration\n        // ---------------------------\n        class GlobalConfig : public ISerializable\n        {\n        public:\n            PROPERTIES(GlobalConfig);\n            PROPERTY(WindowsLayout, defaultLayout, SetDefaultLayout, GetDefaultLayout);             // Default windows layout, used on reset\n            PROPERTY(EditorLayoutsMap, availableLayouts, SetAvailableLayouts, GetAvailableLayouts); // Available windows layouts\n\n        public:\n            // Returns default windows layout\n            WindowsLayout GetDefaultLayout() const;\n\n            // Sets default windows layout\n            void SetDefaultLayout(const WindowsLayout& value);\n\n            // Returns available windows layouts\n            EditorLayoutsMap GetAvailableLayouts() const;\n\n            // Sets available windows layouts\n            void SetAvailableLayouts(const EditorLayoutsMap& value);\n\n            SERIALIZABLE(GlobalConfig);\n\n        private:\n            WindowsLayout              mDefaultLayout;     // @SERIALIZABLE\n            Map<String, WindowsLayout> mAvailableLayouts;  // @SERIALIZABLE\n\n            friend class EditorConfig;\n        };\n\n        // ----------------------------\n        // Project editor configuration\n        // ----------------------------\n        class ProjectConfig : public ISerializable\n        {\n        public:\n            PROPERTIES(ProjectConfig);\n            PROPERTY(Vec2I, windowSize, SetWindowSize, GetWindowSize);                 // Application window size\n            PROPERTY(Vec2I, windowPosition, SetWindowPosition, GetWindowPosition);     // Application window position\n            PROPERTY(bool, maximized, SetMaximized, GetMaximized);                     // Is application window maximized\n            PROPERTY(WindowsLayout, layout, SetLayout, GetLayout);                     // Windows layout\n            PROPERTY(String, lastLoadedScene, SetLastLoadedScene, GetLastLoadedScene); // Last loaded scene\n\n        public:\n            // Returns application window size\n            Vec2I GetWindowSize() const;\n\n            // Sets application window size\n            void SetWindowSize(const Vec2I& value);\n\n            // Returns application window position\n            Vec2I GetWindowPosition() const;\n\n            // Sets application window position\n            void SetWindowPosition(const Vec2I& value);\n\n            // Returns is application window maximized\n            bool GetMaximized() const;\n\n            // Sets is application window maximized\n            void SetMaximized(bool value);\n\n            // Returns windows layout\n            WindowsLayout GetLayout() const;\n\n            // Sets windows layout\n            void SetLayout(const WindowsLayout& value);\n\n            // Returns last loaded scene path\n            String GetLastLoadedScene() const;\n\n            // Sets last loaded scene path\n            void SetLastLoadedScene(const String& value);\n\n            SERIALIZABLE(ProjectConfig);\n\n        private:\n            Vec2I         mWindowSize = Vec2I(800, 600); // @SERIALIZABLE\n            Vec2I         mWindowPosition;               // @SERIALIZABLE\n            bool          mMaximized = true;             // @SERIALIZABLE\n            WindowsLayout mLayout;                       // @SERIALIZABLE\n            String        mLastLoadedScene;              // @SERIALIZABLE\n\n            friend class EditorConfig;\n        };\n\n    public:\n        ProjectConfig projectConfig; // Project editor config\n        GlobalConfig  globalConfig;  // Global editor config for all projects\n\n    public:\n        // Default constructor. Loads data and applies to application\n        EditorConfig(RefCounter* refCounter);\n\n        // Destructor. Saves application configuration\n        ~EditorConfig();\n\n        SERIALIZABLE(EditorConfig);\n\n    protected:\n        String mConfigPath = \"../../EditorConfig.json\";\n        String mGlobalConfigPath = \"../../Config.json\";\n\n        bool mConfigsLoaded = false; // True if configurations were loaded\n        bool mSaving        = false; // True while a save is in progress; prevents recursion\n\n    protected:\n        // Saves global configs\n        void SaveGlobalConfigs();\n\n        // Saves project configs\n        void SaveProjectConfigs();\n\n        // Loads and applies configs\n        void LoadConfigs();\n\n        // Loads project configs\n        void LoadProjectConfig();\n\n        // Loads global configs\n        void LoadGlobalConfig();\n\n        // Updates window configs\n        void OnWindowChange();\n\n        // Triggers project config save in response to a property change\n        static void OnProjectConfigChanged();\n\n        // Triggers global config save in response to a property change\n        static void OnGlobalConfigChanged();\n\n        friend class EditorApplication;\n        friend class MenuPanel;\n        friend class WindowsManager;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::EditorConfig)\n{\n    BASE_CLASS(o2::Singleton<EditorConfig>);\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::EditorConfig)\n{\n    FIELD().PUBLIC().NAME(projectConfig);\n    FIELD().PUBLIC().NAME(globalConfig);\n    FIELD().PROTECTED().DEFAULT_VALUE(\"../../EditorConfig.json\").NAME(mConfigPath);\n    FIELD().PROTECTED().DEFAULT_VALUE(\"../../Config.json\").NAME(mGlobalConfigPath);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mConfigsLoaded);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mSaving);\n}\nEND_META;\nCLASS_METHODS_META(Editor::EditorConfig)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveGlobalConfigs);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveProjectConfigs);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadConfigs);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadProjectConfig);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadGlobalConfig);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnWindowChange);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(void, OnProjectConfigChanged);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(void, OnGlobalConfigChanged);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::EditorConfig::GlobalConfig)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::EditorConfig::GlobalConfig)\n{\n    FIELD().PUBLIC().NAME(defaultLayout);\n    FIELD().PUBLIC().NAME(availableLayouts);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mDefaultLayout);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mAvailableLayouts);\n}\nEND_META;\nCLASS_METHODS_META(Editor::EditorConfig::GlobalConfig)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(WindowsLayout, GetDefaultLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDefaultLayout, const WindowsLayout&);\n    FUNCTION().PUBLIC().SIGNATURE(EditorLayoutsMap, GetAvailableLayouts);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAvailableLayouts, const EditorLayoutsMap&);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::EditorConfig::ProjectConfig)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::EditorConfig::ProjectConfig)\n{\n    FIELD().PUBLIC().NAME(windowSize);\n    FIELD().PUBLIC().NAME(windowPosition);\n    FIELD().PUBLIC().NAME(maximized);\n    FIELD().PUBLIC().NAME(layout);\n    FIELD().PUBLIC().NAME(lastLoadedScene);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2I(800, 600)).NAME(mWindowSize);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mWindowPosition);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mMaximized);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mLayout);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mLastLoadedScene);\n}\nEND_META;\nCLASS_METHODS_META(Editor::EditorConfig::ProjectConfig)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetWindowSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWindowSize, const Vec2I&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetWindowPosition);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWindowPosition, const Vec2I&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, GetMaximized);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaximized, bool);\n    FUNCTION().PUBLIC().SIGNATURE(WindowsLayout, GetLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayout, const WindowsLayout&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetLastLoadedScene);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLastLoadedScene, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/MenuPanel.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"MenuPanel.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/MenuPanel.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/Math/Curve.h\"\n#include \"o2/Utils/Memory/MemoryAnalyzer.h\"\n#include \"o2/Utils/Tasks/TaskManager.h\"\n#include \"o2Editor/Dialogs/CurveEditorDlg.h\"\n#include \"o2Editor/Dialogs/System/OpenSaveDialog.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/EditorConfig.h\"\n#include \"o2Editor/Windows/LogWindow/LogWindow.h\"\n#include \"o2Editor/Properties/Basic/FloatProperty.h\"\n#include \"o2Editor/Properties/Basic/IntegerProperty.h\"\n#include \"o2Editor/Properties/Basic/ObjectPtrProperty.h\"\n#include \"o2Editor/UI/Style/EditorUIStyle.h\"\n#include \"o2Editor/UIRoot.h\"\n#include \"o2Editor/Windows/AnimationStateGraphWindow/AnimationStateGraphWindow.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsWindow.h\"\n#include \"o2Editor/Windows/GameWindow/GameWindow.h\"\n#include \"o2Editor/Windows/MemoryAnalyzerWindow/MemoryAnalyzerWindow.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n\nDECLARE_SINGLETON(Editor::MenuPanel);\n\nnamespace Editor\n{\n    MenuPanel::MenuPanel(RefCounter* refCounter):\n        Singleton<MenuPanel>(refCounter)\n    {\n        mMenuPanel = o2UI.CreateWidget<o2::MenuPanel>();\n        *mMenuPanel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 20, 0);\n        EditorUIRoot.AddWidget(mMenuPanel);\n\n        // FILE\n        mMenuPanel->AddItem(\"File/New scene\", [&]() { OnNewScenePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_N, VK_CTRL_CMD, VK_SHIFT}));\n        mMenuPanel->AddItem(\"File/Open scene\", [&]() { OnOpenScenePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_O, VK_CTRL_CMD}));\n        mMenuPanel->AddItem(\"File/Save scene\", [&]() { OnSaveScenePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_S, VK_CTRL_CMD}));\n        mMenuPanel->AddItem(\"File/Save scene as ...\", [&]() { OnSaveSceneAsPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_S, VK_CTRL_CMD, VK_MENU}));\n\n        mMenuPanel->AddItem(\"File/---\");\n\n        mMenuPanel->AddItem(\"File/Exit\", [&]() { OnExitPressed(); });\n\n        // EDIT\n        mMenuPanel->AddItem(\"Edit/Undo\", [&]() { OnUndoPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_Z, VK_CTRL_CMD}));\n        mMenuPanel->AddItem(\"Edit/Redo\", [&]() { OnRedoPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_Z, VK_CTRL_CMD, VK_SHIFT}));\n\n        mMenuPanel->AddItem(\"Edit/---\");\n\n        mMenuPanel->AddItem(\"Edit/Copy\", [&]() {}, AssetRef<ImageAsset>(), ShortcutKeys({VK_C, VK_CTRL_CMD}));\n        mMenuPanel->AddItem(\"Edit/Cut\", [&]() {}, AssetRef<ImageAsset>(), ShortcutKeys({VK_X, VK_CTRL_CMD}));\n        mMenuPanel->AddItem(\"Edit/Paste\", [&]() {}, AssetRef<ImageAsset>(), ShortcutKeys({VK_V, VK_CTRL_CMD}));\n        mMenuPanel->AddItem(\"Edit/Delete\", [&]() {}, AssetRef<ImageAsset>(), ShortcutKeys({VK_DELETE}));\n\n        mMenuPanel->AddItem(\"Edit/---\");\n\n        mMenuPanel->AddItem(\"Edit/Project/Physics\", [&]() {\n            o2EditorPropertiesWindow.SetTarget(&o2Config.physics);\n        });\n\n        // VIEW\n        mMenuPanel->AddItem(\"View/Show Tree\", [&]() { OnShowTreePressed(); });\n        mMenuPanel->AddItem(\"View/Show Scene\", [&]() { OnShowScenePressed(); });\n        mMenuPanel->AddItem(\"View/Show Assets\", [&]() { OnShowAssetsPressed(); });\n\t\tmMenuPanel->AddItem(\"View/Show Properties\", [&]() { OnShowPropertiesPressed(); });\n\t\tmMenuPanel->AddItem(\"View/Show Animation\", [&]() { OnShowAnimationPressed(); });\n\t\tmMenuPanel->AddItem(\"View/Show Animation State graph\", [&]() { OnShowAnimationStateGraphPressed(); });\n        mMenuPanel->AddItem(\"View/Show Log\", [&]() { OnShowLogPressed(); });\n        mMenuPanel->AddItem(\"View/Show Game\", [&]() { OnShowGamePressed(); });\n\n#if ENABLE_MEMORY_ANALYZE\n        mMenuPanel->AddItem(\"View/Show memory analyzer\", [&]() { OnShowMemoryAnalyzerPressed(); });\n#endif\n\n        mMenuPanel->AddItem(\"View/---\");\n        mMenuPanel->AddItem(\"View/Reset layout\", [&]() { OnResetLayoutPressed(); });\n\n        // BUILD\n        mMenuPanel->AddItem(\"Run/Connect scripts debugger\", [&]() { o2Scripts.ConnectDebugger(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_F5}));\n        mMenuPanel->AddItem(\"Run/---\");\n        mMenuPanel->AddItem(\"Run/Build & Run\", [&]() { OnBuildAndRunPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_R, VK_CTRL_CMD}));\n        mMenuPanel->AddItem(\"Run/Build\", [&]() { OnBuildPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_R, VK_CTRL_CMD, VK_SHIFT}));\n\n        // HELP\n        mMenuPanel->AddItem(\"Help/About\", [&]() { OnAboutPressed(); });\n        mMenuPanel->AddItem(\"Help/Documentation\", [&]() { OnDocumentationPressed(); });\n\n        // DEBUG\n        mMenuPanel->AddItem(\"Debug/Curve editor test\", [&]() { OnCurveEditorTestPressed(); });\n        mMenuPanel->AddItem(\"Debug/Save layout as default\", [&]() { OnSaveDefaultLayoutPressed(); });\n        mMenuPanel->AddItem(\"Debug/Add property\", [&]() {\n            static float xx = 0, yy = 1;\n            ForcePopEditorScopeOnStack scope;\n            auto prop = o2UI.CreateWidget<FloatProperty>(\"with caption\");\n            prop->SetValueAndPrototypeProxy({ { mmake<PointerValueProxy<float>>(&xx), mmake<PointerValueProxy<float>>(&yy) } });\n                            });\n\n        mMenuPanel->AddItem(\"Debug/Randomize IDs\", [&]() {\n            Function<void(const Ref<Actor>&)> fixActor = [&fixActor](const Ref<Actor>& actor) {\n                actor->GenerateNewID();\n                actor->GetComponents().ForEach([](auto comp) { comp->GenerateNewID(); });\n                actor->GetChildren().ForEach([&](const Ref<Actor>& x) { fixActor(x); });\n            };\n\n            for (auto& actor : o2Scene.GetRootActors())\n                fixActor(actor);\n        });\n\n        mMenuPanel->AddToggleItem(\"Debug/View editor UI tree\", false, [&](bool x) { o2EditorTree.GetSceneTree()->SetEditorWatching(x); });\n\n        mMenuPanel->AddItem(\"Debug/Dump memory\", [&]() { o2Memory.DumpInfo(); });\n\n        mMenuPanel->AddItem(\"Debug/JS collect garbage\", [&]() { o2Scripts.CollectGarbage(); });\n\n        mMenuPanel->AddItem(\"Debug/Rebuild assets\", [&]() { o2Assets.RebuildAssets(); });\n        mMenuPanel->AddItem(\"Debug/Rebuild assets forcible\", [&]() { o2Assets.RebuildAssets(true); });\n    }\n\n    MenuPanel::~MenuPanel()\n    {\n    }\n\n    Ref<Widget> MenuPanel::AddItem(const o2::MenuPanel::Item& item)\n    {\n        return mMenuPanel->AddItem(item);\n    }\n\n    void MenuPanel::AddItem(const WString& path, const Function<void()>& clickFunc /*= Function<void()>()*/,\n                            const AssetRef<ImageAsset>& icon /*= AssetRef<ImageAsset>()*/,\n                            const ShortcutKeys& shortcut /*= ShortcutKeys()*/)\n    {\n        mMenuPanel->AddItem(path, clickFunc, icon, shortcut);\n    }\n\n    void MenuPanel::InsertItem(const o2::MenuPanel::Item& item, int position)\n    {\n        mMenuPanel->InsertItem(item, position);\n    }\n\n    void MenuPanel::AddItems(Vector<o2::MenuPanel::Item> items)\n    {\n        mMenuPanel->AddItems(items);\n    }\n\n    void MenuPanel::InsertItems(Vector<o2::MenuPanel::Item> items, int position)\n    {\n        mMenuPanel->InsertItems(items, position);\n    }\n\n    o2::MenuPanel::Item MenuPanel::GetItem(int position)\n    {\n        return mMenuPanel->GetItem(position);\n    }\n\n    Vector<o2::MenuPanel::Item> MenuPanel::GetItems() const\n    {\n        return mMenuPanel->GetItems();\n    }\n\n    void MenuPanel::RemoveItem(int position)\n    {\n        return mMenuPanel->RemoveItem(position);\n    }\n\n    void MenuPanel::RemoveItem(const WString& path)\n    {\n        return mMenuPanel->RemoveItem(path);\n    }\n\n    void MenuPanel::CheckSceneSaving(const Function<void()>& onCompleted)\n    {\n        if (o2EditorApplication.IsSceneChanged())\n        {\n            auto wnd = EditorUIRoot.AddWidget(o2UI.CreateWindow(\"Save scene?\"));\n            *wnd->layout = WidgetLayout::Based(BaseCorner::Center, Vec2F(400, 150));\n\n            auto verLayout = o2UI.CreateVerLayout();\n            wnd->AddChild(verLayout);\n            *verLayout->layout = WidgetLayout::BothStretch();\n            verLayout->baseCorner = BaseCorner::Top;\n\n            auto text = o2UI.CreateLabel(\"Current scene was modified but wasn't saved.\\nDo you want to save it?\");\n            text->horOverflow = Label::HorOverflow::Wrap;\n            verLayout->AddChild(text);\n\n            auto horLayout = o2UI.CreateHorLayout();\n            verLayout->AddChild(horLayout);\n\n            *horLayout->layout = WidgetLayout::BothStretch();\n            horLayout->border = BorderF(10, 10, 10, 10);\n            horLayout->spacing = 10;\n            horLayout->AddChild(o2UI.CreateButton(\"Save\", [=]() {\n                o2EditorApplication.SaveScene();\n                onCompleted();\n                wnd->Hide();\n            }));\n\n            horLayout->AddChild(o2UI.CreateButton(\"Don't save\", [=]() {\n                onCompleted();\n                wnd->Hide();\n            }));\n\n            horLayout->AddChild(o2UI.CreateButton(\"Cancel\", [=]() { wnd->Hide(); }));\n\n            return;\n        }\n\n        onCompleted();\n    }\n\n    void MenuPanel::OnNewScenePressed()\n    {\n        o2EditorSceneWindow.MenuCreateNewAsset();\n    }\n\n    void MenuPanel::OnOpenScenePressed()\n    {\n        o2EditorSceneWindow.MenuOpenAsset();\n    }\n\n    void MenuPanel::OnSaveScenePressed()\n    {\n        o2EditorSceneWindow.MenuSaveAsset();\n    }\n\n    void MenuPanel::OnSaveSceneAsPressed()\n    {\n        o2EditorSceneWindow.MenuSaveAsAsset();\n    }\n\n    void MenuPanel::OnExitPressed()\n    {\n        o2Application.Shutdown();\n    }\n\n    void MenuPanel::OnUndoPressed()\n    {\n        o2EditorSceneWindow.UndoAction();\n    }\n\n    void MenuPanel::OnRedoPressed()\n    {\n        o2EditorSceneWindow.RedoAction();\n    }\n\n    void MenuPanel::OnShowTreePressed()\n    {\n        auto window = o2EditorWindows.GetWindow<TreeWindow>();\n        if (window)\n            window->Show();\n    }\n\n    void MenuPanel::OnShowScenePressed()\n    {\n        o2EditorSceneWindow.Show();\n    }\n\n    void MenuPanel::OnShowAssetsPressed()\n    {\n        auto window = o2EditorWindows.GetWindow<AssetsWindow>();\n        if (window)\n            window->Show();\n    }\n\n    void MenuPanel::OnShowPropertiesPressed()\n    {\n        auto window = o2EditorWindows.GetWindow<PropertiesWindow>();\n        if (window)\n            window->Show();\n    }\n\n    void MenuPanel::OnShowAnimationPressed()\n    {\n        auto window = o2EditorWindows.GetWindow<AnimationWindow>();\n        if (window)\n            window->Show();\n    }\n\n    void MenuPanel::OnShowLogPressed()\n    {\n        auto window = o2EditorWindows.GetWindow<LogWindow>();\n        if (window)\n            window->Show();\n    }\n\n\tvoid MenuPanel::OnShowAnimationStateGraphPressed()\n\t{\n\t\tauto window = o2EditorWindows.GetWindow<AnimationStateGraphWindow>();\n\t\tif (window)\n\t\t\twindow->Show();\n\t}\n\n\tvoid MenuPanel::OnShowGamePressed()\n    {\n        auto window = o2EditorWindows.GetWindow<GameWindow>();\n        if (window)\n            window->Show();\n    }\n\n#if ENABLE_MEMORY_ANALYZE\n    void MenuPanel::OnShowMemoryAnalyzerPressed()\n    {\n        auto appRef = DynamicCast<RefCounterable>(Ref(Application::InstancePtr()));\n\n        std::vector<MemoryAnalyzeObject*> objects = { &appRef };\n\n        for (auto& singleton : GetSingletonsList())\n            objects.push_back(&singleton);\n\n        auto data = MemoryAnalyzer::BuildMemoryTree(objects);\n        MemoryAnalyzerWindow::Show(data);\n    }\n#endif\n\n    void MenuPanel::OnResetLayoutPressed()\n    {\n        o2EditorWindows.SetDefaultWindowsLayout();\n    }\n\n    void MenuPanel::OnRunPressed()\n    {\n\n    }\n\n    void MenuPanel::OnBuildAndRunPressed()\n    {\n\n    }\n\n    void MenuPanel::OnBuildPressed()\n    {\n\n    }\n\n    void MenuPanel::OnAboutPressed()\n    {\n\n    }\n\n    void MenuPanel::OnDocumentationPressed()\n    {\n\n    }\n\n    void MenuPanel::OnSaveDefaultLayoutPressed()\n    {\n        o2EditorConfig.globalConfig.defaultLayout = o2EditorWindows.GetWindowsLayout();\n        o2Debug.Log(\"Default windows layout saved!\");\n    }\n\n    void MenuPanel::OnCurveEditorTestPressed()\n    {\n        CurveEditorDlg::Show(Function<void()>());\n\n        int testCurves = 50;\n        int testKeys = 50;\n        for (int i = 0; i < testCurves; i++)\n        {\n            Ref<Curve> curve = mmake<Curve>();\n\n            for (int j = 0; j < testKeys; j++)\n                curve->AppendKey(Math::Random(0.1f, 2.0f), Math::Random(-1.0f, 1.0f), 0.0f, 1.0f);\n\n            CurveEditorDlg::AddEditingCurve(\"test\" + (String)i, curve);\n        }\n    }\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/MenuPanel.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/MenuPanel.h\"\n#include \"o2/Utils/Singleton.h\"\n\nusing namespace o2;\n\n// Editors menu panel accessor macros\n#define o2EditorMenu MenuPanel::Instance()\n\nnamespace Editor\n{\n    // -----------------\n    // Editor menu panel\n    // -----------------\n    class MenuPanel: public Singleton<MenuPanel>\n    {\n    public:\n        // Default constructor. Initializes basic menu items\n        MenuPanel(RefCounter* refCounter);\n\n        // Destructor\n        ~MenuPanel();\n\n        // Add item\n        Ref<Widget> AddItem(const o2::MenuPanel::Item& item);\n\n        // Adds item by path (\"node/sub node/target\")\n        void AddItem(const WString& path, const Function<void()>& clickFunc = Function<void()>(),\n                     const AssetRef<ImageAsset>& icon = AssetRef<ImageAsset>(), const ShortcutKeys& shortcut = ShortcutKeys());\n\n        // Inserts item at position\n        void InsertItem(const o2::MenuPanel::Item& item, int position);\n\n        // Adds array of items\n        void AddItems(Vector<o2::MenuPanel::Item> items);\n\n        // Inserts array of items at position\n        void InsertItems(Vector<o2::MenuPanel::Item> items, int position);\n\n        // Returns item at position\n        o2::MenuPanel::Item GetItem(int position);\n\n        // Returns array of all items\n        Vector<o2::MenuPanel::Item> GetItems() const;\n\n        // Removes item at position\n        void RemoveItem(int position);\n\n        // Removes item by path\n        void RemoveItem(const WString& path);\n\n    protected:\n        Ref<o2::MenuPanel> mMenuPanel; // Menu panel\n\n    protected:\n        // Checks is scene was changed and shows confirm dialog\n        void CheckSceneSaving(const Function<void()>& onCompleted);\n\n        // On File/New scene pressed in menu\n        void OnNewScenePressed();\n\n        // On File/Open scene pressed in menu\n        void OnOpenScenePressed();\n\n        // On File/Save scene pressed in menu\n        void OnSaveScenePressed();\n\n        // On File/Save scene as pressed in menu\n        void OnSaveSceneAsPressed();\n\n        // On File/Exit pressed in menu\n        void OnExitPressed();\n\n        // On Edit/Undo pressed in menu\n        void OnUndoPressed();\n\n        // On Edit/Redo pressed in menu\n        void OnRedoPressed();\n\n        // On View/Tree pressed in menu\n        void OnShowTreePressed();\n\n        // On View/Scene pressed in menu\n        void OnShowScenePressed();\n\n        // On View/Assets pressed in menu\n        void OnShowAssetsPressed();\n\n        // On View/Properties pressed in menu\n        void OnShowPropertiesPressed();\n\n        // On View/Animation pressed in menu\n        void OnShowAnimationPressed();\n\n        // On View/Log pressed in menu\n        void OnShowLogPressed();\n\n\t\t// On View/Animation state graph pressed in menu\n\t\tvoid OnShowAnimationStateGraphPressed();\n\n        // On View/Game pressed in menu\n        void OnShowGamePressed();\n\n#if ENABLE_MEMORY_ANALYZE\n        // On View/Memory analyzer pressed in menu\n        void OnShowMemoryAnalyzerPressed();\n#endif\n\n        // On View/Reset layout pressed in menu\n        void OnResetLayoutPressed();\n\n        // On Build/Run pressed in menu\n        void OnRunPressed();\n\n        // On Build/Build and run pressed in menu\n        void OnBuildAndRunPressed();\n\n        // On Build/Build pressed in menu\n        void OnBuildPressed();\n\n        // On Help/About pressed in menu\n        void OnAboutPressed();\n\n        // On Help/Documentation pressed in menu\n        void OnDocumentationPressed();\n\n        // On Debug/Save layout as default pressed in menu\n        void OnSaveDefaultLayoutPressed();\n\n        // On Debug/Curve editor test pressed\n        void OnCurveEditorTestPressed();\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ActorProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ActorProperty.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsWindow.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\nnamespace Editor\n{\n    ActorProperty::ActorProperty(RefCounter* refCounter):\n        TPropertyField<LinkRef<Actor>>(refCounter)\n    {\n        mCommonValue = nullptr;\n    }\n\n    ActorProperty::ActorProperty(RefCounter* refCounter, const ActorProperty& other) :\n        TPropertyField<LinkRef<Actor>>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    ActorProperty& ActorProperty::operator=(const ActorProperty& other)\n    {\n        TPropertyField<LinkRef<Actor>>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void ActorProperty::InitializeControls()\n    {\n        mCommonValue = nullptr;\n\n        mBox = GetChildWidget(\"container/layout/box\");\n        if (mBox)\n        {\n            mBox->SetFocusable(true);\n            mBox->onDraw += MakeFunction<CursorAreaEventsListener, void>(this, &DragDropArea::OnDrawn);\n\n            mNameText = mBox->GetLayerDrawable<Text>(\"caption\");\n            if (mNameText)\n                mNameText->text = \"--\";\n        }\n    }\n\n    void ActorProperty::Revert()\n    {\n        auto propertyObjects = o2EditorPropertiesWindow.GetTargets();\n\n        for (int i = 0; i < mValuesProxies.Count() && i < propertyObjects.Count(); i++)\n            RevertoToPrototype(mValuesProxies[i].first, mValuesProxies[i].second, propertyObjects[i]);\n\n        Refresh();\n    }\n\n    const Type* ActorProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* ActorProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(BaseActorLinkRef);\n    }\n\n    bool ActorProperty::IsUnderPoint(const Vec2F& point)\n    {\n        return mBox->IsUnderPoint(point);\n    }\n\n    void ActorProperty::RevertoToPrototype(const Ref<IAbstractValueProxy>& target, const Ref<IAbstractValueProxy>& source,\n                                           IObject* targetOwner)\n    {\n        if (!source || !targetOwner || targetOwner->GetType().IsBasedOn(TypeOf(Component)))\n            return;\n\n        Ref<Actor> sourceActor = GetProxy(source);\n        Ref<Actor> topSourceActor = sourceActor;\n        while (topSourceActor->GetParent())\n            topSourceActor = topSourceActor->GetParent().Lock();\n\n        auto actorOwner = Ref(dynamic_cast<Actor*>(targetOwner));\n\n        if (actorOwner)\n        {\n            auto topTargetActor = actorOwner;\n            while (topTargetActor->GetPrototypeLink() != topSourceActor && topTargetActor->GetParent())\n                topTargetActor = topTargetActor->GetParent().Lock();\n\n            auto sameToProtoSourceActor = topTargetActor->FindLinkedActor(sourceActor);\n\n            if (sameToProtoSourceActor)\n            {\n                SetProxy(target, sameToProtoSourceActor);\n                return;\n            }\n        }\n\n        if (sourceActor->IsOnScene())\n            SetProxy(target, sourceActor);\n    }\n\n    void ActorProperty::OnTypeSpecialized(const Type& type)\n    {\n        TPropertyField<LinkRef<Actor>>::OnTypeSpecialized(type);\n\n        mActorType = type.InvokeStatic<const Type*>(\"GetActorTypeStatic\");\n    }\n\n    LinkRef<Actor> ActorProperty::GetProxy(const Ref<IAbstractValueProxy>& proxy) const\n    {\n        auto proxyType = dynamic_cast<const ObjectType*>(&proxy->GetType());\n        auto proxySample = proxyType->CreateSample();\n        proxy->GetValuePtr(proxySample);\n        auto objectSample = proxyType->DynamicCastToIObject(proxySample);\n        BaseActorLinkRef* baseActorLinkSample = dynamic_cast<BaseActorLinkRef*>(objectSample);\n        LinkRef<Actor> res = LinkRef<Actor>(const_cast<Actor*>(baseActorLinkSample->Get()));\n        delete baseActorLinkSample;\n        return res;\n    }\n\n    void ActorProperty::SetProxy(const Ref<IAbstractValueProxy>& proxy, const LinkRef<Actor>& value)\n    {\n        auto proxyType = dynamic_cast<const ObjectType*>(&proxy->GetType());\n        auto proxySample = proxyType->CreateSample();\n        auto objectSample = proxyType->DynamicCastToIObject(proxySample);\n        BaseActorLinkRef* baseActorLinkSample = dynamic_cast<BaseActorLinkRef*>(objectSample);\n        baseActorLinkSample->Set(const_cast<Actor*>(value.Get()));\n        proxy->SetValuePtr(proxySample);\n        delete baseActorLinkSample;\n    }\n\n    bool ActorProperty::IsValueRevertable() const\n    {\n        bool revertable = false;\n\n        for (auto& ptr : mValuesProxies)\n        {\n            if (ptr.second)\n            {\n                Ref<Actor> value = GetProxy(ptr.first);\n                Ref<Actor> proto = GetProxy(ptr.second);\n\n                if (value && value->GetPrototypeLink())\n                {\n                    if (value->GetPrototypeLink() != proto)\n                    {\n                        revertable = true;\n                        break;\n                    }\n                }\n                else\n                {\n                    if (value != proto)\n                    {\n                        revertable = true;\n                        break;\n                    }\n                }\n            }\n        }\n\n        return revertable;\n    }\n\n    void ActorProperty::UpdateValueView()\n    {\n        if (!mValuesDifferent)\n        {\n            if (!mCommonValue)\n            {\n                mNameText->text = \"Null:\" + mActorType->GetName();\n                mBox->layer[\"caption\"]->transparency = 0.5f;\n            }\n            else\n            {\n                mNameText->text = mCommonValue->GetName();\n                mBox->layer[\"caption\"]->transparency = 1.0f;\n            }\n        }\n        else\n        {\n            mNameText->text = \"--\";\n            mBox->layer[\"caption\"]->transparency = 1.0f;\n        }\n    }\n\n    void ActorProperty::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        mBox->SetState(\"hover\", true);\n    }\n\n    void ActorProperty::OnCursorExit(const Input::Cursor& cursor)\n    {\n        mBox->SetState(\"hover\", false);\n    }\n\n    void ActorProperty::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        o2UI.FocusWidget(mBox);\n\n        if (mCommonValue)\n        {\n            if (mCommonValue->IsAsset())\n                o2EditorAssets.ShowAssetIcon(o2Assets.GetAssetPath(mCommonValue->GetAssetID()));\n            else if (mCommonValue->IsOnScene())\n                o2EditorTree.HighlightObjectTreeNode(mCommonValue.GetRef());\n        }\n    }\n\n    void ActorProperty::OnKeyPressed(const Input::Key& key)\n    {\n        if (mBox && mBox->IsFocused() && (key == VK_DELETE || key == VK_BACK))\n            SetValueByUserAndComplete(nullptr);\n    }\n\n    void ActorProperty::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (auto actorsTree = DynamicCast<SceneHierarchyTree>(group))\n            OnDroppedFromActorsTree(actorsTree);\n        else if (auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group))\n            OnDroppedFromAssetsScroll(assetsScroll);\n    }\n\n    void ActorProperty::OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (auto actorsTree = DynamicCast<SceneHierarchyTree>(group))\n            OnDragEnterFromActorsTree(actorsTree);\n        else if (auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group))\n            OnDragEnterFromAssetsScroll(assetsScroll);\n    }\n\n    void ActorProperty::OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (auto actorsTree = DynamicCast<SceneHierarchyTree>(group))\n            OnDragExitFromActorsTree(actorsTree);\n        else if (auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group))\n            OnDragExitFromAssetsScroll(assetsScroll);\n    }\n\n    void ActorProperty::OnDroppedFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree)\n    {\n        if (actorsTree->GetSelectedObjects().Count() > 1)\n            return;\n\n        SetValueByUserAndComplete(DynamicCast<Actor>(actorsTree->GetSelectedObjects()[0]));\n\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->Focus();\n    }\n\n    void ActorProperty::OnDragEnterFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree)\n    {\n        if (actorsTree->GetSelectedObjects().Count() > 1)\n            return;\n\n        auto actor = DynamicCast<Actor>(actorsTree->GetSelectedObjects()[0]);\n        if (!actor || !actor->GetType().IsBasedOn(*mActorType))\n            return;\n\n        o2Application.SetCursor(CursorType::Hand);\n        mBox->SetState(\"focused\", true);\n    }\n\n    void ActorProperty::OnDragExitFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree)\n    {\n        if (actorsTree->GetSelectedObjects().Count() > 1)\n            return;\n\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->SetState(\"focused\", false);\n    }\n\n    void ActorProperty::OnDroppedFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll)\n    {\n        if (assetsIconsScroll->GetSelectedAssets().Count() > 1)\n            return;\n\n        auto lastSelectedAsset = assetsIconsScroll->GetSelectedAssets().Last();\n        if (lastSelectedAsset->meta->GetAssetType() != &TypeOf(ActorAsset))\n            return;\n\n        SetValueByUserAndComplete(o2Scene.GetAssetActorByID(lastSelectedAsset->meta->ID()));\n\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->Focus();\n    }\n\n    void ActorProperty::OnDragEnterFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll)\n    {\n        if (assetsIconsScroll->GetSelectedAssets().Count() > 1)\n            return;\n\n        auto lastSelectedAsset = assetsIconsScroll->GetSelectedAssets().Last();\n        if (lastSelectedAsset->meta->GetAssetType() != &TypeOf(ActorAsset))\n            return;\n\n        o2Application.SetCursor(CursorType::Hand);\n        mBox->SetState(\"focused\", true);\n    }\n\n    void ActorProperty::OnDragExitFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll)\n    {\n        if (assetsIconsScroll->GetSelectedAssets().Count() > 1)\n            return;\n\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->SetState(\"focused\", false);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::LinkRef<Actor>>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ActorProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::LinkRef<Actor>>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ActorProperty, Editor__ActorProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ActorProperty.h",
    "content": "#pragma once\n\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Scene/ActorLinkRef.h\"\n#include \"o2/Utils/Editor/DragAndDrop.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nnamespace o2\n{\n    class Actor;\n    class Text;\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SceneHierarchyTree);\n    FORWARD_CLASS_REF(AssetsIconsScrollArea);\n\n    // ---------------------\n    // Editor actor property\n    // ---------------------\n    class ActorProperty: public TPropertyField<LinkRef<Actor>>, public KeyboardEventsListener, public DragDropArea\n    {\n    public:\n        // Default constructor\n        ActorProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        ActorProperty(RefCounter* refCounter, const ActorProperty& other);\n\n        // Copy operator\n        ActorProperty& operator=(const ActorProperty& other);\n\n        // Reverts value to prototype value\n        void Revert() override;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        SERIALIZABLE(ActorProperty);\n        CLONEABLE_REF(ActorProperty);\n\n    protected:\n        const Type* mActorType = nullptr;  // Actor value type\n\n        Ref<Widget> mBox;      // Property edit box\n        Ref<Text>   mNameText; // Asset name text\n\n    protected:\n        // Called when type specialized during setting value proxy\n        void OnTypeSpecialized(const Type& type) override;\n\n        // Returns value from proxy\n        LinkRef<Actor> GetProxy(const Ref<IAbstractValueProxy>& proxy) const override;\n\n        // Sets value to proxy\n        void SetProxy(const Ref<IAbstractValueProxy>& proxy, const LinkRef<Actor>& value) override;\n\n        // Checks is value can be reverted\n        bool IsValueRevertable() const override;\n\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when some selectable listeners was dropped to this\n        void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was entered to this area\n        void OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was exited from this area\n        void OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Reverts target value to source\n        void RevertoToPrototype(const Ref<IAbstractValueProxy>& target, const Ref<IAbstractValueProxy>& source, IObject* targetOwner);\n\n        // Called when actors tree nodes was dragged and dropped to this\n        void OnDroppedFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree);\n\n        // Called when actors tree nodes was dragged and entered to this\n        void OnDragEnterFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree);\n\n        // Called when actors tree nodes was dragged and exited from this\n        void OnDragExitFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree);\n\n        // Called when assets scroll icons was dragged and dropped to this\n        void OnDroppedFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll);\n\n        // Called when assets scroll icons was dragged and entered to this\n        void OnDragEnterFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll);\n\n        // Called when assets scroll icons was dragged and exited from this\n        void OnDragExitFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll);\n\n        REF_COUNTERABLE_IMPL(TPropertyField<LinkRef<Actor>>);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ActorProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<LinkRef<Actor>>);\n    BASE_CLASS(o2::KeyboardEventsListener);\n    BASE_CLASS(o2::DragDropArea);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ActorProperty)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mActorType);\n    FIELD().PROTECTED().NAME(mBox);\n    FIELD().PROTECTED().NAME(mNameText);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ActorProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ActorProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Revert);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTypeSpecialized, const Type&);\n    FUNCTION().PROTECTED().SIGNATURE(LinkRef<Actor>, GetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetProxy, const Ref<IAbstractValueProxy>&, const LinkRef<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsValueRevertable);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDropped, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnter, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExit, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, RevertoToPrototype, const Ref<IAbstractValueProxy>&, const Ref<IAbstractValueProxy>&, IObject*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDroppedFromActorsTree, const Ref<SceneHierarchyTree>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnterFromActorsTree, const Ref<SceneHierarchyTree>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExitFromActorsTree, const Ref<SceneHierarchyTree>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDroppedFromAssetsScroll, const Ref<AssetsIconsScrollArea>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnterFromAssetsScroll, const Ref<AssetsIconsScrollArea>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExitFromAssetsScroll, const Ref<AssetsIconsScrollArea>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/AssetProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AssetProperty.h\"\n\n#include \"o2/Utils/StringUtils.h\"\n#include \"o2Editor/Dialogs/System/OpenSaveDialog.h\"\n#include \"o2Editor/Properties/ObjectViewer.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetIcon.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n\nnamespace Editor\n{\n    AssetProperty::AssetProperty(RefCounter* refCounter):\n        TPropertyField<AssetRef<Asset>>(refCounter)\n    {}\n\n    AssetProperty::AssetProperty(RefCounter* refCounter, const AssetProperty& other):\n        TPropertyField<AssetRef<Asset>>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    const Type* AssetProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* AssetProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(BaseAssetRef);\n    }\n\n    AssetProperty& AssetProperty::operator=(const AssetProperty& other)\n    {\n        TPropertyField::operator =(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void AssetProperty::InitializeControls()\n    {\n        mSpoiler = GetChildByType<Spoiler>(\"spoiler\");\n        mHeaderContainer = mSpoiler->GetInternalWidgetByType<HorizontalLayout>(\"mainLayout/container/layout\");\n        mCaption = mSpoiler->GetInternalWidgetByType<Label>(\"mainLayout/propertyName\");\n\n        auto expandSpoilerBtn = mSpoiler->GetExpandButton();\n        auto mainLayout = mSpoiler->GetInternalWidget(\"mainLayout\");\n        expandSpoilerBtn->isPointInside = [=](const Vec2F& p) {\n            return expandSpoilerBtn->layout->IsPointInside(p) || mainLayout->layout->IsPointInside(p);\n        };\n\n        mBox = mSpoiler->GetInternalWidget(\"mainLayout/container/layout/box\");\n        if (mBox)\n        {\n            mBox->SetFocusable(true);\n            mBox->onDraw += MakeFunction<CursorAreaEventsListener, void>(this, &DragDropArea::OnDrawn);\n\n            mNameText = mBox->GetLayerDrawable<Text>(\"caption\");\n            if (mNameText)\n                mNameText->text = \"--\";\n        }\n\n        mCreateInstanceBtn = mSpoiler->GetInternalWidgetByType<Button>(\"mainLayout/container/layout/create\");\n        if (mCreateInstanceBtn)\n            mCreateInstanceBtn->onClick = THIS_FUNC(OnCreateInstancePressed);\n\n        mEditBtn = mSpoiler->GetInternalWidgetByType<Button>(\"mainLayout/container/layout/edit\");\n        if (mEditBtn)\n            mEditBtn->onClick = THIS_FUNC(OnEditPressed);\n\n        auto saveInstanceBtn = mSpoiler->GetInternalWidgetByType<Button>(\"mainLayout/container/layout/save\");\n        if (saveInstanceBtn)\n            saveInstanceBtn->onClick = THIS_FUNC(OnSaveInstancePressed);\n\n        auto removeInstanceBtn = mSpoiler->GetInternalWidgetByType<Button>(\"mainLayout/container/layout/remove\");\n        if (removeInstanceBtn)\n            removeInstanceBtn->onClick = THIS_FUNC(OnRemoveInstancePressed);\n    }\n\n    void AssetProperty::UpdateValueView()\n    {\n        if (mCreateInstanceBtn)\n            mCreateInstanceBtn->SetEnabled(mAvailableToHaveInstance && !mValuesDifferent);\n\n        bool allAreInstance = false;\n\n        if (!mValuesDifferent)\n        {\n            if (!mCommonValue)\n            {\n                mNameText->text = \"Null\";\n                if (mAssetType)\n                    mNameText->text += WString(\": \" + GetSmartName(mAssetType->GetName()));\n\n                mBox->layer[\"caption\"]->transparency = 0.5f;\n\n                if (mEditBtn)\n                    mEditBtn->enabled = false;\n            }\n            else\n            {\n                UpdateAssetName();\n\n                mBox->layer[\"caption\"]->transparency = 1.0f;\n\n\t\t\t\tif (mEditBtn)\n\t\t\t\t\tmEditBtn->enabled = o2EditorWindows.GetAssetEditor(mAssetType) != nullptr;\n\n                if (mAvailableToHaveInstance)\n                {\n                    auto instanceInfo = CollectInstanceTargets();\n                    allAreInstance = instanceInfo.allAreInstance;\n\n                    if (allAreInstance)\n                    {\n                        if (!mAssetObjectViewer)\n                        {\n                            mAssetObjectViewer = mmake<ObjectViewer>();\n                            mAssetObjectViewer->SetParentContext(mParentContext.Lock());\n                            mSpoiler->AddChild(mAssetObjectViewer);\n                        }\n\n                        mCreateInstanceBtn->SetEnabledForcible(false);\n                        mAssetObjectViewer->SetEnabled(true);\n                        mAssetObjectViewer->Refresh(instanceInfo.targets);\n                    }\n                    else if (mAssetObjectViewer)\n                    {\n                        mAssetObjectViewer->SetEnabled(false);\n                    }\n                }\n            }\n        }\n        else\n        {\n            mNameText->text = \"--\";\n            mBox->layer[\"caption\"]->transparency = 1.0f;\n        }\n\n        SetState(\"instance\", mAvailableToHaveInstance && allAreInstance && !mValuesDifferent);\n    }\n\n\tvoid AssetProperty::UpdateAssetName()\n\t{\n\t\tauto name = o2FileSystem.GetFileNameWithoutExtension(\n\t\t\to2FileSystem.GetPathWithoutDirectories(mCommonValue->GetPath()));\n\n\t\tmNameText->text = name;\n\t}\n\n\tAssetProperty::InstanceTargetsInfo AssetProperty::CollectInstanceTargets() const\n\t{\n\t\tInstanceTargetsInfo info;\n\n\t\tfor (auto& proxy : mValuesProxies)\n\t\t{\n\t\t\tauto assetRef = GetProxy(proxy.first);\n\t\t\tif (assetRef.IsInstance())\n\t\t\t{\n\t\t\t\tinfo.targets.Add(assetRef.GetAssetBase());\n\t\t\t\tinfo.allAreInstance = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tinfo.allAreInstance = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn info;\n\t}\n\n\tbool AssetProperty::IsAlwaysRefresh() const\n    {\n        return false;\n    }\n\n    void AssetProperty::SetAssetId(const UID& id)\n    {\n        mCommonValue = id == UID::empty ? AssetRef<Asset>() : AssetRef<Asset>(id);\n\n        for (auto& ptr : mValuesProxies)\n            SetProxy(ptr.first, mCommonValue);\n\n        SetCommonAssetId(id);\n    }\n\n    void AssetProperty::SetAssetType(const Type* assetType)\n    {\n        mAssetType = assetType;\n        mAvailableToHaveInstance = assetType->InvokeStatic<bool>(\"IsReferenceCanOwnInstance\");\n    }\n\n    void AssetProperty::SetFieldInfo(const FieldInfo* fieldInfo)\n    {\n        IPropertyField::SetFieldInfo(fieldInfo);\n    }\n\n    void AssetProperty::SetCaption(const WString& text)\n    {\n        if (mCaption)\n            mCaption->SetText(text);\n    }\n\n    WString AssetProperty::GetCaption() const\n    {\n        if (mCaption)\n            return mCaption->GetText();\n\n        return WString();\n    }\n\n    Ref<Button> AssetProperty::GetRemoveButton()\n    {\n        if (!mRemoveBtn)\n        {\n            mRemoveBtn = o2UI.CreateWidget<Button>(\"remove small\");\n            mRemoveBtn->layout->maxWidth = 20;\n            mRemoveBtn->layout->minHeight = 20;\n            mHeaderContainer->AddChild(mRemoveBtn, 0);\n        }\n\n        return mRemoveBtn;\n    }\n\n    void AssetProperty::Refresh(bool forcible)\n    {\n        TPropertyField::Refresh(forcible);\n\n        if (mAvailableToHaveInstance && mAssetObjectViewer)\n        {\n            auto instanceInfo = CollectInstanceTargets();\n            if (instanceInfo.allAreInstance)\n                mAssetObjectViewer->Refresh(instanceInfo.targets);\n        }\n    }\n\n    void AssetProperty::SetCommonAssetId(const UID& id)\n    {\n\t\tonBeforeChange(Ref(this), false);\n\n        mCommonValue = id == UID::empty ? AssetRef<Asset>() : AssetRef<Asset>(id);\n        mValuesDifferent = false;\n\n        UpdateValueView();\n        CheckRevertableState();\n        OnValueChanged(false);\n    }\n\n    void AssetProperty::SetAssetIdByUser(const UID& id)\n    {\n        StoreValues(mBeforeChangeValues);\n        SetAssetId(id);\n        CheckValueChangeCompleted();\n    }\n\n    void AssetProperty::OnCreateInstancePressed()\n\t{\n\t\tfor (auto& proxy : mValuesProxies)\n\t\t{\n\t\t\tauto proxyType = dynamic_cast<const ObjectType*>(&proxy.first->GetType());\n\t\t\tauto assetRef = proxyType->CreateSample();\n\t\t\tproxy.first->GetValuePtr(assetRef);\n\n\t\t\tif (auto* refPtr = dynamic_cast<BaseAssetRef*>(proxyType->DynamicCastToIObject(assetRef)))\n\t\t\t\trefPtr->CreateInstance();\n\n\t\t\tproxy.first->SetValuePtr(assetRef);\n\n\t\t\tproxyType->DestroySample(assetRef);\n\t\t}\n\n        Refresh(true);\n    }\n\n    void AssetProperty::OnEditPressed()\n    {\n        if (mCommonValue && !mValuesDifferent)\n        {\n            if (auto editor = o2EditorWindows.GetAssetEditor(mAssetType))\n            {\n\t\t\t\tRef<Component> component;\n                if (auto parentContext = mParentContext.Lock())\n                    component = Ref(parentContext->FindOnStack<Component>());\n\n                Ref<IAssetEditablePreview> preview;\n                if (auto parentContext = mParentContext.Lock())\n                    preview = Ref(parentContext->FindOnStack<IAssetEditablePreview>());\n\n\t\t\t\teditor->EditAsset(Ref(this), component, preview);\n\t\t\t}\n        }\n    }\n\n    void AssetProperty::OnRemoveInstancePressed()\n    {\n        mCommonValue.RemoveInstance();\n\t\tSetValueByUserAndComplete(mCommonValue);\n\t\tmSpoiler->Collapse();\n    }\n\n    void AssetProperty::OnSaveInstancePressed()\n    {\n        String assetTypeName = GetSmartName(mAssetType->GetName());\n        Vector<String> extesions = mAssetType->InvokeStatic<Vector<String>>(\"GetFileExtensions\");\n        auto extension = !extesions.IsEmpty() ? extesions[0] : String(\"\");\n        String defaultPath = ::GetAssetsPath();\n\n        String path = GetSaveFileNameDialog(\"Save asset\", { { assetTypeName, \"*.\" + extension } }, defaultPath);\n        if (path.IsEmpty()) {\n            return;\n        }\n\n\t\tString relativePath = o2FileSystem.GetPathRelativeToPath(path, ::GetAssetsPath());\n\n        auto asset = GetProxy(mValuesProxies[0].first);\n        asset.SaveInstance(relativePath + \".\" + extension);\n        o2Assets.RebuildAssets();\n\n        SetValueByUserAndComplete(asset);\n    }\n\n    void AssetProperty::OnTypeSpecialized(const Type& type)\n    {\n        SetAssetType(type.InvokeStatic<const Type*>(\"GetAssetTypeStatic\"));\n    }\n\n    AssetRef<Asset> AssetProperty::GetProxy(const Ref<IAbstractValueProxy>& proxy) const\n    {\n        auto proxyType = dynamic_cast<const ObjectType*>(&proxy->GetType());\n        auto proxySample = proxyType->CreateSample();\n        proxy->GetValuePtr(proxySample);\n\n        auto objectSample = proxyType->DynamicCastToIObject(proxySample);\n        BaseAssetRef* assetSample = dynamic_cast<BaseAssetRef*>(objectSample);\n\n        AssetRef<Asset> res = AssetRef<Asset>(*assetSample);\n        delete assetSample;\n\n        return res;\n    }\n\n    void AssetProperty::SetProxy(const Ref<IAbstractValueProxy>& proxy, const AssetRef<Asset>& value)\n    {\n        auto proxyType = dynamic_cast<const ObjectType*>(&proxy->GetType());\n        auto proxySample = proxyType->CreateSample();\n        auto objectSample = proxyType->DynamicCastToIObject(proxySample);\n        auto assetSample = dynamic_cast<BaseAssetRef*>(objectSample);\n        auto assetPtr = const_cast<Asset*>(value.Get());\n\n        if (value.IsInstance())\n            assetSample->SetInstance(assetPtr);\n        else\n            assetSample->SetAssetBase(assetPtr);\n\n        proxy->SetValuePtr(proxySample);\n\n        delete assetSample;\n    }\n\n    void AssetProperty::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        o2UI.FocusWidget(mBox);\n\n        if (mCommonValue)\n            o2EditorAssets.ShowAssetIcon(mCommonValue->GetPath());\n    }\n\n    void AssetProperty::OnCursorExit(const Input::Cursor& cursor)\n    {\n        mBox->SetState(\"select\", false);\n    }\n\n    void AssetProperty::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        mBox->SetState(\"select\", true);\n    }\n\n    void AssetProperty::OnKeyPressed(const Input::Key& key)\n    {\n        if (mBox && mBox->IsFocused() && (key == VK_DELETE || key == VK_BACK))\n            SetAssetIdByUser(UID::empty);\n    }\n\n    bool AssetProperty::IsUnderPoint(const Vec2F& point)\n    {\n        return mBox->IsUnderPoint(point) && mBox->transparency > 0.1f;\n    }\n\n    void AssetProperty::OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->SetState(\"focused\", false);\n    }\n\n\tvoid AssetProperty::OnUpdate(float dt)\n\t{\n\t\tconst float checkAssetNameDelay = 0.3f;\n\n        if (!mValuesDifferent && mCommonValue)\n        {\n            mCheckAssetNameChangeTime -= dt;\n            if (mCheckAssetNameChangeTime < 0.0f)\n            {\n                UpdateAssetName();\n                mCheckAssetNameChangeTime = checkAssetNameDelay;\n            }\n        }\n\t}\n\n\tvoid AssetProperty::OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetIconsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (!assetIconsScroll)\n            return;\n\n        if (mAssetType)\n        {\n            auto lastSelectedAsset = assetIconsScroll->GetSelectedAssets().Last();\n            if (!lastSelectedAsset || !lastSelectedAsset->meta->GetAssetType()->IsBasedOn(*mAssetType))\n                return;\n        }\n\n        o2Application.SetCursor(CursorType::Hand);\n        mBox->SetState(\"focused\", true);\n    }\n\n    void AssetProperty::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetIconsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (!assetIconsScroll)\n            return;\n\n        auto lastSelectedAssetIcon = DynamicCast<AssetIcon>(assetIconsScroll->GetDraggingObject());\n        if (!lastSelectedAssetIcon ||\n            (mAssetType && !lastSelectedAssetIcon->GetAssetInfo()->meta->GetAssetType()->IsBasedOn(*mAssetType)))\n        {\n            return;\n        }\n\n        SetAssetIdByUser(lastSelectedAssetIcon->GetAssetInfo()->meta->ID());\n\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->Focus();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<AssetRef<Asset>>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AssetProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<AssetRef<Asset>>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::AssetProperty, Editor__AssetProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/AssetProperty.h",
    "content": "#pragma once\n\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/DragAndDrop.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsWindow.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(ObjectViewer);\n\n    // -------------------------\n    // Editor asset property box\n    // -------------------------\n    class AssetProperty : public TPropertyField<AssetRef<Asset>>, public DragDropArea, public KeyboardEventsListener\n    {\n    public:\n        // Default constructor\n        AssetProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        AssetProperty(RefCounter* refCounter, const AssetProperty& other);\n\n        // Copy operator\n        AssetProperty& operator=(const AssetProperty& other);\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        // Sets value asset id\n        void SetAssetId(const UID& id);\n\n        // Sets asset type\n        void SetAssetType(const Type* assetType);\n\n        // Specializes field info\n        void SetFieldInfo(const FieldInfo* fieldInfo) override;\n\n        // Sets property caption\n        void SetCaption(const WString& text) override;\n\n        // Returns property caption\n        WString GetCaption() const override;\n\n        // Adds remove button\n        Ref<Button> GetRemoveButton() override;\n\n        // Refreshes property view and object viewer\n        void Refresh(bool forcible = false) override;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        SERIALIZABLE(AssetProperty);\n        CLONEABLE_REF(AssetProperty);\n\n    protected:\n        // Structure containing instance targets information\n        struct InstanceTargetsInfo\n        {\n            Vector<IObject *> targets;\n            bool allAreInstance = false;\n        };\n\n        Ref<Widget>  mBox;               // Property edit box\n        Ref<Text>    mNameText;          // Asset name text\n        Ref<Spoiler> mSpoiler;           // Spoiler\n        Ref<Label>   mCaption;           // Property name caption\n        Ref<Button>  mCreateInstanceBtn; // Create instance button\n        Ref<Button>  mEditBtn;           // Edit asset button\n\n        Ref<HorizontalLayout> mHeaderContainer; // Asset controls container: create, save and remove\n\n        Ref<ObjectViewer> mAssetObjectViewer; // Asset instance viewer. Created if required\n\n        const Type* mAssetType = nullptr; // Type of asset\n\n\t\tfloat mCheckAssetNameChangeTime = 0.0f; // Time to check asset name changes\n\n        bool mAvailableToHaveInstance = false; // Is asset can own an instance\n\n    protected:\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Sets common value asset id\n        void SetCommonAssetId(const UID& id);\n\n        // Sets asset id, checks value changed, calls onChangeCompleted\n        void SetAssetIdByUser(const UID& id);\n\n        // Called when create instance button pressed, creates asset instance\n        void OnCreateInstancePressed();\n\n        // Called when edit button pressed, logs asset name\n        void OnEditPressed();\n\n        // Called when remove instance button pressed, removes asset instance\n        void OnRemoveInstancePressed();\n\n        // Called when save instance button pressed, saves asset instance as asset\n        void OnSaveInstancePressed();\n\n        // Called when type specialized during setting value proxy\n        void OnTypeSpecialized(const Type& type) override;\n\n        // Returns value from proxy\n        AssetRef<Asset> GetProxy(const Ref<IAbstractValueProxy>& proxy) const override;\n\n        // Sets value to proxy\n        void SetProxy(const Ref<IAbstractValueProxy>& proxy, const AssetRef<Asset>& value) override;\n\n        // Updates value view\n        void UpdateValueView() override;\n\n\t\t// Updates asset name text\n        void UpdateAssetName();\n\n        // Collects instance targets from value proxies. Returns targets and whether all values are instances\n        InstanceTargetsInfo CollectInstanceTargets() const;\n\n        // Is required refresh view every time\n        bool IsAlwaysRefresh() const override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when some selectable listeners was dropped to this\n        void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was entered to this area\n        void OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was exited from this area\n\t\tvoid OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n\t\t// Called on update with frame dt, checks asset name changes\n\t\tvoid OnUpdate(float dt) override;\n\n        REF_COUNTERABLE_IMPL(TPropertyField<AssetRef<Asset>>);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AssetProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<AssetRef<Asset>>);\n    BASE_CLASS(o2::DragDropArea);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AssetProperty)\n{\n    FIELD().PROTECTED().NAME(mBox);\n    FIELD().PROTECTED().NAME(mNameText);\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().NAME(mCaption);\n    FIELD().PROTECTED().NAME(mCreateInstanceBtn);\n    FIELD().PROTECTED().NAME(mEditBtn);\n    FIELD().PROTECTED().NAME(mHeaderContainer);\n    FIELD().PROTECTED().NAME(mAssetObjectViewer);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mAssetType);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mCheckAssetNameChangeTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mAvailableToHaveInstance);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AssetProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AssetProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAssetId, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAssetType, const Type*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFieldInfo, const FieldInfo*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Button>, GetRemoveButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetCommonAssetId, const UID&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetAssetIdByUser, const UID&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCreateInstancePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveInstancePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSaveInstancePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTypeSpecialized, const Type&);\n    FUNCTION().PROTECTED().SIGNATURE(AssetRef<Asset>, GetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetProxy, const Ref<IAbstractValueProxy>&, const AssetRef<Asset>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateAssetName);\n    FUNCTION().PROTECTED().SIGNATURE(InstanceTargetsInfo, CollectInstanceTargets);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsAlwaysRefresh);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDropped, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnter, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExit, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUpdate, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/BooleanProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"BooleanProperty.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n\n\nnamespace Editor\n{\n    BooleanProperty::BooleanProperty(RefCounter* refCounter):\n        TPropertyField<bool>(refCounter)\n    {}\n\n    BooleanProperty::BooleanProperty(RefCounter* refCounter, const BooleanProperty& other) :\n        TPropertyField<bool>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    BooleanProperty& BooleanProperty::operator=(const BooleanProperty& other)\n    {\n        TPropertyField<bool>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void BooleanProperty::InitializeControls()\n    {\n        mToggle = FindChildByType<Toggle>();\n        if (mToggle)\n        {\n            mToggle->layout->minHeight = 10;\n            mToggle->onToggleByUser = [&](bool value) { SetValueByUserAndComplete(value); };\n            mToggle->SetValueUnknown();\n        }\n    }\n\n    void BooleanProperty::UpdateValueView()\n    {\n        mToggle->value = mCommonValue;\n        if (mValuesDifferent)\n            mToggle->SetValueUnknown();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<bool>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::BooleanProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<bool>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::BooleanProperty, Editor__BooleanProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/BooleanProperty.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Property.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Toggle;\n}\n\nnamespace Editor\n{\n    // -----------------------\n    // Editor boolean property\n    // -----------------------\n    class BooleanProperty: public TPropertyField<bool>\n    {\n    public:\n        // Default constructor\n        BooleanProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        BooleanProperty(RefCounter* refCounter, const BooleanProperty& other);\n\n        // Copy operator\n        BooleanProperty& operator=(const BooleanProperty& other);\n\n        SERIALIZABLE(BooleanProperty);\n        CLONEABLE_REF(BooleanProperty);\n\n    protected:\n        Ref<Toggle> mToggle; // Toggle \n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::BooleanProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<bool>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::BooleanProperty)\n{\n    FIELD().PROTECTED().NAME(mToggle);\n}\nEND_META;\nCLASS_METHODS_META(Editor::BooleanProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const BooleanProperty&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/BorderFloatProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"BorderFloatProperty.h\"\n\n#include \"o2Editor/Properties/Basic/FloatProperty.h\"\n\nnamespace Editor\n{\n    BorderFProperty::BorderFProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {}\n\n    BorderFProperty::BorderFProperty(RefCounter* refCounter, const BorderFProperty& other) :\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    BorderFProperty& BorderFProperty::operator=(const BorderFProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void BorderFProperty::InitializeControls()\n    {\n        mLeftProperty = GetChildByType<FloatProperty>(\"container/layout/properties/left\");\n        mLeftProperty->SetValuePath(\"left\");\n        mLeftProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mLeftProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mLeftProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mBottomProperty = GetChildByType<FloatProperty>(\"container/layout/properties/bottom\");\n        mBottomProperty->SetValuePath(\"bottom\");\n        mBottomProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mBottomProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mBottomProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mRightProperty = GetChildByType<FloatProperty>(\"container/layout/properties/right\");\n        mRightProperty->SetValuePath(\"right\");\n        mRightProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mRightProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mRightProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mTopProperty = GetChildByType<FloatProperty>(\"container/layout/properties/top\");\n        mTopProperty->SetValuePath(\"top\");\n        mTopProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mTopProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mTopProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n    }\n\n    void BorderFProperty::SetValue(const BorderF& value)\n    {\n        mLeftProperty->SetValue(value.left, true);\n        mBottomProperty->SetValue(value.bottom, true);\n        mRightProperty->SetValue(value.right, true);\n        mTopProperty->SetValue(value.top, true);\n    }\n\n    void BorderFProperty::SetValueLeft(float value)\n    {\n        mLeftProperty->SetValue(value, true);\n    }\n\n    void BorderFProperty::SetValueRight(float value)\n    {\n        mRightProperty->SetValue(value, true);\n    }\n\n    void BorderFProperty::SetValueTop(float value)\n    {\n        mTopProperty->SetValue(value, true);\n    }\n\n    void BorderFProperty::SetValueBottom(float value)\n    {\n        mBottomProperty->SetValue(value, true);\n    }\n\n    void BorderFProperty::SetUnknownValue(const BorderF& defaultValue /*= BorderF()*/)\n    {\n        mLeftProperty->SetUnknownValue(defaultValue.left);\n        mRightProperty->SetUnknownValue(defaultValue.right);\n        mTopProperty->SetUnknownValue(defaultValue.top);\n        mBottomProperty->SetUnknownValue(defaultValue.bottom);\n    }\n\n    void BorderFProperty::SetLeftUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mLeftProperty->SetUnknownValue(defaultValue);\n    }\n\n    void BorderFProperty::SetRightUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mRightProperty->SetUnknownValue(defaultValue);\n    }\n\n    void BorderFProperty::SetTopUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mTopProperty->SetUnknownValue(defaultValue);\n    }\n\n    void BorderFProperty::SetBottomUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mBottomProperty->SetUnknownValue(defaultValue);\n    }\n\n    void BorderFProperty::StoreValues(Vector<DataDocument>& data) const\n    {\n        data.Clear();\n        for (auto& ptr : mValuesProxies)\n        {\n            data.Add(DataDocument());\n            data.Last() = GetProxy<BorderF>(ptr.first);\n        }\n    }\n\n    void BorderFProperty::OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser)\n    {\n        if (mIsTargetProxiesProperties && byUser)\n            BeginUserChanging();\n    }\n\n    void BorderFProperty::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onChanged(field, byUser);\n    }\n\n    void BorderFProperty::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after)\n    {\n        if (mIsTargetProxiesProperties)\n            EndUserChanging();\n        else\n            onChangeCompleted(mValuesPath + \"/\" + path, before, after);\n    }\n\n    void BorderFProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        mValuesProxies = targets;\n\n        mIsTargetProxiesProperties = targets.IsEmpty() ? false : dynamic_cast<IPropertyValueProxy*>(targets[0].first.Get()) != nullptr;\n\n        mLeftProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<LeftValueProxy>(x.first), x.second ? mmake<LeftValueProxy>(x.second) : nullptr); }));\n\n        mRightProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<RightValueProxy>(x.first), x.second ? mmake<RightValueProxy>(x.second) : nullptr); }));\n\n        mTopProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<TopValueProxy>(x.first), x.second ? mmake<TopValueProxy>(x.second) : nullptr); }));\n\n        mBottomProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<BottomValueProxy>(x.first), x.second ? mmake<BottomValueProxy>(x.second) : nullptr); }));\n    }\n\n    void BorderFProperty::Refresh(bool forcible /*= false*/)\n    {\n        if (mValuesProxies.IsEmpty())\n            return;\n\n        mLeftProperty->Refresh(forcible);\n        mRightProperty->Refresh(forcible);\n        mTopProperty->Refresh(forcible);\n        mBottomProperty->Refresh(forcible);\n\n        CheckRevertableState();\n    }\n\n    BorderF BorderFProperty::GetCommonValue() const\n    {\n        return BorderF(mLeftProperty->GetCommonValue(), mBottomProperty->GetCommonValue(),\n                       mRightProperty->GetCommonValue(), mTopProperty->GetCommonValue());\n    }\n\n    bool BorderFProperty::IsValuesDifferent() const\n    {\n        return mLeftProperty->IsValuesDifferent() || mRightProperty->IsValuesDifferent() ||\n            mTopProperty->IsValuesDifferent() || mBottomProperty->IsValuesDifferent();\n    }\n\n    const Type* BorderFProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* BorderFProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(BorderF);\n    }\n\n    BorderFProperty::LeftValueProxy::LeftValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    BorderFProperty::LeftValueProxy::LeftValueProxy()\n    {}\n\n    void BorderFProperty::LeftValueProxy::SetValue(const float& value)\n    {\n        BorderF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.left = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float BorderFProperty::LeftValueProxy::GetValue() const\n    {\n        BorderF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.left;\n    }\n\n    BorderFProperty::RightValueProxy::RightValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    BorderFProperty::RightValueProxy::RightValueProxy()\n    {}\n\n    void BorderFProperty::RightValueProxy::SetValue(const float& value)\n    {\n        BorderF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.right = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float BorderFProperty::RightValueProxy::GetValue() const\n    {\n        BorderF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.right;\n    }\n\n    BorderFProperty::TopValueProxy::TopValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    BorderFProperty::TopValueProxy::TopValueProxy()\n    {}\n\n    void BorderFProperty::TopValueProxy::SetValue(const float& value)\n    {\n        BorderF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.top = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float BorderFProperty::TopValueProxy::GetValue() const\n    {\n        BorderF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.top;\n    }\n\n    BorderFProperty::BottomValueProxy::BottomValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    BorderFProperty::BottomValueProxy::BottomValueProxy()\n    {}\n\n    void BorderFProperty::BottomValueProxy::SetValue(const float& value)\n    {\n        BorderF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.bottom = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float BorderFProperty::BottomValueProxy::GetValue() const\n    {\n        BorderF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.bottom;\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::BorderF>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::BorderFProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::BorderF>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::BorderFProperty, Editor__BorderFProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/BorderFloatProperty.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(FloatProperty);\n\n    // ----------------------------\n    // Editor float border property\n    // ----------------------------\n    class BorderFProperty: public IPropertyField\n    {\n    public:\n        // Default constructor\n        BorderFProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        BorderFProperty(RefCounter* refCounter, const BorderFProperty& other);\n\n        // Copy operator\n        BorderFProperty& operator=(const BorderFProperty& other);\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Sets value\n        void SetValue(const BorderF& value);\n\n        // Sets value left\n        void SetValueLeft(float value);\n\n        // Sets value right\n        void SetValueRight(float value);\n\n        // Sets value top\n        void SetValueTop(float value);\n\n        // Sets value bottom\n        void SetValueBottom(float value);\n\n        // Sets value as unknown\n        void SetUnknownValue(const BorderF& defaultValue = BorderF());\n\n        // Sets value left as unknown\n        void SetLeftUnknownValue(float defaultValue = 0.0f);\n\n        // Sets value right as unknown\n        void SetRightUnknownValue(float defaultValue = 0.0f);\n\n        // Sets value top as unknown\n        void SetTopUnknownValue(float defaultValue = 0.0f);\n\n        // Sets value bottom as unknown\n        void SetBottomUnknownValue(float defaultValue = 0.0f);\n\n        // Returns value\n        BorderF GetCommonValue() const;\n\n        // Returns is values different\n        bool IsValuesDifferent() const;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        SERIALIZABLE(BorderFProperty);\n        CLONEABLE_REF(BorderFProperty);\n\n    protected:\n        Ref<FloatProperty> mLeftProperty;   // Left value property\n        Ref<FloatProperty> mRightProperty;  // Right value property\n        Ref<FloatProperty> mTopProperty;    // Top value property\n        Ref<FloatProperty> mBottomProperty; // Bottom value property\n\n        bool mIsTargetProxiesProperties = false; // Is target proxies types is properties\n\n    protected:\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Stores values to data\n        void StoreValues(Vector<DataDocument>& data) const override;\n\n        // Called when some property before change, sets value via proxy\n        void OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed, sets value via proxy\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after);\n\n    protected:\n\n        class LeftValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            LeftValueProxy();\n            LeftValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n\n        class RightValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            RightValueProxy();\n            RightValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n\n        class TopValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            TopValueProxy();\n            TopValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n\n        class BottomValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            BottomValueProxy();\n            BottomValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::BorderFProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::BorderFProperty)\n{\n    FIELD().PROTECTED().NAME(mLeftProperty);\n    FIELD().PROTECTED().NAME(mRightProperty);\n    FIELD().PROTECTED().NAME(mTopProperty);\n    FIELD().PROTECTED().NAME(mBottomProperty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsTargetProxiesProperties);\n}\nEND_META;\nCLASS_METHODS_META(Editor::BorderFProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const BorderFProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, const BorderF&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueLeft, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueRight, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueTop, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueBottom, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetUnknownValue, const BorderF&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeftUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRightUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTopUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBottomUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(BorderF, GetCommonValue);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValuesDifferent);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, StoreValues, Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyBeforeChange, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/BorderIntProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"BorderIntProperty.h\"\n\n#include \"o2Editor/Properties/Basic/IntegerProperty.h\"\n\nnamespace Editor\n{\n    BorderIProperty::BorderIProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {}\n\n    BorderIProperty::BorderIProperty(RefCounter* refCounter, const BorderIProperty& other) :\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    BorderIProperty& BorderIProperty::operator=(const BorderIProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void BorderIProperty::InitializeControls()\n    {\n        mLeftProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/left\");\n        mLeftProperty->SetValuePath(\"left\");\n        mLeftProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mLeftProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mLeftProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mBottomProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/bottom\");\n        mBottomProperty->SetValuePath(\"bottom\");\n        mBottomProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mBottomProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mBottomProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mRightProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/right\");\n        mRightProperty->SetValuePath(\"right\");\n        mRightProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mRightProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mRightProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mTopProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/top\");\n        mTopProperty->SetValuePath(\"top\");\n        mTopProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mTopProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mTopProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n    }\n\n    void BorderIProperty::SetValue(const BorderI& value)\n    {\n        mLeftProperty->SetValue(value.left, true);\n        mBottomProperty->SetValue(value.bottom, true);\n        mRightProperty->SetValue(value.right, true);\n        mTopProperty->SetValue(value.top, true);\n    }\n\n    void BorderIProperty::SetValueLeft(int value)\n    {\n        mLeftProperty->SetValue(value, true);\n    }\n\n    void BorderIProperty::SetValueRight(int value)\n    {\n        mRightProperty->SetValue(value, true);\n    }\n\n    void BorderIProperty::SetValueTop(int value)\n    {\n        mTopProperty->SetValue(value, true);\n    }\n\n    void BorderIProperty::SetValueBottom(int value)\n    {\n        mBottomProperty->SetValue(value, true);\n    }\n\n    void BorderIProperty::SetUnknownValue(const BorderI& defaultValue /*= BorderI()*/)\n    {\n        mLeftProperty->SetUnknownValue(defaultValue.left);\n        mRightProperty->SetUnknownValue(defaultValue.right);\n        mTopProperty->SetUnknownValue(defaultValue.top);\n        mBottomProperty->SetUnknownValue(defaultValue.bottom);\n    }\n\n    void BorderIProperty::SetLeftUnknownValue(int defaultValue /*= 0*/)\n    {\n        mLeftProperty->SetUnknownValue(defaultValue);\n    }\n\n    void BorderIProperty::SetRightUnknownValue(int defaultValue /*= 0*/)\n    {\n        mRightProperty->SetUnknownValue(defaultValue);\n    }\n\n    void BorderIProperty::SetTopUnknownValue(int defaultValue /*= 0*/)\n    {\n        mTopProperty->SetUnknownValue(defaultValue);\n    }\n\n    void BorderIProperty::SetBottomUnknownValue(int defaultValue /*= 0*/)\n    {\n        mBottomProperty->SetUnknownValue(defaultValue);\n    }\n\n    void BorderIProperty::StoreValues(Vector<DataDocument>& data) const\n    {\n        data.Clear();\n        for (auto& ptr : mValuesProxies)\n        {\n            data.Add(DataDocument());\n            data.Last() = GetProxy<BorderI>(ptr.first);\n        }\n    }\n\n    void BorderIProperty::OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser)\n    {\n        if (mIsTargetProxiesProperties && byUser)\n            BeginUserChanging();\n    }\n\n    void BorderIProperty::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onChanged(field, byUser);\n    }\n\n    void BorderIProperty::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after)\n    {\n        if (mIsTargetProxiesProperties)\n            EndUserChanging();\n        else\n            onChangeCompleted(mValuesPath + \"/\" + path, before, after);\n    }\n\n    void BorderIProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        mValuesProxies = targets;\n\n        mIsTargetProxiesProperties = targets.IsEmpty() ? false : dynamic_cast<IPropertyValueProxy*>(targets[0].first.Get()) != nullptr;\n\n        mLeftProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<LeftValueProxy>(x.first), x.second ? mmake<LeftValueProxy>(x.second) : nullptr); }));\n\n        mRightProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<RightValueProxy>(x.first), x.second ? mmake<RightValueProxy>(x.second) : nullptr); }));\n\n        mTopProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<TopValueProxy>(x.first), x.second ? mmake<TopValueProxy>(x.second) : nullptr); }));\n\n        mBottomProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<BottomValueProxy>(x.first), x.second ? mmake<BottomValueProxy>(x.second) : nullptr); }));\n    }\n\n    void BorderIProperty::Refresh(bool forcible /*= false*/)\n    {\n        if (mValuesProxies.IsEmpty())\n            return;\n\n        mLeftProperty->Refresh(forcible);\n        mRightProperty->Refresh(forcible);\n        mTopProperty->Refresh(forcible);\n        mBottomProperty->Refresh(forcible);\n\n        CheckRevertableState();\n    }\n\n    BorderI BorderIProperty::GetCommonValue() const\n    {\n        return BorderI(mLeftProperty->GetCommonValue(), mBottomProperty->GetCommonValue(),\n                       mRightProperty->GetCommonValue(), mTopProperty->GetCommonValue());\n    }\n\n    bool BorderIProperty::IsValuesDifferent() const\n    {\n        return mLeftProperty->IsValuesDifferent() || mRightProperty->IsValuesDifferent() ||\n            mTopProperty->IsValuesDifferent() || mBottomProperty->IsValuesDifferent();\n    }\n\n    const Type* BorderIProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* BorderIProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(BorderI);\n    }\n\n    BorderIProperty::LeftValueProxy::LeftValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    BorderIProperty::LeftValueProxy::LeftValueProxy()\n    {}\n\n    void BorderIProperty::LeftValueProxy::SetValue(const int& value)\n    {\n        BorderI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.left = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int BorderIProperty::LeftValueProxy::GetValue() const\n    {\n        BorderI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.left;\n    }\n\n    BorderIProperty::RightValueProxy::RightValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    BorderIProperty::RightValueProxy::RightValueProxy()\n    {}\n\n    void BorderIProperty::RightValueProxy::SetValue(const int& value)\n    {\n        BorderI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.right = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int BorderIProperty::RightValueProxy::GetValue() const\n    {\n        BorderI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.right;\n    }\n\n    BorderIProperty::TopValueProxy::TopValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    BorderIProperty::TopValueProxy::TopValueProxy()\n    {}\n\n    void BorderIProperty::TopValueProxy::SetValue(const int& value)\n    {\n        BorderI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.top = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int BorderIProperty::TopValueProxy::GetValue() const\n    {\n        BorderI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.top;\n    }\n\n    BorderIProperty::BottomValueProxy::BottomValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    BorderIProperty::BottomValueProxy::BottomValueProxy()\n    {}\n\n    void BorderIProperty::BottomValueProxy::SetValue(const int& value)\n    {\n        BorderI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.bottom = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int BorderIProperty::BottomValueProxy::GetValue() const\n    {\n        BorderI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.bottom;\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::BorderI>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::BorderIProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::BorderI>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::BorderIProperty, Editor__BorderIProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/BorderIntProperty.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IntegerProperty);\n\n    // ------------------------------\n    // Editor integer border property\n    // ------------------------------\n    class BorderIProperty : public IPropertyField\n    {\n    public:\n        // Default constructor\n        BorderIProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        BorderIProperty(RefCounter* refCounter, const BorderIProperty& other);\n\n        // Copy operator\n        BorderIProperty& operator=(const BorderIProperty& other);\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Sets value\n        void SetValue(const BorderI& value);\n\n        // Sets value left\n        void SetValueLeft(int value);\n\n        // Sets value right\n        void SetValueRight(int value);\n\n        // Sets value top\n        void SetValueTop(int value);\n\n        // Sets value bottom\n        void SetValueBottom(int value);\n\n        // Sets value as unknown\n        void SetUnknownValue(const BorderI& defaultValue = BorderI());\n\n        // Sets value left as unknown\n        void SetLeftUnknownValue(int defaultValue = 0);\n\n        // Sets value right as unknown\n        void SetRightUnknownValue(int defaultValue = 0);\n\n        // Sets value top as unknown\n        void SetTopUnknownValue(int defaultValue = 0);\n\n        // Sets value bottom as unknown\n        void SetBottomUnknownValue(int defaultValue = 0);\n\n        // Returns value\n        BorderI GetCommonValue() const;\n\n        // Returns is values different\n        bool IsValuesDifferent() const;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        SERIALIZABLE(BorderIProperty);\n        CLONEABLE_REF(BorderIProperty);\n\n    protected:\n        Ref<IntegerProperty> mLeftProperty;   // Left value property\n        Ref<IntegerProperty> mRightProperty;  // Right value property\n        Ref<IntegerProperty> mTopProperty;    // Top value property\n        Ref<IntegerProperty> mBottomProperty; // Bottom value property\n\n        bool mIsTargetProxiesProperties = false; // Is target proxies types is properties\n\n    protected:\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Stores values to data\n        void StoreValues(Vector<DataDocument>& data) const override;\n\n        // Called when some property before change, sets value via proxy\n        void OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed, sets value via proxy\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after);\n\n    protected:\n\n        class LeftValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            LeftValueProxy();\n            LeftValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n\n        class RightValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            RightValueProxy();\n            RightValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n\n        class TopValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            TopValueProxy();\n            TopValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n\n        class BottomValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            BottomValueProxy();\n            BottomValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::BorderIProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::BorderIProperty)\n{\n    FIELD().PROTECTED().NAME(mLeftProperty);\n    FIELD().PROTECTED().NAME(mRightProperty);\n    FIELD().PROTECTED().NAME(mTopProperty);\n    FIELD().PROTECTED().NAME(mBottomProperty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsTargetProxiesProperties);\n}\nEND_META;\nCLASS_METHODS_META(Editor::BorderIProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const BorderIProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, const BorderI&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueLeft, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueRight, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueTop, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueBottom, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetUnknownValue, const BorderI&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeftUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRightUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTopUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBottomUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(BorderI, GetCommonValue);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValuesDifferent);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, StoreValues, Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyBeforeChange, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ColorGradientProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ColorGradientProperty.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2Editor/Dialogs/CurveEditorDlg.h\"\n#include \"o2Editor/UI/CurvePreview.h\"\n#include \"o2Editor/Dialogs/ColorPickerDlg.h\"\n\nnamespace Editor\n{\n\tColorGradientProperty::ColorGradientProperty(RefCounter* refCounter) :\n\t\tTPropertyField<Ref<ColorGradient>>(refCounter)\n\t{\n\t}\n\n\tColorGradientProperty::ColorGradientProperty(RefCounter* refCounter, const ColorGradientProperty& other) :\n\t\tTPropertyField<Ref<ColorGradient>>(refCounter, other)\n\t{\n\t\tInitializeControls();\n\t}\n\n\tColorGradientProperty& ColorGradientProperty::operator=(const ColorGradientProperty& other)\n\t{\n\t\tTPropertyField<Ref<ColorGradient>>::operator=(other);\n\t\tInitializeControls();\n\t\treturn *this;\n\t}\n\n\tvoid ColorGradientProperty::InitializeControls()\n\t{\n\t\tmBox = GetChildWidget(\"container/layout/box\");\n\t\tif (mBox)\n\t\t{\n\t\t\tmBox->layout->minHeight = 10;\n\n\t\t\tColor4 color1(1.0f, 1.0f, 1.0f, 1.0f), color2(0.7f, 0.7f, 0.7f, 1.0f);\n\t\t\tBitmap backLayerBitmap(PixelFormat::R8G8B8A8, Vec2I(20, 20));\n\t\t\tbackLayerBitmap.Fill(color1);\n\t\t\tbackLayerBitmap.FillRect(0, 10, 10, 0, color2);\n\t\t\tbackLayerBitmap.FillRect(10, 20, 20, 10, color2);\n\t\t\tauto backSprite = mmake<Sprite>(backLayerBitmap);\n\t\t\tbackSprite->mode = SpriteMode::Tiled;\n\t\t\tmBox->AddLayer(\"back\", backSprite, Layout::BothStretch(1, 1, 1, 1));\n\n\t\t\tmPreview = mmake<GradientPreviewDrawable>();\n\t\t\tmBox->AddLayer(\"preview\", mPreview, Layout::BothStretch(1, 1, 1, 1));\n\n\t\t\tmBoxArea = mmake<CursorEventsArea>();\n\t\t\tmPreview->onDraw = [=]() { mBoxArea->OnDrawn(); };\n\t\t\tmBoxArea->isUnderPoint = [=](const Vec2F& point) { return mBox->IsUnderPoint(point); };\n\t\t\tmBoxArea->onDblClicked = [=](const Input::Cursor& cursor) { AddNewKey(cursor); };\n\t\t\tmBoxArea->onRightMouseReleased = [=](const Input::Cursor& cursor) { OpenBoxContextMenu(cursor); };\n\t\t}\n\n\t\tmBoxContextMenu = o2UI.CreateWidget<ContextMenu>();\n\t\tmBoxContextMenu->AddItem(\"Add key\", [=]() { AddNewKey(mBoxPressedCursor); }, nullptr, ShortcutKeys::FromCustomString(\"Double click\"));\n\t\tmBox->AddChild(mBoxContextMenu);\n\n\t\tmHandleContextMenu = o2UI.CreateWidget<ContextMenu>();\n\t\tmHandleContextMenu->AddItem(\"Change color\", [=]() { OpenKeyColorPick(mSelectedHandleUID); }, nullptr, ShortcutKeys::FromCustomString(\"Double click\"));\n\t\tmHandleContextMenu->AddItem(\"Delete key\", [=]() { DeleteKey(mSelectedHandleUID); }, nullptr, ShortcutKeys({ VK_DELETE }));\n\t\tmBox->AddChild(mHandleContextMenu);\n\t}\n\n\tvoid ColorGradientProperty::OnValueChanged()\n\t{\n\t\tfor (auto& ptr : mValuesProxies)\n\t\t\tSetProxy(ptr.first, mCommonValue);\n\t}\n\n\tvoid ColorGradientProperty::UpdateValueView()\n\t{\n\t\tmPreview->SetGradient(mCommonValue);\n\t\tInitializeHandles();\n\t}\n\n\tRef<WidgetDragHandle> ColorGradientProperty::CreateHandle(HandleType type)\n\t{\n\t\tauto handle = mmake<WidgetDragHandle>(mmake<Sprite>(\"ui/UI4_map_key.png\"),\n\t\t\t\t\t\t\t\t\t\t\t  mmake<Sprite>(\"ui/UI4_map_key_hover.png\"),\n\t\t\t\t\t\t\t\t\t\t\t  mmake<Sprite>(\"ui/UI4_map_key_pressed.png\"),\n\t\t\t\t\t\t\t\t\t\t\t  mmake<Sprite>(\"ui/UI4_selected_map_key.png\"),\n\t\t\t\t\t\t\t\t\t\t\t  mmake<Sprite>(\"ui/UI4_selected_map_key_hover.png\"),\n\t\t\t\t\t\t\t\t\t\t\t  mmake<Sprite>(\"ui/UI4_selected_map_key_pressed.png\"));\n\n\t\thandle->cursorType = CursorType::SizeWE;\n\t\thandle->pixelPerfect = true;\n\t\thandle->SetDrawablesSizePivot(Vec2F(4, 1));\n\n\t\thandle->checkPositionFunc = [=](const Vec2F& pos)\n\t\t\t{\n\t\t\t\tif (type == HandleType::Left)\n\t\t\t\t\treturn Vec2F(0, mBox->layout->GetHeight() * 0.5f);\n\n\t\t\t\tif (type == HandleType::Right)\n\t\t\t\t\treturn Vec2F(1, mBox->layout->GetHeight() * 0.5f);\n\n\t\t\t\treturn Vec2F(Math::Clamp01(pos.x), layout->GetHeight() * 0.5f);\n\t\t\t};\n\n\t\thandle->localToWidgetOffsetTransformFunc = [=](const Vec2F& pos)\n\t\t\t{\n\t\t\t\treturn Vec2F(pos.x * mBox->layout->width, -2);\n\t\t\t};\n\n\t\thandle->widgetOffsetToLocalTransformFunc = [=](const Vec2F& pos)\n\t\t\t{\n\t\t\t\treturn Vec2F(pos.x / mBox->layout->width, 0);\n\t\t\t};\n\n\t\treturn handle;\n\t}\n\n\tvoid ColorGradientProperty::InitializeHandles()\n\t{\n\t\t// Clear old handles\n\t\tfor (auto& pair : mHandles)\n\t\t\tmBox->RemoveChild(pair.second);\n\n\t\tmHandles.Clear();\n\n\t\tif (!mCommonValue)\n\t\t\treturn;\n\n\t\t// Create new handles\n\t\tfloat length = mCommonValue->Length();\n\t\tint keysCount = mCommonValue->GetKeys().Count();\n\n\t\tfor (int i = 0; i < keysCount; i++)\n\t\t{\n\t\t\tauto& key = mCommonValue->GetKeys()[i];\n\t\t\tauto handleType = i == 0 ? HandleType::Left : (i == keysCount - 1 ? HandleType::Right : HandleType::Middle);\n\t\t\tauto handle = CreateHandle(handleType);\n\t\t\thandle->SetPosition(Vec2F(key.position / length, 0));\n\n\t\t\tauto uid = key.uid;\n\t\t\thandle->onChangedPos = [=](const Vec2F& pos) { OnHandleChangedPos(pos, uid); };\n\t\t\thandle->onDblClicked = [=]() { OpenKeyColorPick(uid); };\n\t\t\thandle->onRightButtonReleased = [=](const Input::Cursor& cursor) { OpenKeyContextMenu(uid, cursor); };\n\t\t\thandle->onPressed = [=]() { mHandleContextMenu->SetItemsMaxPriority(); mSelectedHandleUID = uid; };\n\n\t\t\tmBox->AddChild(handle);\n\t\t\tmHandles.Add({ uid, handle });\n\t\t}\n\t}\n\n\tUInt64 ColorGradientProperty::FindSelectedHandle()\n\t{\n\t\tfor (auto& pair : mHandles)\n\t\t{\n\t\t\tif (pair.second->IsSelected())\n\t\t\t\treturn pair.first;\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\tvoid ColorGradientProperty::OnHandleChangedPos(const Vec2F& pos, UInt64 id)\n\t{\n\t\tif (!mCommonValue)\n\t\t\treturn;\n\n\t\tint keyIdx = mCommonValue->FindKeyIdx(id);\n\t\tif (keyIdx == -1)\n\t\t\treturn;\n\n\t\tauto key = mCommonValue->GetKeys()[keyIdx];\n\t\tkey.position = pos.x * mCommonValue->Length();\n\n\t\tmCommonValue->SetKey(key, keyIdx);\n\t}\n\n\tvoid ColorGradientProperty::OpenKeyColorPick(UInt64 id)\n\t{\n\t\tif (!mCommonValue)\n\t\t\treturn;\n\n\t\tint keyIdx = mCommonValue->FindKeyIdx(id);\n\t\tif (keyIdx == -1)\n\t\t\treturn;\n\n\t\tauto key = mCommonValue->GetKeys()[keyIdx];\n\n\t\tauto onChanged = [=](const Color4& color, bool byUser)\n\t\t\t{\n\t\t\t\tauto key = mCommonValue->GetKeys()[keyIdx];\n\t\t\t\tkey.color = color;\n\t\t\t\tmCommonValue->SetKey(key, keyIdx);\n\t\t\t};\n\n\t\tColorPickerDlg::Show(key.color, onChanged);\n\t}\n\n\tvoid ColorGradientProperty::AddNewKey(const Input::Cursor& cursor)\n\t{\n\t\tif (!mCommonValue)\n\t\t\treturn;\n\n\t\tfloat position = (cursor.position.x - mBox->layout->worldLeft) / mBox->layout->width * mCommonValue->Length();\n\t\tauto color = mCommonValue->Evaluate(position);\n\n\t\tmCommonValue->InsertKey(position, color);\n\t\tInitializeHandles();\n\t}\n\n\tvoid ColorGradientProperty::OpenBoxContextMenu(const Input::Cursor& cursor)\n\t{\n\t\tmBoxPressedCursor = cursor;\n\t\tmBoxContextMenu->Show(cursor.position);\n\t}\n\n\tvoid ColorGradientProperty::OpenKeyContextMenu(UInt64 id, const Input::Cursor& cursor)\n\t{\n\t\tmHandleContextMenu->Show(cursor.position);\n\t\tmSelectedHandleUID = id;\n\t}\n\n\tvoid ColorGradientProperty::DeleteKey(UInt64 keyUid)\n\t{\n\t\tif (!mCommonValue)\n\t\t\treturn;\n\n\t\tauto keyIdx = mCommonValue->FindKeyIdx(keyUid);\n\t\tif (keyIdx == -1)\n\t\t\treturn;\n\n\t\t// Do not allow to delete first and last keys\n\t\tif (keyIdx == 0 || keyIdx == mCommonValue->GetKeys().Count() - 1)\n\t\t\treturn;\n\n\t\tmCommonValue->RemoveKeyAt(keyIdx);\n\t\tInitializeHandles();\n\t}\n\n\tvoid ColorGradientProperty::GradientPreviewDrawable::SetGradient(const Ref<ColorGradient>& gradient)\n\t{\n\t\tif (mGradient)\n\t\t\tmGradient->onKeysChanged -= THIS_FUNC(UpdateMesh);\n\n\t\tmGradient = gradient;\n\n\t\tif (mGradient)\n\t\t\tmGradient->onKeysChanged += THIS_FUNC(UpdateMesh);\n\n\t\tUpdateMesh();\n\t}\n\n\tvoid ColorGradientProperty::GradientPreviewDrawable::Draw()\n\t{\n\t\tif (!mEnabled)\n\t\t\treturn;\n\n\t\tmMesh.Draw();\n\t\tOnDrawn();\n\t}\n\n\tvoid ColorGradientProperty::GradientPreviewDrawable::BasisChanged()\n\t{\n\t\tUpdateMesh();\n\t}\n\n\tvoid ColorGradientProperty::GradientPreviewDrawable::UpdateMesh()\n\t{\n\t\tif (!mGradient)\n\t\t\treturn;\n\n\t\tif (mGradient->GetKeys().Count() == 1)\n\t\t{\n\t\t\tmMesh.Resize(4, 2);\n\t\t\tmMesh.vertexCount = 4;\n\t\t\tmMesh.polyCount = 2;\n\n\t\t\tauto key = mGradient->GetKeys()[0];\n\t\t\tauto color32 = key.color.ARGB();\n\n\t\t\tVertex* verts = mMesh.GetVertices<Vertex>();\n\t\t\tVertexIndex* idx = mMesh.GetIndexes();\n\t\t\tverts[0].Set(mTransform * Vec2F(0, 0), color32, 0.0f, 0.0f);\n\t\t\tverts[1].Set(mTransform * Vec2F(1, 0), color32, 0.0f, 0.0f);\n\t\t\tverts[2].Set(mTransform * Vec2F(1, 1), color32, 0.0f, 0.0f);\n\t\t\tverts[3].Set(mTransform * Vec2F(0, 1), color32, 0.0f, 0.0f);\n\n\t\t\tidx[0] = 0; idx[1] = 1; idx[2] = 2;\n\t\t\tidx[3] = 2; idx[4] = 3; idx[5] = 0;\n\n\t\t\treturn;\n\t\t}\n\n\t\tint segments = mGradient->GetKeys().Count() - 1;\n\t\tmMesh.Resize(segments * 4, segments * 2);\n\n\t\tmMesh.vertexCount = segments * 4;\n\t\tmMesh.polyCount = segments * 2;\n\n\t\tfloat gradientLength = mGradient->Length();\n\t\tfloat prevXPos = 0.0f;\n\t\tColor4 prevColor = mGradient->GetKeys()[0].color;\n\n\t\tVertex* verts = mMesh.GetVertices<Vertex>();\n\t\tVertexIndex* idx = mMesh.GetIndexes();\n\t\tfor (int i = 0; i < segments; i++)\n\t\t{\n\t\t\tauto key = mGradient->GetKeys()[i + 1];\n\t\t\tfloat xPos = key.position / gradientLength;\n\n\t\t\tint vertexIndex = i * 4;\n\t\t\tauto prevColor32 = prevColor.ABGR();\n\t\t\tauto color32 = key.color.ABGR();\n\n\t\t\tverts[vertexIndex + 0].Set(mTransform * Vec2F(prevXPos, 0), prevColor32, 0.0f, 0.0f);\n\t\t\tverts[vertexIndex + 1].Set(mTransform * Vec2F(xPos, 0), color32, 0.0f, 0.0f);\n\t\t\tverts[vertexIndex + 2].Set(mTransform * Vec2F(xPos, 1), color32, 0.0f, 0.0f);\n\t\t\tverts[vertexIndex + 3].Set(mTransform * Vec2F(prevXPos, 1), prevColor32, 0.0f, 0.0f);\n\n\t\t\tint polyIndex = i * 2 * 3;\n\t\t\tidx[polyIndex + 0] = vertexIndex + 0;\n\t\t\tidx[polyIndex + 1] = vertexIndex + 1;\n\t\t\tidx[polyIndex + 2] = vertexIndex + 2;\n\n\t\t\tidx[polyIndex + 3] = vertexIndex + 2;\n\t\t\tidx[polyIndex + 4] = vertexIndex + 3;\n\t\t\tidx[polyIndex + 5] = vertexIndex + 0;\n\n\t\t\tprevXPos = xPos;\n\t\t\tprevColor = key.color;\n\t\t}\n\t}\n\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::Ref<o2::ColorGradient>>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ColorGradientProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::Ref<o2::ColorGradient>>>);\n// --- META ---\n\nENUM_META(Editor::ColorGradientProperty::HandleType, Editor__ColorGradientProperty__HandleType)\n{\n    ENUM_ENTRY(Left);\n    ENUM_ENTRY(Middle);\n    ENUM_ENTRY(Right);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(Editor::ColorGradientProperty, Editor__ColorGradientProperty);\n\nDECLARE_CLASS(Editor::ColorGradientProperty::GradientPreviewDrawable, Editor__ColorGradientProperty__GradientPreviewDrawable);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ColorGradientProperty.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Math/ColorGradient.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(CurvePreview);\n\n    // ------------------------------\n    // Editor curve property edit box\n    // ------------------------------\n    class ColorGradientProperty: public TPropertyField<Ref<ColorGradient>>\n    {\n    public:\n        // Default constructor\n        ColorGradientProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        ColorGradientProperty(RefCounter* refCounter, const ColorGradientProperty& other);\n\n        // Copy operator\n        ColorGradientProperty& operator=(const ColorGradientProperty& other);\n\n        SERIALIZABLE(ColorGradientProperty);\n        CLONEABLE_REF(ColorGradientProperty);\n\n    public:\n        // ---------------------------------------------------------------\n        // Gradient preview drawable, used as layer of property box widget\n        // ---------------------------------------------------------------\n        class GradientPreviewDrawable : public IRectDrawable\n        {\n        public:\n            // Sets gradient and updates mesh\n            void SetGradient(const Ref<ColorGradient>& gradient);\n\n            // Draws gradient\n            void Draw() override;\n\n            SERIALIZABLE(GradientPreviewDrawable);\n            CLONEABLE_REF(GradientPreviewDrawable);\n\n        protected:\n            Ref<ColorGradient> mGradient;\n            Mesh               mMesh;\n\n        protected:\n            // Called when rectangle changed, updates gradient mesh\n            void BasisChanged() override;\n\n            // Updates gradient mesh\n            void UpdateMesh();\n        };\n\n    public:\n        enum class HandleType { Left, Middle, Right };\n\n    protected:\n        Ref<Widget>                  mBox;     // Gradient edit box \n        Ref<GradientPreviewDrawable> mPreview; // Gradient preview drawable\n\n        Vector<Pair<UInt64, Ref<WidgetDragHandle>>> mHandles; // List of handles, each for keys\n\n        Ref<CursorEventsArea> mBoxArea; // Cursor events area for box\n\n        Ref<ContextMenu> mBoxContextMenu;    // Context menu for box\n        Ref<ContextMenu> mHandleContextMenu; // Context menu for handles\n\n        UInt64 mSelectedHandleUID = 0; // Selected handle UID\n        Input::Cursor mBoxPressedCursor; // Cursor when box was pressed\n\n    protected:\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Called when common curve changed in curve edit dialog, tells to drawing content\n        void OnValueChanged();\n\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Creates new handle\n        Ref<WidgetDragHandle> CreateHandle(HandleType type);\n\n        // Finds selected handle UID\n        UInt64 FindSelectedHandle();\n\n        // Called when handle changed position and updates key position\n        void OnHandleChangedPos(const Vec2F& pos, UInt64 id);\n\n        // Called when handle double clicked and opens color dialog\n        void OpenKeyColorPick(UInt64 id);\n\n        // Called when box double clicked and adds new key\n        void AddNewKey(const Input::Cursor& cursor);\n\n        // Opens box context menu\n        void OpenBoxContextMenu(const Input::Cursor& cursor);\n\n        // Opens handle context menu\n        void OpenKeyContextMenu(UInt64 id, const Input::Cursor& cursor);\n\n        // Deletes key by UID\n        void DeleteKey(UInt64 keyUid);\n\n        // Creates handles for all keys\n        void InitializeHandles();\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(Editor::ColorGradientProperty::HandleType);\n\nCLASS_BASES_META(Editor::ColorGradientProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<Ref<ColorGradient>>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ColorGradientProperty)\n{\n    FIELD().PROTECTED().NAME(mBox);\n    FIELD().PROTECTED().NAME(mPreview);\n    FIELD().PROTECTED().NAME(mHandles);\n    FIELD().PROTECTED().NAME(mBoxArea);\n    FIELD().PROTECTED().NAME(mBoxContextMenu);\n    FIELD().PROTECTED().NAME(mHandleContextMenu);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mSelectedHandleUID);\n    FIELD().PROTECTED().NAME(mBoxPressedCursor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ColorGradientProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ColorGradientProperty&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnValueChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<WidgetDragHandle>, CreateHandle, HandleType);\n    FUNCTION().PROTECTED().SIGNATURE(UInt64, FindSelectedHandle);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHandleChangedPos, const Vec2F&, UInt64);\n    FUNCTION().PROTECTED().SIGNATURE(void, OpenKeyColorPick, UInt64);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddNewKey, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OpenBoxContextMenu, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OpenKeyContextMenu, UInt64, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeleteKey, UInt64);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeHandles);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::ColorGradientProperty::GradientPreviewDrawable)\n{\n    BASE_CLASS(o2::IRectDrawable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ColorGradientProperty::GradientPreviewDrawable)\n{\n    FIELD().PROTECTED().NAME(mGradient);\n    FIELD().PROTECTED().NAME(mMesh);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ColorGradientProperty::GradientPreviewDrawable)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, SetGradient, const Ref<ColorGradient>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PROTECTED().SIGNATURE(void, BasisChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateMesh);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ColorProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ColorProperty.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2Editor/Dialogs/ColorPickerDlg.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    ColorProperty::ColorProperty(RefCounter* refCounter):\n        TPropertyField<Color4>(refCounter)\n    {}\n\n    ColorProperty::ColorProperty(RefCounter* refCounter, const ColorProperty& other):\n        TPropertyField<Color4>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    ColorProperty& ColorProperty::operator=(const ColorProperty& other)\n    {\n        TPropertyField<Color4>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void ColorProperty::InitializeControls()\n    {\n        mEditBox = GetChildWidget(\"container/layout/box\");\n        if (mEditBox)\n        {\n            mEditBox->layout->minHeight = 10;\n\n            Color4 color1(1.0f, 1.0f, 1.0f, 1.0f), color2(0.7f, 0.7f, 0.7f, 1.0f);\n            Bitmap backLayerBitmap(PixelFormat::R8G8B8A8, Vec2I(20, 20));\n            backLayerBitmap.Fill(color1);\n            backLayerBitmap.FillRect(0, 10, 10, 0, color2);\n            backLayerBitmap.FillRect(10, 20, 20, 10, color2);\n\n            auto backImage = mmake<Image>();\n            backImage->image = mmake<Sprite>(backLayerBitmap);\n            backImage->GetImage()->mode = SpriteMode::Tiled;\n            *backImage->layout = WidgetLayout::BothStretch(1, 1, 1, 1);\n            mEditBox->AddChild(backImage);\n\n            Bitmap colorLayerBitmap(PixelFormat::R8G8B8A8, Vec2I(20, 20));\n            colorLayerBitmap.Fill(color1);\n            mColorSprite = mmake<Image>();\n            mColorSprite->image = mmake<Sprite>(colorLayerBitmap);\n            *mColorSprite->layout = WidgetLayout::BothStretch(1, 1, 1, 1);\n            mEditBox->AddChild(mColorSprite);\n\n            mClickArea = mmake<CursorEventsArea>();\n            mEditBox->onDraw += [&]() { mClickArea->OnDrawn(); };\n            mClickArea->isUnderPoint = [&](const Vec2F& point) { return mEditBox->IsUnderPoint(point); };\n            mClickArea->onCursorReleased = [&](const Input::Cursor& cursor) { if (mEditBox->IsUnderPoint(cursor.position)) OnClicked(); };\n        }\n    }\n\n    void ColorProperty::UpdateValueView()\n    {\n        mColorSprite->GetImage()->SetColor(mCommonValue);\n        mColorSprite->transparency = mCommonValue.AF();\n    }\n\n    void ColorProperty::OnClicked()\n    {\n        StoreValues(mBeforeChangeValues);\n\n        ColorPickerDlg::Show(mCommonValue,\n                             MakeFunction<TPropertyField<Color4>, void, const Color4&>(this, &ColorProperty::SetValue),\n                             MakeFunction<IPropertyField, void>(this, &ColorProperty::CheckValueChangeCompleted));\n    }\n}\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::Color4>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ColorProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::Color4>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ColorProperty, Editor__ColorProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ColorProperty.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Image;\n    class Widget;\n}\n\nnamespace Editor\n{\n    // ------------------------------\n    // Editor color property edit box\n    // ------------------------------\n    class ColorProperty: public TPropertyField<Color4>\n    {\n    public:\n        // Default constructor\n        ColorProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        ColorProperty(RefCounter* refCounter, const ColorProperty& other);\n\n        // Copy operator\n        ColorProperty& operator=(const ColorProperty& other);\n\n        SERIALIZABLE(ColorProperty);\n        CLONEABLE_REF(ColorProperty);\n\n    protected:\n        Ref<Widget>           mEditBox;     // Edit box \n        Ref<Image>            mColorSprite; // Color preview sprite\n        Ref<CursorEventsArea> mClickArea;   // Box click area\n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Called when box pressed and shows color picking dialog\n        void OnClicked();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ColorProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<Color4>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ColorProperty)\n{\n    FIELD().PROTECTED().NAME(mEditBox);\n    FIELD().PROTECTED().NAME(mColorSprite);\n    FIELD().PROTECTED().NAME(mClickArea);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ColorProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ColorProperty&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClicked);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ComponentProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ComponentProperty.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsWindow.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\n\nnamespace Editor\n{\n    ComponentProperty::ComponentProperty(RefCounter* refCounter):\n        TPropertyField<LinkRef<Component>>(refCounter)\n    {\n    }\n\n    ComponentProperty::ComponentProperty(RefCounter* refCounter, const ComponentProperty& other) :\n        TPropertyField<LinkRef<Component>>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    ComponentProperty& ComponentProperty::operator=(const ComponentProperty& other)\n    {\n        TPropertyField<LinkRef<Component>>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void ComponentProperty::InitializeControls()\n    {\n        mCommonValue = nullptr;\n        mComponentType = &TypeOf(Component);\n\n        mBox = GetChildWidget(\"container/layout/box\");\n        if (mBox)\n        {\n            mBox->onDraw += [&]() { DragDropArea::OnDrawn(); };\n            mBox->SetFocusable(true);\n\n            mNameText = mBox->GetLayerDrawable<Text>(\"caption\");\n            if (mNameText)\n                mNameText->text = \"--\";\n        }\n    }\n\n    void ComponentProperty::Revert()\n    {\n        auto propertyObjects = o2EditorPropertiesWindow.GetTargets();\n\n        for (int i = 0; i < mValuesProxies.Count() && i < propertyObjects.Count(); i++)\n            RevertoToPrototype(mValuesProxies[i].first, mValuesProxies[i].second, propertyObjects[i]);\n\n        Refresh();\n    }\n\n    const Type* ComponentProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* ComponentProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(BaseComponentLinkRef);\n    }\n\n    bool ComponentProperty::IsUnderPoint(const Vec2F& point)\n    {\n        return mBox->IsUnderPoint(point);\n    }\n\n    void ComponentProperty::OnTypeSpecialized(const Type& type)\n    {\n        TPropertyField<LinkRef<Component>>::OnTypeSpecialized(type);\n\n        mComponentType = type.InvokeStatic<const Type*>(\"GetComponentTypeStatic\");\n    }\n\n    LinkRef<Component> ComponentProperty::GetProxy(const Ref<IAbstractValueProxy>& proxy) const\n    {\n        auto proxyType = dynamic_cast<const ObjectType*>(&proxy->GetType());\n        auto proxySample = proxyType->CreateSample();\n        proxy->GetValuePtr(proxySample);\n        auto objectSample = proxyType->DynamicCastToIObject(proxySample);\n        BaseComponentLinkRef* baseComponentLinkSample = dynamic_cast<BaseComponentLinkRef*>(objectSample);\n        LinkRef<Component> res = LinkRef<Component>(const_cast<Component*>(baseComponentLinkSample->Get()));\n        delete baseComponentLinkSample;\n        return res;\n    }\n\n    void ComponentProperty::SetProxy(const Ref<IAbstractValueProxy>& proxy, const LinkRef<Component>& value)\n    {\n        auto proxyType = dynamic_cast<const ObjectType*>(&proxy->GetType());\n        auto proxySample = proxyType->CreateSample();\n        auto objectSample = proxyType->DynamicCastToIObject(proxySample);\n        BaseComponentLinkRef* baseComponentLinkSample = dynamic_cast<BaseComponentLinkRef*>(objectSample);\n        baseComponentLinkSample->Set(const_cast<Component*>(value.Get()));\n        proxy->SetValuePtr(proxySample);\n        delete baseComponentLinkSample;\n    }\n\n    bool ComponentProperty::IsValueRevertable() const\n    {\n        for (auto& ptr : mValuesProxies)\n        {\n            if (ptr.second)\n            {\n                Ref<Component> value = GetProxy(ptr.first);\n                Ref<Component> proto = GetProxy(ptr.second);\n\n                if (value && value->GetPrototypeLink())\n                {\n                    if (value->GetPrototypeLink() != proto)\n                        return true;\n                }\n                else\n                {\n                    if (value != proto)\n                        return true;\n                }\n            }\n        }\n\n        return false;\n    }\n\n    void ComponentProperty::UpdateValueView()\n    {\n        if (mValuesDifferent)\n        {\n            mNameText->text = \"--\";\n            mBox->layer[\"caption\"]->transparency = 1.0f;\n        }\n        else\n        {\n            if (!mCommonValue)\n            {\n                mNameText->text = \"Null:\" + mComponentType->GetName();\n                mBox->layer[\"caption\"]->transparency = 0.5f;\n            }\n            else\n            {\n                mNameText->text = mCommonValue->GetActor()->GetName();\n                mBox->layer[\"caption\"]->transparency = 1.0f;\n            }\n        }\n    }\n\n    void ComponentProperty::RevertoToPrototype(const Ref<IAbstractValueProxy>& target, const Ref<IAbstractValueProxy>& source, \n                                               IObject* targetOwner)\n    {\n        if (!source || !targetOwner || targetOwner->GetType().IsBasedOn(TypeOf(Component)))\n            return;\n\n        Ref<Component> sourceComponent = GetProxy(source);\n        auto topSourceActor = sourceComponent->GetActor();\n        while (topSourceActor->GetParent())\n            topSourceActor = topSourceActor->GetParent().Lock();\n\n        auto actorOwner = Ref(dynamic_cast<Actor*>(targetOwner));\n\n        if (actorOwner)\n        {\n            auto topTargetActor = actorOwner;\n            while (topTargetActor->GetPrototypeLink() != topSourceActor && topTargetActor->GetParent())\n                topTargetActor = topTargetActor->GetParent().Lock();\n\n            auto sameToProtoSourceActor = topTargetActor->FindLinkedActor(sourceComponent->GetActor());\n\n            if (sameToProtoSourceActor)\n            {\n                auto sameToProtoSourceComponent = sameToProtoSourceActor->GetComponents().FindOrDefault(\n                    [&](auto& x) { return x->GetPrototypeLink() == sourceComponent; });\n\n                if (sameToProtoSourceComponent)\n                {\n                    SetProxy(target, sameToProtoSourceComponent);\n                    return;\n                }\n            }\n        }\n\n        if (sourceComponent->GetActor()->IsOnScene())\n            SetProxy(target, sourceComponent);\n    }\n\n    void ComponentProperty::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        mBox->SetState(\"hover\", true);\n    }\n\n    void ComponentProperty::OnCursorExit(const Input::Cursor& cursor)\n    {\n        mBox->SetState(\"hover\", false);\n    }\n\n    void ComponentProperty::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        o2UI.FocusWidget(mBox);\n\n        if (mCommonValue)\n        {\n            auto ownerActor = mCommonValue->GetActor();\n\n            if (ownerActor)\n            {\n                if (ownerActor->IsAsset())\n                    o2EditorAssets.ShowAssetIcon(o2Assets.GetAssetPath(ownerActor->GetAssetID()));\n                else if (ownerActor->IsOnScene())\n                    o2EditorTree.HighlightObjectTreeNode(ownerActor);\n            }\n        }\n    }\n\n    void ComponentProperty::OnKeyPressed(const Input::Key& key)\n    {\n        if (mBox && mBox->IsFocused() && (key == VK_DELETE || key == VK_BACK))\n            SetValueByUserAndComplete(nullptr);\n    }\n\n    void ComponentProperty::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (auto actorsTree = DynamicCast<SceneHierarchyTree>(group))\n            OnDroppedFromActorsTree(actorsTree);\n        else if (auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group))\n            OnDroppedFromAssetsScroll(assetsScroll);\n    }\n\n    void ComponentProperty::OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (auto actorsTree = DynamicCast<SceneHierarchyTree>(group))\n            OnDragEnterFromActorsTree(actorsTree);\n        else if (auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group))\n            OnDragEnterFromAssetsScroll(assetsScroll);\n    }\n\n    void ComponentProperty::OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (auto actorsTree = DynamicCast<SceneHierarchyTree>(group))\n            OnDragExitFromActorsTree(actorsTree);\n        else if (auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group))\n            OnDragExitFromAssetsScroll(assetsScroll);\n    }\n\n    void ComponentProperty::OnDroppedFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree)\n    {\n        if (actorsTree->GetSelectedObjects().Count() > 1)\n            return;\n\n        if (auto actor = DynamicCast<Actor>(actorsTree->GetSelectedObjects()[0]))\n            SetValueByUserAndComplete(actor->GetComponent(mComponentType));\n        else\n            return;\n\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->Focus();\n    }\n\n    void ComponentProperty::OnDragEnterFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree)\n    {\n        if (actorsTree->GetSelectedObjects().Count() != 1)\n            return;\n\n        auto actor = DynamicCast<Actor>(actorsTree->GetSelectedObjects()[0]);\n        if (!actor)\n            return;\n\n        if (!actor->GetComponent(mComponentType))\n            return;\n\n        o2Application.SetCursor(CursorType::Hand);\n        mBox->SetState(\"focused\", true);\n    }\n\n    void ComponentProperty::OnDragExitFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree)\n    {\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->SetState(\"focused\", false);\n    }\n\n    void ComponentProperty::OnDroppedFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll)\n    {\n        if (assetsIconsScroll->GetSelectedAssets().Count() > 1)\n            return;\n\n        auto actor = o2Scene.GetAssetActorByID(assetsIconsScroll->GetSelectedAssets().Last()->meta->ID());\n        SetValueByUserAndComplete(actor->GetComponent(mComponentType));\n\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->Focus();\n    }\n\n    void ComponentProperty::OnDragEnterFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll)\n    {\n        if (assetsIconsScroll->GetSelectedAssets().Count() > 1)\n            return;\n\n        auto actor = o2Scene.GetAssetActorByID(assetsIconsScroll->GetSelectedAssets().Last()->meta->ID());\n        if (actor)\n        {\n            auto component = actor->GetComponent(mComponentType);\n\n            if (!component)\n                return;\n\n            o2Application.SetCursor(CursorType::Hand);\n            mBox->SetState(\"focused\", true);\n        }\n    }\n\n    void ComponentProperty::OnDragExitFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll)\n    {\n        o2Application.SetCursor(CursorType::Arrow);\n        mBox->SetState(\"focused\", false);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::LinkRef<Component>>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ComponentProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::LinkRef<Component>>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ComponentProperty, Editor__ComponentProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ComponentProperty.h",
    "content": "#pragma once\n\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Utils/Editor/DragAndDrop.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nnamespace o2\n{\n    class Component;\n    class Text;\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SceneHierarchyTree);\n    FORWARD_CLASS_REF(AssetsIconsScrollArea);\n\n    // -----------------------------------\n    // Editor actor component property box\n    // -----------------------------------\n    class ComponentProperty: public TPropertyField<LinkRef<Component>>, public KeyboardEventsListener, public DragDropArea\n    {\n    public:\n        // Default constructor\n        ComponentProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        ComponentProperty(RefCounter* refCounter, const ComponentProperty& other);\n\n        // Copy operator\n        ComponentProperty& operator=(const ComponentProperty& other);\n\n        // Reverts value to prototype value\n        void Revert() override;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        SERIALIZABLE(ComponentProperty);\n        CLONEABLE_REF(ComponentProperty);\n\n    protected:\n        const Type* mComponentType = nullptr;  // Component value type\n\n        Ref<Widget> mBox;      // Edit box \n        Ref<Text>   mNameText; // Component name text\n\n    protected:\n        // Called when type specialized during setting value proxy\n        void OnTypeSpecialized(const Type& type) override;\n\n        // Returns value from proxy\n        LinkRef<Component> GetProxy(const Ref<IAbstractValueProxy>& proxy) const override;\n\n        // Sets value to proxy\n        void SetProxy(const Ref<IAbstractValueProxy>& proxy, const LinkRef<Component>& value) override;\n\n        // Checks is value can be reverted\n        bool IsValueRevertable() const override;\n\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when some selectable listeners was dropped to this\n        void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was entered to this area\n        void OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was exited from this area\n        void OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Reverts target value to source\n        void RevertoToPrototype(const Ref<IAbstractValueProxy>& target, const Ref<IAbstractValueProxy>& source, IObject* targetOwner);\n\n        // Called when actors tree nodes was dragged and dropped to this\n        void OnDroppedFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree);\n\n        // Called when actors tree nodes was dragged and entered to this\n        void OnDragEnterFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree);\n\n        // Called when actors tree nodes was dragged and exited from this\n        void OnDragExitFromActorsTree(const Ref<SceneHierarchyTree>& actorsTree);\n\n        // Called when assets scroll icons was dragged and dropped to this\n        void OnDroppedFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll);\n\n        // Called when assets scroll icons was dragged and entered to this\n        void OnDragEnterFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll);\n\n        // Called when assets scroll icons was dragged and exited from this\n        void OnDragExitFromAssetsScroll(const Ref<AssetsIconsScrollArea>& assetsIconsScroll); \n        \n        REF_COUNTERABLE_IMPL(TPropertyField<LinkRef<Component>>);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ComponentProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<LinkRef<Component>>);\n    BASE_CLASS(o2::KeyboardEventsListener);\n    BASE_CLASS(o2::DragDropArea);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ComponentProperty)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mComponentType);\n    FIELD().PROTECTED().NAME(mBox);\n    FIELD().PROTECTED().NAME(mNameText);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ComponentProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ComponentProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Revert);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTypeSpecialized, const Type&);\n    FUNCTION().PROTECTED().SIGNATURE(LinkRef<Component>, GetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetProxy, const Ref<IAbstractValueProxy>&, const LinkRef<Component>&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsValueRevertable);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDropped, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnter, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExit, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, RevertoToPrototype, const Ref<IAbstractValueProxy>&, const Ref<IAbstractValueProxy>&, IObject*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDroppedFromActorsTree, const Ref<SceneHierarchyTree>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnterFromActorsTree, const Ref<SceneHierarchyTree>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExitFromActorsTree, const Ref<SceneHierarchyTree>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDroppedFromAssetsScroll, const Ref<AssetsIconsScrollArea>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnterFromAssetsScroll, const Ref<AssetsIconsScrollArea>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExitFromAssetsScroll, const Ref<AssetsIconsScrollArea>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/CurveProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"CurveProperty.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2Editor/Dialogs/CurveEditorDlg.h\"\n#include \"o2Editor/UI/CurvePreview.h\"\n\nnamespace Editor\n{\n    CurveProperty::CurveProperty(RefCounter* refCounter):\n        TPropertyField<Ref<Curve>>(refCounter)\n    {}\n\n    CurveProperty::CurveProperty(RefCounter* refCounter, const CurveProperty& other) :\n        TPropertyField<Ref<Curve>>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    CurveProperty& CurveProperty::operator=(const CurveProperty& other)\n    {\n        TPropertyField<Ref<Curve>>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void CurveProperty::InitializeControls()\n    {\n        mEditBox = GetChildWidget(\"container/layout/box\");\n        if (mEditBox)\n        {\n            mPreviewImage = mmake<CurvePreview>();\n            *mPreviewImage->layout = WidgetLayout::BothStretch(1, 1, 1, 1);\n            mPreviewImage->SetCurve(mCommonValue);\n\n            mClickArea = mmake<CursorEventsArea>();\n\n            mEditBox->layout->minHeight = 10;\n            mEditBox->onDraw += [&]() { mClickArea->OnDrawn(); };\n            mEditBox->AddChild(mPreviewImage);\n\n            mClickArea->isUnderPoint = [&](const Vec2F& point) { return mEditBox->IsUnderPoint(point); };\n            mClickArea->onCursorReleased = [&](const Input::Cursor& cursor) { if (mEditBox->IsUnderPoint(cursor.position)) OnClicked(); };\n        }\n    }\n\n    void CurveProperty::OnValueChanged(bool byUser)\n    {\n        for (auto& ptr : mValuesProxies)\n            SetProxy(ptr.first, mCommonValue);\n\n        if (mCommonValue)\n            mPreviewImage->SetCurve(mCommonValue);\n    }\n\n    void CurveProperty::OnClicked()\n    {\n        StoreValues(mBeforeChangeValues);\n\n        if (mCommonValue == nullptr)\n            SetValue(mmake<Curve>());\n\n\t\tCurveEditorDlg::Show([this]() { OnValueChanged(true); }, [this]() { CheckValueChangeCompleted(); });\n\n        CurveEditorDlg::RemoveAllEditingCurves();\n        CurveEditorDlg::AddEditingCurve(\"property\", mCommonValue, Color4(44, 62, 80));\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::Ref<o2::Curve>>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::CurveProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::Ref<o2::Curve>>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::CurveProperty, Editor__CurveProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/CurveProperty.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Utils/Math/Curve.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(CurvePreview);\n\n    // ------------------------------\n    // Editor curve property edit box\n    // ------------------------------\n    class CurveProperty: public TPropertyField<Ref<Curve>>\n    {\n    public:\n        // Default constructor\n        CurveProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        CurveProperty(RefCounter* refCounter, const CurveProperty& other);\n\n        // Copy operator\n        CurveProperty& operator=(const CurveProperty& other);\n\n        SERIALIZABLE(CurveProperty);\n        CLONEABLE_REF(CurveProperty);\n\n    protected:\n        Ref<Widget>           mEditBox;      // Edit box \n        Ref<CurvePreview>     mPreviewImage; // Curve preview image\n        Ref<CursorEventsArea> mClickArea;    // Box click area\n\n    protected:\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Called when common curve changed in curve edit dialog, tells to drawing content\n        void OnValueChanged(bool byUser) override;\n\n        // Called when box pressed and shows color picking dialog\n        void OnClicked();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::CurveProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<Ref<Curve>>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CurveProperty)\n{\n    FIELD().PROTECTED().NAME(mEditBox);\n    FIELD().PROTECTED().NAME(mPreviewImage);\n    FIELD().PROTECTED().NAME(mClickArea);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CurveProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const CurveProperty&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnValueChanged, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClicked);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/EnumMaskProperty.h",
    "content": "#pragma once\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/EnumProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"EnumProperty.h\"\n\n#include \"o2/Scene/UI/Widgets/DropDown.h\"\n\nnamespace Editor\n{\n    EnumProperty::EnumProperty(RefCounter* refCounter):\n        TPropertyField<int>(refCounter)\n    {}\n\n    EnumProperty::EnumProperty(RefCounter* refCounter, const EnumProperty& other) :\n        TPropertyField<int>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    EnumProperty& EnumProperty::operator=(const EnumProperty& other)\n    {\n        TPropertyField<int>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void EnumProperty::InitializeControls()\n    {\n        mDropDown = FindChildByType<DropDown>();\n        if (mDropDown)\n        {\n            mDropDown->onSelectedText = THIS_FUNC(OnSelectedItem);\n            mDropDown->SetState(\"undefined\", true);\n        }\n    }\n\n    const Type* EnumProperty::GetValueType() const\n    {\n        return mEnumType;\n    }\n\n    void EnumProperty::SpecializeType(const Type* type)\n    {\n        if (type->GetUsage() == Type::Usage::Property)\n            mEnumType = dynamic_cast<const EnumType*>(((const PropertyType*)type)->GetValueType());\n        else\n            mEnumType = dynamic_cast<const EnumType*>(type);\n\n        if (mEnumType)\n        {\n            mEntries = mEnumType->GetEntries();\n\n            for (auto& kv : mEntries)\n                mDropDown->AddItem(kv.second);\n        }\n    }\n\n    const Type* EnumProperty::GetValueTypeStatic()\n    {\n        return nullptr;\n    }\n\n    void EnumProperty::UpdateValueView()\n    {\n        mUpdatingValue = true;\n\n        if (mValuesDifferent)\n        {\n            mDropDown->value = (mEntries).Get(mCommonValue);\n            mDropDown->SetState(\"undefined\", true);\n        }\n        else\n        {\n            mDropDown->value = (mEntries).Get(mCommonValue);\n            mDropDown->SetState(\"undefined\", false);\n        }\n\n        mUpdatingValue = false;\n    }\n\n    void EnumProperty::OnSelectedItem(const WString& name)\n    {\n        if (mUpdatingValue)\n            return;\n\n        SetValueByUserAndComplete(mEntries.FindValue(name).first);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::EnumProperty>);\n// --- META ---\n\nDECLARE_CLASS(Editor::EnumProperty, Editor__EnumProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/EnumProperty.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nnamespace o2\n{\n    class DropDown;\n}\n\nnamespace Editor\n{\n    // -----------------------------\n    // Editor enum property dropdown\n    // -----------------------------\n    class EnumProperty: public TPropertyField<int>\n    {\n    public:\n        // Default constructor\n        EnumProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        EnumProperty(RefCounter* refCounter, const EnumProperty& other);\n\n        // Copy operator\n        EnumProperty& operator=(const EnumProperty& other);\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Specializes field type\n        void SpecializeType(const Type* type);\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        SERIALIZABLE(EnumProperty);\n        CLONEABLE_REF(EnumProperty);\n\n    protected:                                                     \n        const EnumType*  mEnumType = nullptr; // Type of enumeration                                                                  \n        Map<int, String> mEntries;            // Enum entries\n\n        Ref<DropDown> mDropDown;              // Layer name dropdown\n        bool          mUpdatingValue = false; // Is dropdown value updating and we don't we don't check selection\n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Selects item\n        void OnSelectedItem(const WString& name);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::EnumProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<int>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::EnumProperty)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mEnumType);\n    FIELD().PROTECTED().NAME(mEntries);\n    FIELD().PROTECTED().NAME(mDropDown);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mUpdatingValue);\n}\nEND_META;\nCLASS_METHODS_META(Editor::EnumProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const EnumProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SpecializeType, const Type*);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectedItem, const WString&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/FloatProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"FloatProperty.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Utils/Editor/Attributes/RangeAttribute.h\"\n\n\nnamespace Editor\n{\n    FloatProperty::FloatProperty(RefCounter* refCounter):\n        TPropertyField<float>(refCounter)\n    {}\n\n    FloatProperty::FloatProperty(RefCounter* refCounter, const FloatProperty& other) :\n        TPropertyField<float>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    const Ref<EditBox>& FloatProperty::GetEditBox() const\n    {\n        return mEditBox;\n    }\n\n    void FloatProperty::SetFieldInfo(const FieldInfo* fieldInfo)\n    {\n        TPropertyField<float>::SetFieldInfo(fieldInfo);\n\n        if (auto rangeAttribute = fieldInfo->GetAttribute<RangeAttribute>())\n            SetRange(rangeAttribute->minRange, rangeAttribute->maxRange);\n        else\n            DisableRange();\n    }\n\n    void FloatProperty::SetRange(float minRange, float maxRange)\n    {\n        mUsesRange = true;\n        mMinRange = minRange;\n        mMaxRange = maxRange;\n\n        mProgress->enabledForcibly = true;\n        mProgress->SetMinValue(mMinRange);\n        mProgress->SetMaxValue(mMaxRange);\n\n        mEditBox->layout->maxWidth = 65;\n    }\n\n    void FloatProperty::DisableRange()\n    {\n        mUsesRange = false;\n        mProgress->enabledForcibly = false;\n        mEditBox->layout->maxWidth = 10000;\n    }\n\n    FloatProperty& FloatProperty::operator=(const FloatProperty& other)\n    {\n        TPropertyField<float>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void FloatProperty::InitializeControls()\n    {\n        mEditBox = FindChildByType<EditBox>();\n        if (mEditBox)\n        {\n            mEditBox->onChangeCompleted = THIS_FUNC(OnEdited);\n            mEditBox->text = \"--\";\n            mEditBox->SetFilterFloat();\n\n            auto handleLayer = mEditBox->FindLayer(\"arrows\");\n            if (handleLayer)\n            {\n                mDragHangle = mmake<CursorEventsArea>();\n                mEditBox->onDraw += [&]() { mDragHangle->OnDrawn(); };\n\n                mDragHangle->cursorType = CursorType::SizeNS;\n                mDragHangle->isUnderPoint = [=](const Vec2F& point) { return handleLayer->IsUnderPoint(point); };\n                mDragHangle->onMoved = THIS_FUNC(OnDragHandleMoved);\n                mDragHangle->onCursorPressed = THIS_FUNC(OnMoveHandlePressed);\n                mDragHangle->onCursorReleased = THIS_FUNC(OnMoveHandleReleased);\n            }\n        }\n\n        mProgress = FindChildByType<HorizontalProgress>();\n        if (mProgress)\n        {\n            mProgress->onChangeByUser = THIS_FUNC(OnEditedValue);\n            mProgress->enabledForcibly = false;\n        }\n    }\n\n    void FloatProperty::UpdateValueView()\n    {\n        if (!mEditBox)\n            return;\n\n        if (mValuesDifferent)\n            mEditBox->text = \"--\";\n        else\n            mEditBox->text = (WString)mCommonValue;\n\n        if (mUsesRange)\n            mProgress->value = mCommonValue;\n    }\n\n    void FloatProperty::OnEdited(const WString& data)\n    {\n        if (mValuesDifferent && data == \"--\")\n            return;\n\n        float value = (float)data;\n\n        if (mUsesRange)\n            mProgress->value = value;\n\n        SetValueByUserAndComplete(value);\n    }\n\n    void FloatProperty::OnEditedValue(float value)\n    {\n        if (mValuesDifferent)\n            mEditBox->text = \"--\";\n        else\n            mEditBox->text = (WString)mCommonValue;\n\n        SetValueByUserAndComplete(value);\n    }\n\n    void FloatProperty::OnDragHandleMoved(const Input::Cursor& cursor)\n    {\n        float multiplier = Math::Abs(cursor.delta.y) < 20 ? 0.01f : 0.05f;\n        SetValue(mCommonValue + cursor.delta.y*multiplier, true);\n    }\n\n    void FloatProperty::OnKeyReleased(const Input::Key& key)\n    {\n        if (!mEditBox)\n            return;\n\n        if (mEditBox && !mEditBox->IsFocused())\n            return;\n\n        if (key == VK_UP)\n        {\n            SetValueByUserAndComplete(Math::Ceil(mCommonValue + 0.01f));\n            mEditBox->SelectAll();\n        }\n\n        if (key == VK_DOWN)\n        {\n            SetValueByUserAndComplete(Math::Floor(mCommonValue - 0.01f));\n            mEditBox->SelectAll();\n        }\n    }\n\n    void FloatProperty::OnMoveHandlePressed(const Input::Cursor& cursor)\n    {\n        BeginUserChanging();\n        o2Application.SetCursorInfiniteMode(true);\n    }\n\n    void FloatProperty::OnMoveHandleReleased(const Input::Cursor& cursor)\n    {\n        o2Application.SetCursorInfiniteMode(false);\n\t\tEndUserChanging();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<float>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::FloatProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<float>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::FloatProperty, Editor__FloatProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/FloatProperty.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class EditBox;\n}\n\nnamespace Editor\n{\n    // ------------------------------\n    // Editor float property edit box\n    // ------------------------------\n    class FloatProperty: public TPropertyField<float>, public KeyboardEventsListener\n    {\n    public:\n        // Default constructor\n        FloatProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        FloatProperty(RefCounter* refCounter, const FloatProperty& other);\n\n        // Copy operator\n        FloatProperty& operator=(const FloatProperty& other);\n\n        // Returns edit box\n        const Ref<EditBox>& GetEditBox() const;\n\n        // Specializes field info, checks range attribute\n        void SetFieldInfo(const FieldInfo* fieldInfo) override;\n\n        // Enables range mode and sets min and max\n        void SetRange(float minRange, float maxRange);\n\n        // Disables range mode\n        void DisableRange();\n\n        SERIALIZABLE(FloatProperty);\n        CLONEABLE_REF(FloatProperty);\n\n    protected:\n        Ref<EditBox>          mEditBox;    // Edit box for regular values\n        Ref<CursorEventsArea> mDragHangle; // Value changing drag handle\n\n        Ref<HorizontalProgress> mProgress;          // Progress bar for range values\n        bool                    mUsesRange = false; // Is value used with range\n        float                   mMinRange = 0.0f;   // Min range value\n        float                   mMaxRange = 1.0f;   // Max range value\n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Called when key was released\n        void OnKeyReleased(const Input::Key& key) override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Edit box change event\n        void OnEdited(const WString& data);\n\n        // On value changed by progress\n        void OnEditedValue(float value);\n\n        // Called when drag handle was moved and changes the property value\n        void OnDragHandleMoved(const Input::Cursor& cursor);\n\n        // Called when change value move handle pressed, sets cursor infinite mode and stores value to data\n        void OnMoveHandlePressed(const Input::Cursor& cursor);\n\n        // Called when change value move handle  released, turns off cursor infinite mode, \n        // checks value was changed then calls value change completed event\n        void OnMoveHandleReleased(const Input::Cursor& cursor);\n\n        REF_COUNTERABLE_IMPL(TPropertyField<float>);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::FloatProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<float>);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::FloatProperty)\n{\n    FIELD().PROTECTED().NAME(mEditBox);\n    FIELD().PROTECTED().NAME(mDragHangle);\n    FIELD().PROTECTED().NAME(mProgress);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mUsesRange);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mMinRange);\n    FIELD().PROTECTED().DEFAULT_VALUE(1.0f).NAME(mMaxRange);\n}\nEND_META;\nCLASS_METHODS_META(Editor::FloatProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const FloatProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<EditBox>&, GetEditBox);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFieldInfo, const FieldInfo*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRange, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, DisableRange);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEdited, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditedValue, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragHandleMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMoveHandlePressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMoveHandleReleased, const Input::Cursor&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/FunctionProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"FunctionProperty.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/Attributes/NoHeaderAttribute.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/StringUtils.h\"\n#include \"o2Editor/Properties/Basic/ActorProperty.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include <o2/Scene/Components/ScriptableComponent.h>\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FunctionProperty::FunctionProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {\n        InitializeControls();\n    }\n\n    FunctionProperty::FunctionProperty(RefCounter* refCounter, const FunctionProperty& other):\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    FunctionProperty& FunctionProperty::operator=(const FunctionProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void FunctionProperty::OnFreeProperty()\n    {\n    }\n\n    void FunctionProperty::InitializeControls()\n    {\n        // Spoiler\n        mSpoiler = FindChildByType<Spoiler>(false);\n\n        if (!mSpoiler)\n        {\n            mSpoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n            AddChild(mSpoiler);\n        }\n\n        if (mSpoiler)\n            mSpoiler->onExpand = THIS_FUNC(OnExpand);\n\n        mSpoiler->borderTop = 5;\n        mSpoiler->AddLayer(\"func icon\", mmake<Sprite>(\"ui/function_icon.png\"), Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(6, 0)));\n        mSpoiler->GetLayer(\"caption\")->layout.offsetLeft = 24;\n\n        mHeaderContainer = mmake<HorizontalLayout>();\n        *mHeaderContainer->layout = WidgetLayout::HorStretch(VerAlign::Top, 100, 0, 20, 0);\n        mHeaderContainer->baseCorner = BaseCorner::Right;\n        mHeaderContainer->expandHeight = false;\n        mHeaderContainer->SetInternalParent(mSpoiler, false);\n\n        // Add button\n        mAddButton = mSpoiler->FindChildByTypeAndName<Button>(\"add button\");\n        if (!mAddButton)\n        {\n            mAddButton = o2UI.CreateWidget<Button>(\"add small\");\n            mAddButton->name = \"add button\";\n            mAddButton->layout->maxWidth = 20;\n            mAddButton->layout->minHeight = 20;\n            mAddButton->onClick = THIS_FUNC(OnAddPressed);\n\n            mHeaderContainer->AddChild(mAddButton);\n        }\n\n        // Widget sample\n        mWidgetSample = o2UI.CreateHorLayout();\n        mWidgetSample->layout->minHeight = 20;\n        mWidgetSample->expandHeight = true;\n        mWidgetSample->expandWidth = true;\n        mWidgetSample->fitByChildren = false;\n\n        auto sampleCaption = o2UI.CreateLabel(\"\");\n        sampleCaption->name = \"caption\";\n        sampleCaption->layout->maxWidth = 50.0f;\n        sampleCaption->horAlign = HorAlign::Left;\n        mWidgetSample->AddChild(sampleCaption);\n\n        auto controllersContainerWrapper = mmake<Widget>();\n        *controllersContainerWrapper->layout = WidgetLayout::BothStretch();\n        controllersContainerWrapper->name = \"controls\";\n        mWidgetSample->AddChild(controllersContainerWrapper);\n\n        auto controlsContainer = o2UI.CreateHorLayout();\n        *controlsContainer->layout = WidgetLayout::BothStretch();\n        controlsContainer->expandHeight = true;\n        controlsContainer->expandWidth = true;\n        controlsContainer->spacing = 5.0f;\n        controlsContainer->name = \"layout\";\n        controllersContainerWrapper->AddChild(controlsContainer);\n\n        auto sampleRefProperty = o2UI.CreateWidget<ActorProperty>();\n        sampleRefProperty->name = \"actor ref\";\n        controlsContainer->AddChild(sampleRefProperty);\n\n        auto sampleFuncDropdown = o2UI.CreateCustomDropdown();\n        sampleFuncDropdown->name = \"drop down\";\n        sampleFuncDropdown->SetMaxListSizeInItems(15);\n        sampleFuncDropdown->GetItemSample()->layout->minHeight = 20;\n        controlsContainer->AddChild(sampleFuncDropdown);\n\n        auto sampleRemoveBtn = o2UI.CreateWidget<Button>(\"remove small\");\n        sampleRemoveBtn->name = \"remove btn\";\n        sampleRemoveBtn->layout->maxWidth = 20;\n        controlsContainer->AddChild(sampleRemoveBtn);\n\n        // Other\n        expandHeight = true;\n        expandWidth = true;\n        fitByChildren = true;\n    }\n\n    void FunctionProperty::OnExpand()\n    {\n        Refresh();\n    }\n\n    FunctionProperty::~FunctionProperty()\n    {}\n\n    void FunctionProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        mValuesProxies = targets;\n        Refresh();\n    }\n\n    void FunctionProperty::RefreshInstances()\n    {\n        mInstances.Clear();\n\n        int proxyIdx = 0;\n        for (auto& valueProxy : mValuesProxies)\n        {\n            auto funcProxy = DynamicCast<PointerValueProxy<AbstractFunction>>(valueProxy.first);\n            auto funcProxyProto = DynamicCast<PointerValueProxy<AbstractFunction>>(valueProxy.first);\n\n            if (!funcProxy)\n                continue;\n\n            int idx = 0;\n            funcProxy->GetValuePointer()->ForEachAbstract(\n                Function<void(const IAbstractFunction*)>(\n                    [&](const IAbstractFunction* f)\n            {\n                if (auto actorSubscription = dynamic_cast<const IActorSubscription*>(f))\n                {\n                    if (idx > mInstances.Count() - 1)\n                        mInstances.Add(mmake<FunctionInstance>());\n\n                    mInstances[idx++]->values.Add({ const_cast<IActorSubscription*>(actorSubscription), nullptr });\n                }\n            }));\n\n            if (funcProxyProto)\n            {\n                idx = 0;\n                funcProxyProto->GetValuePointer()->ForEachAbstract(\n                    Function<void(const IAbstractFunction*)>(\n                        [&](const IAbstractFunction* f)\n                {\n                    if (auto actorSubscription = dynamic_cast<const IActorSubscription*>(f))\n                    {\n                        if (idx < mInstances.Count() && proxyIdx < mInstances[idx]->values.Count())\n                            mInstances[idx]->values[proxyIdx].second = const_cast<IActorSubscription*>(actorSubscription);\n                    }\n                }));\n            }\n\n            proxyIdx++;\n        }\n    }\n\n    void FunctionProperty::Refresh(bool forcible /*= false*/)\n    {\n        PushEditorScopeOnStack scope;\n\n        auto prevInstances = mInstances;\n        RefreshInstances();\n\n        mSpoiler->RemoveAllChildren();\n\n        int idx = 0;\n        for (auto& instance : mInstances)\n        {\n            auto prevInstanceIdx = prevInstances.IndexOf([&](auto& x) { return x->values == instance->values; });\n            if (prevInstanceIdx >= 0)\n            {\n                instance = prevInstances[prevInstanceIdx];\n                prevInstances.RemoveAt(prevInstanceIdx);\n            }\n            else\n            {\n                auto widget = CreateWidget();\n\n                instance->layout = widget->layout;\n                instance->refProperty = widget->refProperty;\n                instance->removeBtn = widget->removeBtn;\n                instance->caption = widget->caption;\n                instance->funcDropDown = widget->funcDropDown;\n            }\n\n            instance->refProperty->SelectValueAndPrototypePointers<LinkRef<Actor>, IActorSubscription>(\n                instance->values.Convert<IActorSubscription*>([](auto p) { return p.first; }),\n                instance->values.Convert<IActorSubscription*>([](auto p) { return p.second; }),\n                [](IActorSubscription* s)\n            {\n                if (!s->actorRef && s->componentRef)\n                    s->actorRef = s->componentRef->GetActor();\n\n                return &s->actorRef;\n            }\n            );\n\n            instance->refProperty->onChangeCompleted =\n                [=](const String&, const Vector<DataDocument>&, const Vector<DataDocument>&)\n            {\n                instance->UpdateFunctionsList(instance->refProperty->GetCommonValue(),\n                                              !instance->values.IsEmpty() ? instance->values[0].first->componentRef : LinkRef<Component>(),\n                                              !instance->values.IsEmpty() ? instance->values[0].first->method : String());\n            };\n\n            instance->funcDropDown->onSelectedPos = [=](int idx) { instance->OnFunctionSelected(idx); };\n\n            instance->removeBtn->onClick = [=]() { OnRemovePressed(instance); };\n\n            instance->UpdateFunctionsList(instance->refProperty->GetCommonValue(),\n                                          !instance->values.IsEmpty() ? instance->values[0].first->componentRef : LinkRef<Component>(),\n                                          !instance->values.IsEmpty() ? instance->values[0].first->method : String());\n\n            instance->caption->text = \"#\" + (String)idx;\n            mSpoiler->AddChild(instance->layout);\n            idx++;\n        }\n    }\n\n    void FunctionProperty::OnAddPressed()\n    {\n        for (auto& valueProxy : mValuesProxies)\n        {\n            if (auto funcProxy = DynamicCast<PointerValueProxy<AbstractFunction>>(valueProxy.first))\n                funcProxy->GetValuePointer()->AddActorSubscription();\n        }\n\n        Expand();\n        Refresh();\n    }\n\n    void FunctionProperty::OnRemovePressed(const Ref<FunctionInstance>& instance)\n    {\n        for (auto& valueProxy : mValuesProxies)\n        {\n            if (auto funcProxy = DynamicCast<PointerValueProxy<AbstractFunction>>(valueProxy.first))\n            {\n                for (auto& value : instance->values)\n                    funcProxy->GetValuePointer()->RemoveFunction(dynamic_cast<IAbstractFunction*>(value.first));\n            }\n        }\n\n        Refresh();\n    }\n\n    Ref<FunctionProperty::FunctionInstance> FunctionProperty::CreateWidget()\n    {\n        auto res = mmake<FunctionInstance>();\n\n        if (mWidgetsBuffer.IsEmpty())\n            res->layout = mWidgetSample->CloneAsRef<HorizontalLayout>();\n        else\n            res->layout = mWidgetsBuffer.PopBack();\n\n        res->caption = res->layout->GetChildByType<Label>(\"caption\");\n        res->funcDropDown = res->layout->GetChildByType<CustomDropDown>(\"controls/layout/drop down\");\n        res->refProperty = res->layout->GetChildByType<ActorProperty>(\"controls/layout/actor ref\");\n        res->removeBtn = res->layout->GetChildByType<Button>(\"controls/layout/remove btn\");\n\n        return res;\n    }\n\n    void FunctionProperty::FunctionInstance::UpdateFunctionsList(const Ref<Actor>& actor, const Ref<Component>& selectedComponent,\n                                                                 const String& selectedMethod)\n    {\n        funcDropDown->RemoveAllItems();\n        functionsDropdownMap.Clear();\n\n        if (!actor)\n            return;\n\n        int selectedIdx = -1;\n\n        auto collectFunctions = [&](const String& typeName, const String& iconName, const Vector<String>& functionsList, \n                                    const Ref<Component>& comp)\n        {\n            auto typeItem = funcDropDown->AddItem();\n            functionsDropdownMap.Add({ nullptr, \"\" });\n\n            typeItem->AddLayer(\"back\", mmake<Sprite>(Color4(0, 0, 0, 0)))->transparency = 0.05f;\n\n            auto icon = o2UI.CreateImage(iconName);\n            *icon->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20));\n            icon->GetImage()->color = Color4(0, 156, 141, 255);\n            typeItem->AddChild(icon);\n\n            auto text = o2UI.CreateLabel(typeName);\n            *text->layout = WidgetLayout::BothStretch(20, 0, 0, 0);\n            text->horAlign = HorAlign::Left;\n            typeItem->AddChild(text);\n\n            for (auto& funcName : functionsList)\n            {\n                auto funcItem = funcDropDown->AddItem();\n\n                auto text = o2UI.CreateLabel(funcName);\n                *text->layout = WidgetLayout::BothStretch();\n                text->horAlign = HorAlign::Left;\n                text->transparency = 0.8f;\n                funcItem->AddChild(text);\n\n                functionsDropdownMap.Add({ comp, funcName });\n\n                if (comp == selectedComponent.Get() && selectedMethod == funcName)\n                    selectedIdx = funcDropDown->GetItemsCount() - 1;\n            }\n        };\n\n        auto collectFunctionsByType = [&](const String& typeName, const String& iconName, const Type& type, \n                                          const Ref<Component>& comp)\n        {\n            Vector<String> functionsList;\n\n            for (auto& funcInfo : type.GetFunctions())\n            {\n                if (funcInfo->GetProtectionSection() == ProtectSection::Public && funcInfo->GetParameters().IsEmpty() &&\n                    funcInfo->GetReturnType() == &TypeOf(void))\n                {\n                    functionsList.Add(funcInfo->GetName());\n                }\n            }\n\n            collectFunctions(typeName, iconName, functionsList, comp);\n        };\n\n        auto getTypeName = [](const Type& type)\n        {\n            String typeName = type.InvokeStatic<String>(\"GetName\");\n            if (typeName.IsEmpty())\n                typeName = GetSmartName(type.GetName());\n\n            return typeName;\n        };\n\n        auto getIconName = [](const Type& type)\n        {\n            String iconName = type.InvokeStatic<String>(\"GetIcon\");\n            if (iconName.IsEmpty())\n                iconName = \"ui/UI4_component_icon.png\";\n\n            return iconName;\n        };\n\n        auto& actorType = actor->GetType();\n        collectFunctionsByType(getTypeName(actorType), getIconName(actorType), actorType, nullptr);\n\n        for (auto& component : actor->GetComponents())\n        {\n            auto& componentType = component->GetType();\n            if (auto scriptingComponent = DynamicCast<ScriptableComponent>(component))\n            {\n                Vector<String> functionsList;\n\n                static Vector<String> hiddenFunctions = { \n                    String(\"constructor\"), String(\"OnStart\"), String(\"Update\"), String(\"toString\"), String(\"valueOf\"), \n                    String(\"toLocaleString\"), String(\"hasOwnProperty\"), String(\"isPrototypeOf\"), String(\"propertyIsEnumerable\") };\n\n                ScriptValue instance = scriptingComponent->GetInstance();\n                ScriptValue properties = instance.GetPropertyNames();\n                int propsCount = properties.GetLength();\n                for (int pi = 0; pi < propsCount; pi++)\n                {\n                    ScriptValue prop = properties.GetElement(pi);\n                    ScriptValue propValue = instance.GetProperty(prop);\n                    if (propValue.IsFunction())\n                    {\n                        String functionName = prop.ToString();\n                        bool hidden = hiddenFunctions.Contains(functionName);\n                        if (!functionName.StartsWith(\"_\") && !hidden)\n                            functionsList.Add(functionName);\n                    }\n                }\n\n                collectFunctions(getTypeName(componentType), getIconName(componentType), functionsList, component);\n            }\n            else\n            {\n                collectFunctionsByType(getTypeName(componentType), getIconName(componentType), componentType, component);\n            }\n        }\n\n        if (funcDropDown->GetSelectedItemPosition() != selectedIdx)\n            funcDropDown->SelectItemAt(selectedIdx);\n    }\n\n    void FunctionProperty::FunctionInstance::OnFunctionSelected(int idx)\n    {\n        for (auto& value : values)\n        {\n            value.first->componentRef = functionsDropdownMap[idx].first;\n            value.first->method = functionsDropdownMap[idx].second;\n        }\n    }\n\n    const Type* FunctionProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* FunctionProperty::GetValueTypeStatic()\n    {\n        return FunctionType::serializableType;\n    }\n\n    void FunctionProperty::SetFieldInfo(const FieldInfo* fieldInfo)\n    {\n        IPropertyField::SetFieldInfo(fieldInfo);\n\n        if (fieldInfo)\n        {\n            if (fieldInfo->HasAttribute<ExpandedByDefaultAttribute>())\n                mSpoiler->Expand();\n        }\n    }\n\n    void FunctionProperty::SetCaption(const WString& text)\n    {\n        mSpoiler->SetCaption(text);\n\n        auto spoilerCaptionLayer = mSpoiler->GetLayerDrawable<Text>(\"caption\");\n        if (spoilerCaptionLayer)\n        {\n            Vec2F captionSize = Text::GetTextSize(text, spoilerCaptionLayer->GetFont(), spoilerCaptionLayer->GetFontHeight());\n            *mHeaderContainer->layout = WidgetLayout::HorStretch(VerAlign::Top, captionSize.x + 20.0f, 0, 17, 0);\n        }\n    }\n\n    WString FunctionProperty::GetCaption() const\n    {\n        return mSpoiler->GetCaption();\n    }\n\n    Ref<Button> FunctionProperty::GetRemoveButton()\n    {\n        if (!mRemoveBtn)\n        {\n            mRemoveBtn = o2UI.CreateWidget<Button>(\"remove small\");\n            *mRemoveBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(2, 0));\n            AddInternalWidget(mRemoveBtn);\n        }\n\n        return mRemoveBtn;\n    }\n\n    void FunctionProperty::Expand()\n    {\n        SetExpanded(true);\n    }\n\n    void FunctionProperty::Collapse()\n    {\n        SetExpanded(false);\n    }\n\n    void FunctionProperty::SetExpanded(bool expanded)\n    {\n        mSpoiler->SetExpanded(expanded);\n    }\n\n    bool FunctionProperty::IsExpanded() const\n    {\n        return mSpoiler->IsExpanded();\n    }\n\n    void FunctionProperty::OnPropertyChanged(const String& path, const Vector<DataDocument>& before,\n                                             const Vector<DataDocument>& after)\n    {\n        //         for (auto& pair : mTargetObjects)\n        //             pair.first.SetValue();\n\n        onChangeCompleted(path, before, after);\n    }\n\n    bool FunctionProperty::FunctionInstance::operator==(const FunctionInstance& other) const\n    {\n        return values == other.values;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::FunctionProperty>);\n// --- META ---\n\nDECLARE_CLASS(Editor::FunctionProperty, Editor__FunctionProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/FunctionProperty.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Property.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IObjectPropertiesViewer);\n    FORWARD_CLASS_REF(ActorProperty);\n\n    // ------------------------\n    // Editor function property\n    // ------------------------\n    class FunctionProperty : public IPropertyField\n    {\n    public:\n        // Default constructor\n        FunctionProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        FunctionProperty(RefCounter* refCounter, const FunctionProperty& other);\n\n        // Copy operator\n        FunctionProperty& operator=(const FunctionProperty& other);\n\n        // Destructor\n        ~FunctionProperty();\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        // Specializes field info, processing attributes\n        void SetFieldInfo(const FieldInfo* fieldInfo) override;\n\n        // Sets property caption\n        void SetCaption(const WString& text) override;\n\n        // Returns property caption\n        WString GetCaption() const override;\n\n        // Adds remove button\n        Ref<Button> GetRemoveButton() override;\n\n        // Expands property fields\n        void Expand();\n\n        // Collapses property field\n        void Collapse();\n\n        // Sets properties expanding\n        void SetExpanded(bool expanded);\n\n        // Returns is properties expanded\n        bool IsExpanded() const;\n\n        SERIALIZABLE(FunctionProperty);\n        CLONEABLE_REF(FunctionProperty);\n\n    protected:\n        struct FunctionInstance: public RefCounterable\n        {\n            Ref<HorizontalLayout> layout;\n            Ref<Label>            caption;\n            Ref<ActorProperty>    refProperty;\n            Ref<CustomDropDown>   funcDropDown;\n            Ref<Button>           removeBtn;\n\n            Vector<Pair<IActorSubscription*, IActorSubscription*>> values;\n            Vector<Pair<Ref<Component>, String>> functionsDropdownMap;\n\n        public:\n            // Called when an actor is selected, updates the functions list\n            void UpdateFunctionsList(const Ref<Actor>& actor, const Ref<Component>& selectedComponent, const String& selectedMethod);\n\n            // Called when a function is selected, remembers the link to the component and the name from the list of functionsDropdownMap\n            void OnFunctionSelected(int idx);\n\n            bool operator==(const FunctionInstance& other) const;\n        };\n\n        Ref<Spoiler>          mSpoiler;         // Properties spoiler\n        Ref<HorizontalLayout> mHeaderContainer; // Count property and other controls container\n        Ref<Button>           mAddButton;       // Add button, adds new element at end\n\n        Vector<Ref<FunctionInstance>> mInstances; // List of containers with pointers to serializable fields and interfaces\n\n        Ref<HorizontalLayout>         mWidgetSample;  // Subscription widget sample\n        Vector<Ref<HorizontalLayout>> mWidgetsBuffer; // Buffer of cached widgets\n\n        bool mIsRefreshing = false; // Is currently refreshing content. Need to prevent cycled size changing\n\n    protected:\n        // Called when property puts in buffer. Here you can release your shared resources\n        void OnFreeProperty() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Updates list of instances by target values\n        void RefreshInstances();\n\n        // Creates new widget for subscription\n        Ref<FunctionInstance> CreateWidget();\n\n        // Called when add button has pressed\n        void OnAddPressed();\n\n        // Called when remove subscription pressed\n        void OnRemovePressed(const Ref<FunctionInstance>& instance);\n\n        // Called when expanding spoiler, refreshing array properties\n        void OnExpand();\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const String& path, const Vector<DataDocument>& before,\n                               const Vector<DataDocument>& after);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::FunctionProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::FunctionProperty)\n{\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().NAME(mHeaderContainer);\n    FIELD().PROTECTED().NAME(mAddButton);\n    FIELD().PROTECTED().NAME(mInstances);\n    FIELD().PROTECTED().NAME(mWidgetSample);\n    FIELD().PROTECTED().NAME(mWidgetsBuffer);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsRefreshing);\n}\nEND_META;\nCLASS_METHODS_META(Editor::FunctionProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const FunctionProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFieldInfo, const FieldInfo*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Button>, GetRemoveButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExpanded, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFreeProperty);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, RefreshInstances);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<FunctionInstance>, CreateWidget);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemovePressed, const Ref<FunctionInstance>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnExpand);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/IntegerProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IntegerProperty.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n\nnamespace Editor\n{\n    IntegerProperty::IntegerProperty(RefCounter* refCounter):\n        TPropertyField<int>(refCounter)\n    {}\n\n    IntegerProperty::IntegerProperty(RefCounter* refCounter, const IntegerProperty& other) :\n        TPropertyField<int>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    IntegerProperty& IntegerProperty::operator=(const IntegerProperty& other)\n    {\n        TPropertyField<int>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void IntegerProperty::InitializeControls()\n    {\n        mEditBox = FindChildByType<EditBox>();\n        if (mEditBox)\n        {\n            mEditBox->onChangeCompleted = THIS_FUNC(OnEdited);\n            mEditBox->text = \"--\";\n            mEditBox->SetFilterInteger();\n\n            auto handleLayer = mEditBox->FindLayer(\"arrows\");\n            if (handleLayer)\n            {\n                mEditBox->onDraw += [&]() { mDragHangle->OnDrawn(); };\n\n                mDragHangle = mmake<CursorEventsArea>();\n                mDragHangle->cursorType = CursorType::SizeNS;\n                mDragHangle->isUnderPoint = [=](const Vec2F& point) { return handleLayer->IsUnderPoint(point); };\n                mDragHangle->onMoved = THIS_FUNC(OnDragHandleMoved);\n                mDragHangle->onCursorPressed = THIS_FUNC(OnMoveHandlePressed);\n                mDragHangle->onCursorReleased = THIS_FUNC(OnMoveHandleReleased);\n            }\n        }\n    }\n\n    void IntegerProperty::UpdateValueView()\n    {\n        if (mValuesDifferent)\n            mEditBox->text = \"--\";\n        else\n            mEditBox->text = (WString)mCommonValue;\n    }\n\n    void IntegerProperty::OnEdited(const WString& data)\n    {\n        if (mValuesDifferent && data == \"--\")\n            return;\n\n        SetValueByUserAndComplete((const int)data);\n    }\n\n    void IntegerProperty::OnDragHandleMoved(const Input::Cursor& cursor)\n    {\n        SetValue(mCommonValue + (int)cursor.delta.y, true);\n    }\n\n    void IntegerProperty::OnKeyReleased(const Input::Key& key)\n    {\n        if (!mEditBox)\n            return;\n\n        if (mEditBox && !mEditBox->IsFocused())\n            return;\n\n        if (key == VK_UP)\n        {\n            SetValueByUserAndComplete(mCommonValue + 1);\n            mEditBox->SelectAll();\n        }\n\n        if (key == VK_DOWN)\n        {\n            SetValueByUserAndComplete(mCommonValue - 1);\n            mEditBox->SelectAll();\n        }\n    }\n\n    void IntegerProperty::OnMoveHandlePressed(const Input::Cursor& cursor)\n    {\n\t\tBeginUserChanging();\n        o2Application.SetCursorInfiniteMode(true);\n    }\n\n    void IntegerProperty::OnMoveHandleReleased(const Input::Cursor& cursor)\n    {\n        o2Application.SetCursorInfiniteMode(false);\n        EndUserChanging();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<int>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::IntegerProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<int>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::IntegerProperty, Editor__IntegerProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/IntegerProperty.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class EditBox;\n}\n\nnamespace Editor\n{\n    // --------------------------------\n    // Editor integer property edit box\n    // --------------------------------\n    class IntegerProperty: public TPropertyField<int>, public KeyboardEventsListener\n    {\n    public:\n        // Default constructor\n        IntegerProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        IntegerProperty(RefCounter* refCounter, const IntegerProperty& other);\n\n        // Copy operator\n        IntegerProperty& operator=(const IntegerProperty& other);\n\n        SERIALIZABLE(IntegerProperty);\n        CLONEABLE_REF(IntegerProperty);\n\n    protected:\n        Ref<EditBox>          mEditBox;    // Edit box \n        Ref<CursorEventsArea> mDragHangle; // Value changing drag handle\n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Called when key was released\n        void OnKeyReleased(const Input::Key& key) override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Edit box change event\n        void OnEdited(const WString& data);\n\n        // Called when drag handle was moved and changes the property value\n        void OnDragHandleMoved(const Input::Cursor& cursor);\n\n        // Called when change value move handle pressed, sets cursor infinite mode and stores value to data\n        void OnMoveHandlePressed(const Input::Cursor& cursor);\n\n        // Called when change value move handle  released, turns off cursor infinite mode, \n        // checks value was changed then calls value change completed event\n        void OnMoveHandleReleased(const Input::Cursor& cursor);\n\n        REF_COUNTERABLE_IMPL(TPropertyField<int>);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IntegerProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<int>);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IntegerProperty)\n{\n    FIELD().PROTECTED().NAME(mEditBox);\n    FIELD().PROTECTED().NAME(mDragHangle);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IntegerProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const IntegerProperty&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEdited, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragHandleMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMoveHandlePressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMoveHandleReleased, const Input::Cursor&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ObjectProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ObjectProperty.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/Attributes/NoHeaderAttribute.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Properties.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    ObjectProperty::ObjectProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {\n        InitializeControls();\n    }\n\n    ObjectProperty::ObjectProperty(RefCounter* refCounter, const ObjectProperty& other) :\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    ObjectProperty& ObjectProperty::operator=(const ObjectProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void ObjectProperty::OnFreeProperty()\n    {\n        if (mObjectViewer)\n        {\n            RemoveChild(mObjectViewer->GetSpoiler(), false);\n            o2EditorProperties.FreeObjectViewer(mObjectViewer);\n        }\n\n        mObjectViewer = nullptr;\n    }\n\n    void ObjectProperty::OnPropertyEnabled()\n    {\n        if (mObjectViewer)\n            mObjectViewer->OnPropertiesEnabled();\n    }\n\n    void ObjectProperty::OnPropertyDisabled()\n    {\n        if (mObjectViewer)\n            mObjectViewer->OnPropertiesDisabled();\n    }\n\n    void ObjectProperty::InitializeControls()\n    {\n        expandHeight = true;\n        expandWidth = true;\n        fitByChildren = true;\n    }\n\n    void ObjectProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        for (auto& pair : mTargetObjects)\n        {\n            if (pair.first.isCreated)\n                delete pair.first.data;\n\n            if (pair.second.isCreated)\n                delete pair.second.data;\n        }\n\n        mValuesProxies = targets;\n        mTargetObjects.Clear();\n\n        for (auto& pair : targets)\n            mTargetObjects.Add({ GetObjectFromProxy(pair.first), GetObjectFromProxy(pair.second) });\n\n        Refresh();\n    }\n\n    void ObjectProperty::Refresh(bool forcible /*= false*/)\n    {\n        PushEditorScopeOnStack scope;\n\n        for (auto& pair : mTargetObjects)\n        {\n            pair.first.Refresh();\n            pair.second.Refresh();\n        }\n\n        CheckViewer();\n\n        if (mObjectViewer)\n        {\n            mObjectViewer->Refresh(mTargetObjects.Convert<Pair<IObject*, IObject*>>(\n                [&](const Pair<TargetObjectData, TargetObjectData>& x)\n                {\n                    return Pair<IObject*, IObject*>(x.first.data, x.second.data);\n                }));\n        }\n\n        SetEnabled((mObjectViewer && !mObjectViewer->IsEmpty()) || !mNoHeader);\n    }\n\n    void ObjectProperty::CheckViewer(bool forcible /*= false*/)\n    {\n        PushEditorScopeOnStack scope;\n\n        const Type* objectType = nullptr;\n        if (!mTargetObjects.IsEmpty())\n        {\n            auto object = mTargetObjects[0].first.data;\n            if (object)\n                objectType = &object->GetType();\n        }\n\n        const Type* prevObjectType = mObjectViewer ? mObjectViewer->GetViewingObjectType() : nullptr;\n        if (objectType != prevObjectType || forcible)\n        {\n            if (mObjectViewer)\n                o2EditorProperties.FreeObjectViewer(mObjectViewer);\n\n            if (objectType)\n            {\n                mObjectViewer = o2EditorProperties.CreateObjectViewer(objectType, mValuesPath,\n                                                                      THIS_FUNC(OnPropertyChanged),\n                                                                      onChanged);\n\n                mObjectViewer->CheckCreateSpoiler(Ref(this));\n                mObjectViewer->SetParentContext(mParentContext.Lock());\n                mObjectViewer->SetHeaderEnabled(!mNoHeader);\n                mObjectViewer->SetExpanded(mExpanded, true);\n                mObjectViewer->GetSpoiler()->SetCaption(mCaption);\n            }\n        }\n    }\n\n    const Type* ObjectProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* ObjectProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(IObject);\n    }\n\n    void ObjectProperty::SetFieldInfo(const FieldInfo* fieldInfo)\n    {\n        IPropertyField::SetFieldInfo(fieldInfo);\n\n        if (fieldInfo)\n        {\n            mExpanded = fieldInfo->HasAttribute<ExpandedByDefaultAttribute>();\n            mNoHeader = fieldInfo->HasAttribute<NoHeaderAttribute>();\n        }\n    }\n\n    void ObjectProperty::SetCaption(const WString& text)\n    {\n        mCaption = text;\n\n        if (mObjectViewer)\n            mObjectViewer->GetSpoiler()->SetCaption(mCaption);;\n    }\n\n    WString ObjectProperty::GetCaption() const\n    {\n        return mCaption;\n    }\n\n    Ref<Button> ObjectProperty::GetRemoveButton()\n    {\n        if (!mRemoveBtn)\n        {\n            mRemoveBtn = o2UI.CreateWidget<Button>(\"remove small\");\n            *mRemoveBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(2, 0));\n            AddInternalWidget(mRemoveBtn);\n        }\n\n        return mRemoveBtn;\n    }\n\n\tvoid ObjectProperty::Expand(bool forcible /*= false*/)\n    {\n        SetExpanded(true, forcible);\n    }\n\n    void ObjectProperty::Collapse(bool forcible /*= false*/)\n    {\n        SetExpanded(false, forcible);\n    }\n\n    void ObjectProperty::SetExpanded(bool expanded, bool forcible /*= false*/)\n    {\n        mExpanded = expanded;\n\n        if (mObjectViewer)\n            mObjectViewer->GetSpoiler()->SetExpanded(expanded, forcible);\n    }\n\n    bool ObjectProperty::IsExpanded() const\n    {\n        if (mObjectViewer)\n            return mObjectViewer->GetSpoiler()->IsExpanded();\n\n        return mExpanded;\n    }\n\n    ObjectProperty::TargetObjectData ObjectProperty::GetObjectFromProxy(const Ref<IAbstractValueProxy>& proxy)\n    {\n        TargetObjectData res;\n\n        if (!proxy)\n            return res;\n\n        res.proxy = proxy;\n\n        const ObjectType& objectType = dynamic_cast<const ObjectType&>(proxy->GetType());\n\n        bool usedRawPointer = false;\n        if (auto pointerProxy = DynamicCast<IPointerValueProxy>(proxy))\n        {\n            res.data = objectType.DynamicCastToIObject(pointerProxy->GetValueVoidPointer());\n            res.isCreated = false;\n            usedRawPointer = true;\n        }\n        \n#if IS_SCRIPTING_SUPPORTED\n        if (auto scriptProxy = DynamicCast<ScriptValueProxy>(proxy))\n        {\n            ScriptValue value = scriptProxy->scriptProperty->Get();\n            if (value.IsObjectContainer())\n            {\n                if (auto valueObjectType = dynamic_cast<const ObjectType*>(value.GetObjectContainerType()))\n                {\n                    res.data = valueObjectType->DynamicCastToIObject(value.GetContainingObject());\n                    res.isCreated = false;\n                    usedRawPointer = true;\n                }\n            }\n        }\n#endif\n        if (!usedRawPointer)\n        {\n            void* sample = objectType.CreateSample();\n            proxy->GetValuePtr(sample);\n\n            res.data = objectType.DynamicCastToIObject(sample);\n            res.isCreated = true;\n        }\n\n        return res;\n    }\n\n    void ObjectProperty::OnPropertyChanged(const String& path, const Vector<DataDocument>& before,\n                                           const Vector<DataDocument>& after)\n    {\n        for (auto& pair : mTargetObjects)\n            pair.first.SetValue();\n\n        onChangeCompleted(path, before, after);\n    }\n\n    void ObjectProperty::TargetObjectData::Refresh()\n    {\n        if (!isCreated)\n            return;\n\n        const ObjectType& objectType = dynamic_cast<const ObjectType&>(proxy->GetType());\n        proxy->GetValuePtr(objectType.DynamicCastFromIObject(data));\n    }\n\n    void ObjectProperty::TargetObjectData::SetValue()\n    {\n        if (!isCreated)\n            return;\n\n        const ObjectType& objectType = dynamic_cast<const ObjectType&>(proxy->GetType());\n        proxy->SetValuePtr(objectType.DynamicCastFromIObject(data));\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ObjectProperty>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ObjectProperty, Editor__ObjectProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ObjectProperty.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Property.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IObjectPropertiesViewer);\n\n    // ----------------------\n    // Editor object property\n    // ----------------------\n    class ObjectProperty: public IPropertyField\n    {\n    public:\n        // Default constructor\n        ObjectProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        ObjectProperty(RefCounter* refCounter, const ObjectProperty& other);\n\n        // Copy operator\n        ObjectProperty& operator=(const ObjectProperty& other);\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        // Specializes field info, processing attributes\n        void SetFieldInfo(const FieldInfo* fieldInfo) override;\n\n        // Sets property caption\n        void SetCaption(const WString& text) override;\n\n        // Returns property caption\n        WString GetCaption() const override;\n\n        // Adds remove button\n        Ref<Button> GetRemoveButton() override;\n\n        // Expands property fields\n\t\tvoid Expand(bool forcible = false);\n\n        // Collapses property field\n\t\tvoid Collapse(bool forcible = false);\n\n        // Sets properties expanding\n\t\tvoid SetExpanded(bool expanded, bool forcible = false);\n\n        // Returns is properties expanded\n        bool IsExpanded() const;\n\n        SERIALIZABLE(ObjectProperty);\n        CLONEABLE_REF(ObjectProperty);\n\n    protected:\n        struct TargetObjectData\n        {\n            Ref<IAbstractValueProxy> proxy;\n            IObject* data = nullptr;\n            bool isCreated = false;\n\n            bool operator==(const TargetObjectData& other) const { return proxy == other.proxy; }\n\n            void Refresh();\n            void SetValue();\n        };\n\n    protected:                                                                     \n        Vector<Pair<TargetObjectData, TargetObjectData>> mTargetObjects; // Target objects\n\n        Ref<IObjectPropertiesViewer> mObjectViewer; // Object properties viewer\n\n        bool mNoHeader = false;          // Is no header attribute exists\n        bool mExpanded = false;          // True when must be expanded after creating object viewer\n\n        WString mCaption; // Property caption\n\n    protected:\n        // Called when property puts in buffer. Here you can release your shared resources\n        void OnFreeProperty() override;\n\n        // Enable viewer event function\n        void OnPropertyEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertyDisabled() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Checks viewer type, creates new if needed\n        void CheckViewer(bool forcible = false);\n\n        // Returns object target data from proxy. Creates copy of object when it is property proxy, or gets pointer from pointer proxy\n        TargetObjectData GetObjectFromProxy(const Ref<IAbstractValueProxy>& proxy);\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const String& path, const Vector<DataDocument>& before, \n                               const Vector<DataDocument>& after);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ObjectProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ObjectProperty)\n{\n    FIELD().PROTECTED().NAME(mTargetObjects);\n    FIELD().PROTECTED().NAME(mObjectViewer);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNoHeader);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mExpanded);\n    FIELD().PROTECTED().NAME(mCaption);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ObjectProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ObjectProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFieldInfo, const FieldInfo*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Button>, GetRemoveButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExpanded, bool, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFreeProperty);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckViewer, bool);\n    FUNCTION().PROTECTED().SIGNATURE(TargetObjectData, GetObjectFromProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ObjectPtrProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ObjectPtrProperty.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/Attributes/DefaultTypeAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/DontDeleteAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/NoHeaderAttribute.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/StringUtils.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Properties.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    ObjectPtrProperty::ObjectPtrProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {\n        InitializeControls();\n    }\n\n    ObjectPtrProperty::ObjectPtrProperty(RefCounter* refCounter, const ObjectPtrProperty& other):\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    ObjectPtrProperty& ObjectPtrProperty::operator=(const ObjectPtrProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void ObjectPtrProperty::OnFreeProperty()\n    {\n        if (mObjectViewer)\n        {\n            RemoveChild(mObjectViewer->GetSpoiler(), false);\n            o2EditorProperties.FreeObjectViewer(mObjectViewer);\n        }\n\n        mObjectViewer = nullptr;\n    }\n\n    void ObjectPtrProperty::OnPropertyEnabled()\n    {\n        if (mObjectViewer)\n            mObjectViewer->OnPropertiesEnabled();\n    }\n\n    void ObjectPtrProperty::OnPropertyDisabled()\n    {\n        if (mObjectViewer)\n            mObjectViewer->OnPropertiesDisabled();\n    }\n\n    void ObjectPtrProperty::InitializeControls()\n    {\n        PushEditorScopeOnStack scope;\n\n        borderLeft = 11;\n\n        mCaption = o2UI.CreateLabel(\"Caption\");\n        mCaption->name = \"caption\";\n        mCaption->SetHorAlign(HorAlign::Left);\n        AddChild(mCaption);\n\n        mHeaderContainer = mmake<HorizontalLayout>();\n        mHeaderContainer->name = \"header\";\n        *mHeaderContainer->layout = WidgetLayout::HorStretch(VerAlign::Top, 100, 0, 19, 0);\n        mHeaderContainer->baseCorner = BaseCorner::Right;\n        mHeaderContainer->expandHeight = false;\n        mCaption->AddChildWidget(mHeaderContainer);\n\n        mCreateOrRemoveButton = o2UI.CreateButton(\"Create\");\n        mCreateOrRemoveButton->layout->maxWidth = 75;\n        mCreateOrRemoveButton->layout->minHeight = 15;\n        mCreateOrRemoveButton->layout->height = 15;\n        mCreateOrRemoveButton->onClick = THIS_FUNC(OnCreateOrRemovePressed);\n        mHeaderContainer->AddChild(mCreateOrRemoveButton);\n\n        mTypeButton = o2UI.CreateWidget<Button>(\"backless dropdown\");\n        mTypeButton->name = \"type\";\n        mTypeButton->onClick = THIS_FUNC(OnCreatePressed);\n        mTypeButton->caption = \"nullptr\";\n        mHeaderContainer->AddChild(mTypeButton);\n\n        mCreateMenu = o2UI.CreateWidget<ContextMenu>();\n        mTypeButton->AddChild(mCreateMenu);\n\n        expandHeight = true;\n        expandWidth = true;\n        fitByChildren = true;\n    }\n\n    void ObjectPtrProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        mValuesProxies = targets;\n        Refresh();\n    }\n\n    void ObjectPtrProperty::Refresh(bool forcible /*= false*/)\n    {\n        PushEditorScopeOnStack scope;\n\n        mCurrentObjectType = nullptr;\n        if (!mValuesProxies.IsEmpty())\n        {\n            auto object = GetProxy(mValuesProxies[0].first);\n            if (object)\n            {\n                mCurrentObjectType = dynamic_cast<const ObjectType*>(&object->GetType());\n            }\n            else if (mFieldInfo)\n            {\n                if (auto defaultTypeAttr = mFieldInfo->GetAttribute<DefaultTypeAttribute>())\n                {\n                    CreateObject(dynamic_cast<const ObjectType*>(defaultTypeAttr->defaultType));\n                    return;\n                }\n            }\n        }\n\n        const Type* prevObjectType = mObjectViewer ? mObjectViewer->GetViewingObjectType() : nullptr;\n        if (mBuiltObjectType != prevObjectType || mCurrentObjectType != mBuiltObjectType || forcible)\n        {\n            if (mObjectViewer)\n            {\n                o2EditorProperties.FreeObjectViewer(mObjectViewer);\n                mCaption->SetEnabledForcible(true);\n                mCaption->AddChildWidget(mHeaderContainer);\n                borderLeft = 11;\n            }\n\n            mObjectViewer = nullptr;\n            mBuiltObjectType = mCurrentObjectType;\n\n            if (mBuiltObjectType)\n            {\n                mObjectViewer = o2EditorProperties.CreateObjectViewer(mBuiltObjectType, mValuesPath, onChangeCompleted,\n                                                                      onChanged);\n\n                mObjectViewer->CheckCreateSpoiler(Ref(this));\n                mObjectViewer->SetParentContext(mParentContext.Lock());\n                mObjectViewer->SetHeaderEnabled(!mNoHeader);\n                mObjectViewer->SetExpanded(mExpanded, true);\n\n                mCaption->SetEnabledForcible(false);\n                mHeaderContainer->SetInternalParent(mObjectViewer->GetSpoiler());\n\n                mTypeButton->caption = mCurrentObjectType->GetName();\n                mTypeButton->SetEnabledForcible(mAvailableMultipleTypes && !mNoHeader);\n\n                mCreateOrRemoveButton->caption = \"Delete\";\n                mCreateOrRemoveButton->enabledForcibly = !mDontDeleteEnabled;\n\n                borderLeft = 0;\n\n                UpdateViewerHeader();\n            }\n            else\n            {\n                mTypeButton->caption = \"nullptr\";\n                mCreateOrRemoveButton->caption = \"Create\";\n                mCreateOrRemoveButton->enabledForcibly = true;\n            }\n        }\n\n        if (mObjectViewer)\n        {\n            mObjectViewer->Refresh(mValuesProxies.Convert<Pair<IObject*, IObject*>>(\n                [&](const Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>& x)\n            {\n                return Pair<IObject*, IObject*>(GetProxy(x.first), x.second ? GetProxy(x.second) : nullptr);\n            }));\n        }\n\n        SetEnabled((mObjectViewer && !mObjectViewer->IsEmpty()) || !mNoHeader);\n    }\n\n    const Type* ObjectPtrProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* ObjectPtrProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(IObject*);\n    }\n\n    void ObjectPtrProperty::SetFieldInfo(const FieldInfo* fieldInfo)\n    {\n        IPropertyField::SetFieldInfo(fieldInfo);\n\n        if (fieldInfo)\n        {\n\t\t\tmNoHeader = fieldInfo->HasAttribute<NoHeaderAttribute>();\n\t\t\tmExpanded = fieldInfo->HasAttribute<ExpandedByDefaultAttribute>() || mNoHeader;\n            mDontDeleteEnabled = fieldInfo->HasAttribute<DontDeleteAttribute>() && !mNoHeader;\n        }\n    }\n\n    void ObjectPtrProperty::SetCaption(const WString& text)\n    {\n        mCaption->SetText(text);\n\n        UpdateViewerHeader();\n    }\n\n    WString ObjectPtrProperty::GetCaption() const\n    {\n        return mCaption->GetText();\n    }\n\n    Ref<Button> ObjectPtrProperty::GetRemoveButton()\n    {\n        if (!mRemoveBtn)\n        {\n            mRemoveBtn = o2UI.CreateWidget<Button>(\"remove small\");\n            mRemoveBtn->layout->maxWidth = 20;\n            mRemoveBtn->layout->minHeight = 20;\n            mHeaderContainer->AddChild(mRemoveBtn, 0);\n        }\n\n        return mRemoveBtn;\n    }\n\n    void ObjectPtrProperty::SetBasicType(const ObjectType* type)\n    {\n        mBasicObjectType = type;\n        mAvailableMultipleTypes = !mBasicObjectType->GetDerivedTypes().IsEmpty();\n    }\n\n\tvoid ObjectPtrProperty::Expand(bool forcible /*= false*/)\n    {\n        SetExpanded(true, forcible);\n    }\n\n    void ObjectPtrProperty::Collapse(bool forcible /*= false*/)\n    {\n        SetExpanded(false, forcible);\n    }\n\n    void ObjectPtrProperty::SetExpanded(bool expanded, bool forcible /*= false*/)\n    {\n        mExpanded = expanded;\n\n        if (mObjectViewer)\n            mObjectViewer->GetSpoiler()->SetExpanded(expanded, forcible);\n    }\n\n    bool ObjectPtrProperty::IsExpanded() const\n    {\n        if (mObjectViewer)\n            return mObjectViewer->GetSpoiler()->IsExpanded();\n\n        return mExpanded;\n    }\n\n    void ObjectPtrProperty::OnCreateOrRemovePressed()\n    {\n        PushEditorScopeOnStack scope;\n\n        bool hasObject = !mValuesProxies.IsEmpty() && GetProxy(mValuesProxies[0].first) != nullptr;\n        if (hasObject)\n            RemoveObject();\n        else\n            OnCreatePressed();\n    }\n\n    void ObjectPtrProperty::OnCreatePressed()\n    {\n        CheckCreateContextMenu();\n\n        if (mImmediateCreateObject)\n            CreateObject(mBasicObjectType);\n        else\n            mCreateMenu->Show();\n    }\n\n    void ObjectPtrProperty::RemoveObject()\n    {\n        for (auto& targetObj : mValuesProxies)\n        {\n            IObject* object = GetProxy(targetObj.first);\n\n            if (object != nullptr)\n            {\n                SetProxy(targetObj.first, nullptr);\n            }\n        }\n\n        Refresh();\n\n        if (mObjectViewer)\n        {\n            mObjectViewer->GetSpoiler()->SetLayoutDirty();\n            mObjectViewer->GetSpoiler()->Collapse();\n        }\n    }\n\n    void ObjectPtrProperty::CheckCreateContextMenu()\n    {\n        if (mContextInitialized)\n            return;\n\n        mCreateMenu->RemoveAllItems();\n\n        auto availableTypes = mBasicObjectType->GetDerivedTypes();\n        availableTypes.Insert(mBasicObjectType, 0);\n\n        mImmediateCreateObject = availableTypes.Count() == 1;\n\n        const int maxUngroupedTypes = 10;\n        if (availableTypes.Count() < maxUngroupedTypes)\n        {\n            for (auto& type : availableTypes)\n            {\n                mCreateMenu->AddItem(GetSmartName(type->GetName()), [=]() { CreateObject(dynamic_cast<const ObjectType*>(type)); });\n            }\n        }\n        else\n        {\n            for (auto& type : availableTypes)\n            {\n                String group = type->InvokeStatic<String>(\"GetCreateMenuGroup\");\n                if (!group.IsEmpty())\n                    group += String(\"/\") + GetSmartName(type->GetName());\n                else\n                    group = GetSmartName(type->GetName().ReplacedAll(\"::\", \"/\"));\n\n                mCreateMenu->AddItem(group, [=]() { CreateObject(dynamic_cast<const ObjectType*>(type)); });\n            }\n        }\n\n        mCreateMenu->SetSearchEnabled(true);\n\n        mContextInitialized = true;\n    }\n\n    void ObjectPtrProperty::CreateObject(const ObjectType* type)\n    {\n        PushEditorScopeOnStack scope;\n\n        StoreValues(mBeforeChangeValues);\n        for (auto& targetObj : mValuesProxies)\n        {\n            DataDocument doc;\n            if (auto previousSerializable = dynamic_cast<ISerializable*>(GetProxy(targetObj.first)))\n                previousSerializable->Serialize(doc);\n\n            auto newObject = type->CreateSampleRef();\n\n            SetProxy(targetObj.first, dynamic_cast<IObject*>(newObject.Get()));\n\n            if (auto newSerializableRef = dynamic_cast<ISerializable*>(newObject.Get()))\n                newSerializableRef->Deserialize(doc);\n        }\n\n        CheckValueChangeCompleted();\n\n        Refresh();\n\n        if (mObjectViewer)\n            mObjectViewer->GetSpoiler()->SetLayoutDirty();\n    }\n\n    void ObjectPtrProperty::StoreValues(Vector<DataDocument>& data) const\n    {\n        data.Clear();\n        for (auto& targetObj : mValuesProxies)\n        {\n            data.Add(DataDocument());\n            data.Last() = GetProxy(targetObj.first);\n        }\n    }\n\n    IObject* ObjectPtrProperty::GetProxy(const Ref<IAbstractValueProxy>& proxy) const\n    {\n        const Type& proxyType = proxy->GetType();\n        if (proxyType.GetUsage() == Type::Usage::Pointer)\n        {\n            const Type& baseType = *dynamic_cast<const PointerType&>(proxyType).GetBaseType();\n            if (baseType.IsBasedOn(TypeOf(IObject)))\n            {\n                const ObjectType& objectType = dynamic_cast<const ObjectType&>(baseType);\n\n                void* valuePtr;\n                proxy->GetValuePtr(&valuePtr);\n\n                return objectType.DynamicCastToIObject(valuePtr);\n            }\n        }\n        else if (proxyType.GetUsage() == Type::Usage::Reference)\n        {\n            const Type& baseType = *dynamic_cast<const ReferenceType&>(proxyType).GetBaseType();\n            if (baseType.IsBasedOn(TypeOf(IObject)))\n            {\n                const ObjectType& objectType = dynamic_cast<const ObjectType&>(baseType);\n                const ReferenceType& refType = dynamic_cast<const ReferenceType&>(proxyType);\n\n                void* valuePtr = proxyType.CreateSample();\n                proxy->GetValuePtr(valuePtr);\n\n                IObject* res = objectType.DynamicCastToIObject(refType.GetObjectRawPtr(valuePtr));\n\n                proxyType.DestroySample(valuePtr);\n\n                return res;\n            }\n        }\n\n        return nullptr;\n    }\n\n    void ObjectPtrProperty::SetProxy(const Ref<IAbstractValueProxy>& proxy, IObject* object)\n    {\n        const Type& proxyType = proxy->GetType();\n        if (proxyType.GetUsage() == Type::Usage::Pointer)\n        {\n            const Type& baseType = *dynamic_cast<const PointerType&>(proxyType).GetBaseType();\n            if (baseType.IsBasedOn(TypeOf(IObject)))\n            {\n                const ObjectType& objectType = dynamic_cast<const ObjectType&>(baseType);\n\n                void* valuePtr = objectType.DynamicCastFromIObject(object);\n                proxy->SetValuePtr(&valuePtr);\n            }\n        }\n        else if (proxyType.GetUsage() == Type::Usage::Reference)\n        {\n            const Type& baseType = *dynamic_cast<const ReferenceType&>(proxyType).GetBaseType();\n            if (baseType.IsBasedOn(TypeOf(IObject)))\n            {\n                const ObjectType& objectType = dynamic_cast<const ObjectType&>(baseType);\n                const ReferenceType& refType = dynamic_cast<const ReferenceType&>(proxyType);\n\n                void* valuePtr = objectType.DynamicCastFromIObject(object);\n                \n                proxy->SetValuePtr(refType.CreateSample(valuePtr));\n            }\n        }\n    }\n\n    void ObjectPtrProperty::UpdateViewerHeader()\n    {\n        if (mObjectViewer)\n            mObjectViewer->SetCaption(mCaption->GetText());\n\n        auto spoilerCaptionLayer = !mObjectViewer ?\n            mCaption->GetLayerDrawableByType<Text>() :\n            mObjectViewer->GetSpoiler()->GetLayerDrawable<Text>(\"caption\");\n\n        if (spoilerCaptionLayer)\n        {\n            Vec2F captionSize = Text::GetTextSize(mCaption->GetText(), spoilerCaptionLayer->GetFont(), spoilerCaptionLayer->GetFontHeight());\n            *mHeaderContainer->layout = WidgetLayout::HorStretch(VerAlign::Top, captionSize.x + 20.0f, 0, 17, 0);\n        }\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ObjectPtrProperty>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ObjectPtrProperty, Editor__ObjectPtrProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ObjectPtrProperty.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Property.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Button;\n    class ContextMenu;\n    class Label;\n    class Spoiler;\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IObjectPropertiesViewer);\n\n    // ------------------------------\n    // Editor object pointer property\n    // ------------------------------\n    class ObjectPtrProperty: public IPropertyField\n    {\n    public:\n        // Default constructor\n        ObjectPtrProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        ObjectPtrProperty(RefCounter* refCounter, const ObjectPtrProperty& other);\n\n        // Copy operator\n        ObjectPtrProperty& operator=(const ObjectPtrProperty& other);\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        // Specializes field info, processing attributes\n        void SetFieldInfo(const FieldInfo* fieldInfo) override;\n\n        // Sets property caption\n        void SetCaption(const WString& text) override;\n\n        // Returns property caption\n        WString GetCaption() const override;\n\n        // Adds remove button\n        Ref<Button> GetRemoveButton() override;\n\n        // Sets basic object type, used in create\n        void SetBasicType(const ObjectType* type);\n\n        // Expands property fields\n\t\tvoid Expand(bool forcible = false);\n\n        // Collapses property field\n        void Collapse(bool forcible = false);\n\n        // Sets properties expanding\n        void SetExpanded(bool expanded, bool forcible = false);\n\n        // Returns is properties expanded\n        bool IsExpanded() const;\n\n        SERIALIZABLE(ObjectPtrProperty);\n        CLONEABLE_REF(ObjectPtrProperty);\n\n    protected:\n        const ObjectType* mBasicObjectType = nullptr;   // Base object type, used for create\n        const ObjectType* mCurrentObjectType = nullptr; // Type of target objects\n        const ObjectType* mBuiltObjectType = nullptr;   // Type of built object properties\n\n        bool mAvailableMultipleTypes = false; // Is multiple types creation available\n\n        bool mDontDeleteEnabled = false; // When it is true, delete button is disabled\n        bool mNoHeader = false;          // Is no header attribute exists\n        bool mExpanded = false;          // True when must be expanded after creating object viewer\n\n        Ref<IObjectPropertiesViewer> mObjectViewer; // Object viewer\n\n        Ref<Label>            mCaption;              // Property caption, used when object is empty and there are no spoiler\n        Ref<HorizontalLayout> mHeaderContainer;      // Type caption and create/delete button container widget, placed on spoiler head\n        Ref<Button>           mTypeButton;           // Caption that shows type of object or nullptr, opens context menu when pressed\n        Ref<Button>           mCreateOrRemoveButton; // Create and delete button. Create - when value is nullptr, delete - when not\n        Ref<ContextMenu>      mCreateMenu;           // Create object context menu. Initializes with types derived from mObjectType \n                                                     // when this type changing and create button were pressed\n\n        bool mContextInitialized = false;    // True when context menu initialized with available types of objects. \n                                             // Context menu initializes when type changed and create button pressed\n\n        bool mImmediateCreateObject = false; // True when no reason to show context menu, because there is only one available type\n\n    protected:\n        // Called when property puts in buffer. Here you can release your shared resources\n        void OnFreeProperty() override;\n\n        // Enable viewer event function\n        void OnPropertyEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertyDisabled() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Updates viewer header caption and header container \n        void UpdateViewerHeader();\n\n        // Called when create or remove button pressed\n        void OnCreateOrRemovePressed();\n\n        // Called when create button pressed\n        void OnCreatePressed();\n\n        // Removes object from property\n        void RemoveObject();\n\n        // Creates object by type\n        void CreateObject(const ObjectType* type);\n\n        // Stores values to data\n        void StoreValues(Vector<DataDocument>& data) const override;\n\n        // Converts proxy to IObject property, gets value and returns\n        IObject* GetProxy(const Ref<IAbstractValueProxy>& proxy) const;\n\n        // Converts proxy to IObject proxy, then sets value via proxy\n        void SetProxy(const Ref<IAbstractValueProxy>& proxy, IObject* object);\n\n        // Updates available types in create context menu\n        void CheckCreateContextMenu();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ObjectPtrProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ObjectPtrProperty)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mBasicObjectType);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mCurrentObjectType);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mBuiltObjectType);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mAvailableMultipleTypes);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mDontDeleteEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNoHeader);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mExpanded);\n    FIELD().PROTECTED().NAME(mObjectViewer);\n    FIELD().PROTECTED().NAME(mCaption);\n    FIELD().PROTECTED().NAME(mHeaderContainer);\n    FIELD().PROTECTED().NAME(mTypeButton);\n    FIELD().PROTECTED().NAME(mCreateOrRemoveButton);\n    FIELD().PROTECTED().NAME(mCreateMenu);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mContextInitialized);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mImmediateCreateObject);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ObjectPtrProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ObjectPtrProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFieldInfo, const FieldInfo*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Button>, GetRemoveButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBasicType, const ObjectType*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExpanded, bool, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFreeProperty);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateViewerHeader);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCreateOrRemovePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCreatePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveObject);\n    FUNCTION().PROTECTED().SIGNATURE(void, CreateObject, const ObjectType*);\n    FUNCTION().PROTECTED().SIGNATURE(void, StoreValues, Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(IObject*, GetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetProxy, const Ref<IAbstractValueProxy>&, IObject*);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckCreateContextMenu);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/RectangleFloatProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"RectangleFloatProperty.h\"\n\n#include \"o2Editor/Properties/Basic/FloatProperty.h\"\n\nnamespace Editor\n{\n    RectFProperty::RectFProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {}\n\n    RectFProperty::RectFProperty(RefCounter* refCounter, const RectFProperty& other) :\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    RectFProperty& RectFProperty::operator=(const RectFProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void RectFProperty::InitializeControls()\n    {\n        mLeftProperty = GetChildByType<FloatProperty>(\"container/layout/properties/left\");\n        mLeftProperty->SetValuePath(\"left\");\n        mLeftProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mLeftProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mLeftProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mBottomProperty = GetChildByType<FloatProperty>(\"container/layout/properties/bottom\");\n        mBottomProperty->SetValuePath(\"bottom\");\n        mBottomProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mBottomProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mBottomProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mRightProperty = GetChildByType<FloatProperty>(\"container/layout/properties/right\");\n        mRightProperty->SetValuePath(\"right\");\n        mRightProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mRightProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mRightProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mTopProperty = GetChildByType<FloatProperty>(\"container/layout/properties/top\");\n        mTopProperty->SetValuePath(\"top\");\n        mTopProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mTopProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mTopProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n    }\n\n    void RectFProperty::SetValue(const RectF& value)\n    {\n        mLeftProperty->SetValue(value.left);\n        mBottomProperty->SetValue(value.bottom);\n        mRightProperty->SetValue(value.right);\n        mTopProperty->SetValue(value.top);\n    }\n\n    void RectFProperty::SetValueLeft(float value)\n    {\n        mLeftProperty->SetValue(value);\n    }\n\n    void RectFProperty::SetValueRight(float value)\n    {\n        mRightProperty->SetValue(value);\n    }\n\n    void RectFProperty::SetValueTop(float value)\n    {\n        mTopProperty->SetValue(value);\n    }\n\n    void RectFProperty::SetValueBottom(float value)\n    {\n        mBottomProperty->SetValue(value);\n    }\n\n    void RectFProperty::SetUnknownValue(const RectF& defaultValue /*= RectF()*/)\n    {\n        mLeftProperty->SetUnknownValue(defaultValue.left);\n        mRightProperty->SetUnknownValue(defaultValue.right);\n        mTopProperty->SetUnknownValue(defaultValue.top);\n        mBottomProperty->SetUnknownValue(defaultValue.bottom);\n    }\n\n    void RectFProperty::SetLeftUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mLeftProperty->SetUnknownValue(defaultValue);\n    }\n\n    void RectFProperty::SetRightUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mRightProperty->SetUnknownValue(defaultValue);\n    }\n\n    void RectFProperty::SetTopUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mTopProperty->SetUnknownValue(defaultValue);\n    }\n\n    void RectFProperty::SetBottomUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mBottomProperty->SetUnknownValue(defaultValue);\n    }\n\n    void RectFProperty::StoreValues(Vector<DataDocument>& data) const\n    {\n        data.Clear();\n        for (auto& ptr : mValuesProxies)\n        {\n            data.Add(DataDocument());\n            data.Last() = GetProxy<RectF>(ptr.first);\n        }\n    }\n\n    void RectFProperty::OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser)\n    {\n        if (mIsTargetProxiesProperties && byUser)\n            BeginUserChanging();\n    }\n\n    void RectFProperty::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onChanged(field, byUser);\n    }\n\n    void RectFProperty::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after)\n    {\n        if (mIsTargetProxiesProperties)\n            EndUserChanging();\n        else\n            onChangeCompleted(mValuesPath + \"/\" + path, before, after);\n    }\n\n    void RectFProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        mValuesProxies = targets;\n\n        mIsTargetProxiesProperties = targets.IsEmpty() ? false : dynamic_cast<IPropertyValueProxy*>(targets[0].first.Get()) != nullptr;\n\n        mLeftProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<LeftValueProxy>(x.first), x.second ? mmake<LeftValueProxy>(x.second) : nullptr); }));\n\n        mRightProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<RightValueProxy>(x.first), x.second ? mmake<RightValueProxy>(x.second) : nullptr); }));\n\n        mTopProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<TopValueProxy>(x.first), x.second ? mmake<TopValueProxy>(x.second) : nullptr); }));\n\n        mBottomProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<BottomValueProxy>(x.first), x.second ? mmake<BottomValueProxy>(x.second) : nullptr); }));\n    }\n\n    void RectFProperty::Refresh(bool forcible /*= false*/)\n    {\n        if (mValuesProxies.IsEmpty())\n            return;\n\n        mLeftProperty->Refresh(forcible);\n        mRightProperty->Refresh(forcible);\n        mTopProperty->Refresh(forcible);\n        mBottomProperty->Refresh(forcible);\n\n        CheckRevertableState();\n    }\n\n    RectF RectFProperty::GetCommonValue() const\n    {\n        return RectF(mLeftProperty->GetCommonValue(), mBottomProperty->GetCommonValue(),\n                     mRightProperty->GetCommonValue(), mTopProperty->GetCommonValue());\n    }\n\n    bool RectFProperty::IsValuesDifferent() const\n    {\n        return mLeftProperty->IsValuesDifferent() || mRightProperty->IsValuesDifferent() ||\n            mTopProperty->IsValuesDifferent() || mBottomProperty->IsValuesDifferent();\n    }\n\n    const Type* RectFProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* RectFProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(RectF);\n    }\n\n    RectFProperty::LeftValueProxy::LeftValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    RectFProperty::LeftValueProxy::LeftValueProxy()\n    {}\n\n    void RectFProperty::LeftValueProxy::SetValue(const float& value)\n    {\n        RectF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.left = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float RectFProperty::LeftValueProxy::GetValue() const\n    {\n        RectF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.left;\n    }\n\n    RectFProperty::RightValueProxy::RightValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    RectFProperty::RightValueProxy::RightValueProxy()\n    {}\n\n    void RectFProperty::RightValueProxy::SetValue(const float& value)\n    {\n        RectF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.right = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float RectFProperty::RightValueProxy::GetValue() const\n    {\n        RectF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.right;\n    }\n\n    RectFProperty::TopValueProxy::TopValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    RectFProperty::TopValueProxy::TopValueProxy()\n    {}\n\n    void RectFProperty::TopValueProxy::SetValue(const float& value)\n    {\n        RectF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.top = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float RectFProperty::TopValueProxy::GetValue() const\n    {\n        RectF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.top;\n    }\n\n    RectFProperty::BottomValueProxy::BottomValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    RectFProperty::BottomValueProxy::BottomValueProxy()\n    {}\n\n    void RectFProperty::BottomValueProxy::SetValue(const float& value)\n    {\n        RectF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.bottom = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float RectFProperty::BottomValueProxy::GetValue() const\n    {\n        RectF proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.bottom;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::RectF>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::RectFProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::RectF>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::RectFProperty, Editor__RectFProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/RectangleFloatProperty.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(FloatProperty);\n\n    // -------------------------------\n    // Editor float rectangle property\n    // -------------------------------\n    class RectFProperty : public IPropertyField\n    {\n    public:\n        // Default constructor\n        RectFProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        RectFProperty(RefCounter* refCounter, const RectFProperty& other);\n\n        // Copy operator\n        RectFProperty& operator=(const RectFProperty& other);\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Sets value\n        void SetValue(const RectF& value);\n\n        // Sets value left\n        void SetValueLeft(float value);\n\n        // Sets value right\n        void SetValueRight(float value);\n\n        // Sets value top\n        void SetValueTop(float value);\n\n        // Sets value bottom\n        void SetValueBottom(float value);\n\n        // Sets value as unknown\n        void SetUnknownValue(const RectF& defaultValue = RectF());\n\n        // Sets value left as unknown\n        void SetLeftUnknownValue(float defaultValue = 0.0f);\n\n        // Sets value right as unknown\n        void SetRightUnknownValue(float defaultValue = 0.0f);\n\n        // Sets value top as unknown\n        void SetTopUnknownValue(float defaultValue = 0.0f);\n\n        // Sets value bottom as unknown\n        void SetBottomUnknownValue(float defaultValue = 0.0f);\n\n        // Returns value\n        RectF GetCommonValue() const;\n\n        // Returns is values different\n        bool IsValuesDifferent() const;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        SERIALIZABLE(RectFProperty);\n        CLONEABLE_REF(RectFProperty);\n\n    protected:\n        Ref<FloatProperty> mLeftProperty;   // Left value property\n        Ref<FloatProperty> mRightProperty;  // Right value property\n        Ref<FloatProperty> mTopProperty;    // Top value property\n        Ref<FloatProperty> mBottomProperty; // Bottom value property\n\n        bool mIsTargetProxiesProperties = false; // Is target proxies types is properties\n\n    protected:\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Stores values to data\n        void StoreValues(Vector<DataDocument>& data) const override;\n\n        // Called when some property before change, sets value via proxy\n        void OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed, sets value via proxy\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after);\n\n    protected:\n\n        class LeftValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            LeftValueProxy();\n            LeftValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n\n        class RightValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            RightValueProxy();\n            RightValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n\n        class TopValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            TopValueProxy();\n            TopValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n\n        class BottomValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            BottomValueProxy();\n            BottomValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::RectFProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::RectFProperty)\n{\n    FIELD().PROTECTED().NAME(mLeftProperty);\n    FIELD().PROTECTED().NAME(mRightProperty);\n    FIELD().PROTECTED().NAME(mTopProperty);\n    FIELD().PROTECTED().NAME(mBottomProperty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsTargetProxiesProperties);\n}\nEND_META;\nCLASS_METHODS_META(Editor::RectFProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const RectFProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueLeft, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueRight, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueTop, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueBottom, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetUnknownValue, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeftUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRightUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTopUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBottomUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetCommonValue);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValuesDifferent);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, StoreValues, Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyBeforeChange, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/RectangleIntProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"RectangleIntProperty.h\"\n\n#include \"o2Editor/Properties/Basic/IntegerProperty.h\"\n\nnamespace Editor\n{\n    RectIProperty::RectIProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {}\n\n    RectIProperty::RectIProperty(RefCounter* refCounter, const RectIProperty& other) :\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    RectIProperty& RectIProperty::operator=(const RectIProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void RectIProperty::InitializeControls()\n    {\n        mLeftProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/left\");\n        mLeftProperty->SetValuePath(\"left\");\n        mLeftProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mLeftProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mLeftProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mBottomProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/bottom\");\n        mBottomProperty->SetValuePath(\"bottom\");\n        mBottomProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mBottomProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mBottomProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mRightProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/right\");\n        mRightProperty->SetValuePath(\"right\");\n        mRightProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mRightProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mRightProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mTopProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/top\");\n        mTopProperty->SetValuePath(\"top\");\n        mTopProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mTopProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mTopProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n    }\n\n    void RectIProperty::SetValue(const RectI& value)\n    {\n        mLeftProperty->SetValue(value.left);\n        mBottomProperty->SetValue(value.bottom);\n        mRightProperty->SetValue(value.right);\n        mTopProperty->SetValue(value.top);\n    }\n\n    void RectIProperty::SetValueLeft(int value)\n    {\n        mLeftProperty->SetValue(value);\n    }\n\n    void RectIProperty::SetValueRight(int value)\n    {\n        mRightProperty->SetValue(value);\n    }\n\n    void RectIProperty::SetValueTop(int value)\n    {\n        mTopProperty->SetValue(value);\n    }\n\n    void RectIProperty::SetValueBottom(int value)\n    {\n        mBottomProperty->SetValue(value);\n    }\n\n    void RectIProperty::SetUnknownValue(const RectI& defaultValue /*= RectI()*/)\n    {\n        mLeftProperty->SetUnknownValue(defaultValue.left);\n        mRightProperty->SetUnknownValue(defaultValue.right);\n        mTopProperty->SetUnknownValue(defaultValue.top);\n        mBottomProperty->SetUnknownValue(defaultValue.bottom);\n    }\n\n    void RectIProperty::SetLeftUnknownValue(int defaultValue /*= 0*/)\n    {\n        mLeftProperty->SetUnknownValue(defaultValue);\n    }\n\n    void RectIProperty::SetRightUnknownValue(int defaultValue /*= 0*/)\n    {\n        mRightProperty->SetUnknownValue(defaultValue);\n    }\n\n    void RectIProperty::SetTopUnknownValue(int defaultValue /*= 0*/)\n    {\n        mTopProperty->SetUnknownValue(defaultValue);\n    }\n\n    void RectIProperty::SetBottomUnknownValue(int defaultValue /*= 0*/)\n    {\n        mBottomProperty->SetUnknownValue(defaultValue);\n    }\n\n    void RectIProperty::StoreValues(Vector<DataDocument>& data) const\n    {\n        data.Clear();\n        for (auto& ptr : mValuesProxies)\n        {\n            data.Add(DataDocument());\n            data.Last() = GetProxy<RectI>(ptr.first);\n        }\n    }\n\n    void RectIProperty::OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser)\n    {\n        if (mIsTargetProxiesProperties && byUser)\n            BeginUserChanging();\n    }\n\n    void RectIProperty::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onChanged(field, byUser);\n    }\n\n    void RectIProperty::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after)\n    {\n        if (mIsTargetProxiesProperties)\n            EndUserChanging();\n        else\n            onChangeCompleted(mValuesPath + \"/\" + path, before, after);\n    }\n\n    void RectIProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        mValuesProxies = targets;\n\n        mIsTargetProxiesProperties = targets.IsEmpty() ? false : dynamic_cast<IPropertyValueProxy*>(targets[0].first.Get()) != nullptr;\n\n        mLeftProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<LeftValueProxy>(x.first), x.second ? mmake<LeftValueProxy>(x.second) : nullptr); }));\n\n        mRightProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<RightValueProxy>(x.first), x.second ? mmake<RightValueProxy>(x.second) : nullptr); }));\n\n        mTopProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<TopValueProxy>(x.first), x.second ? mmake<TopValueProxy>(x.second) : nullptr); }));\n\n        mBottomProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<BottomValueProxy>(x.first), x.second ? mmake<BottomValueProxy>(x.second) : nullptr); }));\n    }\n\n    void RectIProperty::Refresh(bool forcible /*= false*/)\n    {\n        if (mValuesProxies.IsEmpty())\n            return;\n\n        mLeftProperty->Refresh(forcible);\n        mRightProperty->Refresh(forcible);\n        mTopProperty->Refresh(forcible);\n        mBottomProperty->Refresh(forcible);\n\n        CheckRevertableState();\n    }\n\n    RectI RectIProperty::GetCommonValue() const\n    {\n        return RectI(mLeftProperty->GetCommonValue(), mBottomProperty->GetCommonValue(),\n                     mRightProperty->GetCommonValue(), mTopProperty->GetCommonValue());\n    }\n\n    bool RectIProperty::IsValuesDifferent() const\n    {\n        return mLeftProperty->IsValuesDifferent() || mRightProperty->IsValuesDifferent() ||\n            mTopProperty->IsValuesDifferent() || mBottomProperty->IsValuesDifferent();\n    }\n\n    const Type* RectIProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* RectIProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(RectI);\n    }\n\n    RectIProperty::LeftValueProxy::LeftValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    RectIProperty::LeftValueProxy::LeftValueProxy()\n    {}\n\n    void RectIProperty::LeftValueProxy::SetValue(const int& value)\n    {\n        RectI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.left = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int RectIProperty::LeftValueProxy::GetValue() const\n    {\n        RectI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.left;\n    }\n\n    RectIProperty::RightValueProxy::RightValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    RectIProperty::RightValueProxy::RightValueProxy()\n    {}\n\n    void RectIProperty::RightValueProxy::SetValue(const int& value)\n    {\n        RectI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.right = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int RectIProperty::RightValueProxy::GetValue() const\n    {\n        RectI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.right;\n    }\n\n    RectIProperty::TopValueProxy::TopValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    RectIProperty::TopValueProxy::TopValueProxy()\n    {}\n\n    void RectIProperty::TopValueProxy::SetValue(const int& value)\n    {\n        RectI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.top = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int RectIProperty::TopValueProxy::GetValue() const\n    {\n        RectI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.top;\n    }\n\n    RectIProperty::BottomValueProxy::BottomValueProxy(const Ref<IAbstractValueProxy>& proxy) :mProxy(proxy)\n    {}\n\n    RectIProperty::BottomValueProxy::BottomValueProxy()\n    {}\n\n    void RectIProperty::BottomValueProxy::SetValue(const int& value)\n    {\n        RectI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.bottom = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int RectIProperty::BottomValueProxy::GetValue() const\n    {\n        RectI proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.bottom;\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::RectI>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::RectIProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::RectI>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::RectIProperty, Editor__RectIProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/RectangleIntProperty.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IntegerProperty);\n\n    // ---------------------------------\n    // Editor integer rectangle property\n    // ---------------------------------\n    class RectIProperty : public IPropertyField\n    {\n    public:\n        // Default constructor\n        RectIProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        RectIProperty(RefCounter* refCounter, const RectIProperty& other);\n\n        // Copy operator\n        RectIProperty& operator=(const RectIProperty& other);\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Sets value\n        void SetValue(const RectI& value);\n\n        // Sets value left\n        void SetValueLeft(int value);\n\n        // Sets value right\n        void SetValueRight(int value);\n\n        // Sets value top\n        void SetValueTop(int value);\n\n        // Sets value bottom\n        void SetValueBottom(int value);\n\n        // Sets value as unknown\n        void SetUnknownValue(const RectI& defaultValue = RectI());\n\n        // Sets value left as unknown\n        void SetLeftUnknownValue(int defaultValue = 0);\n\n        // Sets value right as unknown\n        void SetRightUnknownValue(int defaultValue = 0);\n\n        // Sets value top as unknown\n        void SetTopUnknownValue(int defaultValue = 0);\n\n        // Sets value bottom as unknown\n        void SetBottomUnknownValue(int defaultValue = 0);\n\n        // Returns value\n        RectI GetCommonValue() const;\n\n        // Returns is values different\n        bool IsValuesDifferent() const;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        SERIALIZABLE(RectIProperty);\n        CLONEABLE_REF(RectIProperty);\n\n    protected:\n        Ref<IntegerProperty> mLeftProperty;   // Left value property\n        Ref<IntegerProperty> mRightProperty;  // Right value property\n        Ref<IntegerProperty> mTopProperty;    // Top value property\n        Ref<IntegerProperty> mBottomProperty; // Bottom value property\n\n        bool mIsTargetProxiesProperties = false; // Is target proxies types is properties\n\n    protected:\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Stores values to data\n        void StoreValues(Vector<DataDocument>& data) const override;\n\n        // Called when some property before change, sets value via proxy\n        void OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed, sets value via proxy\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after);\n\n    protected:\n\n        class LeftValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            LeftValueProxy();\n            LeftValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n\n        class RightValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            RightValueProxy();\n            RightValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n\n        class TopValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            TopValueProxy();\n            TopValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n\n        class BottomValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            BottomValueProxy();\n            BottomValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::RectIProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::RectIProperty)\n{\n    FIELD().PROTECTED().NAME(mLeftProperty);\n    FIELD().PROTECTED().NAME(mRightProperty);\n    FIELD().PROTECTED().NAME(mTopProperty);\n    FIELD().PROTECTED().NAME(mBottomProperty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsTargetProxiesProperties);\n}\nEND_META;\nCLASS_METHODS_META(Editor::RectIProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const RectIProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, const RectI&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueLeft, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueRight, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueTop, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueBottom, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetUnknownValue, const RectI&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeftUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRightUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTopUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBottomUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(RectI, GetCommonValue);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValuesDifferent);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, StoreValues, Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyBeforeChange, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/SceneLayerRefProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SceneLayerRefProperty.h\"\n\n#include \"o2/Scene/UI/Widgets/DropDown.h\"\n\n\nnamespace Editor\n{\n    SceneLayerRefProperty::SceneLayerRefProperty(RefCounter* refCounter):\n        TPropertyField<Ref<SceneLayer>>(refCounter)\n    {\n        mCommonValue = Ref<SceneLayer>();\n    }\n\n    SceneLayerRefProperty::SceneLayerRefProperty(RefCounter* refCounter, const SceneLayerRefProperty& other) :\n        TPropertyField<Ref<SceneLayer>>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    void SceneLayerRefProperty::SetSelectedInheritedValue(bool inherited)\n    {\n        if (mSelectedInheritedValue == inherited)\n            return;\n\n        mSelectedInheritedValue = inherited;\n\n        UpdateValueView();\n    }\n\n    bool SceneLayerRefProperty::IsSelectedInheritedValue() const\n    {\n        return mSelectedInheritedValue;\n    }\n\n    void SceneLayerRefProperty::SetUseInheritedValue(bool use)\n    {\n        mUseInheritedValue = use;\n    }\n\n    bool SceneLayerRefProperty::IsUseInheritedValue() const\n    {\n        return mUseInheritedValue;\n    }\n\n    SceneLayerRefProperty& SceneLayerRefProperty::operator=(const SceneLayerRefProperty& other)\n    {\n        TPropertyField<Ref<SceneLayer>>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void SceneLayerRefProperty::InitializeControls()\n    {\n        mCommonValue = Ref<SceneLayer>();\n\n        mDropDown = FindChildByType<DropDown>();\n        if (mDropDown)\n        {\n            mDropDown->onSelectedText = THIS_FUNC(SelectLayer);\n            mDropDown->onBeforeExpand = THIS_FUNC(UpdateLayersList);\n            mDropDown->SetState(\"undefined\", true);\n        }\n    }\n\n    void SceneLayerRefProperty::UpdateValueView()\n    {\n        mUpdatingValue = true;\n\n        UpdateLayersList();\n\n        if (mValuesDifferent)\n        {\n            mDropDown->SelectItemAt(-1);\n            mDropDown->SetState(\"undefined\", true);\n        }\n        else\n        {\n            if (mSelectedInheritedValue)\n                mDropDown->value = mInheritFromParentName;\n            else if (mCommonValue)\n                mDropDown->value = mCommonValue->GetName();\n\n            mDropDown->SetState(\"undefined\", false);\n        }\n\n        mUpdatingValue = false;\n    }\n\n    void SceneLayerRefProperty::UpdateLayersList()\n    {\n        auto layers = o2Scene.GetLayers();\n        auto dropdownLayers = mDropDown->GetAllItemsText();\n        for (auto itemName : dropdownLayers)\n        {\n            if (!layers.Contains([&](auto& x) { return x->GetName() == (String)itemName; }))\n                mDropDown->RemoveItem(itemName);\n        }\n\n        if (mUseInheritedValue)\n            mDropDown->AddItem(mInheritFromParentName);\n\n        for (auto& layer : layers)\n        {\n            if (!dropdownLayers.Contains(layer->GetName()))\n                mDropDown->AddItem(layer->GetName());\n        }\n    }\n\n    void SceneLayerRefProperty::SelectLayer(const WString& name)\n    {\n        if (mUpdatingValue)\n            return;\n\n        if (String(name) == mInheritFromParentName)\n        {\n            mSelectedInheritedValue = true;\n            onSelectedInheritedValue();\n            return;\n        }\n\n        mSelectedInheritedValue = false;\n\n        if (!mCommonValue)\n            mCommonValue = o2Scene.GetDefaultLayer();\n\n        //SetValueByUserAndComplete(Ref<SceneLayer>(name));\n    }\n\n    bool SceneLayerRefProperty::IsAlwaysRefresh() const\n    {\n        return false;\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::Ref<o2::SceneLayer>>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::SceneLayerRefProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::Ref<o2::SceneLayer>>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SceneLayerRefProperty, Editor__SceneLayerRefProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/SceneLayerRefProperty.h",
    "content": "#pragma once\n\n#include \"o2/Scene/SceneLayerRef.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nnamespace o2\n{\n    class SceneLayer;\n    class DropDown;\n}\n\nnamespace Editor\n{\n    // -------------------------\n    // Editor layer property box\n    // -------------------------\n    class SceneLayerRefProperty: public TPropertyField<Ref<SceneLayer>>\n    {\n    public:\n        Function<void()> onSelectedInheritedValue; // Called when selected \"Inherit from parent\" value\n\n    public:\n        // Default constructor\n        SceneLayerRefProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        SceneLayerRefProperty(RefCounter* refCounter, const SceneLayerRefProperty& other);\n\n        // Copy operator\n        SceneLayerRefProperty& operator=(const SceneLayerRefProperty& other);\n\n        // Sets selected \"Inherit from parent\" value\n        void SetSelectedInheritedValue(bool inherited);\n\n        // Returns is selected \"Inherit from parent\" value\n        bool IsSelectedInheritedValue() const;\n\n        // Sets use \"Inherit from parent\" value\n        void SetUseInheritedValue(bool use);\n\n        // Returns is used \"Inherit from parent\" value\n        bool IsUseInheritedValue() const;\n\n        SERIALIZABLE(SceneLayerRefProperty);\n        CLONEABLE_REF(SceneLayerRefProperty);\n\n    protected:               \n        Ref<DropDown> mDropDown;              // Layer name dropdown\n        bool          mUpdatingValue = false; // Is dropdown value updating and we don't we don't check selection\n\n        bool mUseInheritedValue = false;      // Is used \"Inherit from parent\" value\n        bool mSelectedInheritedValue = false; // Is selected \"Inherit from parent\" value\n\n        String mInheritFromParentName = \"Inherit from parent\"; // Name of \"Inherit from parent\" value\n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Updates layer list to actual list of layers on scene\n        void UpdateLayersList();\n\n        // Selects layer\n        void SelectLayer(const WString& name);\n\n        // Is required refresh view every time\n        bool IsAlwaysRefresh() const override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SceneLayerRefProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<Ref<SceneLayer>>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SceneLayerRefProperty)\n{\n    FIELD().PUBLIC().NAME(onSelectedInheritedValue);\n    FIELD().PROTECTED().NAME(mDropDown);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mUpdatingValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mUseInheritedValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mSelectedInheritedValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(\"Inherit from parent\").NAME(mInheritFromParentName);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SceneLayerRefProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const SceneLayerRefProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedInheritedValue, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSelectedInheritedValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetUseInheritedValue, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUseInheritedValue);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersList);\n    FUNCTION().PROTECTED().SIGNATURE(void, SelectLayer, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsAlwaysRefresh);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/SceneLayersListProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SceneLayersListProperty.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n\nnamespace Editor\n{\n    SceneLayersListProperty::SceneLayersListProperty(RefCounter* refCounter):\n        TPropertyField<SceneLayersList>(refCounter)\n    {}\n\n    SceneLayersListProperty::SceneLayersListProperty(RefCounter* refCounter, const SceneLayersListProperty& other):\n        TPropertyField<SceneLayersList>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    SceneLayersListProperty& SceneLayersListProperty::operator=(const SceneLayersListProperty& other)\n    {\n        TPropertyField<SceneLayersList>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void SceneLayersListProperty::InitializeControls()\n    {\n        mPropertyButton = GetChildByType<Button>(\"container/layout/box\");\n        if (mPropertyButton)\n        {\n            mPropertyButton->SetFocusable(true);\n            mPropertyButton->onClick = THIS_FUNC(OpenContext);\n\n            mPropertyText = mPropertyButton->GetLayerDrawable<Text>(\"caption\");\n            if (mPropertyText)\n                mPropertyText->text = \"--\";\n\n            mLayersContext = o2UI.CreateWidget<ContextMenu>();\n            mPropertyButton->AddChild(mLayersContext);\n        }\n    }\n\n    void SceneLayersListProperty::OpenContext()\n    {\n        mLayersContext->RemoveAllItems();\n\n        mLayersContext->AddToggleItem(\"All layers\", o2Scene.GetLayers().All([&](auto& x) { return mCommonValue.HasLayer(x); }),\n                                      [&](bool b) { if (b) SetValueByUserAndComplete(o2Scene.GetLayers()); else SetValueByUserAndComplete({}); });\n\n        mLayersContext->AddItem(\"---\");\n\n        for (auto& layer : o2Scene.GetLayers())\n            mLayersContext->AddToggleItem(layer->GetName(), mCommonValue.HasLayer(layer), \n                                          [=](bool b) { \n            SceneLayersList copy = mCommonValue;\n            if (b)\n                copy.AddLayer(layer);\n            else\n                copy.RemoveLayer(layer);\n\n            SetValueByUserAndComplete(copy);\n        });\n\n        mLayersContext->Show(mPropertyButton->layout->GetWorldLeftBottom());\n    }\n\n    void SceneLayersListProperty::UpdateValueView()\n    {\n        String layers;\n        for (auto& layer : mCommonValue.GetLayersNames())\n        {\n            if (!layers.IsEmpty())\n                layers += \", \";\n\n            layers += layer;\n        }\n\n        mPropertyText->text = layers;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::SceneLayersList>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::SceneLayersListProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::SceneLayersList>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SceneLayersListProperty, Editor__SceneLayersListProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/SceneLayersListProperty.h",
    "content": "#pragma once\n\n#include \"o2/Scene/SceneLayersList.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nnamespace o2\n{\n    class Button;\n    class ContextMenu;\n    class EditBox;\n    class Widget;\n}\n\nnamespace Editor\n{\n    // ---------------------------------\n    // Editor scene layers list property\n    // // ------------------------------\n    class SceneLayersListProperty: public TPropertyField<SceneLayersList>\n    {\n    public:\n        // Default constructor\n        SceneLayersListProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        SceneLayersListProperty(RefCounter* refCounter, const SceneLayersListProperty& other);\n\n        // Copy operator\n        SceneLayersListProperty& operator=(const SceneLayersListProperty& other);\n\n        SERIALIZABLE(SceneLayersListProperty);\n        CLONEABLE_REF(SceneLayersListProperty);\n\n    protected:\n        Ref<Button> mPropertyButton; // Property box with layers' names\n        Ref<Text>   mPropertyText;   // Text layer inside property box\n\n        Ref<ContextMenu> mLayersContext; // Layers list toggles context\n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Updates context layers list and opens\n        void OpenContext();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SceneLayersListProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<SceneLayersList>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SceneLayersListProperty)\n{\n    FIELD().PROTECTED().NAME(mPropertyButton);\n    FIELD().PROTECTED().NAME(mPropertyText);\n    FIELD().PROTECTED().NAME(mLayersContext);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SceneLayersListProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const SceneLayersListProperty&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OpenContext);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ScriptValueProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ScriptValueProperty.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/Attributes/NoHeaderAttribute.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Basic/IntegerProperty.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Properties.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    ScriptValueProperty::ScriptValueProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {\n        InitializeControls();\n    }\n\n    ScriptValueProperty::ScriptValueProperty(RefCounter* refCounter, const ScriptValueProperty& other) :\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    ScriptValueProperty& ScriptValueProperty::operator=(const ScriptValueProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void ScriptValueProperty::OnFreeProperty()\n    {\n    }\n\n    void ScriptValueProperty::InitializeControls()\n    {\n        expandHeight = true;\n        expandWidth = true;\n        fitByChildren = true;\n\n        mSpoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n        AddChild(mSpoiler);\n\n        mSpoiler->onExpand = THIS_FUNC(OnExpand);\n        mSpoiler->borderTop = 5;\n\n        mHeaderContainer = mmake<HorizontalLayout>();\n        *mHeaderContainer->layout = WidgetLayout::HorStretch(VerAlign::Top, 100, 0, 20, 0);\n        mHeaderContainer->baseCorner = BaseCorner::Right;\n        mHeaderContainer->expandHeight = false;\n        mHeaderContainer->SetInternalParent(mSpoiler, false);\n\n        // Add button\n        mAddButton = mSpoiler->FindChildByTypeAndName<Button>(\"add button\");\n        if (!mAddButton)\n        {\n            mAddButton = o2UI.CreateWidget<Button>(\"add small\");\n            mAddButton->name = \"add button\";\n            mAddButton->layout->maxWidth = 20;\n            mAddButton->layout->minHeight = 20;\n            mAddButton->onClick = THIS_FUNC(OnAddPressed);\n\n            mHeaderContainer->AddChild(mAddButton);\n        }\n\n        // Count property\n        mCountProperty = mSpoiler->FindChildByType<IntegerProperty>(false);\n        if (!mCountProperty)\n            mCountProperty = o2UI.CreateWidget<IntegerProperty>();\n\n        if (mCountProperty)\n        {\n            mHeaderContainer->AddChild(mCountProperty);\n\n            mCountProperty->layout->maxWidth = 40;\n            mCountProperty->SetValue(0);\n            mCountProperty->onChanged = THIS_FUNC(OnCountChanged);\n        }\n    }\n\n    ScriptValueProperty::PropertiesList ScriptValueProperty::GetCommonProperties(const Vector<Pair<ScriptValue, ScriptValue>>& values, \n        bool& isArray) const\n    {\n        PropertiesList res;\n\n        for (auto& kv : values)\n        {\n            if (kv.first.IsObject())\n            {\n                isArray = false;\n\n                kv.first.ForEachProperties(\n                    [&](const ScriptValue& name, const ScriptValue& value)\n                    {\n                        auto nameStr = name.ToString();\n                        if (nameStr[0] != '_')\n                        {\n                            Pair<Ref<IScriptValueProperty>, Ref<IScriptValueProperty>> elem;\n                            elem.first = mmake<o2::ScriptValueProperty>(kv.first, name);\n                            if (kv.second.IsObject())\n                                elem.second = mmake<o2::ScriptValueProperty>(kv.second, name);\n\n                            auto fnd = res.Find([&](auto& x) { return x.first == nameStr; });\n                            if (fnd)\n                                fnd->second.Add(elem);\n                            else\n                                res.Add({ nameStr, { elem } });\n                        }\n\n                        return true;\n                    });\n            }\n            else if (kv.first.IsArray())\n            {\n                isArray = true;\n\n                for (int i = 0; i < kv.first.GetLength(); i++)\n                {\n                    Pair<Ref<IScriptValueProperty>, Ref<IScriptValueProperty>> elem;\n                    elem.first = mmake<ScriptValueArrayElement>(kv.first, i);\n                    if (kv.second.IsObject())\n                        elem.second = mmake<ScriptValueArrayElement>(kv.second, i);\n\n                    auto nameStr = (String)i;\n                    auto fnd = res.Find([&](auto& x) { return x.first == nameStr; });\n                    if (fnd)\n                        fnd->second.Add(elem);\n                    else\n                        res.Add({ nameStr, { elem } });\n                }\n            }\n        }\n\n        // Leave only common properties\n        res.RemoveAll([&](const auto& item) { return item.second.Count() != values.Count(); });\n\n        return res;\n    }\n\n    void ScriptValueProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        mNeedUpdateProxies = targets != mValuesProxies;\n        IPropertyField::SetValueAndPrototypeProxy(targets);\n    }\n\n    void ScriptValueProperty::Refresh(bool forcible /*= false*/)\n    {\n        mIsRefreshing = true;\n\n        PushEditorScopeOnStack scope;\n\n        // Get values from proxies\n        Vector<Pair<ScriptValue, ScriptValue>> values =\n            mValuesProxies.Convert<Pair<ScriptValue, ScriptValue>>(\n                [](const Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>& x)\n                {\n                    Pair<ScriptValue, ScriptValue> res;\n                    x.first->GetValuePtr(&res.first);\n\n                    if (x.second)\n                        x.second->GetValuePtr(&res.second);\n\n                    return res;\n                }\n        );\n\n        // Get common properties\n        auto commonProperties = GetCommonProperties(values, mIsArray);\n\n        if (mIsArray && !values.IsEmpty())\n        {\n            int commonCount = values[0].first.GetLength();\n            bool coundDifferents = false;\n\n            for (int i = 1; i < values.Count(); i++)\n            {\n                int count = values[i].first.GetLength();\n                if (count != commonCount)\n                    coundDifferents = true;\n            }\n\n            if (mCountDifferents != coundDifferents || mCountOfElements != commonCount)\n            {\n                if (mCountDifferents)\n                    mCountProperty->SetUnknownValue(commonCount);\n                else\n                    mCountProperty->SetValue(commonCount);\n            }\n\n            mCountOfElements = commonCount;\n            mCountDifferents = coundDifferents;\n\n            mHeaderContainer->SetEnabled(true);\n        }\n        else\n            mHeaderContainer->SetEnabled(false);\n\n        if (IsExpanded())\n        {\n            // Check that last built properties are same\n            bool changedProperties = mPreviousBuiltTypes.Count() != commonProperties.Count();\n            if (!changedProperties)\n            {\n                for (auto& kv : commonProperties)\n                {\n                    if (!mPreviousBuiltTypes.ContainsKey(kv.first) ||\n                        mPreviousBuiltTypes[kv.first] != kv.second[0].first->Get().GetValueType())\n                    {\n                        changedProperties = true;\n                        break;\n                    }\n                }\n            }\n            \n            // Rebuild properties if needed\n            if (changedProperties || forcible)\n            {\n                mPreviousBuiltTypes.Clear();\n                for (auto& kv : mBuiltProperties)\n                {\n                    kv.second->RemoveLayer(\"drag\");\n                    o2EditorProperties.FreeProperty(kv.second);\n                }\n\n                mBuiltProperties.Clear();\n\n                for (auto& kv : commonProperties)\n                {\n                    auto& name = kv.first;\n                    auto value = kv.second[0].first->Get();\n                    auto type = value.GetValueType();\n                    mPreviousBuiltTypes[name] = type;\n\n                    int idx = mIsArray ? (int)name : 0;\n\n                    if (type == ScriptValue::ValueType::Number)\n                        AddProperty(name, &TypeOf(float), idx);\n                    else if (type == ScriptValue::ValueType::String)\n                        AddProperty(name, &TypeOf(String), idx);\n                    else if (type == ScriptValue::ValueType::Bool)\n                        AddProperty(name, &TypeOf(bool), idx);\n                    else if (type == ScriptValue::ValueType::Object || type == ScriptValue::ValueType::Array)\n                    {\n                        auto prototype = value.GetPrototype();\n                        if (prototype == *ScriptValuePrototypes::GetVec2Prototype())\n                            AddProperty(name, &TypeOf(Vec2F), idx);\n                        else if (prototype == *ScriptValuePrototypes::GetRectPrototype())\n                            AddProperty(name, &TypeOf(RectF), idx);\n                        else if (prototype == *ScriptValuePrototypes::GetBorderPrototype())\n                            AddProperty(name, &TypeOf(BorderF), idx);\n                        else if (prototype == *ScriptValuePrototypes::GetColor4Prototype())\n                            AddProperty(name, &TypeOf(Color4), idx);\n                        else if (value.IsObjectContainer())\n                            AddProperty(name, value.GetObjectContainerType(), idx);\n                        else\n                            AddProperty(name, &TypeOf(ScriptValue), idx);\n                    }\n                }\n\n                mNeedUpdateProxies = true;\n            }\n\n            for (auto& kv : mBuiltProperties)\n            {\n                if (mNeedUpdateProxies)\n                {\n                    auto& name = kv.first;\n                    auto prop = commonProperties.Find([&](auto& x) { return x.first == name; });\n                    if (!prop)\n                        continue;\n\n                    auto value = prop->second[0].first->Get();\n                    auto type = value.GetValueType();\n                    auto field = kv.second;\n\n                    if (type == ScriptValue::ValueType::Number)\n                        SetFieldProxies<float>(commonProperties, name, field);\n                    else if (type == ScriptValue::ValueType::String)\n                        SetFieldProxies<String>(commonProperties, name, field);\n                    else if (type == ScriptValue::ValueType::Bool)\n                        SetFieldProxies<bool>(commonProperties, name, field);\n                    else if (type == ScriptValue::ValueType::Object || type == ScriptValue::ValueType::Array)\n                    {\n                        auto prototype = value.GetPrototype();\n                        if (prototype == *ScriptValuePrototypes::GetVec2Prototype())\n                            SetFieldProxies<Vec2F>(commonProperties, name, field);\n                        else if (prototype == *ScriptValuePrototypes::GetRectPrototype())\n                            SetFieldProxies<RectF>(commonProperties, name, field);\n                        else if (prototype == *ScriptValuePrototypes::GetBorderPrototype())\n                            SetFieldProxies<BorderF>(commonProperties, name, field);\n                        else if (prototype == *ScriptValuePrototypes::GetColor4Prototype())\n                            SetFieldProxies<Color4>(commonProperties, name, field);\n                        else if (value.IsObjectContainer())\n                        {\n                            auto proxies = prop->second.Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n                                [](const Pair<Ref<IScriptValueProperty>, Ref<IScriptValueProperty>>& x)\n                                {\n                                    Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>> res;\n                                    res.first = mmake<ScriptValueProxy>(x.first->Clone());\n                                    if (x.second && x.second->Get().IsObject())\n                                        res.second = mmake<ScriptValueProxy>(x.second->Clone());\n\n                                    return res;\n                                });\n\n                            field->SetValueAndPrototypeProxy(proxies);\n                        }\n                        else\n                            SetFieldProxies<ScriptValue>(commonProperties, name, field);\n                    }\n                }\n                else\n                    kv.second->Refresh();\n            }\n\n            mSpoiler->SetLayoutDirty();\n        }\n\n        mNeedUpdateProxies = false;\n        mIsRefreshing = false;\n    }\n\n    void ScriptValueProperty::AddProperty(const String& name, const Type* type, int idx)\n    {\n        auto prop = o2EditorProperties.CreateFieldProperty(type, name);\n        if (mIsArray)\n        {\n            prop->GetRemoveButton()->onClick = [=]() { Remove(idx); };\n            prop->AddLayer(\"drag\", mmake<Sprite>(\"ui/UI4_drag_handle.png\"),\n                           Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-18, 0)));\n        }\n\n        mSpoiler->AddChild(prop);\n        mBuiltProperties.Add(name, prop);\n    }\n\n    void ScriptValueProperty::OnCountChanged(const Ref<IPropertyField>& def, bool byUser)\n    {\n        if (mIsRefreshing)\n            return;\n\n        Resize(mCountProperty->GetCommonValue());\n    }\n\n    void ScriptValueProperty::OnExpand()\n    {\n        Refresh();\n    }\n\n    void ScriptValueProperty::Resize(int newCount)\n    {\n        if (mIsRefreshing)\n            return;\n\n        for (auto& p : mValuesProxies)\n        {\n            ScriptValue first;\n            p.first->GetValuePtr(&first);\n\n            int length = first.GetLength();\n            if (length > newCount)\n            {\n                for (int i = 0; i < length - newCount; i++)\n                    first.RemoveElement(first.GetLength() - 1);\n            }\n            else\n            {\n                for (int i = 0; i < newCount - length; i++)\n                    OnAddPressed();\n            }\n        }\n\n        Refresh();\n    }\n\n    void ScriptValueProperty::Remove(int idx)\n    {\n        for (auto& p : mValuesProxies)\n        {\n            ScriptValue first;\n            p.first->GetValuePtr(&first);\n            first.RemoveElement(idx);\n        }\n\n        Refresh();\n    }\n\n    void ScriptValueProperty::OnAddPressed()\n    {\n        for (auto& p : mValuesProxies)\n        {\n            ScriptValue first;\n            p.first->GetValuePtr(&first);\n            if (first.GetLength() > 0)\n                first.AddElement(first.GetElement(first.GetLength() - 1).Copy());\n            else\n                first.AddElement(ScriptValue(0));\n        }\n\n        Refresh();\n    }\n\n    const Type* ScriptValueProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* ScriptValueProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(ScriptValue);\n    }\n\n    void ScriptValueProperty::SetFieldInfo(const FieldInfo* fieldInfo)\n    {\n        IPropertyField::SetFieldInfo(fieldInfo);\n\n        if (fieldInfo)\n        {\n            mExpanded = fieldInfo->HasAttribute<ExpandedByDefaultAttribute>();\n            SetHeaderEnabled(!fieldInfo->HasAttribute<NoHeaderAttribute>());\n        }\n    }\n\n    void ScriptValueProperty::SetCaption(const WString& text)\n    {\n        mSpoiler->SetCaption(text);;\n    }\n\n    WString ScriptValueProperty::GetCaption() const\n    {\n        return mSpoiler->GetCaption();\n    }\n\n    Ref<Button> ScriptValueProperty::GetRemoveButton()\n    {\n        if (!mRemoveBtn)\n        {\n            mRemoveBtn = o2UI.CreateWidget<Button>(\"remove small\");\n            *mRemoveBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(2, 0));\n            AddInternalWidget(mRemoveBtn);\n        }\n\n        return mRemoveBtn;\n    }\n\n    void ScriptValueProperty::Expand()\n    {\n        SetExpanded(true);\n    }\n\n    void ScriptValueProperty::Collapse()\n    {\n        SetExpanded(false);\n    }\n\n    void ScriptValueProperty::SetExpanded(bool expanded)\n    {\n        mExpanded = expanded;\n        mSpoiler->SetExpanded(expanded);\n    }\n\n    bool ScriptValueProperty::IsExpanded() const\n    {\n        return mSpoiler->IsExpanded();\n    }\n\n    void ScriptValueProperty::SetHeaderEnabled(bool enabled)\n    {\n        mHeaderEnabled = enabled;\n\n        if (mHeaderEnabled)\n        {\n            mSpoiler->SetHeadHeight(20);\n            mSpoiler->GetLayerDrawable<Text>(\"caption\")->enabled = true;\n            mSpoiler->GetInternalWidget(\"expand\")->enabledForcibly = true;\n            mSpoiler->borderLeft = 10;\n            mSpoiler->borderTop = 2;\n        }\n        else\n        {\n            mSpoiler->SetHeadHeight(0);\n            mSpoiler->GetLayerDrawable<Text>(\"caption\")->enabled = false;\n            mSpoiler->GetInternalWidget(\"expand\")->enabledForcibly = false;\n            mSpoiler->borderLeft = 0;\n            mSpoiler->borderTop = 0;\n            mSpoiler->Expand();\n        }\n    }\n\n    bool ScriptValueProperty::IsHeaderEnabled() const\n    {\n        return mHeaderEnabled;\n    }\n\n    void ScriptValueProperty::OnPropertyChanged(const String& path, const Vector<DataDocument>& before,\n                                                const Vector<DataDocument>& after)\n    {\n        onChangeCompleted(path, before, after);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ScriptValueProperty>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ScriptValueProperty, Editor__ScriptValueProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/ScriptValueProperty.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Property.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n#include <unordered_map>\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IntegerProperty);\n\n    // --------------------\n    // ScriptValue property\n    // --------------------\n    class ScriptValueProperty : public IPropertyField\n    {\n    public:\n        // Default constructor\n        ScriptValueProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        ScriptValueProperty(RefCounter* refCounter, const ScriptValueProperty& other);\n\n        // Copy operator\n        ScriptValueProperty& operator=(const ScriptValueProperty& other);\n\n        // Sets targets proxies\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        // Specializes field info, processing attributes\n        void SetFieldInfo(const FieldInfo* fieldInfo) override;\n\n        // Sets property caption\n        void SetCaption(const WString& text) override;\n\n        // Returns property caption\n        WString GetCaption() const override;\n\n        // Adds remove button\n        Ref<Button> GetRemoveButton() override;\n\n        // Expands property fields\n        void Expand();\n\n        // Collapses property field\n        void Collapse();\n\n        // Sets properties expanding\n        void SetExpanded(bool expanded);\n\n        // Returns is properties expanded\n        bool IsExpanded() const;\n\n        // Enables or disables spoiler header\n        void SetHeaderEnabled(bool enabled);\n\n        // Returns is spoiler header enabled\n        bool IsHeaderEnabled() const;\n\n        SERIALIZABLE(ScriptValueProperty);\n        CLONEABLE_REF(ScriptValueProperty);\n\n    protected:\n        Ref<Spoiler> mSpoiler; // Properties spoiler. Expands forcible when viewer hasn't header\n\n        Map<String, ScriptValue::ValueType> mPreviousBuiltTypes; // Built types of fields, used to check \n                                                                 // changed properties structure\n        Map<String, Ref<IPropertyField>>    mBuiltProperties;    // Built properties by names\n\n        bool mHeaderEnabled = false; // Is no header attribute exists\n        bool mExpanded = false;      // True when must be expanded after creating object viewer\n\n        bool mNeedUpdateProxies = false; // True when targets changed and required to refresh script values proxies\n\n        bool mIsArray = false; // Is value array\n\n        Ref<IntegerProperty> mCountProperty; // Vector count property\n\n        bool mCountDifferents = false; // Is targets counts of elements are different\n        int  mCountOfElements = 0;     // Common count of elements\n\n        Ref<HorizontalLayout> mHeaderContainer; // Count property and other controls container\n\n        Ref<Button> mAddButton; // Add button, adds new element at end\n\n        bool mIsRefreshing = false; // Is currently refreshing content. Need to prevent cycled size changing\n\n    protected:\n        typedef Vector<Pair<String, Vector<Pair<Ref<IScriptValueProperty>, Ref<IScriptValueProperty>>>>> PropertiesList;\n\n        // Called when property puts in buffer. Releases properties\n        void OnFreeProperty() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Returns mapped common properties\n        PropertiesList GetCommonProperties(const Vector<Pair<ScriptValue, ScriptValue>>& values, bool& isArray) const;\n\n        //Adds property by type\n        void AddProperty(const String& name, const Type* type, int idx);\n\n        // Called when count property changing\n        void OnCountChanged(const Ref<IPropertyField>& def, bool byUser);\n\n        // Called when expanding spoiler, refreshing properties\n        void OnExpand();\n\n        // Sets new count of elements in vector\n        void Resize(int newCount);\n\n        // Removes element from vector\n        void Remove(int idx);\n\n        // Called when add button has pressed\n        void OnAddPressed();\n\n        // Sets property proxies\n        template<typename _type>\n        void SetFieldProxies(PropertiesList& commonProperties, const String& name, const Ref<IPropertyField>& field);\n\n        // Sets property proxies\n        template<typename _type>\n        void SetFieldPtrProxies(PropertiesList& commonProperties, const String& name, const Ref<IPropertyField>& field);\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const String& path, const Vector<DataDocument>& before,\n                               const Vector<DataDocument>& after);\n    };\n\n    template<typename _type>\n    void ScriptValueProperty::SetFieldProxies(PropertiesList& commonProperties, const String& name, \n                                              const Ref<IPropertyField>& field)\n    {\n        auto prop = commonProperties.Find([&](auto& x) { return x.first == name; });\n        auto proxies = prop->second.template Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n            [](auto& x)\n            {\n                Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>> res;\n                res.first = mmake<TypeScriptValueProxy<_type>>(x.first->Clone());\n                if (x.second && x.second->Get().IsObject())\n                    res.second = mmake<TypeScriptValueProxy<_type>>(x.second->Clone());\n\n                return res;\n            });\n\n        field->SetValueAndPrototypeProxy(proxies);\n    }\n\n    template<typename _type>\n    void ScriptValueProperty::SetFieldPtrProxies(PropertiesList& commonProperties, const String& name,\n                                                 const Ref<IPropertyField>& field)\n    {\n        auto prop = commonProperties.Find([&](auto& x) { return x.first == name; });\n        auto proxies = prop->second.template Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n            [](auto& x)\n            {\n                Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>> res;\n                res.first = mmake<PtrScriptValueProxy<_type>>(x.first->Clone());\n                if (x.second && x.second->Get().IsObject())\n                    res.second = mmake<PtrScriptValueProxy<_type>>(x.second->Clone());\n\n                return res;\n            });\n\n        field->SetValueAndPrototypeProxy(proxies);\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ScriptValueProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ScriptValueProperty)\n{\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().NAME(mPreviousBuiltTypes);\n    FIELD().PROTECTED().NAME(mBuiltProperties);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mHeaderEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mExpanded);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNeedUpdateProxies);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsArray);\n    FIELD().PROTECTED().NAME(mCountProperty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mCountDifferents);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mCountOfElements);\n    FIELD().PROTECTED().NAME(mHeaderContainer);\n    FIELD().PROTECTED().NAME(mAddButton);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsRefreshing);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ScriptValueProperty)\n{\n\n    typedef const Vector<Pair<ScriptValue, ScriptValue>>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ScriptValueProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFieldInfo, const FieldInfo*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Button>, GetRemoveButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExpanded, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeaderEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsHeaderEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFreeProperty);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(PropertiesList, GetCommonProperties, _tmp1, bool&);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddProperty, const String&, const Type*, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCountChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnExpand);\n    FUNCTION().PROTECTED().SIGNATURE(void, Resize, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, Remove, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/StringProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"StringProperty.h\"\n\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/EditBoxDropDown.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Utils/Editor/Attributes/ItemsSourceAttribute.h\"\n#include \"../PropertiesContext.h\"\n\nnamespace Editor\n{\n    StringProperty::StringProperty(RefCounter* refCounter):\n        TPropertyField<String>(refCounter)\n    {}\n\n    StringProperty::StringProperty(RefCounter* refCounter, const StringProperty& other) :\n        TPropertyField<String>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    StringProperty& StringProperty::operator=(const StringProperty& other)\n    {\n        TPropertyField<String>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void StringProperty::SetFieldInfo(const FieldInfo* fieldInfo)\n    {\n        TPropertyField::SetFieldInfo(fieldInfo);\n        \n        mUsingDropDown = (fieldInfo && fieldInfo->GetAttribute<ItemsSourceAttribute>());\n        \n        if (mUsingDropDown)\n            UpdateDropDownItems();\n    }\n    \n    void StringProperty::Refresh(bool forcible /*= false*/)\n    {\n        TPropertyField<String>::Refresh(forcible);\n        \n        if (mUsingDropDown)\n            UpdateDropDownItems();\n    }\n\n    void StringProperty::InitializeControls()\n    {\n        mEditBox = FindChildByType<EditBox>();\n        mEditBoxDropDown = FindChildByType<EditBoxDropDown>();\n        \n        if (mEditBox)\n        {\n            mEditBox->onChangeCompleted = THIS_FUNC(OnEdited);\n            mEditBox->text = \"--\";\n        }\n        \n        if (mEditBoxDropDown)\n        {\n            mEditBoxDropDown->onChangeCompleted = THIS_FUNC(OnEdited);\n            mEditBoxDropDown->text = \"--\";\n            \n            if (mFieldInfo && mUsingDropDown)\n                UpdateDropDownItems();\n        }\n    }\n\n    void StringProperty::UpdateValueView()\n    {\n        if (mValuesDifferent)\n        {\n            if (mUsingDropDown)\n                mEditBoxDropDown->text = \"--\";\n            else\n                mEditBox->text = \"--\";\n        }\n        else\n        {\n            if (mUsingDropDown)\n                mEditBoxDropDown->text = mCommonValue;\n            else\n                mEditBox->text = mCommonValue;\n        }\n        \n        if (mEditBox)\n            mEditBox->SetEnabledForcible(!mUsingDropDown);\n            \n        if (mEditBoxDropDown)\n            mEditBoxDropDown->SetEnabledForcible(mUsingDropDown);\n    }\n\n    void StringProperty::OnEdited(const WString& data)\n    {\n        if (mValuesDifferent && data == \"--\")\n            return;\n\n        SetValueByUserAndComplete(data);\n    }\n    \n    void StringProperty::UpdateDropDownItems()\n    {\n        if (!mFieldInfo || !mEditBoxDropDown)\n            return;\n            \n        auto itemsSourceAttribute = mFieldInfo->GetAttribute<ItemsSourceAttribute>();\n        if (!itemsSourceAttribute || itemsSourceAttribute->methodName.IsEmpty())\n            return;\n        \n        auto parentContext = mParentContext.Lock();\n        if (!parentContext || parentContext->targets.IsEmpty())\n            return;\n\n        auto& target = parentContext->targets[0];\n        auto& targetType = target.first->GetType();\n        auto& targetObjType = dynamic_cast<const ObjectType&>(targetType);\n\n        Vector<String> items = targetObjType.Invoke<Vector<String>>(itemsSourceAttribute->methodName,\n                                                                    targetObjType.DynamicCastFromIObject(target.first));\n        \n        bool itemsChanged = (items != mCachedItems);\n        if (itemsChanged)\n        {\n            mCachedItems = items;\n\t\t\tmEditBoxDropDown->RemoveAllItems();\n\t\t\tfor (const auto& item : items)\n\t\t\t\tmEditBoxDropDown->AddItem(item);\n        }\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::String>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::StringProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::String>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::StringProperty, Editor__StringProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/StringProperty.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Button;\n    class EditBox;\n    class EditBoxDropDown;\n    class Widget;\n}\n\nnamespace Editor\n{\n    // -------------------------------\n    // Editor string property edit box\n    // -------------------------------\n    class StringProperty: public TPropertyField<String>\n    {\n    public:\n        // Default constructor\n        StringProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        StringProperty(RefCounter* refCounter, const StringProperty& other);\n\n        // Copy operator\n        StringProperty& operator=(const StringProperty& other);\n\n        // Specializes field info, processing attributes\n        void SetFieldInfo(const FieldInfo* fieldInfo) override;\n        \n        // Refreshes field\n        void Refresh(bool forcible = false) override;\n\n        SERIALIZABLE(StringProperty);\n        CLONEABLE_REF(StringProperty);\n\n    protected:\n        Ref<EditBox>         mEditBox;               // Edit box (used when no ItemsSource)\n        Ref<EditBoxDropDown> mEditBoxDropDown;       // Edit box with dropdown (used with ItemsSource)\n        bool                 mUsingDropDown = false; // Flag indicating if using dropdown\n        Vector<String>       mCachedItems;           // Cached dropdown items list\n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Edit box change event\n        void OnEdited(const WString& data);\n\n        // Updates dropdown items from function in ItemsSource attribute\n        void UpdateDropDownItems();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::StringProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<String>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::StringProperty)\n{\n    FIELD().PROTECTED().NAME(mEditBox);\n    FIELD().PROTECTED().NAME(mEditBoxDropDown);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mUsingDropDown);\n    FIELD().PROTECTED().NAME(mCachedItems);\n}\nEND_META;\nCLASS_METHODS_META(Editor::StringProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const StringProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFieldInfo, const FieldInfo*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEdited, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateDropDownItems);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/TagProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"TagProperty.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n\nnamespace Editor\n{\n    TagsProperty::TagsProperty(RefCounter* refCounter):\n        TPropertyField<TagGroup>(refCounter)\n    {}\n\n    TagsProperty::TagsProperty(RefCounter* refCounter, const TagsProperty& other) :\n        TPropertyField<TagGroup>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    TagsProperty& TagsProperty::operator=(const TagsProperty& other)\n    {\n        TPropertyField<TagGroup>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void TagsProperty::InitializeControls()\n    {\n        mEditBox = FindChildByType<EditBox>();\n        if (mEditBox)\n        {\n            mTagsContext = FindChildByType<ContextMenu>();\n            if (!mTagsContext)\n            {\n                mTagsContext = o2UI.CreateWidget<ContextMenu>();\n                AddChild(mTagsContext);\n            }\n\n            mTagsContext->SetMaxItemsVisible(10);\n            mEditBox->AddChild(mTagsContext);\n\n            mEditBox->onFocused = [&]() { UpdateContextData(\"\"); };\n            mEditBox->onChangeCompleted = THIS_FUNC(OnEditBoxChangeCompleted);\n            mEditBox->onChanged = THIS_FUNC(OnEditBoxChanged);\n            mEditBox->text = \"--\";\n        }\n    }\n\n    void TagsProperty::UpdateValueView()\n    {}\n\n    void TagsProperty::UpdateContextData(const WString& filter)\n    {\n        if (mPushingTag)\n            return;\n\n        mTagsContext->RemoveAllItems();\n        mTagsContext->Show(mEditBox->layout->GetWorldLeftBottom());\n\n        for (auto& tag : o2Scene.GetTags())\n        {\n            if (filter.IsEmpty() || tag->GetName().CountOf(filter) > 0)\n                mTagsContext->AddItem(tag->GetName(), [=]() { PushTag(tag->GetName()); });\n        }\n    }\n\n    void TagsProperty::SetValue(const TagGroup& value, bool byUser)\n    {\n\t\tonBeforeChange(Ref(this), byUser);\n\n        mCommonValue = value;\n        mValuesDifferent = false;\n\n        WString res;\n        for (auto& tag : mCommonValue.GetTagsNames())\n            res += tag + \" \";\n\n        mPushingTag = true;\n        mEditBox->text = res;\n        mPushingTag = false;\n\n        OnValueChanged(byUser);\n    }\n\n    void TagsProperty::OnEditBoxChanged(const WString& text)\n    {\n        if (mPushingTag || !mEditBox->IsFocused())\n            return;\n\n        WString lastTagText;\n\n        int spacePos = text.FindLast(\" \");\n        if (spacePos < 0)\n            lastTagText = text;\n        else\n            lastTagText = text.SubStr(spacePos + 1);\n\n        UpdateContextData(lastTagText);\n    }\n\n    void TagsProperty::OnEditBoxChangeCompleted(const WString& text)\n    {\n        SetTags(text);\n    }\n\n    void TagsProperty::SetTags(const WString &text)\n    {\n        auto tagsNames = text.Split(\" \");\n\n        TagGroup tagsValue;\n\n        for (auto& tagName : tagsNames)\n        {\n            if (!tagName.IsEmpty())\n                tagsValue.AddTag(tagName);\n        }\n\n        SetValueByUserAndComplete(tagsValue);\n    }\n\n    void TagsProperty::PushTag(String name)\n    {\n        String editText = (WString)mEditBox->text;\n\n        int spaceIdx = editText.FindLast(\" \");\n        if (spaceIdx >= 0)\n            editText = editText.SubStr(0, spaceIdx);\n        else\n            editText = \"\";\n\n        if (!editText.IsEmpty())\n            editText += \" \";\n\n        editText += name;\n\n        SetTags(editText);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::TagGroup>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TagsProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::TagGroup>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::TagsProperty, Editor__TagsProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/TagProperty.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Tags.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nnamespace o2\n{\n    class Button;\n    class ContextMenu;\n    class EditBox;\n    class Widget;\n}\n\nnamespace Editor\n{\n    // ------------------------\n    // Editor tags property box\n    // ------------------------\n    class TagsProperty: public TPropertyField<TagGroup>\n    {\n    public:\n        // Default constructor\n        TagsProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        TagsProperty(RefCounter* refCounter, const TagsProperty& other);\n\n        // Copy operator\n        TagsProperty& operator=(const TagsProperty& other);\n\n        SERIALIZABLE(TagsProperty);\n        CLONEABLE_REF(TagsProperty);\n\n    protected:\n        Ref<EditBox>     mEditBox;            // Edit box \n        Ref<ContextMenu> mTagsContext;        // tags context\n        bool             mPushingTag = false; // Is pushing tag and we don't need to check edit text\n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Sets common value\n        void SetValue(const TagGroup& value, bool byUser) override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Updates context menu data with filter\n        void UpdateContextData(const WString& filter);\n\n        // Called when edit box changed\n        void OnEditBoxChanged(const WString& text);\n\n        // Called when edit box changed\n        void OnEditBoxChangeCompleted(const WString& text);\n\n        // Sets tags from string\n        void SetTags(const WString& text);\n\n        // Push tag at the end\n        void PushTag(String name);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::TagsProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<TagGroup>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::TagsProperty)\n{\n    FIELD().PROTECTED().NAME(mEditBox);\n    FIELD().PROTECTED().NAME(mTagsContext);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPushingTag);\n}\nEND_META;\nCLASS_METHODS_META(Editor::TagsProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const TagsProperty&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetValue, const TagGroup&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateContextData, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditBoxChanged, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditBoxChangeCompleted, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetTags, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, PushTag, String);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/Vector2FloatProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Vector2FloatProperty.h\"\n\n#include \"o2Editor/Properties/Basic/FloatProperty.h\"\n\nnamespace Editor\n{\n    Vec2FProperty::Vec2FProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {}\n\n    Vec2FProperty::Vec2FProperty(RefCounter* refCounter, const Vec2FProperty& other) :\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    Vec2FProperty& Vec2FProperty::operator=(const Vec2FProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void Vec2FProperty::InitializeControls()\n    {\n        mXProperty = GetChildByType<FloatProperty>(\"container/layout/properties/x\");\n        mXProperty->SetValuePath(\"x\");\n        mXProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mXProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mXProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mYProperty = GetChildByType<FloatProperty>(\"container/layout/properties/y\");\n        mYProperty->SetValuePath(\"y\");\n        mYProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mYProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mYProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n    }\n\n    void Vec2FProperty::StoreValues(Vector<DataDocument>& data) const\n    {\n        data.Clear();\n        for (auto& ptr : mValuesProxies)\n        {\n            data.Add(DataDocument());\n            data.Last() = GetProxy<Vec2F>(ptr.first);\n        }\n    }\n\n    void Vec2FProperty::OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser)\n    {\n        if (mIsTargetProxiesProperties && byUser)\n            BeginUserChanging();\n    }\n\n    void Vec2FProperty::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onChanged(field, byUser);\n    }\n\n    void Vec2FProperty::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after)\n    {\n        if (mIsTargetProxiesProperties)\n            EndUserChanging();\n        else\n            onChangeCompleted(mValuesPath + \"/\" + path, before, after);\n    }\n        \n    void Vec2FProperty::SetValue(const Vec2F& value)\n    {\n        mXProperty->SetValue(value.x);\n        mYProperty->SetValue(value.y);\n    }\n\n    void Vec2FProperty::SetValueX(float value)\n    {\n        mXProperty->SetValue(value);\n    }\n\n    void Vec2FProperty::SetValueY(float value)\n    {\n        mYProperty->SetValue(value);\n    }\n\n    void Vec2FProperty::SetUnknownValue(const Vec2F& defaultValue /*= Vec2F()*/)\n    {\n        mXProperty->SetUnknownValue(defaultValue.x);\n        mYProperty->SetUnknownValue(defaultValue.y);\n    }\n\n    void Vec2FProperty::SetXUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mXProperty->SetUnknownValue(defaultValue);\n    }\n\n    void Vec2FProperty::SetYUnknownValue(float defaultValue /*= 0.0f*/)\n    {\n        mYProperty->SetUnknownValue(defaultValue);\n    }\n\n    void Vec2FProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        mValuesProxies = targets;\n\n        mIsTargetProxiesProperties = targets.IsEmpty() ? false : dynamic_cast<IPropertyValueProxy*>(targets[0].first.Get()) != nullptr;\n\n        mXProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<XValueProxy>(x.first), x.second ? mmake<XValueProxy>(x.second) : nullptr); }));\n\n        mYProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<YValueProxy>(x.first), x.second ? mmake<YValueProxy>(x.second) : nullptr); }));\n    }\n\n    void Vec2FProperty::Refresh(bool forcible /*= false*/)\n    {\n        if (mValuesProxies.IsEmpty())\n            return;\n\n        mXProperty->Refresh(forcible);\n        mYProperty->Refresh(forcible);\n\n        CheckRevertableState();\n    }\n\n    void Vec2FProperty::Revert()\n    {\n        if (mValuesProxies.IsEmpty())\n            return;\n\n        mXProperty->Refresh();\n        mYProperty->Refresh();\n\n        CheckRevertableState();\n    }\n\n    Vec2F Vec2FProperty::GetCommonValue() const\n    {\n        return Vec2F(mXProperty->GetCommonValue(), mYProperty->GetCommonValue());\n    }\n\n    bool Vec2FProperty::IsValuesDifferent() const\n    {\n        return mXProperty->IsValuesDifferent() || mYProperty->IsValuesDifferent();\n    }\n\n    const Ref<FloatProperty>& Vec2FProperty::GetXProperty() const\n    {\n        return mXProperty;\n    }\n\n    const Ref<FloatProperty>& Vec2FProperty::GetYProperty() const\n    {\n        return mYProperty;\n    }\n\n    const Type* Vec2FProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* Vec2FProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(Vec2F);\n    }\n\n    Vec2FProperty::XValueProxy::XValueProxy(const Ref<IAbstractValueProxy>& proxy):\n        mProxy(proxy)\n    {}\n\n    Vec2FProperty::XValueProxy::XValueProxy()\n    {}\n\n    void Vec2FProperty::XValueProxy::SetValue(const float& value)\n    {\n        Vec2F proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.x = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float Vec2FProperty::XValueProxy::GetValue() const\n    {\n        Vec2F proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.x;\n    }\n\n    Vec2FProperty::YValueProxy::YValueProxy(const Ref<IAbstractValueProxy>& proxy):\n        mProxy(proxy)\n    {}\n\n    Vec2FProperty::YValueProxy::YValueProxy()\n    {}\n\n    void Vec2FProperty::YValueProxy::SetValue(const float& value)\n    {\n        Vec2F proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.y = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    float Vec2FProperty::YValueProxy::GetValue() const\n    {\n        Vec2F proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.y;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::Vec2F>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::Vec2FProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::Vec2F>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::Vec2FProperty, Editor__Vec2FProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/Vector2FloatProperty.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(FloatProperty);\n\n    // ----------------------------\n    // Editor float vector property\n    // ----------------------------\n    class Vec2FProperty: public IPropertyField\n    {\n    public:\n        // Default constructor\n        Vec2FProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        Vec2FProperty(RefCounter* refCounter, const Vec2FProperty& other);\n\n        // Copy operator\n        Vec2FProperty& operator=(const Vec2FProperty& other);\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Reverts value to prototype value\n        void Revert() override;\n\n        // Sets value\n        void SetValue(const Vec2F& value);\n\n        // Sets value X\n        void SetValueX(float value);\n\n        // Sets value Y\n        void SetValueY(float value);\n\n        // Sets value as unknown\n        void SetUnknownValue(const Vec2F& defaultValue = Vec2F());\n\n        // Sets value X as unknown\n        void SetXUnknownValue(float defaultValue = 0.0f);\n\n        // Sets value Y as unknown\n        void SetYUnknownValue(float defaultValue = 0.0f);\n\n        // Returns value\n        Vec2F GetCommonValue() const;\n\n        // Returns is values different\n        bool IsValuesDifferent() const;\n\n        // Returns X property\n        const Ref<FloatProperty>& GetXProperty() const;\n\n        // Returns Y property\n        const Ref<FloatProperty>& GetYProperty() const;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        SERIALIZABLE(Vec2FProperty);\n        CLONEABLE_REF(Vec2FProperty);\n\n    protected:\n        Ref<FloatProperty> mXProperty; // X value property\n        Ref<FloatProperty> mYProperty; // Y value property\n\n        bool mIsTargetProxiesProperties = false; // Is target proxies types is properties\n\n    protected:\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Stores values to data\n        void StoreValues(Vector<DataDocument>& data) const override;\n\n        // Called when some property before change, sets value via proxy\n        void OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed, sets value via proxy\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after);\n\n    protected:\n        class XValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            XValueProxy();\n            XValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n\n        class YValueProxy : public IValueProxy<float>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            YValueProxy();\n            YValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const float& value) override;\n            float GetValue() const override;\n        };\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::Vec2FProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::Vec2FProperty)\n{\n    FIELD().PROTECTED().NAME(mXProperty);\n    FIELD().PROTECTED().NAME(mYProperty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsTargetProxiesProperties);\n}\nEND_META;\nCLASS_METHODS_META(Editor::Vec2FProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Vec2FProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Revert);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueX, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueY, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetUnknownValue, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetXUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetYUnknownValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetCommonValue);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValuesDifferent);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<FloatProperty>&, GetXProperty);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<FloatProperty>&, GetYProperty);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, StoreValues, Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyBeforeChange, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/Vector2IntProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Vector2IntProperty.h\"\n\n#include \"o2Editor/Properties/Basic/IntegerProperty.h\"\n\nnamespace Editor\n{\n    Vec2IProperty::Vec2IProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {}\n\n    Vec2IProperty::Vec2IProperty(RefCounter* refCounter, const Vec2IProperty& other):\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    Editor::Vec2IProperty& Vec2IProperty::operator=(const Vec2IProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void Vec2IProperty::InitializeControls()\n    {\n        mXProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/x\");\n        mXProperty->SetValuePath(\"x\");\n        mXProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mXProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mXProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mYProperty = GetChildByType<IntegerProperty>(\"container/layout/properties/y\");\n        mYProperty->SetValuePath(\"y\");\n        mYProperty->onBeforeChange = THIS_FUNC(OnPropertyBeforeChange);\n        mYProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mYProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n    }\n\n    void Vec2IProperty::SetValue(const Vec2I& value)\n    {\n        mXProperty->SetValue(value.x);\n        mYProperty->SetValue(value.y);\n    }\n\n    void Vec2IProperty::SetValueX(int value)\n    {\n        mXProperty->SetValue(value);\n    }\n\n    void Vec2IProperty::SetValueY(int value)\n    {\n        mYProperty->SetValue(value);\n    }\n\n    void Vec2IProperty::SetUnknownValue(const Vec2I& defaultValue /*= Vec2I()*/)\n    {\n        mXProperty->SetUnknownValue(defaultValue.x);\n        mYProperty->SetUnknownValue(defaultValue.y);\n    }\n\n    void Vec2IProperty::SetXUnknownValue(int defaultValue /*= 0.0f*/)\n    {\n        mXProperty->SetUnknownValue(defaultValue);\n    }\n\n    void Vec2IProperty::SetYUnknownValue(int defaultValue /*= 0.0f*/)\n    {\n        mYProperty->SetUnknownValue(defaultValue);\n    }\n\n    void Vec2IProperty::StoreValues(Vector<DataDocument>& data) const\n    {\n        data.Clear();\n        for (auto& ptr : mValuesProxies)\n        {\n            data.Add(DataDocument());\n            data.Last() = GetProxy<Vec2I>(ptr.first);\n        }\n    }\n\n    void Vec2IProperty::OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser)\n    {\n        if (mIsTargetProxiesProperties && byUser)\n            BeginUserChanging();\n    }\n\n    void Vec2IProperty::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onChanged(field, byUser);\n    }\n\n    void Vec2IProperty::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after)\n    {\n        if (mIsTargetProxiesProperties)\n            EndUserChanging();\n        else\n            onChangeCompleted(mValuesPath + \"/\" + path, before, after);\n    }\n\n    void Vec2IProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        mValuesProxies = targets;\n\n        mIsTargetProxiesProperties = targets.IsEmpty() ? false : dynamic_cast<IPropertyValueProxy*>(targets[0].first.Get()) != nullptr;\n\n        mXProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<XValueProxy>(x.first), x.second ? mmake<XValueProxy>(x.second) : nullptr); }));\n\n        mYProperty->SetValueAndPrototypeProxy(targets.Convert<TargetPair>([](const TargetPair& x) {\n            return TargetPair(mmake<YValueProxy>(x.first), x.second ? mmake<YValueProxy>(x.second) : nullptr); }));\n    }\n\n    void Vec2IProperty::Refresh(bool forcible /*= false*/)\n    {\n        if (mValuesProxies.IsEmpty())\n            return;\n\n        mXProperty->Refresh(forcible);\n        mYProperty->Refresh(forcible);\n\n        CheckRevertableState();\n    }\n\n    void Vec2IProperty::Revert()\n    {\n        if (mValuesProxies.IsEmpty())\n            return;\n\n        mXProperty->Refresh();\n        mYProperty->Refresh();\n\n        CheckRevertableState();\n    }\n\n    Vec2I Vec2IProperty::GetCommonValue() const\n    {\n        return Vec2I(mXProperty->GetCommonValue(), mYProperty->GetCommonValue());\n    }\n\n    bool Vec2IProperty::IsValuesDifferent() const\n    {\n        return mXProperty->IsValuesDifferent() || mYProperty->IsValuesDifferent();\n    }\n\n    const Type* Vec2IProperty::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* Vec2IProperty::GetValueTypeStatic()\n    {\n        return &TypeOf(Vec2I);\n    }\n\n    Vec2IProperty::XValueProxy::XValueProxy(const Ref<IAbstractValueProxy>& proxy):\n        mProxy(proxy)\n    {}\n\n    Vec2IProperty::XValueProxy::XValueProxy()\n    {}\n\n    void Vec2IProperty::XValueProxy::SetValue(const int& value)\n    {\n        Vec2I proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.x = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int Vec2IProperty::XValueProxy::GetValue() const\n    {\n        Vec2I proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.x;\n    }\n\n    Vec2IProperty::YValueProxy::YValueProxy(const Ref<IAbstractValueProxy>& proxy):\n        mProxy(proxy)\n    {}\n\n    Vec2IProperty::YValueProxy::YValueProxy()\n    {}\n\n    void Vec2IProperty::YValueProxy::SetValue(const int& value)\n    {\n        Vec2I proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        proxyValue.y = value;\n        mProxy->SetValuePtr(&proxyValue);\n    }\n\n    int Vec2IProperty::YValueProxy::GetValue() const\n    {\n        Vec2I proxyValue;\n        mProxy->GetValuePtr(&proxyValue);\n        return proxyValue.y;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::Vec2I>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::Vec2IProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::Vec2I>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::Vec2IProperty, Editor__Vec2IProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/Vector2IntProperty.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IntegerProperty);\n\n    // ----------------------------\n    // Editor int vector property\n    // ----------------------------\n    class Vec2IProperty : public IPropertyField\n    {\n    public:\n        // Default constructor\n        Vec2IProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        Vec2IProperty(RefCounter* refCounter, const Vec2IProperty& other);\n\n        // Copy operator\n        Vec2IProperty& operator=(const Vec2IProperty& other);\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Reverts value to prototype value\n        void Revert() override;\n\n        // Sets value\n        void SetValue(const Vec2I& value);\n\n        // Sets value X\n        void SetValueX(int value);\n\n        // Sets value Y\n        void SetValueY(int value);\n\n        // Sets value as unknown\n        void SetUnknownValue(const Vec2I& defaultValue = Vec2I());\n\n        // Sets value X as unknown\n        void SetXUnknownValue(int defaultValue = 0.0f);\n\n        // Sets value Y as unknown\n        void SetYUnknownValue(int defaultValue = 0.0f);\n\n        // Returns value\n        Vec2I GetCommonValue() const;\n\n        // Returns is values different\n        bool IsValuesDifferent() const;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        SERIALIZABLE(Vec2IProperty);\n        CLONEABLE_REF(Vec2IProperty);\n\n    protected:\n        Ref<IntegerProperty> mXProperty; // X value property\n        Ref<IntegerProperty> mYProperty; // Y value property\n\n        bool mIsTargetProxiesProperties = false; // Is target proxies types is properties\n\n    protected:\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Stores values to data\n        void StoreValues(Vector<DataDocument>& data) const override;\n\n        // Called when some property before change, sets value via proxy\n        void OnPropertyBeforeChange(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed, sets value via proxy\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after);\n\n    protected:\n        class XValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            XValueProxy();\n            XValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n\n        class YValueProxy : public IValueProxy<int>\n        {\n            Ref<IAbstractValueProxy> mProxy;\n\n        public:\n            YValueProxy();\n            YValueProxy(const Ref<IAbstractValueProxy>& proxy);\n\n            void SetValue(const int& value) override;\n            int GetValue() const override;\n        };\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::Vec2IProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::Vec2IProperty)\n{\n    FIELD().PROTECTED().NAME(mXProperty);\n    FIELD().PROTECTED().NAME(mYProperty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsTargetProxiesProperties);\n}\nEND_META;\nCLASS_METHODS_META(Editor::Vec2IProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Vec2IProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Revert);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, const Vec2I&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueX, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueY, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetUnknownValue, const Vec2I&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetXUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetYUnknownValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetCommonValue);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValuesDifferent);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, StoreValues, Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyBeforeChange, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/VectorProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"VectorProperty.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/Attributes/InvokeOnChangeAttribute.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Basic/IntegerProperty.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    VectorProperty::VectorProperty(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {\n        InitializeControls();\n    }\n\n    VectorProperty::VectorProperty(RefCounter* refCounter, const VectorProperty& other):\n        IPropertyField(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    VectorProperty& VectorProperty::operator=(const VectorProperty& other)\n    {\n        IPropertyField::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void VectorProperty::OnPropertyEnabled()\n    {\n        for (auto& property : mValueProperties)\n            property->SetPropertyEnabled(true);\n    }\n\n    void VectorProperty::OnPropertyDisabled()\n    {\n        for (auto& property : mValueProperties)\n            property->SetPropertyEnabled(false);\n    }\n\n    void VectorProperty::InitializeControls()\n    {\n        // Spoiler\n        mSpoiler = FindChildByType<Spoiler>(false);\n\n        if (!mSpoiler)\n        {\n            mSpoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n            AddChild(mSpoiler);\n        }\n\n        if (mSpoiler)\n            mSpoiler->onExpand = THIS_FUNC(OnExpand);\n\n        mSpoiler->borderTop = 5;\n\n        mHeaderContainer = mmake<HorizontalLayout>();\n        *mHeaderContainer->layout = WidgetLayout::HorStretch(VerAlign::Top, 100, 0, 20, 0);\n        mHeaderContainer->layout->minHeight = 20;\n        mHeaderContainer->baseCorner = BaseCorner::Right;\n        mHeaderContainer->expandHeight = false;\n        mHeaderContainer->SetInternalParent(mSpoiler, false);\n\n        // Add button\n        mAddButton = mSpoiler->FindChildByTypeAndName<Button>(\"add button\");\n        if (!mAddButton)\n        {\n            mAddButton = o2UI.CreateWidget<Button>(\"add small\");\n            mAddButton->name = \"add button\";\n            mAddButton->layout->maxWidth = 20;\n            mAddButton->layout->minHeight = 20;\n            mAddButton->onClick = THIS_FUNC(OnAddPressed);\n\n            mHeaderContainer->AddChild(mAddButton);\n        }\n\n        // Count property\n        mCountProperty = mSpoiler->FindChildByType<IntegerProperty>(false);\n        if (!mCountProperty)\n            mCountProperty = o2UI.CreateWidget<IntegerProperty>();\n\n        if (mCountProperty)\n        {\n            mHeaderContainer->AddChild(mCountProperty);\n\n            mCountProperty->layout->maxWidth = 40;\n            mCountProperty->SetValue(0);\n            mCountProperty->onChanged = THIS_FUNC(OnCountChanged);\n        }\n\n        // Other\n        expandHeight = true;\n        expandWidth = true;\n        fitByChildren = true;\n    }\n\n    VectorProperty::~VectorProperty()\n    {}\n\n    void VectorProperty::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        for (auto& pair : mTargetObjects) {\n            if (pair.first.isCreated)\n                delete pair.first.data;\n\n            if (pair.second.isCreated)\n                delete pair.second.data;\n        }\n\n        mTargetObjects.Clear();\n\n        for (auto& pair : targets)\n            mTargetObjects.Add({ GetObjectFromProxy(pair.first), GetObjectFromProxy(pair.second) });\n\n        Refresh();\n    }\n\n    void VectorProperty::Refresh(bool forcible /*= false*/)\n    {\n        PushEditorScopeOnStack scope;\n\n        if (mTargetObjects.IsEmpty())\n            return;\n        \n        mIsRefreshing = true;\n\n        if (IsExpanded())\n        {\n            for (auto& pair : mTargetObjects)\n            {\n                pair.first.Refresh();\n                pair.second.Refresh();\n            }\n        }\n\n        auto lastDifferent = mCountDifferents;\n\n        mCountOfElements = mVectorType->GetObjectVectorSize(mTargetObjects[0].first.data);\n        mCountDifferents = false;\n\n        for (auto& target : mTargetObjects)\n        {\n            int targetCount = mVectorType->GetObjectVectorSize(target.first.data);\n            if (targetCount != mCountOfElements)\n            {\n                mCountDifferents = true;\n                break;\n            }\n        }\n\n        if (mCountDifferents)\n        {\n            if (!lastDifferent)\n            {\n                mCountProperty->SetUnknownValue();\n\n                if (IsExpanded())\n                {\n                    for (auto& prop : mValueProperties)\n                    {\n                        mSpoiler->RemoveChild(prop, false);\n                        FreeValueProperty(prop);\n                    }\n\n                    mValueProperties.Clear();\n\n                    mAddButton->Hide(true);\n\n                    onChanged(Ref(this), false);\n                    o2EditorSceneScreen.OnSceneChanged();\n                }\n            }\n        }\n        else if (lastDifferent || mValueProperties.Count() != mCountOfElements || forcible)\n        {\n            mCountProperty->SetValue(mCountOfElements);\n\n            if (IsExpanded())\n            {\n                int i = 0;\n                for (; i < mCountOfElements; i++)\n                {\n                    auto itemTargetValues = mTargetObjects.Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n                        [&](const Pair<TargetObjectData, TargetObjectData>& x)\n                    {\n                        return Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(\n                            mVectorType->GetObjectVectorElementProxy(x.first.data, i),\n                            x.second.data ? mVectorType->GetObjectVectorElementProxy(x.second.data, i) : nullptr);\n                    });\n\n                    Ref<IPropertyField> propertyDef;\n                    if (i < mValueProperties.Count())\n                        propertyDef = mValueProperties[i];\n                    else\n                    {\n                        propertyDef = GetFreeValueProperty();\n                        mValueProperties.Add(propertyDef);\n                    }\n\n                    mSpoiler->AddChild(propertyDef);\n                    propertyDef->SetCaption(GetElementCaption(i, itemTargetValues));\n                    propertyDef->SetValueAndPrototypeProxy(itemTargetValues);\n                    propertyDef->SetValuePath((String)i);\n                    propertyDef->GetRemoveButton()->onClick = [=]() { Remove(i); };\n\n                    propertyDef->onChangeCompleted =\n                        [&](const String& path, const Vector<DataDocument>& before, const Vector<DataDocument>& after)\n                    {\n                        OnPropertyChanged(mValuesPath + \"/\" + path, before, after);\n                    };\n                }\n\n                for (; i < mValueProperties.Count(); i++)\n                {\n                    mSpoiler->RemoveChild(mValueProperties[i]);\n                    FreeValueProperty(mValueProperties[i]);\n                }\n\n                mValueProperties.Resize(mCountOfElements);\n\n                mAddButton->Show(true);\n\n                mSpoiler->SetLayoutDirty();\n\n                onChanged(Ref(this), false);\n                o2EditorSceneScreen.OnSceneChanged();\n            }\n        }\n        else\n        {\n            if (IsExpanded())\n            {\n                for (int i = 0; i < mCountOfElements; i++)\n                {\n                    auto itemTargetValues = mTargetObjects.Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n                        [&](const Pair<TargetObjectData, TargetObjectData>& x)\n                    {\n                        return Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(\n                            mVectorType->GetObjectVectorElementProxy(x.first.data, i),\n                            x.second.data ? mVectorType->GetObjectVectorElementProxy(x.second.data, i) : nullptr);\n                    });\n\n                    auto propertyDef = mValueProperties[i];\n                    propertyDef->SetValueAndPrototypeProxy(itemTargetValues);\n                    propertyDef->SetCaption(GetElementCaption(i, itemTargetValues));\n                }\n            }\n        }\n\n        if (!mHeaderEnabled)\n        {\n\t\t\tmHeaderContainer->SetInternalParent(nullptr);\n\t\t\tmHeaderContainer->SetDrawingDepthInheritFromParent(true);\n            mSpoiler->AddChild(mHeaderContainer);\n        }\n\n        mIsRefreshing = false;\n    }\n\n    const Type* VectorProperty::GetValueType() const\n    {\n        return mVectorType;\n    }\n\n    void VectorProperty::SpecializeType(const Type* type)\n    {\n        mVectorType = nullptr;\n\n        if (type->GetUsage() == Type::Usage::Vector)\n            mVectorType = dynamic_cast<const VectorType*>(type);\n        else if (type->GetUsage() == Type::Usage::Property) \n        {\n            auto propertyType = dynamic_cast<const PropertyType*>(type);\n\n            if (propertyType->GetValueType()->GetUsage() == Type::Usage::Vector)\n                mVectorType = dynamic_cast<const VectorType*>(propertyType->GetValueType());\n        }\n    }\n\n    void VectorProperty::SetFieldInfo(const FieldInfo* fieldInfo)\n    {\n        IPropertyField::SetFieldInfo(fieldInfo);\n\n        if (fieldInfo)\n        {\n            if (fieldInfo->HasAttribute<ExpandedByDefaultAttribute>())\n                mSpoiler->Expand(true);\n        }\n    }\n\n    const Type* VectorProperty::GetSpecializedType() const\n    {\n        return mVectorType;\n    }\n\n    void VectorProperty::SetCaption(const WString& text)\n    {\n        mSpoiler->SetCaption(text);\n\n        auto spoilerCaptionLayer = mSpoiler->GetLayerDrawable<Text>(\"caption\");\n        if (spoilerCaptionLayer)\n        {\n            Vec2F captionSize = Text::GetTextSize(text, spoilerCaptionLayer->GetFont(), spoilerCaptionLayer->GetFontHeight());\n            *mHeaderContainer->layout = WidgetLayout::HorStretch(VerAlign::Top, captionSize.x + 20.0f, 0, 17, 0);\n            mHeaderContainer->layout->minHeight = 17;\n        }\n    }\n\n    WString VectorProperty::GetCaption() const\n    {\n        return mSpoiler->GetCaption();\n    }\n\n    Ref<Button> VectorProperty::GetRemoveButton()\n    {\n        if (!mRemoveBtn)\n        {\n            mRemoveBtn = o2UI.CreateWidget<Button>(\"remove small\");\n            mRemoveBtn->layout->maxWidth = 20;\n            mRemoveBtn->layout->minHeight = 20;\n            mHeaderContainer->AddChild(mRemoveBtn, 0);\n        }\n\n        return mRemoveBtn;\n    }\n\n\tvoid VectorProperty::Expand(bool forcible /*= false*/)\n    {\n        SetExpanded(true, forcible);\n    }\n\n    void VectorProperty::Collapse(bool forcible /*= false*/)\n    {\n        SetExpanded(false, forcible);\n    }\n\n    void VectorProperty::SetExpanded(bool expanded, bool forcible /*= false*/)\n    {\n        mSpoiler->SetExpanded(expanded, forcible);\n    }\n\n    bool VectorProperty::IsExpanded() const\n    {\n        return mSpoiler->IsExpanded() || !mHeaderEnabled;\n    }\n\n\tvoid VectorProperty::SetHeaderEnabled(bool enabled)\n\t{\n\t\tmHeaderEnabled = enabled;\n\n\t\tif (mHeaderEnabled)\n\t\t{\n\t\t\tmSpoiler->SetHeadHeight(20);\n            mSpoiler->GetLayerDrawable<Text>(\"caption\")->enabled = true;\n            mSpoiler->GetInternalWidget(\"expand\")->enabledForcibly = true;\n            mSpoiler->borderTop = 2;\n            mHeaderContainer->SetInternalParent(mSpoiler);\n\t\t}\n\t\telse\n\t\t{\n            mSpoiler->SetHeadHeight(0);\n            mSpoiler->GetLayerDrawable<Text>(\"caption\")->enabled = false;\n            mSpoiler->GetInternalWidget(\"expand\")->enabledForcibly = false;\n            mSpoiler->borderTop = 0;\n            mSpoiler->Expand(true);\n            mHeaderContainer->SetInternalParent(nullptr);\n\t\t}\n\t}\n\n\tbool VectorProperty::IsHeaderEnabled() const\n\t{\n        return mHeaderEnabled;\n\t}\n\n\tvoid VectorProperty::SetCaptionIndexesEnabled(bool enabled)\n\t{\n        mCaptionIndexesEnabled = enabled;\n\t}\n\n\tbool VectorProperty::IsCaptionIndexesEnabled() const\n\t{\n        return mCaptionIndexesEnabled;\n\t}\n\n\tvoid VectorProperty::SetCountEditBoxEnabled(bool enabled)\n\t{\n        mCountEditBoxEnabled = enabled;\n        mCountProperty->SetEnabled(enabled);\n\t}\n\n\tbool VectorProperty::IsCountEditBoxEnabled() const\n\t{\n        return mCountEditBoxEnabled;\n\t}\n\n\tvoid* VectorProperty::GetProxyValuePointer(const Ref<IAbstractValueProxy>& proxy) const\n    {\n        auto variableProxy = DynamicCast<IPointerValueProxy>(proxy);\n        if (variableProxy)\n            return variableProxy->GetValueVoidPointer();\n\n        return nullptr;\n    }\n\n    Ref<VectorProperty::IPropertyField> VectorProperty::GetFreeValueProperty()\n    {\n        if (!mValuePropertiesPool.IsEmpty())\n            return mValuePropertiesPool.PopBack();\n\n        auto res = o2EditorProperties.CreateFieldProperty(mVectorType->GetElementType(), \"Element\", \n                                                          onChangeCompleted, onChanged);\n\n        if (mParentContext)\n            res->SetParentContext(mParentContext.Lock());\n\n        res->AddLayer(\"drag\", mmake<Sprite>(\"ui/UI4_drag_handle.png\"), Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-18, 0)));\n\n        if (res)\n            res->SetFieldInfo(mFieldInfo);\n\n        return res;\n    }\n\n    void VectorProperty::FreeValueProperty(const Ref<IPropertyField>& def)\n    {\n        mValuePropertiesPool.Add(def);\n    }\n\n    void VectorProperty::OnCountChanged(const Ref<IPropertyField>& def, bool byUser)\n    {\n        if (mIsRefreshing)\n            return;\n\n        Resize(mCountProperty->GetCommonValue());\n    }\n\n    void VectorProperty::OnAddPressed()\n    {\n        Expand();\n        Resize(mCountOfElements + 1);\n    }\n\n    void VectorProperty::OnExpand()\n    {\n        Refresh();\n    }\n\n    VectorProperty::TargetObjectData VectorProperty::GetObjectFromProxy(const Ref<IAbstractValueProxy>& proxy)\n    {\n        TargetObjectData res;\n\n        if (!proxy)\n            return res;\n\n        res.proxy = proxy;\n\n        if (auto pointerProxy = DynamicCast<IPointerValueProxy>(proxy)) \n        {\n            res.data = pointerProxy->GetValueVoidPointer();\n            res.isCreated = false;\n        }\n        else\n        {\n            void* sample = proxy->GetType().CreateSample();\n            proxy->GetValuePtr(sample);\n\n            res.data = sample;\n            res.isCreated = true;\n        }\n\n        return res;\n    }\n\n\tString VectorProperty::GetElementCaption(int idx, const Vector<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>& targets)\n\t{\n\t\tString caption = mCaptionIndexesEnabled ? (String)\"# \" + (String)idx : String::empty;\n\n\t\tif (!targets.IsEmpty())\n\t\t{\n\t\t\tauto& targetValue = targets[0].first;\n\t\t\tauto& type = targetValue->GetType();\n\t\t\tvoid* object = type.CreateSample();\n\t\t\ttargetValue->GetValuePtr(object);\n\t\t\tString name = TryGetObjectName(object, type);\n\t\t\ttype.DestroySample(object);\n\n            if (!name.IsEmpty())\n            {\n                if (mCaptionIndexesEnabled)\n                    caption += \" \";\n\n                caption += name;\n            }\n\t\t}\n\n        return caption;\n\t}\n\n\tString VectorProperty::TryGetObjectName(void* object, const Type& type) const\n\t{\n        static Vector<String> searchNames = { \"name\", \"id\", \"mName\", \"mId\", \"_name\", \"_id\" };\n\n\t\tif (!object)\n\t\t\treturn String::empty;\n\n        if (type.GetUsage() == Type::Usage::Reference)\n        {\n            if (auto referenceType = dynamic_cast<const ReferenceType*>(&type))\n                return TryGetObjectName(referenceType->GetObjectRawPtr(object), *referenceType->GetBaseType());\n        }\n\n        for (auto& fieldInfo : type.GetFields())\n        {\n            if (searchNames.Contains(fieldInfo.GetName()))\n            {\n                if (fieldInfo.GetType() == &TypeOf(String))\n                {\n                    String value = fieldInfo.GetValue<String>(object);\n                    return value;\n                }\n                else if (fieldInfo.GetType()->GetUsage() == Type::Usage::Property)\n                {\n\t\t\t\t\tauto propertyType = dynamic_cast<const PropertyType*>(fieldInfo.GetType());\n                    if (propertyType->GetValueType() == &TypeOf(String))\n\t\t\t\t\t{\n\t\t\t\t\t\tString value;\n                        auto valueProxy = propertyType->GetValueProxy(fieldInfo.GetValuePtr(object));\n\t\t\t\t\t\tvalueProxy->GetValuePtr(&value);\n\t\t\t\t\t\treturn value;\n                    }\n                }\n            }\n        }\n\n        for (auto& base : type.GetBaseTypes())\n        {\n            void* baseObject = base.dynamicCastUpFunc(object);\n            String value = TryGetObjectName(baseObject, *base.type);\n            if (!value.IsEmpty())\n                return value;\n        }\n\n        return String::empty;\n\t}\n\n\tvoid VectorProperty::OnPropertyChanged(const String& path, const Vector<DataDocument>& before,\n                                           const Vector<DataDocument>& after)\n    {\n        for (auto& pair : mTargetObjects)\n            pair.first.SetValue();\n\n        onChangeCompleted(path, before, after);\n    }\n\n    void VectorProperty::Resize(int newCount)\n    {\n\t\tonBeforeChange(Ref(this), true);\n\n        newCount = Math::Max(0, newCount);\n\n        Vector<DataDocument> prevValues, newValues;\n        auto elementFieldInfo = mVectorType->GetElementFieldInfo();\n\n        for (auto& obj : mTargetObjects)\n        {\n            prevValues.Add(DataDocument());\n            prevValues.Last()[\"Size\"].Set(mVectorType->GetObjectVectorSize(obj.first.data));\n            DataValue& elementsData = prevValues.Last()[\"Elements\"];\n\n            int lastCount = mVectorType->GetObjectVectorSize(obj.first.data);\n            for (int i = newCount; i < lastCount; i++)\n            {\n                elementFieldInfo->Serialize(mVectorType->GetObjectVectorElementPtr(obj.first.data, i),\n                                            elementsData.AddMember(\"Element\" + (String)i));\n            }\n\n            newValues.Add(DataDocument());\n            newValues.Last()[\"Size\"].Set(newCount);\n\n            mVectorType->SetObjectVectorSize(obj.first.data, newCount);\n        }\n\n        Refresh();\n\n        if (prevValues != newValues)\n            onChangeCompleted(mValuesPath + \"/count\", prevValues, newValues);\n\n        onChanged(Ref(this), true);\n        o2EditorSceneScreen.OnSceneChanged();\n    }\n\n    void VectorProperty::Remove(int idx)\n    {\n\t\tonBeforeChange(Ref(this), true);\n\n        Vector<DataDocument> prevValues, newValues;\n\n        for (auto& obj : mTargetObjects)\n        {\n            prevValues.Add(DataDocument());\n            mVectorType->Serialize(obj.first.data, prevValues.Last());\n\n            mVectorType->RemoveObjectVectorElement(obj.first.data, idx);\n\n            newValues.Add(DataDocument());\n            mVectorType->Serialize(obj.first.data, newValues.Last());\n        }\n\n        Refresh();\n\n        if (prevValues != newValues)\n            onChangeCompleted(mValuesPath, prevValues, newValues);\n\n        onChanged(Ref(this), true);\n        o2EditorSceneScreen.OnSceneChanged();\n    }\n\n    void VectorProperty::TargetObjectData::Refresh()\n    {\n        if (!isCreated)\n            return;\n\n        proxy->GetValuePtr(data);\n    }\n\n    void VectorProperty::TargetObjectData::SetValue()\n    {\n        if (!isCreated)\n            return;\n\n        proxy->SetValuePtr(data);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::VectorProperty>);\n// --- META ---\n\nDECLARE_CLASS(Editor::VectorProperty, Editor__VectorProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/VectorProperty.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Property.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Button;\n    class Spoiler;\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IntegerProperty);\n\n    // ----------------------\n    // Editor vector property\n    // ----------------------\n    class VectorProperty: public IPropertyField\n    {\n    public:\n        // Default constructor\n        VectorProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        VectorProperty(RefCounter* refCounter, const VectorProperty& other);\n\n        // Copy operator\n        VectorProperty& operator=(const VectorProperty& other);\n\n        // Destructor\n        ~VectorProperty();\n\n        // Sets fields\n        void SetValueAndPrototypeProxy(const TargetsVec& targets) override;\n\n        // Updates and checks value\n        void Refresh(bool forcible = false) override;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Sets property caption\n        void SetCaption(const WString& text) override;\n\n        // Returns property caption\n        WString GetCaption() const override;\n\n        // Adds remove button\n        Ref<Button> GetRemoveButton() override;\n\n        // Specializes vector type\n        void SpecializeType(const Type* type);\n\n        // Specializes field info, processing attributes\n        void SetFieldInfo(const FieldInfo* fieldInfo) override;\n\n        // Returns specialized vector type\n        const Type* GetSpecializedType() const;\n\n        // Expands property fields\n\t\tvoid Expand(bool forcible = false);\n\n        // Collapses property field\n        void Collapse(bool forcible = false);\n\n        // Sets properties expanding\n        void SetExpanded(bool expanded, bool forcible = false);\n\n        // Returns is properties expanded\n        bool IsExpanded() const;\n\n        // Enables or disables spoiler header\n        void SetHeaderEnabled(bool enabled);\n\n        // Returns is spoiler header enabled\n        bool IsHeaderEnabled() const;\n\n        // Sets enabled or disabled elements indexes in caption\n        void SetCaptionIndexesEnabled(bool enabled);\n\n        // Returns is enabled or disabled elements indexes in caption\n        bool IsCaptionIndexesEnabled() const;\n\n        // Sets enabled or disabled elements count edit box\n        void SetCountEditBoxEnabled(bool enabled);\n\n        // Return enabled or disabled elements count edit box\n        bool IsCountEditBoxEnabled() const;\n\n        SERIALIZABLE(VectorProperty);\n        CLONEABLE_REF(VectorProperty);\n\n    protected:\n        struct TargetObjectData\n        {\n            Ref<IAbstractValueProxy> proxy;\n\n            void* data = nullptr;\n            bool  isCreated = false;\n\n            bool operator==(const TargetObjectData& other) const { return proxy == other.proxy; }\n\n            void Refresh();\n            void SetValue();\n        };\n\n    protected:\n        Ref<Spoiler> mSpoiler; // Properties spoiler\n\n        const VectorType* mVectorType = nullptr; // Vector type\n\n        Vector<Pair<TargetObjectData, TargetObjectData>>  mTargetObjects; // Target objects\n                                                     \n        Vector<Ref<IPropertyField>> mValueProperties;     // Values properties\n        Vector<Ref<IPropertyField>> mValuePropertiesPool; // Unused value properties pool\n\n        Ref<IntegerProperty> mCountProperty; // Vector count property\n\n        bool mCountDifferents = false; // Is targets counts of elements are different\n        int  mCountOfElements = 0;     // Common count of elements\n\n        Ref<HorizontalLayout> mHeaderContainer; // Count property and other controls container\n\n        bool mHeaderEnabled = true;         // Is header of spoiler enabled\n        bool mCaptionIndexesEnabled = true; // Is enabled or disabled elements indexes in caption\n        bool mCountEditBoxEnabled = true;   // Is enabled or disabled elements count edit box\n\n        Ref<Button> mAddButton; // Add button, adds new element at end\n\n        bool mIsRefreshing = false; // Is currently refreshing content. Need to prevent cycled size changing\n\n    protected:\n        // Enable property event function\n        void OnPropertyEnabled() override;\n\n        // Disable property event function\n        void OnPropertyDisabled() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Returns value pointer from proxy when proxy is pointer proxy\n        void* GetProxyValuePointer(const Ref<IAbstractValueProxy>& proxy) const;\n\n        // Returns free element property\n        Ref<IPropertyField> GetFreeValueProperty();\n\n        // Frees element property\n        void FreeValueProperty(const Ref<IPropertyField>& def);\n\n        // Called when count property changing\n        void OnCountChanged(const Ref<IPropertyField>& def, bool byUser);\n\n        // Sets new count of elements in vector\n        void Resize(int newCount);\n\n        // Removes element from vector\n        void Remove(int idx);\n\n        // Called when add button has pressed\n        void OnAddPressed();\n\n        // Called when expanding spoiler, refreshing array properties\n        void OnExpand();\n\n        // Returns object target data from proxy. Creates copy of object when it is property proxy, or gets pointer from pointer proxy\n        TargetObjectData GetObjectFromProxy(const Ref<IAbstractValueProxy>& proxy);\n\n        // Returns element caption by number and name\n        String GetElementCaption(int idx, const Vector<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>& targets);\n\n        // Tries to find object name by reflection\n        String TryGetObjectName(void* object, const Type& type) const;\n\n        // Called when some property changed, sets value via proxy\n        void OnPropertyChanged(const String& path, const Vector<DataDocument>& before, \n                               const Vector<DataDocument>& after);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::VectorProperty)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::VectorProperty)\n{\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mVectorType);\n    FIELD().PROTECTED().NAME(mTargetObjects);\n    FIELD().PROTECTED().NAME(mValueProperties);\n    FIELD().PROTECTED().NAME(mValuePropertiesPool);\n    FIELD().PROTECTED().NAME(mCountProperty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mCountDifferents);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mCountOfElements);\n    FIELD().PROTECTED().NAME(mHeaderContainer);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mHeaderEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mCaptionIndexesEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mCountEditBoxEnabled);\n    FIELD().PROTECTED().NAME(mAddButton);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsRefreshing);\n}\nEND_META;\nCLASS_METHODS_META(Editor::VectorProperty)\n{\n\n    typedef const Vector<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const VectorProperty&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Button>, GetRemoveButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, SpecializeType, const Type*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFieldInfo, const FieldInfo*);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetSpecializedType);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExpanded, bool, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeaderEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsHeaderEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaptionIndexesEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsCaptionIndexesEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCountEditBoxEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsCountEditBoxEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void*, GetProxyValuePointer, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<IPropertyField>, GetFreeValueProperty);\n    FUNCTION().PROTECTED().SIGNATURE(void, FreeValueProperty, const Ref<IPropertyField>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCountChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, Resize, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, Remove, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnExpand);\n    FUNCTION().PROTECTED().SIGNATURE(TargetObjectData, GetObjectFromProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PROTECTED().SIGNATURE(String, GetElementCaption, int, _tmp1);\n    FUNCTION().PROTECTED().SIGNATURE(String, TryGetObjectName, void*, const Type&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/WStringProperty.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"WStringProperty.h\"\n\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n\nnamespace Editor\n{\n    WStringProperty::WStringProperty(RefCounter* refCounter):\n        TPropertyField<WString>(refCounter)\n    {}\n\n    WStringProperty::WStringProperty(RefCounter* refCounter, const WStringProperty& other):\n        TPropertyField<WString>(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    WStringProperty& WStringProperty::operator=(const WStringProperty& other)\n    {\n        TPropertyField<WString>::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void WStringProperty::InitializeControls()\n    {\n        mEditBox = FindChildByType<EditBox>();\n        if (mEditBox)\n        {\n            mEditBox->onChangeCompleted = THIS_FUNC(OnEdited);\n            mEditBox->text = \"--\";\n        }\n    }\n\n    void WStringProperty::UpdateValueView()\n    {\n        if (mValuesDifferent)\n            mEditBox->text = \"--\";\n        else\n            mEditBox->text = mCommonValue;\n    }\n\n    void WStringProperty::OnEdited(const WString& data)\n    {\n        if (mValuesDifferent && data == \"--\")\n            return;\n\n        SetValueByUserAndComplete(data);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TPropertyField<o2::WString>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::WStringProperty>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TPropertyField<o2::WString>>);\n// --- META ---\n\nDECLARE_CLASS(Editor::WStringProperty, Editor__WStringProperty);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Basic/WStringProperty.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Property.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class EditBox;\n}\n\nnamespace Editor\n{\n    // -------------------------------\n    // Editor string property edit box\n    // -------------------------------\n    class WStringProperty: public TPropertyField<WString>\n    {\n    public:\n        // Default constructor\n        WStringProperty(RefCounter* refCounter);\n\n        // Copy constructor\n        WStringProperty(RefCounter* refCounter, const WStringProperty& other);\n\n        // Copy operator\n        WStringProperty& operator=(const WStringProperty& other);\n\n        SERIALIZABLE(WStringProperty);\n        CLONEABLE_REF(WStringProperty);\n\n    protected:\n        Ref<EditBox> mEditBox; // Edit box \n\n    protected:\n        // Updates value view\n        void UpdateValueView() override;\n\n        // Searches controls widgets and layers and initializes them\n        void InitializeControls();\n\n        // Edit box change event\n        void OnEdited(const WString& data);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::WStringProperty)\n{\n    BASE_CLASS(Editor::TPropertyField<WString>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::WStringProperty)\n{\n    FIELD().PROTECTED().NAME(mEditBox);\n}\nEND_META;\nCLASS_METHODS_META(Editor::WStringProperty)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const WStringProperty&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEdited, const WString&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/IObjectPropertiesViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IObjectPropertiesViewer.h\"\n\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nnamespace Editor\n{\n    FORWARD_REF_IMPL(IPropertyField);\n\n    IObjectPropertiesViewer::IObjectPropertiesViewer()\n    {\n        mPropertiesContext = mmake<PropertiesContext>();\n\n        mOnPropertyChanged =\n            MakeFunction<IObjectPropertiesViewer, void, const Ref<IPropertyField>&, bool>(this, &IObjectPropertiesViewer::OnPropertyChanged);\n\n        mOnPropertyChangeCompleted =\n            MakeFunction<IObjectPropertiesViewer, void, const String&,\n            const Vector<DataDocument>&, const Vector<DataDocument>&>(this, &IObjectPropertiesViewer::OnPropertyChangeCompleted);\n    }\n\n    void IObjectPropertiesViewer::SetHeaderEnabled(bool enabled)\n    {\n        mHeaderEnabled = enabled;\n\n        auto spoiler = GetSpoiler();\n        if (mHeaderEnabled)\n        {\n            spoiler->SetHeadHeight(20);\n            spoiler->GetLayerDrawable<Text>(\"caption\")->enabled = true;\n            spoiler->GetInternalWidget(\"expand\")->enabledForcibly = true;\n            spoiler->borderLeft = 10;\n            spoiler->borderTop = 2;\n        }\n        else\n        {\n            spoiler->SetHeadHeight(0);\n            spoiler->GetLayerDrawable<Text>(\"caption\")->enabled = false;\n            spoiler->GetInternalWidget(\"expand\")->enabledForcibly = false;\n            spoiler->borderLeft = 0;\n            spoiler->borderTop = 0;\n            spoiler->Expand(true);\n        }\n\n        OnHeaderEnableChanged(enabled);\n    }\n\n    bool IObjectPropertiesViewer::IsHeaderEnabled() const\n    {\n        return mHeaderEnabled;\n    }\n\n    void IObjectPropertiesViewer::Refresh(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        mTargetObjects = targetObjets;\n        auto spoiler = GetSpoiler();\n\n        if (!mHeaderEnabled || spoiler->IsExpanded())\n        {\n            bool force = CheckBuildProperties(targetObjets);\n            mPropertiesContext->Set(targetObjets, force);\n        }\n\n        if (!targetObjets.IsEmpty())\n            mRealObjectType = &(targetObjets[0].first)->GetType();\n\n        OnRefreshed(targetObjets);\n    }\n\n    const Type* IObjectPropertiesViewer::GetViewingObjectType() const\n    {\n        if (mRealObjectType)\n            return mRealObjectType;\n\n        return GetViewingObjectTypeStatic();\n    }\n\n    const Type* IObjectPropertiesViewer::GetViewingObjectTypeStatic()\n    {\n        return nullptr;\n    }\n\n    void IObjectPropertiesViewer::SetParentContext(const Ref<PropertiesContext>& context)\n    {\n        mPropertiesContext->parent = context;\n    }\n\n    const Ref<Spoiler>& IObjectPropertiesViewer::GetSpoiler()\n    {\n        return mSpoiler;\n    }\n\n\tRef<Spoiler> IObjectPropertiesViewer::CheckCreateSpoiler(const Ref<Widget>& parent)\n\t{\n        if (mSpoiler)\n        {\n\t\t\tparent->AddChild(mSpoiler);\n            return mSpoiler;\n        }\n\n\t\treturn CreateSpoiler(parent);\n\t}\n\n\tvoid IObjectPropertiesViewer::SetExpanded(bool expanded, bool forcible /*= false*/)\n    {\n        GetSpoiler()->SetExpanded(expanded, forcible);\n    }\n\n    bool IObjectPropertiesViewer::IsExpanded() const\n    {\n        return const_cast<IObjectPropertiesViewer*>(this)->GetSpoiler()->IsExpanded();\n    }\n\n    void IObjectPropertiesViewer::SetCaption(const WString& caption)\n    {\n        GetSpoiler()->SetCaption(caption);\n    }\n\n    const WString& IObjectPropertiesViewer::GetCaption() const\n    {\n        return const_cast<IObjectPropertiesViewer*>(this)->GetSpoiler()->GetCaption();\n    }\n\n    bool IObjectPropertiesViewer::IsEmpty() const\n    {\n        return mSpoiler->GetChildren().IsEmpty();\n    }\n\n    void IObjectPropertiesViewer::OnPropertiesEnabled()\n    {\n        mPropertiesContext->SetPropertiesEnabled(true);\n    }\n\n    void IObjectPropertiesViewer::OnPropertiesDisabled()\n    {\n        mPropertiesContext->SetPropertiesEnabled(false);\n    }\n\n    Ref<Spoiler> IObjectPropertiesViewer::CreateSpoiler(const Ref<Widget>& parent)\n    {\n        mSpoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n        mSpoiler->onExpand = [&]() { Refresh(mTargetObjects); };\n        parent->AddChild(mSpoiler);\n\n        return mSpoiler;\n    }\n\n    bool IObjectPropertiesViewer::CheckBuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        if (mPropertiesBuilt)\n            return false;\n\n        PushEditorScopeOnStack scope;\n        RebuildProperties(targetObjets);\n\n        mPropertiesBuilt = true;\n\n        return true;\n    }\n\n    void IObjectPropertiesViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onChanged(field, byUser);\n    }\n\n    void IObjectPropertiesViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before,\n                                                            const Vector<DataDocument>& after)\n    {\n\t\tString finalPath = this->path.IsEmpty() ? path : this->path + \"/\" + path;\n        onChangeCompleted(finalPath, before, after);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IObjectPropertiesViewer, Editor__IObjectPropertiesViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/IObjectPropertiesViewer.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/ValueProxy.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class VerticalLayout;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IPropertyField);\n\n    // ----------------------------------------------------------------------------------\n    // Object properties viewer interface. Used in IObjectProperty and IObjectPtrProperty\n    // Override this class to create new object properties viewer\n    // ----------------------------------------------------------------------------------\n    class IObjectPropertiesViewer : public IObject, public RefCounterable\n    {\n    public:\n        typedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnChangedFunc;\n        typedef Function<void(const String&, const Vector<DataDocument>&, const Vector<DataDocument>&)> OnChangeCompletedFunc;\n\n    public:\n        OnChangedFunc         onChanged;         // Immediate change value by user event\n        OnChangeCompletedFunc onChangeCompleted; // Change completed by user event\n\n        String path; // Path to viewing object fields\n\n    public:\n        // Default constructor\n        IObjectPropertiesViewer();\n\n        // Refreshing controls and properties by target objects\n        void Refresh(const Vector<Pair<IObject*, IObject*>>& targetObjets);\n\n        // Returns viewing objects base type\n        virtual const Type* GetViewingObjectType() const;\n\n        // Returns viewing objects base type by static function\n        static const Type* GetViewingObjectTypeStatic();\n\n        // Sets parent context\n        void SetParentContext(const Ref<PropertiesContext>& context);\n\n        // Returns view widget\n        const Ref<Spoiler>& GetSpoiler();\n\n\t\t// Creates spoiler if it is not created yet\n\t\tRef<Spoiler> CheckCreateSpoiler(const Ref<Widget>& parent);\n\n        // Creates spoiler for properties\n        virtual Ref<Spoiler> CreateSpoiler(const Ref<Widget>& parent);\n\n        // Sets is header enabled and properties can be collapsed in spoiler\n        virtual void SetHeaderEnabled(bool enabled);\n\n        // Returns is header enabled\n        bool IsHeaderEnabled() const;\n\n        // Expands or collapses spoiler\n\t\tvirtual void SetExpanded(bool expanded, bool forcible = false);\n\n        // Returns is spoiler expanded\n        bool IsExpanded() const;\n\n        // Sets spoiler caption\n        virtual void SetCaption(const WString& caption);\n\n        // Returns caption\n        const WString& GetCaption() const;\n\n        // Returns is viewer empty\n        bool IsEmpty() const;\n\n        // ThCalled when object viewer enabled\n        virtual void OnPropertiesEnabled();\n\n        // ThCalled when object viewer disabled\n        virtual void OnPropertiesDisabled();\n\n        IOBJECT(IObjectPropertiesViewer);\n\n    protected:\n        Ref<Spoiler> mSpoiler;              // Properties spoiler. Expands forcible when viewer hasn't header\n        bool         mHeaderEnabled = true; // Is header enabled and properties hiding in spoiler\n\n        bool mPropertiesBuilt = false; // True when properties built at first refreshing\n\n        Vector<Pair<IObject*, IObject*>> mTargetObjects; // Target objects\n\n        const Type* mRealObjectType = &TypeOf(IObject);  // Specialized viewing object type\n\n        Ref<PropertiesContext> mPropertiesContext; // Field properties information\n\n        OnChangedFunc mOnPropertyChanged; // Default property change callback, calls onChanged from this\n\n        OnChangeCompletedFunc mOnPropertyChangeCompleted; // Default field change completed callback, calls\n                                                            // inChangeCompleted from this with full combined path\n\n    protected:\n        // Called when header enable changed\n        virtual void OnHeaderEnableChanged(bool enabled) {}\n\n        // Checks if properties need to be rebuilt, rebuilds if necessary; returns true when properties was rebuilt\n        virtual bool CheckBuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets);\n\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        virtual void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) {}\n\n        // Called when viewer is refreshed\n        virtual void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) {}\n\n        // ThCalled when the viewer is freed\n        virtual void OnFree() {}\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some child property were changed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n\n        friend class Properties;\n    };\n\n    // --------------------------------------\n    // Specialize object properties interface\n    // --------------------------------------\n    template<typename _object_type>\n    class TObjectPropertiesViewer : public IObjectPropertiesViewer\n    {\n    public:\n        // Returns viewing objects base type\n        const Type* GetViewingObjectType() const override;\n\n        // Returns viewing objects base type by static function\n        static const Type* GetViewingObjectTypeStatic();\n\n        IOBJECT(TObjectPropertiesViewer<_object_type>);\n\n    protected:\n        Vector<Pair<_object_type*, _object_type*>> mTypeTargetObjects; // Target objects casted to viewer type\n\n    protected:\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n    };\n\n    template<typename _object_type>\n    const Type* TObjectPropertiesViewer<_object_type>::GetViewingObjectType() const\n    {\n        return GetViewingObjectTypeStatic();\n    }\n\n    template<typename _object_type>\n    const Type* TObjectPropertiesViewer<_object_type>::GetViewingObjectTypeStatic()\n    {\n        return &TypeOf(_object_type);\n    }\n\n    template<typename _object_type>\n    void TObjectPropertiesViewer<_object_type>::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        mTypeTargetObjects = targetObjets.Convert<Pair<_object_type*, _object_type*>>([](const auto& x) {\n            return Pair<_object_type*, _object_type*>(dynamic_cast<_object_type*>(x.first), dynamic_cast<_object_type*>(x.second));\n        });\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IObjectPropertiesViewer)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IObjectPropertiesViewer)\n{\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PUBLIC().NAME(onChangeCompleted);\n    FIELD().PUBLIC().NAME(path);\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mHeaderEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertiesBuilt);\n    FIELD().PROTECTED().NAME(mTargetObjects);\n    FIELD().PROTECTED().DEFAULT_VALUE(&TypeOf(IObject)).NAME(mRealObjectType);\n    FIELD().PROTECTED().NAME(mPropertiesContext);\n    FIELD().PROTECTED().NAME(mOnPropertyChanged);\n    FIELD().PROTECTED().NAME(mOnPropertyChangeCompleted);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IObjectPropertiesViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp3;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp4;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, _tmp1);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetViewingObjectTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParentContext, const Ref<PropertiesContext>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Spoiler>&, GetSpoiler);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Spoiler>, CheckCreateSpoiler, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Spoiler>, CreateSpoiler, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeaderEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsHeaderEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExpanded, bool, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(const WString&, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEmpty);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHeaderEnableChanged, bool);\n    FUNCTION().PROTECTED().SIGNATURE(bool, CheckBuildProperties, _tmp2);\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildProperties, _tmp3);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRefreshed, _tmp4);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFree);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n\nMETA_TEMPLATES(typename _object_type)\nCLASS_BASES_META(Editor::TObjectPropertiesViewer<_object_type>)\n{\n    BASE_CLASS(Editor::IObjectPropertiesViewer);\n}\nEND_META;\nMETA_TEMPLATES(typename _object_type)\nCLASS_FIELDS_META(Editor::TObjectPropertiesViewer<_object_type>)\n{\n    FIELD().PROTECTED().NAME(mTypeTargetObjects);\n}\nEND_META;\nMETA_TEMPLATES(typename _object_type)\nCLASS_METHODS_META(Editor::TObjectPropertiesViewer<_object_type>)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetViewingObjectTypeStatic);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRefreshed, _tmp1);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/IPropertyField.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IPropertyField.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    IPropertyField::IPropertyField(RefCounter* refCounter):\n        HorizontalLayout(refCounter)\n    {\n        mCaption = FindChildByType<Label>(\"caption\");\n    }\n\n    IPropertyField::IPropertyField(RefCounter* refCounter, const IPropertyField& other) :\n        HorizontalLayout(refCounter, other)\n    {}\n\n    IPropertyField::~IPropertyField()\n    {\n        FreeValuesProxies();\n    }\n\n    IPropertyField& IPropertyField::operator=(const IPropertyField& other)\n    {\n        HorizontalLayout::operator=(other);\n        return *this;\n    }\n\n    void IPropertyField::SetValueAndPrototypeProxy(const TargetsVec& targets)\n    {\n        FreeValuesProxies();\n\n        mValuesProxies = targets;\n\n        if (!mValuesProxies.IsEmpty())\n            OnTypeSpecialized(mValuesProxies[0].first->GetType());\n\n        Refresh();\n    }\n\n    void IPropertyField::FreeValuesProxies()\n    {\n        mValuesProxies.Clear();\n    }\n\n    const IPropertyField::TargetsVec& IPropertyField::GetValueAndPrototypeProxy() const\n    {\n        return mValuesProxies;\n    }\n\n    void IPropertyField::SetValueProxy(const Vector<Ref<IAbstractValueProxy>>& targets)\n    {\n        auto protoTargets = targets.Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n            [](const Ref<IAbstractValueProxy>& x) { return Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(x, nullptr); });\n\n        SetValueAndPrototypeProxy(protoTargets);\n    }\n\n    void IPropertyField::SetParentContext(const Ref<PropertiesContext>& context)\n    {\n        mParentContext = context;\n        onChanged += [this](const Ref<IPropertyField>& p, bool byUser) { if (auto ctx = mParentContext.Lock()) ctx->onChanged(p, byUser); };\n    }\n\n    void IPropertyField::SetCaption(const WString& text)\n    {\n        if (mCaption)\n            mCaption->text = text;\n\n        if (auto captionWidget = FindChildByType<Label>(\"propertyName\"))\n            captionWidget->text = text;\n        else if (auto captionWidget = FindInternalWidgetByType<Label>(\"propertyName\"))\n            captionWidget->text = text;\n        else\n        {\n            auto captionLayer = GetLayerDrawable<Text>(\"caption\");\n            if (captionLayer)\n                captionLayer->text = text;\n        }\n    }\n\n    WString IPropertyField::GetCaption() const\n    {\n        if (mCaption)\n            return mCaption->text;\n\n        if (auto captionWidget = FindChildByType<Label>(\"propertyName\"))\n            return captionWidget->text;\n        else if (auto captionWidget = FindInternalWidgetByType<Label>(\"propertyName\"))\n            return captionWidget->text;\n        else\n        {\n            auto captionLayer = GetLayerDrawable<Text>(\"caption\");\n            if (captionLayer)\n                return captionLayer->text;\n        }\n\n        return \"\";\n    }\n\n    Ref<Button> IPropertyField::GetRemoveButton()\n    {\n        if (!mRemoveBtn)\n        {\n            auto buttonContainer = mmake<Widget>();\n            buttonContainer->name = \"remove container\";\n            buttonContainer->layout->maxWidth = 20;\n\n            if (auto layout = FindChild(\"layout\"))\n                layout->AddChild(buttonContainer);\n            else\n                AddChild(buttonContainer);\n\n            mRemoveBtn = o2UI.CreateWidget<Button>(\"remove small\");\n            mRemoveBtn->name = \"remove\";\n            *mRemoveBtn->layout = WidgetLayout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(2, 0));\n            buttonContainer->AddChild(mRemoveBtn);\n        }\n\n        return mRemoveBtn;\n    }\n\n    const Type* IPropertyField::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    const Type* IPropertyField::GetValueTypeStatic()\n    {\n        return nullptr;\n    }\n\n    bool IPropertyField::IsValuesDifferent() const\n    {\n        return mValuesDifferent;\n    }\n\n    void IPropertyField::SetValuePath(const String& path)\n    {\n        mValuesPath = path;\n    }\n\n    const String& IPropertyField::GetValuePath() const\n    {\n        return mValuesPath;\n    }\n\n    void IPropertyField::SetCaptionLabel(const Ref<Label>& label)\n    {\n        mCaption = label;\n    }\n\n    const Ref<Label>& IPropertyField::GetCaptionLabel() const\n    {\n        return mCaption;\n    }\n\n    void IPropertyField::SetRevertable(bool revertable)\n    {\n        mRevertable = revertable;\n        CheckRevertableState();\n    }\n\n    bool IPropertyField::IsRevertable() const\n    {\n        return mRevertable;\n    }\n\n    void IPropertyField::SetPropertyEnabled(bool enabled)\n    {\n        if (enabled == mPropertyEnabled)\n            return;\n\n        mPropertyEnabled = enabled;\n\n        if (mPropertyEnabled)\n            OnPropertyEnabled();\n        else\n            OnPropertyDisabled();\n    }\n\n    bool IPropertyField::IsPropertyEnabled() const\n    {\n        return mPropertyEnabled;\n    }\n\n    void IPropertyField::SetFieldInfo(const FieldInfo* fieldInfo)\n    {\n        mFieldInfo = fieldInfo;\n    }\n\n    String IPropertyField::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void IPropertyField::OnFreeProperty()\n    {}\n\n    void IPropertyField::CheckValueChangeCompleted()\n    {\n        Vector<DataDocument> valuesData;\n        StoreValues(valuesData);\n\n        if (mBeforeChangeValues != valuesData || valuesData.IsEmpty())\n            onChangeCompleted(mValuesPath, mBeforeChangeValues, valuesData);\n    }\n\n    bool IPropertyField::IsValueRevertable() const\n    {\n        return false;\n    }\n\n    void IPropertyField::CheckRevertableState()\n    {\n        bool isRevertable = IsValueRevertable();\n\n        if (isRevertable)\n        {\n            mRevertBtn = FindChildByType<Button>(\"revert\");\n\n            if (!mRevertBtn)\n            {\n                mRevertBtn = o2UI.CreateWidget<Button>(\"revert\");\n                *mRevertBtn->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F());\n                mRevertBtn->layout->maxWidth = 0;\n\n                if (auto layout = FindChild(\"layout\"))\n                    layout->AddChild(mRevertBtn);\n                else\n                    AddChild(mRevertBtn);\n\n                String path;\n                Ref<Actor> itActor = mRevertBtn;\n                while (itActor != Ref(this))\n                {\n                    path = \"child/\" + itActor->GetName() + \"/\" + path;\n                    itActor = itActor->GetParent().Lock();\n                }\n\n                auto revertStateAnim = AnimationClip::EaseInOut(path + \"layout/maxWidth\", 0.0f, 20.0f, 0.15f);\n                *revertStateAnim->AddTrack<bool>(path + \"enabled\") = AnimationTrack<bool>::EaseInOut(false, true, 0.15f);\n                AddState(\"revert\", revertStateAnim);\n            }\n\n            if (mRevertBtn)\n                mRevertBtn->onClick = THIS_FUNC(Revert);\n        }\n\n        if (auto revertState = state[\"revert\"])\n            *revertState = isRevertable;\n    }\n\n    void IPropertyField::OnValueChanged(bool byUser)\n    {\n        CheckRevertableState();\n        onChanged(Ref(this), byUser);\n\n        if (SceneEditScreen::IsSingletonInitialzed())\n            o2EditorSceneScreen.OnSceneChanged();\n    }\n\n    void IPropertyField::BeginUserChanging()\n    {\n        StoreValues(mBeforeChangeValues);\n    }\n\n    void IPropertyField::EndUserChanging()\n    {\n        CheckValueChangeCompleted();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::IPropertyField>);\n// --- META ---\n\nDECLARE_CLASS(Editor::IPropertyField, Editor__IPropertyField);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/IPropertyField.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/ValueProxy.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n    class Button;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(PropertiesContext);\n\n    // -------------------------------\n    // Editor property field interface\n    // -------------------------------\n    class IPropertyField : public HorizontalLayout\n    {\n\tpublic:\n\t\ttypedef Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>> TargetPair;\n\t\ttypedef Vector<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>> TargetsVec;\n\n\t\ttypedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnChangedFunc;\n\t\ttypedef Function<void(const String&, const Vector<DataDocument>&, const Vector<DataDocument>&)> OnChangeCompletedFunc;\n\n    public:\n\t\tOnChangedFunc         onBeforeChange;    // Before change value event\n        OnChangedFunc         onChanged;         // Immediate change value event\n        OnChangeCompletedFunc onChangeCompleted; // Change completed by user event\n\n    public:\n        // Default constructor. Searches revert button and sets click action             \n        IPropertyField(RefCounter* refCounter);\n\n        // Copy-constructor\n        IPropertyField(RefCounter* refCounter, const IPropertyField& other);\n\n        // Virtual destructor\n        virtual ~IPropertyField();\n\n        // Copy-operator\n        IPropertyField& operator=(const IPropertyField& other);\n\n        // Sets targets proxies\n        virtual void SetValueAndPrototypeProxy(const TargetsVec& targets);\n\n        // Returns targets proxies\n        const TargetsVec& GetValueAndPrototypeProxy() const;\n\n        // Sets targets proxies\n        virtual void SetValueProxy(const Vector<Ref<IAbstractValueProxy>>& targets);\n\n        // Sets parent context\n        virtual void SetParentContext(const Ref<PropertiesContext>& context);\n\n\t\t// Checks common value and fill fields. Forcible flags disables value caching\n        virtual void Refresh(bool forcible = false) {}\n\n        // Reverts value to prototype value\n        virtual void Revert() {}\n\n        // Sets property caption\n        virtual void SetCaption(const WString& text);\n\n        // Returns property caption\n        virtual WString GetCaption() const;\n\n        // Returns remove button, creates if required\n        virtual Ref<Button> GetRemoveButton();\n\n        // Returns editing by this field type\n        virtual const Type* GetValueType() const;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        // Returns is values different\n        bool IsValuesDifferent() const;\n\n        // Sets reflection path f target values\n        void SetValuePath(const String& path);\n\n        // Returns reflection path of target values\n        const String& GetValuePath() const;\n\n        // Sets caption\n        void SetCaptionLabel(const Ref<Label>& label);\n\n        // Returns caption\n        const Ref<Label>& GetCaptionLabel() const;\n\n        // Sets is property revertable - it's able to check difference between origin value and prototype\n        void SetRevertable(bool revertable);\n\n        // Returns is property revertable - it's able to check difference between origin value and prototype\n        bool IsRevertable() const;\n\n        // Sets property enabled or disabled\n        void SetPropertyEnabled(bool enabled);\n\n        // Returns is property enabled\n        bool IsPropertyEnabled() const;\n\n        // Specializes field info\n        virtual void SetFieldInfo(const FieldInfo* fieldInfo);\n\n        // Sets targets pointers\n        template<typename _type>\n        void SetValuePointers(const Vector<_type*>& targets);\n\n        // Sets targets pointers\n        template<typename _property_type>\n        void SetValuePropertyPointers(const Vector<_property_type*>& targets);\n\n        // Sets targets pointers\n        template<typename _type, typename _object_type>\n        void SelectValuesPointers(const Vector<_object_type*>& targets, std::function<_type* (_object_type*)> getter);\n\n        // Sets targets properties\n        template<typename _object_type, typename _property_type>\n        void SelectValuesProperties(const Vector<_object_type*>& targets,\n                                    std::function<_property_type* (_object_type*)> getter);\n\n        // Sets targets pointers\n        template<typename _type, typename _object_type>\n        void SelectValueAndPrototypePointers(const Vector<_object_type*>& targets,\n                                             const Vector<_object_type*>& prototypes,\n                                             std::function<_type* (_object_type*)> getter);\n\n        // Sets targets properties\n        template<typename _object_type, typename _property_type>\n        void SelectValueAndPrototypeProperties(const Vector<_object_type*>& targets,\n                                               const Vector<_object_type*>& prototypes,\n                                               std::function<_property_type* (_object_type*)> getter);\n\n        // Sets targets properties\n        template<typename _type, typename _object_type>\n        void SelectValueAndPrototypeFunctional(const Vector<_object_type*>& targets,\n                                               const Vector<_object_type*>& prototypes,\n                                               std::function<_type(_object_type*)> getter,\n                                               std::function<void(_object_type*, _type)> setter);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(IPropertyField);\n        CLONEABLE_REF(IPropertyField);\n\n    protected:\n        bool mPropertyEnabled = false; // Is property enabled\n\n        const FieldInfo*           mFieldInfo = nullptr; // Specialized field info\n        WeakRef<PropertiesContext> mParentContext;       // Parent context\n        bool                       mRevertable = true;   // Is property can be reverted\n\n        Vector<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>> mValuesProxies; // Target values proxies\n\n        bool mValuesDifferent = true; // Are values different\n\n        Ref<Button> mRevertBtn; // Revert to source prototype button\n        Ref<Button> mRemoveBtn; // Remove from array button\n        Ref<Label>  mCaption;   // Caption label, null by default   \n\n        String               mValuesPath;         // Reflection path of target values\n        Vector<DataDocument> mBeforeChangeValues; // Serialized value data before changes started\n\n    protected:\n        // Called when type specialized during setting value proxy\n        virtual void OnTypeSpecialized(const Type& type) {}\n\n        // Called when property puts in buffer. Here you can release your shared resources\n        virtual void OnFreeProperty();\n\n        // Stores values to data\n        virtual void StoreValues(Vector<DataDocument>& data) const {}\n\n        // Checks that value was changed and calls onChangeCompleted\n        virtual void CheckValueChangeCompleted();\n\n        // Checks value for reverting to prototype and sets widget state \"revert\"\n        virtual void CheckRevertableState();\n\n        // Checks is value can be reverted\n        virtual bool IsValueRevertable() const;\n\n        // Called when field value changed\n        virtual void OnValueChanged(bool byUser);\n\n        // Enable property event function\n        virtual void OnPropertyEnabled() {}\n\n        // Disable property event function\n        virtual void OnPropertyDisabled() {}\n\n        // Frees values proxies\n        void FreeValuesProxies();\n\n        // Called when user began to change value and we need to store initial value data\n        void BeginUserChanging();\n\n        // Called when user completed changing value and we need to compare current value with previous and call onChangeCompleted\n        void EndUserChanging();\n\n        // Sets value via proxy\n        template<typename T>\n        void SetProxy(const Ref<IAbstractValueProxy>& proxy, const T& value) const;\n\n        // Returns value from proxy\n        template<typename T>\n        T GetProxy(const Ref<IAbstractValueProxy>& proxy) const;\n\n        friend class Properties;\n    };\n\n    template<typename _type>\n    class TPropertyField : public IPropertyField\n    {\n    public:\n        // Default constructor\n        TPropertyField(RefCounter* refCounter);\n\n        // Copy-constructor\n        TPropertyField(RefCounter* refCounter, const TPropertyField& other);\n\n        // COpy operator\n        TPropertyField& operator=(const TPropertyField& other);\n\n        // Checks common value and fill fields\n        void Refresh(bool forcible = false) override;\n\n        // Reverts value to prototype value\n        void Revert() override;\n\n        // Returns editing by this field type\n        const Type* GetValueType() const override;\n\n        // Returns editing by this field type by static function, can't be changed during runtime\n        static const Type* GetValueTypeStatic();\n\n        // Sets value as unknown\n        void SetUnknownValue(const _type& defaultValue = _type());\n\n        // Sets common value and proxies\n        virtual void SetValue(const _type& value, bool byUser = false);\n\n        // Returns value\n        _type GetCommonValue() const;\n\n        IOBJECT(TPropertyField<_type>);\n\n    protected:\n        _type mCommonValue = _type();\n\n        const Type* mRealType = nullptr;\n\n    protected:\n        // Called when type specialized during setting value proxy\n        void OnTypeSpecialized(const Type& type) override;\n\n        // Checks is value can be reverted\n        bool IsValueRevertable() const override;\n\n        // Stores values to data\n        void StoreValues(Vector<DataDocument>& data) const override;\n\n        // Returns value from proxy\n        virtual _type GetProxy(const Ref<IAbstractValueProxy>& proxy) const;\n\n        // Sets value to proxy\n        virtual void SetProxy(const Ref<IAbstractValueProxy>& proxy, const _type& value);\n\n        // Sets value, checks value changed, calls onChangeCompleted\n        void SetValueByUserAndComplete(const _type& value);\n\n        // Updates value view\n        virtual void UpdateValueView() {}\n\n        // Is required refresh view every time\n        virtual bool IsAlwaysRefresh() const;\n    };\n\n    // -----------------------------\n    // IPropertyField implementation\n    // -----------------------------\n\n    template<typename T>\n    T IPropertyField::GetProxy(const Ref<IAbstractValueProxy>& proxy) const\n    {\n        T res;\n        proxy->GetValuePtr(&res);\n        return res;\n    }\n\n    template<typename T>\n    void IPropertyField::SetProxy(const Ref<IAbstractValueProxy>& proxy, const T& value) const\n    {\n        proxy->SetValuePtr(&const_cast<T&>(value));\n    }\n\n\n    // ----------------------------------\n    // SelectPropertyMixin implementation\n    // ----------------------------------\n\n    template<typename _type>\n    void IPropertyField::SetValuePointers(const Vector<_type*>& targets)\n    {\n        SetValueAndPrototypeProxy(targets.template Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n            [](_type* target)\n            {\n                return Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(mmake<PointerValueProxy<_type>>(target), nullptr);\n            }));\n    }\n\n    template<typename _property_type>\n    void IPropertyField::SetValuePropertyPointers(const Vector<_property_type*>& targets)\n    {\n        SetValueAndPrototypeProxy(targets.template Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n            [](_property_type* target)\n            {\n                return Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(\n                    mmake<PropertyValueProxy<typename _property_type::valueType, _property_type>>(target), nullptr);\n            }));\n    }\n\n    template<typename _type, typename _object_type>\n    void IPropertyField::SelectValuesPointers(const Vector<_object_type*>& targets, std::function<_type* (_object_type*)> getter)\n    {\n        SetValueAndPrototypeProxy(targets.template Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n            [&](_object_type* target)\n            {\n                return Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(\n                    TypeOf(_type).GetValueProxy(getter(target)), nullptr);\n            }));\n    }\n\n    template<typename _object_type, typename _property_type>\n    void IPropertyField::SelectValuesProperties(const Vector<_object_type*>& targets,\n                                                std::function<_property_type* (_object_type*)> getter)\n    {\n        SetValueAndPrototypeProxy(targets.template Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n            [&](_object_type* target)\n            {\n                return Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(\n                    mmake<PropertyValueProxy<typename _property_type::valueType, _property_type>>(getter(target)), nullptr);\n            }));\n    }\n\n    template<typename _type, typename _object_type>\n    void IPropertyField::SelectValueAndPrototypePointers(const Vector<_object_type*>& targets,\n                                                         const Vector<_object_type*>& prototypes,\n                                                         std::function<_type* (_object_type*)> getter)\n    {\n        Vector<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>> targetPairs;\n        targetPairs.Reserve(targets.Count());\n\n        for (int i = 0; i < targets.Count() && i < prototypes.Count(); i++)\n        {\n            targetPairs.Add(Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(\n                mmake<PointerValueProxy<_type>>(getter(targets[i])),\n                prototypes[i] ? mmake<PointerValueProxy<_type>>(getter(prototypes[i])) : nullptr\n            ));\n        }\n\n        SetValueAndPrototypeProxy(targetPairs);\n    }\n\n    template<typename _object_type, typename _property_type>\n    void IPropertyField::SelectValueAndPrototypeProperties(const Vector<_object_type*>& targets,\n                                                           const Vector<_object_type*>& prototypes,\n                                                           std::function<_property_type* (_object_type*)> getter)\n    {\n        Vector<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>> targetPairs;\n        targetPairs.Reserve(targets.Count());\n\n        for (int i = 0; i < targets.Count() && i < prototypes.Count(); i++)\n        {\n            targetPairs.Add(Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(\n                mmake<PropertyValueProxy<typename _property_type::valueType, _property_type>>(getter(targets[i])),\n                prototypes[i] ? mmake<PropertyValueProxy<typename _property_type::valueType, _property_type>>(getter(prototypes[i])) : nullptr\n            ));\n        }\n\n        SetValueAndPrototypeProxy(targetPairs);\n    }\n\n    template<typename _type, typename _object_type>\n    void IPropertyField::SelectValueAndPrototypeFunctional(const Vector<_object_type*>& targets,\n                                                           const Vector<_object_type*>& prototypes,\n                                                           std::function<_type(_object_type*)> getter,\n                                                           std::function<void(_object_type*, _type)> setter)\n    {\n        Vector<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>> targetPairs;\n        targetPairs.Reserve(targets.Count());\n\n        for (int i = 0; i < targets.Count() && i < prototypes.Count(); i++)\n        {\n            targetPairs.Add(Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(\n                mmake<FunctionalValueProxy<_type>>([=](_type v) { setter(targets[i], v); }, [=]() { return getter(targets[i]); }),\n                prototypes[i] ? mmake<FunctionalValueProxy<_type>>([=](_type v) { setter(prototypes[i], v); }, [=]() { return getter(prototypes[i]); }) : nullptr));\n        }\n\n        SetValueAndPrototypeProxy(targetPairs);\n    }\n\n\n\n    // -----------------------------\n    // TPropertyField implementation\n    // -----------------------------\n\n    template<typename _type>\n    TPropertyField<_type>::TPropertyField(RefCounter* refCounter):\n        IPropertyField(refCounter)\n    {}\n\n    template<typename _type>\n    TPropertyField<_type>::TPropertyField(RefCounter* refCounter, const TPropertyField& other) :\n        IPropertyField(refCounter, other)\n    {}\n\n    template<typename _type>\n    TPropertyField<_type>& Editor::TPropertyField<_type>::operator=(const TPropertyField& other)\n    {\n        IPropertyField::operator=(other);\n        return *this;\n    }\n\n    template<typename _type>\n    void TPropertyField<_type>::Refresh(bool forcible /*= false*/)\n    {\n        if (mValuesProxies.IsEmpty())\n            return;\n\n        auto lastCommonValue = mCommonValue;\n        bool lastDifferent = mValuesDifferent;\n\n        _type newCommonValue = GetProxy(mValuesProxies[0].first);\n\n        bool newDifferent = false;\n\n        for (int i = 1; i < mValuesProxies.Count(); i++)\n        {\n            _type value = GetProxy(mValuesProxies[i].first);\n            if (newCommonValue != value)\n            {\n                newDifferent = true;\n                break;\n            }\n        }\n\n        if (newDifferent)\n        {\n            if (!lastDifferent)\n                SetUnknownValue();\n        }\n        else if (lastCommonValue != newCommonValue || lastDifferent || IsAlwaysRefresh() || forcible)\n            SetValue(newCommonValue, false);\n\n        CheckRevertableState();\n    }\n\n    template<typename _type>\n    void TPropertyField<_type>::OnTypeSpecialized(const Type& type)\n    {\n        mRealType = &type;\n    }\n\n    template<typename _type>\n    bool TPropertyField<_type>::IsAlwaysRefresh() const\n    {\n        return false;\n    }\n\n    template<typename _type>\n    void TPropertyField<_type>::SetValueByUserAndComplete(const _type& value)\n    {\n        StoreValues(mBeforeChangeValues);\n        SetValue(value, true);\n        CheckValueChangeCompleted();\n    }\n\n    template<typename _type>\n    void TPropertyField<_type>::SetValue(const _type& value, bool byUser /*= false*/)\n    {\n\t\tonBeforeChange(Ref(this), byUser);\n\n        mCommonValue = value;\n        mValuesDifferent = false;\n\n        for (auto& ptr : mValuesProxies)\n            SetProxy(ptr.first, value);\n\n        UpdateValueView();\n        OnValueChanged(byUser);\n    }\n\n    template<typename _type>\n    void TPropertyField<_type>::StoreValues(Vector<DataDocument>& data) const\n    {\n        data.Clear();\n        for (auto& ptr : mValuesProxies)\n        {\n            data.Add(DataDocument());\n            data.Last() = GetProxy(ptr.first);\n        }\n    }\n\n    template<typename _type>\n    bool TPropertyField<_type>::IsValueRevertable() const\n    {\n        for (auto& ptr : mValuesProxies)\n        {\n            if (ptr.second && !Math::Equals(GetProxy(ptr.first), GetProxy(ptr.second)))\n                return true;\n        }\n\n        return false;\n    }\n\n    template<typename _type>\n    _type TPropertyField<_type>::GetCommonValue() const\n    {\n        return mCommonValue;\n    }\n\n    template<typename _type>\n    void TPropertyField<_type>::SetUnknownValue(const _type& defaultValue /*= _type()*/)\n    {\n\t\tonBeforeChange(Ref(this), false);\n\n        mCommonValue = defaultValue;\n        mValuesDifferent = true;\n\n        UpdateValueView();\n        OnValueChanged(false);\n    }\n\n    template<typename _type>\n    const Type* TPropertyField<_type>::GetValueType() const\n    {\n        return GetValueTypeStatic();\n    }\n\n    template<typename _type>\n    const Type* TPropertyField<_type>::GetValueTypeStatic()\n    {\n        return &TypeOf(_type);\n    }\n\n    template<typename _type>\n    void TPropertyField<_type>::Revert()\n    {\n        for (auto& ptr : mValuesProxies)\n        {\n            if (ptr.second)\n                SetProxy(ptr.first, GetProxy(ptr.second));\n        }\n\n        Refresh();\n    }\n\n    template<typename _type>\n    _type TPropertyField<_type>::GetProxy(const Ref<IAbstractValueProxy>& proxy) const\n    {\n        if constexpr (std::is_polymorphic<_type>::value)\n        {\n            if (mRealType && mRealType->GetUsage() == Type::Usage::Object && TypeOf(_type) != *mRealType)\n            {\n                auto objectType = dynamic_cast<const ObjectType*>(mRealType);\n                void* typeSample = objectType->CreateSample();\n                IObject* typeSampleObject = objectType->DynamicCastToIObject(typeSample);\n                proxy->GetValuePtr(typeSample);\n                _type res = *dynamic_cast<_type*>(typeSampleObject);\n                delete typeSampleObject;\n                return res;\n            }\n        }\n\n        return IPropertyField::GetProxy<_type>(proxy);\n    }\n\n    template<typename _type>\n    void TPropertyField<_type>::SetProxy(const Ref<IAbstractValueProxy>& proxy, const _type& value)\n    {\n        IPropertyField::SetProxy<_type>(proxy, value);\n    }\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IPropertyField)\n{\n    BASE_CLASS(o2::HorizontalLayout);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IPropertyField)\n{\n    FIELD().PUBLIC().NAME(onBeforeChange);\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PUBLIC().NAME(onChangeCompleted);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertyEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mFieldInfo);\n    FIELD().PROTECTED().NAME(mParentContext);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mRevertable);\n    FIELD().PROTECTED().NAME(mValuesProxies);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mValuesDifferent);\n    FIELD().PROTECTED().NAME(mRevertBtn);\n    FIELD().PROTECTED().NAME(mRemoveBtn);\n    FIELD().PROTECTED().NAME(mCaption);\n    FIELD().PROTECTED().NAME(mValuesPath);\n    FIELD().PROTECTED().NAME(mBeforeChangeValues);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IPropertyField)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const IPropertyField&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueAndPrototypeProxy, const TargetsVec&);\n    FUNCTION().PUBLIC().SIGNATURE(const TargetsVec&, GetValueAndPrototypeProxy);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueProxy, const Vector<Ref<IAbstractValueProxy>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParentContext, const Ref<PropertiesContext>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Revert);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Button>, GetRemoveButton);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValuesDifferent);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValuePath, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetValuePath);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaptionLabel, const Ref<Label>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Label>&, GetCaptionLabel);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRevertable, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsRevertable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPropertyEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPropertyEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFieldInfo, const FieldInfo*);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTypeSpecialized, const Type&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFreeProperty);\n    FUNCTION().PROTECTED().SIGNATURE(void, StoreValues, Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckValueChangeCompleted);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckRevertableState);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsValueRevertable);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnValueChanged, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, FreeValuesProxies);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginUserChanging);\n    FUNCTION().PROTECTED().SIGNATURE(void, EndUserChanging);\n}\nEND_META;\n\nMETA_TEMPLATES(typename _type)\nCLASS_BASES_META(Editor::TPropertyField<_type>)\n{\n    BASE_CLASS(Editor::IPropertyField);\n}\nEND_META;\nMETA_TEMPLATES(typename _type)\nCLASS_FIELDS_META(Editor::TPropertyField<_type>)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(_type()).NAME(mCommonValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mRealType);\n}\nEND_META;\nMETA_TEMPLATES(typename _type)\nCLASS_METHODS_META(Editor::TPropertyField<_type>)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const TPropertyField&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Revert);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetValueType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetValueTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetUnknownValue, const _type&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, const _type&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(_type, GetCommonValue);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTypeSpecialized, const Type&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsValueRevertable);\n    FUNCTION().PROTECTED().SIGNATURE(void, StoreValues, Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(_type, GetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetProxy, const Ref<IAbstractValueProxy>&, const _type&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetValueByUserAndComplete, const _type&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateValueView);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsAlwaysRefresh);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/ObjectViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ObjectViewer.h\"\n\n#include \"IObjectPropertiesViewer.h\"\n#include \"Properties.h\"\n\nnamespace Editor\n{\n    ObjectViewer::ObjectViewer(RefCounter* refCounter):\n        VerticalLayout(refCounter)\n    {\n        spacing = 5;\n        expandHeight = false;\n        expandWidth = true;\n        fitByChildren = true;\n        *layout = WidgetLayout::BothStretch();\n    }\n\n    void ObjectViewer::Refresh(const Vector<Pair<IObject*, IObject*>>& targetObjects)\n    {\n        if (targetObjects.IsEmpty())\n            return;\n\n        const Type* objectType = !targetObjects.IsEmpty() ? &targetObjects[0].first->GetType() : nullptr;\n\n        for (auto& target : targetObjects)\n        {\n            if (!target.first->GetType().IsBasedOn(*objectType))\n                return;\n        }\n\n        bool requiredNewViewer = mPropertiesViewer ? \n            !objectType->IsBasedOn(*mPropertiesViewer->GetViewingObjectType()) : \n            objectType != nullptr;\n\n        if (requiredNewViewer)\n        {\n            if (mPropertiesViewer)\n            {\n                RemoveChild(mPropertiesViewer->GetSpoiler());\n                o2EditorProperties.FreeObjectViewer(mPropertiesViewer);\n            }\n\n            mPropertiesViewer = o2EditorProperties.CreateObjectViewer(objectType, \"\", THIS_FUNC(OnPropertyChangeCompleted), THIS_FUNC(OnPropertyChanged));\n            mPropertiesViewer->CheckCreateSpoiler(Ref(this));\n            mPropertiesViewer->SetHeaderEnabled(false);\n            mPropertiesViewer->SetParentContext(mParentContext);\n        }\n\n        if (mPropertiesViewer)\n            mPropertiesViewer->Refresh(targetObjects);\n    }\n\n    void ObjectViewer::Refresh(const Vector<IObject*>& targetObjets)\n    {\n        auto protoTargets = targetObjets.Convert<Pair<IObject*, IObject*>>(\n            [](IObject* x) { return Pair<IObject*, IObject*>(x, nullptr); });\n\n        Refresh(protoTargets);\n    }\n\n    void ObjectViewer::SetParentContext(const Ref<PropertiesContext>& context)\n    {\n        mParentContext = context;\n\n        if (mPropertiesViewer)\n            mPropertiesViewer->SetParentContext(context);\n    }\n\n    const Type* ObjectViewer::GetViewingObjectType() const\n    {\n        if (mPropertiesViewer)\n            return mPropertiesViewer->GetViewingObjectType();\n\n        return &TypeOf(IObject);\n    }\n\n    String ObjectViewer::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void ObjectViewer::OnPropertiesEnabled()\n    {\n        if (mPropertiesViewer)\n            mPropertiesViewer->OnPropertiesEnabled();\n    }\n\n    void ObjectViewer::OnPropertiesDisabled()\n    {\n        if (mPropertiesViewer)\n            mPropertiesViewer->OnPropertiesDisabled();\n    }\n\n    void ObjectViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onPropertyChanged(field, byUser);\n    }\n\n    void ObjectViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                                 const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(path, before, after);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ObjectViewer>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ObjectViewer, Editor__ObjectViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/ObjectViewer.h",
    "content": "#pragma once\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IObjectPropertiesViewer);\n    FORWARD_CLASS_REF(PropertiesContext);\n    FORWARD_CLASS_REF(IPropertyField);\n\n    // -----------------------------------------------------------------\n    // Basic automatic object viewer. Selects suitable properties viewer\n    // -----------------------------------------------------------------\n    class ObjectViewer: public VerticalLayout\n    {\n    public:\n        typedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnPropertyChangedFunc;\n        typedef Function<void(const String&, const Vector<DataDocument>&, const Vector<DataDocument>&)> OnPropertyChangeCompletedFunc;\n\n        OnPropertyChangedFunc         onPropertyChanged;         // Called when property changed\n        OnPropertyChangeCompletedFunc onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Default constructor, creates view widget as vertical layout\n        ObjectViewer(RefCounter* refCounter);\n\n        // Refreshing controls and properties by target objects with prototypes\n        void Refresh(const Vector<Pair<IObject*, IObject*>>& targetObjets);\n\n        // Refreshing controls and properties by target objects\n        void Refresh(const Vector<IObject*>& targetObjets);\n\n        // Sets parent context\n        void SetParentContext(const Ref<PropertiesContext>& context);\n\n        // Enable viewer event function\n        virtual void OnPropertiesEnabled();\n\n        // Disable viewer event function\n        virtual void OnPropertiesDisabled();\n\n        // Returns viewing objects type\n        const Type* GetViewingObjectType() const;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(ObjectViewer);\n        CLONEABLE_REF(ObjectViewer);\n\n    protected:\n        Ref<PropertiesContext> mParentContext; // Parent properties context\n\n        Ref<IObjectPropertiesViewer> mPropertiesViewer; // Object properties viewer\n\n    protected:\n        // Called when some property changed\n        virtual void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        virtual void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                               const Vector<DataDocument>& after);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ObjectViewer)\n{\n    BASE_CLASS(o2::VerticalLayout);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ObjectViewer)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().NAME(mParentContext);\n    FIELD().PROTECTED().NAME(mPropertiesViewer);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ObjectViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, _tmp1);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh, const Vector<IObject*>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParentContext, const Ref<PropertiesContext>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Actors/CameraActorViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"CameraActorViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Basic/BooleanProperty.h\"\n#include \"o2Editor/Properties/Basic/ColorProperty.h\"\n#include \"o2Editor/Properties/Basic/EnumProperty.h\"\n#include \"o2Editor/Properties/Basic/SceneLayersListProperty.h\"\n#include \"o2Editor/Properties/Basic/Vector2FloatProperty.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/UI/ImageSlicesEditorWidget.h\"\n\nnamespace Editor\n{\n    void CameraActorViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        const Type& cameraActorType = TypeOf(CameraActor);\n\n        // Basic properties\n        o2EditorProperties.BuildFieldType<ColorProperty>(mSpoiler, cameraActorType, \"drawLayers\", \"\",\n                                                         mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        o2EditorProperties.BuildFieldType<BooleanProperty>(mSpoiler, cameraActorType, \"fillBackground\", \"\",\n                                                                   mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        o2EditorProperties.BuildFieldType<SceneLayersListProperty>(mSpoiler, cameraActorType, \"fillColor\", \"\",\n                                                                   mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        // Type\n        mTypeProperty = o2EditorProperties.BuildFieldType<EnumProperty>(mSpoiler, cameraActorType, \"mType\", \"\",\n                                                                        mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mTypeProperty->onChanged += [&](auto& x, bool) { OnTypeSelected(); };\n\n        mHiddenTypeProperties = o2UI.CreateWidget<VerticalLayout>();\n        mHiddenTypeProperties->expandWidth = true;\n        mHiddenTypeProperties->expandHeight = false;\n        mHiddenTypeProperties->fitByChildren = true;\n        mSpoiler->AddChild(mHiddenTypeProperties);\n\n        // Size properties\n        mSizePropertySpoiler = o2UI.CreateWidget<Spoiler>();\n        mHiddenTypeProperties->AddChild(mSizePropertySpoiler);\n\n        mSizeProperty = o2EditorProperties.BuildFieldType<Vec2FProperty>(mSizePropertySpoiler, cameraActorType, \"mFixedOrFittedSize\", \"\",\n                                                                         mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mSizeProperty->SetCaption(\"Size\");\n\n        // Units properties\n        mUnitsPropertySpoiler = o2UI.CreateWidget<Spoiler>();\n        mHiddenTypeProperties->AddChild(mUnitsPropertySpoiler);\n\n        mUnitsProperty = o2EditorProperties.BuildFieldType<EnumProperty>(mUnitsPropertySpoiler, cameraActorType, \"mUnits\", \"\",\n                                                                         mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n    }\n\n    void CameraActorViewer::OnTypeSelected()\n    {\n        CameraActor::Type type = (CameraActor::Type)(mTypeProperty->GetCommonValue());\n\n        mSizePropertySpoiler->SetExpanded(type == CameraActor::Type::FittedSize || type == CameraActor::Type::FixedSize);\n        mUnitsPropertySpoiler->SetExpanded(type == CameraActor::Type::PhysicalCorrect);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TObjectPropertiesViewer<o2::CameraActor>);\n// --- META ---\n\nDECLARE_CLASS(Editor::CameraActorViewer, Editor__CameraActorViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Actors/CameraActorViewer.h",
    "content": "#pragma once\n\n#include \"o2/Scene/CameraActor.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(EnumProperty);\n    FORWARD_CLASS_REF(Vec2FProperty);\n    FORWARD_CLASS_REF(SceneLayersListProperty);\n    FORWARD_CLASS_REF(ColorProperty);\n\n    // -------------------\n    // Camera actor viewer\n    // -------------------\n    class CameraActorViewer : public TObjectPropertiesViewer<CameraActor>\n    {\n    public:\n        IOBJECT(CameraActorViewer);\n\n    protected:\n        Ref<ColorProperty>           mColorProperty;  // Background fill color property\n        Ref<SceneLayersListProperty> mLayersProperty; // Layers property\n\n        Ref<EnumProperty>   mTypeProperty;         // Camera type property\n        Ref<VerticalLayout> mHiddenTypeProperties; // Hidden type properties\n\n        Ref<Spoiler>       mSizePropertySpoiler; // Size property spoiler\n        Ref<Vec2FProperty> mSizeProperty;        // Size property\n\n        Ref<Spoiler>      mUnitsPropertySpoiler; // Units property spoiler\n        Ref<EnumProperty> mUnitsProperty;        // Units property\n\n    protected:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when type enum selected, shows required property spoiler\n        void OnTypeSelected();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::CameraActorViewer)\n{\n    BASE_CLASS(Editor::TObjectPropertiesViewer<CameraActor>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CameraActorViewer)\n{\n    FIELD().PROTECTED().NAME(mColorProperty);\n    FIELD().PROTECTED().NAME(mLayersProperty);\n    FIELD().PROTECTED().NAME(mTypeProperty);\n    FIELD().PROTECTED().NAME(mHiddenTypeProperties);\n    FIELD().PROTECTED().NAME(mSizePropertySpoiler);\n    FIELD().PROTECTED().NAME(mSizeProperty);\n    FIELD().PROTECTED().NAME(mUnitsPropertySpoiler);\n    FIELD().PROTECTED().NAME(mUnitsProperty);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CameraActorViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTypeSelected);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Assets/ImageAssetViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ImageAssetViewer.h\"\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Basic/AssetProperty.h\"\n#include \"o2Editor/Properties/Basic/BorderIntProperty.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/UI/ImageSlicesEditorWidget.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    const Type* ImageAssetViewer::GetViewingObjectType() const\n    {\n        return GetViewingObjectTypeStatic();\n    }\n\n    const Type* ImageAssetViewer::GetViewingObjectTypeStatic()\n    {\n        return &TypeOf(ImageAsset);\n    }\n\n    void ImageAssetViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        PushEditorScopeOnStack scope;\n\n        mSizeLabel = o2UI.CreateLabel(\"Size: 0x0\");\n        mSizeLabel->layout->minHeight = 20;\n        mSpoiler->AddChild(mSizeLabel);\n\n        mSlicesEditor = mmake<ImageSlicesEditorWidget>();\n        mSpoiler->AddChild(mSlicesEditor);\n\n        mAtlasProperty = DynamicCast<AssetProperty>(o2EditorProperties.CreateRegularField(\n            &TypeOf(AssetRef<AtlasAsset>), \"Atlas\", mOnPropertyChangeCompleted, mOnPropertyChanged));\n\n        mSpoiler->AddChild(mAtlasProperty);\n    }\n\n    void ImageAssetViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        if (!targetObjets.IsEmpty())\n        {\n            auto image = dynamic_cast<ImageAsset*>(targetObjets.Last().first);\n            mSizeLabel->SetText(\"Size: \" + String(image->GetSize().x) + \"x\" + String(image->GetSize().y));\n\n            mSlicesEditor->Setup(AssetRef<ImageAsset>(dynamic_cast<ImageAsset*>(targetObjets.Last().first)->GetUID()),\n                                 DynamicCast<BorderIProperty>(mPropertiesContext->properties[TypeOf(ImageAsset).GetField(\"sliceBorder\")]));\n        }\n\n        mAtlasProxies.Clear();\n        for (auto& targets : targetObjets)\n        {\n            ImageAsset* image = dynamic_cast<ImageAsset*>(targets.first);\n            auto proxy = mmake<FunctionalValueProxy<AssetRef<AtlasAsset>>>(\n                [image](const AssetRef<AtlasAsset>& value) { image->SetAtlas(value ? value->GetUID() : UID::empty); },\n                [image]() { return AssetRef<AtlasAsset>(image->GetAtlasUID()); }\n            );\n\n            mAtlasProxies.Add(proxy);\n        }\n\n        mAtlasProperty->SetValueProxy(mAtlasProxies);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::ImageAssetViewer, Editor__ImageAssetViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Assets/ImageAssetViewer.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(Button);\n    FORWARD_CLASS_REF(WidgetDragHandle);\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AssetProperty);\n    FORWARD_CLASS_REF(BorderIProperty);\n    FORWARD_CLASS_REF(ImageSlicesEditorWidget);\n\n    // ------------------\n    // Image asset viewer\n    // ------------------\n    class ImageAssetViewer : public DefaultObjectPropertiesViewer\n    {\n    public:\n        // Returns viewing objects type\n        const Type* GetViewingObjectType() const override;\n\n        // Returns viewing objects base type by static function\n        static const Type* GetViewingObjectTypeStatic();\n\n        IOBJECT(ImageAssetViewer);\n\n    private:\n        Ref<Label> mSizeLabel; // Size label\n        \n        Ref<ImageSlicesEditorWidget> mSlicesEditor; // Slices editor widget\n\n        Vector<Ref<IAbstractValueProxy>> mAtlasProxies;  // Atlas proxies for property, converts UID to AssetRef<AtlasAsset> and back\n        Ref<AssetProperty>               mAtlasProperty; // Atlas property\n\n    private:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ImageAssetViewer)\n{\n    BASE_CLASS(Editor::DefaultObjectPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ImageAssetViewer)\n{\n    FIELD().PRIVATE().NAME(mSizeLabel);\n    FIELD().PRIVATE().NAME(mSlicesEditor);\n    FIELD().PRIVATE().NAME(mAtlasProxies);\n    FIELD().PRIVATE().NAME(mAtlasProperty);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ImageAssetViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetViewingObjectTypeStatic);\n    FUNCTION().PRIVATE().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnRefreshed, _tmp2);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Assets/VectorFontAssetViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"VectorFontAssetViewer.h\"\n\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/UI/TexturePreview.h\"\n\nnamespace Editor\n{\n    const Type* VectorFontAssetViewer::GetViewingObjectType() const\n    {\n        return GetViewingObjectTypeStatic();\n    }\n\n    const Type* VectorFontAssetViewer::GetViewingObjectTypeStatic()\n    {\n        return &TypeOf(VectorFontAsset);\n    }\n\n    void VectorFontAssetViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        PushEditorScopeOnStack scope;\n\n        mTexturePreview = mmake<TexturePreview>();\n        *mTexturePreview->layout = WidgetLayout::HorStretch(VerAlign::Middle, 0, 0, 300);\n        mTexturePreview->layout->minHeight = 300;\n\n        mSpoiler->AddChild(mTexturePreview);\n    }\n\n    void VectorFontAssetViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        if (!targetObjets.IsEmpty())\n        {\n            auto fontAsset = dynamic_cast<VectorFontAsset*>(targetObjets[0].first);\n            auto font = fontAsset->GetFont();\n            if (font)\n            {\n                mTexturePreview->SetTexture(font->GetTexture(), font->GetTextureSrcRect());\n                mTexturePreview->SetEnabled(true);\n            }\n            else\n                mTexturePreview->SetEnabled(false);\n        }\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::VectorFontAssetViewer, Editor__VectorFontAssetViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Assets/VectorFontAssetViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Image;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(TexturePreview);\n\n    // ------------------------\n    // Vector font asset viewer\n    // ------------------------\n    class VectorFontAssetViewer : public DefaultObjectPropertiesViewer\n    {\n    public:\n        // Returns viewing objects type\n        const Type* GetViewingObjectType() const override;\n\n        // Returns viewing objects base type by static function\n        static const Type* GetViewingObjectTypeStatic();\n\n        IOBJECT(VectorFontAssetViewer);\n\n    private:\n        Ref<TexturePreview> mTexturePreview; // Texture preview widget\n\n    private:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::VectorFontAssetViewer)\n{\n    BASE_CLASS(Editor::DefaultObjectPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::VectorFontAssetViewer)\n{\n    FIELD().PRIVATE().NAME(mTexturePreview);\n}\nEND_META;\nCLASS_METHODS_META(Editor::VectorFontAssetViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetViewingObjectTypeStatic);\n    FUNCTION().PRIVATE().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnRefreshed, _tmp2);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/AnimationStateViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AnimationStateViewer.h\"\n\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    const Type* AnimationStateViewer::GetViewingObjectType() const\n    {\n        if (mRealObjectType)\n            return mRealObjectType;\n\n        return GetViewingObjectTypeStatic();\n    }\n\n    const Type* AnimationStateViewer::GetViewingObjectTypeStatic()\n    {\n        return &TypeOf(IAnimationState);\n    }\n\n    Ref<Spoiler> AnimationStateViewer::CreateSpoiler(const Ref<Widget>& parent)\n    {\n        mSpoiler = IObjectPropertiesViewer::CreateSpoiler(parent);\n\n        mPlayPause = o2UI.CreateWidget<Toggle>(\"animation state play-stop\");\n        mPlayPause->name = \"play-stop\";\n        *mPlayPause->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(7, 1));\n        mPlayPause->onToggle = THIS_FUNC(OnPlayPauseToggled);\n        mSpoiler->AddInternalWidget(mPlayPause);\n\n        mEditBtn = o2UI.CreateWidget<Button>(\"edit animation state\");\n        mEditBtn->name = \"edit\";\n        *mEditBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(-40, 1));\n        mEditBtn->onClick = THIS_FUNC(OnEditPressed);\n        mSpoiler->AddInternalWidget(mEditBtn);\n\n        mLooped = o2UI.CreateWidget<Toggle>(\"animation state loop\");\n        mLooped->name = \"loop\";\n        *mLooped->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(-20, 1));\n        mLooped->onToggle = THIS_FUNC(OnLoopToggled);\n        mSpoiler->AddInternalWidget(mLooped);\n\n        mTimeProgress = o2UI.CreateWidget<HorizontalProgress>(\"animation state bar\");\n        mTimeProgress->name = \"bar\";\n        *mTimeProgress->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 2, 18);\n        mTimeProgress->onChangeByUser = THIS_FUNC(OnTimeProgressChanged);\n        mSpoiler->AddInternalWidget(mTimeProgress);\n\n        if (auto textLayer = GetSpoiler()->GetLayer(\"caption\"))\n        {\n            textLayer->layout.offsetLeft = 27;\n            textLayer->layout.offsetBottom = -19;\n            textLayer->layout.offsetTop = 1;\n        }\n\n        if (auto header = parent->GetChildByType<Widget>(\"caption/header\"))\n        {\n            auto spacer = mmake<Widget>();\n            spacer->layout->maxWidth = 40;\n            header->AddChild(spacer, 1);\n        }\n\n        return mSpoiler;\n    }\n\n    void AnimationStateViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        if (mSubscribedPlayer)\n            mSubscribedPlayer.Lock()->onUpdate -= THIS_FUNC(OnAnimationUpdated);\n\n        mSubscribedPlayer = nullptr;\n\n        if (!targetObjets.IsEmpty())\n        {\n\t\t\tauto animationState = Ref(dynamic_cast<IAnimationState*>(targetObjets.Last().first));\n            mSubscribedPlayer = Ref(&animationState->GetPlayer());\n\n            if (mSubscribedPlayer)\n                mSubscribedPlayer.Lock()->onUpdate += THIS_FUNC(OnAnimationUpdated);\n\n            mLooped->value = animationState->IsLooped();\n\t\t\tmEditBtn->enabled = DynamicCast<AnimationState>(animationState) != nullptr;\n        }\n\n        DefaultObjectPropertiesViewer::OnRefreshed(targetObjets);\n    }\n\n    void AnimationStateViewer::OnFree()\n    {\n        if (mSubscribedPlayer)\n            mSubscribedPlayer.Lock()->onUpdate -= THIS_FUNC(OnAnimationUpdated);\n\n        mSubscribedPlayer = nullptr;\n    }\n\n    void AnimationStateViewer::OnPlayPauseToggled(bool play)\n    {\n        if (auto subscribedPlayer = mSubscribedPlayer.Lock())\n        {\n            if (play && subscribedPlayer->GetRelativeTime() >= 1.0f - FLT_EPSILON)\n                subscribedPlayer->SetRelTime(0.0f);\n\n            subscribedPlayer->SetPlaying(play);\n        }\n\n        auto selectedObjects = o2EditorSceneScreen.GetSelectedObjects();\n        if (!selectedObjects.IsEmpty())\n            o2Scene.OnObjectChanged(selectedObjects.First());\n    }\n\n    void AnimationStateViewer::OnLoopToggled(bool looped)\n    {\n        for (auto& targets : mTargetObjects)\n        {\n            if (!targets.first)\n                continue;\n\n            auto animationState = dynamic_cast<IAnimationState*>(targets.first);\n            if (!animationState)\n                continue;\n\n            animationState->SetLooped(looped);\n        }\n\n        o2Scene.OnObjectChanged(o2EditorSceneScreen.GetSelectedObjects().First());\n    }\n\n    void AnimationStateViewer::OnEditPressed()\n    {\n        if (mTargetObjects.IsEmpty())\n            return;\n\n        auto animationComponent = Ref(mPropertiesContext->FindOnStack<Component>());\n        auto preview = Ref(mPropertiesContext->FindOnStack<IAssetEditablePreview>());\n\n        if (auto assetProperty = DynamicCast<AssetProperty>(mPropertiesContext->FindPropertyField(\"mAnimation\")))\n            o2EditorAnimationWindow.EditAsset(assetProperty, animationComponent, preview);\n    }\n\n    void AnimationStateViewer::OnTimeProgressChanged(float value)\n    {\n        if (mSubscribedPlayer)\n            mSubscribedPlayer.Lock()->SetRelTime(value);\n    }\n\n    void AnimationStateViewer::OnAnimationUpdated(float time)\n    {\n        if (auto subscribedPlayer = mSubscribedPlayer.Lock()) \n        {\n            mTimeProgress->value = subscribedPlayer->GetLoopTime()/ subscribedPlayer->GetDuration();\n            mPlayPause->value = subscribedPlayer->IsPlaying();\n        }\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::AnimationStateViewer, Editor__AnimationStateViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/AnimationStateViewer.h",
    "content": "#pragma once\n\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Toggle;\n    class Button;\n    class HorizontalProgress;\n}\n\nnamespace Editor\n{\n    // ------------------------------------\n    // AnimationComponent properties viewer\n    // ------------------------------------\n    class AnimationStateViewer : public DefaultObjectPropertiesViewer\n    {\n    public:\n        // Returns viewing objects type\n        const Type* GetViewingObjectType() const override;\n\n        // Creates spoiler for properties\n        Ref<Spoiler> CreateSpoiler(const Ref<Widget>& parent) override;\n\n        // Returns viewing objects base type by static function\n        static const Type* GetViewingObjectTypeStatic();\n\n        IOBJECT(AnimationStateViewer);\n\n    private:\n        Ref<Toggle> mPlayPause;\n        Ref<Button> mEditBtn;\n        Ref<Toggle> mLooped;\n\n        Ref<HorizontalProgress> mTimeProgress;\n\n        WeakRef<IAnimation> mSubscribedPlayer;\n\n    private:\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // ThCalled when the viewer is freed\n        void OnFree() override;\n\n        // Called when play pause toggled\n        void OnPlayPauseToggled(bool play);\n\n        // Called when loop toggled\n        void OnLoopToggled(bool looped);\n\n        // Called when edit button pressed, sets animation editing\n        void OnEditPressed();\n\n        // Called when time progress changed by user, sets subscribed player time \n        void OnTimeProgressChanged(float value);\n\n        // Called when animation updates\n        void OnAnimationUpdated(float time);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AnimationStateViewer)\n{\n    BASE_CLASS(Editor::DefaultObjectPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationStateViewer)\n{\n    FIELD().PRIVATE().NAME(mPlayPause);\n    FIELD().PRIVATE().NAME(mEditBtn);\n    FIELD().PRIVATE().NAME(mLooped);\n    FIELD().PRIVATE().NAME(mTimeProgress);\n    FIELD().PRIVATE().NAME(mSubscribedPlayer);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationStateViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Spoiler>, CreateSpoiler, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetViewingObjectTypeStatic);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnRefreshed, _tmp1);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnFree);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnPlayPauseToggled, bool);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnLoopToggled, bool);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnEditPressed);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnTimeProgressChanged, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnAnimationUpdated, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/MeshComponentViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"MeshComponentViewer.h\"\n\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    MeshComponentViewer::MeshComponentViewer()\n    {\n        mSplineTool = mmake<SplineTool>();\n        mFrameTool = mmake<CustomFrameTool>();\n        mTopologyTool = mmake<MeshTopologyTool>();\n        mFrameTetxureLayer = mmake<SceneLayer>();\n    }\n\n    MeshComponentViewer::~MeshComponentViewer()\n    {\n        o2EditorSceneScreen.RemoveTool(mSplineTool);\n        o2EditorSceneScreen.RemoveTool(mFrameTool);\n        o2EditorSceneScreen.RemoveTool(mTopologyTool);\n        o2EditorSceneScreen.RemoveEditorLayer(mFrameTetxureLayer);\n    }\n\n    MeshComponentViewer& MeshComponentViewer::operator=(const MeshComponentViewer& other)\n    {\n        TObjectPropertiesViewer<MeshComponent>::operator=(other);\n        return *this;\n    }\n\n    void MeshComponentViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        o2EditorProperties.BuildObjectProperties(mSpoiler, &TypeOf(MeshComponent), mPropertiesContext, \"\",\n                                                 mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mFitAndCenterButton = o2UI.CreateButton(\"Fit and centerize\", THIS_FUNC(FitAndCenterize));\n\n        mSpoiler->AddChild(mFitAndCenterButton);\n    }\n\n    void MeshComponentViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        auto prevTargetObjects = mTypeTargetObjects;\n\n        TObjectPropertiesViewer<MeshComponent>::OnRefreshed(targetObjets);\n\n        if (!mTypeTargetObjects.IsEmpty() && prevTargetObjects != mTypeTargetObjects)\n        {\n            Function<Vec2F()> getOrigin = [&]() {\n                return mTypeTargetObjects[0].first->GetActor()->transform->GetWorldNonSizedBasis().origin;\n            };\n\n            // Spline tool\n            mSplineTool->SetSpline(mTypeTargetObjects[0].first->spline, getOrigin);\n            mSplineTool->onChanged = [&]() { mTypeTargetObjects[0].first->GetActor()->OnChanged(); };\n\n            // Frame tool\n            mFrameTool->SetFrame(Basis(mTypeTargetObjects[0].first->GetMappingFrame()));\n            mFrameTool->frameHandles->SetRotationEnabled(false);\n            mFrameTool->getOrigin = getOrigin;\n            mFrameTool->onChanged = [&](const Basis& b) {\n                mTypeTargetObjects[0].first->SetMappingFrame(b.AABB());\n                mTypeTargetObjects[0].first->GetActor()->OnChanged();\n            };\n\n            mFrameTetxureLayer->viewer = Ref(this);\n\n            // Topology tool\n            auto mesh = mTypeTargetObjects[0].first;\n            mTopologyTool->Setup([=]() { return mesh->GetExtraPoints(); },\n                                 [=](int idx, Vec2F p) { mesh->SetExtraPoint(idx, p); mesh->GetActor()->OnChanged(); },\n                                 [=]() { return mesh->GetActor()->transform->GetWorldNonSizedBasis(); },\n                                 [=](Vec2F p) { mesh->AddExtraPoint(p); mesh->GetActor()->OnChanged(); },\n                                 [=](int idx) { mesh->RemoveExtraPoint(idx); mesh->GetActor()->OnChanged(); });\n        }\n    }\n\n    void MeshComponentViewer::OnPropertiesEnabled()\n    {\n        o2EditorSceneScreen.AddTool(mSplineTool);\n        o2EditorSceneScreen.AddTool(mFrameTool);\n        o2EditorSceneScreen.AddTool(mTopologyTool);\n\n        mPrevSelectedTool = o2EditorSceneScreen.GetSelectedTool();\n        o2EditorSceneScreen.SelectTool<SplineTool>();\n\n        o2EditorSceneScreen.AddEditorLayer(mFrameTetxureLayer);\n    }\n\n    void MeshComponentViewer::OnPropertiesDisabled()\n    {\n        auto selectedTool = o2EditorSceneScreen.GetSelectedTool();\n        if (selectedTool == mSplineTool || selectedTool == mFrameTool || selectedTool == mTopologyTool)\n            o2EditorSceneScreen.SelectTool(mPrevSelectedTool.Lock());\n\n        o2EditorSceneScreen.RemoveTool(mSplineTool);\n        o2EditorSceneScreen.RemoveTool(mFrameTool);\n        o2EditorSceneScreen.RemoveTool(mTopologyTool);\n\n        o2EditorSceneScreen.RemoveEditorLayer(mFrameTetxureLayer);\n    }\n\n    void MeshComponentViewer::FitAndCenterize()\n    {\n        for (auto& target : mTypeTargetObjects)\n        {\n            auto component = target.first;\n            auto texture = component->GetImage();\n            auto size = texture->GetSize();\n\n            component->SetMappingFrame(RectF(size*-0.5f, size*0.5f));\n\n            mFrameTool->SetFrame(Basis(mTypeTargetObjects[0].first->GetMappingFrame()));\n        }\n    }\n\n    void MeshComponentViewer::SceneLayer::DrawOverScene()\n    {\n        auto viewerRef = viewer.Lock();\n        if (!viewerRef->mTypeTargetObjects.IsEmpty())\n        {\n            if (viewerRef->mFrameTool->isEnabled || viewerRef->mSplineTool->isEnabled)\n            {\n                auto obj = viewerRef->mTypeTargetObjects[0].first;\n\n                textureSprite.SetImageAsset(obj->GetImage());\n                textureSprite.SetBasis(Basis(obj->GetMappingFrame())\n                                       *Basis::Translated(obj->GetActor()->transform->GetWorldPosition())\n                                       *o2EditorSceneScreen.GetLocalToScreenTransform());\n                textureSprite.SetTransparency(0.5f);\n                textureSprite.Draw();\n            }\n\n            if (viewerRef->mTopologyTool->isEnabled || viewerRef->mSplineTool->isEnabled)\n                DrawMeshWire();\n        }\n    }\n\n    void MeshComponentViewer::SceneLayer::Update(float dt)\n    {}\n\n    int MeshComponentViewer::SceneLayer::GetOrder() const\n    {\n        return 0;\n    }\n\n    bool MeshComponentViewer::SceneLayer::IsEnabled() const\n    {\n        auto viewerRef = viewer.Lock();\n        return viewerRef->mFrameTool->isEnabled || viewerRef->mSplineTool->isEnabled || viewerRef->mTopologyTool->isEnabled;\n    }\n\n    const String& MeshComponentViewer::SceneLayer::GetName() const\n    {\n        static String str(\"mesh texture overlay\");\n        return str;\n    }\n\n    const String& MeshComponentViewer::SceneLayer::GetIconName() const\n    {\n        return String::empty;\n    }\n\n    void MeshComponentViewer::SceneLayer::DrawMeshWire()\n    {\n        auto viewerRef = viewer.Lock();\n        if (!viewerRef->mTypeTargetObjects.IsEmpty())\n        {\n            auto& mesh = viewerRef->mTypeTargetObjects[0].first->GetMesh();\n            const Vertex* verts = mesh.GetVertices<Vertex>();\n            const VertexIndex* idx = mesh.GetIndexes();\n\n            Color4 wireColor(0, 0, 0, 100);\n            Vector<Vertex> verticies;\n            for (UInt i = 0; i < mesh.polyCount; i++)\n            {\n                auto v = o2EditorSceneScreen.LocalToScreenPoint(verts[idx[i*3]]);\n                auto v1 = o2EditorSceneScreen.LocalToScreenPoint(verts[idx[i*3 + 1]]);\n                auto v2 = o2EditorSceneScreen.LocalToScreenPoint(verts[idx[i*3 + 2]]);\n\n                verticies.Clear();\n                verticies.Add(Vertex(v.x, v.y, 0.0f, wireColor.ARGB(), 0.0f, 0.0f));\n                verticies.Add(Vertex(v1.x, v1.y, 0.0f, wireColor.ARGB(), 0.0f, 0.0f));\n                verticies.Add(Vertex(v2.x, v2.y, 0.0f, wireColor.ARGB(), 0.0f, 0.0f));\n                o2Render.DrawPolyLine(verticies.Data(), verticies.Count());\n            }\n        }\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TObjectPropertiesViewer<MeshComponent>);\n// --- META ---\n\nDECLARE_CLASS(Editor::MeshComponentViewer, Editor__MeshComponentViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/MeshComponentViewer.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Components/MeshComponent.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Tools/CustomFrameTool.h\"\n#include \"o2Editor/Tools/MeshTopologyTool.h\"\n#include \"o2Editor/Tools/SplineTool.h\"\n#include \"o2Editor/UI/SplineEditor/SplineEditor.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    // ---------------------\n    // Mesh component viewer\n    // ---------------------\n    class MeshComponentViewer: public TObjectPropertiesViewer<MeshComponent>\n    {\n    public:\n        // Default constructor\n        MeshComponentViewer();\n\n        // Destructor\n        ~MeshComponentViewer();\n\n        // Copy operator\n        MeshComponentViewer& operator=(const MeshComponentViewer& other);\n\n        IOBJECT(MeshComponentViewer);\n\n    protected:\n        // ------------------------------------\n        // Scene layer for draw texture overlay\n        // ------------------------------------\n        struct SceneLayer : public SceneEditorLayer\n        {\n            WeakRef<MeshComponentViewer> viewer;        // Reference to viewer\n            Sprite                       textureSprite; // Texture sprite\n\n        public:\n            // Draws editor over scene\n            void DrawOverScene() override;\n\n            // Updates editor\n            void Update(float dt) override;\n\n            // Returns order of layer\n            int GetOrder() const override;\n\n            // Returns true if layer is enabled\n            bool IsEnabled() const override;\n\n            // Returns name of layer\n            const String& GetName() const override;\n\n            // Returns icon name of layer\n            const String& GetIconName() const override;\n\n            // Draws mesh wire\n            void DrawMeshWire();\n        };\n\n    protected:\n        Ref<SplineTool>       mSplineTool;        // Spline tool\n        Ref<CustomFrameTool>  mFrameTool;         // Mapping frame tool\n        Ref<MeshTopologyTool> mTopologyTool;      // Mesh topology tool\n        Ref<SceneLayer>       mFrameTetxureLayer; // Frame texture drawing layer\n\n        WeakRef<IEditTool> mPrevSelectedTool; // Previous selected tool, for restore\n\n        Ref<Button> mFitAndCenterButton; // Fit and centerize button\n\n    protected:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when button pressed\n        void FitAndCenterize();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::MeshComponentViewer)\n{\n    BASE_CLASS(Editor::TObjectPropertiesViewer<MeshComponent>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::MeshComponentViewer)\n{\n    FIELD().PROTECTED().NAME(mSplineTool);\n    FIELD().PROTECTED().NAME(mFrameTool);\n    FIELD().PROTECTED().NAME(mTopologyTool);\n    FIELD().PROTECTED().NAME(mFrameTetxureLayer);\n    FIELD().PROTECTED().NAME(mPrevSelectedTool);\n    FIELD().PROTECTED().NAME(mFitAndCenterButton);\n}\nEND_META;\nCLASS_METHODS_META(Editor::MeshComponentViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRefreshed, _tmp2);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, FitAndCenterize);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/ParticlesEmitterComponentViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ParticlesEmitterComponentViewer.h\"\n\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    ParticlesEmitterComponentViewer::ParticlesEmitterComponentViewer() = default;\n\n    ParticlesEmitterComponentViewer::~ParticlesEmitterComponentViewer()\n    {\n        o2EditorSceneScreen.RemoveEditorLayer(mSceneLayer);\n    }\n\n    ParticlesEmitterComponentViewer& ParticlesEmitterComponentViewer::operator=(const ParticlesEmitterComponentViewer& other)\n    {\n        TObjectPropertiesViewer<ParticlesEmitterComponent>::operator=(other);\n        return *this;\n    }\n\n    void ParticlesEmitterComponentViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        mControls = mmake<VerticalLayout>();\n        mControls->expandHeight = false;\n        mControls->expandWidth = true;\n        mControls->fitByChildren = true;\n        mSpoiler->AddChild(mControls);\n\n        auto playControls = mmake<HorizontalLayout>();\n        playControls->layout->minHeight = 20;\n        playControls->expandWidth = true;\n        playControls->expandHeight = false;\n        playControls->borderLeft = 5;\n        playControls->spacing = 5;\n        mControls->AddChild(playControls);\n\n        mPlayPauseToggle = o2UI.CreateWidget<Toggle>(\"green play-stop\");\n        mPlayPauseToggle->name = \"play-stop\";\n        mPlayPauseToggle->layout->minSize = Vec2F(20, 20);\n        mPlayPauseToggle->layout->maxSize = Vec2F(20, 20);\n        mPlayPauseToggle->onToggleByUser = [&](bool play) { OnPlayPauseTogglePressed(play); };\n        playControls->AddChild(mPlayPauseToggle);\n\n        mReplayButton = o2UI.CreateWidget<Button>(\"revert prototype\");\n        mReplayButton->name = \"revert\";\n        mReplayButton->layout->minSize = Vec2F(20, 20);\n        mReplayButton->layout->maxSize = Vec2F(20, 20);\n        mReplayButton->onClick = [&]() { OnReplayPressed(); };\n        playControls->AddChild(mReplayButton);\n\n        mTimeProgress = o2UI.CreateWidget<HorizontalProgress>(\"animation state bar\");\n        mTimeProgress->name = \"bar\";\n        mTimeProgress->layout->maxHeight = 3;\n        mTimeProgress->onChangeByUser = [&](float value) { SetTimeProgress(value); };\n        playControls->AddChild(mTimeProgress);\n\n        auto loopedToggle = o2UI.CreateWidget<Toggle>(\"animation state loop\");\n        loopedToggle->name = \"loop\";\n        loopedToggle->layout->minSize = Vec2F(20, 20);\n        loopedToggle->layout->maxSize = Vec2F(20, 20);\n        loopedToggle->onToggleByUser = [&](bool loop) { OnLoopTogglePressed(loop); };\n        playControls->AddChild(loopedToggle);\n\n        auto horSeparatorContainer = mmake<Widget>();\n        horSeparatorContainer->layout->minHeight = 3;\n        mControls->AddChild(horSeparatorContainer);\n\n        auto horSeparator = o2UI.CreateWidget<Widget>(\"hor separator\");\n        *horSeparator->layout = WidgetLayout::BothStretch(-10, 0, -10, 0);\n        horSeparatorContainer->AddChild(horSeparator);\n\n        o2EditorProperties.BuildObjectProperties(mSpoiler, &TypeOf(ParticlesEmitterComponent), mPropertiesContext, \"\",\n                                                 mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mSceneLayer = mmake<SceneLayer>();\n        mSceneLayer->viewer = Ref(this);\n    }\n\n    void ParticlesEmitterComponentViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        auto prevTargetObjects = mTypeTargetObjects;\n\n        TObjectPropertiesViewer<ParticlesEmitterComponent>::OnRefreshed(targetObjets);\n    }\n\n    void ParticlesEmitterComponentViewer::OnPropertiesEnabled()\n    {\n        o2EditorSceneScreen.AddEditorLayer(mSceneLayer);\n\n        TObjectPropertiesViewer<ParticlesEmitterComponent>::OnPropertiesEnabled();\n    }\n\n    void ParticlesEmitterComponentViewer::OnPropertiesDisabled()\n    {\n        o2EditorSceneScreen.RemoveEditorLayer(mSceneLayer);\n\n        TObjectPropertiesViewer<ParticlesEmitterComponent>::OnPropertiesDisabled();\n    }\n\n    Vector<Pair<ParticlesEmitterComponent*, ParticlesEmitterComponent*>>& ParticlesEmitterComponentViewer::GetTargetObjects()\n    {\n        return mTypeTargetObjects;\n    }\n\n    void ParticlesEmitterComponentViewer::OnPlayPauseTogglePressed(bool play)\n    {\n        for (auto& pair : GetTargetObjects())\n        {\n            auto emitter = pair.first;\n            if (emitter)\n            {\n                if (play && Math::Equals(emitter->GetRelativeTime(), 1.0f))\n                    emitter->GoToBegin();\n\n                emitter->SetPlaying(play);\n                emitter->SetParticlesPause(!play);\n            }\n        }\n    }\n\n    void ParticlesEmitterComponentViewer::OnLoopTogglePressed(bool loop)\n    {\n        for (auto& pair : GetTargetObjects())\n        {\n            auto emitter = pair.first;\n            if (emitter)\n                emitter->SetLoop(loop ? Loop::Repeat : Loop::None);\n        }\n    }\n\n    void ParticlesEmitterComponentViewer::OnReplayPressed()\n    {\n        for (auto& pair : GetTargetObjects())\n        {\n            auto emitter = pair.first;\n            if (emitter)\n            {\n                emitter->SetParticlesPause(false);\n                emitter->RewindAndPlay();\n            }\n        }\n    }\n\n    void ParticlesEmitterComponentViewer::SetTimeProgress(float time)\n    {\n        for (auto& pair : GetTargetObjects())\n        {\n            auto emitter = pair.first;\n            if (emitter)\n            {\n                emitter->SetPlaying(false);\n                emitter->SetParticlesPause(true);\n                emitter->SetTime(time);\n            }\n        }\n    }\n\n    void ParticlesEmitterComponentViewer::SceneLayer::DrawOverScene()\n    {}\n\n    void ParticlesEmitterComponentViewer::SceneLayer::Update(float dt)\n    {\n        bool first = true;\n        auto viewer = this->viewer.Lock();\n        for (auto& pair : viewer->GetTargetObjects())\n        {\n            auto emitter = pair.first;\n            if (emitter)\n            {\n                emitter->Update(dt);\n\n                if (first)\n                {\n                    viewer->mTimeProgress->SetValue(emitter->GetTime());\n\n                    bool isPlaying = emitter->IsPlaying();\n                    viewer->mPlayPauseToggle->SetValue(isPlaying);\n                    viewer->mTimeProgress->maxValue = emitter->GetDuration();\n\n                    first = false;\n                }\n            }\n        }\n    }\n\n    int ParticlesEmitterComponentViewer::SceneLayer::GetOrder() const\n    {\n        return 0;\n    }\n\n    bool ParticlesEmitterComponentViewer::SceneLayer::IsEnabled() const\n    {\n        return true;\n    }\n\n    const String& ParticlesEmitterComponentViewer::SceneLayer::GetName() const\n    {\n        static String name = \"Particles Emitter\";\n        return name;\n    }\n\n    const String& ParticlesEmitterComponentViewer::SceneLayer::GetIconName() const\n    {\n        return String::empty;\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TObjectPropertiesViewer<ParticlesEmitterComponent>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ParticlesEmitterComponentViewer, Editor__ParticlesEmitterComponentViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/ParticlesEmitterComponentViewer.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Components/ParticlesEmitterComponent.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    // ----------------------------------\n    // Particles emitter component viewer\n    // ----------------------------------\n    class ParticlesEmitterComponentViewer: public TObjectPropertiesViewer<ParticlesEmitterComponent>\n    {\n    public:\n        // Default constructor\n        ParticlesEmitterComponentViewer();\n\n        // Destructor\n        ~ParticlesEmitterComponentViewer();\n\n        // Copy operator\n        ParticlesEmitterComponentViewer& operator=(const ParticlesEmitterComponentViewer& other);\n\n        IOBJECT(ParticlesEmitterComponentViewer);\n\n    protected:\n        // ------------------------------------\n        // Scene layer for draw texture overlay\n        // ------------------------------------\n        struct SceneLayer : public SceneEditorLayer\n        {\n            WeakRef<ParticlesEmitterComponentViewer> viewer; // Reference to viewer\n\n        public:\n            // Draws editor over scene\n            void DrawOverScene() override;\n\n            // Updates editor\n            void Update(float dt) override;\n\n            // Returns order of layer\n            int GetOrder() const override;\n\n            // Returns true if layer is enabled\n            bool IsEnabled() const override;\n\n            // Returns name of layer\n            const String& GetName() const override;\n\n            // Returns icon name of layer\n            const String& GetIconName() const override;\n        };\n\n    protected:\n        Ref<VerticalLayout> mControls;   // Play/Pause/Reset buttons, timeline, etc.\n        Ref<SceneLayer>     mSceneLayer; // Scene layer for draw handles and update emitter\n\n        Ref<HorizontalProgress> mTimeProgress;    // Time progress bar\n        Ref<Toggle>             mPlayPauseToggle; // Play/Pause button\n        Ref<Button>             mReplayButton;    // Replay button\n\n    protected:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Returns target objects\n        Vector<Pair<ParticlesEmitterComponent*, ParticlesEmitterComponent*>>& GetTargetObjects();\n\n        // Called when play/pause button pressed, start or stop emitter\n        void OnPlayPauseTogglePressed(bool play);\n\n        // Called when loop button pressed, enable or disable loop\n        void OnLoopTogglePressed(bool loop);\n\n        // Called when replay button pressed, reset emitter and start it\n        void OnReplayPressed();\n\n        // Called when time progress changed, sets emitter time \n        void SetTimeProgress(float time);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ParticlesEmitterComponentViewer)\n{\n    BASE_CLASS(Editor::TObjectPropertiesViewer<ParticlesEmitterComponent>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ParticlesEmitterComponentViewer)\n{\n    FIELD().PROTECTED().NAME(mControls);\n    FIELD().PROTECTED().NAME(mSceneLayer);\n    FIELD().PROTECTED().NAME(mTimeProgress);\n    FIELD().PROTECTED().NAME(mPlayPauseToggle);\n    FIELD().PROTECTED().NAME(mReplayButton);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ParticlesEmitterComponentViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n    typedef Vector<Pair<ParticlesEmitterComponent*, ParticlesEmitterComponent*>>& _tmp3;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRefreshed, _tmp2);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp3, GetTargetObjects);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPlayPauseTogglePressed, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLoopTogglePressed, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnReplayPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetTimeProgress, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/SkinnedMesh/SkinningMeshBoneComponentViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SkinningMeshBoneComponentViewer.h\"\n\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    SkinningMeshBoneComponentViewer::SkinningMeshBoneComponentViewer()\n    {\n        mWeightsTool = mmake<MeshWeightsTool>();\n        mFrameTetxureLayer = mmake<SkinningMeshEditorLayer>();\n    }\n\n    SkinningMeshBoneComponentViewer::~SkinningMeshBoneComponentViewer()\n    {\n        o2EditorSceneScreen.RemoveTool(mWeightsTool);\n    }\n\n    SkinningMeshBoneComponentViewer& SkinningMeshBoneComponentViewer::operator=(const SkinningMeshBoneComponentViewer& other)\n    {\n        TObjectPropertiesViewer<SkinningMeshBoneComponent>::operator=(other);\n        return *this;\n    }\n\n    void SkinningMeshBoneComponentViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        o2EditorProperties.BuildObjectProperties(mSpoiler, &TypeOf(SkinningMeshBoneComponent), mPropertiesContext, \"\",\n                                                 mOnPropertyChangeCompleted, mOnPropertyChanged);\n    }\n\n    void SkinningMeshBoneComponentViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        auto prevTargetObjects = mTypeTargetObjects;\n\n        TObjectPropertiesViewer<SkinningMeshBoneComponent>::OnRefreshed(targetObjets);\n\n        if (!mTypeTargetObjects.IsEmpty() && prevTargetObjects != mTypeTargetObjects)\n        {\n            mWeightsTool->boneComponent = Ref(mTypeTargetObjects[0].first);\n\n            mFrameTetxureLayer->mesh = mTypeTargetObjects[0].first->FindSkinningMesh();\n        }\n    }\n\n    void SkinningMeshBoneComponentViewer::OnPropertiesEnabled()\n    {\n        o2EditorSceneScreen.AddTool(mWeightsTool);\n        o2EditorSceneScreen.SelectTool<MeshWeightsTool>();\n\n        o2EditorSceneScreen.AddEditorLayer(mFrameTetxureLayer);\n    }\n\n    void SkinningMeshBoneComponentViewer::OnPropertiesDisabled()\n    {\n        o2EditorSceneScreen.RemoveTool(mWeightsTool);\n        o2EditorSceneScreen.RemoveEditorLayer(mFrameTetxureLayer);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TObjectPropertiesViewer<SkinningMeshBoneComponent>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SkinningMeshBoneComponentViewer, Editor__SkinningMeshBoneComponentViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/SkinnedMesh/SkinningMeshBoneComponentViewer.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Components/SkinningMeshBoneComponent.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Objects/Components/SkinnedMesh/SkinningMeshEditorLayer.h\"\n#include \"o2Editor/Tools/MeshWeightsTool.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Spoiler;\n    class Button;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SceneDragHandle);\n\n    // ------------------------------\n    // Skinning Mesh component viewer\n    // ------------------------------\n    class SkinningMeshBoneComponentViewer: public TObjectPropertiesViewer<SkinningMeshBoneComponent>\n    {\n    public:\n        // Default constructor\n        SkinningMeshBoneComponentViewer();\n\n        // Destructor\n        ~SkinningMeshBoneComponentViewer();\n\n        // Copy operator\n        SkinningMeshBoneComponentViewer& operator=(const SkinningMeshBoneComponentViewer& other);\n\n        IOBJECT(SkinningMeshBoneComponentViewer);\n\n    protected:\n        Ref<MeshWeightsTool>         mWeightsTool;       // Mesh weights tool\n        Ref<SkinningMeshEditorLayer> mFrameTetxureLayer; // Frame texture drawing layer\n\n    protected:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SkinningMeshBoneComponentViewer)\n{\n    BASE_CLASS(Editor::TObjectPropertiesViewer<SkinningMeshBoneComponent>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SkinningMeshBoneComponentViewer)\n{\n    FIELD().PROTECTED().NAME(mWeightsTool);\n    FIELD().PROTECTED().NAME(mFrameTetxureLayer);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SkinningMeshBoneComponentViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRefreshed, _tmp2);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/SkinnedMesh/SkinningMeshComponentViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SkinningMeshComponentViewer.h\"\n\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Tools/SkeletonTool.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneDragHandle.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    SkinningMeshComponentViewer::SkinningMeshComponentViewer()\n    {\n        mSplineTool = mmake<SplineTool>();\n        mFrameTool = mmake<CustomFrameTool>();\n        mTopologyTool = mmake<MeshTopologyTool>();\n        mSkeletonTool = mmake<SkeletonTool>();\n        mFrameTetxureLayer = mmake<SkinningMeshEditorLayer>();\n    }\n\n    SkinningMeshComponentViewer::~SkinningMeshComponentViewer()\n    {\n        o2EditorSceneScreen.RemoveTool(mSplineTool);\n        o2EditorSceneScreen.RemoveTool(mFrameTool);\n        o2EditorSceneScreen.RemoveTool(mTopologyTool);\n        o2EditorSceneScreen.RemoveEditorLayer(mFrameTetxureLayer);\n    }\n\n    SkinningMeshComponentViewer& SkinningMeshComponentViewer::operator=(const SkinningMeshComponentViewer& other)\n    {\n        TObjectPropertiesViewer<SkinningMeshComponent>::operator=(other);\n        return *this;\n    }\n\n    void SkinningMeshComponentViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        o2EditorProperties.BuildObjectProperties(mSpoiler, &TypeOf(SkinningMeshComponent), mPropertiesContext, \"\",\n            mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mFitAndCenterButton = o2UI.CreateButton(\"Fit and centerize image\", THIS_FUNC(FitAndCenterize));\n        mEditSkeletonButton = o2UI.CreateButton(\"Edit skeleton\", THIS_FUNC(OnEditSkeletonPressed));\n        mReskinButton = o2UI.CreateButton(\"Reskin\", THIS_FUNC(OnReskinPressed));\n\n        mSpoiler->AddChild(mFitAndCenterButton);\n        mSpoiler->AddChild(mEditSkeletonButton);\n        mSpoiler->AddChild(mReskinButton);\n    }\n\n    void SkinningMeshComponentViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        auto prevTargetObjects = mTypeTargetObjects;\n\n        TObjectPropertiesViewer<SkinningMeshComponent>::OnRefreshed(targetObjets);\n\n        if (!mTypeTargetObjects.IsEmpty() && prevTargetObjects != mTypeTargetObjects)\n        {\n            Function<Vec2F()> getOrigin = [&]() {\n                return mTypeTargetObjects[0].first->GetActor()->transform->GetWorldNonSizedBasis().origin;\n            };\n\n            // Spline tool\n            mSplineTool->SetSpline(mTypeTargetObjects[0].first->spline, getOrigin);\n            mSplineTool->onChanged = [&]() { mTypeTargetObjects[0].first->GetActor()->OnChanged(); };\n\n            // Frame tool\n            mFrameTool->SetFrame(Basis(mTypeTargetObjects[0].first->GetMappingFrame()));\n            mFrameTool->frameHandles->SetRotationEnabled(false);\n            mFrameTool->getOrigin = getOrigin;\n            mFrameTool->onChanged = [&](const Basis& b) {\n                mTypeTargetObjects[0].first->SetMappingFrame(b.AABB());\n                mTypeTargetObjects[0].first->GetActor()->OnChanged();\n            };\n\n            mFrameTetxureLayer->mesh = Ref(mTypeTargetObjects[0].first);\n\n            // Topology tool\n            auto mesh = mTypeTargetObjects[0].first;\n            mTopologyTool->Setup([=]() { return mesh->GetExtraPoints(); },\n                [=](int idx, Vec2F p) { mesh->SetExtraPoint(idx, p); mesh->GetActor()->OnChanged(); },\n                [=]() { return mesh->GetActor()->transform->GetWorldNonSizedBasis(); },\n                [=](Vec2F p) { mesh->AddExtraPoint(p); mesh->GetActor()->OnChanged(); },\n                [=](int idx) { mesh->RemoveExtraPoint(idx); mesh->GetActor()->OnChanged(); });\n        }\n    }\n\n    void SkinningMeshComponentViewer::OnPropertiesEnabled()\n    {\n        o2EditorSceneScreen.AddTool(mSplineTool);\n        o2EditorSceneScreen.AddTool(mFrameTool);\n        o2EditorSceneScreen.AddTool(mTopologyTool);\n\n        o2EditorSceneScreen.SelectTool<SplineTool>();\n\n        o2EditorSceneScreen.AddEditorLayer(mFrameTetxureLayer);\n\n        mSkeletonTool = o2EditorSceneScreen.GetTool<SkeletonTool>();\n        if (mSkeletonTool && !mTypeTargetObjects.IsEmpty() && mTypeTargetObjects[0].first)\n            mEditingSkeleton = mSkeletonTool->IsEditingSkeleton(Ref(mTypeTargetObjects[0].first));\n\n        UpdateEditSkeletonButtonCaption();\n    }\n\n    void SkinningMeshComponentViewer::OnPropertiesDisabled()\n    {\n        o2EditorSceneScreen.RemoveTool(mSplineTool);\n        o2EditorSceneScreen.RemoveTool(mFrameTool);\n        o2EditorSceneScreen.RemoveTool(mTopologyTool);\n\n        o2EditorSceneScreen.RemoveEditorLayer(mFrameTetxureLayer);\n\n        mSplineTool->Reset();\n        mFrameTool->Reset();\n        mTopologyTool->Reset();\n    }\n\n    void SkinningMeshComponentViewer::FitAndCenterize()\n    {\n        for (auto& target : mTypeTargetObjects)\n        {\n            auto component = target.first;\n            auto texture = component->GetImage();\n            auto size = texture->GetSize();\n\n            component->SetMappingFrame(RectF(size * -0.5f, size * 0.5f));\n\n            mFrameTool->SetFrame(Basis(mTypeTargetObjects[0].first->GetMappingFrame()));\n        }\n    }\n\n    void SkinningMeshComponentViewer::OnEditSkeletonPressed()\n    {\n        if (mTypeTargetObjects.IsEmpty() || !mTypeTargetObjects[0].first)\n            return;\n\n        mEditingSkeleton = !mEditingSkeleton;\n\n        auto component = Ref(mTypeTargetObjects[0].first);\n\n        if (mEditingSkeleton)\n        {\n            mSkeletonTool = o2EditorSceneScreen.GetTool<SkeletonTool>();\n            if (!mSkeletonTool)\n            {\n                mSkeletonTool = mmake<SkeletonTool>();\n                o2EditorSceneScreen.AddTool(mSkeletonTool);\n            }\n\n            mSkeletonTool->AddSkeletonInstance(component);\n\n            o2EditorSceneScreen.SelectTool<SkeletonTool>();\n        }\n        else\n        {\n            if (mSkeletonTool)\n            {\n                mSkeletonTool->RemoveSkeletonInstance(component);\n\n                if (mSkeletonTool->GetEditingSkeletons().Count() == 0)\n                {\n                    o2EditorSceneScreen.RemoveTool(mSkeletonTool);\n                    mSkeletonTool = nullptr;\n                }\n            }\n        }\n\n        UpdateEditSkeletonButtonCaption();\n    }\n\n    void SkinningMeshComponentViewer::OnReskinPressed()\n    {\n        for (auto& targetPair : mTypeTargetObjects)\n        {\n            targetPair.first->NeedUpdateBones();\n            targetPair.first->OnUpdate(0.0f);\n        }\n    }\n\n    void SkinningMeshComponentViewer::UpdateEditSkeletonButtonCaption()\n    {\n        mEditSkeletonButton->caption = mEditingSkeleton ? \"Stop editing skeleton\" : \"Edit skeleton\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TObjectPropertiesViewer<SkinningMeshComponent>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SkinningMeshComponentViewer, Editor__SkinningMeshComponentViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/SkinnedMesh/SkinningMeshComponentViewer.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Components/SkinningMeshBoneComponent.h\"\n#include \"o2/Scene/Components/SkinningMeshComponent.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Objects/Components/SkinnedMesh/SkinningMeshEditorLayer.h\"\n#include \"o2Editor/Tools/CustomFrameTool.h\"\n#include \"o2Editor/Tools/MeshTopologyTool.h\"\n#include \"o2Editor/Tools/SplineTool.h\"\n#include \"o2Editor/UI/SplineEditor/SplineEditor.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Spoiler;\n    class Button;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SceneDragHandle);\n\n    struct SkeletonTool;\n    FORWARD_REF(SkeletonTool);\n\n    // ------------------------------\n    // Skinning Mesh component viewer\n    // ------------------------------\n    class SkinningMeshComponentViewer: public TObjectPropertiesViewer<SkinningMeshComponent>\n    {\n    public:\n        // Default constructor\n        SkinningMeshComponentViewer();\n\n        // Destructor\n        ~SkinningMeshComponentViewer();\n\n        // Copy operator\n        SkinningMeshComponentViewer& operator=(const SkinningMeshComponentViewer& other);\n\n        IOBJECT(SkinningMeshComponentViewer);\n\n    protected:\n        Ref<SplineTool>              mSplineTool;        // Spline tool\n        Ref<CustomFrameTool>         mFrameTool;         // Mapping frame tool\n        Ref<MeshTopologyTool>        mTopologyTool;      // Mesh topology tool\n        Ref<SkeletonTool>            mSkeletonTool;      // Shared skeleton tool\n        Ref<SkinningMeshEditorLayer> mFrameTetxureLayer; // Frame texture drawing layer\n\n        Ref<Button> mFitAndCenterButton; // Fit and centerize button\n        Ref<Button> mEditSkeletonButton; // Enable/disable skeleton editing button\n        Ref<Button> mReskinButton;       // Resets mesh skinning and updates bones transforms\n\n        bool mEditingSkeleton = false; // It editing skeleton enabled\n\n    protected:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when button pressed\n        void FitAndCenterize();\n\n        // Called when edit skeleton pressed\n        void OnEditSkeletonPressed();\n\n        // Called when reskin pressed\n        void OnReskinPressed();\n\n        // Updates the caption on the skeleton edit button depending on whether it is enabled or not\n        void UpdateEditSkeletonButtonCaption();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SkinningMeshComponentViewer)\n{\n    BASE_CLASS(Editor::TObjectPropertiesViewer<SkinningMeshComponent>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SkinningMeshComponentViewer)\n{\n    FIELD().PROTECTED().NAME(mSplineTool);\n    FIELD().PROTECTED().NAME(mFrameTool);\n    FIELD().PROTECTED().NAME(mTopologyTool);\n    FIELD().PROTECTED().NAME(mSkeletonTool);\n    FIELD().PROTECTED().NAME(mFrameTetxureLayer);\n    FIELD().PROTECTED().NAME(mFitAndCenterButton);\n    FIELD().PROTECTED().NAME(mEditSkeletonButton);\n    FIELD().PROTECTED().NAME(mReskinButton);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mEditingSkeleton);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SkinningMeshComponentViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRefreshed, _tmp2);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, FitAndCenterize);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditSkeletonPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnReskinPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateEditSkeletonButtonCaption);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/SkinnedMesh/SkinningMeshEditorLayer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SkinningMeshEditorLayer.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    void SkinningMeshEditorLayer::DrawOverScene()\n    {\n        if (mesh)\n        {\n            textureSprite.SetImageAsset(mesh->GetImage());\n            textureSprite.SetBasis(Basis(mesh->GetMappingFrame())\n                * Basis::Translated(mesh->GetActor()->transform->GetWorldPosition())\n                * o2EditorSceneScreen.GetLocalToScreenTransform());\n            textureSprite.SetTransparency(0.5f);\n            textureSprite.Draw();\n\n            if (drawMeshWire)\n                DrawMeshWire();\n        }\n    }\n\n    void SkinningMeshEditorLayer::Update(float dt)\n    {}\n\n    int SkinningMeshEditorLayer::GetOrder() const\n    {\n        return 0;\n    }\n\n    bool SkinningMeshEditorLayer::IsEnabled() const\n    {\n        return true;\n    }\n\n    const String& SkinningMeshEditorLayer::GetName() const\n    {\n        static String str(\"mesh texture overlay\");\n        return str;\n    }\n\n    const String& SkinningMeshEditorLayer::GetIconName() const\n    {\n        return String::empty;\n    }\n\n    void SkinningMeshEditorLayer::DrawMeshWire()\n    {\n        if (mesh)\n        {\n            auto& renderMesh = mesh->GetMesh();\n            auto* verts = renderMesh.vertices;\n\n            Color4 wireColor(0, 0, 0, 100);\n            Vector<Vertex> verticies;\n            for (UInt i = 0; i < renderMesh.polyCount; i++)\n            {\n                auto v = o2EditorSceneScreen.LocalToScreenPoint(verts[renderMesh.indexes[i * 3]]);\n                auto v1 = o2EditorSceneScreen.LocalToScreenPoint(verts[renderMesh.indexes[i * 3 + 1]]);\n                auto v2 = o2EditorSceneScreen.LocalToScreenPoint(verts[renderMesh.indexes[i * 3 + 2]]);\n\n                verticies.Clear();\n                verticies.Add(Vertex(v.x, v.y, 0.0f, wireColor.ABGR(), 0.0f, 0.0f));\n                verticies.Add(Vertex(v1.x, v1.y, 0.0f, wireColor.ABGR(), 0.0f, 0.0f));\n                verticies.Add(Vertex(v2.x, v2.y, 0.0f, wireColor.ABGR(), 0.0f, 0.0f));\n                verticies.Add(Vertex(v.x, v.y, 0.0f, wireColor.ABGR(), 0.0f, 0.0f));\n                o2Render.DrawPolyLine(verticies.Data(), verticies.Count());\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/SkinnedMesh/SkinningMeshEditorLayer.h",
    "content": "#pragma once\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/Components/SkinningMeshComponent.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // -----------------------------------------------------------------\n    // Scene edit layer, used to draw mesh's texture frame and mesh wire\n    // -----------------------------------------------------------------\n    struct SkinningMeshEditorLayer : public SceneEditorLayer\n    {\n        bool drawMeshWire = true; // Is draw mesh wire\n\n        Ref<SkinningMeshComponent> mesh;          // Reference to mesh component\n        Sprite                     textureSprite; // Texture sprite\n\n    public:\n        // Draws editor over scene\n        void DrawOverScene() override;\n\n        // Updates editor\n        void Update(float dt) override;\n\n        // Returns order of layer\n        int GetOrder() const override;\n\n        // Returns true if layer is enabled\n        bool IsEnabled() const override;\n\n        // Returns name of layer\n        const String& GetName() const override;\n\n        // Returns icon name of layer\n        const String& GetIconName() const override;\n\n        // Draws mesh wire\n        void DrawMeshWire();\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/SplineColliderViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SplineColliderViewer.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    SplineColliderViewer::SplineColliderViewer()\n    {\n        mSplineTool = mmake<SplineTool>();\n    }\n\n    SplineColliderViewer::~SplineColliderViewer()\n    {\n        mSplineTool->Reset();\n        o2EditorSceneScreen.RemoveTool(mSplineTool);\n    }\n\n    SplineColliderViewer& SplineColliderViewer::operator=(const SplineColliderViewer& other)\n    {\n        TObjectPropertiesViewer<SplineCollider>::operator=(other);\n        return *this;\n    }\n\n    void SplineColliderViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        o2EditorProperties.BuildObjectProperties(mSpoiler, &TypeOf(SplineCollider), mPropertiesContext, \"\",\n                                                 mOnPropertyChangeCompleted, mOnPropertyChanged);\n    }\n\n    void SplineColliderViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        auto prevTargetObjects = mTypeTargetObjects;\n\n        TObjectPropertiesViewer<SplineCollider>::OnRefreshed(targetObjets);\n\n        if (mTypeTargetObjects.IsEmpty())\n        {\n            if (!prevTargetObjects.IsEmpty())\n                mSplineTool->Reset();\n\n            return;\n        }\n\n        if (prevTargetObjects != mTypeTargetObjects)\n        {\n            // Capture mTypeTargetObjects by reference so the lambdas always read live\n            // viewer state. Capturing a raw target* by value goes dangling the moment\n            // the component is removed from the actor while this tool stays on screen.\n            Function<Vec2F()> getOrigin = [&]() {\n                return mTypeTargetObjects[0].first->GetActor()->transform->GetWorldNonSizedBasis().origin;\n            };\n\n            mSplineTool->SetSpline(mTypeTargetObjects[0].first->GetSpline(), getOrigin);\n            mSplineTool->onChanged = [&]() { mTypeTargetObjects[0].first->GetActor()->OnChanged(); };\n        }\n    }\n\n    void SplineColliderViewer::OnPropertiesEnabled()\n    {\n        o2EditorSceneScreen.AddTool(mSplineTool);\n\n        mPrevSelectedTool = o2EditorSceneScreen.GetSelectedTool();\n        o2EditorSceneScreen.SelectTool<SplineTool>();\n    }\n\n    void SplineColliderViewer::OnPropertiesDisabled()\n    {\n        auto selectedTool = o2EditorSceneScreen.GetSelectedTool();\n        if (selectedTool == mSplineTool)\n            o2EditorSceneScreen.SelectTool(mPrevSelectedTool.Lock());\n\n        o2EditorSceneScreen.RemoveTool(mSplineTool);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TObjectPropertiesViewer<o2::SplineCollider>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SplineColliderViewer, Editor__SplineColliderViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/Components/SplineColliderViewer.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Physics/SplineCollider.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Tools/SplineTool.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // ----------------------------------------\n    // Spline collider component editor viewer.\n    // Drives the scene SplineTool against the\n    // collider's spline so its curve can be\n    // edited in the scene window.\n    // ----------------------------------------\n    class SplineColliderViewer: public TObjectPropertiesViewer<SplineCollider>\n    {\n    public:\n        // Default constructor\n        SplineColliderViewer();\n\n        // Destructor\n        ~SplineColliderViewer();\n\n        // Copy operator\n        SplineColliderViewer& operator=(const SplineColliderViewer& other);\n\n        IOBJECT(SplineColliderViewer);\n\n    protected:\n        Ref<SplineTool>    mSplineTool;       // Spline tool\n        WeakRef<IEditTool> mPrevSelectedTool; // Previous selected tool, for restore\n\n    protected:\n        // Called when the viewer is refreshed, builds properties via reflection\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SplineColliderViewer)\n{\n    BASE_CLASS(Editor::TObjectPropertiesViewer<SplineCollider>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SplineColliderViewer)\n{\n    FIELD().PROTECTED().NAME(mSplineTool);\n    FIELD().PROTECTED().NAME(mPrevSelectedTool);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SplineColliderViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRefreshed, _tmp2);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DefaultObjectPropertiesViewer.h\"\n\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Properties.h\"\n\nnamespace Editor\n{\n    bool DefaultObjectPropertiesViewer::CheckBuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        IObjectPropertiesViewer::CheckBuildProperties(targetObjets);\n\n        if (targetObjets.IsEmpty())\n            return false;\n\n        PushEditorScopeOnStack scope;\n\n        const Type* objectsType = &(targetObjets[0].first)->GetType();\n\n        if (mBuiltObjectType != objectsType || mBuiltWithHiddenProperties != o2EditorProperties.IsPrivateFieldsVisible())\n        {\n            mBuiltObjectType = objectsType;\n\n            if (mBuiltObjectType)\n                o2EditorProperties.FreeProperties(mPropertiesContext);\n\n            if (mBuiltObjectType)\n            {\n                o2EditorProperties.BuildObjectProperties(mSpoiler, mBuiltObjectType, mPropertiesContext, \"\",\n                                                         mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n                mBuiltWithHiddenProperties = o2EditorProperties.IsPrivateFieldsVisible();\n            }\n\n            return true;\n        }\n\n        return false;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DefaultObjectPropertiesViewer, Editor__DefaultObjectPropertiesViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n\nnamespace Editor\n{\n    // ------------------------------------------------------------\n    // Default object properties viewer. Builds field by reflection\n    // ------------------------------------------------------------\n    class DefaultObjectPropertiesViewer: public IObjectPropertiesViewer\n    {\n    public:\n        IOBJECT(DefaultObjectPropertiesViewer);\n\n    protected:\n        const Type* mBuiltObjectType = &TypeOf(IObject); // Type of built object properties\n        bool        mBuiltWithHiddenProperties = false;  // Is properties was built with hidden properties section\n\n    protected:\n        // Checks if properties need to be rebuilt, rebuilds if necessary\n        bool CheckBuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DefaultObjectPropertiesViewer)\n{\n    BASE_CLASS(Editor::IObjectPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DefaultObjectPropertiesViewer)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(&TypeOf(IObject)).NAME(mBuiltObjectType);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mBuiltWithHiddenProperties);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DefaultObjectPropertiesViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n\n    FUNCTION().PROTECTED().SIGNATURE(bool, CheckBuildProperties, _tmp1);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/ParticlesSplineEffectViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ParticlesSplineEffectViewer.h\"\n\n#include \"o2/Render/Particles/ParticlesEffects.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2/Scene/Components/ParticlesEmitterComponent.h\"\n\nnamespace Editor\n{\n\n    ParticlesSplineEffectViewer::ParticlesSplineEffectViewer()\n    {\n        mSplineTool = mmake<SplineTool>();\n    }\n\n    ParticlesSplineEffectViewer::~ParticlesSplineEffectViewer()\n    {\n        o2EditorSceneScreen.RemoveTool(mSplineTool);\n    }\n\n    const Type* ParticlesSplineEffectViewer::GetViewingObjectType() const\n    {\n        return GetViewingObjectTypeStatic();\n    }\n\n    const Type* ParticlesSplineEffectViewer::GetViewingObjectTypeStatic()\n    {\n        return &TypeOf(ParticlesSplineEffect);\n    }\n\n    void ParticlesSplineEffectViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        PushEditorScopeOnStack scope;\n\n        DefaultObjectPropertiesViewer::RebuildProperties(targetObjets);\n    }\n\n    void ParticlesSplineEffectViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        auto prevSplineEffect = mSplineEffect;\n\n        mSplineEffect = !targetObjets.IsEmpty() ? Ref(dynamic_cast<ParticlesSplineEffect*>(targetObjets[0].first)) : nullptr;\n\n        DefaultObjectPropertiesViewer::OnRefreshed(targetObjets);\n\n        if (!mTargetObjects.IsEmpty() && prevSplineEffect != mSplineEffect)\n        {\n            Function<Vec2F()> getOrigin = [=]() { return mSplineEffect->GetEmitter()->GetBasis().origin; };\n\n            // Spline tool\n            mSplineTool->SetSpline(mSplineEffect->spline, getOrigin);\n            mSplineTool->onChanged = [=]() { \n                auto emitter = mSplineEffect->GetEmitter();\n                DynamicCast<ParticlesEmitterComponent>(emitter)->GetActor()->OnChanged();\n            };\n        }\n    }\n\n    void ParticlesSplineEffectViewer::OnPropertiesEnabled()\n    {\n        o2EditorSceneScreen.AddTool(mSplineTool);\n\n        mPrevSelectedTool = o2EditorSceneScreen.GetSelectedTool();\n        o2EditorSceneScreen.SelectTool<SplineTool>();\n    }\n\n    void ParticlesSplineEffectViewer::OnPropertiesDisabled()\n    {\n        auto selectedTool = o2EditorSceneScreen.GetSelectedTool();\n        if (selectedTool == mSplineTool)\n            o2EditorSceneScreen.SelectTool(mPrevSelectedTool.Lock());\n\n        o2EditorSceneScreen.RemoveTool(mSplineTool);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::ParticlesSplineEffectViewer, Editor__ParticlesSplineEffectViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/ParticlesSplineEffectViewer.h",
    "content": "#pragma once\n#include \"o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.h\"\n#include \"../../Tools/SplineTool.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Button;\n}\n\nnamespace Editor\n{\n    // ------------------------------\n    // Particles spline effect viewer\n    // ------------------------------\n    class ParticlesSplineEffectViewer : public DefaultObjectPropertiesViewer\n    {\n    public:\n        // Default constructor\n        ParticlesSplineEffectViewer();\n\n        // Default constructor, removes spline tool\n        ~ParticlesSplineEffectViewer() override;\n\n        // Returns viewing objects type\n        const Type* GetViewingObjectType() const override;\n\n        // Returns viewing objects base type by static function\n        static const Type* GetViewingObjectTypeStatic();\n\n        IOBJECT(ParticlesSplineEffectViewer);\n\n    private:\n        Ref<SplineTool>    mSplineTool;       // Spline tool\n        WeakRef<IEditTool> mPrevSelectedTool; // Previous selected tool, for restore\n\n        Ref<ParticlesSplineEffect> mSplineEffect; // Current effect\n\n    private:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ParticlesSplineEffectViewer)\n{\n    BASE_CLASS(Editor::DefaultObjectPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ParticlesSplineEffectViewer)\n{\n    FIELD().PRIVATE().NAME(mSplineTool);\n    FIELD().PRIVATE().NAME(mPrevSelectedTool);\n    FIELD().PRIVATE().NAME(mSplineEffect);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ParticlesSplineEffectViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetViewingObjectTypeStatic);\n    FUNCTION().PRIVATE().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnRefreshed, _tmp2);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnPropertiesDisabled);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/SpriteViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SpriteViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Basic/AssetProperty.h\"\n#include \"o2Editor/Properties/Basic/BorderIntProperty.h\"\n#include \"o2Editor/Properties/Basic/ColorProperty.h\"\n#include \"o2Editor/Properties/Basic/EnumProperty.h\"\n#include \"o2Editor/Properties/Basic/FloatProperty.h\"\n#include \"o2Editor/Properties/Basic/Vector2FloatProperty.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/UI/ImageSlicesEditorWidget.h\"\n\nnamespace Editor\n{\n    void SpriteViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        const Type& spriteType = TypeOf(Sprite);\n\n        auto commonFieldsLayout = mmake<VerticalLayout>();\n        commonFieldsLayout->spacing = 5;\n        commonFieldsLayout->expandWidth = true;\n        commonFieldsLayout->expandHeight = false;\n        commonFieldsLayout->fitByChildren = true;\n        mSpoiler->AddChild(commonFieldsLayout);\n\n        mImageProperty = o2EditorProperties.BuildFieldType<AssetProperty>(commonFieldsLayout, spriteType, \"image\", \"\",\n                                                                          mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mMaterialProperty = o2EditorProperties.BuildFieldType<AssetProperty>(commonFieldsLayout, spriteType, \"material\", \"\",\n                                                                             mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mSizePivotProperty = o2EditorProperties.BuildFieldType<Vec2FProperty>(commonFieldsLayout, spriteType, \"szPivot\", \"\",\n                                                                              mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mPivotProperty = o2EditorProperties.BuildFieldType<Vec2FProperty>(commonFieldsLayout, spriteType, \"pivot\", \"\",\n                                                                          mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mColorProperty = o2EditorProperties.BuildFieldType<ColorProperty>(commonFieldsLayout, spriteType, \"color\", \"\",\n                                                                          mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mAlphaProperty = o2EditorProperties.BuildFieldType<FloatProperty>(commonFieldsLayout, spriteType, \"transparency\", \"\",\n                                                                          mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mModeProperty = o2EditorProperties.BuildFieldType<EnumProperty>(commonFieldsLayout, spriteType, \"mode\", \"\",\n                                                                        mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mModeProperty->onChanged += [&](auto& x, bool) { OnModeSelected(); };\n\n        mHiddenProperties = o2UI.CreateWidget<VerticalLayout>();\n        mHiddenProperties->expandWidth = true;\n        mHiddenProperties->expandHeight = false;\n        mHiddenProperties->fitByChildren = true;\n        mSpoiler->AddChild(mHiddenProperties);\n\n        // Fill properties\n        mFillPropertiesSpoiler = o2UI.CreateWidget<Spoiler>();\n        mHiddenProperties->AddChild(mFillPropertiesSpoiler);\n\n        auto fillSpace = mmake<Widget>();\n        fillSpace->layout->minHeight = 5;\n        mFillPropertiesSpoiler->AddChildWidget(fillSpace);\n\n        mFillProperty = o2EditorProperties.BuildFieldType<FloatProperty>(mFillPropertiesSpoiler, spriteType, \"fill\", \"\",\n                                                                         mPropertiesContext, mOnPropertyChangeCompleted, onChanged);\n\n        // Slice properties\n        mSlicedPropertiesSpoiler = o2UI.CreateWidget<Spoiler>();\n        mHiddenProperties->AddChild(mSlicedPropertiesSpoiler);\n\n        auto sliceSpace = mmake<Widget>();\n        sliceSpace->layout->minHeight = 5;\n        mSlicedPropertiesSpoiler->AddChildWidget(sliceSpace);\n\n        auto slicesEditorSpoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n\n        slicesEditorSpoiler->SetCaption(\"Slices\");\n        mSliceBorderProperty = o2EditorProperties.BuildFieldType<BorderIProperty>(slicesEditorSpoiler, spriteType, \"sliceBorder\", \"\",\n                                                                                  mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n\n        mSlicesEditor = mmake<ImageSlicesEditorWidget>();\n        slicesEditorSpoiler->AddChildWidget(mSlicesEditor);\n        mSlicedPropertiesSpoiler->AddChild(slicesEditorSpoiler);\n\n        // Slice properties\n        mTiledPropertiesSpoiler = o2UI.CreateWidget<Spoiler>();\n        mHiddenProperties->AddChild(mTiledPropertiesSpoiler);\n\n        auto tiledSpace = mmake<Widget>();\n        tiledSpace->layout->minHeight = 5;\n        mTiledPropertiesSpoiler->AddChildWidget(tiledSpace);\n\n        mTileScaleProperty = o2EditorProperties.BuildFieldType<FloatProperty>(mTiledPropertiesSpoiler, spriteType, \"tileScale\", \"\",\n                                                                              mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n    }\n\n    void SpriteViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        if (mSlicesEditor && !targetObjets.IsEmpty())\n            mSlicesEditor->Setup(dynamic_cast<Sprite*>(targetObjets[0].first)->GetImageAsset(), mSliceBorderProperty);\n    }\n\n    void SpriteViewer::OnModeSelected()\n    {\n        SpriteMode mode = (SpriteMode)(mModeProperty->GetCommonValue());\n\n        mFillPropertiesSpoiler->SetExpanded(mode == SpriteMode::Fill360CCW ||\n                                            mode == SpriteMode::Fill360CW ||\n                                            mode == SpriteMode::FillDownToUp ||\n                                            mode == SpriteMode::FillLeftToRight ||\n                                            mode == SpriteMode::FillRightToLeft ||\n                                            mode == SpriteMode::FillUpToDown ||\n                                            mode == SpriteMode::Sliced);\n\n        mSlicedPropertiesSpoiler->SetExpanded(mode == SpriteMode::Sliced);\n\n        mTiledPropertiesSpoiler->SetExpanded(mode == SpriteMode::Tiled);\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TObjectPropertiesViewer<o2::Sprite>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SpriteViewer, Editor__SpriteViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/SpriteViewer.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Sprite;\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AssetProperty);\n    FORWARD_CLASS_REF(BorderIProperty);\n    FORWARD_CLASS_REF(ColorProperty);\n    FORWARD_CLASS_REF(EnumProperty);\n    FORWARD_CLASS_REF(FloatProperty);\n    FORWARD_CLASS_REF(ImageSlicesEditorWidget);\n    FORWARD_CLASS_REF(Vec2FProperty);\n\n    // --------------------\n    // Editor sprite viewer\n    // --------------------\n    class SpriteViewer : public TObjectPropertiesViewer<Sprite>\n    {\n    public:\n        IOBJECT(SpriteViewer);\n\n    protected:\n        Ref<VerticalLayout> mHiddenProperties; // Hidden properties container\n\n        Ref<AssetProperty> mImageProperty;     // Image asset property\n        Ref<AssetProperty> mMaterialProperty;  // Material asset property\n        Ref<ColorProperty> mColorProperty;     // Color property\n        Ref<FloatProperty> mAlphaProperty;     // Alpha property\n        Ref<Vec2FProperty> mSizePivotProperty; // Size pivot property\n        Ref<Vec2FProperty> mPivotProperty;     // Pivot property\n        Ref<EnumProperty>  mModeProperty;      // Mode property selector. Shows required property spoiler\n\n        Ref<Spoiler>       mFillPropertiesSpoiler; // Fill properties spoiler\n        Ref<FloatProperty> mFillProperty;          // Fill property\n\n        Ref<Spoiler>                 mSlicedPropertiesSpoiler; // Sliced properties spoiler\n        Ref<BorderIProperty>         mSliceBorderProperty;     // Slice border property\n        Ref<ImageSlicesEditorWidget> mSlicesEditor;            // Image slices editor widget\n\n        Ref<Spoiler>       mTiledPropertiesSpoiler; // Tiled properties spoiler\n        Ref<FloatProperty> mTileScaleProperty;      // Tile scale property\n\n    protected:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when type enum selected, shows required property spoiler\n        void OnModeSelected();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SpriteViewer)\n{\n    BASE_CLASS(Editor::TObjectPropertiesViewer<Sprite>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SpriteViewer)\n{\n    FIELD().PROTECTED().NAME(mHiddenProperties);\n    FIELD().PROTECTED().NAME(mImageProperty);\n    FIELD().PROTECTED().NAME(mMaterialProperty);\n    FIELD().PROTECTED().NAME(mColorProperty);\n    FIELD().PROTECTED().NAME(mAlphaProperty);\n    FIELD().PROTECTED().NAME(mSizePivotProperty);\n    FIELD().PROTECTED().NAME(mPivotProperty);\n    FIELD().PROTECTED().NAME(mModeProperty);\n    FIELD().PROTECTED().NAME(mFillPropertiesSpoiler);\n    FIELD().PROTECTED().NAME(mFillProperty);\n    FIELD().PROTECTED().NAME(mSlicedPropertiesSpoiler);\n    FIELD().PROTECTED().NAME(mSliceBorderProperty);\n    FIELD().PROTECTED().NAME(mSlicesEditor);\n    FIELD().PROTECTED().NAME(mTiledPropertiesSpoiler);\n    FIELD().PROTECTED().NAME(mTileScaleProperty);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SpriteViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRefreshed, _tmp2);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnModeSelected);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/TextViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"TextViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Basic/AssetProperty.h\"\n#include \"o2Editor/Properties/Basic/BooleanProperty.h\"\n#include \"o2Editor/Properties/Basic/ColorProperty.h\"\n#include \"o2Editor/Properties/Basic/EnumProperty.h\"\n#include \"o2Editor/Properties/Basic/FloatProperty.h\"\n#include \"o2Editor/Properties/Basic/WStringProperty.h\"\n#include \"o2Editor/Properties/Properties.h\"\n\nnamespace Editor\n{\n    void TextViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n    {\n        const Type& textType = TypeOf(Text);\n\n        mColorProperty = o2EditorProperties.BuildFieldType<ColorProperty>(mSpoiler, textType, \"color\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mAlphaProperty = o2EditorProperties.BuildFieldType<FloatProperty>(mSpoiler, textType, \"transparency\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mMaterialProperty = o2EditorProperties.BuildFieldType<AssetProperty>(mSpoiler, textType, \"material\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mFontProperty = o2EditorProperties.BuildFieldType<AssetProperty>(mSpoiler, textType, \"fontAsset\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mTextProperty = o2EditorProperties.BuildFieldType<WStringProperty>(mSpoiler, textType, \"text\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mHeightProperty = o2EditorProperties.BuildFieldType<FloatProperty>(mSpoiler, textType, \"height\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mVerAlignProperty = o2EditorProperties.BuildFieldType<EnumProperty>(mSpoiler, textType, \"verAlign\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mHorAlignProperty = o2EditorProperties.BuildFieldType<EnumProperty>(mSpoiler, textType, \"horAlign\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mWordWrapProperty = o2EditorProperties.BuildFieldType<BooleanProperty>(mSpoiler, textType, \"wordWrap\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mDotsEndingsProperty = o2EditorProperties.BuildFieldType<BooleanProperty>(mSpoiler, textType, \"dotsEngings\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mSymbolsDistCoefProperty = o2EditorProperties.BuildFieldType<FloatProperty>(mSpoiler, textType, \"symbolsDistanceCoef\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n        mLinesDistCoefProperty = o2EditorProperties.BuildFieldType<FloatProperty>(mSpoiler, textType, \"linesDistanceCoef\", \"\", mPropertiesContext, mOnPropertyChangeCompleted, mOnPropertyChanged);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(Editor::TObjectPropertiesViewer<o2::Text>);\n// --- META ---\n\nDECLARE_CLASS(Editor::TextViewer, Editor__TextViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Objects/TextViewer.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Text;\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AssetProperty);\n    FORWARD_CLASS_REF(FloatProperty);\n    FORWARD_CLASS_REF(ColorProperty);\n    FORWARD_CLASS_REF(EnumProperty);\n    FORWARD_CLASS_REF(WStringProperty);\n    FORWARD_CLASS_REF(BooleanProperty);\n\n    // --------------------\n    // Editor text property\n    // --------------------\n    class TextViewer : public TObjectPropertiesViewer<Text>\n    {\n    public:\n        IOBJECT(TextViewer);\n\n    protected:\n        Ref<ColorProperty>   mColorProperty;\n        Ref<FloatProperty>   mAlphaProperty;\n        Ref<AssetProperty>   mMaterialProperty;\n        Ref<AssetProperty>   mFontProperty;\n        Ref<WStringProperty> mTextProperty;\n        Ref<FloatProperty>   mHeightProperty;\n        Ref<EnumProperty>    mHorAlignProperty;\n        Ref<EnumProperty>    mVerAlignProperty;\n        Ref<BooleanProperty> mWordWrapProperty;\n        Ref<BooleanProperty> mDotsEndingsProperty;\n        Ref<FloatProperty>   mSymbolsDistCoefProperty;\n        Ref<FloatProperty>   mLinesDistCoefProperty;\n\n    protected:\n        // Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n        void RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::TextViewer)\n{\n    BASE_CLASS(Editor::TObjectPropertiesViewer<Text>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::TextViewer)\n{\n    FIELD().PROTECTED().NAME(mColorProperty);\n    FIELD().PROTECTED().NAME(mAlphaProperty);\n    FIELD().PROTECTED().NAME(mMaterialProperty);\n    FIELD().PROTECTED().NAME(mFontProperty);\n    FIELD().PROTECTED().NAME(mTextProperty);\n    FIELD().PROTECTED().NAME(mHeightProperty);\n    FIELD().PROTECTED().NAME(mHorAlignProperty);\n    FIELD().PROTECTED().NAME(mVerAlignProperty);\n    FIELD().PROTECTED().NAME(mWordWrapProperty);\n    FIELD().PROTECTED().NAME(mDotsEndingsProperty);\n    FIELD().PROTECTED().NAME(mSymbolsDistCoefProperty);\n    FIELD().PROTECTED().NAME(mLinesDistCoefProperty);\n}\nEND_META;\nCLASS_METHODS_META(Editor::TextViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildProperties, _tmp1);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Properties.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Properties.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/Attributes/GroupAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/InvokeOnChangeAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/NameAttribute.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/StringUtils.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Properties/Basic/AssetProperty.h\"\n#include \"o2Editor/Properties/Basic/EnumProperty.h\"\n#include \"o2Editor/Properties/Basic/ObjectProperty.h\"\n#include \"o2Editor/Properties/Basic/ObjectPtrProperty.h\"\n#include \"o2Editor/Properties/Basic/VectorProperty.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.h\"\n\nDECLARE_SINGLETON(Editor::Properties);\n\nnamespace Editor\n{\n\n    Properties::Properties(RefCounter* refCounter):\n        Singleton<Properties>(refCounter)\n    {\n        InitializeAvailablePropertiesFields();\n        InitializeAvailableObjectPropertiesViewers();\n// \n//         IPropertyField::OnChangeCompletedFunc::empty =\n//             IPropertyField::OnChangeCompletedFunc([](const String& path,\n//                                                      const Vector<DataDocument>& before,\n//                                                      const Vector<DataDocument>& after) {\n//                 o2EditorSceneWindow.DoneActorPropertyChangeAction(path, before, after);\n//             });\n    }\n\n    Properties::~Properties()\n    {}\n\n    void Properties::InitializeAvailablePropertiesFields()\n    {\n        auto avaialbleTypes = TypeOf(IPropertyField).GetDerivedTypes();\n\n        avaialbleTypes.Remove(&TypeOf(ObjectProperty));\n        avaialbleTypes.Remove(&TypeOf(ObjectPtrProperty));\n        avaialbleTypes.Remove(&TypeOf(VectorProperty));\n        avaialbleTypes.RemoveAll([](const Type* type) { return type->GetName().Contains(\"TPropertyField\"); });\n\n        for (auto& x : avaialbleTypes)\n        {\n            if (auto valueType = x->InvokeStatic<const Type*>(\"GetValueTypeStatic\"))\n                mAvailablePropertiesFields[valueType] = x;\n        }\n    }\n\n    void Properties::InitializeAvailableObjectPropertiesViewers()\n    {\n        auto availableTypes = TypeOf(IObjectPropertiesViewer).GetDerivedTypes();\n        availableTypes.Remove(&TypeOf(IObjectPropertiesViewer));\n        availableTypes.Remove(&TypeOf(DefaultObjectPropertiesViewer));\n\n        for (auto& x : availableTypes)\n        {\n            if (auto objectType = x->InvokeStatic<const Type*>(\"GetViewingObjectTypeStatic\"))\n                mAvailableObjectPropertiesViewers[objectType] = x;\n        }\n    }\n\n    const Type* Properties::GetClosesBasedTypeObjectViewer(const Type* type) const\n    {\n        Vector<const Type*> itTypes = { type };\n        while (!itTypes.IsEmpty())\n        {\n            Vector<const Type*> nextItTypes;\n\n            for (auto& t : itTypes)\n            {\n                const Type* viewerType = nullptr;\n                if (mAvailableObjectPropertiesViewers.TryGetValue(t, viewerType))\n                    return viewerType;\n\n                nextItTypes.Add(t->GetBaseTypes().Convert<const Type*>([](const Type::BaseType& x) { return x.type; }));\n            }\n\n            itTypes = nextItTypes;\n        }\n\n        return nullptr;\n    }\n\n    Ref<IPropertyField> Properties::BuildField(const Ref<VerticalLayout>& layout, const FieldInfo* fieldInfo,\n                                               const Ref<PropertiesContext>& context, const String& path,\n                                               const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                               const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        Timer timer;\n\n        const Type* fieldType = fieldInfo->GetType();\n        String propertyName;\n        \n        if (auto nameAttribute = fieldInfo->GetAttribute<NameAttribute>())\n            propertyName = nameAttribute->name;\n        else\n            propertyName = GetSmartName(fieldInfo->GetName());\n\n        auto fieldWidget = CreateFieldProperty(fieldType, propertyName, onChangeCompleted, onChanged);\n        if (!fieldWidget)\n            return nullptr;\n\n        fieldWidget->name = fieldInfo->GetName() + \" : \" + fieldInfo->GetType()->GetName();\n        fieldWidget->SetParentContext(context);\n        fieldWidget->SetValuePath(path + fieldInfo->GetName());\n        fieldWidget->SetFieldInfo(fieldInfo);\n\n        if (auto invokeOnChangeAttribute = fieldInfo->GetAttribute<InvokeOnChangeAttribute>())\n        {\n            fieldWidget->onChanged += [&, invokeOnChangeAttribute](const Ref<IPropertyField>& field, bool byUser) {\n                for (auto& target : context->targets) \n                {\n                    auto& targetType = target.first->GetType();\n                    auto& targetObjType = dynamic_cast<const ObjectType&>(targetType);\n                    targetObjType.Invoke<void>(invokeOnChangeAttribute->methodName, targetObjType.DynamicCastFromIObject(target.first));\n                }\n            };\n        }\n\n        layout->AddChild(fieldWidget);\n\n        context->properties.Add(fieldInfo, fieldWidget);\n\n        //o2Debug.Log(\"Field \" + path + \"/\" + fieldInfo->GetName() + \" for \" + (String)timer.GetDeltaTime());\n\n        return fieldWidget;\n    }\n\n    Ref<IPropertyField> Properties::BuildField(const Ref<VerticalLayout>& layout, const Type& objectType, const String& fieldName, const String& path,\n                                               const Ref<PropertiesContext>& context,\n                                               const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                               const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        return BuildField(layout, objectType.GetField(fieldName), context, path, onChangeCompleted, onChanged);\n    }\n\n    void Properties::BuildFields(const Ref<VerticalLayout>& layout, Vector<const FieldInfo*> fields,\n                                 const Ref<PropertiesContext>& context, const String& path,\n                                 const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                 const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        Timer timer; \n\n        const String emptyGroupName = \"AFIRST\";\n\n        Map<String, Vector<const FieldInfo*>> groupedFields;\n        for (auto& field : fields)\n        {\n            String fieldGroup = emptyGroupName;\n            if (auto groupAttribute = field->GetAttribute<GroupAttribute>())\n                fieldGroup = groupAttribute->name;\n\n            groupedFields[fieldGroup].Add(field);\n        }\n\n        for (auto& group : groupedFields)\n        {\n            if (group.first != emptyGroupName)\n            {\n                auto spoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n                spoiler->SetCaption(group.first);\n                spoiler->Expand();\n                spoiler->borderTop = 5;\n                layout->AddChild(spoiler);\n\n                for (auto& fieldInfo : group.second)\n                    BuildField(spoiler, fieldInfo, context, path, onChangeCompleted, onChanged);\n            }\n            else\n            {\n                for (auto& fieldInfo : group.second)\n                    BuildField(layout, fieldInfo, context, path, onChangeCompleted, onChanged);\n            }\n        }\n\n        //o2Debug.Log(\">>> Fields created for \" + (String)timer.GetDeltaTime());\n    }\n\n    void Properties::BuildFields(const Ref<VerticalLayout>& layout, const Type& objectType, const Vector<String>& fieldsNames,\n                                 const String& path, const Ref<PropertiesContext>& context,\n                                 const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/, \n                                 const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        for (auto& name : fieldsNames)\n            BuildField(layout, objectType, name, path, context, onChangeCompleted, onChanged);\n    }\n\n    void Properties::SetPrivateFieldsVisible(bool visible)\n    {\n        mPrivateVisible = visible;\n    }\n\n    bool Properties::IsPrivateFieldsVisible() const\n    {\n        return mPrivateVisible;\n    }\n\n    bool Properties::IsFieldTypeSupported(const Type* type) const\n    {\n        if (type->GetUsage() == Type::Usage::Vector)\n            return IsFieldTypeSupported(dynamic_cast<const VectorType*>(type)->GetElementType());\n\n        if (type->IsBasedOn(TypeOf(IObject)))\n            return true;\n\n        if ((type->GetUsage() == Type::Usage::Pointer || type->GetUsage() == Type::Usage::Reference) &&\n            ((PointerType*)type)->GetBaseType()->IsBasedOn((TypeOf(IObject))))\n        {\n            return true;\n        }\n\n        if (type->GetUsage() == Type::Usage::Enumeration)\n            return true;\n\n        if (type->GetUsage() == Type::Usage::Property)\n            return IsFieldTypeSupported(dynamic_cast<const PropertyType*>(type)->GetValueType());\n\n        if (GetFieldPropertyType(type))\n            return true;\n\n        return false;\n    }\n\n    void Properties::FreeProperties(const Ref<PropertiesContext>& context)\n    {\n        for (auto& prop : context->properties)\n            FreeProperty(prop.second);\n\n        context->properties.Clear();\n    }\n\n    void Properties::FreeProperty(const Ref<IPropertyField>& field)\n    {\n        if (!mPropertiesPool.ContainsKey(field->GetValueType()))\n            mPropertiesPool.Add(field->GetValueType(), Vector<Ref<IPropertyField>>());\n\n        mPropertiesPool[field->GetValueType()].Add(field);\n        field->OnFreeProperty();\n        field->SetParent(nullptr, false);\n    }\n\n    bool Properties::IsPropertyVisible(const FieldInfo* info, bool allowPrivate) const\n    {\n        if (info->HasAttribute<IgnoreEditorPropertyAttribute>())\n            return false;\n\n        if (info->GetProtectionSection() == ProtectSection::Public || allowPrivate)\n            return true;\n\n        if (info->HasAttribute<EditorPropertyAttribute>())\n            return true;\n\n        return false;\n    }\n\n    bool Properties::IsPropertyVisible(const FieldInfo* info) const\n    {\n        return IsPropertyVisible(info, mPrivateVisible);\n    }\n\n    void Properties::BuildObjectProperties(const Ref<VerticalLayout>& layout, const Type* type,\n                                           const Ref<PropertiesContext>& context, const String& path,\n                                           const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                           const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        BuildObjectProperties(layout, type->GetFieldsWithBaseClasses(), context, path, onChangeCompleted, onChanged);\n    }\n\n    void Properties::BuildObjectProperties(const Ref<VerticalLayout>& layout, Vector<const FieldInfo*> fields,\n                                           const Ref<PropertiesContext>& context, const String& path,\n                                           const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                           const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        PushEditorScopeOnStack scope;\n\n        Vector<const FieldInfo*> regularFields = fields.FindAll(\n            [&](const FieldInfo* x) { return IsPropertyVisible(x, false); });\n\n        BuildFields(layout, regularFields, context, path, onChangeCompleted, onChanged);\n\n        if (mPrivateVisible)\n        {\n            Vector<const FieldInfo*> privateFields = fields.FindAll(\n                [&](const FieldInfo* x) { return IsPropertyVisible(x, true) && !regularFields.Contains(x); });\n\n            if (!privateFields.IsEmpty())\n            {\n                auto privates = context->privatePropertiesSpoiler;\n\n                if (!privates)\n                    privates = layout->GetChildByType<Spoiler>(\"privates\");\n\n                if (!privates)\n                {\n                    privates = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n                    privates->name = \"privates\";\n                    privates->SetCaption(\"Private\");\n                    layout->AddChild(privates);\n                }\n                else privates->SetIndexInSiblings(layout->GetChildren().Count() - 1);\n\n                context->privatePropertiesSpoiler = privates;\n                BuildFields(privates, privateFields, context, path, onChangeCompleted, onChanged);\n            }\n        }\n        else if (context->privatePropertiesSpoiler)\n        {\n            context->privatePropertiesSpoiler->SetEnabled(false);\n        }\n\n        context->builtWithPrivateProperties = mPrivateVisible;\n    }\n\n    Ref<IPropertyField> Properties::CreateFieldProperty(const Type* type, const String& name, \n                                                        const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                                        const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        PushEditorScopeOnStack enterScope;\n\n        if (GetFieldPropertyType(type))\n            return CreateRegularField(type, name, onChangeCompleted, onChanged);\n\n        if (type->GetUsage() == Type::Usage::Vector)\n        {\n            auto elementType = dynamic_cast<const VectorType*>(type)->GetElementType();\n            if (IsFieldTypeSupported(elementType))\n                return CreateVectorField(type, name, onChangeCompleted, onChanged);\n\n            return nullptr;\n        }\n\n        if (type->IsBasedOn(TypeOf(IObject)))\n            return CreateObjectField(name, onChangeCompleted, onChanged);\n\n        if (type->GetUsage() == Type::Usage::Pointer)\n        {\n            auto pointerType = dynamic_cast<const PointerType*>(type);\n            auto baseType = pointerType->GetBaseType();\n            if (baseType->IsBasedOn((TypeOf(IObject))))\n            {\n                return CreateObjectPtrField(dynamic_cast<const ObjectType*>(baseType), name,\n                                            onChangeCompleted, onChanged);\n            }\n\n            return nullptr;\n        }\n\n        if (type->GetUsage() == Type::Usage::Reference)\n        {\n            auto referenceType = dynamic_cast<const ReferenceType*>(type);\n            auto baseType = referenceType->GetBaseType();\n            if (baseType->IsBasedOn((TypeOf(IObject))))\n            {\n                return CreateObjectPtrField(dynamic_cast<const ObjectType*>(baseType), name,\n                                            onChangeCompleted, onChanged);\n            }\n\n            return nullptr;\n        }\n\n        if (type->GetUsage() == Type::Usage::Enumeration)\n            return CreateEnumField(type, name, onChangeCompleted, onChanged);\n\n        if (type->GetUsage() == Type::Usage::Property)\n        {\n            auto valueType = dynamic_cast<const PropertyType*>(type)->GetValueType();\n            return CreateFieldProperty(valueType, name, onChangeCompleted, onChanged);\n        }\n\n        return nullptr;\n    }\n\n    Ref<IPropertyField> Properties::CreateRegularField(const Type* type, const String& name,\n                                                       const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                                       const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        const Type* fieldPropertyType = GetFieldPropertyType(type);\n        if (!fieldPropertyType)\n            return nullptr;\n\n        Ref<IPropertyField> fieldProperty;\n\n        if (mPropertiesPool.ContainsKey(type) && mPropertiesPool[type].Count() > 0)\n            fieldProperty = mPropertiesPool[type].PopBack();\n        else\n            fieldProperty = DynamicCast<IPropertyField>(o2UI.CreateWidget(*fieldPropertyType, \"with caption\"));\n\n        fieldProperty->onChanged = onChanged;\n        fieldProperty->onChangeCompleted = onChangeCompleted;\n        fieldProperty->SetCaption(name);\n\n        return fieldProperty;\n    }\n\n    Ref<IPropertyField> Properties::CreateEnumField(const Type* type, const String& name,\n                                                    const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                                    const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        Ref<EnumProperty> fieldProperty;\n\n        if (mPropertiesPool.ContainsKey(type) && mPropertiesPool[type].Count() > 0)\n            fieldProperty = DynamicCast<EnumProperty>(mPropertiesPool[type].PopBack());\n        else\n            fieldProperty = o2UI.CreateWidget<EnumProperty>(\"with caption\");\n\n        fieldProperty->onChanged = onChanged;\n        fieldProperty->onChangeCompleted = onChangeCompleted;\n        fieldProperty->SetCaption(name);\n        fieldProperty->SpecializeType(type);\n\n        return fieldProperty;\n    }\n\n    Ref<IPropertyField> Properties::CreateObjectField(const String& name,\n                                                      const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                                      const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        Ref<ObjectProperty> fieldProperty;\n\n        const Type* objectType = &TypeOf(IObject);\n        if (mPropertiesPool.ContainsKey(objectType) && mPropertiesPool[objectType].Count() > 0)\n            fieldProperty = DynamicCast<ObjectProperty>(mPropertiesPool[objectType].PopBack());\n        else\n            fieldProperty = mmake<ObjectProperty>();\n\n        fieldProperty->onChanged = onChanged;\n        fieldProperty->onChangeCompleted = onChangeCompleted;\n        fieldProperty->SetCaption(name);\n\n        return fieldProperty;\n    }\n\n    Ref<IPropertyField> Properties::CreateObjectPtrField(const ObjectType* basicType, const String& name,\n                                                         const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                                         const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        Ref<ObjectPtrProperty> fieldProperty;\n\n        const Type* objectType = &TypeOf(IObject*);\n        if (mPropertiesPool.ContainsKey(objectType) && mPropertiesPool[objectType].Count() > 0)\n            fieldProperty = DynamicCast<ObjectPtrProperty>(mPropertiesPool[objectType].PopBack());\n        else\n            fieldProperty = mmake<ObjectPtrProperty>();\n\n        fieldProperty->onChanged = onChanged;\n        fieldProperty->onChangeCompleted = onChangeCompleted;\n        fieldProperty->SetCaption(name);\n        fieldProperty->SetBasicType(basicType);\n\n        return fieldProperty;\n    }\n\n    Ref<IPropertyField> Properties::CreateVectorField(const Type* type, const String& name,\n                                                      const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                                      const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        Ref<VectorProperty> fieldProperty;\n\n        if (mPropertiesPool.ContainsKey(type) && mPropertiesPool[type].Count() > 0)\n            fieldProperty = DynamicCast<VectorProperty>(mPropertiesPool[type].PopBack());\n        else \n            fieldProperty = mmake<VectorProperty>();\n\n        fieldProperty->onChanged = onChanged;\n        fieldProperty->onChangeCompleted = onChangeCompleted;\n        fieldProperty->SpecializeType(type);\n        fieldProperty->SetCaption(name);\n\n        return fieldProperty;\n    }\n\n    Ref<IObjectPropertiesViewer> Properties::CreateObjectViewer(const Type* type, const String& path, \n                                                                const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                                                const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        auto viewerType = GetClosesBasedTypeObjectViewer(type);\n        if (!viewerType)\n            viewerType = &TypeOf(DefaultObjectPropertiesViewer);\n\n        Ref<IObjectPropertiesViewer> viewer;\n\n        if (mObjectPropertiesViewersPool.ContainsKey(type))\n        {\n            if (!mObjectPropertiesViewersPool[type].IsEmpty())\n                viewer = mObjectPropertiesViewersPool[type].PopBack();\n        }\n\n        if (!viewer)\n            viewer = DynamicCast<IObjectPropertiesViewer>(viewerType->CreateSampleRef());\n\n        viewer->path = path;\n        viewer->onChanged = onChanged;\n        viewer->onChangeCompleted = onChangeCompleted;\n\n        return viewer;\n    }\n\n    void Properties::FreeObjectViewer(const Ref<IObjectPropertiesViewer>& viewer)\n    {\n        auto type = viewer->GetViewingObjectType();\n\n        if (!mObjectPropertiesViewersPool.ContainsKey(type))\n            mObjectPropertiesViewersPool.Add(type, Vector<Ref<IObjectPropertiesViewer>>());\n\n        mObjectPropertiesViewersPool[type].Add(viewer);\n        viewer->OnFree();\n        viewer->GetSpoiler()->SetParent(nullptr);\n    }\n\n    const Type* Properties::GetFieldPropertyType(const Type* valueType) const\n    {\n        for (auto& kv : mAvailablePropertiesFields)\n        {\n            if (valueType->GetUsage() == Type::Usage::Pointer && kv.first->GetUsage() == Type::Usage::Pointer)\n            {\n                if (((PointerType*)valueType)->GetBaseType()->IsBasedOn(*((PointerType*)kv.first)->GetBaseType()))\n                    return kv.second;\n            }\n            else if (valueType->IsBasedOn(*kv.first))\n                return kv.second;\n        }\n\n        return nullptr;\n    }\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/Properties.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class VerticalLayout;\n    class Widget;\n}\n\n// Editor properties window accessor macros\n#define o2EditorProperties Editor::Properties::Instance()\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IObjectPropertiesViewer);\n\n    // ------------------------------------------------------------------------------\n    // Editor properties building utility. Can cache, build and reuse property fields\n    // ------------------------------------------------------------------------------\n    class Properties : public Singleton<Properties>\n    {\n    public:\n        Function<void(const Ref<IPropertyField>&)> onFieldChanged; // Some field changed event\n\n    public:\n        // Default constructor. Initializes properties samples and fills pools\n        Properties(RefCounter* refCounter);\n\n        // Destructor\n        ~Properties();\n\n        // Sets private field viewing state\n        void SetPrivateFieldsVisible(bool visible);\n\n        // Returns is private fields visible\n        bool IsPrivateFieldsVisible() const;\n\n        // Free properties and put in cache\n        void FreeProperties(const Ref<PropertiesContext>& context);\n\n        // Free property field and put in cache\n        void FreeProperty(const Ref<IPropertyField>& field);\n\n        // Builds layout viewer by type for objects\n        void BuildObjectProperties(const Ref<VerticalLayout>& layout, const Type* type, const Ref<PropertiesContext>& context, const String& path,\n                                   const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                   const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Builds layout viewer by fields\n        void BuildObjectProperties(const Ref<VerticalLayout>& layout, Vector<const FieldInfo*> fields, const Ref<PropertiesContext>& context, const String& path,\n                                   const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                   const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Build layout viewer for field\n        Ref<IPropertyField> BuildField(const Ref<VerticalLayout>& layout, const FieldInfo* fieldInfo, const Ref<PropertiesContext>& context, const String& path,\n                                       const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                       const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Build layout viewer for field\n        Ref<IPropertyField> BuildField(const Ref<VerticalLayout>& layout, const Type& objectType, const String& fieldName, const String& path,\n                                       const Ref<PropertiesContext>& context,\n                                       const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                       const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Build layout viewer for fields\n        void BuildFields(const Ref<VerticalLayout>& layout, const Type& objectType, const Vector<String>& fieldsNames, const String& path,\n                         const Ref<PropertiesContext>& context,\n                         const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                         const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Build layout viewer for field\n        template<typename PropertyFieldType>\n        Ref<PropertyFieldType> BuildFieldType(const Ref<VerticalLayout>& layout, const FieldInfo* fieldInfo, const Ref<PropertiesContext>& context, const String& path,\n                                              const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                              const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Build layout viewer for field\n        template<typename PropertyFieldType>\n        Ref<PropertyFieldType> BuildFieldType(const Ref<VerticalLayout>& layout, const Type& objectType, const String& fieldName, const String& path,\n                                              const Ref<PropertiesContext>& context,\n                                              const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                              const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Checks that property with type can be created\n        bool IsFieldTypeSupported(const Type* type) const;\n\n        // Checks is property visible in properties window: \n        // checking protection section, ignore and editor attributes\n        bool IsPropertyVisible(const FieldInfo* info, bool allowPrivate) const;\n\n        // Checks is property visible in properties window using current private visibility state: \n        // checking protection section, ignore and editor attributes\n        bool IsPropertyVisible(const FieldInfo* info) const;\n\n        // Returns available field by type\n        const Type* GetFieldPropertyType(const Type* valueType) const;\n\n        // Creates field property by type \n        Ref<IPropertyField> CreateFieldProperty(const Type* type, const String& name,\n                                                const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                                const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Creates regular primitive property field\n        Ref<IPropertyField> CreateRegularField(const Type* type, const String& name,\n                                               const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                               const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Creates regular enumerate primitive property field\n        Ref<IPropertyField> CreateEnumField(const Type* type, const String& name,\n                                            const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                            const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Creates object field\n        Ref<IPropertyField> CreateObjectField(const String& name,\n                                              const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                              const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Creates object pointer field\n        Ref<IPropertyField> CreateObjectPtrField(const ObjectType* basicType, const String& name,\n                                                 const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                                 const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Creates vector field\n        Ref<IPropertyField> CreateVectorField(const Type* type, const String& name,\n                                              const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                              const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Returns object properties viewer\n        Ref<IObjectPropertiesViewer> CreateObjectViewer(const Type* type, const String& path,\n                                                        const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                                                        const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n\n        // Free object viewer, store in pool for reuse\n        void FreeObjectViewer(const Ref<IObjectPropertiesViewer>& viewer);\n\n    protected:\n        typedef Map<const Type*, const Type*> PropertiesFieldsMap;\n        typedef Map<const Type*, Vector<Ref<IPropertyField>>> TypePropertyMap;\n\n        typedef Map<const Type*, const Type*> IObjectPropertiesViewersMap;\n        typedef Map<const Type*, Vector<Ref<IObjectPropertiesViewer>>> TypeObjectPropertiesViewerMap;\n\n        int  mPropertyFieldsPoolStep = 5; // Field properties pools resize step                            \n        bool mPrivateVisible = false;     // Is private fields visible\n\n        PropertiesFieldsMap         mAvailablePropertiesFields;        // Available properties fields samples\n        IObjectPropertiesViewersMap mAvailableObjectPropertiesViewers; // Available object properties viewers samples\n\n        TypePropertyMap               mPropertiesPool;              // Pool of properties, grouped by property type\n        TypeObjectPropertiesViewerMap mObjectPropertiesViewersPool; // Pool of object properties viewers, grouped by object type\n\n    protected:\n        // Initializes available properties fields samples\n        void InitializeAvailablePropertiesFields();\n\n        // Initializes available object properties viewers samples\n        void InitializeAvailableObjectPropertiesViewers();\n\n        // Returns type of object viewer, which is closest ty type by based types hierarchy depth\n        const Type* GetClosesBasedTypeObjectViewer(const Type* type) const;\n\n        // Builds layout viewer by fields without filtering\n        void BuildFields(const Ref<VerticalLayout>& layout, Vector<const FieldInfo*> fields, const Ref<PropertiesContext>& context, const String& path,\n                         const IPropertyField::OnChangeCompletedFunc& onChangeCompleted = IPropertyField::OnChangeCompletedFunc::empty,\n                         const IPropertyField::OnChangedFunc& onChanged = IPropertyField::OnChangedFunc::empty);\n    };\n\n    template<typename PropertyFieldType>\n    Ref<PropertyFieldType> Properties::BuildFieldType(const Ref<VerticalLayout>& layout, const FieldInfo* fieldInfo,\n                                                      const Ref<PropertiesContext>& context, const String& path,\n                                                      const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                                      const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        return DynamicCast<PropertyFieldType>(BuildField(layout, fieldInfo, context, path, onChangeCompleted, onChanged));\n    }\n\n    template<typename PropertyFieldType>\n    Ref<PropertyFieldType> Properties::BuildFieldType(const Ref<VerticalLayout>& layout, const Type& objectType, const String& fieldName,\n                                                      const String& path, const Ref<PropertiesContext>& context,\n                                                      const IPropertyField::OnChangeCompletedFunc& onChangeCompleted /*= IPropertyField::OnChangeCompletedFunc::empty*/,\n                                                      const IPropertyField::OnChangedFunc& onChanged /*= IPropertyField::OnChangedFunc::empty*/)\n    {\n        return DynamicCast<PropertyFieldType>(BuildField(layout, objectType, fieldName, path, context, onChangeCompleted, onChanged));\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/PropertiesContext.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"PropertiesContext.h\"\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nnamespace Editor\n{\n\n    void PropertiesContext::Invalidate()\n    {\n        targets.Clear();\n    }\n\n    void PropertiesContext::Set(const Vector<Pair<IObject*, IObject*>>& targets, bool force /*= false*/)\n    {\n        if (this->targets == targets && !force)\n        {\n            Refresh();\n            return;\n        }\n\n        this->targets = targets;\n\n        if (targets.IsEmpty())\n            return;\n\n        for (auto& kv : properties)\n        {\n            auto fieldPointers = targets.Convert<Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>>(\n                [&](const Pair<IObject*, IObject*>& x)\n            {\n                auto fieldInfo = kv.first;\n                const Type& type = *fieldInfo->GetOwnerType();\n                const ObjectType* objType = dynamic_cast<const ObjectType*>(&type);\n\n                if (objType == nullptr)\n                    return Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(nullptr, nullptr);\n\n                void* firstObjectPtr = objType->DynamicCastFromIObject(x.first);\n                void* secondObjectPtr = nullptr;\n                if (x.second)\n                    secondObjectPtr = objType->DynamicCastFromIObject(x.second);\n\n                Ref<IAbstractValueProxy> firstValuePtr = Ref(fieldInfo->GetType()->GetValueProxy(fieldInfo->GetValuePtrStrong(firstObjectPtr)));\n                Ref<IAbstractValueProxy> secondValuePtr = nullptr;\n                if (x.second)\n                    secondValuePtr = Ref(fieldInfo->GetType()->GetValueProxy(fieldInfo->GetValuePtrStrong(secondObjectPtr)));\n\n                return Pair<Ref<IAbstractValueProxy>, Ref<IAbstractValueProxy>>(firstValuePtr, secondValuePtr);\n            });\n\n            kv.second->SetValueAndPrototypeProxy(fieldPointers);\n        }\n    }\n\n    void PropertiesContext::Refresh()\n    {\n        for (auto& kv : properties)\n            kv.second->Refresh();\n    }\n\n    bool PropertiesContext::IsBuiltWIthPrivateProperties() const\n    {\n        return builtWithPrivateProperties;\n    }\n\n    const Map<const FieldInfo*, Ref<IPropertyField>>& PropertiesContext::GetProperties() const\n    {\n        return properties;\n    }\n\n    Ref<IPropertyField> PropertiesContext::FindPropertyField(const String &name) const\n    {\n        for (auto& kv : properties)\n        {\n            if (kv.first->GetName() == name)\n                return kv.second;\n        }\n\n        return nullptr;\n    }\n\n    void PropertiesContext::SetPropertiesEnabled(bool enabled)\n    {\n        for (auto& kv : properties)\n            kv.second->SetPropertyEnabled(enabled);\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Properties/PropertiesContext.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Pair.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class FieldInfo;\n    class IObject;\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IPropertyField);\n\n    // --------------------------------------------------------------------------------------------\n    // Editor properties context. Contains targets and properties. Used to update properties values\n    // --------------------------------------------------------------------------------------------\n    class PropertiesContext: public RefCounterable\n    {\n    public:\n\t\tFunction<void(const Ref<IPropertyField>& field, bool byUser)> onChanged; // Called when some property changed\n\n    public:\n        WeakRef<PropertiesContext> parent; // Parent context\n\n        Vector<Pair<IObject*, IObject*>>           targets;    // Last set targets\n        Map<const FieldInfo*, Ref<IPropertyField>> properties; // Property info to property field map\n\n        Ref<Spoiler> privatePropertiesSpoiler; // Private properties spoiler\n\n        bool builtWithPrivateProperties = false; // Is properties was built with hidden properties\n\n    public:\n        // Marks context as not actual and required to update values proxies\n        void Invalidate();\n\n        // Sets targets objects and updates targets in properties\n        void Set(const Vector<Pair<IObject*, IObject*>>& targets, bool force = false);\n\n        // Refreshes properties\n        void Refresh();\n\n        // Returns is properties was built with hidden properties\n        bool IsBuiltWIthPrivateProperties() const;\n\n        // Returns property info to property field map\n        const Map<const FieldInfo*, Ref<IPropertyField>>& GetProperties() const;\n\n        // Searches target with suitable type on contexts stack\n        template<typename _type>\n        _type* FindOnStack() const;\n\n        // Searches property field by name\n        Ref<IPropertyField> FindPropertyField(const String& name) const;\n\n        // Sets properties enabled or disabled\n        void SetPropertiesEnabled(bool enabled);\n\n        friend class Properties;\n    };\n\n    template<typename _type>\n    _type* PropertiesContext::FindOnStack() const\n    {\n        auto contextIt = Ref(this);\n        while (contextIt)\n        {\n            if (!contextIt->targets.IsEmpty())\n            {\n                if (auto typed = dynamic_cast<_type*>(contextIt->targets[0].first))\n                    return typed;\n            }\n\n            contextIt = contextIt->parent.Lock();\n        }\n\n        return nullptr;\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/CustomFrameTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"CustomFrameTool.h\"\n\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    CustomFrameTool::CustomFrameTool(RefCounter* refCounter):\n        IEditTool(refCounter)\n    {\n        sceneLayer->tool = Ref(this);\n\n        frameHandles = mmake<FrameHandles>();\n        frameHandles->isInputTransparent = true;\n        frameHandles->onTransformed = [&](const Basis& x) {\n            auto b = x*o2EditorSceneScreen.GetScreenToLocalTransform();\n            b.origin -= getOrigin();\n            mBasis = b;\n            onChanged(mBasis);\n        };\n    }\n\n    void CustomFrameTool::SceneLayer::DrawOverScene()\n    {\n        auto toolRef = tool.Lock();\n\n        Basis b = toolRef->mBasis;\n        b.origin += toolRef->getOrigin();\n\n        toolRef->frameHandles->SetBasis(b*o2EditorSceneScreen.GetLocalToScreenTransform());\n        toolRef->frameHandles->Draw();\n    }\n\n    void CustomFrameTool::SceneLayer::Update(float dt)\n    {}\n\n    int CustomFrameTool::SceneLayer::GetOrder() const\n    {\n        return 0;\n    }\n\n    bool CustomFrameTool::SceneLayer::IsEnabled() const\n    {\n        return tool.Lock()->isEnabled;\n    }\n\n    const String& CustomFrameTool::SceneLayer::GetName() const\n    {\n        static String res(\"Custom frame\");\n        return res;\n    }\n\n    const String& CustomFrameTool::SceneLayer::GetIconName() const\n    {\n        return String::empty;\n    }\n\n    void CustomFrameTool::SetFrame(const Basis& frame)\n    {\n        mBasis = frame;\n    }\n\n    const Basis& CustomFrameTool::GetFrame() const\n    {\n        return mBasis;\n    }\n\n    void CustomFrameTool::Reset()\n    {\n        onChanged.Clear();\n        getOrigin.Clear();\n    }\n\n    String CustomFrameTool::CustomFrameTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_image_frame_tool.png\";\n    }\n\n    void CustomFrameTool::CustomFrameTool::OnEnabled()\n    {\n        o2EditorSceneScreen.AddEditorLayer(sceneLayer);\n        isEnabled = true;\n    }\n\n    void CustomFrameTool::CustomFrameTool::OnDisabled()\n    {\n        o2EditorSceneScreen.RemoveEditorLayer(sceneLayer);\n        isEnabled = false;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::CustomFrameTool, Editor__CustomFrameTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/CustomFrameTool.h",
    "content": "#pragma once\n#include \"IEditorTool.h\"\n\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n#include \"o2/Utils/Editor/FrameHandles.h\"\n\nnamespace Editor\n{\n    // --------------------------------------------------------\n    // Custom frame tool. Used for special frame editing things\n    // --------------------------------------------------------\n    struct CustomFrameTool: public IEditTool\n    {\n        // ----------------------\n        // Scene layer for editor\n        // ----------------------\n        struct SceneLayer: public SceneEditorLayer\n        {\n            WeakRef<CustomFrameTool> tool; // Reference to tool\n\n        public:\n            // Draws editor over scene\n            void DrawOverScene() override;\n\n            // Updates editor\n            void Update(float dt) override;\n\n            // Returns order of layer\n            int GetOrder() const override;\n\n            // Returns true if layer is enabled\n            bool IsEnabled() const override;\n\n            // Returns name of layer\n            const String& GetName() const override;\n\n            // Returns icon name of layer\n            const String& GetIconName() const override;\n        };\n\n    public:\n        Ref<SceneLayer> sceneLayer = mmake<SceneLayer>(); // Scene layer for drawing spline\n\n        Ref<FrameHandles> frameHandles;      // Frame handles \n        bool              isEnabled = false; // Is tool enabled now\n\n        Function<void(const Basis&)> onChanged; // Called when frame changes\n        Function<Vec2F()>            getOrigin; // Returns origin of frame         \n\n    public:\n        // Default constructor\n        explicit CustomFrameTool(RefCounter* refCounter);\n\n        // Empty copy operator\n        CustomFrameTool& operator=(const CustomFrameTool& other) { return *this; }\n\n        // Sets frame\n        void SetFrame(const Basis& frame);\n\n        // Returns current frame\n        const Basis& GetFrame() const;\n\n        // Resets callbacks\n        void Reset();\n\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        IOBJECT(CustomFrameTool);\n\n    private:\n        Basis mBasis; // Current editing basis\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::CustomFrameTool)\n{\n    BASE_CLASS(Editor::IEditTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CustomFrameTool)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(mmake<SceneLayer>()).NAME(sceneLayer);\n    FIELD().PUBLIC().NAME(frameHandles);\n    FIELD().PUBLIC().DEFAULT_VALUE(false).NAME(isEnabled);\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PUBLIC().NAME(getOrigin);\n    FIELD().PRIVATE().NAME(mBasis);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CustomFrameTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFrame, const Basis&);\n    FUNCTION().PUBLIC().SIGNATURE(const Basis&, GetFrame);\n    FUNCTION().PUBLIC().SIGNATURE(void, Reset);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDisabled);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/FrameTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"FrameTool.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2Editor/Actions/Transform.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\nnamespace Editor\n{\n    FrameTool::FrameTool()\n    {\n        mLeftTopRotateHandle = mmake<SceneDragHandle>();\n        mLeftTopRotateHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI3_rotate_regular.png\"));\n        mLeftTopRotateHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI3_rotate_hover.png\"));\n        mLeftTopRotateHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI3_rotate_pressed.png\"));\n        mLeftTopRotateHandle->GetRegularDrawable()->pivot = Vec2F(0, 0);\n        mLeftTopRotateHandle->GetHoverDrawable()->pivot = Vec2F(0, 0);\n        mLeftTopRotateHandle->GetPressedDrawable()->pivot = Vec2F(0, 0);\n        mLeftTopRotateHandle->pixelPerfect = false;\n\n        mLeftBottomRotateHandle = mLeftTopRotateHandle->CloneAsRef<SceneDragHandle>();\n        mRightTopRotateHandle = mLeftTopRotateHandle->CloneAsRef<SceneDragHandle>();\n        mRightBottomRotateHandle = mLeftTopRotateHandle->CloneAsRef<SceneDragHandle>();\n\n        mLeftTopHandle = mmake<SceneDragHandle>();\n        mLeftTopHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI2_handle_regular.png\"));\n        mLeftTopHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI2_handle_select.png\"));\n        mLeftTopHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI2_handle_pressed.png\"));\n        mLeftTopHandle->pixelPerfect = false;\n\n        mLeftBottomHandle = mLeftTopHandle->CloneAsRef<SceneDragHandle>();\n        mRightTopHandle = mLeftTopHandle->CloneAsRef<SceneDragHandle>();\n        mRightBottomHandle = mLeftTopHandle->CloneAsRef<SceneDragHandle>();\n\n        mLeftHandle = mmake<SceneDragHandle>();\n        mLeftHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI2_handle_side_regular.png\"));\n        mLeftHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI2_handle_side_select.png\"));\n        mLeftHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI2_handle_side_pressed.png\"));\n        mLeftHandle->pixelPerfect = false;\n\n        mTopHandle = mLeftHandle->CloneAsRef<SceneDragHandle>();\n        mBottomHandle = mLeftHandle->CloneAsRef<SceneDragHandle>();\n        mRightHandle = mLeftHandle->CloneAsRef<SceneDragHandle>();\n\n        mPivotHandle = mmake<SceneDragHandle>();\n        mPivotHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI2_pivot.png\"));\n        mPivotHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI2_pivot_select.png\"));\n        mPivotHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI2_pivot_pressed.png\"));\n        mPivotHandle->checkSnappingFunc = THIS_FUNC(CheckPivotSnapping);\n\n        mAnchorsLeftTopHandle = mmake<SceneDragHandle>();\n        mAnchorsLeftTopHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI3_anchor_pressed.png\"));\n        mAnchorsLeftTopHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI3_anchor_hover.png\"));\n        mAnchorsLeftTopHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI3_anchor_regular.png\"));\n        mAnchorsLeftTopHandle->GetRegularDrawable()->pivot = Vec2F(1, 0);\n        mAnchorsLeftTopHandle->GetHoverDrawable()->pivot = Vec2F(1, 0);\n        mAnchorsLeftTopHandle->GetPressedDrawable()->pivot = Vec2F(1, 0);\n\n        mAnchorsRightBottomHandle = mAnchorsLeftTopHandle->CloneAsRef<SceneDragHandle>();\n        mAnchorsLeftBottomHandle = mAnchorsLeftTopHandle->CloneAsRef<SceneDragHandle>();\n        mAnchorsRightTopHandle = mAnchorsLeftTopHandle->CloneAsRef<SceneDragHandle>();\n\n        auto centerAnchorsRegularSprite = mmake<Sprite>();\n        centerAnchorsRegularSprite->SetSize(Vec2F(0, 0));\n        mAnchorsCenter = mmake<SceneDragHandle>();\n        mAnchorsCenter->SetRegularDrawable(centerAnchorsRegularSprite);\n        mAnchorsCenter->SetHoverDrawable(mmake<Sprite>(\"ui/UI3_anchors_hover.png\"));\n        mAnchorsCenter->SetPressedDrawable(mmake<Sprite>(\"ui/UI3_anchors_pressed.png\"));\n\n        mLeftTopHandle->onChangedPos = THIS_FUNC(OnLeftTopHandle);\n        mLeftHandle->onChangedPos = THIS_FUNC(OnLeftHandle);\n        mLeftBottomHandle->onChangedPos = THIS_FUNC(OnLeftBottomHandle);\n        mTopHandle->onChangedPos = THIS_FUNC(OnTopHandle);\n        mBottomHandle->onChangedPos = THIS_FUNC(OnBottomHandle);\n        mRightTopHandle->onChangedPos = THIS_FUNC(OnRightTopHandle);\n        mRightHandle->onChangedPos = THIS_FUNC(OnRightHandle);\n        mRightBottomHandle->onChangedPos = THIS_FUNC(OnRightBottomHandle);\n        mPivotHandle->onChangedPos = THIS_FUNC(OnPivotHandle);\n        mLeftTopRotateHandle->onChangedPos = THIS_FUNC(OnLeftTopRotateHandle);\n        mLeftBottomRotateHandle->onChangedPos = THIS_FUNC(OnLeftBottomRotateHandle);\n        mRightTopRotateHandle->onChangedPos = THIS_FUNC(OnRightTopRotateHandle);\n        mRightBottomRotateHandle->onChangedPos = THIS_FUNC(OnRightBottomRotateHandle);\n        mAnchorsLeftTopHandle->onChangedPos = THIS_FUNC(OnAnchorLeftTopHandle);\n        mAnchorsRightBottomHandle->onChangedPos = THIS_FUNC(OnAnchorRightBottomHandle);\n        mAnchorsLeftBottomHandle->onChangedPos = THIS_FUNC(OnAnchorLeftBottomHandle);\n        mAnchorsRightTopHandle->onChangedPos = THIS_FUNC(OnAnchorRightTopHandle);\n        mAnchorsCenter->onChangedPos = THIS_FUNC(OnCenterAnchorHandle);\n\n        mLeftTopHandle->onPressed = THIS_FUNC(HandlePressed);\n        mLeftHandle->onPressed = THIS_FUNC(HandlePressed);\n        mLeftBottomHandle->onPressed = THIS_FUNC(HandlePressed);\n        mTopHandle->onPressed = THIS_FUNC(HandlePressed);\n        mBottomHandle->onPressed = THIS_FUNC(HandlePressed);\n        mRightTopHandle->onPressed = THIS_FUNC(HandlePressed);\n        mRightHandle->onPressed = THIS_FUNC(HandlePressed);\n        mRightBottomHandle->onPressed = THIS_FUNC(HandlePressed);\n        mPivotHandle->onPressed = THIS_FUNC(HandlePressed);\n        mLeftTopRotateHandle->onPressed = THIS_FUNC(HandlePressed);\n        mLeftBottomRotateHandle->onPressed = THIS_FUNC(HandlePressed);\n        mRightTopRotateHandle->onPressed = THIS_FUNC(HandlePressed);\n        mRightBottomRotateHandle->onPressed = THIS_FUNC(HandlePressed);\n        mAnchorsLeftTopHandle->onPressed = THIS_FUNC(HandlePressed);\n        mAnchorsRightBottomHandle->onPressed = THIS_FUNC(HandlePressed);\n        mAnchorsLeftBottomHandle->onPressed = THIS_FUNC(HandlePressed);\n        mAnchorsRightTopHandle->onPressed = THIS_FUNC(HandlePressed);\n        mAnchorsCenter->onPressed = THIS_FUNC(HandlePressed);\n\n        mLeftTopHandle->onReleased = THIS_FUNC(HandleReleased);\n        mLeftHandle->onReleased = THIS_FUNC(HandleReleased);\n        mLeftBottomHandle->onReleased = THIS_FUNC(HandleReleased);\n        mTopHandle->onReleased = THIS_FUNC(HandleReleased);\n        mBottomHandle->onReleased = THIS_FUNC(HandleReleased);\n        mRightTopHandle->onReleased = THIS_FUNC(HandleReleased);\n        mRightHandle->onReleased = THIS_FUNC(HandleReleased);\n        mRightBottomHandle->onReleased = THIS_FUNC(HandleReleased);\n        mPivotHandle->onReleased = THIS_FUNC(HandleReleased);\n        mLeftTopRotateHandle->onReleased = THIS_FUNC(HandleReleased);\n        mLeftBottomRotateHandle->onReleased = THIS_FUNC(HandleReleased);\n        mRightTopRotateHandle->onReleased = THIS_FUNC(HandleReleased);\n        mRightBottomRotateHandle->onReleased = THIS_FUNC(HandleReleased);\n        mAnchorsLeftTopHandle->onReleased = THIS_FUNC(HandleReleased);\n        mAnchorsRightBottomHandle->onReleased = THIS_FUNC(HandleReleased);\n        mAnchorsLeftBottomHandle->onReleased = THIS_FUNC(HandleReleased);\n        mAnchorsRightTopHandle->onReleased = THIS_FUNC(HandleReleased);\n        mAnchorsCenter->onReleased = THIS_FUNC(HandleReleased);\n\n        mTopHandle->checkSnappingFunc = THIS_FUNC(CheckTopSnapping);\n        mLeftHandle->checkSnappingFunc = THIS_FUNC(CheckLeftSnapping);\n        mBottomHandle->checkSnappingFunc = THIS_FUNC(CheckBottomSnapping);\n        mRightHandle->checkSnappingFunc = THIS_FUNC(CheckRightSnapping);\n        mLeftTopHandle->checkSnappingFunc = THIS_FUNC(CheckLeftTopSnapping);\n        mLeftBottomHandle->checkSnappingFunc = THIS_FUNC(CheckLeftBottomSnapping);\n        mRightTopHandle->checkSnappingFunc = THIS_FUNC(CheckRightTopSnapping);\n        mRightBottomHandle->checkSnappingFunc = THIS_FUNC(CheckRightBottomSnapping);\n\n        mAnchorsRightBottomHandle->checkSnappingFunc = THIS_FUNC(CheckAnchorRightBottomSnapping);\n        mAnchorsLeftBottomHandle->checkSnappingFunc = THIS_FUNC(CheckAnchorLeftBottomSnapping);\n        mAnchorsRightTopHandle->checkSnappingFunc = THIS_FUNC(CheckAnchorRightTopSnapping);\n        mAnchorsLeftTopHandle->checkSnappingFunc = THIS_FUNC(CheckAnchorLeftTopSnapping);\n        mAnchorsCenter->checkSnappingFunc = THIS_FUNC(CheckAnchorCenterSnapping);\n\n        mTopHandle->isPointInside = THIS_FUNC(IsPointInTopHandle);\n        mBottomHandle->isPointInside = THIS_FUNC(IsPointInBottomHandle);\n        mLeftHandle->isPointInside = THIS_FUNC(IsPointInLeftHandle);\n        mRightHandle->isPointInside = THIS_FUNC(IsPointInRightHandle);\n        mAnchorsCenter->isPointInside = THIS_FUNC(IsPointInAnchorsCenterHandle);\n\n        SetHandlesEnable(false);\n    }\n\n    FrameTool::~FrameTool()\n    {}\n\n    String FrameTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_frame_tool.png\";\n    }\n\n    ShortcutKeys FrameTool::GetShortcut() const\n    {\n        return ShortcutKeys({ VK_T });\n    }\n\n    void FrameTool::DrawScene()\n    {\n        SelectionTool::DrawScene();\n\n        UpdateSelectionFrame();\n\n        if (o2EditorSceneScreen.GetSelectedObjects().Count() > 0)\n        {\n            for (auto& object : o2EditorSceneScreen.GetSelectedObjects())\n                o2Render.DrawAABasis(object->GetTransform(), mObjectColor, mObjectColor, mObjectColor);\n\n            o2Render.DrawAABasis(mFrame, mFrameColor, mFrameColor, mFrameColor);\n\n            if (mAnchorsFrameEnabled)\n            {\n                for (auto& object : o2EditorSceneScreen.GetSelectedObjects())\n                {\n                    if (object->GetEditableParent())\n                        o2Render.DrawAABasis(object->GetEditableParent()->GetTransform(), mParentColor, mParentColor, mParentColor);\n                }\n\n                o2Render.DrawAABasis(mAnchorsFrame, mAnchorsFrameColor, mAnchorsFrameColor, mAnchorsFrameColor, 1.0f,\n                                     LineType::Dash);\n            }\n        }\n\n        DrawSnapLines();\n    }\n\n    void FrameTool::DrawSnapLines()\n    {\n        for (auto& line : mSnapLines)\n            o2Render.DrawAALine(line.begin, line.end, line.color);\n    }\n\n    void FrameTool::OnEnabled()\n    {\n        UpdateSelectionFrame();\n    }\n\n    void FrameTool::OnDisabled()\n    {\n        SetHandlesEnable(false);\n    }\n\n    void FrameTool::OnSceneChanged(const Vector<Ref<SceneEditableObject>>& changedObjects)\n    {\n        mNeedRedraw = true;\n        if (mChangedFromThis)\n            mChangedFromThis = false;\n        else\n            UpdateSelectionFrame();\n    }\n\n    void FrameTool::OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        UpdateSelectionFrame();\n    }\n\n    void FrameTool::OnKeyPressed(const Input::Key& key)\n    {\n        if (!o2EditorSceneWindow.IsFocused())\n            return;\n\n        if (key == VK_LEFT)\n            TransformObjectsWithAction(Basis::Translated(Vec2F::Left()));\n\n        if (key == VK_RIGHT)\n            TransformObjectsWithAction(Basis::Translated(Vec2F::Right()));\n\n        if (key == VK_UP)\n            TransformObjectsWithAction(Basis::Translated(Vec2F::Up()));\n\n        if (key == VK_DOWN)\n            TransformObjectsWithAction(Basis::Translated(Vec2F::Down()));\n\n        SelectionTool::OnKeyPressed(key);\n    }\n\n    void FrameTool::OnKeyStayDown(const Input::Key& key)\n    {\n        if (!o2EditorSceneWindow.IsFocused())\n            return;\n\n        if (key.pressedTime < 0.3f)\n            return;\n\n        if (key == VK_LEFT)\n            TransformObjectsWithAction(Basis::Translated(Vec2F::Left()));\n\n        if (key == VK_RIGHT)\n            TransformObjectsWithAction(Basis::Translated(Vec2F::Right()));\n\n        if (key == VK_UP)\n            TransformObjectsWithAction(Basis::Translated(Vec2F::Up()));\n\n        if (key == VK_DOWN)\n            TransformObjectsWithAction(Basis::Translated(Vec2F::Down()));\n    }\n\n    void FrameTool::OnKeyReleased(const Input::Key& key)\n    {}\n\n    void FrameTool::TransformObjects(const Basis& transform)\n    {\n        for (auto& object : o2EditorSceneScreen.GetTopSelectedObjects())\n        {\n            if (object->GetTransform().GetScale() != Vec2F())\n                object->SetTransform(object->GetTransform()*transform);\n            //             else\n            //                 actor->transform->SetWorldNonSizedBasis(actor->transform->GetWorldNonSizedBasis()*transform);\n\n            object->UpdateTransform();\n        }\n\n        mChangedFromThis = true;\n\n        UpdateSelectionFrame();\n        UpdateHandlesTransform();\n    }\n\n    void FrameTool::TransformObjectsWithAction(const Basis& transform)\n    {\n        mBeforeTransforms = o2EditorSceneScreen.GetTopSelectedObjects().Convert<Basis>(\n            [](auto& x) { return x->GetTransform(); });\n\n        auto action = mmake<TransformAction>(o2EditorSceneScreen.GetTopSelectedObjects());\n\n        TransformObjects(transform);\n\n        action->Completed();\n        o2EditorSceneWindow.DoneAction(action);\n    }\n\n    void FrameTool::TransformAnchorsObjects(const Basis& transform)\n    {\n        RectF anchorsFrame(transform.origin, transform.origin + Vec2F(transform.xv.Length(), transform.yv.Length()));\n\n        for (auto& object : o2EditorSceneScreen.GetTopSelectedObjects())\n        {\n            if (object->IsSupportsLayout())\n            {\n                auto parent = object->GetEditableParent();\n                auto parentWidget = DynamicCast<Widget>(parent);\n\n                if (parent)\n                {\n                    RectF parentWorldRect;\n\n                    if (parentWidget)\n                        parentWorldRect = parentWidget->GetChildrenWorldRect();\n                    else\n                        parentWorldRect = parent->GetTransform().AABB();\n\n                    auto prevTransform = object->GetTransform();\n                    Layout layout = object->GetLayout();\n                    layout.anchorMin = (anchorsFrame.LeftBottom() - parentWorldRect.LeftBottom())/parentWorldRect.Size();\n                    layout.anchorMax = (anchorsFrame.RightTop() - parentWorldRect.LeftBottom())/parentWorldRect.Size();\n                    object->SetLayout(layout);\n                    object->UpdateTransform();\n\n                    object->SetTransform(prevTransform);\n                    object->UpdateTransform();\n                }\n            }\n        }\n\n        mChangedFromThis = true;\n\n        UpdateSelectionFrame();\n        UpdateHandlesTransform();\n    }\n\n    void FrameTool::UpdateSelectionFrame()\n    {\n        auto selectedObjects = o2EditorSceneScreen.GetSelectedObjects();\n\n        mAnchorsFrameEnabled = false;\n        mPivotHandleEnabled = true;\n\n        if (selectedObjects.Count() == 1)\n        {\n            auto object = selectedObjects[0];\n\n            mFrame = object->GetTransform();\n            mPivotHandle->position = object->GetPivot();\n\n            mAnchorsFrameEnabled = object->IsSupportsLayout();\n            mPivotHandleEnabled = object->IsSupportsPivot();\n\n            if (mAnchorsFrameEnabled)\n            {\n                auto parent = object->GetEditableParent();\n                auto parentWidget = DynamicCast<Widget>(parent);\n\n                RectF parentWorldRect;\n\n                if (parentWidget)\n                    parentWorldRect = parentWidget->GetChildrenWorldRect();\n                else if (parent)\n                    parentWorldRect = parent->GetTransform().AABB();\n                else\n                    mAnchorsFrameEnabled = false;\n\n                RectF worldRectangle(parentWorldRect.LeftBottom() + object->GetLayout().anchorMin*parentWorldRect.Size(),\n                                     parentWorldRect.LeftBottom() + object->GetLayout().anchorMax*parentWorldRect.Size());\n\n                mAnchorsFrame.origin = worldRectangle.LeftBottom();\n                mAnchorsFrame.xv = Vec2F(Math::Max(worldRectangle.Width(), 0.001f), 0);\n                mAnchorsFrame.yv = Vec2F(0, Math::Max(worldRectangle.Height(), 0.001f));\n            }\n        }\n        else if (selectedObjects.Count() > 0)\n        {\n            Basis frameBasis = selectedObjects.Last()->GetTransform();\n            Vec2F frameOrigin = frameBasis.origin;\n            Vec2F xAxis = frameBasis.xv.Normalized();\n            Vec2F yAxis = frameBasis.yv.Normalized();\n            Vec2F sx, sy;\n\n            const Vec2F cp[4] = { Vec2F(0, 0), Vec2F(0, 1), Vec2F(1, 0), Vec2F(1, 1) };\n            for (auto& object : selectedObjects)\n            {\n                Basis objectTransform = object->GetTransform();\n                for (int i = 0; i < 4; i++)\n                {\n                    Vec2F wp = cp[i] * objectTransform;\n                    float px = (wp - frameOrigin).Dot(xAxis);\n                    float py = (wp - frameOrigin).Dot(yAxis);\n\n                    sx.x = Math::Min(sx.x, px);\n                    sx.y = Math::Max(sx.y, px);\n                    sy.x = Math::Min(sy.x, py);\n                    sy.y = Math::Max(sy.y, py);\n                }\n            }\n\n            mFrame.Set(frameOrigin + xAxis*sx.x + yAxis*sy.x, xAxis*(sx.y - sx.x), yAxis*(sy.y - sy.x));\n            mPivotHandle->position = mFrame.origin + mFrame.xv*0.5f + mFrame.yv*0.5f;\n        }\n        else\n        {\n            SetHandlesEnable(false);\n            return;\n        }\n\n        SetHandlesEnable(true);\n        UpdateHandlesTransform();\n    }\n\n    void FrameTool::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        if (o2EditorSceneScreen.GetSelectedObjects().Count() > 0)\n        {\n            if (mFrame.IsPointInside(cursor.position))\n            {\n                mIsDragging = true;\n                mBeginDraggingFrame = mFrame;\n                mBeginDraggingOffset = cursor.position - mFrame.origin;\n\n                SetHandlesEnable(false);\n                HandlePressed();\n                onTransformBegin();\n                return;\n            }\n        }\n\n        SelectionTool::OnCursorPressed(cursor);\n    }\n\n    void FrameTool::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (mIsDragging)\n        {\n            mIsDragging = false;\n            SetHandlesEnable(true);\n            HandleReleased();\n\n            const float hasntMovedThreshold = 2.0f;\n            if ((mFrame.origin - mBeginDraggingFrame.origin).Length() < hasntMovedThreshold)\n                SelectionTool::OnCursorReleased(cursor);\n        }\n        else\n            SelectionTool::OnCursorReleased(cursor);\n    }\n\n    void FrameTool::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        if (mIsDragging)\n        {\n            mIsDragging = false;\n            SetHandlesEnable(true);\n        }\n        else\n            SelectionTool::OnCursorPressBreak(cursor);\n    }\n\n    void FrameTool::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (mIsDragging)\n        {\n            mSnapLines.Clear();\n\n            Vec2F cursorPos = cursor.position;\n\n            if (o2Input.IsKeyDown(VK_CONTROL))\n            {\n                Basis preTransformed(cursorPos - mBeginDraggingOffset, mBeginDraggingFrame.xv, mBeginDraggingFrame.yv);\n\n                cursorPos = CalculateSnapOffset(cursorPos, preTransformed,\n                                                { Vec2F(0, 0), Vec2F(0, 1), Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f), Vec2F(1, 0), Vec2F(1, 1) }, preTransformed.xv.Normalized(),\n                                                { Vec2F(0, 0), Vec2F(1, 0), Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(0, 1), Vec2F(1, 1) }, preTransformed.yv.Normalized(),\n                                                GetSnapBasisesForAllObjects());\n            }\n\n            Vec2F delta = cursorPos - mBeginDraggingOffset;\n            Basis transformed(delta, mBeginDraggingFrame.xv, mBeginDraggingFrame.yv);\n\n            if (o2Input.IsKeyDown(VK_SHIFT))\n            {\n                if (Math::Abs(transformed.origin.x - mBeginDraggingFrame.origin.x) > Math::Abs(transformed.origin.y - mBeginDraggingFrame.origin.y))\n                    transformed.origin.y = mBeginDraggingFrame.origin.y;\n                else\n                    transformed.origin.x = mBeginDraggingFrame.origin.x;\n            }\n\n            TransformObjects(mFrame.Inverted()*transformed);\n        }\n        else\n            SelectionTool::OnCursorStillDown(cursor);\n    }\n\n    void FrameTool::OnLeftTopHandle(const Vec2F& position)\n    {\n        TransformObjects(mFrame.Inverted()*GetLeftTopHandleTransformed(position));\n    }\n\n    void FrameTool::OnLeftHandle(const Vec2F& position)\n    {\n        TransformObjects(mFrame.Inverted()*GetLeftHandleTransformed(position));\n    }\n\n    void FrameTool::OnLeftBottomHandle(const Vec2F& position)\n    {\n        TransformObjects(mFrame.Inverted()*GetLeftBottomHandleTransformed(position));\n    }\n\n    void FrameTool::OnTopHandle(const Vec2F& position)\n    {\n        TransformObjects(mFrame.Inverted()*GetTopHandleTransformed(position));\n    }\n\n    void FrameTool::OnBottomHandle(const Vec2F& position)\n    {\n        TransformObjects(mFrame.Inverted()*GetBottomHandleTransformed(position));\n    }\n\n    void FrameTool::OnRightTopHandle(const Vec2F& position)\n    {\n        TransformObjects(mFrame.Inverted()*GetRightTopHandleTransformed(position));\n    }\n\n    void FrameTool::OnRightHandle(const Vec2F& position)\n    {\n        TransformObjects(mFrame.Inverted()*GetRightHandleTransformed(position));\n    }\n\n    void FrameTool::OnRightBottomHandle(const Vec2F& position)\n    {\n        TransformObjects(mFrame.Inverted()*GetRightBottomHandleTransformed(position));\n    }\n\n    void FrameTool::OnAnchorLeftTopHandle(const Vec2F& position)\n    {\n        TransformAnchorsObjects(GetLeftTopAnchorHandleTransformed(position));\n    }\n\n    void FrameTool::OnAnchorLeftBottomHandle(const Vec2F& position)\n    {\n        TransformAnchorsObjects(GetLeftBottomAnchorHandleTransformed(position));\n    }\n\n    void FrameTool::OnAnchorRightTopHandle(const Vec2F& position)\n    {\n        TransformAnchorsObjects(GetRightTopAnchorHandleTransformed(position));\n    }\n\n    void FrameTool::OnAnchorRightBottomHandle(const Vec2F& position)\n    {\n        TransformAnchorsObjects(GetRightBottomAnchorHandleTransformed(position));\n    }\n\n    void FrameTool::OnCenterAnchorHandle(const Vec2F& position)\n    {\n        TransformAnchorsObjects(GetAnchorsCenterHandleTransformed(position));\n    }\n\n    void FrameTool::OnPivotHandle(const Vec2F& position)\n    {\n        auto selectedObjects = o2EditorSceneScreen.GetSelectedObjects();\n        if (selectedObjects.Count() == 1)\n            selectedObjects[0]->SetPivot(position);\n    }\n\n    void FrameTool::OnLeftTopRotateHandle(const Vec2F& position)\n    {\n        Vec2F lastHandleCoords = Vec2F(0.0f, 1.0f)*mFrame;\n        OnRotateHandle(position, lastHandleCoords);\n    }\n\n    void FrameTool::OnLeftBottomRotateHandle(const Vec2F& position)\n    {\n        Vec2F lastHandleCoords = Vec2F(0.0f, 0.0f)*mFrame;\n        OnRotateHandle(position, lastHandleCoords);\n    }\n\n    void FrameTool::OnRightTopRotateHandle(const Vec2F& position)\n    {\n        Vec2F lastHandleCoords = Vec2F(1.0f, 1.0f)*mFrame;\n        OnRotateHandle(position, lastHandleCoords);\n    }\n\n    void FrameTool::OnRightBottomRotateHandle(const Vec2F& position)\n    {\n        Vec2F lastHandleCoords = Vec2F(1.0f, 0.0f)*mFrame;\n        OnRotateHandle(position, lastHandleCoords);\n    }\n\n    void FrameTool::OnRotateHandle(const Vec2F& position, Vec2F lastHandleCoords)\n    {\n        Vec2F rotatePivot = mPivotHandle->position;\n        float angle = (position - rotatePivot).SignedAngle(lastHandleCoords - rotatePivot);\n        Basis transform = Basis::Translated(rotatePivot*-1.0f)*Basis::Rotated(-angle)*Basis::Translated(rotatePivot);\n        Basis transformed = mFrame*transform;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float angle = Math::Rad2deg(transformed.GetAngle());\n            float step = 15.0f;\n            float targetAngle = Math::Round(angle/step)*step;\n            float delta = targetAngle - angle;\n\n            Basis deltaTransform = Basis::Translated(rotatePivot*-1.0f)*Basis::Rotated(Math::Deg2rad(delta))\n                *Basis::Translated(rotatePivot);\n\n            transformed = transformed*deltaTransform;\n        }\n\n        TransformObjects(mFrame.Inverted()*transformed);\n    }\n\n    void FrameTool::SetHandlesEnable(bool enable)\n    {\n        mPivotHandle->enabled = enable;\n        mLeftTopRotateHandle->enabled = enable;\n        mLeftBottomRotateHandle->enabled = enable;\n        mRightTopRotateHandle->enabled = enable;\n        mRightBottomRotateHandle->enabled = enable;\n        mLeftTopHandle->enabled = enable;\n        mLeftHandle->enabled = enable;\n        mLeftBottomHandle->enabled = enable;\n        mTopHandle->enabled = enable;\n        mBottomHandle->enabled = enable;\n        mRightTopHandle->enabled = enable;\n        mRightHandle->enabled = enable;\n        mRightBottomHandle->enabled = enable;\n\n        mAnchorsLeftBottomHandle->enabled = enable && mAnchorsFrameEnabled;\n        mAnchorsLeftTopHandle->enabled = enable && mAnchorsFrameEnabled;\n        mAnchorsRightTopHandle->enabled = enable && mAnchorsFrameEnabled;\n        mAnchorsRightBottomHandle->enabled = enable && mAnchorsFrameEnabled;\n\n        CheckAnchorsCenterEnabled();\n    }\n\n    void FrameTool::UpdateHandlesTransform()\n    {\n        float handlesAngle = mFrame.GetAngle();\n\n        auto getHandleType = [&](const Vec2F& pos) {\n            Vec2F v = pos - Vec2F(0.5f, 0.5f)*mFrame;\n            float angle = Math::Rad2deg(v.Angle(Vec2F::Right()));\n\n            if (angle < 22.5f || angle > 337.5f)\n                return CursorType::SizeWE;\n            else if (angle > 22.5f && angle < 67.5f)\n                return CursorType::SizeNwSe;\n            else if (angle > 67.5f && angle < 112.5f)\n                return CursorType::SizeNS;\n            else if (angle > 112.5f && angle < 157.5f)\n                return CursorType::SizeNeSw;\n            else if (angle > 157.5f && angle < 202.5f)\n                return CursorType::SizeWE;\n            else if (angle > 202.5f && angle < 247.5f)\n                return CursorType::SizeNwSe;\n            else if (angle > 247.5f && angle < 292.5f)\n                return CursorType::SizeNS;\n            else if (angle > 292.5f && angle < 337.5f)\n                return CursorType::SizeNeSw;\n\n            return CursorType::SizeNeSw;\n        };\n\n        mLeftTopHandle->position = Vec2F(0.0f, 1.0f)*mFrame;\n        mLeftHandle->position = Vec2F(0.0f, 0.5f)*mFrame;\n        mLeftBottomHandle->position = Vec2F(0.0f, 0.0f)*mFrame;\n        mTopHandle->position = Vec2F(0.5f, 1.0f)*mFrame;\n        mBottomHandle->position = Vec2F(0.5f, 0.0f)*mFrame;\n        mRightTopHandle->position = Vec2F(1.0f, 1.0f)*mFrame;\n        mRightHandle->position = Vec2F(1.0f, 0.5f)*mFrame;\n        mRightBottomHandle->position = Vec2F(1.0f, 0.0f)*mFrame;\n\n        mLeftTopHandle->cursorType = getHandleType(mLeftTopHandle->GetPosition());\n        mLeftHandle->cursorType = getHandleType(mLeftHandle->GetPosition());\n        mLeftBottomHandle->cursorType = getHandleType(mLeftBottomHandle->GetPosition());\n        mTopHandle->cursorType = getHandleType(mTopHandle->GetPosition());\n        mBottomHandle->cursorType = getHandleType(mBottomHandle->GetPosition());\n        mRightTopHandle->cursorType = getHandleType(mRightTopHandle->GetPosition());\n        mRightHandle->cursorType = getHandleType(mRightHandle->GetPosition());\n        mRightBottomHandle->cursorType = getHandleType(mRightBottomHandle->GetPosition());\n\n        mLeftTopRotateHandle->position = Vec2F(0.0f, 1.0f)*mFrame;\n        mLeftBottomRotateHandle->position = Vec2F(0.0f, 0.0f)*mFrame;\n        mRightTopRotateHandle->position = Vec2F(1.0f, 1.0f)*mFrame;\n        mRightBottomRotateHandle->position = Vec2F(1.0f, 0.0f)*mFrame;\n\n        mLeftTopHandle->angle = handlesAngle + Math::PI()*0.5f;\n        mLeftHandle->angle = handlesAngle + Math::PI();\n        mLeftBottomHandle->angle = handlesAngle + Math::PI();\n        mTopHandle->angle = handlesAngle + Math::PI()*0.5f;\n        mBottomHandle->angle = handlesAngle - Math::PI()*0.5f;\n        mRightTopHandle->angle = handlesAngle;\n        mRightHandle->angle = handlesAngle;\n        mRightBottomHandle->angle = handlesAngle - Math::PI()*0.5f;\n\n        mLeftTopRotateHandle->angle = handlesAngle + Math::PI()*0.5f;\n        mLeftBottomRotateHandle->angle = handlesAngle + Math::PI();\n        mRightTopRotateHandle->angle = handlesAngle;\n        mRightBottomRotateHandle->angle = handlesAngle + Math::PI()*1.5f;\n\n        if (mAnchorsFrameEnabled)\n        {\n            mAnchorsLeftTopHandle->position = Vec2F(0.0f, 1.0f)*mAnchorsFrame;\n            mAnchorsLeftBottomHandle->position = Vec2F(0.0f, 0.0f)*mAnchorsFrame;\n            mAnchorsRightTopHandle->position = Vec2F(1.0f, 1.0f)*mAnchorsFrame;\n            mAnchorsRightBottomHandle->position = Vec2F(1.0f, 0.0f)*mAnchorsFrame;\n            mAnchorsCenter->position = mAnchorsFrame.origin;\n\n            mAnchorsLeftTopHandle->angle = handlesAngle;\n            mAnchorsLeftBottomHandle->angle = handlesAngle + Math::PI()*0.5f;\n            mAnchorsRightTopHandle->angle = handlesAngle + Math::PI()*1.5f;\n            mAnchorsRightBottomHandle->angle = handlesAngle + Math::PI();\n\n            CheckAnchorsCenterEnabled();\n        }\n\n        mNeedRedraw = true;\n    }\n\n    void FrameTool::HandlePressed()\n    {\n        mBeforeTransforms = o2EditorSceneScreen.GetTopSelectedObjects().Convert<Basis>(\n            [](auto& x) { return x->GetTransform(); });\n\n        mTransformAction = mmake<TransformAction>(o2EditorSceneScreen.GetTopSelectedObjects());\n\n        mBeginDraggingFrame = mFrame;\n\n        onTransformBegin();\n    }\n\n    void FrameTool::HandleReleased()\n    {\n        mTransformAction->Completed();\n        o2EditorSceneWindow.DoneAction(mTransformAction);\n        mTransformAction = nullptr;\n\n        mSnapLines.Clear();\n        o2EditorSceneScreen.NeedRedraw();\n\n        onTransformEnd();\n    }\n\n    Basis FrameTool::GetLeftTopHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mFrame.origin + mFrame.xv;\n        Vec2F xn = mFrame.xv.Normalized();\n        Vec2F yn = mFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            - xn*Math::Max(0.0f, xn.Dot(position - correctOrigin) + mFrameMinimalSize)\n            + yn*Math::Max(0.0f, -yn.Dot(position - correctOrigin) + mFrameMinimalSize);\n\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 1.0f)*mFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.origin += frameDeltaX;\n        transformedFrame.xv -= frameDeltaX;\n        transformedFrame.yv += frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n\n            if (transformedFrame.xv.Length() < transformedFrame.yv.Length())\n            {\n                Vec2F xd = transformedFrame.xv.Normalized()*\n                    (transformedFrame.yv.Length()*aspect - transformedFrame.xv.Length());\n\n                transformedFrame.origin -= xd;\n                transformedFrame.xv += xd;\n            }\n            else\n                transformedFrame.yv = transformedFrame.yv.Normalized()*transformedFrame.xv.Length()/aspect;\n        }\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetLeftHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mFrame.origin + mFrame.xv;\n        Vec2F xn = mFrame.xv.Normalized();\n        Vec2F correctedPos = position\n            - xn*Math::Max(0.0f, xn.Dot(position - correctOrigin) + mFrameMinimalSize);\n\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 0.5f)*mFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n\n        transformedFrame.origin += frameDeltaX;\n        transformedFrame.xv -= frameDeltaX;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n            transformedFrame.yv = transformedFrame.yv.Normalized()*transformedFrame.xv.Length()/aspect;\n        }\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetLeftBottomHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mFrame.origin + mFrame.xv + mFrame.yv;\n        Vec2F xn = mFrame.xv.Normalized();\n        Vec2F yn = mFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            - xn*Math::Max(0.0f, xn.Dot(position - correctOrigin) + mFrameMinimalSize)\n            - yn*Math::Max(0.0f, yn.Dot(position - correctOrigin) + mFrameMinimalSize);\n\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 0.0f)*mFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.origin += frameDeltaX + frameDeltaY;\n        transformedFrame.xv -= frameDeltaX;\n        transformedFrame.yv -= frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n\n            if (transformedFrame.xv.Length() < transformedFrame.yv.Length())\n            {\n                Vec2F xd = transformedFrame.xv.Normalized()*\n                    (transformedFrame.yv.Length()*aspect - transformedFrame.xv.Length());\n\n                transformedFrame.origin -= xd;\n                transformedFrame.xv += xd;\n            }\n            else\n            {\n                Vec2F yd = transformedFrame.yv.Normalized()*\n                    (transformedFrame.xv.Length()/aspect - transformedFrame.yv.Length());\n\n                transformedFrame.origin -= yd;\n                transformedFrame.yv += yd;\n            }\n        }\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetTopHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mFrame.origin;\n        Vec2F yn = mFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            + yn*Math::Max(0.0f, -yn.Dot(position - correctOrigin) + mFrameMinimalSize);\n\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.5f, 1.0f)*mFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.yv += frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n            transformedFrame.xv = transformedFrame.xv.Normalized()*transformedFrame.yv.Length()*aspect;\n        }\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetBottomHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mFrame.origin + mFrame.yv;\n        Vec2F yn = mFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            - yn*Math::Max(0.0f, yn.Dot(position - correctOrigin) + mFrameMinimalSize);\n\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.5f, 0.0f)*mFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.origin += frameDeltaY;\n        transformedFrame.yv -= frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n            transformedFrame.xv = transformedFrame.xv.Normalized()*transformedFrame.yv.Length()*aspect;\n        }\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetRightTopHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mFrame.origin;\n        Vec2F xn = mFrame.xv.Normalized();\n        Vec2F yn = mFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            + xn*Math::Max(0.0f, -xn.Dot(position - correctOrigin) + mFrameMinimalSize)\n            + yn*Math::Max(0.0f, -yn.Dot(position - correctOrigin) + mFrameMinimalSize);\n\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 1.0f)*mFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.xv += frameDeltaX;\n        transformedFrame.yv += frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n\n            if (transformedFrame.xv.Length() < transformedFrame.yv.Length())\n                transformedFrame.xv = transformedFrame.xv.Normalized()*transformedFrame.yv.Length()*aspect;\n            else\n                transformedFrame.yv = transformedFrame.yv.Normalized()*transformedFrame.xv.Length()/aspect;\n        }\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetRightHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mFrame.origin;\n        Vec2F xn = mFrame.xv.Normalized();\n        Vec2F correctedPos = position\n            + xn*Math::Max(0.0f, -xn.Dot(position - correctOrigin) + mFrameMinimalSize);\n\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 0.5f)*mFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n\n        transformedFrame.xv += frameDeltaX;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n            transformedFrame.yv = transformedFrame.yv.Normalized()*transformedFrame.xv.Length()/aspect;\n        }\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetRightBottomHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mFrame.origin + mFrame.yv;\n        Vec2F xn = mFrame.xv.Normalized();\n        Vec2F yn = mFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            + xn*Math::Max(0.0f, -xn.Dot(position - correctOrigin) + mFrameMinimalSize)\n            - yn*Math::Max(0.0f, yn.Dot(position - correctOrigin) + mFrameMinimalSize);\n\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 0.0f)*mFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.origin += frameDeltaY;\n        transformedFrame.xv += frameDeltaX;\n        transformedFrame.yv -= frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n\n            if (transformedFrame.xv.Length() < transformedFrame.yv.Length())\n                transformedFrame.xv = transformedFrame.xv.Normalized()*transformedFrame.yv.Length()*aspect;\n            else\n            {\n                Vec2F yd = transformedFrame.yv.Normalized()*\n                    (transformedFrame.xv.Length()/aspect - transformedFrame.yv.Length());\n\n                transformedFrame.origin -= yd;\n                transformedFrame.yv += yd;\n            }\n        }\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetLeftTopAnchorHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mAnchorsFrame.origin + mAnchorsFrame.xv;\n        Vec2F xn = mAnchorsFrame.xv.Normalized();\n        Vec2F yn = mAnchorsFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            - xn*Math::Max(0.0f, xn.Dot(position - correctOrigin))\n            + yn*Math::Max(0.0f, -yn.Dot(position - correctOrigin));\n\n        Basis transformedFrame = mAnchorsFrame;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 1.0f)*mAnchorsFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mAnchorsFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mAnchorsFrame.yv);\n\n        transformedFrame.origin += frameDeltaX;\n        transformedFrame.xv -= frameDeltaX;\n        transformedFrame.yv += frameDeltaY;\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetLeftBottomAnchorHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mAnchorsFrame.origin + mAnchorsFrame.xv + mAnchorsFrame.yv;\n        Vec2F xn = mAnchorsFrame.xv.Normalized();\n        Vec2F yn = mAnchorsFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            - xn*Math::Max(0.0f, xn.Dot(position - correctOrigin))\n            - yn*Math::Max(0.0f, yn.Dot(position - correctOrigin));\n\n        Basis transformedFrame = mAnchorsFrame;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 0.0f)*mAnchorsFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mAnchorsFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mAnchorsFrame.yv);\n\n        transformedFrame.origin += frameDeltaX + frameDeltaY;\n        transformedFrame.xv -= frameDeltaX;\n        transformedFrame.yv -= frameDeltaY;\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetRightTopAnchorHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mAnchorsFrame.origin;\n        Vec2F xn = mAnchorsFrame.xv.Normalized();\n        Vec2F yn = mAnchorsFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            + xn*Math::Max(0.0f, -xn.Dot(position - correctOrigin))\n            + yn*Math::Max(0.0f, -yn.Dot(position - correctOrigin));\n\n        Basis transformedFrame = mAnchorsFrame;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 1.0f)*mAnchorsFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mAnchorsFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mAnchorsFrame.yv);\n\n        transformedFrame.xv += frameDeltaX;\n        transformedFrame.yv += frameDeltaY;\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetRightBottomAnchorHandleTransformed(const Vec2F& position)\n    {\n        Vec2F correctOrigin = mAnchorsFrame.origin + mAnchorsFrame.yv;\n        Vec2F xn = mAnchorsFrame.xv.Normalized();\n        Vec2F yn = mAnchorsFrame.yv.Normalized();\n        Vec2F correctedPos = position\n            + xn*Math::Max(0.0f, -xn.Dot(position - correctOrigin))\n            - yn*Math::Max(0.0f, yn.Dot(position - correctOrigin));\n\n        Basis transformedFrame = mAnchorsFrame;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 0.0f)*mAnchorsFrame;\n        Vec2F delta = correctedPos - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mAnchorsFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mAnchorsFrame.yv);\n\n        transformedFrame.origin += frameDeltaY;\n        transformedFrame.xv += frameDeltaX;\n        transformedFrame.yv -= frameDeltaY;\n\n        return transformedFrame;\n    }\n\n    Basis FrameTool::GetAnchorsCenterHandleTransformed(const Vec2F& position)\n    {\n        Basis transformedFrame = mAnchorsFrame;\n        transformedFrame.origin = position;\n\n        return transformedFrame;\n    }\n\n    Vec2F FrameTool::CheckFrameSnapping(const Vec2F& point, const Basis& frame)\n    {\n        mSnapLines.Clear();\n\n        static Vector<Vec2F> snapPoints =\n        {\n            Vec2F(0.0f, 0.0f), Vec2F(0.0f, 0.5f), Vec2F(0.0f, 1.0f),\n            Vec2F(0.5f, 0.0f), Vec2F(0.5f, 0.5f), Vec2F(0.5f, 1.0f),\n            Vec2F(1.0f, 0.0f), Vec2F(1.0f, 0.5f), Vec2F(1.0f, 1.0f)\n        };\n\n        static Vector<Vector<Vector<Vec2F>>> snapPointsLines =\n        {\n            { { Vec2F(0.0f, 0.0f), Vec2F(0.5f, 0.0f) },{ Vec2F(0.0f, 0.5f), Vec2F(0.0f, 0.0f) } },\n            { { Vec2F(0.0f, 0.25f), Vec2F(0.0f, 0.75f) },{ Vec2F(0.0f, 0.5f), Vec2F(0.25f, 0.5f) } },\n            { { Vec2F(0.0f, 1.0f), Vec2F(0.5f, 1.0f) },{ Vec2F(0.0f, 1.0f), Vec2F(0.0f, 0.5f) } },\n\n            { { Vec2F(0.25f, 0.0f), Vec2F(0.75f, 0.0f) },{ Vec2F(0.5f, 0.0), Vec2F(0.5f, 0.25f) } },\n            { { Vec2F(0.25f, 0.5f), Vec2F(0.75f, 0.5f) },{ Vec2F(0.5f, 0.25f), Vec2F(0.5f, 0.75f) } },\n            { { Vec2F(0.25f, 1.0f), Vec2F(0.75f, 1.0f) },{ Vec2F(0.5f, 1.0f), Vec2F(0.5f, 0.75f) } },\n\n            { { Vec2F(0.5f, 0.0f), Vec2F(1.0f, 0.0f) },{ Vec2F(1.0f, 0.0f), Vec2F(1.0f, 0.5f) } },\n            { { Vec2F(1.0f, 0.25f), Vec2F(1.0f, 0.75f) },{ Vec2F(1.0f, 0.5f), Vec2F(0.75f, 0.5f) } },\n            { { Vec2F(1.0f, 1.0f), Vec2F(0.5f, 1.0f) },{ Vec2F(1.0f, 1.0f), Vec2F(1.0f, 0.5f) } }\n        };\n\n        const float snapThresholdPx = 5.0f;\n        Vec2F screenpoint = point;\n\n        int i = 0;\n        for (auto& snapPoint : snapPoints)\n        {\n            Vec2F framePoint = snapPoint*frame;\n\n            if ((screenpoint - framePoint).Length() < snapThresholdPx)\n            {\n                mSnapLines.Add(SnapLine(snapPointsLines[i][0][0]*frame, snapPointsLines[i][0][1]*frame, mSnapLinesColor));\n                mSnapLines.Add(SnapLine(snapPointsLines[i][1][0]*frame, snapPointsLines[i][1][1]*frame, mSnapLinesColor));\n\n                return framePoint;\n            }\n\n            i++;\n        }\n\n        return point;\n    }\n\n    Vec2F FrameTool::CheckPivotSnapping(const Vec2F& point)\n    {\n        return CheckFrameSnapping(point, mFrame);\n    }\n\n    Vec2F FrameTool::CheckAnchorCenterSnapping(const Vec2F& point)\n    {\n        auto objects = o2EditorSceneScreen.GetTopSelectedObjects();\n\n        if (objects.Count() > 0 && objects[0]->GetEditableParent())\n            return CheckFrameSnapping(point, objects[0]->GetEditableParent()->GetTransform());\n\n        return point;\n    }\n\n    Vec2F FrameTool::CheckAnchorLeftTopSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        auto objects = o2EditorSceneScreen.GetTopSelectedObjects();\n        if (objects.Count() > 0 && objects[0]->GetEditableParent())\n        {\n            Basis transformedFrame = GetLeftTopAnchorHandleTransformed(point);\n            Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                                { Vec2F(0, 0), Vec2F(0, 1) }, transformedFrame.xv.Normalized(),\n                                                { Vec2F(0, 1), Vec2F(1, 1) }, transformedFrame.yv.Normalized(),\n                                                { GetObjectParentAnchorSnapBasis(objects[0]) });\n\n            return snapped;\n        }\n\n        return point;\n    }\n\n    Vec2F FrameTool::CheckAnchorLeftBottomSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        auto objects = o2EditorSceneScreen.GetTopSelectedObjects();\n        if (objects.Count() > 0 && objects[0]->GetEditableParent())\n        {\n            Basis transformedFrame = GetLeftBottomAnchorHandleTransformed(point);\n            Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                                { Vec2F(0, 0), Vec2F(0, 1) }, transformedFrame.xv.Normalized(),\n                                                { Vec2F(0, 0), Vec2F(1, 0) }, transformedFrame.yv.Normalized(),\n                                                { GetObjectParentAnchorSnapBasis(objects[0]) });\n\n            return snapped;\n        }\n\n        return point;\n    }\n\n    Vec2F FrameTool::CheckAnchorRightTopSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        auto objects = o2EditorSceneScreen.GetTopSelectedObjects();\n        if (objects.Count() > 0 && objects[0]->GetEditableParent())\n        {\n            Basis transformedFrame = GetRightTopAnchorHandleTransformed(point);\n            Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                                { Vec2F(1, 0), Vec2F(1, 1) }, transformedFrame.xv.Normalized(),\n                                                { Vec2F(0, 1), Vec2F(1, 1) }, transformedFrame.yv.Normalized(),\n                                                { GetObjectParentAnchorSnapBasis(objects[0]) });\n\n            return snapped;\n        }\n\n        return point;\n    }\n\n    Vec2F FrameTool::CheckAnchorRightBottomSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        auto objects = o2EditorSceneScreen.GetTopSelectedObjects();\n        if (objects.Count() > 0 && objects[0]->GetEditableParent())\n        {\n            Basis transformedFrame = GetRightBottomAnchorHandleTransformed(point);\n            Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                                { Vec2F(1, 0), Vec2F(1, 1) }, transformedFrame.xv.Normalized(),\n                                                { Vec2F(0, 0), Vec2F(1, 0) }, transformedFrame.yv.Normalized(), \n                                                { GetObjectParentAnchorSnapBasis(objects[0]) });\n\n            return snapped;\n        }\n\n        return point;\n    }\n\n    Vec2F FrameTool::CheckTopSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        Basis transformedFrame = GetTopHandleTransformed(point);\n        Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                            {}, transformedFrame.xv.Normalized(),\n                                            { Vec2F(0, 1), Vec2F(1, 1) }, transformedFrame.yv.Normalized(), \n                                            GetSnapBasisesForAllObjects());\n\n        return snapped;\n    }\n\n    Vec2F FrameTool::CheckBottomSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        Basis transformedFrame = GetBottomHandleTransformed(point);\n        Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                            {}, transformedFrame.xv.Normalized(),\n                                            { Vec2F(0, 0), Vec2F(1, 0) }, transformedFrame.yv.Normalized(),\n                                            GetSnapBasisesForAllObjects());\n\n        return snapped;\n    }\n\n    Vec2F FrameTool::CheckLeftSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        Basis transformedFrame = GetLeftHandleTransformed(point);\n        Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                            { Vec2F(0, 0), Vec2F(0, 1) }, transformedFrame.xv.Normalized(),\n                                            {}, transformedFrame.yv.Normalized(), \n                                            GetSnapBasisesForAllObjects());\n\n        return snapped;\n    }\n\n    Vec2F FrameTool::CheckRightSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        Basis transformedFrame = GetRightHandleTransformed(point);\n        Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                            { Vec2F(1, 0), Vec2F(1, 1) }, transformedFrame.xv.Normalized(),\n                                            {}, transformedFrame.yv.Normalized(), \n                                            GetSnapBasisesForAllObjects());\n\n        return snapped;\n    }\n\n    Vec2F FrameTool::CheckLeftTopSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        Basis transformedFrame = GetLeftTopHandleTransformed(point);\n        Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                            { Vec2F(0, 0), Vec2F(0, 1) }, transformedFrame.xv.Normalized(),\n                                            { Vec2F(0, 1), Vec2F(1, 1) }, transformedFrame.yv.Normalized(), \n                                            GetSnapBasisesForAllObjects());\n\n        return snapped;\n    }\n\n    Vec2F FrameTool::CheckLeftBottomSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        Basis transformedFrame = GetLeftBottomHandleTransformed(point);\n        Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                            { Vec2F(0, 0), Vec2F(0, 1) }, transformedFrame.xv.Normalized(),\n                                            { Vec2F(0, 0), Vec2F(1, 0) }, transformedFrame.yv.Normalized(), \n                                            GetSnapBasisesForAllObjects());\n\n        return snapped;\n    }\n\n    Vec2F FrameTool::CheckRightTopSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        Basis transformedFrame = GetRightTopHandleTransformed(point);\n        Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                            { Vec2F(1, 0), Vec2F(1, 1) }, transformedFrame.xv.Normalized(),\n                                            { Vec2F(0, 1), Vec2F(1, 1) }, transformedFrame.yv.Normalized(), \n                                            GetSnapBasisesForAllObjects());\n\n        return snapped;\n    }\n\n    Vec2F FrameTool::CheckRightBottomSnapping(const Vec2F& point)\n    {\n        mSnapLines.Clear();\n\n        Basis transformedFrame = GetRightBottomHandleTransformed(point);\n        Vec2F snapped = CalculateSnapOffset(point, transformedFrame,\n                                            { Vec2F(1, 0), Vec2F(1, 1) }, transformedFrame.xv.Normalized(),\n                                            { Vec2F(0, 0), Vec2F(1, 0) }, transformedFrame.yv.Normalized(), \n                                            GetSnapBasisesForAllObjects());\n\n        return snapped;\n    }\n\n    bool FrameTool::IsPointInTopHandle(const Vec2F& point)\n    {\n        float camScale = o2EditorSceneScreen.GetCameraScale().x;\n        float spriteSize = mLeftTopHandle->GetRegularDrawable()->GetSize().x*camScale;\n        Basis transformNonScaled(mFrame.origin, mFrame.xv.Normalized(), mFrame.yv.Normalized());\n        Basis b(mFrame.origin + mFrame.yv + transformNonScaled.xv*spriteSize*0.5f - transformNonScaled.yv*spriteSize*0.5f,\n                mFrame.xv - transformNonScaled.xv*spriteSize,\n                transformNonScaled.yv*spriteSize);\n\n        return b.IsPointInside(point);\n    }\n\n    bool FrameTool::IsPointInLeftHandle(const Vec2F& point)\n    {\n        float camScale = o2EditorSceneScreen.GetCameraScale().x;\n        float spriteSize = mLeftTopHandle->GetRegularDrawable()->GetSize().x*camScale;\n        Basis transformNonScaled(mFrame.origin, mFrame.xv.Normalized(), mFrame.yv.Normalized());\n        Basis b(mFrame.origin - transformNonScaled.xv*spriteSize*0.5f + transformNonScaled.yv*spriteSize*0.5f,\n                transformNonScaled.xv*spriteSize,\n                mFrame.yv - transformNonScaled.yv*spriteSize);\n\n        return b.IsPointInside(point);\n    }\n\n    bool FrameTool::IsPointInRightHandle(const Vec2F& point)\n    {\n        float camScale = o2EditorSceneScreen.GetCameraScale().x;\n        float spriteSize = mLeftTopHandle->GetRegularDrawable()->GetSize().x*camScale;\n        Basis transformNonScaled(mFrame.origin, mFrame.xv.Normalized(), mFrame.yv.Normalized());\n        Basis b(mFrame.origin + mFrame.xv - transformNonScaled.xv*spriteSize*0.5f + transformNonScaled.yv*spriteSize*0.5f,\n                transformNonScaled.xv*spriteSize,\n                mFrame.yv - transformNonScaled.yv*spriteSize);\n\n        return b.IsPointInside(point);\n    }\n\n    bool FrameTool::IsPointInBottomHandle(const Vec2F& point)\n    {\n        float camScale = o2EditorSceneScreen.GetCameraScale().x;\n        float spriteSize = mLeftTopHandle->GetRegularDrawable()->GetSize().x*camScale;\n        Basis transformNonScaled(mFrame.origin, mFrame.xv.Normalized(), mFrame.yv.Normalized());\n        Basis b(mFrame.origin + transformNonScaled.xv*spriteSize*0.5f - transformNonScaled.yv*spriteSize*0.5f,\n                mFrame.xv - transformNonScaled.xv*spriteSize,\n                transformNonScaled.yv*spriteSize);\n\n        return b.IsPointInside(point);\n    }\n\n    bool FrameTool::IsPointInAnchorsCenterHandle(const Vec2F& point)\n    {\n        float camScale = o2EditorSceneScreen.GetCameraScale().x;\n        float handleSize = 10.0f;\n        return (point - mAnchorsFrame.origin).Length() < handleSize*camScale;\n    }\n\n    void FrameTool::CheckAnchorsCenterEnabled()\n    {\n        float lengthThreshold = 0.1f;\n        bool enabled = mAnchorsFrame.xv.Length() < lengthThreshold && mAnchorsFrame.yv.Length() < lengthThreshold;\n        mAnchorsCenter->enabled = false;\n        mAnchorsCenter->enabled = enabled && mAnchorsFrameEnabled;\n    }\n\n    Vector<Basis> FrameTool::GetObjectsTransforms(Vector<Ref<SceneEditableObject>> objects) const\n    {\n        Vector<Basis> res;\n\n        // Exclude selected objects and their children\n        Vector<Ref<SceneEditableObject>> allSelectedObjects;\n        o2EditorSceneScreen.GetSelectedObjects()\n            .ForEach([&](const Ref<SceneEditableObject>& object) { object->GetAllEditableChildren(allSelectedObjects); });\n\n        allSelectedObjects.Add(o2EditorSceneScreen.GetSelectedObjects());\n\n        objects.Remove(allSelectedObjects);\n\n        // Get transforms for existing objects on scene, supported snapping\n        for (auto& object : objects)\n        {\n            if (!object || !object->IsOnScene())\n                continue;\n\n            if (!object->IsSupportsSnapping())\n                continue;\n\n            res.Add(object->GetTransform());\n        }\n\n        return res;\n    }\n\n    Vector<Basis> FrameTool::GetSnapBasisesForAllObjects() const\n    {\n        auto snapBasises = GetObjectsTransforms(o2Scene.GetAllEditableObjects().Convert<Ref<SceneEditableObject>>([](auto& x) { return x.Lock(); }));\n\n        if (mAnchorsFrameEnabled)\n            snapBasises.Add(mAnchorsFrame);\n\n        return snapBasises;\n    }\n\n    Basis FrameTool::GetObjectParentAnchorSnapBasis(const Ref<SceneEditableObject>& object)\n    {\n        auto parent = object->GetEditableParent();\n        Basis parentTransform = parent->GetTransform();\n        if (auto parentWidget = DynamicCast<Widget>(parent))\n            parentTransform = parentWidget->GetChildrenWorldRect();\n\n        return parentTransform;\n    }\n\n    Vec2F FrameTool::CalculateSnapOffset(const Vec2F& point, const Basis& frame,\n                                         const Vector<Vec2F>& xLines, const Vec2F& xNormal,\n                                         const Vector<Vec2F>& yLines, const Vec2F& yNormal,\n                                         Vector<Basis> basises /*= Vector<Basis>()*/)\n    {\n        const float pxThreshold = 5.0f;\n        const float sameSnapDistanceThreshold = 0.01f;\n        const Camera& camera = o2EditorSceneScreen.GetCamera();\n\n        Vector<Vector<Vec2F>> snapLines =\n        {\n            { Vec2F(0.0f, 0.0f), Vec2F(1.0f, 0.0f) },\n            { Vec2F(1.0f, 0.0f), Vec2F(1.0f, 1.0f) },\n            { Vec2F(1.0f, 1.0f), Vec2F(0.0f, 1.0f) },\n            { Vec2F(0.0f, 1.0f), Vec2F(0.0f, 0.0f) },\n            { Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f) },\n            { Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f) }\n        };\n\n        Vector<Vec2F> worldSnapLines;\n\n        for (auto& basis : basises)\n        {\n            for (auto& snapLine : snapLines)\n            {\n                Vec2F objectLineBegin = snapLine[0]*basis;\n                Vec2F objectLineEnd = snapLine[1]*basis;\n                Vec2F objectLineVec = objectLineEnd - objectLineBegin;\n\n                if (objectLineVec.SqrLength() < 0.1f)\n                    continue;\n\n                worldSnapLines.Add(objectLineBegin);\n                worldSnapLines.Add(objectLineEnd);\n            }\n        }\n\n        Vec2F offset;\n        Vector<Vec2F> localSnapLines;\n\n        for (int i = 0; i < 2; i++)\n        {\n            const Vector<Vec2F>& currentAxisLines = i == 0 ? xLines : yLines;\n            Vec2F currentAxisNormal = i == 0 ? xNormal : yNormal;\n\n            bool axisSnapLineFound = false;\n            Vec2F axisSnapOffset;\n            float axisSnapDistance = FLT_MAX;\n            Vec2F axisSnapBegin, axisSnapEnd;\n\n            for (int j = 0; j < currentAxisLines.Count(); j += 2)\n            {\n                Vec2F lineBeg = currentAxisLines[j]*frame;\n                Vec2F lineEnd = currentAxisLines[j + 1]*frame;\n                Vec2F lineVec = lineEnd - lineBeg;\n\n                for (int k = 0; k < worldSnapLines.Count(); k += 2)\n                {\n                    Vec2F objectLineBegin = worldSnapLines[k];\n                    Vec2F objectLineEnd = worldSnapLines[k + 1];\n                    Vec2F objectLineVec = objectLineEnd - objectLineBegin;\n\n                    if (!lineVec.IsParallel(objectLineVec))\n                        continue;\n\n                    float projDistance = (objectLineBegin - lineBeg).Dot(currentAxisNormal);\n                    float screenProjDistance = Math::Abs(projDistance/camera.GetScale().x);\n\n                    if (screenProjDistance < pxThreshold && screenProjDistance < axisSnapDistance)\n                    {\n                        axisSnapOffset = currentAxisNormal*projDistance;\n                        axisSnapDistance = screenProjDistance;\n                        axisSnapBegin = currentAxisLines[j];\n                        axisSnapEnd = currentAxisLines[j + 1];\n\n                        axisSnapLineFound = true;\n                    }\n                }\n            }\n\n            if (!axisSnapLineFound)\n                continue;\n\n            for (int j = 0; j < currentAxisLines.Count(); j += 2)\n            {\n                Vec2F lineBeg = currentAxisLines[j]*frame + axisSnapOffset;\n                Vec2F lineEnd = currentAxisLines[j + 1]*frame + axisSnapOffset;\n                Vec2F lineVec = lineEnd - lineBeg;\n\n                bool found = false;\n\n                for (int k = 0; k < worldSnapLines.Count(); k += 2)\n                {\n                    Vec2F objectLineBegin = worldSnapLines[k];\n                    Vec2F objectLineEnd = worldSnapLines[k + 1];\n                    Vec2F objectLineVec = objectLineEnd - objectLineBegin;\n\n                    if (!lineVec.IsParallel(objectLineVec))\n                        continue;\n\n                    float projDistance = Math::Abs((objectLineBegin - lineBeg).Dot(currentAxisNormal));\n\n                    if (projDistance < sameSnapDistanceThreshold)\n                    {\n                        mSnapLines.Add(SnapLine(objectLineBegin, objectLineEnd, mSnapLinesColor));\n\n                        found = true;\n                    }\n                }\n\n                if (found)\n                {\n                    localSnapLines.Add(currentAxisLines[j]);\n                    localSnapLines.Add(currentAxisLines[j + 1]);\n                }\n            }\n\n            offset += axisSnapOffset;\n        }\n\n        Basis frameWithOffset = frame;\n        frameWithOffset.Translate(offset);\n\n        for (int i = 0; i < localSnapLines.Count(); i += 2)\n            mSnapLines.Add(SnapLine(localSnapLines[i]*frameWithOffset, localSnapLines[i + 1]*frameWithOffset, mSnapLinesColor));\n\n        return point + offset;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::FrameTool, Editor__FrameTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/FrameTool.h",
    "content": "#pragma once\n\n#include \"o2Editor/Tools/ITransformTool.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneDragHandle.h\"\n#include \"o2/Utils/Math/Basis.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Sprite;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(TransformAction);\n\n    // ----------------------------------\n    // Editor frame and pivot moving tool\n    // ----------------------------------\n    class FrameTool: public ITransformTool\n    {\n    public:\n        // Default constructor\n        FrameTool();\n\n        FrameTool& operator=(const FrameTool& other) { return *this; }\n\n        // Destructor\n        ~FrameTool();\n\n        IOBJECT(FrameTool);\n\n    protected:\n        // -------------------\n        // Snap line draw info\n        // -------------------\n        struct SnapLine\n        {\n            Color4 color;\n            Vec2F  begin;\n            Vec2F  end;\n\n        public:\n            SnapLine() {}\n            SnapLine(const Vec2F& begin, const Vec2F& end, const Color4& color):begin(begin), end(end), color(color) {}\n\n            bool operator==(const SnapLine& other) const { return color == other.color && begin == other.begin && end == other.end; }\n        };\n\n    protected:\n        const Color4 mFrameColor = Color4(44, 62, 80, 255);           // Objects frame color\n        const Color4 mObjectColor = Color4(44, 62, 80, 150);          // Object color\n        const Color4 mParentColor = Color4(44, 62, 80, 100);          // Object parent color\n        const Color4 mAnchorsFrameColor = Color4(20, 100, 255, 255);  // Widgets anchors frame color\n        const Color4 mSnapLinesColor = Color4(40, 255, 100, 255);     // Widgets anchors frame color\n\n        const float mFrameMinimalSize = 0.001f;   // Minimal size of transforming frame\n\n        Ref<SceneDragHandle> mLeftTopRotateHandle;      // Left top rotation handle\n        Ref<SceneDragHandle> mLeftBottomRotateHandle;  // Left bottom rotation handle\n        Ref<SceneDragHandle> mRightTopRotateHandle;      // Right top rotation handle\n        Ref<SceneDragHandle> mRightBottomRotateHandle; // Right bottom rotation handle\n        Ref<SceneDragHandle> mLeftTopHandle;              // Left top corner frame handle\n        Ref<SceneDragHandle> mLeftHandle;              // Left corner frame handle\n        Ref<SceneDragHandle> mLeftBottomHandle;          // Left bottom corner frame handle\n        Ref<SceneDragHandle> mTopHandle;                  // Top corner frame handle\n        Ref<SceneDragHandle> mBottomHandle;              // Bottom corner frame handle\n        Ref<SceneDragHandle> mRightTopHandle;          // Right top corner frame handle\n        Ref<SceneDragHandle> mRightHandle;              // Right corner frame handle\n        Ref<SceneDragHandle> mRightBottomHandle;          // Right bottom corner frame handle\n        Ref<SceneDragHandle> mPivotHandle;              // Frame or object pivot handle\n                                                          \n        Ref<SceneDragHandle> mAnchorsLeftTopHandle;       // Anchors Left top corner frame handle\n        Ref<SceneDragHandle> mAnchorsLeftBottomHandle;  // Anchors Left bottom corner frame handle\n        Ref<SceneDragHandle> mAnchorsRightTopHandle;       // Anchors Right top corner frame handle\n        Ref<SceneDragHandle> mAnchorsRightBottomHandle; // Anchors Right bottom corner frame handle\n        Ref<SceneDragHandle> mAnchorsCenter;            // Anchors center, enables when all anchors in one point and drags all of them\n                                                          \n        Basis mFrame; // Frame basis\n                                                          \n        Basis mAnchorsFrame;                // Anchors frame basis\n        bool  mAnchorsFrameEnabled = false; // Is selected some UI widgets and anchors frame enabled\n\n        bool mPivotHandleEnabled = false; // Is selected object supports pivot \n\n        Basis mBeginDraggingFrame;  // Frame before dragging any handle\n        Vec2F mBeginDraggingOffset; // Offset at beginning dragging from frame origin to cursor\n\n        bool mIsDragging = false;      // Is frame dragging\n        bool mChangedFromThis = false; // Is objects changed from this, needs to break circular updating\n\n        Vector<Basis>        mBeforeTransforms; // Array of objects transformations before changing\n        Ref<TransformAction> mTransformAction;  // Current transform action. Creates when transform started\n\n        Vector<SnapLine> mSnapLines; // Immediate drawing lines, used for drawing snapping\n\n    protected:\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Returns shortcut keys for toggle\n        ShortcutKeys GetShortcut() const override;\n\n        // Draws tool\n        void DrawScene() override;\n\n        // Draws snapping lines\n        void DrawSnapLines();\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        // Called when scene objects was changed\n        void OnSceneChanged(const Vector<Ref<SceneEditableObject>>& changedObjects) override;\n\n        // Called when objects selection was changed\n        void OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when key stay down during frame\n        void OnKeyStayDown(const Input::Key& key) override;\n\n        // Called when key was pressed\n        void OnKeyReleased(const Input::Key& key) override;\n\n        // Transforms top selected objects\n        void TransformObjects(const Basis& transform);\n\n        // Transforms top selected objects\n        void TransformObjectsWithAction(const Basis& transform);\n\n        // Transforms top selected objects anchors\n        void TransformAnchorsObjects(const Basis& transform);\n\n        // Updates selection frame and handles\n        void UpdateSelectionFrame();\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Left top handle moved\n        void OnLeftTopHandle(const Vec2F& position);\n\n        // Left handle moved\n        void OnLeftHandle(const Vec2F& position);\n\n        // Left bottom handle moved\n        void OnLeftBottomHandle(const Vec2F& position);\n\n        // Top handle moved\n        void OnTopHandle(const Vec2F& position);\n\n        // Bottom handle moved\n        void OnBottomHandle(const Vec2F& position);\n\n        // Right top handle moved\n        void OnRightTopHandle(const Vec2F& position);\n\n        // Right handle moved\n        void OnRightHandle(const Vec2F& position);\n\n        // Right bottom handle moved\n        void OnRightBottomHandle(const Vec2F& position);\n\n        // Left top anchor handle moved\n        void OnAnchorLeftTopHandle(const Vec2F& position);\n\n        // Left bottom anchor handle moved\n        void OnAnchorLeftBottomHandle(const Vec2F& position);\n\n        // Right top anchor handle moved\n        void OnAnchorRightTopHandle(const Vec2F& position);\n\n        // Right bottom anchor handle moved\n        void OnAnchorRightBottomHandle(const Vec2F& position);\n\n        // Center anchor handle moved\n        void OnCenterAnchorHandle(const Vec2F& position);\n\n        // Pivot handle moved\n        void OnPivotHandle(const Vec2F& position);\n\n        // Left top rotation handle moved\n        void OnLeftTopRotateHandle(const Vec2F& position);\n\n        // Left bottom rotation handle moved\n        void OnLeftBottomRotateHandle(const Vec2F& position);\n\n        // Right top rotation handle moved\n        void OnRightTopRotateHandle(const Vec2F& position);\n\n        // Right bottom rotation handle moved\n        void OnRightBottomRotateHandle(const Vec2F& position);\n\n        // Rotate handle moved\n        void OnRotateHandle(const Vec2F& position, Vec2F lastHandleCoords);\n\n        // Sets all handles enable\n        void SetHandlesEnable(bool enable);\n\n        // Updates handles position and angle\n        void UpdateHandlesTransform();\n\n        // Called when some handle was pressed, stores before transformations\n        void HandlePressed();\n\n        // Called when handle was released, completes transformation action\n        void HandleReleased();\n\n        // Return transformed basis when Left top handle moved\n        Basis GetLeftTopHandleTransformed(const Vec2F& position);\n\n        // Return transformed basis when Left handle moved\n        Basis GetLeftHandleTransformed(const Vec2F& position);\n\n        // Return transformed basis when Left bottom handle moved\n        Basis GetLeftBottomHandleTransformed(const Vec2F& position);\n\n        // Return transformed basis when Top handle moved\n        Basis GetTopHandleTransformed(const Vec2F& position);\n\n        // Return transformed basis when Bottom handle moved\n        Basis GetBottomHandleTransformed(const Vec2F& position);\n\n        // Return transformed basis when Right top handle moved\n        Basis GetRightTopHandleTransformed(const Vec2F& position);\n\n        // Return transformed basis when Right handle moved\n        Basis GetRightHandleTransformed(const Vec2F& position);\n\n        // Return transformed basis when Right bottom handle moved\n        Basis GetRightBottomHandleTransformed(const Vec2F& position);\n\n        // Return transformed anchor basis when Left top handle moved\n        Basis GetLeftTopAnchorHandleTransformed(const Vec2F& position);\n\n        // Return transformed anchor basis when Left bottom handle moved\n        Basis GetLeftBottomAnchorHandleTransformed(const Vec2F& position);\n\n        // Return transformed anchor basis when Right top handle moved\n        Basis GetRightTopAnchorHandleTransformed(const Vec2F& position);\n\n        // Return transformed anchor basis when Right bottom handle moved\n        Basis GetRightBottomAnchorHandleTransformed(const Vec2F& position);\n\n        // Return transformed anchor basis when center anchor moved\n        Basis GetAnchorsCenterHandleTransformed(const Vec2F& position);\n\n        // Checks handle position snapping to center and corners of frame\n        Vec2F CheckFrameSnapping(const Vec2F& point, const Basis& frame);\n\n        // Checks pivot handle position snapping to center and corners\n        Vec2F CheckPivotSnapping(const Vec2F& point);\n\n        // Checks anchor handle position snapping to center and corners of parent\n        Vec2F CheckAnchorCenterSnapping(const Vec2F& point);\n\n        // Checks anchor handle position snapping to center and corners of parent\n        Vec2F CheckAnchorLeftTopSnapping(const Vec2F& point);\n\n        // Checks anchor handle position snapping to center and corners of parent\n        Vec2F CheckAnchorLeftBottomSnapping(const Vec2F& point);\n\n        // Checks anchor handle position snapping to center and corners of parent\n        Vec2F CheckAnchorRightTopSnapping(const Vec2F& point);\n\n        // Checks anchor handle position snapping to center and corners of parent\n        Vec2F CheckAnchorRightBottomSnapping(const Vec2F& point);\n\n        // Checks top handle position snapping to other objects\n        Vec2F CheckTopSnapping(const Vec2F& point);\n\n        // Checks bottom handle position snapping to other objects\n        Vec2F CheckBottomSnapping(const Vec2F& point);\n\n        // Checks left handle position snapping to other objects\n        Vec2F CheckLeftSnapping(const Vec2F& point);\n\n        // Checks right handle position snapping to other objects\n        Vec2F CheckRightSnapping(const Vec2F& point);\n\n        // Checks left top handle position snapping to other objects\n        Vec2F CheckLeftTopSnapping(const Vec2F& point);\n\n        // Checks left bottom handle position snapping to other objects\n        Vec2F CheckLeftBottomSnapping(const Vec2F& point);\n\n        // Checks right top handle position snapping to other objects\n        Vec2F CheckRightTopSnapping(const Vec2F& point);\n\n        // Checks right bottom handle position snapping to other objects\n        Vec2F CheckRightBottomSnapping(const Vec2F& point);\n\n        // Checks is point in area of top handle\n        bool IsPointInTopHandle(const Vec2F& point);\n\n        // Checks is point in area of left handle\n        bool IsPointInLeftHandle(const Vec2F& point);\n\n        // Checks is point in area of right handle\n        bool IsPointInRightHandle(const Vec2F& point);\n\n        // Checks is point in area of bottom handle\n        bool IsPointInBottomHandle(const Vec2F& point);\n\n        // Checks is point in area of center anchors handle\n        bool IsPointInAnchorsCenterHandle(const Vec2F& point);\n\n        // Checks is all anchor handles in same point and enables center anchors handle\n        void CheckAnchorsCenterEnabled();\n\n        // Returns objects' transforms \n        Vector<Basis> GetObjectsTransforms(Vector<Ref<SceneEditableObject>> objects) const;\n\n        // Returns all objects' transforms for snapping and including anchors frame when enabled\n        Vector<Basis> GetSnapBasisesForAllObjects() const;\n\n        // Returns object's parent snap basis - world rect or children rect\n        Basis GetObjectParentAnchorSnapBasis(const Ref<SceneEditableObject>& object);\n\n        // Calculates snapping offset for point by parallels lines, offset is on normal\n        Vec2F CalculateSnapOffset(const Vec2F& point, const Basis& frame, \n                                  const Vector<Vec2F>& xLines, const Vec2F& xNormal,\n                                  const Vector<Vec2F>& yLines, const Vec2F& yNormal,\n                                  Vector<Basis> basises = Vector<Basis>());\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::FrameTool)\n{\n    BASE_CLASS(Editor::ITransformTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::FrameTool)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(44, 62, 80, 255)).NAME(mFrameColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(44, 62, 80, 150)).NAME(mObjectColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(44, 62, 80, 100)).NAME(mParentColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(20, 100, 255, 255)).NAME(mAnchorsFrameColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(40, 255, 100, 255)).NAME(mSnapLinesColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.001f).NAME(mFrameMinimalSize);\n    FIELD().PROTECTED().NAME(mLeftTopRotateHandle);\n    FIELD().PROTECTED().NAME(mLeftBottomRotateHandle);\n    FIELD().PROTECTED().NAME(mRightTopRotateHandle);\n    FIELD().PROTECTED().NAME(mRightBottomRotateHandle);\n    FIELD().PROTECTED().NAME(mLeftTopHandle);\n    FIELD().PROTECTED().NAME(mLeftHandle);\n    FIELD().PROTECTED().NAME(mLeftBottomHandle);\n    FIELD().PROTECTED().NAME(mTopHandle);\n    FIELD().PROTECTED().NAME(mBottomHandle);\n    FIELD().PROTECTED().NAME(mRightTopHandle);\n    FIELD().PROTECTED().NAME(mRightHandle);\n    FIELD().PROTECTED().NAME(mRightBottomHandle);\n    FIELD().PROTECTED().NAME(mPivotHandle);\n    FIELD().PROTECTED().NAME(mAnchorsLeftTopHandle);\n    FIELD().PROTECTED().NAME(mAnchorsLeftBottomHandle);\n    FIELD().PROTECTED().NAME(mAnchorsRightTopHandle);\n    FIELD().PROTECTED().NAME(mAnchorsRightBottomHandle);\n    FIELD().PROTECTED().NAME(mAnchorsCenter);\n    FIELD().PROTECTED().NAME(mFrame);\n    FIELD().PROTECTED().NAME(mAnchorsFrame);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mAnchorsFrameEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPivotHandleEnabled);\n    FIELD().PROTECTED().NAME(mBeginDraggingFrame);\n    FIELD().PROTECTED().NAME(mBeginDraggingOffset);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsDragging);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mChangedFromThis);\n    FIELD().PROTECTED().NAME(mBeforeTransforms);\n    FIELD().PROTECTED().NAME(mTransformAction);\n    FIELD().PROTECTED().NAME(mSnapLines);\n}\nEND_META;\nCLASS_METHODS_META(Editor::FrameTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PROTECTED().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PROTECTED().SIGNATURE(ShortcutKeys, GetShortcut);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawSnapLines);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSceneChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectsSelectionChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyStayDown, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, TransformObjects, const Basis&);\n    FUNCTION().PROTECTED().SIGNATURE(void, TransformObjectsWithAction, const Basis&);\n    FUNCTION().PROTECTED().SIGNATURE(void, TransformAnchorsObjects, const Basis&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateSelectionFrame);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLeftTopHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLeftHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLeftBottomHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTopHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnBottomHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRightTopHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRightHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRightBottomHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAnchorLeftTopHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAnchorLeftBottomHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAnchorRightTopHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAnchorRightBottomHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCenterAnchorHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPivotHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLeftTopRotateHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLeftBottomRotateHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRightTopRotateHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRightBottomRotateHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRotateHandle, const Vec2F&, Vec2F);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetHandlesEnable, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHandlesTransform);\n    FUNCTION().PROTECTED().SIGNATURE(void, HandlePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, HandleReleased);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetLeftTopHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetLeftHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetLeftBottomHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetTopHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetBottomHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetRightTopHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetRightHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetRightBottomHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetLeftTopAnchorHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetLeftBottomAnchorHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetRightTopAnchorHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetRightBottomAnchorHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetAnchorsCenterHandleTransformed, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckFrameSnapping, const Vec2F&, const Basis&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckPivotSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckAnchorCenterSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckAnchorLeftTopSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckAnchorLeftBottomSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckAnchorRightTopSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckAnchorRightBottomSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckTopSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckBottomSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckLeftSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckRightSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckLeftTopSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckLeftBottomSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckRightTopSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckRightBottomSnapping, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsPointInTopHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsPointInLeftHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsPointInRightHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsPointInBottomHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsPointInAnchorsCenterHandle, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckAnchorsCenterEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Basis>, GetObjectsTransforms, Vector<Ref<SceneEditableObject>>);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Basis>, GetSnapBasisesForAllObjects);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetObjectParentAnchorSnapBasis, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CalculateSnapOffset, const Vec2F&, const Basis&, const Vector<Vec2F>&, const Vec2F&, const Vector<Vec2F>&, const Vec2F&, Vector<Basis>);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/IEditorTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IEditorTool.h\"\n\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    const Ref<Toggle>& IEditTool::GetPanelToggle() const\n    {\n        if (!mPanelToggle)\n            mPanelToggle = CreatePanelToggle();\n\n        return mPanelToggle;\n    }\n\n    Ref<Toggle> IEditTool::CreatePanelToggle() const\n    {\n        auto toggle = mmake<Toggle>();\n        toggle->layout->minSize = Vec2F(20, 20);\n        toggle->shortcut = GetShortcut();\n        auto rootLayer = toggle->AddLayer(\"root\", nullptr);\n        auto selectLayer = rootLayer->AddChildLayer(\"hover\", nullptr);\n        selectLayer->AddChildLayer(\"regular\", mmake<Sprite>(GetPanelIcon()),\n                                   Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n        \n        selectLayer->AddChildLayer(\"pressed\", mmake<Sprite>(GetPanelIcon()),\n                                   Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        toggle->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/root/child/hover/transparency\", 1.0f, 0.5f, 0.1f))\n            ->offStateAnimationSpeed = 0.25f;\n\n        toggle->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/root/child/hover/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        toggle->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f));\n\n        toggle->AddState(\"value\", AnimationClip::EaseInOut(\"layer/root/transparency\", 0.3f, 1.0f, 0.1f));\n\n        toggle->onToggle = [&](bool v) { if (v) o2EditorSceneScreen.SelectTool(Ref(const_cast<IEditTool*>(this))); };\n\n        return toggle;\n    }\n\n    String IEditTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_select_tool.png\";\n    }\n\n    ShortcutKeys IEditTool::GetShortcut() const\n    {\n        return ShortcutKeys();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IEditTool, Editor__IEditTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/IEditorTool.h",
    "content": "#pragma once\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n    class Toggle;\n}\n\nnamespace Editor\n{\n    // ---------------------\n    // Editor tool interface\n    // ---------------------\n    class IEditTool: public IObject, public RefCounterable\n    {\n    public:\n        // Default constructor\n        IEditTool() {}\n\n        // Constructor with ref counter\n        IEditTool(RefCounter* refCounter) : RefCounterable(refCounter) {}\n\n        // Destructor\n        virtual ~IEditTool() {}\n\n        // Creates if required and returns toggle button for menu panel\n        virtual const Ref<Toggle>& GetPanelToggle() const;\n\n        IOBJECT(IEditTool);\n\n    protected:\n        bool mNeedRedraw = false; // True when need redraw scene\n\n        mutable Ref<Toggle> mPanelToggle; // Toggle button in menu panel\n\n    protected:\n        // Creates toggle button for menu panel\n        virtual Ref<Toggle> CreatePanelToggle() const;\n\n        // Returns toggle in menu panel icon name\n        virtual String GetPanelIcon() const;\n\n        // Returns shortcut keys for toggle\n        virtual ShortcutKeys GetShortcut() const;\n\n        // Draws tool\n        virtual void DrawScene() {}\n\n        // Draws tool\n        virtual void DrawScreen() {}\n\n        // Called when scene actors was changed\n        virtual void OnSceneChanged(const Vector<Ref<SceneEditableObject>>& changedObjects) {}\n\n        // Updates tool\n        virtual void Update(float dt) {}\n\n        // Called when tool was enabled\n        virtual void OnEnabled() {}\n\n        // Called when tool was disabled\n        virtual void OnDisabled() {}\n\n        // Called when objects selection was changed\n        virtual void OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects) {}\n\n        // Called when cursor pressed on this\n        virtual void OnCursorPressed(const Input::Cursor& cursor) {}\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        virtual void OnCursorReleased(const Input::Cursor& cursor) {}\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        virtual void OnCursorPressBreak(const Input::Cursor& cursor) {}\n\n        // Called when cursor stay down during frame\n        virtual void OnCursorStillDown(const Input::Cursor& cursor) {}\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        virtual void OnCursorMoved(const Input::Cursor& cursor) {}\n\n        // Called when cursor enters this object\n        virtual void OnCursorEnter(const Input::Cursor& cursor) {}\n\n        // Called when cursor exits this object\n        virtual void OnCursorExit(const Input::Cursor& cursor) {}\n\n        // Called when right mouse button was pressed on this\n        virtual void OnCursorRightMousePressed(const Input::Cursor& cursor) {}\n\n        // Called when right mouse button stay down on this\n        virtual void OnCursorRightMouseStayDown(const Input::Cursor& cursor) {}\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        virtual void OnCursorRightMouseReleased(const Input::Cursor& cursor) {}\n\n        // Called when middle mouse button was pressed on this\n        virtual void OnCursorMiddleMousePressed(const Input::Cursor& cursor) {}\n\n        // Called when middle mouse button stay down on this\n        virtual void OnCursorMiddleMouseStayDown(const Input::Cursor& cursor) {}\n\n        // Called when middle mouse button was released (only when middle mouse button pressed this at previous time)\n        virtual void OnCursorMiddleMouseReleased(const Input::Cursor& cursor) {}\n\n        // Called when scrolling\n        virtual void OnScrolled(float scroll) {}\n\n        // Called when key was pressed\n        virtual void OnKeyPressed(const Input::Key& key) {}\n\n        // Called when key was released\n        virtual void OnKeyReleased(const Input::Key& key) {}\n\n        // Called when key stay down during frame\n        virtual void OnKeyStayDown(const Input::Key& key) {}\n\n        friend class SceneEditScreen;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IEditTool)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IEditTool)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNeedRedraw);\n    FIELD().PROTECTED().NAME(mPanelToggle);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IEditTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Toggle>&, GetPanelToggle);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Toggle>, CreatePanelToggle);\n    FUNCTION().PROTECTED().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PROTECTED().SIGNATURE(ShortcutKeys, GetShortcut);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawScreen);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSceneChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, Update, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectsSelectionChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMousePressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseStayDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMiddleMousePressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMiddleMouseStayDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMiddleMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyStayDown, const Input::Key&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/ITransformTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ITransformTool.h\"\n\nnamespace Editor\n{\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::ITransformTool, Editor__ITransformTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/ITransformTool.h",
    "content": "#pragma once\n\n#include \"o2Editor/Tools/SelectionTool.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Sprite;\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // ---------------------\n    // Editor transform tool\n    // ---------------------\n    class ITransformTool: public SelectionTool\n    {\n    public:\n        Function<void()> onTransformBegin; // Called when transform begins\n        Function<void()> onTransformEnd;   // Called when transform ends\n\n        IOBJECT(ITransformTool);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ITransformTool)\n{\n    BASE_CLASS(Editor::SelectionTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ITransformTool)\n{\n    FIELD().PUBLIC().NAME(onTransformBegin);\n    FIELD().PUBLIC().NAME(onTransformEnd);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ITransformTool)\n{\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/MeshTopologyTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"MeshTopologyTool.h\"\n\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    MeshTopologyTool::MeshTopologyTool(RefCounter* refCounter):\n        IEditTool(refCounter), SelectableDragHandlesGroup(refCounter), mSelectionSprite(\"ui/UI_Window_place.png\")\n    {\n        sceneLayer->tool = Ref(this);\n\n        mHandleSample = DragHandle(mmake<Sprite>(\"ui/CurveHandle.png\"),\n                                   mmake<Sprite>(\"ui/CurveHandleHover.png\"),\n                                   mmake<Sprite>(\"ui/CurveHandlePressed.png\"),\n                                   mmake<Sprite>(\"ui/CurveHandleSelected.png\"));\n\n        typedef MeshTopologyTool thisclass;\n\n        mTransformFrame.SetPivotEnabled(false);\n        mTransformFrame.SetRotationEnabled(false);\n        mTransformFrame.onTransformed = THIS_FUNC(OnTransformFrameTransformed);\n        //         mTransformFrame.onPressed = THIS_FUNC(OnTransformBegin);\n        //         mTransformFrame.onChangeCompleted = THIS_FUNC(OnTransformCompleted);\n        mTransformFrame.isInputTransparent = true;\n    }\n\n    MeshTopologyTool::MeshTopologyTool(const MeshTopologyTool& other)\n    {}\n\n    MeshTopologyTool::~MeshTopologyTool()\n    {\n        ClearHandles();\n    }\n\n    void MeshTopologyTool::Setup(const Function<Vector<Vec2F>()>& getPoints, const Function<void(int, Vec2F)>& setPoint,\n                                 const Function<Basis()>& getTransform, const Function<void(Vec2F)>& addPoint,\n                                 const Function<void(int)>& removePoint)\n    {\n        mGetPoints = getPoints;\n        mSetPoint = setPoint;\n        mAddPoint = addPoint;\n        mRemovePoint = removePoint;\n        mGetTransform = getTransform;\n\n        InitializeHandles();\n    }\n\n    void MeshTopologyTool::Reset()\n    {\n        mGetPoints.Clear();\n        mSetPoint.Clear();\n        mAddPoint.Clear();\n        mRemovePoint.Clear();\n        mGetTransform.Clear();\n\n        ClearHandles();\n    }\n\n    String MeshTopologyTool::GetPanelIcon() const\n    {\n        return \"ui/TopologyTool.png\";\n    }\n\n    void MeshTopologyTool::OnEnabled()\n    {\n        o2EditorSceneScreen.AddEditorLayer(sceneLayer);\n        isEnabled = true;\n    }\n\n    void MeshTopologyTool::OnDisabled()\n    {\n        o2EditorSceneScreen.RemoveEditorLayer(sceneLayer);\n        isEnabled = false;\n    }\n\n    bool MeshTopologyTool::IsUnderPoint(const Vec2F& point)\n    {\n        return true;\n    }\n\n    bool MeshTopologyTool::IsInputTransparent() const\n    {\n        return true;\n    }\n\n    Ref<RefCounterable> MeshTopologyTool::CastToRefCounterable(const Ref<MeshTopologyTool>& ref)\n    {\n        return DynamicCast<IEditTool>(ref);\n    }\n\n    void MeshTopologyTool::InitializeHandles()\n    {\n        ClearHandles();\n\n        for (int i = 0; i < mGetPoints().Count(); i++)\n        {\n            mHandles.Add(mHandleSample.CloneAsRef<DragHandle>());\n            auto& newHandle = mHandles.Last();\n\n            newHandle->SetPosition(mGetPoints()[i]);\n            newHandle->SetSelectionGroup(Ref(this));\n            newHandle->onChangedPos = [=](const Vec2F& pos) { OnHandleMoved(i, pos); };\n            newHandle->localToScreenTransformFunc = [&](const Vec2F& p) { return LocalToWorld(p); };\n            newHandle->screenToLocalTransformFunc = [&](const Vec2F& p) { return WorldToLocal(p); };\n        }\n    }\n\n    void MeshTopologyTool::ClearHandles()\n    {\n        mHandles.Clear();\n    }\n\n    void MeshTopologyTool::OnHandleMoved(int i, const Vec2F& pos)\n    {\n        mSetPoint(i, pos);\n        UpdateTransformFrame();\n    }\n\n    Vec2F MeshTopologyTool::WorldToLocal(const Vec2F& point) const\n    {\n        Basis transform = mGetTransform();\n        return o2EditorSceneScreen.ScreenToLocalPoint(point)*transform.Inverted();\n    }\n\n    Vec2F MeshTopologyTool::LocalToWorld(const Vec2F& point) const\n    {\n        Basis transform = mGetTransform();\n        return o2EditorSceneScreen.LocalToScreenPoint(point*transform);\n    }\n\n    void MeshTopologyTool::DrawSelection()\n    {\n        if (mIsPressed)\n        {\n            mSelectionSprite.rect = RectF(LocalToWorld(mSelectingPressedPoint), o2Input.cursorPos);\n            mSelectionSprite.Draw();\n        }\n    }\n\n    void MeshTopologyTool::DrawTransformFrame()\n    {\n        if (!mTransformFrameVisible)\n            return;\n\n        Vec2F worldOrig = LocalToWorld(mTransformFrameBasis.origin);\n        Vec2F worldXV = LocalToWorld(mTransformFrameBasis.xv + mTransformFrameBasis.origin) - worldOrig;\n        Vec2F worldYV = LocalToWorld(mTransformFrameBasis.yv + mTransformFrameBasis.origin) - worldOrig;\n        mTransformFrame.SetBasis(Basis(worldOrig - mTransformBasisOffet,\n                                       worldXV + Vec2F(mTransformBasisOffet.x*2.0f, 0),\n                                       worldYV + Vec2F(0, mTransformBasisOffet.y*2.0f)));\n\n        mTransformFrame.Draw();\n    }\n\n    void MeshTopologyTool::UpdateTransformFrame()\n    {\n        mTransformFrameVisible = IsTransformFrameVisible();\n\n        if (!mTransformFrameVisible || mSelectedHandles.IsEmpty())\n            return;\n\n        RectF aabb((mSelectedHandles[0])->GetPosition(), (mSelectedHandles[0])->GetPosition());\n\n        for (auto& handle : mSelectedHandles)\n        {\n            aabb.left = Math::Min(handle->GetPosition().x, aabb.left);\n            aabb.right = Math::Max(handle->GetPosition().x, aabb.right);\n            aabb.top = Math::Max(handle->GetPosition().y, aabb.top);\n            aabb.bottom = Math::Min(handle->GetPosition().y, aabb.bottom);\n        }\n\n        mTransformFrameBasis = Basis(aabb.LeftBottom(), Vec2F::Right()*aabb.Width(), Vec2F::Up()*aabb.Height());\n    }\n\n    bool MeshTopologyTool::IsTransformFrameVisible() const\n    {\n        return mSelectedHandles.Count() > 1;\n    }\n\n    void MeshTopologyTool::OnTransformFrameTransformed(const Basis& basis)\n    {\n        Vec2F localBasisOrig = WorldToLocal(basis.origin + mTransformBasisOffet);\n        Vec2F localBasisXV = WorldToLocal(basis.xv - Vec2F(mTransformBasisOffet.x*2.0f, 0) + basis.origin + mTransformBasisOffet) - localBasisOrig;\n        Vec2F localBasisYV = WorldToLocal(basis.yv - Vec2F(0, mTransformBasisOffet.y*2.0f) + basis.origin + mTransformBasisOffet) - localBasisOrig;\n        Basis localBasis(localBasisOrig, localBasisXV, localBasisYV);\n\n        Basis delta = mTransformFrameBasis.Inverted()*localBasis;\n\n        if (delta.origin.Length() > 0.01f || delta.xv != Vec2F(1, 0) || delta.yv != Vec2F(0, 1))\n        {\n            Vector<Vec2F> newPosHandlesPositions, newSupportnHandlesPositions;\n\n            for (int i = 0; i < mSelectedHandles.Count(); i++)\n                newPosHandlesPositions.Add(mSelectedHandles[i]->GetPosition()*delta);\n\n            for (int i = 0; i < mSelectedHandles.Count(); i++)\n            {\n                mSelectedHandles[i]->SetPosition(newPosHandlesPositions[i]);\n                mSelectedHandles[i]->onChangedPos(mSelectedHandles[i]->GetPosition());\n            }\n\n            UpdateTransformFrame();\n        }\n    }\n\n    void MeshTopologyTool::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        mSelectingPressedPoint = WorldToLocal(cursor.position);\n\n        if (!o2Input.IsKeyDown(VK_CONTROL))\n            DeselectAll();\n    }\n\n    void MeshTopologyTool::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        for (auto& handle : mSelectingHandlesBuf)\n        {\n            SetHandleSelectedState(handle, false);\n            handle->SetSelected(true);\n        }\n\n        mSelectingHandlesBuf.Clear();\n        UpdateTransformFrame();\n    }\n\n    void MeshTopologyTool::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        for (auto& handle : mSelectingHandlesBuf)\n            SetHandleSelectedState(handle, false);\n\n        mSelectingHandlesBuf.Clear();\n\n        RectF selectionLocalRect(mSelectingPressedPoint, WorldToLocal(cursor.position));\n\n        for (auto& handle : mHandles)\n        {\n            if (handle->IsEnabled() && selectionLocalRect.IsInside(handle->GetPosition()) &&\n                !mSelectedHandles.Contains(handle))\n            {\n                mSelectingHandlesBuf.Add(handle);\n                SetHandleSelectedState(handle, true);\n            }\n        }\n    }\n\n    void MeshTopologyTool::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        auto local = WorldToLocal(cursor.position);\n        mAddPoint(local);\n        InitializeHandles();\n    }\n\n    void MeshTopologyTool::SceneLayer::DrawOverScene()\n    {\n        auto toolRef = tool.Lock();\n\n        toolRef->OnDrawn();\n\n        toolRef->DrawTransformFrame();\n\n        for (auto& handle : toolRef->mHandles)\n            handle->Draw();\n\n        toolRef->DrawSelection();\n    }\n\n    void MeshTopologyTool::SceneLayer::Update(float dt)\n    {\n\n    }\n\n    int MeshTopologyTool::SceneLayer::GetOrder() const\n    {\n        return 0;\n    }\n\n    bool MeshTopologyTool::SceneLayer::IsEnabled() const\n    {\n        return tool.Lock()->isEnabled;\n    }\n\n    const String& MeshTopologyTool::SceneLayer::GetName() const\n    {\n        static String res(\"Topology\");\n        return res;\n    }\n\n    const String& MeshTopologyTool::SceneLayer::GetIconName() const\n    {\n        return String::empty;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::MeshTopologyTool, Editor__MeshTopologyTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/MeshTopologyTool.h",
    "content": "#pragma once\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/Components/MeshComponent.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Editor/FrameHandles.h\"\n#include \"o2Editor/Tools/IEditorTool.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n\nnamespace Editor\n{\n    // ---------------------------------------------------------\n    // Mesh component topology tool. Adds extra points into mesh-\n    // --------------------------------------------------------\n    struct MeshTopologyTool: public IEditTool, public SelectableDragHandlesGroup, public CursorAreaEventsListener, public KeyboardEventsListener\n    {\n        // ----------------------\n        // Scene layer for editor\n        // ----------------------\n        struct SceneLayer: public SceneEditorLayer\n        {\n            WeakRef<MeshTopologyTool> tool; // Reference to tool\n\n        public:\n            // Draws editor over scene\n            void DrawOverScene() override;\n\n            // Updates editor\n            void Update(float dt) override;\n\n            // Returns order of layer\n            int GetOrder() const override;\n\n            // Returns true if layer is enabled\n            bool IsEnabled() const override;\n\n            // Returns name of layer\n            const String& GetName() const override;\n\n            // Returns icon name of layer\n            const String& GetIconName() const override;\n        };\n\n    public:\n        Ref<SceneLayer> sceneLayer = mmake<SceneLayer>(); // Scene layer for drawing spline\n\n        bool isEnabled = false; // Is tool enabled now\n\n        Function<void()> onChanged; // Called when frame changes     \n\n    public:\n        // Default constructor\n        explicit MeshTopologyTool(RefCounter* refCounter);\n\n        // Default constructor\n        MeshTopologyTool(const MeshTopologyTool& other);\n\n        // Destructor\n        ~MeshTopologyTool();\n\n        // Empty copy operator\n        MeshTopologyTool& operator=(const MeshTopologyTool& other) { return *this; }\n\n        // Setup editing callbacks\n        void Setup(const Function<Vector<Vec2F>()>& getPoints, const Function<void(int, Vec2F)>& setPoint, \n                   const Function<Basis()>& getTransform, const Function<void(Vec2F)>& addPoint,\n                   const Function<void(int)>& removePoint);\n\n        // Resets callbacks\n        void Reset();\n\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Dynamic cast to RefCounterable via Widget\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<MeshTopologyTool>& ref);\n\n        IOBJECT(MeshTopologyTool);\n\n    private:\n        Function<Vector<Vec2F>()>  mGetPoints;   // Gets editing points list\n        Function<void(int, Vec2F)> mSetPoint;    // Sets editing point position by index\n        Function<void(Vec2F)>      mAddPoint;    // Add new point\n        Function<void(int)>        mRemovePoint; // Removes point by index\n\n        Function<Basis()> mGetTransform; // Returns local space transformation\n\n        DragHandle              mHandleSample; // Point handle sample\n        Vector<Ref<DragHandle>> mHandles;      // List of all handles\n\n        Sprite mSelectionSprite;       // Selection sprite\n        Vec2F  mSelectingPressedPoint; // Point, where cursor was pressed, selection starts here, in local space\n\n        Vector<Ref<DragHandle>> mSelectingHandlesBuf; // Potentially selecting handles while selecting\n\n        FrameHandles mTransformFrame;                      // Keys transformation frame\n        bool         mTransformFrameVisible = false;       // Is transform frame visible. it visible when 2 or more main handles was selected\n        Basis        mTransformFrameBasis;                 // Basis of transform frame in screen space\n        Vec2F        mTransformBasisOffet = Vec2F(10, 10); // Border between side points and frame\n\n    private:\n        // Initializes handles\n        void InitializeHandles();\n\n        // Clears all handles\n        void ClearHandles();\n\n        // Called when handle was moved\n        void OnHandleMoved(int i, const Vec2F& pos);\n\n        // Converts world space point to local space\n        Vec2F WorldToLocal(const Vec2F& point) const;\n\n        // Converts local space point to world space\n        Vec2F LocalToWorld(const Vec2F& point) const;\n\n        // Draw selection sprite\n        void DrawSelection();\n\n        // Draws transformation frame\n        void DrawTransformFrame();\n\n        // Updates transformation frame by selected handles\n        void UpdateTransformFrame();\n\n        // Returns is transform frame visible. it will be visible when 2 or more main handles was selected\n        bool IsTransformFrameVisible() const;\n\n        // Called when transform frame was transformed\n        void OnTransformFrameTransformed(const Basis& basis);\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor double clicked; creates new point\n        void OnCursorDblClicked(const Input::Cursor& cursor) override;\n        \n        REF_COUNTERABLE_IMPL(IEditTool, SelectableDragHandlesGroup);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::MeshTopologyTool)\n{\n    BASE_CLASS(Editor::IEditTool);\n    BASE_CLASS(o2::SelectableDragHandlesGroup);\n    BASE_CLASS(o2::CursorAreaEventsListener);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::MeshTopologyTool)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(mmake<SceneLayer>()).NAME(sceneLayer);\n    FIELD().PUBLIC().DEFAULT_VALUE(false).NAME(isEnabled);\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PRIVATE().NAME(mGetPoints);\n    FIELD().PRIVATE().NAME(mSetPoint);\n    FIELD().PRIVATE().NAME(mAddPoint);\n    FIELD().PRIVATE().NAME(mRemovePoint);\n    FIELD().PRIVATE().NAME(mGetTransform);\n    FIELD().PRIVATE().NAME(mHandleSample);\n    FIELD().PRIVATE().NAME(mHandles);\n    FIELD().PRIVATE().NAME(mSelectionSprite);\n    FIELD().PRIVATE().NAME(mSelectingPressedPoint);\n    FIELD().PRIVATE().NAME(mSelectingHandlesBuf);\n    FIELD().PRIVATE().NAME(mTransformFrame);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mTransformFrameVisible);\n    FIELD().PRIVATE().NAME(mTransformFrameBasis);\n    FIELD().PRIVATE().DEFAULT_VALUE(Vec2F(10, 10)).NAME(mTransformBasisOffet);\n}\nEND_META;\nCLASS_METHODS_META(Editor::MeshTopologyTool)\n{\n\n    typedef const Function<void(int, Vec2F)>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const MeshTopologyTool&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Setup, const Function<Vector<Vec2F>()>&, _tmp1, const Function<Basis()>&, const Function<void(Vec2F)>&, const Function<void(int)>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Reset);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDisabled);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<MeshTopologyTool>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeHandles);\n    FUNCTION().PRIVATE().SIGNATURE(void, ClearHandles);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnHandleMoved, int, const Vec2F&);\n    FUNCTION().PRIVATE().SIGNATURE(Vec2F, WorldToLocal, const Vec2F&);\n    FUNCTION().PRIVATE().SIGNATURE(Vec2F, LocalToWorld, const Vec2F&);\n    FUNCTION().PRIVATE().SIGNATURE(void, DrawSelection);\n    FUNCTION().PRIVATE().SIGNATURE(void, DrawTransformFrame);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateTransformFrame);\n    FUNCTION().PRIVATE().SIGNATURE(bool, IsTransformFrameVisible);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnTransformFrameTransformed, const Basis&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorDblClicked, const Input::Cursor&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/MeshWeightsTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"MeshWeightsTool.h\"\n\n#include \"o2/Render/SkinningMesh.h\"\n#include \"o2/Scene/Components/SkinningMeshComponent.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    MeshWeightsTool::MeshWeightsTool(RefCounter* refCounter):\n        IEditTool(refCounter)\n    {\n        sceneLayer->tool = Ref(this);\n    }\n\n    void MeshWeightsTool::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        mPressed = true;\n    }\n\n    void MeshWeightsTool::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        mPressed = false;\n    }\n\n    void MeshWeightsTool::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n\n    }\n\n    void MeshWeightsTool::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        mCursosPos = cursor.position;\n    }\n\n    void MeshWeightsTool::OnCursorMoved(const Input::Cursor& cursor)\n    {\n        mCursosPos = cursor.position;\n    }\n\n    void MeshWeightsTool::SceneLayer::DrawScene()\n    {\n        auto toolRef = tool.Lock();\n        auto boneComponent = toolRef->boneComponent;\n        if (auto meshComponent = boneComponent->FindSkinningMesh())\n        {\n            auto& mesh = meshComponent->GetMesh();\n            auto& debugMesh = toolRef->mWeightsDebugMesh;\n\n            DrawMeshWire(mesh);\n\n            float weightMeshAlpha = 0.8f;\n            float weightMeshSaturation = 1.0f;\n            float weightMeshLight = 0.5f;\n            float zeroWeightColorHue = 0.3f;\n            float oneWeightColorHue = 0.6f;\n\n            if (mesh.vertexCount > debugMesh.GetMaxVertexCount() ||\n                mesh.polyCount > debugMesh.GetMaxPolyCount())\n            {\n                debugMesh.Resize(mesh.vertexCount, mesh.polyCount);\n            }\n\n            auto* meshVerts = mesh.vertices;\n            Vertex* debugVerts = debugMesh.GetVertices<Vertex>();\n            auto zeroWeightColor = Color4::HSL(zeroWeightColorHue, weightMeshSaturation, weightMeshLight, weightMeshAlpha).ABGR();\n            for (UInt i = 0; i < mesh.vertexCount; i++)\n                debugVerts[i].Set(meshVerts[i], zeroWeightColor, 0, 0);\n\n            for (auto& p : boneComponent->vertexWeights)\n            {\n                float hue = Math::Lerp(zeroWeightColorHue, oneWeightColorHue, p.second);\n                debugVerts[p.first].color = Color4::HSL(hue, weightMeshSaturation, weightMeshLight, weightMeshAlpha).ABGR();\n            }\n\n            VertexIndex* debugIdx = debugMesh.GetIndexes();\n            memcpy(debugIdx, mesh.indexes, sizeof(VertexIndex)*mesh.polyCount*3);\n\n            debugMesh.vertexCount = mesh.vertexCount;\n            debugMesh.polyCount = mesh.polyCount;\n\n            debugMesh.Draw();\n        }\n\n        Vec2F localCursorPos = o2EditorSceneScreen.ScreenToLocalPoint(toolRef->mCursosPos);\n        o2Render.DrawAACircle(localCursorPos, toolRef->mBrushReadius, Color4::White(), 150, 2.0f);\n    }\n\n    void MeshWeightsTool::SceneLayer::DrawMeshWire(auto& mesh)\n    {\n        auto* verts = mesh.vertices;\n        Color4 wireColor = Color4::White();\n        for (UInt i = 0; i < mesh.polyCount; i++)\n        {\n            Vec2F p0 = verts[mesh.indexes[i*3]];\n            Vec2F p1 = verts[mesh.indexes[i*3 + 1]];\n            Vec2F p2 = verts[mesh.indexes[i*3 + 2]];\n\n            Vertex vertices[] =\n            {\n                Vertex(p0, wireColor.ABGR(), 0, 0),\n                Vertex(p1, wireColor.ABGR(), 0, 0),\n                Vertex(p2, wireColor.ABGR(), 0, 0),\n                Vertex(p0, wireColor.ABGR(), 0, 0)\n            };\n\n            o2Render.DrawPolyLine(vertices, 4);\n        }\n    }\n\n    void MeshWeightsTool::SceneLayer::Update(float dt)\n    {\n        if (tool.Lock()->mPressed)\n            UpdateBrush(dt);\n    }\n\n    void MeshWeightsTool::SceneLayer::UpdateBrush(float dt)\n    {\n        auto toolRef = tool.Lock();\n\n        auto meshComponent = toolRef->boneComponent->FindSkinningMesh();\n        if (!meshComponent)\n            return;\n\n        auto& mesh = meshComponent->GetMesh();\n        auto* vertices = mesh.vertices;\n        auto& vertexWeights = toolRef->boneComponent->vertexWeights;\n        int vertexCount = mesh.vertexCount;\n\n        Vec2F localCursorPos = o2EditorSceneScreen.ScreenToLocalPoint(toolRef->mCursosPos);\n\n        for (int i = 0; i < vertexCount; i++)\n        {\n            auto& v = vertices[i];\n            bool isInsideBrush = (Vec2F(v) - localCursorPos).Length() < toolRef->mBrushReadius;\n            if (isInsideBrush)\n            {\n                auto w = vertexWeights.Find([=](const Pair<int, float>& x) { return x.first == i; });\n                if (!w)\n                {\n                    vertexWeights.Add({ i, 0.0f });\n                    w = &vertexWeights.Last();\n                }\n\n                float brushSign = o2Input.IsKeyDown(VK_CONTROL) ? -1.0f : 1.0f;\n\n                w->second = Math::Clamp01(w->second + toolRef->mBrushStrength*brushSign*dt);\n            }\n        }\n\n        vertexWeights.RemoveAll([](const Pair<int, float>& x) { return x.second <= 0.0f; });\n    }\n\n    int MeshWeightsTool::SceneLayer::GetOrder() const\n    {\n        return 0;\n    }\n\n    bool MeshWeightsTool::SceneLayer::IsEnabled() const\n    {\n        return tool.Lock()->isEnabled;\n    }\n\n    const String& MeshWeightsTool::SceneLayer::GetName() const\n    {\n        static String res(\"Weights tool\");\n        return res;\n    }\n\n    const String& MeshWeightsTool::SceneLayer::GetIconName() const\n    {\n        return String::empty;\n    }\n\n    String MeshWeightsTool::MeshWeightsTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_weight_tool.png\";\n    }\n\n    void MeshWeightsTool::MeshWeightsTool::OnEnabled()\n    {\n        o2EditorSceneScreen.AddEditorLayer(sceneLayer);\n        isEnabled = true;\n    }\n\n    void MeshWeightsTool::MeshWeightsTool::OnDisabled()\n    {\n        o2EditorSceneScreen.RemoveEditorLayer(sceneLayer);\n        isEnabled = false;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::MeshWeightsTool, Editor__MeshWeightsTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/MeshWeightsTool.h",
    "content": "#pragma once\n#include \"IEditorTool.h\"\n\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Scene/Components/SkinningMeshBoneComponent.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n\nnamespace Editor\n{\n    // -------------------------\n    // Mesh weights editing tool\n    // -------------------------\n    struct MeshWeightsTool: public IEditTool\n    {\n        // ----------------------\n        // Scene layer for editor\n        // ----------------------\n        struct SceneLayer: public SceneEditorLayer\n        {\n            WeakRef<MeshWeightsTool> tool; // Reference to tool\n\n        public:\n            // Draws editor over scene\n            void DrawScene() override;\n\n            // Draws mesh wire\n            void DrawMeshWire(auto& mesh);\n\n            // Updates editor\n            void Update(float dt) override;\n\n            // Updates brush\n            void UpdateBrush(float dt);\n\n            // Returns order of layer\n            int GetOrder() const override;\n\n            // Returns true if layer is enabled\n            bool IsEnabled() const override;\n\n            // Returns name of layer\n            const String& GetName() const override;\n\n            // Returns icon name of layer\n            const String& GetIconName() const override;\n        };\n\n    public:\n        Ref<SkinningMeshBoneComponent> boneComponent; // Reference to selected bone component\n\n        Ref<SceneLayer> sceneLayer = mmake<SceneLayer>(); // Scene layer for drawing spline\n\n        bool         isEnabled = false; // Is tool enabled now       \n\n    public:\n        // Default constructor\n        explicit MeshWeightsTool(RefCounter* refCounter);\n\n        // Empty copy operator\n        MeshWeightsTool& operator=(const MeshWeightsTool& other) { return *this; }\n\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        IOBJECT(MeshWeightsTool);\n\n    private:\n        Vec2F mCursosPos;            // Current cursor position, used for brush\n        bool  mPressed = false;      // Is brush pressed\n        float mBrushReadius = 50;    // Current brush radius\n        float mBrushStrength = 1.0f; // Strength of brush\n\n        Mesh mWeightsDebugMesh; // Mesh for drawing debug colors of weights\n\n    private:\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::MeshWeightsTool)\n{\n    BASE_CLASS(Editor::IEditTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::MeshWeightsTool)\n{\n    FIELD().PUBLIC().NAME(boneComponent);\n    FIELD().PUBLIC().DEFAULT_VALUE(mmake<SceneLayer>()).NAME(sceneLayer);\n    FIELD().PUBLIC().DEFAULT_VALUE(false).NAME(isEnabled);\n    FIELD().PRIVATE().NAME(mCursosPos);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mPressed);\n    FIELD().PRIVATE().DEFAULT_VALUE(50).NAME(mBrushReadius);\n    FIELD().PRIVATE().DEFAULT_VALUE(1.0f).NAME(mBrushStrength);\n    FIELD().PRIVATE().NAME(mWeightsDebugMesh);\n}\nEND_META;\nCLASS_METHODS_META(Editor::MeshWeightsTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDisabled);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/MoveTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"MoveTool.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n#include \"o2Editor/Actions/Transform.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\nnamespace Editor\n{\n    MoveTool::MoveTool()\n    {\n        mHorDragHandle = mmake<SceneDragHandle>(mmake<Sprite>(\"ui/UI2_right_move_arrow.png\"),\n                                         mmake<Sprite>(\"ui/UI2_right_move_arrow_select.png\"),\n                                         mmake<Sprite>(\"ui/UI2_right_move_arrow_pressed.png\"));\n\n        mVerDragHandle = mmake<SceneDragHandle>(mmake<Sprite>(\"ui/UI2_up_move_arrow.png\"),\n                                         mmake<Sprite>(\"ui/UI2_up_move_arrow_select.png\"),\n                                         mmake<Sprite>(\"ui/UI2_up_move_arrow_pressed.png\"));\n\n        mBothDragHandle = mmake<SceneDragHandle>(mmake<Sprite>(\"ui/UI2_move_tool_center.png\"),\n                                          mmake<Sprite>(\"ui/UI2_move_tool_center_select.png\"),\n                                          mmake<Sprite>(\"ui/UI2_move_tool_center_pressed.png\"));\n\n        mHorDragHandle->enabled = false;\n        mVerDragHandle->enabled = false;\n        mBothDragHandle->enabled = false;\n\n        mHorDragHandle->onChangedPos = THIS_FUNC(OnHorDragHandleMoved);\n        mVerDragHandle->onChangedPos = THIS_FUNC(OnVerDragHandleMoved);\n        mBothDragHandle->onChangedPos = THIS_FUNC(OnBothDragHandleMoved);\n\n        mHorDragHandle->onPressed = THIS_FUNC(HandlePressed);\n        mVerDragHandle->onPressed = THIS_FUNC(HandlePressed);\n        mBothDragHandle->onPressed = THIS_FUNC(HandlePressed);\n\n        mHorDragHandle->onReleased = THIS_FUNC(HandleReleased);\n        mVerDragHandle->onReleased = THIS_FUNC(HandleReleased);\n        mBothDragHandle->onReleased = THIS_FUNC(HandleReleased);\n\n        mHorDragHandle->GetRegularDrawable()->SetSizePivot(Vec2F(1, 5));\n        mHorDragHandle->GetHoverDrawable()->SetSizePivot(Vec2F(1, 5));\n        mHorDragHandle->GetPressedDrawable()->SetSizePivot(Vec2F(1, 5));\n\n        mVerDragHandle->GetRegularDrawable()->SetSizePivot(Vec2F(5, 1));\n        mVerDragHandle->GetHoverDrawable()->SetSizePivot(Vec2F(5, 1));\n        mVerDragHandle->GetPressedDrawable()->SetSizePivot(Vec2F(5, 1));\n\n        mBothDragHandle->GetRegularDrawable()->SetSizePivot(Vec2F(1, 1));\n        mBothDragHandle->GetHoverDrawable()->SetSizePivot(Vec2F(1, 1));\n        mBothDragHandle->GetPressedDrawable()->SetSizePivot(Vec2F(1, 1));\n    }\n\n    MoveTool::~MoveTool()\n    {}\n\n    void MoveTool::Update(float dt)\n    {}\n\n    void MoveTool::OnEnabled()\n    {\n        mHorDragHandle->enabled = true;\n        mVerDragHandle->enabled = true;\n        mBothDragHandle->enabled = true;\n        UpdateHandlesPosition();\n    }\n\n    void MoveTool::OnDisabled()\n    {\n        mHorDragHandle->enabled = false;\n        mVerDragHandle->enabled = false;\n        mBothDragHandle->enabled = false;\n    }\n\n    void MoveTool::OnSceneChanged(const Vector<Ref<SceneEditableObject>>& changedObjects)\n    {\n        UpdateHandlesPosition();\n    }\n\n    void MoveTool::OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        UpdateHandlesPosition();\n    }\n\n    void MoveTool::OnHorDragHandleMoved(const Vec2F& position)\n    {\n        Vec2F axis = Vec2F::Rotated(mHandlesAngle);\n        Vec2F delta = position - mLastSceneHandlesPos;\n        Vec2F axisDelta = delta.Project(axis);\n\n        HandlesMoved(axisDelta, o2Input.IsKeyDown(VK_SHIFT), false);\n    }\n\n    void MoveTool::OnVerDragHandleMoved(const Vec2F& position)\n    {\n        Vec2F axis = Vec2F::Rotated(mHandlesAngle + Math::PI()*0.5f);\n        Vec2F delta = position - mLastSceneHandlesPos;\n        Vec2F axisDelta = delta.Project(axis);\n\n        HandlesMoved(axisDelta, false, o2Input.IsKeyDown(VK_SHIFT));\n    }\n\n    void MoveTool::OnBothDragHandleMoved(const Vec2F& position)\n    {\n        bool snap = o2Input.IsKeyDown(VK_SHIFT);\n        HandlesMoved(position - mLastSceneHandlesPos, snap, snap);\n    }\n\n    void MoveTool::HandlePressed()\n    {\n        mBeforeTransforms = o2EditorSceneScreen.GetTopSelectedObjects().Convert<Basis>(\n            [](auto& x) { return x->GetTransform(); });\n\n        mTransformAction = mmake<TransformAction>(o2EditorSceneScreen.GetTopSelectedObjects());\n\n        onTransformBegin();\n    }\n\n    void MoveTool::HandleReleased()\n    {\n        mTransformAction->Completed();\n        o2EditorSceneWindow.DoneAction(mTransformAction);\n        mTransformAction = nullptr;\n\n        onTransformEnd();\n    }\n\n    void MoveTool::HandlesMoved(const Vec2F& delta, bool snapHor /*= false*/, bool spanVer /*= false*/)\n    {\n        if (spanVer || snapHor)\n        {\n            mSnapPosition = mLastSceneHandlesPos + delta;\n            Vec2F roundedSnap(snapHor ? Math::Round(mSnapPosition.x / snapStep)*snapStep : mSnapPosition.x,\n                              spanVer ? Math::Round(mSnapPosition.y / snapStep)*snapStep : mSnapPosition.y);\n\n            if ((roundedSnap - mLastSceneHandlesPos).Length() > FLT_EPSILON)\n            {\n                Vec2F roundDelta = roundedSnap - mLastSceneHandlesPos;\n                mLastSceneHandlesPos = roundedSnap;\n                MoveSelectedObjects(roundDelta);\n            }\n\n            mHorDragHandle->position = mLastSceneHandlesPos;\n            mVerDragHandle->position = mLastSceneHandlesPos;\n            mBothDragHandle->position = mLastSceneHandlesPos;\n        }\n        else\n        {\n            Vec2F newHandlesPos = mLastSceneHandlesPos + delta;\n            mLastSceneHandlesPos = newHandlesPos;\n            mHorDragHandle->position = newHandlesPos;\n            mVerDragHandle->position = newHandlesPos;\n            mBothDragHandle->position = newHandlesPos;\n\n            MoveSelectedObjects(delta);\n        }\n    }\n\n    void MoveTool::UpdateHandlesPosition()\n    {\n        auto selectedObjects = o2EditorSceneScreen.GetSelectedObjects();\n        mLastSceneHandlesPos =\n            selectedObjects.Sum<Vec2F>([](auto x) { return x->GetPivot(); }) /\n            (float)selectedObjects.Count();\n\n        mVerDragHandle->position = mLastSceneHandlesPos;\n        mHorDragHandle->position = mLastSceneHandlesPos;\n        mBothDragHandle->position = mLastSceneHandlesPos;\n\n        if (selectedObjects.Count() > 0 && !o2Input.IsKeyDown(VK_CONTROL))\n        {\n            auto lastSelectedObject = selectedObjects.Last();\n            mHandlesAngle = -lastSelectedObject->GetTransform().xv.Normalized().Angle(Vec2F::Right());\n\n            mVerDragHandle->angle = mHandlesAngle;\n            mHorDragHandle->angle = mHandlesAngle;\n            mBothDragHandle->angle = mHandlesAngle;\n        }\n        else\n        {\n            mHandlesAngle = 0.0f;\n            mVerDragHandle->angle = mHandlesAngle;\n            mHorDragHandle->angle = mHandlesAngle;\n            mBothDragHandle->angle = mHandlesAngle;\n        }\n    }\n\n    void MoveTool::OnKeyPressed(const Input::Key& key)\n    {\n        if (!o2EditorSceneWindow.IsFocused())\n            return;\n\n        float delta = o2Input.IsKeyDown(VK_SHIFT) ? snapStep : 1.0f;\n\n        if (key == VK_LEFT)\n            MoveSelectedObjectsWithAction(Vec2F::Left()*delta);\n\n        if (key == VK_RIGHT)\n            MoveSelectedObjectsWithAction(Vec2F::Right()*delta);\n\n        if (key == VK_UP)\n            MoveSelectedObjectsWithAction(Vec2F::Up()*delta);\n\n        if (key == VK_DOWN)\n            MoveSelectedObjectsWithAction(Vec2F::Down()*delta);\n\n        if (key == VK_CONTROL)\n        {\n            mHandlesAngle = 0.0f;\n            mVerDragHandle->angle = mHandlesAngle;\n            mHorDragHandle->angle = mHandlesAngle;\n            mBothDragHandle->angle = mHandlesAngle;\n        }\n\n        SelectionTool::OnKeyPressed(key);\n    }\n\n    void MoveTool::OnKeyStayDown(const Input::Key& key)\n    {\n        if (!o2EditorSceneWindow.IsFocused())\n            return;\n\n        float delta = o2Input.IsKeyDown(VK_SHIFT) ? snapStep : 1.0f;\n\n        if (key.pressedTime < 0.3f)\n            return;\n\n        if (key == VK_LEFT)\n            MoveSelectedObjectsWithAction(Vec2F::Left()*delta);\n\n        if (key == VK_RIGHT)\n            MoveSelectedObjectsWithAction(Vec2F::Right()*delta);\n\n        if (key == VK_UP)\n            MoveSelectedObjectsWithAction(Vec2F::Up()*delta);\n\n        if (key == VK_DOWN)\n            MoveSelectedObjectsWithAction(Vec2F::Down()*delta);\n    }\n\n    void MoveTool::OnKeyReleased(const Input::Key& key)\n    {\n        if (key == VK_CONTROL)\n        {\n            auto selectedObjects = o2EditorSceneScreen.GetSelectedObjects();\n            if (selectedObjects.Count() > 0)\n            {\n                auto lastSelectedObject = selectedObjects.Last();\n                mHandlesAngle = -lastSelectedObject->GetTransform().xv.Normalized().Angle(Vec2F::Right());\n\n                mVerDragHandle->angle = mHandlesAngle;\n                mHorDragHandle->angle = mHandlesAngle;\n                mBothDragHandle->angle = mHandlesAngle;\n            }\n        }\n    }\n\n    void MoveTool::MoveSelectedObjects(const Vec2F& delta)\n    {\n        auto selectedObjects = o2EditorSceneScreen.GetTopSelectedObjects();\n        for (auto& object : selectedObjects)\n        {\n            Basis basis = object->GetTransform();\n            basis.origin += delta;\n            object->SetTransform(basis);\n            object->UpdateTransform();\n        }\n\n        UpdateHandlesPosition();\n    }\n\n    void MoveTool::MoveSelectedObjectsWithAction(const Vec2F& delta)\n    {\n        mBeforeTransforms = o2EditorSceneScreen.GetTopSelectedObjects().Convert<Basis>(\n            [](auto& x) { return x->GetTransform(); });\n\n        mTransformAction = mmake<TransformAction>(o2EditorSceneScreen.GetTopSelectedObjects());\n\n        MoveSelectedObjects(delta);\n\n        mTransformAction->Completed();\n        o2EditorSceneWindow.DoneAction(mTransformAction);\n        mTransformAction = nullptr;\n    }\n\n    String MoveTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_move_tool.png\";\n    }\n\n    ShortcutKeys MoveTool::GetShortcut() const\n    {\n        return ShortcutKeys({ VK_W });\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::MoveTool, Editor__MoveTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/MoveTool.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2Editor/Tools/ITransformTool.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneDragHandle.h\"\n\nnamespace o2\n{\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(TransformAction); \n\n    // ------------------------\n    // Move objects editor tool\n    // ------------------------\n    class MoveTool: public ITransformTool\n    {\n    public:\n        float snapStep = 10.0f; // Moving snap step\n\n    public:\n        // Default constructor\n        MoveTool();\n\n        // Destructor\n        ~MoveTool();\n\n        IOBJECT(MoveTool);\n\n    protected:\n        Ref<SceneDragHandle> mHorDragHandle;  // Horizontal arrow handle\n        Ref<SceneDragHandle> mVerDragHandle;  // Vertical arrow handle\n        Ref<SceneDragHandle> mBothDragHandle; // Both arrow handle\n                         \n        Vec2F mLastSceneHandlesPos; // Last scene handles position \n        Vec2F mSnapPosition;        // Snapping handles position\n        float mHandlesAngle = 0.0f; // Handles angle, in radians\n                         \n        Vector<Basis>       mBeforeTransforms; // Before transformation transforms\n        Ref<TransformAction> mTransformAction; // Current transform action. Creates when transform started\n\n    protected:\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Returns shortcut keys for toggle\n        ShortcutKeys GetShortcut() const override;\n\n        // Updates tool\n        void Update(float dt) override;\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        // Called when scene objects was changed\n        void OnSceneChanged(const Vector<Ref<SceneEditableObject>>& changedObjects) override;\n\n        // Called when objects selection was changed\n        void OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects) override;\n\n        // Called when horizontal drag handle was moved\n        void OnHorDragHandleMoved(const Vec2F& position);\n\n        // Called when horizontal drag handle was moved\n        void OnVerDragHandleMoved(const Vec2F& position);\n\n        // Called when horizontal drag handle was moved\n        void OnBothDragHandleMoved(const Vec2F& position);\n\n        // Called when some handle was pressed, stores before transformations\n        void HandlePressed();\n\n        // Called when handle was released, completes transformation action\n        void HandleReleased();\n\n        // Handles moved\n        void HandlesMoved(const Vec2F& delta, bool snapHor = false, bool spanVer = false);\n\n        // Updates handles position\n        void UpdateHandlesPosition();\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when key stay down during frame\n        void OnKeyStayDown(const Input::Key& key) override;\n\n        // Called when key was pressed\n        void OnKeyReleased(const Input::Key& key) override;\n\n        // Moves selected objects on delta\n        void MoveSelectedObjects(const Vec2F& delta);\n\n        // Moves selected objects on delta\n        void MoveSelectedObjectsWithAction(const Vec2F& delta);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::MoveTool)\n{\n    BASE_CLASS(Editor::ITransformTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::MoveTool)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(10.0f).NAME(snapStep);\n    FIELD().PROTECTED().NAME(mHorDragHandle);\n    FIELD().PROTECTED().NAME(mVerDragHandle);\n    FIELD().PROTECTED().NAME(mBothDragHandle);\n    FIELD().PROTECTED().NAME(mLastSceneHandlesPos);\n    FIELD().PROTECTED().NAME(mSnapPosition);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mHandlesAngle);\n    FIELD().PROTECTED().NAME(mBeforeTransforms);\n    FIELD().PROTECTED().NAME(mTransformAction);\n}\nEND_META;\nCLASS_METHODS_META(Editor::MoveTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PROTECTED().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PROTECTED().SIGNATURE(ShortcutKeys, GetShortcut);\n    FUNCTION().PROTECTED().SIGNATURE(void, Update, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSceneChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectsSelectionChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHorDragHandleMoved, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnVerDragHandleMoved, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnBothDragHandleMoved, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, HandlePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, HandleReleased);\n    FUNCTION().PROTECTED().SIGNATURE(void, HandlesMoved, const Vec2F&, bool, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHandlesPosition);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyStayDown, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveSelectedObjects, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveSelectedObjectsWithAction, const Vec2F&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/RotateTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"RotateTool.h\"\n\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n#include \"o2Editor/Actions/Transform.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\nnamespace Editor\n{\n    RotateTool::RotateTool()\n    {\n        mPivotDragHandle = mmake<SceneDragHandle>(mmake<Sprite>(\"ui/UI2_pivot.png\"),\n                                                  mmake<Sprite>(\"ui/UI2_pivot_select.png\"),\n                                                  mmake<Sprite>(\"ui/UI2_pivot_pressed.png\"));\n\n        mRotateRingFillMesh = mmake<Mesh>(TextureRef::Null(), mRotateRingSegs * 4, mRotateRingSegs * 2);\n        mAngleMesh = mmake<Mesh>(TextureRef::Null(), mRotateRingSegs * 4, mRotateRingSegs * 2);\n\n        mPivotDragHandle->onChangedPos += THIS_FUNC(OnPivotDragHandleMoved);\n        mPivotDragHandle->enabled = false;\n    }\n\n    RotateTool::~RotateTool()\n    {}\n\n    String RotateTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_rotate_tool.png\";\n    }\n\n    ShortcutKeys RotateTool::GetShortcut() const\n    {\n        return ShortcutKeys({ VK_E });\n    }\n\n    void RotateTool::Update(float dt)\n    {}\n\n    void RotateTool::DrawScreen()\n    {\n        if (o2EditorSceneScreen.GetSelectedObjects().Count() > 0)\n        {\n            UpdateMeshes();\n            mRotateRingFillMesh->Draw();\n            if (mRingPressed)\n                mAngleMesh->Draw();\n\n            Vec2F screenPos = o2EditorSceneScreen.SceneToScreenPoint(mScenePivot);\n            o2Render.DrawAACircle(screenPos, mRotateRingInsideRadius, mRotateRingsColor, mRotateRingSegs);\n            o2Render.DrawAACircle(screenPos, mRotateRingOutsideRadius, mRotateRingsColor, mRotateRingSegs);\n        }\n\n        SelectionTool::DrawScreen();\n    }\n\n    void RotateTool::OnEnabled()\n    {\n        CalcPivotByObjectsCenter();\n        mPivotDragHandle->enabled = true;\n    }\n\n    void RotateTool::OnDisabled()\n    {\n        mPivotDragHandle->enabled = false;\n    }\n\n    void RotateTool::OnSceneChanged(const Vector<Ref<SceneEditableObject>>& changedObjects)\n    {}\n\n    void RotateTool::OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        CalcPivotByObjectsCenter();\n    }\n\n    void RotateTool::UpdateMeshes()\n    {\n        Vec2F screenPos = o2EditorSceneScreen.SceneToScreenPoint(mScenePivot);\n\n        Color4 fillColor = mRotateRingsFillColor;\n        Color4 fillColor2 = mRotateRingsFillColor2;\n\n        const float selectionAlphaCoef = 1.2f;\n        const float pressingAlphaCoef = 0.5f;\n\n        if (mRingPressed)\n        {\n            fillColor.a = (int)((float)fillColor.a*pressingAlphaCoef);\n            fillColor2.a = (int)((float)fillColor2.a*pressingAlphaCoef);\n        }\n        else if (IsPointInRotateRing(o2Input.GetCursorPos()))\n        {\n            fillColor.a = (int)((float)fillColor.a*selectionAlphaCoef);\n            fillColor2.a = (int)((float)fillColor2.a*selectionAlphaCoef);\n        }\n\n        ULong fillColorUL = fillColor.ARGB();\n        ULong fillColorUL2 = fillColor2.ARGB();\n        mRotateRingFillMesh->vertexCount = mRotateRingSegs * 4;\n        mRotateRingFillMesh->polyCount = mRotateRingSegs * 2;\n        float segAngle = 2.0f*Math::PI() / (float)mRotateRingSegs;\n\n        Vertex* fillVerts = mRotateRingFillMesh->GetVertices<Vertex>();\n        VertexIndex* fillIdx = mRotateRingFillMesh->GetIndexes();\n        float angle = 0.0f;\n        int i = 0;\n        while (angle < 2.0f*Math::PI())\n        {\n            float angleNext = angle + segAngle;\n\n            Vec2F pinside = Vec2F::Rotated(angle)*mRotateRingInsideRadius + screenPos;\n            Vec2F poutside = Vec2F::Rotated(angle)*mRotateRingOutsideRadius + screenPos;\n            Vec2F pinsideNext = Vec2F::Rotated(angleNext)*mRotateRingInsideRadius + screenPos;\n            Vec2F poutsideNext = Vec2F::Rotated(angleNext)*mRotateRingOutsideRadius + screenPos;\n\n            int vi = i * 4;\n            int pi = i * 6;\n            i++;\n\n            ULong currFillColor = fillColorUL;\n            if (angle < Math::PI()*0.5f || (angle >= Math::PI() - FLT_EPSILON && angle <= Math::PI()*1.5f + FLT_EPSILON))\n                currFillColor = fillColorUL2;\n\n            fillVerts[vi] = Vertex(pinside, currFillColor, 0.0f, 0.0f);\n            fillVerts[vi + 1] = Vertex(poutside, currFillColor, 0.0f, 0.0f);\n            fillVerts[vi + 2] = Vertex(pinsideNext, currFillColor, 0.0f, 0.0f);\n            fillVerts[vi + 3] = Vertex(poutsideNext, currFillColor, 0.0f, 0.0f);\n\n            fillIdx[pi] = vi;\n            fillIdx[pi + 1] = vi + 1;\n            fillIdx[pi + 2] = vi + 3;\n\n            fillIdx[pi + 3] = vi;\n            fillIdx[pi + 4] = vi + 3;\n            fillIdx[pi + 5] = vi + 2;\n\n            angle = angleNext;\n        }\n\n        mAngleMesh->vertexCount = 0;\n        mAngleMesh->polyCount = 0;\n\n        if (!mRingPressed)\n            return;\n\n        angle = mPressAngle;\n        i = 0;\n        float direction = Math::Sign(mCurrentRotateAngle - mPressAngle);\n        ULong angleRingColor = direction > 0.0f ? mRotateMeshClockwiseColor.ABGR() : mRotateMeshCClockwiseColor.ABGR();\n        int reqAngleMeshSegs = Math::CeilToInt(Math::Abs(mCurrentRotateAngle - mPressAngle) / segAngle) + 1;\n        mAngleMesh->Resize(reqAngleMeshSegs * 4, reqAngleMeshSegs * 2);\n        Vertex* angleVerts = mAngleMesh->GetVertices<Vertex>();\n        VertexIndex* angleIdx = mAngleMesh->GetIndexes();\n        while (direction > 0.0f ? angle < mCurrentRotateAngle : angle > mCurrentRotateAngle)\n        {\n            float angleNext = angle + segAngle*direction;\n            if (direction > 0.0f ? angleNext > mCurrentRotateAngle : angleNext < mCurrentRotateAngle)\n                angleNext = mCurrentRotateAngle;\n\n            Vec2F pinside = Vec2F::Rotated(-angle)*mRotateRingInsideRadius + screenPos;\n            Vec2F poutside = Vec2F::Rotated(-angle)*mRotateRingOutsideRadius + screenPos;\n            Vec2F pinsideNext = Vec2F::Rotated(-angleNext)*mRotateRingInsideRadius + screenPos;\n            Vec2F poutsideNext = Vec2F::Rotated(-angleNext)*mRotateRingOutsideRadius + screenPos;\n\n            int vi = i * 4;\n            int pi = i * 6;\n            i++;\n\n            angleVerts[vi] = Vertex(pinside, angleRingColor, 0.0f, 0.0f);\n            angleVerts[vi + 1] = Vertex(poutside, angleRingColor, 0.0f, 0.0f);\n            angleVerts[vi + 2] = Vertex(pinsideNext, angleRingColor, 0.0f, 0.0f);\n            angleVerts[vi + 3] = Vertex(poutsideNext, angleRingColor, 0.0f, 0.0f);\n\n            angleIdx[pi] = vi;\n            angleIdx[pi + 1] = vi + 1;\n            angleIdx[pi + 2] = vi + 3;\n\n            angleIdx[pi + 3] = vi;\n            angleIdx[pi + 4] = vi + 3;\n            angleIdx[pi + 5] = vi + 2;\n\n            mAngleMesh->vertexCount = i * 4;\n            mAngleMesh->polyCount = i * 2;\n\n            angle = angleNext;\n        }\n    }\n\n    void RotateTool::CalcPivotByObjectsCenter()\n    {\n        auto selectedObjects = o2EditorSceneScreen.GetSelectedObjects();\n        mScenePivot =\n            selectedObjects.Sum<Vec2F>([](auto x) { return x->GetPivot(); }) /\n            (float)selectedObjects.Count();\n\n        mPivotDragHandle->position = mScenePivot;\n    }\n\n    void RotateTool::OnPivotDragHandleMoved(const Vec2F& position)\n    {\n        mScenePivot = position;\n    }\n\n    bool RotateTool::IsPointInRotateRing(const Vec2F& point) const\n    {\n        float pivotDist = (o2EditorSceneScreen.SceneToScreenPoint(mScenePivot) - point).Length();\n\n        return pivotDist > mRotateRingInsideRadius && pivotDist < mRotateRingOutsideRadius;\n    }\n\n    void RotateTool::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        if (IsPointInRotateRing(cursor.position))\n        {\n            mRingPressed = true;\n            Vec2F cursorInScene = o2EditorSceneScreen.ScreenToScenePoint(cursor.position);\n            mPressAngle = Vec2F::Angle(cursorInScene - mScenePivot, Vec2F::Right());\n            mCurrentRotateAngle = mPressAngle;\n            mSnapAngleAccumulated = 0.0f;\n\n            mBeforeTransforms = o2EditorSceneScreen.GetTopSelectedObjects().Convert<Basis>(\n                [](auto& x) { return x->GetTransform(); });\n\n            mTransformAction = mmake<TransformAction>(o2EditorSceneScreen.GetTopSelectedObjects());\n\n            onTransformBegin();\n        }\n        else \n            SelectionTool::OnCursorPressed(cursor);\n    }\n\n    void RotateTool::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (mRingPressed)\n        {\n            mRingPressed = false;\n\n            mTransformAction->Completed();\n            o2EditorSceneWindow.DoneAction(mTransformAction);\n            mTransformAction = nullptr;\n\n            onTransformEnd();\n        }\n        else \n            SelectionTool::OnCursorReleased(cursor);\n    }\n\n    void RotateTool::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        if (mRingPressed)\n        {\n            mRingPressed = false;\n\n            mTransformAction->Completed();\n            o2EditorSceneWindow.DoneAction(mTransformAction);\n            mTransformAction = nullptr;\n\n            onTransformEnd();\n        }\n        else \n            SelectionTool::OnCursorPressBreak(cursor);\n    }\n\n    void RotateTool::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (!o2EditorSceneWindow.IsFocused())\n            return;\n\n        if (mRingPressed)\n        {\n            if (cursor.delta != Vec2F())\n            {\n                Vec2F cursorInScene = o2EditorSceneScreen.ScreenToScenePoint(cursor.position);\n                Vec2F lastCursorInScene = o2EditorSceneScreen.ScreenToScenePoint(cursor.position - cursor.delta);\n                float angleDelta = Vec2F::SignedAngle(cursorInScene - mScenePivot, lastCursorInScene - mScenePivot);\n\n                if (o2Input.IsKeyDown(VK_SHIFT))\n                {\n                    float angleStepRad = Math::Deg2rad(angleSnapStep);\n                    mSnapAngleAccumulated += angleDelta;\n                    float dir = Math::Sign(mSnapAngleAccumulated);\n\n                    while (mSnapAngleAccumulated*dir > angleStepRad)\n                    {\n                        mSnapAngleAccumulated -= dir*angleStepRad;\n\n                        if (o2Input.IsKeyDown(VK_CONTROL)) \n                            RotateObjectsSeparated(angleStepRad*dir);\n                        else \n                            RotateObjects(angleStepRad*dir);\n                    }\n                }\n                else\n                {\n                    if (o2Input.IsKeyDown(VK_CONTROL)) \n                        RotateObjectsSeparated(angleDelta);\n                    else \n                        RotateObjects(angleDelta);\n                }\n\n                mCurrentRotateAngle += angleDelta;\n            }\n        }\n        else \n            SelectionTool::OnCursorStillDown(cursor);\n    }\n\n    void RotateTool::OnKeyPressed(const Input::Key& key)\n    {\n        if (!o2EditorSceneWindow.IsFocused())\n            return;\n\n        float angle = o2Input.IsKeyDown(VK_SHIFT) ? angleSnapStep : 1.0f;\n\n        if (key == VK_LEFT || key == VK_DOWN)\n        {\n            if (o2Input.IsKeyDown(VK_CONTROL)) \n                RotateObjectsSeparatedWithAction(Math::Deg2rad(-angle));\n            else \n                RotateObjectsWithAction(Math::Deg2rad(-angle));\n        }\n\n        if (key == VK_RIGHT || key == VK_UP)\n        {\n            if (o2Input.IsKeyDown(VK_CONTROL)) \n                RotateObjectsSeparatedWithAction(Math::Deg2rad(-angle));\n            else \n                RotateObjectsWithAction(Math::Deg2rad(angle));\n        }\n\n        SelectionTool::OnKeyPressed(key);\n    }\n\n    void RotateTool::OnKeyStayDown(const Input::Key& key)\n    {\n        if (key.pressedTime < 0.3f)\n            return;\n\n        float angle = o2Input.IsKeyDown(VK_SHIFT) ? angleSnapStep : 1.0f;\n\n        if (key == VK_LEFT || key == VK_DOWN)\n        {\n            if (o2Input.IsKeyDown(VK_CONTROL)) \n                RotateObjectsSeparatedWithAction(Math::Deg2rad(-angle));\n            else \n                RotateObjectsWithAction(Math::Deg2rad(-angle));\n        }\n\n        if (key == VK_RIGHT || key == VK_UP)\n        {\n            if (o2Input.IsKeyDown(VK_CONTROL)) \n                RotateObjectsSeparatedWithAction(Math::Deg2rad(-angle));\n            else \n                RotateObjectsWithAction(Math::Deg2rad(angle));\n        }\n    }\n\n    void RotateTool::RotateObjects(float angleDelta)\n    {\n        Basis transform = Basis::Translated(mScenePivot*-1.0f)*Basis::Rotated(-angleDelta)*Basis::Translated(mScenePivot);\n        for (auto& object : o2EditorSceneScreen.GetTopSelectedObjects())\n        {\n            object->SetTransform(object->GetTransform()*transform);\n            object->UpdateTransform();\n        }\n    }\n\n    void RotateTool::RotateObjectsSeparated(float angleDelta)\n    {\n        Basis transform = Basis::Rotated(-angleDelta);\n        for (auto& object : o2EditorSceneScreen.GetTopSelectedObjects())\n        {\n            object->SetTransform(object->GetTransform()*transform);\n            object->UpdateTransform();\n        }\n    }\n\n    void RotateTool::RotateObjectsWithAction(float angleDelta)\n    {\n        mBeforeTransforms = o2EditorSceneScreen.GetTopSelectedObjects().Convert<Basis>(\n            [](auto& x) { return x->GetTransform(); });\n\n        mTransformAction = mmake<TransformAction>(o2EditorSceneScreen.GetTopSelectedObjects());\n\n        RotateObjects(angleDelta);\n\n        mTransformAction->Completed();\n        o2EditorSceneWindow.DoneAction(mTransformAction);\n        mTransformAction = nullptr;\n    }\n\n    void RotateTool::RotateObjectsSeparatedWithAction(float angleDelta)\n    {\n        mBeforeTransforms = o2EditorSceneScreen.GetTopSelectedObjects().Convert<Basis>(\n            [](auto& x) { return x->GetTransform(); });\n\n        mTransformAction = mmake<TransformAction>(o2EditorSceneScreen.GetTopSelectedObjects());\n\n        RotateObjectsSeparated(angleDelta);\n\n        mTransformAction->Completed();\n        o2EditorSceneWindow.DoneAction(mTransformAction);\n        mTransformAction = nullptr;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::RotateTool, Editor__RotateTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/RotateTool.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2Editor/Tools/ITransformTool.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneDragHandle.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Mesh;\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(TransformAction);\n\n    // -------------------\n    // Rotate objects tool\n    // -------------------\n    class RotateTool: public ITransformTool\n    {\n    public:\n        float angleSnapStep = 15.0f; // Rotation angle step in degree\n\n    public:\n        // Default constructor\n        RotateTool();\n\n        // Copy-operator\n        RotateTool& operator=(const RotateTool& other) { return *this; }\n\n        // Destructor\n        ~RotateTool();\n\n        IOBJECT(RotateTool);\n\n    protected:\n        const float  mRotateRingInsideRadius = 60;                            // Rotate ring inside radius in pixels\n        const float  mRotateRingOutsideRadius = 100;                        // Rotate ring outside radius in pixels\n        const int    mRotateRingSegs = 50;                                    // Rotate ring segments\n        const Color4 mRotateRingsColor = Color4(220, 220, 220, 255);        // Rotate ring border color\n        const Color4 mRotateRingsFillColor = Color4(220, 220, 220, 50);        // Rotate ring color 1\n        const Color4 mRotateRingsFillColor2 = Color4(220, 220, 220, 100);   // Rotate ring color 2\n        const Color4 mRotateMeshClockwiseColor = Color4(211, 87, 40, 100);  // Rotate angle clockwise rotation color\n        const Color4 mRotateMeshCClockwiseColor = Color4(87, 211, 40, 100); // Rotate angle counter clockwise rotation color\n                         \n        Ref<Mesh> mRotateRingFillMesh; // Rotate ring mesh\n        Ref<Mesh> mAngleMesh;          // Rotation angle mesh\n        Vec2F     mScenePivot;           // Rotation pivot in scene space\n                                                        \n        Ref<SceneDragHandle> mPivotDragHandle; // Pivot drag handle\n\n        float mPressAngle;                   // Angle at cursor pressing\n        float mCurrentRotateAngle;           // Current rotation angle\n        bool  mRingPressed = false;           // Is rotate ring was pressed\n        float mSnapAngleAccumulated = 0.0f; // Snapping angle accumulated\n                         \n        Vector<Basis>        mBeforeTransforms; // Array of objects' transformations before changing\n        Ref<TransformAction> mTransformAction;  // Current transform action. Creates when transform started\n\n    public:\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Returns shortcut keys for toggle\n        ShortcutKeys GetShortcut() const override;\n\n        // Updates tool\n        void Update(float dt) override;\n\n        // Draws tool\n        void DrawScreen() override;\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        // Called when scene objects was changed\n        void OnSceneChanged(const Vector<Ref<SceneEditableObject>>& changedObjects) override;\n\n        // Called when objects selection was changed\n        void OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects) override;\n\n        // Updates ring and angle meshes\n        void UpdateMeshes();\n\n        // Calculates rotate pivot in objects center\n        void CalcPivotByObjectsCenter();\n\n        // Called when pivot handle moved\n        void OnPivotDragHandleMoved(const Vec2F& position);\n\n        // Returns is point inside rotate ring\n        bool IsPointInRotateRing(const Vec2F& point) const;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when key stay down during frame\n        void OnKeyStayDown(const Input::Key& key) override;\n\n        // Rotates objects on angle\n        void RotateObjects(float angleDelta);\n\n        // Rotates objects on angle separated\n        void RotateObjectsSeparated(float angleDelta);\n\n        // Rotates objects on angle\n        void RotateObjectsWithAction(float angleDelta);\n\n        // Rotates objects on angle separated\n        void RotateObjectsSeparatedWithAction(float angleDelta);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::RotateTool)\n{\n    BASE_CLASS(Editor::ITransformTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::RotateTool)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(15.0f).NAME(angleSnapStep);\n    FIELD().PROTECTED().DEFAULT_VALUE(60).NAME(mRotateRingInsideRadius);\n    FIELD().PROTECTED().DEFAULT_VALUE(100).NAME(mRotateRingOutsideRadius);\n    FIELD().PROTECTED().DEFAULT_VALUE(50).NAME(mRotateRingSegs);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(220, 220, 220, 255)).NAME(mRotateRingsColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(220, 220, 220, 50)).NAME(mRotateRingsFillColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(220, 220, 220, 100)).NAME(mRotateRingsFillColor2);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(211, 87, 40, 100)).NAME(mRotateMeshClockwiseColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(87, 211, 40, 100)).NAME(mRotateMeshCClockwiseColor);\n    FIELD().PROTECTED().NAME(mRotateRingFillMesh);\n    FIELD().PROTECTED().NAME(mAngleMesh);\n    FIELD().PROTECTED().NAME(mScenePivot);\n    FIELD().PROTECTED().NAME(mPivotDragHandle);\n    FIELD().PROTECTED().NAME(mPressAngle);\n    FIELD().PROTECTED().NAME(mCurrentRotateAngle);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mRingPressed);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mSnapAngleAccumulated);\n    FIELD().PROTECTED().NAME(mBeforeTransforms);\n    FIELD().PROTECTED().NAME(mTransformAction);\n}\nEND_META;\nCLASS_METHODS_META(Editor::RotateTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PUBLIC().SIGNATURE(ShortcutKeys, GetShortcut);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, DrawScreen);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDisabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnSceneChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnObjectsSelectionChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateMeshes);\n    FUNCTION().PUBLIC().SIGNATURE(void, CalcPivotByObjectsCenter);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnPivotDragHandleMoved, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPointInRotateRing, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnKeyStayDown, const Input::Key&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RotateObjects, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, RotateObjectsSeparated, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, RotateObjectsWithAction, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, RotateObjectsSeparatedWithAction, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/ScaleTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ScaleTool.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n#include \"o2Editor/Actions/Transform.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\nnamespace Editor\n{\n    ScaleTool::ScaleTool()\n    {\n        mHorDragHandle = mmake<SceneDragHandle>(mmake<Sprite>(\"ui/UI2_right_scale_arrow.png\"),\n                                                mmake<Sprite>(\"ui/UI2_right_scale_arrow_select.png\"),\n                                                mmake<Sprite>(\"ui/UI2_right_scale_arrow_pressed.png\"));\n\n        mVerDragHandle = mmake<SceneDragHandle>(mmake<Sprite>(\"ui/UI2_up_scale_arrow.png\"),\n                                                mmake<Sprite>(\"ui/UI2_up_scale_arrow_select.png\"),\n                                                mmake<Sprite>(\"ui/UI2_up_scale_arrow_pressed.png\"));\n\n        mBothDragHandle = mmake<SceneDragHandle>(mmake<Sprite>(\"ui/UI2_scale_both.png\"),\n                                                 mmake<Sprite>(\"ui/UI2_scale_both_select.png\"),\n                                                 mmake<Sprite>(\"ui/UI2_scale_both_pressed.png\"));\n\n        mHorDragHandle->enabled = false;\n        mVerDragHandle->enabled = false;\n        mBothDragHandle->enabled = false;\n\n        mHorDragHandle->onChangedPos = THIS_FUNC(OnHorDragHandleMoved);\n        mVerDragHandle->onChangedPos = THIS_FUNC(OnVerDragHandleMoved);\n        mBothDragHandle->onChangedPos = THIS_FUNC(OnBothDragHandleMoved);\n\n        mHorDragHandle->onPressed = THIS_FUNC(HandlePressed);\n        mVerDragHandle->onPressed = THIS_FUNC(HandlePressed);\n        mBothDragHandle->onPressed = THIS_FUNC(HandlePressed);\n\n        mHorDragHandle->onReleased = THIS_FUNC(UpdateHandlesPosition);\n        mVerDragHandle->onReleased = THIS_FUNC(UpdateHandlesPosition);\n\n        mHorDragHandle->onReleased += THIS_FUNC(HandleReleased);\n        mVerDragHandle->onReleased += THIS_FUNC(HandleReleased);\n        mBothDragHandle->onReleased += THIS_FUNC(HandleReleased);\n    }\n\n    ScaleTool::~ScaleTool()\n    {}\n\n    String ScaleTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_scale_tool.png\";\n    }\n\n    ShortcutKeys ScaleTool::GetShortcut() const\n    {\n        return ShortcutKeys({VK_R});\n    }\n\n    void ScaleTool::Update(float dt)\n    {}\n\n    void ScaleTool::DrawScreen()\n    {\n        SelectionTool::DrawScreen();\n\n        if (!mHorDragHandle->IsPressed() && !mVerDragHandle->IsPressed() && !mBothDragHandle->IsPressed())\n            UpdateHandlesPositions();\n\n        Vec2F screenHandlesPos = o2EditorSceneScreen.SceneToScreenPoint(mSceneHandlesPos);\n        Vec2F screenHorHandlePos = o2EditorSceneScreen.SceneToScreenPoint(mHorDragHandle->GetPosition());\n        Vec2F screenVerHandlePos = o2EditorSceneScreen.SceneToScreenPoint(mVerDragHandle->GetPosition());\n        o2Render.DrawAALine(screenHandlesPos, screenHorHandlePos, Color4::Green());\n        o2Render.DrawAALine(screenHandlesPos, screenVerHandlePos, Color4::Red());\n    }\n\n    void ScaleTool::OnEnabled()\n    {\n        mHorDragHandle->enabled = true;\n        mVerDragHandle->enabled = true;\n        mBothDragHandle->enabled = true;\n        UpdateHandlesPosition();\n    }\n\n    void ScaleTool::OnDisabled()\n    {\n        mHorDragHandle->enabled = false;\n        mVerDragHandle->enabled = false;\n        mBothDragHandle->enabled = false;\n    }\n\n    void ScaleTool::OnSceneChanged(const Vector<Ref<SceneEditableObject>>& changedObjects)\n    {}\n\n    void ScaleTool::OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        UpdateHandlesPosition();\n    }\n\n    void ScaleTool::OnHorDragHandleMoved(const Vec2F& position)\n    {\n        Vec2F axis = Vec2F::Rotated(mHandlesAngle);\n        Vec2F handlePos = (position - mSceneHandlesPos).Project(axis) + mSceneHandlesPos;\n        float scale = (handlePos - mSceneHandlesPos).Length() / (mLastHorHandlePos - mSceneHandlesPos).Length();\n\n        mLastHorHandlePos = handlePos;\n        mHorDragHandle->position = handlePos;\n\n        ScaleSelectedObjects(Vec2F(scale, 1.0f));\n    }\n\n    void ScaleTool::OnVerDragHandleMoved(const Vec2F& position)\n    {\n        Vec2F axis = Vec2F::Rotated(mHandlesAngle).Perpendicular();\n        Vec2F handlePos = (position - mSceneHandlesPos).Project(axis) + mSceneHandlesPos;\n        float scale = (handlePos - mSceneHandlesPos).Length() / (mLastVerHandlePos - mSceneHandlesPos).Length();\n\n        mLastVerHandlePos = handlePos;\n        mVerDragHandle->position = handlePos;\n\n        ScaleSelectedObjects(Vec2F(1.0f, scale));\n    }\n\n    void ScaleTool::OnBothDragHandleMoved(const Vec2F& position)\n    {\n        float delta = o2EditorSceneScreen.SceneToScreenPoint(position).x -\n            o2EditorSceneScreen.SceneToScreenPoint(mLastBothHandlePos).x;\n\n        float scale = 1.0f + delta*bothScaleSence;\n        mLastBothHandlePos = position;\n\n        mBothDragHandle->position = mSceneHandlesPos;\n\n        ScaleSelectedObjects(Vec2F(scale, scale));\n    }\n\n    void ScaleTool::UpdateHandlesPosition()\n    {\n        auto selectedObjects = o2EditorSceneScreen.GetSelectedObjects();\n        mSceneHandlesPos =\n            selectedObjects.Sum<Vec2F>([](auto x) { return x->GetTransform().origin; }) /\n            (float)selectedObjects.Count();\n\n        if (selectedObjects.Count() > 0 && !o2Input.IsKeyDown(VK_CONTROL))\n        {\n            auto lastSelectedObject = selectedObjects.Last();\n            UpdateHandlesAngleAndPositions(-lastSelectedObject->GetTransform().xv.Normalized().Angle(Vec2F::Right()));\n        }\n        else\n            UpdateHandlesAngleAndPositions(0.0f);\n    }\n\n    void ScaleTool::UpdateHandlesAngleAndPositions(float angle)\n    {\n        mHandlesAngle = angle;\n\n        mVerDragHandle->angle = mHandlesAngle;\n        mHorDragHandle->angle = mHandlesAngle;\n        mBothDragHandle->angle = mHandlesAngle;\n\n        UpdateHandlesPositions();\n    }\n\n    void ScaleTool::UpdateHandlesPositions()\n    {\n        Vec2F handlesAxis = Vec2F::Rotated(mHandlesAngle);\n        Vec2F handlesSceneSize = o2EditorSceneScreen.ScreenToScenePoint(mHandlesSize) -\n            o2EditorSceneScreen.ScreenToScenePoint(Vec2F());\n\n        mVerDragHandle->position = mSceneHandlesPos + handlesAxis.Perpendicular()*handlesSceneSize.y;\n        mHorDragHandle->position = mSceneHandlesPos + handlesAxis*handlesSceneSize.x;\n        mBothDragHandle->position = mSceneHandlesPos;\n\n        mLastVerHandlePos = mVerDragHandle->position;\n        mLastHorHandlePos = mHorDragHandle->position;\n        mLastBothHandlePos = mBothDragHandle->position;\n    }\n\n    void ScaleTool::OnKeyPressed(const Input::Key& key)\n    {\n        if (!o2EditorSceneWindow.IsFocused())\n            return;\n\n        if (key == VK_CONTROL)\n            UpdateHandlesAngleAndPositions(0.0f);\n\n        SelectionTool::OnKeyPressed(key);\n    }\n\n    void ScaleTool::OnKeyStayDown(const Input::Key& key)\n    {}\n\n    void ScaleTool::OnKeyReleased(const Input::Key& key)\n    {\n        if (!o2EditorSceneWindow.IsFocused())\n            return;\n\n        if (key == VK_CONTROL)\n        {\n            auto selectedObjects = o2EditorSceneScreen.GetSelectedObjects();\n            if (selectedObjects.Count() > 0)\n            {\n                auto lastSelectedObject = selectedObjects.Last();\n                UpdateHandlesAngleAndPositions(-lastSelectedObject->GetTransform().xv.Normalized().Angle(Vec2F::Right()));\n            }\n        }\n    }\n\n    void ScaleTool::ScaleSelectedObjects(const Vec2F& scale)\n    {\n        Basis transform =\n            Basis::Translated(mSceneHandlesPos*-1.0f)*\n            Basis::Rotated(-mHandlesAngle)*\n            Basis::Scaled(scale)*\n            Basis::Rotated(mHandlesAngle)*\n            Basis::Translated(mSceneHandlesPos);\n\n        for (auto& object : o2EditorSceneScreen.GetTopSelectedObjects())\n        {\n            object->SetTransform(object->GetTransform()*transform);\n            object->UpdateTransform();\n        }\n    }\n\n    void ScaleTool::HandlePressed()\n    {\n        mBeforeTransforms = o2EditorSceneScreen.GetTopSelectedObjects().Convert<Basis>(\n            [](auto& x) { return x->GetTransform(); });\n\n        mTransformAction = mmake<TransformAction>(o2EditorSceneScreen.GetTopSelectedObjects());\n\n        onTransformBegin();\n    }\n\n    void ScaleTool::HandleReleased()\n    {\n        mTransformAction->Completed();\n        o2EditorSceneWindow.DoneAction(mTransformAction);\n        mTransformAction = nullptr;\n\n        onTransformEnd();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::ScaleTool, Editor__ScaleTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/ScaleTool.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2Editor/Tools/ITransformTool.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneDragHandle.h\"\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(TransformAction);\n\n    // -------------------------\n    // Scale objects editor tool\n    // -------------------------\n    class ScaleTool: public ITransformTool\n    {\n    public:\n        float bothScaleSence = 0.01f;\n\n    public:\n        // Default constructor\n        ScaleTool();\n\n        // Destructor\n        ~ScaleTool();\n\n        IOBJECT(ScaleTool);\n\n    protected:\n        Ref<SceneDragHandle> mHorDragHandle;  // Horizontal scale drag handle\n        Ref<SceneDragHandle> mVerDragHandle;  // Vertical scale drag handle\n        Ref<SceneDragHandle> mBothDragHandle; // Bot axis scale drag handle\n\n        float mHandlesAngle = 0.0f;              // Handles angle in radians\n        Vec2F mSceneHandlesPos;                  // Scene space handles position\n        Vec2F mHandlesSize = Vec2F(100, 100); // Handles size in screen space\n\n        Vec2F mLastHorHandlePos;  // Last horizontal handle position\n        Vec2F mLastVerHandlePos;  // Last vertical handle position\n        Vec2F mLastBothHandlePos; // Last both axis handle position\n\n        Vector<Basis>        mBeforeTransforms; // Array of objects' transformations before changing\n        Ref<TransformAction> mTransformAction;  // Current transform action. Creates when transform started\n\n    protected:\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Returns shortcut keys for toggle\n        ShortcutKeys GetShortcut() const override;\n\n        // Updates tool\n        void Update(float dt) override;\n\n        // Draws screen\n        void DrawScreen() override;\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        // Called when scene objects was changed\n        void OnSceneChanged(const Vector<Ref<SceneEditableObject>>& changedObjects) override;\n\n        // Called when objects selection was changed\n        void OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects) override;\n\n        // Called when horizontal drag handle was moved\n        void OnHorDragHandleMoved(const Vec2F& position);\n\n        // Called when horizontal drag handle was moved\n        void OnVerDragHandleMoved(const Vec2F& position);\n\n        // Called when horizontal drag handle was moved\n        void OnBothDragHandleMoved(const Vec2F& position);\n\n        // Updates handles position\n        void UpdateHandlesPosition();\n\n        // Updates handles angle and position\n        void UpdateHandlesAngleAndPositions(float angle);\n\n        // Updates handles position\n        void UpdateHandlesPositions();\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when key stay down during frame\n        void OnKeyStayDown(const Input::Key& key) override;\n\n        // Called when key was pressed\n        void OnKeyReleased(const Input::Key& key) override;\n\n        // Moves selected objects on delta\n        void ScaleSelectedObjects(const Vec2F& scale);\n\n        // Called when some handle was pressed, stores before transformations\n        void HandlePressed();\n\n        // Called when handle was released, completes transformation action\n        void HandleReleased();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ScaleTool)\n{\n    BASE_CLASS(Editor::ITransformTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ScaleTool)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(0.01f).NAME(bothScaleSence);\n    FIELD().PROTECTED().NAME(mHorDragHandle);\n    FIELD().PROTECTED().NAME(mVerDragHandle);\n    FIELD().PROTECTED().NAME(mBothDragHandle);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mHandlesAngle);\n    FIELD().PROTECTED().NAME(mSceneHandlesPos);\n    FIELD().PROTECTED().DEFAULT_VALUE(Vec2F(100, 100)).NAME(mHandlesSize);\n    FIELD().PROTECTED().NAME(mLastHorHandlePos);\n    FIELD().PROTECTED().NAME(mLastVerHandlePos);\n    FIELD().PROTECTED().NAME(mLastBothHandlePos);\n    FIELD().PROTECTED().NAME(mBeforeTransforms);\n    FIELD().PROTECTED().NAME(mTransformAction);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ScaleTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PROTECTED().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PROTECTED().SIGNATURE(ShortcutKeys, GetShortcut);\n    FUNCTION().PROTECTED().SIGNATURE(void, Update, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawScreen);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSceneChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectsSelectionChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHorDragHandleMoved, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnVerDragHandleMoved, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnBothDragHandleMoved, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHandlesPosition);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHandlesAngleAndPositions, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHandlesPositions);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyStayDown, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, ScaleSelectedObjects, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, HandlePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, HandleReleased);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/SelectionTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SelectionTool.h\"\n\n#include \"o2/Application/VKCodes.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n#include \"o2Editor/Actions/Select.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n\nnamespace Editor\n{\n    SelectionTool::SelectionTool()\n    {\n        mSelectionSprite = mmake<Sprite>(\"ui/UI_Window_place.png\");\n    }\n\n    SelectionTool::~SelectionTool()\n    {}\n\n    String SelectionTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_select_tool.png\";\n    }\n\n    ShortcutKeys SelectionTool::GetShortcut() const\n    {\n        return ShortcutKeys({VK_Q});\n    }\n\n    void SelectionTool::DrawScene()\n    {\n        for (auto& object : mCurrentSelectingObjects)\n\t\t\to2EditorSceneScreen.DrawObjectSelection(object, o2EditorSceneScreen.GetManyObjectsSelectionColor());\n\n\t\tif (mSelectingByFrame)\n\t\t\tmSelectionSprite->Draw();\n    }\n\n    void SelectionTool::DrawScreen()\n    {}\n\n    void SelectionTool::Update(float dt)\n    {}\n\n    void SelectionTool::OnEnabled()\n    {}\n\n    void SelectionTool::OnDisabled()\n    {\n        mSelectingByFrame = false;\n    }\n\n    void SelectionTool::OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects)\n    {}\n\n    void SelectionTool::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        mPressPoint = cursor.position;\n    }\n\n    void SelectionTool::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (mSelectingByFrame)\n        {\n            o2EditorSceneScreen.SelectObjectsWithoutAction(mCurrentSelectingObjects, true);\n            mCurrentSelectingObjects.Clear();\n            mSelectingByFrame = false;\n\n            auto selectionAction = mmake<SelectAction>(o2EditorSceneScreen.GetSelectedObjects(), mBeforeSelectingObjects);\n            o2EditorSceneWindow.DoneAction(selectionAction);\n        }\n        else\n        {\n            bool selected = false;\n            Vec2F sceneSpaceCursor = cursor.position;\n            auto& drawnObjects = o2Scene.GetDrawnEditableObjects();\n\n            int startIdx = drawnObjects.Count() - 1;\n            if (!o2EditorSceneScreen.GetSelectedObjects().IsEmpty())\n                startIdx = drawnObjects.IndexOf(o2EditorSceneScreen.GetSelectedObjects().Last()) - 1;\n\n            for (int i = startIdx; i >= 0; i--)\n            {\n                auto object = drawnObjects[i].Lock();\n                if (!object->IsLockedInHierarchy() && object->GetTransform().IsPointInside(sceneSpaceCursor))\n                {\n                    mBeforeSelectingObjects = o2EditorSceneScreen.GetSelectedObjects();\n\n                    if (!o2Input.IsKeyDown(VK_CONTROL))\n                        o2EditorSceneScreen.ClearSelectionWithoutAction(false);\n\n                    o2EditorSceneScreen.SelectObjectWithoutAction(object);\n                    o2EditorTree.HighlightObjectTreeNode(object);\n                    selected = true;\n\n                    auto selectionAction = mmake<SelectAction>(o2EditorSceneScreen.GetSelectedObjects(),\n                                                               mBeforeSelectingObjects);\n                    o2EditorSceneWindow.DoneAction(selectionAction);\n                    break;\n                }\n            }\n\n            if (!o2Input.IsKeyDown(VK_CONTROL) && !selected)\n                o2EditorSceneScreen.ClearSelection();\n        }\n    }\n\n    void SelectionTool::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        if (mSelectingByFrame)\n        {\n            mSelectingByFrame = false;\n            mCurrentSelectingObjects.Clear();\n        }\n    }\n\n    void SelectionTool::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (!mSelectingByFrame && (mPressPoint - cursor.position).Length() > 5.0f)\n        {\n            mSelectingByFrame = true;\n\n            mBeforeSelectingObjects = o2EditorSceneScreen.GetSelectedObjects();\n\n            if (!o2Input.IsKeyDown(VK_CONTROL))\n                o2EditorSceneScreen.ClearSelectionWithoutAction();\n        }\n\n        if (mSelectingByFrame && cursor.delta.Length() > 0.1f)\n        {\n            mSelectionSprite->SetRect(RectF(mPressPoint, cursor.position));\n            RectF selectionRect(cursor.position, mPressPoint);\n\n            auto currentSelectedObjects = mCurrentSelectingObjects;\n            mCurrentSelectingObjects.Clear();\n            for (auto& object : currentSelectedObjects)\n            {\n                if (object->GetTransform().AABB().IsIntersects(selectionRect))\n                    mCurrentSelectingObjects.Add(object);\n            }\n\n            auto& drawnObjects = o2Scene.GetDrawnEditableObjects();\n            for (auto& objectWeak : drawnObjects)\n            {\n                auto object = objectWeak.Lock();\n\n                if (mCurrentSelectingObjects.Contains(object))\n                    continue;\n\n                if (!object->IsLockedInHierarchy() && object->GetTransform().AABB().IsIntersects(selectionRect))\n                    mCurrentSelectingObjects.Add(object);\n            }\n\n            mNeedRedraw = true;\n        }\n    }\n\n    void SelectionTool::OnCursorMoved(const Input::Cursor& cursor)\n    {}\n\n    void SelectionTool::OnKeyPressed(const Input::Key& key)\n    {\n        if (key == VK_ESCAPE)\n            o2EditorSceneScreen.ClearSelection();\n\n        if (key == 'A' && o2Input.IsKeyDown(VK_CONTROL))\n            o2EditorSceneScreen.SelectAllObjects();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::SelectionTool, Editor__SelectionTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/SelectionTool.h",
    "content": "#pragma once\n\n#include \"o2Editor/Tools/IEditorTool.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Sprite;\n    class SceneEditableObject;\n}\n\nnamespace Editor\n{\n    // ---------------------\n    // Editor selection tool\n    // ---------------------\n    class SelectionTool: public IEditTool\n    {\n    public:\n        // Default constructor\n        SelectionTool();\n\n        // Destructor\n        ~SelectionTool();\n\n        IOBJECT(SelectionTool);\n\n    protected:\n        Ref<Sprite> mSelectionSprite; // Selection frame sprite\n\n        Vector<Ref<SceneEditableObject>> mCurrentSelectingObjects; // Current selecting objects (when cursor pressed, but not released yet)\n        Vector<Ref<SceneEditableObject>> mBeforeSelectingObjects;  // Before selection objects array\n\n        Vec2F mPressPoint;               // Press point before selecting\n        bool  mSelectingByFrame = false; // Is selecting objects now\n\n    protected:\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Returns shortcut keys for toggle\n        ShortcutKeys GetShortcut() const override;\n\n        // Draws tool\n        void DrawScene() override;\n\n        // Draws tool\n        void DrawScreen() override;\n\n        // Updates tool\n        void Update(float dt) override;\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        // Called when objects selection was changed\n        void OnObjectsSelectionChanged(const Vector<Ref<SceneEditableObject>>& objects) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n    };\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SelectionTool)\n{\n    BASE_CLASS(Editor::IEditTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SelectionTool)\n{\n    FIELD().PROTECTED().NAME(mSelectionSprite);\n    FIELD().PROTECTED().NAME(mCurrentSelectingObjects);\n    FIELD().PROTECTED().NAME(mBeforeSelectingObjects);\n    FIELD().PROTECTED().NAME(mPressPoint);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mSelectingByFrame);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SelectionTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PROTECTED().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PROTECTED().SIGNATURE(ShortcutKeys, GetShortcut);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawScreen);\n    FUNCTION().PROTECTED().SIGNATURE(void, Update, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectsSelectionChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/SkeletonTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SkeletonTool.h\"\n\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneDragHandle.h\"\n\nnamespace Editor\n{\n    SkeletonTool::SkeletonTool(RefCounter* refCounter):\n        IEditTool(refCounter)\n    {\n        sceneLayer->tool = Ref(this);\n    }\n\n    void SkeletonTool::AddSkeletonInstance(const Ref<SkinningMeshComponent>& skinningMeshComponent)\n    {\n        if (IsEditingSkeleton(skinningMeshComponent))\n            return;\n\n        auto newInstance = mmake<SkeletonInstance>();\n\n        newInstance->skinningMeshComponent = skinningMeshComponent;\n\n        for (auto& bones : skinningMeshComponent->GetBones())\n        {\n            auto boneHandle = mmake<BoneHandle>();\n            boneHandle->boneComponent = bones.first.Lock();\n\n            auto compTransform = skinningMeshComponent->GetActor()->transform;\n\n            const float handleSize = 5;\n            Vec2F drawableSize(bones.first.Lock()->length, handleSize);\n\n            boneHandle->handle->position = compTransform->worldPosition;\n\n            boneHandle->handle->GetRegularDrawable()->size = drawableSize;\n            boneHandle->handle->GetHoverDrawable()->size = drawableSize;\n            boneHandle->handle->GetPressedDrawable()->size = drawableSize;\n\n            boneHandle->handle->GetRegularDrawable()->angle = compTransform->worldBasis.Get().GetAngle();\n            boneHandle->handle->GetHoverDrawable()->angle = compTransform->worldBasis.Get().GetAngle();\n            boneHandle->handle->GetPressedDrawable()->angle = compTransform->worldBasis.Get().GetAngle();\n\n            newInstance->boneHandles.Add(boneHandle);\n        }\n\n        mSkeletons.Add(newInstance);\n    }\n\n    void SkeletonTool::RemoveSkeletonInstance(const Ref<SkinningMeshComponent>& skinningMeshComponent)\n    {\n        auto instance = mSkeletons.FindOrDefault([&](auto& x) { return x->skinningMeshComponent == skinningMeshComponent; });\n        if (!instance)\n            return;\n\n        mSkeletons.Remove(instance);\n\n        instance->boneHandles.Clear();\n    }\n\n    bool SkeletonTool::IsEditingSkeleton(const Ref<SkinningMeshComponent>& skinningMeshComponent) const\n    {\n        return mSkeletons.Contains([&](auto& x) { return x->skinningMeshComponent == skinningMeshComponent; });\n    }\n\n    const Vector<Ref<SkeletonTool::SkeletonInstance>>& SkeletonTool::GetEditingSkeletons() const\n    {\n        return mSkeletons;\n    }\n\n    void SkeletonTool::SceneLayer::DrawOverScene()\n    {\n    }\n\n    void SkeletonTool::SceneLayer::Update(float dt)\n    {\n        for (auto& instance : tool.Lock()->mSkeletons)\n            instance->UpdateHandlesPositions();\n    }\n\n    int SkeletonTool::SceneLayer::GetOrder() const\n    {\n        return 0;\n    }\n\n    bool SkeletonTool::SceneLayer::IsEnabled() const\n    {\n        return tool.Lock()->isEnabled;\n    }\n\n    const String& SkeletonTool::SceneLayer::GetName() const\n    {\n        static String res(\"Skeleton tool\");\n        return res;\n    }\n\n    const String& SkeletonTool::SceneLayer::GetIconName() const\n    {\n        return String::empty;\n    }\n\n    String SkeletonTool::SkeletonTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_bones_tool.png\";\n    }\n\n    void SkeletonTool::SkeletonTool::OnEnabled()\n    {\n        o2EditorSceneScreen.AddEditorLayer(sceneLayer);\n        isEnabled = true;\n    }\n\n    void SkeletonTool::SkeletonTool::OnDisabled()\n    {\n        o2EditorSceneScreen.RemoveEditorLayer(sceneLayer);\n        isEnabled = false;\n    }\n\n    SkeletonTool::BoneHandle::BoneHandle()\n    {\n        Color4 handleRegularColor = Color4(126, 149, 160);\n        Color4 handleHoverColor = Color4(147+30, 166+30, 174+30);\n        Color4 handlePressedColor = Color4(44, 62, 80);\n\n        auto getHandleVertices = [=](const Basis& transform, const Color4& color) {\n            Vec2F scale = transform.GetScale();\n            float handleTmpSize = 1.0f/scale.x/o2EditorSceneScreen.GetCamera().GetScaleX();\n\n            Vector<Vec2F> points = { Vec2F(0, 0.5f), Vec2F(handleTmpSize, 0),\n                Vec2F(0.99f, 0.4f), Vec2F(1.0f, 0.5f), Vec2F(0.99f, 0.6f),\n                Vec2F(handleTmpSize, 1), Vec2F(0, 0.5f) };\n\n            Vector<Vertex> localVertices; localVertices.Resize(points.Count());\n            for (int i = 0; i < points.Count(); i++)\n                localVertices[i].Set(points[i]*transform, color.ABGR(), 0, 0);\n\n            return localVertices;\n        };\n\n        auto drawHandleRegular = [=](const Basis& transform, const Color4& color) {\n            Color4 resultColor = handleRegularColor; resultColor.a = color.a;\n            auto vertices = getHandleVertices(transform, resultColor);\n            VertexIndex indexes[] = { 0, 1, 2,  0, 2, 3,  0, 3, 4,  0, 4, 5 };\n\n            o2Render.DrawAAPolyLine(vertices.Data(), vertices.Count(), 3.0f);\n            o2Render.DrawBuffer(PrimitiveType::Polygon, vertices.Data(), vertices.Count(), indexes, 4, o2Render.GetDefaultMaterial(), TextureRef::Null());\n            //o2Render.DrawAABasis(transform);\n        };\n\n        auto drawHandleHover = [=](const Basis& transform, const Color4& color) {\n            Color4 resultColor = handleHoverColor; resultColor.a = color.a;\n            auto vertices = getHandleVertices(transform, resultColor);\n            o2Render.DrawAAPolyLine(vertices.Data(), vertices.Count(), 3.0f);\n        };\n\n        auto drawHandlePressed = [=](const Basis& transform, const Color4& color) {\n            Color4 resultColor = handlePressedColor; resultColor.a = color.a;\n            auto vertices = getHandleVertices(transform, resultColor);\n            o2Render.DrawAAPolyLine(vertices.Data(), vertices.Count(), 3.0f);\n        };\n\n        handle = mmake<SceneDragHandle>(mmake<FunctionalRectDrawable>(drawHandleRegular),\n                                        mmake<FunctionalRectDrawable>(drawHandleHover),\n                                        mmake<FunctionalRectDrawable>(drawHandlePressed));\n\n        handle->GetRegularDrawable()->pivot = Vec2F(0, 0.5f);\n        handle->GetHoverDrawable()->pivot = Vec2F(0, 0.5f);\n        handle->GetPressedDrawable()->pivot = Vec2F(0, 0.5f);\n\n        handle->onPressed = [&]() { pressedTransform = boneComponent->GetActor()->transform->worldBasis; };\n        handle->onChangedPos = [&](const Vec2F& p) { OnHandleChangedPos(p); };\n    }\n\n    SkeletonTool::BoneHandle::~BoneHandle()\n    {}\n\n    void SkeletonTool::BoneHandle::UpdatePosition()\n    {\n        auto compTransform = boneComponent->GetActor()->transform;\n        float angle = compTransform->GetWorldBasis().GetAngle();\n        handle->position = compTransform->worldPosition;\n\n        handle->GetRegularDrawable()->angle = angle;\n        handle->GetHoverDrawable()->angle = angle;\n        handle->GetPressedDrawable()->angle = angle;\n    }\n\n    void SkeletonTool::BoneHandle::OnHandleChangedPos(const Vec2F& pos)\n    {\n        Vec2F origin = handle->GetDraggingBeginPosition();\n        Vec2F pressedPos = origin - handle->GetDraggingOffset();\n        Vec2F currentPos = handle->position - handle->GetDraggingOffset();\n        Vec2F pressedDir = pressedPos - origin;\n        Vec2F currentDir = currentPos - origin;\n        float angle = pressedDir.Angle(currentDir);\n\n        //         o2Debug.DrawLine(origin, pressedPos, Color4::Red(), 0.2f);\n        //         o2Debug.DrawLine(origin, currentPos, Color4::Green(), 0.2f);\n\n        auto compTransform = boneComponent->GetActor()->transform;\n        auto worldPos = compTransform->GetWorldPosition();\n        Basis transform = Basis::Translated(worldPos*-1.0f)\n            *Basis::Rotated(angle)\n            *Basis::Translated(worldPos);\n\n        compTransform->worldBasis = pressedTransform*transform;\n        compTransform->worldPosition = worldPos;\n        boneComponent->GetActor()->UpdateTransform();\n\n        UpdatePosition();\n    }\n\n    void SkeletonTool::SkeletonInstance::UpdateHandlesPositions()\n    {\n        for (auto& handle : boneHandles)\n            handle->UpdatePosition();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::SkeletonTool, Editor__SkeletonTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/SkeletonTool.h",
    "content": "#pragma once\n#include \"IEditorTool.h\"\n\n#include \"o2/Scene/Components/SkinningMeshBoneComponent.h\"\n#include \"o2/Scene/Components/SkinningMeshComponent.h\"\n#include \"o2/Utils/Editor/FrameHandles.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneDragHandle.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n\nnamespace Editor\n{\n    // -------------------------------------------------\n    // Skeleton tool. Used for editing bones of skeleton\n    // -------------------------------------------------\n    struct SkeletonTool: public IEditTool\n    {\n        // ---------------------------------------------------------------------\n        // Scene layer. Used to draw and update stuff of bones handles and other\n        // ---------------------------------------------------------------------\n        struct SceneLayer: public SceneEditorLayer\n        {\n            WeakRef<SkeletonTool> tool; // Skeleton tool\n\n        public:\n            // Draws editor over scene\n            void DrawOverScene() override;\n\n            // Updates editor\n            void Update(float dt) override;\n\n            // Returns order of layer\n            int GetOrder() const override;\n\n            // Returns true if layer is enabled\n            bool IsEnabled() const override;\n\n            // Returns name of layer\n            const String& GetName() const override;\n\n            // Returns icon name of layer\n            const String& GetIconName() const override;\n        };\n\n        // ---------------------------------------------------------\n        // Bone handle container. Keeps handle and reference to bone\n        // ---------------------------------------------------------\n        struct BoneHandle: public RefCounterable\n        {\n            Ref<SceneDragHandle>           handle;        // Bone handle in scene\n            Ref<SkinningMeshBoneComponent> boneComponent; // Bone component\n\n            Basis pressedTransform; // Stored bone transform when pressed\n\n        public:\n            // Default constructor, creates handle\n            BoneHandle();\n\n            // Destructor, destroys handle\n            ~BoneHandle();\n\n            // Updates handle position by bone transform\n            void UpdatePosition();\n\n        private:\n            // Called when handle is moved, changes bone transformation\n            void OnHandleChangedPos(const Vec2F& pos);\n        };\n\n        // ---------------------------------------------------------------------------------\n        // Skeleton edit instance. Contains handles and reference to skinning mesh component\n        // ---------------------------------------------------------------------------------\n        struct SkeletonInstance: public RefCounterable\n        {\n            Ref<SkinningMeshComponent> skinningMeshComponent; // Reference to component\n            Vector<Ref<BoneHandle>>    boneHandles;           // List of bones handles\n\n        public:\n            // Updates handles positions by bones transforms\n            void UpdateHandlesPositions();\n        };\n\n    public:\n        Ref<SceneLayer> sceneLayer = mmake<SceneLayer>(); // Scene layer for drawing spline\n\n        bool isEnabled = false; // Is tool enabled now     \n\n    public:\n        // Default constructor\n        explicit SkeletonTool(RefCounter* refCounter);\n\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        // Adds and enables handles for editing skeleton bones\n        void AddSkeletonInstance(const Ref<SkinningMeshComponent>& skinningMeshComponent);\n\n        // Removing skeleton from editing\n        void RemoveSkeletonInstance(const Ref<SkinningMeshComponent>& skinningMeshComponent);\n\n        // Returns whether the given skeleton is already being edited\n        bool IsEditingSkeleton(const Ref<SkinningMeshComponent>& skinningMeshComponent) const;\n\n        // Returns list of editing skeletons\n        const Vector<Ref<SkeletonInstance>>& GetEditingSkeletons() const;\n\n        IOBJECT(SkeletonTool);\n\n    private:\n        Vector<Ref<SkeletonInstance>> mSkeletons; // List of editing skeletons\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SkeletonTool)\n{\n    BASE_CLASS(Editor::IEditTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SkeletonTool)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(mmake<SceneLayer>()).NAME(sceneLayer);\n    FIELD().PUBLIC().DEFAULT_VALUE(false).NAME(isEnabled);\n    FIELD().PRIVATE().NAME(mSkeletons);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SkeletonTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDisabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddSkeletonInstance, const Ref<SkinningMeshComponent>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveSkeletonInstance, const Ref<SkinningMeshComponent>&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEditingSkeleton, const Ref<SkinningMeshComponent>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<SkeletonInstance>>&, GetEditingSkeletons);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/SplineTool.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SplineTool.h\"\n\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    SplineTool::SplineTool(RefCounter* refCounter) :\n        IEditTool(refCounter), splineEditor(mmake<SplineEditor>()), sceneLayer(mmake<SplineSceneLayer>())\n    {\n        sceneLayer->tool = Ref(this);\n    }\n\n    void SplineTool::Reset()\n    {\n        splineEditor->Reset();\n        onChanged.Clear();\n    }\n\n    Vec2F SplineTool::SplineWrapper::GetOrigin() const\n    {\n        return getOrigin();\n    }\n\n    Vec2F SplineTool::SplineWrapper::WorldToLocal(const Vec2F& point) const\n    {\n        return o2EditorSceneScreen.ScreenToLocalPoint(point) - GetOrigin();\n    }\n\n    Vec2F SplineTool::SplineWrapper::LocalToWorld(const Vec2F& point) const\n    {\n        return o2EditorSceneScreen.LocalToScreenPoint(point + GetOrigin());\n    }\n\n    int SplineTool::SplineWrapper::GetPointsCount() const\n    {\n        return spline->GetKeys().Count();\n    }\n\n    bool SplineTool::SplineWrapper::IsClosed() const\n    {\n        return spline->IsClosed();\n    }\n\n    void SplineTool::SplineWrapper::AddPoint(int idx, const Vec2F& position,\n                                             const Vec2F& prevSupport, const Vec2F& nextSupport)\n    {\n        spline->InsertKey(idx, position, 0.0f, prevSupport, nextSupport);\n    }\n\n    void SplineTool::SplineWrapper::RemovePoint(int idx)\n    {\n        spline->RemoveKey(idx);\n    }\n\n    Vec2F SplineTool::SplineWrapper::GetPointPos(int idx) const\n    {\n        return spline->GetKey(idx).value;\n    }\n\n    void SplineTool::SplineWrapper::SetPointPos(int idx, const Vec2F& pos)\n    {\n        auto key = spline->GetKey(idx);\n        key.value = pos;\n        spline->SetKey(key, idx);\n    }\n\n    void SplineTool::SplineWrapper::SetPointRangeValue(int idx, float value)\n    {\n        auto key = spline->GetKey(idx);\n        key.valueRange = value;\n        spline->SetKey(key, idx);\n    }\n\n    float SplineTool::SplineWrapper::GetPointRangeValue(int idx) const\n    {\n        return spline->GetKey(idx).valueRange;\n    }\n\n    Vec2F SplineTool::SplineWrapper::GetPointPrevSupportPos(int idx) const\n    {\n        auto key = spline->GetKey(idx);\n        return key.prevSupport + key.value;\n    }\n\n    void SplineTool::SplineWrapper::SetPointPrevSupportPos(int idx, const Vec2F& pos)\n    {\n        auto key = spline->GetKey(idx);\n        key.prevSupport = pos - key.value;\n        spline->SetKey(key, idx);\n    }\n\n    Vec2F SplineTool::SplineWrapper::GetPointNextSupportPos(int idx) const\n    {\n        auto key = spline->GetKey(idx);\n        return key.nextSupport + key.value;\n    }\n\n    void SplineTool::SplineWrapper::SetPointNextSupportPos(int idx, const Vec2F& pos)\n    {\n        auto key = spline->GetKey(idx);\n        key.nextSupport = pos - key.value;\n        spline->SetKey(key, idx);\n    }\n\n    const ApproximationVec2F* SplineTool::SplineWrapper::GetPointApproximationLeft(int idx) const\n    {\n        return spline->GetKeys()[idx].GetApproximatedPointsLeft();\n    }\n\n    const ApproximationVec2F* SplineTool::SplineWrapper::GetPointApproximationRight(int idx) const\n    {\n        return spline->GetKeys()[idx].GetApproximatedPointsRight();\n    }\n\n    int SplineTool::SplineWrapper::GetPointApproximationCount(int idx) const\n    {\n        return spline->GetKeys()[idx].GetApproximatedPointsCount();\n    }\n\n    void SplineTool::SplineWrapper::OnChanged()\n    {\n        tool.Lock()->onChanged();\n    }\n\n    void SplineTool::SplineSceneLayer::DrawOverScene()\n    {\n        tool.Lock()->splineEditor->Draw();\n    }\n\n    void SplineTool::SplineSceneLayer::Update(float dt)\n    {\n        tool.Lock()->splineEditor->Update(dt);\n    }\n\n    int SplineTool::SplineSceneLayer::GetOrder() const\n    {\n        return 0;\n    }\n\n    bool SplineTool::SplineSceneLayer::IsEnabled() const\n    {\n        return tool.Lock()->isEnabled;\n    }\n\n    const String& SplineTool::SplineSceneLayer::GetName() const\n    {\n        static String res(\"Animation spline\");\n        return res;\n    }\n\n    const String& SplineTool::SplineSceneLayer::GetIconName() const\n    {\n        return String::empty;\n    }\n\n    void SplineTool::SplineTool::SetSpline(const Ref<Spline>& spline, const Function<Vec2F()>& getOrigin)\n    {\n        auto wrapper = mmake<SplineWrapper>();\n        wrapper->spline = spline;\n        wrapper->getOrigin = getOrigin;\n        wrapper->tool = Ref(this);\n        spline->onKeysChanged += [=]() { wrapper->onChangedOutside(); };\n        splineEditor->SetSpline(wrapper);\n    }\n\n    String SplineTool::SplineTool::GetPanelIcon() const\n    {\n        return \"ui/UI4_path_tool.png\";\n    }\n\n    void SplineTool::SplineTool::OnEnabled()\n    {\n        o2EditorSceneScreen.AddEditorLayer(sceneLayer);\n        isEnabled = true;\n    }\n\n    void SplineTool::SplineTool::OnDisabled()\n    {\n        o2EditorSceneScreen.RemoveEditorLayer(sceneLayer);\n        isEnabled = false;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::SplineTool, Editor__SplineTool);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Tools/SplineTool.h",
    "content": "#pragma once\n#include \"IEditorTool.h\"\n\n#include \"o2/Utils/Math/Spline.h\"\n#include \"o2Editor/UI/SplineEditor/SplineEditor.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n\nnamespace Editor\n{\n    // ------------------------------------------------\n    // Spline editing on scene tool\n    // Contains scene editor layer and spline editor\n    // Works around spline origin, provided from getter\n    // ------------------------------------------------\n    struct SplineTool: public IEditTool\n    {\n        // -------------------\n        // Spline data wrapper\n        // -------------------\n        struct SplineWrapper: public SplineEditor::ISplineWrapper\n        {\n            WeakRef<SplineTool> tool;   // Spline tool\n            Ref<Spline>         spline; // Spline\n\n            Function<Vec2F()> getOrigin; // Origin point getter\n\n        public:\n            // Returns origin point\n            Vec2F GetOrigin() const;\n\n            // Converts world point to local space\n            Vec2F WorldToLocal(const Vec2F& point) const override;\n\n            // Converts local point to world space\n            Vec2F LocalToWorld(const Vec2F& point) const override;\n\n            // Returns count of points in spline\n            int GetPointsCount() const override;\n\n            // Returns true if spline is closed\n            bool IsClosed() const override;\n\n            // Adds new point to spline\n            void AddPoint(int idx, const Vec2F& position, const Vec2F& prevSupport, const Vec2F& nextSupport) override;\n\n            // Removes point from spline\n            void RemovePoint(int idx) override;\n\n            // Returns position of point\n            Vec2F GetPointPos(int idx) const override;\n\n            // Sets position of point\n            void SetPointPos(int idx, const Vec2F& pos) override;\n\n            // Sets point range value\n            void SetPointRangeValue(int idx, float value) override;\n\n            // Returns point range value\n            float GetPointRangeValue(int idx) const override;\n\n            // Returns previous support position of point\n            Vec2F GetPointPrevSupportPos(int idx) const override;\n\n            // Sets previous support position of point\n            void SetPointPrevSupportPos(int idx, const Vec2F& pos) override;\n\n            // Returns next support position of point\n            Vec2F GetPointNextSupportPos(int idx) const override;\n\n            // Sets next support position of point\n            void SetPointNextSupportPos(int idx, const Vec2F& pos) override;\n\n            // Returns approximation points\n            const ApproximationVec2F* GetPointApproximationLeft(int idx) const override;\n\n            // Returns approximation points\n            const ApproximationVec2F* GetPointApproximationRight(int idx) const override;\n\n            // Returns count of approximation points\n            int GetPointApproximationCount(int idx) const override;\n\n            // Called when spline was changed\n            void OnChanged() override;\n        };\n\n        // ------------------------------------------------\n        // Spline scene layer. Used to draw spline on scene\n        // ------------------------------------------------\n        struct SplineSceneLayer: public SceneEditorLayer\n        {\n            WeakRef<SplineTool> tool;\n\n        public:\n            // Draws spline over scene\n            void DrawOverScene() override;\n\n            // Updates spline editor from scene\n            void Update(float dt) override;\n\n            // Returns sorting order of layer\n            int GetOrder() const override;\n\n            // Returns true if layer is enabled\n            bool IsEnabled() const override;\n\n            // Returns name of layer\n            const String& GetName() const override;\n\n            // Returns icon name of layer\n            const String& GetIconName() const override;\n        };\n\n    public:\n        Function<void()> onChanged; // Called when spline was changed\n\n    public:\n        Ref<SplineEditor>     splineEditor;   // Animation spline editor\n        Ref<SplineSceneLayer> sceneLayer; // Scene layer for drawing spline\n\n        bool isEnabled = true; // Is tool enabled now\n\n    public:\n        // Default constructor\n        explicit SplineTool(RefCounter* refCounter);\n\n        // Empty copy operator\n        SplineTool& operator=(const SplineTool& other) { return *this; }\n\n        // Sets editing spline\n        void SetSpline(const Ref<Spline>& spline, const Function<Vec2F()>& getOrigin);\n\n        // Resets spline and callbacks\n        void Reset();\n\n        // Returns toggle in menu panel icon name\n        String GetPanelIcon() const override;\n\n        // Called when tool was enabled\n        void OnEnabled() override;\n\n        // Called when tool was disabled\n        void OnDisabled() override;\n\n        IOBJECT(SplineTool);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SplineTool)\n{\n    BASE_CLASS(Editor::IEditTool);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SplineTool)\n{\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PUBLIC().NAME(splineEditor);\n    FIELD().PUBLIC().NAME(sceneLayer);\n    FIELD().PUBLIC().DEFAULT_VALUE(true).NAME(isEnabled);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SplineTool)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSpline, const Ref<Spline>&, const Function<Vec2F()>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Reset);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetPanelIcon);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDisabled);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/ToolsPanel.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ToolsPanel.h\"\n\n#include \"EditorApplication.h\"\n#include \"o2/Animation/Tracks/AnimationColor4Track.h\"\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Animation/Tracks/AnimationVec2FTrack.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/DropDown.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Utils/Tasks/TaskManager.h\"\n#include \"o2Editor/Dialogs/EditNameDlg.h\"\n#include \"o2Editor/Tools/FrameTool.h\"\n#include \"o2Editor/Tools/MoveTool.h\"\n#include \"o2Editor/Tools/RotateTool.h\"\n#include \"o2Editor/Tools/ScaleTool.h\"\n#include \"o2Editor/Tools/SelectionTool.h\"\n#include \"o2Editor/UIRoot.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\n\nnamespace Editor\n{\n    const Ref<Widget>& ToolsPanel::GetPanelWidget() const\n    {\n        return mPanelRoot;\n    }\n\n    const Ref<Widget>& ToolsPanel::GetPlayPanel() const\n    {\n        return mPlayPanel;\n    }\n\n    const Ref<HorizontalLayout>& ToolsPanel::GetToolsPanel() const\n    {\n        return mToolsPanel;\n    }\n\n    void ToolsPanel::AddToolToggle(const Ref<Toggle>& toggle)\n    {\n        if (!toggle->GetStateObject(\"visible\")->GetAnimationClip()->GetTrackByType<float>(\"layout/minWidth\"))\n        {\n            *toggle->GetStateObject(\"visible\")->GetAnimationClip()->AddTrack<float>(\"layout/minWidth\") =\n                AnimationTrack<float>::EaseInOut(0.0f, 20.0f, 0.2f);\n        }\n\n        mToolsPanel->AddChild(toggle);\n        toggle->SetEnabledForcible(false);\n        toggle->SetEnabled(true);\n        toggle->SetToggleGroup(mToolsTogglesGroup);\n    }\n\n    void ToolsPanel::RemoveToolToggle(const Ref<Toggle>& toggle)\n    {\n        toggle->GetStateObject(\"visible\")->onStateFullyFalse = [=]() { \n            o2Tasks.Invoke([=]() { mToolsPanel->RemoveChild(toggle, false); });\n        };\n        toggle->SetEnabled(false);\n    }\n\n    void ToolsPanel::Update(float dt)\n    {\n        mPlayToggle->value = o2EditorApplication.IsPlaying();\n        mPauseToggle->value = o2EditorApplication.isPaused;\n    }\n\n    ToolsPanel::ToolsPanel(RefCounter* refCounter):\n        Singleton<ToolsPanel>(refCounter), mToolsTogglesGroup(mmake<ToggleGroup>(ToggleGroup::Type::OnlySingleTrue))\n    {\n        mPanelRoot = mmake<Widget>();\n        mPanelRoot->name = \"tools panel\";\n        mPanelRoot->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_ToolsPanel_bk.png\"), Layout::BothStretch(-2, 0, -2, -8));\n\n        mPanelRoot->layout->anchorMin = Vec2F(0, 1);\n        mPanelRoot->layout->anchorMax = Vec2F(1, 1);\n        mPanelRoot->layout->offsetMin = Vec2F(0, -45);\n        mPanelRoot->layout->offsetMax = Vec2F(0, -20);\n\n        InitializePlayPanel();\n        InitializeLayoutSchemesPanel();\n        InitializeToolsPanel();\n\n        EditorUIRoot.AddWidget(mPanelRoot);\n    }\n\n    ToolsPanel::~ToolsPanel()\n    {}\n\n    void ToolsPanel::InitializePlayPanel()\n    {\n        mPlayPanel = mmake<Widget>();\n        mPlayPanel->name = \"play panel\";\n        mPlayPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_play_panel_bk.png\"), Layout::BothStretch(-7, -5, -5, -5));\n        *mPlayPanel->layout = WidgetLayout::VerStretch(HorAlign::Left, 3, 2, 200, 10);\n        mPanelRoot->AddChild(mPlayPanel);\n\n        mPlayToggle = o2UI.CreateWidget<Toggle>(\"play-stop\");\n        mPlayToggle->onToggle = [&](bool value) { OnPlayStopToggled(value); };\n        *mPlayToggle->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(5, 1));\n        mPlayPanel->AddChild(mPlayToggle);\n\n        mPauseToggle = o2UI.CreateWidget<Toggle>(\"pause\");\n        mPauseToggle->onToggle = [this](bool value) { OnPauseToggled(value); };\n        *mPauseToggle->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(22, 1));\n        mPauseToggle->shortcut = ShortcutKeys({VK_F11});\n        mPlayPanel->AddChild(mPauseToggle);\n\n        mStepButton = o2UI.CreateWidget<Button>(\"step\");\n        mStepButton->onClick = [this]() { OnStepPressed(); };\n        *mStepButton->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-5, 1));\n        mStepButton->shortcut = ShortcutKeys({VK_F10});\n        mPlayPanel->AddChild(mStepButton);\n\n        auto playPanelPlayStateAnim = mmake<AnimationClip>();\n\n        *playPanelPlayStateAnim->AddTrack<float>(\"layout/offsetRight\") =\n            AnimationTrack<float>::EaseInOut(59.0f, 73.0f, 0.3f);\n\n        auto visiblePauseBtnAnim = playPanelPlayStateAnim->AddTrack<bool>(\"child/pause/enabled\");\n        visiblePauseBtnAnim->AddKey(0.0f, false);\n        visiblePauseBtnAnim->AddKey(0.1f, false);\n        visiblePauseBtnAnim->AddKey(0.11f, true);\n        visiblePauseBtnAnim->AddKey(0.3f, true);\n\n        mPlayPanel->AddState(\"playing\", playPanelPlayStateAnim);\n\n        mPlayToggle->onToggle += [=](bool playing) {\n            mPlayPanel->SetState(\"playing\", playing);\n        };\n    }\n\n    void ToolsPanel::InitializeLayoutSchemesPanel()\n    {\n        mLayoutSchemesList = o2UI.CreateDropdown(\"round\");\n        *mLayoutSchemesList->layout = WidgetLayout::VerStretch(HorAlign::Right, 3, 2, 150, 10);\n        mPanelRoot->AddChild(mLayoutSchemesList);\n        UpdateWndLayoutSchemas();\n        mLayoutSchemesList->onSelectedText = MakeFunction(this, &ToolsPanel::OnSchemeSelected);\n    }\n\n    void ToolsPanel::InitializeToolsPanel()\n    {\n        mToolsPanel = mmake<HorizontalLayout>();\n        mToolsPanel->name = \"edit tools\";\n        mToolsPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_panel_subpanel_bk.png\"), Layout::BothStretch(-7, -5, -10, -5));\n        *mToolsPanel->layout = WidgetLayout::VerStretch(HorAlign::Middle, 3, 2, 200, 10);\n        mToolsPanel->expandHeight = true;\n        mToolsPanel->expandWidth = false;\n        mToolsPanel->fitByChildren = true;\n        mToolsPanel->baseCorner = BaseCorner::Center;\n        mPanelRoot->AddChild(mToolsPanel);\n\n        for (auto& tool : o2EditorSceneScreen.GetTools())\n            AddToolToggle(tool->GetPanelToggle());\n\n        o2EditorSceneScreen.SelectTool<FrameTool>();\n    }\n\n    void ToolsPanel::UpdateWndLayoutSchemas()\n    {\n        mLayoutSchemesList->RemoveAllItems();\n\n        auto currentLayout = o2EditorWindows.GetWindowsLayout();\n        String currentLayoutName = mDefaultSchemeName;\n        for (auto& availableLayoutKV : o2EditorWindows.mAvailableLayouts)\n        {\n            mLayoutSchemesList->AddItem(availableLayoutKV.first);\n\n            if (currentLayout == availableLayoutKV.second)\n                currentLayoutName = availableLayoutKV.first;\n        }\n\n        mLayoutSchemesList->AddItem(mDefaultSchemeName);\n        mLayoutSchemesList->AddItem(mSaveAsSchemeName);\n\n        mLayoutSchemesList->SelectItemText(currentLayoutName);\n    }\n\n    void ToolsPanel::OnSchemeSelected(const WString& name)\n    {\n        if ((String)name == mSaveAsSchemeName)\n        {\n            NameEditDlg::Show(\"New layout\", [&](const String& name) {\n                o2EditorWindows.mAvailableLayouts.Add(name, o2EditorWindows.GetWindowsLayout());\n                UpdateWndLayoutSchemas();\n            });\n        }\n\n        if ((String)name == mDefaultSchemeName)\n        {\n            o2EditorWindows.SetDefaultWindowsLayout();\n        }\n\n        if (o2EditorWindows.mAvailableLayouts.ContainsKey(name))\n        {\n            o2EditorWindows.SetWindowsLayout(name);\n        }\n    }\n\n    void ToolsPanel::OnPlayStopToggled(bool play)\n    {\n        o2EditorApplication.SetPlaying(play);\n    }\n\n    void ToolsPanel::OnPauseToggled(bool pause)\n    {\n        o2EditorApplication.isPaused = pause;\n    }\n\n    void ToolsPanel::OnStepPressed()\n    {\n        o2EditorApplication.SetPlaying(true);\n        o2EditorApplication.isPaused = true;\n        o2EditorApplication.step = true;\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/ToolsPanel.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/String.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Button;\n    class CustomDropDown;\n    class DropDown;\n    class HorizontalLayout;\n    class Widget;\n}\n\n// Editor tools panel accessor macros\n#define o2EditorTools ToolsPanel::Instance()\n\nnamespace Editor\n{\n    // ------------------\n    // Editor tools panel\n    // ------------------\n    class ToolsPanel : public Singleton<ToolsPanel>\n    {\n    public:\n        // Default constructor. Initializes all panel\n        ToolsPanel(RefCounter* refCounter);\n\n        // Destructor\n        ~ToolsPanel();\n\n        // Returns panel's widgets\n        const Ref<Widget>& GetPanelWidget() const;\n\n        // Returns play panel's widget\n        const Ref<Widget>& GetPlayPanel() const;\n\n        // Returns tools' panel widget \n        const Ref<HorizontalLayout>& GetToolsPanel() const;\n\n        // Adds tool to panel\n        void AddToolToggle(const Ref<Toggle>& toggle);\n\n        // Removes tool from panel\n        void RemoveToolToggle(const Ref<Toggle>& toggle);\n\n        // Updates panel\n        void Update(float dt);\n\n    protected:\n        const String mDefaultSchemeName = \"Default\";\n        const String mSaveAsSchemeName = \"Save as ...\";\n\n        Ref<Widget> mPanelRoot; // Root panel widget\n\n        Ref<Widget> mPlayPanel;   // Play panel widget\n        Ref<Toggle> mPlayToggle;  // Play toggle\n        Ref<Toggle> mPauseToggle; // Pause toggle\n        Ref<Button> mStepButton;  // Step button\n\n        Ref<HorizontalLayout> mToolsPanel;        // Tools panel layout\n        Ref<ToggleGroup>      mToolsTogglesGroup; // Group for toggles\n\n        Ref<DropDown> mLayoutSchemesList; // Layouts schemes list\n\n    protected:\n        // initializes play panel\n        void InitializePlayPanel();\n\n        // initializes schemes panel\n        void InitializeLayoutSchemesPanel();\n\n        // Initializes tools panel\n        void InitializeToolsPanel();\n\n        // Updates schemes list\n        void UpdateWndLayoutSchemas();\n\n        // Called when selected scheme\n        void OnSchemeSelected(const WString& name);\n\n        // Called when play/stop toggle changed\n        void OnPlayStopToggled(bool play);\n\n        // Called when pause toggle changed\n        void OnPauseToggled(bool pause);\n\n        // Called when step button has pressed\n        void OnStepPressed();\n\n        friend class EditorApplication;\n        friend class EditorConfig;\n    };\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/CurveEditor/CurveActions.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n\n#include \"CurveActions.h\"\n\nnamespace Editor\n{\n    CurveAddKeysAction::CurveAddKeysAction(const Vector<CurvesEditor::CurveKeysInfo>& infos, const Ref<CurvesEditor>& editor) :\n        mInfos(infos), mEditor(editor)\n    {\n        for (auto& info : mInfos)\n        {\n            info.keys.Sort([](const Curve::Key& a, const Curve::Key& b) { return a.position < b.position; });\n        }\n    }\n\n    CurveAddKeysAction::CurveAddKeysAction()\n    { }\n\n    String CurveAddKeysAction::GetName() const\n    {\n        return \"add keys\";\n    }\n\n    void CurveAddKeysAction::Redo()\n    {\n        mEditor->DeselectAll();\n        mEditor->mSelectedHandles.Clear();\n\n        for (auto& info : mInfos)\n        {\n            auto curveInfo = mEditor->mCurves.FindOrDefault([&](auto& x) { \n                return x->curveId == info.curveId; });\n\n            if (!curveInfo)\n                continue;\n\n            curveInfo->BeginCurveManualChange();\n\n            Vector<int> indexes;\n\n            for (auto& key : info.keys)\n                indexes.Add(curveInfo->curve->InsertKey(key));\n\n            curveInfo->UpdateApproximatedPoints();\n            curveInfo->UpdateHandles();\n\n            for (int idx : indexes)\n                curveInfo->handles[idx]->mainHandle->SetSelected(true);\n\n            mEditor->mNeedRedraw = true;\n\n            curveInfo->CompleteCurveManualChange();\n        }\n\n        mEditor->UpdateTransformFrame();\n        mEditor->CheckHandlesVisible();\n    }\n\n    void CurveAddKeysAction::Undo()\n    {\n        for (auto& info : mInfos)\n        {\n            auto curveInfo = mEditor->mCurves.FindOrDefault([&](auto& x) { \n                return x->curveId == info.curveId; });\n\n            if (!curveInfo)\n                continue;\n\n            curveInfo->BeginCurveManualChange();\n\n            for (auto& key : info.keys)\n                curveInfo->curve->RemoveKey(key.position);\n\n            curveInfo->UpdateApproximatedPoints();\n            curveInfo->UpdateHandles();\n            mEditor->mNeedRedraw = true;\n\n            curveInfo->CompleteCurveManualChange();\n        }\n\n        mEditor->DeselectAll();\n        mEditor->mSelectedHandles.Clear();\n        mEditor->UpdateTransformFrame();\n        mEditor->CheckHandlesVisible();\n    }\n\n    CurveDeleteKeysAction::CurveDeleteKeysAction(const Vector<CurvesEditor::CurveKeysInfo>& infos, const Ref<CurvesEditor>& editor) :\n        mInfos(infos), mEditor(editor)\n    {\n        for (auto& info : mInfos)\n        {\n            info.keys.Sort([](const Curve::Key& a, const Curve::Key& b) { return a.position < b.position; });\n        }\n    }\n\n    CurveDeleteKeysAction::CurveDeleteKeysAction()\n    { }\n\n    String CurveDeleteKeysAction::GetName() const\n    {\n        return \"remove keys\";\n    }\n\n    void CurveDeleteKeysAction::Redo()\n    {\n        for (auto& info : mInfos)\n        {\n            auto curveInfo = mEditor->mCurves.FindOrDefault([&](auto& x) { \n                return x->curveId == info.curveId; });\n\n            if (!curveInfo)\n                continue;\n\n            curveInfo->BeginCurveManualChange();\n\n            for (auto& key : info.keys)\n                curveInfo->curve->RemoveKey(key.position);\n\n            curveInfo->UpdateApproximatedPoints();\n            curveInfo->UpdateHandles();\n            mEditor->mNeedRedraw = true;\n\n            curveInfo->CompleteCurveManualChange();\n        }\n\n        mEditor->DeselectAll();\n        mEditor->mSelectedHandles.Clear();\n        mEditor->UpdateTransformFrame();\n        mEditor->CheckHandlesVisible();\n    }\n\n    void CurveDeleteKeysAction::Undo()\n    {\n        mEditor->DeselectAll();\n        mEditor->mSelectedHandles.Clear();\n\n        for (auto& info : mInfos)\n        {\n            auto curveInfo = mEditor->mCurves.FindOrDefault([&](auto& x) { \n                return x->curveId == info.curveId; });\n\n            if (!curveInfo)\n                continue;\n\n            curveInfo->BeginCurveManualChange();\n\n            Vector<int> indexes;\n\n            for (auto& key : info.keys)\n                indexes.Add(curveInfo->curve->InsertKey(key));\n\n            curveInfo->UpdateApproximatedPoints();\n            curveInfo->UpdateHandles();\n\n            for (int idx : indexes)\n                curveInfo->handles[idx]->mainHandle->SetSelected(true);\n\n            mEditor->mNeedRedraw = true;\n\n            curveInfo->CompleteCurveManualChange();\n        }\n\n        mEditor->UpdateTransformFrame();\n        mEditor->CheckHandlesVisible();\n    }\n\n    CurveKeysChangeAction::CurveKeysChangeAction(const Vector<KeysInfo>& infos, const Ref<CurvesEditor>& editor) :\n        mInfos(infos), mEditor(editor)\n    { }\n\n    CurveKeysChangeAction::CurveKeysChangeAction()\n    { }\n\n    bool CurveKeysChangeAction::KeysInfo::operator==(const KeysInfo& other) const\n    {\n        return curveId == other.curveId && beforeKeys == other.beforeKeys && afterKeys == other.afterKeys;\n    }\n\n    String CurveKeysChangeAction::GetName() const\n    {\n        return \"change keys\";\n    }\n\n    void CurveKeysChangeAction::Redo()\n    {\n        mEditor->DeselectAll();\n        mEditor->mSelectedHandles.Clear();\n\n        for (auto& info : mInfos)\n        {\n            auto curveInfo = mEditor->mCurves.FindOrDefault([&](auto& x) { \n                return x->curveId == info.curveId; });\n\n            if (!curveInfo)\n                continue;\n\n            curveInfo->BeginCurveManualChange();\n\n            for (auto& key : info.beforeKeys)\n                curveInfo->curve->RemoveKey(key.position);\n\n            for (auto& key : info.afterKeys)\n                curveInfo->curve->InsertKey(key);\n\n            for (auto& selectedHandles : info.selectedHandles)\n            {\n                auto handles = curveInfo->handles[selectedHandles.index];\n\n                if (selectedHandles.mainHandle)\n                    handles->mainHandle->Select();\n\n                if (selectedHandles.leftSupportHandle)\n                    handles->leftSupportHandle->Select();\n\n                if (selectedHandles.rightSupportHandle)\n                    handles->rightSupportHandle->Select();\n            }\n\n            curveInfo->UpdateApproximatedPoints();\n            curveInfo->UpdateHandles();\n            mEditor->mNeedRedraw = true;\n\n            curveInfo->CompleteCurveManualChange();\n        }\n\n        mEditor->UpdateTransformFrame();\n        mEditor->CheckHandlesVisible();\n    }\n\n    void CurveKeysChangeAction::Undo()\n    {\n        mEditor->DeselectAll();\n        mEditor->mSelectedHandles.Clear();\n\n        for (auto& info : mInfos)\n        {\n            auto curveInfo = mEditor->mCurves.FindOrDefault([&](auto& x) { \n                return x->curveId == info.curveId; });\n\n            if (!curveInfo)\n                continue;\n\n            curveInfo->BeginCurveManualChange();\n\n            for (auto& key : info.afterKeys)\n                curveInfo->curve->RemoveKey(key.position);\n\n            for (auto& key : info.beforeKeys)\n                curveInfo->curve->InsertKey(key);\n\n            for (auto& selectedHandles : info.selectedHandles)\n            {\n                auto handles = curveInfo->handles[selectedHandles.index];\n\n                if (selectedHandles.mainHandle)\n                    handles->mainHandle->Select();\n\n                if (selectedHandles.leftSupportHandle)\n                    handles->leftSupportHandle->Select();\n\n                if (selectedHandles.rightSupportHandle)\n                    handles->rightSupportHandle->Select();\n            }\n\n            curveInfo->UpdateApproximatedPoints();\n            curveInfo->UpdateHandles();\n            mEditor->mNeedRedraw = true;\n\n            curveInfo->CompleteCurveManualChange();\n        }\n\n        mEditor->UpdateTransformFrame();\n        mEditor->CheckHandlesVisible();\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::CurveAddKeysAction, Editor__CurveAddKeysAction);\n\nDECLARE_CLASS(Editor::CurveDeleteKeysAction, Editor__CurveDeleteKeysAction);\n\nDECLARE_CLASS(Editor::CurveKeysChangeAction, Editor__CurveKeysChangeAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/CurveEditor/CurveActions.h",
    "content": "#pragma once\n\n#include \"o2Editor/Actions/IAction.h\"\n#include \"o2Editor/UI/CurveEditor/CurvesEditor.h\"\n\nnamespace Editor\n{\n    // ----------------------------\n    // Add to the curve keys action\n    // ----------------------------\n    class CurveAddKeysAction : public IAction\n    {\n    public:\n        // Default constructor\n        CurveAddKeysAction();\n\n        // Constructor\n        CurveAddKeysAction(const Vector<CurvesEditor::CurveKeysInfo>& infos, const Ref<CurvesEditor>& editor);\n\n        // Get the action name\n        String GetName() const override;\n\n        // Redo the action\n        void Redo() override;\n\n        // Undo the action\n        void Undo() override;\n\n        SERIALIZABLE(CurveAddKeysAction);\n\n    protected:\n        Vector<CurvesEditor::CurveKeysInfo> mInfos;  // Added keys info\n        Ref<CurvesEditor>                   mEditor; // Curves editor\n    };\n\n    // ---------------------------------\n    // Delete from the curve keys action\n    // ---------------------------------\n    class CurveDeleteKeysAction : public IAction\n    {\n    public:\n        // Default constructor\n        CurveDeleteKeysAction();\n\n        // Constructor\n        CurveDeleteKeysAction(const Vector<CurvesEditor::CurveKeysInfo>& infos, const Ref<CurvesEditor>& editor);\n\n        // Get the action name\n        String GetName() const override;\n\n        // Redo the action\n        void Redo() override;\n\n        // Undo the action\n        void Undo() override;\n\n        SERIALIZABLE(CurveDeleteKeysAction);\n\n    protected:\n        Vector<CurvesEditor::CurveKeysInfo> mInfos;  // Deleted keys info\n        Ref<CurvesEditor>                   mEditor; // Curves editor\n    };\n\n    // ----------------------------\n    // Change the curve keys action\n    // ----------------------------\n    class CurveKeysChangeAction : public IAction\n    {\n    public:\n        struct KeysInfo\n        {\n            String curveId;\n\n            Vector<Curve::Key> beforeKeys;\n            Vector<Curve::Key> afterKeys;\n\n            Vector<CurvesEditor::SelectedHandlesInfo> selectedHandles;\n\n            bool operator==(const KeysInfo& other) const;\n        };\n\n    public:\n        // Default constructor\n        CurveKeysChangeAction();\n\n        // Constructor\n        CurveKeysChangeAction(const Vector<KeysInfo>& infos, const Ref<CurvesEditor>& editor);\n\n        // Get the action name\n        String GetName() const override;\n\n        // Redo the action\n        void Redo() override;\n\n        // Undo the action\n        void Undo() override;\n\n        SERIALIZABLE(CurveKeysChangeAction);\n\n    protected:\n        Vector<KeysInfo>  mInfos;  // Changed keys info\n        Ref<CurvesEditor> mEditor; // Curves editor\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::CurveAddKeysAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CurveAddKeysAction)\n{\n    FIELD().PROTECTED().NAME(mInfos);\n    FIELD().PROTECTED().NAME(mEditor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CurveAddKeysAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<CurvesEditor::CurveKeysInfo>&, const Ref<CurvesEditor>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::CurveDeleteKeysAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CurveDeleteKeysAction)\n{\n    FIELD().PROTECTED().NAME(mInfos);\n    FIELD().PROTECTED().NAME(mEditor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CurveDeleteKeysAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<CurvesEditor::CurveKeysInfo>&, const Ref<CurvesEditor>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::CurveKeysChangeAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CurveKeysChangeAction)\n{\n    FIELD().PROTECTED().NAME(mInfos);\n    FIELD().PROTECTED().NAME(mEditor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CurveKeysChangeAction)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<KeysInfo>&, const Ref<CurvesEditor>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/CurveEditor/CurvesEditor.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"CurvesEditor.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n#include \"o2/Utils/System/Clipboard.h\"\n#include \"o2Editor/Dialogs/KeyEditDlg.h\"\n#include \"o2Editor/UI/CurveEditor/CurveActions.h\"\n#include \"o2Editor/UIRoot.h\"\n\nnamespace Editor\n{\n    CurvesEditor::CurvesEditor(RefCounter* refCounter):\n        FrameScrollView(refCounter), SelectableDragHandlesGroup(refCounter)\n    {\n        mReady = false;\n\n        mSelectionSprite = mmake<Sprite>();\n        mTextFont = AssetRef<VectorFontAsset>(\"stdFont.ttf\")->GetFont();\n        mTextFont->CheckCharacters(\"0123456789.,+-\", 10);\n\n        mCurvesMesh = mmake<Mesh>();\n        mCurvesMesh->Resize(4, 2);\n\n        InitializeTextDrawables();\n        InitializeContextMenu();\n\n        mTransformFrame = mmake<FrameHandles>();\n        mTransformFrame->SetPivotEnabled(false);\n        mTransformFrame->SetRotationEnabled(false);\n        mTransformFrame->onTransformed = THIS_FUNC(OnTransformFrameTransformed);\n        mTransformFrame->onPressed = THIS_FUNC(OnTransformBegin);\n        mTransformFrame->onChangeCompleted = THIS_FUNC(OnTransformCompleted);\n        mTransformFrame->messageFallDownListener = this;\n\n        mBackColor = Color4(225, 232, 232, 255);\n\n        mHandleSamplesStubInfo = mmake<CurveInfo>();\n        mHandleSamplesStubInfo->editor = Ref(this);\n\n        mReady = true;\n    }\n\n    CurvesEditor::CurvesEditor(RefCounter* refCounter, const CurvesEditor& other):\n        FrameScrollView(refCounter, other), SelectableDragHandlesGroup(refCounter), mSelectionSprite(other.mSelectionSprite->CloneAs<Sprite>()), mTextFont(other.mTextFont)\n    {\n        mReady = false;\n\n        mHandleSamplesStubInfo = mmake<CurveInfo>();\n        mHandleSamplesStubInfo->editor = Ref(this);\n\n        mContextMenu = FindChildByType<ContextMenu>();\n\n        InitializeTextDrawables();\n        InitializeContextMenu();\n        RetargetStatesAnimations();\n\n        mReady = true;\n    }\n\n    CurvesEditor::~CurvesEditor()\n    {}\n\n    Editor::CurvesEditor& CurvesEditor::operator=(const CurvesEditor& other)\n    {\n        FrameScrollView::operator=(other);\n\n        mReady = false;\n\n        mSelectionSprite = other.mSelectionSprite->CloneAsRef<Sprite>();\n        mTextFont = other.mTextFont;\n\n        mMainHandleSample = other.mMainHandleSample;\n        mSupportHandleSample = other.mSupportHandleSample;\n        mRangeHandleSample = other.mRangeHandleSample;\n\n        InitializeTextDrawables();\n        RetargetStatesAnimations();\n\n        mReady = true;\n\n        return *this;\n    }\n\n    void CurvesEditor::Draw()\n    {\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        FrameScrollView::Draw();\n\n        o2Render.EnableScissorTest(layout->GetWorldRect());\n\n        DrawTransformFrame();\n        DrawHandles();\n        DrawSelection();\n\n        o2Render.DisableScissorTest();\n    }\n\n    void CurvesEditor::Update(float dt)\n    {\n        FrameScrollView::Update(dt);\n\n        if (mReady && mResEnabledInHierarchy && !mIsClipped && mNeedAdjustView)\n        {\n            mNeedAdjustView = false;\n            mViewCameraTargetScale = mAvailableArea.Size()/mViewCamera.GetSize();\n            mViewCamera.center = mAvailableArea.Center();\n            mViewCameraTargetPos = mViewCamera.position;\n        }\n    }\n\n    Map<String, Ref<Curve>> CurvesEditor::GetCurves() const\n    {\n        Map<String, Ref<Curve>> res;\n        for (auto& curveInfo : mCurves)\n            res.Add(curveInfo->curveId, curveInfo->curve);\n\n        return res;\n    }\n\n    void CurvesEditor::AddCurve(const String& id, const Ref<Curve>& curve, const Color4& color /*= Color4(44, 62, 80)*/)\n    {\n        UpdateSelfTransform();\n\n        auto info = mmake<CurveInfo>();\n        info->editor = Ref(this);\n        info->curveId = id;\n        info->curve = curve;\n\n        info->AdjustScale();\n\n        info->curve->onKeysChanged += MakeFunction(info.Get(), &CurveInfo::OnCurveChanged);\n\n        if (color == Color4(44, 62, 80) && !mCurves.IsEmpty())\n            info->color = Color4::SomeColor(mCurves.Count());\n        else\n            info->color = color;\n\n        for (int i = 0; i < curve->GetKeys().Count(); i++)\n            AddCurveKeyHandles(info, i);\n\n        mCurves.Add(info);\n        RecalculateViewArea();\n\n        if (mCurves.Count() == 1)\n            mNeedAdjustView = true;\n    }\n\n    void CurvesEditor::RemoveCurve(const Ref<Curve>& curve)\n    {\n        for (auto& info : mCurves)\n        {\n            if (info->curve == curve)\n            {\n                for (auto& handle : info->handles)\n                {\n                    handle->mainHandle->SetSelectionGroup(nullptr);\n\n                    handle->leftSupportHandle->SetSelectionGroup(nullptr);\n                    mSupportHandles.Remove(handle->leftSupportHandle);\n\n                    handle->rightSupportHandle->SetSelectionGroup(nullptr);\n                    mSupportHandles.Remove(handle->rightSupportHandle);\n                }\n\n                mCurves.Remove(info);\n                break;\n            }\n        }\n    }\n\n    void CurvesEditor::RemoveCurve(const String& id)\n    {\n        auto curve = FindCurve(id);\n        if (curve)\n            RemoveCurve(curve);\n    }\n\n    void CurvesEditor::RemoveAllCurves()\n    {\n        auto curves = mCurves;\n        for (auto& info : curves)\n            RemoveCurve(info->curve);\n    }\n\n    void CurvesEditor::SetCurveColor(const Ref<Curve>& curve, const Color4& color)\n    {\n        for (auto& info : mCurves)\n        {\n            if (info->curve == curve)\n            {\n                info->color = color;\n\n                for (auto& handle : info->handles)\n                    handle->mainHandle->SetDrawablesColor(color);\n\n                break;\n            }\n        }\n    }\n\n    void CurvesEditor::UpdateSelfTransform()\n    {\n        FrameScrollView::UpdateSelfTransform();\n\n        UpdateLocalScreenTransforms();\n        OnCameraTransformChanged();\n    }\n\n    const Ref<ContextMenu>& CurvesEditor::GetContextMenu() const\n    {\n        return mContextMenu;\n    }\n\n    Ref<RefCounterable> CurvesEditor::CastToRefCounterable(const Ref<CurvesEditor>& ref)\n    {\n        return DynamicCast<FrameScrollView>(ref);\n    }\n\n    void CurvesEditor::SetSelectionSpriteImage(const AssetRef<ImageAsset>& image)\n    {\n        mSelectionSprite->LoadFromImage(image);\n    }\n\n    void CurvesEditor::SetTextFont(const Ref<Font>& font)\n    {\n        mTextFont = font;\n        mTextLeft->SetFont(mTextFont);\n        mTextRight->SetFont(mTextFont);\n        mTextTop->SetFont(mTextFont);\n        mTextBottom->SetFont(mTextFont);\n    }\n\n    void CurvesEditor::SetTextBorder(const BorderF& border)\n    {\n        mTextBorder = border;\n    }\n\n    void CurvesEditor::SetMainHandleImages(const AssetRef<ImageAsset>& regular, const AssetRef<ImageAsset>& hover,\n                                           const AssetRef<ImageAsset>& pressed, const AssetRef<ImageAsset>& selected)\n    {\n        mMainHandleSample.curveInfo = mHandleSamplesStubInfo;\n        mMainHandleSample = CurveHandle(mmake<Sprite>(regular), mmake<Sprite>(hover),\n                                        mmake<Sprite>(pressed), mmake<Sprite>(selected));\n    }\n\n    void CurvesEditor::SetSupportHandleImages(const AssetRef<ImageAsset>& regular, const AssetRef<ImageAsset>& hover, \n                                              const AssetRef<ImageAsset>& pressed, const AssetRef<ImageAsset>& selected)\n    {\n        mSupportHandleSample.curveInfo = mHandleSamplesStubInfo;\n        mSupportHandleSample = CurveHandle(mmake<Sprite>(regular), mmake<Sprite>(hover),\n                                           mmake<Sprite>(pressed), mmake<Sprite>(selected));\n    }\n\n    void CurvesEditor::SetRangeHandleImages(const AssetRef<ImageAsset>& regular, const AssetRef<ImageAsset>& hover, \n                                            const AssetRef<ImageAsset>& pressed, const AssetRef<ImageAsset>& selected)\n    {\n        mRangeHandleSample.curveInfo = mHandleSamplesStubInfo;\n        mRangeHandleSample = CurveHandle(mmake<Sprite>(regular), mmake<Sprite>(hover),\n                                         mmake<Sprite>(pressed), mmake<Sprite>(selected));\n    }\n\n    void CurvesEditor::SetAdjustCurvesScale(bool enable)\n    {\n        mAdjustCurvesScale = enable;\n\n        for (auto& curve : mCurves) {\n            curve->AdjustScale();\n        }\n\n        RecalculateViewArea();\n\n        mNeedRedraw = true;\n        mNeedAdjustView = true;\n    }\n\n\tvoid CurvesEditor::OnFocusedByRoot()\n\t{\n\t\tmContextMenu->SetItemsMaxPriority();\n\t}\n\n\tvoid CurvesEditor::OnUnfocusedByRoot()\n\t{}\n\n\tvoid CurvesEditor::OnScrolled(float scroll)\n    {\n        Vec2F newScale = mViewCameraTargetScale;\n\n        if (o2Input.IsKeyDown(VK_CONTROL))\n            newScale.x *= 1.0f - (scroll*mViewCameraScaleSence);\n        else if (o2Input.IsKeyDown(VK_SHIFT))\n            newScale.y *= 1.0f - (scroll*mViewCameraScaleSence);\n        else\n            newScale *= 1.0f - (scroll*mViewCameraScaleSence);\n\n        ChangeCameraScaleRelativeToCursor(newScale);\n    }\n\n    Ref<Curve> CurvesEditor::FindCurve(const String& id)\n    {\n        for (auto& curve : mCurves)\n        {\n            if (curve->curveId == id)\n                return curve->curve;\n        }\n\n        return nullptr;\n    }\n\n    void CurvesEditor::InitializeContextMenu()\n    {\n        mContextMenu = o2UI.CreateWidget<ContextMenu>();\n\n        mContextMenu->AddItems( {\n            mmake<ContextMenu::Item>(\"Auto smooth\", false, [&](bool) { SetHandlesTypesChecked(Curve::Key::Type::Smooth); }),\n            mmake<ContextMenu::Item>(\"Flat\", false, [&](bool) { SetHandlesTypesChecked(Curve::Key::Type::Flat); }),\n            mmake<ContextMenu::Item>(\"Free\", false, [&](bool) { SetHandlesTypesChecked(Curve::Key::Type::Free); }),\n            mmake<ContextMenu::Item>(\"Linear\", false, [&](bool) { SetHandlesTypesChecked(Curve::Key::Type::Linear); }),\n            mmake<ContextMenu::Item>(\"Broken\", false, [&](bool) { SetHandlesTypesChecked(Curve::Key::Type::Broken); }),\n            mmake<ContextMenu::Item>(\"Discrete\", false, [&](bool) { SetHandlesTypesChecked(Curve::Key::Type::Discrete); }),\n\n            ContextMenu::Item::Separator(),\n\n            mmake<ContextMenu::Item>(\"Edit\", THIS_FUNC(OnEditPressed)),\n\n            ContextMenu::Item::Separator(),\n\n            mmake<ContextMenu::Item>(\"Copy keys\", THIS_FUNC(OnCopyPressed), \"\", AssetRef<ImageAsset>(), ShortcutKeys({VK_C, VK_CTRL_CMD})),\n            mmake<ContextMenu::Item>(\"Cut keys\", THIS_FUNC(OnCutPressed), \"\", AssetRef<ImageAsset>(), ShortcutKeys({VK_X, VK_CTRL_CMD})),\n            mmake<ContextMenu::Item>(\"Paste keys\", THIS_FUNC(OnPastePressed), \"\", AssetRef<ImageAsset>(), ShortcutKeys({VK_V, VK_CTRL_CMD})),\n            mmake<ContextMenu::Item>(\"Delete keys\", THIS_FUNC(OnDeletePressed), \"\", AssetRef<ImageAsset>(), ShortcutKeys({VK_DELETE})),\n            mmake<ContextMenu::Item>(\"Insert key\", THIS_FUNC(OnInsertPressed)),\n\n            ContextMenu::Item::Separator(),\n\n            mmake<ContextMenu::Item>(\"Undo\", THIS_FUNC(OnUndoPressed), \"\", AssetRef<ImageAsset>(), ShortcutKeys({VK_Z, VK_CTRL_CMD})),\n            mmake<ContextMenu::Item>(\"Redo\", THIS_FUNC(OnRedoPressed), \"\", AssetRef<ImageAsset>(), ShortcutKeys({VK_Z, VK_CTRL_CMD, VK_SHIFT}))\n            }\n        );\n\n        onShow = [&]() { mContextMenu->SetItemsMaxPriority(); };\n        onHide = [&]() { mContextMenu->SetItemsMinPriority(); };\n\n        AddChild(mContextMenu);\n    }\n\n    void CurvesEditor::InitializeTextDrawables()\n    {\n        mTextLeft = mmake<Text>(mTextFont);\n        mTextLeft->SetHeight(10);\n        mTextLeft->SetHorAlign(HorAlign::Left);\n        mTextLeft->SetVerAlign(VerAlign::Bottom);\n        mTextLeft->color = Color4(96, 125, 139);\n\n        mTextRight = mmake<Text>(mTextFont);\n        mTextRight->SetHeight(10);\n        mTextRight->SetHorAlign(HorAlign::Right);\n        mTextRight->SetVerAlign(VerAlign::Bottom);\n        mTextRight->color = Color4(96, 125, 139);\n\n\n        mTextTop = mmake<Text>(mTextFont);\n        mTextTop->SetHeight(10);\n        mTextTop->SetHorAlign(HorAlign::Left);\n        mTextTop->SetVerAlign(VerAlign::Bottom);\n        mTextTop->SetAngleDegrees(-90.0f);\n        mTextTop->color = Color4(96, 125, 139);\n\n\n        mTextBottom = mmake<Text>(mTextFont);\n        mTextBottom->SetHeight(10);\n        mTextBottom->SetHorAlign(HorAlign::Right);\n        mTextBottom->SetVerAlign(VerAlign::Bottom);\n        mTextBottom->SetAngleDegrees(-90.0f);\n        mTextBottom->color = Color4(96, 125, 139);\n    }\n\n    void CurvesEditor::RecalculateViewArea()\n    {\n        if (mCurves.IsEmpty())\n        {\n            mAvailableArea = RectF(0, 0, 1, 1);\n            return;\n        }\n\n        Vec2F firstPoint;\n        if (!mCurves.Last()->approximatedPoints.IsEmpty())\n            firstPoint = mCurves.Last()->approximatedPoints.Last().first;\n\n        mAvailableArea = RectF(firstPoint, firstPoint);\n\n        for (auto& curve : mCurves)\n        {\n            for (auto& p : curve->approximatedPoints)\n            {\n                mAvailableArea.left = Math::Min(mAvailableArea.left, p.first.x);\n                mAvailableArea.right = Math::Max(mAvailableArea.right, p.first.x);\n                mAvailableArea.top = Math::Max(mAvailableArea.top, p.first.y);\n                mAvailableArea.bottom = Math::Min(mAvailableArea.bottom, p.first.y);\n\n                mAvailableArea.left = Math::Min(mAvailableArea.left, p.second.x);\n                mAvailableArea.right = Math::Max(mAvailableArea.right, p.second.x);\n                mAvailableArea.top = Math::Max(mAvailableArea.top, p.second.y);\n                mAvailableArea.bottom = Math::Min(mAvailableArea.bottom, p.second.y);\n            }\n        }\n\n        float bordersCoef = 1.5f;\n        Vec2F size = mAvailableArea.Size();\n        mAvailableArea.left -= size.x*bordersCoef;\n        mAvailableArea.right += size.x*bordersCoef;\n        mAvailableArea.top += size.y*bordersCoef;\n        mAvailableArea.bottom -= size.y*bordersCoef;\n\n        mHorScrollbar->SetValueRange(mAvailableArea.left, mAvailableArea.right);\n        mVerScrollbar->SetValueRange(mAvailableArea.bottom, mAvailableArea.top);\n    }\n\n    void CurvesEditor::RedrawContent()\n    {\n        DrawGrid();\n        DrawCurves();\n    }\n\n    void CurvesEditor::DrawGrid()\n    {\n        // Screen -> Local -> Curve View\n\n        Vec2F gridScale(1, 1);\n        Vec2F gridOffset(0, 0);\n\n        bool allSameCurve = !mSelectedHandles.IsEmpty() && mSelectedHandles.All([&](const Ref<DragHandle>& x) {\n            return DynamicCast<CurveHandle>(x)->curveInfo == DynamicCast<CurveHandle>(mSelectedHandles[0])->curveInfo;\n        });\n\n        if (allSameCurve)\n        {\n            auto curvehandle = DynamicCast<CurveHandle>(mSelectedHandles[0]);\n            gridScale = curvehandle->curveInfo->viewScale;\n            gridOffset = curvehandle->curveInfo->viewOffset;\n        }\n\n        bool unknownScale = mAdjustCurvesScale && !allSameCurve;\n\n        if (unknownScale && mCurves.Count() == 1) {\n            gridScale = mCurves[0]->viewScale;\n            gridOffset = mCurves[0]->viewOffset;\n            unknownScale = false;\n        }\n\n        RectF localCameraRect = mViewCamera.GetRect();\n        RectF curveViewCameraRect(LocalToCurveView(localCameraRect.LeftTop(), gridScale, gridOffset),\n                                  LocalToCurveView(localCameraRect.RightBottom(), gridScale, gridOffset));\n\n        Camera screenCamera;\n        RectF screenCameraRect = screenCamera.GetRect();\n\n        auto camTransformBasis = mViewCamera.GetBasis().Inverted()*screenCamera.GetBasis();\n        auto localToScreen = [&](const Vec2F& point) { return point*camTransformBasis; };\n\n        o2Render.SetCamera(screenCamera);\n\n        float minCellSize = 0.000001f;\n        float maxCellSize = 1000000.0f;\n        Vec2F curveViewCellSize(minCellSize, minCellSize);\n        Vec2F optimalCurveViewCellSize = curveViewCameraRect.Size()/2.0f;\n\n        while (curveViewCellSize.x < maxCellSize)\n        {\n            float next = curveViewCellSize.x*10.0f;\n            if (optimalCurveViewCellSize.x > curveViewCellSize.x && optimalCurveViewCellSize.x <= next)\n                break;\n\n            curveViewCellSize.x = next;\n        }\n\n        while (curveViewCellSize.y < maxCellSize)\n        {\n            float next = curveViewCellSize.y*10.0f;\n            if (optimalCurveViewCellSize.y > curveViewCellSize.y && optimalCurveViewCellSize.y <= next)\n                break;\n\n            curveViewCellSize.y = next;\n        }\n\n        Vec2F localCellSize = CurveViewToLocal(curveViewCellSize, gridScale, gridOffset) -\n            CurveViewToLocal(Vec2F(), gridScale, gridOffset);\n\n        Vec2F screenCellSize = localToScreen(localCellSize) - localToScreen(Vec2F());\n\n        Vec2F gridCurveViewOrigin(Math::Round(curveViewCameraRect.Center().x/curveViewCellSize.x)*curveViewCellSize.x,\n                                  Math::Round(curveViewCameraRect.Center().y/curveViewCellSize.y)*curveViewCellSize.y);\n\n        Vec2F gridLocalOrigin = CurveViewToLocal(gridCurveViewOrigin, gridScale, gridOffset);\n        Vec2F gridScreenOrigin = localToScreen(gridLocalOrigin);\n\n        Vec2I cellsCount(Math::CeilToInt(curveViewCameraRect.Width()/curveViewCellSize.x),\n                         Math::CeilToInt(curveViewCameraRect.Height()/curveViewCellSize.y));\n\n        Color4 cellColorSmoothed = Math::Lerp(mGridColor, mBackColor, 0.7f);\n\n        Vec2F tenCurveViewCellSize = curveViewCellSize*10.0f;\n\n        if (o2Input.IsKeyDown(VK_F1))\n        {\n            o2Render.DrawCross(gridScreenOrigin, 5, Color4::Red());\n            mTextLeft->SetScale(Vec2F(1, 1));\n            mTextLeft->SetText(String(gridCurveViewOrigin) + \"\\n\" + String(curveViewCellSize));\n            mTextLeft->SetPosition(gridScreenOrigin);\n            mTextLeft->Draw();\n\n            mTextTop->SetScale(Vec2F(1, 1));\n            mTextTop->SetText(String(curveViewCameraRect.top));\n            mTextTop->SetPosition(Vec2F(0, screenCameraRect.top));\n            mTextTop->Draw();\n\n            mTextBottom->SetScale(Vec2F(1, 1));\n            mTextBottom->SetText(String(curveViewCameraRect.bottom));\n            mTextBottom->SetPosition(Vec2F(0, screenCameraRect.bottom));\n            mTextBottom->Draw();\n\n            mTextLeft->SetScale(Vec2F(1, 1));\n            mTextLeft->SetText(String(curveViewCameraRect.left));\n            mTextLeft->SetPosition(Vec2F(screenCameraRect.left, 0));\n            mTextLeft->Draw();\n\n            mTextRight->SetScale(Vec2F(1, 1));\n            mTextRight->SetText(String(curveViewCameraRect.right));\n            mTextRight->SetPosition(Vec2F(screenCameraRect.right, 0));\n            mTextRight->Draw();\n        }\n\n        // Y\n        if (horGridEnabled)\n        {\n            for (int i = -cellsCount.y/2; i < cellsCount.y/2; i++)\n            {\n                float d = (float)i*screenCellSize.y;\n                float f = (gridCurveViewOrigin.y + (float)i*curveViewCellSize.y)/tenCurveViewCellSize.y;\n                float rdy = Math::Abs(f - Math::Floor(f));\n                bool yTen = rdy < 0.05f || rdy > 0.95f;\n\n                Vec2F xBegin = Vec2F(screenCameraRect.left, Math::Round(d + gridScreenOrigin.y));\n                Vec2F xEnd = Vec2F(screenCameraRect.right, Math::Round(d + gridScreenOrigin.y));\n\n                o2Render.DrawAALine(xBegin, xEnd, yTen ? mGridColor : cellColorSmoothed);\n            }\n        }\n\n        // X\n        if (verGridEnabled)\n        {\n            for (int i = -cellsCount.x/2; i < cellsCount.x/2; i++)\n            {\n                float d = (float)i*screenCellSize.x;\n\n                float f = (gridCurveViewOrigin.x + (float)i*curveViewCellSize.x)/tenCurveViewCellSize.x;\n                float rdx = Math::Abs(f - Math::Floor(f));\n                bool xTen = rdx < 0.05f || rdx > 0.95f;\n\n                Vec2F yBegin = Vec2F(Math::Round(d + gridScreenOrigin.x), screenCameraRect.bottom);\n                Vec2F yEnd = Vec2F(Math::Round(d + gridScreenOrigin.x), screenCameraRect.top);\n\n                o2Render.DrawAALine(yBegin, yEnd, xTen ? mGridColor : cellColorSmoothed);\n            }\n        }\n\n        if (unknownScale)\n            return;\n\n        char buf[255];\n\n        // Y\n        if (horGridEnabled)\n        {\n            for (int i = -cellsCount.y/2; i < cellsCount.y/2; i++)\n            {\n                float y = (float)i*screenCellSize.y + gridScreenOrigin.y;\n                float yc = (float)i*curveViewCellSize.y + gridCurveViewOrigin.y;\n\n                sprintf(buf, \"%.1f\", (Math::Round(yc*10.0f)/10.0f));\n                String yCaption = buf;\n\n                if (horGridEnabled)\n                {\n                    mTextLeft->SetText(yCaption);\n                    mTextLeft->SetPosition(Vec2F(screenCameraRect.left + mTextBorder.left, y));\n                    mTextLeft->Draw();\n\n                    mTextRight->SetText(yCaption);\n                    mTextRight->SetPosition(Vec2F(screenCameraRect.right - mTextBorder.right, y));\n                    mTextRight->Draw();\n                }\n            }\n        }\n\n        // X\n        if (verGridEnabled)\n        {\n            for (int i = -cellsCount.x/2; i < cellsCount.x/2; i++)\n            {\n                float x = (float)i*screenCellSize.x + gridScreenOrigin.x;\n                float xc = (float)i*curveViewCellSize.x + gridCurveViewOrigin.x;\n\n                sprintf(buf, \"%.1f\", (Math::Round(xc*10.0f)/10.0f));\n                String xCaption = buf;\n\n                if (verGridEnabled)\n                {\n                    mTextTop->SetText(xCaption);\n                    mTextTop->SetPosition(Vec2F(x, screenCameraRect.top - mTextBorder.top));\n                    mTextTop->Draw();\n\n                    mTextBottom->SetText(xCaption);\n                    mTextBottom->SetPosition(Vec2F(x, screenCameraRect.bottom + mTextBorder.bottom));\n                    mTextBottom->Draw();\n                }\n            }\n        }\n\n        o2Render.SetCamera(mViewCamera);\n    }\n\n    void CurvesEditor::DrawCurves()\n    {\n        o2Render.camera = Camera();\n\n        Basis transform = mViewCamera.GetBasis().Inverted()*Camera().GetBasis();\n\n        for (auto& curve : mCurves)\n        {\n            if (curve->approximatedPoints.IsEmpty())\n                continue;\n\n            //o2Render.DrawLine(curve->approximatedPoints, curve->color);\n\n            Vertex* verts = mCurvesMesh->GetVertices<Vertex>();\n            VertexIndex* idx = mCurvesMesh->GetIndexes();\n            float cameraLeftPos = mViewCamera.GetRect().left;\n            float cameraRightPos = mViewCamera.GetRect().right;\n            for (int i = 1; i < curve->approximatedPoints.Count(); i++)\n            {\n                auto& left = curve->approximatedPoints[i - 1];\n                auto& right = curve->approximatedPoints[i];\n\n                if (right.first.x < cameraLeftPos)\n                    continue;\n\n                if (left.first.x > cameraRightPos)\n                    break;\n\n                Vec2F leftTop = left.first*transform;\n                Vec2F leftBottom = left.second*transform;\n                Vec2F rightTop = right.first*transform;\n                Vec2F rightBottom = right.second*transform;\n\n                Color4 meshColor = curve->color;\n                meshColor.a /= 2;\n\n                verts[0] = Vertex(leftTop, meshColor.ABGR(), 0, 0);\n                verts[1] = Vertex(leftBottom, meshColor.ABGR(), 0, 0);\n                verts[2] = Vertex(rightTop, meshColor.ABGR(), 0, 0);\n                verts[3] = Vertex(rightBottom, meshColor.ABGR(), 0, 0);\n\n                idx[0] = 0; idx[1] = 1; idx[2] = 2;\n                idx[3] = 2; idx[4] = 1; idx[5] = 3;\n\n                mCurvesMesh->vertexCount = 4;\n                mCurvesMesh->polyCount = 2;\n\n                mCurvesMesh->Draw();\n\n                o2Render.DrawAALine(leftTop, rightTop, curve->color);\n                o2Render.DrawAALine(leftBottom, rightBottom, curve->color);\n            }\n        }\n\n        o2Render.camera = mViewCamera;\n    }\n\n    void CurvesEditor::DrawHandles()\n    {\n        for (auto& curve : mCurves)\n        {\n            for (auto& keyHandles : curve->handles)\n                keyHandles->Draw(layout->GetWorldRect());\n        }\n    }\n\n    void CurvesEditor::DrawSelection()\n    {\n        if (mIsPressed)\n        {\n            mSelectionSprite->rect = RectF(LocalToScreenPoint(mSelectingPressedPoint), o2Input.cursorPos);\n            mSelectionSprite->Draw();\n        }\n    }\n\n    void CurvesEditor::DrawTransformFrame()\n    {\n        if (!mTransformFrameVisible)\n            return;\n\n        Vec2F borders(10, 10);\n\n        mTransformFrame->SetBasis(Basis(LocalToScreenPoint(mTransformFrameBasis.origin) - borders,\n                                 mTransformFrameBasis.xv/mViewCamera.GetScale() + Vec2F(borders.x*2.0f, 0),\n                                 mTransformFrameBasis.yv/mViewCamera.GetScale() + Vec2F(0, borders.y*2.0f)));\n\n        mTransformFrame->Draw();\n\n        if (o2Input.IsKeyDown(VK_CONTROL))\n        {\n            Vec2F left = mTransformFrame->GetCurrentBasis().origin;\n            Vec2F right = mTransformFrame->GetCurrentBasis().origin + mTransformFrame->GetCurrentBasis().xv;\n            RectF rect = layout->worldRect;\n\n            o2Render.DrawAALine(Vec2F(right.x, rect.bottom), Vec2F(right.x, rect.top), mTransformFrame->GetFrameColor());\n            o2Render.DrawAALine(Vec2F(left.x, rect.bottom), Vec2F(left.x, rect.top), mTransformFrame->GetFrameColor());\n        }\n    }\n\n#undef DrawText\n\n    void CurvesEditor::AddCurveKeyHandles(const Ref<CurveInfo>& info, int keyId)\n    {\n        PushEditorScopeOnStack scope;\n\n        auto keyHandles = mmake<KeyHandles>(mMainHandleSample, mSupportHandleSample, mRangeHandleSample, Ref(this), info->color);\n        keyHandles->curveKeyIdx = keyId;\n        keyHandles->curveKeyUid = info->curve->GetKeyAt(keyId).uid;\n\n        Curve::Key curveKey = info->curve->GetKeyAt(keyId);\n        Curve::Key lastCurveKey = info->curve->GetKeyAt(Math::Max(0, keyId - 1));\n        Curve::Key nextCurveKey = info->curve->GetKeyAt(Math::Min(keyId + 1, info->curve->GetKeys().Count()));\n\n        // main \n        keyHandles->mainHandle->curveInfo = info;\n        keyHandles->mainHandle->SetPosition(Vec2F(curveKey.position, curveKey.value));\n        keyHandles->mainHandle->onChangedPos = [=](const Vec2F& pos) { OnCurveKeyMainHandleDragged(info, keyHandles, pos); };\n        keyHandles->mainHandle->onRightButtonReleased = THIS_FUNC(OnCursorRightMouseReleased);\n        keyHandles->mainHandle->onPressed = [=]() { OnCurveKeyMainHandlePressed(info, keyHandles); };\n        keyHandles->mainHandle->onChangeCompleted = THIS_FUNC(OnTransformCompleted);\n        keyHandles->mainHandle->messageFallDownListener = this;\n\n        keyHandles->mainHandle->onDraw = [=]() {\n            if (o2Input.IsKeyDown(VK_F1))\n                o2Debug.DrawText(keyHandles->mainHandle->GetScreenPosition(), String(keyHandles->curveKeyIdx));\n        };\n\n\n        // left support handle\n        keyHandles->leftSupportHandle->curveInfo = info;\n        keyHandles->leftSupportHandle->SetPosition(Vec2F(curveKey.position + curveKey.leftSupportPosition,\n                                                  curveKey.value + curveKey.leftSupportValue));\n\n        keyHandles->leftSupportHandle->onChangedPos =\n            [=](const Vec2F& pos) { OnCurveKeyLeftSupportHandleDragged(info, keyHandles, pos); };\n\n        keyHandles->leftSupportHandle->checkPositionFunc =\n            [=](const Vec2F& pos) { return CheckLeftSupportHandlePosition(info, keyHandles, pos); };\n\n        keyHandles->leftSupportHandle->enabled = false;\n        keyHandles->leftSupportHandle->onRightButtonReleased = THIS_FUNC(OnCursorRightMouseReleased);\n        keyHandles->leftSupportHandle->onPressed = THIS_FUNC(OnTransformBegin);\n        keyHandles->leftSupportHandle->onChangeCompleted = THIS_FUNC(OnTransformCompleted);\n        keyHandles->leftSupportHandle->messageFallDownListener = this;\n\n\n        // right support handle\n        keyHandles->rightSupportHandle->curveInfo = info;\n        keyHandles->rightSupportHandle->SetPosition(Vec2F(curveKey.position + curveKey.rightSupportPosition,\n                                                   curveKey.value + curveKey.rightSupportValue));\n\n        keyHandles->rightSupportHandle->onChangedPos =\n            [=](const Vec2F& pos) { OnCurveKeyRightSupportHandleDragged(info, keyHandles, pos); };\n\n        keyHandles->rightSupportHandle->checkPositionFunc =\n            [=](const Vec2F& pos) { return CheckRightSupportHandlePosition(info, keyHandles, pos); };\n\n        keyHandles->rightSupportHandle->enabled = false;\n        keyHandles->rightSupportHandle->onRightButtonReleased = THIS_FUNC(OnCursorRightMouseReleased);\n        keyHandles->rightSupportHandle->onPressed = THIS_FUNC(OnTransformBegin);\n        keyHandles->rightSupportHandle->onChangeCompleted = THIS_FUNC(OnTransformCompleted);\n        keyHandles->rightSupportHandle->messageFallDownListener = this;\n\n\n        // Top range handle\n        keyHandles->topRangeHandle->curveInfo = info;\n        keyHandles->topRangeHandle->SetPosition(Vec2F(curveKey.position, curveKey.value + curveKey.valueRange*0.5f));\n\n        keyHandles->topRangeHandle->onChangedPos =\n            [=](const Vec2F& pos) { OnCurveKeyTopRangeHandleDragged(info, keyHandles, pos); };\n\n        keyHandles->topRangeHandle->checkPositionFunc =\n            [=](const Vec2F& pos) { return CheckTopRangeHandlePosition(info, keyHandles, pos); };\n\n        keyHandles->topRangeHandle->enabled = false;\n        keyHandles->topRangeHandle->onRightButtonReleased = THIS_FUNC(OnCursorRightMouseReleased);\n        keyHandles->topRangeHandle->onPressed = THIS_FUNC(OnTransformBegin);\n        keyHandles->topRangeHandle->onChangeCompleted = THIS_FUNC(OnTransformCompleted);\n        keyHandles->topRangeHandle->messageFallDownListener = this;\n        keyHandles->topRangeHandle->cursorType = CursorType::SizeNS;\n        keyHandles->topRangeHandle->angle = Math::PI()*0.5f;\n\n\n        // Bottom range handle\n        keyHandles->bottomRangeHandle->curveInfo = info;\n        keyHandles->bottomRangeHandle->SetPosition(Vec2F(curveKey.position, curveKey.value - curveKey.valueRange*0.5f));\n\n        keyHandles->bottomRangeHandle->onChangedPos =\n            [=](const Vec2F& pos) { OnCurveKeyBottomRangeHandleDragged(info, keyHandles, pos); };\n\n        keyHandles->bottomRangeHandle->checkPositionFunc =\n            [=](const Vec2F& pos) { return CheckBottomRangeHandlePosition(info, keyHandles, pos); };\n\n        keyHandles->bottomRangeHandle->enabled = false;\n        keyHandles->bottomRangeHandle->onRightButtonReleased = THIS_FUNC(OnCursorRightMouseReleased);\n        keyHandles->bottomRangeHandle->onPressed = THIS_FUNC(OnTransformBegin);\n        keyHandles->bottomRangeHandle->onChangeCompleted = THIS_FUNC(OnTransformCompleted);\n        keyHandles->bottomRangeHandle->messageFallDownListener = this;\n        keyHandles->bottomRangeHandle->cursorType = CursorType::SizeNS;\n        keyHandles->bottomRangeHandle->angle = Math::PI()*1.5f;\n\n        for (int i = keyId; i < info->handles.Count(); i++)\n            info->handles[i]->curveKeyIdx++;\n\n        // Register handles\n        info->handles.Insert(keyHandles, keyId);\n\n        mSupportHandles.Add(keyHandles->leftSupportHandle);\n        mSupportHandles.Add(keyHandles->rightSupportHandle);\n\n        keyHandles->mainHandle->SetSelectionGroup(Ref(this));\n        keyHandles->leftSupportHandle->SetSelectionGroup(mSupportHandlesGroup);\n        keyHandles->rightSupportHandle->SetSelectionGroup(mSupportHandlesGroup);\n\n        mNeedRedraw = true;\n    }\n\n    void CurvesEditor::RemoveCurveKeyHandles(const Ref<CurveInfo>& info, int keyId)\n    {\n        for (int i = keyId + 1; i < info->handles.Count(); i++)\n            info->handles[i]->curveKeyIdx--;\n\n        info->handles[keyId]->mainHandle->SetSelectionGroup(nullptr);\n        info->handles[keyId]->leftSupportHandle->SetSelectionGroup(nullptr);\n        info->handles[keyId]->rightSupportHandle->SetSelectionGroup(nullptr);\n\n        mSupportHandles.Remove(info->handles[keyId]->leftSupportHandle);\n        mSupportHandles.Remove(info->handles[keyId]->rightSupportHandle);\n\n        info->handles.RemoveAt(keyId);\n\n        mNeedRedraw = true;\n    }\n\n    void CurvesEditor::OnCurveKeyMainHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position)\n    {\n        info->BeginCurveManualChange();\n\n        Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n\n        Vec2F initialDragPoint = handles->mainHandle->GetDraggingBeginPosition();\n\n        if (handles->mainHandle->IsPressed())\n        {\n            if (o2Input.IsKeyDown(VK_CONTROL) && o2Input.IsKeyDown(VK_SHIFT))\n            {\n                key.position = Math::Round(position.x*10.0f)/10.0f;\n                key.value = Math::Round(position.y*10.0f)/10.0f;\n            }\n            else if (o2Input.IsKeyDown(VK_CONTROL))\n            {\n                key.position = position.x;\n                key.value = initialDragPoint.y;\n            }\n            else if (o2Input.IsKeyDown(VK_SHIFT))\n            {\n                key.position = initialDragPoint.x;\n                key.value = position.y;\n            }\n            else\n            {\n                key.position = position.x;\n                key.value = position.y;\n            }\n        }\n        else\n        {\n            key.position = position.x;\n            key.value = position.y;\n        }\n\n        int newKeyIdx = 0;\n        for (auto& k : info->curve->GetKeys())\n        {\n            if (k.position > key.position)\n                break;\n\n            newKeyIdx++;\n        }\n\n        if (newKeyIdx > handles->curveKeyIdx)\n            newKeyIdx--;\n\n        if (newKeyIdx != handles->curveKeyIdx)\n        {\n            info->curve->RemoveKeyAt(handles->curveKeyIdx);\n            info->curve->InsertKey(key);\n\n            info->handles.RemoveAt(handles->curveKeyIdx);\n            info->handles.Insert(handles, newKeyIdx);\n\n            for (int i = 0; i < info->handles.Count(); i++)\n            {\n                info->handles[i]->curveKeyIdx = i;\n                info->handles[i]->curveKeyUid = key.uid;\n            }\n        }\n\n        info->curve->SetKey(key, handles->curveKeyIdx);\n\n        info->UpdateHandles();\n        info->UpdateApproximatedPoints();\n\n        CheckHandlesVisible();\n        UpdateTransformFrame();\n        RecalculateViewArea();\n        mNeedRedraw = true;\n\n        info->CompleteCurveManualChange();\n    }\n\n    void CurvesEditor::OnCurveKeyMainHandlePressed(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles)\n    {\n        OnTransformBegin();\n\n        if (o2Input.IsKeyDown(VK_MENU))\n        {\n            info->BeginCurveManualChange();\n\n            Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n\n            if (Math::Equals(key.valueRange, 0.0f))\n                key.valueRange = 1.0f;\n            else\n                key.valueRange = 0.0f;\n\n            info->curve->SetKey(key, handles->curveKeyIdx);\n\n            info->UpdateHandles();\n            info->UpdateApproximatedPoints();\n\n            CheckHandlesVisible();\n            UpdateTransformFrame();\n            RecalculateViewArea();\n            mNeedRedraw = true;\n\n            info->CompleteCurveManualChange();\n        }\n    }\n\n    void CurvesEditor::OnCurveKeyLeftSupportHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position)\n    {\n        info->BeginCurveManualChange();\n\n        Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n        Curve::Key prevKey = info->curve->GetKeyAt(Math::Max(handles->curveKeyIdx - 1, 0));\n\n        if (o2Input.IsKeyDown(VK_CONTROL) && o2Input.IsKeyDown(VK_SHIFT))\n        {\n            Vec2F initialDragPoint = handles->leftSupportHandle->GetDraggingBeginPosition();\n            float dst = (initialDragPoint - Vec2F(key.position, key.value)).Length();\n            Vec2F v = (position - Vec2F(key.position, key.value)).Normalized()*dst;\n            key.leftSupportPosition = v.x;\n            key.leftSupportValue = v.y;\n        }\n        else if (o2Input.IsKeyDown(VK_CONTROL))\n        {\n            key.leftSupportPosition = position.x - key.position;\n            key.leftSupportValue = 0;\n        }\n        else if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            Vec2F initialDragPoint = handles->leftSupportHandle->GetDraggingBeginPosition();\n\n            Vec2F v = initialDragPoint - Vec2F(key.position, key.value);\n            float dst = (position - Vec2F(key.position, key.value)).Length();\n            v = v.Normalized()*dst;\n            key.leftSupportPosition = v.x;\n            key.leftSupportValue = v.y;\n        }\n        else\n        {\n            key.leftSupportPosition = position.x - key.position;\n            key.leftSupportValue = position.y - key.value;\n        }\n\n        if (key.supportsType == Curve::Key::Type::Flat || key.supportsType == Curve::Key::Type::Discrete ||\n            key.supportsType == Curve::Key::Type::Smooth)\n        {\n            key.supportsType = Curve::Key::Type::Free;\n        }\n\n        if (key.supportsType == Curve::Key::Type::Free && handles->curveKeyIdx < info->curve->GetKeys().Count() - 1)\n        {\n            Curve::Key nextKey = info->curve->GetKeyAt(Math::Min(handles->curveKeyIdx + 1,\n                                                       info->curve->GetKeys().Count() - 1));\n\n            key.rightSupportPosition = -key.leftSupportPosition;\n            key.rightSupportValue = -key.leftSupportValue;\n        }\n\n        info->curve->SetKey(key, handles->curveKeyIdx);\n\n        info->UpdateHandles();\n        info->UpdateApproximatedPoints();\n\n        CheckHandlesVisible();\n        RecalculateViewArea();\n        mNeedRedraw = true;\n\n        info->CompleteCurveManualChange();\n    }\n\n    void CurvesEditor::OnCurveKeyRightSupportHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position)\n    {\n        info->BeginCurveManualChange();\n\n        Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n        Curve::Key nextKey = info->curve->GetKeyAt(Math::Min(handles->curveKeyIdx + 1, info->curve->GetKeys().Count() - 1));\n\n        if (o2Input.IsKeyDown(VK_CONTROL) && o2Input.IsKeyDown(VK_SHIFT))\n        {\n            Vec2F initialDragPoint = handles->rightSupportHandle->GetDraggingBeginPosition();\n            float dst = (initialDragPoint - Vec2F(key.position, key.value)).Length();\n            Vec2F v = (position - Vec2F(key.position, key.value)).Normalized()*dst;\n            key.rightSupportPosition = v.x;\n            key.rightSupportValue = v.y;\n        }\n        else if (o2Input.IsKeyDown(VK_CONTROL))\n        {\n            key.rightSupportPosition = position.x - key.position;\n            key.rightSupportValue = 0;\n        }\n        else if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            Vec2F initialDragPoint = handles->rightSupportHandle->GetDraggingBeginPosition();\n\n            Vec2F v = initialDragPoint - Vec2F(key.position, key.value);\n            float dst = (position - Vec2F(key.position, key.value)).Length();\n            v = v.Normalized()*dst;\n            key.rightSupportPosition = v.x;\n            key.rightSupportValue = v.y;\n        }\n        else\n        {\n            key.rightSupportPosition = position.x - key.position;\n            key.rightSupportValue = position.y - key.value;\n        }\n\n        if (key.supportsType == Curve::Key::Type::Flat || key.supportsType == Curve::Key::Type::Discrete ||\n            key.supportsType == Curve::Key::Type::Smooth)\n        {\n            key.supportsType = Curve::Key::Type::Free;\n        }\n\n        if (key.supportsType == Curve::Key::Type::Free && handles->curveKeyIdx > 0)\n        {\n            Curve::Key prevKey = info->curve->GetKeyAt(Math::Max(handles->curveKeyIdx - 1, 0));\n\n            Vec2F rightSupportVector = Vec2F(key.rightSupportPosition, key.rightSupportValue);\n\n            key.leftSupportPosition = -key.rightSupportPosition;\n            key.leftSupportValue = -key.rightSupportValue;\n\n            handles->leftSupportHandle->position = Vec2F(key.position + key.leftSupportPosition,\n                                                        key.value + key.leftSupportValue);\n        }\n\n        info->curve->SetKey(key, handles->curveKeyIdx);\n\n        info->UpdateHandles();\n        info->UpdateApproximatedPoints();\n\n        CheckHandlesVisible();\n        RecalculateViewArea();\n        mNeedRedraw = true;\n\n        info->CompleteCurveManualChange();\n    }\n\n    void CurvesEditor::OnCurveKeyTopRangeHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position)\n    {\n        info->BeginCurveManualChange();\n\n        Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n\n        key.valueRange = (position.y - key.value)*2.0f;\n\n        info->curve->SetKey(key, handles->curveKeyIdx);\n\n        info->UpdateHandles();\n        info->UpdateApproximatedPoints();\n\n        CheckHandlesVisible();\n        RecalculateViewArea();\n        mNeedRedraw = true;\n\n        info->CompleteCurveManualChange();\n    }\n\n    void CurvesEditor::OnCurveKeyBottomRangeHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position)\n    {\n        info->BeginCurveManualChange();\n\n        Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n\n        key.valueRange = (key.value - position.y)*2.0f;\n\n        info->curve->SetKey(key, handles->curveKeyIdx);\n\n        info->UpdateHandles();\n        info->UpdateApproximatedPoints();\n\n        CheckHandlesVisible();\n        RecalculateViewArea();\n        mNeedRedraw = true;\n\n        info->CompleteCurveManualChange();\n    }\n\n    Vec2F CurvesEditor::CheckLeftSupportHandlePosition(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position)\n    {\n        Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n        Curve::Key prevKey = info->curve->GetKeyAt(Math::Max(handles->curveKeyIdx - 1, 0));\n\n        Vec2F relativePos = position - Vec2F(key.position, key.value);\n\n        if (relativePos.x > 0.0f)\n            relativePos.x = 0.0f;\n\n        if (relativePos.x < prevKey.position - key.position)\n            relativePos *= (prevKey.position - key.position)/relativePos.x;\n\n        return Vec2F(key.position, key.value) + relativePos;\n    }\n\n    Vec2F CurvesEditor::CheckRightSupportHandlePosition(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position)\n    {\n        Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n        Curve::Key nextKey = info->curve->GetKeyAt(Math::Min(handles->curveKeyIdx + 1, info->curve->GetKeys().Count() - 1));\n\n        Vec2F relativePos = position - Vec2F(key.position, key.value);\n\n        if (relativePos.x < 0.0f)\n            relativePos.x = 0.0f;\n\n        if (relativePos.x > nextKey.position - key.position)\n            relativePos *= (nextKey.position - key.position)/relativePos.x;\n\n        return Vec2F(key.position, key.value) + relativePos;\n    }\n\n    Vec2F CurvesEditor::CheckTopRangeHandlePosition(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position)\n    {\n        Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n\n        return Vec2F(key.position, position.y);\n    }\n\n    Vec2F CurvesEditor::CheckBottomRangeHandlePosition(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position)\n    {\n        Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n\n        return Vec2F(key.position, position.y);\n    }\n\n    void CurvesEditor::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        const float createPointDistanceThreshold = 7;\n\n        Ref<CurveInfo> clickedCurveInfo;\n        Curve::Key newKey;\n        Vec2F localCursorPos = cursor.position;\n\n        for (auto& info : mCurves)\n        {\n            auto& keys = info->curve->GetKeys();\n            int keyIdx = 0;\n            for (auto& key : keys)\n            {\n                if (keyIdx == 0)\n                {\n                    keyIdx++;\n                    continue;\n                }\n\n                const ApproximationValue* points = key.GetTopApproximatedPoints();\n                for (int i = 1; i < key.GetApproximatedPointsCount(); i++)\n                {\n                    Vec2F a = CurveViewToLocal(points[i - 1], info->viewScale, info->viewOffset);\n                    Vec2F b = CurveViewToLocal(points[i], info->viewScale, info->viewOffset);\n\n                    Vec2F ab = b - a;\n                    float abl = ab.Length();\n                    Vec2F abn = ab/abl;\n                    Vec2F abnp = abn.Perpendicular();\n                    Vec2F ac = cursor.position - LocalToScreenPoint(a);\n                    Vec2F lac = ScreenToLocalPoint(cursor.position) - a;\n\n                    float pointDistance = (LocalToScreenPoint(b) - cursor.position).Length();\n                    float lineDistance = Math::Abs(abnp.Dot(ac));\n                    float proj = abn.Dot(lac);\n\n                    if (pointDistance < createPointDistanceThreshold ||\n                        (lineDistance < createPointDistanceThreshold && proj > 0.0f && proj < abl))\n                    {\n                        Vec2F p = abnp*(abnp.Dot(localCursorPos - a)) + localCursorPos;\n                        Vec2F pc = LocalToCurveView(p, info->viewScale, info->viewOffset);\n                        newKey.position = pc.x;\n                        newKey.value = pc.y;\n                        newKey.supportsType = Curve::Key::Type::Smooth;\n\n                        clickedCurveInfo = info;\n\n                        break;\n                    }\n                }\n\n                if (clickedCurveInfo)\n                    break;\n\n                keyIdx++;\n            }\n\n            if (clickedCurveInfo)\n                break;\n        }\n\n        bool addedKey = false;\n        if (clickedCurveInfo)\n        {\n            clickedCurveInfo->disableChangesHandling = true;\n\n            int idx = clickedCurveInfo->curve->InsertKey(newKey);\n\n            clickedCurveInfo->disableChangesHandling = false;\n\n            AddCurveKeyHandles(clickedCurveInfo, idx);\n            clickedCurveInfo->UpdateApproximatedPoints();\n\n            mNeedRedraw = true;\n\n            SelectHandle(clickedCurveInfo->handles[idx]->mainHandle);\n            CheckHandlesVisible();\n\n            addedKey = true;\n        }\n        else if (mCurves.Count() == 1)\n        {\n            clickedCurveInfo = mCurves[0];\n\n            Vec2F curveViewCursorPos = LocalToCurveView(localCursorPos, clickedCurveInfo->viewScale, clickedCurveInfo->viewOffset);\n            newKey.position = curveViewCursorPos.x;\n            newKey.value = curveViewCursorPos.y;\n\n            clickedCurveInfo->disableChangesHandling = true;\n\n            int idx = clickedCurveInfo->curve->InsertKey(newKey);\n\n            clickedCurveInfo->disableChangesHandling = false;\n\n            AddCurveKeyHandles(mCurves[0], idx);\n            clickedCurveInfo->UpdateApproximatedPoints();\n\n            mNeedRedraw = true;\n\n            SelectHandle(clickedCurveInfo->handles[idx]->mainHandle);\n            CheckHandlesVisible();\n\n            addedKey = true;\n        }\n\n        if (addedKey)\n        {\n            Vector<CurveKeysInfo> keyInfos;\n            keyInfos.Add(CurveKeysInfo());\n            keyInfos.Last().curveId = clickedCurveInfo->curveId;\n            keyInfos.Last().keys.Add(newKey);\n\n            auto action = mmake<CurveAddKeysAction>(keyInfos, Ref(this));\n            DoneAction(action);\n        }\n    }\n\n    void CurvesEditor::SmoothKey(const Ref<CurveInfo>& info, int idx)\n    {\n        Curve::Key key = info->curve->GetKeyAt(idx);\n        Vec2F thisKeyPoint(key.position, key.value);\n\n        const float autoSmoothCoef = 0.5f;\n\n        if (idx == 0)\n        {\n            Curve::Key nextKey = info->curve->GetKeyAt(Math::Min(idx + 1, info->curve->GetKeys().Count()));\n\n            Vec2F nextKeyPoint(nextKey.position, nextKey.value);\n            Vec2F supportVec = (nextKeyPoint - thisKeyPoint)*autoSmoothCoef;\n\n            key.rightSupportPosition = supportVec.x;\n            key.rightSupportValue = supportVec.y;\n        }\n        else if (idx == info->curve->GetKeys().Count() - 1)\n        {\n            Curve::Key lastKey = info->curve->GetKeyAt(Math::Max(0, idx - 1));\n\n            Vec2F lastKeyPoint(lastKey.position, lastKey.value);\n            Vec2F supportVec = (lastKeyPoint - thisKeyPoint)*autoSmoothCoef;\n\n            key.leftSupportPosition = supportVec.x;\n            key.leftSupportValue = supportVec.y;\n        }\n        else\n        {\n            Curve::Key lastKey = info->curve->GetKeyAt(Math::Max(0, idx - 1));\n            Curve::Key nextKey = info->curve->GetKeyAt(Math::Min(idx + 1, info->curve->GetKeys().Count()));\n\n            Vec2F lastKeyPoint(lastKey.position, lastKey.value);\n            Vec2F thisKeyPoint(key.position, key.value);\n            Vec2F nextKeyPoint(nextKey.position, nextKey.value);\n\n            Vec2F thisToLast = lastKeyPoint - thisKeyPoint;\n            Vec2F thisToNext = nextKeyPoint - thisKeyPoint;\n\n            float supportLength = Math::Min(thisToNext.Length(), thisToLast.Length())*autoSmoothCoef;\n            Vec2F supportVec = Math::CalculateEllipseTangent(lastKeyPoint, thisKeyPoint, nextKeyPoint)*supportLength;\n\n            key.leftSupportPosition = -supportVec.x; key.leftSupportValue = -supportVec.y;\n            key.rightSupportPosition = supportVec.x; key.rightSupportValue = supportVec.y;\n        }\n\n        info->curve->SetKey(key, idx);\n\n        info->UpdateApproximatedPoints();\n\n        info->handles[idx]->leftSupportHandle->SetPosition(Vec2F(key.position + key.leftSupportPosition,\n                                                          key.value + key.leftSupportValue));\n\n        info->handles[idx]->rightSupportHandle->SetPosition(Vec2F(key.position + key.rightSupportPosition,\n                                                           key.value + key.rightSupportValue));\n\n        if (idx > 0)\n        {\n            Curve::Key lastKey = info->curve->GetKeyAt(Math::Max(0, idx - 1));\n\n            info->handles[idx - 1]->rightSupportHandle->SetPosition(\n                Vec2F(lastKey.position + lastKey.rightSupportPosition, lastKey.value + lastKey.rightSupportValue));\n        }\n\n        if (idx < info->curve->GetKeys().Count() - 1)\n        {\n            Curve::Key nextKey = info->curve->GetKeyAt(Math::Min(idx + 1, info->curve->GetKeys().Count()));\n\n            info->handles[idx + 1]->leftSupportHandle->SetPosition(\n                Vec2F(nextKey.position + nextKey.leftSupportPosition, nextKey.value + nextKey.leftSupportValue));\n        }\n\n        RecalculateViewArea();\n\n        mNeedRedraw = true;\n    }\n\n    void CurvesEditor::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        Focus();\n\n        mSelectingPressedPoint = cursor.position;\n\n        if (!o2Input.IsKeyDown(VK_CONTROL))\n        {\n            DeselectAll();\n            mSupportHandlesGroup->DeselectAll();\n        }\n    }\n\n    void CurvesEditor::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        for (auto& handle : mSelectingHandlesBuf)\n        {\n            SetHandleSelectedState(handle, false);\n            handle->SetSelected(true);\n        }\n\n        mSelectingHandlesBuf.Clear();\n        UpdateTransformFrame();\n        CheckHandlesVisible();\n    }\n\n    void CurvesEditor::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        for (auto& handle : mSelectingHandlesBuf)\n            SetHandleSelectedState(handle, false);\n\n        mSelectingHandlesBuf.Clear();\n\n        RectF selectionLocalRect(mSelectingPressedPoint, cursor.position);\n\n        for (auto& handle : mHandles)\n        {\n            auto curveHandle = DynamicCast<CurveHandle>(handle);\n            if (handle->IsEnabled() && selectionLocalRect.IsInside(curveHandle->GetLocalPosition()) &&\n                !mSelectedHandles.Contains(handle))\n            {\n                mSelectingHandlesBuf.Add(curveHandle);\n                SetHandleSelectedState(handle, true);\n            }\n        }\n\n        for (auto& handle : mSupportHandlesGroup->GetAllHandles())\n        {\n            auto curveHandle = DynamicCast<CurveHandle>(handle);\n            if (handle->IsEnabled() && selectionLocalRect.IsInside(curveHandle->GetLocalPosition()) &&\n                !mSupportHandlesGroup->GetSelectedHandles().Contains(handle))\n            {\n                mSelectingHandlesBuf.Add(curveHandle);\n                SetHandleSelectedState(handle, true);\n            }\n        }\n    }\n\n    void CurvesEditor::OnCursorRightMouseStayDown(const Input::Cursor& cursor)\n    {\n        if (cursor.delta.Length() > 0.1f)\n            mIsViewScrolling = true;\n\n        ScrollView::OnCursorRightMouseStayDown(cursor);\n    }\n\n    void CurvesEditor::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        Focus();\n\n        if (!mIsViewScrolling)\n        {\n            Curve::Key::Type supportsType = Curve::Key::Type::Free;\n            bool supportsDifferent = false;\n            bool first = true;\n            bool someSelected = false;\n\n            for (auto& curve : mCurves)\n            {\n                for (auto& handles : curve->handles)\n                {\n                    if (!handles->mainHandle->IsSelected())\n                        continue;\n\n                    someSelected = true;\n\n                    if (first)\n                    {\n                        first = false;\n                        supportsType = curve->curve->GetKeyAt(handles->curveKeyIdx).supportsType;\n                    }\n                    else if (supportsType != curve->curve->GetKeyAt(handles->curveKeyIdx).supportsType)\n                    {\n                        supportsDifferent = true;\n                        break;\n                    }\n                }\n\n                if (supportsDifferent)\n                    break;\n            }\n\n            mContextMenu->Show();\n\n            if (supportsDifferent || !someSelected)\n            {\n                for (int i = 0; i < 5; i++)\n                    mContextMenu->SetItemChecked(i + 1, false);\n            }\n            else\n            {\n                for (int i = 0; i < 5; i++)\n                    mContextMenu->SetItemChecked(i + 1, i == (int)supportsType);\n            }\n        }\n\n        mIsViewScrolling = false;\n\n        ScrollView::OnCursorRightMouseReleased(cursor);\n    }\n\n    void CurvesEditor::CheckHandlesVisible()\n    {\n        for (auto& info : mCurves)\n        {\n            for (auto& handles : info->handles)\n            {\n                Curve::Key key = info->curve->GetKeyAt(handles->curveKeyIdx);\n\n                handles->leftSupportHandle->enabled = (handles->mainHandle->IsSelected() ||\n                                                      handles->leftSupportHandle->IsSelected() ||\n                                                       handles->rightSupportHandle->IsSelected()) && handles->curveKeyIdx > 0;\n\n                handles->rightSupportHandle->enabled = (handles->mainHandle->IsSelected() ||\n                                                        handles->leftSupportHandle->IsSelected() ||\n                                                        handles->rightSupportHandle->IsSelected()) && handles->curveKeyIdx < info->handles.Count() - 1;\n\n                handles->topRangeHandle->enabled = handles->mainHandle->IsSelected() && !Math::Equals(key.valueRange, 0.0f);\n                handles->bottomRangeHandle->enabled = handles->mainHandle->IsSelected() && !Math::Equals(key.valueRange, 0.0f);\n            }\n        }\n    }\n\n    void CurvesEditor::UpdateTransformFrame()\n    {\n        mTransformFrameVisible = IsTransformFrameVisible();\n\n        if (!mTransformFrameVisible)\n            return;\n\n        auto selectedHandle0 = DynamicCast<CurveHandle>(mSelectedHandles[0]);\n        RectF aabb(selectedHandle0->GetLocalPosition(), selectedHandle0->GetLocalPosition());\n\n        for (auto& handle : mSelectedHandles)\n        {\n            auto curveHandle = DynamicCast<CurveHandle>(handle);\n\n            aabb.left = Math::Min(curveHandle->GetLocalPosition().x, aabb.left);\n            aabb.right = Math::Max(curveHandle->GetLocalPosition().x, aabb.right);\n            aabb.top = Math::Max(curveHandle->GetLocalPosition().y, aabb.top);\n            aabb.bottom = Math::Min(curveHandle->GetLocalPosition().y, aabb.bottom);\n        }\n\n        mTransformFrameBasis = Basis(aabb.LeftBottom(), Vec2F::Right()*aabb.Width(), Vec2F::Up()*aabb.Height());\n    }\n\n    bool CurvesEditor::IsTransformFrameVisible() const\n    {\n        int selectedMainHandles = 0;\n        for (auto& handle : mSelectedHandles)\n        {\n            auto curveHandle = DynamicCast<CurveHandle>(handle);\n            if (!mSupportHandles.Contains(curveHandle))\n                selectedMainHandles++;\n        }\n\n        return selectedMainHandles > 1;\n    }\n\n    void CurvesEditor::OnHandleCursorReleased(const Ref<DragHandle>& handle, const Input::Cursor& cursor)\n    {\n        SelectableDragHandlesGroup::OnHandleCursorReleased(handle, cursor);\n        UpdateTransformFrame();\n        CheckHandlesVisible();\n    }\n\n    void CurvesEditor::OnHandleBeganDragging(const Ref<DragHandle>& handle)\n    {\n        if (mSupportHandles.Contains(DynamicCast<CurveHandle>(handle)))\n            return;\n\n        SelectableDragHandlesGroup::OnHandleBeganDragging(handle);\n    }\n\n    void CurvesEditor::OnHandleMoved(const Ref<DragHandle>& handle, const Vec2F& cursorPos)\n    {\n        if (mSupportHandles.Contains(DynamicCast<CurveHandle>(handle)))\n        {\n            if (!handle->IsSelected())\n                return;\n\n            for (auto& handle : mSupportHandles)\n            {\n                if (!handle->IsSelected())\n                    continue;\n\n                handle->SetDragPosition(handle->screenToLocalTransformFunc(cursorPos) + handle->GetDraggingOffset());\n                handle->onChangedPos(handle->GetPosition());\n            }\n\n            return;\n        }\n\n        SelectableDragHandlesGroup::OnHandleMoved(handle, cursorPos);\n    }\n\n    void CurvesEditor::OnHandleCompletedChange(const Ref<DragHandle>& handle)\n    {\n        OnTransformCompleted();\n    }\n\n    void CurvesEditor::OnSelectionChanged()\n    {\n        mNeedRedraw = true;\n    }\n\n    void CurvesEditor::SetSelectedKeysSupportsType(Curve::Key::Type type)\n    {\n        for (auto& info : mCurves)\n        {\n            auto keys = info->curve->GetKeys();\n\n            for (auto& handles : info->handles)\n            {\n                if (handles->mainHandle->IsSelected())\n                {\n                    Curve::Key& key = keys[handles->curveKeyIdx];\n                    key.supportsType = type;\n\n                    switch (type)\n                    {\n                        case Curve::Key::Type::Flat:\n                        key.leftSupportValue = 0;\n                        key.rightSupportValue = 0;\n                        break;\n\n                        case Curve::Key::Type::Free:\n                        key.rightSupportPosition = -key.leftSupportPosition;\n                        key.rightSupportValue = -key.leftSupportValue;\n                        break;\n\n                        case Curve::Key::Type::Linear:\n                        key.leftSupportPosition = 0;\n                        key.rightSupportPosition = 0;\n                        key.leftSupportValue = 0;\n                        key.rightSupportValue = 0;\n                        break;\n                    }\n                }\n            }\n\n            info->BeginCurveManualChange();\n\n            info->curve->SetKeys(keys);\n            info->UpdateHandles();\n            info->UpdateApproximatedPoints();\n\n            info->CompleteCurveManualChange();\n        }\n\n        CheckHandlesVisible();\n        RecalculateViewArea();\n        mNeedRedraw = true;\n    }\n\n    void CurvesEditor::OnTransformFrameTransformed(const Basis& basis)\n    {\n        Vec2F border(10, 10);\n        Basis localBasis(ScreenToLocalPoint(basis.origin + border),\n            (basis.xv - Vec2F(border.x*2.0f, 0))*mViewCamera.GetScale(),\n                         (basis.yv - Vec2F(0, border.y*2.0f))*mViewCamera.GetScale());\n\n        Basis lastTransformBasis = mTransformFrameBasis;\n        Basis delta = mTransformFrameBasis.Inverted()*localBasis;\n\n        if (delta.origin.Length() > 0.01f || delta.xv != Vec2F(1, 0) || delta.yv != Vec2F(0, 1))\n        {\n            for (auto& handle : mSelectedHandles)\n            {\n                auto curveHandle = DynamicCast<CurveHandle>(handle);\n                curveHandle->SetPosition(curveHandle->LocalToCurveView(curveHandle->GetLocalPosition()*delta));\n                curveHandle->onChangedPos(handle->GetPosition());\n            }\n\n            if (o2Input.IsKeyDown(VK_CONTROL))\n            {\n                float right = lastTransformBasis.origin.x + lastTransformBasis.xv.x;\n                float left = lastTransformBasis.origin.x;\n\n                float rightOffset = localBasis.origin.x + localBasis.xv.x - right;\n                float leftOffset = localBasis.origin.x - left;\n\n                bool rightChanged = !Math::Equals(rightOffset, 0.0f) && rightOffset > FLT_EPSILON;\n                bool leftChanged = !Math::Equals(leftOffset, 0.0f) && leftOffset < FLT_EPSILON;\n\n                for (auto& handle : mHandles)\n                {\n                    if (mSelectedHandles.Contains(handle))\n                        continue;\n\n                    if (handle->GetPosition().x >= right && rightChanged)\n                    {\n                        handle->position += Vec2F(rightOffset, 0);\n                        handle->onChangedPos(handle->GetPosition());\n                    }\n\n                    if (handle->GetPosition().x <= left && leftChanged)\n                    {\n                        handle->position += Vec2F(leftOffset, 0);\n                        handle->onChangedPos(handle->GetPosition());\n                    }\n                }\n            }\n\n            UpdateTransformFrame();\n        }\n    }\n\n    void CurvesEditor::OnTransformBegin()\n    {\n        mBeforeTransformKeys.Clear();\n\n        CurveKeysInfo keysInfo;\n        for (auto& curveInfo : mCurves)\n        {\n            keysInfo.keys.Clear();\n            keysInfo.selectedHandles.Clear();\n\n            for (auto& handles : curveInfo->handles)\n            {\n                if (handles->IsSomeHandleSelected())\n                {\n                    keysInfo.keys.Add(curveInfo->curve->GetKeyAt(handles->curveKeyIdx));\n\n                    keysInfo.selectedHandles.Add(SelectedHandlesInfo());\n                    keysInfo.selectedHandles.Last().index = handles->curveKeyIdx;\n                    keysInfo.selectedHandles.Last().mainHandle = handles->mainHandle->IsSelected();\n                    keysInfo.selectedHandles.Last().leftSupportHandle = handles->leftSupportHandle->IsSelected();\n                    keysInfo.selectedHandles.Last().rightSupportHandle = handles->rightSupportHandle->IsSelected();\n                }\n            }\n\n            if (!keysInfo.keys.IsEmpty())\n            {\n                keysInfo.curveId = curveInfo->curveId;\n                mBeforeTransformKeys.Add(keysInfo);\n            }\n        }\n    }\n\n    void CurvesEditor::OnTransformCompleted()\n    {\n        bool changed = false;\n        for (auto& keysInfo : mBeforeTransformKeys)\n        {\n            auto curveInfo = mCurves.FindOrDefault([&](auto& x) { return x->curveId == keysInfo.curveId; });\n            if (!curveInfo)\n                continue;\n\n            for (auto& key : curveInfo->curve->GetKeys())\n            {\n                if (!keysInfo.keys.Contains(key))\n                {\n                    changed = true;\n                    break;\n                }\n            }\n\n            if (changed)\n                break;\n        }\n\n        if (changed)\n        {\n            Vector<CurveKeysChangeAction::KeysInfo> actionKeysInfos;\n            for (auto& keysInfo : mBeforeTransformKeys)\n            {\n                auto curveInfo = mCurves.FindOrDefault([&](auto& x) { return x->curveId == keysInfo.curveId; });\n                if (!curveInfo)\n                    continue;\n\n                actionKeysInfos.Add(CurveKeysChangeAction::KeysInfo());\n                auto& actionCurveKeysInfo = actionKeysInfos.Last();\n\n                actionCurveKeysInfo.curveId = keysInfo.curveId;\n                actionCurveKeysInfo.beforeKeys = keysInfo.keys;\n                actionCurveKeysInfo.selectedHandles = keysInfo.selectedHandles;\n\n                for (auto& handles : curveInfo->handles)\n                {\n                    if (handles->IsSomeHandleSelected())\n                        actionCurveKeysInfo.afterKeys.Add(curveInfo->curve->GetKeyAt(handles->curveKeyIdx));\n                }\n            }\n\n            auto action = mmake<CurveKeysChangeAction>(actionKeysInfos, Ref(this));\n            DoneAction(action);\n        }\n    }\n\n    Vec2F CurvesEditor::CurveViewToLocal(const Vec2F& point, const Vec2F& viewScale, const Vec2F& viewOffset) const\n    {\n        return (point + viewOffset)*viewScale;\n    }\n\n    Vec2F CurvesEditor::LocalToCurveView(const Vec2F& point, const Vec2F& viewScale, const Vec2F& viewOffset) const\n    {\n        return point/viewScale - viewOffset;\n    }\n\n    void CurvesEditor::DoneAction(const Ref<IAction>& action)\n    {\n        if (actionsListDelegate) {\n            actionsListDelegate->DoneAction(action);\n        }\n    }\n\n    void CurvesEditor::OnEditPressed()\n    {\n        Curve::Key key;\n        Ref<CurveInfo> curveInfo;\n        int keyIdx = 0;\n\n        for (auto& info : mCurves)\n        {\n            for (auto& handles : info->handles)\n            {\n                if (handles->mainHandle->IsSelected())\n                {\n                    curveInfo = info;\n                    keyIdx = handles->curveKeyIdx;\n                    key = info->curve->GetKeys()[keyIdx];\n\n                    break;\n                }\n            }\n\n            if (curveInfo)\n                break;\n        }\n\n        if (!curveInfo)\n            return;\n\n        KeyEditDlg::Show(key, [=](const Curve::Key& newKey) {\n            curveInfo->curve->SetKey(newKey, keyIdx);\n        });\n    }\n\n    void CurvesEditor::SetHandlesTypesChecked(Curve::Key::Type type)\n    {\n        for (int i = 0; i < 5; i++)\n            mContextMenu->SetItemChecked(i + 1, i == (int)type);\n\n        SetSelectedKeysSupportsType(type);\n    }\n\n    void CurvesEditor::OnCopyPressed()\n    {\n        if (!IsFocused())\n            return;\n\n        Vector<Ref<CurveCopyInfo>> copyKeys;\n\n        for (auto& curve : mCurves)\n        {\n            auto copyInfo = mmake<CurveCopyInfo>();\n            copyInfo->curveId = curve->curveId;\n\n            for (auto& handles : curve->handles)\n            {\n                if (!handles->mainHandle->IsSelected())\n                    continue;\n\n                copyInfo->keys.Add(curve->curve->GetKeyAt(handles->curveKeyIdx));\n            }\n\n            if (!copyInfo->keys.IsEmpty())\n                copyKeys.Add(copyInfo);\n        }\n\n        DataDocument copyData;\n        copyData = copyKeys;\n        String copyDataStr = copyData.SaveAsString();\n\n        Clipboard::SetText(copyDataStr);\n    }\n\n    void CurvesEditor::OnCutPressed()\n    {\n        if (!IsFocused())\n            return;\n\n        OnCopyPressed();\n        OnDeletePressed();\n    }\n\n    void CurvesEditor::OnPastePressed()\n    {\n        if (!IsFocused())\n            return;\n\n        float insertPos = ScreenToLocalPoint(o2Input.cursorPos).x;\n        DataDocument data;\n        data.LoadFromData(Clipboard::GetText());\n\n        Vector<CurveCopyInfo*> copyKeys;\n        copyKeys = data;\n\n        Vector<CurveKeysInfo> keyInfos;\n\n        for (auto& curve : copyKeys)\n        {\n            auto curveInfo = mCurves.FindOrDefault([=](auto& x) { return x->curveId == curve->curveId; });\n\n            if (curveInfo == nullptr)\n            {\n                if (copyKeys.Count() == 1 && mCurves.Count() == 1)\n                    curveInfo = mCurves[0];\n            }\n\n            if (!curveInfo)\n                continue;\n\n            curveInfo->BeginCurveManualChange();\n\n            keyInfos.Add(CurveKeysInfo());\n            keyInfos.Last().curveId = curveInfo->curveId;\n\n            float positionDelta = insertPos - curve->keys[0].position;\n            for (auto& key : curve->keys)\n            {\n                key.position += positionDelta;\n                key.uid = Math::Random();\n\n                int position = curveInfo->curve->InsertKey(key);\n                AddCurveKeyHandles(curveInfo, position);\n\n                keyInfos.Last().keys.Add(key);\n            }\n\n            delete curve;\n\n            curveInfo->UpdateApproximatedPoints();\n            curveInfo->UpdateHandles();\n            mNeedRedraw = true;\n\n            curveInfo->CompleteCurveManualChange();\n        }\n\n        if (!keyInfos.IsEmpty())\n        {\n            auto action = mmake<CurveAddKeysAction>(keyInfos, Ref(this));\n            DoneAction(action);\n        }\n    }\n\n    void CurvesEditor::OnDeletePressed()\n    {\n        if (!IsFocused())\n            return;\n\n        Vector<CurveKeysInfo> keyInfos;\n\n        for (auto& curveInfo : mCurves)\n        {\n            curveInfo->BeginCurveManualChange();\n\n            auto copyInfo = mmake<CurveCopyInfo>();\n            copyInfo->curveId = curveInfo->curveId;\n\n            Vector<int> removingIdxs;\n            for (auto& handles : curveInfo->handles)\n            {\n                if (!handles->mainHandle->IsSelected())\n                    continue;\n\n                removingIdxs.Add(handles->curveKeyIdx);\n            }\n\n            if (!removingIdxs.IsEmpty())\n            {\n                keyInfos.Add(CurveKeysInfo());\n                keyInfos.Last().curveId = curveInfo->curveId;\n            }\n\n            for (int i = removingIdxs.Count() - 1; i >= 0; i--)\n            {\n                keyInfos.Last().keys.Add(curveInfo->curve->GetKeyAt(removingIdxs[i]));\n\n                curveInfo->curve->RemoveKeyAt(removingIdxs[i]);\n                RemoveCurveKeyHandles(curveInfo, removingIdxs[i]);\n            }\n\n            curveInfo->UpdateApproximatedPoints();\n            curveInfo->UpdateHandles();\n            mNeedRedraw = true;\n\n            curveInfo->CompleteCurveManualChange();\n        }\n\n        mSelectedHandles.Clear();\n        mSupportHandlesGroup->DeselectAll();\n        UpdateTransformFrame();\n\n        if (!keyInfos.IsEmpty())\n        {\n            auto action = mmake<CurveDeleteKeysAction>(keyInfos, Ref(this));\n            DoneAction(action);\n        }\n    }\n\n    void CurvesEditor::OnInsertPressed()\n    {\n        if (!IsFocused())\n            return;\n\n        float insertPos = ScreenToLocalPoint(o2Input.cursorPos).x;\n        DataDocument data;\n        data.LoadFromData(Clipboard::GetText());\n\n        Vector<CurveCopyInfo*> copyKeys;\n        copyKeys = data;\n\n        for (auto& curve : copyKeys)\n        {\n            auto curveInfo = mCurves.FindOrDefault([=](auto& x) { return x->curveId == curve->curveId; });\n\n            if (curveInfo == nullptr)\n            {\n                if (copyKeys.Count() == 1 && mCurves.Count() == 1)\n                    curveInfo = mCurves[0];\n            }\n\n            if (!curveInfo)\n                continue;\n\n            float length = curve->keys.Last().position - curve->keys[0].position;\n            curveInfo->curve->MoveKeysFrom(insertPos, length);\n\n            float positionDelta = insertPos - curve->keys[0].position;\n            for (auto& key : curve->keys)\n            {\n                key.position += positionDelta;\n\n                int position = curveInfo->curve->InsertKey(key);\n                AddCurveKeyHandles(curveInfo, position);\n            }\n\n            delete curve;\n        }\n    }\n\n    void CurvesEditor::OnUndoPressed()\n    {\n        if (actionsListDelegate)\n            actionsListDelegate->UndoAction();\n    }\n\n    void CurvesEditor::OnRedoPressed()\n    {\n        if (actionsListDelegate)\n            actionsListDelegate->RedoAction();\n    }\n\n    CurvesEditor::CurveInfo::CurveInfo()\n    { }\n\n    CurvesEditor::CurveInfo::~CurveInfo()\n    {\n        for (auto& x : handles)\n        {\n            x->mainHandle->SetSelectionGroup(nullptr);\n            x->leftSupportHandle->SetSelectionGroup(nullptr);\n            x->rightSupportHandle->SetSelectionGroup(nullptr);\n        }\n\n        if (curve)\n            curve->onKeysChanged -= MakeFunction(this, &CurveInfo::OnCurveChanged);\n    }\n\n    void CurvesEditor::CurveInfo::UpdateHandles()\n    {\n        for (int i = 0; i < handles.Count(); i++)\n        {\n            Curve::Key key = curve->GetKeyAt(i);\n            handles[i]->mainHandle->position = Vec2F(key.position, key.value);\n\n            if (!Math::Equals(key.valueRange, 0.0f))\n            {\n                handles[i]->topRangeHandle->position = Vec2F(key.position, key.value + key.valueRange*0.5f);\n                handles[i]->bottomRangeHandle->position = Vec2F(key.position, key.value - key.valueRange*0.5f);\n\n                handles[i]->topRangeHandle->enabled = handles[i]->mainHandle->IsSelected();\n                handles[i]->bottomRangeHandle->enabled = handles[i]->mainHandle->IsSelected();\n            }\n            else\n            {\n                handles[i]->topRangeHandle->enabled = false;\n                handles[i]->bottomRangeHandle->enabled = false;\n            }\n\n            if (i > 0)\n            {\n                handles[i]->leftSupportHandle->position = Vec2F(key.position + key.leftSupportPosition,\n                                                               key.value + key.leftSupportValue);\n\n                handles[i]->leftSupportHandle->enabled = handles[i]->leftSupportHandle->IsSelected() ||\n                    handles[i]->mainHandle->IsSelected();\n            }\n            else \n                handles[i]->leftSupportHandle->enabled = false;\n\n            if (i < handles.Count() - 1)\n            {\n                handles[i]->rightSupportHandle->position = Vec2F(key.position + key.rightSupportPosition,\n                                                                key.value + key.rightSupportValue);\n\n                handles[i]->rightSupportHandle->enabled = handles[i]->rightSupportHandle->IsSelected() ||\n                    handles[i]->mainHandle->IsSelected();\n            }\n            else \n                handles[i]->rightSupportHandle->enabled = false;\n        }\n    }\n\n    void CurvesEditor::CurveInfo::UpdateApproximatedPoints()\n    {\n        approximatedPoints.Clear();\n\n        auto keys = curve->GetKeys();\n        for (int i = 1; i < keys.Count(); i++)\n        {\n            auto& leftKey = keys[i - 1];\n            auto& rightKey = keys[i];\n\n            const ApproximationValue* keyTopPoints = rightKey.GetTopApproximatedPoints();\n            const ApproximationValue* keyBottomPoints = rightKey.GetBottomApproximatedPoints();\n\n            for (int j = 0; j < rightKey.GetApproximatedPointsCount(); j++)\n            {\n                Vec2F pointTop = ((Vec2F)keyTopPoints[j] + viewOffset)*viewScale;\n                Vec2F pointBottom = ((Vec2F)keyBottomPoints[j] + viewOffset)*viewScale;\n\n                approximatedPoints.Add({ pointTop, pointBottom });\n            }\n        }\n    }\n\n    void CurvesEditor::CurveInfo::AdjustScale()\n    {\n        if (editor.Lock()->mAdjustCurvesScale)\n        {\n            RectF rect = curve->GetRect();\n            viewScale = Vec2F(1, Math::Min(100.0f, rect.Height() < FLT_EPSILON ? 1.0f : 1.0f/rect.Height()));\n            viewOffset = Vec2F(0, -rect.bottom);\n        }\n        else\n        {\n            viewScale = Vec2F(1, 1);\n            viewOffset = Vec2F();\n        }\n\n        UpdateApproximatedPoints();\n        UpdateHandles();\n    }\n\n    void CurvesEditor::CurveInfo::OnCurveChanged()\n    {\n        if (disableChangesHandling)\n            return;\n\n        auto editor = this->editor.Lock();\n\n        if (handles.Count() != curve->GetKeys().Count())\n        {\n            Vector<UInt64> selectedMain, selectedLeft, selectedRight;\n\n            for (auto& handle : handles)\n            {\n                if (handle->leftSupportHandle->IsSelected())\n                {\n                    selectedLeft.Add(handle->curveKeyUid);\n                    handle->leftSupportHandle->SetSelectionGroup(nullptr);\n                }\n\n                editor->mSupportHandles.Remove(handle->leftSupportHandle);\n\n                if (handle->rightSupportHandle->IsSelected())\n                {\n                    selectedRight.Add(handle->curveKeyUid);\n                    handle->rightSupportHandle->SetSelectionGroup(nullptr);\n                }\n\n                editor->mSupportHandles.Remove(handle->rightSupportHandle);\n\n                if (handle->mainHandle->IsSelected())\n                {\n                    selectedMain.Add(handle->curveKeyUid);\n                    handle->mainHandle->SetSelected(false);\n                }\n\n                editor->mHandles.Remove(handle->mainHandle);\n            }\n\n            handles.clear();\n\n            for (int i = 0; i < curve->GetKeys().Count(); i++)\n                editor->AddCurveKeyHandles(Ref(this), i);\n\n            for (auto& handle : handles)\n            {\n                if (selectedMain.Contains(handle->curveKeyUid))\n                    handle->mainHandle->Select();\n\n                if (selectedLeft.Contains(handle->curveKeyUid))\n                    handle->leftSupportHandle->Select();\n\n                if (selectedRight.Contains(handle->curveKeyUid))\n                    handle->rightSupportHandle->Select();\n            }\n        }\n\n        AdjustScale();\n        UpdateHandles();\n    }\n\n    void CurvesEditor::CurveInfo::BeginCurveManualChange()\n    {\n        disableChangesHandling = true;\n    }\n\n    void CurvesEditor::CurveInfo::CompleteCurveManualChange()\n    {\n        disableChangesHandling = false;\n    }\n\n    CurvesEditor::KeyHandles::KeyHandles(const CurveHandle& mainSample, const CurveHandle& supportSample,\n                                         const CurveHandle& rangeSample,\n                                         const Ref<CurvesEditor>& editor, const Color4& color):\n        mainHandle(mmake<CurveHandle>(mainSample)), leftSupportHandle(mmake<CurveHandle>(supportSample)), \n        rightSupportHandle(mmake<CurveHandle>(supportSample)), topRangeHandle(mmake<CurveHandle>(rangeSample)),\n        bottomRangeHandle(mmake<CurveHandle>(rangeSample)), curveEditor(editor)\n    {\n        mainHandle->SetDrawablesColor(color);\n    }\n\n    void CurvesEditor::KeyHandles::Draw(const RectF& camRect)\n    {\n        mainHandle->UpdateScreenPosition();\n\n        if (leftSupportHandle->enabled)\n        {\n            leftSupportHandle->UpdateScreenPosition();\n            o2Render.DrawAALine(mainHandle->GetScreenPosition(), leftSupportHandle->GetScreenPosition(), curveEditor.Lock()->mGridColor);\n        }\n\n        if (rightSupportHandle->enabled)\n        {\n            rightSupportHandle->UpdateScreenPosition();\n            o2Render.DrawAALine(mainHandle->GetScreenPosition(), rightSupportHandle->GetScreenPosition(), curveEditor.Lock()->mGridColor);\n        }\n\n        mainHandle->Draw(camRect);\n        leftSupportHandle->Draw(camRect);\n        rightSupportHandle->Draw(camRect);\n        topRangeHandle->Draw(camRect);\n        bottomRangeHandle->Draw(camRect);\n    }\n\n    bool CurvesEditor::KeyHandles::IsSomeHandleSelected() const\n    {\n        return mainHandle->IsSelected() || leftSupportHandle->IsSelected() || rightSupportHandle->IsSelected();\n    }\n\n    bool CurvesEditor::CurveKeysInfo::operator==(const CurveKeysInfo& other) const\n    {\n        return curveId == other.curveId && keys == other.keys;\n    }\n\n    bool CurvesEditor::SelectedHandlesInfo::operator==(const SelectedHandlesInfo& other) const\n    {\n        return index == other.index && mainHandle == other.mainHandle && leftSupportHandle == other.leftSupportHandle &&\n            rightSupportHandle == other.rightSupportHandle;\n    }\n\n    CurvesEditor::CurveHandle::CurveHandle()\n    { }\n\n    CurvesEditor::CurveHandle::CurveHandle(const Ref<Sprite>& regular, \n                                           const Ref<Sprite>& hover /*= nullptr*/, \n                                           const Ref<Sprite>& pressed /*= nullptr*/, \n                                           const Ref<Sprite>& selected /*= nullptr*/, \n                                           const Ref<Sprite>& selectedHovered /*= nullptr*/, \n                                           const Ref<Sprite>& selectedPressed /*= nullptr*/):\n        DragHandle(regular, hover, pressed, selected, selectedHovered, selectedPressed)\n    { }\n\n    CurvesEditor::CurveHandle::CurveHandle(const CurveHandle& other) :\n        DragHandle(other)\n    { }\n\n    CurvesEditor::CurveHandle::~CurveHandle()\n    { }\n\n    CurvesEditor::CurveHandle& CurvesEditor::CurveHandle::operator=(const CurveHandle& other)\n    {\n        DragHandle::operator=(other);\n        return *this;\n    }\n\n    Vec2F CurvesEditor::CurveHandle::GetLocalPosition() const\n    {\n        return CurveViewToLocal(GetPosition());\n    }\n\n    Vec2F CurvesEditor::CurveHandle::LocalToCurveView(const Vec2F& point) const\n    {\n        return curveInfo->editor.Lock()->LocalToCurveView(point, curveInfo->viewScale, curveInfo->viewOffset);\n    }\n\n    Vec2F CurvesEditor::CurveHandle::CurveViewToLocal(const Vec2F& point) const\n    {\n        return curveInfo->editor.Lock()->CurveViewToLocal(point, curveInfo->viewScale, curveInfo->viewOffset);\n    }\n\n    Vec2F CurvesEditor::CurveHandle::ScreenToLocal(const Vec2F& point)\n    {\n        return LocalToCurveView(curveInfo->editor.Lock()->ScreenToLocalPoint(point));\n    }\n\n    Vec2F CurvesEditor::CurveHandle::LocalToScreen(const Vec2F& point)\n    {\n        return curveInfo->editor.Lock()->LocalToScreenPoint(CurveViewToLocal(point));\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::CurvesEditor>);\n// --- META ---\n\nDECLARE_CLASS(Editor::CurvesEditor, Editor__CurvesEditor);\n\nDECLARE_CLASS(Editor::CurvesEditor::CurveHandle, Editor__CurvesEditor__CurveHandle);\n\nDECLARE_CLASS(Editor::CurvesEditor::CurveCopyInfo, Editor__CurvesEditor__CurveCopyInfo);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/CurveEditor/CurvesEditor.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Camera.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Editor/FrameHandles.h\"\n#include \"o2/Utils/Math/Curve.h\"\n#include \"o2Editor/Actions/ActionsList.h\"\n#include \"o2Editor/Actions/IAction.h\"\n#include \"o2Editor/UI/FrameScrollView.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class ContextMenu;\n    class EditBox;\n    class Window;\n}\n\nnamespace Editor\n{\n    // ---------------------\n    // Curves editing widget\n    // ---------------------\n    class CurvesEditor : public FrameScrollView, public SelectableDragHandlesGroup\n    {\n    public:\n        Ref<ActionsList> actionsListDelegate; // Actions fall down list. When it is null, editor uses local actions list\n\n    public:\n        // Default constructor\n        CurvesEditor(RefCounter* refCounter);\n\n        // Copy-constructor\n        CurvesEditor(RefCounter* refCounter, const CurvesEditor& other);\n\n        // Destructor\n        ~CurvesEditor();\n\n        // Copy-operator\n        CurvesEditor& operator=(const CurvesEditor& other);\n\n        // Draws widget, updates render target \n        void Draw() override;\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Returns list of curves\n        Map<String, Ref<Curve>> GetCurves() const;\n\n        // Adds editing curve with color. If color is default it will be randomized\n        void AddCurve(const String& id, const Ref<Curve>& curve, const Color4& color = Color4(44, 62, 80));\n\n        // Removed curve from editing\n        void RemoveCurve(const Ref<Curve>& curve);\n\n        // Removed curve from editing\n        void RemoveCurve(const String& id);\n\n        // Removes all editing curves\n        void RemoveAllCurves();\n\n        // Sets curve color\n        void SetCurveColor(const Ref<Curve>& curve, const Color4& color);\n\n        // Sets selection rectangle sprite image\n        void SetSelectionSpriteImage(const AssetRef<ImageAsset>& image);\n\n        // Sets captions text font\n        void SetTextFont(const Ref<Font>& font);\n\n        // Sets captions offsets \n        void SetTextBorder(const BorderF& border);\n\n        // Sets main key handle images\n        void SetMainHandleImages(const AssetRef<ImageAsset>& regular, const AssetRef<ImageAsset>& hover, const AssetRef<ImageAsset>& pressed,\n                                 const AssetRef<ImageAsset>& selected);\n\n        // Sets support key handle images\n        void SetSupportHandleImages(const AssetRef<ImageAsset>& regular, const AssetRef<ImageAsset>& hover, const AssetRef<ImageAsset>& pressed,\n                                    const AssetRef<ImageAsset>& selected);\n\n        // Sets range key handle images\n        void SetRangeHandleImages(const AssetRef<ImageAsset>& regular, const AssetRef<ImageAsset>& hover, const AssetRef<ImageAsset>& pressed,\n                                  const AssetRef<ImageAsset>& selected);\n\n        // Enables curves scale adjusting. When it is true, all curves adopts their size to be in the same view range\n        void SetAdjustCurvesScale(bool enable);\n\n\t\t// Called when editor root window was focused. Updates context menu priority\n        void OnFocusedByRoot();\n\n\t\t// Called when editor root window was unfocused. Updates context menu priority\n\t\tvoid OnUnfocusedByRoot();\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns context menu\n        const Ref<ContextMenu>& GetContextMenu() const;\n\n        // Dynamic cast to RefCounterable via Component\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<CurvesEditor>& ref);\n\n        SERIALIZABLE(CurvesEditor);\n        CLONEABLE_REF(CurvesEditor);\n\n    public:\n        struct CurveInfo;\n\n        // --------------------------------------\n        // Drag handle specified to curves editor\n        // --------------------------------------\n        struct CurveHandle : public DragHandle\n        {\n            Ref<CurveInfo> curveInfo; // Curve info\n\n        public:\n            // Default constructor\n            CurveHandle();\n\n            // Constructor with views\n            CurveHandle(const Ref<Sprite>& regular, const Ref<Sprite>& hover = nullptr, const Ref<Sprite>& pressed = nullptr,\n                        const Ref<Sprite>& selected = nullptr, const Ref<Sprite>& selectedHovered = nullptr, const Ref<Sprite>& selectedPressed = nullptr);\n\n            // Copy-constructor\n            CurveHandle(const CurveHandle& other);\n\n            // Destructor\n            ~CurveHandle() override;\n\n            // Copy-operator\n            CurveHandle& operator=(const CurveHandle& other);\n\n            // Returns handle position with curve view transformations\n            Vec2F GetLocalPosition() const;\n\n            // Converts local to view position (transformed by curve view)\n            Vec2F LocalToCurveView(const Vec2F& point) const;\n\n            // Converts view position (transformed by curve view) to local\n            Vec2F CurveViewToLocal(const Vec2F& point) const;\n\n            // Converts point from screen to local space\n            Vec2F ScreenToLocal(const Vec2F& point) override;\n\n            // Converts point from local to screen space\n            Vec2F LocalToScreen(const Vec2F& point) override;\n\n            SERIALIZABLE(CurveHandle);\n        };\n\n        // ------------------------------------------------------\n        // Curve point handles. Contains main and support handles\n        // ------------------------------------------------------\n        struct KeyHandles: public RefCounterable\n        {\n            WeakRef<CurvesEditor> curveEditor; // Owner curves editor\n\n            Ref<CurveHandle> mainHandle;         // Main point handle\n            Ref<CurveHandle> leftSupportHandle;  // Left support handle\n            Ref<CurveHandle> rightSupportHandle; // Right support handle\n            Ref<CurveHandle> topRangeHandle;     // Top range handle\n            Ref<CurveHandle> bottomRangeHandle;  // Bottom range handle\n\n            int    curveKeyIdx = 0; // Curve key index\n            UInt64 curveKeyUid;     // Curve key unique id\n\n        public:\n            // Default constructor\n            KeyHandles() {}\n\n            // Constructor\n            KeyHandles(const CurveHandle& mainSample, const CurveHandle& supportSample, \n                       const CurveHandle& rangeSample, const Ref<CurvesEditor>& editor, const Color4& color);\n\n            // Draws handles\n            void Draw(const RectF& camRect);\n\n            // Returns true if some handle is selected\n            bool IsSomeHandleSelected() const;\n        };\n\n        // ----------------------------------------------------------\n        // Editing curve info. Contains curve, handles and other data\n        // ----------------------------------------------------------\n        struct CurveInfo : public RefCounterable\n        {\n            WeakRef<CurvesEditor> editor; // Owner curves editor\n\n            String     curveId; // Curve id\n            Ref<Curve> curve;   // Editing curve\n\n            Vector<Ref<KeyHandles>> handles; // Curve key handles\n\n            Vector<Pair<Vec2F, Vec2F>> approximatedPoints; // Cached approximated curve points\n\n            Color4 color; // Curve draw color\n\n            Vec2F viewScale;  // Adjust curve normalized view scale\n            Vec2F viewOffset; // Adjust curve normalized view offset\n\n            bool disableChangesHandling = false; // Disable changes handling\n\n        public:\n            // Default constructor\n            CurveInfo();\n\n            // Destructor\n            ~CurveInfo();\n\n            // Updates handles positions and turns on/off support handles\n            void UpdateHandles();\n\n            // Updates approximated points\n            void UpdateApproximatedPoints();\n\n            // Adjusts curve view scale for normalized view\n            void AdjustScale();\n\n            // Called when curve changed, updates handles and approximated points\n            void OnCurveChanged();\n\n            // Begins manual curve change\n            void BeginCurveManualChange();\n\n            // Ends manual curve change\n            void CompleteCurveManualChange();\n        };\n\n        // ----------------------------------------------\n        // Curve copying info. Contains curve id and keys\n        // ----------------------------------------------\n        class CurveCopyInfo : public ISerializable, public RefCounterable\n        {\n        public:\n            String             curveId; // Curve id @SERIALIZABLE\n            Vector<Curve::Key> keys;    // List of copying keys @SERIALIZABLE\n\n            SERIALIZABLE(CurveCopyInfo);\n        };\n\n        // -----------------------------------------------\n        // Selected handles info. Contains index and flags\n        // -----------------------------------------------\n        struct SelectedHandlesInfo\n        {\n            int  index = 0;                  // Selected handle index\n            bool mainHandle = false;         // Main handle selected\n            bool leftSupportHandle = false;  // Left support handle selected\n            bool rightSupportHandle = false; // Right support handle selected\n\n            bool operator==(const SelectedHandlesInfo& other) const;\n        };\n\n        // -------------------------------------------------------------\n        // Curve keys info. Contains curve id, keys and selected handles\n        // -------------------------------------------------------------\n        struct CurveKeysInfo\n        {\n            String curveId; // Curve id\n\n            Vector<Curve::Key>          keys;            // Curve keys\n            Vector<SelectedHandlesInfo> selectedHandles; // Selected handles\n\n            bool operator==(const CurveKeysInfo& other) const;\n        };\n\n    protected:\n        Ref<ContextMenu> mContextMenu; // Context menu for editing keys properties, copying, pasting and other\n\n        CurveHandle    mMainHandleSample;      // Main handle sample, uses to copy sprites @SERIALIZABLE\n        CurveHandle    mSupportHandleSample;   // Support handle sample, uses to copy sprites @SERIALIZABLE\n        CurveHandle    mRangeHandleSample;  // Top range handle sample, uses to copy sprites @SERIALIZABLE\n        Ref<CurveInfo> mHandleSamplesStubInfo; // Empty curve info, used int handles samples\n\n        Vector<Ref<CurveInfo>> mCurves; // Editing curves infos list\n\n        Vector<Ref<CurveHandle>>        mSupportHandles;                                            // Support points handles list\n        Ref<SelectableDragHandlesGroup> mSupportHandlesGroup = mmake<SelectableDragHandlesGroup>(); // Support points handles selection group. They are must be selectable separately from main handles\n\n        Vector<Ref<CurveHandle>> mSelectingHandlesBuf; // Potentially selecting handles while selecting\n\n        Ref<Sprite> mSelectionSprite; // Selection sprite @SERIALIZABLE\n\n        bool mAdjustCurvesScale = true; // When it is true, all curves adopts their size to be in the same view range\n\n        Ref<Font> mTextFont;   // Captions text font @SERIALIZABLE\n        Ref<Text> mTextLeft;   // Captions text drawable at left border\n        Ref<Text> mTextRight;  // Captions text drawable at right border\n        Ref<Text> mTextTop;    // Captions text drawable at top border\n        Ref<Text> mTextBottom; // Captions text drawable at bottom border\n        BorderF   mTextBorder; // Captions offsets from border\n\n        Ref<Mesh> mCurvesMesh; // Mesh for drawing curves ranges\n\n        Vec2F mSelectingPressedPoint; // Point, where cursor was pressed, selection starts here, in local space\n\n        Ref<FrameHandles> mTransformFrame;                // Keys transformation frame\n        bool              mTransformFrameVisible = false; // Is transform frame visible. it visible when 2 or more main handles was selected\n        Basis             mTransformFrameBasis;           // Basis of transform frame in screen space\n\n        bool mIsViewScrolling = false; // Is scrolling view at this time\n\n        bool mNeedAdjustView = false; // True when need to adjust view scale. This works in update\n\n        Vector<CurveKeysInfo> mBeforeTransformKeys; // Stored selected keys before handles transformed\n\n    protected:\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        // Searches curve by id\n        Ref<Curve> FindCurve(const String& id);\n\n        // Initializes context menu items\n        void InitializeContextMenu();\n\n        // Initializes text drawables by font and sets aligning\n        void InitializeTextDrawables();\n\n        // Recalculates view area by curves approximated points\n        void RecalculateViewArea();\n\n        // Redraws content into render target\n        void RedrawContent() override;\n\n        // Draws grid and captions\n        void DrawGrid() override;\n\n        // Draws curves\n        void DrawCurves();\n\n        // Draws handles\n        void DrawHandles();\n\n        // Draw selection sprite\n        void DrawSelection();\n\n        // Draws transformation frame\n        void DrawTransformFrame();\n\n        // Adds curve key main and support handles and initializes them\n        void AddCurveKeyHandles(const Ref<CurveInfo>& info, int keyId);\n\n        // Removes curve key handles\n        void RemoveCurveKeyHandles(const Ref<CurveInfo>& info, int keyId);\n\n        // Called when one of main curve key handles was moved. Updates graphics and handles\n        void OnCurveKeyMainHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position);\n\n        // Called when main curve key handle was pressed, calls OnTransformBegin and checks to add value range. Updates graphics and handles\n        void OnCurveKeyMainHandlePressed(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles);\n\n        // Called when one of left support curve key handles was moved. Updates graphics and handles\n        void OnCurveKeyLeftSupportHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position);\n\n        // Called when one of right support curve key handles was moved. Updates graphics and handles\n        void OnCurveKeyRightSupportHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position);\n\n        // Called when one of top range curve key handles was moved. Updates graphics and handles\n        void OnCurveKeyTopRangeHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position);\n\n        // Called when one of bottom range curve key handles was moved. Updates graphics and handles\n        void OnCurveKeyBottomRangeHandleDragged(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position);\n\n        // Checks left support handle constrains and returns filtered position\n        Vec2F CheckLeftSupportHandlePosition(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position);\n\n        // Checks right support handle constrains and returns filtered position\n        Vec2F CheckRightSupportHandlePosition(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position);\n\n        // Checks top range handle constrains and returns filtered position\n        Vec2F CheckTopRangeHandlePosition(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position);\n\n        // Checks bottom range handle constrains and returns filtered position\n        Vec2F CheckBottomRangeHandlePosition(const Ref<CurveInfo>& info, const Ref<KeyHandles>& handles, const Vec2F& position);\n\n        // Smooths key support points and updates handles\n        void SmoothKey(const Ref<CurveInfo>& info, int idx);\n\n        // Called when cursor double clicked, adds new point in curve\n        void OnCursorDblClicked(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button stay down on this, overriding from scroll view to call context menu\n        void OnCursorRightMouseStayDown(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time), overriding from scroll view to call context menu\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Called when selectable draggable handle was released\n        void OnHandleCursorReleased(const Ref<DragHandle>& handle, const Input::Cursor& cursor) override;\n\n        // Called when selectable handle was began to drag\n        void OnHandleBeganDragging(const Ref<DragHandle>& handle) override;\n\n        // Called when selectable handle moved, moves all selected handles position\n        void OnHandleMoved(const Ref<DragHandle>& handle, const Vec2F& cursorPos) override;\n\n        // Called when selectable handle completed changing\n        void OnHandleCompletedChange(const Ref<DragHandle>& handle) override;\n\n        // Called when selection is changed - some handle was added or removed from selection\n        void OnSelectionChanged() override;\n\n        // Checks supports handles visibility\n        void CheckHandlesVisible();\n\n        // Updates transformation frame by selected handles\n        void UpdateTransformFrame();\n\n        // Returns is transform frame visible. it will be visible when 2 or more main handles was selected\n        bool IsTransformFrameVisible() const;\n\n        // Sets all selected keys supports type\n        void SetSelectedKeysSupportsType(Curve::Key::Type type);\n\n        // Called when transform frame was transformed\n        void OnTransformFrameTransformed(const Basis& basis);\n\n        // Called when beginning transforming some handles. Stores selected keys before changing\n        void OnTransformBegin();\n\n        // Called when transform completed. Checks that selected keys changed, creates action for undo/redo\n        void OnTransformCompleted();\n\n        // Transforms point from local to curve view coords\n        Vec2F LocalToCurveView(const Vec2F& point, const Vec2F& viewScale, const Vec2F& viewOffset) const;\n\n        // Transforms point from curve view to local coords\n        Vec2F CurveViewToLocal(const Vec2F& point, const Vec2F& viewScale, const Vec2F& viewOffset) const;\n\n        // Stores undo action, clears redo actions\n        void DoneAction(const Ref<IAction>& action);\n\n\n        // On context menu edit pressed. Shows key edit window\n        void OnEditPressed();\n\n        // Sets handles types for selected keys and checks context menu items\n        void SetHandlesTypesChecked(Curve::Key::Type type);\n\n        // On context menu copy pressed. Stores keys into buffer\n        void OnCopyPressed();\n\n        // On context menu cut pressed. Stores keys into buffer and removes them\n        void OnCutPressed();\n\n        // On context menu paste pressed. Inserts keys from buffer at cursor position\n        void OnPastePressed();\n\n        // On context menu delete pressed. Deletes selected keys\n        void OnDeletePressed();\n\n        // On context menu insert pressed. Inserts keys from buffer and moves keys to right\n        void OnInsertPressed();\n\n        // On context menu undo pressed. Reverts previous action and puts into actions stack\n        void OnUndoPressed();\n\n        // On context menu redo pressed. Restores action from stack\n        void OnRedoPressed(); \n        \n        REF_COUNTERABLE_IMPL(FrameScrollView, SelectableDragHandlesGroup);\n\n        friend class CurveAddKeysAction;\n        friend class CurveDeleteKeysAction;\n        friend class CurveKeysChangeAction;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::CurvesEditor)\n{\n    BASE_CLASS(Editor::FrameScrollView);\n    BASE_CLASS(o2::SelectableDragHandlesGroup);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CurvesEditor)\n{\n    FIELD().PUBLIC().NAME(actionsListDelegate);\n    FIELD().PROTECTED().NAME(mContextMenu);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mMainHandleSample);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSupportHandleSample);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mRangeHandleSample);\n    FIELD().PROTECTED().NAME(mHandleSamplesStubInfo);\n    FIELD().PROTECTED().NAME(mCurves);\n    FIELD().PROTECTED().NAME(mSupportHandles);\n    FIELD().PROTECTED().DEFAULT_VALUE(mmake<SelectableDragHandlesGroup>()).NAME(mSupportHandlesGroup);\n    FIELD().PROTECTED().NAME(mSelectingHandlesBuf);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectionSprite);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mAdjustCurvesScale);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mTextFont);\n    FIELD().PROTECTED().NAME(mTextLeft);\n    FIELD().PROTECTED().NAME(mTextRight);\n    FIELD().PROTECTED().NAME(mTextTop);\n    FIELD().PROTECTED().NAME(mTextBottom);\n    FIELD().PROTECTED().NAME(mTextBorder);\n    FIELD().PROTECTED().NAME(mCurvesMesh);\n    FIELD().PROTECTED().NAME(mSelectingPressedPoint);\n    FIELD().PROTECTED().NAME(mTransformFrame);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mTransformFrameVisible);\n    FIELD().PROTECTED().NAME(mTransformFrameBasis);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsViewScrolling);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNeedAdjustView);\n    FIELD().PROTECTED().NAME(mBeforeTransformKeys);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CurvesEditor)\n{\n\n    typedef Map<String, Ref<Curve>> _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const CurvesEditor&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(_tmp1, GetCurves);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddCurve, const String&, const Ref<Curve>&, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveCurve, const Ref<Curve>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveCurve, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllCurves);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCurveColor, const Ref<Curve>&, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionSpriteImage, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTextFont, const Ref<Font>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTextBorder, const BorderF&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMainHandleImages, const AssetRef<ImageAsset>&, const AssetRef<ImageAsset>&, const AssetRef<ImageAsset>&, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSupportHandleImages, const AssetRef<ImageAsset>&, const AssetRef<ImageAsset>&, const AssetRef<ImageAsset>&, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRangeHandleImages, const AssetRef<ImageAsset>&, const AssetRef<ImageAsset>&, const AssetRef<ImageAsset>&, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAdjustCurvesScale, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnFocusedByRoot);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnUnfocusedByRoot);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ContextMenu>&, GetContextMenu);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<CurvesEditor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Curve>, FindCurve, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeContextMenu);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeTextDrawables);\n    FUNCTION().PROTECTED().SIGNATURE(void, RecalculateViewArea);\n    FUNCTION().PROTECTED().SIGNATURE(void, RedrawContent);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawGrid);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawCurves);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawHandles);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawSelection);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawTransformFrame);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddCurveKeyHandles, const Ref<CurveInfo>&, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveCurveKeyHandles, const Ref<CurveInfo>&, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurveKeyMainHandleDragged, const Ref<CurveInfo>&, const Ref<KeyHandles>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurveKeyMainHandlePressed, const Ref<CurveInfo>&, const Ref<KeyHandles>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurveKeyLeftSupportHandleDragged, const Ref<CurveInfo>&, const Ref<KeyHandles>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurveKeyRightSupportHandleDragged, const Ref<CurveInfo>&, const Ref<KeyHandles>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurveKeyTopRangeHandleDragged, const Ref<CurveInfo>&, const Ref<KeyHandles>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurveKeyBottomRangeHandleDragged, const Ref<CurveInfo>&, const Ref<KeyHandles>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckLeftSupportHandlePosition, const Ref<CurveInfo>&, const Ref<KeyHandles>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckRightSupportHandlePosition, const Ref<CurveInfo>&, const Ref<KeyHandles>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckTopRangeHandlePosition, const Ref<CurveInfo>&, const Ref<KeyHandles>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CheckBottomRangeHandlePosition, const Ref<CurveInfo>&, const Ref<KeyHandles>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SmoothKey, const Ref<CurveInfo>&, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorDblClicked, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseStayDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHandleCursorReleased, const Ref<DragHandle>&, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHandleBeganDragging, const Ref<DragHandle>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHandleMoved, const Ref<DragHandle>&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHandleCompletedChange, const Ref<DragHandle>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectionChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckHandlesVisible);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTransformFrame);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsTransformFrameVisible);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetSelectedKeysSupportsType, Curve::Key::Type);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformFrameTransformed, const Basis&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformBegin);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformCompleted);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, LocalToCurveView, const Vec2F&, const Vec2F&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, CurveViewToLocal, const Vec2F&, const Vec2F&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DoneAction, const Ref<IAction>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetHandlesTypesChecked, Curve::Key::Type);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCopyPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCutPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPastePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeletePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnInsertPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUndoPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRedoPressed);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::CurvesEditor::CurveHandle)\n{\n    BASE_CLASS(o2::DragHandle);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CurvesEditor::CurveHandle)\n{\n    FIELD().PUBLIC().NAME(curveInfo);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CurvesEditor::CurveHandle)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<Sprite>&, const Ref<Sprite>&, const Ref<Sprite>&, const Ref<Sprite>&, const Ref<Sprite>&, const Ref<Sprite>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const CurveHandle&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetLocalPosition);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, LocalToCurveView, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, CurveViewToLocal, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, ScreenToLocal, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, LocalToScreen, const Vec2F&);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::CurvesEditor::CurveCopyInfo)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CurvesEditor::CurveCopyInfo)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(curveId);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(keys);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CurvesEditor::CurveCopyInfo)\n{\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/CurvePreview.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"CurvePreview.h\"\n\n#include \"o2/Render/Camera.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Utils/Math/Curve.h\"\n\nnamespace Editor\n{\n    CurvePreview::CurvePreview(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        mSprite = mmake<Sprite>();\n        AddLayer(\"image\", mSprite);\n\n        mMesh = mmake<Mesh>();\n        mMesh->Resize(4, 2);\n    }\n\n    CurvePreview::CurvePreview(RefCounter* refCounter, const CurvePreview& other):\n        Widget(refCounter, other), mBackColor(other.mBackColor), mCurveColor(other.mCurveColor)\n    {\n        mSprite = GetLayerDrawable<Sprite>(\"image\");\n        RetargetStatesAnimations();\n\n        mMesh = mmake<Mesh>();\n        mMesh->Resize(4, 2);\n    }\n\n    CurvePreview& CurvePreview::operator=(const CurvePreview& other)\n    {\n        Widget::operator=(other);\n\n        mBackColor = other.mBackColor;\n        mCurveColor = other.mCurveColor;\n\n        mSprite = GetLayerDrawable<Sprite>(\"image\");\n        RetargetStatesAnimations();\n\n        mNeedRedraw = true;\n\n        return *this;\n    }\n\n    void CurvePreview::SetCurve(const Ref<Curve>& curve)\n    {\n        if (mCurve == curve)\n            return;\n\n        if (mCurve)\n            mCurve->onKeysChanged -= THIS_FUNC(OnCurveChanged);\n\n        mCurve = curve;\n\n        if (mCurve)\n            mCurve->onKeysChanged += THIS_FUNC(OnCurveChanged);\n    }\n\n    void CurvePreview::Draw()\n    {\n        if (mNeedRedraw)\n            Redraw();\n\n        Widget::Draw();\n    }\n\n    void CurvePreview::SetBackColor(const Color4& color)\n    {\n        mBackColor = color;\n        mNeedRedraw = true;\n    }\n\n    Color4 CurvePreview::GetBackColor() const\n    {\n        return mBackColor;\n    }\n\n    void CurvePreview::SetCurveColor(const Color4& color)\n    {\n        mCurveColor = color;\n        mNeedRedraw = true;\n    }\n\n    Color4 CurvePreview::GetCurveColor() const\n    {\n        return mCurveColor;\n    }\n\n    String CurvePreview::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void CurvePreview::UpdateLayersLayouts()\n    {\n        mNeedRedraw = true;\n        Widget::UpdateLayersLayouts();\n    }\n\n    void CurvePreview::Redraw()\n    {\n        if (!mCurve)\n            return;\n\n        TextureRef texture = mSprite->GetTexture();\n        if (!texture || texture->GetSize() != (Vec2I)layout->GetSize())\n        {\n            texture = TextureRef(layout->GetSize(), TextureFormat::R8G8B8A8, Texture::Usage::RenderTarget);\n            mSprite->SetTexture(texture);\n            mSprite->SetTextureSrcRect(RectI(Vec2I(), texture->GetSize()));\n        }\n\n        o2Render.BindRenderTexture(texture);\n        o2Render.Clear(mBackColor);\n\n        Camera camera; camera.SetRect(mCurve->GetRect());\n        camera.SetScale(camera.GetScale());\n\n        Camera defaultCamera = o2Render.GetCamera();\n        defaultCamera.leftBottom += Vec2F(10.0f, 11.0f);\n        defaultCamera.rightTop   -= Vec2F(10.0f, 11.0f);\n\n        Basis transform = camera.GetBasis().Inverted()*defaultCamera.GetBasis();\n\n        for (auto& key : mCurve->GetKeys())\n        {\n            auto topPoints = key.GetTopApproximatedPoints();\n            auto bottomPoints = key.GetBottomApproximatedPoints();\n\n            auto lastTopPoint = topPoints[0]*transform;\n            auto lastBottomPoint = bottomPoints[0]*transform;\n\n            for (int i = 1; i < key.GetApproximatedPointsCount(); i++)\n            {\n                auto topPoint = topPoints[i]*transform;\n                auto bottomPoint = bottomPoints[i]*transform;\n\n                Color4 meshColor = mCurveColor; meshColor.a /= 2;\n\n                Vertex* cv = mMesh->GetVertices<Vertex>();\n                VertexIndex* idx = mMesh->GetIndexes();\n                cv[0] = Vertex(lastTopPoint, meshColor.ABGR(), 0, 0);\n                cv[1] = Vertex(lastBottomPoint, meshColor.ABGR(), 0, 0);\n                cv[2] = Vertex(topPoint, meshColor.ABGR(), 0, 0);\n                cv[3] = Vertex(bottomPoint, meshColor.ABGR(), 0, 0);\n\n                idx[0] = 0; idx[1] = 1; idx[2] = 2;\n                idx[3] = 2; idx[4] = 1; idx[5] = 3;\n\n                mMesh->vertexCount = 4;\n                mMesh->polyCount = 2;\n\n                mMesh->Draw();\n\n                o2Render.DrawAALine(lastTopPoint, topPoint, mCurveColor, 1.5f);\n                o2Render.DrawAALine(lastBottomPoint, bottomPoint, mCurveColor, 1.5f);\n\n                lastTopPoint = topPoint;\n                lastBottomPoint = bottomPoint;\n            }\n        }\n\n        o2Render.UnbindRenderTexture();\n\n        mNeedRedraw = false;\n    }\n\n    void CurvePreview::OnCurveChanged()\n    {\n        mNeedRedraw = true;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::CurvePreview>);\n// --- META ---\n\nDECLARE_CLASS(Editor::CurvePreview, Editor__CurvePreview);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/CurvePreview.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Curve;\n    class Sprite;\n}\n\nnamespace Editor\n{\n    // -------------------\n    // Curve preview image\n    // -------------------\n    class CurvePreview: public Widget\n    {\n    public:\n        // Default constructor. Initializes image\n        CurvePreview(RefCounter* refCounter);\n\n        // Default copy-constructor\n        CurvePreview(RefCounter* refCounter, const CurvePreview& other);\n\n        // Copy operator\n        CurvePreview& operator=(const CurvePreview& other);\n\n        // Sets viewing curve\n        void SetCurve(const Ref<Curve>& curve);\n\n        // Draws widget\n        void Draw() override;\n\n        // Sets back color of image\n        void SetBackColor(const Color4& color);\n\n        // Returns back color of image\n        Color4 GetBackColor() const;\n\n        // Sets curve color on image\n        void SetCurveColor(const Color4& color);\n\n        // Returns curve color on image\n        Color4 GetCurveColor() const;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(CurvePreview);\n        CLONEABLE_REF(CurvePreview);\n\n    protected:\n        Ref<Curve> mCurve; // Viewing curve\n\n        bool mNeedRedraw = false; // Need redraw flag\n\n        Ref<Sprite> mSprite; // Image sprite, used for drawing\n        Ref<Mesh>   mMesh;   // Curves range mesh, used for drawing\n\n        Color4 mBackColor = Color4(225, 232, 232); // Background color\n        Color4 mCurveColor = Color4(44, 62, 80);   // Curve color\n\n    protected:\n        // Updates layers layouts, calls after updating widget layout\n        void UpdateLayersLayouts() override;\n\n        // Redraws image texture\n        void Redraw();\n\n        // Called when curve keys changed, sets need redraw to true\n        void OnCurveChanged();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::CurvePreview)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CurvePreview)\n{\n    FIELD().PROTECTED().NAME(mCurve);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNeedRedraw);\n    FIELD().PROTECTED().NAME(mSprite);\n    FIELD().PROTECTED().NAME(mMesh);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(225, 232, 232)).NAME(mBackColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(44, 62, 80)).NAME(mCurveColor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CurvePreview)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const CurvePreview&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCurve, const Ref<Curve>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBackColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetBackColor);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCurveColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetCurveColor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, Redraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurveChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/FrameScrollView.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"FrameScrollView.h\"\n\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n\nnamespace Editor\n{\n    FrameScrollView::FrameScrollView(RefCounter* refCounter) :\n        ScrollView(refCounter)\n    {\n        mReady = false;\n\n        mHorScrollbar = mmake<HorizontalScrollBar>();\n        *mHorScrollbar->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 20);\n        mHorScrollbar->SetInternalParent(Ref(this));\n        mHorScrollbar->onChangeByUser = THIS_FUNC(OnHorScrollScrolled);\n\n        mVerScrollbar = mmake<VerticalScrollBar>();\n        *mVerScrollbar->layout = WidgetLayout::VerStretch(HorAlign::Right, 0, 0, 20);\n        mVerScrollbar->SetInternalParent(Ref(this));\n        mVerScrollbar->onChangeByUser = THIS_FUNC(OnVerScrollScrolled);\n\n        mReady = true;\n    }\n\n    FrameScrollView::FrameScrollView(RefCounter* refCounter, const FrameScrollView& other) :\n        ScrollView(refCounter, other), mHorScrollbar(other.mHorScrollbar->CloneAs<HorizontalScrollBar>()),\n        mVerScrollbar(other.mVerScrollbar->CloneAs<VerticalScrollBar>())\n    {\n        mReady = false;\n\n        mHorScrollbar->SetInternalParent(Ref(this));\n        mHorScrollbar->onChangeByUser = THIS_FUNC(OnHorScrollScrolled);\n\n        mVerScrollbar->SetInternalParent(Ref(this));\n        mVerScrollbar->onChangeByUser = THIS_FUNC(OnVerScrollScrolled);\n\n        RetargetStatesAnimations();\n\n        mReady = true;\n    }\n\n    FrameScrollView::~FrameScrollView()\n    {}\n\n    FrameScrollView& FrameScrollView::operator=(const FrameScrollView& other)\n    {\n        ScrollView::operator=(other);\n\n        mHorScrollbar = other.mHorScrollbar->CloneAsRef<HorizontalScrollBar>();\n        mHorScrollbar->SetInternalParent(Ref(this));\n        mHorScrollbar->onChangeByUser = THIS_FUNC(OnHorScrollScrolled);\n\n        mVerScrollbar = other.mVerScrollbar->CloneAsRef<VerticalScrollBar>();\n        mVerScrollbar->SetInternalParent(Ref(this));\n        mVerScrollbar->onChangeByUser = THIS_FUNC(OnVerScrollScrolled);\n\n        return *this;\n    }\n\n    void FrameScrollView::Draw()\n    {\n        ScrollView::Draw();\n    }\n\n    void FrameScrollView::Update(float dt)\n    {\n        ScrollView::Update(dt);\n\n        if (!mReady)\n            return;\n\n        UpdateCameraLimits(dt);\n    }\n\n    void FrameScrollView::UpdateSelfTransform()\n    {\n        ScrollView::UpdateSelfTransform();\n    }\n\n    void FrameScrollView::SetHorScrollbar(const Ref<HorizontalScrollBar>& scrollbar)\n    {\n\t\tif (mHorScrollbar)\n\t\t\tRemoveInternalWidget(mHorScrollbar);\n\n        mHorScrollbar = scrollbar;\n        mHorScrollbar->SetInternalParent(Ref(this));\n        mHorScrollbar->onChangeByUser = THIS_FUNC(OnHorScrollScrolled);\n\n        SetLayoutDirty();\n    }\n\n    void FrameScrollView::SetVerScrollbar(const Ref<VerticalScrollBar>& scrollbar)\n    {\n\t\tif (mVerScrollbar)\n\t\t\tRemoveInternalWidget(mVerScrollbar);\n\n        mVerScrollbar = scrollbar;\n        mVerScrollbar->SetInternalParent(Ref(this));\n        mVerScrollbar->onChangeByUser = THIS_FUNC(OnVerScrollScrolled);\n\n        SetLayoutDirty();\n    }\n\n    void FrameScrollView::SetViewArea(const RectF& area)\n    {\n        mAvailableArea = area;\n    }\n\n    RectF FrameScrollView::GetViewArea() const\n    {\n        return mAvailableArea;\n    }\n\n    String FrameScrollView::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void FrameScrollView::UpdateCameraLimits(float dt)\n    {\n        if (o2Input.IsCursorDown())\n            return;\n\n        RectF camRect = mViewCamera.GetRect();\n        Vec2F camSize = camRect.Size();\n\n        mHorScrollbar->SetValueRange(Math::Min(mAvailableArea.left + camSize.x*0.5f, camRect.Center().x),\n                                     Math::Max(mAvailableArea.right - camSize.x*0.5f, camRect.Center().x));\n        mHorScrollbar->SetScrollHandleSize(camRect.Width());\n\n        mVerScrollbar->SetValueRange(Math::Min(mAvailableArea.bottom + camSize.y*0.5f, camRect.Center().y),\n                                     Math::Max(mAvailableArea.top - camSize.y*0.5f, camRect.Center().y));\n\n        mVerScrollbar->SetScrollHandleSize(camRect.Height());\n    }\n\n    void FrameScrollView::OnHorScrollScrolled(float value)\n    {\n        mViewCamera.SetPosition(Vec2F(value, mViewCamera.GetPosition().y));\n        mViewCameraTargetPos = mViewCamera.GetPosition();\n        mNeedRedraw = true;\n    }\n\n    void FrameScrollView::OnVerScrollScrolled(float value)\n    {\n        float min = mVerScrollbar->GetMinValue();\n        float max = mVerScrollbar->GetMaxValue();\n\n        float invertedValue = min + (max - min - (value - min));\n        mViewCamera.SetPosition(Vec2F(mViewCamera.GetPosition().x, invertedValue));\n        mViewCameraTargetPos = mViewCamera.GetPosition();\n        mNeedRedraw = true;\n    }\n\n    void FrameScrollView::OnCameraTransformChanged()\n    {\n        mHorScrollbar->SetValue(mViewCamera.GetPosition().x);\n\n        float min = mVerScrollbar->GetMinValue();\n        float max = mVerScrollbar->GetMaxValue();\n        mVerScrollbar->SetValue(min + (max - min - (mViewCamera.GetPosition().y - min)));\n\n        onViewChanged();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::FrameScrollView>);\n// --- META ---\n\nDECLARE_CLASS(Editor::FrameScrollView, Editor__FrameScrollView);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/FrameScrollView.h",
    "content": "#pragma once\n\n#include \"ScrollView.h\"\n\nnamespace o2\n{\n    class HorizontalScrollBar;\n    class VerticalScrollBar;\n}\n\nnamespace Editor\n{\n    // ----------------------------------------\n    // Scroll view, where view limited by frame\n    // ----------------------------------------\n    class FrameScrollView: public ScrollView\n    {\n    public:\n        Function<void()> onViewChanged; // Camera move or zoom event\n\n    public:\n        // Default constructor\n        FrameScrollView(RefCounter* refCounter);\n\n        // Copy-constructor\n        FrameScrollView(RefCounter* refCounter, const FrameScrollView& other);\n\n        // Destructor\n        ~FrameScrollView();\n\n        // Copy-operator\n        FrameScrollView& operator=(const FrameScrollView& other);\n\n        // Draws widget, updates render target \n        void Draw() override;\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Sets horizontal scrollbar\n        void SetHorScrollbar(const Ref<HorizontalScrollBar>& scrollbar);\n\n        // Sets vertical scrollbar\n        void SetVerScrollbar(const Ref<VerticalScrollBar>& scrollbar);\n\n        // Sets view area\n        void SetViewArea(const RectF& area);\n\n        // Returns view area\n        RectF GetViewArea() const;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(FrameScrollView);\n        CLONEABLE_REF(FrameScrollView);\n\n    protected:\n        Ref<HorizontalScrollBar> mHorScrollbar; // Horizontal view scrollbar @SERIALIZABLE\n        Ref<VerticalScrollBar>   mVerScrollbar; // Vertical view scrollbar @SERIALIZABLE\n\n        RectF mAvailableArea; // Available viewing area @SERIALIZABLE\n\n    protected:\n        // Updates camera limits\n        void UpdateCameraLimits(float dt);\n\n        // Called when horizontal scroll bar was scrolled\n        void OnHorScrollScrolled(float value);\n\n        // Called when vertical scroll bar was scrolled\n        void OnVerScrollScrolled(float value);\n\n        // Called when camera position was changed\n        void OnCameraTransformChanged() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::FrameScrollView)\n{\n    BASE_CLASS(Editor::ScrollView);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::FrameScrollView)\n{\n    FIELD().PUBLIC().NAME(onViewChanged);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHorScrollbar);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mVerScrollbar);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mAvailableArea);\n}\nEND_META;\nCLASS_METHODS_META(Editor::FrameScrollView)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const FrameScrollView&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHorScrollbar, const Ref<HorizontalScrollBar>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVerScrollbar, const Ref<VerticalScrollBar>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetViewArea, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetViewArea);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateCameraLimits, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHorScrollScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnVerScrollScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCameraTransformChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/ImageSlicesEditorWidget.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ImageSlicesEditorWidget.h\"\n\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2Editor/Properties/Basic/BorderIntProperty.h\"\n\nnamespace Editor\n{\n    ImageSlicesEditorWidget::ImageSlicesEditorWidget(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        InitializeImagePreview();\n    }\n\n    ImageSlicesEditorWidget::ImageSlicesEditorWidget(RefCounter* refCounter, const ImageSlicesEditorWidget& other):\n        Widget(refCounter, other)\n    {\n        InitializeImagePreview();\n    }\n\n    ImageSlicesEditorWidget& ImageSlicesEditorWidget::operator=(const ImageSlicesEditorWidget& other)\n    {\n        Widget::operator=(other);\n        InitializeImagePreview();\n        return *this;\n    }\n\n    void ImageSlicesEditorWidget::Setup(const AssetRef<ImageAsset>& image, const Ref<BorderIProperty>& borderProperty)\n    {\n        mBorderProperty = borderProperty;\n\n        mPreviewImage->SetImageAsset(image);\n        mPreviewImage->GetImage()->mode = SpriteMode::Default;\n\n        FitImage();\n    }\n\n    String ImageSlicesEditorWidget::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void ImageSlicesEditorWidget::InitializeImagePreview()\n    {\n        layout->minHeight = 200;\n\n        auto separatorImg = o2UI.CreateImage(\"ui/UI4_Separator.png\");\n        *separatorImg->layout = WidgetLayout::HorStretch(VerAlign::Bottom, -6, -15, 5, -4);\n        AddChild(separatorImg);\n\n        mPreviewImageBack = mmake<Image>();\n        mPreviewImageBack->SetImage(CreateGridSprite());\n        *mPreviewImageBack->layout = WidgetLayout::BothStretch();\n        AddChild(mPreviewImageBack);\n\n        mPreviewImage = mmake<PreviewImage>();\n        *mPreviewImage->layout = WidgetLayout::BothStretch();\n        AddChild(mPreviewImage);\n\n        InitializeSliceHandles();\n    }\n\n    void ImageSlicesEditorWidget::InitializeSliceHandles()\n    {\n        // Left handle\n        mBorderLeftHandle = mmake<WidgetDragHandle>(mmake<Sprite>(\"ui/ver_slice_line.png\"));\n\n        mBorderLeftHandle->localToWidgetOffsetTransformFunc = [&](const Vec2F& point) {\n            return point / mPreviewImage->GetImage()->GetOriginalSize() * mPreviewImage->layout->GetSize();\n        };\n\n        mBorderLeftHandle->widgetOffsetToLocalTransformFunc = [&](const Vec2F& point) {\n            return point / mPreviewImage->layout->GetSize() * mPreviewImage->GetImage()->GetOriginalSize();\n        };\n\n        mBorderLeftHandle->checkPositionFunc = [&](const Vec2F& point) {\n            return Vec2F(Math::Clamp(point.x, 0.0f, (float)mPreviewImage->GetImage()->GetOriginalSize().x), mPreviewImage->GetImage()->GetOriginalSize().y*0.5f);\n        };\n\n        mBorderLeftHandle->onChangedPos = [&](const Vec2F& point) {\n            mBordersSmoothValue.left = point.x;\n            UpdateBordersValue();\n        };\n\n        mBorderLeftHandle->cursorType = CursorType::SizeWE;\n\n        // Right handle\n        mBorderRightHandle = mmake<WidgetDragHandle>(*mBorderLeftHandle);\n\n        mBorderRightHandle->onChangedPos = [&](const Vec2F& point) {\n            mBordersSmoothValue.right = (float)mPreviewImage->GetImage()->GetOriginalSize().x - point.x;\n            UpdateBordersValue();\n        };\n\n        mPreviewImage->AddChild(mBorderLeftHandle);\n        mPreviewImage->AddChild(mBorderRightHandle);\n\n        // Top handle\n        mBorderTopHandle = mmake<WidgetDragHandle>(mmake<Sprite>(\"ui/hor_slice_line.png\"));\n\n        mBorderTopHandle->localToWidgetOffsetTransformFunc = [&](const Vec2F& point) {\n            return point / mPreviewImage->GetImage()->GetOriginalSize() * mPreviewImage->layout->GetSize();\n        };\n\n        mBorderTopHandle->widgetOffsetToLocalTransformFunc = [&](const Vec2F& point) {\n            return point / mPreviewImage->layout->GetSize() * mPreviewImage->GetImage()->GetOriginalSize();\n        };\n\n        mBorderTopHandle->checkPositionFunc = [&](const Vec2F& point) {\n            return Vec2F(mPreviewImage->GetImage()->GetOriginalSize().x*0.5f, Math::Clamp(point.y, 0.0f, (float)mPreviewImage->GetImage()->GetOriginalSize().y));\n        };\n\n        mBorderTopHandle->onChangedPos = [&](const Vec2F& point) {\n            mBordersSmoothValue.top = (float)mPreviewImage->GetImage()->GetOriginalSize().y - point.y;\n            UpdateBordersValue();\n        };\n\n        mBorderTopHandle->cursorType = CursorType::SizeNS;\n\n        // Bottom handle\n        mBorderBottomHandle = mmake<WidgetDragHandle>(*mBorderTopHandle);\n\n        mBorderBottomHandle->onChangedPos = [&](const Vec2F& point) {\n            mBordersSmoothValue.bottom = point.y;\n            UpdateBordersValue();\n        };\n\n        mPreviewImage->AddChild(mBorderTopHandle);\n        mPreviewImage->AddChild(mBorderBottomHandle);\n    }\n\n    void ImageSlicesEditorWidget::FitImage()\n    {\n        if (layout->IsDirty())\n            UpdateTransform();\n\n        Vec2F maxSize = layout->size;\n        Vec2F imageSize = mPreviewImage->GetImage()->GetOriginalSize();\n\n        float heightFitScale = maxSize.y/imageSize.y;\n        float widthFitDifference = maxSize.x - imageSize.x*heightFitScale;\n\n        float widthFitScale = maxSize.x/imageSize.x;\n        float heightFitDifference = maxSize.y - imageSize.y*widthFitScale;\n\n        bool fitByHeight = true;\n        if (widthFitDifference > 0.0f && heightFitDifference > 0.0f)\n            fitByHeight = heightFitDifference < widthFitDifference;\n        else if (widthFitDifference > 0.0f)\n            fitByHeight = true;\n        else\n            fitByHeight = false;\n\n        float imageSizeAspect = imageSize.x/imageSize.y;\n        float contentAspect = maxSize.x/maxSize.y;\n\n        if (fitByHeight)\n        {\n            float d = imageSizeAspect*0.5f/contentAspect;\n            *mPreviewImage->layout = WidgetLayout(Vec2F(0.5f - d, 0.0f), Vec2F(0.5f + d, 1.0f), Vec2F(), Vec2F());\n        }\n        else\n        {\n            float d = 1.0f/imageSizeAspect*0.5f*contentAspect;\n            *mPreviewImage->layout = WidgetLayout(Vec2F(0.0f, 0.5f - d), Vec2F(1.0f, 0.5f + d), Vec2F(), Vec2F());\n        }\n\n        *mPreviewImageBack->layout = *mPreviewImage->layout;\n\n        UpdateBordersAnchors();\n        mBordersSmoothValue = mBorderProperty->GetCommonValue();\n    }\n\n    void ImageSlicesEditorWidget::UpdateBordersAnchors()\n    {\n        BorderI borders = mBorderProperty->GetCommonValue();\n        Vec2F imageSize = mPreviewImage->GetImage()->GetOriginalSize();\n\n        mPreviewImage->UpdateTransform();\n        mBorderLeftHandle->GetRegularDrawable()->SetSize(Vec2F(10.0f, mPreviewImage->layout->GetHeight()));\n        mBorderRightHandle->GetRegularDrawable()->SetSize(Vec2F(10.0f, mPreviewImage->layout->GetHeight()));\n        mBorderTopHandle->GetRegularDrawable()->SetSize(Vec2F(mPreviewImage->layout->GetWidth(), 10.0f));\n        mBorderBottomHandle->GetRegularDrawable()->SetSize(Vec2F(mPreviewImage->layout->GetWidth(), 10.0f));\n\n        mBorderLeftHandle->SetPosition(Vec2F((float)borders.left, 0));\n        mBorderRightHandle->SetPosition(Vec2F(imageSize.x - (float)borders.right, 0));\n        mBorderTopHandle->SetPosition(Vec2F(0, imageSize.y - (float)borders.top));\n        mBorderBottomHandle->SetPosition(Vec2F(0, (float)borders.bottom));\n    }\n\n    void ImageSlicesEditorWidget::UpdateBordersValue()\n    {\n        mBorderProperty->SetValue(mBordersSmoothValue);\n        UpdateBordersAnchors();\n    }\n\n    Ref<Sprite> ImageSlicesEditorWidget::CreateGridSprite()\n    {\n        Color4 color1(1.0f, 1.0f, 1.0f, 1.0f), color2(0.7f, 0.7f, 0.7f, 1.0f);\n        Bitmap backLayerBitmap(PixelFormat::R8G8B8A8, Vec2I(20, 20));\n        backLayerBitmap.Fill(color1);\n        backLayerBitmap.FillRect(0, 10, 10, 0, color2);\n        backLayerBitmap.FillRect(10, 20, 20, 10, color2);\n\n        auto res = mmake<Sprite>(backLayerBitmap);\n        res->SetMode(SpriteMode::Tiled);\n        return res;\n    }\n\n    ImageSlicesEditorWidget::PreviewImage::PreviewImage(RefCounter* refCounter):\n        Image(refCounter)\n    {}\n\n    void ImageSlicesEditorWidget::PreviewImage::Draw()\n    {\n        mIsClipped = false;\n        if (auto texture = mImage.Lock()->GetTexture())\n        {\n            auto prevFilter = texture->GetFilter();\n            texture->SetFilter(Texture::Filter::Nearest);\n\n            Image::Draw();\n\n            texture->SetFilter(prevFilter);\n        }\n    }\n\n    String ImageSlicesEditorWidget::PreviewImage::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ImageSlicesEditorWidget::PreviewImage>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ImageSlicesEditorWidget>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ImageSlicesEditorWidget, Editor__ImageSlicesEditorWidget);\n\nDECLARE_CLASS(Editor::ImageSlicesEditorWidget::PreviewImage, Editor__ImageSlicesEditorWidget__PreviewImage);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/ImageSlicesEditorWidget.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(WidgetDragHandle);\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(BorderIProperty);\n\n    // -----------------------------\n    // Editor of image slices widget\n    // -----------------------------\n    class ImageSlicesEditorWidget : public Widget\n    {\n    public:\n        // Default constructor\n        ImageSlicesEditorWidget(RefCounter* refCounter);\n\n        // Default copy-constructor\n        ImageSlicesEditorWidget(RefCounter* refCounter, const ImageSlicesEditorWidget& other);\n\n        // Copy operator\n        ImageSlicesEditorWidget& operator=(const ImageSlicesEditorWidget& other);\n\n        // Sets image and property\n        void Setup(const AssetRef<ImageAsset>& image, const Ref<BorderIProperty>& borderProperty);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(ImageSlicesEditorWidget);\n        CLONEABLE_REF(ImageSlicesEditorWidget);\n\n    public:\n        // --------------------\n        // Image preview widget\n        // --------------------\n        class PreviewImage : public Image\n        {\n        public:\n            // Default constructor\n            PreviewImage(RefCounter* refCounter);\n\n            // Sets texture filter to nearest and draws it\n            void Draw() override;\n\n            // Returns create menu category in editor\n            static String GetCreateMenuCategory();\n\n            SERIALIZABLE(PreviewImage);\n            CLONEABLE_REF(PreviewImage);\n        };\n\n    private:\n        Ref<PreviewImage> mPreviewImage;     // Image preview widget\n        Ref<Image>        mPreviewImageBack; // Image preview background with chessmate pattern\n\n        Ref<WidgetDragHandle> mBorderLeftHandle;   // Left border handle\n        Ref<WidgetDragHandle> mBorderRightHandle;  // Right border handle\n        Ref<WidgetDragHandle> mBorderTopHandle;    // Top border handle\n        Ref<WidgetDragHandle> mBorderBottomHandle; // Bottom border handle\n\n        BorderF mBordersSmoothValue; // Smoothed borders values\n\n        Ref<BorderIProperty> mBorderProperty; // Image borders property\n\n    protected:\n        // Initializes image preview widgets and border handles\n        void InitializeImagePreview();\n\n        // Initializes image slices handles\n        void InitializeSliceHandles();\n\n        // Fits image by size\n        void FitImage();\n\n        // Updates borders anchors layouts\n        void UpdateBordersAnchors();\n\n        // Updates targets assets borders values by floored mBordersSmoothValue\n        void UpdateBordersValue();\n\n        // Creates grid sprite\n        Ref<Sprite> CreateGridSprite();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ImageSlicesEditorWidget)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ImageSlicesEditorWidget)\n{\n    FIELD().PRIVATE().NAME(mPreviewImage);\n    FIELD().PRIVATE().NAME(mPreviewImageBack);\n    FIELD().PRIVATE().NAME(mBorderLeftHandle);\n    FIELD().PRIVATE().NAME(mBorderRightHandle);\n    FIELD().PRIVATE().NAME(mBorderTopHandle);\n    FIELD().PRIVATE().NAME(mBorderBottomHandle);\n    FIELD().PRIVATE().NAME(mBordersSmoothValue);\n    FIELD().PRIVATE().NAME(mBorderProperty);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ImageSlicesEditorWidget)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ImageSlicesEditorWidget&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Setup, const AssetRef<ImageAsset>&, const Ref<BorderIProperty>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeImagePreview);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeSliceHandles);\n    FUNCTION().PROTECTED().SIGNATURE(void, FitImage);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateBordersAnchors);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateBordersValue);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Sprite>, CreateGridSprite);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::ImageSlicesEditorWidget::PreviewImage)\n{\n    BASE_CLASS(o2::Image);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ImageSlicesEditorWidget::PreviewImage)\n{\n}\nEND_META;\nCLASS_METHODS_META(Editor::ImageSlicesEditorWidget::PreviewImage)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/ScrollView.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ScrollView.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n\nnamespace Editor\n{\n    ScrollView::ScrollView(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        mRenderTarget = TextureRef(Vec2I(256, 256), TextureFormat::R8G8B8A8, Texture::Usage::RenderTarget);\n        mRenderTargetSprite = mmake<Sprite>(mRenderTarget, RectI(0, 0, 256, 256));\n\n        mBackColor = Color4(225, 232, 232, 255);\n        mGridColor = Color4(190, 190, 190, 255);\n\n        mReady = true;\n    }\n\n    ScrollView::ScrollView(RefCounter* refCounter, const ScrollView& other):\n        Widget(refCounter, other), mBackColor(other.mBackColor), mGridColor(other.mGridColor)\n    {\n        mRenderTarget = TextureRef(Vec2I(256, 256), TextureFormat::R8G8B8A8, Texture::Usage::RenderTarget);\n        mRenderTargetSprite = mmake<Sprite>(mRenderTarget, RectI(0, 0, 256, 256));\n\n        RetargetStatesAnimations();\n\n        mReady = true;\n    }\n\n    ScrollView::~ScrollView()\n    {}\n\n    ScrollView& ScrollView::operator=(const ScrollView& other)\n    {\n        Widget::operator=(other);\n\n        mReady = false;\n\n        mBackColor = other.mBackColor;\n        mGridColor = other.mGridColor;\n        mRenderTarget = TextureRef(Vec2I(256, 256), TextureFormat::R8G8B8A8, Texture::Usage::RenderTarget);\n        mRenderTargetSprite = mmake<Sprite>(mRenderTarget, RectI(0, 0, 256, 256));\n\n        RetargetStatesAnimations();\n\n        mReady = true;\n\n        return *this;\n    }\n\n    void ScrollView::DrawLayers()\n    {\n        Widget::DrawLayers();\n\n        if (!mReady)\n            return;\n\n        RedrawRenderTarget();\n\n        mRenderTargetSprite->transparency = mResTransparency;\n        mRenderTargetSprite->Draw();\n\t\tmListenersLayer->OnDrawn(mRenderTargetSprite->GetBasis());\n    }\n\n    void ScrollView::Update(float dt)\n    {\n        Widget::Update(dt);\n\n        if (!mReady)\n            return;\n\n        UpdateCamera(dt);\n    }\n\n    void ScrollView::SetBackColor(const Color4& color)\n    {\n        mBackColor = color;\n    }\n\n    void ScrollView::SetGridColor(const Color4& color)\n    {\n        mGridColor = color;\n    }\n\n    void ScrollView::UpdateSelfTransform()\n{\n        Widget::UpdateSelfTransform();\n    }\n\n    bool ScrollView::IsUnderPoint(const Vec2F& point)\n    {\n        return true;\n    }\n\n    bool ScrollView::IsScrollable() const\n    {\n        return true;\n    }\n\n    bool ScrollView::IsFocusable() const\n    {\n        return true;\n    }\n\n    String ScrollView::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void ScrollView::OnTransformUpdated()\n    {\n        Widget::OnTransformUpdated();\n\n        if (!mReady)\n            return;\n\n        Vec2I size = layout->size.Get();\n        size.x = Math::Max(size.x, 32);\n        size.y = Math::Max(size.y, 32);\n\n        mRenderTarget = TextureRef(size, TextureFormat::R8G8B8A8, Texture::Usage::RenderTarget);\n        *mRenderTargetSprite = Sprite(mRenderTarget, RectI(Vec2I(), size));\n        mRenderTargetSprite->SetRect(layout->worldRect);\n        mNeedRedraw = true;\n\n        mViewCamera.size = size;\n    }\n\n    void ScrollView::UpdateTransparency()\n    {\n        Widget::UpdateTransparency();\n        mRenderTargetSprite->SetTransparency(mResTransparency);\n    }\n\n\tvoid ScrollView::UpdateCamera(float dt)\n    {\n        bool transformed = false;\n\n        if (mViewCameraTargetScale.x < mViewCameraMinScale)\n        {\n            mViewCameraTargetScale.x = Math::Lerpc<float>(mViewCameraTargetScale.x, mViewCameraMinScale,\n                                                          dt*mViewCameraScaleElasticyCoef);\n        }\n        if (mViewCameraTargetScale.y < mViewCameraMinScale)\n        {\n            mViewCameraTargetScale.y = Math::Lerpc<float>(mViewCameraTargetScale.y, mViewCameraMinScale,\n                                                          dt*mViewCameraScaleElasticyCoef);\n        }\n\n        if (mViewCameraTargetScale.x > mViewCameraMaxScale)\n        {\n            mViewCameraTargetScale.x = Math::Lerpc<float>(mViewCameraTargetScale.x, mViewCameraMaxScale,\n                                                          dt*mViewCameraScaleElasticyCoef);\n        }\n\n        if (mViewCameraTargetScale.y > mViewCameraMaxScale)\n        {\n            mViewCameraTargetScale.y = Math::Lerpc<float>(mViewCameraTargetScale.y, mViewCameraMaxScale,\n                                                          dt*mViewCameraScaleElasticyCoef);\n        }\n\n        if (!Math::Equals<float>(mViewCamera.GetScale().x, mViewCameraTargetScale.x) ||\n            !Math::Equals<float>(mViewCamera.GetScale().y, mViewCameraTargetScale.y))\n        {\n            mViewCamera.scale = Math::Lerpc<Vec2F>(mViewCamera.scale, mViewCameraTargetScale,\n                                                   dt*mViewCameraScaleElasticyCoef);\n\n            transformed = true;\n        }\n\n        if (mViewCameraVelocity.Length() > 0.05f && !o2Input.IsRightMouseDown())\n        {\n            mViewCameraVelocity = Math::Lerpc<Vec2F>(mViewCameraVelocity, Vec2F(), dt*mViewCameraVelocityDampingCoef);\n            mViewCameraTargetPos += mViewCameraVelocity*dt;\n        }\n\n        if (mViewCamera.position != mViewCameraTargetPos)\n        {\n            mViewCamera.position = Math::Lerpc<Vec2F>(mViewCamera.position, mViewCameraTargetPos,\n                                                      dt*mViewCameraPosElasticyCoef);\n\n            transformed = true;\n        }\n\n        if (transformed)\n        {\n            UpdateLocalScreenTransforms();\n            OnCameraTransformChanged();\n            mNeedRedraw = true;\n        }\n    }\n\n    Basis ScrollView::GetCameraScreenToLocalTransform(const Camera& camera) const\n    {\n        RectF rectangle = layout->worldRect;\n        Basis identityCamTransform = Basis(rectangle);\n        Basis cameraTransform = camera.basis;\n\n        Basis sceneToCamTransform = identityCamTransform.Inverted()*cameraTransform;\n\n        return sceneToCamTransform;\n    }\n\n    void ScrollView::UpdateLocalScreenTransforms()\n    {\n        mScreenToLocalTransform = GetCameraScreenToLocalTransform(mViewCamera);\n        mLocalToScreenTransform = mScreenToLocalTransform.Inverted();\n    }\n\n    Vec2F ScrollView::ScreenToLocalPoint(const Vec2F& point)\n    {\n        return point*mScreenToLocalTransform;\n    }\n\n    Vec2F ScrollView::LocalToScreenPoint(const Vec2F& point)\n    {\n        return point*mLocalToScreenTransform;\n    }\n\n    const Basis& ScrollView::GetLocalToScreenTransform() const\n    {\n        return mLocalToScreenTransform;\n    }\n\n    const Basis& ScrollView::GetScreenToLocalTransform() const\n    {\n        return mScreenToLocalTransform;\n    }\n\n    Vec2F ScrollView::GetCameraScale() const\n    {\n        return Vec2F(mScreenToLocalTransform.xv.Length(), mScreenToLocalTransform.yv.Length());\n    }\n\n    void ScrollView::SetCamera(const Camera& camera)\n    {\n        mViewCamera = camera;\n        mViewCameraTargetPos = mViewCamera.position;\n        mViewCameraTargetScale = mViewCamera.scale;\n    }\n\n    const Camera& ScrollView::GetCamera() const\n    {\n        return mViewCamera;\n    }\n\n    void ScrollView::RedrawRenderTarget()\n    {\n        mNeedRedraw = false;\n        UpdateLocalScreenTransforms();\n        Camera prevCamera = o2Render.GetCamera();\n        o2Render.BindRenderTexture(mRenderTarget);\n\n        o2Render.Clear(mBackColor);\n        o2Render.SetCamera(mViewCamera);\n        \n\t\tmListenersLayer->OnBeginDraw();\n\t\tmListenersLayer->camera = o2Render.GetCamera();\n\n\t\tCursorAreaEventsListener::OnDrawn();\n\n        RedrawContent();\n        \n\t\tmListenersLayer->OnEndDraw();\n\n        o2Render.SetCamera(prevCamera);\n        o2Render.UnbindRenderTexture();\n    }\n\n    void ScrollView::RedrawContent()\n    {\n        DrawGrid();\n    }\n\n    void ScrollView::DrawGrid()\n\n    {\n        float cameraMaxSize = Math::Max(mViewCamera.GetSize().x*mViewCamera.GetScale().x,\n                                        mViewCamera.GetSize().y*mViewCamera.GetScale().y);\n\n        float x = cameraMaxSize / 4.0f;\n        float minCellSize = 0.000001f;\n        float maxCellSize = 1000000.0f;\n        float cellSize = minCellSize;\n        while (cellSize < maxCellSize)\n        {\n            float next = cellSize*10.0f;\n            if (x > cellSize && x <= next)\n                break;\n\n            cellSize = next;\n        }\n\n        Vec2F gridOrigin(Math::Round(mViewCamera.GetPosition().x / cellSize)*cellSize,\n                         Math::Round(mViewCamera.GetPosition().y / cellSize)*cellSize);\n\n        int cellsCount = Math::CeilToInt(cameraMaxSize / cellSize);\n        float tenCeilsSize = cellSize*10.0f;\n        Color4 cellColorSmoothed = Math::Lerp(mGridColor, mBackColor, 0.7f);\n\n        for (int i = -cellsCount / 2; i < cellsCount / 2; i++)\n        {\n            float d = (float)i*cellSize;\n            Vec2F dorigin = gridOrigin + Vec2F(d, d);\n\n            float rdx = Math::Abs(dorigin.x / tenCeilsSize - Math::Floor(dorigin.x / tenCeilsSize));\n            float rdy = Math::Abs(dorigin.y / tenCeilsSize - Math::Floor(dorigin.y / tenCeilsSize));\n            bool xTen = rdx < 0.05f || rdx > 0.95f;\n            bool yTen = rdy < 0.05f || rdy > 0.95f;\n\n            if (verGridEnabled)\n            {\n                o2Render.DrawLine(Vec2F(-cameraMaxSize, d) + gridOrigin,\n                                  Vec2F(cameraMaxSize, d) + gridOrigin,\n                                  yTen ? mGridColor : cellColorSmoothed);\n            }\n\n            if (horGridEnabled)\n            {\n                o2Render.DrawLine(Vec2F(d, -cameraMaxSize) + gridOrigin,\n                                  Vec2F(d, cameraMaxSize) + gridOrigin,\n                                  xTen ? mGridColor : cellColorSmoothed);\n            }\n        }\n        \n        if (o2Input.IsKeyDown(VK_F1))\n            o2Render.DrawCross(ScreenToLocalPoint(o2Input.GetCursorPos()), 200, Color4::Green());\n    }\n\n    void ScrollView::OnCameraTransformChanged()\n    {\n    }\n\n    void ScrollView::OnScrolled(float scroll)\n    {\n        ChangeCameraScaleRelativeToCursor(mViewCameraTargetScale*(1.0f - (scroll*mViewCameraScaleSence)));\n    }\n\n    void ScrollView::ChangeCameraScaleRelativeToCursor(const Vec2F& newScale)\n    {\n        Vec2F prevCursor = o2Input.GetCursorPos()*mScreenToLocalTransform;\n        mViewCameraTargetScale = newScale;\n\n        Camera targetValuesCamera = mViewCamera;\n        targetValuesCamera.scale = mViewCameraTargetScale;\n        targetValuesCamera.position = mViewCameraTargetPos;\n\n        Basis screenToLocalTarget = GetCameraScreenToLocalTransform(targetValuesCamera);\n\n        Vec2F newCursor = o2Input.GetCursorPos()*screenToLocalTarget;\n        mViewCameraTargetPos -= newCursor - prevCursor;\n    }\n\n    void ScrollView::OnCursorRightMousePressed(const Input::Cursor& cursor)\n    {\n        o2Application.SetCursorInfiniteMode(true);\n        mViewCameraMoved = false;\n    }\n\n    void ScrollView::OnCursorRightMouseStayDown(const Input::Cursor& cursor)\n    {\n        if (cursor.delta.Length() > Math::Epsilon)\n        {\n            Vec2F delta = cursor.delta*-1.0f;\n            mViewCameraVelocity = delta / o2Time.GetDeltaTime();\n            mViewCameraTargetPos += delta;\n            mNeedRedraw = true;\n\t\t\tmViewCameraMoved = true;\n        }\n    }\n\n    void ScrollView::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        o2Application.SetCursorInfiniteMode(false);\n    }\n\n    bool ScrollView::IsInputTransparent() const\n    {\n        return true;\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ScrollView>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ScrollView, Editor__ScrollView);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/ScrollView.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Render/Camera.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Scene/UI/Widget.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Sprite;\n}\n\nnamespace Editor\n{\n    // ----------------------------\n    // Scrollable and zoomable view\n    // ----------------------------\n    class ScrollView: public Widget, virtual public CursorAreaEventsListener\n    {\n    public:\n        bool horGridEnabled = true; // Is horizontal lines of grid are enabled\n        bool verGridEnabled = true; // Is vertical lines of grid are enabled\n\n    public:\n        // Default constructor\n        ScrollView(RefCounter* refCounter);\n\n        // Copy-constructor\n        ScrollView(RefCounter* refCounter, const ScrollView& other);\n\n        // Destructor\n        ~ScrollView();\n\n        // Copy-operator\n        ScrollView& operator=(const ScrollView& other);\n\n        // Draws widget layers, updates render target \n        void DrawLayers() override;\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Transforms point from screen space to local space\n        Vec2F ScreenToLocalPoint(const Vec2F& point);\n\n        // Transforms point from local space to screen space\n        Vec2F LocalToScreenPoint(const Vec2F& point);\n\n        // Returns local to screen transform\n        const Basis& GetLocalToScreenTransform() const;\n\n        // Returns screen to local transform\n        const Basis& GetScreenToLocalTransform() const;\n\n        // Returns camera scale\n        Vec2F GetCameraScale() const;\n\n        // Sets view camera\n        void SetCamera(const Camera& camera);\n\n        // Returns view camera\n        const Camera& GetCamera() const;\n\n        // Sets back color\n        void SetBackColor(const Color4& color);\n\n        // Sets grid color\n        void SetGridColor(const Color4& color);\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns is this widget can be focused\n        bool IsFocusable() const override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(ScrollView);\n        CLONEABLE_REF(ScrollView);\n\n    protected:\n        bool mReady = false; // Whether the widget is initialized and ready to use\n\n\t\tRef<CursorAreaEventListenersLayer> mListenersLayer = mmake<CursorAreaEventListenersLayer>(); // Listeners layer, used to handle cursor events\n                                                              \n        Ref<Sprite> mRenderTargetSprite; // Render target sprite used for caching graphics\n        TextureRef  mRenderTarget;       // Render target texture used for caching graphics\n        bool        mNeedRedraw = false; // Whether the render target needs to be redrawn\n                                                              \n        Color4 mBackColor; // Background color @SERIALIZABLE\n        Color4 mGridColor; // Grid line color @SERIALIZABLE\n\n        RectF  mViewArea;                              // View area bounds\n        Camera mViewCamera;                            // Scene view camera\n        Vec2F  mViewCameraTargetScale = Vec2F(1, 1);   // Target scale for camera\n        float  mViewCameraScaleSence = 0.1f / 120.0f;  // Camera scale sensitivity\n        float  mViewCameraScaleElasticyCoef = 30.0f;   // Scale smoothing coefficient\n        Vec2F  mViewCameraTargetPos;                   // Target camera position\n        Vec2F  mViewCameraVelocity;                    // Camera movement velocity\n        float  mViewCameraPosElasticyCoef = 30.0f;     // Camera position smoothing coefficient\n        float  mViewCameraVelocityDampingCoef = 10.0f; // Camera velocity damping coefficient\n        float  mViewCameraMinScale = 0.0001f;          // Minimum camera scale\n        float  mViewCameraMaxScale = 100000.0f;        // Maximum camera scale\n\t\tbool   mViewCameraMoved = false;               // Whether the camera was moved       \n                   \n        Basis mLocalToScreenTransform; // Transform from local to screen coordinates\n        Basis mScreenToLocalTransform; // Transform from screen to local coordinates\n\n    protected:\n        // Called when transformation was changed and updated, updates render texture and sprite\n        void OnTransformUpdated() override;\n\n        // Updates transparency for this and children widgets\n\t\tvoid UpdateTransparency() override;\n\n        // Updates camera\n        void UpdateCamera(float dt);\n\n        // Returns transformation basis from screen to local for camera\n        Basis GetCameraScreenToLocalTransform(const Camera& camera) const;\n\n        // Updates scene to screen and screen and scene transformations\n        void UpdateLocalScreenTransforms();\n\n        // Redraws content into render target\n        void RedrawRenderTarget();\n\n        // Redraws content into render target\n        virtual void RedrawContent();\n\n        // Draws grid\n        virtual void DrawGrid();\n\n        // Called when camera position was changed\n        virtual void OnCameraTransformChanged();\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        // Updates camera's scale and position\n        void ChangeCameraScaleRelativeToCursor(const Vec2F& newScale);\n\n        // Called when right mouse button was pressed on this\n        void OnCursorRightMousePressed(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button stay down on this\n        void OnCursorRightMouseStayDown(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Returns that this scroll area has transparent input\n        bool IsInputTransparent() const override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ScrollView)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::CursorAreaEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ScrollView)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(true).NAME(horGridEnabled);\n    FIELD().PUBLIC().DEFAULT_VALUE(true).NAME(verGridEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mReady);\n    FIELD().PROTECTED().DEFAULT_VALUE(mmake<CursorAreaEventListenersLayer>()).NAME(mListenersLayer);\n    FIELD().PROTECTED().NAME(mRenderTargetSprite);\n    FIELD().PROTECTED().NAME(mRenderTarget);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNeedRedraw);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mBackColor);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mGridColor);\n    FIELD().PROTECTED().NAME(mViewArea);\n    FIELD().PROTECTED().NAME(mViewCamera);\n    FIELD().PROTECTED().DEFAULT_VALUE(Vec2F(1, 1)).NAME(mViewCameraTargetScale);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.1f / 120.0f).NAME(mViewCameraScaleSence);\n    FIELD().PROTECTED().DEFAULT_VALUE(30.0f).NAME(mViewCameraScaleElasticyCoef);\n    FIELD().PROTECTED().NAME(mViewCameraTargetPos);\n    FIELD().PROTECTED().NAME(mViewCameraVelocity);\n    FIELD().PROTECTED().DEFAULT_VALUE(30.0f).NAME(mViewCameraPosElasticyCoef);\n    FIELD().PROTECTED().DEFAULT_VALUE(10.0f).NAME(mViewCameraVelocityDampingCoef);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0001f).NAME(mViewCameraMinScale);\n    FIELD().PROTECTED().DEFAULT_VALUE(100000.0f).NAME(mViewCameraMaxScale);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mViewCameraMoved);\n    FIELD().PROTECTED().NAME(mLocalToScreenTransform);\n    FIELD().PROTECTED().NAME(mScreenToLocalTransform);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ScrollView)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ScrollView&);\n    FUNCTION().PUBLIC().SIGNATURE(void, DrawLayers);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, ScreenToLocalPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, LocalToScreenPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(const Basis&, GetLocalToScreenTransform);\n    FUNCTION().PUBLIC().SIGNATURE(const Basis&, GetScreenToLocalTransform);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetCameraScale);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCamera, const Camera&);\n    FUNCTION().PUBLIC().SIGNATURE(const Camera&, GetCamera);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBackColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetGridColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFocusable);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTransparency);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateCamera, float);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, GetCameraScreenToLocalTransform, const Camera&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLocalScreenTransforms);\n    FUNCTION().PROTECTED().SIGNATURE(void, RedrawRenderTarget);\n    FUNCTION().PROTECTED().SIGNATURE(void, RedrawContent);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawGrid);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCameraTransformChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, ChangeCameraScaleRelativeToCursor, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMousePressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseStayDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsInputTransparent);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/SplineEditor/SplineEditor.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SplineEditor.h\"\n\nnamespace Editor\n{\n    SplineEditor::SplineEditor()\n    {\n        mSelectionSprite = mmake<Sprite>(\"ui/UI_Window_place.png\");\n\n        mHandlesSample.position = mmake<DragHandle>(mmake<Sprite>(\"ui/CurveHandle.png\"),\n                                                    mmake<Sprite>(\"ui/CurveHandleHover.png\"),\n                                                    mmake<Sprite>(\"ui/CurveHandlePressed.png\"),\n                                                    mmake<Sprite>(\"ui/CurveHandleSelected.png\"));\n\n        mHandlesSample.prevSupport = mmake<DragHandle>(mmake<Sprite>(\"ui/CurveSupportHandle.png\"),\n                                                       mmake<Sprite>(\"ui/CurveSupportHandleHover.png\"),\n                                                       mmake<Sprite>(\"ui/CurveSupportHandlePressed.png\"),\n                                                       mmake<Sprite>(\"ui/CurveSupportHandleSelected.png\"));\n\n        mHandlesSample.nextSupport = mmake<DragHandle>(mmake<Sprite>(\"ui/CurveSupportHandle.png\"),\n                                                       mmake<Sprite>(\"ui/CurveSupportHandleHover.png\"),\n                                                       mmake<Sprite>(\"ui/CurveSupportHandlePressed.png\"),\n                                                       mmake<Sprite>(\"ui/CurveSupportHandleSelected.png\"));\n\n        mHandlesSample.leftRangeHandle = mmake<DragHandle>(mmake<Sprite>(\"ui/UI2_handle_side_regular.png\"),\n                                                           mmake<Sprite>(\"ui/UI2_handle_side_select.png\"),\n                                                           mmake<Sprite>(\"ui/UI2_handle_side_pressed.png\"),\n                                                           mmake<Sprite>(\"ui/UI2_handle_side_select.png\"));\n\n        mHandlesSample.rightRangeHandle = mmake<DragHandle>(mmake<Sprite>(\"ui/UI2_handle_side_regular.png\"),\n                                                            mmake<Sprite>(\"ui/UI2_handle_side_select.png\"),\n                                                            mmake<Sprite>(\"ui/UI2_handle_side_pressed.png\"),\n                                                            mmake<Sprite>(\"ui/UI2_handle_side_select.png\"));\n\n        mSplineColor = Color4(44, 62, 80, 255);\n        mSplineSupportColor = Color4(190, 190, 190, 255);\n\n        typedef SplineEditor thisclass;\n\n        mTransformFrame = mmake<FrameHandles>();\n        mTransformFrame->SetPivotEnabled(false);\n        mTransformFrame->SetRotationEnabled(false);\n        mTransformFrame->onTransformed = THIS_FUNC(OnTransformFrameTransformed);\n        mTransformFrame->onPressed = THIS_FUNC(OnTransformBegin);\n        mTransformFrame->onChangeCompleted = THIS_FUNC(OnTransformCompleted);\n        mTransformFrame->isInputTransparent = true;\n\n        mCurvesMesh = mmake<Mesh>();\n        mCurvesMesh->Resize(4, 2);\n        mCurvesMesh->vertexCount = 4;\n        mCurvesMesh->polyCount = 2;\n        VertexIndex* idx = mCurvesMesh->GetIndexes();\n        idx[0] = 0; idx[1] = 1; idx[2] = 2;\n        idx[3] = 2; idx[4] = 1; idx[5] = 3;\n    }\n\n    SplineEditor::~SplineEditor()\n    {\n        auto splineHandles = mSplineHandles;\n        mSplineHandles.Clear();\n\n        mSplineHandles.Clear();\n    }\n\n    void SplineEditor::Draw()\n    {\n        if (!mSplineWrapper)\n            return;\n\n        OnDrawn();\n\n        auto leftRange = mSplineWrapper->GetDrawPointsLeftRange();\n        auto rightRange = mSplineWrapper->GetDrawPointsRightRange();\n\n        Color4 meshColor = mSplineColor;\n        meshColor.a /= 2;\n\n        Vertex* verts = mCurvesMesh->GetVertices<Vertex>();\n        for (int i = 1; i < leftRange.Count(); i++)\n        {\n            verts[0] = Vertex(leftRange[i - 1], meshColor.ABGR(), 0, 0);\n            verts[1] = Vertex(leftRange[i], meshColor.ABGR(), 0, 0);\n            verts[2] = Vertex(rightRange[i - 1], meshColor.ABGR(), 0, 0);\n            verts[3] = Vertex(rightRange[i], meshColor.ABGR(), 0, 0);\n\n            mCurvesMesh->Draw();\n        }\n\n        o2Render.DrawAALine(leftRange, mSplineColor);\n        o2Render.DrawAALine(rightRange, mSplineColor);\n\n        DrawTransformFrame();\n        DrawHandles();\n        DrawSelection();\n    }\n\n    void SplineEditor::DrawHandles()\n    {\n        for (auto& handles : mSplineHandles)\n        {\n            if (handles->IsSupportsVisible())\n            {\n                handles->prevSupport->UpdateScreenPosition();\n                handles->nextSupport->UpdateScreenPosition();\n\n                bool broken = (o2Input.IsKeyDown(VK_MENU) || handles->startDragFromZero) && o2Input.IsCursorDown();\n\n                if (!handles->isFirst || mSplineWrapper->IsClosed())\n                {\n                    o2Render.DrawAALine(handles->position->GetScreenPosition(), handles->prevSupport->GetScreenPosition(),\n                                        mSplineSupportColor, 1.0f, broken ? LineType::Dash : LineType::Solid);\n                }\n\n                if (!handles->isLast || mSplineWrapper->IsClosed())\n                {\n                    o2Render.DrawAALine(handles->position->GetScreenPosition(), handles->nextSupport->GetScreenPosition(),\n                                        mSplineSupportColor, 1.0f, broken ? LineType::Dash : LineType::Solid);\n                }\n            }\n        }\n\n        if (o2Input.IsKeyDown(VK_MENU))\n        {\n            DrawMainHandles();\n            DrawSupportHandles();\n        }\n        else\n        {\n            DrawSupportHandles();\n            DrawMainHandles();\n        }\n    }\n\n    void SplineEditor::DrawSelection()\n    {\n        if (mIsPressed)\n        {\n            mSelectionSprite->rect = RectF(mSplineWrapper->LocalToWorld(mSelectingPressedPoint), o2Input.cursorPos);\n            mSelectionSprite->Draw();\n        }\n    }\n\n    void SplineEditor::DrawTransformFrame()\n    {\n        if (!mTransformFrameVisible)\n            return;\n\n        Vec2F worldOrig = mSplineWrapper->LocalToWorld(mTransformFrameBasis.origin);\n        Vec2F worldXV = mSplineWrapper->LocalToWorld(mTransformFrameBasis.xv + mTransformFrameBasis.origin) - worldOrig;\n        Vec2F worldYV = mSplineWrapper->LocalToWorld(mTransformFrameBasis.yv + mTransformFrameBasis.origin) - worldOrig;\n        mTransformFrame->SetBasis(Basis(worldOrig - mTransformBasisOffet,\n                                        worldXV + Vec2F(mTransformBasisOffet.x*2.0f, 0),\n                                        worldYV + Vec2F(0, mTransformBasisOffet.y*2.0f)));\n\n        mTransformFrame->Draw();\n    }\n\n    void SplineEditor::DrawMainHandles()\n    {\n        int idx = 0;\n        for (auto& handles : mSplineHandles)\n        {\n            handles->position->Draw();\n\n            bool rangeHandlesVisible = !Math::Equals(mSplineWrapper->GetPointRangeValue(idx), 0.0f);\n\n            if (rangeHandlesVisible)\n            {\n                Vec2F normal = GetRangeHandlesNormal(mSplineHandles.IndexOf(handles), handles);\n                float angle = -normal.Angle(Vec2F(1, 0));\n\n                handles->leftRangeHandle->angle = angle + Math::PI();\n                handles->rightRangeHandle->angle = angle;\n\n                handles->leftRangeHandle->Draw();\n                handles->rightRangeHandle->Draw();\n            }\n\n            idx++;\n        }\n    }\n\n    void SplineEditor::DrawSupportHandles()\n    {\n        for (auto& handles : mSplineHandles)\n        {\n            if (handles->IsSupportsVisible())\n            {\n                if (!handles->isFirst || mSplineWrapper->IsClosed())\n                    handles->prevSupport->Draw();\n\n                if (!handles->isLast || mSplineWrapper->IsClosed())\n                    handles->nextSupport->Draw();\n            }\n        }\n    }\n\n    void SplineEditor::Update(float dt)\n    {\n    }\n\n    void SplineEditor::SetSpline(const Ref<ISplineWrapper>& wrapper)\n    {\n        ClearHandles();\n\n        mSplineWrapper = wrapper;\n        if (!mSplineWrapper)\n            return;\n\n        mSubscription = MakeSubscription(mSplineWrapper->onChangedOutside, Function<void()>([=]() { OnSplineChanged(); }));\n\n        InitializeHandles();\n    }\n\n    void SplineEditor::Reset()\n    {\n        SetSpline(nullptr);\n        onChanged.Clear();\n    }\n\n    bool SplineEditor::IsUnderPoint(const Vec2F& point)\n    {\n        return true;\n    }\n\n    bool SplineEditor::IsInputTransparent() const\n    {\n        return true;\n    }\n\n    void SplineEditor::ClearHandles()\n    {\n        mSplineHandles.Clear();\n    }\n\n    void SplineEditor::OnSplineChanged()\n    {\n        bool keysCountChanged = mSplineWrapper->GetPointsCount() != mSplineHandles.Count();\n        if (keysCountChanged)\n        {\n            ClearHandles();\n            InitializeHandles();\n        }\n    }\n\n    void SplineEditor::InitializeHandles()\n    {\n        if (!mSplineWrapper)\n            return;\n\n        for (int i = 0; i < mSplineWrapper->GetPointsCount(); i++)\n        {\n            auto handles = mmake<PointHandles>();\n\n            handles->isFirst = i == 0;\n            handles->isLast = i == mSplineWrapper->GetPointsCount() - 1;\n\n            handles->position = mHandlesSample.position->CloneAsRef<DragHandle>();\n            handles->position->SetPosition(mSplineWrapper->GetPointPos(i));\n            handles->position->SetSelectionGroup(Ref(this));\n            handles->position->onPressed = [=]() { OnMainHandlePressed(i, handles); };\n            handles->position->onBeganDragging = [=]() { handles->positionDragged = true; };\n            handles->position->onReleased = [=]() { if (!handles->positionDragged) OnMainHandleReleasedNoDrag(i, handles); };\n            handles->position->onChangedPos = [=](const Vec2F& pos) { OnMainHandleMoved(i, pos, handles); };\n            handles->position->localToScreenTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->LocalToWorld(p); };\n            handles->position->screenToLocalTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->WorldToLocal(p); };\n\n            handles->prevSupport = mHandlesSample.prevSupport->CloneAsRef<DragHandle>();\n            handles->prevSupport->SetPosition(mSplineWrapper->GetPointPrevSupportPos(i));\n            handles->prevSupport->SetSelectionGroup(mSupportHandlesGroup);\n            handles->prevSupport->onChangedPos = [=](const Vec2F& pos) { OnPrevHandleMoved(i, pos, handles); };\n            handles->prevSupport->onPressed = [=]() { handles->prevSupportDragged = false; CheckDragFromZero(i, handles); };\n            handles->prevSupport->onBeganDragging = [=]() { handles->prevSupportDragged = true; };\n            handles->prevSupport->onReleased = [=]() { if (!handles->prevSupportDragged) OnPrevHandleReleasedNoDrag(i, handles); };\n            handles->prevSupport->localToScreenTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->LocalToWorld(p); };\n            handles->prevSupport->screenToLocalTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->WorldToLocal(p); };\n\n            handles->nextSupport = mHandlesSample.nextSupport->CloneAsRef<DragHandle>();\n            handles->nextSupport->SetPosition(mSplineWrapper->GetPointNextSupportPos(i));\n            handles->nextSupport->SetSelectionGroup(mSupportHandlesGroup);\n            handles->nextSupport->onChangedPos = [=](const Vec2F& pos) { OnNextHandleMoved(i, pos, handles); };\n            handles->nextSupport->onPressed = [=]() { handles->nextSupportDragged = false; CheckDragFromZero(i, handles); };\n            handles->nextSupport->onBeganDragging = [=]() { handles->nextSupportDragged = true; };\n            handles->nextSupport->onReleased = [=]() { if (!handles->nextSupportDragged) OnNextHandleReleasedNoDrag(i, handles); };\n            handles->nextSupport->localToScreenTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->LocalToWorld(p); };\n            handles->nextSupport->screenToLocalTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->WorldToLocal(p); };\n\n            handles->leftRangeHandle = mHandlesSample.leftRangeHandle->CloneAsRef<DragHandle>();\n            handles->leftRangeHandle->SetPosition(GetRangeHandlePos(i, handles, true));\n            handles->leftRangeHandle->onChangedPos = [=](const Vec2F& pos) { OnRangeValueChanged(i, handles, true); };\n            handles->leftRangeHandle->checkPositionFunc = [=](const Vec2F& pos) { return CheckRangeHandlePos(i, handles, pos); };\n            handles->leftRangeHandle->localToScreenTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->LocalToWorld(p); };\n            handles->leftRangeHandle->screenToLocalTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->WorldToLocal(p); };\n\n            handles->rightRangeHandle = mHandlesSample.rightRangeHandle->CloneAsRef<DragHandle>();\n            handles->rightRangeHandle->SetPosition(GetRangeHandlePos(i, handles, false));\n            handles->rightRangeHandle->onChangedPos = [=](const Vec2F& pos) { OnRangeValueChanged(i, handles, false); };\n            handles->rightRangeHandle->checkPositionFunc = [=](const Vec2F& pos) { return CheckRangeHandlePos(i, handles, pos); };\n            handles->rightRangeHandle->localToScreenTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->LocalToWorld(p); };\n            handles->rightRangeHandle->screenToLocalTransformFunc = [&](const Vec2F& p) { return mSplineWrapper->WorldToLocal(p); };\n\n            mSplineHandles.Add(handles);\n        }\n    }\n\n    void SplineEditor::UpdateHandles()\n    {\n        if (!mSplineWrapper)\n            return;\n\n        for (int i = 0; i < mSplineWrapper->GetPointsCount(); i++)\n        {\n            mSplineHandles[i]->position->SetPosition(mSplineWrapper->GetPointPos(i));\n\n            mSplineHandles[i]->prevSupport->SetPosition(mSplineWrapper->GetPointPrevSupportPos(i));\n            mSplineHandles[i]->nextSupport->SetPosition(mSplineWrapper->GetPointNextSupportPos(i));\n\n            mSplineHandles[i]->leftRangeHandle->SetPosition(GetRangeHandlePos(i, mSplineHandles[i], true));\n            mSplineHandles[i]->rightRangeHandle->SetPosition(GetRangeHandlePos(i, mSplineHandles[i], false));\n        }\n    }\n\n    void SplineEditor::OnPrevHandleMoved(int i, const Vec2F& pos, const Ref<PointHandles>& handles)\n    {\n        Vec2F prev = mSplineWrapper->GetPointPrevSupportPos(i);\n        Vec2F curr = mSplineWrapper->GetPointPos(i);\n        Vec2F next = mSplineWrapper->GetPointNextSupportPos(i);\n\n        if (!o2Input.IsKeyDown(VK_MENU) || handles->startDragFromZero)\n        {\n            float distanceDiff = (pos - curr).Length() - (prev - curr).Length();\n            float nextDistance = (next - curr).Length();\n            Vec2F symmetricNextPos = (curr - pos).Normalized()*(nextDistance + distanceDiff) + curr;\n            mSplineWrapper->SetPointNextSupportPos(i, symmetricNextPos);\n\n            handles->nextSupport->SetPosition(mSplineWrapper->GetPointNextSupportPos(i));\n        }\n\n        mSplineWrapper->SetPointPrevSupportPos(i, pos);\n        mSplineWrapper->OnChanged();\n        onChanged();\n    }\n\n    void SplineEditor::OnNextHandleMoved(int i, const Vec2F& pos, const Ref<PointHandles>& handles)\n    {\n        Vec2F prev = mSplineWrapper->GetPointPrevSupportPos(i);\n        Vec2F curr = mSplineWrapper->GetPointPos(i);\n        Vec2F next = mSplineWrapper->GetPointNextSupportPos(i);\n\n        if (!o2Input.IsKeyDown(VK_MENU) || handles->startDragFromZero)\n        {\n            float distanceDiff = (pos - curr).Length() - (next - curr).Length();\n            float prevDistance = (prev - curr).Length();\n            Vec2F symmetricPrevPos = (curr - pos).Normalized()*(prevDistance + distanceDiff) + curr;\n            mSplineWrapper->SetPointPrevSupportPos(i, symmetricPrevPos);\n\n            handles->prevSupport->SetPosition(mSplineWrapper->GetPointPrevSupportPos(i));\n        }\n\n        mSplineWrapper->SetPointNextSupportPos(i, pos);\n        mSplineWrapper->OnChanged();\n        onChanged();\n    }\n\n    void SplineEditor::OnMainHandleMoved(int i, const Vec2F& pos, const Ref<PointHandles>& handles)\n    {\n        mSplineWrapper->SetPointPos(i, pos);\n\n        handles->prevSupport->SetPosition(mSplineWrapper->GetPointPrevSupportPos(i));\n        handles->nextSupport->SetPosition(mSplineWrapper->GetPointNextSupportPos(i));\n\n        handles->leftRangeHandle->SetPosition(GetRangeHandlePos(i, handles, true));\n        handles->rightRangeHandle->SetPosition(GetRangeHandlePos(i, handles, false));\n\n        if (i > 0)\n        {\n            mSplineHandles[i - 1]->leftRangeHandle->SetPosition(GetRangeHandlePos(i - 1, mSplineHandles[i - 1], true));\n            mSplineHandles[i - 1]->rightRangeHandle->SetPosition(GetRangeHandlePos(i - 1, mSplineHandles[i - 1], false));\n        }\n\n        if (i < mSplineHandles.Count() - 1)\n        {\n            mSplineHandles[i + 1]->leftRangeHandle->SetPosition(GetRangeHandlePos(i + 1, mSplineHandles[i + 1], true));\n            mSplineHandles[i + 1]->rightRangeHandle->SetPosition(GetRangeHandlePos(i + 1, mSplineHandles[i + 1], false));\n        }\n\n        UpdateTransformFrame();\n        mSplineWrapper->OnChanged();\n        onChanged();\n    }\n\n    void SplineEditor::OnPrevHandleReleasedNoDrag(int i, const Ref<PointHandles>& handles)\n    {\n        if (o2Input.IsKeyDown(VK_MENU))\n        {\n            mSplineWrapper->SetPointPrevSupportPos(i, mSplineWrapper->GetPointPos(i));\n            handles->prevSupport->SetPosition(mSplineWrapper->GetPointPrevSupportPos(i));\n\n            UpdateTransformFrame();\n            mSplineWrapper->OnChanged();\n            onChanged();\n        }\n    }\n\n    void SplineEditor::OnNextHandleReleasedNoDrag(int i, const Ref<PointHandles>& handles)\n    {\n        if (o2Input.IsKeyDown(VK_MENU))\n        {\n            mSplineWrapper->SetPointNextSupportPos(i, mSplineWrapper->GetPointPos(i));\n            handles->nextSupport->SetPosition(mSplineWrapper->GetPointNextSupportPos(i));\n\n            UpdateTransformFrame();\n            mSplineWrapper->OnChanged();\n            onChanged();\n        }\n    }\n\n    void SplineEditor::OnMainHandlePressed(int i, const Ref<PointHandles>& handles)\n    {\n        handles->positionDragged = false;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float rangeValue = mSplineWrapper->GetPointRangeValue(i);\n\n            if (Math::Equals(rangeValue, 0.0f))\n                mSplineWrapper->SetPointRangeValue(i, 10.0f);\n            else\n                mSplineWrapper->SetPointRangeValue(i, 0.0f);\n\n            handles->leftRangeHandle->SetPosition(GetRangeHandlePos(i, handles, true));\n            handles->rightRangeHandle->SetPosition(GetRangeHandlePos(i, handles, false));\n        }\n    }\n\n    void SplineEditor::OnMainHandleReleasedNoDrag(int i, const Ref<PointHandles>& handles)\n    {\n        if (o2Input.IsKeyDown(VK_MENU))\n        {\n            mSplineWrapper->SetPointNextSupportPos(i, mSplineWrapper->GetPointPos(i));\n            mSplineWrapper->SetPointPrevSupportPos(i, mSplineWrapper->GetPointPos(i));\n\n            handles->nextSupport->SetPosition(mSplineWrapper->GetPointNextSupportPos(i));\n            handles->prevSupport->SetPosition(mSplineWrapper->GetPointPrevSupportPos(i));\n\n            UpdateTransformFrame();\n            mSplineWrapper->OnChanged();\n            onChanged();\n        }\n    }\n\n    void SplineEditor::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        const float createPointDistanceThreshold = 7.0f;\n\n        Vec2F localCursorPos = mSplineWrapper->WorldToLocal(cursor.position);\n        Vec2F newPointPosition = localCursorPos;\n        int newPointIdx = Math::Max(0, mSplineWrapper->GetPointsCount());\n\n        for (int i = 1; i < mSplineWrapper->GetPointsCount(); i++)\n        {\n            bool found = false;\n\n            const ApproximationVec2F* points = mSplineWrapper->GetPointApproximationLeft(i);\n            for (int j = 1; j < mSplineWrapper->GetPointApproximationCount(i); j++)\n            {\n                Vec2F a = mSplineWrapper->LocalToWorld(points[j - 1].value);\n                Vec2F b = mSplineWrapper->LocalToWorld(points[j].value);\n\n                Vec2F ab = b - a;\n                float abl = ab.Length();\n                Vec2F abn = ab/abl;\n                Vec2F abnp = abn.Perpendicular();\n                Vec2F ac = cursor.position - a;\n\n                float pointDistance = (b - cursor.position).Length();\n                float lineDistance = Math::Abs(abnp.Dot(ac));\n                float proj = abn.Dot(ac);\n\n                if (pointDistance < createPointDistanceThreshold ||\n                    (lineDistance < createPointDistanceThreshold && proj > 0.0f && proj < abl))\n                {\n                    newPointPosition = mSplineWrapper->WorldToLocal(abnp*(abnp.Dot(ac)) + cursor.position);\n                    newPointIdx = i;\n\n                    found = true;\n                    break;\n                }\n            }\n\n            if (found)\n                break;\n        }\n\n        mSplineWrapper->AddPoint(newPointIdx, newPointPosition, Vec2F(), Vec2F());\n        OnSplineChanged();\n        mSplineWrapper->OnChanged();\n        onChanged();\n    }\n\n    void SplineEditor::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        mSelectingPressedPoint = mSplineWrapper->WorldToLocal(cursor.position);\n\n        if (!o2Input.IsKeyDown(VK_CONTROL))\n        {\n            DeselectAll();\n            mSupportHandlesGroup->DeselectAll();\n        }\n    }\n\n    void SplineEditor::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        for (auto& handle : mSelectingHandlesBuf)\n        {\n            SetHandleSelectedState(handle, false);\n            handle->SetSelected(true);\n        }\n\n        mSelectingHandlesBuf.Clear();\n        UpdateTransformFrame();\n    }\n\n    void SplineEditor::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        for (auto& handle : mSelectingHandlesBuf)\n            SetHandleSelectedState(handle, false);\n\n        mSelectingHandlesBuf.Clear();\n\n        RectF selectionLocalRect(mSelectingPressedPoint, mSplineWrapper->WorldToLocal(cursor.position));\n\n        for (auto& handle : mHandles)\n        {\n            if (handle->IsEnabled() && selectionLocalRect.IsInside(handle->GetPosition()) &&\n                !mSelectedHandles.Contains(handle))\n            {\n                mSelectingHandlesBuf.Add(handle);\n                SetHandleSelectedState(handle, true);\n            }\n        }\n\n        for (auto& handle : mSupportHandlesGroup->GetAllHandles())\n        {\n            if (handle->IsEnabled() && selectionLocalRect.IsInside(handle->GetPosition()) &&\n                !mSupportHandlesGroup->GetSelectedHandles().Contains(handle))\n            {\n                mSelectingHandlesBuf.Add(handle);\n                SetHandleSelectedState(handle, true);\n            }\n        }\n    }\n\n    void SplineEditor::OnSelectionChanged()\n    {\n    }\n\n    void SplineEditor::OnKeyReleased(const Input::Key& key)\n    {\n        if (!mSplineWrapper)\n            return;\n\n        if (key.keyCode == VK_DELETE)\n        {\n            auto selectedHandles = mSelectedHandles;\n            for (auto& handle : selectedHandles)\n            {\n                int idx = mHandles.IndexOf(handle);\n                mSplineWrapper->RemovePoint(idx);\n            }\n\n            OnSplineChanged();\n            mSplineWrapper->OnChanged();\n            onChanged();\n        }\n    }\n\n    void SplineEditor::CheckDragFromZero(int i, const Ref<PointHandles>& handles)\n    {\n        float screenThreshold = 3.0f;\n        float threshold = mSplineWrapper->WorldToLocal(Vec2F(screenThreshold, screenThreshold)).x -\n            mSplineWrapper->WorldToLocal(Vec2F()).x;\n\n        Vec2F prev = mSplineWrapper->GetPointPrevSupportPos(i);\n        Vec2F next = mSplineWrapper->GetPointNextSupportPos(i);\n\n        handles->startDragFromZero = (next - prev).Length() < threshold;\n    }\n\n    void SplineEditor::OnRangeValueChanged(int i, const Ref<PointHandles>& handles, bool isLeft)\n    {\n        Vec2F normal = GetRangeHandlesNormal(i, handles);\n\n        o2Debug.DrawLine(mSplineWrapper->GetPointPos(i), mSplineWrapper->GetPointPos(i) + normal*100.0f);\n\n        if (isLeft)\n        {\n            Vec2F handlePos = handles->leftRangeHandle->GetPosition();\n            float value = (handlePos - mSplineWrapper->GetPointPos(i)).Dot(normal);\n            mSplineWrapper->SetPointRangeValue(i, -value);\n\n            handles->rightRangeHandle->SetPosition(GetRangeHandlePos(i, handles, false));\n        }\n        else\n        {\n            Vec2F handlePos = handles->rightRangeHandle->GetPosition();\n            float value = (handlePos - mSplineWrapper->GetPointPos(i)).Dot(normal);\n            mSplineWrapper->SetPointRangeValue(i, value);\n\n            handles->leftRangeHandle->SetPosition(GetRangeHandlePos(i, handles, true));\n        }\n    }\n\n    Vec2F SplineEditor::GetRangeHandlePos(int i, const Ref<PointHandles>& handles, bool isLeft) const\n    {\n        Vec2F normal = GetRangeHandlesNormal(i, handles);\n\n        if (isLeft)\n        {\n            float value = mSplineWrapper->GetPointRangeValue(i);\n            return mSplineWrapper->GetPointPos(i) - normal*value;\n        }\n        else\n        {\n            float value = mSplineWrapper->GetPointRangeValue(i);\n            return mSplineWrapper->GetPointPos(i) + normal*value;\n        }\n    }\n\n    Vec2F SplineEditor::GetRangeHandlesNormal(int i, const Ref<PointHandles>& handles) const\n    {\n        bool hasPrev = i > 0;\n        bool hasNext = i < mSplineWrapper->GetPointsCount() - 1;\n\n        Vec2F prev = hasPrev ? mSplineWrapper->GetPointPos(i - 1) : Vec2F();\n        Vec2F next = hasNext ? mSplineWrapper->GetPointPos(i + 1) : Vec2F();\n\n        return Spline::Key::GetRangeNormal(mSplineWrapper->GetPointPos(i),\n                                           hasPrev ? &prev : nullptr,\n                                           hasNext ? &next : nullptr);\n    }\n\n    Vec2F SplineEditor::CheckRangeHandlePos(int i, const Ref<PointHandles>& handles, const Vec2F& pos)\n    {\n        Vec2F normal = GetRangeHandlesNormal(i, handles);\n        return mSplineWrapper->GetPointPos(i) + normal*(normal.Dot(pos - mSplineWrapper->GetPointPos(i)));\n    }\n\n    void SplineEditor::UpdateTransformFrame()\n    {\n        mTransformFrameVisible = IsTransformFrameVisible();\n\n        if (!mTransformFrameVisible || mSelectedHandles.IsEmpty())\n            return;\n\n        RectF aabb((mSelectedHandles[0])->GetPosition(), (mSelectedHandles[0])->GetPosition());\n\n        for (auto& handle : mSelectedHandles)\n        {\n            aabb.left = Math::Min(handle->GetPosition().x, aabb.left);\n            aabb.right = Math::Max(handle->GetPosition().x, aabb.right);\n            aabb.top = Math::Max(handle->GetPosition().y, aabb.top);\n            aabb.bottom = Math::Min(handle->GetPosition().y, aabb.bottom);\n        }\n\n        for (auto& handle : mSupportHandlesGroup->GetSelectedHandles())\n        {\n            aabb.left = Math::Min(handle->GetPosition().x, aabb.left);\n            aabb.right = Math::Max(handle->GetPosition().x, aabb.right);\n            aabb.top = Math::Max(handle->GetPosition().y, aabb.top);\n            aabb.bottom = Math::Min(handle->GetPosition().y, aabb.bottom);\n        }\n\n        mTransformFrameBasis = Basis(aabb.LeftBottom(), Vec2F::Right()*aabb.Width(), Vec2F::Up()*aabb.Height());\n    }\n\n    bool SplineEditor::IsTransformFrameVisible() const\n    {\n        int selectedMainHandles = 0;\n\n        for (auto& handles : mSplineHandles)\n        {\n            if (handles->position->IsSelected())\n                selectedMainHandles++;\n        }\n\n        return selectedMainHandles > 1;\n    }\n\n    void SplineEditor::OnTransformFrameTransformed(const Basis& basis)\n    {\n        Vec2F localBasisOrig = mSplineWrapper->WorldToLocal(basis.origin + mTransformBasisOffet);\n        Vec2F localBasisXV = mSplineWrapper->WorldToLocal(basis.xv - Vec2F(mTransformBasisOffet.x*2.0f, 0) + basis.origin + mTransformBasisOffet) - localBasisOrig;\n        Vec2F localBasisYV = mSplineWrapper->WorldToLocal(basis.yv - Vec2F(0, mTransformBasisOffet.y*2.0f) + basis.origin + mTransformBasisOffet) - localBasisOrig;\n        Basis localBasis(localBasisOrig, localBasisXV, localBasisYV);\n\n        Basis delta = mTransformFrameBasis.Inverted()*localBasis;\n\n        if (delta.origin.Length() > 0.01f || delta.xv != Vec2F(1, 0) || delta.yv != Vec2F(0, 1))\n        {\n            Vector<Vec2F> newPosHandlesPositions, newSupportnHandlesPositions;\n\n            for (int i = 0; i < mSelectedHandles.Count(); i++)\n                newPosHandlesPositions.Add(mSelectedHandles[i]->GetPosition()*delta);\n\n            auto& supportHandles = mSupportHandlesGroup->GetSelectedHandles();\n            for (int i = 0; i < supportHandles.Count(); i++)\n                newSupportnHandlesPositions.Add(supportHandles[i]->GetPosition()*delta);\n\n            for (int i = 0; i < mSelectedHandles.Count(); i++)\n            {\n                mSelectedHandles[i]->SetPosition(newPosHandlesPositions[i]);\n                mSelectedHandles[i]->onChangedPos(mSelectedHandles[i]->GetPosition());\n            }\n\n            for (int i = 0; i < supportHandles.Count(); i++)\n            {\n                supportHandles[i]->SetPosition(newSupportnHandlesPositions[i]);\n                supportHandles[i]->onChangedPos(supportHandles[i]->GetPosition());\n            }\n\n            UpdateTransformFrame();\n        }\n\n        mSplineWrapper->OnChanged();\n        onChanged();\n    }\n\n    void SplineEditor::OnTransformBegin()\n    {\n    }\n\n    void SplineEditor::OnTransformCompleted()\n    {\n    }\n\n    Vec2F SplineEditor::ISplineWrapper::WorldToLocal(const Vec2F& point) const\n    {\n        return point;\n    }\n\n    Vec2F SplineEditor::ISplineWrapper::LocalToWorld(const Vec2F& point) const\n    {\n        return point;\n    }\n\n    Vector<Vec2F> SplineEditor::ISplineWrapper::GetDrawPointsLeftRange() const\n    {\n        Vector<Vec2F> res;\n\n        for (int i = 1; i < GetPointsCount(); i++)\n        {\n            for (int j = 0; j < GetPointApproximationCount(i) - 1; j++)\n                res.Add(LocalToWorld(GetPointApproximationLeft(i)[j].value));\n        }\n\n        return res;\n    }\n\n    Vector<Vec2F> SplineEditor::ISplineWrapper::GetDrawPointsRightRange() const\n    {\n        Vector<Vec2F> res;\n\n        for (int i = 1; i < GetPointsCount(); i++)\n        {\n            for (int j = 0; j < GetPointApproximationCount(i) - 1; j++)\n                res.Add(LocalToWorld(GetPointApproximationRight(i)[j].value));\n        }\n\n        return res;\n    }\n\n    bool SplineEditor::PointHandles::IsSupportsVisible() const\n    {\n        return position->IsSelected() || prevSupport->IsSelected() ||nextSupport->IsSelected() || o2Input.IsKeyDown(VK_MENU);\n    }\n\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/SplineEditor/SplineEditor.h",
    "content": "#pragma once\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Editor/FrameHandles.h\"\n#include \"o2Editor/Tools/IEditorTool.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // -----------------------------------------------------------------------------------\n    // Unified spline editor. Works with spline wrappers, that represents data from spline\n    // -----------------------------------------------------------------------------------\n    class SplineEditor : public SelectableDragHandlesGroup, public CursorAreaEventsListener, public KeyboardEventsListener\n    {\n    public:\n        // ---------------------------------------------------\n        // Spline wrapper. Wraps getters and setters of spline\n        // ---------------------------------------------------\n        struct ISplineWrapper : public RefCounterable\n        {\n            Function<void()> onChangedOutside; // Called when spline was changed outside of this editor\n\n        public:\n            // Virtual destructor\n            virtual ~ISplineWrapper() {}\n\n            // Converts world point to local space\n            virtual Vec2F WorldToLocal(const Vec2F& point) const;\n\n            // Converts local point to world space\n            virtual Vec2F LocalToWorld(const Vec2F& point) const;\n\n            // Returns count of points in spline\n            virtual int GetPointsCount() const = 0;\n\n            // Returns true if spline is closed\n            virtual bool IsClosed() const = 0;\n\n            // Adds new point to spline\n            virtual void AddPoint(int idx, const Vec2F& position, const Vec2F& prevSupport, const Vec2F& nextSupport) = 0;\n\n            // Removes point from spline\n            virtual void RemovePoint(int idx) = 0;\n\n            // Returns position of point\n            virtual Vec2F GetPointPos(int idx) const = 0;\n\n            // Sets position of point\n            virtual void SetPointPos(int idx, const Vec2F& pos) = 0;\n\n            // Sets point range value\n            virtual void SetPointRangeValue(int idx, float value) = 0;\n\n            // Returns point range value\n            virtual float GetPointRangeValue(int idx) const = 0;\n\n            // Returns previous support position of point\n            virtual Vec2F GetPointPrevSupportPos(int idx) const = 0;\n\n            // Sets previous support position of point\n            virtual void SetPointPrevSupportPos(int idx, const Vec2F& pos) = 0;\n\n            // Returns next support position of point\n            virtual Vec2F GetPointNextSupportPos(int idx) const = 0;\n\n            // Sets next support position of point\n            virtual void SetPointNextSupportPos(int idx, const Vec2F& pos) = 0;\n\n            // Returns list of points for drawing of left range\n            virtual Vector<Vec2F> GetDrawPointsLeftRange() const;\n\n            // Returns list of points for drawing of right range\n            virtual Vector<Vec2F> GetDrawPointsRightRange() const;\n\n            // Returns pointer to approximation array\n            virtual const ApproximationVec2F* GetPointApproximationLeft(int idx) const = 0;\n\n            // Returns pointer to approximation array\n            virtual const ApproximationVec2F* GetPointApproximationRight(int idx) const = 0;\n\n            // Returns count of approximation points\n            virtual int GetPointApproximationCount(int idx) const = 0;\n\n            // Called when spline was changed\n            virtual void OnChanged() {}\n        };\n\n    public:\n        Function<void()> onChanged; // Called when spline was changed\n\n    public:\n        // Default constructor\n        SplineEditor();\n\n        // Destructor\n        ~SplineEditor();\n\n        // Draws spline handles and spline itself\n        void Draw();\n\n        // Updates handles\n        void Update(float dt);\n\n        // Sets spline wrapper\n        void SetSpline(const Ref<ISplineWrapper>& wrapper);\n\n        // resets callbacks and spline to null\n        void Reset();\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Called when spline was updated and need to refresh handles\n        void OnSplineChanged();\n\n    protected:\n        // -----------------------\n        // Handles of spline point\n        // -----------------------\n        struct PointHandles : public RefCounterable\n        {\n            Ref<DragHandle> position;         // Position handle\n            Ref<DragHandle> prevSupport;      // Previous support handle\n            Ref<DragHandle> nextSupport;      // Next support handle\n            Ref<DragHandle> leftRangeHandle;  // Left range handle\n            Ref<DragHandle> rightRangeHandle; // Right range handle\n\n            bool positionDragged = false;    // Is position handle dragged\n            bool prevSupportDragged = false; // Is previous support handle dragged \n            bool nextSupportDragged = false; // Is next support handle dragged\n\n            bool startDragFromZero = false; // Is dragging started from zero position\n\n            bool isLast = false;  // Is last point in spline\n            bool isFirst = false; // Is first point in spline\n\n        public:\n            // Returns is support handles visible\n            bool IsSupportsVisible() const;\n        };\n\n    protected:\n        Ref<ISplineWrapper> mSplineWrapper; // Spline getters and setters wrapper\n        Subscription mSubscription;\n\n        PointHandles              mHandlesSample; // Samples of handles for cloning\n        Vector<Ref<PointHandles>> mSplineHandles; // Spline handles\n\n        Ref<Mesh> mCurvesMesh; // Mesh for drawing curves ranges\n\n        Color4 mSplineColor;        // Color of spline line\n        Color4 mSplineSupportColor; // Color of support handles lines\n\n        Ref<Sprite> mSelectionSprite;       // Selection sprite @SERIALIZABLE\n        Vec2F       mSelectingPressedPoint; // Point, where cursor was pressed, selection starts here, in local space\n\n        Vector<Ref<DragHandle>> mSelectingHandlesBuf; // Potentially selecting handles while selecting\n\n        Ref<FrameHandles> mTransformFrame;                      // Keys transformation frame\n        bool              mTransformFrameVisible = false;       // Is transform frame visible. it visible when 2 or more main handles was selected\n        Basis             mTransformFrameBasis;                 // Basis of transform frame in screen space\n        Vec2F             mTransformBasisOffet = Vec2F(10, 10); // Border between side points and frame\n\n        Ref<SelectableDragHandlesGroup> mSupportHandlesGroup = mmake<SelectableDragHandlesGroup>(); // Support points handles selection group. They are must be selectable separately from main handles\n\n    protected:\n        // Removes all handles\n        void ClearHandles();\n\n        // Initializes all spline handles\n        void InitializeHandles();\n\n        // Updates handles positions\n        void UpdateHandles();\n\n        // Checks that support handles are in same position for dragging symmteric\n        void CheckDragFromZero(int i, const Ref<PointHandles>& handles);\n\n        // Called when left range value was changed\n        void OnRangeValueChanged(int i, const Ref<PointHandles>& handles, bool isLeft);\n\n        // Returns position of left range handle\n        Vec2F GetRangeHandlePos(int i, const Ref<PointHandles>& handles, bool isLeft) const;\n\n        // Returns normal of range handles\n        Vec2F GetRangeHandlesNormal(int i, const Ref<PointHandles>& handles) const;\n\n        // Checks and corrects range handle position\n        Vec2F CheckRangeHandlePos(int i, const Ref<PointHandles>& handles, const Vec2F& pos);\n\n        // Draws handles\n        void DrawHandles();\n\n        // Draw selection sprite\n        void DrawSelection();\n\n        // Draws transformation frame\n        void DrawTransformFrame();\n\n        // Draws all main handles\n        void DrawMainHandles();\n\n        // Draws only support handles\n        void DrawSupportHandles();\n\n        // Updates transformation frame by selected handles\n        void UpdateTransformFrame();\n\n        // Returns is transform frame visible. it will be visible when 2 or more main handles was selected\n        bool IsTransformFrameVisible() const;\n\n        // Called when transform frame was transformed\n        void OnTransformFrameTransformed(const Basis& basis);\n\n        // Called when beginning transforming some handles. Stores selected keys before changing\n        void OnTransformBegin();\n\n        // Called when transform completed. Checks that selected keys changed, creates action for undo/redo\n        void OnTransformCompleted();\n\n        // Called when previous support handle moved. Updates position of support point, checks symmetric\n        void OnPrevHandleMoved(int i, const Vec2F& pos, const Ref<PointHandles>& handles);\n\n        // Called when next support handle moved. Updates position of support point, checks symmetric\n        void OnNextHandleMoved(int i, const Vec2F& pos, const Ref<PointHandles>& handles);\n\n        // Called when main handle moved. Updates support handles positions also\n        void OnMainHandleMoved(int i, const Vec2F& pos, const Ref<PointHandles>& handles);\n\n        // Called when previous support handle was released without dragging, just clicking; removes support handle\n        void OnPrevHandleReleasedNoDrag(int i, const Ref<PointHandles>& handles);\n\n        // Called when next support handle was released without dragging, just clicking; removes support handle\n        void OnNextHandleReleasedNoDrag(int i, const Ref<PointHandles>& handles);\n\n        // Called when position handle was pressed, checks range value\n        void OnMainHandlePressed(int i, const Ref<PointHandles>& handles);\n\n        // Called when position handle was released without dragging, just clicking; removes both support handles\n        void OnMainHandleReleasedNoDrag(int i, const Ref<PointHandles>& handles);\n\n        // Called when cursor double clicked; creates new point\n        void OnCursorDblClicked(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when selection is changed - some handle was added or removed from selection; checks visible handles\n        void OnSelectionChanged() override;\n\n        // Called when key was released\n        void OnKeyReleased(const Input::Key& key) override;\n\n        REF_COUNTERABLE_IMPL(SelectableDragHandlesGroup);\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/SpoilerWithHead.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SpoilerWithHead.h\"\n\n#include \"o2/Scene/UI/Widgets/Button.h\"\n\nnamespace Editor\n{\n\n    SpoilerWithHead::SpoilerWithHead(RefCounter* refCounter) :\n        Spoiler(refCounter)\n    {}\n\n    SpoilerWithHead::SpoilerWithHead(RefCounter* refCounter, const SpoilerWithHead& other) :\n        Spoiler(refCounter, other)\n    {\n        InitializeControls();\n        RetargetStatesAnimations();\n    }\n\n    SpoilerWithHead& SpoilerWithHead::operator=(const SpoilerWithHead& other)\n    {\n        Spoiler::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    const Ref<Image>& SpoilerWithHead::GetIcon() const\n    {\n        return mIcon;\n    }\n\n    String SpoilerWithHead::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void SpoilerWithHead::InitializeControls()\n    {\n        mOptionsBtn = FindInternalWidgetByType<Button>(\"options\");\n        if (mOptionsBtn)\n            mOptionsBtn->onClick = [&]() { onOptionsPressed(); };\n\n        mSaveBtn = FindInternalWidgetByType<Button>(\"save\");\n        if (mSaveBtn)\n            mSaveBtn->onClick = [&]() { onSavePressed(); };\n\n        mIcon = FindInternalWidgetByType<Image>(\"icon\");\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::SpoilerWithHead>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SpoilerWithHead, Editor__SpoilerWithHead);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/SpoilerWithHead.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Button;\n    class Image;\n}\n\nnamespace Editor\n{\n    // -----------------------------------------------\n    // Editor properties spoiler with head and caption\n    // -----------------------------------------------\n    class SpoilerWithHead : public Spoiler\n    {\n    public:\n        Function<void()> onOptionsPressed; // Options button pressed event\n        Function<void()> onSavePressed;    // Save button pressed event\n\n    public:\n        // Default constructor\n        SpoilerWithHead(RefCounter* refCounter);\n\n        // Copy constructor\n        SpoilerWithHead(RefCounter* refCounter, const SpoilerWithHead& other);\n\n        // Copy operator\n        SpoilerWithHead& operator=(const SpoilerWithHead& other);\n\n        // Returns icon\n        const Ref<Image>& GetIcon() const;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(SpoilerWithHead);\n        CLONEABLE_REF(SpoilerWithHead);\n\n    private:\n        Ref<Button> mOptionsBtn; // Component option button\n        Ref<Button> mSaveBtn;    // Save prototype button\n        Ref<Image>  mIcon;       // Component icon\n\n    private:\n        // Initializes controls: options, save button and icon\n        void InitializeControls();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SpoilerWithHead)\n{\n    BASE_CLASS(o2::Spoiler);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SpoilerWithHead)\n{\n    FIELD().PUBLIC().NAME(onOptionsPressed);\n    FIELD().PUBLIC().NAME(onSavePressed);\n    FIELD().PRIVATE().NAME(mOptionsBtn);\n    FIELD().PRIVATE().NAME(mSaveBtn);\n    FIELD().PRIVATE().NAME(mIcon);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SpoilerWithHead)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const SpoilerWithHead&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Image>&, GetIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeControls);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/Style/BasicUIStyle.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"BasicUIStyle.h\"\n\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Animation/Tracks/AnimationVec2FTrack.h\"\n#include \"o2/Animation/Tracks/AnimationColor4Track.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/CustomDropDown.h\"\n#include \"o2/Scene/UI/Widgets/CustomList.h\"\n#include \"o2/Scene/UI/Widgets/DropDown.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/EditBoxDropDown.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalProgress.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/List.h\"\n#include \"o2/Scene/UI/Widgets/LongList.h\"\n#include \"o2/Scene/UI/Widgets/MenuPanel.h\"\n#include \"o2/Scene/UI/Widgets/PopupWidget.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2/Scene/UI/Widgets/VerticalProgress.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n\nnamespace o2\n{\n    void BasicUIStyleBuilder::RebuildButtonStyle()\n    {\n        auto sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_button_regular.png\"), \n                                             Layout::BothStretch(-9, -9, -10, -10));\n\n        auto hoverLayer   = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_button_select.png\"),\n                                             Layout::BothStretch(-9, -9, -10, -10));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_button_pressed.png\"), \n                                             Layout::BothStretch(-9, -9, -10, -10));\n\n        auto focusLayer   = sample->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_button_focus.png\"), \n                                             Layout::BothStretch(-9, -9, -10, -10));\n\n        Ref<Text> captionText    = mmake<Text>(\"stdFont.ttf\");\n        captionText->text        = \"Button\";\n        captionText->horAlign    = HorAlign::Middle;\n        captionText->verAlign    = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->wordWrap    = true;\n        captionText->color       = Color4(96, 125, 139);\n        sample->AddLayer(\"caption\", captionText);\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildCloseButtonStyle()\n    {\n        auto sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Close_button_regular.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Close_button_select.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Close_button_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"close\");\n    }\n\n    void BasicUIStyleBuilder::RebuildArrowButtonStyle()\n    {\n        auto sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Options_button_regular.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Options_button_select.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Options_button_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"arrow\");\n    }\n\n    void BasicUIStyleBuilder::RebuildHorSeparatorStyle()\n    {\n        auto sample = mmake<Widget>();\n        sample->AddLayer(\"line\", mmake<Sprite>(\"ui/UI4_Separator.png\"),\n                                  Layout::HorStretch(VerAlign::Middle, 0, 0, 5, 0));\n        *sample->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 5);\n        sample->layout->maxHeight = 5;\n        sample->layout->minHeight = 5;\n        sample->layout->height = 5;\n\n        o2UI.AddWidgetStyle(sample, \"hor separator\");\n    }\n\n    void BasicUIStyleBuilder::RebuildHorProgressBarStyle()\n    {\n        auto sample = mmake<HorizontalProgress>();\n        sample->layout->minSize = Vec2F(5, 5);\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n        auto spriteBackLayer = backLayer->AddChildLayer(\"sprite\", mmake<Sprite>(\"ui/UI4_Hor_scrollbar_bk.png\"),\n                                                        Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f),\n                                                               Vec2F(-2, -4), Vec2F(2, 5)));\n\n        backLayer->interactableLayout = Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(0, -4), Vec2F(0, 4));\n\n        auto barLayer = sample->AddLayer(\"bar\", nullptr);\n        auto barRegularSprite = barLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Hor_scrollhandle_regular.png\"),\n                                                        Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f),\n                                                               Vec2F(-2, -4), Vec2F(2, 5)));\n\n        auto barSelectSprite = barLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Hor_scrollhandle_select.png\"),\n                                                       Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f),\n                                                              Vec2F(-2, -4), Vec2F(2, 5)));\n\n        auto barPressedSprite = barLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Hor_scrollhandle_pressed.png\"),\n                                                        Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f),\n                                                               Vec2F(-2, -4), Vec2F(2, 5)));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/bar/child/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/bar/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->SetOrientation(HorizontalProgress::Orientation::Right);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n\n    void BasicUIStyleBuilder::RebuildVerProgressBarStyle()\n    {\n        auto sample = mmake<VerticalProgress>();\n        sample->layout->minSize = Vec2F(5, 5);\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n        auto spriteBackLayer = backLayer->AddChildLayer(\"sprite\", mmake<Sprite>(\"ui/UI4_Ver_scrollbar_bk.png\"),\n                                                        Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f),\n                                                               Vec2F(-4, -2), Vec2F(5, 2)));\n        backLayer->interactableLayout = Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f), Vec2F(-4, 0), Vec2F(4, 0));\n\n        auto barLayer = sample->AddLayer(\"bar\", nullptr);\n        auto barRegularSprite = barLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Ver_scrollhandle_regular.png\"),\n                                                        Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f),\n                                                               Vec2F(-4, -2), Vec2F(5, 2)));\n\n        auto barSelectSprite = barLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Ver_scrollhandle_select.png\"),\n                                                       Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f),\n                                                              Vec2F(-4, -2), Vec2F(5, 2)));\n\n        auto barPressedSprite = barLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Ver_scrollhandle_pressed.png\"),\n                                                        Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f),\n                                                               Vec2F(-4, -2), Vec2F(5, 2)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/bar/child/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/bar/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildHorScrollBarStyle()\n    {\n        auto sample = mmake<HorizontalScrollBar>();\n        sample->layout->minSize = Vec2F(5, 5);\n        sample->SetScrollSense(0.25f);\n        sample->SetMinimalScrollHandleSize(10);\n\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n        backLayer->interactableLayout = Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(0, -4), Vec2F(0, 4));\n        auto spriteBackLayer = backLayer->AddChildLayer(\"sprite\", mmake<Sprite>(\"ui/UI4_Hor_scrollbar_bk.png\"),\n                                                        Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f),\n                                                               Vec2F(-2, -4), Vec2F(2, 5)));\n\n        auto handleLayer = sample->AddLayer(\"handle\", nullptr);\n        handleLayer->interactableLayout = Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(0, -4), Vec2F(0, 4));\n        auto barRegularSprite = handleLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Hor_scrollhandle_regular.png\"),\n                                                           Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f),\n                                                                  Vec2F(-2, -4), Vec2F(2, 5)));\n\n        auto barSelectSprite = handleLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Hor_scrollhandle_select.png\"),\n                                                          Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f),\n                                                                 Vec2F(-2, -4), Vec2F(2, 5)));\n\n        auto barPressedSprite = handleLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Hor_scrollhandle_pressed.png\"),\n                                                           Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f),\n                                                                  Vec2F(-2, -4), Vec2F(2, 5)));\n                                            \n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/handle/child/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/handle/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildVerScrollBarStyle()\n    {\n        auto sample = mmake<VerticalScrollBar>();\n        sample->layout->minSize = Vec2F(5, 5);\n        sample->SetScrollSense(0.25f);\n        sample->SetMinimalScrollHandleSize(10);\n\n\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n        backLayer->interactableLayout = Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f), Vec2F(-4, 0), Vec2F(4, 0));\n        auto spriteBackLayer = backLayer->AddChildLayer(\"sprite\", mmake<Sprite>(\"ui/UI4_Ver_scrollbar_bk.png\"),\n                                                        Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f),\n                                                               Vec2F(-4, -2), Vec2F(5, 2)));\n\n        auto handleLayer = sample->AddLayer(\"handle\", nullptr);\n        handleLayer->interactableLayout = Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f), Vec2F(-4, 0), Vec2F(4, 0));\n        auto barRegularSprite = handleLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Ver_scrollhandle_regular.png\"),\n                                                           Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f),\n                                                                  Vec2F(-4, -2), Vec2F(5, 2)));\n\n        auto barSelectSprite = handleLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Ver_scrollhandle_select.png\"),\n                                                          Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f),\n                                                                 Vec2F(-4, -2), Vec2F(5, 2)));\n\n        auto barPressedSprite = handleLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Ver_scrollhandle_pressed.png\"),\n                                                           Layout(Vec2F(0.5f, 0.0f), Vec2F(0.5f, 1.0f),\n                                                                  Vec2F(-4, -2), Vec2F(5, 2)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/handle/child/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/handle/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildCheckboxStyle()\n    {\n        auto sample = mmake<Toggle>();\n        sample->layout->minSize = Vec2F(20, 20);\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Check_bk.png\"),\n                                          Layout(Vec2F(0.0f, 0.5f), Vec2F(0.0f, 0.5f), Vec2F(0, -10), Vec2F(20, 10)));\n\n        auto hoverLayer = sample->AddLayer(\"backSelect\", mmake<Sprite>(\"ui/UI4_Check_bk_select.png\"),\n                                            Layout(Vec2F(0.0f, 0.5f), Vec2F(0.0f, 0.5f), Vec2F(0, -10), Vec2F(20, 10)));\n\n        auto pressedLayer = sample->AddLayer(\"backPressed\", mmake<Sprite>(\"ui/UI4_Check_bk_pressed.png\"),\n                                             Layout(Vec2F(0.0f, 0.5f), Vec2F(0.0f, 0.5f), Vec2F(0, -10), Vec2F(20, 10)));\n\n        auto focusLayer = sample->AddLayer(\"backFocus\", mmake<Sprite>(\"ui/UI4_Check_bk_focus.png\"),\n                                           Layout(Vec2F(0.0f, 0.5f), Vec2F(0.0f, 0.5f), Vec2F(0, -10), Vec2F(20, 10)));\n\n        auto checkLayer = sample->AddLayer(\"check\", mmake<Sprite>(\"ui/UI4_Ckeck.png\"),\n                                           Layout(Vec2F(0.0f, 0.5f), Vec2F(0.0f, 0.5f), Vec2F(1, -11), Vec2F(21, 10)));\n\n        auto unknownLayer = sample->AddLayer(\"unknown\", mmake<Sprite>(\"ui/UI4_Check_unknown.png\"),\n                                           Layout(Vec2F(0.0f, 0.5f), Vec2F(0.0f, 0.5f), Vec2F(1, -11), Vec2F(21, 10)));\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"Checkbox\";\n        captionText->horAlign = HorAlign::Left;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->color = Color4(96, 125, 139);\n        sample->AddLayer(\"caption\", captionText, Layout(Vec2F(0, 0), Vec2F(1, 1), Vec2F(20, 0), Vec2F(0, 0)));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/backSelect/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"value\", AnimationClip::EaseInOut(\"layer/check/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"unknown\", AnimationClip::EaseInOut(\"layer/unknown/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/backPressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/backFocus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildCheckboxWithoutCaptionStyle()\n    {\n        auto sample = mmake<Toggle>();\n        sample->layout->minSize = Vec2F(20, 20);\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Check_bk.png\"),\n                                          Layout::Based(BaseCorner::Right, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"backSelect\", mmake<Sprite>(\"ui/UI4_Check_bk_select.png\"),\n                                            Layout::Based(BaseCorner::Right, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"backPressed\", mmake<Sprite>(\"ui/UI4_Check_bk_pressed.png\"),\n                                             Layout::Based(BaseCorner::Right, Vec2F(20, 20)));\n\n        auto focusLayer = sample->AddLayer(\"backFocus\", mmake<Sprite>(\"ui/UI4_Check_bk_focus.png\"),\n                                           Layout::Based(BaseCorner::Right, Vec2F(20, 20)));\n\n        auto checkLayer = sample->AddLayer(\"check\", mmake<Sprite>(\"ui/UI4_Ckeck.png\"),\n                                           Layout::Based(BaseCorner::Right, Vec2F(20, 20)));\n\n        auto unknownLayer = sample->AddLayer(\"unknown\", mmake<Sprite>(\"ui/UI4_Check_unknown.png\"),\n                                             Layout::Based(BaseCorner::Right, Vec2F(20, 20)));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/backSelect/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"value\", AnimationClip::EaseInOut(\"layer/check/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"unknown\", AnimationClip::EaseInOut(\"layer/unknown/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/backPressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/backFocus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"without caption\");\n    }\n\n    void BasicUIStyleBuilder::RebuildScrollAreaStraightBarsStyle()\n    {\n        auto sample = mmake<ScrollArea>();\n        sample->layout->minSize = Vec2F(30, 30);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 5));\n        sample->SetEnableScrollsHiding(false);\n        sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"), Layout::BothStretch(-9, -9, -9, -9));\n\n        auto horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        auto enableHorScrollAnim = mmake<AnimationClip>();\n        *enableHorScrollAnim->AddTrack<float>(\"mVerScrollBar/layout/offsetBottom\") =\n            AnimationTrack<float>::EaseInOut(5, 15, 0.2f);\n\n        *enableHorScrollAnim->AddTrack<Vec2F>(\"mViewAreaLayout/offsetMin\") =\n            AnimationTrack<Vec2F>::EaseInOut(Vec2F(5, 5), Vec2F(5, 15), 0.2f);\n\n        auto enableHorScrollState = sample->AddState(\"enableHorBar\", enableHorScrollAnim);\n\n        auto enableVerScrollAnim = mmake<AnimationClip>();\n        *enableVerScrollAnim->AddTrack<float>(\"mHorScrollBar/layout/offsetRight\") =\n            AnimationTrack<float>::EaseInOut(-5, -15, 0.2f);\n\n        *enableVerScrollAnim->AddTrack<Vec2F>(\"mViewAreaLayout/offsetMax\") =\n            AnimationTrack<Vec2F>::EaseInOut(Vec2F(-5, -5), Vec2F(-15, -5), 0.2f);\n\n        auto enableVerScrollState = sample->AddState(\"enableVerBar\", enableVerScrollAnim);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"straight bars\");\n    }\n\n    void BasicUIStyleBuilder::RebuildPopupStyle()\n    {\n        Ref<PopupWidget> sample = mmake<PopupWidget>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetMinFitSize(50);\n\n        sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Context_menu.png\"), Layout::BothStretch(-20, -19, -20, -19));\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildScrollAreaStyle()\n    {\n        auto sample = mmake<ScrollArea>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 5));\n        sample->SetEnableScrollsHiding(true);\n        sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"), Layout::BothStretch(-9, -9, -9, -9));\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildLabelStyle()\n    {\n        auto sample = mmake<Label>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->horOverflow = Label::HorOverflow::Dots;\n        sample->verOverflow = Label::VerOverflow::None;\n\n        sample->SetFont(AssetRef<VectorFontAsset>(\"stdFont.ttf\")->GetFont());\n        sample->SetHorAlign(HorAlign::Middle);\n        sample->SetVerAlign(VerAlign::Middle);\n        sample->SetColor(Color4(96, 125, 139));\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildEditBoxStyle()\n    {\n        Ref<EditBox> sample = mmake<EditBox>();\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 5));\n        sample->SetEnableScrollsHiding(false);\n        sample->SetCaretBlinkingDelay(1.15f);\n        sample->SetSelectionColor(Color4(0, 156, 141, 120));\n        sample->layout->minSize = Vec2F(30, 40);\n\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"), Layout::BothStretch(-9, -9, -9, -9));\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        auto enableHorScrollAnim = mmake<AnimationClip>();\n        *enableHorScrollAnim->AddTrack<float>(\"mVerScrollBar/layout/offsetBottom\") =\n            AnimationTrack<float>::EaseInOut(5, 15, 0.2f);\n\n        *enableHorScrollAnim->AddTrack<Vec2F>(\"mViewAreaLayout/offsetMin\") =\n            AnimationTrack<Vec2F>::EaseInOut(Vec2F(5, 5), Vec2F(5, 15), 0.2f);\n\n        auto enableHorScrollState = sample->AddState(\"enableHorBar\", enableHorScrollAnim);\n\n        auto enableVerScrollAnim = mmake<AnimationClip>();\n        *enableVerScrollAnim->AddTrack<float>(\"mHorScrollBar/layout/offsetRight\") =\n            AnimationTrack<float>::EaseInOut(-5, -15, 0.2f);\n\n        *enableVerScrollAnim->AddTrack<Vec2F>(\"mViewAreaLayout/offsetMax\") =\n            AnimationTrack<Vec2F>::EaseInOut(Vec2F(-5, -5), Vec2F(-15, -5), 0.2f);\n\n        auto enableVerScrollState = sample->AddState(\"enableVerBar\", enableVerScrollAnim);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        Ref<Text> textDrawable = sample->GetTextDrawable();\n        textDrawable->verAlign = VerAlign::Top;\n        textDrawable->horAlign = HorAlign::Left;\n        textDrawable->color = Color4(96, 125, 139);\n        textDrawable->SetFontAsset(AssetRef<FontAsset>(\"stdFont.ttf\"));\n\n        Ref<Sprite> caretDrawable = sample->GetCaretDrawable();\n        *caretDrawable = Sprite();\n        caretDrawable->size = Vec2F(1, textDrawable->GetFont()->GetHeightPx(textDrawable->GetFontHeight())*1.7f);\n        caretDrawable->pivot = Vec2F(0, 0.16f);\n        caretDrawable->color = Color4::Black();\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildCustomListStyle()\n    {\n        Ref<CustomList> sample = mmake<CustomList>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 5));\n        sample->SetEnableScrollsHiding(true);\n        sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"), Layout::BothStretch(-9, -9, -9, -9));\n\n        Ref<Sprite> selection = mmake<Sprite>(\"ui/UI4_Context_menu_select.png\");\n        *sample->GetSelectionDrawable() = *selection;\n        sample->SetSelectionDrawableLayout(Layout::BothStretch(-12, -16, -10, -16));\n\n        Ref<Sprite> hover = mmake<Sprite>(\"ui/UI4_Context_menu_white.png\");\n        *sample->GetHoverDrawable() = *hover;\n        sample->SetHoverDrawableLayout(Layout::BothStretch(-12, -16, -10, -16));\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                                                              5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                                                              -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildLongListStyle()\n    {\n        auto sample = mmake<LongList>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 5));\n        sample->SetEnableScrollsHiding(true);\n\n        Ref<Sprite> selection = mmake<Sprite>(\"ui/UI4_Context_menu_select.png\");\n        *sample->GetSelectionDrawable() = *selection;\n        sample->SetSelectionDrawableLayout(Layout::BothStretch(-12, -16, -10, -16));\n\n        Ref<Sprite> hover = mmake<Sprite>(\"ui/UI4_Context_menu_white.png\");\n        *sample->GetHoverDrawable() = *hover;\n        sample->SetHoverDrawableLayout(Layout::BothStretch(-12, -16, -10, -16));\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                                                              5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                                                              -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"mSelectionDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildListStyle()\n    {\n        Ref<List> sample = mmake<List>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 5));\n        sample->SetEnableScrollsHiding(true);\n        sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"), Layout::BothStretch(-9, -9, -9, -9));\n\n        Ref<Sprite> selection = mmake<Sprite>(\"ui/UI4_Context_menu_select.png\");\n        *sample->GetSelectionDrawable() = *selection;\n        sample->SetSelectionDrawableLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        Ref<Sprite> hover = mmake<Sprite>(\"ui/UI4_Context_menu_white.png\");\n        *sample->GetHoverDrawable() = *hover;\n        sample->SetHoverDrawableLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        Ref<Label> itemSample = o2UI.CreateLabel(\"empty\");\n        itemSample->layout->size = Vec2F(20, 0);\n        itemSample->horAlign = HorAlign::Left;\n        itemSample->verAlign = VerAlign::Middle;\n        sample->SetItemSample(itemSample);\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                                                              5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                                                              -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"mSelectionDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildCustomDropDownStyle()\n    {\n        auto sample = mmake<CustomDropDown>();\n        sample->layout->minSize = Vec2F(20, 20);\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Editbox_pressed.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto arrowLayer = sample->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n                                           Layout(Vec2F(1.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(-20, -10), Vec2F(0, 10)));\n\n        sample->SetClippingLayout(Layout::BothStretch(4, 2, 20, 2));\n\n        Ref<Widget> itemSample = mmake<Widget>();\n        itemSample->layout->size = Vec2F(20, 20);\n        sample->SetItemSample(itemSample);\n\n        auto list = sample->GetListView();\n        *list = *o2UI.GetWidgetStyle<CustomList>(\"standard\");\n        list->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        list->layer[\"back\"]->SetDrawable(mmake<Sprite>(\"ui/UI4_Box_regular.png\"));\n        list->layout->pivot = Vec2F(0.5f, 1.0f);\n        list->layout->anchorMin = Vec2F(0, 0);\n        list->layout->anchorMax = Vec2F(1, 0);\n        list->layout->offsetMin = Vec2F(-1, -60);\n        list->layout->offsetMax = Vec2F(0, 3);\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"opened\", AnimationClip::EaseInOut(\"layer/arrow/mDrawable/scale\", Vec2F(1, 1), Vec2F(1, -1), 0.2f));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildDropDownStyle()\n    {\n        Ref<DropDown> sample = mmake<DropDown>();\n        sample->layout->minSize = Vec2F(20, 20);\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"), \n                                          Layout::BothStretch(-9, -9, -9, -9));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"), \n                                           Layout::BothStretch(-9, -9, -9, -9));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Editbox_pressed.png\"), \n                                             Layout::BothStretch(-9, -9, -9, -9));\n\n        auto arrowLayer = sample->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n                                           Layout(Vec2F(1.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(-20, -10), Vec2F(0, 10)));\n\n        sample->SetClippingLayout(Layout::BothStretch(4, 2, 20, 2));\n\n        auto list = sample->GetListView();\n        *list = *o2UI.GetWidgetStyle<CustomList>(\"standard\");\n        list->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        list->layer[\"back\"]->SetDrawable(mmake<Sprite>(\"ui/UI4_Box_regular.png\"));\n        list->layout->pivot = Vec2F(0.5f, 1.0f);\n        list->layout->anchorMin = Vec2F(0, 0);\n        list->layout->anchorMax = Vec2F(1, 0);\n        list->layout->offsetMin = Vec2F(2, -60);\n        list->layout->offsetMax = Vec2F(0, 3);\n\n        Ref<Label> itemSample = o2UI.CreateLabel(\"empty\");\n        itemSample->horAlign = HorAlign::Left;\n        sample->SetItemSample(itemSample);\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"opened\", AnimationClip::EaseInOut(\"layer/arrow/mDrawable/scale\", Vec2F(1, 1), Vec2F(1, -1), 0.2f));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildEditBoxDropDownStyle()\n    {\n        auto sample = mmake<EditBoxDropDown>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto arrowLayer = sample->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n                                           Layout(Vec2F(1.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(-20, -10), Vec2F(0, 10)),\n                                           Widget::topLayersDepth);\n\n        // Configure the EditBox\n        auto editBox = sample->GetEditBox();\n        *editBox = *o2UI.GetWidgetStyle<EditBox>(\"singleline\");\n\t\t*editBox->layout = WidgetLayout::BothStretch(0, 0, 0, 0);\n        \n        // Configure the dropdown list\n        auto list = sample->GetListView();\n        *list = *o2UI.GetWidgetStyle<List>(\"standard\");\n        list->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        list->layer[\"back\"]->SetDrawable(mmake<Sprite>(\"ui/UI4_Box_regular.png\"));\n        list->layout->pivot = Vec2F(0.5f, 0.0f);\n        list->layout->anchorMin = Vec2F(0, 0);\n        list->layout->anchorMax = Vec2F(1, 0);\n        list->layout->offsetMin = Vec2F(2, -160);\n        list->layout->offsetMax = Vec2F(0, 3);\n\n        // Add states and animations\n        sample->AddState(\"opened\", AnimationClip::EaseInOut(\"layer/arrow/mDrawable/scale\", Vec2F(1, 1), Vec2F(1, -1), 0.2f));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildWindowStyle()\n    {\n        auto sample = mmake<Window>();\n        sample->layout->minSize = Vec2F(100, 50);\n        sample->SetClippingLayout(Layout::BothStretch(-1, 0, 0, 17));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 20));\n        sample->SetEnableScrollsHiding(true);\n\n        auto regularBackLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_window_frame_regular.png\"),\n                                                 Layout::BothStretch(-13, -13, -13, -11));\n\n        auto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_o2_sign.png\"),\n                                          Layout::Based(BaseCorner::LeftTop, Vec2F(18, 18), Vec2F(-1, 1)));\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"Window\";\n        captionText->horAlign = HorAlign::Left;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        auto textLayer = sample->AddLayer(\"caption\", captionText,\n                                          Layout::HorStretch(VerAlign::Top, 20, 35, 20, -2));\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        *horScrollBar->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 5, 15, 15, -5);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        *verScrollBar->layout = WidgetLayout::VerStretch(HorAlign::Right, 0, 15, 15, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 2.0f;\n\n        Ref<Button> closeBtn = o2UI.CreateWidget<Button>(\"close\");\n        closeBtn->name = \"closeButton\";\n        *closeBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(1, 2));\n        sample->AddInternalWidget(closeBtn);\n\n        Ref<Button> optionsBtn = o2UI.CreateWidget<Button>(\"arrow\");\n        optionsBtn->name = \"optionsButton\";\n        *optionsBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(-15, 2));\n        sample->AddInternalWidget(optionsBtn);\n\n        sample->SetDragAreaLayouts(Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(5, -15), Vec2F(-5, -2)),    // head\n                                   Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(5, -2), Vec2F(-5, 5)),      // top\n                                   Layout(Vec2F(0, 0), Vec2F(1, 0), Vec2F(5, -5), Vec2F(-5, 5)),      // bottom\n                                   Layout(Vec2F(0, 0), Vec2F(0, 1), Vec2F(-5, 5), Vec2F(5, -5)),      // left\n                                   Layout(Vec2F(1, 0), Vec2F(1, 1), Vec2F(-5, 5), Vec2F(5, -5)),      // right\n                                   Layout(Vec2F(0, 1), Vec2F(0, 1), Vec2F(-5, -5), Vec2F(5, 5)),      // left top\n                                   Layout(Vec2F(1, 1), Vec2F(1, 1), Vec2F(-5, -5), Vec2F(5, 5)),      // right top\n                                   Layout(Vec2F(0, 0), Vec2F(0, 0), Vec2F(-5, -5), Vec2F(5, 5)),      // left bottom \n                                   Layout(Vec2F(1, 0), Vec2F(1, 0), Vec2F(-5, -5), Vec2F(5, 5)));     // right bottom\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildContextMenuStyle()\n    {\n        Ref<ContextMenu> sample = mmake<ContextMenu>();\n\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetMinFitSize(50);\n\n        sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Context_menu.png\"), Layout::BothStretch(-20, -19, -20, -19));\n\n        Ref<Sprite> selection = mmake<Sprite>(\"ui/UI4_Context_menu_select.png\");\n        *sample->GetSelectionDrawable() = *selection;\n        sample->SetSelectionDrawableLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        // Separator sample\n        Ref<Widget> separatorSample = sample->GetSeparatorSample();\n        separatorSample->AddLayer(\"line\", mmake<Sprite>(\"ui/UI4_Separator.png\"),\n                                  Layout::HorStretch(VerAlign::Middle, 0, 0, 5, 0));\n\n        // Item sample\n        Ref<ContextMenuItem> itemSample = sample->GetItemSample();\n\n        Ref<WidgetLayer> captionLayer = itemSample->FindLayer(\"caption\");\n        Ref<Text> captionLayerText = mmake<Text>(\"stdFont.ttf\");\n        captionLayer->SetDrawable(captionLayerText);\n        captionLayer->layout = Layout::BothStretch(20, 1, 0, -1);\n        captionLayerText->horAlign = HorAlign::Left;\n        captionLayerText->verAlign = VerAlign::Middle;\n        captionLayerText->color = Color4(96, 125, 139);\n\n        Ref<WidgetLayer> shortcutLayer = itemSample->FindLayer(\"shortcut\");\n        Ref<Text> shortcutLayerText = mmake<Text>(\"stdFont.ttf\");\n        shortcutLayer->layout = Layout::BothStretch(20, 1, 10, -1);\n        shortcutLayer->SetDrawable(shortcutLayerText);\n        shortcutLayerText->horAlign = HorAlign::Right;\n        shortcutLayerText->verAlign = VerAlign::Middle;\n        shortcutLayerText->color = Color4(96, 125, 139);\n        shortcutLayer->transparency = 0.7f;\n\n        Ref<WidgetLayer> subIconLayer = itemSample->FindLayer(\"subIcon\");\n        subIconLayer->SetDrawable(mmake<Sprite>(\"ui/UI4_Right_icn.png\"));\n        subIconLayer->layout = Layout(Vec2F(1.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(-15, 10), Vec2F(5, -10));\n\n        itemSample->AddLayer(\"check\", mmake<Sprite>(\"ui/UI4_Ckeck.png\"), \n                             Layout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(0, 0)));\n\n        Ref<WidgetLayer> basicLayer = itemSample->FindLayer(\"basic\");\n\n        itemSample->AddState(\"enabled\", AnimationClip::EaseInOut(\"layer/basic/transparency\", 0.5f, 1.0f, 0.2f));\n        itemSample->SetStateForcible(\"enabled\", true);\n\n        // Search panel\n        Ref<Widget> searchPanel = mmake<Widget>();\n        searchPanel->name = \"search panel\";\n        searchPanel->layout->minHeight = 25;\n        searchPanel->layout->minWidth = 200;\n        searchPanel->enabled = false;\n\n        searchPanel->AddLayer(\"search icon\", mmake<Sprite>(\"ui/UI4_search_regular.png\"),\n                              Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F()));\n\n        searchPanel->AddLayer(\"line\", mmake<Sprite>(\"ui/UI4_Separator.png\"),\n                              Layout::HorStretch(VerAlign::Bottom, 0, 0, 5, 0));\n\n        Ref<EditBox> searchEditBox = o2UI.CreateEditBox(\"singleline\");\n        *searchEditBox->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20);\n        searchPanel->AddChild(searchEditBox);\n\n        auto itemsLayout = sample->FindChildByType<VerticalLayout>();\n        itemsLayout->AddChild(searchPanel);\n\n        // Scrollbars\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        // States\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                                                              5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                                                              -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mSelectionDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f));\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildMenuPanelStyle()\n    {\n        auto sample = mmake<MenuPanel>();\n\n        sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Up_Menu.png\"), Layout::BothStretch(-15, -15, -15, -17));\n\n        Ref<Sprite> selection = mmake<Sprite>(\"ui/UI_ListBox_selection_hover.png\");\n        *sample->GetSelectionDrawable() = *selection;\n        sample->SetSelectionDrawableLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemSample = o2UI.CreateLabel(\"unknown\");\n        itemSample->horOverflow = Label::HorOverflow::Expand;\n        itemSample->expandBorder = Vec2F(10, 0);\n        itemSample->color = Color4(235, 255, 253);\n        sample->SetItemSample(itemSample);\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mSelectionDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f));\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildTreeStyle()\n    {\n        Ref<Tree> sample = mmake<Tree>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 5));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetChildsNodesOffset(10.0f);\n\n        *sample->GetHoverDrawable() = Sprite(\"ui/UI4_Context_menu_white.png\");\n\n        auto itemSample = sample->GetNodeSample();\n\n        auto itemSelectionLayer = itemSample->AddLayer(\"select\", nullptr);\n\n        auto itemFocusedLayer = itemSelectionLayer->AddChildLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Context_menu_select.png\"),\n                                                                  Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemUnfocusedLayer = itemSelectionLayer->AddChildLayer(\"unfocused\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                                                    Layout::BothStretch(-10, -16, -10, -16));\n\n        Ref<Text> captionLayerText = mmake<Text>(\"stdFont.ttf\");\n        captionLayerText->horAlign = HorAlign::Left;\n        captionLayerText->verAlign = VerAlign::Middle;\n        captionLayerText->color = Color4(96, 125, 139);\n        itemSample->AddLayer(\"name\", captionLayerText, Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(12, -20), Vec2F(0, 0)));\n\n        Ref<Button> itemSampleExpandBtn = mmake<Button>();\n        itemSampleExpandBtn->layout->minSize = Vec2F(5, 5);\n        itemSampleExpandBtn->name = \"expandBtn\";\n\n        auto regularLayer = itemSampleExpandBtn->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto hoverLayer = itemSampleExpandBtn->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"),\n                                                         Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = itemSampleExpandBtn->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        itemSampleExpandBtn->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        itemSampleExpandBtn->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->layout->anchorMin = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->anchorMax = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->offsetMin = Vec2F(0, -20);\n        itemSampleExpandBtn->layout->offsetMax = Vec2F(10, 0);\n\n        itemSample->AddChild(itemSampleExpandBtn);\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/pressed/mDrawable/angle\") = \n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        itemSample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        itemSample->AddState(\"selected\", AnimationClip::EaseInOut(\"layer/select/transparency\", 0.0f, 1.0f, 0.2f));\n\n        auto focusedItemAnim = AnimationClip::EaseInOut(\"layer/select/child/focused/transparency\", 0.0f, 1.0f, 0.2f);\n        *focusedItemAnim->AddTrack<float>(\"layer/select/child/unfocused/transparency\") = AnimationTrack<float>::EaseInOut(1.0f, 0.0f, 0.2f);\n        itemSample->AddState(\"focused\", focusedItemAnim);\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                                                              5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                                                              -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void BasicUIStyleBuilder::RebuildBacklessDropdown()\n    {\n        Ref<DropDown> sample = mmake<DropDown>();\n        sample->layout->minSize = Vec2F(20, 20);\n        auto arrowLayer = sample->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn_white.png\"),\n                                           Layout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(0, -1)));\n\n        sample->SetClippingLayout(Layout::BothStretch(4, 2, 20, 2));\n\n        auto list = sample->GetListView();\n        *list = *o2UI.GetWidgetStyle<CustomList>(\"standard\");\n\n        list->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        list->SetClippingLayout(Layout::BothStretch(0, 0, 0, 0));\n\n        list->RemoveLayer(\"back\");\n        list->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Context_menu.png\"), Layout::BothStretch(-22, -19, -19, -19));\n\n        list->layout->pivot = Vec2F(0.5f, 1.0f);\n        list->layout->anchorMin = Vec2F(0, 0);\n        list->layout->anchorMax = Vec2F(1, 0);\n        list->layout->offsetMin = Vec2F(0, -60);\n        list->layout->offsetMax = Vec2F(0, 0);\n\n        Ref<Label> itemSample = o2UI.CreateLabel(\"empty\");\n        itemSample->horAlign = HorAlign::Left;\n        sample->SetItemSample(itemSample);\n\n        // Selected text\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->horAlign = HorAlign::Left;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->wordWrap = false;\n        captionText->color = Color4(235, 255, 253);\n        sample->AddLayer(\"selectedText\", captionText, Layout::BothStretch(4, 0, 0, 0));\n\n        // States\n        sample->AddState(\"opened\", AnimationClip::EaseInOut(\"layer/arrow/mDrawable/scale\", Vec2F(1, 1), Vec2F(1, -1), 0.2f));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"backless\");\n    }\n\n    void BasicUIStyleBuilder::RebuildBacklessEditbox()\n    {\n        Ref<EditBox> sample = mmake<EditBox>();\n        sample->SetClippingLayout(Layout::BothStretch(0, 0, 0, 0));\n        sample->SetViewLayout(Layout::BothStretch(0, 0, 2, 0));\n        sample->SetCaretBlinkingDelay(1.15f);\n        sample->SetSelectionColor(Color4(0, 156, 141, 120));\n        sample->SetMultiLine(false);\n        sample->layout->minSize = Vec2F(30, 40);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        Ref<Text> textDrawable = sample->GetTextDrawable();\n        textDrawable->verAlign = VerAlign::Middle;\n        textDrawable->horAlign = HorAlign::Left;\n        textDrawable->color = Color4(96, 125, 139);\n        textDrawable->SetFontAsset(AssetRef<FontAsset>(\"stdFont.ttf\"));\n\n        Ref<Sprite> caretDrawable = sample->GetCaretDrawable();\n        *caretDrawable = Sprite();\n        caretDrawable->size = Vec2F(1, textDrawable->GetFont()->GetHeightPx(textDrawable->GetFontHeight())*1.7f);\n        caretDrawable->pivot = Vec2F(0, 0.26f);\n        caretDrawable->color = Color4::Black();\n\n        o2UI.AddWidgetStyle(sample, \"backless\");\n    }\n\n    void BasicUIStyleBuilder::RebuildBacklessMultilineEditbox()\n    {\n        Ref<EditBox> sample = mmake<EditBox>();\n        sample->SetClippingLayout(Layout::BothStretch(0, 0, 0, 0));\n        sample->SetViewLayout(Layout::BothStretch(0, 0, 2, 0));\n        sample->SetCaretBlinkingDelay(1.15f);\n        sample->SetSelectionColor(Color4(0, 156, 141, 120));\n        sample->layout->minSize = Vec2F(30, 40);\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        auto enableHorScrollAnim = mmake<AnimationClip>();\n        *enableHorScrollAnim->AddTrack<float>(\"mVerScrollBar/layout/offsetBottom\") =\n            AnimationTrack<float>::EaseInOut(5, 15, 0.2f);\n\n        *enableHorScrollAnim->AddTrack<Vec2F>(\"mViewAreaLayout/offsetMin\") =\n            AnimationTrack<Vec2F>::EaseInOut(Vec2F(5, 5), Vec2F(5, 15), 0.2f);\n\n        auto enableHorScrollState = sample->AddState(\"enableHorBar\", enableHorScrollAnim);\n\n        auto enableVerScrollAnim = mmake<AnimationClip>();\n        *enableVerScrollAnim->AddTrack<float>(\"mHorScrollBar/layout/offsetRight\") =\n            AnimationTrack<float>::EaseInOut(-5, -15, 0.2f);\n\n        *enableVerScrollAnim->AddTrack<Vec2F>(\"mViewAreaLayout/offsetMax\") =\n            AnimationTrack<Vec2F>::EaseInOut(Vec2F(-5, -5), Vec2F(-15, -5), 0.2f);\n\n        auto enableVerScrollState = sample->AddState(\"enableVerBar\", enableVerScrollAnim);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        Ref<Text> textDrawable = sample->GetTextDrawable();\n        textDrawable->verAlign = VerAlign::Top;\n        textDrawable->horAlign = HorAlign::Left;\n        textDrawable->color = Color4(96, 125, 139);\n        textDrawable->SetFontAsset(AssetRef<FontAsset>(\"stdFont.ttf\"));\n\n        Ref<Sprite> caretDrawable = sample->GetCaretDrawable();\n        *caretDrawable = Sprite();\n        caretDrawable->size = Vec2F(1, textDrawable->GetFont()->GetHeightPx(textDrawable->GetFontHeight())*1.7f);\n        caretDrawable->pivot = Vec2F(0, 0.16f);\n        caretDrawable->color = Color4::Black();\n\n        o2UI.AddWidgetStyle(sample, \"backless multiline\");\n    }\n\n    void BasicUIStyleBuilder::RebuildSinglelineEditbox()\n    {\n        Ref<EditBox> sample = mmake<EditBox>();\n        sample->SetClippingLayout(Layout::BothStretch(0, 0, 0, 0));\n        sample->SetViewLayout(Layout::BothStretch(3, 1, 3, -1));\n        sample->SetCaretBlinkingDelay(1.15f);\n        sample->SetMultiLine(false);\n        sample->SetSelectionColor(Color4(0, 156, 141, 120));\n        sample->layout->minSize = Vec2F(25, 25);\n\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto focusLayer = sample->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"), Layout::BothStretch(-9, -9, -9, -9));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto focusAnim = AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f);\n        *focusAnim->AddTrack<float>(\"layer/hover/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.05f);\n        sample->AddState(\"focused\", focusAnim)\n            ->offStateAnimationSpeed = 0.5f;\n\n        Ref<Text> textDrawable = sample->GetTextDrawable();\n        textDrawable->verAlign = VerAlign::Middle;\n        textDrawable->horAlign = HorAlign::Left;\n        textDrawable->color = Color4(96, 125, 139);\n        textDrawable->SetFontAsset(AssetRef<FontAsset>(\"stdFont.ttf\"));\n\n        Ref<Sprite> caretDrawable = sample->GetCaretDrawable();\n        *caretDrawable = Sprite();\n        caretDrawable->size = Vec2F(1, textDrawable->GetFont()->GetHeightPx(textDrawable->GetFontHeight())*1.7f);\n        caretDrawable->pivot = Vec2F(0, 0.26f);\n        caretDrawable->color = Color4::Black();\n\n        o2UI.AddWidgetStyle(sample, \"singleline\");\n    }\n\n    void BasicUIStyleBuilder::RebuildBacklessScrollarea()\n    {\n        Ref<ScrollArea> sample = mmake<ScrollArea>();\n        sample->layout->minSize = Vec2F(10, 10);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 5));\n        sample->SetEnableScrollsHiding(true);\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"backless\");\n    }\n\n    void BasicUIStyleBuilder::RebuildExpandButton()\n    {\n        auto sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n        sample->name = \"expandBtn\";\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn.png\"),\n                                             Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"),\n                                            Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"),\n                                             Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"layer/pressed/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        sample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        o2UI.AddWidgetStyle(sample, \"expand\");\n    }\n\n    void BasicUIStyleBuilder::RebuildExpandDownButton()\n    {\n        auto sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n        sample->name = \"expandBtn\";\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n                                             Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Down_icn_select.png\"),\n                                            Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Down_icn_pressed.png\"),\n                                             Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"expand down\");\n    }\n\n    void BasicUIStyleBuilder::RebuildExpandWhiteButton()\n    {\n        auto sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n        sample->name = \"expandBtn\";\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn_white.png\"),\n                                             Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_white_select.png\"),\n                                            Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_white_pressed.png\"),\n                                             Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"layer/pressed/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        sample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        o2UI.AddWidgetStyle(sample, \"expand white\");\n    }\n\n    void BasicUIStyleBuilder::RebuildSpoiler()\n    {\n        auto sample = mmake<Spoiler>();\n        sample->spacing = 5.0f;\n        sample->borderLeft = 10;\n        sample->expandHeight = false;\n        sample->expandWidth = true;\n        sample->fitByChildren = true;\n        sample->baseCorner = BaseCorner::RightTop;\n\n        Ref<Text> captionText        = mmake<Text>(\"stdFont.ttf\");\n        captionText->text        = \"Button\";\n        captionText->horAlign    = HorAlign::Left;\n        captionText->verAlign    = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->wordWrap = true;\n        captionText->color = Color4(96, 125, 139);\n        sample->AddLayer(\"caption\", captionText, Layout::HorStretch(VerAlign::Top, 11, 0, 20));\n\n        auto expandBtn = o2UI.CreateWidget<Button>(\"expand\");\n        *expandBtn->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-7, 0));\n        expandBtn->SetInternalParent(sample, false);\n\n        sample->SetHeadHeight(20);\n\n        o2UI.AddWidgetStyle(sample, \"expand with caption\");\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::BasicUIStyleBuilder, o2__BasicUIStyleBuilder);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/Style/BasicUIStyle.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class BasicUIStyleBuilder: public IObject\n    {\n    public:\n        void RebuildButtonStyle();\n        void RebuildCloseButtonStyle();\n        void RebuildArrowButtonStyle();\n        void RebuildHorSeparatorStyle();\n        void RebuildHorProgressBarStyle();\n        void RebuildVerProgressBarStyle();\n        void RebuildHorScrollBarStyle();\n        void RebuildVerScrollBarStyle();\n        void RebuildCheckboxStyle();\n        void RebuildCheckboxWithoutCaptionStyle();\n        void RebuildScrollAreaStyle();\n        void RebuildScrollAreaStraightBarsStyle();\n        void RebuildPopupStyle();\n        void RebuildLabelStyle();\n        void RebuildEditBoxStyle();\n        void RebuildCustomListStyle();\n        void RebuildLongListStyle();\n        void RebuildListStyle();\n        void RebuildCustomDropDownStyle();\n        void RebuildDropDownStyle();\n        void RebuildWindowStyle();\n        void RebuildTreeStyle();\n        void RebuildMenuPanelStyle();\n        void RebuildBacklessDropdown();\n        void RebuildBacklessEditbox();\n        void RebuildBacklessMultilineEditbox();\n        void RebuildSinglelineEditbox();\n        void RebuildBacklessScrollarea();\n        void RebuildContextMenuStyle();\n        void RebuildExpandButton();\n        void RebuildExpandDownButton();\n        void RebuildExpandWhiteButton();\n\t\tvoid RebuildSpoiler();\n\t\tvoid RebuildEditBoxDropDownStyle();\n\n        IOBJECT(BasicUIStyleBuilder);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::BasicUIStyleBuilder)\n{\n    BASE_CLASS(o2::IObject);\n}\nEND_META;\nCLASS_FIELDS_META(o2::BasicUIStyleBuilder)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::BasicUIStyleBuilder)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildButtonStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildCloseButtonStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildArrowButtonStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildHorSeparatorStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildHorProgressBarStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildVerProgressBarStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildHorScrollBarStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildVerScrollBarStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildCheckboxStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildCheckboxWithoutCaptionStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildScrollAreaStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildScrollAreaStraightBarsStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildPopupStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildLabelStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildEditBoxStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildCustomListStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildLongListStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildListStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildCustomDropDownStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildDropDownStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildWindowStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildTreeStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildMenuPanelStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildBacklessDropdown);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildBacklessEditbox);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildBacklessMultilineEditbox);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildSinglelineEditbox);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildBacklessScrollarea);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildContextMenuStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildExpandButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildExpandDownButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildExpandWhiteButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildSpoiler);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildEditBoxDropDownStyle);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/Style/EditorUIStyle.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"EditorUIStyle.h\"\n\n#include \"o2/Animation/Animate.h\"\n#include \"o2/Animation/Tracks/AnimationColor4Track.h\"\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Animation/Tracks/AnimationVec2FTrack.h\"\n#include \"o2/Assets/Types/AnimationAsset.h\"\n#include \"o2/Assets/Types/BinaryAsset.h\"\n#include \"o2/Assets/Types/DataAsset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/CustomDropDown.h\"\n#include \"o2/Scene/UI/Widgets/CustomList.h\"\n#include \"o2/Scene/UI/Widgets/DropDown.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalProgress.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/List.h\"\n#include \"o2/Scene/UI/Widgets/MenuPanel.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2/Scene/UI/Widgets/VerticalProgress.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n#include \"o2Editor/Windows/AnimationWindow/PropertiesListDlg.h\"\n#include \"o2Editor/Windows/AnimationWindow/Tree.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetIcon.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n#include \"o2Editor/Properties/Basic/ActorProperty.h\"\n#include \"o2Editor/Properties/Basic/AssetProperty.h\"\n#include \"o2Editor/Properties/Basic/BooleanProperty.h\"\n#include \"o2Editor/Properties/Basic/BorderFloatProperty.h\"\n#include \"o2Editor/Properties/Basic/BorderIntProperty.h\"\n#include \"o2Editor/Properties/Basic/ColorGradientProperty.h\"\n#include \"o2Editor/Properties/Basic/ColorProperty.h\"\n#include \"o2Editor/Properties/Basic/ComponentProperty.h\"\n#include \"o2Editor/Properties/Basic/CurveProperty.h\"\n#include \"o2Editor/Properties/Basic/EnumProperty.h\"\n#include \"o2Editor/Properties/Basic/FloatProperty.h\"\n#include \"o2Editor/Properties/Basic/IntegerProperty.h\"\n#include \"o2Editor/Properties/Basic/RectangleFloatProperty.h\"\n#include \"o2Editor/Properties/Basic/RectangleIntProperty.h\"\n#include \"o2Editor/Properties/Basic/SceneLayerRefProperty.h\"\n#include \"o2Editor/Properties/Basic/SceneLayersListProperty.h\"\n#include \"o2Editor/Properties/Basic/StringProperty.h\"\n#include \"o2Editor/Properties/Basic/TagProperty.h\"\n#include \"o2Editor/Properties/Basic/Vector2FloatProperty.h\"\n#include \"o2Editor/Properties/Basic/Vector2IntProperty.h\"\n#include \"o2Editor/Properties/Basic/WStringProperty.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n#include \"o2Editor/UI/Style/BasicUIStyle.h\"\n#include \"o2Editor/Windows/DockableWindow.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/AddComponentPanel.h\"\n#include \"o2Editor/Windows/TreeWindow/DrawOrderTree.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/MemoryAnalyzerWindow/MemoryAnalyzerWindow.h\"\n#include \"o2/Scene/UI/Widgets/EditBoxDropDown.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    void EditorUIStyleBuilder::RebuildDockableWndStyle()\n    {\n        Ref<DockableWindow> sample = mmake<DockableWindow>();\n        sample->layout->minSize = Vec2F(100, 50);\n        sample->SetClippingLayout(Layout::BothStretch(-1, 0, -2, 17));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 20));\n        sample->SetEnableScrollsHiding(true);\n\n        *sample->GetDockingFrameSample() = Sprite(\"ui/UI4_Window_place.png\");\n\n        // not tab back\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n\n        auto regularBackLayer = backLayer->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_window_frame_regular.png\"),\n                                                         Layout::BothStretch(-13, -13, -13, -11));\n\n        auto dockedBackLayer = backLayer->AddChildLayer(\"dockedBack\", mmake<Sprite>(\"ui/UI4_window_frame_docked.png\"),\n                                                        Layout::BothStretch(-13, -13, -13, -11));\n\n        auto iconLayer = backLayer->AddChildLayer(\"icon\", mmake<Sprite>(\"ui/UI4_o2_sign.png\"),\n                                                  Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-1, -1)));\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"Window\";\n        captionText->horAlign = HorAlign::Left;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        auto textLayer = backLayer->AddChildLayer(\"caption\", captionText,\n                                                  Layout::HorStretch(VerAlign::Top, 20, 35, 20, -2));\n\n        // tab head\n        auto tabBackLayer = sample->AddLayer(\"tab\", nullptr);\n\n        auto tabBackDown = tabBackLayer->AddChildLayer(\"back\", mmake<Sprite>(\"ui/UI4_window_frame_docked_tab.png\"),\n                                                       Layout::BothStretch(-13, -13, -13, -11));\n\n        auto tabBack = tabBackLayer->AddChildLayer(\"tabBack\", mmake<Sprite>(\"ui/UI4_window_frame_docked_tab_back.png\"),\n                                                   Layout::HorStretch(VerAlign::Top, -13, -13, 40, -11));\n\n        auto tabMain = tabBackLayer->AddChildLayer(\"main\", nullptr,\n                                                   Layout::HorStretch(VerAlign::Top, 0, 0, 19));\n\n        auto tabMainInactiveBack = tabMain->AddChildLayer(\"inactive\", mmake<Sprite>(\"ui/UI4_window_frame_docked_tab_inactive.png\"),\n                                                          Layout::HorStretch(VerAlign::Top, -13, -11, 40, -11));\n\n        auto tabMainActiveBack = tabMain->AddChildLayer(\"active\", mmake<Sprite>(\"ui/UI4_window_frame_docked_tab_active_back copy.png\"),\n                                                        Layout::HorStretch(VerAlign::Top, -13, -11, 40, -11));\n\n        auto tabIconLayer = tabMain->AddChildLayer(\"icon\", mmake<Sprite>(\"ui/UI4_o2_sign.png\"),\n                                                   Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-1, -1)));\n\n        Ref<Text> tabCaptionText = mmake<Text>(\"stdFont.ttf\");\n        tabCaptionText->text = \"Window\";\n        tabCaptionText->horAlign = HorAlign::Left;\n        tabCaptionText->verAlign = VerAlign::Middle;\n        tabCaptionText->dotsEngings = true;\n        auto tabTextLayer = tabMain->AddChildLayer(\"caption\", tabCaptionText,\n                                                   Layout::HorStretch(VerAlign::Top, 20, 10, 20, -2));\n\n\n        // scroll bars\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -20);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        //states\n        auto dockedStateAnim = mmake<AnimationClip>();\n        *dockedStateAnim->AddTrack<float>(\"layer/back/child/dockedBack/transparency\") = AnimationTrack<float>::EaseInOut(0, 1, 0.2f);\n        *dockedStateAnim->AddTrack<float>(\"layer/back/child/regularBack/transparency\") = AnimationTrack<float>::EaseInOut(1, 0, 0.2f);\n\n        auto dockedState = sample->AddState(\"docked\", dockedStateAnim);\n\n\n        auto tabStateAnim = mmake<AnimationClip>();\n        *tabStateAnim->AddTrack<float>(\"layer/tab/transparency\") = AnimationTrack<float>::EaseInOut(0, 1, 0.2f);\n        *tabStateAnim->AddTrack<float>(\"layer/back/transparency\") = AnimationTrack<float>::EaseInOut(1, 0, 0.2f);\n\n        auto tabbedState = sample->AddState(\"tab\", tabStateAnim);\n\n\n        auto tabActiveStateAnim = mmake<AnimationClip>();\n        *tabActiveStateAnim->AddTrack<float>(\"layer/tab/child/main/child/active/transparency\") = AnimationTrack<float>::EaseInOut(0, 1, 0.2f);\n        *tabActiveStateAnim->AddTrack<float>(\"layer/tab/child/main/child/inactive/transparency\") = AnimationTrack<float>::EaseInOut(1, 0, 0.2f);\n        *tabActiveStateAnim->AddTrack<float>(\"layer/tab/child/back/transparency\") = AnimationTrack<float>::EaseInOut(0, 1, 0.2f);\n\n        auto tabActiveState = sample->AddState(\"tabActive\", tabActiveStateAnim);\n\n\n        sample->AddState(\"tabFirst\", AnimationClip::EaseInOut(\"layer/tab/child/tabBack/transparency\", 0.0f, 1.0f, 0.2f));\n\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 2.0f;\n\n        // additional elements\n        Ref<Button> closeBtn = o2UI.CreateWidget<Button>(\"close\");\n        closeBtn->name = \"closeButton\";\n        *closeBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(0, 2));\n        sample->AddInternalWidget(closeBtn);\n\n        Ref<Button> optionsBtn = o2UI.CreateWidget<Button>(\"arrow\");\n        optionsBtn->name = \"optionsButton\";\n        *optionsBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(-16, 2));\n        sample->AddInternalWidget(optionsBtn);\n\n        // drag handles\n        sample->SetDragAreaLayouts(Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(5, -15), Vec2F(-5, -2)),    // head\n                                   Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(5, -2), Vec2F(-5, 5)),      // top\n                                   Layout(Vec2F(0, 0), Vec2F(1, 0), Vec2F(5, -5), Vec2F(-5, 5)),      // bottom\n                                   Layout(Vec2F(0, 0), Vec2F(0, 1), Vec2F(-5, 5), Vec2F(5, -5)),      // left\n                                   Layout(Vec2F(1, 0), Vec2F(1, 1), Vec2F(-5, 5), Vec2F(5, -5)),      // right\n                                   Layout(Vec2F(0, 1), Vec2F(0, 1), Vec2F(-5, -5), Vec2F(5, 5)),      // left top\n                                   Layout(Vec2F(1, 1), Vec2F(1, 1), Vec2F(-5, -5), Vec2F(5, 5)),      // right top\n                                   Layout(Vec2F(0, 0), Vec2F(0, 0), Vec2F(-5, -5), Vec2F(5, 5)),      // left bottom \n                                   Layout(Vec2F(1, 0), Vec2F(1, 0), Vec2F(-5, -5), Vec2F(5, 5)));     // right bottom\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildPlayStopButtonStyle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        auto playRootIconLayer = sample->AddLayer(\"playRootIcon\", nullptr);\n        auto stopRootIconLayer = sample->AddLayer(\"stopRootIcon\", nullptr);\n\n        auto playIconLayer = playRootIconLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_play_btn_regular.png\"),\n                                                              Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto playSelectIconLayer = playRootIconLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_play_btn_select.png\"),\n                                                                    Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto playPressedIconLayer = playRootIconLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_play_btn_pressed.png\"),\n                                                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto stopIconLayer = stopRootIconLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_stop_btn_regular.png\"),\n                                                              Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto stopSelectIconLayer = stopRootIconLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_stop_btn_select.png\"),\n                                                                    Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto stopPressedIconLayer = stopRootIconLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_stop_btn_pressed.png\"),\n                                                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto playBtnSelectAnim = AnimationClip::EaseInOut(\"layer/playRootIcon/child/hover/transparency\", 0.0f, 1.0f, 0.1f);\n        *playBtnSelectAnim->AddTrack<float>(\"layer/stopRootIcon/child/hover/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"hover\", playBtnSelectAnim)->offStateAnimationSpeed = 0.25f;\n\n        auto playBtnPressAnim = AnimationClip::EaseInOut(\"layer/playRootIcon/child/pressed/transparency\", 0.0f, 1.0f, 0.1f);\n        *playBtnPressAnim->AddTrack<float>(\"layer/stopRootIcon/child/pressed/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.05f);\n\n        sample->AddState(\"pressed\", playBtnPressAnim)->offStateAnimationSpeed = 0.5f;\n\n        auto valueBtnPressAnim = AnimationClip::EaseInOut(\"layer/playRootIcon/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnPressAnim->AddTrack<float>(\"layer/stopRootIcon/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnPressAnim);\n\n        o2UI.AddWidgetStyle(sample, \"play-stop\");\n    }\n\n    void EditorUIStyleBuilder::RebuildPauseButtonStyle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        auto pauseIconRootLayer = sample->AddLayer(\"regular\", nullptr);\n        auto pauseIconLayer = pauseIconRootLayer->AddChildLayer(\"icon\", mmake<Sprite>(\"ui/UI4_pause_btn_regular.png\"),\n                                                                Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f),\n                                                                Vec2F(-10, 10), Vec2F(10, -10)));\n\n        auto pauseSelectIconLayer = pauseIconRootLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_pause_btn_select.png\"),\n                                                                      Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f),\n                                                                      Vec2F(-10, 10), Vec2F(10, -10)));\n\n        auto pausePressedIconLayer = pauseIconRootLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_pause_btn_pressed.png\"),\n                                                                       Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f),\n                                                                       Vec2F(-10, 10), Vec2F(10, -10)));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/regular/child/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 0.25f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/regular/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.1f));\n\n        sample->AddState(\"value\", AnimationClip::EaseInOut(\"layer/regular/transparency\", 0.3f, 1.0f, 0.1f));\n\n        o2UI.AddWidgetStyle(sample, \"pause\");\n    }\n\n    void EditorUIStyleBuilder::RebuildStepButtonStyle()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->name = \"step button\";\n        auto stepIconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_step_btn_regular.png\"),\n                                              Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f),\n                                              Vec2F(-10, 10), Vec2F(10, -10)));\n\n        auto stepSelectIconLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_step_btn_select.png\"),\n                                                    Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f),\n                                                    Vec2F(-10, 10), Vec2F(10, -10)));\n\n        auto stepPressedIconLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_step_btn_pressed.png\"),\n                                                     Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f),\n                                                     Vec2F(-10, 10), Vec2F(10, -10)));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 0.25f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.1f));\n\n        o2UI.AddWidgetStyle(sample, \"step\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRoundDropDown()\n    {\n        Ref<DropDown> sample = mmake<DropDown>();\n        sample->layout->minSize = Vec2F(20, 20);\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_panel_subpanel_bk.png\"),\n                                          Layout::BothStretch(-7, -5, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_subpanel_select.png\"),\n                                            Layout::BothStretch(-7, -5, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_subpanel_pressed.png\"),\n                                             Layout::BothStretch(-7, -5, -5, -5));\n\n        auto arrowLayer = sample->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn_white.png\"),\n                                           Layout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-5, 0)));\n\n        sample->SetClippingLayout(Layout::BothStretch(10, 3, 20, 1));\n\n        auto list = sample->GetListView();\n        *list = *o2UI.GetWidgetStyle<CustomList>(\"standard\");\n\n        list->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        list->SetClippingLayout(Layout::BothStretch(0, 0, 0, 0));\n\n        list->RemoveLayer(\"back\");\n        list->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Context_menu.png\"), Layout::BothStretch(-21, -19, -19, -19));\n\n        list->layout->pivot = Vec2F(0.5f, 1.0f);\n        list->layout->anchorMin = Vec2F(0, 0);\n        list->layout->anchorMax = Vec2F(1, 0);\n        list->layout->offsetMin = Vec2F(0, -60);\n        list->layout->offsetMax = Vec2F(0, 0);\n\n        Ref<Label> itemSample = o2UI.CreateLabel(\"empty\");\n        itemSample->horAlign = HorAlign::Left;\n        sample->SetItemSample(itemSample);\n\n\n        // Selected text\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->horAlign = HorAlign::Left;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->wordWrap = false;\n        captionText->color = Color4(235, 255, 253);\n        sample->AddLayer(\"selectedText\", captionText, Layout::BothStretch(7, 0, 0, 0));\n\n        // States\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"opened\", AnimationClip::EaseInOut(\"layer/arrow/mDrawable/scale\", Vec2F(1, 1), Vec2F(1, -1), 0.2f));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"round\");\n    }\n\n    void EditorUIStyleBuilder::RebuildMenuPanelDropDown()\n    {\n        Ref<DropDown> sample = mmake<DropDown>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -5, -5, -5));\n\n        auto arrowLayer = sample->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n                                           Layout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(0, 0)));\n\n        sample->SetClippingLayout(Layout::BothStretch(10, 3, 20, 1));\n\n        auto list = sample->GetListView();\n        *list = *o2UI.GetWidgetStyle<CustomList>(\"standard\");\n\n        list->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        list->SetClippingLayout(Layout::BothStretch(0, 0, 0, 0));\n\n        list->RemoveLayer(\"back\");\n        list->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Context_menu.png\"), Layout::BothStretch(-21, -19, -19, -19));\n\n        list->layout->pivot = Vec2F(0.5f, 1.0f);\n        list->layout->anchorMin = Vec2F(0, 0);\n        list->layout->anchorMax = Vec2F(1, 0);\n        list->layout->offsetMin = Vec2F(0, -60);\n        list->layout->offsetMax = Vec2F(0, 0);\n\n        Ref<Label> itemSample = o2UI.CreateLabel(\"empty\");\n        itemSample->horAlign = HorAlign::Left;\n        sample->SetItemSample(itemSample);\n\n\n        // Selected text\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->horAlign = HorAlign::Left;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->wordWrap = false;\n        captionText->color = Color4(96, 125, 139);\n        sample->AddLayer(\"selectedText\", captionText, Layout::BothStretch(7, 0, 0, 0));\n\n        // States\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"opened\", AnimationClip::EaseInOut(\"layer/arrow/mDrawable/scale\", Vec2F(1, 1), Vec2F(1, -1), 0.2f));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"menu panel\");\n    }\n\n    void EditorUIStyleBuilder::RebuildSearchButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_search_regular.png\"),\n                                             Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_search_select.png\"),\n                                            Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_search_pressed.png\"),\n                                             Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"search\");\n    }\n\n    void EditorUIStyleBuilder::RebuildListTreeToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto listLayer = sample->AddLayer(\"listIcon\", mmake<Sprite>(\"ui/UI4_list_icon.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n        auto treeLayer = sample->AddLayer(\"treeIcon\", mmake<Sprite>(\"ui/UI4_tree_icon.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto valueBtnAnim = AnimationClip::EaseInOut(\"layer/treeIcon/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnAnim->AddTrack<float>(\"layer/listIcon/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnAnim);\n\n        o2UI.AddWidgetStyle(sample, \"list-tree\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRevertBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n        auto rootLayer = sample->AddLayer(\"root\", nullptr);\n        auto selectLayer = rootLayer->AddChildLayer(\"hover\", nullptr);\n        auto iconLayer = selectLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_revert.png\"),\n                                                    Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedIconLayer = selectLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_revert.png\"),\n                                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/root/child/hover/transparency\", 1.0f, 0.5f, 0.1f))\n            ->offStateAnimationSpeed = 0.25f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/root/child/hover/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.1f));\n\n        o2UI.AddWidgetStyle(sample, \"revert\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorsTreeNodeEnableToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n\n        auto halfHideLayer = sample->AddLayer(\"halfHide\", nullptr);\n\n        auto back = halfHideLayer->AddChildLayer(\"back\", mmake<Sprite>(\"ui/UI4_off_dot.png\"),\n                                                 Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n        auto dot = halfHideLayer->AddChildLayer(\"dot\", mmake<Sprite>(\"ui/UI4_on_dot.png\"),\n                                                Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.1f));\n\n        auto valueAnim = AnimationClip::EaseInOut(\"layer/halfHide/child/dot/transparency\", 0.0f, 1.0f, 0.1f);\n        *valueAnim->AddTrack<float>(\"layer/halfHide/child/back/transparency\") = AnimationTrack<float>::EaseInOut(1.0f, 0.0f, 0.1f);\n        sample->AddState(\"value\", valueAnim);\n\n        sample->AddState(\"halfHide\", AnimationClip::EaseInOut(\"layer/halfHide/transparency\", 1.0f, 0.5f, 0.1f));\n\n        o2UI.AddWidgetStyle(sample, \"actor node enable\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorsTreeLockToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n\n        auto halfHideLayer = sample->AddLayer(\"halfHide\", nullptr);\n\n        auto locked = halfHideLayer->AddChildLayer(\"locked\", mmake<Sprite>(\"ui/UI4_lock_icon.png\"),\n                                                   Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n        auto unlocked = halfHideLayer->AddChildLayer(\"unlocked\", mmake<Sprite>(\"ui/UI4_unlock_icon.png\"),\n                                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.1f));\n\n        auto valueStateAnim = AnimationClip::EaseInOut(\"layer/halfHide/child/locked/transparency\", 0.0f, 1.0f, 0.1f);\n        *valueStateAnim->AddTrack<float>(\"layer/halfHide/child/unlocked/transparency\") = AnimationTrack<float>::EaseInOut(1.0f, 0.0f, 0.1f);\n        sample->AddState(\"locked\", valueStateAnim);\n\n        sample->AddState(\"halfHide\", AnimationClip::EaseInOut(\"layer/halfHide/transparency\", 1.0f, 0.5f, 0.1f));\n\n        o2UI.AddWidgetStyle(sample, \"actor node lock\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorsTreeLinkBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n\n        auto halfHideLayer = sample->AddLayer(\"halfHide\", nullptr);\n        auto selectLayer = halfHideLayer->AddChildLayer(\"hover\", nullptr);\n        auto pressedLayer = selectLayer->AddChildLayer(\"pressed\", nullptr);\n        auto back = pressedLayer->AddChildLayer(\"back\", mmake<Sprite>(\"ui/UI4_link_icon.png\"),\n                                                Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.1f));\n        sample->AddState(\"halfHide\", AnimationClip::EaseInOut(\"layer/halfHide/transparency\", 1.0f, 0.5f, 0.1f));\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/halfHide/child/hover/transparency\", 1.0f, 0.5f, 0.1f));\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/halfHide/child/hover/child/pressed/transparency\", 0.8f, 1.0f, 0.1f));\n\n        o2UI.AddWidgetStyle(sample, \"actor node link\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorsTree()\n    {\n        // basics\n        auto sample = mmake<SceneHierarchyTree>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 0, 1));\n        sample->SetViewLayout(Layout::BothStretch(0, 0, 1, 0));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetChildsNodesOffset(10);\n\n        // hover\n        *sample->GetHoverDrawable() = Sprite(\"ui/UI4_Context_menu_white.png\");\n        sample->SetHoverLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        // highlight\n        *sample->GetHighlightDrawable() = Sprite(\"ui/UI4_selection_frame.png\");\n        sample->GetHighlightDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        sample->SetHighlightLayout(Layout::BothStretch());\n\n        sample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n\n        // node sample\n        Ref<TreeNode> itemSample = sample->GetNodeSample();\n\n        auto itemSelectionLayer = itemSample->AddLayer(\"select\", nullptr);\n\n        auto itemFocusedLayer = itemSelectionLayer->AddChildLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Context_menu_select.png\"),\n                                                                  Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemUnfocusedLayer = itemSelectionLayer->AddChildLayer(\"unfocused\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                                                    Layout::BothStretch(-10, -16, -10, -16));\n\n        Ref<Text> captionLayerText = mmake<Text>(\"stdFont.ttf\");\n        captionLayerText->horAlign = HorAlign::Left;\n        captionLayerText->verAlign = VerAlign::Middle;\n        captionLayerText->color = Color4(96, 125, 139);\n        itemSample->AddLayer(\"name\", captionLayerText, Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(14, -20), Vec2F(0, 0)));\n\n        auto nameLayer = itemSample->layer[\"name\"];\n        nameLayer->layout = Layout::BothStretch(15, 0, 55, 0);\n        DynamicCast<Text>(nameLayer->GetDrawable())->dotsEngings = true;\n\n        auto actorNodeEnableToggle = o2UI.CreateWidget<Toggle>(\"actor node enable\");\n        actorNodeEnableToggle->name = \"enableToggle\";\n        *actorNodeEnableToggle->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-5, 0));\n        itemSample->AddChild(actorNodeEnableToggle);\n\n        auto actorNodeLockToggle = o2UI.CreateWidget<Toggle>(\"actor node lock\");\n        actorNodeLockToggle->name = \"lockToggle\";\n        *actorNodeLockToggle->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-20, 0));\n        itemSample->AddChild(actorNodeLockToggle);\n\n        auto actorNodeLinkButton = o2UI.CreateWidget<Button>(\"actor node link\");\n        actorNodeLinkButton->name = \"linkBtn\";\n        *actorNodeLinkButton->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-35, 0));\n        itemSample->AddChild(actorNodeLinkButton);\n\n        auto actorNodeEditBox = o2UI.CreateWidget<EditBox>(\"backless\");\n        actorNodeEditBox->name = \"nameEditBox\";\n        *actorNodeEditBox->layout = WidgetLayout::BothStretch(15, 0, 55, 0);\n        actorNodeEditBox->Hide(true);\n        itemSample->AddChild(actorNodeEditBox);\n\n        auto itemEditStateAnim = AnimationClip::EaseInOut(\"layer/name/transparency\", 1.0f, 0.0f, 0.15f);\n        *itemEditStateAnim->AddTrack<bool>(\"child/nameEditBox/enabled\") = AnimationTrack<bool>::Linear(false, true, 0.15f);\n        itemSample->AddState(\"edit\", itemEditStateAnim);\n\n        // node sample button\n        Ref<Button> itemSampleExpandBtn = mmake<Button>();\n        itemSampleExpandBtn->layout->minSize = Vec2F(5, 5);\n        itemSampleExpandBtn->name = \"expandBtn\";\n\n        auto regularLayer = itemSampleExpandBtn->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = itemSampleExpandBtn->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"),\n                                                         Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = itemSampleExpandBtn->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        itemSampleExpandBtn->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        itemSampleExpandBtn->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->layout->anchorMin = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->anchorMax = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->offsetMin = Vec2F(2, -20);\n        itemSampleExpandBtn->layout->offsetMax = Vec2F(12, 0);\n\n        itemSample->AddChild(itemSampleExpandBtn);\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/pressed/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        itemSample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        itemSample->AddState(\"selected\", AnimationClip::EaseInOut(\"layer/select/transparency\", 0.0f, 1.0f, 0.2f));\n\n        auto focusedItemAnim = AnimationClip::EaseInOut(\"layer/select/child/focused/transparency\", 0.0f, 1.0f, 0.2f);\n        *focusedItemAnim->AddTrack<float>(\"layer/select/child/unfocused/transparency\") = AnimationTrack<float>::EaseInOut(0.3f, 0.0f, 0.2f);\n        itemSample->AddState(\"focused\", focusedItemAnim);\n\n        // scrollbars\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                         5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                         -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->SetStateForcible(\"hover\", false);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f));\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildDrawOrderTree()\n    {\n        // basics\n        auto sample = mmake<DrawOrderTree>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 0, 1));\n        sample->SetViewLayout(Layout::BothStretch(0, 0, 1, 0));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetChildsNodesOffset(10);\n\n        // hover\n        *sample->GetHoverDrawable() = Sprite(\"ui/UI4_Context_menu_white.png\");\n        sample->SetHoverLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        // highlight\n        *sample->GetHighlightDrawable() = Sprite(\"ui/UI4_selection_frame.png\");\n        sample->GetHighlightDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        sample->SetHighlightLayout(Layout::BothStretch());\n\n        sample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n\n        // node sample\n        Ref<TreeNode> itemSample = sample->GetNodeSample();\n\n        auto itemSelectionLayer = itemSample->AddLayer(\"select\", nullptr);\n\n        auto itemFocusedLayer = itemSelectionLayer->AddChildLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Context_menu_select.png\"),\n                                                                  Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemUnfocusedLayer = itemSelectionLayer->AddChildLayer(\"unfocused\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                                                    Layout::BothStretch(-10, -16, -10, -16));\n\n        itemSample->AddLayer(\"back\", mmake<Sprite>(), Layout::BothStretch())->transparency = 0.15f;\n\n        itemSample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_folder_icon_dark.png\"), Layout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(13, 0)));\n\n        Ref<Text> captionLayerText = mmake<Text>(\"stdFont.ttf\");\n        captionLayerText->horAlign = HorAlign::Left;\n        captionLayerText->verAlign = VerAlign::Middle;\n        captionLayerText->color = Color4(96, 125, 139);\n        captionLayerText->dotsEngings = true;\n        itemSample->AddLayer(\"name\", captionLayerText, Layout::BothStretch(33, 0, 100, 0));\n\n        Ref<Text> batchLayerText = mmake<Text>(\"stdFont.ttf\");\n        batchLayerText->horAlign = HorAlign::Right;\n        batchLayerText->verAlign = VerAlign::Middle;\n        batchLayerText->color = Color4(96, 125, 139);\n        batchLayerText->dotsEngings = true;\n        batchLayerText->height = 8;\n        batchLayerText->transparency = 0.6f;\n        itemSample->AddLayer(\"batch\", batchLayerText, Layout::VerStretch(HorAlign::Right, 0, 0, 75, 40));\n\n        auto actorNodeEnableToggle = o2UI.CreateWidget<Toggle>(\"actor node enable\");\n        actorNodeEnableToggle->name = \"enableToggle\";\n        *actorNodeEnableToggle->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-5, 0));\n        itemSample->AddChild(actorNodeEnableToggle);\n\n        auto actorNodeLockToggle = o2UI.CreateWidget<Toggle>(\"actor node lock\");\n        actorNodeLockToggle->name = \"lockToggle\";\n        *actorNodeLockToggle->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-20, 0));\n        itemSample->AddChild(actorNodeLockToggle);\n\n        auto actorNodeLinkButton = o2UI.CreateWidget<Button>(\"actor node link\");\n        actorNodeLinkButton->name = \"linkBtn\";\n        *actorNodeLinkButton->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-35, 0));\n        itemSample->AddChild(actorNodeLinkButton);\n\n        auto actorNodeEditBox = o2UI.CreateWidget<EditBox>(\"backless\");\n        actorNodeEditBox->name = \"nameEditBox\";\n        *actorNodeEditBox->layout = WidgetLayout::BothStretch(15, 0, 55, 0);\n        actorNodeEditBox->Hide(true);\n        itemSample->AddChild(actorNodeEditBox);\n\n        auto itemEditStateAnim = AnimationClip::EaseInOut(\"layer/name/transparency\", 1.0f, 0.0f, 0.15f);\n        *itemEditStateAnim->AddTrack<bool>(\"child/nameEditBox/enabled\") = AnimationTrack<bool>::Linear(false, true, 0.15f);\n        itemSample->AddState(\"edit\", itemEditStateAnim);\n\n        // node sample button\n        Ref<Button> itemSampleExpandBtn = mmake<Button>();\n        itemSampleExpandBtn->layout->minSize = Vec2F(5, 5);\n        itemSampleExpandBtn->name = \"expandBtn\";\n\n        auto regularLayer = itemSampleExpandBtn->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = itemSampleExpandBtn->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"),\n                                                         Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = itemSampleExpandBtn->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        itemSampleExpandBtn->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        itemSampleExpandBtn->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->layout->anchorMin = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->anchorMax = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->offsetMin = Vec2F(2, -20);\n        itemSampleExpandBtn->layout->offsetMax = Vec2F(12, 0);\n\n        itemSample->AddChild(itemSampleExpandBtn);\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/pressed/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        itemSample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        itemSample->AddState(\"selected\", AnimationClip::EaseInOut(\"layer/select/transparency\", 0.0f, 1.0f, 0.2f));\n\n        auto focusedItemAnim = AnimationClip::EaseInOut(\"layer/select/child/focused/transparency\", 0.0f, 1.0f, 0.2f);\n        *focusedItemAnim->AddTrack<float>(\"layer/select/child/unfocused/transparency\") = AnimationTrack<float>::EaseInOut(0.3f, 0.0f, 0.2f);\n        itemSample->AddState(\"focused\", focusedItemAnim);\n\n        // scrollbars\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                                                                  5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                                                                  -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->SetStateForcible(\"hover\", false);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f));\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildPanelDownButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -3, -5, -4));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -3, -5, -4));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -3, -5, -4));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto arrowLayer = sample->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n                                           Layout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(0, 0)));\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"Button\";\n        captionText->horAlign = HorAlign::Middle;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->color = Color4(96, 125, 139);\n        sample->AddLayer(\"caption\", captionText, Layout::BothStretch(0, 0, 15, 0));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"panel down\");\n    }\n\n    void EditorUIStyleBuilder::RebuildTrashDownPanelButton()\n    {\n        auto sample = mmake<Button>();\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -5, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -5, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -5, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto trashIconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_small_trash_icon.png\"),\n                                               Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"down panel trash\");\n    }\n\n    void EditorUIStyleBuilder::RebuildMessagesDownPanelToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -5, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -5, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -5, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto offLayer = sample->AddLayer(\"off\", mmake<Sprite>(\"ui/UI4_log_info_inactive_icon.png\"),\n                                         Layout::Based(BaseCorner::Left, Vec2F(30, 30), Vec2F(-4, -2)));\n\n        auto onLayer = sample->AddLayer(\"on\", mmake<Sprite>(\"ui/UI4_log_info_icon.png\"),\n                                        Layout::Based(BaseCorner::Left, Vec2F(30, 30), Vec2F(-4, -2)));\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"999\";\n        captionText->horAlign = HorAlign::Middle;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->color = Color4(96, 125, 139);\n        sample->AddLayer(\"caption\", captionText, Layout::BothStretch(13, 0, 0, 0));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto valueBtnAnim = AnimationClip::EaseInOut(\"layer/off/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnAnim->AddTrack<float>(\"layer/on/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnAnim);\n\n        o2UI.AddWidgetStyle(sample, \"log messages\");\n    }\n\n    void EditorUIStyleBuilder::RebuildWarningsDownPanelToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -5, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -5, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -5, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto offLayer = sample->AddLayer(\"off\", mmake<Sprite>(\"ui/UI4_log_warnings_inactive_icon.png\"),\n                                         Layout::Based(BaseCorner::Left, Vec2F(30, 30), Vec2F(-4, -2)));\n\n        auto onLayer = sample->AddLayer(\"on\", mmake<Sprite>(\"ui/UI4_log_warnings_icon.png\"),\n                                        Layout::Based(BaseCorner::Left, Vec2F(30, 30), Vec2F(-4, -2)));\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"999\";\n        captionText->horAlign = HorAlign::Middle;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->color = Color4(96, 125, 139);\n        sample->AddLayer(\"caption\", captionText, Layout::BothStretch(13, 0, 0, 0));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto valueBtnAnim = AnimationClip::EaseInOut(\"layer/off/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnAnim->AddTrack<float>(\"layer/on/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnAnim);\n\n        o2UI.AddWidgetStyle(sample, \"log warnings\");\n    }\n\n    void EditorUIStyleBuilder::RebuildErrorsDownPanelToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -5, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -5, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -5, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto offLayer = sample->AddLayer(\"off\", mmake<Sprite>(\"ui/UI4_log_errors_inactive_icon.png\"),\n                                         Layout::Based(BaseCorner::Left, Vec2F(30, 30), Vec2F(-4, -2)));\n\n        auto onLayer = sample->AddLayer(\"on\", mmake<Sprite>(\"ui/UI4_log_errors_icon.png\"),\n                                        Layout::Based(BaseCorner::Left, Vec2F(30, 30), Vec2F(-4, -2)));\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"999\";\n        captionText->horAlign = HorAlign::Middle;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->color = Color4(96, 125, 139);\n        sample->AddLayer(\"caption\", captionText, Layout::BothStretch(13, 0, 0, 0));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto valueBtnAnim = AnimationClip::EaseInOut(\"layer/off/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnAnim->AddTrack<float>(\"layer/on/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnAnim);\n\n        o2UI.AddWidgetStyle(sample, \"log errors\");\n    }\n\n    void EditorUIStyleBuilder::RebuildFilterMenuButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_filter_icon.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(1, 0)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"menu filter\");\n    }\n\n    void EditorUIStyleBuilder::RebuildTreeMenuButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -5, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -5, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -5, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_tree_icon.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"menu tree\");\n    }\n\n    void EditorUIStyleBuilder::RebuildFoldersTree()\n    {\n        // basics\n        Ref<Tree> sample = mmake<Tree>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 0, 1));\n        sample->SetViewLayout(Layout::BothStretch(0, 0, 1, 0));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetChildsNodesOffset(10);\n\n        // hover\n        *sample->GetHoverDrawable() = Sprite(\"ui/UI4_Context_menu_white.png\");\n        sample->SetHoverLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        // highlight\n        *sample->GetHighlightDrawable() = Sprite(\"ui/UI4_selection_frame.png\");\n        sample->GetHighlightDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        sample->SetHighlightLayout(Layout::BothStretch());\n        sample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n\n        // node sample\n        Ref<TreeNode> itemSample = sample->GetNodeSample();\n\n        auto itemSelectionLayer = itemSample->AddLayer(\"select\", nullptr);\n\n        auto itemFocusedLayer = itemSelectionLayer->AddChildLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Context_menu_select.png\"),\n                                                                  Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemUnfocusedLayer = itemSelectionLayer->AddChildLayer(\"unfocused\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                                                    Layout::BothStretch(-10, -16, -10, -16));\n\n        itemSample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_folder_icon_dark.png\"), Layout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(10, 0)));\n\n        Ref<Text> captionLayerText = mmake<Text>(\"stdFont.ttf\");\n        captionLayerText->horAlign = HorAlign::Left;\n        captionLayerText->verAlign = VerAlign::Middle;\n        captionLayerText->color = Color4(96, 125, 139);\n        captionLayerText->dotsEngings = true;\n        itemSample->AddLayer(\"name\", captionLayerText, Layout::BothStretch(30, 0, 5, 0));\n\n        auto actorNodeEditBox = o2UI.CreateWidget<EditBox>(\"backless\");\n        actorNodeEditBox->name = \"nameEditBox\";\n        *actorNodeEditBox->layout = WidgetLayout::BothStretch(30, 0, 5, 0);\n        actorNodeEditBox->Hide(true);\n        itemSample->AddChild(actorNodeEditBox);\n\n        auto itemEditStateAnim = AnimationClip::EaseInOut(\"layer/name/transparency\", 1.0f, 0.0f, 0.15f);\n        *itemEditStateAnim->AddTrack<bool>(\"child/nameEditBox/enabled\") = AnimationTrack<bool>::Linear(false, true, 0.15f);\n        itemSample->AddState(\"edit\", itemEditStateAnim);\n\n        // node sample button\n        Ref<Button> itemSampleExpandBtn = mmake<Button>();\n        itemSampleExpandBtn->layout->minSize = Vec2F(5, 5);\n        itemSampleExpandBtn->name = \"expandBtn\";\n\n        auto regularLayer = itemSampleExpandBtn->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = itemSampleExpandBtn->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"),\n                                                         Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = itemSampleExpandBtn->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        itemSampleExpandBtn->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        itemSampleExpandBtn->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->layout->anchorMin = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->anchorMax = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->offsetMin = Vec2F(0, -20);\n        itemSampleExpandBtn->layout->offsetMax = Vec2F(10, 0);\n\n        itemSample->AddChild(itemSampleExpandBtn);\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/pressed/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        itemSample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        itemSample->AddState(\"selected\", AnimationClip::EaseInOut(\"layer/select/transparency\", 0.0f, 1.0f, 0.2f));\n\n        auto focusedItemAnim = AnimationClip::EaseInOut(\"layer/select/child/focused/transparency\", 0.0f, 1.0f, 0.2f);\n        *focusedItemAnim->AddTrack<float>(\"layer/select/child/unfocused/transparency\") = AnimationTrack<float>::EaseInOut(0.3f, 0.0f, 0.2f);\n        itemSample->AddState(\"focused\", focusedItemAnim);\n\n        // scrollbars\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                         5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                         -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->SetStateForcible(\"hover\", false);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5;\n\n        o2UI.AddWidgetStyle(sample, \"folders\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRegularAssetIcon()\n    {\n        Ref<AssetIcon> sample = mmake<AssetIcon>();\n        sample->layout->minSize = Vec2F(50, 60);\n\n        // selection layer\n        auto itemSelectionLayer = sample->AddLayer(\"select\", nullptr);\n\n        auto itemFocusedLayer = itemSelectionLayer->AddChildLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Context_menu_select.png\"),\n                                                                  Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemUnfocusedLayer = itemSelectionLayer->AddChildLayer(\"unfocused\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                                                    Layout::BothStretch(-10, -16, -10, -16));\n\n        // icon\n        sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_big_file_icon.png\"),\n                         Layout::Based(BaseCorner::Center, Vec2F(40, 40), Vec2F(0, 10)));\n\n        // hover\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                           Layout::BothStretch(-10, -16, -10, -16));\n\n        // name label\n        Ref<Label> nameLabel = o2UI.CreateLabel(\"file name\");\n        nameLabel->name = \"nameLabel\";\n        *nameLabel->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 25, 0);\n        nameLabel->height = 8;\n        nameLabel->linesDistanceCoef = 0.7f;\n        nameLabel->horAlign = HorAlign::Middle;\n        nameLabel->verAlign = VerAlign::Top;\n        nameLabel->horOverflow = Label::HorOverflow::Wrap;\n        nameLabel->verOverflow = Label::VerOverflow::Cut;\n        sample->AddChild(nameLabel);\n\n        // edit box\n        Ref<EditBox> nameEditBox = mmake<EditBox>();\n        nameEditBox->SetClippingLayout(Layout::BothStretch(0, 0, 0, 0));\n        nameEditBox->SetViewLayout(Layout::BothStretch(0, 0, 2, 0));\n        nameEditBox->SetCaretBlinkingDelay(1.15f);\n        nameEditBox->SetSelectionColor(Color4(0, 156, 141, 120));\n        nameEditBox->SetMultiLine(false);\n\n        Ref<Text> textDrawable = nameEditBox->GetTextDrawable();\n        textDrawable->SetFontAsset(AssetRef<FontAsset>(\"stdFont.ttf\"));\n        textDrawable->height = 8;\n        textDrawable->color = Color4(96, 125, 139);\n\n        Ref<Sprite> caretDrawable = nameEditBox->GetCaretDrawable();\n        *caretDrawable = Sprite();\n        caretDrawable->size = Vec2F(1, textDrawable->GetFont()->GetHeightPx(textDrawable->GetFontHeight()) * 1.7f);\n        caretDrawable->pivot = Vec2F(0, 0.26f);\n        caretDrawable->color = Color4::Black();\n\n        nameEditBox->name = \"nameEditBox\";\n        *nameEditBox->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 22, 0);\n        sample->AddChild(nameEditBox);\n\n        // edit state\n        auto itemEditStateAnim = AnimationClip::EaseInOut(\"child/nameLabel/enabled\", true, false, 0.15f);\n        *itemEditStateAnim->AddTrack<bool>(\"child/nameEditBox/enabled\") = AnimationTrack<bool>::Linear(false, true, 0.15f);\n        sample->AddState(\"edit\", itemEditStateAnim);\n\n        // focused state\n        auto focusedItemAnim = AnimationClip::EaseInOut(\"layer/select/child/focused/transparency\", 0.0f, 1.0f, 0.2f);\n        *focusedItemAnim->AddTrack<float>(\"layer/select/child/unfocused/transparency\") = AnimationTrack<float>::EaseInOut(0.3f, 0.0f, 0.2f);\n        sample->AddState(\"focused\", focusedItemAnim);\n\n        sample->AddState(\"halfHide\", AnimationClip::EaseInOut(\"transparency\", 1.0f, 0.5f, 0.1f));\n        sample->AddState(\"selected\", AnimationClip::EaseInOut(\"layer/select/transparency\", 0.0f, 1.0f, 0.2f));\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f));\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAssetsGridScroll()\n    {\n        auto sample = mmake<AssetsIconsScrollArea>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 1, 1));\n        sample->SetViewLayout(Layout::BothStretch(5, 5, 5, 5));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetItemSample(o2UI.CreateWidget<AssetIcon>());\n        sample->SetItemsSpacing(Vec2F(5, 5));\n\n        // highlight\n        *sample->GetHighlightDrawable() = Sprite(\"ui/UI4_selection_frame.png\");\n        sample->GetHighlightDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        sample->SetHighlightLayout(Layout::BothStretch());\n        sample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n\n        // selection\n        *sample->GetSelectingDrawable() = Sprite(\"ui/UI4_selection_frame.png\");\n\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildLinkBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n\n        auto halfHideLayer = sample->AddLayer(\"halfHide\", nullptr);\n        auto selectLayer = halfHideLayer->AddChildLayer(\"hover\", nullptr);\n        auto pressedLayer = selectLayer->AddChildLayer(\"pressed\", nullptr);\n        auto back = pressedLayer->AddChildLayer(\"back\", mmake<Sprite>(\"ui/UI4_link_icon.png\"),\n                                                Layout::Based(BaseCorner::Center, Vec2F(15, 15), Vec2F(0, 0)));\n\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.1f));\n        sample->AddState(\"halfHide\", AnimationClip::EaseInOut(\"layer/halfHide/transparency\", 1.0f, 0.5f, 0.1f));\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/halfHide/child/hover/transparency\", 1.0f, 0.5f, 0.1f));\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/halfHide/child/hover/child/pressed/transparency\", 0.8f, 1.0f, 0.1f));\n\n        o2UI.AddWidgetStyle(sample, \"asset link\");\n    }\n\n    void EditorUIStyleBuilder::RebuildSinglelineEditboxProperty()\n    {\n        Ref<EditBox> sample = o2UI.CreateWidget<EditBox>(\"singleline\");\n        sample->SetClippingLayout(Layout::BothStretch(0, 0, 10, 0));\n        sample->SetViewLayout(Layout::BothStretch(3, 1, 8, -1));\n\n        sample->AddLayer(\"arrows\", mmake<Sprite>(\"ui/UI4_ch_arrows.png\"),\n                         Layout::Based(BaseCorner::Right, Vec2F(10, 20), Vec2F(0, 0)));\n\n        o2UI.AddWidgetStyle(sample, \"singleline with arrows\");\n    }\n\n    void EditorUIStyleBuilder::RebuildEditorDropdown()\n    {\n        auto sample = mmake<Widget>();\n\n        Ref<DropDown> dropdown = mmake<DropDown>();\n        *dropdown->layout = WidgetLayout::BothStretch(0, 0, 20, 0);\n        dropdown->name = \"dropdown\";\n        auto backLayer = dropdown->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto selectLayer = dropdown->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto pressedLayer = dropdown->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Editbox_pressed.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto arrowLayer = dropdown->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n                                             Layout(Vec2F(1.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(-20, -10), Vec2F(0, 10)));\n\n        dropdown->SetClippingLayout(Layout::BothStretch(4, 2, 20, 2));\n\n        auto list = dropdown->GetListView();\n        *list = *o2UI.GetWidgetStyle<CustomList>(\"standard\");\n        list->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        list->layer[\"back\"]->SetDrawable(mmake<Sprite>(\"ui/UI4_Box_regular.png\"));\n        list->layout->pivot = Vec2F(0.5f, 1.0f);\n        list->layout->anchorMin = Vec2F(0, 0);\n        list->layout->anchorMax = Vec2F(1, 0);\n        list->layout->offsetMin = Vec2F(0, -60);\n        list->layout->offsetMax = Vec2F(0, 1);\n\n        Ref<Text> undefinedText = mmake<Text>(\"stdFont.ttf\");\n        undefinedText->text = \"--\";\n        undefinedText->horAlign = HorAlign::Left;\n        undefinedText->verAlign = VerAlign::Middle;\n        undefinedText->dotsEngings = true;\n        undefinedText->color = Color4(96, 125, 139);\n        auto undefinedLayer = dropdown->AddLayer(\"undefined\", undefinedText, Layout::BothStretch(3, 0, 3, 0));\n\n        Ref<Label> itemSample = o2UI.CreateLabel(\"empty\");\n        itemSample->horAlign = HorAlign::Left;\n        dropdown->SetItemSample(itemSample);\n\n        dropdown->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        dropdown->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        dropdown->AddState(\"opened\", AnimationClip::EaseInOut(\"layer/arrow/mDrawable/scale\", Vec2F(1, 1), Vec2F(1, -1), 0.2f));\n\n        dropdown->AddState(\"undefined\", AnimationClip::EaseInOut(\"layer/undefined/transparency\", 0.0f, 1.0f, 0.05f));\n\n        dropdown->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        Ref<Button> revertBtn = o2UI.CreateWidget<Button>(\"revert\");\n        *revertBtn->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F());\n\n        sample->AddChild(dropdown);\n        sample->AddChild(revertBtn);\n\n        auto revertStateAnim = AnimationClip::EaseInOut(\"child/dropdown/layout/offsetRight\", 0.0f, -20.0f, 0.15f);\n        *revertStateAnim->AddTrack<bool>(\"child/revert/enabled\") = AnimationTrack<bool>::EaseInOut(false, true, 0.15f);\n        sample->AddState(\"revert\", revertStateAnim);\n\n        o2UI.AddWidgetStyle(sample, \"enum property\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadEnableToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        sample->layout->minSize = Vec2F(20, 20);\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_enable_toggle_big.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"backSelect\", mmake<Sprite>(\"ui/UI4_enable_toggle_big_select.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_enable_toggle_big_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_enable_toggle_big_focused.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto checkLayer = sample->AddLayer(\"check\", mmake<Sprite>(\"ui/UI4_enable_dot_big.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(10, 10)));\n\n        auto unknownLayer = sample->AddLayer(\"unknown\", mmake<Sprite>(\"ui/UI4_enable_dot_big_unknown.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(10, 10)));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/backSelect/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"value\", AnimationClip::EaseInOut(\"layer/check/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"unknown\", AnimationClip::EaseInOut(\"layer/unknown/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"actor head enable\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadEnableProperty()\n    {\n        auto sample = mmake<BooleanProperty>();\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<Toggle> toggle = o2UI.CreateToggle(\"empty\", \"actor head enable\");\n        toggle->name = \"toggle\";\n        *toggle->layout = WidgetLayout::BothStretch(0, 0, 20, 0);\n        layout->AddChild(toggle);\n\n        o2UI.AddWidgetStyle(sample, \"actor head enable\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadName()\n    {\n        Ref<EditBox> sample = mmake<EditBox>();\n        sample->SetClippingLayout(Layout::BothStretch(5, 0, 5, 0));\n        sample->SetViewLayout(Layout::BothStretch(7, 0, 7, 0));\n        sample->SetCaretBlinkingDelay(1.15f);\n        sample->SetMultiLine(false);\n        sample->SetSelectionColor(Color4(0, 156, 141, 120));\n        sample->layout->minSize = Vec2F(50, 17);\n\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_round_field.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -4));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -4));\n\n        auto focusLayer = sample->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_round_field_select.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -4));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto focusAnim = AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f);\n        *focusAnim->AddTrack<float>(\"layer/hover/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.05f);\n        sample->AddState(\"focused\", focusAnim)\n            ->offStateAnimationSpeed = 0.5f;\n\n        Ref<Text> textDrawable = sample->GetTextDrawable();\n        textDrawable->verAlign = VerAlign::Middle;\n        textDrawable->horAlign = HorAlign::Left;\n        textDrawable->color = Color4(96, 125, 139);\n        textDrawable->SetFontAsset(AssetRef<FontAsset>(\"stdFont.ttf\"));\n\n        Ref<Sprite> caretDrawable = sample->GetCaretDrawable();\n        *caretDrawable = Sprite();\n        caretDrawable->size = Vec2F(1, textDrawable->GetFont()->GetHeightPx(textDrawable->GetFontHeight()) * 1.7f);\n        caretDrawable->pivot = Vec2F(0, 0.26f);\n        caretDrawable->color = Color4::Black();\n\n        o2UI.AddWidgetStyle(sample, \"actor head name\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadNameProperty()\n    {\n        auto sample = mmake<StringProperty>();\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<EditBox> editBox = o2UI.CreateEditBox(\"actor head name\");\n        *editBox->layout = WidgetLayout::BothStretch(0, 0, 20, 0);\n        editBox->name = \"editBox\";\n        layout->AddChild(editBox);\n\n        o2UI.AddWidgetStyle(sample, \"actor head name\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadDepthProperty()\n    {\n        auto sample = mmake<FloatProperty>();\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<EditBox> editBox = o2UI.CreateEditBox(\"actor head name\");\n        *editBox->layout = WidgetLayout::BothStretch(0, 0, 20, 0);\n        editBox->name = \"editBox\";\n        layout->AddChild(editBox);\n\n        o2UI.AddWidgetStyle(sample, \"actor head depth\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadLockToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto rootLayer = sample->AddLayer(\"root\", nullptr);\n        auto valueLayer = rootLayer->AddChildLayer(\"value\", nullptr);\n\n        auto unlockLayer = valueLayer->AddChildLayer(\"unlock\", mmake<Sprite>(\"ui/UI4_big_lock_open.png\"),\n                                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto lockLayer = valueLayer->AddChildLayer(\"lock\", mmake<Sprite>(\"ui/UI4_big_lock_close.png\"),\n                                                   Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto unknownLayer = rootLayer->AddChildLayer(\"unknown\", mmake<Sprite>(\"ui/UI4_big_lock_unknown.png\"),\n                                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/root/transparency\", 1.0f, 0.7f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        auto valueAnim = AnimationClip::EaseInOut(\"layer/root/child/value/child/unlock/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueAnim->AddTrack<float>(\"layer/root/child/value/child/lock/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueAnim)->offStateAnimationSpeed = 0.5f;\n\n        auto unknownAnim = AnimationClip::EaseInOut(\"layer/root/child/value/transparency\", 1.0f, 0.0f, 0.1f);\n        *unknownAnim->AddTrack<float>(\"layer/root/child/unknown/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"unknown\", unknownAnim)->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"actor head lock\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadLockProperty()\n    {\n        auto sample = mmake<BooleanProperty>();\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<Toggle> toggle = o2UI.CreateToggle(\"empty\", \"actor head lock\");\n        toggle->name = \"toggle\";\n        *toggle->layout = WidgetLayout::BothStretch(0, 0, 20, 0);\n        layout->AddChild(toggle);\n\n        o2UI.AddWidgetStyle(sample, \"actor head lock\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadActorAssetProperty()\n    {\n        auto sample = mmake<AssetProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = true;\n\n        auto spoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n        spoiler->name = \"spoiler\";\n        spoiler->RemoveLayer(\"caption\");\n        *spoiler->layout = WidgetLayout::BothStretch();\n        sample->AddChild(spoiler);\n\n        auto mainLayout = mmake<HorizontalLayout>();\n        mainLayout->name = \"mainLayout\";\n        *mainLayout->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 19, 0);\n        mainLayout->expandHeight = true;\n        spoiler->AddInternalWidget(mainLayout);\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        mainLayout->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 19, 0);\n        layout->baseCorner = BaseCorner::Right;\n        layout->expandHeight = false;\n        layout->spacing = 2;\n        layoutContainer->AddChild(layout);\n\n        auto box = mmake<Widget>();\n        box->name = \"box\";\n        box->SetFocusable(true);\n        box->layout->minHeight = 19;\n        layout->AddChild(box);\n\n        auto backLayer = box->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_round_field_gray.png\"),\n                                       Layout::BothStretch(-4, -4, -5, -4));\n\n        auto selectLayer = box->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_round_field_gray_select.png\"),\n                                         Layout::BothStretch(-4, -4, -5, -4));\n\n        auto focusLayer = box->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_round_field_focused.png\"),\n                                        Layout::BothStretch(-4, -4, -5, -4));\n\n        box->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        box->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto nameText = mmake<Text>(\"stdFont.ttf\");\n        nameText->text = \"--\";\n        nameText->horAlign = HorAlign::Left;\n        nameText->verAlign = VerAlign::Middle;\n        nameText->dotsEngings = true;\n        nameText->color = Color4(96, 125, 139);;\n        box->AddLayer(\"caption\", nameText, Layout::BothStretch(7, 2, 7, 2));\n\n        box->SetFocusable(true);\n\n        auto instanceAnim = mmake<AnimationClip>();\n\n        *instanceAnim->AddTrack<bool>(\"child/spoiler/internalWidget/expand/enabled\") =\n            AnimationTrack<bool>::EaseInOut(false, true, 0.2f);\n\n        sample->AddState(\"instance\", instanceAnim);\n\n        //         auto linkBtn = o2UI.CreateWidget<Button>(\"asset link\");\n        //         *linkBtn->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(15, 15), Vec2F());\n        //         box->AddChild(linkBtn);\n\n        o2UI.AddWidgetStyle(sample, \"actor head asset property\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadTags()\n    {\n        Ref<EditBox> sample = mmake<EditBox>();\n        sample->SetClippingLayout(Layout::BothStretch(5, 0, 5, 0));\n        sample->SetViewLayout(Layout::BothStretch(7, 0, 7, 0));\n        sample->SetCaretBlinkingDelay(1.15f);\n        sample->SetMultiLine(false);\n        sample->SetSelectionColor(Color4(0, 156, 141, 120));\n        sample->layout->minSize = Vec2F(50, 17);\n\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_round_field_gray.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -4));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_round_field_gray_select.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -4));\n\n        auto focusLayer = sample->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_round_field_select.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -4));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto focusAnim = AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f);\n        *focusAnim->AddTrack<float>(\"layer/hover/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.05f);\n        sample->AddState(\"focused\", focusAnim)\n            ->offStateAnimationSpeed = 0.5f;\n\n        Ref<Text> textDrawable = sample->GetTextDrawable();\n        textDrawable->verAlign = VerAlign::Middle;\n        textDrawable->horAlign = HorAlign::Left;\n        textDrawable->color = Color4(96, 125, 139);\n        textDrawable->SetFontAsset(AssetRef<FontAsset>(\"stdFont.ttf\"));\n\n        Ref<Sprite> caretDrawable = sample->GetCaretDrawable();\n        *caretDrawable = Sprite();\n        caretDrawable->size = Vec2F(1, textDrawable->GetFont()->GetHeightPx(textDrawable->GetFontHeight()) * 1.7f);\n        caretDrawable->pivot = Vec2F(0, 0.26f);\n        caretDrawable->color = Color4::Black();\n\n        o2UI.AddWidgetStyle(sample, \"actor head tags\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadTagsProperty()\n    {\n        auto sample = mmake<TagsProperty>();\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<EditBox> editBox = o2UI.CreateEditBox(\"actor head tags\");\n        editBox->name = \"editBox\";\n        *editBox->layout = WidgetLayout::BothStretch(0, 0, 20, 0);\n        layout->AddChild(editBox);\n\n        o2UI.AddWidgetStyle(sample, \"actor head tags\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadLayer()\n    {\n        Ref<DropDown> sample = mmake<DropDown>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_round_field_gray.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -4));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_round_field_gray_select.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -4));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_round_field_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -4));\n\n        auto arrowLayer = sample->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n                                           Layout(Vec2F(1.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(-20, -10), Vec2F(0, 10)));\n\n        sample->SetClippingLayout(Layout::BothStretch(7, -1, 20, 0));\n\n        auto list = sample->GetListView();\n        *list = *o2UI.GetWidgetStyle<CustomList>(\"standard\");\n        list->SetViewLayout(Layout::BothStretch(2, 2, 2, 2));\n        list->layer[\"back\"]->SetDrawable(mmake<Sprite>(\"ui/UI4_Box_regular.png\"));\n        list->layout->pivot = Vec2F(0.5f, 1.0f);\n        list->layout->anchorMin = Vec2F(0, 0);\n        list->layout->anchorMax = Vec2F(1, 0);\n        list->layout->offsetMin = Vec2F(-1, -60);\n        list->layout->offsetMax = Vec2F(0, 3);\n\n        Ref<Text> undefinedText = mmake<Text>(\"stdFont.ttf\");\n        undefinedText->text = \"--\";\n        undefinedText->horAlign = HorAlign::Left;\n        undefinedText->verAlign = VerAlign::Middle;\n        undefinedText->dotsEngings = true;\n        undefinedText->color = Color4(96, 125, 139);\n        auto undefinedLayer = sample->AddLayer(\"undefined\", undefinedText, Layout::BothStretch(3, 0, 3, 0));\n\n        Ref<Label> itemSample = o2UI.CreateLabel(\"empty\");\n        itemSample->horAlign = HorAlign::Left;\n        sample->SetItemSample(itemSample);\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"opened\", AnimationClip::EaseInOut(\"layer/arrow/mDrawable/scale\", Vec2F(1, 1), Vec2F(1, -1), 0.2f));\n\n        sample->AddState(\"undefined\", AnimationClip::EaseInOut(\"layer/undefined/transparency\", 0.0f, 1.0f, 0.05f));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"actor head layer\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorHeadLayerProperty()\n    {\n        auto sample = mmake<SceneLayerRefProperty>();\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<DropDown> dropDown = o2UI.CreateDropdown(\"actor head layer\");\n        dropDown->name = \"dropDown\";\n        *dropDown->layout = WidgetLayout::BothStretch(0, 0, 20, 0);\n        layout->AddChild(dropDown);\n\n        o2UI.AddWidgetStyle(sample, \"actor head layer\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAcceptPrototypeBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_accept_prefab.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_accept_prefab_select.png\"),\n                                            Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_accept_prefab_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"accept prototype\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRevertPrototypeBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_revert_prefab.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_revert_prefab_select.png\"),\n                                            Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_revert_prefab_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"revert prototype\");\n    }\n\n    void EditorUIStyleBuilder::RebuildBreakPrototypeBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_break_prefab.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_break_prefab_select.png\"),\n                                            Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_break_prefab_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"break prototype\");\n    }\n\n    void EditorUIStyleBuilder::RebuildPlayGreenBtn()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        auto playRootIconLayer = sample->AddLayer(\"playRootIcon\", nullptr);\n        auto stopRootIconLayer = sample->AddLayer(\"stopRootIcon\", nullptr);\n\n        auto playIconLayer = playRootIconLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_play_green.png\"),\n                                                              Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto playSelectIconLayer = playRootIconLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_play_green_selected.png\"),\n                                                                    Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto playPressedIconLayer = playRootIconLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_play_green_pressed.png\"),\n                                                                     Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto stopIconLayer = stopRootIconLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_pause_green.png\"),\n                                                              Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto stopSelectIconLayer = stopRootIconLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_pause_green_selected.png\"),\n                                                                    Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto stopPressedIconLayer = stopRootIconLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_pause_green_pressed.png\"),\n                                                                     Layout::Based(BaseCorner::Center, Vec2F(25, 25)));\n\n        auto playBtnSelectAnim = AnimationClip::EaseInOut(\"layer/playRootIcon/child/hover/transparency\", 0.0f, 1.0f, 0.1f);\n        *playBtnSelectAnim->AddTrack<float>(\"layer/stopRootIcon/child/hover/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"hover\", playBtnSelectAnim)->offStateAnimationSpeed = 0.25f;\n\n        auto playBtnPressAnim = AnimationClip::EaseInOut(\"layer/playRootIcon/child/pressed/transparency\", 0.0f, 1.0f, 0.1f);\n        *playBtnPressAnim->AddTrack<float>(\"layer/stopRootIcon/child/pressed/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.05f);\n\n        sample->AddState(\"pressed\", playBtnPressAnim)->offStateAnimationSpeed = 0.5f;\n\n        auto valueBtnPressAnim = AnimationClip::EaseInOut(\"layer/playRootIcon/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnPressAnim->AddTrack<float>(\"layer/stopRootIcon/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnPressAnim);\n\n        o2UI.AddWidgetStyle(sample, \"green play-stop\");\n    }\n\n    void EditorUIStyleBuilder::RebuildComponentOptionsBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_gray_options.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_gray_options_select.png\"),\n                                            Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_gray_options_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"component options\");\n    }\n\n    void EditorUIStyleBuilder::RebuildComponentSaveBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_save_gray.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_save_gray copy.png\"),\n                                            Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_save_gray.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"component save\");\n    }\n\n    void EditorUIStyleBuilder::RebuildHorWideScrollbar()\n    {\n        Ref<HorizontalScrollBar> sample = mmake<HorizontalScrollBar>();\n        sample->layout->minSize = Vec2F(5, 5);\n        sample->SetScrollSense(0.25f);\n        sample->SetMinimalScrollHandleSize(10);\n\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n        auto backLayerImg = backLayer->AddChildLayer(\"image\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                                                     Layout::BothStretch(-9, -9, -9, -9));\n\n        auto handleLayer = sample->AddLayer(\"handle\", nullptr);\n        handleLayer->interactableLayout = Layout::Based(BaseCorner::Center, Vec2F(8, 30));\n\n        auto barRegularSprite = handleLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/ver_hole_handle.png\"),\n                                                           Layout::Based(BaseCorner::Center, Vec2F(8, 30)));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"wide\");\n    }\n\n    void EditorUIStyleBuilder::RebuildVerWideScrollbar()\n    {\n        Ref<VerticalScrollBar> sample = mmake<VerticalScrollBar>();\n        sample->layout->minSize = Vec2F(5, 5);\n        sample->SetScrollSense(0.25f);\n        sample->SetMinimalScrollHandleSize(10);\n\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n        auto backLayerImg = backLayer->AddChildLayer(\"image\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                                                     Layout::BothStretch(-9, -9, -9, -9));\n\n        auto handleLayer = sample->AddLayer(\"handle\", nullptr);\n        handleLayer->interactableLayout = Layout::Based(BaseCorner::Center, Vec2F(30, 8));\n\n        auto barRegularSprite = handleLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/hor_hole_handle.png\"),\n                                                           Layout::Based(BaseCorner::Center, Vec2F(30, 8)));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"wide\");\n    }\n\n    void EditorUIStyleBuilder::RebuildHorWideProgressbar()\n    {\n        Ref<HorizontalProgress> sample = mmake<HorizontalProgress>();\n        sample->layout->minSize = Vec2F(5, 5);\n        sample->SetScrollSense(0.25f);\n\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n        auto backLayerImg = backLayer->AddChildLayer(\"image\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                                                     Layout::BothStretch(-9, -9, -9, -9));\n\n        auto handleLayer = sample->AddLayer(\"bar\", nullptr);\n        auto barRegularSprite = handleLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/ver_hole_handle.png\"),\n                                                           Layout::Based(BaseCorner::Right, Vec2F(8, 30), Vec2F(4, 0)));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"wide\");\n    }\n\n    void EditorUIStyleBuilder::RebuildVerWideProgressbar()\n    {\n        Ref<VerticalProgress> sample = mmake<VerticalProgress>();\n        sample->layout->minSize = Vec2F(5, 5);\n        sample->SetScrollSense(0.25f);\n\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n        auto backLayerImg = backLayer->AddChildLayer(\"image\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                                                     Layout::BothStretch(-9, -9, -9, -9));\n\n        auto handleLayer = sample->AddLayer(\"bar\", nullptr);\n        auto barRegularSprite = handleLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/hor_hole_handle.png\"),\n                                                           Layout::Based(BaseCorner::Bottom, Vec2F(30, 8), Vec2F(0, -4)));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"wide\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAnimationTree()\n    {\n        // basics\n        auto sample = mmake<AnimationTree>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 0, 1));\n        sample->SetViewLayout(Layout::BothStretch(0, 0, 1, 0));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetChildsNodesOffset(10);\n\n        // hover\n        *sample->GetHoverDrawable() = Sprite(\"ui/UI4_Context_menu_white.png\");\n        sample->SetHoverLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        // zebra back\n        sample->SetZebraBackLine(mmake<Sprite>(Color4(0, 0, 0, 13)));\n\n        // highlight\n        *sample->GetHighlightDrawable() = Sprite(\"ui/UI4_selection_frame.png\");\n        sample->GetHighlightDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        sample->SetHighlightLayout(Layout::BothStretch());\n        sample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n\n        // node sample\n        auto itemSample = mmake<AnimationTreeNode>();\n        sample->SetNodeSample(DynamicCast<TreeNode>(itemSample));\n        itemSample->layout->minHeight = 25;\n\n        auto itemSelectionLayer = itemSample->AddLayer(\"select\", nullptr);\n\n        auto itemFocusedLayer = itemSelectionLayer->AddChildLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Context_menu_select.png\"),\n                                                                  Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemUnfocusedLayer = itemSelectionLayer->AddChildLayer(\"unfocused\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                                                    Layout::BothStretch(-10, -16, -10, -16));\n\n        Ref<Text> captionLayerText = mmake<Text>(\"stdFont.ttf\");\n        captionLayerText->color = Color4(96, 125, 139);\n        captionLayerText->horAlign = HorAlign::Left;\n        captionLayerText->verAlign = VerAlign::Middle;\n        itemSample->AddLayer(\"name\", captionLayerText, Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(0, -20), Vec2F(0, 0)));\n\n        auto nameLayer = itemSample->layer[\"name\"];\n        nameLayer->layout = Layout::BothStretch(15, 0, 5, 0);\n        DynamicCast<Text>(nameLayer->GetDrawable())->dotsEngings = true;\n\n        auto actorNodeEditBox = o2UI.CreateWidget<EditBox>(\"backless\");\n        actorNodeEditBox->name = \"nameEditBox\";\n        *actorNodeEditBox->layout = WidgetLayout::BothStretch(15, 0, 5, 0);\n        actorNodeEditBox->Hide(true);\n        itemSample->AddChild(actorNodeEditBox);\n\n        auto itemEditStateAnim = AnimationClip::EaseInOut(\"layer/name/transparency\", 1.0f, 0.0f, 0.15f);\n        *itemEditStateAnim->AddTrack<bool>(\"child/nameEditBox/enabled\") = AnimationTrack<bool>::Linear(false, true, 0.15f);\n        itemSample->AddState(\"edit\", itemEditStateAnim);\n\n        // node sample button\n        Ref<Button> itemSampleExpandBtn = mmake<Button>();\n        itemSampleExpandBtn->layout->minSize = Vec2F(5, 5);\n        itemSampleExpandBtn->name = \"expandBtn\";\n\n        auto regularLayer = itemSampleExpandBtn->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = itemSampleExpandBtn->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"),\n                                                         Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = itemSampleExpandBtn->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        itemSampleExpandBtn->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        itemSampleExpandBtn->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->layout->anchorMin = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->anchorMax = Vec2F(0, 1);\n        itemSampleExpandBtn->layout->offsetMin = Vec2F(0, -25);\n        itemSampleExpandBtn->layout->offsetMax = Vec2F(10, 0);\n\n        itemSample->AddChild(itemSampleExpandBtn);\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/pressed/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        itemSample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        itemSample->AddState(\"selected\", AnimationClip::EaseInOut(\"layer/select/transparency\", 0.0f, 1.0f, 0.2f));\n\n        auto focusedItemAnim = AnimationClip::EaseInOut(\"layer/select/child/focused/transparency\", 0.0f, 1.0f, 0.2f);\n        *focusedItemAnim->AddTrack<float>(\"layer/select/child/unfocused/transparency\") = AnimationTrack<float>::EaseInOut(0.3f, 0.0f, 0.2f);\n        itemSample->AddState(\"focused\", focusedItemAnim);\n\n        // scrollbars\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                         5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                         -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->SetStateForcible(\"hover\", false);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAnimationPropertiesTree()\n    {\n        // basics\n        auto sample = mmake<AnimationPropertiesTree>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 0, 1));\n        sample->SetViewLayout(Layout::BothStretch(0, 0, 1, 0));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetChildsNodesOffset(10);\n\n        // hover\n        *sample->GetHoverDrawable() = Sprite(\"ui/UI4_Context_menu_white.png\");\n        sample->SetHoverLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        // zebra back\n        sample->SetZebraBackLine(mmake<Sprite>(Color4(0, 0, 0, 13)));\n\n        // highlight\n        *sample->GetHighlightDrawable() = Sprite(\"ui/UI4_selection_frame.png\");\n        sample->GetHighlightDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        sample->SetHighlightLayout(Layout::BothStretch());\n        sample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n\n        // node sample\n        auto itemSample = mmake<AnimationPropertiesTreeNode>();\n        sample->SetNodeSample(DynamicCast<TreeNode>(itemSample));\n        itemSample->layout->minHeight = 20;\n\n        auto itemSelectionLayer = itemSample->AddLayer(\"select\", nullptr);\n\n        auto itemFocusedLayer = itemSelectionLayer->AddChildLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Context_menu_select.png\"),\n                                                                  Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemUnfocusedLayer = itemSelectionLayer->AddChildLayer(\"unfocused\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                                                    Layout::BothStretch(-10, -16, -10, -16));\n\n        itemSample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_folder_icon.png\"), Layout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(15, -1)));\n\n        Ref<Text> captionLayerText = mmake<Text>(\"stdFont.ttf\");\n        captionLayerText->color = Color4(96, 125, 139);\n        captionLayerText->horAlign = HorAlign::Left;\n        captionLayerText->verAlign = VerAlign::Middle;\n        itemSample->AddLayer(\"name\", captionLayerText);\n\n        auto nameLayer = itemSample->layer[\"name\"];\n        nameLayer->layout = Layout::BothStretch(33, 0, 5, 0);\n        DynamicCast<Text>(nameLayer->GetDrawable())->dotsEngings = true;\n\n        auto addButton = o2UI.CreateWidget<Button>(\"add small\");\n        addButton->name = \"addButton\";\n        *addButton->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-10, 0));\n        itemSample->AddChild(addButton);\n\n        auto removeButton = o2UI.CreateWidget<Button>(\"remove small\");\n        removeButton->name = \"removeButton\";\n        *removeButton->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(-10, 0));\n        itemSample->AddChild(removeButton);\n\n        // node sample button\n        Ref<Button> itemSampleExpandBtn = mmake<Button>();\n        *itemSampleExpandBtn->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(15, 15), Vec2F(2, -1));\n        itemSampleExpandBtn->layout->minSize = Vec2F(5, 5);\n        itemSampleExpandBtn->name = \"expandBtn\";\n\n        auto regularLayer = itemSampleExpandBtn->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = itemSampleExpandBtn->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"),\n                                                         Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = itemSampleExpandBtn->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        itemSampleExpandBtn->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        itemSampleExpandBtn->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSample->AddChild(itemSampleExpandBtn);\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/pressed/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        itemSample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        itemSample->AddState(\"selected\", AnimationClip::EaseInOut(\"layer/select/transparency\", 0.0f, 1.0f, 0.2f));\n\n        auto focusedItemAnim = AnimationClip::EaseInOut(\"layer/select/child/focused/transparency\", 0.0f, 1.0f, 0.2f);\n        *focusedItemAnim->AddTrack<float>(\"layer/select/child/unfocused/transparency\") = AnimationTrack<float>::EaseInOut(0.3f, 0.0f, 0.2f);\n        itemSample->AddState(\"focused\", focusedItemAnim);\n\n        // scrollbars\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                         5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                         -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->SetStateForcible(\"hover\", false);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRedEditBoxStyle()\n    {\n        Ref<EditBox> sample = mmake<EditBox>();\n        sample->SetClippingLayout(Layout::BothStretch(0, 0, 10, 0));\n        sample->SetViewLayout(Layout::BothStretch(3, 1, 8, -1));\n        sample->SetCaretBlinkingDelay(1.15f);\n        sample->SetMultiLine(false);\n        sample->SetSelectionColor(Color4(0, 156, 141, 120));\n        sample->layout->minSize = Vec2F(10, 10);\n\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_red_edit_box.png\"), Layout::BothStretch(-4, -4, -4, -4));\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto focusLayer = sample->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        sample->AddLayer(\"arrows\", mmake<Sprite>(\"ui/UI4_ch_arrows.png\"),\n                         Layout::Based(BaseCorner::Right, Vec2F(10, 20), Vec2F(0, 0)));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto focusAnim = AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f);\n        *focusAnim->AddTrack<float>(\"layer/hover/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.05f);\n        sample->AddState(\"focused\", focusAnim)\n            ->offStateAnimationSpeed = 0.5f;\n\n        Ref<Text> textDrawable = sample->GetTextDrawable();\n        textDrawable->verAlign = VerAlign::Middle;\n        textDrawable->horAlign = HorAlign::Left;\n        textDrawable->color = Color4(96, 125, 139);\n        textDrawable->SetFontAsset(AssetRef<FontAsset>(\"stdFont.ttf\"));\n\n        Ref<Sprite> caretDrawable = sample->GetCaretDrawable();\n        *caretDrawable = Sprite();\n        caretDrawable->size = Vec2F(1, textDrawable->GetFont()->GetHeightPx(textDrawable->GetFontHeight()) * 1.7f);\n        caretDrawable->pivot = Vec2F(0, 0.26f);\n        caretDrawable->color = Color4::Black();\n\n        o2UI.AddWidgetStyle(sample, \"red singleline\");\n    }\n\n    void EditorUIStyleBuilder::RebuildGreenEditBoxStyle()\n    {\n        Ref<EditBox> sample = mmake<EditBox>();\n        sample->SetClippingLayout(Layout::BothStretch(0, 0, 10, 0));\n        sample->SetViewLayout(Layout::BothStretch(3, 1, 8, -1));\n        sample->SetCaretBlinkingDelay(1.15f);\n        sample->SetMultiLine(false);\n        sample->SetSelectionColor(Color4(0, 156, 141, 120));\n        sample->layout->minSize = Vec2F(10, 10);\n\n        auto backLayer = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_green_edit_box.png\"), Layout::BothStretch(-4, -4, -4, -4));\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        auto focusLayer = sample->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"), Layout::BothStretch(-9, -9, -9, -9));\n        sample->AddLayer(\"arrows\", mmake<Sprite>(\"ui/UI4_ch_arrows.png\"),\n                         Layout::Based(BaseCorner::Right, Vec2F(10, 20), Vec2F(0, 0)));\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto focusAnim = AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f);\n        *focusAnim->AddTrack<float>(\"layer/hover/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.05f);\n        sample->AddState(\"focused\", focusAnim)\n            ->offStateAnimationSpeed = 0.5f;\n\n        Ref<Text> textDrawable = sample->GetTextDrawable();\n        textDrawable->verAlign = VerAlign::Middle;\n        textDrawable->horAlign = HorAlign::Left;\n        textDrawable->color = Color4(96, 125, 139);\n        textDrawable->SetFontAsset(AssetRef<FontAsset>(\"stdFont.ttf\"));\n\n        Ref<Sprite> caretDrawable = sample->GetCaretDrawable();\n        *caretDrawable = Sprite();\n        caretDrawable->size = Vec2F(1, textDrawable->GetFont()->GetHeightPx(textDrawable->GetFontHeight()) * 1.7f);\n        caretDrawable->pivot = Vec2F(0, 0.26f);\n        caretDrawable->color = Color4::Black();\n\n        o2UI.AddWidgetStyle(sample, \"green singleline\");\n    }\n\n    void EditorUIStyleBuilder::RebuildPreviewMenuToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto regular = sample->AddLayer(\"regular\", nullptr);\n\n        auto regularBackLayer = regular->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                                       Layout::BothStretch(-4, -4, -5, -5));\n\n        auto regularSelectLayer = regular->AddChildLayer(\"selectBack\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                                         Layout::BothStretch(-4, -4, -5, -5));\n\n        auto regularPressedLayer = regular->AddChildLayer(\"pressedBack\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto toggled = sample->AddLayer(\"toggled\", nullptr);\n\n        auto toggledBackLayer = toggled->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_menu_toggled.png\"),\n                                                       Layout::BothStretch(-4, -4, -5, -5));\n\n        auto toggledSelectLayer = toggled->AddChildLayer(\"selectBack\", mmake<Sprite>(\"ui/UI4_menu_toggled_hover.png\"),\n                                                         Layout::BothStretch(-4, -4, -5, -5));\n\n        auto toggledPressedLayer = toggled->AddChildLayer(\"pressedBack\", mmake<Sprite>(\"ui/UI4_menu_toggled_pressed.png\"),\n                                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto recordIcon = sample->AddLayer(\"playIcon\", mmake<Sprite>(\"ui/UI4_pencil_icon_green.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n        // hover\n        auto hoverAnim = AnimationClip::EaseInOut(\"layer/regular/child/selectBack/transparency\", 0.0f, 1.0f, 0.1f);\n        *hoverAnim->AddTrack<float>(\"layer/toggled/child/selectBack/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"hover\", hoverAnim)->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        // pressed\n        auto pressedAnim = AnimationClip::EaseInOut(\"layer/regular/child/pressedBack/transparency\", 0.0f, 1.0f, 0.1f);\n        *pressedAnim->AddTrack<float>(\"layer/toggled/child/pressedBack/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"pressed\", pressedAnim)->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        // focused\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        // value\n        auto valueBtnAnim = AnimationClip::EaseInOut(\"layer/regular/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnAnim->AddTrack<float>(\"layer/toggled/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnAnim);\n\n        o2UI.AddWidgetStyle(sample, \"menu preview\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRecordMenuToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto regular = sample->AddLayer(\"regular\", nullptr);\n\n        auto regularBackLayer = regular->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                                       Layout::BothStretch(-4, -4, -5, -5));\n\n        auto regularSelectLayer = regular->AddChildLayer(\"selectBack\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                                         Layout::BothStretch(-4, -4, -5, -5));\n\n        auto regularPressedLayer = regular->AddChildLayer(\"pressedBack\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto toggled = sample->AddLayer(\"toggled\", nullptr);\n\n        auto toggledBackLayer = toggled->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_menu_toggled.png\"),\n                                                       Layout::BothStretch(-4, -4, -5, -5));\n\n        auto toggledSelectLayer = toggled->AddChildLayer(\"selectBack\", mmake<Sprite>(\"ui/UI4_menu_toggled_hover.png\"),\n                                                         Layout::BothStretch(-4, -4, -5, -5));\n\n        auto toggledPressedLayer = toggled->AddChildLayer(\"pressedBack\", mmake<Sprite>(\"ui/UI4_menu_toggled_pressed.png\"),\n                                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto recordIcon = sample->AddLayer(\"playIcon\", mmake<Sprite>(\"ui/UI4_Record_icon.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n        // hover\n        auto hoverAnim = AnimationClip::EaseInOut(\"layer/regular/child/selectBack/transparency\", 0.0f, 1.0f, 0.1f);\n        *hoverAnim->AddTrack<float>(\"layer/toggled/child/selectBack/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"hover\", hoverAnim)->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        // pressed\n        auto pressedAnim = AnimationClip::EaseInOut(\"layer/regular/child/pressedBack/transparency\", 0.0f, 1.0f, 0.1f);\n        *pressedAnim->AddTrack<float>(\"layer/toggled/child/pressedBack/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"pressed\", pressedAnim)->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        // focused\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        // value\n        auto valueBtnAnim = AnimationClip::EaseInOut(\"layer/regular/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnAnim->AddTrack<float>(\"layer/toggled/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnAnim);\n\n        o2UI.AddWidgetStyle(sample, \"menu record\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRewindLeftMenuButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_rewind_left.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(-1, 1)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"menu rewind left\");\n    }\n\n    void EditorUIStyleBuilder::RebuildMoveLeftMenuButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_move_left.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(-1, 1)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"menu move left\");\n    }\n\n    void EditorUIStyleBuilder::RebuildPlayStopMenuToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto playLayer = sample->AddLayer(\"playIcon\", mmake<Sprite>(\"ui/UI4_anim_play.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n        auto pauseLayer = sample->AddLayer(\"pauseIcon\", mmake<Sprite>(\"ui/UI4_anim_pause.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto valueBtnAnim = AnimationClip::EaseInOut(\"layer/pauseIcon/transparency\", 0.0f, 1.0f, 0.1f);\n        *valueBtnAnim->AddTrack<float>(\"layer/playIcon/transparency\") =\n            AnimationTrack<float>::EaseInOut(1.0f, 0.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnAnim);\n\n        o2UI.AddWidgetStyle(sample, \"menu play-stop\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRewindRightMenuButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_rewind_right.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(-1, 1)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"menu rewind right\");\n    }\n\n    void EditorUIStyleBuilder::RebuildMoveRightMenuButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_move_right.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(-1, 1)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"menu move right\");\n    }\n\n    void EditorUIStyleBuilder::RebuildLoopMenuToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto loopLayer = sample->AddLayer(\"loop\", mmake<Sprite>(\"ui/UI4_anim_loop.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n        auto nonLoopLayer = sample->AddLayer(\"nonLoop\", mmake<Sprite>(\"ui/UI4_anim_not_loop.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto valueBtnAnim = AnimationClip::EaseInOut(\"layer/nonLoop/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnAnim->AddTrack<float>(\"layer/loop/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnAnim);\n\n        o2UI.AddWidgetStyle(sample, \"menu loop-nonloop\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAddKeyMenuButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_add_key.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(-1, 1)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"menu add key\");\n    }\n\n    void EditorUIStyleBuilder::RebuildCurvesMenuToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto regular = sample->AddLayer(\"regular\", nullptr);\n\n        auto regularBackLayer = regular->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                                       Layout::BothStretch(-4, -4, -5, -5));\n\n        auto regularSelectLayer = regular->AddChildLayer(\"selectBack\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                                         Layout::BothStretch(-4, -4, -5, -5));\n\n        auto regularPressedLayer = regular->AddChildLayer(\"pressedBack\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto toggled = sample->AddLayer(\"toggled\", nullptr);\n\n        auto toggledBackLayer = toggled->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_menu_toggled.png\"),\n                                                       Layout::BothStretch(-4, -4, -5, -5));\n\n        auto toggledSelectLayer = toggled->AddChildLayer(\"selectBack\", mmake<Sprite>(\"ui/UI4_menu_toggled_hover.png\"),\n                                                         Layout::BothStretch(-4, -4, -5, -5));\n\n        auto toggledPressedLayer = toggled->AddChildLayer(\"pressedBack\", mmake<Sprite>(\"ui/UI4_menu_toggled_pressed.png\"),\n                                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto icon = sample->AddLayer(\"playIcon\", mmake<Sprite>(\"ui/UI4_curves_mode.png\"),\n                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n        // hover\n        auto hoverAnim = AnimationClip::EaseInOut(\"layer/regular/child/selectBack/transparency\", 0.0f, 1.0f, 0.1f);\n        *hoverAnim->AddTrack<float>(\"layer/toggled/child/selectBack/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"hover\", hoverAnim)->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        // pressed\n        auto pressedAnim = AnimationClip::EaseInOut(\"layer/regular/child/pressedBack/transparency\", 0.0f, 1.0f, 0.1f);\n        *pressedAnim->AddTrack<float>(\"layer/toggled/child/pressedBack/transparency\") = AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"pressed\", pressedAnim)->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        // focused\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        // value\n        auto valueBtnAnim = AnimationClip::EaseInOut(\"layer/regular/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnAnim->AddTrack<float>(\"layer/toggled/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnAnim);\n\n        o2UI.AddWidgetStyle(sample, \"menu curves\");\n    }\n\n    void EditorUIStyleBuilder::RebuildPropertiesMenuButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n                                            Layout::BothStretch(-4, -4, -5, -5));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n                                             Layout::BothStretch(-4, -4, -5, -5));\n\n        auto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n                                           Layout::BothStretch(-4, -4, -5, -5));\n\n        auto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_anim_properties_icon.png\"),\n                                          Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(-1, 1)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"menu properties\");\n    }\n\n\tvoid EditorUIStyleBuilder::RebuildNewAssetMenuButton()\n\t{\n\t\tRef<Button> sample = mmake<Button>();\n\t\tsample->layout->minSize = Vec2F(20, 20);\n\n\t\tauto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n\t\t\t\t\t\t\t\t\t\t\tLayout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n\t\t\t\t\t\t\t\t\t\t\t Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n\t\t\t\t\t\t\t\t\t\t   Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_menu_new_asset.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n\n\t\tsample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n\t\t\t->offStateAnimationSpeed = 1.0f / 4.0f;\n\n\t\tsample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\tsample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\to2UI.AddWidgetStyle(sample, \"menu new asset\");\n\t}\n\n\tvoid EditorUIStyleBuilder::RebuildOpenAssetMenuButton()\n\t{\n\t\tRef<Button> sample = mmake<Button>();\n\t\tsample->layout->minSize = Vec2F(20, 20);\n\n\t\tauto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n\t\t\t\t\t\t\t\t\t\t\tLayout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n\t\t\t\t\t\t\t\t\t\t\t Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n\t\t\t\t\t\t\t\t\t\t   Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_menu_open_asset.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n\n\t\tsample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n\t\t\t->offStateAnimationSpeed = 1.0f / 4.0f;\n\n\t\tsample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\tsample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\to2UI.AddWidgetStyle(sample, \"menu open asset\");\n\t}\n\n\tvoid EditorUIStyleBuilder::RebuildSaveAssetMenuButton()\n\t{\n\t\tRef<Button> sample = mmake<Button>();\n\t\tsample->layout->minSize = Vec2F(20, 20);\n\n\t\tauto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n\t\t\t\t\t\t\t\t\t\t\tLayout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n\t\t\t\t\t\t\t\t\t\t\t Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n\t\t\t\t\t\t\t\t\t\t   Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_menu_save_asset.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n\n\t\tsample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n\t\t\t->offStateAnimationSpeed = 1.0f / 4.0f;\n\n\t\tsample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\tsample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"inactive\", AnimationClip::EaseInOut(\"layer/icon/transparency\", 1.0f, 0.5f, 0.1f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\to2UI.AddWidgetStyle(sample, \"menu save asset\");\n\t}\n\n\tvoid EditorUIStyleBuilder::RebuildSaveAsAssetMenuButton()\n\t{\n\t\tRef<Button> sample = mmake<Button>();\n\t\tsample->layout->minSize = Vec2F(20, 20);\n\n\t\tauto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n\t\t\t\t\t\t\t\t\t\t\tLayout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n\t\t\t\t\t\t\t\t\t\t\t Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n\t\t\t\t\t\t\t\t\t\t   Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_menu_save_as_asset.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n\n\t\tsample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n\t\t\t->offStateAnimationSpeed = 1.0f / 4.0f;\n\n\t\tsample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\tsample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\to2UI.AddWidgetStyle(sample, \"menu save as asset\");\n\t}\n\n\tvoid EditorUIStyleBuilder::RebuildRevertAssetMenuButton()\n\t{\n\t\tRef<Button> sample = mmake<Button>();\n\t\tsample->layout->minSize = Vec2F(20, 20);\n\n\t\tauto backLayer = sample->AddLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_panel_button.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto selectLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_panel_button_select.png\"),\n\t\t\t\t\t\t\t\t\t\t\tLayout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_panel_button_pressed.png\"),\n\t\t\t\t\t\t\t\t\t\t\t Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto focusLayer = sample->AddLayer(\"focused\", mmake<Sprite>(\"ui/UI4_panel_button_focus.png\"),\n\t\t\t\t\t\t\t\t\t\t   Layout::BothStretch(-4, -4, -5, -5));\n\n\t\tauto iconLayer = sample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_menu_revert_asset.png\"),\n\t\t\t\t\t\t\t\t\t\t  Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 1)));\n\n\n\t\tsample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n\t\t\t->offStateAnimationSpeed = 1.0f / 4.0f;\n\n\t\tsample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\tsample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focused/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\to2UI.AddWidgetStyle(sample, \"menu revert asset\");\n\t}\n\n\tvoid EditorUIStyleBuilder::RebuildAddKeyButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        auto basicLayer = sample->AddLayer(\"basic\", nullptr);\n\n        auto backLayer = basicLayer->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_add_key.png\"),\n                                                   Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(-1, 0)));\n\n        auto selectLayer = basicLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_add_key_hover.png\"),\n                                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(-1, 0)));\n\n        auto pressedLayer = basicLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_add_key_pressed.png\"),\n                                                      Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(-1, 0)));\n\n        sample->AddState(\"inactive\", AnimationClip::EaseInOut(\"layer/basic/transparency\", 1.0f, 0.5f, 0.01f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/basic/child/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/basic/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"add key\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAddKeyDotButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n\n        auto basicLayer = sample->AddLayer(\"basic\", nullptr);\n\n        auto backLayer = basicLayer->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_curve_color.png\"),\n                                                   Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n        auto selectLayer = basicLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_curve_color.png\"),\n                                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n        auto pressedLayer = basicLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_curve_color.png\"),\n                                                      Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, 0)));\n\n        sample->AddState(\"inactive\", AnimationClip::EaseInOut(\"layer/basic/transparency\", 1.0f, 0.5f, 0.01f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/basic/child/hover/transparency\", 0.0f, 0.5f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/basic/child/pressed/transparency\", 0.0f, 0.2f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"add dot key\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAddSmallBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_plus_small_regular.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_plus_small_hover.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_plus_small_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"add small\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRemoveSmallBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_minus_small_regular.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_minus_small_hover.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_minus_small_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"remove small\");\n    }\n\n    void EditorUIStyleBuilder::RebuildCreateAssetInstanceBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_create_asset_instance.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_create_asset_instance_hover.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_create_asset_instance_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.05f));\n\n        o2UI.AddWidgetStyle(sample, \"create asset instance\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRemoveAssetInstanceBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_remove_asset_instance.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_remove_asset_instance_hover.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_remove_asset_instance_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.05f));\n\n        o2UI.AddWidgetStyle(sample, \"remove asset instance\");\n    }\n\n    void EditorUIStyleBuilder::RebuildSaveAssetInstanceBtn()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_save_asset_instance.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_save_asset_instance_hover.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_save_asset_instance_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.05f));\n\n        o2UI.AddWidgetStyle(sample, \"save asset instance\");\n    }\n\n    void EditorUIStyleBuilder::RebuildSpoilerWithHead()\n    {\n        auto sample = mmake<SpoilerWithHead>();\n        sample->SetHeadHeight(18);\n        sample->spacing = 5.0f;\n        sample->borderLeft = 10;\n        sample->borderTop = 5.0f;\n        sample->expandHeight = false;\n        sample->expandWidth = true;\n        sample->fitByChildren = true;\n        sample->baseCorner = BaseCorner::RightTop;\n\n        sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_component_head.png\"),\n                         Layout::HorStretch(VerAlign::Top, -1, -3, 25, -2));\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"Button\";\n        captionText->horAlign = HorAlign::Left;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->wordWrap = true;\n        captionText->color = Color4(235, 255, 253);\n        sample->AddLayer(\"caption\", captionText, Layout::HorStretch(VerAlign::Top, 41, 0, 20, 0));\n\n        auto expandBtn = o2UI.CreateWidget<Button>(\"expand white\");\n        expandBtn->name = \"expand\";\n        *expandBtn->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(1, 0));\n        sample->AddInternalWidget(expandBtn);\n\n        auto icon = o2UI.CreateImage(\"ui/UI4_transform_icon.png\");\n        icon->name = \"icon\";\n        *icon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(21, 0));\n        sample->AddInternalWidget(icon);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAddComponentButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n\n        auto basicLayer = sample->AddLayer(\"basic\", nullptr);\n\n        auto backLayer = basicLayer->AddChildLayer(\"regularBack\", mmake<Sprite>(\"ui/UI4_add_btn.png\"),\n                                                   Layout::Based(BaseCorner::Center, Vec2F(40, 40), Vec2F(0, 0)));\n\n        auto selectLayer = basicLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_add_btn_hover.png\"),\n                                                     Layout::Based(BaseCorner::Center, Vec2F(40, 40), Vec2F(-1, 0)));\n\n        auto pressedLayer = basicLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_add_btn_pressed.png\"),\n                                                      Layout::Based(BaseCorner::Center, Vec2F(40, 40), Vec2F(0, 0)));\n\n        sample->AddState(\"inactive\", AnimationClip::EaseInOut(\"layer/basic/transparency\", 1.0f, 0.5f, 0.01f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/basic/child/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/basic/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"add component\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAddComponentsTree()\n    {\n        // basics\n        auto sample = mmake<ComponentsTree>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 0, 1));\n        sample->SetViewLayout(Layout::BothStretch(0, 0, 1, 0));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetChildsNodesOffset(10);\n\n        // Back\n        sample->AddLayer(\"back\", mmake<Sprite>(Color4(0, 0, 0, 50)), Layout::BothStretch())->transparency = 0.05f;\n\n        // hover\n        *sample->GetHoverDrawable() = Sprite(\"ui/UI4_Context_menu_white.png\");\n        sample->SetHoverLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        // zebra back\n        sample->SetZebraBackLine(mmake<Sprite>(Color4(0, 0, 0, 13)));\n\n        // highlight\n        *sample->GetHighlightDrawable() = Sprite(\"ui/UI4_selection_frame.png\");\n        sample->GetHighlightDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        sample->SetHighlightLayout(Layout::BothStretch());\n        sample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n\n        // node sample\n        auto itemSample = mmake<ComponentsTreeNode>();\n        sample->SetNodeSample(DynamicCast<TreeNode>(itemSample));\n        itemSample->layout->minHeight = 30;\n\n        auto itemSelectionLayer = itemSample->AddLayer(\"select\", nullptr);\n\n        auto itemFocusedLayer = itemSelectionLayer->AddChildLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Context_menu_select.png\"),\n                                                                  Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemUnfocusedLayer = itemSelectionLayer->AddChildLayer(\"unfocused\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                                                    Layout::BothStretch(-10, -16, -10, -16));\n\n        itemSample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_folder_icon.png\"), Layout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(15, -1)));\n\n        Ref<Text> captionLayerText = mmake<Text>(\"stdFont.ttf\");\n        captionLayerText->color = Color4(96, 125, 139);\n        captionLayerText->horAlign = HorAlign::Left;\n        captionLayerText->verAlign = VerAlign::Middle;\n        itemSample->AddLayer(\"name\", captionLayerText);\n\n        auto nameLayer = itemSample->layer[\"name\"];\n        nameLayer->layout = Layout::BothStretch(35, 0, 5, 0);\n        DynamicCast<Text>(nameLayer->GetDrawable())->dotsEngings = true;\n\n        // node sample button\n        Ref<Button> itemSampleExpandBtn = mmake<Button>();\n        *itemSampleExpandBtn->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(15, 15), Vec2F(2, -1));\n        itemSampleExpandBtn->layout->minSize = Vec2F(5, 5);\n        itemSampleExpandBtn->name = \"expandBtn\";\n\n        auto regularLayer = itemSampleExpandBtn->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = itemSampleExpandBtn->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"),\n                                                         Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = itemSampleExpandBtn->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        itemSampleExpandBtn->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        itemSampleExpandBtn->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSample->AddChild(itemSampleExpandBtn);\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/pressed/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        itemSample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        itemSample->AddState(\"selected\", AnimationClip::EaseInOut(\"layer/select/transparency\", 0.0f, 1.0f, 0.2f));\n\n        auto focusedItemAnim = AnimationClip::EaseInOut(\"layer/select/child/focused/transparency\", 0.0f, 1.0f, 0.2f);\n        *focusedItemAnim->AddTrack<float>(\"layer/select/child/unfocused/transparency\") = AnimationTrack<float>::EaseInOut(0.3f, 0.0f, 0.2f);\n        itemSample->AddState(\"focused\", focusedItemAnim);\n\n        // scrollbars\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                         5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                         -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->SetStateForcible(\"hover\", false);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAnimationStateViewerEditButton()\n    {\n        Ref<Button> sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(5, 5);\n\n        auto regularLayer = sample->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_edit_anim_regular.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto hoverLayer = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_edit_anim_hover.png\"),\n                                           Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto pressedLayer = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_edit_anim_pressed.png\"),\n                                             Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"edit animation state\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAnimationSpoiler()\n    {\n        auto sample = mmake<SpoilerWithHead>();\n        sample->SetHeadHeight(30);\n        sample->spacing = 5.0f;\n        sample->borderLeft = 10;\n        sample->borderTop = 5.0f;\n        sample->expandHeight = false;\n        sample->expandWidth = true;\n        sample->fitByChildren = true;\n        sample->baseCorner = BaseCorner::RightTop;\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"Button\";\n        captionText->horAlign = HorAlign::Left;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->wordWrap = true;\n        captionText->color = Color4(235, 255, 253);\n        sample->AddLayer(\"caption\", captionText, Layout::HorStretch(VerAlign::Top, 41, 0, 20, 0));\n\n        auto expandBtn = o2UI.CreateWidget<Button>(\"expand\");\n        expandBtn->name = \"expand\";\n        *expandBtn->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(1, 0));\n        sample->AddInternalWidget(expandBtn);\n\n        auto playStopBtn = o2UI.CreateWidget<Toggle>(\"animation component play-stop\");\n        playStopBtn->name = \"play-stop\";\n        *playStopBtn->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(20, 0));\n        sample->AddInternalWidget(playStopBtn);\n\n        auto removeBtn = o2UI.CreateWidget<Button>(\"remove small\");\n        removeBtn->name = \"expand\";\n        *removeBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(0, 0));\n        sample->AddInternalWidget(removeBtn);\n\n        auto loopBtn = o2UI.CreateWidget<Toggle>(\"animation component loop\");\n        loopBtn->name = \"loop\";\n        *loopBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(-20, 0));\n        sample->AddInternalWidget(loopBtn);\n\n        auto bar = o2UI.CreateWidget<HorizontalProgress>(\"animation component bar\");\n        bar->name = \"bar\";\n        *bar->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 2, 20);\n        sample->AddInternalWidget(bar);\n\n        o2UI.AddWidgetStyle(sample, \"animation state\");\n    }\n\n    void EditorUIStyleBuilder::RebuildBacklessDropdownButton()\n    {\n        auto sample = mmake<Button>();\n        sample->layout->minSize = Vec2F(20, 20);\n\n        Ref<Text> captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"Button\";\n        captionText->horAlign = HorAlign::Right;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->wordWrap = true;\n        captionText->color = Color4(96, 125, 139, 175);\n        sample->AddLayer(\"caption\", captionText, Layout::BothStretch(0, 0, 20, 0));\n\n        auto arrowLayer = sample->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n            Layout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F()));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/caption/transparency\", 0.6f, 0.8f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/caption/transparency\", 0.8f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        o2UI.AddWidgetStyle(sample, \"backless dropdown\");\n    }\n\n    void EditorUIStyleBuilder::RebuildMemoryAnalyzerTree()\n    {\n        // basics\n        auto sample = mmake<MemoryAnalyzeTree>();\n        sample->layout->minSize = Vec2F(20, 20);\n        sample->SetClippingLayout(Layout::BothStretch(1, 2, 0, 1));\n        sample->SetViewLayout(Layout::BothStretch(0, 0, 1, 0));\n        sample->SetEnableScrollsHiding(true);\n        sample->SetChildsNodesOffset(10);\n\n        // hover\n        *sample->GetHoverDrawable() = Sprite(\"ui/UI4_Context_menu_white.png\");\n        sample->SetHoverLayout(Layout::BothStretch(-10, -16, -10, -16));\n\n        // zebra back\n        sample->SetZebraBackLine(mmake<Sprite>(Color4(0, 0, 0, 13)));\n\n        // highlight\n        *sample->GetHighlightDrawable() = Sprite(\"ui/UI4_selection_frame.png\");\n        sample->GetHighlightDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        sample->SetHighlightLayout(Layout::BothStretch());\n        sample->SetHighlightAnimation(Animate(*sample->GetHighlightDrawable()).\n                                      Hide().Scale(1.5f).Then().\n                                      Wait(0.3f).Then().\n                                      Show().Scale(1.0f).For(0.2f).Then().\n                                      Wait(1.0f).Then().\n                                      Hide().For(0.2f));\n\n        // node sample\n        auto itemSample = mmake<MemoryAnalyzeTreeNode>();\n        sample->SetNodeSample(DynamicCast<TreeNode>(itemSample));\n        itemSample->layout->minHeight = 20;\n\n        auto itemSelectionLayer = itemSample->AddLayer(\"select\", nullptr);\n\n        auto itemFocusedLayer = itemSelectionLayer->AddChildLayer(\"focused\", mmake<Sprite>(\"ui/UI4_Context_menu_select.png\"),\n                                                                  Layout::BothStretch(-10, -16, -10, -16));\n\n        auto itemUnfocusedLayer = itemSelectionLayer->AddChildLayer(\"unfocused\", mmake<Sprite>(\"ui/UI4_Context_menu_white.png\"),\n                                                                    Layout::BothStretch(-10, -16, -10, -16));\n\n        //itemSample->AddLayer(\"icon\", mmake<Sprite>(\"ui/UI4_folder_icon.png\"), Layout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(15, -1)));\n\n        auto layersRoot = itemSample->AddLayer(\"root\", nullptr, Layout::BothStretch(0, 0, 20, 0));\n\n        // Name\n        Ref<Text> nameCaptionLayerText = mmake<Text>(\"stdFont.ttf\");\n        nameCaptionLayerText->color = Color4(96, 125, 139);\n        nameCaptionLayerText->horAlign = HorAlign::Left;\n        nameCaptionLayerText->verAlign = VerAlign::Middle;\n        nameCaptionLayerText->dotsEngings = true;\n        layersRoot->AddChildLayer(\"name\", nameCaptionLayerText, Layout::BothStretch(20, 0, 235, 0));\n\n        // Address\n        Ref<Text> addressCaptionLayerText = mmake<Text>(\"stdFont.ttf\");\n        addressCaptionLayerText->color = Color4(96, 125, 139);\n        addressCaptionLayerText->horAlign = HorAlign::Left;\n        addressCaptionLayerText->verAlign = VerAlign::Middle;\n        addressCaptionLayerText->dotsEngings = true;\n        layersRoot->AddChildLayer(\"address\", addressCaptionLayerText, Layout::VerStretch(HorAlign::Right, 0, 0, 150, 85));\n\n        // Size\n        Ref<Text> sizeCaptionLayerText = mmake<Text>(\"stdFont.ttf\");\n        sizeCaptionLayerText->color = Color4(96, 125, 139);\n        sizeCaptionLayerText->horAlign = HorAlign::Right;\n        sizeCaptionLayerText->verAlign = VerAlign::Middle;\n        sizeCaptionLayerText->dotsEngings = true;\n        layersRoot->AddChildLayer(\"size\", sizeCaptionLayerText, Layout::VerStretch(HorAlign::Right, 0, 0, 80, 5));\n\n        // node sample button\n        Ref<Button> itemSampleExpandBtn = mmake<Button>();\n        *itemSampleExpandBtn->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(15, 15), Vec2F(2, -1));\n        itemSampleExpandBtn->layout->minSize = Vec2F(5, 5);\n        itemSampleExpandBtn->name = \"expandBtn\";\n\n        auto regularLayer = itemSampleExpandBtn->AddLayer(\"regular\", mmake<Sprite>(\"ui/UI4_Right_icn.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto selectLayer = itemSampleExpandBtn->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"),\n                                                         Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n        auto pressedLayer = itemSampleExpandBtn->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"),\n                                                          Layout(Vec2F(0.5f, 0.5f), Vec2F(0.5f, 0.5f), Vec2F(-10, -10), Vec2F(10, 10)));\n\n\n        itemSampleExpandBtn->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        itemSampleExpandBtn->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSampleExpandBtn->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        itemSample->AddChild(itemSampleExpandBtn);\n\n        auto expandedStateAnim = mmake<AnimationClip>();\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/regular/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/hover/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        *expandedStateAnim->AddTrack<float>(\"child/expandBtn/layer/pressed/mDrawable/angle\") =\n            AnimationTrack<float>::EaseInOut(Math::Deg2rad(0.0f), Math::Deg2rad(-90.0f), 0.1f);\n\n        itemSample->AddState(\"expanded\", expandedStateAnim)->offStateAnimationSpeed = 2.5f;\n\n        itemSample->AddState(\"selected\", AnimationClip::EaseInOut(\"layer/select/transparency\", 0.0f, 1.0f, 0.2f));\n\n        auto focusedItemAnim = AnimationClip::EaseInOut(\"layer/select/child/focused/transparency\", 0.0f, 1.0f, 0.2f);\n        *focusedItemAnim->AddTrack<float>(\"layer/select/child/unfocused/transparency\") = AnimationTrack<float>::EaseInOut(0.3f, 0.0f, 0.2f);\n        itemSample->AddState(\"focused\", focusedItemAnim);\n\n        // scrollbars\n        Ref<HorizontalScrollBar> horScrollBar = o2UI.CreateHorScrollBar();\n        horScrollBar->layout->anchorMin = Vec2F(0, 0);\n        horScrollBar->layout->anchorMax = Vec2F(1, 0);\n        horScrollBar->layout->offsetMin = Vec2F(5, 0);\n        horScrollBar->layout->offsetMax = Vec2F(-15, 15);\n        sample->SetHorizontalScrollBar(horScrollBar);\n\n        Ref<VerticalScrollBar> verScrollBar = o2UI.CreateVerScrollBar();\n        verScrollBar->layout->anchorMin = Vec2F(1, 0);\n        verScrollBar->layout->anchorMax = Vec2F(1, 1);\n        verScrollBar->layout->offsetMin = Vec2F(-15, 15);\n        verScrollBar->layout->offsetMax = Vec2F(0, -5);\n        sample->SetVerticalScrollBar(verScrollBar);\n\n        sample->AddState(\"enableHorBar\", AnimationClip::EaseInOut(\"mVerScrollBar/layout/offsetBottom\",\n                                                                  5.0f, 15.0f, 0.2f));\n\n        sample->AddState(\"enableVerBar\", AnimationClip::EaseInOut(\"mHorScrollBar/layout/offsetRight\",\n                                                                  -5.0f, -15.0f, 0.2f));\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"mHoverDrawable/transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->SetStateForcible(\"hover\", false);\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5;\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n\tvoid EditorUIStyleBuilder::RebuildASGStateWidget()\n\t{\n\t\tauto sample = mmake<VerticalLayout>();\n        sample->fitByChildren = true;\n        sample->baseCorner = BaseCorner::Bottom;\n        sample->layout->minWidth = 250;\n        sample->expandWidth = true;\n        sample->spacing = 5;\n        sample->border = BorderF(10, 10, 10, 10);\n\n\t\tauto shadow = sample->AddLayer(\"shadow\", mmake<Sprite>(\"ui/UI4_animation_state_shadow.png\"), Layout::BothStretch(1, -17, -13, -1));\n\t\tauto back = sample->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_animation_state_regular.png\"), Layout::BothStretch(-6, -10, -6, -8));\n\t\tauto hover = sample->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_animation_state_hover.png\"), Layout::BothStretch(-6, -10, -6, -8));\n\t\tauto pressed = sample->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_animation_state_pressed.png\"), Layout::BothStretch(-6, -10, -6, -8));\n\t\tauto ddefault = sample->AddLayer(\"default\", mmake<Sprite>(\"ui/UI4_animation_state_default.png\"), Layout::BothStretch(-6, -10, -6, -8));\n\t\tauto focus = sample->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_animation_state_frame.png\"), Layout::BothStretch(-9, -13, -9, -11));\n\t\tauto borderFinished = sample->AddLayer(\"borderFinished\", mmake<Sprite>(\"ui/UI4_animation_state_frame.png\"), Layout::BothStretch(-6, -10, -6, -8));\n\t\tauto borderPlanned = sample->AddLayer(\"borderPlanned\", mmake<Sprite>(\"ui/UI4_animation_state_frame.png\"), Layout::BothStretch(-6, -10, -6, -8));\n\n\t\tfocus->GetDrawable()->color = Color4(0, 150, 136, 255);\n\t\tborderFinished->GetDrawable()->color = Color4(249, 93, 72, 255);\n        borderPlanned->GetDrawable()->color = Color4(159, 190, 254, 255);\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.1f))\n\t\t\t->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\tsample->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\tsample->AddState(\"default\", AnimationClip::EaseInOut(\"layer/default/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\tsample->AddState(\"finished\", AnimationClip::EaseInOut(\"layer/borderFinished/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\tsample->AddState(\"planned\", AnimationClip::EaseInOut(\"layer/borderPlanned/transparency\", 0.0f, 1.0f, 0.05f))\n\t\t\t->offStateAnimationSpeed = 0.5f;\n\n\t\to2UI.AddWidgetStyle(sample, \"ASG state\");\n\t}\n\n\tvoid EditorUIStyleBuilder::RebuildAnimationStateViewerPlayToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        auto playRootIconLayer = sample->AddLayer(\"playRootIcon\", nullptr);\n        auto stopRootIconLayer = sample->AddLayer(\"stopRootIcon\", nullptr);\n\n        auto playIconLayer = playRootIconLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_play_anim_regular.png\"),\n                                                              Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto playSelectIconLayer = playRootIconLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_play_anim_hover.png\"),\n                                                                    Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto playPressedIconLayer = playRootIconLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_play_anim_pressed.png\"),\n                                                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto stopIconLayer = stopRootIconLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_stop_anim_regular.png\"),\n                                                              Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto stopSelectIconLayer = stopRootIconLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_stop_anim_hover.png\"),\n                                                                    Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto stopPressedIconLayer = stopRootIconLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_stop_anim_pressed.png\"),\n                                                                     Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        auto playBtnSelectAnim = AnimationClip::EaseInOut(\"layer/playRootIcon/child/hover/transparency\", 0.0f, 1.0f, 0.1f);\n        *playBtnSelectAnim->AddTrack<float>(\"layer/stopRootIcon/child/hover/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"hover\", playBtnSelectAnim)->offStateAnimationSpeed = 0.25f;\n\n        auto playBtnPressAnim = AnimationClip::EaseInOut(\"layer/playRootIcon/child/pressed/transparency\", 0.0f, 1.0f, 0.1f);\n        *playBtnPressAnim->AddTrack<float>(\"layer/stopRootIcon/child/pressed/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.05f);\n\n        sample->AddState(\"pressed\", playBtnPressAnim)->offStateAnimationSpeed = 0.5f;\n\n        auto valueBtnPressAnim = AnimationClip::EaseInOut(\"layer/playRootIcon/transparency\", 1.0f, 0.0f, 0.1f);\n        *valueBtnPressAnim->AddTrack<float>(\"layer/stopRootIcon/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"value\", valueBtnPressAnim);\n\n        o2UI.AddWidgetStyle(sample, \"animation state play-stop\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAnimationStateViewerLoopToggle()\n    {\n        Ref<Toggle> sample = mmake<Toggle>();\n        auto loopRootIconLayer = sample->AddLayer(\"loopRootIcon\", nullptr);\n        auto nonLoopRootIconLayer = sample->AddLayer(\"nonLoopRootIcon\", nullptr);\n\n        loopRootIconLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_anim_loop_regular.png\"),\n                                         Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        loopRootIconLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_anim_loop_hover.png\"),\n                                         Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        loopRootIconLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_anim_loop_pressed.png\"),\n                                         Layout::Based(BaseCorner::Center, Vec2F(20, 20)));\n\n        nonLoopRootIconLayer->AddChildLayer(\"regular\", mmake<Sprite>(\"ui/UI4_non_loop_anim_regular.png\"),\n                                            Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, -1)));\n\n        nonLoopRootIconLayer->AddChildLayer(\"hover\", mmake<Sprite>(\"ui/UI4_non_loop_anim_hover.png\"),\n                                            Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, -1)));\n\n        nonLoopRootIconLayer->AddChildLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_non_loop_anim_pressed.png\"),\n                                            Layout::Based(BaseCorner::Center, Vec2F(20, 20), Vec2F(0, -1)));\n\n        auto hoverAnim = AnimationClip::EaseInOut(\"layer/loopRootIcon/child/hover/transparency\", 0.0f, 1.0f, 0.1f);\n        *hoverAnim->AddTrack<float>(\"layer/nonLoopRootIcon/child/hover/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.1f);\n\n        sample->AddState(\"hover\", hoverAnim)->offStateAnimationSpeed = 0.25f;\n\n        auto pressedAnim = AnimationClip::EaseInOut(\"layer/loopRootIcon/child/pressed/transparency\", 0.0f, 1.0f, 0.1f);\n        *pressedAnim->AddTrack<float>(\"layer/nonLoopRootIcon/child/pressed/transparency\") =\n            AnimationTrack<float>::EaseInOut(0.0f, 1.0f, 0.05f);\n\n        sample->AddState(\"pressed\", pressedAnim)->offStateAnimationSpeed = 0.5f;\n\n        auto valueAnim = AnimationClip::EaseInOut(\"layer/loopRootIcon/transparency\", 0.0f, 1.0f, 0.1f);\n        *valueAnim->AddTrack<float>(\"layer/nonLoopRootIcon/transparency\") =\n            AnimationTrack<float>::EaseInOut(1.0f, 0.0f, 0.1f);\n\n        sample->AddState(\"value\", valueAnim);\n\n        o2UI.AddWidgetStyle(sample, \"animation state loop\");\n    }\n\n    void EditorUIStyleBuilder::RebuildAnimationStateViewerProgressBar()\n    {\n        Ref<HorizontalProgress> sample = mmake<HorizontalProgress>();\n        sample->layout->minSize = Vec2F(5, 5);\n        auto backLayer = sample->AddLayer(\"back\", nullptr);\n        auto spriteBackLayer = backLayer->AddChildLayer(\"sprite\", mmake<Sprite>(Color4(181, 203, 204)), Layout::BothStretch());\n\n        backLayer->interactableLayout = Layout(Vec2F(0.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(0, -4), Vec2F(0, 4));\n\n        auto barLayer = sample->AddLayer(\"bar\", nullptr);\n        auto barRegularSprite = barLayer->AddChildLayer(\"regular\", mmake<Sprite>(Color4(248, 93, 72)), Layout::BothStretch());\n\n        auto barSelectSprite = barLayer->AddChildLayer(\"hover\", mmake<Sprite>(Color4(248, 93, 72).ChangeLightness(0.1f)),\n                                                       Layout::BothStretch());\n\n        auto barPressedSprite = barLayer->AddChildLayer(\"pressed\", mmake<Sprite>(Color4(248, 93, 72).ChangeLightness(-0.1f)),\n                                                        Layout::BothStretch());\n\n        sample->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/bar/child/hover/transparency\", 0.0f, 1.0f, 0.1f))\n            ->offStateAnimationSpeed = 1.0f / 4.0f;\n\n        sample->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/bar/child/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.2f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        sample->SetOrientation(HorizontalProgress::Orientation::Right);\n\n        o2UI.AddWidgetStyle(sample, \"animation state bar\");\n    }\n\n    void EditorUIStyleBuilder::RebuildFloatProperty()\n    {\n        auto sample = mmake<FloatProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layout->expandWidth = true;\n        layout->fitByChildren = false; \n        layout->spacing = 5;\n        layoutContainer->AddChild(layout);\n\n        auto progress = o2UI.CreateHorProgress();\n        progress->name = \"progress\";\n        *progress->layout = WidgetLayout::BothStretch();\n        layout->AddChild(progress);\n\n        auto editBox = o2UI.CreateEditBox(\"singleline with arrows\");\n        editBox->name = \"editBox\";\n        *editBox->layout = WidgetLayout::BothStretch();\n        layout->AddChild(editBox);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRedFloatProperty()\n    {\n        auto sample = mmake<FloatProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto editBox = o2UI.CreateEditBox(\"red singleline\");\n        editBox->name = \"editBox\";\n        *editBox->layout = WidgetLayout::BothStretch();\n        layout->AddChild(editBox);\n\n        o2UI.AddWidgetStyle(sample, \"red\");\n    }\n\n    void EditorUIStyleBuilder::RebuildGreenFloatProperty()\n    {\n        auto sample = mmake<FloatProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto editBox = o2UI.CreateEditBox(\"green singleline\");\n        editBox->name = \"editBox\";\n        *editBox->layout = WidgetLayout::BothStretch();\n        layout->AddChild(editBox);\n\n        o2UI.AddWidgetStyle(sample, \"green\");\n    }\n\n    void EditorUIStyleBuilder::RebuildIntegerProperty()\n    {\n        auto sample = mmake<IntegerProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto editBox = o2UI.CreateEditBox(\"singleline with arrows\");\n        editBox->name = \"editBox\";\n        *editBox->layout = WidgetLayout::BothStretch();\n        layout->AddChild(editBox);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildActorProperty()\n    {\n        auto sample = mmake<ActorProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto box = mmake<Widget>();\n        box->name = \"box\";\n        box->SetFocusable(true);\n        *box->layout = WidgetLayout::BothStretch();\n\n        auto backLayer = box->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                                       Layout::BothStretch(-9, -9, -9, -9));\n\n        auto selectLayer = box->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"),\n                                         Layout::BothStretch(-9, -9, -9, -9));\n\n        auto focusLayer = box->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"),\n                                        Layout::BothStretch(-9, -9, -9, -9));\n\n        box->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        box->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto nameText = mmake<Text>(\"stdFont.ttf\");\n        nameText->text = \"--\";\n        nameText->horAlign = HorAlign::Left;\n        nameText->verAlign = VerAlign::Middle;\n        nameText->dotsEngings = true;\n        nameText->color = Color4(96, 125, 139);\n        box->AddLayer(\"caption\", nameText, Layout::BothStretch(2, 2, 2, 2));\n\n        box->SetFocusable(true);\n\n        auto linkBtn = o2UI.CreateWidget<Button>(\"asset link\");\n        *linkBtn->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(15, 15), Vec2F());\n        box->AddChild(linkBtn);\n        layout->AddChild(box);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n\n    void EditorUIStyleBuilder::RebuildAssetPropety()\n    {\n        auto sample = mmake<AssetProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = true;\n\n        auto spoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n        spoiler->name = \"spoiler\";\n        spoiler->RemoveLayer(\"caption\");\n        *spoiler->layout = WidgetLayout::BothStretch();\n        sample->AddChild(spoiler);\n\n        auto mainLayout = mmake<HorizontalLayout>();\n        mainLayout->name = \"mainLayout\";\n        *mainLayout->layout = WidgetLayout::HorStretch(VerAlign::Top, 10, 0, 19, 0);\n        mainLayout->expandHeight = true;\n        spoiler->AddInternalWidget(mainLayout);\n\n        auto label = o2UI.CreateWidget<Label>();\n        label->name = \"propertyName\";\n        label->horAlign = HorAlign::Left;\n        label->layout->widthWeight = 0.6f;\n        label->horOverflow = Label::HorOverflow::Dots;\n        mainLayout->AddChild(label);\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        mainLayout->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 19, 0);\n        layout->baseCorner = BaseCorner::Right;\n        layout->expandHeight = false;\n        layout->spacing = 2;\n        layoutContainer->AddChild(layout);\n\n        auto instanceCaption = o2UI.CreateLabel(\"instance\");\n        *instanceCaption->layout = WidgetLayout::BothStretch(0, 5, 0, 0);\n        instanceCaption->name = \"instanceCaption\";\n        instanceCaption->horOverflow = Label::HorOverflow::Dots;\n        instanceCaption->horAlign = HorAlign::Left;\n        instanceCaption->verAlign = VerAlign::Bottom;\n        instanceCaption->height = 8;\n        instanceCaption->transparency = 0.6f;\n        layout->AddInternalWidget(instanceCaption);\n\n        auto createInstanceBtn = o2UI.CreateWidget<Button>(\"create asset instance\");\n        createInstanceBtn->name = \"create\";\n        createInstanceBtn->layout->minHeight = 20;\n        createInstanceBtn->layout->maxWidth = 20;\n        layout->AddChild(createInstanceBtn);\n\n        auto removeInstanceBtn = o2UI.CreateWidget<Button>(\"remove asset instance\");\n        removeInstanceBtn->name = \"remove\";\n        removeInstanceBtn->layout->minHeight = 20;\n        removeInstanceBtn->layout->maxWidth = 16;\n        layout->AddChild(removeInstanceBtn);\n\n        auto saveInstanceBtn = o2UI.CreateWidget<Button>(\"save asset instance\");\n        saveInstanceBtn->name = \"save\";\n        saveInstanceBtn->layout->minHeight = 20;\n        saveInstanceBtn->layout->maxWidth = 16;\n\t\tlayout->AddChild(saveInstanceBtn);\n\n\t\tauto editBtn = o2UI.CreateWidget<Button>(\"edit animation state\");\n\t\teditBtn->name = \"edit\";\n\t\teditBtn->layout->minHeight = 20;\n\t\teditBtn->layout->maxWidth = 20;\n\t\tlayout->AddChild(editBtn);\n\n        auto box = mmake<Widget>();\n        box->name = \"box\";\n        box->SetFocusable(true);\n        box->layout->minHeight = 19;\n        layout->AddChild(box);\n\n        auto backLayer = box->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                                       Layout::BothStretch(-9, -9, -9, -9));\n\n        auto selectLayer = box->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"),\n                                         Layout::BothStretch(-9, -9, -9, -9));\n\n        auto focusLayer = box->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"),\n                                        Layout::BothStretch(-9, -9, -9, -9));\n\n        box->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        box->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto nameText = mmake<Text>(\"stdFont.ttf\");\n        nameText->text = \"--\";\n        nameText->horAlign = HorAlign::Left;\n        nameText->verAlign = VerAlign::Middle;\n        nameText->dotsEngings = true;\n        nameText->color = Color4(96, 125, 139);;\n        box->AddLayer(\"caption\", nameText, Layout::BothStretch(2, 2, 2, 2));\n\n        box->SetFocusable(true);\n\n        auto instanceAnim = mmake<AnimationClip>();\n        *instanceAnim->AddTrack<float>(\"child/spoiler/internalWidget/mainLayout/child/container/child/layout/internalWidget/instanceCaption/transparency\") =\n            AnimationTrack<float>::EaseInOut(0, 1, 0.2f);\n\n        *instanceAnim->AddTrack<float>(\"child/spoiler/internalWidget/mainLayout/child/container/child/layout/child/box/transparency\") =\n            AnimationTrack<float>::EaseInOut(1, 0, 0.2f);\n\n        *instanceAnim->AddTrack<bool>(\"child/spoiler/internalWidget/expand/enabled\") =\n            AnimationTrack<bool>::EaseInOut(false, true, 0.2f);\n\n        *instanceAnim->AddTrack<float>(\"child/spoiler/internalWidget/mainLayout/child/container/child/layout/child/create/layout/maxWidth\") =\n            AnimationTrack<float>::EaseInOut(16, 0, 0.2f);\n\n        auto createAnim = instanceAnim->AddTrack<bool>(\"child/spoiler/internalWidget/mainLayout/child/container/child/layout/child/create/enabled\");\n        createAnim->AddKey(0, true);\n        createAnim->AddKey(0.05f, true);\n        createAnim->AddKey(0.055f, false);\n        createAnim->AddKey(0.2f, false);\n\n        *instanceAnim->AddTrack<float>(\"child/spoiler/internalWidget/mainLayout/child/container/child/layout/child/save/layout/maxWidth\") =\n            AnimationTrack<float>::EaseInOut(0, 16, 0.2f);\n\n        auto saveAnim = instanceAnim->AddTrack<bool>(\"child/spoiler/internalWidget/mainLayout/child/container/child/layout/child/save/enabled\");\n        saveAnim->AddKey(0, false);\n        saveAnim->AddKey(0.1f, false);\n        saveAnim->AddKey(0.105f, true);\n        saveAnim->AddKey(0.2f, true);\n\n        *instanceAnim->AddTrack<float>(\"child/spoiler/internalWidget/mainLayout/child/container/child/layout/child/remove/layout/maxWidth\") =\n            AnimationTrack<float>::EaseInOut(0, 16, 0.2f);\n\n        auto removeAnim = instanceAnim->AddTrack<bool>(\"child/spoiler/internalWidget/mainLayout/child/container/child/layout/child/remove/enabled\");\n        removeAnim->AddKey(0, false);\n        removeAnim->AddKey(0.1f, false);\n        removeAnim->AddKey(0.105f, true);\n        removeAnim->AddKey(0.2f, true);\n\n        sample->AddState(\"instance\", instanceAnim);\n\n        //         auto linkBtn = o2UI.CreateWidget<Button>(\"asset link\");\n        //         *linkBtn->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(15, 15), Vec2F());\n        //         box->AddChild(linkBtn);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n        o2UI.AddWidgetStyle(sample->CloneAsRef<AssetProperty>(), \"with caption\");\n    }\n\n    void EditorUIStyleBuilder::RebuildSceneLayersListProperty()\n    {\n        auto sample = mmake<SceneLayersListProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto box = mmake<Button>();\n        box->name = \"box\";\n        box->SetFocusable(true);\n        *box->layout = WidgetLayout::BothStretch();\n\n        auto backLayer = box->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                                       Layout::BothStretch(-9, -9, -9, -9));\n\n        auto selectLayer = box->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"),\n                                         Layout::BothStretch(-9, -9, -9, -9));\n\n        auto focusLayer = box->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"),\n                                        Layout::BothStretch(-9, -9, -9, -9));\n\n        auto pressedLayer = box->AddLayer(\"pressed\", mmake<Sprite>(\"ui/UI4_Editbox_pressed.png\"),\n                                          Layout::BothStretch(-4, -4, -5, -5));\n\n        auto arrowLayer = box->AddLayer(\"arrow\", mmake<Sprite>(\"ui/UI4_Down_icn.png\"),\n                                        Layout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(0, 0)));\n\n        box->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        box->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        box->AddState(\"pressed\", AnimationClip::EaseInOut(\"layer/pressed/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto nameText = mmake<Text>(\"stdFont.ttf\");\n        nameText->text = \"--\";\n        nameText->horAlign = HorAlign::Left;\n        nameText->verAlign = VerAlign::Middle;\n        nameText->dotsEngings = true;\n        nameText->color = Color4(96, 125, 139);\n        box->AddLayer(\"caption\", nameText, Layout::BothStretch(2, 2, 2, 2));\n\n        box->SetFocusable(true);\n        layout->AddChild(box);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildBoolProperty()\n    {\n        auto sample = mmake<BooleanProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<Toggle> toggle = o2UI.CreateToggle(\"\", \"without caption\");\n        toggle->name = \"toggle\";\n        toggle->layout->maxWidth = 20;\n        layout->AddChild(toggle);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildBorderFProperty()\n    {\n        auto sample = mmake<BorderFProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto propertiesLayout = mmake<Widget>();\n        propertiesLayout->name = \"properties\";\n        *propertiesLayout->layout = WidgetLayout::BothStretch();\n        layout->AddChild(propertiesLayout);\n\n        auto leftLabel = o2UI.CreateLabel(\"L\");\n        leftLabel->name = \"left label\";\n        leftLabel->horOverflow = Label::HorOverflow::None;\n        *leftLabel->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(leftLabel);\n\n        auto leftProperty = o2UI.CreateWidget<FloatProperty>();\n        leftProperty->name = \"left\";\n        *leftProperty->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0.25f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(leftProperty);\n\n        auto topLabel = o2UI.CreateLabel(\"T\");\n        topLabel->name = \"top label\";\n        topLabel->horOverflow = Label::HorOverflow::None;\n        *topLabel->layout = WidgetLayout(Vec2F(0.25f, 0), Vec2F(0.25f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(topLabel);\n\n        auto topProperty = o2UI.CreateWidget<FloatProperty>();\n        topProperty->name = \"top\";\n        *topProperty->layout = WidgetLayout(Vec2F(0.25f, 0), Vec2F(0.5f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(topProperty);\n\n        auto rightLabel = o2UI.CreateLabel(\"R\");\n        rightLabel->name = \"right label\";\n        rightLabel->horOverflow = Label::HorOverflow::None;\n        *rightLabel->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.5f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(rightLabel);\n\n        auto rightProperty = o2UI.CreateWidget<FloatProperty>();\n        rightProperty->name = \"right\";\n        *rightProperty->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.75f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(rightProperty);\n\n        auto bottomLabel = o2UI.CreateLabel(\"B\");\n        bottomLabel->name = \"bottom label\";\n        bottomLabel->horOverflow = Label::HorOverflow::None;\n        *bottomLabel->layout = WidgetLayout(Vec2F(0.75f, 0), Vec2F(0.75f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(bottomLabel);\n\n        auto bottomProperty = o2UI.CreateWidget<FloatProperty>();\n        bottomProperty->name = \"bottom\";\n        *bottomProperty->layout = WidgetLayout(Vec2F(0.75f, 0), Vec2F(1.0f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(bottomProperty);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildBorderIProperty()\n    {\n        auto sample = mmake<BorderIProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto propertiesLayout = mmake<Widget>();\n        propertiesLayout->name = \"properties\";\n        *propertiesLayout->layout = WidgetLayout::BothStretch();\n        layout->AddChild(propertiesLayout);\n\n        auto leftLabel = o2UI.CreateLabel(\"L\");\n        leftLabel->name = \"left label\";\n        leftLabel->horOverflow = Label::HorOverflow::None;\n        *leftLabel->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(leftLabel);\n\n        auto leftProperty = o2UI.CreateWidget<IntegerProperty>();\n        leftProperty->name = \"left\";\n        *leftProperty->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0.25f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(leftProperty);\n\n        auto topLabel = o2UI.CreateLabel(\"T\");\n        topLabel->name = \"top label\";\n        topLabel->horOverflow = Label::HorOverflow::None;\n        *topLabel->layout = WidgetLayout(Vec2F(0.25f, 0), Vec2F(0.25f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(topLabel);\n\n        auto topProperty = o2UI.CreateWidget<IntegerProperty>();\n        topProperty->name = \"top\";\n        *topProperty->layout = WidgetLayout(Vec2F(0.25f, 0), Vec2F(0.5f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(topProperty);\n\n        auto rightLabel = o2UI.CreateLabel(\"R\");\n        rightLabel->name = \"right label\";\n        rightLabel->horOverflow = Label::HorOverflow::None;\n        *rightLabel->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.5f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(rightLabel);\n\n        auto rightProperty = o2UI.CreateWidget<IntegerProperty>();\n        rightProperty->name = \"right\";\n        *rightProperty->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.75f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(rightProperty);\n\n        auto bottomLabel = o2UI.CreateLabel(\"B\");\n        bottomLabel->name = \"bottom label\";\n        bottomLabel->horOverflow = Label::HorOverflow::None;\n        *bottomLabel->layout = WidgetLayout(Vec2F(0.75f, 0), Vec2F(0.75f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(bottomLabel);\n\n        auto bottomProperty = o2UI.CreateWidget<IntegerProperty>();\n        bottomProperty->name = \"bottom\";\n        *bottomProperty->layout = WidgetLayout(Vec2F(0.75f, 0), Vec2F(1.0f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(bottomProperty);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildColorPropety()\n    {\n        auto sample = mmake<ColorProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto box = mmake<Widget>();\n        box->name = \"box\";\n        *box->layout = WidgetLayout::BothStretch();\n        box->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                      Layout::BothStretch(-9, -9, -9, -9));\n\n        layout->AddChild(box);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildComponentProperty()\n    {\n        auto sample = mmake<ComponentProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto box = mmake<Widget>();\n        box->name = \"box\";\n        box->SetFocusable(true);\n        *box->layout = WidgetLayout::BothStretch();\n\n        auto backLayer = box->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                                       Layout::BothStretch(-9, -9, -9, -9));\n\n        auto selectLayer = box->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"),\n                                         Layout::BothStretch(-9, -9, -9, -9));\n\n        auto focusLayer = box->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"),\n                                        Layout::BothStretch(-9, -9, -9, -9));\n\n        box->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        box->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        auto nameText = mmake<Text>(\"stdFont.ttf\");\n        nameText->text = \"--\";\n        nameText->horAlign = HorAlign::Left;\n        nameText->verAlign = VerAlign::Middle;\n        nameText->dotsEngings = true;\n        nameText->color = Color4(96, 125, 139);\n        box->AddLayer(\"caption\", nameText, Layout::BothStretch(2, 2, 2, 2));\n        layout->AddChild(box);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildCurveProperty()\n    {\n        auto sample = mmake<CurveProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto box = mmake<Widget>();\n        box->name = \"box\";\n        box->SetFocusable(true);\n        *box->layout = WidgetLayout::BothStretch();\n\n        auto backLayer = box->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n                                       Layout::BothStretch(-9, -9, -9, -9));\n\n        auto selectLayer = box->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"),\n                                         Layout::BothStretch(-9, -9, -9, -9));\n\n        auto focusLayer = box->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"),\n                                        Layout::BothStretch(-9, -9, -9, -9));\n\n        box->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        box->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        layout->AddChild(box);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildColorGradientProperty()\n    {\n        auto sample = mmake<ColorGradientProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto box = mmake<Widget>();\n        box->name = \"box\";\n        box->SetFocusable(true);\n        *box->layout = WidgetLayout::BothStretch();\n\n        auto backLayer = box->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Editbox_regular.png\"),\n            Layout::BothStretch(-9, -9, -9, -9));\n\n        auto selectLayer = box->AddLayer(\"hover\", mmake<Sprite>(\"ui/UI4_Editbox_select.png\"),\n            Layout::BothStretch(-9, -9, -9, -9));\n\n        auto focusLayer = box->AddLayer(\"focus\", mmake<Sprite>(\"ui/UI4_Editbox_focus.png\"),\n            Layout::BothStretch(-9, -9, -9, -9));\n\n        box->AddState(\"focused\", AnimationClip::EaseInOut(\"layer/focus/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        box->AddState(\"hover\", AnimationClip::EaseInOut(\"layer/hover/transparency\", 0.0f, 1.0f, 0.05f))\n            ->offStateAnimationSpeed = 0.5f;\n\n        layout->AddChild(box);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildEnumProperty()\n    {\n        auto sample = mmake<EnumProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<DropDown> dropDown = o2UI.CreateDropdown();\n        dropDown->name = \"dropdown\";\n        *dropDown->layout = WidgetLayout::BothStretch();\n        layout->AddChild(dropDown);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildLayerProperty()\n    {\n        auto sample = mmake<SceneLayerRefProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<DropDown> dropDown = o2UI.CreateDropdown();\n        dropDown->name = \"dropdown\";\n        *dropDown->layout = WidgetLayout::BothStretch();\n        layout->AddChild(dropDown);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRectFProperty()\n    {\n        auto sample = mmake<RectFProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto propertiesLayout = mmake<Widget>();\n        propertiesLayout->name = \"properties\";\n        *propertiesLayout->layout = WidgetLayout::BothStretch();\n        layout->AddChild(propertiesLayout);\n\n        auto leftLabel = o2UI.CreateLabel(\"L\");\n        leftLabel->name = \"left label\";\n        leftLabel->horOverflow = Label::HorOverflow::None;\n        *leftLabel->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(leftLabel);\n\n        auto leftProperty = o2UI.CreateWidget<FloatProperty>();\n        leftProperty->name = \"left\";\n        *leftProperty->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0.25f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(leftProperty);\n\n        auto topLabel = o2UI.CreateLabel(\"T\");\n        topLabel->name = \"top label\";\n        topLabel->horOverflow = Label::HorOverflow::None;\n        *topLabel->layout = WidgetLayout(Vec2F(0.25f, 0), Vec2F(0.25f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(topLabel);\n\n        auto topProperty = o2UI.CreateWidget<FloatProperty>();\n        topProperty->name = \"top\";\n        *topProperty->layout = WidgetLayout(Vec2F(0.25f, 0), Vec2F(0.5f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(topProperty);\n\n        auto rightLabel = o2UI.CreateLabel(\"R\");\n        rightLabel->name = \"right label\";\n        rightLabel->horOverflow = Label::HorOverflow::None;\n        *rightLabel->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.5f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(rightLabel);\n\n        auto rightProperty = o2UI.CreateWidget<FloatProperty>();\n        rightProperty->name = \"right\";\n        *rightProperty->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.75f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(rightProperty);\n\n        auto bottomLabel = o2UI.CreateLabel(\"B\");\n        bottomLabel->name = \"bottom label\";\n        bottomLabel->horOverflow = Label::HorOverflow::None;\n        *bottomLabel->layout = WidgetLayout(Vec2F(0.75f, 0), Vec2F(0.75f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(bottomLabel);\n\n        auto bottomProperty = o2UI.CreateWidget<FloatProperty>();\n        bottomProperty->name = \"bottom\";\n        *bottomProperty->layout = WidgetLayout(Vec2F(0.75f, 0), Vec2F(1.0f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(bottomProperty);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildRectIProperty()\n    {\n        auto sample = mmake<RectIProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto propertiesLayout = mmake<Widget>();\n        propertiesLayout->name = \"properties\";\n        *propertiesLayout->layout = WidgetLayout::BothStretch();\n        layout->AddChild(propertiesLayout);\n\n        auto leftLabel = o2UI.CreateLabel(\"L\");\n        leftLabel->name = \"left label\";\n        leftLabel->horOverflow = Label::HorOverflow::None;\n        *leftLabel->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(leftLabel);\n\n        auto leftProperty = o2UI.CreateWidget<IntegerProperty>();\n        leftProperty->name = \"left\";\n        *leftProperty->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0.25f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(leftProperty);\n\n        auto topLabel = o2UI.CreateLabel(\"T\");\n        topLabel->name = \"top label\";\n        topLabel->horOverflow = Label::HorOverflow::None;\n        *topLabel->layout = WidgetLayout(Vec2F(0.25f, 0), Vec2F(0.25f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(topLabel);\n\n        auto topProperty = o2UI.CreateWidget<IntegerProperty>();\n        topProperty->name = \"top\";\n        *topProperty->layout = WidgetLayout(Vec2F(0.25f, 0), Vec2F(0.5f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(topProperty);\n\n        auto rightLabel = o2UI.CreateLabel(\"R\");\n        rightLabel->name = \"right label\";\n        rightLabel->horOverflow = Label::HorOverflow::None;\n        *rightLabel->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.5f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(rightLabel);\n\n        auto rightProperty = o2UI.CreateWidget<IntegerProperty>();\n        rightProperty->name = \"right\";\n        *rightProperty->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.75f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(rightProperty);\n\n        auto bottomLabel = o2UI.CreateLabel(\"B\");\n        bottomLabel->name = \"bottom label\";\n        bottomLabel->horOverflow = Label::HorOverflow::None;\n        *bottomLabel->layout = WidgetLayout(Vec2F(0.75f, 0), Vec2F(0.75f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(bottomLabel);\n\n        auto bottomProperty = o2UI.CreateWidget<IntegerProperty>();\n        bottomProperty->name = \"bottom\";\n        *bottomProperty->layout = WidgetLayout(Vec2F(0.75f, 0), Vec2F(1.0f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(bottomProperty);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildStringProperty()\n    {\n        auto sample = mmake<StringProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<EditBox> editBox = o2UI.CreateEditBox(\"singleline\");\n\t\teditBox->name = \"editbox\";\n        *editBox->layout = WidgetLayout::BothStretch();\n        layout->AddChild(editBox);\n\n\t\tRef<EditBoxDropDown> editBoxDropDown = o2UI.CreateEditBoxDropDown();\n\t\teditBoxDropDown->name = \"dropdown\";\n\t\t*editBoxDropDown->layout = WidgetLayout::BothStretch();\n\t\tlayout->AddChild(editBoxDropDown);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildWStringProperty()\n    {\n        auto sample = mmake<WStringProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<EditBox> editBox = o2UI.CreateEditBox(\"singleline\");\n        *editBox->layout = WidgetLayout::BothStretch();\n        layout->AddChild(editBox);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildTagProperty()\n    {\n        auto sample = mmake<TagsProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        Ref<EditBox> editBox = o2UI.CreateEditBox(\"singleline\");\n        layout->AddChild(editBox);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildVector2FProperty()\n    {\n        auto sample = mmake<Vec2FProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto propertiesLayout = mmake<Widget>();\n        propertiesLayout->name = \"properties\";\n        *propertiesLayout->layout = WidgetLayout::BothStretch();\n        layout->AddChild(propertiesLayout);\n\n        auto xLabel = o2UI.CreateLabel(\"X\");\n        xLabel->name = \"x label\";\n        xLabel->horOverflow = Label::HorOverflow::None;\n        *xLabel->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F());\n        propertiesLayout->AddChild(xLabel);\n\n        auto xProperty = o2UI.CreateWidget<FloatProperty>();\n        xProperty->name = \"x\";\n        *xProperty->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0.5f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(xProperty);\n\n        auto yLabel = o2UI.CreateLabel(\"Y\");\n        yLabel->name = \"y label\";\n        yLabel->horOverflow = Label::HorOverflow::None;\n        *yLabel->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.5f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(yLabel);\n\n        auto yProperty = o2UI.CreateWidget<FloatProperty>();\n        yProperty->name = \"y\";\n        *yProperty->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(1.0f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(yProperty);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildVector2IProperty()\n    {\n        auto sample = mmake<Vec2IProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto propertiesLayout = mmake<Widget>();\n        propertiesLayout->name = \"properties\";\n        *propertiesLayout->layout = WidgetLayout::BothStretch();\n        layout->AddChild(propertiesLayout);\n\n        auto xLabel = o2UI.CreateLabel(\"X\");\n        xLabel->name = \"x label\";\n        xLabel->horOverflow = Label::HorOverflow::None;\n        *xLabel->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F());\n        propertiesLayout->AddChild(xLabel);\n\n        auto xProperty = o2UI.CreateWidget<IntegerProperty>();\n        xProperty->name = \"x\";\n        *xProperty->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0.5f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(xProperty);\n\n        auto yLabel = o2UI.CreateLabel(\"Y\");\n        yLabel->name = \"y label\";\n        yLabel->horOverflow = Label::HorOverflow::None;\n        *yLabel->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.5f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(yLabel);\n\n        auto yProperty = o2UI.CreateWidget<IntegerProperty>();\n        yProperty->name = \"y\";\n        *yProperty->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(1.0f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(yProperty);\n\n        o2UI.AddWidgetStyle(sample, \"standard\");\n    }\n\n    void EditorUIStyleBuilder::RebuildColoredVector2Property()\n    {\n        auto sample = mmake<Vec2FProperty>();\n        sample->layout->minHeight = 20;\n        sample->expandHeight = true;\n        sample->expandWidth = true;\n        sample->fitByChildren = false;\n\n        auto layoutContainer = mmake<Widget>();\n        layoutContainer->name = \"container\";\n        *layoutContainer->layout = WidgetLayout::BothStretch();\n        sample->AddChild(layoutContainer);\n\n        auto layout = mmake<HorizontalLayout>();\n        layout->name = \"layout\";\n        *layout->layout = WidgetLayout::BothStretch();\n        layoutContainer->AddChild(layout);\n\n        auto propertiesLayout = mmake<Widget>();\n        propertiesLayout->name = \"properties\";\n        *propertiesLayout->layout = WidgetLayout::BothStretch();\n        layout->AddChild(propertiesLayout);\n\n        auto xLabel = o2UI.CreateLabel(\"X\");\n        xLabel->name = \"x label\";\n        xLabel->horOverflow = Label::HorOverflow::None;\n        *xLabel->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F());\n        propertiesLayout->AddChild(xLabel);\n\n        auto xProperty = o2UI.CreateWidget<FloatProperty>(\"red\");\n        xProperty->name = \"x\";\n        *xProperty->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0.5f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(xProperty);\n\n        auto yLabel = o2UI.CreateLabel(\"Y\");\n        yLabel->name = \"y label\";\n        yLabel->horOverflow = Label::HorOverflow::None;\n        *yLabel->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.5f, 0), Vec2F(0, 0), Vec2F(20, 20));\n        propertiesLayout->AddChild(yLabel);\n\n        auto yProperty = o2UI.CreateWidget<FloatProperty>(\"green\");\n        yProperty->name = \"y\";\n        *yProperty->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(1.0f, 1.0f), Vec2F(20, 0), Vec2F(0, 0));\n        propertiesLayout->AddChild(yProperty);\n\n        o2UI.AddWidgetStyle(sample, \"colored\");\n    }\n\n    void EditorUIStyleBuilder::RebuildPropertiesWithCaptins()\n    {\n        BuildPropertyWithCaption<ActorProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<BooleanProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<BorderFProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<BorderIProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<ColorProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<ComponentProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<CurveProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<ColorGradientProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<EnumProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<FloatProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<IntegerProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<SceneLayerRefProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<RectFProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<RectIProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<StringProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<TagsProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<Vec2FProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<Vec2FProperty>(\"colored\", \"colored with caption\");\n        BuildPropertyWithCaption<Vec2IProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<WStringProperty>(\"standard\", \"with caption\");\n        BuildPropertyWithCaption<SceneLayersListProperty>(\"standard\", \"with caption\");\n    }\n\n    void EditorUIStyleBuilder::RebuildEditorUIManager(const String& stylesFolder, bool saveStyle /*= true*/, bool checkEditedDate /*= true*/)\n    {\n        PushEditorScopeOnStack scope;\n\n        String thisSourcePath = \"../../o2/Editor/Sources/o2Editor/UI/Style/EditorUIStyle.cpp\";\n        TimeStamp thisSourceEditedDate = o2FileSystem.GetFileInfo(thisSourcePath).editDate;\n\n        DataDocument stylesRebuildDateData;\n        if (stylesRebuildDateData.LoadFromFile(GetEditorAssetsPath() + stylesFolder + \"/rebuildDate.json\"))\n        {\n            TimeStamp cachedDate = stylesRebuildDateData[\"generatedDate\"];\n\n            if (thisSourceEditedDate == cachedDate && checkEditedDate)\n            {\n                o2UI.LoadStyle(stylesFolder);\n                return;\n            }\n        }\n\n        o2UI.ClearStyle();\n\n        auto funcs = GetType().GetFunctionsWithBaseClasses();\n\n        Timer timer;\n        for (auto& func : funcs)\n        {\n            if (func->GetName() == \"RebuildBasicUIManager\" || func->GetName() == \"RebuildEditorUIManager\" ||\n                func->GetProtectionSection() != ProtectSection::Public)\n            {\n                continue;\n            }\n\n            timer.Reset();\n            func->Invoke<void>(this);\n\n            auto time = timer.GetDeltaTime();\n            o2Debug.Log(func->GetName() + \" for \" + (String)time + \" sec\");\n        }\n\n        if (saveStyle)\n        {\n            o2UI.SaveStyle(stylesFolder);\n\n            DataDocument newStylesRebuildDateData;\n            newStylesRebuildDateData[\"generatedDate\"] = thisSourceEditedDate;\n            newStylesRebuildDateData.SaveToFile(GetEditorAssetsPath() + stylesFolder + \"/rebuildDate.json\");\n        }\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AnimationTree>);\n// --- META ---\n\nDECLARE_CLASS(Editor::EditorUIStyleBuilder, Editor__EditorUIStyleBuilder);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/Style/EditorUIStyle.h",
    "content": "#pragma once\n\n#include \"o2Editor/UI/Style/BasicUIStyle.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    class EditorUIStyleBuilder: public BasicUIStyleBuilder\n    {\n    public:\n        void RebuildDockableWndStyle();\n        void RebuildPlayStopButtonStyle();\n        void RebuildPauseButtonStyle();\n        void RebuildStepButtonStyle();\n        void RebuildRoundDropDown();\n        void RebuildMenuPanelDropDown();\n        void RebuildSearchButton();\n        void RebuildListTreeToggle();\n        void RebuildRevertBtn();\n        void RebuildActorsTreeNodeEnableToggle();\n        void RebuildActorsTreeLockToggle();\n        void RebuildActorsTreeLinkBtn();\n        void RebuildActorsTree();\n        void RebuildDrawOrderTree();\n        void RebuildPanelDownButton();\n        void RebuildTrashDownPanelButton();\n        void RebuildMessagesDownPanelToggle();\n        void RebuildWarningsDownPanelToggle();\n        void RebuildErrorsDownPanelToggle();\n        void RebuildFilterMenuButton();\n        void RebuildTreeMenuButton();\n        void RebuildFoldersTree();\n        void RebuildRegularAssetIcon();\n        void RebuildAssetsGridScroll();\n        void RebuildLinkBtn();\n        void RebuildSinglelineEditboxProperty();\n        void RebuildEditorDropdown();\n        void RebuildRedEditBoxStyle();\n        void RebuildGreenEditBoxStyle();\n\n        void RebuildPreviewMenuToggle();\n        void RebuildRecordMenuToggle();\n        void RebuildRewindLeftMenuButton();\n        void RebuildMoveLeftMenuButton();\n        void RebuildPlayStopMenuToggle();\n        void RebuildRewindRightMenuButton();\n        void RebuildMoveRightMenuButton();\n        void RebuildLoopMenuToggle();\n        void RebuildAddKeyMenuButton();\n        void RebuildCurvesMenuToggle();\n        void RebuildPropertiesMenuButton();\n\n        void RebuildNewAssetMenuButton();\n\t\tvoid RebuildOpenAssetMenuButton();\n\t\tvoid RebuildSaveAssetMenuButton();\n\t\tvoid RebuildSaveAsAssetMenuButton();\n\t\tvoid RebuildRevertAssetMenuButton();\n\n        void RebuildAddKeyButton();\n        void RebuildAddKeyDotButton();\n\n        void RebuildAddSmallBtn();\n        void RebuildRemoveSmallBtn();\n\n        void RebuildCreateAssetInstanceBtn();\n        void RebuildRemoveAssetInstanceBtn();\n\t\tvoid RebuildSaveAssetInstanceBtn();\n\n\t\tvoid RebuildAnimationStateViewerEditButton();\n\t\tvoid RebuildAnimationStateViewerPlayToggle();\n\t\tvoid RebuildAnimationStateViewerLoopToggle();\n\t\tvoid RebuildAnimationStateViewerProgressBar();\n\n        void RebuildFloatProperty();\n        void RebuildRedFloatProperty();\n        void RebuildGreenFloatProperty();\n        void RebuildIntegerProperty();\n        void RebuildActorProperty();\n        void RebuildBoolProperty();\n        void RebuildBorderFProperty();\n        void RebuildBorderIProperty();\n        void RebuildColorPropety();\n        void RebuildComponentProperty();\n        void RebuildCurveProperty();\n        void RebuildColorGradientProperty();\n        void RebuildEnumProperty();\n        void RebuildLayerProperty();\n        void RebuildRectFProperty();\n        void RebuildRectIProperty();\n        void RebuildStringProperty();\n        void RebuildWStringProperty();\n        void RebuildTagProperty();\n        void RebuildVector2FProperty();\n        void RebuildVector2IProperty();\n        void RebuildColoredVector2Property();\n        void RebuildAssetPropety();\n        void RebuildSceneLayersListProperty();\n\n        void RebuildPropertiesWithCaptins();\n\n        void RebuildActorHeadEnableToggle();\n        void RebuildActorHeadEnableProperty();\n\n        void RebuildActorHeadName();\n        void RebuildActorHeadNameProperty();\n        void RebuildActorHeadDepthProperty();\n\n        void RebuildActorHeadLockToggle();\n        void RebuildActorHeadLockProperty();\n\n        void RebuildActorHeadActorAssetProperty();\n\n        void RebuildActorHeadTags();\n        void RebuildActorHeadTagsProperty();\n\n        void RebuildActorHeadLayer();\n        void RebuildActorHeadLayerProperty();\n\n        void RebuildAcceptPrototypeBtn();\n        void RebuildRevertPrototypeBtn();\n        void RebuildBreakPrototypeBtn();\n        void RebuildPlayGreenBtn();\n        void RebuildComponentOptionsBtn();\n        void RebuildComponentSaveBtn();\n        void RebuildHorWideScrollbar();\n        void RebuildVerWideScrollbar();\n        void RebuildHorWideProgressbar();\n\t\tvoid RebuildVerWideProgressbar();\n\n        void RebuildAnimationTree();\n        void RebuildAnimationPropertiesTree();\n\n        void RebuildSpoilerWithHead();\n\n        void RebuildAddComponentButton();\n        void RebuildAddComponentsTree();\n\n        void RebuildAnimationSpoiler();\n\n        void RebuildBacklessDropdownButton();\n        void RebuildMemoryAnalyzerTree();\n\n\t\tvoid RebuildASGStateWidget();\n\n        void RebuildEditorUIManager(const String& stylesFolder, bool saveStyle = true, bool checkEditedDate = true);\n\n        IOBJECT(EditorUIStyleBuilder);\n\n    private: \n        template<typename _property_type>\n        void BuildPropertyWithCaption(const String& propertyStyle, const String& propertyWithCaptionStyle);\n\n    };\n\n    template<typename _property_type>\n    void EditorUIStyleBuilder::BuildPropertyWithCaption(const String& propertyStyle, const String& propertyWithCaptionStyle)\n    {\n        Ref<_property_type> property = o2UI.CreateWidget<_property_type>(propertyStyle);\n\n        auto label = o2UI.CreateWidget<Label>();\n        label->name = \"propertyName\";\n        label->horAlign = HorAlign::Left;\n        label->layout->widthWeight = 0.6f;\n        label->horOverflow = Label::HorOverflow::Dots;\n\n        property->AddChild(label, 0);\n        property->borderLeft = 10;\n\n        o2UI.AddWidgetStyle(property, propertyWithCaptionStyle);\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::EditorUIStyleBuilder)\n{\n    BASE_CLASS(o2::BasicUIStyleBuilder);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::EditorUIStyleBuilder)\n{\n}\nEND_META;\nCLASS_METHODS_META(Editor::EditorUIStyleBuilder)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildDockableWndStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildPlayStopButtonStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildPauseButtonStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildStepButtonStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRoundDropDown);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildMenuPanelDropDown);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildSearchButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildListTreeToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRevertBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorsTreeNodeEnableToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorsTreeLockToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorsTreeLinkBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorsTree);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildDrawOrderTree);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildPanelDownButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildTrashDownPanelButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildMessagesDownPanelToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildWarningsDownPanelToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildErrorsDownPanelToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildFilterMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildTreeMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildFoldersTree);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRegularAssetIcon);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAssetsGridScroll);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildLinkBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildSinglelineEditboxProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildEditorDropdown);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRedEditBoxStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildGreenEditBoxStyle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildPreviewMenuToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRecordMenuToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRewindLeftMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildMoveLeftMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildPlayStopMenuToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRewindRightMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildMoveRightMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildLoopMenuToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAddKeyMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildCurvesMenuToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildPropertiesMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildNewAssetMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildOpenAssetMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildSaveAssetMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildSaveAsAssetMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRevertAssetMenuButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAddKeyButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAddKeyDotButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAddSmallBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRemoveSmallBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildCreateAssetInstanceBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRemoveAssetInstanceBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildSaveAssetInstanceBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAnimationStateViewerEditButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAnimationStateViewerPlayToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAnimationStateViewerLoopToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAnimationStateViewerProgressBar);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildFloatProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRedFloatProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildGreenFloatProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildIntegerProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildBoolProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildBorderFProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildBorderIProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildColorPropety);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildComponentProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildCurveProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildColorGradientProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildEnumProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildLayerProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRectFProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRectIProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildStringProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildWStringProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildTagProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildVector2FProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildVector2IProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildColoredVector2Property);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAssetPropety);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildSceneLayersListProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildPropertiesWithCaptins);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadEnableToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadEnableProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadName);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadNameProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadDepthProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadLockToggle);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadLockProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadActorAssetProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadTags);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadTagsProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadLayer);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildActorHeadLayerProperty);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAcceptPrototypeBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildRevertPrototypeBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildBreakPrototypeBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildPlayGreenBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildComponentOptionsBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildComponentSaveBtn);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildHorWideScrollbar);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildVerWideScrollbar);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildHorWideProgressbar);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildVerWideProgressbar);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAnimationTree);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAnimationPropertiesTree);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildSpoilerWithHead);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAddComponentButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAddComponentsTree);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildAnimationSpoiler);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildBacklessDropdownButton);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildMemoryAnalyzerTree);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildASGStateWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildEditorUIManager, const String&, bool, bool);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/TexturePreview.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"TexturePreview.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2Editor/Utils/CommonTextures.h\"\n#include \"o2/Scene/ActorTransform.h\"\n\nnamespace Editor\n{\n    TexturePreview::TexturePreview(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        mTextureSprite = mmake<Sprite>();\n        mBackgroundSprite = mmake<Sprite>(CommonTextures::checkedBackground);\n        mBackgroundSprite->SetMode(SpriteMode::Tiled);\n\n        AddLayer(\"background\", mBackgroundSprite, Layout::BothStretch(0, mLabelHeight, 0, 0));\n        AddLayer(\"texture\", mTextureSprite, Layout::BothStretch(0, mLabelHeight, 0, 0));\n\n        mTextureInfoLabel = o2UI.CreateLabel(\"\");\n        *mTextureInfoLabel->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, mLabelHeight);\n        AddChild(mTextureInfoLabel);\n    }\n\n    TexturePreview::TexturePreview(RefCounter* refCounter, const TexturePreview& other):\n        Widget(refCounter, other)\n    {\n        mBackgroundSprite = GetLayerDrawable<Sprite>(\"background\");\n        mTextureSprite = GetLayerDrawable<Sprite>(\"texture\");\n\n        mTextureInfoLabel = FindChildByType<Label>();\n    }\n\n    void TexturePreview::SetTexture(const TextureRef& texture, const RectI& srcRect /*= RectI()*/)\n    {\n        mTextureSprite->SetTexture(texture);\n\n        RectI rect = srcRect == RectI() ? RectI(Vec2I(), texture->GetSize()) : srcRect;\n        mTextureSprite->SetTextureSrcRect(rect);\n\n        if (texture->GetFileName().IsEmpty())\n            mTextureInfoLabel->SetText(\"(Runtime): \" + (String)rect.Width() + \"x\" + (String)rect.Height());\n        else\n            mTextureInfoLabel->SetText(texture->GetFileName() + \": \" + (String)rect.Width() + \"x\" + (String)rect.Height());\n    }\n\n    void TexturePreview::UpdateLayersLayouts()\n    {\n        Widget::UpdateLayersLayouts();\n\n        Vec2F spriteSize = layout->GetWorldRect().Size();\n        spriteSize.y -= mLabelHeight;\n\n        Vec2F textureSize = mTextureSprite->GetTextureSrcRect().Size();\n        float xSize = textureSize.x * spriteSize.y / textureSize.y;\n\n        if (xSize > spriteSize.x)\n        {\n            float ySize = textureSize.y * spriteSize.x / textureSize.x;\n            mTextureSprite->SetSize(Vec2F(spriteSize.x, ySize));\n            mBackgroundSprite->SetSize(Vec2F(spriteSize.x, ySize));\n        }\n        else\n        {\n            mTextureSprite->SetSize(Vec2F(xSize, spriteSize.y));\n            mBackgroundSprite->SetSize(Vec2F(xSize, spriteSize.y));\n        }\n    }\n\n    TexturePreview& TexturePreview::operator=(const TexturePreview& other)\n    {\n        Widget::operator=(other);\n\n        mBackgroundSprite = GetLayerDrawable<Sprite>(\"background\");\n        mTextureSprite = GetLayerDrawable<Sprite>(\"texture\");\n\n        mTextureInfoLabel = FindChildByType<Label>();\n\n        return *this;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::TexturePreview>);\n// --- META ---\n\nDECLARE_CLASS(Editor::TexturePreview, Editor__TexturePreview);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UI/TexturePreview.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Render/TextureRef.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Sprite;\n    class Label;\n}\n\nnamespace Editor\n{\n    // ----------------------\n    // Texture preview widget\n    // ----------------------\n    class TexturePreview: public Widget\n    {\n    public:\n        // Default constructor. Initializes image\n        TexturePreview(RefCounter* refCounter);\n\n        // Default copy-constructor\n        TexturePreview(RefCounter* refCounter, const TexturePreview& other);\n\n        // Copy operator\n        TexturePreview& operator=(const TexturePreview& other);\n\n        // Sets viewing curve\n        void SetTexture(const TextureRef& texture, const RectI& srcRect = RectI());\n\n        SERIALIZABLE(TexturePreview);\n        CLONEABLE_REF(TexturePreview);\n\n    protected:\n        const float mLabelHeight = 20.0f; // Height of the label with texture info\n\n        Ref<Sprite> mBackgroundSprite; // Background sprite (chessmate pattern)\n        Ref<Sprite> mTextureSprite;    // Texture sprite\n        Ref<Label>  mTextureInfoLabel; // Texture info label\n\n    protected:\n        // Updates layers layouts, calls after updating widget layout; calculates sprite size\n        void UpdateLayersLayouts() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::TexturePreview)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::TexturePreview)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(20.0f).NAME(mLabelHeight);\n    FIELD().PROTECTED().NAME(mBackgroundSprite);\n    FIELD().PROTECTED().NAME(mTextureSprite);\n    FIELD().PROTECTED().NAME(mTextureInfoLabel);\n}\nEND_META;\nCLASS_METHODS_META(Editor::TexturePreview)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const TexturePreview&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTexture, const TextureRef&, const RectI&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersLayouts);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UIRoot.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"UIRoot.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n\nDECLARE_SINGLETON(Editor::UIRoot);\n\nnamespace Editor\n{\n    UIRoot::UIRoot(RefCounter* refCounter):\n        Singleton<UIRoot>(refCounter)\n    {\n        mRootWidget = mmake<Widget>(ActorCreateMode::NotInScene);\n    }\n\n    UIRoot::~UIRoot()\n    {}\n\n    Ref<Widget> UIRoot::AddWidget(const Ref<Widget>& widget)\n    {\n        mRootWidget->AddChild(widget);\n        return widget;\n    }\n\n    void UIRoot::RemoveWidget(const Ref<Widget>& widget)\n    {\n        mRootWidget->RemoveChild(widget);\n    }\n\n    void UIRoot::RemoveAllWidgets()\n    {\n        mRootWidget->RemoveAllChildren();\n    }\n\n    const Ref<Widget>& UIRoot::GetRootWidget()\n    {\n        return mRootWidget;\n    }\n\n    void UIRoot::Draw()\n    {\n        mRootWidget->Draw();\n    }\n\n    void UIRoot::Update(float dt)\n    {\n        mRootWidget->Update(dt);\n        mRootWidget->UpdateChildren(dt);\n    }\n\n    void UIRoot::OnApplicationSized()\n    {\n        *mRootWidget->layout = WidgetLayout::Based(BaseCorner::Center, (Vec2F)o2Application.GetContentSize());\n        mRootWidget->UpdateTransform();\n    }\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/UIRoot.h",
    "content": "#pragma once\n\n#include \"o2/Events/ApplicationEventsListener.h\"\n#include \"o2/Events/CursorAreaEventsListenersLayer.h\"\n#include \"o2/Utils/Singleton.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n}\n\n// Editor UI root accessor macros\n#define EditorUIRoot UIRoot::Instance()\n\nnamespace Editor\n{\n    // --------------\n    // Editor UI root\n    // --------------\n    class UIRoot: public Singleton<UIRoot>, public ApplicationEventsListener\n    {\n    public:\n        // Default constructor, creates root widget\n        UIRoot(RefCounter* refCounter);\n\n        // Destructor\n        ~UIRoot();\n\n        // Adds widget to root\n        Ref<Widget> AddWidget(const Ref<Widget>& widget);\n\n        // Removes widget from root\n        void RemoveWidget(const Ref<Widget>& widget);\n\n        // Removes all widgets from root\n        void RemoveAllWidgets();\n\n        // Returns root widget\n        const Ref<Widget>& GetRootWidget();\n\n    private:\n        Ref<Widget> mRootWidget; // Root widget for editor UI\n\n    private:\n        // Draws root widget\n        void Draw();\n\n        // Updates root widget\n        void Update(float dt);\n\n        // Called when application frame was resized, updates root size\n        void OnApplicationSized() override;\n\n        REF_COUNTERABLE_IMPL(RefCounterable);\n\n        friend class EditorApplication;\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Utils/CommonTextures.cpp",
    "content": "#include \"CommonTextures.h\"\n\nnamespace Editor\n{\n    void CommonTextures::Initialize()\n    {\n        Color4 color1(1.0f, 1.0f, 1.0f, 1.0f), color2(0.7f, 0.7f, 0.7f, 1.0f);\n        Bitmap backLayerBitmap(PixelFormat::R8G8B8A8, Vec2I(20, 20));\n        backLayerBitmap.Fill(color1);\n        backLayerBitmap.FillRect(0, 10, 10, 00, color2);\n        backLayerBitmap.FillRect(10, 20, 20, 10, color2);\n        checkedBackground = TextureRef(backLayerBitmap);\n    }\n\n    TextureRef CommonTextures::checkedBackground;\n}"
  },
  {
    "path": "Editor/Sources/o2Editor/Utils/CommonTextures.h",
    "content": "#include \"o2Editor/stdafx.h\"\n\n#include \"o2/Render/TextureRef.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // ----------------------\n    // Editor common textures\n    // ----------------------\n    struct CommonTextures\n    {\n        // Initializes common textures\n        static void Initialize();\n\n        static TextureRef checkedBackground;\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationStateGraphWindow/AnimationGraphTransitionViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AnimationGraphTransitionViewer.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/Components/AnimationComponent.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n\nnamespace Editor\n{\n    const Type* AnimationGraphTransitionViewer::GetViewingObjectType() const\n    {\n        if (mRealObjectType)\n            return mRealObjectType;\n\n        return GetViewingObjectTypeStatic();\n    }\n\n    const Type* AnimationGraphTransitionViewer::GetViewingObjectTypeStatic()\n    {\n        return &TypeOf(AnimationStateGraphEditor::StateTransition);\n    }\n\n\tvoid AnimationGraphTransitionViewer::RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n\t{\n\t\tPushEditorScopeOnStack scope;\n\n\t\tDefaultObjectPropertiesViewer::RebuildProperties(targetObjets);\n\n\t\t// Create custom duration widget\n\t\tmDurationWidget = mmake<Widget>();\n\t\t*mDurationWidget->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 80.0f);\n\t\tmDurationWidget->layout->minHeight = 80.0f;\n\t\tmDurationWidget->onDraw = THIS_FUNC(DrawDurationWidget);\n\t\tmSpoiler->AddChild(mDurationWidget);\n\n\t\t// Create begin time range handle\n\t\tmBeginTimeRangeHandle = mmake<DragHandle>();\n\t\tmBeginTimeRangeHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI4_Right_icn.png\"));\n\t\tmBeginTimeRangeHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"));\n\t\tmBeginTimeRangeHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"));\n\t\tmBeginTimeRangeHandle->angle = -Math::PI() / 2.0f;\n\n\t\tmBeginTimeRangeHandle->onChangedPos = [this](const Vec2F& pos) { \n\t\t\tif (auto transition = mTransition.Lock())\n\t\t\t\ttransition->transition->beginTimeRange = Math::Clamp(pos.x / mSourceDuration, 0.0f, transition->transition->endTimeRange);\n\n\t\t\tUpdateHandlesPositions();\n\t\t};\n\n\t\tmBeginTimeRangeHandle->localToScreenTransformFunc = [this](const Vec2F& pos) { \n\t\t\treturn Vec2F(TimeToPosition(pos.x), mDurationWidget->layout->worldTop - 1);\n\t\t};\n\n\t\tmBeginTimeRangeHandle->screenToLocalTransformFunc = [this](const Vec2F& pos) { \n\t\t\treturn Vec2F(PositionToTime(pos.x), 0);\n\t\t};\n\n\t\t// Create end time range handle\n\t\tmEndTimeRangeHandle = mmake<DragHandle>();\n\t\tmEndTimeRangeHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI4_Right_icn.png\"));\n\t\tmEndTimeRangeHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"));\n\t\tmEndTimeRangeHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"));\n\t\tmEndTimeRangeHandle->angle = -Math::PI() / 2.0f;\n\n\t\tmEndTimeRangeHandle->onChangedPos = [this](const Vec2F& pos) { \n\t\t\tif (auto transition = mTransition.Lock())\n\t\t\t\ttransition->transition->endTimeRange = Math::Clamp(pos.x / mSourceDuration, transition->transition->beginTimeRange, 1.0f);\n\n\t\t\tUpdateHandlesPositions();\n\t\t};\n\n\t\tmEndTimeRangeHandle->localToScreenTransformFunc = mBeginTimeRangeHandle->localToScreenTransformFunc;\n\t\tmEndTimeRangeHandle->screenToLocalTransformFunc = mBeginTimeRangeHandle->screenToLocalTransformFunc;\n\n\t\t// Create duration handle\n\t\tmDurationHandle = mmake<DragHandle>();\n\t\tmDurationHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI4_Right_icn.png\"));\n\t\tmDurationHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI4_Right_icn_select.png\"));\n\t\tmDurationHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI4_Right_icn_pressed.png\"));\n\t\tmDurationHandle->angle = Math::PI() / 2.0f;\n\n\t\tmDurationHandle->onChangedPos = [this](const Vec2F& pos) { \n\t\t\tif (auto transition = mTransition.Lock())\n\t\t\t\ttransition->transition->duration = Math::Clamp(pos.x - transition->transition->beginTimeRange * mSourceDuration, 0.0f, mDestinationDuration);\n\n\t\t\tUpdateHandlesPositions();\n\t\t};\n\n\t\tmDurationHandle->localToScreenTransformFunc = [this](const Vec2F& pos) { \n\t\t\treturn Vec2F(TimeToPosition(pos.x), mDurationWidget->layout->worldTop - mDurationBarHeight*2.0f - 9);\n\t\t};\n\n\t\tmDurationHandle->screenToLocalTransformFunc = [this](const Vec2F& pos) {\n\t\t\treturn Vec2F(PositionToTime(pos.x), 0);\n\t\t};\n\n\t\t// Initialize sprites\n\t\tmSourceRangeSprite = mmake<Sprite>(\"ui/UI4_animation_bar.png\");\n\t\tmDestinationRangeSprite = mmake<Sprite>(\"ui/UI4_animation_bar.png\");\n\n\t\tmRangeSprite = mmake<Sprite>();\n\t\tmRangeSprite->SetColor(Color4(255, 255, 255, 125));\n\n\t\t// Transition mesh\n\t\t//  [0]--------[1]\n\t\t//   |          | \\\n\t\t//  [2]--------[3] [4]--------[5] \n\t\t//                \\ |          |\n\t\t//                 [6]--------[7]\n\t\tmTransitionMesh = mmake<Mesh>(TextureRef(), 8, 6);\n\t\tmTransitionMesh->vertexCount = 8;\n\t\tmTransitionMesh->polyCount = 6;\n\t\tVertexIndex* transIdx = mTransitionMesh->GetIndexes();\n\t\ttransIdx[0] = 0; transIdx[1] = 1; transIdx[2] = 2;\n\t\ttransIdx[3] = 1; transIdx[4] = 3; transIdx[5] = 2;\n\t\ttransIdx[6] = 1; transIdx[7] = 4; transIdx[8] = 3;\n\t\ttransIdx[9] = 3; transIdx[10] = 4; transIdx[11] = 6;\n\t\ttransIdx[12] = 4; transIdx[13] = 5; transIdx[14] = 6;\n\t\ttransIdx[15] = 6; transIdx[16] = 5; transIdx[17] = 7;\n\n\t\t// State names texts\n\t\tmSourceStateName = mmake<Text>(\"stdFont.ttf\");\n\t\tmSourceStateName->height = 12;\n\t\tmSourceStateName->verAlign = VerAlign::Middle;\n\t\tmSourceStateName->horAlign = HorAlign::Left;\n\n\t\tmDestinationStateName = mmake<Text>(\"stdFont.ttf\");\n\t\tmDestinationStateName->height = 12;\n\t\tmDestinationStateName->verAlign = VerAlign::Middle;\n\t\tmDestinationStateName->horAlign = HorAlign::Left;\n\t}\n\n\tvoid AnimationGraphTransitionViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjects)\n    {\n        if (targetObjects.IsEmpty())\n\t\t\treturn;\n\n\t\tmSpoiler->AddChild(mDurationWidget);\n\n        auto transitionWrapper = dynamic_cast<AnimationStateGraphEditor::StateTransition*>(targetObjects.Last().first);\n        if (!transitionWrapper)\n            return;\n\n        mTransition = Ref(transitionWrapper);\n\n\t\tmSourceDuration      = 1.0f; \n\t\tmDestinationDuration = 1.0f; \n\n\t\tauto sourceStateWrapper = transitionWrapper->owner.Lock();\n\t\tif (sourceStateWrapper)\n\t\t{\n\t\t\tmSourceDuration = 0.0f;\n\n\t\t\tbool animationNameUpdated = false;\n\t\t\tfor (auto& animation : sourceStateWrapper->animations)\n\t\t\t{\n\t\t\t\tif (auto state = animation->state.Lock())\n\t\t\t\t{\n\t\t\t\t\tmSourceDuration = Math::Max(mSourceDuration, state->GetDuration());\n\n\t\t\t\t\tif (!animationNameUpdated && animation->animation)\n\t\t\t\t\t{\n\t\t\t\t\t\tmSourceStateName->text = animation->animation.Lock()->GetName();\n\t\t\t\t\t\tanimationNameUpdated = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tauto destinationStateWrapper = transitionWrapper->destination.Lock();\n\t\tif (destinationStateWrapper)\n\t\t{\n\t\t\tmDestinationDuration = 0.0f;\n\n\t\t\tbool animationNameUpdated = false;\n\t\t\tfor (auto& animation : destinationStateWrapper->animations)\n\t\t\t{\n\t\t\t\tif (auto state = animation->state.Lock())\n\t\t\t\t{\n\t\t\t\t\tmDestinationDuration = Math::Max(mDestinationDuration, state->GetDuration());\n\n\t\t\t\t\tif (!animationNameUpdated && animation->animation)\n\t\t\t\t\t{\n\t\t\t\t\t\tmDestinationStateName->text = animation->animation.Lock()->GetName();\n\t\t\t\t\t\tanimationNameUpdated = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n        // Update handles positions\n        UpdateHandlesPositions();\n    }\n\n    void AnimationGraphTransitionViewer::DrawDurationWidget()\n    {\n        if (!mTransition || mSourceDuration < Math::Epsilon || mDestinationDuration < Math::Epsilon)\n            return;\n\n\t\tfloat durationBarsSpace = 1.0f;\n\t\tfloat widgetTopDownBorders = 5;\n\n\t\tColor4 solidBarColor(255, 255, 255, 255);\n\t\tColor4 transparentBarColor(255, 255, 255, 0);\n\n\t\tRectF widgetRect = mDurationWidget->layout->GetWorldRect();\n\t\twidgetRect.top -= widgetTopDownBorders;\n\t\twidgetRect.bottom += widgetTopDownBorders;\n\n\t\tfloat sourceRangeBeginTime = 0.0f;\n\t\tfloat sourceRangeEndTime = mSourceDuration;\n\n\t\tfloat destinationRangeBeginTime = mSourceDuration * mTransition.Lock()->transition->beginTimeRange;\n\t\tfloat destinationRangeEndTime = destinationRangeBeginTime + mDestinationDuration;\n\n\t\tfloat sourceRangeBeginPosition = TimeToPosition(sourceRangeBeginTime);\n\t\tfloat sourceRangeEndPosition = TimeToPosition(sourceRangeEndTime);\n\t\tfloat sourceRangePositionDelta = sourceRangeEndPosition - sourceRangeBeginPosition;\n\n\t\tfloat destinationRangeBeginPosition = TimeToPosition(destinationRangeBeginTime);\n\t\tfloat destinationRangeEndPosition = TimeToPosition(destinationRangeEndTime);\n\t\tfloat destinationRangePositionDelta = destinationRangeEndPosition - destinationRangeBeginPosition;\n\n\t\tfloat destinationDurationPosition = TimeToPosition(destinationRangeBeginTime + mTransition.Lock()->transition->duration);\n\n\t\t// Source animation duration bars\n\t\tRectF sourceRect(widgetRect.left, widgetRect.top, \n\t\t\t\t\t\t widgetRect.right, widgetRect.top - mDurationBarHeight);\n\n\t\tmSourceRangeSprite->SetCornerColors(transparentBarColor, solidBarColor, solidBarColor, transparentBarColor);\n\t\tmSourceRangeSprite->rect = RectF(sourceRect.left, sourceRect.top,\n\t\t\t\t\t\t\t\t\t\t sourceRangeBeginPosition - durationBarsSpace, sourceRect.bottom);\n\n        mSourceRangeSprite->Draw();\n\n\t\tmSourceRangeSprite->SetCornerColors(solidBarColor, solidBarColor, solidBarColor, solidBarColor);\n\t\tfloat sourceRangeBeginItPosition = sourceRangeBeginPosition;\n\t\twhile (sourceRangeBeginItPosition + sourceRangePositionDelta < widgetRect.right)\n\t\t{\n\t\t\tmSourceRangeSprite->rect = RectF(sourceRangeBeginItPosition + durationBarsSpace, sourceRect.top,\n\t\t\t\t\t\t\t\t\t\t\t sourceRangeBeginItPosition + sourceRangePositionDelta - durationBarsSpace, sourceRect.bottom);\n\n\t\t\tsourceRangeBeginItPosition += sourceRangePositionDelta;\n\n\t\t\tmSourceRangeSprite->Draw();\n\t\t}\n\n\t\tmSourceRangeSprite->SetCornerColors(solidBarColor, transparentBarColor, transparentBarColor, solidBarColor);\n\t\tmSourceRangeSprite->rect = RectF(sourceRangeBeginItPosition + durationBarsSpace, sourceRect.top,\n\t\t\t\t\t\t\t\t\t\t sourceRangeBeginItPosition + mHandlesOffset, sourceRect.bottom);\n\n\t\tmSourceRangeSprite->Draw();\n\n\t\t// Destination animation duration bars\t\n\t\tRectF destRect(widgetRect.left, widgetRect.top - mDurationBarHeight - durationBarsSpace, \n\t\t\t\t\t   widgetRect.right, widgetRect.top - 2*mDurationBarHeight - durationBarsSpace);\n\n\t\tmDestinationRangeSprite->SetCornerColors(solidBarColor, solidBarColor, solidBarColor, solidBarColor);\n\t\tfloat destinationRangeBeginItPosition = destinationRangeBeginPosition;\n\t\twhile (destinationRangeBeginItPosition + destinationRangePositionDelta < widgetRect.right)\n\t\t{\n\t\t\tmDestinationRangeSprite->rect = RectF(destinationRangeBeginItPosition + durationBarsSpace, destRect.top,\n\t\t\t\t\t\t\t\t\t\t\t\t  destinationRangeBeginItPosition + destinationRangePositionDelta - durationBarsSpace, destRect.bottom);\n\t\t\tdestinationRangeBeginItPosition += destinationRangePositionDelta;\n\t\t\tmDestinationRangeSprite->Draw();\n\t\t}\n\n\t\tmDestinationRangeSprite->SetCornerColors(solidBarColor, transparentBarColor, transparentBarColor, solidBarColor);\n\t\tmDestinationRangeSprite->rect = RectF(destinationRangeBeginItPosition + durationBarsSpace, destRect.top,\n\t\t\t\t\t\t\t\t\t\t\t  destinationRangeBeginItPosition + mHandlesOffset, destRect.bottom);\n\n\t\tmDestinationRangeSprite->Draw();\n\n\t\t// Draw range sprite\n\t\tmRangeSprite->rect = RectF(destinationRangeBeginPosition, sourceRect.top,\n\t\t\t\t\t\t\t\t   mEndTimeRangeHandle->GetScreenPosition().x, sourceRect.bottom);\n\t\tmRangeSprite->Draw();\n\n\t\t// Transition mesh\n\t\t//  [0]--------[1]\n\t\t//   |          | \\\n\t\t//  [2]--------[3] [4]--------[5] \n\t\t//                \\ |          |\n\t\t//                 [6]--------[7]\n\t\tauto transitionColor = Color4(0, 156, 141, 255).ABGR();\n\t\tVertex* verts = mTransitionMesh->GetVertices<Vertex>();\n\t\tverts[0] = Vertex(sourceRangeBeginPosition + 2, sourceRect.top - 1, transitionColor, 0, 0);\n\t\tverts[2] = Vertex(sourceRangeBeginPosition + 2, sourceRect.bottom + 1, transitionColor, 0, 0);\n\n\t\tverts[1] = Vertex(destinationRangeBeginPosition, sourceRect.top - 1, transitionColor, 0, 0);\n\t\tverts[3] = Vertex(destinationRangeBeginPosition, sourceRect.bottom + 1, transitionColor, 0, 0);\n\n\t\tverts[4] = Vertex(destinationDurationPosition, destRect.top - 1, transitionColor, 0, 0);\n\t\tverts[6] = Vertex(destinationDurationPosition, destRect.bottom + 1, transitionColor, 0, 0);\n\n\t\tfloat transitionEndPos = destinationRangeBeginPosition + destinationRangePositionDelta - durationBarsSpace - 1;\n\t\tverts[5] = Vertex(transitionEndPos, destRect.top - 1, transitionColor, 0, 0);\n\t\tverts[7] = Vertex(transitionEndPos, destRect.bottom + 1, transitionColor, 0, 0);\n\t\tmTransitionMesh->Draw();\n\n\t\t// Draw state names\n\t\tfloat textBorder = 5.0f;\n\t\tmSourceStateName->rect = RectF(sourceRangeBeginPosition + textBorder, sourceRect.top,\n\t\t\t\t\t\t\t\t\t   sourceRangeEndPosition - textBorder, sourceRect.bottom);\n\n\t\tmSourceStateName->Draw();\n\n\t\tmDestinationStateName->rect = RectF(destinationRangeBeginPosition + textBorder, destRect.top,\n\t\t\t\t\t\t\t\t\t\t\tdestinationRangeEndPosition - textBorder, destRect.bottom);\n\n\t\tmDestinationStateName->Draw();\n\n\t\t// Draw handles\n\t\tmEndTimeRangeHandle->Draw();\n        mBeginTimeRangeHandle->Draw();\n        mDurationHandle->Draw();\n    }\n\n    void AnimationGraphTransitionViewer::UpdateHandlesPositions()\n    {\n\t\tauto transition = mTransition.Lock();\n\t\tif (!transition)\n\t\t\treturn;\n\n\t\tmBeginTimeRangeHandle->position = Vec2F(transition->transition->beginTimeRange * mSourceDuration, 0);\n\t\tmEndTimeRangeHandle->position = Vec2F(transition->transition->endTimeRange * mSourceDuration, 0);\n\t\tmDurationHandle->position = Vec2F(transition->transition->duration + transition->transition->beginTimeRange * mSourceDuration, 0);\n    }\n\n\tfloat AnimationGraphTransitionViewer::TimeToPosition(float time) const\n\t{\n\t\tRectF widgetRect = mDurationWidget->layout->GetWorldRect();\n\t\tfloat sumDuration = mSourceDuration + mDestinationDuration;\n\t\tfloat durationScale = (widgetRect.Width() - mHandlesOffset * 2.0f) / sumDuration;\n\n\t\treturn time * durationScale + widgetRect.left + mHandlesOffset;\n\t}\n\n\tfloat AnimationGraphTransitionViewer::PositionToTime(float position) const\n\t{\n\t\tRectF widgetRect = mDurationWidget->layout->GetWorldRect();\n\t\tfloat sumDuration = mSourceDuration + mDestinationDuration;\n\t\tfloat durationScale = (widgetRect.Width() - mHandlesOffset * 2.0f) / sumDuration;\n\n\t\treturn (position - widgetRect.left - mHandlesOffset) / durationScale;\n\t}\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::AnimationGraphTransitionViewer, Editor__AnimationGraphTransitionViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationStateGraphWindow/AnimationGraphTransitionViewer.h",
    "content": "#pragma once\n\n#include \"o2/Animation/AnimationStateGraph.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2Editor/Windows/AnimationStateGraphWindow/AnimationStateGraphEditor.h\"\n#include \"o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.h\"\n\nnamespace o2\n{\n    class Widget;\n    class Spoiler;\n    class DragHandle;\n}\n\nnamespace Editor\n{\n    // ---------------------------------------\n    // AnimationGraphTransition properties viewer\n    // ---------------------------------------\n    class AnimationGraphTransitionViewer : public DefaultObjectPropertiesViewer\n    {\n    public:\n        // Returns viewing objects type\n        const Type* GetViewingObjectType() const override;\n\n        // Returns viewing objects base type by static function\n        static const Type* GetViewingObjectTypeStatic();\n\n        IOBJECT(AnimationGraphTransitionViewer);\n\n\tprivate:\n\t\tWeakRef<AnimationStateGraphEditor::StateTransition> mTransition; // Current transition\n\n        Ref<Widget> mDurationWidget; // Widget for displaying durations\n\n\t\tRef<Sprite> mSourceRangeSprite;      // Source range sprite\n\t\tRef<Sprite> mDestinationRangeSprite; // Destination range sprite\n\t\tRef<Sprite> mRangeSprite;            // Range sprite (from begin to end range)\n\t\tRef<Mesh>   mTransitionMesh;         // Transition mesh\n\n\t\tRef<Text> mSourceStateName;      // Source state name text\n\t\tRef<Text> mDestinationStateName; // Destination state name text\n\n\t\tRef<DragHandle> mBeginTimeRangeHandle; // Handle for begin time range\n\t\tRef<DragHandle> mEndTimeRangeHandle;   // Handle for end time range \n\t\tRef<DragHandle> mDurationHandle;       // Handle for duration\n\n\t\tstatic constexpr float mHandlesOffset = 20.0f;     // Handles offset from the edges of the widget\n\t\tstatic constexpr float mDurationBarHeight = 25.0f; // Height of the duration bar drawable area\n\n\t\tfloat mSourceAnimationBeginPosition = 0.0f; // Source animation begin position in widget\n\t\tfloat mSourceAnimationEndPosition = 0.0f;   // Source animation end position in widget\n\n\t\tfloat mDestinationAnimationBeginPosition = 0.0f; // Destination animation begin position in widget\n\t\tfloat mDestinationAnimationEndPosition = 0.0f;   // Destination animation end position in widget\n\n\t\tfloat mSourceDuration = 1.0f;      // Source animation duration\n\t\tfloat mDestinationDuration = 1.0f; // Destination animation duration\n\n\tprivate:\n\t\t// Called when the viewer is refreshed, builds properties, and places them in mPropertiesContext\n\t\tvoid RebuildProperties(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjects) override;\n\n        // Draw duration widget\n        void DrawDurationWidget();\n\n        // Update handle positions\n        void UpdateHandlesPositions();\n\n\t\t// Converts time to position in widget\n        float TimeToPosition(float time) const;\n\n\t\t// Converts position in widget to time\n\t\tfloat PositionToTime(float position) const;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AnimationGraphTransitionViewer)\n{\n    BASE_CLASS(Editor::DefaultObjectPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationGraphTransitionViewer)\n{\n    FIELD().PRIVATE().NAME(mTransition);\n    FIELD().PRIVATE().NAME(mDurationWidget);\n    FIELD().PRIVATE().NAME(mSourceRangeSprite);\n    FIELD().PRIVATE().NAME(mDestinationRangeSprite);\n    FIELD().PRIVATE().NAME(mRangeSprite);\n    FIELD().PRIVATE().NAME(mTransitionMesh);\n    FIELD().PRIVATE().NAME(mSourceStateName);\n    FIELD().PRIVATE().NAME(mDestinationStateName);\n    FIELD().PRIVATE().NAME(mBeginTimeRangeHandle);\n    FIELD().PRIVATE().NAME(mEndTimeRangeHandle);\n    FIELD().PRIVATE().NAME(mDurationHandle);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mSourceAnimationBeginPosition);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mSourceAnimationEndPosition);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mDestinationAnimationBeginPosition);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mDestinationAnimationEndPosition);\n    FIELD().PRIVATE().DEFAULT_VALUE(1.0f).NAME(mSourceDuration);\n    FIELD().PRIVATE().DEFAULT_VALUE(1.0f).NAME(mDestinationDuration);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationGraphTransitionViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp2;\n\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetViewingObjectTypeStatic);\n    FUNCTION().PRIVATE().SIGNATURE(void, RebuildProperties, _tmp1);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnRefreshed, _tmp2);\n    FUNCTION().PRIVATE().SIGNATURE(void, DrawDurationWidget);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateHandlesPositions);\n    FUNCTION().PRIVATE().SIGNATURE(float, TimeToPosition, float);\n    FUNCTION().PRIVATE().SIGNATURE(float, PositionToTime, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationStateGraphWindow/AnimationStateGraphEditor.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AnimationStateGraphEditor.h\"\n#include \"GraphAnimationStateViewer.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n#include \"o2/Utils/System/Clipboard.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Dialogs/KeyEditDlg.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/UI/CurveEditor/CurveActions.h\"\n#include \"o2Editor/UIRoot.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    AnimationStateGraphEditor::AnimationStateGraphEditor(RefCounter* refCounter):\n        FrameScrollView(refCounter), SelectableDragHandlesGroup(refCounter)\n    {\n        mSelectionSprite = mmake<Sprite>();\n\t\tmStateWidgetsContainer = mmake<Widget>();\n        mBackColor = Color4(225, 232, 232, 255);\n        mViewCameraMinScale = 1.0f;\n\n\t\tInitializeContextMenus();\n\n        mReady = true;\n    }\n\n    AnimationStateGraphEditor::~AnimationStateGraphEditor()\n    {}\n\n\tvoid AnimationStateGraphEditor::SetGraph(const Ref<AnimationStateGraphAsset>& graph, \n                                             const Ref<AnimationStateGraphComponent>& component)\n\t{\n\t\tif (auto lastComponent = mComponent.Lock())\n\t\t{\n\t\t\tlastComponent->onStateStarted -= THIS_FUNC(OnStateGraphStateStarted);\n\t\t\tlastComponent->onStateFinished -= THIS_FUNC(OnStateGraphStateFinished);\n\t\t\tlastComponent->onTransitionStarted -= THIS_FUNC(OnStateGraphTransitionStarted);\n\t\t\tlastComponent->onTransitionFinished -= THIS_FUNC(OnStateGraphTransitionFinished);\n\t\t\tlastComponent->onTransitionsPlanned -= THIS_FUNC(OnStateGraphTransitionsPlanned);\n\t\t\tlastComponent->onTransitionCancelled -= THIS_FUNC(OnStateGraphTransitionCancelled);\n\t\t}\n\n\t\tif (auto graph = mGraph.Lock())\n\t\t{\n\t\t\tgraph->onInitialStateChanged -= THIS_FUNC(OnStateGraphInitialStateChanged);\n\t\t\tgraph->onStateAdded -= THIS_FUNC(OnStateGraphStateAdded);\n\t\t\tgraph->onStateRemoved -= THIS_FUNC(OnStateGraphStateRemoved);\n\t\t}\n\n\t\tmGraph = graph;\n\t\tmComponent = component;\n\n\t\tif (auto component = mComponent.Lock())\n\t\t{\n\t\t\tcomponent->onStateStarted += THIS_FUNC(OnStateGraphStateStarted);\n\t\t\tcomponent->onStateFinished += THIS_FUNC(OnStateGraphStateFinished);\n\t\t\tcomponent->onTransitionStarted += THIS_FUNC(OnStateGraphTransitionStarted);\n\t\t\tcomponent->onTransitionFinished += THIS_FUNC(OnStateGraphTransitionFinished);\n\t\t\tcomponent->onTransitionsPlanned += THIS_FUNC(OnStateGraphTransitionsPlanned);\n\t\t\tcomponent->onTransitionCancelled += THIS_FUNC(OnStateGraphTransitionCancelled);\n\t\t}\n\n\t\tif (auto graph = mGraph.Lock())\n\t\t{\n\t\t\tgraph->onInitialStateChanged += THIS_FUNC(OnStateGraphInitialStateChanged);\n\t\t\tgraph->onStateAdded += THIS_FUNC(OnStateGraphStateAdded);\n\t\t\tgraph->onStateRemoved += THIS_FUNC(OnStateGraphStateRemoved);\n\t\t}\n\n\t\tInitializeStates();\n\n\t\tif (mComponent)\n\t\t\tmComponent.Lock()->Reset();\n\n\t\tmNeedAdjustView = true;\n\t}\n\n\tvoid AnimationStateGraphEditor::InitializeStates()\n\t{\n\t\tauto stateWidgetsCache = mStatesWidgetsMap;\n\n\t\tmStatesWidgets.Clear();\n\t\tmStatesWidgetsMap.Clear();\n\t\tmStateHandlesMap.Clear();\n\n\t\tif (mGraph)\n\t\t{\n\t\t\tauto graph = mGraph.Lock();\n\t\t\tfor (auto& state : graph->GetStates())\n\t\t\t{\n\t\t\t\tRef<StateWidget> stateWidget;\n\t\t\t\tif (stateWidgetsCache.TryGetValue(state, stateWidget))\n\t\t\t\t\tstateWidgetsCache.Remove(state);\n\t\t\t\telse\n\t\t\t\t\tstateWidget = mmake<StateWidget>(Ref(this), state);\n\n\t\t\t\tmStatesWidgets.Add(stateWidget);\n\t\t\t\tmStatesWidgetsMap[state] = stateWidget;\n\t\t\t\tmStateHandlesMap[stateWidget->dragHandle] = stateWidget;\n\t\t\t}\n\n\t\t\tfor (auto& state : mStatesWidgets)\n\t\t\t\tstate->Update();\n\t\t}\n\n\t\tfor (auto kv : stateWidgetsCache)\n\t\t\tkv.second->RemoveWidget();\n\n\t\tRecalculateViewArea();\n\t}\n\n\tvoid AnimationStateGraphEditor::Draw()\n\t{\n\t\tScrollView::Draw();\n\t\tDrawSelection();\n\t}\n\n\tvoid AnimationStateGraphEditor::RedrawContent()\n\t{\n\t\tDrawGrid();\n\t\tDrawTransitions();\n\t\tmStateWidgetsContainer->Draw();\n\t}\n\n\n\tvoid AnimationStateGraphEditor::OnSelectionChanged()\n\t{\n\t\tif (!mSelectedHandles.IsEmpty())\n\t\t{\n\t\t\tif (auto state = mStateHandlesMap[mSelectedHandles[0]])\n\t\t\t\to2EditorPropertiesWindow.SetTarget(state->state.Lock().Get());\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::DeselectAll()\n\t{\n\t\tSelectableDragHandlesGroup::DeselectAll();\n\n    \tfor (auto& state : mStatesWidgets)\n    \t{\n    \t\tfor (auto& transition : state->transitions)\n    \t\t\ttransition->SetSelected(false);\n    \t}\n\n    \tmSelectedTransition = nullptr;\n\t}\n\n\tvoid AnimationStateGraphEditor::DrawHandles()\n\t{}\n\n\tvoid AnimationStateGraphEditor::DrawSelection()\n\t{\n\t\tif (mIsPressed)\n\t\t{\n\t\t\tmSelectionSprite->rect = RectF(LocalToScreenPoint(mSelectingPressedPoint), o2Input.cursorPos);\n\t\t\tmSelectionSprite->Draw();\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::DrawTransitions()\n\t{\n\t\tfor (auto& state : mStatesWidgets)\n\t\t\tstate->DrawTransitions();\n\n\t\tif (mCreatingTransition)\n\t\t{\n\t\t\tVec2F from = mContextMenuState->state.Lock()->GetPosition();\n\t\t\tVec2F to = ScreenToLocalPoint(o2Input.cursorPos);\n\n\t\t\tDrawTransition(from, to, StateTransition::TransitionStatus::None, 0.0f);\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::DrawTransition(Vec2F from, Vec2F to, StateTransition::TransitionStatus status, float progress, bool selected)\n\t{\n\t\tVec2F dir = (to - from).Normalized();\n\t\tVec2F norm = dir.Perpendicular();\n\t\tVec2F center = (from + to)/2.0f;\n\n\t\tColor4 colorRegular(126, 149, 160);\n\t\tColor4 colorPlanned(159, 190, 254);\n\t\tColor4 colorFinished(249, 93, 72);\n\t\tColor4 colorSelected(0, 150, 136);\n\t\t\n\t\tfloat width = selected ? 6.0f : 4.0f; \n\t\tfloat arrowSize = 10.0f;\n\t\tfloat offset = 7.0f;\n\n\t\tfrom += norm*offset;\n\t\tto += norm*offset;\n\n\t\tstatic Vector<Vec2F> arrowLocal = { Vec2F(-0.5f, 0.5f), Vec2F(0.0f, 1.5f), Vec2F(0.5f, 0.5f), Vec2F(-0.5f, 0.5f), Vec2F(0.0f, 1.5f) };\n\n\t\tBasis arrowBasis(center, norm*arrowSize, dir*arrowSize);\n\t\tVector<Vec2F> arrowWorld = arrowLocal.Convert<Vec2F>([&](const Vec2F& p) { return arrowBasis.Transform(p) + norm*offset; });\n\n\t\tif (status == StateTransition::TransitionStatus::None)\n\t\t{\n\t\t\tColor4 lineColor = selected ? colorSelected : colorRegular;\n\t\t\to2Render.DrawAALine(from, to, lineColor, width);\n\t\t\to2Render.DrawAALine(arrowWorld, lineColor, width);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tVec2F progressPoint = from;\n\n\t\t\tif (status == StateTransition::TransitionStatus::Started)\n\t\t\t\tprogressPoint = Math::Lerp(from, to, progress);\n\t\t\telse\n\t\t\t\tprogress = 0.0f;\n\n\t\t\tColor4 plannedColor = selected ? colorSelected : colorPlanned;\n\t\t\to2Render.DrawAALine(from, to, plannedColor, width);\n\t\t\to2Render.DrawAALine(from, progressPoint, colorFinished, width);\n\n\t\t\tauto arrowColor = progress < 0.5f ? plannedColor : colorFinished;\n\t\t\to2Render.DrawAALine(arrowWorld, arrowColor, width);\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::Update(float dt)\n    {\n\t\tmStateWidgetsContainer->Update(dt);\n\t\tmStateWidgetsContainer->UpdateChildren(dt);\n\n        FrameScrollView::Update(dt);\n\n        if (mReady && mResEnabledInHierarchy && !mIsClipped && mNeedAdjustView)\n        {\n            mNeedAdjustView = false;\n\t\t\tmViewCameraTargetScale = Vec2F(1, 1);\n            mViewCamera.center = mAvailableArea.Center();\n            mViewCameraTargetPos = mViewCamera.position;\n        }\n\n\t\tUpdateComponent(dt);\n\t\tCheckRefreshViewersTimer(dt);\n    }\n\n\tvoid AnimationStateGraphEditor::UpdateComponent(float dt)\n\t{\n\t\tif (mPreviewEnabled)\n\t\t{\n\t\t\tif (!o2EditorApplication.IsPlaying())\n\t\t\t{\n\t\t\t\tif (auto component = mComponent.Lock())\n\t\t\t\t{\n\t\t\t\t\tif (auto actor = component->GetActor())\n\t\t\t\t\t\tactor->Update(dt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::UpdateSelfTransform()\n    {\n        FrameScrollView::UpdateSelfTransform();\n\n        UpdateLocalScreenTransforms();\n        OnCameraTransformChanged();\n    }\n\n    const Ref<ContextMenu>& AnimationStateGraphEditor::GetContextMenu() const\n    {\n        return mContextMenu;\n    }\n\n    Ref<RefCounterable> AnimationStateGraphEditor::CastToRefCounterable(const Ref<AnimationStateGraphEditor>& ref)\n    {\n        return DynamicCast<FrameScrollView>(ref);\n    }\n\n    void AnimationStateGraphEditor::SetSelectionSpriteImage(const AssetRef<ImageAsset>& image)\n    {\n        mSelectionSprite->LoadFromImage(image);\n    }\n\n\tvoid AnimationStateGraphEditor::SetPreviewEnabled(bool enabled)\n\t{\n\t\tmPreviewEnabled = enabled;\n\t}\n\n    void AnimationStateGraphEditor::OnScrolled(float scroll)\n    {\n        Vec2F newScale = mViewCameraTargetScale;\n\n        if (o2Input.IsKeyDown(VK_CONTROL))\n            newScale.x *= 1.0f - (scroll*mViewCameraScaleSence);\n        else if (o2Input.IsKeyDown(VK_SHIFT))\n            newScale.y *= 1.0f - (scroll*mViewCameraScaleSence);\n        else\n            newScale *= 1.0f - (scroll*mViewCameraScaleSence);\n\n        ChangeCameraScaleRelativeToCursor(newScale);\n    }\n\n\tvoid AnimationStateGraphEditor::OnCursorPressed(const Input::Cursor& cursor)\n\t{\n\t\tFocus();\n\n\t\t// Deselect all transitions when clicking on empty space\n\t\tbool clickedOnTransition = false;\n\t\tfor (auto& state : mStatesWidgets)\n\t\t{\n\t\t\tfor (auto& transition : state->transitions)\n\t\t\t{\n\t\t\t\tif (transition->IsUnderPoint(cursor.position))\n\t\t\t\t{\n\t\t\t\t\tclickedOnTransition = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (clickedOnTransition)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (!clickedOnTransition)\n\t\t{\n\t\t\t// Deselect all transitions\n\t\t\tfor (auto& state : mStatesWidgets)\n\t\t\t{\n\t\t\t\tfor (auto& transition : state->transitions)\n\t\t\t\t\ttransition->SetSelected(false);\n\t\t\t}\n\t\t}\n\n\t\tmSelectingPressedPoint = cursor.position;\n\t\tBeginPreSelect();\n\t}\n\n\tvoid AnimationStateGraphEditor::OnCursorReleased(const Input::Cursor& cursor)\n\t{\n\t\tEndPreSelect();\n\t}\n\n\tvoid AnimationStateGraphEditor::OnCursorStillDown(const Input::Cursor& cursor)\n\t{\n\t\tVector<Ref<DragHandle>> preSelectedHandles;\n\n\t\tRectF selectionRect = RectF(mSelectingPressedPoint, ScreenToLocalPoint(o2Input.cursorPos));\n\n\t\tfor (auto& state : mStatesWidgets)\n\t\t{\n\t\t\tRectF stateRect = state->widget->layout->worldAABB;\n\t\t\tif (selectionRect.IsIntersects(stateRect))\n\t\t\t{\n\t\t\t\tpreSelectedHandles.Add(state->dragHandle);\n\t\t\t\tstate->widget->SetState(\"focused\", true);\n\t\t\t}\n\t\t\telse\n\t\t\t\tstate->widget->SetState(\"focused\", mSelectedHandles.Contains(state->dragHandle));\n\t\t}\n\n\t\tUpdatePreSelect(preSelectedHandles);\n\t}\n\n\tvoid AnimationStateGraphEditor::OnCursorRightMouseStayDown(const Input::Cursor& cursor)\n\t{\n\t\tFrameScrollView::OnCursorRightMouseStayDown(cursor);\n\t}\n\n\tvoid AnimationStateGraphEditor::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n\t{\n\t\tif (!mViewCameraMoved)\n\t\t{\n\t\t\tmContextMenuPos = cursor.position;\n\t\t\tmContextMenu->Show();\n\t\t}\n\n\t\tFrameScrollView::OnCursorRightMouseReleased(cursor);\n\t}\n\n\tvoid AnimationStateGraphEditor::DrawInheritedDepthChildren()\n\t{\n\t\tmContextMenu->Draw();\n\t\tmStateContextMenu->Draw();\n\t\tmTransitionContextMenu->Draw();\n\t}\n\n\tvoid AnimationStateGraphEditor::InitializeContextMenus()\n    {\n        mContextMenu = o2UI.CreateWidget<ContextMenu>();\n\t\tmContextMenu->AddItem(\"Add state\", THIS_FUNC(CreateState));\n\n\t\tmStateContextMenu = o2UI.CreateWidget<ContextMenu>();\n\t\tmStateContextMenu->AddItem(\"Set as initial\", THIS_FUNC(SetCurrentStateInitial));\n\t\tmStateContextMenu->AddItem(\"Add transition\", THIS_FUNC(StartAddingTransition));\n\t\tmStateContextMenu->AddItem(\"Remove state\", THIS_FUNC(RemoveCurrentStates));\n\n\t\tmTransitionContextMenu = o2UI.CreateWidget<ContextMenu>();\n\t\tmTransitionContextMenu->AddItem(\"Remove transition\", THIS_FUNC(RemoveCurrentTransition));\n\n\t\tAddChild(mContextMenu);\n\t\tAddChild(mStateContextMenu);\n\t\tAddChild(mTransitionContextMenu);\n\n\t\tonFocused = [&]() { mContextMenu->SetItemsMaxPriority(); };\n    }\n\n    void AnimationStateGraphEditor::RecalculateViewArea()\n    {\n        // Initialize with first state position if available\n        if (!mStatesWidgets.IsEmpty())\n            mAvailableArea = mStatesWidgets[0]->widget->layout->worldAABB;\n        else\n            mAvailableArea = RectF(Vec2F(), Vec2F());\n\n        // Calculate bounds from all state positions\n        for (auto& state : mStatesWidgets)\n\t\t\tmAvailableArea.Expand(state->widget->layout->worldAABB);\n\n\t\t// Add borders\n        float bordersCoef = 1.5f;\n        Vec2F size = mAvailableArea.Size();\n        mAvailableArea.left -= size.x*bordersCoef;\n        mAvailableArea.right += size.x*bordersCoef;\n        mAvailableArea.top += size.y*bordersCoef;\n        mAvailableArea.bottom -= size.y*bordersCoef;\n\n        mHorScrollbar->SetValueRange(mAvailableArea.left, mAvailableArea.right);\n        mVerScrollbar->SetValueRange(mAvailableArea.bottom, mAvailableArea.top);\n    }\n\n\tvoid AnimationStateGraphEditor::OnStateGraphStateStarted(const Ref<AnimationStateGraphComponent::StatePlayer>& player)\n\t{\n\t\tRef<StateWidget> widget;\n\t\tif (mStatesWidgetsMap.TryGetValue(player->GetState(), widget))\n\t\t{\n\t\t\twidget->UpdateState(StateWidget::TransitionState::Planned);\n\t\t\twidget->SetPlayer(player);\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::OnStateGraphStateFinished(const Ref<AnimationStateGraphComponent::StatePlayer>& player)\n\t{\n\t\tRef<StateWidget> widget;\n\t\tif (mStatesWidgetsMap.TryGetValue(player->GetState(), widget))\n\t\t{\n\t\t\twidget->UpdateState(StateWidget::TransitionState::Finished);\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::OnStateGraphTransitionStarted(const Ref<AnimationGraphTransition>& transition)\n\t{\n\t\tRef<StateWidget> widget;\n\t\tif (mStatesWidgetsMap.TryGetValue(transition->GetSourceState(), widget))\n\t\t{\n\t\t\twidget->UpdateState(StateWidget::TransitionState::Finished);\n\n\t\t\tRef<StateTransition> stateTransition;\n\t\t\tif (widget->transitionsMap.TryGetValue(transition, stateTransition))\n\t\t\t\tstateTransition->SetStatus(StateTransition::TransitionStatus::Started);\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::OnStateGraphTransitionFinished(const Ref<AnimationGraphTransition>& transition)\n\t{\n\t\tRef<StateWidget> widget;\n\t\tif (mStatesWidgetsMap.TryGetValue(transition->GetSourceState(), widget))\n\t\t{\n\t\t\twidget->UpdateState(StateWidget::TransitionState::None);\n\n\t\t\tRef<StateTransition> stateTransition;\n\t\t\tif (widget->transitionsMap.TryGetValue(transition, stateTransition))\n\t\t\t\tstateTransition->SetStatus(StateTransition::TransitionStatus::None);\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::OnStateGraphTransitionsPlanned(const Vector<Ref<AnimationGraphTransition>>& path)\n\t{\n\t\tfor (auto& transition : path)\n\t\t{\n\t\t\tRef<StateWidget> widget;\n\t\t\tif (mStatesWidgetsMap.TryGetValue(transition->GetDestinationState(), widget))\n\t\t\t\twidget->UpdateState(StateWidget::TransitionState::Planned);\n\n\t\t\tif (mStatesWidgetsMap.TryGetValue(transition->GetSourceState(), widget))\n\t\t\t{\n\t\t\t\tRef<StateTransition> stateTransition;\n\t\t\t\tif (widget->transitionsMap.TryGetValue(transition, stateTransition))\n\t\t\t\t\tstateTransition->SetStatus(StateTransition::TransitionStatus::Planned);\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::OnStateGraphTransitionCancelled(const Ref<AnimationGraphTransition>& transition)\n\t{\n\t\tRef<StateWidget> widget;\n\t\tif (mStatesWidgetsMap.TryGetValue(transition->GetSourceState(), widget))\n\t\t{\n\t\t\twidget->UpdateState(StateWidget::TransitionState::None);\n\n\t\t\tRef<StateTransition> stateTransition;\n\t\t\tif (widget->transitionsMap.TryGetValue(transition, stateTransition))\n\t\t\t\tstateTransition->SetStatus(StateTransition::TransitionStatus::None);\n\t\t}\n\n\t\t// Also update destination state if needed\n\t\tif (mStatesWidgetsMap.TryGetValue(transition->GetDestinationState(), widget))\n\t\t\twidget->UpdateState(StateWidget::TransitionState::None);\n\t}\n\n\tvoid AnimationStateGraphEditor::OnStateGraphInitialStateChanged(const String& stateName)\n\t{\n\t\tInitializeStates();\n\t}\n\n\tvoid AnimationStateGraphEditor::OnStateGraphStateAdded(const Ref<AnimationGraphState>& state)\n\t{\n\t\tif (mCreatingState)\n\t\t\treturn;\n\n\t\tInitializeStates();\n\t}\n\n\tvoid AnimationStateGraphEditor::OnStateGraphStateRemoved(const Ref<AnimationGraphState>& state)\n\t{\n\t\tif (mCreatingState)\n\t\t\treturn;\n\n\t\tInitializeStates();\n\t}\n\n\tvoid AnimationStateGraphEditor::CreateState()\n\t{\n\t\tauto graph = mGraph.Lock();\n\t\tif (!graph)\n\t\t\treturn;\n\n\t\tmCreatingState = true;\n\n\t\tauto state = graph->AddState(mmake<AnimationGraphState>());\n\t\tstate->SetPosition(mContextMenuPos);\n\t\tstate->AddAnimation(\"\");\n\n\t\tInitializeStates();\n\n\t\tmCreatingState = false;\n\t}\n\n\tvoid AnimationStateGraphEditor::SetCurrentStateInitial()\n\t{\n\t\tauto graph = mGraph.Lock();\n\t\tif (!graph)\n\t\t\treturn;\n\n\t\tfor (auto& handle : mSelectedHandles)\n\t\t{\n\t\t\tif (auto state = mStateHandlesMap[handle])\n\t\t\t{\n\t\t\t\tgraph->SetInitialState(state->state.Lock()->GetName());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::StartAddingTransition()\n\t{\n\t\tmCreatingTransition = true;\n\t}\n\n\tvoid AnimationStateGraphEditor::RemoveCurrentStates()\n\t{\n\t\tauto graph = mGraph.Lock();\n\t\tif (graph)\n\t\t{\n\t\t\tfor (auto& handle : mSelectedHandles)\n\t\t\t{\n\t\t\t\tif (auto state = mStateHandlesMap[handle])\n\t\t\t\t{\n\t\t\t\t\tgraph->RemoveState(state->state.Lock());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tInitializeStates();\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::RemoveCurrentTransition()\n\t{\n\t\tauto graph = mGraph.Lock();\n\t\tif (!graph || !mSelectedTransition)\n\t\t\treturn;\n\n\t\tauto sourceState = mSelectedTransition->owner.Lock()->state.Lock();\n\t\tauto transition = mSelectedTransition->transition;\n\n\t\tif (sourceState && transition)\n\t\t{\n\t\t\tsourceState->RemoveTransition(transition);\n\t\t\tmSelectedTransition = nullptr;\n\t\t\tInitializeStates();\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::OpenStateContextMenu(const Ref<StateWidget>& state)\n\t{\n\t\tDeselectAll();\n\t\tstate->dragHandle->SetSelected(true);\n\n\t\tmContextMenuState = state;\n\t\tmStateContextMenu->Show();\n\t}\n\n\tvoid AnimationStateGraphEditor::OnStatePressed(const Ref<StateWidget>& state)\n\t{\n\t\tif (mCreatingTransition)\n\t\t{\n\t\t\tauto sourceState = mContextMenuState->state.Lock();\n\t\t\tauto destinationState = state->state.Lock();\n\t\t\tif (sourceState && destinationState)\n\t\t\t{\n\t\t\t\tauto transition = sourceState->AddTransition(state->state.Lock());\n\t\t\t\tmCreatingTransition = false;\n\t\t\t\tInitializeStates();\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::CheckRefreshViewersTimer(float dt)\n\t{\n\t\tmRefreshViewersTimer += dt;\n\n\t\tconst float refreshInterval = 0.5f;\n\t\tif (mRefreshViewersTimer > refreshInterval)\n\t\t{\n\t\t\tmRefreshViewersTimer = 0.0f;\n\n\t\t\tfor (auto& state : mStatesWidgets)\n\t\t\t\tstate->animationsListProperty->Refresh();\n\t\t}\n\t}\n\n\tconst Vec2F AnimationStateGraphEditor::StateWidget::defaultWidgetSize = Vec2F(300, 50);\n\n\tAnimationStateGraphEditor::StateWidget::StateWidget(RefCounter* refCounter, const Ref<AnimationStateGraphEditor>& owner,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst Ref<AnimationGraphState>& state):\n\t\tRefCounterable(refCounter), editor(owner), state(state)\n\t{\n\t\t// Create widget\n\t\twidget = o2UI.CreateWidget<VerticalLayout>(\"ASG state\");\n\t\tauto weakWidget = WeakRef(widget);\n\n\t\t// Create drag handle\n\t\tdragHandle = mmake<DragHandle>();\n\t\tdragHandle->SetSelectionGroup(owner);\n\t\tdragHandle->messageFallDownListener = owner.Get();\n\t\tdragHandle->isPointInside = [weakWidget](const Vec2F& p) { return weakWidget ? weakWidget.Lock()->IsUnderPoint(p) : false; };\n\t\tdragHandle->position = state->GetPosition();\n\n\t\t// Add widget states switching by drag handle events\n\t\tdragHandle->onHoverEnter = [weakWidget]() { if (weakWidget) weakWidget.Lock()->SetState(\"hover\", true); };\n\t\tdragHandle->onHoverExit = [weakWidget]() { if (weakWidget) weakWidget.Lock()->SetState(\"hover\", false); };\n\t\tdragHandle->onPressed = [weakWidget]() { if (weakWidget) weakWidget.Lock()->SetState(\"pressed\", true); };\n\t\tdragHandle->onReleased = [weakWidget]() { if (weakWidget) weakWidget.Lock()->SetState(\"pressed\", false); };\n\t\tdragHandle->onSelected = [weakWidget]() { if (weakWidget) weakWidget.Lock()->SetState(\"focused\", true); };\n\t\tdragHandle->onDeselected = [weakWidget]() { if (weakWidget) weakWidget.Lock()->SetState(\"focused\", false); };\n\n\t\t// Add left and right button events\n\t\tdragHandle->onPressed += [this]() { OnPressed(); };\n\t\tdragHandle->onRightButtonReleased = [this](const Input::Cursor&) { OpenContextMenu(); };\n\n\t\t// Add drag callback\n\t\tdragHandle->onChangedPos = THIS_FUNC(OnDragged);\n\n\t\t// Add draw callback to draw handle\n\t\twidget->onDraw = [this]() { dragHandle->Draw(); };\n        \n\t\t// Add states\n\t\tfor (auto& animation : state->GetAnimations())\n\t\t{\n\t\t\tRef<StateAnimation> stateAnimation = mmake<StateAnimation>();\n\n\t\t\tstateAnimation->owner = Ref(this);\n\t\t\tstateAnimation->name = animation->GetName();\n\t\t\tstateAnimation->animation = animation;\n\n\t\t\tif (auto graphComponent = owner->mComponent.Lock())\n\t\t\t{\n\t\t\t\tif (auto animationComponent = graphComponent->GetAnimationComponent())\n\t\t\t\t\tstateAnimation->state = animationComponent->GetState(animation->GetName());\n\t\t\t}\n\n\t\t\tanimations.Add(stateAnimation);\n\t\t}\n\n\t\t// Create animations list property\n\t\tpropertiesContext = mmake<PropertiesContext>();\n\t\tpropertiesContext->Set({ Pair<IObject*, IObject*>(this, nullptr) });\n\t\tpropertiesContext->onChanged = [this](const Ref<IPropertyField>&, bool) { if (auto state = this->state.Lock()) state->GetGraph()->SetDirty();  };\n\n\t\tanimationsListProperty = DynamicCast<VectorProperty>(o2EditorProperties.BuildField(widget, GetType(), \"animations\", \"\", propertiesContext));\n\t\tanimationsListProperty->SetHeaderEnabled(false);\n\t\tanimationsListProperty->SetCaptionIndexesEnabled(false);\n\t\tanimationsListProperty->SetCountEditBoxEnabled(false);\n\t\tanimationsListProperty->SetValuePointers<Vector<Ref<StateAnimation>>>({ &animations });\n\t\twidget->AddChild(animationsListProperty);\n\n\t\t*widget->layout = WidgetLayout::Based(BaseCorner::Center, defaultWidgetSize, state->GetPosition());\n\n\t\t// Add widget to editor's container\n\t\teditor.Lock()->mStateWidgetsContainer->AddChild(widget);\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::Update()\n\t{\n\t\tInitializeTransitions();\n\n\t\tif (auto strongState = state.Lock())\n\t\t{\n\t\t\tif (auto graph = strongState->GetGraph())\n\t\t\t{\n\t\t\t\tbool isDefaultState = strongState->GetName() == graph->GetInitialState();\n\t\t\t\twidget->SetState(\"default\", isDefaultState);\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::InitializeTransitions()\n\t{\n\t\ttransitions.Clear();\n\t\ttransitionsMap.Clear();\n\n\t\tfor (auto& transition : state.Lock()->GetTransitions())\n\t\t{\n\t\t\tRef<StateTransition> stateTransition = mmake<StateTransition>();\n\t\t\tstateTransition->owner = Ref(this);\n\t\t\tstateTransition->destination = editor.Lock()->mStatesWidgetsMap[transition->GetDestinationState()];\n\t\t\tstateTransition->transition = transition;\n\t\t\ttransitions.Add(stateTransition);\n\t\t\ttransitionsMap[WeakRef(transition)] = stateTransition;\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::RemoveWidget()\n\t{\n        if (!widget)\n\t\t\treturn;\n\n\t\tauto parent = widget->GetParent();\n\t\tif (parent)\n\t\t\tparent.Lock()->RemoveChild(widget);\n\n        widget = nullptr;\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::DrawTransitions()\n\t{\n\t\tfor (auto& transition : transitions)\n\t\t\ttransition->Draw();\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::UpdateState(TransitionState state)\n\t{\n\t\twidget->SetState(\"finished\", state == TransitionState::Finished);\n\t\twidget->SetState(\"planned\", state == TransitionState::Planned);\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::SetPlayer(const Ref<AnimationStateGraphComponent::StatePlayer>& player)\n\t{\n\t\tthis->player = player;\n\t\tanimationsListProperty->Refresh();\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::OpenContextMenu()\n\t{\n\t\teditor.Lock()->OpenStateContextMenu(Ref(this));\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::OnPressed()\n\t{\n\t\teditor.Lock()->OnStatePressed(Ref(this));\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::OnAnimationsListChanged()\n\t{\n\t\tauto state = this->state.Lock();\n\t\tif (!state)\n\t\t\treturn;\n\n\t\tVector<Ref<AnimationGraphState::Animation>> animations;\n\t\tfor (auto& stateAnimation : this->animations)\n\t\t{\n\t\t\tif (stateAnimation->animation)\n\t\t\t\tanimations.Add(stateAnimation->animation.Lock());\n\t\t\telse\n\t\t\t{\n\t\t\t\tauto newAnimation = mmake<AnimationGraphState::Animation>();\n\t\t\t\tnewAnimation->SetName(stateAnimation->name);\n\t\t\t\tnewAnimation->weight = stateAnimation->weight;\n\n\t\t\t\tstateAnimation->animation = newAnimation;\n\t\t\t\tstateAnimation->owner = Ref(this);\n\n\t\t\t\tanimations.Add(newAnimation);\n\t\t\t}\n\n\t\t\tif (auto editor = this->editor.Lock())\n\t\t\t{\n\t\t\t\tif (auto graphComponent = editor->mComponent.Lock())\n\t\t\t\t{\n\t\t\t\t\tif (auto animationComponent = graphComponent->GetAnimationComponent())\n\t\t\t\t\t\tstateAnimation->state = animationComponent->GetState(stateAnimation->name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tstate->SetAnimations(animations);\n\t}\n\n\tvoid AnimationStateGraphEditor::StateWidget::OnDragged(const Vec2F& position)\n\t{\n\t\t*widget->layout = WidgetLayout::Based(BaseCorner::Center, defaultWidgetSize, position);\n\n\t\tif (auto state = this->state.Lock())\n\t\t\tstate->SetPosition(position);\n\n\t\tif (auto editor = this->editor.Lock())\n\t\t{\n\t\t\teditor->RecalculateViewArea();\n\t\t\teditor->onChanged();\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::StateTransition::Draw()\n\t{\n\t\tauto from = owner.Lock();\n\t\tauto to = destination.Lock();\n\t\tif (!from || !to)\n\t\t\treturn;\n\n\t\tVec2F fromPoint = from->widget->layout->GetWorldCenter();\n\t\tVec2F toPoint = to->widget->layout->GetWorldCenter();\n\n\t\tfloat progress = 0.0f;\n\t\tif (auto component = from->editor.Lock()->mComponent.Lock())\n\t\t{\n\t\t\tif (auto currentTransition = component->GetCurrentTransition())\n\t\t\t\tprogress = component->GetCurrentTransitionTime() / currentTransition->duration;\n\t\t}\n\n\t\tAnimationStateGraphEditor::DrawTransition(fromPoint, toPoint, status, progress, mIsSelected);\n\n\t\tOnDrawn();\n\t}\n\n\tvoid AnimationStateGraphEditor::StateTransition::SetStatus(TransitionStatus status)\n\t{\n    \tthis->status = status;\n\t}\n\n\tVector<String> AnimationStateGraphEditor::StateAnimation::GetAvailableStates() const\n\t{\n\t\tauto owner = this->owner.Lock();\n\t\tif (!owner)\n\t\t\treturn {};\n\n\t\tauto editor = owner->editor.Lock();\n\t\tif (!editor)\n\t\t\treturn {};\n\n\t\tauto component = editor->mComponent.Lock();\n\t\tif (!component)\n\t\t\treturn {};\n\n\t\tauto animationComponent = component->GetAnimationComponent();\n\t\tif (!animationComponent)\n\t\t\treturn {};\n\n\t\treturn animationComponent->GetStatesNames();\n\t}\n\n\tvoid AnimationStateGraphEditor::StateAnimation::SetName(const String& name)\n\t{\n\t\tauto stateAnimation = animation.Lock();\n\t\tif (!stateAnimation)\n\t\t\treturn;\n\n\t\tauto previousName = stateAnimation->GetName();\n\t\tstateAnimation->SetName(name);\n\n\t\tauto owner = this->owner.Lock();\n\t\tif (!owner)\n\t\t\treturn;\n\n\t\tauto state = owner->state.Lock();\n\t\tif (!state)\n\t\t\treturn;\n\n\t\tauto graph = state->GetGraph();\n\t\tif (!graph)\n\t\t\treturn;\n\n\t\tif (graph->GetInitialState() == previousName)\n\t\t\tgraph->SetInitialState(name);\n\t}\n\n\tconst String& AnimationStateGraphEditor::StateAnimation::GetName() const\n\t{\n\t\tauto stateAnimation = animation.Lock();\n\t\tif (!stateAnimation)\n\t\t\treturn String::empty;\n\n\t\treturn stateAnimation->GetName();\n\t}\n\n\tvoid AnimationStateGraphEditor::StateAnimation::SetWeight(float weight)\n\t{\n\t\tauto stateAnimation = animation.Lock();\n\t\tif (!stateAnimation)\n\t\t\treturn;\n\n\t\tstateAnimation->weight = weight;\n\t}\n\n\tfloat AnimationStateGraphEditor::StateAnimation::GetWeight() const\n\t{\n\t\tauto stateAnimation = animation.Lock();\n\t\tif (!stateAnimation)\n\t\t\treturn 0.0f;\n\n\t\treturn stateAnimation->weight;\n\t}\n\n\tAnimationStateGraphEditor::StateTransition::StateTransition():\n\t\tRefCounterable(nullptr)\n\t{}\n\n\tbool AnimationStateGraphEditor::StateTransition::IsUnderPoint(const Vec2F& point)\n\t{\n\t\tconst float lineThickness = 10.0f;\n\t\tconst float offset = 10.0f;\n\n\t\tauto from = owner.Lock();\n\t\tauto to = destination.Lock();\n\t\tif (!from || !to || !from->widget || !to->widget)\n\t\t\treturn false;\n\n\t\tVec2F fromPoint = from->widget->layout->GetWorldCenter();\n\t\tVec2F toPoint = to->widget->layout->GetWorldCenter();\n\n\t\tVec2F line = toPoint - fromPoint;\n\t\tfloat lineLength = line.Length();\n\t\tif (lineLength < Math::Epsilon)\n\t\t\treturn false;\n\n\t\tVec2F lineDir = line / lineLength;\n\t\tVec2F norm = lineDir.Perpendicular();\n\n\t\tfromPoint += norm*offset;\n\t\ttoPoint += norm*offset;\n\t\t\n\t\tVec2F pointVector = point - fromPoint;\n\t\tfloat projection = pointVector.Dot(lineDir);\n\t\t\n\t\tif (projection < 0.0f || projection > lineLength)\n\t\t\treturn false;\n\n\t\tVec2F projectionPoint = fromPoint + lineDir * projection;\n\t\t\n\t\tfloat distance = Math::Abs(pointVector.Dot(norm));\n\t\treturn distance <= lineThickness;\n\t}\n\n\tvoid AnimationStateGraphEditor::StateTransition::OnCursorPressed(const Input::Cursor& cursor)\n\t{\n\t\tif (auto editorPtr = owner.Lock()->editor.Lock())\n\t\t\teditorPtr->DeselectAll();\n\n\t\tSetSelected(true);\n\t}\n\n\tbool AnimationStateGraphEditor::StateTransition::IsSelected() const\n\t{\n\t\treturn mIsSelected;\n\t}\n\n\tvoid AnimationStateGraphEditor::StateTransition::SetSelected(bool selected)\n\t{\n\t\tmIsSelected = selected;\n\n\t\tif (mIsSelected)\n\t\t\to2EditorPropertiesWindow.SetTarget(this);\n\n\t\tif (auto editorPtr = owner.Lock()->editor.Lock())\n\t\t{\n\t\t\tif (selected)\n\t\t\t\teditorPtr->mSelectedTransition = Ref(this);\n\t\t\telse if (editorPtr->mSelectedTransition == this)\n\t\t\t\teditorPtr->mSelectedTransition = nullptr;\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphEditor::StateTransition::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n\t{\n\t\tSetSelected(true);\n\t\t\n\t\tif (auto ownerPtr = owner.Lock())\n\t\t{\n\t\t\tif (auto editorPtr = ownerPtr->editor.Lock())\n\t\t\t{\n\t\t\t\teditorPtr->mSelectedTransition = Ref(this);\n\t\t\t\teditorPtr->mTransitionContextMenu->Show();\n\t\t\t}\n\t\t}\n\t}\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AnimationStateGraphEditor>);\n// --- META ---\n\nENUM_META(Editor::AnimationStateGraphEditor::StateTransition::TransitionStatus, Editor__AnimationStateGraphEditor__StateTransition__TransitionStatus)\n{\n    ENUM_ENTRY(None);\n    ENUM_ENTRY(Planned);\n    ENUM_ENTRY(Started);\n}\nEND_ENUM_META;\n\nENUM_META(Editor::AnimationStateGraphEditor::StateWidget::TransitionState, Editor__AnimationStateGraphEditor__StateWidget__TransitionState)\n{\n    ENUM_ENTRY(Finished);\n    ENUM_ENTRY(None);\n    ENUM_ENTRY(Planned);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(Editor::AnimationStateGraphEditor, Editor__AnimationStateGraphEditor);\n\nDECLARE_CLASS(Editor::AnimationStateGraphEditor::StateAnimation, Editor__AnimationStateGraphEditor__StateAnimation);\n\nDECLARE_CLASS(Editor::AnimationStateGraphEditor::StateTransition, Editor__AnimationStateGraphEditor__StateTransition);\n\nDECLARE_CLASS(Editor::AnimationStateGraphEditor::StateWidget, Editor__AnimationStateGraphEditor__StateWidget);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationStateGraphWindow/AnimationStateGraphEditor.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/AnimationStateGraphAsset.h\"\n#include \"o2/Scene/Components/AnimationStateGraphComponent.h\"\n#include \"o2/Scene/UI/Widgets/EditBoxDropDown.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Editor/FrameHandles.h\"\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2Editor/Actions/ActionsList.h\"\n#include \"o2Editor/Actions/IAction.h\"\n#include \"o2Editor/Properties/Basic/VectorProperty.h\"\n#include \"o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.h\"\n#include \"o2Editor/UI/FrameScrollView.h\"\n#include \"GraphAnimationStateViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class ContextMenu;\n    class EditBox;\n    class Window;\n}\n\nnamespace Editor\n{\n    // ---------------------\n    // Curves editing widget\n    // ---------------------\n    class AnimationStateGraphEditor : public FrameScrollView, public SelectableDragHandlesGroup\n    {\n    public:\n        Ref<ActionsList> actionsListDelegate; // Actions fall down list. When it is null, editor uses local actions list\n\n    public:\n        // Default constructor\n        explicit AnimationStateGraphEditor(RefCounter* refCounter);\n\n        // Destructor\n        ~AnimationStateGraphEditor();\n\n        // Sets graph and component\n        void SetGraph(const Ref<AnimationStateGraphAsset>& graph,\n                      const Ref<AnimationStateGraphComponent>& component);\n\n        // Draws widget, updates render target \n        void Draw() override;\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Sets selection sprite image\n        void SetSelectionSpriteImage(const AssetRef<ImageAsset>& image);\n\n\t\t// Turns on or off updating for component\n        void SetPreviewEnabled(bool enabled);\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns context menu\n        const Ref<ContextMenu>& GetContextMenu() const;\n\n        // Dynamic cast to RefCounterable via Component\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<AnimationStateGraphEditor>& ref);\n\n        SERIALIZABLE(AnimationStateGraphEditor);\n        CLONEABLE_REF(AnimationStateGraphEditor);\n\n\tpublic:\n\t\tstruct StateWidget;\n\n        // -----------------------------------------------------------\n\t\t// State animation struct. Contains state, animation and owner\n\t\t// Used to control state animation\n\t\t// -----------------------------------------------------------\n        struct StateAnimation : public RefCounterable, public IObject\n        {\n\t\t\tPROPERTIES(StateAnimation);\n\t\t\tPROPERTY(String, name, SetName, GetName);      // Animation name property @ITEMS_SOURCE(GetAvailableStates)\n\t\t\tPROPERTY(float, weight, SetWeight, GetWeight); // Animation weight property @RANGE(0, 1)\n\n\t\tpublic:\n\t\t\tWeakRef<IAnimationState>                state;     // Animation state\n\t\t\tWeakRef<AnimationGraphState::Animation> animation; // Animation\n\t\t\tWeakRef<StateWidget>                    owner;     // Owner state widget\n\n        public:\n\t\t\t// Returns available states names from AnimationComponent\n\t\t\tVector<String> GetAvailableStates() const;\n\n\t\t\t// Sets animation name\n\t\t\tvoid SetName(const String& name);\n\n\t\t\t// Returns name\n\t\t\tconst String& GetName() const;\n\n\t\t\t// Sets animation weight\n\t\t\tvoid SetWeight(float weight);\n\n\t\t\t// Returns animation weight\n\t\t\tfloat GetWeight() const;\n\n\t\t\tIOBJECT(StateAnimation);\n        };\n\n\t\t// --------------------------------------------------------------------\n\t\t// State transition struct. Contains owner, destination and drag handle\n\t\t// Used to control state transition\n\t\t// --------------------------------------------------------------------\n        struct StateTransition : public RefCounterable, public IObject, public CursorAreaEventsListener\n        {\n\t        enum class TransitionStatus { None, Planned, Started };\n\n\t\t\tWeakRef<StateWidget> owner;       // Owner state widget\n\t\t\tWeakRef<StateWidget> destination; // Destination state widget\n\n\t\t\tRef<AnimationGraphTransition> transition; // Animation transition reference @NO_HEADER\n\n        \tTransitionStatus status = TransitionStatus::None; // Current transition planning status @EDITOR_IGNORE\n\t\t\t\n\t\t\tbool mIsSelected = false; // True when transition is selected @EDITOR_IGNORE\n\n        public:\n\t\t\t// Default constructor\n\t\t\tStateTransition();\n\n\t\t\t// Draws transition\n            void Draw();\n\n        \t// Sets transition animation status\n        \tvoid SetStatus(TransitionStatus status);\n\n\t\t\t// Sets selected state\n\t\t\tvoid SetSelected(bool selected);\n\n\t\t\t// Returns true if transition is selected\n\t\t\tbool IsSelected() const;\n\n\t\t\t// Returns true if point is in this object\n\t\t\tbool IsUnderPoint(const Vec2F& point) override;\n\n\t\t\tIOBJECT(StateTransition);\n\t\t\t\n\t\tprotected:\n\t\t\t// Called when cursor pressed on this\n\t\t\tvoid OnCursorPressed(const Input::Cursor& cursor) override;\n\n\t\t\t// Called when right mouse button was released\n\t\t\tvoid OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n\t\t\tREF_COUNTERABLE_IMPL(RefCounterable);\n        };\n\n\t\t// -----------------------------------------------------------------------------------\n\t\t// State widget struct. Contains state, player, animations, transitions and widget\n\t\t// Used to control state widget: play, stop, draw transitions, update state and player\n\t\t// -----------------------------------------------------------------------------------\n\t\tstruct StateWidget : public RefCounterable, public IObject\n        {\n\t\t\tenum class TransitionState { None, Finished, Planned };\n\n\t\t\tstatic const Vec2F defaultWidgetSize; // Default size for state widget\n\t\t\t\n\t\t\tWeakRef<AnimationGraphState>                       state;  // Animation state reference\n\t\t\tWeakRef<AnimationStateGraphComponent::StatePlayer> player; // State player reference, when state is playing\n\n\t\t\tVector<Ref<StateAnimation>> animations;  // Animations list @DONT_DELETE @DEFAULT_TYPE(StateAnimation) @INVOKE_ON_CHANGE(OnAnimationsListChanged)\n\n\t\t\tVector<Ref<StateTransition>>                                 transitions;    // Transitions list\n\t\t\tMap<WeakRef<AnimationGraphTransition>, Ref<StateTransition>> transitionsMap; // Transitions map by destination state\n\n\t\t\tRef<VerticalLayout>    widget;                 // Widget layout\n\t\t\tRef<VectorProperty>    animationsListProperty; // Animations list property\n\t\t\tRef<PropertiesContext> propertiesContext;      // Properties context\n\n\t\t\tRef<DragHandle> dragHandle; // Drag handle\n\n\t\t\tWeakRef<AnimationStateGraphEditor> editor; // Owner editor reference\n\n        public:\n\t\t\t// Default constructor\n\t\t\tStateWidget() = default;\n\n\t\t\t// Constructor with ref counter, owner and state\n\t\t\tStateWidget(RefCounter* refCounter, const Ref<AnimationStateGraphEditor>& owner,\n\t\t\t\t\t\tconst Ref<AnimationGraphState>& state);\n\n            // Updates state contents\n            void Update();\n\n\t\t\t// Initializes transitions. Used after states list was initialized\n\t\t\tvoid InitializeTransitions();\n\n\t\t\t// Removes widget from parent\n            void RemoveWidget();\n\n\t\t\t// Draws transitions\n            void DrawTransitions();\n\n\t\t\t// Updates appearance by state transition state\n            void UpdateState(TransitionState state);\n\n\t\t\t// Sets player, when state is started to play\n            void SetPlayer(const Ref<AnimationStateGraphComponent::StatePlayer>& player);\n\n\t\t\t// Opens context menu\n\t\t\tvoid OpenContextMenu();\n\n\t\t\t// Called when state was pressed\n            void OnPressed();\n\n\t\tprotected:\n\t\t\t// Called when animations list was changed, creates or removes animations in original state\n            void OnAnimationsListChanged();\n\n\t\t\t// Called when dragged, updates state position\n\t\t\tvoid OnDragged(const Vec2F& position);\n\n\t\t\tIOBJECT(StateWidget);\n        };\n\n    protected:\n        Ref<ContextMenu> mContextMenu;           // Context menu for editing keys properties, copying, pasting and other        \n        Ref<ContextMenu> mStateContextMenu;      // Common context menu for all states\n\t\tRef<ContextMenu> mTransitionContextMenu; // Common context menu for all transitions\n\n\t\tWeakRef<AnimationStateGraphAsset>     mGraph;     // Animation state graph asset\n\t\tWeakRef<AnimationStateGraphComponent> mComponent; // Animation state graph component\n\n\t\tRef<Widget>                                         mStateWidgetsContainer; // Container for states widgets\n\t\tVector<Ref<StateWidget>>                            mStatesWidgets;         // States widgets\n\t\tMap<WeakRef<AnimationGraphState>, Ref<StateWidget>> mStatesWidgetsMap;      // States widgets map by state\n\t\tMap<WeakRef<DragHandle>, Ref<StateWidget>>          mStateHandlesMap;       // States widgets map by drag handle\n\n\t\tRef<Sprite> mSelectionSprite;       // Selection sprite @SERIALIZABLE\n\t\tVec2F       mSelectingPressedPoint; // Point, where cursor was pressed, selection starts here, in local space\n\n\t\tVec2F            mContextMenuPos;   // Context menu position when right mouse button was pressed\n\t\tRef<StateWidget> mContextMenuState; // State widget, where context menu was opened\n\n\t\tRef<StateTransition> mSelectedTransition; // Current selected transition\n\n\t\tbool mCreatingTransition = false; // True when creating transition\n\t\tbool mCreatingState = false;      // True when creating state\n\n\t\tbool mNeedAdjustView = false; // True when need to adjust view scale. This works in update\n\n\t\tfloat mRefreshViewersTimer = 0.0f; // Timer for refreshing viewers\n\n\t\tbool mPreviewEnabled = true; // True when preview is enabled (turns on or off component update)\n\n        ActionsList mActionsList; // Local actions list. It uses when actionFallDown is null\n\n    protected:\n        // Called when scrolling\n\t\tvoid OnScrolled(float scroll) override;\n\n\t\t// Called when cursor pressed on this\n\t\tvoid OnCursorPressed(const Input::Cursor& cursor) override;\n\n\t\t// Called when cursor released (only when cursor pressed this at previous time)\n\t\tvoid OnCursorReleased(const Input::Cursor& cursor) override;\n\n\t\t// Called when cursor stay down during frame\n\t\tvoid OnCursorStillDown(const Input::Cursor& cursor) override;\n\n\t\t// Called when right mouse button stay down on this, overriding from scroll view to call context menu\n\t\tvoid OnCursorRightMouseStayDown(const Input::Cursor& cursor) override;\n\n\t\t// Called when right mouse button was released (only when right mouse button pressed this at previous time), overriding from scroll view to call context menu\n\t\tvoid OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n\t\t// Overriding from ISceneDrawable to skip drawing children\n\t\tvoid DrawInheritedDepthChildren() override;\n\n        // Redraws content into render target\n\t\tvoid RedrawContent() override;\n\n\t\t// Called when selection is changed - some handle was added or removed from selection; updates selected states in property viewer\n    \tvoid OnSelectionChanged() override;\n\n    \t// Deselects all in group\n    \tvoid DeselectAll() override;\n\n\t\t// Initializes context menu items\n\t\tvoid InitializeContextMenus();\n\n        // Recalculates view area by curves approximated points\n\t\tvoid RecalculateViewArea();\n\n\t\t// Updates component, called in update, when preview enabled\n\t\tvoid UpdateComponent(float dt);\n\n        // Draws handles\n        void DrawHandles();\n\n        // Draws selection sprite\n        void DrawSelection();\n\n        // Draws states transitions\n        void DrawTransitions();\n\n\t\t// Draws single transition\n        static void DrawTransition(Vec2F from, Vec2F to, StateTransition::TransitionStatus status, float progress, bool selected = false);\n\n        // Initializes states list\n        void InitializeStates();\n\n\t\t// Called when state started, updates states transition animation\n\t\tvoid OnStateGraphStateStarted(const Ref<AnimationStateGraphComponent::StatePlayer>& player);\n\n\t\t// Called when state finished, updates states transition animation\n\t\tvoid OnStateGraphStateFinished(const Ref<AnimationStateGraphComponent::StatePlayer>& player);\n\n\t\t// Called when transition started, updates states transition animation\n\t\tvoid OnStateGraphTransitionStarted(const Ref<AnimationGraphTransition>& transition);\n\n\t\t// Called when transition finished, updates states transition animation\n\t\tvoid OnStateGraphTransitionFinished(const Ref<AnimationGraphTransition>& transition);\n\n\t\t// Called when transitions planned, updates states transition animation\n\t\tvoid OnStateGraphTransitionsPlanned(const Vector<Ref<AnimationGraphTransition>>& path);\n\n\t\t// Called when transition cancelled, updates states transition animation\n\t\tvoid OnStateGraphTransitionCancelled(const Ref<AnimationGraphTransition>& transition);\n\n\t\t// Called when initial state was changed, updates visual for states\n        void OnStateGraphInitialStateChanged(const String& stateName);\n\n\t\t// Called when added new state to graph, updates states visual\n\t\tvoid OnStateGraphStateAdded(const Ref<AnimationGraphState>& state);\n\n\t\t// Called when removed state from graph, updates states visual\n\t\tvoid OnStateGraphStateRemoved(const Ref<AnimationGraphState>& state);\n\n\t\t// Creates state widget\n\t\tvoid CreateState();\n\n\t\t// Sets current state default\n        void SetCurrentStateInitial();\n\n\t\t// Starts adding transition from current state\n\t\tvoid StartAddingTransition();\n\n\t\t// Removes current selected states\n\t\tvoid RemoveCurrentStates();\n\n\t\t// Removes current transition\n        void RemoveCurrentTransition();\n\n\t\t// Opens context menu for state\n\t\tvoid OpenStateContextMenu(const Ref<StateWidget>& state);\n\n\t\t// Called when state was pressed\n\t\tvoid OnStatePressed(const Ref<StateWidget>& state);\n\n\t\t// Checks if viewers need to be refreshed, uses timer to refresh them (mRefreshViewersTimer)\n\t\tvoid CheckRefreshViewersTimer(float dt);\n        \n        REF_COUNTERABLE_IMPL(FrameScrollView, SelectableDragHandlesGroup);\n\n        friend class AnimationGraphTransitionViewer;\n        friend class GraphAnimationStateViewer;\n\t};\n}\n// --- META ---\n\nPRE_ENUM_META(Editor::AnimationStateGraphEditor::StateTransition::TransitionStatus);\n\nPRE_ENUM_META(Editor::AnimationStateGraphEditor::StateWidget::TransitionState);\n\nCLASS_BASES_META(Editor::AnimationStateGraphEditor)\n{\n    BASE_CLASS(Editor::FrameScrollView);\n    BASE_CLASS(o2::SelectableDragHandlesGroup);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationStateGraphEditor)\n{\n    FIELD().PUBLIC().NAME(actionsListDelegate);\n    FIELD().PROTECTED().NAME(mContextMenu);\n    FIELD().PROTECTED().NAME(mStateContextMenu);\n    FIELD().PROTECTED().NAME(mTransitionContextMenu);\n    FIELD().PROTECTED().NAME(mGraph);\n    FIELD().PROTECTED().NAME(mComponent);\n    FIELD().PROTECTED().NAME(mStateWidgetsContainer);\n    FIELD().PROTECTED().NAME(mStatesWidgets);\n    FIELD().PROTECTED().NAME(mStatesWidgetsMap);\n    FIELD().PROTECTED().NAME(mStateHandlesMap);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectionSprite);\n    FIELD().PROTECTED().NAME(mSelectingPressedPoint);\n    FIELD().PROTECTED().NAME(mContextMenuPos);\n    FIELD().PROTECTED().NAME(mContextMenuState);\n    FIELD().PROTECTED().NAME(mSelectedTransition);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mCreatingTransition);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mCreatingState);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNeedAdjustView);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mRefreshViewersTimer);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mPreviewEnabled);\n    FIELD().PROTECTED().NAME(mActionsList);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationStateGraphEditor)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetGraph, const Ref<AnimationStateGraphAsset>&, const Ref<AnimationStateGraphComponent>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionSpriteImage, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPreviewEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ContextMenu>&, GetContextMenu);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<AnimationStateGraphEditor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseStayDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawInheritedDepthChildren);\n    FUNCTION().PROTECTED().SIGNATURE(void, RedrawContent);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectionChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeselectAll);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeContextMenus);\n    FUNCTION().PROTECTED().SIGNATURE(void, RecalculateViewArea);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateComponent, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawHandles);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawSelection);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawTransitions);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(void, DrawTransition, Vec2F, Vec2F, StateTransition::TransitionStatus, float, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeStates);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateGraphStateStarted, const Ref<AnimationStateGraphComponent::StatePlayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateGraphStateFinished, const Ref<AnimationStateGraphComponent::StatePlayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateGraphTransitionStarted, const Ref<AnimationGraphTransition>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateGraphTransitionFinished, const Ref<AnimationGraphTransition>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateGraphTransitionsPlanned, const Vector<Ref<AnimationGraphTransition>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateGraphTransitionCancelled, const Ref<AnimationGraphTransition>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateGraphInitialStateChanged, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateGraphStateAdded, const Ref<AnimationGraphState>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateGraphStateRemoved, const Ref<AnimationGraphState>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CreateState);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetCurrentStateInitial);\n    FUNCTION().PROTECTED().SIGNATURE(void, StartAddingTransition);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveCurrentStates);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveCurrentTransition);\n    FUNCTION().PROTECTED().SIGNATURE(void, OpenStateContextMenu, const Ref<StateWidget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStatePressed, const Ref<StateWidget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckRefreshViewersTimer, float);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::AnimationStateGraphEditor::StateAnimation)\n{\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::IObject);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationStateGraphEditor::StateAnimation)\n{\n    FIELD().PUBLIC().ITEMS_SOURCE_ATTRIBUTE(GetAvailableStates).NAME(name);\n    FIELD().PUBLIC().RANGE_ATTRIBUTE(0, 1).NAME(weight);\n    FIELD().PUBLIC().NAME(state);\n    FIELD().PUBLIC().NAME(animation);\n    FIELD().PUBLIC().NAME(owner);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationStateGraphEditor::StateAnimation)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vector<String>, GetAvailableStates);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWeight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetWeight);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::AnimationStateGraphEditor::StateTransition)\n{\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::CursorAreaEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationStateGraphEditor::StateTransition)\n{\n    FIELD().PUBLIC().NAME(owner);\n    FIELD().PUBLIC().NAME(destination);\n    FIELD().PUBLIC().NO_HEADER_ATTRIBUTE().NAME(transition);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().DEFAULT_VALUE(TransitionStatus::None).NAME(status);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mIsSelected);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationStateGraphEditor::StateTransition)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetStatus, TransitionStatus);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelected, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSelected);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::AnimationStateGraphEditor::StateWidget)\n{\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::IObject);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationStateGraphEditor::StateWidget)\n{\n    FIELD().PUBLIC().NAME(state);\n    FIELD().PUBLIC().NAME(player);\n    FIELD().PUBLIC().DEFAULT_TYPE_ATTRIBUTE(StateAnimation).DONT_DELETE_ATTRIBUTE().INVOKE_ON_CHANGE_ATTRIBUTE(OnAnimationsListChanged).NAME(animations);\n    FIELD().PUBLIC().NAME(transitions);\n    FIELD().PUBLIC().NAME(transitionsMap);\n    FIELD().PUBLIC().NAME(widget);\n    FIELD().PUBLIC().NAME(animationsListProperty);\n    FIELD().PUBLIC().NAME(propertiesContext);\n    FIELD().PUBLIC().NAME(dragHandle);\n    FIELD().PUBLIC().NAME(editor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationStateGraphEditor::StateWidget)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Ref<AnimationStateGraphEditor>&, const Ref<AnimationGraphState>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update);\n    FUNCTION().PUBLIC().SIGNATURE(void, InitializeTransitions);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, DrawTransitions);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateState, TransitionState);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPlayer, const Ref<AnimationStateGraphComponent::StatePlayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OpenContextMenu);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAnimationsListChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragged, const Vec2F&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationStateGraphWindow/AnimationStateGraphWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AnimationStateGraphWindow.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/List.h\"\n#include \"o2/Scene/UI/Widgets/LongList.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nDECLARE_SINGLETON(Editor::AnimationStateGraphWindow);\n\nnamespace Editor\n{\n\tconst Type& AnimationStateGraphWindow::GetAssetType() const\n\t{\n\t\treturn TypeOf(AnimationStateGraphAsset);\n\t}\n\n\tRef<RefCounterable> AnimationStateGraphWindow::CastToRefCounterable(const Ref<AnimationStateGraphWindow>& ref)\n\t{\n\t\treturn DynamicCast<Singleton<AnimationStateGraphWindow>>(ref);\n\t}\n\n\tAnimationStateGraphWindow::AnimationStateGraphWindow(RefCounter* refCounter) :\n        Singleton<AnimationStateGraphWindow>(refCounter), IAssetEditorWindow(refCounter)\n    {\n        InitializeWindow();\n    }\n\n    AnimationStateGraphWindow::~AnimationStateGraphWindow()\n    {}\n\n    void AnimationStateGraphWindow::InitializeWindow()\n    {\n        IAssetEditorWindow::InitializeWindow();\n\n        mWindow->caption = \"State Graph\";\n        mWindow->name = \"animation state graph window\";\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_log_wnd_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-1, 1)));\n\n\t\tmEditor = mmake<AnimationStateGraphEditor>();\n\t\t*mEditor->layout = WidgetLayout::BothStretch(0, 0, 0, 20);\n\t\tmWindow->AddChild(mEditor);\n\n\t\tauto horScroll = o2UI.CreateHorScrollBar();\n\t\t*horScroll->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 5, 15, 10);\n\t\tmEditor->SetHorScrollbar(horScroll);\n\n\t\tauto verScroll = o2UI.CreateVerScrollBar();\n\t\t*verScroll->layout = WidgetLayout::VerStretch(HorAlign::Right, 5, 15, 10);\n\t\tmEditor->SetVerScrollbar(verScroll);\n\n        mEditor->SetSelectionSpriteImage(AssetRef<ImageAsset>(\"ui/UI_Window_place.png\"));\n    }\n\n    String AnimationStateGraphWindow::GetWindowTitle() const\n    {\n        return \"State Graph\";\n    }\n\n\tvoid AnimationStateGraphWindow::OnStartEditingAsset()\n\t{\n\t\tif (!mEditingComponent)\n\t\t\tmEditor->SetGraph(DynamicCast<AnimationStateGraphAsset>(mEditingAsset.Lock()), nullptr);\n\t}\n\n\tvoid AnimationStateGraphWindow::OnCompletedEditingAsset()\n\t{}\n\n\tvoid AnimationStateGraphWindow::OnStartEditingComponent()\n\t{\n\t\tmEditor->SetGraph(DynamicCast<AnimationStateGraphAsset>(mEditingAsset.Lock()),\n\t\t\t\t\t\t  DynamicCast<AnimationStateGraphComponent>(mEditingComponent.Lock()));\n\t}\n\n\tvoid AnimationStateGraphWindow::OnCompletedEditingComponent()\n\t{}\n\n\tvoid AnimationStateGraphWindow::OnComponentPreviewEnabled()\n\t{\n\t\tmEditor->SetPreviewEnabled(true);\n\t}\n\n\tvoid AnimationStateGraphWindow::OnComponentPreviewDisabled()\n\t{\n\t\tmEditor->SetPreviewEnabled(false);\n\t}\n\n\tvoid AnimationStateGraphWindow::ComponentSetAsset(const AssetRef<Asset>& asset)\n\t{\n\t\tif (!mEditingComponent)\n\t\t\treturn;\n\n\t\tAssetRef<AnimationStateGraphAsset> graphAsset = asset;\n\t\tauto component = DynamicCast<AnimationStateGraphComponent>(mEditingComponent.Lock());\n\n\t\tif (graphAsset && component)\n\t\t{\n\t\t\tcomponent->SetGraph(graphAsset);\n\t\t\tmEditor->SetGraph(graphAsset, component);\n\t\t}\n\t}\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::AnimationStateGraphWindow, Editor__AnimationStateGraphWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationStateGraphWindow/AnimationStateGraphWindow.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/AnimationStateGraphAsset.h\"\n#include \"o2/Scene/Components/AnimationStateGraphComponent.h\"\n#include \"o2Editor/Windows/AnimationStateGraphWindow/AnimationStateGraphEditor.h\"\n#include \"o2Editor/Windows/IAssetEditorWindow.h\"\n\nusing namespace o2;\n\n// Editor animation window accessor macros\n#define o2EditorAnimationStateGraphWindow AnimationStateGraphWindow::Instance()\n\nnamespace Editor\n{\n    // ----------------\n    // Log window class\n    // ----------------\n    class AnimationStateGraphWindow : public Singleton<AnimationStateGraphWindow>, public IAssetEditorWindow\n    {\n    public:\n        // Default constructor\n        AnimationStateGraphWindow(RefCounter* refCounter);\n\n        // Destructor\n        ~AnimationStateGraphWindow();\n\n\t\t// Returns asset type that this editor window can edit\n\t\tconst Type& GetAssetType() const override;\n\n\t\t// Dynamic cast to RefCounterable via Singleton<AnimationStateGraphWindow>\n\t\tstatic Ref<RefCounterable> CastToRefCounterable(const Ref<AnimationStateGraphWindow>& ref);\n\n\t\tIOBJECT(AnimationStateGraphWindow);\n\t\tREF_COUNTERABLE_IMPL(IEditorWindow, Singleton<AnimationStateGraphWindow>);\n\n    protected:\n\t\tRef<AnimationStateGraphEditor> mEditor; // Animation state graph editor\n\n    protected:\n        // Initializes window\n\t\tvoid InitializeWindow() override;\n\n        // Returns window title\n        String GetWindowTitle() const override;\n\n\t\t// Called when asset editing starts\n        void OnStartEditingAsset() override;\n\n\t\t// Called when asset editing ends\n        void OnCompletedEditingAsset() override;\n\n\t\t// Called when component editing starts\n        void OnStartEditingComponent() override;\n\n\t\t// Called when component editing ends\n        void OnCompletedEditingComponent() override;\n\n\t\t// Called when component preview is enabled\n        void OnComponentPreviewEnabled() override;\n\n\t\t// Called when component preview is disabled\n\t\tvoid OnComponentPreviewDisabled() override;\n\n\t\t// Sets current component asset\n        void ComponentSetAsset(const AssetRef<Asset>& asset) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AnimationStateGraphWindow)\n{\n    BASE_CLASS(o2::Singleton<AnimationStateGraphWindow>);\n    BASE_CLASS(Editor::IAssetEditorWindow);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationStateGraphWindow)\n{\n    FIELD().PROTECTED().NAME(mEditor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationStateGraphWindow)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(const Type&, GetAssetType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<AnimationStateGraphWindow>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(String, GetWindowTitle);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStartEditingAsset);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCompletedEditingAsset);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStartEditingComponent);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCompletedEditingComponent);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentPreviewEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentPreviewDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, ComponentSetAsset, const AssetRef<Asset>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationStateGraphWindow/GraphAnimationStateViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"GraphAnimationStateViewer.h\"\n\n#include \"o2/Scene/Components/AnimationComponent.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalProgress.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2Editor/Windows/AnimationStateGraphWindow/AnimationStateGraphEditor.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n\tconst Type* GraphAnimationStateViewer::GetViewingObjectType() const\n\t{\n\t\tif (mRealObjectType)\n\t\t\treturn mRealObjectType;\n\n\t\treturn GetViewingObjectTypeStatic();\n\t}\n\n\tconst Type* GraphAnimationStateViewer::GetViewingObjectTypeStatic()\n\t{\n\t\treturn &TypeOf(AnimationStateGraphEditor::StateAnimation);\n\t}\n\n\tRef<Spoiler> GraphAnimationStateViewer::CreateSpoiler(const Ref<Widget>& parent)\n\t{\n\t\tmSpoiler = IObjectPropertiesViewer::CreateSpoiler(parent);\n\n\t\tmPlayPause = o2UI.CreateWidget<Toggle>(\"animation state play-stop\");\n\t\tmPlayPause->name = \"play-stop\";\n\t\t*mPlayPause->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(7, 1));\n\t\tmPlayPause->onToggleByUser = THIS_FUNC(OnPlayPauseToggled);\n\t\tmSpoiler->AddInternalWidget(mPlayPause);\n\n\t\tmEditBtn = o2UI.CreateWidget<Button>(\"edit animation state\");\n\t\tmEditBtn->name = \"edit\";\n\t\t*mEditBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(-40, 1));\n\t\tmEditBtn->onClick = THIS_FUNC(OnEditPressed);\n\t\tmSpoiler->AddInternalWidget(mEditBtn);\n\n\t\tmLooped = o2UI.CreateWidget<Toggle>(\"animation state loop\");\n\t\tmLooped->name = \"loop\";\n\t\t*mLooped->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(-20, 1));\n\t\tmLooped->onToggleByUser = THIS_FUNC(OnLoopToggled);\n\t\tmSpoiler->AddInternalWidget(mLooped);\n\n\t\tmTimeProgress = o2UI.CreateWidget<HorizontalProgress>(\"animation state bar\");\n\t\tmTimeProgress->name = \"bar\";\n\t\t*mTimeProgress->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 2, 18);\n\t\tmTimeProgress->onChangeByUser = THIS_FUNC(OnTimeProgressChanged);\n\t\tmSpoiler->AddInternalWidget(mTimeProgress);\n\n\t\tif (auto textLayer = GetSpoiler()->GetLayer(\"caption\"))\n\t\t{\n\t\t\ttextLayer->layout.offsetLeft = 27;\n\t\t\ttextLayer->layout.offsetBottom = -19;\n\t\t\ttextLayer->layout.offsetTop = 1;\n\t\t}\n\n\t\tif (auto header = parent->GetChildByType<Widget>(\"caption/header\"))\n\t\t{\n\t\t\tauto spacer = mmake<Widget>();\n\t\t\tspacer->layout->maxWidth = 40;\n\t\t\theader->AddChild(spacer, 1);\n\t\t}\n\n\t\treturn mSpoiler;\n\t}\n\n\tvoid GraphAnimationStateViewer::OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets)\n\t{\n\t\tif (mSubscribedPlayer)\n\t\t\tmSubscribedPlayer.Lock()->onUpdate -= THIS_FUNC(OnAnimationUpdated);\n\n\t\tmSubscribedPlayer = nullptr;\n\n\t\tif (!targetObjets.IsEmpty())\n\t\t{\n\t\t\tauto stateAnimation = dynamic_cast<AnimationStateGraphEditor::StateAnimation*>(targetObjets.Last().first);\n\t\t\tif (stateAnimation && stateAnimation->state)\n\t\t\t{\n\t\t\t\tauto state = stateAnimation->state.Lock();\n\n\t\t\t\tmSubscribedPlayer = Ref(&state->GetPlayer());\n\t\t\t\tmLooped->value = state->IsLooped();\n\t\t\t\tmEditBtn->enabled = DynamicCast<AnimationState>(state) != nullptr;\n\t\t\t}\n\n\t\t\tif (auto player = mSubscribedPlayer.Lock())\n\t\t\t{\n\t\t\t\tplayer->onUpdate += THIS_FUNC(OnAnimationUpdated);\n\t\t\t\tplayer->onPlay += THIS_FUNC(OnAnimationStarted);\n\t\t\t\tplayer->onStop += THIS_FUNC(OnAnimationFinished);\n\n\t\t\t\tmPlayPause->value = player->IsPlaying();\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid GraphAnimationStateViewer::OnFree()\n\t{\n\t\tif (auto player = mSubscribedPlayer.Lock())\n\t\t{\n\t\t\tplayer->onUpdate -= THIS_FUNC(OnAnimationUpdated);\n\t\t\tplayer->onPlay -= THIS_FUNC(OnAnimationStarted);\n\t\t\tplayer->onStop -= THIS_FUNC(OnAnimationFinished);\n\t\t}\n\n\t\tmSubscribedPlayer = nullptr;\n\t}\n\n\tvoid GraphAnimationStateViewer::OnPlayPauseToggled(bool play)\n\t{\n\t\tif (auto stateWidget = mPropertiesContext->FindOnStack<AnimationStateGraphEditor::StateWidget>())\n\t\t{\n\t\t\tif (auto component = stateWidget->editor.Lock()->mComponent.Lock())\n\t\t\t{\n\t\t\t\tif (play)\n\t\t\t\t\tcomponent->GoToState(stateWidget->state.Lock());\n\t\t\t}\n\t\t}\n\n\t\to2Scene.OnObjectChanged(o2EditorSceneScreen.GetSelectedObjects().First());\n\t}\n\n\tvoid GraphAnimationStateViewer::OnLoopToggled(bool looped)\n\t{\n\t\tfor (auto& targets : mTargetObjects)\n\t\t{\n\t\t\tif (!targets.first)\n\t\t\t\tcontinue;\n\n\t\t\tauto stateAnimation = dynamic_cast<AnimationStateGraphEditor::StateAnimation*>(targets.first);\n\t\t\tif (stateAnimation && stateAnimation->state)\n\t\t\t\tstateAnimation->state.Lock()->SetLooped(looped);\n\t\t}\n\n\t\to2Scene.OnObjectChanged(o2EditorSceneScreen.GetSelectedObjects().First());\n\t}\n\n\tvoid GraphAnimationStateViewer::OnEditPressed()\n\t{\n\t\tif (mTargetObjects.IsEmpty())\n\t\t\treturn;\n\n\t\tauto state = dynamic_cast<AnimationStateGraphEditor::StateAnimation*>(mTargetObjects.Last().first);\n\t\tauto animationState = DynamicCast<AnimationState>(state->state.Lock());\n\t\tif (!animationState)\n\t\t\treturn;\n\n\t\tauto animationRef = animationState->GetAnimation();\n\t\tif (!animationRef)\n\t\t{\n\t\t\tanimationRef.CreateInstance();\n\t\t\tanimationState->SetAnimation(animationRef);\n\n\t\t\tGetSpoiler()->Expand();\n\t\t}\n\n\t\tif (animationRef)\n\t\t{\n// \t\t\to2EditorAnimationWindow.SetAnimation(animationRef->animation);\n// \n// \t\t\tif (!o2EditorSceneScreen.GetSelectedObjects().IsEmpty())\n// \t\t\t\to2EditorAnimationWindow.SetTarget(DynamicCast<Actor>(o2EditorSceneScreen.GetSelectedObjects().Last()));\n// \n// \t\t\to2EditorAnimationWindow.SetAnimationEditable(Ref(mPropertiesContext->FindOnStack<IAssetEditablePreview>()));\n// \t\t\to2EditorAnimationWindow.GetWindow()->Focus();\n\t\t}\n\t}\n\n\tvoid GraphAnimationStateViewer::OnTimeProgressChanged(float value)\n\t{\n\t\tif (mSubscribedPlayer)\n\t\t\tmSubscribedPlayer.Lock()->SetRelTime(value);\n\t}\n\n\tvoid GraphAnimationStateViewer::OnAnimationUpdated(float time)\n\t{\n\t\tif (auto subscribedPlayer = mSubscribedPlayer.Lock())\n\t\t\tmTimeProgress->value = subscribedPlayer->GetLoopTime()/ subscribedPlayer->GetDuration();\n\t}\n\n\tvoid GraphAnimationStateViewer::OnAnimationStarted()\n\t{\n\t\tmPlayPause->value = true;\n\t}\n\n\tvoid GraphAnimationStateViewer::OnAnimationFinished()\n\t{\n\t\tmPlayPause->value = false;\n\t\tmTimeProgress->value = 0.0f;\n\t}\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::GraphAnimationStateViewer, Editor__GraphAnimationStateViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationStateGraphWindow/GraphAnimationStateViewer.h",
    "content": "#pragma once\n\n#include \"o2/Events/EventSystem.h\"\n#include \"o2Editor/Properties/Objects/DefaultObjectPropertiesViewer.h\"\n\nnamespace o2\n{\n    class Toggle;\n    class Button;\n    class HorizontalProgress;\n    class IAnimation;\n    class Spoiler;\n}\n\nnamespace Editor\n{\n    // ------------------------------------\n    // AnimationComponent properties viewer\n    // ------------------------------------\n    class GraphAnimationStateViewer : public DefaultObjectPropertiesViewer\n    {\n    public:\n        // Returns viewing objects type\n        const Type* GetViewingObjectType() const override;\n\n        // Creates spoiler for properties\n        Ref<Spoiler> CreateSpoiler(const Ref<Widget>& parent) override;\n\n        // Returns viewing objects base type by static function\n        static const Type* GetViewingObjectTypeStatic();\n\n        IOBJECT(GraphAnimationStateViewer);\n\n    private:\n        Ref<Toggle> mPlayPause;\n        Ref<Button> mEditBtn;\n        Ref<Toggle> mLooped;\n\n        Ref<HorizontalProgress> mTimeProgress;\n\n        WeakRef<IAnimation> mSubscribedPlayer;\n\n    private:\n        // Called when viewer is refreshed\n        void OnRefreshed(const Vector<Pair<IObject*, IObject*>>& targetObjets) override;\n\n        // Called when the viewer is freed\n        void OnFree() override;\n\n        // Called when play pause toggled\n        void OnPlayPauseToggled(bool play);\n\n        // Called when loop toggled\n        void OnLoopToggled(bool looped);\n\n        // Called when edit button pressed, sets animation editing\n        void OnEditPressed();\n\n        // Called when time progress changed by user, sets subscribed player time \n        void OnTimeProgressChanged(float value);\n\n        // Called when animation updates\n        void OnAnimationUpdated(float time);\n\n        // Called when animation started\n        void OnAnimationStarted();\n\n        // Called when animation finished\n        void OnAnimationFinished();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::GraphAnimationStateViewer)\n{\n    BASE_CLASS(Editor::DefaultObjectPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::GraphAnimationStateViewer)\n{\n    FIELD().PRIVATE().NAME(mPlayPause);\n    FIELD().PRIVATE().NAME(mEditBtn);\n    FIELD().PRIVATE().NAME(mLooped);\n    FIELD().PRIVATE().NAME(mTimeProgress);\n    FIELD().PRIVATE().NAME(mSubscribedPlayer);\n}\nEND_META;\nCLASS_METHODS_META(Editor::GraphAnimationStateViewer)\n{\n\n    typedef const Vector<Pair<IObject*, IObject*>>& _tmp1;\n\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Spoiler>, CreateSpoiler, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetViewingObjectTypeStatic);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnRefreshed, _tmp1);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnFree);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnPlayPauseToggled, bool);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnLoopToggled, bool);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnEditPressed);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnTimeProgressChanged, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnAnimationUpdated, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnAnimationStarted);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnAnimationFinished);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/AnimationKeysActions.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AnimationKeysActions.h\"\n\nnamespace Editor\n{\n    AnimationAddKeysAction::AnimationAddKeysAction()\n    {}\n\n    AnimationAddKeysAction::AnimationAddKeysAction(const Map<String, Vector<UInt64>>& keys, const DataDocument& keysData,\n                                                   const Ref<KeyHandlesSheet>& editor):\n        mKeys(keys), mKeysData(keysData), mEditor(editor)\n    {}\n\n    String AnimationAddKeysAction::GetName() const\n    {\n        return \"Add keys\";\n    }\n\n    void AnimationAddKeysAction::Redo()\n    {\n        Map<String, Vector<UInt64>> keys;\n        mEditor.Lock()->DeserializeKeys(mKeysData, keys, 0.0f, false);\n        mEditor.Lock()->SetSelectedKeys(keys);\n    }\n\n    void AnimationAddKeysAction::Undo()\n    {\n        mEditor.Lock()->DeleteKeys(mKeys, false);\n    }\n\n    AnimationDeleteKeysAction::AnimationDeleteKeysAction()\n    {}\n\n    AnimationDeleteKeysAction::AnimationDeleteKeysAction(const Map<String, Vector<UInt64>>& keys, const DataDocument& keysData,\n                                                         const Ref<KeyHandlesSheet>& editor) :\n        mKeys(keys), mKeysData(keysData), mEditor(editor)\n    {}\n\n    String AnimationDeleteKeysAction::GetName() const\n    {\n        return \"Delete keys\";\n    }\n\n    void AnimationDeleteKeysAction::Redo()\n    {\n        mEditor.Lock()->DeleteKeys(mKeys, false);\n    }\n\n    void AnimationDeleteKeysAction::Undo()\n    {\n        Map<String, Vector<UInt64>> keys;\n        mEditor.Lock()->DeserializeKeys(mKeysData, keys, 0.0f, false);\n        mEditor.Lock()->SetSelectedKeys(keys);\n    }\n\n    AnimationKeysChangeAction::AnimationKeysChangeAction()\n    {}\n\n    AnimationKeysChangeAction::AnimationKeysChangeAction(const Map<String, Vector<UInt64>>& keys, const DataDocument& beforeKeysData,\n                                                         const DataDocument& afterKeysData, const Ref<KeyHandlesSheet>& editor):\n        mKeys(keys), mBeforeKeysData(beforeKeysData), mAfterKeysData(afterKeysData), mEditor(editor)\n    {}\n\n    String AnimationKeysChangeAction::GetName() const\n    {\n        return \"Changed keys\";\n    }\n\n    void AnimationKeysChangeAction::Redo()\n    {\n        auto editor = mEditor.Lock();\n\n        editor->DeleteKeys(mKeys, false);\n\n        Map<String, Vector<UInt64>> keys;\n        editor->DeserializeKeys(mAfterKeysData, keys, 0.0f, false);\n        editor->SetSelectedKeys(keys);\n    }\n\n    void AnimationKeysChangeAction::Undo()\n    {\n        auto editor = mEditor.Lock();\n\n        editor->DeleteKeys(mKeys, false);\n\n        Map<String, Vector<UInt64>> keys;\n        editor->DeserializeKeys(mBeforeKeysData, keys, 0.0f, false);\n        editor->SetSelectedKeys(keys);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::AnimationAddKeysAction, Editor__AnimationAddKeysAction);\n\nDECLARE_CLASS(Editor::AnimationDeleteKeysAction, Editor__AnimationDeleteKeysAction);\n\nDECLARE_CLASS(Editor::AnimationKeysChangeAction, Editor__AnimationKeysChangeAction);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/AnimationKeysActions.h",
    "content": "#pragma once\n\n#include \"o2Editor/Windows/AnimationWindow/KeyHandlesSheet.h\"\n#include \"o2Editor/Actions/IAction.h\"\n\nnamespace Editor\n{\n    class AnimationAddKeysAction : public IAction\n    {\n    public:\n        AnimationAddKeysAction();\n        AnimationAddKeysAction(const Map<String, Vector<UInt64>>& keys, const DataDocument& keysData, const Ref<KeyHandlesSheet>& editor);\n\n        String GetName() const override;\n        void Redo() override;\n        void Undo() override;\n\n        SERIALIZABLE(AnimationAddKeysAction);\n\n    protected:\n        Map<String, Vector<UInt64>> mKeys;\n        DataDocument                mKeysData;\n        WeakRef<KeyHandlesSheet>    mEditor;\n    };\n\n    class AnimationDeleteKeysAction : public IAction\n    {\n    public:\n        AnimationDeleteKeysAction();\n        AnimationDeleteKeysAction(const Map<String, Vector<UInt64>>& keys, const DataDocument& keysData, const Ref<KeyHandlesSheet>& editor);\n\n        String GetName() const override;\n        void Redo() override;\n        void Undo() override;\n\n        SERIALIZABLE(AnimationDeleteKeysAction);\n\n    protected:\n        Map<String, Vector<UInt64>> mKeys;\n        DataDocument                mKeysData;\n        WeakRef<KeyHandlesSheet>    mEditor;\n    };\n\n    class AnimationKeysChangeAction : public IAction\n    {\n    public:\n        AnimationKeysChangeAction();\n        AnimationKeysChangeAction(const Map<String, Vector<UInt64>>& keys,\n                                  const DataDocument& beforeKeysData, const DataDocument& afterKeysData,\n                                  const Ref<KeyHandlesSheet>& editor);\n\n        String GetName() const override;\n        void Redo() override;\n        void Undo() override;\n\n        SERIALIZABLE(AnimationKeysChangeAction);\n\n    protected:\n        Map<String, Vector<UInt64>> mKeys;\n        DataDocument                mBeforeKeysData;\n        DataDocument                mAfterKeysData;\n        WeakRef<KeyHandlesSheet>    mEditor;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AnimationAddKeysAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationAddKeysAction)\n{\n    FIELD().PROTECTED().NAME(mKeys);\n    FIELD().PROTECTED().NAME(mKeysData);\n    FIELD().PROTECTED().NAME(mEditor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationAddKeysAction)\n{\n\n    typedef const Map<String, Vector<UInt64>>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(_tmp1, const DataDocument&, const Ref<KeyHandlesSheet>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::AnimationDeleteKeysAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationDeleteKeysAction)\n{\n    FIELD().PROTECTED().NAME(mKeys);\n    FIELD().PROTECTED().NAME(mKeysData);\n    FIELD().PROTECTED().NAME(mEditor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationDeleteKeysAction)\n{\n\n    typedef const Map<String, Vector<UInt64>>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(_tmp1, const DataDocument&, const Ref<KeyHandlesSheet>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::AnimationKeysChangeAction)\n{\n    BASE_CLASS(Editor::IAction);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationKeysChangeAction)\n{\n    FIELD().PROTECTED().NAME(mKeys);\n    FIELD().PROTECTED().NAME(mBeforeKeysData);\n    FIELD().PROTECTED().NAME(mAfterKeysData);\n    FIELD().PROTECTED().NAME(mEditor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationKeysChangeAction)\n{\n\n    typedef const Map<String, Vector<UInt64>>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(_tmp1, const DataDocument&, const DataDocument&, const Ref<KeyHandlesSheet>&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Redo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undo);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/AnimationWindow.cpp",
    "content": "#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2Editor/stdafx.h\"\n#include \"AnimationWindow.h\"\n\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Tools/ITransformTool.h\"\n#include \"o2Editor/Windows/AnimationWindow/CurvesSheet.h\"\n#include \"o2Editor/Windows/AnimationWindow/KeyHandlesSheet.h\"\n#include \"o2Editor/Windows/AnimationWindow/PropertiesListDlg.h\"\n#include \"o2Editor/Windows/AnimationWindow/Timeline.h\"\n#include \"o2Editor/Windows/AnimationWindow/Tree.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nDECLARE_SINGLETON(Editor::AnimationWindow);\n\nnamespace Editor\n{\n    AnimationWindow::AnimationWindow(RefCounter* refCounter):\n        IAssetEditorWindow(refCounter), Singleton<AnimationWindow>(refCounter)\n    {\n        InitializeWindow();\n    }\n\n    AnimationWindow::~AnimationWindow()\n    {}\n\n    void AnimationWindow::Update(float dt)\n    {\n        if (mPreviewPlayer && mOwnPreviewPlayer)\n            mPreviewPlayer->Update(dt);\n\n        if (auto targetActor = mTargetActor.Lock())\n            targetActor->UpdateTransform();\n\n        if (mPreviewPlayer && mPreviewPlayer->IsPlaying() != mPlayPauseToggle->GetValue())\n            mPlayPauseToggle->SetValue(mPreviewPlayer->IsPlaying());\n\n        IAssetEditorWindow::Update(dt);\n    }\n\n    void AnimationWindow::SetCurvesMode(bool enabled)\n    {\n        mCurves->SetEnabled(enabled);\n        mHandlesSheet->SetEnabled(!enabled);\n        mTimeline->SetViewMoveDisabled(enabled);\n        mTimeScroll->enabled = !enabled;\n        mTree->SetCurveViewMode(enabled);\n    }\n\n    bool AnimationWindow::IsCurvesMode() const\n    {\n        return mCurves->IsEnabled();\n    }\n\n\tconst Type& AnimationWindow::GetAssetType() const\n\t{\n\t\treturn TypeOf(AnimationAsset);\n\t}\n\n\tRef<RefCounterable> AnimationWindow::CastToRefCounterable(const Ref<AnimationWindow>& ref)\n    {\n        return DynamicCast<Singleton<AnimationWindow>>(ref);\n    }\n\n    void AnimationWindow::OnClosed()\n    {\n        SetComponentPreview(false);\n    }\n\n    void AnimationWindow::InitializeWindow()\n    {\n        PushEditorScopeOnStack scope;\n\n        mWindow->caption = \"Animation\";\n        mWindow->name = \"animation window\";\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_animation_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-1, 1)));\n        mWindow->SetViewLayout(Layout::BothStretch(-2, 0, 0, 19));\n        mWindow->SetClippingLayout(Layout::BothStretch(-1, 0, 0, 18));\n\n        InitializeUpPanel();\n\n        mWorkArea = mmake<Widget>();\n        *mWorkArea->layout = WidgetLayout::BothStretch(0, 0, 0, 20);\n        mWindow->AddChild(mWorkArea);\n\n        InitializeHandlesSheet();\n        InitializeTree();\n        InitializeCurvesSheet();\n        InitializeTimeline();\n        InitializeSeparatorHandle();\n\n        auto thisRef = Ref(this);\n        mCurves->mAnimationWindow = thisRef;\n        mHandlesSheet->mAnimationWindow = thisRef;\n        mTimeline->mAnimationWindow = thisRef;\n        mTree->mAnimationWindow = thisRef;\n\n        SetCurvesMode(false);\n\n        PropertiesListDlg::InitializeSingleton();\n    }\n\n\tvoid AnimationWindow::OnFocused()\n\t{\n        mCurves->OnAnimationWindowFocused();\n\t}\n\n\tvoid AnimationWindow::OnUnfocused()\n\t{\n        mCurves->OnAnimationWindowUnfocused();\n\t}\n\n\tString AnimationWindow::GetWindowTitle() const\n    {\n        return \"Animation\";\n    }\n\n    void AnimationWindow::InitializeHandlesSheet()\n    {\n        mHandlesSheet = mmake<KeyHandlesSheet>();\n        *mHandlesSheet->layout = WidgetLayout::BothStretch(mTreeViewWidth, 0, 0, 0);\n        mWorkArea->AddChild(mHandlesSheet);\n    }\n\n    void AnimationWindow::InitializeTree()\n    {\n        mTree = o2UI.CreateWidget<AnimationTree>();\n        *mTree->layout = WidgetLayout::BothStretch();\n        mTree->SetTreeWidth(mTreeViewWidth);\n        mWorkArea->AddChild(mTree);\n    }\n\n    void AnimationWindow::InitializeTimeline()\n    {\n        mTimeline = mmake<AnimationTimeline>();\n        *mTimeline->layout = WidgetLayout::BothStretch(mTreeViewWidth, 0.0f, 0.0f, 0.0f);\n\n        mTimeScroll = o2UI.CreateHorScrollBar();\n        *mTimeScroll->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 10, 10, 10, 0);\n\n        mTimeline->SetScrollBar(mTimeScroll);\n\n        mWindow->AddChild(mTimeline);\n    }\n\n    void AnimationWindow::InitializeCurvesSheet()\n    {\n        mCurves = mmake<CurvesSheet>();\n        *mCurves->layout = WidgetLayout::BothStretch(mTreeViewWidth, 0, 0, 0);\n        mCurves->Disable();\n        mWorkArea->AddChild(mCurves);\n    }\n\n    void AnimationWindow::InitializeUpPanel()\n    {\n        mRecordToggle = o2UI.CreateWidget<Toggle>(\"menu record\");\n        mRecordToggle->onToggle = THIS_FUNC(OnMenuRecordToggle);\n        mButtonsPanel->AddChild(mRecordToggle);\n\n        mRewindLeft = o2UI.CreateWidget<Button>(\"menu rewind left\");\n        mButtonsPanel->AddChild(mRewindLeft);\n\n        mMoveLeft = o2UI.CreateWidget<Button>(\"menu move left\");\n        mButtonsPanel->AddChild(mMoveLeft);\n\n        mPlayPauseToggle = o2UI.CreateWidget<Toggle>(\"menu play-stop\");\n        mPlayPauseToggle->SetValue(false);\n        mPlayPauseToggle->onToggleByUser = THIS_FUNC(OnPlayPauseToggled);\n        mButtonsPanel->AddChild(mPlayPauseToggle);\n\n        mMoveRight = o2UI.CreateWidget<Button>(\"menu move right\");\n        mButtonsPanel->AddChild(mMoveRight);\n\n        mRewindRight = o2UI.CreateWidget<Button>(\"menu rewind right\");\n        mButtonsPanel->AddChild(mRewindRight);\n\n        mLoopToggle = o2UI.CreateWidget<Toggle>(\"menu loop-nonloop\");\n        mLoopToggle->SetValue(true);\n        mLoopToggle->onToggleByUser = THIS_FUNC(OnLoopToggled);\n        mButtonsPanel->AddChild(mLoopToggle); \n\n        mCurvesToggle = o2UI.CreateWidget<Toggle>(\"menu curves\");\n        mCurvesToggle->SetValue(false);\n        mCurvesToggle->onToggleByUser = [&](bool value) { SetCurvesMode(value); };\n        mButtonsPanel->AddChild(mCurvesToggle); \n\n        mPropertiesButton = o2UI.CreateWidget<Button>(\"menu properties\");\n        mPropertiesButton->onClick = [&]() { PropertiesListDlg::Show(mAnimation.Lock(), mTargetActor.Lock()); };\n        mButtonsPanel->AddChild(mPropertiesButton);\n\n        mAddKeyButton = o2UI.CreateWidget<Button>(\"menu add key\");\n        mButtonsPanel->AddChild(mAddKeyButton); \n    }\n\n    void AnimationWindow::InitializeSeparatorHandle()\n    {\n        mTreeSeparatorHandle = mmake<WidgetDragHandle>(mmake<Sprite>(\"ui/UI4_Ver_separator.png\"));\n        mTreeSeparatorHandle->GetRegularDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        mTreeSeparatorHandle->GetRegularDrawable()->szPivot = Vec2F(4, mTreeSeparatorHandle->GetRegularDrawable()->szPivot.Get().y);\n\n        mTreeSeparatorHandle->onChangedPos = [&](const Vec2F& point) {\n            mTreeViewWidth = Math::Max(point.x, mMinTreeViewWidth);\n            mTimeline->layout->left = mTreeViewWidth;\n            mHandlesSheet->layout->left = mTreeViewWidth;\n            mCurves->layout->left = mTreeViewWidth;\n            mTree->SetTreeWidth(mTreeViewWidth);\n        };\n\n        mTreeSeparatorHandle->checkPositionFunc = [&](const Vec2F& point) {\n            return Vec2F(Math::Max(point.x, mMinTreeViewWidth), mWorkArea->layout->GetHeight()*0.5f);\n        };\n\n        mTreeSeparatorHandle->onLayoutUpdated = [&]() {\n            mTreeSeparatorHandle->SetDrawablesSize(Vec2F(5.0f, mWorkArea->layout->GetHeight() + 50.0f));\n            mTreeSeparatorHandle->SetPosition(Vec2F(mTreeViewWidth, mWorkArea->layout->GetHeight()*0.5f));\n        };\n\n        mTreeSeparatorHandle->cursorType = CursorType::SizeWE;\n\n        mWorkArea->AddChild(mTreeSeparatorHandle);\n    }\n\n    void AnimationWindow::OnStartEditingAsset()\n    {\n        auto animationAsset = DynamicCast<AnimationAsset>(mEditingAsset.Lock());\n        mAnimationAsset = animationAsset;\n\n        auto animation = animationAsset->animation;\n        mAnimation = animation;\n\n        if (!mAnimation)\n            return;\n\n        if (mPreviewPlayer)\n        {\n            mPreviewPlayer->onUpdate -= THIS_FUNC(OnAnimationUpdate);\n            mPreviewPlayer = nullptr;\n            mOwnPreviewPlayer = false;\n        }\n\n        mTargetActor = nullptr;\n\n        animation->onChanged += THIS_FUNC(OnAnimationChanged);\n\n        mLoopToggle->SetValue(animation->GetLoop() == Loop::Repeat);\n        mPlayPauseToggle->SetValue(false);\n\n        mHandlesSheet->SetAnimation(animation);\n        mTimeline->SetAnimation(animation, nullptr);\n        mTree->SetAnimation(animation);\n        mCurves->SetAnimation(animation);\n    }\n\n    void AnimationWindow::OnCompletedEditingAsset()\n    {\n        if (auto animation = mAnimation.Lock())\n            animation->onChanged -= THIS_FUNC(OnAnimationChanged);\n    }\n\n\tvoid AnimationWindow::OnAssetEditablePreviewEnabled()\n\t{\n\t\tInitializeOwnAnimationPlayer();\n\t}\n\n\tvoid AnimationWindow::OnAssetEditablePreviewDisabled()\n\t{\n\t\tInitializeExternalAnimationPlayer();\n\t}\n\n    void AnimationWindow::InitializeOwnAnimationPlayer()\n\t{\n\t\t// Reset previous player if exists\n        if (mPreviewPlayer)\n\t\t\tmPreviewPlayer->onUpdate -= THIS_FUNC(OnAnimationUpdate);\n\n\t\tmPreviewPlayer = nullptr;\n\n\t\t// Get target actor from editable preview\n        if (auto editablePreview = mEditingAssetEditablePreview.Lock())\n\t\t    mTargetActor = editablePreview->GetPreviewActor();\n\n        if (!mTargetActor || !mAnimation)\n            return;\n\n        auto animation = mAnimation.Lock();\n\n\t\t// Create new own animation player\n\t\tmOwnPreviewPlayer = true;\n        mPreviewPlayer = mmake<AnimationPlayer>(mTargetActor.Lock().Get(), Ref(animation));\n        mPreviewPlayer->onUpdate += THIS_FUNC(OnAnimationUpdate);\n\n\t\tmPreviewPlayer->SetTime(0.0f);\n\n\t\tmTimeline->SetAnimation(animation, mPreviewPlayer);\n\t\tmTree->SetAnimation(animation);\n    }\n\n\tvoid AnimationWindow::InitializeExternalAnimationPlayer()\n\t{\n\t\t// Reset previous player if exists\n\t\tif (mPreviewPlayer)\n\t\t\tmPreviewPlayer->onUpdate -= THIS_FUNC(OnAnimationUpdate);\n\n\t\tmPreviewPlayer = nullptr;\n\n\t\t// Get target actor and animation player from editable preview\n        if (auto editablePreview = mEditingAssetEditablePreview.Lock())\n        {\n            mTargetActor = editablePreview->GetPreviewActor();\n\n            if (auto animationPreviewEditable = DynamicCast<AnimationAssetEditablePreview>(editablePreview))\n            {\n                mPreviewPlayer = DynamicCast<AnimationPlayer>(animationPreviewEditable->GetPreviewPlayer());\n\t\t\t\tmOwnPreviewPlayer = false;\n            }\n\t\t}\n\n\t\tif (!mTargetActor || !mAnimation || !mPreviewPlayer)\n\t\t\treturn;\n\n\t\t// Subscribe to animation update\n\t\tmPreviewPlayer->onUpdate += THIS_FUNC(OnAnimationUpdate);\n\n\t\tmPreviewPlayer->SetTime(0.0f);\n\n\t\tmTimeline->SetAnimation(mAnimation.Lock(), mPreviewPlayer);\n\t\tmTree->SetAnimation(mAnimation.Lock());\n    }\n\n    bool AnimationWindow::IsComponentPreviewAvailable() const\n    {\n        return true;\n    }\n\n    void AnimationWindow::OnAnimationChanged()\n    {\n        mTree->OnAnimationChanged();\n        mCurves->OnAnimationChanged();\n\n        if (mPreviewPlayer)\n            mPreviewPlayer->SetTime(mPreviewPlayer->GetTime());\n    }\n\n    void AnimationWindow::OnAnimationUpdate(float time)\n    {\n        if (!mDisableTimeTracking)\n            mTimeline->mTimeCursor = mPreviewPlayer->GetLoopTime();\n    }\n\n    void AnimationWindow::OnPlayPauseToggled(bool play)\n    {\n        if (mPreviewPlayer)\n        {\n            if (mPreviewPlayer->GetLoop() != Loop::Repeat && Math::Equals(mPreviewPlayer->GetTime(), mPreviewPlayer->GetDuration()))\n                mPreviewPlayer->SetTime(0.0f);\n\n            mPreviewPlayer->SetPlaying(play);\n        }\n    }\n\n    void AnimationWindow::OnLoopToggled(bool loop)\n    {\n        if (auto animation = mAnimation.Lock())\n            animation->SetLoop(loop ? Loop::Repeat : Loop::None);\n\n        if (mPreviewPlayer)\n            mPreviewPlayer->SetLoop(loop ? Loop::Repeat : Loop::None);\n\n        if (auto targetActor = mTargetActor.Lock())\n            o2Scene.OnObjectChanged(targetActor);\n    }\n\n    void AnimationWindow::OnSearchEdited(const WString& search)\n    {\n\n    }\n\n    void AnimationWindow::OnMenuFilterPressed()\n    {\n\n    }\n\n    void AnimationWindow::OnMenuRecordToggle(bool value)\n    {\n\t\tmRecording = value;\n\n\t\tif (mRecording)\n        {\n\t\t\to2EditorPropertiesWindow.onPropertyChangeCompleted += THIS_FUNC(OnPropertyChangeCompleted);\n\n            for (auto& tool : o2EditorSceneScreen.GetTools())\n            {\n                if (auto transformTool = DynamicCast<ITransformTool>(tool))\n                {\n                    transformTool->onTransformBegin += THIS_FUNC(OnToolTransformBegin);\n                    transformTool->onTransformEnd += THIS_FUNC(OnToolTransformEnd);\n                }\n            }\n        }\n\t\telse\n        {\n\t\t\to2EditorPropertiesWindow.onPropertyChangeCompleted -= THIS_FUNC(OnPropertyChangeCompleted);\n\n            for (auto& tool : o2EditorSceneScreen.GetTools())\n            {\n                if (auto transformTool = DynamicCast<ITransformTool>(tool))\n                {\n                    transformTool->onTransformBegin -= THIS_FUNC(OnToolTransformBegin);\n                    transformTool->onTransformEnd -= THIS_FUNC(OnToolTransformEnd);\n                }\n            }\n        }\n    }\n\n    bool AnimationWindow::CheckObjectIsUnderHierachy(const Ref<SceneEditableObject>& object, String& hierarchyPath)\n    {\n        auto targetActorEditable = dynamic_cast<SceneEditableObject*>(mTargetActor.Lock().Get());\n        if (!targetActorEditable)\n            return false;\n\n        bool isUnderHierarchy = false;\n        auto objectIt = object;\n        while (objectIt)\n        {\n            if (objectIt == targetActorEditable)\n            {\n                isUnderHierarchy = true;\n                break;\n            }\n\n            hierarchyPath = \"child/\" + objectIt->GetName() + \"/\" + hierarchyPath;\n            objectIt = objectIt->GetEditableParent();\n        }\n\n        return isUnderHierarchy;\n    }\n\n\tvoid AnimationWindow::OnPropertyChangeCompleted(const Vector<IObject*>& targets, const String& path,\n                                                    const Vector<DataDocument>& before, const Vector<DataDocument>& after)\n\t{\n        if (!mRecording)\n            return;\n\n\t\tauto targetActorEditable = dynamic_cast<SceneEditableObject*>(mTargetActor.Lock().Get());\n        if (!targetActorEditable)\n\t\t\treturn;\n\n        for (auto target : targets)\n        {\n\t\t\tauto targetEditable = dynamic_cast<SceneEditableObject*>(target);\n            if (!targetEditable)\n\t\t\t\tcontinue;\n\n            String targetHierarchyPath;\n\t\t\tbool isTargetUnderHierarchy = CheckObjectIsUnderHierachy(Ref(targetEditable), targetHierarchyPath);\n\n\t\t\tif (!isTargetUnderHierarchy)\n\t\t\t\tcontinue;\n\n\t\t\tString trackPath = targetHierarchyPath + path;\n\t\t\to2Debug.Log(\"Recording property change on track: \" + trackPath);\n\n\t\t\tAddTrackKey(trackPath, mTimeline->mTimeCursor, {});\n\n            break;\n\t\t}\n\t}\n\n    Vector<AnimationWindow::TransformState> AnimationWindow::StoreObjectsTransforms()\n    {\n        Vector<TransformState> transforms;\n\n        for (auto& object : o2EditorSceneScreen.GetSelectedObjects())\n        {\n            TransformState transform;\n            transform.object = object;\n\n            if (auto actor = DynamicCast<Actor>(object))\n            {\n                transform.position = actor->transform->GetPosition();\n                transform.size = actor->transform->GetSize();\n                transform.scale = actor->transform->GetScale();\n                transform.pivot = actor->transform->GetPivot();\n                transform.angle = actor->transform->GetAngleDegrees();\n                transform.shear = actor->transform->GetShear();\n            }\n\n            if (auto widget = DynamicCast<Widget>(object))\n            {\n                transform.anchorMin = widget->layout->GetAnchorMin();\n                transform.anchorMax = widget->layout->GetAnchorMax();\n                transform.offsetMin = widget->layout->GetOffsetMin();\n                transform.offsetMax = widget->layout->GetOffsetMax();\n            }\n\n            transforms.Add(transform);\n        }\n\n        return transforms;\n    }\n\n    void AnimationWindow::OnToolTransformBegin()\n    {\n        mBeforeTransforms = StoreObjectsTransforms();\n    }\n\n    void AnimationWindow::OnToolTransformEnd()\n    {\n        auto afterTransforms = StoreObjectsTransforms();\n        \n        const float time = mTimeline->mTimeCursor;\n\n        mDisableTimeTracking = true;\n\n        for (auto& beforeTransform : mBeforeTransforms)\n        {\n            String hierarchyPath;\n            bool isUnderHierarchy = CheckObjectIsUnderHierachy(beforeTransform.object.Lock(), hierarchyPath);\n            if (!isUnderHierarchy)\n                continue;\n\n            auto afterTransform = afterTransforms.Find([&](const TransformState& transform) {\n                return transform.object == beforeTransform.object;\n            });\n\n            if (!afterTransform)\n                continue;\n\n            if (beforeTransform == *afterTransform)\n                continue;\n\n            const float epsilon = 0.01f;\n\n            if (auto widget = DynamicCast<Widget>(beforeTransform.object.Lock()))\n            {\n                if (!Math::Equals(beforeTransform.anchorMax.x, afterTransform->anchorMax.x, epsilon))\n                    AddTrackKey(hierarchyPath + \"layout/anchorRight\", time, afterTransform->anchorMax.x);\n\n                if (!Math::Equals(beforeTransform.anchorMax.y, afterTransform->anchorMax.y, epsilon))\n                    AddTrackKey(hierarchyPath + \"layout/anchorTop\", time, afterTransform->anchorMax.y);\n\n                if (!Math::Equals(beforeTransform.anchorMin.x, afterTransform->anchorMin.x, epsilon))\n                    AddTrackKey(hierarchyPath + \"layout/anchorLeft\", time, afterTransform->anchorMin.x);\n\n                if (!Math::Equals(beforeTransform.anchorMin.y, afterTransform->anchorMin.y, epsilon))\n                    AddTrackKey(hierarchyPath + \"layout/anchorBottom\", time, afterTransform->anchorMin.y);\n\n                if (!Math::Equals(beforeTransform.offsetMax.x, afterTransform->offsetMax.x, epsilon))\n                    AddTrackKey(hierarchyPath + \"layout/offsetRight\", time, afterTransform->offsetMax.x);\n\n                if (!Math::Equals(beforeTransform.offsetMax.y, afterTransform->offsetMax.y, epsilon))\n                    AddTrackKey(hierarchyPath + \"layout/offsetTop\", time, afterTransform->offsetMax.y);\n\n                if (!Math::Equals(beforeTransform.offsetMin.x, afterTransform->offsetMin.x, epsilon))\n                    AddTrackKey(hierarchyPath + \"layout/offsetLeft\", time, afterTransform->offsetMin.x);\n\n                if (!Math::Equals(beforeTransform.offsetMin.y, afterTransform->offsetMin.y, epsilon))\n                    AddTrackKey(hierarchyPath + \"layout/offsetBottom\", time, afterTransform->offsetMin.y);\n            }\n            else if (auto actor = DynamicCast<Actor>(beforeTransform.object.Lock()))\n            {\n                if (!Math::Equals(beforeTransform.position.x, afterTransform->position.x, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/positionX\", time, afterTransform->position.x);\n\n                if (!Math::Equals(beforeTransform.position.y, afterTransform->position.y, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/positionY\", time, afterTransform->position.y);\n\n                if (!Math::Equals(beforeTransform.size.x, afterTransform->size.x, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/width\", time, afterTransform->size.x);\n\n                if (!Math::Equals(beforeTransform.size.y, afterTransform->size.y, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/height\", time, afterTransform->size.y);\n\n                if (!Math::Equals(beforeTransform.scale.x, afterTransform->scale.x, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/scaleX\", time, afterTransform->scale.x);\n\n                if (!Math::Equals(beforeTransform.scale.y, afterTransform->scale.y, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/scaleY\", time, afterTransform->scale.y);\n\n                if (!Math::Equals(beforeTransform.pivot.x, afterTransform->pivot.x, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/pivotX\", time, afterTransform->pivot.x);\n\n                if (!Math::Equals(beforeTransform.pivot.y, afterTransform->pivot.y, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/pivotY\", time, afterTransform->pivot.y);\n\n                if (!Math::Equals(beforeTransform.angle, afterTransform->angle, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/angleDegrees\", time, afterTransform->angle);\n\n                if (!Math::Equals(beforeTransform.shear, afterTransform->shear, epsilon))\n                    AddTrackKey(hierarchyPath + \"transform/shear\", time, afterTransform->shear);\n            }\n        }\n\n        mDisableTimeTracking = false;\n\n        mTimeline->SetTimeCursor(time);\n    }\n\n    Ref<IAnimationTrack> AnimationWindow::FindOrCreateTrack(const String& path, const Type& type)\n    {\n        auto animation = mAnimation.Lock();\n        if (!animation)\n            return nullptr;\n\n        auto existingTrack = animation->GetTrack(path);\n        if (existingTrack)\n            return existingTrack;\n\n        return animation->AddTrack(path, type);\n    }\n\n\tvoid AnimationWindow::AddTrackKey(const String& path, float time, const Variant<float, int, Vec2F, Color4>& value)\n\t{\n\t\tauto animation = mAnimation.Lock();\n        if (!animation)\n\t\t\treturn;\n\n\t\tauto targetEditable = DynamicCast<SceneEditableObject>(mTargetActor.Lock());\n        if (!targetEditable)\n\t\t\treturn;\n\n\t\tconst FieldInfo* fieldInfo = nullptr;\n\t\tvoid* fieldPtr = nullptr;\n\n\t\tif (auto objectType = dynamic_cast<const ObjectType*>(&targetEditable->GetType()))\n\t\t{\n\t\t\tvoid* realTypeObject = objectType->DynamicCastFromIObject(dynamic_cast<IObject*>(targetEditable.Get()));\n            fieldPtr = objectType->GetFieldPtr(realTypeObject, path, fieldInfo);\n\t\t}\n\n        if (!fieldInfo || !fieldPtr)\n        {\n            o2Debug.LogError(\"Failed to add key: field '\" + path + \"' not found\");\n            return;\n\t\t}\n\n\t\tconst Type* fieldType = fieldInfo->GetType();\n        if (fieldType->GetUsage() == Type::Usage::Property)\n        {\n            if (auto propertyType = dynamic_cast<const PropertyType*>(fieldType))\n\t\t\t\tfieldType = propertyType->GetValueType();\n        }\n\n        if (!fieldType)\n            return;\n\n\t\tauto fieldValueProxy = fieldInfo->GetType()->GetValueProxy(fieldPtr);\n\n        if (fieldType == &TypeOf(float))\n        {\n            if (auto floatProxy = DynamicCast<IValueProxy<float>>(fieldValueProxy))\n            {\n                float keyValue = value.Holds<float>() ? value.Get<float>() : floatProxy->GetValue();\n                if (auto floatTrack = DynamicCast<AnimationTrack<float>>(FindOrCreateTrack(path, *fieldType)))\n                {\n                    floatTrack->RemoveKey(time);\n                    floatTrack->AddKey(time, keyValue);\n                }\n\t\t\t}\n        }\n        else if (fieldType == &TypeOf(int))\n        {   \n            if (auto intProxy = DynamicCast<IValueProxy<int>>(fieldValueProxy))\n            {\n                int keyValue = value.Holds<int>() ? value.Get<int>() : intProxy->GetValue();\n                if (auto intTrack = DynamicCast<AnimationTrack<int>>(FindOrCreateTrack(path, *fieldType)))\n                {\n                    intTrack->RemoveKey(time);\n                    intTrack->AddKey(time, keyValue);\n                }\n\t\t\t}\n        }\n        else if (fieldType == &TypeOf(Vec2F))\n\t\t{\n            if (auto vec2Proxy = DynamicCast<IValueProxy<Vec2F>>(fieldValueProxy))\n            {\n                Vec2F keyValue = value.Holds<Vec2F>() ? value.Get<Vec2F>() : vec2Proxy->GetValue();\n                if (auto vec2Track = DynamicCast<AnimationTrack<Vec2F>>(FindOrCreateTrack(path, *fieldType)))\n                {\n                    vec2Track->spline->InsertKey(vec2Track->spline->GetNextKey(time), keyValue);\n\n                    if (vec2Track->timeCurve->GetKeys().IsEmpty())\n                        vec2Track->timeCurve->InsertKey(time, 0.0f);\n                    else if (vec2Track->timeCurve->GetKeys().Count() == 1)\n                        vec2Track->timeCurve->InsertKey(time, 1.0f);\n                }\n\t\t\t}\n        }\n\t\telse if (fieldType == &TypeOf(Color4)) \n        {\n            if (auto colorProxy = DynamicCast<IValueProxy<Color4>>(fieldValueProxy))\n            {\n                Color4 keyValue = value.Holds<Color4>() ? value.Get<Color4>() : colorProxy->GetValue();\n                if (auto colorTrack = DynamicCast<AnimationTrack<Color4>>(FindOrCreateTrack(path, *fieldType)))\n                {\n                    colorTrack->RemoveKey(time);\n                    colorTrack->AddKey(time, keyValue);\n                }\n\t\t\t}\n        }\n\n\t\tmTree->OnAnimationChanged();\n\t}\n\n    bool AnimationWindow::TransformState::operator==(const TransformState& other) const\n    {\n        return object == other.object &&\n               position == other.position &&\n               size == other.size &&\n               scale == other.scale &&\n               pivot == other.pivot &&\n               Math::Equals(angle, other.angle) &&\n               Math::Equals(shear, other.shear) &&\n               anchorMin == other.anchorMin &&\n               anchorMax == other.anchorMax &&\n               offsetMin == other.offsetMin &&\n               offsetMax == other.offsetMax;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::AnimationWindow, Editor__AnimationWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/AnimationWindow.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2Editor/Actions/ActionsList.h\"\n#include \"o2Editor/Windows/IAssetEditorWindow.h\"\nusing namespace o2;\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(AnimationClip);\n    FORWARD_CLASS_REF(Button);\n    FORWARD_CLASS_REF(EditBox);\n    FORWARD_CLASS_REF(HorizontalLayout);\n    FORWARD_CLASS_REF(HorizontalScrollBar);\n    FORWARD_CLASS_REF(Toggle);\n    FORWARD_CLASS_REF(WidgetDragHandle);\n}\n\n// Editor animation window accessor macros\n#define o2EditorAnimationWindow AnimationWindow::Instance()\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AnimationTimeline);\n    FORWARD_CLASS_REF(AnimationTree);\n    FORWARD_CLASS_REF(CurvesSheet);\n    FORWARD_CLASS_REF(KeyHandlesSheet);\n\n    class AnimationWindow : public Singleton<AnimationWindow>, public IAssetEditorWindow\n    {\n    public:\n        // Default constructor\n        explicit AnimationWindow(RefCounter* refCounter);\n\n        // Destructor\n        ~AnimationWindow();\n\n        // Updates window logic\n        void Update(float dt) override;\n\n        // Sets curves or handles mode\n        void SetCurvesMode(bool enabled);\n\n        // Returns is curves mode enabled\n        bool IsCurvesMode() const;\n\n\t\t// Returns asset type that this editor window can edit\n        const Type& GetAssetType() const override;\n\n        // Dynamic cast to RefCounterable via Singleton<AnimationWindow>\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<AnimationWindow>& ref);\n\n        IOBJECT(AnimationWindow);\n        REF_COUNTERABLE_IMPL(IEditorWindow, Singleton<AnimationWindow>);\n\n    protected:\n        // Object transform state, used to store transform before changing for recording keys\n        struct TransformState\n        {\n            WeakRef<SceneEditableObject> object;\n\n            Vec2F position;\n            Vec2F size;\n            Vec2F scale;\n            Vec2F pivot;\n            float angle;\n            float shear;\n\n            Vec2F anchorMin;\n            Vec2F anchorMax;\n            Vec2F offsetMin;\n            Vec2F offsetMax;\n\n            bool operator==(const TransformState& other) const;\n        };\n\n    protected:\n        float mTreeViewWidth = 325.0f;    // Width of tree area. Changed by draggable separator\n        float mMinTreeViewWidth = 325.0f; // Minimal tree width\n\n\t\tWeakRef<Actor>       mTargetActor;              // Target actor on animation\n\t\tRef<AnimationPlayer> mPreviewPlayer;            // Animation player\n\t\tbool                 mOwnPreviewPlayer = false; // True if this window owns preview player, otherwise it is from target actor\n\n        WeakRef<AnimationAsset> mAnimationAsset; // Editing animation asset\n        WeakRef<AnimationClip>  mAnimation;      // Editing animation\n\n        bool mDisableTimeTracking = false; // When true animation time changes has no effect\n\n\t\tbool mRecording = false; // True when recording is enabled\n\n        Ref<Widget> mWorkArea; // Working area with tree and time line\n\n        Ref<Toggle> mRecordToggle;     // Record toggle\n        Ref<Button> mRewindLeft;       // Rewind animation to start button\n        Ref<Button> mMoveLeft;         // Move time one frame left\n        Ref<Toggle> mPlayPauseToggle;  // Play - pause toggle\n        Ref<Button> mMoveRight;        // Move time one frame right\n        Ref<Button> mRewindRight;      // Rewind animation to end\n        Ref<Toggle> mLoopToggle;       // Animation loop toggle\n        Ref<Toggle> mCurvesToggle;     // Toggle curves view\n        Ref<Button> mAddKeyButton;     // Add key on current time button\n        Ref<Button> mPropertiesButton; // Open properties window\n\n        Ref<AnimationTimeline>   mTimeline;     // Animation time line\n        Ref<HorizontalScrollBar> mTimeScroll;   // Time line horizontal scrollbar\n        Ref<AnimationTree>       mTree;         // animation tracks tree\n        Ref<KeyHandlesSheet>     mHandlesSheet; // Animation keys handles sheet\n        Ref<CurvesSheet>         mCurves;       // Animation curves sheet\n\n        Ref<WidgetDragHandle> mTreeSeparatorHandle; // Tree separator handle. When it moves, it changes size of all dependent widgets\n\n        Vector<TransformState> mBeforeTransforms; // Transforms before changing for recording keys\n\n    protected:\n        // Called when editor window has closed\n        void OnClosed() override;\n\n        // Initializes window\n        void InitializeWindow() override;\n\n\t\t// Called when window has focused, calls focus events in child widgets\n\t\tvoid OnFocused() override;\n\n\t\t// Called when window has unfocused, calls unfocus events in child widgets\n\t\tvoid OnUnfocused() override;\n\n        // Returns window title\n        String GetWindowTitle() const override;\n\n        // Initializes handles sheet\n        void InitializeHandlesSheet();\n\n        // Initializes nodes tree\n        void InitializeTree();\n\n        // Initializes timeline and scrollbar\n        void InitializeTimeline();\n\n        // Initializes curves sheet widget\n        void InitializeCurvesSheet();\n\n        // Initializes up control panel\n        void InitializeUpPanel();\n\n        // Initializes separator handle view and events\n        void InitializeSeparatorHandle();\n\n        // Initializes animation player with current target actor and animation\n        void InitializeOwnAnimationPlayer();\n\n\t\t// Initializes external animation player from asset preview interface\n\t\tvoid InitializeExternalAnimationPlayer();\n\n        // Called when asset editing starts\n        void OnStartEditingAsset() override;\n\n        // Called when asset editing ends\n        void OnCompletedEditingAsset() override;\n\n\t\t// Called when asset editable preview is enabled\n\t\tvoid OnAssetEditablePreviewEnabled() override;\n\n\t\t// Called when asset editable preview is disabled\n\t\tvoid OnAssetEditablePreviewDisabled() override;\n\n\t\t// Returns true if component preview is available for this asset type\n        bool IsComponentPreviewAvailable() const override;\n\n        // Called when editing animation changed. Invokes change methods in tree, curves etc\n        void OnAnimationChanged();\n\n        // Called when animation has updated\n        void OnAnimationUpdate(float time);\n\n        // Called when play/pause button was pressed\n        void OnPlayPauseToggled(bool play);\n\n        // Called when loop button was pressed\n        void OnLoopToggled(bool loop);\n\n        // Called when search edit box text was changed\n        void OnSearchEdited(const WString& search);\n\n        // Called when menu filter button was pressed\n        void OnMenuFilterPressed();\n\n        // Called when menu record button was pressed\n        void OnMenuRecordToggle(bool value);\n\n\t\t// Called when some property was changed in properties window, subscribes to properties window events\n\t\tvoid OnPropertyChangeCompleted(const Vector<IObject*>& targets, const String& path, const Vector<DataDocument>& before,\n\t\t\t\t\t\t\t\t\t   const Vector<DataDocument>& after);\n\n        // Checks if object is under hierarchy of target actor\n        bool CheckObjectIsUnderHierachy(const Ref<SceneEditableObject>& object, String& hierarchyPath);\n\n        // Stores transforms of selected objects\n        Vector<TransformState> StoreObjectsTransforms();\n\n        // Called when transform tool begins, stores transforms before changing for recording keys\n        void OnToolTransformBegin();\n\n        // Called when transform tool ends, checks transforms and records keys if needed\n        void OnToolTransformEnd();\n\n        // Adds track for specified property path\n        Ref<IAnimationTrack> FindOrCreateTrack(const String& path, const Type& type);\n\n\t\t// Creates new animation track for specified property path\n\t\tvoid AddTrackKey(const String& path, float time, const Variant<float, int, Vec2F, Color4>& value);\n\n        friend class AnimationTimeline;\n        friend class AnimationTree;\n        friend class CurvesSheet;\n        friend class KeyHandlesSheet;\n\n        template<typename AnimationTrackType>\n        friend class KeyFramesTrackControl;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AnimationWindow)\n{\n    BASE_CLASS(o2::Singleton<AnimationWindow>);\n    BASE_CLASS(Editor::IAssetEditorWindow);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationWindow)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(325.0f).NAME(mTreeViewWidth);\n    FIELD().PROTECTED().DEFAULT_VALUE(325.0f).NAME(mMinTreeViewWidth);\n    FIELD().PROTECTED().NAME(mTargetActor);\n    FIELD().PROTECTED().NAME(mPreviewPlayer);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mOwnPreviewPlayer);\n    FIELD().PROTECTED().NAME(mAnimationAsset);\n    FIELD().PROTECTED().NAME(mAnimation);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mDisableTimeTracking);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mRecording);\n    FIELD().PROTECTED().NAME(mWorkArea);\n    FIELD().PROTECTED().NAME(mRecordToggle);\n    FIELD().PROTECTED().NAME(mRewindLeft);\n    FIELD().PROTECTED().NAME(mMoveLeft);\n    FIELD().PROTECTED().NAME(mPlayPauseToggle);\n    FIELD().PROTECTED().NAME(mMoveRight);\n    FIELD().PROTECTED().NAME(mRewindRight);\n    FIELD().PROTECTED().NAME(mLoopToggle);\n    FIELD().PROTECTED().NAME(mCurvesToggle);\n    FIELD().PROTECTED().NAME(mAddKeyButton);\n    FIELD().PROTECTED().NAME(mPropertiesButton);\n    FIELD().PROTECTED().NAME(mTimeline);\n    FIELD().PROTECTED().NAME(mTimeScroll);\n    FIELD().PROTECTED().NAME(mTree);\n    FIELD().PROTECTED().NAME(mHandlesSheet);\n    FIELD().PROTECTED().NAME(mCurves);\n    FIELD().PROTECTED().NAME(mTreeSeparatorHandle);\n    FIELD().PROTECTED().NAME(mBeforeTransforms);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationWindow)\n{\n\n    typedef const Variant<float, int, Vec2F, Color4>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCurvesMode, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsCurvesMode);\n    FUNCTION().PUBLIC().SIGNATURE(const Type&, GetAssetType);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<AnimationWindow>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClosed);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUnfocused);\n    FUNCTION().PROTECTED().SIGNATURE(String, GetWindowTitle);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeHandlesSheet);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeTree);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeTimeline);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeCurvesSheet);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeUpPanel);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeSeparatorHandle);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeOwnAnimationPlayer);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeExternalAnimationPlayer);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStartEditingAsset);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCompletedEditingAsset);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetEditablePreviewEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetEditablePreviewDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsComponentPreviewAvailable);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAnimationChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAnimationUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPlayPauseToggled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLoopToggled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSearchEdited, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMenuFilterPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMenuRecordToggle, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const Vector<IObject*>&, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, CheckObjectIsUnderHierachy, const Ref<SceneEditableObject>&, String&);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<TransformState>, StoreObjectsTransforms);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnToolTransformBegin);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnToolTransformEnd);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<IAnimationTrack>, FindOrCreateTrack, const String&, const Type&);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddTrackKey, const String&, float, _tmp1);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/CurvesSheet.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Animation/Tracks/AnimationVec2FTrack.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Windows/AnimationWindow/CurvesSheet.h\"\n#include \"o2Editor/Windows/AnimationWindow/Timeline.h\"\n#include \"o2Editor/Windows/AnimationWindow/Tree.h\"\n\nnamespace Editor\n{\n\n    CurvesSheet::CurvesSheet(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        InitializeControls();\n    }\n\n    CurvesSheet::CurvesSheet(RefCounter* refCounter, const CurvesSheet& other):\n        Widget(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    CurvesSheet::~CurvesSheet()\n    {}\n\n    CurvesSheet& CurvesSheet::operator=(const CurvesSheet& other)\n    {\n        Widget::operator=(other);\n        InitializeControls();\n\n        return *this;\n    }\n\n    void CurvesSheet::SetAnimation(const Ref<AnimationClip>& animation)\n    {\n        mCurvesEditor->RemoveAllCurves();\n\n        for (auto& track : animation->GetTracks())\n        {\n            if (auto floatTrack = DynamicCast<AnimationTrack<float>>(track))\n                mCurvesEditor->AddCurve(track->path, floatTrack->curve);\n            else if (auto vec2Track = DynamicCast<AnimationTrack<Vec2F>>(track))\n                mCurvesEditor->AddCurve(track->path, vec2Track->timeCurve);\n        }\n\n        UpdateCurvesColors();\n\n        mCurvesEditor->actionsListDelegate = mAnimationWindow.Lock();\n    }\n\n    void CurvesSheet::UpdateCurvesColors()\n    {\n        auto animationWindow = mAnimationWindow.Lock();\n        if (!animationWindow)\n            return;\n\n        auto animation = animationWindow->mAnimation.Lock();\n        if (!animation)\n            return;\n\n        Color4 curveColor(44, 62, 80);\n        int colorIdx = 0;\n        for (auto& track : animation->GetTracks())\n        {\n            if (auto floatTrack = DynamicCast<AnimationTrack<float>>(track))\n            {\n                animationWindow->mTree->SetAnimationValueColor(track->path, curveColor);\n                mCurvesEditor->SetCurveColor(floatTrack->curve, curveColor);\n                curveColor = Color4::SomeColor(colorIdx++);\n            }\n            else if (auto vec2Track = DynamicCast<AnimationTrack<Vec2F>>(track))\n            {\n                animationWindow->mTree->SetAnimationValueColor(track->path, curveColor);\n                mCurvesEditor->SetCurveColor(vec2Track->timeCurve, curveColor);\n                curveColor = Color4::SomeColor(colorIdx++);\n            }\n        }\n    }\n\n    void CurvesSheet::OnAnimationChanged()\n    {\n        auto animationWindow = mAnimationWindow.Lock();\n        if (!animationWindow)\n            return;\n\n        auto animation = animationWindow->mAnimation.Lock();\n        if (!animation)\n            return;\n\n        bool changed = false;\n\n        // Check new curves\n        auto currentCurves = mCurvesEditor->GetCurves();\n        Vector<Ref<Curve>> animCurves;\n        for (auto& track : animation->GetTracks())\n        {\n            Ref<Curve> curve;\n            if (auto floatTrack = DynamicCast<AnimationTrack<float>>(track))\n                curve = floatTrack->curve;\n            else if (auto vec2Track = DynamicCast<AnimationTrack<Vec2F>>(track))\n                curve = vec2Track->timeCurve;\n\n            if (curve)\n            {\n                animCurves.Add(curve);\n\n                if (!currentCurves.ContainsValue(curve))\n                {\n                    mCurvesEditor->AddCurve(track->path, curve);\n                    changed = true;\n                }\n            }\n        }\n\n        // Check removed curves\n        for (auto& curve : mCurvesEditor->GetCurves())\n        {\n            if (!animCurves.Contains(curve.second))\n            {\n                mCurvesEditor->RemoveCurve(curve.second);\n                changed = true;\n            }\n        }\n\n        if (changed)\n            UpdateCurvesColors();\n    }\n\n\tvoid CurvesSheet::OnAnimationWindowFocused()\n\t{\n        mCurvesEditor->OnFocusedByRoot();\n\t}\n\n\tvoid CurvesSheet::OnAnimationWindowUnfocused()\n\t{\n\t\tmCurvesEditor->OnUnfocusedByRoot();\n\t}\n\n\tString CurvesSheet::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void CurvesSheet::InitializeControls()\n    {\n        mCurvesEditor = mmake<CurvesEditor>();\n        *mCurvesEditor->layout = WidgetLayout::BothStretch();\n\n        auto horScroll = o2UI.CreateHorScrollBar();\n        *horScroll->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 10, 10, 10, 0);\n        mCurvesEditor->SetHorScrollbar(horScroll);\n\n        auto verScroll = o2UI.CreateVerScrollBar();\n        *verScroll->layout = WidgetLayout::VerStretch(HorAlign::Right, 10, 10, 10, 0);\n        mCurvesEditor->SetVerScrollbar(verScroll);\n\n        mCurvesEditor->SetTextBorder(BorderF(0, 10, 10, 0));\n\n        mCurvesEditor->SetMainHandleImages(AssetRef<ImageAsset>(\"ui/CurveHandle.png\"),\n                                           AssetRef<ImageAsset>(\"ui/CurveHandleHover.png\"),\n                                           AssetRef<ImageAsset>(\"ui/CurveHandlePressed.png\"),\n                                           AssetRef<ImageAsset>(\"ui/CurveHandleSelected.png\"));\n\n        mCurvesEditor->SetSupportHandleImages(AssetRef<ImageAsset>(\"ui/CurveSupportHandle.png\"),\n                                              AssetRef<ImageAsset>(\"ui/CurveSupportHandleHover.png\"),\n                                              AssetRef<ImageAsset>(\"ui/CurveSupportHandlePressed.png\"),\n                                              AssetRef<ImageAsset>(\"ui/CurveSupportHandleSelected.png\"));\n\n        mCurvesEditor->SetSelectionSpriteImage(AssetRef<ImageAsset>(\"ui/UI_Window_place.png\"));\n\n        mCurvesEditor->verGridEnabled = false;\n        mCurvesEditor->onViewChanged += THIS_FUNC(OnEditorViewChanged);\n\n        mCurvesEditor->GetContextMenu()->AddItem(\"---\");\n        mCurvesEditor->GetContextMenu()->AddToggleItem(\"Normalize curves\", true, [&](bool val) { \n            mCurvesEditor->SetAdjustCurvesScale(val);\n        });\n\n        AddChild(mCurvesEditor);\n    }\n\n    void CurvesSheet::SetCameraAsTimelineView()\n    {\n        auto animationWindow = mAnimationWindow.Lock();\n\n        Camera camera = mCurvesEditor->GetCamera();\n        RectF camRect = camera.GetRect();\n        camRect.left = animationWindow->mTimeline->WorldToLocal(animationWindow->mTimeline->layout->worldLeft);\n        camRect.right = animationWindow->mTimeline->WorldToLocal(animationWindow->mTimeline->layout->worldRight);\n\n        camera.SetRect(camRect, false);\n\n        mEditorViewLock = true;\n        mCurvesEditor->SetCamera(camera);\n        mEditorViewLock = false;\n    }\n\n    void CurvesSheet::OnEditorViewChanged()\n    {\n        if (mEditorViewLock || !IsEnabled())\n            return;\n\n        mAnimationWindow.Lock()->mTimeline->SetViewRange(mCurvesEditor->GetCamera().GetRect().left,\n                                                         mCurvesEditor->GetCamera().GetRect().right);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::CurvesSheet, Editor__CurvesSheet);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/CurvesSheet.h",
    "content": "#pragma once\n\n#include \"o2Editor/UI/CurveEditor/CurvesEditor.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AnimationWindow);\n\n    // ---------------------------------\n    // Curves sheet. Shows curves editor\n    // ---------------------------------\n    class CurvesSheet : public Widget\n    {\n    public:\n        // Default constructor\n        CurvesSheet(RefCounter* refCounter);\n\n        // Copy-constructor\n        CurvesSheet(RefCounter* refCounter, const CurvesSheet& other);\n\n        // Destructor\n        ~CurvesSheet();\n\n        // Copy-operator\n        CurvesSheet& operator=(const CurvesSheet& other);\n\n        // Sets animation and updates tree structure\n        void SetAnimation(const Ref<AnimationClip>& animation);\n\n        // Generates new color for curves and transfers to the tree\n        void UpdateCurvesColors();\n\n        // Called when animation changed, checks count of animation tracks, updates curves\n        void OnAnimationChanged();\n\n\t\t// Called when animation window focused, proxying focus to curves editor\n\t\tvoid OnAnimationWindowFocused();\n\n\t\t// Called when animation window unfocused, proxying unfocus to curves editor\n\t\tvoid OnAnimationWindowUnfocused();\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(CurvesSheet);\n        CLONEABLE_REF(CurvesSheet);\n\n    private:\n        Ref<CurvesEditor> mCurvesEditor; // Curves editor\n\n        WeakRef<AnimationWindow> mAnimationWindow; // Animation window\n\n        bool mEditorViewLock = false; // It is used to prevent handling editor's camera, when timeline view changing \n\n    private:\n        // Initializes curves edit widget\n        void InitializeControls();\n\n        // Called when timeline view has changed, updates horizontal view position and scale\n        void SetCameraAsTimelineView();\n\n        // Called when curve editor view has changed, updates timeline scroll position\n        void OnEditorViewChanged();\n\n        friend class AnimationWindow;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::CurvesSheet)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::CurvesSheet)\n{\n    FIELD().PRIVATE().NAME(mCurvesEditor);\n    FIELD().PRIVATE().NAME(mAnimationWindow);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mEditorViewLock);\n}\nEND_META;\nCLASS_METHODS_META(Editor::CurvesSheet)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const CurvesSheet&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnimation, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateCurvesColors);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnAnimationChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnAnimationWindowFocused);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnAnimationWindowUnfocused);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeControls);\n    FUNCTION().PRIVATE().SIGNATURE(void, SetCameraAsTimelineView);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnEditorViewChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/KeyHandlesSheet.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"KeyHandlesSheet.h\"\n\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Utils/System/Clipboard.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationKeysActions.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Windows/AnimationWindow/Timeline.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/ITrackControl.h\"\n#include \"o2Editor/Windows/AnimationWindow/Tree.h\"\n\nnamespace Editor\n{\n\n    KeyHandlesSheet::KeyHandlesSheet(RefCounter* refCounter) :\n        Widget(refCounter), SelectableDragHandlesGroup(refCounter)\n    {\n        mSelectionFrame = mmake<Sprite>(\"ui/UI4_keys_select.png\");\n        mSelectionFrame->enabled = false;\n\n        InitializeHandles();\n        InitializeContextMenu();\n    }\n\n    KeyHandlesSheet::KeyHandlesSheet(RefCounter* refCounter, const KeyHandlesSheet& other) :\n        Widget(refCounter, other), SelectableDragHandlesGroup(refCounter), mSelectionFrame(other.mSelectionFrame->CloneAs<Sprite>())\n    {\n        InitializeHandles();\n        InitializeContextMenu();\n    }\n\n    KeyHandlesSheet::~KeyHandlesSheet()\n    {}\n\n    KeyHandlesSheet& KeyHandlesSheet::operator=(const KeyHandlesSheet& other)\n    {\n        Widget::operator=(other);\n\n        mSelectionFrame = other.mSelectionFrame->CloneAsRef<Sprite>();\n\n        return *this;\n    }\n\n    void KeyHandlesSheet::Update(float dt)\n    {\n        Widget::Update(dt);\n    }\n\n#undef DrawText\n    void KeyHandlesSheet::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        Widget::OnDrawn();\n\t\tCursorAreaEventsListener::OnDrawn();\n\n\t\tDrawDebugFrame();\n    }\n\n\tvoid KeyHandlesSheet::DrawSelectionFrame()\n\t{\n\t\to2Render.EnableScissorTest(layout->GetWorldRect());\n\n\t\tif (mSelectionFrame->enabled)\n\t\t{\n\t\t\tauto offsets = mIsFrameSelecting ? mSelectionFrameCursorOffsets : mSelectionFrameOffsets;\n\t\t\tauto animationWindow = mAnimationWindow.Lock();\n\t\t\tRectF selectionFrameRect = RectF(animationWindow->mTimeline->LocalToWorld(mSelectionRect.left) + offsets.left,\n\t\t\t\tanimationWindow->mTree->GetLineWorldPosition(mSelectionRect.top) + offsets.top,\n\t\t\t\tanimationWindow->mTimeline->LocalToWorld(mSelectionRect.right) + offsets.right,\n\t\t\t\tanimationWindow->mTree->GetLineWorldPosition(mSelectionRect.bottom) + offsets.bottom);\n\n\t\t\tmSelectionFrame->SetRect(selectionFrameRect);\n\t\t\tmSelectionFrame->Draw();\n\n\t\t\tmLeftFrameDragHandle->SetDrawablesSize(Vec2F(10, selectionFrameRect.Height()));\n\t\t\tmRightFrameDragHandle->SetDrawablesSize(Vec2F(10, selectionFrameRect.Height()));\n\n\t\t\tif (!mIsFrameSelecting)\n\t\t\t{\n\t\t\t\tmCenterFrameDragHandle->Draw();\n\t\t\t\tmLeftFrameDragHandle->Draw();\n\t\t\t\tmRightFrameDragHandle->Draw();\n\t\t\t}\n\t\t}\n\n\t\to2Render.DisableScissorTest();\n\n\t\tif (mNeedUpdateSelectionFrame)\n\t\t\tUpdateSelectionFrame();\n\t}\n\n\tvoid KeyHandlesSheet::UpdateInputDrawOrder()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        CursorAreaEventsListener::OnDrawn();\n\n        for (auto& handle : mHandles)\n        {\n            if (handle->IsEnabled())\n                handle->CursorAreaEventsListener::OnDrawn();\n        }\n\n        if (mSelectionFrame->enabled)\n        {\n            mCenterFrameDragHandle->CursorAreaEventsListener::OnDrawn();\n\n            if (!Math::Equals(mSelectionRect.left, mSelectionRect.right))\n            {\n                mLeftFrameDragHandle->CursorAreaEventsListener::OnDrawn();\n                mRightFrameDragHandle->CursorAreaEventsListener::OnDrawn();\n            }\n        }\n    }\n\n    void KeyHandlesSheet::SetAnimation(const Ref<AnimationClip>& animation)\n    {\n        mHandlesGroups.Clear();\n    }\n\n    bool KeyHandlesSheet::IsUnderPoint(const Vec2F& point)\n    {\n        return Widget::IsUnderPoint(point);\n    }\n\n    void KeyHandlesSheet::RegTrackControl(const Ref<ITrackControl>& trackControl, const std::string& path)\n    {\n        mTrackControls.Add(trackControl);\n        mTrackControlsMap.Add({ path, trackControl });\n    }\n\n    void KeyHandlesSheet::UnregTrackControl(const Ref<ITrackControl>& trackControl)\n    {\n        mTrackControls.Remove(trackControl);\n        mTrackControlsMap.RemoveAll([=](auto& p) { return p.second == trackControl; });\n    }\n\n    void KeyHandlesSheet::UnregAllTrackControls()\n    {\n        mTrackControls.Clear();\n        mTrackControlsMap.Clear();\n        mHandles.Clear();\n    }\n\n    void KeyHandlesSheet::AddHandle(const Ref<DragHandle>& handle)\n    {\n        if (auto animHandle = DynamicCast<AnimationKeyDragHandle>(handle))\n        {\n            auto track = animHandle->track.Lock();\n            if (!mHandlesGroups.ContainsKey(track))\n                mHandlesGroups.Add(track, {});\n\n            mHandlesGroups[track].Add(animHandle);\n        }\n\n        SelectableDragHandlesGroup::AddHandle(handle);\n    }\n\n    void KeyHandlesSheet::RemoveHandle(DragHandle* handle)\n    {\n        if (auto animHandle = dynamic_cast<AnimationKeyDragHandle*>(handle))\n            mHandlesGroups[animHandle->track.Lock()].RemoveFirst([&](auto& x) { return x == animHandle; });\n\n        SelectableDragHandlesGroup::RemoveHandle(handle);\n    }\n\n    void KeyHandlesSheet::SetSelectedKeys(const Map<String, Vector<UInt64>>& keys)\n    {\n        DeselectAll();\n\n        for (auto& handlesGroup : mHandlesGroups)\n        {\n            for (auto& handle : handlesGroup.second)\n            {\n                if (keys.ContainsKey(handle->trackPath) && keys.Get(handle->trackPath).Contains(handle->keyUid))\n                    SelectHandle(handle);\n            }\n        }\n    }\n\n    Map<String, Vector<UInt64>> KeyHandlesSheet::GetSelectedKeys() const\n    {\n        Map<String, Vector<UInt64>> res;\n        for (auto& handlesGroup : mHandlesGroups)\n        {\n            for (auto& handle : handlesGroup.second)\n            {\n                if (handle->selected)\n                    res[handle->trackPath].Add(handle->keyUid);\n            }\n        }\n\n        return res;\n    }\n\n    const Ref<ContextMenu>& KeyHandlesSheet::GetContextMenu() const\n    {\n        return mContextMenu;\n    }\n\n    String KeyHandlesSheet::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    Ref<RefCounterable> KeyHandlesSheet::CastToRefCounterable(const Ref<KeyHandlesSheet>& ref)\n    {\n        return DynamicCast<Widget>(ref);\n    }\n\n    void KeyHandlesSheet::OnSelectionChanged()\n    {\n        mNeedUpdateSelectionFrame = true;\n    }\n\n    void KeyHandlesSheet::OnHandleCursorPressed(const Ref<DragHandle>& handle, const Input::Cursor& cursor)\n    {\n        mBeforeChangeKeysData.Clear();\n        SerializeKeys(mBeforeChangeKeysData, GetSelectedKeys(), 0);\n\n        for (auto& trackControl : mTrackControls)\n            trackControl->BeginKeysDrag();\n\n        if (!GetSelectedHandles().Contains(handle) && handle != mCenterFrameDragHandle &&\n            handle != mLeftFrameDragHandle && handle != mRightFrameDragHandle)\n        {\n            if (!o2Input.IsKeyDown(VK_CONTROL))\n                DeselectAll();\n\n            SelectHandle(handle);\n        }\n\n        for (auto& handle : GetSelectedHandles())\n            handle->BeginDrag(cursor.position);\n\n        mHandleHasMoved = false;\n    }\n\n    void KeyHandlesSheet::OnHandleCursorReleased(const Ref<DragHandle>& handle, const Input::Cursor& cursor)\n    {\n        SelectableDragHandlesGroup::OnHandleCursorReleased(handle, cursor);\n\n        for (auto& trackControl : mTrackControls)\n            trackControl->EndKeysDrag();\n\n        if (mSelectedHandles.Count() == 1 && !mHandleHasMoved)\n            mAnimationWindow.Lock()->mTimeline->SetTimeCursor(mSelectedHandles[0]->GetPosition().x);\n\n        DataDocument data;\n        auto selectedKeys = GetSelectedKeys();\n        SerializeKeys(data, selectedKeys, 0);\n        mAnimationWindow.Lock()->DoneAction(mmake<AnimationKeysChangeAction>(selectedKeys, mBeforeChangeKeysData,\n                                                                                           data, Ref(this)));\n    }\n\n    void KeyHandlesSheet::OnHandleMoved(const Ref<DragHandle>& handle, const Vec2F& cursorPos)\n    {\n        auto animationWindow = mAnimationWindow.Lock();\n        if (!animationWindow)\n            return;\n\n        auto animation = animationWindow->mAnimation.Lock();\n        if (!animation)\n            return;\n\n        for (auto& track : animation->GetTracks())\n            track->BeginKeysBatchChange();\n\n        for (auto& kv : mHandlesGroups)\n        {\n            for (auto& handle : kv.second)\n            {\n                if (!mSelectedHandles.Contains(handle))\n                    continue;\n\n                if (handle->isMapping && kv.second.Contains([=](auto x) { return !x->isMapping && x->id == handle->id; }))\n                    continue;\n\n                handle->SetDragPosition(handle->ScreenToLocal(cursorPos) + handle->GetDraggingOffset());\n                handle->onChangedPos(handle->GetPosition());\n            }\n        }\n\n        for (auto& track : animation->GetTracks())\n            track->CompleteKeysBatchingChange();\n\n        mHandleHasMoved = true;\n        mNeedUpdateSelectionFrame = true;\n    }\n\n    void KeyHandlesSheet::InitializeHandles()\n    {\n        InitializeCenterHandle();\n        InitializeLeftHandle();\n        InitializeRightHandle();\n    }\n\n    void KeyHandlesSheet::InitializeCenterHandle()\n    {\n        mCenterFrameDragHandle = mmake<DragHandle>();\n\n        mCenterFrameDragHandle->localToScreenTransformFunc = [=](const Vec2F& point)\n            {\n                auto animationWindow = mAnimationWindow.Lock();\n                return Vec2F(animationWindow->mTimeline->LocalToWorld(point.x), animationWindow->mTree->GetLineWorldPosition(point.y));\n            };\n\n        mCenterFrameDragHandle->screenToLocalTransformFunc = [=](const Vec2F& point)\n            {\n                auto animationWindow = mAnimationWindow.Lock();\n                return Vec2F(animationWindow->mTimeline->WorldToLocal(point.x), animationWindow->mTree->GetLineNumber(point.y));\n            };\n\n        mCenterFrameDragHandle->isPointInside = [=](const Vec2F& point)\n            {\n                auto animationWindow = mAnimationWindow.Lock();\n                auto local = Vec2F(animationWindow->mTimeline->WorldToLocal(point.x), animationWindow->mTree->GetLineNumber(point.y));\n                return local.x > mSelectionRect.left && local.x < mSelectionRect.right && local.y > mSelectionRect.top && local.y < mSelectionRect.bottom;\n            };\n\n        mCenterFrameDragHandle->checkPositionFunc = [&](const Vec2F& point) { return Vec2F(point.x, mSelectionRect.Center().y); };\n        mCenterFrameDragHandle->onPressed = [&]() { OnHandleCursorPressed(mCenterFrameDragHandle, *o2Input.GetCursor());  };\n        mCenterFrameDragHandle->onReleased = [&]() { OnHandleCursorReleased(mCenterFrameDragHandle, *o2Input.GetCursor()); };\n        mCenterFrameDragHandle->onChangedPos = [&](const Vec2F& point) { OnHandleMoved(mCenterFrameDragHandle, o2Input.GetCursorPos()); };\n        mCenterFrameDragHandle->onRightButtonReleased = [&](auto& x) { mContextMenu->Show(); };\n        mCenterFrameDragHandle->cursorType = CursorType::SizeWE;\n    }\n\n    void KeyHandlesSheet::InitializeLeftHandle()\n    {\n        mLeftFrameDragHandle = mmake<DragHandle>();\n\n        mLeftFrameDragHandle->SetDrawablesSizePivot(Vec2F(7, 21));\n\n        mLeftFrameDragHandle->localToScreenTransformFunc = [&](const Vec2F& point)\n            {\n                auto animationWindow = mAnimationWindow.Lock();\n                return Vec2F(animationWindow->mTimeline->LocalToWorld(point.x), animationWindow->mTree->GetLineWorldPosition(point.y));\n            };\n\n        mLeftFrameDragHandle->screenToLocalTransformFunc = [&](const Vec2F& point)\n            {\n                auto animationWindow = mAnimationWindow.Lock();\n                return Vec2F(animationWindow->mTimeline->WorldToLocal(point.x), animationWindow->mTree->GetLineNumber(point.y));\n            };\n\n        mLeftFrameDragHandle->isPointInside = [&](const Vec2F& point)\n            {\n                auto r = mSelectionFrame->GetRect();\n                return RectF(r.left - 5, r.bottom, r.left + 5, r.top).IsInside(point);\n            };\n\n        mLeftFrameDragHandle->checkPositionFunc = [&](const Vec2F& point) { return Vec2F(point.x, mSelectionRect.Center().y); };\n        mLeftFrameDragHandle->onPressed = [&]() { OnHandleCursorPressed(mCenterFrameDragHandle, *o2Input.GetCursor()); };\n        mLeftFrameDragHandle->onReleased = [&]() { OnHandleCursorReleased(mCenterFrameDragHandle, *o2Input.GetCursor()); };\n\n        mLeftFrameDragHandle->onChangedPos = [&](const Vec2F& point)\n            {\n                if (Math::Equals(mSelectionRect.Width(), 0.0f))\n                    return;\n\n                auto animationWindow = mAnimationWindow.Lock();\n                if (!animationWindow)\n                    return;\n                    \n                auto animation = animationWindow->mAnimation.Lock();\n                if (!animation)\n                    return;\n                    \n                float scale = (point.x - mSelectionRect.right) / (mSelectionRect.left - mSelectionRect.right);\n\n                for (auto& track : animation->GetTracks())\n                    track->BeginKeysBatchChange();\n\n                for (auto& handle : GetSelectedHandles())\n                {\n                    handle->SetPosition(Vec2F((handle->GetPosition().x - mSelectionRect.right)*scale + mSelectionRect.right, handle->GetPosition().y));\n                    handle->onChangedPos(handle->GetPosition());\n                }\n\n                for (auto& track : animation->GetTracks())\n                    track->CompleteKeysBatchingChange();\n\n                mNeedUpdateSelectionFrame = true;\n            };\n\n        mLeftFrameDragHandle->onRightButtonReleased = [&](auto& x) { mContextMenu->Show(); };\n        mLeftFrameDragHandle->cursorType = CursorType::SizeWE;\n    }\n\n    void KeyHandlesSheet::InitializeRightHandle()\n    {\n        mRightFrameDragHandle = mmake<DragHandle>();\n\n        mRightFrameDragHandle->SetDrawablesSizePivot(Vec2F(6, 19));\n        mRightFrameDragHandle->angle = Math::Deg2rad(180.0f);\n\n        mRightFrameDragHandle->localToScreenTransformFunc = [&](const Vec2F& point)\n            {\n                auto animationWindow = mAnimationWindow.Lock();\n                return Vec2F(animationWindow->mTimeline->LocalToWorld(point.x), animationWindow->mTree->GetLineWorldPosition(point.y));\n            };\n\n        mRightFrameDragHandle->screenToLocalTransformFunc = [&](const Vec2F& point)\n            {\n                auto animationWindow = mAnimationWindow.Lock();\n                return Vec2F(animationWindow->mTimeline->WorldToLocal(point.x), animationWindow->mTree->GetLineNumber(point.y));\n            };\n\n        mRightFrameDragHandle->isPointInside = [&](const Vec2F& point)\n            {\n                auto r = mSelectionFrame->GetRect();\n                return RectF(r.right - 5, r.bottom, r.right + 5, r.top).IsInside(point);\n            };\n\n        mRightFrameDragHandle->checkPositionFunc = [&](const Vec2F& point) { return Vec2F(point.x, mSelectionRect.Center().y); };\n        mRightFrameDragHandle->onPressed = [&]() { OnHandleCursorPressed(mCenterFrameDragHandle, *o2Input.GetCursor()); };\n        mRightFrameDragHandle->onReleased = [&]() { OnHandleCursorReleased(mCenterFrameDragHandle, *o2Input.GetCursor()); };\n\n        mRightFrameDragHandle->onChangedPos = [&](const Vec2F& point)\n            {\n                if (Math::Equals(mSelectionRect.Width(), 0.0f))\n                    return;\n\n                auto animationWindow = mAnimationWindow.Lock();\n                if (!animationWindow)\n                    return;\n                    \n                auto animation = animationWindow->mAnimation.Lock();\n                if (!animation)\n                    return;\n\n                float scale = (point.x - mSelectionRect.left) / (mSelectionRect.right - mSelectionRect.left);\n\n                for (auto& track : animation->GetTracks())\n                    track->BeginKeysBatchChange();\n\n                for (auto& handle : GetSelectedHandles())\n                {\n                    handle->SetPosition(Vec2F((handle->GetPosition().x - mSelectionRect.left)*scale + mSelectionRect.left, handle->GetPosition().y));\n                    handle->onChangedPos(handle->GetPosition());\n                }\n\n                for (auto& track : animation->GetTracks())\n                    track->CompleteKeysBatchingChange();\n\n                mNeedUpdateSelectionFrame = true;\n            };\n\n        mRightFrameDragHandle->onRightButtonReleased = [&](auto& x) { mContextMenu->Show(); };\n        mRightFrameDragHandle->cursorType = CursorType::SizeWE;\n    }\n\n    void KeyHandlesSheet::InitializeContextMenu()\n    {\n        mContextMenu = o2UI.CreateWidget<ContextMenu>();\n\n        mContextMenu->AddItem(\"Copy\", [&]() { CopyKeys(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_C, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Cut\", [&]() { CopyKeys(); DeleteKeys(GetSelectedKeys()); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_X, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Paste\", [&]() { PasteKeys(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_V, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"---\");\n        mContextMenu->AddItem(\"Delete\", [&]() { DeleteKeys(GetSelectedKeys()); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_DELETE}));\n        mContextMenu->AddItem(\"---\");\n        mContextMenu->AddItem(\"Select all\", [&]() { SelectAll(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_A, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Deselect all\", [&]() { DeselectAll(); });\n        mContextMenu->AddItem(\"---\");\n        mContextMenu->AddItem(\"Undo\", [&]() { mAnimationWindow.Lock()->UndoAction(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_Z, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Redo\", [&]() { mAnimationWindow.Lock()->RedoAction(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_Y, VK_CTRL_CMD}));\n\n        AddChild(mContextMenu);\n\n        mIsFocusable = true;\n    }\n\n    void KeyHandlesSheet::UpdateSelectionFrame()\n    {\n        mNeedUpdateSelectionFrame = false;\n\n        if (!mIsFrameSelecting && mSelectedHandles.Count() > 0)\n        {\n            mSelectionFrame->enabled = true;\n\n            auto animationWindow = mAnimationWindow.Lock();\n\n            mSelectionRect.left = mSelectedHandles.First()->GetPosition().x;\n            mSelectionRect.bottom = animationWindow->mTree->GetLineNumber(mSelectedHandles.First()->GetScreenPosition().y);\n            mSelectionRect.right = mSelectionRect.left;\n            mSelectionRect.top = mSelectionRect.bottom;\n\n            for (auto& handle : mSelectedHandles)\n            {\n                float localPos = handle->GetPosition().x;\n                float lineNumber = animationWindow->mTree->GetLineNumber(handle->GetScreenPosition().y);\n\n                mSelectionRect.left = Math::Min(mSelectionRect.left, localPos);\n                mSelectionRect.right = Math::Max(mSelectionRect.right, localPos);\n\n                mSelectionRect.bottom = Math::Max(mSelectionRect.bottom, Math::Ceil(lineNumber));\n                mSelectionRect.top = Math::Min(mSelectionRect.top, Math::Floor(lineNumber - 0.5f));\n            }\n\n            mCenterFrameDragHandle->position = mSelectionRect.Center();\n            mLeftFrameDragHandle->position = Vec2F(mSelectionRect.left, mSelectionRect.Center().y);\n            mRightFrameDragHandle->position = Vec2F(mSelectionRect.right, mSelectionRect.Center().y);\n        }\n        else \n            mSelectionFrame->enabled = false;\n    }\n\n    void KeyHandlesSheet::SerializeKeys(DataValue& data, const Map<String, Vector<UInt64>>& keys, float relativeTime)\n    {\n        Map<String, Pair<DataValue*, Vector<UInt64>>> serializedKeysUids;\n\n        for (auto& kv : keys)\n        {\n            auto fnd = mTrackControlsMap.FindOrDefault([=](const Pair<String, Ref<ITrackControl>>& p) { return p.first == kv.first; });\n            if (!fnd.second)\n                continue;\n\n            DataValue& trackData = data.AddMember(\"KeysGroup\");\n            trackData.AddMember(\"Path\") = kv.first;\n            DataValue& keysData = trackData.AddMember(\"Keys\");\n\n            for (auto& handle : fnd.second->GetKeyHandles())\n            {\n                if (kv.second.Contains(handle->keyUid))\n                {\n                    auto node = keysData.AddMember(\"key\");\n                    fnd.second->SerializeKey(handle->keyUid, node, relativeTime);\n                }\n            }\n        }\n    }\n\n    void KeyHandlesSheet::DeserializeKeys(const DataValue& data, Map<String, Vector<UInt64>>& keys, float relativeTime,\n                                          bool generateNewUid /*= true*/)\n    {\n        auto animationWindow = mAnimationWindow.Lock();\n        if (!animationWindow)\n            return;\n            \n        auto animation = animationWindow->mAnimation.Lock();\n        if (!animation)\n            return;\n\n        for (auto& track : animation->GetTracks())\n            track->BeginKeysBatchChange();\n\n        if (data.GetMembersCount() == 1 && animationWindow->mTree->GetSelectedObjects().Count() == 1)\n        {\n            auto DataValue = (AnimationTree::TrackNode*)animationWindow->mTree->GetSelectedObjects()[0];\n            for (auto& keyNode : data[0].GetMember(\"Keys\"))\n            {\n                UInt64 uid = DataValue->trackControl->DeserializeKey(keyNode, relativeTime);\n                if (uid != 0)\n                    keys[DataValue->path].Add(uid);\n            }\n        }\n        else\n        {\n            for (auto& pathNode : data)\n            {\n                String path = pathNode.GetMember(\"Path\");\n                for (auto& kv : mTrackControlsMap)\n                {\n                    if (kv.first != path)\n                        continue;\n\n                    for (auto& keyNode : pathNode.GetMember(\"Keys\"))\n                    {\n                        UInt64 uid = kv.second->DeserializeKey(keyNode, relativeTime, generateNewUid);\n                        if (uid != 0)\n                            keys[path].Add(uid);\n                    }\n                }\n            }\n        }\n\n        for (auto& track : animation->GetTracks())\n            track->CompleteKeysBatchingChange();\n    }\n\n    void KeyHandlesSheet::CopyKeys()\n    {\n        float relativeTime = mAnimationWindow.Lock()->mTimeline->WorldToLocal(o2Input.GetCursorPos().x);\n        Map<String, Vector<UInt64>> keys = GetSelectedKeys();\n\n        DataDocument data;\n        SerializeKeys(data, keys, relativeTime);\n\n        Clipboard::SetText(data.SaveAsString());\n    }\n\n    void KeyHandlesSheet::PasteKeys()\n    {\n        auto animationWindow = mAnimationWindow.Lock();\n\n        DeselectAll();\n        Map<String, Vector<UInt64>> keys;\n\n        DataDocument data;\n        data.LoadFromData(Clipboard::GetText());\n\n        DeserializeKeys(data, keys, animationWindow->mTimeline->WorldToLocal(o2Input.GetCursorPos().x));\n        SetSelectedKeys(keys);\n\n        data.Clear();\n        SerializeKeys(data, keys, 0);\n        animationWindow->DoneAction(mmake<AnimationAddKeysAction>(keys, data, Ref(this)));\n    }\n\n    void KeyHandlesSheet::DeleteKeys(const Map<String, Vector<UInt64>>& keys, bool createAction /*= true*/)\n    {\n        auto animationWindow = mAnimationWindow.Lock();\n\n        if (createAction)\n        {\n            DataDocument data;\n            SerializeKeys(data, keys, 0);\n            animationWindow->DoneAction(mmake<AnimationDeleteKeysAction>(keys, data, Ref(this)));\n        }\n\n        auto animation = animationWindow->mAnimation.Lock();\n        if (!animation)\n            return;\n            \n        for (auto& track : animation->GetTracks())\n            track->BeginKeysBatchChange();\n\n        for (auto& handlesGroup : mHandlesGroups)\n        {\n            for (auto& handle : handlesGroup.second)\n            {\n                if (keys.ContainsKey(handle->trackPath) && keys.Get(handle->trackPath).Contains(handle->keyUid))\n                {\n                    handle->Deselect();\n                    handle->trackControl.Lock()->DeleteKey(handle->keyUid);\n                }\n            }\n        }\n\n        for (auto& track : animation->GetTracks())\n            track->CompleteKeysBatchingChange();\n    }\n\n    void KeyHandlesSheet::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        auto animationWindow = mAnimationWindow.Lock();\n\n        if (!o2Input.IsKeyDown(VK_CONTROL))\n            DeselectAll();\n\n        mBeginSelectHandles = mSelectedHandles;\n\n        mBeginSelectPoint.x = animationWindow->mTimeline->WorldToLocal(cursor.position.x);\n        mBeginSelectPoint.y = animationWindow->mTree->GetLineNumber(cursor.position.y);\n\n        Focus();\n        mContextMenu->SetItemsMaxPriority();\n    }\n\n    void KeyHandlesSheet::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        mIsFrameSelecting = false;\n        mNeedUpdateSelectionFrame = true;\n    }\n\n    void KeyHandlesSheet::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        mIsFrameSelecting = false;\n        mNeedUpdateSelectionFrame = true;\n    }\n\n    void KeyHandlesSheet::OnCursorPressedOutside(const Input::Cursor& cursor)\n    {\n\n    }\n\n    void KeyHandlesSheet::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n\n    }\n\n    void KeyHandlesSheet::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        auto animationWindow = mAnimationWindow.Lock();\n\n        if (cursor.isPressed)\n        {\n            if (!mIsFrameSelecting)\n            {\n                if (cursor.delta != Vec2F())\n                    mIsFrameSelecting = true;\n            }\n\n\n            if (mIsFrameSelecting)\n            {\n                mSelectionFrame->enabled = true;\n\n                Vec2F current(animationWindow->mTimeline->WorldToLocal(cursor.position.x), animationWindow->mTree->GetLineNumber(cursor.position.y));\n                mSelectionRect.left = Math::Min(mBeginSelectPoint.x, current.x);\n                mSelectionRect.right = Math::Max(mBeginSelectPoint.x, current.x);\n                mSelectionRect.top = Math::Floor(Math::Min(mBeginSelectPoint.y, current.y));\n                mSelectionRect.bottom = Math::Ceil(Math::Max(mBeginSelectPoint.y, current.y));\n\n                DeselectAll();\n\n                for (auto& handle : mBeginSelectHandles)\n                    SelectHandle(handle);\n\n                for (auto& handle : mHandles)\n                {\n                    Vec2F handlePos(handle->GetPosition().x, animationWindow->mTree->GetLineNumber(handle->GetScreenPosition().y));\n                    if (handlePos.x > mSelectionRect.left && handlePos.x < mSelectionRect.right && handlePos.y > mSelectionRect.top && handlePos.y < mSelectionRect.bottom + 0.5f)\n                    {\n                        SelectHandle(handle);\n                    }\n                }\n            }\n        }\n    }\n\n    void KeyHandlesSheet::OnCursorMoved(const Input::Cursor& cursor)\n    {}\n\n    void KeyHandlesSheet::OnCursorEnter(const Input::Cursor& cursor)\n    {\n\n    }\n\n    void KeyHandlesSheet::OnCursorExit(const Input::Cursor& cursor)\n    {\n\n    }\n\n    void KeyHandlesSheet::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        auto treeNode = mAnimationWindow.Lock()->mTree->GetTreeNodeUnderPoint(cursor.position);\n        if (!treeNode)\n            return;\n\n        auto animTreeNode = DynamicCast<AnimationTreeNode>(treeNode);\n        animTreeNode->OnDoubleClicked(cursor);\n    }\n\n    void KeyHandlesSheet::OnCursorRightMousePressed(const Input::Cursor& cursor)\n    {\n        Focus();\n        mContextMenu->SetItemsMaxPriority();\n        mContextMenuPressPoint = cursor.position;\n    }\n\n    void KeyHandlesSheet::OnCursorRightMouseStayDown(const Input::Cursor& cursor)\n    {}\n\n    void KeyHandlesSheet::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        const float threshold = 5.0f;\n        if ((cursor.position - mContextMenuPressPoint).Length() < threshold)\n            mContextMenu->Show();\n    }\n\n    void KeyHandlesSheet::OnCursorMiddleMousePressed(const Input::Cursor& cursor)\n    {\n\n    }\n\n    void KeyHandlesSheet::OnCursorMiddleMouseStayDown(const Input::Cursor& cursor)\n    {\n\n    }\n\n    void KeyHandlesSheet::OnCursorMiddleMouseReleased(const Input::Cursor& cursor)\n    {\n\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::KeyHandlesSheet>);\n// --- META ---\n\nDECLARE_CLASS(Editor::KeyHandlesSheet, Editor__KeyHandlesSheet);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/KeyHandlesSheet.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/AnimationKeyDragHandle.h\"\n\nnamespace o2\n{\n    class AnimationClip;\n    class ContextMenu;\n    class Sprite;\n}\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AnimationWindow);\n    FORWARD_CLASS_REF(ITrackControl);\n\n    // -------------------------------------------\n    // Handles sheet, manages selection of handles\n    // -------------------------------------------\n    class KeyHandlesSheet : public Widget, public SelectableDragHandlesGroup, public CursorAreaEventsListener\n    {\n    public:\n        // Default constructor\n        explicit KeyHandlesSheet(RefCounter* refCounter);\n\n        // Copy-constructor\n        KeyHandlesSheet(RefCounter* refCounter, const KeyHandlesSheet& other);\n\n        // Destructor\n        ~KeyHandlesSheet();\n\n        // Copy-operator\n        KeyHandlesSheet& operator=(const KeyHandlesSheet& other);\n\n        // Sets animation. Used for batch change of keys\n        void SetAnimation(const Ref<AnimationClip>& animation);\n\n        // Updates selection frame\n        void Update(float dt) override;\n\n        // Draws selection\n        void Draw() override;\n\n\t\t// Draws selection frame\n\t\tvoid DrawSelectionFrame();\n\n        // Updates draw order for correct handles and sheet input processing\n        void UpdateInputDrawOrder();\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Registers animation track track control\n        void RegTrackControl(const Ref<ITrackControl>& trackControl, const std::string& path);\n\n        // Unregisters animation track track control\n        void UnregTrackControl(const Ref<ITrackControl>& trackControl);\n\n        // Unregisters all tracks controls\n        void UnregAllTrackControls();\n\n        // Adds selectable handle to group\n        void AddHandle(const Ref<DragHandle>& handle) override;\n\n        // Removes selectable handle from group\n        void RemoveHandle(DragHandle* handle) override;\n\n        // Sets selected keys handles\n        void SetSelectedKeys(const Map<String, Vector<UInt64>>& keys);\n\n        // Returns list of selected keys handles\n        Map<String, Vector<UInt64>> GetSelectedKeys() const;\n\n        // Removes keys\n        void DeleteKeys(const Map<String, Vector<UInt64>>& keys, bool createAction = true);\n\n        // Returns context menu\n        const Ref<ContextMenu>& GetContextMenu() const;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        // Dynamic cast to RefCounterable via Widget\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<KeyHandlesSheet>& ref);\n\n        SERIALIZABLE(KeyHandlesSheet);\n        CLONEABLE_REF(KeyHandlesSheet);\n\n    private:\n        RectF mSelectionFrameOffsets = RectF(-6, -4, 8, 3);\n        RectF mSelectionFrameCursorOffsets = RectF(-2, -3, 2, 2);\n\n        WeakRef<AnimationWindow> mAnimationWindow; // Animation window\n\n        Vector<Ref<ITrackControl>>               mTrackControls;    // List of actual track controls\n        Vector<Pair<String, Ref<ITrackControl>>> mTrackControlsMap; // Map of actual track controls, key is Animation track path\n\n        Map<Ref<IAnimationTrack>, Vector<Ref<AnimationKeyDragHandle>>> mHandlesGroups; // All handles grouped by Animation track, used for fast searching handles for same Animation track\n\n        Ref<ContextMenu> mContextMenu; // Keys context menu\n        Vec2F            mContextMenuPressPoint; // Cursor position when right button were clicked. When trying to show context menu checking delta between current cursor position and this \n\n        bool mNeedUpdateSelectionFrame = false; // True when selection frame required to update\n\n        bool mHandleHasMoved = false; // it is true when some handle was selected and moved, resets on handle pressing\n\n        Ref<Sprite> mSelectionFrame; // Selected handles frame drawing sprite\n        RectF       mSelectionRect;  // Current selected handles rectangle. The right and left is minimum and maximum handles positions, top and bottom is minimum and maximum handles lines\n\n        Vec2F   mBeginSelectPoint;         // Begin frame selection point, where x is position on timeline, y is line number\n        bool    mIsFrameSelecting = false; // It is true when user selection by frame now\n\n        Vector<Ref<DragHandle>> mBeginSelectHandles; // handles list, that were selected before frame selecting\n\n        Ref<DragHandle> mLeftFrameDragHandle;   // Left frame border drag handle, resizing selected handles rect\n        Ref<DragHandle> mRightFrameDragHandle;  // Right frame border drag handle, resizing selected handles rect\n        Ref<DragHandle> mCenterFrameDragHandle; // Center frame drag handle, moves selected handles\n\n        DataDocument mBeforeChangeKeysData; // Serialized keys data before change\n\n    private:\n        // Initializes frame handles\n        void InitializeHandles();\n\n        // Initializes center handle, that moves selected keys on timeline\n        void InitializeCenterHandle();\n\n        // Initializes left handle, that moves selected keys on timeline relative to right selection rect position\n        void InitializeLeftHandle();\n\n        // Initializes right handle, that moves selected keys on timeline relative to left selection rect position\n        void InitializeRightHandle();\n\n        // Initializes context menu with copy, paste, delete etc\n        void InitializeContextMenu();\n\n        // Updates selection rectangle and drawing sprite\n        void UpdateSelectionFrame();\n\n        // Serialized keys into data\n        void SerializeKeys(DataValue& data, const Map<String, Vector<UInt64>>& keys, float relativeTime);\n\n        // Deserializes keys from data \n        void DeserializeKeys(const DataValue& data, Map<String, Vector<UInt64>>& keys, float relativeTime, bool generateNewUid = true);\n\n        // Copies selected keys into buffer\n        void CopyKeys();\n\n        // Inserts keys from buffer under cursor\n        void PasteKeys();\n\n        // Called when selection is changed - some handle was added or removed from selection\n        // Updating selection frame\n        void OnSelectionChanged() override;\n\n        // Called when selectable draggable handle was pressed, sends to track control that drag has began\n        void OnHandleCursorPressed(const Ref<DragHandle>& handle, const Input::Cursor& cursor) override;\n\n        // Called when selectable draggable handle was released, sends to track control that drag has completed\n        void OnHandleCursorReleased(const Ref<DragHandle>& handle, const Input::Cursor& cursor) override;\n\n        // Called when selectable handle moved, moves all selected handles position\n        // Enables keys batch change\n        void OnHandleMoved(const Ref<DragHandle>& handle, const Vec2F& cursorPos) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressed outside this\n        void OnCursorPressedOutside(const Input::Cursor& cursor) override;\n\n        // Called when cursor released outside this(only when cursor pressed this at previous time)\n        void OnCursorReleasedOutside(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when cursor double clicked\n        void OnCursorDblClicked(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was pressed on this\n        void OnCursorRightMousePressed(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button stay down on this\n        void OnCursorRightMouseStayDown(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Called when middle mouse button was pressed on this\n        void OnCursorMiddleMousePressed(const Input::Cursor& cursor) override;\n\n        // Called when middle mouse button stay down on this\n        void OnCursorMiddleMouseStayDown(const Input::Cursor& cursor) override;\n\n        // Called when middle mouse button was released (only when middle mouse button pressed this at previous time)\n        void OnCursorMiddleMouseReleased(const Input::Cursor& cursor) override;\n\n        REF_COUNTERABLE_IMPL(Widget, SelectableDragHandlesGroup);\n\n        friend class AnimationWindow;\n        friend class AnimationAddKeysAction;\n        friend class AnimationDeleteKeysAction;\n        friend class AnimationKeysChangeAction;\n\n        template<typename AnimationTrackType>\n        friend class KeyFramesTrackControl;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::KeyHandlesSheet)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::SelectableDragHandlesGroup);\n    BASE_CLASS(o2::CursorAreaEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::KeyHandlesSheet)\n{\n    FIELD().PRIVATE().DEFAULT_VALUE(RectF(-6, -4, 8, 3)).NAME(mSelectionFrameOffsets);\n    FIELD().PRIVATE().DEFAULT_VALUE(RectF(-2, -3, 2, 2)).NAME(mSelectionFrameCursorOffsets);\n    FIELD().PRIVATE().NAME(mAnimationWindow);\n    FIELD().PRIVATE().NAME(mTrackControls);\n    FIELD().PRIVATE().NAME(mTrackControlsMap);\n    FIELD().PRIVATE().NAME(mHandlesGroups);\n    FIELD().PRIVATE().NAME(mContextMenu);\n    FIELD().PRIVATE().NAME(mContextMenuPressPoint);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mNeedUpdateSelectionFrame);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mHandleHasMoved);\n    FIELD().PRIVATE().NAME(mSelectionFrame);\n    FIELD().PRIVATE().NAME(mSelectionRect);\n    FIELD().PRIVATE().NAME(mBeginSelectPoint);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mIsFrameSelecting);\n    FIELD().PRIVATE().NAME(mBeginSelectHandles);\n    FIELD().PRIVATE().NAME(mLeftFrameDragHandle);\n    FIELD().PRIVATE().NAME(mRightFrameDragHandle);\n    FIELD().PRIVATE().NAME(mCenterFrameDragHandle);\n    FIELD().PRIVATE().NAME(mBeforeChangeKeysData);\n}\nEND_META;\nCLASS_METHODS_META(Editor::KeyHandlesSheet)\n{\n\n    typedef const Map<String, Vector<UInt64>>& _tmp1;\n    typedef Map<String, Vector<UInt64>> _tmp2;\n    typedef const Map<String, Vector<UInt64>>& _tmp3;\n    typedef const Map<String, Vector<UInt64>>& _tmp4;\n    typedef Map<String, Vector<UInt64>>& _tmp5;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const KeyHandlesSheet&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnimation, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, DrawSelectionFrame);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateInputDrawOrder);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RegTrackControl, const Ref<ITrackControl>&, const std::string&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UnregTrackControl, const Ref<ITrackControl>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UnregAllTrackControls);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddHandle, const Ref<DragHandle>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveHandle, DragHandle*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedKeys, _tmp1);\n    FUNCTION().PUBLIC().SIGNATURE(_tmp2, GetSelectedKeys);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeleteKeys, _tmp3, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ContextMenu>&, GetContextMenu);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<KeyHandlesSheet>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeHandles);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeCenterHandle);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeLeftHandle);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeRightHandle);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeContextMenu);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateSelectionFrame);\n    FUNCTION().PRIVATE().SIGNATURE(void, SerializeKeys, DataValue&, _tmp4, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, DeserializeKeys, const DataValue&, _tmp5, float, bool);\n    FUNCTION().PRIVATE().SIGNATURE(void, CopyKeys);\n    FUNCTION().PRIVATE().SIGNATURE(void, PasteKeys);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnSelectionChanged);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnHandleCursorPressed, const Ref<DragHandle>&, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnHandleCursorReleased, const Ref<DragHandle>&, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnHandleMoved, const Ref<DragHandle>&, const Vec2F&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorPressedOutside, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorReleasedOutside, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorDblClicked, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorRightMousePressed, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorRightMouseStayDown, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorMiddleMousePressed, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorMiddleMouseStayDown, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorMiddleMouseReleased, const Input::Cursor&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/PropertiesListDlg.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"PropertiesListDlg.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2/Utils/Editor/Attributes/AnimatableAttribute.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/UIRoot.h\"\n\nDECLARE_SINGLETON(Editor::PropertiesListDlg);\n\nnamespace Editor\n{    \n    PropertiesListDlg::PropertiesListDlg(RefCounter* refCounter):\n        Singleton<PropertiesListDlg>(refCounter)\n    {\n        InitializeWindow();\n    }\n\n    PropertiesListDlg::~PropertiesListDlg()\n    {}\n\n    void PropertiesListDlg::Show(const Ref<AnimationClip>& animation, const Ref<Actor>& actor)\n    {\n        Instance().mPropertiesTree->Initialize(animation, actor);\n        Instance().mFilter->SetText(\"\");\n        Instance().mWindow->ShowModal();\n    }\n\n    void PropertiesListDlg::InitializeWindow()\n    {\n        mWindow = DynamicCast<o2::Window>(EditorUIRoot.AddWidget(o2UI.CreateWindow(\"Animation properties\")));\n        mWindow->SetClippingLayout(Layout::BothStretch(-1, -2, 0, 17));\n        mWindow->SetViewLayout(Layout::BothStretch(-2, -2, 0, 20));\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_tree_wnd_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 1)));\n\n        auto upPanel = mmake<Widget>();\n        upPanel->name = \"up panel\";\n        *upPanel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 20, -1);\n        upPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_square_field.png\"), Layout::BothStretch(-4, -4, -5, -5));\n\n        auto searchButton = o2UI.CreateWidget<Button>(\"search\");\n        *searchButton->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(-1, 1));\n        upPanel->AddChild(searchButton);\n\n        mFilter = o2UI.CreateWidget<EditBox>(\"backless\");\n        *mFilter->layout = WidgetLayout::BothStretch(19, 2, 0, -4);\n        mFilter->onChanged += [&](const WString& filter) { mPropertiesTree->SetFilter(filter); };\n        upPanel->AddChild(mFilter);\n\n        mWindow->AddChild(upPanel);\n\n        mPropertiesTree = o2UI.CreateWidget<AnimationPropertiesTree>();\n        *mPropertiesTree->layout = WidgetLayout::BothStretch(0, 0, 0, 17);\n        mPropertiesTree->SetRearrangeType(Tree::RearrangeType::Disabled);\n\n        mWindow->AddChild(mPropertiesTree);\n\n        mWindow->Hide(true);\n        mWindow->layout->size = Vec2F(400, 600);\n\n        mWindow->GetBackCursorListener().onCursorReleased = [=](const Input::Cursor& c) { mWindow->Hide(); };\n    }\n\n    AnimationPropertiesTree::AnimationPropertiesTree(RefCounter* refCounter) :\n        Tree(refCounter)\n    {}\n\n    AnimationPropertiesTree::AnimationPropertiesTree(RefCounter* refCounter, const AnimationPropertiesTree& other):\n        Tree(refCounter, other)\n    {}\n\n    AnimationPropertiesTree::AnimationPropertiesTree(const AnimationPropertiesTree& other):\n        AnimationPropertiesTree(nullptr, other)\n    {}\n\n    AnimationPropertiesTree& AnimationPropertiesTree::operator=(const AnimationPropertiesTree& other)\n    {\n        Tree::operator=(other);\n        return *this;\n    }\n\n    void AnimationPropertiesTree::Initialize(const Ref<AnimationClip>& animation, const Ref<Actor>& actor)\n    {\n        mFilterStr = \"\";\n        mRoot = mmake<NodeData>();\n        mPassedObject.Clear();\n\n        mAnimation = animation;\n        mActor = actor;\n\n        InitializeTreeNode(mRoot, actor.Get());\n        UpdateNodesStructure();\n        UpdateVisibleNodes();\n    }\n\n    void AnimationPropertiesTree::SetFilter(const WString& filter)\n    {\n        mFilterStr = filter.ToLowerCase();\n\n        mRoot = mmake<NodeData>();\n        mPassedObject.Clear();\n\n        InitializeTreeNode(mRoot, mActor.Get());\n        UpdateNodesStructure();\n        UpdateVisibleNodes();\n    }\n\n    String AnimationPropertiesTree::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void AnimationPropertiesTree::InitializeTreeNode(const Ref<NodeData>& node, IObject* object)\n    {\n        if (!object)\n            return;\n\n        if (mPassedObject.Contains(object))\n            return;\n\n        mPassedObject.Add(object);\n\n        auto objectType = dynamic_cast<const ObjectType*>(&object->GetType());\n        auto rawObject = objectType->DynamicCastFromIObject(object);\n        ProcessObject(rawObject, objectType, node);\n    }\n\n    void AnimationPropertiesTree::ProcessObject(void* object, const ObjectType* type, const Ref<NodeData>& node)\n    {\n        for (auto& field : type->GetFields())\n        {\n            bool isPublic = field.GetProtectionSection() == ProtectSection::Public;\n            bool isEditorProperty = field.HasAttribute<EditorPropertyAttribute>();\n            bool isIgnoreEditorProperty = field.HasAttribute<IgnoreEditorPropertyAttribute>();\n            bool isAnimatable = field.HasAttribute<AnimatableAttribute>();\n\n            if (isAnimatable || (isPublic && !isIgnoreEditorProperty) || isEditorProperty) \n                ProcessTreeNode(field.GetValuePtr(object), field.GetType(), field.GetName(), node);\n        }\n\n        for (auto& base : type->GetBaseTypes())\n        {\n            if (base.type->GetUsage() != Type::Usage::Object)\n                continue;\n\n            ProcessObject(base.dynamicCastUpFunc(object), dynamic_cast<const ObjectType*>(base.type), node);\n        }\n    }\n\n    void AnimationPropertiesTree::ProcessTreeNode(void* object, const Type* type, const String& name, const Ref<NodeData>& node)\n    {\n        static Vector<const Type*> availableTypes({ &TypeOf(float), &TypeOf(Color4), &TypeOf(Vec2F), &TypeOf(bool) });\n\n        if (type->GetUsage() == Type::Usage::Object && object)\n        {\n            auto fieldObjectType = dynamic_cast<const ObjectType*>(type);\n            InitializeObjectTreeNode(fieldObjectType, object, name, node);\n        }\n        else if (type->GetUsage() == Type::Usage::Pointer && object)\n        {\n            auto pointerType = dynamic_cast<const PointerType*>(type);\n            auto unpointedType = pointerType->GetBaseType();\n            if (unpointedType->GetUsage() == Type::Usage::Object)\n            {\n                auto fieldObjectType = dynamic_cast<const ObjectType*>(unpointedType);\n                InitializeObjectTreeNode(fieldObjectType, object, name, node);\n            }\n        }\n        else if (type->GetUsage() == Type::Usage::Reference && object)\n        {\n            auto referenceType = dynamic_cast<const ReferenceType*>(type);\n            auto unpointedType = referenceType->GetBaseType();\n            if (unpointedType->GetUsage() == Type::Usage::Object)\n            {\n                auto fieldObjectType = dynamic_cast<const ObjectType*>(unpointedType);\n                InitializeObjectTreeNode(fieldObjectType, referenceType->GetObjectRawPtr(object), name, node);\n            }\n        }\n        else if (type->GetUsage() == Type::Usage::Property && object)\n        {\n            auto propertyType = dynamic_cast<const PropertyType*>(type);\n            ProcessTreeNode(propertyType->GetValueAsPtr(object), propertyType->GetValueType(), name, node);\n        }\n        else if (type->GetUsage() == Type::Usage::StringAccessor && object)\n        {\n            auto accessorType = dynamic_cast<const StringPointerAccessorType*>(type);\n            auto newNode = node->AddChild(name, type);\n            auto allValues = accessorType->GetAllValues(object);\n\n            auto valueType = accessorType->GetReturnType();\n            if (valueType->GetUsage() == Type::Usage::Reference)\n                valueType = dynamic_cast<const ReferenceType*>(valueType)->GetBaseType();\n\n            for (auto& kv : allValues)\n                ProcessTreeNode(kv.second, valueType, kv.first, newNode);\n\n            if (newNode->children.empty()) {\n                node->children.Remove(newNode);\n            }\n        }\n        else if (availableTypes.Contains(type))\n        {\n            InitializePropertyNode(node, name, type);\n        }\n    }\n\n    void AnimationPropertiesTree::InitializePropertyNode(const Ref<NodeData>& node, const String& name, const Type* type)\n    {\n        if (!mFilterStr.IsEmpty() && !name.ToLowerCase().Contains(mFilterStr))\n            return;\n\n        auto newNode = node->AddChild(name, type);\n        newNode->used = mAnimation->ContainsTrack(newNode->path);\n    }\n\n    void AnimationPropertiesTree::InitializeObjectTreeNode(const ObjectType* fieldObjectType, void* object,\n                                                           const String& name, const Ref<NodeData>& node)\n    {\n        auto fieldObject = fieldObjectType->DynamicCastToIObject(object);\n        auto& realType = fieldObject->GetType();\n        auto newNode = node->AddChild(name, &realType);\n        InitializeTreeNode(newNode, fieldObject);\n\n        if (newNode->children.IsEmpty())\n            node->children.Remove(newNode);\n    }\n\n    void AnimationPropertiesTree::UpdateVisibleNodes()\n    {\n        PushEditorScopeOnStack scope;\n        Tree::UpdateVisibleNodes();\n    }\n\n    Ref<TreeNode> AnimationPropertiesTree::CreateTreeNodeWidget()\n    {\n        PushEditorScopeOnStack scope;\n        return Tree::CreateTreeNodeWidget();\n    }\n\n    void* AnimationPropertiesTree::GetObjectParent(void* object)\n    {\n        return ((NodeData*)object)->parent.Lock().Get();\n    }\n\n    Vector<void*> AnimationPropertiesTree::GetObjectChilds(void* object)\n    {\n        if (object)\n            return ((NodeData*)object)->children.Convert<void*>([](auto& x) { return x.Get(); });\n\n        return mRoot->children.Convert<void*>([](auto& x) { return x.Get(); });\n    }\n\n    String AnimationPropertiesTree::GetObjectDebug(void* object)\n    {\n        if (object)\n            return ((NodeData*)object)->path;\n\n        return \"\";\n    }\n\n    void AnimationPropertiesTree::FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object)\n    {\n        auto propertyNode = DynamicCast<AnimationPropertiesTreeNode>(nodeWidget);\n        propertyNode->Setup(Ref((NodeData*)object), Ref(this));\n    }\n\n    void AnimationPropertiesTree::OnNodeDblClick(const Ref<TreeNode>& nodeWidget)\n    {\n        if (!nodeWidget)\n            return;\n\n        auto propertyNode = DynamicCast<AnimationPropertiesTreeNode>(nodeWidget);\n        auto propertyData = propertyNode->mData.Lock();\n        if (propertyData->used)\n            mAnimation->RemoveTrack(propertyData->path);\n        else\n            mAnimation->AddTrack(propertyData->path, *propertyData->type);\n    }\n\n    void AnimationPropertiesTree::OnNodesSelectionChanged(Vector<void*> objects)\n    {\n\n    }\n\n    AnimationPropertiesTreeNode::AnimationPropertiesTreeNode(RefCounter* refCounter):\n        TreeNode(refCounter)\n    {\n        InitializeControls();\n    }\n\n    AnimationPropertiesTreeNode::AnimationPropertiesTreeNode(RefCounter* refCounter, const AnimationPropertiesTreeNode& other) :\n        TreeNode(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    AnimationPropertiesTreeNode& AnimationPropertiesTreeNode::operator=(const AnimationPropertiesTreeNode& other)\n    {\n        TreeNode::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void AnimationPropertiesTreeNode::Setup(const Ref<AnimationPropertiesTree::NodeData>& data, const Ref<AnimationPropertiesTree>& tree)\n    {\n        static Map<const Type*, String> icons = \n        { \n            { (const Type*)&TypeOf(float), \"ui/UI4_float_type.png\" },\n            { (const Type*)&TypeOf(Vec2F), \"ui/UI4_vector_type.png\" },\n            { (const Type*)&TypeOf(Color4), \"ui/UI4_color_type.png\" },\n            { (const Type*)&TypeOf(bool), \"ui/UI4_bool_type.png\" }\n        };\n\n        static String otherIcon = \"ui/UI4_other_type.png\";\n        static String animIcon = \"ui/UI4_anim_type.png\";\n\n        mName->text = data->name;\n\n        bool ableToAddTrack = data->children.IsEmpty();\n\n        String iconPath;\n        if (!icons.TryGetValue(data->type, iconPath))\n            iconPath = otherIcon;\n\n        if (data->type->IsBasedOn(TypeOf(IAnimation)))\n        {\n            ableToAddTrack = true;\n            iconPath = animIcon;\n        }\n\n        *mIcon = Sprite(iconPath);\n\n        mData = data;\n        mTree = tree;\n\n        mAddButton->SetEnabledForcible(!data->used && ableToAddTrack);\n        mRemoveButton->SetEnabledForcible(data->used && ableToAddTrack);\n    }\n\n    String AnimationPropertiesTreeNode::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void AnimationPropertiesTreeNode::OnDeserialized(const DataValue& node)\n    {\n        TreeNode::OnDeserialized(node);\n        InitializeControls();\n    }\n\n    void AnimationPropertiesTreeNode::InitializeControls()\n    {\n        mName = GetLayerDrawable<Text>(\"name\");\n        mIcon = GetLayerDrawable<Sprite>(\"icon\");\n\n\n        mAddButton = GetChildByType<Button>(\"addButton\");\n        if (mAddButton)\n        {\n            mAddButton->onClick = [=]()\n            {\n                auto tree = mTree.Lock();\n                auto data = mData.Lock();\n\n                tree->mAnimation->AddTrack(data->path, *data->type);\n                data->used = true;\n                tree->OnObjectsChanged({ (void*)data.Get() });\n            };\n        }\n\n        mRemoveButton = GetChildByType<Button>(\"removeButton\");\n        if (mRemoveButton)\n        {\n            mRemoveButton->onClick = [=]() {\n                auto tree = mTree.Lock();\n                auto data = mData.Lock();\n\n                tree->mAnimation->RemoveTrack(data->path);\n                data->used = false;\n                tree->OnObjectsChanged({ (void*)data.Get() });\n            };\n        }\n    }\n\n    AnimationPropertiesTree::NodeData::~NodeData()\n    {\n        Clear();\n    }\n\n    void AnimationPropertiesTree::NodeData::Clear()\n    {\n        children.Clear();\n    }\n\n    Ref<AnimationPropertiesTree::NodeData> AnimationPropertiesTree::NodeData::AddChild(const String& name, const Type* type)\n    {\n        auto newChild = mmake<NodeData>();\n        children.Add(newChild);\n\n        newChild->name = name;\n        newChild->path = path.IsEmpty() ? name : path + \"/\" + name;\n        newChild->type = type;\n        newChild->parent = Ref(this);\n\n        return newChild;\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AnimationPropertiesTreeNode>);\n// --- META ---\n\nDECLARE_CLASS(Editor::AnimationPropertiesTree, Editor__AnimationPropertiesTree);\n\nDECLARE_CLASS(Editor::AnimationPropertiesTreeNode, Editor__AnimationPropertiesTreeNode);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/PropertiesListDlg.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2/Utils/Singleton.h\"\n\nnamespace o2\n{\n    class Button;\n    class EditBox;\n    class Sprite;\n    class Text;\n    class Window;\n}\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AnimationPropertiesTree);\n\n    // ---------------------------------------------------------------------------------------\n    // Animation properties list dialog. Shows properties tree with filter for specified actor\n    // ---------------------------------------------------------------------------------------\n    class PropertiesListDlg : public Singleton<PropertiesListDlg>\n    {\n    public:\n        PropertiesListDlg(RefCounter* refCounter);\n        ~PropertiesListDlg();\n\n        // Shows animation properties window for actor and animation\n        static void Show(const Ref<AnimationClip>& animation, const Ref<Actor>& actor);\n\n    private:\n        Ref<o2::Window> mWindow;\n        Ref<EditBox>    mFilter;\n\n        Ref<AnimationPropertiesTree> mPropertiesTree;\n\n    private:\n        // Initializes window and controls\n        void InitializeWindow();\n    };\n\n    // ------------------------------------------------------------------------------------\n    // Animation properties tree. Builds data tree by actor's properties, showing by filter\n    // Can add or remove animation tracks\n    // ------------------------------------------------------------------------------------\n    class AnimationPropertiesTree : public Tree\n    {\n    public:\n        struct NodeData: public RefCounterable\n        {\n            WeakRef<NodeData>     parent;\n            Vector<Ref<NodeData>> children;\n\n            String name;\n            String path;\n\n            const Type* type = nullptr;\n\n            bool used = false;\n\n        public:\n            ~NodeData();\n\n            void Clear();\n            Ref<NodeData> AddChild(const String& name, const Type* type);\n        };\n\n    public:\n        // Default constructor\n        AnimationPropertiesTree(RefCounter* refCounter);\n\n        // Copy-constructor\n        AnimationPropertiesTree(RefCounter* refCounter, const AnimationPropertiesTree& other);\n\n        // Copy-constructor\n        AnimationPropertiesTree(const AnimationPropertiesTree& other);\n\n        // Copy operator\n        AnimationPropertiesTree& operator=(const AnimationPropertiesTree& other);\n\n        // Initializes properties\n        void Initialize(const Ref<AnimationClip>& animation, const Ref<Actor>& actor);\n\n        // Sets filter and refreshes tree\n        void SetFilter(const WString& filter);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(AnimationPropertiesTree);\n        CLONEABLE_REF(AnimationPropertiesTree);\n\n    private:\n        WString mFilterStr; // Filtering string\n\n        Ref<AnimationClip> mAnimation; // Looking animation\n        Ref<Actor>         mActor;     // Looking actor\n\n        Ref<NodeData>    mRoot;         // Root properties data node\n        Vector<IObject*> mPassedObject; // Tree processing passed objects\n\n    private:\n        // Initializes parameters tree node by object properties\n        void InitializeTreeNode(const Ref<NodeData>& node, IObject* object);\n\n        // Processes object base types and fields\n        void ProcessObject(void* object, const ObjectType* type, const Ref<NodeData>& node);\n\n        // Processes tree node property. Checks type\n        void ProcessTreeNode(void* object, const Type* type, const String& name, const Ref<NodeData>& node);\n\n        // initializes single property node\n        void InitializePropertyNode(const Ref<NodeData>& node, const String& name, const Type* type);\n\n        // Initializes sub tree for object\n        void InitializeObjectTreeNode(const ObjectType* fieldObjectType, void* object, const String& name, const Ref<NodeData>& node);\n\n        // Updates visible nodes (calculates range and initializes nodes), enables editor mode\n        void UpdateVisibleNodes() override;\n\n        // Gets tree node from pool or creates new, enables editor mode\n        Ref<TreeNode> CreateTreeNodeWidget() override;\n\n        // Returns object's parent\n        void* GetObjectParent(void* object) override;\n\n        // Returns object's children\n        Vector<void*> GetObjectChilds(void* object) override;\n\n        // Returns debugging string for object\n        String GetObjectDebug(void* object) override;\n\n        // Sets nodeWidget data by object\n        void FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object) override;\n\n        // Called when tree node was double clicked\n        void OnNodeDblClick(const Ref<TreeNode>& nodeWidget) override;\n\n        // Called when list of selected objects was changed\n        void OnNodesSelectionChanged(Vector<void*> objects) override;\n\n        friend class AnimationPropertiesTreeNode;\n    };\n\n    // -------------------------------------------------------------------------\n    // Animation properties tree node. Shows icon, name and add or remove button\n    // -------------------------------------------------------------------------\n    class AnimationPropertiesTreeNode : public TreeNode\n    {\n    public:\n        // Default constructor\n        AnimationPropertiesTreeNode(RefCounter* refCounter);\n\n        // Copy-constructor\n        AnimationPropertiesTreeNode(RefCounter* refCounter, const AnimationPropertiesTreeNode& other);\n\n        // Copy operator\n        AnimationPropertiesTreeNode& operator=(const AnimationPropertiesTreeNode& other);\n\n        // Initializes node by data\n        void Setup(const Ref<AnimationPropertiesTree::NodeData>& data, const Ref<AnimationPropertiesTree>& tree);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(AnimationPropertiesTreeNode);\n        CLONEABLE_REF(AnimationPropertiesTreeNode);\n\n    private:\n        Ref<Text>   mName;         // Name of property\n        Ref<Sprite> mIcon;         // Property icon. Used only for finite properties\n        Ref<Button> mAddButton;    // Add button, it is enabled when animation track isn't added to animation, adds this value to animation\n        Ref<Button> mRemoveButton; // Remove button, it is enabled when animation track is added to animation, removes this value to animation\n\n        WeakRef<AnimationPropertiesTree::NodeData> mData; // Data node pointer\n\n        WeakRef<AnimationPropertiesTree> mTree; // Owner tree\n\n    private:\n        // Called on deserialization, initializes controls\n        void OnDeserialized(const DataValue& node) override;\n\n        // initializes controls and widgets\n        void InitializeControls();\n\n        friend class AnimationPropertiesTree;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AnimationPropertiesTree)\n{\n    BASE_CLASS(o2::Tree);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationPropertiesTree)\n{\n    FIELD().PRIVATE().NAME(mFilterStr);\n    FIELD().PRIVATE().NAME(mAnimation);\n    FIELD().PRIVATE().NAME(mActor);\n    FIELD().PRIVATE().NAME(mRoot);\n    FIELD().PRIVATE().NAME(mPassedObject);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationPropertiesTree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AnimationPropertiesTree&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationPropertiesTree&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize, const Ref<AnimationClip>&, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFilter, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeTreeNode, const Ref<NodeData>&, IObject*);\n    FUNCTION().PRIVATE().SIGNATURE(void, ProcessObject, void*, const ObjectType*, const Ref<NodeData>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, ProcessTreeNode, void*, const Type*, const String&, const Ref<NodeData>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializePropertyNode, const Ref<NodeData>&, const String&, const Type*);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeObjectTreeNode, const ObjectType*, void*, const String&, const Ref<NodeData>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateVisibleNodes);\n    FUNCTION().PRIVATE().SIGNATURE(Ref<TreeNode>, CreateTreeNodeWidget);\n    FUNCTION().PRIVATE().SIGNATURE(void*, GetObjectParent, void*);\n    FUNCTION().PRIVATE().SIGNATURE(Vector<void*>, GetObjectChilds, void*);\n    FUNCTION().PRIVATE().SIGNATURE(String, GetObjectDebug, void*);\n    FUNCTION().PRIVATE().SIGNATURE(void, FillNodeDataByObject, const Ref<TreeNode>&, void*);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnNodeDblClick, const Ref<TreeNode>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnNodesSelectionChanged, Vector<void*>);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::AnimationPropertiesTreeNode)\n{\n    BASE_CLASS(o2::TreeNode);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationPropertiesTreeNode)\n{\n    FIELD().PRIVATE().NAME(mName);\n    FIELD().PRIVATE().NAME(mIcon);\n    FIELD().PRIVATE().NAME(mAddButton);\n    FIELD().PRIVATE().NAME(mRemoveButton);\n    FIELD().PRIVATE().NAME(mData);\n    FIELD().PRIVATE().NAME(mTree);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationPropertiesTreeNode)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AnimationPropertiesTreeNode&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Setup, const Ref<AnimationPropertiesTree::NodeData>&, const Ref<AnimationPropertiesTree>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeControls);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/Timeline.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Timeline.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    AnimationTimeline::AnimationTimeline(RefCounter* refCounter) :\n        Widget(refCounter)\n    {\n        mTextFont = AssetRef<VectorFontAsset>(\"stdFont.ttf\")->GetFont();\n        mTextFont->CheckCharacters(\"0123456789.,+-\", 10);\n\n        mText = mmake<Text>(mTextFont);\n        mText->horAlign = HorAlign::Middle;\n        mText->verAlign = VerAlign::Bottom;\n        mText->height = 8;\n        mText->color = Color4(44, 62, 80);\n\n        AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_dopesheet_back.png\"), Layout::BothStretch(-3, -3, -3, -14))->transparency = 0.5f;\n\n        mBeginMark = mmake<Sprite>(\"ui/UI4_time_line_left.png\");\n        mEndMark = mmake<Sprite>(\"ui/UI4_time_line_right.png\");\n\n        mTimeLineEventsArea = mmake<CursorEventsArea>();\n        mTimeLine = mmake<Sprite>(\"ui/UI4_time_line.png\");\n\n        mTimeLineEventsArea->isUnderPoint = [&](const Vec2F& pos) {\n            auto rect = layout->GetWorldRect();\n            rect.bottom = rect.top - 20.0f;\n\n            return rect.IsInside(pos);\n        };\n\n        mTimeLineEventsArea->onMoved = THIS_FUNC(SetAnimationTimeByCursor);\n        mTimeLineEventsArea->onCursorPressed = THIS_FUNC(SetAnimationTimeByCursor);\n    }\n\n    AnimationTimeline::AnimationTimeline(RefCounter* refCounter, const AnimationTimeline& other) :\n        Widget(refCounter, other), mTextFont(other.mTextFont), mText(other.mText->CloneAs<Text>()),\n        mBeginMark(other.mBeginMark->CloneAs<Sprite>()), mEndMark(other.mEndMark->CloneAs<Sprite>()),\n        mTimeLine(other.mTimeLine->CloneAs<Sprite>())\n    { }\n\n    AnimationTimeline::~AnimationTimeline()\n    {}\n\n    AnimationTimeline& AnimationTimeline::operator=(const AnimationTimeline& other)\n    {\n        Widget::operator=(other);\n\n        mTextFont = other.mTextFont;\n        mText = other.mText->CloneAsRef<Text>();\n\n        mBeginMark = other.mBeginMark->CloneAsRef<Sprite>();\n        mEndMark = other.mEndMark->CloneAsRef<Sprite>();\n\n        mTimeLine = other.mTimeLine->CloneAsRef<Sprite>();\n\n        return *this;\n    }\n\n    void AnimationTimeline::Draw()\n    {\n        Widget::Draw();\n\n        o2Render.EnableScissorTest(GetChildrenWorldRect());\n\n        DrawTimeScale();\n\n        mTimeLine->SetPosition(Vec2F(LocalToWorld(mTimeCursor), layout->GetWorldTop()));\n        mTimeLine->SetSize(Vec2F(10.0f, layout->GetHeight() + 5.0f));\n        mTimeLine->SetSizePivot(Vec2F(4.5f, layout->GetHeight() + 4.0f));\n        mTimeLine->Draw();\n\n        o2Render.DisableScissorTest();\n\n        CursorAreaEventsListener::OnDrawn();\n\n        mTimeLineEventsArea->OnDrawn();\n    }\n\n    void AnimationTimeline::DrawTimeScale()\n    {\n        double beginPos = (double)(mScaleOffset - mSmoothViewScroll);\n        double endPos = beginPos + mDuration*mOneSecondDefaultSize*mSmoothViewZoom;\n\n        Layout beginLayout = mBeginMarkLayout;\n        beginLayout.offsetMax.x += (float)beginPos;\n\n        Layout endLayout = mEndMarkLayout;\n        endLayout.offsetMin.x += (float)endPos;\n\n        mBeginMark->SetRect(beginLayout.Calculate(GetChildrenWorldRect()));\n        mBeginMark->Draw();\n\n        mEndMark->SetRect(endLayout.Calculate(GetChildrenWorldRect()));\n        mEndMark->Draw();\n\n        int bigLinePeriod;\n        double bigLineTimeAmount;\n        ChooseScaleParams(bigLinePeriod, bigLineTimeAmount);\n\n        double posDelta = bigLineTimeAmount * mOneSecondDefaultSize*mSmoothViewZoom;\n\n        int lineIdx = 0;\n        while (beginPos < 0)\n        {\n            lineIdx++;\n            beginPos += posDelta;\n        }\n\n        endPos = (double)layout->GetWidth();\n\n        RectF worldRect = layout->GetWorldRect();\n        for (double pos = beginPos; pos < endPos; pos += posDelta, lineIdx++)\n        {\n            float screenPos = (float)pos + worldRect.left;\n            bool isBigLine = lineIdx%bigLinePeriod == 0;\n\n            o2Render.DrawAALine(Vec2F(screenPos, worldRect.top - (isBigLine ? mBigLineOffset : mSmallLineOffset)),\n                                Vec2F(screenPos, worldRect.bottom),\n                                isBigLine ? mBigLineColor : mSmallLineColor);\n\n            if (isBigLine)\n            {\n                mText->SetText((String)((double)lineIdx*bigLineTimeAmount));\n                mText->SetPosition(Vec2F(screenPos, worldRect.top - mTextOffset));\n                mText->Draw();\n            }\n        }\n    }\n\n    void AnimationTimeline::Update(float dt)\n    {\n        Widget::Update(dt);\n\n        UpdateZooming(dt);\n        UpdateScrolling(dt);\n    }\n\n    void AnimationTimeline::UpdateZooming(float dt)\n    {\n        if (!Math::Equals(mSmoothViewZoom, mViewZoom, 0.001f))\n\t\t{\n\t\t\tfloat timeAtCursorBefore = WorldToLocal(o2Input.GetCursorPos().x);\n\t\t\tmSmoothViewZoom = Math::Lerp(mSmoothViewZoom, mViewZoom, dt * mScaleSmoothLerpCoef);\n\t\t\tfloat timeAtCursorAfter = WorldToLocal(o2Input.GetCursorPos().x);\n\n            if (mViewHasZoomed)\n            {\n                float scrollDelta = (timeAtCursorAfter - timeAtCursorBefore) * mOneSecondDefaultSize * mSmoothViewZoom;\n                mViewScroll -= scrollDelta;\n                mSmoothViewScroll -= scrollDelta;\n            }\n\n            UpdateScrollBarHandleSize();\n\n            onViewChanged();\n        }\n        else\n            mViewHasZoomed = false;\n    }\n\n    void AnimationTimeline::UpdateScrollBarHandleSize()\n    {\n        if (mScrollBar)\n            mScrollBar->SetScrollHandleSize(layout->GetWidth());\n    }\n\n    float AnimationTimeline::LocalToWorld(float pos) const\n    {\n        return pos*(mOneSecondDefaultSize*mSmoothViewZoom) + mScaleOffset + layout->GetWorldLeft() - mSmoothViewScroll;\n    }\n\n    float AnimationTimeline::WorldToLocal(float pos) const\n    {\n        return (pos + mSmoothViewScroll - layout->GetWorldLeft() - mScaleOffset)/(mOneSecondDefaultSize*mSmoothViewZoom);\n    }\n\n    void AnimationTimeline::OnTransformUpdated()\n    {\n        UpdateScrollBarHandleSize();\n        Widget::OnTransformUpdated();\n    }\n\n    void AnimationTimeline::SetAnimationTimeByCursor(const Input::Cursor& cursor)\n    {\n        if (cursor.isPressed && mAnimationWindow->mAnimation)\n        {\n            mAnimationWindow->mPreviewToggle->value = true;\n            SetTimeCursor(Math::Max(0.0f, WorldToLocal(cursor.position.x)));\n        }\n    }\n\n    void AnimationTimeline::OnCursorRightMousePressed(const Input::Cursor& cursor)\n    {\n        mBeginDragViewScrollOffset = cursor.position.x;\n        mBeginDragViewScroll = mViewScroll;\n    }\n\n    void AnimationTimeline::OnCursorRightMouseStayDown(const Input::Cursor& cursor)\n    {\n        const float beginScrollThreshold = 3.0f;\n\n        if (!mDragViewScroll && !mViewMoveDisabled)\n        {\n            if (Math::Abs(LocalToWorld(mBeginDragViewScrollOffset) - cursor.position.x) > beginScrollThreshold)\n                mDragViewScroll = true;\n        }\n\n        if (mDragViewScroll)\n        {\n            mViewScroll = mBeginDragViewScroll + mBeginDragViewScrollOffset - cursor.position.x;\n\n            if (mViewScroll < 0.0f)\n                mViewScroll = mViewScroll/2.0f;\n\n\t\t\tfloat maxScroll = mDuration*mOneSecondDefaultSize*mSmoothViewZoom;\n            if (mViewScroll > maxScroll)\n                mViewScroll = Math::Lerp(mViewScroll, maxScroll, 0.5f);\n\n            mSmoothViewScroll = mViewScroll;\n\n            if (mScrollBar)\n                mScrollBar->SetValueForcible(mSmoothViewScroll);\n        }\n    }\n\n    void AnimationTimeline::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        if (mDragViewScroll)\n        {\n            mViewScrollSpeed = -cursor.delta.x/o2Time.GetDeltaTime();\n            mDragViewScroll = false;\n        }\n    }\n\n    void AnimationTimeline::OnScrolled(float scroll)\n    {\n        if (!mViewMoveDisabled)\n        {\n            mViewZoom = Math::Clamp(mViewZoom/(1.0f - o2Input.GetMouseWheelDelta()*mScaleSense), mMinScale, mMaxScale);\n            mViewHasZoomed = true;\n        }\n    }\n\n    void AnimationTimeline::ChooseScaleParams(int& bigLinePeriod, double& bigLineTimeAmount)\n    {\n        struct Cfg\n        {\n            int chunkSegments;\n            double chunkDuration;\n        };\n\n        Cfg configs[] = { { 5, 0.05 }, { 10, 0.1 }, { 5, 0.1 }, { 2, 0.1 }, { 5, 0.5 }, { 10, 1.0 }, { 5, 1.0 }, { 2, 1.0 }, { 5, 5.0 }, { 6, 30.0 } };\n\n        Cfg nearestCfg;\n        float nearestCfgScreenChunkSegmentSizeDiff = FLT_MAX;\n        for (auto& cfg : configs)\n        {\n            float screenChunkSegmentSize = (float)cfg.chunkDuration/(float)cfg.chunkSegments*mOneSecondDefaultSize*mSmoothViewZoom;\n            float screenChunkSegmentSizeDiff = mPerfectScaleSegmentSize - screenChunkSegmentSize;\n            if (screenChunkSegmentSizeDiff > 0.0f)\n                screenChunkSegmentSizeDiff *= 2.0f;\n\n            if (Math::Abs(screenChunkSegmentSizeDiff) < nearestCfgScreenChunkSegmentSizeDiff)\n            {\n                nearestCfgScreenChunkSegmentSizeDiff = screenChunkSegmentSizeDiff;\n                nearestCfg = cfg;\n            }\n        }\n\n        bigLinePeriod = nearestCfg.chunkSegments;\n        bigLineTimeAmount = nearestCfg.chunkDuration/(double)nearestCfg.chunkSegments;\n    }\n\n    void AnimationTimeline::UpdateScrolling(float dt)\n    {\n        float prevViewScroll = mSmoothViewScroll;\n\n        if (!mDragViewScroll && Math::Abs(mViewScrollSpeed) > 0.0001f)\n        {\n            mViewScroll += mViewScrollSpeed*dt;\n            mSmoothViewScroll = mViewScroll;\n            mViewScrollSpeed = Math::Lerp(mViewScrollSpeed, 0.0f, dt*mScrollSpeedDecreaseCoef);\n\n            if (mScrollBar)\n                mScrollBar->SetValueForcible(mSmoothViewScroll);\n        }\n\n        if (!mDragViewScroll && !mViewMoveDisabled)\n        {\n            if (mViewScroll < 0.0f)\n                mViewScroll = Math::Lerp(mViewScroll, 0.0f, dt*mScrollBorderBounceCoef);\n\n\t\t\tfloat maxScroll = mDuration * mOneSecondDefaultSize * mSmoothViewZoom;\n            if (mViewScroll > maxScroll)\n                mViewScroll = Math::Lerp(mViewScroll, maxScroll, dt*mScrollBorderBounceCoef);\n        }\n\n        if (!Math::Equals(mViewScroll, mSmoothViewScroll, 0.0001f))\n        {\n            mSmoothViewScroll = Math::Lerp(mSmoothViewScroll, mViewScroll, dt*mScrollSmoothCoef);\n\n            if (mScrollBar)\n                mScrollBar->SetValueForcible(mSmoothViewScroll);\n        }\n\n        if (!Math::Equals(prevViewScroll, mSmoothViewScroll))\n            onViewChanged();\n    }\n\n    void AnimationTimeline::SetAnimation(const Ref<AnimationClip>& animation, const Ref<AnimationPlayer>& player /*= nullptr*/)\n    {\n        if (mAnimation)\n            mAnimation->onDurationChange -= THIS_FUNC(UpdateDuration);\n\n        mAnimation = animation;\n        mPlayer = player;\n\n        if (mAnimation)\n        {\n            mAnimation->onDurationChange += THIS_FUNC(UpdateDuration);\n            mViewZoom = Math::Clamp((layout->worldRight - layout->worldLeft)/mOneSecondDefaultSize/mAnimation->GetDuration(), mMinScale, mMaxScale);\n\n            UpdateDuration(mAnimation->GetDuration());\n        }        \n    }\n\n    void AnimationTimeline::UpdateDuration(float duration)\n    {\n        mDuration = duration;\n\n        if (mScrollBar)\n        {\n            mScrollBar->minValue = 0.0f;\n            mScrollBar->maxValue = mDuration*(mOneSecondDefaultSize*mViewZoom);\n            UpdateScrollBarHandleSize();\n        }\n    }\n\n    void AnimationTimeline::SetScroll(float scroll)\n    {\n        mSmoothViewScroll = scroll;\n    }\n\n    void AnimationTimeline::SetViewRange(float left, float right, bool force /*= true*/)\n    {\n        mViewZoom = (layout->worldRight - layout->worldLeft)/mOneSecondDefaultSize/(right - left);\n        mViewScroll = left*(mOneSecondDefaultSize*mViewZoom) + mScaleOffset;\n\n        if (force)\n        {\n            mSmoothViewScroll = mViewScroll;\n            mSmoothViewZoom = mViewZoom;\n        }\n    }\n\n    void AnimationTimeline::SetTimeCursor(float time)\n    {\n        mAnimationWindow->mDisableTimeTracking = true;\n        mTimeCursor = time;\n\n        if (mPlayer)\n        {\n            mPlayer->Stop();\n            mPlayer->SetTime(time);\n\n            o2EditorSceneScreen.NeedRedraw();\n        }\n\n        mAnimationWindow->mDisableTimeTracking = false;\n    }\n\n    float AnimationTimeline::GetTimeCursor() const\n    {\n        return mTimeCursor;\n    }\n\n    float AnimationTimeline::GetScroll() const\n    {\n        return mSmoothViewScroll;\n    }\n\n    void AnimationTimeline::SetScale(float scale)\n    {\n        mViewZoom = scale;\n    }\n\n    float AnimationTimeline::GetScale() const\n    {\n        return mViewZoom;\n    }\n\n    void AnimationTimeline::SetViewMoveDisabled(bool disabled)\n    {\n        mViewMoveDisabled = disabled;\n    }\n\n    const Ref<Text>& AnimationTimeline::GetText() const\n    {\n        return mText;\n    }\n\n    void AnimationTimeline::SetScrollBar(const Ref<HorizontalScrollBar>& scrollBar)\n    {\n        mScrollBar = scrollBar;\n        mScrollBar->onChangeByUser = [&](float value) { mViewScroll = value; };\n\n        AddChild(scrollBar);\n    }\n\n    const Ref<HorizontalScrollBar>& AnimationTimeline::GetScrollBar() const\n    {\n        return mScrollBar;\n    }\n\n    bool AnimationTimeline::IsSameTime(float timeA, float timeB, float threshold /*= 3.0f*/) const\n    {\n        return Math::Abs(LocalToWorld(timeA) - LocalToWorld(timeB)) <= threshold;\n    }\n\n    bool AnimationTimeline::IsUnderPoint(const Vec2F& point)\n    {\n        return Widget::IsUnderPoint(point);\n    }\n\n    bool AnimationTimeline::IsScrollable() const\n    {\n        return true;\n    }\n\n    bool AnimationTimeline::IsInputTransparent() const\n    {\n        return !mViewHasZoomed && !mDragViewScroll;\n    }\n\n    String AnimationTimeline::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AnimationTimeline>);\n// --- META ---\n\nDECLARE_CLASS(Editor::AnimationTimeline, Editor__AnimationTimeline);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/Timeline.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class HorizontalScrollBar;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AnimationWindow);\n\n    // ------------------------------------\n    // Draws time scale in animation window\n    // ------------------------------------\n    class AnimationTimeline : public Widget, public CursorAreaEventsListener\n    {\n    public:\n        Function<void()> onViewChanged; // Called when scroll or zoom were changed\n\n    public:\n        // Default constructor\n        AnimationTimeline(RefCounter* refCounter);\n\n        // Copy-constructor\n        AnimationTimeline(RefCounter* refCounter, const AnimationTimeline& other);\n\n        // Destructor\n        ~AnimationTimeline();\n\n        // Copy-operator\n        AnimationTimeline& operator=(const AnimationTimeline& other);\n\n        // Draws time scale and captions\n        void Draw() override;\n\n        // Updates as regular widget and changes zoom by mouse wheel\n        void Update(float dt) override;\n\n        // Sets animation. Subscribes on animation duration change, controls playing time\n        void SetAnimation(const Ref<AnimationClip>& animation, const Ref<AnimationPlayer>& player = nullptr);\n\n        // Sets current time scroll in seconds\n        void SetScroll(float scroll);\n\n        // Sets view range, left view border by left, and right border by right\n        void SetViewRange(float left, float right, bool force = true);\n\n        // Sets red time cursor\n        void SetTimeCursor(float time);\n\n        // Returns time of red cursor\n        float GetTimeCursor() const;\n\n        // Returns current time scroll in seconds\n        float GetScroll() const;\n\n        // Sets time scale zoom\n        void SetScale(float scale);\n\n        // Returns time scale zoom\n        float GetScale() const;\n\n        // Sets lock on zoom and scroll\n        void SetViewMoveDisabled(bool disabled);\n\n        // Converts local time to world x position\n        float LocalToWorld(float pos) const;\n\n        // Converts world x position to local time\n        float WorldToLocal(float pos) const;\n\n        // Returns captions text drawable\n        const Ref<Text>& GetText() const;\n\n        // Sets scrollbar widget, used for view scroll\n        void SetScrollBar(const Ref<HorizontalScrollBar>& scrollBar);\n\n        // Returns scrollbar widget, used for view scroll\n        const Ref<HorizontalScrollBar>& GetScrollBar() const;\n\n        // Checks is this timeA and timeB are same on screen. Dependent on zoom, thershold - max pixels distance on screen\n        bool IsSameTime(float timeA, float timeB, float threshold = 3.0f) const;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(AnimationTimeline);\n        CLONEABLE_REF(AnimationTimeline);\n\n    private:\n        const float mTextOffset = 12.0f;              // Text position offset from top border\n        const float mBigLineOffset = 13.0f;           // Big scale line offset from top border\n        const float mSmallLineOffset = 15.0f;         // Small scale line offset from top border\n        const float mOneSecondDefaultSize = 100.0f;   // One second with scale == 1 size in pixels\n        const float mPerfectScaleSegmentSize = 10.0f; // The perfect size of scale segment in pixels. Scale period and segment size will be chosen more suitable\n        const float mScaleOffset = 10.0f;             // First scale line offset from left border\n\n        const Color4 mBigLineColor = Color4(16, 20, 23, 64);   // Big scale line color\n        const Color4 mSmallLineColor = Color4(16, 20, 23, 38); // Small scale line color\n\n        const float mScaleSmoothLerpCoef = 10.0f; // Scale smooth animation coefficient. More is faster\n        const float mMinScale = 0.1f;             // Minimal view zoom \n        const float mMaxScale = 30.0f;            // Maximal view zoom\n        const float mScaleSense = 0.1f/120.0f;    // Mouse wheel scroll sense coefficient\n\n        const float mScrollSmoothCoef = 10.0f;        // Scroll smooth to target interpolation coefficient\n        const float mScrollSpeedDecreaseCoef = 10.0f; // Scroll speed decrease coefficient. More - speed decreasing faster\n        const float mScrollBorderBounceCoef = 10.0f;  // Smooth scroll bounds bounce coefficient\n\n    private:\n        Ref<AnimationWindow> mAnimationWindow; // Animation window\n\n        Ref<AnimationPlayer> mPlayer;    // Animation player\n        Ref<AnimationClip>   mAnimation; // Animation, used for sibscribing on duration change\n\n        float mTimeCursor = 0; // Current time of red cursor\n\n        float mSmoothViewScroll = 0.0f;          // Time scroll in seconds smoothed, tends to target value mViewScroll\n        float mViewScroll = 0.0f;                // Time scroll in seconds\n        bool  mDragViewScroll = false;           // It is true when user is dragging view with right button\n        float mBeginDragViewScrollOffset = 0.0f; // Offset from cursor to view scroll before starting drag\n\t\tfloat mBeginDragViewScroll = 0.0f;       // View scroll before starting drag\n        float mViewScrollSpeed = 0.0f;           // Speed of inertial scrolling, when user dragged view and released mouse\n\n        float mViewZoom = 1.0f;       // Time scale zoom\n        float mSmoothViewZoom = 1.0f; // Smoothed and animated time scale zoom\n        bool  mViewHasZoomed = false; // True when area has scrolled at this frame, resets to false on update\n\n        bool mViewMoveDisabled = false; // Is moving and zooming view disabled. It is disabling when editor has switched to curves edit mode\n\n        float mDuration = 0.0f; // Scale length in seconds\n\n        Ref<Font> mTextFont; // Captions font\n        Ref<Text> mText;     // Captions text\n\n        Ref<Sprite> mBeginMark; // Begin animation mark sprite. Begin is always at zero\n        Ref<Sprite> mEndMark;   // End animation mark sprite, at duration\n\n        Layout mBeginMarkLayout = Layout(Vec2F(0, 1), Vec2F(0, 1), Vec2F(-6.0f, 3.0f), Vec2F(6.0f, -21.0f));\n        Layout mEndMarkLayout = Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(-4.0f, 3.0f), Vec2F(6.0f, -21.0f));\n\n        Ref<HorizontalScrollBar> mScrollBar; // Scroll bar. Limited by animation duration\n\n        Ref<Sprite>           mTimeLine;           // Red time line\n        Ref<CursorEventsArea> mTimeLineEventsArea; // Top area events listeners, used for moving red line of time\n\n    private:\n        // Updates duration and scrollbars\n        void UpdateDuration(float duration);\n\n        // Draws time scale with scroll and zoom\n        void DrawTimeScale();\n\n        // Chooses well view of time scale by zoom\n        void ChooseScaleParams(int& bigLinePeriod, double& bigLineTimeAmount);\n\n        // Tracks user's right mouse button and updates scroll by speed\n        void UpdateScrolling(float dt);\n\n        // Tracks user's mouse wheel and updates view scroll\n        void UpdateZooming(float dt);\n\n        // Updates scroll bar handle size by view width\n        void UpdateScrollBarHandleSize();\n\n        // Called when transformation was changed and updated. Updates scroll bar handle size\n        void OnTransformUpdated() override;\n\n        // Sets animation time by cursor screen position\n        void SetAnimationTimeByCursor(const Input::Cursor& cursor);\n\n        // Called when right mouse button was pressed on this, begin scrolling\n        void OnCursorRightMousePressed(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button stay down on this, scrolling\n        void OnCursorRightMouseStayDown(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time), ends scrolling\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class AnimationWindow;\n\n        template<typename AnimationTrackType>\n        friend class KeyFramesTrackControl;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AnimationTimeline)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::CursorAreaEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationTimeline)\n{\n    FIELD().PUBLIC().NAME(onViewChanged);\n    FIELD().PRIVATE().DEFAULT_VALUE(12.0f).NAME(mTextOffset);\n    FIELD().PRIVATE().DEFAULT_VALUE(13.0f).NAME(mBigLineOffset);\n    FIELD().PRIVATE().DEFAULT_VALUE(15.0f).NAME(mSmallLineOffset);\n    FIELD().PRIVATE().DEFAULT_VALUE(100.0f).NAME(mOneSecondDefaultSize);\n    FIELD().PRIVATE().DEFAULT_VALUE(10.0f).NAME(mPerfectScaleSegmentSize);\n    FIELD().PRIVATE().DEFAULT_VALUE(10.0f).NAME(mScaleOffset);\n    FIELD().PRIVATE().DEFAULT_VALUE(Color4(16, 20, 23, 64)).NAME(mBigLineColor);\n    FIELD().PRIVATE().DEFAULT_VALUE(Color4(16, 20, 23, 38)).NAME(mSmallLineColor);\n    FIELD().PRIVATE().DEFAULT_VALUE(10.0f).NAME(mScaleSmoothLerpCoef);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.1f).NAME(mMinScale);\n    FIELD().PRIVATE().DEFAULT_VALUE(30.0f).NAME(mMaxScale);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.1f/120.0f).NAME(mScaleSense);\n    FIELD().PRIVATE().DEFAULT_VALUE(10.0f).NAME(mScrollSmoothCoef);\n    FIELD().PRIVATE().DEFAULT_VALUE(10.0f).NAME(mScrollSpeedDecreaseCoef);\n    FIELD().PRIVATE().DEFAULT_VALUE(10.0f).NAME(mScrollBorderBounceCoef);\n    FIELD().PRIVATE().NAME(mAnimationWindow);\n    FIELD().PRIVATE().NAME(mPlayer);\n    FIELD().PRIVATE().NAME(mAnimation);\n    FIELD().PRIVATE().DEFAULT_VALUE(0).NAME(mTimeCursor);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mSmoothViewScroll);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mViewScroll);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mDragViewScroll);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mBeginDragViewScrollOffset);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mBeginDragViewScroll);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mViewScrollSpeed);\n    FIELD().PRIVATE().DEFAULT_VALUE(1.0f).NAME(mViewZoom);\n    FIELD().PRIVATE().DEFAULT_VALUE(1.0f).NAME(mSmoothViewZoom);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mViewHasZoomed);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mViewMoveDisabled);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mDuration);\n    FIELD().PRIVATE().NAME(mTextFont);\n    FIELD().PRIVATE().NAME(mText);\n    FIELD().PRIVATE().NAME(mBeginMark);\n    FIELD().PRIVATE().NAME(mEndMark);\n    FIELD().PRIVATE().DEFAULT_VALUE(Layout(Vec2F(0, 1), Vec2F(0, 1), Vec2F(-6.0f, 3.0f), Vec2F(6.0f, -21.0f))).NAME(mBeginMarkLayout);\n    FIELD().PRIVATE().DEFAULT_VALUE(Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(-4.0f, 3.0f), Vec2F(6.0f, -21.0f))).NAME(mEndMarkLayout);\n    FIELD().PRIVATE().NAME(mScrollBar);\n    FIELD().PRIVATE().NAME(mTimeLine);\n    FIELD().PRIVATE().NAME(mTimeLineEventsArea);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationTimeline)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AnimationTimeline&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnimation, const Ref<AnimationClip>&, const Ref<AnimationPlayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScroll, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetViewRange, float, float, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTimeCursor, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetTimeCursor);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScroll);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScale, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScale);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetViewMoveDisabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(float, LocalToWorld, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, WorldToLocal, float);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Text>&, GetText);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScrollBar, const Ref<HorizontalScrollBar>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<HorizontalScrollBar>&, GetScrollBar);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSameTime, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateDuration, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, DrawTimeScale);\n    FUNCTION().PRIVATE().SIGNATURE(void, ChooseScaleParams, int&, double&);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateScrolling, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateZooming, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateScrollBarHandleSize);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PRIVATE().SIGNATURE(void, SetAnimationTimeByCursor, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorRightMousePressed, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorRightMouseStayDown, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnScrolled, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/AnimationKeyDragHandle.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n\n#include \"AnimationKeyDragHandle.h\"\n#include \"ITrackControl.h\"\n\nnamespace Editor\n{\n\n    AnimationKeyDragHandle::AnimationKeyDragHandle(RefCounter* refCounter):\n        WidgetDragHandle(refCounter)\n    {}\n\n    AnimationKeyDragHandle::AnimationKeyDragHandle(RefCounter* refCounter,\n                                                   const Ref<Sprite>& regular,\n                                                   const Ref<Sprite>& hover /*= nullptr*/,\n                                                   const Ref<Sprite>& pressed /*= nullptr*/, \n                                                   const Ref<Sprite>& selected /*= nullptr*/, \n                                                   const Ref<Sprite>& selectedHovered /*= nullptr*/, \n                                                   const Ref<Sprite>& selectedPressed /*= nullptr*/):\n        WidgetDragHandle(refCounter, regular, hover, pressed, selected, selectedHovered, selectedPressed)\n    {}\n\n    AnimationKeyDragHandle::AnimationKeyDragHandle(RefCounter* refCounter, const AnimationKeyDragHandle& other):\n        WidgetDragHandle(refCounter, other)\n    {}\n\n    AnimationKeyDragHandle::AnimationKeyDragHandle(const AnimationKeyDragHandle& other) :\n        AnimationKeyDragHandle(nullptr, other)\n    {}\n\n    AnimationKeyDragHandle::~AnimationKeyDragHandle()\n    {}\n\n#undef DrawText\n    void AnimationKeyDragHandle::Draw()\n    {\n        WidgetDragHandle::Draw();\n\n        //o2Debug.DrawText(GetScreenPosition(), String(mIsClipped));\n    }\n\n    String AnimationKeyDragHandle::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    Editor::AnimationKeyDragHandle& AnimationKeyDragHandle::operator=(const AnimationKeyDragHandle& other)\n    {\n        WidgetDragHandle::operator=(other);\n        return *this;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AnimationKeyDragHandle>);\n// --- META ---\n\nDECLARE_CLASS(Editor::AnimationKeyDragHandle, Editor__AnimationKeyDragHandle);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/AnimationKeyDragHandle.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/DragHandle.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    class ITrackControl;\n\n    class AnimationKeyDragHandle : public WidgetDragHandle\n    { \n    public:\n        String trackPath;\n\n        WeakRef<IAnimationTrack> track;\n        WeakRef<ITrackControl>   trackControl;\n\n        UInt64 keyUid = 0;\n\n        bool isMapping = false;\n\n    public:\n        // Default constructor\n        AnimationKeyDragHandle(RefCounter* refCounter);\n\n        // Constructor with views\n        AnimationKeyDragHandle(RefCounter* refCounter, const Ref<Sprite>& regular, const Ref<Sprite>& hover = nullptr, const Ref<Sprite>& pressed = nullptr,\n                               const Ref<Sprite>& selected = nullptr, const Ref<Sprite>& selectedHovered = nullptr,\n                               const Ref<Sprite>& selectedPressed = nullptr);\n\n        // Copy-constructor\n        AnimationKeyDragHandle(RefCounter* refCounter, const AnimationKeyDragHandle& other);\n\n        // Copy-constructor\n        AnimationKeyDragHandle(const AnimationKeyDragHandle& other);\n\n        // Destructor\n        ~AnimationKeyDragHandle();\n\n        // Copy-operator\n        AnimationKeyDragHandle& operator=(const AnimationKeyDragHandle& other);\n\n        // Draws handle\n        void Draw() override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(AnimationKeyDragHandle);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AnimationKeyDragHandle)\n{\n    BASE_CLASS(o2::WidgetDragHandle);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationKeyDragHandle)\n{\n    FIELD().PUBLIC().NAME(trackPath);\n    FIELD().PUBLIC().NAME(track);\n    FIELD().PUBLIC().NAME(trackControl);\n    FIELD().PUBLIC().DEFAULT_VALUE(0).NAME(keyUid);\n    FIELD().PUBLIC().DEFAULT_VALUE(false).NAME(isMapping);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationKeyDragHandle)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Ref<Sprite>&, const Ref<Sprite>&, const Ref<Sprite>&, const Ref<Sprite>&, const Ref<Sprite>&, const Ref<Sprite>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AnimationKeyDragHandle&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationKeyDragHandle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/AnimationTrackWrapper.h",
    "content": "#pragma once\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n#include \"o2/Animation/Tracks/AnimationVec2FTrack.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    template<typename TrackType>\n    struct AnimationTrackWrapper\n    {\n        typedef typename TrackType::Key KeyType;\n        typedef typename TrackType::ValueType ValueType;\n        typedef typename TrackType::Player TrackPlayerType;\n\n        static auto GetValue(TrackPlayerType& player) { return player.GetValue(); }\n        static auto GetValue(TrackType& track, float pos) { return track.GetValue(pos); }\n        static const Vector<KeyType>& GetKeys(TrackType& track) { return track.GetKeys(); }\n        static KeyType GetKey(TrackType& track, int idx) { return track.GetKeyAt(idx); }\n        static KeyType FindKey(TrackType& track, UInt64 uid) { return track.FindKey(uid); }\n        static int FindKeyIdx(TrackType& track, UInt64 uid) { return track.FindKeyIdx(uid); }\n        static void RemoveKeyAt(TrackType& track, int idx) { track.RemoveKeyAt(idx); }\n        static int AddKey(TrackType& track, const KeyType& key) { return track.AddKey(key); }\n    };\n\n    template<>\n    struct AnimationTrackWrapper<AnimationTrack<Vec2F>>\n    {\n        typedef Curve::Key KeyType;\n        typedef AnimationTrack<Vec2F> TrackType;\n        typedef float ValueType;\n        typedef typename AnimationTrack<Vec2F>::Player TrackPlayerType;\n\n        static auto GetValue(TrackPlayerType& player) \n        { \n            return DynamicCast<TrackType>(player.GetTrack())->timeCurve->Evaluate(player.GetTime());\n        }\n\n        static auto GetValue(TrackType& track, float pos) { return track.timeCurve->Evaluate(pos); }\n        static const Vector<KeyType>& GetKeys(TrackType& track) { return track.timeCurve->GetKeys(); }\n        static KeyType GetKey(TrackType& track, int idx) { return track.timeCurve->GetKeyAt(idx); }\n        static KeyType FindKey(TrackType& track, UInt64 uid) { return track.timeCurve->FindKey(uid); }\n        static int FindKeyIdx(TrackType& track, UInt64 uid) { return track.timeCurve->FindKeyIdx(uid); }\n        static void RemoveKeyAt(TrackType& track, int idx) { track.timeCurve->RemoveKeyAt(idx); }\n        static int AddKey(TrackType& track, const KeyType& key) { return track.timeCurve->InsertKey(key); }\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/ITrackControl.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ITrackControl.h\"\n\n#include \"o2Editor/Windows/AnimationWindow/KeyHandlesSheet.h\"\n#include \"o2Editor/Windows/AnimationWindow/Timeline.h\"\n\nnamespace Editor\n{\n\n    ITrackControl::ITrackControl(RefCounter* refCounter):\n        Widget(refCounter)\n    {}\n\n    ITrackControl::ITrackControl(RefCounter* refCounter, const ITrackControl& other):\n        Widget(refCounter, other)\n    {}\n\n    void ITrackControl::Initialize(const Ref<AnimationTimeline>& timeline, const Ref<KeyHandlesSheet>& handlesSheet)\n    {}\n\n    void ITrackControl::SetTrack(const Ref<IAnimationTrack>& track, const Ref<IAnimationTrack::IPlayer>& player, const String& path)\n    {}\n\n    void ITrackControl::UpdateHandles()\n    {}\n\n    Vector<Ref<ITrackControl::KeyHandle>> ITrackControl::GetKeyHandles() const\n    {\n        return {};\n    }\n\n    Ref<Widget> ITrackControl::GetTreePartControls() const\n    {\n        return nullptr;\n    }\n\n    void ITrackControl::SetCurveViewEnabled(bool enabled)\n    {}\n\n    void ITrackControl::SetCurveViewColor(const Color4& color)\n    {}\n\n    void ITrackControl::SetActive(bool active)\n    {}\n\n    void ITrackControl::InsertNewKey(float time)\n    {}\n\n    void ITrackControl::BeginKeysDrag()\n    {}\n\n    void ITrackControl::EndKeysDrag()\n    {}\n\n    void ITrackControl::SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime)\n    {}\n\n    UInt64 ITrackControl::DeserializeKey(const DataValue& data, float relativeTime, bool generateNewUid /*= true*/)\n    {\n        return 0;\n    }\n\n    void ITrackControl::DeleteKey(UInt64 keyUid)\n    {}\n\n    String ITrackControl::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    bool ITrackControl::KeyHandle::operator==(const KeyHandle& other) const\n    {\n        return handle == other.handle;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ITrackControl>);\n// --- META ---\n\nDECLARE_CLASS(Editor::ITrackControl, Editor__ITrackControl);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/ITrackControl.h",
    "content": "#pragma once\n\n#include \"AnimationKeyDragHandle.h\"\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AnimationTimeline);\n    FORWARD_CLASS_REF(KeyHandlesSheet);\n\n    class ITrackControl: public Widget\n    {\n    public:\n        struct KeyHandle: public RefCounterable\n        {\n            UInt64 keyUid = 0;\n\n            Ref<AnimationKeyDragHandle> handle = nullptr;\n\n        public:\n            KeyHandle() { }\n            KeyHandle(UInt64 keyUid, const Ref<AnimationKeyDragHandle>& handle): keyUid(keyUid), handle(handle) { }\n\n            bool operator==(const KeyHandle& other) const;\n        };\n\n    public:\n        // Default constructor\n        ITrackControl(RefCounter* refCounter);\n\n        // Copy-constructor\n        ITrackControl(RefCounter* refCounter, const ITrackControl& other);\n\n        // Sets timeline for calculating handles positions, and  handles sheet as selecting group for handles\n        virtual void Initialize(const Ref<AnimationTimeline>& timeline, const Ref<KeyHandlesSheet>& handlesSheet);\n\n        // Sets Animation track, updates and creates key handles\n        virtual void SetTrack(const Ref<IAnimationTrack>& track, const Ref<IAnimationTrack::IPlayer>& player, const String& path);\n\n        // Updates handles position on timeline\n        virtual void UpdateHandles();\n\n        // Returns key handles list\n        virtual Vector<Ref<KeyHandle>> GetKeyHandles() const;\n\n        // Returns a container of controllers that are part of a tree\n        virtual Ref<Widget> GetTreePartControls() const;\n\n        // Sets curves edit view mode\n        virtual void SetCurveViewEnabled(bool enabled);\n\n        // Sets curves view mode color\n        virtual void SetCurveViewColor(const Color4& color);\n\n        // Sets track active when user selects it\n        virtual void SetActive(bool active);\n\n        // Inserts new key at time\n        virtual void InsertNewKey(float time);\n\n        // Called when group of keys began drag\n        virtual void BeginKeysDrag();\n\n        // Called when group of keys completed drag\n        virtual void EndKeysDrag();\n\n        // Serialize key with specified uid into data node\n        virtual void SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime);\n\n        // Deserialize key from data node and paste on track, returns key uid\n        virtual UInt64 DeserializeKey(const DataValue& data, float relativeTime, bool generateNewUid = true);\n\n        // Removes key from track\n        virtual void DeleteKey(UInt64 keyUid);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(ITrackControl);\n        CLONEABLE_REF(ITrackControl);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ITrackControl)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ITrackControl)\n{\n}\nEND_META;\nCLASS_METHODS_META(Editor::ITrackControl)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ITrackControl&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize, const Ref<AnimationTimeline>&, const Ref<KeyHandlesSheet>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<IAnimationTrack>&, const Ref<IAnimationTrack::IPlayer>&, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateHandles);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<KeyHandle>>, GetKeyHandles);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetTreePartControls);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCurveViewEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCurveViewColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetActive, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertNewKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysDrag);\n    FUNCTION().PUBLIC().SIGNATURE(void, EndKeysDrag);\n    FUNCTION().PUBLIC().SIGNATURE(void, SerializeKey, UInt64, DataValue&, float);\n    FUNCTION().PUBLIC().SIGNATURE(UInt64, DeserializeKey, const DataValue&, float, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeleteKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/KeyFramesTrackControl.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"KeyFramesTrackControl.h\"\n\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(Editor::KeyFramesTrackControl<AnimationTrack<float>>, Editor__KeyFramesTrackControl_AnimationTrack_float__);\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(Editor::KeyFramesTrackControl<AnimationTrack<bool>>, Editor__KeyFramesTrackControl_AnimationTrack_bool__);\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(Editor::KeyFramesTrackControl<AnimationTrack<Color4>>, Editor__KeyFramesTrackControl_AnimationTrack_Color4__);\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(Editor::KeyFramesTrackControl<AnimationTrack<Vec2F>>, Editor__KeyFramesTrackControl_AnimationTrack_Vec2F__);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::KeyFramesTrackControl<AnimationTrack<float>>>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::KeyFramesTrackControl<AnimationTrack<bool>>>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::KeyFramesTrackControl<AnimationTrack<Color4>>>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::KeyFramesTrackControl<AnimationTrack<Vec2F>>>);\n\nnamespace Editor\n{\n    void DrawCurveInCoords(const ApproximationValue* points, int pointsCount, const RectF& pointsBounds, const Basis& drawBasis,\n                           const Color4& color)\n    {\n        const int bufferSize = 50;\n        static Vertex buffer[bufferSize];\n\n        if (pointsBounds.Height() < 0.001f)\n        {\n            o2Render.DrawAALine(Vec2F(0.0f, 0.5f)*drawBasis, Vec2F(1.0f, 0.5f)*drawBasis, color);\n            return;\n        }\n\n        Basis boundsBasis(pointsBounds);\n        Basis transform = boundsBasis.Inverted() * drawBasis;\n\n        for (int j = 0; j < pointsCount; j++)\n            buffer[j].Set(Vec2F(points[j].position, points[j].value)*transform, color.ABGR(), 0, 0);\n\n        o2Render.DrawAAPolyLine(buffer, pointsCount, 1.0f, LineType::Solid, false);\n    }\n\n    void DrawCenterCurveInCoords(const Vec2F* points, int pointsCount, const RectF& pointsBounds, const Basis& drawBasis,\n                                 const Color4& color)\n    {\n        const int bufferSize = 50;\n        static Vertex buffer[bufferSize];\n\n        Basis boundsBasis(pointsBounds);\n        Basis boundsBasisInv = boundsBasis.Inverted();\n        Basis newDrawBasis(drawBasis.origin + drawBasis.yv*0.5f, drawBasis.xv, drawBasis.yv);\n\n        for (int j = 0; j < pointsCount; j++)\n        {\n            Vec2F p = points[j] * boundsBasisInv;\n            p.y -= p.x;\n            buffer[j].Set(p * newDrawBasis, color.ABGR(), 0, 0);\n        }\n\n        o2Render.DrawAAPolyLine(buffer, pointsCount, 1.0f, LineType::Solid, false);\n    }\n\n    template<>\n    void KeyFramesTrackControl<AnimationTrack<float>>::SetCurveViewEnabled(bool enabled)\n    {\n        mAddKeyDotButton->enabled = enabled;\n        mAddKeyButton->enabled = !enabled;\n    }\n\n    template<>\n    void KeyFramesTrackControl<AnimationTrack<float>>::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        if (!mHandlesSheet.Lock()->enabled)\n            return;\n\n        OnDrawn();\n\n        auto timeline = mTimeline.Lock();\n        auto track = mTrack.Lock();\n\n        o2Render.EnableScissorTest(timeline->layout->GetWorldRect());\n\n        for (int i = 1; i < track->GetKeys().Count(); i++)\n        {\n            auto& key = track->GetKeys()[i];\n            auto& prevKey = track->GetKeys()[i - 1];\n\n            Basis drawCoords(RectF(timeline->LocalToWorld(prevKey.position) - 1,\n                                   layout->GetWorldTop() - 5,\n                                   timeline->LocalToWorld(key.position) - 1,\n                                   layout->GetWorldBottom() + 5));\n\n            DrawCurveInCoords(key.GetTopApproximatedPoints(), key.GetApproximatedPointsCount(),\n                              key.GetGetApproximatedPointsBounds(), drawCoords, Color4(44, 62, 80));\n        }\n\n        for (auto& handle : mHandles)\n            handle->handle->Draw();\n\n        o2Render.DisableScissorTest();\n\n        DrawDebugFrame();\n    }\n\n    template<>\n    void KeyFramesTrackControl<AnimationTrack<Color4>>::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        if (!mHandlesSheet.Lock()->enabled)\n            return;\n\n        OnDrawn();\n\n        auto timeline = mTimeline.Lock();\n        auto track = mTrack.Lock();\n\n        if (!track->GetKeys().IsEmpty())\n        {\n            static TextureRef chessBackTexture;\n            static Sprite chessBackSprite;\n            if (!chessBackTexture)\n            {\n                Color4 color1(1.0f, 1.0f, 1.0f, 1.0f), color2(0.7f, 0.7f, 0.7f, 1.0f);\n                Bitmap backLayerBitmap(PixelFormat::R8G8B8A8, Vec2I(16, 16));\n                backLayerBitmap.Fill(color1);\n                backLayerBitmap.FillRect(0, 8, 8, 0, color2);\n                backLayerBitmap.FillRect(8, 16, 16, 8, color2);\n                chessBackTexture = TextureRef(backLayerBitmap);\n                chessBackSprite = Sprite(chessBackTexture, RectI(0, 0, 16, 16));\n                chessBackSprite.mode = SpriteMode::Tiled;\n            }\n\n            chessBackSprite.SetRect(RectF(timeline->LocalToWorld(track->GetKeys()[0].position), layout->GetWorldTop() - 5,\n                                          timeline->LocalToWorld(track->GetKeys().Last().position), layout->GetWorldBottom() + 4));\n            chessBackSprite.Draw();\n\n            static Mesh mesh;\n            int verticies = track->GetKeys().Count()*2;\n            int polygons = (track->GetKeys().Count() - 1)*2;\n\n            if (mesh.GetMaxVertexCount() < (UInt)verticies)\n                mesh.Resize(verticies, polygons);\n\n            mesh.vertexCount = verticies;\n            mesh.polyCount = polygons;\n\n            o2Render.EnableScissorTest(timeline->layout->GetWorldRect());\n\n            Vertex* verts = mesh.GetVertices<Vertex>();\n            VertexIndex* idx = mesh.GetIndexes();\n            for (int i = 0; i < track->GetKeys().Count(); i++)\n            {\n                auto& key = track->GetKeys()[i];\n                float keyPos = timeline->LocalToWorld(key.position);\n                int nv = i*2;\n\n                verts[nv] = Vertex(keyPos, layout->GetWorldTop() - 5, key.value.ABGR(), 0, 0);\n                verts[nv + 1] = Vertex(keyPos, layout->GetWorldBottom() + 4, key.value.ABGR(), 0, 0);\n\n                if (i > 0)\n                {\n                    int np = (i - 1)*2;\n\n                    idx[np*3] = nv - 2;\n                    idx[np*3 + 1] = nv;\n                    idx[np*3 + 2] = nv - 1;\n                    idx[np*3 + 3] = nv;\n                    idx[np*3 + 4] = nv + 1;\n                    idx[np*3 + 5] = nv - 1;\n                }\n            }\n\n            mesh.Draw();\n        }\n\n        for (auto& handle : mHandles)\n            handle->handle->Draw();\n\n        o2Render.DisableScissorTest();\n\n        DrawDebugFrame();\n    }\n\n    template<>\n    void KeyFramesTrackControl<AnimationTrack<bool>>::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        if (!mHandlesSheet.Lock()->enabled)\n            return;\n\n        OnDrawn();\n\n        auto timeline = mTimeline.Lock();\n        auto track = mTrack.Lock();\n\n        if (!track->GetKeys().IsEmpty())\n        {\n\n            float lineOffset = 11;\n\n            static Mesh mesh;\n            int verticies = (track->GetKeys().Count() - 1)*4;\n            int polygons = (track->GetKeys().Count() - 1)*2;\n\n            if (mesh.GetMaxVertexCount() < (UInt)verticies)\n                mesh.Resize(verticies, polygons);\n\n            mesh.vertexCount = verticies;\n            mesh.polyCount = polygons;\n\n            o2Render.EnableScissorTest(timeline->layout->GetWorldRect());\n\n            Color4 trueColor(44, 62, 80);\n            Color4 falseColor(0, 0, 0, 0);\n\n            Vertex* verts = mesh.GetVertices<Vertex>();\n            VertexIndex* idx = mesh.GetIndexes();\n            for (int i = 1; i < track->GetKeys().Count(); i++)\n            {\n                auto& key = track->GetKeys()[i];\n                auto& prevKey = track->GetKeys()[i - 1];\n\n                float keyPos = timeline->LocalToWorld(key.position);\n                float prevKeyPos = timeline->LocalToWorld(prevKey.position);\n\n                int nv = (i - 1)*4;\n                int np = (i - 1)*2;\n\n                auto color = (prevKey.value ? trueColor : falseColor).ABGR();\n\n                verts[nv] = Vertex(prevKeyPos, layout->GetWorldTop() - lineOffset, color, 0, 0);\n                verts[nv + 1] = Vertex(keyPos, layout->GetWorldTop() - lineOffset, color, 0, 0);\n                verts[nv + 2] = Vertex(keyPos, layout->GetWorldBottom() + lineOffset, color, 0, 0);\n                verts[nv + 3] = Vertex(prevKeyPos, layout->GetWorldBottom() + lineOffset, color, 0, 0);\n\n                idx[np*3] = nv;\n                idx[np*3 + 1] = nv + 1;\n                idx[np*3 + 2] = nv + 2;\n                idx[np*3 + 3] = nv;\n                idx[np*3 + 4] = nv + 2;\n                idx[np*3 + 5] = nv + 3;\n            }\n\n            mesh.Draw();\n        }\n\n        for (auto& handle : mHandles)\n            handle->handle->Draw();\n\n        o2Render.DisableScissorTest();\n\n        DrawDebugFrame();\n    }\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/KeyFramesTrackControl.h",
    "content": "#pragma once\n\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationKeysActions.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Windows/AnimationWindow/KeyHandlesSheet.h\"\n#include \"o2Editor/Windows/AnimationWindow/Timeline.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/AnimationKeyDragHandle.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/AnimationTrackWrapper.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/ITrackControl.h\"\n#include \"o2Editor/Actions/ActionsList.h\"\n#include \"o2Editor/Properties/Properties.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // Draws curve by points transformed to basis\n    void DrawCurveInCoords(const ApproximationValue* points, int pointsCount, const RectF& pointsBounds, const Basis& drawBasis,\n                           const Color4& color);\n\n    // -------------------------------------------------\n    // Animation control track for key frames animations\n    // Creates handles for each keys and updates them\n    // -------------------------------------------------\n    template<typename AnimationTrackType>\n    class KeyFramesTrackControl : public ITrackControl\n    {\n    public:\n        // Default constructor\n        KeyFramesTrackControl(RefCounter* refCounter);\n\n        // Copy-constructor\n        KeyFramesTrackControl(RefCounter* refCounter, const KeyFramesTrackControl& other);\n\n        // Destructor\n        ~KeyFramesTrackControl();\n\n        // Copy-operator\n        KeyFramesTrackControl& operator=(const KeyFramesTrackControl& other);\n\n        // Draws handles with clipping\n        void Draw() override;\n\n        // Updates widget, checks value change\n        void Update(float dt) override;\n\n        // Sets Animation track, updates and creates key handles\n        void SetTrack(const Ref<IAnimationTrack>& track, const Ref<IAnimationTrack::IPlayer>& player, const String& path) override;\n\n        // Returns Animation track\n        Ref<AnimationTrackType> GetTrack() const;\n\n        // Sets timeline for calculating handles positions, and  handles sheet as selecting group for handles\n        void Initialize(const Ref<AnimationTimeline>& timeline, const Ref<KeyHandlesSheet>& handlesSheet) override;\n\n        // Updates handles position on timeline\n        void UpdateHandles() override;\n\n        // Returns key handles list\n        Vector<Ref<KeyHandle>> GetKeyHandles() const override;\n\n        // Returns a container of controllers that are part of a tree\n        Ref<Widget> GetTreePartControls() const override;\n\n        // Sets curves edit view mode\n        void SetCurveViewEnabled(bool enabled) override;\n\n        // Sets curves view mode color\n        void SetCurveViewColor(const Color4& color) override;\n\n        // Serialize key with specified uid into data node\n        void SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime) override;\n\n        // Deserialize key from data node and paste on track\n        UInt64 DeserializeKey(const DataValue& data, float relativeTime, bool generateNewUid = true) override;\n\n        // Removes key from track\n        void DeleteKey(UInt64 keyUid) override;\n\n        // Inserts new key at time\n        void InsertNewKey(float time) override;\n\n        SERIALIZABLE(KeyFramesTrackControl<AnimationTrackType>);\n        CLONEABLE_REF(KeyFramesTrackControl<AnimationTrackType>);\n\n    protected:\n        typedef AnimationTrackWrapper<AnimationTrackType> Wrapper;\n        typedef typename Wrapper::TrackPlayerType         TrackPlayerType;\n        typedef typename Wrapper::ValueType               TrackValueType;\n\n        Vector<Ref<KeyHandle>> mHandles; // List of handles, each for keys\n\n        String mTrackPath; // Path to Animation track in animation\n\n        Ref<Widget> mTreeControls; // Container of controllers that are part of a tree\n\n        Ref<IPropertyField>                    mPropertyField;\n        TrackValueType                         mPropertyValue = TrackValueType();\n        Ref<PointerValueProxy<TrackValueType>> mPropertyValueProxy;\n\n        Ref<Button> mAddKeyDotButton; // Dot add key button colored with curve color\n        Ref<Button> mAddKeyButton;    // Add key button, enables when available to add new key\n\n        TrackValueType mLastValue = TrackValueType();\n\n        WeakRef<AnimationTrackType> mTrack;         // Editing Animation track\n        WeakRef<TrackPlayerType>    mPlayer;        // Track player\n        WeakRef<AnimationTimeline>  mTimeline;      // Time line used for calculating handles positions\n        WeakRef<KeyHandlesSheet>    mHandlesSheet;  // Handles sheet, used for drawing and managing drag handles\n\n        bool mDisableHandlesUpdate = false;  // It is true when handles are changing and combining or updating is not available\n\n    private:\n        // Initializes controls\n        void InitializeControls();\n\n        // Initializes handles\n        void InitializeHandles();\n\n        // Called when track was set\n        virtual void OnSetTrack() {}\n\n        // Called when keys were changed\n        virtual void OnKeysChanged() {}\n\n        // Creates handle\n        Ref<AnimationKeyDragHandle> CreateHandle();\n\n        // Checks if new key can be created at time. If there is a key at time, button is disabled.\n        void CheckCanCreateKey(float time);\n\n        // Called when property was changed, adds new key\n        void OnPropertyChanged();\n    };\n\n    template<typename AnimationTrackType>\n    KeyFramesTrackControl<AnimationTrackType>::KeyFramesTrackControl(RefCounter* refCounter) :\n        ITrackControl(refCounter)\n    {\n        InitializeControls();\n    }\n\n    template<typename AnimationTrackType>\n    KeyFramesTrackControl<AnimationTrackType>::KeyFramesTrackControl(RefCounter* refCounter, const KeyFramesTrackControl& other) :\n        ITrackControl(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    template<typename AnimationTrackType>\n    KeyFramesTrackControl<AnimationTrackType>::~KeyFramesTrackControl()\n    {\n        if (mTrack)\n            mTrack.Lock()->onKeysChanged -= THIS_FUNC(UpdateHandles);\n\n        if (mPlayer)\n            mPlayer.Lock()->onUpdate -= THIS_FUNC(CheckCanCreateKey);\n    }\n\n    template<typename AnimationTrackType>\n    KeyFramesTrackControl<AnimationTrackType>& KeyFramesTrackControl<AnimationTrackType>::operator=(const KeyFramesTrackControl& other)\n    {\n        Widget::operator=(other);\n        return *this;\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        if (!mHandlesSheet.Lock()->enabled)\n            return;\n\n        o2Render.EnableScissorTest(mTimeline.Lock()->layout->GetWorldRect());\n\n        for (auto& handle : mHandles)\n            handle->handle->Draw();\n\n        o2Render.DisableScissorTest();\n\n        OnDrawn();\n        DrawDebugFrame();\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::Update(float dt)\n    {\n        Widget::Update(dt);\n\n        if (mPlayer)\n        {\n            auto playerValue = Wrapper::GetValue(*mPlayer.Lock());\n            if (!Math::Equals(mLastValue, playerValue)) \n            {\n                mPropertyValue = playerValue;\n                mLastValue = mPropertyValue;\n                mPropertyField->Refresh();\n            }\n        }\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::SetTrack(const Ref<IAnimationTrack>& track, const Ref<IAnimationTrack::IPlayer>& player, const String& path)\n    {\n        mTrackPath = path;\n\n        if (mTrack)\n            mTrack.Lock()->onKeysChanged -= THIS_FUNC(UpdateHandles);\n\n        if (mPlayer)\n            mPlayer.Lock()->onUpdate -= THIS_FUNC(CheckCanCreateKey);\n\n        mTrack = DynamicCast<AnimationTrackType>(track);\n        mPlayer = DynamicCast<TrackPlayerType>(player);\n\n        if (mTrack)\n            mTrack.Lock()->onKeysChanged += THIS_FUNC(UpdateHandles);\n\n        if (mPlayer)\n            mPlayer.Lock()->onUpdate += THIS_FUNC(CheckCanCreateKey);\n\n        InitializeHandles();\n        CheckCanCreateKey(mTimeline.Lock()->GetTimeCursor());\n\n        OnSetTrack();\n    }\n\n    template<typename AnimationTrackType>\n    Ref<AnimationTrackType> KeyFramesTrackControl<AnimationTrackType>::GetTrack() const\n    {\n        return mTrack.Lock();\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::Initialize(const Ref<AnimationTimeline>& timeline, const Ref<KeyHandlesSheet>& handlesSheet)\n    {\n        mTimeline = timeline;\n        mHandlesSheet = handlesSheet;\n    }\n\n    template<typename AnimationTrackType>\n    Vector<Ref<ITrackControl::KeyHandle>> KeyFramesTrackControl<AnimationTrackType>::GetKeyHandles() const\n    {\n        return mHandles;\n    }\n\n    template<typename AnimationTrackType>\n    Ref<Widget> KeyFramesTrackControl<AnimationTrackType>::GetTreePartControls() const\n    {\n        return mTreeControls;\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::SetCurveViewColor(const Color4& color)\n    {\n        mAddKeyDotButton->GetLayerDrawable<Sprite>(\"basic/regularBack\")->SetColor(color);\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::SetCurveViewEnabled(bool enabled)\n    {}\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::InitializeControls()\n    {\n        mTreeControls = mmake<Widget>();\n\n        auto fieldProto = o2EditorProperties.GetFieldPropertyType(&TypeOf(TrackValueType));\n        mPropertyField = DynamicCast<IPropertyField>(o2UI.CreateWidget(*fieldProto, \"standard\"));\n        mPropertyValueProxy = mmake<PointerValueProxy<TrackValueType>>(&mPropertyValue);\n        mPropertyField->SetValueProxy({ DynamicCast<IAbstractValueProxy>(mPropertyValueProxy) });\n        mPropertyField->onChanged = [&](const Ref<IPropertyField>& field, bool byUser) { if (byUser) OnPropertyChanged(); };\n        *mPropertyField->layout = WidgetLayout::BothStretch(0, 0, 20, 0);\n\n        mAddKeyButton = o2UI.CreateWidget<Button>(\"add key\");\n        *mAddKeyButton->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F());\n        mAddKeyButton->onClick = [&]() { InsertNewKey(mTimeline.Lock()->GetTimeCursor()); };\n\n        mAddKeyDotButton = o2UI.CreateWidget<Button>(\"add dot key\");\n        *mAddKeyDotButton->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(0, 0));\n        mAddKeyDotButton->GetLayerDrawable<Sprite>(\"basic/regularBack\")->SetColor(Color4::Black());\n        mAddKeyDotButton->onClick = [&]() { InsertNewKey(mTimeline.Lock()->GetTimeCursor()); };\n        mAddKeyDotButton->enabled = false;\n\n        mTreeControls->AddChildren({ mPropertyField, mAddKeyButton, mAddKeyDotButton });\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::InitializeHandles()\n    {\n        PushEditorScopeOnStack scope;\n\n        Vector<UInt64> selectedHandles;\n        for (auto& keyHandle : mHandles) \n        {\n            if (keyHandle->handle->IsSelected())\n                selectedHandles.Add(keyHandle->keyUid);\n        }\n\n        Vector<Ref<AnimationKeyDragHandle>> handlesCache = mHandles.Convert<Ref<AnimationKeyDragHandle>>(\n            [&](const Ref<KeyHandle>& x) \n            {\n                x->handle->SetParent(nullptr);\n                x->handle->SetEnabled(false);\n                x->handle->SetSelectionGroup(nullptr);\n                x->handle->SetSelected(false);\n                x->handle->onChangedPos.Clear();\n                return x->handle;\n            });\n\n        mHandles.Clear();\n\n        auto trackRef = mTrack.Lock();\n        auto handlesSheet = mHandlesSheet.Lock();\n\n        for (auto& key : Wrapper::GetKeys(*trackRef))\n        {\n            Ref<AnimationKeyDragHandle> handle;\n\n            if (!handlesCache.IsEmpty())\n                handle = handlesCache.PopBack();\n            else\n                handle = CreateHandle();\n\n            handle->SetEnabled(true);\n            handle->SetPosition(Vec2F(key.position, 0.0f));\n            handle->track = trackRef;\n            handle->trackPath = mTrackPath;\n            handle->trackControl = Ref(this);\n            handle->keyUid = key.uid;\n            handle->isMapping = false;\n            handle->SetSelectionGroup(DynamicCast<ISelectableDragHandlesGroup>(handlesSheet));\n            handle->SetSelected(selectedHandles.Contains(key.uid));\n\n            AddChild(handle);\n\n            auto keyhandle = mmake<KeyHandle>(key.uid, handle);\n            mHandles.Add(keyhandle);\n\n            handle->onChangedPos = [=](const Vec2F& pos) \n            {\n                mDisableHandlesUpdate = true;\n\n                int keyIdx = Wrapper::FindKeyIdx(*trackRef, keyhandle->keyUid);\n                auto key = Wrapper::GetKeys(*trackRef)[keyIdx];\n                key.position = pos.x;\n\n                Wrapper::RemoveKeyAt(*trackRef, keyIdx);\n                Wrapper::AddKey(*trackRef, key);\n\n                mDisableHandlesUpdate = false;\n            };\n        }\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::UpdateHandles()\n    {\n        if (!mTrack)\n            return;\n\n        if (mDisableHandlesUpdate)\n            return;\n\n        auto track = mTrack.Lock();\n\n        if (Wrapper::GetKeys(*track).Count() != mHandles.Count())\n        {\n            InitializeHandles();\n        }\n        else \n        {\n            for (auto& keyHandle : mHandles)\n                keyHandle->handle->SetPosition(Vec2F(Wrapper::FindKey(*track, keyHandle->keyUid).position, 0.0f));\n        }\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::CheckCanCreateKey(float time)\n    {\n        auto timeline = mTimeline.Lock();\n        auto track = mTrack.Lock();\n\n        time = timeline->GetTimeCursor();\n\n        bool hasKeyAtTime = false;\n        for (auto& key : Wrapper::GetKeys(*track))\n        {\n            if (timeline->IsSameTime(key.position, time))\n            {\n                hasKeyAtTime = true;\n                break;\n            }\n        }\n\n        mAddKeyButton->SetInteractable(!hasKeyAtTime);\n    }\n\n    template<typename AnimationTrackType>\n    Ref<AnimationKeyDragHandle> KeyFramesTrackControl<AnimationTrackType>::CreateHandle()\n    {\n        auto handle = mmake<AnimationKeyDragHandle>(mmake<Sprite>(\"ui/UI4_key.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_key_hover.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_key_pressed.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_selected_key.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_selected_key_hover.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_selected_key_pressed.png\"));\n\n        handle->cursorType = CursorType::SizeWE;\n        handle->pixelPerfect = true;\n        handle->SetDrawablesSizePivot(Vec2F(4, 1));\n\n        handle->checkPositionFunc = [&](const Vec2F& pos)\n            {\n                float position = pos.x;\n                if (position < 0.0f)\n                    position = 0.0f;\n\n                return Vec2F(position, layout->GetHeight() * 0.5f);\n            };\n\n        handle->localToWidgetOffsetTransformFunc = [&](const Vec2F& pos)\n            {\n                float worldXPos = mTimeline.Lock()->LocalToWorld(pos.x);\n                float localXPos = worldXPos - layout->GetWorldLeft();\n\n                return Vec2F(localXPos, 0);\n            };\n\n        handle->widgetOffsetToLocalTransformFunc = [&](const Vec2F& pos)\n            {\n                float worldXPos = layout->GetWorldLeft() + pos.x;\n                float localXPos = mTimeline.Lock()->WorldToLocal(worldXPos);\n\n                return Vec2F(localXPos, 0);\n            };\n\n        return handle;\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::InsertNewKey(float time)\n    {\n        auto handlesSheet = mHandlesSheet.Lock();\n        auto track = mTrack.Lock();\n\n        typename Wrapper::KeyType key;\n        key.position = time;\n\n        if (!Wrapper::GetKeys(*track).IsEmpty())\n            key.value = Wrapper::GetValue(*track, time);\n        else\n            key.value = mPropertyValue;\n\n        int idx = Wrapper::AddKey(*track, key);\n\n        InitializeHandles();\n        mTimeline.Lock()->SetTimeCursor(time);\n\n        OnKeysChanged();\n\n        DataDocument keyData;\n        Map<String, Vector<UInt64>> keys = { { mTrackPath, { Wrapper::GetKey(*track, idx).uid } } };\n        handlesSheet->SerializeKeys(keyData, keys, 0);\n        handlesSheet->mAnimationWindow.Lock()->DoneAction(mmake<AnimationAddKeysAction>(keys, keyData, handlesSheet));\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::OnPropertyChanged()\n    {\n        auto trackRef = mTrack.Lock();\n\t\tauto timeline = mTimeline.Lock();\n\n        auto time = timeline->GetTimeCursor();\n        int keyIdx = -1;\n        int i = 0;\n        for (auto& key : Wrapper::GetKeys(*trackRef))\n        {\n            if (timeline->IsSameTime(key.position, time))\n            {\n                keyIdx = i;\n                break;\n            }\n\n            i++;\n        }\n\n        if (keyIdx >= 0) {\n            auto key = Wrapper::GetKeys(*trackRef)[keyIdx];\n            Wrapper::RemoveKeyAt(*trackRef, keyIdx);\n            key.value = mPropertyValue;\n            Wrapper::AddKey(*trackRef, key);\n        }\n        else \n        {\n            typename Wrapper::KeyType key;\n            key.position = time;\n            key.value = mPropertyValue;\n            Wrapper::AddKey(*trackRef, key);\n            InitializeHandles();\n        }\n\n\t\ttimeline->SetTimeCursor(time);\n\n        OnKeysChanged();\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime)\n    {\n        auto key = Wrapper::FindKey(*mTrack.Lock(), keyUid);\n        key.position -= relativeTime;\n        data.Set(key);\n    }\n\n    template<typename AnimationTrackType>\n    UInt64 KeyFramesTrackControl<AnimationTrackType>::DeserializeKey(const DataValue& data, float relativeTime,\n                                                                     bool generateNewUid /*= true*/)\n    {\n        typename Wrapper::KeyType key;\n        data.Get(key);\n        key.position += relativeTime;\n\n        if (generateNewUid)\n            key.uid = Math::Random();\n\n        Wrapper::AddKey(*mTrack.Lock(), key);\n\n        return key.uid;\n    }\n\n    template<typename AnimationTrackType>\n    void KeyFramesTrackControl<AnimationTrackType>::DeleteKey(UInt64 keyUid)\n    {\n        auto trackRef = mTrack.Lock();\n\n        int idx = Wrapper::FindKeyIdx(*trackRef, keyUid);\n        if (idx >= 0)\n            Wrapper::RemoveKeyAt(*trackRef, idx);\n    }\n\n}\n// --- META ---\n\nMETA_TEMPLATES(typename AnimationTrackType)\nCLASS_BASES_META(Editor::KeyFramesTrackControl<AnimationTrackType>)\n{\n    BASE_CLASS(Editor::ITrackControl);\n}\nEND_META;\nMETA_TEMPLATES(typename AnimationTrackType)\nCLASS_FIELDS_META(Editor::KeyFramesTrackControl<AnimationTrackType>)\n{\n    FIELD().PROTECTED().NAME(mHandles);\n    FIELD().PROTECTED().NAME(mTrackPath);\n    FIELD().PROTECTED().NAME(mTreeControls);\n    FIELD().PROTECTED().NAME(mPropertyField);\n    FIELD().PROTECTED().DEFAULT_VALUE(TrackValueType()).NAME(mPropertyValue);\n    FIELD().PROTECTED().NAME(mPropertyValueProxy);\n    FIELD().PROTECTED().NAME(mAddKeyDotButton);\n    FIELD().PROTECTED().NAME(mAddKeyButton);\n    FIELD().PROTECTED().DEFAULT_VALUE(TrackValueType()).NAME(mLastValue);\n    FIELD().PROTECTED().NAME(mTrack);\n    FIELD().PROTECTED().NAME(mPlayer);\n    FIELD().PROTECTED().NAME(mTimeline);\n    FIELD().PROTECTED().NAME(mHandlesSheet);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mDisableHandlesUpdate);\n}\nEND_META;\nMETA_TEMPLATES(typename AnimationTrackType)\nCLASS_METHODS_META(Editor::KeyFramesTrackControl<AnimationTrackType>)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const KeyFramesTrackControl&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<IAnimationTrack>&, const Ref<IAnimationTrack::IPlayer>&, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationTrackType>, GetTrack);\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize, const Ref<AnimationTimeline>&, const Ref<KeyHandlesSheet>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateHandles);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<KeyHandle>>, GetKeyHandles);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetTreePartControls);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCurveViewEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCurveViewColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SerializeKey, UInt64, DataValue&, float);\n    FUNCTION().PUBLIC().SIGNATURE(UInt64, DeserializeKey, const DataValue&, float, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeleteKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertNewKey, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeControls);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeHandles);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnSetTrack);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnKeysChanged);\n    FUNCTION().PRIVATE().SIGNATURE(Ref<AnimationKeyDragHandle>, CreateHandle);\n    FUNCTION().PRIVATE().SIGNATURE(void, CheckCanCreateKey, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnPropertyChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/MapKeyFramesTrackControl.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"MapKeyFramesTrackControl.h\"\n\n#include \"o2/Scene/ActorTransform.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2Editor/Windows/AnimationWindow/KeyHandlesSheet.h\"\n\nnamespace Editor\n{\n    MapKeyFramesTrackControl::MapKeyFramesTrackControl(RefCounter* refCounter) :\n        ITrackControl(refCounter)\n    {}\n\n    MapKeyFramesTrackControl::MapKeyFramesTrackControl(RefCounter* refCounter, const MapKeyFramesTrackControl& other) :\n        ITrackControl(refCounter, other)\n    {}\n\n    MapKeyFramesTrackControl::~MapKeyFramesTrackControl()\n    {}\n\n    MapKeyFramesTrackControl& MapKeyFramesTrackControl::operator=(const MapKeyFramesTrackControl& other)\n    {\n        Widget::operator=(other);\n        return *this;\n    }\n\n#undef DrawText\n    void MapKeyFramesTrackControl::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        if (!mHandlesSheet.Lock()->enabled)\n            return;\n\n        OnDrawn();\n\n        o2Render.EnableScissorTest(mTimeline.Lock()->layout->GetWorldRect());\n\n        for (auto& child : mChildrenInheritedDepth)\n            child->Draw();\n\n        o2Render.DisableScissorTest();\n\n        DrawDebugFrame();\n    }\n\n    void MapKeyFramesTrackControl::SetMappedTracks(const AnimationTree::TrackNode& valueNode)\n    {\n        CacheHandles();\n        mTracks.Clear();\n\n        InitializeNodeHandles(valueNode);\n    }\n\n    void MapKeyFramesTrackControl::Initialize(const Ref<AnimationTimeline>& timeline, const Ref<KeyHandlesSheet>& handlesSheet)\n    {\n        mTimeline = timeline;\n        mHandlesSheet = handlesSheet;\n    }\n\n    void MapKeyFramesTrackControl::CacheHandles()\n    {\n        for (auto& kv : mHandlesGroups)\n            kv.second->CacheHandles();\n\n        mHandlesGroups.Clear();\n    }\n\n    void MapKeyFramesTrackControl::InitializeNodeHandles(const AnimationTree::TrackNode& valueNode)\n    {\n        if (valueNode.track)\n        {\n            Ref<IHandlesGroup> newGroup;\n\n            if (auto animatedValue = DynamicCast<AnimationTrack<float>>(valueNode.track))\n                newGroup = mmake<HandlesGroup<AnimationTrack<float>>>();\n            else if (auto animatedValue = DynamicCast<AnimationTrack<bool>>(valueNode.track))\n                newGroup = mmake<HandlesGroup<AnimationTrack<bool>>>();\n            else if (auto animatedValue = DynamicCast<AnimationTrack<Vec2F>>(valueNode.track))\n                newGroup = mmake<HandlesGroup<AnimationTrack<Vec2F>>>();\n            else if (auto animatedValue = DynamicCast<AnimationTrack<Color4>>(valueNode.track))\n                newGroup = mmake<HandlesGroup<AnimationTrack<Color4>>>();\n\n            if (newGroup)\n            {\n                newGroup->trackControl = Ref(this);\n                newGroup->InitializeHandles(valueNode.track, valueNode.path);\n\n                mHandlesGroups.Add(valueNode.track, newGroup);\n            }\n        }\n\n        for (auto& childNode : valueNode.children)\n            InitializeNodeHandles(*childNode);\n    }\n\n    void MapKeyFramesTrackControl::UpdateHandles()\n    {\n        if (mDisableHandlesUpdate)\n            return;\n\n        for (auto& kv : mHandlesGroups)\n            kv.second->UpdateHandles();\n    }\n\n    void MapKeyFramesTrackControl::SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime)\n    {\n        for (auto& kv : mHandlesGroups)\n        {\n            if (kv.second->SerializeKey(keyUid, data, relativeTime))\n                break;\n        }\n    }\n\n    Vector<Ref<ITrackControl::KeyHandle>> MapKeyFramesTrackControl::GetKeyHandles() const\n    {\n        Vector<Ref<ITrackControl::KeyHandle>> res;\n        for (auto& kv : mHandlesGroups) {\n            res.Add(DynamicCastVector<ITrackControl::KeyHandle>(kv.second->handles));\n        }\n\n        return res;\n    }\n\n    void MapKeyFramesTrackControl::DeleteKey(UInt64 keyUid)\n    {\n        for (auto& kv : mHandlesGroups)\n            kv.second->DeleteKey(keyUid);\n    }\n\n    void MapKeyFramesTrackControl::UpdateHandlesForTrack(const Ref<IAnimationTrack>& animatedValue)\n    {\n        if (mHandlesGroups.ContainsKey(animatedValue))\n            mHandlesGroups[animatedValue]->UpdateHandles();\n    }\n\n    void MapKeyFramesTrackControl::BeginKeysDrag()\n    {}\n\n    void MapKeyFramesTrackControl::EndKeysDrag()\n    {}\n\n    Ref<AnimationKeyDragHandle> MapKeyFramesTrackControl::CreateHandle()\n    {\n        auto handle = mmake<AnimationKeyDragHandle>(mmake<Sprite>(\"ui/UI4_map_key.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_map_key_hover.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_map_key_pressed.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_selected_map_key.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_selected_map_key_hover.png\"),\n                                                    mmake<Sprite>(\"ui/UI4_selected_map_key_pressed.png\"));\n\n        handle->cursorType = CursorType::SizeWE;\n        handle->pixelPerfect = true;\n        handle->SetDrawablesSizePivot(Vec2F(4, 1));\n\n        handle->checkPositionFunc = [&](const Vec2F& pos) {\n            float position = pos.x;\n            if (position < 0.0f)\n                position = 0.0f;\n\n            return Vec2F(position, layout->GetHeight()*0.5f);\n        };\n\n        handle->localToWidgetOffsetTransformFunc = [&](const Vec2F& pos) {\n            float worldXPos = mTimeline.Lock()->LocalToWorld(pos.x);\n            float localXPos = worldXPos - layout->GetWorldLeft();\n\n            return Vec2F(localXPos, 0);\n        };\n\n        handle->widgetOffsetToLocalTransformFunc = [&](const Vec2F& pos) {\n            float worldXPos = layout->GetWorldLeft() + pos.x;\n            float localXPos = mTimeline.Lock()->WorldToLocal(worldXPos);\n\n            return Vec2F(localXPos, 0);\n        };\n\n        return handle;\n    }\n\n    Vector<Ref<MapKeyFramesTrackControl::KeyHandle>> MapKeyFramesTrackControl::FindHandlesAtPosition(float position) const\n    {\n        Vector<Ref<KeyHandle>> res;\n\n        auto timeline = mTimeline.Lock();\n        for (auto& kv : mHandlesGroups)\n        {\n            for (auto& keyHandle : kv.second->handles)\n            {\n                if (timeline->IsSameTime(keyHandle->handle->GetPosition().x, position))\n                    res.Add(keyHandle);\n            }\n        }\n\n        return res;\n    }\n\n    MapKeyFramesTrackControl::KeyHandle::KeyHandle()\n    {}\n\n    MapKeyFramesTrackControl::KeyHandle::KeyHandle(UInt64 keyUid, const Ref<AnimationKeyDragHandle>& handle, \n                                                   const Ref<IAnimationTrack>& track,\n                                                   const Function<void(KeyHandle& keyHandle)>& updateFunc) :\n        ITrackControl::KeyHandle(keyUid, handle), track(track), updateFunc(updateFunc)\n    {}\n\n    bool MapKeyFramesTrackControl::KeyHandle::operator==(const KeyHandle& other) const\n    {\n        return handle == other.handle;\n    }\n\n    MapKeyFramesTrackControl::IHandlesGroup::~IHandlesGroup()\n    {}\n\n    void MapKeyFramesTrackControl::IHandlesGroup::CacheHandles()\n    {\n        auto trackControlRef = trackControl.Lock();\n\n        for (auto& keyHandle : handles)\n        {\n            keyHandle->handle->SetParent(nullptr);\n            keyHandle->handle->SetEnabled(false);\n            keyHandle->handle->SetSelected(false);\n            keyHandle->handle->SetSelectionGroup(nullptr);\n            trackControlRef->mHandlesCache.Add(keyHandle->handle);\n        }\n\n        handles.clear();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::MapKeyFramesTrackControl>);\n// --- META ---\n\nDECLARE_CLASS(Editor::MapKeyFramesTrackControl, Editor__MapKeyFramesTrackControl);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/MapKeyFramesTrackControl.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/AnimationWindow/Timeline.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/ITrackControl.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/AnimationTrackWrapper.h\"\n#include \"o2Editor/Windows/AnimationWindow/Tree.h\"\n#include \"o2Editor/Windows/AnimationWindow/KeyHandlesSheet.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // ---------------------------------------------------------------------\n    // Animation control track for mapped keys from children Animation tracks\n    // ---------------------------------------------------------------------\n    class MapKeyFramesTrackControl : public ITrackControl\n    {\n    public:\n        // Default constructor\n        MapKeyFramesTrackControl(RefCounter* refCounter);\n\n        // Copy-constructor\n        MapKeyFramesTrackControl(RefCounter* refCounter, const MapKeyFramesTrackControl& other);\n\n        // Destructor\n        ~MapKeyFramesTrackControl();\n\n        // Copy-operator\n        MapKeyFramesTrackControl& operator=(const MapKeyFramesTrackControl& other);\n\n        // Sets timeline for calculating handles positions, and  handles sheet as selecting group for handles\n        void Initialize(const Ref<AnimationTimeline>& timeline, const Ref<KeyHandlesSheet>& handlesSheet) override;\n\n        // Draws handles with clipping\n        void Draw() override;\n\n        // Updates handles position on timeline\n        void UpdateHandles() override;\n\n        // Serialize key with specified uid into data node\n        void SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime) override;\n\n        // Returns key handles list\n        Vector<Ref<ITrackControl::KeyHandle>> GetKeyHandles() const override;\n\n        // Removes key from track\n        void DeleteKey(UInt64 keyUid) override;\n\n        // Sets mapped Animation tracks. Creates handles\n        void SetMappedTracks(const AnimationTree::TrackNode& valueNode);\n\n        // Updates handles positions for specified Animation track\n        void UpdateHandlesForTrack(const Ref<IAnimationTrack>& track);\n\n        // Called when group of keys began dragged, disables keys combining\n        void BeginKeysDrag() override;\n\n        // Called when group of keys completed drag, enables keys combining\n        void EndKeysDrag() override;\n\n        SERIALIZABLE(MapKeyFramesTrackControl);\n        CLONEABLE_REF(MapKeyFramesTrackControl);\n\n    private:\n        struct KeyHandle : public ITrackControl::KeyHandle\n        {\n            WeakRef<IAnimationTrack> track;\n\n            Function<void(KeyHandle& keyHandle)> updateFunc;\n\n        public:\n            KeyHandle();\n            KeyHandle(UInt64 keyUid, const Ref<AnimationKeyDragHandle>& handle, const Ref<IAnimationTrack>& track,\n                      const Function<void(KeyHandle& keyHandle)>& updateFunc);\n\n            bool operator==(const KeyHandle& other) const;\n        };\n\n        struct IHandlesGroup: public RefCounterable\n        {\n            String                 trackPath;\n            Vector<Ref<KeyHandle>> handles;\n\n            WeakRef<MapKeyFramesTrackControl> trackControl;\n\n        public:\n            virtual ~IHandlesGroup();\n\n            virtual void InitializeHandles(const Ref<IAnimationTrack>& itrack, const String& trackPath) = 0;\n            virtual void CreateHandles() = 0;\n            virtual void OnHandleChangedPos(const Ref<KeyHandle>& keyHandle, const Vec2F& pos) = 0;\n            virtual void UpdateHandles() = 0;\n            virtual bool SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime) = 0;\n            virtual void DeleteKey(UInt64 keyUid) = 0;\n            void CacheHandles();\n        };\n\n        template<typename TrackType>\n        struct HandlesGroup : public IHandlesGroup\n        {\n            typedef AnimationTrackWrapper<TrackType> Wrapper;\n\n            WeakRef<TrackType> track;\n\n        public:\n            ~HandlesGroup();\n\n            void InitializeHandles(const Ref<IAnimationTrack>& itrack, const String& trackPath) override;\n            void CreateHandles() override;\n            void OnHandleChangedPos(const Ref<KeyHandle>& keyHandle, const Vec2F& pos) override;\n            void UpdateHandles() override;\n            bool SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime) override;\n            void DeleteKey(UInt64 keyUid) override;\n        };\n\n    private:\n        Map<WeakRef<IAnimationTrack>, Ref<IHandlesGroup>> mHandlesGroups; // List of handles, each for keys\n        Vector<WeakRef<IAnimationTrack>>                  mTracks;        // Editing Animation tracks\n        WeakRef<AnimationTimeline>                        mTimeline;      // Time line used for calculating handles positions\n        WeakRef<KeyHandlesSheet>                          mHandlesSheet;  // Handles sheet, used for drawing and managing drag handles\n\n        Vector<Ref<AnimationKeyDragHandle>> mHandlesCache; // Cached drag handles, can be reused\n\n        bool mDisableHandlesUpdate = false;  // It is true when handles are changing and combining or updating is not available\n\n    private:\n        void CacheHandles();\n        void InitializeNodeHandles(const AnimationTree::TrackNode& valueNode);\n\n        Ref<AnimationKeyDragHandle> CreateHandle();\n\n        Vector<Ref<KeyHandle>> FindHandlesAtPosition(float position) const;\n    };\n\n    template<typename TrackType>\n    MapKeyFramesTrackControl::HandlesGroup<TrackType>::~HandlesGroup()\n    {\n        if (track)\n            track.Lock()->onKeysChanged -= MakeFunction(this, &HandlesGroup<TrackType>::UpdateHandles);\n    }\n\n    template<typename TrackType>\n    void MapKeyFramesTrackControl::HandlesGroup<TrackType>::InitializeHandles(const Ref<IAnimationTrack>& itrack,\n                                                                              const String& trackPath)\n    {\n        this->trackPath = trackPath;\n\n        track = DynamicCast<TrackType>(itrack);\n        track.Lock()->onKeysChanged += MakeFunction(this, &HandlesGroup<TrackType>::UpdateHandles);\n\n        trackControl.Lock()->mTracks.Add(itrack);\n\n        CreateHandles();\n    }\n\n    template<typename TrackType>\n    void MapKeyFramesTrackControl::HandlesGroup<TrackType>::CreateHandles()\n    {\n        PushEditorScopeOnStack scope;\n\n        auto trackControlRef = trackControl.Lock();\n        auto trackRef = track.Lock();\n\n        for (auto& key : Wrapper::GetKeys(*trackRef))\n        {\n            Ref<AnimationKeyDragHandle> handle;\n\n            if (!trackControlRef->mHandlesCache.IsEmpty())\n                handle = trackControlRef->mHandlesCache.PopBack();\n            else\n                handle = trackControlRef->CreateHandle();\n\n            handle->SetEnabled(true);\n            handle->SetPosition(Vec2F(key.position, 0.0f));\n            handle->track = trackRef;\n            handle->trackPath = trackPath;\n            handle->trackControl = trackControlRef;\n            handle->keyUid = key.uid;\n            handle->isMapping = true;\n            handle->SetSelectionGroup(DynamicCast<ISelectableDragHandlesGroup>(trackControlRef->mHandlesSheet.Lock()));\n\n            auto updatePosFunc = [=](KeyHandle& keyHandle)\n                {\n                    keyHandle.handle->SetPosition(Vec2F(Wrapper::FindKey(*trackRef, handle->keyUid).position, 0.0f));\n                };\n\n            auto keyHandle = mmake<KeyHandle>(key.uid, handle, trackRef, updatePosFunc);\n            handles.Add(keyHandle);\n\n            handle->onChangedPos = [=](const Vec2F& pos) { OnHandleChangedPos(keyHandle, pos); };\n            handle->onPressed = [=]()\n                {\n                    if (!o2Input.IsKeyDown(VK_CONTROL))\n                        handle->GetSelectionGroup()->DeselectAll();\n\n                    trackControlRef->FindHandlesAtPosition(keyHandle->handle->GetPosition().x)\n                        .ForEach([](auto& keyHandle) { keyHandle->handle->SetSelected(true); });\n                };\n            handle->onReleased = [&]() { UpdateHandles(); };\n\n            trackControlRef->AddChild(handle);\n        }\n    }\n\n    template<typename TrackType>\n    void MapKeyFramesTrackControl::HandlesGroup<TrackType>::UpdateHandles()\n    {\n        if (trackControl.Lock()->mDisableHandlesUpdate)\n            return;\n\n        if (Wrapper::GetKeys(*track.Lock()).Count() != handles.Count())\n        {\n            Vector<UInt64> selectedHandles;\n            for (auto& keyHandle : handles)\n            {\n                if (keyHandle->handle->IsSelected())\n                    selectedHandles.Add(keyHandle->keyUid);\n            }\n\n            CacheHandles();\n            CreateHandles();\n\n            for (auto& keyHandle : handles)\n                keyHandle->handle->SetSelected(selectedHandles.Contains(keyHandle->keyUid));\n        }\n        else\n        {\n            for (auto& keyHandle : handles)\n                keyHandle->updateFunc(*keyHandle);\n        }\n    }\n\n    template<typename TrackType>\n    void MapKeyFramesTrackControl::HandlesGroup<TrackType>::OnHandleChangedPos(const Ref<KeyHandle>& keyHandle, const Vec2F& pos)\n    {\n        auto trackRef = track.Lock();\n\n        trackControl.Lock()->mDisableHandlesUpdate = true;\n\n        int keyIdx = Wrapper::FindKeyIdx(*trackRef, keyHandle->keyUid);\n        auto key = Wrapper::GetKeys(*trackRef)[keyIdx];\n\n        key.position = pos.x;\n        Wrapper::RemoveKeyAt(*trackRef, keyIdx);\n        Wrapper::AddKey(*trackRef, key);\n\n        trackControl.Lock()->mDisableHandlesUpdate = false;\n    }\n\n    template<typename TrackType>\n    bool MapKeyFramesTrackControl::HandlesGroup<TrackType>::SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime)\n    {\n        auto trackRef = track.Lock();\n\n        int idx = Wrapper::FindKeyIdx(*trackRef, keyUid);\n        if (idx < 0)\n            return false;\n\n        auto key = Wrapper::GetKey(*trackRef, idx);\n        key.position -= relativeTime;\n        data.Set(key);\n\n        return true;\n    }\n\n    template<typename TrackType>\n    void MapKeyFramesTrackControl::HandlesGroup<TrackType>::DeleteKey(UInt64 keyUid)\n    {\n        auto trackRef = track.Lock();\n\n        int idx = Wrapper::FindKeyIdx(*trackRef, keyUid);\n        if (idx >= 0)\n            Wrapper::RemoveKeyAt(*trackRef, idx);\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::MapKeyFramesTrackControl)\n{\n    BASE_CLASS(Editor::ITrackControl);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::MapKeyFramesTrackControl)\n{\n    FIELD().PRIVATE().NAME(mHandlesGroups);\n    FIELD().PRIVATE().NAME(mTracks);\n    FIELD().PRIVATE().NAME(mTimeline);\n    FIELD().PRIVATE().NAME(mHandlesSheet);\n    FIELD().PRIVATE().NAME(mHandlesCache);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mDisableHandlesUpdate);\n}\nEND_META;\nCLASS_METHODS_META(Editor::MapKeyFramesTrackControl)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const MapKeyFramesTrackControl&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize, const Ref<AnimationTimeline>&, const Ref<KeyHandlesSheet>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateHandles);\n    FUNCTION().PUBLIC().SIGNATURE(void, SerializeKey, UInt64, DataValue&, float);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<ITrackControl::KeyHandle>>, GetKeyHandles);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeleteKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMappedTracks, const AnimationTree::TrackNode&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateHandlesForTrack, const Ref<IAnimationTrack>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysDrag);\n    FUNCTION().PUBLIC().SIGNATURE(void, EndKeysDrag);\n    FUNCTION().PRIVATE().SIGNATURE(void, CacheHandles);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeNodeHandles, const AnimationTree::TrackNode&);\n    FUNCTION().PRIVATE().SIGNATURE(Ref<AnimationKeyDragHandle>, CreateHandle);\n    FUNCTION().PRIVATE().SIGNATURE(Vector<Ref<KeyHandle>>, FindHandlesAtPosition, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/SubTrackControl.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SubTrackControl.h\"\n\n#include \"o2/Scene/ActorTransform.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2Editor/Windows/AnimationWindow/KeyHandlesSheet.h\"\n\nnamespace Editor\n{\n    SubTrackControl::SubTrackControl(RefCounter* refCounter) :\n        ITrackControl(refCounter)\n    {\n        InitializeHandles();\n    }\n\n    SubTrackControl::SubTrackControl(RefCounter* refCounter, const SubTrackControl& other) :\n        ITrackControl(refCounter, other)\n    {\n        InitializeHandles();\n    }\n\n    SubTrackControl::~SubTrackControl()\n    {}\n\n    SubTrackControl& SubTrackControl::operator=(const SubTrackControl& other)\n    {\n        Widget::operator=(other);\n        return *this;\n    }\n\n#undef DrawText\n    void SubTrackControl::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        if (!mHandlesSheet.Lock()->enabled)\n            return;\n\n        OnDrawn();\n\n        o2Render.EnableScissorTest(mTimeline.Lock()->layout->GetWorldRect());\n\n        DrawTrack();\n\n        for (auto& child : mChildrenInheritedDepth)\n            child->Draw();\n\n        o2Render.DisableScissorTest();\n\n        DrawDebugFrame();\n    }\n\n    void SubTrackControl::SetTrack(const Ref<IAnimationTrack>& track, const Ref<IAnimationTrack::IPlayer>& player, const String& path)\n    {\n        mTrackPath = path;\n\n        if (mTrack)\n            mTrack.Lock()->onKeysChanged -= THIS_FUNC(UpdateHandles);\n\n        mTrack = DynamicCast<AnimationSubTrack>(track);\n        mPlayer = DynamicCast<AnimationSubTrack::Player>(player);\n\n        if (mTrack)\n            mTrack.Lock()->onKeysChanged += THIS_FUNC(UpdateHandles);\n\n        SetupTrackHandles();\n    }\n\n    void SubTrackControl::Initialize(const Ref<AnimationTimeline>& timeline, const Ref<KeyHandlesSheet>& handlesSheet)\n    {\n        mTimeline = timeline;\n        mHandlesSheet = handlesSheet;\n    }\n\n    void SubTrackControl::DrawTrack()\n    {\n        auto track = mTrack.Lock();\n        auto timeline = mTimeline.Lock();\n        if (!track || !timeline)\n            return;\n\n        float bottom = layout->GetWorldBottom();\n        float top = layout->GetWorldTop();\n\n        float originTrackBegin = timeline->LocalToWorld(track->beginTime);\n        float originTrackEnd = timeline->LocalToWorld(track->beginTime + track->subTrackDuration);\n\n        float trackBegin = timeline->LocalToWorld(track->beginTime + track->subTrackBeginOffset);\n        float trackEnd = timeline->LocalToWorld(track->beginTime + track->subTrackDuration - track->subTrackEndOffset);\n\n        float trackSpriteOffset = 2;\n\n        mTrackSprite->transparency = 0.5f;\n        mTrackSprite->rect = RectF(originTrackBegin - trackSpriteOffset, bottom, originTrackEnd + trackSpriteOffset, top);\n        mTrackSprite->Draw();\n\n        mTrackSprite->transparency = 1.0f;\n        mTrackSprite->rect = RectF(trackBegin - trackSpriteOffset, bottom, trackEnd + trackSpriteOffset, top);\n        mTrackSprite->Draw();\n    }\n\n    void SubTrackControl::InitializeHandles()\n    {\n        auto localToWidgetOffsetTransformFunc = [&](const Vec2F& pos)\n        {\n            float worldXPos = mTimeline.Lock()->LocalToWorld(pos.x);\n            float localXPos = worldXPos - layout->GetWorldLeft();\n\n            return Vec2F(localXPos, 0);\n        };\n\n        auto widgetOffsetToLocalTransformFunc = [&](const Vec2F& pos)\n        {\n            float worldXPos = layout->GetWorldLeft() + pos.x;\n            float localXPos = mTimeline.Lock()->WorldToLocal(worldXPos);\n\n            return Vec2F(localXPos, 0);\n        };\n\n        float handleSize = 10.0f;\n        float snapThreshold = 0.01f;\n\n        {\n            auto handle = mmake<AnimationKeyDragHandle>();\n            handle->cursorType = CursorType::SizeAll;\n            handle->pixelPerfect = true;\n\n            handle->checkPositionFunc = [&](const Vec2F& pos)\n            {\n                float position = pos.x;\n                if (position < 0.0f)\n                    position = 0.0f;\n\n                return Vec2F(position, layout->GetHeight() * 0.5f);\n            };\n\n            handle->isPointInside = [=](const Vec2F& pos)\n            {\n                auto track = mTrack.Lock();\n                auto timeline = mTimeline.Lock();\n                if (!track || !timeline)\n                    return false;\n\n                RectF handleRect(timeline->LocalToWorld(track->beginTime), handle->GetScreenPosition().y,\n                                 timeline->LocalToWorld(track->beginTime + track->subTrackDuration), handle->GetScreenPosition().y + layout->GetHeight());\n                return handleRect.IsInside(pos);\n            };\n\n            handle->localToWidgetOffsetTransformFunc = localToWidgetOffsetTransformFunc;\n            handle->widgetOffsetToLocalTransformFunc = widgetOffsetToLocalTransformFunc;\n\n            AddChild(handle);\n\n            mCenterHandle = mmake<KeyHandle>(2, handle);\n        }\n\n        {\n            auto handle = mmake<AnimationKeyDragHandle>();\n            handle->cursorType = CursorType::SizeWE;\n            handle->pixelPerfect = true;\n\n            handle->checkPositionFunc = [=](const Vec2F& pos)\n            {\n                float position = pos.x;\n                if (position < 0.0f)\n                    position = 0.0f;\n\n                if (auto track = mTrack.Lock())\n                {\n                    if (Math::Abs(position - track->beginTime) < snapThreshold)\n                        position = track->beginTime;\n                }\n\n                return Vec2F(position, layout->GetHeight() * 0.5f);\n            };\n\n            handle->isPointInside = [=](const Vec2F& pos)\n            {\n                Vec2F borderHandlesSize = Vec2F(handleSize, layout->GetHeight());\n                RectF borderHandlesRect = RectF(-borderHandlesSize.x * 0.5f, 0, borderHandlesSize.x * 0.5f, -borderHandlesSize.y);\n                auto localPos = handle->GetScreenPosition() - pos;\n                return borderHandlesRect.IsInside(localPos);\n            };\n\n            handle->localToWidgetOffsetTransformFunc = localToWidgetOffsetTransformFunc;\n            handle->widgetOffsetToLocalTransformFunc = widgetOffsetToLocalTransformFunc;\n\n            AddChild(handle);\n\n            mLeftBorderHandle = mmake<KeyHandle>(0, handle);\n        }\n\n        {\n            auto handle = mmake<AnimationKeyDragHandle>();\n            handle->cursorType = CursorType::SizeWE;\n            handle->pixelPerfect = true;\n\n            handle->checkPositionFunc = [=](const Vec2F& pos)\n            {\n                float position = pos.x;\n                if (position < 0.0f)\n                    position = 0.0f;\n\n                if (auto track = mTrack.Lock())\n                {\n                    if (Math::Abs(position - (track->beginTime + track->subTrackDuration)) < snapThreshold)\n                        position = track->beginTime + track->subTrackDuration;\n                }\n\n                return Vec2F(position, layout->GetHeight() * 0.5f);\n            };\n\n            handle->isPointInside = [=](const Vec2F& pos)\n            {\n                if (o2Input.IsKeyDown(VK_CONTROL))\n                    return false;\n\n                Vec2F borderHandlesSize = Vec2F(handleSize, layout->GetHeight());\n                RectF borderHandlesRect = RectF(-borderHandlesSize.x * 0.5f, 0, borderHandlesSize.x * 0.5f, -borderHandlesSize.y);\n                auto localPos = handle->GetScreenPosition() - pos;\n                return borderHandlesRect.IsInside(localPos);\n            };\n\n            handle->localToWidgetOffsetTransformFunc = localToWidgetOffsetTransformFunc;\n            handle->widgetOffsetToLocalTransformFunc = widgetOffsetToLocalTransformFunc;\n\n            AddChild(handle);\n\n            mRightBorderHandle = mmake<KeyHandle>(1, handle);\n        }\n\n        mTrackSprite = mmake<Sprite>(\"ui/UI4_sub_track.png\");\n    }\n\n    void SubTrackControl::SetupTrackHandles()\n    {\n        auto track = mTrack.Lock();\n        auto handlesSheet = mHandlesSheet.Lock();\n        if (!track || !handlesSheet)\n            return;\n\n        {\n            auto handle = mCenterHandle->handle;\n            handle->SetPosition(Vec2F(track->beginTime, 0.0f));\n            handle->track = track;\n            handle->trackPath = mTrackPath;\n            handle->trackControl = Ref(this);\n            handle->isMapping = false;\n            handle->SetSelectionGroup(DynamicCast<ISelectableDragHandlesGroup>(handlesSheet));\n            //handle->SetSelected(selectedHandles.Contains(key.uid));\n\n            AddChild(handle);\n\n            handle->onChangedPos = [this, track](const Vec2F& pos)\n            {\n                mDisableHandlesUpdate = true;\n\n                track->beginTime = pos.x;\n                mLeftBorderHandle->handle->SetPosition(Vec2F(track->beginTime + track->subTrackBeginOffset, 0.0f));\n                mRightBorderHandle->handle->SetPosition(Vec2F(track->beginTime + track->subTrackDuration - track->subTrackEndOffset, 0.0f));\n\n                mDisableHandlesUpdate = false;\n            };\n        }\n\n        {\n            auto handle = mLeftBorderHandle->handle;\n            handle->SetPosition(Vec2F(track->beginTime + track->subTrackBeginOffset, 0.0f));\n            handle->track = track;\n            handle->trackPath = mTrackPath;\n            handle->trackControl = Ref(this);\n            handle->isMapping = false;\n            handle->SetSelectionGroup(DynamicCast<ISelectableDragHandlesGroup>(handlesSheet));\n            //handle->SetSelected(selectedHandles.Contains(key.uid));\n\n            handle->onChangedPos = [this, track](const Vec2F& pos)\n            {\n                mDisableHandlesUpdate = true;\n\n                track->subTrackBeginOffset = pos.x - track->beginTime;\n\n                mDisableHandlesUpdate = false;\n            };\n        }\n\n        {\n            auto handle = mRightBorderHandle->handle;\n            handle->SetPosition(Vec2F(track->beginTime + track->subTrackDuration - track->subTrackEndOffset, 0.0f));\n            handle->track = track;\n            handle->trackPath = mTrackPath;\n            handle->trackControl = Ref(this);\n            handle->isMapping = false;\n            handle->SetSelectionGroup(DynamicCast<ISelectableDragHandlesGroup>(handlesSheet));\n            //handle->SetSelected(selectedHandles.Contains(key.uid));\n\n            handle->onChangedPos = [this, track](const Vec2F& pos)\n            {\n                mDisableHandlesUpdate = true;\n\n                track->subTrackEndOffset = (track->beginTime + track->subTrackDuration) - pos.x;\n\n                mDisableHandlesUpdate = false;\n            };\n        }\n    }\n\n    void SubTrackControl::UpdateHandles()\n    {\n        if (mDisableHandlesUpdate)\n            return;\n\n        auto track = mTrack.Lock();\n        if (!track)\n            return;\n\n        mLeftBorderHandle->handle->SetPosition(Vec2F(track->beginTime + track->subTrackBeginOffset, 0.0f));\n        mRightBorderHandle->handle->SetPosition(Vec2F(track->beginTime + track->subTrackDuration - track->subTrackEndOffset, 0.0f));\n        mCenterHandle->handle->SetPosition(Vec2F(track->beginTime, 0.0f));\n    }\n\n    void SubTrackControl::SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime)\n    {\n//         if (mLeftBorderHandle->keyUid == keyUid)\n//             data.Set(mLeftBorderHandle\n    }\n\n    Vector<Ref<ITrackControl::KeyHandle>> SubTrackControl::GetKeyHandles() const\n    {\n        Vector<Ref<KeyHandle>> res = { mLeftBorderHandle, mRightBorderHandle, mCenterHandle };\n        return res;\n    }\n\n    void SubTrackControl::DeleteKey(UInt64 keyUid)\n    {}\n\n    void SubTrackControl::BeginKeysDrag()\n    {}\n\n    void SubTrackControl::EndKeysDrag()\n    {}\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::SubTrackControl>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SubTrackControl, Editor__SubTrackControl);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/SubTrackControl.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/AnimationWindow/Timeline.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/ITrackControl.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/AnimationTrackWrapper.h\"\n#include \"o2Editor/Windows/AnimationWindow/Tree.h\"\n#include \"o2Editor/Windows/AnimationWindow/KeyHandlesSheet.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // -------------------------------------\n    // Animation control track for aub track\n    // -------------------------------------\n    class SubTrackControl : public ITrackControl\n    {\n    public:\n        PROPERTIES(SubTrackControl);\n\n    public:\n        // Default constructor\n        SubTrackControl(RefCounter* refCounter);\n\n        // Copy-constructor\n        SubTrackControl(RefCounter* refCounter, const SubTrackControl& other);\n\n        // Destructor\n        ~SubTrackControl();\n\n        // Copy-operator\n        SubTrackControl& operator=(const SubTrackControl& other);\n\n        // Sets timeline for calculating handles positions, and  handles sheet as selecting group for handles\n        void Initialize(const Ref<AnimationTimeline>& timeline, const Ref<KeyHandlesSheet>& handlesSheet) override;\n\n        // Draws handles with clipping\n        void Draw() override;\n\n        // Sets Animation track, updates and creates key handles\n        void SetTrack(const Ref<IAnimationTrack>& track, const Ref<IAnimationTrack::IPlayer>& player, const String& path) override;\n\n        // Updates handles position on timeline\n        void UpdateHandles() override;\n\n        // Serialize key with specified uid into data node\n        void SerializeKey(UInt64 keyUid, DataValue& data, float relativeTime) override;\n\n        // Returns key handles list\n        Vector<Ref<ITrackControl::KeyHandle>> GetKeyHandles() const override;\n\n        // Removes key from track\n        void DeleteKey(UInt64 keyUid) override;\n\n        // Called when group of keys began dragged, disables keys combining\n        void BeginKeysDrag() override;\n\n        // Called when group of keys completed drag, enables keys combining\n        void EndKeysDrag() override;\n\n        SERIALIZABLE(SubTrackControl);\n        CLONEABLE_REF(SubTrackControl);\n\n    private:\n        Ref<KeyHandle> mLeftBorderHandle;  // Left border handle\n        Ref<KeyHandle> mRightBorderHandle; // Right border handle\n        Ref<KeyHandle> mCenterHandle;      // Center handle\n\n        bool mDisableHandlesUpdate = false; // It is true when handles are changing and combining or updating is not available\n\n        String mTrackPath; // Path to Animation track in animation\n\n        WeakRef<AnimationSubTrack>         mTrack;  // Editing Animation track\n        WeakRef<AnimationSubTrack::Player> mPlayer; // Track player\n\n        WeakRef<AnimationTimeline> mTimeline;     // Time line used for calculating handles positions\n        WeakRef<KeyHandlesSheet>   mHandlesSheet; // Handles sheet, used for drawing and managing drag handles\n\n        Ref<Sprite> mTrackSprite; // Track sprite\n\n    private:\n        // Initializes handles\n        void InitializeHandles();\n\n        // Initializes handles for track\n        void SetupTrackHandles();\n\n        // Draws track with offsets\n        void DrawTrack();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SubTrackControl)\n{\n    BASE_CLASS(Editor::ITrackControl);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SubTrackControl)\n{\n    FIELD().PRIVATE().NAME(mLeftBorderHandle);\n    FIELD().PRIVATE().NAME(mRightBorderHandle);\n    FIELD().PRIVATE().NAME(mCenterHandle);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mDisableHandlesUpdate);\n    FIELD().PRIVATE().NAME(mTrackPath);\n    FIELD().PRIVATE().NAME(mTrack);\n    FIELD().PRIVATE().NAME(mPlayer);\n    FIELD().PRIVATE().NAME(mTimeline);\n    FIELD().PRIVATE().NAME(mHandlesSheet);\n    FIELD().PRIVATE().NAME(mTrackSprite);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SubTrackControl)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const SubTrackControl&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize, const Ref<AnimationTimeline>&, const Ref<KeyHandlesSheet>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<IAnimationTrack>&, const Ref<IAnimationTrack::IPlayer>&, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateHandles);\n    FUNCTION().PUBLIC().SIGNATURE(void, SerializeKey, UInt64, DataValue&, float);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<ITrackControl::KeyHandle>>, GetKeyHandles);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeleteKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysDrag);\n    FUNCTION().PUBLIC().SIGNATURE(void, EndKeysDrag);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeHandles);\n    FUNCTION().PRIVATE().SIGNATURE(void, SetupTrackHandles);\n    FUNCTION().PRIVATE().SIGNATURE(void, DrawTrack);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/Vec2KeyFramesTrackControl.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"Vec2KeyFramesTrackControl.h\"\n\n#include \"o2Editor/ToolsPanel.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    WeakRef<Vec2KeyFramesTrackControl> Vec2KeyFramesTrackControl::mLastActive;\n\n    Vec2KeyFramesTrackControl::Vec2KeyFramesTrackControl(RefCounter* refCounter):\n        Base(refCounter), mTool(mmake<SplineTool>())\n    {\n        InitializeControls();\n    }\n\n    Vec2KeyFramesTrackControl::Vec2KeyFramesTrackControl(RefCounter* refCounter, const Vec2KeyFramesTrackControl& other):\n        Base(refCounter, other), mTool(mmake<SplineTool>())\n    {\n        InitializeControls();\n    }\n\n    Vec2KeyFramesTrackControl::~Vec2KeyFramesTrackControl()\n    {\n        o2EditorSceneScreen.RemoveTool(mTool);\n    }\n\n    void Vec2KeyFramesTrackControl::SetActive(bool active)\n    {\n        if (active)\n        {\n            if (mLastActive)\n                mLastActive.Lock()->SetActive(false);\n\n            o2EditorSceneScreen.AddTool(mTool);\n            mPrevSelectedTool = o2EditorSceneScreen.GetSelectedTool();\n            o2EditorSceneScreen.SelectTool<SplineTool>();\n\n            mLastActive = Ref(this);\n        }\n        else\n        {\n            if (o2EditorSceneScreen.GetSelectedTool() == mTool)\n                o2EditorSceneScreen.SelectTool(mPrevSelectedTool.Lock());\n\n            o2EditorSceneScreen.RemoveTool(mTool);\n\n            if (mLastActive == this)\n                mLastActive = nullptr;\n        }\n    }\n\n    Vec2KeyFramesTrackControl& Vec2KeyFramesTrackControl::operator=(const Vec2KeyFramesTrackControl& other)\n    {\n        Base::operator=(other);\n        return *this;\n    }\n\n    void Vec2KeyFramesTrackControl::InitializeControls()\n    {}\n\n    void Vec2KeyFramesTrackControl::TryFindOwnerTrack()\n    {\n        mTrackOwner = nullptr;\n\n        if (!mPlayer)\n            return;\n\n        auto path = mTrack.Lock()->path;\n        auto root = Ref(dynamic_cast<Actor*>(mPlayer.Lock()->GetOwnerPlayer().Lock()->GetTarget()));\n        while (root && path.StartsWith(\"child\"))\n        {\n            int nextSlash = path.Find(\"/\");\n            if (nextSlash < 0)\n                return;\n\n            int nextChildSlash = path.Find(\"/\", nextSlash + 1);\n            auto childName = path.SubStr(nextSlash + 1, nextChildSlash);\n            root = root->GetChild(childName);\n            path.Erase(0, nextChildSlash + 1);\n        }\n\n        mTrackOwner = root;\n    }\n\n    void Vec2KeyFramesTrackControl::OnSetTrack()\n    {\n        TryFindOwnerTrack();\n\n        mTool->SetSpline(mTrack.Lock()->spline, [&]() { \n            if (mTrackOwner && mTrackOwner.Lock()->GetParent())\n                return mTrackOwner.Lock()->GetParent().Lock()->transform->worldPosition.Get(); \n\n            return Vec2F();\n        });\n    }\n\n    void Vec2KeyFramesTrackControl::OnKeysChanged()\n    {\n        mTool->splineEditor->OnSplineChanged();\n    }\n\n    void Vec2KeyFramesTrackControl::SetCurveViewEnabled(bool enabled)\n    {\n        mAddKeyDotButton->enabled = enabled;\n        mAddKeyButton->enabled = !enabled;\n    }\n\n    void Vec2KeyFramesTrackControl::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        if (!mHandlesSheet.Lock()->enabled)\n            return;\n\n        OnDrawn();\n\n        auto timeline = mTimeline.Lock();\n        auto track = mTrack.Lock();\n\n        o2Render.EnableScissorTest(timeline->layout->GetWorldRect());\n\n        for (int i = 1; i < track->timeCurve->GetKeys().Count(); i++)\n        {\n            auto& key = track->timeCurve->GetKeys()[i];\n            auto& prevKey = track->timeCurve->GetKeys()[i - 1];\n\n            Basis drawCoords(RectF(timeline->LocalToWorld(prevKey.position) - 1,\n                                   layout->GetWorldTop() - 5,\n                                   timeline->LocalToWorld(key.position) - 1,\n                                   layout->GetWorldBottom() + 5));\n\n            DrawCurveInCoords(key.GetTopApproximatedPoints(), key.GetApproximatedPointsCount(),\n                              key.GetGetApproximatedPointsBounds(), drawCoords, Color4(44, 62, 80));\n        }\n\n        for (auto& handle : mHandles)\n            handle->handle->Draw();\n\n        o2Render.DisableScissorTest();\n\n        DrawDebugFrame();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::Vec2KeyFramesTrackControl>);\n// --- META ---\n\nDECLARE_CLASS(Editor::Vec2KeyFramesTrackControl, Editor__Vec2KeyFramesTrackControl);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/TrackControls/Vec2KeyFramesTrackControl.h",
    "content": "#pragma once\n#include \"KeyFramesTrackControl.h\"\n#include \"o2Editor/Tools/SplineTool.h\"\n#include \"o2Editor/UI/SplineEditor/SplineEditor.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // -------------------------------------------------\n    // Animation control track for Vec2F animation track\n    // -------------------------------------------------\n    class Vec2KeyFramesTrackControl : public KeyFramesTrackControl<AnimationTrack<Vec2F>>\n    {\n    public:\n        typedef KeyFramesTrackControl<AnimationTrack<Vec2F>> Base;\n\n    public:\n        // Default constructor\n        Vec2KeyFramesTrackControl(RefCounter* refCounter);\n\n        // Copy-constructor\n        Vec2KeyFramesTrackControl(RefCounter* refCounter, const Vec2KeyFramesTrackControl& other);\n\n        // Destructor\n        ~Vec2KeyFramesTrackControl();\n\n        // Copy-operator\n        Vec2KeyFramesTrackControl& operator=(const Vec2KeyFramesTrackControl& other);\n\n        // Sets track active when user selects it\n        void SetActive(bool active) override;\n\n        // Sets curves edit view mode\n        void SetCurveViewEnabled(bool enabled) override;\n\n        // Draws handles with clipping\n        void Draw() override;\n\n        SERIALIZABLE(Vec2KeyFramesTrackControl);\n        CLONEABLE_REF(Vec2KeyFramesTrackControl);\n\n    private:\n        Ref<SplineTool> mTool; // Other handles locking tool\n\n        WeakRef<IEditTool> mPrevSelectedTool; // Previous selected tool, for restore\n\n        WeakRef<Actor> mTrackOwner; // Actor which animated in track\n\n        static WeakRef<Vec2KeyFramesTrackControl> mLastActive; // Last active track control of this type; When multiple track\n                                                               // controls are activated, only the last one works\n\n    private:\n        void InitializeControls();\n        void TryFindOwnerTrack();\n        void OnSetTrack() override;\n        void OnKeysChanged() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::Vec2KeyFramesTrackControl)\n{\n    BASE_CLASS(Editor::KeyFramesTrackControl<AnimationTrack<Vec2F>>);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::Vec2KeyFramesTrackControl)\n{\n    FIELD().PRIVATE().NAME(mTool);\n    FIELD().PRIVATE().NAME(mPrevSelectedTool);\n    FIELD().PRIVATE().NAME(mTrackOwner);\n}\nEND_META;\nCLASS_METHODS_META(Editor::Vec2KeyFramesTrackControl)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Vec2KeyFramesTrackControl&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetActive, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCurveViewEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeControls);\n    FUNCTION().PRIVATE().SIGNATURE(void, TryFindOwnerTrack);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnSetTrack);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnKeysChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/Tree.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n\n#include \"o2Editor/Windows/AnimationWindow/Tree.h\"\n\n#include \"PropertiesListDlg.h\"\n#include \"TrackControls/SubTrackControl.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/AnimationWindow/AnimationWindow.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/KeyFramesTrackControl.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/MapKeyFramesTrackControl.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/Vec2KeyFramesTrackControl.h\"\n\nnamespace Editor\n{\n    AnimationTree::AnimationTree(RefCounter* refCounter) :\n        Tree(refCounter)\n    {\n        SetRearrangeType(Tree::RearrangeType::Disabled);\n        InitializeContext();\n    }\n\n    AnimationTree::AnimationTree(RefCounter* refCounter, const AnimationTree& other) :\n        Tree(refCounter, other)\n    {\n        SetRearrangeType(Tree::RearrangeType::Disabled);\n        InitializeContext();\n    }\n\n    AnimationTree::AnimationTree(const AnimationTree& other) :\n        AnimationTree(nullptr, other)\n    {}\n\n    AnimationTree::~AnimationTree()\n    {}\n\n    AnimationTree& AnimationTree::operator=(const AnimationTree& other)\n    {\n        Tree::operator=(other);\n\n        mZebraBackLine = other.mZebraBackLine->CloneAsRef<Sprite>();\n        InitializeContext();\n\n        return *this;\n    }\n\n    void AnimationTree::Draw()\n    {\n        o2Render.EnableScissorTest(mAbsoluteClipArea);\n        DrawZebraBack();\n        o2Render.DisableScissorTest();\n\n        mAnimationWindow->mHandlesSheet->DrawSelectionFrame();\n\n        // Disable zebra\n        auto buf = mZebraBackLine;\n        mZebraBackLine = nullptr;\n\n        Tree::Draw();\n\n        // Enable\n        mZebraBackLine = buf;\n\n        mAnimationWindow->mHandlesSheet->UpdateInputDrawOrder();\n    }\n\n    void AnimationTree::SetAnimation(const Ref<AnimationClip>& animation)\n    {\n        mAnimationWindow->mHandlesSheet->UnregAllTrackControls();\n\n        mPrevSelectedNodes.Clear();\n\n        RebuildAnimationTree();\n        ExpandAll();\n        OnObjectsChanged({ (void*)mRootValue.Get() });\n    }\n\n    void AnimationTree::SetTreeWidth(float width)\n    {\n        mTreeWidth = width;\n        UpdateTreeWidth();\n    }\n\n    void AnimationTree::SetAnimationValueColor(const String& path, const Color4& color)\n    {\n        auto node = mRootValue;\n        auto itPath = path;\n        while (!itPath.IsEmpty())\n        {\n            int fnd = itPath.Find('/', 0);\n            String pathPart = itPath.SubStr(0, fnd);\n\n            for (auto& child : node->children)\n            {\n                if (child->name == pathPart)\n                {\n                    node = child;\n                    break;\n                }\n            }\n            \n            if (fnd < 0)\n                break;\n\n            itPath = itPath.SubStr(fnd + 1);\n        }\n\n        if (!node)\n            return;\n\n        node->color = color;\n\n        if (node->trackControl)\n            node->trackControl->SetCurveViewColor(color);\n    }\n\n    float AnimationTree::GetLineNumber(float worldPosition) const\n    {\n        return (layout->GetWorldTop() - worldPosition + mScrollPos.y) / mNodeWidgetSample->layout->GetMinHeight();\n    }\n\n    float AnimationTree::GetLineWorldPosition(float lineNumber) const\n    {\n        return -(lineNumber * mNodeWidgetSample->layout->GetMinHeight() - mScrollPos.y - layout->GetWorldTop());\n    }\n\n    String AnimationTree::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void AnimationTree::InitializeContext()\n    {\n        mContextMenu = o2UI.CreateWidget<ContextMenu>();\n\n        mContextMenu->AddItem(\"New\", [&]() {});\n        mContextMenu->AddItem(\"Save\", [&]() {}, AssetRef<ImageAsset>(), ShortcutKeys({VK_S, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Save as...\", [&]() {}, AssetRef<ImageAsset>(), ShortcutKeys({VK_S, VK_CTRL_CMD, VK_SHIFT}));\n        mContextMenu->AddItem(\"---\");\n        mContextMenu->AddItem(\"Delete property\", THIS_FUNC(OnDeletePropertyPressed));\n        mContextMenu->AddItem(\"---\");\n        mContextMenu->AddItem(\"Add properties\", [&]() { \n            auto animation = mAnimationWindow->mAnimation.Lock();\n            auto targetActor = mAnimationWindow->mTargetActor.Lock();\n            if (!animation || !targetActor)\n                return;\n            PropertiesListDlg::Show(animation, targetActor); \n        });\n\n        onFocused = [&]() { mAnimationWindow->mHandlesSheet->GetContextMenu()->SetItemsMaxPriority(); mContextMenu->SetItemsMaxPriority(); };\n\n        AddInternalWidget(mContextMenu);\n    }\n\n    void AnimationTree::RebuildAnimationTree()\n    {\n        mRootValue = nullptr;\n\n        if (!mAnimationWindow->mAnimation)\n            return;\n\n        auto animation = mAnimationWindow->mAnimation.Lock();\n        if (!animation)\n            return;\n            \n        mAnimationValuesCount = animation->GetTracks().Count();\n\n        mRootValue = mmake<TrackNode>();\n        mRootValue->name = \"Track name\";\n\n        if (mAnimationWindow->mPreviewPlayer)\n        {\n            for (auto& trackPlayer : mAnimationWindow->mPreviewPlayer->GetTrackPlayers())\n                AddAnimationTrack(trackPlayer->GetTrack(), trackPlayer);\n        }\n        else\n        {\n            for (auto& track : animation->GetTracks())\n                AddAnimationTrack(track, nullptr);\n        }\n\n        UpdateNodesStructure();\n    }\n\n    void AnimationTree::AddAnimationTrack(const Ref<IAnimationTrack>& track, const Ref<IAnimationTrack::IPlayer>& player /*= nullptr*/)\n    {\n        Ref<TrackNode> current;\n\n        int lastDel = 0;\n        while (lastDel >= 0)\n        {\n            int del = track->path.Find('/', lastDel);\n            String subPath = track->path.SubStr(lastDel, del);\n            auto next = (current ? current->children : mRootValue->children)\n                .FindOrDefault([&](auto& x) { return x->name == subPath; });\n\n            if (!next)\n            {\n                next = mmake<TrackNode>();\n                next->name = subPath;\n                next->path = track->path;\n\n                if (current)\n                {\n                    next->parent = current;\n                    current->children.Add(next);\n                }\n                else\n                    mRootValue->children.Add(next);\n            }\n\n            current = next;\n            lastDel = del >= 0 ? del + 1 : -1;\n        }\n\n        current->track = track;\n        current->player = player;\n    }\n\n#undef DrawText\n\n    void AnimationTree::UpdateTreeWidth()\n    {\n        for (auto& node : mVisibleNodes)\n        {\n            if (auto trackNode = DynamicCast<AnimationTreeNode>(node->widget))\n                trackNode->SetTreeWidth(mTreeWidth);\n        }\n    }\n\n    void AnimationTree::SetCurveViewMode(bool enable)\n    {\n        for (auto& node : mVisibleNodes)\n        {\n            if (auto trackNode = DynamicCast<AnimationTreeNode>(node->widget))\n                trackNode->mTrackControl->SetCurveViewEnabled(enable);\n        }\n    }\n\n    void AnimationTree::OnAnimationChanged()\n    {\n        auto animation = mAnimationWindow->mAnimation.Lock();\n        if (!animation)\n            return;\n            \n        if (animation->GetTracks().Count() != mAnimationValuesCount)\n        {\n            mAnimationWindow->mHandlesSheet->UnregAllTrackControls();\n\n            RebuildAnimationTree();\n            ExpandAll();\n            OnObjectsChanged({ (void*)mRootValue.Get() });\n        }\n    }\n\n    void* AnimationTree::GetObjectParent(void* object)\n    {\n        if (!object)\n            return nullptr;\n\n        auto treeNode = (TrackNode*)object;\n        return treeNode->parent.Lock().Get();\n    }\n\n    Vector<void*> AnimationTree::GetObjectChilds(void* object)\n    {\n        if (!object)\n            return { (void*)mRootValue.Get() };\n\n        auto treeNode = (TrackNode*)object;\n        return treeNode->children.Convert<void*>([](auto& x) { return x.Get(); });\n    }\n\n    String AnimationTree::GetObjectDebug(void* object)\n    {\n        auto treeNode = (TrackNode*)object;\n        return treeNode ? treeNode->name : String(\"Empty\");\n    }\n\n    void AnimationTree::FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object)\n    {\n        auto node = DynamicCast<AnimationTreeNode>(nodeWidget);\n        node->Setup(Ref((TrackNode*)object), mAnimationWindow->mTimeline, mAnimationWindow->mHandlesSheet);\n    }\n\n    void AnimationTree::FreeNodeData(const Ref<TreeNode>& nodeWidget, void* object)\n    {\n        auto node = DynamicCast<AnimationTreeNode>(nodeWidget);\n        node->Free();\n    }\n\n    void AnimationTree::UpdateVisibleNodes()\n    {\n        Tree::UpdateVisibleNodes();\n        UpdateTreeWidth();\n    }\n\n    void AnimationTree::OnNodeRBClick(const Ref<TreeNode>& node)\n    {\n        o2UI.FocusWidget(Ref(this));\n        mContextMenu->Show();\n    }\n\n    void AnimationTree::OnNodesSelectionChanged(Vector<void*> objects)\n    {\n        for (auto& node : mPrevSelectedNodes)\n            node->trackControl->SetActive(false);\n\n        mAnimationWindow->mHandlesSheet->DeselectAll();\n\n        mPrevSelectedNodes.Clear();\n        for (auto& obj : objects) \n        {\n            auto node = Ref((TrackNode*)obj);\n            mPrevSelectedNodes.Add(node);\n\n            node->trackControl->SetActive(true);\n\n            for (auto& handle : node->trackControl->GetKeyHandles())\n                handle->handle->SetSelected(true);\n        }\n    }\n\n    Ref<TreeNode> AnimationTree::CreateTreeNodeWidget()\n    {\n        PushEditorScopeOnStack scope;\n        return Tree::CreateTreeNodeWidget();\n    }\n\n    void AnimationTree::OnDeletePropertyPressed()\n    {\n        auto animation = mAnimationWindow->mAnimation.Lock();\n        if (!animation)\n            return;\n            \n        for (auto& obj : GetSelectedObjects())\n        {\n            TrackNode* data = (TrackNode*)obj;\n            animation->RemoveTrack(data->path);\n        }\n    }\n\n    AnimationTreeNode::AnimationTreeNode(RefCounter* refCounter) :\n        TreeNode(refCounter)\n    {}\n\n    AnimationTreeNode::AnimationTreeNode(RefCounter* refCounter, const AnimationTreeNode& other) :\n        TreeNode(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    AnimationTreeNode& AnimationTreeNode::operator=(const AnimationTreeNode& other)\n    {\n        TreeNode::operator=(other);\n        InitializeControls();\n\n        return *this;\n    }\n\n    void AnimationTreeNode::Setup(const Ref<AnimationTree::TrackNode>& node, const Ref<AnimationTimeline>& timeline, \n                                  const Ref<KeyHandlesSheet>& handlesSheet)\n    {\n        mTimeline = timeline;\n        mHandlesSheet = handlesSheet;\n\n        mTimeline->onViewChanged -= THIS_FUNC(UpdateTrackControlView);\n        mTimeline->onViewChanged += THIS_FUNC(UpdateTrackControlView);\n\n        mData = node;\n        mNameDrawable->text = node->name;\n\n        InitilizeTrackControl();\n\n        mData->trackControl = mTrackControl;\n    }\n\n    void AnimationTreeNode::Free()\n    {\n        FreeTrackControl();\n    }\n\n    void AnimationTreeNode::SetTreeWidth(float width)\n    {\n        if (mTrackControl)\n        {\n            *mTrackControl->layout = WidgetLayout::BothStretch(width, 0, 0, 0);\n\n            float right = width - layout->GetOffsetLeft();\n            if (auto controls = mTrackControl->GetTreePartControls())\n            {\n                *controls->layout = WidgetLayout::VerStretch(HorAlign::Left, mPropertyBorder, mPropertyBorder + 1, mPropertySize,\n                                                             right - mPropertySize - mPropertyBorder);\n            }\n        }\n    }\n\n    void AnimationTreeNode::OnDoubleClicked(const Input::Cursor& cursor)\n    {\n        if (mTrackControl)\n            mTrackControl->InsertNewKey(mTimeline->WorldToLocal(cursor.position.x));\n    }\n\n    String AnimationTreeNode::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void AnimationTreeNode::OnDeserialized(const DataValue& node)\n    {\n        TreeNode::OnDeserialized(node);\n        InitializeControls();\n    }\n\n    void AnimationTreeNode::InitializeControls()\n    {\n        mNameDrawable = GetLayerDrawable<Text>(\"name\");\n    }\n\n    Map<const Type*, o2::Vector<Ref<ITrackControl>>> AnimationTreeNode::mTrackControlsCache;\n\n    void AnimationTreeNode::InitilizeTrackControl()\n    {\n        PushEditorScopeOnStack scope;\n\n        static Map<const Type*, const Type*> trackToControlTrackTypes =\n        {\n            { &TypeOf(AnimationTrack<float>), &TypeOf(KeyFramesTrackControl<AnimationTrack<float>>) },\n            { &TypeOf(AnimationTrack<bool>), &TypeOf(KeyFramesTrackControl<AnimationTrack<bool>>) },\n            { &TypeOf(AnimationTrack<Vec2F>), &TypeOf(Vec2KeyFramesTrackControl) },\n            { &TypeOf(AnimationTrack<Color4>), &TypeOf(KeyFramesTrackControl<AnimationTrack<Color4>>) }\n        };\n\n        FreeTrackControl();\n\n        if (!mData->track)\n        {\n            Ref<MapKeyFramesTrackControl> trackControl;\n            auto trackControlType = &TypeOf(MapKeyFramesTrackControl);\n            if (mTrackControlsCache.ContainsKey(trackControlType) && !mTrackControlsCache[trackControlType].IsEmpty())\n                trackControl = DynamicCast<MapKeyFramesTrackControl>(mTrackControlsCache[trackControlType].PopBack());\n            else\n                trackControl = mmake<MapKeyFramesTrackControl>();\n\n            mTrackControl = trackControl;\n\n            trackControl->Initialize(mTimeline, mHandlesSheet);\n            trackControl->SetMappedTracks(*mData);\n\n             AddChild(mTrackControl);\n        }\n        else\n        {\n            const Type* trackControlType = nullptr;\n\n            auto trackType = &mData->track->GetType();\n            if (trackType == &TypeOf(AnimationSubTrack))\n            {\n                trackControlType = &TypeOf(SubTrackControl);\n            }\n            else if (trackToControlTrackTypes.ContainsKey(trackType))\n            {\n                trackControlType = dynamic_cast<const ObjectType*>(trackToControlTrackTypes[trackType]);\n            }\n            else\n            {\n                o2Debug.LogWarning(\"Can't create control track for type:\" + trackType->GetName());\n                return;\n            }\n\n            if (mTrackControlsCache.ContainsKey(trackControlType) && !mTrackControlsCache[trackControlType].IsEmpty())\n                mTrackControl = mTrackControlsCache[trackControlType].PopBack();\n            else\n                mTrackControl = DynamicCast<ITrackControl>(trackControlType->CreateSampleRef());\n\n            mTrackControl->Initialize(mTimeline, mHandlesSheet);\n            mTrackControl->SetTrack(mData->track, mData->player, mData->path);\n\n            AddChild(mTrackControl);\n        }\n\n        if (auto controls = mTrackControl->GetTreePartControls())\n            AddChild(controls);\n\n        auto animTree = DynamicCast<AnimationTree>(mOwnerTree.Lock());\n        mTrackControl->SetCurveViewEnabled(animTree->mAnimationWindow->IsCurvesMode());\n        mTrackControl->SetCurveViewColor(mData->color);\n\n        mHandlesSheet->RegTrackControl(mTrackControl, mData->path);\n    }\n\n    void AnimationTreeNode::FreeTrackControl()\n    {\n        if (mTrackControl)\n        {\n            auto trackType = &mTrackControl->GetType();\n            if (!mTrackControlsCache.ContainsKey(trackType))\n                mTrackControlsCache.Add(trackType, {});\n\n            mTrackControlsCache[trackType].Add(mTrackControl);\n\n            RemoveChild(mTrackControl, false);\n\n            if (auto controls = mTrackControl->GetTreePartControls())\n                RemoveChild(controls, false);\n\n            mHandlesSheet->UnregTrackControl(mTrackControl);\n        }\n\n        mTrackControl = nullptr;\n    }\n\n    void AnimationTreeNode::UpdateTrackControlView()\n    {\n        if (mTrackControl)\n            mTrackControl->UpdateHandles();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AnimationTreeNode>);\n// --- META ---\n\nDECLARE_CLASS(Editor::AnimationTree, Editor__AnimationTree);\n\nDECLARE_CLASS(Editor::AnimationTreeNode, Editor__AnimationTreeNode);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AnimationWindow/Tree.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2Editor/Windows/AnimationWindow/TrackControls/ITrackControl.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class AnimationClip;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AnimationWindow);\n    FORWARD_CLASS_REF(KeyHandlesSheet);\n\n    // ---------------------\n    // animation tracks tree\n    // ---------------------\n    class AnimationTree : public Tree\n    {\n    public:\n        // Default constructor\n        AnimationTree(RefCounter* refCounter);\n\n        // Copy-constructor\n        AnimationTree(RefCounter* refCounter, const AnimationTree& other);\n\n        // Copy-constructor\n        AnimationTree(const AnimationTree& other);\n\n        // Destructor. Clearing tree data\n        ~AnimationTree();\n\n        // Copy-operator\n        AnimationTree& operator=(const AnimationTree& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Sets animation and updates tree structure\n        void SetAnimation(const Ref<AnimationClip>& animation);\n\n        // Called when animation changed, checks count of animation tracks, updates tree structure if needed\n        void OnAnimationChanged();\n\n        // Sets width of tree part\n        void SetTreeWidth(float width);\n\n        // Sets color of track by path\n        void SetAnimationValueColor(const String& path, const Color4& color);\n\n        // Returns Animation track line number by world position, dependent on scroll\n        float GetLineNumber(float worldPosition) const;\n\n        // Returns world position of Animation track line\n        float GetLineWorldPosition(float lineNumber) const;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(AnimationTree);\n        CLONEABLE_REF(AnimationTree);\n\n    public:\n        struct TrackNode: public RefCounterable\n        {\n            String name;\n            String path;\n\n            Color4 color;\n\n            Ref<IAnimationTrack>          track;\n            Ref<IAnimationTrack::IPlayer> player;\n\n            Ref<ITrackControl> trackControl;\n\n            WeakRef<TrackNode>     parent;\n            Vector<Ref<TrackNode>> children;\n        };\n\n    private:\n        Ref<AnimationWindow> mAnimationWindow; // Animation window\n\n        int mAnimationValuesCount = 0; // Last stored animation tracks count. Used in checking of animation changes for tracking new values\n\n        Ref<TrackNode> mRootValue;     // Root animation properties tree node\n        Ref<ContextMenu> mContextMenu; // Context menu\n\n        Vector<Ref<TrackNode>> mPrevSelectedNodes; // Previous selected nodes before new selection\n\n        float mTreeWidth = 100.0f; // Tree - part width\n\n    private:\n        // Initializes context menu\n        void InitializeContext();\n\n        // Rebuilds animation tracks tree - mRootValues\n        void RebuildAnimationTree();\n\n        // Adds Animation track to tree. Creates intermediate nodes when required\n        void AddAnimationTrack(const Ref<IAnimationTrack>& track, const Ref<IAnimationTrack::IPlayer>& player = nullptr);\n\n        // Updates tree node width\n        void UpdateTreeWidth();\n\n        // Sets curve view mode\n        void SetCurveViewMode(bool enable);\n\n        // Returns object's parent\n        void* GetObjectParent(void* object) override;\n\n        // Returns object's children\n        Vector<void*> GetObjectChilds(void* object) override;\n\n        // Returns debugging string for object\n        String GetObjectDebug(void* object) override;\n\n        // Sets nodeWidget data by object\n        void FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object) override;\n\n        // Free node data\n        void FreeNodeData(const Ref<TreeNode>& nodeWidget, void* object) override;\n\n        // Updates visible nodes (calculates range and initializes nodes), updates tree width on visible nodes\n        void UpdateVisibleNodes() override;\n\n        // Called when tree node clicked by right button, opening context menu\n        void OnNodeRBClick(const Ref<TreeNode>& node) override;\n\n        // Called when list of selected objects was changed\n        void OnNodesSelectionChanged(Vector<void*> objects) override;\n\n        // Gets tree node from pool or creates new, in editor scope\n        Ref<TreeNode> CreateTreeNodeWidget() override;\n\n        // Removes selected property\n        void OnDeletePropertyPressed();\n\n        friend class AnimationTreeNode;\n        friend class AnimationWindow;\n    };\n\n    // -------------------\n    // Animation tree node\n    // -------------------\n    class AnimationTreeNode : public TreeNode\n    {\n    public:\n        // Default constructor\n        AnimationTreeNode(RefCounter* refCounter);\n\n        // Copy-constructor\n        AnimationTreeNode(RefCounter* refCounter, const AnimationTreeNode& other);\n\n        // Copy operator\n        AnimationTreeNode& operator=(const AnimationTreeNode& other);\n\n        // Sets object and updates track control\n        void Setup(const Ref<AnimationTree::TrackNode>& node, const Ref<AnimationTimeline>& timeline, const Ref<KeyHandlesSheet>& handlesSheet);\n\n        // Free node, unregister track control\n        void Free();\n\n        // Sets width of tree part and control part\n        void SetTreeWidth(float width);\n\n        // Called from handles sheet, when user double clicked, creates new key under cursor\n        void OnDoubleClicked(const Input::Cursor& cursor);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(AnimationTreeNode);\n        CLONEABLE_REF(AnimationTreeNode);\n\n    protected:\n        float mPropertyBorder = 2.0f;\n        float mAddKeyButtonSize = 25.0f;\n        float mPropertySize = 130.0f;\n\n        Ref<AnimationTree::TrackNode> mData; // Editing Animation track data\n\n        Ref<AnimationTimeline> mTimeline;     // Animation timeline pointer, passes into track controller\n        Ref<KeyHandlesSheet>   mHandlesSheet; // Handles sheet group, passes into track controller\n\n        Ref<Text> mNameDrawable; // Object name drawable\n\n        Ref<ITrackControl> mTrackControl;     // Animation track editor\n\n        static Map<const Type*, Vector<Ref<ITrackControl>>> mTrackControlsCache; // Shared track controls cache\n\n    protected:\n        // Called on deserialization, initializes controls\n        void OnDeserialized(const DataValue& node) override;\n\n        // initializes controls and widgets\n        void InitializeControls();\n\n        // Initializes suitable track control for Animation track by type. Caching track controls\n        void InitilizeTrackControl();\n\n        // Free track control and put it unto buffer\n        void FreeTrackControl();\n\n        // Updates drag handles positions on timeline\n        void UpdateTrackControlView();\n\n        friend class AnimationTree;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AnimationTree)\n{\n    BASE_CLASS(o2::Tree);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationTree)\n{\n    FIELD().PRIVATE().NAME(mAnimationWindow);\n    FIELD().PRIVATE().DEFAULT_VALUE(0).NAME(mAnimationValuesCount);\n    FIELD().PRIVATE().NAME(mRootValue);\n    FIELD().PRIVATE().NAME(mContextMenu);\n    FIELD().PRIVATE().NAME(mPrevSelectedNodes);\n    FIELD().PRIVATE().DEFAULT_VALUE(100.0f).NAME(mTreeWidth);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationTree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AnimationTree&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationTree&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnimation, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnAnimationChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTreeWidth, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnimationValueColor, const String&, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetLineNumber, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetLineWorldPosition, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeContext);\n    FUNCTION().PRIVATE().SIGNATURE(void, RebuildAnimationTree);\n    FUNCTION().PRIVATE().SIGNATURE(void, AddAnimationTrack, const Ref<IAnimationTrack>&, const Ref<IAnimationTrack::IPlayer>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateTreeWidth);\n    FUNCTION().PRIVATE().SIGNATURE(void, SetCurveViewMode, bool);\n    FUNCTION().PRIVATE().SIGNATURE(void*, GetObjectParent, void*);\n    FUNCTION().PRIVATE().SIGNATURE(Vector<void*>, GetObjectChilds, void*);\n    FUNCTION().PRIVATE().SIGNATURE(String, GetObjectDebug, void*);\n    FUNCTION().PRIVATE().SIGNATURE(void, FillNodeDataByObject, const Ref<TreeNode>&, void*);\n    FUNCTION().PRIVATE().SIGNATURE(void, FreeNodeData, const Ref<TreeNode>&, void*);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateVisibleNodes);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnNodeRBClick, const Ref<TreeNode>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnNodesSelectionChanged, Vector<void*>);\n    FUNCTION().PRIVATE().SIGNATURE(Ref<TreeNode>, CreateTreeNodeWidget);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeletePropertyPressed);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::AnimationTreeNode)\n{\n    BASE_CLASS(o2::TreeNode);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AnimationTreeNode)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(2.0f).NAME(mPropertyBorder);\n    FIELD().PROTECTED().DEFAULT_VALUE(25.0f).NAME(mAddKeyButtonSize);\n    FIELD().PROTECTED().DEFAULT_VALUE(130.0f).NAME(mPropertySize);\n    FIELD().PROTECTED().NAME(mData);\n    FIELD().PROTECTED().NAME(mTimeline);\n    FIELD().PROTECTED().NAME(mHandlesSheet);\n    FIELD().PROTECTED().NAME(mNameDrawable);\n    FIELD().PROTECTED().NAME(mTrackControl);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AnimationTreeNode)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AnimationTreeNode&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Setup, const Ref<AnimationTree::TrackNode>&, const Ref<AnimationTimeline>&, const Ref<KeyHandlesSheet>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Free);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTreeWidth, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDoubleClicked, const Input::Cursor&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitilizeTrackControl);\n    FUNCTION().PROTECTED().SIGNATURE(void, FreeTrackControl);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTrackControlView);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AssetsWindow/AssetIcon.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AssetIcon.h\"\n\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n\nnamespace Editor\n{\n    AssetIcon::AssetIcon(RefCounter* refCounter):\n        Widget(refCounter), mNameText(nullptr)\n    {\n        onDraw += [&]() { CursorAreaEventsListener::OnDrawn(); };\n        RetargetStatesAnimations();\n    }\n\n    AssetIcon::AssetIcon(RefCounter* refCounter, const AssetIcon& other):\n        Widget(refCounter, other)\n    {\n        mNameText = FindChildByType<Label>();\n\n        onDraw += [&]() { CursorAreaEventsListener::OnDrawn(); };\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    AssetIcon::~AssetIcon()\n    {}\n\n    AssetIcon& AssetIcon::operator=(const AssetIcon& other)\n    {\n        Widget::operator=(other);\n        mNameText = FindChildByType<Label>();\n        return *this;\n    }\n\n    void AssetIcon::SetAssetInfo(const Ref<AssetInfo>& info)\n    {\n        mAssetInfo = info;\n\n        if (mNameText)\n            mNameText->text = o2FileSystem.GetPathWithoutDirectories(info->path);\n    }\n\n    const Ref<AssetInfo>& AssetIcon::GetAssetInfo() const\n    {\n        return mAssetInfo;\n    }\n\n    void AssetIcon::SetAssetName(const WString& name)\n    {\n        if (mNameText)\n            mNameText->SetText(name);\n    }\n\n    WString AssetIcon::GetAssetName() const\n    {\n        if (mNameText)\n            return mNameText->GetText();\n\n        return WString();\n    }\n\n    bool AssetIcon::IsUnderPoint(const Vec2F& point)\n    {\n        return Widget::IsUnderPoint(point);\n    }\n\n    bool AssetIcon::IsInputTransparent() const\n    {\n        return false;\n    }\n\n    void AssetIcon::OnDrawn()\n    {\n        Widget::OnDrawn();\n        SelectableDragableObject::OnDrawn();\n        DragDropArea::OnDrawn();\n    }\n\n    String AssetIcon::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void AssetIcon::SetSelected(bool selected)\n    {\n        SetState(\"selected\", selected);\n        if (mOwner)\n            SetState(\"focused\", mOwner.Lock()->IsFocused());\n\n        mIsSelected = selected;\n\n        if (selected)\n            OnSelected();\n        else\n            OnDeselected();\n    }\n\n    void AssetIcon::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        if (mOwner)\n            mOwner.Lock()->OnAssetDblClick(Ref(this));\n    }\n\n    void AssetIcon::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        if (mOwner)\n            mOwner.Lock()->OnCursorRightMouseReleased(cursor);\n    }\n\n    void AssetIcon::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        SetState(\"hover\", true);\n    }\n\n    void AssetIcon::OnCursorExit(const Input::Cursor& cursor)\n    {\n        SetState(\"hover\", false);\n    }\n\n    void AssetIcon::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        SelectableDragableObject::OnCursorPressed(cursor);\n    }\n\n    void AssetIcon::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        SelectableDragableObject::OnCursorStillDown(cursor);\n    }\n\n    void AssetIcon::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        SelectableDragableObject::OnCursorReleased(cursor);\n    }\n\n    void AssetIcon::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n        SelectableDragableObject::OnCursorReleasedOutside(cursor);\n    }\n\n    void AssetIcon::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        SelectableDragableObject::OnCursorPressBreak(cursor);\n    }\n\n    void AssetIcon::OnDragStart(const Input::Cursor& cursor)\n    {\n        if (mOwner)\n            mOwner.Lock()->BeginDragging(Ref(this));\n    }\n\n    void AssetIcon::OnDragged(const Input::Cursor& cursor, const Ref<DragDropArea>& area)\n    {\n        if (mOwner)\n            mOwner.Lock()->UpdateDraggingGraphics();\n    }\n\n    void AssetIcon::OnDragEnd(const Input::Cursor& cursor)\n    {\n        if (mOwner)\n            mOwner.Lock()->mDragEnded = true;\n    }\n\n    void AssetIcon::OnSelected()\n    {\n        if (mOwner)\n            mOwner.Lock()->Focus();\n    }\n\n    void AssetIcon::OnDeselected()\n    {}\n\n    void AssetIcon::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (mOwner)\n            mOwner.Lock()->OnDropped(group);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AssetIcon>);\n// --- META ---\n\nDECLARE_CLASS(Editor::AssetIcon, Editor__AssetIcon);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AssetsWindow/AssetIcon.h",
    "content": "#pragma once\n\n#include \"o2/Assets/AssetInfo.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Editor/DragAndDrop.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Label;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AssetsIconsScrollArea);\n\n    // --------------------------\n    // Dragable asset icon widget\n    // --------------------------\n    class AssetIcon: public Widget, public SelectableDragableObject, public DragDropArea\n    {\n    public:\n        PROPERTIES(AssetIcon);\n        PROPERTY(WString, assetName, SetAssetName, GetAssetName); // Asset name label text property\n\n    public:\n        // Default constructor\n        AssetIcon(RefCounter* refCounter);\n\n        // Copy-constructor\n        AssetIcon(RefCounter* refCounter, const AssetIcon& other);\n\n        // Destructor\n        ~AssetIcon();\n\n        // Copy operator\n        AssetIcon& operator=(const AssetIcon& other);\n\n        // Sets asset info\n        void SetAssetInfo(const Ref<AssetInfo>& info);\n\n        // Returns asset info\n        const Ref<AssetInfo>& GetAssetInfo() const;\n\n        // Sets name label text\n        void SetAssetName(const WString& name);\n\n        // Returns name label text\n        WString GetAssetName() const;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Called when listener was drawn\n        void OnDrawn() override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(AssetIcon);\n        CLONEABLE_REF(AssetIcon);\n\n    protected:\n        Ref<Label>       mNameText;      // Asset name text\n        Ref<AssetInfo>   mAssetInfo;     // Asset information\n        Ref<WidgetState> mSelectedState; // Node selected state\n\n        WeakRef<AssetsIconsScrollArea> mOwner; // Owner assets scroll area\n\n    protected:\n        using SelectableDragableObject::OnDrawn;\n        using SelectableDragableObject::OnCursorPressed;\n        using SelectableDragableObject::OnCursorReleased;\n\n        // Sets is this selected\n        void SetSelected(bool selected) override;\n\n        // Called when cursor double clicked\n        void OnCursorDblClicked(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object, moving hover of tree to this\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object, moving hover of tree to this\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor released outside this(only when cursor pressed this at previous time)\n        void OnCursorReleasedOutside(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when started dragging\n        void OnDragStart(const Input::Cursor& cursor) override;\n\n        // Called when dragged\n        void OnDragged(const Input::Cursor& cursor, const Ref<DragDropArea>& area) override;\n\n        // Called when dragging completed\n        void OnDragEnd(const Input::Cursor& cursor) override;\n\n        // Called when this was selected\n        void OnSelected() override;\n\n        // Called when this was unselected\n        void OnDeselected() override;\n\n        // Called when some selectable listeners was dropped to this\n        void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class AssetsIconsScrollArea;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AssetIcon)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::SelectableDragableObject);\n    BASE_CLASS(o2::DragDropArea);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AssetIcon)\n{\n    FIELD().PUBLIC().NAME(assetName);\n    FIELD().PROTECTED().NAME(mNameText);\n    FIELD().PROTECTED().NAME(mAssetInfo);\n    FIELD().PROTECTED().NAME(mSelectedState);\n    FIELD().PROTECTED().NAME(mOwner);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AssetIcon)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AssetIcon&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAssetInfo, const Ref<AssetInfo>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AssetInfo>&, GetAssetInfo);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAssetName, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetAssetName);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDrawn);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetSelected, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorDblClicked, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleasedOutside, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragStart, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragged, const Input::Cursor&, const Ref<DragDropArea>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnd, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelected);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeselected);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDropped, const Ref<ISelectableDragableObjectsGroup>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AssetsWindow/AssetsIconsScroll.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AssetsIconsScroll.h\"\n\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Application/VKCodes.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Components/ImageComponent.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/StringUtils.h\"\n#include \"o2Editor/Actions/Create.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetIcon.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsWindow.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n\nnamespace Editor\n{\n    AssetsIconsScrollArea::AssetsIconsScrollArea(RefCounter* refCounter):\n        GridLayoutScrollArea(refCounter)\n    {\n        mDragIcon = mmake<AssetIcon>();\n\n        mHighlightSprite = mmake<Sprite>();\n        mSelectionSprite = mmake<Sprite>();\n\n        mHighlightAnim->SetTarget(mHighlightSprite.Get());\n    }\n\n    AssetsIconsScrollArea::AssetsIconsScrollArea(RefCounter* refCounter, const AssetsIconsScrollArea& other) :\n        GridLayoutScrollArea(refCounter, other), mHighlightSprite(other.mHighlightSprite->CloneAsRef<Sprite>()),\n        mHighlightLayout(other.mHighlightLayout), mHighlightAnim(other.mHighlightAnim),\n        mSelectionSprite(other.mSelectionSprite->CloneAsRef<Sprite>())\n    {\n        PushEditorScopeOnStack scope;\n\n        RemoveAllChildren();\n\n        mDragIcon = o2UI.CreateWidget<AssetIcon>();\n\n        if (other.mHighlighClip)\n            mHighlighClip = other.mHighlighClip->CloneAsRef<AnimationClip>();\n\n        mHighlightAnim->SetTarget(mHighlightSprite.Get());\n        mHighlightAnim->SetClip(mHighlighClip);\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n        InitializeContext();\n    }\n\n    AssetsIconsScrollArea::AssetsIconsScrollArea(const AssetsIconsScrollArea& other) :\n        AssetsIconsScrollArea(nullptr, other)\n    {}\n\n    AssetsIconsScrollArea::~AssetsIconsScrollArea()\n    {}\n\n    AssetsIconsScrollArea& AssetsIconsScrollArea::operator=(const AssetsIconsScrollArea& other)\n    {\n        ScrollArea::operator=(other);\n\n        mDragIcon = other.mDragIcon->CloneAsRef<AssetIcon>();\n\n        mContextMenu = FindChildByType<ContextMenu>();\n\n        mHighlightLayout = other.mHighlightLayout;\n        mHighlightSprite = other.mHighlightSprite->CloneAsRef<Sprite>();\n        mHighlighClip = other.mHighlighClip->CloneAsRef<AnimationClip>();\n        mHighlightAnim->SetTarget(mHighlightSprite.Get());\n        mHighlightAnim->SetClip(mHighlighClip);\n\n        mSelectionSprite = other.mSelectionSprite->CloneAsRef<Sprite>();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n        return *this;\n    }\n\n    void AssetsIconsScrollArea::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        IDrawable::OnDrawn();\n\n        o2Render.EnableScissorTest(mAbsoluteClipArea);\n\n        for (auto& child : mChildrenInheritedDepth)\n            child->Draw();\n\n        if (mSelecting)\n            mSelectionSprite->Draw();\n\n        if (mHighlightSprite)\n            mHighlightSprite->Draw();\n\n        o2Render.DisableScissorTest();\n\n        GridLayoutScrollArea::OnDrawn();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        if (mOwnHorScrollBar)\n            mHorScrollBar->Draw();\n\n        if (mOwnVerScrollBar)\n            mVerScrollBar->Draw();\n\n        if (mIsDraggingIcons && mInstantiatedSceneDragObjects.Count() == 0)\n            o2UI.DrawWidgetAtTop(mDragIcon);\n\n        if (IsUIDebugEnabled() || o2Input.IsKeyDown(VK_F1))\n            DrawDebugFrame();\n    }\n\n    void AssetsIconsScrollArea::Update(float dt)\n    {\n        ScrollArea::Update(dt);\n\n        if (mHighlightAnim->IsPlaying())\n        {\n            if (mHighlightIcon)\n            {\n                mHighlightSprite->SetScale(Vec2F(1.0f, 1.0f));\n                mHighlightSprite->SetRect(mHighlightLayout.Calculate(mHighlightIcon->layout->worldRect));\n            }\n\n            mHighlightAnim->Update(dt);\n\n            if (!mHighlightAnim->IsPlaying())\n                mHighlightIcon = nullptr;\n        }\n\n        if (mDragEnded)\n            EndDragging();\n    }\n\n    void AssetsIconsScrollArea::SetViewingPath(const String& path)\n    {\n        if (path == mCurrentPath)\n            return;\n\n        mCurrentPath = path;\n        UpdateAssetsByCurrentPath();\n        ResetScroll();\n    }\n\n    const String& AssetsIconsScrollArea::GetViewingPath() const\n    {\n        return mCurrentPath;\n    }\n\n    void AssetsIconsScrollArea::UpdateAssetsByCurrentPath()\n    {\n        PushEditorScopeOnStack scope;\n\n        Focus();\n        DeselectAllAssets();\n\n        if (mCurrentPath != \"\")\n        {\n            AssetRef<FolderAsset> ref(mCurrentPath);\n            mAssetInfos = ref->GetInfo().GetChildren();\n        }\n        else\n            mAssetInfos = o2Assets.GetAssetsTree().rootAssets;\n\n        SortAssetInfos();\n        OnItemsUpdated(true);\n    }\n\n    void AssetsIconsScrollArea::SortAssetInfos()\n    {\n        Map<Ref<AssetInfo>, Pair<String, int>> sortingCache;\n        for (auto& assetInfo : mAssetInfos)\n            sortingCache[assetInfo] = { assetInfo->path.ToLowerCase(), assetInfo->meta->GetAssetType()->InvokeStatic<int>(\"GetEditorSorting\") };\n\n\t\tmAssetInfos.Sort([&](const Ref<AssetInfo>& a, const Ref<AssetInfo>& b)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t int aSorting = sortingCache[a].second;\n\t\t\t\t\t\t\t int bSorting = sortingCache[b].second;\n\t\t\t\t\t\t\t if (aSorting != bSorting)\n\t\t\t\t\t\t\t\t return aSorting > bSorting;\n\n\t\t\t\t\t\t\t const String& aPath = sortingCache[a].first;\n\t\t\t\t\t\t\t const String& bPath = sortingCache[b].first;\n\t\t\t\t\t\t\t if (aPath != bPath)\n\t\t\t\t\t\t\t\t return aPath < bPath;\n\n\t\t\t\t\t\t\t return a->meta->ID() < b->meta->ID();\n\t\t\t\t\t\t });\n    }\n\n    bool AssetsIconsScrollArea::IsFocusable() const\n    {\n        return true;\n    }\n\n    void AssetsIconsScrollArea::UpdateCuttingAssets()\n    {\n        for (auto& child : mChildWidgets)\n        {\n            auto icon = DynamicCast<AssetIcon>(child);\n            icon->SetState(\"halfHide\", o2EditorAssets.mCuttingAssets.Contains([=](auto x) { return x.first == icon->GetAssetInfo()->meta->ID(); }));\n        }\n    }\n\n    void AssetsIconsScrollArea::HighlightAsset(const UID& id)\n    {\n        String assetPath = o2Assets.GetAssetPath(id);\n        String assetFolder = o2FileSystem.ExtractPathStr(assetPath);\n\n        SetViewingPath(assetFolder);\n\n        auto assetInfo = mAssetInfos.FindOrDefault([&](auto& x) { return x->meta->ID() == id; });\n        ScrollTo((void*)&assetInfo);\n\n        auto icon = DynamicCast<AssetIcon>(mChildWidgets.FindOrDefault([=](const Ref<Widget>& x) {\n            return DynamicCast<AssetIcon>(x)->GetAssetInfo() == assetInfo; \n        }));\n\n        if (!icon)\n            return;\n\n        mHighlightIcon = icon;\n        mHighlightAnim->RewindAndPlay();\n    }\n\n    void AssetsIconsScrollArea::SelectAsset(const UID& id, bool scroll /*= true*/)\n    {\n        bool selectionChanged = false;\n\n        String assetPath = o2Assets.GetAssetPath(id);\n        String assetFolder = o2FileSystem.ExtractPathStr(assetPath);\n\n        SetViewingPath(assetFolder);\n\n        auto assetInfo = Ref(const_cast<AssetInfo*>(&o2Assets.GetAssetInfo(id)));\n        if (!assetInfo->IsValid())\n            return;\n\n        if (!mSelectedAssets.Contains(assetInfo))\n        {\n            if (auto assetIcon = FindVisibleIcon(assetInfo))\n                assetIcon->SetSelected(true);\n\n            mSelectedAssets.Add(assetInfo);\n\n            selectionChanged = true;\n        }\n\n        if (scroll)\n        {\n            int idx = mAssetInfos.IndexOf(assetInfo);\n            float itemHeight = mItemSample->layout->minHeight;\n            int itemsInLine = Math::Max(1, Math::FloorToInt(mAbsoluteViewArea.Width() / mItemSample->layout->GetMinWidth()));\n\n            SetScroll(Vec2F(0.0f, idx / itemsInLine * itemHeight));\n        }\n\n        if (selectionChanged)\n            OnAssetsSelected();\n    }\n\n    void AssetsIconsScrollArea::DeselectAllAssets()\n    {\n        for (auto& icon : mVisibleAssetIcons)\n            icon->SetSelected(false);\n\n        mSelectedAssets.Clear();\n\n        OnAssetsSelected();\n    }\n\n    const Ref<ContextMenu>& AssetsIconsScrollArea::GetContextMenu() const\n    {\n        return mContextMenu;\n    }\n\n    const Vector<Ref<AssetInfo>>& AssetsIconsScrollArea::GetSelectedAssets() const\n    {\n        return mSelectedAssets;\n    }\n\n    void AssetsIconsScrollArea::OnAssetsSelected()\n    {\n        auto lastSelectedPreloadedAssets = mSelectedPreloadedAssets;\n        for (auto& asset : lastSelectedPreloadedAssets)\n        {\n            if (!mSelectedAssets.Contains([&](const Ref<AssetInfo>& x) {\n                return x->meta->ID() == asset->GetUID(); }))\n            {\n                mSelectedPreloadedAssets.Remove(asset);\n            }\n        }\n\n        for (auto& icon : mSelectedAssets)\n        {\n            if (mSelectedPreloadedAssets.Contains([&](const AssetRef<Asset>& x) { return x->GetUID() == icon->meta->ID(); }))\n                continue;\n\n            AssetRef<Asset> iconAsset = o2Assets.GetAssetRef(icon->meta->ID());\n            mSelectedPreloadedAssets.Add(iconAsset);\n        }\n\n        onAssetsSelected(mSelectedAssets.Convert<String>([](const Ref<AssetInfo>& x) { return x->path; }));\n\n        if (PropertiesWindow::IsSingletonInitialzed())\n        {\n            mChangePropertiesTargetsFromThis = true;\n\n            Vector<IObject*> targets;\n\n            if (mSelectedPreloadedAssets.All([](const AssetRef<Asset>& x) { return x->GetType() == TypeOf(ActorAsset); }))\n            {\n                targets = mSelectedPreloadedAssets.Convert<IObject*>([](const AssetRef<Asset>& x) { return DynamicCast<ActorAsset>(x.GetRef())->GetActor().Get(); });\n            }\n            else if (mSelectedPreloadedAssets.All([](const AssetRef<Asset>& x) { return x->GetType() == TypeOf(FolderAsset); }))\n            {\n                targets.Clear();\n            }\n            else\n            {\n                targets = mSelectedPreloadedAssets.Convert<IObject*>([](const AssetRef<Asset>& x) { return const_cast<Asset*>(x.Get()); });\n            }\n\n            if (!targets.IsEmpty())\n                o2EditorPropertiesWindow.SetTargets(targets, THIS_FUNC(OnAssetsPropertiesChanged));\n\n            mChangePropertiesTargetsFromThis = false;\n        }\n    }\n\n    void AssetsIconsScrollArea::UpdateSelfTransform()\n    {\n        Vec2F localPressPoint = mPressedPoint - GetChildrenWorldRect().LeftBottom();\n\n        GridLayoutScrollArea::UpdateSelfTransform();\n\n        mPressedPoint = localPressPoint + GetChildrenWorldRect().LeftBottom();\n\n        if (mSelecting)\n            UpdateSelection(*o2Input.GetCursor(0));\n    }\n\n    bool AssetsIconsScrollArea::IsScrollable() const\n    {\n        return ScrollArea::IsScrollable();\n    }\n\n    bool AssetsIconsScrollArea::IsInputTransparent() const\n    {\n        return ScrollArea::IsInputTransparent();\n    }\n\n    String AssetsIconsScrollArea::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    int AssetsIconsScrollArea::GetItemsCount() const\n    {\n        return mAssetInfos.Count();\n    }\n\n    Vector<void*> AssetsIconsScrollArea::GetItemsRange(int start, int end) const\n    {\n        Vector<void*> result;\n        for (int i = start; i < end; i++)\n            result.Add((void*)&mAssetInfos[i]);\n\n        return result;\n    }\n\n    void AssetsIconsScrollArea::SetupItemWidget(const Ref<Widget>& widget, void* item)\n    {\n        auto asset = *(Ref<AssetInfo>*)item;\n        auto assetIcon = DynamicCast<AssetIcon>(widget);\n\n        auto iconLayer = assetIcon->layer[\"icon\"];\n        auto iconSprite = DynamicCast<Sprite>(iconLayer->GetDrawable());\n\n        if (asset->meta->GetAssetType() == &TypeOf(ImageAsset))\n        {\n            AssetRef<ImageAsset> previewSpriteAsset(asset->path);\n            float previewMaxSize = 30;\n\n            if (previewSpriteAsset->width > previewSpriteAsset->height)\n            {\n                float cf = previewSpriteAsset->height / previewSpriteAsset->width;\n                iconLayer->layout = Layout::Based(BaseCorner::Center, Vec2F(previewMaxSize, previewMaxSize * cf),\n                                                  Vec2F(0, 10));\n            }\n            else\n            {\n                float cf = previewSpriteAsset->width / previewSpriteAsset->height;\n                iconLayer->layout = Layout::Based(BaseCorner::Center, Vec2F(previewMaxSize * cf, previewMaxSize),\n                                                  Vec2F(0, 10));\n            }\n\n            iconSprite->image = previewSpriteAsset;\n            iconSprite->mode = SpriteMode::Default;\n        }\n        else\n        {\n            iconSprite->imageName = asset->meta->GetAssetType()->InvokeStatic<String>(\"GetEditorIcon\");\n            iconSprite->mode = SpriteMode::FixedAspect;\n            iconLayer->layout = Layout::Based(BaseCorner::Center, Vec2F(40, 40), Vec2F(0, 10));\n        }\n\n        assetIcon->SetAssetInfo(asset);\n        assetIcon->SetState(\"halfHide\", mCuttingAssets.Contains([&](auto x) { return x.first == asset->meta->ID(); }));\n        assetIcon->SetSelectionGroup(Ref(this));\n        assetIcon->SetSelected(mSelectedAssets.Contains(Ref(asset)));\n        assetIcon->SetDragOnlySelected(true);\n        assetIcon->mOwner = Ref(this);\n    }\n\n    void AssetsIconsScrollArea::UpdateVisibleItems()\n    {\n        PushEditorScopeOnStack scope;\n        GridLayoutScrollArea::UpdateVisibleItems();\n\n        mVisibleAssetIcons = DynamicCastVector<AssetIcon>(mChildWidgets);\n    }\n\n    void AssetsIconsScrollArea::OnFocused()\n    {\n        for (auto& icon : mChildWidgets)\n            icon->SetState(\"focused\", true);\n\n        Widget::OnFocused();\n    }\n\n    void AssetsIconsScrollArea::OnUnfocused()\n    {\n        for (auto& icon : mChildWidgets)\n            icon->SetState(\"focused\", false);\n\n        Widget::OnUnfocused();\n    }\n\n    void AssetsIconsScrollArea::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        if (auto icon = GetIconUnderPoint(cursor.position))\n        {\n            if (icon->IsSelected())\n                return;\n        }\n\n        mPressedPoint = cursor.position;\n\n        BeginSelecting();\n    }\n\n    void AssetsIconsScrollArea::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (cursor.delta == Vec2F())\n            return;\n\n        if (mSelecting)\n            UpdateSelection(cursor);\n    }\n\n    void AssetsIconsScrollArea::BeginSelecting()\n    {\n        mSelecting = true;\n\n        if (!o2Input.IsKeyDown(VK_CONTROL))\n            DeselectAllAssets();\n\n        o2UI.FocusWidget(Ref(this));\n\n        RectF selectionRect(mPressedPoint, mPressedPoint);\n        mSelectionSprite->SetRect(selectionRect);\n\n        mCurrentSelectingInfos.Clear();\n    }\n\n    void AssetsIconsScrollArea::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (mSelecting)\n            CompleteSelecting();\n        else if (!mIsDraggingIcons)\n        {\n            if (!o2Input.IsKeyDown(VK_CONTROL))\n                DeselectAllAssets();\n        }\n    }\n\n    void AssetsIconsScrollArea::BeginDragging(const Ref<AssetIcon>& icon)\n    {\n        mIsDraggingIcons = true;\n        mDragEnded = false;\n\n        Ref<AssetIcon> dragIcon;\n        for (auto& sel : mSelectedAssets)\n        {\n            if (auto icon = FindVisibleIcon(sel))\n            {\n                icon->Hide();\n                dragIcon = icon;\n            }\n        }\n\n        if (dragIcon)\n        {\n            *mDragIcon = *dragIcon;\n            mDragIcon->DragDropArea::SetInteractable(false);\n            mDragIcon->CursorAreaEventsListener::SetInteractable(false);\n            mDragIcon->SetEnabled(true);\n            mDragIcon->RemoveFromScene();\n            mDragOffset = icon->layout->worldCenter - o2Input.GetCursorPos();\n\n            if (mSelectedAssets.Count() > 1)\n                mDragIcon->assetName = (String)mSelectedAssets.Count() + \" items\";\n        }\n    }\n\n    void AssetsIconsScrollArea::EndDragging(bool droppedToThis /*= false*/)\n    {\n        for (auto& sel : mSelectedAssets)\n        {\n            if (auto icon = FindVisibleIcon(sel))\n                icon->Show();\n        }\n\n        mIsDraggingIcons = false;\n    }\n\n    void AssetsIconsScrollArea::UpdateDraggingGraphics()\n    {\n        mDragIcon->SetEditableParent(nullptr);\n        mDragIcon->layout->SetRect(RectF(o2Input.GetCursorPos() - mAssetIconSize * 0.5f + mDragOffset,\n                                         o2Input.GetCursorPos() + mAssetIconSize * 0.5f + mDragOffset));\n\n        mDragIcon->UpdateSelfTransform();\n        mDragIcon->UpdateChildrenTransforms();\n    }\n\n    void AssetsIconsScrollArea::OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group)\n    {}\n\n    void AssetsIconsScrollArea::OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group)\n    {}\n\n    void AssetsIconsScrollArea::OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group)\n    {}\n\n    void AssetsIconsScrollArea::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (DynamicCast<AssetsIconsScrollArea>(group))\n            OnDroppedFromThis();\n        else if (auto sceneTree = DynamicCast<SceneHierarchyTree>(group))\n            OnDroppedFromSceneTree(sceneTree);\n    }\n\n    void AssetsIconsScrollArea::OnDroppedFromThis()\n    {\n        for (auto& sel : mSelectedAssets)\n        {\n            if (auto icon = FindVisibleIcon(sel))\n                icon->Show();\n        }\n\n        auto iconUnderCursor = GetIconUnderPoint(o2Input.GetCursorPos());\n        if (iconUnderCursor && iconUnderCursor->GetAssetInfo()->meta->GetAssetType() == &TypeOf(FolderAsset))\n        {\n            String destPath = iconUnderCursor->GetAssetInfo()->path;\n            auto assetsInfos = mSelectedAssets.Convert<UID>([](const Ref<AssetInfo>& x) { return x->meta->ID(); });\n            DeselectAllAssets();\n\n            o2Assets.MoveAssets(assetsInfos, destPath);\n            o2Assets.RebuildAssets();\n        }\n    }\n\n    void AssetsIconsScrollArea::OnDroppedFromSceneTree(const Ref<SceneHierarchyTree>& sceneTree)\n    {\n        String destPath = mCurrentPath;\n\n        auto iconUnderCursor = GetIconUnderPoint(o2Input.GetCursorPos());\n        if (iconUnderCursor && iconUnderCursor->GetAssetInfo()->meta->GetAssetType() == &TypeOf(FolderAsset))\n            destPath = iconUnderCursor->GetAssetInfo()->path;\n\n        Vector<String> newAssets;\n        for (auto& object : sceneTree->GetSelectedObjects())\n        {\n            if (auto actor = DynamicCast<Actor>(object))\n            {\n                AssetRef<ActorAsset> newAsset = actor->MakePrototype();\n                String path = destPath.IsEmpty() ? newAsset->GetActor()->name + String(\".proto\") : destPath + \"/\" +\n                    newAsset->GetActor()->name + String(\".proto\");\n\n                String uniquePath = o2Assets.MakeUniqueAssetName(path);\n                newAsset->Save(uniquePath);\n\n                newAssets.Add(uniquePath);\n            }\n        }\n\n        o2Assets.RebuildAssets();\n        o2EditorAssets.OpenFolder(destPath);\n        o2EditorAssets.SelectAssets(newAssets);\n    }\n\n    void AssetsIconsScrollArea::RegObjectsCreationAction()\n    {\n        if (mInstantiatedSceneDragObjects.IsEmpty())\n            return;\n\n        auto firstInstObject = mInstantiatedSceneDragObjects[0];\n        auto parent = firstInstObject->GetEditableParent();\n        auto parentChilds = parent ? parent->GetEditableChildren() : o2Scene.GetRootEditableObjects();\n        int idx = parentChilds.IndexOf(firstInstObject);\n        auto prevActor = idx > 0 ? parentChilds[idx - 1] : nullptr;\n\n        auto createAction = mmake<CreateAction>(mInstantiatedSceneDragObjects, parent, prevActor);\n\n        o2EditorSceneWindow.DoneAction(createAction);\n    }\n\n    void AssetsIconsScrollArea::InstantiateDraggingAssets()\n    {\n        ForcePopEditorScopeOnStack scope;\n\n        for (auto& sel : mSelectedAssets)\n        {\n            auto actor = InstantiateAsset(*sel);\n            if (actor)\n            {\n                actor->name = o2FileSystem.GetPathWithoutDirectories(o2FileSystem.GetFileNameWithoutExtension(sel->path));\n                mInstantiatedSceneDragObjects.Add(actor);\n            }\n        }\n    }\n\n    void AssetsIconsScrollArea::ClearInstantiatedDraggingAssets()\n    {\n        for (auto& object : mInstantiatedSceneDragObjects)\n            object->Destroy();\n\n        mInstantiatedSceneDragObjects.Clear();\n    }\n\n    void AssetsIconsScrollArea::OnCursorPressBreak(const Input::Cursor& cursor)\n    {}\n\n    void AssetsIconsScrollArea::UpdateSelection(const Input::Cursor& cursor)\n    {\n        RectF selectionRect(cursor.position, mPressedPoint);\n        mSelectionSprite->SetRect(selectionRect);\n\n        for (auto& info : mCurrentSelectingInfos)\n        {\n            if (auto icon = FindVisibleIcon(info))\n                icon->SetSelected(false);\n        }\n\n        mCurrentSelectingInfos.Clear();\n\n        for (auto& child : mChildWidgets)\n        {\n            if (child->layout->GetWorldRect().IsIntersects(selectionRect))\n            {\n                auto icon = DynamicCast<AssetIcon>(child);\n                icon->SetSelected(true);\n                mCurrentSelectingInfos.Add(icon->GetAssetInfo());\n            }\n        }\n    }\n\n    void AssetsIconsScrollArea::CompleteSelecting()\n    {\n        mSelectedAssets.Add(mCurrentSelectingInfos);\n        mCurrentSelectingInfos.Clear();\n        mSelecting = false;\n\n        OnAssetsSelected();\n    }\n\n    void AssetsIconsScrollArea::OnCursorMoved(const Input::Cursor& cursor)\n    {}\n\n    void AssetsIconsScrollArea::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        auto iconUnderCursor = GetIconUnderPoint(cursor.position);\n        if (iconUnderCursor)\n        {\n            if (!mSelectedAssets.Contains(iconUnderCursor->GetAssetInfo()))\n            {\n                DeselectAllAssets();\n                iconUnderCursor->SetSelected(true);\n                mCurrentSelectingInfos.Add(iconUnderCursor->GetAssetInfo());\n            }\n        }\n\n        o2UI.FocusWidget(Ref(this));\n        mContextMenu->Show();\n    }\n\n    void AssetsIconsScrollArea::OnScrolled(float scroll)\n    {\n        ScrollArea::OnScrolled(scroll);\n    }\n\n    void AssetsIconsScrollArea::OnKeyReleased(const Input::Key& key)\n    {\n        if (mIsFocused && key == VK_BACK)\n        {\n            if (mCurrentPath.CountOf(\"/\") > 0)\n                o2EditorAssets.OpenFolder(o2FileSystem.GetParentPath(mCurrentPath));\n            else\n                o2EditorAssets.OpenFolder(\"\");\n        }\n    }\n\n    void AssetsIconsScrollArea::InitializeContext()\n    {\n        mContextMenu = o2UI.CreateWidget<ContextMenu>();\n\n        mContextMenu->AddItem(\"Open\", [&]() { OnContextOpenPressed(); });\n        mContextMenu->AddItem(\"Show in folder\", [&]() { OnContextShowInExplorerPressed(); });\n        mContextMenu->AddItem(\"---\");\n        mContextMenu->AddItem(\"New folder\", [&]() { CreateAsset(&TypeOf(FolderAsset)); });\n\n        InitializeCreateContext();\n\n        mContextMenu->AddItem(\"---\");\n        mContextMenu->AddItem(\"Copy\", [&]() { OnContextCopyPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_C, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Cut\", [&]() { OnContextCutPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_X, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Paste\", [&]() { OnContextPastePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_V, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Delete\", [&]() { OnContextDeletePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_DELETE}));\n\n        onFocused = [&]() { mContextMenu->SetItemsMaxPriority(); };\n    }\n\n    void AssetsIconsScrollArea::InitializeCreateContext()\n    {\n        auto types = TypeOf(Asset).GetDerivedTypes();\n\n        for (auto& type : types)\n        {\n            if (!type->InvokeStatic<bool>(\"IsAvailableToCreateFromEditor\"))\n                continue;\n\n            if (type == &TypeOf(FolderAsset))\n                continue;\n\n            mContextMenu->AddItem(\"Create/\" + GetSmartName(type->GetName()),\n                                  [=]() { CreateAsset(type); });\n        }\n    }\n\n    Ref<AssetIcon> AssetsIconsScrollArea::GetAssetIconFromPool(const String& style)\n    {\n        if (!mIconsPool.ContainsKey(style))\n            mIconsPool.Add(style, Vector<Ref<AssetIcon>>());\n\n        int poolResizeStep = 10;\n\n        if (mIconsPool[style].Count() == 0)\n        {\n            for (int i = 0; i < poolResizeStep; i++)\n            {\n                auto sample = o2UI.CreateWidget<AssetIcon>(style);\n                mIconsPool[style].Add(sample);\n            }\n        }\n\n        auto sample = mIconsPool[style].PopBack();\n        return sample;\n    }\n\n    void AssetsIconsScrollArea::FreeAssetIconToPool(const Ref<AssetIcon>& icon)\n    {\n        if (mIconsPool.ContainsKey(icon->name))\n            mIconsPool[icon->name].Add(icon);\n    }\n\n    Ref<AssetIcon> AssetsIconsScrollArea::FindVisibleIcon(const Ref<AssetInfo>& info)\n    {\n        return mVisibleAssetIcons.FindOrDefault([=](auto& x) { return x->GetAssetInfo() == info; });\n    }\n\n    void AssetsIconsScrollArea::OnAssetDblClick(const Ref<AssetIcon>& icon)\n    {\n        AssetInfo iconAssetInfo = *icon->GetAssetInfo();\n        auto assetNameLabel = icon->GetChildWidget(\"nameLabel\");\n        if (assetNameLabel && assetNameLabel->IsUnderPoint(o2Input.cursorPos))\n        {\n            auto name = o2FileSystem.GetFileNameWithoutExtension(o2FileSystem.GetPathWithoutDirectories(iconAssetInfo.path));\n            StartAssetRenaming(icon, name, [=](const String& name)\n                               {\n                                   String extension = o2FileSystem.GetFileExtension(iconAssetInfo.path);\n                                   String newName = extension.IsEmpty() ? name : name + \".\" + extension;\n                                   o2Assets.RenameAsset(iconAssetInfo.meta->ID(), newName);\n                                   o2Assets.RebuildAssets();\n\n                                   String parentPath = o2FileSystem.GetParentPath(iconAssetInfo.path);\n                                   String newPath = parentPath.IsEmpty() ? newName : parentPath + \"/\" + newName;\n                                   o2EditorAssets.SelectAsset(newPath);\n                               });\n        }\n        else\n        {\n            if (iconAssetInfo.meta->GetAssetType() == &TypeOf(FolderAsset))\n                o2EditorAssets.OpenFolder(iconAssetInfo.path);\n            else\n                o2EditorAssets.OpenAndEditAsset(iconAssetInfo.meta->ID());\n        }\n    }\n\n    Ref<AssetIcon> AssetsIconsScrollArea::GetIconUnderPoint(const Vec2F& point) const\n    {\n        for (auto& child : mChildWidgets)\n        {\n            if (child->layout->IsPointInside(point))\n            {\n                auto icon = DynamicCast<AssetIcon>(child);\n                return icon;\n            }\n        }\n\n        return nullptr;\n    }\n\n    const Ref<Sprite>& AssetsIconsScrollArea::GetHighlightDrawable() const\n    {\n        return mHighlightSprite;\n    }\n\n    void AssetsIconsScrollArea::SetHighlightAnimation(const Ref<AnimationClip>& animation)\n    {\n        mHighlighClip = animation;\n        mHighlightAnim->SetClip(mHighlighClip);\n        mHighlightAnim->SetTarget(mHighlightSprite.Get());\n    }\n\n    void AssetsIconsScrollArea::SetHighlightLayout(const Layout& layout)\n    {\n        mHighlightLayout = layout;\n    }\n\n    const Ref<Sprite>& AssetsIconsScrollArea::GetSelectingDrawable() const\n    {\n        return mSelectionSprite;\n    }\n\n    bool AssetsIconsScrollArea::IsUnderPoint(const Vec2F& point)\n    {\n        return Widget::IsUnderPoint(point);\n    }\n\n#undef CopyFile\n\n    void AssetsIconsScrollArea::OnContextCopyPressed()\n    {\n        o2EditorAssets.CopyAssets(\n            mSelectedAssets.Convert<String>([](const Ref<AssetInfo>& x) { return x->path; }));\n    }\n\n    void AssetsIconsScrollArea::OnContextCutPressed()\n    {\n        o2EditorAssets.CutAssets(\n            mSelectedAssets.Convert<String>([](const Ref<AssetInfo>& x) { return x->path; }));\n    }\n\n    void AssetsIconsScrollArea::OnContextPastePressed()\n    {\n        o2EditorAssets.PasteAssets(mCurrentPath);\n        UpdateAssetsByCurrentPath();\n    }\n\n\n    void AssetsIconsScrollArea::OnContextDeletePressed()\n    {\n        o2EditorPropertiesWindow.ResetTargets();\n\n        mSelectedPreloadedAssets.Clear();\n\n        o2EditorAssets.DeleteAssets(\n            mSelectedAssets.Convert<String>([](const Ref<AssetInfo>& x) { return x->path; }));\n    }\n\n    void AssetsIconsScrollArea::OnContextOpenPressed()\n    {\n        if (mSelectedAssets.Count() > 0)\n            o2EditorAssets.OpenAndEditAsset(mSelectedAssets.Last()->meta->ID());\n    }\n\n    void AssetsIconsScrollArea::OnContextShowInExplorerPressed()\n    {\n        if (mSelectedAssets.Count() > 0)\n            o2EditorAssets.OpenAsset(mSelectedAssets.Last()->meta->ID());\n    }\n\n    void AssetsIconsScrollArea::CreateAsset(const Type* assetType)\n    {\n        String newAssetName = \"New \" + GetSmartName(assetType->GetName()).ReplacedAll(\": \", \" \");\n\n        auto extesions = assetType->InvokeStatic<Vector<String>>(\"GetFileExtensions\");\n        auto extension = !extesions.IsEmpty() ? extesions[0] : String(\"\");\n        String initialPath = mCurrentPath.IsEmpty() ? newAssetName : mCurrentPath + \"/\" + newAssetName;\n        if (!extension.IsEmpty())\n            initialPath += \".\" + extension;\n\n        auto objectType = dynamic_cast<const ObjectType*>(assetType);\n\n        mNewAsset = DynamicCast<Asset>(objectType->CreateSampleRef());\n        mNewAsset->SetPath(initialPath);\n        mAssetInfos.Add(mmake<AssetInfo>(mNewAsset->GetInfo()));\n\n        SortAssetInfos();\n        OnItemsUpdated(true);\n\n        int newIdx = mAssetInfos.IndexOf([&](const Ref<AssetInfo>& x) { return x->path == initialPath; });\n        if (newIdx < 0)\n            return;\n\n        Ref<AssetInfo> newAssetInfo = mAssetInfos[newIdx];\n        ScrollTo((void*)&mAssetInfos[newIdx]);\n\n        UpdateVisibleItems();\n        auto icon = FindVisibleIcon(newAssetInfo);\n        if (!icon)\n            return;\n\n        StartAssetRenaming(icon, newAssetName,\n                           [&, extension](const String& name)\n                           {\n                               String path = (!mCurrentPath.IsEmpty() ? mCurrentPath + \"/\" + name : name);\n                               if (!extension.IsEmpty())\n                                   path += \".\" + extension;\n\n                               mNewAsset->Save(path);\n\n                               o2Assets.RebuildAssets();\n                               o2EditorAssets.SelectAsset(path);\n                           });\n    }\n\n    Ref<Actor> AssetsIconsScrollArea::InstantiateAsset(const AssetRef<ImageAsset>& asset)\n    {\n        auto actor = mmake<Actor>();\n        auto comp = mmake<ImageComponent>(asset);\n        actor->AddComponent(comp);\n        comp->FitActorByImage();\n        return actor;\n    }\n\n    Ref<Actor> AssetsIconsScrollArea::InstantiateAsset(const AssetRef<ActorAsset>& asset)\n    {\n        return asset->GetActor()->CloneAsRef<Actor>();\n    }\n\n    void AssetsIconsScrollArea::OnAssetsPropertiesChanged()\n    {\n        for (auto& asset : mSelectedPreloadedAssets)\n            asset->SetDirty();\n\n        CheckPreloadedAssetsSaving();\n    }\n\n    void AssetsIconsScrollArea::CheckPreloadedAssetsSaving()\n    {\n        if (mChangePropertiesTargetsFromThis)\n            return;\n\n        for (auto& asset : mSelectedPreloadedAssets)\n            asset->Save();\n\n        mSelectedPreloadedAssets.Clear();\n    }\n\n    void AssetsIconsScrollArea::Select(const Ref<SelectableDragableObject>& object, bool sendOnSelectionChanged)\n    {\n        auto icon = DynamicCast<AssetIcon>(object);\n        auto info = icon->GetAssetInfo();\n\n        if (!mSelectedAssets.Contains(info))\n        {\n            icon->SetSelected(true);\n            mSelectedAssets.Add(info);\n\n            if (sendOnSelectionChanged)\n                OnAssetsSelected();\n        }\n    }\n\n    void AssetsIconsScrollArea::Deselect(const Ref<SelectableDragableObject>& object)\n    {\n        auto icon = DynamicCast<AssetIcon>(object);\n        auto info = icon->GetAssetInfo();\n\n        if (mSelectedAssets.Contains(info))\n        {\n            icon->SetSelected(false);\n            mSelectedAssets.Remove(info);\n\n            OnAssetsSelected();\n        }\n    }\n\n    void AssetsIconsScrollArea::AddSelectableObject(const Ref<SelectableDragableObject>& object)\n    {}\n\n    void AssetsIconsScrollArea::RemoveSelectableObject(SelectableDragableObject* object)\n    {}\n\n    void AssetsIconsScrollArea::OnSelectableObjectCursorReleased(const Ref<SelectableDragableObject>& object, const Input::Cursor& cursor)\n    {\n        //         if ((mPressedPoint - cursor.position).Length() > 5.0f)\n        //             return;\n\n        if (!o2Input.IsKeyDown(VK_CONTROL) && !o2Input.IsKeyDown(VK_SHIFT))\n            DeselectAllAssets();\n\n        if (o2Input.IsKeyDown(VK_SHIFT) && !mSelectedAssets.IsEmpty())\n        {\n            auto selectIcon = DynamicCast<AssetIcon>(object);\n            auto selectInfo = selectIcon->GetAssetInfo();\n            int iconUnderCursorIdx = mAssetInfos.IndexOf(selectInfo);\n            int lastSelectedIdx = mAssetInfos.IndexOf(mSelectedAssets.Last());\n\n            int begin = Math::Min(iconUnderCursorIdx, lastSelectedIdx);\n            int end = Math::Max(iconUnderCursorIdx, lastSelectedIdx);\n\n            for (int i = begin; i <= end; i++)\n            {\n                auto info = mAssetInfos[i];\n                if (mSelectedAssets.Contains(info))\n                    continue;\n\n                if (auto icon = FindVisibleIcon(info))\n                    Select(icon);\n                else\n                    mSelectedAssets.Add(info);\n            }\n        }\n        else\n        {\n            if (object->IsSelected())\n                Deselect(object);\n            else\n                Select(object);\n        }\n    }\n\n    void AssetsIconsScrollArea::OnSelectableObjectBeganDragging(const Ref<SelectableDragableObject>& object)\n    {\n        if (mSelecting)\n        {\n            Select(object, false);\n            mSelecting = false;\n        }\n\n        if (!o2Input.IsKeyDown(VK_CONTROL) && !mSelectedAssets.Contains(DynamicCast<AssetIcon>(object)->GetAssetInfo()))\n        {\n            for (auto& info : mSelectedAssets)\n            {\n                if (auto icon = FindVisibleIcon(info))\n                    icon->SetSelected(false);\n            }\n\n            mSelectedAssets.Clear();\n        }\n\n        if (!object->IsSelected())\n            Select(object, false);\n    }\n\n    Ref<Actor> AssetsIconsScrollArea::InstantiateAsset(const AssetInfo& assetInfo)\n    {\n        if (assetInfo.meta->GetAssetType() == &TypeOf(ImageAsset))\n            return InstantiateAsset(AssetRef<ImageAsset>(assetInfo.meta->ID()));\n        else if (assetInfo.meta->GetAssetType() == &TypeOf(ActorAsset))\n            return InstantiateAsset(AssetRef<ActorAsset>(assetInfo.meta->ID()));\n\n        return nullptr;\n    }\n\n    Vector<Ref<SelectableDragableObject>> AssetsIconsScrollArea::GetSelectedDragObjects() const\n    {\n        return DynamicCastVector<SelectableDragableObject>(mSelectedAssets);\n    }\n\n    Vector<Ref<SelectableDragableObject>> AssetsIconsScrollArea::GetAllObjects() const\n    {\n        return DynamicCastVector<SelectableDragableObject>(mChildWidgets);\n    }\n\n    void AssetsIconsScrollArea::Select(const Ref<SelectableDragableObject>& object)\n    {\n        Select(object, true);\n    }\n\n    void AssetsIconsScrollArea::StartAssetRenaming(const Ref<AssetIcon>& icon, const String& name,\n                                                   const Function<void(const String&)>& onCompleted)\n    {\n        icon->SetState(\"edit\", true);\n\n        auto editBox = icon->GetChildByType<EditBox>(\"nameEditBox\");\n        editBox->text = name;\n\n        editBox->SelectAll();\n        editBox->Focus();\n        editBox->ResetScroll();\n\n        editBox->onChangeCompleted = [=](const WString& text) {\n            icon->SetState(\"edit\", false);\n            onCompleted(text);\n        };\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AssetsIconsScrollArea>);\n// --- META ---\n\nDECLARE_CLASS(Editor::AssetsIconsScrollArea, Editor__AssetsIconsScrollArea);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h",
    "content": "#pragma once\n\n#include \"o2/Assets/AssetInfo.h\"\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Scene/UI/Widgets/GridLayoutScrollArea.h\"\n#include \"o2/Utils/Editor/DragAndDrop.h\"\n#include \"o2/Utils/Types/Containers/Pair.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n    class Sprite;\n    class ContextMenu;\n    class GridLayout;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(ActorProperty);\n    FORWARD_CLASS_REF(ComponentProperty);\n    FORWARD_CLASS_REF(SceneHierarchyTree);\n    FORWARD_CLASS_REF(AssetIcon);\n\n    // ------------------------\n    // Assets icons scroll area\n    // ------------------------\n    class AssetsIconsScrollArea: public GridLayoutScrollArea, public DragDropArea, public KeyboardEventsListener,  public ISelectableDragableObjectsGroup\n    {\n    public:\n        Function<void(const Vector<String>&)> onAssetsSelected; // Assets selected event\n\n    public:\n        // Default constructor\n        AssetsIconsScrollArea(RefCounter* refCounter);\n\n        // Copy-constructor\n        AssetsIconsScrollArea(RefCounter* refCounter, const AssetsIconsScrollArea& other);\n\n        // Copy-constructor\n        AssetsIconsScrollArea(const AssetsIconsScrollArea& other);\n\n        // Destructor\n        ~AssetsIconsScrollArea();\n\n        // Copy-operator\n        AssetsIconsScrollArea& operator=(const AssetsIconsScrollArea& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Updates widget\n        void Update(float dt) override;\n\n        // Sets current assets viewing path\n        void SetViewingPath(const String& path);\n\n        // Returns viewing path\n        const String& GetViewingPath() const;\n\n        // Updates assets path contents\n        void UpdateAssetsByCurrentPath();\n\n        // Creates asset and starts renaming\n        void CreateAsset(const Type* assetType);\n\n        // Highlights asset\n        void HighlightAsset(const UID& id);\n\n        // Selects asset\n        void SelectAsset(const UID& id, bool scrsoll = true);\n\n        // Deselects all assets\n        void DeselectAllAssets();\n\n        // Returns context menu\n        const Ref<ContextMenu>& GetContextMenu() const;\n\n        // Returns selected assets infos\n        const Vector<Ref<AssetInfo>>& GetSelectedAssets() const;\n\n        // Return asset icon under point\n        Ref<AssetIcon> GetIconUnderPoint(const Vec2F& point) const;\n\n        // Returns node highlight drawable\n        const Ref<Sprite>& GetHighlightDrawable() const;\n\n        // Sets highlight animation\n        void SetHighlightAnimation(const Ref<AnimationClip>& animation);\n\n        // Sets highlight layout\n        void SetHighlightLayout(const Layout& layout);\n\n        // Returns selecting rectangle drawable\n        const Ref<Sprite>& GetSelectingDrawable() const;\n\n        // Returns is this widget can be selected\n        bool IsFocusable() const override;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(AssetsIconsScrollArea);\n        CLONEABLE_REF(AssetsIconsScrollArea);\n\n    protected:\n        const Vec2F mAssetIconSize = Vec2F(50, 60);\n                                \n        String mCurrentPath = \"_\"; // Current viewing path\n\n        Vector<Ref<AssetInfo>> mAssetInfos;        // Asset infos in path @IGNORE\n        Vector<Ref<AssetIcon>> mVisibleAssetIcons; // Visible asset icons\n\n        Ref<ContextMenu> mContextMenu; // Assets Context menu\n                                \n        Vector<Ref<AssetInfo>>  mSelectedAssets;          // Selected assets icons @IGNORE\n        Vector<AssetRef<Asset>> mSelectedPreloadedAssets; // Preloaded selected assets\n\n        AssetRef<Asset> mNewAsset; // Temporary new asset. Used when creating new asset\n                                \n        Ref<AssetIcon>       mHighlightIcon;                            // Current highlighting asset icon\n        Ref<AnimationClip>   mHighlighClip;                             // Node highlight animation clip @SERIALIZABLE \n        Ref<AnimationPlayer> mHighlightAnim = mmake<AnimationPlayer>(); // Icon highlight animation\n        Ref<Sprite>          mHighlightSprite;                          // Icon highlight sprite @SERIALIZABLE\n        Layout               mHighlightLayout;                          // Icon highlight sprite layout @SERIALIZABLE\n                                \n        Map<String, Vector<Ref<AssetIcon>>> mIconsPool; // Assets icons pool\n                                \n        Ref<Sprite>            mSelectionSprite;       // Icons selection rectangle sprite @SERIALIZABLE\n        bool                   mSelecting = false;     // Is selecting icons \n        Vec2F                  mPressedPoint;          // Pressed point\n        Vector<Ref<AssetInfo>> mCurrentSelectingInfos; // Selecting icons at current selection @IGNORE\n                                \n        bool                             mIsDraggingIcons = false;      // Is dragging icons\n        bool                             mDragEnded = false;            // Is dragging ended\n        Ref<AssetIcon>                   mDragIcon;                     // Dragging icon\n        Vec2F                            mDragOffset;                   // Dragging offset from cursor to icon center\n        Vector<Ref<SceneEditableObject>> mInstantiatedSceneDragObjects; // Instantiated objects when dragging asset above scene\n\n        Vector<Pair<UID, String>> mCuttingAssets; // Current cutted assets\n                                \n        bool mChangePropertiesTargetsFromThis = false;\n\n    protected:\n        // Returns items count, calls getItemsCountFunc\n        int GetItemsCount() const override;\n\n        // Returns items in range from start to end, calls getItemsRangeFunc\n        Vector<void*> GetItemsRange(int start, int end) const override;\n\n        // Sets item widget, calls setupItemFunc\n        void SetupItemWidget(const Ref<Widget>& widget, void* item) override;\n\n        // Updates visible items\n        void UpdateVisibleItems() override;\n\n        // Called when widget was selected\n        void OnFocused() override;\n\n        // Called when widget was deselected\n        void OnUnfocused() override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        // Called when key was released\n        void OnKeyReleased(const Input::Key& key) override;\n\n        // Called when assets selection was changed\n        void OnAssetsSelected();\n\n        // Updates cutting assets\n        void UpdateCuttingAssets();\n\n        // Begins selecting icons\n        void BeginSelecting();\n\n        // Updates selection frame\n        void UpdateSelection(const Input::Cursor& cursor);\n\n        // Completes selecting\n        void CompleteSelecting();\n\n        // Sorts current asset infos\n        void SortAssetInfos();\n\n        // Registers objects creation undo action\n        void RegObjectsCreationAction();\n\n        // Initializes assets context menu\n        void InitializeContext();\n\n        // Initializes assets create context menu\n        void InitializeCreateContext();\n\n        // Returns asset icon from pool or creates new by style name\n        Ref<AssetIcon> GetAssetIconFromPool(const String& style);\n\n        // Frees icon to pool\n        void FreeAssetIconToPool(const Ref<AssetIcon>& icon);\n\n        // Returns asset icon if visible\n        Ref<AssetIcon> FindVisibleIcon(const Ref<AssetInfo>& info);\n\n        // Called when asset icon double clicked, starting editing name\n        void OnAssetDblClick(const Ref<AssetIcon>& icon);\n\n        // Starts asset icon renaming, calls onCompletedwhen completed\n        void StartAssetRenaming(const Ref<AssetIcon>& icon, const String& name, const Function<void(const String&)>& onCompleted);\n\n        // Called when context copy pressed\n        void OnContextCopyPressed();\n\n        // Called when context cut pressed\n        void OnContextCutPressed();\n\n        // Called when context paste pressed\n        void OnContextPastePressed();\n\n        // Called when context delete pressed\n        void OnContextDeletePressed();\n\n        // Called when context open pressed\n        void OnContextOpenPressed();\n\n        // Called when context show in explorer pressed\n        void OnContextShowInExplorerPressed();\n\n        // Instantiates dragging assets\n        void InstantiateDraggingAssets();\n\n        // Removes and clears instantiated dragging assets\n        void ClearInstantiatedDraggingAssets();\n\n        // Instantiate actor from asset info\n        Ref<Actor> InstantiateAsset(const AssetInfo& assetInfo);\n\n        // Dummy asset instantiate function from asset\n        template<typename _type>\n        Ref<Actor> InstantiateAsset(const _type& asset);\n\n        // Instantiate actor from image asset\n        Ref<Actor> InstantiateAsset(const AssetRef<ImageAsset>& asset);\n\n        // Instantiate actor from actor asset\n        Ref<Actor> InstantiateAsset(const AssetRef<ActorAsset>& asset);\n\n        // Called when assets was changed from properties\n        void OnAssetsPropertiesChanged();\n\n        // Checks preloaded assets for saving\n        void CheckPreloadedAssetsSaving();\n        \n// ISelectableDragableObjectsGroup implementation\n\n        // Returns selected objects in group\n        Vector<Ref<SelectableDragableObject>> GetSelectedDragObjects() const override;\n\n        // Returns all objects in group \n        Vector<Ref<SelectableDragableObject>> GetAllObjects() const override;\n\n        // Selects object\n        void Select(const Ref<SelectableDragableObject>& object) override;\n\n        // Selects object\n        void Select(const Ref<SelectableDragableObject>& object, bool sendOnSelectionChanged);\n\n        // Deselects object\n        void Deselect(const Ref<SelectableDragableObject>& object) override;\n\n        // Adds selectable object to group\n        void AddSelectableObject(const Ref<SelectableDragableObject>& object) override;\n\n        // Removes selectable object from group\n        void RemoveSelectableObject(SelectableDragableObject* object) override;\n\n        // Called when selectable draggable object was released\n        void OnSelectableObjectCursorReleased(const Ref<SelectableDragableObject>& object, const Input::Cursor& cursor) override;\n\n        // Called when selectable object was began to drag\n        void OnSelectableObjectBeganDragging(const Ref<SelectableDragableObject>& object) override;\n\n// DragDropArea implementation\n        // Called when some drag listeners was entered to this area\n        void OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was dragged above this area\n        void OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was exited from this area\n        void OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some selectable listeners was dropped to this\n        void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when dropped dragged scene tree nodes selected and started dragging from scene tree\n        void OnDroppedFromSceneTree(const Ref<SceneHierarchyTree>& sceneTree);\n\n        // Called when dropped dragged assets icons selected and started dragging from this\n        void OnDroppedFromThis();\n\n        // Begins dragging selected items\n        void BeginDragging(const Ref<AssetIcon>& icon);\n\n        // Ends dragging items\n        void EndDragging(bool droppedToThis = false);\n\n        // Updates dragging graphics\n        void UpdateDraggingGraphics(); \n        \n        REF_COUNTERABLE_IMPL(GridLayoutScrollArea);\n\n        friend class AssetsWindow;\n        friend class SceneEditScreen;\n        friend class SceneHierarchyTree;\n        friend class AssetIcon;\n        friend class SceneTree;\n    };\n\n    template<typename _type>\n    Ref<Actor> AssetsIconsScrollArea::InstantiateAsset(const _type& asset)\n    {\n        return nullptr;\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AssetsIconsScrollArea)\n{\n    BASE_CLASS(o2::GridLayoutScrollArea);\n    BASE_CLASS(o2::DragDropArea);\n    BASE_CLASS(o2::KeyboardEventsListener);\n    BASE_CLASS(o2::ISelectableDragableObjectsGroup);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AssetsIconsScrollArea)\n{\n    FIELD().PUBLIC().NAME(onAssetsSelected);\n    FIELD().PROTECTED().DEFAULT_VALUE(Vec2F(50, 60)).NAME(mAssetIconSize);\n    FIELD().PROTECTED().DEFAULT_VALUE(\"_\").NAME(mCurrentPath);\n    FIELD().PROTECTED().NAME(mVisibleAssetIcons);\n    FIELD().PROTECTED().NAME(mContextMenu);\n    FIELD().PROTECTED().NAME(mSelectedPreloadedAssets);\n    FIELD().PROTECTED().NAME(mNewAsset);\n    FIELD().PROTECTED().NAME(mHighlightIcon);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHighlighClip);\n    FIELD().PROTECTED().DEFAULT_VALUE(mmake<AnimationPlayer>()).NAME(mHighlightAnim);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHighlightSprite);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHighlightLayout);\n    FIELD().PROTECTED().NAME(mIconsPool);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectionSprite);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mSelecting);\n    FIELD().PROTECTED().NAME(mPressedPoint);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsDraggingIcons);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mDragEnded);\n    FIELD().PROTECTED().NAME(mDragIcon);\n    FIELD().PROTECTED().NAME(mDragOffset);\n    FIELD().PROTECTED().NAME(mInstantiatedSceneDragObjects);\n    FIELD().PROTECTED().NAME(mCuttingAssets);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mChangePropertiesTargetsFromThis);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AssetsIconsScrollArea)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AssetsIconsScrollArea&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AssetsIconsScrollArea&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetViewingPath, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetViewingPath);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateAssetsByCurrentPath);\n    FUNCTION().PUBLIC().SIGNATURE(void, CreateAsset, const Type*);\n    FUNCTION().PUBLIC().SIGNATURE(void, HighlightAsset, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectAsset, const UID&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeselectAllAssets);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ContextMenu>&, GetContextMenu);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<AssetInfo>>&, GetSelectedAssets);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AssetIcon>, GetIconUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetHighlightDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHighlightAnimation, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHighlightLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetSelectingDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFocusable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(int, GetItemsCount);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<void*>, GetItemsRange, int, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetupItemWidget, const Ref<Widget>&, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateVisibleItems);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUnfocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetsSelected);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateCuttingAssets);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginSelecting);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateSelection, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CompleteSelecting);\n    FUNCTION().PROTECTED().SIGNATURE(void, SortAssetInfos);\n    FUNCTION().PROTECTED().SIGNATURE(void, RegObjectsCreationAction);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeContext);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeCreateContext);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<AssetIcon>, GetAssetIconFromPool, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, FreeAssetIconToPool, const Ref<AssetIcon>&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<AssetIcon>, FindVisibleIcon, const Ref<AssetInfo>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetDblClick, const Ref<AssetIcon>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, StartAssetRenaming, const Ref<AssetIcon>&, const String&, const Function<void(const String&)>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCopyPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCutPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextPastePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextDeletePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextOpenPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextShowInExplorerPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, InstantiateDraggingAssets);\n    FUNCTION().PROTECTED().SIGNATURE(void, ClearInstantiatedDraggingAssets);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Actor>, InstantiateAsset, const AssetInfo&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Actor>, InstantiateAsset, const AssetRef<ImageAsset>&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Actor>, InstantiateAsset, const AssetRef<ActorAsset>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetsPropertiesChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckPreloadedAssetsSaving);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Ref<SelectableDragableObject>>, GetSelectedDragObjects);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Ref<SelectableDragableObject>>, GetAllObjects);\n    FUNCTION().PROTECTED().SIGNATURE(void, Select, const Ref<SelectableDragableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, Select, const Ref<SelectableDragableObject>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, Deselect, const Ref<SelectableDragableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddSelectableObject, const Ref<SelectableDragableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveSelectableObject, SelectableDragableObject*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectableObjectCursorReleased, const Ref<SelectableDragableObject>&, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectableObjectBeganDragging, const Ref<SelectableDragableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnter, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraggedAbove, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExit, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDropped, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDroppedFromSceneTree, const Ref<SceneHierarchyTree>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDroppedFromThis);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginDragging, const Ref<AssetIcon>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, EndDragging, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateDraggingGraphics);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AssetsWindow/AssetsWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AssetsWindow.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Assets/Types/AnimationAsset.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/AssetsTree.h\"\n#include \"o2/Assets/Types/DataAsset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/GridLayout.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/System/Clipboard.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetIcon.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n#include \"o2Editor/Windows/AssetsWindow/FoldersTree.h\"\n#include \"o2Editor/EditorConfig.h\"\n\nDECLARE_SINGLETON(Editor::AssetsWindow);\n\nnamespace Editor\n{\n    AssetsWindow::AssetsWindow(RefCounter* refCounter):\n        Singleton<AssetsWindow>(refCounter), IEditorWindow(refCounter)\n    {\n        if (Application::IsSingletonInitialzed() && o2Application.IsReady())\n            InitializeWindow();\n    }\n\n    AssetsWindow::~AssetsWindow()\n    {}\n\n    void AssetsWindow::InitializeWindow()\n    {\n        o2Assets.onAssetsRebuilt += THIS_FUNC(OnAssetsRebuilt);\n\n        mWindow->caption = \"Assets\";\n        mWindow->name = \"assets window\";\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_folder_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 1)));\n        mWindow->SetViewLayout(Layout::BothStretch(-2, 0, 0, 18));\n        mWindow->SetClippingLayout(Layout::BothStretch(-1, 0, 0, 18));\n\n        InitializeUpPanel();\n        InitializeDownPanel();\n        InitializeFoldersTree();\n        InitializeFoldersTreeVisibleState();\n        InitializeFoldersTreeSeparator();\n\n        OpenFolder(\"\");\n    }\n\n    void AssetsWindow::InitializeFoldersTreeSeparator()\n    {\n        auto separatorLayer = mFoldersTree->FindLayer(\"separator\");\n\n        mSeparatorHandle = mmake<CursorEventsArea>();\n        mSeparatorHandle->isUnderPoint = [=](const Vec2F& point) {\n            RectF rt = separatorLayer->GetDrawable()->GetRect();\n            rt.left -= 2; rt.right += 2;\n            return rt.IsInside(point);\n        };\n\n        mSeparatorCoef = 0.0f; // o2EditorConfig.GetProjectUserData()[\"layout/assetsWindow/separator_coef\"];\n\n        if (mSeparatorCoef < FLT_EPSILON)\n            mSeparatorCoef = 0.2f;\n\n        mFoldersTree->layout->anchorRight = mSeparatorCoef;\n        mAssetsGridScroll->layout->anchorLeft = mSeparatorCoef;\n\n        mSeparatorHandle->onMoved = [&](const Input::Cursor& cursor) {\n            float anchorDelta = cursor.delta.x / mWindow->layout->width;\n            mFoldersTree->layout->anchorRight += anchorDelta;\n            mAssetsGridScroll->layout->anchorLeft += anchorDelta;\n\n//             auto& userData = o2EditorConfig.GetProjectUserData();\n//             userData[\"layout/assetsWindow/separator_coef\"].Set(mFoldersTree->layout->GetAnchorRight());\n        };\n\n        mAssetsGridScroll->onDraw += [&]() { mSeparatorHandle->OnDrawn(); };\n\n        mSeparatorHandle->cursorType = CursorType::SizeWE;\n    }\n\n    void AssetsWindow::InitializeFoldersTreeVisibleState()\n    {\n        mFoldersTreeShowCoef = 1.0f;\n        mFoldersTreeVisible = true;\n\n        mFoldersTreeShowAnim->SetTarget(this);\n        mFoldersTreeShowAnim->SetClip(AnimationClip::EaseInOut(\"mFoldersTreeShowCoef\", 0.0f, 1.0f, 0.4f));\n        mFoldersTreeShowAnim->GoToEnd();\n\n        mFoldersTreeShowAnim->onUpdate = [&](float dt) {\n            mFoldersTree->layout->anchorRight = mSeparatorCoef*mFoldersTreeShowCoef;\n            mAssetsGridScroll->layout->anchorLeft = mSeparatorCoef*mFoldersTreeShowCoef;\n\n            float disableCoef = 0.2f;\n            if (mFoldersTreeShowCoef < disableCoef && mFoldersTree->IsEnabled())\n                mFoldersTree->Hide();\n\n            if (mFoldersTreeShowCoef >= disableCoef && !mFoldersTree->IsEnabled())\n                mFoldersTree->Show();\n        };\n    }\n\n    void AssetsWindow::InitializeFoldersTree()\n    {\n        mFoldersTree = mmake<AssetsFoldersTree>();\n        *mFoldersTree->layout = WidgetLayout(0.0f, 1.0f, 0.5f, 0.0f, 5.0f, -18.0f, 0.0f, 18.0f);\n\n        mFoldersTree->AddLayer(\"separator\", mmake<Sprite>(\"ui/UI4_Ver_separator.png\"),\n                               Layout::VerStretch(HorAlign::Right, -2, 0, 5, 0));\n        \n        mFoldersTree->UpdateView();\n        mWindow->AddChild(mFoldersTree);\n\n        // assets scroll & grid\n        mAssetsGridScroll = o2UI.CreateWidget<AssetsIconsScrollArea>();\n        *mAssetsGridScroll->layout = WidgetLayout(0.5f, 1.0f, 1.0f, 0.0f, 0.0f, -18.0f, 0.0f, 18.0f);\n        mWindow->AddChild(mAssetsGridScroll);\n        mWindow->AddInternalWidget(mAssetsGridScroll->GetContextMenu());\n\n        mAssetsGridScroll->onAssetsSelected = [&](const Vector<String>& assetsPaths) {\n            if (!assetsPaths.IsEmpty())\n                mSelectedAssetPathLabel->text = assetsPaths.Last();\n            else\n                mSelectedAssetPathLabel->text = mAssetsGridScroll->GetViewingPath();\n        };\n    }\n\n    void AssetsWindow::InitializeDownPanel()\n    {\n        auto downPanel = mmake<Widget>();\n        downPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_small_panel_down_back.png\"),\n                            Layout::BothStretch(-4, -5, -4, -5));\n        *downPanel->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 20, 0);\n\n        auto showTreeBtn = o2UI.CreateWidget<Button>(\"menu tree\");\n        *showTreeBtn->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(0, 0));\n        showTreeBtn->onClick += THIS_FUNC(OnShowTreePressed);\n        downPanel->AddChild(showTreeBtn);\n\n        mSelectedAssetPathLabel = o2UI.CreateWidget<Label>();\n        *mSelectedAssetPathLabel->layout = WidgetLayout::BothStretch(20, 0, 0, 0);\n        mSelectedAssetPathLabel->text = \"o2/Assets/Folder/Image.png\";\n        mSelectedAssetPathLabel->horOverflow = Label::HorOverflow::Dots;\n        mSelectedAssetPathLabel->horAlign = HorAlign::Left;\n        downPanel->AddChild(mSelectedAssetPathLabel);\n\n        mWindow->AddChild(downPanel);\n    }\n\n    void AssetsWindow::InitializeUpPanel()\n    {\n        auto upPanel = mmake<Widget>();\n        upPanel->name = \"up panel\";\n        *upPanel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 20, 0);\n        upPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_square_field.png\"), Layout::BothStretch(-4, -4, -5, -5));\n\n        auto searchButton = o2UI.CreateWidget<Button>(\"search\");\n        *searchButton->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(1, 1));\n        upPanel->AddChild(searchButton);\n\n        mFilterButton = o2UI.CreateWidget<Button>(\"menu filter\");\n        *mFilterButton->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(0, 0));\n        mFilterButton->onClick += THIS_FUNC(OnMenuFilterPressed);\n        upPanel->AddChild(mFilterButton);\n\n        mSearchEditBox = o2UI.CreateWidget<EditBox>(\"backless\");\n        *mSearchEditBox->layout = WidgetLayout::BothStretch(19, 2, 21, -2);\n        mSearchEditBox->onChanged += THIS_FUNC(OnSearchEdited);\n        upPanel->AddChild(mSearchEditBox);\n\n        mWindow->AddChild(upPanel);\n    }\n\n    void AssetsWindow::Update(float dt)\n    {\n        IEditorWindow::Update(dt);\n        mFoldersTreeShowAnim->Update(dt);\n    }\n\n    void AssetsWindow::SelectAsset(const UID& id)\n    {\n        String assetPath = o2Assets.GetAssetPath(id);\n        String folder = o2FileSystem.GetParentPath(assetPath);\n\n        if (GetOpenedFolderPath() != folder)\n            OpenFolder(folder);\n\n        mAssetsGridScroll->SelectAsset(id);\n    }\n\n    void AssetsWindow::SelectAsset(const String& path)\n    {\n        const UID& id = o2Assets.GetAssetId(path);\n        String folder = o2FileSystem.GetParentPath(path);\n\n        if (GetOpenedFolderPath() != folder)\n            OpenFolder(folder);\n\n        mAssetsGridScroll->SelectAsset(id);\n    }\n\n    void AssetsWindow::SelectAsset(const Vector<UID>& ids)\n    {\n        for (auto& id : ids)\n            SelectAsset(id);\n    }\n\n    void AssetsWindow::SelectAssets(const Vector<String>& paths)\n    {\n        for (auto& path : paths)\n            SelectAsset(path);\n    }\n\n    void AssetsWindow::OpenAsset(const UID& id)\n    {\n        OpenAsset(o2Assets.GetAssetPath(id));\n    }\n\n    void AssetsWindow::OpenAsset(const String& path)\n    {\n        String fullPath = o2FileSystem.GetParentPath(o2Application.GetBinPath() + \"/\" + o2Assets.GetAssetsPath() + path);\n#if defined PLATFORM_WINDOWS\n        ShellExecute(NULL, \"explore\", fullPath, NULL, NULL, SW_SHOWNORMAL);\n#endif\n    }\n\n    void AssetsWindow::OpenAndEditAsset(const UID& id)\n    {\n        OpenAndEditAsset(o2Assets.GetAssetPath(id));\n    }\n\n    void AssetsWindow::OpenAndEditAsset(const String& path)\n    {\n        String fullPath = o2Application.GetBinPath() + \"/\" + o2Assets.GetAssetsPath() + path;\n#if defined PLATFORM_WINDOWS\n        ShellExecute(NULL, \"edit\", fullPath, NULL, NULL, SW_SHOWNORMAL);\n#endif\n    }\n\n    void AssetsWindow::DeselectAssets()\n    {\n        mAssetsGridScroll->DeselectAllAssets();\n    }\n\n    const Vector<Ref<AssetInfo>>& AssetsWindow::GetSelectedAssets() const\n    {\n        return mAssetsGridScroll->GetSelectedAssets();\n    }\n\n    String AssetsWindow::GetOpenedFolderPath() const\n    {\n        return mAssetsGridScroll->GetViewingPath();\n    }\n\n    void AssetsWindow::OpenFolder(const String& path)\n    {\n        mAssetsGridScroll->SetViewingPath(path);\n        mFoldersTree->SelectAndExpandFolder(path);\n        mSelectedAssetPathLabel->text = path;\n    }\n\n    void AssetsWindow::ShowAssetIcon(const UID& id)\n    {\n        String assetPath = o2Assets.GetAssetPath(id);\n        String folder = o2FileSystem.GetParentPath(assetPath);\n\n        ShowAssetIcon(folder, id);\n    }\n\n    void AssetsWindow::ShowAssetIcon(const String& path)\n    {\n        UID assetId = o2Assets.GetAssetId(path);\n        String folder = o2FileSystem.GetParentPath(path);\n\n        ShowAssetIcon(folder, assetId);\n    }\n\n    void AssetsWindow::ShowAssetIcon(const String& folder, UID assetId)\n    {\n        if (GetOpenedFolderPath() != folder)\n            OpenFolder(folder);\n\n        mAssetsGridScroll->HighlightAsset(assetId);\n    }\n\n    void AssetsWindow::CopyAssets(const Vector<String>& assetsPaths)\n    {\n        mCuttingAssets.Clear();\n        mAssetsGridScroll->UpdateCuttingAssets();\n\n        Vector<WString> paths;\n        for (auto& path : assetsPaths)\n            paths.Add(o2Application.GetBinPath() + \"/\" + o2Assets.GetAssetsPath() + path);\n\n        Clipboard::CopyFiles(paths);\n    }\n\n    void AssetsWindow::CopyAssetFolder(const String& src, const String& dst)\n    {\n        o2FileSystem.FolderCreate(dst);\n\n        FolderInfo info = o2FileSystem.GetFolderInfo(src);\n        info.ClampPathNames();\n\n        for (auto& file : info.files)\n        {\n            if (!file.path.EndsWith(\".meta\"))\n                o2FileSystem.FileCopy(src + \"/\" + file.path, dst + \"/\" + file.path);\n        }\n\n        for (auto& folder : info.folders)\n            CopyAssetFolder(src + \"/\" + folder.path, dst + \"/\" + folder.path);\n    }\n\n    void AssetsWindow::CutAssets(const Vector<String>& assetsPaths)\n    {\n        mCuttingAssets.Clear();\n\n        Vector<WString> paths;\n        for (auto& path : assetsPaths)\n        {\n            String fullPath = o2Application.GetBinPath() + \"/\" + o2Assets.GetAssetsPath() + path;\n            mCuttingAssets.Add(Pair<UID, String>(o2Assets.GetAssetId(path), fullPath));\n            paths.Add(fullPath);\n        }\n\n        Clipboard::CopyFiles(paths);\n\n        mAssetsGridScroll->UpdateCuttingAssets();\n    }\n\n    void AssetsWindow::PasteAssets(const String& targetPath)\n    {\n        Vector<WString> paths = Clipboard::GetCopyFiles();\n        for (auto& path : paths)\n        {\n            String fileName = o2FileSystem.GetPathWithoutDirectories(path);\n            String extension = o2FileSystem.GetFileExtension(fileName);\n            String fileNameWithoutExt = o2FileSystem.GetFileNameWithoutExtension(fileName);\n\n            bool isFolder = extension.IsEmpty();\n\n            String copyFileName = o2Application.GetBinPath() + \"/\" + o2Assets.GetAssetsPath() + targetPath + \"/\" + fileName;\n            bool endsAsCopy = fileNameWithoutExt.EndsWith(\"copy\");\n            int i = 0;\n            while (o2FileSystem.IsFileExist(copyFileName))\n            {\n                copyFileName = o2Application.GetBinPath() + \"/\" + o2Assets.GetAssetsPath() + targetPath + \"/\" +\n                    fileNameWithoutExt;\n\n                if (!endsAsCopy)\n                    copyFileName += \" copy\";\n\n                if (i > 0)\n                    copyFileName += (String)(i + 1) + \".\" + extension;\n\n                if (!isFolder)\n                    copyFileName += \".\" + extension;\n\n                i++;\n            }\n\n            if (mCuttingAssets.Contains([&](auto x) { return x.second == (String)path; }))\n            {\n                o2FileSystem.FileMove(path, copyFileName);\n                o2FileSystem.FileMove(path + \".meta\", copyFileName + \".meta\");\n            }\n            else\n            {\n                if (!isFolder)\n                    o2FileSystem.FileCopy(path, copyFileName);\n                else\n                    CopyAssetFolder(path, copyFileName);\n            }\n        }\n\n        mCuttingAssets.Clear();\n        mAssetsGridScroll->UpdateCuttingAssets();\n\n        o2Assets.RebuildAssets();\n    }\n\n    void AssetsWindow::DeleteAssets(const Vector<String>& assetsPaths)\n    {\n        mCuttingAssets.Clear();\n        mAssetsGridScroll->UpdateCuttingAssets();\n\n        for (auto& path : assetsPaths)\n            o2Assets.RemoveAsset(path);\n\n        o2Assets.RebuildAssets();\n    }\n\n    Ref<Sprite> AssetsWindow::GetAssetIconSprite(const AssetRef<Asset>& asset)\n    {\n        const Type& type = asset->GetType();\n\n        if (type == TypeOf(ImageAsset))\n            return mmake<Sprite>(asset->GetPath());\n        else if (type == TypeOf(ActorAsset))\n            return mmake<Sprite>(\"ui/UI4_actor_icon.png\");\n        else if (type == TypeOf(FolderAsset))\n            return mmake<Sprite>(\"ui/UI4_big_folder_icon.png\");\n        else if (type == TypeOf(DataAsset))\n            return mmake<Sprite>(\"ui/UI4_big_text_file_icon.png\");\n        else if (type == TypeOf(AnimationAsset))\n            return mmake<Sprite>(\"ui/UI4_anim_file_icon.png\"); \n\n        return mmake<Sprite>(\"ui/UI4_big_file_icon.png\"); \n    }\n\n    Ref<RefCounterable> AssetsWindow::CastToRefCounterable(const Ref<AssetsWindow>& ref)\n    {\n        return DynamicCast<Singleton<AssetsWindow>>(ref);\n    }\n\n    void AssetsWindow::OnSearchEdited(const WString& search)\n    {}\n\n    void AssetsWindow::OnMenuFilterPressed()\n    {}\n\n    void AssetsWindow::OnShowTreePressed()\n    {\n        mFoldersTreeVisible = !mFoldersTreeVisible;\n\n        if (mFoldersTreeVisible)\n            mFoldersTreeShowAnim->PlayForward();\n        else\n            mFoldersTreeShowAnim->PlayBack();\n    }\n\n    void AssetsWindow::OnAssetsRebuilt(const Vector<UID>& changedAssets)\n    {\n        mFoldersTree->UpdateView();\n        mFoldersTree->SelectAndExpandFolder(mAssetsGridScroll->GetViewingPath());\n\n        mAssetsGridScroll->UpdateAssetsByCurrentPath();\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::AssetsWindow, Editor__AssetsWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AssetsWindow/AssetsWindow.h",
    "content": "#pragma once\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Containers/Pair.h\"\n#include \"o2Editor/Windows/IEditorWindow.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(Sprite);\n    FORWARD_CLASS_REF(Button);\n    FORWARD_CLASS_REF(EditBox);\n    FORWARD_CLASS_REF(GridLayout);\n    FORWARD_CLASS_REF(Label);\n    FORWARD_CLASS_REF(ScrollArea);\n    FORWARD_CLASS_REF(Tree);\n    FORWARD_CLASS_REF(TreeNode);\n    FORWARD_CLASS_REF(Widget);\n}\n\n// Editor assets window accessor macros\n#define o2EditorAssets AssetsWindow::Instance()\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AssetsIconsScrollArea);\n    FORWARD_CLASS_REF(AssetsFoldersTree);\n\n    // -------------\n    // Assets window\n    // -------------\n    class AssetsWindow: public Singleton<AssetsWindow>, public IEditorWindow\n    {\n    public:\n        // Default constructor. Initializes window\n        AssetsWindow(RefCounter* refCounter);\n\n        // Destructor\n        ~AssetsWindow();\n\n        // Updates window logic\n        void Update(float dt) override;\n\n        // Selects asset with id\n        void SelectAsset(const UID& id);\n\n        // Selects asset by path\n        void SelectAsset(const String& path);\n\n        // Selects assets with ids\n        void SelectAsset(const Vector<UID>& ids);\n\n        // Selects assets by paths\n        void SelectAssets(const Vector<String>& paths);\n\n        // Deselects all assets\n        void DeselectAssets();\n\n        // Returns selected assets infos\n        const Vector<Ref<AssetInfo>>& GetSelectedAssets() const;\n\n        // Opens asset in folder\n        void OpenAsset(const UID& id);\n\n        // Opens asset in folder\n        void OpenAsset(const String& path);\n\n        // Opens asset for editing \n        void OpenAndEditAsset(const UID& id);\n\n        // Opens asset for editing \n        void OpenAndEditAsset(const String& path);\n\n        // Returns opened folder path\n        String GetOpenedFolderPath() const;\n\n        // Opens folder\n        void OpenFolder(const String& path);\n\n        // Shows asset\n        void ShowAssetIcon(const UID& id);\n\n        // Shows asset\n        void ShowAssetIcon(const String& path);\n\n        // Copy assets in clipboard\n        void CopyAssets(const Vector<String>& assetsPaths);\n\n        // Cut assets and put into clipboard\n        void CutAssets(const Vector<String>& assetsPaths);\n\n        // Paste assets from clipboard to path\n        void PasteAssets(const String& targetPath);\n\n        // Removes assets in clipboard\n        void DeleteAssets(const Vector<String>& assetsPaths);\n\n        // Creates and returns an icon sprite for the asset\n        static Ref<Sprite> GetAssetIconSprite(const AssetRef<Asset>& asset);\n\n        // Dynamic cast to RefCounterable via Singleton<AssetsWindow>\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<AssetsWindow>& ref);\n         \n        IOBJECT(AssetsWindow);\n        REF_COUNTERABLE_IMPL(Singleton<AssetsWindow>, IEditorWindow);\n\n    protected:\n        float mFoldersTreeShowCoef = 1.0f; // Animation show folders tree coefficient (0...1)\n\n        Ref<Button>  mFilterButton;           // Search filter button\n        Ref<EditBox> mSearchEditBox;          // Search edit box\n        Ref<Label>   mSelectedAssetPathLabel; // Selected asset path label\n\n        Ref<AssetsFoldersTree> mFoldersTree;                                    // Folders tree            \n        Ref<AnimationPlayer>   mFoldersTreeShowAnim = mmake<AnimationPlayer>(); // Folders tree visible animation\n        bool                   mFoldersTreeVisible;                             // Is folders tree visible\n\n        Ref<AssetsIconsScrollArea> mAssetsGridScroll; // Assets grid scroll\n\n        Ref<Tree> mAssetsTree; // Assets tree\n\n        Ref<CursorEventsArea> mSeparatorHandle; // Folders tree and assets tree/grid separator handle\n        float                 mSeparatorCoef;   // Separator coefficient, means anchors for tree nad assets scroll\n\n        Vector<Pair<UID, String>> mCuttingAssets; // Current cutted assets\n\n    protected:\n        // Initializes window\n        void InitializeWindow();\n\n        // Initializes folders tree separator\n        void InitializeFoldersTreeSeparator();\n\n        // Initializes folders tree visible state\n        void InitializeFoldersTreeVisibleState();\n\n        // Initializes folders tree\n        void InitializeFoldersTree();\n\n        // Initializes down panel\n        void InitializeDownPanel();\n\n        // Initializes up search panel\n        void InitializeUpPanel();\n\n        // Called when search edit box text was changed\n        void OnSearchEdited(const WString& search);\n\n        // Called when menu filter button was pressed\n        void OnMenuFilterPressed();\n\n        // Called when show folders tree button pressed\n        void OnShowTreePressed();\n\n        // Called when assets was rebuilt\n        void OnAssetsRebuilt(const Vector<UID>& changedAssets);\n\n        // Shows and highligh asset icon\n        void ShowAssetIcon(const String& folder, UID assetId);\n\n        // Copies asset folder recursively\n        void CopyAssetFolder(const String& src, const String& dst);\n\n        friend class AssetsFoldersTree;\n        friend class AssetsIconsScrollArea;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AssetsWindow)\n{\n    BASE_CLASS(o2::Singleton<AssetsWindow>);\n    BASE_CLASS(Editor::IEditorWindow);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AssetsWindow)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(1.0f).NAME(mFoldersTreeShowCoef);\n    FIELD().PROTECTED().NAME(mFilterButton);\n    FIELD().PROTECTED().NAME(mSearchEditBox);\n    FIELD().PROTECTED().NAME(mSelectedAssetPathLabel);\n    FIELD().PROTECTED().NAME(mFoldersTree);\n    FIELD().PROTECTED().DEFAULT_VALUE(mmake<AnimationPlayer>()).NAME(mFoldersTreeShowAnim);\n    FIELD().PROTECTED().NAME(mFoldersTreeVisible);\n    FIELD().PROTECTED().NAME(mAssetsGridScroll);\n    FIELD().PROTECTED().NAME(mAssetsTree);\n    FIELD().PROTECTED().NAME(mSeparatorHandle);\n    FIELD().PROTECTED().NAME(mSeparatorCoef);\n    FIELD().PROTECTED().NAME(mCuttingAssets);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AssetsWindow)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectAsset, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectAsset, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectAsset, const Vector<UID>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectAssets, const Vector<String>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeselectAssets);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<AssetInfo>>&, GetSelectedAssets);\n    FUNCTION().PUBLIC().SIGNATURE(void, OpenAsset, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OpenAsset, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OpenAndEditAsset, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OpenAndEditAsset, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetOpenedFolderPath);\n    FUNCTION().PUBLIC().SIGNATURE(void, OpenFolder, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ShowAssetIcon, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ShowAssetIcon, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, CopyAssets, const Vector<String>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, CutAssets, const Vector<String>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, PasteAssets, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeleteAssets, const Vector<String>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<Sprite>, GetAssetIconSprite, const AssetRef<Asset>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<AssetsWindow>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeFoldersTreeSeparator);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeFoldersTreeVisibleState);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeFoldersTree);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeDownPanel);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeUpPanel);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSearchEdited, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMenuFilterPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnShowTreePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetsRebuilt, const Vector<UID>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, ShowAssetIcon, const String&, UID);\n    FUNCTION().PROTECTED().SIGNATURE(void, CopyAssetFolder, const String&, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AssetsWindow/FoldersTree.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"FoldersTree.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/AssetsTree.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsWindow.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n\nnamespace Editor\n{\n    AssetsFoldersTree::AssetsFoldersTree(RefCounter* refCounter) :\n        Widget(refCounter)\n    {\n        if (!UIManager::IsSingletonInitialzed())\n            return;\n\n        mFoldersTree = o2UI.CreateWidget<Tree>(\"folders\");\n        *mFoldersTree->layout = WidgetLayout::BothStretch();\n\n        mFoldersTree->SetRearrangeType(Tree::RearrangeType::OnlyReparent);\n        mFoldersTree->SetMultipleSelectionAvailable(false);\n\n        mFoldersTree->getObjectParentDelegate = THIS_FUNC(GetFoldersTreeNodeParent);\n        mFoldersTree->getObjectChildrenDelegate = THIS_FUNC(GetFoldersTreeNodeChilds);\n        mFoldersTree->fillNodeDataByObjectDelegate = THIS_FUNC(SetupFoldersTreeNode);\n        mFoldersTree->onNodeDoubleClicked = THIS_FUNC(OnFoldersTreeNodeDblClick);\n        mFoldersTree->onObjectsSelectionChanged = THIS_FUNC(OnFoldersTreeSelect);\n        mFoldersTree->onNodeRightButtonClicked = THIS_FUNC(OnFoldersTreeRightClick);\n        mFoldersTree->UpdateNodesView();\n\n        AddChild(mFoldersTree);\n\n        InitializeContext();\n    }\n\n    AssetsFoldersTree::AssetsFoldersTree(RefCounter* refCounter, const AssetsFoldersTree& other) :\n        Widget(refCounter, other)\n    {\n        mFoldersTree = FindChildByType<Tree>();\n        RemoveChild(FindChildByType<ContextMenu>());\n\n        InitializeContext();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    AssetsFoldersTree::~AssetsFoldersTree()\n    {}\n\n    String AssetsFoldersTree::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    AssetsFoldersTree& AssetsFoldersTree::operator=(const AssetsFoldersTree& other)\n    {\n        Widget::operator=(other);\n\n        mFoldersTree = FindChildByType<Tree>();\n        RemoveChild(FindChildByType<ContextMenu>());\n\n        InitializeContext();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void AssetsFoldersTree::SelectAndExpandFolder(const String& path)\n    {\n        mOpengingFolderFromThis = true;\n\n        mFoldersTree->SelectAndHighlightObject(o2Assets.GetAssetsTree().Find(path).Get());\n        mCurrentPath = path;\n\n        mOpengingFolderFromThis = false;\n    }\n\n    void AssetsFoldersTree::UpdateView()\n    {\n        mFoldersTree->UpdateNodesView();\n    }\n\n    void AssetsFoldersTree::InitializeContext()\n    {\n        mContextMenu = o2UI.CreateWidget<ContextMenu>();\n\n        mContextMenu->AddItem(\"Open\", [&]() { OnContextOpenPressed(); });\n        mContextMenu->AddItem(\"Show in folder\", [&]() { OnContextShowInExplorerPressed(); });\n        mContextMenu->AddItem(\"---\");\n        mContextMenu->AddItem(\"New folder\", [&]() { OnContextCreateFolderPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_N, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"---\");\n        mContextMenu->AddItem(\"Copy\", [&]() { OnContextCopyPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_C, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Cut\", [&]() { OnContextCutPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_X, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Paste\", [&]() { OnContextPastePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_V, VK_CTRL_CMD}));\n        mContextMenu->AddItem(\"Delete\", [&]() { OnContextDeletePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_DELETE}));\n\n        mFoldersTree->onFocused = [&]() { mContextMenu->SetItemsMaxPriority(); };\n\n        AddChild(mContextMenu);\n    }\n\n    void* AssetsFoldersTree::GetFoldersTreeNodeParent(void* object)\n    {\n        if (!object)\n            return nullptr;\n\n        AssetInfo* assetTreeNode = (AssetInfo*)(void*)object;\n        return (void*)(assetTreeNode->parent.Lock().Get());\n    }\n\n    Vector<void*> AssetsFoldersTree::GetFoldersTreeNodeChilds(void* object)\n    {\n        AssetInfo* assetTreeNode = (AssetInfo*)object;\n\n        auto& infos = assetTreeNode ? assetTreeNode->GetChildren() : o2Assets.GetAssetsTree().rootAssets;\n\n        return infos\n            .FindAll([](const Ref<AssetInfo>& x) { return x->meta->GetAssetType() == &TypeOf(FolderAsset); })\n            .Sorted([](const Ref<AssetInfo>& a, const Ref<AssetInfo>& b) { return a->path < b->path; })\n            .Convert<void*>([](const Ref<AssetInfo>& x) { return (void*)x.Get(); });\n    }\n\n    void AssetsFoldersTree::SetupFoldersTreeNode(const Ref<TreeNode>& node, void* object)\n    {\n        AssetInfo* assetTreeNode = (AssetInfo*)(void*)object;\n        String pathName = o2FileSystem.GetPathWithoutDirectories(assetTreeNode->path);\n\n        node->name = pathName;\n\n        auto nameLayer = node->layer[\"name\"];\n        if (nameLayer)\n            DynamicCast<Text>(nameLayer->GetDrawable())->text = pathName;\n    }\n\n    void AssetsFoldersTree::OnFoldersTreeNodeDblClick(const Ref<TreeNode>& node)\n    {\n        auto assetTreeNode = Ref((AssetInfo*)(void*)node->GetObject());\n        String pathName = o2FileSystem.GetPathWithoutDirectories(assetTreeNode->path);\n\n        node->SetState(\"edit\", true);\n\n        auto editBox = node->GetChildByType<EditBox>(\"nameEditBox\");\n        editBox->text = (String)pathName;\n        editBox->SelectAll();\n        editBox->Widget::Focus();\n        editBox->ResetScroll();\n\n        editBox->onChangeCompleted = [=](const WString& text) {\n            String newPathAsset = o2FileSystem.GetParentPath(assetTreeNode->path) + \"/\" + text;\n            o2Assets.RenameAsset(assetTreeNode->meta->ID(), text);\n\n            node->SetState(\"edit\", false);\n            //node->UpdateView(false);\n\n            o2EditorAssets.OpenFolder(newPathAsset.Trimed(\" /\\\\\"));\n        };\n    }\n\n    void AssetsFoldersTree::OnFoldersTreeSelect(Vector<void*> nodes)\n    {\n        if (mOpengingFolderFromThis)\n            return;\n\n        mOpengingFolderFromThis = true;\n\n        if (nodes.Count() > 0)\n        {\n            AssetInfo* assetTreeNode = (AssetInfo*)nodes.Last();\n            mCurrentPath = assetTreeNode->path;\n            o2EditorAssets.mAssetsGridScroll->SetViewingPath(mCurrentPath);\n        }\n        else\n            o2EditorAssets.OpenFolder(\"\");\n\n        mOpengingFolderFromThis = false;\n    }\n\n    void AssetsFoldersTree::OnFoldersTreeRightClick(const Ref<TreeNode>& node)\n    {\n        o2UI.FocusWidget(Ref(this));\n        mContextMenu->Show();\n    }\n\n    void AssetsFoldersTree::OnContextCopyPressed()\n    {\n        if (!mCurrentPath.IsEmpty())\n            o2EditorAssets.CopyAssets({ mCurrentPath });\n    }\n\n    void AssetsFoldersTree::OnContextCutPressed()\n    {\n        if (!mCurrentPath.IsEmpty())\n            o2EditorAssets.CutAssets({ mCurrentPath });\n    }\n\n    void AssetsFoldersTree::OnContextPastePressed()\n    {\n        o2EditorAssets.PasteAssets(mCurrentPath);\n    }\n\n    void AssetsFoldersTree::OnContextDeletePressed()\n    {\n        if (!mCurrentPath.IsEmpty())\n        {\n            auto deletingPath = mCurrentPath;\n\n            o2EditorAssets.OpenFolder(\"\");\n            o2EditorAssets.DeleteAssets({ deletingPath });\n        }\n    }\n\n    void AssetsFoldersTree::OnContextOpenPressed()\n    {\n        o2EditorAssets.OpenAsset(mCurrentPath);\n    }\n\n    void AssetsFoldersTree::OnContextShowInExplorerPressed()\n    {\n        o2EditorAssets.OpenAsset(mCurrentPath);\n    }\n\n    void AssetsFoldersTree::OnContextCreateFolderPressed()\n    {\n        o2EditorAssets.mAssetsGridScroll->CreateAsset(&TypeOf(FolderAsset));\n    }\n\n    void AssetsFoldersTree::OnKeyReleased(const Input::Key& key)\n    {\n        if (o2UI.GetFocusedWidget() == mFoldersTree && key == VK_BACK)\n        {\n            if (mCurrentPath.CountOf(\"/\") > 0)\n                o2EditorAssets.OpenFolder(o2FileSystem.GetParentPath(mCurrentPath));\n            else\n                o2EditorAssets.OpenFolder(\"\");\n        }\n    }\n\n    FoldersTree::FoldersTree(RefCounter* refCounter):\n        Tree(refCounter)\n    {}\n\n    FoldersTree::FoldersTree(RefCounter* refCounter, const FoldersTree& other):\n        Tree(refCounter, other)\n    {}\n\n    FoldersTree::FoldersTree(const FoldersTree& other):\n        FoldersTree(nullptr, other)\n    {}\n\n    void FoldersTree::UpdateVisibleNodes()\n    {\n        PushEditorScopeOnStack scope;\n        Tree::UpdateNodesStructure();\n    }\n\n    String FoldersTree::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::FoldersTree>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AssetsFoldersTree>);\n// --- META ---\n\nDECLARE_CLASS(Editor::AssetsFoldersTree, Editor__AssetsFoldersTree);\n\nDECLARE_CLASS(Editor::FoldersTree, Editor__FoldersTree);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/AssetsWindow/FoldersTree.h",
    "content": "#pragma once\n\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class ContextMenu;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(FoldersTree);\n\n    // --------------------------\n    // Assets folders tree widget\n    // --------------------------\n    class AssetsFoldersTree: public Widget, public KeyboardEventsListener\n    {\n    public:\n        // Default constructor\n        AssetsFoldersTree(RefCounter* refCounter);\n\n        // Copy-constructor\n        AssetsFoldersTree(RefCounter* refCounter, const AssetsFoldersTree& other);\n\n        // Destructor\n        ~AssetsFoldersTree();\n\n        // Copy-operator\n        AssetsFoldersTree& operator=(const AssetsFoldersTree& other);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(AssetsFoldersTree);\n        CLONEABLE_REF(AssetsFoldersTree);\n\n    protected:\n        Ref<Tree>        mFoldersTree; // Folders tree\n        Ref<ContextMenu> mContextMenu; // Context menu\n        String           mCurrentPath; // Current viewing path\n\n        bool mOpengingFolderFromThis = false;\n\n    protected:\n        // Selects and expands folder\n        void SelectAndExpandFolder(const String& path);\n\n        // Rebuilds folders tree\n        void UpdateView();\n\n        // Initializes assets context menu\n        void InitializeContext();\n\n        // Returns folder parent (for folders tree)\n        void* GetFoldersTreeNodeParent(void* object);\n\n        // Returns folder childs (for folders tree)\n        Vector<void*> GetFoldersTreeNodeChilds(void* object);\n\n        // Setups tree node by folder (for folders tree)\n        void SetupFoldersTreeNode(const Ref<TreeNode>& node, void* object);\n\n        // Called when folder item double clicked (for folders tree)\n        void OnFoldersTreeNodeDblClick(const Ref<TreeNode>& node);\n\n        // Called when folder item clicked (for folders tree)\n        void OnFoldersTreeSelect(Vector<void*> nodes);\n\n        // Called when folders tree clicked by right button\n        void OnFoldersTreeRightClick(const Ref<TreeNode>& node);\n\n        // Called when context copy pressed\n        void OnContextCopyPressed();\n\n        // Called when context cut pressed\n        void OnContextCutPressed();\n\n        // Called when context paste pressed\n        void OnContextPastePressed();\n\n        // Called when context delete pressed\n        void OnContextDeletePressed();\n\n        // Called when context open pressed\n        void OnContextOpenPressed();\n\n        // Called when context show in explorer pressed\n        void OnContextShowInExplorerPressed();\n\n        // Called when context create folder pressed\n        void OnContextCreateFolderPressed();\n\n        // Called when key was released\n        void OnKeyReleased(const Input::Key& key) override;\n        \n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class AssetsWindow;\n    };\n\n    class FoldersTree : public Tree\n    {\n    public:\n        // Default constructor\n        FoldersTree(RefCounter* refCounter);\n\n        // Copy-constructor\n        FoldersTree(RefCounter* refCounter, const FoldersTree& other);\n\n        // Copy-constructor\n        FoldersTree(const FoldersTree& other);\n\n        SERIALIZABLE(FoldersTree);\n        CLONEABLE_REF(FoldersTree);\n\n    protected:\n        // Updates visible nodes (calculates range and initializes nodes), enables editor mode\n        void UpdateVisibleNodes() override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AssetsFoldersTree)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AssetsFoldersTree)\n{\n    FIELD().PROTECTED().NAME(mFoldersTree);\n    FIELD().PROTECTED().NAME(mContextMenu);\n    FIELD().PROTECTED().NAME(mCurrentPath);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mOpengingFolderFromThis);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AssetsFoldersTree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AssetsFoldersTree&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, SelectAndExpandFolder, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateView);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeContext);\n    FUNCTION().PROTECTED().SIGNATURE(void*, GetFoldersTreeNodeParent, void*);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<void*>, GetFoldersTreeNodeChilds, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetupFoldersTreeNode, const Ref<TreeNode>&, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFoldersTreeNodeDblClick, const Ref<TreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFoldersTreeSelect, Vector<void*>);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFoldersTreeRightClick, const Ref<TreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCopyPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCutPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextPastePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextDeletePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextOpenPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextShowInExplorerPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCreateFolderPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::FoldersTree)\n{\n    BASE_CLASS(o2::Tree);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::FoldersTree)\n{\n}\nEND_META;\nCLASS_METHODS_META(Editor::FoldersTree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const FoldersTree&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const FoldersTree&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateVisibleNodes);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/DockWindowPlace.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DockWindowPlace.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2Editor/Windows/DockableWindow.h\"\n\nnamespace Editor\n{\n    DockWindowPlace::DockWindowPlace(RefCounter* refCounter):\n        Widget(refCounter), DrawableCursorEventsListener(this), mDragHandleLayoutMin(Vec2F(), Vec2F(), Vec2F(), Vec2F()),\n        mDragHandleLayoutMax(Vec2F(), Vec2F(), Vec2F(), Vec2F()), mNeighborMax(nullptr), mNeighborMin(nullptr)\n    {\n        InitializeDragHandle();\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    DockWindowPlace::DockWindowPlace(RefCounter* refCounter, const DockWindowPlace& other):\n        Widget(refCounter, other), DrawableCursorEventsListener(this), mNeighborMax(nullptr), mNeighborMin(nullptr)\n    {\n        InitializeDragHandle();\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    DockWindowPlace::~DockWindowPlace()\n    {}\n\n    DockWindowPlace& DockWindowPlace::operator=(const DockWindowPlace& other)\n    {\n        Widget::operator=(other);\n        mDragHandleLayoutMin = other.mDragHandleLayoutMin;\n        return *this;\n    }\n\n    void DockWindowPlace::Draw()\n    {\n        Widget::Draw();\n\n        mDragHandleMin->OnDrawn();\n        mDragHandleMax->OnDrawn();\n\n        if (o2Input.IsKeyDown(VK_F1))\n        {\n            if (mDragHandleMin->IsInteractable())\n                o2Render.DrawAARectFrame(mDragHandleAreaMin, Color4::Blue());\n\n            if (mDragHandleMax->IsInteractable())\n                o2Render.DrawAARectFrame(mDragHandleAreaMax, Color4::Red());\n\n            if (mNeighborMin)\n            {\n                Vec2F c1 = layout->GetWorldRect().Center();\n                Vec2F c2 = mNeighborMin.Lock()->layout->GetWorldRect().Center();\n                Vec2F n = (c2 - c1).Normalized().Perpendicular()*30.0f;\n                o2Render.DrawAABezierCurveArrow(c1, c1 + n, c2 + n, c2, Color4::Blue());\n            }\n\n            if (mNeighborMax)\n            {\n                Vec2F c1 = layout->GetWorldRect().Center();\n                Vec2F c2 = mNeighborMax.Lock()->layout->GetWorldRect().Center();\n                Vec2F n = (c2 - c1).Normalized().Perpendicular()*30.0f;\n                o2Render.DrawAABezierCurveArrow(c1, c1 + n, c2 + n, c2, Color4::Red());\n            }\n        }\n    }\n\n    bool DockWindowPlace::IsUnderPoint(const Vec2F& point)\n    {\n        return layout->GetWorldRect().IsInside(point);\n    }\n\n    void DockWindowPlace::SetResizibleDir(TwoDirection dir, float border,\n                                          const Ref<DockWindowPlace>& neighborMin, const Ref<DockWindowPlace>& neighborMax)\n    {\n        mResizibleDir = dir;\n        float border2 = border*2.0f;\n\n        mDragHandleMin->interactable = neighborMin != nullptr;\n        mNeighborMin = neighborMin;\n\n        mNeighborMax = neighborMax;\n        mDragHandleMax->interactable = neighborMax != nullptr;\n\n        if (dir == TwoDirection::Horizontal)\n        {\n            mDragHandleLayoutMin = Layout(Vec2F(0, 0), Vec2F(0, 1), Vec2F(-border2, 0), Vec2F(0, 0));\n            mDragHandleLayoutMax = Layout(Vec2F(1, 0), Vec2F(1, 1), Vec2F(border2, 0), Vec2F(0, 0));\n            mDragHandleMin->cursorType = CursorType::SizeWE;\n            mDragHandleMax->cursorType = CursorType::SizeWE;\n\n            if (neighborMin != nullptr)\n                layout->offsetLeft = border;\n\n            if (neighborMax != nullptr)\n                layout->offsetRight = -border;\n        }\n        else\n        {\n            mDragHandleLayoutMin = Layout(Vec2F(0, 0), Vec2F(1, 0), Vec2F(0, -border2), Vec2F(0, 0));\n            mDragHandleLayoutMax = Layout(Vec2F(0, 1), Vec2F(1, 1), Vec2F(0, 0), Vec2F(0, border2));\n            mDragHandleMin->cursorType = CursorType::SizeNS;\n            mDragHandleMax->cursorType = CursorType::SizeNS;\n\n            if (neighborMin != nullptr)\n                layout->offsetBottom = border;\n\n            if (neighborMax != nullptr)\n                layout->offsetTop = -border;\n        }\n\n        mDragHandleAreaMin = mDragHandleLayoutMin.Calculate(layout->GetWorldRect());\n        mDragHandleAreaMax = mDragHandleLayoutMax.Calculate(layout->GetWorldRect());\n    }\n\n    TwoDirection DockWindowPlace::GetResizibleDir() const                                                              \n    {\n        return mResizibleDir;\n    }\n\n    void DockWindowPlace::ArrangeChildWindows()\n    {\n        Vector<Ref<DockableWindow>> windows;\n        for (auto& child : mChildren)\n        {\n            if (child->GetType() == TypeOf(DockableWindow))\n                windows.Add(DynamicCast<DockableWindow>(child));\n        }\n\n        windows.Sort([](auto& a, auto& b) { return a->mTabPosition < b->mTabPosition; });\n\n        if (windows.Count() == 1)\n        {\n            windows[0]->SetNonTabState();\n        }\n        else\n        {\n            float offset = 0;\n            int pos = 0;\n            for (auto& window : windows)\n            {\n                window->SetTabState(offset, pos, mChildren[0] == window);\n                offset += window->GetTabWidth();\n\n                pos++;\n            }\n\n            if (!windows.IsEmpty())\n            {\n                if (!windows.Any([&](auto& x) { return x->mTabActive; }))\n                    SetActiveTab(windows[0]);\n            }\n        }\n    }\n\n    void DockWindowPlace::SetActiveTab(const Ref<DockableWindow>& window)\n    {\n        Vector<Ref<DockableWindow>> tabWindows;\n        for (auto& child : mChildren)\n        {\n            if (child->GetType() == TypeOf(DockableWindow))\n                tabWindows.Add(DynamicCast<DockableWindow>(child));\n        }\n\n        mChildrenInheritedDepth.SortBy<int>([](auto& child) { return DynamicCast<DockableWindow>(child)->mTabPosition; });\n\n        for (auto& tabWindow : tabWindows)\n        {\n            if (tabWindow->mTabActive)\n            {\n                tabWindow->mTabActive = false;\n\n                if (auto state = tabWindow->GetStateObject(\"tabActive\"))\n                    state->SetState(false);\n            }\n        }\n\n        if (window)\n        {\n            window->mTabActive = true;\n\n            if (auto state = window->GetStateObject(\"tabActive\"))\n                state->SetState(true);\n        }\n    }\n\n    void DockWindowPlace::UpdateSelfTransform()\n{\n        Widget::UpdateSelfTransform();\n        mDragHandleAreaMin = mDragHandleLayoutMin.Calculate(layout->GetWorldRect());\n        mDragHandleAreaMax = mDragHandleLayoutMax.Calculate(layout->GetWorldRect());\n    }\n\n    String DockWindowPlace::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void DockWindowPlace::OnDragHandleMinMoved(const Vec2F& delta)\n    {\n        if (mResizibleDir == TwoDirection::Horizontal)\n        {\n            float anchorDelta = delta.x / mParentWidget.Lock()->layout->width;\n            layout->anchorLeft += anchorDelta;\n\n            mNeighborMin.Lock()->layout->anchorRight += anchorDelta;\n        }\n        else\n        {\n            float anchorDelta = delta.y / mParentWidget.Lock()->layout->height;\n            layout->anchorBottom += anchorDelta;\n            mNeighborMin.Lock()->layout->anchorTop += anchorDelta;\n        }\n    }\n\n    void DockWindowPlace::OnDragHandleMaxMoved(const Vec2F& delta)\n    {\n        if (mResizibleDir == TwoDirection::Horizontal)\n        {\n            float anchorDelta = delta.x / mParentWidget.Lock()->layout->width;\n            layout->anchorRight += anchorDelta;\n\n            mNeighborMax.Lock()->layout->anchorLeft += anchorDelta;\n        }\n        else\n        {\n            float anchorDelta = delta.y / mParentWidget.Lock()->layout->height;\n            layout->anchorTop += anchorDelta;\n            mNeighborMax.Lock()->layout->anchorBottom += anchorDelta;\n        }\n    }\n\n    void DockWindowPlace::CheckInteractable()\n    {\n        interactable = mChildren.Count([](auto x) { return x->GetType() == TypeOf(DockWindowPlace); }) == 0;\n\n        for (auto& child : mChildren)\n        {\n            if (child->GetType() == TypeOf(DockWindowPlace))\n                DynamicCast<DockWindowPlace>(child)->CheckInteractable();\n        }\n    }\n\n    void DockWindowPlace::InitializeDragHandle()\n    {\n        mDragHandleMin = mmake<CursorEventsArea>();\n        mDragHandleMin->isUnderPoint = [&](const Vec2F& point) { return mDragHandleAreaMin.IsInside(point); };\n        mDragHandleMin->onMoved = [&](const Input::Cursor& cursor) { OnDragHandleMinMoved(cursor.delta); };\n\n        mDragHandleMax = mmake<CursorEventsArea>();\n        mDragHandleMax->isUnderPoint = [&](const Vec2F& point) { return mDragHandleAreaMax.IsInside(point); };\n        mDragHandleMax->onMoved = [&](const Input::Cursor& cursor) { OnDragHandleMaxMoved(cursor.delta); };\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::DockWindowPlace>);\n// --- META ---\n\nDECLARE_CLASS(Editor::DockWindowPlace, Editor__DockWindowPlace);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/DockWindowPlace.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Math/Layout.h\"\n#include \"o2/Utils/Math/Rect.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(DockableWindow);\n\n    // ------------------------------------\n    // Dockable windows place for attaching\n    // ------------------------------------\n    class DockWindowPlace: public Widget, public DrawableCursorEventsListener\n    {\n    public:\n        // Default constructor\n        DockWindowPlace(RefCounter* refCounter);\n\n        // Copy-constructor\n        DockWindowPlace(RefCounter* refCounter, const DockWindowPlace& other);\n\n        // Destructor\n        ~DockWindowPlace();\n\n        // Copy-operator\n        DockWindowPlace& operator=(const DockWindowPlace& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Sets resizible side and configures drag handle when draggable is true\n        void SetResizibleDir(TwoDirection dir, float border,\n                             const Ref<DockWindowPlace>& neighborMin, const Ref<DockWindowPlace>& neighborMax);\n\n        // Returns resizible side\n        TwoDirection GetResizibleDir() const;\n\n        // Arranging child windows as tabs\n        void ArrangeChildWindows();\n\n        // Sets target window as active tab\n        void SetActiveTab(const Ref<DockableWindow>& window);\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(DockWindowPlace);\n        CLONEABLE_REF(DockWindowPlace);\n\n    protected:\n        TwoDirection mResizibleDir; // Resizible dragable side\n\n        WeakRef<DockWindowPlace> mNeighborMin;         // Resizing neighbor, using when dragging this side\n        Ref<CursorEventsArea>    mDragHandleMin;       // Separator drag handle\n        Layout                   mDragHandleLayoutMin; // Separator drag handle layout\n        RectF                    mDragHandleAreaMin;   // Separator drag handle area calculated from mDragHandleLayout\n\n        WeakRef<DockWindowPlace> mNeighborMax;         // Resizing neighbor, using when dragging this side\n        Ref<CursorEventsArea>    mDragHandleMax;       // Separator drag handle\n        Layout                   mDragHandleLayoutMax; // Separator drag handle layout\n        RectF                    mDragHandleAreaMax;   // Separator drag handle area calculated from mDragHandleLayout\n\n    protected:\n        // Called when cursor drag handle was moved\n        void OnDragHandleMinMoved(const Vec2F& delta);\n\n        // Called when cursor drag handle was moved\n        void OnDragHandleMaxMoved(const Vec2F& delta);\n\n        // Checks interactable. If childs more than 0 this will be not interactable\n        void CheckInteractable();\n\n        // Initializes drag handle\n        void InitializeDragHandle();\n\n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class DockableWindow;\n        friend class WindowsLayout;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DockWindowPlace)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::DrawableCursorEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DockWindowPlace)\n{\n    FIELD().PROTECTED().NAME(mResizibleDir);\n    FIELD().PROTECTED().NAME(mNeighborMin);\n    FIELD().PROTECTED().NAME(mDragHandleMin);\n    FIELD().PROTECTED().NAME(mDragHandleLayoutMin);\n    FIELD().PROTECTED().NAME(mDragHandleAreaMin);\n    FIELD().PROTECTED().NAME(mNeighborMax);\n    FIELD().PROTECTED().NAME(mDragHandleMax);\n    FIELD().PROTECTED().NAME(mDragHandleLayoutMax);\n    FIELD().PROTECTED().NAME(mDragHandleAreaMax);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DockWindowPlace)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const DockWindowPlace&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetResizibleDir, TwoDirection, float, const Ref<DockWindowPlace>&, const Ref<DockWindowPlace>&);\n    FUNCTION().PUBLIC().SIGNATURE(TwoDirection, GetResizibleDir);\n    FUNCTION().PUBLIC().SIGNATURE(void, ArrangeChildWindows);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetActiveTab, const Ref<DockableWindow>&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragHandleMinMoved, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragHandleMaxMoved, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckInteractable);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeDragHandle);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/DockableWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DockableWindow.h\"\n\n#include \"o2/Animation/Tracks/AnimationColor4Track.h\"\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Animation/Tracks/AnimationVec2FTrack.h\"\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/UIRoot.h\"\n#include \"o2Editor/Windows/DockWindowPlace.h\"\n\nnamespace Editor\n{\n    DockableWindow::DockableWindow(RefCounter* refCounter):\n        Window(refCounter)\n    {\n        InitializeDragHandles();\n        SetDocked(false);\n        mDockingFrameSample = mmake<Sprite>();\n\n        RetargetStatesAnimations();\n    }\n\n    DockableWindow::DockableWindow(RefCounter* refCounter, const DockableWindow& other):\n        Window(refCounter, other)\n    {\n        PushEditorScopeOnStack scope;\n\n        InitializeDragHandles();\n        SetDocked(false);\n        mDockingFrameSample = other.mDockingFrameSample->CloneAsRef<Sprite>();\n        InitializeDockFrameAppearanceAnim();\n\n        if (mVisibleState)\n            mVisibleState->onStateFullyFalse += THIS_FUNC(Undock);\n\n        RetargetStatesAnimations();\n    }\n\n    DockableWindow::~DockableWindow()\n    {}\n\n    DockableWindow& DockableWindow::operator=(const DockableWindow& other)\n    {\n        Window::operator=(other);\n\n        mDockingFrameSample = other.mDockingFrameSample->CloneAsRef<Sprite>();\n\n        if (mVisibleState)\n            mVisibleState->onStateFullyFalse += THIS_FUNC(Undock);\n\n        return *this;\n    }\n\n    void DockableWindow::Update(float dt)\n    {\n        Window::Update(dt);\n\n        const float lerpFrameCoef = 10.0f;\n        if (mDockingFrameTarget != mDockingFrameCurrent)\n        {\n            mDockingFrameCurrent = Math::Lerp(mDockingFrameCurrent, mDockingFrameTarget, dt*lerpFrameCoef);\n            mDockingFrameSample->rect = mDockingFrameCurrent;\n        }\n\n        mDockingFrameAppearance->Update(dt);\n    }\n\n    void DockableWindow::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        mBackCursorArea->OnDrawn();\n        //ScrollArea::OnDrawn();\n\n        if (!mTabState || mTabActive)\n        {\n            o2Render.EnableScissorTest(mAbsoluteClipArea);\n\n            for (auto& child : mChildrenInheritedDepth)\n                child->Draw();\n\n            o2Render.DisableScissorTest();\n\n            mTopDragHandle->OnDrawn();\n            mBottomDragHandle->OnDrawn();\n            mLeftDragHandle->OnDrawn();\n            mRightDragHandle->OnDrawn();\n            mLeftTopDragHandle->OnDrawn();\n            mRightTopDragHandle->OnDrawn();\n            mLeftBottomDragHandle->OnDrawn();\n            mRightBottomDragHandle->OnDrawn();\n            mHeadDragHandle->OnDrawn();\n\n            CursorAreaEventsListener::OnDrawn();\n\n            for (auto& child : mInternalWidgets)\n                child->Draw();\n\n            for (auto& layer : mTopDrawingLayers)\n                layer->Draw();\n        }\n        else\n            mHeadDragHandle->OnDrawn();\n\n        DrawDebugFrame();\n\n        if (mDockingFrameSample->GetTransparency() > 0.001f)\n            mDockingFrameSample->Draw();\n    }\n\n    void DockableWindow::SetDocked(bool docked)\n    {\n        mDocked = docked;\n\n        auto dockedState = state[\"docked\"];\n        if (dockedState)\n            *dockedState = docked;\n\n        mTopDragHandle->interactable         = !docked;\n        mBottomDragHandle->interactable      = !docked;\n        mLeftDragHandle->interactable        = !docked;\n        mRightDragHandle->interactable       = !docked;\n        mLeftTopDragHandle->interactable     = !docked;\n        mLeftBottomDragHandle->interactable  = !docked;\n        mRightTopDragHandle->interactable    = !docked;\n        mRightBottomDragHandle->interactable = !docked;\n    }\n\n    void DockableWindow::RecalculateTabWidth()\n    {\n        float expand = 35;\n        if (auto textLayer = GetLayer(mTabCaptionLayerPath))\n        {\n            if (auto textDrawable = DynamicCast<Text>(textLayer->GetDrawable()))\n            {\n                Text::SymbolsSet symbolsSet;\n                symbolsSet.Initialize(textDrawable->GetFont(), textDrawable->GetText(), textDrawable->GetFontHeight(),\n                                      Vec2F(), Vec2F(), HorAlign::Left, VerAlign::Bottom, false, false, 1.0f, 1.0f);\n\n                SetTabWidth(symbolsSet.mRealSize.x + textLayer->layout.offsetLeft - textLayer->layout.offsetRight + expand);\n            }\n        }\n    }\n\n    bool DockableWindow::IsDocked() const\n    {\n        return mDocked;\n    }\n\n    const Ref<Sprite>& DockableWindow::GetDockingFrameSample() const\n    {\n        return mDockingFrameSample;\n    }\n\n    void DockableWindow::SetIcon(const Ref<Sprite>& icon)\n    {\n        auto iconLayer = GetLayer(mIconLayerPath);\n        if (iconLayer)\n        {\n            iconLayer->SetDrawable(icon);\n        }\n\n        auto tabIconLayer = GetLayer(mTabIconLayerPath);\n        if (tabIconLayer)\n        {\n            tabIconLayer->SetDrawable(icon->CloneAsRef<Sprite>());\n        }\n    }\n\n    Ref<Sprite> DockableWindow::GetIcon() const\n    {\n        auto iconLayer = GetLayer(mIconLayerPath);\n        if (iconLayer)\n        {\n            if (iconLayer->GetDrawable())\n                return DynamicCast<Sprite>(iconLayer->GetDrawable());\n        }\n\n        return nullptr;\n    }\n\n    void DockableWindow::SetIconLayout(const Layout& layout)\n    {\n        auto iconLayer = GetLayer(mIconLayerPath);\n        if (iconLayer)\n            iconLayer->layout = layout;\n\n        auto tabIconLayer = GetLayer(mTabIconLayerPath);\n        if (tabIconLayer)\n            tabIconLayer->layout = layout;\n    }\n\n    Layout DockableWindow::GetIconLayout() const\n    {\n        auto iconLayer = GetLayer(mIconLayerPath);\n        if (iconLayer)\n            return iconLayer->layout;\n\n        return Layout();\n    }\n\n    void DockableWindow::SetCaption(const WString& caption)\n    {\n        auto captionLayer = GetLayer(mCaptionLayerPath);\n        if (captionLayer)\n        {\n            if (auto textDrawable = DynamicCast<Text>(captionLayer->GetDrawable()))\n                textDrawable->SetText(caption);\n        }\n\n        auto tabCaptionLayer = GetLayer(mTabCaptionLayerPath);\n        if (tabCaptionLayer)\n        {\n            if (auto textDrawable = DynamicCast<Text>(tabCaptionLayer->GetDrawable()))\n                textDrawable->SetText(caption);\n        }\n\n        if (mAutoCalculateTabWidth)\n        {\n            RecalculateTabWidth();\n\n            if (auto parentDock = DynamicCast<DockWindowPlace>(mParent.Lock()))\n                parentDock->ArrangeChildWindows();\n        }\n    }\n\n    WString DockableWindow::GetCaption() const\n    {\n        auto captionLayer = GetLayer(mCaptionLayerPath);\n        if (captionLayer)\n        {\n            if (auto textDrawable = DynamicCast<Text>(captionLayer->GetDrawable()))\n                return textDrawable->GetText();\n        }\n\n        return WString();\n    }\n\n    void DockableWindow::SetTabWidth(float width)\n    {\n        mTabWidth = width;\n\n        if (auto tabLayer = GetLayer(mTabLayerPath))\n            tabLayer->layout.offsetRight = tabLayer->layout.offsetLeft + width;\n    }\n\n    float DockableWindow::GetTabWidth() const\n    {\n        return mTabWidth;\n    }\n\n    void DockableWindow::SetTabActive()\n    {\n        if (mTabState)\n        {\n            if (auto parentDock = DynamicCast<DockWindowPlace>(mParent.Lock()))\n                parentDock->SetActiveTab(Ref(this));\n        }\n    }\n\n    bool DockableWindow::IsTabActive() const\n    {\n        return mDocked && mTabActive;\n    }\n\n    void DockableWindow::SetAutoCalcuclatingTabWidth(bool enable)\n    {\n        mAutoCalculateTabWidth = enable;\n\n        if (mAutoCalculateTabWidth)\n            RecalculateTabWidth();\n    }\n\n    bool DockableWindow::IsAutoCalcuclatingTabWidth() const\n    {\n        return mAutoCalculateTabWidth;\n    }\n\n    void DockableWindow::UpdateSelfTransform()\n    {\n        Window::UpdateSelfTransform();\n\n        if (auto tabLayer = GetLayer(mTabLayerPath))\n            mHeadDragAreaRect = mHeadDragAreaLayout.Calculate(tabLayer->GetRect());\n    }\n\n    bool DockableWindow::IsUnderPoint(const Vec2F& point)\n    {\n        return !mTabState && Widget::IsUnderPoint(point);\n    }\n\n    String DockableWindow::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void DockableWindow::OnEnabled()\n    {\n        Window::OnEnabled();\n    }\n\n    void DockableWindow::OnDisabled()\n    {\n        Window::OnDisabled();\n        //Undock();\n    }\n\n    void DockableWindow::OnFocused()\n    {\n        Window::OnFocused();\n        SetTabActive();\n    }\n\n    void DockableWindow::InitializeDockFrameAppearanceAnim()\n    {\n        mDockingFrameAppearance->SetClip(mmake<AnimationClip>());\n        mDockingFrameAppearance->SetTarget(this);\n\n        *mDockingFrameAppearance->GetClip()->AddTrack<float>(\"mDockingFrameSample/transparency\") =\n            AnimationTrack<float>::EaseInOut(0, 1, 0.3f);\n\n        *mDockingFrameAppearance->GetClip()->AddTrack<float>(\"transparency\") =\n            AnimationTrack<float>::EaseInOut(1, 0, 0.15f);\n\n        mDockingFrameAppearance->GoToBegin();\n    }\n\n    void DockableWindow::InitializeDragHandles()\n    {\n        mHeadDragHandle->onMoved          = THIS_FUNC(OnMoved);\n        mHeadDragHandle->onDblClicked     = THIS_FUNC(OnHeadDblCKicked);\n        mHeadDragHandle->onCursorPressed  = THIS_FUNC(OnMoveBegin);\n        mHeadDragHandle->onCursorReleased = THIS_FUNC(OnMoveCompleted);\n    }\n\n    void DockableWindow::OnHeadDblCKicked(const Input::Cursor& cursor)\n    {\n        if (IsDocked())\n        {\n            Undock();\n\n            Vec2F size = layout->GetSize();\n\n            if (auto headLayer = GetLayer(mTabLayerPath))\n                layout->worldLeftTop = o2Input.GetCursorPos() - headLayer->GetRect().Size().InvertedY()*0.5f;\n            else\n                layout->worldLeftTop = o2Input.GetCursorPos();\n\n            layout->worldRightBottom = layout->worldLeftTop + size.InvertedY();\n        }\n        else\n        {\n            auto listenersUnderCursor = o2Events.GetAllCursorListenersUnderCursor(0);\n            auto dockPlaceListener = listenersUnderCursor.FindOrDefault([](const Ref<CursorAreaEventsListener>& x) {\n                return DynamicCast<DockWindowPlace>(x) != nullptr;\n            });\n\n            if (dockPlaceListener)\n                PlaceDock(DynamicCast<DockWindowPlace>(dockPlaceListener));\n        }\n    }\n\n    void DockableWindow::OnMoved(const Input::Cursor& cursor)\n    {\n        if (mDocked)\n        {\n            if (!layout->IsPointInside(cursor.position))\n            {\n                Undock();\n\n                SetLayoutDirty();\n\n                Vec2F anchor = (layout->worldLeftTop + layout->worldRightTop.Get())*0.5f;\n\n                if (auto headLayer = GetLayer(mTabLayerPath))\n                    anchor.y -= headLayer->GetRect().Height()*0.5f;\n\n                layout->worldPosition += o2Input.GetCursorPos() - anchor;\n\n                mDragOffset = Vec2F();\n            }\n\n            return;\n        }\n\n        layout->worldPosition += cursor.delta;\n\n        Ref<DockWindowPlace> targetDock;\n        Side dockPosition = Side::None;\n        RectF dockZoneRect;\n\n        bool tracedDock = TraceDock(targetDock, dockPosition, dockZoneRect);\n\n        if (dockPosition != Side::None && tracedDock)\n        {\n            mDockingFrameAppearance->PlayForward();\n            mDockingFrameTarget = dockZoneRect;\n        }\n        else\n        {\n            mDockingFrameAppearance->PlayBack();\n            mDockingFrameTarget = layout->worldRect;\n        }\n    }\n\n    void DockableWindow::OnMoveCompleted(const Input::Cursor& cursor)\n    {\n        if (mDocked)\n            return;\n\n        Ref<DockWindowPlace> targetDock;\n        Side dockPosition = Side::None;\n        RectF dockZoneRect;\n\n        if (!TraceDock(targetDock, dockPosition, dockZoneRect) || targetDock == nullptr)\n            return;\n\n        bool allOnLine = targetDock->mParent && targetDock->mParentWidget.Lock()->GetChildWidgets().All([&](auto& x) {\n\n            if (x->GetType() != TypeOf(DockWindowPlace))\n                return false;\n\n            auto dock = DynamicCast<DockWindowPlace>(x);\n            TwoDirection rd = dock->GetResizibleDir();\n\n            if (dockPosition == Side::Left || dockPosition == Side::Right)\n                return rd == TwoDirection::Horizontal;\n\n            return rd == TwoDirection::Vertical;\n        });\n\n        if (allOnLine)\n            PlaceLineDock(targetDock, dockPosition, dockZoneRect);\n        else\n            PlaceNonLineDock(targetDock, dockPosition);\n    }\n\n    void DockableWindow::OnMoveBegin(const Input::Cursor& cursor)\n    {\n        OnFocused();\n\n        if (mDocked)\n            mDragOffset = (Vec2F)o2Input.cursorPos - layout->worldLeftTop;\n    }\n\n    bool DockableWindow::TraceDock(Ref<DockWindowPlace>& targetDock, Side& dockPosition, RectF& dockZoneRect)\n    {\n        Vec2F cursorPos = o2Input.cursorPos;\n        auto listenersUnderCursor = o2Events.GetAllCursorListenersUnderCursor(0);\n        auto dockPlaceListener = listenersUnderCursor.FindOrDefault([](const Ref<CursorAreaEventsListener>& x) {\n            return DynamicCast<DockWindowPlace>(x) != nullptr;\n        });\n\n        if (dockPlaceListener)\n        {\n            auto dockPlace = DynamicCast<DockWindowPlace>(dockPlaceListener);\n\n            RectF dockPlaceRect = dockPlace->layout->worldRect;\n\n            RectF leftZone(dockPlaceRect.left, dockPlaceRect.bottom,\n                           Math::Lerp(dockPlaceRect.left, dockPlaceRect.right, mDockSizeCoef), dockPlaceRect.top);\n\n            RectF rightZone(Math::Lerp(dockPlaceRect.right, dockPlaceRect.left, mDockSizeCoef), dockPlaceRect.bottom,\n                            dockPlaceRect.right, dockPlaceRect.top);\n\n            RectF bottomZone(dockPlaceRect.left, dockPlaceRect.bottom,\n                             dockPlaceRect.right, Math::Lerp(dockPlaceRect.bottom, dockPlaceRect.top, mDockSizeCoef));\n\n            if (bottomZone.IsInside(cursorPos))\n            {\n                targetDock = dockPlace;\n                dockPosition = Side::Bottom;\n                dockZoneRect = bottomZone;\n            }\n            else if (rightZone.IsInside(cursorPos))\n            {\n                targetDock = dockPlace;\n                dockPosition = Side::Right;\n                dockZoneRect = rightZone;\n            }\n            else if (leftZone.IsInside(cursorPos))\n            {\n                targetDock = dockPlace;\n                dockPosition = Side::Left;\n                dockZoneRect = leftZone;\n            }\n        }\n\n        return targetDock != nullptr;\n    }\n\n    void DockableWindow::PlaceDock(const Ref<DockWindowPlace>& targetDock)\n    {\n        PushEditorScopeOnStack scope;\n\n        mNonDockSize = layout->size;\n\n        mTabPosition = targetDock->mChildren.Count();\n\n        targetDock->AddChild(Ref(this));\n        *layout = WidgetLayout::BothStretch();\n        SetDocked(true);\n\n        mDockingFrameAppearance->PlayBack();\n        mDockingFrameTarget = layout->GetWorldRect();\n\n        targetDock->ArrangeChildWindows();\n        targetDock->SetLayoutDirty();\n    }\n\n    void DockableWindow::PlaceNonLineDock(const Ref<DockWindowPlace>& targetDock, Side dockPosition)\n    {\n        PushEditorScopeOnStack scope;\n\n        mNonDockSize = layout->size;\n\n        auto windowDock = mmake<DockWindowPlace>();\n        windowDock->name = \"window dock\";\n        *windowDock->layout = WidgetLayout::BothStretch();\n\n        auto windowNeighborDock = mmake<DockWindowPlace>();\n        windowNeighborDock->name = \"empty dock\";\n        *windowNeighborDock->layout = WidgetLayout::BothStretch();\n\n        for (auto& child : targetDock->GetChildWidgets())\n            windowNeighborDock->AddChild(child);\n\n        targetDock->AddChild(windowNeighborDock);\n        targetDock->AddChild(windowDock);\n        targetDock->interactable = false;\n\n        if (dockPosition == Side::Bottom)\n        {\n            windowNeighborDock->layout->anchorBottom = mDockSizeCoef;\n            windowDock->layout->anchorTop = mDockSizeCoef;\n            windowDock->layout->offsetTop = -mDockBorder;\n\n            windowDock->SetResizibleDir(TwoDirection::Vertical, mDockBorder, nullptr, windowNeighborDock);\n            windowNeighborDock->SetResizibleDir(TwoDirection::Vertical, mDockBorder, windowDock, nullptr);\n        }\n        else if (dockPosition == Side::Right)\n        {\n            windowNeighborDock->layout->anchorRight = 1.0f - mDockSizeCoef;\n            windowDock->layout->anchorLeft = 1.0f - mDockSizeCoef;\n            windowDock->layout->offsetLeft = mDockBorder;\n\n            windowDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, windowNeighborDock, nullptr);\n            windowNeighborDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, nullptr, windowDock);\n        }\n        else if (dockPosition == Side::Left)\n        {\n            windowNeighborDock->layout->anchorLeft = mDockSizeCoef;\n            windowDock->layout->anchorRight = mDockSizeCoef;\n            windowDock->layout->offsetRight = -mDockBorder;\n\n            windowDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, nullptr, windowNeighborDock);\n            windowNeighborDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, windowDock, nullptr);\n        }\n\n        windowDock->AddChild(Ref(this));\n        *layout = WidgetLayout::BothStretch();\n        SetDocked(true);\n\n        mDockingFrameAppearance->PlayBack();\n        mDockingFrameTarget = layout->GetWorldRect();\n    }\n\n    void DockableWindow::PlaceLineDock(const Ref<DockWindowPlace>& targetDock, Side dockPosition, RectF dockZoneRect)\n    {\n        PushEditorScopeOnStack scope;\n\n        mNonDockSize = layout->size;\n\n        auto windowDock = mmake<DockWindowPlace>();\n        windowDock->name = \"window dock\";\n        *windowDock->layout = WidgetLayout::BothStretch();\n\n        auto windowNeighborDock = targetDock;\n        targetDock->mParent.Lock()->AddChild(windowDock);\n\n        if (dockPosition == Side::Bottom)\n        {\n            windowDock->layout->anchorBottom = windowNeighborDock->layout->anchorBottom;\n\n            windowNeighborDock->layout->anchorBottom +=\n                windowNeighborDock->layout->height*mDockSizeCoef / windowNeighborDock->mParentWidget.Lock()->layout->height;\n\n            windowDock->layout->anchorTop = windowNeighborDock->layout->anchorBottom;\n\n            if (targetDock->mNeighborMin)\n            {\n                auto nmin = windowNeighborDock->mNeighborMin.Lock();\n\n                nmin->SetResizibleDir(TwoDirection::Vertical, mDockBorder, nmin->mNeighborMin.Lock(), windowDock);\n                windowDock->SetResizibleDir(TwoDirection::Vertical, mDockBorder, nmin, windowNeighborDock);\n                windowNeighborDock->SetResizibleDir(TwoDirection::Vertical, mDockBorder, windowDock, windowNeighborDock->mNeighborMax.Lock());\n            }\n            else\n            {\n                windowDock->SetResizibleDir(TwoDirection::Vertical, mDockBorder, nullptr, windowNeighborDock);\n                windowNeighborDock->SetResizibleDir(TwoDirection::Vertical, mDockBorder, windowDock, windowNeighborDock->mNeighborMax.Lock());\n            }\n        }\n        else if (dockPosition == Side::Right)\n        {\n            windowDock->layout->anchorRight = windowNeighborDock->layout->anchorRight;\n\n            windowNeighborDock->layout->anchorRight -=\n                windowNeighborDock->layout->width*mDockSizeCoef / windowNeighborDock->mParentWidget.Lock()->layout->width;\n\n            windowDock->layout->anchorLeft = windowNeighborDock->layout->anchorRight;\n\n            if (targetDock->mNeighborMax)\n            {\n                auto nmax = windowNeighborDock->mNeighborMax.Lock();\n\n                nmax->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, windowDock, nmax->mNeighborMax.Lock());\n                windowDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, windowNeighborDock, nmax);\n                windowNeighborDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, windowNeighborDock->mNeighborMin.Lock(), windowDock);\n            }\n            else\n            {\n                windowDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, windowNeighborDock, nullptr);\n                windowNeighborDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, windowNeighborDock->mNeighborMin.Lock(), windowDock);\n            }\n        }\n        else if (dockPosition == Side::Left)\n        {\n            windowDock->layout->anchorLeft = windowNeighborDock->layout->anchorLeft;\n\n            windowNeighborDock->layout->anchorLeft +=\n                windowNeighborDock->layout->width*mDockSizeCoef / windowNeighborDock->mParentWidget.Lock()->layout->width;\n\n            windowDock->layout->anchorRight = windowNeighborDock->layout->anchorLeft;\n\n            if (targetDock->mNeighborMin)\n            {\n                auto nmin = windowNeighborDock->mNeighborMin.Lock();\n\n                nmin->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, nmin->mNeighborMin.Lock(), windowDock);\n                windowDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, nmin, windowNeighborDock);\n                windowNeighborDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, windowDock, windowNeighborDock->mNeighborMax.Lock());\n            }\n            else\n            {\n                windowDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, nullptr, windowNeighborDock);\n                windowNeighborDock->SetResizibleDir(TwoDirection::Horizontal, mDockBorder, windowDock, windowNeighborDock->mNeighborMax.Lock());\n            }\n        }\n\n        windowDock->AddChild(Ref(this));\n        *layout = WidgetLayout::BothStretch();\n        SetDocked(true);\n\n        mDockingFrameAppearance->PlayBack();\n        mDockingFrameTarget = layout->GetWorldRect();\n    }\n\n    void DockableWindow::SetTabState(float offset, int position, bool isFirst)\n    {\n        SetStateForcible(\"tab\", true);\n\n        if (mAutoCalculateTabWidth)\n            RecalculateTabWidth();\n\n        if (auto tabFirstState = GetStateObject(\"tabFirst\"))\n            tabFirstState->SetState(isFirst);\n\n        mTabPosition = position;\n\n        if (auto tabMainLayer = GetLayer(mTabLayerPath))\n        {\n            tabMainLayer->layout.offsetLeft = offset;\n            tabMainLayer->layout.offsetRight = offset + mTabWidth;\n            tabMainLayer->layout.anchorLeft = 0;\n            tabMainLayer->layout.anchorRight = 0;\n        }\n\n        mTabState = true;\n    }\n\n    void DockableWindow::SetNonTabState()\n    {\n        SetStateForcible(\"tab\", false);\n\n        mTabActive = false;\n\n        if (auto state = GetStateObject(\"tabActive\"))\n            state->SetState(false);\n\n        if (auto tabMainLayer = GetLayer(mTabLayerPath))\n        {\n            tabMainLayer->layout.offsetLeft = 0;\n            tabMainLayer->layout.offsetRight = 0;\n            tabMainLayer->layout.anchorLeft = 0;\n            tabMainLayer->layout.anchorRight = 1;\n        }\n\n        mTabState = false;\n    }\n\n    void DockableWindow::SetActiveTab()\n    {\n        if (!mTabState)\n            return;\n\n        mTabActive = true;\n\n        if (auto state = GetStateObject(\"tabActive\"))\n            state->SetState(true);\n    }\n\n    void DockableWindow::Undock()\n    {\n        PushEditorScopeOnStack scope;\n\n        if (!IsDocked())\n            return;\n\n        auto topDock = DynamicCast<DockWindowPlace>(mParent.Lock()->GetParent().Lock());\n\n        if (!topDock)\n        {\n            EditorUIRoot.AddWidget(Ref(this));\n        }\n        else\n        {\n            auto parent = DynamicCast<DockWindowPlace>(mParent.Lock());\n            auto parentNeighbors = topDock->GetChildWidgets().FindAll([&](auto x) { return x != parent; })\n                .Convert<Ref<DockWindowPlace>>([](auto& x) { return DynamicCast<DockWindowPlace>(x); });\n\n            EditorUIRoot.AddWidget(Ref(this));\n\n            if (!parent->GetChildWidgets().IsEmpty())\n            {\n                parent->ArrangeChildWindows();\n                parent->SetLayoutDirty();\n            }\n            else\n            {\n                auto neighborMin = parent->mNeighborMin.Lock();\n                auto neighborMax = parent->mNeighborMax.Lock();\n\n                if (neighborMin)\n                {\n                    neighborMin->SetResizibleDir(neighborMin->mResizibleDir, mDockBorder,\n                                                 neighborMin->mNeighborMin.Lock(), neighborMax);\n                }\n\n                if (neighborMax)\n                {\n                    neighborMax->SetResizibleDir(neighborMax->mResizibleDir, mDockBorder,\n                                                 neighborMin, neighborMax->mNeighborMax.Lock());\n                }\n\n                if (parent->mResizibleDir == TwoDirection::Horizontal)\n                {\n                    if (neighborMin && neighborMax)\n                    {\n                        float anchor = (neighborMin->layout->anchorRight + neighborMax->layout->anchorLeft) / 2.0f;\n                        neighborMin->layout->anchorRight = anchor;\n                        neighborMax->layout->anchorLeft = anchor;\n                    }\n                    else if (neighborMin && !neighborMax)\n                        neighborMin->layout->anchorRight = 1.0f;\n                    else if (!neighborMin && neighborMax)\n                        neighborMax->layout->anchorLeft = 0.0f;\n                }\n\n                if (parent->mResizibleDir == TwoDirection::Vertical)\n                {\n                    if (neighborMin && neighborMax)\n                    {\n                        float anchor = (neighborMin->layout->anchorTop + neighborMax->layout->anchorBottom) / 2.0f;\n                        neighborMin->layout->anchorTop = anchor;\n                        neighborMax->layout->anchorBottom = anchor;\n                    }\n                    else if (neighborMin && !neighborMax)\n                        neighborMin->layout->anchorTop = 1.0f;\n                    else if (!neighborMin && neighborMax)\n                        neighborMax->layout->anchorBottom = 0.0f;\n                }\n\n                topDock->RemoveChild(parent);\n\n                if (parentNeighbors.Count() == 1)\n                {\n                    auto children = parentNeighbors[0]->GetChildWidgets();\n                    for (auto& child : children)\n                        topDock->AddChild(child);\n\n                    topDock->RemoveChild(parentNeighbors[0]);\n                }\n\n                // \n                //     for (auto& child : parentNeighbor->GetChilds())\n                //         topDock->AddChild(child);\n                // \n                //     topDock->RemoveChild(parent);\n                //     topDock->RemoveChild(parentNeighbor);\n                topDock->CheckInteractable();\n            }\n        }\n\n        SetDocked(false);\n        SetNonTabState();\n\n        Vec2F leftTop = layout->worldLeftTop;\n        layout->anchorMin = Vec2F(); layout->anchorMax = Vec2F();\n        layout->worldLeftTop = leftTop;\n        layout->worldRightBottom = layout->worldLeftTop + mNonDockSize.InvertedY();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::DockableWindow>);\n// --- META ---\n\nDECLARE_CLASS(Editor::DockableWindow, Editor__DockableWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/DockableWindow.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/Window.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(DockWindowPlace);\n\n    // -----------------------------\n    // Dockable editor window widget\n    // -----------------------------\n    class DockableWindow: public o2::Window\n    {\n    public:\n        // Default constructor\n        explicit DockableWindow(RefCounter* refCounter);\n\n        // Copy-constructor\n        DockableWindow(RefCounter* refCounter, const DockableWindow& other);\n\n        // Destructor\n        ~DockableWindow() override;\n\n        // Copy-operator\n        DockableWindow& operator=(const DockableWindow& other);\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Draws widget\n        void Draw() override;\n\n        // Returns is window docked\n        bool IsDocked() const;\n\n        // Return pointer to docking sample sprite\n        const Ref<Sprite>& GetDockingFrameSample() const; \n\n        // Sets icon sprite\n        void SetIcon(const Ref<Sprite>& icon) override;\n\n        // Returns icon sprite\n        Ref<Sprite> GetIcon() const override;\n\n        // Sets icon layer layout\n        void SetIconLayout(const Layout& layout) override;\n\n        // Returns icon layer layout\n        Layout GetIconLayout() const override;\n\n        // Sets caption text\n        void SetCaption(const WString& caption) override;\n\n        // Returns caption text\n        WString GetCaption() const override;\n\n        // Sets tab size\n        void SetTabWidth(float width);\n\n        // Sets tab width\n        float GetTabWidth() const;\n\n        // Sets current window tab as active tab\n        void SetTabActive();\n\n        // Returns is this window active and tabbed and tab is active\n        bool IsTabActive() const;\n\n        // Sets Automatically calculating tab width when changing caption\n        void SetAutoCalcuclatingTabWidth(bool enable);\n\n        // Is Automatically calculating tab width when changing caption\n        bool IsAutoCalcuclatingTabWidth() const;\n\n        // Places this into empty dock\n        void PlaceDock(const Ref<DockWindowPlace>& targetDock);\n\n        // Undocks this window, using when window moved out from dock\n        void Undock();\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns true if point is under drawable\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(DockableWindow);\n        CLONEABLE_REF(DockableWindow);\n\n    protected:\n        const String mTabLayerPath = \"tab/main\";\n        const String mTabIconLayerPath = \"tab/main/icon\";\n        const String mTabCaptionLayerPath = \"tab/main/caption\";\n        const String mIconLayerPath = \"back/icon\";\n        const String mCaptionLayerPath = \"back/caption\";\n\n        const float mDockSizeCoef = 0.2f;\n        const float mDockBorder = 1.5f;\n\n        bool        mDocked = false;      // Is window docked\n        Ref<Sprite> mDockingFrameSample;  // Docking frame sample @SERIALIZABLE\n        RectF       mDockingFrameCurrent; // Docking sample current frame\n        RectF       mDockingFrameTarget;  // Docking sample target  frame\n\n        Ref<AnimationPlayer> mDockingFrameAppearance = mmake<AnimationPlayer>(); // Docking frame appearance tween\n\n        Vec2F mNonDockSize; // Size of widget before docking\n        Vec2F mDragOffset;  // Offset from cursor to dragging anchor point\n\n        bool  mTabState = false;             // Is window as tab\n        int   mTabPosition = 0;              // Tab index\n        bool  mTabActive = false;            // Is active tab\n        float mTabWidth = 150.0f;            // Width of tab layer \"tab/main\"\n        bool  mAutoCalculateTabWidth = true; // Automatically calculating tab width when changing caption\n\n    protected:\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed, undocks\n        void OnDisabled() override;\n\n        // Called when widget was selected, enables active tab\n        void OnFocused() override;\n\n        //Initialize animation for frame appearance\n        void InitializeDockFrameAppearanceAnim();\n\n        // Initializes drag handles\n        void InitializeDragHandles();\n\n        // Called when head handle double clicked, trying to dock window\n        void OnHeadDblCKicked(const Input::Cursor& cursor);\n\n        // Called when window was moved\n        void OnMoved(const Input::Cursor& cursor);\n\n        // Called when window moving was completed\n        void OnMoveCompleted(const Input::Cursor&);\n\n        // Called when window going to move\n        void OnMoveBegin(const Input::Cursor&);\n\n        // Searches dock place under cursor and returns parameters of them\n        bool TraceDock(Ref<DockWindowPlace>& targetDock, Side& dockPosition, RectF& dockZoneRect);\n\n        // Places this into target dock as non line arranged\n        void PlaceNonLineDock(const Ref<DockWindowPlace>& targetDock, Side dockPosition);\n\n        // Places this into target dock as line arranged\n        void PlaceLineDock(const Ref<DockWindowPlace>& targetDock, Side dockPosition, RectF dockZoneRect);\n\n        // Sets window as one of tab\n        void SetTabState(float offset, int position, bool isFirst);\n\n        // Sets window regular state, not as tab\n        void SetNonTabState();\n\n        // Sets tab as active\n        void SetActiveTab();\n\n        // Sets window docked\n        void SetDocked(bool docked);\n\n        // Recalculates tab width by caption size\n        void RecalculateTabWidth();\n\n        friend class WindowsLayout;\n        friend class DockWindowPlace;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DockableWindow)\n{\n    BASE_CLASS(o2::Window);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DockableWindow)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(\"tab/main\").NAME(mTabLayerPath);\n    FIELD().PROTECTED().DEFAULT_VALUE(\"tab/main/icon\").NAME(mTabIconLayerPath);\n    FIELD().PROTECTED().DEFAULT_VALUE(\"tab/main/caption\").NAME(mTabCaptionLayerPath);\n    FIELD().PROTECTED().DEFAULT_VALUE(\"back/icon\").NAME(mIconLayerPath);\n    FIELD().PROTECTED().DEFAULT_VALUE(\"back/caption\").NAME(mCaptionLayerPath);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.2f).NAME(mDockSizeCoef);\n    FIELD().PROTECTED().DEFAULT_VALUE(1.5f).NAME(mDockBorder);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mDocked);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mDockingFrameSample);\n    FIELD().PROTECTED().NAME(mDockingFrameCurrent);\n    FIELD().PROTECTED().NAME(mDockingFrameTarget);\n    FIELD().PROTECTED().DEFAULT_VALUE(mmake<AnimationPlayer>()).NAME(mDockingFrameAppearance);\n    FIELD().PROTECTED().NAME(mNonDockSize);\n    FIELD().PROTECTED().NAME(mDragOffset);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mTabState);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mTabPosition);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mTabActive);\n    FIELD().PROTECTED().DEFAULT_VALUE(150.0f).NAME(mTabWidth);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mAutoCalculateTabWidth);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DockableWindow)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const DockableWindow&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsDocked);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetDockingFrameSample);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIcon, const Ref<Sprite>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Sprite>, GetIcon);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIconLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetIconLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTabWidth, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetTabWidth);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTabActive);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsTabActive);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAutoCalcuclatingTabWidth, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsAutoCalcuclatingTabWidth);\n    FUNCTION().PUBLIC().SIGNATURE(void, PlaceDock, const Ref<DockWindowPlace>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Undock);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeDockFrameAppearanceAnim);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeDragHandles);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHeadDblCKicked, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMoveCompleted, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMoveBegin, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, TraceDock, Ref<DockWindowPlace>&, Side&, RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, PlaceNonLineDock, const Ref<DockWindowPlace>&, Side);\n    FUNCTION().PROTECTED().SIGNATURE(void, PlaceLineDock, const Ref<DockWindowPlace>&, Side, RectF);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetTabState, float, int, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetNonTabState);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetActiveTab);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetDocked, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, RecalculateTabWidth);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/GameWindow/GameWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"GameWindow.h\"\n\n#include \"o2/Scene/CameraActor.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Properties/Basic/Vector2IntProperty.h\"\n\nnamespace Editor\n{\n    GameWindow::GameWindow():\n        IEditorWindow()\n    {\n        InitializeWindow();\n    }\n\n    GameWindow::GameWindow(const GameWindow& other):\n        IEditorWindow(other)\n    {\n        InitializeWindow();\n    }\n\n    GameWindow::~GameWindow()\n    {}\n\n    void GameWindow::InitializeWindow()\n    {\n        mWindow->caption = \"Game\";\n        mWindow->name = \"game window\";\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_game_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-1, 2)));\n        mWindow->SetViewLayout(Layout::BothStretch(-1, 0, 0, 18));\n\n        mGameView = mmake<GameView>();\n        *mGameView->layout = WidgetLayout::BothStretch(0, 0, 0, 19);\n        mWindow->AddChild(mGameView);\n\n        InitializeDevicesMenu();\n\n        auto upPanel = mmake<HorizontalLayout>();\n        upPanel->name = \"up panel\";\n        upPanel->baseCorner = BaseCorner::Right;\n        upPanel->expandWidth = false;\n        upPanel->spacing = 5;\n        *upPanel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 20, 0);\n        upPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_small_panel_back.png\"), Layout::BothStretch(-5, -4, -4, -5));\n        mWindow->AddChild(upPanel);\n\n        mResolutionsButton = o2UI.CreateWidget<Button>(\"panel down\");\n        mResolutionsButton->caption = \"Resolution\";\n        mResolutionsButton->layout->minWidth = 300;\n        mResolutionsButton->onClick = [=]() { mDevicesMenu->Show(mResolutionsButton->layout->GetWorldLeftBottom()); };\n        upPanel->AddChild(mResolutionsButton);\n\n        auto resolutionLabel = o2UI.CreateLabel(\"Resolution:\");\n        resolutionLabel->horOverflow = Label::HorOverflow::Expand;\n        upPanel->AddChild(resolutionLabel);\n\n        OnCurrentWindowSize(true);\n    }\n\n    void GameWindow::InitializeDevicesMenu()\n    {\n        DataDocument doc;\n        doc.LoadFromFile(GetEditorAssetsPath() + String(\"SimulationDevicesList.json\"));\n\n        Vector<SimulationDevice> devicesList;\n        devicesList = doc[\"list\"];\n\n        for (auto& device: devicesList)\n            mDevicesList[device.deviceName] = device;\n\n        mDevicesMenu = o2UI.CreateWidget<ContextMenu>();\n\n        mCurrentWindowSizeItem = mDevicesMenu->AddToggleItem(\"Current window size\", true, THIS_FUNC(OnCurrentWindowSize));\n\n//         mCustomSizeItem = mDevicesMenu->AddToggleItem(\"Custom resolution\", false, THIS_FUNC(OnCustomResolution));\n//         mCustomSizeProperty = o2UI.CreateWidget<Vec2IProperty>();\n//         mCustomSizeProperty->SetValue(Vec2I(800, 600));\n//         *mCustomSizeProperty->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(150, 20));\n//         mCustomSizeProperty->onChangeCompleted = [&](const String&, const Vector<DataDocument>&, const Vector<DataDocument>&) { OnCustomResolution(true); };\n//         mCustomSizeItem->AddChild(mCustomSizeProperty);\n\n        mDevicesMenu->AddItem(\"---\");\n\n        for (auto& kv : mDevicesList)\n        {\n            String caption = kv.first + \" (\" + (String)kv.second.resolution.x + \" x \" + (String)kv.second.resolution.y + \")\";\n            auto item = mDevicesMenu->AddToggleItem(caption, false, [](bool) {});\n            item->onChecked = [=](bool checked) { OnDeviceSelected(kv.first, item); };\n        }\n\n        mWindow->AddChild(mDevicesMenu);\n    }\n\n    void GameWindow::SetResolution(const Vec2I& resolution)\n    {\n        mGameView->fixedResolution = true;\n        mGameView->resolution = resolution;\n        mGameView->UpdateRenderTargetSize();\n    }\n\n    void GameWindow::OnCurrentWindowSize(bool enabled)\n    {\n        SetDeviceMenuCheckedItem(mCurrentWindowSizeItem);\n        mResolutionsButton->caption = \"Current window size\";\n        mGameView->fixedResolution = false;\n        mGameView->UpdateRenderTargetSize();\n    }\n\n    void GameWindow::OnCustomResolution(bool enabled)\n    {\n        SetDeviceMenuCheckedItem(mCustomSizeItem);\n        mResolutionsButton->caption = \"Fixed \" + (String)mCustomSizeProperty->GetCommonValue();\n        SetResolution(mCustomSizeProperty->GetCommonValue());\n    }\n\n    void GameWindow::OnDeviceSelected(const String& name, const Ref<ContextMenu::Item>& item)\n    {\n        SetDeviceMenuCheckedItem(item);\n        mResolutionsButton->caption = item->text;\n        SetResolution(mDevicesList[name].resolution);\n    }\n\n    void GameWindow::SetDeviceMenuCheckedItem(const Ref<ContextMenu::Item>& item)\n    {\n        for (auto& child : mDevicesMenu->GetItemsLayout()->GetChildren())\n        {\n            if (auto childItem = DynamicCast<ContextMenuItem>(child))\n            {\n                if (childItem->IsCheckable())\n                    childItem->SetChecked(childItem == item->widget.Lock());\n            }\n        }\n    }\n\n    GameWindow::GameView::GameView(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        mRenderTarget = TextureRef(Vec2I(256, 256), TextureFormat::R8G8B8A8, Texture::Usage::RenderTarget);\n        mRenderTargetSprite = mmake<Sprite>(mRenderTarget, RectI(0, 0, 256, 256));\n    }\n\n    void GameWindow::GameView::Draw()\n    {\n        Widget::Draw();\n\n        o2Render.BindRenderTexture(mRenderTarget);\n\n        int editorDepth = EditorScope::GetDepth();\n        EditorScope::Exit(editorDepth);\n\n        o2Scene.Draw();\n\n        if (!o2Scene.GetCameras().IsEmpty())\n        {\n            auto prevCamera = o2Render.GetCamera();\n            auto cameraActor = o2Scene.GetCameras()[0].Lock();\n            cameraActor->Setup();\n            \n            if (o2Input.IsKeyDown(VK_F1))\n            {\n                auto localCursor = cameraActor->listenersLayer->ScreenToLocal(o2Input.GetCursorPos());\n                o2Render.DrawCross(localCursor, 25.0f, Color4::Red());\n                o2Debug.Log((String)localCursor);\n            }\n\n            o2Render.SetCamera(prevCamera);\n        }\n\n        EditorScope::Enter(editorDepth);\n\n        o2Render.UnbindRenderTexture();\n\n        mRenderTargetSprite->Draw();\n\n        EditorScope::Exit(editorDepth);\n\n        for (auto& camera : o2Scene.GetCameras())\n            camera.Lock()->listenersLayer->OnDrawn(mRenderTargetSprite->GetBasis());\n\n        EditorScope::Enter(editorDepth);\n    }\n\n    void GameWindow::GameView::UpdateRenderTargetSize()\n    {\n        Vec2I size = fixedResolution ? resolution : (Vec2I)layout->size.Get();\n        size.x = Math::Max(size.x, 32);\n        size.y = Math::Max(size.y, 32);\n\n        if (size != mRenderTarget->GetSize())\n        {\n            mRenderTarget = TextureRef(size, TextureFormat::R8G8B8A8, Texture::Usage::RenderTarget);\n            *mRenderTargetSprite = Sprite(mRenderTarget, RectI(Vec2I(), size));\n            mRenderTargetSprite->SetMode(SpriteMode::FixedAspect);\n        }\n\n        mRenderTargetSprite->SetRect(layout->worldRect);\n    }\n\n    String GameWindow::GameView::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void GameWindow::GameView::OnTransformUpdated()\n    {\n        Widget::OnTransformUpdated();\n        UpdateRenderTargetSize();\n    }\n\n    bool GameWindow::SimulationDevice::operator==(const SimulationDevice& other) const\n    {\n        return deviceName == other.deviceName;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::GameWindow::GameView>);\n// --- META ---\n\nDECLARE_CLASS(Editor::GameWindow, Editor__GameWindow);\n\nDECLARE_CLASS(Editor::GameWindow::GameView, Editor__GameWindow__GameView);\n\nDECLARE_CLASS(Editor::GameWindow::SimulationDevice, Editor__GameWindow__SimulationDevice);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/GameWindow/GameWindow.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorAreaEventsListenersLayer.h\"\n#include \"o2Editor/Windows/IEditorWindow.h\"\n\nnamespace o2\n{\n    class Widget;\n    class DropDown;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(Vec2IProperty);\n\n    // ---------------------------------------\n    // Game window. Draws scene, handles input\n    // ---------------------------------------\n    class GameWindow : public IEditorWindow\n    {\n    public:\n        // ----------------------------------------\n        // Game view widget, used for drawing scene\n        // ----------------------------------------\n        class GameView : public Widget\n        {\n        public:\n            bool  fixedResolution = true; // Is view resolution fixed\n            Vec2I resolution;             // View resolution\n\n        public:\n            // Default constructor, initializes view\n            GameView(RefCounter* refCounter);\n\n            // Draws view\n            void Draw() override;\n\n            // Updates render target size\n            void UpdateRenderTargetSize();\n\n            // Returns create menu category in editor\n            static String GetCreateMenuCategory();\n\n            SERIALIZABLE(GameView);\n            CLONEABLE_REF(GameView);\n\n        protected:\n            Ref<Sprite> mRenderTargetSprite; // Render target sprite, using for drawing scene render target\n            TextureRef  mRenderTarget;       // Render target texture, using for rendering scene\n\n        protected:\n            // Called when transformation was changed and updated, updates render texture and sprite\n            void OnTransformUpdated() override;\n        };\n\n        // ---------------------------\n        // Simulation devicedefinition\n        // ---------------------------\n        class SimulationDevice : public ISerializable\n        {\n        public:\n            String deviceName; // Name of device @SERIALIZABLE\n            Vec2I  resolution; // Target resolution @SERIALIZABLE\n\n        public:\n            // Equality operator\n            bool operator==(const SimulationDevice& other) const;\n\n            SERIALIZABLE(SimulationDevice);\n        };\n\n    public:\n        // Default constructor, initializes window and creates controls\n        GameWindow();\n\n        // Copy constructor\n        GameWindow(const GameWindow& other);\n\n        // Destructor\n        ~GameWindow();\n\n        IOBJECT(GameWindow);\n\n    protected:\n        Ref<GameView> mGameView; // Game view widget\n\n        Ref<Button> mResolutionsButton; // Resolutions popup button\n\n        Map<String, SimulationDevice> mDevicesList; // List of devices\n\n        Ref<ContextMenu>       mDevicesMenu;           // Devices menu\n        Ref<ContextMenu::Item> mCurrentWindowSizeItem; // Current window size item\n        Ref<ContextMenu::Item> mCustomSizeItem;        // Custom size item\n\n        Ref<Vec2IProperty> mCustomSizeProperty; // Custom view resolution size property\n\n    protected:\n        // Initializes window\n        void InitializeWindow();\n\n        // Initializes devices menu\n        void InitializeDevicesMenu();\n\n        // Sets game resolution\n        void SetResolution(const Vec2I& resolution);\n\n        // When current window size resolution checked\n        void OnCurrentWindowSize(bool enabled);\n\n        // When custom resolution checked\n        void OnCustomResolution(bool enabled);\n\n        // When device selected\n        void OnDeviceSelected(const String& name, const Ref<ContextMenu::Item>& item);\n\n        // Sets device menu checked item by name\n        void SetDeviceMenuCheckedItem(const Ref<ContextMenu::Item>& item);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::GameWindow)\n{\n    BASE_CLASS(Editor::IEditorWindow);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::GameWindow)\n{\n    FIELD().PROTECTED().NAME(mGameView);\n    FIELD().PROTECTED().NAME(mResolutionsButton);\n    FIELD().PROTECTED().NAME(mDevicesList);\n    FIELD().PROTECTED().NAME(mDevicesMenu);\n    FIELD().PROTECTED().NAME(mCurrentWindowSizeItem);\n    FIELD().PROTECTED().NAME(mCustomSizeItem);\n    FIELD().PROTECTED().NAME(mCustomSizeProperty);\n}\nEND_META;\nCLASS_METHODS_META(Editor::GameWindow)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const GameWindow&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeDevicesMenu);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetResolution, const Vec2I&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurrentWindowSize, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCustomResolution, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeviceSelected, const String&, const Ref<ContextMenu::Item>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetDeviceMenuCheckedItem, const Ref<ContextMenu::Item>&);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::GameWindow::GameView)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::GameWindow::GameView)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(true).NAME(fixedResolution);\n    FIELD().PUBLIC().NAME(resolution);\n    FIELD().PROTECTED().NAME(mRenderTargetSprite);\n    FIELD().PROTECTED().NAME(mRenderTarget);\n}\nEND_META;\nCLASS_METHODS_META(Editor::GameWindow::GameView)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateRenderTargetSize);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::GameWindow::SimulationDevice)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::GameWindow::SimulationDevice)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(deviceName);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(resolution);\n}\nEND_META;\nCLASS_METHODS_META(Editor::GameWindow::SimulationDevice)\n{\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/IAssetEditorWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IAssetEditorWindow.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2Editor/Dialogs/System/OpenSaveDialog.h\"\n#include \"o2Editor/Dialogs/YesNoCancelDlg.h\"\n\nnamespace Editor\n{\n\tIAssetEditorWindow::IAssetEditorWindow() :\n\t\tIAssetEditorWindow(nullptr)\n\t{\n\t}\n\n\tIAssetEditorWindow::IAssetEditorWindow(RefCounter* refCounter) :\n\t\tIEditorWindow(refCounter), ActionsList(refCounter)\n\t{\n\t\tInitializeWindow();\n\t}\n\n\tIAssetEditorWindow::IAssetEditorWindow(const IAssetEditorWindow& other) :\n\t\tIAssetEditorWindow(nullptr, other)\n\t{\n\t}\n\n\tIAssetEditorWindow::IAssetEditorWindow(RefCounter* refCounter, const IAssetEditorWindow& other) :\n\t\tIEditorWindow(refCounter, other), mEditingAsset(other.mEditingAsset)\n\t{\n\t\tInitializeWindow();\n\t}\n\n\tIAssetEditorWindow::~IAssetEditorWindow()\n\t{\n\t}\n\n\tconst Type& IAssetEditorWindow::GetAssetType() const\n\t{\n\t\treturn TypeOf(Asset);\n\t}\n\n\tvoid IAssetEditorWindow::EditAsset(const AssetRef<Asset>& asset)\n\t{\n\t\tEditAsset(asset, nullptr);\n\t}\n\n\tvoid IAssetEditorWindow::EditAsset(const AssetRef<Asset>& asset, const Ref<Component>& component,\n                                       const Ref<IAssetEditablePreview>& preview)\n\t{\n\t\tif (mEditingAsset)\n\t\t\tOnCompletedEditingAsset();\n\n\t\tif (mEditingComponent)\n\t\t\tOnCompletedEditingComponent();\n\n\t\tSetComponentPreview(false);\n\n\t\tAssetRef<Asset> editingAsset = asset ? asset : CreateAssetInstance();\n\n\t\tmEditingComponent = component;\n\t\tmEditingAsset = editingAsset;\n\t\tmIsEditingAssetInstance = editingAsset.IsInstance();\n\t\tmEditingAssetEditablePreview = preview ? preview : DynamicCast<IAssetEditablePreview>(component);\n\n\t\tif (mEditingAsset)\n\t\t{\n\t\t\tOnStartEditingAsset();\n\t\t\tmEditingAssetInstanceCache = mEditingAsset;\n\t\t}\n\n\t\tif (mEditingComponent)\n\t\t\tOnStartEditingComponent();\n\n\t\tSetComponentPreview(true);\n\n\t\tUpdateWindowTitle();\n\n\t\tif (mWindow)\n\t\t\tmWindow->Focus();\n\n\t\tmEditingAssetProperty = nullptr;\n\t}\n\n\tvoid IAssetEditorWindow::EditAsset(const Ref<AssetProperty>& assetProperty, const Ref<Component>& component,\n                                       const Ref<IAssetEditablePreview>& preview)\n\t{\n\t\tEditAsset(assetProperty->GetCommonValue(), component, preview);\n\t\tmEditingAssetProperty = assetProperty;\n\t}\n\n\tvoid IAssetEditorWindow::SetComponentPreview(bool enable)\n\t{\n\t\tif (!IsComponentPreviewAvailable())\n\t\t{\n\t\t\tmPreviewToggle->enabled = false;\n\t\t\treturn;\n\t\t}\n\n\t\tmPreviewToggle->enabled = true;\n\t\tmPreviewToggle->value = enable;\n\t\tmPreviewEnabled = enable;\n\n\t\tif (enable)\n\t\t{\n\t\t\tif (auto editablePreview = mEditingAssetEditablePreview.Lock())\n\t\t\t{\n\t\t\t\teditablePreview->BeginPreview();\n\t\t\t\tOnAssetEditablePreviewEnabled();\n\t\t\t}\n\n\t\t\tOnComponentPreviewEnabled();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (auto editablePreview = mEditingAssetEditablePreview.Lock())\n\t\t\t{\n\t\t\t\tOnAssetEditablePreviewDisabled();\n\t\t\t\teditablePreview->EndPreview();\n\t\t\t}\n\n\t\t\tOnComponentPreviewDisabled();\n\t\t}\n\t}\n\n\tvoid IAssetEditorWindow::CreateNewAsset()\n\t{\n\t\tauto newAsset = CreateAssetInstance();\n\t\tSetComponentAndPropertyAsset(newAsset);\n\n\t\tUpdateWindowTitle();\n\t}\n\n\tAssetRef<Asset> IAssetEditorWindow::GetEditingAsset() const\n\t{\n\t\treturn mEditingAsset.Lock();\n\t}\n\n\tvoid IAssetEditorWindow::SaveEditingAsset()\n\t{\n\t\tif (!mEditingAsset)\n\t\t\treturn;\n\n\t\tauto editingAsset = mEditingAsset.Lock();\n\t\tif (!editingAsset || !editingAsset->IsDirty())\n\t\t\treturn;\n\n\t\tif (editingAsset->GetPath().IsEmpty())\n\t\t\tMenuSaveAsAsset();\n\t\telse\n\t\t{\n\t\t\teditingAsset->Save();\n\t\t\tOnAssetSaved();\n\t\t\to2Assets.RebuildAssets();\n\t\t}\n\n\t\tUpdateWindowTitle();\n\t}\n\n\tvoid IAssetEditorWindow::RevertEditingAsset()\n\t{\n\t\tif (!mEditingAsset)\n\t\t\treturn;\n\n\t\tif (mIsEditingAssetInstance)\n\t\t{\n\t\t\tRef<Asset> asset;\n\t\t\tmEditingAssetInstanceCache.Get(asset);\n\t\t\tmEditingAsset = asset;\n\t\t}\n\t\telse\n\t\t\tmEditingAsset.Lock()->Reload(); \n\n\t\tSetComponentAndPropertyAsset(mEditingAsset.Lock());\n\t}\n\n\tvoid IAssetEditorWindow::MenuCreateNewAsset()\n\t{\n\t\tCheckDirtyAssetAndExecute([this]() { CreateNewAsset(); });\n\t}\n\n\tvoid IAssetEditorWindow::MenuOpenAsset()\n\t{\n\t\tCheckDirtyAssetAndExecute([this]() {\n\t\t\tMap<String, String> extensionMap = CreateFileExtensionMap();\n\t\t\tString fileName = GetOpenFileNameDialog(\"Open Asset\", extensionMap);\n\t\t\tif (!fileName.IsEmpty())\n\t\t\t{\n\t\t\t\tString relativePath = o2FileSystem.GetPathRelativeToPath(fileName, ::GetAssetsPath());\n\t\t\t\tif (auto asset = o2Assets.GetAssetRef(relativePath))\n\t\t\t\t\tSetComponentAndPropertyAsset(asset);\n\n\t\t\t\tUpdateWindowTitle();\n\t\t\t}\n\t\t});\n\t}\n\n\tvoid IAssetEditorWindow::MenuSaveAsset()\n\t{\n\t\tSaveEditingAsset();\n\t}\n\n\tvoid IAssetEditorWindow::MenuSaveAsAsset()\n\t{\n\t\tMap<String, String> extensionMap = CreateFileExtensionMap();\n\t\tString defaultPath = ::GetAssetsPath();\n\t\tString fileName = GetSaveFileNameDialog(\"Save Asset As\", extensionMap, defaultPath);\n\n\t\tif (!fileName.IsEmpty() && mEditingAsset)\n\t\t{\n\t\t\tString relativePath = o2FileSystem.GetPathRelativeToPath(fileName, defaultPath);\n\n\t\t\tauto extensions = GetAssetType().InvokeStatic<Vector<String>>(\"GetFileExtensions\");\n\t\t\tif (!extensions.IsEmpty() && !relativePath.EndsWith(extensions[0]))\n\t\t\t\trelativePath += \".\" + extensions[0];\n\n\t\t\tif (auto asset = mEditingAsset.Lock())\n\t\t\t{\n\t\t\t\tasset->SetPath(relativePath);\n\t\t\t\tasset->Save();\n\n\t\t\t\tSetComponentAndPropertyAsset(asset);\n\n\t\t\t\tOnAssetSaved();\n\t\t\t\to2Assets.RebuildAssets();\n\n\t\t\t\tUpdateWindowTitle();\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid IAssetEditorWindow::MenuRevertAsset()\n\t{\n\t\tif (!mEditingAsset || !mEditingAsset.Lock()->IsDirty())\n\t\t\treturn;\n\n\t\tYesNoCancelDlg::ShowYesNo( \"Revert changes to asset?\", [this]() { RevertEditingAsset(); });\n\t}\n\n\tvoid IAssetEditorWindow::OnAssetChanged()\n\t{\n\t\tif (auto asset = mEditingAsset.Lock())\n\t\t\tasset->SetDirty(true);\n\t}\n\n\tvoid IAssetEditorWindow::Initialize()\n\t{\n\t\tif (IsCreateNewAssetAtStartupEnabled())\n\t\t\tCreateNewAsset();\n\t}\n\n\tvoid IAssetEditorWindow::Update(float dt)\n\t{\n\t\tCheckAssetAlive();\n\n\t\tmSaveAssetButton->interactable = mEditingAsset && mEditingAsset.Lock()->IsDirty();\n\t}\n\n\tRef<RefCounterable> IAssetEditorWindow::CastToRefCounterable(const Ref<IAssetEditorWindow>& ref)\n\t{\n\t\treturn DynamicCast<IEditorWindow>(ref);\n\t}\n\n\tvoid IAssetEditorWindow::UpdateWindowTitle()\n\t{\n\t\tif (!mWindow)\n\t\t\treturn;\n\n\t\tString title = GetWindowTitle();\n\t\tif (auto asset = mEditingAsset.Lock())\n\t\t{\n\t\t\tString assetName;\n\t\t\tif (asset->GetPath().IsEmpty())\n\t\t\t\tassetName = mIsEditingAssetInstance ? \"Instance\" : \"Unnamed\";\n\t\t\telse\n\t\t\t\tassetName = o2FileSystem.GetFileNameWithoutExtension(asset->GetPath());\n\n\t\t\ttitle += \" - \" + assetName;\n\t\t}\n\n\t\tmWindow->caption = title;\n\t}\n\n\tvoid IAssetEditorWindow::CheckAssetAlive()\n\t{\n\t\tif (mPrevEditingAssetAlive && !mEditingAsset)\n\t\t\tEditAsset(nullptr);\n\n\t\tmPrevEditingAssetAlive = mEditingAsset != nullptr;\n\t}\n\n\tvoid IAssetEditorWindow::InitializeWindow()\n\t{\n\t\tmWindow->SetViewLayout(Layout::BothStretch(-1, 0, 0, 18));\n\n\t\tmUpPanel = mmake<HorizontalLayout>();\n\t\tmUpPanel->name = \"up panel\";\n\t\t*mUpPanel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 20, 0);\n\t\tmUpPanel->baseCorner = BaseCorner::Left;\n\t\tmUpPanel->expandHeight = true;\n\t\tmUpPanel->expandWidth = true;\n\t\tmUpPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_small_panel_back.png\"), Layout::BothStretch(-5, -5, -4, -5));\n\t\tmWindow->AddChild(mUpPanel);\n\n\t\tmButtonsPanel = mmake<HorizontalLayout>();\n\t\tmButtonsPanel->name = \"buttons panel\";\n\t\t*mButtonsPanel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 20, 0);\n\t\tmButtonsPanel->baseCorner = BaseCorner::Left;\n\t\tmButtonsPanel->expandHeight = true;\n\t\tmButtonsPanel->expandWidth = false;\n\t\tmUpPanel->AddChild(mButtonsPanel);\n\n\t\tmPreviewToggle = o2UI.CreateWidget<Toggle>(\"menu preview\");\n\t\tmPreviewToggle->onToggle = THIS_FUNC(OnMenuPreviewToggle);\n\t\tmButtonsPanel->AddChild(mPreviewToggle);\n\n\t\tmNewAssetButton = o2UI.CreateWidget<Button>(\"menu new asset\");\n\t\tmNewAssetButton->name = \"new asset button\";\n\t\tmNewAssetButton->onClick += THIS_FUNC(MenuCreateNewAsset);\n\t\tmButtonsPanel->AddChild(mNewAssetButton);\n\n\t\tmOpenAssetButton = o2UI.CreateWidget<Button>(\"menu open asset\");\n\t\tmOpenAssetButton->name = \"open asset button\";\n\t\tmOpenAssetButton->onClick += THIS_FUNC(MenuOpenAsset);\n\t\tmButtonsPanel->AddChild(mOpenAssetButton);\n\n\t\tmSaveAssetButton = o2UI.CreateWidget<Button>(\"menu save asset\");\n\t\tmSaveAssetButton->name = \"save button\";\n\t\tmSaveAssetButton->onClick += THIS_FUNC(MenuSaveAsset);\n\t\tmButtonsPanel->AddChild(mSaveAssetButton);\n\n\t\tmSaveAsAssetButton = o2UI.CreateWidget<Button>(\"menu save as asset\");\n\t\tmSaveAsAssetButton->name = \"save as button\";\n\t\tmSaveAsAssetButton->onClick += THIS_FUNC(MenuSaveAsAsset);\n\t\tmButtonsPanel->AddChild(mSaveAsAssetButton);\n\n\t\tmRevertAssetButton = o2UI.CreateWidget<Button>(\"menu revert asset\");\n\t\tmRevertAssetButton->name = \"revert button\";\n\t\tmRevertAssetButton->onClick += THIS_FUNC(MenuRevertAsset);\n\t\tmButtonsPanel->AddChild(mRevertAssetButton);\n\n\t\tmUndoActionListener = mmake<FunctionalShortcutKeysListener>();\n\t\tmUndoActionListener->onShortcutPressed = [this]() { UndoAction(); };\n\t\tmUndoActionListener->SetShortcut(ShortcutKeys({VK_Z, VK_CTRL_CMD}));\n\n\t\tmRedoActionListener = mmake<FunctionalShortcutKeysListener>();\n\t\tmRedoActionListener->onShortcutPressed = [this]() { RedoAction(); };\n\t\tmRedoActionListener->SetShortcut(ShortcutKeys({VK_Y, VK_CTRL_CMD}));\n\t}\n\n\tString IAssetEditorWindow::GetWindowTitle() const\n\t{\n\t\treturn \"Asset Editor\";\n\t}\n\n\tvoid IAssetEditorWindow::OnFocused()\n\t{\n\t\tmUndoActionListener->SetMaxPriority();\n\t\tmRedoActionListener->SetMaxPriority();\n\t}\n\n\tvoid IAssetEditorWindow::OnUnfocused()\n\t{}\n\n\tbool IAssetEditorWindow::IsComponentPreviewAvailable() const\n\t{\n\t\treturn mEditingComponent != nullptr;\n\t}\n\n\tbool IAssetEditorWindow::IsCreateNewAssetAtStartupEnabled() const\n\t{\n\t\treturn true;\n\t}\n\n    void IAssetEditorWindow::SetComponentAndPropertyAsset(const AssetRef<Asset> &asset)\n    {\n\t\tif (auto assetProperty = mEditingAssetProperty.Lock())\n\t\t\tassetProperty->SetValue(asset);\n\n\t\tif (mEditingComponent)\n\t\t\tComponentSetAsset(asset);\n\n\t\tauto tmpAssetProperty = mEditingAssetProperty;\n\t\tEditAsset(asset, mEditingComponent.Lock());\n\t\tmEditingAssetProperty = tmpAssetProperty;\n    }\n\n    AssetRef<Asset> IAssetEditorWindow::CreateAssetInstance()\n    {\n\t\tAssetRef result(DynamicCast<Asset>(GetAssetType().CreateSampleRef()));\n\t\tresult->SetPath(\"Unnamed\");\n\t\treturn result;\n\t}\n\n\tvoid IAssetEditorWindow::OnMenuPreviewToggle(bool preview)\n\t{\n\t\tSetComponentPreview(preview);\n\t}\n\n\tvoid IAssetEditorWindow::CheckDirtyAssetAndExecute(const Function<void()>& callback)\n\t{\n\t\tif (!mEditingAsset || !mEditingAsset.Lock()->IsDirty())\n\t\t{\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}\n\n\t\tYesNoCancelDlg::ShowYesNoCancel(\"Asset has been modified. Save changes?\",\n\t\t\t\t\t\t\t\t\t\t[this, callback]() { SaveEditingAsset(); callback(); },\n\t\t\t\t\t\t\t\t\t\tcallback);\n\t}\n\n\tMap<String, String> IAssetEditorWindow::CreateFileExtensionMap() const\n\t{\n\t\tauto& assetType = GetAssetType();\n\t\tauto extensions = assetType.InvokeStatic<Vector<String>>(\"GetFileExtensions\");\n\n\t\tMap<String, String> extensionMap;\n\t\tfor (const auto& ext : extensions)\n\t\t\textensionMap[assetType.GetName() + \" files\"] = \"*.\" + ext;\n\n\t\treturn extensionMap;\n\t}\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IAssetEditorWindow, Editor__IAssetEditorWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/IAssetEditorWindow.h",
    "content": "#pragma once\n\n#include \"IEditorWindow.h\"\n#include \"o2Editor/Actions/ActionsList.h\"\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n#include \"o2/Events/ShortcutKeysListener.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Editor/AssetEditablePreview.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2Editor/Properties/Basic/AssetProperty.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n\t// ------------------------------------------------\n\t// Asset editor window interface for editing assets\n\t// Base interface for all asset editor windows\n\t// ------------------------------------------------\n    class IAssetEditorWindow: public IEditorWindow, public ActionsList\n    {\n    public:\n        // Default constructor\n        IAssetEditorWindow();\n\n        // Constructor with ref counter\n        explicit IAssetEditorWindow(RefCounter* refCounter);\n\n        // Copy-constructor\n        IAssetEditorWindow(const IAssetEditorWindow& other);\n\n        // Copy-constructor with ref counter\n        IAssetEditorWindow(RefCounter* refCounter, const IAssetEditorWindow& other);\n\n        // Virtual destructor\n        ~IAssetEditorWindow() override;\n\n\t\t// Returns asset type that this editor window can edit\n        virtual const Type& GetAssetType() const;\n\n\t\t// Sets asset to edit\n        virtual void EditAsset(const AssetRef<Asset>& asset);\n\n\t\t// Sets asset to edit with component\n\t\tvirtual void EditAsset(const AssetRef<Asset>& asset, const Ref<Component>& component, \n                               const Ref<IAssetEditablePreview>& preview = nullptr);\n\n        // Sets asset to edit with asset property and component\n        virtual void EditAsset(const Ref<AssetProperty>& assetProperty, const Ref<Component>& component,\n                               const Ref<IAssetEditablePreview>& preview = nullptr);\n\n\t\t// Enables or disables component preview mode\n\t\tvoid SetComponentPreview(bool enable);\n\n\t\t// Creates a new asset and starts editing it\n        virtual void CreateNewAsset();\n\n        // Saves the currently editing asset\n\t\tvirtual void SaveEditingAsset();\n\n\t\t// Reverts the currently editing asset to its last saved state\n\t\tvirtual void RevertEditingAsset();\n\n        // Called when new asset button is pressed\n        virtual void MenuCreateNewAsset();\n\n        // Called when open asset button is pressed\n        virtual void MenuOpenAsset();\n\n        // Called when save asset button is pressed\n        virtual void MenuSaveAsset();\n\n        // Called when save as asset button is pressed\n        virtual void MenuSaveAsAsset();\n\n        // Called when revert button is pressed\n        virtual void MenuRevertAsset();\n\n\t\t// Returns currently editing asset\n\t\tvirtual AssetRef<Asset> GetEditingAsset() const;\n\n        // Called when asset has changed, marks asset as dirty\n        virtual void OnAssetChanged();\n\n        // Initializes window, called after all windows created. Creates new asset\n\t\tvoid Initialize() override;\n\n\t\t// Updates window logic; updates save icon state\n\t\tvoid Update(float dt) override;\n\n\t\t// Casts Ref<IAssetEditorWindow> to Ref<RefCounterable>\n\t\tstatic Ref<RefCounterable> CastToRefCounterable(const Ref<IAssetEditorWindow>& ref);\n\n        IOBJECT(IAssetEditorWindow);\n        REF_COUNTERABLE_IMPL(IEditorWindow, ActionsList);\n\n    protected:\n        WeakRef<Asset> mEditingAsset;                    // Currently editing asset\n        bool           mIsEditingAssetInstance = false;  // Flag for editing asset instance\n        bool           mPrevEditingAssetAlive = false;   // Previous state of editing asset alive\n\n        WeakRef<AssetProperty>         mEditingAssetProperty;        // Property of the asset being edited\n        WeakRef<Component>             mEditingComponent;            // Component of the asset being edited\n        WeakRef<IAssetEditablePreview> mEditingAssetEditablePreview; // Asset editable preview of the asset being edited\n\n\t\tDataDocument mEditingAssetInstanceCache; // Cache for asset instance data, used to restore asset state\n\n        Ref<HorizontalLayout> mUpPanel;      // Upper panel with buttons and other controls\n        Ref<HorizontalLayout> mButtonsPanel; // Buttons panel\n\n        Ref<Toggle> mPreviewToggle;          // Toggle for enabling preview mode while editing asset\n        bool        mPreviewEnabled = false; // Flag for preview mode\n\n\t\tRef<Button> mNewAssetButton;    // New asset button\n\t\tRef<Button> mOpenAssetButton;   // Open asset button\n\t\tRef<Button> mSaveAssetButton;   // Save button\n\t\tRef<Button> mSaveAsAssetButton; // Save as button\n\t\tRef<Button> mRevertAssetButton; // Reset button\n\n\t\tRef<FunctionalShortcutKeysListener> mUndoActionListener; // Listener for undo action shortcut\n\t\tRef<FunctionalShortcutKeysListener> mRedoActionListener; // Listener for redo action shortcut\n\n    protected:\n        // Initializes window and controls\n        virtual void InitializeWindow();\n\n        // Returns window title\n        virtual String GetWindowTitle() const;\n\n\t\t// Called when window is focused, updates shortcut listeners priority\n\t\tvoid OnFocused() override;\n\n\t\t// Called when window is unfocused, updates shortcut listeners priority\n\t\tvoid OnUnfocused() override;\n\n        // Called when asset editing starts\n        virtual void OnStartEditingAsset() {}\n\n        // Called when asset editing ends\n        virtual void OnCompletedEditingAsset() {}\n\n\t\t// Called when component editing starts\n\t\tvirtual void OnStartEditingComponent() {}\n\n\t\t// Called when component editing ends\n\t\tvirtual void OnCompletedEditingComponent() {}\n\n        // Returns true if create new asset at startup is enabled\n        virtual bool IsCreateNewAssetAtStartupEnabled() const;\n\n\t\t// Returns true if component preview is available for this asset type\n        virtual bool IsComponentPreviewAvailable() const;\n\n\t\t// Called when component preview is enabled\n        virtual void OnComponentPreviewEnabled() {}\n\n\t\t// Called when component preview is disabled\n\t\tvirtual void OnComponentPreviewDisabled() {}\n\n        // Called when asset editable preview is enabled\n        virtual void OnAssetEditablePreviewEnabled() {}\n\n        // Called when asset editable preview is disabled\n        virtual void OnAssetEditablePreviewDisabled() {}\n\n\t\t// Sets current component asset\n        virtual void ComponentSetAsset(const AssetRef<Asset>& asset) {}\n\n        // Sets current component and property asset\n        virtual void SetComponentAndPropertyAsset(const AssetRef<Asset>& asset);\n\n        // Called when asset is saved\n        virtual void OnAssetSaved() {}\n\n\t\t// Creates new asset instance by editing asset type\n        virtual AssetRef<Asset> CreateAssetInstance();\n\n\t\t// Called to toggle preview mode\n        virtual void OnMenuPreviewToggle(bool preview);\n\n        // Updates window title\n        void UpdateWindowTitle();\n\n        // Checks if current asset is alive. Resets editing asset if it is not alive\n        void CheckAssetAlive();\n\n\t\t// Checks if current asset is dirty and shows save dialog, then executes callback\n\t\tvoid CheckDirtyAssetAndExecute(const Function<void()>& callback);\n\n\t\t// Creates extension map for file dialogs based on current asset type\n\t\tMap<String, String> CreateFileExtensionMap() const;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IAssetEditorWindow)\n{\n    BASE_CLASS(Editor::IEditorWindow);\n    BASE_CLASS(Editor::ActionsList);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IAssetEditorWindow)\n{\n    FIELD().PROTECTED().NAME(mEditingAsset);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsEditingAssetInstance);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPrevEditingAssetAlive);\n    FIELD().PROTECTED().NAME(mEditingAssetProperty);\n    FIELD().PROTECTED().NAME(mEditingComponent);\n    FIELD().PROTECTED().NAME(mEditingAssetEditablePreview);\n    FIELD().PROTECTED().NAME(mEditingAssetInstanceCache);\n    FIELD().PROTECTED().NAME(mUpPanel);\n    FIELD().PROTECTED().NAME(mButtonsPanel);\n    FIELD().PROTECTED().NAME(mPreviewToggle);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPreviewEnabled);\n    FIELD().PROTECTED().NAME(mNewAssetButton);\n    FIELD().PROTECTED().NAME(mOpenAssetButton);\n    FIELD().PROTECTED().NAME(mSaveAssetButton);\n    FIELD().PROTECTED().NAME(mSaveAsAssetButton);\n    FIELD().PROTECTED().NAME(mRevertAssetButton);\n    FIELD().PROTECTED().NAME(mUndoActionListener);\n    FIELD().PROTECTED().NAME(mRedoActionListener);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IAssetEditorWindow)\n{\n\n    typedef Map<String, String> _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const IAssetEditorWindow&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const IAssetEditorWindow&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type&, GetAssetType);\n    FUNCTION().PUBLIC().SIGNATURE(void, EditAsset, const AssetRef<Asset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, EditAsset, const AssetRef<Asset>&, const Ref<Component>&, const Ref<IAssetEditablePreview>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, EditAsset, const Ref<AssetProperty>&, const Ref<Component>&, const Ref<IAssetEditablePreview>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetComponentPreview, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, CreateNewAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, SaveEditingAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, RevertEditingAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, MenuCreateNewAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, MenuOpenAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, MenuSaveAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, MenuSaveAsAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, MenuRevertAsset);\n    FUNCTION().PUBLIC().SIGNATURE(AssetRef<Asset>, GetEditingAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnAssetChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<IAssetEditorWindow>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(String, GetWindowTitle);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUnfocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStartEditingAsset);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCompletedEditingAsset);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStartEditingComponent);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCompletedEditingComponent);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsCreateNewAssetAtStartupEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsComponentPreviewAvailable);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentPreviewEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentPreviewDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetEditablePreviewEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetEditablePreviewDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, ComponentSetAsset, const AssetRef<Asset>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetComponentAndPropertyAsset, const AssetRef<Asset>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetSaved);\n    FUNCTION().PROTECTED().SIGNATURE(AssetRef<Asset>, CreateAssetInstance);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMenuPreviewToggle, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateWindowTitle);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckAssetAlive);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckDirtyAssetAndExecute, const Function<void()>&);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp1, CreateFileExtensionMap);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/IEditorWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IEditorWindow.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2Editor/UIRoot.h\"\n#include \"o2Editor/Windows/DockableWindow.h\"\n\nnamespace Editor\n{\n    IEditorWindow::IEditorWindow():\n        IEditorWindow(nullptr)\n    {}\n\n    IEditorWindow::IEditorWindow(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {\n        mWindow = o2UI.CreateWidget<DockableWindow>();\n        mWindow->layout->size = Vec2F(200, 200);\n        mWindow->onOpened += THIS_FUNC(OnOpened);\n        mWindow->onClosed += THIS_FUNC(OnClosed);\n\t\tmWindow->onFocused += THIS_FUNC(OnFocused);\n\t\tmWindow->onUnfocused += THIS_FUNC(OnUnfocused);\n\n        EditorUIRoot.AddWidget(mWindow);\n    }\n\n    IEditorWindow::IEditorWindow(RefCounter* refCounter, const IEditorWindow& other) :\n        RefCounterable(refCounter), mWindow(other.mWindow->CloneAsRef<DockableWindow>())\n    {\n        if (mWindow)\n            EditorUIRoot.AddWidget(mWindow);\n    }\n\n    IEditorWindow::IEditorWindow(const IEditorWindow& other):\n        IEditorWindow(nullptr, other)\n    {}\n\n    IEditorWindow::~IEditorWindow()\n    {}\n\n\tvoid IEditorWindow::Initialize()\n\t{}\n\n\tvoid IEditorWindow::Show()\n    {\n        SetVisible(true);\n    }\n\n    void IEditorWindow::Hide()\n    {\n        SetVisible(false);\n    }\n\n\tbool IEditorWindow::IsFocused() const\n\t{\n\t\treturn mWindow->IsFocused();\n\t}\n\n\tconst Ref<DockableWindow>& IEditorWindow::GetWindow() const\n    {\n        return mWindow;\n    }\n\n    void IEditorWindow::SetVisible(bool visible)\n    {\n        mWindow->SetEnabled(visible);\n    }\n\n    void IEditorWindow::Update(float dt)\n    {}\n\n    void IEditorWindow::Draw()\n    {}\n\n    bool IEditorWindow::IsVisible()\n    {\n        return mWindow->IsEnabled();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IEditorWindow, Editor__IEditorWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/IEditorWindow.h",
    "content": "#pragma once\n\n#include \"DockableWindow.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // -----------------------------\n    // Basic editor window interface\n    // -----------------------------\n    class IEditorWindow: public IObject, public RefCounterable\n    {\n    public:\n        // Default constructor\n        IEditorWindow();\n\n        // Default constructor\n        explicit IEditorWindow(RefCounter* refCounter);\n\n        // Copy-constructor\n        IEditorWindow(const IEditorWindow& other);\n\n        // Copy-constructor\n        IEditorWindow(RefCounter* refCounter, const IEditorWindow& other);\n\n        // Virtual destructor\n        virtual ~IEditorWindow();\n\n\t\t// Initializes window, called after all windows created\n        virtual void Initialize();\n\n        // Sets visibility\n        virtual void SetVisible(bool visible);\n\n        // Updates window logic\n        virtual void Update(float dt);\n\n        // Draws window stuff\n        virtual void Draw();\n\n        // Returns is window is visible\n        bool IsVisible();\n\n        // Shows window\n        void Show();\n\n        // Hides window\n        void Hide();\n\n\t\t// Returns is window is focused\n\t\tbool IsFocused() const;\n\n        // Returns window\n        const Ref<DockableWindow>& GetWindow() const;\n\n        IOBJECT(IEditorWindow);\n\n    protected:\n        Ref<DockableWindow> mWindow; // Dockable UI window \n\n    protected:\n        // Called after that all windows was created\n        virtual void PostInitializeWindow() {}\n\n        // Called when editor window has opened\n        virtual void OnOpened() {}\n\n        // Called when editor window has closed\n        virtual void OnClosed() {}\n\n\t\t// Called when window has focused\n\t\tvirtual void OnFocused() {}\n\n\t\t// Called when window has lost focus\n\t\tvirtual void OnUnfocused() {}\n\n        friend class WindowsManager;\n        friend class WindowsLayout;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IEditorWindow)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IEditorWindow)\n{\n    FIELD().PROTECTED().NAME(mWindow);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IEditorWindow)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const IEditorWindow&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const IEditorWindow&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVisible, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsVisible);\n    FUNCTION().PUBLIC().SIGNATURE(void, Show);\n    FUNCTION().PUBLIC().SIGNATURE(void, Hide);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFocused);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<DockableWindow>&, GetWindow);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostInitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnOpened);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClosed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUnfocused);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/LogWindow/LogWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"LogWindow.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/List.h\"\n#include \"o2/Scene/UI/Widgets/LongList.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace Editor\n{\n    void LogWindow::Update(float dt)\n    {\n        if (o2Input.IsKeyDown('H'))\n            o2Debug.Log(\"Regular message \" + (String)o2Time.GetLocalTime());\n\n        if (o2Input.IsKeyDown('J'))\n            o2Debug.LogWarning(\"Warning message \" + (String)o2Time.GetLocalTime());\n\n        if (o2Input.IsKeyDown('K'))\n            o2Debug.LogError(\"Error message \" + (String)o2Time.GetLocalTime());\n    }\n\n    Ref<RefCounterable> LogWindow::CastToRefCounterable(const Ref<LogWindow>& ref)\n    {\n        return DynamicCast<IEditorWindow>(ref);\n    }\n\n    LogWindow::LogWindow(RefCounter* refCounter) :\n        IEditorWindow(refCounter), LogStream(refCounter)\n    {\n        InitializeWindow();\n        BindStream(o2Debug.GetLog());\n    }\n\n    LogWindow::~LogWindow()\n    {}\n\n    void LogWindow::InitializeWindow()\n    {\n        mWindow->caption = \"Log\";\n        mWindow->name = \"log window\";\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_log_wnd_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-1, 1)));\n        mWindow->SetViewLayout(Layout::BothStretch(-2, 0, 0, 18));\n        mWindow->SetClippingLayout(Layout::BothStretch(-1, 0, 0, 18));\n\n        mList = o2UI.CreateWidget<LongList>();\n        *mList->layout = WidgetLayout::BothStretch(0, 18, 0, -1);\n        mList->SetViewLayout(Layout::BothStretch());\n        mList->getItemsCountFunc = THIS_FUNC(GetVisibleMessagesCount);\n        mList->getItemsRangeFunc = THIS_FUNC(GetVisibleMessagesRange);\n        mList->setupItemFunc = THIS_FUNC(SetupListMessage);\n\n        auto listItemSample = mmake<Widget>();\n        listItemSample->layout->minHeight = 25;\n        listItemSample->AddLayer(\"back\", mmake<Sprite>(Color4(0, 0, 0, 255)));\n        listItemSample->AddLayer(\"warning\", mmake<Sprite>(Color4(226, 198, 83, 255)),\n                                 Layout::VerStretch(HorAlign::Left, 0, 0, 10, 0));\n        listItemSample->AddLayer(\"error\", mmake<Sprite>(Color4(248, 94, 72, 255)),\n                                 Layout::VerStretch(HorAlign::Left, 0, 0, 10, 0));\n\n        auto captionText = mmake<Text>(\"stdFont.ttf\");\n        captionText->text = \"text\";\n        captionText->horAlign = HorAlign::Left;\n        captionText->verAlign = VerAlign::Middle;\n        captionText->dotsEngings = true;\n        captionText->color = Color4(96, 125, 139);\n        listItemSample->AddLayer(\"caption\", captionText, Layout::BothStretch(15, 0, 0, 0));\n\n        mList->SetItemSample(listItemSample);\n\n        mWindow->AddChild(mList);\n\n        auto downPanel = mmake<Widget>();\n        downPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_small_panel_down_back.png\"),\n                            Layout::BothStretch(-4, -5, -4, -5));\n        *downPanel->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 20, 0);\n        mWindow->AddChild(downPanel);\n\n        auto clearBtn = o2UI.CreateWidget<Button>(\"down panel trash\");\n        *clearBtn->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(0, 0));\n        clearBtn->onClick = [&]() { OnClearPressed(); };\n        downPanel->AddChild(clearBtn);\n\n        auto messagesToggle = o2UI.CreateWidget<Toggle>(\"log messages\");\n        *messagesToggle->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(60, 20), Vec2F(20, 0));\n        mMessagesCountLabel = messagesToggle->GetLayerDrawable<Text>(\"caption\");\n        mMessagesCountLabel->text = \"0\";\n        messagesToggle->value = true;\n        messagesToggle->onToggle = [&](bool value) { OnRegularMessagesToggled(value); };\n        downPanel->AddChild(messagesToggle);\n\n        auto warningsToggle = o2UI.CreateWidget<Toggle>(\"log warnings\");\n        *warningsToggle->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(60, 20), Vec2F(80, 0));\n        mWarningsCountLabel = warningsToggle->GetLayerDrawable<Text>(\"caption\");\n        mWarningsCountLabel->text = \"0\";\n        warningsToggle->value = true;\n        warningsToggle->onToggle = [&](bool value) { OnWarningMessagesToggled(value); };\n        downPanel->AddChild(warningsToggle);\n\n        auto errorsToggle = o2UI.CreateWidget<Toggle>(\"log errors\");\n        *errorsToggle->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(60, 20), Vec2F(140, 0));\n        mErrorsCountLabel = errorsToggle->GetLayerDrawable<Text>(\"caption\");\n        mErrorsCountLabel->text = \"0\";\n        errorsToggle->value = true;\n        errorsToggle->onToggle = [&](bool value) { OnErrorMessagesToggled(value); };\n        downPanel->AddChild(errorsToggle);\n\n        mLastMessageView = listItemSample->CloneAsRef<Widget>();\n        *mLastMessageView->layout = WidgetLayout::BothStretch(200, 1, 0, 1);\n        downPanel->AddChild(mLastMessageView);\n        mLastMessageView->Hide(true);\n    }\n\n    void LogWindow::OnClearPressed()\n    {\n        mAllMessages.Clear();\n        mVisibleMessages.Clear();\n        mList->OnItemsUpdated();\n\n        mRegularMessagesCount = 0;\n        mWarningMessagesCount = 0;\n        mErrorMessagesCount = 0;\n\n        mMessagesCountLabel->text = \"0\";\n        mWarningsCountLabel->text = \"0\";\n        mErrorsCountLabel->text = \"0\";\n\n        mLastMessageView->Hide(true);\n    }\n\n    void LogWindow::OnRegularMessagesToggled(bool value)\n    {\n        mRegularMessagesEnabled = value;\n        UpdateVisibleMessages();\n    }\n\n    void LogWindow::OnWarningMessagesToggled(bool value)\n    {\n        mWarningMessagesEnabled = value;\n        UpdateVisibleMessages();\n    }\n\n    void LogWindow::OnErrorMessagesToggled(bool value)\n    {\n        mErrorMessagesEnabled = value;\n        UpdateVisibleMessages();\n    }\n\n    void LogWindow::UpdateVisibleMessages()\n    {\n        mVisibleMessages.Clear();\n\n        for (auto& msg : mAllMessages)\n        {\n            msg.idx = mVisibleMessages.Count();\n\n            if (msg.type == LogMessage::Type::Regular && mRegularMessagesEnabled)\n                mVisibleMessages.Add(msg);\n\n            if (msg.type == LogMessage::Type::Warning && mWarningMessagesEnabled)\n                mVisibleMessages.Add(msg);\n\n            if (msg.type == LogMessage::Type::Error && mErrorMessagesEnabled)\n                mVisibleMessages.Add(msg);\n        }\n\n        mList->OnItemsUpdated(true);\n    }\n\n    int LogWindow::GetVisibleMessagesCount()\n    {\n        return mVisibleMessages.Count();\n    }\n\n    Vector<void*> LogWindow::GetVisibleMessagesRange(int min, int max)\n    {\n        Vector<void*> res;\n        for (int i = min; i < max; i++)\n        {\n            if (i == mVisibleMessages.Count())\n                break;\n\n            res.Add((void*)(void*)&mVisibleMessages[i]);\n        }\n\n        return res;\n    }\n\n    void LogWindow::SetupListMessage(const Ref<Widget>& item, void* object)\n    {\n        LogMessage* message = (LogMessage*)(void*)object;\n\n        item->layer[\"warning\"]->GetDrawable()->enabled = message->type == LogMessage::Type::Warning;\n        item->layer[\"error\"]->GetDrawable()->enabled = message->type == LogMessage::Type::Error;\n        item->layer[\"back\"]->GetDrawable()->transparency = message->idx % 2 == 1 ? 0.05f : 0.0f;\n\n        auto text = item->GetLayerDrawable<Text>(\"caption\");\n        text->text = message->message.SubStr(0, message->message.Find(\"\\n\"));\n    }\n\n    void LogWindow::OutStrEx(const WString& str)\n    {\n        bool isScrollDown = Math::Equals(mList->GetScroll().y, mList->GetScrollRange().bottom, 5.0f);\n\n        LogMessage msg;\n        msg.message = str;\n        msg.type = LogMessage::Type::Regular;\n        msg.idx = mAllMessages.Count();\n\n        mAllMessages.Add(msg);\n        if (mRegularMessagesEnabled)\n        {\n            msg.idx = mVisibleMessages.Count();\n            mVisibleMessages.Add(msg);\n        }\n\n        mList->OnItemsUpdated();\n\n        if (isScrollDown)\n            mList->SetScrollForcible(Vec2F(0, mList->GetScrollRange().top));\n\n        mRegularMessagesCount++;\n        mMessagesCountLabel->text = (String)mRegularMessagesCount;\n\n        UpdateLastMessageView();\n    }\n\n    void LogWindow::OutErrorEx(const WString& str)\n    {\n        bool isScrollDown = Math::Equals(mList->GetScroll().y, mList->GetScrollRange().bottom, 5.0f);\n\n        LogMessage msg;\n        msg.message = str;\n        msg.type = LogMessage::Type::Error;\n        msg.idx = mAllMessages.Count();\n\n        mAllMessages.Add(msg);\n        if (mErrorMessagesEnabled)\n        {\n            msg.idx = mVisibleMessages.Count();\n            mVisibleMessages.Add(msg);\n        }\n\n        mList->OnItemsUpdated();\n\n        if (isScrollDown)\n            mList->SetScrollForcible(Vec2F(0, mList->GetScrollRange().top));\n\n        mErrorMessagesCount++;\n        mErrorsCountLabel->text = (String)mErrorMessagesCount;\n\n        UpdateLastMessageView();\n    }\n\n    void LogWindow::OutWarningEx(const WString& str)\n    {\n        bool isScrollDown = Math::Equals(mList->GetScroll().y, mList->GetScrollRange().bottom, 5.0f);\n\n        LogMessage msg;\n        msg.message = str;\n        msg.type = LogMessage::Type::Warning;\n        msg.idx = mAllMessages.Count();\n\n        mAllMessages.Add(msg);\n        if (mWarningMessagesEnabled)\n        {\n            msg.idx = mVisibleMessages.Count();\n            mVisibleMessages.Add(msg);\n        }\n\n        mList->OnItemsUpdated();\n\n        if (isScrollDown)\n            mList->SetScrollForcible(Vec2F(0, mList->GetScrollRange().top));\n\n        mWarningMessagesCount++;\n        mWarningsCountLabel->text = (String)mWarningMessagesCount;\n\n        UpdateLastMessageView();\n    }\n\n    void LogWindow::UpdateLastMessageView()\n    {\n        if (mAllMessages.Count() > 0)\n        {\n            mLastMessageView->Show(true);\n            SetupListMessage(mLastMessageView, (void*)(void*)&mAllMessages.Last());\n        }\n        else mLastMessageView->Hide(true);\n    }\n\n    bool LogWindow::LogMessage::operator==(const LogMessage& other) const\n    {\n        return type == other.type && message == other.message;\n    }\n\n}\n// --- META ---\n\nENUM_META(Editor::LogWindow::LogMessage::Type, Editor__LogWindow__LogMessage__Type)\n{\n    ENUM_ENTRY(Error);\n    ENUM_ENTRY(Regular);\n    ENUM_ENTRY(Warning);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(Editor::LogWindow, Editor__LogWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/LogWindow/LogWindow.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2Editor/Windows/IEditorWindow.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Label;\n    class LongList;\n    class Text;\n}\n\nnamespace Editor\n{\n    // ----------------\n    // Log window class\n    // ----------------\n    class LogWindow : public IEditorWindow, public LogStream\n    {\n        IOBJECT(LogWindow);\n\n    public:\n        // -----------------------------------------------------------------------------------\n        // LogMessage class represents a log message with its type, message content, and index\n        // -----------------------------------------------------------------------------------        \n        class LogMessage\n        {\n        public:\n            // Enum to represent the type of log message (Regular, Warning, Error)\n            enum class Type { Regular, Warning, Error };\n\n            Type   type;     // Type of the log message\n            String message;  // Content of the log message\n            int    idx;      // Index of the log message\n\n            // Overloading the equality operator to compare two LogMessage objects\n            bool operator==(const LogMessage& other) const;\n        };\n\n    public:\n        // Default constructor\n        LogWindow(RefCounter* refCounter);\n\n        // Destructor\n        ~LogWindow();\n\n        // Updates window logic\n        void Update(float dt) override;\n\n        // Dynamic cast to RefCounterable via IEditorWindow\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<LogWindow>& ref);\n\n    protected:\n        Ref<LongList> mList;            // Reference to the LongList widget\n        Ref<Widget>   mLastMessageView; // Reference to the last message view widget\n\n        Ref<Text> mMessagesCountLabel; // Reference to the label displaying the count of all messages\n        Ref<Text> mWarningsCountLabel; // Reference to the label displaying the count of warning messages\n        Ref<Text> mErrorsCountLabel;   // Reference to the label displaying the count of error messages\n\n        Vector<LogMessage> mAllMessages;    // Vector storing all log messages\n        Vector<LogMessage> mVisibleMessages;// Vector storing visible log messages\n\n        bool mRegularMessagesEnabled = true; // Flag indicating if regular messages are enabled\n        bool mWarningMessagesEnabled = true; // Flag indicating if warning messages are enabled\n        bool mErrorMessagesEnabled = true;   // Flag indicating if error messages are enabled\n\n        int mRegularMessagesCount = 0; // Count of regular messages\n        int mWarningMessagesCount = 0; // Count of warning messages\n        int mErrorMessagesCount = 0;   // Count of error messages\n\n    protected:\n        // Initializes window\n        void InitializeWindow();\n\n        // Called when clear button pressed\n        void OnClearPressed();\n\n        // Called when regular messages toggled\n        void OnRegularMessagesToggled(bool value);\n\n        // Called when warning messages toggled\n        void OnWarningMessagesToggled(bool value);\n\n        // Called when error messages toggled\n        void OnErrorMessagesToggled(bool value);\n\n        // Updates visible messages\n        void UpdateVisibleMessages();\n\n        // Returns visible items count\n        int GetVisibleMessagesCount();\n\n        // Returns array of visible messages in range from min to max\n        Vector<void*> GetVisibleMessagesRange(int min, int max);\n\n        // Sets list item by message\n        void SetupListMessage(const Ref<Widget>& item, void* object);\n\n        // Outs string to stream\n        void OutStrEx(const WString& str) override;\n\n        // Outs error to stream\n        void OutErrorEx(const WString& str) override;\n\n        // Outs warning to stream\n        void OutWarningEx(const WString& str) override;\n\n        // Updates last message view\n        void UpdateLastMessageView();\n\n        REF_COUNTERABLE_IMPL(IEditorWindow, LogStream);\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(Editor::LogWindow::LogMessage::Type);\n\nCLASS_BASES_META(Editor::LogWindow)\n{\n    BASE_CLASS(Editor::IEditorWindow);\n    BASE_CLASS(o2::LogStream);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::LogWindow)\n{\n    FIELD().PROTECTED().NAME(mList);\n    FIELD().PROTECTED().NAME(mLastMessageView);\n    FIELD().PROTECTED().NAME(mMessagesCountLabel);\n    FIELD().PROTECTED().NAME(mWarningsCountLabel);\n    FIELD().PROTECTED().NAME(mErrorsCountLabel);\n    FIELD().PROTECTED().NAME(mAllMessages);\n    FIELD().PROTECTED().NAME(mVisibleMessages);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mRegularMessagesEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mWarningMessagesEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mErrorMessagesEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mRegularMessagesCount);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mWarningMessagesCount);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mErrorMessagesCount);\n}\nEND_META;\nCLASS_METHODS_META(Editor::LogWindow)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<LogWindow>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClearPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRegularMessagesToggled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnWarningMessagesToggled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnErrorMessagesToggled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateVisibleMessages);\n    FUNCTION().PROTECTED().SIGNATURE(int, GetVisibleMessagesCount);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<void*>, GetVisibleMessagesRange, int, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetupListMessage, const Ref<Widget>&, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OutStrEx, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OutErrorEx, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OutWarningEx, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLastMessageView);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/MemoryAnalyzerWindow/MemoryAnalyzerWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"MemoryAnalyzerWindow.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2/Utils/Editor/Attributes/AnimatableAttribute.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/UIRoot.h\"\n\nDECLARE_SINGLETON(Editor::MemoryAnalyzerWindow);\n\nnamespace Editor\n{\n    MemoryAnalyzerWindow::MemoryAnalyzerWindow(RefCounter* refCounter) :\n        Singleton<MemoryAnalyzerWindow>(refCounter)\n    {\n        InitializeWindow();\n    }\n\n    MemoryAnalyzerWindow::~MemoryAnalyzerWindow()\n    {}\n\n    void MemoryAnalyzerWindow::Show(MemoryAnalyzer::MemoryNode* data)\n    {\n        auto& self = Instance();\n\n        if (self.mData)\n            delete self.mData;\n\n        self.mData = data;\n        self.mMemoryTree->Initialize(data, false);\n        self.mWindow->ShowModal();\n    }\n\n    void MemoryAnalyzerWindow::InitializeWindow()\n    {\n        mWindow = DynamicCast<o2::Window>(EditorUIRoot.AddWidget(o2UI.CreateWindow(\"Memory analyzer\")));\n        mWindow->SetClippingLayout(Layout::BothStretch(-1, -2, 0, 19));\n        mWindow->SetViewLayout(Layout::BothStretch(-2, -2, 0, 20));\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_tree_wnd_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 1)));\n\n        InitializeTree();\n        InitializeInspector();\n        InitializeSeparatorHandle();\n\n        mWindow->Hide(true);\n        mWindow->layout->size = Vec2F(1500, 900);\n    }\n\n    void MemoryAnalyzerWindow::InitializeTree()\n    {\n        mTreeWidget = mmake<Widget>();\n        mTreeWidget->name = \"tree widget\";\n        *mTreeWidget->layout = WidgetLayout::VerStretch(HorAlign::Left, 0, 0, mTreeViewWidth, 0);\n        mWindow->AddChild(mTreeWidget);\n\n        auto upPanel = mmake<Widget>();\n        upPanel->name = \"up panel\";\n        *upPanel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 20, -1);\n        upPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_square_field.png\"), Layout::BothStretch(-4, -4, -5, -5));\n\n        auto searchButton = o2UI.CreateWidget<Button>(\"search\");\n        *searchButton->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(-1, 1));\n        upPanel->AddChild(searchButton);\n\n        mFilter = o2UI.CreateWidget<EditBox>(\"backless\");\n        *mFilter->layout = WidgetLayout::BothStretch(19, 2, 0, -4);\n        mFilter->onChanged += [&](const WString& filter) {};\n        upPanel->AddChild(mFilter);\n\n        mTreeWidget->AddChild(upPanel);\n\n        mMemoryTree = o2UI.CreateWidget<MemoryAnalyzeTree>();\n        *mMemoryTree->layout = WidgetLayout::BothStretch(0, 0, 0, 17);\n        mMemoryTree->SetRearrangeType(Tree::RearrangeType::Disabled);\n        mMemoryTree->onSelectedNode = [&](MemoryAnalyzer::MemoryNode* data) { UpdateInspector(data); };\n\n        mTreeWidget->AddChild(mMemoryTree);\n    }\n\n    void MemoryAnalyzerWindow::InitializeInspector()\n    {\n        mInspectorWidget = mmake<Widget>();\n        mInspectorWidget->name = \"inspector widget\";\n        *mInspectorWidget->layout = WidgetLayout::BothStretch(mTreeViewWidth, 0, 0, 0);\n        mWindow->AddChild(mInspectorWidget);\n\n        auto container = mmake<Widget>();\n        container->name = \"container\";\n        *container->layout = WidgetLayout::BothStretch(5, 5, 5, 5);\n        mInspectorWidget->AddChild(container);\n\n        auto upPanel = mmake<HorizontalLayout>();\n        *upPanel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 20, 0);\n        upPanel->expandHeight = true;\n        upPanel->expandWidth = true;\n\n        mObjectLabel = o2UI.CreateLabel(\"Object\");\n        mObjectLabel->horAlign = HorAlign::Left;\n        upPanel->AddChild(mObjectLabel);\n\n        mAddressLabel = o2UI.CreateLabel(\"Address\");\n        mAddressLabel->layout->maxWidth = 170;\n        upPanel->AddChild(mAddressLabel);\n\n        mSizeLabel = o2UI.CreateLabel(\"Size\");\n        mSizeLabel->layout->maxWidth = 100;\n        upPanel->AddChild(mSizeLabel);\n\n        mReverseTreeButton = o2UI.CreateButton(\"Reverse tree\");\n        mReverseTreeButton->layout->maxWidth = 100;\n        mReverseTreeButton->onClick = [&]() { OnReversePressed(); };\n        upPanel->AddChild(mReverseTreeButton);\n\n        container->AddChild(upPanel);\n\n        auto inspectorScroll = o2UI.CreateWidget<ScrollArea>(\"backless\");\n        *inspectorScroll->layout = WidgetLayout::BothStretch(0, 0, -5, 20);\n        container->AddChild(inspectorScroll);\n\n        auto inspectorLayout = mmake<VerticalLayout>();\n        *inspectorLayout->layout = WidgetLayout::BothStretch(0, 0, 0, 0);\n        inspectorLayout->expandHeight = false;\n        inspectorLayout->expandWidth = true;\n        inspectorLayout->fitByChildren = true;\n        inspectorLayout->baseCorner = BaseCorner::LeftTop;\n        inspectorLayout->spacing = 5;\n        inspectorScroll->AddChild(inspectorLayout);\n\n        auto stackSpoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n        stackSpoiler->name = \"Stack spoiler\";\n        stackSpoiler->caption = \"Stack\";\n        *stackSpoiler->layout = WidgetLayout::BothStretch(0, 0, 0, 0);\n        stackSpoiler->expandHeight = false;\n        stackSpoiler->expandWidth = true;\n        stackSpoiler->fitByChildren = true;\n        stackSpoiler->baseCorner = BaseCorner::LeftTop;\n        stackSpoiler->Expand();\n        inspectorLayout->AddChild(stackSpoiler);\n\n        mStackText = o2UI.CreateWidget<EditBox>(\"backless multiline\");\n        *mStackText->layout = WidgetLayout::BothStretch();\n        mStackText->layout->minHeight = 500;\n        stackSpoiler->AddChild(mStackText);\n\n        mInspectorContainer = mmake<VerticalLayout>();\n        *mInspectorContainer->layout = WidgetLayout::BothStretch(0, 0, 0, 0);\n        mInspectorContainer->expandHeight = false;\n        mInspectorContainer->expandWidth = true;\n        mInspectorContainer->fitByChildren = true;\n        mInspectorContainer->baseCorner = BaseCorner::LeftTop;\n        mInspectorContainer->borderRight = 15;\n        inspectorLayout->AddChild(mInspectorContainer);\n    }\n\n    void MemoryAnalyzerWindow::InitializeSeparatorHandle()\n    {\n        mTreeSeparatorHandle = mmake<WidgetDragHandle>(mmake<Sprite>(\"ui/UI4_Ver_separator.png\"));\n        mTreeSeparatorHandle->GetRegularDrawable()->pivot = Vec2F(0.5f, 0.5f);\n        mTreeSeparatorHandle->GetRegularDrawable()->szPivot = Vec2F(4, mTreeSeparatorHandle->GetRegularDrawable()->szPivot.Get().y);\n\n        mTreeSeparatorHandle->onChangedPos = [&](const Vec2F& point) {\n            mTreeViewWidth = Math::Max(point.x, mMinTreeViewWidth);\n            mTreeWidget->layout->right = mTreeViewWidth;\n            mInspectorWidget->layout->left = mTreeViewWidth;\n            };\n\n        mTreeSeparatorHandle->checkPositionFunc = [&](const Vec2F& point) {\n            return Vec2F(Math::Max(point.x, mMinTreeViewWidth), mWindow->layout->GetHeight()*0.5f);\n            };\n\n        mTreeSeparatorHandle->onLayoutUpdated = [&]() {\n            mTreeSeparatorHandle->SetDrawablesSize(Vec2F(5.0f, mWindow->layout->GetHeight() + 50.0f));\n            mTreeSeparatorHandle->SetPosition(Vec2F(mTreeViewWidth, mWindow->layout->GetHeight()*0.5f));\n            };\n\n        mTreeSeparatorHandle->cursorType = CursorType::SizeWE;\n\n        mWindow->AddChild(mTreeSeparatorHandle);\n    }\n\n    String GetNodeName(MemoryAnalyzer::MemoryNode* node)\n    {\n        String result;\n\n        String type = node->type;\n        type.ReplaceAll(\"class \", \"\");\n        type.ReplaceAll(\"> >\", \">>\");\n\n        auto& name = node->name;\n\n        if (name.empty())\n            result = type;\n        else if (type.IsEmpty())\n            result = (String)name;\n        else\n            result = type + \" \" + (String)name;\n\n//         if (node->object)\n//             result += String(\"(\") + (String)node->object->createIndex + String(\")\");\n\n        return result;\n    }\n\n    String GetNodeAddress(MemoryAnalyzer::MemoryNode* node)\n    {\n        return String::Format(\"%p\", node->memory);\n    }\n\n    String GetNodeSize(MemoryAnalyzer::MemoryNode* node)\n    {\n        String size;\n\n        auto summarySize = node->leakedSize != 0 ? node->leakedSize : node->summarySize;\n        if (summarySize > 1024 * 1024)\n            size = String::Format(\"%.2f Mb\", summarySize / (1024.0 * 1024.0));\n        else if (summarySize > 1024)\n            size = String::Format(\"%.2f Kb\", summarySize / 1024.0);\n        else\n            size = String::Format(\"%d b\", summarySize);\n\n        return size;\n    }\n\n    Color4 GetNodeColor(MemoryAnalyzer::MemoryNode* node)\n    {\n        if (node->leakedSize > 0)\n            return Color4(235, 125, 139);\n        else\n            return Color4(96, 125, 139);\n    }\n\n    void MemoryAnalyzerWindow::UpdateInspector(MemoryAnalyzer::MemoryNode* node)\n    {\n        mSelected = node;\n\n        mObjectLabel->text = GetNodeName(node);\n        mObjectLabel->color = GetNodeColor(node);\n\n        mAddressLabel->text = GetNodeAddress(node);\n        mSizeLabel->text = GetNodeSize(node);\n\n        if (node->object)\n            mStackText->text = (String)boost::stacktrace::to_string(node->object->trace);\n\n        if (mObjectPropertiesViewer)\n            o2EditorProperties.FreeObjectViewer(mObjectPropertiesViewer);\n\n        if (node->iobject)\n        {\n            bool prevPrivateVisible = o2EditorProperties.IsPrivateFieldsVisible();\n\n            o2EditorProperties.SetPrivateFieldsVisible(true);\n            mObjectPropertiesViewer = o2EditorProperties.CreateObjectViewer(&node->iobject->GetType(), \"\");\n            mObjectPropertiesViewer->Refresh({ { node->iobject, nullptr } });\n\n            auto viewerWidget = mObjectPropertiesViewer->GetSpoiler();\n            *viewerWidget->layout = WidgetLayout::BothStretch(0, 0, 0, 0);\n            viewerWidget->caption = \"Properties\";\n            viewerWidget->Expand();\n\n            mInspectorContainer->AddChild(viewerWidget);\n\n            o2EditorProperties.SetPrivateFieldsVisible(prevPrivateVisible);\n        }\n    }\n\n    void MemoryAnalyzerWindow::OnReversePressed()\n    {\n        if (mMemoryTree->IsTreeReversed())\n            mMemoryTree->Initialize(mData, false);\n        else\n            mMemoryTree->Initialize(mSelected, true);\n    }\n\n    MemoryAnalyzeTree::MemoryAnalyzeTree(RefCounter* refCounter) :\n        Tree(refCounter)\n    {}\n\n    MemoryAnalyzeTree::MemoryAnalyzeTree(RefCounter* refCounter, const MemoryAnalyzeTree& other) :\n        Tree(refCounter, other)\n    {}\n\n    MemoryAnalyzeTree::MemoryAnalyzeTree(const MemoryAnalyzeTree& other) :\n        MemoryAnalyzeTree(nullptr, other)\n    {}\n\n    MemoryAnalyzeTree& MemoryAnalyzeTree::operator=(const MemoryAnalyzeTree& other)\n    {\n        Tree::operator=(other);\n        return *this;\n    }\n\n    void MemoryAnalyzeTree::Initialize(MemoryAnalyzer::MemoryNode* data, bool reversed)\n    {\n        mFilterStr = \"\";\n        mRoot = data;\n        mReversed = reversed;\n\n        UpdateNodesStructure();\n        UpdateVisibleNodes();\n    }\n\n    bool MemoryAnalyzeTree::IsTreeReversed() const\n    {\n        return mReversed;\n    }\n\n    String MemoryAnalyzeTree::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void MemoryAnalyzeTree::UpdateVisibleNodes()\n    {\n        PushEditorScopeOnStack scope;\n        Tree::UpdateVisibleNodes();\n    }\n\n    Ref<TreeNode> MemoryAnalyzeTree::CreateTreeNodeWidget()\n    {\n        PushEditorScopeOnStack scope;\n        return Tree::CreateTreeNodeWidget();\n    }\n\n    void* MemoryAnalyzeTree::GetObjectParent(void* object)\n    {\n        if (mReversed)\n            return ((MemoryAnalyzer::MemoryNode*)object)->children[0];\n        else\n            return ((MemoryAnalyzer::MemoryNode*)object)->mainParent;\n    }\n\n    Vector<void*> MemoryAnalyzeTree::GetObjectChilds(void* object)\n    {\n        Vector<void*> result;\n        if (object)\n        {\n            if (!mReversed)\n            {\n                for (auto& child : ((MemoryAnalyzer::MemoryNode*)object)->children)\n                    result.push_back(child);\n            }\n            else\n            {\n                for (auto& parent : ((MemoryAnalyzer::MemoryNode*)object)->parents)\n                    result.push_back(parent);\n            }\n        }\n        else\n        {\n            if (!mReversed)\n            {\n                for (auto& child : mRoot->children)\n                    result.push_back(child);\n            }\n            else\n            {\n                for (auto& parent : mRoot->parents)\n                    result.push_back(parent);\n            }\n        }\n\n        return result;\n    }\n\n    String MemoryAnalyzeTree::GetObjectDebug(void* object)\n    {\n        return \"unknown\";\n    }\n\n    void MemoryAnalyzeTree::FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object)\n    {\n        auto propertyNode = DynamicCast<MemoryAnalyzeTreeNode>(nodeWidget);\n        propertyNode->Setup((MemoryAnalyzer::MemoryNode*)object, Ref(this));\n    }\n\n    void MemoryAnalyzeTree::OnNodesSelectionChanged(Vector<void*> objects)\n    {\n        onSelectedNode((MemoryAnalyzer::MemoryNode*)objects[0]);\n    }\n\n    MemoryAnalyzeTreeNode::MemoryAnalyzeTreeNode(RefCounter* refCounter) :\n        TreeNode(refCounter)\n    {\n        InitializeControls();\n    }\n\n    MemoryAnalyzeTreeNode::MemoryAnalyzeTreeNode(RefCounter* refCounter, const MemoryAnalyzeTreeNode& other) :\n        TreeNode(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    MemoryAnalyzeTreeNode& MemoryAnalyzeTreeNode::operator=(const MemoryAnalyzeTreeNode& other)\n    {\n        TreeNode::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void MemoryAnalyzeTreeNode::Setup(MemoryAnalyzer::MemoryNode* data, const Ref<MemoryAnalyzeTree>& tree)\n    {\n        mName->text = GetNodeName(data);\n        mName->color = GetNodeColor(data);\n\n        mAddress->text = GetNodeAddress(data);\n        mSize->text = GetNodeSize(data);\n\n        mData = data;\n        mTree = tree;\n    }\n\n    String MemoryAnalyzeTreeNode::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void MemoryAnalyzeTreeNode::OnDeserialized(const DataValue& node)\n    {\n        TreeNode::OnDeserialized(node);\n        InitializeControls();\n    }\n\n    void MemoryAnalyzeTreeNode::InitializeControls()\n    {\n        mName = GetLayerDrawable<Text>(\"root/name\");\n        mAddress = GetLayerDrawable<Text>(\"root/address\");\n        mSize = GetLayerDrawable<Text>(\"root/size\");\n\n        auto tree = mTree.Lock();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::MemoryAnalyzeTreeNode>);\n// --- META ---\n\nDECLARE_CLASS(Editor::MemoryAnalyzeTree, Editor__MemoryAnalyzeTree);\n\nDECLARE_CLASS(Editor::MemoryAnalyzeTreeNode, Editor__MemoryAnalyzeTreeNode);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/MemoryAnalyzerWindow/MemoryAnalyzerWindow.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Memory/MemoryAnalyzer.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n\nnamespace o2\n{\n    class Button;\n    class EditBox;\n    class Sprite;\n    class Text;\n    class Window;\n}\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(MemoryAnalyzeTree);\n\n    class MemoryAnalyzerWindow : public Singleton<MemoryAnalyzerWindow>\n    {\n    public:\n        MemoryAnalyzerWindow(RefCounter* refCounter);\n        ~MemoryAnalyzerWindow();\n\n        static void Show(MemoryAnalyzer::MemoryNode* data);\n\n    private:\n        MemoryAnalyzer::MemoryNode* mData = nullptr;\n        MemoryAnalyzer::MemoryNode* mSelected = nullptr;\n\n        Ref<o2::Window> mWindow;\n\n        Ref<Widget>            mTreeWidget;\n        Ref<EditBox>           mFilter;\n        Ref<MemoryAnalyzeTree> mMemoryTree;\n\n        Ref<Widget>         mInspectorWidget;\n        Ref<Label>          mObjectLabel;\n        Ref<Label>          mAddressLabel;\n        Ref<Label>          mSizeLabel;\n        Ref<Button>         mReverseTreeButton;\n        Ref<EditBox>        mStackText;\n        Ref<VerticalLayout> mInspectorContainer;\n\n        Ref<IObjectPropertiesViewer> mObjectPropertiesViewer;\n\n        float mTreeViewWidth = 800.0f;    // Width of tree area. Changed by dragable separator\n        float mMinTreeViewWidth = 250.0f; // Minimal tree width\n\n        Ref<WidgetDragHandle> mTreeSeparatorHandle; // Tree separator handle. When it moves, it changes size of all dependent widgets\n\n    private:\n        // Initializes window and controls\n        void InitializeWindow();\n\n        // Initialized inspector widgets\n        void InitializeInspector();\n\n        // Initializes tree widget\n        void InitializeTree();\n\n        // Initializes separator handle view and events\n        void InitializeSeparatorHandle();\n\n        // Updates inspector by selected node\n        void UpdateInspector(MemoryAnalyzer::MemoryNode* node);\n\n        // Called when tree reverse button pressed\n        void OnReversePressed();\n    };\n\n    class MemoryAnalyzeTree : public Tree\n    {\n    public:\n        Function<void(MemoryAnalyzer::MemoryNode* data)> onSelectedNode;\n\n    public:\n        // Default constructor\n        MemoryAnalyzeTree(RefCounter* refCounter);\n\n        // Copy-constructor\n        MemoryAnalyzeTree(RefCounter* refCounter, const MemoryAnalyzeTree& other);\n\n        // Copy-constructor\n        MemoryAnalyzeTree(const MemoryAnalyzeTree& other);\n\n        // Copy operator\n        MemoryAnalyzeTree& operator=(const MemoryAnalyzeTree& other);\n\n        // Initializes data tree\n        void Initialize(MemoryAnalyzer::MemoryNode* data, bool reversed);\n\n        // Returns true if tree is reversed\n        bool IsTreeReversed() const;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(MemoryAnalyzeTree);\n        CLONEABLE_REF(MemoryAnalyzeTree);\n\n    private:\n        WString mFilterStr; // Filtering string\n\n        MemoryAnalyzer::MemoryNode* mRoot = nullptr; // Root data node\n\n        bool mReversed = false; // Reversed tree view, from children to parents\n\n    private:\n        // Updates visible nodes (calculates range and initializes nodes), enables editor mode\n        void UpdateVisibleNodes() override;\n\n        // Gets tree node from pool or creates new, enables editor mode\n        Ref<TreeNode> CreateTreeNodeWidget() override;\n\n        // Returns object's parent\n        void* GetObjectParent(void* object) override;\n\n        // Returns object's children\n        Vector<void*> GetObjectChilds(void* object) override;\n\n        // Returns debugging string for object\n        String GetObjectDebug(void* object) override;\n\n        // Sets nodeWidget data by object\n        void FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object) override;\n\n        // Called when list of selected objects was changed\n        void OnNodesSelectionChanged(Vector<void*> objects) override;\n\n        friend class MemoryAnalyzeTreeNode;\n    };\n\n    class MemoryAnalyzeTreeNode : public TreeNode\n    {\n    public:\n        // Default constructor\n        MemoryAnalyzeTreeNode(RefCounter* refCounter);\n\n        // Copy-constructor\n        MemoryAnalyzeTreeNode(RefCounter* refCounter, const MemoryAnalyzeTreeNode& other);\n\n        // Copy operator\n        MemoryAnalyzeTreeNode& operator=(const MemoryAnalyzeTreeNode& other);\n\n        // Initializes node by data\n        void Setup(MemoryAnalyzer::MemoryNode* data, const Ref<MemoryAnalyzeTree>& tree);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(MemoryAnalyzeTreeNode);\n        CLONEABLE_REF(MemoryAnalyzeTreeNode);\n\n    private:\n        Ref<Text> mName;\n        Ref<Text> mAddress;\n        Ref<Text> mSize;\n\n        MemoryAnalyzer::MemoryNode* mData; // Data node pointer\n\n        WeakRef<MemoryAnalyzeTree> mTree; // Owner tree\n\n    private:\n        // Called on deserialization, initializes controls\n        void OnDeserialized(const DataValue& node) override;\n\n        // initializes controls and widgets\n        void InitializeControls();\n\n        friend class MemoryAnalyzeTree;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::MemoryAnalyzeTree)\n{\n    BASE_CLASS(o2::Tree);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::MemoryAnalyzeTree)\n{\n    FIELD().PUBLIC().NAME(onSelectedNode);\n    FIELD().PRIVATE().NAME(mFilterStr);\n    FIELD().PRIVATE().DEFAULT_VALUE(nullptr).NAME(mRoot);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mReversed);\n}\nEND_META;\nCLASS_METHODS_META(Editor::MemoryAnalyzeTree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const MemoryAnalyzeTree&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const MemoryAnalyzeTree&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize, MemoryAnalyzer::MemoryNode*, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsTreeReversed);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateVisibleNodes);\n    FUNCTION().PRIVATE().SIGNATURE(Ref<TreeNode>, CreateTreeNodeWidget);\n    FUNCTION().PRIVATE().SIGNATURE(void*, GetObjectParent, void*);\n    FUNCTION().PRIVATE().SIGNATURE(Vector<void*>, GetObjectChilds, void*);\n    FUNCTION().PRIVATE().SIGNATURE(String, GetObjectDebug, void*);\n    FUNCTION().PRIVATE().SIGNATURE(void, FillNodeDataByObject, const Ref<TreeNode>&, void*);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnNodesSelectionChanged, Vector<void*>);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::MemoryAnalyzeTreeNode)\n{\n    BASE_CLASS(o2::TreeNode);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::MemoryAnalyzeTreeNode)\n{\n    FIELD().PRIVATE().NAME(mName);\n    FIELD().PRIVATE().NAME(mAddress);\n    FIELD().PRIVATE().NAME(mSize);\n    FIELD().PRIVATE().NAME(mData);\n    FIELD().PRIVATE().NAME(mTree);\n}\nEND_META;\nCLASS_METHODS_META(Editor::MemoryAnalyzeTreeNode)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const MemoryAnalyzeTreeNode&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Setup, MemoryAnalyzer::MemoryNode*, const Ref<MemoryAnalyzeTree>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeControls);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/ActorViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"ActorViewer.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/AddComponentPanel.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorComponentViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorHeaderViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorPropertiesViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorTransformViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorComponentViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorHeaderViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorPropertiesViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorTransformViewer.h\"\n\nnamespace Editor\n{\n    ActorViewer::ActorViewer(RefCounter* refCounter):\n        IPropertiesViewer(refCounter)\n    {\n        PushEditorScopeOnStack scope;\n\n        // Create viewers\n        mHeaderViewer = mmake<DefaultActorHeaderViewer>();\n        mHeaderViewer->onPropertyChanged = THIS_FUNC(OnPropertyChanged);\n        mHeaderViewer->onPropertyChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mTransformViewer = mmake<DefaultActorTransformViewer>();\n        mTransformViewer->onPropertyChanged = THIS_FUNC(OnPropertyChanged);\n        mTransformViewer->onPropertyChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mDefaultComponentViewer = mmake<DefaultActorComponentViewer>();\n        mDefaultActorPropertiesViewer = mmake<DefaultActorPropertiesViewer>();\n\n        // Create available component and actors viewers\n        auto componentsViewersTypes = TypeOf(IActorComponentViewer).GetDerivedTypes();\n        for (auto& type : componentsViewersTypes)\n        {\n            if (type->GetName().Contains(\"TActorComponentViewer\"))\n                continue;\n\n            mAvailableComponentsViewers.Add(DynamicCast<IActorComponentViewer>(type->CreateSampleRef()));\n        }\n\n        auto actorPropertiessViewersTypes = TypeOf(IActorPropertiesViewer).GetDerivedTypes();\n        for (auto& type : actorPropertiessViewersTypes)\n            mAvailableActorPropertiesViewers.Add(DynamicCast<IActorPropertiesViewer>(type->CreateSampleRef()));\n\n        // Initialize content widget and viewers layout\n        mContentWidget = mmake<Widget>();\n        mContentWidget->name = \"content\";\n        *mContentWidget->layout = WidgetLayout::BothStretch();\n\n        auto scrollArea = o2UI.CreateScrollArea(\"backless\");\n        scrollArea->SetViewLayout(Layout::BothStretch(0, 0, 15, 0));\n        scrollArea->SetClippingLayout(Layout::BothStretch());\n        scrollArea->SetEnableScrollsHiding(false);\n        scrollArea->name = \"actors scroll area\";\n        *scrollArea->layout = WidgetLayout::BothStretch(0, 40, 0, 0);\n        mContentWidget->AddChild(scrollArea);\n\n        mViewersLayout = o2UI.CreateVerLayout();\n        mViewersLayout->name = \"viewers layout\";\n        mViewersLayout->spacing = 0.0f;\n        mViewersLayout->border = BorderF();\n        mViewersLayout->expandHeight = false;\n        mViewersLayout->expandWidth = true;\n        mViewersLayout->fitByChildren = true;\n        mViewersLayout->baseCorner = BaseCorner::Top;\n        *mViewersLayout->layout = WidgetLayout::BothStretch();\n        scrollArea->AddChild(mViewersLayout);\n\n        // Initialize add component panel\n        mAddComponentPanel = mmake<AddComponentPanel>(Ref(this));\n        mAddComponentPanel->name = \"add component\";\n        *mAddComponentPanel->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 40, 0);\n        mContentWidget->AddChild(mAddComponentPanel);\n\n        auto addComponentAnim = AnimationClip::EaseInOut<float>(\"child/add component/layout/offsetTop\",\n                                                                40, 400, 0.4f);\n\n        *addComponentAnim->AddTrack<float>(\"child/actors scroll area/layout/offsetBottom\") =\n            AnimationTrack<float>::EaseInOut(40, 400, 0.4f);\n\n        mContentWidget->AddState(\"add component\", addComponentAnim);\n\n        mAddComponentPanel->onCursorReleased = [&](auto curs) { mContentWidget->SetState(\"add component\", true); };\n        mAddComponentPanel->onCursorPressedOutside = [&](auto curs) { mContentWidget->SetState(\"add component\", false); };\n\n        o2Scene.onObjectsChanged += THIS_FUNC(OnSceneObjectsChanged);\n    }\n\n    ActorViewer::~ActorViewer()\n    {\n        if (Scene::IsSingletonInitialzed())\n            o2Scene.onObjectsChanged -= THIS_FUNC(OnSceneObjectsChanged);\n    }\n\n    const Type* ActorViewer::GetViewingObjectType() const\n    {\n        return &TypeOf(Actor);\n    }\n\n    void ActorViewer::SetActorHeaderViewer(const Ref<IActorHeaderViewer>& viewer)\n    {\n        mHeaderViewer = viewer;\n    }\n\n    void ActorViewer::SetActorTransformViewer(const Ref<IActorTransformViewer>& viewer)\n    {\n        mTransformViewer = viewer;\n    }\n\n    void ActorViewer::AddComponentViewerType(const Ref<IActorComponentViewer>& viewer)\n    {\n        mAvailableComponentsViewers.Add(viewer);\n    }\n\n    void ActorViewer::AddActorPropertiesViewerType(const Ref<IActorPropertiesViewer>& viewer)\n    {\n        mAvailableActorPropertiesViewers.Add(viewer);\n    }\n\n    void ActorViewer::Refresh()\n    {\n        PushEditorScopeOnStack scope;\n\n        if (mTargetActors.IsEmpty())\n            return;\n\n        auto currentComponentGroups = GetGroupedComponents();\n        if (mComponentGroupsTypes != currentComponentGroups)\n        {\n            SetTargets(mTargetActors.DynamicCast<IObject*>());\n            return;\n        }\n\n        for (auto& viewer : mComponentsViewers)\n            viewer->Refresh();\n\n        if (mActorPropertiesViewer)\n            mActorPropertiesViewer->Refresh();\n\n        mTransformViewer->Refresh();\n        mHeaderViewer->Refresh();\n    }\n\n    void ActorViewer::OnSceneObjectsChanged(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        Refresh();\n    }\n\n    void ActorViewer::SetTargets(const Vector<IObject*>& targets)\n    {\n\t\tIPropertiesViewer::SetTargets(targets);\n\n        PushEditorScopeOnStack scope;\n\n        mTargetActors = targets.Convert<Actor*>([](auto x) { return dynamic_cast<Actor*>(x); });\n\n        // clear \n        mViewersLayout->RemoveAllChildren();\n\n        // rebuild\n        Vector<Ref<Widget>> viewersWidgets;\n        viewersWidgets.Add(mHeaderViewer->GetWidget());\n        mHeaderViewer->SetTargetActors(mTargetActors);\n\n        viewersWidgets.Add(mTransformViewer->GetWidget());\n        mTransformViewer->SetTargetActors(mTargetActors);\n\n        SetTargetsActorProperties(targets, viewersWidgets);\n        SetTargetsComponents(targets, viewersWidgets);\n        mViewersLayout->AddChildren(DynamicCastVector<Actor>(viewersWidgets));\n    }\n\n    void ActorViewer::SetTargetsActorProperties(const Vector<IObject*>& targets, Vector<Ref<Widget>>& viewersWidgets)\n    {\n        PushEditorScopeOnStack scope;\n\n        const Type* type = &mTargetActors[0]->GetType();\n        bool isAllSameType = mTargetActors.All([&](Actor* x) { return &x->GetType() == type; });\n\n        if (!isAllSameType)\n            return;\n\n        bool usingDefaultViewer = false;\n\n        auto viewerSample = mAvailableActorPropertiesViewers.FindOrDefault([&](auto& x) {\n            return x->GetActorType() == type;\n        });\n\n        if (!viewerSample)\n        {\n            viewerSample = mDefaultActorPropertiesViewer;\n            usingDefaultViewer = true;\n        }\n\n        if (!mActorPropertiesViewersPool.ContainsKey(type))\n        {\n            PushEditorScopeOnStack scope;\n\n            auto newViewer = DynamicCast<IActorPropertiesViewer>(viewerSample->GetType().CreateSampleRef());\n\n            if (usingDefaultViewer)\n                DynamicCast<DefaultActorPropertiesViewer>(newViewer)->SpecializeActorType(type);\n\n            mActorPropertiesViewersPool.Add(type, newViewer);\n        }\n\n        auto propertiesViewer = mActorPropertiesViewersPool[type];\n\n        propertiesViewer->SetTargetActors(mTargetActors);\n        propertiesViewer->onPropertyChanged = THIS_FUNC(OnPropertyChanged);\n        propertiesViewer->onPropertyChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        if (!propertiesViewer->IsEmpty())\n            viewersWidgets.Add(propertiesViewer->GetWidget());\n\n        mActorPropertiesViewer = propertiesViewer;\n    }\n\n    Vector<Pair<const Type*, Vector<Ref<Component>>>> ActorViewer::GetGroupedComponents() const\n    {\n        Vector<Pair<const Type*, Vector<Ref<Component>>>> res;\n\n        for (auto& actor : mTargetActors)\n        {\n            Map<const Type*, int> offsets;\n            for (auto& component : actor->GetComponents())\n            {\n                auto type = &component->GetType();\n                auto offset = offsets[type];\n                offsets[type]++;\n\n                Vector<Ref<Component>>* list = nullptr;\n                for (int i = 0; i < res.Count(); i++)\n                {\n                    if (res[i].first == type)\n                    {\n                        if (offset == 0)\n                        {\n                            list = &res[i].second;\n                            break;\n                        }\n                        else\n                            offset--;\n                    }\n                }\n\n                if (!list)\n                {\n                    res.Add({ type, {} });\n                    list = &res.Last().second;\n                }\n\n                list->Add(component);\n            }\n        }\n\n        return res;\n    }\n\n    void ActorViewer::SetTargetsComponents(const Vector<IObject*>& targets, Vector<Ref<Widget>>& viewersWidgets)\n    {\n        PushEditorScopeOnStack scope;\n\n        auto lastComponentViewers = mComponentsViewers;\n\n        Vector<Ref<IActorComponentViewer>> enableComponentViewers;\n\n        for (auto& viewer : mComponentsViewers)\n            mComponentViewersPool[viewer->GetComponentType()].Add(viewer);\n\n        mComponentsViewers.Clear();\n\n        mComponentGroupsTypes = GetGroupedComponents();\n        for (auto& pair : mComponentGroupsTypes)\n        {\n            auto componentType = pair.first;\n            auto viewerSample = mAvailableComponentsViewers.FindOrDefault([&](auto& x) {\n                return x->GetComponentType() == componentType; });\n\n            if (!viewerSample)\n                viewerSample = mDefaultComponentViewer;\n\n            if (!mComponentViewersPool.ContainsKey(componentType) || mComponentViewersPool[componentType].IsEmpty())\n            {\n                if (!mComponentViewersPool.ContainsKey(componentType))\n                    mComponentViewersPool.Add(componentType, {});\n\n                auto newViewer = DynamicCast<IActorComponentViewer>(viewerSample->GetType().CreateSampleRef());\n\n                mComponentViewersPool[componentType].Add(newViewer);\n            }\n\n            auto componentViewer = mComponentViewersPool[componentType].PopBack();\n\n            viewersWidgets.Add(componentViewer->GetWidget());\n            mComponentsViewers.Add(componentViewer);\n\n            componentViewer->SetTargetComponents(pair.second);\n            componentViewer->onPropertyChanged = THIS_FUNC(OnPropertyChanged);\n            componentViewer->onPropertyChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n            if (lastComponentViewers.Contains(componentViewer))\n                lastComponentViewers.Remove(componentViewer);\n            else\n                enableComponentViewers.Add(componentViewer);\n        }\n\n        for (auto& viewer : lastComponentViewers)\n            viewer->SetPropertiesEnabled(false);\n\n        for (auto& viewer : enableComponentViewers)\n            viewer->SetPropertiesEnabled(true);\n    }\n\n    void ActorViewer::OnPropertiesEnabled()\n    {\n        mHeaderViewer->SetPropertiesEnabled(true);\n        mTransformViewer->SetPropertiesEnabled(true);\n\n        if (mActorPropertiesViewer)\n            mActorPropertiesViewer->SetPropertiesEnabled(true);\n\n        mComponentsViewers.ForEach([](auto x) { x->SetPropertiesEnabled(true); });\n    }\n\n    void ActorViewer::OnPropertiesDisabled()\n    {\n        mHeaderViewer->SetPropertiesEnabled(false);\n        mTransformViewer->SetPropertiesEnabled(false);\n\n        if (mActorPropertiesViewer)\n            mActorPropertiesViewer->SetPropertiesEnabled(false);\n\n        mComponentsViewers.ForEach([](auto x) { x->SetPropertiesEnabled(false); });\n\n        mTargetActors.Clear();\n    }\n\n    void ActorViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        IPropertiesViewer::OnPropertyChanged(field, byUser);\n    }\n\n    void ActorViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        IPropertiesViewer::OnPropertyChangeCompleted(path, before, after);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::ActorViewer, Editor__ActorViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/ActorViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Windows/PropertiesWindow/IPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Actor;\n    class Button;\n    class VerticalLayout;\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(AddComponentPanel);\n    FORWARD_CLASS_REF(DefaultActorComponentViewer);\n    FORWARD_CLASS_REF(DefaultActorPropertiesViewer);\n    FORWARD_CLASS_REF(IActorComponentViewer);\n    FORWARD_CLASS_REF(IActorHeaderViewer);\n    FORWARD_CLASS_REF(IActorPropertiesViewer);\n    FORWARD_CLASS_REF(IActorTransformViewer);\n\n    // ------------------------\n    // Actors properties viewer\n    // ------------------------\n    class ActorViewer: public IPropertiesViewer\n    {\n    public:\n        // Default constructor\n        ActorViewer(RefCounter* refCounter);\n\n        // Virtual destructor\n        ~ActorViewer();\n\n        // Returns viewing object type\n        const Type* GetViewingObjectType() const override;\n\n        // Sets header viewer\n        void SetActorHeaderViewer(const Ref<IActorHeaderViewer>& viewer);\n\n        // Sets transform viewer\n        void SetActorTransformViewer(const Ref<IActorTransformViewer>& viewer);\n\n        // Adds new available component viewer type\n        void AddComponentViewerType(const Ref<IActorComponentViewer>& viewer);\n\n        // Adds new available actor properties viewer type\n        void AddActorPropertiesViewerType(const Ref<IActorPropertiesViewer>& viewer);\n\n        // Updates properties values\n        void Refresh() override;\n\n        IOBJECT(ActorViewer);\n\n    protected:\n        typedef Map<const Type*, Vector<Ref<IActorComponentViewer>>> TypeCompViewersMap;\n        typedef Map<const Type*, Ref<IActorPropertiesViewer>> TypeActorViewersMap;\n\n        Vector<Actor*> mTargetActors; // Current target actors\n                                        \n        Ref<IActorHeaderViewer>    mHeaderViewer;    // Actor header viewer\n        Ref<IActorTransformViewer> mTransformViewer; // Actor transform viewer\n\n        Ref<IActorPropertiesViewer>         mActorPropertiesViewer;           // Actor properties viewer\n        Ref<DefaultActorPropertiesViewer>   mDefaultActorPropertiesViewer;    // Default actor properties viewer sample\n        Vector<Ref<IActorPropertiesViewer>> mAvailableActorPropertiesViewers; // Available actor properties viewers                                                                           \n        TypeActorViewersMap                 mActorPropertiesViewersPool;      // Actor properties viewers pool\n\n        Vector<Pair<const Type*, Vector<Ref<Component>>>> mComponentGroupsTypes;       // List of components group types for targets\n        Vector<Ref<IActorComponentViewer>>                mComponentsViewers;          // Components viewers\n        Ref<DefaultActorComponentViewer>                  mDefaultComponentViewer;     // Default component viewer sample\n        Vector<Ref<IActorComponentViewer>>                mAvailableComponentsViewers; // Available components' viewers                                                                           \n        TypeCompViewersMap                                mComponentViewersPool;       // Components viewers pool\n\n        Ref<AddComponentPanel> mAddComponentPanel; // Add component panel. Shown by clicking on filter field\n                                        \n        Ref<VerticalLayout> mViewersLayout; // Viewers layout\n\n    protected:\n        // Called when some actors on scene were changed\n        void OnSceneObjectsChanged(const Vector<Ref<SceneEditableObject>>& objects);\n\n        // Sets target objects\n        void SetTargets(const Vector<IObject*>& targets) override;\n\n        // Sets target actor properties\n        void SetTargetsActorProperties(const Vector<IObject*>& targets, Vector<Ref<Widget>>& viewersWidgets);\n\n        // Sets target components: gets common components and initializes them\n        void SetTargetsComponents(const Vector<IObject*>& targets, Vector<Ref<Widget>>& viewersWidgets);\n\n        // Returns list of grouped by types components\n        Vector<Pair<const Type*, Vector<Ref<Component>>>> GetGroupedComponents() const;\n\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after) override;\n\n        friend class AddComponentPanel;\n    };\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::ActorViewer)\n{\n    BASE_CLASS(Editor::IPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ActorViewer)\n{\n    FIELD().PROTECTED().NAME(mTargetActors);\n    FIELD().PROTECTED().NAME(mHeaderViewer);\n    FIELD().PROTECTED().NAME(mTransformViewer);\n    FIELD().PROTECTED().NAME(mActorPropertiesViewer);\n    FIELD().PROTECTED().NAME(mDefaultActorPropertiesViewer);\n    FIELD().PROTECTED().NAME(mAvailableActorPropertiesViewers);\n    FIELD().PROTECTED().NAME(mActorPropertiesViewersPool);\n    FIELD().PROTECTED().NAME(mComponentGroupsTypes);\n    FIELD().PROTECTED().NAME(mComponentsViewers);\n    FIELD().PROTECTED().NAME(mDefaultComponentViewer);\n    FIELD().PROTECTED().NAME(mAvailableComponentsViewers);\n    FIELD().PROTECTED().NAME(mComponentViewersPool);\n    FIELD().PROTECTED().NAME(mAddComponentPanel);\n    FIELD().PROTECTED().NAME(mViewersLayout);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ActorViewer)\n{\n\n    typedef Vector<Pair<const Type*, Vector<Ref<Component>>>> _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetActorHeaderViewer, const Ref<IActorHeaderViewer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetActorTransformViewer, const Ref<IActorTransformViewer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddComponentViewerType, const Ref<IActorComponentViewer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddActorPropertiesViewerType, const Ref<IActorPropertiesViewer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSceneObjectsChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetTargets, const Vector<IObject*>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetTargetsActorProperties, const Vector<IObject*>&, Vector<Ref<Widget>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetTargetsComponents, const Vector<IObject*>&, Vector<Ref<Widget>>&);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp1, GetGroupedComponents);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/AddComponentPanel.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AddComponentPanel.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/ActorViewer.h\"\n\nnamespace Editor\n{\n    AddComponentPanel::AddComponentPanel(RefCounter* refCounter, const Ref<ActorViewer>& viewer) :\n        Widget(refCounter), mViewer(viewer)\n    {\n        AddLayer(\"border\", mmake<Sprite>(\"ui/UI4_shadow_separator.png\"), Layout::HorStretch(VerAlign::Top, -2, -2, 5, -4));\n\n        mFilterBox = o2UI.CreateEditBox(\"actor head name\");\n        mAddButton = o2UI.CreateWidget<Button>(\"add component\");\n        mTree = o2UI.CreateWidget<ComponentsTree>();\n\n        *mFilterBox->layout = WidgetLayout::HorStretch(VerAlign::Top, 10, 40, 20, 10);\n        *mAddButton->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(40, 40), Vec2F());\n        *mTree->layout = WidgetLayout::BothStretch(0, 0, 0, 40);\n\n        AddChildren({ mFilterBox, mAddButton, mTree });\n\n        mFilterBox->onChanged = [&](const WString& filter) { mTree->SetFilter(filter); };\n        mAddButton->onClick = THIS_FUNC(OnAddPressed);\n\n        mTree->onNodeDoubleClicked = THIS_FUNC(OnNodeDblClick);\n        mTree->Refresh();\n    }\n\n    AddComponentPanel::AddComponentPanel(RefCounter* refCounter):\n        Widget(refCounter)\n    {}\n\n    void AddComponentPanel::Draw()\n    {\n        Widget::Draw();\n        CursorEventsArea::OnDrawn();\n    }\n\n    const Ref<EditBox>& AddComponentPanel::GetFilter() const\n    {\n        return mFilterBox;\n    }\n\n    const Ref<ComponentsTree>& AddComponentPanel::GetTree() const\n    {\n        return mTree;\n    }\n\n    bool AddComponentPanel::IsUnderPoint(const Vec2F& point)\n    {\n        return Widget::IsUnderPoint(point);\n    }\n\n    bool AddComponentPanel::IsInputTransparent() const\n    {\n        return true;\n    }\n\n    String AddComponentPanel::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    Ref<RefCounterable> AddComponentPanel::CastToRefCounterable(const Ref<AddComponentPanel>& ref)\n    {\n        return DynamicCast<Widget>(ref);\n    }\n\n    void AddComponentPanel::OnAddPressed()\n    {\n        if (mTree->GetSelectedObjects().IsEmpty())\n            return;\n\n        ComponentsTree::NodeData* node = (ComponentsTree::NodeData*)(mTree->GetSelectedObjects().Last());\n\n        if (!node->type)\n            return;\n\n        const ObjectType* objType = dynamic_cast<const ObjectType*>(node->type);\n        CreateComponent(objType);\n\n        onCursorPressedOutside(*o2Input.GetCursor());\n    }\n\n    void AddComponentPanel::CreateComponent(const ObjectType* objType)\n    {\n        auto viewer = mViewer.Lock();\n\n        for (auto& actor : viewer->mTargetActors)\n        {\n            auto comp = DynamicCast<Component>(objType->CreateSampleRef());\n            actor->AddComponent(comp);\n            comp->OnAddedFromEditor();\n        }\n\n        viewer->SetTargets(viewer->mTargetActors.Convert<IObject*>([](auto x) { return dynamic_cast<IObject*>(x); }));\n        viewer->OnPropertiesEnabled();\n    }\n\n    void AddComponentPanel::OnNodeDblClick(const Ref<TreeNode>& nodeWidget)\n    {\n        if (!nodeWidget)\n            return;\n\n        auto node = DynamicCast<ComponentsTreeNode>(nodeWidget);\n        if (!node->data->type)\n            return;\n\n        const ObjectType* objType = dynamic_cast<const ObjectType*>(node->data->type);\n        CreateComponent(objType);\n    }\n\n    void AddComponentPanel::OnKeyReleased(const Input::Key& key)\n    {\n        if (key.keyCode != VK_RETURN)\n            return; \n\n        if (mFilterBox->IsFocused() || mTree->IsFocused())\n            OnAddPressed();\n    }\n\n    ComponentsTree::ComponentsTree(RefCounter* refCounter) :\n        Tree(refCounter)\n    {}\n\n    ComponentsTree::ComponentsTree(RefCounter* refCounter, const ComponentsTree& other) :\n        Tree(refCounter, other)\n    {}\n\n    ComponentsTree::ComponentsTree(const ComponentsTree& other):\n        ComponentsTree(nullptr, other)\n    {}\n\n    ComponentsTree& ComponentsTree::operator=(const ComponentsTree& other)\n    {\n        Tree::operator=(other);\n        return *this;\n    }\n\n    void ComponentsTree::Refresh()\n    {\n        mRoot = mmake<NodeData>();\n\n        auto componentsTypes = TypeOf(Component).GetDerivedTypes();\n        componentsTypes.Remove(&TypeOf(Component));\n\n        String filterStrLower = mFilterStr.ToLowerCase();\n\n        for (auto& type : componentsTypes)\n        {\n            if (!type->InvokeStatic<bool>(\"IsAvailableFromCreateMenu\"))\n                continue;\n\n            String name = type->InvokeStatic<String>(\"GetName\");\n            if (name.IsEmpty())\n                name = type->GetName();\n\n            if (!filterStrLower.IsEmpty())\n            {\n                if (name.ToLowerCase().Contains(filterStrLower))\n                    mRoot->AddChild(name, type)->icon = type->InvokeStatic<String>(\"GetIcon\");\n            }\n            else\n            {\n                String category = type->InvokeStatic<String>(\"GetCategory\");\n                auto it = mRoot;\n                while (!category.IsEmpty())\n                {\n                    int fnd = category.Find('/');\n                    String subStr = category.SubStr(0, fnd);\n                    category = fnd != -1 ? category.SubStr(fnd + 1) : String(\"\");\n\n                    auto nextIt = it->children.FindOrDefault([&](auto& x) { return x->name == subStr; });\n                    if (!nextIt)\n                        nextIt = it->AddChild(subStr, nullptr);\n\n                    it = nextIt;\n                }\n\n                it->AddChild(name, type)->icon = type->InvokeStatic<String>(\"GetIcon\");\n            }\n        }\n\n        UpdateNodesStructure();\n        UpdateVisibleNodes();\n    }\n\n    void ComponentsTree::SetFilter(const WString& filter)\n    {\n        mFilterStr = filter;\n        Refresh();\n\n        String lowerFilter = mFilterStr.ToLowerCase();\n        int minDist = INT_MAX;\n        Ref<NodeData> filtered;\n        Function<void(const Ref<NodeData>&)> recursiveSearch = \n            [&lowerFilter, &recursiveSearch, &minDist, &filtered](const Ref<NodeData>& node)\n        {\n            if (node->type != nullptr)\n            {\n                int dist = node->name.ToLowerCase().Find(lowerFilter);\n                if (dist >= 0 && dist < minDist)\n                {\n                    minDist = dist;\n                    filtered = node;\n                }\n            }\n\n            for (auto& child : node->children)\n                recursiveSearch(child);\n        };\n\n        recursiveSearch(mRoot);\n\n        if (filtered)\n            SelectAndHighlightObject(filtered.Get());\n    }\n\n    String ComponentsTree::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void ComponentsTree::UpdateVisibleNodes()\n    {\n        PushEditorScopeOnStack scope;\n        Tree::UpdateVisibleNodes();\n    }\n\n    Ref<TreeNode> ComponentsTree::CreateTreeNodeWidget()\n    {\n        PushEditorScopeOnStack scope;\n        return Tree::CreateTreeNodeWidget();\n    }\n\n    void* ComponentsTree::GetObjectParent(void* object)\n    {\n        auto node = (NodeData*)object;\n        if (node->parent == mRoot.Get())\n            return (NodeData*)nullptr;\n\n        return node->parent.Lock().Get();\n    }\n\n    Vector<void*> ComponentsTree::GetObjectChilds(void* object)\n    {\n        if (object)\n            return ((NodeData*)object)->children.Convert<void*>([](auto& x) { return x.Get(); });\n\n        return mRoot->children.Convert<void*>([](auto& x) { return x.Get(); });\n    }\n\n    String ComponentsTree::GetObjectDebug(void* object)\n    {\n        if (object)\n            return ((NodeData*)object)->path;\n\n        return \"\";\n    }\n\n    void ComponentsTree::FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object)\n    {\n        auto propertyNode = DynamicCast<ComponentsTreeNode>(nodeWidget);\n        propertyNode->Setup(Ref((NodeData*)object), Ref(this));\n    }\n\n    void ComponentsTree::OnDeserialized(const DataValue& node)\n    {\n        Tree::OnDeserialized(node);\n    }\n\n    ComponentsTreeNode::ComponentsTreeNode(RefCounter* refCounter):\n        TreeNode(refCounter)\n    {\n        InitializeControls();\n    }\n\n    ComponentsTreeNode::ComponentsTreeNode(RefCounter* refCounter, const ComponentsTreeNode& other) :\n        TreeNode(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    ComponentsTreeNode& ComponentsTreeNode::operator=(const ComponentsTreeNode& other)\n    {\n        TreeNode::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void ComponentsTreeNode::Setup(const Ref<ComponentsTree::NodeData>& data, const Ref<ComponentsTree>& tree)\n    {\n        mName->text = data->name;\n\n        *mIcon = Sprite(data->icon);\n        mIcon->enabled = data->type != nullptr;\n        mIcon->color = Color4(44, 62, 80);\n\n        this->data = data;\n        mTree = tree;\n    }\n\n    String ComponentsTreeNode::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void ComponentsTreeNode::OnDeserialized(const DataValue& node)\n    {\n        TreeNode::OnDeserialized(node);\n        InitializeControls();\n    }\n\n    void ComponentsTreeNode::InitializeControls()\n    {\n        mName = GetLayerDrawable<Text>(\"name\");\n        mIcon = GetLayerDrawable<Sprite>(\"icon\");\n    }\n\n    ComponentsTree::NodeData::~NodeData()\n    {\n        Clear();\n    }\n\n    void ComponentsTree::NodeData::Clear()\n    {\n        children.Clear();\n    }\n\n    Ref<ComponentsTree::NodeData> ComponentsTree::NodeData::AddChild(const String& name, const Type* type)\n    {\n        auto newChild = mmake<NodeData>();\n        children.Add(newChild);\n\n        newChild->name = name;\n        newChild->path = path.IsEmpty() ? name : path + \"/\" + name;\n        newChild->type = type;\n        newChild->parent = Ref(this);\n\n        return newChild;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::ComponentsTreeNode>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::AddComponentPanel>);\n// --- META ---\n\nDECLARE_CLASS(Editor::AddComponentPanel, Editor__AddComponentPanel);\n\nDECLARE_CLASS(Editor::ComponentsTree, Editor__ComponentsTree);\n\nDECLARE_CLASS(Editor::ComponentsTreeNode, Editor__ComponentsTreeNode);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/AddComponentPanel.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorEventsArea.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class EditBox;\n    class Button;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(ActorViewer);\n    FORWARD_CLASS_REF(ComponentsTree);\n\n    // --------------------------------------------------------------------------------\n    // Add component to actor panel. Shows filter input, add button and components tree\n    // --------------------------------------------------------------------------------\n    class AddComponentPanel : public Widget, public CursorEventsArea, public KeyboardEventsListener\n    {\n    public:\n        // Default constructor\n        AddComponentPanel(RefCounter* refCounter);\n\n        // Constructor\n        AddComponentPanel(RefCounter* refCounter, const Ref<ActorViewer>& viewer);\n\n        // Draws widget, calls OnDrawn for CursorEventsListener\n        void Draw() override;\n\n        // Returns filter widget\n        const Ref<EditBox>& GetFilter() const;\n\n        // Returns tree widget\n        const Ref<ComponentsTree>& GetTree() const;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        // Dynamic cast to RefCounterable via Component\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<AddComponentPanel>& ref);\n\n        SERIALIZABLE(AddComponentPanel);\n        CLONEABLE_REF(AddComponentPanel);\n\n    private:\n        WeakRef<ActorViewer> mViewer; // Owner actors viewer\n\n        Ref<EditBox>        mFilterBox; // Components names filter edit box, updates list of component when edit\n        Ref<Button>         mAddButton; // Add button\n        Ref<ComponentsTree> mTree;      // Components tree\n\n    private:\n        // Called when add button pressed. Adds selected component to target actors from viewer\n        void OnAddPressed();\n\n        // Creates component by type\n        void CreateComponent(const ObjectType* objType);\n\n        // Called when tree node was double clicked\n        void OnNodeDblClick(const Ref<TreeNode>& nodeWidget);\n\n        // Called when key was released. When returns has pressed, component is creating\n        void OnKeyReleased(const Input::Key& key) override;\n\n        REF_COUNTERABLE_IMPL(Widget, CursorEventsArea);\n    };\n    \n    // ---------------------------------------------------------------------\n    // Components tree. Builds data tree by available components with filter\n    // ---------------------------------------------------------------------\n    class ComponentsTree : public Tree\n    {\n    public:\n        struct NodeData: public RefCounterable\n        {\n            WeakRef<NodeData>     parent ;\n            Vector<Ref<NodeData>> children;\n\n            String name;\n            String path;\n            String icon = \"ui/UI4_component_icon.png\";\n\n            const Type* type = nullptr;\n\n        public:\n            ~NodeData();\n\n            void Clear();\n            Ref<NodeData> AddChild(const String& name, const Type* type);\n        };\n\n    public:\n        // Default constructor\n        ComponentsTree(RefCounter* refCounter);\n\n        // Copy-constructor\n        ComponentsTree(RefCounter* refCounter, const ComponentsTree& other);\n\n        // Copy-constructor\n        ComponentsTree(const ComponentsTree& other);\n\n        // Copy operator\n        ComponentsTree& operator=(const ComponentsTree& other);\n\n        // Refreshes components list\n        void Refresh();\n\n        // Sets filter and refreshes tree\n        void SetFilter(const WString& filter);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(ComponentsTree);\n        CLONEABLE_REF(ComponentsTree);\n\n    private:\n        WString  mFilterStr; // Filtering string\n        Ref<NodeData> mRoot; // Root properties data node\n\n    private:\n        // Updates visible nodes (calculates range and initializes nodes), enables editor mode\n        void UpdateVisibleNodes() override;\n\n        // Gets tree node from pool or creates new, enables editor mode\n        Ref<TreeNode> CreateTreeNodeWidget() override;\n\n        // Returns object's parent\n        void* GetObjectParent(void* object) override;\n\n        // Returns object's children\n        Vector<void*> GetObjectChilds(void* object) override;\n\n        // Returns debugging string for object\n        String GetObjectDebug(void* object) override;\n\n        // Sets nodeWidget data by object\n        void FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object) override;\n\n        void OnDeserialized(const DataValue& node) override;\n\n        friend class ComponentsTreeNode;\n    };\n\n    // --------------------------------------------------------------------------\n    // Components tree node. Can bea  group of components or the component itself\n    // --------------------------------------------------------------------------\n    class ComponentsTreeNode : public TreeNode\n    {\n    public:\n        Ref<ComponentsTree::NodeData> data;\n\n    public:\n        // Default constructor\n        ComponentsTreeNode(RefCounter* refCounter);\n\n        // Copy-constructor\n        ComponentsTreeNode(RefCounter* refCounter, const ComponentsTreeNode& other);\n\n        // Copy operator\n        ComponentsTreeNode& operator=(const ComponentsTreeNode& other);\n\n        // Initializes node by data\n        void Setup(const Ref<ComponentsTree::NodeData>& data, const Ref<ComponentsTree>& tree);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(ComponentsTreeNode);\n        CLONEABLE_REF(ComponentsTreeNode);\n\n    private:\n        Ref<Text>   mName;\n        Ref<Sprite> mIcon;\n\n        WeakRef<ComponentsTree> mTree;\n\n    private:\n        // Called on deserialization, initializes controls\n        void OnDeserialized(const DataValue& node) override;\n\n        // initializes controls and widgets\n        void InitializeControls();\n\n        friend class ComponentsTree;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AddComponentPanel)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::CursorEventsArea);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AddComponentPanel)\n{\n    FIELD().PRIVATE().NAME(mViewer);\n    FIELD().PRIVATE().NAME(mFilterBox);\n    FIELD().PRIVATE().NAME(mAddButton);\n    FIELD().PRIVATE().NAME(mTree);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AddComponentPanel)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Ref<ActorViewer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<EditBox>&, GetFilter);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ComponentsTree>&, GetTree);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<AddComponentPanel>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnAddPressed);\n    FUNCTION().PRIVATE().SIGNATURE(void, CreateComponent, const ObjectType*);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnNodeDblClick, const Ref<TreeNode>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::ComponentsTree)\n{\n    BASE_CLASS(o2::Tree);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ComponentsTree)\n{\n    FIELD().PRIVATE().NAME(mFilterStr);\n    FIELD().PRIVATE().NAME(mRoot);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ComponentsTree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ComponentsTree&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ComponentsTree&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFilter, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateVisibleNodes);\n    FUNCTION().PRIVATE().SIGNATURE(Ref<TreeNode>, CreateTreeNodeWidget);\n    FUNCTION().PRIVATE().SIGNATURE(void*, GetObjectParent, void*);\n    FUNCTION().PRIVATE().SIGNATURE(Vector<void*>, GetObjectChilds, void*);\n    FUNCTION().PRIVATE().SIGNATURE(String, GetObjectDebug, void*);\n    FUNCTION().PRIVATE().SIGNATURE(void, FillNodeDataByObject, const Ref<TreeNode>&, void*);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::ComponentsTreeNode)\n{\n    BASE_CLASS(o2::TreeNode);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::ComponentsTreeNode)\n{\n    FIELD().PUBLIC().NAME(data);\n    FIELD().PRIVATE().NAME(mName);\n    FIELD().PRIVATE().NAME(mIcon);\n    FIELD().PRIVATE().NAME(mTree);\n}\nEND_META;\nCLASS_METHODS_META(Editor::ComponentsTreeNode)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ComponentsTreeNode&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Setup, const Ref<ComponentsTree::NodeData>&, const Ref<ComponentsTree>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeControls);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorComponentViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DefaultActorComponentViewer.h\"\n\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n\nnamespace Editor\n{\n    DefaultActorComponentViewer::DefaultActorComponentViewer()\n    {}\n\n    DefaultActorComponentViewer::~DefaultActorComponentViewer()\n    {}\n\n    void DefaultActorComponentViewer::SetTargetComponents(const Vector<Ref<Component>>& components)\n    {\n        IActorComponentViewer::SetTargetComponents(components);\n        Refresh();\n    }\n\n    const Type* DefaultActorComponentViewer::GetComponentType() const\n    {\n        return mComponentType;\n    }\n\n    void DefaultActorComponentViewer::Refresh()\n    {\n        const Type* objectsType = &mTargetComponents[0]->GetType();\n\n        if (mComponentType != objectsType)\n        {\n            mComponentType = objectsType;\n            mSpoiler->name = \"component \" + mComponentType->GetName();\n\n            if (mViewer)\n                o2EditorProperties.FreeObjectViewer(mViewer);\n\n            mViewer = o2EditorProperties.CreateObjectViewer(mComponentType, (String)\"component/\" + mComponentType->GetName(),\n                                                            THIS_FUNC(OnPropertyChangeCompleted), THIS_FUNC(OnPropertyChanged));\n\n            mViewer->CheckCreateSpoiler(mSpoiler);\n            mViewer->SetHeaderEnabled(false);\n        }\n\n        if (mViewer)\n        {\n            mViewer->Refresh(mTargetComponents.Convert<Pair<IObject*, IObject*>>([](const Ref<Component>& x) {\n                return Pair<IObject*, IObject*>(dynamic_cast<IObject*>(x.Get()), dynamic_cast<IObject*>(x->GetPrototypeLink().Lock().Get()));\n            }));\n        }\n    }\n\n    void DefaultActorComponentViewer::OnPropertiesEnabled()\n    {\n        if (mViewer)\n            mViewer->OnPropertiesEnabled();\n    }\n\n    void DefaultActorComponentViewer::OnPropertiesDisabled()\n    {\n        if (mViewer)\n            mViewer->OnPropertiesDisabled();\n    }\n\n    void DefaultActorComponentViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        IActorComponentViewer::OnPropertyChanged(field, byUser);\n    }\n\n    void DefaultActorComponentViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                                                const Vector<DataDocument>& after)\n    {\n        IActorComponentViewer::OnPropertyChangeCompleted(path, before, after);\n\n        for (auto& component : mTargetComponents)\n            component->GetActor()->OnChanged();\n\n        o2EditorSceneWindow.DoneActorPropertyChangeAction(path, before, after);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DefaultActorComponentViewer, Editor__DefaultActorComponentViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorComponentViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorComponentViewer.h\"\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IObjectPropertiesViewer);\n\n    // ------------------------------\n    // Default actor component viewer\n    // ------------------------------\n    class DefaultActorComponentViewer: public IActorComponentViewer\n    {\n    public:\n        // Default constructor. Initializes data widget\n        DefaultActorComponentViewer();\n\n        // Virtual destructor\n        ~DefaultActorComponentViewer();\n\n        // Sets target actors\n        void SetTargetComponents(const Vector<Ref<Component>>& components) override;\n\n        // Returns viewing component type \n        const Type* GetComponentType() const override;\n\n        // Updates all component values\n        void Refresh() override;\n\n        IOBJECT(DefaultActorComponentViewer);\n\n    protected:\n        const Type* mComponentType = nullptr; // Target component type\n\n        Ref<IObjectPropertiesViewer> mViewer; //Component properties viewer\n\n    protected:\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after) override;\n    };\n\n    template<typename _component_type>\n    class TActorComponentViewer: public DefaultActorComponentViewer\n    {\n    public:\n        // Sets target actors\n        void SetTargetComponents(const Vector<Ref<Component>>& components) override;\n\n        // Returns viewing component type \n        const Type* GetComponentType() const override;\n\n        IOBJECT(TActorComponentViewer<_component_type>);\n\n    protected:\n        Vector<Ref<_component_type>> mTargetComponents;\n    };\n\n    template<typename _component_type>\n    void TActorComponentViewer<_component_type>::SetTargetComponents(const Vector<Ref<Component>>& components)\n    {\n        DefaultActorComponentViewer::SetTargetComponents(components);\n        mTargetComponents = DynamicCastVector<_component_type>(components);\n    }\n\n    template<typename _component_type>\n    const Type* TActorComponentViewer<_component_type>::GetComponentType() const\n    {\n        return &TypeOf(_component_type);\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DefaultActorComponentViewer)\n{\n    BASE_CLASS(Editor::IActorComponentViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DefaultActorComponentViewer)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mComponentType);\n    FIELD().PROTECTED().NAME(mViewer);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DefaultActorComponentViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetComponents, const Vector<Ref<Component>>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetComponentType);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n\nMETA_TEMPLATES(typename _component_type)\nCLASS_BASES_META(Editor::TActorComponentViewer<_component_type>)\n{\n    BASE_CLASS(Editor::DefaultActorComponentViewer);\n}\nEND_META;\nMETA_TEMPLATES(typename _component_type)\nCLASS_FIELDS_META(Editor::TActorComponentViewer<_component_type>)\n{\n    FIELD().PROTECTED().NAME(mTargetComponents);\n}\nEND_META;\nMETA_TEMPLATES(typename _component_type)\nCLASS_METHODS_META(Editor::TActorComponentViewer<_component_type>)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetComponents, const Vector<Ref<Component>>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetComponentType);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorHeaderViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DefaultActorHeaderViewer.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/DropDown.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Actions/PropertyChange.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Properties/Basic/AssetProperty.h\"\n#include \"o2Editor/Properties/Basic/BooleanProperty.h\"\n#include \"o2Editor/Properties/Basic/FloatProperty.h\"\n#include \"o2Editor/Properties/Basic/SceneLayerRefProperty.h\"\n#include \"o2Editor/Properties/Basic/StringProperty.h\"\n#include \"o2Editor/Properties/Basic/TagProperty.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    DefaultActorHeaderViewer::DefaultActorHeaderViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        mDataView = mmake<Widget>();\n        mDataView->name = \"actor head\";\n        mDataView->layout->minHeight = 62;\n\n        mEnableProperty = o2UI.CreateWidget<BooleanProperty>(\"actor head enable\");\n        *mEnableProperty->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(1, 0));\n        mEnableProperty->SetValuePath(\"enabled\");\n        mEnableProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mEnableProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mDataView->AddChild(mEnableProperty);\n\n        mNameProperty = o2UI.CreateWidget<StringProperty>(\"actor head name\");\n        *mNameProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 21, 15, 17, 2);\n        mNameProperty->SetValuePath(\"name\");\n        mNameProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mNameProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mDataView->AddChild(mNameProperty);\n\n        mLockProperty = o2UI.CreateWidget<BooleanProperty>(\"actor head lock\");\n        *mLockProperty->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(2, -1));\n        mLockProperty->SetValuePath(\"locked\");\n        mLockProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mLockProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mDataView->AddChild(mLockProperty);\n\n\n        auto prototypeRoot = mDataView->AddChildWidget(mmake<Widget>());\n        prototypeRoot->name = \"prototype\";\n        *prototypeRoot->layout = WidgetLayout::BothStretch();\n\n        prototypeRoot->AddState(\"visible\", AnimationClip::EaseInOut(\"transparency\", 0.0f, 1.0f, 0.1f));\n\n        auto linkImg = o2UI.CreateImage(\"ui/UI4_prefab_link_big.png\");\n        *linkImg->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(1, -20));\n        prototypeRoot->AddChild(linkImg);\n\n        mPrototypeProperty = o2UI.CreateWidget<AssetProperty>(\"actor head asset property\");\n        *mPrototypeProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 65, 17, 25);\n        prototypeRoot->AddChild(mPrototypeProperty);\n\n        mPrototypeApplyBtn = o2UI.CreateWidget<Button>(\"accept prototype\");\n        *mPrototypeApplyBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(25, 25), Vec2F(-40, -18));\n        mPrototypeApplyBtn->onClick = THIS_FUNC(OnApplyPrototypePressed);\n        prototypeRoot->AddChild(mPrototypeApplyBtn);\n\n        mPrototypeRevertBtn = o2UI.CreateWidget<Button>(\"revert prototype\");\n        *mPrototypeRevertBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(25, 25), Vec2F(-20, -18));\n        mPrototypeRevertBtn->onClick = THIS_FUNC(OnRevertPrototypePressed);\n        prototypeRoot->AddChild(mPrototypeRevertBtn);\n\n        mPrototypeBreakBtn = o2UI.CreateWidget<Button>(\"break prototype\");\n        *mPrototypeBreakBtn->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(25, 25), Vec2F(0, -18));\n        mPrototypeBreakBtn->onClick = THIS_FUNC(OnBreakPrototypePressed);\n        prototypeRoot->AddChild(mPrototypeBreakBtn);\n\n        auto tagsImg = o2UI.CreateImage(\"ui/UI4_tag_big.png\");\n        *tagsImg->layout = WidgetLayout::Based(BaseCorner::LeftBottom, Vec2F(20, 20), Vec2F(1, 21));\n        mDataView->AddChild(tagsImg);\n\n        mTagsProperty = o2UI.CreateWidget<TagsProperty>(\"actor head tags\");\n        *mTagsProperty->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 21, 3, 17, 23);\n        mTagsProperty->SetValuePath(\"tags\");\n        mTagsProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mTagsProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mDataView->AddChild(mTagsProperty);\n\n        auto layerImg = o2UI.CreateImage(\"ui/UI4_layer_big.png\");\n        *layerImg->layout = WidgetLayout::Based(BaseCorner::LeftBottom, Vec2F(20, 20), Vec2F(1, 0));\n        mDataView->AddChild(layerImg);\n\n        mLayerProperty = o2UI.CreateWidget<SceneLayerRefProperty>(\"actor head layer\");\n        *mLayerProperty->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 21, 75, 17, 3);\n        mLayerProperty->name = \"layer\";\n        mLayerProperty->SetValuePath(\"layer\");\n        mLayerProperty->SetUseInheritedValue(true);\n        mLayerProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mLayerProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mLayerProperty->onSelectedInheritedValue = THIS_FUNC(OnSelectedInheritedLayer);\n        mDataView->AddChild(mLayerProperty);\n\n        mDepthProperty = o2UI.CreateWidget<FloatProperty>(\"actor head depth\");\n        *mDepthProperty->layout = WidgetLayout::Based(BaseCorner::RightBottom, Vec2F(70, 17), Vec2F(-3, 3));\n        mDepthProperty->name = \"depth\";\n        mDepthProperty->SetValuePath(\"depth\");\n        mDepthProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mDepthProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mDataView->AddChild(mDepthProperty);\n\n        auto depthInheritStateAnim = AnimationClip::EaseInOut(\"child/layer/layout/offsetRight\", -75.0f, -3.0f, 0.2f);\n        *depthInheritStateAnim->AddTrack<float>(\"child/depth/layout/offsetLeft\") = AnimationTrack<float>::Linear(-70.0f, 0.0f, 0.2f);\n        *depthInheritStateAnim->AddTrack<bool>(\"child/depth/enabled\") = AnimationTrack<bool>::Linear(true, false, 0.2f);\n        mDataView->AddState(\"depth inherit\", depthInheritStateAnim);\n\n        auto protoStateAnim = AnimationClip::EaseInOut(\"layout/minHeight\", 62.0f, 84.0f, 0.1f);\n        *protoStateAnim->AddTrack<bool>(\"child/prototype/enabled\") = AnimationTrack<bool>::Linear(false, true, 0.1f);\n        mDataView->AddState(\"prototype\", protoStateAnim);\n    }\n\n    DefaultActorHeaderViewer::~DefaultActorHeaderViewer()\n    {}\n\n    void DefaultActorHeaderViewer::SetTargetActors(const Vector<Actor*>& actors)\n    {\n        mActors = actors;\n\n        auto prototypes = actors.Convert<Actor*>([](Actor* x) { return x->GetPrototypeLink().Get(); });\n\n        mEnableProperty->SelectValueAndPrototypeProperties<Actor, decltype(Actor::enabled)>(\n            actors, prototypes, [](Actor* x) { return &x->enabled; });\n\n        mNameProperty->SelectValueAndPrototypeProperties<Actor, decltype(Actor::name)>(\n            actors, prototypes, [](Actor* x) { return &x->name; });\n\n        mLockProperty->SelectValueAndPrototypeProperties<Actor, decltype(Actor::locked)>(\n            actors, prototypes, [](Actor* x) { return &x->locked; });\n\n        mPrototypeProperty->SelectValuesProperties<Actor, decltype(Actor::prototype)>(\n            actors, [](Actor* x) { return &x->prototype; });\n\n        mDataView->state[\"prototype\"]->SetState(mPrototypeProperty->GetCommonValue().IsValid());\n\n        mTagsProperty->SelectValueAndPrototypePointers<TagGroup, Actor>(\n            actors, prototypes, [](Actor* x) { return &x->tags; });\n\n        mLayerProperty->SelectValueAndPrototypeFunctional<Ref<SceneLayer>, Actor>(\n            actors, prototypes, [](Actor* x) { return x->GetLayer(); },\n            [](Actor* x, const Ref<SceneLayer>& l) { if (l) x->SetLayer(l->GetName()); });\n\n        mDepthProperty->SelectValueAndPrototypeProperties<Actor, decltype(Actor::drawDepth)>(\n            actors, prototypes, [](Actor* x) { return &x->drawDepth; });\n\n        RefreshLayer();\n    }\n\n    Ref<Widget> DefaultActorHeaderViewer::GetWidget() const\n    {\n        return mDataView;\n    }\n\n    void DefaultActorHeaderViewer::Refresh()\n    {\n        mEnableProperty->Refresh();\n        mNameProperty->Refresh();\n        mLockProperty->Refresh();\n        mPrototypeProperty->Refresh();\n        mTagsProperty->Refresh();\n        mDepthProperty->Refresh();\n\n        mDataView->state[\"prototype\"]->SetState(mPrototypeProperty->GetCommonValue().IsValid());\n\n        RefreshLayer();\n    }\n\n    void DefaultActorHeaderViewer::OnPropertiesEnabled()\n    {\n        mEnableProperty->SetPropertyEnabled(true);\n        mNameProperty->SetPropertyEnabled(true);\n        mLockProperty->SetPropertyEnabled(true);\n        mPrototypeProperty->SetPropertyEnabled(true);\n        mTagsProperty->SetPropertyEnabled(true);\n        mLayerProperty->SetPropertyEnabled(true);\n        mDepthProperty->SetPropertyEnabled(true);\n    }\n\n    void DefaultActorHeaderViewer::OnPropertiesDisabled()\n    {\n        mEnableProperty->SetPropertyEnabled(false);\n        mNameProperty->SetPropertyEnabled(false);\n        mLockProperty->SetPropertyEnabled(false);\n        mPrototypeProperty->SetPropertyEnabled(false);\n        mTagsProperty->SetPropertyEnabled(false);\n        mLayerProperty->SetPropertyEnabled(false);\n        mDepthProperty->SetPropertyEnabled(false);\n    }\n\n    void DefaultActorHeaderViewer::RefreshLayer()\n    {\n        mLayerProperty->Refresh();\n\n        bool commonInheritedValue = mActors[0]->IsDrawingDepthInheritedFromParent();\n        bool differentsInheritedValue = false;\n\n        for (int i = 1; i < mActors.Count(); i++)\n        {\n            bool inheritedValue = mActors[i]->IsDrawingDepthInheritedFromParent();\n            if (inheritedValue != commonInheritedValue)\n                differentsInheritedValue = true;\n        }\n\n        if (differentsInheritedValue)\n            mLayerProperty->SetUnknownValue(mActors[0]->GetLayer());\n        else\n            mLayerProperty->SetSelectedInheritedValue(commonInheritedValue);\n\n        mDataView->state[\"depth inherit\"]->SetState(commonInheritedValue);\n    }\n\n    void DefaultActorHeaderViewer::OnApplyPrototypePressed()\n    {\n        Vector<Actor*> actors = GetRootApplyActors();\n\n        for (auto& actor : actors)\n            actor->ApplyChangesToPrototype();\n    }\n\n    void DefaultActorHeaderViewer::OnRevertPrototypePressed()\n    {\n        bool areViewActorsAssets = mActors[0]->IsAsset();\n        o2EditorPropertiesWindow.SetTarget(nullptr);\n\n        Vector<Actor*> revertingActors = GetRootApplyActors();\n\n        for (auto& actor : revertingActors)\n            actor->RevertToPrototype();\n\n        mActors.Clear();\n        if (areViewActorsAssets)\n        {\n            Vector<UID> viewActors = mActors.Convert<UID>([](Actor* x) { return x->GetAssetID(); });\n            for (auto& id : viewActors)\n                mActors.Add(AssetRef<ActorAsset>(id)->GetActor().Get());\n        }\n        else\n        {\n            Vector<UInt64> viewActors = mActors.Convert<UInt64>([](Actor* x) { return x->GetID(); });\n            for (auto& id : viewActors)\n                mActors.Add(o2Scene.GetActorByID(id).Get());\n        }\n\n        o2EditorPropertiesWindow.SetTargets(mActors.Cast<IObject*>());\n    }\n\n    void DefaultActorHeaderViewer::OnBreakPrototypePressed()\n    {\n        Vector<Actor*> actors = GetRootApplyActors();\n\n        for (auto& actor : actors)\n            actor->BreakPrototypeLink();\n\n        *mDataView->state[\"prototype\"] = false;\n    }\n\n    void DefaultActorHeaderViewer::OnSelectedInheritedLayer()\n    {\n        for (auto& actor : mActors)\n            actor->SetDrawingDepthInheritFromParent(true);\n    }\n\n    Vector<Actor*> DefaultActorHeaderViewer::GetRootApplyActors()\n    {\n        Vector<Actor*> applyActors;\n\n        for (auto& actor : mActors)\n        {\n            Actor* applyActor = actor;\n            if (!applyActor->GetPrototype())\n                continue;\n\n            while (applyActor && !applyActor->GetPrototypeDirectly().IsValid())\n                applyActor = applyActor->GetParent().Lock().Get();\n\n            if (applyActor)\n                applyActors.Add(applyActor);\n        }\n\n        return applyActors;\n    }\n    void DefaultActorHeaderViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        IActorHeaderViewer::OnPropertyChanged(field, byUser);\n    }\n\n    void DefaultActorHeaderViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        IActorHeaderViewer::OnPropertyChangeCompleted(path, before, after);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DefaultActorHeaderViewer, Editor__DefaultActorHeaderViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorHeaderViewer.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorHeaderViewer.h\"\n\nnamespace o2\n{\n    class Toggle;\n    class EditBox;\n    class Button;\n}\n\nnamespace Editor\n{\n    using namespace o2;\n\n    FORWARD_CLASS_REF(TagsProperty);\n    FORWARD_CLASS_REF(SceneLayerRefProperty);\n    FORWARD_CLASS_REF(BooleanProperty);\n    FORWARD_CLASS_REF(StringProperty);\n    FORWARD_CLASS_REF(AssetProperty);\n    FORWARD_CLASS_REF(FloatProperty);\n\n    // ---------------------------\n    // Default actor header viewer\n    // ---------------------------\n    class DefaultActorHeaderViewer: public IActorHeaderViewer\n    {\n    public:\n        // Default constructor\n        DefaultActorHeaderViewer();\n\n        // Virtual destructor\n        ~DefaultActorHeaderViewer();\n\n        // Sets target actors\n        void SetTargetActors(const Vector<Actor*>& actors) override;\n\n        // Returns data widget\n        Ref<Widget> GetWidget() const override;\n\n        // Updates properties values\n        void Refresh() override;\n\n        IOBJECT(DefaultActorHeaderViewer);\n\n    public: \n        Vector<Actor*> mActors;\n\n        Ref<Widget> mDataView;\n\n        Ref<BooleanProperty>       mEnableProperty;\n        Ref<StringProperty>        mNameProperty;\n        Ref<BooleanProperty>       mLockProperty;\n        Ref<AssetProperty>         mPrototypeProperty;\n        Ref<TagsProperty>          mTagsProperty;\n        Ref<SceneLayerRefProperty> mLayerProperty;\n        Ref<FloatProperty>         mDepthProperty;\n\n        Ref<Button> mPrototypeApplyBtn;\n        Ref<Button> mPrototypeRevertBtn;\n        Ref<Button> mPrototypeBreakBtn;\n\n    protected:\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Refreshes layer property\n        void RefreshLayer();\n\n        // Called when apply button pressed, and applies changes to prototype\n        void OnApplyPrototypePressed();\n\n        // Called when revert button pressed and reverts actor to prototype\n        void OnRevertPrototypePressed();\n\n        // Called when break prototype buttons pressed and break prototype link\n        void OnBreakPrototypePressed();\n\n        // Called when selected inherit from parent layer\n        void OnSelectedInheritedLayer();\n\n        // Returns actor applying roots\n        Vector<Actor*> GetRootApplyActors();\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DefaultActorHeaderViewer)\n{\n    BASE_CLASS(Editor::IActorHeaderViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DefaultActorHeaderViewer)\n{\n    FIELD().PUBLIC().NAME(mActors);\n    FIELD().PUBLIC().NAME(mDataView);\n    FIELD().PUBLIC().NAME(mEnableProperty);\n    FIELD().PUBLIC().NAME(mNameProperty);\n    FIELD().PUBLIC().NAME(mLockProperty);\n    FIELD().PUBLIC().NAME(mPrototypeProperty);\n    FIELD().PUBLIC().NAME(mTagsProperty);\n    FIELD().PUBLIC().NAME(mLayerProperty);\n    FIELD().PUBLIC().NAME(mDepthProperty);\n    FIELD().PUBLIC().NAME(mPrototypeApplyBtn);\n    FIELD().PUBLIC().NAME(mPrototypeRevertBtn);\n    FIELD().PUBLIC().NAME(mPrototypeBreakBtn);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DefaultActorHeaderViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetActors, const Vector<Actor*>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, RefreshLayer);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnApplyPrototypePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRevertPrototypePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnBreakPrototypePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectedInheritedLayer);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Actor*>, GetRootApplyActors);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorPropertiesViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DefaultActorPropertiesViewer.h\"\n\n#include \"o2/Utils/StringUtils.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n\nnamespace Editor\n{\n    DefaultActorPropertiesViewer::DefaultActorPropertiesViewer()\n    {}\n\n    DefaultActorPropertiesViewer::~DefaultActorPropertiesViewer()\n    {}\n\n    void DefaultActorPropertiesViewer::SetTargetActors(const Vector<Actor*>& actors)\n    {\n        if (!actors.IsEmpty())\n            mSpoiler->SetCaption(GetSmartName(mActorType->GetName()));\n\n        mTargetActors = actors;\n        Refresh();\n    }\n\n    const Type* DefaultActorPropertiesViewer::GetActorType() const\n    {\n        return mActorType;\n    }\n\n    void DefaultActorPropertiesViewer::SpecializeActorType(const Type* type)\n    {\n        mSpoiler->name = \"actor \" + type->GetName();\n        mActorType = type;\n    }\n\n    void DefaultActorPropertiesViewer::Refresh()\n    {\n        bool requiredNewViewer = mViewer ? mViewer->GetViewingObjectType() != mActorType : mActorType != nullptr;\n        if (requiredNewViewer) \n        {\n            if (mViewer)\n                o2EditorProperties.FreeObjectViewer(mViewer);\n\n            mViewer = o2EditorProperties.CreateObjectViewer(mActorType, \"\", THIS_FUNC(OnPropertyChangeCompleted), THIS_FUNC(OnPropertyChanged));\n            mViewer->CheckCreateSpoiler(mSpoiler);\n            mViewer->SetHeaderEnabled(false);\n        }\n\n        if (mViewer)\n        {\n            mViewer->Refresh(mTargetActors.Convert<Pair<IObject*, IObject*>>([](Actor* x) {\n                return Pair<IObject*, IObject*>(dynamic_cast<IObject*>(x), dynamic_cast<IObject*>(x->GetPrototypeLink().Get()));\n            }));\n        }\n    }\n\n    bool DefaultActorPropertiesViewer::IsEmpty() const\n    {\n        return mViewer && mViewer->IsEmpty();\n    }\n\n    void DefaultActorPropertiesViewer::OnPropertiesEnabled()\n    {\n        if (mViewer)\n            mViewer->OnPropertiesEnabled();\n    }\n\n    void DefaultActorPropertiesViewer::OnPropertiesDisabled()\n    {\n        if (mViewer)\n            mViewer->OnPropertiesDisabled();\n    }\n\n    void DefaultActorPropertiesViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        IActorPropertiesViewer::OnPropertyChanged(field, byUser);\n    }\n\n    void DefaultActorPropertiesViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        IActorPropertiesViewer::OnPropertyChangeCompleted(path, before, after);\n\n        for (auto& actors : mTargetActors)\n            actors->OnChanged();\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DefaultActorPropertiesViewer, Editor__DefaultActorPropertiesViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorPropertiesViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorPropertiesViewer.h\"\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IObjectPropertiesViewer);\n\n    // -------------------------------\n    // Default actor properties viewer\n    // -------------------------------\n    class DefaultActorPropertiesViewer: public IActorPropertiesViewer\n    {\n    public:\n        // Default constructor. Initializes data widget\n        DefaultActorPropertiesViewer();\n\n        // Virtual destructor\n        ~DefaultActorPropertiesViewer();\n\n        // Sets target actors\n        void SetTargetActors(const Vector<Actor*>& actors) override;\n\n        // Returns viewing actor type \n        const Type* GetActorType() const override;\n\n        // Specialize viewing actor type. Creates all using properties\n        void SpecializeActorType(const Type* type);\n\n        // Updates all actor values\n        void Refresh() override;\n\n        // Returns is there no properties\n        bool IsEmpty() const override;\n\n        IOBJECT(DefaultActorPropertiesViewer);\n\n    protected:\n        Vector<Actor*> mTargetActors;        // Target actors\n        const Type*    mActorType = nullptr; // Target actor type\n\n        Ref<IObjectPropertiesViewer> mViewer; // Actor properties viewer\n\n    protected:\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DefaultActorPropertiesViewer)\n{\n    BASE_CLASS(Editor::IActorPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DefaultActorPropertiesViewer)\n{\n    FIELD().PROTECTED().NAME(mTargetActors);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mActorType);\n    FIELD().PROTECTED().NAME(mViewer);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DefaultActorPropertiesViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetActors, const Vector<Actor*>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetActorType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SpecializeActorType, const Type*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEmpty);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorTransformViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DefaultActorTransformViewer.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2Editor/Actions/PropertyChange.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Basic/FloatProperty.h\"\n#include \"o2Editor/Properties/Basic/Vector2FloatProperty.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    DefaultActorTransformViewer::DefaultActorTransformViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        // Position\n        auto positionPropertyContainer = mmake<Widget>();\n        positionPropertyContainer->name = \"position\";\n        positionPropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(positionPropertyContainer);\n\n        auto positionIcon = o2UI.CreateImage(\"ui/UI4_position_icon.png\");\n        *positionIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        positionPropertyContainer->AddChild(positionIcon);\n\n        mPositionProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mPositionProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mPositionProperty->GetXProperty()->SetValuePath(\"transform/positionX\");\n        mPositionProperty->GetYProperty()->SetValuePath(\"transform/positionY\");\n        mPositionProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mPositionProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mPositionProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mPositionProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        positionPropertyContainer->AddChild(mPositionProperty);\n\n        // Pivot\n        auto pivotPropertyContainer = mmake<Widget>();\n        pivotPropertyContainer->name = \"pivot\";\n        pivotPropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(pivotPropertyContainer);\n\n        auto pivotIcon = o2UI.CreateImage(\"ui/UI4_pivot_icon.png\");\n        *pivotIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        pivotPropertyContainer->AddChild(pivotIcon);\n\n        mPivotProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mPivotProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mPivotProperty->GetXProperty()->SetValuePath(\"transform/pivotX\");\n        mPivotProperty->GetYProperty()->SetValuePath(\"transform/pivotY\");\n        mPivotProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mPivotProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mPivotProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mPivotProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        pivotPropertyContainer->AddChild(mPivotProperty);\n\n        // Size\n        auto sizePropertyContainer = mmake<Widget>();\n        sizePropertyContainer->name = \"size\";\n        sizePropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(sizePropertyContainer);\n\n        auto sizeIcon = o2UI.CreateImage(\"ui/UI4_icon_size.png\");\n        *sizeIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-1, 0));\n        sizePropertyContainer->AddChild(sizeIcon);\n\n        mSizeProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mSizeProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mSizeProperty->GetXProperty()->SetValuePath(\"transform/width\");\n        mSizeProperty->GetYProperty()->SetValuePath(\"transform/height\");\n        mSizeProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mSizeProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mSizeProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mSizeProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        sizePropertyContainer->AddChild(mSizeProperty);\n\n        // Scale\n        auto scalePropertyContainer = mmake<Widget>();\n        scalePropertyContainer->name = \"scale\";\n        scalePropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(scalePropertyContainer);\n\n        auto scaleIcon = o2UI.CreateImage(\"ui/UI4_scale_icon.png\");\n        *scaleIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        scalePropertyContainer->AddChild(scaleIcon);\n\n        mScaleProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mScaleProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mScaleProperty->GetXProperty()->SetValuePath(\"transform/scaleX\");\n        mScaleProperty->GetYProperty()->SetValuePath(\"transform/scaleY\");\n        mScaleProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mScaleProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mScaleProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mScaleProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        scalePropertyContainer->AddChild(mScaleProperty);\n\n        // Rotation\n        auto rotationAndShearPropertyContainer = mmake<Widget>();\n        rotationAndShearPropertyContainer->name = \"rotation and depth\";\n        rotationAndShearPropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(rotationAndShearPropertyContainer);\n\n        auto rotateIcon = o2UI.CreateImage(\"ui/UI4_rotate_icon.png\");\n        *rotateIcon->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0.0f, 1.0f), Vec2F(0, 0), Vec2F(20, 0));\n        rotationAndShearPropertyContainer->AddChild(rotateIcon);\n\n        mRotationProperty = o2UI.CreateWidget<FloatProperty>();\n        *mRotationProperty->layout = WidgetLayout(Vec2F(0, 0), Vec2F(0.5f, 1.0f), Vec2F(40, 0), Vec2F(10, 0));\n        mRotationProperty->SetValuePath(\"transform/angleDegree\");\n        mRotationProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mRotationProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        rotationAndShearPropertyContainer->AddChild(mRotationProperty);\n\n        // Shear\n        auto shearIcon = o2UI.CreateImage(\"ui/UI4_shear_icon.png\");\n        *shearIcon->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(0.5f, 1.0f), Vec2F(10, 0), Vec2F(30, 0));\n        rotationAndShearPropertyContainer->AddChild(shearIcon);\n\n        mShearProperty = o2UI.CreateWidget<FloatProperty>();\n        *mShearProperty->layout = WidgetLayout(Vec2F(0.5f, 0), Vec2F(1, 1.0f), Vec2F(30, 0), Vec2F());\n        mShearProperty->SetValuePath(\"drawDepth\");\n        mShearProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mShearProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        rotationAndShearPropertyContainer->AddChild(mShearProperty);\n\n        // Layout\n        mLayoutSpoiler = o2UI.CreateWidget<Spoiler>(\"expand with caption\");\n        mLayoutSpoiler->name = \"Layout\";\n        mLayoutSpoiler->caption = \"Layout\";\n        mLayoutSpoiler->spacing = 5;\n        mLayoutSpoiler->fitByChildren = true;\n        mLayoutSpoiler->expandWidth = true;\n        mLayoutSpoiler->expandHeight = false;\n        mSpoiler->AddChild(mLayoutSpoiler);\n\n        // Anchors\n        // Right top\n        auto rightTopAnchorPropertyContainer = mmake<Widget>();\n        rightTopAnchorPropertyContainer->name = \"right top anchor\";\n        rightTopAnchorPropertyContainer->layout->minHeight = 20;\n        mLayoutSpoiler->AddChild(rightTopAnchorPropertyContainer);\n\n        auto anchorIcon = o2UI.CreateImage(\"ui/UI4_icon_anchor.png\");\n        *anchorIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        rightTopAnchorPropertyContainer->AddChild(anchorIcon);\n\n        mAnchorRightTopProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mAnchorRightTopProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mAnchorRightTopProperty->GetChildByType<Label>(\"container/layout/properties/x label\")->text = \"R\";\n        mAnchorRightTopProperty->GetChildByType<Label>(\"container/layout/properties/y label\")->text = \"T\";\n        mAnchorRightTopProperty->GetXProperty()->SetValuePath(\"layout/anchorRight\");\n        mAnchorRightTopProperty->GetYProperty()->SetValuePath(\"layout/anchorTop\");\n        mAnchorRightTopProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mAnchorRightTopProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mAnchorRightTopProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mAnchorRightTopProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        rightTopAnchorPropertyContainer->AddChild(mAnchorRightTopProperty);\n\n        // Left bottom\n        auto leftBottomAnchorPropertyContainer = mmake<Widget>();\n        leftBottomAnchorPropertyContainer->name = \"left bottom anchor\";\n        leftBottomAnchorPropertyContainer->layout->minHeight = 20;\n        mLayoutSpoiler->AddChild(leftBottomAnchorPropertyContainer);\n\n        mAnchorLeftBottomProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mAnchorLeftBottomProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mAnchorLeftBottomProperty->GetChildByType<Label>(\"container/layout/properties/x label\")->text = \"L\";\n        mAnchorLeftBottomProperty->GetChildByType<Label>(\"container/layout/properties/y label\")->text = \"B\";\n        mAnchorLeftBottomProperty->GetXProperty()->SetValuePath(\"layout/anchorLeft\");\n        mAnchorLeftBottomProperty->GetYProperty()->SetValuePath(\"layout/anchorBottom\");\n        mAnchorLeftBottomProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mAnchorLeftBottomProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mAnchorLeftBottomProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mAnchorLeftBottomProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        leftBottomAnchorPropertyContainer->AddChild(mAnchorLeftBottomProperty);\n\n        // Offsets\n        // Right top\n        auto rightTopOffsetPropertyContainer = mmake<Widget>();\n        rightTopOffsetPropertyContainer->name = \"right top offset\";\n        rightTopOffsetPropertyContainer->layout->minHeight = 20;\n        mLayoutSpoiler->AddChild(rightTopOffsetPropertyContainer);\n\n        auto offsetIcon = o2UI.CreateImage(\"ui/UI4_icon_offsets.png\");\n        *offsetIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        rightTopOffsetPropertyContainer->AddChild(offsetIcon);\n\n        mOffsetRightTopProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mOffsetRightTopProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mOffsetRightTopProperty->GetChildByType<Label>(\"container/layout/properties/x label\")->text = \"R\";\n        mOffsetRightTopProperty->GetChildByType<Label>(\"container/layout/properties/y label\")->text = \"T\";\n        mOffsetRightTopProperty->GetXProperty()->SetValuePath(\"layout/offsetRight\");\n        mOffsetRightTopProperty->GetYProperty()->SetValuePath(\"layout/offsetTop\");\n        mOffsetRightTopProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mOffsetRightTopProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mOffsetRightTopProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mOffsetRightTopProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        rightTopOffsetPropertyContainer->AddChild(mOffsetRightTopProperty);\n\n        // Left bottom\n        auto leftBottomOffsetPropertyContainer = mmake<Widget>();\n        leftBottomOffsetPropertyContainer->name = \"left bottom offset\";\n        leftBottomOffsetPropertyContainer->layout->minHeight = 20;\n        mLayoutSpoiler->AddChild(leftBottomOffsetPropertyContainer);\n\n        mOffsetLeftBottomProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mOffsetLeftBottomProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mOffsetLeftBottomProperty->GetChildByType<Label>(\"container/layout/properties/x label\")->text = \"L\";\n        mOffsetLeftBottomProperty->GetChildByType<Label>(\"container/layout/properties/y label\")->text = \"B\";\n        mOffsetLeftBottomProperty->GetXProperty()->SetValuePath(\"layout/offsetLeft\");\n        mOffsetLeftBottomProperty->GetYProperty()->SetValuePath(\"layout/offsetBottom\");\n        mOffsetLeftBottomProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mOffsetLeftBottomProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mOffsetLeftBottomProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mOffsetLeftBottomProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        leftBottomOffsetPropertyContainer->AddChild(mOffsetLeftBottomProperty);\n\n        // Min size\n        auto minSizePropertyContainer = mmake<Widget>();\n        minSizePropertyContainer->name = \"right top anchor\";\n        minSizePropertyContainer->layout->minHeight = 20;\n        mLayoutSpoiler->AddChild(minSizePropertyContainer);\n\n        auto minSizeIcon = o2UI.CreateImage(\"ui/UI4_icon_min_size.png\");\n        *minSizeIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        minSizePropertyContainer->AddChild(minSizeIcon);\n\n        mMinSizeProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mMinSizeProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mMinSizeProperty->GetXProperty()->SetValuePath(\"layout/minWidth\");\n        mMinSizeProperty->GetYProperty()->SetValuePath(\"layout/minHeight\");\n        mMinSizeProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mMinSizeProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mMinSizeProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mMinSizeProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        minSizePropertyContainer->AddChild(mMinSizeProperty);\n\n        // Max size\n        auto maxSizePropertyContainer = mmake<Widget>();\n        maxSizePropertyContainer->name = \"right top anchor\";\n        maxSizePropertyContainer->layout->minHeight = 20;\n        mLayoutSpoiler->AddChild(maxSizePropertyContainer);\n\n        auto maxSizeIcon = o2UI.CreateImage(\"ui/UI4_icon_max_size.png\");\n        *maxSizeIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        maxSizePropertyContainer->AddChild(maxSizeIcon);\n\n        mMaxSizeProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mMaxSizeProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mMaxSizeProperty->GetXProperty()->SetValuePath(\"layout/maxWidth\");\n        mMaxSizeProperty->GetYProperty()->SetValuePath(\"layout/maxHeight\");\n        mMaxSizeProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mMaxSizeProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mMaxSizeProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mMaxSizeProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        maxSizePropertyContainer->AddChild(mMaxSizeProperty);\n\n        // Weight\n        auto weightPropertyContainer = mmake<Widget>();\n        weightPropertyContainer->name = \"right top anchor\";\n        weightPropertyContainer->layout->minHeight = 20;\n        mLayoutSpoiler->AddChild(weightPropertyContainer);\n\n        auto weightIcon = o2UI.CreateImage(\"ui/UI4_icon_weight.png\");\n        *weightIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        weightPropertyContainer->AddChild(weightIcon);\n\n        mWeightProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mWeightProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mWeightProperty->GetXProperty()->SetValuePath(\"layout/widthWeight\");\n        mWeightProperty->GetYProperty()->SetValuePath(\"layout/heightWeight\");\n        mWeightProperty->GetXProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mWeightProperty->GetYProperty()->onChanged = THIS_FUNC(OnPropertyChanged);\n        mWeightProperty->GetXProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mWeightProperty->GetYProperty()->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        weightPropertyContainer->AddChild(mWeightProperty);\n\n        mAllProperties = { \n            mPositionProperty->GetXProperty(),\n            mPositionProperty->GetYProperty(),\n            mPivotProperty->GetXProperty(),\n            mPivotProperty->GetYProperty(),\n            mScaleProperty->GetXProperty(),\n            mScaleProperty->GetYProperty(),\n            mSizeProperty->GetXProperty(),\n            mSizeProperty->GetYProperty(),\n            mRotationProperty,\n            mShearProperty,\n            mAnchorRightTopProperty->GetXProperty(),\n            mAnchorRightTopProperty->GetYProperty(),\n            mAnchorLeftBottomProperty->GetXProperty(),\n            mAnchorLeftBottomProperty->GetYProperty(),\n            mOffsetRightTopProperty->GetXProperty(),\n            mOffsetRightTopProperty->GetYProperty(),\n            mOffsetLeftBottomProperty->GetXProperty(),\n            mOffsetLeftBottomProperty->GetYProperty(),\n            mMinSizeProperty->GetXProperty(),\n            mMinSizeProperty->GetYProperty(),\n            mMaxSizeProperty->GetXProperty(),\n            mMaxSizeProperty->GetYProperty(),\n            mWeightProperty->GetXProperty(),\n            mWeightProperty->GetYProperty(),\n        };\n    }\n\n    DefaultActorTransformViewer::~DefaultActorTransformViewer()\n    {}\n\n    void DefaultActorTransformViewer::SetTargetActors(const Vector<Actor*>& actors)\n    {\n        mTargetActors = actors;\n\n        auto prototypes = actors.Convert<Actor*>([](Actor* x) { return x->GetPrototypeLink().Get(); });\n\n\n        mPositionProperty->GetXProperty()->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::positionX)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->positionX; });\n\n        mPositionProperty->GetYProperty()->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::positionY)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->positionY; });\n\n        mPivotProperty->GetXProperty()->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::pivotX)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->pivotX; });\n\n        mPivotProperty->GetYProperty()->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::pivotY)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->pivotY; });\n\n        mScaleProperty->GetXProperty()->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::scaleX)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->scaleX; });\n\n        mScaleProperty->GetYProperty()->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::scaleY)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->scaleY; });\n\n        mSizeProperty->GetXProperty()->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::width)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->width; });\n\n        mSizeProperty->GetYProperty()->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::height)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->height; });\n\n        mRotationProperty->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::angleDegrees)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->angleDegrees; });\n\n        mShearProperty->SelectValueAndPrototypeProperties<Actor, decltype(ActorTransform::shear)>(\n            actors, prototypes, [](Actor* x) { return &x->transform->shear; });\n\n        Vector<Widget*> targetWidgets = mTargetActors\n            .FindAll([](Actor* x) { return dynamic_cast<Widget*>(x) != nullptr; })\n            .Convert<Widget*>([](Actor* x) { return dynamic_cast<Widget*>(x); });\n\n        mLayoutEnabled = !targetWidgets.IsEmpty();\n        mLayoutSpoiler->enabled = mLayoutEnabled;\n\n        if (mLayoutEnabled)\n        {\n            auto widgetPrototypes = targetWidgets.Convert<Widget*>(\n                [](Actor* x) { return dynamic_cast<Widget*>(x->GetPrototypeLink().Get()); });\n\n            mAnchorRightTopProperty->GetXProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::anchorRight)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->anchorRight; });\n\n            mAnchorRightTopProperty->GetYProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::anchorTop)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->anchorTop; });\n\n            mAnchorLeftBottomProperty->GetXProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::anchorLeft)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->anchorLeft; });\n\n            mAnchorLeftBottomProperty->GetYProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::anchorBottom)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->anchorBottom; });\n\n            mOffsetRightTopProperty->GetXProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::offsetRight)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->offsetRight; });\n\n            mOffsetRightTopProperty->GetYProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::offsetTop)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->offsetTop; });\n\n            mOffsetLeftBottomProperty->GetXProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::offsetLeft)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->offsetLeft; });\n\n            mOffsetLeftBottomProperty->GetYProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::offsetBottom)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->offsetBottom; });\n\n            mMinSizeProperty->GetXProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::minWidth)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->minWidth; });\n\n            mMinSizeProperty->GetYProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::minHeight)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->minHeight; });\n\n            mMaxSizeProperty->GetXProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::maxWidth)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->maxWidth; });\n\n            mMaxSizeProperty->GetYProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::maxHeight)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->maxHeight; });\n\n            mWeightProperty->GetXProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::widthWeight)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->widthWeight; });\n\n            mWeightProperty->GetYProperty()->SelectValueAndPrototypeProperties<Widget, decltype(WidgetLayout::heightWeight)>(\n                targetWidgets, widgetPrototypes, [](Widget* x) { return &x->layout->heightWeight; });\n        }\n    }\n\n    void DefaultActorTransformViewer::Refresh()\n    {\n        for (auto& property : mAllProperties)\n            property->Refresh();\n    }\n\n    void DefaultActorTransformViewer::OnPropertiesEnabled()\n    {\n        for (auto& property : mAllProperties)\n            property->SetPropertyEnabled(true);\n    }\n\n    void DefaultActorTransformViewer::OnPropertiesDisabled()\n    {\n        for (auto& property : mAllProperties)\n            property->SetPropertyEnabled(false);\n    }\n\n    void DefaultActorTransformViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        for (auto& actor : mTargetActors)\n            actor->UpdateSelfTransform();\n\n        IActorTransformViewer::OnPropertyChanged(field, byUser);\n    }\n\n    void DefaultActorTransformViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        IActorTransformViewer::OnPropertyChangeCompleted(path, before, after);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DefaultActorTransformViewer, Editor__DefaultActorTransformViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/DefaultActorTransformViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorTransformViewer.h\"\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(Vec2FProperty);\n    FORWARD_CLASS_REF(FloatProperty);\n\n    // -------------------------------------\n    // Default editor actor transform viewer\n    // -------------------------------------\n    class DefaultActorTransformViewer: public IActorTransformViewer\n    {\n    public:\n        // Default constructor. Initializes data widget\n        DefaultActorTransformViewer();\n\n        // Virtual destructor\n        ~DefaultActorTransformViewer();\n\n        // Sets target actors\n        void SetTargetActors(const Vector<Actor*>& actors) override;\n\n        // Updates properties values\n        void Refresh() override;\n\n        IOBJECT(DefaultActorTransformViewer);\n\n    protected:\n        Vector<Actor*> mTargetActors;\n\n        Ref<Vec2FProperty> mPositionProperty;\n        Ref<Vec2FProperty> mPivotProperty;\n        Ref<Vec2FProperty> mScaleProperty;\n        Ref<Vec2FProperty> mSizeProperty;\n        Ref<FloatProperty> mRotationProperty;\n        Ref<FloatProperty> mShearProperty;\n\n        bool               mLayoutEnabled = false;\n        Ref<Spoiler>       mLayoutSpoiler;\n        Ref<Vec2FProperty> mAnchorRightTopProperty;\n        Ref<Vec2FProperty> mAnchorLeftBottomProperty;\n        Ref<Vec2FProperty> mOffsetRightTopProperty;\n        Ref<Vec2FProperty> mOffsetLeftBottomProperty;\n        Ref<Vec2FProperty> mMinSizeProperty;\n        Ref<Vec2FProperty> mMaxSizeProperty;\n        Ref<Vec2FProperty> mWeightProperty;\n\n        Vector<Ref<IPropertyField>> mAllProperties;\n\n    protected:\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n        \n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DefaultActorTransformViewer)\n{\n    BASE_CLASS(Editor::IActorTransformViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DefaultActorTransformViewer)\n{\n    FIELD().PROTECTED().NAME(mTargetActors);\n    FIELD().PROTECTED().NAME(mPositionProperty);\n    FIELD().PROTECTED().NAME(mPivotProperty);\n    FIELD().PROTECTED().NAME(mScaleProperty);\n    FIELD().PROTECTED().NAME(mSizeProperty);\n    FIELD().PROTECTED().NAME(mRotationProperty);\n    FIELD().PROTECTED().NAME(mShearProperty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mLayoutEnabled);\n    FIELD().PROTECTED().NAME(mLayoutSpoiler);\n    FIELD().PROTECTED().NAME(mAnchorRightTopProperty);\n    FIELD().PROTECTED().NAME(mAnchorLeftBottomProperty);\n    FIELD().PROTECTED().NAME(mOffsetRightTopProperty);\n    FIELD().PROTECTED().NAME(mOffsetLeftBottomProperty);\n    FIELD().PROTECTED().NAME(mMinSizeProperty);\n    FIELD().PROTECTED().NAME(mMaxSizeProperty);\n    FIELD().PROTECTED().NAME(mWeightProperty);\n    FIELD().PROTECTED().NAME(mAllProperties);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DefaultActorTransformViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetActors, const Vector<Actor*>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorComponentViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IActorComponentViewer.h\"\n\n#include \"o2/Application/VKCodes.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/StringUtils.h\"\n#include \"o2/Utils/System/Clipboard.h\"\n#include \"o2/Utils/System/ShortcutKeys.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n\nnamespace Editor\n{\n    IActorComponentViewer::IActorComponentViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        mSpoiler = o2UI.CreateWidget<SpoilerWithHead>();\n\n        mSpoiler->expandHeight = false;\n        mSpoiler->expandWidth = true;\n        mSpoiler->fitByChildren = true;\n        mSpoiler->borderBottom = 5;\n        mSpoiler->SetCaption(\"Component\");\n        mSpoiler->GetIcon()->SetImageName(\"ui/UI4_component_icon.png\");\n        mSpoiler->GetIcon()->layout->center -= Vec2F(2, 0);\n        mSpoiler->GetIcon()->GetImage()->SetColor(Color4(235, 255, 253));\n\n        mRemoveButton = o2UI.CreateButton(\"\", THIS_FUNC(RemoveTargetComponents), \"close\");\n        *mRemoveButton->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(1, 0));\n        mSpoiler->AddInternalWidget(mRemoveButton);\n\n        mOptionsMenu = o2UI.CreateWidget<ContextMenu>(\"standard\");\n        mOptionsMenu->name = \"options context\";\n        mOptionsMenu->AddItem(\"Copy\", THIS_FUNC(CopyComponent));\n        mOptionsMenu->AddItem(\"Cut\", THIS_FUNC(CutComponent));\n        mOptionsMenu->AddItem(\"Paste\", THIS_FUNC(PasteComponent));\n        mSpoiler->AddInternalWidget(mOptionsMenu);\n\n        mOptionsButton = o2UI.CreateWidget<Button>(\"arrow\");\n        mOptionsButton->name = \"optionsButton\";\n        *mOptionsButton->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(-15, 0));\n        mOptionsButton->onClick = [this]() {\n            mOptionsMenu->Show(mOptionsButton->transform->worldCenter);\n        };\n        mSpoiler->AddInternalWidget(mOptionsButton);\n\n        mSpoiler->SetExpanded(true);\n    }\n\n    IActorComponentViewer::~IActorComponentViewer()\n    {}\n\n    void IActorComponentViewer::SetTargetComponents(const Vector<Ref<Component>>& components)\n    {\n        mTargetComponents = components;\n\n        if (!components.IsEmpty())\n        {\n            String caption = components[0]->GetType().InvokeStatic<String>(\"GetName\");\n            if (caption.IsEmpty())\n                caption = GetSmartName(components[0]->GetType().GetName());\n\n            mSpoiler->SetCaption(caption);\n            mSpoiler->GetIcon()->SetImageName(components[0]->GetType().InvokeStatic<String>(\"GetIcon\"));\n        }\n    }\n\n    Ref<Widget> IActorComponentViewer::GetWidget() const\n    {\n        return mSpoiler;\n    }\n\n    void IActorComponentViewer::Expand()\n    {\n        mSpoiler->Expand();\n    }\n\n    void IActorComponentViewer::Collapse()\n    {\n        mSpoiler->Collapse();\n    }\n\n    void IActorComponentViewer::Refresh()\n    {    }\n\n    void IActorComponentViewer::SetPropertiesEnabled(bool enabled)\n    {\n        if (mPropertiesEnabled == enabled)\n            return;\n\n        mPropertiesEnabled = enabled;\n\n        if (mPropertiesEnabled)\n            OnPropertiesEnabled();\n        else\n            OnPropertiesDisabled();\n    }\n\n    bool IActorComponentViewer::IsPropertiesEnabled() const\n    {\n        return mPropertiesEnabled;\n    }\n\n    void IActorComponentViewer::RemoveTargetComponents()\n    {\n        for (auto& comp : mTargetComponents)\n            comp->GetActor()->RemoveComponent(comp);\n\n        mTargetComponents.Clear();\n    }\n\n    void IActorComponentViewer::CopyComponent()\n    {\n        if (mTargetComponents.IsEmpty())\n            return;\n\n        DataDocument data;\n        data = mTargetComponents[0];\n\n        WString clipboardData = data.SaveAsString();\n        Clipboard::SetText(clipboardData);\n    }\n\n    void IActorComponentViewer::CutComponent()\n    {\n        if (mTargetComponents.IsEmpty())\n            return;\n\n        mOptionsMenu->Hide(true);\n\n        auto actor = mTargetComponents[0]->GetActor();\n        CopyComponent();\n        RemoveTargetComponents();\n    }\n\n    void IActorComponentViewer::PasteComponent()\n    {\n        if (mTargetComponents.IsEmpty())\n            return;\n\n        WString clipboardData = Clipboard::GetText();\n        if (clipboardData.IsEmpty())\n            return;\n\n        DataDocument data;\n        if (!data.LoadFromData(clipboardData))\n            return;\n\n        ForcePopEditorScopeOnStack scope;\n\n        Vector<IObject*> targets;\n        for (auto& comp : mTargetComponents)\n        {\n            auto actor = comp->GetActor();\n            DataDocument componentData = data;\n            Ref<Component> component = componentData;\n            actor->AddComponent(component);\n            component->OnAddedFromEditor();\n            targets.Add((IObject*)actor.Get());\n        }\n\n        o2EditorPropertiesWindow.SetTargets(targets);\n    }\n    void IActorComponentViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onPropertyChanged(field, byUser);\n    }\n\n    void IActorComponentViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                                          const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(path, before, after);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IActorComponentViewer, Editor__IActorComponentViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorComponentViewer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Actor;\n    class Button;\n    class Component;\n    class ContextMenu;\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SpoilerWithHead);\n\n    // ---------------------------------------\n    // Editor actor component viewer interface\n    // ---------------------------------------\n    class IActorComponentViewer: public IObject, virtual public RefCounterable\n    {\n    public:\n        typedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnPropertyChangedFunc;\n        typedef Function<void(const String& path, const Vector<DataDocument>& before, \n                               const Vector<DataDocument>& after)> OnPropertyChangeCompletedFunc;\n\n        OnPropertyChangedFunc         onPropertyChanged;         // Called when property changed\n        OnPropertyChangeCompletedFunc onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Default constructor. Initializes data widget\n        IActorComponentViewer();\n\n        // Virtual destructor\n        virtual ~IActorComponentViewer();\n\n        // Sets target actors\n        virtual void SetTargetComponents(const Vector<Ref<Component>>& components);\n\n        // Returns viewing component type \n        virtual const Type* GetComponentType() const { return nullptr; }\n\n        // Returns data widget\n        virtual Ref<Widget> GetWidget() const;\n\n        // Expands view\n        void Expand();\n\n        // Collapse view\n        void Collapse();\n\n        // Updates all component values\n        virtual void Refresh();\n\n        // Sets viewer enabled\n        void SetPropertiesEnabled(bool enabled);\n\n        // Returns is viewer enabled\n        bool IsPropertiesEnabled() const;\n\n        IOBJECT(IActorComponentViewer);\n\n    protected:\n        Vector<Ref<Component>> mTargetComponents; // Target components\n\n        Ref<SpoilerWithHead> mSpoiler;       // Component's spoiler\n        Ref<Button>          mRemoveButton;  // Remove component button\n        Ref<Button>          mOptionsButton; // Options button with dropdown menu\n        Ref<ContextMenu>     mOptionsMenu;   // Options dropdown menu\n\n        bool mPropertiesEnabled = false; // Is viewer enabled \n\n    protected:\n        // Removes target components\n        void RemoveTargetComponents();\n\n        // Copies current component to clipboard\n        void CopyComponent();\n\n        // Cuts current component (copy + remove)\n        void CutComponent();\n\n        // Pastes component from clipboard to same actor\n        void PasteComponent();\n\n        // Enable viewer event function\n        virtual void OnPropertiesEnabled() {}\n\n        // Disable viewer event function\n        virtual void OnPropertiesDisabled() {}\n\n        // Called when some property changed\n        virtual void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        virtual void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n\n        friend class ActorViewer;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IActorComponentViewer)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IActorComponentViewer)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().NAME(mTargetComponents);\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().NAME(mRemoveButton);\n    FIELD().PROTECTED().NAME(mOptionsButton);\n    FIELD().PROTECTED().NAME(mOptionsMenu);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertiesEnabled);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IActorComponentViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetComponents, const Vector<Ref<Component>>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetComponentType);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPropertiesEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveTargetComponents);\n    FUNCTION().PROTECTED().SIGNATURE(void, CopyComponent);\n    FUNCTION().PROTECTED().SIGNATURE(void, CutComponent);\n    FUNCTION().PROTECTED().SIGNATURE(void, PasteComponent);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorHeaderViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IActorHeaderViewer.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n\nnamespace Editor\n{\n    void IActorHeaderViewer::SetPropertiesEnabled(bool enabled)\n    {\n        if (mPropertiesEnabled == enabled)\n            return;\n\n        mPropertiesEnabled = enabled;\n\n        if (mPropertiesEnabled)\n            OnPropertiesEnabled();\n        else\n            OnPropertiesDisabled();\n    }\n\n    bool IActorHeaderViewer::IsPropertiesEnabled() const\n    {\n        return mPropertiesEnabled;\n    }\n\n    void IActorHeaderViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onPropertyChanged(field, byUser);\n    }\n\n    void IActorHeaderViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(path, before, after);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IActorHeaderViewer, Editor__IActorHeaderViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorHeaderViewer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Actor;\n    class Widget;\n}\n\nnamespace Editor\n{\n    // ------------------------------------\n    // Editor actor header viewer interface\n    // ------------------------------------\n    class IActorHeaderViewer: public IObject, virtual public RefCounterable\n    {\n    public:\n        typedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnPropertyChangedFunc;\n        typedef Function<void(const String& path, const Vector<DataDocument>& before, \n                               const Vector<DataDocument>& after)> OnPropertyChangeCompletedFunc;\n\n        OnPropertyChangedFunc         onPropertyChanged;         // Called when property changed\n        OnPropertyChangeCompletedFunc onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Virtual destructor\n        virtual ~IActorHeaderViewer() {}\n\n        // Sets target actors\n        virtual void SetTargetActors(const Vector<Actor*>& actors) {}\n\n        // Returns data widget\n        virtual Ref<Widget> GetWidget() const { return nullptr; }\n\n        // Updates properties values\n        virtual void Refresh() {}\n\n        // Sets viewer enabled\n        void SetPropertiesEnabled(bool enabled);\n\n        // Returns is viewer enabled\n        bool IsPropertiesEnabled() const;\n\n        IOBJECT(IActorHeaderViewer);\n\n    protected:\n        bool mPropertiesEnabled = false; // Is viewer enabled \n\n    protected:\n        // Enable viewer event function\n        virtual void OnPropertiesEnabled() {}\n\n        // Disable viewer event function\n        virtual void OnPropertiesDisabled() {}\n\n        // Called when some property changed\n        virtual void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        virtual void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n\n        friend class ActorViewer;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IActorHeaderViewer)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IActorHeaderViewer)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertiesEnabled);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IActorHeaderViewer)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetActors, const Vector<Actor*>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPropertiesEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorPropertiesViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IActorPropertiesViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n\nnamespace Editor\n{\n    IActorPropertiesViewer::IActorPropertiesViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        mSpoiler = o2UI.CreateWidget<SpoilerWithHead>();\n\n        mSpoiler->expandHeight = false;\n        mSpoiler->expandWidth = true;\n        mSpoiler->fitByChildren = true;\n        mSpoiler->borderBottom = 5;\n        mSpoiler->SetCaption(\"Transform\");\n        mSpoiler->GetIcon()->SetImageName(\"ui/UI4_component_icon.png\");\n        mSpoiler->GetIcon()->layout->center -= Vec2F(2, 0);\n\n        mSpoiler->SetExpanded(true);\n    }\n\n    IActorPropertiesViewer::~IActorPropertiesViewer()\n    {}\n\n    Ref<Widget> IActorPropertiesViewer::GetWidget() const\n    {\n        return mSpoiler;\n    }\n\n    void IActorPropertiesViewer::Expand()\n    {\n        mSpoiler->Expand();\n    }\n\n    void IActorPropertiesViewer::Collapse()\n    {\n        mSpoiler->Collapse();\n    }\n\n    void IActorPropertiesViewer::Refresh()\n    {}\n\n    bool IActorPropertiesViewer::IsEmpty() const\n    {\n        return true;\n    }\n\n    void IActorPropertiesViewer::SetPropertiesEnabled(bool enabled)\n    {\n        if (mPropertiesEnabled == enabled)\n            return;\n\n        mPropertiesEnabled = enabled;\n\n        if (mPropertiesEnabled)\n            OnPropertiesEnabled();\n        else\n            OnPropertiesDisabled();\n    }\n\n    bool IActorPropertiesViewer::IsPropertiesEnabled() const\n    {\n        return mPropertiesEnabled;\n    }\n\n    void IActorPropertiesViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onPropertyChanged(field, byUser);\n    }\n\n    void IActorPropertiesViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(path, before, after);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IActorPropertiesViewer, Editor__IActorPropertiesViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorPropertiesViewer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Actor;\n    class Component;\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SpoilerWithHead);\n\n    // ----------------------------------------\n    // Editor actor properties viewer interface\n    // ----------------------------------------\n    class IActorPropertiesViewer: public IObject, virtual public RefCounterable\n    {\n    public:\n        typedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnPropertyChangedFunc;\n        typedef Function<void(const String& path, const Vector<DataDocument>& before, \n                               const Vector<DataDocument>& after)> OnPropertyChangeCompletedFunc;\n\n        OnPropertyChangedFunc         onPropertyChanged;         // Called when property changed\n        OnPropertyChangeCompletedFunc onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Default constructor. Initializes data widget\n        IActorPropertiesViewer();\n\n        // Virtual destructor\n        virtual ~IActorPropertiesViewer();\n\n        // Sets target actors\n        virtual void SetTargetActors(const Vector<Actor*>& actors) {}\n\n        // Returns viewing actor type \n        virtual const Type* GetActorType() const { return nullptr; }\n\n        // Returns data widget\n        virtual Ref<Widget> GetWidget() const;\n\n        // Expands view\n        void Expand();\n\n        // Collapse view\n        void Collapse();\n\n        // Updates all actor values\n        virtual void Refresh();\n\n        // Returns is there no properties\n        virtual bool IsEmpty() const;\n\n        // Sets viewer enabled\n        void SetPropertiesEnabled(bool enabled);\n\n        // Returns is viewer enabled\n        bool IsPropertiesEnabled() const;\n\n        IOBJECT(IActorPropertiesViewer);\n\n    protected:\n        Ref<SpoilerWithHead> mSpoiler;\n\n        bool mPropertiesEnabled = false; // Is viewer enabled \n\n    protected:\n        // Enable viewer event function\n        virtual void OnPropertiesEnabled() {}\n\n        // Disable viewer event function\n        virtual void OnPropertiesDisabled() {}\n\n        // Called when some property changed\n        virtual void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        virtual void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n\n        friend class ActorViewer;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IActorPropertiesViewer)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IActorPropertiesViewer)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertiesEnabled);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IActorPropertiesViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetActors, const Vector<Actor*>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetActorType);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEmpty);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPropertiesEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorTransformViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IActorTransformViewer.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n\nnamespace Editor\n{\n    IActorTransformViewer::IActorTransformViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        mSpoiler = o2UI.CreateWidget<SpoilerWithHead>();\n\n        mSpoiler->borderBottom = 5;\n        mSpoiler->SetCaption(\"Transform\");\n        mSpoiler->GetIcon()->SetImageName(\"ui/UI4_transform_icon_white.png\");\n\n        mSpoiler->SetExpanded(true);\n    }\n\n    IActorTransformViewer::~IActorTransformViewer()\n    {}\n\n    Ref<Widget> IActorTransformViewer::GetWidget() const\n    {\n        return mSpoiler;\n    }\n\n    void IActorTransformViewer::Expand()\n    {\n        mSpoiler->Expand();\n    }\n\n    void IActorTransformViewer::Collapse()\n    {\n        mSpoiler->Collapse();\n    }\n\n    void IActorTransformViewer::Refresh()\n    {}\n\n    void IActorTransformViewer::SetPropertiesEnabled(bool enabled)\n    {\n        if (mPropertiesEnabled == enabled)\n            return;\n\n        mPropertiesEnabled = enabled;\n\n        if (mPropertiesEnabled)\n            OnPropertiesEnabled();\n        else\n            OnPropertiesDisabled();\n    }\n\n    bool IActorTransformViewer::IsPropertiesEnabled() const\n    {\n        return mPropertiesEnabled;\n    }\n\n    void IActorTransformViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onPropertyChanged(field, byUser);\n    }\n\n    void IActorTransformViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                                          const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(path, before, after);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IActorTransformViewer, Editor__IActorTransformViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/ActorsViewer/IActorTransformViewer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Actor;\n    class Component;\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SpoilerWithHead);\n\n    // ---------------------------------------\n    // Editor actor transform viewer interface\n    // ---------------------------------------\n    class IActorTransformViewer: public IObject, virtual public RefCounterable\n    {\n    public:\n        typedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnPropertyChangedFunc;\n        typedef Function<void(const String& path, const Vector<DataDocument>& before, \n                               const Vector<DataDocument>& after)> OnPropertyChangeCompletedFunc;\n\n        OnPropertyChangedFunc         onPropertyChanged;         // Called when property changed\n        OnPropertyChangeCompletedFunc onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Default constructor. Initializes data widget\n        IActorTransformViewer();\n\n        // Virtual destructor\n        virtual ~IActorTransformViewer();\n\n        // Sets target actors\n        virtual void SetTargetActors(const Vector<Actor*>& actors) {}\n\n        // Returns data widget\n        virtual Ref<Widget> GetWidget() const;\n\n        // Expands view\n        void Expand();\n\n        // Collapse view\n        void Collapse();\n\n        // Updates properties values\n        virtual void Refresh();\n\n        // Sets viewer enabled\n        void SetPropertiesEnabled(bool enabled);\n\n        // Returns is viewer enabled\n        bool IsPropertiesEnabled() const;\n\n        IOBJECT(IActorTransformViewer);\n\n    protected:\n        Ref<SpoilerWithHead> mSpoiler;\n\n        bool mPropertiesEnabled = false; // Is viewer enabled \n\n    protected:\n        // Enable viewer event function\n        virtual void OnPropertiesEnabled() {}\n\n        // Disable viewer event function\n        virtual void OnPropertiesDisabled() {}\n\n        // Called when some property changed\n        virtual void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        virtual void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n\n        friend class ActorViewer;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IActorTransformViewer)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IActorTransformViewer)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertiesEnabled);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IActorTransformViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetActors, const Vector<Actor*>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPropertiesEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/AssetPropertiesViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"AssetPropertiesViewer.h\"\n\n#include \"o2Editor/Properties/ObjectViewer.h\"\n\nnamespace Editor\n{\n\n    AssetPropertiesViewer::AssetPropertiesViewer()\n    {\n        mAssetHeader = mmake<Widget>();\n        *mAssetHeader->layout = WidgetLayout::HorStretch(VerAlign::Top, 5, 5, 25, 5);\n\n        mAssetNameLabel = o2UI.CreateLabel(\"asset path\");\n        *mAssetNameLabel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 55, 20);\n        mAssetNameLabel->horAlign = HorAlign::Left;\n        mAssetHeader->AddChild(mAssetNameLabel);\n\n        mSaveButton = o2UI.CreateButton(\"Save\");\n        *mSaveButton->layout = WidgetLayout::Based(BaseCorner::RightBottom, Vec2F(50, 17), Vec2F(0, 6));\n        mSaveButton->onClick = THIS_FUNC(OnSavePressed);\n        mAssetHeader->AddChild(mSaveButton);\n\n        auto separatorImg = o2UI.CreateImage(\"ui/UI4_Separator.png\");\n        *separatorImg->layout = WidgetLayout::HorStretch(VerAlign::Bottom, -6, -15, 5, -4);\n        mAssetHeader->AddChild(separatorImg);\n\n        mContentWidget->AddChild(mAssetHeader, 0);\n        *mViewer->layout = WidgetLayout::BothStretch(5, 0, 5, 35);\n    }\n\n    const Type* AssetPropertiesViewer::GetViewingObjectType() const\n    {\n        return &TypeOf(Asset);\n    }\n\n    void AssetPropertiesViewer::SetTargets(const Vector<IObject*>& targets)\n    {\n        DefaultPropertiesViewer::SetTargets(targets);\n\n        if (targets.Count() == 1)\n        {\n            if (Asset* asset = dynamic_cast<Asset*>(targets[0]))\n                mAssetNameLabel->text = asset->GetPath();\n        }\n        else\n        {\n            mAssetNameLabel->text = \"Multiple assets selected\";\n        }\n    }\n\n    void AssetPropertiesViewer::OnSavePressed()\n    {\n        for (IObject* target : mTargets)\n        {\n            if (Asset* asset = dynamic_cast<Asset*>(target))\n                asset->Save();\n        }\n\n        o2Assets.RebuildAssets();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::AssetPropertiesViewer, Editor__AssetPropertiesViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/AssetPropertiesViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Windows/PropertiesWindow/DefaultPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Label;\n    class Button;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(DefaultObjectPropertiesViewer);\n\n    // -------------------------\n    // Default properties viewer\n    // -------------------------\n    class AssetPropertiesViewer : public DefaultPropertiesViewer\n    {\n    public:\n        // Default constructor, creates asset header controls\n        AssetPropertiesViewer();\n\n        // Returns viewing object type\n        const Type* GetViewingObjectType() const override;\n\n        IOBJECT(AssetPropertiesViewer);\n\n    protected:\n        Ref<Widget> mAssetHeader;    // Asset header\n        Ref<Label>  mAssetNameLabel; // Asset name label\n        Ref<Button> mSaveButton;     // Save asset button\n\n    protected:\n        // Sets target objects\n        void SetTargets(const Vector<IObject*>& targets) override;\n\n        // Called when save button is pressed\n        void OnSavePressed();\n    };\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::AssetPropertiesViewer)\n{\n    BASE_CLASS(Editor::DefaultPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::AssetPropertiesViewer)\n{\n    FIELD().PROTECTED().NAME(mAssetHeader);\n    FIELD().PROTECTED().NAME(mAssetNameLabel);\n    FIELD().PROTECTED().NAME(mSaveButton);\n}\nEND_META;\nCLASS_METHODS_META(Editor::AssetPropertiesViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetTargets, const Vector<IObject*>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSavePressed);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/DefaultPropertiesViewer.cpp",
    "content": "#include \"o2Editor/Windows/PropertiesWindow/IPropertiesViewer.h\"\n#include \"o2Editor/stdafx.h\"\n#include \"DefaultPropertiesViewer.h\"\n\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Properties/ObjectViewer.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nnamespace Editor\n{\n    DefaultPropertiesViewer::DefaultPropertiesViewer()\n    {\n        auto scrollArea = o2UI.CreateScrollArea(\"backless\");\n        *scrollArea->layout = WidgetLayout::BothStretch(0, 0, 15, 0);\n        scrollArea->SetViewLayout(Layout::BothStretch());\n        scrollArea->SetClippingLayout(Layout::BothStretch());\n        scrollArea->name = \"scroll area\";\n        mContentWidget = scrollArea;\n\n        using thisclass = DefaultPropertiesViewer;\n\n        mViewer = mmake<ObjectViewer>();\n        *mViewer->layout = WidgetLayout::BothStretch(5, 0, 5, 5);\n        mViewer->onPropertyChanged = THIS_FUNC(OnPropertyChanged);\n        mViewer->onPropertyChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mContentWidget->AddChild(mViewer);\n    }\n\n    DefaultPropertiesViewer::~DefaultPropertiesViewer()\n    {}\n\n    void DefaultPropertiesViewer::Refresh()\n    {\n        if (mTargets.IsEmpty())\n            return;\n\n        mViewer->Refresh(mTargets);\n    }\n\n    void DefaultPropertiesViewer::SetTargets(const Vector<IObject*>& targets)\n\t{\n\t\tIPropertiesViewer::SetTargets(targets);\n        Refresh();\n    }\n\n    void DefaultPropertiesViewer::OnPropertiesEnabled()\n    {\n        if (mViewer)\n            mViewer->OnPropertiesEnabled();\n    }\n\n    void DefaultPropertiesViewer::OnPropertiesDisabled()\n    {\n        if (mViewer)\n            mViewer->OnPropertiesDisabled();\n    }\n\n    void DefaultPropertiesViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        IPropertiesViewer::OnPropertyChanged(field, byUser);\n    }\n\n    void DefaultPropertiesViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        IPropertiesViewer::OnPropertyChangeCompleted(path, before, after);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DefaultPropertiesViewer, Editor__DefaultPropertiesViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/DefaultPropertiesViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Windows/PropertiesWindow/IPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(ObjectViewer);\n\n    // -------------------------\n    // Default properties viewer\n    // -------------------------\n    class DefaultPropertiesViewer : public IPropertiesViewer\n    {\n    public:\n        DefaultPropertiesViewer();\n\n        // Virtual destructor\n        ~DefaultPropertiesViewer();\n\n        // Updates properties values\n        void Refresh() override;\n\n        IOBJECT(DefaultPropertiesViewer);\n\n    protected:\n        Ref<ObjectViewer> mViewer; // Object viewer\n\n    protected:\n        // Sets target objects\n        void SetTargets(const Vector<IObject*>& targets) override;\n\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n    };\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DefaultPropertiesViewer)\n{\n    BASE_CLASS(Editor::IPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DefaultPropertiesViewer)\n{\n    FIELD().PROTECTED().NAME(mViewer);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DefaultPropertiesViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetTargets, const Vector<IObject*>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/IPropertiesViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IPropertiesViewer.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n\nnamespace Editor\n{\n    IPropertiesViewer::IPropertiesViewer()\n    {}\n\n    IPropertiesViewer::IPropertiesViewer(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {}\n\n    IPropertiesViewer::~IPropertiesViewer()\n    {}\n\n    const Type* IPropertiesViewer::GetViewingObjectType() const\n    {\n        return nullptr;\n    }\n\n    void IPropertiesViewer::SetTargets(const Vector<IObject*>& targets)\n    {\n        mTargets = targets;\n    }\n\n    void IPropertiesViewer::Refresh()\n    {}\n\n    void IPropertiesViewer::SetPropertiesEnabled(bool enabled)\n    {\n        if (mPropertiesEnabled == enabled)\n            return;\n\n        mPropertiesEnabled = enabled;\n\n        if (mPropertiesEnabled)\n            OnPropertiesEnabled();\n        else\n            OnPropertiesDisabled();\n    }\n\n    bool IPropertiesViewer::IsEnabled() const\n    {\n        return mPropertiesEnabled;\n    }\n\n    void IPropertiesViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onPropertyChanged(mTargets, field, byUser);\n    }\n\n    void IPropertiesViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                                     const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(mTargets, path, before, after);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IPropertiesViewer, Editor__IPropertiesViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/IPropertiesViewer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n}\n\nnamespace Editor\n{\n    // ----------------------------------\n    // Object properties viewer interface\n    // ----------------------------------\n    class IPropertiesViewer: public IObject, public RefCounterable\n    {\n    public:\n        typedef Function<void(const Vector<IObject*>& targets, const Ref<IPropertyField>& field, bool byUser)> OnPropertyChangedFunc;\n        typedef Function<void(const Vector<IObject*>& targets, const String& path, \n                              const Vector<DataDocument>& before, const Vector<DataDocument>& after)> OnPropertyChangeCompletedFunc;\n\n        OnPropertyChangedFunc         onPropertyChanged;         // Called when property changed\n        OnPropertyChangeCompletedFunc onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Default constructor\n        IPropertiesViewer();\n\n        // Default constructor\n        IPropertiesViewer(RefCounter* refCounter);\n\n        // Virtual destructor\n        virtual ~IPropertiesViewer();\n\n        // Returns viewing object type\n        virtual const Type* GetViewingObjectType() const;\n\n        // Sets target objects\n        virtual void SetTargets(const Vector<IObject*>& targets);\n\n        // Refreshes viewing properties\n        virtual void Refresh();\n\n        // Sets viewer enabled\n        void SetPropertiesEnabled(bool enabled);\n\n        // Returns is viewer enabled\n        bool IsEnabled() const;\n\n        IOBJECT(IPropertiesViewer);\n\n    protected:\n        Ref<Widget> mContentWidget; // Data content widget (turning on/off on enabling/disabling)\n        \n        Vector<IObject*> mTargets; // Viewing targets\n\n        bool mPropertiesEnabled = false; // Is viewer enabled\n\n    protected:\n        // Enable viewer event function\n        virtual void OnPropertiesEnabled() {}\n\n        // Disable viewer event function\n        virtual void OnPropertiesDisabled() {}\n\n        // Updates viewer\n        virtual void Update(float dt) {}\n\n        // Draws something\n        virtual void Draw() {}\n\n        // Called when some property changed\n        virtual void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        virtual void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                               const Vector<DataDocument>& after);\n\n        friend class PropertiesWindow;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IPropertiesViewer)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IPropertiesViewer)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().NAME(mContentWidget);\n    FIELD().PROTECTED().NAME(mTargets);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertiesEnabled);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IPropertiesViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargets, const Vector<IObject*>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPropertiesEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, Update, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, Draw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/PropertiesWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"PropertiesWindow.h\"\n\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2Editor/Actions/ActionsList.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/PropertiesWindow/DefaultPropertiesViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/IPropertiesViewer.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n\nDECLARE_SINGLETON(Editor::PropertiesWindow);\n\nnamespace Editor\n{\n    PropertiesWindow::PropertiesWindow(RefCounter* refCounter):\n        IEditorWindow(refCounter), Singleton<PropertiesWindow>(refCounter), mCurrentViewer(nullptr)\n    {\n        InitializeWindow();\n        InitializeViewers();\n    }\n\n    PropertiesWindow::~PropertiesWindow()\n    {\n        if (mCurrentViewer)\n            mCurrentViewer->SetPropertiesEnabled(false);\n    }\n\n    void PropertiesWindow::ResetTargets()\n    {\n        SetTarget(nullptr);\n    }\n\n    void PropertiesWindow::InitializeWindow()\n    {\n        mWindow->caption = \"Properties\";\n        mWindow->name = \"properties window\";\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_gear_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-1, 2)));\n        mWindow->SetViewLayout(Layout::BothStretch(-2, 0, 0, 18));\n        mWindow->SetClippingLayout(Layout::BothStretch(-1, -2, 0, 15));\n\n\t\tmWindow->onFocused += THIS_FUNC(OnFocusedWindow);\n\n        InitializeWindowContext();\n    }\n\n    void PropertiesWindow::InitializeWindowContext()\n    {\n        auto context = mWindow->GetOptionsMenu();\n        if (!context)\n        {\n            o2Debug.LogError(\"Failed to initialize properties window context menu: not found menu on window\");\n            return;\n        }\n\n        context->AddItem(ContextMenu::Item::Separator());\n        context->AddItem(mmake<ContextMenu::Item>(\"Private visible\", false, THIS_FUNC(OnPrivateFieldsVisibleChanged)));\n    }\n\n    void PropertiesWindow::InitializeViewers()\n    {\n        auto viewersTypes = TypeOf(IPropertiesViewer).GetDerivedTypes();\n        viewersTypes.Remove(&TypeOf(DefaultPropertiesViewer));\n\n        for (auto& type : viewersTypes)\n            mViewers.Add(DynamicCast<IPropertiesViewer>(type->CreateSampleRef()));\n\n        mDefaultViewer = mmake<DefaultPropertiesViewer>();\n    }\n\n    void PropertiesWindow::OnPrivateFieldsVisibleChanged(bool visible)\n    {\n        o2EditorProperties.SetPrivateFieldsVisible(visible);\n\n        if (mCurrentViewer)\n            mCurrentViewer->SetTargets(mTargets);\n    }\n\n    void PropertiesWindow::OnPropertyChanged(const Vector<IObject*>& targets, const Ref<IPropertyField>& field, bool byUser)\n    {\n        mTargetsChanged = true;\n\n        onPropertyChanged(targets, field, byUser);\n    }\n\n    void PropertiesWindow::OnPropertyChangeCompleted(const Vector<IObject*>& targets, const String& path, const Vector<DataDocument>& before, \n                                                     const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(targets, path, before, after);\n\n        o2EditorSceneWindow.DoneActorPropertyChangeAction(path, before, after);\n    }\n\n\tvoid PropertiesWindow::OnFocusedWindow()\n\t{\n\t\to2EditorTree.OnSceneFocused();\n\t}\n\n\tvoid PropertiesWindow::SetTarget(IObject* target)\n    {\n        if (target == nullptr)\n            SetTargets(Vector<IObject*>());\n        else\n            SetTargets({ target });\n    }\n\n    void PropertiesWindow::SetTargets(const Vector<IObject*>& targets, const Function<void()>& targetsChangedDelegate /*= Function<void()>()*/)\n    {\n        if (mTargetsChanged)\n            mOnTargetsChangedDelegate();\n\n        Ref<IPropertiesViewer> objectViewer;\n        if (!targets.IsEmpty())\n        {\n            auto type = &targets[0]->GetType();\n            objectViewer = mViewers.FindOrDefault([&](auto& x) { return type->IsBasedOn(*x->GetViewingObjectType()); });\n        }\n\n        if (!objectViewer)\n            objectViewer = mDefaultViewer;\n\n        if (objectViewer != mCurrentViewer)\n        {\n            using thisclass = PropertiesWindow;\n            \n            if (mCurrentViewer)\n            {\n                mCurrentViewer->mContentWidget->Hide(true);\n                mCurrentViewer->SetPropertiesEnabled(false);\n\n                mCurrentViewer->onPropertyChanged -= THIS_FUNC(OnPropertyChanged);\n                mCurrentViewer->onPropertyChangeCompleted -= THIS_FUNC(OnPropertyChangeCompleted);\n            }\n\n            mCurrentViewer = objectViewer;\n\n            if (mCurrentViewer)\n            {\n                mCurrentViewer->mContentWidget->SetParent(mWindow);\n                *mCurrentViewer->mContentWidget->layout = WidgetLayout::BothStretch();\n                mCurrentViewer->mContentWidget->Show(true);\n\n                mCurrentViewer->onPropertyChanged += THIS_FUNC(OnPropertyChanged);\n                mCurrentViewer->onPropertyChangeCompleted += THIS_FUNC(OnPropertyChangeCompleted);\n            }\n        }\n\n        mTargets = targets;\n\n        if (mCurrentViewer)\n        {\n            mCurrentViewer->SetTargets(mTargets);\n            mCurrentViewer->SetPropertiesEnabled(true);\n        }\n\n        mOnTargetsChangedDelegate = targetsChangedDelegate;\n        mTargetsChanged = false;\n    }\n\n    Vector<IObject*> PropertiesWindow::GetTargets() const\n    {\n        return mTargets;\n    }\n\n    void PropertiesWindow::Update(float dt)\n    {\n        mRefreshRemainingTime -= dt;\n        if (mRefreshRemainingTime < 0.0f)\n        {\n            mRefreshRemainingTime = mRefreshDelay;\n            if (mCurrentViewer)\n                mCurrentViewer->Refresh();\n        }\n\n        if (mCurrentViewer)\n            mCurrentViewer->Update(dt);\n    }\n\n    void PropertiesWindow::Draw()\n    {\n        if (mCurrentViewer)\n            mCurrentViewer->Draw();\n    }\n\n    bool PropertiesWindow::IsTargetsChanged() const\n    {\n        return mTargetsChanged;\n    }\n\n    Ref<RefCounterable> PropertiesWindow::CastToRefCounterable(const Ref<PropertiesWindow>& ref)\n    {\n        return DynamicCast<Singleton<PropertiesWindow>>(ref);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::PropertiesWindow, Editor__PropertiesWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/PropertiesWindow.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Windows/IEditorWindow.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class HorizontalLayout;\n    class Label;\n    class VerticalLayout;\n}\n\n// Editor properties window accessor macros\n#define o2EditorPropertiesWindow PropertiesWindow::Instance()\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(DefaultPropertiesViewer);\n    FORWARD_CLASS_REF(IPropertiesViewer);\n    FORWARD_CLASS_REF(PropertiesContext);\n\n    // ------------------------\n    // Editor properties window\n    // ------------------------\n    class PropertiesWindow: public Singleton<PropertiesWindow>, public IEditorWindow\n    {\n    public:\n        Function<void(const Vector<IObject*>& targets, const Ref<IPropertyField>& field, bool byUser)> onPropertyChanged; // Called when property changed\n\n        Function<void(const Vector<IObject*>& targets, const String& path, \n                      const Vector<DataDocument>& before, const Vector<DataDocument>& after)> onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Default constructor\n        PropertiesWindow(RefCounter* refCounter);\n\n        // Destructor\n        ~PropertiesWindow();\n\n        // Resets targets objects\n        void ResetTargets();\n\n        // Sets target object\n        void SetTarget(IObject* target);\n\n        // Sets target objects\n        void SetTargets(const Vector<IObject*>& targets, const Function<void()>& targetsChangedDelegate = Function<void()>());\n\n        // Returns target object\n        Vector<IObject*> GetTargets() const;\n\n        // Updates window: check next viewer and targets and updates current viewer\n        void Update(float dt) override;\n\n        // Draws current viewer\n        void Draw() override;\n\n        // Returns is targets changed\n        bool IsTargetsChanged() const;\n\n        // Dynamic cast to RefCounterable via Singleton<PropertiesWindow>\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<PropertiesWindow>& ref);\n\n        IOBJECT(PropertiesWindow); \n        REF_COUNTERABLE_IMPL(IEditorWindow, Singleton<PropertiesWindow>);\n\n    protected:\n        Vector<IObject*> mTargets; // Target objects\n\n        Ref<IPropertiesViewer>         mCurrentViewer; // Current properties viewer\n        Vector<Ref<IPropertiesViewer>> mViewers;       // All available object types viewers\n        Ref<DefaultPropertiesViewer>   mDefaultViewer; // Default properties viewer\n\n        Function<void()> mOnTargetsChangedDelegate; // Called when targets array changing\n        bool             mTargetsChanged = false;   // True when targets was changed    \n\n        float mRefreshDelay = 0.1f;         // Values refreshing delay\n        float mRefreshRemainingTime = 0.5f; // Time to next values refreshing\n\n    protected:\n        // Initializes window\n        void InitializeWindow();\n\n        // Initializes window context menu\n        void InitializeWindowContext();\n\n        // Initializes viewers\n        void InitializeViewers();\n\n        // Called when private fields visibility changed\n        void OnPrivateFieldsVisibleChanged(bool visible);\n\n        // Called when some property field was changed\n        void OnPropertyChanged(const Vector<IObject*>& targets, const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const Vector<IObject*>& targets, const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n\n\t\t// Called when window was focused, calls focus delegate from scene tree\n        void OnFocusedWindow();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::PropertiesWindow)\n{\n    BASE_CLASS(o2::Singleton<PropertiesWindow>);\n    BASE_CLASS(Editor::IEditorWindow);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::PropertiesWindow)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().NAME(mTargets);\n    FIELD().PROTECTED().NAME(mCurrentViewer);\n    FIELD().PROTECTED().NAME(mViewers);\n    FIELD().PROTECTED().NAME(mDefaultViewer);\n    FIELD().PROTECTED().NAME(mOnTargetsChangedDelegate);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mTargetsChanged);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.1f).NAME(mRefreshDelay);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.5f).NAME(mRefreshRemainingTime);\n}\nEND_META;\nCLASS_METHODS_META(Editor::PropertiesWindow)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, ResetTargets);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTarget, IObject*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargets, const Vector<IObject*>&, const Function<void()>&);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<IObject*>, GetTargets);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsTargetsChanged);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<PropertiesWindow>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindowContext);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeViewers);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPrivateFieldsVisibleChanged, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Vector<IObject*>&, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const Vector<IObject*>&, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocusedWindow);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/DefaultWidgetLayerHeadViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DefaultWidgetLayerHeadViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2Editor/Actions/PropertyChange.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Basic/BooleanProperty.h\"\n#include \"o2Editor/Properties/Basic/StringProperty.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n    DefaultWidgetLayerHeaderViewer::DefaultWidgetLayerHeaderViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        mDataView = mmake<Widget>();\n        mDataView->name = \"actor head\";\n        mDataView->layout->minHeight = 21;\n\n        mEnableProperty = o2UI.CreateWidget<BooleanProperty>(\"actor head enable\");\n        *mEnableProperty->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(1, 0));\n        mEnableProperty->SetValuePath(\"enabled\");\n        mEnableProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mEnableProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mDataView->AddChild(mEnableProperty);\n\n        mNameProperty = o2UI.CreateWidget<StringProperty>(\"actor head name\");\n        *mNameProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 21, 15, 17, 2);\n        mNameProperty->SetValuePath(\"name\");\n        mNameProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mNameProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mDataView->AddChild(mNameProperty);\n\n        mLockProperty = o2UI.CreateWidget<BooleanProperty>(\"actor head lock\");\n        *mLockProperty->layout = WidgetLayout::Based(BaseCorner::RightTop, Vec2F(20, 20), Vec2F(2, -1));\n        mLockProperty->SetValuePath(\"locked\");\n        mLockProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mLockProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        mDataView->AddChild(mLockProperty);\n    }\n\n    DefaultWidgetLayerHeaderViewer::~DefaultWidgetLayerHeaderViewer()\n    {}\n\n    void DefaultWidgetLayerHeaderViewer::SetTargetLayers(const Vector<WidgetLayer*>& layers)\n    {\n        mLayers = layers;\n\n        Vector<WidgetLayer*> prototypes = layers.Convert<WidgetLayer*>([](WidgetLayer* x) { return nullptr; });\n//         auto prototypes = layers.Convert<WidgetLayer*>([](WidgetLayer* x) { \n//             return x->GetOwnerWidget()->GetPrototypeLink().Get(); });\n\n        mEnableProperty->SelectValueAndPrototypeProperties<WidgetLayer, decltype(WidgetLayer::enabled)>(\n            layers, prototypes, [](WidgetLayer* x) { return &x->enabled; });\n\n        mNameProperty->SelectValueAndPrototypePointers<String, WidgetLayer>(\n            layers, prototypes, [](WidgetLayer* x) { return &x->name; });\n\n        mLockProperty->SelectValueAndPrototypeProperties<WidgetLayer, decltype(WidgetLayer::locked)>(\n            layers, prototypes, [](WidgetLayer* x) { return &x->locked; });\n    }\n\n    Ref<Widget> DefaultWidgetLayerHeaderViewer::GetWidget() const\n    {\n        return mDataView;\n    }\n\n    void DefaultWidgetLayerHeaderViewer::Refresh()\n    {\n        mEnableProperty->Refresh();\n        mNameProperty->Refresh();\n        mLockProperty->Refresh();\n    }\n\n    void DefaultWidgetLayerHeaderViewer::OnPropertiesEnabled()\n    {\n        mEnableProperty->SetPropertyEnabled(true);\n        mNameProperty->SetPropertyEnabled(true);\n        mLockProperty->SetPropertyEnabled(true);\n    }\n\n    void DefaultWidgetLayerHeaderViewer::OnPropertiesDisabled()\n    {\n        mEnableProperty->SetPropertyEnabled(false);\n        mNameProperty->SetPropertyEnabled(false);\n        mLockProperty->SetPropertyEnabled(false);\n    }\n\n    void DefaultWidgetLayerHeaderViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        IWidgetLayerHeaderViewer::OnPropertyChanged(field, byUser);\n    }\n\n    void DefaultWidgetLayerHeaderViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        IWidgetLayerHeaderViewer::OnPropertyChangeCompleted(path, before, after);\n\n        auto action = mmake<PropertyChangeAction>(o2EditorSceneScreen.GetSelectedObjects(), path, before, after);\n        o2EditorSceneWindow.DoneAction(action);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DefaultWidgetLayerHeaderViewer, Editor__DefaultWidgetLayerHeaderViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/DefaultWidgetLayerHeadViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerHeadViewer.h\"\n\nnamespace o2\n{\n    class Toggle;\n    class EditBox;\n    class Button;\n}\n\nnamespace Editor\n{\n    using namespace o2;\n\n    FORWARD_CLASS_REF(BooleanProperty);\n    FORWARD_CLASS_REF(StringProperty);\n\n    // ----------------------------------\n    // Default widget layer header viewer\n    // ----------------------------------\n    class DefaultWidgetLayerHeaderViewer : public IWidgetLayerHeaderViewer\n    {\n    public:\n        // Default constructor\n        DefaultWidgetLayerHeaderViewer();\n\n        // Virtual destructor\n        ~DefaultWidgetLayerHeaderViewer();\n\n        // Sets target actors\n        void SetTargetLayers(const Vector<WidgetLayer*>& layers) override;\n\n        // Returns data widget\n        Ref<Widget> GetWidget() const override;\n\n        // Updates properties values\n        void Refresh() override;\n\n        IOBJECT(DefaultWidgetLayerHeaderViewer);\n\n    public:\n        Vector<WidgetLayer*> mLayers;\n\n        Ref<Widget> mDataView;\n\n        Ref<BooleanProperty> mEnableProperty;\n        Ref<StringProperty>  mNameProperty;\n        Ref<BooleanProperty> mLockProperty;\n\n    protected:\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DefaultWidgetLayerHeaderViewer)\n{\n    BASE_CLASS(Editor::IWidgetLayerHeaderViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DefaultWidgetLayerHeaderViewer)\n{\n    FIELD().PUBLIC().NAME(mLayers);\n    FIELD().PUBLIC().NAME(mDataView);\n    FIELD().PUBLIC().NAME(mEnableProperty);\n    FIELD().PUBLIC().NAME(mNameProperty);\n    FIELD().PUBLIC().NAME(mLockProperty);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DefaultWidgetLayerHeaderViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetLayers, const Vector<WidgetLayer*>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/DefaultWidgetLayerLayoutViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DefaultWidgetLayerLayoutViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayerLayout.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Utils/Math/Layout.h\"\n#include \"o2Editor/Actions/PropertyChange.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Basic/Vector2FloatProperty.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n\nnamespace Editor\n{\n\n    DefaultWidgetLayerLayoutViewer::DefaultWidgetLayerLayoutViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        // Position\n        auto positionPropertyContainer = mmake<Widget>();\n        positionPropertyContainer->name = \"position\";\n        positionPropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(positionPropertyContainer);\n\n        auto positionIcon = o2UI.CreateImage(\"ui/UI4_position_icon.png\");\n        *positionIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        positionPropertyContainer->AddChild(positionIcon);\n\n        mPositionProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mPositionProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mPositionProperty->SetValuePath(\"transform/position\");\n        mPositionProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mPositionProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        positionPropertyContainer->AddChild(mPositionProperty);\n\n        // Size\n        auto sizePropertyContainer = mmake<Widget>();\n        sizePropertyContainer->name = \"size\";\n        sizePropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(sizePropertyContainer);\n\n        auto sizeIcon = o2UI.CreateImage(\"ui/UI4_icon_size.png\");\n        *sizeIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-1, 0));\n        sizePropertyContainer->AddChild(sizeIcon);\n\n        mSizeProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mSizeProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mSizeProperty->SetValuePath(\"transform/size\");\n        mSizeProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mSizeProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        sizePropertyContainer->AddChild(mSizeProperty);\n\n        // Anchors\n        // Right top\n        auto rightTopAnchorPropertyContainer = mmake<Widget>();\n        rightTopAnchorPropertyContainer->name = \"right top anchor\";\n        rightTopAnchorPropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(rightTopAnchorPropertyContainer);\n\n        auto anchorIcon = o2UI.CreateImage(\"ui/UI4_icon_anchor.png\");\n        *anchorIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        rightTopAnchorPropertyContainer->AddChild(anchorIcon);\n\n        mAnchorRightTopProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mAnchorRightTopProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mAnchorRightTopProperty->GetChildByType<Label>(\"container/layout/properties/x label\")->text = \"R\";\n        mAnchorRightTopProperty->GetChildByType<Label>(\"container/layout/properties/y label\")->text = \"T\";\n        mAnchorRightTopProperty->SetValuePath(\"layout/anchorMax\");\n        mAnchorRightTopProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mAnchorRightTopProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        rightTopAnchorPropertyContainer->AddChild(mAnchorRightTopProperty);\n\n        // Left bottom\n        auto leftBottomAnchorPropertyContainer = mmake<Widget>();\n        leftBottomAnchorPropertyContainer->name = \"left bottom anchor\";\n        leftBottomAnchorPropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(leftBottomAnchorPropertyContainer);\n\n        mAnchorLeftBottomProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mAnchorLeftBottomProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mAnchorLeftBottomProperty->GetChildByType<Label>(\"container/layout/properties/x label\")->text = \"L\";\n        mAnchorLeftBottomProperty->GetChildByType<Label>(\"container/layout/properties/y label\")->text = \"B\";\n        mAnchorLeftBottomProperty->SetValuePath(\"layout/anchorMin\");\n        mAnchorLeftBottomProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mAnchorLeftBottomProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        leftBottomAnchorPropertyContainer->AddChild(mAnchorLeftBottomProperty);\n\n        // Offsets\n        // Right top\n        auto rightTopOffsetPropertyContainer = mmake<Widget>();\n        rightTopOffsetPropertyContainer->name = \"right top offset\";\n        rightTopOffsetPropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(rightTopOffsetPropertyContainer);\n\n        auto offsetIcon = o2UI.CreateImage(\"ui/UI4_icon_offsets.png\");\n        *offsetIcon->layout = WidgetLayout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 0));\n        rightTopOffsetPropertyContainer->AddChild(offsetIcon);\n\n        mOffsetRightTopProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mOffsetRightTopProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mOffsetRightTopProperty->GetChildByType<Label>(\"container/layout/properties/x label\")->text = \"R\";\n        mOffsetRightTopProperty->GetChildByType<Label>(\"container/layout/properties/y label\")->text = \"T\";\n        mOffsetRightTopProperty->SetValuePath(\"layout/offsetMax\");\n        mOffsetRightTopProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mOffsetRightTopProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        rightTopOffsetPropertyContainer->AddChild(mOffsetRightTopProperty);\n\n        // Left bottom\n        auto leftBottomOffsetPropertyContainer = mmake<Widget>();\n        leftBottomOffsetPropertyContainer->name = \"left bottom offset\";\n        leftBottomOffsetPropertyContainer->layout->minHeight = 20;\n        mSpoiler->AddChild(leftBottomOffsetPropertyContainer);\n\n        mOffsetLeftBottomProperty = o2UI.CreateWidget<Vec2FProperty>(\"colored\");\n        *mOffsetLeftBottomProperty->layout = WidgetLayout::HorStretch(VerAlign::Top, 20, 0, 20, 0);\n        mOffsetLeftBottomProperty->GetChildByType<Label>(\"container/layout/properties/x label\")->text = \"L\";\n        mOffsetLeftBottomProperty->GetChildByType<Label>(\"container/layout/properties/y label\")->text = \"B\";\n        mOffsetLeftBottomProperty->SetValuePath(\"layout/offsetMin\");\n        mOffsetLeftBottomProperty->onChanged = THIS_FUNC(OnPropertyChanged);\n        mOffsetLeftBottomProperty->onChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n        leftBottomOffsetPropertyContainer->AddChild(mOffsetLeftBottomProperty);\n    }\n\n    DefaultWidgetLayerLayoutViewer::~DefaultWidgetLayerLayoutViewer()\n    {}\n\n    void DefaultWidgetLayerLayoutViewer::SetTargetLayers(const Vector<WidgetLayer*>& layers)\n    {\n        mLayers = layers;\n\n        auto prototypes = layers.Convert<WidgetLayer*>([](WidgetLayer* x) { return nullptr; });\n\n        mPositionProperty->SelectValueAndPrototypeProperties<WidgetLayer, decltype(WidgetLayerLayout::position)>(\n            layers, prototypes, [](WidgetLayer* x) { return &x->layout.position; });\n\n        mSizeProperty->SelectValueAndPrototypeProperties<WidgetLayer, decltype(WidgetLayerLayout::size)>(\n            layers, prototypes, [](WidgetLayer* x) { return &x->layout.size; });\n\n        mAnchorRightTopProperty->SelectValueAndPrototypeProperties<WidgetLayer, decltype(WidgetLayerLayout::anchorMax)>(\n            layers, prototypes, [](WidgetLayer* x) { return &x->layout.anchorMax; });\n\n        mAnchorLeftBottomProperty->SelectValueAndPrototypeProperties<WidgetLayer, decltype(WidgetLayerLayout::anchorMin)>(\n            layers, prototypes, [](WidgetLayer* x) { return &x->layout.anchorMin; });\n\n        mOffsetRightTopProperty->SelectValueAndPrototypeProperties<WidgetLayer, decltype(WidgetLayerLayout::offsetMax)>(\n            layers, prototypes, [](WidgetLayer* x) { return &x->layout.offsetMax; });\n\n        mOffsetLeftBottomProperty->SelectValueAndPrototypeProperties<WidgetLayer, decltype(WidgetLayerLayout::offsetMin)>(\n            layers, prototypes, [](WidgetLayer* x) { return &x->layout.offsetMin; });\n    }\n\n    void DefaultWidgetLayerLayoutViewer::Refresh()\n    {\n        mAnchorRightTopProperty->Refresh();\n        mAnchorLeftBottomProperty->Refresh();\n        mOffsetRightTopProperty->Refresh();\n        mOffsetLeftBottomProperty->Refresh();\n    }\n\n    void DefaultWidgetLayerLayoutViewer::OnPropertiesEnabled()\n    {\n        mPositionProperty->SetPropertyEnabled(true);\n        mSizeProperty->SetPropertyEnabled(true);\n        mAnchorRightTopProperty->SetPropertyEnabled(true);\n        mAnchorLeftBottomProperty->SetPropertyEnabled(true);\n        mOffsetRightTopProperty->SetPropertyEnabled(true);\n        mOffsetLeftBottomProperty->SetPropertyEnabled(true);\n    }\n\n    void DefaultWidgetLayerLayoutViewer::OnPropertiesDisabled()\n    {\n        mPositionProperty->SetPropertyEnabled(false);\n        mSizeProperty->SetPropertyEnabled(false);\n        mAnchorRightTopProperty->SetPropertyEnabled(false);\n        mAnchorLeftBottomProperty->SetPropertyEnabled(false);\n        mOffsetRightTopProperty->SetPropertyEnabled(false);\n        mOffsetLeftBottomProperty->SetPropertyEnabled(false);\n    }\n\n    void DefaultWidgetLayerLayoutViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        IWidgetLayerLayoutViewer::OnPropertyChanged(field, byUser);\n\n        for (auto& layer : mLayers) {\n            layer->GetOwnerWidget().Lock()->UpdateTransform();\n            layer->GetOwnerWidget().Lock()->OnChanged();\n        }\n    }\n\n    void DefaultWidgetLayerLayoutViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before,\n                                                           const Vector<DataDocument>& after)\n    {\n        IWidgetLayerLayoutViewer::OnPropertyChangeCompleted(path, before, after);\n\n        auto action = mmake<PropertyChangeAction>(o2EditorSceneScreen.GetSelectedObjects(), path, before, after);\n        o2EditorSceneWindow.DoneAction(action);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DefaultWidgetLayerLayoutViewer, Editor__DefaultWidgetLayerLayoutViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/DefaultWidgetLayerLayoutViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerLayoutViewer.h\"\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IPropertyField);\n    FORWARD_CLASS_REF(Vec2FProperty);\n    FORWARD_CLASS_REF(FloatProperty);\n\n    // --------------------------------------------\n    // Default editor widget layer transform viewer\n    // --------------------------------------------\n    class DefaultWidgetLayerLayoutViewer : public IWidgetLayerLayoutViewer\n    {\n    public:\n        // Default constructor. Initializes data widget\n        DefaultWidgetLayerLayoutViewer();\n\n        // Virtual destructor\n        ~DefaultWidgetLayerLayoutViewer();\n\n        // Sets target actors\n        void SetTargetLayers(const Vector<WidgetLayer*>& layers) override;\n\n        // Updates properties values\n        void Refresh() override;\n\n        IOBJECT(DefaultWidgetLayerLayoutViewer);\n\n    protected:\n        Vector<WidgetLayer*> mLayers;\n\n        Ref<Vec2FProperty> mPositionProperty;\n        Ref<Vec2FProperty> mSizeProperty;\n        Ref<Vec2FProperty> mAnchorRightTopProperty;\n        Ref<Vec2FProperty> mAnchorLeftBottomProperty;\n        Ref<Vec2FProperty> mOffsetRightTopProperty;\n        Ref<Vec2FProperty> mOffsetLeftBottomProperty;\n\n    protected:\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DefaultWidgetLayerLayoutViewer)\n{\n    BASE_CLASS(Editor::IWidgetLayerLayoutViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DefaultWidgetLayerLayoutViewer)\n{\n    FIELD().PROTECTED().NAME(mLayers);\n    FIELD().PROTECTED().NAME(mPositionProperty);\n    FIELD().PROTECTED().NAME(mSizeProperty);\n    FIELD().PROTECTED().NAME(mAnchorRightTopProperty);\n    FIELD().PROTECTED().NAME(mAnchorLeftBottomProperty);\n    FIELD().PROTECTED().NAME(mOffsetRightTopProperty);\n    FIELD().PROTECTED().NAME(mOffsetLeftBottomProperty);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DefaultWidgetLayerLayoutViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetLayers, const Vector<WidgetLayer*>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/DefaultWidgetLayerPropertiesViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DefaultWidgetLayerPropertiesViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2Editor/Actions/Transform.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/IObjectPropertiesViewer.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n\nnamespace Editor\n{\n\n    DefaultWidgetLayerPropertiesViewer::DefaultWidgetLayerPropertiesViewer()\n    {\n        PushEditorScopeOnStack scope;\n        mFitSizeButton = o2UI.CreateButton(\"Fit size by drawable\", THIS_FUNC(FitLayerByDrawable));\n    }\n\n    DefaultWidgetLayerPropertiesViewer::~DefaultWidgetLayerPropertiesViewer()\n    {}\n\n    void DefaultWidgetLayerPropertiesViewer::SetTargetLayers(const Vector<WidgetLayer*>& layers)\n    {\n        mLayers = layers;\n        Refresh();\n    }\n\n    const Type* DefaultWidgetLayerPropertiesViewer::GetDrawableType() const\n    {\n        return mDrawableType;\n    }\n\n    void DefaultWidgetLayerPropertiesViewer::Refresh()\n    {\n        if (!mViewer)\n        {\n            mViewer = o2EditorProperties.CreateObjectViewer(&TypeOf(WidgetLayer), \"\", THIS_FUNC(OnPropertyChangeCompleted), THIS_FUNC(OnPropertyChanged));\n            mViewer->CheckCreateSpoiler(mSpoiler);\n\t\t\tmViewer->SetHeaderEnabled(false);\n            mFitSizeButton->SetParent(mSpoiler);\n        }\n\n        if (mViewer)\n        {\n            mViewer->Refresh(mLayers.Convert<Pair<IObject*, IObject*>>([](WidgetLayer* x) {\n                return Pair<IObject*, IObject*>(dynamic_cast<IObject*>(x), nullptr);\n            }));\n        }\n    }\n\n    bool DefaultWidgetLayerPropertiesViewer::IsEmpty() const\n    {\n        return mSpoiler->GetChildren().Count() == 0;\n    }\n\n    void DefaultWidgetLayerPropertiesViewer::OnPropertiesEnabled()\n    {\n        if (mViewer)\n            mViewer->OnPropertiesEnabled();\n    }\n\n    void DefaultWidgetLayerPropertiesViewer::OnPropertiesDisabled()\n    {\n        if (mViewer)\n            mViewer->OnPropertiesDisabled();\n    }\n\n    void DefaultWidgetLayerPropertiesViewer::FitLayerByDrawable()\n    {\n        auto action = mmake<TransformAction>(mLayers.Convert<Ref<SceneEditableObject>>([](WidgetLayer* layer) { return Ref(dynamic_cast<SceneEditableObject*>(layer)); }));\n\n        for (auto& layer : mLayers)\n        {\n            if (auto sprite = DynamicCast<Sprite>(layer->GetDrawable()))\n                layer->layout.size = sprite->GetImageAsset()->GetSize();\n\n            if (auto text = DynamicCast<Text>(layer->GetDrawable()))\n                layer->layout.size = text->GetRealSize();\n        }\n\n        action->Completed();\n        o2EditorSceneWindow.DoneAction(action);\n    }\n\n    void DefaultWidgetLayerPropertiesViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        IWidgetLayerPropertiesViewer::OnPropertyChanged(field, byUser);\n    }\n\n    void DefaultWidgetLayerPropertiesViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        IWidgetLayerPropertiesViewer::OnPropertyChangeCompleted(path, before, after);\n\n        o2EditorSceneWindow.DoneActorPropertyChangeAction(path, before, after);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::DefaultWidgetLayerPropertiesViewer, Editor__DefaultWidgetLayerPropertiesViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/DefaultWidgetLayerPropertiesViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Properties/IPropertyField.h\"\n#include \"o2Editor/Properties/PropertiesContext.h\"\n#include \"o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerPropertiesViewer.h\"\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(Button);\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IObjectPropertiesViewer);\n\n    // --------------------------------------\n    // Default widget layer properties viewer\n    // -------------------------------\n    class DefaultWidgetLayerPropertiesViewer : public IWidgetLayerPropertiesViewer\n    {\n    public:\n        // Default constructor. Initializes data widget\n        DefaultWidgetLayerPropertiesViewer();\n\n        // Virtual destructor\n        ~DefaultWidgetLayerPropertiesViewer();\n\n        // Sets target actors\n        void SetTargetLayers(const Vector<WidgetLayer*>& layers) override;\n\n        // Returns viewing layer drawable type \n        const Type* GetDrawableType() const override;\n\n        // Updates all actor values\n        void Refresh() override;\n\n        // Returns is there no properties\n        bool IsEmpty() const override;\n\n        IOBJECT(DefaultWidgetLayerPropertiesViewer);\n\n    protected:\n        Vector<WidgetLayer*> mLayers;                 // Target widget layers\n        const Type*          mDrawableType = nullptr; // Target drawable type\n\n        Ref<IObjectPropertiesViewer> mViewer;        // Properties viewer\n        Ref<Button>                  mFitSizeButton; // Fit size of layer by drawable size\n\n    protected:\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after) override;\n\n        // Fits layer size by drawable size, Called when mFitSizeButton were pressed\n        void FitLayerByDrawable();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::DefaultWidgetLayerPropertiesViewer)\n{\n    BASE_CLASS(Editor::IWidgetLayerPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DefaultWidgetLayerPropertiesViewer)\n{\n    FIELD().PROTECTED().NAME(mLayers);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mDrawableType);\n    FIELD().PROTECTED().NAME(mViewer);\n    FIELD().PROTECTED().NAME(mFitSizeButton);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DefaultWidgetLayerPropertiesViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetLayers, const Vector<WidgetLayer*>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetDrawableType);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEmpty);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, FitLayerByDrawable);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerHeadViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IWidgetLayerHeadViewer.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n\nnamespace Editor\n{\n    void IWidgetLayerHeaderViewer::SetPropertiesEnabled(bool enabled)\n    {\n        if (mPropertiesEnabled == enabled)\n            return;\n\n        mPropertiesEnabled = enabled;\n\n        if (mPropertiesEnabled)\n            OnPropertiesEnabled();\n        else\n            OnPropertiesDisabled();\n    }\n\n    bool IWidgetLayerHeaderViewer::IsPropertiesEnabled() const\n    {\n        return mPropertiesEnabled;\n    }\n\n    void IWidgetLayerHeaderViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onPropertyChanged(field, byUser);\n    }\n\n    void IWidgetLayerHeaderViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(path, before, after);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IWidgetLayerHeaderViewer, Editor__IWidgetLayerHeaderViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerHeadViewer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n    class WidgetLayer;\n}\n\nnamespace Editor\n{\n    // -------------------------------------------\n    // Editor widget layer header viewer interface\n    // -------------------------------------------\n    class IWidgetLayerHeaderViewer : public IObject, virtual public RefCounterable\n    {\n    public:\n        typedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnPropertyChangedFunc;\n        typedef Function<void(const String& path, const Vector<DataDocument>& before, \n                               const Vector<DataDocument>& after)> OnPropertyChangeCompletedFunc;\n\n        OnPropertyChangedFunc         onPropertyChanged;         // Called when property changed\n        OnPropertyChangeCompletedFunc onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Virtual destructor\n        virtual ~IWidgetLayerHeaderViewer() {}\n\n        // Sets target actors\n        virtual void SetTargetLayers(const Vector<WidgetLayer*>& layers) {}\n\n        // Returns data widget\n        virtual Ref<Widget> GetWidget() const { return nullptr; }\n\n        // Updates properties values\n        virtual void Refresh() {}\n\n        // Sets viewer enabled\n        void SetPropertiesEnabled(bool enabled);\n\n        // Returns is viewer enabled\n        bool IsPropertiesEnabled() const;\n\n        IOBJECT(IWidgetLayerHeaderViewer);\n\n    protected:\n        bool mPropertiesEnabled = false; // Is viewer enabled \n\n    protected:\n        // Enable viewer event function\n        virtual void OnPropertiesEnabled() {}\n\n        // Disable viewer event function\n        virtual void OnPropertiesDisabled() {}\n\n        // Called when some property changed\n        virtual void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        virtual void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n\n        friend class WidgetLayerViewer;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IWidgetLayerHeaderViewer)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IWidgetLayerHeaderViewer)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertiesEnabled);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IWidgetLayerHeaderViewer)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetLayers, const Vector<WidgetLayer*>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPropertiesEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerLayoutViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IWidgetLayerLayoutViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n\nnamespace Editor\n{\n    IWidgetLayerLayoutViewer::IWidgetLayerLayoutViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        mSpoiler = o2UI.CreateWidget<SpoilerWithHead>();\n\n        mSpoiler->borderBottom = 5;\n        mSpoiler->SetCaption(\"Transform\");\n        mSpoiler->GetIcon()->SetImageName(\"ui/UI4_transform_icon_white.png\");\n\n        mSpoiler->SetExpanded(true);\n    }\n\n    IWidgetLayerLayoutViewer::~IWidgetLayerLayoutViewer()\n    {}\n\n    Ref<Widget> IWidgetLayerLayoutViewer::GetWidget() const\n    {\n        return mSpoiler;\n    }\n\n    void IWidgetLayerLayoutViewer::Expand()\n    {\n        mSpoiler->Expand();\n    }\n\n    void IWidgetLayerLayoutViewer::Collapse()\n    {\n        mSpoiler->Collapse();\n    }\n\n    void IWidgetLayerLayoutViewer::Refresh()\n    {}\n\n    void IWidgetLayerLayoutViewer::SetPropertiesEnabled(bool enabled)\n    {\n        if (mPropertiesEnabled == enabled)\n            return;\n\n        mPropertiesEnabled = enabled;\n\n        if (mPropertiesEnabled)\n            OnPropertiesEnabled();\n        else\n            OnPropertiesDisabled();\n    }\n\n    bool IWidgetLayerLayoutViewer::IsPropertiesEnabled() const\n    {\n        return mPropertiesEnabled;\n    }\n\n    void IWidgetLayerLayoutViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onPropertyChanged(field, byUser);\n    }\n\n    void IWidgetLayerLayoutViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                                             const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(path, before, after);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IWidgetLayerLayoutViewer, Editor__IWidgetLayerLayoutViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerLayoutViewer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n    class WidgetLayer;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SpoilerWithHead);\n\n    // -------------------------------------------\n    // Editor widget layer layout viewer interface\n    // -------------------------------------------\n    class IWidgetLayerLayoutViewer : public IObject, virtual public RefCounterable\n    {\n    public:\n        typedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnPropertyChangedFunc;\n        typedef Function<void(const String& path, const Vector<DataDocument>& before, \n                               const Vector<DataDocument>& after)> OnPropertyChangeCompletedFunc;\n\n        OnPropertyChangedFunc         onPropertyChanged;         // Called when property changed\n        OnPropertyChangeCompletedFunc onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Default constructor. Initializes data widget\n        IWidgetLayerLayoutViewer();\n\n        // Virtual destructor\n        virtual ~IWidgetLayerLayoutViewer();\n\n        // Sets target actors\n        virtual void SetTargetLayers(const Vector<WidgetLayer*>& layers) {}\n\n        // Returns data widget\n        virtual Ref<Widget> GetWidget() const;\n\n        // Expands view\n        void Expand();\n\n        // Collapse view\n        void Collapse();\n\n        // Updates properties values\n        virtual void Refresh();\n\n        // Sets viewer enabled\n        void SetPropertiesEnabled(bool enabled);\n\n        // Returns is viewer enabled\n        bool IsPropertiesEnabled() const;\n\n        IOBJECT(IWidgetLayerLayoutViewer);\n\n    protected:\n        Ref<SpoilerWithHead> mSpoiler;\n\n        bool mPropertiesEnabled = false; // Is viewer enabled \n\n    protected:\n        // Enable viewer event function\n        virtual void OnPropertiesEnabled() {}\n\n        // Disable viewer event function\n        virtual void OnPropertiesDisabled() {}\n\n        // Called when some property changed\n        virtual void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        virtual void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n\n        friend class WidgetLayerViewer;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IWidgetLayerLayoutViewer)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IWidgetLayerLayoutViewer)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertiesEnabled);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IWidgetLayerLayoutViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetLayers, const Vector<WidgetLayer*>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPropertiesEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerPropertiesViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"IWidgetLayerPropertiesViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/UI/SpoilerWithHead.h\"\n\nnamespace Editor\n{\n    IWidgetLayerPropertiesViewer::IWidgetLayerPropertiesViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        mSpoiler = o2UI.CreateWidget<SpoilerWithHead>();\n\n        mSpoiler->expandHeight = false;\n        mSpoiler->expandWidth = true;\n        mSpoiler->fitByChildren = true;\n        mSpoiler->borderBottom = 5;\n        mSpoiler->SetCaption(\"Transform\");\n        mSpoiler->GetIcon()->SetImageName(\"ui/UI4_transform_icon_white.png\");\n\n        mSpoiler->SetExpanded(true);\n    }\n\n    IWidgetLayerPropertiesViewer::~IWidgetLayerPropertiesViewer()\n    {}\n\n    Ref<Widget> IWidgetLayerPropertiesViewer::GetWidget() const\n    {\n        return mSpoiler;\n    }\n\n    void IWidgetLayerPropertiesViewer::Expand()\n    {\n        mSpoiler->Expand();\n    }\n\n    void IWidgetLayerPropertiesViewer::Collapse()\n    {\n        mSpoiler->Collapse();\n    }\n\n    void IWidgetLayerPropertiesViewer::Refresh()\n    {}\n\n    bool IWidgetLayerPropertiesViewer::IsEmpty() const\n    {\n        return true;\n    }\n\n    void IWidgetLayerPropertiesViewer::SetPropertiesEnabled(bool enabled)\n    {\n        if (mPropertiesEnabled == enabled)\n            return;\n\n        mPropertiesEnabled = enabled;\n\n        if (mPropertiesEnabled)\n            OnPropertiesEnabled();\n        else\n            OnPropertiesDisabled();\n    }\n\n    bool IWidgetLayerPropertiesViewer::IsPropertiesEnabled() const\n    {\n        return mPropertiesEnabled;\n    }\n\n    void IWidgetLayerPropertiesViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        onPropertyChanged(field, byUser);\n    }\n\n    void IWidgetLayerPropertiesViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        onPropertyChangeCompleted(path, before, after);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::IWidgetLayerPropertiesViewer, Editor__IWidgetLayerPropertiesViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerPropertiesViewer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Properties/IPropertyField.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n    class WidgetLayer;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SpoilerWithHead);\n\n    // -----------------------------------------------\n    // Editor widget layer properties viewer interface\n    // -----------------------------------------------\n    class IWidgetLayerPropertiesViewer : public IObject, virtual public RefCounterable\n    {\n    public:\n        typedef Function<void(const Ref<IPropertyField>& field, bool byUser)> OnPropertyChangedFunc;\n        typedef Function<void(const String& path, const Vector<DataDocument>& before, \n                               const Vector<DataDocument>& after)> OnPropertyChangeCompletedFunc;\n\n        OnPropertyChangedFunc         onPropertyChanged;         // Called when property changed\n        OnPropertyChangeCompletedFunc onPropertyChangeCompleted; // Called when property change completed\n\n    public:\n        // Default constructor. Initializes data widget\n        IWidgetLayerPropertiesViewer();\n\n        // Virtual destructor\n        virtual ~IWidgetLayerPropertiesViewer();\n\n        // Sets target actors\n        virtual void SetTargetLayers(const Vector<WidgetLayer*>& layers) {}\n\n        // Returns viewing layer drawable type \n        virtual const Type* GetDrawableType() const { return nullptr; }\n\n        // Returns data widget\n        virtual Ref<Widget> GetWidget() const;\n\n        // Expands view\n        void Expand();\n\n        // Collapse view\n        void Collapse();\n\n        // Updates all actor values\n        virtual void Refresh();\n\n        // Returns is there no properties\n        virtual bool IsEmpty() const;\n\n        // Sets viewer enabled\n        void SetPropertiesEnabled(bool enabled);\n\n        // Returns is viewer enabled\n        bool IsPropertiesEnabled() const;\n\n        IOBJECT(IWidgetLayerPropertiesViewer);\n\n    protected:\n        Ref<SpoilerWithHead> mSpoiler;\n\n        bool mPropertiesEnabled = false; // Is viewer enabled \n\n    protected:\n        // Enable viewer event function\n        virtual void OnPropertiesEnabled() {}\n\n        // Disable viewer event function\n        virtual void OnPropertiesDisabled() {}\n\n        // Called when some property changed\n        virtual void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser);\n\n        // Called when some property change completed\n        virtual void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after);\n\n        friend class WidgetLayerViewer;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::IWidgetLayerPropertiesViewer)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::IWidgetLayerPropertiesViewer)\n{\n    FIELD().PUBLIC().NAME(onPropertyChanged);\n    FIELD().PUBLIC().NAME(onPropertyChangeCompleted);\n    FIELD().PROTECTED().NAME(mSpoiler);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPropertiesEnabled);\n}\nEND_META;\nCLASS_METHODS_META(Editor::IWidgetLayerPropertiesViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetLayers, const Vector<WidgetLayer*>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetDrawableType);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetWidget);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEmpty);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPropertiesEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/WidgetLayerViewer.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"WidgetLayerViewer.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/DefaultWidgetLayerHeadViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/DefaultWidgetLayerLayoutViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/DefaultWidgetLayerPropertiesViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerHeadViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerLayoutViewer.h\"\n#include \"o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/IWidgetLayerPropertiesViewer.h\"\n\nnamespace Editor\n{\n    WidgetLayerViewer::WidgetLayerViewer()\n    {\n        PushEditorScopeOnStack scope;\n\n        mHeaderViewer = mmake<DefaultWidgetLayerHeaderViewer>();\n        mHeaderViewer->onPropertyChanged = THIS_FUNC(OnPropertyChanged);\n        mHeaderViewer->onPropertyChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mLayoutViewer = mmake<DefaultWidgetLayerLayoutViewer>();\n        mLayoutViewer->onPropertyChanged = THIS_FUNC(OnPropertyChanged);\n        mLayoutViewer->onPropertyChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        mPropertiesViewer = mmake<DefaultWidgetLayerPropertiesViewer>();\n        mPropertiesViewer->onPropertyChanged = THIS_FUNC(OnPropertyChanged);\n        mPropertiesViewer->onPropertyChangeCompleted = THIS_FUNC(OnPropertyChangeCompleted);\n\n        auto scrollArea = o2UI.CreateScrollArea(\"backless\");\n        scrollArea->SetViewLayout(Layout::BothStretch(0, 0, 15, 0));\n        scrollArea->SetClippingLayout(Layout::BothStretch());\n        scrollArea->name = \"widget layers scroll area\";\n        mContentWidget = scrollArea;\n\n        mViewersLayout = o2UI.CreateVerLayout();\n        mViewersLayout->name = \"viewers layout\";\n        mViewersLayout->spacing = 0.0f;\n        mViewersLayout->border = BorderF();\n        mViewersLayout->expandHeight = false;\n        mViewersLayout->expandWidth = true;\n        mViewersLayout->fitByChildren = true;\n        mViewersLayout->baseCorner = BaseCorner::Top;\n        *mViewersLayout->layout = WidgetLayout::BothStretch();\n        mContentWidget->AddChild(mViewersLayout);\n\n        mViewersLayout->AddChild(mHeaderViewer->GetWidget());\n        mViewersLayout->AddChild(mLayoutViewer->GetWidget());\n        mViewersLayout->AddChild(mPropertiesViewer->GetWidget());\n\n        o2Scene.onObjectsChanged += THIS_FUNC(OnSceneObjectsChanged);\n    }\n\n    WidgetLayerViewer::~WidgetLayerViewer()\n    {\n        if (Scene::IsSingletonInitialzed())\n            o2Scene.onObjectsChanged -= THIS_FUNC(OnSceneObjectsChanged);\n    }\n\n    const Type* WidgetLayerViewer::GetViewingObjectType() const\n    {\n        return &TypeOf(WidgetLayer);\n    }\n\n    void WidgetLayerViewer::SetHeaderViewer(const Ref<IWidgetLayerHeaderViewer>& viewer)\n    {\n        mHeaderViewer = viewer;\n    }\n\n    void WidgetLayerViewer::SetLayoutViewer(const Ref<IWidgetLayerLayoutViewer>& viewer)\n    {\n        mLayoutViewer = viewer;\n    }\n\n    void WidgetLayerViewer::SetActorPropertiesViewer(const Ref<IWidgetLayerPropertiesViewer>& viewer)\n    {\n        mPropertiesViewer = viewer;\n    }\n\n    void WidgetLayerViewer::Refresh()\n    {\n        if (mTargetLayers.IsEmpty())\n            return;\n\n        mHeaderViewer->Refresh();\n        mLayoutViewer->Refresh();\n        mPropertiesViewer->Refresh();\n    }\n\n    void WidgetLayerViewer::OnSceneObjectsChanged(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        Refresh();\n    }\n\n    void WidgetLayerViewer::SetTargets(const Vector<IObject*>& targets)\n\t{\n\t\tIPropertiesViewer::SetTargets(targets);\n\n        PushEditorScopeOnStack scope;\n\n        mTargetLayers = targets.Convert<WidgetLayer*>([](auto x) { return dynamic_cast<WidgetLayer*>(x); });\n\n        // rebuild\n        mHeaderViewer->SetTargetLayers(mTargetLayers);\n        mLayoutViewer->SetTargetLayers(mTargetLayers);\n        mPropertiesViewer->SetTargetLayers(mTargetLayers);\n    }\n\n    void WidgetLayerViewer::OnPropertiesEnabled()\n    {\n        mHeaderViewer->SetPropertiesEnabled(true);\n        mLayoutViewer->SetPropertiesEnabled(true);\n        mPropertiesViewer->SetPropertiesEnabled(true);\n    }\n\n    void WidgetLayerViewer::OnPropertiesDisabled()\n    {\n        mTargetLayers.Clear();\n\n        mHeaderViewer->SetPropertiesEnabled(false);\n        mLayoutViewer->SetPropertiesEnabled(false);\n        mPropertiesViewer->SetPropertiesEnabled(false);\n    }\n\n    void WidgetLayerViewer::Update(float dt)\n    {}\n\n    void WidgetLayerViewer::Draw()\n    {}\n\n    void WidgetLayerViewer::OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser)\n    {\n        IPropertiesViewer::OnPropertyChanged(field, byUser);\n    }\n\n    void WidgetLayerViewer::OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after)\n    {\n        IPropertiesViewer::OnPropertyChangeCompleted(path, before, after);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::WidgetLayerViewer, Editor__WidgetLayerViewer);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/PropertiesWindow/WidgetLayerViewer/WidgetLayerViewer.h",
    "content": "#pragma once\n\n#include \"o2Editor/Windows/PropertiesWindow/IPropertiesViewer.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class SceneEditableObject;\n    class VerticalLayout;\n    class WidgetLayer;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IWidgetLayerHeaderViewer);\n    FORWARD_CLASS_REF(IWidgetLayerLayoutViewer);\n    FORWARD_CLASS_REF(IWidgetLayerPropertiesViewer);\n\n    // ------------------------------\n    // Widget layer properties viewer\n    // ------------------------------\n    class WidgetLayerViewer : public IPropertiesViewer\n    {\n    public:\n        WidgetLayerViewer();\n\n        // Virtual destructor\n        ~WidgetLayerViewer();\n\n        // Returns viewing object type\n        const Type* GetViewingObjectType() const override;\n\n        // Sets header viewer\n        void SetHeaderViewer(const Ref<IWidgetLayerHeaderViewer>& viewer);\n\n        // Sets transform viewer\n        void SetLayoutViewer(const Ref<IWidgetLayerLayoutViewer>& viewer);\n\n        // Adds new available actor properties viewer type\n        void SetActorPropertiesViewer(const Ref<IWidgetLayerPropertiesViewer>& viewer);\n\n        // Updates properties values\n        void Refresh() override;\n\n        IOBJECT(WidgetLayerViewer);\n\n    protected:\n        Vector<WidgetLayer*> mTargetLayers; // Current target layers\n\n        Ref<IWidgetLayerHeaderViewer>     mHeaderViewer;     // Layer header viewer\n        Ref<IWidgetLayerLayoutViewer>     mLayoutViewer;     // Layer layout viewer\n        Ref<IWidgetLayerPropertiesViewer> mPropertiesViewer; // Layer properties viewer\n\n        Ref<VerticalLayout> mViewersLayout; // Viewers layout\n\n    protected:\n        // Called when some actors on scene were changed\n        void OnSceneObjectsChanged(const Vector<Ref<SceneEditableObject>>& objects);\n\n        // Sets target objects\n        void SetTargets(const Vector<IObject*>& targets) override;\n\n        // Enable viewer event function\n        void OnPropertiesEnabled() override;\n\n        // Disable viewer event function\n        void OnPropertiesDisabled() override;\n\n        // Called when some property changed\n        void OnPropertyChanged(const Ref<IPropertyField>& field, bool byUser) override;\n\n        // Called when some property change completed\n        void OnPropertyChangeCompleted(const String& path, const Vector<DataDocument>& before, \n                                       const Vector<DataDocument>& after) override;\n\n        // Updates viewer\n        void Update(float dt) override;\n\n        // Draws something\n        void Draw() override;\n    };\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::WidgetLayerViewer)\n{\n    BASE_CLASS(Editor::IPropertiesViewer);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::WidgetLayerViewer)\n{\n    FIELD().PROTECTED().NAME(mTargetLayers);\n    FIELD().PROTECTED().NAME(mHeaderViewer);\n    FIELD().PROTECTED().NAME(mLayoutViewer);\n    FIELD().PROTECTED().NAME(mPropertiesViewer);\n    FIELD().PROTECTED().NAME(mViewersLayout);\n}\nEND_META;\nCLASS_METHODS_META(Editor::WidgetLayerViewer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetViewingObjectType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeaderViewer, const Ref<IWidgetLayerHeaderViewer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayoutViewer, const Ref<IWidgetLayerLayoutViewer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetActorPropertiesViewer, const Ref<IWidgetLayerPropertiesViewer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Refresh);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSceneObjectsChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetTargets, const Vector<IObject*>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertiesDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChanged, const Ref<IPropertyField>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPropertyChangeCompleted, const String&, const Vector<DataDocument>&, const Vector<DataDocument>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, Update, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, Draw);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/SceneWindow/LayersPopup.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"LayersPopup.h\"\n\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n\nnamespace Editor\n{\n    LayersPopup::LayersPopup(RefCounter* refCounter):\n        PopupWidget(refCounter)\n    {\n        InitializeControls();\n    }\n\n    LayersPopup::~LayersPopup()\n    {}\n\n    void LayersPopup::Show(const Vec2F& position)\n    {\n        UpdateLayersList();\n        PopupWidget::Show(position);\n    }\n\n    void LayersPopup::Update(float dt)\n    {\n        PopupWidget::Update(dt);\n\n        if (mDraggingItem)\n            UpdateDragAnimation(dt);\n    }\n\n    String LayersPopup::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void LayersPopup::SpecialDraw()\n    {\n        PopupWidget::SpecialDraw();\n    }\n\n    Vec2F LayersPopup::GetContentSize() const\n    {\n        return Vec2F(200, mChildWidgets.Count()*mItemSample->layout->GetMinHeight());\n    }\n\n    void LayersPopup::InitializeControls()\n    {\n        AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_Context_menu.png\"), Layout::BothStretch(-20, -19, -20, -19));\n\n        mItemSample = mmake<LayerPopupItem>();\n\n        mAddButtonLayout = mmake<HorizontalLayout>();\n        *mAddButtonLayout->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 20);\n        mAddButtonLayout->layout->minHeight = 20;\n        mAddButtonLayout->AddLayer(\"line\", mmake<Sprite>(\"ui/UI4_Separator.png\"),\n                                   Layout::HorStretch(VerAlign::Top, 0, 0, 5, -2));\n        mAddButtonLayout->AddChild(mmake<Widget>());\n\n        mAddButton = o2UI.CreateWidget<Button>(\"add small\");\n        mAddButton->layout->maxWidth = 20;\n\n        mAddButton->isPointInside = [=](const Vec2F& p) {\n            return mAddButton->layout->IsPointInside(p) || mAddButtonLayout->layout->IsPointInside(p);\n        };\n\n        mAddButton->onClick = [=]() {\n            String newLayerName = \"New layer\";\n\n            int idx = 1;\n            while (o2Scene.HasLayer(newLayerName))\n                newLayerName = \"New layer \" + (String)idx++;\n\n            auto newLayer = o2Scene.AddLayer(newLayerName);\n            UpdateLayersListAndFit();\n\n            auto item = mChildWidgets.FindOrDefault([=](const Ref<Widget>& x) {\n                if (auto item = DynamicCast<LayerPopupItem>(x))\n                    return item->mLayer == newLayer;\n\n                return false;\n            });\n\n            DynamicCast<LayerPopupItem>(item)->BeginEditName();\n        };\n\n        mAddButtonLayout->AddChild(mAddButton);\n    }\n\n    void LayersPopup::UpdateItemLayout(const Ref<LayerPopupItem>& item, int idx)\n    {\n        float itemHeight = mItemSample->layout->GetMinHeight();\n        float dragModeOffset = 0.0f;\n\n        if (mDraggingItem)\n            dragModeOffset = mDragAnimFunc.Evaluate(item->mDragInsertCoef)*itemHeight;\n\n        item->layout->CopyFrom(WidgetLayout::HorStretch(VerAlign::Top, 0, 0, itemHeight, itemHeight*(float)idx + dragModeOffset));\n        item->layout->minSize = Vec2F(200, 20);\n    }\n\n    void LayersPopup::UpdateLayersList()\n    {\n        PushEditorScopeOnStack scope;\n\n        RemoveChild(mAddButtonLayout, false);\n\n        mItemsCache.Add(DynamicCastVector<LayerPopupItem>(mChildWidgets));\n        RemoveAllChildren();\n\n        int idx = 0;\n        for (auto& layer : o2Scene.GetLayers())\n        {\n            Ref<LayerPopupItem> item;\n            if (!mItemsCache.IsEmpty())\n            {\n                auto sameLayerItem = mItemsCache.FindOrDefault([=](const Ref<LayerPopupItem>& x) { return x->mLayer == layer; });\n                if (sameLayerItem)\n                {\n                    item = sameLayerItem;\n                    mItemsCache.Remove(sameLayerItem);\n                }\n                else\n                    item = mItemsCache.PopBack();\n            }\n            else \n                item = mItemSample->CloneAsRef<LayerPopupItem>();\n\n            item->SetLayer(layer);\n            item->mPopup = Ref(this);\n            AddChild(item);\n            UpdateItemLayout(item, idx);\n\n            idx++;\n        }\n\n        AddChild(mAddButtonLayout);\n    }\n\n    void LayersPopup::UpdateLayersListAndFit()\n    {\n        UpdateLayersList();\n        UpdateTransform();\n        FitSizeAndPosition(layout->GetWorldLeftTop());\n    }\n\n    void LayersPopup::BeginDragging(const Ref<LayerPopupItem>& item)\n    {\n        mDraggingItem = item;\n        mDragOffset = o2Input.GetCursorPos() - mDraggingItem->layout->GetWorldLeftBottom();\n\n        float itemPos = GetChildrenWorldRect().top - item->layout->worldTop;\n        float threshold = itemPos - 10.0f;\n        float itemHeight = mItemSample->layout->minHeight;\n        int idx = 0;\n        for (auto& child : mChildWidgets)\n        {\n            if (auto item = DynamicCast<LayerPopupItem>(child))\n            {\n                if (item != mDraggingItem)\n                {\n                    float itemOriginPos = itemHeight*(float)idx;\n                    item->mDragInsertCoef = itemOriginPos < threshold ? 0.0f : 1.0f;\n                    item->mDragTargetInsertCoef = item->mDragInsertCoef;\n                    item->BreakEditName();\n                    UpdateItemLayout(item, idx);\n                    idx++;\n                }\n            }\n        }\n    }\n\n    void LayersPopup::UpdateDragging()\n    {\n        float itemPos = layout->worldTop - o2Input.GetCursorPos().y - mDragOffset.y;\n        *mDraggingItem->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, mDraggingItem->layout->GetMinHeight(),\n                                                          itemPos);\n        mDraggingItem->layout->minHeight = 20;\n\n        float threshold = itemPos - 10.0f;\n        float itemHeight = mItemSample->layout->minHeight;\n        int idx = 0;\n        for (auto& child : mChildWidgets)\n        {\n            if (auto item = DynamicCast<LayerPopupItem>(child))\n            {\n                if (item != mDraggingItem)\n                {\n                    float itemOriginPos = itemHeight*(float)idx;\n                    item->mDragTargetInsertCoef = itemOriginPos < threshold ? 0.0f : 1.0f;\n                    idx++;\n                }\n            }\n        }\n    }\n\n    void LayersPopup::UpdateDragAnimation(float dt)\n    {\n        float animCoef = 10.0f;\n        int idx = 0;\n        for (auto& child : mChildWidgets)\n        {\n            if (auto item = DynamicCast<LayerPopupItem>(child))\n            {\n                if (item != mDraggingItem)\n                {\n                    item->mDragInsertCoef = Math::Lerp(item->mDragInsertCoef, item->mDragTargetInsertCoef, animCoef*dt);\n                    UpdateItemLayout(item, idx);\n                    idx++;\n                }\n            }\n        }\n    }\n\n    void LayersPopup::EndDragging()\n    {\n        float itemPos = GetChildrenWorldRect().top - mDraggingItem->layout->worldTop + 10.0f;\n        int idx = (int)(itemPos/mDraggingItem->layout->minHeight);\n        o2Scene.SetLayerOrder(mDraggingItem->mLayer, idx);\n\n        mDraggingItem = nullptr;\n        UpdateLayersList();\n    }\n\n    LayerPopupItem::LayerPopupItem(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        layout->minSize = Vec2F(200, 20);\n        AddLayer(\"drag handle\", mmake<Sprite>(\"ui/UI4_drag_handle.png\"), Layout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(0, 0)));\n\n        mVisibleToggle = o2UI.CreateWidget<Toggle>();\n        *mVisibleToggle->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(20, 0));\n        mVisibleToggle->name = \"visibility\";\n        mVisibleToggle->onToggleByUser = THIS_FUNC(OnVisibleChanged);\n        AddChild(mVisibleToggle);\n\n        mNameCaption = o2UI.CreateLabel(\"\");\n        mNameCaption->name = \"name\";\n        mNameCaption->horAlign = HorAlign::Left;\n        *mNameCaption->layout = WidgetLayout::BothStretch(40, 0, 20, 0);\n        AddChild(mNameCaption);\n\n        mRemoveBtn = o2UI.CreateWidget<Button>(\"remove small\");\n        *mRemoveBtn->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F());\n        mRemoveBtn->name = \"remove\";\n        mRemoveBtn->onClick = THIS_FUNC(OnRemovePressed);\n        AddChild(mRemoveBtn);\n\n        mEditBox = o2UI.CreateWidget<EditBox>(\"backless\");\n        *mEditBox->layout = WidgetLayout::BothStretch(40, 0, 20, 0);\n        mEditBox->enabled = false;\n        mEditBox->name = \"edit name\";\n        mEditBox->onChangeCompleted = THIS_FUNC(OnNameEditChanged);\n        AddChild(mEditBox);\n    }\n\n    LayerPopupItem::LayerPopupItem(RefCounter* refCounter, const LayerPopupItem& other):\n        Widget(refCounter, other)\n    {\n        mVisibleToggle = GetChildByType<Toggle>(\"visibility\");\n        mRemoveBtn = GetChildByType<Button>(\"remove\");\n        mEditBox = GetChildByType<EditBox>(\"edit name\");\n        mNameCaption = GetChildByType<Label>(\"name\");\n\n        mEditBox->onChangeCompleted = THIS_FUNC(OnNameEditChanged);\n        mVisibleToggle->onToggleByUser = THIS_FUNC(OnVisibleChanged);\n        mRemoveBtn->onClick = THIS_FUNC(OnRemovePressed);\n    }\n\n    LayerPopupItem& LayerPopupItem::operator=(const LayerPopupItem& other)\n    {\n        Widget::operator=(other);\n\n        mVisibleToggle = GetChildByType<Toggle>(\"visibility\");\n        mRemoveBtn = GetChildByType<Button>(\"remove\");\n        mEditBox = GetChildByType<EditBox>(\"edit name\");\n        mNameCaption = GetChildByType<Label>(\"name\");\n\n        mEditBox->onChangeCompleted = THIS_FUNC(OnNameEditChanged);\n        mVisibleToggle->onToggleByUser = THIS_FUNC(OnVisibleChanged);\n        mRemoveBtn->onClick = THIS_FUNC(OnRemovePressed);\n\n        return *this;\n    }\n\n    void LayerPopupItem::SetLayer(const Ref<SceneLayer>& layer)\n    {\n        if (mLayer == layer)\n            return;\n\n        mLayer = layer;\n\n        mVisibleToggle->value = layer->visible;\n        mNameCaption->text = layer->GetName();\n    }\n\n    void LayerPopupItem::BeginEditName()\n    {\n        mNameCaption->enabled = false;\n        mEditBox->enabled = true;\n        mEditBox->text = mLayer->GetName();\n        mEditBox->Focus();\n        mEditBox->SelectAll();\n    }\n\n    void LayerPopupItem::BreakEditName()\n    {\n        mEditBox->Unfocus();\n        mEditBox->enabled = false;\n        mNameCaption->enabled = true;\n    }\n\n    void LayerPopupItem::Draw()\n    {\n        SelectableDragableObject::OnDrawn();\n        Widget::Draw();\n    }\n\n    bool LayerPopupItem::IsUnderPoint(const Vec2F& point)\n    {\n        return layout->IsPointInside(point);\n    }\n\n    String LayerPopupItem::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void LayerPopupItem::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        BeginEditName();\n    }\n\n    void LayerPopupItem::OnDragStart(const Input::Cursor& cursor)\n    {\n        mPopup->BeginDragging(Ref(this));\n    }\n\n    void LayerPopupItem::OnDragged(const Input::Cursor& cursor, const Ref<DragDropArea>& area)\n    {\n        mPopup->UpdateDragging();\n    }\n\n    void LayerPopupItem::OnDragEnd(const Input::Cursor& cursor)\n    {\n        mPopup->EndDragging();\n    }\n\n    void LayerPopupItem::OnNameEditChanged(const WString& str)\n    {\n        mEditBox->enabled = false;\n        mNameCaption->enabled = true;\n\n        mNameCaption->text = str;\n        mLayer->SetName(str);\n        mPopup->UpdateLayersList();\n\n        o2Scene.OnObjectChanged(nullptr);\n    }\n\n    void LayerPopupItem::OnVisibleChanged(bool visible)\n    {\n        mLayer->visible = visible;\n    }\n\n    void LayerPopupItem::OnRemovePressed()\n    {\n        o2Scene.RemoveLayer(mLayer);\n        mPopup->UpdateLayersListAndFit();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::LayersPopup>);\n// --- META ---\n\nDECLARE_CLASS(Editor::LayersPopup, Editor__LayersPopup);\n\nDECLARE_CLASS(Editor::LayerPopupItem, Editor__LayerPopupItem);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/SceneWindow/LayersPopup.h",
    "content": "#pragma once\n#include \"o2/Scene/UI/Widgets/PopupWidget.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Button;\n    class EditBox;\n    class HorizontalLayout;\n    class Toggle;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(LayerPopupItem);\n\n    // -----------------------\n    // Scene layers list popup\n    // -----------------------\n    class LayersPopup: public PopupWidget\n    {\n    public:\n        // Default constructor\n        LayersPopup(RefCounter* refCounter);\n\n        // Destructor\n        ~LayersPopup();\n\n        // Shows layers popup at position\n        void Show(const Vec2F& position);\n\n        // Updates widget and dragging animation\n        void Update(float dt) override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(LayersPopup);\n        CLONEABLE_REF(LayersPopup);\n\n    private:\n        Ref<LayerPopupItem> mItemSample; // Layer item sample @SERIALIZABLE\n\n        Vector<Ref<LayerPopupItem>> mItemsCache; // Cached items widgets\n\n        Ref<LayerPopupItem> mDraggingItem;                      // Current dragging item\n        Vec2F               mDragOffset;                        // Offset from left bottom corner of dragging item to cursor\n        float               mDragAnimTime = 0.4f;               // Node expanding time\n        Curve               mDragAnimFunc = Curve::EaseInOut(); // Expanding easing node curve\n\n        Ref<HorizontalLayout> mAddButtonLayout; // Add new layer button container layout\n        Ref<Button>           mAddButton;       // Add new layer button\n\n        private:\n        // Special drawing for contexts\n        void SpecialDraw() override;\n\n        // Returns content size for fitting by children\n        Vec2F GetContentSize() const override;\n\n        // Initializes item sample, add button\n        void InitializeControls();\n\n        // Updates item layout by index and instert coef\n        void UpdateItemLayout(const Ref<LayerPopupItem>& item, int idx);\n\n        // Updates layers list\n        void UpdateLayersList();\n\n        // Updates layers list and fits size\n        void UpdateLayersListAndFit();\n\n        // Called when item drag began\n        void BeginDragging(const Ref<LayerPopupItem>& item);\n\n        // Called until dragging\n        void UpdateDragging();\n\n        // Updates drag animation of items\n        void UpdateDragAnimation(float dt);\n\n        // it is colled when item has dropped\n        void EndDragging();\n\n        friend class LayerPopupItem;\n    };\n\n    // ----------------------\n    // Layers view popup item\n    // ----------------------\n    class LayerPopupItem: public Widget, public SelectableDragableObject\n    {\n    public:\n        // Default constructor\n        LayerPopupItem(RefCounter* refCounter);\n\n        // Copy-constructor\n        LayerPopupItem(RefCounter* refCounter, const LayerPopupItem& other);\n\n        // Copy-operator\n        LayerPopupItem& operator=(const LayerPopupItem& other);\n\n        // Sets layer and updates view\n        void SetLayer(const Ref<SceneLayer>& layer);\n\n        // Sets name edit box active\n        void BeginEditName();\n\n        // Breaks name editing\n        void BreakEditName();\n\n        // Draws widget\n        void Draw() override;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(LayerPopupItem);\n        CLONEABLE_REF(LayerPopupItem);\n\n    private:        \n        Ref<SceneLayer> mLayer;\n\n        Ref<LayersPopup> mPopup;\n\n        DragHandle mDragHandle;\n\n        Ref<Toggle>  mVisibleToggle;\n        Ref<Label>   mNameCaption;\n        Ref<Button>  mRemoveBtn;\n        Ref<EditBox> mEditBox;\n\n        float mDragInsertCoef = 0.0f;\n        float mDragTargetInsertCoef = 0.0f;\n\n    private:\n        // Called when cursor double clicked\n        void OnCursorDblClicked(const Input::Cursor& cursor) override;\n\n        // Called when started dragging\n        void OnDragStart(const Input::Cursor& cursor) override;\n\n        // Called when dragged\n        void OnDragged(const Input::Cursor& cursor, const Ref<DragDropArea>& area) override;\n\n        // Called when dragging completed\n        void OnDragEnd(const Input::Cursor& cursor) override;\n\n        // Called when name edit box has changed\n        void OnNameEditChanged(const WString& str);\n\n        // Called when visible toggle changed\n        void OnVisibleChanged(bool visible);\n\n        // Called when remove button has pressed\n        void OnRemovePressed();\n\n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class LayersPopup;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::LayersPopup)\n{\n    BASE_CLASS(o2::PopupWidget);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::LayersPopup)\n{\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mItemSample);\n    FIELD().PRIVATE().NAME(mItemsCache);\n    FIELD().PRIVATE().NAME(mDraggingItem);\n    FIELD().PRIVATE().NAME(mDragOffset);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.4f).NAME(mDragAnimTime);\n    FIELD().PRIVATE().DEFAULT_VALUE(Curve::EaseInOut()).NAME(mDragAnimFunc);\n    FIELD().PRIVATE().NAME(mAddButtonLayout);\n    FIELD().PRIVATE().NAME(mAddButton);\n}\nEND_META;\nCLASS_METHODS_META(Editor::LayersPopup)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Show, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, SpecialDraw);\n    FUNCTION().PRIVATE().SIGNATURE(Vec2F, GetContentSize);\n    FUNCTION().PRIVATE().SIGNATURE(void, InitializeControls);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateItemLayout, const Ref<LayerPopupItem>&, int);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateLayersList);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateLayersListAndFit);\n    FUNCTION().PRIVATE().SIGNATURE(void, BeginDragging, const Ref<LayerPopupItem>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateDragging);\n    FUNCTION().PRIVATE().SIGNATURE(void, UpdateDragAnimation, float);\n    FUNCTION().PRIVATE().SIGNATURE(void, EndDragging);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::LayerPopupItem)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::SelectableDragableObject);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::LayerPopupItem)\n{\n    FIELD().PRIVATE().NAME(mLayer);\n    FIELD().PRIVATE().NAME(mPopup);\n    FIELD().PRIVATE().NAME(mDragHandle);\n    FIELD().PRIVATE().NAME(mVisibleToggle);\n    FIELD().PRIVATE().NAME(mNameCaption);\n    FIELD().PRIVATE().NAME(mRemoveBtn);\n    FIELD().PRIVATE().NAME(mEditBox);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mDragInsertCoef);\n    FIELD().PRIVATE().DEFAULT_VALUE(0.0f).NAME(mDragTargetInsertCoef);\n}\nEND_META;\nCLASS_METHODS_META(Editor::LayerPopupItem)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const LayerPopupItem&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayer, const Ref<SceneLayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginEditName);\n    FUNCTION().PUBLIC().SIGNATURE(void, BreakEditName);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnCursorDblClicked, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDragStart, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDragged, const Input::Cursor&, const Ref<DragDropArea>&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDragEnd, const Input::Cursor&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnNameEditChanged, const WString&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnVisibleChanged, bool);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnRemovePressed);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/SceneWindow/SceneDragHandle.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SceneDragHandle.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Render/IRectDrawable.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n\nnamespace Editor\n{\n    SceneDragHandle::SceneDragHandle(RefCounter* refCounter):\n        DragHandle(refCounter)\n    {\n        if (WindowsManager::IsSingletonInitialzed())\n        {\n            o2EditorSceneScreen.mDragHandles.Add(Ref(this));\n            messageFallDownListener = (ScrollView*)SceneEditScreen::InstancePtr();\n        }\n    }\n\n    SceneDragHandle::SceneDragHandle(RefCounter* refCounter, const Ref<IRectDrawable>& regular, const Ref<IRectDrawable>& hover /*= nullptr*/,\n                                     const Ref<IRectDrawable>& pressed /*= nullptr*/):\n        DragHandle(refCounter, regular, hover, pressed)\n    {\n        if (WindowsManager::IsSingletonInitialzed())\n        {\n            o2EditorSceneScreen.mDragHandles.Add(Ref(this));\n            messageFallDownListener = (ScrollView*)SceneEditScreen::InstancePtr();\n        }\n    }\n\n    SceneDragHandle::SceneDragHandle(RefCounter* refCounter, const SceneDragHandle& other):\n        DragHandle(refCounter, other)\n    {\n        if (WindowsManager::IsSingletonInitialzed())\n        {\n            o2EditorSceneScreen.mDragHandles.Add(Ref(this));\n            messageFallDownListener = (ScrollView*)SceneEditScreen::InstancePtr();\n        }\n    }\n\n    SceneDragHandle::~SceneDragHandle()\n    {\n        if (WindowsManager::IsSingletonInitialzed())\n            o2EditorSceneScreen.mDragHandles.RemoveFirst([&](auto& x) { return x == this; });\n    }\n\n    SceneDragHandle& SceneDragHandle::operator=(const SceneDragHandle& other)\n    {\n        DragHandle::operator=(other);\n        return *this;\n    }\n\n    Vec2F SceneDragHandle::ScreenToLocal(const Vec2F& point)\n    {\n        return point;\n    }\n\n    Vec2F SceneDragHandle::LocalToScreen(const Vec2F& point)\n    {\n        return point;\n    }\n\n    void SceneDragHandle::Draw()\n    {\n        Vec2F cameraScale = o2EditorSceneScreen.GetCameraScale();\n        Vec2F drawablesScale(cameraScale.x, cameraScale.y);\n\n        if (mRegularDrawable)\n            mRegularDrawable->scale = drawablesScale;\n\n        if (mHoverDrawable)\n            mHoverDrawable->scale = drawablesScale;\n\n        if (mPressedDrawable)\n            mPressedDrawable->scale = drawablesScale;  \n\n        DragHandle::Draw();\n    }\n\n    void SceneDragHandle::SetEnabled(bool enable)\n    {\n        if (mEnabled == enable)\n            return;\n\n        DragHandle::SetEnabled(enable);\n\n        if (mEnabled)\n            o2EditorSceneScreen.mDragHandles.Add(Ref(this));\n        else\n            o2EditorSceneScreen.mDragHandles.Remove(Ref(this));\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::SceneDragHandle, Editor__SceneDragHandle);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/SceneWindow/SceneDragHandle.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/DragHandle.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    // -----------------\n    // Scene drag handle\n    // -----------------\n    class SceneDragHandle : public DragHandle\n    {\n    public:\n        // Default constructor\n        SceneDragHandle(RefCounter* refCounter);\n\n        // Constructor with views\n        SceneDragHandle(RefCounter* refCounter, const Ref<IRectDrawable>& regular, const Ref<IRectDrawable>& hover = nullptr, const Ref<IRectDrawable>& pressed = nullptr);\n\n        // Copy-constructor\n        SceneDragHandle(RefCounter* refCounter, const SceneDragHandle& other);\n\n        // Destructor\n        ~SceneDragHandle();\n\n        // Copy-operator\n        SceneDragHandle& operator=(const SceneDragHandle& other);\n\n        // Draws handle, applies scale if mode is scene space\n        void Draw() override;\n\n        // Set handle enabled. Disabled handle don't drawn and interact\n        void SetEnabled(bool enabled) override;\n\n        // Converts point from screen to local space\n        Vec2F ScreenToLocal(const Vec2F& point) override;\n\n        // Converts point from local to screen space\n        Vec2F LocalToScreen(const Vec2F& point) override;\n\n        SERIALIZABLE(SceneDragHandle);\n        CLONEABLE_REF(SceneDragHandle);\n\n    protected:\n        friend class SceneEditScreen;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SceneDragHandle)\n{\n    BASE_CLASS(o2::DragHandle);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SceneDragHandle)\n{\n}\nEND_META;\nCLASS_METHODS_META(Editor::SceneDragHandle)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const SceneDragHandle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, ScreenToLocal, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, LocalToScreen, const Vec2F&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/SceneWindow/SceneEditScreen.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SceneEditScreen.h\"\n\n#include \"o2/Physics/PhysicsWorld.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/SceneLayerRef.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n#include \"o2Editor/Actions/Select.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Tools/FrameTool.h\"\n#include \"o2Editor/Tools/IEditorTool.h\"\n#include \"o2Editor/Tools/MoveTool.h\"\n#include \"o2Editor/Tools/RotateTool.h\"\n#include \"o2Editor/Tools/ScaleTool.h\"\n#include \"o2Editor/Tools/SelectionTool.h\"\n#include \"o2Editor/ToolsPanel.h\"\n#include \"o2Editor/UIRoot.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneDragHandle.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditorLayer.h\"\n#include \"o2Editor/Windows/TreeWindow/DrawOrderTree.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n\nDECLARE_SINGLETON(Editor::SceneEditScreen);\n\nnamespace Editor\n{\n    SceneEditScreen::SceneEditScreen(RefCounter* refCounter):\n        Singleton<SceneEditScreen>(refCounter), ScrollView(refCounter)\n    {\n        InitializeTools();\n        SelectTool<MoveTool>();\n\n        mLeftTopWidgetsContainer = InitializeWidgetsContainer(BaseCorner::LeftTop);\n        mRightTopWidgetsContainer = InitializeWidgetsContainer(BaseCorner::RightTop);\n        mLeftBottomWidgetsContainer = InitializeWidgetsContainer(BaseCorner::LeftBottom);\n        mRightBottomWidgetsContainer = InitializeWidgetsContainer(BaseCorner::RightBottom);\n    }\n\n    SceneEditScreen::SceneEditScreen(RefCounter* refCounter, const SceneEditScreen& other) :\n        SceneEditScreen(refCounter)\n    {}\n\n    SceneEditScreen::~SceneEditScreen()\n    {}\n\n    void SceneEditScreen::Draw()\n\t{\n        ScrollView::Draw();\n\n \t\tif (mEnabledTool)\n \t\t\tmEnabledTool->DrawScreen();\n \n \t\tmEditorLayers.SortBy<int>([](auto& l) { return l->GetOrder(); });\n \n \t\tfor (auto& layer : mEditorLayers)\n \t\t{\n \t\t\tif (layer->IsEnabled() && IsLayerEnabled(layer->GetName()))\n \t\t\t\tlayer->DrawOverScene();\n \t\t}\n    }\n\n    void SceneEditScreen::NeedRedraw()\n    {\n        mNeedRedraw = true;\n    }\n\n#undef DrawText\n\n    void SceneEditScreen::Update(float dt)\n    {\n        Widget::Update(dt);\n\n        UpdateCamera(dt);\n        o2Scene.CheckChangedObjects();\n\n        for (auto& layer : mEditorLayers)\n        {\n            if (layer->IsEnabled() && IsLayerEnabled(layer->GetName()))\n                layer->Update(dt);\n        }\n\n        for (auto& tool : mTools)\n            tool->Update(dt);\n    }\n\n    bool SceneEditScreen::IsScrollable() const\n    {\n        return true;\n    }\n\n    Vec2F SceneEditScreen::ScreenToScenePoint(const Vec2F& point)\n    {\n        return ScreenToLocalPoint(point);\n    }\n\n    Vec2F SceneEditScreen::SceneToScreenPoint(const Vec2F& point)\n    {\n        return LocalToScreenPoint(point);\n    }\n\n    Vec2F SceneEditScreen::ScreenToSceneVector(const Vec2F& point)\n    {\n        return point * mViewCamera.GetScale();\n    }\n\n    Vec2F SceneEditScreen::SceneToScreenVector(const Vec2F& point)\n    {\n        return point / mViewCamera.GetScale();\n    }\n\n    void SceneEditScreen::InitializeTools()\n    {\n        mTools.Add(mmake<SelectionTool>());\n        mTools.Add(mmake<MoveTool>());\n        mTools.Add(mmake<RotateTool>());\n        mTools.Add(mmake<ScaleTool>());\n        mTools.Add(mmake<FrameTool>());\n    }\n\n    Ref<HorizontalLayout> SceneEditScreen::InitializeWidgetsContainer(BaseCorner baseCorner)\n    {\n        auto controlsWidget = mmake<HorizontalLayout>();\n        *controlsWidget->layout = WidgetLayout::BothStretch();\n        controlsWidget->baseCorner = baseCorner;\n        controlsWidget->spacing = 5;\n        controlsWidget->expandHeight = false;\n        controlsWidget->expandWidth = false;\n        controlsWidget->border = BorderF(5, 5, 5, 5);\n        controlsWidget->layout->pivot = Vec2F(1, 1);\n        AddInternalWidget(controlsWidget);\n\n        return controlsWidget;\n    }\n\n    bool SceneEditScreen::IsHandleWorking(const Input::Cursor& cursor) const\n    {\n        return false;\n    }\n\n    void SceneEditScreen::OnObjectsSelectedFromThis()\n    {\n        mSelectedFromThis = true;\n\n        o2EditorTree.SetSelectedObjects(mSelectedObjects);\n\n        if (mEnabledTool)\n            mEnabledTool->OnObjectsSelectionChanged(mSelectedObjects);\n\n        onSelectionChanged(mSelectedObjects);\n        o2EditorPropertiesWindow.SetTargets(mSelectedObjects.Convert<IObject*>([](auto x) { return (IObject*)x.Get(); }));\n    }\n\n    void SceneEditScreen::RedrawContent()\n    {\n        DrawGrid();\n        DrawObjects();\n        o2Debug.Draw(false);\n        DrawSelection();\n\n        for (auto& layer : mEditorLayers)\n        {\n            if (layer->IsEnabled() && IsLayerEnabled(layer->GetName()))\n                layer->DrawScene();\n        }\n\n        if (mEnabledTool)\n        {\n            mEnabledTool->DrawScene();\n            mEnabledTool->mNeedRedraw = false;\n\t\t}\n\n\t\tfor (auto& handle : mDragHandles)\n\t\t\thandle->Draw();\n    }\n\n    void SceneEditScreen::DrawObjects()\n    {\n        if (o2EditorTree.GetSceneTree()->IsEditorWatching())\n        {\n            static bool drawing = false;\n            if (drawing)\n                return;\n\n            drawing = true;\n            //EditorUIRoot.GetRootWidget()->Draw();\n            drawing = false;\n\n            mNeedRedraw = true;\n        }\n        else\n        {\n            o2Scene.BeginDrawingScene();\n\n            for (auto& layer : o2Scene.GetLayers())\n            {\n                if (!layer->visible)\n                    continue;\n\n                for (auto& drawable : layer->GetDrawables()) \n                    drawable->Draw();\n            }\n\n            o2Scene.EndDrawingScene();\n\n            o2Physics.DrawDebug();\n        }\n    }\n\n    void SceneEditScreen::DrawSelection()\n    {\n        if (mSelectedObjects.Count() == 1)\n        {\n            DrawObjectSelection(mSelectedObjects[0], mSelectedObjectColor);\n        }\n        else\n        {\n            for (auto& object : mSelectedObjects)\n                DrawObjectSelection(object, mMultiSelectedObjectColor);\n        }\n    }\n\n    void SceneEditScreen::DrawObjectSelection(const Ref<SceneEditableObject>& object, const Color4& color)\n    {\n        o2Render.DrawAABasis(object->GetTransform(), color, color, color);\n        // \n        //     auto bs = actor->transform->GetWorldNonSizedBasis();\n        //     o2Render.DrawLine(bs.offs, bs.offs + bs.xv*100.0f);\n        //     o2Render.DrawLine(bs.offs, bs.offs + bs.yv*100.0f);\n    }\n\n    void SceneEditScreen::SelectObjects(const Vector<Ref<SceneEditableObject>>& objects, bool additive /*= true*/)\n    {\n        auto prevSelectedObjects = mSelectedObjects;\n\n        SelectObjectsWithoutAction(objects, additive);\n\n        if (mSelectedObjects != prevSelectedObjects)\n        {\n            auto selectionAction = mmake<SelectAction>(mSelectedObjects, prevSelectedObjects);\n            o2EditorSceneWindow.DoneAction(selectionAction);\n        }\n    }\n\n    void SceneEditScreen::SelectObject(const Ref<SceneEditableObject>& actor, bool additive /*= true*/)\n    {\n        auto prevSelectedObjects = mSelectedObjects;\n\n        SelectObjectWithoutAction(actor, additive);\n\n        if (mSelectedObjects != prevSelectedObjects)\n        {\n            auto selectionAction = mmake<SelectAction>(mSelectedObjects, prevSelectedObjects);\n            o2EditorSceneWindow.DoneAction(selectionAction);\n        }\n    }\n\n    void SceneEditScreen::SelectAllObjects()\n    {\n        auto prevSelectedObjects = mSelectedObjects;\n\n        mSelectedObjects = o2Scene.GetAllActors().\n            FindAll([](auto& x) { return !x.Lock()->IsLockedInHierarchy(); }).\n            Convert<Ref<SceneEditableObject>>([](auto& x) { return DynamicCast<SceneEditableObject>(x.Lock()); });\n\n        mNeedRedraw = true;\n        OnObjectsSelectedFromThis();\n\n        if (mSelectedObjects != prevSelectedObjects)\n        {\n            auto selectionAction = mmake<SelectAction>(mSelectedObjects, prevSelectedObjects);\n            o2EditorSceneWindow.DoneAction(selectionAction);\n        }\n    }\n\n    void SceneEditScreen::ClearSelection()\n    {\n        auto prevSelectedObjects = mSelectedObjects;\n\n        ClearSelectionWithoutAction();\n\n        if (mSelectedObjects != prevSelectedObjects)\n        {\n            auto selectionAction = mmake<SelectAction>(mSelectedObjects, prevSelectedObjects);\n            o2EditorSceneWindow.DoneAction(selectionAction);\n        }\n    }\n\n    const Ref<HorizontalLayout>& SceneEditScreen::GetLeftTopWidgetsContainer()\n    {\n        return mLeftTopWidgetsContainer;\n    }\n\n    const Ref<HorizontalLayout>& SceneEditScreen::GetRightTopWidgetsContainer()\n    {\n        return mRightTopWidgetsContainer;\n    }\n\n    const Ref<HorizontalLayout>& SceneEditScreen::GetLeftBottomWidgetsContainer()\n    {\n        return mLeftBottomWidgetsContainer;\n    }\n\n    const Ref<HorizontalLayout>& SceneEditScreen::GetRightBottomWidgetsContainer()\n    {\n        return mRightBottomWidgetsContainer;\n    }\n\n    void SceneEditScreen::AddEditorLayer(const Ref<SceneEditorLayer>& layer)\n    {\n        mEditorLayers.Add(layer);\n    }\n\n    void SceneEditScreen::RemoveEditorLayer(const Ref<SceneEditorLayer>& layer)\n    {\n        mEditorLayers.Remove(layer);\n    }\n\n    void SceneEditScreen::SetLayerEnabled(const String& name, bool enabled)\n    {\n        mEditorLayersEnabled[name] = enabled;\n    }\n\n    bool SceneEditScreen::IsLayerEnabled(const String& name) const\n    {\n        bool enabled = true;\n        mEditorLayersEnabled.TryGetValue(name, enabled);\n        return enabled;\n    }\n\n    void SceneEditScreen::SelectTool(const Ref<IEditTool>& tool)\n    {\n        if (tool == mEnabledTool)\n            return;\n\n        if (mEnabledTool)\n            mEnabledTool->OnDisabled();\n\n        mEnabledTool = tool;\n        if (auto toggle = mEnabledTool->GetPanelToggle())\n            toggle->SetValue(true);\n\n        if (mEnabledTool)\n            mEnabledTool->OnEnabled();\n    }\n\n    const Ref<IEditTool>& SceneEditScreen::GetSelectedTool() const\n    {\n        return mEnabledTool;\n    }\n\n    void SceneEditScreen::AddTool(const Ref<IEditTool>& tool)\n    {\n        mTools.Add(tool);\n        o2EditorTools.AddToolToggle(tool->GetPanelToggle());\n    }\n\n    void SceneEditScreen::RemoveTool(const Ref<IEditTool>& tool)\n    {\n        if (tool == mEnabledTool)\n        {\n            if (!mTools.IsEmpty())\n                SelectTool(mTools[0]);\n            else\n                SelectTool(nullptr);\n        }\n\n        mTools.Remove(tool);\n        o2EditorTools.RemoveToolToggle(tool->GetPanelToggle());\n    }\n\n    const Vector<Ref<IEditTool>>& SceneEditScreen::GetTools() const\n    {\n        return mTools;\n    }\n\n    const Vector<Ref<SceneEditableObject>>& SceneEditScreen::GetSelectedObjects() const\n    {\n        return mSelectedObjects;\n    }\n\n    const Vector<Ref<SceneEditableObject>>& SceneEditScreen::GetTopSelectedObjects() const\n    {\n        return mTopSelectedObjects;\n    }\n\n    const Color4& SceneEditScreen::GetSingleObjectSelectionColor() const\n    {\n        return mSelectedObjectColor;\n    }\n\n    const Color4& SceneEditScreen::GetManyObjectsSelectionColor() const\n    {\n        return mMultiSelectedObjectColor;\n    }\n\n    bool SceneEditScreen::IsUnderPoint(const Vec2F& point)\n    {\n        return true;\n    }\n\n    Ref<RefCounterable> SceneEditScreen::CastToRefCounterable(const Ref<SceneEditScreen>& ref)\n    {\n        return DynamicCast<Singleton<SceneEditScreen>>(ref);\n    }\n\n    void SceneEditScreen::BindSceneTree()\n    {\n        o2EditorTree.GetSceneTree()->onObjectsSelectionChanged += THIS_FUNC(OnTreeSelectionChanged);\n        o2EditorTree.GetDrawOrderTree()->onObjectsSelectionChanged += THIS_FUNC(OnTreeSelectionChanged);\n\n        o2Scene.onObjectsChanged += Function<void(Vector<Ref<SceneEditableObject>>)>(this, &SceneEditScreen::OnSceneChanged);\n    }\n\n    void SceneEditScreen::OnTreeSelectionChanged(Vector<Ref<SceneEditableObject>> selectedObjects)\n    {\n        if (mSelectedFromThis)\n        {\n            mSelectedFromThis = false;\n            return;\n        }\n\n        auto prevSelectedObjects = mSelectedObjects;\n\n        mSelectedObjects = selectedObjects;\n        mNeedRedraw = true;\n\n        UpdateTopSelectedObjects();\n\n        if (mEnabledTool)\n            mEnabledTool->OnObjectsSelectionChanged(mSelectedObjects);\n\n        auto selectedIObjects = mSelectedObjects.Convert<IObject*>([](auto& x) { return dynamic_cast<IObject*>(x.Get()); });\n\n        if (mSelectedObjects != prevSelectedObjects ||\n            selectedIObjects != o2EditorPropertiesWindow.GetTargets())\n        {\n            auto selectionAction = mmake<SelectAction>(mSelectedObjects, prevSelectedObjects);\n            if (auto sceneWindow = o2EditorWindows.GetWindow<SceneWindow>())\n                sceneWindow->DoneAction(selectionAction);\n\n            onSelectionChanged(mSelectedObjects);\n            o2EditorPropertiesWindow.SetTargets(selectedIObjects);\n        }\n    }\n\n    void SceneEditScreen::UpdateTopSelectedObjects()\n    {\n        mTopSelectedObjects.Clear();\n        for (auto& object : mSelectedObjects)\n        {\n            bool processing = true;\n\n            auto parent = object->GetEditableParent();\n            while (parent)\n            {\n                if (mSelectedObjects.Contains([&](auto x) { return parent == x; }))\n                {\n                    processing = false;\n                    break;\n                }\n\n                parent = parent->GetEditableParent();\n            }\n\n            if (processing)\n                mTopSelectedObjects.Add(object);\n        }\n    }\n\n    void SceneEditScreen::OnSceneChanged(Vector<Ref<SceneEditableObject>> actors)\n    {\n        mNeedRedraw = true;\n\n        if (mEnabledTool)\n            mEnabledTool->OnSceneChanged(actors);\n    }\n\n    void SceneEditScreen::OnSceneChanged()\n    {\n        mNeedRedraw = true;\n    }\n\n    void SceneEditScreen::ClearSelectionWithoutAction(bool sendSelectedMessage /*= true*/)\n    {\n        mSelectedObjects.Clear();\n        mTopSelectedObjects.Clear();\n        mNeedRedraw = true;\n\n        if (sendSelectedMessage)\n            OnObjectsSelectedFromThis();\n    }\n\n    void SceneEditScreen::SelectObjectsWithoutAction(Vector<Ref<SceneEditableObject>> objects, bool additive /*= true*/)\n    {\n        if (!additive)\n            mSelectedObjects.Clear();\n\n        mSelectedObjects.Add(objects);\n        mNeedRedraw = true;\n\n        UpdateTopSelectedObjects();\n        OnObjectsSelectedFromThis();\n    }\n\n    void SceneEditScreen::SelectObjectWithoutAction(const Ref<SceneEditableObject>& object, bool additive /*= true*/)\n    {\n        if (!additive)\n            mSelectedObjects.Clear();\n\n        mSelectedObjects.Add(object);\n        mNeedRedraw = true;\n\n        UpdateTopSelectedObjects();\n        OnObjectsSelectedFromThis();\n    }\n\n    void SceneEditScreen::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (!assetsScroll)\n            return;\n\n        assetsScroll->RegObjectsCreationAction();\n\n        o2UI.FocusWidget(o2EditorTree.GetSceneTree());\n        o2EditorTree.GetSceneTree()->SetSelectedObjects(assetsScroll->mInstantiatedSceneDragObjects);\n\n        assetsScroll->mInstantiatedSceneDragObjects.Clear();\n\n        o2Application.SetCursor(CursorType::Arrow);\n    }\n\n    void SceneEditScreen::OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (!assetsScroll)\n            return;\n\n        assetsScroll->InstantiateDraggingAssets();\n        if (assetsScroll->mInstantiatedSceneDragObjects.Count() > 0)\n            o2Application.SetCursor(CursorType::Hand);\n    }\n\n    void SceneEditScreen::OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (!assetsScroll)\n            return;\n\n        for (auto& object : assetsScroll->mInstantiatedSceneDragObjects)\n        {\n            object->UpdateTransform();\n            Basis transform = object->GetTransform();\n            transform.origin = ScreenToScenePoint(o2Input.cursorPos) - (transform.xv + transform.yv) * 0.5f;\n            object->SetTransform(transform);\n        }\n    }\n\n    void SceneEditScreen::OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (!assetsScroll)\n            return;\n\n        assetsScroll->ClearInstantiatedDraggingAssets();\n        o2Application.SetCursor(CursorType::Arrow);\n\n        mNeedRedraw = true;\n    }\n\n    bool SceneEditScreen::IsInputTransparent() const\n    {\n        return true;\n    }\n\n    void SceneEditScreen::OnScrolled(float scroll)\n    {\n        ScrollView::OnScrolled(scroll);\n\n        if (mEnabledTool)\n            mEnabledTool->OnScrolled(scroll);\n    }\n\n    void SceneEditScreen::OnKeyPressed(const Input::Key& key)\n    {\n        if (mEnabledTool)\n            mEnabledTool->OnKeyPressed(key);\n    }\n\n    void SceneEditScreen::OnKeyReleased(const Input::Key& key)\n    {\n        if (mEnabledTool)\n            mEnabledTool->OnKeyReleased(key);\n    }\n\n    void SceneEditScreen::OnKeyStayDown(const Input::Key& key)\n    {\n        if (mEnabledTool)\n            mEnabledTool->OnKeyStayDown(key);\n    }\n\n    void SceneEditScreen::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        if (mParentWidget)\n\t\t\tmParentWidget.Lock()->Focus();\n\n        o2EditorTree.OnSceneFocused();\n\n        if (mEnabledTool && !IsHandleWorking(cursor))\n            mEnabledTool->OnCursorPressed(cursor);\n    }\n\n    void SceneEditScreen::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool && !IsHandleWorking(cursor))\n            mEnabledTool->OnCursorReleased(cursor);\n    }\n\n    void SceneEditScreen::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool && !IsHandleWorking(cursor))\n            mEnabledTool->OnCursorPressBreak(cursor);\n    }\n\n    void SceneEditScreen::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool && !IsHandleWorking(cursor))\n            mEnabledTool->OnCursorStillDown(cursor);\n    }\n\n    void SceneEditScreen::OnCursorMoved(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool && !IsHandleWorking(cursor))\n            mEnabledTool->OnCursorMoved(cursor);\n    }\n\n    void SceneEditScreen::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool && !IsHandleWorking(cursor))\n            mEnabledTool->OnCursorEnter(cursor);\n    }\n\n    void SceneEditScreen::OnCursorExit(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool && !IsHandleWorking(cursor))\n            mEnabledTool->OnCursorExit(cursor);\n    }\n\n    void SceneEditScreen::OnCursorRightMousePressed(const Input::Cursor& cursor)\n\t{\n\t\tif (mParentWidget)\n\t\t\tmParentWidget.Lock()->Focus();\n\n\t\to2EditorTree.OnSceneFocused();\n\n        if (mEnabledTool && !IsHandleWorking(cursor))\n            mEnabledTool->OnCursorRightMousePressed(cursor);\n\n        ScrollView::OnCursorRightMousePressed(cursor);\n    }\n\n    void SceneEditScreen::OnCursorRightMouseStayDown(const Input::Cursor& cursor)\n    {\n        ScrollView::OnCursorRightMouseStayDown(cursor);\n\n        if (mEnabledTool)\n            mEnabledTool->OnCursorRightMouseStayDown(cursor);\n    }\n\n    void SceneEditScreen::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool)\n            mEnabledTool->OnCursorRightMouseReleased(cursor);\n\n        ScrollView::OnCursorRightMouseReleased(cursor);\n    }\n\n    void SceneEditScreen::OnCursorMiddleMousePressed(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool)\n            mEnabledTool->OnCursorMiddleMousePressed(cursor);\n    }\n\n    void SceneEditScreen::OnCursorMiddleMouseStayDown(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool)\n            mEnabledTool->OnCursorMiddleMouseStayDown(cursor);\n    }\n\n    void SceneEditScreen::OnCursorMiddleMouseReleased(const Input::Cursor& cursor)\n    {\n        if (mEnabledTool)\n            mEnabledTool->OnCursorMiddleMouseReleased(cursor);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::SceneEditScreen>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SceneEditScreen, Editor__SceneEditScreen);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/SceneWindow/SceneEditScreen.h",
    "content": "#pragma once\n\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Render/Camera.h\"\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Editor/DragAndDrop.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2Editor/UI/ScrollView.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Sprite;\n    class SceneEditableObject;\n    class Component;\n    class Tree;\n}\n\n// Editor scene screen accessor macros\n#define o2EditorSceneScreen SceneEditScreen::Instance()\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(IEditTool);\n    FORWARD_CLASS_REF(SceneDragHandle);\n    FORWARD_CLASS_REF(SceneEditorLayer);\n    FORWARD_CLASS_REF(SceneHierarchyTree);\n\n    // --------------------\n    // Scene editing screen\n    // --------------------\n    class SceneEditScreen : public Singleton<SceneEditScreen>, public ScrollView, public DragDropArea, public KeyboardEventsListener\n    {\n    public:\n        Function<void(const Vector<Ref<SceneEditableObject>>&)> onSelectionChanged; // Actors selection change event\n\n        // Default constructor\n        SceneEditScreen(RefCounter* refCounter);\n\n        // Copy-constructor\n        SceneEditScreen(RefCounter* refCounter, const SceneEditScreen& other);\n\n        // Destructor\n        ~SceneEditScreen();\n\n        // Draws widget\n        void Draw() override;\n\n        // Called when required to redraw content. Sets flag and redraws at next frame\n        void NeedRedraw();\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Transforms point from screen space to scene space\n        Vec2F ScreenToScenePoint(const Vec2F& point);\n\n        // Transforms point from scene space to screen space\n        Vec2F SceneToScreenPoint(const Vec2F& point);\n\n        // Transforms point from screen space to scene space\n        Vec2F ScreenToSceneVector(const Vec2F& point);\n\n        // Transforms point from scene space to screen space\n        Vec2F SceneToScreenVector(const Vec2F& point);\n\n        // Draws object selection\n        void DrawObjectSelection(const Ref<SceneEditableObject>& object, const Color4& color);\n\n        // Selects objects\n        void SelectObjects(const Vector<Ref<SceneEditableObject>>& objects, bool additive = true);\n\n        // Selects object\n        void SelectObject(const Ref<SceneEditableObject>& object, bool additive = true);\n\n        // Selects all objects\n        void SelectAllObjects();\n\n        // Clears objects selection\n        void ClearSelection();\n\n        // Returns left top widgets container, can be used for tools additional controls\n        const Ref<HorizontalLayout>& GetLeftTopWidgetsContainer();\n\n        // Returns right top widgets container, can be used for tools additional controls\n        const Ref<HorizontalLayout>& GetRightTopWidgetsContainer();\n\n        // Returns left bottom widgets container, can be used for tools additional controls\n        const Ref<HorizontalLayout>& GetLeftBottomWidgetsContainer();\n\n        // Returns right bottom widgets container, can be used for tools additional controls\n        const Ref<HorizontalLayout>& GetRightBottomWidgetsContainer();\n\n        // Adds editable layer\n        void AddEditorLayer(const Ref<SceneEditorLayer>& layer);\n\n        // Removes editable layer\n        void RemoveEditorLayer(const Ref<SceneEditorLayer>& layer);\n\n        // Sets layers with name enabled\n        void SetLayerEnabled(const String& name, bool enabled);\n\n        // Returns is layer enabled\n        bool IsLayerEnabled(const String& name) const;\n\n        // Selects tool with type\n        template<typename _type>\n        void SelectTool();\n\n        // Selects tool\n        void SelectTool(const Ref<IEditTool>& tool);\n\n        // Returns selected tool\n        const Ref<IEditTool>& GetSelectedTool() const;\n\n        // Adds tool\n        void AddTool(const Ref<IEditTool>& tool);\n\n        // Removes tool\n        void RemoveTool(const Ref<IEditTool>& tool);\n\n        // Returns tool by type, or null if it doesn't exists\n        template<typename _type>\n        Ref<_type> GetTool();\n\n        // Returns all registered tools\n        const Vector<Ref<IEditTool>>& GetTools() const;\n\n        // Returns selected objects array\n        const Vector<Ref<SceneEditableObject>>& GetSelectedObjects() const;\n\n        // Returns top selected objects in hierarchy\n        const Vector<Ref<SceneEditableObject>>& GetTopSelectedObjects() const;\n\n        // Returns color for single selected object\n        const Color4& GetSingleObjectSelectionColor() const;\n\n        // Return color for multiple selected objects\n        const Color4& GetManyObjectsSelectionColor() const;\n\n        // Called when scene was changed and needs to redraw\n        void OnSceneChanged();\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Dynamic cast to RefCounterable via Singleton<SceneEditScreen>\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<SceneEditScreen>& ref);\n\n        SERIALIZABLE(SceneEditScreen);\n        CLONEABLE_REF(SceneEditScreen);\n\n    protected:\n        Color4 mSelectedObjectColor = Color4(220, 220, 220, 255);      // Selected object color\n        Color4 mMultiSelectedObjectColor = Color4(220, 220, 220, 100); // Selected object color\n        float  mObjectMinimalSelectionSize = 10.0f;                    // Minimal object size on pixels\n\n        Vector<Ref<SceneEditableObject>> mSelectedObjects;          // Current selected objects\n        Vector<Ref<SceneEditableObject>> mTopSelectedObjects;       // Current selected objects most top in hierarchy\n        bool                             mSelectedFromThis = false; // True if selection changed from this, needs to break recursive selection update\n\n        Vector<Ref<IEditTool>> mTools;       // Available tools\n        Ref<IEditTool>         mEnabledTool; // Current enabled tool\n\n        Vector<Ref<SceneDragHandle>> mDragHandles; // Dragging handles array\n\n        Vector<Ref<SceneEditorLayer>> mEditorLayers;        // List of editable layers\n        Map<String, bool>             mEditorLayersEnabled; // Map of enabled or disabled layers by user\n\n        Ref<HorizontalLayout> mLeftTopWidgetsContainer;     // Additional controls widgets container at left top\n        Ref<HorizontalLayout> mRightTopWidgetsContainer;    // Additional controls widgets container at right top\n        Ref<HorizontalLayout> mLeftBottomWidgetsContainer;  // Additional controls widgets container at left bottom\n        Ref<HorizontalLayout> mRightBottomWidgetsContainer; // Additional controls widgets container at right bottom\n\n    protected:\n        // Initializes tools\n        void InitializeTools();\n\n        // Creates and configures widgets container with specified base corner\n        Ref<HorizontalLayout> InitializeWidgetsContainer(BaseCorner baseCorner);\n\n        // Returns true if some handle hovered or pressed by cursor\n        bool IsHandleWorking(const Input::Cursor& cursor) const;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was pressed on this\n        void OnCursorRightMousePressed(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button stay down on this\n        void OnCursorRightMouseStayDown(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Called when middle mouse button was pressed on this\n        void OnCursorMiddleMousePressed(const Input::Cursor& cursor) override;\n\n        // Called when middle mouse button stay down on this\n        void OnCursorMiddleMouseStayDown(const Input::Cursor& cursor) override;\n\n        // Called when middle mouse button was released (only when middle mouse button pressed this at previous time)\n        void OnCursorMiddleMouseReleased(const Input::Cursor& cursor) override;\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when key was released\n        void OnKeyReleased(const Input::Key& key) override;\n\n        // Called when key stay down during frame\n        void OnKeyStayDown(const Input::Key& key) override;\n\n        // Called when changed selected objects from this\n        void OnObjectsSelectedFromThis();\n\n        // Redraws scene texture\n        void RedrawContent() override;\n\n        // Draws objects drawables components\n        void DrawObjects();\n\n        // Draws selection on objects\n        void DrawSelection();\n\n        // Binds to scene tree selection window\n        void BindSceneTree();\n\n        // Called when scene tree selection changed\n        void OnTreeSelectionChanged(Vector<Ref<SceneEditableObject>> selectedObjects);\n\n        // Updates top selected objects\n        void UpdateTopSelectedObjects();\n\n        // Called when objects was changed\n        void OnSceneChanged(Vector<Ref<SceneEditableObject>> objects);\n\n        // Clears objects selection\n        void ClearSelectionWithoutAction(bool sendSelectedMessage = true);\n\n        // Selects objects\n        void SelectObjectsWithoutAction(Vector<Ref<SceneEditableObject>> objects, bool additive = true);\n\n        // Selects object\n        void SelectObjectWithoutAction(const Ref<SceneEditableObject>& object, bool additive = true);\n\n        // Called when some selectable listeners was dropped to this\n        void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was entered to this area\n        void OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was dragged above this area\n        void OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was exited from this area\n        void OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Returns that this has transparent input\n        bool IsInputTransparent() const override;\n\n        REF_COUNTERABLE_IMPL(ScrollView);\n\n        friend class DeleteAction;\n        friend class SelectAction;\n        friend class SelectionTool;\n        friend class SceneDragHandle;\n        friend class SceneWindow;\n        friend class TreeWindow;\n        friend class CreateAction;\n    };\n}\n\n#include \"o2Editor/Tools/IEditorTool.h\"\n\nnamespace Editor\n{\n    template<typename _type>\n    void SceneEditScreen::SelectTool()\n    {\n        SelectTool(mTools.FindOrDefault([&](auto x) { return x->GetType() == TypeOf(_type); }));\n    }\n\n    template<typename _type>\n    Ref<_type> SceneEditScreen::GetTool()\n    {\n        for (auto& tool : mTools) \n        {\n            if (auto typedTool = DynamicCast<_type>(tool))\n                return typedTool;\n        }\n\n        return nullptr;\n    }\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SceneEditScreen)\n{\n    BASE_CLASS(o2::Singleton<SceneEditScreen>);\n    BASE_CLASS(Editor::ScrollView);\n    BASE_CLASS(o2::DragDropArea);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SceneEditScreen)\n{\n    FIELD().PUBLIC().NAME(onSelectionChanged);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(220, 220, 220, 255)).NAME(mSelectedObjectColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4(220, 220, 220, 100)).NAME(mMultiSelectedObjectColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(10.0f).NAME(mObjectMinimalSelectionSize);\n    FIELD().PROTECTED().NAME(mSelectedObjects);\n    FIELD().PROTECTED().NAME(mTopSelectedObjects);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mSelectedFromThis);\n    FIELD().PROTECTED().NAME(mTools);\n    FIELD().PROTECTED().NAME(mEnabledTool);\n    FIELD().PROTECTED().NAME(mDragHandles);\n    FIELD().PROTECTED().NAME(mEditorLayers);\n    FIELD().PROTECTED().NAME(mEditorLayersEnabled);\n    FIELD().PROTECTED().NAME(mLeftTopWidgetsContainer);\n    FIELD().PROTECTED().NAME(mRightTopWidgetsContainer);\n    FIELD().PROTECTED().NAME(mLeftBottomWidgetsContainer);\n    FIELD().PROTECTED().NAME(mRightBottomWidgetsContainer);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SceneEditScreen)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const SceneEditScreen&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, NeedRedraw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, ScreenToScenePoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, SceneToScreenPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, ScreenToSceneVector, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, SceneToScreenVector, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, DrawObjectSelection, const Ref<SceneEditableObject>&, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectObjects, const Vector<Ref<SceneEditableObject>>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectObject, const Ref<SceneEditableObject>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectAllObjects);\n    FUNCTION().PUBLIC().SIGNATURE(void, ClearSelection);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<HorizontalLayout>&, GetLeftTopWidgetsContainer);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<HorizontalLayout>&, GetRightTopWidgetsContainer);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<HorizontalLayout>&, GetLeftBottomWidgetsContainer);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<HorizontalLayout>&, GetRightBottomWidgetsContainer);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEditorLayer, const Ref<SceneEditorLayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveEditorLayer, const Ref<SceneEditorLayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayerEnabled, const String&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLayerEnabled, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectTool, const Ref<IEditTool>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<IEditTool>&, GetSelectedTool);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddTool, const Ref<IEditTool>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTool, const Ref<IEditTool>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<IEditTool>>&, GetTools);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<SceneEditableObject>>&, GetSelectedObjects);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<SceneEditableObject>>&, GetTopSelectedObjects);\n    FUNCTION().PUBLIC().SIGNATURE(const Color4&, GetSingleObjectSelectionColor);\n    FUNCTION().PUBLIC().SIGNATURE(const Color4&, GetManyObjectsSelectionColor);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnSceneChanged);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<SceneEditScreen>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeTools);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<HorizontalLayout>, InitializeWidgetsContainer, BaseCorner);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsHandleWorking, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMousePressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseStayDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMiddleMousePressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMiddleMouseStayDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMiddleMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyStayDown, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectsSelectedFromThis);\n    FUNCTION().PROTECTED().SIGNATURE(void, RedrawContent);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawObjects);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawSelection);\n    FUNCTION().PROTECTED().SIGNATURE(void, BindSceneTree);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTreeSelectionChanged, Vector<Ref<SceneEditableObject>>);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTopSelectedObjects);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSceneChanged, Vector<Ref<SceneEditableObject>>);\n    FUNCTION().PROTECTED().SIGNATURE(void, ClearSelectionWithoutAction, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, SelectObjectsWithoutAction, Vector<Ref<SceneEditableObject>>, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, SelectObjectWithoutAction, const Ref<SceneEditableObject>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDropped, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnter, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraggedAbove, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExit, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsInputTransparent);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/SceneWindow/SceneEditorLayer.h",
    "content": "#pragma once\n#include \"o2/Utils/Types/StringDef.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nusing namespace o2;\n\nnamespace Editor\n{\n    class SceneEditorLayer: virtual public RefCounterable\n    {\n    public:\n        virtual void DrawScene() {}\n        virtual void DrawOverScene() {}\n        virtual void Update(float dt) {}\n\n        virtual int GetOrder() const { return 0; }\n\n        virtual bool IsEnabled() const { return true; }\n\n        virtual const String& GetName() const = 0;\n        virtual const String& GetIconName() const = 0;\n    };\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/SceneWindow/SceneWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SceneWindow.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/CustomDropDown.h\"\n#include \"o2Editor/Windows/SceneWindow/LayersPopup.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/EditorConfig.h\"\n\nDECLARE_SINGLETON(Editor::SceneWindow);\n\nnamespace Editor\n{\n    SceneWindow::SceneWindow(RefCounter* refCounter) :\n        Singleton<SceneWindow>(refCounter), IAssetEditorWindow(refCounter)\n    {\n        InitializeWindow();\n    }\n\n    SceneWindow::SceneWindow(RefCounter* refCounter, const SceneWindow& other) :\n        Singleton<SceneWindow>(refCounter), IAssetEditorWindow(refCounter, other)\n    {\n        InitializeWindow();\n    }\n\n    SceneWindow::~SceneWindow()\n    {}\n\n    Ref<RefCounterable> SceneWindow::CastToRefCounterable(const Ref<SceneWindow>& ref)\n    {\n        return DynamicCast<Singleton<SceneWindow>>(ref);\n    }\n\n    void SceneWindow::InitializeWindow()\n    {\n        IAssetEditorWindow::InitializeWindow();\n\n        mWindow->caption = \"Scene\";\n        mWindow->name = \"scene window\";\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_scene_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(-2, 2)));\n\n        mEditWidget = mmake<SceneEditScreen>();\n        *mEditWidget->layout = WidgetLayout::BothStretch(0, 0, 0, 21);\n        mWindow->AddChild(mEditWidget);\n\n        mLayersButton = o2UI.CreateWidget<Button>(\"panel down\");\n        mLayersButton->caption = \"Layers\";\n        *mLayersButton->layout = WidgetLayout::VerStretch(HorAlign::Right, 0, 0, 100, 0);\n        mUpPanel->AddChild(mLayersButton);\n\n        mLayersPopup = mmake<LayersPopup>();\n        mLayersButton->AddChild(mLayersPopup);\n\n        mLayersButton->onClick = [&]() { mLayersPopup->Show(mLayersButton->layout->worldLeftBottom); };\n    }\n\n    String SceneWindow::GetWindowTitle() const\n    {\n        return \"Scene\";\n    }\n\n    void SceneWindow::PostInitializeWindow()\n    {\n        o2EditorSceneScreen.BindSceneTree();\n    }\n\n    const Type& SceneWindow::GetAssetType() const\n    {\n        return TypeOf(SceneAsset);\n    }\n\n    bool SceneWindow::IsCreateNewAssetAtStartupEnabled() const\n    {\n        return false;\n    }\n\n    void SceneWindow::OnStartEditingAsset()\n    {\n        if (auto sceneAsset = DynamicCast<SceneAsset>(mEditingAsset.Lock()))\n        {\n            ForcePopEditorScopeOnStack scope;\n            sceneAsset->Load();\n\n            if (EditorConfig::IsSingletonInitialzed())\n                o2EditorConfig.projectConfig.lastLoadedScene = sceneAsset->GetPath();\n        }\n    }\n\n    void SceneWindow::OnCompletedEditingAsset()\n    {\n    }\n\n    AssetRef<Asset> SceneWindow::CreateAssetInstance()\n    {\n        return AssetRef<SceneAsset>(mmake<SceneAsset>());\n    }\n\n    void SceneWindow::OnAssetSaved()\n    {\n    }\n\n    void SceneWindow::OnActionDone(const Ref<IAction>& action)\n    {\n        OnAssetChanged();\n    }\n\n    void SceneWindow::OnActionUndo(const Ref<IAction>& action)\n    {\n        OnAssetChanged();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::SceneWindow, Editor__SceneWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/SceneWindow/SceneWindow.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Singleton.h\"\n#include \"o2Editor/Windows/IAssetEditorWindow.h\"\n#include \"o2/Assets/Types/SceneAsset.h\"\n\nnamespace o2\n{\n    class PopupWidget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(LayersPopup);\n    FORWARD_CLASS_REF(SceneEditScreen);\n\n    // Scene window accessor macro\n    #define o2EditorSceneWindow SceneWindow::Instance()\n\n    // --------------------\n    // Scene editing window\n    // --------------------\n    class SceneWindow: public Singleton<SceneWindow>, public IAssetEditorWindow\n    {\n    public:\n        IOBJECT(SceneWindow);\n        REF_COUNTERABLE_IMPL(IAssetEditorWindow, Singleton<SceneWindow>);\n\n        // Dynamic cast to RefCounterable via Singleton<SceneWindow>\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<SceneWindow>& ref);\n\n    protected:\n        Ref<SceneEditScreen> mEditWidget; // Scene editing widget\n\n        Ref<Button>      mLayersButton; // Layers button\n        Ref<LayersPopup> mLayersPopup;  // Layers popup\n\n        Ref<PopupWidget> mGizomsView; // Gizoms view\n\n    public:\n        // Default constructor with ref counter\n        SceneWindow(RefCounter* refCounter);\n\n        // Copy constructor with ref counter\n        SceneWindow(RefCounter* refCounter, const SceneWindow& other);\n\n        // Destructor\n        ~SceneWindow();\n\n        // Returns asset type that this editor window can edit\n        const Type& GetAssetType() const override;\n\n    protected:\n        // Initializes window and controls\n        void InitializeWindow() override;\n\n        // Returns window title\n        String GetWindowTitle() const override;\n\n        // Called after that all windows was created\n        void PostInitializeWindow() override;\n\n        // Returns true if create new asset at startup is enabled\n        bool IsCreateNewAssetAtStartupEnabled() const override;\n\n        // Called when asset editing starts\n        void OnStartEditingAsset() override;\n\n        // Called when asset editing ends\n        void OnCompletedEditingAsset() override;\n\n        // Creates new asset instance by editing asset type\n        AssetRef<Asset> CreateAssetInstance() override;\n\n        // Called when asset is saved\n        void OnAssetSaved() override;\n\n        // Called when an action has been done (including redo)\n        void OnActionDone(const Ref<IAction>& action) override;\n\n        // Called when an action has been undone\n        void OnActionUndo(const Ref<IAction>& action) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SceneWindow)\n{\n    BASE_CLASS(o2::Singleton<SceneWindow>);\n    BASE_CLASS(Editor::IAssetEditorWindow);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SceneWindow)\n{\n    FIELD().PROTECTED().NAME(mEditWidget);\n    FIELD().PROTECTED().NAME(mLayersButton);\n    FIELD().PROTECTED().NAME(mLayersPopup);\n    FIELD().PROTECTED().NAME(mGizomsView);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SceneWindow)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<SceneWindow>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const SceneWindow&);\n    FUNCTION().PUBLIC().SIGNATURE(const Type&, GetAssetType);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(String, GetWindowTitle);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostInitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsCreateNewAssetAtStartupEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStartEditingAsset);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCompletedEditingAsset);\n    FUNCTION().PROTECTED().SIGNATURE(AssetRef<Asset>, CreateAssetInstance);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAssetSaved);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnActionDone, const Ref<IAction>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnActionUndo, const Ref<IAction>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/TreeWindow/DrawOrderTree.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"DrawOrderTree.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/CameraActor.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetIcon.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsWindow.h\"\n#include \"o2Editor/Actions/Enable.h\"\n#include \"o2Editor/Actions/Lock.h\"\n#include \"o2Editor/Actions/PropertyChange.h\"\n#include \"o2Editor/Actions/Reparent.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Properties/Basic/ActorProperty.h\"\n#include \"o2Editor/Properties/Basic/ComponentProperty.h\"\n#include \"o2Editor/UIRoot.h\"\n\nnamespace Editor\n{\n    DrawOrderTree::DrawOrderTree(RefCounter* refCounter) :\n        Tree(refCounter), mAttachedToSceneEvents(false), mDragActorPropertyField(nullptr), mDragComponentPropertyField(nullptr)\n    {\n        mNodeWidgetSample = mmake<DrawOrderTreeNode>();\n        mNodeWidgetSample->layout->minHeight = 20;\n        mNodeWidgetSample->AddLayer(\"caption\", nullptr);\n\n        Initialize();\n    }\n\n    DrawOrderTree::DrawOrderTree(RefCounter* refCounter, const DrawOrderTree& other) :\n        Tree(refCounter, other), mAttachedToSceneEvents(false), mDragActorPropertyField(nullptr), mDragComponentPropertyField(nullptr)\n    {\n        Initialize();\n    }\n\n    DrawOrderTree::DrawOrderTree(const DrawOrderTree& other):\n        DrawOrderTree(nullptr, other)\n    {}\n\n    DrawOrderTree::~DrawOrderTree()\n    {\n        DeattachFromSceneEvents();\n    }\n\n    DrawOrderTree& DrawOrderTree::operator=(const DrawOrderTree& other)\n    {\n        Tree::operator=(other);\n        return *this;\n    }\n\n    void DrawOrderTree::AttachToSceneEvents()\n    {\n        o2Scene.onObjectsChanged += THIS_FUNC(OnObjectsChanged);\n\n        o2Scene.onAddedToScene += THIS_FUNC(OnObjectCreated);\n        o2Scene.onRemovedFromScene += THIS_FUNC(OnObjectDestroing);\n\n        auto updateTreeNode = THIS_FUNC(OnObjectChanged);\n        o2Scene.onEnableChanged += updateTreeNode;\n        o2Scene.onLockChanged += updateTreeNode;\n        o2Scene.onNameChanged += updateTreeNode;\n        o2Scene.onChildrenHierarchyChanged += updateTreeNode;\n\n        mAttachedToSceneEvents = true;\n    }\n\n    void DrawOrderTree::DeattachFromSceneEvents()\n    {\n        if (Scene::IsSingletonInitialzed() && mAttachedToSceneEvents)\n        {\n            o2Scene.onObjectsChanged -= THIS_FUNC(OnObjectsChanged);\n\n            o2Scene.onAddedToScene -= THIS_FUNC(OnObjectCreated);\n            o2Scene.onRemovedFromScene -= THIS_FUNC(OnObjectDestroing);\n\n            auto updateTreeNode = THIS_FUNC(OnObjectChanged);\n            o2Scene.onEnableChanged -= updateTreeNode;\n            o2Scene.onLockChanged -= updateTreeNode;\n            o2Scene.onNameChanged -= updateTreeNode;\n            o2Scene.onChildrenHierarchyChanged -= updateTreeNode;\n        }\n    }\n\n    String DrawOrderTree::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void DrawOrderTree::Initialize()\n    {\n        mEnableTogglesGroup = mmake<ToggleGroup>(ToggleGroup::Type::VerOneClick);\n        mEnableTogglesGroup->onReleased = THIS_FUNC(EnableObjectsGroupReleased);\n\n        mLockTogglesGroup = mmake<ToggleGroup>(ToggleGroup::Type::VerOneClick);\n        mLockTogglesGroup->onReleased = THIS_FUNC(LockObjectsGroupReleased);\n\n        auto objectNodeWidgetSample = DynamicCast<DrawOrderTreeNode>(mNodeWidgetSample);\n        objectNodeWidgetSample->InitializeControls();\n    }\n\n    void DrawOrderTree::SetSelectedObjects(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        Vector<Ref<OrderTreeNode>> nodes;\n        for (auto& object : objects)\n        {\n            Ref<OrderTreeNode> node;\n            if (mObjectToNodeMap.TryGetValue(object, node))\n                nodes.Add(node);\n        }\n\n        Tree::SetSelectedObjects(nodes.Convert<void*>([](auto& x) { return (void*)x.Get(); }));\n    }\n\n    void DrawOrderTree::ScrollToAndHighlight(const Ref<SceneEditableObject>& object)\n    {\n        Ref<OrderTreeNode> node;\n        if (mObjectToNodeMap.TryGetValue(object, node))\n            Tree::ScrollToAndHighlight(node.Get());\n    }\n\n    void DrawOrderTree::RebuildOrderTree()\n    {\n        mRootOrderNodes.Clear();\n        mObjectToNodeMap.Clear();\n\n        mStartBatchIdx = INT_MAX;\n\n        for (auto& weakCamera : o2Scene.GetCameras())\n        {\n            auto camera = weakCamera.Lock();\n            Ref<OrderTreeNode> cameraNode = mmake<OrderTreeNode>();\n            cameraNode->name = camera->GetName();\n            cameraNode->type = OrderTreeNode::Type::Camera;\n            cameraNode->object = camera;\n            mObjectToNodeMap[cameraNode->object] = cameraNode;\n            mRootOrderNodes.Add(cameraNode);\n\n            for (auto& layer : camera->drawLayers.GetLayers())\n            {\n                Ref<OrderTreeNode> layerNode = mmake<OrderTreeNode>();\n                layerNode->name = layer->GetName();\n                layerNode->type = OrderTreeNode::Type::Layer;\n                cameraNode->AddChild(layerNode);\n\n                for (auto& drawable : layer->GetDrawables())\n                    ProcessDrawableTreeNode(layerNode, drawable);\n            }\n        }\n    }\n\n    void DrawOrderTree::ProcessDrawableTreeNode(const Ref<OrderTreeNode>& parent, const Ref<ISceneDrawable>& drawable)\n    {\n        Ref<OrderTreeNode> drawableNode = mmake<OrderTreeNode>();\n\n        drawableNode->inheritedOrderFromParent = drawable->IsDrawingDepthInheritedFromParent();\n        drawableNode->customOrder = drawable->GetDrawingDepth();\n        drawableNode->batchIdx = drawable->drawCallIdx;\n\n        if (drawableNode->batchIdx < mStartBatchIdx)\n            mStartBatchIdx = drawableNode->batchIdx;\n\n        if (auto actor = DynamicCast<Actor>(drawable))\n        {\n            drawableNode->name = actor->name;\n            drawableNode->type = OrderTreeNode::Type::Actor;\n            drawableNode->object = actor;\n\n            mObjectToNodeMap[drawableNode->object] = drawableNode; \n\n            CheckBatchEnd(drawableNode);\n            parent->AddChild(drawableNode);\n        }\n        else if (auto root = DynamicCast<SceneLayerRootDrawablesContainer>(drawable))\n        {\n            drawableNode->type = OrderTreeNode::Type::Root;\n            drawableNode->name = \"Layer roots\";\n\n            CheckBatchEnd(drawableNode);\n            parent->AddChild(drawableNode);\n        }\n        else\n        {\n            drawableNode->name = drawable->GetType().GetName();\n            drawableNode->type = OrderTreeNode::Type::Drawable;\n\n            CheckBatchEnd(drawableNode);\n            parent->AddChild(drawableNode);\n        }\n\n        for (auto& inherited : drawable->GetChildrenInheritedDepth())\n            ProcessDrawableTreeNode(drawableNode, inherited);\n    }\n\n    void DrawOrderTree::CheckBatchEnd(const Ref<OrderTreeNode>& node)\n    {\n        static Ref<OrderTreeNode> prevDrawableNode;\n\n        if (prevDrawableNode && node->object != nullptr && node->batchIdx != prevDrawableNode->batchIdx)\n        {\n            Ref<OrderTreeNode> endNode = mmake<OrderTreeNode>();\n            endNode->type = OrderTreeNode::Type::EndOfBatch;\n            endNode->batchIdx = prevDrawableNode->batchIdx;\n\n            endNode->name = \"End of batch #\" + (String)(endNode->batchIdx - mStartBatchIdx);\n\n            if (auto parent = prevDrawableNode->GetParent().Lock())\n                parent->AddChild(endNode);\n        }\n\n        if (node->object && node->batchIdx >= 0)\n            prevDrawableNode = node;\n    }\n\n    void DrawOrderTree::UpdateNodesStructure()\n    {\n        RebuildOrderTree();\n        Tree::UpdateNodesStructure();\n    }\n\n    void DrawOrderTree::UpdateVisibleNodes()\n    {\n        PushEditorScopeOnStack scope;\n        Tree::UpdateVisibleNodes();\n    }\n\n    Ref<TreeNode> DrawOrderTree::CreateTreeNodeWidget()\n    {\n        PushEditorScopeOnStack scope;\n        return Tree::CreateTreeNodeWidget();\n    }\n\n    void* DrawOrderTree::GetObjectParent(void* object)\n    {\n        if (!object)\n            return nullptr;\n\n        OrderTreeNode* treeNode = (OrderTreeNode*)(void*)object;\n        return (void*)(treeNode->GetParent().Lock().Get());\n    }\n\n    Vector<void*> DrawOrderTree::GetObjectChilds(void* object)\n    {\n        OrderTreeNode* treeNode = (OrderTreeNode*)object;\n        if (OrderTreeNode* treeNode = (OrderTreeNode*)object)\n            return treeNode->GetChildren().Convert<void*>([](auto x) { return (void*)x.Get(); });\n\n        return mRootOrderNodes.Convert<void*>([](auto x) { return (void*)x.Get(); });\n    }\n\n    void DrawOrderTree::FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object)\n    {\n        Ref<DrawOrderTreeNode> node = DynamicCast<DrawOrderTreeNode>(nodeWidget);\n        node->Setup(Ref((OrderTreeNode*)object));\n        node->mLockToggle->SetToggleGroup(mLockTogglesGroup);\n        node->mEnableToggle->SetToggleGroup(mEnableTogglesGroup);\n    }\n\n    void DrawOrderTree::OnNodeDblClick(const Ref<TreeNode>& nodeWidget)\n    {\n        (DynamicCast<DrawOrderTreeNode>(nodeWidget))->EnableEditName();\n    }\n\n    void DrawOrderTree::OnDraggedObjects(Vector<void*> objects, void* newParent, void* prevObject)\n    {\n        auto newParentEditableObject = Ref((SceneEditableObject*)newParent);\n        auto prevEditableObject = Ref((SceneEditableObject*)prevObject);\n        auto editableObjects = objects.Convert<Ref<SceneEditableObject>>([](void* x) { return Ref((SceneEditableObject*)x); });\n\n        auto action = mmake<ReparentAction>(editableObjects);\n\n        o2Scene.ReparentEditableObjects(editableObjects, newParentEditableObject, prevEditableObject);\n\n        action->ObjectsReparented(mParent.Lock(), prevEditableObject);\n        o2EditorSceneWindow.DoneAction(action);\n\n        Tree::OnDraggedObjects(objects, newParent, prevObject);\n    }\n\n    void DrawOrderTree::EnableObjectsGroupPressed(bool value)\n    {}\n\n    void DrawOrderTree::EnableObjectsGroupReleased(bool value)\n    {\n        Vector<Ref<SceneEditableObject>> objects = mEnableTogglesGroup->GetToggled().Convert<Ref<SceneEditableObject>>(\n            [](const WeakRef<Toggle>& x) {\n                auto toggleParent = DynamicCast<TreeNode>(x.Lock()->GetParent().Lock());\n                return Ref(static_cast<SceneEditableObject*>(toggleParent->GetObject()));\n            });\n\n        auto action = mmake<EnableAction>(objects, value);\n        o2EditorSceneWindow.DoneAction(action);\n    }\n\n    void DrawOrderTree::LockObjectsGroupPressed(bool value)\n    {}\n\n    void DrawOrderTree::LockObjectsGroupReleased(bool value)\n    {\n        Vector<Ref<SceneEditableObject>> objects = mLockTogglesGroup->GetToggled().Convert<Ref<SceneEditableObject>>(\n            [](const WeakRef<Toggle>& x) {\n                auto toggleParent = DynamicCast<TreeNode>(x.Lock()->GetParent().Lock());\n                return Ref(static_cast<SceneEditableObject*>(toggleParent->GetObject()));\n            });\n\n        auto action = mmake<LockAction>(objects, value);\n        o2EditorSceneWindow.DoneAction(action);\n    }\n\n    void DrawOrderTree::OnNodesSelectionChanged(Vector<void*> objects)\n    {\n        Vector<Ref<SceneEditableObject>> editableObjects = objects\n            .Convert<Ref<OrderTreeNode>>([](auto x) { return Ref((OrderTreeNode*)x); })\n            .FindAll([](auto& x) { return x->object.IsValid(); })\n            .Convert<Ref<SceneEditableObject>>([](auto& x) { return x->object; });\n\n        onObjectsSelectionChanged(editableObjects);\n        Tree::OnNodesSelectionChanged(objects);\n    }\n\n    void DrawOrderTree::OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        Tree::OnDragEnter(group);\n    }\n\n    void DrawOrderTree::OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        Tree::OnDragExit(group);\n    }\n\n    void DrawOrderTree::OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        Tree::OnDraggedAbove(group);\n    }\n\n    void DrawOrderTree::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        Tree::OnDropped(group);\n    }\n\n    void DrawOrderTree::OnObjectCreated(const Ref<SceneEditableObject>& object)\n    {\n        RebuildOrderTree();\n        Tree::OnObjectCreated(object.Get(), object->GetEditableParent().Get());\n    }\n\n    void DrawOrderTree::OnObjectDestroing(const Ref<SceneEditableObject>& object)\n    {\n        RebuildOrderTree();\n        Tree::OnObjectRemoved(object.Get());\n    }\n\n    void DrawOrderTree::OnObjectsChanged(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        RebuildOrderTree();\n        Tree::OnObjectsChanged(objects.Convert<void*>([](auto& x) { return x.Get(); }));\n    }\n\n    void DrawOrderTree::OnObjectChanged(const Ref<SceneEditableObject>& object)\n    {\n        Tree::OnObjectsChanged({ object.Get() });\n    }\n\n    DrawOrderTreeNode::DrawOrderTreeNode(RefCounter* refCounter) :\n        TreeNode(refCounter)\n    {}\n\n    DrawOrderTreeNode::DrawOrderTreeNode(RefCounter* refCounter, const DrawOrderTreeNode& other) :\n        TreeNode(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    Editor::DrawOrderTreeNode& DrawOrderTreeNode::operator=(const DrawOrderTreeNode& other)\n    {\n        TreeNode::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void DrawOrderTreeNode::OnDeserialized(const DataValue& node)\n    {\n        TreeNode::OnDeserialized(node);\n        InitializeControls();\n    }\n\n    void DrawOrderTreeNode::InitializeControls()\n    {\n        mNameDrawable = GetLayerDrawable<Text>(\"name\");\n        mOrderDrawable = GetLayerDrawable<Text>(\"batch\");\n        mIconSprite = GetLayerDrawable<Sprite>(\"icon\");\n        mBackSprite = GetLayerDrawable<Sprite>(\"back\");\n        mLockToggle = DynamicCast<Toggle>(GetChild(\"lockToggle\"));\n        mEnableToggle = DynamicCast<Toggle>(GetChild(\"enableToggle\"));\n        mLinkBtn = DynamicCast<Button>(GetChild(\"linkBtn\"));\n        mNameEditBox = DynamicCast<EditBox>(GetChild(\"nameEditBox\"));\n        mEditState = GetStateObject(\"edit\");\n\n        if (mLinkBtn)\n            mLinkBtnHalfHideState = mLinkBtn->GetStateObject(\"halfHide\");\n\n        if (mLockToggle)\n        {\n            mLockToggleHalfHideState = mLockToggle->GetStateObject(\"halfHide\");\n            mLockToggleLockedState = mLockToggle->GetStateObject(\"locked\");\n\n            mLockToggle->onClick = THIS_FUNC(OnLockClicked);\n        }\n\n        if (mEnableToggle)\n            mEnableToggle->onClick = THIS_FUNC(OnEnableCkicked);\n\n        if (mNameEditBox)\n            mNameEditBox->onChangeCompleted = THIS_FUNC(OnObjectNameChanged);\n    }\n\n    void DrawOrderTreeNode::Setup(const Ref<DrawOrderTree::OrderTreeNode>& object)\n    {\n        mTarget = object;\n\n        Map<DrawOrderTree::OrderTreeNode::Type, String> icons =\n        {\n            { DrawOrderTree::OrderTreeNode::Type::Camera, \"ui/UI4_camera_icn.png\" },\n            { DrawOrderTree::OrderTreeNode::Type::Layer, \"ui/UI4_layer_big.png\" },\n            { DrawOrderTree::OrderTreeNode::Type::Drawable, \"ui/UI4_image_icn.png\" },\n            { DrawOrderTree::OrderTreeNode::Type::Actor, \"ui/UI4_image_icn.png\" },\n            { DrawOrderTree::OrderTreeNode::Type::Root, \"ui/UI4_folder_icn.png\" },\n            { DrawOrderTree::OrderTreeNode::Type::EndOfBatch, \"ui/UI4_color_type.png\" },\n        };\n\n        String name = mTarget->name;\n\n        if (mName != name)\n        {\n            mName = name;\n            mNameDrawable->SetText(mName);\n        }\n\n        WString orderText;\n        if ((!mTarget->inheritedOrderFromParent && mTarget->object) || mTarget->type == DrawOrderTree::OrderTreeNode::Type::Root)\n            orderText = (WString)mTarget->customOrder;\n        else if (mTarget->inheritedOrderFromParent)\n            orderText = \"inherited\";\n\n        if (orderText != mOrderDrawable->GetText())\n            mOrderDrawable->SetText(orderText);\n\n        String icon = icons[mTarget->type];\n        if (mIconSprite->GetImageName() != icon)\n            mIconSprite->SetImageAsset(AssetRef<ImageAsset>(icon));\n        \n        mBackSprite->color = Color4::SomeColor(mTarget->batchIdx, mBackSprite->GetColor().a);\n        mBackSprite->enabled = mTarget->type != DrawOrderTree::OrderTreeNode::Type::Camera &&\n            mTarget->type != DrawOrderTree::OrderTreeNode::Type::Layer &&\n            mTarget->type != DrawOrderTree::OrderTreeNode::Type::Root;\n\n        if (mTarget->object)\n        {\n            auto sceneObject = mTarget->object;\n            float alpha = sceneObject->IsEnabledInHierarchy() ? 1.0f : 0.5f;\n            if (!Math::Equals(alpha, mNameDrawable->GetTransparency()))\n            {\n                mNameDrawable->SetTransparency(alpha);\n                mEnableToggle->SetTransparency(alpha);\n                mLinkBtn->SetTransparency(alpha);\n            }\n\n            if (auto actor = DynamicCast<Actor>(sceneObject))\n            {\n                mLinkBtn->SetEnabled(actor->GetPrototype().IsValid());\n                mLinkBtnHalfHideState->SetState(!actor->GetPrototypeDirectly().IsValid());\n\n                if (actor->GetPrototype())\n                {\n                    mLinkBtn->onClick = [=]() {\n                        auto proto = actor->GetPrototype();\n                        o2EditorAssets.ShowAssetIcon(proto->GetPath());\n                    };\n                }\n            }\n            else\n                mLinkBtn->SetEnabled(false);\n\n            if (sceneObject->IsSupportsDisabling())\n            {\n                mEnableToggle->SetValue(sceneObject->IsEnabled());\n                mEnableToggle->SetEnabled(true);\n            }\n            else\n                mEnableToggle->SetEnabled(false);\n\n            mLockToggle->SetEnabled(true);\n            mLockToggle->SetValue(sceneObject->IsLocked());\n            mLockToggleLockedState->SetState(sceneObject->IsLockedInHierarchy());\n            mLockToggleHalfHideState->SetState(sceneObject->IsLockedInHierarchy() && !sceneObject->IsLocked());\n        }\n        else\n        {\n            mEnableToggle->SetEnabled(false);\n            mLockToggle->SetEnabled(false);\n            mLinkBtn->SetEnabled(false);\n        }\n    }\n\n    void DrawOrderTreeNode::EnableEditName()\n    {\n        if (mTarget->object)\n        {\n            mEditState->SetState(true);\n\n            mNameEditBox->text = mTarget->object->GetName();\n            mNameEditBox->SelectAll();\n            mNameEditBox->Widget::Focus();\n            mNameEditBox->ResetScroll();\n        }\n    }\n\n    String DrawOrderTreeNode::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void DrawOrderTreeNode::OnLockClicked()\n    {\n        if (mTarget->object)\n            mTarget->object->SetLocked(mLockToggle->GetValue());\n    }\n\n    void DrawOrderTreeNode::OnEnableCkicked()\n    {\n        if (mTarget->object)\n            mTarget->object->SetEnabled(mEnableToggle->GetValue());\n    }\n\n    void DrawOrderTreeNode::OnObjectNameChanged(const WString& text)\n    {\n        if (mTarget->object)\n        {\n            String prevName = mTarget->object->GetName();\n\n            mTarget->object->SetName(text);\n            mEditState->SetState(false);\n            (DynamicCast<DrawOrderTree>(mOwnerTree.Lock()))->OnObjectChanged(mTarget->object);\n\n\n            DataDocument prevData; prevData = prevName;\n            DataDocument newData; newData = mTarget->object->GetName();\n\n            auto action = mmake<PropertyChangeAction>(Vector<Ref<SceneEditableObject>>{ mTarget->object }, \"name\", \n                                                      Vector<DataDocument>{ prevData }, Vector<DataDocument>{ newData });\n            o2EditorSceneWindow.DoneAction(action);\n        }\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::DrawOrderTree>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::DrawOrderTreeNode>);\n// --- META ---\n\nENUM_META(Editor::DrawOrderTree::OrderTreeNode::Type, Editor__DrawOrderTree__OrderTreeNode__Type)\n{\n    ENUM_ENTRY(Actor);\n    ENUM_ENTRY(Camera);\n    ENUM_ENTRY(Drawable);\n    ENUM_ENTRY(EndOfBatch);\n    ENUM_ENTRY(Layer);\n    ENUM_ENTRY(Root);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(Editor::DrawOrderTree, Editor__DrawOrderTree);\n\nDECLARE_CLASS(Editor::DrawOrderTreeNode, Editor__DrawOrderTreeNode);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/TreeWindow/DrawOrderTree.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n\nnamespace o2\n{\n    class Actor;\n    class SceneEditableObject;\n    class Button;\n    class EditBox;\n    class Toggle;\n    class ToggleGroup;\n}\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(ActorProperty);\n    FORWARD_CLASS_REF(ComponentProperty);\n\n    // -----------------\n    // Scene tree widget\n    // -----------------\n    class DrawOrderTree : public Tree\n    {\n    public:\n        Function<void(const Vector<Ref<SceneEditableObject>>&)> onObjectsSelectionChanged; // Callback on objects selection changed\n\n    public:\n        // Default constructor\n        DrawOrderTree(RefCounter* refCounter);\n\n        // Copy-constructor\n        DrawOrderTree(RefCounter* refCounter, const DrawOrderTree& other);\n\n        // Copy-constructor\n        DrawOrderTree(const DrawOrderTree& other);\n\n        // Destructor\n        ~DrawOrderTree();\n\n        // Copy-operator\n        DrawOrderTree& operator=(const DrawOrderTree& other);\n\n        // Sets selected objects\n        void SetSelectedObjects(const Vector<Ref<SceneEditableObject>>& objects);\n\n        // Scrolls view to object and highlights\n        void ScrollToAndHighlight(const Ref<SceneEditableObject>& object);\n\n        // Rebuilds order tree mRootOrderNode\n        void RebuildOrderTree();\n\n        // Attaches to scene events\n        void AttachToSceneEvents();\n\n        // Deattaches from scene events\n        void DeattachFromSceneEvents();\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(DrawOrderTree);\n        CLONEABLE_REF(DrawOrderTree);\n\n    public:\n        struct OrderTreeNode : public ITreeNode<OrderTreeNode>, public RefCounterable\n        {\n            enum class Type { Camera, Layer, Root, Drawable, Actor, EndOfBatch };\n\n            Type   type;\n            String name;\n\n            Ref<SceneEditableObject> object;\n            bool                     objectEnabled = false;\n\n            int    batchIdx = -1;\n\n            bool   inheritedOrderFromParent = false;\n            float  customOrder = 0.0f;\n        };\n\n    protected:\n        Vector<Ref<OrderTreeNode>> mRootOrderNodes; // Root nodes for draw order hierarchy data\n\n        int mStartBatchIdx = 0; // Index of first batch\n\n        Map<Ref<SceneEditableObject>, Ref<OrderTreeNode>> mObjectToNodeMap; // Map from object to node\n\n        Ref<ToggleGroup> mEnableTogglesGroup;    // Enable objects toggles group\n        Ref<ToggleGroup> mLockTogglesGroup;      // Lock objects toggles group\n        bool             mAttachedToSceneEvents; // Is tree attached to scene events\n\n        Ref<ActorProperty>     mDragActorPropertyField;     // Actor property field under cursor when dragging actor\n        Ref<ComponentProperty> mDragComponentPropertyField; // Component property field under cursor when dragging actor\n\n        bool mWatchEditor = false;\n\n    protected:\n        // Initializes widget logic\n        void Initialize();\n\n        // Processes drawable node recursively\n        void ProcessDrawableTreeNode(const Ref<OrderTreeNode>& parent, const Ref<ISceneDrawable>& drawable);\n\n        // Checks that previous object was changed batch\n        void CheckBatchEnd(const Ref<OrderTreeNode>& node);\n\n        // Updates draw order hierarchy, Updates root nodes and their childs if need\n        void UpdateNodesStructure() override;\n\n        // Updates visible nodes (calculates range and initializes nodes), enables editor mode\n        void UpdateVisibleNodes() override;\n\n        // Gets tree node from pool or creates new, enables editor mode\n        Ref<TreeNode> CreateTreeNodeWidget() override;\n\n        // Returns object's parent\n        void* GetObjectParent(void* object) override;\n\n        // Returns object's children\n        Vector<void*> GetObjectChilds(void* object) override;\n\n        // Sets nodeWidget data by object\n        void FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object) override;\n\n        // Called when tree node was double clicked\n        void OnNodeDblClick(const Ref<TreeNode>& nodeWidget) override;\n\n        // Called when objects was dragged in new parent in position next of prevObject\n        void OnDraggedObjects(Vector<void*> objects, void* newParent, void* prevObject) override;\n\n        // Called when object was created\n        void OnObjectCreated(const Ref<SceneEditableObject>& object);\n\n        // Called when object was destroyed\n        void OnObjectDestroing(const Ref<SceneEditableObject>& object);\n\n        // Called when some objects were changed\n        void OnObjectsChanged(const Vector<Ref<SceneEditableObject>>& objects);\n\n        // Called when object was changed\n        void OnObjectChanged(const Ref<SceneEditableObject>& object);\n\n        // Called when enable objects toggle group pressed\n        void EnableObjectsGroupPressed(bool value);\n\n        // Called when enable objects toggle group released\n        void EnableObjectsGroupReleased(bool value);\n\n        // Called when lock objects toggle group pressed\n        void LockObjectsGroupPressed(bool value);\n\n        // Called when lock objects toggle group released\n        void LockObjectsGroupReleased(bool value);\n\n        // Called when list of selected objects was changed\n        void OnNodesSelectionChanged(Vector<void*> objects) override;\n\n        // Called when some drag listeners was entered to this area\n        void OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was exited from this area\n        void OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was dragged above this area\n        void OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some selectable listeners was dropped to this\n        void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        friend class DrawOrderTreeNode;\n    };\n\n    // ---------------\n    // Scene tree node\n    // ---------------\n    class DrawOrderTreeNode : public TreeNode\n    {\n    public:\n        // Default constructor\n        DrawOrderTreeNode(RefCounter* refCounter);\n\n        // Copy-constructor\n        DrawOrderTreeNode(RefCounter* refCounter, const DrawOrderTreeNode& other);\n\n        // Copy operator\n        DrawOrderTreeNode& operator=(const DrawOrderTreeNode& other);\n\n        // Sets object and updates content\n        void Setup(const Ref<DrawOrderTree::OrderTreeNode>& object);\n\n        // Enables edit name edit box\n        void EnableEditName();\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(DrawOrderTreeNode);\n        CLONEABLE_REF(DrawOrderTreeNode);\n\n    protected:\n        Ref<DrawOrderTree::OrderTreeNode> mTarget; // Target object\n\n        Ref<Toggle>      mLockToggle;              // Lock toggle\n        Ref<WidgetState> mLockToggleLockedState;   // Lock toggle locked state\n        Ref<WidgetState> mLockToggleHalfHideState; // Lock toggle half hide state\n\n        Ref<Toggle> mEnableToggle; // Enable toggle\n\n        Ref<Button>      mLinkBtn;              // View link button\n        Ref<WidgetState> mLinkBtnHalfHideState; // View link button half hide state\n\n        Ref<Text>        mNameDrawable;  // Object name drawable\n        Ref<Text>        mOrderDrawable; // Object order value drawable\n        Ref<Sprite>      mBackSprite;    // Object back drawable\n        Ref<Sprite>      mIconSprite;    // Object icon drawable\n        Ref<EditBox>     mNameEditBox;   // Object's name edit box\n        Ref<WidgetState> mEditState;     // Object's name edit state\n\n    protected:\n        // Called on deserialization, initializes controls\n        void OnDeserialized(const DataValue& node) override;\n\n        // initializes controls and widgets\n        void InitializeControls();\n\n        // Called when lock toggle was clicked and changes target object's lock state\n        void OnLockClicked();\n\n        // Called when enable toggle was clicked and changes target object's enable state\n        void OnEnableCkicked();\n\n        // Called when object name edit box changed\n        void OnObjectNameChanged(const WString& text);\n\n        friend class DrawOrderTree;\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(Editor::DrawOrderTree::OrderTreeNode::Type);\n\nCLASS_BASES_META(Editor::DrawOrderTree)\n{\n    BASE_CLASS(o2::Tree);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DrawOrderTree)\n{\n    FIELD().PUBLIC().NAME(onObjectsSelectionChanged);\n    FIELD().PROTECTED().NAME(mRootOrderNodes);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mStartBatchIdx);\n    FIELD().PROTECTED().NAME(mObjectToNodeMap);\n    FIELD().PROTECTED().NAME(mEnableTogglesGroup);\n    FIELD().PROTECTED().NAME(mLockTogglesGroup);\n    FIELD().PROTECTED().NAME(mAttachedToSceneEvents);\n    FIELD().PROTECTED().NAME(mDragActorPropertyField);\n    FIELD().PROTECTED().NAME(mDragComponentPropertyField);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mWatchEditor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DrawOrderTree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const DrawOrderTree&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const DrawOrderTree&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedObjects, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ScrollToAndHighlight, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RebuildOrderTree);\n    FUNCTION().PUBLIC().SIGNATURE(void, AttachToSceneEvents);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeattachFromSceneEvents);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, Initialize);\n    FUNCTION().PROTECTED().SIGNATURE(void, ProcessDrawableTreeNode, const Ref<OrderTreeNode>&, const Ref<ISceneDrawable>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckBatchEnd, const Ref<OrderTreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateNodesStructure);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateVisibleNodes);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<TreeNode>, CreateTreeNodeWidget);\n    FUNCTION().PROTECTED().SIGNATURE(void*, GetObjectParent, void*);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<void*>, GetObjectChilds, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, FillNodeDataByObject, const Ref<TreeNode>&, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodeDblClick, const Ref<TreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraggedObjects, Vector<void*>, void*, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectCreated, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectDestroing, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectsChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectChanged, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, EnableObjectsGroupPressed, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, EnableObjectsGroupReleased, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, LockObjectsGroupPressed, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, LockObjectsGroupReleased, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodesSelectionChanged, Vector<void*>);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnter, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExit, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraggedAbove, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDropped, const Ref<ISelectableDragableObjectsGroup>&);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::DrawOrderTreeNode)\n{\n    BASE_CLASS(o2::TreeNode);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::DrawOrderTreeNode)\n{\n    FIELD().PROTECTED().NAME(mTarget);\n    FIELD().PROTECTED().NAME(mLockToggle);\n    FIELD().PROTECTED().NAME(mLockToggleLockedState);\n    FIELD().PROTECTED().NAME(mLockToggleHalfHideState);\n    FIELD().PROTECTED().NAME(mEnableToggle);\n    FIELD().PROTECTED().NAME(mLinkBtn);\n    FIELD().PROTECTED().NAME(mLinkBtnHalfHideState);\n    FIELD().PROTECTED().NAME(mNameDrawable);\n    FIELD().PROTECTED().NAME(mOrderDrawable);\n    FIELD().PROTECTED().NAME(mBackSprite);\n    FIELD().PROTECTED().NAME(mIconSprite);\n    FIELD().PROTECTED().NAME(mNameEditBox);\n    FIELD().PROTECTED().NAME(mEditState);\n}\nEND_META;\nCLASS_METHODS_META(Editor::DrawOrderTreeNode)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const DrawOrderTreeNode&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Setup, const Ref<DrawOrderTree::OrderTreeNode>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, EnableEditName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLockClicked);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnableCkicked);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectNameChanged, const WString&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/TreeWindow/SceneHierarchyTree.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"SceneHierarchyTree.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/CameraActor.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetIcon.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsIconsScroll.h\"\n#include \"o2Editor/Windows/AssetsWindow/AssetsWindow.h\"\n#include \"o2Editor/Actions/Enable.h\"\n#include \"o2Editor/Actions/Lock.h\"\n#include \"o2Editor/Actions/PropertyChange.h\"\n#include \"o2Editor/Actions/Reparent.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n#include \"o2Editor/Windows/TreeWindow/TreeWindow.h\"\n#include \"o2Editor/Properties/Basic/ActorProperty.h\"\n#include \"o2Editor/Properties/Basic/ComponentProperty.h\"\n#include \"o2Editor/UIRoot.h\"\n\nnamespace Editor\n{\n    SceneHierarchyTree::SceneHierarchyTree(RefCounter* refCounter) :\n        Tree(refCounter), mAttachedToSceneEvents(false), mDragActorPropertyField(nullptr), mDragComponentPropertyField(nullptr)\n    {\n        mNodeWidgetSample = mmake<SceneHierarchyTreeNode>();\n        mNodeWidgetSample->layout->minHeight = 20;\n        mNodeWidgetSample->AddLayer(\"caption\", nullptr);\n\n        Initialize();\n    }\n\n    SceneHierarchyTree::SceneHierarchyTree(RefCounter* refCounter, const SceneHierarchyTree& other) :\n        Tree(refCounter, other), mAttachedToSceneEvents(false), mDragActorPropertyField(nullptr), mDragComponentPropertyField(nullptr)\n    {\n        Initialize();\n    }\n\n    SceneHierarchyTree::SceneHierarchyTree(const SceneHierarchyTree& other):\n        SceneHierarchyTree(nullptr, other)\n    {\n\n    }\n\n    SceneHierarchyTree::~SceneHierarchyTree()\n    {\n        DeattachFromSceneEvents();\n    }\n\n    SceneHierarchyTree& SceneHierarchyTree::operator=(const SceneHierarchyTree& other)\n    {\n        Tree::operator=(other);\n        return *this;\n    }\n\n    void SceneHierarchyTree::AttachToSceneEvents()\n    {\n        o2Scene.onObjectsChanged += THIS_FUNC(OnObjectsChanged);\n\n        o2Scene.onAddedToScene += THIS_FUNC(OnObjectCreated);\n        o2Scene.onRemovedFromScene += THIS_FUNC(OnObjectDestroing);\n\n        auto updateTreeNode = THIS_FUNC(OnObjectChanged);\n        o2Scene.onEnableChanged += updateTreeNode;\n        o2Scene.onLockChanged += updateTreeNode;\n        o2Scene.onNameChanged += updateTreeNode;\n        o2Scene.onChildrenHierarchyChanged += updateTreeNode;\n\n        mAttachedToSceneEvents = true;\n    }\n\n    void SceneHierarchyTree::DeattachFromSceneEvents()\n    {\n        if (Scene::IsSingletonInitialzed() && mAttachedToSceneEvents)\n        {\n            o2Scene.onObjectsChanged -= THIS_FUNC(OnObjectsChanged);\n\n            o2Scene.onAddedToScene -= THIS_FUNC(OnObjectCreated);\n            o2Scene.onRemovedFromScene -= THIS_FUNC(OnObjectDestroing);\n\n            auto updateTreeNode = THIS_FUNC(OnObjectChanged);\n            o2Scene.onEnableChanged -= updateTreeNode;\n            o2Scene.onLockChanged -= updateTreeNode;\n            o2Scene.onNameChanged -= updateTreeNode;\n            o2Scene.onChildrenHierarchyChanged -= updateTreeNode;\n        }\n    }\n\n    Ref<TreeNode> SceneHierarchyTree::GetNode(const Ref<SceneEditableObject>& object)\n    {\n        return Tree::GetNode((void*)object.Get());\n    }\n\n    Vector<Ref<SceneEditableObject>> SceneHierarchyTree::GetSelectedObjects() const\n    {\n        return Tree::GetSelectedObjects().Convert<Ref<SceneEditableObject>>([](auto x) { return Ref((SceneEditableObject*)x); });\n    }\n\n    void SceneHierarchyTree::SetSelectedObjects(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        Tree::SetSelectedObjects(objects.Convert<void*>([](auto& x) { return (void*)x.Get(); }));\n    }\n\n    void SceneHierarchyTree::SelectObject(const Ref<SceneEditableObject>& object)\n    {\n        Tree::SelectObject((void*)object.Get());\n    }\n\n    void SceneHierarchyTree::SelectAndHighlightObject(const Ref<SceneEditableObject>& object)\n    {\n        Tree::SelectAndHighlightObject((void*)object.Get());\n    }\n\n    void SceneHierarchyTree::ScrollToAndHighlight(const Ref<SceneEditableObject>& object)\n    {\n        Tree::ScrollToAndHighlight(object.Get());\n    }\n\n    void SceneHierarchyTree::DeselectObject(const Ref<SceneEditableObject>& object)\n    {\n        Tree::DeselectObject((void*)object.Get());\n    }\n\n    void SceneHierarchyTree::DeselectAllObjects()\n    {\n        Tree::DeselectAllObjects();\n    }\n\n    void SceneHierarchyTree::ScrollTo(const Ref<SceneEditableObject>& object)\n    {\n        Tree::ScrollTo((void*)object.Get());\n    }\n\n    void SceneHierarchyTree::SetEditorWatching(bool watching)\n    {\n        mWatchEditor = watching;\n        UpdateNodesView();\n    }\n\n    bool SceneHierarchyTree::IsEditorWatching() const\n    {\n        return mWatchEditor;\n    }\n\n    String SceneHierarchyTree::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void SceneHierarchyTree::RestoreExpandedFromCache()\n    {\n        UpdateNodesView(true);\n\n        auto expandedActors = mExpandedActorsCache;\n        mExpandedActorsCache.Clear();\n\n        for (auto& id : expandedActors)\n        {\n            auto obj = o2Scene.GetEditableObjectByID(id).Get();\n            if (!obj)\n                continue;\n\n            ExpandParentObjects(obj);\n\n            auto node = mAllNodes.FindOrDefault([&](auto& x) { return x->object == obj; });\n            if (node)\n            {\n                if (node->widget)\n                    node->widget->SetExpanded(true);\n                else\n                    Tree::ExpandNode(node);\n            }\n        }\n\n        UpdateNodeExpanding(mExpandNodeTime);\n        SetLayoutDirty();\n    }\n\n    void SceneHierarchyTree::Initialize()\n    {\n        mEnableTogglesGroup = mmake<ToggleGroup>(ToggleGroup::Type::VerOneClick);\n        mEnableTogglesGroup->onReleased = THIS_FUNC(EnableObjectsGroupReleased);\n\n        mLockTogglesGroup = mmake<ToggleGroup>(ToggleGroup::Type::VerOneClick);\n        mLockTogglesGroup->onReleased = THIS_FUNC(LockObjectsGroupReleased);\n\n        auto objectNodeWidgetSample = DynamicCast<SceneHierarchyTreeNode>(mNodeWidgetSample);\n        objectNodeWidgetSample->InitializeControls();\n    }\n\n    void SceneHierarchyTree::UpdateVisibleNodes()\n    {\n        PushEditorScopeOnStack scope;\n        Tree::UpdateVisibleNodes();\n    }\n\n    Ref<TreeNode> SceneHierarchyTree::CreateTreeNodeWidget()\n    {\n        PushEditorScopeOnStack scope;\n        return Tree::CreateTreeNodeWidget();\n    }\n\n    void* SceneHierarchyTree::GetObjectParent(void* object)\n    {\n        SceneEditableObject* sceneObject = (SceneEditableObject*)object;\n        return sceneObject->GetEditableParent().Get();\n    }\n\n    Vector<void*> SceneHierarchyTree::GetObjectChilds(void* object)\n    {\n        if (object)\n        {\n            SceneEditableObject* parent = (SceneEditableObject*)object;\n            return parent->GetEditableChildren().Convert<void*>([](auto& x) { return x.Get(); });\n        }\n\n        if (mWatchEditor)\n            return EditorUIRoot.GetRootWidget()->GetEditableChildren().Convert<void*>([](auto& x) { return x.Get(); });\n\n        return o2Scene.GetRootActors().Convert<void*>([](const Ref<Actor>& x) { return DynamicCast<SceneEditableObject>(x).Get(); });\n    }\n\n    String SceneHierarchyTree::GetObjectDebug(void* object)\n    {\n        return object ? ((SceneEditableObject*)object)->GetName() : String(\"null\");\n    }\n\n    void SceneHierarchyTree::FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object)\n    {\n        auto node = DynamicCast<SceneHierarchyTreeNode>(nodeWidget);\n        node->SetSceneObject(Ref((SceneEditableObject*)object));\n        node->mLockToggle->SetToggleGroup(mLockTogglesGroup);\n        node->mEnableToggle->SetToggleGroup(mEnableTogglesGroup);\n    }\n\n    void SceneHierarchyTree::OnNodeDblClick(const Ref<TreeNode>& nodeWidget)\n    {\n        DynamicCast<SceneHierarchyTreeNode>(nodeWidget)->EnableEditName();\n    }\n\n#undef GetObject\n\n    void SceneHierarchyTree::OnDraggedObjects(Vector<void*> objects, void* newParent, void* prevObject)\n    {\n        auto newParentEditableObject = Ref((SceneEditableObject*)newParent);\n        auto prevEditableObject = Ref((SceneEditableObject*)prevObject);\n        auto editableObjects = objects.Convert<Ref<SceneEditableObject>>([](void* x) { return Ref((SceneEditableObject*)x); });\n\n        auto action = mmake<ReparentAction>(editableObjects);\n\n        o2Scene.ReparentEditableObjects(editableObjects, newParentEditableObject, prevEditableObject);\n\n        action->ObjectsReparented(mParent.Lock(), prevEditableObject);\n        o2EditorSceneWindow.DoneAction(action);\n\n        Tree::OnDraggedObjects(objects, newParent, prevObject);\n    }\n\n    void SceneHierarchyTree::EnableObjectsGroupPressed(bool value)\n    {}\n\n    void SceneHierarchyTree::EnableObjectsGroupReleased(bool value)\n    {\n        Vector<Ref<SceneEditableObject>> objects = mEnableTogglesGroup->GetToggled().Convert<Ref<SceneEditableObject>>(\n            [](const WeakRef<Toggle>& x) {\n                auto toggleParent = DynamicCast<TreeNode>(x.Lock()->GetParent().Lock());\n                return Ref(static_cast<SceneEditableObject*>(toggleParent->GetObject()));\n            });\n\n        auto action = mmake<EnableAction>(objects, value);\n        o2EditorSceneWindow.DoneAction(action);\n    }\n\n    void SceneHierarchyTree::LockObjectsGroupPressed(bool value)\n    {}\n\n    void SceneHierarchyTree::LockObjectsGroupReleased(bool value)\n    {\n        Vector<Ref<SceneEditableObject>> objects = mLockTogglesGroup->GetToggled().Convert<Ref<SceneEditableObject>>(\n            [](const WeakRef<Toggle>& x) {\n                auto toggleParent = DynamicCast<TreeNode>(x.Lock()->GetParent().Lock());\n                return Ref(static_cast<SceneEditableObject*>(toggleParent->GetObject()));\n            });\n\n        auto action = mmake<LockAction>(objects, value);\n        o2EditorSceneWindow.DoneAction(action);\n    }\n\n    void SceneHierarchyTree::OnNodesSelectionChanged(Vector<void*> objects)\n    {\n        onObjectsSelectionChanged(objects.Convert<Ref<SceneEditableObject>>([](auto x) { return Ref((SceneEditableObject*)x); }));\n        Tree::OnNodesSelectionChanged(objects);\n    }\n\n    void SceneHierarchyTree::OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (assetsScroll)\n        {\n            assetsScroll->InstantiateDraggingAssets();\n\n            if (!assetsScroll->mInstantiatedSceneDragObjects.IsEmpty())\n            {\n                o2Scene.UpdateAddedEntities();\n\n                UpdateNodesView(true);\n                SetLayoutDirty();\n\n                for (auto& object : assetsScroll->mInstantiatedSceneDragObjects)\n                {\n                    int idx = mAllNodes.IndexOf([=](auto& x) { return x->object == object.Get(); });\n                    CreateVisibleNodeWidget(mAllNodes[idx], idx);\n                }\n\n                Focus();\n                SetSelectedObjects(assetsScroll->mInstantiatedSceneDragObjects);\n                BeginDragging(GetNode(assetsScroll->mInstantiatedSceneDragObjects.Last()));\n                mDragOffset = Vec2F();\n            }\n        }\n        else Tree::OnDragEnter(group);\n    }\n\n    void SceneHierarchyTree::OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (assetsScroll)\n        {\n            DeselectAllObjects();\n            EndDragging();\n            assetsScroll->ClearInstantiatedDraggingAssets();\n            assetsScroll->Focus();\n        }\n        else Tree::OnDragExit(group);\n    }\n\n    void SceneHierarchyTree::OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (assetsScroll)\n        {\n            UpdateDraggingGraphics();\n            Tree::OnDraggedAbove(Ref(this));\n        }\n        else Tree::OnDraggedAbove(group);\n    }\n\n    void SceneHierarchyTree::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        auto assetsScroll = DynamicCast<AssetsIconsScrollArea>(group);\n        if (assetsScroll)\n        {\n            Tree::OnDropped(Ref(this));\n\n            assetsScroll->RegObjectsCreationAction();\n            assetsScroll->mInstantiatedSceneDragObjects.Clear();\n        }\n        else Tree::OnDropped(group);\n    }\n\n    void SceneHierarchyTree::OnNodeExpanded(void* object)\n    {\n        auto uid = ((SceneEditableObject*)object)->GetID();\n        if (!mExpandedActorsCache.Contains(uid))\n            mExpandedActorsCache.Add(uid);\n    }\n\n    void SceneHierarchyTree::OnNodeCollapsed(void* object)\n    {\n        mExpandedActorsCache.Remove(((SceneEditableObject*)object)->GetID());\n    }\n\n    void SceneHierarchyTree::OnObjectCreated(const Ref<SceneEditableObject>& object)\n    {\n        Tree::OnObjectCreated(object.Get(), object->GetEditableParent().Get());\n    }\n\n    void SceneHierarchyTree::OnObjectDestroing(const Ref<SceneEditableObject>& object)\n    {\n        Tree::OnObjectRemoved(object.Get());\n    }\n\n    void SceneHierarchyTree::OnObjectsChanged(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        Tree::OnObjectsChanged(objects.Convert<void*>([](auto& x) { return x.Get(); }));\n    }\n\n    void SceneHierarchyTree::OnObjectChanged(const Ref<SceneEditableObject>& object)\n    {\n        Tree::OnObjectsChanged({ object.Get() });\n    }\n\n    SceneHierarchyTreeNode::SceneHierarchyTreeNode(RefCounter* refCounter) :\n        TreeNode(refCounter)\n    {}\n\n    SceneHierarchyTreeNode::SceneHierarchyTreeNode(RefCounter* refCounter, const SceneHierarchyTreeNode& other) :\n        TreeNode(refCounter, other)\n    {\n        InitializeControls();\n    }\n\n    Editor::SceneHierarchyTreeNode& SceneHierarchyTreeNode::operator=(const SceneHierarchyTreeNode& other)\n    {\n        TreeNode::operator=(other);\n        InitializeControls();\n        return *this;\n    }\n\n    void SceneHierarchyTreeNode::OnDeserialized(const DataValue& node)\n    {\n        TreeNode::OnDeserialized(node);\n        InitializeControls();\n    }\n\n    void SceneHierarchyTreeNode::InitializeControls()\n    {\n        mNameDrawable = GetLayerDrawable<Text>(\"name\");\n        mLockToggle = GetChildByType<Toggle>(\"lockToggle\");\n        mEnableToggle = GetChildByType<Toggle>(\"enableToggle\");\n        mLinkBtn = GetChildByType<Button>(\"linkBtn\");\n        mNameEditBox = GetChildByType<EditBox>(\"nameEditBox\");\n        mEditState = GetStateObject(\"edit\");\n\n        if (mLinkBtn)\n            mLinkBtnHalfHideState = mLinkBtn->GetStateObject(\"halfHide\");\n\n        if (mLockToggle)\n        {\n            mLockToggleHalfHideState = mLockToggle->GetStateObject(\"halfHide\");\n            mLockToggleLockedState = mLockToggle->GetStateObject(\"locked\");\n\n            mLockToggle->onClick = THIS_FUNC(OnLockClicked);\n        }\n\n        if (mEnableToggle)\n            mEnableToggle->onClick = THIS_FUNC(OnEnableCkicked);\n\n        if (mNameEditBox)\n            mNameEditBox->onChangeCompleted = THIS_FUNC(OnObjectNameChanged);\n    }\n\n    void SceneHierarchyTreeNode::SetSceneObject(const Ref<SceneEditableObject>& object)\n    {\n        mTargetObject = object;\n\n        if (mName != object->GetName())\n        {\n            mName = object->GetName();\n            mNameDrawable->SetText(mName);\n        }\n\n        float alpha = object->IsEnabledInHierarchy() ? 1.0f : 0.5f;\n        if (!Math::Equals(alpha, mNameDrawable->GetTransparency()))\n        {\n            mNameDrawable->SetTransparency(alpha);\n            mEnableToggle->SetTransparency(alpha);\n            mLinkBtn->SetTransparency(alpha);\n        }\n\n        if (auto actor = DynamicCast<Actor>(object))\n        {\n            mLinkBtn->SetEnabledForcible(actor->GetPrototype().IsValid());\n            mLinkBtnHalfHideState->SetState(!actor->GetPrototypeDirectly().IsValid());\n\n            if (actor->GetPrototype())\n            {\n                mLinkBtn->onClick = [=]() {\n                    auto proto = actor->GetPrototype();\n                    o2EditorAssets.ShowAssetIcon(proto->GetPath());\n                };\n            }\n        }\n        else \n            mLinkBtn->SetEnabledForcible(false);\n\n        if (object->IsSupportsDisabling())\n        {\n            mEnableToggle->SetValue(object->IsEnabled());\n            mEnableToggle->SetEnabledForcible(true);\n        }\n        else mEnableToggle->SetEnabledForcible(false);\n\n        mLockToggle->SetValue(object->IsLocked());\n        mLockToggleLockedState->SetState(object->IsLockedInHierarchy());\n        mLockToggleHalfHideState->SetState(object->IsLockedInHierarchy() && !object->IsLocked());\n    }\n\n    void SceneHierarchyTreeNode::EnableEditName()\n    {\n        mEditState->SetState(true);\n\n        mNameEditBox->text = mTargetObject->GetName();\n        mNameEditBox->SelectAll();\n        mNameEditBox->Widget::Focus();\n        mNameEditBox->ResetScroll();\n    }\n\n    String SceneHierarchyTreeNode::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    void SceneHierarchyTreeNode::OnLockClicked()\n    {\n        mTargetObject->SetLocked(mLockToggle->GetValue());\n    }\n\n    void SceneHierarchyTreeNode::OnEnableCkicked()\n    {\n        mTargetObject->SetEnabled(mEnableToggle->GetValue());\n    }\n\n    void SceneHierarchyTreeNode::OnObjectNameChanged(const WString& text)\n    {\n        String prevName = mTargetObject->GetName();\n\n        mTargetObject->SetName(text);\n        mEditState->SetState(false);\n        DynamicCast<SceneHierarchyTree>(mOwnerTree.Lock())->OnObjectChanged(mTargetObject);\n\n\n        DataDocument prevData; prevData = prevName;\n        DataDocument newData; newData = mTargetObject->GetName();\n\n        auto action = mmake<PropertyChangeAction>(Vector<Ref<SceneEditableObject>>{ mTargetObject }, \"name\",\n                                                  Vector<DataDocument>{ prevData }, Vector<DataDocument>{ newData });\n        o2EditorSceneWindow.DoneAction(action);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::SceneHierarchyTree>);\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<Editor::SceneHierarchyTreeNode>);\n// --- META ---\n\nDECLARE_CLASS(Editor::SceneHierarchyTree, Editor__SceneHierarchyTree);\n\nDECLARE_CLASS(Editor::SceneHierarchyTreeNode, Editor__SceneHierarchyTreeNode);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/TreeWindow/SceneHierarchyTree.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n\nnamespace o2\n{\n    class Actor;\n    class SceneEditableObject;\n    class Button;\n    class EditBox;\n    class Toggle;\n    class ToggleGroup;\n}\n\nusing namespace o2;\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(ActorProperty);\n    FORWARD_CLASS_REF(ComponentProperty);\n\n    // -----------------\n    // Scene tree widget\n    // -----------------\n    class SceneHierarchyTree : public Tree\n    {\n    public:\n        Function<void(const Vector<Ref<SceneEditableObject>>&)> onObjectsSelectionChanged; // Callback on objects selection changed\n\n    public:\n        // Default constructor\n        SceneHierarchyTree(RefCounter* refCounter);\n\n        // Copy-constructor\n        SceneHierarchyTree(RefCounter* refCounter, const SceneHierarchyTree& other);\n\n        // Copy-constructor\n        SceneHierarchyTree(const SceneHierarchyTree& other);\n\n        // Destructor\n        ~SceneHierarchyTree();\n\n        // Copy-operator\n        SceneHierarchyTree& operator=(const SceneHierarchyTree& other);\n\n        // Attaches to scene events\n        void AttachToSceneEvents();\n\n        // Deattaches from scene events\n        void DeattachFromSceneEvents();\n\n        // Returns ui node for object\n        Ref<TreeNode> GetNode(const Ref<SceneEditableObject>& object);\n\n        // Returns selected objects vector\n        Vector<Ref<SceneEditableObject>> GetSelectedObjects() const;\n\n        // Sets selected objects\n        void SetSelectedObjects(const Vector<Ref<SceneEditableObject>>& objects);\n\n        // Selects object\n        void SelectObject(const Ref<SceneEditableObject>& object);\n\n        // Selects object\n        void SelectAndHighlightObject(const Ref<SceneEditableObject>& object);\n\n        // Scrolls view to object and highlights\n        void ScrollToAndHighlight(const Ref<SceneEditableObject>& object);\n\n        // Deselects object\n        void DeselectObject(const Ref<SceneEditableObject>& object);\n\n        // Deselects all objects\n        void DeselectAllObjects();\n\n        // Scrolls view to object's tree node\n        void ScrollTo(const Ref<SceneEditableObject>& object);\n\n        // Restores expanded state from cache\n        void RestoreExpandedFromCache();\n\n        // Sets watching editor UI state\n        void SetEditorWatching(bool watching);\n\n        // Returns is watching editor UI state\n        bool IsEditorWatching() const;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(SceneHierarchyTree);\n        CLONEABLE_REF(SceneHierarchyTree);\n\n    protected:\n        Ref<ToggleGroup> mEnableTogglesGroup;    // Enable objects toggles group\n        Ref<ToggleGroup> mLockTogglesGroup;         // Lock objects toggles group\n        bool         mAttachedToSceneEvents; // Is tree attached to scene events\n\n        Ref<ActorProperty>     mDragActorPropertyField;     // Actor property field under cursor when dragging actor\n        Ref<ComponentProperty> mDragComponentPropertyField; // Component property field under cursor when dragging actor\n\n        Vector<SceneUID> mExpandedActorsCache; // Expanded actors cache, used to restore expanded state after scene reload\n\n        bool mWatchEditor = false;\n\n    protected:\n        // Initializes widget logic\n        void Initialize();\n\n        // Updates visible nodes (calculates range and initializes nodes), enables editor mode\n        void UpdateVisibleNodes() override;\n\n        // Gets tree node from pool or creates new, enables editor mode\n        Ref<TreeNode> CreateTreeNodeWidget() override;\n\n        // Returns object's parent\n        void* GetObjectParent(void* object) override;\n\n        // Returns object's children\n        Vector<void*> GetObjectChilds(void* object) override;\n\n        // Returns debugging string for object\n        String GetObjectDebug(void* object) override;\n\n        // Sets nodeWidget data by object\n        void FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object) override;\n\n        // Called when tree node was double clicked\n        void OnNodeDblClick(const Ref<TreeNode>& nodeWidget) override;\n\n        // Called when objects was dragged in new parent in position next of prevObject\n        void OnDraggedObjects(Vector<void*> objects, void* newParent, void* prevObject) override;\n\n        // Called when object was created\n        void OnObjectCreated(const Ref<SceneEditableObject>& object);\n\n        // Called when object was destroyed\n        void OnObjectDestroing(const Ref<SceneEditableObject>& object);\n\n        // Called when some objects were changed\n        void OnObjectsChanged(const Vector<Ref<SceneEditableObject>>& objects);\n\n        // Called when object was changed\n        void OnObjectChanged(const Ref<SceneEditableObject>& object);\n\n        // Called when enable objects toggle group pressed\n        void EnableObjectsGroupPressed(bool value);\n\n        // Called when enable objects toggle group released\n        void EnableObjectsGroupReleased(bool value);\n\n        // Called when lock objects toggle group pressed\n        void LockObjectsGroupPressed(bool value);\n\n        // Called when lock objects toggle group released\n        void LockObjectsGroupReleased(bool value);\n\n        // Called when list of selected objects was changed\n        void OnNodesSelectionChanged(Vector<void*> objects) override;\n\n        // Called when some drag listeners was entered to this area\n        void OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was exited from this area\n        void OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was dragged above this area\n        void OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some selectable listeners was dropped to this\n        void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when node was expanded\n        void OnNodeExpanded(void* object) override;\n\n        // Called when node was collapsed\n        void OnNodeCollapsed(void* object) override;\n\n        friend class SceneHierarchyTreeNode;\n    };\n\n    // ---------------\n    // Scene tree node\n    // ---------------\n    class SceneHierarchyTreeNode : public TreeNode\n    {\n    public:\n        // Default constructor\n        SceneHierarchyTreeNode(RefCounter* refCounter);\n\n        // Copy-constructor\n        SceneHierarchyTreeNode(RefCounter* refCounter, const SceneHierarchyTreeNode& other);\n\n        // Copy operator\n        SceneHierarchyTreeNode& operator=(const SceneHierarchyTreeNode& other);\n\n        // Sets object and updates content\n        void SetSceneObject(const Ref<SceneEditableObject>& object);\n\n        // Enables edit name edit box\n        void EnableEditName();\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(SceneHierarchyTreeNode);\n        CLONEABLE_REF(SceneHierarchyTreeNode);\n\n    protected:\n        Ref<SceneEditableObject> mTargetObject; // Target object\n\n        Ref<Toggle>      mLockToggle;              // Lock toggle\n        Ref<WidgetState> mLockToggleLockedState;   // Lock toggle locked state\n        Ref<WidgetState> mLockToggleHalfHideState; // Lock toggle half hide state\n\n        Ref<Toggle> mEnableToggle; // Enable toggle\n\n        Ref<Button>      mLinkBtn;              // View link button\n        Ref<WidgetState> mLinkBtnHalfHideState; // View link button half hide state\n\n        Ref<Text>        mNameDrawable; // Object name drawable\n        Ref<EditBox>     mNameEditBox;  // Object's name edit box\n        Ref<WidgetState> mEditState;    // Object's name edit state\n\n    protected:\n        // Called on deserialization, initializes controls\n        void OnDeserialized(const DataValue& node) override;\n\n        // initializes controls and widgets\n        void InitializeControls();\n\n        // Called when lock toggle was clicked and changes target object's lock state\n        void OnLockClicked();\n\n        // Called when enable toggle was clicked and changes target object's enable state\n        void OnEnableCkicked();\n\n        // Called when object name edit box changed\n        void OnObjectNameChanged(const WString& text);\n\n        friend class SceneHierarchyTree;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::SceneHierarchyTree)\n{\n    BASE_CLASS(o2::Tree);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SceneHierarchyTree)\n{\n    FIELD().PUBLIC().NAME(onObjectsSelectionChanged);\n    FIELD().PROTECTED().NAME(mEnableTogglesGroup);\n    FIELD().PROTECTED().NAME(mLockTogglesGroup);\n    FIELD().PROTECTED().NAME(mAttachedToSceneEvents);\n    FIELD().PROTECTED().NAME(mDragActorPropertyField);\n    FIELD().PROTECTED().NAME(mDragComponentPropertyField);\n    FIELD().PROTECTED().NAME(mExpandedActorsCache);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mWatchEditor);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SceneHierarchyTree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const SceneHierarchyTree&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const SceneHierarchyTree&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AttachToSceneEvents);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeattachFromSceneEvents);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<TreeNode>, GetNode, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<SceneEditableObject>>, GetSelectedObjects);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedObjects, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectObject, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectAndHighlightObject, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ScrollToAndHighlight, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeselectObject, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeselectAllObjects);\n    FUNCTION().PUBLIC().SIGNATURE(void, ScrollTo, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RestoreExpandedFromCache);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEditorWatching, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEditorWatching);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, Initialize);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateVisibleNodes);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<TreeNode>, CreateTreeNodeWidget);\n    FUNCTION().PROTECTED().SIGNATURE(void*, GetObjectParent, void*);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<void*>, GetObjectChilds, void*);\n    FUNCTION().PROTECTED().SIGNATURE(String, GetObjectDebug, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, FillNodeDataByObject, const Ref<TreeNode>&, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodeDblClick, const Ref<TreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraggedObjects, Vector<void*>, void*, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectCreated, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectDestroing, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectsChanged, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectChanged, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, EnableObjectsGroupPressed, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, EnableObjectsGroupReleased, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, LockObjectsGroupPressed, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, LockObjectsGroupReleased, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodesSelectionChanged, Vector<void*>);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnter, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExit, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraggedAbove, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDropped, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodeExpanded, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodeCollapsed, void*);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::SceneHierarchyTreeNode)\n{\n    BASE_CLASS(o2::TreeNode);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::SceneHierarchyTreeNode)\n{\n    FIELD().PROTECTED().NAME(mTargetObject);\n    FIELD().PROTECTED().NAME(mLockToggle);\n    FIELD().PROTECTED().NAME(mLockToggleLockedState);\n    FIELD().PROTECTED().NAME(mLockToggleHalfHideState);\n    FIELD().PROTECTED().NAME(mEnableToggle);\n    FIELD().PROTECTED().NAME(mLinkBtn);\n    FIELD().PROTECTED().NAME(mLinkBtnHalfHideState);\n    FIELD().PROTECTED().NAME(mNameDrawable);\n    FIELD().PROTECTED().NAME(mNameEditBox);\n    FIELD().PROTECTED().NAME(mEditState);\n}\nEND_META;\nCLASS_METHODS_META(Editor::SceneHierarchyTreeNode)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const SceneHierarchyTreeNode&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSceneObject, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, EnableEditName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLockClicked);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnableCkicked);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnObjectNameChanged, const WString&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/TreeWindow/TreeWindow.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"TreeWindow.h\"\n\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Components/AnimationComponent.h\"\n#include \"o2/Scene/Components/EditorTestComponent.h\"\n#include \"o2/Scene/Components/ImageComponent.h\"\n#include \"o2/Scene/Components/ParticlesEmitterComponent.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n#include \"o2/Utils/StringUtils.h\"\n#include \"o2/Utils/System/Clipboard.h\"\n#include \"o2Editor/Actions/Create.h\"\n#include \"o2Editor/Actions/Delete.h\"\n#include \"o2Editor/Actions/Enable.h\"\n#include \"o2Editor/Actions/Lock.h\"\n#include \"o2Editor/Actions/Reparent.h\"\n#include \"o2Editor/EditorApplication.h\"\n#include \"o2Editor/Properties/Properties.h\"\n#include \"o2Editor/Windows/PropertiesWindow/PropertiesWindow.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneEditScreen.h\"\n#include \"o2Editor/Windows/TreeWindow/DrawOrderTree.h\"\n#include \"o2Editor/Windows/TreeWindow/SceneHierarchyTree.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n#include \"o2Editor/Windows/SceneWindow/SceneWindow.h\"\n\nDECLARE_SINGLETON(Editor::TreeWindow);\n\nnamespace Editor\n{\n    TreeWindow::TreeWindow(RefCounter* refCounter):\n        Singleton<TreeWindow>(refCounter), IEditorWindow(refCounter)\n    {\n        InitializeWindow();\n    }\n\n    TreeWindow::TreeWindow(RefCounter* refCounter, const TreeWindow& other) :\n        Singleton<TreeWindow>(refCounter), IEditorWindow(refCounter, other)\n    {\n        InitializeWindow();\n    }\n\n    TreeWindow::~TreeWindow()\n    {}\n\n    const Ref<SceneHierarchyTree>& TreeWindow::GetSceneTree() const\n    {\n        return mSceneTree;\n    }\n\n    const Ref<DrawOrderTree>& TreeWindow::GetDrawOrderTree() const\n    {\n        return mDrawOrderTree;\n    }\n\n\tvoid TreeWindow::OnSceneFocused()\n\t{\n\t\tmTreeContextMenu->SetItemsMaxPriority();\n\t}\n\n    void TreeWindow::SetSelectedObjects(const Vector<Ref<SceneEditableObject>>& objects)\n    {\n        if (mSceneTree->IsEnabled())\n            mSceneTree->SetSelectedObjects(objects);\n        else\n            mDrawOrderTree->SetSelectedObjects(objects);\n    }\n\n    void TreeWindow::UpdateTreeView()\n    {\n        if (mSceneTree->IsEnabled())\n            mSceneTree->UpdateNodesView();\n\n        if (mDrawOrderTree->IsEnabled())\n            mDrawOrderTree->UpdateNodesView();\n    }\n\n    void TreeWindow::RestoreExpandedFromCache()\n    {\n        if (mSceneTree->IsEnabled())\n            mSceneTree->RestoreExpandedFromCache();\n    }\n\n    void TreeWindow::HighlightObjectTreeNode(const Ref<SceneEditableObject>& targetObject)\n    {\n        if (mSceneTree->IsEnabled())\n            mSceneTree->ScrollToAndHighlight(targetObject);\n        else\n            mDrawOrderTree->ScrollToAndHighlight(targetObject);\n    }\n\n    void TreeWindow::SetWidgetsLayersVisible(bool visible)\n    {\n        Widget::isEditorLayersVisible = visible;\n        mSceneTree->UpdateNodesView();\n    }\n\n    bool TreeWindow::IsWidgetsLayersVisible() const\n    {\n        return Widget::isEditorLayersVisible;\n    }\n\n    void TreeWindow::SetWidgetsInternalChildrenVisible(bool visible)\n    {\n        Widget::isEditorInternalChildrenVisible = visible;\n        mSceneTree->UpdateNodesView();\n    }\n\n    bool TreeWindow::IsWidgetsInternalChildrenVisible() const\n    {\n        return Widget::isEditorInternalChildrenVisible;\n    }\n\n    Ref<RefCounterable> TreeWindow::CastToRefCounterable(const Ref<TreeWindow>& ref)\n    {\n        return DynamicCast<Singleton<TreeWindow>>(ref);\n    }\n\n    void TreeWindow::InitializeWindow()\n    {\n        mWindow->caption = \"Tree\";\n        mWindow->name = \"tree window\";\n        mWindow->SetIcon(mmake<Sprite>(\"ui/UI4_tree_wnd_icon.png\"));\n        mWindow->SetIconLayout(Layout::Based(BaseCorner::LeftTop, Vec2F(20, 20), Vec2F(0, 1)));\n        mWindow->SetViewLayout(Layout::BothStretch(0, -2, 0, 18));\n\n        InitializeTopPanel();\n        InitializeSceneTree();\n        InitializeDrawOrderTree();\n        InitializeContextMenu();\n\n        mSceneTree->SetEnabled(true);\n        mDrawOrderTree->SetEnabled(false);\n\n        mSceneTree->UpdateNodesView();\n    }\n\n    void TreeWindow::InitializeSceneTree()\n    {\n        mSceneTree = o2UI.CreateWidget<SceneHierarchyTree>(\"standard\");\n        *mSceneTree->layout = WidgetLayout::BothStretch(2, 0, 0, 18);\n\n        mSceneTree->onNodeRightButtonClicked = THIS_FUNC(OnTreeRBPressed);\n\n        mWindow->AddChild(mSceneTree);\n    }\n\n    void TreeWindow::InitializeDrawOrderTree()\n    {\n        mDrawOrderTree = o2UI.CreateWidget<DrawOrderTree>(\"standard\");\n        *mDrawOrderTree->layout = WidgetLayout::BothStretch(2, 0, 0, 18);\n\n        mDrawOrderTree->onNodeRightButtonClicked = THIS_FUNC(OnTreeRBPressed);\n\n        mWindow->AddChild(mDrawOrderTree);\n    }\n\n    void TreeWindow::InitializeContextMenu()\n    {\n        // Context menu\n        mTreeContextMenu = o2UI.CreateWidget<ContextMenu>(\"standard\");\n        mTreeContextMenu->AddItem(\"Debug update view\", [&]() { mSceneTree->UpdateNodesView(); });\n\n        mTreeContextMenu->AddItem(\"---\");\n\n        mTreeContextMenu->AddItem(\"Create empty actor\", [&]() { OnContextCreateNewPressed(); }, AssetRef<ImageAsset>(),\n                                  ShortcutKeys({VK_N, VK_CTRL_CMD}));\n\n        mTreeContextMenu->AddItem(\"Create/UI/Empty layer.alayers\", [&]() { CreateObject<WidgetLayer>(\"Layer\"); });\n        mTreeContextMenu->AddItem(\"Create/UI/Sprite layer.alayers\", [&]()\n                                  {\n                                      ForcePopEditorScopeOnStack scope;\n\n                                      auto newLayer = mmake<WidgetLayer>();\n                                      newLayer->SetDrawable(mmake<Sprite>());\n                                      newLayer->name = \"Sprite\";\n                                      OnCreateObject(newLayer);\n                                  });\n\n        mTreeContextMenu->AddItem(\"Create/UI/Text layer.alayers\", [&]()\n                                  {\n                                      ForcePopEditorScopeOnStack scope;\n\n                                      auto newLayer = mmake<WidgetLayer>();\n                                      newLayer->SetDrawable(mmake<Text>());\n                                      newLayer->name = \"Text\";\n                                      OnCreateObject(newLayer);\n                                  });\n\n        InitializeCreateMenu();\n        InitUIStyleCreateMenu();\n\n        mTreeContextMenu->AddItem(\"---\");\n\n        mTreeContextMenu->AddItem(\"Copy\", [&]() { OnContextCopyPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_C, VK_CTRL_CMD}));\n        mTreeContextMenu->AddItem(\"Cut\", [&]() { OnContextCutPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_X, VK_CTRL_CMD}));\n        mTreeContextMenu->AddItem(\"Paste\", [&]() { OnContextPastePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_V, VK_CTRL_CMD}));\n        mTreeContextMenu->AddItem(\"Delete\", [&]() { OnContextDeletePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_DELETE}));\n        mTreeContextMenu->AddItem(\"Duplicate\", [&]() { OnContextDuplicatePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_D, VK_CTRL_CMD}));\n\n        mTreeContextMenu->AddItem(\"---\");\n\n        mTreeContextMenu->AddItem(\"Collapse all\", [&]() { OnContextCollapseAllPressed(); });\n        mTreeContextMenu->AddItem(\"Expand all\", [&]() { OnContextExpandAllPressed(); });\n\n        mTreeContextMenu->AddItem(\"---\");\n\n        mTreeContextMenu->AddItem(\"Enable\\\\disable\", [&]() { OnContextEnablePressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_L, VK_CTRL_CMD}));\n        mTreeContextMenu->AddItem(\"Lock\\\\unlock\", [&]() { OnContextLockPressed(); }, AssetRef<ImageAsset>(), ShortcutKeys({VK_O, VK_CTRL_CMD}));\n\n        mTreeContextMenu->AddItem(\"---\");\n\n        mTreeContextMenu->AddItem(\"Save prototype\", [&]() { OnContextCopyPressed(); });\n        mTreeContextMenu->AddItem(\"Reset to prototype\", [&]() { OnContextCopyPressed(); });\n        mTreeContextMenu->AddItem(\"Break link to prototype\", [&]() { OnContextCopyPressed(); });\n\n        mTreeContextMenu->AddItem(\"---\");\n\n        mTreeContextMenu->AddToggleItem(\"View widgets layers\", true, THIS_FUNC(OnViewLayersToggled));\n        mTreeContextMenu->AddToggleItem(\"View widgets internal children\", true, THIS_FUNC(OnViewInternalChildrenToggled));\n\n        mWindow->AddChild(mTreeContextMenu);\n\n        mSceneTree->onFocused = THIS_FUNC(OnSceneFocused);\n    }\n\n    void TreeWindow::InitializeCreateMenu()\n    {\n        auto subTypes = TypeOf(Actor).GetDerivedTypes();\n\n        for (auto& subType : subTypes)\n        {\n            String category = subType->InvokeStatic<String>(\"GetCreateMenuCategory\");\n            String path;\n            if (category.IsEmpty())\n                path = GetSmartName(subType->GetName().ReplacedAll(\"o2::\", \"\").ReplacedAll(\"::\", \"/\"));\n            else\n            {\n                String name = subType->GetName().ReplacedAll(\"o2::\", \"\");\n                int fnd = name.FindLast(\"::\");\n                if (fnd >= 0)\n                    name = name.SubStr(fnd + 2);\n\n                path = category + \"/\" + GetSmartName(name);\n            }\n\n            String group = subType->InvokeStatic<String>(\"GetCreateMenuGroup\");\n\n            mTreeContextMenu->AddItem(\"Create/\" + path + \".\" + group, [=]()\n                                      {\n                                          ForcePopEditorScopeOnStack scope;\n                                          auto newActor = DynamicCast<Actor>(subType->CreateSampleRef());\n                                          newActor->name = path.ReplacedAll(\"/\", \" \");\n                                          OnCreateObject(newActor);\n                                      });\n        }\n    }\n\n    void TreeWindow::InitUIStyleCreateMenu()\n    {\n        auto styleWidgets = o2UI.GetWidgetStyles();\n\n        for (auto& styleWidgetAsset : styleWidgets)\n        {\n            auto path = styleWidgetAsset->GetActor()->GetType().GetName() + \"/\" + styleWidgetAsset->GetActor()->GetName();\n            path.ReplaceAll(\"o2::\", \"\");\n            path.ReplaceAll(\"::\", \"/\");\n\n            mTreeContextMenu->AddItem(String(\"Create/UI/Style/\") + path, [=]()\n                                      {\n                                          ForcePopEditorScopeOnStack scope;\n                                          auto newWidget = styleWidgetAsset->GetActor()->CloneAsRef<Widget>();\n                                          newWidget->SetEnabledForcible(true);\n                                          OnCreateObject(newWidget);\n                                      });\n        }\n    }\n\n    void TreeWindow::InitUILayersCreateMenu()\n    {\n        mTreeContextMenu->AddItem(\"Create/UI layer/Empty\", [&]()\n                                  {\n                                      auto newLayer = mmake<WidgetLayer>();\n                                      newLayer->name = \"empty\";\n                                      OnCreateObject(newLayer);\n                                  });\n\n        mTreeContextMenu->AddItem(\"Create/UI layer/Sprite\", [&]()\n                                  {\n                                      auto newLayer = mmake<WidgetLayer>();\n                                      newLayer->SetDrawable(mmake<Sprite>());\n                                      newLayer->name = \"sprite\";\n                                      OnCreateObject(newLayer);\n                                  });\n\n        mTreeContextMenu->AddItem(\"Create/UI layer/Text\", [&]()\n                                  {\n                                      auto newLayer = mmake<WidgetLayer>();\n                                      newLayer->SetDrawable(mmake<Text>());\n                                      newLayer->name = \"text\";\n                                      OnCreateObject(newLayer);\n                                  });\n    }\n\n    void TreeWindow::PostInitializeWindow()\n    {\n        mSceneTree->AttachToSceneEvents();\n    }\n\n    void TreeWindow::OnSearchPressed()\n    {}\n\n    void TreeWindow::OnListTreeToggled(bool value)\n    {\n        mSceneTree->SetEnabled(!value);\n        mDrawOrderTree->SetEnabled(value);\n\n        mDrawOrderTree->RebuildOrderTree();\n        mDrawOrderTree->UpdateNodesView();\n    }\n\n    void TreeWindow::OnSearchEdited(const WString& searchStr)\n    {\n        mInSearch = searchStr.Length() > 0;\n\n        if (mInSearch)\n        {\n            mSearchObjects.Clear();\n\n            for (auto& actor : o2Scene.GetRootActors())\n                SearchObjectsRecursive(actor, (String)searchStr);\n        }\n\n        mSceneTree->UpdateNodesView();\n    }\n\n    void TreeWindow::SearchObjectsRecursive(const Ref<SceneEditableObject>& object, const String& searchStr)\n    {\n        if (object->GetName().CountOf(searchStr) > 0)\n            mSearchObjects.Add(object);\n\n        for (auto& child : object->GetEditableChildren())\n            SearchObjectsRecursive(child, searchStr);\n    }\n\n    void TreeWindow::OnTreeRBPressed(const Ref<TreeNode>& node)\n    {\n        bool canCreateUILayers = false;\n        if (node)\n        {\n            SceneEditableObject* object = (SceneEditableObject*)node->GetObject();\n            canCreateUILayers = dynamic_cast<WidgetLayer*>(object) != nullptr ||\n                dynamic_cast<Widget::LayersEditable*>(object) != nullptr ||\n                dynamic_cast<Widget*>(object) != nullptr;\n        }\n\n        //         mTreeContextMenu->FindItemWidget(\"Create UI/Empty layer\")->SetEnabled(canCreateUILayers);\n        //         mTreeContextMenu->FindItemWidget(\"Create UI/Sprite layer\")->SetEnabled(canCreateUILayers);\n        //         mTreeContextMenu->FindItemWidget(\"Create UI/Text layer\")->SetEnabled(canCreateUILayers);\n\n        mTreeContextMenu->Show();\n    }\n\n    void TreeWindow::OnCreateObject(const Ref<SceneEditableObject>& newObject)\n    {\n        auto selectedObjects = mSceneTree->GetSelectedObjects();\n\n        if (newObject->IsSupportsLayout())\n        {\n            if (!selectedObjects.IsEmpty())\n                newObject->SetLayout(Layout::BothStretch());\n            else\n                newObject->SetLayout(Layout::Based(BaseCorner::Center, Vec2F(100, 100)));\n        }\n        else\n            newObject->SetTransform(Basis(Vec2F(), Vec2F(100, 0), Vec2F(0, 100)));\n\n        if (selectedObjects.Count() > 0)\n        {\n            auto obj = selectedObjects.Last();\n\n            auto parentObject = obj;\n            parentObject->AddEditableChild(newObject);\n\n            auto parentChilds = parentObject->GetEditableChildren();\n            auto action = mmake<CreateAction>(Vector<Ref<SceneEditableObject>>{ newObject }, parentObject,\n                                              parentChilds.Count() > 1 ? parentChilds[parentChilds.Count() - 2] : Ref<SceneEditableObject>());\n\n            o2EditorSceneWindow.DoneAction(action);\n        }\n        else\n        {\n            auto sceneObjects = o2Scene.GetRootEditableObjects();\n            auto action = mmake<CreateAction>(Vector<Ref<SceneEditableObject>>{ newObject }, nullptr,\n                                              sceneObjects.Count() > 1 ? sceneObjects[sceneObjects.Count() - 2] : nullptr);\n\n            o2EditorSceneWindow.DoneAction(action);\n        }\n\n        newObject->UpdateTransform();\n\n        mSceneTree->ScrollToAndHighlight(newObject);\n        o2EditorSceneScreen.SelectObjectWithoutAction(newObject, false);\n    }\n\n    void TreeWindow::OnContextCreateNewPressed()\n    {\n        ForcePopEditorScopeOnStack scope;\n\n        auto newActor = mmake<Actor>();\n        newActor->name = \"Empty\";\n        OnCreateObject(newActor);\n    }\n\n    void TreeWindow::OnContextCreateSprite()\n    {\n        ForcePopEditorScopeOnStack scope;\n\n        auto newActor = mmake<Actor>();\n        newActor->AddComponent(mmake<ImageComponent>());\n        newActor->name = \"Sprite\";\n        newActor->transform->size = Vec2F(10, 10);\n        OnCreateObject(newActor);\n    }\n\n    void TreeWindow::OnContextCreateButton()\n    {}\n\n    void TreeWindow::OnContextCopyPressed()\n    {\n        DataDocument data;\n        data.Set(mSceneTree->GetSelectedObjects());\n\n        WString clipboardData = data.SaveAsString();\n\n        Clipboard::SetText(clipboardData);\n    }\n\n    void TreeWindow::OnContextCutPressed()\n    {\n        OnContextCopyPressed();\n        OnContextDeletePressed();\n    }\n\n    void TreeWindow::OnContextPastePressed()\n    {\n        ForcePopEditorScopeOnStack scope;\n\n        auto selectedObjects = mSceneTree->GetSelectedObjects();\n\n        auto parent = selectedObjects.Count() > 0 ? selectedObjects.Last() : nullptr;\n        auto parentChilds = parent ? parent->GetEditableChildren() : o2Scene.GetRootEditableObjects();\n        auto prevObject = parentChilds.Count() > 0 ? parentChilds.Last() : nullptr;\n\n        WString clipboardData = Clipboard::GetText();\n        DataDocument data;\n        data.LoadFromData(clipboardData);\n\n        Vector<Ref<SceneEditableObject>> objects;\n        data.Get(objects);\n\n        for (auto& object : objects)\n            object->GenerateNewID();\n\n        for (auto& object : objects)\n            object->SetEditableParent(parent);\n\n        mSceneTree->UpdateNodesView();\n\n        auto action = mmake<CreateAction>(objects, parent, prevObject);\n        o2EditorSceneWindow.DoneAction(action);\n\n        mSceneTree->SetSelectedObjects(objects);\n    }\n\n    void TreeWindow::OnContextDeletePressed()\n    {\n        o2EditorPropertiesWindow.SetTarget(nullptr);\n\n        auto selectedObjects = o2EditorSceneScreen.GetTopSelectedObjects();\n        o2EditorSceneScreen.ClearSelectionWithoutAction();\n\n        auto action = mmake<DeleteAction>(selectedObjects);\n        o2EditorSceneWindow.DoneAction(action);\n\n        for (auto& object : selectedObjects)\n        {\n            if (object->IsSupportsDeleting())\n            {\n                if (auto actor = DynamicCast<Actor>(object))\n                    o2Scene.DestroyActor(actor);\n            }\n        }\n\n        mSceneTree->UpdateNodesView();\n    }\n\n    void TreeWindow::OnContextDuplicatePressed()\n    {\n        ForcePopEditorScopeOnStack scope;\n\n        auto selectedObjects = o2EditorSceneScreen.GetTopSelectedObjects();\n\n        Vector<Ref<SceneEditableObject>> newObjects;\n\n        for (auto& object : selectedObjects)\n        {\n            auto copy = object->CloneAsRef<SceneEditableObject>();\n            copy->SetEditableParent(object->GetEditableParent());\n            newObjects.Add(copy);\n        }\n\n        mSceneTree->UpdateNodesView();\n        mSceneTree->SetSelectedObjects(newObjects);\n    }\n\n    void TreeWindow::OnContextExpandAllPressed()\n    {\n        auto selectedObjects = mSceneTree->GetSelectedObjects();\n\n        for (auto& object : selectedObjects)\n        {\n            auto node = mSceneTree->GetNode(object);\n\n            if (node)\n                node->Expand();\n        }\n    }\n\n    void TreeWindow::OnContextCollapseAllPressed()\n    {\n        auto selectedObject = mSceneTree->GetSelectedObjects();\n\n        for (auto& object : selectedObject)\n        {\n            auto node = mSceneTree->GetNode(object);\n\n            if (node)\n                node->Collapse();\n        }\n    }\n\n    void TreeWindow::OnContextLockPressed()\n    {\n        auto selectedObjects = mSceneTree->GetSelectedObjects();\n\n        bool value = selectedObjects.Count() > 0 ? !selectedObjects.Last()->IsLocked() : true;\n        auto action = mmake<LockAction>(selectedObjects, value);\n        o2EditorSceneWindow.DoneAction(action);\n\n        for (auto& object : selectedObjects)\n        {\n            object->SetLocked(value);\n        }\n    }\n\n    void TreeWindow::OnContextEnablePressed()\n    {\n        auto selectedObjects = mSceneTree->GetSelectedObjects();\n\n        bool value = selectedObjects.Count() > 0 ? !selectedObjects.Last()->IsEnabled() : true;\n        auto action = mmake<LockAction>(selectedObjects, value);\n        o2EditorSceneWindow.DoneAction(action);\n\n        for (auto& object : selectedObjects)\n        {\n            object->SetEnabled(value);\n        }\n    }\n\n    void TreeWindow::OnViewLayersToggled(bool view)\n    {\n        SetWidgetsLayersVisible(view);\n    }\n\n    void TreeWindow::OnViewInternalChildrenToggled(bool view)\n    {\n        SetWidgetsInternalChildrenVisible(view);\n    }\n\n    void TreeWindow::OnActorCreated(const Ref<SceneEditableObject>& actor)\n    {\n        mSceneTree->UpdateNodesView();\n    }\n\n    void TreeWindow::OnActorDestroyed(const Ref<SceneEditableObject>& actor)\n    {\n        mSceneTree->UpdateNodesView();\n    }\n\n    void TreeWindow::InitializeTopPanel()\n    {\n        auto upPanel = mmake<Widget>();\n        upPanel->name = \"up panel\";\n        *upPanel->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, 20, 0);\n        upPanel->AddLayer(\"back\", mmake<Sprite>(\"ui/UI4_square_field.png\"), Layout::BothStretch(-4, -4, -5, -5));\n\n        auto searchButton = o2UI.CreateWidget<Button>(\"search\");\n        *searchButton->layout = WidgetLayout::Based(BaseCorner::Left, Vec2F(20, 20), Vec2F(-1, 1));\n        searchButton->onClick += THIS_FUNC(OnSearchPressed);\n        upPanel->AddChild(searchButton);\n\n        mListTreeToggle = o2UI.CreateWidget<Toggle>(\"list-tree\");\n        *mListTreeToggle->layout = WidgetLayout::Based(BaseCorner::Right, Vec2F(20, 20), Vec2F(0, 0));\n        mListTreeToggle->onToggle += THIS_FUNC(OnListTreeToggled);\n        upPanel->AddChild(mListTreeToggle);\n\n        mSearchEditBox = o2UI.CreateWidget<EditBox>(\"backless\");\n        *mSearchEditBox->layout = WidgetLayout::BothStretch(19, 2, 21, -2);\n        mSearchEditBox->onChanged += THIS_FUNC(OnSearchEdited);\n        upPanel->AddChild(mSearchEditBox);\n\n        mWindow->AddChild(upPanel);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::TreeWindow, Editor__TreeWindow);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/TreeWindow/TreeWindow.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/IEditorWindow.h\"\n\nnamespace o2\n{\n    class SceneEditableObject;\n    class UIButtonGroup;\n    class ContextMenu;\n    class EditBox;\n    class Toggle;\n    class ToggleGroup;\n}\n\nusing namespace o2;\n\n// Editor actors tree access macros\n#define o2EditorTree TreeWindow::Instance()\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(SceneHierarchyTree);\n    FORWARD_CLASS_REF(DrawOrderTree);\n\n    // -----------------------------------------------------------------\n    // Actors tree window. Shows scene hierarchy tree or draw order tree\n    // -----------------------------------------------------------------\n    class TreeWindow: public Singleton<TreeWindow>, public IEditorWindow\n    {\n    public:\n        // Default constructor\n        explicit TreeWindow(RefCounter* refCounter);\n\n        // Copy-constructor\n        TreeWindow(RefCounter* refCounter, const TreeWindow& other);\n\n        // Destructor\n        ~TreeWindow();\n\n        // Returns actors tree widget\n        const Ref<SceneHierarchyTree>& GetSceneTree() const;\n\n        // Returns draw order tree widget\n        const Ref<DrawOrderTree>& GetDrawOrderTree() const;\n\n\t\t// Called when scene was focused, updates context menu priority\n\t\tvoid OnSceneFocused();\n\n        // Sets selected objects\n        void SetSelectedObjects(const Vector<Ref<SceneEditableObject>>& objects);\n\n        // Updates current tree\n        void UpdateTreeView();\n\n        // Restores expanded state from cache\n        void RestoreExpandedFromCache();\n\n        // Expands all actor's parents nodes in tree and highlights actor\n        void HighlightObjectTreeNode(const Ref<SceneEditableObject>& targetObject);\n\n        // Sets widgets layers visibility in hierarchy\n        void SetWidgetsLayersVisible(bool visible);\n\n        // Returns widgets layers visibility in hierarchy\n        bool IsWidgetsLayersVisible() const;\n\n        // Sets widgets internal children visibility in hierarchy\n        void SetWidgetsInternalChildrenVisible(bool visible);\n\n        // Returns widgets internal children visibility in hierarchy\n        bool IsWidgetsInternalChildrenVisible() const;\n\n        // Dynamic cast to RefCounterable via Singleton<TreeWindow>\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<TreeWindow>& ref);\n\n        IOBJECT(TreeWindow);\n        REF_COUNTERABLE_IMPL(IEditorWindow, Singleton<TreeWindow>);\n\n    protected:\n        Ref<Toggle>  mListTreeToggle; // Toggle between list and tree views\n        Ref<EditBox> mSearchEditBox;  // Search actors edit box\n\n        Ref<SceneHierarchyTree> mSceneTree;     // Scene hierarchy tree\n        Ref<DrawOrderTree>      mDrawOrderTree; // Draw order tree\n\n        Ref<ContextMenu> mTreeContextMenu; // Context menu\n\n        Vector<Ref<SceneEditableObject>> mSearchObjects;    // Array of searched objects\n        bool                             mInSearch = false; // True when searching objects (mSearchEditBox isn't empty)\n\n    protected:\n        // Initializes window\n        void InitializeWindow();\n\n        // Initializes actors tree widget\n        void InitializeSceneTree();\n\n        // Initializes draw order tree widget\n        void InitializeDrawOrderTree();\n\n        // Initializes top panel with filter\n        void InitializeTopPanel();\n\n        // Initializes context menu \n        void InitializeContextMenu();\n\n        // Gets all actor types and creates create sub menu\n        void InitializeCreateMenu();\n\n        // Creates creation menu items for UI style\n        void InitUIStyleCreateMenu();\n\n        // Creates creation menu for UI layers\n        void InitUILayersCreateMenu();\n\n        // Called after that all windows was created\n        void PostInitializeWindow() override;\n\n        // Called when search button pressed\n        void OnSearchPressed();\n\n        // Called when list-tree toggle changed value\n        void OnListTreeToggled(bool value);\n\n        // Called when search field was changed\n        void OnSearchEdited(const WString& searchStr);\n\n        // Searches actors\n        void SearchObjectsRecursive(const Ref<SceneEditableObject>& object, const String& searchStr);\n\n        // Called when tree node clicked by right button (For tree widget)\n        void OnTreeRBPressed(const Ref<TreeNode>& node);\n\n        template<typename _type>\n        void CreateObject(const String& name);\n\n        // Called when some object needs to be created and registers object insert action\n        void OnCreateObject(const Ref<SceneEditableObject>& newObject);\n\n        // Called when pressed \"Create new\" in context menu\n        void OnContextCreateNewPressed();\n\n        // Called when pressed \"Create sprite\" in context menu\n        void OnContextCreateSprite();\n\n        // Called when pressed \"Create button\" in context menu\n        void OnContextCreateButton();\n\n        // Called when pressed \"Copy\" in context menu\n        void OnContextCopyPressed();\n\n        // Called when pressed \"Cut\" in context menu\n        void OnContextCutPressed();\n\n        // Called when pressed \"Paste\" in context menu\n        void OnContextPastePressed();\n\n        // Called when pressed \"Delete\" in context menu\n        void OnContextDeletePressed();\n\n        // Called when pressed \"Duplicate\" in context menu\n        void OnContextDuplicatePressed();\n\n        // Called when pressed \"Expand all\" in context menu\n        void OnContextExpandAllPressed();\n\n        // Called when pressed \"Collapse all\" in context menu\n        void OnContextCollapseAllPressed();\n\n        // Called when pressed \"Lock/unlock\" in context menu\n        void OnContextLockPressed();\n\n        // Called when pressed \"Enable/disable\" in context menu\n        void OnContextEnablePressed();\n\n        // Called when view layers menu item toggled\n        void OnViewLayersToggled(bool view);\n\n        // Called when view internal children menu item toggled\n        void OnViewInternalChildrenToggled(bool view);\n\n        // Called when actor was created\n        void OnActorCreated(const Ref<SceneEditableObject>& object);\n\n        // Called when actor was destroyed\n        void OnActorDestroyed(const Ref<SceneEditableObject>& object);\n\n        friend class SceneEditWidget;\n    };\n\n    template<typename _type>\n    void TreeWindow::CreateObject(const String& name)\n    {\n        ForcePopEditorScopeOnStack scope;\n\n        auto object = mmake<_type>();\n        object->SetName(name);\n        OnCreateObject(object);\n    }\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::TreeWindow)\n{\n    BASE_CLASS(o2::Singleton<TreeWindow>);\n    BASE_CLASS(Editor::IEditorWindow);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::TreeWindow)\n{\n    FIELD().PROTECTED().NAME(mListTreeToggle);\n    FIELD().PROTECTED().NAME(mSearchEditBox);\n    FIELD().PROTECTED().NAME(mSceneTree);\n    FIELD().PROTECTED().NAME(mDrawOrderTree);\n    FIELD().PROTECTED().NAME(mTreeContextMenu);\n    FIELD().PROTECTED().NAME(mSearchObjects);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mInSearch);\n}\nEND_META;\nCLASS_METHODS_META(Editor::TreeWindow)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const TreeWindow&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<SceneHierarchyTree>&, GetSceneTree);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<DrawOrderTree>&, GetDrawOrderTree);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnSceneFocused);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedObjects, const Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateTreeView);\n    FUNCTION().PUBLIC().SIGNATURE(void, RestoreExpandedFromCache);\n    FUNCTION().PUBLIC().SIGNATURE(void, HighlightObjectTreeNode, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWidgetsLayersVisible, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsWidgetsLayersVisible);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWidgetsInternalChildrenVisible, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsWidgetsInternalChildrenVisible);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<TreeWindow>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeSceneTree);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeDrawOrderTree);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeTopPanel);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeContextMenu);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeCreateMenu);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitUIStyleCreateMenu);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitUILayersCreateMenu);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostInitializeWindow);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSearchPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnListTreeToggled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSearchEdited, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SearchObjectsRecursive, const Ref<SceneEditableObject>&, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTreeRBPressed, const Ref<TreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCreateObject, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCreateNewPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCreateSprite);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCreateButton);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCopyPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCutPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextPastePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextDeletePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextDuplicatePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextExpandAllPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextCollapseAllPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextLockPressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnContextEnablePressed);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnViewLayersToggled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnViewInternalChildrenToggled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnActorCreated, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnActorDestroyed, const Ref<SceneEditableObject>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/WindowsLayout.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"WindowsLayout.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Windows/DockWindowPlace.h\"\n#include \"o2Editor/Windows/DockableWindow.h\"\n#include \"o2Editor/Windows/IEditorWindow.h\"\n#include \"o2Editor/Windows/WindowsManager.h\"\n\nnamespace Editor\n{\n    void WindowsLayout::WindowDockPlaceInfo::RetrieveLayout(const Ref<Widget>& widget)\n    {\n        if (widget->GetType() == TypeOf(DockWindowPlace))\n        {\n            anchors.Set(widget->layout->GetAnchorLeft(), widget->layout->GetAnchorTop(),\n                        widget->layout->GetAnchorRight(), widget->layout->GetAnchorBottom());\n\n            for (auto& child : widget->GetChildWidgets())\n            {\n                if (child->GetType() == TypeOf(DockWindowPlace))\n                {\n                    childs.Add(WindowDockPlaceInfo());\n                    childs[childs.Count() - 1].RetrieveLayout(child);\n                }\n                else if (child->GetType() == TypeOf(DockableWindow) && child->IsEnabled())\n                {\n                    windows.Add(child->name);\n\n                    if (DynamicCast<DockableWindow>(child)->IsTabActive())\n                        active = child->name;\n                }\n            }\n        }\n    }\n\n    bool WindowsLayout::WindowDockPlaceInfo::operator==(const WindowDockPlaceInfo& other) const\n    {\n        return anchors == other.anchors && childs == other.childs && windows == other.windows;\n    }\n\n    bool WindowsLayout::operator==(const WindowsLayout& other) const\n    {\n        return mainDock == other.mainDock && windows == other.windows;\n    }\n\n    void WindowsLayout::RestoreDock(WindowDockPlaceInfo& dockDef, DockWindowPlace& dockWidget)\n    {\n        PushEditorScopeOnStack scope;\n\n        Vector<Ref<DockWindowPlace>> childDockWidgets;\n        for (auto& child : dockDef.childs)\n        {\n            dockWidget.interactable = false;\n\n            auto newDock = mmake<DockWindowPlace>();\n            newDock->name = \"dock place\";\n            dockWidget.AddChild(newDock);\n\n            *newDock->layout = WidgetLayout::BothStretch();\n            newDock->layout->anchorMin = child.anchors.LeftBottom();\n            newDock->layout->anchorMax = child.anchors.RightTop();\n            childDockWidgets.Add(newDock);\n        }\n\n        int idx = 0;\n        for (auto& child : dockDef.childs)\n        {\n            auto newDock = childDockWidgets[idx++];\n\n            if ((child.anchors.left < 1.0f && child.anchors.left > 0.0f) ||\n                (child.anchors.right < 1.0f && child.anchors.right > 0.0f))\n            {\n                auto neighborMin = childDockWidgets.FindOrDefault([&](auto& x) {\n                    return Math::Equals(x->layout->GetAnchorRight(), newDock->layout->GetAnchorLeft()) && x != newDock;\n                });\n\n                auto neighborMax = childDockWidgets.FindOrDefault([&](auto& x) {\n                    return Math::Equals(x->layout->GetAnchorLeft(), newDock->layout->GetAnchorRight()) && x != newDock;\n                });\n\n                newDock->SetResizibleDir(TwoDirection::Horizontal, 1.5f, neighborMin, neighborMax);\n\n                if (neighborMin)\n                    neighborMin->SetResizibleDir(TwoDirection::Horizontal, 1.5f, neighborMin->mNeighborMin.Lock(), newDock);\n\n                if (neighborMax)\n                    neighborMax->SetResizibleDir(TwoDirection::Horizontal, 1.5f, newDock, neighborMax->mNeighborMax.Lock());\n            }\n\n            if ((child.anchors.top < 1.0f && child.anchors.top > 0.0f) ||\n                (child.anchors.bottom < 1.0f && child.anchors.bottom > 0.0f))\n            {\n                auto neighborMin = childDockWidgets.FindOrDefault([&](auto& x) {\n                    return Math::Equals(x->layout->GetAnchorTop(), newDock->layout->GetAnchorBottom()) && x != newDock;\n                });\n\n                auto neighborMax = childDockWidgets.FindOrDefault([&](auto& x) {\n                    return Math::Equals(x->layout->GetAnchorBottom(), newDock->layout->GetAnchorTop()) && x != newDock;\n                });\n\n                newDock->SetResizibleDir(TwoDirection::Vertical, 1.5f, neighborMin, neighborMax);\n\n                if (neighborMin)\n                    neighborMin->SetResizibleDir(TwoDirection::Vertical, 1.5f, neighborMin->mNeighborMin.Lock(), newDock);\n\n                if (neighborMax)\n                    neighborMax->SetResizibleDir(TwoDirection::Vertical, 1.5f, newDock, neighborMax->mNeighborMax.Lock());\n            }\n        }\n\n        idx = 0;\n        for (auto& child : dockDef.childs)\n        {\n            auto newDock = childDockWidgets[idx++];\n            RestoreDock(child, *newDock);\n        }\n\n        Ref<DockableWindow> activeTabWindow;\n        for (auto& wnd : dockDef.windows)\n        {\n            auto window = o2EditorWindows.mEditorWindows.FindOrDefault([&](auto& x) {\n                return x->mWindow->GetName() == wnd; \n            });\n\n            if (window)\n            {\n                auto dockWnd = DynamicCast<DockableWindow>(window->mWindow);\n\n                dockWnd->mNonDockSize = dockWnd->layout->size;\n                dockWidget.AddChild(dockWnd);\n                *dockWnd->layout = WidgetLayout::BothStretch();\n                dockWnd->SetDocked(true);\n                dockWnd->Show();\n\n                if (dockDef.active == wnd)\n                    activeTabWindow = dockWnd;\n            }\n        }\n\n        dockWidget.ArrangeChildWindows();\n\n        if (activeTabWindow)\n            activeTabWindow->SetTabActive();\n\n        CleanEmptyDocks(dockWidget);\n    }\n\n    void WindowsLayout::CleanEmptyDocks(DockWindowPlace& dockPlace)\n    {\n        PushEditorScopeOnStack scope;\n\n        auto childs = dockPlace.GetChildWidgets();\n        for (auto& child : childs)\n        {\n            if (auto dockChild = DynamicCast<DockWindowPlace>(child))\n            {\n                CleanEmptyDocks(*dockChild);\n\n                if (dockChild->GetChildWidgets().IsEmpty())\n                    dockPlace.RemoveChild(child);\n            }\n        }\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(Editor::WindowsLayout, Editor__WindowsLayout);\n\nDECLARE_CLASS(Editor::WindowsLayout::WindowDockPlaceInfo, Editor__WindowsLayout__WindowDockPlaceInfo);\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/WindowsLayout.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class Widget;\n}\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(DockWindowPlace);\n\n    // ---------------------------------------\n    // Class that stores layout of all windows\n    // ---------------------------------------\n    class WindowsLayout : public ISerializable\n    {\n    public:\n        class WindowDockPlaceInfo : public ISerializable\n        {\n        public:\n            RectF                       anchors; // Anchors coefficients @SERIALIZABLE\n            Vector<String>              windows; // List of windows inside this place @SERIALIZABLE\n            String                      active;  // Name active window @SERIALIZABLE\n            Vector<WindowDockPlaceInfo> childs;     // Children places @SERIALIZABLE\n\n        public:\n            // Gets layout from widget \n            void RetrieveLayout(const Ref<Widget>& widget);\n\n            // Compares two dock places\n            bool operator==(const WindowDockPlaceInfo& other) const;\n\n            SERIALIZABLE(WindowDockPlaceInfo);\n        };\n\n    public:\n        WindowDockPlaceInfo       mainDock; // Root dock place @SERIALIZABLE\n        Map<String, WidgetLayout> windows;  // List of non-docked windows @SERIALIZABLE\n\n        // Equal operator\n        bool operator==(const WindowsLayout& other) const;\n\n        SERIALIZABLE(WindowsLayout);\n\n    protected:\n        // Restores dock recursively\n        void RestoreDock(WindowDockPlaceInfo& dockDef, DockWindowPlace& dockWidget);\n\n        // Removes all children empty dock places\n        void CleanEmptyDocks(DockWindowPlace& dockPlace);\n\n        friend class WindowsManager;\n    };\n\n}\n// --- META ---\n\nCLASS_BASES_META(Editor::WindowsLayout)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::WindowsLayout)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mainDock);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(windows);\n}\nEND_META;\nCLASS_METHODS_META(Editor::WindowsLayout)\n{\n\n    FUNCTION().PROTECTED().SIGNATURE(void, RestoreDock, WindowDockPlaceInfo&, DockWindowPlace&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CleanEmptyDocks, DockWindowPlace&);\n}\nEND_META;\n\nCLASS_BASES_META(Editor::WindowsLayout::WindowDockPlaceInfo)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(Editor::WindowsLayout::WindowDockPlaceInfo)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(anchors);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(windows);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(active);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(childs);\n}\nEND_META;\nCLASS_METHODS_META(Editor::WindowsLayout::WindowDockPlaceInfo)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, RetrieveLayout, const Ref<Widget>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/WindowsManager.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n#include \"WindowsManager.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/MenuPanel.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2Editor/Dialogs/ColorPickerDlg.h\"\n#include \"o2Editor/Dialogs/CurveEditorDlg.h\"\n#include \"o2Editor/Dialogs/EditNameDlg.h\"\n#include \"o2Editor/Dialogs/KeyEditDlg.h\"\n#include \"o2Editor/Dialogs/YesNoCancelDlg.h\"\n#include \"o2Editor/EditorConfig.h\"\n#include \"o2Editor/UI/Style/EditorUIStyle.h\"\n#include \"o2Editor/UIRoot.h\"\n#include \"o2Editor/Windows/DockWindowPlace.h\"\n#include \"o2Editor/Windows/DockableWindow.h\"\n#include \"o2Editor/Windows/IAssetEditorWindow.h\"\n#include \"o2Editor/Windows/IEditorWindow.h\"\n#include \"o2Editor/Windows/MemoryAnalyzerWindow/MemoryAnalyzerWindow.h\"\n\nnamespace Editor\n{\n    WindowsManager::WindowsManager(RefCounter* refCounter):\n        Singleton<WindowsManager>(refCounter)\n    {\n        PushEditorScopeOnStack scope;\n\n        mColorPickerDlg = mmake<ColorPickerDlg>();\n        mCurveEditorDlg = mmake<CurveEditorDlg>();\n        mNameEditDlg = mmake<NameEditDlg>();\n        mKeyEditDlg = mmake<KeyEditDlg>();\n\t\tmYesNoCanceDlg = mmake<YesNoCancelDlg>();\n\n        InitializeDock();\n        InitializeWindows();\n\n        SetWindowsLayout(o2EditorConfig.projectConfig.layout);\n\n        mAvailableLayouts = o2EditorConfig.globalConfig.availableLayouts;\n    }\n\n    WindowsManager::~WindowsManager()\n    {}\n\n    void WindowsManager::InitializeWindows()\n    {\n        auto windowTypes = TypeOf(IEditorWindow).GetDerivedTypes();\n\n        windowTypes.Remove(&TypeOf(IAssetEditorWindow));\n\n        for (auto& type : windowTypes)\n        {\n            auto newWindow = DynamicCast<IEditorWindow>(type->CreateSampleRef());\n            newWindow->Initialize();\n\n            mEditorWindows.Add(newWindow);\n\n            if (auto assetWindow = DynamicCast<IAssetEditorWindow>(newWindow))\n\t\t\t\tmAssetEditors[&assetWindow->GetAssetType()] = assetWindow;\n        }\n\n        for (auto& wnd : mEditorWindows)\n            wnd->PostInitializeWindow();\n\n        MemoryAnalyzerWindow::InitializeSingleton();\n    }\n\n    void WindowsManager::InitializeDock()\n    {\n        PushEditorScopeOnStack scope;\n\n        mMainDockPlace = mmake<DockWindowPlace>();\n        mMainDockPlace->name = \"main dock\";\n        *mMainDockPlace->layout = WidgetLayout::BothStretch(0, 0, 0, 48);\n        mMainDockPlace->SetResizibleDir(TwoDirection::Horizontal, 0, nullptr, nullptr);\n        EditorUIRoot.AddWidget(mMainDockPlace);\n    }\n\n    void WindowsManager::Update(float dt)\n    {\n        for (auto& wnd : mEditorWindows)\n            wnd->Update(dt);\n    }\n\n    void ProcHierarchy(String& hierarchy, const Ref<Widget>& widget, int level)\n    {\n        String sideNames[] = { \"Hor\", \"Ver\" };\n\n        for (int i = 0; i < level; i++)\n            hierarchy += ' ';\n\n        hierarchy += widget->GetName();\n\n        if (widget->GetType() == TypeOf(DockWindowPlace))\n        {\n            hierarchy += \": \";\n            hierarchy += (String)(bool)(DynamicCast<DockWindowPlace>(widget))->interactable;\n            hierarchy += \" \";\n            hierarchy += sideNames[(int)(DynamicCast<DockWindowPlace>(widget))->GetResizibleDir()];\n            RectF rt = widget->layout->GetWorldRect();\n            hierarchy += (String)rt.left + \" \" + (String)rt.bottom + \" \" + (String)rt.right + \" \" + (String)rt.top;\n        }\n\n        hierarchy += '\\n';\n\n        for (auto& child : widget->GetChildWidgets())\n            ProcHierarchy(hierarchy, child, level + 1);\n    }\n\n#undef DrawText\n\n    void WindowsManager::Draw()\n    {\n        for (auto& wnd : mEditorWindows)\n            wnd->Draw();\n\n//        return;\n//        String hierarchy;\n//        ProcHierarchy(hierarchy, EditorUIRoot.GetRootWidget(), 0);\n//        o2Debug.DrawText((Vec2F)(o2Render.GetResolution().InvertedX())*0.5f, hierarchy);\n    }\n\n    void WindowsManager::AddWindow(const Ref<IEditorWindow>& window)\n    {\n        mEditorWindows.Add(window);\n    }\n\n    WindowsLayout WindowsManager::GetWindowsLayout()\n    {\n        WindowsLayout res;\n\n        res.mainDock.RetrieveLayout(o2EditorWindows.mMainDockPlace);\n\n        for (auto& widget : EditorUIRoot.GetRootWidget()->GetChildWidgets())\n        {\n            if (widget->GetType() == TypeOf(DockableWindow))\n                res.windows.Add(widget->name, *widget->layout);\n        }\n\n        return res;\n    }\n\n    void WindowsManager::SetWindowsLayout(WindowsLayout layout)\n    {\n        PushEditorScopeOnStack scope;\n\n        for (auto& wnd : layout.windows)\n        {\n            auto editorWindow = o2EditorWindows.mEditorWindows.FindOrDefault([&](const Ref<IEditorWindow>& x) {\n                return x->mWindow->GetName() == wnd.first;\n            });\n\n            if (!editorWindow)\n            {\n                o2Debug.Log(\"Can't restore window with name:\" + wnd.first);\n                continue;\n            }\n\n            if (auto dockWnd = editorWindow->mWindow)\n            {\n                editorWindow->Show();\n                *dockWnd->layout = wnd.second;\n            }\n        }\n\n        layout.RestoreDock(layout.mainDock, *o2EditorWindows.mMainDockPlace.Get());\n\n        for (auto& wnd : o2EditorWindows.mEditorWindows)\n        {\n            bool hide = !layout.windows.ContainsKey(wnd->mWindow->GetName()) && \n                wnd->mWindow->GetParent().Lock()->GetType() != TypeOf(DockWindowPlace);\n\n            if (hide)\n                wnd->Hide();\n        }\n    }\n\n    void WindowsManager::SetWindowsLayout(const String& name)\n    {\n        if (mAvailableLayouts.ContainsKey(name))\n            SetWindowsLayout(mAvailableLayouts[name]);\n    }\n\n    void WindowsManager::SetDefaultWindowsLayout()\n    {\n        SetWindowsLayout(o2EditorConfig.globalConfig.defaultLayout);\n    }\n\n    void WindowsManager::SaveCurrentWindowsLayout(const String& name)\n    {\n        mAvailableLayouts[name] = GetWindowsLayout();\n    }\n\n\tRef<IAssetEditorWindow> WindowsManager::GetAssetEditor(const Type* type) const\n\t{\n\t\treturn mAssetEditors.FindKey(type).second;\n\t}\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/Windows/WindowsManager.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2Editor/Dialogs/KeyEditDlg.h\"\n#include \"o2Editor/Windows/IAssetEditorWindow.h\"\n#include \"o2Editor/Windows/WindowsLayout.h\"\n\nusing namespace o2;\n\nnamespace o2\n{\n    class MenuPanel;\n    class Window;\n}\n\n// Editor windows accessor macros\n#define o2EditorWindows WindowsManager::Instance()\n\nnamespace Editor\n{\n    FORWARD_CLASS_REF(ColorPickerDlg);\n    FORWARD_CLASS_REF(CurveEditorDlg);\n    FORWARD_CLASS_REF(IEditorWindow);\n    FORWARD_CLASS_REF(NameEditDlg);\n\tFORWARD_CLASS_REF(YesNoCancelDlg);\n    FORWARD_CLASS_REF(DockWindowPlace);\n\n    // ----------------------\n    // Editor windows manager\n    // ----------------------\n    class WindowsManager: public Singleton<WindowsManager>\n    {\n    public:\n        // Default constructor\n        WindowsManager(RefCounter* refCounter);\n\n        // Destructor\n        ~WindowsManager();\n\n        // Adds new window\n        void AddWindow(const Ref<IEditorWindow>& window);\n\n        // Returns window by type\n        template<typename _type>\n        Ref<_type> GetWindow() const;\n\n        // Returns current windows layout\n        WindowsLayout GetWindowsLayout();\n\n        // Sets windows layout\n        void SetWindowsLayout(WindowsLayout layout);\n\n        // Sets windows layout by name\n        void SetWindowsLayout(const String& name);\n\n        // Sets default windows layout\n        void SetDefaultWindowsLayout();\n\n        // Saves current windows layout with name\n        void SaveCurrentWindowsLayout(const String& name);\n\n\t\t// Returns asset editor by type\n\t\tRef<IAssetEditorWindow> GetAssetEditor(const Type* type) const;\n\n    protected:\n\t\tVector<Ref<IEditorWindow>>                mEditorWindows; // Editors windows list\n\t\tMap<const Type*, Ref<IAssetEditorWindow>> mAssetEditors;  // Asset editors by type\n\n        Ref<DockWindowPlace>       mMainDockPlace;    // Main windows dock place\n        Map<String, WindowsLayout> mAvailableLayouts; // Available layouts\n\n        Ref<ColorPickerDlg> mColorPickerDlg;   // Color picker dialog\n        Ref<CurveEditorDlg> mCurveEditorDlg;   // Curve editor dialog\n        Ref<NameEditDlg>    mNameEditDlg;      // Name edit dialog\n        Ref<KeyEditDlg>     mKeyEditDlg;       // Key edit dialog\n\t\tRef<YesNoCancelDlg> mYesNoCanceDlg;    // Yes/No/Cancel dialog\n\n    protected:\n        // Searches derived from IEditorWindow and creates them\n        void InitializeWindows();\n\n        // Initializes docking \n        void InitializeDock();\n\n        // Updates windows\n        void Update(float dt);\n\n        // Draws windows\n        void Draw();\n\n        friend class EditorConfig;\n        friend class EditorApplication;\n        friend class ToolsPanel;\n        friend class WindowsLayout;\n    };\n}\n\n#include \"o2Editor/Windows/IEditorWindow.h\"\n\nnamespace Editor\n{\n    template<typename _type>\n    Ref<_type> WindowsManager::GetWindow() const\n    {\n        for (auto& wnd : mEditorWindows)\n        {\n            if (wnd->GetType() == TypeOf(_type))\n                return DynamicCast<_type>(wnd);\n        }\n\n        return nullptr;\n    }\n}\n"
  },
  {
    "path": "Editor/Sources/o2Editor/o2Editor.cpp",
    "content": "extern void __RegisterEnum__Editor__ColorPickerDlg__ParameterType();\nextern void __RegisterEnum__Editor__ColorGradientProperty__HandleType();\nextern void __RegisterEnum__Editor__AnimationStateGraphEditor__StateTransition__TransitionStatus();\nextern void __RegisterEnum__Editor__AnimationStateGraphEditor__StateWidget__TransitionState();\nextern void __RegisterEnum__Editor__LogWindow__LogMessage__Type();\nextern void __RegisterEnum__Editor__DrawOrderTree__OrderTreeNode__Type();\nextern void __RegisterTemplateClass__Editor__KeyFramesTrackControl_AnimationTrack_float__();\nextern void __RegisterTemplateClass__Editor__KeyFramesTrackControl_AnimationTrack_bool__();\nextern void __RegisterTemplateClass__Editor__KeyFramesTrackControl_AnimationTrack_Color4__();\nextern void __RegisterTemplateClass__Editor__KeyFramesTrackControl_AnimationTrack_Vec2F__();\nextern void __RegisterClass__Editor__CreateAction();\nextern void __RegisterClass__Editor__DeleteAction();\nextern void __RegisterClass__Editor__DeleteAction__ObjectInfo();\nextern void __RegisterClass__Editor__EnableAction();\nextern void __RegisterClass__Editor__IAction();\nextern void __RegisterClass__Editor__LockAction();\nextern void __RegisterClass__Editor__PropertyChangeAction();\nextern void __RegisterClass__Editor__ReparentAction();\nextern void __RegisterClass__Editor__SelectAction();\nextern void __RegisterClass__Editor__TransformAction();\nextern void __RegisterClass__Editor__EditorApplication();\nextern void __RegisterClass__Editor__EditorConfig();\nextern void __RegisterClass__Editor__EditorConfig__GlobalConfig();\nextern void __RegisterClass__Editor__EditorConfig__ProjectConfig();\nextern void __RegisterClass__Editor__ActorProperty();\nextern void __RegisterClass__Editor__AssetProperty();\nextern void __RegisterClass__Editor__BooleanProperty();\nextern void __RegisterClass__Editor__BorderFProperty();\nextern void __RegisterClass__Editor__BorderIProperty();\nextern void __RegisterClass__Editor__ColorGradientProperty();\nextern void __RegisterClass__Editor__ColorGradientProperty__GradientPreviewDrawable();\nextern void __RegisterClass__Editor__ColorProperty();\nextern void __RegisterClass__Editor__ComponentProperty();\nextern void __RegisterClass__Editor__CurveProperty();\nextern void __RegisterClass__Editor__EnumProperty();\nextern void __RegisterClass__Editor__FloatProperty();\nextern void __RegisterClass__Editor__FunctionProperty();\nextern void __RegisterClass__Editor__IntegerProperty();\nextern void __RegisterClass__Editor__ObjectProperty();\nextern void __RegisterClass__Editor__ObjectPtrProperty();\nextern void __RegisterClass__Editor__RectFProperty();\nextern void __RegisterClass__Editor__RectIProperty();\nextern void __RegisterClass__Editor__SceneLayerRefProperty();\nextern void __RegisterClass__Editor__SceneLayersListProperty();\nextern void __RegisterClass__Editor__ScriptValueProperty();\nextern void __RegisterClass__Editor__StringProperty();\nextern void __RegisterClass__Editor__TagsProperty();\nextern void __RegisterClass__Editor__Vec2FProperty();\nextern void __RegisterClass__Editor__Vec2IProperty();\nextern void __RegisterClass__Editor__VectorProperty();\nextern void __RegisterClass__Editor__WStringProperty();\nextern void __RegisterClass__Editor__IObjectPropertiesViewer();\nextern void __RegisterClass__Editor__IPropertyField();\nextern void __RegisterClass__Editor__ObjectViewer();\nextern void __RegisterClass__Editor__CameraActorViewer();\nextern void __RegisterClass__Editor__ImageAssetViewer();\nextern void __RegisterClass__Editor__VectorFontAssetViewer();\nextern void __RegisterClass__Editor__AnimationStateViewer();\nextern void __RegisterClass__Editor__MeshComponentViewer();\nextern void __RegisterClass__Editor__ParticlesEmitterComponentViewer();\nextern void __RegisterClass__Editor__SkinningMeshBoneComponentViewer();\nextern void __RegisterClass__Editor__SkinningMeshComponentViewer();\nextern void __RegisterClass__Editor__SplineColliderViewer();\nextern void __RegisterClass__Editor__DefaultObjectPropertiesViewer();\nextern void __RegisterClass__Editor__ParticlesSplineEffectViewer();\nextern void __RegisterClass__Editor__SpriteViewer();\nextern void __RegisterClass__Editor__TextViewer();\nextern void __RegisterClass__Editor__CustomFrameTool();\nextern void __RegisterClass__Editor__FrameTool();\nextern void __RegisterClass__Editor__IEditTool();\nextern void __RegisterClass__Editor__ITransformTool();\nextern void __RegisterClass__Editor__MeshTopologyTool();\nextern void __RegisterClass__Editor__MeshWeightsTool();\nextern void __RegisterClass__Editor__MoveTool();\nextern void __RegisterClass__Editor__RotateTool();\nextern void __RegisterClass__Editor__ScaleTool();\nextern void __RegisterClass__Editor__SelectionTool();\nextern void __RegisterClass__Editor__SkeletonTool();\nextern void __RegisterClass__Editor__SplineTool();\nextern void __RegisterClass__Editor__CurveAddKeysAction();\nextern void __RegisterClass__Editor__CurveDeleteKeysAction();\nextern void __RegisterClass__Editor__CurveKeysChangeAction();\nextern void __RegisterClass__Editor__CurvesEditor();\nextern void __RegisterClass__Editor__CurvesEditor__CurveHandle();\nextern void __RegisterClass__Editor__CurvesEditor__CurveCopyInfo();\nextern void __RegisterClass__Editor__CurvePreview();\nextern void __RegisterClass__Editor__FrameScrollView();\nextern void __RegisterClass__Editor__ImageSlicesEditorWidget();\nextern void __RegisterClass__Editor__ImageSlicesEditorWidget__PreviewImage();\nextern void __RegisterClass__Editor__ScrollView();\nextern void __RegisterClass__Editor__SpoilerWithHead();\nextern void __RegisterClass__o2__BasicUIStyleBuilder();\nextern void __RegisterClass__Editor__EditorUIStyleBuilder();\nextern void __RegisterClass__Editor__TexturePreview();\nextern void __RegisterClass__Editor__AnimationGraphTransitionViewer();\nextern void __RegisterClass__Editor__AnimationStateGraphEditor();\nextern void __RegisterClass__Editor__AnimationStateGraphEditor__StateAnimation();\nextern void __RegisterClass__Editor__AnimationStateGraphEditor__StateTransition();\nextern void __RegisterClass__Editor__AnimationStateGraphEditor__StateWidget();\nextern void __RegisterClass__Editor__AnimationStateGraphWindow();\nextern void __RegisterClass__Editor__GraphAnimationStateViewer();\nextern void __RegisterClass__Editor__AnimationAddKeysAction();\nextern void __RegisterClass__Editor__AnimationDeleteKeysAction();\nextern void __RegisterClass__Editor__AnimationKeysChangeAction();\nextern void __RegisterClass__Editor__AnimationWindow();\nextern void __RegisterClass__Editor__CurvesSheet();\nextern void __RegisterClass__Editor__KeyHandlesSheet();\nextern void __RegisterClass__Editor__AnimationPropertiesTree();\nextern void __RegisterClass__Editor__AnimationPropertiesTreeNode();\nextern void __RegisterClass__Editor__AnimationTimeline();\nextern void __RegisterClass__Editor__AnimationKeyDragHandle();\nextern void __RegisterClass__Editor__ITrackControl();\nextern void __RegisterClass__Editor__MapKeyFramesTrackControl();\nextern void __RegisterClass__Editor__SubTrackControl();\nextern void __RegisterClass__Editor__Vec2KeyFramesTrackControl();\nextern void __RegisterClass__Editor__AnimationTree();\nextern void __RegisterClass__Editor__AnimationTreeNode();\nextern void __RegisterClass__Editor__AssetIcon();\nextern void __RegisterClass__Editor__AssetsIconsScrollArea();\nextern void __RegisterClass__Editor__AssetsWindow();\nextern void __RegisterClass__Editor__AssetsFoldersTree();\nextern void __RegisterClass__Editor__FoldersTree();\nextern void __RegisterClass__Editor__DockWindowPlace();\nextern void __RegisterClass__Editor__DockableWindow();\nextern void __RegisterClass__Editor__GameWindow();\nextern void __RegisterClass__Editor__GameWindow__GameView();\nextern void __RegisterClass__Editor__GameWindow__SimulationDevice();\nextern void __RegisterClass__Editor__IAssetEditorWindow();\nextern void __RegisterClass__Editor__IEditorWindow();\nextern void __RegisterClass__Editor__LogWindow();\nextern void __RegisterClass__Editor__MemoryAnalyzeTree();\nextern void __RegisterClass__Editor__MemoryAnalyzeTreeNode();\nextern void __RegisterClass__Editor__ActorViewer();\nextern void __RegisterClass__Editor__AddComponentPanel();\nextern void __RegisterClass__Editor__ComponentsTree();\nextern void __RegisterClass__Editor__ComponentsTreeNode();\nextern void __RegisterClass__Editor__DefaultActorComponentViewer();\nextern void __RegisterClass__Editor__DefaultActorHeaderViewer();\nextern void __RegisterClass__Editor__DefaultActorPropertiesViewer();\nextern void __RegisterClass__Editor__DefaultActorTransformViewer();\nextern void __RegisterClass__Editor__IActorComponentViewer();\nextern void __RegisterClass__Editor__IActorHeaderViewer();\nextern void __RegisterClass__Editor__IActorPropertiesViewer();\nextern void __RegisterClass__Editor__IActorTransformViewer();\nextern void __RegisterClass__Editor__AssetPropertiesViewer();\nextern void __RegisterClass__Editor__DefaultPropertiesViewer();\nextern void __RegisterClass__Editor__IPropertiesViewer();\nextern void __RegisterClass__Editor__PropertiesWindow();\nextern void __RegisterClass__Editor__DefaultWidgetLayerHeaderViewer();\nextern void __RegisterClass__Editor__DefaultWidgetLayerLayoutViewer();\nextern void __RegisterClass__Editor__DefaultWidgetLayerPropertiesViewer();\nextern void __RegisterClass__Editor__IWidgetLayerHeaderViewer();\nextern void __RegisterClass__Editor__IWidgetLayerLayoutViewer();\nextern void __RegisterClass__Editor__IWidgetLayerPropertiesViewer();\nextern void __RegisterClass__Editor__WidgetLayerViewer();\nextern void __RegisterClass__Editor__LayersPopup();\nextern void __RegisterClass__Editor__LayerPopupItem();\nextern void __RegisterClass__Editor__SceneDragHandle();\nextern void __RegisterClass__Editor__SceneEditScreen();\nextern void __RegisterClass__Editor__SceneWindow();\nextern void __RegisterClass__Editor__DrawOrderTree();\nextern void __RegisterClass__Editor__DrawOrderTreeNode();\nextern void __RegisterClass__Editor__SceneHierarchyTree();\nextern void __RegisterClass__Editor__SceneHierarchyTreeNode();\nextern void __RegisterClass__Editor__TreeWindow();\nextern void __RegisterClass__Editor__WindowsLayout();\nextern void __RegisterClass__Editor__WindowsLayout__WindowDockPlaceInfo();\n\n\nextern void InitializeTypeso2Editor()\n{\n    __RegisterEnum__Editor__ColorPickerDlg__ParameterType();\n    __RegisterEnum__Editor__ColorGradientProperty__HandleType();\n    __RegisterEnum__Editor__AnimationStateGraphEditor__StateTransition__TransitionStatus();\n    __RegisterEnum__Editor__AnimationStateGraphEditor__StateWidget__TransitionState();\n    __RegisterEnum__Editor__LogWindow__LogMessage__Type();\n    __RegisterEnum__Editor__DrawOrderTree__OrderTreeNode__Type();\n    __RegisterTemplateClass__Editor__KeyFramesTrackControl_AnimationTrack_float__();\n    __RegisterTemplateClass__Editor__KeyFramesTrackControl_AnimationTrack_bool__();\n    __RegisterTemplateClass__Editor__KeyFramesTrackControl_AnimationTrack_Color4__();\n    __RegisterTemplateClass__Editor__KeyFramesTrackControl_AnimationTrack_Vec2F__();\n    __RegisterClass__Editor__CreateAction();\n    __RegisterClass__Editor__DeleteAction();\n    __RegisterClass__Editor__DeleteAction__ObjectInfo();\n    __RegisterClass__Editor__EnableAction();\n    __RegisterClass__Editor__IAction();\n    __RegisterClass__Editor__LockAction();\n    __RegisterClass__Editor__PropertyChangeAction();\n    __RegisterClass__Editor__ReparentAction();\n    __RegisterClass__Editor__SelectAction();\n    __RegisterClass__Editor__TransformAction();\n    __RegisterClass__Editor__EditorApplication();\n    __RegisterClass__Editor__EditorConfig();\n    __RegisterClass__Editor__EditorConfig__GlobalConfig();\n    __RegisterClass__Editor__EditorConfig__ProjectConfig();\n    __RegisterClass__Editor__ActorProperty();\n    __RegisterClass__Editor__AssetProperty();\n    __RegisterClass__Editor__BooleanProperty();\n    __RegisterClass__Editor__BorderFProperty();\n    __RegisterClass__Editor__BorderIProperty();\n    __RegisterClass__Editor__ColorGradientProperty();\n    __RegisterClass__Editor__ColorGradientProperty__GradientPreviewDrawable();\n    __RegisterClass__Editor__ColorProperty();\n    __RegisterClass__Editor__ComponentProperty();\n    __RegisterClass__Editor__CurveProperty();\n    __RegisterClass__Editor__EnumProperty();\n    __RegisterClass__Editor__FloatProperty();\n    __RegisterClass__Editor__FunctionProperty();\n    __RegisterClass__Editor__IntegerProperty();\n    __RegisterClass__Editor__ObjectProperty();\n    __RegisterClass__Editor__ObjectPtrProperty();\n    __RegisterClass__Editor__RectFProperty();\n    __RegisterClass__Editor__RectIProperty();\n    __RegisterClass__Editor__SceneLayerRefProperty();\n    __RegisterClass__Editor__SceneLayersListProperty();\n    __RegisterClass__Editor__ScriptValueProperty();\n    __RegisterClass__Editor__StringProperty();\n    __RegisterClass__Editor__TagsProperty();\n    __RegisterClass__Editor__Vec2FProperty();\n    __RegisterClass__Editor__Vec2IProperty();\n    __RegisterClass__Editor__VectorProperty();\n    __RegisterClass__Editor__WStringProperty();\n    __RegisterClass__Editor__IObjectPropertiesViewer();\n    __RegisterClass__Editor__IPropertyField();\n    __RegisterClass__Editor__ObjectViewer();\n    __RegisterClass__Editor__CameraActorViewer();\n    __RegisterClass__Editor__ImageAssetViewer();\n    __RegisterClass__Editor__VectorFontAssetViewer();\n    __RegisterClass__Editor__AnimationStateViewer();\n    __RegisterClass__Editor__MeshComponentViewer();\n    __RegisterClass__Editor__ParticlesEmitterComponentViewer();\n    __RegisterClass__Editor__SkinningMeshBoneComponentViewer();\n    __RegisterClass__Editor__SkinningMeshComponentViewer();\n    __RegisterClass__Editor__SplineColliderViewer();\n    __RegisterClass__Editor__DefaultObjectPropertiesViewer();\n    __RegisterClass__Editor__ParticlesSplineEffectViewer();\n    __RegisterClass__Editor__SpriteViewer();\n    __RegisterClass__Editor__TextViewer();\n    __RegisterClass__Editor__CustomFrameTool();\n    __RegisterClass__Editor__FrameTool();\n    __RegisterClass__Editor__IEditTool();\n    __RegisterClass__Editor__ITransformTool();\n    __RegisterClass__Editor__MeshTopologyTool();\n    __RegisterClass__Editor__MeshWeightsTool();\n    __RegisterClass__Editor__MoveTool();\n    __RegisterClass__Editor__RotateTool();\n    __RegisterClass__Editor__ScaleTool();\n    __RegisterClass__Editor__SelectionTool();\n    __RegisterClass__Editor__SkeletonTool();\n    __RegisterClass__Editor__SplineTool();\n    __RegisterClass__Editor__CurveAddKeysAction();\n    __RegisterClass__Editor__CurveDeleteKeysAction();\n    __RegisterClass__Editor__CurveKeysChangeAction();\n    __RegisterClass__Editor__CurvesEditor();\n    __RegisterClass__Editor__CurvesEditor__CurveHandle();\n    __RegisterClass__Editor__CurvesEditor__CurveCopyInfo();\n    __RegisterClass__Editor__CurvePreview();\n    __RegisterClass__Editor__FrameScrollView();\n    __RegisterClass__Editor__ImageSlicesEditorWidget();\n    __RegisterClass__Editor__ImageSlicesEditorWidget__PreviewImage();\n    __RegisterClass__Editor__ScrollView();\n    __RegisterClass__Editor__SpoilerWithHead();\n    __RegisterClass__o2__BasicUIStyleBuilder();\n    __RegisterClass__Editor__EditorUIStyleBuilder();\n    __RegisterClass__Editor__TexturePreview();\n    __RegisterClass__Editor__AnimationGraphTransitionViewer();\n    __RegisterClass__Editor__AnimationStateGraphEditor();\n    __RegisterClass__Editor__AnimationStateGraphEditor__StateAnimation();\n    __RegisterClass__Editor__AnimationStateGraphEditor__StateTransition();\n    __RegisterClass__Editor__AnimationStateGraphEditor__StateWidget();\n    __RegisterClass__Editor__AnimationStateGraphWindow();\n    __RegisterClass__Editor__GraphAnimationStateViewer();\n    __RegisterClass__Editor__AnimationAddKeysAction();\n    __RegisterClass__Editor__AnimationDeleteKeysAction();\n    __RegisterClass__Editor__AnimationKeysChangeAction();\n    __RegisterClass__Editor__AnimationWindow();\n    __RegisterClass__Editor__CurvesSheet();\n    __RegisterClass__Editor__KeyHandlesSheet();\n    __RegisterClass__Editor__AnimationPropertiesTree();\n    __RegisterClass__Editor__AnimationPropertiesTreeNode();\n    __RegisterClass__Editor__AnimationTimeline();\n    __RegisterClass__Editor__AnimationKeyDragHandle();\n    __RegisterClass__Editor__ITrackControl();\n    __RegisterClass__Editor__MapKeyFramesTrackControl();\n    __RegisterClass__Editor__SubTrackControl();\n    __RegisterClass__Editor__Vec2KeyFramesTrackControl();\n    __RegisterClass__Editor__AnimationTree();\n    __RegisterClass__Editor__AnimationTreeNode();\n    __RegisterClass__Editor__AssetIcon();\n    __RegisterClass__Editor__AssetsIconsScrollArea();\n    __RegisterClass__Editor__AssetsWindow();\n    __RegisterClass__Editor__AssetsFoldersTree();\n    __RegisterClass__Editor__FoldersTree();\n    __RegisterClass__Editor__DockWindowPlace();\n    __RegisterClass__Editor__DockableWindow();\n    __RegisterClass__Editor__GameWindow();\n    __RegisterClass__Editor__GameWindow__GameView();\n    __RegisterClass__Editor__GameWindow__SimulationDevice();\n    __RegisterClass__Editor__IAssetEditorWindow();\n    __RegisterClass__Editor__IEditorWindow();\n    __RegisterClass__Editor__LogWindow();\n    __RegisterClass__Editor__MemoryAnalyzeTree();\n    __RegisterClass__Editor__MemoryAnalyzeTreeNode();\n    __RegisterClass__Editor__ActorViewer();\n    __RegisterClass__Editor__AddComponentPanel();\n    __RegisterClass__Editor__ComponentsTree();\n    __RegisterClass__Editor__ComponentsTreeNode();\n    __RegisterClass__Editor__DefaultActorComponentViewer();\n    __RegisterClass__Editor__DefaultActorHeaderViewer();\n    __RegisterClass__Editor__DefaultActorPropertiesViewer();\n    __RegisterClass__Editor__DefaultActorTransformViewer();\n    __RegisterClass__Editor__IActorComponentViewer();\n    __RegisterClass__Editor__IActorHeaderViewer();\n    __RegisterClass__Editor__IActorPropertiesViewer();\n    __RegisterClass__Editor__IActorTransformViewer();\n    __RegisterClass__Editor__AssetPropertiesViewer();\n    __RegisterClass__Editor__DefaultPropertiesViewer();\n    __RegisterClass__Editor__IPropertiesViewer();\n    __RegisterClass__Editor__PropertiesWindow();\n    __RegisterClass__Editor__DefaultWidgetLayerHeaderViewer();\n    __RegisterClass__Editor__DefaultWidgetLayerLayoutViewer();\n    __RegisterClass__Editor__DefaultWidgetLayerPropertiesViewer();\n    __RegisterClass__Editor__IWidgetLayerHeaderViewer();\n    __RegisterClass__Editor__IWidgetLayerLayoutViewer();\n    __RegisterClass__Editor__IWidgetLayerPropertiesViewer();\n    __RegisterClass__Editor__WidgetLayerViewer();\n    __RegisterClass__Editor__LayersPopup();\n    __RegisterClass__Editor__LayerPopupItem();\n    __RegisterClass__Editor__SceneDragHandle();\n    __RegisterClass__Editor__SceneEditScreen();\n    __RegisterClass__Editor__SceneWindow();\n    __RegisterClass__Editor__DrawOrderTree();\n    __RegisterClass__Editor__DrawOrderTreeNode();\n    __RegisterClass__Editor__SceneHierarchyTree();\n    __RegisterClass__Editor__SceneHierarchyTreeNode();\n    __RegisterClass__Editor__TreeWindow();\n    __RegisterClass__Editor__WindowsLayout();\n    __RegisterClass__Editor__WindowsLayout__WindowDockPlaceInfo();\n}"
  },
  {
    "path": "Editor/Sources/o2Editor/stdafx.cpp",
    "content": "#include \"o2Editor/stdafx.h\"\n"
  },
  {
    "path": "Editor/Sources/o2Editor/stdafx.h",
    "content": "#pragma once\n#include \"o2/stdafx.h\"\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Animation/AnimationMask.h\"\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2/Animation/IAnimation.h\"\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Assets/Types/AnimationAsset.h\"\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetInfo.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/AssetsTree.h\"\n#include \"o2/Assets/Types/AtlasAsset.h\"\n#include \"o2/Assets/Types/BinaryAsset.h\"\n#include \"o2/Assets/Types/DataAsset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Assets/Types/VectorFontAsset.h\"\n#include \"o2/Config/ProjectConfig.h\"\n#include \"o2/Events/ApplicationEventsListener.h\"\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Events/ShortcutKeysListener.h\"\n#include \"o2/Render/BitmapFont.h\"\n#include \"o2/Render/Camera.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Particles/Particle.h\"\n#include \"o2/Render/Particles/ParticlesEffects.h\"\n#include \"o2/Render/Particles/ParticlesEmitter.h\"\n#include \"o2/Render/Particles/ParticlesEmitterShapes.h\"\n#include \"o2/Render/IRectDrawable.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Render/VectorFont.h\"\n#include \"o2/Render/VectorFontEffects.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/ActorTransform.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/Components/AnimationComponent.h\"\n#include \"o2/Scene/ISceneDrawable.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/SceneLayerRef.h\"\n#include \"o2/Scene/Tags.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/CustomDropDown.h\"\n#include \"o2/Scene/UI/Widgets/CustomList.h\"\n#include \"o2/Scene/UI/Widgets/DropDown.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/GridLayout.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalProgress.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/List.h\"\n#include \"o2/Scene/UI/Widgets/LongList.h\"\n#include \"o2/Scene/UI/Widgets/MenuPanel.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n#include \"o2/Scene/UI/Widgets/Spoiler.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Scene/UI/Widgets/Tree.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Scene/UI/Widgets/VerticalProgress.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n"
  },
  {
    "path": "FindOpenGLES2.cmake",
    "content": "# Based on https://github.com/OGRECave/ogre/blob/master/CMake/Packages/FindOpenGLES2.cmake\n\n# Once done this will define\n#\n#  OPENGLES2_FOUND        - system has OpenGLES\n#  OPENGLES2_INCLUDE_DIR  - the GL include directory\n#  OPENGLES2_LIBRARIES    - Link these to use OpenGLES\n\nfind_path( OPENGLES2_INCLUDE_DIR GLES2/gl2.h\n    /usr/include\n)\n\nfind_library( OPENGLES2_gl_LIBRARY\n    NAMES GLESv2\n    PATHS /usr/shlib\n          /usr/lib\n)\n\nif( OPENGLES2_gl_LIBRARY AND OPENGLES2_INCLUDE_DIR )\n    set( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} )\n    set( OPENGLES2_FOUND TRUE )\nendif()\n\nmark_as_advanced(\n    OPENGLES2_INCLUDE_DIR\n    OPENGLES2_gl_LIBRARY\n)\n\ninclude( FindPackageHandleStandardArgs )\nfind_package_handle_standard_args(\n    OpenGLES2\n    REQUIRED_VARS OPENGLES2_INCLUDE_DIR OPENGLES2_gl_LIBRARY\n    FAIL_MESSAGE \"OpenGLES2 is not found.\"\n)\n\nif( OPENGLES2_FOUND )\n    if( NOT TARGET OpenGLES2::OpenGLES2 )\n        add_library( OpenGLES2::OpenGLES2 SHARED IMPORTED )\n        set_target_properties(\n            OpenGLES2::OpenGLES2\n            PROPERTIES\n                INTERFACE_INCLUDE_DIRECTORIES \"${OPENGLES2_INCLUDE_DIR}\"\n                IMPORTED_LOCATION \"${OPENGLES2_LIBRARIES}\"\n        )\n    endif()\nendif()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Box2D.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef BOX2D_H\n#define BOX2D_H\n\n/**\n\\mainpage Box2D API Documentation\n\n\\section intro_sec Getting Started\n\nFor documentation please see http://box2d.org/documentation.html\n\nFor discussion please visit http://box2d.org/forum\n*/\n\n// These include files constitute the main Box2D API\n\n#include <Box2D/Common/b2Settings.h>\n#include <Box2D/Common/b2Draw.h>\n#include <Box2D/Common/b2Timer.h>\n\n#include <Box2D/Collision/Shapes/b2CircleShape.h>\n#include <Box2D/Collision/Shapes/b2EdgeShape.h>\n#include <Box2D/Collision/Shapes/b2ChainShape.h>\n#include <Box2D/Collision/Shapes/b2PolygonShape.h>\n\n#include <Box2D/Collision/b2BroadPhase.h>\n#include <Box2D/Collision/b2Distance.h>\n#include <Box2D/Collision/b2DynamicTree.h>\n#include <Box2D/Collision/b2TimeOfImpact.h>\n\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/b2WorldCallbacks.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n#include <Box2D/Dynamics/b2World.h>\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n\n#include <Box2D/Dynamics/Joints/b2DistanceJoint.h>\n#include <Box2D/Dynamics/Joints/b2FrictionJoint.h>\n#include <Box2D/Dynamics/Joints/b2GearJoint.h>\n#include <Box2D/Dynamics/Joints/b2MotorJoint.h>\n#include <Box2D/Dynamics/Joints/b2MouseJoint.h>\n#include <Box2D/Dynamics/Joints/b2PrismaticJoint.h>\n#include <Box2D/Dynamics/Joints/b2PulleyJoint.h>\n#include <Box2D/Dynamics/Joints/b2RevoluteJoint.h>\n#include <Box2D/Dynamics/Joints/b2RopeJoint.h>\n#include <Box2D/Dynamics/Joints/b2WeldJoint.h>\n#include <Box2D/Dynamics/Joints/b2WheelJoint.h>\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Box2DConfig.cmake",
    "content": "get_filename_component(SELF_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\ninclude(${SELF_DIR}/Box2D-targets.cmake)\nget_filename_component(Box2D_INCLUDE_DIRS \"${SELF_DIR}/../../include\" ABSOLUTE)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/CMakeLists.txt",
    "content": "set(BOX2D_Collision_SRCS\n\tCollision/b2BroadPhase.cpp\n\tCollision/b2CollideCircle.cpp\n\tCollision/b2CollideEdge.cpp\n\tCollision/b2CollidePolygon.cpp\n\tCollision/b2Collision.cpp\n\tCollision/b2Distance.cpp\n\tCollision/b2DynamicTree.cpp\n\tCollision/b2TimeOfImpact.cpp\n)\nset(BOX2D_Collision_HDRS\n\tCollision/b2BroadPhase.h\n\tCollision/b2Collision.h\n\tCollision/b2Distance.h\n\tCollision/b2DynamicTree.h\n\tCollision/b2TimeOfImpact.h\n)\nset(BOX2D_Shapes_SRCS\n\tCollision/Shapes/b2CircleShape.cpp\n\tCollision/Shapes/b2EdgeShape.cpp\n\tCollision/Shapes/b2ChainShape.cpp\n\tCollision/Shapes/b2PolygonShape.cpp\n)\nset(BOX2D_Shapes_HDRS\n\tCollision/Shapes/b2CircleShape.h\n\tCollision/Shapes/b2EdgeShape.h\n\tCollision/Shapes/b2ChainShape.h\n\tCollision/Shapes/b2PolygonShape.h\n\tCollision/Shapes/b2Shape.h\n)\nset(BOX2D_Common_SRCS\n\tCommon/b2BlockAllocator.cpp\n\tCommon/b2Draw.cpp\n\tCommon/b2Math.cpp\n\tCommon/b2Settings.cpp\n\tCommon/b2StackAllocator.cpp\n\tCommon/b2Timer.cpp\n)\nset(BOX2D_Common_HDRS\n\tCommon/b2BlockAllocator.h\n\tCommon/b2Draw.h\n\tCommon/b2GrowableStack.h\n\tCommon/b2Math.h\n\tCommon/b2Settings.h\n\tCommon/b2StackAllocator.h\n\tCommon/b2Timer.h\n)\nset(BOX2D_Dynamics_SRCS\n\tDynamics/b2Body.cpp\n\tDynamics/b2ContactManager.cpp\n\tDynamics/b2Fixture.cpp\n\tDynamics/b2Island.cpp\n\tDynamics/b2World.cpp\n\tDynamics/b2WorldCallbacks.cpp\n)\nset(BOX2D_Dynamics_HDRS\n\tDynamics/b2Body.h\n\tDynamics/b2ContactManager.h\n\tDynamics/b2Fixture.h\n\tDynamics/b2Island.h\n\tDynamics/b2TimeStep.h\n\tDynamics/b2World.h\n\tDynamics/b2WorldCallbacks.h\n)\nset(BOX2D_Contacts_SRCS\n\tDynamics/Contacts/b2CircleContact.cpp\n\tDynamics/Contacts/b2Contact.cpp\n\tDynamics/Contacts/b2ContactSolver.cpp\n\tDynamics/Contacts/b2PolygonAndCircleContact.cpp\n\tDynamics/Contacts/b2EdgeAndCircleContact.cpp\n\tDynamics/Contacts/b2EdgeAndPolygonContact.cpp\n\tDynamics/Contacts/b2ChainAndCircleContact.cpp\n\tDynamics/Contacts/b2ChainAndPolygonContact.cpp\n\tDynamics/Contacts/b2PolygonContact.cpp\n)\nset(BOX2D_Contacts_HDRS\n\tDynamics/Contacts/b2CircleContact.h\n\tDynamics/Contacts/b2Contact.h\n\tDynamics/Contacts/b2ContactSolver.h\n\tDynamics/Contacts/b2PolygonAndCircleContact.h\n\tDynamics/Contacts/b2EdgeAndCircleContact.h\n\tDynamics/Contacts/b2EdgeAndPolygonContact.h\n\tDynamics/Contacts/b2ChainAndCircleContact.h\n\tDynamics/Contacts/b2ChainAndPolygonContact.h\n\tDynamics/Contacts/b2PolygonContact.h\n)\nset(BOX2D_Joints_SRCS\n\tDynamics/Joints/b2DistanceJoint.cpp\n\tDynamics/Joints/b2FrictionJoint.cpp\n\tDynamics/Joints/b2GearJoint.cpp\n\tDynamics/Joints/b2Joint.cpp\n\tDynamics/Joints/b2MotorJoint.cpp\n\tDynamics/Joints/b2MouseJoint.cpp\n\tDynamics/Joints/b2PrismaticJoint.cpp\n\tDynamics/Joints/b2PulleyJoint.cpp\n\tDynamics/Joints/b2RevoluteJoint.cpp\n\tDynamics/Joints/b2RopeJoint.cpp\n\tDynamics/Joints/b2WeldJoint.cpp\n\tDynamics/Joints/b2WheelJoint.cpp\n)\nset(BOX2D_Joints_HDRS\n\tDynamics/Joints/b2DistanceJoint.h\n\tDynamics/Joints/b2FrictionJoint.h\n\tDynamics/Joints/b2GearJoint.h\n\tDynamics/Joints/b2Joint.h\n\tDynamics/Joints/b2MotorJoint.h\n\tDynamics/Joints/b2MouseJoint.h\n\tDynamics/Joints/b2PrismaticJoint.h\n\tDynamics/Joints/b2PulleyJoint.h\n\tDynamics/Joints/b2RevoluteJoint.h\n\tDynamics/Joints/b2RopeJoint.h\n\tDynamics/Joints/b2WeldJoint.h\n\tDynamics/Joints/b2WheelJoint.h\n)\nset(BOX2D_Rope_SRCS\n\tRope/b2Rope.cpp\n)\nset(BOX2D_Rope_HDRS\n\tRope/b2Rope.h\n)\nset(BOX2D_General_HDRS\n\tBox2D.h\n)\ninclude_directories( ../ )\n\nif(BOX2D_BUILD_SHARED)\n\tadd_library(Box2D_shared SHARED\n\t\t${BOX2D_General_HDRS}\n\t\t${BOX2D_Joints_SRCS}\n\t\t${BOX2D_Joints_HDRS}\n\t\t${BOX2D_Contacts_SRCS}\n\t\t${BOX2D_Contacts_HDRS}\n\t\t${BOX2D_Dynamics_SRCS}\n\t\t${BOX2D_Dynamics_HDRS}\n\t\t${BOX2D_Common_SRCS}\n\t\t${BOX2D_Common_HDRS}\n\t\t${BOX2D_Shapes_SRCS}\n\t\t${BOX2D_Shapes_HDRS}\n\t\t${BOX2D_Collision_SRCS}\n\t\t${BOX2D_Collision_HDRS}\n\t\t${BOX2D_Rope_SRCS}\n\t\t${BOX2D_Rope_HDRS}\n\t)\n\tset_target_properties(Box2D_shared PROPERTIES\n\t\tOUTPUT_NAME \"Box2D\"\n\t\tCLEAN_DIRECT_OUTPUT 1\n\t\tVERSION ${BOX2D_VERSION}\n\t)\nendif()\n\nif(BOX2D_BUILD_STATIC)\n\tadd_library(Box2D STATIC\n\t\t${BOX2D_General_HDRS}\n\t\t${BOX2D_Joints_SRCS}\n\t\t${BOX2D_Joints_HDRS}\n\t\t${BOX2D_Contacts_SRCS}\n\t\t${BOX2D_Contacts_HDRS}\n\t\t${BOX2D_Dynamics_SRCS}\n\t\t${BOX2D_Dynamics_HDRS}\n\t\t${BOX2D_Common_SRCS}\n\t\t${BOX2D_Common_HDRS}\n\t\t${BOX2D_Shapes_SRCS}\n\t\t${BOX2D_Shapes_HDRS}\n\t\t${BOX2D_Collision_SRCS}\n\t\t${BOX2D_Collision_HDRS}\n\t\t${BOX2D_Rope_SRCS}\n\t\t${BOX2D_Rope_HDRS}\n\t)\n\tset_target_properties(Box2D PROPERTIES\n\t\tCLEAN_DIRECT_OUTPUT 1\n\t\tVERSION ${BOX2D_VERSION}\n\t)\n\ttarget_include_directories(Box2D PUBLIC \"../\")\nendif()\n\n# These are used to create visual studio folders.\nsource_group(Collision FILES ${BOX2D_Collision_SRCS} ${BOX2D_Collision_HDRS})\nsource_group(Collision\\\\Shapes FILES ${BOX2D_Shapes_SRCS} ${BOX2D_Shapes_HDRS})\nsource_group(Common FILES ${BOX2D_Common_SRCS} ${BOX2D_Common_HDRS})\nsource_group(Dynamics FILES ${BOX2D_Dynamics_SRCS} ${BOX2D_Dynamics_HDRS})\nsource_group(Dynamics\\\\Contacts FILES ${BOX2D_Contacts_SRCS} ${BOX2D_Contacts_HDRS})\nsource_group(Dynamics\\\\Joints FILES ${BOX2D_Joints_SRCS} ${BOX2D_Joints_HDRS})\nsource_group(Include FILES ${BOX2D_General_HDRS})\nsource_group(Rope FILES ${BOX2D_Rope_SRCS} ${BOX2D_Rope_HDRS})\n\nif(BOX2D_INSTALL)\n\t# install headers\n\tinstall(FILES ${BOX2D_General_HDRS} DESTINATION include/Box2D)\n\tinstall(FILES ${BOX2D_Collision_HDRS} DESTINATION include/Box2D/Collision)\n\tinstall(FILES ${BOX2D_Shapes_HDRS} DESTINATION include/Box2D/Collision/Shapes)\n\tinstall(FILES ${BOX2D_Common_HDRS} DESTINATION include/Box2D/Common)\n\tinstall(FILES ${BOX2D_Dynamics_HDRS} DESTINATION include/Box2D/Dynamics)\n\tinstall(FILES ${BOX2D_Contacts_HDRS} DESTINATION include/Box2D/Dynamics/Contacts)\n\tinstall(FILES ${BOX2D_Joints_HDRS} DESTINATION include/Box2D/Dynamics/Joints)\n\tinstall(FILES ${BOX2D_Rope_HDRS} DESTINATION include/Box2D/Rope)\n\n\t# install libraries\n\tif(BOX2D_BUILD_SHARED)\n\t\tinstall(TARGETS Box2D_shared EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR})\n\tendif()\n\tif(BOX2D_BUILD_STATIC)\n\t\tinstall(TARGETS Box2D EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR})\n\tendif()\n\n\t# install build system hooks for third-party apps\n\tinstall(EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR}/Box2D)\n\tinstall(FILES Box2DConfig.cmake DESTINATION ${LIB_INSTALL_DIR}/Box2D)\nendif(BOX2D_INSTALL)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/Shapes/b2ChainShape.cpp",
    "content": "/*\n* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/Shapes/b2ChainShape.h>\n#include <Box2D/Collision/Shapes/b2EdgeShape.h>\n#include <new>\n#include <memory.h>\n\nb2ChainShape::~b2ChainShape()\n{\n\tb2Free(m_vertices);\n\tm_vertices = NULL;\n\tm_count = 0;\n}\n\nvoid b2ChainShape::CreateLoop(const b2Vec2* vertices, int32 count)\n{\n\tb2Assert(m_vertices == NULL && m_count == 0);\n\tb2Assert(count >= 3);\n\tfor (int32 i = 1; i < count; ++i)\n\t{\n\t\tb2Vec2 v1 = vertices[i-1];\n\t\tb2Vec2 v2 = vertices[i];\n\t\t// If the code crashes here, it means your vertices are too close together.\n\t\tb2Assert(b2DistanceSquared(v1, v2) > b2_linearSlop * b2_linearSlop);\n\t}\n\n\tm_count = count + 1;\n\tm_vertices = (b2Vec2*)b2Alloc(m_count * sizeof(b2Vec2));\n\tmemcpy(m_vertices, vertices, count * sizeof(b2Vec2));\n\tm_vertices[count] = m_vertices[0];\n\tm_prevVertex = m_vertices[m_count - 2];\n\tm_nextVertex = m_vertices[1];\n\tm_hasPrevVertex = true;\n\tm_hasNextVertex = true;\n}\n\nvoid b2ChainShape::CreateChain(const b2Vec2* vertices, int32 count)\n{\n\tb2Assert(m_vertices == NULL && m_count == 0);\n\tb2Assert(count >= 2);\n\tfor (int32 i = 1; i < count; ++i)\n\t{\n\t\tb2Vec2 v1 = vertices[i-1];\n\t\tb2Vec2 v2 = vertices[i];\n\t\t// If the code crashes here, it means your vertices are too close together.\n\t\tb2Assert(b2DistanceSquared(v1, v2) > b2_linearSlop * b2_linearSlop);\n\t}\n\n\tm_count = count;\n\tm_vertices = (b2Vec2*)b2Alloc(count * sizeof(b2Vec2));\n\tmemcpy(m_vertices, vertices, m_count * sizeof(b2Vec2));\n\n\tm_hasPrevVertex = false;\n\tm_hasNextVertex = false;\n\n\tm_prevVertex.SetZero();\n\tm_nextVertex.SetZero();\n}\n\nvoid b2ChainShape::SetPrevVertex(const b2Vec2& prevVertex)\n{\n\tm_prevVertex = prevVertex;\n\tm_hasPrevVertex = true;\n}\n\nvoid b2ChainShape::SetNextVertex(const b2Vec2& nextVertex)\n{\n\tm_nextVertex = nextVertex;\n\tm_hasNextVertex = true;\n}\n\nb2Shape* b2ChainShape::Clone(b2BlockAllocator* allocator) const\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2ChainShape));\n\tb2ChainShape* clone = new (mem) b2ChainShape;\n\tclone->CreateChain(m_vertices, m_count);\n\tclone->m_prevVertex = m_prevVertex;\n\tclone->m_nextVertex = m_nextVertex;\n\tclone->m_hasPrevVertex = m_hasPrevVertex;\n\tclone->m_hasNextVertex = m_hasNextVertex;\n\treturn clone;\n}\n\nint32 b2ChainShape::GetChildCount() const\n{\n\t// edge count = vertex count - 1\n\treturn m_count - 1;\n}\n\nvoid b2ChainShape::GetChildEdge(b2EdgeShape* edge, int32 index) const\n{\n\tb2Assert(0 <= index && index < m_count - 1);\n\tedge->m_type = b2Shape::e_edge;\n\tedge->m_radius = m_radius;\n\n\tedge->m_vertex1 = m_vertices[index + 0];\n\tedge->m_vertex2 = m_vertices[index + 1];\n\n\tif (index > 0)\n\t{\n\t\tedge->m_vertex0 = m_vertices[index - 1];\n\t\tedge->m_hasVertex0 = true;\n\t}\n\telse\n\t{\n\t\tedge->m_vertex0 = m_prevVertex;\n\t\tedge->m_hasVertex0 = m_hasPrevVertex;\n\t}\n\n\tif (index < m_count - 2)\n\t{\n\t\tedge->m_vertex3 = m_vertices[index + 2];\n\t\tedge->m_hasVertex3 = true;\n\t}\n\telse\n\t{\n\t\tedge->m_vertex3 = m_nextVertex;\n\t\tedge->m_hasVertex3 = m_hasNextVertex;\n\t}\n}\n\nbool b2ChainShape::TestPoint(const b2Transform& xf, const b2Vec2& p) const\n{\n\tB2_NOT_USED(xf);\n\tB2_NOT_USED(p);\n\treturn false;\n}\n\nbool b2ChainShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input,\n\t\t\t\t\t\t\tconst b2Transform& xf, int32 childIndex) const\n{\n\tb2Assert(childIndex < m_count);\n\n\tb2EdgeShape edgeShape;\n\n\tint32 i1 = childIndex;\n\tint32 i2 = childIndex + 1;\n\tif (i2 == m_count)\n\t{\n\t\ti2 = 0;\n\t}\n\n\tedgeShape.m_vertex1 = m_vertices[i1];\n\tedgeShape.m_vertex2 = m_vertices[i2];\n\n\treturn edgeShape.RayCast(output, input, xf, 0);\n}\n\nvoid b2ChainShape::ComputeAABB(b2AABB* aabb, const b2Transform& xf, int32 childIndex) const\n{\n\tb2Assert(childIndex < m_count);\n\n\tint32 i1 = childIndex;\n\tint32 i2 = childIndex + 1;\n\tif (i2 == m_count)\n\t{\n\t\ti2 = 0;\n\t}\n\n\tb2Vec2 v1 = b2Mul(xf, m_vertices[i1]);\n\tb2Vec2 v2 = b2Mul(xf, m_vertices[i2]);\n\n\taabb->lowerBound = b2Min(v1, v2);\n\taabb->upperBound = b2Max(v1, v2);\n}\n\nvoid b2ChainShape::ComputeMass(b2MassData* massData, float32 density) const\n{\n\tB2_NOT_USED(density);\n\n\tmassData->mass = 0.0f;\n\tmassData->center.SetZero();\n\tmassData->I = 0.0f;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/Shapes/b2ChainShape.h",
    "content": "/*\n* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_CHAIN_SHAPE_H\n#define B2_CHAIN_SHAPE_H\n\n#include <Box2D/Collision/Shapes/b2Shape.h>\n\nclass b2EdgeShape;\n\n/// A chain shape is a free form sequence of line segments.\n/// The chain has two-sided collision, so you can use inside and outside collision.\n/// Therefore, you may use any winding order.\n/// Since there may be many vertices, they are allocated using b2Alloc.\n/// Connectivity information is used to create smooth collisions.\n/// WARNING: The chain will not collide properly if there are self-intersections.\nclass b2ChainShape : public b2Shape\n{\npublic:\n\tb2ChainShape();\n\n\t/// The destructor frees the vertices using b2Free.\n\t~b2ChainShape();\n\n\t/// Create a loop. This automatically adjusts connectivity.\n\t/// @param vertices an array of vertices, these are copied\n\t/// @param count the vertex count\n\tvoid CreateLoop(const b2Vec2* vertices, int32 count);\n\n\t/// Create a chain with isolated end vertices.\n\t/// @param vertices an array of vertices, these are copied\n\t/// @param count the vertex count\n\tvoid CreateChain(const b2Vec2* vertices, int32 count);\n\n\t/// Establish connectivity to a vertex that precedes the first vertex.\n\t/// Don't call this for loops.\n\tvoid SetPrevVertex(const b2Vec2& prevVertex);\n\n\t/// Establish connectivity to a vertex that follows the last vertex.\n\t/// Don't call this for loops.\n\tvoid SetNextVertex(const b2Vec2& nextVertex);\n\n\t/// Implement b2Shape. Vertices are cloned using b2Alloc.\n\tb2Shape* Clone(b2BlockAllocator* allocator) const;\n\n\t/// @see b2Shape::GetChildCount\n\tint32 GetChildCount() const;\n\n\t/// Get a child edge.\n\tvoid GetChildEdge(b2EdgeShape* edge, int32 index) const;\n\n\t/// This always return false.\n\t/// @see b2Shape::TestPoint\n\tbool TestPoint(const b2Transform& transform, const b2Vec2& p) const;\n\n\t/// Implement b2Shape.\n\tbool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,\n\t\t\t\t\tconst b2Transform& transform, int32 childIndex) const;\n\n\t/// @see b2Shape::ComputeAABB\n\tvoid ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;\n\n\t/// Chains have zero mass.\n\t/// @see b2Shape::ComputeMass\n\tvoid ComputeMass(b2MassData* massData, float32 density) const;\n\n\t/// The vertices. Owned by this class.\n\tb2Vec2* m_vertices;\n\n\t/// The vertex count.\n\tint32 m_count;\n\n\tb2Vec2 m_prevVertex, m_nextVertex;\n\tbool m_hasPrevVertex, m_hasNextVertex;\n};\n\ninline b2ChainShape::b2ChainShape()\n{\n\tm_type = e_chain;\n\tm_radius = b2_polygonRadius;\n\tm_vertices = NULL;\n\tm_count = 0;\n\tm_hasPrevVertex = false;\n\tm_hasNextVertex = false;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/Shapes/b2CircleShape.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/Shapes/b2CircleShape.h>\n#include <new>\n\nb2Shape* b2CircleShape::Clone(b2BlockAllocator* allocator) const\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2CircleShape));\n\tb2CircleShape* clone = new (mem) b2CircleShape;\n\t*clone = *this;\n\treturn clone;\n}\n\nint32 b2CircleShape::GetChildCount() const\n{\n\treturn 1;\n}\n\nbool b2CircleShape::TestPoint(const b2Transform& transform, const b2Vec2& p) const\n{\n\tb2Vec2 center = transform.p + b2Mul(transform.q, m_p);\n\tb2Vec2 d = p - center;\n\treturn b2Dot(d, d) <= m_radius * m_radius;\n}\n\n// Collision Detection in Interactive 3D Environments by Gino van den Bergen\n// From Section 3.1.2\n// x = s + a * r\n// norm(x) = radius\nbool b2CircleShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input,\n\t\t\t\t\t\t\tconst b2Transform& transform, int32 childIndex) const\n{\n\tB2_NOT_USED(childIndex);\n\n\tb2Vec2 position = transform.p + b2Mul(transform.q, m_p);\n\tb2Vec2 s = input.p1 - position;\n\tfloat32 b = b2Dot(s, s) - m_radius * m_radius;\n\n\t// Solve quadratic equation.\n\tb2Vec2 r = input.p2 - input.p1;\n\tfloat32 c =  b2Dot(s, r);\n\tfloat32 rr = b2Dot(r, r);\n\tfloat32 sigma = c * c - rr * b;\n\n\t// Check for negative discriminant and short segment.\n\tif (sigma < 0.0f || rr < b2_epsilon)\n\t{\n\t\treturn false;\n\t}\n\n\t// Find the point of intersection of the line with the circle.\n\tfloat32 a = -(c + b2Sqrt(sigma));\n\n\t// Is the intersection point on the segment?\n\tif (0.0f <= a && a <= input.maxFraction * rr)\n\t{\n\t\ta /= rr;\n\t\toutput->fraction = a;\n\t\toutput->normal = s + a * r;\n\t\toutput->normal.Normalize();\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nvoid b2CircleShape::ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const\n{\n\tB2_NOT_USED(childIndex);\n\n\tb2Vec2 p = transform.p + b2Mul(transform.q, m_p);\n\taabb->lowerBound.Set(p.x - m_radius, p.y - m_radius);\n\taabb->upperBound.Set(p.x + m_radius, p.y + m_radius);\n}\n\nvoid b2CircleShape::ComputeMass(b2MassData* massData, float32 density) const\n{\n\tmassData->mass = density * b2_pi * m_radius * m_radius;\n\tmassData->center = m_p;\n\n\t// inertia about the local origin\n\tmassData->I = massData->mass * (0.5f * m_radius * m_radius + b2Dot(m_p, m_p));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/Shapes/b2CircleShape.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_CIRCLE_SHAPE_H\n#define B2_CIRCLE_SHAPE_H\n\n#include <Box2D/Collision/Shapes/b2Shape.h>\n\n/// A circle shape.\nclass b2CircleShape : public b2Shape\n{\npublic:\n\tb2CircleShape();\n\n\t/// Implement b2Shape.\n\tb2Shape* Clone(b2BlockAllocator* allocator) const;\n\n\t/// @see b2Shape::GetChildCount\n\tint32 GetChildCount() const;\n\n\t/// Implement b2Shape.\n\tbool TestPoint(const b2Transform& transform, const b2Vec2& p) const;\n\n\t/// Implement b2Shape.\n\tbool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,\n\t\t\t\tconst b2Transform& transform, int32 childIndex) const;\n\n\t/// @see b2Shape::ComputeAABB\n\tvoid ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;\n\n\t/// @see b2Shape::ComputeMass\n\tvoid ComputeMass(b2MassData* massData, float32 density) const;\n\n\t/// Get the supporting vertex index in the given direction.\n\tint32 GetSupport(const b2Vec2& d) const;\n\n\t/// Get the supporting vertex in the given direction.\n\tconst b2Vec2& GetSupportVertex(const b2Vec2& d) const;\n\n\t/// Get the vertex count.\n\tint32 GetVertexCount() const { return 1; }\n\n\t/// Get a vertex by index. Used by b2Distance.\n\tconst b2Vec2& GetVertex(int32 index) const;\n\n\t/// Position\n\tb2Vec2 m_p;\n};\n\ninline b2CircleShape::b2CircleShape()\n{\n\tm_type = e_circle;\n\tm_radius = 0.0f;\n\tm_p.SetZero();\n}\n\ninline int32 b2CircleShape::GetSupport(const b2Vec2 &d) const\n{\n\tB2_NOT_USED(d);\n\treturn 0;\n}\n\ninline const b2Vec2& b2CircleShape::GetSupportVertex(const b2Vec2 &d) const\n{\n\tB2_NOT_USED(d);\n\treturn m_p;\n}\n\ninline const b2Vec2& b2CircleShape::GetVertex(int32 index) const\n{\n\tB2_NOT_USED(index);\n\tb2Assert(index == 0);\n\treturn m_p;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/Shapes/b2EdgeShape.cpp",
    "content": "/*\n* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/Shapes/b2EdgeShape.h>\n#include <new>\n\nvoid b2EdgeShape::Set(const b2Vec2& v1, const b2Vec2& v2)\n{\n\tm_vertex1 = v1;\n\tm_vertex2 = v2;\n\tm_hasVertex0 = false;\n\tm_hasVertex3 = false;\n}\n\nb2Shape* b2EdgeShape::Clone(b2BlockAllocator* allocator) const\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2EdgeShape));\n\tb2EdgeShape* clone = new (mem) b2EdgeShape;\n\t*clone = *this;\n\treturn clone;\n}\n\nint32 b2EdgeShape::GetChildCount() const\n{\n\treturn 1;\n}\n\nbool b2EdgeShape::TestPoint(const b2Transform& xf, const b2Vec2& p) const\n{\n\tB2_NOT_USED(xf);\n\tB2_NOT_USED(p);\n\treturn false;\n}\n\n// p = p1 + t * d\n// v = v1 + s * e\n// p1 + t * d = v1 + s * e\n// s * e - t * d = p1 - v1\nbool b2EdgeShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input,\n\t\t\t\t\t\t\tconst b2Transform& xf, int32 childIndex) const\n{\n\tB2_NOT_USED(childIndex);\n\n\t// Put the ray into the edge's frame of reference.\n\tb2Vec2 p1 = b2MulT(xf.q, input.p1 - xf.p);\n\tb2Vec2 p2 = b2MulT(xf.q, input.p2 - xf.p);\n\tb2Vec2 d = p2 - p1;\n\n\tb2Vec2 v1 = m_vertex1;\n\tb2Vec2 v2 = m_vertex2;\n\tb2Vec2 e = v2 - v1;\n\tb2Vec2 normal(e.y, -e.x);\n\tnormal.Normalize();\n\n\t// q = p1 + t * d\n\t// dot(normal, q - v1) = 0\n\t// dot(normal, p1 - v1) + t * dot(normal, d) = 0\n\tfloat32 numerator = b2Dot(normal, v1 - p1);\n\tfloat32 denominator = b2Dot(normal, d);\n\n\tif (denominator == 0.0f)\n\t{\n\t\treturn false;\n\t}\n\n\tfloat32 t = numerator / denominator;\n\tif (t < 0.0f || input.maxFraction < t)\n\t{\n\t\treturn false;\n\t}\n\n\tb2Vec2 q = p1 + t * d;\n\n\t// q = v1 + s * r\n\t// s = dot(q - v1, r) / dot(r, r)\n\tb2Vec2 r = v2 - v1;\n\tfloat32 rr = b2Dot(r, r);\n\tif (rr == 0.0f)\n\t{\n\t\treturn false;\n\t}\n\n\tfloat32 s = b2Dot(q - v1, r) / rr;\n\tif (s < 0.0f || 1.0f < s)\n\t{\n\t\treturn false;\n\t}\n\n\toutput->fraction = t;\n\tif (numerator > 0.0f)\n\t{\n\t\toutput->normal = -b2Mul(xf.q, normal);\n\t}\n\telse\n\t{\n\t\toutput->normal = b2Mul(xf.q, normal);\n\t}\n\treturn true;\n}\n\nvoid b2EdgeShape::ComputeAABB(b2AABB* aabb, const b2Transform& xf, int32 childIndex) const\n{\n\tB2_NOT_USED(childIndex);\n\n\tb2Vec2 v1 = b2Mul(xf, m_vertex1);\n\tb2Vec2 v2 = b2Mul(xf, m_vertex2);\n\n\tb2Vec2 lower = b2Min(v1, v2);\n\tb2Vec2 upper = b2Max(v1, v2);\n\n\tb2Vec2 r(m_radius, m_radius);\n\taabb->lowerBound = lower - r;\n\taabb->upperBound = upper + r;\n}\n\nvoid b2EdgeShape::ComputeMass(b2MassData* massData, float32 density) const\n{\n\tB2_NOT_USED(density);\n\n\tmassData->mass = 0.0f;\n\tmassData->center = 0.5f * (m_vertex1 + m_vertex2);\n\tmassData->I = 0.0f;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/Shapes/b2EdgeShape.h",
    "content": "/*\n* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_EDGE_SHAPE_H\n#define B2_EDGE_SHAPE_H\n\n#include <Box2D/Collision/Shapes/b2Shape.h>\n\n/// A line segment (edge) shape. These can be connected in chains or loops\n/// to other edge shapes. The connectivity information is used to ensure\n/// correct contact normals.\nclass b2EdgeShape : public b2Shape\n{\npublic:\n\tb2EdgeShape();\n\n\t/// Set this as an isolated edge.\n\tvoid Set(const b2Vec2& v1, const b2Vec2& v2);\n\n\t/// Implement b2Shape.\n\tb2Shape* Clone(b2BlockAllocator* allocator) const;\n\n\t/// @see b2Shape::GetChildCount\n\tint32 GetChildCount() const;\n\n\t/// @see b2Shape::TestPoint\n\tbool TestPoint(const b2Transform& transform, const b2Vec2& p) const;\n\n\t/// Implement b2Shape.\n\tbool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,\n\t\t\t\tconst b2Transform& transform, int32 childIndex) const;\n\n\t/// @see b2Shape::ComputeAABB\n\tvoid ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;\n\n\t/// @see b2Shape::ComputeMass\n\tvoid ComputeMass(b2MassData* massData, float32 density) const;\n\t\n\t/// These are the edge vertices\n\tb2Vec2 m_vertex1, m_vertex2;\n\n\t/// Optional adjacent vertices. These are used for smooth collision.\n\tb2Vec2 m_vertex0, m_vertex3;\n\tbool m_hasVertex0, m_hasVertex3;\n};\n\ninline b2EdgeShape::b2EdgeShape()\n{\n\tm_type = e_edge;\n\tm_radius = b2_polygonRadius;\n\tm_vertex0.x = 0.0f;\n\tm_vertex0.y = 0.0f;\n\tm_vertex3.x = 0.0f;\n\tm_vertex3.y = 0.0f;\n\tm_hasVertex0 = false;\n\tm_hasVertex3 = false;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/Shapes/b2PolygonShape.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/Shapes/b2PolygonShape.h>\n#include <new>\n\nb2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2PolygonShape));\n\tb2PolygonShape* clone = new (mem) b2PolygonShape;\n\t*clone = *this;\n\treturn clone;\n}\n\nvoid b2PolygonShape::SetAsBox(float32 hx, float32 hy)\n{\n\tm_count = 4;\n\tm_vertices[0].Set(-hx, -hy);\n\tm_vertices[1].Set( hx, -hy);\n\tm_vertices[2].Set( hx,  hy);\n\tm_vertices[3].Set(-hx,  hy);\n\tm_normals[0].Set(0.0f, -1.0f);\n\tm_normals[1].Set(1.0f, 0.0f);\n\tm_normals[2].Set(0.0f, 1.0f);\n\tm_normals[3].Set(-1.0f, 0.0f);\n\tm_centroid.SetZero();\n}\n\nvoid b2PolygonShape::SetAsBox(float32 hx, float32 hy, const b2Vec2& center, float32 angle)\n{\n\tm_count = 4;\n\tm_vertices[0].Set(-hx, -hy);\n\tm_vertices[1].Set( hx, -hy);\n\tm_vertices[2].Set( hx,  hy);\n\tm_vertices[3].Set(-hx,  hy);\n\tm_normals[0].Set(0.0f, -1.0f);\n\tm_normals[1].Set(1.0f, 0.0f);\n\tm_normals[2].Set(0.0f, 1.0f);\n\tm_normals[3].Set(-1.0f, 0.0f);\n\tm_centroid = center;\n\n\tb2Transform xf;\n\txf.p = center;\n\txf.q.Set(angle);\n\n\t// Transform vertices and normals.\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tm_vertices[i] = b2Mul(xf, m_vertices[i]);\n\t\tm_normals[i] = b2Mul(xf.q, m_normals[i]);\n\t}\n}\n\nint32 b2PolygonShape::GetChildCount() const\n{\n\treturn 1;\n}\n\nstatic b2Vec2 ComputeCentroid(const b2Vec2* vs, int32 count)\n{\n\tb2Assert(count >= 3);\n\n\tb2Vec2 c; c.Set(0.0f, 0.0f);\n\tfloat32 area = 0.0f;\n\n\t// pRef is the reference point for forming triangles.\n\t// It's location doesn't change the result (except for rounding error).\n\tb2Vec2 pRef(0.0f, 0.0f);\n#if 0\n\t// This code would put the reference point inside the polygon.\n\tfor (int32 i = 0; i < count; ++i)\n\t{\n\t\tpRef += vs[i];\n\t}\n\tpRef *= 1.0f / count;\n#endif\n\n\tconst float32 inv3 = 1.0f / 3.0f;\n\n\tfor (int32 i = 0; i < count; ++i)\n\t{\n\t\t// Triangle vertices.\n\t\tb2Vec2 p1 = pRef;\n\t\tb2Vec2 p2 = vs[i];\n\t\tb2Vec2 p3 = i + 1 < count ? vs[i+1] : vs[0];\n\n\t\tb2Vec2 e1 = p2 - p1;\n\t\tb2Vec2 e2 = p3 - p1;\n\n\t\tfloat32 D = b2Cross(e1, e2);\n\n\t\tfloat32 triangleArea = 0.5f * D;\n\t\tarea += triangleArea;\n\n\t\t// Area weighted centroid\n\t\tc += triangleArea * inv3 * (p1 + p2 + p3);\n\t}\n\n\t// Centroid\n\tb2Assert(area > b2_epsilon);\n\tc *= 1.0f / area;\n\treturn c;\n}\n\nvoid b2PolygonShape::Set(const b2Vec2* vertices, int32 count)\n{\n\tb2Assert(3 <= count && count <= b2_maxPolygonVertices);\n\tif (count < 3)\n\t{\n\t\tSetAsBox(1.0f, 1.0f);\n\t\treturn;\n\t}\n\t\n\tint32 n = b2Min(count, b2_maxPolygonVertices);\n\n\t// Perform welding and copy vertices into local buffer.\n\tb2Vec2 ps[b2_maxPolygonVertices];\n\tint32 tempCount = 0;\n\tfor (int32 i = 0; i < n; ++i)\n\t{\n\t\tb2Vec2 v = vertices[i];\n\n\t\tbool unique = true;\n\t\tfor (int32 j = 0; j < tempCount; ++j)\n\t\t{\n\t\t\tif (b2DistanceSquared(v, ps[j]) < 0.5f * b2_linearSlop)\n\t\t\t{\n\t\t\t\tunique = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (unique)\n\t\t{\n\t\t\tps[tempCount++] = v;\n\t\t}\n\t}\n\n\tn = tempCount;\n\tif (n < 3)\n\t{\n\t\t// Polygon is degenerate.\n\t\tb2Assert(false);\n\t\tSetAsBox(1.0f, 1.0f);\n\t\treturn;\n\t}\n\n\t// Create the convex hull using the Gift wrapping algorithm\n\t// http://en.wikipedia.org/wiki/Gift_wrapping_algorithm\n\n\t// Find the right most point on the hull\n\tint32 i0 = 0;\n\tfloat32 x0 = ps[0].x;\n\tfor (int32 i = 1; i < n; ++i)\n\t{\n\t\tfloat32 x = ps[i].x;\n\t\tif (x > x0 || (x == x0 && ps[i].y < ps[i0].y))\n\t\t{\n\t\t\ti0 = i;\n\t\t\tx0 = x;\n\t\t}\n\t}\n\n\tint32 hull[b2_maxPolygonVertices];\n\tint32 m = 0;\n\tint32 ih = i0;\n\n\tfor (;;)\n\t{\n\t\thull[m] = ih;\n\n\t\tint32 ie = 0;\n\t\tfor (int32 j = 1; j < n; ++j)\n\t\t{\n\t\t\tif (ie == ih)\n\t\t\t{\n\t\t\t\tie = j;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tb2Vec2 r = ps[ie] - ps[hull[m]];\n\t\t\tb2Vec2 v = ps[j] - ps[hull[m]];\n\t\t\tfloat32 c = b2Cross(r, v);\n\t\t\tif (c < 0.0f)\n\t\t\t{\n\t\t\t\tie = j;\n\t\t\t}\n\n\t\t\t// Collinearity check\n\t\t\tif (c == 0.0f && v.LengthSquared() > r.LengthSquared())\n\t\t\t{\n\t\t\t\tie = j;\n\t\t\t}\n\t\t}\n\n\t\t++m;\n\t\tih = ie;\n\n\t\tif (ie == i0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tm_count = m;\n\n\t// Copy vertices.\n\tfor (int32 i = 0; i < m; ++i)\n\t{\n\t\tm_vertices[i] = ps[hull[i]];\n\t}\n\n\t// Compute normals. Ensure the edges have non-zero length.\n\tfor (int32 i = 0; i < m; ++i)\n\t{\n\t\tint32 i1 = i;\n\t\tint32 i2 = i + 1 < m ? i + 1 : 0;\n\t\tb2Vec2 edge = m_vertices[i2] - m_vertices[i1];\n\t\tb2Assert(edge.LengthSquared() > b2_epsilon * b2_epsilon);\n\t\tm_normals[i] = b2Cross(edge, 1.0f);\n\t\tm_normals[i].Normalize();\n\t}\n\n\t// Compute the polygon centroid.\n\tm_centroid = ComputeCentroid(m_vertices, m);\n}\n\nbool b2PolygonShape::TestPoint(const b2Transform& xf, const b2Vec2& p) const\n{\n\tb2Vec2 pLocal = b2MulT(xf.q, p - xf.p);\n\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tfloat32 dot = b2Dot(m_normals[i], pLocal - m_vertices[i]);\n\t\tif (dot > 0.0f)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nbool b2PolygonShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input,\n\t\t\t\t\t\t\t\tconst b2Transform& xf, int32 childIndex) const\n{\n\tB2_NOT_USED(childIndex);\n\n\t// Put the ray into the polygon's frame of reference.\n\tb2Vec2 p1 = b2MulT(xf.q, input.p1 - xf.p);\n\tb2Vec2 p2 = b2MulT(xf.q, input.p2 - xf.p);\n\tb2Vec2 d = p2 - p1;\n\n\tfloat32 lower = 0.0f, upper = input.maxFraction;\n\n\tint32 index = -1;\n\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\t// p = p1 + a * d\n\t\t// dot(normal, p - v) = 0\n\t\t// dot(normal, p1 - v) + a * dot(normal, d) = 0\n\t\tfloat32 numerator = b2Dot(m_normals[i], m_vertices[i] - p1);\n\t\tfloat32 denominator = b2Dot(m_normals[i], d);\n\n\t\tif (denominator == 0.0f)\n\t\t{\t\n\t\t\tif (numerator < 0.0f)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Note: we want this predicate without division:\n\t\t\t// lower < numerator / denominator, where denominator < 0\n\t\t\t// Since denominator < 0, we have to flip the inequality:\n\t\t\t// lower < numerator / denominator <==> denominator * lower > numerator.\n\t\t\tif (denominator < 0.0f && numerator < lower * denominator)\n\t\t\t{\n\t\t\t\t// Increase lower.\n\t\t\t\t// The segment enters this half-space.\n\t\t\t\tlower = numerator / denominator;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t\telse if (denominator > 0.0f && numerator < upper * denominator)\n\t\t\t{\n\t\t\t\t// Decrease upper.\n\t\t\t\t// The segment exits this half-space.\n\t\t\t\tupper = numerator / denominator;\n\t\t\t}\n\t\t}\n\n\t\t// The use of epsilon here causes the assert on lower to trip\n\t\t// in some cases. Apparently the use of epsilon was to make edge\n\t\t// shapes work, but now those are handled separately.\n\t\t//if (upper < lower - b2_epsilon)\n\t\tif (upper < lower)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tb2Assert(0.0f <= lower && lower <= input.maxFraction);\n\n\tif (index >= 0)\n\t{\n\t\toutput->fraction = lower;\n\t\toutput->normal = b2Mul(xf.q, m_normals[index]);\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nvoid b2PolygonShape::ComputeAABB(b2AABB* aabb, const b2Transform& xf, int32 childIndex) const\n{\n\tB2_NOT_USED(childIndex);\n\n\tb2Vec2 lower = b2Mul(xf, m_vertices[0]);\n\tb2Vec2 upper = lower;\n\n\tfor (int32 i = 1; i < m_count; ++i)\n\t{\n\t\tb2Vec2 v = b2Mul(xf, m_vertices[i]);\n\t\tlower = b2Min(lower, v);\n\t\tupper = b2Max(upper, v);\n\t}\n\n\tb2Vec2 r(m_radius, m_radius);\n\taabb->lowerBound = lower - r;\n\taabb->upperBound = upper + r;\n}\n\nvoid b2PolygonShape::ComputeMass(b2MassData* massData, float32 density) const\n{\n\t// Polygon mass, centroid, and inertia.\n\t// Let rho be the polygon density in mass per unit area.\n\t// Then:\n\t// mass = rho * int(dA)\n\t// centroid.x = (1/mass) * rho * int(x * dA)\n\t// centroid.y = (1/mass) * rho * int(y * dA)\n\t// I = rho * int((x*x + y*y) * dA)\n\t//\n\t// We can compute these integrals by summing all the integrals\n\t// for each triangle of the polygon. To evaluate the integral\n\t// for a single triangle, we make a change of variables to\n\t// the (u,v) coordinates of the triangle:\n\t// x = x0 + e1x * u + e2x * v\n\t// y = y0 + e1y * u + e2y * v\n\t// where 0 <= u && 0 <= v && u + v <= 1.\n\t//\n\t// We integrate u from [0,1-v] and then v from [0,1].\n\t// We also need to use the Jacobian of the transformation:\n\t// D = cross(e1, e2)\n\t//\n\t// Simplification: triangle centroid = (1/3) * (p1 + p2 + p3)\n\t//\n\t// The rest of the derivation is handled by computer algebra.\n\n\tb2Assert(m_count >= 3);\n\n\tb2Vec2 center; center.Set(0.0f, 0.0f);\n\tfloat32 area = 0.0f;\n\tfloat32 I = 0.0f;\n\n\t// s is the reference point for forming triangles.\n\t// It's location doesn't change the result (except for rounding error).\n\tb2Vec2 s(0.0f, 0.0f);\n\n\t// This code would put the reference point inside the polygon.\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\ts += m_vertices[i];\n\t}\n\ts *= 1.0f / m_count;\n\n\tconst float32 k_inv3 = 1.0f / 3.0f;\n\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\t// Triangle vertices.\n\t\tb2Vec2 e1 = m_vertices[i] - s;\n\t\tb2Vec2 e2 = i + 1 < m_count ? m_vertices[i+1] - s : m_vertices[0] - s;\n\n\t\tfloat32 D = b2Cross(e1, e2);\n\n\t\tfloat32 triangleArea = 0.5f * D;\n\t\tarea += triangleArea;\n\n\t\t// Area weighted centroid\n\t\tcenter += triangleArea * k_inv3 * (e1 + e2);\n\n\t\tfloat32 ex1 = e1.x, ey1 = e1.y;\n\t\tfloat32 ex2 = e2.x, ey2 = e2.y;\n\n\t\tfloat32 intx2 = ex1*ex1 + ex2*ex1 + ex2*ex2;\n\t\tfloat32 inty2 = ey1*ey1 + ey2*ey1 + ey2*ey2;\n\n\t\tI += (0.25f * k_inv3 * D) * (intx2 + inty2);\n\t}\n\n\t// Total mass\n\tmassData->mass = density * area;\n\n\t// Center of mass\n\tb2Assert(area > b2_epsilon);\n\tcenter *= 1.0f / area;\n\tmassData->center = center + s;\n\n\t// Inertia tensor relative to the local origin (point s).\n\tmassData->I = density * I;\n\t\n\t// Shift to center of mass then to original body origin.\n\tmassData->I += massData->mass * (b2Dot(massData->center, massData->center) - b2Dot(center, center));\n}\n\nbool b2PolygonShape::Validate() const\n{\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tint32 i1 = i;\n\t\tint32 i2 = i < m_count - 1 ? i1 + 1 : 0;\n\t\tb2Vec2 p = m_vertices[i1];\n\t\tb2Vec2 e = m_vertices[i2] - p;\n\n\t\tfor (int32 j = 0; j < m_count; ++j)\n\t\t{\n\t\t\tif (j == i1 || j == i2)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tb2Vec2 v = m_vertices[j] - p;\n\t\t\tfloat32 c = b2Cross(e, v);\n\t\t\tif (c < 0.0f)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/Shapes/b2PolygonShape.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_POLYGON_SHAPE_H\n#define B2_POLYGON_SHAPE_H\n\n#include <Box2D/Collision/Shapes/b2Shape.h>\n\n/// A convex polygon. It is assumed that the interior of the polygon is to\n/// the left of each edge.\n/// Polygons have a maximum number of vertices equal to b2_maxPolygonVertices.\n/// In most cases you should not need many vertices for a convex polygon.\nclass b2PolygonShape : public b2Shape\n{\npublic:\n\tb2PolygonShape();\n\n\t/// Implement b2Shape.\n\tb2Shape* Clone(b2BlockAllocator* allocator) const;\n\n\t/// @see b2Shape::GetChildCount\n\tint32 GetChildCount() const;\n\n\t/// Create a convex hull from the given array of local points.\n\t/// The count must be in the range [3, b2_maxPolygonVertices].\n\t/// @warning the points may be re-ordered, even if they form a convex polygon\n\t/// @warning collinear points are handled but not removed. Collinear points\n\t/// may lead to poor stacking behavior.\n\tvoid Set(const b2Vec2* points, int32 count);\n\n\t/// Build vertices to represent an axis-aligned box centered on the local origin.\n\t/// @param hx the half-width.\n\t/// @param hy the half-height.\n\tvoid SetAsBox(float32 hx, float32 hy);\n\n\t/// Build vertices to represent an oriented box.\n\t/// @param hx the half-width.\n\t/// @param hy the half-height.\n\t/// @param center the center of the box in local coordinates.\n\t/// @param angle the rotation of the box in local coordinates.\n\tvoid SetAsBox(float32 hx, float32 hy, const b2Vec2& center, float32 angle);\n\n\t/// @see b2Shape::TestPoint\n\tbool TestPoint(const b2Transform& transform, const b2Vec2& p) const;\n\n\t/// Implement b2Shape.\n\tbool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,\n\t\t\t\t\tconst b2Transform& transform, int32 childIndex) const;\n\n\t/// @see b2Shape::ComputeAABB\n\tvoid ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;\n\n\t/// @see b2Shape::ComputeMass\n\tvoid ComputeMass(b2MassData* massData, float32 density) const;\n\n\t/// Get the vertex count.\n\tint32 GetVertexCount() const { return m_count; }\n\n\t/// Get a vertex by index.\n\tconst b2Vec2& GetVertex(int32 index) const;\n\n\t/// Validate convexity. This is a very time consuming operation.\n\t/// @returns true if valid\n\tbool Validate() const;\n\n\tb2Vec2 m_centroid;\n\tb2Vec2 m_vertices[b2_maxPolygonVertices];\n\tb2Vec2 m_normals[b2_maxPolygonVertices];\n\tint32 m_count;\n};\n\ninline b2PolygonShape::b2PolygonShape()\n{\n\tm_type = e_polygon;\n\tm_radius = b2_polygonRadius;\n\tm_count = 0;\n\tm_centroid.SetZero();\n}\n\ninline const b2Vec2& b2PolygonShape::GetVertex(int32 index) const\n{\n\tb2Assert(0 <= index && index < m_count);\n\treturn m_vertices[index];\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/Shapes/b2Shape.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_SHAPE_H\n#define B2_SHAPE_H\n\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Common/b2Math.h>\n#include <Box2D/Collision/b2Collision.h>\n\n/// This holds the mass data computed for a shape.\nstruct b2MassData\n{\n\t/// The mass of the shape, usually in kilograms.\n\tfloat32 mass;\n\n\t/// The position of the shape's centroid relative to the shape's origin.\n\tb2Vec2 center;\n\n\t/// The rotational inertia of the shape about the local origin.\n\tfloat32 I;\n};\n\n/// A shape is used for collision detection. You can create a shape however you like.\n/// Shapes used for simulation in b2World are created automatically when a b2Fixture\n/// is created. Shapes may encapsulate a one or more child shapes.\nclass b2Shape\n{\npublic:\n\t\n\tenum Type\n\t{\n\t\te_circle = 0,\n\t\te_edge = 1,\n\t\te_polygon = 2,\n\t\te_chain = 3,\n\t\te_typeCount = 4\n\t};\n\n\tvirtual ~b2Shape() {}\n\n\t/// Clone the concrete shape using the provided allocator.\n\tvirtual b2Shape* Clone(b2BlockAllocator* allocator) const = 0;\n\n\t/// Get the type of this shape. You can use this to down cast to the concrete shape.\n\t/// @return the shape type.\n\tType GetType() const;\n\n\t/// Get the number of child primitives.\n\tvirtual int32 GetChildCount() const = 0;\n\n\t/// Test a point for containment in this shape. This only works for convex shapes.\n\t/// @param xf the shape world transform.\n\t/// @param p a point in world coordinates.\n\tvirtual bool TestPoint(const b2Transform& xf, const b2Vec2& p) const = 0;\n\n\t/// Cast a ray against a child shape.\n\t/// @param output the ray-cast results.\n\t/// @param input the ray-cast input parameters.\n\t/// @param transform the transform to be applied to the shape.\n\t/// @param childIndex the child shape index\n\tvirtual bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,\n\t\t\t\t\t\tconst b2Transform& transform, int32 childIndex) const = 0;\n\n\t/// Given a transform, compute the associated axis aligned bounding box for a child shape.\n\t/// @param aabb returns the axis aligned box.\n\t/// @param xf the world transform of the shape.\n\t/// @param childIndex the child shape\n\tvirtual void ComputeAABB(b2AABB* aabb, const b2Transform& xf, int32 childIndex) const = 0;\n\n\t/// Compute the mass properties of this shape using its dimensions and density.\n\t/// The inertia tensor is computed about the local origin.\n\t/// @param massData returns the mass data for this shape.\n\t/// @param density the density in kilograms per meter squared.\n\tvirtual void ComputeMass(b2MassData* massData, float32 density) const = 0;\n\n\tType m_type;\n\tfloat32 m_radius;\n};\n\ninline b2Shape::Type b2Shape::GetType() const\n{\n\treturn m_type;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2BroadPhase.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/b2BroadPhase.h>\n\nb2BroadPhase::b2BroadPhase()\n{\n\tm_proxyCount = 0;\n\n\tm_pairCapacity = 16;\n\tm_pairCount = 0;\n\tm_pairBuffer = (b2Pair*)b2Alloc(m_pairCapacity * sizeof(b2Pair));\n\n\tm_moveCapacity = 16;\n\tm_moveCount = 0;\n\tm_moveBuffer = (int32*)b2Alloc(m_moveCapacity * sizeof(int32));\n}\n\nb2BroadPhase::~b2BroadPhase()\n{\n\tb2Free(m_moveBuffer);\n\tb2Free(m_pairBuffer);\n}\n\nint32 b2BroadPhase::CreateProxy(const b2AABB& aabb, void* userData)\n{\n\tint32 proxyId = m_tree.CreateProxy(aabb, userData);\n\t++m_proxyCount;\n\tBufferMove(proxyId);\n\treturn proxyId;\n}\n\nvoid b2BroadPhase::DestroyProxy(int32 proxyId)\n{\n\tUnBufferMove(proxyId);\n\t--m_proxyCount;\n\tm_tree.DestroyProxy(proxyId);\n}\n\nvoid b2BroadPhase::MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement)\n{\n\tbool buffer = m_tree.MoveProxy(proxyId, aabb, displacement);\n\tif (buffer)\n\t{\n\t\tBufferMove(proxyId);\n\t}\n}\n\nvoid b2BroadPhase::TouchProxy(int32 proxyId)\n{\n\tBufferMove(proxyId);\n}\n\nvoid b2BroadPhase::BufferMove(int32 proxyId)\n{\n\tif (m_moveCount == m_moveCapacity)\n\t{\n\t\tint32* oldBuffer = m_moveBuffer;\n\t\tm_moveCapacity *= 2;\n\t\tm_moveBuffer = (int32*)b2Alloc(m_moveCapacity * sizeof(int32));\n\t\tmemcpy(m_moveBuffer, oldBuffer, m_moveCount * sizeof(int32));\n\t\tb2Free(oldBuffer);\n\t}\n\n\tm_moveBuffer[m_moveCount] = proxyId;\n\t++m_moveCount;\n}\n\nvoid b2BroadPhase::UnBufferMove(int32 proxyId)\n{\n\tfor (int32 i = 0; i < m_moveCount; ++i)\n\t{\n\t\tif (m_moveBuffer[i] == proxyId)\n\t\t{\n\t\t\tm_moveBuffer[i] = e_nullProxy;\n\t\t}\n\t}\n}\n\n// This is called from b2DynamicTree::Query when we are gathering pairs.\nbool b2BroadPhase::QueryCallback(int32 proxyId)\n{\n\t// A proxy cannot form a pair with itself.\n\tif (proxyId == m_queryProxyId)\n\t{\n\t\treturn true;\n\t}\n\n\t// Grow the pair buffer as needed.\n\tif (m_pairCount == m_pairCapacity)\n\t{\n\t\tb2Pair* oldBuffer = m_pairBuffer;\n\t\tm_pairCapacity *= 2;\n\t\tm_pairBuffer = (b2Pair*)b2Alloc(m_pairCapacity * sizeof(b2Pair));\n\t\tmemcpy(m_pairBuffer, oldBuffer, m_pairCount * sizeof(b2Pair));\n\t\tb2Free(oldBuffer);\n\t}\n\n\tm_pairBuffer[m_pairCount].proxyIdA = b2Min(proxyId, m_queryProxyId);\n\tm_pairBuffer[m_pairCount].proxyIdB = b2Max(proxyId, m_queryProxyId);\n\t++m_pairCount;\n\n\treturn true;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2BroadPhase.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_BROAD_PHASE_H\n#define B2_BROAD_PHASE_H\n\n#include <Box2D/Common/b2Settings.h>\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/b2DynamicTree.h>\n#include <algorithm>\n\nstruct b2Pair\n{\n\tint32 proxyIdA;\n\tint32 proxyIdB;\n};\n\n/// The broad-phase is used for computing pairs and performing volume queries and ray casts.\n/// This broad-phase does not persist pairs. Instead, this reports potentially new pairs.\n/// It is up to the client to consume the new pairs and to track subsequent overlap.\nclass b2BroadPhase\n{\npublic:\n\n\tenum\n\t{\n\t\te_nullProxy = -1\n\t};\n\n\tb2BroadPhase();\n\t~b2BroadPhase();\n\n\t/// Create a proxy with an initial AABB. Pairs are not reported until\n\t/// UpdatePairs is called.\n\tint32 CreateProxy(const b2AABB& aabb, void* userData);\n\n\t/// Destroy a proxy. It is up to the client to remove any pairs.\n\tvoid DestroyProxy(int32 proxyId);\n\n\t/// Call MoveProxy as many times as you like, then when you are done\n\t/// call UpdatePairs to finalized the proxy pairs (for your time step).\n\tvoid MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement);\n\n\t/// Call to trigger a re-processing of it's pairs on the next call to UpdatePairs.\n\tvoid TouchProxy(int32 proxyId);\n\n\t/// Get the fat AABB for a proxy.\n\tconst b2AABB& GetFatAABB(int32 proxyId) const;\n\n\t/// Get user data from a proxy. Returns NULL if the id is invalid.\n\tvoid* GetUserData(int32 proxyId) const;\n\n\t/// Test overlap of fat AABBs.\n\tbool TestOverlap(int32 proxyIdA, int32 proxyIdB) const;\n\n\t/// Get the number of proxies.\n\tint32 GetProxyCount() const;\n\n\t/// Update the pairs. This results in pair callbacks. This can only add pairs.\n\ttemplate <typename T>\n\tvoid UpdatePairs(T* callback);\n\n\t/// Query an AABB for overlapping proxies. The callback class\n\t/// is called for each proxy that overlaps the supplied AABB.\n\ttemplate <typename T>\n\tvoid Query(T* callback, const b2AABB& aabb) const;\n\n\t/// Ray-cast against the proxies in the tree. This relies on the callback\n\t/// to perform a exact ray-cast in the case were the proxy contains a shape.\n\t/// The callback also performs the any collision filtering. This has performance\n\t/// roughly equal to k * log(n), where k is the number of collisions and n is the\n\t/// number of proxies in the tree.\n\t/// @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).\n\t/// @param callback a callback class that is called for each proxy that is hit by the ray.\n\ttemplate <typename T>\n\tvoid RayCast(T* callback, const b2RayCastInput& input) const;\n\n\t/// Get the height of the embedded tree.\n\tint32 GetTreeHeight() const;\n\n\t/// Get the balance of the embedded tree.\n\tint32 GetTreeBalance() const;\n\n\t/// Get the quality metric of the embedded tree.\n\tfloat32 GetTreeQuality() const;\n\n\t/// Shift the world origin. Useful for large worlds.\n\t/// The shift formula is: position -= newOrigin\n\t/// @param newOrigin the new origin with respect to the old origin\n\tvoid ShiftOrigin(const b2Vec2& newOrigin);\n\nprivate:\n\n\tfriend class b2DynamicTree;\n\n\tvoid BufferMove(int32 proxyId);\n\tvoid UnBufferMove(int32 proxyId);\n\n\tbool QueryCallback(int32 proxyId);\n\n\tb2DynamicTree m_tree;\n\n\tint32 m_proxyCount;\n\n\tint32* m_moveBuffer;\n\tint32 m_moveCapacity;\n\tint32 m_moveCount;\n\n\tb2Pair* m_pairBuffer;\n\tint32 m_pairCapacity;\n\tint32 m_pairCount;\n\n\tint32 m_queryProxyId;\n};\n\n/// This is used to sort pairs.\ninline bool b2PairLessThan(const b2Pair& pair1, const b2Pair& pair2)\n{\n\tif (pair1.proxyIdA < pair2.proxyIdA)\n\t{\n\t\treturn true;\n\t}\n\n\tif (pair1.proxyIdA == pair2.proxyIdA)\n\t{\n\t\treturn pair1.proxyIdB < pair2.proxyIdB;\n\t}\n\n\treturn false;\n}\n\ninline void* b2BroadPhase::GetUserData(int32 proxyId) const\n{\n\treturn m_tree.GetUserData(proxyId);\n}\n\ninline bool b2BroadPhase::TestOverlap(int32 proxyIdA, int32 proxyIdB) const\n{\n\tconst b2AABB& aabbA = m_tree.GetFatAABB(proxyIdA);\n\tconst b2AABB& aabbB = m_tree.GetFatAABB(proxyIdB);\n\treturn b2TestOverlap(aabbA, aabbB);\n}\n\ninline const b2AABB& b2BroadPhase::GetFatAABB(int32 proxyId) const\n{\n\treturn m_tree.GetFatAABB(proxyId);\n}\n\ninline int32 b2BroadPhase::GetProxyCount() const\n{\n\treturn m_proxyCount;\n}\n\ninline int32 b2BroadPhase::GetTreeHeight() const\n{\n\treturn m_tree.GetHeight();\n}\n\ninline int32 b2BroadPhase::GetTreeBalance() const\n{\n\treturn m_tree.GetMaxBalance();\n}\n\ninline float32 b2BroadPhase::GetTreeQuality() const\n{\n\treturn m_tree.GetAreaRatio();\n}\n\ntemplate <typename T>\nvoid b2BroadPhase::UpdatePairs(T* callback)\n{\n\t// Reset pair buffer\n\tm_pairCount = 0;\n\n\t// Perform tree queries for all moving proxies.\n\tfor (int32 i = 0; i < m_moveCount; ++i)\n\t{\n\t\tm_queryProxyId = m_moveBuffer[i];\n\t\tif (m_queryProxyId == e_nullProxy)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\t// We have to query the tree with the fat AABB so that\n\t\t// we don't fail to create a pair that may touch later.\n\t\tconst b2AABB& fatAABB = m_tree.GetFatAABB(m_queryProxyId);\n\n\t\t// Query tree, create pairs and add them pair buffer.\n\t\tm_tree.Query(this, fatAABB);\n\t}\n\n\t// Reset move buffer\n\tm_moveCount = 0;\n\n\t// Sort the pair buffer to expose duplicates.\n\tstd::sort(m_pairBuffer, m_pairBuffer + m_pairCount, b2PairLessThan);\n\n\t// Send the pairs back to the client.\n\tint32 i = 0;\n\twhile (i < m_pairCount)\n\t{\n\t\tb2Pair* primaryPair = m_pairBuffer + i;\n\t\tvoid* userDataA = m_tree.GetUserData(primaryPair->proxyIdA);\n\t\tvoid* userDataB = m_tree.GetUserData(primaryPair->proxyIdB);\n\n\t\tcallback->AddPair(userDataA, userDataB);\n\t\t++i;\n\n\t\t// Skip any duplicate pairs.\n\t\twhile (i < m_pairCount)\n\t\t{\n\t\t\tb2Pair* pair = m_pairBuffer + i;\n\t\t\tif (pair->proxyIdA != primaryPair->proxyIdA || pair->proxyIdB != primaryPair->proxyIdB)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t++i;\n\t\t}\n\t}\n\n\t// Try to keep the tree balanced.\n\t//m_tree.Rebalance(4);\n}\n\ntemplate <typename T>\ninline void b2BroadPhase::Query(T* callback, const b2AABB& aabb) const\n{\n\tm_tree.Query(callback, aabb);\n}\n\ntemplate <typename T>\ninline void b2BroadPhase::RayCast(T* callback, const b2RayCastInput& input) const\n{\n\tm_tree.RayCast(callback, input);\n}\n\ninline void b2BroadPhase::ShiftOrigin(const b2Vec2& newOrigin)\n{\n\tm_tree.ShiftOrigin(newOrigin);\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2CollideCircle.cpp",
    "content": "/*\n* Copyright (c) 2007-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/Shapes/b2CircleShape.h>\n#include <Box2D/Collision/Shapes/b2PolygonShape.h>\n\nvoid b2CollideCircles(\n\tb2Manifold* manifold,\n\tconst b2CircleShape* circleA, const b2Transform& xfA,\n\tconst b2CircleShape* circleB, const b2Transform& xfB)\n{\n\tmanifold->pointCount = 0;\n\n\tb2Vec2 pA = b2Mul(xfA, circleA->m_p);\n\tb2Vec2 pB = b2Mul(xfB, circleB->m_p);\n\n\tb2Vec2 d = pB - pA;\n\tfloat32 distSqr = b2Dot(d, d);\n\tfloat32 rA = circleA->m_radius, rB = circleB->m_radius;\n\tfloat32 radius = rA + rB;\n\tif (distSqr > radius * radius)\n\t{\n\t\treturn;\n\t}\n\n\tmanifold->type = b2Manifold::e_circles;\n\tmanifold->localPoint = circleA->m_p;\n\tmanifold->localNormal.SetZero();\n\tmanifold->pointCount = 1;\n\n\tmanifold->points[0].localPoint = circleB->m_p;\n\tmanifold->points[0].id.key = 0;\n}\n\nvoid b2CollidePolygonAndCircle(\n\tb2Manifold* manifold,\n\tconst b2PolygonShape* polygonA, const b2Transform& xfA,\n\tconst b2CircleShape* circleB, const b2Transform& xfB)\n{\n\tmanifold->pointCount = 0;\n\n\t// Compute circle position in the frame of the polygon.\n\tb2Vec2 c = b2Mul(xfB, circleB->m_p);\n\tb2Vec2 cLocal = b2MulT(xfA, c);\n\n\t// Find the min separating edge.\n\tint32 normalIndex = 0;\n\tfloat32 separation = -b2_maxFloat;\n\tfloat32 radius = polygonA->m_radius + circleB->m_radius;\n\tint32 vertexCount = polygonA->m_count;\n\tconst b2Vec2* vertices = polygonA->m_vertices;\n\tconst b2Vec2* normals = polygonA->m_normals;\n\n\tfor (int32 i = 0; i < vertexCount; ++i)\n\t{\n\t\tfloat32 s = b2Dot(normals[i], cLocal - vertices[i]);\n\n\t\tif (s > radius)\n\t\t{\n\t\t\t// Early out.\n\t\t\treturn;\n\t\t}\n\n\t\tif (s > separation)\n\t\t{\n\t\t\tseparation = s;\n\t\t\tnormalIndex = i;\n\t\t}\n\t}\n\n\t// Vertices that subtend the incident face.\n\tint32 vertIndex1 = normalIndex;\n\tint32 vertIndex2 = vertIndex1 + 1 < vertexCount ? vertIndex1 + 1 : 0;\n\tb2Vec2 v1 = vertices[vertIndex1];\n\tb2Vec2 v2 = vertices[vertIndex2];\n\n\t// If the center is inside the polygon ...\n\tif (separation < b2_epsilon)\n\t{\n\t\tmanifold->pointCount = 1;\n\t\tmanifold->type = b2Manifold::e_faceA;\n\t\tmanifold->localNormal = normals[normalIndex];\n\t\tmanifold->localPoint = 0.5f * (v1 + v2);\n\t\tmanifold->points[0].localPoint = circleB->m_p;\n\t\tmanifold->points[0].id.key = 0;\n\t\treturn;\n\t}\n\n\t// Compute barycentric coordinates\n\tfloat32 u1 = b2Dot(cLocal - v1, v2 - v1);\n\tfloat32 u2 = b2Dot(cLocal - v2, v1 - v2);\n\tif (u1 <= 0.0f)\n\t{\n\t\tif (b2DistanceSquared(cLocal, v1) > radius * radius)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tmanifold->pointCount = 1;\n\t\tmanifold->type = b2Manifold::e_faceA;\n\t\tmanifold->localNormal = cLocal - v1;\n\t\tmanifold->localNormal.Normalize();\n\t\tmanifold->localPoint = v1;\n\t\tmanifold->points[0].localPoint = circleB->m_p;\n\t\tmanifold->points[0].id.key = 0;\n\t}\n\telse if (u2 <= 0.0f)\n\t{\n\t\tif (b2DistanceSquared(cLocal, v2) > radius * radius)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tmanifold->pointCount = 1;\n\t\tmanifold->type = b2Manifold::e_faceA;\n\t\tmanifold->localNormal = cLocal - v2;\n\t\tmanifold->localNormal.Normalize();\n\t\tmanifold->localPoint = v2;\n\t\tmanifold->points[0].localPoint = circleB->m_p;\n\t\tmanifold->points[0].id.key = 0;\n\t}\n\telse\n\t{\n\t\tb2Vec2 faceCenter = 0.5f * (v1 + v2);\n\t\tfloat32 separation = b2Dot(cLocal - faceCenter, normals[vertIndex1]);\n\t\tif (separation > radius)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tmanifold->pointCount = 1;\n\t\tmanifold->type = b2Manifold::e_faceA;\n\t\tmanifold->localNormal = normals[vertIndex1];\n\t\tmanifold->localPoint = faceCenter;\n\t\tmanifold->points[0].localPoint = circleB->m_p;\n\t\tmanifold->points[0].id.key = 0;\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2CollideEdge.cpp",
    "content": "/*\n * Copyright (c) 2007-2009 Erin Catto http://www.box2d.org\n *\n * This software is provided 'as-is', without any express or implied\n * warranty.  In no event will the authors be held liable for any damages\n * arising from the use of this software.\n * Permission is granted to anyone to use this software for any purpose,\n * including commercial applications, and to alter it and redistribute it\n * freely, subject to the following restrictions:\n * 1. The origin of this software must not be misrepresented; you must not\n * claim that you wrote the original software. If you use this software\n * in a product, an acknowledgment in the product documentation would be\n * appreciated but is not required.\n * 2. Altered source versions must be plainly marked as such, and must not be\n * misrepresented as being the original software.\n * 3. This notice may not be removed or altered from any source distribution.\n */\n\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/Shapes/b2CircleShape.h>\n#include <Box2D/Collision/Shapes/b2EdgeShape.h>\n#include <Box2D/Collision/Shapes/b2PolygonShape.h>\n\n\n// Compute contact points for edge versus circle.\n// This accounts for edge connectivity.\nvoid b2CollideEdgeAndCircle(b2Manifold* manifold,\n\t\t\t\t\t\t\tconst b2EdgeShape* edgeA, const b2Transform& xfA,\n\t\t\t\t\t\t\tconst b2CircleShape* circleB, const b2Transform& xfB)\n{\n\tmanifold->pointCount = 0;\n\t\n\t// Compute circle in frame of edge\n\tb2Vec2 Q = b2MulT(xfA, b2Mul(xfB, circleB->m_p));\n\t\n\tb2Vec2 A = edgeA->m_vertex1, B = edgeA->m_vertex2;\n\tb2Vec2 e = B - A;\n\t\n\t// Barycentric coordinates\n\tfloat32 u = b2Dot(e, B - Q);\n\tfloat32 v = b2Dot(e, Q - A);\n\t\n\tfloat32 radius = edgeA->m_radius + circleB->m_radius;\n\t\n\tb2ContactFeature cf;\n\tcf.indexB = 0;\n\tcf.typeB = b2ContactFeature::e_vertex;\n\t\n\t// Region A\n\tif (v <= 0.0f)\n\t{\n\t\tb2Vec2 P = A;\n\t\tb2Vec2 d = Q - P;\n\t\tfloat32 dd = b2Dot(d, d);\n\t\tif (dd > radius * radius)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Is there an edge connected to A?\n\t\tif (edgeA->m_hasVertex0)\n\t\t{\n\t\t\tb2Vec2 A1 = edgeA->m_vertex0;\n\t\t\tb2Vec2 B1 = A;\n\t\t\tb2Vec2 e1 = B1 - A1;\n\t\t\tfloat32 u1 = b2Dot(e1, B1 - Q);\n\t\t\t\n\t\t\t// Is the circle in Region AB of the previous edge?\n\t\t\tif (u1 > 0.0f)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcf.indexA = 0;\n\t\tcf.typeA = b2ContactFeature::e_vertex;\n\t\tmanifold->pointCount = 1;\n\t\tmanifold->type = b2Manifold::e_circles;\n\t\tmanifold->localNormal.SetZero();\n\t\tmanifold->localPoint = P;\n\t\tmanifold->points[0].id.key = 0;\n\t\tmanifold->points[0].id.cf = cf;\n\t\tmanifold->points[0].localPoint = circleB->m_p;\n\t\treturn;\n\t}\n\t\n\t// Region B\n\tif (u <= 0.0f)\n\t{\n\t\tb2Vec2 P = B;\n\t\tb2Vec2 d = Q - P;\n\t\tfloat32 dd = b2Dot(d, d);\n\t\tif (dd > radius * radius)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Is there an edge connected to B?\n\t\tif (edgeA->m_hasVertex3)\n\t\t{\n\t\t\tb2Vec2 B2 = edgeA->m_vertex3;\n\t\t\tb2Vec2 A2 = B;\n\t\t\tb2Vec2 e2 = B2 - A2;\n\t\t\tfloat32 v2 = b2Dot(e2, Q - A2);\n\t\t\t\n\t\t\t// Is the circle in Region AB of the next edge?\n\t\t\tif (v2 > 0.0f)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcf.indexA = 1;\n\t\tcf.typeA = b2ContactFeature::e_vertex;\n\t\tmanifold->pointCount = 1;\n\t\tmanifold->type = b2Manifold::e_circles;\n\t\tmanifold->localNormal.SetZero();\n\t\tmanifold->localPoint = P;\n\t\tmanifold->points[0].id.key = 0;\n\t\tmanifold->points[0].id.cf = cf;\n\t\tmanifold->points[0].localPoint = circleB->m_p;\n\t\treturn;\n\t}\n\t\n\t// Region AB\n\tfloat32 den = b2Dot(e, e);\n\tb2Assert(den > 0.0f);\n\tb2Vec2 P = (1.0f / den) * (u * A + v * B);\n\tb2Vec2 d = Q - P;\n\tfloat32 dd = b2Dot(d, d);\n\tif (dd > radius * radius)\n\t{\n\t\treturn;\n\t}\n\t\n\tb2Vec2 n(-e.y, e.x);\n\tif (b2Dot(n, Q - A) < 0.0f)\n\t{\n\t\tn.Set(-n.x, -n.y);\n\t}\n\tn.Normalize();\n\t\n\tcf.indexA = 0;\n\tcf.typeA = b2ContactFeature::e_face;\n\tmanifold->pointCount = 1;\n\tmanifold->type = b2Manifold::e_faceA;\n\tmanifold->localNormal = n;\n\tmanifold->localPoint = A;\n\tmanifold->points[0].id.key = 0;\n\tmanifold->points[0].id.cf = cf;\n\tmanifold->points[0].localPoint = circleB->m_p;\n}\n\n// This structure is used to keep track of the best separating axis.\nstruct b2EPAxis\n{\n\tenum Type\n\t{\n\t\te_unknown,\n\t\te_edgeA,\n\t\te_edgeB\n\t};\n\t\n\tType type;\n\tint32 index;\n\tfloat32 separation;\n};\n\n// This holds polygon B expressed in frame A.\nstruct b2TempPolygon\n{\n\tb2Vec2 vertices[b2_maxPolygonVertices];\n\tb2Vec2 normals[b2_maxPolygonVertices];\n\tint32 count;\n};\n\n// Reference face used for clipping\nstruct b2ReferenceFace\n{\n\tint32 i1, i2;\n\t\n\tb2Vec2 v1, v2;\n\t\n\tb2Vec2 normal;\n\t\n\tb2Vec2 sideNormal1;\n\tfloat32 sideOffset1;\n\t\n\tb2Vec2 sideNormal2;\n\tfloat32 sideOffset2;\n};\n\n// This class collides and edge and a polygon, taking into account edge adjacency.\nstruct b2EPCollider\n{\n\tvoid Collide(b2Manifold* manifold, const b2EdgeShape* edgeA, const b2Transform& xfA,\n\t\t\t\t const b2PolygonShape* polygonB, const b2Transform& xfB);\n\tb2EPAxis ComputeEdgeSeparation();\n\tb2EPAxis ComputePolygonSeparation();\n\t\n\tenum VertexType\n\t{\n\t\te_isolated,\n\t\te_concave,\n\t\te_convex\n\t};\n\t\n\tb2TempPolygon m_polygonB;\n\t\n\tb2Transform m_xf;\n\tb2Vec2 m_centroidB;\n\tb2Vec2 m_v0, m_v1, m_v2, m_v3;\n\tb2Vec2 m_normal0, m_normal1, m_normal2;\n\tb2Vec2 m_normal;\n\tVertexType m_type1, m_type2;\n\tb2Vec2 m_lowerLimit, m_upperLimit;\n\tfloat32 m_radius;\n\tbool m_front;\n};\n\n// Algorithm:\n// 1. Classify v1 and v2\n// 2. Classify polygon centroid as front or back\n// 3. Flip normal if necessary\n// 4. Initialize normal range to [-pi, pi] about face normal\n// 5. Adjust normal range according to adjacent edges\n// 6. Visit each separating axes, only accept axes within the range\n// 7. Return if _any_ axis indicates separation\n// 8. Clip\nvoid b2EPCollider::Collide(b2Manifold* manifold, const b2EdgeShape* edgeA, const b2Transform& xfA,\n\t\t\t\t\t\t   const b2PolygonShape* polygonB, const b2Transform& xfB)\n{\n\tm_xf = b2MulT(xfA, xfB);\n\t\n\tm_centroidB = b2Mul(m_xf, polygonB->m_centroid);\n\t\n\tm_v0 = edgeA->m_vertex0;\n\tm_v1 = edgeA->m_vertex1;\n\tm_v2 = edgeA->m_vertex2;\n\tm_v3 = edgeA->m_vertex3;\n\t\n\tbool hasVertex0 = edgeA->m_hasVertex0;\n\tbool hasVertex3 = edgeA->m_hasVertex3;\n\t\n\tb2Vec2 edge1 = m_v2 - m_v1;\n\tedge1.Normalize();\n\tm_normal1.Set(edge1.y, -edge1.x);\n\tfloat32 offset1 = b2Dot(m_normal1, m_centroidB - m_v1);\n\tfloat32 offset0 = 0.0f, offset2 = 0.0f;\n\tbool convex1 = false, convex2 = false;\n\t\n\t// Is there a preceding edge?\n\tif (hasVertex0)\n\t{\n\t\tb2Vec2 edge0 = m_v1 - m_v0;\n\t\tedge0.Normalize();\n\t\tm_normal0.Set(edge0.y, -edge0.x);\n\t\tconvex1 = b2Cross(edge0, edge1) >= 0.0f;\n\t\toffset0 = b2Dot(m_normal0, m_centroidB - m_v0);\n\t}\n\t\n\t// Is there a following edge?\n\tif (hasVertex3)\n\t{\n\t\tb2Vec2 edge2 = m_v3 - m_v2;\n\t\tedge2.Normalize();\n\t\tm_normal2.Set(edge2.y, -edge2.x);\n\t\tconvex2 = b2Cross(edge1, edge2) > 0.0f;\n\t\toffset2 = b2Dot(m_normal2, m_centroidB - m_v2);\n\t}\n\t\n\t// Determine front or back collision. Determine collision normal limits.\n\tif (hasVertex0 && hasVertex3)\n\t{\n\t\tif (convex1 && convex2)\n\t\t{\n\t\t\tm_front = offset0 >= 0.0f || offset1 >= 0.0f || offset2 >= 0.0f;\n\t\t\tif (m_front)\n\t\t\t{\n\t\t\t\tm_normal = m_normal1;\n\t\t\t\tm_lowerLimit = m_normal0;\n\t\t\t\tm_upperLimit = m_normal2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_normal = -m_normal1;\n\t\t\t\tm_lowerLimit = -m_normal1;\n\t\t\t\tm_upperLimit = -m_normal1;\n\t\t\t}\n\t\t}\n\t\telse if (convex1)\n\t\t{\n\t\t\tm_front = offset0 >= 0.0f || (offset1 >= 0.0f && offset2 >= 0.0f);\n\t\t\tif (m_front)\n\t\t\t{\n\t\t\t\tm_normal = m_normal1;\n\t\t\t\tm_lowerLimit = m_normal0;\n\t\t\t\tm_upperLimit = m_normal1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_normal = -m_normal1;\n\t\t\t\tm_lowerLimit = -m_normal2;\n\t\t\t\tm_upperLimit = -m_normal1;\n\t\t\t}\n\t\t}\n\t\telse if (convex2)\n\t\t{\n\t\t\tm_front = offset2 >= 0.0f || (offset0 >= 0.0f && offset1 >= 0.0f);\n\t\t\tif (m_front)\n\t\t\t{\n\t\t\t\tm_normal = m_normal1;\n\t\t\t\tm_lowerLimit = m_normal1;\n\t\t\t\tm_upperLimit = m_normal2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_normal = -m_normal1;\n\t\t\t\tm_lowerLimit = -m_normal1;\n\t\t\t\tm_upperLimit = -m_normal0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_front = offset0 >= 0.0f && offset1 >= 0.0f && offset2 >= 0.0f;\n\t\t\tif (m_front)\n\t\t\t{\n\t\t\t\tm_normal = m_normal1;\n\t\t\t\tm_lowerLimit = m_normal1;\n\t\t\t\tm_upperLimit = m_normal1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_normal = -m_normal1;\n\t\t\t\tm_lowerLimit = -m_normal2;\n\t\t\t\tm_upperLimit = -m_normal0;\n\t\t\t}\n\t\t}\n\t}\n\telse if (hasVertex0)\n\t{\n\t\tif (convex1)\n\t\t{\n\t\t\tm_front = offset0 >= 0.0f || offset1 >= 0.0f;\n\t\t\tif (m_front)\n\t\t\t{\n\t\t\t\tm_normal = m_normal1;\n\t\t\t\tm_lowerLimit = m_normal0;\n\t\t\t\tm_upperLimit = -m_normal1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_normal = -m_normal1;\n\t\t\t\tm_lowerLimit = m_normal1;\n\t\t\t\tm_upperLimit = -m_normal1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_front = offset0 >= 0.0f && offset1 >= 0.0f;\n\t\t\tif (m_front)\n\t\t\t{\n\t\t\t\tm_normal = m_normal1;\n\t\t\t\tm_lowerLimit = m_normal1;\n\t\t\t\tm_upperLimit = -m_normal1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_normal = -m_normal1;\n\t\t\t\tm_lowerLimit = m_normal1;\n\t\t\t\tm_upperLimit = -m_normal0;\n\t\t\t}\n\t\t}\n\t}\n\telse if (hasVertex3)\n\t{\n\t\tif (convex2)\n\t\t{\n\t\t\tm_front = offset1 >= 0.0f || offset2 >= 0.0f;\n\t\t\tif (m_front)\n\t\t\t{\n\t\t\t\tm_normal = m_normal1;\n\t\t\t\tm_lowerLimit = -m_normal1;\n\t\t\t\tm_upperLimit = m_normal2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_normal = -m_normal1;\n\t\t\t\tm_lowerLimit = -m_normal1;\n\t\t\t\tm_upperLimit = m_normal1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_front = offset1 >= 0.0f && offset2 >= 0.0f;\n\t\t\tif (m_front)\n\t\t\t{\n\t\t\t\tm_normal = m_normal1;\n\t\t\t\tm_lowerLimit = -m_normal1;\n\t\t\t\tm_upperLimit = m_normal1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_normal = -m_normal1;\n\t\t\t\tm_lowerLimit = -m_normal2;\n\t\t\t\tm_upperLimit = m_normal1;\n\t\t\t}\n\t\t}\t\t\n\t}\n\telse\n\t{\n\t\tm_front = offset1 >= 0.0f;\n\t\tif (m_front)\n\t\t{\n\t\t\tm_normal = m_normal1;\n\t\t\tm_lowerLimit = -m_normal1;\n\t\t\tm_upperLimit = -m_normal1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_normal = -m_normal1;\n\t\t\tm_lowerLimit = m_normal1;\n\t\t\tm_upperLimit = m_normal1;\n\t\t}\n\t}\n\t\n\t// Get polygonB in frameA\n\tm_polygonB.count = polygonB->m_count;\n\tfor (int32 i = 0; i < polygonB->m_count; ++i)\n\t{\n\t\tm_polygonB.vertices[i] = b2Mul(m_xf, polygonB->m_vertices[i]);\n\t\tm_polygonB.normals[i] = b2Mul(m_xf.q, polygonB->m_normals[i]);\n\t}\n\t\n\tm_radius = 2.0f * b2_polygonRadius;\n\t\n\tmanifold->pointCount = 0;\n\t\n\tb2EPAxis edgeAxis = ComputeEdgeSeparation();\n\t\n\t// If no valid normal can be found than this edge should not collide.\n\tif (edgeAxis.type == b2EPAxis::e_unknown)\n\t{\n\t\treturn;\n\t}\n\t\n\tif (edgeAxis.separation > m_radius)\n\t{\n\t\treturn;\n\t}\n\t\n\tb2EPAxis polygonAxis = ComputePolygonSeparation();\n\tif (polygonAxis.type != b2EPAxis::e_unknown && polygonAxis.separation > m_radius)\n\t{\n\t\treturn;\n\t}\n\t\n\t// Use hysteresis for jitter reduction.\n\tconst float32 k_relativeTol = 0.98f;\n\tconst float32 k_absoluteTol = 0.001f;\n\t\n\tb2EPAxis primaryAxis;\n\tif (polygonAxis.type == b2EPAxis::e_unknown)\n\t{\n\t\tprimaryAxis = edgeAxis;\n\t}\n\telse if (polygonAxis.separation > k_relativeTol * edgeAxis.separation + k_absoluteTol)\n\t{\n\t\tprimaryAxis = polygonAxis;\n\t}\n\telse\n\t{\n\t\tprimaryAxis = edgeAxis;\n\t}\n\t\n\tb2ClipVertex ie[2];\n\tb2ReferenceFace rf;\n\tif (primaryAxis.type == b2EPAxis::e_edgeA)\n\t{\n\t\tmanifold->type = b2Manifold::e_faceA;\n\t\t\n\t\t// Search for the polygon normal that is most anti-parallel to the edge normal.\n\t\tint32 bestIndex = 0;\n\t\tfloat32 bestValue = b2Dot(m_normal, m_polygonB.normals[0]);\n\t\tfor (int32 i = 1; i < m_polygonB.count; ++i)\n\t\t{\n\t\t\tfloat32 value = b2Dot(m_normal, m_polygonB.normals[i]);\n\t\t\tif (value < bestValue)\n\t\t\t{\n\t\t\t\tbestValue = value;\n\t\t\t\tbestIndex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint32 i1 = bestIndex;\n\t\tint32 i2 = i1 + 1 < m_polygonB.count ? i1 + 1 : 0;\n\t\t\n\t\tie[0].v = m_polygonB.vertices[i1];\n\t\tie[0].id.cf.indexA = 0;\n\t\tie[0].id.cf.indexB = static_cast<uint8>(i1);\n\t\tie[0].id.cf.typeA = b2ContactFeature::e_face;\n\t\tie[0].id.cf.typeB = b2ContactFeature::e_vertex;\n\t\t\n\t\tie[1].v = m_polygonB.vertices[i2];\n\t\tie[1].id.cf.indexA = 0;\n\t\tie[1].id.cf.indexB = static_cast<uint8>(i2);\n\t\tie[1].id.cf.typeA = b2ContactFeature::e_face;\n\t\tie[1].id.cf.typeB = b2ContactFeature::e_vertex;\n\t\t\n\t\tif (m_front)\n\t\t{\n\t\t\trf.i1 = 0;\n\t\t\trf.i2 = 1;\n\t\t\trf.v1 = m_v1;\n\t\t\trf.v2 = m_v2;\n\t\t\trf.normal = m_normal1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\trf.i1 = 1;\n\t\t\trf.i2 = 0;\n\t\t\trf.v1 = m_v2;\n\t\t\trf.v2 = m_v1;\n\t\t\trf.normal = -m_normal1;\n\t\t}\t\t\n\t}\n\telse\n\t{\n\t\tmanifold->type = b2Manifold::e_faceB;\n\t\t\n\t\tie[0].v = m_v1;\n\t\tie[0].id.cf.indexA = 0;\n\t\tie[0].id.cf.indexB = static_cast<uint8>(primaryAxis.index);\n\t\tie[0].id.cf.typeA = b2ContactFeature::e_vertex;\n\t\tie[0].id.cf.typeB = b2ContactFeature::e_face;\n\t\t\n\t\tie[1].v = m_v2;\n\t\tie[1].id.cf.indexA = 0;\n\t\tie[1].id.cf.indexB = static_cast<uint8>(primaryAxis.index);\t\t\n\t\tie[1].id.cf.typeA = b2ContactFeature::e_vertex;\n\t\tie[1].id.cf.typeB = b2ContactFeature::e_face;\n\t\t\n\t\trf.i1 = primaryAxis.index;\n\t\trf.i2 = rf.i1 + 1 < m_polygonB.count ? rf.i1 + 1 : 0;\n\t\trf.v1 = m_polygonB.vertices[rf.i1];\n\t\trf.v2 = m_polygonB.vertices[rf.i2];\n\t\trf.normal = m_polygonB.normals[rf.i1];\n\t}\n\t\n\trf.sideNormal1.Set(rf.normal.y, -rf.normal.x);\n\trf.sideNormal2 = -rf.sideNormal1;\n\trf.sideOffset1 = b2Dot(rf.sideNormal1, rf.v1);\n\trf.sideOffset2 = b2Dot(rf.sideNormal2, rf.v2);\n\t\n\t// Clip incident edge against extruded edge1 side edges.\n\tb2ClipVertex clipPoints1[2];\n\tb2ClipVertex clipPoints2[2];\n\tint32 np;\n\t\n\t// Clip to box side 1\n\tnp = b2ClipSegmentToLine(clipPoints1, ie, rf.sideNormal1, rf.sideOffset1, rf.i1);\n\t\n\tif (np < b2_maxManifoldPoints)\n\t{\n\t\treturn;\n\t}\n\t\n\t// Clip to negative box side 1\n\tnp = b2ClipSegmentToLine(clipPoints2, clipPoints1, rf.sideNormal2, rf.sideOffset2, rf.i2);\n\t\n\tif (np < b2_maxManifoldPoints)\n\t{\n\t\treturn;\n\t}\n\t\n\t// Now clipPoints2 contains the clipped points.\n\tif (primaryAxis.type == b2EPAxis::e_edgeA)\n\t{\n\t\tmanifold->localNormal = rf.normal;\n\t\tmanifold->localPoint = rf.v1;\n\t}\n\telse\n\t{\n\t\tmanifold->localNormal = polygonB->m_normals[rf.i1];\n\t\tmanifold->localPoint = polygonB->m_vertices[rf.i1];\n\t}\n\t\n\tint32 pointCount = 0;\n\tfor (int32 i = 0; i < b2_maxManifoldPoints; ++i)\n\t{\n\t\tfloat32 separation;\n\t\t\n\t\tseparation = b2Dot(rf.normal, clipPoints2[i].v - rf.v1);\n\t\t\n\t\tif (separation <= m_radius)\n\t\t{\n\t\t\tb2ManifoldPoint* cp = manifold->points + pointCount;\n\t\t\t\n\t\t\tif (primaryAxis.type == b2EPAxis::e_edgeA)\n\t\t\t{\n\t\t\t\tcp->localPoint = b2MulT(m_xf, clipPoints2[i].v);\n\t\t\t\tcp->id = clipPoints2[i].id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcp->localPoint = clipPoints2[i].v;\n\t\t\t\tcp->id.cf.typeA = clipPoints2[i].id.cf.typeB;\n\t\t\t\tcp->id.cf.typeB = clipPoints2[i].id.cf.typeA;\n\t\t\t\tcp->id.cf.indexA = clipPoints2[i].id.cf.indexB;\n\t\t\t\tcp->id.cf.indexB = clipPoints2[i].id.cf.indexA;\n\t\t\t}\n\t\t\t\n\t\t\t++pointCount;\n\t\t}\n\t}\n\t\n\tmanifold->pointCount = pointCount;\n}\n\nb2EPAxis b2EPCollider::ComputeEdgeSeparation()\n{\n\tb2EPAxis axis;\n\taxis.type = b2EPAxis::e_edgeA;\n\taxis.index = m_front ? 0 : 1;\n\taxis.separation = FLT_MAX;\n\t\n\tfor (int32 i = 0; i < m_polygonB.count; ++i)\n\t{\n\t\tfloat32 s = b2Dot(m_normal, m_polygonB.vertices[i] - m_v1);\n\t\tif (s < axis.separation)\n\t\t{\n\t\t\taxis.separation = s;\n\t\t}\n\t}\n\t\n\treturn axis;\n}\n\nb2EPAxis b2EPCollider::ComputePolygonSeparation()\n{\n\tb2EPAxis axis;\n\taxis.type = b2EPAxis::e_unknown;\n\taxis.index = -1;\n\taxis.separation = -FLT_MAX;\n\n\tb2Vec2 perp(-m_normal.y, m_normal.x);\n\n\tfor (int32 i = 0; i < m_polygonB.count; ++i)\n\t{\n\t\tb2Vec2 n = -m_polygonB.normals[i];\n\t\t\n\t\tfloat32 s1 = b2Dot(n, m_polygonB.vertices[i] - m_v1);\n\t\tfloat32 s2 = b2Dot(n, m_polygonB.vertices[i] - m_v2);\n\t\tfloat32 s = b2Min(s1, s2);\n\t\t\n\t\tif (s > m_radius)\n\t\t{\n\t\t\t// No collision\n\t\t\taxis.type = b2EPAxis::e_edgeB;\n\t\t\taxis.index = i;\n\t\t\taxis.separation = s;\n\t\t\treturn axis;\n\t\t}\n\t\t\n\t\t// Adjacency\n\t\tif (b2Dot(n, perp) >= 0.0f)\n\t\t{\n\t\t\tif (b2Dot(n - m_upperLimit, m_normal) < -b2_angularSlop)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (b2Dot(n - m_lowerLimit, m_normal) < -b2_angularSlop)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (s > axis.separation)\n\t\t{\n\t\t\taxis.type = b2EPAxis::e_edgeB;\n\t\t\taxis.index = i;\n\t\t\taxis.separation = s;\n\t\t}\n\t}\n\t\n\treturn axis;\n}\n\nvoid b2CollideEdgeAndPolygon(\tb2Manifold* manifold,\n\t\t\t\t\t\t\t const b2EdgeShape* edgeA, const b2Transform& xfA,\n\t\t\t\t\t\t\t const b2PolygonShape* polygonB, const b2Transform& xfB)\n{\n\tb2EPCollider collider;\n\tcollider.Collide(manifold, edgeA, xfA, polygonB, xfB);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2CollidePolygon.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/Shapes/b2PolygonShape.h>\n\n// Find the max separation between poly1 and poly2 using edge normals from poly1.\nstatic float32 b2FindMaxSeparation(int32* edgeIndex,\n\t\t\t\t\t\t\t\t const b2PolygonShape* poly1, const b2Transform& xf1,\n\t\t\t\t\t\t\t\t const b2PolygonShape* poly2, const b2Transform& xf2)\n{\n\tint32 count1 = poly1->m_count;\n\tint32 count2 = poly2->m_count;\n\tconst b2Vec2* n1s = poly1->m_normals;\n\tconst b2Vec2* v1s = poly1->m_vertices;\n\tconst b2Vec2* v2s = poly2->m_vertices;\n\tb2Transform xf = b2MulT(xf2, xf1);\n\n\tint32 bestIndex = 0;\n\tfloat32 maxSeparation = -b2_maxFloat;\n\tfor (int32 i = 0; i < count1; ++i)\n\t{\n\t\t// Get poly1 normal in frame2.\n\t\tb2Vec2 n = b2Mul(xf.q, n1s[i]);\n\t\tb2Vec2 v1 = b2Mul(xf, v1s[i]);\n\n\t\t// Find deepest point for normal i.\n\t\tfloat32 si = b2_maxFloat;\n\t\tfor (int32 j = 0; j < count2; ++j)\n\t\t{\n\t\t\tfloat32 sij = b2Dot(n, v2s[j] - v1);\n\t\t\tif (sij < si)\n\t\t\t{\n\t\t\t\tsi = sij;\n\t\t\t}\n\t\t}\n\n\t\tif (si > maxSeparation)\n\t\t{\n\t\t\tmaxSeparation = si;\n\t\t\tbestIndex = i;\n\t\t}\n\t}\n\n\t*edgeIndex = bestIndex;\n\treturn maxSeparation;\n}\n\nstatic void b2FindIncidentEdge(b2ClipVertex c[2],\n\t\t\t\t\t\t\t const b2PolygonShape* poly1, const b2Transform& xf1, int32 edge1,\n\t\t\t\t\t\t\t const b2PolygonShape* poly2, const b2Transform& xf2)\n{\n\tconst b2Vec2* normals1 = poly1->m_normals;\n\n\tint32 count2 = poly2->m_count;\n\tconst b2Vec2* vertices2 = poly2->m_vertices;\n\tconst b2Vec2* normals2 = poly2->m_normals;\n\n\tb2Assert(0 <= edge1 && edge1 < poly1->m_count);\n\n\t// Get the normal of the reference edge in poly2's frame.\n\tb2Vec2 normal1 = b2MulT(xf2.q, b2Mul(xf1.q, normals1[edge1]));\n\n\t// Find the incident edge on poly2.\n\tint32 index = 0;\n\tfloat32 minDot = b2_maxFloat;\n\tfor (int32 i = 0; i < count2; ++i)\n\t{\n\t\tfloat32 dot = b2Dot(normal1, normals2[i]);\n\t\tif (dot < minDot)\n\t\t{\n\t\t\tminDot = dot;\n\t\t\tindex = i;\n\t\t}\n\t}\n\n\t// Build the clip vertices for the incident edge.\n\tint32 i1 = index;\n\tint32 i2 = i1 + 1 < count2 ? i1 + 1 : 0;\n\n\tc[0].v = b2Mul(xf2, vertices2[i1]);\n\tc[0].id.cf.indexA = (uint8)edge1;\n\tc[0].id.cf.indexB = (uint8)i1;\n\tc[0].id.cf.typeA = b2ContactFeature::e_face;\n\tc[0].id.cf.typeB = b2ContactFeature::e_vertex;\n\n\tc[1].v = b2Mul(xf2, vertices2[i2]);\n\tc[1].id.cf.indexA = (uint8)edge1;\n\tc[1].id.cf.indexB = (uint8)i2;\n\tc[1].id.cf.typeA = b2ContactFeature::e_face;\n\tc[1].id.cf.typeB = b2ContactFeature::e_vertex;\n}\n\n// Find edge normal of max separation on A - return if separating axis is found\n// Find edge normal of max separation on B - return if separation axis is found\n// Choose reference edge as min(minA, minB)\n// Find incident edge\n// Clip\n\n// The normal points from 1 to 2\nvoid b2CollidePolygons(b2Manifold* manifold,\n\t\t\t\t\t  const b2PolygonShape* polyA, const b2Transform& xfA,\n\t\t\t\t\t  const b2PolygonShape* polyB, const b2Transform& xfB)\n{\n\tmanifold->pointCount = 0;\n\tfloat32 totalRadius = polyA->m_radius + polyB->m_radius;\n\n\tint32 edgeA = 0;\n\tfloat32 separationA = b2FindMaxSeparation(&edgeA, polyA, xfA, polyB, xfB);\n\tif (separationA > totalRadius)\n\t\treturn;\n\n\tint32 edgeB = 0;\n\tfloat32 separationB = b2FindMaxSeparation(&edgeB, polyB, xfB, polyA, xfA);\n\tif (separationB > totalRadius)\n\t\treturn;\n\n\tconst b2PolygonShape* poly1;\t// reference polygon\n\tconst b2PolygonShape* poly2;\t// incident polygon\n\tb2Transform xf1, xf2;\n\tint32 edge1;\t\t\t\t\t// reference edge\n\tuint8 flip;\n\tconst float32 k_tol = 0.1f * b2_linearSlop;\n\n\tif (separationB > separationA + k_tol)\n\t{\n\t\tpoly1 = polyB;\n\t\tpoly2 = polyA;\n\t\txf1 = xfB;\n\t\txf2 = xfA;\n\t\tedge1 = edgeB;\n\t\tmanifold->type = b2Manifold::e_faceB;\n\t\tflip = 1;\n\t}\n\telse\n\t{\n\t\tpoly1 = polyA;\n\t\tpoly2 = polyB;\n\t\txf1 = xfA;\n\t\txf2 = xfB;\n\t\tedge1 = edgeA;\n\t\tmanifold->type = b2Manifold::e_faceA;\n\t\tflip = 0;\n\t}\n\n\tb2ClipVertex incidentEdge[2];\n\tb2FindIncidentEdge(incidentEdge, poly1, xf1, edge1, poly2, xf2);\n\n\tint32 count1 = poly1->m_count;\n\tconst b2Vec2* vertices1 = poly1->m_vertices;\n\n\tint32 iv1 = edge1;\n\tint32 iv2 = edge1 + 1 < count1 ? edge1 + 1 : 0;\n\n\tb2Vec2 v11 = vertices1[iv1];\n\tb2Vec2 v12 = vertices1[iv2];\n\n\tb2Vec2 localTangent = v12 - v11;\n\tlocalTangent.Normalize();\n\t\n\tb2Vec2 localNormal = b2Cross(localTangent, 1.0f);\n\tb2Vec2 planePoint = 0.5f * (v11 + v12);\n\n\tb2Vec2 tangent = b2Mul(xf1.q, localTangent);\n\tb2Vec2 normal = b2Cross(tangent, 1.0f);\n\t\n\tv11 = b2Mul(xf1, v11);\n\tv12 = b2Mul(xf1, v12);\n\n\t// Face offset.\n\tfloat32 frontOffset = b2Dot(normal, v11);\n\n\t// Side offsets, extended by polytope skin thickness.\n\tfloat32 sideOffset1 = -b2Dot(tangent, v11) + totalRadius;\n\tfloat32 sideOffset2 = b2Dot(tangent, v12) + totalRadius;\n\n\t// Clip incident edge against extruded edge1 side edges.\n\tb2ClipVertex clipPoints1[2];\n\tb2ClipVertex clipPoints2[2];\n\tint np;\n\n\t// Clip to box side 1\n\tnp = b2ClipSegmentToLine(clipPoints1, incidentEdge, -tangent, sideOffset1, iv1);\n\n\tif (np < 2)\n\t\treturn;\n\n\t// Clip to negative box side 1\n\tnp = b2ClipSegmentToLine(clipPoints2, clipPoints1,  tangent, sideOffset2, iv2);\n\n\tif (np < 2)\n\t{\n\t\treturn;\n\t}\n\n\t// Now clipPoints2 contains the clipped points.\n\tmanifold->localNormal = localNormal;\n\tmanifold->localPoint = planePoint;\n\n\tint32 pointCount = 0;\n\tfor (int32 i = 0; i < b2_maxManifoldPoints; ++i)\n\t{\n\t\tfloat32 separation = b2Dot(normal, clipPoints2[i].v) - frontOffset;\n\n\t\tif (separation <= totalRadius)\n\t\t{\n\t\t\tb2ManifoldPoint* cp = manifold->points + pointCount;\n\t\t\tcp->localPoint = b2MulT(xf2, clipPoints2[i].v);\n\t\t\tcp->id = clipPoints2[i].id;\n\t\t\tif (flip)\n\t\t\t{\n\t\t\t\t// Swap features\n\t\t\t\tb2ContactFeature cf = cp->id.cf;\n\t\t\t\tcp->id.cf.indexA = cf.indexB;\n\t\t\t\tcp->id.cf.indexB = cf.indexA;\n\t\t\t\tcp->id.cf.typeA = cf.typeB;\n\t\t\t\tcp->id.cf.typeB = cf.typeA;\n\t\t\t}\n\t\t\t++pointCount;\n\t\t}\n\t}\n\n\tmanifold->pointCount = pointCount;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2Collision.cpp",
    "content": "/*\n* Copyright (c) 2007-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/b2Distance.h>\n\nvoid b2WorldManifold::Initialize(const b2Manifold* manifold,\n\t\t\t\t\t\t  const b2Transform& xfA, float32 radiusA,\n\t\t\t\t\t\t  const b2Transform& xfB, float32 radiusB)\n{\n\tif (manifold->pointCount == 0)\n\t{\n\t\treturn;\n\t}\n\n\tswitch (manifold->type)\n\t{\n\tcase b2Manifold::e_circles:\n\t\t{\n\t\t\tnormal.Set(1.0f, 0.0f);\n\t\t\tb2Vec2 pointA = b2Mul(xfA, manifold->localPoint);\n\t\t\tb2Vec2 pointB = b2Mul(xfB, manifold->points[0].localPoint);\n\t\t\tif (b2DistanceSquared(pointA, pointB) > b2_epsilon * b2_epsilon)\n\t\t\t{\n\t\t\t\tnormal = pointB - pointA;\n\t\t\t\tnormal.Normalize();\n\t\t\t}\n\n\t\t\tb2Vec2 cA = pointA + radiusA * normal;\n\t\t\tb2Vec2 cB = pointB - radiusB * normal;\n\t\t\tpoints[0] = 0.5f * (cA + cB);\n\t\t\tseparations[0] = b2Dot(cB - cA, normal);\n\t\t}\n\t\tbreak;\n\n\tcase b2Manifold::e_faceA:\n\t\t{\n\t\t\tnormal = b2Mul(xfA.q, manifold->localNormal);\n\t\t\tb2Vec2 planePoint = b2Mul(xfA, manifold->localPoint);\n\t\t\t\n\t\t\tfor (int32 i = 0; i < manifold->pointCount; ++i)\n\t\t\t{\n\t\t\t\tb2Vec2 clipPoint = b2Mul(xfB, manifold->points[i].localPoint);\n\t\t\t\tb2Vec2 cA = clipPoint + (radiusA - b2Dot(clipPoint - planePoint, normal)) * normal;\n\t\t\t\tb2Vec2 cB = clipPoint - radiusB * normal;\n\t\t\t\tpoints[i] = 0.5f * (cA + cB);\n\t\t\t\tseparations[i] = b2Dot(cB - cA, normal);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\n\tcase b2Manifold::e_faceB:\n\t\t{\n\t\t\tnormal = b2Mul(xfB.q, manifold->localNormal);\n\t\t\tb2Vec2 planePoint = b2Mul(xfB, manifold->localPoint);\n\n\t\t\tfor (int32 i = 0; i < manifold->pointCount; ++i)\n\t\t\t{\n\t\t\t\tb2Vec2 clipPoint = b2Mul(xfA, manifold->points[i].localPoint);\n\t\t\t\tb2Vec2 cB = clipPoint + (radiusB - b2Dot(clipPoint - planePoint, normal)) * normal;\n\t\t\t\tb2Vec2 cA = clipPoint - radiusA * normal;\n\t\t\t\tpoints[i] = 0.5f * (cA + cB);\n\t\t\t\tseparations[i] = b2Dot(cA - cB, normal);\n\t\t\t}\n\n\t\t\t// Ensure normal points from A to B.\n\t\t\tnormal = -normal;\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid b2GetPointStates(b2PointState state1[b2_maxManifoldPoints], b2PointState state2[b2_maxManifoldPoints],\n\t\t\t\t\t  const b2Manifold* manifold1, const b2Manifold* manifold2)\n{\n\tfor (int32 i = 0; i < b2_maxManifoldPoints; ++i)\n\t{\n\t\tstate1[i] = b2_nullState;\n\t\tstate2[i] = b2_nullState;\n\t}\n\n\t// Detect persists and removes.\n\tfor (int32 i = 0; i < manifold1->pointCount; ++i)\n\t{\n\t\tb2ContactID id = manifold1->points[i].id;\n\n\t\tstate1[i] = b2_removeState;\n\n\t\tfor (int32 j = 0; j < manifold2->pointCount; ++j)\n\t\t{\n\t\t\tif (manifold2->points[j].id.key == id.key)\n\t\t\t{\n\t\t\t\tstate1[i] = b2_persistState;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Detect persists and adds.\n\tfor (int32 i = 0; i < manifold2->pointCount; ++i)\n\t{\n\t\tb2ContactID id = manifold2->points[i].id;\n\n\t\tstate2[i] = b2_addState;\n\n\t\tfor (int32 j = 0; j < manifold1->pointCount; ++j)\n\t\t{\n\t\t\tif (manifold1->points[j].id.key == id.key)\n\t\t\t{\n\t\t\t\tstate2[i] = b2_persistState;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\n// From Real-time Collision Detection, p179.\nbool b2AABB::RayCast(b2RayCastOutput* output, const b2RayCastInput& input) const\n{\n\tfloat32 tmin = -b2_maxFloat;\n\tfloat32 tmax = b2_maxFloat;\n\n\tb2Vec2 p = input.p1;\n\tb2Vec2 d = input.p2 - input.p1;\n\tb2Vec2 absD = b2Abs(d);\n\n\tb2Vec2 normal;\n\n\tfor (int32 i = 0; i < 2; ++i)\n\t{\n\t\tif (absD(i) < b2_epsilon)\n\t\t{\n\t\t\t// Parallel.\n\t\t\tif (p(i) < lowerBound(i) || upperBound(i) < p(i))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfloat32 inv_d = 1.0f / d(i);\n\t\t\tfloat32 t1 = (lowerBound(i) - p(i)) * inv_d;\n\t\t\tfloat32 t2 = (upperBound(i) - p(i)) * inv_d;\n\n\t\t\t// Sign of the normal vector.\n\t\t\tfloat32 s = -1.0f;\n\n\t\t\tif (t1 > t2)\n\t\t\t{\n\t\t\t\tb2Swap(t1, t2);\n\t\t\t\ts = 1.0f;\n\t\t\t}\n\n\t\t\t// Push the min up\n\t\t\tif (t1 > tmin)\n\t\t\t{\n\t\t\t\tnormal.SetZero();\n\t\t\t\tnormal(i) = s;\n\t\t\t\ttmin = t1;\n\t\t\t}\n\n\t\t\t// Pull the max down\n\t\t\ttmax = b2Min(tmax, t2);\n\n\t\t\tif (tmin > tmax)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Does the ray start inside the box?\n\t// Does the ray intersect beyond the max fraction?\n\tif (tmin < 0.0f || input.maxFraction < tmin)\n\t{\n\t\treturn false;\n\t}\n\n\t// Intersection.\n\toutput->fraction = tmin;\n\toutput->normal = normal;\n\treturn true;\n}\n\n// Sutherland-Hodgman clipping.\nint32 b2ClipSegmentToLine(b2ClipVertex vOut[2], const b2ClipVertex vIn[2],\n\t\t\t\t\t\tconst b2Vec2& normal, float32 offset, int32 vertexIndexA)\n{\n\t// Start with no output points\n\tint32 numOut = 0;\n\n\t// Calculate the distance of end points to the line\n\tfloat32 distance0 = b2Dot(normal, vIn[0].v) - offset;\n\tfloat32 distance1 = b2Dot(normal, vIn[1].v) - offset;\n\n\t// If the points are behind the plane\n\tif (distance0 <= 0.0f) vOut[numOut++] = vIn[0];\n\tif (distance1 <= 0.0f) vOut[numOut++] = vIn[1];\n\n\t// If the points are on different sides of the plane\n\tif (distance0 * distance1 < 0.0f)\n\t{\n\t\t// Find intersection point of edge and plane\n\t\tfloat32 interp = distance0 / (distance0 - distance1);\n\t\tvOut[numOut].v = vIn[0].v + interp * (vIn[1].v - vIn[0].v);\n\n\t\t// VertexA is hitting edgeB.\n\t\tvOut[numOut].id.cf.indexA = static_cast<uint8>(vertexIndexA);\n\t\tvOut[numOut].id.cf.indexB = vIn[0].id.cf.indexB;\n\t\tvOut[numOut].id.cf.typeA = b2ContactFeature::e_vertex;\n\t\tvOut[numOut].id.cf.typeB = b2ContactFeature::e_face;\n\t\t++numOut;\n\t}\n\n\treturn numOut;\n}\n\nbool b2TestOverlap(\tconst b2Shape* shapeA, int32 indexA,\n\t\t\t\t\tconst b2Shape* shapeB, int32 indexB,\n\t\t\t\t\tconst b2Transform& xfA, const b2Transform& xfB)\n{\n\tb2DistanceInput input;\n\tinput.proxyA.Set(shapeA, indexA);\n\tinput.proxyB.Set(shapeB, indexB);\n\tinput.transformA = xfA;\n\tinput.transformB = xfB;\n\tinput.useRadii = true;\n\n\tb2SimplexCache cache;\n\tcache.count = 0;\n\n\tb2DistanceOutput output;\n\n\tb2Distance(&output, &cache, &input);\n\n\treturn output.distance < 10.0f * b2_epsilon;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2Collision.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_COLLISION_H\n#define B2_COLLISION_H\n\n#include <Box2D/Common/b2Math.h>\n#include <limits.h>\n\n/// @file\n/// Structures and functions used for computing contact points, distance\n/// queries, and TOI queries.\n\nclass b2Shape;\nclass b2CircleShape;\nclass b2EdgeShape;\nclass b2PolygonShape;\n\nconst uint8 b2_nullFeature = UCHAR_MAX;\n\n/// The features that intersect to form the contact point\n/// This must be 4 bytes or less.\nstruct b2ContactFeature\n{\n\tenum Type\n\t{\n\t\te_vertex = 0,\n\t\te_face = 1\n\t};\n\n\tuint8 indexA;\t\t///< Feature index on shapeA\n\tuint8 indexB;\t\t///< Feature index on shapeB\n\tuint8 typeA;\t\t///< The feature type on shapeA\n\tuint8 typeB;\t\t///< The feature type on shapeB\n};\n\n/// Contact ids to facilitate warm starting.\nunion b2ContactID\n{\n\tb2ContactFeature cf;\n\tuint32 key;\t\t\t\t\t///< Used to quickly compare contact ids.\n};\n\n/// A manifold point is a contact point belonging to a contact\n/// manifold. It holds details related to the geometry and dynamics\n/// of the contact points.\n/// The local point usage depends on the manifold type:\n/// -e_circles: the local center of circleB\n/// -e_faceA: the local center of cirlceB or the clip point of polygonB\n/// -e_faceB: the clip point of polygonA\n/// This structure is stored across time steps, so we keep it small.\n/// Note: the impulses are used for internal caching and may not\n/// provide reliable contact forces, especially for high speed collisions.\nstruct b2ManifoldPoint\n{\n\tb2Vec2 localPoint;\t\t///< usage depends on manifold type\n\tfloat32 normalImpulse;\t///< the non-penetration impulse\n\tfloat32 tangentImpulse;\t///< the friction impulse\n\tb2ContactID id;\t\t\t///< uniquely identifies a contact point between two shapes\n};\n\n/// A manifold for two touching convex shapes.\n/// Box2D supports multiple types of contact:\n/// - clip point versus plane with radius\n/// - point versus point with radius (circles)\n/// The local point usage depends on the manifold type:\n/// -e_circles: the local center of circleA\n/// -e_faceA: the center of faceA\n/// -e_faceB: the center of faceB\n/// Similarly the local normal usage:\n/// -e_circles: not used\n/// -e_faceA: the normal on polygonA\n/// -e_faceB: the normal on polygonB\n/// We store contacts in this way so that position correction can\n/// account for movement, which is critical for continuous physics.\n/// All contact scenarios must be expressed in one of these types.\n/// This structure is stored across time steps, so we keep it small.\nstruct b2Manifold\n{\n\tenum Type\n\t{\n\t\te_circles,\n\t\te_faceA,\n\t\te_faceB\n\t};\n\n\tb2ManifoldPoint points[b2_maxManifoldPoints];\t///< the points of contact\n\tb2Vec2 localNormal;\t\t\t\t\t\t\t\t///< not use for Type::e_points\n\tb2Vec2 localPoint;\t\t\t\t\t\t\t\t///< usage depends on manifold type\n\tType type;\n\tint32 pointCount;\t\t\t\t\t\t\t\t///< the number of manifold points\n};\n\n/// This is used to compute the current state of a contact manifold.\nstruct b2WorldManifold\n{\n\t/// Evaluate the manifold with supplied transforms. This assumes\n\t/// modest motion from the original state. This does not change the\n\t/// point count, impulses, etc. The radii must come from the shapes\n\t/// that generated the manifold.\n\tvoid Initialize(const b2Manifold* manifold,\n\t\t\t\t\tconst b2Transform& xfA, float32 radiusA,\n\t\t\t\t\tconst b2Transform& xfB, float32 radiusB);\n\n\tb2Vec2 normal;\t\t\t\t\t\t\t\t///< world vector pointing from A to B\n\tb2Vec2 points[b2_maxManifoldPoints];\t\t///< world contact point (point of intersection)\n\tfloat32 separations[b2_maxManifoldPoints];\t///< a negative value indicates overlap, in meters\n};\n\n/// This is used for determining the state of contact points.\nenum b2PointState\n{\n\tb2_nullState,\t\t///< point does not exist\n\tb2_addState,\t\t///< point was added in the update\n\tb2_persistState,\t///< point persisted across the update\n\tb2_removeState\t\t///< point was removed in the update\n};\n\n/// Compute the point states given two manifolds. The states pertain to the transition from manifold1\n/// to manifold2. So state1 is either persist or remove while state2 is either add or persist.\nvoid b2GetPointStates(b2PointState state1[b2_maxManifoldPoints], b2PointState state2[b2_maxManifoldPoints],\n\t\t\t\t\t  const b2Manifold* manifold1, const b2Manifold* manifold2);\n\n/// Used for computing contact manifolds.\nstruct b2ClipVertex\n{\n\tb2Vec2 v;\n\tb2ContactID id;\n};\n\n/// Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).\nstruct b2RayCastInput\n{\n\tb2Vec2 p1, p2;\n\tfloat32 maxFraction;\n};\n\n/// Ray-cast output data. The ray hits at p1 + fraction * (p2 - p1), where p1 and p2\n/// come from b2RayCastInput.\nstruct b2RayCastOutput\n{\n\tb2Vec2 normal;\n\tfloat32 fraction;\n};\n\n/// An axis aligned bounding box.\nstruct b2AABB\n{\n\t/// Verify that the bounds are sorted.\n\tbool IsValid() const;\n\n\t/// Get the center of the AABB.\n\tb2Vec2 GetCenter() const\n\t{\n\t\treturn 0.5f * (lowerBound + upperBound);\n\t}\n\n\t/// Get the extents of the AABB (half-widths).\n\tb2Vec2 GetExtents() const\n\t{\n\t\treturn 0.5f * (upperBound - lowerBound);\n\t}\n\n\t/// Get the perimeter length\n\tfloat32 GetPerimeter() const\n\t{\n\t\tfloat32 wx = upperBound.x - lowerBound.x;\n\t\tfloat32 wy = upperBound.y - lowerBound.y;\n\t\treturn 2.0f * (wx + wy);\n\t}\n\n\t/// Combine an AABB into this one.\n\tvoid Combine(const b2AABB& aabb)\n\t{\n\t\tlowerBound = b2Min(lowerBound, aabb.lowerBound);\n\t\tupperBound = b2Max(upperBound, aabb.upperBound);\n\t}\n\n\t/// Combine two AABBs into this one.\n\tvoid Combine(const b2AABB& aabb1, const b2AABB& aabb2)\n\t{\n\t\tlowerBound = b2Min(aabb1.lowerBound, aabb2.lowerBound);\n\t\tupperBound = b2Max(aabb1.upperBound, aabb2.upperBound);\n\t}\n\n\t/// Does this aabb contain the provided AABB.\n\tbool Contains(const b2AABB& aabb) const\n\t{\n\t\tbool result = true;\n\t\tresult = result && lowerBound.x <= aabb.lowerBound.x;\n\t\tresult = result && lowerBound.y <= aabb.lowerBound.y;\n\t\tresult = result && aabb.upperBound.x <= upperBound.x;\n\t\tresult = result && aabb.upperBound.y <= upperBound.y;\n\t\treturn result;\n\t}\n\n\tbool RayCast(b2RayCastOutput* output, const b2RayCastInput& input) const;\n\n\tb2Vec2 lowerBound;\t///< the lower vertex\n\tb2Vec2 upperBound;\t///< the upper vertex\n};\n\n/// Compute the collision manifold between two circles.\nvoid b2CollideCircles(b2Manifold* manifold,\n\t\t\t\t\t  const b2CircleShape* circleA, const b2Transform& xfA,\n\t\t\t\t\t  const b2CircleShape* circleB, const b2Transform& xfB);\n\n/// Compute the collision manifold between a polygon and a circle.\nvoid b2CollidePolygonAndCircle(b2Manifold* manifold,\n\t\t\t\t\t\t\t   const b2PolygonShape* polygonA, const b2Transform& xfA,\n\t\t\t\t\t\t\t   const b2CircleShape* circleB, const b2Transform& xfB);\n\n/// Compute the collision manifold between two polygons.\nvoid b2CollidePolygons(b2Manifold* manifold,\n\t\t\t\t\t   const b2PolygonShape* polygonA, const b2Transform& xfA,\n\t\t\t\t\t   const b2PolygonShape* polygonB, const b2Transform& xfB);\n\n/// Compute the collision manifold between an edge and a circle.\nvoid b2CollideEdgeAndCircle(b2Manifold* manifold,\n\t\t\t\t\t\t\t   const b2EdgeShape* polygonA, const b2Transform& xfA,\n\t\t\t\t\t\t\t   const b2CircleShape* circleB, const b2Transform& xfB);\n\n/// Compute the collision manifold between an edge and a circle.\nvoid b2CollideEdgeAndPolygon(b2Manifold* manifold,\n\t\t\t\t\t\t\t   const b2EdgeShape* edgeA, const b2Transform& xfA,\n\t\t\t\t\t\t\t   const b2PolygonShape* circleB, const b2Transform& xfB);\n\n/// Clipping for contact manifolds.\nint32 b2ClipSegmentToLine(b2ClipVertex vOut[2], const b2ClipVertex vIn[2],\n\t\t\t\t\t\t\tconst b2Vec2& normal, float32 offset, int32 vertexIndexA);\n\n/// Determine if two generic shapes overlap.\nbool b2TestOverlap(\tconst b2Shape* shapeA, int32 indexA,\n\t\t\t\t\tconst b2Shape* shapeB, int32 indexB,\n\t\t\t\t\tconst b2Transform& xfA, const b2Transform& xfB);\n\n// ---------------- Inline Functions ------------------------------------------\n\ninline bool b2AABB::IsValid() const\n{\n\tb2Vec2 d = upperBound - lowerBound;\n\tbool valid = d.x >= 0.0f && d.y >= 0.0f;\n\tvalid = valid && lowerBound.IsValid() && upperBound.IsValid();\n\treturn valid;\n}\n\ninline bool b2TestOverlap(const b2AABB& a, const b2AABB& b)\n{\n\tb2Vec2 d1, d2;\n\td1 = b.lowerBound - a.upperBound;\n\td2 = a.lowerBound - b.upperBound;\n\n\tif (d1.x > 0.0f || d1.y > 0.0f)\n\t\treturn false;\n\n\tif (d2.x > 0.0f || d2.y > 0.0f)\n\t\treturn false;\n\n\treturn true;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2Distance.cpp",
    "content": "/*\n* Copyright (c) 2007-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/b2Distance.h>\n#include <Box2D/Collision/Shapes/b2CircleShape.h>\n#include <Box2D/Collision/Shapes/b2EdgeShape.h>\n#include <Box2D/Collision/Shapes/b2ChainShape.h>\n#include <Box2D/Collision/Shapes/b2PolygonShape.h>\n\n// GJK using Voronoi regions (Christer Ericson) and Barycentric coordinates.\nint32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters;\n\nvoid b2DistanceProxy::Set(const b2Shape* shape, int32 index)\n{\n\tswitch (shape->GetType())\n\t{\n\tcase b2Shape::e_circle:\n\t\t{\n\t\t\tconst b2CircleShape* circle = static_cast<const b2CircleShape*>(shape);\n\t\t\tm_vertices = &circle->m_p;\n\t\t\tm_count = 1;\n\t\t\tm_radius = circle->m_radius;\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_polygon:\n\t\t{\n\t\t\tconst b2PolygonShape* polygon = static_cast<const b2PolygonShape*>(shape);\n\t\t\tm_vertices = polygon->m_vertices;\n\t\t\tm_count = polygon->m_count;\n\t\t\tm_radius = polygon->m_radius;\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_chain:\n\t\t{\n\t\t\tconst b2ChainShape* chain = static_cast<const b2ChainShape*>(shape);\n\t\t\tb2Assert(0 <= index && index < chain->m_count);\n\n\t\t\tm_buffer[0] = chain->m_vertices[index];\n\t\t\tif (index + 1 < chain->m_count)\n\t\t\t{\n\t\t\t\tm_buffer[1] = chain->m_vertices[index + 1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_buffer[1] = chain->m_vertices[0];\n\t\t\t}\n\n\t\t\tm_vertices = m_buffer;\n\t\t\tm_count = 2;\n\t\t\tm_radius = chain->m_radius;\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_edge:\n\t\t{\n\t\t\tconst b2EdgeShape* edge = static_cast<const b2EdgeShape*>(shape);\n\t\t\tm_vertices = &edge->m_vertex1;\n\t\t\tm_count = 2;\n\t\t\tm_radius = edge->m_radius;\n\t\t}\n\t\tbreak;\n\n\tdefault:\n\t\tb2Assert(false);\n\t}\n}\n\n\nstruct b2SimplexVertex\n{\n\tb2Vec2 wA;\t\t// support point in proxyA\n\tb2Vec2 wB;\t\t// support point in proxyB\n\tb2Vec2 w;\t\t// wB - wA\n\tfloat32 a;\t\t// barycentric coordinate for closest point\n\tint32 indexA;\t// wA index\n\tint32 indexB;\t// wB index\n};\n\nstruct b2Simplex\n{\n\tvoid ReadCache(\tconst b2SimplexCache* cache,\n\t\t\t\t\tconst b2DistanceProxy* proxyA, const b2Transform& transformA,\n\t\t\t\t\tconst b2DistanceProxy* proxyB, const b2Transform& transformB)\n\t{\n\t\tb2Assert(cache->count <= 3);\n\t\t\n\t\t// Copy data from cache.\n\t\tm_count = cache->count;\n\t\tb2SimplexVertex* vertices = &m_v1;\n\t\tfor (int32 i = 0; i < m_count; ++i)\n\t\t{\n\t\t\tb2SimplexVertex* v = vertices + i;\n\t\t\tv->indexA = cache->indexA[i];\n\t\t\tv->indexB = cache->indexB[i];\n\t\t\tb2Vec2 wALocal = proxyA->GetVertex(v->indexA);\n\t\t\tb2Vec2 wBLocal = proxyB->GetVertex(v->indexB);\n\t\t\tv->wA = b2Mul(transformA, wALocal);\n\t\t\tv->wB = b2Mul(transformB, wBLocal);\n\t\t\tv->w = v->wB - v->wA;\n\t\t\tv->a = 0.0f;\n\t\t}\n\n\t\t// Compute the new simplex metric, if it is substantially different than\n\t\t// old metric then flush the simplex.\n\t\tif (m_count > 1)\n\t\t{\n\t\t\tfloat32 metric1 = cache->metric;\n\t\t\tfloat32 metric2 = GetMetric();\n\t\t\tif (metric2 < 0.5f * metric1 || 2.0f * metric1 < metric2 || metric2 < b2_epsilon)\n\t\t\t{\n\t\t\t\t// Reset the simplex.\n\t\t\t\tm_count = 0;\n\t\t\t}\n\t\t}\n\n\t\t// If the cache is empty or invalid ...\n\t\tif (m_count == 0)\n\t\t{\n\t\t\tb2SimplexVertex* v = vertices + 0;\n\t\t\tv->indexA = 0;\n\t\t\tv->indexB = 0;\n\t\t\tb2Vec2 wALocal = proxyA->GetVertex(0);\n\t\t\tb2Vec2 wBLocal = proxyB->GetVertex(0);\n\t\t\tv->wA = b2Mul(transformA, wALocal);\n\t\t\tv->wB = b2Mul(transformB, wBLocal);\n\t\t\tv->w = v->wB - v->wA;\n\t\t\tv->a = 1.0f;\n\t\t\tm_count = 1;\n\t\t}\n\t}\n\n\tvoid WriteCache(b2SimplexCache* cache) const\n\t{\n\t\tcache->metric = GetMetric();\n\t\tcache->count = uint16(m_count);\n\t\tconst b2SimplexVertex* vertices = &m_v1;\n\t\tfor (int32 i = 0; i < m_count; ++i)\n\t\t{\n\t\t\tcache->indexA[i] = uint8(vertices[i].indexA);\n\t\t\tcache->indexB[i] = uint8(vertices[i].indexB);\n\t\t}\n\t}\n\n\tb2Vec2 GetSearchDirection() const\n\t{\n\t\tswitch (m_count)\n\t\t{\n\t\tcase 1:\n\t\t\treturn -m_v1.w;\n\n\t\tcase 2:\n\t\t\t{\n\t\t\t\tb2Vec2 e12 = m_v2.w - m_v1.w;\n\t\t\t\tfloat32 sgn = b2Cross(e12, -m_v1.w);\n\t\t\t\tif (sgn > 0.0f)\n\t\t\t\t{\n\t\t\t\t\t// Origin is left of e12.\n\t\t\t\t\treturn b2Cross(1.0f, e12);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Origin is right of e12.\n\t\t\t\t\treturn b2Cross(e12, 1.0f);\n\t\t\t\t}\n\t\t\t}\n\n\t\tdefault:\n\t\t\tb2Assert(false);\n\t\t\treturn b2Vec2_zero;\n\t\t}\n\t}\n\n\tb2Vec2 GetClosestPoint() const\n\t{\n\t\tswitch (m_count)\n\t\t{\n\t\tcase 0:\n\t\t\tb2Assert(false);\n\t\t\treturn b2Vec2_zero;\n\n\t\tcase 1:\n\t\t\treturn m_v1.w;\n\n\t\tcase 2:\n\t\t\treturn m_v1.a * m_v1.w + m_v2.a * m_v2.w;\n\n\t\tcase 3:\n\t\t\treturn b2Vec2_zero;\n\n\t\tdefault:\n\t\t\tb2Assert(false);\n\t\t\treturn b2Vec2_zero;\n\t\t}\n\t}\n\n\tvoid GetWitnessPoints(b2Vec2* pA, b2Vec2* pB) const\n\t{\n\t\tswitch (m_count)\n\t\t{\n\t\tcase 0:\n\t\t\tb2Assert(false);\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\t*pA = m_v1.wA;\n\t\t\t*pB = m_v1.wB;\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\t*pA = m_v1.a * m_v1.wA + m_v2.a * m_v2.wA;\n\t\t\t*pB = m_v1.a * m_v1.wB + m_v2.a * m_v2.wB;\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\t*pA = m_v1.a * m_v1.wA + m_v2.a * m_v2.wA + m_v3.a * m_v3.wA;\n\t\t\t*pB = *pA;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tb2Assert(false);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tfloat32 GetMetric() const\n\t{\n\t\tswitch (m_count)\n\t\t{\n\t\tcase 0:\n\t\t\tb2Assert(false);\n\t\t\treturn 0.0f;\n\n\t\tcase 1:\n\t\t\treturn 0.0f;\n\n\t\tcase 2:\n\t\t\treturn b2Distance(m_v1.w, m_v2.w);\n\n\t\tcase 3:\n\t\t\treturn b2Cross(m_v2.w - m_v1.w, m_v3.w - m_v1.w);\n\n\t\tdefault:\n\t\t\tb2Assert(false);\n\t\t\treturn 0.0f;\n\t\t}\n\t}\n\n\tvoid Solve2();\n\tvoid Solve3();\n\n\tb2SimplexVertex m_v1, m_v2, m_v3;\n\tint32 m_count;\n};\n\n\n// Solve a line segment using barycentric coordinates.\n//\n// p = a1 * w1 + a2 * w2\n// a1 + a2 = 1\n//\n// The vector from the origin to the closest point on the line is\n// perpendicular to the line.\n// e12 = w2 - w1\n// dot(p, e) = 0\n// a1 * dot(w1, e) + a2 * dot(w2, e) = 0\n//\n// 2-by-2 linear system\n// [1      1     ][a1] = [1]\n// [w1.e12 w2.e12][a2] = [0]\n//\n// Define\n// d12_1 =  dot(w2, e12)\n// d12_2 = -dot(w1, e12)\n// d12 = d12_1 + d12_2\n//\n// Solution\n// a1 = d12_1 / d12\n// a2 = d12_2 / d12\nvoid b2Simplex::Solve2()\n{\n\tb2Vec2 w1 = m_v1.w;\n\tb2Vec2 w2 = m_v2.w;\n\tb2Vec2 e12 = w2 - w1;\n\n\t// w1 region\n\tfloat32 d12_2 = -b2Dot(w1, e12);\n\tif (d12_2 <= 0.0f)\n\t{\n\t\t// a2 <= 0, so we clamp it to 0\n\t\tm_v1.a = 1.0f;\n\t\tm_count = 1;\n\t\treturn;\n\t}\n\n\t// w2 region\n\tfloat32 d12_1 = b2Dot(w2, e12);\n\tif (d12_1 <= 0.0f)\n\t{\n\t\t// a1 <= 0, so we clamp it to 0\n\t\tm_v2.a = 1.0f;\n\t\tm_count = 1;\n\t\tm_v1 = m_v2;\n\t\treturn;\n\t}\n\n\t// Must be in e12 region.\n\tfloat32 inv_d12 = 1.0f / (d12_1 + d12_2);\n\tm_v1.a = d12_1 * inv_d12;\n\tm_v2.a = d12_2 * inv_d12;\n\tm_count = 2;\n}\n\n// Possible regions:\n// - points[2]\n// - edge points[0]-points[2]\n// - edge points[1]-points[2]\n// - inside the triangle\nvoid b2Simplex::Solve3()\n{\n\tb2Vec2 w1 = m_v1.w;\n\tb2Vec2 w2 = m_v2.w;\n\tb2Vec2 w3 = m_v3.w;\n\n\t// Edge12\n\t// [1      1     ][a1] = [1]\n\t// [w1.e12 w2.e12][a2] = [0]\n\t// a3 = 0\n\tb2Vec2 e12 = w2 - w1;\n\tfloat32 w1e12 = b2Dot(w1, e12);\n\tfloat32 w2e12 = b2Dot(w2, e12);\n\tfloat32 d12_1 = w2e12;\n\tfloat32 d12_2 = -w1e12;\n\n\t// Edge13\n\t// [1      1     ][a1] = [1]\n\t// [w1.e13 w3.e13][a3] = [0]\n\t// a2 = 0\n\tb2Vec2 e13 = w3 - w1;\n\tfloat32 w1e13 = b2Dot(w1, e13);\n\tfloat32 w3e13 = b2Dot(w3, e13);\n\tfloat32 d13_1 = w3e13;\n\tfloat32 d13_2 = -w1e13;\n\n\t// Edge23\n\t// [1      1     ][a2] = [1]\n\t// [w2.e23 w3.e23][a3] = [0]\n\t// a1 = 0\n\tb2Vec2 e23 = w3 - w2;\n\tfloat32 w2e23 = b2Dot(w2, e23);\n\tfloat32 w3e23 = b2Dot(w3, e23);\n\tfloat32 d23_1 = w3e23;\n\tfloat32 d23_2 = -w2e23;\n\t\n\t// Triangle123\n\tfloat32 n123 = b2Cross(e12, e13);\n\n\tfloat32 d123_1 = n123 * b2Cross(w2, w3);\n\tfloat32 d123_2 = n123 * b2Cross(w3, w1);\n\tfloat32 d123_3 = n123 * b2Cross(w1, w2);\n\n\t// w1 region\n\tif (d12_2 <= 0.0f && d13_2 <= 0.0f)\n\t{\n\t\tm_v1.a = 1.0f;\n\t\tm_count = 1;\n\t\treturn;\n\t}\n\n\t// e12\n\tif (d12_1 > 0.0f && d12_2 > 0.0f && d123_3 <= 0.0f)\n\t{\n\t\tfloat32 inv_d12 = 1.0f / (d12_1 + d12_2);\n\t\tm_v1.a = d12_1 * inv_d12;\n\t\tm_v2.a = d12_2 * inv_d12;\n\t\tm_count = 2;\n\t\treturn;\n\t}\n\n\t// e13\n\tif (d13_1 > 0.0f && d13_2 > 0.0f && d123_2 <= 0.0f)\n\t{\n\t\tfloat32 inv_d13 = 1.0f / (d13_1 + d13_2);\n\t\tm_v1.a = d13_1 * inv_d13;\n\t\tm_v3.a = d13_2 * inv_d13;\n\t\tm_count = 2;\n\t\tm_v2 = m_v3;\n\t\treturn;\n\t}\n\n\t// w2 region\n\tif (d12_1 <= 0.0f && d23_2 <= 0.0f)\n\t{\n\t\tm_v2.a = 1.0f;\n\t\tm_count = 1;\n\t\tm_v1 = m_v2;\n\t\treturn;\n\t}\n\n\t// w3 region\n\tif (d13_1 <= 0.0f && d23_1 <= 0.0f)\n\t{\n\t\tm_v3.a = 1.0f;\n\t\tm_count = 1;\n\t\tm_v1 = m_v3;\n\t\treturn;\n\t}\n\n\t// e23\n\tif (d23_1 > 0.0f && d23_2 > 0.0f && d123_1 <= 0.0f)\n\t{\n\t\tfloat32 inv_d23 = 1.0f / (d23_1 + d23_2);\n\t\tm_v2.a = d23_1 * inv_d23;\n\t\tm_v3.a = d23_2 * inv_d23;\n\t\tm_count = 2;\n\t\tm_v1 = m_v3;\n\t\treturn;\n\t}\n\n\t// Must be in triangle123\n\tfloat32 inv_d123 = 1.0f / (d123_1 + d123_2 + d123_3);\n\tm_v1.a = d123_1 * inv_d123;\n\tm_v2.a = d123_2 * inv_d123;\n\tm_v3.a = d123_3 * inv_d123;\n\tm_count = 3;\n}\n\nvoid b2Distance(b2DistanceOutput* output,\n\t\t\t\tb2SimplexCache* cache,\n\t\t\t\tconst b2DistanceInput* input)\n{\n\t++b2_gjkCalls;\n\n\tconst b2DistanceProxy* proxyA = &input->proxyA;\n\tconst b2DistanceProxy* proxyB = &input->proxyB;\n\n\tb2Transform transformA = input->transformA;\n\tb2Transform transformB = input->transformB;\n\n\t// Initialize the simplex.\n\tb2Simplex simplex;\n\tsimplex.ReadCache(cache, proxyA, transformA, proxyB, transformB);\n\n\t// Get simplex vertices as an array.\n\tb2SimplexVertex* vertices = &simplex.m_v1;\n\tconst int32 k_maxIters = 20;\n\n\t// These store the vertices of the last simplex so that we\n\t// can check for duplicates and prevent cycling.\n\tint32 saveA[3], saveB[3];\n\tint32 saveCount = 0;\n\n\tfloat32 distanceSqr1 = b2_maxFloat;\n\tfloat32 distanceSqr2 = distanceSqr1;\n\n\t// Main iteration loop.\n\tint32 iter = 0;\n\twhile (iter < k_maxIters)\n\t{\n\t\t// Copy simplex so we can identify duplicates.\n\t\tsaveCount = simplex.m_count;\n\t\tfor (int32 i = 0; i < saveCount; ++i)\n\t\t{\n\t\t\tsaveA[i] = vertices[i].indexA;\n\t\t\tsaveB[i] = vertices[i].indexB;\n\t\t}\n\n\t\tswitch (simplex.m_count)\n\t\t{\n\t\tcase 1:\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tsimplex.Solve2();\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tsimplex.Solve3();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tb2Assert(false);\n\t\t}\n\n\t\t// If we have 3 points, then the origin is in the corresponding triangle.\n\t\tif (simplex.m_count == 3)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\n\t\t// Compute closest point.\n\t\tb2Vec2 p = simplex.GetClosestPoint();\n\t\tdistanceSqr2 = p.LengthSquared();\n\n\t\t// Ensure progress\n\t\tif (distanceSqr2 >= distanceSqr1)\n\t\t{\n\t\t\t//break;\n\t\t}\n\t\tdistanceSqr1 = distanceSqr2;\n\n\t\t// Get search direction.\n\t\tb2Vec2 d = simplex.GetSearchDirection();\n\n\t\t// Ensure the search direction is numerically fit.\n\t\tif (d.LengthSquared() < b2_epsilon * b2_epsilon)\n\t\t{\n\t\t\t// The origin is probably contained by a line segment\n\t\t\t// or triangle. Thus the shapes are overlapped.\n\n\t\t\t// We can't return zero here even though there may be overlap.\n\t\t\t// In case the simplex is a point, segment, or triangle it is difficult\n\t\t\t// to determine if the origin is contained in the CSO or very close to it.\n\t\t\tbreak;\n\t\t}\n\n\t\t// Compute a tentative new simplex vertex using support points.\n\t\tb2SimplexVertex* vertex = vertices + simplex.m_count;\n\t\tvertex->indexA = proxyA->GetSupport(b2MulT(transformA.q, -d));\n\t\tvertex->wA = b2Mul(transformA, proxyA->GetVertex(vertex->indexA));\n\t\tb2Vec2 wBLocal;\n\t\tvertex->indexB = proxyB->GetSupport(b2MulT(transformB.q, d));\n\t\tvertex->wB = b2Mul(transformB, proxyB->GetVertex(vertex->indexB));\n\t\tvertex->w = vertex->wB - vertex->wA;\n\n\t\t// Iteration count is equated to the number of support point calls.\n\t\t++iter;\n\t\t++b2_gjkIters;\n\n\t\t// Check for duplicate support points. This is the main termination criteria.\n\t\tbool duplicate = false;\n\t\tfor (int32 i = 0; i < saveCount; ++i)\n\t\t{\n\t\t\tif (vertex->indexA == saveA[i] && vertex->indexB == saveB[i])\n\t\t\t{\n\t\t\t\tduplicate = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If we found a duplicate support point we must exit to avoid cycling.\n\t\tif (duplicate)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\n\t\t// New vertex is ok and needed.\n\t\t++simplex.m_count;\n\t}\n\n\tb2_gjkMaxIters = b2Max(b2_gjkMaxIters, iter);\n\n\t// Prepare output.\n\tsimplex.GetWitnessPoints(&output->pointA, &output->pointB);\n\toutput->distance = b2Distance(output->pointA, output->pointB);\n\toutput->iterations = iter;\n\n\t// Cache the simplex.\n\tsimplex.WriteCache(cache);\n\n\t// Apply radii if requested.\n\tif (input->useRadii)\n\t{\n\t\tfloat32 rA = proxyA->m_radius;\n\t\tfloat32 rB = proxyB->m_radius;\n\n\t\tif (output->distance > rA + rB && output->distance > b2_epsilon)\n\t\t{\n\t\t\t// Shapes are still no overlapped.\n\t\t\t// Move the witness points to the outer surface.\n\t\t\toutput->distance -= rA + rB;\n\t\t\tb2Vec2 normal = output->pointB - output->pointA;\n\t\t\tnormal.Normalize();\n\t\t\toutput->pointA += rA * normal;\n\t\t\toutput->pointB -= rB * normal;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Shapes are overlapped when radii are considered.\n\t\t\t// Move the witness points to the middle.\n\t\t\tb2Vec2 p = 0.5f * (output->pointA + output->pointB);\n\t\t\toutput->pointA = p;\n\t\t\toutput->pointB = p;\n\t\t\toutput->distance = 0.0f;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2Distance.h",
    "content": "\n/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_DISTANCE_H\n#define B2_DISTANCE_H\n\n#include <Box2D/Common/b2Math.h>\n\nclass b2Shape;\n\n/// A distance proxy is used by the GJK algorithm.\n/// It encapsulates any shape.\nstruct b2DistanceProxy\n{\n\tb2DistanceProxy() : m_vertices(NULL), m_count(0), m_radius(0.0f) {}\n\n\t/// Initialize the proxy using the given shape. The shape\n\t/// must remain in scope while the proxy is in use.\n\tvoid Set(const b2Shape* shape, int32 index);\n\n\t/// Get the supporting vertex index in the given direction.\n\tint32 GetSupport(const b2Vec2& d) const;\n\n\t/// Get the supporting vertex in the given direction.\n\tconst b2Vec2& GetSupportVertex(const b2Vec2& d) const;\n\n\t/// Get the vertex count.\n\tint32 GetVertexCount() const;\n\n\t/// Get a vertex by index. Used by b2Distance.\n\tconst b2Vec2& GetVertex(int32 index) const;\n\n\tb2Vec2 m_buffer[2];\n\tconst b2Vec2* m_vertices;\n\tint32 m_count;\n\tfloat32 m_radius;\n};\n\n/// Used to warm start b2Distance.\n/// Set count to zero on first call.\nstruct b2SimplexCache\n{\n\tfloat32 metric;\t\t///< length or area\n\tuint16 count;\n\tuint8 indexA[3];\t///< vertices on shape A\n\tuint8 indexB[3];\t///< vertices on shape B\n};\n\n/// Input for b2Distance.\n/// You have to option to use the shape radii\n/// in the computation. Even \nstruct b2DistanceInput\n{\n\tb2DistanceProxy proxyA;\n\tb2DistanceProxy proxyB;\n\tb2Transform transformA;\n\tb2Transform transformB;\n\tbool useRadii;\n};\n\n/// Output for b2Distance.\nstruct b2DistanceOutput\n{\n\tb2Vec2 pointA;\t\t///< closest point on shapeA\n\tb2Vec2 pointB;\t\t///< closest point on shapeB\n\tfloat32 distance;\n\tint32 iterations;\t///< number of GJK iterations used\n};\n\n/// Compute the closest points between two shapes. Supports any combination of:\n/// b2CircleShape, b2PolygonShape, b2EdgeShape. The simplex cache is input/output.\n/// On the first call set b2SimplexCache.count to zero.\nvoid b2Distance(b2DistanceOutput* output,\n\t\t\t\tb2SimplexCache* cache, \n\t\t\t\tconst b2DistanceInput* input);\n\n\n//////////////////////////////////////////////////////////////////////////\n\ninline int32 b2DistanceProxy::GetVertexCount() const\n{\n\treturn m_count;\n}\n\ninline const b2Vec2& b2DistanceProxy::GetVertex(int32 index) const\n{\n\tb2Assert(0 <= index && index < m_count);\n\treturn m_vertices[index];\n}\n\ninline int32 b2DistanceProxy::GetSupport(const b2Vec2& d) const\n{\n\tint32 bestIndex = 0;\n\tfloat32 bestValue = b2Dot(m_vertices[0], d);\n\tfor (int32 i = 1; i < m_count; ++i)\n\t{\n\t\tfloat32 value = b2Dot(m_vertices[i], d);\n\t\tif (value > bestValue)\n\t\t{\n\t\t\tbestIndex = i;\n\t\t\tbestValue = value;\n\t\t}\n\t}\n\n\treturn bestIndex;\n}\n\ninline const b2Vec2& b2DistanceProxy::GetSupportVertex(const b2Vec2& d) const\n{\n\tint32 bestIndex = 0;\n\tfloat32 bestValue = b2Dot(m_vertices[0], d);\n\tfor (int32 i = 1; i < m_count; ++i)\n\t{\n\t\tfloat32 value = b2Dot(m_vertices[i], d);\n\t\tif (value > bestValue)\n\t\t{\n\t\t\tbestIndex = i;\n\t\t\tbestValue = value;\n\t\t}\n\t}\n\n\treturn m_vertices[bestIndex];\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2DynamicTree.cpp",
    "content": "/*\n* Copyright (c) 2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/b2DynamicTree.h>\n#include <memory.h>\n\nb2DynamicTree::b2DynamicTree()\n{\n\tm_root = b2_nullNode;\n\n\tm_nodeCapacity = 16;\n\tm_nodeCount = 0;\n\tm_nodes = (b2TreeNode*)b2Alloc(m_nodeCapacity * sizeof(b2TreeNode));\n\tmemset(m_nodes, 0, m_nodeCapacity * sizeof(b2TreeNode));\n\n\t// Build a linked list for the free list.\n\tfor (int32 i = 0; i < m_nodeCapacity - 1; ++i)\n\t{\n\t\tm_nodes[i].next = i + 1;\n\t\tm_nodes[i].height = -1;\n\t}\n\tm_nodes[m_nodeCapacity-1].next = b2_nullNode;\n\tm_nodes[m_nodeCapacity-1].height = -1;\n\tm_freeList = 0;\n\n\tm_path = 0;\n\n\tm_insertionCount = 0;\n}\n\nb2DynamicTree::~b2DynamicTree()\n{\n\t// This frees the entire tree in one shot.\n\tb2Free(m_nodes);\n}\n\n// Allocate a node from the pool. Grow the pool if necessary.\nint32 b2DynamicTree::AllocateNode()\n{\n\t// Expand the node pool as needed.\n\tif (m_freeList == b2_nullNode)\n\t{\n\t\tb2Assert(m_nodeCount == m_nodeCapacity);\n\n\t\t// The free list is empty. Rebuild a bigger pool.\n\t\tb2TreeNode* oldNodes = m_nodes;\n\t\tm_nodeCapacity *= 2;\n\t\tm_nodes = (b2TreeNode*)b2Alloc(m_nodeCapacity * sizeof(b2TreeNode));\n\t\tmemcpy(m_nodes, oldNodes, m_nodeCount * sizeof(b2TreeNode));\n\t\tb2Free(oldNodes);\n\n\t\t// Build a linked list for the free list. The parent\n\t\t// pointer becomes the \"next\" pointer.\n\t\tfor (int32 i = m_nodeCount; i < m_nodeCapacity - 1; ++i)\n\t\t{\n\t\t\tm_nodes[i].next = i + 1;\n\t\t\tm_nodes[i].height = -1;\n\t\t}\n\t\tm_nodes[m_nodeCapacity-1].next = b2_nullNode;\n\t\tm_nodes[m_nodeCapacity-1].height = -1;\n\t\tm_freeList = m_nodeCount;\n\t}\n\n\t// Peel a node off the free list.\n\tint32 nodeId = m_freeList;\n\tm_freeList = m_nodes[nodeId].next;\n\tm_nodes[nodeId].parent = b2_nullNode;\n\tm_nodes[nodeId].child1 = b2_nullNode;\n\tm_nodes[nodeId].child2 = b2_nullNode;\n\tm_nodes[nodeId].height = 0;\n\tm_nodes[nodeId].userData = NULL;\n\t++m_nodeCount;\n\treturn nodeId;\n}\n\n// Return a node to the pool.\nvoid b2DynamicTree::FreeNode(int32 nodeId)\n{\n\tb2Assert(0 <= nodeId && nodeId < m_nodeCapacity);\n\tb2Assert(0 < m_nodeCount);\n\tm_nodes[nodeId].next = m_freeList;\n\tm_nodes[nodeId].height = -1;\n\tm_freeList = nodeId;\n\t--m_nodeCount;\n}\n\n// Create a proxy in the tree as a leaf node. We return the index\n// of the node instead of a pointer so that we can grow\n// the node pool.\nint32 b2DynamicTree::CreateProxy(const b2AABB& aabb, void* userData)\n{\n\tint32 proxyId = AllocateNode();\n\n\t// Fatten the aabb.\n\tb2Vec2 r(b2_aabbExtension, b2_aabbExtension);\n\tm_nodes[proxyId].aabb.lowerBound = aabb.lowerBound - r;\n\tm_nodes[proxyId].aabb.upperBound = aabb.upperBound + r;\n\tm_nodes[proxyId].userData = userData;\n\tm_nodes[proxyId].height = 0;\n\n\tInsertLeaf(proxyId);\n\n\treturn proxyId;\n}\n\nvoid b2DynamicTree::DestroyProxy(int32 proxyId)\n{\n\tb2Assert(0 <= proxyId && proxyId < m_nodeCapacity);\n\tb2Assert(m_nodes[proxyId].IsLeaf());\n\n\tRemoveLeaf(proxyId);\n\tFreeNode(proxyId);\n}\n\nbool b2DynamicTree::MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement)\n{\n\tb2Assert(0 <= proxyId && proxyId < m_nodeCapacity);\n\n\tb2Assert(m_nodes[proxyId].IsLeaf());\n\n\tif (m_nodes[proxyId].aabb.Contains(aabb))\n\t{\n\t\treturn false;\n\t}\n\n\tRemoveLeaf(proxyId);\n\n\t// Extend AABB.\n\tb2AABB b = aabb;\n\tb2Vec2 r(b2_aabbExtension, b2_aabbExtension);\n\tb.lowerBound = b.lowerBound - r;\n\tb.upperBound = b.upperBound + r;\n\n\t// Predict AABB displacement.\n\tb2Vec2 d = b2_aabbMultiplier * displacement;\n\n\tif (d.x < 0.0f)\n\t{\n\t\tb.lowerBound.x += d.x;\n\t}\n\telse\n\t{\n\t\tb.upperBound.x += d.x;\n\t}\n\n\tif (d.y < 0.0f)\n\t{\n\t\tb.lowerBound.y += d.y;\n\t}\n\telse\n\t{\n\t\tb.upperBound.y += d.y;\n\t}\n\n\tm_nodes[proxyId].aabb = b;\n\n\tInsertLeaf(proxyId);\n\treturn true;\n}\n\nvoid b2DynamicTree::InsertLeaf(int32 leaf)\n{\n\t++m_insertionCount;\n\n\tif (m_root == b2_nullNode)\n\t{\n\t\tm_root = leaf;\n\t\tm_nodes[m_root].parent = b2_nullNode;\n\t\treturn;\n\t}\n\n\t// Find the best sibling for this node\n\tb2AABB leafAABB = m_nodes[leaf].aabb;\n\tint32 index = m_root;\n\twhile (m_nodes[index].IsLeaf() == false)\n\t{\n\t\tint32 child1 = m_nodes[index].child1;\n\t\tint32 child2 = m_nodes[index].child2;\n\n\t\tfloat32 area = m_nodes[index].aabb.GetPerimeter();\n\n\t\tb2AABB combinedAABB;\n\t\tcombinedAABB.Combine(m_nodes[index].aabb, leafAABB);\n\t\tfloat32 combinedArea = combinedAABB.GetPerimeter();\n\n\t\t// Cost of creating a new parent for this node and the new leaf\n\t\tfloat32 cost = 2.0f * combinedArea;\n\n\t\t// Minimum cost of pushing the leaf further down the tree\n\t\tfloat32 inheritanceCost = 2.0f * (combinedArea - area);\n\n\t\t// Cost of descending into child1\n\t\tfloat32 cost1;\n\t\tif (m_nodes[child1].IsLeaf())\n\t\t{\n\t\t\tb2AABB aabb;\n\t\t\taabb.Combine(leafAABB, m_nodes[child1].aabb);\n\t\t\tcost1 = aabb.GetPerimeter() + inheritanceCost;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tb2AABB aabb;\n\t\t\taabb.Combine(leafAABB, m_nodes[child1].aabb);\n\t\t\tfloat32 oldArea = m_nodes[child1].aabb.GetPerimeter();\n\t\t\tfloat32 newArea = aabb.GetPerimeter();\n\t\t\tcost1 = (newArea - oldArea) + inheritanceCost;\n\t\t}\n\n\t\t// Cost of descending into child2\n\t\tfloat32 cost2;\n\t\tif (m_nodes[child2].IsLeaf())\n\t\t{\n\t\t\tb2AABB aabb;\n\t\t\taabb.Combine(leafAABB, m_nodes[child2].aabb);\n\t\t\tcost2 = aabb.GetPerimeter() + inheritanceCost;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tb2AABB aabb;\n\t\t\taabb.Combine(leafAABB, m_nodes[child2].aabb);\n\t\t\tfloat32 oldArea = m_nodes[child2].aabb.GetPerimeter();\n\t\t\tfloat32 newArea = aabb.GetPerimeter();\n\t\t\tcost2 = newArea - oldArea + inheritanceCost;\n\t\t}\n\n\t\t// Descend according to the minimum cost.\n\t\tif (cost < cost1 && cost < cost2)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\n\t\t// Descend\n\t\tif (cost1 < cost2)\n\t\t{\n\t\t\tindex = child1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tindex = child2;\n\t\t}\n\t}\n\n\tint32 sibling = index;\n\n\t// Create a new parent.\n\tint32 oldParent = m_nodes[sibling].parent;\n\tint32 newParent = AllocateNode();\n\tm_nodes[newParent].parent = oldParent;\n\tm_nodes[newParent].userData = NULL;\n\tm_nodes[newParent].aabb.Combine(leafAABB, m_nodes[sibling].aabb);\n\tm_nodes[newParent].height = m_nodes[sibling].height + 1;\n\n\tif (oldParent != b2_nullNode)\n\t{\n\t\t// The sibling was not the root.\n\t\tif (m_nodes[oldParent].child1 == sibling)\n\t\t{\n\t\t\tm_nodes[oldParent].child1 = newParent;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_nodes[oldParent].child2 = newParent;\n\t\t}\n\n\t\tm_nodes[newParent].child1 = sibling;\n\t\tm_nodes[newParent].child2 = leaf;\n\t\tm_nodes[sibling].parent = newParent;\n\t\tm_nodes[leaf].parent = newParent;\n\t}\n\telse\n\t{\n\t\t// The sibling was the root.\n\t\tm_nodes[newParent].child1 = sibling;\n\t\tm_nodes[newParent].child2 = leaf;\n\t\tm_nodes[sibling].parent = newParent;\n\t\tm_nodes[leaf].parent = newParent;\n\t\tm_root = newParent;\n\t}\n\n\t// Walk back up the tree fixing heights and AABBs\n\tindex = m_nodes[leaf].parent;\n\twhile (index != b2_nullNode)\n\t{\n\t\tindex = Balance(index);\n\n\t\tint32 child1 = m_nodes[index].child1;\n\t\tint32 child2 = m_nodes[index].child2;\n\n\t\tb2Assert(child1 != b2_nullNode);\n\t\tb2Assert(child2 != b2_nullNode);\n\n\t\tm_nodes[index].height = 1 + b2Max(m_nodes[child1].height, m_nodes[child2].height);\n\t\tm_nodes[index].aabb.Combine(m_nodes[child1].aabb, m_nodes[child2].aabb);\n\n\t\tindex = m_nodes[index].parent;\n\t}\n\n\t//Validate();\n}\n\nvoid b2DynamicTree::RemoveLeaf(int32 leaf)\n{\n\tif (leaf == m_root)\n\t{\n\t\tm_root = b2_nullNode;\n\t\treturn;\n\t}\n\n\tint32 parent = m_nodes[leaf].parent;\n\tint32 grandParent = m_nodes[parent].parent;\n\tint32 sibling;\n\tif (m_nodes[parent].child1 == leaf)\n\t{\n\t\tsibling = m_nodes[parent].child2;\n\t}\n\telse\n\t{\n\t\tsibling = m_nodes[parent].child1;\n\t}\n\n\tif (grandParent != b2_nullNode)\n\t{\n\t\t// Destroy parent and connect sibling to grandParent.\n\t\tif (m_nodes[grandParent].child1 == parent)\n\t\t{\n\t\t\tm_nodes[grandParent].child1 = sibling;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_nodes[grandParent].child2 = sibling;\n\t\t}\n\t\tm_nodes[sibling].parent = grandParent;\n\t\tFreeNode(parent);\n\n\t\t// Adjust ancestor bounds.\n\t\tint32 index = grandParent;\n\t\twhile (index != b2_nullNode)\n\t\t{\n\t\t\tindex = Balance(index);\n\n\t\t\tint32 child1 = m_nodes[index].child1;\n\t\t\tint32 child2 = m_nodes[index].child2;\n\n\t\t\tm_nodes[index].aabb.Combine(m_nodes[child1].aabb, m_nodes[child2].aabb);\n\t\t\tm_nodes[index].height = 1 + b2Max(m_nodes[child1].height, m_nodes[child2].height);\n\n\t\t\tindex = m_nodes[index].parent;\n\t\t}\n\t}\n\telse\n\t{\n\t\tm_root = sibling;\n\t\tm_nodes[sibling].parent = b2_nullNode;\n\t\tFreeNode(parent);\n\t}\n\n\t//Validate();\n}\n\n// Perform a left or right rotation if node A is imbalanced.\n// Returns the new root index.\nint32 b2DynamicTree::Balance(int32 iA)\n{\n\tb2Assert(iA != b2_nullNode);\n\n\tb2TreeNode* A = m_nodes + iA;\n\tif (A->IsLeaf() || A->height < 2)\n\t{\n\t\treturn iA;\n\t}\n\n\tint32 iB = A->child1;\n\tint32 iC = A->child2;\n\tb2Assert(0 <= iB && iB < m_nodeCapacity);\n\tb2Assert(0 <= iC && iC < m_nodeCapacity);\n\n\tb2TreeNode* B = m_nodes + iB;\n\tb2TreeNode* C = m_nodes + iC;\n\n\tint32 balance = C->height - B->height;\n\n\t// Rotate C up\n\tif (balance > 1)\n\t{\n\t\tint32 iF = C->child1;\n\t\tint32 iG = C->child2;\n\t\tb2TreeNode* F = m_nodes + iF;\n\t\tb2TreeNode* G = m_nodes + iG;\n\t\tb2Assert(0 <= iF && iF < m_nodeCapacity);\n\t\tb2Assert(0 <= iG && iG < m_nodeCapacity);\n\n\t\t// Swap A and C\n\t\tC->child1 = iA;\n\t\tC->parent = A->parent;\n\t\tA->parent = iC;\n\n\t\t// A's old parent should point to C\n\t\tif (C->parent != b2_nullNode)\n\t\t{\n\t\t\tif (m_nodes[C->parent].child1 == iA)\n\t\t\t{\n\t\t\t\tm_nodes[C->parent].child1 = iC;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tb2Assert(m_nodes[C->parent].child2 == iA);\n\t\t\t\tm_nodes[C->parent].child2 = iC;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_root = iC;\n\t\t}\n\n\t\t// Rotate\n\t\tif (F->height > G->height)\n\t\t{\n\t\t\tC->child2 = iF;\n\t\t\tA->child2 = iG;\n\t\t\tG->parent = iA;\n\t\t\tA->aabb.Combine(B->aabb, G->aabb);\n\t\t\tC->aabb.Combine(A->aabb, F->aabb);\n\n\t\t\tA->height = 1 + b2Max(B->height, G->height);\n\t\t\tC->height = 1 + b2Max(A->height, F->height);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tC->child2 = iG;\n\t\t\tA->child2 = iF;\n\t\t\tF->parent = iA;\n\t\t\tA->aabb.Combine(B->aabb, F->aabb);\n\t\t\tC->aabb.Combine(A->aabb, G->aabb);\n\n\t\t\tA->height = 1 + b2Max(B->height, F->height);\n\t\t\tC->height = 1 + b2Max(A->height, G->height);\n\t\t}\n\n\t\treturn iC;\n\t}\n\t\n\t// Rotate B up\n\tif (balance < -1)\n\t{\n\t\tint32 iD = B->child1;\n\t\tint32 iE = B->child2;\n\t\tb2TreeNode* D = m_nodes + iD;\n\t\tb2TreeNode* E = m_nodes + iE;\n\t\tb2Assert(0 <= iD && iD < m_nodeCapacity);\n\t\tb2Assert(0 <= iE && iE < m_nodeCapacity);\n\n\t\t// Swap A and B\n\t\tB->child1 = iA;\n\t\tB->parent = A->parent;\n\t\tA->parent = iB;\n\n\t\t// A's old parent should point to B\n\t\tif (B->parent != b2_nullNode)\n\t\t{\n\t\t\tif (m_nodes[B->parent].child1 == iA)\n\t\t\t{\n\t\t\t\tm_nodes[B->parent].child1 = iB;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tb2Assert(m_nodes[B->parent].child2 == iA);\n\t\t\t\tm_nodes[B->parent].child2 = iB;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_root = iB;\n\t\t}\n\n\t\t// Rotate\n\t\tif (D->height > E->height)\n\t\t{\n\t\t\tB->child2 = iD;\n\t\t\tA->child1 = iE;\n\t\t\tE->parent = iA;\n\t\t\tA->aabb.Combine(C->aabb, E->aabb);\n\t\t\tB->aabb.Combine(A->aabb, D->aabb);\n\n\t\t\tA->height = 1 + b2Max(C->height, E->height);\n\t\t\tB->height = 1 + b2Max(A->height, D->height);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tB->child2 = iE;\n\t\t\tA->child1 = iD;\n\t\t\tD->parent = iA;\n\t\t\tA->aabb.Combine(C->aabb, D->aabb);\n\t\t\tB->aabb.Combine(A->aabb, E->aabb);\n\n\t\t\tA->height = 1 + b2Max(C->height, D->height);\n\t\t\tB->height = 1 + b2Max(A->height, E->height);\n\t\t}\n\n\t\treturn iB;\n\t}\n\n\treturn iA;\n}\n\nint32 b2DynamicTree::GetHeight() const\n{\n\tif (m_root == b2_nullNode)\n\t{\n\t\treturn 0;\n\t}\n\n\treturn m_nodes[m_root].height;\n}\n\n//\nfloat32 b2DynamicTree::GetAreaRatio() const\n{\n\tif (m_root == b2_nullNode)\n\t{\n\t\treturn 0.0f;\n\t}\n\n\tconst b2TreeNode* root = m_nodes + m_root;\n\tfloat32 rootArea = root->aabb.GetPerimeter();\n\n\tfloat32 totalArea = 0.0f;\n\tfor (int32 i = 0; i < m_nodeCapacity; ++i)\n\t{\n\t\tconst b2TreeNode* node = m_nodes + i;\n\t\tif (node->height < 0)\n\t\t{\n\t\t\t// Free node in pool\n\t\t\tcontinue;\n\t\t}\n\n\t\ttotalArea += node->aabb.GetPerimeter();\n\t}\n\n\treturn totalArea / rootArea;\n}\n\n// Compute the height of a sub-tree.\nint32 b2DynamicTree::ComputeHeight(int32 nodeId) const\n{\n\tb2Assert(0 <= nodeId && nodeId < m_nodeCapacity);\n\tb2TreeNode* node = m_nodes + nodeId;\n\n\tif (node->IsLeaf())\n\t{\n\t\treturn 0;\n\t}\n\n\tint32 height1 = ComputeHeight(node->child1);\n\tint32 height2 = ComputeHeight(node->child2);\n\treturn 1 + b2Max(height1, height2);\n}\n\nint32 b2DynamicTree::ComputeHeight() const\n{\n\tint32 height = ComputeHeight(m_root);\n\treturn height;\n}\n\nvoid b2DynamicTree::ValidateStructure(int32 index) const\n{\n\tif (index == b2_nullNode)\n\t{\n\t\treturn;\n\t}\n\n\tif (index == m_root)\n\t{\n\t\tb2Assert(m_nodes[index].parent == b2_nullNode);\n\t}\n\n\tconst b2TreeNode* node = m_nodes + index;\n\n\tint32 child1 = node->child1;\n\tint32 child2 = node->child2;\n\n\tif (node->IsLeaf())\n\t{\n\t\tb2Assert(child1 == b2_nullNode);\n\t\tb2Assert(child2 == b2_nullNode);\n\t\tb2Assert(node->height == 0);\n\t\treturn;\n\t}\n\n\tb2Assert(0 <= child1 && child1 < m_nodeCapacity);\n\tb2Assert(0 <= child2 && child2 < m_nodeCapacity);\n\n\tb2Assert(m_nodes[child1].parent == index);\n\tb2Assert(m_nodes[child2].parent == index);\n\n\tValidateStructure(child1);\n\tValidateStructure(child2);\n}\n\nvoid b2DynamicTree::ValidateMetrics(int32 index) const\n{\n\tif (index == b2_nullNode)\n\t{\n\t\treturn;\n\t}\n\n\tconst b2TreeNode* node = m_nodes + index;\n\n\tint32 child1 = node->child1;\n\tint32 child2 = node->child2;\n\n\tif (node->IsLeaf())\n\t{\n\t\tb2Assert(child1 == b2_nullNode);\n\t\tb2Assert(child2 == b2_nullNode);\n\t\tb2Assert(node->height == 0);\n\t\treturn;\n\t}\n\n\tb2Assert(0 <= child1 && child1 < m_nodeCapacity);\n\tb2Assert(0 <= child2 && child2 < m_nodeCapacity);\n\n\tint32 height1 = m_nodes[child1].height;\n\tint32 height2 = m_nodes[child2].height;\n\tint32 height;\n\theight = 1 + b2Max(height1, height2);\n\tb2Assert(node->height == height);\n\n\tb2AABB aabb;\n\taabb.Combine(m_nodes[child1].aabb, m_nodes[child2].aabb);\n\n\tb2Assert(aabb.lowerBound == node->aabb.lowerBound);\n\tb2Assert(aabb.upperBound == node->aabb.upperBound);\n\n\tValidateMetrics(child1);\n\tValidateMetrics(child2);\n}\n\nvoid b2DynamicTree::Validate() const\n{\n\tValidateStructure(m_root);\n\tValidateMetrics(m_root);\n\n\tint32 freeCount = 0;\n\tint32 freeIndex = m_freeList;\n\twhile (freeIndex != b2_nullNode)\n\t{\n\t\tb2Assert(0 <= freeIndex && freeIndex < m_nodeCapacity);\n\t\tfreeIndex = m_nodes[freeIndex].next;\n\t\t++freeCount;\n\t}\n\n\tb2Assert(GetHeight() == ComputeHeight());\n\n\tb2Assert(m_nodeCount + freeCount == m_nodeCapacity);\n}\n\nint32 b2DynamicTree::GetMaxBalance() const\n{\n\tint32 maxBalance = 0;\n\tfor (int32 i = 0; i < m_nodeCapacity; ++i)\n\t{\n\t\tconst b2TreeNode* node = m_nodes + i;\n\t\tif (node->height <= 1)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tb2Assert(node->IsLeaf() == false);\n\n\t\tint32 child1 = node->child1;\n\t\tint32 child2 = node->child2;\n\t\tint32 balance = b2Abs(m_nodes[child2].height - m_nodes[child1].height);\n\t\tmaxBalance = b2Max(maxBalance, balance);\n\t}\n\n\treturn maxBalance;\n}\n\nvoid b2DynamicTree::RebuildBottomUp()\n{\n\tint32* nodes = (int32*)b2Alloc(m_nodeCount * sizeof(int32));\n\tint32 count = 0;\n\n\t// Build array of leaves. Free the rest.\n\tfor (int32 i = 0; i < m_nodeCapacity; ++i)\n\t{\n\t\tif (m_nodes[i].height < 0)\n\t\t{\n\t\t\t// free node in pool\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (m_nodes[i].IsLeaf())\n\t\t{\n\t\t\tm_nodes[i].parent = b2_nullNode;\n\t\t\tnodes[count] = i;\n\t\t\t++count;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFreeNode(i);\n\t\t}\n\t}\n\n\twhile (count > 1)\n\t{\n\t\tfloat32 minCost = b2_maxFloat;\n\t\tint32 iMin = -1, jMin = -1;\n\t\tfor (int32 i = 0; i < count; ++i)\n\t\t{\n\t\t\tb2AABB aabbi = m_nodes[nodes[i]].aabb;\n\n\t\t\tfor (int32 j = i + 1; j < count; ++j)\n\t\t\t{\n\t\t\t\tb2AABB aabbj = m_nodes[nodes[j]].aabb;\n\t\t\t\tb2AABB b;\n\t\t\t\tb.Combine(aabbi, aabbj);\n\t\t\t\tfloat32 cost = b.GetPerimeter();\n\t\t\t\tif (cost < minCost)\n\t\t\t\t{\n\t\t\t\t\tiMin = i;\n\t\t\t\t\tjMin = j;\n\t\t\t\t\tminCost = cost;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint32 index1 = nodes[iMin];\n\t\tint32 index2 = nodes[jMin];\n\t\tb2TreeNode* child1 = m_nodes + index1;\n\t\tb2TreeNode* child2 = m_nodes + index2;\n\n\t\tint32 parentIndex = AllocateNode();\n\t\tb2TreeNode* parent = m_nodes + parentIndex;\n\t\tparent->child1 = index1;\n\t\tparent->child2 = index2;\n\t\tparent->height = 1 + b2Max(child1->height, child2->height);\n\t\tparent->aabb.Combine(child1->aabb, child2->aabb);\n\t\tparent->parent = b2_nullNode;\n\n\t\tchild1->parent = parentIndex;\n\t\tchild2->parent = parentIndex;\n\n\t\tnodes[jMin] = nodes[count-1];\n\t\tnodes[iMin] = parentIndex;\n\t\t--count;\n\t}\n\n\tm_root = nodes[0];\n\tb2Free(nodes);\n\n\tValidate();\n}\n\nvoid b2DynamicTree::ShiftOrigin(const b2Vec2& newOrigin)\n{\n\t// Build array of leaves. Free the rest.\n\tfor (int32 i = 0; i < m_nodeCapacity; ++i)\n\t{\n\t\tm_nodes[i].aabb.lowerBound -= newOrigin;\n\t\tm_nodes[i].aabb.upperBound -= newOrigin;\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2DynamicTree.h",
    "content": "/*\n* Copyright (c) 2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_DYNAMIC_TREE_H\n#define B2_DYNAMIC_TREE_H\n\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Common/b2GrowableStack.h>\n\n#define b2_nullNode (-1)\n\n/// A node in the dynamic tree. The client does not interact with this directly.\nstruct b2TreeNode\n{\n\tbool IsLeaf() const\n\t{\n\t\treturn child1 == b2_nullNode;\n\t}\n\n\t/// Enlarged AABB\n\tb2AABB aabb;\n\n\tvoid* userData;\n\n\tunion\n\t{\n\t\tint32 parent;\n\t\tint32 next;\n\t};\n\n\tint32 child1;\n\tint32 child2;\n\n\t// leaf = 0, free node = -1\n\tint32 height;\n};\n\n/// A dynamic AABB tree broad-phase, inspired by Nathanael Presson's btDbvt.\n/// A dynamic tree arranges data in a binary tree to accelerate\n/// queries such as volume queries and ray casts. Leafs are proxies\n/// with an AABB. In the tree we expand the proxy AABB by b2_fatAABBFactor\n/// so that the proxy AABB is bigger than the client object. This allows the client\n/// object to move by small amounts without triggering a tree update.\n///\n/// Nodes are pooled and relocatable, so we use node indices rather than pointers.\nclass b2DynamicTree\n{\npublic:\n\t/// Constructing the tree initializes the node pool.\n\tb2DynamicTree();\n\n\t/// Destroy the tree, freeing the node pool.\n\t~b2DynamicTree();\n\n\t/// Create a proxy. Provide a tight fitting AABB and a userData pointer.\n\tint32 CreateProxy(const b2AABB& aabb, void* userData);\n\n\t/// Destroy a proxy. This asserts if the id is invalid.\n\tvoid DestroyProxy(int32 proxyId);\n\n\t/// Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB,\n\t/// then the proxy is removed from the tree and re-inserted. Otherwise\n\t/// the function returns immediately.\n\t/// @return true if the proxy was re-inserted.\n\tbool MoveProxy(int32 proxyId, const b2AABB& aabb1, const b2Vec2& displacement);\n\n\t/// Get proxy user data.\n\t/// @return the proxy user data or 0 if the id is invalid.\n\tvoid* GetUserData(int32 proxyId) const;\n\n\t/// Get the fat AABB for a proxy.\n\tconst b2AABB& GetFatAABB(int32 proxyId) const;\n\n\t/// Query an AABB for overlapping proxies. The callback class\n\t/// is called for each proxy that overlaps the supplied AABB.\n\ttemplate <typename T>\n\tvoid Query(T* callback, const b2AABB& aabb) const;\n\n\t/// Ray-cast against the proxies in the tree. This relies on the callback\n\t/// to perform a exact ray-cast in the case were the proxy contains a shape.\n\t/// The callback also performs the any collision filtering. This has performance\n\t/// roughly equal to k * log(n), where k is the number of collisions and n is the\n\t/// number of proxies in the tree.\n\t/// @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).\n\t/// @param callback a callback class that is called for each proxy that is hit by the ray.\n\ttemplate <typename T>\n\tvoid RayCast(T* callback, const b2RayCastInput& input) const;\n\n\t/// Validate this tree. For testing.\n\tvoid Validate() const;\n\n\t/// Compute the height of the binary tree in O(N) time. Should not be\n\t/// called often.\n\tint32 GetHeight() const;\n\n\t/// Get the maximum balance of an node in the tree. The balance is the difference\n\t/// in height of the two children of a node.\n\tint32 GetMaxBalance() const;\n\n\t/// Get the ratio of the sum of the node areas to the root area.\n\tfloat32 GetAreaRatio() const;\n\n\t/// Build an optimal tree. Very expensive. For testing.\n\tvoid RebuildBottomUp();\n\n\t/// Shift the world origin. Useful for large worlds.\n\t/// The shift formula is: position -= newOrigin\n\t/// @param newOrigin the new origin with respect to the old origin\n\tvoid ShiftOrigin(const b2Vec2& newOrigin);\n\nprivate:\n\n\tint32 AllocateNode();\n\tvoid FreeNode(int32 node);\n\n\tvoid InsertLeaf(int32 node);\n\tvoid RemoveLeaf(int32 node);\n\n\tint32 Balance(int32 index);\n\n\tint32 ComputeHeight() const;\n\tint32 ComputeHeight(int32 nodeId) const;\n\n\tvoid ValidateStructure(int32 index) const;\n\tvoid ValidateMetrics(int32 index) const;\n\n\tint32 m_root;\n\n\tb2TreeNode* m_nodes;\n\tint32 m_nodeCount;\n\tint32 m_nodeCapacity;\n\n\tint32 m_freeList;\n\n\t/// This is used to incrementally traverse the tree for re-balancing.\n\tuint32 m_path;\n\n\tint32 m_insertionCount;\n};\n\ninline void* b2DynamicTree::GetUserData(int32 proxyId) const\n{\n\tb2Assert(0 <= proxyId && proxyId < m_nodeCapacity);\n\treturn m_nodes[proxyId].userData;\n}\n\ninline const b2AABB& b2DynamicTree::GetFatAABB(int32 proxyId) const\n{\n\tb2Assert(0 <= proxyId && proxyId < m_nodeCapacity);\n\treturn m_nodes[proxyId].aabb;\n}\n\ntemplate <typename T>\ninline void b2DynamicTree::Query(T* callback, const b2AABB& aabb) const\n{\n\tb2GrowableStack<int32, 256> stack;\n\tstack.Push(m_root);\n\n\twhile (stack.GetCount() > 0)\n\t{\n\t\tint32 nodeId = stack.Pop();\n\t\tif (nodeId == b2_nullNode)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst b2TreeNode* node = m_nodes + nodeId;\n\n\t\tif (b2TestOverlap(node->aabb, aabb))\n\t\t{\n\t\t\tif (node->IsLeaf())\n\t\t\t{\n\t\t\t\tbool proceed = callback->QueryCallback(nodeId);\n\t\t\t\tif (proceed == false)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstack.Push(node->child1);\n\t\t\t\tstack.Push(node->child2);\n\t\t\t}\n\t\t}\n\t}\n}\n\ntemplate <typename T>\ninline void b2DynamicTree::RayCast(T* callback, const b2RayCastInput& input) const\n{\n\tb2Vec2 p1 = input.p1;\n\tb2Vec2 p2 = input.p2;\n\tb2Vec2 r = p2 - p1;\n\tb2Assert(r.LengthSquared() > 0.0f);\n\tr.Normalize();\n\n\t// v is perpendicular to the segment.\n\tb2Vec2 v = b2Cross(1.0f, r);\n\tb2Vec2 abs_v = b2Abs(v);\n\n\t// Separating axis for segment (Gino, p80).\n\t// |dot(v, p1 - c)| > dot(|v|, h)\n\n\tfloat32 maxFraction = input.maxFraction;\n\n\t// Build a bounding box for the segment.\n\tb2AABB segmentAABB;\n\t{\n\t\tb2Vec2 t = p1 + maxFraction * (p2 - p1);\n\t\tsegmentAABB.lowerBound = b2Min(p1, t);\n\t\tsegmentAABB.upperBound = b2Max(p1, t);\n\t}\n\n\tb2GrowableStack<int32, 256> stack;\n\tstack.Push(m_root);\n\n\twhile (stack.GetCount() > 0)\n\t{\n\t\tint32 nodeId = stack.Pop();\n\t\tif (nodeId == b2_nullNode)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst b2TreeNode* node = m_nodes + nodeId;\n\n\t\tif (b2TestOverlap(node->aabb, segmentAABB) == false)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Separating axis for segment (Gino, p80).\n\t\t// |dot(v, p1 - c)| > dot(|v|, h)\n\t\tb2Vec2 c = node->aabb.GetCenter();\n\t\tb2Vec2 h = node->aabb.GetExtents();\n\t\tfloat32 separation = b2Abs(b2Dot(v, p1 - c)) - b2Dot(abs_v, h);\n\t\tif (separation > 0.0f)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (node->IsLeaf())\n\t\t{\n\t\t\tb2RayCastInput subInput;\n\t\t\tsubInput.p1 = input.p1;\n\t\t\tsubInput.p2 = input.p2;\n\t\t\tsubInput.maxFraction = maxFraction;\n\n\t\t\tfloat32 value = callback->RayCastCallback(subInput, nodeId);\n\n\t\t\tif (value == 0.0f)\n\t\t\t{\n\t\t\t\t// The client has terminated the ray cast.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (value > 0.0f)\n\t\t\t{\n\t\t\t\t// Update segment bounding box.\n\t\t\t\tmaxFraction = value;\n\t\t\t\tb2Vec2 t = p1 + maxFraction * (p2 - p1);\n\t\t\t\tsegmentAABB.lowerBound = b2Min(p1, t);\n\t\t\t\tsegmentAABB.upperBound = b2Max(p1, t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstack.Push(node->child1);\n\t\t\tstack.Push(node->child2);\n\t\t}\n\t}\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2TimeOfImpact.cpp",
    "content": "/*\n* Copyright (c) 2007-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/b2Distance.h>\n#include <Box2D/Collision/b2TimeOfImpact.h>\n#include <Box2D/Collision/Shapes/b2CircleShape.h>\n#include <Box2D/Collision/Shapes/b2PolygonShape.h>\n#include <Box2D/Common/b2Timer.h>\n\n#include <stdio.h>\n\nfloat32 b2_toiTime, b2_toiMaxTime;\nint32 b2_toiCalls, b2_toiIters, b2_toiMaxIters;\nint32 b2_toiRootIters, b2_toiMaxRootIters;\n\n//\nstruct b2SeparationFunction\n{\n\tenum Type\n\t{\n\t\te_points,\n\t\te_faceA,\n\t\te_faceB\n\t};\n\n\t// TODO_ERIN might not need to return the separation\n\n\tfloat32 Initialize(const b2SimplexCache* cache,\n\t\tconst b2DistanceProxy* proxyA, const b2Sweep& sweepA,\n\t\tconst b2DistanceProxy* proxyB, const b2Sweep& sweepB,\n\t\tfloat32 t1)\n\t{\n\t\tm_proxyA = proxyA;\n\t\tm_proxyB = proxyB;\n\t\tint32 count = cache->count;\n\t\tb2Assert(0 < count && count < 3);\n\n\t\tm_sweepA = sweepA;\n\t\tm_sweepB = sweepB;\n\n\t\tb2Transform xfA, xfB;\n\t\tm_sweepA.GetTransform(&xfA, t1);\n\t\tm_sweepB.GetTransform(&xfB, t1);\n\n\t\tif (count == 1)\n\t\t{\n\t\t\tm_type = e_points;\n\t\t\tb2Vec2 localPointA = m_proxyA->GetVertex(cache->indexA[0]);\n\t\t\tb2Vec2 localPointB = m_proxyB->GetVertex(cache->indexB[0]);\n\t\t\tb2Vec2 pointA = b2Mul(xfA, localPointA);\n\t\t\tb2Vec2 pointB = b2Mul(xfB, localPointB);\n\t\t\tm_axis = pointB - pointA;\n\t\t\tfloat32 s = m_axis.Normalize();\n\t\t\treturn s;\n\t\t}\n\t\telse if (cache->indexA[0] == cache->indexA[1])\n\t\t{\n\t\t\t// Two points on B and one on A.\n\t\t\tm_type = e_faceB;\n\t\t\tb2Vec2 localPointB1 = proxyB->GetVertex(cache->indexB[0]);\n\t\t\tb2Vec2 localPointB2 = proxyB->GetVertex(cache->indexB[1]);\n\n\t\t\tm_axis = b2Cross(localPointB2 - localPointB1, 1.0f);\n\t\t\tm_axis.Normalize();\n\t\t\tb2Vec2 normal = b2Mul(xfB.q, m_axis);\n\n\t\t\tm_localPoint = 0.5f * (localPointB1 + localPointB2);\n\t\t\tb2Vec2 pointB = b2Mul(xfB, m_localPoint);\n\n\t\t\tb2Vec2 localPointA = proxyA->GetVertex(cache->indexA[0]);\n\t\t\tb2Vec2 pointA = b2Mul(xfA, localPointA);\n\n\t\t\tfloat32 s = b2Dot(pointA - pointB, normal);\n\t\t\tif (s < 0.0f)\n\t\t\t{\n\t\t\t\tm_axis = -m_axis;\n\t\t\t\ts = -s;\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Two points on A and one or two points on B.\n\t\t\tm_type = e_faceA;\n\t\t\tb2Vec2 localPointA1 = m_proxyA->GetVertex(cache->indexA[0]);\n\t\t\tb2Vec2 localPointA2 = m_proxyA->GetVertex(cache->indexA[1]);\n\t\t\t\n\t\t\tm_axis = b2Cross(localPointA2 - localPointA1, 1.0f);\n\t\t\tm_axis.Normalize();\n\t\t\tb2Vec2 normal = b2Mul(xfA.q, m_axis);\n\n\t\t\tm_localPoint = 0.5f * (localPointA1 + localPointA2);\n\t\t\tb2Vec2 pointA = b2Mul(xfA, m_localPoint);\n\n\t\t\tb2Vec2 localPointB = m_proxyB->GetVertex(cache->indexB[0]);\n\t\t\tb2Vec2 pointB = b2Mul(xfB, localPointB);\n\n\t\t\tfloat32 s = b2Dot(pointB - pointA, normal);\n\t\t\tif (s < 0.0f)\n\t\t\t{\n\t\t\t\tm_axis = -m_axis;\n\t\t\t\ts = -s;\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t}\n\n\t//\n\tfloat32 FindMinSeparation(int32* indexA, int32* indexB, float32 t) const\n\t{\n\t\tb2Transform xfA, xfB;\n\t\tm_sweepA.GetTransform(&xfA, t);\n\t\tm_sweepB.GetTransform(&xfB, t);\n\n\t\tswitch (m_type)\n\t\t{\n\t\tcase e_points:\n\t\t\t{\n\t\t\t\tb2Vec2 axisA = b2MulT(xfA.q,  m_axis);\n\t\t\t\tb2Vec2 axisB = b2MulT(xfB.q, -m_axis);\n\n\t\t\t\t*indexA = m_proxyA->GetSupport(axisA);\n\t\t\t\t*indexB = m_proxyB->GetSupport(axisB);\n\n\t\t\t\tb2Vec2 localPointA = m_proxyA->GetVertex(*indexA);\n\t\t\t\tb2Vec2 localPointB = m_proxyB->GetVertex(*indexB);\n\t\t\t\t\n\t\t\t\tb2Vec2 pointA = b2Mul(xfA, localPointA);\n\t\t\t\tb2Vec2 pointB = b2Mul(xfB, localPointB);\n\n\t\t\t\tfloat32 separation = b2Dot(pointB - pointA, m_axis);\n\t\t\t\treturn separation;\n\t\t\t}\n\n\t\tcase e_faceA:\n\t\t\t{\n\t\t\t\tb2Vec2 normal = b2Mul(xfA.q, m_axis);\n\t\t\t\tb2Vec2 pointA = b2Mul(xfA, m_localPoint);\n\n\t\t\t\tb2Vec2 axisB = b2MulT(xfB.q, -normal);\n\t\t\t\t\n\t\t\t\t*indexA = -1;\n\t\t\t\t*indexB = m_proxyB->GetSupport(axisB);\n\n\t\t\t\tb2Vec2 localPointB = m_proxyB->GetVertex(*indexB);\n\t\t\t\tb2Vec2 pointB = b2Mul(xfB, localPointB);\n\n\t\t\t\tfloat32 separation = b2Dot(pointB - pointA, normal);\n\t\t\t\treturn separation;\n\t\t\t}\n\n\t\tcase e_faceB:\n\t\t\t{\n\t\t\t\tb2Vec2 normal = b2Mul(xfB.q, m_axis);\n\t\t\t\tb2Vec2 pointB = b2Mul(xfB, m_localPoint);\n\n\t\t\t\tb2Vec2 axisA = b2MulT(xfA.q, -normal);\n\n\t\t\t\t*indexB = -1;\n\t\t\t\t*indexA = m_proxyA->GetSupport(axisA);\n\n\t\t\t\tb2Vec2 localPointA = m_proxyA->GetVertex(*indexA);\n\t\t\t\tb2Vec2 pointA = b2Mul(xfA, localPointA);\n\n\t\t\t\tfloat32 separation = b2Dot(pointA - pointB, normal);\n\t\t\t\treturn separation;\n\t\t\t}\n\n\t\tdefault:\n\t\t\tb2Assert(false);\n\t\t\t*indexA = -1;\n\t\t\t*indexB = -1;\n\t\t\treturn 0.0f;\n\t\t}\n\t}\n\n\t//\n\tfloat32 Evaluate(int32 indexA, int32 indexB, float32 t) const\n\t{\n\t\tb2Transform xfA, xfB;\n\t\tm_sweepA.GetTransform(&xfA, t);\n\t\tm_sweepB.GetTransform(&xfB, t);\n\n\t\tswitch (m_type)\n\t\t{\n\t\tcase e_points:\n\t\t\t{\n\t\t\t\tb2Vec2 localPointA = m_proxyA->GetVertex(indexA);\n\t\t\t\tb2Vec2 localPointB = m_proxyB->GetVertex(indexB);\n\n\t\t\t\tb2Vec2 pointA = b2Mul(xfA, localPointA);\n\t\t\t\tb2Vec2 pointB = b2Mul(xfB, localPointB);\n\t\t\t\tfloat32 separation = b2Dot(pointB - pointA, m_axis);\n\n\t\t\t\treturn separation;\n\t\t\t}\n\n\t\tcase e_faceA:\n\t\t\t{\n\t\t\t\tb2Vec2 normal = b2Mul(xfA.q, m_axis);\n\t\t\t\tb2Vec2 pointA = b2Mul(xfA, m_localPoint);\n\n\t\t\t\tb2Vec2 localPointB = m_proxyB->GetVertex(indexB);\n\t\t\t\tb2Vec2 pointB = b2Mul(xfB, localPointB);\n\n\t\t\t\tfloat32 separation = b2Dot(pointB - pointA, normal);\n\t\t\t\treturn separation;\n\t\t\t}\n\n\t\tcase e_faceB:\n\t\t\t{\n\t\t\t\tb2Vec2 normal = b2Mul(xfB.q, m_axis);\n\t\t\t\tb2Vec2 pointB = b2Mul(xfB, m_localPoint);\n\n\t\t\t\tb2Vec2 localPointA = m_proxyA->GetVertex(indexA);\n\t\t\t\tb2Vec2 pointA = b2Mul(xfA, localPointA);\n\n\t\t\t\tfloat32 separation = b2Dot(pointA - pointB, normal);\n\t\t\t\treturn separation;\n\t\t\t}\n\n\t\tdefault:\n\t\t\tb2Assert(false);\n\t\t\treturn 0.0f;\n\t\t}\n\t}\n\n\tconst b2DistanceProxy* m_proxyA;\n\tconst b2DistanceProxy* m_proxyB;\n\tb2Sweep m_sweepA, m_sweepB;\n\tType m_type;\n\tb2Vec2 m_localPoint;\n\tb2Vec2 m_axis;\n};\n\n// CCD via the local separating axis method. This seeks progression\n// by computing the largest time at which separation is maintained.\nvoid b2TimeOfImpact(b2TOIOutput* output, const b2TOIInput* input)\n{\n\tb2Timer timer;\n\n\t++b2_toiCalls;\n\n\toutput->state = b2TOIOutput::e_unknown;\n\toutput->t = input->tMax;\n\n\tconst b2DistanceProxy* proxyA = &input->proxyA;\n\tconst b2DistanceProxy* proxyB = &input->proxyB;\n\n\tb2Sweep sweepA = input->sweepA;\n\tb2Sweep sweepB = input->sweepB;\n\n\t// Large rotations can make the root finder fail, so we normalize the\n\t// sweep angles.\n\tsweepA.Normalize();\n\tsweepB.Normalize();\n\n\tfloat32 tMax = input->tMax;\n\n\tfloat32 totalRadius = proxyA->m_radius + proxyB->m_radius;\n\tfloat32 target = b2Max(b2_linearSlop, totalRadius - 3.0f * b2_linearSlop);\n\tfloat32 tolerance = 0.25f * b2_linearSlop;\n\tb2Assert(target > tolerance);\n\n\tfloat32 t1 = 0.0f;\n\tconst int32 k_maxIterations = 20;\t// TODO_ERIN b2Settings\n\tint32 iter = 0;\n\n\t// Prepare input for distance query.\n\tb2SimplexCache cache;\n\tcache.count = 0;\n\tb2DistanceInput distanceInput;\n\tdistanceInput.proxyA = input->proxyA;\n\tdistanceInput.proxyB = input->proxyB;\n\tdistanceInput.useRadii = false;\n\n\t// The outer loop progressively attempts to compute new separating axes.\n\t// This loop terminates when an axis is repeated (no progress is made).\n\tfor(;;)\n\t{\n\t\tb2Transform xfA, xfB;\n\t\tsweepA.GetTransform(&xfA, t1);\n\t\tsweepB.GetTransform(&xfB, t1);\n\n\t\t// Get the distance between shapes. We can also use the results\n\t\t// to get a separating axis.\n\t\tdistanceInput.transformA = xfA;\n\t\tdistanceInput.transformB = xfB;\n\t\tb2DistanceOutput distanceOutput;\n\t\tb2Distance(&distanceOutput, &cache, &distanceInput);\n\n\t\t// If the shapes are overlapped, we give up on continuous collision.\n\t\tif (distanceOutput.distance <= 0.0f)\n\t\t{\n\t\t\t// Failure!\n\t\t\toutput->state = b2TOIOutput::e_overlapped;\n\t\t\toutput->t = 0.0f;\n\t\t\tbreak;\n\t\t}\n\n\t\tif (distanceOutput.distance < target + tolerance)\n\t\t{\n\t\t\t// Victory!\n\t\t\toutput->state = b2TOIOutput::e_touching;\n\t\t\toutput->t = t1;\n\t\t\tbreak;\n\t\t}\n\n\t\t// Initialize the separating axis.\n\t\tb2SeparationFunction fcn;\n\t\tfcn.Initialize(&cache, proxyA, sweepA, proxyB, sweepB, t1);\n#if 0\n\t\t// Dump the curve seen by the root finder\n\t\t{\n\t\t\tconst int32 N = 100;\n\t\t\tfloat32 dx = 1.0f / N;\n\t\t\tfloat32 xs[N+1];\n\t\t\tfloat32 fs[N+1];\n\n\t\t\tfloat32 x = 0.0f;\n\n\t\t\tfor (int32 i = 0; i <= N; ++i)\n\t\t\t{\n\t\t\t\tsweepA.GetTransform(&xfA, x);\n\t\t\t\tsweepB.GetTransform(&xfB, x);\n\t\t\t\tfloat32 f = fcn.Evaluate(xfA, xfB) - target;\n\n\t\t\t\tprintf(\"%g %g\\n\", x, f);\n\n\t\t\t\txs[i] = x;\n\t\t\t\tfs[i] = f;\n\n\t\t\t\tx += dx;\n\t\t\t}\n\t\t}\n#endif\n\n\t\t// Compute the TOI on the separating axis. We do this by successively\n\t\t// resolving the deepest point. This loop is bounded by the number of vertices.\n\t\tbool done = false;\n\t\tfloat32 t2 = tMax;\n\t\tint32 pushBackIter = 0;\n\t\tfor (;;)\n\t\t{\n\t\t\t// Find the deepest point at t2. Store the witness point indices.\n\t\t\tint32 indexA, indexB;\n\t\t\tfloat32 s2 = fcn.FindMinSeparation(&indexA, &indexB, t2);\n\n\t\t\t// Is the final configuration separated?\n\t\t\tif (s2 > target + tolerance)\n\t\t\t{\n\t\t\t\t// Victory!\n\t\t\t\toutput->state = b2TOIOutput::e_separated;\n\t\t\t\toutput->t = tMax;\n\t\t\t\tdone = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Has the separation reached tolerance?\n\t\t\tif (s2 > target - tolerance)\n\t\t\t{\n\t\t\t\t// Advance the sweeps\n\t\t\t\tt1 = t2;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Compute the initial separation of the witness points.\n\t\t\tfloat32 s1 = fcn.Evaluate(indexA, indexB, t1);\n\n\t\t\t// Check for initial overlap. This might happen if the root finder\n\t\t\t// runs out of iterations.\n\t\t\tif (s1 < target - tolerance)\n\t\t\t{\n\t\t\t\toutput->state = b2TOIOutput::e_failed;\n\t\t\t\toutput->t = t1;\n\t\t\t\tdone = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Check for touching\n\t\t\tif (s1 <= target + tolerance)\n\t\t\t{\n\t\t\t\t// Victory! t1 should hold the TOI (could be 0.0).\n\t\t\t\toutput->state = b2TOIOutput::e_touching;\n\t\t\t\toutput->t = t1;\n\t\t\t\tdone = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Compute 1D root of: f(x) - target = 0\n\t\t\tint32 rootIterCount = 0;\n\t\t\tfloat32 a1 = t1, a2 = t2;\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\t// Use a mix of the secant rule and bisection.\n\t\t\t\tfloat32 t;\n\t\t\t\tif (rootIterCount & 1)\n\t\t\t\t{\n\t\t\t\t\t// Secant rule to improve convergence.\n\t\t\t\t\tt = a1 + (target - s1) * (a2 - a1) / (s2 - s1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Bisection to guarantee progress.\n\t\t\t\t\tt = 0.5f * (a1 + a2);\n\t\t\t\t}\n\n\t\t\t\t++rootIterCount;\n\t\t\t\t++b2_toiRootIters;\n\n\t\t\t\tfloat32 s = fcn.Evaluate(indexA, indexB, t);\n\n\t\t\t\tif (b2Abs(s - target) < tolerance)\n\t\t\t\t{\n\t\t\t\t\t// t2 holds a tentative value for t1\n\t\t\t\t\tt2 = t;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Ensure we continue to bracket the root.\n\t\t\t\tif (s > target)\n\t\t\t\t{\n\t\t\t\t\ta1 = t;\n\t\t\t\t\ts1 = s;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ta2 = t;\n\t\t\t\t\ts2 = s;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (rootIterCount == 50)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tb2_toiMaxRootIters = b2Max(b2_toiMaxRootIters, rootIterCount);\n\n\t\t\t++pushBackIter;\n\n\t\t\tif (pushBackIter == b2_maxPolygonVertices)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t++iter;\n\t\t++b2_toiIters;\n\n\t\tif (done)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\n\t\tif (iter == k_maxIterations)\n\t\t{\n\t\t\t// Root finder got stuck. Semi-victory.\n\t\t\toutput->state = b2TOIOutput::e_failed;\n\t\t\toutput->t = t1;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tb2_toiMaxIters = b2Max(b2_toiMaxIters, iter);\n\n\tfloat32 time = timer.GetMilliseconds();\n\tb2_toiMaxTime = b2Max(b2_toiMaxTime, time);\n\tb2_toiTime += time;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Collision/b2TimeOfImpact.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_TIME_OF_IMPACT_H\n#define B2_TIME_OF_IMPACT_H\n\n#include <Box2D/Common/b2Math.h>\n#include <Box2D/Collision/b2Distance.h>\n\n/// Input parameters for b2TimeOfImpact\nstruct b2TOIInput\n{\n\tb2DistanceProxy proxyA;\n\tb2DistanceProxy proxyB;\n\tb2Sweep sweepA;\n\tb2Sweep sweepB;\n\tfloat32 tMax;\t\t// defines sweep interval [0, tMax]\n};\n\n// Output parameters for b2TimeOfImpact.\nstruct b2TOIOutput\n{\n\tenum State\n\t{\n\t\te_unknown,\n\t\te_failed,\n\t\te_overlapped,\n\t\te_touching,\n\t\te_separated\n\t};\n\n\tState state;\n\tfloat32 t;\n};\n\n/// Compute the upper bound on time before two shapes penetrate. Time is represented as\n/// a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate,\n/// non-tunneling collision. If you change the time interval, you should call this function\n/// again.\n/// Note: use b2Distance to compute the contact point and normal at the time of impact.\nvoid b2TimeOfImpact(b2TOIOutput* output, const b2TOIInput* input);\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2BlockAllocator.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <limits.h>\n#include <memory.h>\n#include <stddef.h>\n\nint32 b2BlockAllocator::s_blockSizes[b2_blockSizes] = \n{\n\t16,\t\t// 0\n\t32,\t\t// 1\n\t64,\t\t// 2\n\t96,\t\t// 3\n\t128,\t// 4\n\t160,\t// 5\n\t192,\t// 6\n\t224,\t// 7\n\t256,\t// 8\n\t320,\t// 9\n\t384,\t// 10\n\t448,\t// 11\n\t512,\t// 12\n\t640,\t// 13\n};\nuint8 b2BlockAllocator::s_blockSizeLookup[b2_maxBlockSize + 1];\nbool b2BlockAllocator::s_blockSizeLookupInitialized;\n\nstruct b2Chunk\n{\n\tint32 blockSize;\n\tb2Block* blocks;\n};\n\nstruct b2Block\n{\n\tb2Block* next;\n};\n\nb2BlockAllocator::b2BlockAllocator()\n{\n\tb2Assert(b2_blockSizes < UCHAR_MAX);\n\n\tm_chunkSpace = b2_chunkArrayIncrement;\n\tm_chunkCount = 0;\n\tm_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk));\n\t\n\tmemset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk));\n\tmemset(m_freeLists, 0, sizeof(m_freeLists));\n\n\tif (s_blockSizeLookupInitialized == false)\n\t{\n\t\tint32 j = 0;\n\t\tfor (int32 i = 1; i <= b2_maxBlockSize; ++i)\n\t\t{\n\t\t\tb2Assert(j < b2_blockSizes);\n\t\t\tif (i <= s_blockSizes[j])\n\t\t\t{\n\t\t\t\ts_blockSizeLookup[i] = (uint8)j;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t++j;\n\t\t\t\ts_blockSizeLookup[i] = (uint8)j;\n\t\t\t}\n\t\t}\n\n\t\ts_blockSizeLookupInitialized = true;\n\t}\n}\n\nb2BlockAllocator::~b2BlockAllocator()\n{\n\tfor (int32 i = 0; i < m_chunkCount; ++i)\n\t{\n\t\tb2Free(m_chunks[i].blocks);\n\t}\n\n\tb2Free(m_chunks);\n}\n\nvoid* b2BlockAllocator::Allocate(int32 size)\n{\n\tif (size == 0)\n\t\treturn NULL;\n\n\tb2Assert(0 < size);\n\n\tif (size > b2_maxBlockSize)\n\t{\n\t\treturn b2Alloc(size);\n\t}\n\n\tint32 index = s_blockSizeLookup[size];\n\tb2Assert(0 <= index && index < b2_blockSizes);\n\n\tif (m_freeLists[index])\n\t{\n\t\tb2Block* block = m_freeLists[index];\n\t\tm_freeLists[index] = block->next;\n\t\treturn block;\n\t}\n\telse\n\t{\n\t\tif (m_chunkCount == m_chunkSpace)\n\t\t{\n\t\t\tb2Chunk* oldChunks = m_chunks;\n\t\t\tm_chunkSpace += b2_chunkArrayIncrement;\n\t\t\tm_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk));\n\t\t\tmemcpy(m_chunks, oldChunks, m_chunkCount * sizeof(b2Chunk));\n\t\t\tmemset(m_chunks + m_chunkCount, 0, b2_chunkArrayIncrement * sizeof(b2Chunk));\n\t\t\tb2Free(oldChunks);\n\t\t}\n\n\t\tb2Chunk* chunk = m_chunks + m_chunkCount;\n\t\tchunk->blocks = (b2Block*)b2Alloc(b2_chunkSize);\n#if defined(_DEBUG)\n\t\tmemset(chunk->blocks, 0xcd, b2_chunkSize);\n#endif\n\t\tint32 blockSize = s_blockSizes[index];\n\t\tchunk->blockSize = blockSize;\n\t\tint32 blockCount = b2_chunkSize / blockSize;\n\t\tb2Assert(blockCount * blockSize <= b2_chunkSize);\n\t\tfor (int32 i = 0; i < blockCount - 1; ++i)\n\t\t{\n\t\t\tb2Block* block = (b2Block*)((int8*)chunk->blocks + blockSize * i);\n\t\t\tb2Block* next = (b2Block*)((int8*)chunk->blocks + blockSize * (i + 1));\n\t\t\tblock->next = next;\n\t\t}\n\t\tb2Block* last = (b2Block*)((int8*)chunk->blocks + blockSize * (blockCount - 1));\n\t\tlast->next = NULL;\n\n\t\tm_freeLists[index] = chunk->blocks->next;\n\t\t++m_chunkCount;\n\n\t\treturn chunk->blocks;\n\t}\n}\n\nvoid b2BlockAllocator::Free(void* p, int32 size)\n{\n\tif (size == 0)\n\t{\n\t\treturn;\n\t}\n\n\tb2Assert(0 < size);\n\n\tif (size > b2_maxBlockSize)\n\t{\n\t\tb2Free(p);\n\t\treturn;\n\t}\n\n\tint32 index = s_blockSizeLookup[size];\n\tb2Assert(0 <= index && index < b2_blockSizes);\n\n#ifdef _DEBUG\n\t// Verify the memory address and size is valid.\n\tint32 blockSize = s_blockSizes[index];\n\tbool found = false;\n\tfor (int32 i = 0; i < m_chunkCount; ++i)\n\t{\n\t\tb2Chunk* chunk = m_chunks + i;\n\t\tif (chunk->blockSize != blockSize)\n\t\t{\n\t\t\tb2Assert(\t(int8*)p + blockSize <= (int8*)chunk->blocks ||\n\t\t\t\t\t\t(int8*)chunk->blocks + b2_chunkSize <= (int8*)p);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ((int8*)chunk->blocks <= (int8*)p && (int8*)p + blockSize <= (int8*)chunk->blocks + b2_chunkSize)\n\t\t\t{\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tb2Assert(found);\n\n\tmemset(p, 0xfd, blockSize);\n#endif\n\n\tb2Block* block = (b2Block*)p;\n\tblock->next = m_freeLists[index];\n\tm_freeLists[index] = block;\n}\n\nvoid b2BlockAllocator::Clear()\n{\n\tfor (int32 i = 0; i < m_chunkCount; ++i)\n\t{\n\t\tb2Free(m_chunks[i].blocks);\n\t}\n\n\tm_chunkCount = 0;\n\tmemset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk));\n\n\tmemset(m_freeLists, 0, sizeof(m_freeLists));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2BlockAllocator.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_BLOCK_ALLOCATOR_H\n#define B2_BLOCK_ALLOCATOR_H\n\n#include <Box2D/Common/b2Settings.h>\n\nconst int32 b2_chunkSize = 16 * 1024;\nconst int32 b2_maxBlockSize = 640;\nconst int32 b2_blockSizes = 14;\nconst int32 b2_chunkArrayIncrement = 128;\n\nstruct b2Block;\nstruct b2Chunk;\n\n/// This is a small object allocator used for allocating small\n/// objects that persist for more than one time step.\n/// See: http://www.codeproject.com/useritems/Small_Block_Allocator.asp\nclass b2BlockAllocator\n{\npublic:\n\tb2BlockAllocator();\n\t~b2BlockAllocator();\n\n\t/// Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize.\n\tvoid* Allocate(int32 size);\n\n\t/// Free memory. This will use b2Free if the size is larger than b2_maxBlockSize.\n\tvoid Free(void* p, int32 size);\n\n\tvoid Clear();\n\nprivate:\n\n\tb2Chunk* m_chunks;\n\tint32 m_chunkCount;\n\tint32 m_chunkSpace;\n\n\tb2Block* m_freeLists[b2_blockSizes];\n\n\tstatic int32 s_blockSizes[b2_blockSizes];\n\tstatic uint8 s_blockSizeLookup[b2_maxBlockSize + 1];\n\tstatic bool s_blockSizeLookupInitialized;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2Draw.cpp",
    "content": "/*\n* Copyright (c) 2011 Erin Catto http://box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Common/b2Draw.h>\n\nb2Draw::b2Draw()\n{\n\tm_drawFlags = 0;\n}\n\nvoid b2Draw::SetFlags(uint32 flags)\n{\n\tm_drawFlags = flags;\n}\n\nuint32 b2Draw::GetFlags() const\n{\n\treturn m_drawFlags;\n}\n\nvoid b2Draw::AppendFlags(uint32 flags)\n{\n\tm_drawFlags |= flags;\n}\n\nvoid b2Draw::ClearFlags(uint32 flags)\n{\n\tm_drawFlags &= ~flags;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2Draw.h",
    "content": "/*\n* Copyright (c) 2011 Erin Catto http://box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_DRAW_H\n#define B2_DRAW_H\n\n#include <Box2D/Common/b2Math.h>\n\n/// Color for debug drawing. Each value has the range [0,1].\nstruct b2Color\n{\n\tb2Color() {}\n\tb2Color(float32 r, float32 g, float32 b) : r(r), g(g), b(b) {}\n\tvoid Set(float32 ri, float32 gi, float32 bi) { r = ri; g = gi; b = bi; }\n\tfloat32 r, g, b;\n};\n\n/// Implement and register this class with a b2World to provide debug drawing of physics\n/// entities in your game.\nclass b2Draw\n{\npublic:\n\tb2Draw();\n\n\tvirtual ~b2Draw() {}\n\n\tenum\n\t{\n\t\te_shapeBit\t\t\t\t= 0x0001,\t///< draw shapes\n\t\te_jointBit\t\t\t\t= 0x0002,\t///< draw joint connections\n\t\te_aabbBit\t\t\t\t= 0x0004,\t///< draw axis aligned bounding boxes\n\t\te_pairBit\t\t\t\t= 0x0008,\t///< draw broad-phase pairs\n\t\te_centerOfMassBit\t\t= 0x0010\t///< draw center of mass frame\n\t};\n\n\t/// Set the drawing flags.\n\tvoid SetFlags(uint32 flags);\n\n\t/// Get the drawing flags.\n\tuint32 GetFlags() const;\n\t\n\t/// Append flags to the current flags.\n\tvoid AppendFlags(uint32 flags);\n\n\t/// Clear flags from the current flags.\n\tvoid ClearFlags(uint32 flags);\n\n\t/// Draw a closed polygon provided in CCW order.\n\tvirtual void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) = 0;\n\n\t/// Draw a solid closed polygon provided in CCW order.\n\tvirtual void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) = 0;\n\n\t/// Draw a circle.\n\tvirtual void DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color) = 0;\n\t\n\t/// Draw a solid circle.\n\tvirtual void DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color) = 0;\n\t\n\t/// Draw a line segment.\n\tvirtual void DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color) = 0;\n\n\t/// Draw a transform. Choose your own length scale.\n\t/// @param xf a transform.\n\tvirtual void DrawTransform(const b2Transform& xf) = 0;\n\nprotected:\n\tuint32 m_drawFlags;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2GrowableStack.h",
    "content": "/*\n* Copyright (c) 2010 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_GROWABLE_STACK_H\n#define B2_GROWABLE_STACK_H\n#include <Box2D/Common/b2Settings.h>\n#include <memory.h>\n\n/// This is a growable LIFO stack with an initial capacity of N.\n/// If the stack size exceeds the initial capacity, the heap is used\n/// to increase the size of the stack.\ntemplate <typename T, int32 N>\nclass b2GrowableStack\n{\npublic:\n\tb2GrowableStack()\n\t{\n\t\tm_stack = m_array;\n\t\tm_count = 0;\n\t\tm_capacity = N;\n\t}\n\n\t~b2GrowableStack()\n\t{\n\t\tif (m_stack != m_array)\n\t\t{\n\t\t\tb2Free(m_stack);\n\t\t\tm_stack = NULL;\n\t\t}\n\t}\n\n\tvoid Push(const T& element)\n\t{\n\t\tif (m_count == m_capacity)\n\t\t{\n\t\t\tT* old = m_stack;\n\t\t\tm_capacity *= 2;\n\t\t\tm_stack = (T*)b2Alloc(m_capacity * sizeof(T));\n\t\t\tmemcpy(m_stack, old, m_count * sizeof(T));\n\t\t\tif (old != m_array)\n\t\t\t{\n\t\t\t\tb2Free(old);\n\t\t\t}\n\t\t}\n\n\t\tm_stack[m_count] = element;\n\t\t++m_count;\n\t}\n\n\tT Pop()\n\t{\n\t\tb2Assert(m_count > 0);\n\t\t--m_count;\n\t\treturn m_stack[m_count];\n\t}\n\n\tint32 GetCount()\n\t{\n\t\treturn m_count;\n\t}\n\nprivate:\n\tT* m_stack;\n\tT m_array[N];\n\tint32 m_count;\n\tint32 m_capacity;\n};\n\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2Math.cpp",
    "content": "/*\n* Copyright (c) 2007-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Common/b2Math.h>\n\nconst b2Vec2 b2Vec2_zero(0.0f, 0.0f);\n\n/// Solve A * x = b, where b is a column vector. This is more efficient\n/// than computing the inverse in one-shot cases.\nb2Vec3 b2Mat33::Solve33(const b2Vec3& b) const\n{\n\tfloat32 det = b2Dot(ex, b2Cross(ey, ez));\n\tif (det != 0.0f)\n\t{\n\t\tdet = 1.0f / det;\n\t}\n\tb2Vec3 x;\n\tx.x = det * b2Dot(b, b2Cross(ey, ez));\n\tx.y = det * b2Dot(ex, b2Cross(b, ez));\n\tx.z = det * b2Dot(ex, b2Cross(ey, b));\n\treturn x;\n}\n\n/// Solve A * x = b, where b is a column vector. This is more efficient\n/// than computing the inverse in one-shot cases.\nb2Vec2 b2Mat33::Solve22(const b2Vec2& b) const\n{\n\tfloat32 a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y;\n\tfloat32 det = a11 * a22 - a12 * a21;\n\tif (det != 0.0f)\n\t{\n\t\tdet = 1.0f / det;\n\t}\n\tb2Vec2 x;\n\tx.x = det * (a22 * b.x - a12 * b.y);\n\tx.y = det * (a11 * b.y - a21 * b.x);\n\treturn x;\n}\n\n///\nvoid b2Mat33::GetInverse22(b2Mat33* M) const\n{\n\tfloat32 a = ex.x, b = ey.x, c = ex.y, d = ey.y;\n\tfloat32 det = a * d - b * c;\n\tif (det != 0.0f)\n\t{\n\t\tdet = 1.0f / det;\n\t}\n\n\tM->ex.x =  det * d;\tM->ey.x = -det * b; M->ex.z = 0.0f;\n\tM->ex.y = -det * c;\tM->ey.y =  det * a; M->ey.z = 0.0f;\n\tM->ez.x = 0.0f; M->ez.y = 0.0f; M->ez.z = 0.0f;\n}\n\n/// Returns the zero matrix if singular.\nvoid b2Mat33::GetSymInverse33(b2Mat33* M) const\n{\n\tfloat32 det = b2Dot(ex, b2Cross(ey, ez));\n\tif (det != 0.0f)\n\t{\n\t\tdet = 1.0f / det;\n\t}\n\n\tfloat32 a11 = ex.x, a12 = ey.x, a13 = ez.x;\n\tfloat32 a22 = ey.y, a23 = ez.y;\n\tfloat32 a33 = ez.z;\n\n\tM->ex.x = det * (a22 * a33 - a23 * a23);\n\tM->ex.y = det * (a13 * a23 - a12 * a33);\n\tM->ex.z = det * (a12 * a23 - a13 * a22);\n\n\tM->ey.x = M->ex.y;\n\tM->ey.y = det * (a11 * a33 - a13 * a13);\n\tM->ey.z = det * (a13 * a12 - a11 * a23);\n\n\tM->ez.x = M->ex.z;\n\tM->ez.y = M->ey.z;\n\tM->ez.z = det * (a11 * a22 - a12 * a12);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2Math.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_MATH_H\n#define B2_MATH_H\n\n#include <Box2D/Common/b2Settings.h>\n#include <math.h>\n\n/// This function is used to ensure that a floating point number is not a NaN or infinity.\ninline bool b2IsValid(float32 x)\n{\n\tint32 ix = *reinterpret_cast<int32*>(&x);\n\treturn (ix & 0x7f800000) != 0x7f800000;\n}\n\n/// This is a approximate yet fast inverse square-root.\ninline float32 b2InvSqrt(float32 x)\n{\n\tunion\n\t{\n\t\tfloat32 x;\n\t\tint32 i;\n\t} convert;\n\n\tconvert.x = x;\n\tfloat32 xhalf = 0.5f * x;\n\tconvert.i = 0x5f3759df - (convert.i >> 1);\n\tx = convert.x;\n\tx = x * (1.5f - xhalf * x * x);\n\treturn x;\n}\n\n#define\tb2Sqrt(x)\tsqrt(x)\n#define\tb2Atan2(y, x)\tatan2(y, x)\n\n/// A 2D column vector.\nstruct b2Vec2\n{\n\t/// Default constructor does nothing (for performance).\n\tb2Vec2() {}\n\n\t/// Construct using coordinates.\n\tb2Vec2(float32 x, float32 y) : x(x), y(y) {}\n\n\t/// Set this vector to all zeros.\n\tvoid SetZero() { x = 0.0f; y = 0.0f; }\n\n\t/// Set this vector to some specified coordinates.\n\tvoid Set(float32 x_, float32 y_) { x = x_; y = y_; }\n\n\t/// Negate this vector.\n\tb2Vec2 operator -() const { b2Vec2 v; v.Set(-x, -y); return v; }\n\t\n\t/// Read from and indexed element.\n\tfloat32 operator () (int32 i) const\n\t{\n\t\treturn (&x)[i];\n\t}\n\n\t/// Write to an indexed element.\n\tfloat32& operator () (int32 i)\n\t{\n\t\treturn (&x)[i];\n\t}\n\n\t/// Add a vector to this vector.\n\tvoid operator += (const b2Vec2& v)\n\t{\n\t\tx += v.x; y += v.y;\n\t}\n\t\n\t/// Subtract a vector from this vector.\n\tvoid operator -= (const b2Vec2& v)\n\t{\n\t\tx -= v.x; y -= v.y;\n\t}\n\n\t/// Multiply this vector by a scalar.\n\tvoid operator *= (float32 a)\n\t{\n\t\tx *= a; y *= a;\n\t}\n\n\t/// Get the length of this vector (the norm).\n\tfloat32 Length() const\n\t{\n\t\treturn b2Sqrt(x * x + y * y);\n\t}\n\n\t/// Get the length squared. For performance, use this instead of\n\t/// b2Vec2::Length (if possible).\n\tfloat32 LengthSquared() const\n\t{\n\t\treturn x * x + y * y;\n\t}\n\n\t/// Convert this vector into a unit vector. Returns the length.\n\tfloat32 Normalize()\n\t{\n\t\tfloat32 length = Length();\n\t\tif (length < b2_epsilon)\n\t\t{\n\t\t\treturn 0.0f;\n\t\t}\n\t\tfloat32 invLength = 1.0f / length;\n\t\tx *= invLength;\n\t\ty *= invLength;\n\n\t\treturn length;\n\t}\n\n\t/// Does this vector contain finite coordinates?\n\tbool IsValid() const\n\t{\n\t\treturn b2IsValid(x) && b2IsValid(y);\n\t}\n\n\t/// Get the skew vector such that dot(skew_vec, other) == cross(vec, other)\n\tb2Vec2 Skew() const\n\t{\n\t\treturn b2Vec2(-y, x);\n\t}\n\n\tfloat32 x, y;\n};\n\n/// A 2D column vector with 3 elements.\nstruct b2Vec3\n{\n\t/// Default constructor does nothing (for performance).\n\tb2Vec3() {}\n\n\t/// Construct using coordinates.\n\tb2Vec3(float32 x, float32 y, float32 z) : x(x), y(y), z(z) {}\n\n\t/// Set this vector to all zeros.\n\tvoid SetZero() { x = 0.0f; y = 0.0f; z = 0.0f; }\n\n\t/// Set this vector to some specified coordinates.\n\tvoid Set(float32 x_, float32 y_, float32 z_) { x = x_; y = y_; z = z_; }\n\n\t/// Negate this vector.\n\tb2Vec3 operator -() const { b2Vec3 v; v.Set(-x, -y, -z); return v; }\n\n\t/// Add a vector to this vector.\n\tvoid operator += (const b2Vec3& v)\n\t{\n\t\tx += v.x; y += v.y; z += v.z;\n\t}\n\n\t/// Subtract a vector from this vector.\n\tvoid operator -= (const b2Vec3& v)\n\t{\n\t\tx -= v.x; y -= v.y; z -= v.z;\n\t}\n\n\t/// Multiply this vector by a scalar.\n\tvoid operator *= (float32 s)\n\t{\n\t\tx *= s; y *= s; z *= s;\n\t}\n\n\tfloat32 x, y, z;\n};\n\n/// A 2-by-2 matrix. Stored in column-major order.\nstruct b2Mat22\n{\n\t/// The default constructor does nothing (for performance).\n\tb2Mat22() {}\n\n\t/// Construct this matrix using columns.\n\tb2Mat22(const b2Vec2& c1, const b2Vec2& c2)\n\t{\n\t\tex = c1;\n\t\tey = c2;\n\t}\n\n\t/// Construct this matrix using scalars.\n\tb2Mat22(float32 a11, float32 a12, float32 a21, float32 a22)\n\t{\n\t\tex.x = a11; ex.y = a21;\n\t\tey.x = a12; ey.y = a22;\n\t}\n\n\t/// Initialize this matrix using columns.\n\tvoid Set(const b2Vec2& c1, const b2Vec2& c2)\n\t{\n\t\tex = c1;\n\t\tey = c2;\n\t}\n\n\t/// Set this to the identity matrix.\n\tvoid SetIdentity()\n\t{\n\t\tex.x = 1.0f; ey.x = 0.0f;\n\t\tex.y = 0.0f; ey.y = 1.0f;\n\t}\n\n\t/// Set this matrix to all zeros.\n\tvoid SetZero()\n\t{\n\t\tex.x = 0.0f; ey.x = 0.0f;\n\t\tex.y = 0.0f; ey.y = 0.0f;\n\t}\n\n\tb2Mat22 GetInverse() const\n\t{\n\t\tfloat32 a = ex.x, b = ey.x, c = ex.y, d = ey.y;\n\t\tb2Mat22 B;\n\t\tfloat32 det = a * d - b * c;\n\t\tif (det != 0.0f)\n\t\t{\n\t\t\tdet = 1.0f / det;\n\t\t}\n\t\tB.ex.x =  det * d;\tB.ey.x = -det * b;\n\t\tB.ex.y = -det * c;\tB.ey.y =  det * a;\n\t\treturn B;\n\t}\n\n\t/// Solve A * x = b, where b is a column vector. This is more efficient\n\t/// than computing the inverse in one-shot cases.\n\tb2Vec2 Solve(const b2Vec2& b) const\n\t{\n\t\tfloat32 a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y;\n\t\tfloat32 det = a11 * a22 - a12 * a21;\n\t\tif (det != 0.0f)\n\t\t{\n\t\t\tdet = 1.0f / det;\n\t\t}\n\t\tb2Vec2 x;\n\t\tx.x = det * (a22 * b.x - a12 * b.y);\n\t\tx.y = det * (a11 * b.y - a21 * b.x);\n\t\treturn x;\n\t}\n\n\tb2Vec2 ex, ey;\n};\n\n/// A 3-by-3 matrix. Stored in column-major order.\nstruct b2Mat33\n{\n\t/// The default constructor does nothing (for performance).\n\tb2Mat33() {}\n\n\t/// Construct this matrix using columns.\n\tb2Mat33(const b2Vec3& c1, const b2Vec3& c2, const b2Vec3& c3)\n\t{\n\t\tex = c1;\n\t\tey = c2;\n\t\tez = c3;\n\t}\n\n\t/// Set this matrix to all zeros.\n\tvoid SetZero()\n\t{\n\t\tex.SetZero();\n\t\tey.SetZero();\n\t\tez.SetZero();\n\t}\n\n\t/// Solve A * x = b, where b is a column vector. This is more efficient\n\t/// than computing the inverse in one-shot cases.\n\tb2Vec3 Solve33(const b2Vec3& b) const;\n\n\t/// Solve A * x = b, where b is a column vector. This is more efficient\n\t/// than computing the inverse in one-shot cases. Solve only the upper\n\t/// 2-by-2 matrix equation.\n\tb2Vec2 Solve22(const b2Vec2& b) const;\n\n\t/// Get the inverse of this matrix as a 2-by-2.\n\t/// Returns the zero matrix if singular.\n\tvoid GetInverse22(b2Mat33* M) const;\n\n\t/// Get the symmetric inverse of this matrix as a 3-by-3.\n\t/// Returns the zero matrix if singular.\n\tvoid GetSymInverse33(b2Mat33* M) const;\n\n\tb2Vec3 ex, ey, ez;\n};\n\n/// Rotation\nstruct b2Rot\n{\n\tb2Rot() {}\n\n\t/// Initialize from an angle in radians\n\texplicit b2Rot(float32 angle)\n\t{\n\t\t/// TODO_ERIN optimize\n\t\ts = sin(angle);\n\t\tc = cos(angle);\n\t}\n\n\t/// Set using an angle in radians.\n\tvoid Set(float32 angle)\n\t{\n\t\t/// TODO_ERIN optimize\n\t\ts = sin(angle);\n\t\tc = cos(angle);\n\t}\n\n\t/// Set to the identity rotation\n\tvoid SetIdentity()\n\t{\n\t\ts = 0.0f;\n\t\tc = 1.0f;\n\t}\n\n\t/// Get the angle in radians\n\tfloat32 GetAngle() const\n\t{\n\t\treturn b2Atan2(s, c);\n\t}\n\n\t/// Get the x-axis\n\tb2Vec2 GetXAxis() const\n\t{\n\t\treturn b2Vec2(c, s);\n\t}\n\n\t/// Get the u-axis\n\tb2Vec2 GetYAxis() const\n\t{\n\t\treturn b2Vec2(-s, c);\n\t}\n\n\t/// Sine and cosine\n\tfloat32 s, c;\n};\n\n/// A transform contains translation and rotation. It is used to represent\n/// the position and orientation of rigid frames.\nstruct b2Transform\n{\n\t/// The default constructor does nothing.\n\tb2Transform() {}\n\n\t/// Initialize using a position vector and a rotation.\n\tb2Transform(const b2Vec2& position, const b2Rot& rotation) : p(position), q(rotation) {}\n\n\t/// Set this to the identity transform.\n\tvoid SetIdentity()\n\t{\n\t\tp.SetZero();\n\t\tq.SetIdentity();\n\t}\n\n\t/// Set this based on the position and angle.\n\tvoid Set(const b2Vec2& position, float32 angle)\n\t{\n\t\tp = position;\n\t\tq.Set(angle);\n\t}\n\n\tb2Vec2 p;\n\tb2Rot q;\n};\n\n/// This describes the motion of a body/shape for TOI computation.\n/// Shapes are defined with respect to the body origin, which may\n/// no coincide with the center of mass. However, to support dynamics\n/// we must interpolate the center of mass position.\nstruct b2Sweep\n{\n\t/// Get the interpolated transform at a specific time.\n\t/// @param beta is a factor in [0,1], where 0 indicates alpha0.\n\tvoid GetTransform(b2Transform* xfb, float32 beta) const;\n\n\t/// Advance the sweep forward, yielding a new initial state.\n\t/// @param alpha the new initial time.\n\tvoid Advance(float32 alpha);\n\n\t/// Normalize the angles.\n\tvoid Normalize();\n\n\tb2Vec2 localCenter;\t///< local center of mass position\n\tb2Vec2 c0, c;\t\t///< center world positions\n\tfloat32 a0, a;\t\t///< world angles\n\n\t/// Fraction of the current time step in the range [0,1]\n\t/// c0 and a0 are the positions at alpha0.\n\tfloat32 alpha0;\n};\n\n/// Useful constant\nextern const b2Vec2 b2Vec2_zero;\n\n/// Perform the dot product on two vectors.\ninline float32 b2Dot(const b2Vec2& a, const b2Vec2& b)\n{\n\treturn a.x * b.x + a.y * b.y;\n}\n\n/// Perform the cross product on two vectors. In 2D this produces a scalar.\ninline float32 b2Cross(const b2Vec2& a, const b2Vec2& b)\n{\n\treturn a.x * b.y - a.y * b.x;\n}\n\n/// Perform the cross product on a vector and a scalar. In 2D this produces\n/// a vector.\ninline b2Vec2 b2Cross(const b2Vec2& a, float32 s)\n{\n\treturn b2Vec2(s * a.y, -s * a.x);\n}\n\n/// Perform the cross product on a scalar and a vector. In 2D this produces\n/// a vector.\ninline b2Vec2 b2Cross(float32 s, const b2Vec2& a)\n{\n\treturn b2Vec2(-s * a.y, s * a.x);\n}\n\n/// Multiply a matrix times a vector. If a rotation matrix is provided,\n/// then this transforms the vector from one frame to another.\ninline b2Vec2 b2Mul(const b2Mat22& A, const b2Vec2& v)\n{\n\treturn b2Vec2(A.ex.x * v.x + A.ey.x * v.y, A.ex.y * v.x + A.ey.y * v.y);\n}\n\n/// Multiply a matrix transpose times a vector. If a rotation matrix is provided,\n/// then this transforms the vector from one frame to another (inverse transform).\ninline b2Vec2 b2MulT(const b2Mat22& A, const b2Vec2& v)\n{\n\treturn b2Vec2(b2Dot(v, A.ex), b2Dot(v, A.ey));\n}\n\n/// Add two vectors component-wise.\ninline b2Vec2 operator + (const b2Vec2& a, const b2Vec2& b)\n{\n\treturn b2Vec2(a.x + b.x, a.y + b.y);\n}\n\n/// Subtract two vectors component-wise.\ninline b2Vec2 operator - (const b2Vec2& a, const b2Vec2& b)\n{\n\treturn b2Vec2(a.x - b.x, a.y - b.y);\n}\n\ninline b2Vec2 operator * (float32 s, const b2Vec2& a)\n{\n\treturn b2Vec2(s * a.x, s * a.y);\n}\n\ninline bool operator == (const b2Vec2& a, const b2Vec2& b)\n{\n\treturn a.x == b.x && a.y == b.y;\n}\n\ninline float32 b2Distance(const b2Vec2& a, const b2Vec2& b)\n{\n\tb2Vec2 c = a - b;\n\treturn c.Length();\n}\n\ninline float32 b2DistanceSquared(const b2Vec2& a, const b2Vec2& b)\n{\n\tb2Vec2 c = a - b;\n\treturn b2Dot(c, c);\n}\n\ninline b2Vec3 operator * (float32 s, const b2Vec3& a)\n{\n\treturn b2Vec3(s * a.x, s * a.y, s * a.z);\n}\n\n/// Add two vectors component-wise.\ninline b2Vec3 operator + (const b2Vec3& a, const b2Vec3& b)\n{\n\treturn b2Vec3(a.x + b.x, a.y + b.y, a.z + b.z);\n}\n\n/// Subtract two vectors component-wise.\ninline b2Vec3 operator - (const b2Vec3& a, const b2Vec3& b)\n{\n\treturn b2Vec3(a.x - b.x, a.y - b.y, a.z - b.z);\n}\n\n/// Perform the dot product on two vectors.\ninline float32 b2Dot(const b2Vec3& a, const b2Vec3& b)\n{\n\treturn a.x * b.x + a.y * b.y + a.z * b.z;\n}\n\n/// Perform the cross product on two vectors.\ninline b2Vec3 b2Cross(const b2Vec3& a, const b2Vec3& b)\n{\n\treturn b2Vec3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x);\n}\n\ninline b2Mat22 operator + (const b2Mat22& A, const b2Mat22& B)\n{\n\treturn b2Mat22(A.ex + B.ex, A.ey + B.ey);\n}\n\n// A * B\ninline b2Mat22 b2Mul(const b2Mat22& A, const b2Mat22& B)\n{\n\treturn b2Mat22(b2Mul(A, B.ex), b2Mul(A, B.ey));\n}\n\n// A^T * B\ninline b2Mat22 b2MulT(const b2Mat22& A, const b2Mat22& B)\n{\n\tb2Vec2 c1(b2Dot(A.ex, B.ex), b2Dot(A.ey, B.ex));\n\tb2Vec2 c2(b2Dot(A.ex, B.ey), b2Dot(A.ey, B.ey));\n\treturn b2Mat22(c1, c2);\n}\n\n/// Multiply a matrix times a vector.\ninline b2Vec3 b2Mul(const b2Mat33& A, const b2Vec3& v)\n{\n\treturn v.x * A.ex + v.y * A.ey + v.z * A.ez;\n}\n\n/// Multiply a matrix times a vector.\ninline b2Vec2 b2Mul22(const b2Mat33& A, const b2Vec2& v)\n{\n\treturn b2Vec2(A.ex.x * v.x + A.ey.x * v.y, A.ex.y * v.x + A.ey.y * v.y);\n}\n\n/// Multiply two rotations: q * r\ninline b2Rot b2Mul(const b2Rot& q, const b2Rot& r)\n{\n\t// [qc -qs] * [rc -rs] = [qc*rc-qs*rs -qc*rs-qs*rc]\n\t// [qs  qc]   [rs  rc]   [qs*rc+qc*rs -qs*rs+qc*rc]\n\t// s = qs * rc + qc * rs\n\t// c = qc * rc - qs * rs\n\tb2Rot qr;\n\tqr.s = q.s * r.c + q.c * r.s;\n\tqr.c = q.c * r.c - q.s * r.s;\n\treturn qr;\n}\n\n/// Transpose multiply two rotations: qT * r\ninline b2Rot b2MulT(const b2Rot& q, const b2Rot& r)\n{\n\t// [ qc qs] * [rc -rs] = [qc*rc+qs*rs -qc*rs+qs*rc]\n\t// [-qs qc]   [rs  rc]   [-qs*rc+qc*rs qs*rs+qc*rc]\n\t// s = qc * rs - qs * rc\n\t// c = qc * rc + qs * rs\n\tb2Rot qr;\n\tqr.s = q.c * r.s - q.s * r.c;\n\tqr.c = q.c * r.c + q.s * r.s;\n\treturn qr;\n}\n\n/// Rotate a vector\ninline b2Vec2 b2Mul(const b2Rot& q, const b2Vec2& v)\n{\n\treturn b2Vec2(q.c * v.x - q.s * v.y, q.s * v.x + q.c * v.y);\n}\n\n/// Inverse rotate a vector\ninline b2Vec2 b2MulT(const b2Rot& q, const b2Vec2& v)\n{\n\treturn b2Vec2(q.c * v.x + q.s * v.y, -q.s * v.x + q.c * v.y);\n}\n\ninline b2Vec2 b2Mul(const b2Transform& T, const b2Vec2& v)\n{\n\tfloat32 x = (T.q.c * v.x - T.q.s * v.y) + T.p.x;\n\tfloat32 y = (T.q.s * v.x + T.q.c * v.y) + T.p.y;\n\n\treturn b2Vec2(x, y);\n}\n\ninline b2Vec2 b2MulT(const b2Transform& T, const b2Vec2& v)\n{\n\tfloat32 px = v.x - T.p.x;\n\tfloat32 py = v.y - T.p.y;\n\tfloat32 x = (T.q.c * px + T.q.s * py);\n\tfloat32 y = (-T.q.s * px + T.q.c * py);\n\n\treturn b2Vec2(x, y);\n}\n\n// v2 = A.q.Rot(B.q.Rot(v1) + B.p) + A.p\n//    = (A.q * B.q).Rot(v1) + A.q.Rot(B.p) + A.p\ninline b2Transform b2Mul(const b2Transform& A, const b2Transform& B)\n{\n\tb2Transform C;\n\tC.q = b2Mul(A.q, B.q);\n\tC.p = b2Mul(A.q, B.p) + A.p;\n\treturn C;\n}\n\n// v2 = A.q' * (B.q * v1 + B.p - A.p)\n//    = A.q' * B.q * v1 + A.q' * (B.p - A.p)\ninline b2Transform b2MulT(const b2Transform& A, const b2Transform& B)\n{\n\tb2Transform C;\n\tC.q = b2MulT(A.q, B.q);\n\tC.p = b2MulT(A.q, B.p - A.p);\n\treturn C;\n}\n\ntemplate <typename T>\ninline T b2Abs(T a)\n{\n\treturn a > T(0) ? a : -a;\n}\n\ninline b2Vec2 b2Abs(const b2Vec2& a)\n{\n\treturn b2Vec2(b2Abs(a.x), b2Abs(a.y));\n}\n\ninline b2Mat22 b2Abs(const b2Mat22& A)\n{\n\treturn b2Mat22(b2Abs(A.ex), b2Abs(A.ey));\n}\n\ntemplate <typename T>\ninline T b2Min(T a, T b)\n{\n\treturn a < b ? a : b;\n}\n\ninline b2Vec2 b2Min(const b2Vec2& a, const b2Vec2& b)\n{\n\treturn b2Vec2(b2Min(a.x, b.x), b2Min(a.y, b.y));\n}\n\ntemplate <typename T>\ninline T b2Max(T a, T b)\n{\n\treturn a > b ? a : b;\n}\n\ninline b2Vec2 b2Max(const b2Vec2& a, const b2Vec2& b)\n{\n\treturn b2Vec2(b2Max(a.x, b.x), b2Max(a.y, b.y));\n}\n\ntemplate <typename T>\ninline T b2Clamp(T a, T low, T high)\n{\n\treturn b2Max(low, b2Min(a, high));\n}\n\ninline b2Vec2 b2Clamp(const b2Vec2& a, const b2Vec2& low, const b2Vec2& high)\n{\n\treturn b2Max(low, b2Min(a, high));\n}\n\ntemplate<typename T> inline void b2Swap(T& a, T& b)\n{\n\tT tmp = a;\n\ta = b;\n\tb = tmp;\n}\n\n/// \"Next Largest Power of 2\n/// Given a binary integer value x, the next largest power of 2 can be computed by a SWAR algorithm\n/// that recursively \"folds\" the upper bits into the lower bits. This process yields a bit vector with\n/// the same most significant 1 as x, but all 1's below it. Adding 1 to that value yields the next\n/// largest power of 2. For a 32-bit value:\"\ninline uint32 b2NextPowerOfTwo(uint32 x)\n{\n\tx |= (x >> 1);\n\tx |= (x >> 2);\n\tx |= (x >> 4);\n\tx |= (x >> 8);\n\tx |= (x >> 16);\n\treturn x + 1;\n}\n\ninline bool b2IsPowerOfTwo(uint32 x)\n{\n\tbool result = x > 0 && (x & (x - 1)) == 0;\n\treturn result;\n}\n\ninline void b2Sweep::GetTransform(b2Transform* xf, float32 beta) const\n{\n\txf->p = (1.0f - beta) * c0 + beta * c;\n\tfloat32 angle = (1.0f - beta) * a0 + beta * a;\n\txf->q.Set(angle);\n\n\t// Shift to origin\n\txf->p -= b2Mul(xf->q, localCenter);\n}\n\ninline void b2Sweep::Advance(float32 alpha)\n{\n\tb2Assert(alpha0 < 1.0f);\n\tfloat32 beta = (alpha - alpha0) / (1.0f - alpha0);\n\tc0 += beta * (c - c0);\n\ta0 += beta * (a - a0);\n\talpha0 = alpha;\n}\n\n/// Normalize an angle in radians to be between -pi and pi\ninline void b2Sweep::Normalize()\n{\n\tfloat32 twoPi = 2.0f * b2_pi;\n\tfloat32 d =  twoPi * floor(a0 / twoPi);\n\ta0 -= d;\n\ta -= d;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2Settings.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Common/b2Settings.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <stdlib.h>\n\nb2Version b2_version = {2, 3, 0};\n\n// Memory allocators. Modify these to use your own allocator.\nvoid* b2Alloc(int32 size)\n{\n\treturn malloc(size);\n}\n\nvoid b2Free(void* mem)\n{\n\tfree(mem);\n}\n\n// You can modify this to use your logging facility.\nvoid b2Log(const char* string, ...)\n{\n\tva_list args;\n\tva_start(args, string);\n\tvprintf(string, args);\n\tva_end(args);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2Settings.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_SETTINGS_H\n#define B2_SETTINGS_H\n\n#include <stddef.h>\n#include <assert.h>\n#include <float.h>\n\n#define B2_NOT_USED(x) ((void)(x))\n#define b2Assert(A) assert(A)\n\ntypedef signed char\tint8;\ntypedef signed short int16;\ntypedef signed int int32;\ntypedef unsigned char uint8;\ntypedef unsigned short uint16;\ntypedef unsigned int uint32;\ntypedef float float32;\ntypedef double float64;\n\n#define\tb2_maxFloat\t\tFLT_MAX\n#define\tb2_epsilon\t\tFLT_EPSILON\n#define b2_pi\t\t\t3.14159265359f\n\n/// @file\n/// Global tuning constants based on meters-kilograms-seconds (MKS) units.\n///\n\n// Collision\n\n/// The maximum number of contact points between two convex shapes. Do\n/// not change this value.\n#define b2_maxManifoldPoints\t2\n\n/// The maximum number of vertices on a convex polygon. You cannot increase\n/// this too much because b2BlockAllocator has a maximum object size.\n#define b2_maxPolygonVertices\t8\n\n/// This is used to fatten AABBs in the dynamic tree. This allows proxies\n/// to move by a small amount without triggering a tree adjustment.\n/// This is in meters.\n#define b2_aabbExtension\t\t0.1f\n\n/// This is used to fatten AABBs in the dynamic tree. This is used to predict\n/// the future position based on the current displacement.\n/// This is a dimensionless multiplier.\n#define b2_aabbMultiplier\t\t2.0f\n\n/// A small length used as a collision and constraint tolerance. Usually it is\n/// chosen to be numerically significant, but visually insignificant.\n#define b2_linearSlop\t\t\t0.005f\n\n/// A small angle used as a collision and constraint tolerance. Usually it is\n/// chosen to be numerically significant, but visually insignificant.\n#define b2_angularSlop\t\t\t(2.0f / 180.0f * b2_pi)\n\n/// The radius of the polygon/edge shape skin. This should not be modified. Making\n/// this smaller means polygons will have an insufficient buffer for continuous collision.\n/// Making it larger may create artifacts for vertex collision.\n#define b2_polygonRadius\t\t(2.0f * b2_linearSlop)\n\n/// Maximum number of sub-steps per contact in continuous physics simulation.\n#define b2_maxSubSteps\t\t\t8\n\n\n// Dynamics\n\n/// Maximum number of contacts to be handled to solve a TOI impact.\n#define b2_maxTOIContacts\t\t\t32\n\n/// A velocity threshold for elastic collisions. Any collision with a relative linear\n/// velocity below this threshold will be treated as inelastic.\n#define b2_velocityThreshold\t\t1.0f\n\n/// The maximum linear position correction used when solving constraints. This helps to\n/// prevent overshoot.\n#define b2_maxLinearCorrection\t\t0.2f\n\n/// The maximum angular position correction used when solving constraints. This helps to\n/// prevent overshoot.\n#define b2_maxAngularCorrection\t\t(8.0f / 180.0f * b2_pi)\n\n/// The maximum linear velocity of a body. This limit is very large and is used\n/// to prevent numerical problems. You shouldn't need to adjust this.\n#define b2_maxTranslation\t\t\t2.0f\n#define b2_maxTranslationSquared\t(b2_maxTranslation * b2_maxTranslation)\n\n/// The maximum angular velocity of a body. This limit is very large and is used\n/// to prevent numerical problems. You shouldn't need to adjust this.\n#define b2_maxRotation\t\t\t\t(0.5f * b2_pi)\n#define b2_maxRotationSquared\t\t(b2_maxRotation * b2_maxRotation)\n\n/// This scale factor controls how fast overlap is resolved. Ideally this would be 1 so\n/// that overlap is removed in one time step. However using values close to 1 often lead\n/// to overshoot.\n#define b2_baumgarte\t\t\t\t0.2f\n#define b2_toiBaugarte\t\t\t\t0.75f\n\n\n// Sleep\n\n/// The time that a body must be still before it will go to sleep.\n#define b2_timeToSleep\t\t\t\t0.5f\n\n/// A body cannot sleep if its linear velocity is above this tolerance.\n#define b2_linearSleepTolerance\t\t0.01f\n\n/// A body cannot sleep if its angular velocity is above this tolerance.\n#define b2_angularSleepTolerance\t(2.0f / 180.0f * b2_pi)\n\n// Memory Allocation\n\n/// Implement this function to use your own memory allocator.\nvoid* b2Alloc(int32 size);\n\n/// If you implement b2Alloc, you should also implement this function.\nvoid b2Free(void* mem);\n\n/// Logging function.\nvoid b2Log(const char* string, ...);\n\n/// Version numbering scheme.\n/// See http://en.wikipedia.org/wiki/Software_versioning\nstruct b2Version\n{\n\tint32 major;\t\t///< significant changes\n\tint32 minor;\t\t///< incremental changes\n\tint32 revision;\t\t///< bug fixes\n};\n\n/// Current version.\nextern b2Version b2_version;\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2StackAllocator.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Common/b2StackAllocator.h>\n#include <Box2D/Common/b2Math.h>\n\nb2StackAllocator::b2StackAllocator()\n{\n\tm_index = 0;\n\tm_allocation = 0;\n\tm_maxAllocation = 0;\n\tm_entryCount = 0;\n}\n\nb2StackAllocator::~b2StackAllocator()\n{\n\tb2Assert(m_index == 0);\n\tb2Assert(m_entryCount == 0);\n}\n\nvoid* b2StackAllocator::Allocate(int32 size)\n{\n\tb2Assert(m_entryCount < b2_maxStackEntries);\n\n\tb2StackEntry* entry = m_entries + m_entryCount;\n\tentry->size = size;\n\tif (m_index + size > b2_stackSize)\n\t{\n\t\tentry->data = (char*)b2Alloc(size);\n\t\tentry->usedMalloc = true;\n\t}\n\telse\n\t{\n\t\tentry->data = m_data + m_index;\n\t\tentry->usedMalloc = false;\n\t\tm_index += size;\n\t}\n\n\tm_allocation += size;\n\tm_maxAllocation = b2Max(m_maxAllocation, m_allocation);\n\t++m_entryCount;\n\n\treturn entry->data;\n}\n\nvoid b2StackAllocator::Free(void* p)\n{\n\tb2Assert(m_entryCount > 0);\n\tb2StackEntry* entry = m_entries + m_entryCount - 1;\n\tb2Assert(p == entry->data);\n\tif (entry->usedMalloc)\n\t{\n\t\tb2Free(p);\n\t}\n\telse\n\t{\n\t\tm_index -= entry->size;\n\t}\n\tm_allocation -= entry->size;\n\t--m_entryCount;\n\n\tp = NULL;\n}\n\nint32 b2StackAllocator::GetMaxAllocation() const\n{\n\treturn m_maxAllocation;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2StackAllocator.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_STACK_ALLOCATOR_H\n#define B2_STACK_ALLOCATOR_H\n\n#include <Box2D/Common/b2Settings.h>\n\nconst int32 b2_stackSize = 100 * 1024;\t// 100k\nconst int32 b2_maxStackEntries = 32;\n\nstruct b2StackEntry\n{\n\tchar* data;\n\tint32 size;\n\tbool usedMalloc;\n};\n\n// This is a stack allocator used for fast per step allocations.\n// You must nest allocate/free pairs. The code will assert\n// if you try to interleave multiple allocate/free pairs.\nclass b2StackAllocator\n{\npublic:\n\tb2StackAllocator();\n\t~b2StackAllocator();\n\n\tvoid* Allocate(int32 size);\n\tvoid Free(void* p);\n\n\tint32 GetMaxAllocation() const;\n\nprivate:\n\n\tchar m_data[b2_stackSize];\n\tint32 m_index;\n\n\tint32 m_allocation;\n\tint32 m_maxAllocation;\n\n\tb2StackEntry m_entries[b2_maxStackEntries];\n\tint32 m_entryCount;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2Timer.cpp",
    "content": "/*\n* Copyright (c) 2011 Erin Catto http://box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Common/b2Timer.h>\n\n#if defined(_WIN32)\n\nfloat64 b2Timer::s_invFrequency = 0.0f;\n\n#define WIN32_LEAN_AND_MEAN\n#include <windows.h>\n\nb2Timer::b2Timer()\n{\n\tLARGE_INTEGER largeInteger;\n\n\tif (s_invFrequency == 0.0f)\n\t{\n\t\tQueryPerformanceFrequency(&largeInteger);\n\t\ts_invFrequency = float64(largeInteger.QuadPart);\n\t\tif (s_invFrequency > 0.0f)\n\t\t{\n\t\t\ts_invFrequency = 1000.0f / s_invFrequency;\n\t\t}\n\t}\n\n\tQueryPerformanceCounter(&largeInteger);\n\tm_start = float64(largeInteger.QuadPart);\n}\n\nvoid b2Timer::Reset()\n{\n\tLARGE_INTEGER largeInteger;\n\tQueryPerformanceCounter(&largeInteger);\n\tm_start = float64(largeInteger.QuadPart);\n}\n\nfloat32 b2Timer::GetMilliseconds() const\n{\n\tLARGE_INTEGER largeInteger;\n\tQueryPerformanceCounter(&largeInteger);\n\tfloat64 count = float64(largeInteger.QuadPart);\n\tfloat32 ms = float32(s_invFrequency * (count - m_start));\n\treturn ms;\n}\n\n#elif defined(__linux__) || defined (__APPLE__)\n\n#include <sys/time.h>\n\nb2Timer::b2Timer()\n{\n    Reset();\n}\n\nvoid b2Timer::Reset()\n{\n    timeval t;\n    gettimeofday(&t, 0);\n    m_start_sec = t.tv_sec;\n    m_start_usec = t.tv_usec;\n}\n\nfloat32 b2Timer::GetMilliseconds() const\n{\n    timeval t;\n    gettimeofday(&t, 0);\n    return 1000.0f * (t.tv_sec - m_start_sec) + 0.001f * (t.tv_usec - m_start_usec);\n}\n\n#else\n\nb2Timer::b2Timer()\n{\n}\n\nvoid b2Timer::Reset()\n{\n}\n\nfloat32 b2Timer::GetMilliseconds() const\n{\n\treturn 0.0f;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Common/b2Timer.h",
    "content": "/*\n* Copyright (c) 2011 Erin Catto http://box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_TIMER_H\n#define B2_TIMER_H\n\n#include <Box2D/Common/b2Settings.h>\n\n/// Timer for profiling. This has platform specific code and may\n/// not work on every platform.\nclass b2Timer\n{\npublic:\n\n\t/// Constructor\n\tb2Timer();\n\n\t/// Reset the timer.\n\tvoid Reset();\n\n\t/// Get the time since construction or the last reset.\n\tfloat32 GetMilliseconds() const;\n\nprivate:\n\n#if defined(_WIN32)\n\tfloat64 m_start;\n\tstatic float64 s_invFrequency;\n#elif defined(__linux__) || defined (__APPLE__)\n\tunsigned long m_start_sec;\n\tunsigned long m_start_usec;\n#endif\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.cpp",
    "content": "/*\n* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Contacts/b2ChainAndCircleContact.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Collision/Shapes/b2ChainShape.h>\n#include <Box2D/Collision/Shapes/b2EdgeShape.h>\n\n#include <new>\n\nb2Contact* b2ChainAndCircleContact::Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator)\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2ChainAndCircleContact));\n\treturn new (mem) b2ChainAndCircleContact(fixtureA, indexA, fixtureB, indexB);\n}\n\nvoid b2ChainAndCircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator)\n{\n\t((b2ChainAndCircleContact*)contact)->~b2ChainAndCircleContact();\n\tallocator->Free(contact, sizeof(b2ChainAndCircleContact));\n}\n\nb2ChainAndCircleContact::b2ChainAndCircleContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB)\n: b2Contact(fixtureA, indexA, fixtureB, indexB)\n{\n\tb2Assert(m_fixtureA->GetType() == b2Shape::e_chain);\n\tb2Assert(m_fixtureB->GetType() == b2Shape::e_circle);\n}\n\nvoid b2ChainAndCircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB)\n{\n\tb2ChainShape* chain = (b2ChainShape*)m_fixtureA->GetShape();\n\tb2EdgeShape edge;\n\tchain->GetChildEdge(&edge, m_indexA);\n\tb2CollideEdgeAndCircle(\tmanifold, &edge, xfA,\n\t\t\t\t\t\t\t(b2CircleShape*)m_fixtureB->GetShape(), xfB);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_CHAIN_AND_CIRCLE_CONTACT_H\n#define B2_CHAIN_AND_CIRCLE_CONTACT_H\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n\nclass b2BlockAllocator;\n\nclass b2ChainAndCircleContact : public b2Contact\n{\npublic:\n\tstatic b2Contact* Create(\tb2Fixture* fixtureA, int32 indexA,\n\t\t\t\t\t\t\t\tb2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Contact* contact, b2BlockAllocator* allocator);\n\n\tb2ChainAndCircleContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB);\n\t~b2ChainAndCircleContact() {}\n\n\tvoid Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.cpp",
    "content": "/*\n* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Collision/Shapes/b2ChainShape.h>\n#include <Box2D/Collision/Shapes/b2EdgeShape.h>\n\n#include <new>\n\nb2Contact* b2ChainAndPolygonContact::Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator)\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2ChainAndPolygonContact));\n\treturn new (mem) b2ChainAndPolygonContact(fixtureA, indexA, fixtureB, indexB);\n}\n\nvoid b2ChainAndPolygonContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator)\n{\n\t((b2ChainAndPolygonContact*)contact)->~b2ChainAndPolygonContact();\n\tallocator->Free(contact, sizeof(b2ChainAndPolygonContact));\n}\n\nb2ChainAndPolygonContact::b2ChainAndPolygonContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB)\n: b2Contact(fixtureA, indexA, fixtureB, indexB)\n{\n\tb2Assert(m_fixtureA->GetType() == b2Shape::e_chain);\n\tb2Assert(m_fixtureB->GetType() == b2Shape::e_polygon);\n}\n\nvoid b2ChainAndPolygonContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB)\n{\n\tb2ChainShape* chain = (b2ChainShape*)m_fixtureA->GetShape();\n\tb2EdgeShape edge;\n\tchain->GetChildEdge(&edge, m_indexA);\n\tb2CollideEdgeAndPolygon(\tmanifold, &edge, xfA,\n\t\t\t\t\t\t\t\t(b2PolygonShape*)m_fixtureB->GetShape(), xfB);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_CHAIN_AND_POLYGON_CONTACT_H\n#define B2_CHAIN_AND_POLYGON_CONTACT_H\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n\nclass b2BlockAllocator;\n\nclass b2ChainAndPolygonContact : public b2Contact\n{\npublic:\n\tstatic b2Contact* Create(\tb2Fixture* fixtureA, int32 indexA,\n\t\t\t\t\t\t\t\tb2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Contact* contact, b2BlockAllocator* allocator);\n\n\tb2ChainAndPolygonContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB);\n\t~b2ChainAndPolygonContact() {}\n\n\tvoid Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2CircleContact.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Contacts/b2CircleContact.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/b2WorldCallbacks.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Collision/b2TimeOfImpact.h>\n\n#include <new>\n\nb2Contact* b2CircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator)\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2CircleContact));\n\treturn new (mem) b2CircleContact(fixtureA, fixtureB);\n}\n\nvoid b2CircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator)\n{\n\t((b2CircleContact*)contact)->~b2CircleContact();\n\tallocator->Free(contact, sizeof(b2CircleContact));\n}\n\nb2CircleContact::b2CircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB)\n\t: b2Contact(fixtureA, 0, fixtureB, 0)\n{\n\tb2Assert(m_fixtureA->GetType() == b2Shape::e_circle);\n\tb2Assert(m_fixtureB->GetType() == b2Shape::e_circle);\n}\n\nvoid b2CircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB)\n{\n\tb2CollideCircles(manifold,\n\t\t\t\t\t(b2CircleShape*)m_fixtureA->GetShape(), xfA,\n\t\t\t\t\t(b2CircleShape*)m_fixtureB->GetShape(), xfB);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2CircleContact.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_CIRCLE_CONTACT_H\n#define B2_CIRCLE_CONTACT_H\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n\nclass b2BlockAllocator;\n\nclass b2CircleContact : public b2Contact\n{\npublic:\n\tstatic b2Contact* Create(\tb2Fixture* fixtureA, int32 indexA,\n\t\t\t\t\t\t\t\tb2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Contact* contact, b2BlockAllocator* allocator);\n\n\tb2CircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB);\n\t~b2CircleContact() {}\n\n\tvoid Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2Contact.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n#include <Box2D/Dynamics/Contacts/b2CircleContact.h>\n#include <Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h>\n#include <Box2D/Dynamics/Contacts/b2PolygonContact.h>\n#include <Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h>\n#include <Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h>\n#include <Box2D/Dynamics/Contacts/b2ChainAndCircleContact.h>\n#include <Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.h>\n#include <Box2D/Dynamics/Contacts/b2ContactSolver.h>\n\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/b2TimeOfImpact.h>\n#include <Box2D/Collision/Shapes/b2Shape.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/b2World.h>\n\nb2ContactRegister b2Contact::s_registers[b2Shape::e_typeCount][b2Shape::e_typeCount];\nbool b2Contact::s_initialized = false;\n\nvoid b2Contact::InitializeRegisters()\n{\n\tAddType(b2CircleContact::Create, b2CircleContact::Destroy, b2Shape::e_circle, b2Shape::e_circle);\n\tAddType(b2PolygonAndCircleContact::Create, b2PolygonAndCircleContact::Destroy, b2Shape::e_polygon, b2Shape::e_circle);\n\tAddType(b2PolygonContact::Create, b2PolygonContact::Destroy, b2Shape::e_polygon, b2Shape::e_polygon);\n\tAddType(b2EdgeAndCircleContact::Create, b2EdgeAndCircleContact::Destroy, b2Shape::e_edge, b2Shape::e_circle);\n\tAddType(b2EdgeAndPolygonContact::Create, b2EdgeAndPolygonContact::Destroy, b2Shape::e_edge, b2Shape::e_polygon);\n\tAddType(b2ChainAndCircleContact::Create, b2ChainAndCircleContact::Destroy, b2Shape::e_chain, b2Shape::e_circle);\n\tAddType(b2ChainAndPolygonContact::Create, b2ChainAndPolygonContact::Destroy, b2Shape::e_chain, b2Shape::e_polygon);\n}\n\nvoid b2Contact::AddType(b2ContactCreateFcn* createFcn, b2ContactDestroyFcn* destoryFcn,\n\t\t\t\t\t\tb2Shape::Type type1, b2Shape::Type type2)\n{\n\tb2Assert(0 <= type1 && type1 < b2Shape::e_typeCount);\n\tb2Assert(0 <= type2 && type2 < b2Shape::e_typeCount);\n\t\n\ts_registers[type1][type2].createFcn = createFcn;\n\ts_registers[type1][type2].destroyFcn = destoryFcn;\n\ts_registers[type1][type2].primary = true;\n\n\tif (type1 != type2)\n\t{\n\t\ts_registers[type2][type1].createFcn = createFcn;\n\t\ts_registers[type2][type1].destroyFcn = destoryFcn;\n\t\ts_registers[type2][type1].primary = false;\n\t}\n}\n\nb2Contact* b2Contact::Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator)\n{\n\tif (s_initialized == false)\n\t{\n\t\tInitializeRegisters();\n\t\ts_initialized = true;\n\t}\n\n\tb2Shape::Type type1 = fixtureA->GetType();\n\tb2Shape::Type type2 = fixtureB->GetType();\n\n\tb2Assert(0 <= type1 && type1 < b2Shape::e_typeCount);\n\tb2Assert(0 <= type2 && type2 < b2Shape::e_typeCount);\n\t\n\tb2ContactCreateFcn* createFcn = s_registers[type1][type2].createFcn;\n\tif (createFcn)\n\t{\n\t\tif (s_registers[type1][type2].primary)\n\t\t{\n\t\t\treturn createFcn(fixtureA, indexA, fixtureB, indexB, allocator);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn createFcn(fixtureB, indexB, fixtureA, indexA, allocator);\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn NULL;\n\t}\n}\n\nvoid b2Contact::Destroy(b2Contact* contact, b2BlockAllocator* allocator)\n{\n\tb2Assert(s_initialized == true);\n\n\tb2Fixture* fixtureA = contact->m_fixtureA;\n\tb2Fixture* fixtureB = contact->m_fixtureB;\n\n\tif (contact->m_manifold.pointCount > 0 &&\n\t\tfixtureA->IsSensor() == false &&\n\t\tfixtureB->IsSensor() == false)\n\t{\n\t\tfixtureA->GetBody()->SetAwake(true);\n\t\tfixtureB->GetBody()->SetAwake(true);\n\t}\n\n\tb2Shape::Type typeA = fixtureA->GetType();\n\tb2Shape::Type typeB = fixtureB->GetType();\n\n\tb2Assert(0 <= typeA && typeB < b2Shape::e_typeCount);\n\tb2Assert(0 <= typeA && typeB < b2Shape::e_typeCount);\n\n\tb2ContactDestroyFcn* destroyFcn = s_registers[typeA][typeB].destroyFcn;\n\tdestroyFcn(contact, allocator);\n}\n\nb2Contact::b2Contact(b2Fixture* fA, int32 indexA, b2Fixture* fB, int32 indexB)\n{\n\tm_flags = e_enabledFlag;\n\n\tm_fixtureA = fA;\n\tm_fixtureB = fB;\n\n\tm_indexA = indexA;\n\tm_indexB = indexB;\n\n\tm_manifold.pointCount = 0;\n\n\tm_prev = NULL;\n\tm_next = NULL;\n\n\tm_nodeA.contact = NULL;\n\tm_nodeA.prev = NULL;\n\tm_nodeA.next = NULL;\n\tm_nodeA.other = NULL;\n\n\tm_nodeB.contact = NULL;\n\tm_nodeB.prev = NULL;\n\tm_nodeB.next = NULL;\n\tm_nodeB.other = NULL;\n\n\tm_toiCount = 0;\n\n\tm_friction = b2MixFriction(m_fixtureA->m_friction, m_fixtureB->m_friction);\n\tm_restitution = b2MixRestitution(m_fixtureA->m_restitution, m_fixtureB->m_restitution);\n\n\tm_tangentSpeed = 0.0f;\n}\n\n// Update the contact manifold and touching status.\n// Note: do not assume the fixture AABBs are overlapping or are valid.\nvoid b2Contact::Update(b2ContactListener* listener)\n{\n\tb2Manifold oldManifold = m_manifold;\n\n\t// Re-enable this contact.\n\tm_flags |= e_enabledFlag;\n\n\tbool touching = false;\n\tbool wasTouching = (m_flags & e_touchingFlag) == e_touchingFlag;\n\n\tbool sensorA = m_fixtureA->IsSensor();\n\tbool sensorB = m_fixtureB->IsSensor();\n\tbool sensor = sensorA || sensorB;\n\n\tb2Body* bodyA = m_fixtureA->GetBody();\n\tb2Body* bodyB = m_fixtureB->GetBody();\n\tconst b2Transform& xfA = bodyA->GetTransform();\n\tconst b2Transform& xfB = bodyB->GetTransform();\n\n\t// Is this contact a sensor?\n\tif (sensor)\n\t{\n\t\tconst b2Shape* shapeA = m_fixtureA->GetShape();\n\t\tconst b2Shape* shapeB = m_fixtureB->GetShape();\n\t\ttouching = b2TestOverlap(shapeA, m_indexA, shapeB, m_indexB, xfA, xfB);\n\n\t\t// Sensors don't generate manifolds.\n\t\tm_manifold.pointCount = 0;\n\t}\n\telse\n\t{\n\t\tEvaluate(&m_manifold, xfA, xfB);\n\t\ttouching = m_manifold.pointCount > 0;\n\n\t\t// Match old contact ids to new contact ids and copy the\n\t\t// stored impulses to warm start the solver.\n\t\tfor (int32 i = 0; i < m_manifold.pointCount; ++i)\n\t\t{\n\t\t\tb2ManifoldPoint* mp2 = m_manifold.points + i;\n\t\t\tmp2->normalImpulse = 0.0f;\n\t\t\tmp2->tangentImpulse = 0.0f;\n\t\t\tb2ContactID id2 = mp2->id;\n\n\t\t\tfor (int32 j = 0; j < oldManifold.pointCount; ++j)\n\t\t\t{\n\t\t\t\tb2ManifoldPoint* mp1 = oldManifold.points + j;\n\n\t\t\t\tif (mp1->id.key == id2.key)\n\t\t\t\t{\n\t\t\t\t\tmp2->normalImpulse = mp1->normalImpulse;\n\t\t\t\t\tmp2->tangentImpulse = mp1->tangentImpulse;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (touching != wasTouching)\n\t\t{\n\t\t\tbodyA->SetAwake(true);\n\t\t\tbodyB->SetAwake(true);\n\t\t}\n\t}\n\n\tif (touching)\n\t{\n\t\tm_flags |= e_touchingFlag;\n\t}\n\telse\n\t{\n\t\tm_flags &= ~e_touchingFlag;\n\t}\n\n\tif (wasTouching == false && touching == true && listener)\n\t{\n\t\tlistener->BeginContact(this);\n\t}\n\n\tif (wasTouching == true && touching == false && listener)\n\t{\n\t\tlistener->EndContact(this);\n\t}\n\n\tif (sensor == false && touching && listener)\n\t{\n\t\tlistener->PreSolve(this, &oldManifold);\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2Contact.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_CONTACT_H\n#define B2_CONTACT_H\n\n#include <Box2D/Common/b2Math.h>\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/Shapes/b2Shape.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n\nclass b2Body;\nclass b2Contact;\nclass b2Fixture;\nclass b2World;\nclass b2BlockAllocator;\nclass b2StackAllocator;\nclass b2ContactListener;\n\n/// Friction mixing law. The idea is to allow either fixture to drive the restitution to zero.\n/// For example, anything slides on ice.\ninline float32 b2MixFriction(float32 friction1, float32 friction2)\n{\n\treturn b2Sqrt(friction1 * friction2);\n}\n\n/// Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface.\n/// For example, a superball bounces on anything.\ninline float32 b2MixRestitution(float32 restitution1, float32 restitution2)\n{\n\treturn restitution1 > restitution2 ? restitution1 : restitution2;\n}\n\ntypedef b2Contact* b2ContactCreateFcn(\tb2Fixture* fixtureA, int32 indexA,\n\t\t\t\t\t\t\t\t\t\tb2Fixture* fixtureB, int32 indexB,\n\t\t\t\t\t\t\t\t\t\tb2BlockAllocator* allocator);\ntypedef void b2ContactDestroyFcn(b2Contact* contact, b2BlockAllocator* allocator);\n\nstruct b2ContactRegister\n{\n\tb2ContactCreateFcn* createFcn;\n\tb2ContactDestroyFcn* destroyFcn;\n\tbool primary;\n};\n\n/// A contact edge is used to connect bodies and contacts together\n/// in a contact graph where each body is a node and each contact\n/// is an edge. A contact edge belongs to a doubly linked list\n/// maintained in each attached body. Each contact has two contact\n/// nodes, one for each attached body.\nstruct b2ContactEdge\n{\n\tb2Body* other;\t\t\t///< provides quick access to the other body attached.\n\tb2Contact* contact;\t\t///< the contact\n\tb2ContactEdge* prev;\t///< the previous contact edge in the body's contact list\n\tb2ContactEdge* next;\t///< the next contact edge in the body's contact list\n};\n\n/// The class manages contact between two shapes. A contact exists for each overlapping\n/// AABB in the broad-phase (except if filtered). Therefore a contact object may exist\n/// that has no contact points.\nclass b2Contact\n{\npublic:\n\n\t/// Get the contact manifold. Do not modify the manifold unless you understand the\n\t/// internals of Box2D.\n\tb2Manifold* GetManifold();\n\tconst b2Manifold* GetManifold() const;\n\n\t/// Get the world manifold.\n\tvoid GetWorldManifold(b2WorldManifold* worldManifold) const;\n\n\t/// Is this contact touching?\n\tbool IsTouching() const;\n\n\t/// Enable/disable this contact. This can be used inside the pre-solve\n\t/// contact listener. The contact is only disabled for the current\n\t/// time step (or sub-step in continuous collisions).\n\tvoid SetEnabled(bool flag);\n\n\t/// Has this contact been disabled?\n\tbool IsEnabled() const;\n\n\t/// Get the next contact in the world's contact list.\n\tb2Contact* GetNext();\n\tconst b2Contact* GetNext() const;\n\n\t/// Get fixture A in this contact.\n\tb2Fixture* GetFixtureA();\n\tconst b2Fixture* GetFixtureA() const;\n\n\t/// Get the child primitive index for fixture A.\n\tint32 GetChildIndexA() const;\n\n\t/// Get fixture B in this contact.\n\tb2Fixture* GetFixtureB();\n\tconst b2Fixture* GetFixtureB() const;\n\n\t/// Get the child primitive index for fixture B.\n\tint32 GetChildIndexB() const;\n\n\t/// Override the default friction mixture. You can call this in b2ContactListener::PreSolve.\n\t/// This value persists until set or reset.\n\tvoid SetFriction(float32 friction);\n\n\t/// Get the friction.\n\tfloat32 GetFriction() const;\n\n\t/// Reset the friction mixture to the default value.\n\tvoid ResetFriction();\n\n\t/// Override the default restitution mixture. You can call this in b2ContactListener::PreSolve.\n\t/// The value persists until you set or reset.\n\tvoid SetRestitution(float32 restitution);\n\n\t/// Get the restitution.\n\tfloat32 GetRestitution() const;\n\n\t/// Reset the restitution to the default value.\n\tvoid ResetRestitution();\n\n\t/// Set the desired tangent speed for a conveyor belt behavior. In meters per second.\n\tvoid SetTangentSpeed(float32 speed);\n\n\t/// Get the desired tangent speed. In meters per second.\n\tfloat32 GetTangentSpeed() const;\n\n\t/// Evaluate this contact with your own manifold and transforms.\n\tvirtual void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) = 0;\n\nprotected:\n\tfriend class b2ContactManager;\n\tfriend class b2World;\n\tfriend class b2ContactSolver;\n\tfriend class b2Body;\n\tfriend class b2Fixture;\n\n\t// Flags stored in m_flags\n\tenum\n\t{\n\t\t// Used when crawling contact graph when forming islands.\n\t\te_islandFlag\t\t= 0x0001,\n\n        // Set when the shapes are touching.\n\t\te_touchingFlag\t\t= 0x0002,\n\n\t\t// This contact can be disabled (by user)\n\t\te_enabledFlag\t\t= 0x0004,\n\n\t\t// This contact needs filtering because a fixture filter was changed.\n\t\te_filterFlag\t\t= 0x0008,\n\n\t\t// This bullet contact had a TOI event\n\t\te_bulletHitFlag\t\t= 0x0010,\n\n\t\t// This contact has a valid TOI in m_toi\n\t\te_toiFlag\t\t\t= 0x0020\n\t};\n\n\t/// Flag this contact for filtering. Filtering will occur the next time step.\n\tvoid FlagForFiltering();\n\n\tstatic void AddType(b2ContactCreateFcn* createFcn, b2ContactDestroyFcn* destroyFcn,\n\t\t\t\t\t\tb2Shape::Type typeA, b2Shape::Type typeB);\n\tstatic void InitializeRegisters();\n\tstatic b2Contact* Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Contact* contact, b2Shape::Type typeA, b2Shape::Type typeB, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Contact* contact, b2BlockAllocator* allocator);\n\n\tb2Contact() : m_fixtureA(NULL), m_fixtureB(NULL) {}\n\tb2Contact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB);\n\tvirtual ~b2Contact() {}\n\n\tvoid Update(b2ContactListener* listener);\n\n\tstatic b2ContactRegister s_registers[b2Shape::e_typeCount][b2Shape::e_typeCount];\n\tstatic bool s_initialized;\n\n\tuint32 m_flags;\n\n\t// World pool and list pointers.\n\tb2Contact* m_prev;\n\tb2Contact* m_next;\n\n\t// Nodes for connecting bodies.\n\tb2ContactEdge m_nodeA;\n\tb2ContactEdge m_nodeB;\n\n\tb2Fixture* m_fixtureA;\n\tb2Fixture* m_fixtureB;\n\n\tint32 m_indexA;\n\tint32 m_indexB;\n\n\tb2Manifold m_manifold;\n\n\tint32 m_toiCount;\n\tfloat32 m_toi;\n\n\tfloat32 m_friction;\n\tfloat32 m_restitution;\n\n\tfloat32 m_tangentSpeed;\n};\n\ninline b2Manifold* b2Contact::GetManifold()\n{\n\treturn &m_manifold;\n}\n\ninline const b2Manifold* b2Contact::GetManifold() const\n{\n\treturn &m_manifold;\n}\n\ninline void b2Contact::GetWorldManifold(b2WorldManifold* worldManifold) const\n{\n\tconst b2Body* bodyA = m_fixtureA->GetBody();\n\tconst b2Body* bodyB = m_fixtureB->GetBody();\n\tconst b2Shape* shapeA = m_fixtureA->GetShape();\n\tconst b2Shape* shapeB = m_fixtureB->GetShape();\n\n\tworldManifold->Initialize(&m_manifold, bodyA->GetTransform(), shapeA->m_radius, bodyB->GetTransform(), shapeB->m_radius);\n}\n\ninline void b2Contact::SetEnabled(bool flag)\n{\n\tif (flag)\n\t{\n\t\tm_flags |= e_enabledFlag;\n\t}\n\telse\n\t{\n\t\tm_flags &= ~e_enabledFlag;\n\t}\n}\n\ninline bool b2Contact::IsEnabled() const\n{\n\treturn (m_flags & e_enabledFlag) == e_enabledFlag;\n}\n\ninline bool b2Contact::IsTouching() const\n{\n\treturn (m_flags & e_touchingFlag) == e_touchingFlag;\n}\n\ninline b2Contact* b2Contact::GetNext()\n{\n\treturn m_next;\n}\n\ninline const b2Contact* b2Contact::GetNext() const\n{\n\treturn m_next;\n}\n\ninline b2Fixture* b2Contact::GetFixtureA()\n{\n\treturn m_fixtureA;\n}\n\ninline const b2Fixture* b2Contact::GetFixtureA() const\n{\n\treturn m_fixtureA;\n}\n\ninline b2Fixture* b2Contact::GetFixtureB()\n{\n\treturn m_fixtureB;\n}\n\ninline int32 b2Contact::GetChildIndexA() const\n{\n\treturn m_indexA;\n}\n\ninline const b2Fixture* b2Contact::GetFixtureB() const\n{\n\treturn m_fixtureB;\n}\n\ninline int32 b2Contact::GetChildIndexB() const\n{\n\treturn m_indexB;\n}\n\ninline void b2Contact::FlagForFiltering()\n{\n\tm_flags |= e_filterFlag;\n}\n\ninline void b2Contact::SetFriction(float32 friction)\n{\n\tm_friction = friction;\n}\n\ninline float32 b2Contact::GetFriction() const\n{\n\treturn m_friction;\n}\n\ninline void b2Contact::ResetFriction()\n{\n\tm_friction = b2MixFriction(m_fixtureA->m_friction, m_fixtureB->m_friction);\n}\n\ninline void b2Contact::SetRestitution(float32 restitution)\n{\n\tm_restitution = restitution;\n}\n\ninline float32 b2Contact::GetRestitution() const\n{\n\treturn m_restitution;\n}\n\ninline void b2Contact::ResetRestitution()\n{\n\tm_restitution = b2MixRestitution(m_fixtureA->m_restitution, m_fixtureB->m_restitution);\n}\n\ninline void b2Contact::SetTangentSpeed(float32 speed)\n{\n\tm_tangentSpeed = speed;\n}\n\ninline float32 b2Contact::GetTangentSpeed() const\n{\n\treturn m_tangentSpeed;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2ContactSolver.cpp",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Contacts/b2ContactSolver.h>\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/b2World.h>\n#include <Box2D/Common/b2StackAllocator.h>\n\n#define B2_DEBUG_SOLVER 0\n\nstruct b2ContactPositionConstraint\n{\n\tb2Vec2 localPoints[b2_maxManifoldPoints];\n\tb2Vec2 localNormal;\n\tb2Vec2 localPoint;\n\tint32 indexA;\n\tint32 indexB;\n\tfloat32 invMassA, invMassB;\n\tb2Vec2 localCenterA, localCenterB;\n\tfloat32 invIA, invIB;\n\tb2Manifold::Type type;\n\tfloat32 radiusA, radiusB;\n\tint32 pointCount;\n};\n\nb2ContactSolver::b2ContactSolver(b2ContactSolverDef* def)\n{\n\tm_step = def->step;\n\tm_allocator = def->allocator;\n\tm_count = def->count;\n\tm_positionConstraints = (b2ContactPositionConstraint*)m_allocator->Allocate(m_count * sizeof(b2ContactPositionConstraint));\n\tm_velocityConstraints = (b2ContactVelocityConstraint*)m_allocator->Allocate(m_count * sizeof(b2ContactVelocityConstraint));\n\tm_positions = def->positions;\n\tm_velocities = def->velocities;\n\tm_contacts = def->contacts;\n\n\t// Initialize position independent portions of the constraints.\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tb2Contact* contact = m_contacts[i];\n\n\t\tb2Fixture* fixtureA = contact->m_fixtureA;\n\t\tb2Fixture* fixtureB = contact->m_fixtureB;\n\t\tb2Shape* shapeA = fixtureA->GetShape();\n\t\tb2Shape* shapeB = fixtureB->GetShape();\n\t\tfloat32 radiusA = shapeA->m_radius;\n\t\tfloat32 radiusB = shapeB->m_radius;\n\t\tb2Body* bodyA = fixtureA->GetBody();\n\t\tb2Body* bodyB = fixtureB->GetBody();\n\t\tb2Manifold* manifold = contact->GetManifold();\n\n\t\tint32 pointCount = manifold->pointCount;\n\t\tb2Assert(pointCount > 0);\n\n\t\tb2ContactVelocityConstraint* vc = m_velocityConstraints + i;\n\t\tvc->friction = contact->m_friction;\n\t\tvc->restitution = contact->m_restitution;\n\t\tvc->tangentSpeed = contact->m_tangentSpeed;\n\t\tvc->indexA = bodyA->m_islandIndex;\n\t\tvc->indexB = bodyB->m_islandIndex;\n\t\tvc->invMassA = bodyA->m_invMass;\n\t\tvc->invMassB = bodyB->m_invMass;\n\t\tvc->invIA = bodyA->m_invI;\n\t\tvc->invIB = bodyB->m_invI;\n\t\tvc->contactIndex = i;\n\t\tvc->pointCount = pointCount;\n\t\tvc->K.SetZero();\n\t\tvc->normalMass.SetZero();\n\n\t\tb2ContactPositionConstraint* pc = m_positionConstraints + i;\n\t\tpc->indexA = bodyA->m_islandIndex;\n\t\tpc->indexB = bodyB->m_islandIndex;\n\t\tpc->invMassA = bodyA->m_invMass;\n\t\tpc->invMassB = bodyB->m_invMass;\n\t\tpc->localCenterA = bodyA->m_sweep.localCenter;\n\t\tpc->localCenterB = bodyB->m_sweep.localCenter;\n\t\tpc->invIA = bodyA->m_invI;\n\t\tpc->invIB = bodyB->m_invI;\n\t\tpc->localNormal = manifold->localNormal;\n\t\tpc->localPoint = manifold->localPoint;\n\t\tpc->pointCount = pointCount;\n\t\tpc->radiusA = radiusA;\n\t\tpc->radiusB = radiusB;\n\t\tpc->type = manifold->type;\n\n\t\tfor (int32 j = 0; j < pointCount; ++j)\n\t\t{\n\t\t\tb2ManifoldPoint* cp = manifold->points + j;\n\t\t\tb2VelocityConstraintPoint* vcp = vc->points + j;\n\t\n\t\t\tif (m_step.warmStarting)\n\t\t\t{\n\t\t\t\tvcp->normalImpulse = m_step.dtRatio * cp->normalImpulse;\n\t\t\t\tvcp->tangentImpulse = m_step.dtRatio * cp->tangentImpulse;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvcp->normalImpulse = 0.0f;\n\t\t\t\tvcp->tangentImpulse = 0.0f;\n\t\t\t}\n\n\t\t\tvcp->rA.SetZero();\n\t\t\tvcp->rB.SetZero();\n\t\t\tvcp->normalMass = 0.0f;\n\t\t\tvcp->tangentMass = 0.0f;\n\t\t\tvcp->velocityBias = 0.0f;\n\n\t\t\tpc->localPoints[j] = cp->localPoint;\n\t\t}\n\t}\n}\n\nb2ContactSolver::~b2ContactSolver()\n{\n\tm_allocator->Free(m_velocityConstraints);\n\tm_allocator->Free(m_positionConstraints);\n}\n\n// Initialize position dependent portions of the velocity constraints.\nvoid b2ContactSolver::InitializeVelocityConstraints()\n{\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tb2ContactVelocityConstraint* vc = m_velocityConstraints + i;\n\t\tb2ContactPositionConstraint* pc = m_positionConstraints + i;\n\n\t\tfloat32 radiusA = pc->radiusA;\n\t\tfloat32 radiusB = pc->radiusB;\n\t\tb2Manifold* manifold = m_contacts[vc->contactIndex]->GetManifold();\n\n\t\tint32 indexA = vc->indexA;\n\t\tint32 indexB = vc->indexB;\n\n\t\tfloat32 mA = vc->invMassA;\n\t\tfloat32 mB = vc->invMassB;\n\t\tfloat32 iA = vc->invIA;\n\t\tfloat32 iB = vc->invIB;\n\t\tb2Vec2 localCenterA = pc->localCenterA;\n\t\tb2Vec2 localCenterB = pc->localCenterB;\n\n\t\tb2Vec2 cA = m_positions[indexA].c;\n\t\tfloat32 aA = m_positions[indexA].a;\n\t\tb2Vec2 vA = m_velocities[indexA].v;\n\t\tfloat32 wA = m_velocities[indexA].w;\n\n\t\tb2Vec2 cB = m_positions[indexB].c;\n\t\tfloat32 aB = m_positions[indexB].a;\n\t\tb2Vec2 vB = m_velocities[indexB].v;\n\t\tfloat32 wB = m_velocities[indexB].w;\n\n\t\tb2Assert(manifold->pointCount > 0);\n\n\t\tb2Transform xfA, xfB;\n\t\txfA.q.Set(aA);\n\t\txfB.q.Set(aB);\n\t\txfA.p = cA - b2Mul(xfA.q, localCenterA);\n\t\txfB.p = cB - b2Mul(xfB.q, localCenterB);\n\n\t\tb2WorldManifold worldManifold;\n\t\tworldManifold.Initialize(manifold, xfA, radiusA, xfB, radiusB);\n\n\t\tvc->normal = worldManifold.normal;\n\n\t\tint32 pointCount = vc->pointCount;\n\t\tfor (int32 j = 0; j < pointCount; ++j)\n\t\t{\n\t\t\tb2VelocityConstraintPoint* vcp = vc->points + j;\n\n\t\t\tvcp->rA = worldManifold.points[j] - cA;\n\t\t\tvcp->rB = worldManifold.points[j] - cB;\n\n\t\t\tfloat32 rnA = b2Cross(vcp->rA, vc->normal);\n\t\t\tfloat32 rnB = b2Cross(vcp->rB, vc->normal);\n\n\t\t\tfloat32 kNormal = mA + mB + iA * rnA * rnA + iB * rnB * rnB;\n\n\t\t\tvcp->normalMass = kNormal > 0.0f ? 1.0f / kNormal : 0.0f;\n\n\t\t\tb2Vec2 tangent = b2Cross(vc->normal, 1.0f);\n\n\t\t\tfloat32 rtA = b2Cross(vcp->rA, tangent);\n\t\t\tfloat32 rtB = b2Cross(vcp->rB, tangent);\n\n\t\t\tfloat32 kTangent = mA + mB + iA * rtA * rtA + iB * rtB * rtB;\n\n\t\t\tvcp->tangentMass = kTangent > 0.0f ? 1.0f /  kTangent : 0.0f;\n\n\t\t\t// Setup a velocity bias for restitution.\n\t\t\tvcp->velocityBias = 0.0f;\n\t\t\tfloat32 vRel = b2Dot(vc->normal, vB + b2Cross(wB, vcp->rB) - vA - b2Cross(wA, vcp->rA));\n\t\t\tif (vRel < -b2_velocityThreshold)\n\t\t\t{\n\t\t\t\tvcp->velocityBias = -vc->restitution * vRel;\n\t\t\t}\n\t\t}\n\n\t\t// If we have two points, then prepare the block solver.\n\t\tif (vc->pointCount == 2)\n\t\t{\n\t\t\tb2VelocityConstraintPoint* vcp1 = vc->points + 0;\n\t\t\tb2VelocityConstraintPoint* vcp2 = vc->points + 1;\n\n\t\t\tfloat32 rn1A = b2Cross(vcp1->rA, vc->normal);\n\t\t\tfloat32 rn1B = b2Cross(vcp1->rB, vc->normal);\n\t\t\tfloat32 rn2A = b2Cross(vcp2->rA, vc->normal);\n\t\t\tfloat32 rn2B = b2Cross(vcp2->rB, vc->normal);\n\n\t\t\tfloat32 k11 = mA + mB + iA * rn1A * rn1A + iB * rn1B * rn1B;\n\t\t\tfloat32 k22 = mA + mB + iA * rn2A * rn2A + iB * rn2B * rn2B;\n\t\t\tfloat32 k12 = mA + mB + iA * rn1A * rn2A + iB * rn1B * rn2B;\n\n\t\t\t// Ensure a reasonable condition number.\n\t\t\tconst float32 k_maxConditionNumber = 1000.0f;\n\t\t\tif (k11 * k11 < k_maxConditionNumber * (k11 * k22 - k12 * k12))\n\t\t\t{\n\t\t\t\t// K is safe to invert.\n\t\t\t\tvc->K.ex.Set(k11, k12);\n\t\t\t\tvc->K.ey.Set(k12, k22);\n\t\t\t\tvc->normalMass = vc->K.GetInverse();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The constraints are redundant, just use one.\n\t\t\t\t// TODO_ERIN use deepest?\n\t\t\t\tvc->pointCount = 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid b2ContactSolver::WarmStart()\n{\n\t// Warm start.\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tb2ContactVelocityConstraint* vc = m_velocityConstraints + i;\n\n\t\tint32 indexA = vc->indexA;\n\t\tint32 indexB = vc->indexB;\n\t\tfloat32 mA = vc->invMassA;\n\t\tfloat32 iA = vc->invIA;\n\t\tfloat32 mB = vc->invMassB;\n\t\tfloat32 iB = vc->invIB;\n\t\tint32 pointCount = vc->pointCount;\n\n\t\tb2Vec2 vA = m_velocities[indexA].v;\n\t\tfloat32 wA = m_velocities[indexA].w;\n\t\tb2Vec2 vB = m_velocities[indexB].v;\n\t\tfloat32 wB = m_velocities[indexB].w;\n\n\t\tb2Vec2 normal = vc->normal;\n\t\tb2Vec2 tangent = b2Cross(normal, 1.0f);\n\n\t\tfor (int32 j = 0; j < pointCount; ++j)\n\t\t{\n\t\t\tb2VelocityConstraintPoint* vcp = vc->points + j;\n\t\t\tb2Vec2 P = vcp->normalImpulse * normal + vcp->tangentImpulse * tangent;\n\t\t\twA -= iA * b2Cross(vcp->rA, P);\n\t\t\tvA -= mA * P;\n\t\t\twB += iB * b2Cross(vcp->rB, P);\n\t\t\tvB += mB * P;\n\t\t}\n\n\t\tm_velocities[indexA].v = vA;\n\t\tm_velocities[indexA].w = wA;\n\t\tm_velocities[indexB].v = vB;\n\t\tm_velocities[indexB].w = wB;\n\t}\n}\n\nvoid b2ContactSolver::SolveVelocityConstraints()\n{\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tb2ContactVelocityConstraint* vc = m_velocityConstraints + i;\n\n\t\tint32 indexA = vc->indexA;\n\t\tint32 indexB = vc->indexB;\n\t\tfloat32 mA = vc->invMassA;\n\t\tfloat32 iA = vc->invIA;\n\t\tfloat32 mB = vc->invMassB;\n\t\tfloat32 iB = vc->invIB;\n\t\tint32 pointCount = vc->pointCount;\n\n\t\tb2Vec2 vA = m_velocities[indexA].v;\n\t\tfloat32 wA = m_velocities[indexA].w;\n\t\tb2Vec2 vB = m_velocities[indexB].v;\n\t\tfloat32 wB = m_velocities[indexB].w;\n\n\t\tb2Vec2 normal = vc->normal;\n\t\tb2Vec2 tangent = b2Cross(normal, 1.0f);\n\t\tfloat32 friction = vc->friction;\n\n\t\tb2Assert(pointCount == 1 || pointCount == 2);\n\n\t\t// Solve tangent constraints first because non-penetration is more important\n\t\t// than friction.\n\t\tfor (int32 j = 0; j < pointCount; ++j)\n\t\t{\n\t\t\tb2VelocityConstraintPoint* vcp = vc->points + j;\n\n\t\t\t// Relative velocity at contact\n\t\t\tb2Vec2 dv = vB + b2Cross(wB, vcp->rB) - vA - b2Cross(wA, vcp->rA);\n\n\t\t\t// Compute tangent force\n\t\t\tfloat32 vt = b2Dot(dv, tangent) - vc->tangentSpeed;\n\t\t\tfloat32 lambda = vcp->tangentMass * (-vt);\n\n\t\t\t// b2Clamp the accumulated force\n\t\t\tfloat32 maxFriction = friction * vcp->normalImpulse;\n\t\t\tfloat32 newImpulse = b2Clamp(vcp->tangentImpulse + lambda, -maxFriction, maxFriction);\n\t\t\tlambda = newImpulse - vcp->tangentImpulse;\n\t\t\tvcp->tangentImpulse = newImpulse;\n\n\t\t\t// Apply contact impulse\n\t\t\tb2Vec2 P = lambda * tangent;\n\n\t\t\tvA -= mA * P;\n\t\t\twA -= iA * b2Cross(vcp->rA, P);\n\n\t\t\tvB += mB * P;\n\t\t\twB += iB * b2Cross(vcp->rB, P);\n\t\t}\n\n\t\t// Solve normal constraints\n\t\tif (vc->pointCount == 1)\n\t\t{\n\t\t\tb2VelocityConstraintPoint* vcp = vc->points + 0;\n\n\t\t\t// Relative velocity at contact\n\t\t\tb2Vec2 dv = vB + b2Cross(wB, vcp->rB) - vA - b2Cross(wA, vcp->rA);\n\n\t\t\t// Compute normal impulse\n\t\t\tfloat32 vn = b2Dot(dv, normal);\n\t\t\tfloat32 lambda = -vcp->normalMass * (vn - vcp->velocityBias);\n\n\t\t\t// b2Clamp the accumulated impulse\n\t\t\tfloat32 newImpulse = b2Max(vcp->normalImpulse + lambda, 0.0f);\n\t\t\tlambda = newImpulse - vcp->normalImpulse;\n\t\t\tvcp->normalImpulse = newImpulse;\n\n\t\t\t// Apply contact impulse\n\t\t\tb2Vec2 P = lambda * normal;\n\t\t\tvA -= mA * P;\n\t\t\twA -= iA * b2Cross(vcp->rA, P);\n\n\t\t\tvB += mB * P;\n\t\t\twB += iB * b2Cross(vcp->rB, P);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Block solver developed in collaboration with Dirk Gregorius (back in 01/07 on Box2D_Lite).\n\t\t\t// Build the mini LCP for this contact patch\n\t\t\t//\n\t\t\t// vn = A * x + b, vn >= 0, , vn >= 0, x >= 0 and vn_i * x_i = 0 with i = 1..2\n\t\t\t//\n\t\t\t// A = J * W * JT and J = ( -n, -r1 x n, n, r2 x n )\n\t\t\t// b = vn0 - velocityBias\n\t\t\t//\n\t\t\t// The system is solved using the \"Total enumeration method\" (s. Murty). The complementary constraint vn_i * x_i\n\t\t\t// implies that we must have in any solution either vn_i = 0 or x_i = 0. So for the 2D contact problem the cases\n\t\t\t// vn1 = 0 and vn2 = 0, x1 = 0 and x2 = 0, x1 = 0 and vn2 = 0, x2 = 0 and vn1 = 0 need to be tested. The first valid\n\t\t\t// solution that satisfies the problem is chosen.\n\t\t\t// \n\t\t\t// In order to account of the accumulated impulse 'a' (because of the iterative nature of the solver which only requires\n\t\t\t// that the accumulated impulse is clamped and not the incremental impulse) we change the impulse variable (x_i).\n\t\t\t//\n\t\t\t// Substitute:\n\t\t\t// \n\t\t\t// x = a + d\n\t\t\t// \n\t\t\t// a := old total impulse\n\t\t\t// x := new total impulse\n\t\t\t// d := incremental impulse \n\t\t\t//\n\t\t\t// For the current iteration we extend the formula for the incremental impulse\n\t\t\t// to compute the new total impulse:\n\t\t\t//\n\t\t\t// vn = A * d + b\n\t\t\t//    = A * (x - a) + b\n\t\t\t//    = A * x + b - A * a\n\t\t\t//    = A * x + b'\n\t\t\t// b' = b - A * a;\n\n\t\t\tb2VelocityConstraintPoint* cp1 = vc->points + 0;\n\t\t\tb2VelocityConstraintPoint* cp2 = vc->points + 1;\n\n\t\t\tb2Vec2 a(cp1->normalImpulse, cp2->normalImpulse);\n\t\t\tb2Assert(a.x >= 0.0f && a.y >= 0.0f);\n\n\t\t\t// Relative velocity at contact\n\t\t\tb2Vec2 dv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA);\n\t\t\tb2Vec2 dv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA);\n\n\t\t\t// Compute normal velocity\n\t\t\tfloat32 vn1 = b2Dot(dv1, normal);\n\t\t\tfloat32 vn2 = b2Dot(dv2, normal);\n\n\t\t\tb2Vec2 b;\n\t\t\tb.x = vn1 - cp1->velocityBias;\n\t\t\tb.y = vn2 - cp2->velocityBias;\n\n\t\t\t// Compute b'\n\t\t\tb -= b2Mul(vc->K, a);\n\n\t\t\tconst float32 k_errorTol = 1e-3f;\n\t\t\tB2_NOT_USED(k_errorTol);\n\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t// Case 1: vn = 0\n\t\t\t\t//\n\t\t\t\t// 0 = A * x + b'\n\t\t\t\t//\n\t\t\t\t// Solve for x:\n\t\t\t\t//\n\t\t\t\t// x = - inv(A) * b'\n\t\t\t\t//\n\t\t\t\tb2Vec2 x = - b2Mul(vc->normalMass, b);\n\n\t\t\t\tif (x.x >= 0.0f && x.y >= 0.0f)\n\t\t\t\t{\n\t\t\t\t\t// Get the incremental impulse\n\t\t\t\t\tb2Vec2 d = x - a;\n\n\t\t\t\t\t// Apply incremental impulse\n\t\t\t\t\tb2Vec2 P1 = d.x * normal;\n\t\t\t\t\tb2Vec2 P2 = d.y * normal;\n\t\t\t\t\tvA -= mA * (P1 + P2);\n\t\t\t\t\twA -= iA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2));\n\n\t\t\t\t\tvB += mB * (P1 + P2);\n\t\t\t\t\twB += iB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2));\n\n\t\t\t\t\t// Accumulate\n\t\t\t\t\tcp1->normalImpulse = x.x;\n\t\t\t\t\tcp2->normalImpulse = x.y;\n\n#if B2_DEBUG_SOLVER == 1\n\t\t\t\t\t// Postconditions\n\t\t\t\t\tdv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA);\n\t\t\t\t\tdv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA);\n\n\t\t\t\t\t// Compute normal velocity\n\t\t\t\t\tvn1 = b2Dot(dv1, normal);\n\t\t\t\t\tvn2 = b2Dot(dv2, normal);\n\n\t\t\t\t\tb2Assert(b2Abs(vn1 - cp1->velocityBias) < k_errorTol);\n\t\t\t\t\tb2Assert(b2Abs(vn2 - cp2->velocityBias) < k_errorTol);\n#endif\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// Case 2: vn1 = 0 and x2 = 0\n\t\t\t\t//\n\t\t\t\t//   0 = a11 * x1 + a12 * 0 + b1' \n\t\t\t\t// vn2 = a21 * x1 + a22 * 0 + b2'\n\t\t\t\t//\n\t\t\t\tx.x = - cp1->normalMass * b.x;\n\t\t\t\tx.y = 0.0f;\n\t\t\t\tvn1 = 0.0f;\n\t\t\t\tvn2 = vc->K.ex.y * x.x + b.y;\n\n\t\t\t\tif (x.x >= 0.0f && vn2 >= 0.0f)\n\t\t\t\t{\n\t\t\t\t\t// Get the incremental impulse\n\t\t\t\t\tb2Vec2 d = x - a;\n\n\t\t\t\t\t// Apply incremental impulse\n\t\t\t\t\tb2Vec2 P1 = d.x * normal;\n\t\t\t\t\tb2Vec2 P2 = d.y * normal;\n\t\t\t\t\tvA -= mA * (P1 + P2);\n\t\t\t\t\twA -= iA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2));\n\n\t\t\t\t\tvB += mB * (P1 + P2);\n\t\t\t\t\twB += iB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2));\n\n\t\t\t\t\t// Accumulate\n\t\t\t\t\tcp1->normalImpulse = x.x;\n\t\t\t\t\tcp2->normalImpulse = x.y;\n\n#if B2_DEBUG_SOLVER == 1\n\t\t\t\t\t// Postconditions\n\t\t\t\t\tdv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA);\n\n\t\t\t\t\t// Compute normal velocity\n\t\t\t\t\tvn1 = b2Dot(dv1, normal);\n\n\t\t\t\t\tb2Assert(b2Abs(vn1 - cp1->velocityBias) < k_errorTol);\n#endif\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\n\t\t\t\t//\n\t\t\t\t// Case 3: vn2 = 0 and x1 = 0\n\t\t\t\t//\n\t\t\t\t// vn1 = a11 * 0 + a12 * x2 + b1' \n\t\t\t\t//   0 = a21 * 0 + a22 * x2 + b2'\n\t\t\t\t//\n\t\t\t\tx.x = 0.0f;\n\t\t\t\tx.y = - cp2->normalMass * b.y;\n\t\t\t\tvn1 = vc->K.ey.x * x.y + b.x;\n\t\t\t\tvn2 = 0.0f;\n\n\t\t\t\tif (x.y >= 0.0f && vn1 >= 0.0f)\n\t\t\t\t{\n\t\t\t\t\t// Resubstitute for the incremental impulse\n\t\t\t\t\tb2Vec2 d = x - a;\n\n\t\t\t\t\t// Apply incremental impulse\n\t\t\t\t\tb2Vec2 P1 = d.x * normal;\n\t\t\t\t\tb2Vec2 P2 = d.y * normal;\n\t\t\t\t\tvA -= mA * (P1 + P2);\n\t\t\t\t\twA -= iA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2));\n\n\t\t\t\t\tvB += mB * (P1 + P2);\n\t\t\t\t\twB += iB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2));\n\n\t\t\t\t\t// Accumulate\n\t\t\t\t\tcp1->normalImpulse = x.x;\n\t\t\t\t\tcp2->normalImpulse = x.y;\n\n#if B2_DEBUG_SOLVER == 1\n\t\t\t\t\t// Postconditions\n\t\t\t\t\tdv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA);\n\n\t\t\t\t\t// Compute normal velocity\n\t\t\t\t\tvn2 = b2Dot(dv2, normal);\n\n\t\t\t\t\tb2Assert(b2Abs(vn2 - cp2->velocityBias) < k_errorTol);\n#endif\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// Case 4: x1 = 0 and x2 = 0\n\t\t\t\t// \n\t\t\t\t// vn1 = b1\n\t\t\t\t// vn2 = b2;\n\t\t\t\tx.x = 0.0f;\n\t\t\t\tx.y = 0.0f;\n\t\t\t\tvn1 = b.x;\n\t\t\t\tvn2 = b.y;\n\n\t\t\t\tif (vn1 >= 0.0f && vn2 >= 0.0f )\n\t\t\t\t{\n\t\t\t\t\t// Resubstitute for the incremental impulse\n\t\t\t\t\tb2Vec2 d = x - a;\n\n\t\t\t\t\t// Apply incremental impulse\n\t\t\t\t\tb2Vec2 P1 = d.x * normal;\n\t\t\t\t\tb2Vec2 P2 = d.y * normal;\n\t\t\t\t\tvA -= mA * (P1 + P2);\n\t\t\t\t\twA -= iA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2));\n\n\t\t\t\t\tvB += mB * (P1 + P2);\n\t\t\t\t\twB += iB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2));\n\n\t\t\t\t\t// Accumulate\n\t\t\t\t\tcp1->normalImpulse = x.x;\n\t\t\t\t\tcp2->normalImpulse = x.y;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// No solution, give up. This is hit sometimes, but it doesn't seem to matter.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tm_velocities[indexA].v = vA;\n\t\tm_velocities[indexA].w = wA;\n\t\tm_velocities[indexB].v = vB;\n\t\tm_velocities[indexB].w = wB;\n\t}\n}\n\nvoid b2ContactSolver::StoreImpulses()\n{\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tb2ContactVelocityConstraint* vc = m_velocityConstraints + i;\n\t\tb2Manifold* manifold = m_contacts[vc->contactIndex]->GetManifold();\n\n\t\tfor (int32 j = 0; j < vc->pointCount; ++j)\n\t\t{\n\t\t\tmanifold->points[j].normalImpulse = vc->points[j].normalImpulse;\n\t\t\tmanifold->points[j].tangentImpulse = vc->points[j].tangentImpulse;\n\t\t}\n\t}\n}\n\nstruct b2PositionSolverManifold\n{\n\tvoid Initialize(b2ContactPositionConstraint* pc, const b2Transform& xfA, const b2Transform& xfB, int32 index)\n\t{\n\t\tb2Assert(pc->pointCount > 0);\n\n\t\tswitch (pc->type)\n\t\t{\n\t\tcase b2Manifold::e_circles:\n\t\t\t{\n\t\t\t\tb2Vec2 pointA = b2Mul(xfA, pc->localPoint);\n\t\t\t\tb2Vec2 pointB = b2Mul(xfB, pc->localPoints[0]);\n\t\t\t\tnormal = pointB - pointA;\n\t\t\t\tnormal.Normalize();\n\t\t\t\tpoint = 0.5f * (pointA + pointB);\n\t\t\t\tseparation = b2Dot(pointB - pointA, normal) - pc->radiusA - pc->radiusB;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase b2Manifold::e_faceA:\n\t\t\t{\n\t\t\t\tnormal = b2Mul(xfA.q, pc->localNormal);\n\t\t\t\tb2Vec2 planePoint = b2Mul(xfA, pc->localPoint);\n\n\t\t\t\tb2Vec2 clipPoint = b2Mul(xfB, pc->localPoints[index]);\n\t\t\t\tseparation = b2Dot(clipPoint - planePoint, normal) - pc->radiusA - pc->radiusB;\n\t\t\t\tpoint = clipPoint;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase b2Manifold::e_faceB:\n\t\t\t{\n\t\t\t\tnormal = b2Mul(xfB.q, pc->localNormal);\n\t\t\t\tb2Vec2 planePoint = b2Mul(xfB, pc->localPoint);\n\n\t\t\t\tb2Vec2 clipPoint = b2Mul(xfA, pc->localPoints[index]);\n\t\t\t\tseparation = b2Dot(clipPoint - planePoint, normal) - pc->radiusA - pc->radiusB;\n\t\t\t\tpoint = clipPoint;\n\n\t\t\t\t// Ensure normal points from A to B\n\t\t\t\tnormal = -normal;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tb2Vec2 normal;\n\tb2Vec2 point;\n\tfloat32 separation;\n};\n\n// Sequential solver.\nbool b2ContactSolver::SolvePositionConstraints()\n{\n\tfloat32 minSeparation = 0.0f;\n\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tb2ContactPositionConstraint* pc = m_positionConstraints + i;\n\n\t\tint32 indexA = pc->indexA;\n\t\tint32 indexB = pc->indexB;\n\t\tb2Vec2 localCenterA = pc->localCenterA;\n\t\tfloat32 mA = pc->invMassA;\n\t\tfloat32 iA = pc->invIA;\n\t\tb2Vec2 localCenterB = pc->localCenterB;\n\t\tfloat32 mB = pc->invMassB;\n\t\tfloat32 iB = pc->invIB;\n\t\tint32 pointCount = pc->pointCount;\n\n\t\tb2Vec2 cA = m_positions[indexA].c;\n\t\tfloat32 aA = m_positions[indexA].a;\n\n\t\tb2Vec2 cB = m_positions[indexB].c;\n\t\tfloat32 aB = m_positions[indexB].a;\n\n\t\t// Solve normal constraints\n\t\tfor (int32 j = 0; j < pointCount; ++j)\n\t\t{\n\t\t\tb2Transform xfA, xfB;\n\t\t\txfA.q.Set(aA);\n\t\t\txfB.q.Set(aB);\n\t\t\txfA.p = cA - b2Mul(xfA.q, localCenterA);\n\t\t\txfB.p = cB - b2Mul(xfB.q, localCenterB);\n\n\t\t\tb2PositionSolverManifold psm;\n\t\t\tpsm.Initialize(pc, xfA, xfB, j);\n\t\t\tb2Vec2 normal = psm.normal;\n\n\t\t\tb2Vec2 point = psm.point;\n\t\t\tfloat32 separation = psm.separation;\n\n\t\t\tb2Vec2 rA = point - cA;\n\t\t\tb2Vec2 rB = point - cB;\n\n\t\t\t// Track max constraint error.\n\t\t\tminSeparation = b2Min(minSeparation, separation);\n\n\t\t\t// Prevent large corrections and allow slop.\n\t\t\tfloat32 C = b2Clamp(b2_baumgarte * (separation + b2_linearSlop), -b2_maxLinearCorrection, 0.0f);\n\n\t\t\t// Compute the effective mass.\n\t\t\tfloat32 rnA = b2Cross(rA, normal);\n\t\t\tfloat32 rnB = b2Cross(rB, normal);\n\t\t\tfloat32 K = mA + mB + iA * rnA * rnA + iB * rnB * rnB;\n\n\t\t\t// Compute normal impulse\n\t\t\tfloat32 impulse = K > 0.0f ? - C / K : 0.0f;\n\n\t\t\tb2Vec2 P = impulse * normal;\n\n\t\t\tcA -= mA * P;\n\t\t\taA -= iA * b2Cross(rA, P);\n\n\t\t\tcB += mB * P;\n\t\t\taB += iB * b2Cross(rB, P);\n\t\t}\n\n\t\tm_positions[indexA].c = cA;\n\t\tm_positions[indexA].a = aA;\n\n\t\tm_positions[indexB].c = cB;\n\t\tm_positions[indexB].a = aB;\n\t}\n\n\t// We can't expect minSpeparation >= -b2_linearSlop because we don't\n\t// push the separation above -b2_linearSlop.\n\treturn minSeparation >= -3.0f * b2_linearSlop;\n}\n\n// Sequential position solver for position constraints.\nbool b2ContactSolver::SolveTOIPositionConstraints(int32 toiIndexA, int32 toiIndexB)\n{\n\tfloat32 minSeparation = 0.0f;\n\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tb2ContactPositionConstraint* pc = m_positionConstraints + i;\n\n\t\tint32 indexA = pc->indexA;\n\t\tint32 indexB = pc->indexB;\n\t\tb2Vec2 localCenterA = pc->localCenterA;\n\t\tb2Vec2 localCenterB = pc->localCenterB;\n\t\tint32 pointCount = pc->pointCount;\n\n\t\tfloat32 mA = 0.0f;\n\t\tfloat32 iA = 0.0f;\n\t\tif (indexA == toiIndexA || indexA == toiIndexB)\n\t\t{\n\t\t\tmA = pc->invMassA;\n\t\t\tiA = pc->invIA;\n\t\t}\n\n\t\tfloat32 mB = 0.0f;\n\t\tfloat32 iB = 0.;\n\t\tif (indexB == toiIndexA || indexB == toiIndexB)\n\t\t{\n\t\t\tmB = pc->invMassB;\n\t\t\tiB = pc->invIB;\n\t\t}\n\n\t\tb2Vec2 cA = m_positions[indexA].c;\n\t\tfloat32 aA = m_positions[indexA].a;\n\n\t\tb2Vec2 cB = m_positions[indexB].c;\n\t\tfloat32 aB = m_positions[indexB].a;\n\n\t\t// Solve normal constraints\n\t\tfor (int32 j = 0; j < pointCount; ++j)\n\t\t{\n\t\t\tb2Transform xfA, xfB;\n\t\t\txfA.q.Set(aA);\n\t\t\txfB.q.Set(aB);\n\t\t\txfA.p = cA - b2Mul(xfA.q, localCenterA);\n\t\t\txfB.p = cB - b2Mul(xfB.q, localCenterB);\n\n\t\t\tb2PositionSolverManifold psm;\n\t\t\tpsm.Initialize(pc, xfA, xfB, j);\n\t\t\tb2Vec2 normal = psm.normal;\n\n\t\t\tb2Vec2 point = psm.point;\n\t\t\tfloat32 separation = psm.separation;\n\n\t\t\tb2Vec2 rA = point - cA;\n\t\t\tb2Vec2 rB = point - cB;\n\n\t\t\t// Track max constraint error.\n\t\t\tminSeparation = b2Min(minSeparation, separation);\n\n\t\t\t// Prevent large corrections and allow slop.\n\t\t\tfloat32 C = b2Clamp(b2_toiBaugarte * (separation + b2_linearSlop), -b2_maxLinearCorrection, 0.0f);\n\n\t\t\t// Compute the effective mass.\n\t\t\tfloat32 rnA = b2Cross(rA, normal);\n\t\t\tfloat32 rnB = b2Cross(rB, normal);\n\t\t\tfloat32 K = mA + mB + iA * rnA * rnA + iB * rnB * rnB;\n\n\t\t\t// Compute normal impulse\n\t\t\tfloat32 impulse = K > 0.0f ? - C / K : 0.0f;\n\n\t\t\tb2Vec2 P = impulse * normal;\n\n\t\t\tcA -= mA * P;\n\t\t\taA -= iA * b2Cross(rA, P);\n\n\t\t\tcB += mB * P;\n\t\t\taB += iB * b2Cross(rB, P);\n\t\t}\n\n\t\tm_positions[indexA].c = cA;\n\t\tm_positions[indexA].a = aA;\n\n\t\tm_positions[indexB].c = cB;\n\t\tm_positions[indexB].a = aB;\n\t}\n\n\t// We can't expect minSpeparation >= -b2_linearSlop because we don't\n\t// push the separation above -b2_linearSlop.\n\treturn minSeparation >= -1.5f * b2_linearSlop;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2ContactSolver.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_CONTACT_SOLVER_H\n#define B2_CONTACT_SOLVER_H\n\n#include <Box2D/Common/b2Math.h>\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\nclass b2Contact;\nclass b2Body;\nclass b2StackAllocator;\nstruct b2ContactPositionConstraint;\n\nstruct b2VelocityConstraintPoint\n{\n\tb2Vec2 rA;\n\tb2Vec2 rB;\n\tfloat32 normalImpulse;\n\tfloat32 tangentImpulse;\n\tfloat32 normalMass;\n\tfloat32 tangentMass;\n\tfloat32 velocityBias;\n};\n\nstruct b2ContactVelocityConstraint\n{\n\tb2VelocityConstraintPoint points[b2_maxManifoldPoints];\n\tb2Vec2 normal;\n\tb2Mat22 normalMass;\n\tb2Mat22 K;\n\tint32 indexA;\n\tint32 indexB;\n\tfloat32 invMassA, invMassB;\n\tfloat32 invIA, invIB;\n\tfloat32 friction;\n\tfloat32 restitution;\n\tfloat32 tangentSpeed;\n\tint32 pointCount;\n\tint32 contactIndex;\n};\n\nstruct b2ContactSolverDef\n{\n\tb2TimeStep step;\n\tb2Contact** contacts;\n\tint32 count;\n\tb2Position* positions;\n\tb2Velocity* velocities;\n\tb2StackAllocator* allocator;\n};\n\nclass b2ContactSolver\n{\npublic:\n\tb2ContactSolver(b2ContactSolverDef* def);\n\t~b2ContactSolver();\n\n\tvoid InitializeVelocityConstraints();\n\n\tvoid WarmStart();\n\tvoid SolveVelocityConstraints();\n\tvoid StoreImpulses();\n\n\tbool SolvePositionConstraints();\n\tbool SolveTOIPositionConstraints(int32 toiIndexA, int32 toiIndexB);\n\n\tb2TimeStep m_step;\n\tb2Position* m_positions;\n\tb2Velocity* m_velocities;\n\tb2StackAllocator* m_allocator;\n\tb2ContactPositionConstraint* m_positionConstraints;\n\tb2ContactVelocityConstraint* m_velocityConstraints;\n\tb2Contact** m_contacts;\n\tint m_count;\n};\n\n#endif\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp",
    "content": "/*\n* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n\n#include <new>\n\nb2Contact* b2EdgeAndCircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator)\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2EdgeAndCircleContact));\n\treturn new (mem) b2EdgeAndCircleContact(fixtureA, fixtureB);\n}\n\nvoid b2EdgeAndCircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator)\n{\n\t((b2EdgeAndCircleContact*)contact)->~b2EdgeAndCircleContact();\n\tallocator->Free(contact, sizeof(b2EdgeAndCircleContact));\n}\n\nb2EdgeAndCircleContact::b2EdgeAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB)\n: b2Contact(fixtureA, 0, fixtureB, 0)\n{\n\tb2Assert(m_fixtureA->GetType() == b2Shape::e_edge);\n\tb2Assert(m_fixtureB->GetType() == b2Shape::e_circle);\n}\n\nvoid b2EdgeAndCircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB)\n{\n\tb2CollideEdgeAndCircle(\tmanifold,\n\t\t\t\t\t\t\t\t(b2EdgeShape*)m_fixtureA->GetShape(), xfA,\n\t\t\t\t\t\t\t\t(b2CircleShape*)m_fixtureB->GetShape(), xfB);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_EDGE_AND_CIRCLE_CONTACT_H\n#define B2_EDGE_AND_CIRCLE_CONTACT_H\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n\nclass b2BlockAllocator;\n\nclass b2EdgeAndCircleContact : public b2Contact\n{\npublic:\n\tstatic b2Contact* Create(\tb2Fixture* fixtureA, int32 indexA,\n\t\t\t\t\t\t\t\tb2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Contact* contact, b2BlockAllocator* allocator);\n\n\tb2EdgeAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB);\n\t~b2EdgeAndCircleContact() {}\n\n\tvoid Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp",
    "content": "/*\n* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n\n#include <new>\n\nb2Contact* b2EdgeAndPolygonContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator)\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2EdgeAndPolygonContact));\n\treturn new (mem) b2EdgeAndPolygonContact(fixtureA, fixtureB);\n}\n\nvoid b2EdgeAndPolygonContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator)\n{\n\t((b2EdgeAndPolygonContact*)contact)->~b2EdgeAndPolygonContact();\n\tallocator->Free(contact, sizeof(b2EdgeAndPolygonContact));\n}\n\nb2EdgeAndPolygonContact::b2EdgeAndPolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB)\n: b2Contact(fixtureA, 0, fixtureB, 0)\n{\n\tb2Assert(m_fixtureA->GetType() == b2Shape::e_edge);\n\tb2Assert(m_fixtureB->GetType() == b2Shape::e_polygon);\n}\n\nvoid b2EdgeAndPolygonContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB)\n{\n\tb2CollideEdgeAndPolygon(\tmanifold,\n\t\t\t\t\t\t\t\t(b2EdgeShape*)m_fixtureA->GetShape(), xfA,\n\t\t\t\t\t\t\t\t(b2PolygonShape*)m_fixtureB->GetShape(), xfB);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_EDGE_AND_POLYGON_CONTACT_H\n#define B2_EDGE_AND_POLYGON_CONTACT_H\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n\nclass b2BlockAllocator;\n\nclass b2EdgeAndPolygonContact : public b2Contact\n{\npublic:\n\tstatic b2Contact* Create(\tb2Fixture* fixtureA, int32 indexA,\n\t\t\t\t\t\t\t\tb2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Contact* contact, b2BlockAllocator* allocator);\n\n\tb2EdgeAndPolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB);\n\t~b2EdgeAndPolygonContact() {}\n\n\tvoid Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n\n#include <new>\n\nb2Contact* b2PolygonAndCircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator)\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2PolygonAndCircleContact));\n\treturn new (mem) b2PolygonAndCircleContact(fixtureA, fixtureB);\n}\n\nvoid b2PolygonAndCircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator)\n{\n\t((b2PolygonAndCircleContact*)contact)->~b2PolygonAndCircleContact();\n\tallocator->Free(contact, sizeof(b2PolygonAndCircleContact));\n}\n\nb2PolygonAndCircleContact::b2PolygonAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB)\n: b2Contact(fixtureA, 0, fixtureB, 0)\n{\n\tb2Assert(m_fixtureA->GetType() == b2Shape::e_polygon);\n\tb2Assert(m_fixtureB->GetType() == b2Shape::e_circle);\n}\n\nvoid b2PolygonAndCircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB)\n{\n\tb2CollidePolygonAndCircle(\tmanifold,\n\t\t\t\t\t\t\t\t(b2PolygonShape*)m_fixtureA->GetShape(), xfA,\n\t\t\t\t\t\t\t\t(b2CircleShape*)m_fixtureB->GetShape(), xfB);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_POLYGON_AND_CIRCLE_CONTACT_H\n#define B2_POLYGON_AND_CIRCLE_CONTACT_H\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n\nclass b2BlockAllocator;\n\nclass b2PolygonAndCircleContact : public b2Contact\n{\npublic:\n\tstatic b2Contact* Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Contact* contact, b2BlockAllocator* allocator);\n\n\tb2PolygonAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB);\n\t~b2PolygonAndCircleContact() {}\n\n\tvoid Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2PolygonContact.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Contacts/b2PolygonContact.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Collision/b2TimeOfImpact.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/b2WorldCallbacks.h>\n\n#include <new>\n\nb2Contact* b2PolygonContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator)\n{\n\tvoid* mem = allocator->Allocate(sizeof(b2PolygonContact));\n\treturn new (mem) b2PolygonContact(fixtureA, fixtureB);\n}\n\nvoid b2PolygonContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator)\n{\n\t((b2PolygonContact*)contact)->~b2PolygonContact();\n\tallocator->Free(contact, sizeof(b2PolygonContact));\n}\n\nb2PolygonContact::b2PolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB)\n\t: b2Contact(fixtureA, 0, fixtureB, 0)\n{\n\tb2Assert(m_fixtureA->GetType() == b2Shape::e_polygon);\n\tb2Assert(m_fixtureB->GetType() == b2Shape::e_polygon);\n}\n\nvoid b2PolygonContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB)\n{\n\tb2CollidePolygons(\tmanifold,\n\t\t\t\t\t\t(b2PolygonShape*)m_fixtureA->GetShape(), xfA,\n\t\t\t\t\t\t(b2PolygonShape*)m_fixtureB->GetShape(), xfB);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Contacts/b2PolygonContact.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_POLYGON_CONTACT_H\n#define B2_POLYGON_CONTACT_H\n\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n\nclass b2BlockAllocator;\n\nclass b2PolygonContact : public b2Contact\n{\npublic:\n\tstatic b2Contact* Create(\tb2Fixture* fixtureA, int32 indexA,\n\t\t\t\t\t\t\t\tb2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Contact* contact, b2BlockAllocator* allocator);\n\n\tb2PolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB);\n\t~b2PolygonContact() {}\n\n\tvoid Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2DistanceJoint.cpp",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2DistanceJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// 1-D constrained system\n// m (v2 - v1) = lambda\n// v2 + (beta/h) * x1 + gamma * lambda = 0, gamma has units of inverse mass.\n// x2 = x1 + h * v2\n\n// 1-D mass-damper-spring system\n// m (v2 - v1) + h * d * v2 + h * k * \n\n// C = norm(p2 - p1) - L\n// u = (p2 - p1) / norm(p2 - p1)\n// Cdot = dot(u, v2 + cross(w2, r2) - v1 - cross(w1, r1))\n// J = [-u -cross(r1, u) u cross(r2, u)]\n// K = J * invM * JT\n//   = invMass1 + invI1 * cross(r1, u)^2 + invMass2 + invI2 * cross(r2, u)^2\n\nvoid b2DistanceJointDef::Initialize(b2Body* b1, b2Body* b2,\n\t\t\t\t\t\t\t\t\tconst b2Vec2& anchor1, const b2Vec2& anchor2)\n{\n\tbodyA = b1;\n\tbodyB = b2;\n\tlocalAnchorA = bodyA->GetLocalPoint(anchor1);\n\tlocalAnchorB = bodyB->GetLocalPoint(anchor2);\n\tb2Vec2 d = anchor2 - anchor1;\n\tlength = d.Length();\n}\n\nb2DistanceJoint::b2DistanceJoint(const b2DistanceJointDef* def)\n: b2Joint(def)\n{\n\tm_localAnchorA = def->localAnchorA;\n\tm_localAnchorB = def->localAnchorB;\n\tm_length = def->length;\n\tm_frequencyHz = def->frequencyHz;\n\tm_dampingRatio = def->dampingRatio;\n\tm_impulse = 0.0f;\n\tm_gamma = 0.0f;\n\tm_bias = 0.0f;\n}\n\nvoid b2DistanceJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterA = m_bodyA->m_sweep.localCenter;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassA = m_bodyA->m_invMass;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIA = m_bodyA->m_invI;\n\tm_invIB = m_bodyB->m_invI;\n\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tm_rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tm_rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\tm_u = cB + m_rB - cA - m_rA;\n\n\t// Handle singularity.\n\tfloat32 length = m_u.Length();\n\tif (length > b2_linearSlop)\n\t{\n\t\tm_u *= 1.0f / length;\n\t}\n\telse\n\t{\n\t\tm_u.Set(0.0f, 0.0f);\n\t}\n\n\tfloat32 crAu = b2Cross(m_rA, m_u);\n\tfloat32 crBu = b2Cross(m_rB, m_u);\n\tfloat32 invMass = m_invMassA + m_invIA * crAu * crAu + m_invMassB + m_invIB * crBu * crBu;\n\n\t// Compute the effective mass matrix.\n\tm_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f;\n\n\tif (m_frequencyHz > 0.0f)\n\t{\n\t\tfloat32 C = length - m_length;\n\n\t\t// Frequency\n\t\tfloat32 omega = 2.0f * b2_pi * m_frequencyHz;\n\n\t\t// Damping coefficient\n\t\tfloat32 d = 2.0f * m_mass * m_dampingRatio * omega;\n\n\t\t// Spring stiffness\n\t\tfloat32 k = m_mass * omega * omega;\n\n\t\t// magic formulas\n\t\tfloat32 h = data.step.dt;\n\t\tm_gamma = h * (d + h * k);\n\t\tm_gamma = m_gamma != 0.0f ? 1.0f / m_gamma : 0.0f;\n\t\tm_bias = C * h * k * m_gamma;\n\n\t\tinvMass += m_gamma;\n\t\tm_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f;\n\t}\n\telse\n\t{\n\t\tm_gamma = 0.0f;\n\t\tm_bias = 0.0f;\n\t}\n\n\tif (data.step.warmStarting)\n\t{\n\t\t// Scale the impulse to support a variable time step.\n\t\tm_impulse *= data.step.dtRatio;\n\n\t\tb2Vec2 P = m_impulse * m_u;\n\t\tvA -= m_invMassA * P;\n\t\twA -= m_invIA * b2Cross(m_rA, P);\n\t\tvB += m_invMassB * P;\n\t\twB += m_invIB * b2Cross(m_rB, P);\n\t}\n\telse\n\t{\n\t\tm_impulse = 0.0f;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2DistanceJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\t// Cdot = dot(u, v + cross(w, r))\n\tb2Vec2 vpA = vA + b2Cross(wA, m_rA);\n\tb2Vec2 vpB = vB + b2Cross(wB, m_rB);\n\tfloat32 Cdot = b2Dot(m_u, vpB - vpA);\n\n\tfloat32 impulse = -m_mass * (Cdot + m_bias + m_gamma * m_impulse);\n\tm_impulse += impulse;\n\n\tb2Vec2 P = impulse * m_u;\n\tvA -= m_invMassA * P;\n\twA -= m_invIA * b2Cross(m_rA, P);\n\tvB += m_invMassB * P;\n\twB += m_invIB * b2Cross(m_rB, P);\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2DistanceJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tif (m_frequencyHz > 0.0f)\n\t{\n\t\t// There is no position correction for soft distance constraints.\n\t\treturn true;\n\t}\n\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\tb2Vec2 u = cB + rB - cA - rA;\n\n\tfloat32 length = u.Normalize();\n\tfloat32 C = length - m_length;\n\tC = b2Clamp(C, -b2_maxLinearCorrection, b2_maxLinearCorrection);\n\n\tfloat32 impulse = -m_mass * C;\n\tb2Vec2 P = impulse * u;\n\n\tcA -= m_invMassA * P;\n\taA -= m_invIA * b2Cross(rA, P);\n\tcB += m_invMassB * P;\n\taB += m_invIB * b2Cross(rB, P);\n\n\tdata.positions[m_indexA].c = cA;\n\tdata.positions[m_indexA].a = aA;\n\tdata.positions[m_indexB].c = cB;\n\tdata.positions[m_indexB].a = aB;\n\n\treturn b2Abs(C) < b2_linearSlop;\n}\n\nb2Vec2 b2DistanceJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetWorldPoint(m_localAnchorA);\n}\n\nb2Vec2 b2DistanceJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2DistanceJoint::GetReactionForce(float32 inv_dt) const\n{\n\tb2Vec2 F = (inv_dt * m_impulse) * m_u;\n\treturn F;\n}\n\nfloat32 b2DistanceJoint::GetReactionTorque(float32 inv_dt) const\n{\n\tB2_NOT_USED(inv_dt);\n\treturn 0.0f;\n}\n\nvoid b2DistanceJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tb2Log(\"  b2DistanceJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.localAnchorA.Set(%.15lef, %.15lef);\\n\", m_localAnchorA.x, m_localAnchorA.y);\n\tb2Log(\"  jd.localAnchorB.Set(%.15lef, %.15lef);\\n\", m_localAnchorB.x, m_localAnchorB.y);\n\tb2Log(\"  jd.length = %.15lef;\\n\", m_length);\n\tb2Log(\"  jd.frequencyHz = %.15lef;\\n\", m_frequencyHz);\n\tb2Log(\"  jd.dampingRatio = %.15lef;\\n\", m_dampingRatio);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2DistanceJoint.h",
    "content": "/*\n* Copyright (c) 2006-2007 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_DISTANCE_JOINT_H\n#define B2_DISTANCE_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Distance joint definition. This requires defining an\n/// anchor point on both bodies and the non-zero length of the\n/// distance joint. The definition uses local anchor points\n/// so that the initial configuration can violate the constraint\n/// slightly. This helps when saving and loading a game.\n/// @warning Do not use a zero or short length.\nstruct b2DistanceJointDef : public b2JointDef\n{\n\tb2DistanceJointDef()\n\t{\n\t\ttype = e_distanceJoint;\n\t\tlocalAnchorA.Set(0.0f, 0.0f);\n\t\tlocalAnchorB.Set(0.0f, 0.0f);\n\t\tlength = 1.0f;\n\t\tfrequencyHz = 0.0f;\n\t\tdampingRatio = 0.0f;\n\t}\n\n\t/// Initialize the bodies, anchors, and length using the world\n\t/// anchors.\n\tvoid Initialize(b2Body* bodyA, b2Body* bodyB,\n\t\t\t\t\tconst b2Vec2& anchorA, const b2Vec2& anchorB);\n\n\t/// The local anchor point relative to bodyA's origin.\n\tb2Vec2 localAnchorA;\n\n\t/// The local anchor point relative to bodyB's origin.\n\tb2Vec2 localAnchorB;\n\n\t/// The natural length between the anchor points.\n\tfloat32 length;\n\n\t/// The mass-spring-damper frequency in Hertz. A value of 0\n\t/// disables softness.\n\tfloat32 frequencyHz;\n\n\t/// The damping ratio. 0 = no damping, 1 = critical damping.\n\tfloat32 dampingRatio;\n};\n\n/// A distance joint constrains two points on two bodies\n/// to remain at a fixed distance from each other. You can view\n/// this as a massless, rigid rod.\nclass b2DistanceJoint : public b2Joint\n{\npublic:\n\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\t/// Get the reaction force given the inverse time step.\n\t/// Unit is N.\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\n\t/// Get the reaction torque given the inverse time step.\n\t/// Unit is N*m. This is always zero for a distance joint.\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// The local anchor point relative to bodyA's origin.\n\tconst b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; }\n\n\t/// The local anchor point relative to bodyB's origin.\n\tconst b2Vec2& GetLocalAnchorB() const  { return m_localAnchorB; }\n\n\t/// Set/get the natural length.\n\t/// Manipulating the length can lead to non-physical behavior when the frequency is zero.\n\tvoid SetLength(float32 length);\n\tfloat32 GetLength() const;\n\n\t/// Set/get frequency in Hz.\n\tvoid SetFrequency(float32 hz);\n\tfloat32 GetFrequency() const;\n\n\t/// Set/get damping ratio.\n\tvoid SetDampingRatio(float32 ratio);\n\tfloat32 GetDampingRatio() const;\n\n\t/// Dump joint to dmLog\n\tvoid Dump();\n\nprotected:\n\n\tfriend class b2Joint;\n\tb2DistanceJoint(const b2DistanceJointDef* data);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\tfloat32 m_frequencyHz;\n\tfloat32 m_dampingRatio;\n\tfloat32 m_bias;\n\n\t// Solver shared\n\tb2Vec2 m_localAnchorA;\n\tb2Vec2 m_localAnchorB;\n\tfloat32 m_gamma;\n\tfloat32 m_impulse;\n\tfloat32 m_length;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_u;\n\tb2Vec2 m_rA;\n\tb2Vec2 m_rB;\n\tb2Vec2 m_localCenterA;\n\tb2Vec2 m_localCenterB;\n\tfloat32 m_invMassA;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIA;\n\tfloat32 m_invIB;\n\tfloat32 m_mass;\n};\n\ninline void b2DistanceJoint::SetLength(float32 length)\n{\n\tm_length = length;\n}\n\ninline float32 b2DistanceJoint::GetLength() const\n{\n\treturn m_length;\n}\n\ninline void b2DistanceJoint::SetFrequency(float32 hz)\n{\n\tm_frequencyHz = hz;\n}\n\ninline float32 b2DistanceJoint::GetFrequency() const\n{\n\treturn m_frequencyHz;\n}\n\ninline void b2DistanceJoint::SetDampingRatio(float32 ratio)\n{\n\tm_dampingRatio = ratio;\n}\n\ninline float32 b2DistanceJoint::GetDampingRatio() const\n{\n\treturn m_dampingRatio;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2FrictionJoint.cpp",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2FrictionJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// Point-to-point constraint\n// Cdot = v2 - v1\n//      = v2 + cross(w2, r2) - v1 - cross(w1, r1)\n// J = [-I -r1_skew I r2_skew ]\n// Identity used:\n// w k % (rx i + ry j) = w * (-ry i + rx j)\n\n// Angle constraint\n// Cdot = w2 - w1\n// J = [0 0 -1 0 0 1]\n// K = invI1 + invI2\n\nvoid b2FrictionJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor)\n{\n\tbodyA = bA;\n\tbodyB = bB;\n\tlocalAnchorA = bodyA->GetLocalPoint(anchor);\n\tlocalAnchorB = bodyB->GetLocalPoint(anchor);\n}\n\nb2FrictionJoint::b2FrictionJoint(const b2FrictionJointDef* def)\n: b2Joint(def)\n{\n\tm_localAnchorA = def->localAnchorA;\n\tm_localAnchorB = def->localAnchorB;\n\n\tm_linearImpulse.SetZero();\n\tm_angularImpulse = 0.0f;\n\n\tm_maxForce = def->maxForce;\n\tm_maxTorque = def->maxTorque;\n}\n\nvoid b2FrictionJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterA = m_bodyA->m_sweep.localCenter;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassA = m_bodyA->m_invMass;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIA = m_bodyA->m_invI;\n\tm_invIB = m_bodyB->m_invI;\n\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qA(aA), qB(aB);\n\n\t// Compute the effective mass matrix.\n\tm_rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tm_rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\n\t// J = [-I -r1_skew I r2_skew]\n\t//     [ 0       -1 0       1]\n\t// r_skew = [-ry; rx]\n\n\t// Matlab\n\t// K = [ mA+r1y^2*iA+mB+r2y^2*iB,  -r1y*iA*r1x-r2y*iB*r2x,          -r1y*iA-r2y*iB]\n\t//     [  -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB,           r1x*iA+r2x*iB]\n\t//     [          -r1y*iA-r2y*iB,           r1x*iA+r2x*iB,                   iA+iB]\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tb2Mat22 K;\n\tK.ex.x = mA + mB + iA * m_rA.y * m_rA.y + iB * m_rB.y * m_rB.y;\n\tK.ex.y = -iA * m_rA.x * m_rA.y - iB * m_rB.x * m_rB.y;\n\tK.ey.x = K.ex.y;\n\tK.ey.y = mA + mB + iA * m_rA.x * m_rA.x + iB * m_rB.x * m_rB.x;\n\n\tm_linearMass = K.GetInverse();\n\n\tm_angularMass = iA + iB;\n\tif (m_angularMass > 0.0f)\n\t{\n\t\tm_angularMass = 1.0f / m_angularMass;\n\t}\n\n\tif (data.step.warmStarting)\n\t{\n\t\t// Scale impulses to support a variable time step.\n\t\tm_linearImpulse *= data.step.dtRatio;\n\t\tm_angularImpulse *= data.step.dtRatio;\n\n\t\tb2Vec2 P(m_linearImpulse.x, m_linearImpulse.y);\n\t\tvA -= mA * P;\n\t\twA -= iA * (b2Cross(m_rA, P) + m_angularImpulse);\n\t\tvB += mB * P;\n\t\twB += iB * (b2Cross(m_rB, P) + m_angularImpulse);\n\t}\n\telse\n\t{\n\t\tm_linearImpulse.SetZero();\n\t\tm_angularImpulse = 0.0f;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2FrictionJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tfloat32 h = data.step.dt;\n\n\t// Solve angular friction\n\t{\n\t\tfloat32 Cdot = wB - wA;\n\t\tfloat32 impulse = -m_angularMass * Cdot;\n\n\t\tfloat32 oldImpulse = m_angularImpulse;\n\t\tfloat32 maxImpulse = h * m_maxTorque;\n\t\tm_angularImpulse = b2Clamp(m_angularImpulse + impulse, -maxImpulse, maxImpulse);\n\t\timpulse = m_angularImpulse - oldImpulse;\n\n\t\twA -= iA * impulse;\n\t\twB += iB * impulse;\n\t}\n\n\t// Solve linear friction\n\t{\n\t\tb2Vec2 Cdot = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA);\n\n\t\tb2Vec2 impulse = -b2Mul(m_linearMass, Cdot);\n\t\tb2Vec2 oldImpulse = m_linearImpulse;\n\t\tm_linearImpulse += impulse;\n\n\t\tfloat32 maxImpulse = h * m_maxForce;\n\n\t\tif (m_linearImpulse.LengthSquared() > maxImpulse * maxImpulse)\n\t\t{\n\t\t\tm_linearImpulse.Normalize();\n\t\t\tm_linearImpulse *= maxImpulse;\n\t\t}\n\n\t\timpulse = m_linearImpulse - oldImpulse;\n\n\t\tvA -= mA * impulse;\n\t\twA -= iA * b2Cross(m_rA, impulse);\n\n\t\tvB += mB * impulse;\n\t\twB += iB * b2Cross(m_rB, impulse);\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2FrictionJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tB2_NOT_USED(data);\n\n\treturn true;\n}\n\nb2Vec2 b2FrictionJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetWorldPoint(m_localAnchorA);\n}\n\nb2Vec2 b2FrictionJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2FrictionJoint::GetReactionForce(float32 inv_dt) const\n{\n\treturn inv_dt * m_linearImpulse;\n}\n\nfloat32 b2FrictionJoint::GetReactionTorque(float32 inv_dt) const\n{\n\treturn inv_dt * m_angularImpulse;\n}\n\nvoid b2FrictionJoint::SetMaxForce(float32 force)\n{\n\tb2Assert(b2IsValid(force) && force >= 0.0f);\n\tm_maxForce = force;\n}\n\nfloat32 b2FrictionJoint::GetMaxForce() const\n{\n\treturn m_maxForce;\n}\n\nvoid b2FrictionJoint::SetMaxTorque(float32 torque)\n{\n\tb2Assert(b2IsValid(torque) && torque >= 0.0f);\n\tm_maxTorque = torque;\n}\n\nfloat32 b2FrictionJoint::GetMaxTorque() const\n{\n\treturn m_maxTorque;\n}\n\nvoid b2FrictionJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tb2Log(\"  b2FrictionJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.localAnchorA.Set(%.15lef, %.15lef);\\n\", m_localAnchorA.x, m_localAnchorA.y);\n\tb2Log(\"  jd.localAnchorB.Set(%.15lef, %.15lef);\\n\", m_localAnchorB.x, m_localAnchorB.y);\n\tb2Log(\"  jd.maxForce = %.15lef;\\n\", m_maxForce);\n\tb2Log(\"  jd.maxTorque = %.15lef;\\n\", m_maxTorque);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2FrictionJoint.h",
    "content": "/*\n* Copyright (c) 2006-2007 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_FRICTION_JOINT_H\n#define B2_FRICTION_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Friction joint definition.\nstruct b2FrictionJointDef : public b2JointDef\n{\n\tb2FrictionJointDef()\n\t{\n\t\ttype = e_frictionJoint;\n\t\tlocalAnchorA.SetZero();\n\t\tlocalAnchorB.SetZero();\n\t\tmaxForce = 0.0f;\n\t\tmaxTorque = 0.0f;\n\t}\n\n\t/// Initialize the bodies, anchors, axis, and reference angle using the world\n\t/// anchor and world axis.\n\tvoid Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor);\n\n\t/// The local anchor point relative to bodyA's origin.\n\tb2Vec2 localAnchorA;\n\n\t/// The local anchor point relative to bodyB's origin.\n\tb2Vec2 localAnchorB;\n\n\t/// The maximum friction force in N.\n\tfloat32 maxForce;\n\n\t/// The maximum friction torque in N-m.\n\tfloat32 maxTorque;\n};\n\n/// Friction joint. This is used for top-down friction.\n/// It provides 2D translational friction and angular friction.\nclass b2FrictionJoint : public b2Joint\n{\npublic:\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// The local anchor point relative to bodyA's origin.\n\tconst b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; }\n\n\t/// The local anchor point relative to bodyB's origin.\n\tconst b2Vec2& GetLocalAnchorB() const  { return m_localAnchorB; }\n\n\t/// Set the maximum friction force in N.\n\tvoid SetMaxForce(float32 force);\n\n\t/// Get the maximum friction force in N.\n\tfloat32 GetMaxForce() const;\n\n\t/// Set the maximum friction torque in N*m.\n\tvoid SetMaxTorque(float32 torque);\n\n\t/// Get the maximum friction torque in N*m.\n\tfloat32 GetMaxTorque() const;\n\n\t/// Dump joint to dmLog\n\tvoid Dump();\n\nprotected:\n\n\tfriend class b2Joint;\n\n\tb2FrictionJoint(const b2FrictionJointDef* def);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\tb2Vec2 m_localAnchorA;\n\tb2Vec2 m_localAnchorB;\n\n\t// Solver shared\n\tb2Vec2 m_linearImpulse;\n\tfloat32 m_angularImpulse;\n\tfloat32 m_maxForce;\n\tfloat32 m_maxTorque;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_rA;\n\tb2Vec2 m_rB;\n\tb2Vec2 m_localCenterA;\n\tb2Vec2 m_localCenterB;\n\tfloat32 m_invMassA;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIA;\n\tfloat32 m_invIB;\n\tb2Mat22 m_linearMass;\n\tfloat32 m_angularMass;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2GearJoint.cpp",
    "content": "/*\n* Copyright (c) 2007-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2GearJoint.h>\n#include <Box2D/Dynamics/Joints/b2RevoluteJoint.h>\n#include <Box2D/Dynamics/Joints/b2PrismaticJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// Gear Joint:\n// C0 = (coordinate1 + ratio * coordinate2)_initial\n// C = (coordinate1 + ratio * coordinate2) - C0 = 0\n// J = [J1 ratio * J2]\n// K = J * invM * JT\n//   = J1 * invM1 * J1T + ratio * ratio * J2 * invM2 * J2T\n//\n// Revolute:\n// coordinate = rotation\n// Cdot = angularVelocity\n// J = [0 0 1]\n// K = J * invM * JT = invI\n//\n// Prismatic:\n// coordinate = dot(p - pg, ug)\n// Cdot = dot(v + cross(w, r), ug)\n// J = [ug cross(r, ug)]\n// K = J * invM * JT = invMass + invI * cross(r, ug)^2\n\nb2GearJoint::b2GearJoint(const b2GearJointDef* def)\n: b2Joint(def)\n{\n\tm_joint1 = def->joint1;\n\tm_joint2 = def->joint2;\n\n\tm_typeA = m_joint1->GetType();\n\tm_typeB = m_joint2->GetType();\n\n\tb2Assert(m_typeA == e_revoluteJoint || m_typeA == e_prismaticJoint);\n\tb2Assert(m_typeB == e_revoluteJoint || m_typeB == e_prismaticJoint);\n\n\tfloat32 coordinateA, coordinateB;\n\n\t// TODO_ERIN there might be some problem with the joint edges in b2Joint.\n\n\tm_bodyC = m_joint1->GetBodyA();\n\tm_bodyA = m_joint1->GetBodyB();\n\n\t// Get geometry of joint1\n\tb2Transform xfA = m_bodyA->m_xf;\n\tfloat32 aA = m_bodyA->m_sweep.a;\n\tb2Transform xfC = m_bodyC->m_xf;\n\tfloat32 aC = m_bodyC->m_sweep.a;\n\n\tif (m_typeA == e_revoluteJoint)\n\t{\n\t\tb2RevoluteJoint* revolute = (b2RevoluteJoint*)def->joint1;\n\t\tm_localAnchorC = revolute->m_localAnchorA;\n\t\tm_localAnchorA = revolute->m_localAnchorB;\n\t\tm_referenceAngleA = revolute->m_referenceAngle;\n\t\tm_localAxisC.SetZero();\n\n\t\tcoordinateA = aA - aC - m_referenceAngleA;\n\t}\n\telse\n\t{\n\t\tb2PrismaticJoint* prismatic = (b2PrismaticJoint*)def->joint1;\n\t\tm_localAnchorC = prismatic->m_localAnchorA;\n\t\tm_localAnchorA = prismatic->m_localAnchorB;\n\t\tm_referenceAngleA = prismatic->m_referenceAngle;\n\t\tm_localAxisC = prismatic->m_localXAxisA;\n\n\t\tb2Vec2 pC = m_localAnchorC;\n\t\tb2Vec2 pA = b2MulT(xfC.q, b2Mul(xfA.q, m_localAnchorA) + (xfA.p - xfC.p));\n\t\tcoordinateA = b2Dot(pA - pC, m_localAxisC);\n\t}\n\n\tm_bodyD = m_joint2->GetBodyA();\n\tm_bodyB = m_joint2->GetBodyB();\n\n\t// Get geometry of joint2\n\tb2Transform xfB = m_bodyB->m_xf;\n\tfloat32 aB = m_bodyB->m_sweep.a;\n\tb2Transform xfD = m_bodyD->m_xf;\n\tfloat32 aD = m_bodyD->m_sweep.a;\n\n\tif (m_typeB == e_revoluteJoint)\n\t{\n\t\tb2RevoluteJoint* revolute = (b2RevoluteJoint*)def->joint2;\n\t\tm_localAnchorD = revolute->m_localAnchorA;\n\t\tm_localAnchorB = revolute->m_localAnchorB;\n\t\tm_referenceAngleB = revolute->m_referenceAngle;\n\t\tm_localAxisD.SetZero();\n\n\t\tcoordinateB = aB - aD - m_referenceAngleB;\n\t}\n\telse\n\t{\n\t\tb2PrismaticJoint* prismatic = (b2PrismaticJoint*)def->joint2;\n\t\tm_localAnchorD = prismatic->m_localAnchorA;\n\t\tm_localAnchorB = prismatic->m_localAnchorB;\n\t\tm_referenceAngleB = prismatic->m_referenceAngle;\n\t\tm_localAxisD = prismatic->m_localXAxisA;\n\n\t\tb2Vec2 pD = m_localAnchorD;\n\t\tb2Vec2 pB = b2MulT(xfD.q, b2Mul(xfB.q, m_localAnchorB) + (xfB.p - xfD.p));\n\t\tcoordinateB = b2Dot(pB - pD, m_localAxisD);\n\t}\n\n\tm_ratio = def->ratio;\n\n\tm_constant = coordinateA + m_ratio * coordinateB;\n\n\tm_impulse = 0.0f;\n}\n\nvoid b2GearJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_indexC = m_bodyC->m_islandIndex;\n\tm_indexD = m_bodyD->m_islandIndex;\n\tm_lcA = m_bodyA->m_sweep.localCenter;\n\tm_lcB = m_bodyB->m_sweep.localCenter;\n\tm_lcC = m_bodyC->m_sweep.localCenter;\n\tm_lcD = m_bodyD->m_sweep.localCenter;\n\tm_mA = m_bodyA->m_invMass;\n\tm_mB = m_bodyB->m_invMass;\n\tm_mC = m_bodyC->m_invMass;\n\tm_mD = m_bodyD->m_invMass;\n\tm_iA = m_bodyA->m_invI;\n\tm_iB = m_bodyB->m_invI;\n\tm_iC = m_bodyC->m_invI;\n\tm_iD = m_bodyD->m_invI;\n\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tfloat32 aC = data.positions[m_indexC].a;\n\tb2Vec2 vC = data.velocities[m_indexC].v;\n\tfloat32 wC = data.velocities[m_indexC].w;\n\n\tfloat32 aD = data.positions[m_indexD].a;\n\tb2Vec2 vD = data.velocities[m_indexD].v;\n\tfloat32 wD = data.velocities[m_indexD].w;\n\n\tb2Rot qA(aA), qB(aB), qC(aC), qD(aD);\n\n\tm_mass = 0.0f;\n\n\tif (m_typeA == e_revoluteJoint)\n\t{\n\t\tm_JvAC.SetZero();\n\t\tm_JwA = 1.0f;\n\t\tm_JwC = 1.0f;\n\t\tm_mass += m_iA + m_iC;\n\t}\n\telse\n\t{\n\t\tb2Vec2 u = b2Mul(qC, m_localAxisC);\n\t\tb2Vec2 rC = b2Mul(qC, m_localAnchorC - m_lcC);\n\t\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_lcA);\n\t\tm_JvAC = u;\n\t\tm_JwC = b2Cross(rC, u);\n\t\tm_JwA = b2Cross(rA, u);\n\t\tm_mass += m_mC + m_mA + m_iC * m_JwC * m_JwC + m_iA * m_JwA * m_JwA;\n\t}\n\n\tif (m_typeB == e_revoluteJoint)\n\t{\n\t\tm_JvBD.SetZero();\n\t\tm_JwB = m_ratio;\n\t\tm_JwD = m_ratio;\n\t\tm_mass += m_ratio * m_ratio * (m_iB + m_iD);\n\t}\n\telse\n\t{\n\t\tb2Vec2 u = b2Mul(qD, m_localAxisD);\n\t\tb2Vec2 rD = b2Mul(qD, m_localAnchorD - m_lcD);\n\t\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_lcB);\n\t\tm_JvBD = m_ratio * u;\n\t\tm_JwD = m_ratio * b2Cross(rD, u);\n\t\tm_JwB = m_ratio * b2Cross(rB, u);\n\t\tm_mass += m_ratio * m_ratio * (m_mD + m_mB) + m_iD * m_JwD * m_JwD + m_iB * m_JwB * m_JwB;\n\t}\n\n\t// Compute effective mass.\n\tm_mass = m_mass > 0.0f ? 1.0f / m_mass : 0.0f;\n\n\tif (data.step.warmStarting)\n\t{\n\t\tvA += (m_mA * m_impulse) * m_JvAC;\n\t\twA += m_iA * m_impulse * m_JwA;\n\t\tvB += (m_mB * m_impulse) * m_JvBD;\n\t\twB += m_iB * m_impulse * m_JwB;\n\t\tvC -= (m_mC * m_impulse) * m_JvAC;\n\t\twC -= m_iC * m_impulse * m_JwC;\n\t\tvD -= (m_mD * m_impulse) * m_JvBD;\n\t\twD -= m_iD * m_impulse * m_JwD;\n\t}\n\telse\n\t{\n\t\tm_impulse = 0.0f;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n\tdata.velocities[m_indexC].v = vC;\n\tdata.velocities[m_indexC].w = wC;\n\tdata.velocities[m_indexD].v = vD;\n\tdata.velocities[m_indexD].w = wD;\n}\n\nvoid b2GearJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\tb2Vec2 vC = data.velocities[m_indexC].v;\n\tfloat32 wC = data.velocities[m_indexC].w;\n\tb2Vec2 vD = data.velocities[m_indexD].v;\n\tfloat32 wD = data.velocities[m_indexD].w;\n\n\tfloat32 Cdot = b2Dot(m_JvAC, vA - vC) + b2Dot(m_JvBD, vB - vD);\n\tCdot += (m_JwA * wA - m_JwC * wC) + (m_JwB * wB - m_JwD * wD);\n\n\tfloat32 impulse = -m_mass * Cdot;\n\tm_impulse += impulse;\n\n\tvA += (m_mA * impulse) * m_JvAC;\n\twA += m_iA * impulse * m_JwA;\n\tvB += (m_mB * impulse) * m_JvBD;\n\twB += m_iB * impulse * m_JwB;\n\tvC -= (m_mC * impulse) * m_JvAC;\n\twC -= m_iC * impulse * m_JwC;\n\tvD -= (m_mD * impulse) * m_JvBD;\n\twD -= m_iD * impulse * m_JwD;\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n\tdata.velocities[m_indexC].v = vC;\n\tdata.velocities[m_indexC].w = wC;\n\tdata.velocities[m_indexD].v = vD;\n\tdata.velocities[m_indexD].w = wD;\n}\n\nbool b2GearJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 cC = data.positions[m_indexC].c;\n\tfloat32 aC = data.positions[m_indexC].a;\n\tb2Vec2 cD = data.positions[m_indexD].c;\n\tfloat32 aD = data.positions[m_indexD].a;\n\n\tb2Rot qA(aA), qB(aB), qC(aC), qD(aD);\n\n\tfloat32 linearError = 0.0f;\n\n\tfloat32 coordinateA, coordinateB;\n\n\tb2Vec2 JvAC, JvBD;\n\tfloat32 JwA, JwB, JwC, JwD;\n\tfloat32 mass = 0.0f;\n\n\tif (m_typeA == e_revoluteJoint)\n\t{\n\t\tJvAC.SetZero();\n\t\tJwA = 1.0f;\n\t\tJwC = 1.0f;\n\t\tmass += m_iA + m_iC;\n\n\t\tcoordinateA = aA - aC - m_referenceAngleA;\n\t}\n\telse\n\t{\n\t\tb2Vec2 u = b2Mul(qC, m_localAxisC);\n\t\tb2Vec2 rC = b2Mul(qC, m_localAnchorC - m_lcC);\n\t\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_lcA);\n\t\tJvAC = u;\n\t\tJwC = b2Cross(rC, u);\n\t\tJwA = b2Cross(rA, u);\n\t\tmass += m_mC + m_mA + m_iC * JwC * JwC + m_iA * JwA * JwA;\n\n\t\tb2Vec2 pC = m_localAnchorC - m_lcC;\n\t\tb2Vec2 pA = b2MulT(qC, rA + (cA - cC));\n\t\tcoordinateA = b2Dot(pA - pC, m_localAxisC);\n\t}\n\n\tif (m_typeB == e_revoluteJoint)\n\t{\n\t\tJvBD.SetZero();\n\t\tJwB = m_ratio;\n\t\tJwD = m_ratio;\n\t\tmass += m_ratio * m_ratio * (m_iB + m_iD);\n\n\t\tcoordinateB = aB - aD - m_referenceAngleB;\n\t}\n\telse\n\t{\n\t\tb2Vec2 u = b2Mul(qD, m_localAxisD);\n\t\tb2Vec2 rD = b2Mul(qD, m_localAnchorD - m_lcD);\n\t\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_lcB);\n\t\tJvBD = m_ratio * u;\n\t\tJwD = m_ratio * b2Cross(rD, u);\n\t\tJwB = m_ratio * b2Cross(rB, u);\n\t\tmass += m_ratio * m_ratio * (m_mD + m_mB) + m_iD * JwD * JwD + m_iB * JwB * JwB;\n\n\t\tb2Vec2 pD = m_localAnchorD - m_lcD;\n\t\tb2Vec2 pB = b2MulT(qD, rB + (cB - cD));\n\t\tcoordinateB = b2Dot(pB - pD, m_localAxisD);\n\t}\n\n\tfloat32 C = (coordinateA + m_ratio * coordinateB) - m_constant;\n\n\tfloat32 impulse = 0.0f;\n\tif (mass > 0.0f)\n\t{\n\t\timpulse = -C / mass;\n\t}\n\n\tcA += m_mA * impulse * JvAC;\n\taA += m_iA * impulse * JwA;\n\tcB += m_mB * impulse * JvBD;\n\taB += m_iB * impulse * JwB;\n\tcC -= m_mC * impulse * JvAC;\n\taC -= m_iC * impulse * JwC;\n\tcD -= m_mD * impulse * JvBD;\n\taD -= m_iD * impulse * JwD;\n\n\tdata.positions[m_indexA].c = cA;\n\tdata.positions[m_indexA].a = aA;\n\tdata.positions[m_indexB].c = cB;\n\tdata.positions[m_indexB].a = aB;\n\tdata.positions[m_indexC].c = cC;\n\tdata.positions[m_indexC].a = aC;\n\tdata.positions[m_indexD].c = cD;\n\tdata.positions[m_indexD].a = aD;\n\n\t// TODO_ERIN not implemented\n\treturn linearError < b2_linearSlop;\n}\n\nb2Vec2 b2GearJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetWorldPoint(m_localAnchorA);\n}\n\nb2Vec2 b2GearJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2GearJoint::GetReactionForce(float32 inv_dt) const\n{\n\tb2Vec2 P = m_impulse * m_JvAC;\n\treturn inv_dt * P;\n}\n\nfloat32 b2GearJoint::GetReactionTorque(float32 inv_dt) const\n{\n\tfloat32 L = m_impulse * m_JwA;\n\treturn inv_dt * L;\n}\n\nvoid b2GearJoint::SetRatio(float32 ratio)\n{\n\tb2Assert(b2IsValid(ratio));\n\tm_ratio = ratio;\n}\n\nfloat32 b2GearJoint::GetRatio() const\n{\n\treturn m_ratio;\n}\n\nvoid b2GearJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tint32 index1 = m_joint1->m_index;\n\tint32 index2 = m_joint2->m_index;\n\n\tb2Log(\"  b2GearJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.joint1 = joints[%d];\\n\", index1);\n\tb2Log(\"  jd.joint2 = joints[%d];\\n\", index2);\n\tb2Log(\"  jd.ratio = %.15lef;\\n\", m_ratio);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2GearJoint.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_GEAR_JOINT_H\n#define B2_GEAR_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Gear joint definition. This definition requires two existing\n/// revolute or prismatic joints (any combination will work).\nstruct b2GearJointDef : public b2JointDef\n{\n\tb2GearJointDef()\n\t{\n\t\ttype = e_gearJoint;\n\t\tjoint1 = NULL;\n\t\tjoint2 = NULL;\n\t\tratio = 1.0f;\n\t}\n\n\t/// The first revolute/prismatic joint attached to the gear joint.\n\tb2Joint* joint1;\n\n\t/// The second revolute/prismatic joint attached to the gear joint.\n\tb2Joint* joint2;\n\n\t/// The gear ratio.\n\t/// @see b2GearJoint for explanation.\n\tfloat32 ratio;\n};\n\n/// A gear joint is used to connect two joints together. Either joint\n/// can be a revolute or prismatic joint. You specify a gear ratio\n/// to bind the motions together:\n/// coordinate1 + ratio * coordinate2 = constant\n/// The ratio can be negative or positive. If one joint is a revolute joint\n/// and the other joint is a prismatic joint, then the ratio will have units\n/// of length or units of 1/length.\n/// @warning You have to manually destroy the gear joint if joint1 or joint2\n/// is destroyed.\nclass b2GearJoint : public b2Joint\n{\npublic:\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// Get the first joint.\n\tb2Joint* GetJoint1() { return m_joint1; }\n\n\t/// Get the second joint.\n\tb2Joint* GetJoint2() { return m_joint2; }\n\n\t/// Set/Get the gear ratio.\n\tvoid SetRatio(float32 ratio);\n\tfloat32 GetRatio() const;\n\n\t/// Dump joint to dmLog\n\tvoid Dump();\n\nprotected:\n\n\tfriend class b2Joint;\n\tb2GearJoint(const b2GearJointDef* data);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\tb2Joint* m_joint1;\n\tb2Joint* m_joint2;\n\n\tb2JointType m_typeA;\n\tb2JointType m_typeB;\n\n\t// Body A is connected to body C\n\t// Body B is connected to body D\n\tb2Body* m_bodyC;\n\tb2Body* m_bodyD;\n\n\t// Solver shared\n\tb2Vec2 m_localAnchorA;\n\tb2Vec2 m_localAnchorB;\n\tb2Vec2 m_localAnchorC;\n\tb2Vec2 m_localAnchorD;\n\n\tb2Vec2 m_localAxisC;\n\tb2Vec2 m_localAxisD;\n\n\tfloat32 m_referenceAngleA;\n\tfloat32 m_referenceAngleB;\n\n\tfloat32 m_constant;\n\tfloat32 m_ratio;\n\n\tfloat32 m_impulse;\n\n\t// Solver temp\n\tint32 m_indexA, m_indexB, m_indexC, m_indexD;\n\tb2Vec2 m_lcA, m_lcB, m_lcC, m_lcD;\n\tfloat32 m_mA, m_mB, m_mC, m_mD;\n\tfloat32 m_iA, m_iB, m_iC, m_iD;\n\tb2Vec2 m_JvAC, m_JvBD;\n\tfloat32 m_JwA, m_JwB, m_JwC, m_JwD;\n\tfloat32 m_mass;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2Joint.cpp",
    "content": "/*\n* Copyright (c) 2006-2007 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n#include <Box2D/Dynamics/Joints/b2DistanceJoint.h>\n#include <Box2D/Dynamics/Joints/b2WheelJoint.h>\n#include <Box2D/Dynamics/Joints/b2MouseJoint.h>\n#include <Box2D/Dynamics/Joints/b2RevoluteJoint.h>\n#include <Box2D/Dynamics/Joints/b2PrismaticJoint.h>\n#include <Box2D/Dynamics/Joints/b2PulleyJoint.h>\n#include <Box2D/Dynamics/Joints/b2GearJoint.h>\n#include <Box2D/Dynamics/Joints/b2WeldJoint.h>\n#include <Box2D/Dynamics/Joints/b2FrictionJoint.h>\n#include <Box2D/Dynamics/Joints/b2RopeJoint.h>\n#include <Box2D/Dynamics/Joints/b2MotorJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2World.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n\n#include <new>\n\nb2Joint* b2Joint::Create(const b2JointDef* def, b2BlockAllocator* allocator)\n{\n\tb2Joint* joint = NULL;\n\n\tswitch (def->type)\n\t{\n\tcase e_distanceJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2DistanceJoint));\n\t\t\tjoint = new (mem) b2DistanceJoint(static_cast<const b2DistanceJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tcase e_mouseJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2MouseJoint));\n\t\t\tjoint = new (mem) b2MouseJoint(static_cast<const b2MouseJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tcase e_prismaticJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2PrismaticJoint));\n\t\t\tjoint = new (mem) b2PrismaticJoint(static_cast<const b2PrismaticJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tcase e_revoluteJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2RevoluteJoint));\n\t\t\tjoint = new (mem) b2RevoluteJoint(static_cast<const b2RevoluteJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tcase e_pulleyJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2PulleyJoint));\n\t\t\tjoint = new (mem) b2PulleyJoint(static_cast<const b2PulleyJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tcase e_gearJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2GearJoint));\n\t\t\tjoint = new (mem) b2GearJoint(static_cast<const b2GearJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tcase e_wheelJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2WheelJoint));\n\t\t\tjoint = new (mem) b2WheelJoint(static_cast<const b2WheelJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tcase e_weldJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2WeldJoint));\n\t\t\tjoint = new (mem) b2WeldJoint(static_cast<const b2WeldJointDef*>(def));\n\t\t}\n\t\tbreak;\n        \n\tcase e_frictionJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2FrictionJoint));\n\t\t\tjoint = new (mem) b2FrictionJoint(static_cast<const b2FrictionJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tcase e_ropeJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2RopeJoint));\n\t\t\tjoint = new (mem) b2RopeJoint(static_cast<const b2RopeJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tcase e_motorJoint:\n\t\t{\n\t\t\tvoid* mem = allocator->Allocate(sizeof(b2MotorJoint));\n\t\t\tjoint = new (mem) b2MotorJoint(static_cast<const b2MotorJointDef*>(def));\n\t\t}\n\t\tbreak;\n\n\tdefault:\n\t\tb2Assert(false);\n\t\tbreak;\n\t}\n\n\treturn joint;\n}\n\nvoid b2Joint::Destroy(b2Joint* joint, b2BlockAllocator* allocator)\n{\n\tjoint->~b2Joint();\n\tswitch (joint->m_type)\n\t{\n\tcase e_distanceJoint:\n\t\tallocator->Free(joint, sizeof(b2DistanceJoint));\n\t\tbreak;\n\n\tcase e_mouseJoint:\n\t\tallocator->Free(joint, sizeof(b2MouseJoint));\n\t\tbreak;\n\n\tcase e_prismaticJoint:\n\t\tallocator->Free(joint, sizeof(b2PrismaticJoint));\n\t\tbreak;\n\n\tcase e_revoluteJoint:\n\t\tallocator->Free(joint, sizeof(b2RevoluteJoint));\n\t\tbreak;\n\n\tcase e_pulleyJoint:\n\t\tallocator->Free(joint, sizeof(b2PulleyJoint));\n\t\tbreak;\n\n\tcase e_gearJoint:\n\t\tallocator->Free(joint, sizeof(b2GearJoint));\n\t\tbreak;\n\n\tcase e_wheelJoint:\n\t\tallocator->Free(joint, sizeof(b2WheelJoint));\n\t\tbreak;\n    \n\tcase e_weldJoint:\n\t\tallocator->Free(joint, sizeof(b2WeldJoint));\n\t\tbreak;\n\n\tcase e_frictionJoint:\n\t\tallocator->Free(joint, sizeof(b2FrictionJoint));\n\t\tbreak;\n\n\tcase e_ropeJoint:\n\t\tallocator->Free(joint, sizeof(b2RopeJoint));\n\t\tbreak;\n\n\tcase e_motorJoint:\n\t\tallocator->Free(joint, sizeof(b2MotorJoint));\n\t\tbreak;\n\n\tdefault:\n\t\tb2Assert(false);\n\t\tbreak;\n\t}\n}\n\nb2Joint::b2Joint(const b2JointDef* def)\n{\n\tb2Assert(def->bodyA != def->bodyB);\n\n\tm_type = def->type;\n\tm_prev = NULL;\n\tm_next = NULL;\n\tm_bodyA = def->bodyA;\n\tm_bodyB = def->bodyB;\n\tm_index = 0;\n\tm_collideConnected = def->collideConnected;\n\tm_islandFlag = false;\n\tm_userData = def->userData;\n\n\tm_edgeA.joint = NULL;\n\tm_edgeA.other = NULL;\n\tm_edgeA.prev = NULL;\n\tm_edgeA.next = NULL;\n\n\tm_edgeB.joint = NULL;\n\tm_edgeB.other = NULL;\n\tm_edgeB.prev = NULL;\n\tm_edgeB.next = NULL;\n}\n\nbool b2Joint::IsActive() const\n{\n\treturn m_bodyA->IsActive() && m_bodyB->IsActive();\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2Joint.h",
    "content": "/*\n* Copyright (c) 2006-2007 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_JOINT_H\n#define B2_JOINT_H\n\n#include <Box2D/Common/b2Math.h>\n\nclass b2Body;\nclass b2Joint;\nstruct b2SolverData;\nclass b2BlockAllocator;\n\nenum b2JointType\n{\n\te_unknownJoint,\n\te_revoluteJoint,\n\te_prismaticJoint,\n\te_distanceJoint,\n\te_pulleyJoint,\n\te_mouseJoint,\n\te_gearJoint,\n\te_wheelJoint,\n    e_weldJoint,\n\te_frictionJoint,\n\te_ropeJoint,\n\te_motorJoint\n};\n\nenum b2LimitState\n{\n\te_inactiveLimit,\n\te_atLowerLimit,\n\te_atUpperLimit,\n\te_equalLimits\n};\n\nstruct b2Jacobian\n{\n\tb2Vec2 linear;\n\tfloat32 angularA;\n\tfloat32 angularB;\n};\n\n/// A joint edge is used to connect bodies and joints together\n/// in a joint graph where each body is a node and each joint\n/// is an edge. A joint edge belongs to a doubly linked list\n/// maintained in each attached body. Each joint has two joint\n/// nodes, one for each attached body.\nstruct b2JointEdge\n{\n\tb2Body* other;\t\t\t///< provides quick access to the other body attached.\n\tb2Joint* joint;\t\t\t///< the joint\n\tb2JointEdge* prev;\t\t///< the previous joint edge in the body's joint list\n\tb2JointEdge* next;\t\t///< the next joint edge in the body's joint list\n};\n\n/// Joint definitions are used to construct joints.\nstruct b2JointDef\n{\n\tb2JointDef()\n\t{\n\t\ttype = e_unknownJoint;\n\t\tuserData = NULL;\n\t\tbodyA = NULL;\n\t\tbodyB = NULL;\n\t\tcollideConnected = false;\n\t}\n\n\t/// The joint type is set automatically for concrete joint types.\n\tb2JointType type;\n\n\t/// Use this to attach application specific data to your joints.\n\tvoid* userData;\n\n\t/// The first attached body.\n\tb2Body* bodyA;\n\n\t/// The second attached body.\n\tb2Body* bodyB;\n\n\t/// Set this flag to true if the attached bodies should collide.\n\tbool collideConnected;\n};\n\n/// The base joint class. Joints are used to constraint two bodies together in\n/// various fashions. Some joints also feature limits and motors.\nclass b2Joint\n{\npublic:\n\n\t/// Get the type of the concrete joint.\n\tb2JointType GetType() const;\n\n\t/// Get the first body attached to this joint.\n\tb2Body* GetBodyA();\n\n\t/// Get the second body attached to this joint.\n\tb2Body* GetBodyB();\n\n\t/// Get the anchor point on bodyA in world coordinates.\n\tvirtual b2Vec2 GetAnchorA() const = 0;\n\n\t/// Get the anchor point on bodyB in world coordinates.\n\tvirtual b2Vec2 GetAnchorB() const = 0;\n\n\t/// Get the reaction force on bodyB at the joint anchor in Newtons.\n\tvirtual b2Vec2 GetReactionForce(float32 inv_dt) const = 0;\n\n\t/// Get the reaction torque on bodyB in N*m.\n\tvirtual float32 GetReactionTorque(float32 inv_dt) const = 0;\n\n\t/// Get the next joint the world joint list.\n\tb2Joint* GetNext();\n\tconst b2Joint* GetNext() const;\n\n\t/// Get the user data pointer.\n\tvoid* GetUserData() const;\n\n\t/// Set the user data pointer.\n\tvoid SetUserData(void* data);\n\n\t/// Short-cut function to determine if either body is inactive.\n\tbool IsActive() const;\n\n\t/// Get collide connected.\n\t/// Note: modifying the collide connect flag won't work correctly because\n\t/// the flag is only checked when fixture AABBs begin to overlap.\n\tbool GetCollideConnected() const;\n\n\t/// Dump this joint to the log file.\n\tvirtual void Dump() { b2Log(\"// Dump is not supported for this joint type.\\n\"); }\n\n\t/// Shift the origin for any points stored in world coordinates.\n\tvirtual void ShiftOrigin(const b2Vec2& newOrigin) { B2_NOT_USED(newOrigin);  }\n\nprotected:\n\tfriend class b2World;\n\tfriend class b2Body;\n\tfriend class b2Island;\n\tfriend class b2GearJoint;\n\n\tstatic b2Joint* Create(const b2JointDef* def, b2BlockAllocator* allocator);\n\tstatic void Destroy(b2Joint* joint, b2BlockAllocator* allocator);\n\n\tb2Joint(const b2JointDef* def);\n\tvirtual ~b2Joint() {}\n\n\tvirtual void InitVelocityConstraints(const b2SolverData& data) = 0;\n\tvirtual void SolveVelocityConstraints(const b2SolverData& data) = 0;\n\n\t// This returns true if the position errors are within tolerance.\n\tvirtual bool SolvePositionConstraints(const b2SolverData& data) = 0;\n\n\tb2JointType m_type;\n\tb2Joint* m_prev;\n\tb2Joint* m_next;\n\tb2JointEdge m_edgeA;\n\tb2JointEdge m_edgeB;\n\tb2Body* m_bodyA;\n\tb2Body* m_bodyB;\n\n\tint32 m_index;\n\n\tbool m_islandFlag;\n\tbool m_collideConnected;\n\n\tvoid* m_userData;\n};\n\ninline b2JointType b2Joint::GetType() const\n{\n\treturn m_type;\n}\n\ninline b2Body* b2Joint::GetBodyA()\n{\n\treturn m_bodyA;\n}\n\ninline b2Body* b2Joint::GetBodyB()\n{\n\treturn m_bodyB;\n}\n\ninline b2Joint* b2Joint::GetNext()\n{\n\treturn m_next;\n}\n\ninline const b2Joint* b2Joint::GetNext() const\n{\n\treturn m_next;\n}\n\ninline void* b2Joint::GetUserData() const\n{\n\treturn m_userData;\n}\n\ninline void b2Joint::SetUserData(void* data)\n{\n\tm_userData = data;\n}\n\ninline bool b2Joint::GetCollideConnected() const\n{\n\treturn m_collideConnected;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2MotorJoint.cpp",
    "content": "/*\n* Copyright (c) 2006-2012 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2MotorJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// Point-to-point constraint\n// Cdot = v2 - v1\n//      = v2 + cross(w2, r2) - v1 - cross(w1, r1)\n// J = [-I -r1_skew I r2_skew ]\n// Identity used:\n// w k % (rx i + ry j) = w * (-ry i + rx j)\n\n// Angle constraint\n// Cdot = w2 - w1\n// J = [0 0 -1 0 0 1]\n// K = invI1 + invI2\n\nvoid b2MotorJointDef::Initialize(b2Body* bA, b2Body* bB)\n{\n\tbodyA = bA;\n\tbodyB = bB;\n\tb2Vec2 xB = bodyB->GetPosition();\n\tlinearOffset = bodyA->GetLocalPoint(xB);\n\n\tfloat32 angleA = bodyA->GetAngle();\n\tfloat32 angleB = bodyB->GetAngle();\n\tangularOffset = angleB - angleA;\n}\n\nb2MotorJoint::b2MotorJoint(const b2MotorJointDef* def)\n: b2Joint(def)\n{\n\tm_linearOffset = def->linearOffset;\n\tm_angularOffset = def->angularOffset;\n\n\tm_linearImpulse.SetZero();\n\tm_angularImpulse = 0.0f;\n\n\tm_maxForce = def->maxForce;\n\tm_maxTorque = def->maxTorque;\n\tm_correctionFactor = def->correctionFactor;\n}\n\nvoid b2MotorJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterA = m_bodyA->m_sweep.localCenter;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassA = m_bodyA->m_invMass;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIA = m_bodyA->m_invI;\n\tm_invIB = m_bodyB->m_invI;\n\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qA(aA), qB(aB);\n\n\t// Compute the effective mass matrix.\n\tm_rA = b2Mul(qA, -m_localCenterA);\n\tm_rB = b2Mul(qB, -m_localCenterB);\n\n\t// J = [-I -r1_skew I r2_skew]\n\t//     [ 0       -1 0       1]\n\t// r_skew = [-ry; rx]\n\n\t// Matlab\n\t// K = [ mA+r1y^2*iA+mB+r2y^2*iB,  -r1y*iA*r1x-r2y*iB*r2x,          -r1y*iA-r2y*iB]\n\t//     [  -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB,           r1x*iA+r2x*iB]\n\t//     [          -r1y*iA-r2y*iB,           r1x*iA+r2x*iB,                   iA+iB]\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tb2Mat22 K;\n\tK.ex.x = mA + mB + iA * m_rA.y * m_rA.y + iB * m_rB.y * m_rB.y;\n\tK.ex.y = -iA * m_rA.x * m_rA.y - iB * m_rB.x * m_rB.y;\n\tK.ey.x = K.ex.y;\n\tK.ey.y = mA + mB + iA * m_rA.x * m_rA.x + iB * m_rB.x * m_rB.x;\n\n\tm_linearMass = K.GetInverse();\n\n\tm_angularMass = iA + iB;\n\tif (m_angularMass > 0.0f)\n\t{\n\t\tm_angularMass = 1.0f / m_angularMass;\n\t}\n\n\tm_linearError = cB + m_rB - cA - m_rA - b2Mul(qA, m_linearOffset);\n\tm_angularError = aB - aA - m_angularOffset;\n\n\tif (data.step.warmStarting)\n\t{\n\t\t// Scale impulses to support a variable time step.\n\t\tm_linearImpulse *= data.step.dtRatio;\n\t\tm_angularImpulse *= data.step.dtRatio;\n\n\t\tb2Vec2 P(m_linearImpulse.x, m_linearImpulse.y);\n\t\tvA -= mA * P;\n\t\twA -= iA * (b2Cross(m_rA, P) + m_angularImpulse);\n\t\tvB += mB * P;\n\t\twB += iB * (b2Cross(m_rB, P) + m_angularImpulse);\n\t}\n\telse\n\t{\n\t\tm_linearImpulse.SetZero();\n\t\tm_angularImpulse = 0.0f;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2MotorJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tfloat32 h = data.step.dt;\n\tfloat32 inv_h = data.step.inv_dt;\n\n\t// Solve angular friction\n\t{\n\t\tfloat32 Cdot = wB - wA + inv_h * m_correctionFactor * m_angularError;\n\t\tfloat32 impulse = -m_angularMass * Cdot;\n\n\t\tfloat32 oldImpulse = m_angularImpulse;\n\t\tfloat32 maxImpulse = h * m_maxTorque;\n\t\tm_angularImpulse = b2Clamp(m_angularImpulse + impulse, -maxImpulse, maxImpulse);\n\t\timpulse = m_angularImpulse - oldImpulse;\n\n\t\twA -= iA * impulse;\n\t\twB += iB * impulse;\n\t}\n\n\t// Solve linear friction\n\t{\n\t\tb2Vec2 Cdot = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA) + inv_h * m_correctionFactor * m_linearError;\n\n\t\tb2Vec2 impulse = -b2Mul(m_linearMass, Cdot);\n\t\tb2Vec2 oldImpulse = m_linearImpulse;\n\t\tm_linearImpulse += impulse;\n\n\t\tfloat32 maxImpulse = h * m_maxForce;\n\n\t\tif (m_linearImpulse.LengthSquared() > maxImpulse * maxImpulse)\n\t\t{\n\t\t\tm_linearImpulse.Normalize();\n\t\t\tm_linearImpulse *= maxImpulse;\n\t\t}\n\n\t\timpulse = m_linearImpulse - oldImpulse;\n\n\t\tvA -= mA * impulse;\n\t\twA -= iA * b2Cross(m_rA, impulse);\n\n\t\tvB += mB * impulse;\n\t\twB += iB * b2Cross(m_rB, impulse);\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2MotorJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tB2_NOT_USED(data);\n\n\treturn true;\n}\n\nb2Vec2 b2MotorJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetPosition();\n}\n\nb2Vec2 b2MotorJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetPosition();\n}\n\nb2Vec2 b2MotorJoint::GetReactionForce(float32 inv_dt) const\n{\n\treturn inv_dt * m_linearImpulse;\n}\n\nfloat32 b2MotorJoint::GetReactionTorque(float32 inv_dt) const\n{\n\treturn inv_dt * m_angularImpulse;\n}\n\nvoid b2MotorJoint::SetMaxForce(float32 force)\n{\n\tb2Assert(b2IsValid(force) && force >= 0.0f);\n\tm_maxForce = force;\n}\n\nfloat32 b2MotorJoint::GetMaxForce() const\n{\n\treturn m_maxForce;\n}\n\nvoid b2MotorJoint::SetMaxTorque(float32 torque)\n{\n\tb2Assert(b2IsValid(torque) && torque >= 0.0f);\n\tm_maxTorque = torque;\n}\n\nfloat32 b2MotorJoint::GetMaxTorque() const\n{\n\treturn m_maxTorque;\n}\n\nvoid b2MotorJoint::SetCorrectionFactor(float32 factor)\n{\n\tb2Assert(b2IsValid(factor) && 0.0f <= factor && factor <= 1.0f);\n\tm_correctionFactor = factor;\n}\n\nfloat32 b2MotorJoint::GetCorrectionFactor() const\n{\n\treturn m_correctionFactor;\n}\n\nvoid b2MotorJoint::SetLinearOffset(const b2Vec2& linearOffset)\n{\n\tif (linearOffset.x != m_linearOffset.x || linearOffset.y != m_linearOffset.y)\n\t{\n\t\tm_bodyA->SetAwake(true);\n\t\tm_bodyB->SetAwake(true);\n\t\tm_linearOffset = linearOffset;\n\t}\n}\n\nconst b2Vec2& b2MotorJoint::GetLinearOffset() const\n{\n\treturn m_linearOffset;\n}\n\nvoid b2MotorJoint::SetAngularOffset(float32 angularOffset)\n{\n\tif (angularOffset != m_angularOffset)\n\t{\n\t\tm_bodyA->SetAwake(true);\n\t\tm_bodyB->SetAwake(true);\n\t\tm_angularOffset = angularOffset;\n\t}\n}\n\nfloat32 b2MotorJoint::GetAngularOffset() const\n{\n\treturn m_angularOffset;\n}\n\nvoid b2MotorJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tb2Log(\"  b2MotorJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.linearOffset.Set(%.15lef, %.15lef);\\n\", m_linearOffset.x, m_linearOffset.y);\n\tb2Log(\"  jd.angularOffset = %.15lef;\\n\", m_angularOffset);\n\tb2Log(\"  jd.maxForce = %.15lef;\\n\", m_maxForce);\n\tb2Log(\"  jd.maxTorque = %.15lef;\\n\", m_maxTorque);\n\tb2Log(\"  jd.correctionFactor = %.15lef;\\n\", m_correctionFactor);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2MotorJoint.h",
    "content": "/*\n* Copyright (c) 2006-2012 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_MOTOR_JOINT_H\n#define B2_MOTOR_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Motor joint definition.\nstruct b2MotorJointDef : public b2JointDef\n{\n\tb2MotorJointDef()\n\t{\n\t\ttype = e_motorJoint;\n\t\tlinearOffset.SetZero();\n\t\tangularOffset = 0.0f;\n\t\tmaxForce = 1.0f;\n\t\tmaxTorque = 1.0f;\n\t\tcorrectionFactor = 0.3f;\n\t}\n\n\t/// Initialize the bodies and offsets using the current transforms.\n\tvoid Initialize(b2Body* bodyA, b2Body* bodyB);\n\n\t/// Position of bodyB minus the position of bodyA, in bodyA's frame, in meters.\n\tb2Vec2 linearOffset;\n\n\t/// The bodyB angle minus bodyA angle in radians.\n\tfloat32 angularOffset;\n\t\n\t/// The maximum motor force in N.\n\tfloat32 maxForce;\n\n\t/// The maximum motor torque in N-m.\n\tfloat32 maxTorque;\n\n\t/// Position correction factor in the range [0,1].\n\tfloat32 correctionFactor;\n};\n\n/// A motor joint is used to control the relative motion\n/// between two bodies. A typical usage is to control the movement\n/// of a dynamic body with respect to the ground.\nclass b2MotorJoint : public b2Joint\n{\npublic:\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// Set/get the target linear offset, in frame A, in meters.\n\tvoid SetLinearOffset(const b2Vec2& linearOffset);\n\tconst b2Vec2& GetLinearOffset() const;\n\n\t/// Set/get the target angular offset, in radians.\n\tvoid SetAngularOffset(float32 angularOffset);\n\tfloat32 GetAngularOffset() const;\n\n\t/// Set the maximum friction force in N.\n\tvoid SetMaxForce(float32 force);\n\n\t/// Get the maximum friction force in N.\n\tfloat32 GetMaxForce() const;\n\n\t/// Set the maximum friction torque in N*m.\n\tvoid SetMaxTorque(float32 torque);\n\n\t/// Get the maximum friction torque in N*m.\n\tfloat32 GetMaxTorque() const;\n\n\t/// Set the position correction factor in the range [0,1].\n\tvoid SetCorrectionFactor(float32 factor);\n\n\t/// Get the position correction factor in the range [0,1].\n\tfloat32 GetCorrectionFactor() const;\n\n\t/// Dump to b2Log\n\tvoid Dump();\n\nprotected:\n\n\tfriend class b2Joint;\n\n\tb2MotorJoint(const b2MotorJointDef* def);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\t// Solver shared\n\tb2Vec2 m_linearOffset;\n\tfloat32 m_angularOffset;\n\tb2Vec2 m_linearImpulse;\n\tfloat32 m_angularImpulse;\n\tfloat32 m_maxForce;\n\tfloat32 m_maxTorque;\n\tfloat32 m_correctionFactor;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_rA;\n\tb2Vec2 m_rB;\n\tb2Vec2 m_localCenterA;\n\tb2Vec2 m_localCenterB;\n\tb2Vec2 m_linearError;\n\tfloat32 m_angularError;\n\tfloat32 m_invMassA;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIA;\n\tfloat32 m_invIB;\n\tb2Mat22 m_linearMass;\n\tfloat32 m_angularMass;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2MouseJoint.cpp",
    "content": "/*\n* Copyright (c) 2006-2007 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2MouseJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// p = attached point, m = mouse point\n// C = p - m\n// Cdot = v\n//      = v + cross(w, r)\n// J = [I r_skew]\n// Identity used:\n// w k % (rx i + ry j) = w * (-ry i + rx j)\n\nb2MouseJoint::b2MouseJoint(const b2MouseJointDef* def)\n: b2Joint(def)\n{\n\tb2Assert(def->target.IsValid());\n\tb2Assert(b2IsValid(def->maxForce) && def->maxForce >= 0.0f);\n\tb2Assert(b2IsValid(def->frequencyHz) && def->frequencyHz >= 0.0f);\n\tb2Assert(b2IsValid(def->dampingRatio) && def->dampingRatio >= 0.0f);\n\n\tm_targetA = def->target;\n\tm_localAnchorB = b2MulT(m_bodyB->GetTransform(), m_targetA);\n\n\tm_maxForce = def->maxForce;\n\tm_impulse.SetZero();\n\n\tm_frequencyHz = def->frequencyHz;\n\tm_dampingRatio = def->dampingRatio;\n\n\tm_beta = 0.0f;\n\tm_gamma = 0.0f;\n}\n\nvoid b2MouseJoint::SetTarget(const b2Vec2& target)\n{\n\tif (m_bodyB->IsAwake() == false)\n\t{\n\t\tm_bodyB->SetAwake(true);\n\t}\n\tm_targetA = target;\n}\n\nconst b2Vec2& b2MouseJoint::GetTarget() const\n{\n\treturn m_targetA;\n}\n\nvoid b2MouseJoint::SetMaxForce(float32 force)\n{\n\tm_maxForce = force;\n}\n\nfloat32 b2MouseJoint::GetMaxForce() const\n{\n\treturn m_maxForce;\n}\n\nvoid b2MouseJoint::SetFrequency(float32 hz)\n{\n\tm_frequencyHz = hz;\n}\n\nfloat32 b2MouseJoint::GetFrequency() const\n{\n\treturn m_frequencyHz;\n}\n\nvoid b2MouseJoint::SetDampingRatio(float32 ratio)\n{\n\tm_dampingRatio = ratio;\n}\n\nfloat32 b2MouseJoint::GetDampingRatio() const\n{\n\treturn m_dampingRatio;\n}\n\nvoid b2MouseJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIB = m_bodyB->m_invI;\n\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qB(aB);\n\n\tfloat32 mass = m_bodyB->GetMass();\n\n\t// Frequency\n\tfloat32 omega = 2.0f * b2_pi * m_frequencyHz;\n\n\t// Damping coefficient\n\tfloat32 d = 2.0f * mass * m_dampingRatio * omega;\n\n\t// Spring stiffness\n\tfloat32 k = mass * (omega * omega);\n\n\t// magic formulas\n\t// gamma has units of inverse mass.\n\t// beta has units of inverse time.\n\tfloat32 h = data.step.dt;\n\tb2Assert(d + h * k > b2_epsilon);\n\tm_gamma = h * (d + h * k);\n\tif (m_gamma != 0.0f)\n\t{\n\t\tm_gamma = 1.0f / m_gamma;\n\t}\n\tm_beta = h * k * m_gamma;\n\n\t// Compute the effective mass matrix.\n\tm_rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\n\t// K    = [(1/m1 + 1/m2) * eye(2) - skew(r1) * invI1 * skew(r1) - skew(r2) * invI2 * skew(r2)]\n\t//      = [1/m1+1/m2     0    ] + invI1 * [r1.y*r1.y -r1.x*r1.y] + invI2 * [r1.y*r1.y -r1.x*r1.y]\n\t//        [    0     1/m1+1/m2]           [-r1.x*r1.y r1.x*r1.x]           [-r1.x*r1.y r1.x*r1.x]\n\tb2Mat22 K;\n\tK.ex.x = m_invMassB + m_invIB * m_rB.y * m_rB.y + m_gamma;\n\tK.ex.y = -m_invIB * m_rB.x * m_rB.y;\n\tK.ey.x = K.ex.y;\n\tK.ey.y = m_invMassB + m_invIB * m_rB.x * m_rB.x + m_gamma;\n\n\tm_mass = K.GetInverse();\n\n\tm_C = cB + m_rB - m_targetA;\n\tm_C *= m_beta;\n\n\t// Cheat with some damping\n\twB *= 0.98f;\n\n\tif (data.step.warmStarting)\n\t{\n\t\tm_impulse *= data.step.dtRatio;\n\t\tvB += m_invMassB * m_impulse;\n\t\twB += m_invIB * b2Cross(m_rB, m_impulse);\n\t}\n\telse\n\t{\n\t\tm_impulse.SetZero();\n\t}\n\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2MouseJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\t// Cdot = v + cross(w, r)\n\tb2Vec2 Cdot = vB + b2Cross(wB, m_rB);\n\tb2Vec2 impulse = b2Mul(m_mass, -(Cdot + m_C + m_gamma * m_impulse));\n\n\tb2Vec2 oldImpulse = m_impulse;\n\tm_impulse += impulse;\n\tfloat32 maxImpulse = data.step.dt * m_maxForce;\n\tif (m_impulse.LengthSquared() > maxImpulse * maxImpulse)\n\t{\n\t\tm_impulse *= maxImpulse / m_impulse.Length();\n\t}\n\timpulse = m_impulse - oldImpulse;\n\n\tvB += m_invMassB * impulse;\n\twB += m_invIB * b2Cross(m_rB, impulse);\n\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2MouseJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tB2_NOT_USED(data);\n\treturn true;\n}\n\nb2Vec2 b2MouseJoint::GetAnchorA() const\n{\n\treturn m_targetA;\n}\n\nb2Vec2 b2MouseJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2MouseJoint::GetReactionForce(float32 inv_dt) const\n{\n\treturn inv_dt * m_impulse;\n}\n\nfloat32 b2MouseJoint::GetReactionTorque(float32 inv_dt) const\n{\n\treturn inv_dt * 0.0f;\n}\n\nvoid b2MouseJoint::ShiftOrigin(const b2Vec2& newOrigin)\n{\n\tm_targetA -= newOrigin;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2MouseJoint.h",
    "content": "/*\n* Copyright (c) 2006-2007 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_MOUSE_JOINT_H\n#define B2_MOUSE_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Mouse joint definition. This requires a world target point,\n/// tuning parameters, and the time step.\nstruct b2MouseJointDef : public b2JointDef\n{\n\tb2MouseJointDef()\n\t{\n\t\ttype = e_mouseJoint;\n\t\ttarget.Set(0.0f, 0.0f);\n\t\tmaxForce = 0.0f;\n\t\tfrequencyHz = 5.0f;\n\t\tdampingRatio = 0.7f;\n\t}\n\n\t/// The initial world target point. This is assumed\n\t/// to coincide with the body anchor initially.\n\tb2Vec2 target;\n\n\t/// The maximum constraint force that can be exerted\n\t/// to move the candidate body. Usually you will express\n\t/// as some multiple of the weight (multiplier * mass * gravity).\n\tfloat32 maxForce;\n\n\t/// The response speed.\n\tfloat32 frequencyHz;\n\n\t/// The damping ratio. 0 = no damping, 1 = critical damping.\n\tfloat32 dampingRatio;\n};\n\n/// A mouse joint is used to make a point on a body track a\n/// specified world point. This a soft constraint with a maximum\n/// force. This allows the constraint to stretch and without\n/// applying huge forces.\n/// NOTE: this joint is not documented in the manual because it was\n/// developed to be used in the testbed. If you want to learn how to\n/// use the mouse joint, look at the testbed.\nclass b2MouseJoint : public b2Joint\n{\npublic:\n\n\t/// Implements b2Joint.\n\tb2Vec2 GetAnchorA() const;\n\n\t/// Implements b2Joint.\n\tb2Vec2 GetAnchorB() const;\n\n\t/// Implements b2Joint.\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\n\t/// Implements b2Joint.\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// Use this to update the target point.\n\tvoid SetTarget(const b2Vec2& target);\n\tconst b2Vec2& GetTarget() const;\n\n\t/// Set/get the maximum force in Newtons.\n\tvoid SetMaxForce(float32 force);\n\tfloat32 GetMaxForce() const;\n\n\t/// Set/get the frequency in Hertz.\n\tvoid SetFrequency(float32 hz);\n\tfloat32 GetFrequency() const;\n\n\t/// Set/get the damping ratio (dimensionless).\n\tvoid SetDampingRatio(float32 ratio);\n\tfloat32 GetDampingRatio() const;\n\n\t/// The mouse joint does not support dumping.\n\tvoid Dump() { b2Log(\"Mouse joint dumping is not supported.\\n\"); }\n\n\t/// Implement b2Joint::ShiftOrigin\n\tvoid ShiftOrigin(const b2Vec2& newOrigin);\n\nprotected:\n\tfriend class b2Joint;\n\n\tb2MouseJoint(const b2MouseJointDef* def);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\tb2Vec2 m_localAnchorB;\n\tb2Vec2 m_targetA;\n\tfloat32 m_frequencyHz;\n\tfloat32 m_dampingRatio;\n\tfloat32 m_beta;\n\t\n\t// Solver shared\n\tb2Vec2 m_impulse;\n\tfloat32 m_maxForce;\n\tfloat32 m_gamma;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_rB;\n\tb2Vec2 m_localCenterB;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIB;\n\tb2Mat22 m_mass;\n\tb2Vec2 m_C;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2PrismaticJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// Linear constraint (point-to-line)\n// d = p2 - p1 = x2 + r2 - x1 - r1\n// C = dot(perp, d)\n// Cdot = dot(d, cross(w1, perp)) + dot(perp, v2 + cross(w2, r2) - v1 - cross(w1, r1))\n//      = -dot(perp, v1) - dot(cross(d + r1, perp), w1) + dot(perp, v2) + dot(cross(r2, perp), v2)\n// J = [-perp, -cross(d + r1, perp), perp, cross(r2,perp)]\n//\n// Angular constraint\n// C = a2 - a1 + a_initial\n// Cdot = w2 - w1\n// J = [0 0 -1 0 0 1]\n//\n// K = J * invM * JT\n//\n// J = [-a -s1 a s2]\n//     [0  -1  0  1]\n// a = perp\n// s1 = cross(d + r1, a) = cross(p2 - x1, a)\n// s2 = cross(r2, a) = cross(p2 - x2, a)\n\n\n// Motor/Limit linear constraint\n// C = dot(ax1, d)\n// Cdot = = -dot(ax1, v1) - dot(cross(d + r1, ax1), w1) + dot(ax1, v2) + dot(cross(r2, ax1), v2)\n// J = [-ax1 -cross(d+r1,ax1) ax1 cross(r2,ax1)]\n\n// Block Solver\n// We develop a block solver that includes the joint limit. This makes the limit stiff (inelastic) even\n// when the mass has poor distribution (leading to large torques about the joint anchor points).\n//\n// The Jacobian has 3 rows:\n// J = [-uT -s1 uT s2] // linear\n//     [0   -1   0  1] // angular\n//     [-vT -a1 vT a2] // limit\n//\n// u = perp\n// v = axis\n// s1 = cross(d + r1, u), s2 = cross(r2, u)\n// a1 = cross(d + r1, v), a2 = cross(r2, v)\n\n// M * (v2 - v1) = JT * df\n// J * v2 = bias\n//\n// v2 = v1 + invM * JT * df\n// J * (v1 + invM * JT * df) = bias\n// K * df = bias - J * v1 = -Cdot\n// K = J * invM * JT\n// Cdot = J * v1 - bias\n//\n// Now solve for f2.\n// df = f2 - f1\n// K * (f2 - f1) = -Cdot\n// f2 = invK * (-Cdot) + f1\n//\n// Clamp accumulated limit impulse.\n// lower: f2(3) = max(f2(3), 0)\n// upper: f2(3) = min(f2(3), 0)\n//\n// Solve for correct f2(1:2)\n// K(1:2, 1:2) * f2(1:2) = -Cdot(1:2) - K(1:2,3) * f2(3) + K(1:2,1:3) * f1\n//                       = -Cdot(1:2) - K(1:2,3) * f2(3) + K(1:2,1:2) * f1(1:2) + K(1:2,3) * f1(3)\n// K(1:2, 1:2) * f2(1:2) = -Cdot(1:2) - K(1:2,3) * (f2(3) - f1(3)) + K(1:2,1:2) * f1(1:2)\n// f2(1:2) = invK(1:2,1:2) * (-Cdot(1:2) - K(1:2,3) * (f2(3) - f1(3))) + f1(1:2)\n//\n// Now compute impulse to be applied:\n// df = f2 - f1\n\nvoid b2PrismaticJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor, const b2Vec2& axis)\n{\n\tbodyA = bA;\n\tbodyB = bB;\n\tlocalAnchorA = bodyA->GetLocalPoint(anchor);\n\tlocalAnchorB = bodyB->GetLocalPoint(anchor);\n\tlocalAxisA = bodyA->GetLocalVector(axis);\n\treferenceAngle = bodyB->GetAngle() - bodyA->GetAngle();\n}\n\nb2PrismaticJoint::b2PrismaticJoint(const b2PrismaticJointDef* def)\n: b2Joint(def)\n{\n\tm_localAnchorA = def->localAnchorA;\n\tm_localAnchorB = def->localAnchorB;\n\tm_localXAxisA = def->localAxisA;\n\tm_localXAxisA.Normalize();\n\tm_localYAxisA = b2Cross(1.0f, m_localXAxisA);\n\tm_referenceAngle = def->referenceAngle;\n\n\tm_impulse.SetZero();\n\tm_motorMass = 0.0f;\n\tm_motorImpulse = 0.0f;\n\n\tm_lowerTranslation = def->lowerTranslation;\n\tm_upperTranslation = def->upperTranslation;\n\tm_maxMotorForce = def->maxMotorForce;\n\tm_motorSpeed = def->motorSpeed;\n\tm_enableLimit = def->enableLimit;\n\tm_enableMotor = def->enableMotor;\n\tm_limitState = e_inactiveLimit;\n\n\tm_axis.SetZero();\n\tm_perp.SetZero();\n}\n\nvoid b2PrismaticJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterA = m_bodyA->m_sweep.localCenter;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassA = m_bodyA->m_invMass;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIA = m_bodyA->m_invI;\n\tm_invIB = m_bodyB->m_invI;\n\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qA(aA), qB(aB);\n\n\t// Compute the effective masses.\n\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\tb2Vec2 d = (cB - cA) + rB - rA;\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\t// Compute motor Jacobian and effective mass.\n\t{\n\t\tm_axis = b2Mul(qA, m_localXAxisA);\n\t\tm_a1 = b2Cross(d + rA, m_axis);\n\t\tm_a2 = b2Cross(rB, m_axis);\n\n\t\tm_motorMass = mA + mB + iA * m_a1 * m_a1 + iB * m_a2 * m_a2;\n\t\tif (m_motorMass > 0.0f)\n\t\t{\n\t\t\tm_motorMass = 1.0f / m_motorMass;\n\t\t}\n\t}\n\n\t// Prismatic constraint.\n\t{\n\t\tm_perp = b2Mul(qA, m_localYAxisA);\n\n\t\tm_s1 = b2Cross(d + rA, m_perp);\n\t\tm_s2 = b2Cross(rB, m_perp);\n\n\t\tfloat32 k11 = mA + mB + iA * m_s1 * m_s1 + iB * m_s2 * m_s2;\n\t\tfloat32 k12 = iA * m_s1 + iB * m_s2;\n\t\tfloat32 k13 = iA * m_s1 * m_a1 + iB * m_s2 * m_a2;\n\t\tfloat32 k22 = iA + iB;\n\t\tif (k22 == 0.0f)\n\t\t{\n\t\t\t// For bodies with fixed rotation.\n\t\t\tk22 = 1.0f;\n\t\t}\n\t\tfloat32 k23 = iA * m_a1 + iB * m_a2;\n\t\tfloat32 k33 = mA + mB + iA * m_a1 * m_a1 + iB * m_a2 * m_a2;\n\n\t\tm_K.ex.Set(k11, k12, k13);\n\t\tm_K.ey.Set(k12, k22, k23);\n\t\tm_K.ez.Set(k13, k23, k33);\n\t}\n\n\t// Compute motor and limit terms.\n\tif (m_enableLimit)\n\t{\n\t\tfloat32 jointTranslation = b2Dot(m_axis, d);\n\t\tif (b2Abs(m_upperTranslation - m_lowerTranslation) < 2.0f * b2_linearSlop)\n\t\t{\n\t\t\tm_limitState = e_equalLimits;\n\t\t}\n\t\telse if (jointTranslation <= m_lowerTranslation)\n\t\t{\n\t\t\tif (m_limitState != e_atLowerLimit)\n\t\t\t{\n\t\t\t\tm_limitState = e_atLowerLimit;\n\t\t\t\tm_impulse.z = 0.0f;\n\t\t\t}\n\t\t}\n\t\telse if (jointTranslation >= m_upperTranslation)\n\t\t{\n\t\t\tif (m_limitState != e_atUpperLimit)\n\t\t\t{\n\t\t\t\tm_limitState = e_atUpperLimit;\n\t\t\t\tm_impulse.z = 0.0f;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_limitState = e_inactiveLimit;\n\t\t\tm_impulse.z = 0.0f;\n\t\t}\n\t}\n\telse\n\t{\n\t\tm_limitState = e_inactiveLimit;\n\t\tm_impulse.z = 0.0f;\n\t}\n\n\tif (m_enableMotor == false)\n\t{\n\t\tm_motorImpulse = 0.0f;\n\t}\n\n\tif (data.step.warmStarting)\n\t{\n\t\t// Account for variable time step.\n\t\tm_impulse *= data.step.dtRatio;\n\t\tm_motorImpulse *= data.step.dtRatio;\n\n\t\tb2Vec2 P = m_impulse.x * m_perp + (m_motorImpulse + m_impulse.z) * m_axis;\n\t\tfloat32 LA = m_impulse.x * m_s1 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a1;\n\t\tfloat32 LB = m_impulse.x * m_s2 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a2;\n\n\t\tvA -= mA * P;\n\t\twA -= iA * LA;\n\n\t\tvB += mB * P;\n\t\twB += iB * LB;\n\t}\n\telse\n\t{\n\t\tm_impulse.SetZero();\n\t\tm_motorImpulse = 0.0f;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2PrismaticJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\t// Solve linear motor constraint.\n\tif (m_enableMotor && m_limitState != e_equalLimits)\n\t{\n\t\tfloat32 Cdot = b2Dot(m_axis, vB - vA) + m_a2 * wB - m_a1 * wA;\n\t\tfloat32 impulse = m_motorMass * (m_motorSpeed - Cdot);\n\t\tfloat32 oldImpulse = m_motorImpulse;\n\t\tfloat32 maxImpulse = data.step.dt * m_maxMotorForce;\n\t\tm_motorImpulse = b2Clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse);\n\t\timpulse = m_motorImpulse - oldImpulse;\n\n\t\tb2Vec2 P = impulse * m_axis;\n\t\tfloat32 LA = impulse * m_a1;\n\t\tfloat32 LB = impulse * m_a2;\n\n\t\tvA -= mA * P;\n\t\twA -= iA * LA;\n\n\t\tvB += mB * P;\n\t\twB += iB * LB;\n\t}\n\n\tb2Vec2 Cdot1;\n\tCdot1.x = b2Dot(m_perp, vB - vA) + m_s2 * wB - m_s1 * wA;\n\tCdot1.y = wB - wA;\n\n\tif (m_enableLimit && m_limitState != e_inactiveLimit)\n\t{\n\t\t// Solve prismatic and limit constraint in block form.\n\t\tfloat32 Cdot2;\n\t\tCdot2 = b2Dot(m_axis, vB - vA) + m_a2 * wB - m_a1 * wA;\n\t\tb2Vec3 Cdot(Cdot1.x, Cdot1.y, Cdot2);\n\n\t\tb2Vec3 f1 = m_impulse;\n\t\tb2Vec3 df =  m_K.Solve33(-Cdot);\n\t\tm_impulse += df;\n\n\t\tif (m_limitState == e_atLowerLimit)\n\t\t{\n\t\t\tm_impulse.z = b2Max(m_impulse.z, 0.0f);\n\t\t}\n\t\telse if (m_limitState == e_atUpperLimit)\n\t\t{\n\t\t\tm_impulse.z = b2Min(m_impulse.z, 0.0f);\n\t\t}\n\n\t\t// f2(1:2) = invK(1:2,1:2) * (-Cdot(1:2) - K(1:2,3) * (f2(3) - f1(3))) + f1(1:2)\n\t\tb2Vec2 b = -Cdot1 - (m_impulse.z - f1.z) * b2Vec2(m_K.ez.x, m_K.ez.y);\n\t\tb2Vec2 f2r = m_K.Solve22(b) + b2Vec2(f1.x, f1.y);\n\t\tm_impulse.x = f2r.x;\n\t\tm_impulse.y = f2r.y;\n\n\t\tdf = m_impulse - f1;\n\n\t\tb2Vec2 P = df.x * m_perp + df.z * m_axis;\n\t\tfloat32 LA = df.x * m_s1 + df.y + df.z * m_a1;\n\t\tfloat32 LB = df.x * m_s2 + df.y + df.z * m_a2;\n\n\t\tvA -= mA * P;\n\t\twA -= iA * LA;\n\n\t\tvB += mB * P;\n\t\twB += iB * LB;\n\t}\n\telse\n\t{\n\t\t// Limit is inactive, just solve the prismatic constraint in block form.\n\t\tb2Vec2 df = m_K.Solve22(-Cdot1);\n\t\tm_impulse.x += df.x;\n\t\tm_impulse.y += df.y;\n\n\t\tb2Vec2 P = df.x * m_perp;\n\t\tfloat32 LA = df.x * m_s1 + df.y;\n\t\tfloat32 LB = df.x * m_s2 + df.y;\n\n\t\tvA -= mA * P;\n\t\twA -= iA * LA;\n\n\t\tvB += mB * P;\n\t\twB += iB * LB;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2PrismaticJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\t// Compute fresh Jacobians\n\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\tb2Vec2 d = cB + rB - cA - rA;\n\n\tb2Vec2 axis = b2Mul(qA, m_localXAxisA);\n\tfloat32 a1 = b2Cross(d + rA, axis);\n\tfloat32 a2 = b2Cross(rB, axis);\n\tb2Vec2 perp = b2Mul(qA, m_localYAxisA);\n\n\tfloat32 s1 = b2Cross(d + rA, perp);\n\tfloat32 s2 = b2Cross(rB, perp);\n\n\tb2Vec3 impulse;\n\tb2Vec2 C1;\n\tC1.x = b2Dot(perp, d);\n\tC1.y = aB - aA - m_referenceAngle;\n\n\tfloat32 linearError = b2Abs(C1.x);\n\tfloat32 angularError = b2Abs(C1.y);\n\n\tbool active = false;\n\tfloat32 C2 = 0.0f;\n\tif (m_enableLimit)\n\t{\n\t\tfloat32 translation = b2Dot(axis, d);\n\t\tif (b2Abs(m_upperTranslation - m_lowerTranslation) < 2.0f * b2_linearSlop)\n\t\t{\n\t\t\t// Prevent large angular corrections\n\t\t\tC2 = b2Clamp(translation, -b2_maxLinearCorrection, b2_maxLinearCorrection);\n\t\t\tlinearError = b2Max(linearError, b2Abs(translation));\n\t\t\tactive = true;\n\t\t}\n\t\telse if (translation <= m_lowerTranslation)\n\t\t{\n\t\t\t// Prevent large linear corrections and allow some slop.\n\t\t\tC2 = b2Clamp(translation - m_lowerTranslation + b2_linearSlop, -b2_maxLinearCorrection, 0.0f);\n\t\t\tlinearError = b2Max(linearError, m_lowerTranslation - translation);\n\t\t\tactive = true;\n\t\t}\n\t\telse if (translation >= m_upperTranslation)\n\t\t{\n\t\t\t// Prevent large linear corrections and allow some slop.\n\t\t\tC2 = b2Clamp(translation - m_upperTranslation - b2_linearSlop, 0.0f, b2_maxLinearCorrection);\n\t\t\tlinearError = b2Max(linearError, translation - m_upperTranslation);\n\t\t\tactive = true;\n\t\t}\n\t}\n\n\tif (active)\n\t{\n\t\tfloat32 k11 = mA + mB + iA * s1 * s1 + iB * s2 * s2;\n\t\tfloat32 k12 = iA * s1 + iB * s2;\n\t\tfloat32 k13 = iA * s1 * a1 + iB * s2 * a2;\n\t\tfloat32 k22 = iA + iB;\n\t\tif (k22 == 0.0f)\n\t\t{\n\t\t\t// For fixed rotation\n\t\t\tk22 = 1.0f;\n\t\t}\n\t\tfloat32 k23 = iA * a1 + iB * a2;\n\t\tfloat32 k33 = mA + mB + iA * a1 * a1 + iB * a2 * a2;\n\n\t\tb2Mat33 K;\n\t\tK.ex.Set(k11, k12, k13);\n\t\tK.ey.Set(k12, k22, k23);\n\t\tK.ez.Set(k13, k23, k33);\n\n\t\tb2Vec3 C;\n\t\tC.x = C1.x;\n\t\tC.y = C1.y;\n\t\tC.z = C2;\n\n\t\timpulse = K.Solve33(-C);\n\t}\n\telse\n\t{\n\t\tfloat32 k11 = mA + mB + iA * s1 * s1 + iB * s2 * s2;\n\t\tfloat32 k12 = iA * s1 + iB * s2;\n\t\tfloat32 k22 = iA + iB;\n\t\tif (k22 == 0.0f)\n\t\t{\n\t\t\tk22 = 1.0f;\n\t\t}\n\n\t\tb2Mat22 K;\n\t\tK.ex.Set(k11, k12);\n\t\tK.ey.Set(k12, k22);\n\n\t\tb2Vec2 impulse1 = K.Solve(-C1);\n\t\timpulse.x = impulse1.x;\n\t\timpulse.y = impulse1.y;\n\t\timpulse.z = 0.0f;\n\t}\n\n\tb2Vec2 P = impulse.x * perp + impulse.z * axis;\n\tfloat32 LA = impulse.x * s1 + impulse.y + impulse.z * a1;\n\tfloat32 LB = impulse.x * s2 + impulse.y + impulse.z * a2;\n\n\tcA -= mA * P;\n\taA -= iA * LA;\n\tcB += mB * P;\n\taB += iB * LB;\n\n\tdata.positions[m_indexA].c = cA;\n\tdata.positions[m_indexA].a = aA;\n\tdata.positions[m_indexB].c = cB;\n\tdata.positions[m_indexB].a = aB;\n\n\treturn linearError <= b2_linearSlop && angularError <= b2_angularSlop;\n}\n\nb2Vec2 b2PrismaticJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetWorldPoint(m_localAnchorA);\n}\n\nb2Vec2 b2PrismaticJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2PrismaticJoint::GetReactionForce(float32 inv_dt) const\n{\n\treturn inv_dt * (m_impulse.x * m_perp + (m_motorImpulse + m_impulse.z) * m_axis);\n}\n\nfloat32 b2PrismaticJoint::GetReactionTorque(float32 inv_dt) const\n{\n\treturn inv_dt * m_impulse.y;\n}\n\nfloat32 b2PrismaticJoint::GetJointTranslation() const\n{\n\tb2Vec2 pA = m_bodyA->GetWorldPoint(m_localAnchorA);\n\tb2Vec2 pB = m_bodyB->GetWorldPoint(m_localAnchorB);\n\tb2Vec2 d = pB - pA;\n\tb2Vec2 axis = m_bodyA->GetWorldVector(m_localXAxisA);\n\n\tfloat32 translation = b2Dot(d, axis);\n\treturn translation;\n}\n\nfloat32 b2PrismaticJoint::GetJointSpeed() const\n{\n\tb2Body* bA = m_bodyA;\n\tb2Body* bB = m_bodyB;\n\n\tb2Vec2 rA = b2Mul(bA->m_xf.q, m_localAnchorA - bA->m_sweep.localCenter);\n\tb2Vec2 rB = b2Mul(bB->m_xf.q, m_localAnchorB - bB->m_sweep.localCenter);\n\tb2Vec2 p1 = bA->m_sweep.c + rA;\n\tb2Vec2 p2 = bB->m_sweep.c + rB;\n\tb2Vec2 d = p2 - p1;\n\tb2Vec2 axis = b2Mul(bA->m_xf.q, m_localXAxisA);\n\n\tb2Vec2 vA = bA->m_linearVelocity;\n\tb2Vec2 vB = bB->m_linearVelocity;\n\tfloat32 wA = bA->m_angularVelocity;\n\tfloat32 wB = bB->m_angularVelocity;\n\n\tfloat32 speed = b2Dot(d, b2Cross(wA, axis)) + b2Dot(axis, vB + b2Cross(wB, rB) - vA - b2Cross(wA, rA));\n\treturn speed;\n}\n\nbool b2PrismaticJoint::IsLimitEnabled() const\n{\n\treturn m_enableLimit;\n}\n\nvoid b2PrismaticJoint::EnableLimit(bool flag)\n{\n\tif (flag != m_enableLimit)\n\t{\n\t\tm_bodyA->SetAwake(true);\n\t\tm_bodyB->SetAwake(true);\n\t\tm_enableLimit = flag;\n\t\tm_impulse.z = 0.0f;\n\t}\n}\n\nfloat32 b2PrismaticJoint::GetLowerLimit() const\n{\n\treturn m_lowerTranslation;\n}\n\nfloat32 b2PrismaticJoint::GetUpperLimit() const\n{\n\treturn m_upperTranslation;\n}\n\nvoid b2PrismaticJoint::SetLimits(float32 lower, float32 upper)\n{\n\tb2Assert(lower <= upper);\n\tif (lower != m_lowerTranslation || upper != m_upperTranslation)\n\t{\n\t\tm_bodyA->SetAwake(true);\n\t\tm_bodyB->SetAwake(true);\n\t\tm_lowerTranslation = lower;\n\t\tm_upperTranslation = upper;\n\t\tm_impulse.z = 0.0f;\n\t}\n}\n\nbool b2PrismaticJoint::IsMotorEnabled() const\n{\n\treturn m_enableMotor;\n}\n\nvoid b2PrismaticJoint::EnableMotor(bool flag)\n{\n\tm_bodyA->SetAwake(true);\n\tm_bodyB->SetAwake(true);\n\tm_enableMotor = flag;\n}\n\nvoid b2PrismaticJoint::SetMotorSpeed(float32 speed)\n{\n\tm_bodyA->SetAwake(true);\n\tm_bodyB->SetAwake(true);\n\tm_motorSpeed = speed;\n}\n\nvoid b2PrismaticJoint::SetMaxMotorForce(float32 force)\n{\n\tm_bodyA->SetAwake(true);\n\tm_bodyB->SetAwake(true);\n\tm_maxMotorForce = force;\n}\n\nfloat32 b2PrismaticJoint::GetMotorForce(float32 inv_dt) const\n{\n\treturn inv_dt * m_motorImpulse;\n}\n\nvoid b2PrismaticJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tb2Log(\"  b2PrismaticJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.localAnchorA.Set(%.15lef, %.15lef);\\n\", m_localAnchorA.x, m_localAnchorA.y);\n\tb2Log(\"  jd.localAnchorB.Set(%.15lef, %.15lef);\\n\", m_localAnchorB.x, m_localAnchorB.y);\n\tb2Log(\"  jd.localAxisA.Set(%.15lef, %.15lef);\\n\", m_localXAxisA.x, m_localXAxisA.y);\n\tb2Log(\"  jd.referenceAngle = %.15lef;\\n\", m_referenceAngle);\n\tb2Log(\"  jd.enableLimit = bool(%d);\\n\", m_enableLimit);\n\tb2Log(\"  jd.lowerTranslation = %.15lef;\\n\", m_lowerTranslation);\n\tb2Log(\"  jd.upperTranslation = %.15lef;\\n\", m_upperTranslation);\n\tb2Log(\"  jd.enableMotor = bool(%d);\\n\", m_enableMotor);\n\tb2Log(\"  jd.motorSpeed = %.15lef;\\n\", m_motorSpeed);\n\tb2Log(\"  jd.maxMotorForce = %.15lef;\\n\", m_maxMotorForce);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2PrismaticJoint.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_PRISMATIC_JOINT_H\n#define B2_PRISMATIC_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Prismatic joint definition. This requires defining a line of\n/// motion using an axis and an anchor point. The definition uses local\n/// anchor points and a local axis so that the initial configuration\n/// can violate the constraint slightly. The joint translation is zero\n/// when the local anchor points coincide in world space. Using local\n/// anchors and a local axis helps when saving and loading a game.\nstruct b2PrismaticJointDef : public b2JointDef\n{\n\tb2PrismaticJointDef()\n\t{\n\t\ttype = e_prismaticJoint;\n\t\tlocalAnchorA.SetZero();\n\t\tlocalAnchorB.SetZero();\n\t\tlocalAxisA.Set(1.0f, 0.0f);\n\t\treferenceAngle = 0.0f;\n\t\tenableLimit = false;\n\t\tlowerTranslation = 0.0f;\n\t\tupperTranslation = 0.0f;\n\t\tenableMotor = false;\n\t\tmaxMotorForce = 0.0f;\n\t\tmotorSpeed = 0.0f;\n\t}\n\n\t/// Initialize the bodies, anchors, axis, and reference angle using the world\n\t/// anchor and unit world axis.\n\tvoid Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor, const b2Vec2& axis);\n\n\t/// The local anchor point relative to bodyA's origin.\n\tb2Vec2 localAnchorA;\n\n\t/// The local anchor point relative to bodyB's origin.\n\tb2Vec2 localAnchorB;\n\n\t/// The local translation unit axis in bodyA.\n\tb2Vec2 localAxisA;\n\n\t/// The constrained angle between the bodies: bodyB_angle - bodyA_angle.\n\tfloat32 referenceAngle;\n\n\t/// Enable/disable the joint limit.\n\tbool enableLimit;\n\n\t/// The lower translation limit, usually in meters.\n\tfloat32 lowerTranslation;\n\n\t/// The upper translation limit, usually in meters.\n\tfloat32 upperTranslation;\n\n\t/// Enable/disable the joint motor.\n\tbool enableMotor;\n\n\t/// The maximum motor torque, usually in N-m.\n\tfloat32 maxMotorForce;\n\n\t/// The desired motor speed in radians per second.\n\tfloat32 motorSpeed;\n};\n\n/// A prismatic joint. This joint provides one degree of freedom: translation\n/// along an axis fixed in bodyA. Relative rotation is prevented. You can\n/// use a joint limit to restrict the range of motion and a joint motor to\n/// drive the motion or to model joint friction.\nclass b2PrismaticJoint : public b2Joint\n{\npublic:\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// The local anchor point relative to bodyA's origin.\n\tconst b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; }\n\n\t/// The local anchor point relative to bodyB's origin.\n\tconst b2Vec2& GetLocalAnchorB() const  { return m_localAnchorB; }\n\n\t/// The local joint axis relative to bodyA.\n\tconst b2Vec2& GetLocalAxisA() const { return m_localXAxisA; }\n\n\t/// Get the reference angle.\n\tfloat32 GetReferenceAngle() const { return m_referenceAngle; }\n\n\t/// Get the current joint translation, usually in meters.\n\tfloat32 GetJointTranslation() const;\n\n\t/// Get the current joint translation speed, usually in meters per second.\n\tfloat32 GetJointSpeed() const;\n\n\t/// Is the joint limit enabled?\n\tbool IsLimitEnabled() const;\n\n\t/// Enable/disable the joint limit.\n\tvoid EnableLimit(bool flag);\n\n\t/// Get the lower joint limit, usually in meters.\n\tfloat32 GetLowerLimit() const;\n\n\t/// Get the upper joint limit, usually in meters.\n\tfloat32 GetUpperLimit() const;\n\n\t/// Set the joint limits, usually in meters.\n\tvoid SetLimits(float32 lower, float32 upper);\n\n\t/// Is the joint motor enabled?\n\tbool IsMotorEnabled() const;\n\n\t/// Enable/disable the joint motor.\n\tvoid EnableMotor(bool flag);\n\n\t/// Set the motor speed, usually in meters per second.\n\tvoid SetMotorSpeed(float32 speed);\n\n\t/// Get the motor speed, usually in meters per second.\n\tfloat32 GetMotorSpeed() const;\n\n\t/// Set the maximum motor force, usually in N.\n\tvoid SetMaxMotorForce(float32 force);\n\tfloat32 GetMaxMotorForce() const { return m_maxMotorForce; }\n\n\t/// Get the current motor force given the inverse time step, usually in N.\n\tfloat32 GetMotorForce(float32 inv_dt) const;\n\n\t/// Dump to b2Log\n\tvoid Dump();\n\nprotected:\n\tfriend class b2Joint;\n\tfriend class b2GearJoint;\n\tb2PrismaticJoint(const b2PrismaticJointDef* def);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\t// Solver shared\n\tb2Vec2 m_localAnchorA;\n\tb2Vec2 m_localAnchorB;\n\tb2Vec2 m_localXAxisA;\n\tb2Vec2 m_localYAxisA;\n\tfloat32 m_referenceAngle;\n\tb2Vec3 m_impulse;\n\tfloat32 m_motorImpulse;\n\tfloat32 m_lowerTranslation;\n\tfloat32 m_upperTranslation;\n\tfloat32 m_maxMotorForce;\n\tfloat32 m_motorSpeed;\n\tbool m_enableLimit;\n\tbool m_enableMotor;\n\tb2LimitState m_limitState;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_localCenterA;\n\tb2Vec2 m_localCenterB;\n\tfloat32 m_invMassA;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIA;\n\tfloat32 m_invIB;\n\tb2Vec2 m_axis, m_perp;\n\tfloat32 m_s1, m_s2;\n\tfloat32 m_a1, m_a2;\n\tb2Mat33 m_K;\n\tfloat32 m_motorMass;\n};\n\ninline float32 b2PrismaticJoint::GetMotorSpeed() const\n{\n\treturn m_motorSpeed;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2PulleyJoint.cpp",
    "content": "/*\n* Copyright (c) 2007 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2PulleyJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// Pulley:\n// length1 = norm(p1 - s1)\n// length2 = norm(p2 - s2)\n// C0 = (length1 + ratio * length2)_initial\n// C = C0 - (length1 + ratio * length2)\n// u1 = (p1 - s1) / norm(p1 - s1)\n// u2 = (p2 - s2) / norm(p2 - s2)\n// Cdot = -dot(u1, v1 + cross(w1, r1)) - ratio * dot(u2, v2 + cross(w2, r2))\n// J = -[u1 cross(r1, u1) ratio * u2  ratio * cross(r2, u2)]\n// K = J * invM * JT\n//   = invMass1 + invI1 * cross(r1, u1)^2 + ratio^2 * (invMass2 + invI2 * cross(r2, u2)^2)\n\nvoid b2PulleyJointDef::Initialize(b2Body* bA, b2Body* bB,\n\t\t\t\tconst b2Vec2& groundA, const b2Vec2& groundB,\n\t\t\t\tconst b2Vec2& anchorA, const b2Vec2& anchorB,\n\t\t\t\tfloat32 r)\n{\n\tbodyA = bA;\n\tbodyB = bB;\n\tgroundAnchorA = groundA;\n\tgroundAnchorB = groundB;\n\tlocalAnchorA = bodyA->GetLocalPoint(anchorA);\n\tlocalAnchorB = bodyB->GetLocalPoint(anchorB);\n\tb2Vec2 dA = anchorA - groundA;\n\tlengthA = dA.Length();\n\tb2Vec2 dB = anchorB - groundB;\n\tlengthB = dB.Length();\n\tratio = r;\n\tb2Assert(ratio > b2_epsilon);\n}\n\nb2PulleyJoint::b2PulleyJoint(const b2PulleyJointDef* def)\n: b2Joint(def)\n{\n\tm_groundAnchorA = def->groundAnchorA;\n\tm_groundAnchorB = def->groundAnchorB;\n\tm_localAnchorA = def->localAnchorA;\n\tm_localAnchorB = def->localAnchorB;\n\n\tm_lengthA = def->lengthA;\n\tm_lengthB = def->lengthB;\n\n\tb2Assert(def->ratio != 0.0f);\n\tm_ratio = def->ratio;\n\n\tm_constant = def->lengthA + m_ratio * def->lengthB;\n\n\tm_impulse = 0.0f;\n}\n\nvoid b2PulleyJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterA = m_bodyA->m_sweep.localCenter;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassA = m_bodyA->m_invMass;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIA = m_bodyA->m_invI;\n\tm_invIB = m_bodyB->m_invI;\n\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tm_rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tm_rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\n\t// Get the pulley axes.\n\tm_uA = cA + m_rA - m_groundAnchorA;\n\tm_uB = cB + m_rB - m_groundAnchorB;\n\n\tfloat32 lengthA = m_uA.Length();\n\tfloat32 lengthB = m_uB.Length();\n\n\tif (lengthA > 10.0f * b2_linearSlop)\n\t{\n\t\tm_uA *= 1.0f / lengthA;\n\t}\n\telse\n\t{\n\t\tm_uA.SetZero();\n\t}\n\n\tif (lengthB > 10.0f * b2_linearSlop)\n\t{\n\t\tm_uB *= 1.0f / lengthB;\n\t}\n\telse\n\t{\n\t\tm_uB.SetZero();\n\t}\n\n\t// Compute effective mass.\n\tfloat32 ruA = b2Cross(m_rA, m_uA);\n\tfloat32 ruB = b2Cross(m_rB, m_uB);\n\n\tfloat32 mA = m_invMassA + m_invIA * ruA * ruA;\n\tfloat32 mB = m_invMassB + m_invIB * ruB * ruB;\n\n\tm_mass = mA + m_ratio * m_ratio * mB;\n\n\tif (m_mass > 0.0f)\n\t{\n\t\tm_mass = 1.0f / m_mass;\n\t}\n\n\tif (data.step.warmStarting)\n\t{\n\t\t// Scale impulses to support variable time steps.\n\t\tm_impulse *= data.step.dtRatio;\n\n\t\t// Warm starting.\n\t\tb2Vec2 PA = -(m_impulse) * m_uA;\n\t\tb2Vec2 PB = (-m_ratio * m_impulse) * m_uB;\n\n\t\tvA += m_invMassA * PA;\n\t\twA += m_invIA * b2Cross(m_rA, PA);\n\t\tvB += m_invMassB * PB;\n\t\twB += m_invIB * b2Cross(m_rB, PB);\n\t}\n\telse\n\t{\n\t\tm_impulse = 0.0f;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2PulleyJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Vec2 vpA = vA + b2Cross(wA, m_rA);\n\tb2Vec2 vpB = vB + b2Cross(wB, m_rB);\n\n\tfloat32 Cdot = -b2Dot(m_uA, vpA) - m_ratio * b2Dot(m_uB, vpB);\n\tfloat32 impulse = -m_mass * Cdot;\n\tm_impulse += impulse;\n\n\tb2Vec2 PA = -impulse * m_uA;\n\tb2Vec2 PB = -m_ratio * impulse * m_uB;\n\tvA += m_invMassA * PA;\n\twA += m_invIA * b2Cross(m_rA, PA);\n\tvB += m_invMassB * PB;\n\twB += m_invIB * b2Cross(m_rB, PB);\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2PulleyJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\n\t// Get the pulley axes.\n\tb2Vec2 uA = cA + rA - m_groundAnchorA;\n\tb2Vec2 uB = cB + rB - m_groundAnchorB;\n\n\tfloat32 lengthA = uA.Length();\n\tfloat32 lengthB = uB.Length();\n\n\tif (lengthA > 10.0f * b2_linearSlop)\n\t{\n\t\tuA *= 1.0f / lengthA;\n\t}\n\telse\n\t{\n\t\tuA.SetZero();\n\t}\n\n\tif (lengthB > 10.0f * b2_linearSlop)\n\t{\n\t\tuB *= 1.0f / lengthB;\n\t}\n\telse\n\t{\n\t\tuB.SetZero();\n\t}\n\n\t// Compute effective mass.\n\tfloat32 ruA = b2Cross(rA, uA);\n\tfloat32 ruB = b2Cross(rB, uB);\n\n\tfloat32 mA = m_invMassA + m_invIA * ruA * ruA;\n\tfloat32 mB = m_invMassB + m_invIB * ruB * ruB;\n\n\tfloat32 mass = mA + m_ratio * m_ratio * mB;\n\n\tif (mass > 0.0f)\n\t{\n\t\tmass = 1.0f / mass;\n\t}\n\n\tfloat32 C = m_constant - lengthA - m_ratio * lengthB;\n\tfloat32 linearError = b2Abs(C);\n\n\tfloat32 impulse = -mass * C;\n\n\tb2Vec2 PA = -impulse * uA;\n\tb2Vec2 PB = -m_ratio * impulse * uB;\n\n\tcA += m_invMassA * PA;\n\taA += m_invIA * b2Cross(rA, PA);\n\tcB += m_invMassB * PB;\n\taB += m_invIB * b2Cross(rB, PB);\n\n\tdata.positions[m_indexA].c = cA;\n\tdata.positions[m_indexA].a = aA;\n\tdata.positions[m_indexB].c = cB;\n\tdata.positions[m_indexB].a = aB;\n\n\treturn linearError < b2_linearSlop;\n}\n\nb2Vec2 b2PulleyJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetWorldPoint(m_localAnchorA);\n}\n\nb2Vec2 b2PulleyJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2PulleyJoint::GetReactionForce(float32 inv_dt) const\n{\n\tb2Vec2 P = m_impulse * m_uB;\n\treturn inv_dt * P;\n}\n\nfloat32 b2PulleyJoint::GetReactionTorque(float32 inv_dt) const\n{\n\tB2_NOT_USED(inv_dt);\n\treturn 0.0f;\n}\n\nb2Vec2 b2PulleyJoint::GetGroundAnchorA() const\n{\n\treturn m_groundAnchorA;\n}\n\nb2Vec2 b2PulleyJoint::GetGroundAnchorB() const\n{\n\treturn m_groundAnchorB;\n}\n\nfloat32 b2PulleyJoint::GetLengthA() const\n{\n\treturn m_lengthA;\n}\n\nfloat32 b2PulleyJoint::GetLengthB() const\n{\n\treturn m_lengthB;\n}\n\nfloat32 b2PulleyJoint::GetRatio() const\n{\n\treturn m_ratio;\n}\n\nfloat32 b2PulleyJoint::GetCurrentLengthA() const\n{\n\tb2Vec2 p = m_bodyA->GetWorldPoint(m_localAnchorA);\n\tb2Vec2 s = m_groundAnchorA;\n\tb2Vec2 d = p - s;\n\treturn d.Length();\n}\n\nfloat32 b2PulleyJoint::GetCurrentLengthB() const\n{\n\tb2Vec2 p = m_bodyB->GetWorldPoint(m_localAnchorB);\n\tb2Vec2 s = m_groundAnchorB;\n\tb2Vec2 d = p - s;\n\treturn d.Length();\n}\n\nvoid b2PulleyJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tb2Log(\"  b2PulleyJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.groundAnchorA.Set(%.15lef, %.15lef);\\n\", m_groundAnchorA.x, m_groundAnchorA.y);\n\tb2Log(\"  jd.groundAnchorB.Set(%.15lef, %.15lef);\\n\", m_groundAnchorB.x, m_groundAnchorB.y);\n\tb2Log(\"  jd.localAnchorA.Set(%.15lef, %.15lef);\\n\", m_localAnchorA.x, m_localAnchorA.y);\n\tb2Log(\"  jd.localAnchorB.Set(%.15lef, %.15lef);\\n\", m_localAnchorB.x, m_localAnchorB.y);\n\tb2Log(\"  jd.lengthA = %.15lef;\\n\", m_lengthA);\n\tb2Log(\"  jd.lengthB = %.15lef;\\n\", m_lengthB);\n\tb2Log(\"  jd.ratio = %.15lef;\\n\", m_ratio);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n\nvoid b2PulleyJoint::ShiftOrigin(const b2Vec2& newOrigin)\n{\n\tm_groundAnchorA -= newOrigin;\n\tm_groundAnchorB -= newOrigin;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2PulleyJoint.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_PULLEY_JOINT_H\n#define B2_PULLEY_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\nconst float32 b2_minPulleyLength = 2.0f;\n\n/// Pulley joint definition. This requires two ground anchors,\n/// two dynamic body anchor points, and a pulley ratio.\nstruct b2PulleyJointDef : public b2JointDef\n{\n\tb2PulleyJointDef()\n\t{\n\t\ttype = e_pulleyJoint;\n\t\tgroundAnchorA.Set(-1.0f, 1.0f);\n\t\tgroundAnchorB.Set(1.0f, 1.0f);\n\t\tlocalAnchorA.Set(-1.0f, 0.0f);\n\t\tlocalAnchorB.Set(1.0f, 0.0f);\n\t\tlengthA = 0.0f;\n\t\tlengthB = 0.0f;\n\t\tratio = 1.0f;\n\t\tcollideConnected = true;\n\t}\n\n\t/// Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.\n\tvoid Initialize(b2Body* bodyA, b2Body* bodyB,\n\t\t\t\t\tconst b2Vec2& groundAnchorA, const b2Vec2& groundAnchorB,\n\t\t\t\t\tconst b2Vec2& anchorA, const b2Vec2& anchorB,\n\t\t\t\t\tfloat32 ratio);\n\n\t/// The first ground anchor in world coordinates. This point never moves.\n\tb2Vec2 groundAnchorA;\n\n\t/// The second ground anchor in world coordinates. This point never moves.\n\tb2Vec2 groundAnchorB;\n\n\t/// The local anchor point relative to bodyA's origin.\n\tb2Vec2 localAnchorA;\n\n\t/// The local anchor point relative to bodyB's origin.\n\tb2Vec2 localAnchorB;\n\n\t/// The a reference length for the segment attached to bodyA.\n\tfloat32 lengthA;\n\n\t/// The a reference length for the segment attached to bodyB.\n\tfloat32 lengthB;\n\n\t/// The pulley ratio, used to simulate a block-and-tackle.\n\tfloat32 ratio;\n};\n\n/// The pulley joint is connected to two bodies and two fixed ground points.\n/// The pulley supports a ratio such that:\n/// length1 + ratio * length2 <= constant\n/// Yes, the force transmitted is scaled by the ratio.\n/// Warning: the pulley joint can get a bit squirrelly by itself. They often\n/// work better when combined with prismatic joints. You should also cover the\n/// the anchor points with static shapes to prevent one side from going to\n/// zero length.\nclass b2PulleyJoint : public b2Joint\n{\npublic:\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// Get the first ground anchor.\n\tb2Vec2 GetGroundAnchorA() const;\n\n\t/// Get the second ground anchor.\n\tb2Vec2 GetGroundAnchorB() const;\n\n\t/// Get the current length of the segment attached to bodyA.\n\tfloat32 GetLengthA() const;\n\n\t/// Get the current length of the segment attached to bodyB.\n\tfloat32 GetLengthB() const;\n\n\t/// Get the pulley ratio.\n\tfloat32 GetRatio() const;\n\n\t/// Get the current length of the segment attached to bodyA.\n\tfloat32 GetCurrentLengthA() const;\n\n\t/// Get the current length of the segment attached to bodyB.\n\tfloat32 GetCurrentLengthB() const;\n\n\t/// Dump joint to dmLog\n\tvoid Dump();\n\n\t/// Implement b2Joint::ShiftOrigin\n\tvoid ShiftOrigin(const b2Vec2& newOrigin);\n\nprotected:\n\n\tfriend class b2Joint;\n\tb2PulleyJoint(const b2PulleyJointDef* data);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\tb2Vec2 m_groundAnchorA;\n\tb2Vec2 m_groundAnchorB;\n\tfloat32 m_lengthA;\n\tfloat32 m_lengthB;\n\t\n\t// Solver shared\n\tb2Vec2 m_localAnchorA;\n\tb2Vec2 m_localAnchorB;\n\tfloat32 m_constant;\n\tfloat32 m_ratio;\n\tfloat32 m_impulse;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_uA;\n\tb2Vec2 m_uB;\n\tb2Vec2 m_rA;\n\tb2Vec2 m_rB;\n\tb2Vec2 m_localCenterA;\n\tb2Vec2 m_localCenterB;\n\tfloat32 m_invMassA;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIA;\n\tfloat32 m_invIB;\n\tfloat32 m_mass;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2RevoluteJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// Point-to-point constraint\n// C = p2 - p1\n// Cdot = v2 - v1\n//      = v2 + cross(w2, r2) - v1 - cross(w1, r1)\n// J = [-I -r1_skew I r2_skew ]\n// Identity used:\n// w k % (rx i + ry j) = w * (-ry i + rx j)\n\n// Motor constraint\n// Cdot = w2 - w1\n// J = [0 0 -1 0 0 1]\n// K = invI1 + invI2\n\nvoid b2RevoluteJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor)\n{\n\tbodyA = bA;\n\tbodyB = bB;\n\tlocalAnchorA = bodyA->GetLocalPoint(anchor);\n\tlocalAnchorB = bodyB->GetLocalPoint(anchor);\n\treferenceAngle = bodyB->GetAngle() - bodyA->GetAngle();\n}\n\nb2RevoluteJoint::b2RevoluteJoint(const b2RevoluteJointDef* def)\n: b2Joint(def)\n{\n\tm_localAnchorA = def->localAnchorA;\n\tm_localAnchorB = def->localAnchorB;\n\tm_referenceAngle = def->referenceAngle;\n\n\tm_impulse.SetZero();\n\tm_motorImpulse = 0.0f;\n\n\tm_lowerAngle = def->lowerAngle;\n\tm_upperAngle = def->upperAngle;\n\tm_maxMotorTorque = def->maxMotorTorque;\n\tm_motorSpeed = def->motorSpeed;\n\tm_enableLimit = def->enableLimit;\n\tm_enableMotor = def->enableMotor;\n\tm_limitState = e_inactiveLimit;\n}\n\nvoid b2RevoluteJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterA = m_bodyA->m_sweep.localCenter;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassA = m_bodyA->m_invMass;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIA = m_bodyA->m_invI;\n\tm_invIB = m_bodyB->m_invI;\n\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tm_rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tm_rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\n\t// J = [-I -r1_skew I r2_skew]\n\t//     [ 0       -1 0       1]\n\t// r_skew = [-ry; rx]\n\n\t// Matlab\n\t// K = [ mA+r1y^2*iA+mB+r2y^2*iB,  -r1y*iA*r1x-r2y*iB*r2x,          -r1y*iA-r2y*iB]\n\t//     [  -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB,           r1x*iA+r2x*iB]\n\t//     [          -r1y*iA-r2y*iB,           r1x*iA+r2x*iB,                   iA+iB]\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tbool fixedRotation = (iA + iB == 0.0f);\n\n\tm_mass.ex.x = mA + mB + m_rA.y * m_rA.y * iA + m_rB.y * m_rB.y * iB;\n\tm_mass.ey.x = -m_rA.y * m_rA.x * iA - m_rB.y * m_rB.x * iB;\n\tm_mass.ez.x = -m_rA.y * iA - m_rB.y * iB;\n\tm_mass.ex.y = m_mass.ey.x;\n\tm_mass.ey.y = mA + mB + m_rA.x * m_rA.x * iA + m_rB.x * m_rB.x * iB;\n\tm_mass.ez.y = m_rA.x * iA + m_rB.x * iB;\n\tm_mass.ex.z = m_mass.ez.x;\n\tm_mass.ey.z = m_mass.ez.y;\n\tm_mass.ez.z = iA + iB;\n\n\tm_motorMass = iA + iB;\n\tif (m_motorMass > 0.0f)\n\t{\n\t\tm_motorMass = 1.0f / m_motorMass;\n\t}\n\n\tif (m_enableMotor == false || fixedRotation)\n\t{\n\t\tm_motorImpulse = 0.0f;\n\t}\n\n\tif (m_enableLimit && fixedRotation == false)\n\t{\n\t\tfloat32 jointAngle = aB - aA - m_referenceAngle;\n\t\tif (b2Abs(m_upperAngle - m_lowerAngle) < 2.0f * b2_angularSlop)\n\t\t{\n\t\t\tm_limitState = e_equalLimits;\n\t\t}\n\t\telse if (jointAngle <= m_lowerAngle)\n\t\t{\n\t\t\tif (m_limitState != e_atLowerLimit)\n\t\t\t{\n\t\t\t\tm_impulse.z = 0.0f;\n\t\t\t}\n\t\t\tm_limitState = e_atLowerLimit;\n\t\t}\n\t\telse if (jointAngle >= m_upperAngle)\n\t\t{\n\t\t\tif (m_limitState != e_atUpperLimit)\n\t\t\t{\n\t\t\t\tm_impulse.z = 0.0f;\n\t\t\t}\n\t\t\tm_limitState = e_atUpperLimit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_limitState = e_inactiveLimit;\n\t\t\tm_impulse.z = 0.0f;\n\t\t}\n\t}\n\telse\n\t{\n\t\tm_limitState = e_inactiveLimit;\n\t}\n\n\tif (data.step.warmStarting)\n\t{\n\t\t// Scale impulses to support a variable time step.\n\t\tm_impulse *= data.step.dtRatio;\n\t\tm_motorImpulse *= data.step.dtRatio;\n\n\t\tb2Vec2 P(m_impulse.x, m_impulse.y);\n\n\t\tvA -= mA * P;\n\t\twA -= iA * (b2Cross(m_rA, P) + m_motorImpulse + m_impulse.z);\n\n\t\tvB += mB * P;\n\t\twB += iB * (b2Cross(m_rB, P) + m_motorImpulse + m_impulse.z);\n\t}\n\telse\n\t{\n\t\tm_impulse.SetZero();\n\t\tm_motorImpulse = 0.0f;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2RevoluteJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tbool fixedRotation = (iA + iB == 0.0f);\n\n\t// Solve motor constraint.\n\tif (m_enableMotor && m_limitState != e_equalLimits && fixedRotation == false)\n\t{\n\t\tfloat32 Cdot = wB - wA - m_motorSpeed;\n\t\tfloat32 impulse = -m_motorMass * Cdot;\n\t\tfloat32 oldImpulse = m_motorImpulse;\n\t\tfloat32 maxImpulse = data.step.dt * m_maxMotorTorque;\n\t\tm_motorImpulse = b2Clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse);\n\t\timpulse = m_motorImpulse - oldImpulse;\n\n\t\twA -= iA * impulse;\n\t\twB += iB * impulse;\n\t}\n\n\t// Solve limit constraint.\n\tif (m_enableLimit && m_limitState != e_inactiveLimit && fixedRotation == false)\n\t{\n\t\tb2Vec2 Cdot1 = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA);\n\t\tfloat32 Cdot2 = wB - wA;\n\t\tb2Vec3 Cdot(Cdot1.x, Cdot1.y, Cdot2);\n\n\t\tb2Vec3 impulse = -m_mass.Solve33(Cdot);\n\n\t\tif (m_limitState == e_equalLimits)\n\t\t{\n\t\t\tm_impulse += impulse;\n\t\t}\n\t\telse if (m_limitState == e_atLowerLimit)\n\t\t{\n\t\t\tfloat32 newImpulse = m_impulse.z + impulse.z;\n\t\t\tif (newImpulse < 0.0f)\n\t\t\t{\n\t\t\t\tb2Vec2 rhs = -Cdot1 + m_impulse.z * b2Vec2(m_mass.ez.x, m_mass.ez.y);\n\t\t\t\tb2Vec2 reduced = m_mass.Solve22(rhs);\n\t\t\t\timpulse.x = reduced.x;\n\t\t\t\timpulse.y = reduced.y;\n\t\t\t\timpulse.z = -m_impulse.z;\n\t\t\t\tm_impulse.x += reduced.x;\n\t\t\t\tm_impulse.y += reduced.y;\n\t\t\t\tm_impulse.z = 0.0f;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_impulse += impulse;\n\t\t\t}\n\t\t}\n\t\telse if (m_limitState == e_atUpperLimit)\n\t\t{\n\t\t\tfloat32 newImpulse = m_impulse.z + impulse.z;\n\t\t\tif (newImpulse > 0.0f)\n\t\t\t{\n\t\t\t\tb2Vec2 rhs = -Cdot1 + m_impulse.z * b2Vec2(m_mass.ez.x, m_mass.ez.y);\n\t\t\t\tb2Vec2 reduced = m_mass.Solve22(rhs);\n\t\t\t\timpulse.x = reduced.x;\n\t\t\t\timpulse.y = reduced.y;\n\t\t\t\timpulse.z = -m_impulse.z;\n\t\t\t\tm_impulse.x += reduced.x;\n\t\t\t\tm_impulse.y += reduced.y;\n\t\t\t\tm_impulse.z = 0.0f;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_impulse += impulse;\n\t\t\t}\n\t\t}\n\n\t\tb2Vec2 P(impulse.x, impulse.y);\n\n\t\tvA -= mA * P;\n\t\twA -= iA * (b2Cross(m_rA, P) + impulse.z);\n\n\t\tvB += mB * P;\n\t\twB += iB * (b2Cross(m_rB, P) + impulse.z);\n\t}\n\telse\n\t{\n\t\t// Solve point-to-point constraint\n\t\tb2Vec2 Cdot = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA);\n\t\tb2Vec2 impulse = m_mass.Solve22(-Cdot);\n\n\t\tm_impulse.x += impulse.x;\n\t\tm_impulse.y += impulse.y;\n\n\t\tvA -= mA * impulse;\n\t\twA -= iA * b2Cross(m_rA, impulse);\n\n\t\tvB += mB * impulse;\n\t\twB += iB * b2Cross(m_rB, impulse);\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2RevoluteJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tfloat32 angularError = 0.0f;\n\tfloat32 positionError = 0.0f;\n\n\tbool fixedRotation = (m_invIA + m_invIB == 0.0f);\n\n\t// Solve angular limit constraint.\n\tif (m_enableLimit && m_limitState != e_inactiveLimit && fixedRotation == false)\n\t{\n\t\tfloat32 angle = aB - aA - m_referenceAngle;\n\t\tfloat32 limitImpulse = 0.0f;\n\n\t\tif (m_limitState == e_equalLimits)\n\t\t{\n\t\t\t// Prevent large angular corrections\n\t\t\tfloat32 C = b2Clamp(angle - m_lowerAngle, -b2_maxAngularCorrection, b2_maxAngularCorrection);\n\t\t\tlimitImpulse = -m_motorMass * C;\n\t\t\tangularError = b2Abs(C);\n\t\t}\n\t\telse if (m_limitState == e_atLowerLimit)\n\t\t{\n\t\t\tfloat32 C = angle - m_lowerAngle;\n\t\t\tangularError = -C;\n\n\t\t\t// Prevent large angular corrections and allow some slop.\n\t\t\tC = b2Clamp(C + b2_angularSlop, -b2_maxAngularCorrection, 0.0f);\n\t\t\tlimitImpulse = -m_motorMass * C;\n\t\t}\n\t\telse if (m_limitState == e_atUpperLimit)\n\t\t{\n\t\t\tfloat32 C = angle - m_upperAngle;\n\t\t\tangularError = C;\n\n\t\t\t// Prevent large angular corrections and allow some slop.\n\t\t\tC = b2Clamp(C - b2_angularSlop, 0.0f, b2_maxAngularCorrection);\n\t\t\tlimitImpulse = -m_motorMass * C;\n\t\t}\n\n\t\taA -= m_invIA * limitImpulse;\n\t\taB += m_invIB * limitImpulse;\n\t}\n\n\t// Solve point-to-point constraint.\n\t{\n\t\tqA.Set(aA);\n\t\tqB.Set(aB);\n\t\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\t\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\n\t\tb2Vec2 C = cB + rB - cA - rA;\n\t\tpositionError = C.Length();\n\n\t\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\t\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\t\tb2Mat22 K;\n\t\tK.ex.x = mA + mB + iA * rA.y * rA.y + iB * rB.y * rB.y;\n\t\tK.ex.y = -iA * rA.x * rA.y - iB * rB.x * rB.y;\n\t\tK.ey.x = K.ex.y;\n\t\tK.ey.y = mA + mB + iA * rA.x * rA.x + iB * rB.x * rB.x;\n\n\t\tb2Vec2 impulse = -K.Solve(C);\n\n\t\tcA -= mA * impulse;\n\t\taA -= iA * b2Cross(rA, impulse);\n\n\t\tcB += mB * impulse;\n\t\taB += iB * b2Cross(rB, impulse);\n\t}\n\n\tdata.positions[m_indexA].c = cA;\n\tdata.positions[m_indexA].a = aA;\n\tdata.positions[m_indexB].c = cB;\n\tdata.positions[m_indexB].a = aB;\n\t\n\treturn positionError <= b2_linearSlop && angularError <= b2_angularSlop;\n}\n\nb2Vec2 b2RevoluteJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetWorldPoint(m_localAnchorA);\n}\n\nb2Vec2 b2RevoluteJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2RevoluteJoint::GetReactionForce(float32 inv_dt) const\n{\n\tb2Vec2 P(m_impulse.x, m_impulse.y);\n\treturn inv_dt * P;\n}\n\nfloat32 b2RevoluteJoint::GetReactionTorque(float32 inv_dt) const\n{\n\treturn inv_dt * m_impulse.z;\n}\n\nfloat32 b2RevoluteJoint::GetJointAngle() const\n{\n\tb2Body* bA = m_bodyA;\n\tb2Body* bB = m_bodyB;\n\treturn bB->m_sweep.a - bA->m_sweep.a - m_referenceAngle;\n}\n\nfloat32 b2RevoluteJoint::GetJointSpeed() const\n{\n\tb2Body* bA = m_bodyA;\n\tb2Body* bB = m_bodyB;\n\treturn bB->m_angularVelocity - bA->m_angularVelocity;\n}\n\nbool b2RevoluteJoint::IsMotorEnabled() const\n{\n\treturn m_enableMotor;\n}\n\nvoid b2RevoluteJoint::EnableMotor(bool flag)\n{\n\tm_bodyA->SetAwake(true);\n\tm_bodyB->SetAwake(true);\n\tm_enableMotor = flag;\n}\n\nfloat32 b2RevoluteJoint::GetMotorTorque(float32 inv_dt) const\n{\n\treturn inv_dt * m_motorImpulse;\n}\n\nvoid b2RevoluteJoint::SetMotorSpeed(float32 speed)\n{\n\tm_bodyA->SetAwake(true);\n\tm_bodyB->SetAwake(true);\n\tm_motorSpeed = speed;\n}\n\nvoid b2RevoluteJoint::SetMaxMotorTorque(float32 torque)\n{\n\tm_bodyA->SetAwake(true);\n\tm_bodyB->SetAwake(true);\n\tm_maxMotorTorque = torque;\n}\n\nbool b2RevoluteJoint::IsLimitEnabled() const\n{\n\treturn m_enableLimit;\n}\n\nvoid b2RevoluteJoint::EnableLimit(bool flag)\n{\n\tif (flag != m_enableLimit)\n\t{\n\t\tm_bodyA->SetAwake(true);\n\t\tm_bodyB->SetAwake(true);\n\t\tm_enableLimit = flag;\n\t\tm_impulse.z = 0.0f;\n\t}\n}\n\nfloat32 b2RevoluteJoint::GetLowerLimit() const\n{\n\treturn m_lowerAngle;\n}\n\nfloat32 b2RevoluteJoint::GetUpperLimit() const\n{\n\treturn m_upperAngle;\n}\n\nvoid b2RevoluteJoint::SetLimits(float32 lower, float32 upper)\n{\n\tb2Assert(lower <= upper);\n\t\n\tif (lower != m_lowerAngle || upper != m_upperAngle)\n\t{\n\t\tm_bodyA->SetAwake(true);\n\t\tm_bodyB->SetAwake(true);\n\t\tm_impulse.z = 0.0f;\n\t\tm_lowerAngle = lower;\n\t\tm_upperAngle = upper;\n\t}\n}\n\nvoid b2RevoluteJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tb2Log(\"  b2RevoluteJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.localAnchorA.Set(%.15lef, %.15lef);\\n\", m_localAnchorA.x, m_localAnchorA.y);\n\tb2Log(\"  jd.localAnchorB.Set(%.15lef, %.15lef);\\n\", m_localAnchorB.x, m_localAnchorB.y);\n\tb2Log(\"  jd.referenceAngle = %.15lef;\\n\", m_referenceAngle);\n\tb2Log(\"  jd.enableLimit = bool(%d);\\n\", m_enableLimit);\n\tb2Log(\"  jd.lowerAngle = %.15lef;\\n\", m_lowerAngle);\n\tb2Log(\"  jd.upperAngle = %.15lef;\\n\", m_upperAngle);\n\tb2Log(\"  jd.enableMotor = bool(%d);\\n\", m_enableMotor);\n\tb2Log(\"  jd.motorSpeed = %.15lef;\\n\", m_motorSpeed);\n\tb2Log(\"  jd.maxMotorTorque = %.15lef;\\n\", m_maxMotorTorque);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2RevoluteJoint.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_REVOLUTE_JOINT_H\n#define B2_REVOLUTE_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Revolute joint definition. This requires defining an\n/// anchor point where the bodies are joined. The definition\n/// uses local anchor points so that the initial configuration\n/// can violate the constraint slightly. You also need to\n/// specify the initial relative angle for joint limits. This\n/// helps when saving and loading a game.\n/// The local anchor points are measured from the body's origin\n/// rather than the center of mass because:\n/// 1. you might not know where the center of mass will be.\n/// 2. if you add/remove shapes from a body and recompute the mass,\n///    the joints will be broken.\nstruct b2RevoluteJointDef : public b2JointDef\n{\n\tb2RevoluteJointDef()\n\t{\n\t\ttype = e_revoluteJoint;\n\t\tlocalAnchorA.Set(0.0f, 0.0f);\n\t\tlocalAnchorB.Set(0.0f, 0.0f);\n\t\treferenceAngle = 0.0f;\n\t\tlowerAngle = 0.0f;\n\t\tupperAngle = 0.0f;\n\t\tmaxMotorTorque = 0.0f;\n\t\tmotorSpeed = 0.0f;\n\t\tenableLimit = false;\n\t\tenableMotor = false;\n\t}\n\n\t/// Initialize the bodies, anchors, and reference angle using a world\n\t/// anchor point.\n\tvoid Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor);\n\n\t/// The local anchor point relative to bodyA's origin.\n\tb2Vec2 localAnchorA;\n\n\t/// The local anchor point relative to bodyB's origin.\n\tb2Vec2 localAnchorB;\n\n\t/// The bodyB angle minus bodyA angle in the reference state (radians).\n\tfloat32 referenceAngle;\n\n\t/// A flag to enable joint limits.\n\tbool enableLimit;\n\n\t/// The lower angle for the joint limit (radians).\n\tfloat32 lowerAngle;\n\n\t/// The upper angle for the joint limit (radians).\n\tfloat32 upperAngle;\n\n\t/// A flag to enable the joint motor.\n\tbool enableMotor;\n\n\t/// The desired motor speed. Usually in radians per second.\n\tfloat32 motorSpeed;\n\n\t/// The maximum motor torque used to achieve the desired motor speed.\n\t/// Usually in N-m.\n\tfloat32 maxMotorTorque;\n};\n\n/// A revolute joint constrains two bodies to share a common point while they\n/// are free to rotate about the point. The relative rotation about the shared\n/// point is the joint angle. You can limit the relative rotation with\n/// a joint limit that specifies a lower and upper angle. You can use a motor\n/// to drive the relative rotation about the shared point. A maximum motor torque\n/// is provided so that infinite forces are not generated.\nclass b2RevoluteJoint : public b2Joint\n{\npublic:\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\t/// The local anchor point relative to bodyA's origin.\n\tconst b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; }\n\n\t/// The local anchor point relative to bodyB's origin.\n\tconst b2Vec2& GetLocalAnchorB() const  { return m_localAnchorB; }\n\n\t/// Get the reference angle.\n\tfloat32 GetReferenceAngle() const { return m_referenceAngle; }\n\n\t/// Get the current joint angle in radians.\n\tfloat32 GetJointAngle() const;\n\n\t/// Get the current joint angle speed in radians per second.\n\tfloat32 GetJointSpeed() const;\n\n\t/// Is the joint limit enabled?\n\tbool IsLimitEnabled() const;\n\n\t/// Enable/disable the joint limit.\n\tvoid EnableLimit(bool flag);\n\n\t/// Get the lower joint limit in radians.\n\tfloat32 GetLowerLimit() const;\n\n\t/// Get the upper joint limit in radians.\n\tfloat32 GetUpperLimit() const;\n\n\t/// Set the joint limits in radians.\n\tvoid SetLimits(float32 lower, float32 upper);\n\n\t/// Is the joint motor enabled?\n\tbool IsMotorEnabled() const;\n\n\t/// Enable/disable the joint motor.\n\tvoid EnableMotor(bool flag);\n\n\t/// Set the motor speed in radians per second.\n\tvoid SetMotorSpeed(float32 speed);\n\n\t/// Get the motor speed in radians per second.\n\tfloat32 GetMotorSpeed() const;\n\n\t/// Set the maximum motor torque, usually in N-m.\n\tvoid SetMaxMotorTorque(float32 torque);\n\tfloat32 GetMaxMotorTorque() const { return m_maxMotorTorque; }\n\n\t/// Get the reaction force given the inverse time step.\n\t/// Unit is N.\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\n\t/// Get the reaction torque due to the joint limit given the inverse time step.\n\t/// Unit is N*m.\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// Get the current motor torque given the inverse time step.\n\t/// Unit is N*m.\n\tfloat32 GetMotorTorque(float32 inv_dt) const;\n\n\t/// Dump to b2Log.\n\tvoid Dump();\n\nprotected:\n\t\n\tfriend class b2Joint;\n\tfriend class b2GearJoint;\n\n\tb2RevoluteJoint(const b2RevoluteJointDef* def);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\t// Solver shared\n\tb2Vec2 m_localAnchorA;\n\tb2Vec2 m_localAnchorB;\n\tb2Vec3 m_impulse;\n\tfloat32 m_motorImpulse;\n\n\tbool m_enableMotor;\n\tfloat32 m_maxMotorTorque;\n\tfloat32 m_motorSpeed;\n\n\tbool m_enableLimit;\n\tfloat32 m_referenceAngle;\n\tfloat32 m_lowerAngle;\n\tfloat32 m_upperAngle;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_rA;\n\tb2Vec2 m_rB;\n\tb2Vec2 m_localCenterA;\n\tb2Vec2 m_localCenterB;\n\tfloat32 m_invMassA;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIA;\n\tfloat32 m_invIB;\n\tb2Mat33 m_mass;\t\t\t// effective mass for point-to-point constraint.\n\tfloat32 m_motorMass;\t// effective mass for motor/limit angular constraint.\n\tb2LimitState m_limitState;\n};\n\ninline float32 b2RevoluteJoint::GetMotorSpeed() const\n{\n\treturn m_motorSpeed;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2RopeJoint.cpp",
    "content": "/*\n* Copyright (c) 2007-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2RopeJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n\n// Limit:\n// C = norm(pB - pA) - L\n// u = (pB - pA) / norm(pB - pA)\n// Cdot = dot(u, vB + cross(wB, rB) - vA - cross(wA, rA))\n// J = [-u -cross(rA, u) u cross(rB, u)]\n// K = J * invM * JT\n//   = invMassA + invIA * cross(rA, u)^2 + invMassB + invIB * cross(rB, u)^2\n\nb2RopeJoint::b2RopeJoint(const b2RopeJointDef* def)\n: b2Joint(def)\n{\n\tm_localAnchorA = def->localAnchorA;\n\tm_localAnchorB = def->localAnchorB;\n\n\tm_maxLength = def->maxLength;\n\n\tm_mass = 0.0f;\n\tm_impulse = 0.0f;\n\tm_state = e_inactiveLimit;\n\tm_length = 0.0f;\n}\n\nvoid b2RopeJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterA = m_bodyA->m_sweep.localCenter;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassA = m_bodyA->m_invMass;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIA = m_bodyA->m_invI;\n\tm_invIB = m_bodyB->m_invI;\n\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tm_rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tm_rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\tm_u = cB + m_rB - cA - m_rA;\n\n\tm_length = m_u.Length();\n\n\tfloat32 C = m_length - m_maxLength;\n\tif (C > 0.0f)\n\t{\n\t\tm_state = e_atUpperLimit;\n\t}\n\telse\n\t{\n\t\tm_state = e_inactiveLimit;\n\t}\n\n\tif (m_length > b2_linearSlop)\n\t{\n\t\tm_u *= 1.0f / m_length;\n\t}\n\telse\n\t{\n\t\tm_u.SetZero();\n\t\tm_mass = 0.0f;\n\t\tm_impulse = 0.0f;\n\t\treturn;\n\t}\n\n\t// Compute effective mass.\n\tfloat32 crA = b2Cross(m_rA, m_u);\n\tfloat32 crB = b2Cross(m_rB, m_u);\n\tfloat32 invMass = m_invMassA + m_invIA * crA * crA + m_invMassB + m_invIB * crB * crB;\n\n\tm_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f;\n\n\tif (data.step.warmStarting)\n\t{\n\t\t// Scale the impulse to support a variable time step.\n\t\tm_impulse *= data.step.dtRatio;\n\n\t\tb2Vec2 P = m_impulse * m_u;\n\t\tvA -= m_invMassA * P;\n\t\twA -= m_invIA * b2Cross(m_rA, P);\n\t\tvB += m_invMassB * P;\n\t\twB += m_invIB * b2Cross(m_rB, P);\n\t}\n\telse\n\t{\n\t\tm_impulse = 0.0f;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2RopeJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\t// Cdot = dot(u, v + cross(w, r))\n\tb2Vec2 vpA = vA + b2Cross(wA, m_rA);\n\tb2Vec2 vpB = vB + b2Cross(wB, m_rB);\n\tfloat32 C = m_length - m_maxLength;\n\tfloat32 Cdot = b2Dot(m_u, vpB - vpA);\n\n\t// Predictive constraint.\n\tif (C < 0.0f)\n\t{\n\t\tCdot += data.step.inv_dt * C;\n\t}\n\n\tfloat32 impulse = -m_mass * Cdot;\n\tfloat32 oldImpulse = m_impulse;\n\tm_impulse = b2Min(0.0f, m_impulse + impulse);\n\timpulse = m_impulse - oldImpulse;\n\n\tb2Vec2 P = impulse * m_u;\n\tvA -= m_invMassA * P;\n\twA -= m_invIA * b2Cross(m_rA, P);\n\tvB += m_invMassB * P;\n\twB += m_invIB * b2Cross(m_rB, P);\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2RopeJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\tb2Vec2 u = cB + rB - cA - rA;\n\n\tfloat32 length = u.Normalize();\n\tfloat32 C = length - m_maxLength;\n\n\tC = b2Clamp(C, 0.0f, b2_maxLinearCorrection);\n\n\tfloat32 impulse = -m_mass * C;\n\tb2Vec2 P = impulse * u;\n\n\tcA -= m_invMassA * P;\n\taA -= m_invIA * b2Cross(rA, P);\n\tcB += m_invMassB * P;\n\taB += m_invIB * b2Cross(rB, P);\n\n\tdata.positions[m_indexA].c = cA;\n\tdata.positions[m_indexA].a = aA;\n\tdata.positions[m_indexB].c = cB;\n\tdata.positions[m_indexB].a = aB;\n\n\treturn length - m_maxLength < b2_linearSlop;\n}\n\nb2Vec2 b2RopeJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetWorldPoint(m_localAnchorA);\n}\n\nb2Vec2 b2RopeJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2RopeJoint::GetReactionForce(float32 inv_dt) const\n{\n\tb2Vec2 F = (inv_dt * m_impulse) * m_u;\n\treturn F;\n}\n\nfloat32 b2RopeJoint::GetReactionTorque(float32 inv_dt) const\n{\n\tB2_NOT_USED(inv_dt);\n\treturn 0.0f;\n}\n\nfloat32 b2RopeJoint::GetMaxLength() const\n{\n\treturn m_maxLength;\n}\n\nb2LimitState b2RopeJoint::GetLimitState() const\n{\n\treturn m_state;\n}\n\nvoid b2RopeJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tb2Log(\"  b2RopeJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.localAnchorA.Set(%.15lef, %.15lef);\\n\", m_localAnchorA.x, m_localAnchorA.y);\n\tb2Log(\"  jd.localAnchorB.Set(%.15lef, %.15lef);\\n\", m_localAnchorB.x, m_localAnchorB.y);\n\tb2Log(\"  jd.maxLength = %.15lef;\\n\", m_maxLength);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2RopeJoint.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_ROPE_JOINT_H\n#define B2_ROPE_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Rope joint definition. This requires two body anchor points and\n/// a maximum lengths.\n/// Note: by default the connected objects will not collide.\n/// see collideConnected in b2JointDef.\nstruct b2RopeJointDef : public b2JointDef\n{\n\tb2RopeJointDef()\n\t{\n\t\ttype = e_ropeJoint;\n\t\tlocalAnchorA.Set(-1.0f, 0.0f);\n\t\tlocalAnchorB.Set(1.0f, 0.0f);\n\t\tmaxLength = 0.0f;\n\t}\n\n\t/// The local anchor point relative to bodyA's origin.\n\tb2Vec2 localAnchorA;\n\n\t/// The local anchor point relative to bodyB's origin.\n\tb2Vec2 localAnchorB;\n\n\t/// The maximum length of the rope.\n\t/// Warning: this must be larger than b2_linearSlop or\n\t/// the joint will have no effect.\n\tfloat32 maxLength;\n};\n\n/// A rope joint enforces a maximum distance between two points\n/// on two bodies. It has no other effect.\n/// Warning: if you attempt to change the maximum length during\n/// the simulation you will get some non-physical behavior.\n/// A model that would allow you to dynamically modify the length\n/// would have some sponginess, so I chose not to implement it\n/// that way. See b2DistanceJoint if you want to dynamically\n/// control length.\nclass b2RopeJoint : public b2Joint\n{\npublic:\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// The local anchor point relative to bodyA's origin.\n\tconst b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; }\n\n\t/// The local anchor point relative to bodyB's origin.\n\tconst b2Vec2& GetLocalAnchorB() const  { return m_localAnchorB; }\n\n\t/// Set/Get the maximum length of the rope.\n\tvoid SetMaxLength(float32 length) { m_maxLength = length; }\n\tfloat32 GetMaxLength() const;\n\n\tb2LimitState GetLimitState() const;\n\n\t/// Dump joint to dmLog\n\tvoid Dump();\n\nprotected:\n\n\tfriend class b2Joint;\n\tb2RopeJoint(const b2RopeJointDef* data);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\t// Solver shared\n\tb2Vec2 m_localAnchorA;\n\tb2Vec2 m_localAnchorB;\n\tfloat32 m_maxLength;\n\tfloat32 m_length;\n\tfloat32 m_impulse;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_u;\n\tb2Vec2 m_rA;\n\tb2Vec2 m_rB;\n\tb2Vec2 m_localCenterA;\n\tb2Vec2 m_localCenterB;\n\tfloat32 m_invMassA;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIA;\n\tfloat32 m_invIB;\n\tfloat32 m_mass;\n\tb2LimitState m_state;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2WeldJoint.cpp",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2WeldJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// Point-to-point constraint\n// C = p2 - p1\n// Cdot = v2 - v1\n//      = v2 + cross(w2, r2) - v1 - cross(w1, r1)\n// J = [-I -r1_skew I r2_skew ]\n// Identity used:\n// w k % (rx i + ry j) = w * (-ry i + rx j)\n\n// Angle constraint\n// C = angle2 - angle1 - referenceAngle\n// Cdot = w2 - w1\n// J = [0 0 -1 0 0 1]\n// K = invI1 + invI2\n\nvoid b2WeldJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor)\n{\n\tbodyA = bA;\n\tbodyB = bB;\n\tlocalAnchorA = bodyA->GetLocalPoint(anchor);\n\tlocalAnchorB = bodyB->GetLocalPoint(anchor);\n\treferenceAngle = bodyB->GetAngle() - bodyA->GetAngle();\n}\n\nb2WeldJoint::b2WeldJoint(const b2WeldJointDef* def)\n: b2Joint(def)\n{\n\tm_localAnchorA = def->localAnchorA;\n\tm_localAnchorB = def->localAnchorB;\n\tm_referenceAngle = def->referenceAngle;\n\tm_frequencyHz = def->frequencyHz;\n\tm_dampingRatio = def->dampingRatio;\n\n\tm_impulse.SetZero();\n}\n\nvoid b2WeldJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterA = m_bodyA->m_sweep.localCenter;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassA = m_bodyA->m_invMass;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIA = m_bodyA->m_invI;\n\tm_invIB = m_bodyB->m_invI;\n\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tm_rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tm_rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\n\t// J = [-I -r1_skew I r2_skew]\n\t//     [ 0       -1 0       1]\n\t// r_skew = [-ry; rx]\n\n\t// Matlab\n\t// K = [ mA+r1y^2*iA+mB+r2y^2*iB,  -r1y*iA*r1x-r2y*iB*r2x,          -r1y*iA-r2y*iB]\n\t//     [  -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB,           r1x*iA+r2x*iB]\n\t//     [          -r1y*iA-r2y*iB,           r1x*iA+r2x*iB,                   iA+iB]\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tb2Mat33 K;\n\tK.ex.x = mA + mB + m_rA.y * m_rA.y * iA + m_rB.y * m_rB.y * iB;\n\tK.ey.x = -m_rA.y * m_rA.x * iA - m_rB.y * m_rB.x * iB;\n\tK.ez.x = -m_rA.y * iA - m_rB.y * iB;\n\tK.ex.y = K.ey.x;\n\tK.ey.y = mA + mB + m_rA.x * m_rA.x * iA + m_rB.x * m_rB.x * iB;\n\tK.ez.y = m_rA.x * iA + m_rB.x * iB;\n\tK.ex.z = K.ez.x;\n\tK.ey.z = K.ez.y;\n\tK.ez.z = iA + iB;\n\n\tif (m_frequencyHz > 0.0f)\n\t{\n\t\tK.GetInverse22(&m_mass);\n\n\t\tfloat32 invM = iA + iB;\n\t\tfloat32 m = invM > 0.0f ? 1.0f / invM : 0.0f;\n\n\t\tfloat32 C = aB - aA - m_referenceAngle;\n\n\t\t// Frequency\n\t\tfloat32 omega = 2.0f * b2_pi * m_frequencyHz;\n\n\t\t// Damping coefficient\n\t\tfloat32 d = 2.0f * m * m_dampingRatio * omega;\n\n\t\t// Spring stiffness\n\t\tfloat32 k = m * omega * omega;\n\n\t\t// magic formulas\n\t\tfloat32 h = data.step.dt;\n\t\tm_gamma = h * (d + h * k);\n\t\tm_gamma = m_gamma != 0.0f ? 1.0f / m_gamma : 0.0f;\n\t\tm_bias = C * h * k * m_gamma;\n\n\t\tinvM += m_gamma;\n\t\tm_mass.ez.z = invM != 0.0f ? 1.0f / invM : 0.0f;\n\t}\n\telse\n\t{\n\t\tK.GetSymInverse33(&m_mass);\n\t\tm_gamma = 0.0f;\n\t\tm_bias = 0.0f;\n\t}\n\n\tif (data.step.warmStarting)\n\t{\n\t\t// Scale impulses to support a variable time step.\n\t\tm_impulse *= data.step.dtRatio;\n\n\t\tb2Vec2 P(m_impulse.x, m_impulse.y);\n\n\t\tvA -= mA * P;\n\t\twA -= iA * (b2Cross(m_rA, P) + m_impulse.z);\n\n\t\tvB += mB * P;\n\t\twB += iB * (b2Cross(m_rB, P) + m_impulse.z);\n\t}\n\telse\n\t{\n\t\tm_impulse.SetZero();\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2WeldJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tif (m_frequencyHz > 0.0f)\n\t{\n\t\tfloat32 Cdot2 = wB - wA;\n\n\t\tfloat32 impulse2 = -m_mass.ez.z * (Cdot2 + m_bias + m_gamma * m_impulse.z);\n\t\tm_impulse.z += impulse2;\n\n\t\twA -= iA * impulse2;\n\t\twB += iB * impulse2;\n\n\t\tb2Vec2 Cdot1 = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA);\n\n\t\tb2Vec2 impulse1 = -b2Mul22(m_mass, Cdot1);\n\t\tm_impulse.x += impulse1.x;\n\t\tm_impulse.y += impulse1.y;\n\n\t\tb2Vec2 P = impulse1;\n\n\t\tvA -= mA * P;\n\t\twA -= iA * b2Cross(m_rA, P);\n\n\t\tvB += mB * P;\n\t\twB += iB * b2Cross(m_rB, P);\n\t}\n\telse\n\t{\n\t\tb2Vec2 Cdot1 = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA);\n\t\tfloat32 Cdot2 = wB - wA;\n\t\tb2Vec3 Cdot(Cdot1.x, Cdot1.y, Cdot2);\n\n\t\tb2Vec3 impulse = -b2Mul(m_mass, Cdot);\n\t\tm_impulse += impulse;\n\n\t\tb2Vec2 P(impulse.x, impulse.y);\n\n\t\tvA -= mA * P;\n\t\twA -= iA * (b2Cross(m_rA, P) + impulse.z);\n\n\t\tvB += mB * P;\n\t\twB += iB * (b2Cross(m_rB, P) + impulse.z);\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2WeldJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\n\tfloat32 positionError, angularError;\n\n\tb2Mat33 K;\n\tK.ex.x = mA + mB + rA.y * rA.y * iA + rB.y * rB.y * iB;\n\tK.ey.x = -rA.y * rA.x * iA - rB.y * rB.x * iB;\n\tK.ez.x = -rA.y * iA - rB.y * iB;\n\tK.ex.y = K.ey.x;\n\tK.ey.y = mA + mB + rA.x * rA.x * iA + rB.x * rB.x * iB;\n\tK.ez.y = rA.x * iA + rB.x * iB;\n\tK.ex.z = K.ez.x;\n\tK.ey.z = K.ez.y;\n\tK.ez.z = iA + iB;\n\n\tif (m_frequencyHz > 0.0f)\n\t{\n\t\tb2Vec2 C1 =  cB + rB - cA - rA;\n\n\t\tpositionError = C1.Length();\n\t\tangularError = 0.0f;\n\n\t\tb2Vec2 P = -K.Solve22(C1);\n\n\t\tcA -= mA * P;\n\t\taA -= iA * b2Cross(rA, P);\n\n\t\tcB += mB * P;\n\t\taB += iB * b2Cross(rB, P);\n\t}\n\telse\n\t{\n\t\tb2Vec2 C1 =  cB + rB - cA - rA;\n\t\tfloat32 C2 = aB - aA - m_referenceAngle;\n\n\t\tpositionError = C1.Length();\n\t\tangularError = b2Abs(C2);\n\n\t\tb2Vec3 C(C1.x, C1.y, C2);\n\t\n\t\tb2Vec3 impulse = -K.Solve33(C);\n\t\tb2Vec2 P(impulse.x, impulse.y);\n\n\t\tcA -= mA * P;\n\t\taA -= iA * (b2Cross(rA, P) + impulse.z);\n\n\t\tcB += mB * P;\n\t\taB += iB * (b2Cross(rB, P) + impulse.z);\n\t}\n\n\tdata.positions[m_indexA].c = cA;\n\tdata.positions[m_indexA].a = aA;\n\tdata.positions[m_indexB].c = cB;\n\tdata.positions[m_indexB].a = aB;\n\n\treturn positionError <= b2_linearSlop && angularError <= b2_angularSlop;\n}\n\nb2Vec2 b2WeldJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetWorldPoint(m_localAnchorA);\n}\n\nb2Vec2 b2WeldJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2WeldJoint::GetReactionForce(float32 inv_dt) const\n{\n\tb2Vec2 P(m_impulse.x, m_impulse.y);\n\treturn inv_dt * P;\n}\n\nfloat32 b2WeldJoint::GetReactionTorque(float32 inv_dt) const\n{\n\treturn inv_dt * m_impulse.z;\n}\n\nvoid b2WeldJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tb2Log(\"  b2WeldJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.localAnchorA.Set(%.15lef, %.15lef);\\n\", m_localAnchorA.x, m_localAnchorA.y);\n\tb2Log(\"  jd.localAnchorB.Set(%.15lef, %.15lef);\\n\", m_localAnchorB.x, m_localAnchorB.y);\n\tb2Log(\"  jd.referenceAngle = %.15lef;\\n\", m_referenceAngle);\n\tb2Log(\"  jd.frequencyHz = %.15lef;\\n\", m_frequencyHz);\n\tb2Log(\"  jd.dampingRatio = %.15lef;\\n\", m_dampingRatio);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2WeldJoint.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_WELD_JOINT_H\n#define B2_WELD_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Weld joint definition. You need to specify local anchor points\n/// where they are attached and the relative body angle. The position\n/// of the anchor points is important for computing the reaction torque.\nstruct b2WeldJointDef : public b2JointDef\n{\n\tb2WeldJointDef()\n\t{\n\t\ttype = e_weldJoint;\n\t\tlocalAnchorA.Set(0.0f, 0.0f);\n\t\tlocalAnchorB.Set(0.0f, 0.0f);\n\t\treferenceAngle = 0.0f;\n\t\tfrequencyHz = 0.0f;\n\t\tdampingRatio = 0.0f;\n\t}\n\n\t/// Initialize the bodies, anchors, and reference angle using a world\n\t/// anchor point.\n\tvoid Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor);\n\n\t/// The local anchor point relative to bodyA's origin.\n\tb2Vec2 localAnchorA;\n\n\t/// The local anchor point relative to bodyB's origin.\n\tb2Vec2 localAnchorB;\n\n\t/// The bodyB angle minus bodyA angle in the reference state (radians).\n\tfloat32 referenceAngle;\n\t\n\t/// The mass-spring-damper frequency in Hertz. Rotation only.\n\t/// Disable softness with a value of 0.\n\tfloat32 frequencyHz;\n\n\t/// The damping ratio. 0 = no damping, 1 = critical damping.\n\tfloat32 dampingRatio;\n};\n\n/// A weld joint essentially glues two bodies together. A weld joint may\n/// distort somewhat because the island constraint solver is approximate.\nclass b2WeldJoint : public b2Joint\n{\npublic:\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// The local anchor point relative to bodyA's origin.\n\tconst b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; }\n\n\t/// The local anchor point relative to bodyB's origin.\n\tconst b2Vec2& GetLocalAnchorB() const  { return m_localAnchorB; }\n\n\t/// Get the reference angle.\n\tfloat32 GetReferenceAngle() const { return m_referenceAngle; }\n\n\t/// Set/get frequency in Hz.\n\tvoid SetFrequency(float32 hz) { m_frequencyHz = hz; }\n\tfloat32 GetFrequency() const { return m_frequencyHz; }\n\n\t/// Set/get damping ratio.\n\tvoid SetDampingRatio(float32 ratio) { m_dampingRatio = ratio; }\n\tfloat32 GetDampingRatio() const { return m_dampingRatio; }\n\n\t/// Dump to b2Log\n\tvoid Dump();\n\nprotected:\n\n\tfriend class b2Joint;\n\n\tb2WeldJoint(const b2WeldJointDef* def);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\tfloat32 m_frequencyHz;\n\tfloat32 m_dampingRatio;\n\tfloat32 m_bias;\n\n\t// Solver shared\n\tb2Vec2 m_localAnchorA;\n\tb2Vec2 m_localAnchorB;\n\tfloat32 m_referenceAngle;\n\tfloat32 m_gamma;\n\tb2Vec3 m_impulse;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_rA;\n\tb2Vec2 m_rB;\n\tb2Vec2 m_localCenterA;\n\tb2Vec2 m_localCenterB;\n\tfloat32 m_invMassA;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIA;\n\tfloat32 m_invIB;\n\tb2Mat33 m_mass;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2WheelJoint.cpp",
    "content": "/*\n* Copyright (c) 2006-2007 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/Joints/b2WheelJoint.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\n// Linear constraint (point-to-line)\n// d = pB - pA = xB + rB - xA - rA\n// C = dot(ay, d)\n// Cdot = dot(d, cross(wA, ay)) + dot(ay, vB + cross(wB, rB) - vA - cross(wA, rA))\n//      = -dot(ay, vA) - dot(cross(d + rA, ay), wA) + dot(ay, vB) + dot(cross(rB, ay), vB)\n// J = [-ay, -cross(d + rA, ay), ay, cross(rB, ay)]\n\n// Spring linear constraint\n// C = dot(ax, d)\n// Cdot = = -dot(ax, vA) - dot(cross(d + rA, ax), wA) + dot(ax, vB) + dot(cross(rB, ax), vB)\n// J = [-ax -cross(d+rA, ax) ax cross(rB, ax)]\n\n// Motor rotational constraint\n// Cdot = wB - wA\n// J = [0 0 -1 0 0 1]\n\nvoid b2WheelJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor, const b2Vec2& axis)\n{\n\tbodyA = bA;\n\tbodyB = bB;\n\tlocalAnchorA = bodyA->GetLocalPoint(anchor);\n\tlocalAnchorB = bodyB->GetLocalPoint(anchor);\n\tlocalAxisA = bodyA->GetLocalVector(axis);\n}\n\nb2WheelJoint::b2WheelJoint(const b2WheelJointDef* def)\n: b2Joint(def)\n{\n\tm_localAnchorA = def->localAnchorA;\n\tm_localAnchorB = def->localAnchorB;\n\tm_localXAxisA = def->localAxisA;\n\tm_localYAxisA = b2Cross(1.0f, m_localXAxisA);\n\n\tm_mass = 0.0f;\n\tm_impulse = 0.0f;\n\tm_motorMass = 0.0f;\n\tm_motorImpulse = 0.0f;\n\tm_springMass = 0.0f;\n\tm_springImpulse = 0.0f;\n\n\tm_maxMotorTorque = def->maxMotorTorque;\n\tm_motorSpeed = def->motorSpeed;\n\tm_enableMotor = def->enableMotor;\n\n\tm_frequencyHz = def->frequencyHz;\n\tm_dampingRatio = def->dampingRatio;\n\n\tm_bias = 0.0f;\n\tm_gamma = 0.0f;\n\n\tm_ax.SetZero();\n\tm_ay.SetZero();\n}\n\nvoid b2WheelJoint::InitVelocityConstraints(const b2SolverData& data)\n{\n\tm_indexA = m_bodyA->m_islandIndex;\n\tm_indexB = m_bodyB->m_islandIndex;\n\tm_localCenterA = m_bodyA->m_sweep.localCenter;\n\tm_localCenterB = m_bodyB->m_sweep.localCenter;\n\tm_invMassA = m_bodyA->m_invMass;\n\tm_invMassB = m_bodyB->m_invMass;\n\tm_invIA = m_bodyA->m_invI;\n\tm_invIB = m_bodyB->m_invI;\n\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\tb2Rot qA(aA), qB(aB);\n\n\t// Compute the effective masses.\n\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\tb2Vec2 d = cB + rB - cA - rA;\n\n\t// Point to line constraint\n\t{\n\t\tm_ay = b2Mul(qA, m_localYAxisA);\n\t\tm_sAy = b2Cross(d + rA, m_ay);\n\t\tm_sBy = b2Cross(rB, m_ay);\n\n\t\tm_mass = mA + mB + iA * m_sAy * m_sAy + iB * m_sBy * m_sBy;\n\n\t\tif (m_mass > 0.0f)\n\t\t{\n\t\t\tm_mass = 1.0f / m_mass;\n\t\t}\n\t}\n\n\t// Spring constraint\n\tm_springMass = 0.0f;\n\tm_bias = 0.0f;\n\tm_gamma = 0.0f;\n\tif (m_frequencyHz > 0.0f)\n\t{\n\t\tm_ax = b2Mul(qA, m_localXAxisA);\n\t\tm_sAx = b2Cross(d + rA, m_ax);\n\t\tm_sBx = b2Cross(rB, m_ax);\n\n\t\tfloat32 invMass = mA + mB + iA * m_sAx * m_sAx + iB * m_sBx * m_sBx;\n\n\t\tif (invMass > 0.0f)\n\t\t{\n\t\t\tm_springMass = 1.0f / invMass;\n\n\t\t\tfloat32 C = b2Dot(d, m_ax);\n\n\t\t\t// Frequency\n\t\t\tfloat32 omega = 2.0f * b2_pi * m_frequencyHz;\n\n\t\t\t// Damping coefficient\n\t\t\tfloat32 d = 2.0f * m_springMass * m_dampingRatio * omega;\n\n\t\t\t// Spring stiffness\n\t\t\tfloat32 k = m_springMass * omega * omega;\n\n\t\t\t// magic formulas\n\t\t\tfloat32 h = data.step.dt;\n\t\t\tm_gamma = h * (d + h * k);\n\t\t\tif (m_gamma > 0.0f)\n\t\t\t{\n\t\t\t\tm_gamma = 1.0f / m_gamma;\n\t\t\t}\n\n\t\t\tm_bias = C * h * k * m_gamma;\n\n\t\t\tm_springMass = invMass + m_gamma;\n\t\t\tif (m_springMass > 0.0f)\n\t\t\t{\n\t\t\t\tm_springMass = 1.0f / m_springMass;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tm_springImpulse = 0.0f;\n\t}\n\n\t// Rotational motor\n\tif (m_enableMotor)\n\t{\n\t\tm_motorMass = iA + iB;\n\t\tif (m_motorMass > 0.0f)\n\t\t{\n\t\t\tm_motorMass = 1.0f / m_motorMass;\n\t\t}\n\t}\n\telse\n\t{\n\t\tm_motorMass = 0.0f;\n\t\tm_motorImpulse = 0.0f;\n\t}\n\n\tif (data.step.warmStarting)\n\t{\n\t\t// Account for variable time step.\n\t\tm_impulse *= data.step.dtRatio;\n\t\tm_springImpulse *= data.step.dtRatio;\n\t\tm_motorImpulse *= data.step.dtRatio;\n\n\t\tb2Vec2 P = m_impulse * m_ay + m_springImpulse * m_ax;\n\t\tfloat32 LA = m_impulse * m_sAy + m_springImpulse * m_sAx + m_motorImpulse;\n\t\tfloat32 LB = m_impulse * m_sBy + m_springImpulse * m_sBx + m_motorImpulse;\n\n\t\tvA -= m_invMassA * P;\n\t\twA -= m_invIA * LA;\n\n\t\tvB += m_invMassB * P;\n\t\twB += m_invIB * LB;\n\t}\n\telse\n\t{\n\t\tm_impulse = 0.0f;\n\t\tm_springImpulse = 0.0f;\n\t\tm_motorImpulse = 0.0f;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nvoid b2WheelJoint::SolveVelocityConstraints(const b2SolverData& data)\n{\n\tfloat32 mA = m_invMassA, mB = m_invMassB;\n\tfloat32 iA = m_invIA, iB = m_invIB;\n\n\tb2Vec2 vA = data.velocities[m_indexA].v;\n\tfloat32 wA = data.velocities[m_indexA].w;\n\tb2Vec2 vB = data.velocities[m_indexB].v;\n\tfloat32 wB = data.velocities[m_indexB].w;\n\n\t// Solve spring constraint\n\t{\n\t\tfloat32 Cdot = b2Dot(m_ax, vB - vA) + m_sBx * wB - m_sAx * wA;\n\t\tfloat32 impulse = -m_springMass * (Cdot + m_bias + m_gamma * m_springImpulse);\n\t\tm_springImpulse += impulse;\n\n\t\tb2Vec2 P = impulse * m_ax;\n\t\tfloat32 LA = impulse * m_sAx;\n\t\tfloat32 LB = impulse * m_sBx;\n\n\t\tvA -= mA * P;\n\t\twA -= iA * LA;\n\n\t\tvB += mB * P;\n\t\twB += iB * LB;\n\t}\n\n\t// Solve rotational motor constraint\n\t{\n\t\tfloat32 Cdot = wB - wA - m_motorSpeed;\n\t\tfloat32 impulse = -m_motorMass * Cdot;\n\n\t\tfloat32 oldImpulse = m_motorImpulse;\n\t\tfloat32 maxImpulse = data.step.dt * m_maxMotorTorque;\n\t\tm_motorImpulse = b2Clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse);\n\t\timpulse = m_motorImpulse - oldImpulse;\n\n\t\twA -= iA * impulse;\n\t\twB += iB * impulse;\n\t}\n\n\t// Solve point to line constraint\n\t{\n\t\tfloat32 Cdot = b2Dot(m_ay, vB - vA) + m_sBy * wB - m_sAy * wA;\n\t\tfloat32 impulse = -m_mass * Cdot;\n\t\tm_impulse += impulse;\n\n\t\tb2Vec2 P = impulse * m_ay;\n\t\tfloat32 LA = impulse * m_sAy;\n\t\tfloat32 LB = impulse * m_sBy;\n\n\t\tvA -= mA * P;\n\t\twA -= iA * LA;\n\n\t\tvB += mB * P;\n\t\twB += iB * LB;\n\t}\n\n\tdata.velocities[m_indexA].v = vA;\n\tdata.velocities[m_indexA].w = wA;\n\tdata.velocities[m_indexB].v = vB;\n\tdata.velocities[m_indexB].w = wB;\n}\n\nbool b2WheelJoint::SolvePositionConstraints(const b2SolverData& data)\n{\n\tb2Vec2 cA = data.positions[m_indexA].c;\n\tfloat32 aA = data.positions[m_indexA].a;\n\tb2Vec2 cB = data.positions[m_indexB].c;\n\tfloat32 aB = data.positions[m_indexB].a;\n\n\tb2Rot qA(aA), qB(aB);\n\n\tb2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA);\n\tb2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB);\n\tb2Vec2 d = (cB - cA) + rB - rA;\n\n\tb2Vec2 ay = b2Mul(qA, m_localYAxisA);\n\n\tfloat32 sAy = b2Cross(d + rA, ay);\n\tfloat32 sBy = b2Cross(rB, ay);\n\n\tfloat32 C = b2Dot(d, ay);\n\n\tfloat32 k = m_invMassA + m_invMassB + m_invIA * m_sAy * m_sAy + m_invIB * m_sBy * m_sBy;\n\n\tfloat32 impulse;\n\tif (k != 0.0f)\n\t{\n\t\timpulse = - C / k;\n\t}\n\telse\n\t{\n\t\timpulse = 0.0f;\n\t}\n\n\tb2Vec2 P = impulse * ay;\n\tfloat32 LA = impulse * sAy;\n\tfloat32 LB = impulse * sBy;\n\n\tcA -= m_invMassA * P;\n\taA -= m_invIA * LA;\n\tcB += m_invMassB * P;\n\taB += m_invIB * LB;\n\n\tdata.positions[m_indexA].c = cA;\n\tdata.positions[m_indexA].a = aA;\n\tdata.positions[m_indexB].c = cB;\n\tdata.positions[m_indexB].a = aB;\n\n\treturn b2Abs(C) <= b2_linearSlop;\n}\n\nb2Vec2 b2WheelJoint::GetAnchorA() const\n{\n\treturn m_bodyA->GetWorldPoint(m_localAnchorA);\n}\n\nb2Vec2 b2WheelJoint::GetAnchorB() const\n{\n\treturn m_bodyB->GetWorldPoint(m_localAnchorB);\n}\n\nb2Vec2 b2WheelJoint::GetReactionForce(float32 inv_dt) const\n{\n\treturn inv_dt * (m_impulse * m_ay + m_springImpulse * m_ax);\n}\n\nfloat32 b2WheelJoint::GetReactionTorque(float32 inv_dt) const\n{\n\treturn inv_dt * m_motorImpulse;\n}\n\nfloat32 b2WheelJoint::GetJointTranslation() const\n{\n\tb2Body* bA = m_bodyA;\n\tb2Body* bB = m_bodyB;\n\n\tb2Vec2 pA = bA->GetWorldPoint(m_localAnchorA);\n\tb2Vec2 pB = bB->GetWorldPoint(m_localAnchorB);\n\tb2Vec2 d = pB - pA;\n\tb2Vec2 axis = bA->GetWorldVector(m_localXAxisA);\n\n\tfloat32 translation = b2Dot(d, axis);\n\treturn translation;\n}\n\nfloat32 b2WheelJoint::GetJointSpeed() const\n{\n\tfloat32 wA = m_bodyA->m_angularVelocity;\n\tfloat32 wB = m_bodyB->m_angularVelocity;\n\treturn wB - wA;\n}\n\nbool b2WheelJoint::IsMotorEnabled() const\n{\n\treturn m_enableMotor;\n}\n\nvoid b2WheelJoint::EnableMotor(bool flag)\n{\n\tm_bodyA->SetAwake(true);\n\tm_bodyB->SetAwake(true);\n\tm_enableMotor = flag;\n}\n\nvoid b2WheelJoint::SetMotorSpeed(float32 speed)\n{\n\tm_bodyA->SetAwake(true);\n\tm_bodyB->SetAwake(true);\n\tm_motorSpeed = speed;\n}\n\nvoid b2WheelJoint::SetMaxMotorTorque(float32 torque)\n{\n\tm_bodyA->SetAwake(true);\n\tm_bodyB->SetAwake(true);\n\tm_maxMotorTorque = torque;\n}\n\nfloat32 b2WheelJoint::GetMotorTorque(float32 inv_dt) const\n{\n\treturn inv_dt * m_motorImpulse;\n}\n\nvoid b2WheelJoint::Dump()\n{\n\tint32 indexA = m_bodyA->m_islandIndex;\n\tint32 indexB = m_bodyB->m_islandIndex;\n\n\tb2Log(\"  b2WheelJointDef jd;\\n\");\n\tb2Log(\"  jd.bodyA = bodies[%d];\\n\", indexA);\n\tb2Log(\"  jd.bodyB = bodies[%d];\\n\", indexB);\n\tb2Log(\"  jd.collideConnected = bool(%d);\\n\", m_collideConnected);\n\tb2Log(\"  jd.localAnchorA.Set(%.15lef, %.15lef);\\n\", m_localAnchorA.x, m_localAnchorA.y);\n\tb2Log(\"  jd.localAnchorB.Set(%.15lef, %.15lef);\\n\", m_localAnchorB.x, m_localAnchorB.y);\n\tb2Log(\"  jd.localAxisA.Set(%.15lef, %.15lef);\\n\", m_localXAxisA.x, m_localXAxisA.y);\n\tb2Log(\"  jd.enableMotor = bool(%d);\\n\", m_enableMotor);\n\tb2Log(\"  jd.motorSpeed = %.15lef;\\n\", m_motorSpeed);\n\tb2Log(\"  jd.maxMotorTorque = %.15lef;\\n\", m_maxMotorTorque);\n\tb2Log(\"  jd.frequencyHz = %.15lef;\\n\", m_frequencyHz);\n\tb2Log(\"  jd.dampingRatio = %.15lef;\\n\", m_dampingRatio);\n\tb2Log(\"  joints[%d] = m_world->CreateJoint(&jd);\\n\", m_index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/Joints/b2WheelJoint.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_WHEEL_JOINT_H\n#define B2_WHEEL_JOINT_H\n\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\n/// Wheel joint definition. This requires defining a line of\n/// motion using an axis and an anchor point. The definition uses local\n/// anchor points and a local axis so that the initial configuration\n/// can violate the constraint slightly. The joint translation is zero\n/// when the local anchor points coincide in world space. Using local\n/// anchors and a local axis helps when saving and loading a game.\nstruct b2WheelJointDef : public b2JointDef\n{\n\tb2WheelJointDef()\n\t{\n\t\ttype = e_wheelJoint;\n\t\tlocalAnchorA.SetZero();\n\t\tlocalAnchorB.SetZero();\n\t\tlocalAxisA.Set(1.0f, 0.0f);\n\t\tenableMotor = false;\n\t\tmaxMotorTorque = 0.0f;\n\t\tmotorSpeed = 0.0f;\n\t\tfrequencyHz = 2.0f;\n\t\tdampingRatio = 0.7f;\n\t}\n\n\t/// Initialize the bodies, anchors, axis, and reference angle using the world\n\t/// anchor and world axis.\n\tvoid Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor, const b2Vec2& axis);\n\n\t/// The local anchor point relative to bodyA's origin.\n\tb2Vec2 localAnchorA;\n\n\t/// The local anchor point relative to bodyB's origin.\n\tb2Vec2 localAnchorB;\n\n\t/// The local translation axis in bodyA.\n\tb2Vec2 localAxisA;\n\n\t/// Enable/disable the joint motor.\n\tbool enableMotor;\n\n\t/// The maximum motor torque, usually in N-m.\n\tfloat32 maxMotorTorque;\n\n\t/// The desired motor speed in radians per second.\n\tfloat32 motorSpeed;\n\n\t/// Suspension frequency, zero indicates no suspension\n\tfloat32 frequencyHz;\n\n\t/// Suspension damping ratio, one indicates critical damping\n\tfloat32 dampingRatio;\n};\n\n/// A wheel joint. This joint provides two degrees of freedom: translation\n/// along an axis fixed in bodyA and rotation in the plane. You can use a\n/// joint limit to restrict the range of motion and a joint motor to drive\n/// the rotation or to model rotational friction.\n/// This joint is designed for vehicle suspensions.\nclass b2WheelJoint : public b2Joint\n{\npublic:\n\tb2Vec2 GetAnchorA() const;\n\tb2Vec2 GetAnchorB() const;\n\n\tb2Vec2 GetReactionForce(float32 inv_dt) const;\n\tfloat32 GetReactionTorque(float32 inv_dt) const;\n\n\t/// The local anchor point relative to bodyA's origin.\n\tconst b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; }\n\n\t/// The local anchor point relative to bodyB's origin.\n\tconst b2Vec2& GetLocalAnchorB() const  { return m_localAnchorB; }\n\n\t/// The local joint axis relative to bodyA.\n\tconst b2Vec2& GetLocalAxisA() const { return m_localXAxisA; }\n\n\t/// Get the current joint translation, usually in meters.\n\tfloat32 GetJointTranslation() const;\n\n\t/// Get the current joint translation speed, usually in meters per second.\n\tfloat32 GetJointSpeed() const;\n\n\t/// Is the joint motor enabled?\n\tbool IsMotorEnabled() const;\n\n\t/// Enable/disable the joint motor.\n\tvoid EnableMotor(bool flag);\n\n\t/// Set the motor speed, usually in radians per second.\n\tvoid SetMotorSpeed(float32 speed);\n\n\t/// Get the motor speed, usually in radians per second.\n\tfloat32 GetMotorSpeed() const;\n\n\t/// Set/Get the maximum motor force, usually in N-m.\n\tvoid SetMaxMotorTorque(float32 torque);\n\tfloat32 GetMaxMotorTorque() const;\n\n\t/// Get the current motor torque given the inverse time step, usually in N-m.\n\tfloat32 GetMotorTorque(float32 inv_dt) const;\n\n\t/// Set/Get the spring frequency in hertz. Setting the frequency to zero disables the spring.\n\tvoid SetSpringFrequencyHz(float32 hz);\n\tfloat32 GetSpringFrequencyHz() const;\n\n\t/// Set/Get the spring damping ratio\n\tvoid SetSpringDampingRatio(float32 ratio);\n\tfloat32 GetSpringDampingRatio() const;\n\n\t/// Dump to b2Log\n\tvoid Dump();\n\nprotected:\n\n\tfriend class b2Joint;\n\tb2WheelJoint(const b2WheelJointDef* def);\n\n\tvoid InitVelocityConstraints(const b2SolverData& data);\n\tvoid SolveVelocityConstraints(const b2SolverData& data);\n\tbool SolvePositionConstraints(const b2SolverData& data);\n\n\tfloat32 m_frequencyHz;\n\tfloat32 m_dampingRatio;\n\n\t// Solver shared\n\tb2Vec2 m_localAnchorA;\n\tb2Vec2 m_localAnchorB;\n\tb2Vec2 m_localXAxisA;\n\tb2Vec2 m_localYAxisA;\n\n\tfloat32 m_impulse;\n\tfloat32 m_motorImpulse;\n\tfloat32 m_springImpulse;\n\n\tfloat32 m_maxMotorTorque;\n\tfloat32 m_motorSpeed;\n\tbool m_enableMotor;\n\n\t// Solver temp\n\tint32 m_indexA;\n\tint32 m_indexB;\n\tb2Vec2 m_localCenterA;\n\tb2Vec2 m_localCenterB;\n\tfloat32 m_invMassA;\n\tfloat32 m_invMassB;\n\tfloat32 m_invIA;\n\tfloat32 m_invIB;\n\n\tb2Vec2 m_ax, m_ay;\n\tfloat32 m_sAx, m_sBx;\n\tfloat32 m_sAy, m_sBy;\n\n\tfloat32 m_mass;\n\tfloat32 m_motorMass;\n\tfloat32 m_springMass;\n\n\tfloat32 m_bias;\n\tfloat32 m_gamma;\n};\n\ninline float32 b2WheelJoint::GetMotorSpeed() const\n{\n\treturn m_motorSpeed;\n}\n\ninline float32 b2WheelJoint::GetMaxMotorTorque() const\n{\n\treturn m_maxMotorTorque;\n}\n\ninline void b2WheelJoint::SetSpringFrequencyHz(float32 hz)\n{\n\tm_frequencyHz = hz;\n}\n\ninline float32 b2WheelJoint::GetSpringFrequencyHz() const\n{\n\treturn m_frequencyHz;\n}\n\ninline void b2WheelJoint::SetSpringDampingRatio(float32 ratio)\n{\n\tm_dampingRatio = ratio;\n}\n\ninline float32 b2WheelJoint::GetSpringDampingRatio() const\n{\n\treturn m_dampingRatio;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2Body.cpp",
    "content": "/*\n* Copyright (c) 2006-2007 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/b2World.h>\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n\nb2Body::b2Body(const b2BodyDef* bd, b2World* world)\n{\n\tb2Assert(bd->position.IsValid());\n\tb2Assert(bd->linearVelocity.IsValid());\n\tb2Assert(b2IsValid(bd->angle));\n\tb2Assert(b2IsValid(bd->angularVelocity));\n\tb2Assert(b2IsValid(bd->angularDamping) && bd->angularDamping >= 0.0f);\n\tb2Assert(b2IsValid(bd->linearDamping) && bd->linearDamping >= 0.0f);\n\n\tm_flags = 0;\n\n\tif (bd->bullet)\n\t{\n\t\tm_flags |= e_bulletFlag;\n\t}\n\tif (bd->fixedRotation)\n\t{\n\t\tm_flags |= e_fixedRotationFlag;\n\t}\n\tif (bd->allowSleep)\n\t{\n\t\tm_flags |= e_autoSleepFlag;\n\t}\n\tif (bd->awake)\n\t{\n\t\tm_flags |= e_awakeFlag;\n\t}\n\tif (bd->active)\n\t{\n\t\tm_flags |= e_activeFlag;\n\t}\n\n\tm_world = world;\n\n\tm_xf.p = bd->position;\n\tm_xf.q.Set(bd->angle);\n\n\tm_sweep.localCenter.SetZero();\n\tm_sweep.c0 = m_xf.p;\n\tm_sweep.c = m_xf.p;\n\tm_sweep.a0 = bd->angle;\n\tm_sweep.a = bd->angle;\n\tm_sweep.alpha0 = 0.0f;\n\n\tm_jointList = NULL;\n\tm_contactList = NULL;\n\tm_prev = NULL;\n\tm_next = NULL;\n\n\tm_linearVelocity = bd->linearVelocity;\n\tm_angularVelocity = bd->angularVelocity;\n\n\tm_linearDamping = bd->linearDamping;\n\tm_angularDamping = bd->angularDamping;\n\tm_gravityScale = bd->gravityScale;\n\n\tm_force.SetZero();\n\tm_torque = 0.0f;\n\n\tm_sleepTime = 0.0f;\n\n\tm_type = bd->type;\n\n\tif (m_type == b2_dynamicBody)\n\t{\n\t\tm_mass = 1.0f;\n\t\tm_invMass = 1.0f;\n\t}\n\telse\n\t{\n\t\tm_mass = 0.0f;\n\t\tm_invMass = 0.0f;\n\t}\n\n\tm_I = 0.0f;\n\tm_invI = 0.0f;\n\n\tm_userData = bd->userData;\n\n\tm_fixtureList = NULL;\n\tm_fixtureCount = 0;\n}\n\nb2Body::~b2Body()\n{\n\t// shapes and joints are destroyed in b2World::Destroy\n}\n\nvoid b2Body::SetType(b2BodyType type)\n{\n\tb2Assert(m_world->IsLocked() == false);\n\tif (m_world->IsLocked() == true)\n\t{\n\t\treturn;\n\t}\n\n\tif (m_type == type)\n\t{\n\t\treturn;\n\t}\n\n\tm_type = type;\n\n\tResetMassData();\n\n\tif (m_type == b2_staticBody)\n\t{\n\t\tm_linearVelocity.SetZero();\n\t\tm_angularVelocity = 0.0f;\n\t\tm_sweep.a0 = m_sweep.a;\n\t\tm_sweep.c0 = m_sweep.c;\n\t\tSynchronizeFixtures();\n\t}\n\n\tSetAwake(true);\n\n\tm_force.SetZero();\n\tm_torque = 0.0f;\n\n\t// Delete the attached contacts.\n\tb2ContactEdge* ce = m_contactList;\n\twhile (ce)\n\t{\n\t\tb2ContactEdge* ce0 = ce;\n\t\tce = ce->next;\n\t\tm_world->m_contactManager.Destroy(ce0->contact);\n\t}\n\tm_contactList = NULL;\n\n\t// Touch the proxies so that new contacts will be created (when appropriate)\n\tb2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase;\n\tfor (b2Fixture* f = m_fixtureList; f; f = f->m_next)\n\t{\n\t\tint32 proxyCount = f->m_proxyCount;\n\t\tfor (int32 i = 0; i < proxyCount; ++i)\n\t\t{\n\t\t\tbroadPhase->TouchProxy(f->m_proxies[i].proxyId);\n\t\t}\n\t}\n}\n\nb2Fixture* b2Body::CreateFixture(const b2FixtureDef* def)\n{\n\tb2Assert(m_world->IsLocked() == false);\n\tif (m_world->IsLocked() == true)\n\t{\n\t\treturn NULL;\n\t}\n\n\tb2BlockAllocator* allocator = &m_world->m_blockAllocator;\n\n\tvoid* memory = allocator->Allocate(sizeof(b2Fixture));\n\tb2Fixture* fixture = new (memory) b2Fixture;\n\tfixture->Create(allocator, this, def);\n\n\tif (m_flags & e_activeFlag)\n\t{\n\t\tb2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase;\n\t\tfixture->CreateProxies(broadPhase, m_xf);\n\t}\n\n\tfixture->m_next = m_fixtureList;\n\tm_fixtureList = fixture;\n\t++m_fixtureCount;\n\n\tfixture->m_body = this;\n\n\t// Adjust mass properties if needed.\n\tif (fixture->m_density > 0.0f)\n\t{\n\t\tResetMassData();\n\t}\n\n\t// Let the world know we have a new fixture. This will cause new contacts\n\t// to be created at the beginning of the next time step.\n\tm_world->m_flags |= b2World::e_newFixture;\n\n\treturn fixture;\n}\n\nb2Fixture* b2Body::CreateFixture(const b2Shape* shape, float32 density)\n{\n\tb2FixtureDef def;\n\tdef.shape = shape;\n\tdef.density = density;\n\n\treturn CreateFixture(&def);\n}\n\nvoid b2Body::DestroyFixture(b2Fixture* fixture)\n{\n\tb2Assert(m_world->IsLocked() == false);\n\tif (m_world->IsLocked() == true)\n\t{\n\t\treturn;\n\t}\n\n\tb2Assert(fixture->m_body == this);\n\n\t// Remove the fixture from this body's singly linked list.\n\tb2Assert(m_fixtureCount > 0);\n\tb2Fixture** node = &m_fixtureList;\n\tbool found = false;\n\twhile (*node != NULL)\n\t{\n\t\tif (*node == fixture)\n\t\t{\n\t\t\t*node = fixture->m_next;\n\t\t\tfound = true;\n\t\t\tbreak;\n\t\t}\n\n\t\tnode = &(*node)->m_next;\n\t}\n\n\t// You tried to remove a shape that is not attached to this body.\n\tb2Assert(found);\n\n\t// Destroy any contacts associated with the fixture.\n\tb2ContactEdge* edge = m_contactList;\n\twhile (edge)\n\t{\n\t\tb2Contact* c = edge->contact;\n\t\tedge = edge->next;\n\n\t\tb2Fixture* fixtureA = c->GetFixtureA();\n\t\tb2Fixture* fixtureB = c->GetFixtureB();\n\n\t\tif (fixture == fixtureA || fixture == fixtureB)\n\t\t{\n\t\t\t// This destroys the contact and removes it from\n\t\t\t// this body's contact list.\n\t\t\tm_world->m_contactManager.Destroy(c);\n\t\t}\n\t}\n\n\tb2BlockAllocator* allocator = &m_world->m_blockAllocator;\n\n\tif (m_flags & e_activeFlag)\n\t{\n\t\tb2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase;\n\t\tfixture->DestroyProxies(broadPhase);\n\t}\n\n\tfixture->Destroy(allocator);\n\tfixture->m_body = NULL;\n\tfixture->m_next = NULL;\n\tfixture->~b2Fixture();\n\tallocator->Free(fixture, sizeof(b2Fixture));\n\n\t--m_fixtureCount;\n\n\t// Reset the mass data.\n\tResetMassData();\n}\n\nvoid b2Body::ResetMassData()\n{\n\t// Compute mass data from shapes. Each shape has its own density.\n\tm_mass = 0.0f;\n\tm_invMass = 0.0f;\n\tm_I = 0.0f;\n\tm_invI = 0.0f;\n\tm_sweep.localCenter.SetZero();\n\n\t// Static and kinematic bodies have zero mass.\n\tif (m_type == b2_staticBody || m_type == b2_kinematicBody)\n\t{\n\t\tm_sweep.c0 = m_xf.p;\n\t\tm_sweep.c = m_xf.p;\n\t\tm_sweep.a0 = m_sweep.a;\n\t\treturn;\n\t}\n\n\tb2Assert(m_type == b2_dynamicBody);\n\n\t// Accumulate mass over all fixtures.\n\tb2Vec2 localCenter = b2Vec2_zero;\n\tfor (b2Fixture* f = m_fixtureList; f; f = f->m_next)\n\t{\n\t\tif (f->m_density == 0.0f)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tb2MassData massData;\n\t\tf->GetMassData(&massData);\n\t\tm_mass += massData.mass;\n\t\tlocalCenter += massData.mass * massData.center;\n\t\tm_I += massData.I;\n\t}\n\n\t// Compute center of mass.\n\tif (m_mass > 0.0f)\n\t{\n\t\tm_invMass = 1.0f / m_mass;\n\t\tlocalCenter *= m_invMass;\n\t}\n\telse\n\t{\n\t\t// Force all dynamic bodies to have a positive mass.\n\t\tm_mass = 1.0f;\n\t\tm_invMass = 1.0f;\n\t}\n\n\tif (m_I > 0.0f && (m_flags & e_fixedRotationFlag) == 0)\n\t{\n\t\t// Center the inertia about the center of mass.\n\t\tm_I -= m_mass * b2Dot(localCenter, localCenter);\n\t\tb2Assert(m_I > 0.0f);\n\t\tm_invI = 1.0f / m_I;\n\n\t}\n\telse\n\t{\n\t\tm_I = 0.0f;\n\t\tm_invI = 0.0f;\n\t}\n\n\t// Move center of mass.\n\tb2Vec2 oldCenter = m_sweep.c;\n\tm_sweep.localCenter = localCenter;\n\tm_sweep.c0 = m_sweep.c = b2Mul(m_xf, m_sweep.localCenter);\n\n\t// Update center of mass velocity.\n\tm_linearVelocity += b2Cross(m_angularVelocity, m_sweep.c - oldCenter);\n}\n\nvoid b2Body::SetMassData(const b2MassData* massData)\n{\n\tb2Assert(m_world->IsLocked() == false);\n\tif (m_world->IsLocked() == true)\n\t{\n\t\treturn;\n\t}\n\n\tif (m_type != b2_dynamicBody)\n\t{\n\t\treturn;\n\t}\n\n\tm_invMass = 0.0f;\n\tm_I = 0.0f;\n\tm_invI = 0.0f;\n\n\tm_mass = massData->mass;\n\tif (m_mass <= 0.0f)\n\t{\n\t\tm_mass = 1.0f;\n\t}\n\n\tm_invMass = 1.0f / m_mass;\n\n\tif (massData->I > 0.0f && (m_flags & b2Body::e_fixedRotationFlag) == 0)\n\t{\n\t\tm_I = massData->I - m_mass * b2Dot(massData->center, massData->center);\n\t\tb2Assert(m_I > 0.0f);\n\t\tm_invI = 1.0f / m_I;\n\t}\n\n\t// Move center of mass.\n\tb2Vec2 oldCenter = m_sweep.c;\n\tm_sweep.localCenter =  massData->center;\n\tm_sweep.c0 = m_sweep.c = b2Mul(m_xf, m_sweep.localCenter);\n\n\t// Update center of mass velocity.\n\tm_linearVelocity += b2Cross(m_angularVelocity, m_sweep.c - oldCenter);\n}\n\nbool b2Body::ShouldCollide(const b2Body* other) const\n{\n\t// At least one body should be dynamic.\n\tif (m_type != b2_dynamicBody && other->m_type != b2_dynamicBody)\n\t{\n\t\treturn false;\n\t}\n\n\t// Does a joint prevent collision?\n\tfor (b2JointEdge* jn = m_jointList; jn; jn = jn->next)\n\t{\n\t\tif (jn->other == other)\n\t\t{\n\t\t\tif (jn->joint->m_collideConnected == false)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n}\n\nvoid b2Body::SetTransform(const b2Vec2& position, float32 angle)\n{\n\tb2Assert(m_world->IsLocked() == false);\n\tif (m_world->IsLocked() == true)\n\t{\n\t\treturn;\n\t}\n\n\tm_xf.q.Set(angle);\n\tm_xf.p = position;\n\n\tm_sweep.c = b2Mul(m_xf, m_sweep.localCenter);\n\tm_sweep.a = angle;\n\n\tm_sweep.c0 = m_sweep.c;\n\tm_sweep.a0 = angle;\n\n\tb2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase;\n\tfor (b2Fixture* f = m_fixtureList; f; f = f->m_next)\n\t{\n\t\tf->Synchronize(broadPhase, m_xf, m_xf);\n\t}\n}\n\nvoid b2Body::SynchronizeFixtures()\n{\n\tb2Transform xf1;\n\txf1.q.Set(m_sweep.a0);\n\txf1.p = m_sweep.c0 - b2Mul(xf1.q, m_sweep.localCenter);\n\n\tb2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase;\n\tfor (b2Fixture* f = m_fixtureList; f; f = f->m_next)\n\t{\n\t\tf->Synchronize(broadPhase, xf1, m_xf);\n\t}\n}\n\nvoid b2Body::SetActive(bool flag)\n{\n\tb2Assert(m_world->IsLocked() == false);\n\n\tif (flag == IsActive())\n\t{\n\t\treturn;\n\t}\n\n\tif (flag)\n\t{\n\t\tm_flags |= e_activeFlag;\n\n\t\t// Create all proxies.\n\t\tb2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase;\n\t\tfor (b2Fixture* f = m_fixtureList; f; f = f->m_next)\n\t\t{\n\t\t\tf->CreateProxies(broadPhase, m_xf);\n\t\t}\n\n\t\t// Contacts are created the next time step.\n\t}\n\telse\n\t{\n\t\tm_flags &= ~e_activeFlag;\n\n\t\t// Destroy all proxies.\n\t\tb2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase;\n\t\tfor (b2Fixture* f = m_fixtureList; f; f = f->m_next)\n\t\t{\n\t\t\tf->DestroyProxies(broadPhase);\n\t\t}\n\n\t\t// Destroy the attached contacts.\n\t\tb2ContactEdge* ce = m_contactList;\n\t\twhile (ce)\n\t\t{\n\t\t\tb2ContactEdge* ce0 = ce;\n\t\t\tce = ce->next;\n\t\t\tm_world->m_contactManager.Destroy(ce0->contact);\n\t\t}\n\t\tm_contactList = NULL;\n\t}\n}\n\nvoid b2Body::SetFixedRotation(bool flag)\n{\n\tbool status = (m_flags & e_fixedRotationFlag) == e_fixedRotationFlag;\n\tif (status == flag)\n\t{\n\t\treturn;\n\t}\n\n\tif (flag)\n\t{\n\t\tm_flags |= e_fixedRotationFlag;\n\t}\n\telse\n\t{\n\t\tm_flags &= ~e_fixedRotationFlag;\n\t}\n\n\tm_angularVelocity = 0.0f;\n\n\tResetMassData();\n}\n\nvoid b2Body::Dump()\n{\n\tint32 bodyIndex = m_islandIndex;\n\n\tb2Log(\"{\\n\");\n\tb2Log(\"  b2BodyDef bd;\\n\");\n\tb2Log(\"  bd.type = b2BodyType(%d);\\n\", m_type);\n\tb2Log(\"  bd.position.Set(%.15lef, %.15lef);\\n\", m_xf.p.x, m_xf.p.y);\n\tb2Log(\"  bd.angle = %.15lef;\\n\", m_sweep.a);\n\tb2Log(\"  bd.linearVelocity.Set(%.15lef, %.15lef);\\n\", m_linearVelocity.x, m_linearVelocity.y);\n\tb2Log(\"  bd.angularVelocity = %.15lef;\\n\", m_angularVelocity);\n\tb2Log(\"  bd.linearDamping = %.15lef;\\n\", m_linearDamping);\n\tb2Log(\"  bd.angularDamping = %.15lef;\\n\", m_angularDamping);\n\tb2Log(\"  bd.allowSleep = bool(%d);\\n\", m_flags & e_autoSleepFlag);\n\tb2Log(\"  bd.awake = bool(%d);\\n\", m_flags & e_awakeFlag);\n\tb2Log(\"  bd.fixedRotation = bool(%d);\\n\", m_flags & e_fixedRotationFlag);\n\tb2Log(\"  bd.bullet = bool(%d);\\n\", m_flags & e_bulletFlag);\n\tb2Log(\"  bd.active = bool(%d);\\n\", m_flags & e_activeFlag);\n\tb2Log(\"  bd.gravityScale = %.15lef;\\n\", m_gravityScale);\n\tb2Log(\"  bodies[%d] = m_world->CreateBody(&bd);\\n\", m_islandIndex);\n\tb2Log(\"\\n\");\n\tfor (b2Fixture* f = m_fixtureList; f; f = f->m_next)\n\t{\n\t\tb2Log(\"  {\\n\");\n\t\tf->Dump(bodyIndex);\n\t\tb2Log(\"  }\\n\");\n\t}\n\tb2Log(\"}\\n\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2Body.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_BODY_H\n#define B2_BODY_H\n\n#include <Box2D/Common/b2Math.h>\n#include <Box2D/Collision/Shapes/b2Shape.h>\n#include <memory>\n\nclass b2Fixture;\nclass b2Joint;\nclass b2Contact;\nclass b2Controller;\nclass b2World;\nstruct b2FixtureDef;\nstruct b2JointEdge;\nstruct b2ContactEdge;\n\n/// The body type.\n/// static: zero mass, zero velocity, may be manually moved\n/// kinematic: zero mass, non-zero velocity set by user, moved by solver\n/// dynamic: positive mass, non-zero velocity determined by forces, moved by solver\nenum b2BodyType\n{\n\tb2_staticBody = 0,\n\tb2_kinematicBody,\n\tb2_dynamicBody\n\n\t// TODO_ERIN\n\t//b2_bulletBody,\n};\n\n/// A body definition holds all the data needed to construct a rigid body.\n/// You can safely re-use body definitions. Shapes are added to a body after construction.\nstruct b2BodyDef\n{\n\t/// This constructor sets the body definition default values.\n\tb2BodyDef()\n\t{\n\t\tuserData = NULL;\n\t\tposition.Set(0.0f, 0.0f);\n\t\tangle = 0.0f;\n\t\tlinearVelocity.Set(0.0f, 0.0f);\n\t\tangularVelocity = 0.0f;\n\t\tlinearDamping = 0.0f;\n\t\tangularDamping = 0.0f;\n\t\tallowSleep = true;\n\t\tawake = true;\n\t\tfixedRotation = false;\n\t\tbullet = false;\n\t\ttype = b2_staticBody;\n\t\tactive = true;\n\t\tgravityScale = 1.0f;\n\t}\n\n\t/// The body type: static, kinematic, or dynamic.\n\t/// Note: if a dynamic body would have zero mass, the mass is set to one.\n\tb2BodyType type;\n\n\t/// The world position of the body. Avoid creating bodies at the origin\n\t/// since this can lead to many overlapping shapes.\n\tb2Vec2 position;\n\n\t/// The world angle of the body in radians.\n\tfloat32 angle;\n\n\t/// The linear velocity of the body's origin in world co-ordinates.\n\tb2Vec2 linearVelocity;\n\n\t/// The angular velocity of the body.\n\tfloat32 angularVelocity;\n\n\t/// Linear damping is use to reduce the linear velocity. The damping parameter\n\t/// can be larger than 1.0f but the damping effect becomes sensitive to the\n\t/// time step when the damping parameter is large.\n\tfloat32 linearDamping;\n\n\t/// Angular damping is use to reduce the angular velocity. The damping parameter\n\t/// can be larger than 1.0f but the damping effect becomes sensitive to the\n\t/// time step when the damping parameter is large.\n\tfloat32 angularDamping;\n\n\t/// Set this flag to false if this body should never fall asleep. Note that\n\t/// this increases CPU usage.\n\tbool allowSleep;\n\n\t/// Is this body initially awake or sleeping?\n\tbool awake;\n\n\t/// Should this body be prevented from rotating? Useful for characters.\n\tbool fixedRotation;\n\n\t/// Is this a fast moving body that should be prevented from tunneling through\n\t/// other moving bodies? Note that all bodies are prevented from tunneling through\n\t/// kinematic and static bodies. This setting is only considered on dynamic bodies.\n\t/// @warning You should use this flag sparingly since it increases processing time.\n\tbool bullet;\n\n\t/// Does this body start out active?\n\tbool active;\n\n\t/// Use this to store application specific body data.\n\tvoid* userData;\n\n\t/// Scale the gravity applied to this body.\n\tfloat32 gravityScale;\n};\n\n/// A rigid body. These are created via b2World::CreateBody.\nclass b2Body\n{\npublic:\n\t/// Creates a fixture and attach it to this body. Use this function if you need\n\t/// to set some fixture parameters, like friction. Otherwise you can create the\n\t/// fixture directly from a shape.\n\t/// If the density is non-zero, this function automatically updates the mass of the body.\n\t/// Contacts are not created until the next time step.\n\t/// @param def the fixture definition.\n\t/// @warning This function is locked during callbacks.\n\tb2Fixture* CreateFixture(const b2FixtureDef* def);\n\n\t/// Creates a fixture from a shape and attach it to this body.\n\t/// This is a convenience function. Use b2FixtureDef if you need to set parameters\n\t/// like friction, restitution, user data, or filtering.\n\t/// If the density is non-zero, this function automatically updates the mass of the body.\n\t/// @param shape the shape to be cloned.\n\t/// @param density the shape density (set to zero for static bodies).\n\t/// @warning This function is locked during callbacks.\n\tb2Fixture* CreateFixture(const b2Shape* shape, float32 density);\n\n\t/// Destroy a fixture. This removes the fixture from the broad-phase and\n\t/// destroys all contacts associated with this fixture. This will\n\t/// automatically adjust the mass of the body if the body is dynamic and the\n\t/// fixture has positive density.\n\t/// All fixtures attached to a body are implicitly destroyed when the body is destroyed.\n\t/// @param fixture the fixture to be removed.\n\t/// @warning This function is locked during callbacks.\n\tvoid DestroyFixture(b2Fixture* fixture);\n\n\t/// Set the position of the body's origin and rotation.\n\t/// Manipulating a body's transform may cause non-physical behavior.\n\t/// Note: contacts are updated on the next call to b2World::Step.\n\t/// @param position the world position of the body's local origin.\n\t/// @param angle the world rotation in radians.\n\tvoid SetTransform(const b2Vec2& position, float32 angle);\n\n\t/// Get the body transform for the body's origin.\n\t/// @return the world transform of the body's origin.\n\tconst b2Transform& GetTransform() const;\n\n\t/// Get the world body origin position.\n\t/// @return the world position of the body's origin.\n\tconst b2Vec2& GetPosition() const;\n\n\t/// Get the angle in radians.\n\t/// @return the current world rotation angle in radians.\n\tfloat32 GetAngle() const;\n\n\t/// Get the world position of the center of mass.\n\tconst b2Vec2& GetWorldCenter() const;\n\n\t/// Get the local position of the center of mass.\n\tconst b2Vec2& GetLocalCenter() const;\n\n\t/// Set the linear velocity of the center of mass.\n\t/// @param v the new linear velocity of the center of mass.\n\tvoid SetLinearVelocity(const b2Vec2& v);\n\n\t/// Get the linear velocity of the center of mass.\n\t/// @return the linear velocity of the center of mass.\n\tconst b2Vec2& GetLinearVelocity() const;\n\n\t/// Set the angular velocity.\n\t/// @param omega the new angular velocity in radians/second.\n\tvoid SetAngularVelocity(float32 omega);\n\n\t/// Get the angular velocity.\n\t/// @return the angular velocity in radians/second.\n\tfloat32 GetAngularVelocity() const;\n\n\t/// Apply a force at a world point. If the force is not\n\t/// applied at the center of mass, it will generate a torque and\n\t/// affect the angular velocity. This wakes up the body.\n\t/// @param force the world force vector, usually in Newtons (N).\n\t/// @param point the world position of the point of application.\n\t/// @param wake also wake up the body\n\tvoid ApplyForce(const b2Vec2& force, const b2Vec2& point, bool wake);\n\n\t/// Apply a force to the center of mass. This wakes up the body.\n\t/// @param force the world force vector, usually in Newtons (N).\n\t/// @param wake also wake up the body\n\tvoid ApplyForceToCenter(const b2Vec2& force, bool wake);\n\n\t/// Apply a torque. This affects the angular velocity\n\t/// without affecting the linear velocity of the center of mass.\n\t/// This wakes up the body.\n\t/// @param torque about the z-axis (out of the screen), usually in N-m.\n\t/// @param wake also wake up the body\n\tvoid ApplyTorque(float32 torque, bool wake);\n\n\t/// Apply an impulse at a point. This immediately modifies the velocity.\n\t/// It also modifies the angular velocity if the point of application\n\t/// is not at the center of mass. This wakes up the body.\n\t/// @param impulse the world impulse vector, usually in N-seconds or kg-m/s.\n\t/// @param point the world position of the point of application.\n\t/// @param wake also wake up the body\n\tvoid ApplyLinearImpulse(const b2Vec2& impulse, const b2Vec2& point, bool wake);\n\n\t/// Apply an angular impulse.\n\t/// @param impulse the angular impulse in units of kg*m*m/s\n\t/// @param wake also wake up the body\n\tvoid ApplyAngularImpulse(float32 impulse, bool wake);\n\n\t/// Get the total mass of the body.\n\t/// @return the mass, usually in kilograms (kg).\n\tfloat32 GetMass() const;\n\n\t/// Get the rotational inertia of the body about the local origin.\n\t/// @return the rotational inertia, usually in kg-m^2.\n\tfloat32 GetInertia() const;\n\n\t/// Get the mass data of the body.\n\t/// @return a struct containing the mass, inertia and center of the body.\n\tvoid GetMassData(b2MassData* data) const;\n\n\t/// Set the mass properties to override the mass properties of the fixtures.\n\t/// Note that this changes the center of mass position.\n\t/// Note that creating or destroying fixtures can also alter the mass.\n\t/// This function has no effect if the body isn't dynamic.\n\t/// @param massData the mass properties.\n\tvoid SetMassData(const b2MassData* data);\n\n\t/// This resets the mass properties to the sum of the mass properties of the fixtures.\n\t/// This normally does not need to be called unless you called SetMassData to override\n\t/// the mass and you later want to reset the mass.\n\tvoid ResetMassData();\n\n\t/// Get the world coordinates of a point given the local coordinates.\n\t/// @param localPoint a point on the body measured relative the the body's origin.\n\t/// @return the same point expressed in world coordinates.\n\tb2Vec2 GetWorldPoint(const b2Vec2& localPoint) const;\n\n\t/// Get the world coordinates of a vector given the local coordinates.\n\t/// @param localVector a vector fixed in the body.\n\t/// @return the same vector expressed in world coordinates.\n\tb2Vec2 GetWorldVector(const b2Vec2& localVector) const;\n\n\t/// Gets a local point relative to the body's origin given a world point.\n\t/// @param a point in world coordinates.\n\t/// @return the corresponding local point relative to the body's origin.\n\tb2Vec2 GetLocalPoint(const b2Vec2& worldPoint) const;\n\n\t/// Gets a local vector given a world vector.\n\t/// @param a vector in world coordinates.\n\t/// @return the corresponding local vector.\n\tb2Vec2 GetLocalVector(const b2Vec2& worldVector) const;\n\n\t/// Get the world linear velocity of a world point attached to this body.\n\t/// @param a point in world coordinates.\n\t/// @return the world velocity of a point.\n\tb2Vec2 GetLinearVelocityFromWorldPoint(const b2Vec2& worldPoint) const;\n\n\t/// Get the world velocity of a local point.\n\t/// @param a point in local coordinates.\n\t/// @return the world velocity of a point.\n\tb2Vec2 GetLinearVelocityFromLocalPoint(const b2Vec2& localPoint) const;\n\n\t/// Get the linear damping of the body.\n\tfloat32 GetLinearDamping() const;\n\n\t/// Set the linear damping of the body.\n\tvoid SetLinearDamping(float32 linearDamping);\n\n\t/// Get the angular damping of the body.\n\tfloat32 GetAngularDamping() const;\n\n\t/// Set the angular damping of the body.\n\tvoid SetAngularDamping(float32 angularDamping);\n\n\t/// Get the gravity scale of the body.\n\tfloat32 GetGravityScale() const;\n\n\t/// Set the gravity scale of the body.\n\tvoid SetGravityScale(float32 scale);\n\n\t/// Set the type of this body. This may alter the mass and velocity.\n\tvoid SetType(b2BodyType type);\n\n\t/// Get the type of this body.\n\tb2BodyType GetType() const;\n\n\t/// Should this body be treated like a bullet for continuous collision detection?\n\tvoid SetBullet(bool flag);\n\n\t/// Is this body treated like a bullet for continuous collision detection?\n\tbool IsBullet() const;\n\n\t/// You can disable sleeping on this body. If you disable sleeping, the\n\t/// body will be woken.\n\tvoid SetSleepingAllowed(bool flag);\n\n\t/// Is this body allowed to sleep\n\tbool IsSleepingAllowed() const;\n\n\t/// Set the sleep state of the body. A sleeping body has very\n\t/// low CPU cost.\n\t/// @param flag set to true to wake the body, false to put it to sleep.\n\tvoid SetAwake(bool flag);\n\n\t/// Get the sleeping state of this body.\n\t/// @return true if the body is awake.\n\tbool IsAwake() const;\n\n\t/// Set the active state of the body. An inactive body is not\n\t/// simulated and cannot be collided with or woken up.\n\t/// If you pass a flag of true, all fixtures will be added to the\n\t/// broad-phase.\n\t/// If you pass a flag of false, all fixtures will be removed from\n\t/// the broad-phase and all contacts will be destroyed.\n\t/// Fixtures and joints are otherwise unaffected. You may continue\n\t/// to create/destroy fixtures and joints on inactive bodies.\n\t/// Fixtures on an inactive body are implicitly inactive and will\n\t/// not participate in collisions, ray-casts, or queries.\n\t/// Joints connected to an inactive body are implicitly inactive.\n\t/// An inactive body is still owned by a b2World object and remains\n\t/// in the body list.\n\tvoid SetActive(bool flag);\n\n\t/// Get the active state of the body.\n\tbool IsActive() const;\n\n\t/// Set this body to have fixed rotation. This causes the mass\n\t/// to be reset.\n\tvoid SetFixedRotation(bool flag);\n\n\t/// Does this body have fixed rotation?\n\tbool IsFixedRotation() const;\n\n\t/// Get the list of all fixtures attached to this body.\n\tb2Fixture* GetFixtureList();\n\tconst b2Fixture* GetFixtureList() const;\n\n\t/// Get the list of all joints attached to this body.\n\tb2JointEdge* GetJointList();\n\tconst b2JointEdge* GetJointList() const;\n\n\t/// Get the list of all contacts attached to this body.\n\t/// @warning this list changes during the time step and you may\n\t/// miss some collisions if you don't use b2ContactListener.\n\tb2ContactEdge* GetContactList();\n\tconst b2ContactEdge* GetContactList() const;\n\n\t/// Get the next body in the world's body list.\n\tb2Body* GetNext();\n\tconst b2Body* GetNext() const;\n\n\t/// Get the user data pointer that was provided in the body definition.\n\tvoid* GetUserData() const;\n\n\t/// Set the user data. Use this to store your application specific data.\n\tvoid SetUserData(void* data);\n\n\t/// Get the parent world of this body.\n\tb2World* GetWorld();\n\tconst b2World* GetWorld() const;\n\n\t/// Dump this body to a log file\n\tvoid Dump();\n\nprivate:\n\n\tfriend class b2World;\n\tfriend class b2Island;\n\tfriend class b2ContactManager;\n\tfriend class b2ContactSolver;\n\tfriend class b2Contact;\n\t\n\tfriend class b2DistanceJoint;\n\tfriend class b2FrictionJoint;\n\tfriend class b2GearJoint;\n\tfriend class b2MotorJoint;\n\tfriend class b2MouseJoint;\n\tfriend class b2PrismaticJoint;\n\tfriend class b2PulleyJoint;\n\tfriend class b2RevoluteJoint;\n\tfriend class b2RopeJoint;\n\tfriend class b2WeldJoint;\n\tfriend class b2WheelJoint;\n\n\t// m_flags\n\tenum\n\t{\n\t\te_islandFlag\t\t= 0x0001,\n\t\te_awakeFlag\t\t\t= 0x0002,\n\t\te_autoSleepFlag\t\t= 0x0004,\n\t\te_bulletFlag\t\t= 0x0008,\n\t\te_fixedRotationFlag\t= 0x0010,\n\t\te_activeFlag\t\t= 0x0020,\n\t\te_toiFlag\t\t\t= 0x0040\n\t};\n\n\tb2Body(const b2BodyDef* bd, b2World* world);\n\t~b2Body();\n\n\tvoid SynchronizeFixtures();\n\tvoid SynchronizeTransform();\n\n\t// This is used to prevent connected bodies from colliding.\n\t// It may lie, depending on the collideConnected flag.\n\tbool ShouldCollide(const b2Body* other) const;\n\n\tvoid Advance(float32 t);\n\n\tb2BodyType m_type;\n\n\tuint16 m_flags;\n\n\tint32 m_islandIndex;\n\n\tb2Transform m_xf;\t\t// the body origin transform\n\tb2Sweep m_sweep;\t\t// the swept motion for CCD\n\n\tb2Vec2 m_linearVelocity;\n\tfloat32 m_angularVelocity;\n\n\tb2Vec2 m_force;\n\tfloat32 m_torque;\n\n\tb2World* m_world;\n\tb2Body* m_prev;\n\tb2Body* m_next;\n\n\tb2Fixture* m_fixtureList;\n\tint32 m_fixtureCount;\n\n\tb2JointEdge* m_jointList;\n\tb2ContactEdge* m_contactList;\n\n\tfloat32 m_mass, m_invMass;\n\n\t// Rotational inertia about the center of mass.\n\tfloat32 m_I, m_invI;\n\n\tfloat32 m_linearDamping;\n\tfloat32 m_angularDamping;\n\tfloat32 m_gravityScale;\n\n\tfloat32 m_sleepTime;\n\n\tvoid* m_userData;\n};\n\ninline b2BodyType b2Body::GetType() const\n{\n\treturn m_type;\n}\n\ninline const b2Transform& b2Body::GetTransform() const\n{\n\treturn m_xf;\n}\n\ninline const b2Vec2& b2Body::GetPosition() const\n{\n\treturn m_xf.p;\n}\n\ninline float32 b2Body::GetAngle() const\n{\n\treturn m_sweep.a;\n}\n\ninline const b2Vec2& b2Body::GetWorldCenter() const\n{\n\treturn m_sweep.c;\n}\n\ninline const b2Vec2& b2Body::GetLocalCenter() const\n{\n\treturn m_sweep.localCenter;\n}\n\ninline void b2Body::SetLinearVelocity(const b2Vec2& v)\n{\n\tif (m_type == b2_staticBody)\n\t{\n\t\treturn;\n\t}\n\n\tif (b2Dot(v,v) > 0.0f)\n\t{\n\t\tSetAwake(true);\n\t}\n\n\tm_linearVelocity = v;\n}\n\ninline const b2Vec2& b2Body::GetLinearVelocity() const\n{\n\treturn m_linearVelocity;\n}\n\ninline void b2Body::SetAngularVelocity(float32 w)\n{\n\tif (m_type == b2_staticBody)\n\t{\n\t\treturn;\n\t}\n\n\tif (w * w > 0.0f)\n\t{\n\t\tSetAwake(true);\n\t}\n\n\tm_angularVelocity = w;\n}\n\ninline float32 b2Body::GetAngularVelocity() const\n{\n\treturn m_angularVelocity;\n}\n\ninline float32 b2Body::GetMass() const\n{\n\treturn m_mass;\n}\n\ninline float32 b2Body::GetInertia() const\n{\n\treturn m_I + m_mass * b2Dot(m_sweep.localCenter, m_sweep.localCenter);\n}\n\ninline void b2Body::GetMassData(b2MassData* data) const\n{\n\tdata->mass = m_mass;\n\tdata->I = m_I + m_mass * b2Dot(m_sweep.localCenter, m_sweep.localCenter);\n\tdata->center = m_sweep.localCenter;\n}\n\ninline b2Vec2 b2Body::GetWorldPoint(const b2Vec2& localPoint) const\n{\n\treturn b2Mul(m_xf, localPoint);\n}\n\ninline b2Vec2 b2Body::GetWorldVector(const b2Vec2& localVector) const\n{\n\treturn b2Mul(m_xf.q, localVector);\n}\n\ninline b2Vec2 b2Body::GetLocalPoint(const b2Vec2& worldPoint) const\n{\n\treturn b2MulT(m_xf, worldPoint);\n}\n\ninline b2Vec2 b2Body::GetLocalVector(const b2Vec2& worldVector) const\n{\n\treturn b2MulT(m_xf.q, worldVector);\n}\n\ninline b2Vec2 b2Body::GetLinearVelocityFromWorldPoint(const b2Vec2& worldPoint) const\n{\n\treturn m_linearVelocity + b2Cross(m_angularVelocity, worldPoint - m_sweep.c);\n}\n\ninline b2Vec2 b2Body::GetLinearVelocityFromLocalPoint(const b2Vec2& localPoint) const\n{\n\treturn GetLinearVelocityFromWorldPoint(GetWorldPoint(localPoint));\n}\n\ninline float32 b2Body::GetLinearDamping() const\n{\n\treturn m_linearDamping;\n}\n\ninline void b2Body::SetLinearDamping(float32 linearDamping)\n{\n\tm_linearDamping = linearDamping;\n}\n\ninline float32 b2Body::GetAngularDamping() const\n{\n\treturn m_angularDamping;\n}\n\ninline void b2Body::SetAngularDamping(float32 angularDamping)\n{\n\tm_angularDamping = angularDamping;\n}\n\ninline float32 b2Body::GetGravityScale() const\n{\n\treturn m_gravityScale;\n}\n\ninline void b2Body::SetGravityScale(float32 scale)\n{\n\tm_gravityScale = scale;\n}\n\ninline void b2Body::SetBullet(bool flag)\n{\n\tif (flag)\n\t{\n\t\tm_flags |= e_bulletFlag;\n\t}\n\telse\n\t{\n\t\tm_flags &= ~e_bulletFlag;\n\t}\n}\n\ninline bool b2Body::IsBullet() const\n{\n\treturn (m_flags & e_bulletFlag) == e_bulletFlag;\n}\n\ninline void b2Body::SetAwake(bool flag)\n{\n\tif (flag)\n\t{\n\t\tif ((m_flags & e_awakeFlag) == 0)\n\t\t{\n\t\t\tm_flags |= e_awakeFlag;\n\t\t\tm_sleepTime = 0.0f;\n\t\t}\n\t}\n\telse\n\t{\n\t\tm_flags &= ~e_awakeFlag;\n\t\tm_sleepTime = 0.0f;\n\t\tm_linearVelocity.SetZero();\n\t\tm_angularVelocity = 0.0f;\n\t\tm_force.SetZero();\n\t\tm_torque = 0.0f;\n\t}\n}\n\ninline bool b2Body::IsAwake() const\n{\n\treturn (m_flags & e_awakeFlag) == e_awakeFlag;\n}\n\ninline bool b2Body::IsActive() const\n{\n\treturn (m_flags & e_activeFlag) == e_activeFlag;\n}\n\ninline bool b2Body::IsFixedRotation() const\n{\n\treturn (m_flags & e_fixedRotationFlag) == e_fixedRotationFlag;\n}\n\ninline void b2Body::SetSleepingAllowed(bool flag)\n{\n\tif (flag)\n\t{\n\t\tm_flags |= e_autoSleepFlag;\n\t}\n\telse\n\t{\n\t\tm_flags &= ~e_autoSleepFlag;\n\t\tSetAwake(true);\n\t}\n}\n\ninline bool b2Body::IsSleepingAllowed() const\n{\n\treturn (m_flags & e_autoSleepFlag) == e_autoSleepFlag;\n}\n\ninline b2Fixture* b2Body::GetFixtureList()\n{\n\treturn m_fixtureList;\n}\n\ninline const b2Fixture* b2Body::GetFixtureList() const\n{\n\treturn m_fixtureList;\n}\n\ninline b2JointEdge* b2Body::GetJointList()\n{\n\treturn m_jointList;\n}\n\ninline const b2JointEdge* b2Body::GetJointList() const\n{\n\treturn m_jointList;\n}\n\ninline b2ContactEdge* b2Body::GetContactList()\n{\n\treturn m_contactList;\n}\n\ninline const b2ContactEdge* b2Body::GetContactList() const\n{\n\treturn m_contactList;\n}\n\ninline b2Body* b2Body::GetNext()\n{\n\treturn m_next;\n}\n\ninline const b2Body* b2Body::GetNext() const\n{\n\treturn m_next;\n}\n\ninline void b2Body::SetUserData(void* data)\n{\n\tm_userData = data;\n}\n\ninline void* b2Body::GetUserData() const\n{\n\treturn m_userData;\n}\n\ninline void b2Body::ApplyForce(const b2Vec2& force, const b2Vec2& point, bool wake)\n{\n\tif (m_type != b2_dynamicBody)\n\t{\n\t\treturn;\n\t}\n\n\tif (wake && (m_flags & e_awakeFlag) == 0)\n\t{\n\t\tSetAwake(true);\n\t}\n\n\t// Don't accumulate a force if the body is sleeping.\n\tif (m_flags & e_awakeFlag)\n\t{\n\t\tm_force += force;\n\t\tm_torque += b2Cross(point - m_sweep.c, force);\n\t}\n}\n\ninline void b2Body::ApplyForceToCenter(const b2Vec2& force, bool wake)\n{\n\tif (m_type != b2_dynamicBody)\n\t{\n\t\treturn;\n\t}\n\n\tif (wake && (m_flags & e_awakeFlag) == 0)\n\t{\n\t\tSetAwake(true);\n\t}\n\n\t// Don't accumulate a force if the body is sleeping\n\tif (m_flags & e_awakeFlag)\n\t{\n\t\tm_force += force;\n\t}\n}\n\ninline void b2Body::ApplyTorque(float32 torque, bool wake)\n{\n\tif (m_type != b2_dynamicBody)\n\t{\n\t\treturn;\n\t}\n\n\tif (wake && (m_flags & e_awakeFlag) == 0)\n\t{\n\t\tSetAwake(true);\n\t}\n\n\t// Don't accumulate a force if the body is sleeping\n\tif (m_flags & e_awakeFlag)\n\t{\n\t\tm_torque += torque;\n\t}\n}\n\ninline void b2Body::ApplyLinearImpulse(const b2Vec2& impulse, const b2Vec2& point, bool wake)\n{\n\tif (m_type != b2_dynamicBody)\n\t{\n\t\treturn;\n\t}\n\n\tif (wake && (m_flags & e_awakeFlag) == 0)\n\t{\n\t\tSetAwake(true);\n\t}\n\n\t// Don't accumulate velocity if the body is sleeping\n\tif (m_flags & e_awakeFlag)\n\t{\n\t\tm_linearVelocity += m_invMass * impulse;\n\t\tm_angularVelocity += m_invI * b2Cross(point - m_sweep.c, impulse);\n\t}\n}\n\ninline void b2Body::ApplyAngularImpulse(float32 impulse, bool wake)\n{\n\tif (m_type != b2_dynamicBody)\n\t{\n\t\treturn;\n\t}\n\n\tif (wake && (m_flags & e_awakeFlag) == 0)\n\t{\n\t\tSetAwake(true);\n\t}\n\n\t// Don't accumulate velocity if the body is sleeping\n\tif (m_flags & e_awakeFlag)\n\t{\n\t\tm_angularVelocity += m_invI * impulse;\n\t}\n}\n\ninline void b2Body::SynchronizeTransform()\n{\n\tm_xf.q.Set(m_sweep.a);\n\tm_xf.p = m_sweep.c - b2Mul(m_xf.q, m_sweep.localCenter);\n}\n\ninline void b2Body::Advance(float32 alpha)\n{\n\t// Advance to the new safe time. This doesn't sync the broad-phase.\n\tm_sweep.Advance(alpha);\n\tm_sweep.c = m_sweep.c0;\n\tm_sweep.a = m_sweep.a0;\n\tm_xf.q.Set(m_sweep.a);\n\tm_xf.p = m_sweep.c - b2Mul(m_xf.q, m_sweep.localCenter);\n}\n\ninline b2World* b2Body::GetWorld()\n{\n\treturn m_world;\n}\n\ninline const b2World* b2Body::GetWorld() const\n{\n\treturn m_world;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2ContactManager.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/b2ContactManager.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/b2WorldCallbacks.h>\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n\nb2ContactFilter b2_defaultFilter;\nb2ContactListener b2_defaultListener;\n\nb2ContactManager::b2ContactManager()\n{\n\tm_contactList = NULL;\n\tm_contactCount = 0;\n\tm_contactFilter = &b2_defaultFilter;\n\tm_contactListener = &b2_defaultListener;\n\tm_allocator = NULL;\n}\n\nvoid b2ContactManager::Destroy(b2Contact* c)\n{\n\tb2Fixture* fixtureA = c->GetFixtureA();\n\tb2Fixture* fixtureB = c->GetFixtureB();\n\tb2Body* bodyA = fixtureA->GetBody();\n\tb2Body* bodyB = fixtureB->GetBody();\n\n\tif (m_contactListener && c->IsTouching())\n\t{\n\t\tm_contactListener->EndContact(c);\n\t}\n\n\t// Remove from the world.\n\tif (c->m_prev)\n\t{\n\t\tc->m_prev->m_next = c->m_next;\n\t}\n\n\tif (c->m_next)\n\t{\n\t\tc->m_next->m_prev = c->m_prev;\n\t}\n\n\tif (c == m_contactList)\n\t{\n\t\tm_contactList = c->m_next;\n\t}\n\n\t// Remove from body 1\n\tif (c->m_nodeA.prev)\n\t{\n\t\tc->m_nodeA.prev->next = c->m_nodeA.next;\n\t}\n\n\tif (c->m_nodeA.next)\n\t{\n\t\tc->m_nodeA.next->prev = c->m_nodeA.prev;\n\t}\n\n\tif (&c->m_nodeA == bodyA->m_contactList)\n\t{\n\t\tbodyA->m_contactList = c->m_nodeA.next;\n\t}\n\n\t// Remove from body 2\n\tif (c->m_nodeB.prev)\n\t{\n\t\tc->m_nodeB.prev->next = c->m_nodeB.next;\n\t}\n\n\tif (c->m_nodeB.next)\n\t{\n\t\tc->m_nodeB.next->prev = c->m_nodeB.prev;\n\t}\n\n\tif (&c->m_nodeB == bodyB->m_contactList)\n\t{\n\t\tbodyB->m_contactList = c->m_nodeB.next;\n\t}\n\n\t// Call the factory.\n\tb2Contact::Destroy(c, m_allocator);\n\t--m_contactCount;\n}\n\n// This is the top level collision call for the time step. Here\n// all the narrow phase collision is processed for the world\n// contact list.\nvoid b2ContactManager::Collide()\n{\n\t// Update awake contacts.\n\tb2Contact* c = m_contactList;\n\twhile (c)\n\t{\n\t\tb2Fixture* fixtureA = c->GetFixtureA();\n\t\tb2Fixture* fixtureB = c->GetFixtureB();\n\t\tint32 indexA = c->GetChildIndexA();\n\t\tint32 indexB = c->GetChildIndexB();\n\t\tb2Body* bodyA = fixtureA->GetBody();\n\t\tb2Body* bodyB = fixtureB->GetBody();\n\t\t \n\t\t// Is this contact flagged for filtering?\n\t\tif (c->m_flags & b2Contact::e_filterFlag)\n\t\t{\n\t\t\t// Should these bodies collide?\n\t\t\tif (bodyB->ShouldCollide(bodyA) == false)\n\t\t\t{\n\t\t\t\tb2Contact* cNuke = c;\n\t\t\t\tc = cNuke->GetNext();\n\t\t\t\tDestroy(cNuke);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check user filtering.\n\t\t\tif (m_contactFilter && m_contactFilter->ShouldCollide(fixtureA, fixtureB) == false)\n\t\t\t{\n\t\t\t\tb2Contact* cNuke = c;\n\t\t\t\tc = cNuke->GetNext();\n\t\t\t\tDestroy(cNuke);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Clear the filtering flag.\n\t\t\tc->m_flags &= ~b2Contact::e_filterFlag;\n\t\t}\n\n\t\tbool activeA = bodyA->IsAwake() && bodyA->m_type != b2_staticBody;\n\t\tbool activeB = bodyB->IsAwake() && bodyB->m_type != b2_staticBody;\n\n\t\t// At least one body must be awake and it must be dynamic or kinematic.\n\t\tif (activeA == false && activeB == false)\n\t\t{\n\t\t\tc = c->GetNext();\n\t\t\tcontinue;\n\t\t}\n\n\t\tint32 proxyIdA = fixtureA->m_proxies[indexA].proxyId;\n\t\tint32 proxyIdB = fixtureB->m_proxies[indexB].proxyId;\n\t\tbool overlap = m_broadPhase.TestOverlap(proxyIdA, proxyIdB);\n\n\t\t// Here we destroy contacts that cease to overlap in the broad-phase.\n\t\tif (overlap == false)\n\t\t{\n\t\t\tb2Contact* cNuke = c;\n\t\t\tc = cNuke->GetNext();\n\t\t\tDestroy(cNuke);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// The contact persists.\n\t\tc->Update(m_contactListener);\n\t\tc = c->GetNext();\n\t}\n}\n\nvoid b2ContactManager::FindNewContacts()\n{\n\tm_broadPhase.UpdatePairs(this);\n}\n\nvoid b2ContactManager::AddPair(void* proxyUserDataA, void* proxyUserDataB)\n{\n\tb2FixtureProxy* proxyA = (b2FixtureProxy*)proxyUserDataA;\n\tb2FixtureProxy* proxyB = (b2FixtureProxy*)proxyUserDataB;\n\n\tb2Fixture* fixtureA = proxyA->fixture;\n\tb2Fixture* fixtureB = proxyB->fixture;\n\n\tint32 indexA = proxyA->childIndex;\n\tint32 indexB = proxyB->childIndex;\n\n\tb2Body* bodyA = fixtureA->GetBody();\n\tb2Body* bodyB = fixtureB->GetBody();\n\n\t// Are the fixtures on the same body?\n\tif (bodyA == bodyB)\n\t{\n\t\treturn;\n\t}\n\n\t// TODO_ERIN use a hash table to remove a potential bottleneck when both\n\t// bodies have a lot of contacts.\n\t// Does a contact already exist?\n\tb2ContactEdge* edge = bodyB->GetContactList();\n\twhile (edge)\n\t{\n\t\tif (edge->other == bodyA)\n\t\t{\n\t\t\tb2Fixture* fA = edge->contact->GetFixtureA();\n\t\t\tb2Fixture* fB = edge->contact->GetFixtureB();\n\t\t\tint32 iA = edge->contact->GetChildIndexA();\n\t\t\tint32 iB = edge->contact->GetChildIndexB();\n\n\t\t\tif (fA == fixtureA && fB == fixtureB && iA == indexA && iB == indexB)\n\t\t\t{\n\t\t\t\t// A contact already exists.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (fA == fixtureB && fB == fixtureA && iA == indexB && iB == indexA)\n\t\t\t{\n\t\t\t\t// A contact already exists.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tedge = edge->next;\n\t}\n\n\t// Does a joint override collision? Is at least one body dynamic?\n\tif (bodyB->ShouldCollide(bodyA) == false)\n\t{\n\t\treturn;\n\t}\n\n\t// Check user filtering.\n\tif (m_contactFilter && m_contactFilter->ShouldCollide(fixtureA, fixtureB) == false)\n\t{\n\t\treturn;\n\t}\n\n\t// Call the factory.\n\tb2Contact* c = b2Contact::Create(fixtureA, indexA, fixtureB, indexB, m_allocator);\n\tif (c == NULL)\n\t{\n\t\treturn;\n\t}\n\n\t// Contact creation may swap fixtures.\n\tfixtureA = c->GetFixtureA();\n\tfixtureB = c->GetFixtureB();\n\tindexA = c->GetChildIndexA();\n\tindexB = c->GetChildIndexB();\n\tbodyA = fixtureA->GetBody();\n\tbodyB = fixtureB->GetBody();\n\n\t// Insert into the world.\n\tc->m_prev = NULL;\n\tc->m_next = m_contactList;\n\tif (m_contactList != NULL)\n\t{\n\t\tm_contactList->m_prev = c;\n\t}\n\tm_contactList = c;\n\n\t// Connect to island graph.\n\n\t// Connect to body A\n\tc->m_nodeA.contact = c;\n\tc->m_nodeA.other = bodyB;\n\n\tc->m_nodeA.prev = NULL;\n\tc->m_nodeA.next = bodyA->m_contactList;\n\tif (bodyA->m_contactList != NULL)\n\t{\n\t\tbodyA->m_contactList->prev = &c->m_nodeA;\n\t}\n\tbodyA->m_contactList = &c->m_nodeA;\n\n\t// Connect to body B\n\tc->m_nodeB.contact = c;\n\tc->m_nodeB.other = bodyA;\n\n\tc->m_nodeB.prev = NULL;\n\tc->m_nodeB.next = bodyB->m_contactList;\n\tif (bodyB->m_contactList != NULL)\n\t{\n\t\tbodyB->m_contactList->prev = &c->m_nodeB;\n\t}\n\tbodyB->m_contactList = &c->m_nodeB;\n\n\t// Wake up the bodies\n\tif (fixtureA->IsSensor() == false && fixtureB->IsSensor() == false)\n\t{\n\t\tbodyA->SetAwake(true);\n\t\tbodyB->SetAwake(true);\n\t}\n\n\t++m_contactCount;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2ContactManager.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_CONTACT_MANAGER_H\n#define B2_CONTACT_MANAGER_H\n\n#include <Box2D/Collision/b2BroadPhase.h>\n\nclass b2Contact;\nclass b2ContactFilter;\nclass b2ContactListener;\nclass b2BlockAllocator;\n\n// Delegate of b2World.\nclass b2ContactManager\n{\npublic:\n\tb2ContactManager();\n\n\t// Broad-phase callback.\n\tvoid AddPair(void* proxyUserDataA, void* proxyUserDataB);\n\n\tvoid FindNewContacts();\n\n\tvoid Destroy(b2Contact* c);\n\n\tvoid Collide();\n            \n\tb2BroadPhase m_broadPhase;\n\tb2Contact* m_contactList;\n\tint32 m_contactCount;\n\tb2ContactFilter* m_contactFilter;\n\tb2ContactListener* m_contactListener;\n\tb2BlockAllocator* m_allocator;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2Fixture.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n#include <Box2D/Dynamics/b2World.h>\n#include <Box2D/Collision/Shapes/b2CircleShape.h>\n#include <Box2D/Collision/Shapes/b2EdgeShape.h>\n#include <Box2D/Collision/Shapes/b2PolygonShape.h>\n#include <Box2D/Collision/Shapes/b2ChainShape.h>\n#include <Box2D/Collision/b2BroadPhase.h>\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n\nb2Fixture::b2Fixture()\n{\n\tm_userData = NULL;\n\tm_body = NULL;\n\tm_next = NULL;\n\tm_proxies = NULL;\n\tm_proxyCount = 0;\n\tm_shape = NULL;\n\tm_density = 0.0f;\n}\n\nvoid b2Fixture::Create(b2BlockAllocator* allocator, b2Body* body, const b2FixtureDef* def)\n{\n\tm_userData = def->userData;\n\tm_friction = def->friction;\n\tm_restitution = def->restitution;\n\n\tm_body = body;\n\tm_next = NULL;\n\n\tm_filter = def->filter;\n\n\tm_isSensor = def->isSensor;\n\n\tm_shape = def->shape->Clone(allocator);\n\n\t// Reserve proxy space\n\tint32 childCount = m_shape->GetChildCount();\n\tm_proxies = (b2FixtureProxy*)allocator->Allocate(childCount * sizeof(b2FixtureProxy));\n\tfor (int32 i = 0; i < childCount; ++i)\n\t{\n\t\tm_proxies[i].fixture = NULL;\n\t\tm_proxies[i].proxyId = b2BroadPhase::e_nullProxy;\n\t}\n\tm_proxyCount = 0;\n\n\tm_density = def->density;\n}\n\nvoid b2Fixture::Destroy(b2BlockAllocator* allocator)\n{\n\t// The proxies must be destroyed before calling this.\n\tb2Assert(m_proxyCount == 0);\n\n\t// Free the proxy array.\n\tint32 childCount = m_shape->GetChildCount();\n\tallocator->Free(m_proxies, childCount * sizeof(b2FixtureProxy));\n\tm_proxies = NULL;\n\n\t// Free the child shape.\n\tswitch (m_shape->m_type)\n\t{\n\tcase b2Shape::e_circle:\n\t\t{\n\t\t\tb2CircleShape* s = (b2CircleShape*)m_shape;\n\t\t\ts->~b2CircleShape();\n\t\t\tallocator->Free(s, sizeof(b2CircleShape));\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_edge:\n\t\t{\n\t\t\tb2EdgeShape* s = (b2EdgeShape*)m_shape;\n\t\t\ts->~b2EdgeShape();\n\t\t\tallocator->Free(s, sizeof(b2EdgeShape));\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_polygon:\n\t\t{\n\t\t\tb2PolygonShape* s = (b2PolygonShape*)m_shape;\n\t\t\ts->~b2PolygonShape();\n\t\t\tallocator->Free(s, sizeof(b2PolygonShape));\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_chain:\n\t\t{\n\t\t\tb2ChainShape* s = (b2ChainShape*)m_shape;\n\t\t\ts->~b2ChainShape();\n\t\t\tallocator->Free(s, sizeof(b2ChainShape));\n\t\t}\n\t\tbreak;\n\n\tdefault:\n\t\tb2Assert(false);\n\t\tbreak;\n\t}\n\n\tm_shape = NULL;\n}\n\nvoid b2Fixture::CreateProxies(b2BroadPhase* broadPhase, const b2Transform& xf)\n{\n\tb2Assert(m_proxyCount == 0);\n\n\t// Create proxies in the broad-phase.\n\tm_proxyCount = m_shape->GetChildCount();\n\n\tfor (int32 i = 0; i < m_proxyCount; ++i)\n\t{\n\t\tb2FixtureProxy* proxy = m_proxies + i;\n\t\tm_shape->ComputeAABB(&proxy->aabb, xf, i);\n\t\tproxy->proxyId = broadPhase->CreateProxy(proxy->aabb, proxy);\n\t\tproxy->fixture = this;\n\t\tproxy->childIndex = i;\n\t}\n}\n\nvoid b2Fixture::DestroyProxies(b2BroadPhase* broadPhase)\n{\n\t// Destroy proxies in the broad-phase.\n\tfor (int32 i = 0; i < m_proxyCount; ++i)\n\t{\n\t\tb2FixtureProxy* proxy = m_proxies + i;\n\t\tbroadPhase->DestroyProxy(proxy->proxyId);\n\t\tproxy->proxyId = b2BroadPhase::e_nullProxy;\n\t}\n\n\tm_proxyCount = 0;\n}\n\nvoid b2Fixture::Synchronize(b2BroadPhase* broadPhase, const b2Transform& transform1, const b2Transform& transform2)\n{\n\tif (m_proxyCount == 0)\n\t{\t\n\t\treturn;\n\t}\n\n\tfor (int32 i = 0; i < m_proxyCount; ++i)\n\t{\n\t\tb2FixtureProxy* proxy = m_proxies + i;\n\n\t\t// Compute an AABB that covers the swept shape (may miss some rotation effect).\n\t\tb2AABB aabb1, aabb2;\n\t\tm_shape->ComputeAABB(&aabb1, transform1, proxy->childIndex);\n\t\tm_shape->ComputeAABB(&aabb2, transform2, proxy->childIndex);\n\t\n\t\tproxy->aabb.Combine(aabb1, aabb2);\n\n\t\tb2Vec2 displacement = transform2.p - transform1.p;\n\n\t\tbroadPhase->MoveProxy(proxy->proxyId, proxy->aabb, displacement);\n\t}\n}\n\nvoid b2Fixture::SetFilterData(const b2Filter& filter)\n{\n\tm_filter = filter;\n\n\tRefilter();\n}\n\nvoid b2Fixture::Refilter()\n{\n\tif (m_body == NULL)\n\t{\n\t\treturn;\n\t}\n\n\t// Flag associated contacts for filtering.\n\tb2ContactEdge* edge = m_body->GetContactList();\n\twhile (edge)\n\t{\n\t\tb2Contact* contact = edge->contact;\n\t\tb2Fixture* fixtureA = contact->GetFixtureA();\n\t\tb2Fixture* fixtureB = contact->GetFixtureB();\n\t\tif (fixtureA == this || fixtureB == this)\n\t\t{\n\t\t\tcontact->FlagForFiltering();\n\t\t}\n\n\t\tedge = edge->next;\n\t}\n\n\tb2World* world = m_body->GetWorld();\n\n\tif (world == NULL)\n\t{\n\t\treturn;\n\t}\n\n\t// Touch each proxy so that new pairs may be created\n\tb2BroadPhase* broadPhase = &world->m_contactManager.m_broadPhase;\n\tfor (int32 i = 0; i < m_proxyCount; ++i)\n\t{\n\t\tbroadPhase->TouchProxy(m_proxies[i].proxyId);\n\t}\n}\n\nvoid b2Fixture::SetSensor(bool sensor)\n{\n\tif (sensor != m_isSensor)\n\t{\n\t\tm_body->SetAwake(true);\n\t\tm_isSensor = sensor;\n\t}\n}\n\nvoid b2Fixture::Dump(int32 bodyIndex)\n{\n\tb2Log(\"    b2FixtureDef fd;\\n\");\n\tb2Log(\"    fd.friction = %.15lef;\\n\", m_friction);\n\tb2Log(\"    fd.restitution = %.15lef;\\n\", m_restitution);\n\tb2Log(\"    fd.density = %.15lef;\\n\", m_density);\n\tb2Log(\"    fd.isSensor = bool(%d);\\n\", m_isSensor);\n\tb2Log(\"    fd.filter.categoryBits = uint16(%d);\\n\", m_filter.categoryBits);\n\tb2Log(\"    fd.filter.maskBits = uint16(%d);\\n\", m_filter.maskBits);\n\tb2Log(\"    fd.filter.groupIndex = int16(%d);\\n\", m_filter.groupIndex);\n\n\tswitch (m_shape->m_type)\n\t{\n\tcase b2Shape::e_circle:\n\t\t{\n\t\t\tb2CircleShape* s = (b2CircleShape*)m_shape;\n\t\t\tb2Log(\"    b2CircleShape shape;\\n\");\n\t\t\tb2Log(\"    shape.m_radius = %.15lef;\\n\", s->m_radius);\n\t\t\tb2Log(\"    shape.m_p.Set(%.15lef, %.15lef);\\n\", s->m_p.x, s->m_p.y);\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_edge:\n\t\t{\n\t\t\tb2EdgeShape* s = (b2EdgeShape*)m_shape;\n\t\t\tb2Log(\"    b2EdgeShape shape;\\n\");\n\t\t\tb2Log(\"    shape.m_radius = %.15lef;\\n\", s->m_radius);\n\t\t\tb2Log(\"    shape.m_vertex0.Set(%.15lef, %.15lef);\\n\", s->m_vertex0.x, s->m_vertex0.y);\n\t\t\tb2Log(\"    shape.m_vertex1.Set(%.15lef, %.15lef);\\n\", s->m_vertex1.x, s->m_vertex1.y);\n\t\t\tb2Log(\"    shape.m_vertex2.Set(%.15lef, %.15lef);\\n\", s->m_vertex2.x, s->m_vertex2.y);\n\t\t\tb2Log(\"    shape.m_vertex3.Set(%.15lef, %.15lef);\\n\", s->m_vertex3.x, s->m_vertex3.y);\n\t\t\tb2Log(\"    shape.m_hasVertex0 = bool(%d);\\n\", s->m_hasVertex0);\n\t\t\tb2Log(\"    shape.m_hasVertex3 = bool(%d);\\n\", s->m_hasVertex3);\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_polygon:\n\t\t{\n\t\t\tb2PolygonShape* s = (b2PolygonShape*)m_shape;\n\t\t\tb2Log(\"    b2PolygonShape shape;\\n\");\n\t\t\tb2Log(\"    b2Vec2 vs[%d];\\n\", b2_maxPolygonVertices);\n\t\t\tfor (int32 i = 0; i < s->m_count; ++i)\n\t\t\t{\n\t\t\t\tb2Log(\"    vs[%d].Set(%.15lef, %.15lef);\\n\", i, s->m_vertices[i].x, s->m_vertices[i].y);\n\t\t\t}\n\t\t\tb2Log(\"    shape.Set(vs, %d);\\n\", s->m_count);\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_chain:\n\t\t{\n\t\t\tb2ChainShape* s = (b2ChainShape*)m_shape;\n\t\t\tb2Log(\"    b2ChainShape shape;\\n\");\n\t\t\tb2Log(\"    b2Vec2 vs[%d];\\n\", s->m_count);\n\t\t\tfor (int32 i = 0; i < s->m_count; ++i)\n\t\t\t{\n\t\t\t\tb2Log(\"    vs[%d].Set(%.15lef, %.15lef);\\n\", i, s->m_vertices[i].x, s->m_vertices[i].y);\n\t\t\t}\n\t\t\tb2Log(\"    shape.CreateChain(vs, %d);\\n\", s->m_count);\n\t\t\tb2Log(\"    shape.m_prevVertex.Set(%.15lef, %.15lef);\\n\", s->m_prevVertex.x, s->m_prevVertex.y);\n\t\t\tb2Log(\"    shape.m_nextVertex.Set(%.15lef, %.15lef);\\n\", s->m_nextVertex.x, s->m_nextVertex.y);\n\t\t\tb2Log(\"    shape.m_hasPrevVertex = bool(%d);\\n\", s->m_hasPrevVertex);\n\t\t\tb2Log(\"    shape.m_hasNextVertex = bool(%d);\\n\", s->m_hasNextVertex);\n\t\t}\n\t\tbreak;\n\n\tdefault:\n\t\treturn;\n\t}\n\n\tb2Log(\"\\n\");\n\tb2Log(\"    fd.shape = &shape;\\n\");\n\tb2Log(\"\\n\");\n\tb2Log(\"    bodies[%d]->CreateFixture(&fd);\\n\", bodyIndex);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2Fixture.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_FIXTURE_H\n#define B2_FIXTURE_H\n\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/Shapes/b2Shape.h>\n\nclass b2BlockAllocator;\nclass b2Body;\nclass b2BroadPhase;\nclass b2Fixture;\n\n/// This holds contact filtering data.\nstruct b2Filter\n{\n\tb2Filter()\n\t{\n\t\tcategoryBits = 0x0001;\n\t\tmaskBits = 0xFFFF;\n\t\tgroupIndex = 0;\n\t}\n\n\t/// The collision category bits. Normally you would just set one bit.\n\tuint16 categoryBits;\n\n\t/// The collision mask bits. This states the categories that this\n\t/// shape would accept for collision.\n\tuint16 maskBits;\n\n\t/// Collision groups allow a certain group of objects to never collide (negative)\n\t/// or always collide (positive). Zero means no collision group. Non-zero group\n\t/// filtering always wins against the mask bits.\n\tint16 groupIndex;\n};\n\n/// A fixture definition is used to create a fixture. This class defines an\n/// abstract fixture definition. You can reuse fixture definitions safely.\nstruct b2FixtureDef\n{\n\t/// The constructor sets the default fixture definition values.\n\tb2FixtureDef()\n\t{\n\t\tshape = NULL;\n\t\tuserData = NULL;\n\t\tfriction = 0.2f;\n\t\trestitution = 0.0f;\n\t\tdensity = 0.0f;\n\t\tisSensor = false;\n\t}\n\n\t/// The shape, this must be set. The shape will be cloned, so you\n\t/// can create the shape on the stack.\n\tconst b2Shape* shape;\n\n\t/// Use this to store application specific fixture data.\n\tvoid* userData;\n\n\t/// The friction coefficient, usually in the range [0,1].\n\tfloat32 friction;\n\n\t/// The restitution (elasticity) usually in the range [0,1].\n\tfloat32 restitution;\n\n\t/// The density, usually in kg/m^2.\n\tfloat32 density;\n\n\t/// A sensor shape collects contact information but never generates a collision\n\t/// response.\n\tbool isSensor;\n\n\t/// Contact filtering data.\n\tb2Filter filter;\n};\n\n/// This proxy is used internally to connect fixtures to the broad-phase.\nstruct b2FixtureProxy\n{\n\tb2AABB aabb;\n\tb2Fixture* fixture;\n\tint32 childIndex;\n\tint32 proxyId;\n};\n\n/// A fixture is used to attach a shape to a body for collision detection. A fixture\n/// inherits its transform from its parent. Fixtures hold additional non-geometric data\n/// such as friction, collision filters, etc.\n/// Fixtures are created via b2Body::CreateFixture.\n/// @warning you cannot reuse fixtures.\nclass b2Fixture\n{\npublic:\n\t/// Get the type of the child shape. You can use this to down cast to the concrete shape.\n\t/// @return the shape type.\n\tb2Shape::Type GetType() const;\n\n\t/// Get the child shape. You can modify the child shape, however you should not change the\n\t/// number of vertices because this will crash some collision caching mechanisms.\n\t/// Manipulating the shape may lead to non-physical behavior.\n\tb2Shape* GetShape();\n\tconst b2Shape* GetShape() const;\n\n\t/// Set if this fixture is a sensor.\n\tvoid SetSensor(bool sensor);\n\n\t/// Is this fixture a sensor (non-solid)?\n\t/// @return the true if the shape is a sensor.\n\tbool IsSensor() const;\n\n\t/// Set the contact filtering data. This will not update contacts until the next time\n\t/// step when either parent body is active and awake.\n\t/// This automatically calls Refilter.\n\tvoid SetFilterData(const b2Filter& filter);\n\n\t/// Get the contact filtering data.\n\tconst b2Filter& GetFilterData() const;\n\n\t/// Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldCollide.\n\tvoid Refilter();\n\n\t/// Get the parent body of this fixture. This is NULL if the fixture is not attached.\n\t/// @return the parent body.\n\tb2Body* GetBody();\n\tconst b2Body* GetBody() const;\n\n\t/// Get the next fixture in the parent body's fixture list.\n\t/// @return the next shape.\n\tb2Fixture* GetNext();\n\tconst b2Fixture* GetNext() const;\n\n\t/// Get the user data that was assigned in the fixture definition. Use this to\n\t/// store your application specific data.\n\tvoid* GetUserData() const;\n\n\t/// Set the user data. Use this to store your application specific data.\n\tvoid SetUserData(void* data);\n\n\t/// Test a point for containment in this fixture.\n\t/// @param p a point in world coordinates.\n\tbool TestPoint(const b2Vec2& p) const;\n\n\t/// Cast a ray against this shape.\n\t/// @param output the ray-cast results.\n\t/// @param input the ray-cast input parameters.\n\tbool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, int32 childIndex) const;\n\n\t/// Get the mass data for this fixture. The mass data is based on the density and\n\t/// the shape. The rotational inertia is about the shape's origin. This operation\n\t/// may be expensive.\n\tvoid GetMassData(b2MassData* massData) const;\n\n\t/// Set the density of this fixture. This will _not_ automatically adjust the mass\n\t/// of the body. You must call b2Body::ResetMassData to update the body's mass.\n\tvoid SetDensity(float32 density);\n\n\t/// Get the density of this fixture.\n\tfloat32 GetDensity() const;\n\n\t/// Get the coefficient of friction.\n\tfloat32 GetFriction() const;\n\n\t/// Set the coefficient of friction. This will _not_ change the friction of\n\t/// existing contacts.\n\tvoid SetFriction(float32 friction);\n\n\t/// Get the coefficient of restitution.\n\tfloat32 GetRestitution() const;\n\n\t/// Set the coefficient of restitution. This will _not_ change the restitution of\n\t/// existing contacts.\n\tvoid SetRestitution(float32 restitution);\n\n\t/// Get the fixture's AABB. This AABB may be enlarge and/or stale.\n\t/// If you need a more accurate AABB, compute it using the shape and\n\t/// the body transform.\n\tconst b2AABB& GetAABB(int32 childIndex) const;\n\n\t/// Dump this fixture to the log file.\n\tvoid Dump(int32 bodyIndex);\n\nprotected:\n\n\tfriend class b2Body;\n\tfriend class b2World;\n\tfriend class b2Contact;\n\tfriend class b2ContactManager;\n\n\tb2Fixture();\n\n\t// We need separation create/destroy functions from the constructor/destructor because\n\t// the destructor cannot access the allocator (no destructor arguments allowed by C++).\n\tvoid Create(b2BlockAllocator* allocator, b2Body* body, const b2FixtureDef* def);\n\tvoid Destroy(b2BlockAllocator* allocator);\n\n\t// These support body activation/deactivation.\n\tvoid CreateProxies(b2BroadPhase* broadPhase, const b2Transform& xf);\n\tvoid DestroyProxies(b2BroadPhase* broadPhase);\n\n\tvoid Synchronize(b2BroadPhase* broadPhase, const b2Transform& xf1, const b2Transform& xf2);\n\n\tfloat32 m_density;\n\n\tb2Fixture* m_next;\n\tb2Body* m_body;\n\n\tb2Shape* m_shape;\n\n\tfloat32 m_friction;\n\tfloat32 m_restitution;\n\n\tb2FixtureProxy* m_proxies;\n\tint32 m_proxyCount;\n\n\tb2Filter m_filter;\n\n\tbool m_isSensor;\n\n\tvoid* m_userData;\n};\n\ninline b2Shape::Type b2Fixture::GetType() const\n{\n\treturn m_shape->GetType();\n}\n\ninline b2Shape* b2Fixture::GetShape()\n{\n\treturn m_shape;\n}\n\ninline const b2Shape* b2Fixture::GetShape() const\n{\n\treturn m_shape;\n}\n\ninline bool b2Fixture::IsSensor() const\n{\n\treturn m_isSensor;\n}\n\ninline const b2Filter& b2Fixture::GetFilterData() const\n{\n\treturn m_filter;\n}\n\ninline void* b2Fixture::GetUserData() const\n{\n\treturn m_userData;\n}\n\ninline void b2Fixture::SetUserData(void* data)\n{\n\tm_userData = data;\n}\n\ninline b2Body* b2Fixture::GetBody()\n{\n\treturn m_body;\n}\n\ninline const b2Body* b2Fixture::GetBody() const\n{\n\treturn m_body;\n}\n\ninline b2Fixture* b2Fixture::GetNext()\n{\n\treturn m_next;\n}\n\ninline const b2Fixture* b2Fixture::GetNext() const\n{\n\treturn m_next;\n}\n\ninline void b2Fixture::SetDensity(float32 density)\n{\n\tb2Assert(b2IsValid(density) && density >= 0.0f);\n\tm_density = density;\n}\n\ninline float32 b2Fixture::GetDensity() const\n{\n\treturn m_density;\n}\n\ninline float32 b2Fixture::GetFriction() const\n{\n\treturn m_friction;\n}\n\ninline void b2Fixture::SetFriction(float32 friction)\n{\n\tm_friction = friction;\n}\n\ninline float32 b2Fixture::GetRestitution() const\n{\n\treturn m_restitution;\n}\n\ninline void b2Fixture::SetRestitution(float32 restitution)\n{\n\tm_restitution = restitution;\n}\n\ninline bool b2Fixture::TestPoint(const b2Vec2& p) const\n{\n\treturn m_shape->TestPoint(m_body->GetTransform(), p);\n}\n\ninline bool b2Fixture::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, int32 childIndex) const\n{\n\treturn m_shape->RayCast(output, input, m_body->GetTransform(), childIndex);\n}\n\ninline void b2Fixture::GetMassData(b2MassData* massData) const\n{\n\tm_shape->ComputeMass(massData, m_density);\n}\n\ninline const b2AABB& b2Fixture::GetAABB(int32 childIndex) const\n{\n\tb2Assert(0 <= childIndex && childIndex < m_proxyCount);\n\treturn m_proxies[childIndex].aabb;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2Island.cpp",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Collision/b2Distance.h>\n#include <Box2D/Dynamics/b2Island.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/b2World.h>\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n#include <Box2D/Dynamics/Contacts/b2ContactSolver.h>\n#include <Box2D/Dynamics/Joints/b2Joint.h>\n#include <Box2D/Common/b2StackAllocator.h>\n#include <Box2D/Common/b2Timer.h>\n\n/*\nPosition Correction Notes\n=========================\nI tried the several algorithms for position correction of the 2D revolute joint.\nI looked at these systems:\n- simple pendulum (1m diameter sphere on massless 5m stick) with initial angular velocity of 100 rad/s.\n- suspension bridge with 30 1m long planks of length 1m.\n- multi-link chain with 30 1m long links.\n\nHere are the algorithms:\n\nBaumgarte - A fraction of the position error is added to the velocity error. There is no\nseparate position solver.\n\nPseudo Velocities - After the velocity solver and position integration,\nthe position error, Jacobian, and effective mass are recomputed. Then\nthe velocity constraints are solved with pseudo velocities and a fraction\nof the position error is added to the pseudo velocity error. The pseudo\nvelocities are initialized to zero and there is no warm-starting. After\nthe position solver, the pseudo velocities are added to the positions.\nThis is also called the First Order World method or the Position LCP method.\n\nModified Nonlinear Gauss-Seidel (NGS) - Like Pseudo Velocities except the\nposition error is re-computed for each constraint and the positions are updated\nafter the constraint is solved. The radius vectors (aka Jacobians) are\nre-computed too (otherwise the algorithm has horrible instability). The pseudo\nvelocity states are not needed because they are effectively zero at the beginning\nof each iteration. Since we have the current position error, we allow the\niterations to terminate early if the error becomes smaller than b2_linearSlop.\n\nFull NGS or just NGS - Like Modified NGS except the effective mass are re-computed\neach time a constraint is solved.\n\nHere are the results:\nBaumgarte - this is the cheapest algorithm but it has some stability problems,\nespecially with the bridge. The chain links separate easily close to the root\nand they jitter as they struggle to pull together. This is one of the most common\nmethods in the field. The big drawback is that the position correction artificially\naffects the momentum, thus leading to instabilities and false bounce. I used a\nbias factor of 0.2. A larger bias factor makes the bridge less stable, a smaller\nfactor makes joints and contacts more spongy.\n\nPseudo Velocities - the is more stable than the Baumgarte method. The bridge is\nstable. However, joints still separate with large angular velocities. Drag the\nsimple pendulum in a circle quickly and the joint will separate. The chain separates\neasily and does not recover. I used a bias factor of 0.2. A larger value lead to\nthe bridge collapsing when a heavy cube drops on it.\n\nModified NGS - this algorithm is better in some ways than Baumgarte and Pseudo\nVelocities, but in other ways it is worse. The bridge and chain are much more\nstable, but the simple pendulum goes unstable at high angular velocities.\n\nFull NGS - stable in all tests. The joints display good stiffness. The bridge\nstill sags, but this is better than infinite forces.\n\nRecommendations\nPseudo Velocities are not really worthwhile because the bridge and chain cannot\nrecover from joint separation. In other cases the benefit over Baumgarte is small.\n\nModified NGS is not a robust method for the revolute joint due to the violent\ninstability seen in the simple pendulum. Perhaps it is viable with other constraint\ntypes, especially scalar constraints where the effective mass is a scalar.\n\nThis leaves Baumgarte and Full NGS. Baumgarte has small, but manageable instabilities\nand is very fast. I don't think we can escape Baumgarte, especially in highly\ndemanding cases where high constraint fidelity is not needed.\n\nFull NGS is robust and easy on the eyes. I recommend this as an option for\nhigher fidelity simulation and certainly for suspension bridges and long chains.\nFull NGS might be a good choice for ragdolls, especially motorized ragdolls where\njoint separation can be problematic. The number of NGS iterations can be reduced\nfor better performance without harming robustness much.\n\nEach joint in a can be handled differently in the position solver. So I recommend\na system where the user can select the algorithm on a per joint basis. I would\nprobably default to the slower Full NGS and let the user select the faster\nBaumgarte method in performance critical scenarios.\n*/\n\n/*\nCache Performance\n\nThe Box2D solvers are dominated by cache misses. Data structures are designed\nto increase the number of cache hits. Much of misses are due to random access\nto body data. The constraint structures are iterated over linearly, which leads\nto few cache misses.\n\nThe bodies are not accessed during iteration. Instead read only data, such as\nthe mass values are stored with the constraints. The mutable data are the constraint\nimpulses and the bodies velocities/positions. The impulses are held inside the\nconstraint structures. The body velocities/positions are held in compact, temporary\narrays to increase the number of cache hits. Linear and angular velocity are\nstored in a single array since multiple arrays lead to multiple misses.\n*/\n\n/*\n2D Rotation\n\nR = [cos(theta) -sin(theta)]\n    [sin(theta) cos(theta) ]\n\nthetaDot = omega\n\nLet q1 = cos(theta), q2 = sin(theta).\nR = [q1 -q2]\n    [q2  q1]\n\nq1Dot = -thetaDot * q2\nq2Dot = thetaDot * q1\n\nq1_new = q1_old - dt * w * q2\nq2_new = q2_old + dt * w * q1\nthen normalize.\n\nThis might be faster than computing sin+cos.\nHowever, we can compute sin+cos of the same angle fast.\n*/\n\nb2Island::b2Island(\n\tint32 bodyCapacity,\n\tint32 contactCapacity,\n\tint32 jointCapacity,\n\tb2StackAllocator* allocator,\n\tb2ContactListener* listener)\n{\n\tm_bodyCapacity = bodyCapacity;\n\tm_contactCapacity = contactCapacity;\n\tm_jointCapacity\t = jointCapacity;\n\tm_bodyCount = 0;\n\tm_contactCount = 0;\n\tm_jointCount = 0;\n\n\tm_allocator = allocator;\n\tm_listener = listener;\n\n\tm_bodies = (b2Body**)m_allocator->Allocate(bodyCapacity * sizeof(b2Body*));\n\tm_contacts = (b2Contact**)m_allocator->Allocate(contactCapacity\t * sizeof(b2Contact*));\n\tm_joints = (b2Joint**)m_allocator->Allocate(jointCapacity * sizeof(b2Joint*));\n\n\tm_velocities = (b2Velocity*)m_allocator->Allocate(m_bodyCapacity * sizeof(b2Velocity));\n\tm_positions = (b2Position*)m_allocator->Allocate(m_bodyCapacity * sizeof(b2Position));\n}\n\nb2Island::~b2Island()\n{\n\t// Warning: the order should reverse the constructor order.\n\tm_allocator->Free(m_positions);\n\tm_allocator->Free(m_velocities);\n\tm_allocator->Free(m_joints);\n\tm_allocator->Free(m_contacts);\n\tm_allocator->Free(m_bodies);\n}\n\nvoid b2Island::Solve(b2Profile* profile, const b2TimeStep& step, const b2Vec2& gravity, bool allowSleep)\n{\n\tb2Timer timer;\n\n\tfloat32 h = step.dt;\n\n\t// Integrate velocities and apply damping. Initialize the body state.\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\n\t{\n\t\tb2Body* b = m_bodies[i];\n\n\t\tb2Vec2 c = b->m_sweep.c;\n\t\tfloat32 a = b->m_sweep.a;\n\t\tb2Vec2 v = b->m_linearVelocity;\n\t\tfloat32 w = b->m_angularVelocity;\n\n\t\t// Store positions for continuous collision.\n\t\tb->m_sweep.c0 = b->m_sweep.c;\n\t\tb->m_sweep.a0 = b->m_sweep.a;\n\n\t\tif (b->m_type == b2_dynamicBody)\n\t\t{\n\t\t\t// Integrate velocities.\n\t\t\tv += h * (b->m_gravityScale * gravity + b->m_invMass * b->m_force);\n\t\t\tw += h * b->m_invI * b->m_torque;\n\n\t\t\t// Apply damping.\n\t\t\t// ODE: dv/dt + c * v = 0\n\t\t\t// Solution: v(t) = v0 * exp(-c * t)\n\t\t\t// Time step: v(t + dt) = v0 * exp(-c * (t + dt)) = v0 * exp(-c * t) * exp(-c * dt) = v * exp(-c * dt)\n\t\t\t// v2 = exp(-c * dt) * v1\n\t\t\t// Pade approximation:\n\t\t\t// v2 = v1 * 1 / (1 + c * dt)\n\t\t\tv *= 1.0f / (1.0f + h * b->m_linearDamping);\n\t\t\tw *= 1.0f / (1.0f + h * b->m_angularDamping);\n\t\t}\n\n\t\tm_positions[i].c = c;\n\t\tm_positions[i].a = a;\n\t\tm_velocities[i].v = v;\n\t\tm_velocities[i].w = w;\n\t}\n\n\ttimer.Reset();\n\n\t// Solver data\n\tb2SolverData solverData;\n\tsolverData.step = step;\n\tsolverData.positions = m_positions;\n\tsolverData.velocities = m_velocities;\n\n\t// Initialize velocity constraints.\n\tb2ContactSolverDef contactSolverDef;\n\tcontactSolverDef.step = step;\n\tcontactSolverDef.contacts = m_contacts;\n\tcontactSolverDef.count = m_contactCount;\n\tcontactSolverDef.positions = m_positions;\n\tcontactSolverDef.velocities = m_velocities;\n\tcontactSolverDef.allocator = m_allocator;\n\n\tb2ContactSolver contactSolver(&contactSolverDef);\n\tcontactSolver.InitializeVelocityConstraints();\n\n\tif (step.warmStarting)\n\t{\n\t\tcontactSolver.WarmStart();\n\t}\n\t\n\tfor (int32 i = 0; i < m_jointCount; ++i)\n\t{\n\t\tm_joints[i]->InitVelocityConstraints(solverData);\n\t}\n\n\tprofile->solveInit = timer.GetMilliseconds();\n\n\t// Solve velocity constraints\n\ttimer.Reset();\n\tfor (int32 i = 0; i < step.velocityIterations; ++i)\n\t{\n\t\tfor (int32 j = 0; j < m_jointCount; ++j)\n\t\t{\n\t\t\tm_joints[j]->SolveVelocityConstraints(solverData);\n\t\t}\n\n\t\tcontactSolver.SolveVelocityConstraints();\n\t}\n\n\t// Store impulses for warm starting\n\tcontactSolver.StoreImpulses();\n\tprofile->solveVelocity = timer.GetMilliseconds();\n\n\t// Integrate positions\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\n\t{\n\t\tb2Vec2 c = m_positions[i].c;\n\t\tfloat32 a = m_positions[i].a;\n\t\tb2Vec2 v = m_velocities[i].v;\n\t\tfloat32 w = m_velocities[i].w;\n\n\t\t// Check for large velocities\n\t\tb2Vec2 translation = h * v;\n\t\tif (b2Dot(translation, translation) > b2_maxTranslationSquared)\n\t\t{\n\t\t\tfloat32 ratio = b2_maxTranslation / translation.Length();\n\t\t\tv *= ratio;\n\t\t}\n\n\t\tfloat32 rotation = h * w;\n\t\tif (rotation * rotation > b2_maxRotationSquared)\n\t\t{\n\t\t\tfloat32 ratio = b2_maxRotation / b2Abs(rotation);\n\t\t\tw *= ratio;\n\t\t}\n\n\t\t// Integrate\n\t\tc += h * v;\n\t\ta += h * w;\n\n\t\tm_positions[i].c = c;\n\t\tm_positions[i].a = a;\n\t\tm_velocities[i].v = v;\n\t\tm_velocities[i].w = w;\n\t}\n\n\t// Solve position constraints\n\ttimer.Reset();\n\tbool positionSolved = false;\n\tfor (int32 i = 0; i < step.positionIterations; ++i)\n\t{\n\t\tbool contactsOkay = contactSolver.SolvePositionConstraints();\n\n\t\tbool jointsOkay = true;\n\t\tfor (int32 i = 0; i < m_jointCount; ++i)\n\t\t{\n\t\t\tbool jointOkay = m_joints[i]->SolvePositionConstraints(solverData);\n\t\t\tjointsOkay = jointsOkay && jointOkay;\n\t\t}\n\n\t\tif (contactsOkay && jointsOkay)\n\t\t{\n\t\t\t// Exit early if the position errors are small.\n\t\t\tpositionSolved = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Copy state buffers back to the bodies\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\n\t{\n\t\tb2Body* body = m_bodies[i];\n\t\tbody->m_sweep.c = m_positions[i].c;\n\t\tbody->m_sweep.a = m_positions[i].a;\n\t\tbody->m_linearVelocity = m_velocities[i].v;\n\t\tbody->m_angularVelocity = m_velocities[i].w;\n\t\tbody->SynchronizeTransform();\n\t}\n\n\tprofile->solvePosition = timer.GetMilliseconds();\n\n\tReport(contactSolver.m_velocityConstraints);\n\n\tif (allowSleep)\n\t{\n\t\tfloat32 minSleepTime = b2_maxFloat;\n\n\t\tconst float32 linTolSqr = b2_linearSleepTolerance * b2_linearSleepTolerance;\n\t\tconst float32 angTolSqr = b2_angularSleepTolerance * b2_angularSleepTolerance;\n\n\t\tfor (int32 i = 0; i < m_bodyCount; ++i)\n\t\t{\n\t\t\tb2Body* b = m_bodies[i];\n\t\t\tif (b->GetType() == b2_staticBody)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ((b->m_flags & b2Body::e_autoSleepFlag) == 0 ||\n\t\t\t\tb->m_angularVelocity * b->m_angularVelocity > angTolSqr ||\n\t\t\t\tb2Dot(b->m_linearVelocity, b->m_linearVelocity) > linTolSqr)\n\t\t\t{\n\t\t\t\tb->m_sleepTime = 0.0f;\n\t\t\t\tminSleepTime = 0.0f;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tb->m_sleepTime += h;\n\t\t\t\tminSleepTime = b2Min(minSleepTime, b->m_sleepTime);\n\t\t\t}\n\t\t}\n\n\t\tif (minSleepTime >= b2_timeToSleep && positionSolved)\n\t\t{\n\t\t\tfor (int32 i = 0; i < m_bodyCount; ++i)\n\t\t\t{\n\t\t\t\tb2Body* b = m_bodies[i];\n\t\t\t\tb->SetAwake(false);\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid b2Island::SolveTOI(const b2TimeStep& subStep, int32 toiIndexA, int32 toiIndexB)\n{\n\tb2Assert(toiIndexA < m_bodyCount);\n\tb2Assert(toiIndexB < m_bodyCount);\n\n\t// Initialize the body state.\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\n\t{\n\t\tb2Body* b = m_bodies[i];\n\t\tm_positions[i].c = b->m_sweep.c;\n\t\tm_positions[i].a = b->m_sweep.a;\n\t\tm_velocities[i].v = b->m_linearVelocity;\n\t\tm_velocities[i].w = b->m_angularVelocity;\n\t}\n\n\tb2ContactSolverDef contactSolverDef;\n\tcontactSolverDef.contacts = m_contacts;\n\tcontactSolverDef.count = m_contactCount;\n\tcontactSolverDef.allocator = m_allocator;\n\tcontactSolverDef.step = subStep;\n\tcontactSolverDef.positions = m_positions;\n\tcontactSolverDef.velocities = m_velocities;\n\tb2ContactSolver contactSolver(&contactSolverDef);\n\n\t// Solve position constraints.\n\tfor (int32 i = 0; i < subStep.positionIterations; ++i)\n\t{\n\t\tbool contactsOkay = contactSolver.SolveTOIPositionConstraints(toiIndexA, toiIndexB);\n\t\tif (contactsOkay)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\n#if 0\n\t// Is the new position really safe?\n\tfor (int32 i = 0; i < m_contactCount; ++i)\n\t{\n\t\tb2Contact* c = m_contacts[i];\n\t\tb2Fixture* fA = c->GetFixtureA();\n\t\tb2Fixture* fB = c->GetFixtureB();\n\n\t\tb2Body* bA = fA->GetBody();\n\t\tb2Body* bB = fB->GetBody();\n\n\t\tint32 indexA = c->GetChildIndexA();\n\t\tint32 indexB = c->GetChildIndexB();\n\n\t\tb2DistanceInput input;\n\t\tinput.proxyA.Set(fA->GetShape(), indexA);\n\t\tinput.proxyB.Set(fB->GetShape(), indexB);\n\t\tinput.transformA = bA->GetTransform();\n\t\tinput.transformB = bB->GetTransform();\n\t\tinput.useRadii = false;\n\n\t\tb2DistanceOutput output;\n\t\tb2SimplexCache cache;\n\t\tcache.count = 0;\n\t\tb2Distance(&output, &cache, &input);\n\n\t\tif (output.distance == 0 || cache.count == 3)\n\t\t{\n\t\t\tcache.count += 0;\n\t\t}\n\t}\n#endif\n\n\t// Leap of faith to new safe state.\n\tm_bodies[toiIndexA]->m_sweep.c0 = m_positions[toiIndexA].c;\n\tm_bodies[toiIndexA]->m_sweep.a0 = m_positions[toiIndexA].a;\n\tm_bodies[toiIndexB]->m_sweep.c0 = m_positions[toiIndexB].c;\n\tm_bodies[toiIndexB]->m_sweep.a0 = m_positions[toiIndexB].a;\n\n\t// No warm starting is needed for TOI events because warm\n\t// starting impulses were applied in the discrete solver.\n\tcontactSolver.InitializeVelocityConstraints();\n\n\t// Solve velocity constraints.\n\tfor (int32 i = 0; i < subStep.velocityIterations; ++i)\n\t{\n\t\tcontactSolver.SolveVelocityConstraints();\n\t}\n\n\t// Don't store the TOI contact forces for warm starting\n\t// because they can be quite large.\n\n\tfloat32 h = subStep.dt;\n\n\t// Integrate positions\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\n\t{\n\t\tb2Vec2 c = m_positions[i].c;\n\t\tfloat32 a = m_positions[i].a;\n\t\tb2Vec2 v = m_velocities[i].v;\n\t\tfloat32 w = m_velocities[i].w;\n\n\t\t// Check for large velocities\n\t\tb2Vec2 translation = h * v;\n\t\tif (b2Dot(translation, translation) > b2_maxTranslationSquared)\n\t\t{\n\t\t\tfloat32 ratio = b2_maxTranslation / translation.Length();\n\t\t\tv *= ratio;\n\t\t}\n\n\t\tfloat32 rotation = h * w;\n\t\tif (rotation * rotation > b2_maxRotationSquared)\n\t\t{\n\t\t\tfloat32 ratio = b2_maxRotation / b2Abs(rotation);\n\t\t\tw *= ratio;\n\t\t}\n\n\t\t// Integrate\n\t\tc += h * v;\n\t\ta += h * w;\n\n\t\tm_positions[i].c = c;\n\t\tm_positions[i].a = a;\n\t\tm_velocities[i].v = v;\n\t\tm_velocities[i].w = w;\n\n\t\t// Sync bodies\n\t\tb2Body* body = m_bodies[i];\n\t\tbody->m_sweep.c = c;\n\t\tbody->m_sweep.a = a;\n\t\tbody->m_linearVelocity = v;\n\t\tbody->m_angularVelocity = w;\n\t\tbody->SynchronizeTransform();\n\t}\n\n\tReport(contactSolver.m_velocityConstraints);\n}\n\nvoid b2Island::Report(const b2ContactVelocityConstraint* constraints)\n{\n\tif (m_listener == NULL)\n\t{\n\t\treturn;\n\t}\n\n\tfor (int32 i = 0; i < m_contactCount; ++i)\n\t{\n\t\tb2Contact* c = m_contacts[i];\n\n\t\tconst b2ContactVelocityConstraint* vc = constraints + i;\n\t\t\n\t\tb2ContactImpulse impulse;\n\t\timpulse.count = vc->pointCount;\n\t\tfor (int32 j = 0; j < vc->pointCount; ++j)\n\t\t{\n\t\t\timpulse.normalImpulses[j] = vc->points[j].normalImpulse;\n\t\t\timpulse.tangentImpulses[j] = vc->points[j].tangentImpulse;\n\t\t}\n\n\t\tm_listener->PostSolve(c, &impulse);\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2Island.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_ISLAND_H\n#define B2_ISLAND_H\n\n#include <Box2D/Common/b2Math.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\nclass b2Contact;\nclass b2Joint;\nclass b2StackAllocator;\nclass b2ContactListener;\nstruct b2ContactVelocityConstraint;\nstruct b2Profile;\n\n/// This is an internal class.\nclass b2Island\n{\npublic:\n\tb2Island(int32 bodyCapacity, int32 contactCapacity, int32 jointCapacity,\n\t\t\tb2StackAllocator* allocator, b2ContactListener* listener);\n\t~b2Island();\n\n\tvoid Clear()\n\t{\n\t\tm_bodyCount = 0;\n\t\tm_contactCount = 0;\n\t\tm_jointCount = 0;\n\t}\n\n\tvoid Solve(b2Profile* profile, const b2TimeStep& step, const b2Vec2& gravity, bool allowSleep);\n\n\tvoid SolveTOI(const b2TimeStep& subStep, int32 toiIndexA, int32 toiIndexB);\n\n\tvoid Add(b2Body* body)\n\t{\n\t\tb2Assert(m_bodyCount < m_bodyCapacity);\n\t\tbody->m_islandIndex = m_bodyCount;\n\t\tm_bodies[m_bodyCount] = body;\n\t\t++m_bodyCount;\n\t}\n\n\tvoid Add(b2Contact* contact)\n\t{\n\t\tb2Assert(m_contactCount < m_contactCapacity);\n\t\tm_contacts[m_contactCount++] = contact;\n\t}\n\n\tvoid Add(b2Joint* joint)\n\t{\n\t\tb2Assert(m_jointCount < m_jointCapacity);\n\t\tm_joints[m_jointCount++] = joint;\n\t}\n\n\tvoid Report(const b2ContactVelocityConstraint* constraints);\n\n\tb2StackAllocator* m_allocator;\n\tb2ContactListener* m_listener;\n\n\tb2Body** m_bodies;\n\tb2Contact** m_contacts;\n\tb2Joint** m_joints;\n\n\tb2Position* m_positions;\n\tb2Velocity* m_velocities;\n\n\tint32 m_bodyCount;\n\tint32 m_jointCount;\n\tint32 m_contactCount;\n\n\tint32 m_bodyCapacity;\n\tint32 m_contactCapacity;\n\tint32 m_jointCapacity;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2TimeStep.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_TIME_STEP_H\n#define B2_TIME_STEP_H\n\n#include <Box2D/Common/b2Math.h>\n\n/// Profiling data. Times are in milliseconds.\nstruct b2Profile\n{\n\tfloat32 step;\n\tfloat32 collide;\n\tfloat32 solve;\n\tfloat32 solveInit;\n\tfloat32 solveVelocity;\n\tfloat32 solvePosition;\n\tfloat32 broadphase;\n\tfloat32 solveTOI;\n};\n\n/// This is an internal structure.\nstruct b2TimeStep\n{\n\tfloat32 dt;\t\t\t// time step\n\tfloat32 inv_dt;\t\t// inverse time step (0 if dt == 0).\n\tfloat32 dtRatio;\t// dt * inv_dt0\n\tint32 velocityIterations;\n\tint32 positionIterations;\n\tbool warmStarting;\n};\n\n/// This is an internal structure.\nstruct b2Position\n{\n\tb2Vec2 c;\n\tfloat32 a;\n};\n\n/// This is an internal structure.\nstruct b2Velocity\n{\n\tb2Vec2 v;\n\tfloat32 w;\n};\n\n/// Solver Data\nstruct b2SolverData\n{\n\tb2TimeStep step;\n\tb2Position* positions;\n\tb2Velocity* velocities;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2World.cpp",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/b2World.h>\n#include <Box2D/Dynamics/b2Body.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n#include <Box2D/Dynamics/b2Island.h>\n#include <Box2D/Dynamics/Joints/b2PulleyJoint.h>\n#include <Box2D/Dynamics/Contacts/b2Contact.h>\n#include <Box2D/Dynamics/Contacts/b2ContactSolver.h>\n#include <Box2D/Collision/b2Collision.h>\n#include <Box2D/Collision/b2BroadPhase.h>\n#include <Box2D/Collision/Shapes/b2CircleShape.h>\n#include <Box2D/Collision/Shapes/b2EdgeShape.h>\n#include <Box2D/Collision/Shapes/b2ChainShape.h>\n#include <Box2D/Collision/Shapes/b2PolygonShape.h>\n#include <Box2D/Collision/b2TimeOfImpact.h>\n#include <Box2D/Common/b2Draw.h>\n#include <Box2D/Common/b2Timer.h>\n#include <new>\n\nb2World::b2World(const b2Vec2& gravity)\n{\n\tm_destructionListener = NULL;\n\tm_debugDraw = NULL;\n\n\tm_bodyList = NULL;\n\tm_jointList = NULL;\n\n\tm_bodyCount = 0;\n\tm_jointCount = 0;\n\n\tm_warmStarting = true;\n\tm_continuousPhysics = true;\n\tm_subStepping = false;\n\n\tm_stepComplete = true;\n\n\tm_allowSleep = true;\n\tm_gravity = gravity;\n\n\tm_flags = e_clearForces;\n\n\tm_inv_dt0 = 0.0f;\n\n\tm_contactManager.m_allocator = &m_blockAllocator;\n\n\tmemset(&m_profile, 0, sizeof(b2Profile));\n}\n\nb2World::~b2World()\n{\n\t// Some shapes allocate using b2Alloc.\n\tb2Body* b = m_bodyList;\n\twhile (b)\n\t{\n\t\tb2Body* bNext = b->m_next;\n\n\t\tb2Fixture* f = b->m_fixtureList;\n\t\twhile (f)\n\t\t{\n\t\t\tb2Fixture* fNext = f->m_next;\n\t\t\tf->m_proxyCount = 0;\n\t\t\tf->Destroy(&m_blockAllocator);\n\t\t\tf = fNext;\n\t\t}\n\n\t\tb = bNext;\n\t}\n}\n\nvoid b2World::SetDestructionListener(b2DestructionListener* listener)\n{\n\tm_destructionListener = listener;\n}\n\nvoid b2World::SetContactFilter(b2ContactFilter* filter)\n{\n\tm_contactManager.m_contactFilter = filter;\n}\n\nvoid b2World::SetContactListener(b2ContactListener* listener)\n{\n\tm_contactManager.m_contactListener = listener;\n}\n\nvoid b2World::SetDebugDraw(b2Draw* debugDraw)\n{\n\tm_debugDraw = debugDraw;\n}\n\nb2Body* b2World::CreateBody(const b2BodyDef* def)\n{\n\tb2Assert(IsLocked() == false);\n\tif (IsLocked())\n\t{\n\t\treturn NULL;\n\t}\n\n\tvoid* mem = m_blockAllocator.Allocate(sizeof(b2Body));\n\tb2Body* b = new (mem) b2Body(def, this);\n\n\t// Add to world doubly linked list.\n\tb->m_prev = NULL;\n\tb->m_next = m_bodyList;\n\tif (m_bodyList)\n\t{\n\t\tm_bodyList->m_prev = b;\n\t}\n\tm_bodyList = b;\n\t++m_bodyCount;\n\n\treturn b;\n}\n\nvoid b2World::DestroyBody(b2Body* b)\n{\n\tb2Assert(m_bodyCount > 0);\n\tb2Assert(IsLocked() == false);\n\tif (IsLocked())\n\t{\n\t\treturn;\n\t}\n\n\t// Delete the attached joints.\n\tb2JointEdge* je = b->m_jointList;\n\twhile (je)\n\t{\n\t\tb2JointEdge* je0 = je;\n\t\tje = je->next;\n\n\t\tif (m_destructionListener)\n\t\t{\n\t\t\tm_destructionListener->SayGoodbye(je0->joint);\n\t\t}\n\n\t\tDestroyJoint(je0->joint);\n\n\t\tb->m_jointList = je;\n\t}\n\tb->m_jointList = NULL;\n\n\t// Delete the attached contacts.\n\tb2ContactEdge* ce = b->m_contactList;\n\twhile (ce)\n\t{\n\t\tb2ContactEdge* ce0 = ce;\n\t\tce = ce->next;\n\t\tm_contactManager.Destroy(ce0->contact);\n\t}\n\tb->m_contactList = NULL;\n\n\t// Delete the attached fixtures. This destroys broad-phase proxies.\n\tb2Fixture* f = b->m_fixtureList;\n\twhile (f)\n\t{\n\t\tb2Fixture* f0 = f;\n\t\tf = f->m_next;\n\n\t\tif (m_destructionListener)\n\t\t{\n\t\t\tm_destructionListener->SayGoodbye(f0);\n\t\t}\n\n\t\tf0->DestroyProxies(&m_contactManager.m_broadPhase);\n\t\tf0->Destroy(&m_blockAllocator);\n\t\tf0->~b2Fixture();\n\t\tm_blockAllocator.Free(f0, sizeof(b2Fixture));\n\n\t\tb->m_fixtureList = f;\n\t\tb->m_fixtureCount -= 1;\n\t}\n\tb->m_fixtureList = NULL;\n\tb->m_fixtureCount = 0;\n\n\t// Remove world body list.\n\tif (b->m_prev)\n\t{\n\t\tb->m_prev->m_next = b->m_next;\n\t}\n\n\tif (b->m_next)\n\t{\n\t\tb->m_next->m_prev = b->m_prev;\n\t}\n\n\tif (b == m_bodyList)\n\t{\n\t\tm_bodyList = b->m_next;\n\t}\n\n\t--m_bodyCount;\n\tb->~b2Body();\n\tm_blockAllocator.Free(b, sizeof(b2Body));\n}\n\nb2Joint* b2World::CreateJoint(const b2JointDef* def)\n{\n\tb2Assert(IsLocked() == false);\n\tif (IsLocked())\n\t{\n\t\treturn NULL;\n\t}\n\n\tb2Joint* j = b2Joint::Create(def, &m_blockAllocator);\n\n\t// Connect to the world list.\n\tj->m_prev = NULL;\n\tj->m_next = m_jointList;\n\tif (m_jointList)\n\t{\n\t\tm_jointList->m_prev = j;\n\t}\n\tm_jointList = j;\n\t++m_jointCount;\n\n\t// Connect to the bodies' doubly linked lists.\n\tj->m_edgeA.joint = j;\n\tj->m_edgeA.other = j->m_bodyB;\n\tj->m_edgeA.prev = NULL;\n\tj->m_edgeA.next = j->m_bodyA->m_jointList;\n\tif (j->m_bodyA->m_jointList) j->m_bodyA->m_jointList->prev = &j->m_edgeA;\n\tj->m_bodyA->m_jointList = &j->m_edgeA;\n\n\tj->m_edgeB.joint = j;\n\tj->m_edgeB.other = j->m_bodyA;\n\tj->m_edgeB.prev = NULL;\n\tj->m_edgeB.next = j->m_bodyB->m_jointList;\n\tif (j->m_bodyB->m_jointList) j->m_bodyB->m_jointList->prev = &j->m_edgeB;\n\tj->m_bodyB->m_jointList = &j->m_edgeB;\n\n\tb2Body* bodyA = def->bodyA;\n\tb2Body* bodyB = def->bodyB;\n\n\t// If the joint prevents collisions, then flag any contacts for filtering.\n\tif (def->collideConnected == false)\n\t{\n\t\tb2ContactEdge* edge = bodyB->GetContactList();\n\t\twhile (edge)\n\t\t{\n\t\t\tif (edge->other == bodyA)\n\t\t\t{\n\t\t\t\t// Flag the contact for filtering at the next time step (where either\n\t\t\t\t// body is awake).\n\t\t\t\tedge->contact->FlagForFiltering();\n\t\t\t}\n\n\t\t\tedge = edge->next;\n\t\t}\n\t}\n\n\t// Note: creating a joint doesn't wake the bodies.\n\n\treturn j;\n}\n\nvoid b2World::DestroyJoint(b2Joint* j)\n{\n\tb2Assert(IsLocked() == false);\n\tif (IsLocked())\n\t{\n\t\treturn;\n\t}\n\n\tbool collideConnected = j->m_collideConnected;\n\n\t// Remove from the doubly linked list.\n\tif (j->m_prev)\n\t{\n\t\tj->m_prev->m_next = j->m_next;\n\t}\n\n\tif (j->m_next)\n\t{\n\t\tj->m_next->m_prev = j->m_prev;\n\t}\n\n\tif (j == m_jointList)\n\t{\n\t\tm_jointList = j->m_next;\n\t}\n\n\t// Disconnect from island graph.\n\tb2Body* bodyA = j->m_bodyA;\n\tb2Body* bodyB = j->m_bodyB;\n\n\t// Wake up connected bodies.\n\tbodyA->SetAwake(true);\n\tbodyB->SetAwake(true);\n\n\t// Remove from body 1.\n\tif (j->m_edgeA.prev)\n\t{\n\t\tj->m_edgeA.prev->next = j->m_edgeA.next;\n\t}\n\n\tif (j->m_edgeA.next)\n\t{\n\t\tj->m_edgeA.next->prev = j->m_edgeA.prev;\n\t}\n\n\tif (&j->m_edgeA == bodyA->m_jointList)\n\t{\n\t\tbodyA->m_jointList = j->m_edgeA.next;\n\t}\n\n\tj->m_edgeA.prev = NULL;\n\tj->m_edgeA.next = NULL;\n\n\t// Remove from body 2\n\tif (j->m_edgeB.prev)\n\t{\n\t\tj->m_edgeB.prev->next = j->m_edgeB.next;\n\t}\n\n\tif (j->m_edgeB.next)\n\t{\n\t\tj->m_edgeB.next->prev = j->m_edgeB.prev;\n\t}\n\n\tif (&j->m_edgeB == bodyB->m_jointList)\n\t{\n\t\tbodyB->m_jointList = j->m_edgeB.next;\n\t}\n\n\tj->m_edgeB.prev = NULL;\n\tj->m_edgeB.next = NULL;\n\n\tb2Joint::Destroy(j, &m_blockAllocator);\n\n\tb2Assert(m_jointCount > 0);\n\t--m_jointCount;\n\n\t// If the joint prevents collisions, then flag any contacts for filtering.\n\tif (collideConnected == false)\n\t{\n\t\tb2ContactEdge* edge = bodyB->GetContactList();\n\t\twhile (edge)\n\t\t{\n\t\t\tif (edge->other == bodyA)\n\t\t\t{\n\t\t\t\t// Flag the contact for filtering at the next time step (where either\n\t\t\t\t// body is awake).\n\t\t\t\tedge->contact->FlagForFiltering();\n\t\t\t}\n\n\t\t\tedge = edge->next;\n\t\t}\n\t}\n}\n\n//\nvoid b2World::SetAllowSleeping(bool flag)\n{\n\tif (flag == m_allowSleep)\n\t{\n\t\treturn;\n\t}\n\n\tm_allowSleep = flag;\n\tif (m_allowSleep == false)\n\t{\n\t\tfor (b2Body* b = m_bodyList; b; b = b->m_next)\n\t\t{\n\t\t\tb->SetAwake(true);\n\t\t}\n\t}\n}\n\n// Find islands, integrate and solve constraints, solve position constraints\nvoid b2World::Solve(const b2TimeStep& step)\n{\n\tm_profile.solveInit = 0.0f;\n\tm_profile.solveVelocity = 0.0f;\n\tm_profile.solvePosition = 0.0f;\n\n\t// Size the island for the worst case.\n\tb2Island island(m_bodyCount,\n\t\t\t\t\tm_contactManager.m_contactCount,\n\t\t\t\t\tm_jointCount,\n\t\t\t\t\t&m_stackAllocator,\n\t\t\t\t\tm_contactManager.m_contactListener);\n\n\t// Clear all the island flags.\n\tfor (b2Body* b = m_bodyList; b; b = b->m_next)\n\t{\n\t\tb->m_flags &= ~b2Body::e_islandFlag;\n\t}\n\tfor (b2Contact* c = m_contactManager.m_contactList; c; c = c->m_next)\n\t{\n\t\tc->m_flags &= ~b2Contact::e_islandFlag;\n\t}\n\tfor (b2Joint* j = m_jointList; j; j = j->m_next)\n\t{\n\t\tj->m_islandFlag = false;\n\t}\n\n\t// Build and simulate all awake islands.\n\tint32 stackSize = m_bodyCount;\n\tb2Body** stack = (b2Body**)m_stackAllocator.Allocate(stackSize * sizeof(b2Body*));\n\tfor (b2Body* seed = m_bodyList; seed; seed = seed->m_next)\n\t{\n\t\tif (seed->m_flags & b2Body::e_islandFlag)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (seed->IsAwake() == false || seed->IsActive() == false)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\t// The seed can be dynamic or kinematic.\n\t\tif (seed->GetType() == b2_staticBody)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Reset island and stack.\n\t\tisland.Clear();\n\t\tint32 stackCount = 0;\n\t\tstack[stackCount++] = seed;\n\t\tseed->m_flags |= b2Body::e_islandFlag;\n\n\t\t// Perform a depth first search (DFS) on the constraint graph.\n\t\twhile (stackCount > 0)\n\t\t{\n\t\t\t// Grab the next body off the stack and add it to the island.\n\t\t\tb2Body* b = stack[--stackCount];\n\t\t\tb2Assert(b->IsActive() == true);\n\t\t\tisland.Add(b);\n\n\t\t\t// Make sure the body is awake.\n\t\t\tb->SetAwake(true);\n\n\t\t\t// To keep islands as small as possible, we don't\n\t\t\t// propagate islands across static bodies.\n\t\t\tif (b->GetType() == b2_staticBody)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Search all contacts connected to this body.\n\t\t\tfor (b2ContactEdge* ce = b->m_contactList; ce; ce = ce->next)\n\t\t\t{\n\t\t\t\tb2Contact* contact = ce->contact;\n\n\t\t\t\t// Has this contact already been added to an island?\n\t\t\t\tif (contact->m_flags & b2Contact::e_islandFlag)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Is this contact solid and touching?\n\t\t\t\tif (contact->IsEnabled() == false ||\n\t\t\t\t\tcontact->IsTouching() == false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Skip sensors.\n\t\t\t\tbool sensorA = contact->m_fixtureA->m_isSensor;\n\t\t\t\tbool sensorB = contact->m_fixtureB->m_isSensor;\n\t\t\t\tif (sensorA || sensorB)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tisland.Add(contact);\n\t\t\t\tcontact->m_flags |= b2Contact::e_islandFlag;\n\n\t\t\t\tb2Body* other = ce->other;\n\n\t\t\t\t// Was the other body already added to this island?\n\t\t\t\tif (other->m_flags & b2Body::e_islandFlag)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tb2Assert(stackCount < stackSize);\n\t\t\t\tstack[stackCount++] = other;\n\t\t\t\tother->m_flags |= b2Body::e_islandFlag;\n\t\t\t}\n\n\t\t\t// Search all joints connect to this body.\n\t\t\tfor (b2JointEdge* je = b->m_jointList; je; je = je->next)\n\t\t\t{\n\t\t\t\tif (je->joint->m_islandFlag == true)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tb2Body* other = je->other;\n\n\t\t\t\t// Don't simulate joints connected to inactive bodies.\n\t\t\t\tif (other->IsActive() == false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tisland.Add(je->joint);\n\t\t\t\tje->joint->m_islandFlag = true;\n\n\t\t\t\tif (other->m_flags & b2Body::e_islandFlag)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tb2Assert(stackCount < stackSize);\n\t\t\t\tstack[stackCount++] = other;\n\t\t\t\tother->m_flags |= b2Body::e_islandFlag;\n\t\t\t}\n\t\t}\n\n\t\tb2Profile profile;\n\t\tisland.Solve(&profile, step, m_gravity, m_allowSleep);\n\t\tm_profile.solveInit += profile.solveInit;\n\t\tm_profile.solveVelocity += profile.solveVelocity;\n\t\tm_profile.solvePosition += profile.solvePosition;\n\n\t\t// Post solve cleanup.\n\t\tfor (int32 i = 0; i < island.m_bodyCount; ++i)\n\t\t{\n\t\t\t// Allow static bodies to participate in other islands.\n\t\t\tb2Body* b = island.m_bodies[i];\n\t\t\tif (b->GetType() == b2_staticBody)\n\t\t\t{\n\t\t\t\tb->m_flags &= ~b2Body::e_islandFlag;\n\t\t\t}\n\t\t}\n\t}\n\n\tm_stackAllocator.Free(stack);\n\n\t{\n\t\tb2Timer timer;\n\t\t// Synchronize fixtures, check for out of range bodies.\n\t\tfor (b2Body* b = m_bodyList; b; b = b->GetNext())\n\t\t{\n\t\t\t// If a body was not in an island then it did not move.\n\t\t\tif ((b->m_flags & b2Body::e_islandFlag) == 0)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (b->GetType() == b2_staticBody)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Update fixtures (for broad-phase).\n\t\t\tb->SynchronizeFixtures();\n\t\t}\n\n\t\t// Look for new contacts.\n\t\tm_contactManager.FindNewContacts();\n\t\tm_profile.broadphase = timer.GetMilliseconds();\n\t}\n}\n\n// Find TOI contacts and solve them.\nvoid b2World::SolveTOI(const b2TimeStep& step)\n{\n\tb2Island island(2 * b2_maxTOIContacts, b2_maxTOIContacts, 0, &m_stackAllocator, m_contactManager.m_contactListener);\n\n\tif (m_stepComplete)\n\t{\n\t\tfor (b2Body* b = m_bodyList; b; b = b->m_next)\n\t\t{\n\t\t\tb->m_flags &= ~b2Body::e_islandFlag;\n\t\t\tb->m_sweep.alpha0 = 0.0f;\n\t\t}\n\n\t\tfor (b2Contact* c = m_contactManager.m_contactList; c; c = c->m_next)\n\t\t{\n\t\t\t// Invalidate TOI\n\t\t\tc->m_flags &= ~(b2Contact::e_toiFlag | b2Contact::e_islandFlag);\n\t\t\tc->m_toiCount = 0;\n\t\t\tc->m_toi = 1.0f;\n\t\t}\n\t}\n\n\t// Find TOI events and solve them.\n\tfor (;;)\n\t{\n\t\t// Find the first TOI.\n\t\tb2Contact* minContact = NULL;\n\t\tfloat32 minAlpha = 1.0f;\n\n\t\tfor (b2Contact* c = m_contactManager.m_contactList; c; c = c->m_next)\n\t\t{\n\t\t\t// Is this contact disabled?\n\t\t\tif (c->IsEnabled() == false)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Prevent excessive sub-stepping.\n\t\t\tif (c->m_toiCount > b2_maxSubSteps)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfloat32 alpha = 1.0f;\n\t\t\tif (c->m_flags & b2Contact::e_toiFlag)\n\t\t\t{\n\t\t\t\t// This contact has a valid cached TOI.\n\t\t\t\talpha = c->m_toi;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tb2Fixture* fA = c->GetFixtureA();\n\t\t\t\tb2Fixture* fB = c->GetFixtureB();\n\n\t\t\t\t// Is there a sensor?\n\t\t\t\tif (fA->IsSensor() || fB->IsSensor())\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tb2Body* bA = fA->GetBody();\n\t\t\t\tb2Body* bB = fB->GetBody();\n\n\t\t\t\tb2BodyType typeA = bA->m_type;\n\t\t\t\tb2BodyType typeB = bB->m_type;\n\t\t\t\tb2Assert(typeA == b2_dynamicBody || typeB == b2_dynamicBody);\n\n\t\t\t\tbool activeA = bA->IsAwake() && typeA != b2_staticBody;\n\t\t\t\tbool activeB = bB->IsAwake() && typeB != b2_staticBody;\n\n\t\t\t\t// Is at least one body active (awake and dynamic or kinematic)?\n\t\t\t\tif (activeA == false && activeB == false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tbool collideA = bA->IsBullet() || typeA != b2_dynamicBody;\n\t\t\t\tbool collideB = bB->IsBullet() || typeB != b2_dynamicBody;\n\n\t\t\t\t// Are these two non-bullet dynamic bodies?\n\t\t\t\tif (collideA == false && collideB == false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Compute the TOI for this contact.\n\t\t\t\t// Put the sweeps onto the same time interval.\n\t\t\t\tfloat32 alpha0 = bA->m_sweep.alpha0;\n\n\t\t\t\tif (bA->m_sweep.alpha0 < bB->m_sweep.alpha0)\n\t\t\t\t{\n\t\t\t\t\talpha0 = bB->m_sweep.alpha0;\n\t\t\t\t\tbA->m_sweep.Advance(alpha0);\n\t\t\t\t}\n\t\t\t\telse if (bB->m_sweep.alpha0 < bA->m_sweep.alpha0)\n\t\t\t\t{\n\t\t\t\t\talpha0 = bA->m_sweep.alpha0;\n\t\t\t\t\tbB->m_sweep.Advance(alpha0);\n\t\t\t\t}\n\n\t\t\t\tb2Assert(alpha0 < 1.0f);\n\n\t\t\t\tint32 indexA = c->GetChildIndexA();\n\t\t\t\tint32 indexB = c->GetChildIndexB();\n\n\t\t\t\t// Compute the time of impact in interval [0, minTOI]\n\t\t\t\tb2TOIInput input;\n\t\t\t\tinput.proxyA.Set(fA->GetShape(), indexA);\n\t\t\t\tinput.proxyB.Set(fB->GetShape(), indexB);\n\t\t\t\tinput.sweepA = bA->m_sweep;\n\t\t\t\tinput.sweepB = bB->m_sweep;\n\t\t\t\tinput.tMax = 1.0f;\n\n\t\t\t\tb2TOIOutput output;\n\t\t\t\tb2TimeOfImpact(&output, &input);\n\n\t\t\t\t// Beta is the fraction of the remaining portion of the .\n\t\t\t\tfloat32 beta = output.t;\n\t\t\t\tif (output.state == b2TOIOutput::e_touching)\n\t\t\t\t{\n\t\t\t\t\talpha = b2Min(alpha0 + (1.0f - alpha0) * beta, 1.0f);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\talpha = 1.0f;\n\t\t\t\t}\n\n\t\t\t\tc->m_toi = alpha;\n\t\t\t\tc->m_flags |= b2Contact::e_toiFlag;\n\t\t\t}\n\n\t\t\tif (alpha < minAlpha)\n\t\t\t{\n\t\t\t\t// This is the minimum TOI found so far.\n\t\t\t\tminContact = c;\n\t\t\t\tminAlpha = alpha;\n\t\t\t}\n\t\t}\n\n\t\tif (minContact == NULL || 1.0f - 10.0f * b2_epsilon < minAlpha)\n\t\t{\n\t\t\t// No more TOI events. Done!\n\t\t\tm_stepComplete = true;\n\t\t\tbreak;\n\t\t}\n\n\t\t// Advance the bodies to the TOI.\n\t\tb2Fixture* fA = minContact->GetFixtureA();\n\t\tb2Fixture* fB = minContact->GetFixtureB();\n\t\tb2Body* bA = fA->GetBody();\n\t\tb2Body* bB = fB->GetBody();\n\n\t\tb2Sweep backup1 = bA->m_sweep;\n\t\tb2Sweep backup2 = bB->m_sweep;\n\n\t\tbA->Advance(minAlpha);\n\t\tbB->Advance(minAlpha);\n\n\t\t// The TOI contact likely has some new contact points.\n\t\tminContact->Update(m_contactManager.m_contactListener);\n\t\tminContact->m_flags &= ~b2Contact::e_toiFlag;\n\t\t++minContact->m_toiCount;\n\n\t\t// Is the contact solid?\n\t\tif (minContact->IsEnabled() == false || minContact->IsTouching() == false)\n\t\t{\n\t\t\t// Restore the sweeps.\n\t\t\tminContact->SetEnabled(false);\n\t\t\tbA->m_sweep = backup1;\n\t\t\tbB->m_sweep = backup2;\n\t\t\tbA->SynchronizeTransform();\n\t\t\tbB->SynchronizeTransform();\n\t\t\tcontinue;\n\t\t}\n\n\t\tbA->SetAwake(true);\n\t\tbB->SetAwake(true);\n\n\t\t// Build the island\n\t\tisland.Clear();\n\t\tisland.Add(bA);\n\t\tisland.Add(bB);\n\t\tisland.Add(minContact);\n\n\t\tbA->m_flags |= b2Body::e_islandFlag;\n\t\tbB->m_flags |= b2Body::e_islandFlag;\n\t\tminContact->m_flags |= b2Contact::e_islandFlag;\n\n\t\t// Get contacts on bodyA and bodyB.\n\t\tb2Body* bodies[2] = {bA, bB};\n\t\tfor (int32 i = 0; i < 2; ++i)\n\t\t{\n\t\t\tb2Body* body = bodies[i];\n\t\t\tif (body->m_type == b2_dynamicBody)\n\t\t\t{\n\t\t\t\tfor (b2ContactEdge* ce = body->m_contactList; ce; ce = ce->next)\n\t\t\t\t{\n\t\t\t\t\tif (island.m_bodyCount == island.m_bodyCapacity)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (island.m_contactCount == island.m_contactCapacity)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tb2Contact* contact = ce->contact;\n\n\t\t\t\t\t// Has this contact already been added to the island?\n\t\t\t\t\tif (contact->m_flags & b2Contact::e_islandFlag)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only add static, kinematic, or bullet bodies.\n\t\t\t\t\tb2Body* other = ce->other;\n\t\t\t\t\tif (other->m_type == b2_dynamicBody &&\n\t\t\t\t\t\tbody->IsBullet() == false && other->IsBullet() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Skip sensors.\n\t\t\t\t\tbool sensorA = contact->m_fixtureA->m_isSensor;\n\t\t\t\t\tbool sensorB = contact->m_fixtureB->m_isSensor;\n\t\t\t\t\tif (sensorA || sensorB)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Tentatively advance the body to the TOI.\n\t\t\t\t\tb2Sweep backup = other->m_sweep;\n\t\t\t\t\tif ((other->m_flags & b2Body::e_islandFlag) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tother->Advance(minAlpha);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the contact points\n\t\t\t\t\tcontact->Update(m_contactManager.m_contactListener);\n\n\t\t\t\t\t// Was the contact disabled by the user?\n\t\t\t\t\tif (contact->IsEnabled() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tother->m_sweep = backup;\n\t\t\t\t\t\tother->SynchronizeTransform();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Are there contact points?\n\t\t\t\t\tif (contact->IsTouching() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tother->m_sweep = backup;\n\t\t\t\t\t\tother->SynchronizeTransform();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add the contact to the island\n\t\t\t\t\tcontact->m_flags |= b2Contact::e_islandFlag;\n\t\t\t\t\tisland.Add(contact);\n\n\t\t\t\t\t// Has the other body already been added to the island?\n\t\t\t\t\tif (other->m_flags & b2Body::e_islandFlag)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Add the other body to the island.\n\t\t\t\t\tother->m_flags |= b2Body::e_islandFlag;\n\n\t\t\t\t\tif (other->m_type != b2_staticBody)\n\t\t\t\t\t{\n\t\t\t\t\t\tother->SetAwake(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tisland.Add(other);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tb2TimeStep subStep;\n\t\tsubStep.dt = (1.0f - minAlpha) * step.dt;\n\t\tsubStep.inv_dt = 1.0f / subStep.dt;\n\t\tsubStep.dtRatio = 1.0f;\n\t\tsubStep.positionIterations = 20;\n\t\tsubStep.velocityIterations = step.velocityIterations;\n\t\tsubStep.warmStarting = false;\n\t\tisland.SolveTOI(subStep, bA->m_islandIndex, bB->m_islandIndex);\n\n\t\t// Reset island flags and synchronize broad-phase proxies.\n\t\tfor (int32 i = 0; i < island.m_bodyCount; ++i)\n\t\t{\n\t\t\tb2Body* body = island.m_bodies[i];\n\t\t\tbody->m_flags &= ~b2Body::e_islandFlag;\n\n\t\t\tif (body->m_type != b2_dynamicBody)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tbody->SynchronizeFixtures();\n\n\t\t\t// Invalidate all contact TOIs on this displaced body.\n\t\t\tfor (b2ContactEdge* ce = body->m_contactList; ce; ce = ce->next)\n\t\t\t{\n\t\t\t\tce->contact->m_flags &= ~(b2Contact::e_toiFlag | b2Contact::e_islandFlag);\n\t\t\t}\n\t\t}\n\n\t\t// Commit fixture proxy movements to the broad-phase so that new contacts are created.\n\t\t// Also, some contacts can be destroyed.\n\t\tm_contactManager.FindNewContacts();\n\n\t\tif (m_subStepping)\n\t\t{\n\t\t\tm_stepComplete = false;\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nvoid b2World::Step(float32 dt, int32 velocityIterations, int32 positionIterations)\n{\n\tb2Timer stepTimer;\n\n\t// If new fixtures were added, we need to find the new contacts.\n\tif (m_flags & e_newFixture)\n\t{\n\t\tm_contactManager.FindNewContacts();\n\t\tm_flags &= ~e_newFixture;\n\t}\n\n\tm_flags |= e_locked;\n\n\tb2TimeStep step;\n\tstep.dt = dt;\n\tstep.velocityIterations\t= velocityIterations;\n\tstep.positionIterations = positionIterations;\n\tif (dt > 0.0f)\n\t{\n\t\tstep.inv_dt = 1.0f / dt;\n\t}\n\telse\n\t{\n\t\tstep.inv_dt = 0.0f;\n\t}\n\n\tstep.dtRatio = m_inv_dt0 * dt;\n\n\tstep.warmStarting = m_warmStarting;\n\t\n\t// Update contacts. This is where some contacts are destroyed.\n\t{\n\t\tb2Timer timer;\n\t\tm_contactManager.Collide();\n\t\tm_profile.collide = timer.GetMilliseconds();\n\t}\n\n\t// Integrate velocities, solve velocity constraints, and integrate positions.\n\tif (m_stepComplete && step.dt > 0.0f)\n\t{\n\t\tb2Timer timer;\n\t\tSolve(step);\n\t\tm_profile.solve = timer.GetMilliseconds();\n\t}\n\n\t// Handle TOI events.\n\tif (m_continuousPhysics && step.dt > 0.0f)\n\t{\n\t\tb2Timer timer;\n\t\tSolveTOI(step);\n\t\tm_profile.solveTOI = timer.GetMilliseconds();\n\t}\n\n\tif (step.dt > 0.0f)\n\t{\n\t\tm_inv_dt0 = step.inv_dt;\n\t}\n\n\tif (m_flags & e_clearForces)\n\t{\n\t\tClearForces();\n\t}\n\n\tm_flags &= ~e_locked;\n\n\tm_profile.step = stepTimer.GetMilliseconds();\n}\n\nvoid b2World::ClearForces()\n{\n\tfor (b2Body* body = m_bodyList; body; body = body->GetNext())\n\t{\n\t\tbody->m_force.SetZero();\n\t\tbody->m_torque = 0.0f;\n\t}\n}\n\nstruct b2WorldQueryWrapper\n{\n\tbool QueryCallback(int32 proxyId)\n\t{\n\t\tb2FixtureProxy* proxy = (b2FixtureProxy*)broadPhase->GetUserData(proxyId);\n\t\treturn callback->ReportFixture(proxy->fixture);\n\t}\n\n\tconst b2BroadPhase* broadPhase;\n\tb2QueryCallback* callback;\n};\n\nvoid b2World::QueryAABB(b2QueryCallback* callback, const b2AABB& aabb) const\n{\n\tb2WorldQueryWrapper wrapper;\n\twrapper.broadPhase = &m_contactManager.m_broadPhase;\n\twrapper.callback = callback;\n\tm_contactManager.m_broadPhase.Query(&wrapper, aabb);\n}\n\nstruct b2WorldRayCastWrapper\n{\n\tfloat32 RayCastCallback(const b2RayCastInput& input, int32 proxyId)\n\t{\n\t\tvoid* userData = broadPhase->GetUserData(proxyId);\n\t\tb2FixtureProxy* proxy = (b2FixtureProxy*)userData;\n\t\tb2Fixture* fixture = proxy->fixture;\n\t\tint32 index = proxy->childIndex;\n\t\tb2RayCastOutput output;\n\t\tbool hit = fixture->RayCast(&output, input, index);\n\n\t\tif (hit)\n\t\t{\n\t\t\tfloat32 fraction = output.fraction;\n\t\t\tb2Vec2 point = (1.0f - fraction) * input.p1 + fraction * input.p2;\n\t\t\treturn callback->ReportFixture(fixture, point, output.normal, fraction);\n\t\t}\n\n\t\treturn input.maxFraction;\n\t}\n\n\tconst b2BroadPhase* broadPhase;\n\tb2RayCastCallback* callback;\n};\n\nvoid b2World::RayCast(b2RayCastCallback* callback, const b2Vec2& point1, const b2Vec2& point2) const\n{\n\tb2WorldRayCastWrapper wrapper;\n\twrapper.broadPhase = &m_contactManager.m_broadPhase;\n\twrapper.callback = callback;\n\tb2RayCastInput input;\n\tinput.maxFraction = 1.0f;\n\tinput.p1 = point1;\n\tinput.p2 = point2;\n\tm_contactManager.m_broadPhase.RayCast(&wrapper, input);\n}\n\nvoid b2World::DrawShape(b2Fixture* fixture, const b2Transform& xf, const b2Color& color)\n{\n\tswitch (fixture->GetType())\n\t{\n\tcase b2Shape::e_circle:\n\t\t{\n\t\t\tb2CircleShape* circle = (b2CircleShape*)fixture->GetShape();\n\n\t\t\tb2Vec2 center = b2Mul(xf, circle->m_p);\n\t\t\tfloat32 radius = circle->m_radius;\n\t\t\tb2Vec2 axis = b2Mul(xf.q, b2Vec2(1.0f, 0.0f));\n\n\t\t\tm_debugDraw->DrawSolidCircle(center, radius, axis, color);\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_edge:\n\t\t{\n\t\t\tb2EdgeShape* edge = (b2EdgeShape*)fixture->GetShape();\n\t\t\tb2Vec2 v1 = b2Mul(xf, edge->m_vertex1);\n\t\t\tb2Vec2 v2 = b2Mul(xf, edge->m_vertex2);\n\t\t\tm_debugDraw->DrawSegment(v1, v2, color);\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_chain:\n\t\t{\n\t\t\tb2ChainShape* chain = (b2ChainShape*)fixture->GetShape();\n\t\t\tint32 count = chain->m_count;\n\t\t\tconst b2Vec2* vertices = chain->m_vertices;\n\n\t\t\tb2Vec2 v1 = b2Mul(xf, vertices[0]);\n\t\t\tfor (int32 i = 1; i < count; ++i)\n\t\t\t{\n\t\t\t\tb2Vec2 v2 = b2Mul(xf, vertices[i]);\n\t\t\t\tm_debugDraw->DrawSegment(v1, v2, color);\n\t\t\t\tm_debugDraw->DrawCircle(v1, 0.05f, color);\n\t\t\t\tv1 = v2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\n\tcase b2Shape::e_polygon:\n\t\t{\n\t\t\tb2PolygonShape* poly = (b2PolygonShape*)fixture->GetShape();\n\t\t\tint32 vertexCount = poly->m_count;\n\t\t\tb2Assert(vertexCount <= b2_maxPolygonVertices);\n\t\t\tb2Vec2 vertices[b2_maxPolygonVertices];\n\n\t\t\tfor (int32 i = 0; i < vertexCount; ++i)\n\t\t\t{\n\t\t\t\tvertices[i] = b2Mul(xf, poly->m_vertices[i]);\n\t\t\t}\n\n\t\t\tm_debugDraw->DrawSolidPolygon(vertices, vertexCount, color);\n\t\t}\n\t\tbreak;\n            \n    default:\n        break;\n\t}\n}\n\nvoid b2World::DrawJoint(b2Joint* joint)\n{\n\tb2Body* bodyA = joint->GetBodyA();\n\tb2Body* bodyB = joint->GetBodyB();\n\tconst b2Transform& xf1 = bodyA->GetTransform();\n\tconst b2Transform& xf2 = bodyB->GetTransform();\n\tb2Vec2 x1 = xf1.p;\n\tb2Vec2 x2 = xf2.p;\n\tb2Vec2 p1 = joint->GetAnchorA();\n\tb2Vec2 p2 = joint->GetAnchorB();\n\n\tb2Color color(0.5f, 0.8f, 0.8f);\n\n\tswitch (joint->GetType())\n\t{\n\tcase e_distanceJoint:\n\t\tm_debugDraw->DrawSegment(p1, p2, color);\n\t\tbreak;\n\n\tcase e_pulleyJoint:\n\t\t{\n\t\t\tb2PulleyJoint* pulley = (b2PulleyJoint*)joint;\n\t\t\tb2Vec2 s1 = pulley->GetGroundAnchorA();\n\t\t\tb2Vec2 s2 = pulley->GetGroundAnchorB();\n\t\t\tm_debugDraw->DrawSegment(s1, p1, color);\n\t\t\tm_debugDraw->DrawSegment(s2, p2, color);\n\t\t\tm_debugDraw->DrawSegment(s1, s2, color);\n\t\t}\n\t\tbreak;\n\n\tcase e_mouseJoint:\n\t\t// don't draw this\n\t\tbreak;\n\n\tdefault:\n\t\tm_debugDraw->DrawSegment(x1, p1, color);\n\t\tm_debugDraw->DrawSegment(p1, p2, color);\n\t\tm_debugDraw->DrawSegment(x2, p2, color);\n\t}\n}\n\nvoid b2World::DrawDebugData()\n{\n\tif (m_debugDraw == NULL)\n\t{\n\t\treturn;\n\t}\n\n\tuint32 flags = m_debugDraw->GetFlags();\n\n\tif (flags & b2Draw::e_shapeBit)\n\t{\n\t\tfor (b2Body* b = m_bodyList; b; b = b->GetNext())\n\t\t{\n\t\t\tconst b2Transform& xf = b->GetTransform();\n\t\t\tfor (b2Fixture* f = b->GetFixtureList(); f; f = f->GetNext())\n\t\t\t{\n\t\t\t\tif (b->IsActive() == false)\n\t\t\t\t{\n\t\t\t\t\tDrawShape(f, xf, b2Color(0.5f, 0.5f, 0.3f));\n\t\t\t\t}\n\t\t\t\telse if (b->GetType() == b2_staticBody)\n\t\t\t\t{\n\t\t\t\t\tDrawShape(f, xf, b2Color(0.5f, 0.9f, 0.5f));\n\t\t\t\t}\n\t\t\t\telse if (b->GetType() == b2_kinematicBody)\n\t\t\t\t{\n\t\t\t\t\tDrawShape(f, xf, b2Color(0.5f, 0.5f, 0.9f));\n\t\t\t\t}\n\t\t\t\telse if (b->IsAwake() == false)\n\t\t\t\t{\n\t\t\t\t\tDrawShape(f, xf, b2Color(0.6f, 0.6f, 0.6f));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDrawShape(f, xf, b2Color(0.9f, 0.7f, 0.7f));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (flags & b2Draw::e_jointBit)\n\t{\n\t\tfor (b2Joint* j = m_jointList; j; j = j->GetNext())\n\t\t{\n\t\t\tDrawJoint(j);\n\t\t}\n\t}\n\n\tif (flags & b2Draw::e_pairBit)\n\t{\n\t\tb2Color color(0.3f, 0.9f, 0.9f);\n\t\tfor (b2Contact* c = m_contactManager.m_contactList; c; c = c->GetNext())\n\t\t{\n\t\t\t//b2Fixture* fixtureA = c->GetFixtureA();\n\t\t\t//b2Fixture* fixtureB = c->GetFixtureB();\n\n\t\t\t//b2Vec2 cA = fixtureA->GetAABB().GetCenter();\n\t\t\t//b2Vec2 cB = fixtureB->GetAABB().GetCenter();\n\n\t\t\t//m_debugDraw->DrawSegment(cA, cB, color);\n\t\t}\n\t}\n\n\tif (flags & b2Draw::e_aabbBit)\n\t{\n\t\tb2Color color(0.9f, 0.3f, 0.9f);\n\t\tb2BroadPhase* bp = &m_contactManager.m_broadPhase;\n\n\t\tfor (b2Body* b = m_bodyList; b; b = b->GetNext())\n\t\t{\n\t\t\tif (b->IsActive() == false)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (b2Fixture* f = b->GetFixtureList(); f; f = f->GetNext())\n\t\t\t{\n\t\t\t\tfor (int32 i = 0; i < f->m_proxyCount; ++i)\n\t\t\t\t{\n\t\t\t\t\tb2FixtureProxy* proxy = f->m_proxies + i;\n\t\t\t\t\tb2AABB aabb = bp->GetFatAABB(proxy->proxyId);\n\t\t\t\t\tb2Vec2 vs[4];\n\t\t\t\t\tvs[0].Set(aabb.lowerBound.x, aabb.lowerBound.y);\n\t\t\t\t\tvs[1].Set(aabb.upperBound.x, aabb.lowerBound.y);\n\t\t\t\t\tvs[2].Set(aabb.upperBound.x, aabb.upperBound.y);\n\t\t\t\t\tvs[3].Set(aabb.lowerBound.x, aabb.upperBound.y);\n\n\t\t\t\t\tm_debugDraw->DrawPolygon(vs, 4, color);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (flags & b2Draw::e_centerOfMassBit)\n\t{\n\t\tfor (b2Body* b = m_bodyList; b; b = b->GetNext())\n\t\t{\n\t\t\tb2Transform xf = b->GetTransform();\n\t\t\txf.p = b->GetWorldCenter();\n\t\t\tm_debugDraw->DrawTransform(xf);\n\t\t}\n\t}\n}\n\nint32 b2World::GetProxyCount() const\n{\n\treturn m_contactManager.m_broadPhase.GetProxyCount();\n}\n\nint32 b2World::GetTreeHeight() const\n{\n\treturn m_contactManager.m_broadPhase.GetTreeHeight();\n}\n\nint32 b2World::GetTreeBalance() const\n{\n\treturn m_contactManager.m_broadPhase.GetTreeBalance();\n}\n\nfloat32 b2World::GetTreeQuality() const\n{\n\treturn m_contactManager.m_broadPhase.GetTreeQuality();\n}\n\nvoid b2World::ShiftOrigin(const b2Vec2& newOrigin)\n{\n\tb2Assert((m_flags & e_locked) == 0);\n\tif ((m_flags & e_locked) == e_locked)\n\t{\n\t\treturn;\n\t}\n\n\tfor (b2Body* b = m_bodyList; b; b = b->m_next)\n\t{\n\t\tb->m_xf.p -= newOrigin;\n\t\tb->m_sweep.c0 -= newOrigin;\n\t\tb->m_sweep.c -= newOrigin;\n\t}\n\n\tfor (b2Joint* j = m_jointList; j; j = j->m_next)\n\t{\n\t\tj->ShiftOrigin(newOrigin);\n\t}\n\n\tm_contactManager.m_broadPhase.ShiftOrigin(newOrigin);\n}\n\nvoid b2World::Dump()\n{\n\tif ((m_flags & e_locked) == e_locked)\n\t{\n\t\treturn;\n\t}\n\n\tb2Log(\"b2Vec2 g(%.15lef, %.15lef);\\n\", m_gravity.x, m_gravity.y);\n\tb2Log(\"m_world->SetGravity(g);\\n\");\n\n\tb2Log(\"b2Body** bodies = (b2Body**)b2Alloc(%d * sizeof(b2Body*));\\n\", m_bodyCount);\n\tb2Log(\"b2Joint** joints = (b2Joint**)b2Alloc(%d * sizeof(b2Joint*));\\n\", m_jointCount);\n\tint32 i = 0;\n\tfor (b2Body* b = m_bodyList; b; b = b->m_next)\n\t{\n\t\tb->m_islandIndex = i;\n\t\tb->Dump();\n\t\t++i;\n\t}\n\n\ti = 0;\n\tfor (b2Joint* j = m_jointList; j; j = j->m_next)\n\t{\n\t\tj->m_index = i;\n\t\t++i;\n\t}\n\n\t// First pass on joints, skip gear joints.\n\tfor (b2Joint* j = m_jointList; j; j = j->m_next)\n\t{\n\t\tif (j->m_type == e_gearJoint)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tb2Log(\"{\\n\");\n\t\tj->Dump();\n\t\tb2Log(\"}\\n\");\n\t}\n\n\t// Second pass on joints, only gear joints.\n\tfor (b2Joint* j = m_jointList; j; j = j->m_next)\n\t{\n\t\tif (j->m_type != e_gearJoint)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tb2Log(\"{\\n\");\n\t\tj->Dump();\n\t\tb2Log(\"}\\n\");\n\t}\n\n\tb2Log(\"b2Free(joints);\\n\");\n\tb2Log(\"b2Free(bodies);\\n\");\n\tb2Log(\"joints = NULL;\\n\");\n\tb2Log(\"bodies = NULL;\\n\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2World.h",
    "content": "/*\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_WORLD_H\n#define B2_WORLD_H\n\n#include <Box2D/Common/b2Math.h>\n#include <Box2D/Common/b2BlockAllocator.h>\n#include <Box2D/Common/b2StackAllocator.h>\n#include <Box2D/Dynamics/b2ContactManager.h>\n#include <Box2D/Dynamics/b2WorldCallbacks.h>\n#include <Box2D/Dynamics/b2TimeStep.h>\n\nstruct b2AABB;\nstruct b2BodyDef;\nstruct b2Color;\nstruct b2JointDef;\nclass b2Body;\nclass b2Draw;\nclass b2Fixture;\nclass b2Joint;\n\n/// The world class manages all physics entities, dynamic simulation,\n/// and asynchronous queries. The world also contains efficient memory\n/// management facilities.\nclass b2World\n{\npublic:\n\t/// Construct a world object.\n\t/// @param gravity the world gravity vector.\n\tb2World(const b2Vec2& gravity);\n\n\t/// Destruct the world. All physics entities are destroyed and all heap memory is released.\n\t~b2World();\n\n\t/// Register a destruction listener. The listener is owned by you and must\n\t/// remain in scope.\n\tvoid SetDestructionListener(b2DestructionListener* listener);\n\n\t/// Register a contact filter to provide specific control over collision.\n\t/// Otherwise the default filter is used (b2_defaultFilter). The listener is\n\t/// owned by you and must remain in scope. \n\tvoid SetContactFilter(b2ContactFilter* filter);\n\n\t/// Register a contact event listener. The listener is owned by you and must\n\t/// remain in scope.\n\tvoid SetContactListener(b2ContactListener* listener);\n\n\t/// Register a routine for debug drawing. The debug draw functions are called\n\t/// inside with b2World::DrawDebugData method. The debug draw object is owned\n\t/// by you and must remain in scope.\n\tvoid SetDebugDraw(b2Draw* debugDraw);\n\n\t/// Create a rigid body given a definition. No reference to the definition\n\t/// is retained.\n\t/// @warning This function is locked during callbacks.\n\tb2Body* CreateBody(const b2BodyDef* def);\n\n\t/// Destroy a rigid body given a definition. No reference to the definition\n\t/// is retained. This function is locked during callbacks.\n\t/// @warning This automatically deletes all associated shapes and joints.\n\t/// @warning This function is locked during callbacks.\n\tvoid DestroyBody(b2Body* body);\n\n\t/// Create a joint to constrain bodies together. No reference to the definition\n\t/// is retained. This may cause the connected bodies to cease colliding.\n\t/// @warning This function is locked during callbacks.\n\tb2Joint* CreateJoint(const b2JointDef* def);\n\n\t/// Destroy a joint. This may cause the connected bodies to begin colliding.\n\t/// @warning This function is locked during callbacks.\n\tvoid DestroyJoint(b2Joint* joint);\n\n\t/// Take a time step. This performs collision detection, integration,\n\t/// and constraint solution.\n\t/// @param timeStep the amount of time to simulate, this should not vary.\n\t/// @param velocityIterations for the velocity constraint solver.\n\t/// @param positionIterations for the position constraint solver.\n\tvoid Step(\tfloat32 timeStep,\n\t\t\t\tint32 velocityIterations,\n\t\t\t\tint32 positionIterations);\n\n\t/// Manually clear the force buffer on all bodies. By default, forces are cleared automatically\n\t/// after each call to Step. The default behavior is modified by calling SetAutoClearForces.\n\t/// The purpose of this function is to support sub-stepping. Sub-stepping is often used to maintain\n\t/// a fixed sized time step under a variable frame-rate.\n\t/// When you perform sub-stepping you will disable auto clearing of forces and instead call\n\t/// ClearForces after all sub-steps are complete in one pass of your game loop.\n\t/// @see SetAutoClearForces\n\tvoid ClearForces();\n\n\t/// Call this to draw shapes and other debug draw data. This is intentionally non-const.\n\tvoid DrawDebugData();\n\n\t/// Query the world for all fixtures that potentially overlap the\n\t/// provided AABB.\n\t/// @param callback a user implemented callback class.\n\t/// @param aabb the query box.\n\tvoid QueryAABB(b2QueryCallback* callback, const b2AABB& aabb) const;\n\n\t/// Ray-cast the world for all fixtures in the path of the ray. Your callback\n\t/// controls whether you get the closest point, any point, or n-points.\n\t/// The ray-cast ignores shapes that contain the starting point.\n\t/// @param callback a user implemented callback class.\n\t/// @param point1 the ray starting point\n\t/// @param point2 the ray ending point\n\tvoid RayCast(b2RayCastCallback* callback, const b2Vec2& point1, const b2Vec2& point2) const;\n\n\t/// Get the world body list. With the returned body, use b2Body::GetNext to get\n\t/// the next body in the world list. A NULL body indicates the end of the list.\n\t/// @return the head of the world body list.\n\tb2Body* GetBodyList();\n\tconst b2Body* GetBodyList() const;\n\n\t/// Get the world joint list. With the returned joint, use b2Joint::GetNext to get\n\t/// the next joint in the world list. A NULL joint indicates the end of the list.\n\t/// @return the head of the world joint list.\n\tb2Joint* GetJointList();\n\tconst b2Joint* GetJointList() const;\n\n\t/// Get the world contact list. With the returned contact, use b2Contact::GetNext to get\n\t/// the next contact in the world list. A NULL contact indicates the end of the list.\n\t/// @return the head of the world contact list.\n\t/// @warning contacts are created and destroyed in the middle of a time step.\n\t/// Use b2ContactListener to avoid missing contacts.\n\tb2Contact* GetContactList();\n\tconst b2Contact* GetContactList() const;\n\n\t/// Enable/disable sleep.\n\tvoid SetAllowSleeping(bool flag);\n\tbool GetAllowSleeping() const { return m_allowSleep; }\n\n\t/// Enable/disable warm starting. For testing.\n\tvoid SetWarmStarting(bool flag) { m_warmStarting = flag; }\n\tbool GetWarmStarting() const { return m_warmStarting; }\n\n\t/// Enable/disable continuous physics. For testing.\n\tvoid SetContinuousPhysics(bool flag) { m_continuousPhysics = flag; }\n\tbool GetContinuousPhysics() const { return m_continuousPhysics; }\n\n\t/// Enable/disable single stepped continuous physics. For testing.\n\tvoid SetSubStepping(bool flag) { m_subStepping = flag; }\n\tbool GetSubStepping() const { return m_subStepping; }\n\n\t/// Get the number of broad-phase proxies.\n\tint32 GetProxyCount() const;\n\n\t/// Get the number of bodies.\n\tint32 GetBodyCount() const;\n\n\t/// Get the number of joints.\n\tint32 GetJointCount() const;\n\n\t/// Get the number of contacts (each may have 0 or more contact points).\n\tint32 GetContactCount() const;\n\n\t/// Get the height of the dynamic tree.\n\tint32 GetTreeHeight() const;\n\n\t/// Get the balance of the dynamic tree.\n\tint32 GetTreeBalance() const;\n\n\t/// Get the quality metric of the dynamic tree. The smaller the better.\n\t/// The minimum is 1.\n\tfloat32 GetTreeQuality() const;\n\n\t/// Change the global gravity vector.\n\tvoid SetGravity(const b2Vec2& gravity);\n\t\n\t/// Get the global gravity vector.\n\tb2Vec2 GetGravity() const;\n\n\t/// Is the world locked (in the middle of a time step).\n\tbool IsLocked() const;\n\n\t/// Set flag to control automatic clearing of forces after each time step.\n\tvoid SetAutoClearForces(bool flag);\n\n\t/// Get the flag that controls automatic clearing of forces after each time step.\n\tbool GetAutoClearForces() const;\n\n\t/// Shift the world origin. Useful for large worlds.\n\t/// The body shift formula is: position -= newOrigin\n\t/// @param newOrigin the new origin with respect to the old origin\n\tvoid ShiftOrigin(const b2Vec2& newOrigin);\n\n\t/// Get the contact manager for testing.\n\tconst b2ContactManager& GetContactManager() const;\n\n\t/// Get the current profile.\n\tconst b2Profile& GetProfile() const;\n\n\t/// Dump the world into the log file.\n\t/// @warning this should be called outside of a time step.\n\tvoid Dump();\n\nprivate:\n\n\t// m_flags\n\tenum\n\t{\n\t\te_newFixture\t= 0x0001,\n\t\te_locked\t\t= 0x0002,\n\t\te_clearForces\t= 0x0004\n\t};\n\n\tfriend class b2Body;\n\tfriend class b2Fixture;\n\tfriend class b2ContactManager;\n\tfriend class b2Controller;\n\n\tvoid Solve(const b2TimeStep& step);\n\tvoid SolveTOI(const b2TimeStep& step);\n\n\tvoid DrawJoint(b2Joint* joint);\n\tvoid DrawShape(b2Fixture* shape, const b2Transform& xf, const b2Color& color);\n\n\tb2BlockAllocator m_blockAllocator;\n\tb2StackAllocator m_stackAllocator;\n\n\tint32 m_flags;\n\n\tb2ContactManager m_contactManager;\n\n\tb2Body* m_bodyList;\n\tb2Joint* m_jointList;\n\n\tint32 m_bodyCount;\n\tint32 m_jointCount;\n\n\tb2Vec2 m_gravity;\n\tbool m_allowSleep;\n\n\tb2DestructionListener* m_destructionListener;\n\tb2Draw* m_debugDraw;\n\n\t// This is used to compute the time step ratio to\n\t// support a variable time step.\n\tfloat32 m_inv_dt0;\n\n\t// These are for debugging the solver.\n\tbool m_warmStarting;\n\tbool m_continuousPhysics;\n\tbool m_subStepping;\n\n\tbool m_stepComplete;\n\n\tb2Profile m_profile;\n};\n\ninline b2Body* b2World::GetBodyList()\n{\n\treturn m_bodyList;\n}\n\ninline const b2Body* b2World::GetBodyList() const\n{\n\treturn m_bodyList;\n}\n\ninline b2Joint* b2World::GetJointList()\n{\n\treturn m_jointList;\n}\n\ninline const b2Joint* b2World::GetJointList() const\n{\n\treturn m_jointList;\n}\n\ninline b2Contact* b2World::GetContactList()\n{\n\treturn m_contactManager.m_contactList;\n}\n\ninline const b2Contact* b2World::GetContactList() const\n{\n\treturn m_contactManager.m_contactList;\n}\n\ninline int32 b2World::GetBodyCount() const\n{\n\treturn m_bodyCount;\n}\n\ninline int32 b2World::GetJointCount() const\n{\n\treturn m_jointCount;\n}\n\ninline int32 b2World::GetContactCount() const\n{\n\treturn m_contactManager.m_contactCount;\n}\n\ninline void b2World::SetGravity(const b2Vec2& gravity)\n{\n\tm_gravity = gravity;\n}\n\ninline b2Vec2 b2World::GetGravity() const\n{\n\treturn m_gravity;\n}\n\ninline bool b2World::IsLocked() const\n{\n\treturn (m_flags & e_locked) == e_locked;\n}\n\ninline void b2World::SetAutoClearForces(bool flag)\n{\n\tif (flag)\n\t{\n\t\tm_flags |= e_clearForces;\n\t}\n\telse\n\t{\n\t\tm_flags &= ~e_clearForces;\n\t}\n}\n\n/// Get the flag that controls automatic clearing of forces after each time step.\ninline bool b2World::GetAutoClearForces() const\n{\n\treturn (m_flags & e_clearForces) == e_clearForces;\n}\n\ninline const b2ContactManager& b2World::GetContactManager() const\n{\n\treturn m_contactManager;\n}\n\ninline const b2Profile& b2World::GetProfile() const\n{\n\treturn m_profile;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2WorldCallbacks.cpp",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Dynamics/b2WorldCallbacks.h>\n#include <Box2D/Dynamics/b2Fixture.h>\n\n// Return true if contact calculations should be performed between these two shapes.\n// If you implement your own collision filter you may want to build from this implementation.\nbool b2ContactFilter::ShouldCollide(b2Fixture* fixtureA, b2Fixture* fixtureB)\n{\n\tconst b2Filter& filterA = fixtureA->GetFilterData();\n\tconst b2Filter& filterB = fixtureB->GetFilterData();\n\n\tif (filterA.groupIndex == filterB.groupIndex && filterA.groupIndex != 0)\n\t{\n\t\treturn filterA.groupIndex > 0;\n\t}\n\n\tbool collide = (filterA.maskBits & filterB.categoryBits) != 0 && (filterA.categoryBits & filterB.maskBits) != 0;\n\treturn collide;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Dynamics/b2WorldCallbacks.h",
    "content": "/*\n* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_WORLD_CALLBACKS_H\n#define B2_WORLD_CALLBACKS_H\n\n#include <Box2D/Common/b2Settings.h>\n\nstruct b2Vec2;\nstruct b2Transform;\nclass b2Fixture;\nclass b2Body;\nclass b2Joint;\nclass b2Contact;\nstruct b2ContactResult;\nstruct b2Manifold;\n\n/// Joints and fixtures are destroyed when their associated\n/// body is destroyed. Implement this listener so that you\n/// may nullify references to these joints and shapes.\nclass b2DestructionListener\n{\npublic:\n\tvirtual ~b2DestructionListener() {}\n\n\t/// Called when any joint is about to be destroyed due\n\t/// to the destruction of one of its attached bodies.\n\tvirtual void SayGoodbye(b2Joint* joint) = 0;\n\n\t/// Called when any fixture is about to be destroyed due\n\t/// to the destruction of its parent body.\n\tvirtual void SayGoodbye(b2Fixture* fixture) = 0;\n};\n\n/// Implement this class to provide collision filtering. In other words, you can implement\n/// this class if you want finer control over contact creation.\nclass b2ContactFilter\n{\npublic:\n\tvirtual ~b2ContactFilter() {}\n\n\t/// Return true if contact calculations should be performed between these two shapes.\n\t/// @warning for performance reasons this is only called when the AABBs begin to overlap.\n\tvirtual bool ShouldCollide(b2Fixture* fixtureA, b2Fixture* fixtureB);\n};\n\n/// Contact impulses for reporting. Impulses are used instead of forces because\n/// sub-step forces may approach infinity for rigid body collisions. These\n/// match up one-to-one with the contact points in b2Manifold.\nstruct b2ContactImpulse\n{\n\tfloat32 normalImpulses[b2_maxManifoldPoints];\n\tfloat32 tangentImpulses[b2_maxManifoldPoints];\n\tint32 count;\n};\n\n/// Implement this class to get contact information. You can use these results for\n/// things like sounds and game logic. You can also get contact results by\n/// traversing the contact lists after the time step. However, you might miss\n/// some contacts because continuous physics leads to sub-stepping.\n/// Additionally you may receive multiple callbacks for the same contact in a\n/// single time step.\n/// You should strive to make your callbacks efficient because there may be\n/// many callbacks per time step.\n/// @warning You cannot create/destroy Box2D entities inside these callbacks.\nclass b2ContactListener\n{\npublic:\n\tvirtual ~b2ContactListener() {}\n\n\t/// Called when two fixtures begin to touch.\n\tvirtual void BeginContact(b2Contact* contact) { B2_NOT_USED(contact); }\n\n\t/// Called when two fixtures cease to touch.\n\tvirtual void EndContact(b2Contact* contact) { B2_NOT_USED(contact); }\n\n\t/// This is called after a contact is updated. This allows you to inspect a\n\t/// contact before it goes to the solver. If you are careful, you can modify the\n\t/// contact manifold (e.g. disable contact).\n\t/// A copy of the old manifold is provided so that you can detect changes.\n\t/// Note: this is called only for awake bodies.\n\t/// Note: this is called even when the number of contact points is zero.\n\t/// Note: this is not called for sensors.\n\t/// Note: if you set the number of contact points to zero, you will not\n\t/// get an EndContact callback. However, you may get a BeginContact callback\n\t/// the next step.\n\tvirtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold)\n\t{\n\t\tB2_NOT_USED(contact);\n\t\tB2_NOT_USED(oldManifold);\n\t}\n\n\t/// This lets you inspect a contact after the solver is finished. This is useful\n\t/// for inspecting impulses.\n\t/// Note: the contact manifold does not include time of impact impulses, which can be\n\t/// arbitrarily large if the sub-step is small. Hence the impulse is provided explicitly\n\t/// in a separate data structure.\n\t/// Note: this is only called for contacts that are touching, solid, and awake.\n\tvirtual void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse)\n\t{\n\t\tB2_NOT_USED(contact);\n\t\tB2_NOT_USED(impulse);\n\t}\n};\n\n/// Callback class for AABB queries.\n/// See b2World::Query\nclass b2QueryCallback\n{\npublic:\n\tvirtual ~b2QueryCallback() {}\n\n\t/// Called for each fixture found in the query AABB.\n\t/// @return false to terminate the query.\n\tvirtual bool ReportFixture(b2Fixture* fixture) = 0;\n};\n\n/// Callback class for ray casts.\n/// See b2World::RayCast\nclass b2RayCastCallback\n{\npublic:\n\tvirtual ~b2RayCastCallback() {}\n\n\t/// Called for each fixture found in the query. You control how the ray cast\n\t/// proceeds by returning a float:\n\t/// return -1: ignore this fixture and continue\n\t/// return 0: terminate the ray cast\n\t/// return fraction: clip the ray to this point\n\t/// return 1: don't clip the ray and continue\n\t/// @param fixture the fixture hit by the ray\n\t/// @param point the point of initial intersection\n\t/// @param normal the normal vector at the point of intersection\n\t/// @return -1 to filter, 0 to terminate, fraction to clip the ray for\n\t/// closest hit, 1 to continue\n\tvirtual float32 ReportFixture(\tb2Fixture* fixture, const b2Vec2& point,\n\t\t\t\t\t\t\t\t\tconst b2Vec2& normal, float32 fraction) = 0;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Rope/b2Rope.cpp",
    "content": "/*\n* Copyright (c) 2011 Erin Catto http://box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#include <Box2D/Rope/b2Rope.h>\n#include <Box2D/Common/b2Draw.h>\n\nb2Rope::b2Rope()\n{\n\tm_count = 0;\n\tm_ps = NULL;\n\tm_p0s = NULL;\n\tm_vs = NULL;\n\tm_ims = NULL;\n\tm_Ls = NULL;\n\tm_as = NULL;\n\tm_gravity.SetZero();\n\tm_k2 = 1.0f;\n\tm_k3 = 0.1f;\n}\n\nb2Rope::~b2Rope()\n{\n\tb2Free(m_ps);\n\tb2Free(m_p0s);\n\tb2Free(m_vs);\n\tb2Free(m_ims);\n\tb2Free(m_Ls);\n\tb2Free(m_as);\n}\n\nvoid b2Rope::Initialize(const b2RopeDef* def)\n{\n\tb2Assert(def->count >= 3);\n\tm_count = def->count;\n\tm_ps = (b2Vec2*)b2Alloc(m_count * sizeof(b2Vec2));\n\tm_p0s = (b2Vec2*)b2Alloc(m_count * sizeof(b2Vec2));\n\tm_vs = (b2Vec2*)b2Alloc(m_count * sizeof(b2Vec2));\n\tm_ims = (float32*)b2Alloc(m_count * sizeof(float32));\n\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tm_ps[i] = def->vertices[i];\n\t\tm_p0s[i] = def->vertices[i];\n\t\tm_vs[i].SetZero();\n\n\t\tfloat32 m = def->masses[i];\n\t\tif (m > 0.0f)\n\t\t{\n\t\t\tm_ims[i] = 1.0f / m;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_ims[i] = 0.0f;\n\t\t}\n\t}\n\n\tint32 count2 = m_count - 1;\n\tint32 count3 = m_count - 2;\n\tm_Ls = (float32*)b2Alloc(count2 * sizeof(float32));\n\tm_as = (float32*)b2Alloc(count3 * sizeof(float32));\n\n\tfor (int32 i = 0; i < count2; ++i)\n\t{\n\t\tb2Vec2 p1 = m_ps[i];\n\t\tb2Vec2 p2 = m_ps[i+1];\n\t\tm_Ls[i] = b2Distance(p1, p2);\n\t}\n\n\tfor (int32 i = 0; i < count3; ++i)\n\t{\n\t\tb2Vec2 p1 = m_ps[i];\n\t\tb2Vec2 p2 = m_ps[i + 1];\n\t\tb2Vec2 p3 = m_ps[i + 2];\n\n\t\tb2Vec2 d1 = p2 - p1;\n\t\tb2Vec2 d2 = p3 - p2;\n\n\t\tfloat32 a = b2Cross(d1, d2);\n\t\tfloat32 b = b2Dot(d1, d2);\n\n\t\tm_as[i] = b2Atan2(a, b);\n\t}\n\n\tm_gravity = def->gravity;\n\tm_damping = def->damping;\n\tm_k2 = def->k2;\n\tm_k3 = def->k3;\n}\n\nvoid b2Rope::Step(float32 h, int32 iterations)\n{\n\tif (h == 0.0)\n\t{\n\t\treturn;\n\t}\n\n\tfloat32 d = exp(- h * m_damping);\n\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tm_p0s[i] = m_ps[i];\n\t\tif (m_ims[i] > 0.0f)\n\t\t{\n\t\t\tm_vs[i] += h * m_gravity;\n\t\t}\n\t\tm_vs[i] *= d;\n\t\tm_ps[i] += h * m_vs[i];\n\n\t}\n\n\tfor (int32 i = 0; i < iterations; ++i)\n\t{\n\t\tSolveC2();\n\t\tSolveC3();\n\t\tSolveC2();\n\t}\n\n\tfloat32 inv_h = 1.0f / h;\n\tfor (int32 i = 0; i < m_count; ++i)\n\t{\n\t\tm_vs[i] = inv_h * (m_ps[i] - m_p0s[i]);\n\t}\n}\n\nvoid b2Rope::SolveC2()\n{\n\tint32 count2 = m_count - 1;\n\n\tfor (int32 i = 0; i < count2; ++i)\n\t{\n\t\tb2Vec2 p1 = m_ps[i];\n\t\tb2Vec2 p2 = m_ps[i + 1];\n\n\t\tb2Vec2 d = p2 - p1;\n\t\tfloat32 L = d.Normalize();\n\n\t\tfloat32 im1 = m_ims[i];\n\t\tfloat32 im2 = m_ims[i + 1];\n\n\t\tif (im1 + im2 == 0.0f)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tfloat32 s1 = im1 / (im1 + im2);\n\t\tfloat32 s2 = im2 / (im1 + im2);\n\n\t\tp1 -= m_k2 * s1 * (m_Ls[i] - L) * d;\n\t\tp2 += m_k2 * s2 * (m_Ls[i] - L) * d;\n\n\t\tm_ps[i] = p1;\n\t\tm_ps[i + 1] = p2;\n\t}\n}\n\nvoid b2Rope::SetAngle(float32 angle)\n{\n\tint32 count3 = m_count - 2;\n\tfor (int32 i = 0; i < count3; ++i)\n\t{\n\t\tm_as[i] = angle;\n\t}\n}\n\nvoid b2Rope::SolveC3()\n{\n\tint32 count3 = m_count - 2;\n\n\tfor (int32 i = 0; i < count3; ++i)\n\t{\n\t\tb2Vec2 p1 = m_ps[i];\n\t\tb2Vec2 p2 = m_ps[i + 1];\n\t\tb2Vec2 p3 = m_ps[i + 2];\n\n\t\tfloat32 m1 = m_ims[i];\n\t\tfloat32 m2 = m_ims[i + 1];\n\t\tfloat32 m3 = m_ims[i + 2];\n\n\t\tb2Vec2 d1 = p2 - p1;\n\t\tb2Vec2 d2 = p3 - p2;\n\n\t\tfloat32 L1sqr = d1.LengthSquared();\n\t\tfloat32 L2sqr = d2.LengthSquared();\n\n\t\tif (L1sqr * L2sqr == 0.0f)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tfloat32 a = b2Cross(d1, d2);\n\t\tfloat32 b = b2Dot(d1, d2);\n\n\t\tfloat32 angle = b2Atan2(a, b);\n\n\t\tb2Vec2 Jd1 = (-1.0f / L1sqr) * d1.Skew();\n\t\tb2Vec2 Jd2 = (1.0f / L2sqr) * d2.Skew();\n\n\t\tb2Vec2 J1 = -Jd1;\n\t\tb2Vec2 J2 = Jd1 - Jd2;\n\t\tb2Vec2 J3 = Jd2;\n\n\t\tfloat32 mass = m1 * b2Dot(J1, J1) + m2 * b2Dot(J2, J2) + m3 * b2Dot(J3, J3);\n\t\tif (mass == 0.0f)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tmass = 1.0f / mass;\n\n\t\tfloat32 C = angle - m_as[i];\n\n\t\twhile (C > b2_pi)\n\t\t{\n\t\t\tangle -= 2 * b2_pi;\n\t\t\tC = angle - m_as[i];\n\t\t}\n\n\t\twhile (C < -b2_pi)\n\t\t{\n\t\t\tangle += 2.0f * b2_pi;\n\t\t\tC = angle - m_as[i];\n\t\t}\n\n\t\tfloat32 impulse = - m_k3 * mass * C;\n\n\t\tp1 += (m1 * impulse) * J1;\n\t\tp2 += (m2 * impulse) * J2;\n\t\tp3 += (m3 * impulse) * J3;\n\n\t\tm_ps[i] = p1;\n\t\tm_ps[i + 1] = p2;\n\t\tm_ps[i + 2] = p3;\n\t}\n}\n\nvoid b2Rope::Draw(b2Draw* draw) const\n{\n\tb2Color c(0.4f, 0.5f, 0.7f);\n\n\tfor (int32 i = 0; i < m_count - 1; ++i)\n\t{\n\t\tdraw->DrawSegment(m_ps[i], m_ps[i+1], c);\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Box2D/Rope/b2Rope.h",
    "content": "/*\n* Copyright (c) 2011 Erin Catto http://www.box2d.org\n*\n* This software is provided 'as-is', without any express or implied\n* warranty.  In no event will the authors be held liable for any damages\n* arising from the use of this software.\n* Permission is granted to anyone to use this software for any purpose,\n* including commercial applications, and to alter it and redistribute it\n* freely, subject to the following restrictions:\n* 1. The origin of this software must not be misrepresented; you must not\n* claim that you wrote the original software. If you use this software\n* in a product, an acknowledgment in the product documentation would be\n* appreciated but is not required.\n* 2. Altered source versions must be plainly marked as such, and must not be\n* misrepresented as being the original software.\n* 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef B2_ROPE_H\n#define B2_ROPE_H\n\n#include <Box2D/Common/b2Math.h>\n\nclass b2Draw;\n\n/// \nstruct b2RopeDef\n{\n\tb2RopeDef()\n\t{\n\t\tvertices = NULL;\n\t\tcount = 0;\n\t\tmasses = NULL;\n\t\tgravity.SetZero();\n\t\tdamping = 0.1f;\n\t\tk2 = 0.9f;\n\t\tk3 = 0.1f;\n\t}\n\n\t///\n\tb2Vec2* vertices;\n\n\t///\n\tint32 count;\n\n\t///\n\tfloat32* masses;\n\n\t///\n\tb2Vec2 gravity;\n\n\t///\n\tfloat32 damping;\n\n\t/// Stretching stiffness\n\tfloat32 k2;\n\n\t/// Bending stiffness. Values above 0.5 can make the simulation blow up.\n\tfloat32 k3;\n};\n\n/// \nclass b2Rope\n{\npublic:\n\tb2Rope();\n\t~b2Rope();\n\n\t///\n\tvoid Initialize(const b2RopeDef* def);\n\n\t///\n\tvoid Step(float32 timeStep, int32 iterations);\n\n\t///\n\tint32 GetVertexCount() const\n\t{\n\t\treturn m_count;\n\t}\n\n\t///\n\tconst b2Vec2* GetVertices() const\n\t{\n\t\treturn m_ps;\n\t}\n\n\t///\n\tvoid Draw(b2Draw* draw) const;\n\n\t///\n\tvoid SetAngle(float32 angle);\n\nprivate:\n\n\tvoid SolveC2();\n\tvoid SolveC3();\n\n\tint32 m_count;\n\tb2Vec2* m_ps;\n\tb2Vec2* m_p0s;\n\tb2Vec2* m_vs;\n\n\tfloat32* m_ims;\n\n\tfloat32* m_Ls;\n\tfloat32* m_as;\n\n\tb2Vec2 m_gravity;\n\tfloat32 m_damping;\n\n\tfloat32 m_k2;\n\tfloat32 m_k3;\n};\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/LICENSE",
    "content": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\"\n    means each individual or legal entity that creates, contributes to\n    the creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n    means the combination of the Contributions of others (if any) used\n    by a Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n    means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n    means Source Code Form to which the initial Contributor has attached\n    the notice in Exhibit A, the Executable Form of such Source Code\n    Form, and Modifications of such Source Code Form, in each case\n    including portions thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\n    means\n\n    (a) that the initial Contributor has attached the notice described\n        in Exhibit B to the Covered Software; or\n\n    (b) that the Covered Software was made available under the terms of\n        version 1.1 or earlier of the License, but not also under the\n        terms of a Secondary License.\n\n1.6. \"Executable Form\"\n    means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n    means a work that combines Covered Software with other material, in \n    a separate file or files, that is not Covered Software.\n\n1.8. \"License\"\n    means this document.\n\n1.9. \"Licensable\"\n    means having the right to grant, to the maximum extent possible,\n    whether at the time of the initial grant or subsequently, any and\n    all of the rights conveyed by this License.\n\n1.10. \"Modifications\"\n    means any of the following:\n\n    (a) any file in Source Code Form that results from an addition to,\n        deletion from, or modification of the contents of Covered\n        Software; or\n\n    (b) any new file in Source Code Form that contains any Covered\n        Software.\n\n1.11. \"Patent Claims\" of a Contributor\n    means any patent claim(s), including without limitation, method,\n    process, and apparatus claims, in any patent Licensable by such\n    Contributor that would be infringed, but for the grant of the\n    License, by the making, using, selling, offering for sale, having\n    made, import, or transfer of either its Contributions or its\n    Contributor Version.\n\n1.12. \"Secondary License\"\n    means either the GNU General Public License, Version 2.0, the GNU\n    Lesser General Public License, Version 2.1, the GNU Affero General\n    Public License, Version 3.0, or any later versions of those\n    licenses.\n\n1.13. \"Source Code Form\"\n    means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n    means an individual or a legal entity exercising rights under this\n    License. For legal entities, \"You\" includes any entity that\n    controls, is controlled by, or is under common control with You. For\n    purposes of this definition, \"control\" means (a) the power, direct\n    or indirect, to cause the direction or management of such entity,\n    whether by contract or otherwise, or (b) ownership of more than\n    fifty percent (50%) of the outstanding shares or beneficial\n    ownership of such entity.\n\n2. License Grants and Conditions\n--------------------------------\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n(a) under intellectual property rights (other than patent or trademark)\n    Licensable by such Contributor to use, reproduce, make available,\n    modify, display, perform, distribute, and otherwise exploit its\n    Contributions, either on an unmodified basis, with Modifications, or\n    as part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer\n    for sale, have made, import, and otherwise transfer either its\n    Contributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n(a) for any code that a Contributor has removed from Covered Software;\n    or\n\n(b) for infringements caused by: (i) Your and any other third party's\n    modifications of Covered Software, or (ii) the combination of its\n    Contributions with other software (except as part of its Contributor\n    Version); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of\n    its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n3. Responsibilities\n-------------------\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code\n    Form, as described in Section 3.1, and You must inform recipients of\n    the Executable Form how they can obtain a copy of such Source Code\n    Form by reasonable means in a timely manner, at a charge no more\n    than the cost of distribution to the recipient; and\n\n(b) You may distribute such Executable Form under the terms of this\n    License, or sublicense it under different terms, provided that the\n    license for the Executable Form does not attempt to limit or alter\n    the recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n---------------------------------------------------\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: (a) comply with\nthe terms of this License to the maximum extent possible; and (b)\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n5. Termination\n--------------\n\n5.1. The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated (a) provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and (b) on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n************************************************************************\n*                                                                      *\n*  6. Disclaimer of Warranty                                           *\n*  -------------------------                                           *\n*                                                                      *\n*  Covered Software is provided under this License on an \"as is\"       *\n*  basis, without warranty of any kind, either expressed, implied, or  *\n*  statutory, including, without limitation, warranties that the       *\n*  Covered Software is free of defects, merchantable, fit for a        *\n*  particular purpose or non-infringing. The entire risk as to the     *\n*  quality and performance of the Covered Software is with You.        *\n*  Should any Covered Software prove defective in any respect, You     *\n*  (not any Contributor) assume the cost of any necessary servicing,   *\n*  repair, or correction. This disclaimer of warranty constitutes an   *\n*  essential part of this License. No use of any Covered Software is   *\n*  authorized under this License except under this disclaimer.         *\n*                                                                      *\n************************************************************************\n\n************************************************************************\n*                                                                      *\n*  7. Limitation of Liability                                          *\n*  --------------------------                                          *\n*                                                                      *\n*  Under no circumstances and under no legal theory, whether tort      *\n*  (including negligence), contract, or otherwise, shall any           *\n*  Contributor, or anyone who distributes Covered Software as          *\n*  permitted above, be liable to You for any direct, indirect,         *\n*  special, incidental, or consequential damages of any character      *\n*  including, without limitation, damages for lost profits, loss of    *\n*  goodwill, work stoppage, computer failure or malfunction, or any    *\n*  and all other commercial damages or losses, even if such party      *\n*  shall have been informed of the possibility of such damages. This   *\n*  limitation of liability shall not apply to liability for death or   *\n*  personal injury resulting from such party's negligence to the       *\n*  extent applicable law prohibits such limitation. Some               *\n*  jurisdictions do not allow the exclusion or limitation of           *\n*  incidental or consequential damages, so this exclusion and          *\n*  limitation may not apply to You.                                    *\n*                                                                      *\n************************************************************************\n\n8. Litigation\n-------------\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n9. Miscellaneous\n----------------\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n10. Versions of the License\n---------------------------\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n-------------------------------------------\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n---------------------------------------------------------\n\n  This Source Code Form is \"Incompatible With Secondary Licenses\", as\n  defined by the Mozilla Public License, v. 2.0.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/extras/InitializeWithGrid.h",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\n/**\n * @file\n * Helper function to initialize triangulation with regular grid instead of\n * super-triangle\n */\n\n#ifndef CDT_HmXGv083vZCrT3OXASD9\n#define CDT_HmXGv083vZCrT3OXASD9\n\n#include \"CDT.h\"\n#include \"CDTUtils.h\"\n\n#ifdef CDT_CXX11_IS_SUPPORTED\n#include <algorithm>\n#endif\n#include <cstddef>\n#include <iterator>\n#include <vector>\n\nnamespace CDT\n{\nnamespace detail\n{\n\n/**\n * Generate grid vertices given of X- and Y-ticks\n *\n * @tparam OutputVertIt output vertices iterator\n * @tparam OutputTriIt output triangles iterator\n * @tparam TXCoordIter iterator dereferencing to X coordinate\n * @tparam TYCoordIter iterator dereferencing to Y coordinate\n * @param outFirst the beginning of the destination range\n * @param xfirst beginning of X-ticks range\n * @param xlast end of X-ticks range\n * @param yfirst beginning of Y-ticks range\n * @param ylast end of Y-ticks range\n */\ntemplate <\n    typename OutputVertIt,\n    typename OutputTriIt,\n    typename TXCoordIter,\n    typename TYCoordIter>\nvoid generateGridVertices(\n    OutputVertIt outVertsFirst,\n    OutputTriIt outTrisFirst,\n    const TXCoordIter xfirst,\n    const TXCoordIter xlast,\n    const TYCoordIter yfirst,\n    const TYCoordIter ylast)\n{\n    typedef typename std::iterator_traits<TXCoordIter>::value_type T;\n    const std::size_t xres = std::distance(xfirst, xlast) - 1;\n    const std::size_t yres = std::distance(yfirst, ylast) - 1;\n\n    TXCoordIter yiter = yfirst;\n    for(std::size_t iy = 0; yiter != ylast; ++yiter, ++iy)\n    {\n        TXCoordIter xiter = xfirst;\n        for(std::size_t ix = 0; xiter != xlast; ++xiter, ++ix)\n        {\n            *outVertsFirst++ = V2d<T>::make(*xiter, *yiter);\n            const std::size_t i = iy * xres + ix;\n            TriIndVec vTris;\n            vTris.reserve(6);\n            // left-up\n            if(ix > 0 && iy < yres)\n            {\n                vTris.push_back(2 * (i - 1));\n                vTris.push_back(2 * (i - 1) + 1);\n            }\n            // right-up\n            if(ix < xres && iy < yres)\n            {\n                vTris.push_back(2 * i);\n            }\n            // left-down\n            if(ix > 0 && iy > 0)\n            {\n                vTris.push_back(2 * (i - xres - 1) + 1);\n            }\n            // right-down\n            if(ix < xres && iy > 0)\n            {\n                vTris.push_back(2 * (i - xres));\n                vTris.push_back(2 * (i - xres) + 1);\n            }\n#ifdef CDT_CXX11_IS_SUPPORTED\n            *outTrisFirst++ = std::move(vTris);\n#else\n            *outTrisFirst++ = vTris;\n#endif\n        }\n    }\n}\n\n/**\n * Generate grid triangles\n *\n * @tparam OutputIt output iterator\n * @param outFirst the beginning of the destination range\n * @param xres grid X-resolution\n * @param yres grid Y-resolution\n */\ntemplate <typename OutputIt>\nvoid generateGridTriangles(\n    OutputIt outFirst,\n    const IndexSizeType xres,\n    const IndexSizeType yres)\n{\n    for(IndexSizeType iy = 0; iy < yres; ++iy)\n    {\n        for(IndexSizeType ix = 0; ix < xres; ++ix)\n        {\n            // 2___3           v3\n            // |\\  |           /\\\n            // | \\ |        n3/  \\n2\n            // |__\\|         /____\\\n            // 0   1       v1  n1  v2\n            const IndexSizeType i = iy * xres + ix;\n            const IndexSizeType iv = iy * (xres + 1) + ix;\n            const VertInd vv[4] = {iv, iv + 1, iv + xres + 1, iv + xres + 2};\n            Triangle t;\n\n            t.vertices = {vv[0], vv[1], vv[2]};\n            t.neighbors = {\n                iy ? 2 * i - xres * 2 + 1 : noNeighbor,\n                2 * i + 1,\n                ix ? 2 * i - 1 : noNeighbor};\n            *outFirst++ = t;\n\n            t.vertices = {vv[1], vv[3], vv[2]};\n            t.neighbors = {\n                ix < xres - 1 ? 2 * i + 2 : noNeighbor,\n                iy < yres - 1 ? 2 * i + xres * 2 : noNeighbor,\n                2 * i};\n            *outFirst++ = t;\n        }\n    }\n}\n\n} // namespace detail\n\n/**\n * Make a triangulation that uses regular grid triangles instead of\n * super-triangle\n *\n * @tparam T type of vertex coordinates (e.g., float, double)\n * @tparam TNearPointLocator class providing locating near point for efficiently\n * inserting new points.\n * @param xmin minimum X-coordinate of grid\n * @param xmax maximum X-coordinate of grid\n * @param ymin minimum Y-coordinate of grid\n * @param ymax maximum Y-coordinate of grid\n * @param xres grid X-resolution\n * @param yres grid Y-resolution\n * @param out triangulation to initialize with grid super-geometry\n */\ntemplate <typename T, typename TNearPointLocator>\nvoid initializeWithRegularGrid(\n    const T xmin,\n    const T xmax,\n    const T ymin,\n    const T ymax,\n    const std::size_t xres,\n    const std::size_t yres,\n    Triangulation<T, TNearPointLocator>& out)\n{\n    std::vector<T> xcoords;\n    std::vector<T> ycoords;\n    xcoords.reserve(xres + 1);\n    ycoords.reserve(yres + 1);\n    const T xstep = (xmax - xmin) / xres;\n    T x = xmin;\n    for(std::size_t ix = 0; ix <= xres; ++ix, x += xstep)\n        xcoords.push_back(x);\n    const T ystep = (ymax - ymin) / yres;\n    T y = ymin;\n    for(std::size_t iy = 0; iy <= yres; ++iy, y += ystep)\n        ycoords.push_back(y);\n\n    return initializeWithIrregularGrid(\n        xcoords.begin(), xcoords.end(), ycoords.begin(), ycoords.end(), out);\n}\n\n/**\n * Make a triangulation that uses irregular grid triangles instead of\n * super-triangle. Irregular grid is given by collections of X- and Y-ticks\n *\n * @tparam T type of vertex coordinates (e.g., float, double)\n * @tparam TNearPointLocator class providing locating near point for efficiently\n * inserting new points.\n * @tparam TXCoordIter iterator dereferencing to X coordinate\n * @tparam TYCoordIter iterator dereferencing to Y coordinate\n * @param xfirst beginning of X-ticks range\n * @param xlast end of X-ticks range\n * @param yfirst beginning of Y-ticks range\n * @param ylast end of Y-ticks range\n * @param out triangulation to initialize with grid super-geometry\n */\ntemplate <\n    typename T,\n    typename TNearPointLocator,\n    typename TXCoordIter,\n    typename TYCoordIter>\nvoid initializeWithIrregularGrid(\n    const TXCoordIter xfirst,\n    const TXCoordIter xlast,\n    const TYCoordIter yfirst,\n    const TYCoordIter ylast,\n    Triangulation<T, TNearPointLocator>& out)\n{\n    const std::size_t xres = std::distance(xfirst, xlast) - 1;\n    const std::size_t yres = std::distance(yfirst, ylast) - 1;\n    out.triangles.reserve(xres * yres * 2);\n    out.vertices.reserve((xres + 1) * (yres + 1));\n    out.vertTris.reserve((xres + 1) * (yres + 1));\n    detail::generateGridVertices(\n        std::back_inserter(out.vertices),\n        std::back_inserter(out.vertTris),\n        xfirst,\n        xlast,\n        yfirst,\n        ylast);\n    detail::generateGridTriangles(\n        std::back_inserter(out.triangles), xres, yres);\n    out.initializedWithCustomSuperGeometry();\n}\n\n} // namespace CDT\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/extras/VerifyTopology.h",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\n/**\n * @file\n * Helper function to verify if triangulation has no inconsistencies\n */\n\n#ifndef CDT_Zahj4kpHLwFgkKtcOI1i\n#define CDT_Zahj4kpHLwFgkKtcOI1i\n\n#include \"CDT.h\"\n\n#include <algorithm>\n\nnamespace CDT\n{\n\n/**\n * Verify that triangulation topology is consistent.\n *\n * Checks:\n *  - for each vertex adjacent triangles contain the vertex\n *  - each triangle's neighbor in turn has triangle as its neighbor\n *  - each of triangle's vertices has triangle as adjacent\n *\n * @tparam T type of vertex coordinates (e.g., float, double)\n * @tparam TNearPointLocator class providing locating near point for efficiently\n */\ntemplate <typename T, typename TNearPointLocator = LocatorKDTree<T> >\ninline bool verifyTopology(const CDT::Triangulation<T, TNearPointLocator>& cdt)\n{\n    // Check if vertices' adjacent triangles contain vertex\n    for(VertInd iV(0); iV < VertInd(cdt.vertices.size()); ++iV)\n    {\n        const TriIndVec& vTris = cdt.vertTris[iV];\n        typedef TriIndVec::const_iterator TriIndCit;\n        for(TriIndCit it = vTris.begin(); it != vTris.end(); ++it)\n        {\n            const array<VertInd, 3>& vv = cdt.triangles[*it].vertices;\n            if(std::find(vv.begin(), vv.end(), iV) == vv.end())\n                return false;\n        }\n    }\n    // Check if triangle neighbor links are fine\n    for(TriInd iT(0); iT < TriInd(cdt.triangles.size()); ++iT)\n    {\n        const Triangle& t = cdt.triangles[iT];\n        typedef NeighborsArr3::const_iterator NCit;\n        for(NCit it = t.neighbors.begin(); it != t.neighbors.end(); ++it)\n        {\n            if(*it == noNeighbor)\n                continue;\n            const array<TriInd, 3>& nn = cdt.triangles[*it].neighbors;\n            if(std::find(nn.begin(), nn.end(), iT) == nn.end())\n                return false;\n        }\n    }\n    // Check if triangle's vertices have triangle as adjacent\n    for(TriInd iT(0); iT < TriInd(cdt.triangles.size()); ++iT)\n    {\n        const Triangle& t = cdt.triangles[iT];\n        typedef VerticesArr3::const_iterator VCit;\n        for(VCit it = t.vertices.begin(); it != t.vertices.end(); ++it)\n        {\n            const TriIndVec& tt = cdt.vertTris[*it];\n            if(std::find(tt.begin(), tt.end(), iT) == tt.end())\n                return false;\n        }\n    }\n    return true;\n}\n\n} // namespace CDT\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/include/CDT.h",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\n/**\n * @file\n * Public API\n */\n\n#ifndef CDT_lNrmUayWQaIR5fxnsg9B\n#define CDT_lNrmUayWQaIR5fxnsg9B\n\n#include \"CDTUtils.h\"\n#include \"LocatorKDTree.h\"\n#include \"remove_at.hpp\"\n\n#include <algorithm>\n#include <cassert>\n#include <cstdlib>\n#include <iterator>\n#include <limits>\n#include <memory>\n#include <stack>\n#include <utility>\n#include <vector>\n\nnamespace CDT\n{\n\n/**\n * Enum of strategies specifying order in which a range of vertices is inserted\n * @note @ref VertexInsertionOrder::Randomized will only randomize order of\n * inserting in triangulation, vertex indices will be preserved as they were\n * specified in the final triangulation\n */\nstruct CDT_EXPORT VertexInsertionOrder\n{\n    /**\n     * The Enum itself\n     * @note needed to pre c++11 compilers that don't support 'class enum'\n     */\n    enum Enum\n    {\n        Randomized, ///< vertices will be inserted in random order\n        AsProvided, ///< vertices will be inserted in the same order as provided\n    };\n};\n\n/// Enum of what type of geometry used to embed triangulation into\nstruct CDT_EXPORT SuperGeometryType\n{\n    /**\n     * The Enum itself\n     * @note needed to pre c++11 compilers that don't support 'class enum'\n     */\n    enum Enum\n    {\n        SuperTriangle, ///< conventional super-triangle\n        Custom,        ///< user-specified custom geometry (e.g., grid)\n    };\n};\n\n/// Constant representing no valid neighbor for a triangle\nconst static TriInd noNeighbor(std::numeric_limits<TriInd>::max());\n/// Constant representing no valid vertex for a triangle\nconst static VertInd noVertex(std::numeric_limits<VertInd>::max());\n\n/**\n * Type used for storing layer depths for triangles\n * @note LayerDepth should support 60K+ layers, which could be to much or\n * too little for some use cases. Feel free to re-define this typedef.\n */\ntypedef unsigned short LayerDepth;\ntypedef LayerDepth BoundaryOverlapCount;\n\n/**\n * Data structure representing a 2D constrained Delaunay triangulation\n *\n * @tparam T type of vertex coordinates (e.g., float, double)\n * @tparam TNearPointLocator class providing locating near point for efficiently\n * inserting new points. Provides methods: 'addPoint(vPos, iV)' and\n * 'nearPoint(vPos) -> iV'\n */\ntemplate <typename T, typename TNearPointLocator = LocatorKDTree<T> >\nclass CDT_EXPORT Triangulation\n{\npublic:\n    typedef std::vector<V2d<T> > V2dVec;              ///< Vertices vector\n    typedef std::vector<TriIndVec> VerticesTriangles; ///< Triangles by vertex\n    V2dVec vertices;            ///< triangulation's vertices\n    TriangleVec triangles;      ///< triangulation's triangles\n    EdgeUSet fixedEdges;        ///<  triangulation's constraints (fixed edges)\n    VerticesTriangles vertTris; ///< triangles adjacent to each vertex\n\n    /** Stores count of overlapping boundaries for a fixed edge. If no entry is\n     * present for an edge: no boundaries overlap.\n     * @note map only has entries for fixed for edges that represent overlapping\n     * boundaries\n     * @note needed for handling depth calculations and hole-removel in case of\n     * overlapping boundaries\n     */\n    unordered_map<Edge, BoundaryOverlapCount> overlapCount;\n\n    /*____ API _____*/\n    /// Default constructor\n    Triangulation();\n    /**\n     * Constructor\n     * @param vertexInsertionOrder strategy used for ordering vertex insertions\n     */\n    Triangulation(VertexInsertionOrder::Enum vertexInsertionOrder);\n    /**\n     * Constructor\n     * @param vertexInsertionOrder strategy used for ordering vertex insertions\n     * @param nearPtLocator class providing locating near point for efficiently\n     * inserting new points\n     */\n    Triangulation(\n        VertexInsertionOrder::Enum vertexInsertionOrder,\n        const TNearPointLocator& nearPtLocator);\n    /**\n     * Insert custom point-types specified by iterator range and X/Y-getters\n     * @tparam TVertexIter iterator that dereferences to custom point type\n     * @tparam TGetVertexCoordX function object getting x coordinate from\n     * vertex. Getter signature: const TVertexIter::value_type& -> T\n     * @tparam TGetVertexCoordY function object getting y coordinate from\n     * vertex. Getter signature: const TVertexIter::value_type& -> T\n     * @param first beginning of the range of vertices to add\n     * @param last end of the range of vertices to add\n     * @param getX getter of X-coordinate\n     * @param getY getter of Y-coordinate\n     */\n    template <\n        typename TVertexIter,\n        typename TGetVertexCoordX,\n        typename TGetVertexCoordY>\n    void insertVertices(\n        TVertexIter first,\n        TVertexIter last,\n        TGetVertexCoordX getX,\n        TGetVertexCoordY getY);\n    /// Insert vertices into triangulation\n    void insertVertices(const std::vector<V2d<T> >& vertices);\n    /**\n     * Insert constraints (custom-type fixed edges) into triangulation\n     * @note If some edge appears more than once in @ref insertEdges input this\n     * means that multiple boundaries overlap at the edge and impacts\n     * how hole detection algorithm of @ref eraseOuterTrianglesAndHoles works.\n     * <b>Make sure there are no erroneous duplicates.</b>\n     * @tparam TEdgeIter iterator that dereferences to custom edge type\n     * @tparam TGetEdgeVertexStart function object getting start vertex index\n     * from an edge.\n     * Getter signature: const TEdgeIter::value_type& -> CDT::VertInd\n     * @tparam TGetEdgeVertexEnd function object getting end vertex index from\n     * an edge. Getter signature: const TEdgeIter::value_type& -> CDT::VertInd\n     * @param first beginning of the range of edges to add\n     * @param last end of the range of edges to add\n     * @param getStart getter of edge start vertex index\n     * @param getEnd getter of edge end vertex index\n     */\n    template <\n        typename TEdgeIter,\n        typename TGetEdgeVertexStart,\n        typename TGetEdgeVertexEnd>\n    void insertEdges(\n        TEdgeIter first,\n        TEdgeIter last,\n        TGetEdgeVertexStart getStart,\n        TGetEdgeVertexEnd getEnd);\n    /**\n     * Insert constraints (fixed edges) into triangulation\n     * @note If some edge appears more than once in @ref insertEdges input this\n     * means that multiple boundaries overlap at the edge and impacts\n     * how hole detection algorithm of @ref eraseOuterTrianglesAndHoles works.\n     * <b>Make sure there are no erroneous duplicates.</b>\n     */\n    void insertEdges(const std::vector<Edge>& edges);\n    /**\n     * Erase triangles adjacent to super triangle\n     *\n     * @note does nothing if custom geometry is used\n     */\n    void eraseSuperTriangle();\n    /// Erase triangles outside of constrained boundary using growing\n    void eraseOuterTriangles();\n    /**\n     * Erase triangles outside of constrained boundary and auto-detected holes\n     *\n     * @note detecting holes relies on layer peeling based on layer depth\n     * @note supports overlapping or touching boundaries\n     */\n    void eraseOuterTrianglesAndHoles();\n    /**\n     * Call this method after directly setting custom super-geometry via\n     * vertices and triangles members\n     */\n    void initializedWithCustomSuperGeometry();\n\nprivate:\n    /*____ Detail __*/\n    void addSuperTriangle(const Box2d<T>& box);\n    void addNewVertex(const V2d<T>& pos, const TriIndVec& tris);\n    void insertVertex(const VertInd iVert);\n    void insertEdge(Edge edge);\n    tuple<TriInd, VertInd, VertInd> intersectedTriangle(\n        const VertInd iA,\n        const std::vector<TriInd>& candidates,\n        const V2d<T>& a,\n        const V2d<T>& b) const;\n    /// Returns indices of three resulting triangles\n    std::stack<TriInd> insertPointInTriangle(const VertInd v, const TriInd iT);\n    /// Returns indices of four resulting triangles\n    std::stack<TriInd>\n    insertPointOnEdge(const VertInd v, const TriInd iT1, const TriInd iT2);\n    array<TriInd, 2> trianglesAt(const V2d<T>& pos) const;\n    array<TriInd, 2> walkingSearchTrianglesAt(const V2d<T>& pos) const;\n    TriInd walkTriangles(const VertInd startVertex, const V2d<T>& pos) const;\n    bool isFlipNeeded(\n        const V2d<T>& pos,\n        const TriInd iT,\n        const TriInd iTopo,\n        const VertInd iVert) const;\n    void flipEdge(const TriInd iT, const TriInd iTopo);\n    void changeNeighbor(\n        const TriInd iT,\n        const TriInd oldNeighbor,\n        const TriInd newNeighbor);\n    void changeNeighbor(\n        const TriInd iT,\n        const VertInd iVedge1,\n        const VertInd iVedge2,\n        const TriInd newNeighbor);\n    void addAdjacentTriangle(const VertInd iVertex, const TriInd iTriangle);\n    void addAdjacentTriangles(\n        const VertInd iVertex,\n        const TriInd iT1,\n        const TriInd iT2,\n        const TriInd iT3);\n    void addAdjacentTriangles(\n        const VertInd iVertex,\n        const TriInd iT1,\n        const TriInd iT2,\n        const TriInd iT3,\n        const TriInd iT4);\n    void removeAdjacentTriangle(const VertInd iVertex, const TriInd iTriangle);\n    TriInd triangulatePseudopolygon(\n        const VertInd ia,\n        const VertInd ib,\n        const std::vector<VertInd>& points);\n    VertInd findDelaunayPoint(\n        const VertInd ia,\n        const VertInd ib,\n        const std::vector<VertInd>& points) const;\n    TriInd pseudopolyOuterTriangle(const VertInd ia, const VertInd ib) const;\n    TriInd addTriangle(const Triangle& t); // note: invalidates iterators!\n    TriInd addTriangle(); // note: invalidates triangle iterators!\n    void makeDummy(const TriInd iT);\n    void eraseDummies();\n    void eraseSuperTriangleVertices(); // no effect if custom geometry is used\n    template <typename TriIndexIter>\n    void eraseTrianglesAtIndices(TriIndexIter first, TriIndexIter last);\n    TriIndUSet growToBoundary(std::stack<TriInd> seeds) const;\n    void fixEdge(const Edge& edge);\n\n    std::vector<TriInd> m_dummyTris;\n    TNearPointLocator m_nearPtLocator;\n    std::size_t m_nTargetVerts;\n    SuperGeometryType::Enum m_superGeomType;\n    VertexInsertionOrder::Enum m_vertexInsertionOrder;\n};\n\n/**\n * Information about removed duplicated vertices.\n *\n * Contains mapping information and removed duplicates indices.\n * @note vertices {0,1,2,3,4} where 0 and 3 are the same will produce mapping\n *       {0,1,2,0,3} (to new vertices {0,1,2,3}) and duplicates {3}\n */\nstruct CDT_EXPORT DuplicatesInfo\n{\n    std::vector<std::size_t> mapping;    ///< vertex index mapping\n    std::vector<std::size_t> duplicates; ///< duplicates' indices\n};\n\n/**\n * Find duplicates in given custom point-type range\n * @note duplicates are points with exactly same X and Y coordinates\n * @tparam TVertexIter iterator that dereferences to custom point type\n * @tparam TGetVertexCoordX function object getting x coordinate from vertex.\n * Getter signature: const TVertexIter::value_type& -> T\n * @tparam TGetVertexCoordY function object getting y coordinate from vertex.\n * Getter signature: const TVertexIter::value_type& -> T\n * @param first beginning of the range of vertices\n * @param last end of the range of vertices\n * @param getX getter of X-coordinate\n * @param getY getter of Y-coordinate\n * @returns information about vertex duplicates\n */\ntemplate <\n    typename T,\n    typename TVertexIter,\n    typename TGetVertexCoordX,\n    typename TGetVertexCoordY>\nCDT_EXPORT DuplicatesInfo FindDuplicates(\n    TVertexIter first,\n    TVertexIter last,\n    TGetVertexCoordX getX,\n    TGetVertexCoordY getY);\n\n/**\n * Remove duplicates in-place from vector of custom points\n * @tparam TVertexIter iterator that dereferences to custom point type\n * @tparam TAllocator allocator used by input vector of vertices\n * @param vertices vertices to remove duplicates from\n * @param duplicates information about duplicates\n */\ntemplate <typename TVertex, typename TAllocator>\nCDT_EXPORT void RemoveDuplicates(\n    std::vector<TVertex, TAllocator>& vertices,\n    const std::vector<std::size_t>& duplicates);\n\n/**\n * Remove duplicated points in-place\n *\n * @tparam T type of vertex coordinates (e.g., float, double)\n * @param[in, out] vertices collection of vertices to remove duplicates from\n * @returns information about duplicated vertices that were removed.\n */\ntemplate <typename T>\nCDT_EXPORT DuplicatesInfo RemoveDuplicates(std::vector<V2d<T> >& vertices);\n\n/**\n * Remap vertex indices in edges (in-place) using given vertex-index mapping.\n *\n * @note Mapping can be a result of RemoveDuplicates function\n * @param[in,out] edges collection of edges to remap\n * @param mapping vertex-index mapping\n */\nCDT_EXPORT void\nRemapEdges(std::vector<Edge>& edges, const std::vector<std::size_t>& mapping);\n\n/**\n * Find point duplicates, remove them from vector (in-place) and remap edges\n * (in-place)\n * @note Same as a chained call of @ref FindDuplicates, @ref RemoveDuplicates,\n * and @ref RemapEdges\n * @tparam TVertexIter iterator that dereferences to custom point type\n * @tparam TGetVertexCoordX function object getting x coordinate from vertex.\n * Getter signature: const TVertexIter::value_type& -> T\n * @tparam TGetVertexCoordY function object getting y coordinate from vertex.\n * Getter signature: const TVertexIter::value_type& -> T\n * @param[in, out] vertices vertices to remove duplicates from\n * @param[in, out] edges collection of edges connecting vertices\n * @param getX getter of X-coordinate\n * @param getY getter of Y-coordinate\n * @returns information about vertex duplicates\n */\ntemplate <\n    typename T,\n    typename TVertex,\n    typename TGetVertexCoordX,\n    typename TGetVertexCoordY,\n    typename TVertexAllocator,\n    typename TEdgeAllocator>\nCDT_EXPORT DuplicatesInfo RemoveDuplicatesAndRemapEdges(\n    std::vector<TVertex, TVertexAllocator>& vertices,\n    std::vector<Edge, TEdgeAllocator>& edges,\n    TGetVertexCoordX getX,\n    TGetVertexCoordY getY);\n\n/**\n * Same as a chained call of @ref RemoveDuplicates + @ref RemapEdges\n *\n * @tparam T type of vertex coordinates (e.g., float, double)\n * @param[in, out] vertices collection of vertices to remove duplicates from\n * @param[in,out] edges collection of edges to remap\n */\ntemplate <typename T>\nCDT_EXPORT DuplicatesInfo RemoveDuplicatesAndRemapEdges(\n    std::vector<V2d<T> >& vertices,\n    std::vector<Edge>& edges);\n\n/**\n * Calculate depth of each triangle in constraint triangulation.\n *\n * Perform depth peeling from super triangle to outermost boundary,\n * then to next boundary and so on until all triangles are traversed.\n * For example depth is:\n *  - 0 for triangles outside outermost boundary\n *  - 1 for triangles inside boundary but outside hole\n *  - 2 for triangles in hole\n *  - 3 for triangles in island and so on...\n *\n * @param seed seed triangle to begin depth-peeling from\n * @param triangles triangles of triangulation\n * @param fixedEdges constraint edges of triangulation\n * @return vector where element at index i stores depth of i-th triangle\n */\nCDT_EXPORT std::vector<LayerDepth> CalculateTriangleDepths(\n    const TriInd seed,\n    const TriangleVec& triangles,\n    const EdgeUSet& fixedEdges);\n\n/**\n * Calculate depth of each triangle in constraint triangulation. Supports\n * overlapping boundaries.\n *\n * Perform depth peeling from super triangle to outermost boundary,\n * then to next boundary and so on until all triangles are traversed.@n\n * For example depth is:\n *  - 0 for triangles outside outermost boundary\n *  - 1 for triangles inside boundary but outside hole\n *  - 2 for triangles in hole\n *  - 3 for triangles in island and so on...\n *\n * @param seed seed triangle to begin depth-peeling from\n * @param triangles triangles of triangulation\n * @param fixedEdges constraint edges of triangulation\n * @param overlapCount counts of boundary overlaps at fixed edges (map has\n * entries only for edges that represent overlapping boundaries)\n * @return vector where element at index i stores depth of i-th triangle\n */\nCDT_EXPORT std::vector<LayerDepth> CalculateTriangleDepths(\n    const TriInd seed,\n    const TriangleVec& triangles,\n    const EdgeUSet& fixedEdges,\n    const unordered_map<Edge, BoundaryOverlapCount>& overlapCount);\n\n/**\n * Depth-peel a layer in triangulation, used when calculating triangle depths\n *\n * It takes starting seed triangles, traverses neighboring triangles, and\n * assigns given layer depth to the traversed triangles. Traversal is blocked by\n * constraint edges. Triangles behind constraint edges are recorded as seeds of\n * next layer and returned from the function.\n *\n * @tparam T type of vertex coordinates (e.g., float, double)\n * @param seeds indices of seed triangles\n * @param triangles triangles of triangulation\n * @param fixedEdges constraint edges of triangulation\n * @param layerDepth current layer's depth to mark triangles with\n * @param[in, out] triDepths depths of triangles\n * @return triangles of the next (deeper) layer that are adjacent to the peeled\n * layer. To be used as seeds when peeling the next layer.\n */\nCDT_EXPORT\nTriIndUSet PeelLayer(\n    std::stack<TriInd> seeds,\n    const TriangleVec& triangles,\n    const EdgeUSet& fixedEdges,\n    const LayerDepth layerDepth,\n    std::vector<LayerDepth>& triDepths);\n\n/**\n * Depth-peel a layer in triangulation, used when calculating triangle depths\n *\n * It takes starting seed triangles, traverses neighboring triangles, and\n * assigns given layer depth to the traversed triangles. Traversal is blocked by\n * constraint edges. Triangles behind constraint edges are recorded as seeds of\n * next layer and returned from the function.\n *\n * @tparam T type of vertex coordinates (e.g., float, double)\n * @param seeds indices of seed triangles\n * @param triangles triangles of triangulation\n * @param fixedEdges constraint edges of triangulation\n * @param overlapCount counts of boundary overlaps at fixed edges (map has\n * entries only for edges that represent overlapping boundaries)\n * @param layerDepth current layer's depth to mark triangles with\n * @param[in, out] triDepths depths of triangles\n * @return triangles of the deeper layers that are adjacent to the peeled layer.\n *         To be used as seeds when peeling deeper layers.\n */\nCDT_EXPORT\nunordered_map<TriInd, LayerDepth> PeelLayer(\n    std::stack<TriInd> seeds,\n    const TriangleVec& triangles,\n    const EdgeUSet& fixedEdges,\n    const unordered_map<Edge, BoundaryOverlapCount>& overlapCount,\n    const LayerDepth layerDepth,\n    std::vector<LayerDepth>& triDepths);\n\n/**\n * Extract all edges of triangles\n *\n * @param triangles triangles used to extract edges\n * @return an unordered set of all edges of triangulation\n */\nCDT_EXPORT EdgeUSet extractEdgesFromTriangles(const TriangleVec& triangles);\n\n} // namespace CDT\n\n//*****************************************************************************\n// Implementations of template functionlity\n//*****************************************************************************\n// hash for CDT::V2d<T>\n#ifdef CDT_CXX11_IS_SUPPORTED\nnamespace std\n#else\nnamespace boost\n#endif\n{\ntemplate <typename T>\nstruct hash<CDT::V2d<T> >\n{\n    size_t operator()(const CDT::V2d<T>& xy) const\n    {\n#ifdef CDT_CXX11_IS_SUPPORTED\n        typedef std::hash<T> Hasher;\n#else\n        typedef boost::hash<T> Hasher;\n#endif\n        return Hasher()(xy.x) ^ Hasher()(xy.y);\n    }\n};\n} // namespace std\n\nnamespace CDT\n{\n\n#ifdef CDT_CXX11_IS_SUPPORTED\ninline void shuffle_indices(std::vector<VertInd>& indices)\n{\n    static mt19937 g(9001);\n    std::shuffle(indices.begin(), indices.end(), g);\n}\n#else\ninline size_t randomCDT(const size_t i)\n{\n    static mt19937 g(9001);\n    return g() % i;\n}\n\ninline void shuffle_indices(std::vector<VertInd>& indices)\n{\n    std::random_shuffle(indices.begin(), indices.end(), randomCDT);\n}\n#endif\n\n//-----------------------\n// Triangulation methods\n//-----------------------\ntemplate <typename T, typename TNearPointLocator>\ntemplate <\n    typename TVertexIter,\n    typename TGetVertexCoordX,\n    typename TGetVertexCoordY>\nvoid Triangulation<T, TNearPointLocator>::insertVertices(\n    const TVertexIter first,\n    const TVertexIter last,\n    TGetVertexCoordX getX,\n    TGetVertexCoordY getY)\n{\n    if(vertices.empty())\n    {\n        addSuperTriangle(envelopBox<T>(first, last, getX, getY));\n    }\n\n    const std::size_t nExistingVerts = vertices.size();\n\n    vertices.reserve(nExistingVerts + std::distance(first, last));\n    for(TVertexIter it = first; it != last; ++it)\n        addNewVertex(V2d<T>::make(getX(*it), getY(*it)), TriIndVec());\n\n    switch(m_vertexInsertionOrder)\n    {\n    case VertexInsertionOrder::AsProvided:\n        for(TVertexIter it = first; it != last; ++it)\n            insertVertex(VertInd(nExistingVerts + std::distance(first, it)));\n        break;\n    case VertexInsertionOrder::Randomized:\n        std::vector<VertInd> ii(std::distance(first, last));\n        typedef std::vector<VertInd>::iterator Iter;\n        VertInd value = nExistingVerts;\n        for(Iter it = ii.begin(); it != ii.end(); ++it, ++value)\n            *it = value;\n        shuffle_indices(ii);\n        for(Iter it = ii.begin(); it != ii.end(); ++it)\n            insertVertex(*it);\n        break;\n    }\n}\n\ntemplate <typename T, typename TNearPointLocator>\ntemplate <\n    typename TEdgeIter,\n    typename TGetEdgeVertexStart,\n    typename TGetEdgeVertexEnd>\nvoid Triangulation<T, TNearPointLocator>::insertEdges(\n    TEdgeIter first,\n    const TEdgeIter last,\n    TGetEdgeVertexStart getStart,\n    TGetEdgeVertexEnd getEnd)\n{\n    for(; first != last; ++first)\n    {\n        // +3 to account for super-triangle vertices\n        insertEdge(Edge(\n            VertInd(getStart(*first) + m_nTargetVerts),\n            VertInd(getEnd(*first) + m_nTargetVerts)));\n    }\n    eraseDummies();\n}\n\n//-----\n// API\n//-----\ntemplate <\n    typename T,\n    typename TVertexIter,\n    typename TGetVertexCoordX,\n    typename TGetVertexCoordY>\nDuplicatesInfo FindDuplicates(\n    TVertexIter first,\n    TVertexIter last,\n    TGetVertexCoordX getX,\n    TGetVertexCoordY getY)\n{\n    typedef unordered_map<V2d<T>, std::size_t> PosToIndex;\n    PosToIndex uniqueVerts;\n    const std::size_t verticesSize = std::distance(first, last);\n    DuplicatesInfo di = {\n        std::vector<std::size_t>(verticesSize), std::vector<std::size_t>()};\n    for(std::size_t iIn = 0, iOut = iIn; iIn < verticesSize; ++iIn, ++first)\n    {\n        typename PosToIndex::const_iterator it;\n        bool isUnique;\n        tie(it, isUnique) = uniqueVerts.insert(\n            std::make_pair(V2d<T>::make(getX(*first), getY(*first)), iOut));\n        if(isUnique)\n        {\n            di.mapping[iIn] = iOut++;\n            continue;\n        }\n        di.mapping[iIn] = it->second; // found a duplicate\n        di.duplicates.push_back(iIn);\n    }\n    return di;\n}\n\ntemplate <typename TVertex, typename TAllocator>\nvoid RemoveDuplicates(\n    std::vector<TVertex, TAllocator>& vertices,\n    const std::vector<std::size_t>& duplicates)\n{\n    vertices.erase(\n        remove_at(\n            vertices.begin(),\n            vertices.end(),\n            duplicates.begin(),\n            duplicates.end()),\n        vertices.end());\n}\n\ntemplate <\n    typename T,\n    typename TVertex,\n    typename TGetVertexCoordX,\n    typename TGetVertexCoordY,\n    typename TVertexAllocator,\n    typename TEdgeAllocator>\nDuplicatesInfo RemoveDuplicatesAndRemapEdges(\n    std::vector<TVertex, TVertexAllocator>& vertices,\n    std::vector<Edge, TEdgeAllocator>& edges,\n    TGetVertexCoordX getX,\n    TGetVertexCoordY getY)\n{\n    const DuplicatesInfo di =\n        FindDuplicates<T>(vertices.begin(), vertices.end(), getX, getY);\n    RemoveDuplicates(vertices, di.duplicates);\n    RemapEdges(edges, di.mapping);\n    return di;\n}\n\n} // namespace CDT\n\n#ifndef CDT_USE_AS_COMPILED_LIBRARY\n#include \"CDT.hpp\"\n#endif\n\n#endif // header-guard\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/include/CDT.hpp",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\n/**\n * @file\n * Public API - implementation\n */\n\n#include \"CDT.h\"\n\n#include \"CDTUtils.h\"\n#include <algorithm>\n#include <deque>\n#include <stdexcept>\n\nnamespace CDT\n{\n\ntypedef std::deque<TriInd> TriDeque;\n\nnamespace detail\n{\nstatic mt19937 randGen(9001);\n\n/// Needed for c++03 compatibility (no uniform initialization available)\ntemplate <typename T>\narray<T, 3> arr3(const T& v0, const T& v1, const T& v2)\n{\n    const array<T, 3> out = {v0, v1, v2};\n    return out;\n}\n\n} // namespace detail\n\ntemplate <typename T, typename TNearPointLocator>\nTriangulation<T, TNearPointLocator>::Triangulation()\n    : m_nTargetVerts(0)\n    , m_superGeomType(SuperGeometryType::SuperTriangle)\n    , m_vertexInsertionOrder(VertexInsertionOrder::Randomized)\n{}\n\ntemplate <typename T, typename TNearPointLocator>\nTriangulation<T, TNearPointLocator>::Triangulation(\n    const VertexInsertionOrder::Enum vertexInsertionOrder)\n    : m_nTargetVerts(0)\n    , m_superGeomType(SuperGeometryType::SuperTriangle)\n    , m_vertexInsertionOrder(vertexInsertionOrder)\n{}\n\ntemplate <typename T, typename TNearPointLocator>\nTriangulation<T, TNearPointLocator>::Triangulation(\n    VertexInsertionOrder::Enum vertexInsertionOrder,\n    const TNearPointLocator& nearPtLocator)\n    : m_nTargetVerts(0)\n    , m_nearPtLocator(nearPtLocator)\n    , m_superGeomType(SuperGeometryType::SuperTriangle)\n    , m_vertexInsertionOrder(vertexInsertionOrder)\n{}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::changeNeighbor(\n    const TriInd iT,\n    const VertInd iVedge1,\n    const VertInd iVedge2,\n    const TriInd newNeighbor)\n{\n    Triangle& t = triangles[iT];\n    t.neighbors[opposedTriangleInd(t, iVedge1, iVedge2)] = newNeighbor;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::eraseDummies()\n{\n    if(m_dummyTris.empty())\n        return;\n    const TriIndUSet dummySet(m_dummyTris.begin(), m_dummyTris.end());\n    TriIndUMap triIndMap;\n    triIndMap[noNeighbor] = noNeighbor;\n    for(TriInd iT(0), iTnew(0); iT < TriInd(triangles.size()); ++iT)\n    {\n        if(dummySet.count(iT))\n            continue;\n        triIndMap[iT] = iTnew;\n        triangles[iTnew] = triangles[iT];\n        iTnew++;\n    }\n    triangles.erase(triangles.end() - dummySet.size(), triangles.end());\n\n    // remap adjacent triangle indices for vertices\n    typedef typename VerticesTriangles::iterator VertTrisIt;\n    for(VertTrisIt vTris = vertTris.begin(); vTris != vertTris.end(); ++vTris)\n    {\n        for(TriIndVec::iterator iT = vTris->begin(); iT != vTris->end(); ++iT)\n            *iT = triIndMap[*iT];\n    }\n    // remap neighbor indices for triangles\n    for(TriangleVec::iterator t = triangles.begin(); t != triangles.end(); ++t)\n    {\n        NeighborsArr3& nn = t->neighbors;\n        for(NeighborsArr3::iterator iN = nn.begin(); iN != nn.end(); ++iN)\n            *iN = triIndMap[*iN];\n    }\n    // clear dummy triangles\n    m_dummyTris = std::vector<TriInd>();\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::eraseSuperTriangleVertices()\n{\n    if(m_superGeomType != SuperGeometryType::SuperTriangle)\n        return;\n    for(TriangleVec::iterator t = triangles.begin(); t != triangles.end(); ++t)\n        for(Index i(0); i < Index(3); ++i)\n            t->vertices[i] -= 3;\n\n    EdgeUSet updatedFixedEdges;\n    typedef CDT::EdgeUSet::const_iterator EdgeCit;\n    for(EdgeCit e = fixedEdges.begin(); e != fixedEdges.end(); ++e)\n    {\n        updatedFixedEdges.insert(\n            Edge(VertInd(e->v1() - 3), VertInd(e->v2() - 3)));\n    }\n    fixedEdges = updatedFixedEdges;\n\n    vertices = std::vector<V2d<T> >(vertices.begin() + 3, vertices.end());\n    vertTris = VerticesTriangles(vertTris.begin() + 3, vertTris.end());\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::eraseSuperTriangle()\n{\n    if(m_superGeomType != SuperGeometryType::SuperTriangle)\n        return;\n    // make dummy triangles adjacent to super-triangle's vertices\n    for(TriInd iT(0); iT < TriInd(triangles.size()); ++iT)\n    {\n        Triangle& t = triangles[iT];\n        if(t.vertices[0] < 3 || t.vertices[1] < 3 || t.vertices[2] < 3)\n            makeDummy(iT);\n    }\n    eraseDummies();\n    eraseSuperTriangleVertices();\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::eraseOuterTriangles()\n{\n    // make dummy triangles adjacent to super-triangle's vertices\n    const std::stack<TriInd> seed(std::deque<TriInd>(1, vertTris[0].front()));\n    const TriIndUSet toErase = growToBoundary(seed);\n    eraseTrianglesAtIndices(toErase.begin(), toErase.end());\n    eraseSuperTriangleVertices();\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::eraseOuterTrianglesAndHoles()\n{\n    const std::vector<LayerDepth> triDepths = CalculateTriangleDepths(\n        vertTris[0].front(), triangles, fixedEdges, overlapCount);\n\n    TriIndVec toErase;\n    toErase.reserve(triangles.size());\n    for(std::size_t iT = 0; iT != triangles.size(); ++iT)\n    {\n        if(triDepths[iT] % 2 == 0)\n            toErase.push_back(iT);\n    }\n\n    eraseTrianglesAtIndices(toErase.begin(), toErase.end());\n    eraseSuperTriangleVertices();\n}\n\ntemplate <typename T, typename TNearPointLocator>\ntemplate <typename TriIndexIter>\nvoid Triangulation<T, TNearPointLocator>::eraseTrianglesAtIndices(\n    TriIndexIter first,\n    TriIndexIter last)\n{\n    for(; first != last; ++first)\n        makeDummy(*first);\n    eraseDummies();\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::initializedWithCustomSuperGeometry()\n{\n    for(std::size_t i = 0; i < vertices.size(); ++i)\n    {\n        m_nearPtLocator.addPoint(VertInd(i), vertices);\n    }\n    m_nTargetVerts = vertices.size();\n    m_superGeomType = SuperGeometryType::Custom;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nTriIndUSet Triangulation<T, TNearPointLocator>::growToBoundary(\n    std::stack<TriInd> seeds) const\n{\n    TriIndUSet traversed;\n    while(!seeds.empty())\n    {\n        const TriInd iT = seeds.top();\n        seeds.pop();\n        traversed.insert(iT);\n        const Triangle& t = triangles[iT];\n        for(Index i(0); i < Index(3); ++i)\n        {\n            const Edge opEdge(t.vertices[ccw(i)], t.vertices[cw(i)]);\n            if(fixedEdges.count(opEdge))\n                continue;\n            const TriInd iN = t.neighbors[opoNbr(i)];\n            if(iN != noNeighbor && traversed.count(iN) == 0)\n                seeds.push(iN);\n        }\n    }\n    return traversed;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::makeDummy(const TriInd iT)\n{\n    const Triangle& t = triangles[iT];\n\n    typedef VerticesArr3::const_iterator VCit;\n    for(VCit iV = t.vertices.begin(); iV != t.vertices.end(); ++iV)\n        removeAdjacentTriangle(*iV, iT);\n\n    typedef NeighborsArr3::const_iterator NCit;\n    for(NCit iTn = t.neighbors.begin(); iTn != t.neighbors.end(); ++iTn)\n        changeNeighbor(*iTn, iT, noNeighbor);\n\n    m_dummyTris.push_back(iT);\n}\n\ntemplate <typename T, typename TNearPointLocator>\nTriInd Triangulation<T, TNearPointLocator>::addTriangle(const Triangle& t)\n{\n    if(m_dummyTris.empty())\n    {\n        triangles.push_back(t);\n        return TriInd(triangles.size() - 1);\n    }\n    const TriInd nxtDummy = m_dummyTris.back();\n    m_dummyTris.pop_back();\n    triangles[nxtDummy] = t;\n    return nxtDummy;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nTriInd Triangulation<T, TNearPointLocator>::addTriangle()\n{\n    if(m_dummyTris.empty())\n    {\n        const Triangle dummy = {\n            {noVertex, noVertex, noVertex},\n            {noNeighbor, noNeighbor, noNeighbor}};\n        triangles.push_back(dummy);\n        return TriInd(triangles.size() - 1);\n    }\n    const TriInd nxtDummy = m_dummyTris.back();\n    m_dummyTris.pop_back();\n    return nxtDummy;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::insertEdges(\n    const std::vector<Edge>& edges)\n{\n    insertEdges(edges.begin(), edges.end(), edge_get_v1, edge_get_v2);\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::fixEdge(const Edge& edge)\n{\n    if(!fixedEdges.insert(edge).second)\n    {\n        ++overlapCount[edge]; // if edge is already fixed bump a counter\n    }\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::insertEdge(Edge edge)\n{\n    const VertInd iA = edge.v1();\n    VertInd iB = edge.v2();\n    if(iA == iB) // edge connects a vertex to itself\n        return;\n    const TriIndVec& aTris = vertTris[iA];\n    const TriIndVec& bTris = vertTris[iB];\n    const V2d<T>& a = vertices[iA];\n    const V2d<T>& b = vertices[iB];\n    if(verticesShareEdge(aTris, bTris))\n    {\n        fixEdge(Edge(iA, iB));\n        return;\n    }\n    TriInd iT;\n    VertInd iVleft, iVright;\n    tie(iT, iVleft, iVright) = intersectedTriangle(iA, aTris, a, b);\n    // if one of the triangle vertices is on the edge, move edge start\n    if(iT == noNeighbor)\n    {\n        fixEdge(Edge(iA, iVleft));\n        return insertEdge(Edge(iVleft, iB));\n    }\n    std::vector<TriInd> intersected(1, iT);\n    std::vector<VertInd> ptsLeft(1, iVleft);\n    std::vector<VertInd> ptsRight(1, iVright);\n    VertInd iV = iA;\n    Triangle t = triangles[iT];\n    const VerticesArr3& tverts = t.vertices;\n    while(std::find(tverts.begin(), tverts.end(), iB) == tverts.end())\n    {\n        const TriInd iTopo = opposedTriangle(t, iV);\n        const Triangle& tOpo = triangles[iTopo];\n        const VertInd iVopo = opposedVertex(tOpo, iT);\n        const V2d<T> vOpo = vertices[iVopo];\n\n        intersected.push_back(iTopo);\n        iT = iTopo;\n        t = triangles[iT];\n\n        const PtLineLocation::Enum loc = locatePointLine(vOpo, a, b);\n        if(loc == PtLineLocation::Left)\n        {\n            ptsLeft.push_back(iVopo);\n            iV = iVleft;\n            iVleft = iVopo;\n        }\n        else if(loc == PtLineLocation::Right)\n        {\n            ptsRight.push_back(iVopo);\n            iV = iVright;\n            iVright = iVopo;\n        }\n        else // encountered point on the edge\n            iB = iVopo;\n    }\n    // Remove intersected triangles\n    typedef std::vector<TriInd>::const_iterator TriIndCit;\n    for(TriIndCit it = intersected.begin(); it != intersected.end(); ++it)\n        makeDummy(*it);\n    // Triangulate pseudo-polygons on both sides\n    const TriInd iTleft = triangulatePseudopolygon(iA, iB, ptsLeft);\n    std::reverse(ptsRight.begin(), ptsRight.end());\n    const TriInd iTright = triangulatePseudopolygon(iB, iA, ptsRight);\n    changeNeighbor(iTleft, noNeighbor, iTright);\n    changeNeighbor(iTright, noNeighbor, iTleft);\n    // add fixed edge\n    fixEdge(Edge(iA, iB));\n    if(iB != edge.v2()) // encountered point on the edge\n        return insertEdge(Edge(iB, edge.v2()));\n}\n\n/*!\n * Returns:\n *  - intersected triangle index\n *  - index of point on the left of the line\n *  - index of point on the right of the line\n * If left point is right on the line: no triangle is intersected:\n *  - triangle index is no-neighbor (invalid)\n *  - index of point on the line\n *  - index of point on the right of the line\n */\ntemplate <typename T, typename TNearPointLocator>\ntuple<TriInd, VertInd, VertInd>\nTriangulation<T, TNearPointLocator>::intersectedTriangle(\n    const VertInd iA,\n    const std::vector<TriInd>& candidates,\n    const V2d<T>& a,\n    const V2d<T>& b) const\n{\n    typedef std::vector<TriInd>::const_iterator TriIndCit;\n    for(TriIndCit it = candidates.begin(); it != candidates.end(); ++it)\n    {\n        const TriInd iT = *it;\n        const Triangle t = triangles[iT];\n        const Index i = vertexInd(t, iA);\n        const VertInd iP1 = t.vertices[cw(i)];\n        const VertInd iP2 = t.vertices[ccw(i)];\n        const PtLineLocation::Enum locP1 = locatePointLine(vertices[iP1], a, b);\n        const PtLineLocation::Enum locP2 = locatePointLine(vertices[iP2], a, b);\n        if(locP2 == PtLineLocation::Right)\n        {\n            if(locP1 == PtLineLocation::OnLine)\n                return make_tuple(noNeighbor, iP1, iP2);\n            if(locP1 == PtLineLocation::Left)\n                return make_tuple(iT, iP1, iP2);\n        }\n    }\n    throw std::runtime_error(\"Could not find vertex triangle intersected by \"\n                             \"edge. Note: can be caused by duplicate points.\");\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::addSuperTriangle(const Box2d<T>& box)\n{\n    m_nTargetVerts = 3;\n    m_superGeomType = SuperGeometryType::SuperTriangle;\n\n    const V2d<T> center = {\n        (box.min.x + box.max.x) / T(2), (box.min.y + box.max.y) / T(2)};\n    const T w = box.max.x - box.min.x;\n    const T h = box.max.y - box.min.y;\n    T r = std::sqrt(w * w + h * h) / T(2); // incircle radius\n    r *= T(1.1);\n    const T R = T(2) * r;                        // excircle radius\n    const T shiftX = R * std::sqrt(T(3)) / T(2); // R * cos(30 deg)\n    const V2d<T> posV1 = {center.x - shiftX, center.y - r};\n    const V2d<T> posV2 = {center.x + shiftX, center.y - r};\n    const V2d<T> posV3 = {center.x, center.y + R};\n    addNewVertex(posV1, TriIndVec(1, TriInd(0)));\n    addNewVertex(posV2, TriIndVec(1, TriInd(0)));\n    addNewVertex(posV3, TriIndVec(1, TriInd(0)));\n    const Triangle superTri = {\n        {VertInd(0), VertInd(1), VertInd(2)},\n        {noNeighbor, noNeighbor, noNeighbor}};\n    addTriangle(superTri);\n\n    m_nearPtLocator.addPoint(VertInd(0), vertices);\n    m_nearPtLocator.addPoint(VertInd(1), vertices);\n    m_nearPtLocator.addPoint(VertInd(2), vertices);\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::addNewVertex(\n    const V2d<T>& pos,\n    const TriIndVec& tris)\n{\n    vertices.push_back(pos);\n    vertTris.push_back(tris);\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::insertVertex(const VertInd iVert)\n{\n    const V2d<T>& v = vertices[iVert];\n    array<TriInd, 2> trisAt = walkingSearchTrianglesAt(v);\n    std::stack<TriInd> triStack =\n        trisAt[1] == noNeighbor\n            ? insertPointInTriangle(iVert, trisAt[0])\n            : insertPointOnEdge(iVert, trisAt[0], trisAt[1]);\n    while(!triStack.empty())\n    {\n        const TriInd iT = triStack.top();\n        triStack.pop();\n\n        const Triangle& t = triangles[iT];\n        const TriInd iTopo = opposedTriangle(t, iVert);\n        if(iTopo == noNeighbor)\n            continue;\n        if(isFlipNeeded(v, iT, iTopo, iVert))\n        {\n            flipEdge(iT, iTopo);\n            triStack.push(iT);\n            triStack.push(iTopo);\n        }\n    }\n\n    m_nearPtLocator.addPoint(iVert, vertices);\n}\n\n/*!\n * Handles super-triangle vertices.\n * Super-tri points are not infinitely far and influence the input points\n * Three cases are possible:\n *  1.  If one of the opposed vertices is super-tri: no flip needed\n *  2.  One of the shared vertices is super-tri:\n *      check if on point is same side of line formed by non-super-tri vertices\n *      as the non-super-tri shared vertex\n *  3.  None of the vertices are super-tri: normal circumcircle test\n */\ntemplate <typename T, typename TNearPointLocator>\nbool Triangulation<T, TNearPointLocator>::isFlipNeeded(\n    const V2d<T>& pos,\n    const TriInd iT,\n    const TriInd iTopo,\n    const VertInd iVert) const\n{\n    const Triangle& tOpo = triangles[iTopo];\n    const Index i = opposedVertexInd(tOpo, iT);\n    const VertInd iVopo = tOpo.vertices[i];\n    const VertInd iVcw = tOpo.vertices[cw(i)];\n    const VertInd iVccw = tOpo.vertices[ccw(i)];\n    const V2d<T>& v1 = vertices[iVcw];\n    const V2d<T>& v2 = vertices[iVopo];\n    const V2d<T>& v3 = vertices[iVccw];\n    if(m_superGeomType == SuperGeometryType::SuperTriangle)\n    {\n        if(iVert < 3 || iVopo < 3) // flip-candidate edge touches super-triangle\n        {\n            if(iVcw < 3 || iVccw < 3) // but so does original edge\n            {\n                // let the normal circumcircle test decide\n                return isInCircumcircle(pos, v1, v2, v3);\n            }\n            return false; // no flip is needed\n        }\n\n        if(iVcw < 3)\n            return locatePointLine(v1, v2, v3) == locatePointLine(pos, v2, v3);\n        if(iVccw < 3)\n            return locatePointLine(v3, v1, v2) == locatePointLine(pos, v1, v2);\n    }\n    return isInCircumcircle(pos, v1, v2, v3);\n}\n\n/* Insert point into triangle: split into 3 triangles:\n *  - create 2 new triangles\n *  - re-use old triangle for the 3rd\n *                      v3\n *                    / | \\\n *                   /  |  \\ <-- original triangle (t)\n *                  /   |   \\\n *              n3 /    |    \\ n2\n *                /newT2|newT1\\\n *               /      v      \\\n *              /    __/ \\__    \\\n *             /  __/       \\__  \\\n *            / _/      t'     \\_ \\\n *          v1 ___________________ v2\n *                     n1\n */\ntemplate <typename T, typename TNearPointLocator>\nstd::stack<TriInd> Triangulation<T, TNearPointLocator>::insertPointInTriangle(\n    const VertInd v,\n    const TriInd iT)\n{\n    const TriInd iNewT1 = addTriangle();\n    const TriInd iNewT2 = addTriangle();\n\n    Triangle& t = triangles[iT];\n    const array<VertInd, 3> vv = t.vertices;\n    const array<TriInd, 3> nn = t.neighbors;\n    const VertInd v1 = vv[0], v2 = vv[1], v3 = vv[2];\n    const TriInd n1 = nn[0], n2 = nn[1], n3 = nn[2];\n    // make two new triangles and convert current triangle to 3rd new triangle\n    using detail::arr3;\n    triangles[iNewT1] = Triangle::make(arr3(v2, v3, v), arr3(n2, iNewT2, iT));\n    triangles[iNewT2] = Triangle::make(arr3(v3, v1, v), arr3(n3, iT, iNewT1));\n    t = Triangle::make(arr3(v1, v2, v), arr3(n1, iNewT1, iNewT2));\n    // make and add a new vertex\n    addAdjacentTriangles(v, iT, iNewT1, iNewT2);\n    // adjust lists of adjacent triangles for v1, v2, v3\n    addAdjacentTriangle(v1, iNewT2);\n    addAdjacentTriangle(v2, iNewT1);\n    removeAdjacentTriangle(v3, iT);\n    addAdjacentTriangle(v3, iNewT1);\n    addAdjacentTriangle(v3, iNewT2);\n    // change triangle neighbor's neighbors to new triangles\n    changeNeighbor(n2, iT, iNewT1);\n    changeNeighbor(n3, iT, iNewT2);\n    // return newly added triangles\n    std::stack<TriInd> newTriangles;\n    newTriangles.push(iT);\n    newTriangles.push(iNewT1);\n    newTriangles.push(iNewT2);\n    return newTriangles;\n}\n\n/* Inserting a point on the edge between two triangles\n *    T1 (top)        v1\n *                   /|\\\n *              n1 /  |  \\ n4\n *               /    |    \\\n *             /  T1' | Tnew1\\\n *           v2-------v-------v4\n *             \\ Tnew2| T2'  /\n *               \\    |    /\n *              n2 \\  |  / n3\n *                   \\|/\n *   T2 (bottom)      v3\n */\ntemplate <typename T, typename TNearPointLocator>\nstd::stack<TriInd> Triangulation<T, TNearPointLocator>::insertPointOnEdge(\n    const VertInd v,\n    const TriInd iT1,\n    const TriInd iT2)\n{\n    const TriInd iTnew1 = addTriangle();\n    const TriInd iTnew2 = addTriangle();\n\n    Triangle& t1 = triangles[iT1];\n    Triangle& t2 = triangles[iT2];\n    Index i = opposedVertexInd(t1, iT2);\n    const VertInd v1 = t1.vertices[i];\n    const VertInd v2 = t1.vertices[ccw(i)];\n    const TriInd n1 = t1.neighbors[i];\n    const TriInd n4 = t1.neighbors[cw(i)];\n    i = opposedVertexInd(t2, iT1);\n    const VertInd v3 = t2.vertices[i];\n    const VertInd v4 = t2.vertices[ccw(i)];\n    const TriInd n3 = t2.neighbors[i];\n    const TriInd n2 = t2.neighbors[cw(i)];\n    // add new triangles and change existing ones\n    using detail::arr3;\n    t1 = Triangle::make(arr3(v1, v2, v), arr3(n1, iTnew2, iTnew1));\n    t2 = Triangle::make(arr3(v3, v4, v), arr3(n3, iTnew1, iTnew2));\n    triangles[iTnew1] = Triangle::make(arr3(v1, v, v4), arr3(iT1, iT2, n4));\n    triangles[iTnew2] = Triangle::make(arr3(v3, v, v2), arr3(iT2, iT1, n2));\n    // make and add new vertex\n    addAdjacentTriangles(v, iT1, iTnew2, iT2, iTnew1);\n    // adjust neighboring triangles and vertices\n    changeNeighbor(n4, iT1, iTnew1);\n    changeNeighbor(n2, iT2, iTnew2);\n    addAdjacentTriangle(v1, iTnew1);\n    addAdjacentTriangle(v3, iTnew2);\n    removeAdjacentTriangle(v2, iT2);\n    addAdjacentTriangle(v2, iTnew2);\n    removeAdjacentTriangle(v4, iT1);\n    addAdjacentTriangle(v4, iTnew1);\n    // return newly added triangles\n    std::stack<TriInd> newTriangles;\n    newTriangles.push(iT1);\n    newTriangles.push(iTnew2);\n    newTriangles.push(iT2);\n    newTriangles.push(iTnew1);\n    return newTriangles;\n}\n\ntemplate <typename T, typename TNearPointLocator>\narray<TriInd, 2>\nTriangulation<T, TNearPointLocator>::trianglesAt(const V2d<T>& pos) const\n{\n    array<TriInd, 2> out = {noNeighbor, noNeighbor};\n    for(TriInd i = TriInd(0); i < TriInd(triangles.size()); ++i)\n    {\n        const Triangle& t = triangles[i];\n        const V2d<T>& v1 = vertices[t.vertices[0]];\n        const V2d<T>& v2 = vertices[t.vertices[1]];\n        const V2d<T>& v3 = vertices[t.vertices[2]];\n        const PtTriLocation::Enum loc = locatePointTriangle(pos, v1, v2, v3);\n        if(loc == PtTriLocation::Outside)\n            continue;\n        out[0] = i;\n        if(isOnEdge(loc))\n            out[1] = t.neighbors[edgeNeighbor(loc)];\n        return out;\n    }\n    throw std::runtime_error(\"No triangle was found at position\");\n}\n\ntemplate <typename T, typename TNearPointLocator>\nTriInd Triangulation<T, TNearPointLocator>::walkTriangles(\n    const VertInd startVertex,\n    const V2d<T>& pos) const\n{\n    // begin walk in search of triangle at pos\n    TriInd currTri = vertTris[startVertex][0];\n#ifdef CDT_USE_BOOST\n    TriIndFlatUSet visited;\n#else\n    TriIndUSet visited;\n#endif\n    bool found = false;\n    while(!found)\n    {\n        const Triangle& t = triangles[currTri];\n        found = true;\n        // stochastic offset to randomize which edge we check first\n        const Index offset(detail::randGen() % 3);\n        for(Index i_(0); i_ < Index(3); ++i_)\n        {\n            const Index i((i_ + offset) % 3);\n            const V2d<T>& vStart = vertices[t.vertices[i]];\n            const V2d<T>& vEnd = vertices[t.vertices[ccw(i)]];\n            const PtLineLocation::Enum edgeCheck =\n                locatePointLine(pos, vStart, vEnd);\n            if(edgeCheck == PtLineLocation::Right &&\n               t.neighbors[i] != noNeighbor &&\n               visited.insert(t.neighbors[i]).second)\n            {\n                found = false;\n                currTri = t.neighbors[i];\n                break;\n            }\n        }\n    }\n    return currTri;\n}\n\ntemplate <typename T, typename TNearPointLocator>\narray<TriInd, 2> Triangulation<T, TNearPointLocator>::walkingSearchTrianglesAt(\n    const V2d<T>& pos) const\n{\n    array<TriInd, 2> out = {noNeighbor, noNeighbor};\n    // Query  for a vertex close to pos, to start the search\n    const VertInd startVertex = m_nearPtLocator.nearPoint(pos, vertices);\n    const TriInd iT = walkTriangles(startVertex, pos);\n    // Finished walk, locate point in current triangle\n    const Triangle& t = triangles[iT];\n    const V2d<T>& v1 = vertices[t.vertices[0]];\n    const V2d<T>& v2 = vertices[t.vertices[1]];\n    const V2d<T>& v3 = vertices[t.vertices[2]];\n    const PtTriLocation::Enum loc = locatePointTriangle(pos, v1, v2, v3);\n    if(loc == PtTriLocation::Outside)\n        throw std::runtime_error(\"No triangle was found at position\");\n    out[0] = iT;\n    if(isOnEdge(loc))\n        out[1] = t.neighbors[edgeNeighbor(loc)];\n    return out;\n}\n\n/* Flip edge between T and Topo:\n *\n *                v4         | - old edge\n *               /|\\         ~ - new edge\n *              / | \\\n *          n3 /  T' \\ n4\n *            /   |   \\\n *           /    |    \\\n *     T -> v1~~~~~~~~~v3 <- Topo\n *           \\    |    /\n *            \\   |   /\n *          n1 \\Topo'/ n2\n *              \\ | /\n *               \\|/\n *                v2\n */\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::flipEdge(\n    const TriInd iT,\n    const TriInd iTopo)\n{\n    Triangle& t = triangles[iT];\n    Triangle& tOpo = triangles[iTopo];\n    const array<TriInd, 3>& triNs = t.neighbors;\n    const array<TriInd, 3>& triOpoNs = tOpo.neighbors;\n    const array<VertInd, 3>& triVs = t.vertices;\n    const array<VertInd, 3>& triOpoVs = tOpo.vertices;\n    // find vertices and neighbors\n    Index i = opposedVertexInd(t, iTopo);\n    const VertInd v1 = triVs[i];\n    const VertInd v2 = triVs[ccw(i)];\n    const TriInd n1 = triNs[i];\n    const TriInd n3 = triNs[cw(i)];\n    i = opposedVertexInd(tOpo, iT);\n    const VertInd v3 = triOpoVs[i];\n    const VertInd v4 = triOpoVs[ccw(i)];\n    const TriInd n4 = triOpoNs[i];\n    const TriInd n2 = triOpoNs[cw(i)];\n    // change vertices and neighbors\n    using detail::arr3;\n    t = Triangle::make(arr3(v4, v1, v3), arr3(n3, iTopo, n4));\n    tOpo = Triangle::make(arr3(v2, v3, v1), arr3(n2, iT, n1));\n    // adjust neighboring triangles and vertices\n    changeNeighbor(n1, iT, iTopo);\n    changeNeighbor(n4, iTopo, iT);\n    addAdjacentTriangle(v1, iTopo);\n    addAdjacentTriangle(v3, iT);\n    removeAdjacentTriangle(v2, iT);\n    removeAdjacentTriangle(v4, iTopo);\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::changeNeighbor(\n    const TriInd iT,\n    const TriInd oldNeighbor,\n    const TriInd newNeighbor)\n{\n    if(iT == noNeighbor)\n        return;\n    Triangle& t = triangles[iT];\n    t.neighbors[neighborInd(t, oldNeighbor)] = newNeighbor;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::addAdjacentTriangle(\n    const VertInd iVertex,\n    const TriInd iTriangle)\n{\n    vertTris[iVertex].push_back(iTriangle);\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::addAdjacentTriangles(\n    const VertInd iVertex,\n    const TriInd iT1,\n    const TriInd iT2,\n    const TriInd iT3)\n{\n    TriIndVec& vTris = vertTris[iVertex];\n    vTris.reserve(vTris.size() + 3);\n    vTris.push_back(iT1);\n    vTris.push_back(iT2);\n    vTris.push_back(iT3);\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::addAdjacentTriangles(\n    const VertInd iVertex,\n    const TriInd iT1,\n    const TriInd iT2,\n    const TriInd iT3,\n    const TriInd iT4)\n{\n    TriIndVec& vTris = vertTris[iVertex];\n    vTris.reserve(vTris.size() + 4);\n    vTris.push_back(iT1);\n    vTris.push_back(iT2);\n    vTris.push_back(iT3);\n    vTris.push_back(iT4);\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::removeAdjacentTriangle(\n    const VertInd iVertex,\n    const TriInd iTriangle)\n{\n    std::vector<TriInd>& tris = vertTris[iVertex];\n    tris.erase(std::find(tris.begin(), tris.end(), iTriangle));\n}\n\n/// Split points collection to points before and after given vertex index\ninline std::pair<std::vector<VertInd>, std::vector<VertInd> >\nsplitPseudopolygon(const VertInd vi, const std::vector<VertInd>& points)\n{\n    std::pair<std::vector<VertInd>, std::vector<VertInd> > out;\n    std::vector<VertInd>::const_iterator it;\n    for(it = points.begin(); vi != *it; ++it)\n        out.first.push_back(*it);\n    for(it = it + 1; it != points.end(); ++it)\n        out.second.push_back(*it);\n    return out;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nTriInd Triangulation<T, TNearPointLocator>::triangulatePseudopolygon(\n    const VertInd ia,\n    const VertInd ib,\n    const std::vector<VertInd>& points)\n{\n    if(points.empty())\n        return pseudopolyOuterTriangle(ia, ib);\n    const VertInd ic = findDelaunayPoint(ia, ib, points);\n    const std::pair<std::vector<VertInd>, std::vector<VertInd> > splitted =\n        splitPseudopolygon(ic, points);\n    // triangulate splitted pseudo-polygons\n    TriInd iT2 = triangulatePseudopolygon(ic, ib, splitted.second);\n    TriInd iT1 = triangulatePseudopolygon(ia, ic, splitted.first);\n    // add new triangle\n    const Triangle t = {{ia, ib, ic}, {noNeighbor, iT2, iT1}};\n    const TriInd iT = addTriangle(t);\n    // adjust neighboring triangles and vertices\n    if(iT1 != noNeighbor)\n    {\n        if(splitted.first.empty())\n            changeNeighbor(iT1, ia, ic, iT);\n        else\n            triangles[iT1].neighbors[0] = iT;\n    }\n    if(iT2 != noNeighbor)\n    {\n        if(splitted.second.empty())\n            changeNeighbor(iT2, ic, ib, iT);\n        else\n            triangles[iT2].neighbors[0] = iT;\n    }\n    addAdjacentTriangle(ia, iT);\n    addAdjacentTriangle(ib, iT);\n    addAdjacentTriangle(ic, iT);\n\n    return iT;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nVertInd Triangulation<T, TNearPointLocator>::findDelaunayPoint(\n    const VertInd ia,\n    const VertInd ib,\n    const std::vector<VertInd>& points) const\n{\n    assert(!points.empty());\n    const V2d<T>& a = vertices[ia];\n    const V2d<T>& b = vertices[ib];\n    VertInd ic = points.front();\n    V2d<T> c = vertices[ic];\n    typedef std::vector<VertInd>::const_iterator CIt;\n    for(CIt it = points.begin() + 1; it != points.end(); ++it)\n    {\n        const V2d<T> v = vertices[*it];\n        if(!isInCircumcircle(v, a, b, c))\n            continue;\n        ic = *it;\n        c = vertices[ic];\n    }\n    return ic;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nTriInd Triangulation<T, TNearPointLocator>::pseudopolyOuterTriangle(\n    const VertInd ia,\n    const VertInd ib) const\n{\n    const std::vector<TriInd>& aTris = vertTris[ia];\n    const std::vector<TriInd>& bTris = vertTris[ib];\n    typedef std::vector<TriInd>::const_iterator TriIndCit;\n    for(TriIndCit it = aTris.begin(); it != aTris.end(); ++it)\n        if(std::find(bTris.begin(), bTris.end(), *it) != bTris.end())\n            return *it;\n    return noNeighbor;\n}\n\ntemplate <typename T, typename TNearPointLocator>\nvoid Triangulation<T, TNearPointLocator>::insertVertices(\n    const std::vector<V2d<T> >& newVertices)\n{\n    return insertVertices(\n        newVertices.begin(), newVertices.end(), getX_V2d<T>, getY_V2d<T>);\n}\n\ntemplate <typename T>\nDuplicatesInfo RemoveDuplicates(std::vector<V2d<T> >& vertices)\n{\n    const DuplicatesInfo di = FindDuplicates<T>(\n        vertices.begin(), vertices.end(), getX_V2d<T>, getY_V2d<T>);\n    RemoveDuplicates(vertices, di.duplicates);\n    return di;\n}\n\nCDT_INLINE_IF_HEADER_ONLY void\nRemapEdges(std::vector<Edge>& edges, const std::vector<std::size_t>& mapping)\n{\n    for(std::vector<Edge>::iterator it = edges.begin(); it != edges.end(); ++it)\n    {\n        *it = Edge(mapping[it->v1()], mapping[it->v2()]); // remap\n    }\n}\n\ntemplate <typename T>\nDuplicatesInfo RemoveDuplicatesAndRemapEdges(\n    std::vector<V2d<T> >& vertices,\n    std::vector<Edge>& edges)\n{\n    return RemoveDuplicatesAndRemapEdges<T>(\n        vertices, edges, getX_V2d<T>, getY_V2d<T>);\n}\n\nCDT_INLINE_IF_HEADER_ONLY\nunordered_map<TriInd, LayerDepth> PeelLayer(\n    std::stack<TriInd> seeds,\n    const TriangleVec& triangles,\n    const EdgeUSet& fixedEdges,\n    const unordered_map<Edge, BoundaryOverlapCount>& overlapCount,\n    const LayerDepth layerDepth,\n    std::vector<LayerDepth>& triDepths)\n{\n    unordered_map<TriInd, LayerDepth> behindBoundary;\n    while(!seeds.empty())\n    {\n        const TriInd iT = seeds.top();\n        seeds.pop();\n        triDepths[iT] = layerDepth;\n        behindBoundary.erase(iT);\n        const Triangle& t = triangles[iT];\n        for(Index i(0); i < Index(3); ++i)\n        {\n            const Edge opEdge(t.vertices[ccw(i)], t.vertices[cw(i)]);\n            const TriInd iN = t.neighbors[opoNbr(i)];\n            if(iN == noNeighbor || triDepths[iN] <= layerDepth)\n                continue;\n            if(fixedEdges.count(opEdge))\n            {\n                const unordered_map<Edge, LayerDepth>::const_iterator cit =\n                    overlapCount.find(opEdge);\n                const LayerDepth triDepth = cit == overlapCount.end()\n                                                ? layerDepth + 1\n                                                : layerDepth + cit->second + 1;\n                behindBoundary[iN] = triDepth;\n                continue;\n            }\n            seeds.push(iN);\n        }\n    }\n    return behindBoundary;\n}\n\nCDT_INLINE_IF_HEADER_ONLY\nTriIndUSet PeelLayer(\n    std::stack<TriInd> seeds,\n    const TriangleVec& triangles,\n    const EdgeUSet& fixedEdges,\n    const LayerDepth layerDepth,\n    std::vector<LayerDepth>& triDepths)\n{\n    TriIndUSet behindBoundary;\n    while(!seeds.empty())\n    {\n        const TriInd iT = seeds.top();\n        seeds.pop();\n        triDepths[iT] = layerDepth;\n        behindBoundary.erase(iT);\n        const Triangle& t = triangles[iT];\n        for(Index i(0); i < Index(3); ++i)\n        {\n            const Edge opEdge(t.vertices[ccw(i)], t.vertices[cw(i)]);\n            const TriInd iN = t.neighbors[opoNbr(i)];\n            if(iN == noNeighbor || triDepths[iN] <= layerDepth)\n                continue;\n            if(fixedEdges.count(opEdge))\n            {\n                behindBoundary.insert(iN);\n                continue;\n            }\n            seeds.push(iN);\n        }\n    }\n    return behindBoundary;\n}\n\nCDT_INLINE_IF_HEADER_ONLY\nstd::vector<LayerDepth> CalculateTriangleDepths(\n    const TriInd seed,\n    const TriangleVec& triangles,\n    const EdgeUSet& fixedEdges,\n    const unordered_map<Edge, BoundaryOverlapCount>& overlapCount)\n{\n    std::vector<LayerDepth> triDepths(\n        triangles.size(), std::numeric_limits<LayerDepth>::max());\n    std::stack<TriInd> seeds(TriDeque(1, seed));\n    LayerDepth layerDepth = 0;\n    LayerDepth deepestSeedDepth = 0;\n\n    unordered_map<LayerDepth, TriIndUSet> seedsByDepth;\n    do\n    {\n        const unordered_map<TriInd, LayerDepth>& newSeeds = PeelLayer(\n            seeds, triangles, fixedEdges, overlapCount, layerDepth, triDepths);\n\n        seedsByDepth.erase(layerDepth);\n        typedef unordered_map<TriInd, LayerDepth>::const_iterator Iter;\n        for(Iter it = newSeeds.begin(); it != newSeeds.end(); ++it)\n        {\n            deepestSeedDepth = std::max(deepestSeedDepth, it->second);\n            seedsByDepth[it->second].insert(it->first);\n        }\n        const TriIndUSet& nextLayerSeeds = seedsByDepth[layerDepth + 1];\n        seeds = std::stack<TriInd>(\n            TriDeque(nextLayerSeeds.begin(), nextLayerSeeds.end()));\n        ++layerDepth;\n    } while(!seeds.empty() || deepestSeedDepth > layerDepth);\n\n    return triDepths;\n}\n\nCDT_INLINE_IF_HEADER_ONLY\nstd::vector<LayerDepth> CalculateTriangleDepths(\n    const TriInd seed,\n    const TriangleVec& triangles,\n    const EdgeUSet& fixedEdges)\n{\n    std::vector<LayerDepth> triDepths(\n        triangles.size(), std::numeric_limits<LayerDepth>::max());\n    std::stack<TriInd> seeds(TriDeque(1, seed));\n    LayerDepth layerDepth = 0;\n\n    do\n    {\n        const TriIndUSet& newSeeds =\n            PeelLayer(seeds, triangles, fixedEdges, layerDepth++, triDepths);\n        seeds = std::stack<TriInd>(TriDeque(newSeeds.begin(), newSeeds.end()));\n    } while(!seeds.empty());\n\n    return triDepths;\n}\n\nCDT_INLINE_IF_HEADER_ONLY EdgeUSet\nextractEdgesFromTriangles(const TriangleVec& triangles)\n{\n    EdgeUSet edges;\n    typedef TriangleVec::const_iterator CIt;\n    for(CIt t = triangles.begin(); t != triangles.end(); ++t)\n    {\n        edges.insert(Edge(VertInd(t->vertices[0]), VertInd(t->vertices[1])));\n        edges.insert(Edge(VertInd(t->vertices[1]), VertInd(t->vertices[2])));\n        edges.insert(Edge(VertInd(t->vertices[2]), VertInd(t->vertices[0])));\n    }\n    return edges;\n}\n\n} // namespace CDT\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/include/CDTUtils.h",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\n/**\n * @file\n * Utilities and helpers\n */\n\n#ifndef CDT_obwOaxOTdAWcLNTlNnaq\n#define CDT_obwOaxOTdAWcLNTlNnaq\n\n#ifdef CDT_DONT_USE_BOOST_RTREE\n// CDT_DONT_USE_BOOST_RTREE was replaced with CDT_USE_BOOST\ntypedef char CDT_DONT_USE_BOOST_RTREE__was__replaced__with__CDT_USE_BOOST[-1];\n#endif\n\n// #define CDT_USE_STRONG_TYPING // strong type checks on indices\n\n// check if c++11 is supported\n#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)\n#define CDT_CXX11_IS_SUPPORTED\n#elif !defined(__cplusplus) && !defined(_MSC_VER)\ntypedef char couldnt_parse_cxx_standard[-1]; ///< Error: couldn't parse standard\n#endif\n\n// Functions defined outside the class need to be 'inline'\n// if CDT is configured to be used as header-only library:\n// single-definition rule is violated otherwise\n#ifdef CDT_USE_AS_COMPILED_LIBRARY\n#define CDT_INLINE_IF_HEADER_ONLY\n#include \"cdt_export.h\" // automatically generated by CMake\n#else\n/**\n * Macro for inlining non-template functions when in header-only mode to\n * avoid multiple declaration errors.\n */\n#define CDT_INLINE_IF_HEADER_ONLY inline\n/// Export not needed in header-only mode\n#define CDT_EXPORT\n#endif\n\n#include <cassert>\n#include <cmath>\n#include <limits>\n#include <vector>\n\n#ifdef CDT_USE_BOOST\n#include <boost/container/flat_set.hpp>\n#endif\n\n// use fall-backs for c++11 features\n#ifdef CDT_CXX11_IS_SUPPORTED\n\n#include <array>\n#include <functional>\n#include <random>\n#include <tuple>\n#include <unordered_map>\n#include <unordered_set>\nnamespace CDT\n{\nusing std::array;\nusing std::make_tuple;\nusing std::mt19937;\nusing std::tie;\nusing std::tuple;\nusing std::unordered_map;\nusing std::unordered_set;\n} // namespace CDT\n\n#else\n#include <boost/array.hpp>\n#include <boost/functional/hash.hpp>\n#include <boost/random.hpp>\n#include <boost/tuple/tuple.hpp>\n#include <boost/unordered_map.hpp>\n#include <boost/unordered_set.hpp>\nnamespace CDT\n{\nusing boost::array;\nusing boost::make_tuple;\nusing boost::tie;\nusing boost::tuple;\nusing boost::unordered_map;\nusing boost::unordered_set;\nusing boost::random::mt19937;\n} // namespace CDT\n#endif\n\nnamespace CDT\n{\n\n/// 2D vector\ntemplate <typename T>\nstruct CDT_EXPORT V2d\n{\n    T x; ///< X-coordinate\n    T y; ///< Y-coordinate\n\n    /// Create vector from X and Y coordinates\n    static V2d make(const T x, const T y);\n};\n\n/// X- coordinate getter for V2d\ntemplate <typename T>\nconst T& getX_V2d(const V2d<T>& v)\n{\n    return v.x;\n}\n\n/// Y-coordinate getter for V2d\ntemplate <typename T>\nconst T& getY_V2d(const V2d<T>& v)\n{\n    return v.y;\n}\n\n/// If two 2D vectors are exactly equal\ntemplate <typename T>\nCDT_EXPORT bool operator==(const CDT::V2d<T>& lhs, const CDT::V2d<T>& rhs)\n{\n    return lhs.x == rhs.x && lhs.y == rhs.y;\n}\n\n#ifdef CDT_USE_64_BIT_INDEX_TYPE\ntypedef unsigned long long IndexSizeType;\n#else\ntypedef unsigned int IndexSizeType;\n#endif\n\n#ifndef CDT_USE_STRONG_TYPING\n/// Index in triangle\ntypedef unsigned char Index;\n/// Vertex index\ntypedef IndexSizeType VertInd;\n/// Triangle index\ntypedef IndexSizeType TriInd;\n#else\n/// Index in triangle\nBOOST_STRONG_TYPEDEF(unsigned char, Index);\n/// Vertex index\nBOOST_STRONG_TYPEDEF(IndexSizeType, VertInd);\n/// Triangle index\nBOOST_STRONG_TYPEDEF(IndexSizeType, TriInd);\n#endif\n\ntypedef std::vector<TriInd> TriIndVec;  ///< Vector of triangle indices\ntypedef array<VertInd, 3> VerticesArr3; ///< array of three vertex indices\ntypedef array<TriInd, 3> NeighborsArr3; ///< array of three neighbors\n\n/// 2D bounding box\ntemplate <typename T>\nstruct CDT_EXPORT Box2d\n{\n    V2d<T> min; ///< min box corner\n    V2d<T> max; ///< max box corner\n};\n\n/// Bounding box of a collection of custom 2D points given coordinate getters\ntemplate <\n    typename T,\n    typename TVertexIter,\n    typename TGetVertexCoordX,\n    typename TGetVertexCoordY>\nCDT_EXPORT Box2d<T> envelopBox(\n    TVertexIter first,\n    TVertexIter last,\n    TGetVertexCoordX getX,\n    TGetVertexCoordY getY)\n{\n    const T max = std::numeric_limits<T>::max();\n    Box2d<T> box = {{max, max}, {-max, -max}};\n    for(; first != last; ++first)\n    {\n        box.min.x = std::min(getX(*first), box.min.x);\n        box.max.x = std::max(getX(*first), box.max.x);\n        box.min.y = std::min(getY(*first), box.min.y);\n        box.max.y = std::max(getY(*first), box.max.y);\n    }\n    return box;\n}\n\n/// Bounding box of a collection of 2D points\ntemplate <typename T>\nCDT_EXPORT Box2d<T> envelopBox(const std::vector<V2d<T> >& vertices);\n\n/// Edge connecting two vertices: vertex with smaller index is always first\n/// \\note: hash Edge is specialized at the bottom\nstruct CDT_EXPORT Edge\n{\n    /// Constructor\n    Edge(VertInd iV1, VertInd iV2);\n    /// Assignment operator\n    bool operator==(const Edge& other) const;\n    /// V1 getter\n    VertInd v1() const;\n    /// V2 getter\n    VertInd v2() const;\n    /// Edges' vertices\n    const std::pair<VertInd, VertInd>& verts() const;\n\nprivate:\n    std::pair<VertInd, VertInd> m_vertices;\n};\n\n/// Get edge first vertex\ninline VertInd edge_get_v1(const Edge& e)\n{\n    return e.v1();\n}\n\n/// Get edge second vertex\ninline VertInd edge_get_v2(const Edge& e)\n{\n    return e.v2();\n}\n\ntypedef unordered_set<Edge> EdgeUSet;             ///< Hash table of edges\ntypedef unordered_set<TriInd> TriIndUSet;         ///< Hash table of triangles\ntypedef unordered_map<TriInd, TriInd> TriIndUMap; ///< Triangle hash map\n#ifdef CDT_USE_BOOST\n/// Flat hash table of triangles\ntypedef boost::container::flat_set<TriInd> TriIndFlatUSet;\n#endif\n\n/// Triangulation triangle (CCW winding)\n/* Counter-clockwise winding:\n       v3\n       /\\\n    n3/  \\n2\n     /____\\\n   v1  n1  v2                 */\nstruct CDT_EXPORT Triangle\n{\n    VerticesArr3 vertices;   ///< triangle's three vertices\n    NeighborsArr3 neighbors; ///< triangle's three neighbors\n\n    /**\n     * Factory method\n     * @note needed for c++03 compatibility (no uniform initialization\n     * available)\n     */\n    static Triangle\n    make(const array<VertInd, 3>& vertices, const array<TriInd, 3>& neighbors)\n    {\n        Triangle t;\n        t.vertices = vertices;\n        t.neighbors = neighbors;\n        return t;\n    }\n};\n\ntypedef std::vector<Triangle> TriangleVec; ///< Vector of triangles\n\n/// Advance vertex or neighbor index counter-clockwise\nCDT_EXPORT Index ccw(Index i);\n\n/// Advance vertex or neighbor index clockwise\nCDT_EXPORT Index cw(Index i);\n\n/// Location of point on a triangle\nstruct CDT_EXPORT PtTriLocation\n{\n    /// Enum\n    enum Enum\n    {\n        Inside,\n        Outside,\n        OnEdge1,\n        OnEdge2,\n        OnEdge3,\n    };\n};\n\n/// Check if location is classified as on any of three edges\nCDT_EXPORT bool isOnEdge(const PtTriLocation::Enum location);\n\n/// Neighbor index from a on-edge location\n/// \\note Call only if located on the edge!\nCDT_EXPORT Index edgeNeighbor(const PtTriLocation::Enum location);\n\n/// Relative location of point to a line\nstruct CDT_EXPORT PtLineLocation\n{\n    /// Enum\n    enum Enum\n    {\n        Left,\n        Right,\n        OnLine,\n    };\n};\n\n/// Check if point lies to the left of, to the right of, or on a line\ntemplate <typename T>\nPtLineLocation::Enum CDT_EXPORT\nlocatePointLine(const V2d<T>& p, const V2d<T>& v1, const V2d<T>& v2);\n\n/// Check if point a lies inside of, outside of, or on an edge of a triangle\ntemplate <typename T>\nCDT_EXPORT PtTriLocation::Enum locatePointTriangle(\n    const V2d<T>& p,\n    const V2d<T>& v1,\n    const V2d<T>& v2,\n    const V2d<T>& v3);\n\n/// Opposed neighbor index from vertex index\nCDT_EXPORT inline Index opoNbr(const Index vertIndex);\n\n/// Opposed vertex index from neighbor index\nCDT_EXPORT inline Index opoVrt(const Index neighborIndex);\n\n/// Index of triangle's neighbor opposed to a vertex\nCDT_EXPORT inline Index\nopposedTriangleInd(const Triangle& tri, const VertInd iVert);\n\n/// Index of triangle's neighbor opposed to an edge\nCDT_EXPORT inline Index opposedTriangleInd(\n    const Triangle& tri,\n    const VertInd iVedge1,\n    const VertInd iVedge2);\n\n/// Index of triangle's vertex opposed to a triangle\nCDT_EXPORT inline Index\nopposedVertexInd(const Triangle& tri, const TriInd iTopo);\n\n/// If triangle has a given neighbor return neighbor-index, throw otherwise\nCDT_EXPORT inline Index neighborInd(const Triangle& tri, const TriInd iTnbr);\n\n/// If triangle has a given vertex return vertex-index, throw otherwise\nCDT_EXPORT inline Index vertexInd(const Triangle& tri, const VertInd iV);\n\n/// Given triangle and a vertex find opposed triangle\nCDT_EXPORT inline TriInd\nopposedTriangle(const Triangle& tri, const VertInd iVert);\n\n/// Given two triangles, return vertex of first triangle opposed to the second\nCDT_EXPORT inline VertInd\nopposedVertex(const Triangle& tri, const TriInd iTopo);\n\n/// Test if point lies in a circumscribed circle of a triangle\ntemplate <typename T>\nCDT_EXPORT bool isInCircumcircle(\n    const V2d<T>& p,\n    const V2d<T>& v1,\n    const V2d<T>& v2,\n    const V2d<T>& v3);\n\n/// Test if two vertices share at least one common triangle\nCDT_EXPORT inline bool\nverticesShareEdge(const TriIndVec& aTris, const TriIndVec& bTris);\n\n/// Distance between two 2D points\ntemplate <typename T>\nCDT_EXPORT T distance(const V2d<T>& a, const V2d<T>& b);\n\n/// Squared distance between two 2D points\ntemplate <typename T>\nCDT_EXPORT T distanceSquared(const V2d<T>& a, const V2d<T>& b);\n\n} // namespace CDT\n\n#ifndef CDT_USE_AS_COMPILED_LIBRARY\n#include \"CDTUtils.hpp\"\n#endif\n\n//*****************************************************************************\n// Specialize hash functions\n//*****************************************************************************\n#ifdef CDT_CXX11_IS_SUPPORTED\nnamespace std\n#else\nnamespace boost\n#endif\n{\n\n#ifdef CDT_USE_STRONG_TYPING\n\n/// Vertex index hasher\ntemplate <>\nstruct hash<CDT::VertInd>\n{\n    /// Hash operator\n    std::size_t operator()(const CDT::VertInd& vi) const\n    {\n        return std::hash<std::size_t>()(vi.t);\n    }\n};\n\n/// Triangle index hasher\ntemplate <>\nstruct hash<CDT::TriInd>\n{\n    /// Hash operator\n    std::size_t operator()(const CDT::TriInd& vi) const\n    {\n        return std::hash<std::size_t>()(vi.t);\n    }\n};\n\n#endif // CDT_USE_STRONG_TYPING\n\n/// Edge hasher\ntemplate <>\nstruct hash<CDT::Edge>\n{\n    /// Hash operator\n    std::size_t operator()(const CDT::Edge& e) const\n    {\n        return hashEdge(e);\n    }\n\nprivate:\n    static void hashCombine(std::size_t& seed, const CDT::VertInd& key)\n    {\n#ifdef CDT_CXX11_IS_SUPPORTED\n        typedef std::hash<CDT::VertInd> Hasher;\n#else\n        typedef boost::hash<CDT::VertInd> Hasher;\n#endif\n        seed ^= Hasher()(key) + 0x9e3779b9 + (seed << 6) + (seed >> 2);\n    }\n    static std::size_t hashEdge(const CDT::Edge& e)\n    {\n        const std::pair<CDT::VertInd, CDT::VertInd>& vv = e.verts();\n        std::size_t seed1(0);\n        hashCombine(seed1, vv.first);\n        hashCombine(seed1, vv.second);\n        std::size_t seed2(0);\n        hashCombine(seed2, vv.second);\n        hashCombine(seed2, vv.first);\n        return std::min(seed1, seed2);\n    }\n};\n} // namespace std/boost\n\n#endif // header guard\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/include/CDTUtils.hpp",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\n/**\n * @file\n * Utilities and helpers - implementation\n */\n\n#include \"CDTUtils.h\"\n\n//! @{ Doxygen suppression\n#include \"predicates.h\" // robust predicates: orient, in-circle\n//! @}\n\n#include <stdexcept>\n\nnamespace CDT\n{\n\n//*****************************************************************************\n// V2d\n//*****************************************************************************\ntemplate <typename T>\nV2d<T> V2d<T>::make(const T x, const T y)\n{\n    V2d<T> out = {x, y};\n    return out;\n}\n\n//*****************************************************************************\n// Box2d\n//*****************************************************************************\ntemplate <typename T>\nBox2d<T> envelopBox(const std::vector<V2d<T> >& vertices)\n{\n    return envelopBox<T>(\n        vertices.begin(), vertices.end(), getX_V2d<T>, getY_V2d<T>);\n}\n\n//*****************************************************************************\n// Edge\n//*****************************************************************************\nCDT_INLINE_IF_HEADER_ONLY Edge::Edge(VertInd iV1, VertInd iV2)\n    : m_vertices(\n          iV1 < iV2 ? std::make_pair(iV1, iV2) : std::make_pair(iV2, iV1))\n{}\n\nCDT_INLINE_IF_HEADER_ONLY bool Edge::operator==(const Edge& other) const\n{\n    return m_vertices == other.m_vertices;\n}\n\nCDT_INLINE_IF_HEADER_ONLY VertInd Edge::v1() const\n{\n    return m_vertices.first;\n}\n\nCDT_INLINE_IF_HEADER_ONLY VertInd Edge::v2() const\n{\n    return m_vertices.second;\n}\n\nCDT_INLINE_IF_HEADER_ONLY const std::pair<VertInd, VertInd>& Edge::verts() const\n{\n    return m_vertices;\n}\n\n//*****************************************************************************\n// Utility functions\n//*****************************************************************************\nCDT_INLINE_IF_HEADER_ONLY Index ccw(Index i)\n{\n    return Index((i + 1) % 3);\n}\n\nCDT_INLINE_IF_HEADER_ONLY Index cw(Index i)\n{\n    return Index((i + 2) % 3);\n}\n\nCDT_INLINE_IF_HEADER_ONLY bool isOnEdge(const PtTriLocation::Enum location)\n{\n    return location > PtTriLocation::Outside;\n}\n\nCDT_INLINE_IF_HEADER_ONLY Index edgeNeighbor(const PtTriLocation::Enum location)\n{\n    assert(location >= PtTriLocation::OnEdge1);\n    return static_cast<Index>(location - PtTriLocation::OnEdge1);\n}\n\n/// Check if point lies to the left of, to the right of, or on a line\ntemplate <typename T>\nPtLineLocation::Enum\nlocatePointLine(const V2d<T>& p, const V2d<T>& v1, const V2d<T>& v2)\n{\n    using namespace predicates::adaptive;\n    const T orientation = orient2d(v1.x, v1.y, v2.x, v2.y, p.x, p.y);\n    if(orientation < T(0))\n        return PtLineLocation::Right;\n    if(orientation == T(0))\n        return PtLineLocation::OnLine;\n    return PtLineLocation::Left;\n}\n\n/// Check if point a lies inside of, outside of, or on an edge of a triangle\ntemplate <typename T>\nPtTriLocation::Enum locatePointTriangle(\n    const V2d<T>& p,\n    const V2d<T>& v1,\n    const V2d<T>& v2,\n    const V2d<T>& v3)\n{\n    using namespace predicates::adaptive;\n    PtTriLocation::Enum result = PtTriLocation::Inside;\n    PtLineLocation::Enum edgeCheck = locatePointLine(p, v1, v2);\n    if(edgeCheck == PtLineLocation::Right)\n        return PtTriLocation::Outside;\n    if(edgeCheck == PtLineLocation::OnLine)\n        result = PtTriLocation::OnEdge1;\n    edgeCheck = locatePointLine(p, v2, v3);\n    if(edgeCheck == PtLineLocation::Right)\n        return PtTriLocation::Outside;\n    if(edgeCheck == PtLineLocation::OnLine)\n        result = PtTriLocation::OnEdge2;\n    edgeCheck = locatePointLine(p, v3, v1);\n    if(edgeCheck == PtLineLocation::Right)\n        return PtTriLocation::Outside;\n    if(edgeCheck == PtLineLocation::OnLine)\n        result = PtTriLocation::OnEdge3;\n    return result;\n}\n\nCDT_INLINE_IF_HEADER_ONLY Index opoNbr(const Index vertIndex)\n{\n    if(vertIndex == Index(0))\n        return Index(1);\n    if(vertIndex == Index(1))\n        return Index(2);\n    if(vertIndex == Index(2))\n        return Index(0);\n    throw std::runtime_error(\"Invalid vertex index\");\n}\n\nCDT_INLINE_IF_HEADER_ONLY Index opoVrt(const Index neighborIndex)\n{\n    if(neighborIndex == Index(0))\n        return Index(2);\n    if(neighborIndex == Index(1))\n        return Index(0);\n    if(neighborIndex == Index(2))\n        return Index(1);\n    throw std::runtime_error(\"Invalid neighbor index\");\n}\n\nCDT_INLINE_IF_HEADER_ONLY Index\nopposedTriangleInd(const Triangle& tri, const VertInd iVert)\n{\n    for(Index vi = Index(0); vi < Index(3); ++vi)\n        if(iVert == tri.vertices[vi])\n            return opoNbr(vi);\n    throw std::runtime_error(\"Could not find opposed triangle index\");\n}\n\nCDT_INLINE_IF_HEADER_ONLY Index opposedTriangleInd(\n    const Triangle& tri,\n    const VertInd iVedge1,\n    const VertInd iVedge2)\n{\n    for(Index vi = Index(0); vi < Index(3); ++vi)\n    {\n        const VertInd iVert = tri.vertices[vi];\n        if(iVert != iVedge1 && iVert != iVedge2)\n            return opoNbr(vi);\n    }\n    throw std::runtime_error(\"Could not find opposed-to-edge triangle index\");\n}\n\nCDT_INLINE_IF_HEADER_ONLY Index\nopposedVertexInd(const Triangle& tri, const TriInd iTopo)\n{\n    for(Index ni = Index(0); ni < Index(3); ++ni)\n        if(iTopo == tri.neighbors[ni])\n            return opoVrt(ni);\n    throw std::runtime_error(\"Could not find opposed vertex index\");\n}\n\nCDT_INLINE_IF_HEADER_ONLY Index\nneighborInd(const Triangle& tri, const TriInd iTnbr)\n{\n    for(Index ni = Index(0); ni < Index(3); ++ni)\n        if(iTnbr == tri.neighbors[ni])\n            return ni;\n    throw std::runtime_error(\"Could not find neighbor triangle index\");\n}\n\nCDT_INLINE_IF_HEADER_ONLY Index vertexInd(const Triangle& tri, const VertInd iV)\n{\n    for(Index i = Index(0); i < Index(3); ++i)\n        if(iV == tri.vertices[i])\n            return i;\n    throw std::runtime_error(\"Could not find vertex index in triangle\");\n}\n\nCDT_INLINE_IF_HEADER_ONLY TriInd\nopposedTriangle(const Triangle& tri, const VertInd iVert)\n{\n    return tri.neighbors[opposedTriangleInd(tri, iVert)];\n}\n\nCDT_INLINE_IF_HEADER_ONLY VertInd\nopposedVertex(const Triangle& tri, const TriInd iTopo)\n{\n    return tri.vertices[opposedVertexInd(tri, iTopo)];\n}\n\ntemplate <typename T>\nbool isInCircumcircle(\n    const V2d<T>& p,\n    const V2d<T>& v1,\n    const V2d<T>& v2,\n    const V2d<T>& v3)\n{\n    using namespace predicates::adaptive;\n    return incircle(v1.x, v1.y, v2.x, v2.y, v3.x, v3.y, p.x, p.y) > T(0);\n}\n\nCDT_INLINE_IF_HEADER_ONLY\nbool verticesShareEdge(const TriIndVec& aTris, const TriIndVec& bTris)\n{\n    for(TriIndVec::const_iterator it = aTris.begin(); it != aTris.end(); ++it)\n        if(std::find(bTris.begin(), bTris.end(), *it) != bTris.end())\n            return true;\n    return false;\n}\n\ntemplate <typename T>\nT distanceSquared(const T ax, const T ay, const T bx, const T by)\n{\n    const T dx = bx - ax;\n    const T dy = by - ay;\n    return dx * dx + dy * dy;\n}\n\ntemplate <typename T>\nT distance(const T ax, const T ay, const T bx, const T by)\n{\n    return std::sqrt(distanceSquared(ax, ay, bx, by));\n}\n\ntemplate <typename T>\nT distance(const V2d<T>& a, const V2d<T>& b)\n{\n    return distance(a.x, a.y, b.x, b.y);\n}\n\ntemplate <typename T>\nT distanceSquared(const V2d<T>& a, const V2d<T>& b)\n{\n    return distanceSquared(a.x, a.y, b.x, b.y);\n}\n\n} // namespace CDT\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/include/KDTree.h",
    "content": "/// This Source Code Form is subject to the terms of the Mozilla Public\n/// License, v. 2.0. If a copy of the MPL was not distributed with this\n/// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n/// Contribution of original implementation:\n/// Andre Fecteau <andre.fecteau1@gmail.com>\n\n#ifndef KDTREE_KDTREE_H\n#define KDTREE_KDTREE_H\n\n#include \"CDTUtils.h\"\n\n#include <cassert>\n#include <limits>\n\nnamespace KDTree\n{\n\nstruct NodeSplitDirection\n{\n    enum Enum\n    {\n        X,\n        Y,\n    };\n};\n\n/// Simple tree structure with alternating half splitting nodes\n/// @details Simple tree structure\n///          - Tree to incrementally add points to the structure.\n///          - Get the nearest point to a given input.\n///          - Does not check for duplicates, expect unique points.\n/// @tparam TCoordType type used for storing point coordinate.\n/// @tparam NumVerticesInLeaf The number of points per leaf.\n/// @tparam InitialStackDepth initial size of stack depth for nearest query.\n/// Should be at least 1.\n/// @tparam StackDepthIncrement increment of stack depth for nearest query when\n/// stack depth is reached.\ntemplate <\n    typename TCoordType,\n    size_t NumVerticesInLeaf,\n    size_t InitialStackDepth,\n    size_t StackDepthIncrement>\nclass KDTree\n{\npublic:\n    typedef TCoordType coord_type;\n    typedef CDT::V2d<coord_type> point_type;\n    typedef CDT::VertInd point_index;\n    typedef std::pair<point_type, point_index> value_type;\n    typedef std::vector<point_index> point_data_vec;\n    typedef point_data_vec::const_iterator pd_cit;\n    typedef CDT::VertInd node_index;\n    typedef CDT::array<node_index, 2> children_type;\n\n    /// Stores kd-tree node data\n    struct Node\n    {\n        children_type children; ///< two children if not leaf; {0,0} if leaf\n        point_data_vec data;    ///< points' data if leaf\n        /// Create empty leaf\n        Node()\n        {\n            setChildren(0, 0);\n            data.reserve(NumVerticesInLeaf);\n        }\n        /// Children setter for convenience\n        void setChildren(const node_index c1, const node_index c2)\n        {\n            children[0] = c1;\n            children[1] = c2;\n        }\n        /// Check if node is a leaf (has no valid children)\n        bool isLeaf() const\n        {\n            return children[0] == children[1];\n        }\n    };\n\n    /// Default constructor\n    KDTree()\n        : m_rootDir(NodeSplitDirection::X)\n        , m_min(point_type::make(\n              -std::numeric_limits<coord_type>::max(),\n              -std::numeric_limits<coord_type>::max()))\n        , m_max(point_type::make(\n              std::numeric_limits<coord_type>::max(),\n              std::numeric_limits<coord_type>::max()))\n        , m_isRootBoxInitialized(false)\n        , m_tasksStack(InitialStackDepth, NearestTask())\n    {\n        m_root = addNewNode();\n    }\n\n    /// Insert a point into kd-tree\n    /// @note external point-buffer is used to reduce kd-tree's memory footprint\n    /// @param iPoint index of point in external point-buffer\n    /// @param points external point-buffer\n    void\n    insert(const point_index& iPoint, const std::vector<point_type>& points)\n    {\n        // if point is outside root, extend tree by adding new roots\n        const point_type& pos = points[iPoint];\n        while(!isInsideBox(pos, m_min, m_max))\n        {\n            extendTree(pos);\n        }\n        // now insert the point into the tree\n        node_index node = m_root;\n        point_type min = m_min;\n        point_type max = m_max;\n        NodeSplitDirection::Enum dir = m_rootDir;\n\n        coord_type mid;\n        NodeSplitDirection::Enum newDir;\n        point_type newMin, newMax;\n        while(true)\n        {\n            if(m_nodes[node].isLeaf())\n            {\n                // add point if capacity is not reached\n                point_data_vec& pd = m_nodes[node].data;\n                if(pd.size() < NumVerticesInLeaf)\n                {\n                    pd.push_back(iPoint);\n                    return;\n                }\n                // initialize bbox first time the root capacity is reached\n                if(!m_isRootBoxInitialized)\n                {\n                    initializeRootBox(points);\n                    min = m_min;\n                    max = m_max;\n                }\n                // split a full leaf node\n                calcSplitInfo(min, max, dir, mid, newDir, newMin, newMax);\n                const node_index c1 = addNewNode(), c2 = addNewNode();\n                Node& n = m_nodes[node];\n                n.setChildren(c1, c2);\n                point_data_vec& c1data = m_nodes[c1].data;\n                point_data_vec& c2data = m_nodes[c2].data;\n                // move node's points to children\n                for(pd_cit it = n.data.begin(); it != n.data.end(); ++it)\n                {\n                    whichChild(points[*it], mid, dir) == 0\n                        ? c1data.push_back(*it)\n                        : c2data.push_back(*it);\n                }\n                n.data = point_data_vec();\n            }\n            else\n            {\n                calcSplitInfo(min, max, dir, mid, newDir, newMin, newMax);\n            }\n            // add the point to a child\n            const std::size_t iChild = whichChild(points[iPoint], mid, dir);\n            iChild == 0 ? max = newMax : min = newMin;\n            node = m_nodes[node].children[iChild];\n            dir = newDir;\n        }\n    }\n\n    /// Query kd-tree for a nearest neighbor point\n    /// @note external point-buffer is used to reduce kd-tree's memory footprint\n    /// @param point query point position\n    /// @param points external point-buffer\n    value_type nearest(\n        const point_type& point,\n        const std::vector<point_type>& points) const\n    {\n        value_type out;\n        int iTask = -1;\n        coord_type minDistSq = std::numeric_limits<coord_type>::max();\n        m_tasksStack[++iTask] =\n            NearestTask(m_root, m_min, m_max, m_rootDir, minDistSq);\n        while(iTask != -1)\n        {\n            const NearestTask t = m_tasksStack[iTask--];\n            if(t.distSq > minDistSq)\n                continue;\n            const Node& n = m_nodes[t.node];\n            if(n.isLeaf())\n            {\n                for(pd_cit it = n.data.begin(); it != n.data.end(); ++it)\n                {\n                    const point_type& p = points[*it];\n                    const coord_type distSq = CDT::distanceSquared(point, p);\n                    if(distSq < minDistSq)\n                    {\n                        minDistSq = distSq;\n                        out.first = p;\n                        out.second = *it;\n                    }\n                }\n            }\n            else\n            {\n                coord_type mid;\n                NodeSplitDirection::Enum newDir;\n                point_type newMin, newMax;\n                calcSplitInfo(t.min, t.max, t.dir, mid, newDir, newMin, newMax);\n\n                const coord_type distToMid = t.dir == NodeSplitDirection::X\n                                                 ? (point.x - mid)\n                                                 : (point.y - mid);\n                const coord_type toMidSq = distToMid * distToMid;\n\n                const std::size_t iChild = whichChild(point, mid, t.dir);\n                if(iTask + 2 >= m_tasksStack.size())\n                {\n                    m_tasksStack.resize(\n                        m_tasksStack.size() + StackDepthIncrement);\n                }\n                // node containing point should end up on top of the stack\n                if(iChild == 0)\n                {\n                    m_tasksStack[++iTask] = NearestTask(\n                        n.children[1], newMin, t.max, newDir, toMidSq);\n                    m_tasksStack[++iTask] = NearestTask(\n                        n.children[0], t.min, newMax, newDir, toMidSq);\n                }\n                else\n                {\n                    m_tasksStack[++iTask] = NearestTask(\n                        n.children[0], t.min, newMax, newDir, toMidSq);\n                    m_tasksStack[++iTask] = NearestTask(\n                        n.children[1], newMin, t.max, newDir, toMidSq);\n                }\n            }\n        }\n        return out;\n    }\n\nprivate:\n    /// Add a new node and return it's index in nodes buffer\n    node_index addNewNode()\n    {\n        const node_index newNodeIndex = m_nodes.size();\n        m_nodes.push_back(Node());\n        return newNodeIndex;\n    }\n\n    /// Test which child point belongs to after the split\n    /// @returns 0 if first child, 1 if second child\n    std::size_t whichChild(\n        const point_type& point,\n        const coord_type& split,\n        const NodeSplitDirection::Enum dir) const\n    {\n        return static_cast<size_t>(\n            dir == NodeSplitDirection::X ? point.x > split : point.y > split);\n    }\n\n    /// Calculate split location, direction, and children boxes\n    static void calcSplitInfo(\n        const point_type& min,\n        const point_type& max,\n        const NodeSplitDirection::Enum dir,\n        coord_type& midOut,\n        NodeSplitDirection::Enum& newDirOut,\n        point_type& newMinOut,\n        point_type& newMaxOut)\n    {\n        newMaxOut = max;\n        newMinOut = min;\n        switch(dir)\n        {\n        case NodeSplitDirection::X:\n            midOut = (min.x + max.x) / coord_type(2);\n            newDirOut = NodeSplitDirection::Y;\n            newMinOut.x = midOut;\n            newMaxOut.x = midOut;\n            return;\n        case NodeSplitDirection::Y:\n            midOut = (min.y + max.y) / coord_type(2);\n            newDirOut = NodeSplitDirection::X;\n            newMinOut.y = midOut;\n            newMaxOut.y = midOut;\n            return;\n        }\n    }\n\n    /// Test if point is inside a box\n    static bool isInsideBox(\n        const point_type& p,\n        const point_type& min,\n        const point_type& max)\n    {\n        return p.x >= min.x && p.x <= max.x && p.y >= min.y && p.y <= max.y;\n    }\n\n    /// Extend a tree by creating new root with old root and a new node as\n    /// children\n    void extendTree(const point_type& point)\n    {\n        const node_index newRoot = addNewNode();\n        const node_index newLeaf = addNewNode();\n        switch(m_rootDir)\n        {\n        case NodeSplitDirection::X:\n            m_rootDir = NodeSplitDirection::Y;\n            point.y < m_min.y ? m_nodes[newRoot].setChildren(newLeaf, m_root)\n                              : m_nodes[newRoot].setChildren(m_root, newLeaf);\n            if(point.y < m_min.y)\n                m_min.y -= m_max.y - m_min.y;\n            else if(point.y > m_max.y)\n                m_max.y += m_max.y - m_min.y;\n            break;\n        case NodeSplitDirection::Y:\n            m_rootDir = NodeSplitDirection::X;\n            point.x < m_min.x ? m_nodes[newRoot].setChildren(newLeaf, m_root)\n                              : m_nodes[newRoot].setChildren(m_root, newLeaf);\n            if(point.x < m_min.x)\n                m_min.x -= m_max.x - m_min.x;\n            else if(point.x > m_max.x)\n                m_max.x += m_max.x - m_min.x;\n            break;\n        }\n        m_root = newRoot;\n    }\n\n    /// Calculate root's box enclosing all root points\n    void initializeRootBox(const std::vector<point_type>& points)\n    {\n        const point_data_vec& data = m_nodes[m_root].data;\n        m_min = points[data.front()];\n        m_max = m_min;\n        for(pd_cit it = data.begin(); it != data.end(); ++it)\n        {\n            const point_type& p = points[*it];\n            m_min = point_type::make(\n                std::min(m_min.x, p.x), std::min(m_min.y, p.y));\n            m_max = point_type::make(\n                std::max(m_max.x, p.x), std::max(m_max.y, p.y));\n        }\n        m_isRootBoxInitialized = true;\n    }\n\nprivate:\n    node_index m_root;\n    std::vector<Node> m_nodes;\n    NodeSplitDirection::Enum m_rootDir;\n    point_type m_min;\n    point_type m_max;\n    bool m_isRootBoxInitialized;\n\n    // used for nearest query\n    struct NearestTask\n    {\n        node_index node;\n        point_type min, max;\n        NodeSplitDirection::Enum dir;\n        coord_type distSq;\n        NearestTask()\n        {}\n        NearestTask(\n            const node_index node,\n            const point_type& min,\n            const point_type& max,\n            const NodeSplitDirection::Enum dir,\n            const coord_type distSq)\n            : node(node)\n            , min(min)\n            , max(max)\n            , dir(dir)\n            , distSq(distSq)\n        {}\n    };\n    // allocated in class (not in the 'nearest' method) for better performance\n    mutable std::vector<NearestTask> m_tasksStack;\n};\n\n} // namespace KDTree\n\n#endif // header guard"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/include/LocatorKDTree.h",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\n/**\n * @file\n * Adapter between for KDTree and CDT\n */\n\n#ifndef CDT_POINTKDTREE_H\n#define CDT_POINTKDTREE_H\n\n#include \"CDTUtils.h\"\n#include \"KDTree.h\"\n\nnamespace CDT\n{\n\n/// KD-tree holding points\ntemplate <\n    typename TCoordType,\n    size_t NumVerticesInLeaf = 32,\n    size_t InitialStackDepth = 32,\n    size_t StackDepthIncrement = 32>\nclass LocatorKDTree\n{\npublic:\n    /// Add point to R-tree\n    void addPoint(const VertInd i, const std::vector<V2d<TCoordType> >& points)\n    {\n        m_kdTree.insert(i, points);\n    }\n    /// Find nearest point using R-tree\n    VertInd nearPoint(\n        const V2d<TCoordType>& pos,\n        const std::vector<V2d<TCoordType> >& points) const\n    {\n        return m_kdTree.nearest(pos, points).second;\n    }\n\nprivate:\n    KDTree::KDTree<\n        TCoordType,\n        NumVerticesInLeaf,\n        InitialStackDepth,\n        StackDepthIncrement>\n        m_kdTree;\n};\n\n} // namespace CDT\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/include/predicates.h",
    "content": "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n *                                                                                 *\n * Copyright (c) 2019, William C. Lenthe                                           *\n * All rights reserved.                                                            *\n *                                                                                 *\n * Redistribution and use in source and binary forms, with or without              *\n * modification, are permitted provided that the following conditions are met:     *\n *                                                                                 *\n * 1. Redistributions of source code must retain the above copyright notice, this  *\n *    list of conditions and the following disclaimer.                             *\n *                                                                                 *\n * 2. Redistributions in binary form must reproduce the above copyright notice,    *\n *    this list of conditions and the following disclaimer in the documentation    *\n *    and/or other materials provided with the distribution.                       *\n *                                                                                 *\n * 3. Neither the name of the copyright holder nor the names of its                *\n *    contributors may be used to endorse or promote products derived from         *\n *    this software without specific prior written permission.                     *\n *                                                                                 *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"     *\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE       *\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE  *\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    *\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      *\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      *\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      *\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   *\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   *\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            *\n *                                                                                 *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n#ifndef PREDICATES_H_INCLUDED\n#define PREDICATES_H_INCLUDED\n\n//@reference: https://www.cs.cmu.edu/~quake/robust.html\n\nnamespace  predicates {\n\t//@brief: geometric predicates using arbitrary precision arithmetic \n\t//@note : these are provided primarily for illustrative purposes and adaptive routines should be preferred\n\tnamespace exact {\n\t\t//@brief   : determine if the 2d point c is above, on, or below the line defined by a and b\n\t\t//@param ax: X-coordinate of a\n\t\t//@param ay: Y-coordinate of a\n\t\t//@param bx: X-coordinate of b\n\t\t//@param by: Y-coordinate of b\n\t\t//@param cx: X-coordinate of c\n\t\t//@param cy: Y-coordinate of c\n\t\t//@return  : determinant of {{ax - cx, ay - cy}, {bx - cx, by - cy}}\n\t\t//@note    : positive, 0, negative result for c above, on, or below the line defined by a -> b\n\t\ttemplate <typename T> T orient2d(T const ax, T const ay, T const bx, T const by, T const cx, T const cy);\n\n\t\t//@brief   : determine if the 2d point c is above, on, or below the line defined by a and b\n\t\t//@param pa: pointer to a as {x, y}\n\t\t//@param pb: pointer to b as {x, y}\n\t\t//@param pc: pointer to c as {x, y}\n\t\t//@return  : determinant of {{ax - cx, ay - cy}, {bx - cx, by - cy}}\n\t\t//@note    : positive, 0, negative result for c above, on, or below the line defined by a -> b\n\t\ttemplate <typename T> T orient2d(T const*const pa, T const*const pb, T const*const pc);\n\n\t\t//@brief   : determine if the 2d point d is inside, on, or outside the circle defined by a, b, and c\n\t\t//@param ax: X-coordinate of a\n\t\t//@param ay: Y-coordinate of a\n\t\t//@param bx: X-coordinate of b\n\t\t//@param by: Y-coordinate of b\n\t\t//@param cx: X-coordinate of c\n\t\t//@param cy: Y-coordinate of c\n\t\t//@param dx: X-coordinate of d\n\t\t//@param dy: Y-coordinate of d\n\t\t//@return  : determinant of {{ax - dx, ay - dy, (ax - dx)^2 + (ay - dy)^2}, {bx - dx, by - dy, (bx - dx)^2 + (by - dy)^2}, {cx - dx, cy - dy, (cx - dx)^2 + (cy - dy)^2}}\n\t\t//@note    : positive, 0, negative result for d inside, on, or outside the circle defined by a, b, and c\n\t\ttemplate <typename T> T incircle(T const ax, T const ay, T const bx, T const by, T const cx, T const cy, T const dx, T const dy);\n\n\t\t//@brief   : determine if the 2d point d is inside, on, or outside the circle defined by a, b, and c\n\t\t//@param pa: pointer to a as {x, y}\n\t\t//@param pb: pointer to b as {x, y}\n\t\t//@param pc: pointer to c as {x, y}\n\t\t//@param pc: pointer to d as {x, y}\n\t\t//@return  : determinant of {{ax - dx, ay - dy, (ax - dx)^2 + (ay - dy)^2}, {bx - dx, by - dy, (bx - dx)^2 + (by - dy)^2}, {cx - dx, cy - dy, (cx - dx)^2 + (cy - dy)^2}}\n\t\t//@note    : positive, 0, negative result for d inside, on, or outside the circle defined by a, b, and c\n\t\ttemplate <typename T> T incircle(T const*const pa, T const*const pb, T const*const pc, T const*const pd);\n\n\t\t//@brief   : determine if the 3d point d is above, on, or below the plane defined by a, b, and c\n\t\t//@param pa: pointer to a as {x, y, z}\n\t\t//@param pb: pointer to b as {x, y, z}\n\t\t//@param pc: pointer to c as {x, y, z}\n\t\t//@param pd: pointer to d as {x, y, z}\n\t\t//@return  : determinant of {{ax - dx, ay - dy, az - dz}, {bx - dx, by - dy, bz - dz}, {cx - dx, cy - dy, cz - dz}}\n\t\t//@note    : positive, 0, negative result for c above, on, or below the plane defined by a, b, and c\n\t\ttemplate <typename T> T orient3d(T const*const pa, T const*const pb, T const*const pc, T const*const pd);\n\t\t\n\t\t//@brief   : determine if the 3d point e is inside, on, or outside the sphere defined by a, b, c, and d\n\t\t//@param pa: pointer to a as {x, y, z}\n\t\t//@param pb: pointer to b as {x, y, z}\n\t\t//@param pc: pointer to c as {x, y, z}\n\t\t//@param pd: pointer to d as {x, y, z}\n\t\t//@param pe: pointer to e as {x, y, z}\n\t\t//@return  : determinant of {{ax - ex, ay - ey, az - ez, (ax - ex)^2 + (ay - ey)^2 + (az - ez)^2}, {bx - ex, by - ey, bz - ez, (bx - ex)^2 + (by - ey)^2 + (bz - ez)^2}, {cx - ex, cy - ey, cz - ez, (cx - ex)^2 + (cy - ey)^2 + (cz - ez)^2}, {dx - ex, dy - ey, dz - ez, (dx - ex)^2 + (dy - ey)^2 + (dz - ez)^2}}\n\t\t//@note    : positive, 0, negative result for d inside, on, or outside the circle defined by a, b, and c\n\t\ttemplate <typename T> T insphere(T const*const pa, T const*const pb, T const*const pc, T const*const pd, T const*const pe);\n\t}\n\n\t//@brief: geometric predicates using normal floating point arithmetic but falling back to arbitrary precision when needed\n\t//@note : these should have the same accuracy but are significantly faster when determinants are large\n\tnamespace adaptive {\n\t\t//@brief   : determine if the 2d point c is above, on, or below the line defined by a and b\n\t\t//@param ax: X-coordinate of a\n\t\t//@param ay: Y-coordinate of a\n\t\t//@param bx: X-coordinate of b\n\t\t//@param by: Y-coordinate of b\n\t\t//@param cx: X-coordinate of c\n\t\t//@param cy: Y-coordinate of c\n\t\t//@return  : determinant of {{ax - cx, ay - cy}, {bx - cx, by - cy}}\n\t\t//@note    : positive, 0, negative result for c above, on, or below the line defined by a -> b\n\t\ttemplate <typename T> T orient2d(T const ax, T const ay, T const bx, T const by, T const cx, T const cy);\n\n\t\t//@brief   : determine if the 2d point c is above, on, or below the line defined by a and b\n\t\t//@param pa: pointer to a as {x, y}\n\t\t//@param pb: pointer to b as {x, y}\n\t\t//@param pc: pointer to c as {x, y}\n\t\t//@return  : determinant of {{ax - cx, ay - cy}, {bx - cx, by - cy}}\n\t\t//@note    : positive, 0, negative result for c above, on, or below the line defined by a -> b\n\t\ttemplate <typename T> T orient2d(T const*const pa, T const*const pb, T const*const pc);\n\n\t\t//@brief   : determine if the 2d point d is inside, on, or outside the circle defined by a, b, and c\n\t\t//@param ax: X-coordinate of a\n\t\t//@param ay: Y-coordinate of a\n\t\t//@param bx: X-coordinate of b\n\t\t//@param by: Y-coordinate of b\n\t\t//@param cx: X-coordinate of c\n\t\t//@param cy: Y-coordinate of c\n\t\t//@param dx: X-coordinate of d\n\t\t//@param dy: Y-coordinate of d\n\t\t//@return  : determinant of {{ax - dx, ay - dy, (ax - dx)^2 + (ay - dy)^2}, {bx - dx, by - dy, (bx - dx)^2 + (by - dy)^2}, {cx - dx, cy - dy, (cx - dx)^2 + (cy - dy)^2}}\n\t\t//@note    : positive, 0, negative result for d inside, on, or outside the circle defined by a, b, and c\n\t\ttemplate <typename T> T incircle(T const ax, T const ay, T const bx, T const by, T const cx, T const cy, T const dx, T const dy);\n\n\t\t//@brief   : determine if the 2d point d is inside, on, or outside the circle defined by a, b, and c\n\t\t//@param pa: pointer to a as {x, y}\n\t\t//@param pb: pointer to b as {x, y}\n\t\t//@param pc: pointer to c as {x, y}\n\t\t//@param pc: pointer to d as {x, y}\n\t\t//@return  : determinant of {{ax - dx, ay - dy, (ax - dx)^2 + (ay - dy)^2}, {bx - dx, by - dy, (bx - dx)^2 + (by - dy)^2}, {cx - dx, cy - dy, (cx - dx)^2 + (cy - dy)^2}}\n\t\t//@note    : positive, 0, negative result for d inside, on, or outside the circle defined by a, b, and c\n\t\ttemplate <typename T> T incircle(T const*const pa, T const*const pb, T const*const pc, T const*const pd);\n\n\t\t//@brief   : determine if the 3d point d is above, on, or below the plane defined by a, b, and c\n\t\t//@param pa: pointer to a as {x, y, z}\n\t\t//@param pb: pointer to b as {x, y, z}\n\t\t//@param pc: pointer to c as {x, y, z}\n\t\t//@param pd: pointer to d as {x, y, z}\n\t\t//@return  : determinant of {{ax - dx, ay - dy, az - dz}, {bx - dx, by - dy, bz - dz}, {cx - dx, cy - dy, cz - dz}}\n\t\t//@note    : positive, 0, negative result for c above, on, or below the plane defined by a, b, and c\n\t\ttemplate <typename T> T orient3d(T const*const pa, T const*const pb, T const*const pc, T const*const pd);\n\n\t\t//@brief   : determine if the 3d point e is inside, on, or outside the sphere defined by a, b, c, and d\n\t\t//@param pa: pointer to a as {x, y, z}\n\t\t//@param pb: pointer to b as {x, y, z}\n\t\t//@param pc: pointer to c as {x, y, z}\n\t\t//@param pd: pointer to d as {x, y, z}\n\t\t//@param pe: pointer to e as {x, y, z}\n\t\t//@return  : determinant of {{ax - ex, ay - ey, az - ez, (ax - ex)^2 + (ay - ey)^2 + (az - ez)^2}, {bx - ex, by - ey, bz - ez, (bx - ex)^2 + (by - ey)^2 + (bz - ez)^2}, {cx - ex, cy - ey, cz - ez, (cx - ex)^2 + (cy - ey)^2 + (cz - ez)^2}, {dx - ex, dy - ey, dz - ez, (dx - ex)^2 + (dy - ey)^2 + (dz - ez)^2}}\n\t\t//@note    : positive, 0, negative result for d inside, on, or outside the circle defined by a, b, and c\n\t\ttemplate <typename T> T insphere(T const*const pa, T const*const pb, T const*const pc, T const*const pd, T const*const pe);\n\t}\n}\n\n#include <cmath>//abs, fma\n#include <limits>\n#include <utility>//pair\n#include <numeric>//accumulate\n#include <algorithm>//transform, copy_n, merge\n#include <functional>//negate\n\n// a macro based static assert for pre c++11\n#define PREDICATES_PORTABLE_STATIC_ASSERT(condition, message) typedef char message[(condition) ? 1 : -1]\n\n// check if c++11 is supported\n#if !defined(__cplusplus) && !defined(_MSC_VER)\n\tPREDICATES_PORTABLE_STATIC_ASSERT(false, couldnt_parse_cxx_standard)\n#endif\n#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)\n\t#define PREDICATES_CXX11_IS_SUPPORTED\n#endif\n\n// choose to use c++11 features or their backports\n#ifdef PREDICATES_CXX11_IS_SUPPORTED\n#include <array>\n#include <type_traits>// is_same, enable_if\n#undef PREDICATES_PORTABLE_STATIC_ASSERT\n#define PREDICATES_TOKEN_TO_STRING1(x)  #x\n#define PREDICATES_TOKEN_TO_STRING(x)  PREDICATES_TOKEN_TO_STRING1(x)\n#define PREDICATES_PORTABLE_STATIC_ASSERT(condition, message) static_assert(condition, PREDICATES_TOKEN_TO_STRING(message))\nnamespace  predicates {\nnamespace stdx {\n\tusing std::array;\n\tusing std::copy_n;\n}\n#else\nnamespace  predicates {\nnamespace stdx {\n\t// array\n\ttemplate<typename T, size_t N>\n\tclass array {\n\t\tT buff[N];\n\tpublic:\n\t\tT& operator[](const size_t& i) { return buff[i]; }\n\t\tconst T& operator[](const size_t& i) const { return buff[i]; }\n\n\t\tT       * data() { return buff; }\n\t\tT const * data() const { return buff; }\n\n\t\tT       *  begin() { return buff; }\n\t\tT const * cbegin() const { return buff; }\n\t};\n\t// copy_n\n\ttemplate< class InputIt, class Size, class OutputIt>\n\tOutputIt copy_n(InputIt first, Size count, OutputIt result)\n\t{\n\t\tif (count > 0) {\n\t\t\t*result++ = *first;\n\t\t\tfor (Size i = 1; i < count; ++i) {\n\t\t\t\t*result++ = *++first;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n}\n#endif // CXX11_IS_SUPPORTED\n\nnamespace detail {\n\ttemplate<typename T> class ExpansionBase;\n\n\t//@brief: class to exactly represent the result of a sequence of arithmetic operations as an sequence of values that sum to the result\n\ttemplate<typename T, size_t N>\n\tclass Expansion : private ExpansionBase<T>, public stdx::array<T, N> {\n\t\tprivate:\n\t\tpublic:\n\t\t\tsize_t m_size;\n\t\t\ttemplate <typename S> friend class ExpansionBase;//access for base class\n\t\t\ttemplate <typename S, size_t M> friend class Expansion;//access for expansions of different size\n\n\t\t\tExpansion() : m_size(0) {}\n\t\t\ttemplate <size_t M> Expansion& operator=(const Expansion<T, M>& e) {\n\t\t\t\tPREDICATES_PORTABLE_STATIC_ASSERT(M <= N, cannot_assign_a_larger_expansion_to_a_smaller_expansion);\n\t\t\t\tstdx::copy_n(e.cbegin(), e.size(), stdx::array<T, N>::begin());\n\t\t\t\tm_size = e.size();\n\t\t\t\treturn *this;\n\t\t\t}\n\n\t\t\tExpansion(const Expansion& other) { *this = other; }\n\n\t\t\t//vector like convenience functions\n\t\t\tsize_t size() const {return m_size;}\n\t\t\tbool empty() const {return 0 == m_size;}\n\t\t\tvoid push_back(const T v) {stdx::array<T, N>::operator[](m_size++) = v;}\n\n\t\tpublic:\n\t\t\t//estimates of expansion value\n\t\t\tT mostSignificant() const {return empty() ? T(0) : stdx::array<T, N>::operator[](m_size - 1);}\n\t\t\tT estimate() const {return std::accumulate(stdx::array<T, N>::cbegin(), stdx::array<T, N>::cbegin() + size(), T(0));}\n\n\t\t\ttemplate <size_t M> Expansion<T, N+M> operator+(const Expansion<T, M>& f) const {\n\t\t\t\tExpansion<T, N+M> h;\n\t\t\t\th.m_size = ExpansionBase<T>::ExpansionSum(this->data(), this->size(), f.data(), f.size(), h.data());\n\t\t\t\treturn h;\n\t\t\t}\n\n\t\t\tvoid negate() {std::transform(stdx::array<T, N>::cbegin(), stdx::array<T, N>::cbegin() + size(), stdx::array<T, N>::begin(), std::negate<T>());}\n\t\t\tExpansion operator-() const {Expansion e = *this; e.negate(); return e;}\n\t\t\ttemplate <size_t M> Expansion<T, N+M> operator-(const Expansion<T, M>& f) const {return operator+(-f);}\n\n\t\t\tExpansion<T, 2*N> operator*(const T b) const {\n\t\t\t\tExpansion<T, 2*N> h;\n\t\t\t\th.m_size = ExpansionBase<T>::ScaleExpansion(this->data(), this->size(), b, h.data());\n\t\t\t\treturn h;\n\t\t\t}\n\t};\n\n\t//std::fma is faster than dekker's product when the processor instruction is available\n\t#ifdef FP_FAST_FMAF\n\t\tstatic const bool fp_fast_fmaf = true;\n\t#else\n\t\tstatic const bool fp_fast_fmaf = false;\n\t#endif\n\n\t#ifdef FP_FAST_FMA\n\t\tstatic const bool fp_fast_fma = true;\n\t#else\n\t\tstatic const bool fp_fast_fma = false;\n\t#endif\n\n\t#ifdef FP_FAST_FMAL\n\t\tstatic const bool fp_fast_fmal = true;\n\t#else\n\t\tstatic const bool fp_fast_fmal = false;\n\t#endif\n\n\t#ifdef PREDICATES_CXX11_IS_SUPPORTED\n\ttemplate <typename T> struct use_fma {static const bool value = (std::is_same<T, float>::value       && fp_fast_fmaf) ||\n\t                                                                (std::is_same<T, double>::value      && fp_fast_fma)  ||\n\t                                                                (std::is_same<T, long double>::value && fp_fast_fmal);};\n\t#endif\n\n\t//@brief  : helper function to sort by absolute value\n\t//@param a: lhs item to compare\n\t//@param b: rhs item to compare\n\t//@return : true if |a| < |b|\n\t//@note   : defined since lambda functions aren't allow in c++03\n\ttemplate <typename T> bool absLess(const T& a, const T& b) {return std::abs(a) < std::abs(b);}\n\n\ttemplate<typename T>\n\tclass ExpansionBase {\n\t\tprivate:\n\t\t\tstatic const T Splitter;\n\n\t\t\tPREDICATES_PORTABLE_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, Requires_IEC_559_IEEE_754_floating_point_type);\n\t\t\tPREDICATES_PORTABLE_STATIC_ASSERT(2 == std::numeric_limits<T>::radix, Requires_base_2_floating_point_type);\n\n\t\t\t//combine result + roundoff error into expansion\n\t\t\tstatic inline Expansion<T, 2> MakeExpansion(const T value, const T tail) {\n\t\t\t\tExpansion<T, 2> e;\n\t\t\t\tif(T(0) != tail) e.push_back(tail);\n\t\t\t\tif(T(0) != value) e.push_back(value);\n\t\t\t\treturn e;\n\t\t\t}\n\n\t\tprotected:\n\t\t\t//add 2 expansions\n\t\t\tstatic size_t ExpansionSum(T const * const e, const size_t n, T const * const f, const size_t m, T * const h) {\n\t\t\t\tstd::merge(e, e + n, f, f + m, h, absLess<T>);\n\t\t\t\tif(m == 0) return n;\n\t\t\t\tif(n == 0) return m;\n\t\t\t\tsize_t hIndex = 0;\n\t\t\t\tT Q = h[0];\n\t\t\t\tT Qnew = h[1] + Q;\n\t\t\t\tT hh = FastPlusTail(h[1], Q, Qnew);\n\t\t\t\tQ = Qnew;\n\t\t\t\tif(T(0) != hh) h[hIndex++] = hh;\n\t\t\t\tfor(size_t g = 2; g != n + m; ++g) {\n\t\t\t\t\tQnew = Q + h[g];\n\t\t\t\t\thh = PlusTail(Q, h[g], Qnew);\n\t\t\t\t\tQ = Qnew;\n\t\t\t\t\tif(T(0) != hh) h[hIndex++] = hh;\n\t\t\t\t}\n\t\t\t\tif(T(0) != Q) h[hIndex++] = Q;\n\t\t\t\treturn hIndex;\n\t\t\t}\n\n\t\t\t//scale an expansion by a constant\n\t\t\tstatic size_t ScaleExpansion(T const * const e, const size_t n, const T b, T * const h) {\n\t\t\t\tif(n == 0 || T(0) == b) return 0;\n\t\t\t\tsize_t hIndex = 0;\n\t\t\t\tT Q = e[0] * b;\n\t\t\t\tconst std::pair<T, T> bSplit = Split(b);\n\t\t\t\tT hh = MultTailPreSplit(e[0], b, bSplit, Q);\n\t\t\t\tif(T(0) != hh) h[hIndex++] = hh;\n\t\t\t\tfor(size_t eIndex = 1; eIndex < n; ++eIndex) {\n\t\t\t\t\tT Ti = e[eIndex] * b;\n\t\t\t\t\tT ti = MultTailPreSplit(e[eIndex], b, bSplit, Ti);\n\t\t\t\t\tT Qi = Q + ti;\n\t\t\t\t\thh = PlusTail(Q, ti, Qi);\n\t\t\t\t\tif(T(0) != hh) h[hIndex++] = hh;\n\t\t\t\t\tQ = Ti + Qi;\n\t\t\t\t\thh = FastPlusTail(Ti, Qi, Q);\n\t\t\t\t\tif(T(0) != hh) h[hIndex++] = hh;\n\t\t\t\t}\n\t\t\t\tif(T(0) != Q) h[hIndex++] = Q;\n\t\t\t\treturn hIndex;\n\t\t\t}\n\t\t\n\t\tpublic:\n\t\t\t//roundoff error of x = a + b\n\t\t\tstatic inline T PlusTail(const T a, const T b, const T x) {\n\t\t\t\tconst T bVirtual = x - a;\n\t\t\t\tconst T aVirtual = x - bVirtual;\n\t\t\t\tconst T bRoundoff = b - bVirtual;\n\t\t\t\tconst T aRoundoff = a - aVirtual;\n\t\t\t\treturn aRoundoff + bRoundoff;\n\t\t\t}\n\n\t\t\t//roundoff error of x = a + b if |a| > |b|\n\t\t\tstatic inline T FastPlusTail(const T a, const T b, const T x) {\n\t\t\t\tconst T bVirtual = x - a;\n\t\t\t\treturn b - bVirtual;\n\t\t\t}\n\n\t\t\t//roundoff error of x = a - b\n\t\t\tstatic inline T MinusTail(const T a, const T b, const T x) {\n\t\t\t\tconst T bVirtual = a - x;\n\t\t\t\tconst T aVirtual = x + bVirtual;\n\t\t\t\tconst T bRoundoff = bVirtual - b;\n\t\t\t\tconst T aRoundoff = a - aVirtual;\n\t\t\t\treturn aRoundoff + bRoundoff;\n\t\t\t}\n\n\t\t\t//split a into 2 nonoverlapping values\n\t\t\tstatic inline std::pair<T, T> Split(const T a) {\n\t\t\t\tconst T c = a * Splitter;\n\t\t\t\tconst T aBig = c - a;\n\t\t\t\tconst T aHi = c - aBig;\n\t\t\t\treturn std::pair<T, T>(aHi, a - aHi);\n\t\t\t}\n\n\t\t\t//roundoff error of x = a * b via dekkers product\n\t\t\tstatic inline T DekkersProduct(const T /*a*/, const std::pair<T, T> aSplit, const T /*b*/, const std::pair<T, T> bSplit, const T p) {\n\t\t\t\tT y = p - T(aSplit.first * bSplit.first);\n\t\t\t\ty -= T(aSplit.second * bSplit.first);\n\t\t\t\ty -= T(aSplit.first * bSplit.second);\n\t\t\t\treturn T(aSplit.second * bSplit.second) - y;\n\t\t\t}\n\n\t\t\t//roundoff error of x = a * b\n#ifdef PREDICATES_CXX11_IS_SUPPORTED\n\t\t\ttemplate <typename S = T> static typename std::enable_if< use_fma<S>::value, S>::type MultTail(const T a, const T b, const T p) {return std::fma(a, b, -p);}\n\t\t\ttemplate <typename S = T> static typename std::enable_if<!use_fma<S>::value, S>::type MultTail(const T a, const T b, const T p) {return DekkersProduct(a, Split(a), b, Split(b), p);}\n\n\t\t\ttemplate <typename S = T> static typename std::enable_if< use_fma<S>::value, S>::type MultTailPreSplit(const T a, const T b, const std::pair<T, T> /*bSplit*/, const T p) {return std::fma(a, b, -p);}\n\t\t\ttemplate <typename S = T> static typename std::enable_if<!use_fma<S>::value, S>::type MultTailPreSplit(const T a, const T b, const std::pair<T, T> bSplit, const T p) {return DekkersProduct(a, Split(a), b, bSplit, p);}\n#else\n\t\t\tstatic T MultTail(const T a, const T b, const T p) {return DekkersProduct(a, Split(a), b, Split(b), p);}\n\t\t\tstatic T MultTailPreSplit(const T a, const T b, const std::pair<T, T> bSplit, const T p) {return DekkersProduct(a, Split(a), b, bSplit, p);}\n#endif\n\t\t\t//expand a + b\n\t\t\tstatic inline Expansion<T, 2> Plus(const T a, const T b) {\n\t\t\t\tconst T x = a + b;\n\t\t\t\treturn MakeExpansion(x, PlusTail(a, b, x));\n\t\t\t}\n\n\t\t\t//expand a - b\n\t\t\tstatic inline Expansion<T, 2> Minus(const T a, const T b) {return Plus(a, -b);}\n\n\t\t\t//expand a * b\n\t\t\tstatic inline Expansion<T, 2> Mult(const T a, const T b) {\n\t\t\t\tconst T x = a * b;\n\t\t\t\treturn MakeExpansion(x, MultTail(a, b, x));\n\t\t\t}\n\n\t\t\t//expand the determinant of {{ax, ay}, {bx, by}} (unrolled Mult(ax, by) - Mult(ay, bx))\n\t\t\tstatic inline Expansion<T, 4> TwoTwoDiff(const T ax, const T by, const T ay, const T bx) {\n\t\t\t\tconst T axby1 = ax * by;\n\t\t\t\tconst T axby0 = MultTail(ax, by, axby1);\n\t\t\t\tconst T bxay1 = bx * ay;\n\t\t\t\tconst T bxay0 = MultTail(bx, ay, bxay1);\n\t\t\t\tconst T _i0 = axby0 - bxay0;\n\t\t\t\tconst T x0 = MinusTail(axby0, bxay0, _i0);\n\t\t\t\tconst T _j = axby1 + _i0;\n\t\t\t\tconst T _0 = PlusTail(axby1, _i0, _j);\n\t\t\t\tconst T _i1 = _0 - bxay1;\n\t\t\t\tconst T x1 = MinusTail(_0, bxay1, _i1);\n\t\t\t\tconst T x3 = _j + _i1;\n\t\t\t\tconst T x2 = PlusTail(_j, _i1, x3);\n\t\t\t\tExpansion<T, 4> e;\n\t\t\t\tif(T(0) != x0) e.push_back(x0);\n\t\t\t\tif(T(0) != x1) e.push_back(x1);\n\t\t\t\tif(T(0) != x2) e.push_back(x2);\n\t\t\t\tif(T(0) != x3) e.push_back(x3);\n\t\t\t\treturn e;\n\t\t\t}\n\n\t\t\t//TwoTwoDiff checking for zeros to avoid extra splitting\n\t\t\tstatic inline Expansion<T, 4> TwoTwoDiffZeroCheck(const T ax, const T by, const T ay, const T bx) {\n\t\t\t\tExpansion<T, 4> e;\n\t\t\t\tif(T(0) == ax && T(0) == ay) return e;\n\t\t\t\telse if(T(0) == ax) e = Mult(ay, bx);\n\t\t\t\telse if(T(0) == ay) e = Mult(ax, by);\n\t\t\t\telse e = TwoTwoDiff(ax, by, ay, bx);\n\t\t\t\treturn e;\n\t\t\t}\n\n\t\t\t//(a * b) * c checking for zeros\n\t\t\tstatic inline Expansion<T, 4> ThreeProd(const T a, const T b, const T c) {return (T(0) == a || T(0) == b || T(0) == c) ? Expansion<T, 4>() : Mult(a, b) * c;}\n\t};\n\n\ttemplate <typename T> const T ExpansionBase<T>::Splitter = static_cast<T>(\n#ifdef PREDICATES_CXX11_IS_SUPPORTED\n\t\tstd::exp2((std::numeric_limits<T>::digits + std::numeric_limits<T>::digits%2)/2 + 1)\n#else\n\t\tstd::ldexp(T(1), (std::numeric_limits<T>::digits + std::numeric_limits<T>::digits%2)/2 + 1)\n#endif\n\t);\n}\n\n\tnamespace exact {\n\t\ttemplate <typename T> T orient2d(T const ax, T const ay, T const bx, T const by, T const cx, T const cy)\n\t\t{\n\t\t\tconst detail::Expansion<T, 4> aterms = detail::ExpansionBase<T>::TwoTwoDiff(ax, by, ax, cy);\n\t\t\tconst detail::Expansion<T, 4> bterms = detail::ExpansionBase<T>::TwoTwoDiff(bx, cy, bx, ay);\n\t\t\tconst detail::Expansion<T, 4> cterms = detail::ExpansionBase<T>::TwoTwoDiff(cx, ay, cx, by);\n\t\t\tconst detail::Expansion<T, 12> w = aterms + bterms + cterms;\n\t\t\treturn w.mostSignificant();\n\t\t}\n\n\t\ttemplate <typename T> T orient2d(T const*const pa, T const*const pb, T const*const pc) {\n\t\t\treturn orient2d(pa[0], pa[1], pb[0], pb[1], pc[0], pc[1]);\n\t\t}\n\n\t\ttemplate <typename T> T incircle(T const ax, T const ay, T const bx, T const by, T const cx, T const cy, T const dx, T const dy) {\n\t\t\tconst detail::Expansion<T, 4> ab = detail::ExpansionBase<T>::TwoTwoDiff(ax, by, bx, ay);\n\t\t\tconst detail::Expansion<T, 4> bc = detail::ExpansionBase<T>::TwoTwoDiff(bx, cy, cx, by);\n\t\t\tconst detail::Expansion<T, 4> cd = detail::ExpansionBase<T>::TwoTwoDiff(cx, dy, dx, cy);\n\t\t\tconst detail::Expansion<T, 4> da = detail::ExpansionBase<T>::TwoTwoDiff(dx, ay, ax, dy);\n\t\t\tconst detail::Expansion<T, 4> ac = detail::ExpansionBase<T>::TwoTwoDiff(ax, cy, cx, ay);\n\t\t\tconst detail::Expansion<T, 4> bd = detail::ExpansionBase<T>::TwoTwoDiff(bx, dy, dx, by);\n\n\t\t\tconst detail::Expansion<T, 12> abc = ab + bc - ac;\n\t\t\tconst detail::Expansion<T, 12> bcd = bc + cd - bd;\n\t\t\tconst detail::Expansion<T, 12> cda = cd + da + ac;\n\t\t\tconst detail::Expansion<T, 12> dab = da + ab + bd;\n\n\t\t\tconst detail::Expansion<T, 96> adet = bcd * ax *  ax + bcd * ay *  ay;\n\t\t\tconst detail::Expansion<T, 96> bdet = cda * bx * -bx + cda * by * -by;\n\t\t\tconst detail::Expansion<T, 96> cdet = dab * cx *  cx + dab * cy *  cy;\n\t\t\tconst detail::Expansion<T, 96> ddet = abc * dx * -dx + abc * dy * -dy;\n\n\t\t\tconst detail::Expansion<T, 384> deter = (adet + bdet) + (cdet + ddet);\n\t\t\treturn deter.mostSignificant();\n\t\t}\n\n\t\ttemplate <typename T> T incircle(T const*const pa, T const*const pb, T const*const pc, T const*const pd) {\n\t\t\treturn incircle(pa[0], pa[1], pb[0], pb[1], pc[0], pc[1], pd[0], pd[1]);\n\t\t}\n\n\t\t//@brief   : determine if the 3d point d is above, on, or below the plane defined by a, b, and c\n\t\t//@param pa: pointer to a as {x, y, z}\n\t\t//@param pb: pointer to b as {x, y, z}\n\t\t//@param pc: pointer to c as {x, y, z}\n\t\t//@param pd: pointer to d as {x, y, z}\n\t\t//@return  : determinant of {{ax - dx, ay - dy, az - dz}, {bx - dx, by - dy, bz - dz}, {cx - dx, cy - dy, cz - dz}}\n\t\t//@note    : positive, 0, negative result for c above, on, or below the plane defined by a, b, and c\n\t\ttemplate <typename T> T orient3d(T const*const pa, T const*const pb, T const*const pc, T const*const pd) {\n\t\t\tconst detail::Expansion<T, 4> ab = detail::ExpansionBase<T>::TwoTwoDiff(pa[0], pb[1], pb[0], pa[1]);\n\t\t\tconst detail::Expansion<T, 4> bc = detail::ExpansionBase<T>::TwoTwoDiff(pb[0], pc[1], pc[0], pb[1]);\n\t\t\tconst detail::Expansion<T, 4> cd = detail::ExpansionBase<T>::TwoTwoDiff(pc[0], pd[1], pd[0], pc[1]);\n\t\t\tconst detail::Expansion<T, 4> da = detail::ExpansionBase<T>::TwoTwoDiff(pd[0], pa[1], pa[0], pd[1]);\n\t\t\tconst detail::Expansion<T, 4> ac = detail::ExpansionBase<T>::TwoTwoDiff(pa[0], pc[1], pc[0], pa[1]);\n\t\t\tconst detail::Expansion<T, 4> bd = detail::ExpansionBase<T>::TwoTwoDiff(pb[0], pd[1], pd[0], pb[1]);\n\n\t\t\tconst detail::Expansion<T, 12> abc = ab + bc - ac;\n\t\t\tconst detail::Expansion<T, 12> bcd = bc + cd - bd;\n\t\t\tconst detail::Expansion<T, 12> cda = cd + da + ac;\n\t\t\tconst detail::Expansion<T, 12> dab = da + ab + bd;\n\n\t\t\tconst detail::Expansion<T, 24> adet = bcd *  pa[2];\n\t\t\tconst detail::Expansion<T, 24> bdet = cda * -pb[2];\n\t\t\tconst detail::Expansion<T, 24> cdet = dab *  pc[2];\n\t\t\tconst detail::Expansion<T, 24> ddet = abc * -pd[2];\n\n\t\t\tconst detail::Expansion<T, 96> deter = (adet + bdet) + (cdet + ddet);\n\t\t\treturn deter.mostSignificant();\n\t\t}\n\n\t\t//@brief   : determine if the 3d point e is inside, on, or outside the sphere defined by a, b, c, and d\n\t\t//@param pa: pointer to a as {x, y, z}\n\t\t//@param pb: pointer to b as {x, y, z}\n\t\t//@param pc: pointer to c as {x, y, z}\n\t\t//@param pd: pointer to d as {x, y, z}\n\t\t//@param pe: pointer to e as {x, y, z}\n\t\t//@return  : determinant of {{ax - ex, ay - ey, az - ez, (ax - ex)^2 + (ay - ey)^2 + (az - ez)^2}, {bx - ex, by - ey, bz - ez, (bx - ex)^2 + (by - ey)^2 + (bz - ez)^2}, {cx - ex, cy - ey, cz - ez, (cx - ex)^2 + (cy - ey)^2 + (cz - ez)^2}, {dx - ex, dy - ey, dz - ez, (dx - ex)^2 + (dy - ey)^2 + (dz - ez)^2}}\n\t\t//@note    : positive, 0, negative result for d inside, on, or outside the circle defined by a, b, and c\n\t\ttemplate <typename T> T insphere(T const*const pa, T const*const pb, T const*const pc, T const*const pd, T const*const pe) {\n\t\t\tconst detail::Expansion<T, 4> ab = detail::ExpansionBase<T>::TwoTwoDiff(pa[0], pb[1], pb[0], pa[1]);\n\t\t\tconst detail::Expansion<T, 4> bc = detail::ExpansionBase<T>::TwoTwoDiff(pb[0], pc[1], pc[0], pb[1]);\n\t\t\tconst detail::Expansion<T, 4> cd = detail::ExpansionBase<T>::TwoTwoDiff(pc[0], pd[1], pd[0], pc[1]);\n\t\t\tconst detail::Expansion<T, 4> de = detail::ExpansionBase<T>::TwoTwoDiff(pd[0], pe[1], pe[0], pd[1]);\n\t\t\tconst detail::Expansion<T, 4> ea = detail::ExpansionBase<T>::TwoTwoDiff(pe[0], pa[1], pa[0], pe[1]);\n\t\t\tconst detail::Expansion<T, 4> ac = detail::ExpansionBase<T>::TwoTwoDiff(pa[0], pc[1], pc[0], pa[1]);\n\t\t\tconst detail::Expansion<T, 4> bd = detail::ExpansionBase<T>::TwoTwoDiff(pb[0], pd[1], pd[0], pb[1]);\n\t\t\tconst detail::Expansion<T, 4> ce = detail::ExpansionBase<T>::TwoTwoDiff(pc[0], pe[1], pe[0], pc[1]);\n\t\t\tconst detail::Expansion<T, 4> da = detail::ExpansionBase<T>::TwoTwoDiff(pd[0], pa[1], pa[0], pd[1]);\n\t\t\tconst detail::Expansion<T, 4> eb = detail::ExpansionBase<T>::TwoTwoDiff(pe[0], pb[1], pb[0], pe[1]);\n\n\t\t\tconst detail::Expansion<T, 24> abc = bc * pa[2] + ac * -pb[2] + ab * pc[2];\n\t\t\tconst detail::Expansion<T, 24> bcd = cd * pb[2] + bd * -pc[2] + bc * pd[2];\n\t\t\tconst detail::Expansion<T, 24> cde = de * pc[2] + ce * -pd[2] + cd * pe[2];\n\t\t\tconst detail::Expansion<T, 24> dea = ea * pd[2] + da * -pe[2] + de * pa[2];\n\t\t\tconst detail::Expansion<T, 24> eab = ab * pe[2] + eb * -pa[2] + ea * pb[2];\n\t\t\tconst detail::Expansion<T, 24> abd = bd * pa[2] + da *  pb[2] + ab * pd[2];\n\t\t\tconst detail::Expansion<T, 24> bce = ce * pb[2] + eb *  pc[2] + bc * pe[2];\n\t\t\tconst detail::Expansion<T, 24> cda = da * pc[2] + ac *  pd[2] + cd * pa[2];\n\t\t\tconst detail::Expansion<T, 24> deb = eb * pd[2] + bd *  pe[2] + de * pb[2];\n\t\t\tconst detail::Expansion<T, 24> eac = ac * pe[2] + ce *  pa[2] + ea * pc[2];\n\n\t\t\tconst detail::Expansion<T, 96> bcde = (cde + bce) - (deb + bcd);\n\t\t\tconst detail::Expansion<T, 96> cdea = (dea + cda) - (eac + cde);\n\t\t\tconst detail::Expansion<T, 96> deab = (eab + deb) - (abd + dea);\n\t\t\tconst detail::Expansion<T, 96> eabc = (abc + eac) - (bce + eab);\n\t\t\tconst detail::Expansion<T, 96> abcd = (bcd + abd) - (cda + abc);\n\n\t\t\tconst detail::Expansion<T, 1152> adet = bcde * pa[0] * pa[0] + bcde * pa[1] * pa[1] + bcde * pa[2] * pa[2];\n\t\t\tconst detail::Expansion<T, 1152> bdet = cdea * pb[0] * pb[0] + cdea * pb[1] * pb[1] + cdea * pb[2] * pb[2];\n\t\t\tconst detail::Expansion<T, 1152> cdet = deab * pc[0] * pc[0] + deab * pc[1] * pc[1] + deab * pc[2] * pc[2];\n\t\t\tconst detail::Expansion<T, 1152> ddet = eabc * pd[0] * pd[0] + eabc * pd[1] * pd[1] + eabc * pd[2] * pd[2];\n\t\t\tconst detail::Expansion<T, 1152> edet = abcd * pe[0] * pe[0] + abcd * pe[1] * pe[1] + abcd * pe[2] * pe[2];\n\n\t\t\tconst detail::Expansion<T, 5760> deter = (adet + bdet) + ((cdet + ddet) + edet);\n\t\t\treturn deter.mostSignificant();\n\t\t}\n\t}\n\n\ttemplate <typename T>\n\tconst T& Epsilon()\n\t{\n\t\tstatic const T epsilon = \n#ifdef PREDICATES_CXX11_IS_SUPPORTED\n\t\t\tstd::exp2(-std::numeric_limits<T>::digits);\n#else\n\t\t\tstd::ldexp(T(1), -std::numeric_limits<T>::digits);\n#endif\n\t\treturn epsilon;\n\t}\n\n\ttemplate <typename T>\n\tclass Constants {\n\t\tpublic:\n\t\t\tstatic const T epsilon, resulterrbound;\n\t\t\tstatic const T ccwerrboundA, ccwerrboundB, ccwerrboundC;\n\t\t\tstatic const T o3derrboundA, o3derrboundB, o3derrboundC;\n\t\t\tstatic const T iccerrboundA, iccerrboundB, iccerrboundC;\n\t\t\tstatic const T isperrboundA, isperrboundB, isperrboundC;\n\t};\n\n\ttemplate <typename T> const T Constants<T>::epsilon = Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::resulterrbound = (T( 3) + T(   8) * Epsilon<T>()) * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::ccwerrboundA   = (T( 3) + T(  16) * Epsilon<T>()) * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::ccwerrboundB   = (T( 2) + T(  12) * Epsilon<T>()) * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::ccwerrboundC   = (T( 9) + T(  64) * Epsilon<T>()) * Epsilon<T>() * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::o3derrboundA   = (T( 7) + T(  56) * Epsilon<T>()) * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::o3derrboundB   = (T( 3) + T(  28) * Epsilon<T>()) * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::o3derrboundC   = (T(26) + T( 288) * Epsilon<T>()) * Epsilon<T>() * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::iccerrboundA   = (T(10) + T(  96) * Epsilon<T>()) * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::iccerrboundB   = (T( 4) + T(  48) * Epsilon<T>()) * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::iccerrboundC   = (T(44) + T( 576) * Epsilon<T>()) * Epsilon<T>() * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::isperrboundA   = (T(16) + T( 224) * Epsilon<T>()) * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::isperrboundB   = (T( 5) + T(  72) * Epsilon<T>()) * Epsilon<T>();\n\ttemplate <typename T> const T Constants<T>::isperrboundC   = (T(71) + T(1408) * Epsilon<T>()) * Epsilon<T>() * Epsilon<T>();\n\n\tnamespace adaptive {\n\t\ttemplate <typename T> T orient2d(T const ax, T const ay, T const bx, T const by, T const cx, T const cy) {\n\t\t\tconst T acx = ax - cx;\n\t\t\tconst T bcx = bx - cx;\n\t\t\tconst T acy = ay - cy;\n\t\t\tconst T bcy = by - cy;\n\t\t\tconst T detleft = acx * bcy;\n\t\t\tconst T detright = acy * bcx;\n\t\t\tT det = detleft - detright;\n\t\t\tif((detleft < 0) != (detright < 0)) return det;\n\t\t\tif(T(0) == detleft || T(0) == detright) return det;\n\n\t\t\tconst T detsum = std::abs(detleft + detright);\n\t\t\tT errbound = Constants<T>::ccwerrboundA * detsum;\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\n\t\t\tconst detail::Expansion<T, 4> B = detail::ExpansionBase<T>::TwoTwoDiff(acx, bcy, acy, bcx);\n\t\t\tdet = B.estimate();\n\t\t\terrbound = Constants<T>::ccwerrboundB * detsum;\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\n\t\t\tconst T acxtail = detail::ExpansionBase<T>::MinusTail(ax, cx, acx);\n\t\t\tconst T bcxtail = detail::ExpansionBase<T>::MinusTail(bx, cx, bcx);\n\t\t\tconst T acytail = detail::ExpansionBase<T>::MinusTail(ay, cy, acy);\n\t\t\tconst T bcytail = detail::ExpansionBase<T>::MinusTail(by, cy, bcy);\n\t\t\tif(T(0) == acxtail && T(0) == bcxtail && T(0) == acytail && T(0) == bcytail) return det;\n\n\t\t\terrbound = Constants<T>::ccwerrboundC * detsum + Constants<T>::resulterrbound * std::abs(det);\n\t\t\tdet += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\n\t\t\tconst detail::Expansion<T, 16> D = ((B + detail::ExpansionBase<T>::TwoTwoDiff(acxtail, bcy, acytail, bcx)) + detail::ExpansionBase<T>::TwoTwoDiff(acx, bcytail, acy, bcxtail)) + detail::ExpansionBase<T>::TwoTwoDiff(acxtail, bcytail, acytail, bcxtail);\n\t\t\treturn D.mostSignificant();\n\t\t}\n\n\t\ttemplate <typename T> T orient2d(T const*const pa, T const*const pb, T const*const pc) {\n\t\t\treturn orient2d(pa[0], pa[1], pb[0], pb[1], pc[0], pc[1]);\n\t\t}\n\n\t\ttemplate <typename T> T incircle(T const ax, T const ay, T const bx, T const by, T const cx, T const cy, T const dx, T const dy) {\n\t\t\tconst T adx = ax - dx;\n\t\t\tconst T bdx = bx - dx;\n\t\t\tconst T cdx = cx - dx;\n\t\t\tconst T ady = ay - dy;\n\t\t\tconst T bdy = by - dy;\n\t\t\tconst T cdy = cy - dy;\n\t\t\tconst T bdxcdy = bdx * cdy;\n\t\t\tconst T cdxbdy = cdx * bdy;\n\t\t\tconst T cdxady = cdx * ady;\n\t\t\tconst T adxcdy = adx * cdy;\n\t\t\tconst T adxbdy = adx * bdy;\n\t\t\tconst T bdxady = bdx * ady;\n\t\t\tconst T alift = adx * adx + ady * ady;\n\t\t\tconst T blift = bdx * bdx + bdy * bdy;\n\t\t\tconst T clift = cdx * cdx + cdy * cdy;\n\t\t\tT det = alift * (bdxcdy - cdxbdy) + blift * (cdxady - adxcdy) + clift * (adxbdy - bdxady);\n\t\t\tconst T permanent = (std::abs(bdxcdy) + std::abs(cdxbdy)) * alift\n\t\t\t                  + (std::abs(cdxady) + std::abs(adxcdy)) * blift\n\t\t\t                  + (std::abs(adxbdy) + std::abs(bdxady)) * clift;\n\t\t\tT errbound = Constants<T>::iccerrboundA * permanent;\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\n\t\t\tconst detail::Expansion<T, 4> bc = detail::ExpansionBase<T>::TwoTwoDiff(bdx, cdy, cdx, bdy);\n\t\t\tconst detail::Expansion<T, 4> ca = detail::ExpansionBase<T>::TwoTwoDiff(cdx, ady, adx, cdy);\n\t\t\tconst detail::Expansion<T, 4> ab = detail::ExpansionBase<T>::TwoTwoDiff(adx, bdy, bdx, ady);\n\t\t\tconst detail::Expansion<T, 32> adet = bc * adx * adx + bc * ady * ady;\n\t\t\tconst detail::Expansion<T, 32> bdet = ca * bdx * bdx + ca * bdy * bdy;\n\t\t\tconst detail::Expansion<T, 32> cdet = ab * cdx * cdx + ab * cdy * cdy;\n\t\t\tconst detail::Expansion<T, 96> fin1 = adet + bdet + cdet;\n\t\t\tdet = fin1.estimate();\n\t\t\terrbound = Constants<T>::iccerrboundB * permanent;\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\n\t\t\tconst T adxtail = detail::ExpansionBase<T>::MinusTail(ax, dx, adx);\n\t\t\tconst T adytail = detail::ExpansionBase<T>::MinusTail(ay, dy, ady);\n\t\t\tconst T bdxtail = detail::ExpansionBase<T>::MinusTail(bx, dx, bdx);\n\t\t\tconst T bdytail = detail::ExpansionBase<T>::MinusTail(by, dy, bdy);\n\t\t\tconst T cdxtail = detail::ExpansionBase<T>::MinusTail(cx, dx, cdx);\n\t\t\tconst T cdytail = detail::ExpansionBase<T>::MinusTail(cy, dy, cdy);\n\t\t\tif(T(0) == adxtail && T(0) == bdxtail && T(0) == cdxtail && T(0) == adytail && T(0) == bdytail && T(0) == cdytail) return det;\n\n\t\t\terrbound = Constants<T>::iccerrboundC * permanent + Constants<T>::resulterrbound * std::abs(det);\n\t\t\tdet += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail))\n\t\t\t    +   (bdx * cdy - bdy * cdx) *  (adx * adxtail + ady * adytail) * T(2))\n\t\t\t    +  ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail))\n\t\t\t    +   (cdx * ady - cdy * adx) *  (bdx * bdxtail + bdy * bdytail) * T(2))\n\t\t\t    +  ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail))\n\t\t\t    +   (adx * bdy - ady * bdx) *  (cdx * cdxtail + cdy * cdytail) * T(2));\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\t\t\treturn exact::incircle(ax, ay, bx, by, cx, cy, dx, dy);\n\t\t}\n\n\t\ttemplate <typename T> T incircle(T const*const pa, T const*const pb, T const*const pc, T const*const pd) {\n\t\t\treturn incircle(pa[0], pa[1], pb[0], pb[1], pc[0], pc[1], pd[0], pd[1]);\n\t\t}\n\n\t\t//@brief   : determine if the 3d point d is above, on, or below the plane defined by a, b, and c\n\t\t//@param pa: pointer to a as {x, y, z}\n\t\t//@param pb: pointer to b as {x, y, z}\n\t\t//@param pc: pointer to c as {x, y, z}\n\t\t//@param pd: pointer to d as {x, y, z}\n\t\t//@return  : determinant of {{ax - dx, ay - dy, az - dz}, {bx - dx, by - dy, bz - dz}, {cx - dx, cy - dy, cz - dz}}\n\t\t//@note    : positive, 0, negative result for c above, on, or below the plane defined by a, b, and c\n\t\ttemplate <typename T> T orient3d(T const*const pa, T const*const pb, T const*const pc, T const*const pd) {\n\t\t\tconst T adx = pa[0] - pd[0];\n\t\t\tconst T bdx = pb[0] - pd[0];\n\t\t\tconst T cdx = pc[0] - pd[0];\n\t\t\tconst T ady = pa[1] - pd[1];\n\t\t\tconst T bdy = pb[1] - pd[1];\n\t\t\tconst T cdy = pc[1] - pd[1];\n\t\t\tconst T adz = pa[2] - pd[2];\n\t\t\tconst T bdz = pb[2] - pd[2];\n\t\t\tconst T cdz = pc[2] - pd[2];\n\t\t\tconst T bdxcdy = bdx * cdy;\n\t\t\tconst T cdxbdy = cdx * bdy;\n\t\t\tconst T cdxady = cdx * ady;\n\t\t\tconst T adxcdy = adx * cdy;\n\t\t\tconst T adxbdy = adx * bdy;\n\t\t\tconst T bdxady = bdx * ady;\n\t\t\tT det = adz * (bdxcdy - cdxbdy) + bdz * (cdxady - adxcdy) + cdz * (adxbdy - bdxady);\n\t\t\tconst T permanent = (std::abs(bdxcdy) + std::abs(cdxbdy)) * std::abs(adz) + (std::abs(cdxady) + std::abs(adxcdy)) * std::abs(bdz) + (std::abs(adxbdy) + std::abs(bdxady)) * std::abs(cdz);\n\t\t\tT errbound = Constants<T>::o3derrboundA * permanent;\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\n\t\t\tconst detail::Expansion<T, 4> bc = detail::ExpansionBase<T>::TwoTwoDiff(bdx, cdy, cdx, bdy);\n\t\t\tconst detail::Expansion<T, 4> ca = detail::ExpansionBase<T>::TwoTwoDiff(cdx, ady, adx, cdy);\n\t\t\tconst detail::Expansion<T, 4> ab = detail::ExpansionBase<T>::TwoTwoDiff(adx, bdy, bdx, ady);\n\t\t\tconst detail::Expansion<T, 24> fin1 = (bc * adz + ca * bdz) + ab * cdz;\n\t\t\tdet = fin1.estimate();\n\t\t\terrbound = Constants<T>::o3derrboundB * permanent;\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\n\t\t\tconst T adxtail = detail::ExpansionBase<T>::MinusTail(pa[0], pd[0], adx);\n\t\t\tconst T bdxtail = detail::ExpansionBase<T>::MinusTail(pb[0], pd[0], bdx);\n\t\t\tconst T cdxtail = detail::ExpansionBase<T>::MinusTail(pc[0], pd[0], cdx);\n\t\t\tconst T adytail = detail::ExpansionBase<T>::MinusTail(pa[1], pd[1], ady);\n\t\t\tconst T bdytail = detail::ExpansionBase<T>::MinusTail(pb[1], pd[1], bdy);\n\t\t\tconst T cdytail = detail::ExpansionBase<T>::MinusTail(pc[1], pd[1], cdy);\n\t\t\tconst T adztail = detail::ExpansionBase<T>::MinusTail(pa[2], pd[2], adz);\n\t\t\tconst T bdztail = detail::ExpansionBase<T>::MinusTail(pb[2], pd[2], bdz);\n\t\t\tconst T cdztail = detail::ExpansionBase<T>::MinusTail(pc[2], pd[2], cdz);\n\t\t\tif(T(0) == adxtail && T(0) == adytail && T(0) == adztail &&\n\t\t\t   T(0) == bdxtail && T(0) == bdytail && T(0) == bdztail &&\n\t\t\t   T(0) == cdxtail && T(0) == cdytail && T(0) == cdztail) return det;\n\n\t\t\terrbound = Constants<T>::o3derrboundC * permanent + Constants<T>::resulterrbound * std::abs(det);\n\t\t\tdet += (adz * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx))\n\t\t\t    +  (bdz * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx))\n\t\t\t    +  (cdz * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx));\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\n\t\t\tconst detail::Expansion<T, 8> bct = detail::ExpansionBase<T>::TwoTwoDiffZeroCheck(bdxtail, cdy, bdytail, cdx) + detail::ExpansionBase<T>::TwoTwoDiffZeroCheck(cdytail, bdx, cdxtail, bdy);\n\t\t\tconst detail::Expansion<T, 8> cat = detail::ExpansionBase<T>::TwoTwoDiffZeroCheck(cdxtail, ady, cdytail, adx) + detail::ExpansionBase<T>::TwoTwoDiffZeroCheck(adytail, cdx, adxtail, cdy);\n\t\t\tconst detail::Expansion<T, 8> abt = detail::ExpansionBase<T>::TwoTwoDiffZeroCheck(adxtail, bdy, adytail, bdx) + detail::ExpansionBase<T>::TwoTwoDiffZeroCheck(bdytail, adx, bdxtail, ady);\n\t\t\tconst detail::Expansion<T, 192> fin2 = fin1 + bct * adz + cat * bdz + abt * cdz + bc * adztail + ca * bdztail + ab * cdztail\n\t\t\t                                     + detail::ExpansionBase<T>::ThreeProd( adxtail, bdytail, cdz) + detail::ExpansionBase<T>::ThreeProd( adxtail, bdytail, cdztail)\n\t\t\t                                     + detail::ExpansionBase<T>::ThreeProd(-adxtail, cdytail, bdz) + detail::ExpansionBase<T>::ThreeProd(-adxtail, cdytail, bdztail)\n\t\t\t                                     + detail::ExpansionBase<T>::ThreeProd( bdxtail, cdytail, adz) + detail::ExpansionBase<T>::ThreeProd( bdxtail, cdytail, adztail)\n\t\t\t                                     + detail::ExpansionBase<T>::ThreeProd(-bdxtail, adytail, cdz) + detail::ExpansionBase<T>::ThreeProd(-bdxtail, adytail, cdztail)\n\t\t\t                                     + detail::ExpansionBase<T>::ThreeProd( cdxtail, adytail, bdz) + detail::ExpansionBase<T>::ThreeProd( cdxtail, adytail, bdztail)\n\t\t\t                                     + detail::ExpansionBase<T>::ThreeProd(-cdxtail, bdytail, adz) + detail::ExpansionBase<T>::ThreeProd(-cdxtail, bdytail, adztail)\n\t\t\t                                     + bct * adztail + cat * bdztail + abt * cdztail;\n\t\t\treturn fin2.mostSignificant();\n\t\t}\n\n\t\t//@brief   : determine if the 3d point e is inside, on, or outside the sphere defined by a, b, c, and d\n\t\t//@param pa: pointer to a as {x, y, z}\n\t\t//@param pb: pointer to b as {x, y, z}\n\t\t//@param pc: pointer to c as {x, y, z}\n\t\t//@param pd: pointer to d as {x, y, z}\n\t\t//@param pe: pointer to e as {x, y, z}\n\t\t//@return  : determinant of {{ax - ex, ay - ey, az - ez, (ax - ex)^2 + (ay - ey)^2 + (az - ez)^2}, {bx - ex, by - ey, bz - ez, (bx - ex)^2 + (by - ey)^2 + (bz - ez)^2}, {cx - ex, cy - ey, cz - ez, (cx - ex)^2 + (cy - ey)^2 + (cz - ez)^2}, {dx - ex, dy - ey, dz - ez, (dx - ex)^2 + (dy - ey)^2 + (dz - ez)^2}}\n\t\t//@note    : positive, 0, negative result for d inside, on, or outside the circle defined by a, b, and c\n\t\ttemplate <typename T> T insphere(T const*const pa, T const*const pb, T const*const pc, T const*const pd, T const*const pe) {\n\t\t\tT permanent;\n\t\t\tconst T aex = pa[0] - pe[0];\n\t\t\tconst T bex = pb[0] - pe[0];\n\t\t\tconst T cex = pc[0] - pe[0];\n\t\t\tconst T dex = pd[0] - pe[0];\n\t\t\tconst T aey = pa[1] - pe[1];\n\t\t\tconst T bey = pb[1] - pe[1];\n\t\t\tconst T cey = pc[1] - pe[1];\n\t\t\tconst T dey = pd[1] - pe[1];\n\t\t\tconst T aez = pa[2] - pe[2];\n\t\t\tconst T bez = pb[2] - pe[2];\n\t\t\tconst T cez = pc[2] - pe[2];\n\t\t\tconst T dez = pd[2] - pe[2];\n\t\t\t{\n\t\t\t\tconst T aexbey = aex * bey;\n\t\t\t\tconst T bexaey = bex * aey;\n\t\t\t\tconst T bexcey = bex * cey;\n\t\t\t\tconst T cexbey = cex * bey;\n\t\t\t\tconst T cexdey = cex * dey;\n\t\t\t\tconst T dexcey = dex * cey;\n\t\t\t\tconst T dexaey = dex * aey;\n\t\t\t\tconst T aexdey = aex * dey;\n\t\t\t\tconst T aexcey = aex * cey;\n\t\t\t\tconst T cexaey = cex * aey;\n\t\t\t\tconst T bexdey = bex * dey;\n\t\t\t\tconst T dexbey = dex * bey;\n\t\t\t\tconst T ab = aexbey - bexaey;\n\t\t\t\tconst T bc = bexcey - cexbey;\n\t\t\t\tconst T cd = cexdey - dexcey;\n\t\t\t\tconst T da = dexaey - aexdey;\n\t\t\t\tconst T ac = aexcey - cexaey;\n\t\t\t\tconst T bd = bexdey - dexbey;\n\t\t\t\tconst T abc = aez * bc - bez * ac + cez * ab;\n\t\t\t\tconst T bcd = bez * cd - cez * bd + dez * bc;\n\t\t\t\tconst T cda = cez * da + dez * ac + aez * cd;\n\t\t\t\tconst T dab = dez * ab + aez * bd + bez * da;\n\t\t\t\tconst T alift = aex * aex + aey * aey + aez * aez;\n\t\t\t\tconst T blift = bex * bex + bey * bey + bez * bez;\n\t\t\t\tconst T clift = cex * cex + cey * cey + cez * cez;\n\t\t\t\tconst T dlift = dex * dex + dey * dey + dez * dez;\n\t\t\t\tconst T det = (dlift * abc - clift * dab) + (blift * cda - alift * bcd);\n\t\t\t\tconst T aezplus = std::abs(aez);\n\t\t\t\tconst T bezplus = std::abs(bez);\n\t\t\t\tconst T cezplus = std::abs(cez);\n\t\t\t\tconst T dezplus = std::abs(dez);\n\t\t\t\tconst T aexbeyplus = std::abs(aexbey);\n\t\t\t\tconst T bexaeyplus = std::abs(bexaey);\n\t\t\t\tconst T bexceyplus = std::abs(bexcey);\n\t\t\t\tconst T cexbeyplus = std::abs(cexbey);\n\t\t\t\tconst T cexdeyplus = std::abs(cexdey);\n\t\t\t\tconst T dexceyplus = std::abs(dexcey);\n\t\t\t\tconst T dexaeyplus = std::abs(dexaey);\n\t\t\t\tconst T aexdeyplus = std::abs(aexdey);\n\t\t\t\tconst T aexceyplus = std::abs(aexcey);\n\t\t\t\tconst T cexaeyplus = std::abs(cexaey);\n\t\t\t\tconst T bexdeyplus = std::abs(bexdey);\n\t\t\t\tconst T dexbeyplus = std::abs(dexbey);\n\t\t\t\tpermanent = ((cexdeyplus + dexceyplus) * bezplus + (dexbeyplus + bexdeyplus) * cezplus + (bexceyplus + cexbeyplus) * dezplus) * alift\n\t\t\t\t          + ((dexaeyplus + aexdeyplus) * cezplus + (aexceyplus + cexaeyplus) * dezplus + (cexdeyplus + dexceyplus) * aezplus) * blift\n\t\t\t\t          + ((aexbeyplus + bexaeyplus) * dezplus + (bexdeyplus + dexbeyplus) * aezplus + (dexaeyplus + aexdeyplus) * bezplus) * clift\n\t\t\t\t          + ((bexceyplus + cexbeyplus) * aezplus + (cexaeyplus + aexceyplus) * bezplus + (aexbeyplus + bexaeyplus) * cezplus) * dlift;\n\t\t\t\tconst T errbound = Constants<T>::isperrboundA * permanent;\n\t\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\t\t\t}\n\n\t\t\tconst detail::Expansion<T, 4> ab = detail::ExpansionBase<T>::TwoTwoDiff(aex, bey, bex, aey);\n\t\t\tconst detail::Expansion<T, 4> bc = detail::ExpansionBase<T>::TwoTwoDiff(bex, cey, cex, bey);\n\t\t\tconst detail::Expansion<T, 4> cd = detail::ExpansionBase<T>::TwoTwoDiff(cex, dey, dex, cey);\n\t\t\tconst detail::Expansion<T, 4> da = detail::ExpansionBase<T>::TwoTwoDiff(dex, aey, aex, dey);\n\t\t\tconst detail::Expansion<T, 4> ac = detail::ExpansionBase<T>::TwoTwoDiff(aex, cey, cex, aey);\n\t\t\tconst detail::Expansion<T, 4> bd = detail::ExpansionBase<T>::TwoTwoDiff(bex, dey, dex, bey);\n\t\t\tconst detail::Expansion<T, 24> temp24a = bc * dez + (cd * bez + bd * -cez);\n\t\t\tconst detail::Expansion<T, 24> temp24b = cd * aez + (da * cez + ac *  dez);\n\t\t\tconst detail::Expansion<T, 24> temp24c = da * bez + (ab * dez + bd *  aez);\n\t\t\tconst detail::Expansion<T, 24> temp24d = ab * cez + (bc * aez + ac * -bez);\n\t\t\tconst detail::Expansion<T, 288> adet = temp24a * aex * -aex + temp24a * aey * -aey + temp24a * aez * -aez;\n\t\t\tconst detail::Expansion<T, 288> bdet = temp24b * bex *  bex + temp24b * bey *  bey + temp24b * bez *  bez;\n\t\t\tconst detail::Expansion<T, 288> cdet = temp24c * cex * -cex + temp24c * cey * -cey + temp24c * cez * -cez;\n\t\t\tconst detail::Expansion<T, 288> ddet = temp24d * dex *  dex + temp24d * dey *  dey + temp24d * dez *  dez;\n\t\t\tconst detail::Expansion<T, 1152> fin1 = (adet + bdet) + (cdet + ddet);\n\t\t\tT det = fin1.estimate();\n\t\t\tT errbound = Constants<T>::isperrboundB * permanent;\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\n\t\t\tconst T aextail = detail::ExpansionBase<T>::MinusTail(pa[0], pe[0], aex);\n\t\t\tconst T aeytail = detail::ExpansionBase<T>::MinusTail(pa[1], pe[1], aey);\n\t\t\tconst T aeztail = detail::ExpansionBase<T>::MinusTail(pa[2], pe[2], aez);\n\t\t\tconst T bextail = detail::ExpansionBase<T>::MinusTail(pb[0], pe[0], bex);\n\t\t\tconst T beytail = detail::ExpansionBase<T>::MinusTail(pb[1], pe[1], bey);\n\t\t\tconst T beztail = detail::ExpansionBase<T>::MinusTail(pb[2], pe[2], bez);\n\t\t\tconst T cextail = detail::ExpansionBase<T>::MinusTail(pc[0], pe[0], cex);\n\t\t\tconst T ceytail = detail::ExpansionBase<T>::MinusTail(pc[1], pe[1], cey);\n\t\t\tconst T ceztail = detail::ExpansionBase<T>::MinusTail(pc[2], pe[2], cez);\n\t\t\tconst T dextail = detail::ExpansionBase<T>::MinusTail(pd[0], pe[0], dex);\n\t\t\tconst T deytail = detail::ExpansionBase<T>::MinusTail(pd[1], pe[1], dey);\n\t\t\tconst T deztail = detail::ExpansionBase<T>::MinusTail(pd[2], pe[2], dez);\n\t\t\tif (T(0) == aextail && T(0) == aeytail && T(0) == aeztail &&\n\t\t\t    T(0) == bextail && T(0) == beytail && T(0) == beztail &&\n\t\t\t    T(0) == cextail && T(0) == ceytail && T(0) == ceztail &&\n\t\t\t    T(0) == dextail && T(0) == deytail && T(0) == deztail) return det;\n\n\t\t\terrbound = Constants<T>::isperrboundC * permanent + Constants<T>::resulterrbound * std::abs(det);\n\t\t\tconst T abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n\t\t\tconst T bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n\t\t\tconst T cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n\t\t\tconst T daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n\t\t\tconst T aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n\t\t\tconst T bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n\t\t\tconst T ab3 = ab.mostSignificant();\n\t\t\tconst T bc3 = bc.mostSignificant();\n\t\t\tconst T cd3 = cd.mostSignificant();\n\t\t\tconst T da3 = da.mostSignificant();\n\t\t\tconst T ac3 = ac.mostSignificant();\n\t\t\tconst T bd3 = bd.mostSignificant();\n\t\t\tdet += ( ( (bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) + (ceztail * da3 + deztail * ac3 + aeztail * cd3))\n\t\t\t         + (dex * dex + dey * dey + dez * dez) * ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3)) )\n\t\t\t       - ( (aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) + (beztail * cd3 - ceztail * bd3 + deztail * bc3))\n\t\t\t         + (cex * cex + cey * cey + cez * cez) * ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)) ) )\n\t\t\t    + T(2) * ( ( (bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3)\n\t\t\t               + (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3))\n\t\t\t             - ( (aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3)\n\t\t\t               + (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\t\t\tif(std::abs(det) >= std::abs(errbound)) return det;\n\t\t\treturn exact::insphere(pa, pb, pc, pd, pe);\n\t\t}\n\t}\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/include/remove_at.hpp",
    "content": "#ifndef REMOVE_AT_HPP\n#define REMOVE_AT_HPP\n\n// check if c++11 is supported\n#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)\n#define REMOVE_AT_CXX11_IS_SUPPORTED\n#elif !defined(__cplusplus) && !defined(_MSC_VER)\ntypedef char couldnt_parse_cxx_standard[-1];\n#endif\n\n#include <algorithm>\n#include <iterator>\n\n/*!\n * Remove elements in the range [first; last) with indices from the sorted\n * unique range [ii_first, ii_last)\n */\ntemplate <class ForwardIt, class SortUniqIndsFwdIt>\ninline ForwardIt remove_at(\n    ForwardIt first,\n    ForwardIt last,\n    SortUniqIndsFwdIt ii_first,\n    SortUniqIndsFwdIt ii_last)\n{\n    if(ii_first == ii_last) // no indices-to-remove are given\n        return last;\n    typedef typename std::iterator_traits<ForwardIt>::difference_type diff_t;\n    typedef typename std::iterator_traits<SortUniqIndsFwdIt>::value_type ind_t;\n    ForwardIt destination = first + static_cast<diff_t>(*ii_first);\n    while(ii_first != ii_last)\n    {\n        // advance to an index after a chunk of elements-to-keep\n        for(ind_t cur = *ii_first++; ii_first != ii_last; ++ii_first)\n        {\n            const ind_t nxt = *ii_first;\n            if(nxt - cur > 1)\n                break;\n            cur = nxt;\n        }\n        // move the chunk of elements-to-keep to new destination\n        const ForwardIt source_first =\n            first + static_cast<diff_t>(*(ii_first - 1)) + 1;\n        const ForwardIt source_last =\n            ii_first != ii_last ? first + static_cast<diff_t>(*ii_first) : last;\n#ifdef REMOVE_AT_CXX11_IS_SUPPORTED\n        std::move(source_first, source_last, destination);\n#else\n        std::copy(source_first, source_last, destination); // c++98 version\n#endif\n        destination += source_last - source_first;\n    }\n    return destination;\n}\n\n#endif // REMOVE_AT_HPP\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CDT/src/CDT.cpp",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\n/**\n * @file\n * Explicit template instantiations for `float` and `double` coordinate types.\n *\n * Explicit instantiations are used when consuming as a compiled library.\n * In almost all of the cases 'float' and 'double' are sufficient.\n * Feel free to extend this with custom data types if needed.\n */\n\n#ifdef CDT_USE_AS_COMPILED_LIBRARY\n\n#include \"CDT.hpp\"\n#include \"CDTUtils.hpp\"\n#include \"InitializeWithGrid.h\"\n#include \"VerifyTopology.h\"\n\nnamespace CDT\n{\n\ntemplate class Triangulation<float>;\ntemplate class Triangulation<double>;\ntemplate struct V2d<float>;\ntemplate struct V2d<double>;\ntemplate struct Box2d<float>;\ntemplate struct Box2d<double>;\n\ntemplate Box2d<float> envelopBox<float>(const std::vector<V2d<float> >&);\ntemplate Box2d<double> envelopBox<double>(const std::vector<V2d<double> >&);\n\ntemplate DuplicatesInfo RemoveDuplicates<float>(std::vector<V2d<float> >&);\ntemplate DuplicatesInfo RemoveDuplicates<double>(std::vector<V2d<double> >&);\n\ntemplate DuplicatesInfo RemoveDuplicatesAndRemapEdges<float>(\n    std::vector<V2d<float> >&,\n    std::vector<Edge>&);\ntemplate DuplicatesInfo RemoveDuplicatesAndRemapEdges<double>(\n    std::vector<V2d<double> >&,\n    std::vector<Edge>&);\n\ntemplate bool verifyTopology<float>(const CDT::Triangulation<float>&);\ntemplate bool verifyTopology<double>(const CDT::Triangulation<double>&);\n\ntemplate void initializeWithRegularGrid<float>(\n    float,\n    float,\n    float,\n    float,\n    std::size_t,\n    std::size_t,\n    Triangulation<float>&);\ntemplate void initializeWithRegularGrid<double>(\n    double,\n    double,\n    double,\n    double,\n    std::size_t,\n    std::size_t,\n    Triangulation<double>&);\n\n} // namespace CDT\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/CMakeLists.txt",
    "content": "project(3rdParties)\n\n# warings and errors\nif (MSVC)\n    add_compile_options(/W2)\n    \n    if(O2_ASAN)\n        add_compile_options(/fsanitize=address)\n        add_compile_definitions(_DISABLE_STRING_ANNOTATION _DISABLE_VECTOR_ANNOTATION _DISABLE_ITERATOR_ANNOTATION)\n    endif()\nelseif(CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\")\n    include(CheckGCCVersion.cmake)\n\n    add_compile_options(-Wall -Wno-error=format -Wno-error=format-extra-args -Wno-error=conversion\n                        -Wno-error=incompatible-pointer-types -Wno-error=sign-conversion -Wno-error=pointer-sign\n                        -Wno-error=class-memaccess -Wno-error=misleading-indentation)\n\n    if(GCC_MAJOR_INT GREATER_EQUAL 12 AND GCC_MINOR_INT GREATER_EQUAL 1)\n        add_compile_options(-Wno-error=dangling-pointer)\n    endif()\nelse()\n    add_compile_options(-Wno-self-assign -Wno-parentheses-equality -Wno-shorten-64-to-32\n                        -Wno-unused-but-set-variable -Wno-deprecated-non-prototype -Wno-unused-local-typedef\n                        -Wno-deprecated-declarations)\nendif()\n\n# jerry script\nset(JERRY_CMDLINE           OFF CACHE BOOL \"\" FORCE)\nset(JERRY_CMDLINE_TEST      OFF CACHE BOOL \"\" FORCE)\nset(JERRY_CMDLINE_SNAPSHOT  OFF CACHE BOOL \"\" FORCE)\nset(JERRY_LIBFUZZER         OFF CACHE BOOL \"\" FORCE)\nset(JERRY_PORT_DEFAULT      ON  CACHE BOOL \"\" FORCE)\nset(JERRY_EXT               ON  CACHE BOOL \"\" FORCE)\nset(JERRY_MATH              OFF CACHE BOOL \"\" FORCE)\nset(UNITTESTS               OFF CACHE BOOL \"\" FORCE)\nset(DOCTESTS                OFF CACHE BOOL \"\" FORCE)\n\nif (WIN32 OR CMAKE_SYSTEM_NAME STREQUAL \"iOS\" OR ANDROID)\n    set(BUILD_SHARED_LIBS         OFF CACHE BOOL \"\" FORCE)\nelseif (UNIX)\n    set(BUILD_SHARED_LIBS         ON CACHE BOOL \"\" FORCE)\nendif()\n\nset(ENABLE_AMALGAM            OFF CACHE BOOL \"\" FORCE)\nset(ENABLE_LTO                ON  CACHE BOOL \"\" FORCE)\nset(ENABLE_STRIP              ON  CACHE BOOL \"\" FORCE)\nset(ENABLE_COMPILE_COMMANDS   ON  CACHE BOOL \"\" FORCE)\n\nset(JERRY_CPOINTER_32_BIT           ON  CACHE BOOL \"\" FORCE)\nset(JERRY_DEBUGGER                  ON  CACHE BOOL \"\" FORCE)\nset(JERRY_ERROR_MESSAGES            ON  CACHE BOOL \"\" FORCE)\nset(JERRY_EXTERNAL_CONTEXT          OFF CACHE BOOL \"\" FORCE)\nset(JERRY_PARSER                    ON  CACHE BOOL \"\" FORCE)\nset(JERRY_LINE_INFO                 ON  CACHE BOOL \"\" FORCE)\nset(JERRY_LOGGING                   ON  CACHE BOOL \"\" FORCE)\nset(JERRY_MEM_STATS                 ON  CACHE BOOL \"\" FORCE)\nset(JERRY_MEM_GC_BEFORE_EACH_ALLOC  OFF CACHE BOOL \"\" FORCE)\nset(JERRY_PARSER_DUMP_BYTE_CODE     OFF CACHE BOOL \"\" FORCE)\nset(JERRY_PROFILE                   \"es.next\" CACHE BOOL \"\" FORCE)\nset(JERRY_REGEXP_STRICT_MODE        OFF CACHE BOOL \"\" FORCE)\nset(JERRY_REGEXP_DUMP_BYTE_CODE     OFF CACHE BOOL \"\" FORCE)\nset(JERRY_SNAPSHOT_EXEC             OFF CACHE BOOL \"\" FORCE)\nset(JERRY_SNAPSHOT_SAVE             OFF CACHE BOOL \"\" FORCE)\nset(JERRY_SYSTEM_ALLOCATOR          OFF CACHE BOOL \"\" FORCE)\nset(JERRY_VALGRIND                  OFF CACHE BOOL \"\" FORCE)\nset(JERRY_VM_EXEC_STOP              OFF CACHE BOOL \"\" FORCE)\nset(JERRY_GLOBAL_HEAP_SIZE          \"(5120)\" CACHE BOOL \"\" FORCE)\nset(JERRY_GC_LIMIT                  \"(0)\"    CACHE BOOL \"\" FORCE)\nset(JERRY_STACK_LIMIT               \"(0)\"    CACHE BOOL \"\" FORCE)\nset(JERRY_GC_MARK_LIMIT             \"(8)\"    CACHE BOOL \"\" FORCE)\n\nadd_subdirectory(jerryscript)\n\n# Android NDK clang is newer than o2's local clang and promotes some warnings\n# to errors by default inside jerryscript's own -Werror=all flag group.\n# Override per-target, after jerryscript's add_subdirectory() so these come LAST on the command line.\nif (ANDROID)\n    foreach(_jerry_target jerry-core jerry-ext jerry-port-default)\n        if (TARGET ${_jerry_target})\n            target_compile_options(${_jerry_target} PRIVATE\n                -Wno-error=enum-enum-conversion\n                -Wno-error=misleading-indentation\n                -Wno-error=sign-conversion\n                -Wno-error=conversion\n                -Wno-error=shorten-64-to-32\n                -Wno-error=format-nonliteral\n                -Wno-unknown-warning-option)\n        endif()\n    endforeach()\nendif()\n\n# tracy\nif (O2_TRACY)\n    add_subdirectory(tracy)\n\n    set(TRACY_ENABLE ON CACHE BOOL \"Enable tracy\" FORCE)\n    set(TRACY_CALLSTACK ON CACHE BOOL \"Enable tracy callstack\" FORCE)\n    set(TRACY_ON_DEMAND ON CACHE BOOL \"Enable tracy on demand\" FORCE)\n\n    add_compile_definitions(TRACY_ENABLE)\n    \n    set_target_properties(TracyClient PROPERTIES FOLDER o2/3rdPartyLibs)\nendif()\n\n# box2d\nset(BOX2D_BUILD_STATIC TRUE)\nset(BOX2D_VERSION 1)\nadd_subdirectory(Box2D)\n\n# other libraries\nadd_subdirectory(libpng)\nadd_subdirectory(zlib)\nadd_subdirectory(FreeType)\nadd_subdirectory(pugixml)\nadd_subdirectory(boost)\n\n# spine\nset(SPINE_SANITIZE OFF)\nadd_subdirectory(Spine)\n\nif(MSVC)\n    target_compile_options(Box2D PRIVATE ${O2_MSVC_MP_FLAG})\n    target_compile_options(jerry-core PRIVATE ${O2_MSVC_MP_FLAG})\n    target_compile_options(jerry-ext PRIVATE ${O2_MSVC_MP_FLAG})\n    target_compile_options(jerry-port-default PRIVATE ${O2_MSVC_MP_FLAG})\n    target_compile_options(libpng PRIVATE ${O2_MSVC_MP_FLAG})\n    target_compile_options(zlib PRIVATE ${O2_MSVC_MP_FLAG})\n    target_compile_options(FreeType PRIVATE ${O2_MSVC_MP_FLAG})\n    target_compile_options(pugixml PRIVATE ${O2_MSVC_MP_FLAG})\n    target_compile_options(spine-cpp PRIVATE ${O2_MSVC_MP_FLAG})\nendif()\n\nset_target_properties(Box2D PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(jerry-core PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(jerry-ext PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(jerry-port-default PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(amalgam PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(libpng PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(zlib PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(FreeType PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(pugixml PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(spine-cpp PROPERTIES FOLDER o2/3rdPartyLibs)\n\nif(MSVC)\n    set_target_properties(boost_stacktrace_windbg_cached PROPERTIES FOLDER o2/3rdPartyLibs)\nendif()"
  },
  {
    "path": "Framework/3rdPartyLibs/CheckGCCVersion.cmake",
    "content": "if(CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\")\n    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpfullversion OUTPUT_VARIABLE GCC_VERSION)\n\n    message(STATUS \"GCC version: ${GCC_VERSION}\")\n\n    string(REPLACE \".\" \";\" VERSION_LIST ${GCC_VERSION})\n    list(GET VERSION_LIST 0 GCC_MAJOR)\n    list(GET VERSION_LIST 1 GCC_MINOR)\n\n    math(EXPR GCC_MAJOR_INT \"${GCC_MAJOR}\")\n    math(EXPR GCC_MINOR_INT \"${GCC_MINOR}\")\n\n    set(GCC_MAJOR_INT ${GCC_MAJOR_INT} PARENT_SCOPE)\n    set(GCC_MINOR_INT ${GCC_MINOR_INT} PARENT_SCOPE)\nendif()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/CMakeLists.txt",
    "content": "add_library(FreeType STATIC)\n\nadd_definitions(-DFT2_BUILD_LIBRARY)\n\nfile(GLOB PUBLIC_HEADERS \"include/*.h\")\nfile(GLOB PUBLIC_CONFIG_HEADERS \"include/config/*.h\")\nfile(GLOB PRIVATE_HEADERS \"include/internal/*.h\")\n\nset(BASE_SRCS\n  src/autofit/autofit.c\n  src/base/ftadvanc.c\n  src/base/ftbbox.c\n  src/base/ftbdf.c\n  src/base/ftbitmap.c\n  src/base/ftcalc.c\n  src/base/ftcid.c\n  src/base/ftdbgmem.c\n  src/base/ftdebug.c\n  src/base/ftfstype.c\n  src/base/ftgasp.c\n  src/base/ftgloadr.c\n  src/base/ftglyph.c\n  src/base/ftgxval.c\n  src/base/ftinit.c\n  src/base/ftlcdfil.c\n  src/base/ftmm.c\n  src/base/ftobjs.c\n  src/base/ftotval.c\n  src/base/ftoutln.c\n  src/base/ftpatent.c\n  src/base/ftpfr.c\n  src/base/ftrfork.c\n  src/base/ftsnames.c\n  src/base/ftstream.c\n  src/base/ftstroke.c\n  src/base/ftsynth.c\n  src/base/ftsystem.c\n  src/base/fttrigon.c\n  src/base/fttype1.c\n  src/base/ftutil.c\n  src/base/ftwinfnt.c\n  src/base/ftxf86.c\n  src/bdf/bdf.c\n  src/bzip2/ftbzip2.c\n  src/cache/ftcache.c\n  src/cff/cff.c\n  src/cid/type1cid.c\n  src/gzip/ftgzip.c\n  src/lzw/ftlzw.c\n  src/pcf/pcf.c\n  src/pfr/pfr.c\n  src/psaux/psaux.c\n  src/pshinter/pshinter.c\n  src/psnames/psmodule.c\n  src/raster/raster.c\n  src/sfnt/sfnt.c\n  src/smooth/smooth.c\n  src/truetype/truetype.c\n  src/type1/type1.c\n  src/type42/type42.c\n  src/winfonts/winfnt.c\n)\n\ninclude_directories(\"include\")\ninclude_directories(\"src/truetype\")\ninclude_directories(\"src/sfnt\")\ninclude_directories(\"src/autofit\")\ninclude_directories(\"src/smooth\")\ninclude_directories(\"src/raster\")\ninclude_directories(\"src/psaux\")\ninclude_directories(\"src/psnames\")\n\nlist(APPEND FREETYPE_SOURCES ${PUBLIC_HEADERS})\nlist(APPEND FREETYPE_SOURCES ${PUBLIC_CONFIG_HEADERS})\nlist(APPEND FREETYPE_SOURCES ${PRIVATE_HEADERS})\nlist(APPEND FREETYPE_SOURCES ${BASE_SRCS})\n\ntarget_sources(FreeType PRIVATE ${FREETYPE_SOURCES})"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/devel/ft2build.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ft2build.h                                                             */\n/*                                                                         */\n/*    FreeType 2 build and setup macros (development version).             */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2006, 2013 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n /*\n  *  This is a development version of <ft2build.h> to build the library in\n  *  debug mode.  Its only difference to the default version is that it\n  *  includes a local `ftoption.h' header file with different settings for\n  *  many configuration macros.\n  *\n  *  To use it, simply ensure that the directory containing this file is\n  *  scanned by the compiler before the default FreeType header directory.\n  *\n  */\n\n#ifndef __FT2BUILD_H__\n#define __FT2BUILD_H__\n\n#define FT_CONFIG_OPTIONS_H  <ftoption.h>\n\n#include <config/ftheader.h>\n\n#endif /* __FT2BUILD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/devel/ftoption.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftoption.h (for development)                                           */\n/*                                                                         */\n/*    User-selectable configuration macros (specification only).           */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTOPTION_H__\n#define __FTOPTION_H__\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                 USER-SELECTABLE CONFIGURATION MACROS                  */\n  /*                                                                       */\n  /* This file contains the default configuration macro definitions for    */\n  /* a standard build of the FreeType library.  There are three ways to    */\n  /* use this file to build project-specific versions of the library:      */\n  /*                                                                       */\n  /*  - You can modify this file by hand, but this is not recommended in   */\n  /*    cases where you would like to build several versions of the        */\n  /*    library from a single source directory.                            */\n  /*                                                                       */\n  /*  - You can put a copy of this file in your build directory, more      */\n  /*    precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the     */\n  /*    name of a directory that is included _before_ the FreeType include */\n  /*    path during compilation.                                           */\n  /*                                                                       */\n  /*    The default FreeType Makefiles and Jamfiles use the build          */\n  /*    directory `builds/<system>' by default, but you can easily change  */\n  /*    that for your own projects.                                        */\n  /*                                                                       */\n  /*  - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it    */\n  /*    slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to       */\n  /*    locate this file during the build.  For example,                   */\n  /*                                                                       */\n  /*      #define FT_CONFIG_OPTIONS_H  <myftoptions.h>                     */\n  /*      #include <config/ftheader.h>                                     */\n  /*                                                                       */\n  /*    will use `$BUILD/myftoptions.h' instead of this file for macro     */\n  /*    definitions.                                                       */\n  /*                                                                       */\n  /*    Note also that you can similarly pre-define the macro              */\n  /*    FT_CONFIG_MODULES_H used to locate the file listing of the modules */\n  /*    that are statically linked to the library at compile time.  By     */\n  /*    default, this file is <config/ftmodule.h>.                         */\n  /*                                                                       */\n  /* We highly recommend using the third method whenever possible.         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /**** G E N E R A L   F R E E T Y P E   2   C O N F I G U R A T I O N ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Uncomment the line below if you want to activate sub-pixel rendering  */\n  /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */\n  /*                                                                       */\n  /* Note that this feature is covered by several Microsoft patents        */\n  /* and should not be activated in any default build of the library.      */\n  /*                                                                       */\n  /* This macro has no impact on the FreeType API, only on its             */\n  /* _implementation_.  For example, using FT_RENDER_MODE_LCD when calling */\n  /* FT_Render_Glyph still generates a bitmap that is 3 times wider than   */\n  /* the original size in case this macro isn't defined; however, each     */\n  /* triplet of subpixels has R=G=B.                                       */\n  /*                                                                       */\n  /* This is done to allow FreeType clients to run unmodified, forcing     */\n  /* them to display normal gray-level anti-aliased glyphs.                */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Many compilers provide a non-ANSI 64-bit data type that can be used   */\n  /* by FreeType to speed up some computations.  However, this will create */\n  /* some problems when compiling the library in strict ANSI mode.         */\n  /*                                                                       */\n  /* For this reason, the use of 64-bit integers is normally disabled when */\n  /* the __STDC__ macro is defined.  You can however disable this by       */\n  /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here.                 */\n  /*                                                                       */\n  /* For most compilers, this will only create compilation warnings when   */\n  /* building the library.                                                 */\n  /*                                                                       */\n  /* ObNote: The compiler-specific 64-bit integers are detected in the     */\n  /*         file `ftconfig.h' either statically or through the            */\n  /*         `configure' script on supported platforms.                    */\n  /*                                                                       */\n#undef FT_CONFIG_OPTION_FORCE_INT64\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* If this macro is defined, do not try to use an assembler version of   */\n  /* performance-critical functions (e.g. FT_MulFix).  You should only do  */\n  /* that to verify that the assembler function works properly, or to      */\n  /* execute benchmark tests of the various implementations.               */\n/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* If this macro is defined, try to use an inlined assembler version of  */\n  /* the `FT_MulFix' function, which is a `hotspot' when loading and       */\n  /* hinting glyphs, and which should be executed as fast as possible.     */\n  /*                                                                       */\n  /* Note that if your compiler or CPU is not supported, this will default */\n  /* to the standard and portable implementation found in `ftcalc.c'.      */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_INLINE_MULFIX\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* LZW-compressed file support.                                          */\n  /*                                                                       */\n  /*   FreeType now handles font files that have been compressed with the  */\n  /*   `compress' program.  This is mostly used to parse many of the PCF   */\n  /*   files that come with various X11 distributions.  The implementation */\n  /*   uses NetBSD's `zopen' to partially uncompress the file on the fly   */\n  /*   (see src/lzw/ftgzip.c).                                             */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.             */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_USE_LZW\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Gzip-compressed file support.                                         */\n  /*                                                                       */\n  /*   FreeType now handles font files that have been compressed with the  */\n  /*   `gzip' program.  This is mostly used to parse many of the PCF files */\n  /*   that come with XFree86.  The implementation uses `zlib' to          */\n  /*   partially uncompress the file on the fly (see src/gzip/ftgzip.c).   */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.  See also   */\n  /*   the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below.                       */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_USE_ZLIB\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ZLib library selection                                                */\n  /*                                                                       */\n  /*   This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined.  */\n  /*   It allows FreeType's `ftgzip' component to link to the system's     */\n  /*   installation of the ZLib library.  This is useful on systems like   */\n  /*   Unix or VMS where it generally is already available.                */\n  /*                                                                       */\n  /*   If you let it undefined, the component will use its own copy        */\n  /*   of the zlib sources instead.  These have been modified to be        */\n  /*   included directly within the component and *not* export external    */\n  /*   function names.  This allows you to link any program with FreeType  */\n  /*   _and_ ZLib without linking conflicts.                               */\n  /*                                                                       */\n  /*   Do not #undef this macro here since the build system might define   */\n  /*   it for certain configurations only.                                 */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Bzip2-compressed file support.                                        */\n  /*                                                                       */\n  /*   FreeType now handles font files that have been compressed with the  */\n  /*   `bzip2' program.  This is mostly used to parse many of the PCF      */\n  /*   files that come with XFree86.  The implementation uses `libbz2' to  */\n  /*   partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */\n  /*   Contrary to gzip, bzip2 currently is not included and need to use   */\n  /*   the system available bzip2 implementation.                          */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.             */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_USE_BZIP2\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* PNG bitmap support.                                                   */\n  /*                                                                       */\n  /*   FreeType now handles loading color bitmap glyphs in the PNG format. */\n  /*   This requires help from the external libpng library.  Uncompressed  */\n  /*   color bitmaps do not need any external libraries and will be        */\n  /*   supported regardless of this configuration.                         */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.             */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_USE_PNG\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* HarfBuzz support.                                                     */\n  /*                                                                       */\n  /*   FreeType uses the HarfBuzz library to improve auto-hinting of       */\n  /*   OpenType fonts.  If available, many glyphs not directly addressable */\n  /*   by a font's character map will be hinted also.                      */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.             */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_USE_HARFBUZZ\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define to disable the use of file stream functions and types, FILE,   */\n  /* fopen() etc.  Enables the use of smaller system libraries on embedded */\n  /* systems that have multiple system libraries, some with or without     */\n  /* file stream support, in the cases where file stream support is not    */\n  /* necessary such as memory loading of font files.                       */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DLL export compilation                                                */\n  /*                                                                       */\n  /*   When compiling FreeType as a DLL, some systems/compilers need a     */\n  /*   special keyword in front OR after the return type of function       */\n  /*   declarations.                                                       */\n  /*                                                                       */\n  /*   Two macros are used within the FreeType source code to define       */\n  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */\n  /*                                                                       */\n  /*     FT_EXPORT( return_type )                                          */\n  /*                                                                       */\n  /*       is used in a function declaration, as in                        */\n  /*                                                                       */\n  /*         FT_EXPORT( FT_Error )                                         */\n  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */\n  /*                                                                       */\n  /*                                                                       */\n  /*     FT_EXPORT_DEF( return_type )                                      */\n  /*                                                                       */\n  /*       is used in a function definition, as in                         */\n  /*                                                                       */\n  /*         FT_EXPORT_DEF( FT_Error )                                     */\n  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */\n  /*         {                                                             */\n  /*           ... some code ...                                           */\n  /*           return FT_Err_Ok;                                           */\n  /*         }                                                             */\n  /*                                                                       */\n  /*   You can provide your own implementation of FT_EXPORT and            */\n  /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */\n  /*   will be later automatically defined as `extern return_type' to      */\n  /*   allow normal compilation.                                           */\n  /*                                                                       */\n  /*   Do not #undef these macros here since the build system might define */\n  /*   them for certain configurations only.                               */\n  /*                                                                       */\n/* #define FT_EXPORT(x)      extern x */\n/* #define FT_EXPORT_DEF(x)  x */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Glyph Postscript Names handling                                       */\n  /*                                                                       */\n  /*   By default, FreeType 2 is compiled with the `psnames' module.  This */\n  /*   module is in charge of converting a glyph name string into a        */\n  /*   Unicode value, or return a Macintosh standard glyph name for the    */\n  /*   use with the TrueType `post' table.                                 */\n  /*                                                                       */\n  /*   Undefine this macro if you do not want `psnames' compiled in your   */\n  /*   build of FreeType.  This has the following effects:                 */\n  /*                                                                       */\n  /*   - The TrueType driver will provide its own set of glyph names,      */\n  /*     if you build it to support postscript names in the TrueType       */\n  /*     `post' table.                                                     */\n  /*                                                                       */\n  /*   - The Type 1 driver will not be able to synthesize a Unicode        */\n  /*     charmap out of the glyphs found in the fonts.                     */\n  /*                                                                       */\n  /*   You would normally undefine this configuration macro when building  */\n  /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Postscript Names to Unicode Values support                            */\n  /*                                                                       */\n  /*   By default, FreeType 2 is built with the `PSNames' module compiled  */\n  /*   in.  Among other things, the module is used to convert a glyph name */\n  /*   into a Unicode value.  This is especially useful in order to        */\n  /*   synthesize on the fly a Unicode charmap from the CFF/Type 1 driver  */\n  /*   through a big table named the `Adobe Glyph List' (AGL).             */\n  /*                                                                       */\n  /*   Undefine this macro if you do not want the Adobe Glyph List         */\n  /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */\n  /*   able to synthesize a Unicode charmap out of the glyphs found in the */\n  /*   fonts.                                                              */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Support for Mac fonts                                                 */\n  /*                                                                       */\n  /*   Define this macro if you want support for outline fonts in Mac      */\n  /*   format (mac dfont, mac resource, macbinary containing a mac         */\n  /*   resource) on non-Mac platforms.                                     */\n  /*                                                                       */\n  /*   Note that the `FOND' resource isn't checked.                        */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_MAC_FONTS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Guessing methods to access embedded resource forks                    */\n  /*                                                                       */\n  /*   Enable extra Mac fonts support on non-Mac platforms (e.g.           */\n  /*   GNU/Linux).                                                         */\n  /*                                                                       */\n  /*   Resource forks which include fonts data are stored sometimes in     */\n  /*   locations which users or developers don't expected.  In some cases, */\n  /*   resource forks start with some offset from the head of a file.  In  */\n  /*   other cases, the actual resource fork is stored in file different   */\n  /*   from what the user specifies.  If this option is activated,         */\n  /*   FreeType tries to guess whether such offsets or different file      */\n  /*   names must be used.                                                 */\n  /*                                                                       */\n  /*   Note that normal, direct access of resource forks is controlled via */\n  /*   the FT_CONFIG_OPTION_MAC_FONTS option.                              */\n  /*                                                                       */\n#ifdef FT_CONFIG_OPTION_MAC_FONTS\n#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Allow the use of FT_Incremental_Interface to load typefaces that      */\n  /* contain no glyph data, but supply it via a callback function.         */\n  /* This is required by clients supporting document formats which         */\n  /* supply font data incrementally as the document is parsed, such        */\n  /* as the Ghostscript interpreter for the PostScript language.           */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_INCREMENTAL\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The size in bytes of the render pool used by the scan-line converter  */\n  /* to do all of its work.                                                */\n  /*                                                                       */\n  /* This must be greater than 4KByte if you use FreeType to rasterize     */\n  /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */\n  /* allocation of the render pool.                                        */\n  /*                                                                       */\n#define FT_RENDER_POOL_SIZE  16384L\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FT_MAX_MODULES                                                        */\n  /*                                                                       */\n  /*   The maximum number of modules that can be registered in a single    */\n  /*   FreeType library object.  32 is the default.                        */\n  /*                                                                       */\n#define FT_MAX_MODULES  32\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Debug level                                                           */\n  /*                                                                       */\n  /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */\n  /*   errors are reported through the `ftdebug' component.  In trace      */\n  /*   mode, additional messages are sent to the standard output during    */\n  /*   execution.                                                          */\n  /*                                                                       */\n  /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */\n  /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */\n  /*                                                                       */\n  /*   Don't define any of these macros to compile in `release' mode!      */\n  /*                                                                       */\n  /*   Do not #undef these macros here since the build system might define */\n  /*   them for certain configurations only.                               */\n  /*                                                                       */\n#define FT_DEBUG_LEVEL_ERROR\n#define FT_DEBUG_LEVEL_TRACE\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Autofitter debugging                                                  */\n  /*                                                                       */\n  /*   If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to     */\n  /*   control the autofitter behaviour for debugging purposes with global */\n  /*   boolean variables (consequently, you should *never* enable this     */\n  /*   while compiling in `release' mode):                                 */\n  /*                                                                       */\n  /*     _af_debug_disable_horz_hints                                      */\n  /*     _af_debug_disable_vert_hints                                      */\n  /*     _af_debug_disable_blue_hints                                      */\n  /*                                                                       */\n  /*   Additionally, the following functions provide dumps of various      */\n  /*   internal autofit structures to stdout (using `printf'):             */\n  /*                                                                       */\n  /*     af_glyph_hints_dump_points                                        */\n  /*     af_glyph_hints_dump_segments                                      */\n  /*     af_glyph_hints_dump_edges                                         */\n  /*                                                                       */\n  /*   As an argument, they use another global variable:                   */\n  /*                                                                       */\n  /*     _af_debug_hints                                                   */\n  /*                                                                       */\n  /*   Please have a look at the `ftgrid' demo program to see how those    */\n  /*   variables and macros should be used.                                */\n  /*                                                                       */\n  /*   Do not #undef these macros here since the build system might define */\n  /*   them for certain configurations only.                               */\n  /*                                                                       */\n#define FT_DEBUG_AUTOFIT\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Memory Debugging                                                      */\n  /*                                                                       */\n  /*   FreeType now comes with an integrated memory debugger that is       */\n  /*   capable of detecting simple errors like memory leaks or double      */\n  /*   deletes.  To compile it within your build of the library, you       */\n  /*   should define FT_DEBUG_MEMORY here.                                 */\n  /*                                                                       */\n  /*   Note that the memory debugger is only activated at runtime when     */\n  /*   when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */\n  /*                                                                       */\n  /*   Do not #undef this macro here since the build system might define   */\n  /*   it for certain configurations only.                                 */\n  /*                                                                       */\n#define FT_DEBUG_MEMORY\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Module errors                                                         */\n  /*                                                                       */\n  /*   If this macro is set (which is _not_ the default), the higher byte  */\n  /*   of an error code gives the module in which the error has occurred,  */\n  /*   while the lower byte is the real error code.                        */\n  /*                                                                       */\n  /*   Setting this macro makes sense for debugging purposes only, since   */\n  /*   it would break source compatibility of certain programs that use    */\n  /*   FreeType 2.                                                         */\n  /*                                                                       */\n  /*   More details can be found in the files ftmoderr.h and fterrors.h.   */\n  /*                                                                       */\n#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Position Independent Code                                             */\n  /*                                                                       */\n  /*   If this macro is set (which is _not_ the default), FreeType2 will   */\n  /*   avoid creating constants that require address fixups.  Instead the  */\n  /*   constants will be moved into a struct and additional intialization  */\n  /*   code will be used.                                                  */\n  /*                                                                       */\n  /*   Setting this macro is needed for systems that prohibit address      */\n  /*   fixups, such as BREW.                                               */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_PIC */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */\n  /* embedded bitmaps in all formats using the SFNT module (namely         */\n  /* TrueType & OpenType).                                                 */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */\n  /* load and enumerate the glyph Postscript names in a TrueType or        */\n  /* OpenType file.                                                        */\n  /*                                                                       */\n  /* Note that when you do not compile the `PSNames' module by undefining  */\n  /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */\n  /* contain additional code used to read the PS Names table from a font.  */\n  /*                                                                       */\n  /* (By default, the module uses `PSNames' to extract glyph names.)       */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */\n  /* access the internal name table in a SFNT-based format like TrueType   */\n  /* or OpenType.  The name table contains various strings used to         */\n  /* describe the font, like family name, copyright, version, etc.  It     */\n  /* does not contain any glyph name though.                               */\n  /*                                                                       */\n  /* Accessing SFNT names is done through the functions declared in        */\n  /* `ftsnames.h'.                                                         */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_SFNT_NAMES\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TrueType CMap support                                                 */\n  /*                                                                       */\n  /*   Here you can fine-tune which TrueType CMap table format shall be    */\n  /*   supported.                                                          */\n#define TT_CONFIG_CMAP_FORMAT_0\n#define TT_CONFIG_CMAP_FORMAT_2\n#define TT_CONFIG_CMAP_FORMAT_4\n#define TT_CONFIG_CMAP_FORMAT_6\n#define TT_CONFIG_CMAP_FORMAT_8\n#define TT_CONFIG_CMAP_FORMAT_10\n#define TT_CONFIG_CMAP_FORMAT_12\n#define TT_CONFIG_CMAP_FORMAT_13\n#define TT_CONFIG_CMAP_FORMAT_14\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****    T R U E T Y P E   D R I V E R    C O N F I G U R A T I O N   ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */\n  /* a bytecode interpreter in the TrueType driver.                        */\n  /*                                                                       */\n  /* By undefining this, you will only compile the code necessary to load  */\n  /* TrueType glyphs without hinting.                                      */\n  /*                                                                       */\n  /*   Do not #undef this macro here, since the build system might         */\n  /*   define it for certain configurations only.                          */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile       */\n  /* EXPERIMENTAL subpixel hinting support into the TrueType driver.  This */\n  /* replaces the native TrueType hinting mechanism when anything but      */\n  /* FT_RENDER_MODE_MONO is requested.                                     */\n  /*                                                                       */\n  /* Enabling this causes the TrueType driver to ignore instructions under */\n  /* certain conditions.  This is done in accordance with the guide here,  */\n  /* with some minor differences:                                          */\n  /*                                                                       */\n  /*  http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */\n  /*                                                                       */\n  /* By undefining this, you only compile the code necessary to hint       */\n  /* TrueType glyphs with native TT hinting.                               */\n  /*                                                                       */\n  /*   This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be    */\n  /*   defined.                                                            */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */\n  /* of the TrueType bytecode interpreter is used that doesn't implement   */\n  /* any of the patented opcodes and algorithms.  The patents related to   */\n  /* TrueType hinting have expired worldwide since May 2010; this option   */\n  /* is now deprecated.                                                    */\n  /*                                                                       */\n  /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored*  */\n  /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words,  */\n  /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                */\n  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */\n  /*                                                                       */\n  /* This macro is only useful for a small number of font files (mostly    */\n  /* for Asian scripts) that require bytecode interpretation to properly   */\n  /* load glyphs.  For all other fonts, this produces unpleasant results,  */\n  /* thus the unpatented interpreter is never used to load glyphs from     */\n  /* TrueType fonts unless one of the following two options is used.       */\n  /*                                                                       */\n  /*   - The unpatented interpreter is explicitly activated by the user    */\n  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */\n  /*     when opening the FT_Face.                                         */\n  /*                                                                       */\n  /*   - FreeType detects that the FT_Face corresponds to one of the       */\n  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */\n  /*     contains a hard-coded list of font names and other matching       */\n  /*     parameters (see function `tt_face_init' in file                   */\n  /*     `src/truetype/ttobjs.c').                                         */\n  /*                                                                       */\n  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */\n  /*                                                                       */\n  /*   {                                                                   */\n  /*     FT_Parameter  parameter;                                          */\n  /*     FT_Open_Args  open_args;                                          */\n  /*                                                                       */\n  /*                                                                       */\n  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */\n  /*                                                                       */\n  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */\n  /*     open_args.pathname   = my_font_pathname;                          */\n  /*     open_args.num_params = 1;                                         */\n  /*     open_args.params     = &parameter;                                */\n  /*                                                                       */\n  /*     error = FT_Open_Face( library, &open_args, index, &face );        */\n  /*     ...                                                               */\n  /*   }                                                                   */\n  /*                                                                       */\n/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */\n  /* bytecode interpreter with a huge switch statement, rather than a call */\n  /* table.  This results in smaller and faster code for a number of       */\n  /* architectures.                                                        */\n  /*                                                                       */\n  /* Note however that on some compiler/processor combinations, undefining */\n  /* this macro will generate faster, though larger, code.                 */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_INTERPRETER_SWITCH\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */\n  /* TrueType glyph loader to use Apple's definition of how to handle      */\n  /* component offsets in composite glyphs.                                */\n  /*                                                                       */\n  /* Apple and MS disagree on the default behavior of component offsets    */\n  /* in composites.  Apple says that they should be scaled by the scaling  */\n  /* factors in the transformation matrix (roughly, it's more complex)     */\n  /* while MS says they should not.  OpenType defines two bits in the      */\n  /* composite flags array which can be used to disambiguate, but old      */\n  /* fonts will not have them.                                             */\n  /*                                                                       */\n  /*   http://www.microsoft.com/typography/otspec/glyf.htm                 */\n  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */\n  /*                                                                       */\n#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include         */\n  /* support for Apple's distortable font technology (fvar, gvar, cvar,    */\n  /* and avar tables).  This has many similarities to Type 1 Multiple      */\n  /* Masters support.                                                      */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_GX_VAR_SUPPORT\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_BDF if you want to include support for        */\n  /* an embedded `BDF ' table within SFNT-based bitmap formats.            */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_BDF\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and       */\n  /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */\n  /* required.                                                             */\n  /*                                                                       */\n#define T1_MAX_DICT_DEPTH  5\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */\n  /* calls during glyph loading.                                           */\n  /*                                                                       */\n#define T1_MAX_SUBRS_CALLS  16\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */\n  /* minimum of 16 is required.                                            */\n  /*                                                                       */\n  /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */\n  /*                                                                       */\n#define T1_MAX_CHARSTRINGS_OPERANDS  256\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define this configuration macro if you want to prevent the            */\n  /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */\n  /* files into an existing face.  Note that if set, the T1 driver will be */\n  /* unable to produce kerning distances.                                  */\n  /*                                                                       */\n#undef T1_CONFIG_OPTION_NO_AFM\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define this configuration macro if you want to prevent the            */\n  /* compilation of the Multiple Masters font support in the Type 1        */\n  /* driver.                                                               */\n  /*                                                                       */\n#undef T1_CONFIG_OPTION_NO_MM_SUPPORT\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****         C F F   D R I V E R    C O N F I G U R A T I O N        ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is      */\n  /* possible to set up the default values of the four control points that */\n  /* define the stem darkening behaviour of the (new) CFF engine.  For     */\n  /* more details please read the documentation of the                     */\n  /* `darkening-parameters' property of the cff driver module (file        */\n  /* `ftcffdrv.h'), which allows the control at run-time.                  */\n  /*                                                                       */\n  /* Do *not* undefine these macros!                                       */\n  /*                                                                       */\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1   500\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1   400\n\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2  1000\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2   275\n\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3  1667\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3   275\n\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4  2333\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4     0\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF       */\n  /* engine gets compiled into FreeType.  If defined, it is possible to    */\n  /* switch between the two engines using the `hinting-engine' property of */\n  /* the cff driver module.                                                */\n  /*                                                                       */\n#define CFF_CONFIG_OPTION_OLD_ENGINE\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Compile autofit module with CJK (Chinese, Japanese, Korean) script    */\n  /* support.                                                              */\n  /*                                                                       */\n#define AF_CONFIG_OPTION_CJK\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Compile autofit module with Indic script support.                     */\n  /*                                                                       */\n#define AF_CONFIG_OPTION_INDIC\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Compile autofit module with warp hinting.  The idea of the warping    */\n  /* code is to slightly scale and shift a glyph within a single dimension */\n  /* so that as much of its segments are aligned (more or less) on the     */\n  /* grid.  To find out the optimal scaling and shifting value, various    */\n  /* parameter combinations are tried and scored.                          */\n  /*                                                                       */\n  /* This experimental option is only active if the render mode is         */\n  /* FT_RENDER_MODE_LIGHT.                                                 */\n  /*                                                                       */\n#define AF_CONFIG_OPTION_USE_WARPER\n\n  /* */\n\n\n  /*\n   * This macro is obsolete.  Support has been removed in FreeType\n   * version 2.5.\n   */\n/* #define FT_CONFIG_OPTION_OLD_INTERNALS */\n\n\n  /*\n   * This macro is defined if either unpatented or native TrueType\n   * hinting is requested by the definitions above.\n   */\n#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER\n#define  TT_USE_BYTECODE_INTERPRETER\n#undef   TT_CONFIG_OPTION_UNPATENTED_HINTING\n#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING\n#define  TT_USE_BYTECODE_INTERPRETER\n#endif\n\n\n  /*\n   * Check CFF darkening parameters.  The checks are the same as in function\n   * `cff_property_set' in file `cffdrivr.c'.\n   */\n#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0   || \\\n                                                      \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0   || \\\n                                                      \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 >        \\\n      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2     || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 >        \\\n      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3     || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 >        \\\n      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4     || \\\n                                                      \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500\n#error \"Invalid CFF darkening parameters!\"\n#endif\n\nFT_END_HEADER\n\n\n#endif /* __FTOPTION_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/freetype.cmake",
    "content": "add_definitions(-DFT2_BUILD_LIBRARY)\n\nfile(GLOB PUBLIC_HEADERS \"${FREETYPE_PATH}/include/*.h\")\nfile(GLOB PUBLIC_CONFIG_HEADERS \"i${FREETYPE_PATH}/nclude/config/*.h\")\nfile(GLOB PRIVATE_HEADERS \"${FREETYPE_PATH}/include/internal/*.h\")\n\nset(BASE_SRCS\n  ${FREETYPE_PATH}/src/autofit/autofit.c\n  ${FREETYPE_PATH}/src/base/ftadvanc.c\n  ${FREETYPE_PATH}/src/base/ftbbox.c\n  ${FREETYPE_PATH}/src/base/ftbdf.c\n  ${FREETYPE_PATH}/src/base/ftbitmap.c\n  ${FREETYPE_PATH}/src/base/ftcalc.c\n  ${FREETYPE_PATH}/src/base/ftcid.c\n  ${FREETYPE_PATH}/src/base/ftdbgmem.c\n  ${FREETYPE_PATH}/src/base/ftdebug.c\n  ${FREETYPE_PATH}/src/base/ftfstype.c\n  ${FREETYPE_PATH}/src/base/ftgasp.c\n  ${FREETYPE_PATH}/src/base/ftgloadr.c\n  ${FREETYPE_PATH}/src/base/ftglyph.c\n  ${FREETYPE_PATH}/src/base/ftgxval.c\n  ${FREETYPE_PATH}/src/base/ftinit.c\n  ${FREETYPE_PATH}/src/base/ftlcdfil.c\n  ${FREETYPE_PATH}/src/base/ftmm.c\n  ${FREETYPE_PATH}/src/base/ftobjs.c\n  ${FREETYPE_PATH}/src/base/ftotval.c\n  ${FREETYPE_PATH}/src/base/ftoutln.c\n  ${FREETYPE_PATH}/src/base/ftpatent.c\n  ${FREETYPE_PATH}/src/base/ftpfr.c\n  ${FREETYPE_PATH}/src/base/ftrfork.c\n  ${FREETYPE_PATH}/src/base/ftsnames.c\n  ${FREETYPE_PATH}/src/base/ftstream.c\n  ${FREETYPE_PATH}/src/base/ftstroke.c\n  ${FREETYPE_PATH}/src/base/ftsynth.c\n  ${FREETYPE_PATH}/src/base/ftsystem.c\n  ${FREETYPE_PATH}/src/base/fttrigon.c\n  ${FREETYPE_PATH}/src/base/fttype1.c\n  ${FREETYPE_PATH}/src/base/ftutil.c\n  ${FREETYPE_PATH}/src/base/ftwinfnt.c\n  ${FREETYPE_PATH}/src/base/ftxf86.c\n  ${FREETYPE_PATH}/src/bdf/bdf.c\n  ${FREETYPE_PATH}/src/bzip2/ftbzip2.c\n  ${FREETYPE_PATH}/src/cache/ftcache.c\n  ${FREETYPE_PATH}/src/cff/cff.c\n  ${FREETYPE_PATH}/src/cid/type1cid.c\n  ${FREETYPE_PATH}/src/gzip/ftgzip.c\n  ${FREETYPE_PATH}/src/lzw/ftlzw.c\n  ${FREETYPE_PATH}/src/pcf/pcf.c\n  ${FREETYPE_PATH}/src/pfr/pfr.c\n  ${FREETYPE_PATH}/src/psaux/psaux.c\n  ${FREETYPE_PATH}/src/pshinter/pshinter.c\n  ${FREETYPE_PATH}/src/psnames/psmodule.c\n  ${FREETYPE_PATH}/src/raster/raster.c\n  ${FREETYPE_PATH}/src/sfnt/sfnt.c\n  ${FREETYPE_PATH}/src/smooth/smooth.c\n  ${FREETYPE_PATH}/src/truetype/truetype.c\n  ${FREETYPE_PATH}/src/type1/type1.c\n  ${FREETYPE_PATH}/src/type42/type42.c\n  ${FREETYPE_PATH}/src/winfonts/winfnt.c\n)\n\ninclude_directories(\"${FREETYPE_PATH}/include\")\ninclude_directories(\"${FREETYPE_PATH}/src/truetype\")\ninclude_directories(\"${FREETYPE_PATH}/src/sfnt\")\ninclude_directories(\"${FREETYPE_PATH}/src/autofit\")\ninclude_directories(\"${FREETYPE_PATH}/src/smooth\")\ninclude_directories(\"${FREETYPE_PATH}/src/raster\")\ninclude_directories(\"${FREETYPE_PATH}/src/psaux\")\ninclude_directories(\"${FREETYPE_PATH}/src/psnames\")\n\nlist(APPEND FREETYPE_SOURCES ${PUBLIC_HEADERS})\nlist(APPEND FREETYPE_SOURCES ${PUBLIC_CONFIG_HEADERS})\nlist(APPEND FREETYPE_SOURCES ${PRIVATE_HEADERS})\nlist(APPEND FREETYPE_SOURCES ${BASE_SRCS})"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/config/ftconfig.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftconfig.h                                                             */\n/*                                                                         */\n/*    ANSI-specific configuration file (specification only).               */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006-2008, 2010-2011, 2013, 2014 by               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This header file contains a number of macro definitions that are used */\n  /* by the rest of the engine.  Most of the macros here are automatically */\n  /* determined at compile time, and you should not need to change it to   */\n  /* port FreeType, except to compile the library with a non-ANSI          */\n  /* compiler.                                                             */\n  /*                                                                       */\n  /* Note however that if some specific modifications are needed, we       */\n  /* advise you to place a modified copy in your build directory.          */\n  /*                                                                       */\n  /* The build directory is usually `builds/<system>', and contains        */\n  /* system-specific files that are always included first when building    */\n  /* the library.                                                          */\n  /*                                                                       */\n  /* This ANSI version should stay in `include/config/'.                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __FTCONFIG_H__\n#define __FTCONFIG_H__\n\n#include <ft2build.h>\n#include FT_CONFIG_OPTIONS_H\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */\n  /*                                                                       */\n  /* These macros can be toggled to suit a specific system.  The current   */\n  /* ones are defaults used to compile FreeType in an ANSI C environment   */\n  /* (16bit compilers are also supported).  Copy this file to your own     */\n  /* `builds/<system>' directory, and edit it to port the engine.          */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* There are systems (like the Texas Instruments 'C54x) where a `char' */\n  /* has 16 bits.  ANSI C says that sizeof(char) is always 1.  Since an  */\n  /* `int' has 16 bits also for this system, sizeof(int) gives 1 which   */\n  /* is probably unexpected.                                             */\n  /*                                                                     */\n  /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a      */\n  /* `char' type.                                                        */\n\n#ifndef FT_CHAR_BIT\n#define FT_CHAR_BIT  CHAR_BIT\n#endif\n\n\n  /* The size of an `int' type.  */\n#if                                 FT_UINT_MAX == 0xFFFFUL\n#define FT_SIZEOF_INT  (16 / FT_CHAR_BIT)\n#elif                               FT_UINT_MAX == 0xFFFFFFFFUL\n#define FT_SIZEOF_INT  (32 / FT_CHAR_BIT)\n#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL\n#define FT_SIZEOF_INT  (64 / FT_CHAR_BIT)\n#else\n#error \"Unsupported size of `int' type!\"\n#endif\n\n  /* The size of a `long' type.  A five-byte `long' (as used e.g. on the */\n  /* DM642) is recognized but avoided.                                   */\n#if                                  FT_ULONG_MAX == 0xFFFFFFFFUL\n#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)\n#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL\n#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)\n#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL\n#define FT_SIZEOF_LONG  (64 / FT_CHAR_BIT)\n#else\n#error \"Unsupported size of `long' type!\"\n#endif\n\n\n  /* FT_UNUSED is a macro used to indicate that a given parameter is not  */\n  /* used -- this is only used to get rid of unpleasant compiler warnings */\n#ifndef FT_UNUSED\n#define FT_UNUSED( arg )  ( (arg) = (arg) )\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                     AUTOMATIC CONFIGURATION MACROS                    */\n  /*                                                                       */\n  /* These macros are computed from the ones defined above.  Don't touch   */\n  /* their definition, unless you know precisely what you are doing.  No   */\n  /* porter should need to mess with them.                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Mac support                                                           */\n  /*                                                                       */\n  /*   This is the only necessary change, so it is defined here instead    */\n  /*   providing a new configuration file.                                 */\n  /*                                                                       */\n#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )\n  /* no Carbon frameworks for 64bit 10.4.x */\n  /* AvailabilityMacros.h is available since Mac OS X 10.2,        */\n  /* so guess the system version by maximum errno before inclusion */\n#include <errno.h>\n#ifdef ECANCELED /* defined since 10.2 */\n#include \"AvailabilityMacros.h\"\n#endif\n#if defined( __LP64__ ) && \\\n    ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )\n#undef FT_MACINTOSH\n#endif\n\n#elif defined( __SC__ ) || defined( __MRC__ )\n  /* Classic MacOS compilers */\n#include \"ConditionalMacros.h\"\n#if TARGET_OS_MAC\n#define FT_MACINTOSH 1\n#endif\n\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    basic_types                                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Int16                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for a 16bit signed integer type.                         */\n  /*                                                                       */\n  typedef signed short  FT_Int16;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_UInt16                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for a 16bit unsigned integer type.                       */\n  /*                                                                       */\n  typedef unsigned short  FT_UInt16;\n\n  /* */\n\n\n  /* this #if 0 ... #endif clause is for documentation purposes */\n#if 0\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Int32                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for a 32bit signed integer type.  The size depends on    */\n  /*    the configuration.                                                 */\n  /*                                                                       */\n  typedef signed XXX  FT_Int32;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_UInt32                                                          */\n  /*                                                                       */\n  /*    A typedef for a 32bit unsigned integer type.  The size depends on  */\n  /*    the configuration.                                                 */\n  /*                                                                       */\n  typedef unsigned XXX  FT_UInt32;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Int64                                                           */\n  /*                                                                       */\n  /*    A typedef for a 64bit signed integer type.  The size depends on    */\n  /*    the configuration.  Only defined if there is real 64bit support;   */\n  /*    otherwise, it gets emulated with a structure (if necessary).       */\n  /*                                                                       */\n  typedef signed XXX  FT_Int64;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_UInt64                                                          */\n  /*                                                                       */\n  /*    A typedef for a 64bit unsigned integer type.  The size depends on  */\n  /*    the configuration.  Only defined if there is real 64bit support;   */\n  /*    otherwise, it gets emulated with a structure (if necessary).       */\n  /*                                                                       */\n  typedef unsigned XXX  FT_UInt64;\n\n  /* */\n\n#endif\n\n#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)\n\n  typedef signed int      FT_Int32;\n  typedef unsigned int    FT_UInt32;\n\n#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)\n\n  typedef signed long     FT_Int32;\n  typedef unsigned long   FT_UInt32;\n\n#else\n#error \"no 32bit type found -- please check your configuration files\"\n#endif\n\n\n  /* look up an integer type that is at least 32 bits */\n#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT)\n\n  typedef int            FT_Fast;\n  typedef unsigned int   FT_UFast;\n\n#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)\n\n  typedef long           FT_Fast;\n  typedef unsigned long  FT_UFast;\n\n#endif\n\n\n  /* determine whether we have a 64-bit int type for platforms without */\n  /* Autoconf                                                          */\n#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)\n\n  /* FT_LONG64 must be defined if a 64-bit type is available */\n#define FT_LONG64\n#define FT_INT64   long\n#define FT_UINT64  unsigned long\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* A 64-bit data type may create compilation problems if you compile     */\n  /* in strict ANSI mode.  To avoid them, we disable other 64-bit data     */\n  /* types if __STDC__ is defined.  You can however ignore this rule       */\n  /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro.     */\n  /*                                                                       */\n#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )\n\n#if defined( _MSC_VER ) && _MSC_VER >= 900  /* Visual C++ (and Intel C++) */\n\n  /* this compiler provides the __int64 type */\n#define FT_LONG64\n#define FT_INT64   __int64\n#define FT_UINT64  unsigned __int64\n\n#elif defined( __BORLANDC__ )  /* Borland C++ */\n\n  /* XXXX: We should probably check the value of __BORLANDC__ in order */\n  /*       to test the compiler version.                               */\n\n  /* this compiler provides the __int64 type */\n#define FT_LONG64\n#define FT_INT64   __int64\n#define FT_UINT64  unsigned __int64\n\n#elif defined( __WATCOMC__ )   /* Watcom C++ */\n\n  /* Watcom doesn't provide 64-bit data types */\n\n#elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */\n\n#define FT_LONG64\n#define FT_INT64   long long int\n#define FT_UINT64  unsigned long long int\n\n#elif defined( __GNUC__ )\n\n  /* GCC provides the `long long' type */\n#define FT_LONG64\n#define FT_INT64   long long int\n#define FT_UINT64  unsigned long long int\n\n#endif /* _MSC_VER */\n\n#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */\n\n#ifdef FT_LONG64\n  typedef FT_INT64   FT_Int64;\n  typedef FT_UINT64  FT_UInt64;\n#endif\n\n\n#define FT_BEGIN_STMNT  do {\n#define FT_END_STMNT    } while ( 0 )\n#define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT\n\n\n#ifdef FT_MAKE_OPTION_SINGLE_OBJECT\n\n#define FT_LOCAL( x )      static  x\n#define FT_LOCAL_DEF( x )  static  x\n\n#else\n\n#ifdef __cplusplus\n#define FT_LOCAL( x )      extern \"C\"  x\n#define FT_LOCAL_DEF( x )  extern \"C\"  x\n#else\n#define FT_LOCAL( x )      extern  x\n#define FT_LOCAL_DEF( x )  x\n#endif\n\n#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */\n\n#define FT_LOCAL_ARRAY( x )      extern const  x\n#define FT_LOCAL_ARRAY_DEF( x )  const  x\n\n\n#ifndef FT_BASE\n\n#ifdef __cplusplus\n#define FT_BASE( x )  extern \"C\"  x\n#else\n#define FT_BASE( x )  extern  x\n#endif\n\n#endif /* !FT_BASE */\n\n\n#ifndef FT_BASE_DEF\n\n#ifdef __cplusplus\n#define FT_BASE_DEF( x )  x\n#else\n#define FT_BASE_DEF( x )  x\n#endif\n\n#endif /* !FT_BASE_DEF */\n\n\n#ifndef FT_EXPORT\n\n#ifdef __cplusplus\n#define FT_EXPORT( x )  extern \"C\"  x\n#else\n#define FT_EXPORT( x )  extern  x\n#endif\n\n#endif /* !FT_EXPORT */\n\n\n#ifndef FT_EXPORT_DEF\n\n#ifdef __cplusplus\n#define FT_EXPORT_DEF( x )  extern \"C\"  x\n#else\n#define FT_EXPORT_DEF( x )  extern  x\n#endif\n\n#endif /* !FT_EXPORT_DEF */\n\n\n#ifndef FT_EXPORT_VAR\n\n#ifdef __cplusplus\n#define FT_EXPORT_VAR( x )  extern \"C\"  x\n#else\n#define FT_EXPORT_VAR( x )  extern  x\n#endif\n\n#endif /* !FT_EXPORT_VAR */\n\n  /* The following macros are needed to compile the library with a   */\n  /* C++ compiler and with 16bit compilers.                          */\n  /*                                                                 */\n\n  /* This is special.  Within C++, you must specify `extern \"C\"' for */\n  /* functions which are used via function pointers, and you also    */\n  /* must do that for structures which contain function pointers to  */\n  /* assure C linkage -- it's not possible to have (local) anonymous */\n  /* functions which are accessed by (global) function pointers.     */\n  /*                                                                 */\n  /*                                                                 */\n  /* FT_CALLBACK_DEF is used to _define_ a callback function.        */\n  /*                                                                 */\n  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */\n  /* contains pointers to callback functions.                        */\n  /*                                                                 */\n  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */\n  /* that contains pointers to callback functions.                   */\n  /*                                                                 */\n  /*                                                                 */\n  /* Some 16bit compilers have to redefine these macros to insert    */\n  /* the infamous `_cdecl' or `__fastcall' declarations.             */\n  /*                                                                 */\n#ifndef FT_CALLBACK_DEF\n#ifdef __cplusplus\n#define FT_CALLBACK_DEF( x )  extern \"C\"  x\n#else\n#define FT_CALLBACK_DEF( x )  static  x\n#endif\n#endif /* FT_CALLBACK_DEF */\n\n#ifndef FT_CALLBACK_TABLE\n#ifdef __cplusplus\n#define FT_CALLBACK_TABLE      extern \"C\"\n#define FT_CALLBACK_TABLE_DEF  extern \"C\"\n#else\n#define FT_CALLBACK_TABLE      extern\n#define FT_CALLBACK_TABLE_DEF  /* nothing */\n#endif\n#endif /* FT_CALLBACK_TABLE */\n\n\nFT_END_HEADER\n\n\n#endif /* __FTCONFIG_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/config/ftheader.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftheader.h                                                             */\n/*                                                                         */\n/*    Build macros of the FreeType 2 library.                              */\n/*                                                                         */\n/*  Copyright 1996-2008, 2010, 2012, 2013 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#ifndef __FT_HEADER_H__\n#define __FT_HEADER_H__\n\n\n  /*@***********************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_BEGIN_HEADER                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro is used in association with @FT_END_HEADER in header    */\n  /*    files to ensure that the declarations within are properly          */\n  /*    encapsulated in an `extern \"C\" { .. }' block when included from a  */\n  /*    C++ compiler.                                                      */\n  /*                                                                       */\n#ifdef __cplusplus\n#define FT_BEGIN_HEADER  extern \"C\" {\n#else\n#define FT_BEGIN_HEADER  /* nothing */\n#endif\n\n\n  /*@***********************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_END_HEADER                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro is used in association with @FT_BEGIN_HEADER in header  */\n  /*    files to ensure that the declarations within are properly          */\n  /*    encapsulated in an `extern \"C\" { .. }' block when included from a  */\n  /*    C++ compiler.                                                      */\n  /*                                                                       */\n#ifdef __cplusplus\n#define FT_END_HEADER  }\n#else\n#define FT_END_HEADER  /* nothing */\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Aliases for the FreeType 2 public and configuration files.            */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    header_file_macros                                                 */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Header File Macros                                                 */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Macro definitions used to #include specific header files.          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The following macros are defined to the name of specific           */\n  /*    FreeType~2 header files.  They can be used directly in #include    */\n  /*    statements as in:                                                  */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      #include FT_FREETYPE_H                                           */\n  /*      #include FT_MULTIPLE_MASTERS_H                                   */\n  /*      #include FT_GLYPH_H                                              */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    There are several reasons why we are now using macros to name      */\n  /*    public header files.  The first one is that such macros are not    */\n  /*    limited to the infamous 8.3~naming rule required by DOS (and       */\n  /*    `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h').   */\n  /*                                                                       */\n  /*    The second reason is that it allows for more flexibility in the    */\n  /*    way FreeType~2 is installed on a given system.                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* configuration files */\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_CONFIG_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing\n   *   FreeType~2 configuration data.\n   *\n   */\n#ifndef FT_CONFIG_CONFIG_H\n#define FT_CONFIG_CONFIG_H  <config/ftconfig.h>\n#endif\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_STANDARD_LIBRARY_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing\n   *   FreeType~2 interface to the standard C library functions.\n   *\n   */\n#ifndef FT_CONFIG_STANDARD_LIBRARY_H\n#define FT_CONFIG_STANDARD_LIBRARY_H  <config/ftstdlib.h>\n#endif\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_OPTIONS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing\n   *   FreeType~2 project-specific configuration options.\n   *\n   */\n#ifndef FT_CONFIG_OPTIONS_H\n#define FT_CONFIG_OPTIONS_H  <config/ftoption.h>\n#endif\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_MODULES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   list of FreeType~2 modules that are statically linked to new library\n   *   instances in @FT_Init_FreeType.\n   *\n   */\n#ifndef FT_CONFIG_MODULES_H\n#define FT_CONFIG_MODULES_H  <config/ftmodule.h>\n#endif\n\n  /* */\n\n  /* public headers */\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_FREETYPE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   base FreeType~2 API.\n   *\n   */\n#define FT_FREETYPE_H  <freetype.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ERRORS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   list of FreeType~2 error codes (and messages).\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_ERRORS_H  <fterrors.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_MODULE_ERRORS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   list of FreeType~2 module error offsets (and messages).\n   *\n   */\n#define FT_MODULE_ERRORS_H  <ftmoderr.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SYSTEM_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 interface to low-level operations (i.e., memory management\n   *   and stream i/o).\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_SYSTEM_H  <ftsystem.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IMAGE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing type\n   *   definitions related to glyph images (i.e., bitmaps, outlines,\n   *   scan-converter parameters).\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_IMAGE_H  <ftimage.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TYPES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   basic data types defined by FreeType~2.\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_TYPES_H  <fttypes.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_LIST_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   list management API of FreeType~2.\n   *\n   *   (Most applications will never need to include this file.)\n   *\n   */\n#define FT_LIST_H  <ftlist.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_OUTLINE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   scalable outline management API of FreeType~2.\n   *\n   */\n#define FT_OUTLINE_H  <ftoutln.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SIZES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API which manages multiple @FT_Size objects per face.\n   *\n   */\n#define FT_SIZES_H  <ftsizes.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_MODULE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   module management API of FreeType~2.\n   *\n   */\n#define FT_MODULE_H  <ftmodapi.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_RENDER_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   renderer module management API of FreeType~2.\n   *\n   */\n#define FT_RENDER_H  <ftrender.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_AUTOHINTER_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing\n   *   structures and macros related to the auto-hinting module.\n   *\n   */\n#define FT_AUTOHINTER_H  <ftautoh.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CFF_DRIVER_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing\n   *   structures and macros related to the CFF driver module.\n   *\n   */\n#define FT_CFF_DRIVER_H  <ftcffdrv.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_DRIVER_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing\n   *   structures and macros related to the TrueType driver module.\n   *\n   */\n#define FT_TRUETYPE_DRIVER_H  <ftttdrv.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TYPE1_TABLES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   types and API specific to the Type~1 format.\n   *\n   */\n#define FT_TYPE1_TABLES_H  <t1tables.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_IDS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   enumeration values which identify name strings, languages, encodings,\n   *   etc.  This file really contains a _large_ set of constant macro\n   *   definitions, taken from the TrueType and OpenType specifications.\n   *\n   */\n#define FT_TRUETYPE_IDS_H  <ttnameid.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_TABLES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   types and API specific to the TrueType (as well as OpenType) format.\n   *\n   */\n#define FT_TRUETYPE_TABLES_H  <tttables.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_TAGS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of TrueType four-byte `tags' which identify blocks in\n   *   SFNT-based font formats (i.e., TrueType and OpenType).\n   *\n   */\n#define FT_TRUETYPE_TAGS_H  <tttags.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_BDF_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which accesses BDF-specific strings from a\n   *   face.\n   *\n   */\n#define FT_BDF_H  <ftbdf.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CID_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which access CID font information from a\n   *   face.\n   *\n   */\n#define FT_CID_H  <ftcid.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_GZIP_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which supports gzip-compressed files.\n   *\n   */\n#define FT_GZIP_H  <ftgzip.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_LZW_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which supports LZW-compressed files.\n   *\n   */\n#define FT_LZW_H  <ftlzw.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_BZIP2_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which supports bzip2-compressed files.\n   *\n   */\n#define FT_BZIP2_H  <ftbzip2.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_WINFONTS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which supports Windows FNT files.\n   *\n   */\n#define FT_WINFONTS_H   <ftwinfnt.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_GLYPH_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API of the optional glyph management component.\n   *\n   */\n#define FT_GLYPH_H  <ftglyph.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_BITMAP_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API of the optional bitmap conversion component.\n   *\n   */\n#define FT_BITMAP_H  <ftbitmap.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_BBOX_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API of the optional exact bounding box computation routines.\n   *\n   */\n#define FT_BBOX_H  <ftbbox.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CACHE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API of the optional FreeType~2 cache sub-system.\n   *\n   */\n#define FT_CACHE_H  <ftcache.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CACHE_IMAGE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   `glyph image' API of the FreeType~2 cache sub-system.\n   *\n   *   It is used to define a cache for @FT_Glyph elements.  You can also\n   *   use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to\n   *   store small glyph bitmaps, as it will use less memory.\n   *\n   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all\n   *   glyph image-related cache declarations.\n   *\n   */\n#define FT_CACHE_IMAGE_H  FT_CACHE_H\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CACHE_SMALL_BITMAPS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   `small bitmaps' API of the FreeType~2 cache sub-system.\n   *\n   *   It is used to define a cache for small glyph bitmaps in a relatively\n   *   memory-efficient way.  You can also use the API defined in\n   *   @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images,\n   *   including scalable outlines.\n   *\n   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all\n   *   small bitmaps-related cache declarations.\n   *\n   */\n#define FT_CACHE_SMALL_BITMAPS_H  FT_CACHE_H\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CACHE_CHARMAP_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   `charmap' API of the FreeType~2 cache sub-system.\n   *\n   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all\n   *   charmap-based cache declarations.\n   *\n   */\n#define FT_CACHE_CHARMAP_H  FT_CACHE_H\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_MAC_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   Macintosh-specific FreeType~2 API.  The latter is used to access\n   *   fonts embedded in resource forks.\n   *\n   *   This header file must be explicitly included by client applications\n   *   compiled on the Mac (note that the base API still works though).\n   *\n   */\n#define FT_MAC_H  <ftmac.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_MULTIPLE_MASTERS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   optional multiple-masters management API of FreeType~2.\n   *\n   */\n#define FT_MULTIPLE_MASTERS_H  <ftmm.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SFNT_NAMES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   optional FreeType~2 API which accesses embedded `name' strings in\n   *   SFNT-based font formats (i.e., TrueType and OpenType).\n   *\n   */\n#define FT_SFNT_NAMES_H  <ftsnames.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_OPENTYPE_VALIDATE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   optional FreeType~2 API which validates OpenType tables (BASE, GDEF,\n   *   GPOS, GSUB, JSTF).\n   *\n   */\n#define FT_OPENTYPE_VALIDATE_H  <ftotval.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_GX_VALIDATE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat,\n   *   mort, morx, bsln, just, kern, opbd, trak, prop).\n   *\n   */\n#define FT_GX_VALIDATE_H  <ftgxval.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_PFR_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which accesses PFR-specific data.\n   *\n   */\n#define FT_PFR_H  <ftpfr.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_STROKER_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which provides functions to stroke outline paths.\n   */\n#define FT_STROKER_H  <ftstroke.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SYNTHESIS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs artificial obliquing and emboldening.\n   */\n#define FT_SYNTHESIS_H  <ftsynth.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_XFREE86_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which provides functions specific to the XFree86 and\n   *   X.Org X11 servers.\n   */\n#define FT_XFREE86_H  <ftxf86.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TRIGONOMETRY_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs trigonometric computations (e.g.,\n   *   cosines and arc tangents).\n   */\n#define FT_TRIGONOMETRY_H  <fttrigon.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_LCD_FILTER_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs color filtering for subpixel rendering.\n   */\n#define FT_LCD_FILTER_H  <ftlcdfil.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_UNPATENTED_HINTING_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs color filtering for subpixel rendering.\n   */\n#define FT_UNPATENTED_HINTING_H  <ttunpat.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_INCREMENTAL_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs color filtering for subpixel rendering.\n   */\n#define FT_INCREMENTAL_H  <ftincrem.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_GASP_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which returns entries from the TrueType GASP table.\n   */\n#define FT_GASP_H  <ftgasp.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ADVANCES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which returns individual and ranged glyph advances.\n   */\n#define FT_ADVANCES_H  <ftadvanc.h>\n\n\n  /* */\n\n#define FT_ERROR_DEFINITIONS_H  <fterrdef.h>\n\n\n  /* The internals of the cache sub-system are no longer exposed.  We */\n  /* default to FT_CACHE_H at the moment just in case, but we know of */\n  /* no rogue client that uses them.                                  */\n  /*                                                                  */\n#define FT_CACHE_MANAGER_H           <ftcache.h>\n#define FT_CACHE_INTERNAL_MRU_H      <ftcache.h>\n#define FT_CACHE_INTERNAL_MANAGER_H  <ftcache.h>\n#define FT_CACHE_INTERNAL_CACHE_H    <ftcache.h>\n#define FT_CACHE_INTERNAL_GLYPH_H    <ftcache.h>\n#define FT_CACHE_INTERNAL_IMAGE_H    <ftcache.h>\n#define FT_CACHE_INTERNAL_SBITS_H    <ftcache.h>\n\n\n#define FT_INCREMENTAL_H          <ftincrem.h>\n\n#define FT_TRUETYPE_UNPATENTED_H  <ttunpat.h>\n\n\n  /*\n   * Include internal headers definitions from <internal/...>\n   * only when building the library.\n   */\n#ifdef FT2_BUILD_LIBRARY\n#define  FT_INTERNAL_INTERNAL_H  <internal/internal.h>\n#include FT_INTERNAL_INTERNAL_H\n#endif /* FT2_BUILD_LIBRARY */\n\n\n#endif /* __FT2_BUILD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/config/ftmodule.h",
    "content": "/*\n *  This file registers the FreeType modules compiled into the library.\n *\n *  If you use GNU make, this file IS NOT USED!  Instead, it is created in\n *  the objects directory (normally `<topdir>/objs/') based on information\n *  from `<topdir>/modules.cfg'.\n *\n *  Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile\n *  FreeType without GNU make.\n *\n */\n\nFT_USE_MODULE( FT_Module_Class, autofit_module_class )\nFT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )\nFT_USE_MODULE( FT_Module_Class, psaux_module_class )\nFT_USE_MODULE( FT_Module_Class, psnames_module_class )\nFT_USE_MODULE( FT_Module_Class, pshinter_module_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )\nFT_USE_MODULE( FT_Module_Class, sfnt_module_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )\nFT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )\n\n/* EOF */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/config/ftoption.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftoption.h                                                             */\n/*                                                                         */\n/*    User-selectable configuration macros (specification only).           */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTOPTION_H__\n#define __FTOPTION_H__\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                 USER-SELECTABLE CONFIGURATION MACROS                  */\n  /*                                                                       */\n  /* This file contains the default configuration macro definitions for    */\n  /* a standard build of the FreeType library.  There are three ways to    */\n  /* use this file to build project-specific versions of the library:      */\n  /*                                                                       */\n  /*  - You can modify this file by hand, but this is not recommended in   */\n  /*    cases where you would like to build several versions of the        */\n  /*    library from a single source directory.                            */\n  /*                                                                       */\n  /*  - You can put a copy of this file in your build directory, more      */\n  /*    precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the     */\n  /*    name of a directory that is included _before_ the FreeType include */\n  /*    path during compilation.                                           */\n  /*                                                                       */\n  /*    The default FreeType Makefiles and Jamfiles use the build          */\n  /*    directory `builds/<system>' by default, but you can easily change  */\n  /*    that for your own projects.                                        */\n  /*                                                                       */\n  /*  - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it    */\n  /*    slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to       */\n  /*    locate this file during the build.  For example,                   */\n  /*                                                                       */\n  /*      #define FT_CONFIG_OPTIONS_H  <myftoptions.h>                     */\n  /*      #include <config/ftheader.h>                                     */\n  /*                                                                       */\n  /*    will use `$BUILD/myftoptions.h' instead of this file for macro     */\n  /*    definitions.                                                       */\n  /*                                                                       */\n  /*    Note also that you can similarly pre-define the macro              */\n  /*    FT_CONFIG_MODULES_H used to locate the file listing of the modules */\n  /*    that are statically linked to the library at compile time.  By     */\n  /*    default, this file is <config/ftmodule.h>.                         */\n  /*                                                                       */\n  /* We highly recommend using the third method whenever possible.         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /**** G E N E R A L   F R E E T Y P E   2   C O N F I G U R A T I O N ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Uncomment the line below if you want to activate sub-pixel rendering  */\n  /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */\n  /*                                                                       */\n  /* Note that this feature is covered by several Microsoft patents        */\n  /* and should not be activated in any default build of the library.      */\n  /*                                                                       */\n  /* This macro has no impact on the FreeType API, only on its             */\n  /* _implementation_.  For example, using FT_RENDER_MODE_LCD when calling */\n  /* FT_Render_Glyph still generates a bitmap that is 3 times wider than   */\n  /* the original size in case this macro isn't defined; however, each     */\n  /* triplet of subpixels has R=G=B.                                       */\n  /*                                                                       */\n  /* This is done to allow FreeType clients to run unmodified, forcing     */\n  /* them to display normal gray-level anti-aliased glyphs.                */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Many compilers provide a non-ANSI 64-bit data type that can be used   */\n  /* by FreeType to speed up some computations.  However, this will create */\n  /* some problems when compiling the library in strict ANSI mode.         */\n  /*                                                                       */\n  /* For this reason, the use of 64-bit integers is normally disabled when */\n  /* the __STDC__ macro is defined.  You can however disable this by       */\n  /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here.                 */\n  /*                                                                       */\n  /* For most compilers, this will only create compilation warnings when   */\n  /* building the library.                                                 */\n  /*                                                                       */\n  /* ObNote: The compiler-specific 64-bit integers are detected in the     */\n  /*         file `ftconfig.h' either statically or through the            */\n  /*         `configure' script on supported platforms.                    */\n  /*                                                                       */\n#undef FT_CONFIG_OPTION_FORCE_INT64\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* If this macro is defined, do not try to use an assembler version of   */\n  /* performance-critical functions (e.g. FT_MulFix).  You should only do  */\n  /* that to verify that the assembler function works properly, or to      */\n  /* execute benchmark tests of the various implementations.               */\n/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* If this macro is defined, try to use an inlined assembler version of  */\n  /* the `FT_MulFix' function, which is a `hotspot' when loading and       */\n  /* hinting glyphs, and which should be executed as fast as possible.     */\n  /*                                                                       */\n  /* Note that if your compiler or CPU is not supported, this will default */\n  /* to the standard and portable implementation found in `ftcalc.c'.      */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_INLINE_MULFIX\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* LZW-compressed file support.                                          */\n  /*                                                                       */\n  /*   FreeType now handles font files that have been compressed with the  */\n  /*   `compress' program.  This is mostly used to parse many of the PCF   */\n  /*   files that come with various X11 distributions.  The implementation */\n  /*   uses NetBSD's `zopen' to partially uncompress the file on the fly   */\n  /*   (see src/lzw/ftgzip.c).                                             */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.             */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_USE_LZW\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Gzip-compressed file support.                                         */\n  /*                                                                       */\n  /*   FreeType now handles font files that have been compressed with the  */\n  /*   `gzip' program.  This is mostly used to parse many of the PCF files */\n  /*   that come with XFree86.  The implementation uses `zlib' to          */\n  /*   partially uncompress the file on the fly (see src/gzip/ftgzip.c).   */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.  See also   */\n  /*   the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below.                       */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_USE_ZLIB\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ZLib library selection                                                */\n  /*                                                                       */\n  /*   This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined.  */\n  /*   It allows FreeType's `ftgzip' component to link to the system's     */\n  /*   installation of the ZLib library.  This is useful on systems like   */\n  /*   Unix or VMS where it generally is already available.                */\n  /*                                                                       */\n  /*   If you let it undefined, the component will use its own copy        */\n  /*   of the zlib sources instead.  These have been modified to be        */\n  /*   included directly within the component and *not* export external    */\n  /*   function names.  This allows you to link any program with FreeType  */\n  /*   _and_ ZLib without linking conflicts.                               */\n  /*                                                                       */\n  /*   Do not #undef this macro here since the build system might define   */\n  /*   it for certain configurations only.                                 */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Bzip2-compressed file support.                                        */\n  /*                                                                       */\n  /*   FreeType now handles font files that have been compressed with the  */\n  /*   `bzip2' program.  This is mostly used to parse many of the PCF      */\n  /*   files that come with XFree86.  The implementation uses `libbz2' to  */\n  /*   partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */\n  /*   Contrary to gzip, bzip2 currently is not included and need to use   */\n  /*   the system available bzip2 implementation.                          */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.             */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_USE_BZIP2 */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define to disable the use of file stream functions and types, FILE,   */\n  /* fopen() etc.  Enables the use of smaller system libraries on embedded */\n  /* systems that have multiple system libraries, some with or without     */\n  /* file stream support, in the cases where file stream support is not    */\n  /* necessary such as memory loading of font files.                       */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* PNG bitmap support.                                                   */\n  /*                                                                       */\n  /*   FreeType now handles loading color bitmap glyphs in the PNG format. */\n  /*   This requires help from the external libpng library.  Uncompressed  */\n  /*   color bitmaps do not need any external libraries and will be        */\n  /*   supported regardless of this configuration.                         */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.             */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_USE_PNG */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* HarfBuzz support.                                                     */\n  /*                                                                       */\n  /*   FreeType uses the HarfBuzz library to improve auto-hinting of       */\n  /*   OpenType fonts.  If available, many glyphs not directly addressable */\n  /*   by a font's character map will be hinted also.                      */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.             */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DLL export compilation                                                */\n  /*                                                                       */\n  /*   When compiling FreeType as a DLL, some systems/compilers need a     */\n  /*   special keyword in front OR after the return type of function       */\n  /*   declarations.                                                       */\n  /*                                                                       */\n  /*   Two macros are used within the FreeType source code to define       */\n  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */\n  /*                                                                       */\n  /*     FT_EXPORT( return_type )                                          */\n  /*                                                                       */\n  /*       is used in a function declaration, as in                        */\n  /*                                                                       */\n  /*         FT_EXPORT( FT_Error )                                         */\n  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */\n  /*                                                                       */\n  /*                                                                       */\n  /*     FT_EXPORT_DEF( return_type )                                      */\n  /*                                                                       */\n  /*       is used in a function definition, as in                         */\n  /*                                                                       */\n  /*         FT_EXPORT_DEF( FT_Error )                                     */\n  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */\n  /*         {                                                             */\n  /*           ... some code ...                                           */\n  /*           return FT_Err_Ok;                                           */\n  /*         }                                                             */\n  /*                                                                       */\n  /*   You can provide your own implementation of FT_EXPORT and            */\n  /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */\n  /*   will be later automatically defined as `extern return_type' to      */\n  /*   allow normal compilation.                                           */\n  /*                                                                       */\n  /*   Do not #undef these macros here since the build system might define */\n  /*   them for certain configurations only.                               */\n  /*                                                                       */\n/* #define FT_EXPORT(x)      extern x */\n/* #define FT_EXPORT_DEF(x)  x */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Glyph Postscript Names handling                                       */\n  /*                                                                       */\n  /*   By default, FreeType 2 is compiled with the `psnames' module.  This */\n  /*   module is in charge of converting a glyph name string into a        */\n  /*   Unicode value, or return a Macintosh standard glyph name for the    */\n  /*   use with the TrueType `post' table.                                 */\n  /*                                                                       */\n  /*   Undefine this macro if you do not want `psnames' compiled in your   */\n  /*   build of FreeType.  This has the following effects:                 */\n  /*                                                                       */\n  /*   - The TrueType driver will provide its own set of glyph names,      */\n  /*     if you build it to support postscript names in the TrueType       */\n  /*     `post' table.                                                     */\n  /*                                                                       */\n  /*   - The Type 1 driver will not be able to synthesize a Unicode        */\n  /*     charmap out of the glyphs found in the fonts.                     */\n  /*                                                                       */\n  /*   You would normally undefine this configuration macro when building  */\n  /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Postscript Names to Unicode Values support                            */\n  /*                                                                       */\n  /*   By default, FreeType 2 is built with the `PSNames' module compiled  */\n  /*   in.  Among other things, the module is used to convert a glyph name */\n  /*   into a Unicode value.  This is especially useful in order to        */\n  /*   synthesize on the fly a Unicode charmap from the CFF/Type 1 driver  */\n  /*   through a big table named the `Adobe Glyph List' (AGL).             */\n  /*                                                                       */\n  /*   Undefine this macro if you do not want the Adobe Glyph List         */\n  /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */\n  /*   able to synthesize a Unicode charmap out of the glyphs found in the */\n  /*   fonts.                                                              */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Support for Mac fonts                                                 */\n  /*                                                                       */\n  /*   Define this macro if you want support for outline fonts in Mac      */\n  /*   format (mac dfont, mac resource, macbinary containing a mac         */\n  /*   resource) on non-Mac platforms.                                     */\n  /*                                                                       */\n  /*   Note that the `FOND' resource isn't checked.                        */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_MAC_FONTS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Guessing methods to access embedded resource forks                    */\n  /*                                                                       */\n  /*   Enable extra Mac fonts support on non-Mac platforms (e.g.           */\n  /*   GNU/Linux).                                                         */\n  /*                                                                       */\n  /*   Resource forks which include fonts data are stored sometimes in     */\n  /*   locations which users or developers don't expected.  In some cases, */\n  /*   resource forks start with some offset from the head of a file.  In  */\n  /*   other cases, the actual resource fork is stored in file different   */\n  /*   from what the user specifies.  If this option is activated,         */\n  /*   FreeType tries to guess whether such offsets or different file      */\n  /*   names must be used.                                                 */\n  /*                                                                       */\n  /*   Note that normal, direct access of resource forks is controlled via */\n  /*   the FT_CONFIG_OPTION_MAC_FONTS option.                              */\n  /*                                                                       */\n#ifdef FT_CONFIG_OPTION_MAC_FONTS\n#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Allow the use of FT_Incremental_Interface to load typefaces that      */\n  /* contain no glyph data, but supply it via a callback function.         */\n  /* This is required by clients supporting document formats which         */\n  /* supply font data incrementally as the document is parsed, such        */\n  /* as the Ghostscript interpreter for the PostScript language.           */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_INCREMENTAL\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The size in bytes of the render pool used by the scan-line converter  */\n  /* to do all of its work.                                                */\n  /*                                                                       */\n  /* This must be greater than 4KByte if you use FreeType to rasterize     */\n  /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */\n  /* allocation of the render pool.                                        */\n  /*                                                                       */\n#define FT_RENDER_POOL_SIZE  16384L\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FT_MAX_MODULES                                                        */\n  /*                                                                       */\n  /*   The maximum number of modules that can be registered in a single    */\n  /*   FreeType library object.  32 is the default.                        */\n  /*                                                                       */\n#define FT_MAX_MODULES  32\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Debug level                                                           */\n  /*                                                                       */\n  /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */\n  /*   errors are reported through the `ftdebug' component.  In trace      */\n  /*   mode, additional messages are sent to the standard output during    */\n  /*   execution.                                                          */\n  /*                                                                       */\n  /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */\n  /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */\n  /*                                                                       */\n  /*   Don't define any of these macros to compile in `release' mode!      */\n  /*                                                                       */\n  /*   Do not #undef these macros here since the build system might define */\n  /*   them for certain configurations only.                               */\n  /*                                                                       */\n/* #define FT_DEBUG_LEVEL_ERROR */\n/* #define FT_DEBUG_LEVEL_TRACE */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Autofitter debugging                                                  */\n  /*                                                                       */\n  /*   If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to     */\n  /*   control the autofitter behaviour for debugging purposes with global */\n  /*   boolean variables (consequently, you should *never* enable this     */\n  /*   while compiling in `release' mode):                                 */\n  /*                                                                       */\n  /*     _af_debug_disable_horz_hints                                      */\n  /*     _af_debug_disable_vert_hints                                      */\n  /*     _af_debug_disable_blue_hints                                      */\n  /*                                                                       */\n  /*   Additionally, the following functions provide dumps of various      */\n  /*   internal autofit structures to stdout (using `printf'):             */\n  /*                                                                       */\n  /*     af_glyph_hints_dump_points                                        */\n  /*     af_glyph_hints_dump_segments                                      */\n  /*     af_glyph_hints_dump_edges                                         */\n  /*                                                                       */\n  /*   As an argument, they use another global variable:                   */\n  /*                                                                       */\n  /*     _af_debug_hints                                                   */\n  /*                                                                       */\n  /*   Please have a look at the `ftgrid' demo program to see how those    */\n  /*   variables and macros should be used.                                */\n  /*                                                                       */\n  /*   Do not #undef these macros here since the build system might define */\n  /*   them for certain configurations only.                               */\n  /*                                                                       */\n/* #define FT_DEBUG_AUTOFIT */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Memory Debugging                                                      */\n  /*                                                                       */\n  /*   FreeType now comes with an integrated memory debugger that is       */\n  /*   capable of detecting simple errors like memory leaks or double      */\n  /*   deletes.  To compile it within your build of the library, you       */\n  /*   should define FT_DEBUG_MEMORY here.                                 */\n  /*                                                                       */\n  /*   Note that the memory debugger is only activated at runtime when     */\n  /*   when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */\n  /*                                                                       */\n  /*   Do not #undef this macro here since the build system might define   */\n  /*   it for certain configurations only.                                 */\n  /*                                                                       */\n/* #define FT_DEBUG_MEMORY */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Module errors                                                         */\n  /*                                                                       */\n  /*   If this macro is set (which is _not_ the default), the higher byte  */\n  /*   of an error code gives the module in which the error has occurred,  */\n  /*   while the lower byte is the real error code.                        */\n  /*                                                                       */\n  /*   Setting this macro makes sense for debugging purposes only, since   */\n  /*   it would break source compatibility of certain programs that use    */\n  /*   FreeType 2.                                                         */\n  /*                                                                       */\n  /*   More details can be found in the files ftmoderr.h and fterrors.h.   */\n  /*                                                                       */\n#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Position Independent Code                                             */\n  /*                                                                       */\n  /*   If this macro is set (which is _not_ the default), FreeType2 will   */\n  /*   avoid creating constants that require address fixups.  Instead the  */\n  /*   constants will be moved into a struct and additional intialization  */\n  /*   code will be used.                                                  */\n  /*                                                                       */\n  /*   Setting this macro is needed for systems that prohibit address      */\n  /*   fixups, such as BREW.                                               */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_PIC */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */\n  /* embedded bitmaps in all formats using the SFNT module (namely         */\n  /* TrueType & OpenType).                                                 */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */\n  /* load and enumerate the glyph Postscript names in a TrueType or        */\n  /* OpenType file.                                                        */\n  /*                                                                       */\n  /* Note that when you do not compile the `PSNames' module by undefining  */\n  /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */\n  /* contain additional code used to read the PS Names table from a font.  */\n  /*                                                                       */\n  /* (By default, the module uses `PSNames' to extract glyph names.)       */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */\n  /* access the internal name table in a SFNT-based format like TrueType   */\n  /* or OpenType.  The name table contains various strings used to         */\n  /* describe the font, like family name, copyright, version, etc.  It     */\n  /* does not contain any glyph name though.                               */\n  /*                                                                       */\n  /* Accessing SFNT names is done through the functions declared in        */\n  /* `ftsnames.h'.                                                         */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_SFNT_NAMES\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TrueType CMap support                                                 */\n  /*                                                                       */\n  /*   Here you can fine-tune which TrueType CMap table format shall be    */\n  /*   supported.                                                          */\n#define TT_CONFIG_CMAP_FORMAT_0\n#define TT_CONFIG_CMAP_FORMAT_2\n#define TT_CONFIG_CMAP_FORMAT_4\n#define TT_CONFIG_CMAP_FORMAT_6\n#define TT_CONFIG_CMAP_FORMAT_8\n#define TT_CONFIG_CMAP_FORMAT_10\n#define TT_CONFIG_CMAP_FORMAT_12\n#define TT_CONFIG_CMAP_FORMAT_13\n#define TT_CONFIG_CMAP_FORMAT_14\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****    T R U E T Y P E   D R I V E R    C O N F I G U R A T I O N   ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */\n  /* a bytecode interpreter in the TrueType driver.                        */\n  /*                                                                       */\n  /* By undefining this, you will only compile the code necessary to load  */\n  /* TrueType glyphs without hinting.                                      */\n  /*                                                                       */\n  /*   Do not #undef this macro here, since the build system might         */\n  /*   define it for certain configurations only.                          */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile       */\n  /* EXPERIMENTAL subpixel hinting support into the TrueType driver.  This */\n  /* replaces the native TrueType hinting mechanism when anything but      */\n  /* FT_RENDER_MODE_MONO is requested.                                     */\n  /*                                                                       */\n  /* Enabling this causes the TrueType driver to ignore instructions under */\n  /* certain conditions.  This is done in accordance with the guide here,  */\n  /* with some minor differences:                                          */\n  /*                                                                       */\n  /*  http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */\n  /*                                                                       */\n  /* By undefining this, you only compile the code necessary to hint       */\n  /* TrueType glyphs with native TT hinting.                               */\n  /*                                                                       */\n  /*   This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be    */\n  /*   defined.                                                            */\n  /*                                                                       */\n/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */\n  /* of the TrueType bytecode interpreter is used that doesn't implement   */\n  /* any of the patented opcodes and algorithms.  The patents related to   */\n  /* TrueType hinting have expired worldwide since May 2010; this option   */\n  /* is now deprecated.                                                    */\n  /*                                                                       */\n  /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored*  */\n  /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words,  */\n  /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                */\n  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */\n  /*                                                                       */\n  /* This macro is only useful for a small number of font files (mostly    */\n  /* for Asian scripts) that require bytecode interpretation to properly   */\n  /* load glyphs.  For all other fonts, this produces unpleasant results,  */\n  /* thus the unpatented interpreter is never used to load glyphs from     */\n  /* TrueType fonts unless one of the following two options is used.       */\n  /*                                                                       */\n  /*   - The unpatented interpreter is explicitly activated by the user    */\n  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */\n  /*     when opening the FT_Face.                                         */\n  /*                                                                       */\n  /*   - FreeType detects that the FT_Face corresponds to one of the       */\n  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */\n  /*     contains a hard-coded list of font names and other matching       */\n  /*     parameters (see function `tt_face_init' in file                   */\n  /*     `src/truetype/ttobjs.c').                                         */\n  /*                                                                       */\n  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */\n  /*                                                                       */\n  /*   {                                                                   */\n  /*     FT_Parameter  parameter;                                          */\n  /*     FT_Open_Args  open_args;                                          */\n  /*                                                                       */\n  /*                                                                       */\n  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */\n  /*                                                                       */\n  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */\n  /*     open_args.pathname   = my_font_pathname;                          */\n  /*     open_args.num_params = 1;                                         */\n  /*     open_args.params     = &parameter;                                */\n  /*                                                                       */\n  /*     error = FT_Open_Face( library, &open_args, index, &face );        */\n  /*     ...                                                               */\n  /*   }                                                                   */\n  /*                                                                       */\n/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */\n  /* bytecode interpreter with a huge switch statement, rather than a call */\n  /* table.  This results in smaller and faster code for a number of       */\n  /* architectures.                                                        */\n  /*                                                                       */\n  /* Note however that on some compiler/processor combinations, undefining */\n  /* this macro will generate faster, though larger, code.                 */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_INTERPRETER_SWITCH\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */\n  /* TrueType glyph loader to use Apple's definition of how to handle      */\n  /* component offsets in composite glyphs.                                */\n  /*                                                                       */\n  /* Apple and MS disagree on the default behavior of component offsets    */\n  /* in composites.  Apple says that they should be scaled by the scaling  */\n  /* factors in the transformation matrix (roughly, it's more complex)     */\n  /* while MS says they should not.  OpenType defines two bits in the      */\n  /* composite flags array which can be used to disambiguate, but old      */\n  /* fonts will not have them.                                             */\n  /*                                                                       */\n  /*   http://www.microsoft.com/typography/otspec/glyf.htm                 */\n  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */\n  /*                                                                       */\n#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include         */\n  /* support for Apple's distortable font technology (fvar, gvar, cvar,    */\n  /* and avar tables).  This has many similarities to Type 1 Multiple      */\n  /* Masters support.                                                      */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_GX_VAR_SUPPORT\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_BDF if you want to include support for        */\n  /* an embedded `BDF ' table within SFNT-based bitmap formats.            */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_BDF\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and       */\n  /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */\n  /* required.                                                             */\n  /*                                                                       */\n#define T1_MAX_DICT_DEPTH  5\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */\n  /* calls during glyph loading.                                           */\n  /*                                                                       */\n#define T1_MAX_SUBRS_CALLS  16\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */\n  /* minimum of 16 is required.                                            */\n  /*                                                                       */\n  /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */\n  /*                                                                       */\n#define T1_MAX_CHARSTRINGS_OPERANDS  256\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define this configuration macro if you want to prevent the            */\n  /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */\n  /* files into an existing face.  Note that if set, the T1 driver will be */\n  /* unable to produce kerning distances.                                  */\n  /*                                                                       */\n#undef T1_CONFIG_OPTION_NO_AFM\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define this configuration macro if you want to prevent the            */\n  /* compilation of the Multiple Masters font support in the Type 1        */\n  /* driver.                                                               */\n  /*                                                                       */\n#undef T1_CONFIG_OPTION_NO_MM_SUPPORT\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****         C F F   D R I V E R    C O N F I G U R A T I O N        ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is      */\n  /* possible to set up the default values of the four control points that */\n  /* define the stem darkening behaviour of the (new) CFF engine.  For     */\n  /* more details please read the documentation of the                     */\n  /* `darkening-parameters' property of the cff driver module (file        */\n  /* `ftcffdrv.h'), which allows the control at run-time.                  */\n  /*                                                                       */\n  /* Do *not* undefine these macros!                                       */\n  /*                                                                       */\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1   500\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1   400\n\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2  1000\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2   275\n\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3  1667\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3   275\n\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4  2333\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4     0\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF       */\n  /* engine gets compiled into FreeType.  If defined, it is possible to    */\n  /* switch between the two engines using the `hinting-engine' property of */\n  /* the cff driver module.                                                */\n  /*                                                                       */\n/* #define CFF_CONFIG_OPTION_OLD_ENGINE */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Compile autofit module with CJK (Chinese, Japanese, Korean) script    */\n  /* support.                                                              */\n  /*                                                                       */\n#define AF_CONFIG_OPTION_CJK\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Compile autofit module with Indic script support.                     */\n  /*                                                                       */\n#define AF_CONFIG_OPTION_INDIC\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Compile autofit module with warp hinting.  The idea of the warping    */\n  /* code is to slightly scale and shift a glyph within a single dimension */\n  /* so that as much of its segments are aligned (more or less) on the     */\n  /* grid.  To find out the optimal scaling and shifting value, various    */\n  /* parameter combinations are tried and scored.                          */\n  /*                                                                       */\n  /* This experimental option is only active if the render mode is         */\n  /* FT_RENDER_MODE_LIGHT.                                                 */\n  /*                                                                       */\n/* #define AF_CONFIG_OPTION_USE_WARPER */\n\n  /* */\n\n\n  /*\n   * This macro is obsolete.  Support has been removed in FreeType\n   * version 2.5.\n   */\n/* #define FT_CONFIG_OPTION_OLD_INTERNALS */\n\n\n  /*\n   * This macro is defined if either unpatented or native TrueType\n   * hinting is requested by the definitions above.\n   */\n#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER\n#define  TT_USE_BYTECODE_INTERPRETER\n#undef   TT_CONFIG_OPTION_UNPATENTED_HINTING\n#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING\n#define  TT_USE_BYTECODE_INTERPRETER\n#endif\n\n\n  /*\n   * Check CFF darkening parameters.  The checks are the same as in function\n   * `cff_property_set' in file `cffdrivr.c'.\n   */\n#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0   || \\\n                                                      \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0   || \\\n                                                      \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 >        \\\n      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2     || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 >        \\\n      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3     || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 >        \\\n      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4     || \\\n                                                      \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500\n#error \"Invalid CFF darkening parameters!\"\n#endif\n\nFT_END_HEADER\n\n\n#endif /* __FTOPTION_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/config/ftstdlib.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftstdlib.h                                                             */\n/*                                                                         */\n/*    ANSI-specific library and header configuration file (specification   */\n/*    only).                                                               */\n/*                                                                         */\n/*  Copyright 2002-2007, 2009, 2011-2012 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to group all #includes to the ANSI C library that   */\n  /* FreeType normally requires.  It also defines macros to rename the     */\n  /* standard functions within the FreeType source code.                   */\n  /*                                                                       */\n  /* Load a file which defines __FTSTDLIB_H__ before this one to override  */\n  /* it.                                                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTSTDLIB_H__\n#define __FTSTDLIB_H__\n\n\n#include <stddef.h>\n\n#define ft_ptrdiff_t  ptrdiff_t\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                           integer limits                           */\n  /*                                                                    */\n  /* UINT_MAX and ULONG_MAX are used to automatically compute the size  */\n  /* of `int' and `long' in bytes at compile-time.  So far, this works  */\n  /* for all platforms the library has been tested on.                  */\n  /*                                                                    */\n  /* Note that on the extremely rare platforms that do not provide      */\n  /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some    */\n  /* old Crays where `int' is 36 bits), we do not make any guarantee    */\n  /* about the correct behaviour of FT2 with all fonts.                 */\n  /*                                                                    */\n  /* In these case, `ftconfig.h' will refuse to compile anyway with a   */\n  /* message like `couldn't find 32-bit type' or something similar.     */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <limits.h>\n\n#define FT_CHAR_BIT    CHAR_BIT\n#define FT_USHORT_MAX  USHRT_MAX\n#define FT_INT_MAX     INT_MAX\n#define FT_INT_MIN     INT_MIN\n#define FT_UINT_MAX    UINT_MAX\n#define FT_ULONG_MAX   ULONG_MAX\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                 character and string processing                    */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <string.h>\n\n#define ft_memchr   memchr\n#define ft_memcmp   memcmp\n#define ft_memcpy   memcpy\n#define ft_memmove  memmove\n#define ft_memset   memset\n#define ft_strcat   strcat\n#define ft_strcmp   strcmp\n#define ft_strcpy   strcpy\n#define ft_strlen   strlen\n#define ft_strncmp  strncmp\n#define ft_strncpy  strncpy\n#define ft_strrchr  strrchr\n#define ft_strstr   strstr\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                           file handling                            */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <stdio.h>\n\n#define FT_FILE     FILE\n#define ft_fclose   fclose\n#define ft_fopen    fopen\n#define ft_fread    fread\n#define ft_fseek    fseek\n#define ft_ftell    ftell\n#define ft_sprintf  sprintf\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                             sorting                                */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <stdlib.h>\n\n#define ft_qsort  qsort\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                        memory allocation                           */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#define ft_scalloc   calloc\n#define ft_sfree     free\n#define ft_smalloc   malloc\n#define ft_srealloc  realloc\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                          miscellaneous                             */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#define ft_atol   atol\n#define ft_labs   labs\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                         execution control                          */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <setjmp.h>\n\n#define ft_jmp_buf     jmp_buf  /* note: this cannot be a typedef since */\n                                /*       jmp_buf is defined as a macro  */\n                                /*       on certain platforms           */\n\n#define ft_longjmp     longjmp\n#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */\n\n\n  /* the following is only used for debugging purposes, i.e., if */\n  /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined    */\n\n#include <stdarg.h>\n\n\n#endif /* __FTSTDLIB_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/freetype.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  freetype.h                                                             */\n/*                                                                         */\n/*    FreeType high-level API and common types (specification only).       */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FREETYPE_H__\n#define __FREETYPE_H__\n\n\n#ifndef FT_FREETYPE_H\n#error \"`ft2build.h' hasn't been included yet!\"\n#error \"Please always use macros to include FreeType header files.\"\n#error \"Example:\"\n#error \"  #include <ft2build.h>\"\n#error \"  #include FT_FREETYPE_H\"\n#endif\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_TYPES_H\n#include FT_ERRORS_H\n\n\nFT_BEGIN_HEADER\n\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    header_inclusion                                                   */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    FreeType's header inclusion scheme                                 */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    How client applications should include FreeType header files.      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    To be as flexible as possible (and for historical reasons),        */\n  /*    FreeType uses a very special inclusion scheme to load header       */\n  /*    files, for example                                                 */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      #include <ft2build.h>                                            */\n  /*                                                                       */\n  /*      #include FT_FREETYPE_H                                           */\n  /*      #include FT_OUTLINE_H                                            */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    A compiler and its preprocessor only needs an include path to find */\n  /*    the file `ft2build.h'; the exact locations and names of the other  */\n  /*    FreeType header files are hidden by preprocessor macro names,      */\n  /*    loaded by `ft2build.h'.  The API documentation always gives the    */\n  /*    header macro name needed for a particular function.                */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    user_allocation                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    User allocation                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    How client applications should allocate FreeType data structures.  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType assumes that structures allocated by the user and passed  */\n  /*    as arguments are zeroed out except for the actual data.  In other  */\n  /*    words, it is recommended to use `calloc' (or variants of it)       */\n  /*    instead of `malloc' for allocation.                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                        B A S I C   T Y P E S                          */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    base_interface                                                     */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Base Interface                                                     */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    The FreeType~2 base font interface.                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section describes the most important public high-level API    */\n  /*    functions of FreeType~2.                                           */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_Library                                                         */\n  /*    FT_Face                                                            */\n  /*    FT_Size                                                            */\n  /*    FT_GlyphSlot                                                       */\n  /*    FT_CharMap                                                         */\n  /*    FT_Encoding                                                        */\n  /*    FT_ENC_TAG                                                         */\n  /*                                                                       */\n  /*    FT_FaceRec                                                         */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_SCALABLE                                              */\n  /*    FT_FACE_FLAG_FIXED_SIZES                                           */\n  /*    FT_FACE_FLAG_FIXED_WIDTH                                           */\n  /*    FT_FACE_FLAG_HORIZONTAL                                            */\n  /*    FT_FACE_FLAG_VERTICAL                                              */\n  /*    FT_FACE_FLAG_COLOR                                                 */\n  /*    FT_FACE_FLAG_SFNT                                                  */\n  /*    FT_FACE_FLAG_CID_KEYED                                             */\n  /*    FT_FACE_FLAG_TRICKY                                                */\n  /*    FT_FACE_FLAG_KERNING                                               */\n  /*    FT_FACE_FLAG_MULTIPLE_MASTERS                                      */\n  /*    FT_FACE_FLAG_GLYPH_NAMES                                           */\n  /*    FT_FACE_FLAG_EXTERNAL_STREAM                                       */\n  /*    FT_FACE_FLAG_HINTER                                                */\n  /*    FT_FACE_FLAG_TRICKY                                                */\n  /*                                                                       */\n  /*    FT_HAS_HORIZONTAL                                                  */\n  /*    FT_HAS_VERTICAL                                                    */\n  /*    FT_HAS_KERNING                                                     */\n  /*    FT_HAS_FIXED_SIZES                                                 */\n  /*    FT_HAS_GLYPH_NAMES                                                 */\n  /*    FT_HAS_MULTIPLE_MASTERS                                            */\n  /*    FT_HAS_COLOR                                                       */\n  /*                                                                       */\n  /*    FT_IS_SFNT                                                         */\n  /*    FT_IS_SCALABLE                                                     */\n  /*    FT_IS_FIXED_WIDTH                                                  */\n  /*    FT_IS_CID_KEYED                                                    */\n  /*    FT_IS_TRICKY                                                       */\n  /*                                                                       */\n  /*    FT_STYLE_FLAG_BOLD                                                 */\n  /*    FT_STYLE_FLAG_ITALIC                                               */\n  /*                                                                       */\n  /*    FT_SizeRec                                                         */\n  /*    FT_Size_Metrics                                                    */\n  /*                                                                       */\n  /*    FT_GlyphSlotRec                                                    */\n  /*    FT_Glyph_Metrics                                                   */\n  /*    FT_SubGlyph                                                        */\n  /*                                                                       */\n  /*    FT_Bitmap_Size                                                     */\n  /*                                                                       */\n  /*    FT_Init_FreeType                                                   */\n  /*    FT_Done_FreeType                                                   */\n  /*                                                                       */\n  /*    FT_New_Face                                                        */\n  /*    FT_Done_Face                                                       */\n  /*    FT_Reference_Face                                                  */\n  /*    FT_New_Memory_Face                                                 */\n  /*    FT_Open_Face                                                       */\n  /*    FT_Open_Args                                                       */\n  /*    FT_Parameter                                                       */\n  /*    FT_Attach_File                                                     */\n  /*    FT_Attach_Stream                                                   */\n  /*                                                                       */\n  /*    FT_Set_Char_Size                                                   */\n  /*    FT_Set_Pixel_Sizes                                                 */\n  /*    FT_Request_Size                                                    */\n  /*    FT_Select_Size                                                     */\n  /*    FT_Size_Request_Type                                               */\n  /*    FT_Size_RequestRec                                                 */\n  /*    FT_Size_Request                                                    */\n  /*    FT_Set_Transform                                                   */\n  /*    FT_Load_Glyph                                                      */\n  /*    FT_Get_Char_Index                                                  */\n  /*    FT_Get_First_Char                                                  */\n  /*    FT_Get_Next_Char                                                   */\n  /*    FT_Get_Name_Index                                                  */\n  /*    FT_Load_Char                                                       */\n  /*                                                                       */\n  /*    FT_OPEN_MEMORY                                                     */\n  /*    FT_OPEN_STREAM                                                     */\n  /*    FT_OPEN_PATHNAME                                                   */\n  /*    FT_OPEN_DRIVER                                                     */\n  /*    FT_OPEN_PARAMS                                                     */\n  /*                                                                       */\n  /*    FT_LOAD_DEFAULT                                                    */\n  /*    FT_LOAD_RENDER                                                     */\n  /*    FT_LOAD_MONOCHROME                                                 */\n  /*    FT_LOAD_LINEAR_DESIGN                                              */\n  /*    FT_LOAD_NO_SCALE                                                   */\n  /*    FT_LOAD_NO_HINTING                                                 */\n  /*    FT_LOAD_NO_BITMAP                                                  */\n  /*    FT_LOAD_NO_AUTOHINT                                                */\n  /*    FT_LOAD_COLOR                                                      */\n  /*                                                                       */\n  /*    FT_LOAD_VERTICAL_LAYOUT                                            */\n  /*    FT_LOAD_IGNORE_TRANSFORM                                           */\n  /*    FT_LOAD_FORCE_AUTOHINT                                             */\n  /*    FT_LOAD_NO_RECURSE                                                 */\n  /*    FT_LOAD_PEDANTIC                                                   */\n  /*                                                                       */\n  /*    FT_LOAD_TARGET_NORMAL                                              */\n  /*    FT_LOAD_TARGET_LIGHT                                               */\n  /*    FT_LOAD_TARGET_MONO                                                */\n  /*    FT_LOAD_TARGET_LCD                                                 */\n  /*    FT_LOAD_TARGET_LCD_V                                               */\n  /*                                                                       */\n  /*    FT_LOAD_TARGET_MODE                                                */\n  /*                                                                       */\n  /*    FT_Render_Glyph                                                    */\n  /*    FT_Render_Mode                                                     */\n  /*    FT_Get_Kerning                                                     */\n  /*    FT_Kerning_Mode                                                    */\n  /*    FT_Get_Track_Kerning                                               */\n  /*    FT_Get_Glyph_Name                                                  */\n  /*    FT_Get_Postscript_Name                                             */\n  /*                                                                       */\n  /*    FT_CharMapRec                                                      */\n  /*    FT_Select_Charmap                                                  */\n  /*    FT_Set_Charmap                                                     */\n  /*    FT_Get_Charmap_Index                                               */\n  /*                                                                       */\n  /*    FT_Get_FSType_Flags                                                */\n  /*    FT_Get_SubGlyph_Info                                               */\n  /*                                                                       */\n  /*    FT_Face_Internal                                                   */\n  /*    FT_Size_Internal                                                   */\n  /*    FT_Slot_Internal                                                   */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_XXX                                                   */\n  /*    FT_STYLE_FLAG_XXX                                                  */\n  /*    FT_OPEN_XXX                                                        */\n  /*    FT_LOAD_XXX                                                        */\n  /*    FT_LOAD_TARGET_XXX                                                 */\n  /*    FT_SUBGLYPH_FLAG_XXX                                               */\n  /*    FT_FSTYPE_XXX                                                      */\n  /*                                                                       */\n  /*    FT_HAS_FAST_GLYPHS                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Glyph_Metrics                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model the metrics of a single glyph.  The      */\n  /*    values are expressed in 26.6 fractional pixel format; if the flag  */\n  /*    @FT_LOAD_NO_SCALE has been used while loading the glyph, values    */\n  /*    are expressed in font units instead.                               */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    width ::                                                           */\n  /*      The glyph's width.                                               */\n  /*                                                                       */\n  /*    height ::                                                          */\n  /*      The glyph's height.                                              */\n  /*                                                                       */\n  /*    horiBearingX ::                                                    */\n  /*      Left side bearing for horizontal layout.                         */\n  /*                                                                       */\n  /*    horiBearingY ::                                                    */\n  /*      Top side bearing for horizontal layout.                          */\n  /*                                                                       */\n  /*    horiAdvance ::                                                     */\n  /*      Advance width for horizontal layout.                             */\n  /*                                                                       */\n  /*    vertBearingX ::                                                    */\n  /*      Left side bearing for vertical layout.                           */\n  /*                                                                       */\n  /*    vertBearingY ::                                                    */\n  /*      Top side bearing for vertical layout.  Larger positive values    */\n  /*      mean further below the vertical glyph origin.                    */\n  /*                                                                       */\n  /*    vertAdvance ::                                                     */\n  /*      Advance height for vertical layout.  Positive values mean the    */\n  /*      glyph has a positive advance downward.                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If not disabled with @FT_LOAD_NO_HINTING, the values represent     */\n  /*    dimensions of the hinted glyph (in case hinting is applicable).    */\n  /*                                                                       */\n  /*    Stroking a glyph with an outside border does not increase          */\n  /*    `horiAdvance' or `vertAdvance'; you have to manually adjust these  */\n  /*    values to account for the added width and height.                  */\n  /*                                                                       */\n  typedef struct  FT_Glyph_Metrics_\n  {\n    FT_Pos  width;\n    FT_Pos  height;\n\n    FT_Pos  horiBearingX;\n    FT_Pos  horiBearingY;\n    FT_Pos  horiAdvance;\n\n    FT_Pos  vertBearingX;\n    FT_Pos  vertBearingY;\n    FT_Pos  vertAdvance;\n\n  } FT_Glyph_Metrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Bitmap_Size                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure models the metrics of a bitmap strike (i.e., a set  */\n  /*    of glyphs for a given point size and resolution) in a bitmap font. */\n  /*    It is used for the `available_sizes' field of @FT_Face.            */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    height :: The vertical distance, in pixels, between two            */\n  /*              consecutive baselines.  It is always positive.           */\n  /*                                                                       */\n  /*    width  :: The average width, in pixels, of all glyphs in the       */\n  /*              strike.                                                  */\n  /*                                                                       */\n  /*    size   :: The nominal size of the strike in 26.6 fractional        */\n  /*              points.  This field is not very useful.                  */\n  /*                                                                       */\n  /*    x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional   */\n  /*              pixels.                                                  */\n  /*                                                                       */\n  /*    y_ppem :: The vertical ppem (nominal height) in 26.6 fractional    */\n  /*              pixels.                                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Windows FNT:                                                       */\n  /*      The nominal size given in a FNT font is not reliable.  Thus when */\n  /*      the driver finds it incorrect, it sets `size' to some calculated */\n  /*      values and sets `x_ppem' and `y_ppem' to the pixel width and     */\n  /*      height given in the font, respectively.                          */\n  /*                                                                       */\n  /*    TrueType embedded bitmaps:                                         */\n  /*      `size', `width', and `height' values are not contained in the    */\n  /*      bitmap strike itself.  They are computed from the global font    */\n  /*      parameters.                                                      */\n  /*                                                                       */\n  typedef struct  FT_Bitmap_Size_\n  {\n    FT_Short  height;\n    FT_Short  width;\n\n    FT_Pos    size;\n\n    FT_Pos    x_ppem;\n    FT_Pos    y_ppem;\n\n  } FT_Bitmap_Size;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                     O B J E C T   C L A S S E S                       */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Library                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a FreeType library instance.  Each `library' is        */\n  /*    completely independent from the others; it is the `root' of a set  */\n  /*    of objects like fonts, faces, sizes, etc.                          */\n  /*                                                                       */\n  /*    It also embeds a memory manager (see @FT_Memory), as well as a     */\n  /*    scan-line converter object (see @FT_Raster).                       */\n  /*                                                                       */\n  /*    In multi-threaded applications, make sure that the same FT_Library */\n  /*    object or any of its children doesn't get accessed in parallel.    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Library objects are normally created by @FT_Init_FreeType, and     */\n  /*    destroyed with @FT_Done_FreeType.  If you need reference-counting  */\n  /*    (cf. @FT_Reference_Library), use @FT_New_Library and               */\n  /*    @FT_Done_Library.                                                  */\n  /*                                                                       */\n  typedef struct FT_LibraryRec_  *FT_Library;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    module_management                                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Module                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given FreeType module object.  Each module can be a  */\n  /*    font driver, a renderer, or anything else that provides services   */\n  /*    to the formers.                                                    */\n  /*                                                                       */\n  typedef struct FT_ModuleRec_*  FT_Module;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Driver                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given FreeType font driver object.  Each font driver */\n  /*    is a special module capable of creating faces from font files.     */\n  /*                                                                       */\n  typedef struct FT_DriverRec_*  FT_Driver;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Renderer                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given FreeType renderer.  A renderer is a special    */\n  /*    module in charge of converting a glyph image to a bitmap, when     */\n  /*    necessary.  Each renderer supports a given glyph image format, and */\n  /*    one or more target surface depths.                                 */\n  /*                                                                       */\n  typedef struct FT_RendererRec_*  FT_Renderer;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    base_interface                                                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Face                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given typographic face object.  A face object models */\n  /*    a given typeface, in a given style.                                */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Each face object also owns a single @FT_GlyphSlot object, as well  */\n  /*    as one or more @FT_Size objects.                                   */\n  /*                                                                       */\n  /*    Use @FT_New_Face or @FT_Open_Face to create a new face object from */\n  /*    a given filepathname or a custom input stream.                     */\n  /*                                                                       */\n  /*    Use @FT_Done_Face to destroy it (along with its slot and sizes).   */\n  /*                                                                       */\n  /* <Also>                                                                */\n  /*    See @FT_FaceRec for the publicly accessible fields of a given face */\n  /*    object.                                                            */\n  /*                                                                       */\n  typedef struct FT_FaceRec_*  FT_Face;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Size                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an object used to model a face scaled to a given       */\n  /*    character size.                                                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Each @FT_Face has an _active_ @FT_Size object that is used by      */\n  /*    functions like @FT_Load_Glyph to determine the scaling             */\n  /*    transformation that in turn is used to load and hint glyphs and    */\n  /*    metrics.                                                           */\n  /*                                                                       */\n  /*    You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes,                */\n  /*    @FT_Request_Size or even @FT_Select_Size to change the content     */\n  /*    (i.e., the scaling values) of the active @FT_Size.                 */\n  /*                                                                       */\n  /*    You can use @FT_New_Size to create additional size objects for a   */\n  /*    given @FT_Face, but they won't be used by other functions until    */\n  /*    you activate it through @FT_Activate_Size.  Only one size can be   */\n  /*    activated at any given time per face.                              */\n  /*                                                                       */\n  /* <Also>                                                                */\n  /*    See @FT_SizeRec for the publicly accessible fields of a given size */\n  /*    object.                                                            */\n  /*                                                                       */\n  typedef struct FT_SizeRec_*  FT_Size;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_GlyphSlot                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given `glyph slot'.  A slot is a container where it  */\n  /*    is possible to load any of the glyphs contained in its parent      */\n  /*    face.                                                              */\n  /*                                                                       */\n  /*    In other words, each time you call @FT_Load_Glyph or               */\n  /*    @FT_Load_Char, the slot's content is erased by the new glyph data, */\n  /*    i.e., the glyph's metrics, its image (bitmap or outline), and      */\n  /*    other control information.                                         */\n  /*                                                                       */\n  /* <Also>                                                                */\n  /*    See @FT_GlyphSlotRec for the publicly accessible glyph fields.     */\n  /*                                                                       */\n  typedef struct FT_GlyphSlotRec_*  FT_GlyphSlot;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_CharMap                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given character map.  A charmap is used to translate */\n  /*    character codes in a given encoding into glyph indexes for its     */\n  /*    parent's face.  Some font formats may provide several charmaps per */\n  /*    font.                                                              */\n  /*                                                                       */\n  /*    Each face object owns zero or more charmaps, but only one of them  */\n  /*    can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char.   */\n  /*                                                                       */\n  /*    The list of available charmaps in a face is available through the  */\n  /*    `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec.   */\n  /*                                                                       */\n  /*    The currently active charmap is available as `face->charmap'.      */\n  /*    You should call @FT_Set_Charmap to change it.                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    When a new face is created (either through @FT_New_Face or         */\n  /*    @FT_Open_Face), the library looks for a Unicode charmap within     */\n  /*    the list and automatically activates it.                           */\n  /*                                                                       */\n  /* <Also>                                                                */\n  /*    See @FT_CharMapRec for the publicly accessible fields of a given   */\n  /*    character map.                                                     */\n  /*                                                                       */\n  typedef struct FT_CharMapRec_*  FT_CharMap;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_ENC_TAG                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro converts four-letter tags into an unsigned long.  It is */\n  /*    used to define `encoding' identifiers (see @FT_Encoding).          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Since many 16-bit compilers don't like 32-bit enumerations, you    */\n  /*    should redefine this macro in case of problems to something like   */\n  /*    this:                                                              */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      #define FT_ENC_TAG( value, a, b, c, d )  value                   */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    to get a simple enumeration without assigning special numbers.     */\n  /*                                                                       */\n\n#ifndef FT_ENC_TAG\n#define FT_ENC_TAG( value, a, b, c, d )         \\\n          value = ( ( (FT_UInt32)(a) << 24 ) |  \\\n                    ( (FT_UInt32)(b) << 16 ) |  \\\n                    ( (FT_UInt32)(c) <<  8 ) |  \\\n                      (FT_UInt32)(d)         )\n\n#endif /* FT_ENC_TAG */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Encoding                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration used to specify character sets supported by         */\n  /*    charmaps.  Used in the @FT_Select_Charmap API function.            */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Despite the name, this enumeration lists specific character        */\n  /*    repertories (i.e., charsets), and not text encoding methods (e.g., */\n  /*    UTF-8, UTF-16, etc.).                                              */\n  /*                                                                       */\n  /*    Other encodings might be defined in the future.                    */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_ENCODING_NONE ::                                                */\n  /*      The encoding value~0 is reserved.                                */\n  /*                                                                       */\n  /*    FT_ENCODING_UNICODE ::                                             */\n  /*      Corresponds to the Unicode character set.  This value covers     */\n  /*      all versions of the Unicode repertoire, including ASCII and      */\n  /*      Latin-1.  Most fonts include a Unicode charmap, but not all      */\n  /*      of them.                                                         */\n  /*                                                                       */\n  /*      For example, if you want to access Unicode value U+1F028 (and    */\n  /*      the font contains it), use value 0x1F028 as the input value for  */\n  /*      @FT_Get_Char_Index.                                              */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_SYMBOL ::                                           */\n  /*      Corresponds to the Microsoft Symbol encoding, used to encode     */\n  /*      mathematical symbols in the 32..255 character code range.  For   */\n  /*      more information, see                                            */\n  /*      `http://www.kostis.net/charsets/symbol.htm'.                     */\n  /*                                                                       */\n  /*    FT_ENCODING_SJIS ::                                                */\n  /*      Corresponds to Japanese SJIS encoding.  More info at             */\n  /*      at `http://en.wikipedia.org/wiki/Shift_JIS'.                     */\n  /*      See note on multi-byte encodings below.                          */\n  /*                                                                       */\n  /*    FT_ENCODING_GB2312 ::                                              */\n  /*      Corresponds to an encoding system for Simplified Chinese as used */\n  /*      used in mainland China.                                          */\n  /*                                                                       */\n  /*    FT_ENCODING_BIG5 ::                                                */\n  /*      Corresponds to an encoding system for Traditional Chinese as     */\n  /*      used in Taiwan and Hong Kong.                                    */\n  /*                                                                       */\n  /*    FT_ENCODING_WANSUNG ::                                             */\n  /*      Corresponds to the Korean encoding system known as Wansung.      */\n  /*      For more information see                                         */\n  /*      `http://msdn.microsoft.com/en-US/goglobal/cc305154'.             */\n  /*                                                                       */\n  /*    FT_ENCODING_JOHAB ::                                               */\n  /*      The Korean standard character set (KS~C 5601-1992), which        */\n  /*      corresponds to MS Windows code page 1361.  This character set    */\n  /*      includes all possible Hangeul character combinations.            */\n  /*                                                                       */\n  /*    FT_ENCODING_ADOBE_LATIN_1 ::                                       */\n  /*      Corresponds to a Latin-1 encoding as defined in a Type~1         */\n  /*      PostScript font.  It is limited to 256 character codes.          */\n  /*                                                                       */\n  /*    FT_ENCODING_ADOBE_STANDARD ::                                      */\n  /*      Corresponds to the Adobe Standard encoding, as found in Type~1,  */\n  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */\n  /*      codes.                                                           */\n  /*                                                                       */\n  /*    FT_ENCODING_ADOBE_EXPERT ::                                        */\n  /*      Corresponds to the Adobe Expert encoding, as found in Type~1,    */\n  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */\n  /*      codes.                                                           */\n  /*                                                                       */\n  /*    FT_ENCODING_ADOBE_CUSTOM ::                                        */\n  /*      Corresponds to a custom encoding, as found in Type~1, CFF, and   */\n  /*      OpenType/CFF fonts.  It is limited to 256 character codes.       */\n  /*                                                                       */\n  /*    FT_ENCODING_APPLE_ROMAN ::                                         */\n  /*      Corresponds to the 8-bit Apple roman encoding.  Many TrueType    */\n  /*      and OpenType fonts contain a charmap for this encoding, since    */\n  /*      older versions of Mac OS are able to use it.                     */\n  /*                                                                       */\n  /*    FT_ENCODING_OLD_LATIN_2 ::                                         */\n  /*      This value is deprecated and was never used nor reported by      */\n  /*      FreeType.  Don't use or test for it.                             */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_SJIS ::                                             */\n  /*      Same as FT_ENCODING_SJIS.  Deprecated.                           */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_GB2312 ::                                           */\n  /*      Same as FT_ENCODING_GB2312.  Deprecated.                         */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_BIG5 ::                                             */\n  /*      Same as FT_ENCODING_BIG5.  Deprecated.                           */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_WANSUNG ::                                          */\n  /*      Same as FT_ENCODING_WANSUNG.  Deprecated.                        */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_JOHAB ::                                            */\n  /*      Same as FT_ENCODING_JOHAB.  Deprecated.                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    By default, FreeType automatically synthesizes a Unicode charmap   */\n  /*    for PostScript fonts, using their glyph names dictionaries.        */\n  /*    However, it also reports the encodings defined explicitly in the   */\n  /*    font file, for the cases when they are needed, with the Adobe      */\n  /*    values as well.                                                    */\n  /*                                                                       */\n  /*    FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap  */\n  /*    is neither Unicode nor ISO-8859-1 (otherwise it is set to          */\n  /*    FT_ENCODING_UNICODE).  Use @FT_Get_BDF_Charset_ID to find out      */\n  /*    which encoding is really present.  If, for example, the            */\n  /*    `cs_registry' field is `KOI8' and the `cs_encoding' field is `R',  */\n  /*    the font is encoded in KOI8-R.                                     */\n  /*                                                                       */\n  /*    FT_ENCODING_NONE is always set (with a single exception) by the    */\n  /*    winfonts driver.  Use @FT_Get_WinFNT_Header and examine the        */\n  /*    `charset' field of the @FT_WinFNT_HeaderRec structure to find out  */\n  /*    which encoding is really present.  For example,                    */\n  /*    @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for       */\n  /*    Russian).                                                          */\n  /*                                                                       */\n  /*    FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */\n  /*    and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to  */\n  /*    FT_ENCODING_APPLE_ROMAN).                                          */\n  /*                                                                       */\n  /*    If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function       */\n  /*    @FT_Get_CMap_Language_ID to query the Mac language ID that may     */\n  /*    be needed to be able to distinguish Apple encoding variants.  See  */\n  /*                                                                       */\n  /*      http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt  */\n  /*                                                                       */\n  /*    to get an idea how to do that.  Basically, if the language ID      */\n  /*    is~0, don't use it, otherwise subtract 1 from the language ID.     */\n  /*    Then examine `encoding_id'.  If, for example, `encoding_id' is     */\n  /*    @TT_MAC_ID_ROMAN and the language ID (minus~1) is                  */\n  /*    `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman.        */\n  /*    @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi       */\n  /*    variant the Arabic encoding.                                       */\n  /*                                                                       */\n  typedef enum  FT_Encoding_\n  {\n    FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),\n\n    FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),\n    FT_ENC_TAG( FT_ENCODING_UNICODE,   'u', 'n', 'i', 'c' ),\n\n    FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),\n    FT_ENC_TAG( FT_ENCODING_GB2312,  'g', 'b', ' ', ' ' ),\n    FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),\n    FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),\n    FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),\n\n    /* for backwards compatibility */\n    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,\n    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,\n    FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,\n    FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,\n    FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,\n\n    FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),\n    FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,   'A', 'D', 'B', 'E' ),\n    FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,   'A', 'D', 'B', 'C' ),\n    FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,  'l', 'a', 't', '1' ),\n\n    FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),\n\n    FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )\n\n  } FT_Encoding;\n\n\n  /* these constants are deprecated; use the corresponding `FT_Encoding' */\n  /* values instead                                                      */\n#define ft_encoding_none            FT_ENCODING_NONE\n#define ft_encoding_unicode         FT_ENCODING_UNICODE\n#define ft_encoding_symbol          FT_ENCODING_MS_SYMBOL\n#define ft_encoding_latin_1         FT_ENCODING_ADOBE_LATIN_1\n#define ft_encoding_latin_2         FT_ENCODING_OLD_LATIN_2\n#define ft_encoding_sjis            FT_ENCODING_SJIS\n#define ft_encoding_gb2312          FT_ENCODING_GB2312\n#define ft_encoding_big5            FT_ENCODING_BIG5\n#define ft_encoding_wansung         FT_ENCODING_WANSUNG\n#define ft_encoding_johab           FT_ENCODING_JOHAB\n\n#define ft_encoding_adobe_standard  FT_ENCODING_ADOBE_STANDARD\n#define ft_encoding_adobe_expert    FT_ENCODING_ADOBE_EXPERT\n#define ft_encoding_adobe_custom    FT_ENCODING_ADOBE_CUSTOM\n#define ft_encoding_apple_roman     FT_ENCODING_APPLE_ROMAN\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_CharMapRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The base charmap structure.                                        */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    face        :: A handle to the parent face object.                 */\n  /*                                                                       */\n  /*    encoding    :: An @FT_Encoding tag identifying the charmap.  Use   */\n  /*                   this with @FT_Select_Charmap.                       */\n  /*                                                                       */\n  /*    platform_id :: An ID number describing the platform for the        */\n  /*                   following encoding ID.  This comes directly from    */\n  /*                   the TrueType specification and should be emulated   */\n  /*                   for other formats.                                  */\n  /*                                                                       */\n  /*    encoding_id :: A platform specific encoding number.  This also     */\n  /*                   comes from the TrueType specification and should be */\n  /*                   emulated similarly.                                 */\n  /*                                                                       */\n  typedef struct  FT_CharMapRec_\n  {\n    FT_Face      face;\n    FT_Encoding  encoding;\n    FT_UShort    platform_id;\n    FT_UShort    encoding_id;\n\n  } FT_CharMapRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                 B A S E   O B J E C T   C L A S S E S                 */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Face_Internal                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An opaque handle to an `FT_Face_InternalRec' structure, used to    */\n  /*    model private data of a given @FT_Face object.                     */\n  /*                                                                       */\n  /*    This structure might change between releases of FreeType~2 and is  */\n  /*    not generally available to client applications.                    */\n  /*                                                                       */\n  typedef struct FT_Face_InternalRec_*  FT_Face_Internal;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_FaceRec                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType root face class structure.  A face object models a        */\n  /*    typeface in a font file.                                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_faces           :: The number of faces in the font file.  Some */\n  /*                           font formats can have multiple faces in     */\n  /*                           a font file.                                */\n  /*                                                                       */\n  /*    face_index          :: The index of the face in the font file.  It */\n  /*                           is set to~0 if there is only one face in    */\n  /*                           the font file.                              */\n  /*                                                                       */\n  /*    face_flags          :: A set of bit flags that give important      */\n  /*                           information about the face; see             */\n  /*                           @FT_FACE_FLAG_XXX for the details.          */\n  /*                                                                       */\n  /*    style_flags         :: A set of bit flags indicating the style of  */\n  /*                           the face; see @FT_STYLE_FLAG_XXX for the    */\n  /*                           details.                                    */\n  /*                                                                       */\n  /*    num_glyphs          :: The number of glyphs in the face.  If the   */\n  /*                           face is scalable and has sbits (see         */\n  /*                           `num_fixed_sizes'), it is set to the number */\n  /*                           of outline glyphs.                          */\n  /*                                                                       */\n  /*                           For CID-keyed fonts, this value gives the   */\n  /*                           highest CID used in the font.               */\n  /*                                                                       */\n  /*    family_name         :: The face's family name.  This is an ASCII   */\n  /*                           string, usually in English, that describes  */\n  /*                           the typeface's family (like `Times New      */\n  /*                           Roman', `Bodoni', `Garamond', etc).  This   */\n  /*                           is a least common denominator used to list  */\n  /*                           fonts.  Some formats (TrueType & OpenType)  */\n  /*                           provide localized and Unicode versions of   */\n  /*                           this string.  Applications should use the   */\n  /*                           format specific interface to access them.   */\n  /*                           Can be NULL (e.g., in fonts embedded in a   */\n  /*                           PDF file).                                  */\n  /*                                                                       */\n  /*    style_name          :: The face's style name.  This is an ASCII    */\n  /*                           string, usually in English, that describes  */\n  /*                           the typeface's style (like `Italic',        */\n  /*                           `Bold', `Condensed', etc).  Not all font    */\n  /*                           formats provide a style name, so this field */\n  /*                           is optional, and can be set to NULL.  As    */\n  /*                           for `family_name', some formats provide     */\n  /*                           localized and Unicode versions of this      */\n  /*                           string.  Applications should use the format */\n  /*                           specific interface to access them.          */\n  /*                                                                       */\n  /*    num_fixed_sizes     :: The number of bitmap strikes in the face.   */\n  /*                           Even if the face is scalable, there might   */\n  /*                           still be bitmap strikes, which are called   */\n  /*                           `sbits' in that case.                       */\n  /*                                                                       */\n  /*    available_sizes     :: An array of @FT_Bitmap_Size for all bitmap  */\n  /*                           strikes in the face.  It is set to NULL if  */\n  /*                           there is no bitmap strike.                  */\n  /*                                                                       */\n  /*    num_charmaps        :: The number of charmaps in the face.         */\n  /*                                                                       */\n  /*    charmaps            :: An array of the charmaps of the face.       */\n  /*                                                                       */\n  /*    generic             :: A field reserved for client uses.  See the  */\n  /*                           @FT_Generic type description.               */\n  /*                                                                       */\n  /*    bbox                :: The font bounding box.  Coordinates are     */\n  /*                           expressed in font units (see                */\n  /*                           `units_per_EM').  The box is large enough   */\n  /*                           to contain any glyph from the font.  Thus,  */\n  /*                           `bbox.yMax' can be seen as the `maximum     */\n  /*                           ascender', and `bbox.yMin' as the `minimum  */\n  /*                           descender'.  Only relevant for scalable     */\n  /*                           formats.                                    */\n  /*                                                                       */\n  /*                           Note that the bounding box might be off by  */\n  /*                           (at least) one pixel for hinted fonts.  See */\n  /*                           @FT_Size_Metrics for further discussion.    */\n  /*                                                                       */\n  /*    units_per_EM        :: The number of font units per EM square for  */\n  /*                           this face.  This is typically 2048 for      */\n  /*                           TrueType fonts, and 1000 for Type~1 fonts.  */\n  /*                           Only relevant for scalable formats.         */\n  /*                                                                       */\n  /*    ascender            :: The typographic ascender of the face,       */\n  /*                           expressed in font units.  For font formats  */\n  /*                           not having this information, it is set to   */\n  /*                           `bbox.yMax'.  Only relevant for scalable    */\n  /*                           formats.                                    */\n  /*                                                                       */\n  /*    descender           :: The typographic descender of the face,      */\n  /*                           expressed in font units.  For font formats  */\n  /*                           not having this information, it is set to   */\n  /*                           `bbox.yMin'.  Note that this field is       */\n  /*                           usually negative.  Only relevant for        */\n  /*                           scalable formats.                           */\n  /*                                                                       */\n  /*    height              :: This value is the vertical distance         */\n  /*                           between two consecutive baselines,          */\n  /*                           expressed in font units.  It is always      */\n  /*                           positive.  Only relevant for scalable       */\n  /*                           formats.                                    */\n  /*                                                                       */\n  /*                           If you want the global glyph height, use    */\n  /*                           `ascender - descender'.                     */\n  /*                                                                       */\n  /*    max_advance_width   :: The maximum advance width, in font units,   */\n  /*                           for all glyphs in this face.  This can be   */\n  /*                           used to make word wrapping computations     */\n  /*                           faster.  Only relevant for scalable         */\n  /*                           formats.                                    */\n  /*                                                                       */\n  /*    max_advance_height  :: The maximum advance height, in font units,  */\n  /*                           for all glyphs in this face.  This is only  */\n  /*                           relevant for vertical layouts, and is set   */\n  /*                           to `height' for fonts that do not provide   */\n  /*                           vertical metrics.  Only relevant for        */\n  /*                           scalable formats.                           */\n  /*                                                                       */\n  /*    underline_position  :: The position, in font units, of the         */\n  /*                           underline line for this face.  It is the    */\n  /*                           center of the underlining stem.  Only       */\n  /*                           relevant for scalable formats.              */\n  /*                                                                       */\n  /*    underline_thickness :: The thickness, in font units, of the        */\n  /*                           underline for this face.  Only relevant for */\n  /*                           scalable formats.                           */\n  /*                                                                       */\n  /*    glyph               :: The face's associated glyph slot(s).        */\n  /*                                                                       */\n  /*    size                :: The current active size for this face.      */\n  /*                                                                       */\n  /*    charmap             :: The current active charmap for this face.   */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Fields may be changed after a call to @FT_Attach_File or           */\n  /*    @FT_Attach_Stream.                                                 */\n  /*                                                                       */\n  typedef struct  FT_FaceRec_\n  {\n    FT_Long           num_faces;\n    FT_Long           face_index;\n\n    FT_Long           face_flags;\n    FT_Long           style_flags;\n\n    FT_Long           num_glyphs;\n\n    FT_String*        family_name;\n    FT_String*        style_name;\n\n    FT_Int            num_fixed_sizes;\n    FT_Bitmap_Size*   available_sizes;\n\n    FT_Int            num_charmaps;\n    FT_CharMap*       charmaps;\n\n    FT_Generic        generic;\n\n    /*# The following member variables (down to `underline_thickness') */\n    /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size    */\n    /*# for bitmap fonts.                                              */\n    FT_BBox           bbox;\n\n    FT_UShort         units_per_EM;\n    FT_Short          ascender;\n    FT_Short          descender;\n    FT_Short          height;\n\n    FT_Short          max_advance_width;\n    FT_Short          max_advance_height;\n\n    FT_Short          underline_position;\n    FT_Short          underline_thickness;\n\n    FT_GlyphSlot      glyph;\n    FT_Size           size;\n    FT_CharMap        charmap;\n\n    /*@private begin */\n\n    FT_Driver         driver;\n    FT_Memory         memory;\n    FT_Stream         stream;\n\n    FT_ListRec        sizes_list;\n\n    FT_Generic        autohint;   /* face-specific auto-hinter data */\n    void*             extensions; /* unused                         */\n\n    FT_Face_Internal  internal;\n\n    /*@private end */\n\n  } FT_FaceRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_FACE_FLAG_XXX                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit flags used in the `face_flags' field of the          */\n  /*    @FT_FaceRec structure.  They inform client applications of         */\n  /*    properties of the corresponding face.                              */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_FACE_FLAG_SCALABLE ::                                           */\n  /*      Indicates that the face contains outline glyphs.  This doesn't   */\n  /*      prevent bitmap strikes, i.e., a face can have both this and      */\n  /*      and @FT_FACE_FLAG_FIXED_SIZES set.                               */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_FIXED_SIZES ::                                        */\n  /*      Indicates that the face contains bitmap strikes.  See also the   */\n  /*      `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec.   */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_FIXED_WIDTH ::                                        */\n  /*      Indicates that the face contains fixed-width characters (like    */\n  /*      Courier, Lucido, MonoType, etc.).                                */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_SFNT ::                                               */\n  /*      Indicates that the face uses the `sfnt' storage scheme.  For     */\n  /*      now, this means TrueType and OpenType.                           */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_HORIZONTAL ::                                         */\n  /*      Indicates that the face contains horizontal glyph metrics.  This */\n  /*      should be set for all common formats.                            */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_VERTICAL ::                                           */\n  /*      Indicates that the face contains vertical glyph metrics.  This   */\n  /*      is only available in some formats, not all of them.              */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_KERNING ::                                            */\n  /*      Indicates that the face contains kerning information.  If set,   */\n  /*      the kerning distance can be retrieved through the function       */\n  /*      @FT_Get_Kerning.  Otherwise the function always return the       */\n  /*      vector (0,0).  Note that FreeType doesn't handle kerning data    */\n  /*      from the `GPOS' table (as present in some OpenType fonts).       */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */\n  /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_MULTIPLE_MASTERS ::                                   */\n  /*      Indicates that the font contains multiple masters and is capable */\n  /*      of interpolating between them.  See the multiple-masters         */\n  /*      specific API for details.                                        */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */\n  /*      Indicates that the font contains glyph names that can be         */\n  /*      retrieved through @FT_Get_Glyph_Name.  Note that some TrueType   */\n  /*      fonts contain broken glyph name tables.  Use the function        */\n  /*      @FT_Has_PS_Glyph_Names when needed.                              */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_EXTERNAL_STREAM ::                                    */\n  /*      Used internally by FreeType to indicate that a face's stream was */\n  /*      provided by the client application and should not be destroyed   */\n  /*      when @FT_Done_Face is called.  Don't read or test this flag.     */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_HINTER ::                                             */\n  /*      Set if the font driver has a hinting machine of its own.  For    */\n  /*      example, with TrueType fonts, it makes sense to use data from    */\n  /*      the SFNT `gasp' table only if the native TrueType hinting engine */\n  /*      (with the bytecode interpreter) is available and active.         */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_CID_KEYED ::                                          */\n  /*      Set if the font is CID-keyed.  In that case, the font is not     */\n  /*      accessed by glyph indices but by CID values.  For subsetted      */\n  /*      CID-keyed fonts this has the consequence that not all index      */\n  /*      values are a valid argument to FT_Load_Glyph.  Only the CID      */\n  /*      values for which corresponding glyphs in the subsetted font      */\n  /*      exist make FT_Load_Glyph return successfully; in all other cases */\n  /*      you get an `FT_Err_Invalid_Argument' error.                      */\n  /*                                                                       */\n  /*      Note that CID-keyed fonts that are in an SFNT wrapper don't      */\n  /*      have this flag set since the glyphs are accessed in the normal   */\n  /*      way (using contiguous indices); the `CID-ness' isn't visible to  */\n  /*      the application.                                                 */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_TRICKY ::                                             */\n  /*      Set if the font is `tricky', this is, it always needs the        */\n  /*      font format's native hinting engine to get a reasonable result.  */\n  /*      A typical example is the Chinese font `mingli.ttf' that uses     */\n  /*      TrueType bytecode instructions to move and scale all of its      */\n  /*      subglyphs.                                                       */\n  /*                                                                       */\n  /*      It is not possible to autohint such fonts using                  */\n  /*      @FT_LOAD_FORCE_AUTOHINT; it will also ignore                     */\n  /*      @FT_LOAD_NO_HINTING.  You have to set both @FT_LOAD_NO_HINTING   */\n  /*      and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */\n  /*      probably never want this except for demonstration purposes.      */\n  /*                                                                       */\n  /*      Currently, there are about a dozen TrueType fonts in the list of */\n  /*      tricky fonts; they are hard-coded in file `ttobjs.c'.            */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_COLOR ::                                              */\n  /*      Set if the font has color glyph tables.  To access color glyphs  */\n  /*      use @FT_LOAD_COLOR.                                              */\n  /*                                                                       */\n#define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )\n#define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )\n#define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )\n#define FT_FACE_FLAG_SFNT              ( 1L <<  3 )\n#define FT_FACE_FLAG_HORIZONTAL        ( 1L <<  4 )\n#define FT_FACE_FLAG_VERTICAL          ( 1L <<  5 )\n#define FT_FACE_FLAG_KERNING           ( 1L <<  6 )\n#define FT_FACE_FLAG_FAST_GLYPHS       ( 1L <<  7 )\n#define FT_FACE_FLAG_MULTIPLE_MASTERS  ( 1L <<  8 )\n#define FT_FACE_FLAG_GLYPH_NAMES       ( 1L <<  9 )\n#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )\n#define FT_FACE_FLAG_HINTER            ( 1L << 11 )\n#define FT_FACE_FLAG_CID_KEYED         ( 1L << 12 )\n#define FT_FACE_FLAG_TRICKY            ( 1L << 13 )\n#define FT_FACE_FLAG_COLOR             ( 1L << 14 )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_HORIZONTAL( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains\n   *   horizontal metrics (this is true for all font formats though).\n   *\n   * @also:\n   *   @FT_HAS_VERTICAL can be used to check for vertical metrics.\n   *\n   */\n#define FT_HAS_HORIZONTAL( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_HORIZONTAL )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_VERTICAL( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains real\n   *   vertical metrics (and not only synthesized ones).\n   *\n   */\n#define FT_HAS_VERTICAL( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_VERTICAL )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_KERNING( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains kerning\n   *   data that can be accessed with @FT_Get_Kerning.\n   *\n   */\n#define FT_HAS_KERNING( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_KERNING )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_SCALABLE( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a scalable\n   *   font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF,\n   *   and PFR font formats.\n   *\n   */\n#define FT_IS_SCALABLE( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_SCALABLE )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_SFNT( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a font\n   *   whose format is based on the SFNT storage scheme.  This usually\n   *   means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded\n   *   bitmap fonts.\n   *\n   *   If this macro is true, all functions defined in @FT_SFNT_NAMES_H and\n   *   @FT_TRUETYPE_TABLES_H are available.\n   *\n   */\n#define FT_IS_SFNT( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_SFNT )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_FIXED_WIDTH( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a font face\n   *   that contains fixed-width (or `monospace', `fixed-pitch', etc.)\n   *   glyphs.\n   *\n   */\n#define FT_IS_FIXED_WIDTH( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_FIXED_SIZES( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains some\n   *   embedded bitmaps.  See the `available_sizes' field of the\n   *   @FT_FaceRec structure.\n   *\n   */\n#define FT_HAS_FIXED_SIZES( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_FAST_GLYPHS( face )\n   *\n   * @description:\n   *   Deprecated.\n   *\n   */\n#define FT_HAS_FAST_GLYPHS( face )  0\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_GLYPH_NAMES( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains some glyph\n   *   names that can be accessed through @FT_Get_Glyph_Name.\n   *\n   */\n#define FT_HAS_GLYPH_NAMES( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_MULTIPLE_MASTERS( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains some\n   *   multiple masters.  The functions provided by @FT_MULTIPLE_MASTERS_H\n   *   are then available to choose the exact design you want.\n   *\n   */\n#define FT_HAS_MULTIPLE_MASTERS( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_CID_KEYED( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a CID-keyed\n   *   font.  See the discussion of @FT_FACE_FLAG_CID_KEYED for more\n   *   details.\n   *\n   *   If this macro is true, all functions defined in @FT_CID_H are\n   *   available.\n   *\n   */\n#define FT_IS_CID_KEYED( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_CID_KEYED )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_TRICKY( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face represents a `tricky' font.\n   *   See the discussion of @FT_FACE_FLAG_TRICKY for more details.\n   *\n   */\n#define FT_IS_TRICKY( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_TRICKY )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_COLOR( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains\n   *   tables for color glyphs.\n   *\n   */\n#define FT_HAS_COLOR( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_COLOR )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Const>                                                               */\n  /*    FT_STYLE_FLAG_XXX                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit-flags used to indicate the style of a given face.    */\n  /*    These are used in the `style_flags' field of @FT_FaceRec.          */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_STYLE_FLAG_ITALIC ::                                            */\n  /*      Indicates that a given face style is italic or oblique.          */\n  /*                                                                       */\n  /*    FT_STYLE_FLAG_BOLD ::                                              */\n  /*      Indicates that a given face is bold.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The style information as provided by FreeType is very basic.  More */\n  /*    details are beyond the scope and should be done on a higher level  */\n  /*    (for example, by analyzing various fields of the `OS/2' table in   */\n  /*    SFNT based fonts).                                                 */\n  /*                                                                       */\n#define FT_STYLE_FLAG_ITALIC  ( 1 << 0 )\n#define FT_STYLE_FLAG_BOLD    ( 1 << 1 )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Size_Internal                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An opaque handle to an `FT_Size_InternalRec' structure, used to    */\n  /*    model private data of a given @FT_Size object.                     */\n  /*                                                                       */\n  typedef struct FT_Size_InternalRec_*  FT_Size_Internal;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Size_Metrics                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The size metrics structure gives the metrics of a size object.     */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    x_ppem       :: The width of the scaled EM square in pixels, hence */\n  /*                    the term `ppem' (pixels per EM).  It is also       */\n  /*                    referred to as `nominal width'.                    */\n  /*                                                                       */\n  /*    y_ppem       :: The height of the scaled EM square in pixels,      */\n  /*                    hence the term `ppem' (pixels per EM).  It is also */\n  /*                    referred to as `nominal height'.                   */\n  /*                                                                       */\n  /*    x_scale      :: A 16.16 fractional scaling value used to convert   */\n  /*                    horizontal metrics from font units to 26.6         */\n  /*                    fractional pixels.  Only relevant for scalable     */\n  /*                    font formats.                                      */\n  /*                                                                       */\n  /*    y_scale      :: A 16.16 fractional scaling value used to convert   */\n  /*                    vertical metrics from font units to 26.6           */\n  /*                    fractional pixels.  Only relevant for scalable     */\n  /*                    font formats.                                      */\n  /*                                                                       */\n  /*    ascender     :: The ascender in 26.6 fractional pixels.  See       */\n  /*                    @FT_FaceRec for the details.                       */\n  /*                                                                       */\n  /*    descender    :: The descender in 26.6 fractional pixels.  See      */\n  /*                    @FT_FaceRec for the details.                       */\n  /*                                                                       */\n  /*    height       :: The height in 26.6 fractional pixels.  See         */\n  /*                    @FT_FaceRec for the details.                       */\n  /*                                                                       */\n  /*    max_advance  :: The maximum advance width in 26.6 fractional       */\n  /*                    pixels.  See @FT_FaceRec for the details.          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The scaling values, if relevant, are determined first during a     */\n  /*    size changing operation.  The remaining fields are then set by the */\n  /*    driver.  For scalable formats, they are usually set to scaled      */\n  /*    values of the corresponding fields in @FT_FaceRec.                 */\n  /*                                                                       */\n  /*    Note that due to glyph hinting, these values might not be exact    */\n  /*    for certain fonts.  Thus they must be treated as unreliable        */\n  /*    with an error margin of at least one pixel!                        */\n  /*                                                                       */\n  /*    Indeed, the only way to get the exact metrics is to render _all_   */\n  /*    glyphs.  As this would be a definite performance hit, it is up to  */\n  /*    client applications to perform such computations.                  */\n  /*                                                                       */\n  /*    The FT_Size_Metrics structure is valid for bitmap fonts also.      */\n  /*                                                                       */\n  typedef struct  FT_Size_Metrics_\n  {\n    FT_UShort  x_ppem;      /* horizontal pixels per EM               */\n    FT_UShort  y_ppem;      /* vertical pixels per EM                 */\n\n    FT_Fixed   x_scale;     /* scaling values used to convert font    */\n    FT_Fixed   y_scale;     /* units to 26.6 fractional pixels        */\n\n    FT_Pos     ascender;    /* ascender in 26.6 frac. pixels          */\n    FT_Pos     descender;   /* descender in 26.6 frac. pixels         */\n    FT_Pos     height;      /* text height in 26.6 frac. pixels       */\n    FT_Pos     max_advance; /* max horizontal advance, in 26.6 pixels */\n\n  } FT_Size_Metrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_SizeRec                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType root size class structure.  A size object models a face   */\n  /*    object at a given size.                                            */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    face    :: Handle to the parent face object.                       */\n  /*                                                                       */\n  /*    generic :: A typeless pointer, unused by the FreeType library or   */\n  /*               any of its drivers.  It can be used by client           */\n  /*               applications to link their own data to each size        */\n  /*               object.                                                 */\n  /*                                                                       */\n  /*    metrics :: Metrics for this size object.  This field is read-only. */\n  /*                                                                       */\n  typedef struct  FT_SizeRec_\n  {\n    FT_Face           face;      /* parent face object              */\n    FT_Generic        generic;   /* generic pointer for client uses */\n    FT_Size_Metrics   metrics;   /* size metrics                    */\n    FT_Size_Internal  internal;\n\n  } FT_SizeRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_SubGlyph                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The subglyph structure is an internal object used to describe      */\n  /*    subglyphs (for example, in the case of composites).                */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The subglyph implementation is not part of the high-level API,     */\n  /*    hence the forward structure declaration.                           */\n  /*                                                                       */\n  /*    You can however retrieve subglyph information with                 */\n  /*    @FT_Get_SubGlyph_Info.                                             */\n  /*                                                                       */\n  typedef struct FT_SubGlyphRec_*  FT_SubGlyph;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Slot_Internal                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An opaque handle to an `FT_Slot_InternalRec' structure, used to    */\n  /*    model private data of a given @FT_GlyphSlot object.                */\n  /*                                                                       */\n  typedef struct FT_Slot_InternalRec_*  FT_Slot_Internal;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_GlyphSlotRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType root glyph slot class structure.  A glyph slot is a       */\n  /*    container where individual glyphs can be loaded, be they in        */\n  /*    outline or bitmap format.                                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    library           :: A handle to the FreeType library instance     */\n  /*                         this slot belongs to.                         */\n  /*                                                                       */\n  /*    face              :: A handle to the parent face object.           */\n  /*                                                                       */\n  /*    next              :: In some cases (like some font tools), several */\n  /*                         glyph slots per face object can be a good     */\n  /*                         thing.  As this is rare, the glyph slots are  */\n  /*                         listed through a direct, single-linked list   */\n  /*                         using its `next' field.                       */\n  /*                                                                       */\n  /*    generic           :: A typeless pointer unused by the FreeType     */\n  /*                         library or any of its drivers.  It can be     */\n  /*                         used by client applications to link their own */\n  /*                         data to each glyph slot object.               */\n  /*                                                                       */\n  /*    metrics           :: The metrics of the last loaded glyph in the   */\n  /*                         slot.  The returned values depend on the last */\n  /*                         load flags (see the @FT_Load_Glyph API        */\n  /*                         function) and can be expressed either in 26.6 */\n  /*                         fractional pixels or font units.              */\n  /*                                                                       */\n  /*                         Note that even when the glyph image is        */\n  /*                         transformed, the metrics are not.             */\n  /*                                                                       */\n  /*    linearHoriAdvance :: The advance width of the unhinted glyph.      */\n  /*                         Its value is expressed in 16.16 fractional    */\n  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */\n  /*                         when loading the glyph.  This field can be    */\n  /*                         important to perform correct WYSIWYG layout.  */\n  /*                         Only relevant for outline glyphs.             */\n  /*                                                                       */\n  /*    linearVertAdvance :: The advance height of the unhinted glyph.     */\n  /*                         Its value is expressed in 16.16 fractional    */\n  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */\n  /*                         when loading the glyph.  This field can be    */\n  /*                         important to perform correct WYSIWYG layout.  */\n  /*                         Only relevant for outline glyphs.             */\n  /*                                                                       */\n  /*    advance           :: This shorthand is, depending on               */\n  /*                         @FT_LOAD_IGNORE_TRANSFORM, the transformed    */\n  /*                         (hinted) advance width for the glyph, in 26.6 */\n  /*                         fractional pixel format.  As specified with   */\n  /*                         @FT_LOAD_VERTICAL_LAYOUT, it uses either the  */\n  /*                         `horiAdvance' or the `vertAdvance' value of   */\n  /*                         `metrics' field.                              */\n  /*                                                                       */\n  /*    format            :: This field indicates the format of the image  */\n  /*                         contained in the glyph slot.  Typically       */\n  /*                         @FT_GLYPH_FORMAT_BITMAP,                      */\n  /*                         @FT_GLYPH_FORMAT_OUTLINE, or                  */\n  /*                         @FT_GLYPH_FORMAT_COMPOSITE, but others are    */\n  /*                         possible.                                     */\n  /*                                                                       */\n  /*    bitmap            :: This field is used as a bitmap descriptor     */\n  /*                         when the slot format is                       */\n  /*                         @FT_GLYPH_FORMAT_BITMAP.  Note that the       */\n  /*                         address and content of the bitmap buffer can  */\n  /*                         change between calls of @FT_Load_Glyph and a  */\n  /*                         few other functions.                          */\n  /*                                                                       */\n  /*    bitmap_left       :: The bitmap's left bearing expressed in        */\n  /*                         integer pixels.  Only valid if the format is  */\n  /*                         @FT_GLYPH_FORMAT_BITMAP, this is, if the      */\n  /*                         glyph slot contains a bitmap.                 */\n  /*                                                                       */\n  /*    bitmap_top        :: The bitmap's top bearing expressed in integer */\n  /*                         pixels.  Remember that this is the distance   */\n  /*                         from the baseline to the top-most glyph       */\n  /*                         scanline, upwards y~coordinates being         */\n  /*                         *positive*.                                   */\n  /*                                                                       */\n  /*    outline           :: The outline descriptor for the current glyph  */\n  /*                         image if its format is                        */\n  /*                         @FT_GLYPH_FORMAT_OUTLINE.  Once a glyph is    */\n  /*                         loaded, `outline' can be transformed,         */\n  /*                         distorted, embolded, etc.  However, it must   */\n  /*                         not be freed.                                 */\n  /*                                                                       */\n  /*    num_subglyphs     :: The number of subglyphs in a composite glyph. */\n  /*                         This field is only valid for the composite    */\n  /*                         glyph format that should normally only be     */\n  /*                         loaded with the @FT_LOAD_NO_RECURSE flag.     */\n  /*                                                                       */\n  /*    subglyphs         :: An array of subglyph descriptors for          */\n  /*                         composite glyphs.  There are `num_subglyphs'  */\n  /*                         elements in there.  Currently internal to     */\n  /*                         FreeType.                                     */\n  /*                                                                       */\n  /*    control_data      :: Certain font drivers can also return the      */\n  /*                         control data for a given glyph image (e.g.    */\n  /*                         TrueType bytecode, Type~1 charstrings, etc.). */\n  /*                         This field is a pointer to such data.         */\n  /*                                                                       */\n  /*    control_len       :: This is the length in bytes of the control    */\n  /*                         data.                                         */\n  /*                                                                       */\n  /*    other             :: Really wicked formats can use this pointer to */\n  /*                         present their own glyph image to client       */\n  /*                         applications.  Note that the application      */\n  /*                         needs to know about the image format.         */\n  /*                                                                       */\n  /*    lsb_delta         :: The difference between hinted and unhinted    */\n  /*                         left side bearing while autohinting is        */\n  /*                         active.  Zero otherwise.                      */\n  /*                                                                       */\n  /*    rsb_delta         :: The difference between hinted and unhinted    */\n  /*                         right side bearing while autohinting is       */\n  /*                         active.  Zero otherwise.                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If @FT_Load_Glyph is called with default flags (see                */\n  /*    @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in   */\n  /*    its native format (e.g., an outline glyph for TrueType and Type~1  */\n  /*    formats).                                                          */\n  /*                                                                       */\n  /*    This image can later be converted into a bitmap by calling         */\n  /*    @FT_Render_Glyph.  This function finds the current renderer for    */\n  /*    the native image's format, then invokes it.                        */\n  /*                                                                       */\n  /*    The renderer is in charge of transforming the native image through */\n  /*    the slot's face transformation fields, then converting it into a   */\n  /*    bitmap that is returned in `slot->bitmap'.                         */\n  /*                                                                       */\n  /*    Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */\n  /*    to specify the position of the bitmap relative to the current pen  */\n  /*    position (e.g., coordinates (0,0) on the baseline).  Of course,    */\n  /*    `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP.         */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Here a small pseudo code fragment that shows how to use            */\n  /*    `lsb_delta' and `rsb_delta':                                       */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      FT_Pos  origin_x       = 0;                                      */\n  /*      FT_Pos  prev_rsb_delta = 0;                                      */\n  /*                                                                       */\n  /*                                                                       */\n  /*      for all glyphs do                                                */\n  /*        <compute kern between current and previous glyph and add it to */\n  /*         `origin_x'>                                                   */\n  /*                                                                       */\n  /*        <load glyph with `FT_Load_Glyph'>                              */\n  /*                                                                       */\n  /*        if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 )           */\n  /*          origin_x -= 64;                                              */\n  /*        else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 )      */\n  /*          origin_x += 64;                                              */\n  /*                                                                       */\n  /*        prev_rsb_delta = face->glyph->rsb_delta;                       */\n  /*                                                                       */\n  /*        <save glyph image, or render glyph, or ...>                    */\n  /*                                                                       */\n  /*        origin_x += face->glyph->advance.x;                            */\n  /*      endfor                                                           */\n  /*    }                                                                  */\n  /*                                                                       */\n  typedef struct  FT_GlyphSlotRec_\n  {\n    FT_Library        library;\n    FT_Face           face;\n    FT_GlyphSlot      next;\n    FT_UInt           reserved;       /* retained for binary compatibility */\n    FT_Generic        generic;\n\n    FT_Glyph_Metrics  metrics;\n    FT_Fixed          linearHoriAdvance;\n    FT_Fixed          linearVertAdvance;\n    FT_Vector         advance;\n\n    FT_Glyph_Format   format;\n\n    FT_Bitmap         bitmap;\n    FT_Int            bitmap_left;\n    FT_Int            bitmap_top;\n\n    FT_Outline        outline;\n\n    FT_UInt           num_subglyphs;\n    FT_SubGlyph       subglyphs;\n\n    void*             control_data;\n    long              control_len;\n\n    FT_Pos            lsb_delta;\n    FT_Pos            rsb_delta;\n\n    void*             other;\n\n    FT_Slot_Internal  internal;\n\n  } FT_GlyphSlotRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                         F U N C T I O N S                             */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Init_FreeType                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initialize a new FreeType library object.  The set of modules      */\n  /*    that are registered by this function is determined at build time.  */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    alibrary :: A handle to a new library object.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    In case you want to provide your own memory allocating routines,   */\n  /*    use @FT_New_Library instead, followed by a call to                 */\n  /*    @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module).  */\n  /*                                                                       */\n  /*    For multi-threading applications each thread should have its own   */\n  /*    FT_Library object.                                                 */\n  /*                                                                       */\n  /*    If you need reference-counting (cf. @FT_Reference_Library), use    */\n  /*    @FT_New_Library and @FT_Done_Library.                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Init_FreeType( FT_Library  *alibrary );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_FreeType                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy a given FreeType library object and all of its children,   */\n  /*    including resources, drivers, faces, sizes, etc.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to the target library object.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Done_FreeType( FT_Library  library );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_OPEN_XXX                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit-field constants used within the `flags' field of the */\n  /*    @FT_Open_Args structure.                                           */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_OPEN_MEMORY   :: This is a memory-based stream.                 */\n  /*                                                                       */\n  /*    FT_OPEN_STREAM   :: Copy the stream from the `stream' field.       */\n  /*                                                                       */\n  /*    FT_OPEN_PATHNAME :: Create a new input stream from a C~path        */\n  /*                        name.                                          */\n  /*                                                                       */\n  /*    FT_OPEN_DRIVER   :: Use the `driver' field.                        */\n  /*                                                                       */\n  /*    FT_OPEN_PARAMS   :: Use the `num_params' and `params' fields.      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME'     */\n  /*    flags are mutually exclusive.                                      */\n  /*                                                                       */\n#define FT_OPEN_MEMORY    0x1\n#define FT_OPEN_STREAM    0x2\n#define FT_OPEN_PATHNAME  0x4\n#define FT_OPEN_DRIVER    0x8\n#define FT_OPEN_PARAMS    0x10\n\n\n  /* these constants are deprecated; use the corresponding `FT_OPEN_XXX' */\n  /* values instead                                                      */\n#define ft_open_memory    FT_OPEN_MEMORY\n#define ft_open_stream    FT_OPEN_STREAM\n#define ft_open_pathname  FT_OPEN_PATHNAME\n#define ft_open_driver    FT_OPEN_DRIVER\n#define ft_open_params    FT_OPEN_PARAMS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Parameter                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to pass more or less generic parameters to */\n  /*    @FT_Open_Face.                                                     */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    tag  :: A four-byte identification tag.                            */\n  /*                                                                       */\n  /*    data :: A pointer to the parameter data.                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The ID and function of parameters are driver-specific.  See the    */\n  /*    various FT_PARAM_TAG_XXX flags for more information.               */\n  /*                                                                       */\n  typedef struct  FT_Parameter_\n  {\n    FT_ULong    tag;\n    FT_Pointer  data;\n\n  } FT_Parameter;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Open_Args                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to indicate how to open a new font file or        */\n  /*    stream.  A pointer to such a structure can be used as a parameter  */\n  /*    for the functions @FT_Open_Face and @FT_Attach_Stream.             */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    flags       :: A set of bit flags indicating how to use the        */\n  /*                   structure.                                          */\n  /*                                                                       */\n  /*    memory_base :: The first byte of the file in memory.               */\n  /*                                                                       */\n  /*    memory_size :: The size in bytes of the file in memory.            */\n  /*                                                                       */\n  /*    pathname    :: A pointer to an 8-bit file pathname.                */\n  /*                                                                       */\n  /*    stream      :: A handle to a source stream object.                 */\n  /*                                                                       */\n  /*    driver      :: This field is exclusively used by @FT_Open_Face;    */\n  /*                   it simply specifies the font driver to use to open  */\n  /*                   the face.  If set to~0, FreeType tries to load the  */\n  /*                   face with each one of the drivers in its list.      */\n  /*                                                                       */\n  /*    num_params  :: The number of extra parameters.                     */\n  /*                                                                       */\n  /*    params      :: Extra parameters passed to the font driver when     */\n  /*                   opening a new face.                                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The stream type is determined by the contents of `flags' that      */\n  /*    are tested in the following order by @FT_Open_Face:                */\n  /*                                                                       */\n  /*    If the @FT_OPEN_MEMORY bit is set, assume that this is a           */\n  /*    memory file of `memory_size' bytes, located at `memory_address'.   */\n  /*    The data are are not copied, and the client is responsible for     */\n  /*    releasing and destroying them _after_ the corresponding call to    */\n  /*    @FT_Done_Face.                                                     */\n  /*                                                                       */\n  /*    Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a        */\n  /*    custom input stream `stream' is used.                              */\n  /*                                                                       */\n  /*    Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this   */\n  /*    is a normal file and use `pathname' to open it.                    */\n  /*                                                                       */\n  /*    If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to     */\n  /*    open the file with the driver whose handler is in `driver'.        */\n  /*                                                                       */\n  /*    If the @FT_OPEN_PARAMS bit is set, the parameters given by         */\n  /*    `num_params' and `params' is used.  They are ignored otherwise.    */\n  /*                                                                       */\n  /*    Ideally, both the `pathname' and `params' fields should be tagged  */\n  /*    as `const'; this is missing for API backwards compatibility.  In   */\n  /*    other words, applications should treat them as read-only.          */\n  /*                                                                       */\n  typedef struct  FT_Open_Args_\n  {\n    FT_UInt         flags;\n    const FT_Byte*  memory_base;\n    FT_Long         memory_size;\n    FT_String*      pathname;\n    FT_Stream       stream;\n    FT_Module       driver;\n    FT_Int          num_params;\n    FT_Parameter*   params;\n\n  } FT_Open_Args;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Open_Face to open a font by its pathname.  */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    pathname   :: A path to the font file.                             */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the font.  The first    */\n  /*                  face has index~0.                                    */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.  If `face_index' is   */\n  /*                  greater than or equal to zero, it must be non-NULL.  */\n  /*                  See @FT_Open_Face for more details.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Use @FT_Done_Face to destroy the created @FT_Face object (along    */\n  /*    with its slot and sizes).                                          */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Face( FT_Library   library,\n               const char*  filepathname,\n               FT_Long      face_index,\n               FT_Face     *aface );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Memory_Face                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Open_Face to open a font that has been     */\n  /*    loaded into memory.                                                */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    file_base  :: A pointer to the beginning of the font data.         */\n  /*                                                                       */\n  /*    file_size  :: The size of the memory chunk used by the font data.  */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the font.  The first    */\n  /*                  face has index~0.                                    */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.  If `face_index' is   */\n  /*                  greater than or equal to zero, it must be non-NULL.  */\n  /*                  See @FT_Open_Face for more details.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You must not deallocate the memory before calling @FT_Done_Face.   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Memory_Face( FT_Library      library,\n                      const FT_Byte*  file_base,\n                      FT_Long         file_size,\n                      FT_Long         face_index,\n                      FT_Face        *aface );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Open_Face                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a face object from a given resource described by            */\n  /*    @FT_Open_Args.                                                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    args       :: A pointer to an `FT_Open_Args' structure that must   */\n  /*                  be filled by the caller.                             */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the font.  The first    */\n  /*                  face has index~0.                                    */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.  If `face_index' is   */\n  /*                  greater than or equal to zero, it must be non-NULL.  */\n  /*                  See note below.                                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Unlike FreeType 1.x, this function automatically creates a glyph   */\n  /*    slot for the face object that can be accessed directly through     */\n  /*    `face->glyph'.                                                     */\n  /*                                                                       */\n  /*    FT_Open_Face can be used to quickly check whether the font         */\n  /*    format of a given font resource is supported by FreeType.  If the  */\n  /*    `face_index' field is negative, the function's return value is~0   */\n  /*    if the font format is recognized, or non-zero otherwise;           */\n  /*    the function returns a more or less empty face handle in `*aface'  */\n  /*    (if `aface' isn't NULL).  The only useful field in this special    */\n  /*    case is `face->num_faces' that gives the number of faces within    */\n  /*    the font file.  After examination, the returned @FT_Face structure */\n  /*    should be deallocated with a call to @FT_Done_Face.                */\n  /*                                                                       */\n  /*    Each new face object created with this function also owns a        */\n  /*    default @FT_Size object, accessible as `face->size'.               */\n  /*                                                                       */\n  /*    One @FT_Library instance can have multiple face objects, this is,  */\n  /*    @FT_Open_Face and its siblings can be called multiple times using  */\n  /*    the same `library' argument.                                       */\n  /*                                                                       */\n  /*    See the discussion of reference counters in the description of     */\n  /*    @FT_Reference_Face.                                                */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Open_Face( FT_Library           library,\n                const FT_Open_Args*  args,\n                FT_Long              face_index,\n                FT_Face             *aface );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Attach_File                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Attach_Stream to attach a file.            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face         :: The target face object.                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    filepathname :: The pathname.                                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Attach_File( FT_Face      face,\n                  const char*  filepathname );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Attach_Stream                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    `Attach' data to a face object.  Normally, this is used to read    */\n  /*    additional information for the face object.  For example, you can  */\n  /*    attach an AFM file that comes with a Type~1 font to get the        */\n  /*    kerning values and other metrics.                                  */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: The target face object.                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    parameters :: A pointer to @FT_Open_Args that must be filled by    */\n  /*                  the caller.                                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The meaning of the `attach' (i.e., what really happens when the    */\n  /*    new file is read) is not fixed by FreeType itself.  It really      */\n  /*    depends on the font format (and thus the font driver).             */\n  /*                                                                       */\n  /*    Client applications are expected to know what they are doing       */\n  /*    when invoking this function.  Most drivers simply do not implement */\n  /*    file attachments.                                                  */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Attach_Stream( FT_Face        face,\n                    FT_Open_Args*  parameters );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Reference_Face                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A counter gets initialized to~1 at the time an @FT_Face structure  */\n  /*    is created.  This function increments the counter.  @FT_Done_Face  */\n  /*    then only destroys a face if the counter is~1, otherwise it simply */\n  /*    decrements the counter.                                            */\n  /*                                                                       */\n  /*    This function helps in managing life-cycles of structures that     */\n  /*    reference @FT_Face objects.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to a target face object.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.4.2                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Reference_Face( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_Face                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Discard a given face object, as well as all of its child slots and */\n  /*    sizes.                                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to a target face object.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    See the discussion of reference counters in the description of     */\n  /*    @FT_Reference_Face.                                                */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Done_Face( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Select_Size                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Select a bitmap strike.                                            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face         :: A handle to a target face object.                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    strike_index :: The index of the bitmap strike in the              */\n  /*                    `available_sizes' field of @FT_FaceRec structure.  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Select_Size( FT_Face  face,\n                  FT_Int   strike_index );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Size_Request_Type                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration type that lists the supported size request types.   */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_SIZE_REQUEST_TYPE_NOMINAL ::                                    */\n  /*      The nominal size.  The `units_per_EM' field of @FT_FaceRec is    */\n  /*      used to determine both scaling values.                           */\n  /*                                                                       */\n  /*    FT_SIZE_REQUEST_TYPE_REAL_DIM ::                                   */\n  /*      The real dimension.  The sum of the the `ascender' and (minus    */\n  /*      of) the `descender' fields of @FT_FaceRec are used to determine  */\n  /*      both scaling values.                                             */\n  /*                                                                       */\n  /*    FT_SIZE_REQUEST_TYPE_BBOX ::                                       */\n  /*      The font bounding box.  The width and height of the `bbox' field */\n  /*      of @FT_FaceRec are used to determine the horizontal and vertical */\n  /*      scaling value, respectively.                                     */\n  /*                                                                       */\n  /*    FT_SIZE_REQUEST_TYPE_CELL ::                                       */\n  /*      The `max_advance_width' field of @FT_FaceRec is used to          */\n  /*      determine the horizontal scaling value; the vertical scaling     */\n  /*      value is determined the same way as                              */\n  /*      @FT_SIZE_REQUEST_TYPE_REAL_DIM does.  Finally, both scaling      */\n  /*      values are set to the smaller one.  This type is useful if you   */\n  /*      want to specify the font size for, say, a window of a given      */\n  /*      dimension and 80x24 cells.                                       */\n  /*                                                                       */\n  /*    FT_SIZE_REQUEST_TYPE_SCALES ::                                     */\n  /*      Specify the scaling values directly.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The above descriptions only apply to scalable formats.  For bitmap */\n  /*    formats, the behaviour is up to the driver.                        */\n  /*                                                                       */\n  /*    See the note section of @FT_Size_Metrics if you wonder how size    */\n  /*    requesting relates to scaling values.                              */\n  /*                                                                       */\n  typedef enum  FT_Size_Request_Type_\n  {\n    FT_SIZE_REQUEST_TYPE_NOMINAL,\n    FT_SIZE_REQUEST_TYPE_REAL_DIM,\n    FT_SIZE_REQUEST_TYPE_BBOX,\n    FT_SIZE_REQUEST_TYPE_CELL,\n    FT_SIZE_REQUEST_TYPE_SCALES,\n\n    FT_SIZE_REQUEST_TYPE_MAX\n\n  } FT_Size_Request_Type;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Size_RequestRec                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a size request.                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    type           :: See @FT_Size_Request_Type.                       */\n  /*                                                                       */\n  /*    width          :: The desired width.                               */\n  /*                                                                       */\n  /*    height         :: The desired height.                              */\n  /*                                                                       */\n  /*    horiResolution :: The horizontal resolution.  If set to zero,      */\n  /*                      `width' is treated as a 26.6 fractional pixel    */\n  /*                      value.                                           */\n  /*                                                                       */\n  /*    vertResolution :: The vertical resolution.  If set to zero,        */\n  /*                      `height' is treated as a 26.6 fractional pixel   */\n  /*                      value.                                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If `width' is zero, then the horizontal scaling value is set equal */\n  /*    to the vertical scaling value, and vice versa.                     */\n  /*                                                                       */\n  typedef struct  FT_Size_RequestRec_\n  {\n    FT_Size_Request_Type  type;\n    FT_Long               width;\n    FT_Long               height;\n    FT_UInt               horiResolution;\n    FT_UInt               vertResolution;\n\n  } FT_Size_RequestRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Size_Request                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a size request structure.                              */\n  /*                                                                       */\n  typedef struct FT_Size_RequestRec_  *FT_Size_Request;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Request_Size                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Resize the scale of the active @FT_Size object in a face.          */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face :: A handle to a target face object.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    req  :: A pointer to a @FT_Size_RequestRec.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Although drivers may select the bitmap strike matching the         */\n  /*    request, you should not rely on this if you intend to select a     */\n  /*    particular bitmap strike.  Use @FT_Select_Size instead in that     */\n  /*    case.                                                              */\n  /*                                                                       */\n  /*    The relation between the requested size and the resulting glyph    */\n  /*    size is dependent entirely on how the size is defined in the       */\n  /*    source face.  The font designer chooses the final size of each     */\n  /*    glyph relative to this size.  For more information refer to        */\n  /*    `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'      */\n  /*                                                                       */\n  /*    Don't use this function if you are using the FreeType cache API.   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Request_Size( FT_Face          face,\n                   FT_Size_Request  req );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Char_Size                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Request_Size to request the nominal size   */\n  /*    (in points).                                                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face            :: A handle to a target face object.               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    char_width      :: The nominal width, in 26.6 fractional points.   */\n  /*                                                                       */\n  /*    char_height     :: The nominal height, in 26.6 fractional points.  */\n  /*                                                                       */\n  /*    horz_resolution :: The horizontal resolution in dpi.               */\n  /*                                                                       */\n  /*    vert_resolution :: The vertical resolution in dpi.                 */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If either the character width or height is zero, it is set equal   */\n  /*    to the other value.                                                */\n  /*                                                                       */\n  /*    If either the horizontal or vertical resolution is zero, it is set */\n  /*    equal to the other value.                                          */\n  /*                                                                       */\n  /*    A character width or height smaller than 1pt is set to 1pt; if     */\n  /*    both resolution values are zero, they are set to 72dpi.            */\n  /*                                                                       */\n  /*    Don't use this function if you are using the FreeType cache API.   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Char_Size( FT_Face     face,\n                    FT_F26Dot6  char_width,\n                    FT_F26Dot6  char_height,\n                    FT_UInt     horz_resolution,\n                    FT_UInt     vert_resolution );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Pixel_Sizes                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Request_Size to request the nominal size   */\n  /*    (in pixels).                                                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face         :: A handle to the target face object.                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    pixel_width  :: The nominal width, in pixels.                      */\n  /*                                                                       */\n  /*    pixel_height :: The nominal height, in pixels.                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You should not rely on the resulting glyphs matching, or being     */\n  /*    constrained, to this pixel size.  Refer to @FT_Request_Size to     */\n  /*    understand how requested sizes relate to actual sizes.             */\n  /*                                                                       */\n  /*    Don't use this function if you are using the FreeType cache API.   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Pixel_Sizes( FT_Face  face,\n                      FT_UInt  pixel_width,\n                      FT_UInt  pixel_height );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Load_Glyph                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to load a single glyph into the glyph slot of a    */\n  /*    face object.                                                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face        :: A handle to the target face object where the glyph  */\n  /*                   is loaded.                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    glyph_index :: The index of the glyph in the font file.  For       */\n  /*                   CID-keyed fonts (either in PS or in CFF format)     */\n  /*                   this argument specifies the CID value.              */\n  /*                                                                       */\n  /*    load_flags  :: A flag indicating what to load for this glyph.  The */\n  /*                   @FT_LOAD_XXX constants can be used to control the   */\n  /*                   glyph loading process (e.g., whether the outline    */\n  /*                   should be scaled, whether to load bitmaps or not,   */\n  /*                   whether to hint the outline, etc).                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The loaded glyph may be transformed.  See @FT_Set_Transform for    */\n  /*    the details.                                                       */\n  /*                                                                       */\n  /*    For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is        */\n  /*    returned for invalid CID values (this is, for CID values that      */\n  /*    don't have a corresponding glyph in the font).  See the discussion */\n  /*    of the @FT_FACE_FLAG_CID_KEYED flag for more details.              */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Load_Glyph( FT_Face   face,\n                 FT_UInt   glyph_index,\n                 FT_Int32  load_flags );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Load_Char                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to load a single glyph into the glyph slot of a    */\n  /*    face object, according to its character code.                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face        :: A handle to a target face object where the glyph    */\n  /*                   is loaded.                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    char_code   :: The glyph's character code, according to the        */\n  /*                   current charmap used in the face.                   */\n  /*                                                                       */\n  /*    load_flags  :: A flag indicating what to load for this glyph.  The */\n  /*                   @FT_LOAD_XXX constants can be used to control the   */\n  /*                   glyph loading process (e.g., whether the outline    */\n  /*                   should be scaled, whether to load bitmaps or not,   */\n  /*                   whether to hint the outline, etc).                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph.  */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Load_Char( FT_Face   face,\n                FT_ULong  char_code,\n                FT_Int32  load_flags );\n\n\n  /*************************************************************************\n   *\n   * @enum:\n   *   FT_LOAD_XXX\n   *\n   * @description:\n   *   A list of bit-field constants used with @FT_Load_Glyph to indicate\n   *   what kind of operations to perform during glyph loading.\n   *\n   * @values:\n   *   FT_LOAD_DEFAULT ::\n   *     Corresponding to~0, this value is used as the default glyph load\n   *     operation.  In this case, the following happens:\n   *\n   *     1. FreeType looks for a bitmap for the glyph corresponding to the\n   *        face's current size.  If one is found, the function returns.\n   *        The bitmap data can be accessed from the glyph slot (see note\n   *        below).\n   *\n   *     2. If no embedded bitmap is searched or found, FreeType looks for a\n   *        scalable outline.  If one is found, it is loaded from the font\n   *        file, scaled to device pixels, then `hinted' to the pixel grid\n   *        in order to optimize it.  The outline data can be accessed from\n   *        the glyph slot (see note below).\n   *\n   *     Note that by default, the glyph loader doesn't render outlines into\n   *     bitmaps.  The following flags are used to modify this default\n   *     behaviour to more specific and useful cases.\n   *\n   *   FT_LOAD_NO_SCALE ::\n   *     Don't scale the loaded outline glyph but keep it in font units.\n   *\n   *     This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and\n   *     unsets @FT_LOAD_RENDER.\n   *\n   *     If the font is `tricky' (see @FT_FACE_FLAG_TRICKY for more), using\n   *     FT_LOAD_NO_SCALE usually yields meaningless outlines because the\n   *     subglyphs must be scaled and positioned with hinting instructions.\n   *     This can be solved by loading the font without FT_LOAD_NO_SCALE and\n   *     setting the character size to `font->units_per_EM'.\n   *\n   *   FT_LOAD_NO_HINTING ::\n   *     Disable hinting.  This generally generates `blurrier' bitmap glyphs\n   *     when the glyph are rendered in any of the anti-aliased modes.  See\n   *     also the note below.\n   *\n   *     This flag is implied by @FT_LOAD_NO_SCALE.\n   *\n   *   FT_LOAD_RENDER ::\n   *     Call @FT_Render_Glyph after the glyph is loaded.  By default, the\n   *     glyph is rendered in @FT_RENDER_MODE_NORMAL mode.  This can be\n   *     overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME.\n   *\n   *     This flag is unset by @FT_LOAD_NO_SCALE.\n   *\n   *   FT_LOAD_NO_BITMAP ::\n   *     Ignore bitmap strikes when loading.  Bitmap-only fonts ignore this\n   *     flag.\n   *\n   *     @FT_LOAD_NO_SCALE always sets this flag.\n   *\n   *   FT_LOAD_VERTICAL_LAYOUT ::\n   *     Load the glyph for vertical text layout.  In particular, the\n   *     `advance' value in the @FT_GlyphSlotRec structure is set to the\n   *     `vertAdvance' value of the `metrics' field.\n   *\n   *     In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use\n   *     this flag currently.  Reason is that in this case vertical metrics\n   *     get synthesized, and those values are not always consistent across\n   *     various font formats.\n   *\n   *   FT_LOAD_FORCE_AUTOHINT ::\n   *     Indicates that the auto-hinter is preferred over the font's native\n   *     hinter.  See also the note below.\n   *\n   *   FT_LOAD_PEDANTIC ::\n   *     Indicates that the font driver should perform pedantic verifications\n   *     during glyph loading.  This is mostly used to detect broken glyphs\n   *     in fonts.  By default, FreeType tries to handle broken fonts also.\n   *\n   *     In particular, errors from the TrueType bytecode engine are not\n   *     passed to the application if this flag is not set; this might\n   *     result in partially hinted or distorted glyphs in case a glyph's\n   *     bytecode is buggy.\n   *\n   *   FT_LOAD_NO_RECURSE ::\n   *     Indicate that the font driver should not load composite glyphs\n   *     recursively.  Instead, it should set the `num_subglyph' and\n   *     `subglyphs' values of the glyph slot accordingly, and set\n   *     `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE.  The description of\n   *     subglyphs can then be accessed with @FT_Get_SubGlyph_Info.\n   *\n   *     This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.\n   *\n   *   FT_LOAD_IGNORE_TRANSFORM ::\n   *     Indicates that the transform matrix set by @FT_Set_Transform should\n   *     be ignored.\n   *\n   *   FT_LOAD_MONOCHROME ::\n   *     This flag is used with @FT_LOAD_RENDER to indicate that you want to\n   *     render an outline glyph to a 1-bit monochrome bitmap glyph, with\n   *     8~pixels packed into each byte of the bitmap data.\n   *\n   *     Note that this has no effect on the hinting algorithm used.  You\n   *     should rather use @FT_LOAD_TARGET_MONO so that the\n   *     monochrome-optimized hinting algorithm is used.\n   *\n   *   FT_LOAD_LINEAR_DESIGN ::\n   *     Indicates that the `linearHoriAdvance' and `linearVertAdvance'\n   *     fields of @FT_GlyphSlotRec should be kept in font units.  See\n   *     @FT_GlyphSlotRec for details.\n   *\n   *   FT_LOAD_NO_AUTOHINT ::\n   *     Disable auto-hinter.  See also the note below.\n   *\n   *   FT_LOAD_COLOR ::\n   *     This flag is used to request loading of color embedded-bitmap\n   *     images.  The resulting color bitmaps, if available, will have the\n   *     @FT_PIXEL_MODE_BGRA format.  When the flag is not used and color\n   *     bitmaps are found, they will be converted to 256-level gray\n   *     bitmaps transparently.  Those bitmaps will be in the\n   *     @FT_PIXEL_MODE_GRAY format.\n   *\n   *   FT_LOAD_CROP_BITMAP ::\n   *     Ignored.  Deprecated.\n   *\n   *   FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::\n   *     Ignored.  Deprecated.\n   *\n   * @note:\n   *   By default, hinting is enabled and the font's native hinter (see\n   *   @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter.  You can\n   *   disable hinting by setting @FT_LOAD_NO_HINTING or change the\n   *   precedence by setting @FT_LOAD_FORCE_AUTOHINT.  You can also set\n   *   @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be\n   *   used at all.\n   *\n   *   See the description of @FT_FACE_FLAG_TRICKY for a special exception\n   *   (affecting only a handful of Asian fonts).\n   *\n   *   Besides deciding which hinter to use, you can also decide which\n   *   hinting algorithm to use.  See @FT_LOAD_TARGET_XXX for details.\n   *\n   *   Note that the auto-hinter needs a valid Unicode cmap (either a native\n   *   one or synthesized by FreeType) for producing correct results.  If a\n   *   font provides an incorrect mapping (for example, assigning the\n   *   character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a\n   *   mathematical integral sign), the auto-hinter might produce useless\n   *   results.\n   *\n   */\n#define FT_LOAD_DEFAULT                      0x0\n#define FT_LOAD_NO_SCALE                     ( 1L << 0 )\n#define FT_LOAD_NO_HINTING                   ( 1L << 1 )\n#define FT_LOAD_RENDER                       ( 1L << 2 )\n#define FT_LOAD_NO_BITMAP                    ( 1L << 3 )\n#define FT_LOAD_VERTICAL_LAYOUT              ( 1L << 4 )\n#define FT_LOAD_FORCE_AUTOHINT               ( 1L << 5 )\n#define FT_LOAD_CROP_BITMAP                  ( 1L << 6 )\n#define FT_LOAD_PEDANTIC                     ( 1L << 7 )\n#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  ( 1L << 9 )\n#define FT_LOAD_NO_RECURSE                   ( 1L << 10 )\n#define FT_LOAD_IGNORE_TRANSFORM             ( 1L << 11 )\n#define FT_LOAD_MONOCHROME                   ( 1L << 12 )\n#define FT_LOAD_LINEAR_DESIGN                ( 1L << 13 )\n#define FT_LOAD_NO_AUTOHINT                  ( 1L << 15 )\n  /* Bits 16..19 are used by `FT_LOAD_TARGET_' */\n#define FT_LOAD_COLOR                        ( 1L << 20 )\n\n  /* */\n\n  /* used internally only by certain font drivers! */\n#define FT_LOAD_ADVANCE_ONLY                 ( 1L << 8 )\n#define FT_LOAD_SBITS_ONLY                   ( 1L << 14 )\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_LOAD_TARGET_XXX\n   *\n   * @description:\n   *   A list of values that are used to select a specific hinting algorithm\n   *   to use by the hinter.  You should OR one of these values to your\n   *   `load_flags' when calling @FT_Load_Glyph.\n   *\n   *   Note that font's native hinters may ignore the hinting algorithm you\n   *   have specified (e.g., the TrueType bytecode interpreter).  You can set\n   *   @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.\n   *\n   *   Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it\n   *   always implies @FT_LOAD_FORCE_AUTOHINT.\n   *\n   * @values:\n   *   FT_LOAD_TARGET_NORMAL ::\n   *     This corresponds to the default hinting algorithm, optimized for\n   *     standard gray-level rendering.  For monochrome output, use\n   *     @FT_LOAD_TARGET_MONO instead.\n   *\n   *   FT_LOAD_TARGET_LIGHT ::\n   *     A lighter hinting algorithm for non-monochrome modes.  Many\n   *     generated glyphs are more fuzzy but better resemble its original\n   *     shape.  A bit like rendering on Mac OS~X.\n   *\n   *     As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.\n   *\n   *   FT_LOAD_TARGET_MONO ::\n   *     Strong hinting algorithm that should only be used for monochrome\n   *     output.  The result is probably unpleasant if the glyph is rendered\n   *     in non-monochrome modes.\n   *\n   *   FT_LOAD_TARGET_LCD ::\n   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally\n   *     decimated LCD displays.\n   *\n   *   FT_LOAD_TARGET_LCD_V ::\n   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically\n   *     decimated LCD displays.\n   *\n   * @note:\n   *   You should use only _one_ of the FT_LOAD_TARGET_XXX values in your\n   *   `load_flags'.  They can't be ORed.\n   *\n   *   If @FT_LOAD_RENDER is also set, the glyph is rendered in the\n   *   corresponding mode (i.e., the mode that matches the used algorithm\n   *   best).  An exeption is FT_LOAD_TARGET_MONO since it implies\n   *   @FT_LOAD_MONOCHROME.\n   *\n   *   You can use a hinting algorithm that doesn't correspond to the same\n   *   rendering mode.  As an example, it is possible to use the `light'\n   *   hinting algorithm and have the results rendered in horizontal LCD\n   *   pixel mode, with code like\n   *\n   *     {\n   *       FT_Load_Glyph( face, glyph_index,\n   *                      load_flags | FT_LOAD_TARGET_LIGHT );\n   *\n   *       FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );\n   *     }\n   *\n   */\n#define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )\n\n#define FT_LOAD_TARGET_NORMAL  FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )\n#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT  )\n#define FT_LOAD_TARGET_MONO    FT_LOAD_TARGET_( FT_RENDER_MODE_MONO   )\n#define FT_LOAD_TARGET_LCD     FT_LOAD_TARGET_( FT_RENDER_MODE_LCD    )\n#define FT_LOAD_TARGET_LCD_V   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V  )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_LOAD_TARGET_MODE\n   *\n   * @description:\n   *   Return the @FT_Render_Mode corresponding to a given\n   *   @FT_LOAD_TARGET_XXX value.\n   *\n   */\n#define FT_LOAD_TARGET_MODE( x )  ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Transform                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to set the transformation that is applied to glyph */\n  /*    images when they are loaded into a glyph slot through              */\n  /*    @FT_Load_Glyph.                                                    */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face   :: A handle to the source face object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    matrix :: A pointer to the transformation's 2x2 matrix.  Use~0 for */\n  /*              the identity matrix.                                     */\n  /*    delta  :: A pointer to the translation vector.  Use~0 for the null */\n  /*              vector.                                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The transformation is only applied to scalable image formats after */\n  /*    the glyph has been loaded.  It means that hinting is unaltered by  */\n  /*    the transformation and is performed on the character size given in */\n  /*    the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes.         */\n  /*                                                                       */\n  /*    Note that this also transforms the `face.glyph.advance' field, but */\n  /*    *not* the values in `face.glyph.metrics'.                          */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Set_Transform( FT_Face     face,\n                    FT_Matrix*  matrix,\n                    FT_Vector*  delta );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Render_Mode                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration type that lists the render modes supported by       */\n  /*    FreeType~2.  Each mode corresponds to a specific type of scanline  */\n  /*    conversion performed on the outline.                               */\n  /*                                                                       */\n  /*    For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode'     */\n  /*    field in the @FT_GlyphSlotRec structure gives the format of the    */\n  /*    returned bitmap.                                                   */\n  /*                                                                       */\n  /*    All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity.   */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_RENDER_MODE_NORMAL ::                                           */\n  /*      This is the default render mode; it corresponds to 8-bit         */\n  /*      anti-aliased bitmaps.                                            */\n  /*                                                                       */\n  /*    FT_RENDER_MODE_LIGHT ::                                            */\n  /*      This is equivalent to @FT_RENDER_MODE_NORMAL.  It is only        */\n  /*      defined as a separate value because render modes are also used   */\n  /*      indirectly to define hinting algorithm selectors.  See           */\n  /*      @FT_LOAD_TARGET_XXX for details.                                 */\n  /*                                                                       */\n  /*    FT_RENDER_MODE_MONO ::                                             */\n  /*      This mode corresponds to 1-bit bitmaps (with 2~levels of         */\n  /*      opacity).                                                        */\n  /*                                                                       */\n  /*    FT_RENDER_MODE_LCD ::                                              */\n  /*      This mode corresponds to horizontal RGB and BGR sub-pixel        */\n  /*      displays like LCD screens.  It produces 8-bit bitmaps that are   */\n  /*      3~times the width of the original glyph outline in pixels, and   */\n  /*      which use the @FT_PIXEL_MODE_LCD mode.                           */\n  /*                                                                       */\n  /*    FT_RENDER_MODE_LCD_V ::                                            */\n  /*      This mode corresponds to vertical RGB and BGR sub-pixel displays */\n  /*      (like PDA screens, rotated LCD displays, etc.).  It produces     */\n  /*      8-bit bitmaps that are 3~times the height of the original        */\n  /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */\n  /*    filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */\n  /*    (not active in the default builds).  It is up to the caller to     */\n  /*    either call @FT_Library_SetLcdFilter (if available) or do the      */\n  /*    filtering itself.                                                  */\n  /*                                                                       */\n  /*    The selected render mode only affects vector glyphs of a font.     */\n  /*    Embedded bitmaps often have a different pixel mode like            */\n  /*    @FT_PIXEL_MODE_MONO.  You can use @FT_Bitmap_Convert to transform  */\n  /*    them into 8-bit pixmaps.                                           */\n  /*                                                                       */\n  typedef enum  FT_Render_Mode_\n  {\n    FT_RENDER_MODE_NORMAL = 0,\n    FT_RENDER_MODE_LIGHT,\n    FT_RENDER_MODE_MONO,\n    FT_RENDER_MODE_LCD,\n    FT_RENDER_MODE_LCD_V,\n\n    FT_RENDER_MODE_MAX\n\n  } FT_Render_Mode;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_Render_Mode' values instead                       */\n#define ft_render_mode_normal  FT_RENDER_MODE_NORMAL\n#define ft_render_mode_mono    FT_RENDER_MODE_MONO\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Render_Glyph                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Convert a given glyph image to a bitmap.  It does so by inspecting */\n  /*    the glyph image format, finding the relevant renderer, and         */\n  /*    invoking it.                                                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    slot        :: A handle to the glyph slot containing the image to  */\n  /*                   convert.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    render_mode :: This is the render mode used to render the glyph    */\n  /*                   image into a bitmap.  See @FT_Render_Mode for a     */\n  /*                   list of possible values.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    To get meaningful results, font scaling values must be set with    */\n  /*    functions like @FT_Set_Char_Size before calling FT_Render_Glyph.   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Render_Glyph( FT_GlyphSlot    slot,\n                   FT_Render_Mode  render_mode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Kerning_Mode                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration used to specify which kerning values to return in   */\n  /*    @FT_Get_Kerning.                                                   */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_KERNING_DEFAULT  :: Return scaled and grid-fitted kerning       */\n  /*                           distances (value is~0).                     */\n  /*                                                                       */\n  /*    FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning    */\n  /*                           distances.                                  */\n  /*                                                                       */\n  /*    FT_KERNING_UNSCALED :: Return the kerning vector in original font  */\n  /*                           units.                                      */\n  /*                                                                       */\n  typedef enum  FT_Kerning_Mode_\n  {\n    FT_KERNING_DEFAULT  = 0,\n    FT_KERNING_UNFITTED,\n    FT_KERNING_UNSCALED\n\n  } FT_Kerning_Mode;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_Kerning_Mode' values instead                      */\n#define ft_kerning_default   FT_KERNING_DEFAULT\n#define ft_kerning_unfitted  FT_KERNING_UNFITTED\n#define ft_kerning_unscaled  FT_KERNING_UNSCALED\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Kerning                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the kerning vector between two glyphs of a same face.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: A handle to a source face object.                   */\n  /*                                                                       */\n  /*    left_glyph  :: The index of the left glyph in the kern pair.       */\n  /*                                                                       */\n  /*    right_glyph :: The index of the right glyph in the kern pair.      */\n  /*                                                                       */\n  /*    kern_mode   :: See @FT_Kerning_Mode for more information.          */\n  /*                   Determines the scale and dimension of the returned  */\n  /*                   kerning vector.                                     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    akerning    :: The kerning vector.  This is either in font units   */\n  /*                   or in pixels (26.6 format) for scalable formats,    */\n  /*                   and in pixels for fixed-sizes formats.              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only horizontal layouts (left-to-right & right-to-left) are        */\n  /*    supported by this method.  Other layouts, or more sophisticated    */\n  /*    kernings, are out of the scope of this API function -- they can be */\n  /*    implemented through format-specific interfaces.                    */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Kerning( FT_Face     face,\n                  FT_UInt     left_glyph,\n                  FT_UInt     right_glyph,\n                  FT_UInt     kern_mode,\n                  FT_Vector  *akerning );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Track_Kerning                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the track kerning for a given face object at a given size.  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face       :: A handle to a source face object.                    */\n  /*                                                                       */\n  /*    point_size :: The point size in 16.16 fractional points.           */\n  /*                                                                       */\n  /*    degree     :: The degree of tightness.  Increasingly negative      */\n  /*                  values represent tighter track kerning, while        */\n  /*                  increasingly positive values represent looser track  */\n  /*                  kerning.  Value zero means no track kerning.         */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    akerning   :: The kerning in 16.16 fractional points, to be        */\n  /*                  uniformly applied between all glyphs.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Currently, only the Type~1 font driver supports track kerning,     */\n  /*    using data from AFM files (if attached with @FT_Attach_File or     */\n  /*    @FT_Attach_Stream).                                                */\n  /*                                                                       */\n  /*    Only very few AFM files come with track kerning data; please refer */\n  /*    to the Adobe's AFM specification for more details.                 */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Track_Kerning( FT_Face    face,\n                        FT_Fixed   point_size,\n                        FT_Int     degree,\n                        FT_Fixed*  akerning );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Glyph_Name                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the ASCII name of a given glyph in a face.  This only     */\n  /*    works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1.   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: A handle to a source face object.                   */\n  /*                                                                       */\n  /*    glyph_index :: The glyph index.                                    */\n  /*                                                                       */\n  /*    buffer_max  :: The maximum number of bytes available in the        */\n  /*                   buffer.                                             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    buffer      :: A pointer to a target buffer where the name is      */\n  /*                   copied to.                                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    An error is returned if the face doesn't provide glyph names or if */\n  /*    the glyph index is invalid.  In all cases of failure, the first    */\n  /*    byte of `buffer' is set to~0 to indicate an empty name.            */\n  /*                                                                       */\n  /*    The glyph name is truncated to fit within the buffer if it is too  */\n  /*    long.  The returned string is always zero-terminated.              */\n  /*                                                                       */\n  /*    Be aware that FreeType reorders glyph indices internally so that   */\n  /*    glyph index~0 always corresponds to the `missing glyph' (called    */\n  /*    `.notdef').                                                        */\n  /*                                                                       */\n  /*    This function always returns an error if the config macro          */\n  /*    `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is not defined in `ftoptions.h'. */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Glyph_Name( FT_Face     face,\n                     FT_UInt     glyph_index,\n                     FT_Pointer  buffer,\n                     FT_UInt     buffer_max );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Postscript_Name                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the ASCII PostScript name of a given face, if available.  */\n  /*    This only works with PostScript and TrueType fonts.                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source face object.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A pointer to the face's PostScript name.  NULL if unavailable.     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned pointer is owned by the face and is destroyed with    */\n  /*    it.                                                                */\n  /*                                                                       */\n  FT_EXPORT( const char* )\n  FT_Get_Postscript_Name( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Select_Charmap                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Select a given charmap by its encoding tag (as listed in           */\n  /*    `freetype.h').                                                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face     :: A handle to the source face object.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    encoding :: A handle to the selected encoding.                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function returns an error if no charmap in the face           */\n  /*    corresponds to the encoding queried here.                          */\n  /*                                                                       */\n  /*    Because many fonts contain more than a single cmap for Unicode     */\n  /*    encoding, this function has some special code to select the one    */\n  /*    that covers Unicode best (`best' in the sense that a UCS-4 cmap is */\n  /*    preferred to a UCS-2 cmap).  It is thus preferable to              */\n  /*    @FT_Set_Charmap in this case.                                      */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Select_Charmap( FT_Face      face,\n                     FT_Encoding  encoding );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Charmap                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Select a given charmap for character code to glyph index mapping.  */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face    :: A handle to the source face object.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    charmap :: A handle to the selected charmap.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function returns an error if the charmap is not part of       */\n  /*    the face (i.e., if it is not listed in the `face->charmaps'        */\n  /*    table).                                                            */\n  /*                                                                       */\n  /*    It also fails if a type~14 charmap is selected.                    */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Charmap( FT_Face     face,\n                  FT_CharMap  charmap );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Get_Charmap_Index\n   *\n   * @description:\n   *   Retrieve index of a given charmap.\n   *\n   * @input:\n   *   charmap ::\n   *     A handle to a charmap.\n   *\n   * @return:\n   *   The index into the array of character maps within the face to which\n   *   `charmap' belongs.  If an error occurs, -1 is returned.\n   *\n   */\n  FT_EXPORT( FT_Int )\n  FT_Get_Charmap_Index( FT_CharMap  charmap );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Char_Index                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the glyph index of a given character code.  This function   */\n  /*    uses a charmap object to do the mapping.                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face     :: A handle to the source face object.                    */\n  /*                                                                       */\n  /*    charcode :: The character code.                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The glyph index.  0~means `undefined character code'.              */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If you use FreeType to manipulate the contents of font files       */\n  /*    directly, be aware that the glyph index returned by this function  */\n  /*    doesn't always correspond to the internal indices used within the  */\n  /*    file.  This is done to ensure that value~0 always corresponds to   */\n  /*    the `missing glyph'.  If the first glyph is not named `.notdef',   */\n  /*    then for Type~1 and Type~42 fonts, `.notdef' will be moved into    */\n  /*    the glyph ID~0 position, and whatever was there will be moved to   */\n  /*    the position `.notdef' had.  For Type~1 fonts, if there is no      */\n  /*    `.notdef' glyph at all, then one will be created at index~0 and    */\n  /*    whatever was there will be moved to the last index -- Type~42      */\n  /*    fonts are considered invalid under this condition.                 */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt )\n  FT_Get_Char_Index( FT_Face   face,\n                     FT_ULong  charcode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_First_Char                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used to return the first character code in the    */\n  /*    current charmap of a given face.  It also returns the              */\n  /*    corresponding glyph index.                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face    :: A handle to the source face object.                     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    agindex :: Glyph index of first character code.  0~if charmap is   */\n  /*               empty.                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The charmap's first character code.                                */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You should use this function with @FT_Get_Next_Char to be able to  */\n  /*    parse all character codes available in a given charmap.  The code  */\n  /*    should look like this:                                             */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      FT_ULong  charcode;                                              */\n  /*      FT_UInt   gindex;                                                */\n  /*                                                                       */\n  /*                                                                       */\n  /*      charcode = FT_Get_First_Char( face, &gindex );                   */\n  /*      while ( gindex != 0 )                                            */\n  /*      {                                                                */\n  /*        ... do something with (charcode,gindex) pair ...               */\n  /*                                                                       */\n  /*        charcode = FT_Get_Next_Char( face, charcode, &gindex );        */\n  /*      }                                                                */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    Note that `*agindex' is set to~0 if the charmap is empty.  The     */\n  /*    result itself can be~0 in two cases: if the charmap is empty or    */\n  /*    if the value~0 is the first valid character code.                  */\n  /*                                                                       */\n  FT_EXPORT( FT_ULong )\n  FT_Get_First_Char( FT_Face   face,\n                     FT_UInt  *agindex );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Next_Char                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used to return the next character code in the     */\n  /*    current charmap of a given face following the value `char_code',   */\n  /*    as well as the corresponding glyph index.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face      :: A handle to the source face object.                   */\n  /*    char_code :: The starting character code.                          */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    agindex   :: Glyph index of next character code.  0~if charmap     */\n  /*                 is empty.                                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The charmap's next character code.                                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You should use this function with @FT_Get_First_Char to walk       */\n  /*    over all character codes available in a given charmap.  See the    */\n  /*    note for this function for a simple code example.                  */\n  /*                                                                       */\n  /*    Note that `*agindex' is set to~0 when there are no more codes in   */\n  /*    the charmap.                                                       */\n  /*                                                                       */\n  FT_EXPORT( FT_ULong )\n  FT_Get_Next_Char( FT_Face    face,\n                    FT_ULong   char_code,\n                    FT_UInt   *agindex );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Name_Index                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the glyph index of a given glyph name.  This function uses  */\n  /*    driver specific objects to do the translation.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face       :: A handle to the source face object.                  */\n  /*                                                                       */\n  /*    glyph_name :: The glyph name.                                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The glyph index.  0~means `undefined character code'.              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt )\n  FT_Get_Name_Index( FT_Face     face,\n                     FT_String*  glyph_name );\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SUBGLYPH_FLAG_XXX\n   *\n   * @description:\n   *   A list of constants used to describe subglyphs.  Please refer to the\n   *   TrueType specification for the meaning of the various flags.\n   *\n   * @values:\n   *   FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::\n   *   FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ::\n   *   FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID ::\n   *   FT_SUBGLYPH_FLAG_SCALE ::\n   *   FT_SUBGLYPH_FLAG_XY_SCALE ::\n   *   FT_SUBGLYPH_FLAG_2X2 ::\n   *   FT_SUBGLYPH_FLAG_USE_MY_METRICS ::\n   *\n   */\n#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1\n#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2\n#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4\n#define FT_SUBGLYPH_FLAG_SCALE                   8\n#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40\n#define FT_SUBGLYPH_FLAG_2X2                  0x80\n#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200\n\n\n  /*************************************************************************\n   *\n   * @func:\n   *   FT_Get_SubGlyph_Info\n   *\n   * @description:\n   *   Retrieve a description of a given subglyph.  Only use it if\n   *   `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is\n   *   returned otherwise.\n   *\n   * @input:\n   *   glyph ::\n   *     The source glyph slot.\n   *\n   *   sub_index ::\n   *     The index of the subglyph.  Must be less than\n   *     `glyph->num_subglyphs'.\n   *\n   * @output:\n   *   p_index ::\n   *     The glyph index of the subglyph.\n   *\n   *   p_flags ::\n   *     The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX.\n   *\n   *   p_arg1 ::\n   *     The subglyph's first argument (if any).\n   *\n   *   p_arg2 ::\n   *     The subglyph's second argument (if any).\n   *\n   *   p_transform ::\n   *     The subglyph transformation (if any).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The values of `*p_arg1', `*p_arg2', and `*p_transform' must be\n   *   interpreted depending on the flags returned in `*p_flags'.  See the\n   *   TrueType specification for details.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_SubGlyph_Info( FT_GlyphSlot  glyph,\n                        FT_UInt       sub_index,\n                        FT_Int       *p_index,\n                        FT_UInt      *p_flags,\n                        FT_Int       *p_arg1,\n                        FT_Int       *p_arg2,\n                        FT_Matrix    *p_transform );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_FSTYPE_XXX                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit flags used in the `fsType' field of the OS/2 table   */\n  /*    in a TrueType or OpenType font and the `FSType' entry in a         */\n  /*    PostScript font.  These bit flags are returned by                  */\n  /*    @FT_Get_FSType_Flags; they inform client applications of embedding */\n  /*    and subsetting restrictions associated with a font.                */\n  /*                                                                       */\n  /*    See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for  */\n  /*    more details.                                                      */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_FSTYPE_INSTALLABLE_EMBEDDING ::                                 */\n  /*      Fonts with no fsType bit set may be embedded and permanently     */\n  /*      installed on the remote system by an application.                */\n  /*                                                                       */\n  /*    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING ::                          */\n  /*      Fonts that have only this bit set must not be modified, embedded */\n  /*      or exchanged in any manner without first obtaining permission of */\n  /*      the font software copyright owner.                               */\n  /*                                                                       */\n  /*    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING ::                           */\n  /*      If this bit is set, the font may be embedded and temporarily     */\n  /*      loaded on the remote system.  Documents containing Preview &     */\n  /*      Print fonts must be opened `read-only'; no edits can be applied  */\n  /*      to the document.                                                 */\n  /*                                                                       */\n  /*    FT_FSTYPE_EDITABLE_EMBEDDING ::                                    */\n  /*      If this bit is set, the font may be embedded but must only be    */\n  /*      installed temporarily on other systems.  In contrast to Preview  */\n  /*      & Print fonts, documents containing editable fonts may be opened */\n  /*      for reading, editing is permitted, and changes may be saved.     */\n  /*                                                                       */\n  /*    FT_FSTYPE_NO_SUBSETTING ::                                         */\n  /*      If this bit is set, the font may not be subsetted prior to       */\n  /*      embedding.                                                       */\n  /*                                                                       */\n  /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY ::                                 */\n  /*      If this bit is set, only bitmaps contained in the font may be    */\n  /*      embedded; no outline data may be embedded.  If there are no      */\n  /*      bitmaps available in the font, then the font is unembeddable.    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    While the fsType flags can indicate that a font may be embedded, a */\n  /*    license with the font vendor may be separately required to use the */\n  /*    font in this way.                                                  */\n  /*                                                                       */\n#define FT_FSTYPE_INSTALLABLE_EMBEDDING         0x0000\n#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING  0x0002\n#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING   0x0004\n#define FT_FSTYPE_EDITABLE_EMBEDDING            0x0008\n#define FT_FSTYPE_NO_SUBSETTING                 0x0100\n#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY         0x0200\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_FSType_Flags                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the fsType flags for a font.                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source face object.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The fsType flags, @FT_FSTYPE_XXX.                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Use this function rather than directly reading the `fs_type' field */\n  /*    in the @PS_FontInfoRec structure, which is only guaranteed to      */\n  /*    return the correct results for Type~1 fonts.                       */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.8                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_UShort )\n  FT_Get_FSType_Flags( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    glyph_variants                                                     */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Glyph Variants                                                     */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    The FreeType~2 interface to Unicode Ideographic Variation          */\n  /*    Sequences (IVS), using the SFNT cmap format~14.                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Many CJK characters have variant forms.  They are a sort of grey   */\n  /*    area somewhere between being totally irrelevant and semantically   */\n  /*    distinct; for this reason, the Unicode consortium decided to       */\n  /*    introduce Ideographic Variation Sequences (IVS), consisting of a   */\n  /*    Unicode base character and one of 240 variant selectors            */\n  /*    (U+E0100-U+E01EF), instead of further extending the already huge   */\n  /*    code range for CJK characters.                                     */\n  /*                                                                       */\n  /*    An IVS is registered and unique; for further details please refer  */\n  /*    to Unicode Technical Standard #37, the Ideographic Variation       */\n  /*    Database:                                                          */\n  /*                                                                       */\n  /*      http://www.unicode.org/reports/tr37/                             */\n  /*                                                                       */\n  /*    To date (November 2014), the character with the most variants is   */\n  /*    U+9089, having 32 such IVS.                                        */\n  /*                                                                       */\n  /*    Adobe and MS decided to support IVS with a new cmap subtable       */\n  /*    (format~14).  It is an odd subtable because it is not a mapping of */\n  /*    input code points to glyphs, but contains lists of all variants    */\n  /*    supported by the font.                                             */\n  /*                                                                       */\n  /*    A variant may be either `default' or `non-default'.  A default     */\n  /*    variant is the one you will get for that code point if you look it */\n  /*    up in the standard Unicode cmap.  A non-default variant is a       */\n  /*    different glyph.                                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetCharVariantIndex                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the glyph index of a given character code as modified by    */\n  /*    the variation selector.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /*    charcode ::                                                        */\n  /*      The character code point in Unicode.                             */\n  /*                                                                       */\n  /*    variantSelector ::                                                 */\n  /*      The Unicode code point of the variation selector.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The glyph index.  0~means either `undefined character code', or    */\n  /*    `undefined selector code', or `no variation selector cmap          */\n  /*    subtable', or `current CharMap is not Unicode'.                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If you use FreeType to manipulate the contents of font files       */\n  /*    directly, be aware that the glyph index returned by this function  */\n  /*    doesn't always correspond to the internal indices used within      */\n  /*    the file.  This is done to ensure that value~0 always corresponds  */\n  /*    to the `missing glyph'.                                            */\n  /*                                                                       */\n  /*    This function is only meaningful if                                */\n  /*      a) the font has a variation selector cmap sub table,             */\n  /*    and                                                                */\n  /*      b) the current charmap has a Unicode encoding.                   */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt )\n  FT_Face_GetCharVariantIndex( FT_Face   face,\n                               FT_ULong  charcode,\n                               FT_ULong  variantSelector );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetCharVariantIsDefault                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Check whether this variant of this Unicode character is the one to */\n  /*    be found in the `cmap'.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /*    charcode ::                                                        */\n  /*      The character codepoint in Unicode.                              */\n  /*                                                                       */\n  /*    variantSelector ::                                                 */\n  /*      The Unicode codepoint of the variation selector.                 */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    1~if found in the standard (Unicode) cmap, 0~if found in the       */\n  /*    variation selector cmap, or -1 if it is not a variant.             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function is only meaningful if the font has a variation       */\n  /*    selector cmap subtable.                                            */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Int )\n  FT_Face_GetCharVariantIsDefault( FT_Face   face,\n                                   FT_ULong  charcode,\n                                   FT_ULong  variantSelector );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetVariantSelectors                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a zero-terminated list of Unicode variant selectors found   */\n  /*    in the font.                                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A pointer to an array of selector code points, or NULL if there is */\n  /*    no valid variant selector cmap subtable.                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The last item in the array is~0; the array is owned by the         */\n  /*    @FT_Face object but can be overwritten or released on the next     */\n  /*    call to a FreeType function.                                       */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt32* )\n  FT_Face_GetVariantSelectors( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetVariantsOfChar                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a zero-terminated list of Unicode variant selectors found   */\n  /*    for the specified character code.                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /*    charcode ::                                                        */\n  /*      The character codepoint in Unicode.                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A pointer to an array of variant selector code points that are     */\n  /*    active for the given character, or NULL if the corresponding list  */\n  /*    is empty.                                                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The last item in the array is~0; the array is owned by the         */\n  /*    @FT_Face object but can be overwritten or released on the next     */\n  /*    call to a FreeType function.                                       */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt32* )\n  FT_Face_GetVariantsOfChar( FT_Face   face,\n                             FT_ULong  charcode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetCharsOfVariant                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a zero-terminated list of Unicode character codes found for */\n  /*    the specified variant selector.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /*    variantSelector ::                                                 */\n  /*      The variant selector code point in Unicode.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A list of all the code points that are specified by this selector  */\n  /*    (both default and non-default codes are returned) or NULL if there */\n  /*    is no valid cmap or the variant selector is invalid.               */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The last item in the array is~0; the array is owned by the         */\n  /*    @FT_Face object but can be overwritten or released on the next     */\n  /*    call to a FreeType function.                                       */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt32* )\n  FT_Face_GetCharsOfVariant( FT_Face   face,\n                             FT_ULong  variantSelector );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    computations                                                       */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Computations                                                       */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Crunching fixed numbers and vectors.                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains various functions used to perform            */\n  /*    computations on 16.16 fixed-float numbers or 2d vectors.           */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_MulDiv                                                          */\n  /*    FT_MulFix                                                          */\n  /*    FT_DivFix                                                          */\n  /*    FT_RoundFix                                                        */\n  /*    FT_CeilFix                                                         */\n  /*    FT_FloorFix                                                        */\n  /*    FT_Vector_Transform                                                */\n  /*    FT_Matrix_Multiply                                                 */\n  /*    FT_Matrix_Invert                                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_MulDiv                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to perform the computation `(a*b)/c'   */\n  /*    with maximum accuracy (it uses a 64-bit intermediate integer       */\n  /*    whenever necessary).                                               */\n  /*                                                                       */\n  /*    This function isn't necessarily as fast as some processor specific */\n  /*    operations, but is at least completely portable.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The first multiplier.                                         */\n  /*    b :: The second multiplier.                                        */\n  /*    c :: The divisor.                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a*b)/c'.  This function never traps when trying to */\n  /*    divide by zero; it simply returns `MaxInt' or `MinInt' depending   */\n  /*    on the signs of `a' and `b'.                                       */\n  /*                                                                       */\n  FT_EXPORT( FT_Long )\n  FT_MulDiv( FT_Long  a,\n             FT_Long  b,\n             FT_Long  c );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_MulFix                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to perform the computation             */\n  /*    `(a*b)/0x10000' with maximum accuracy.  Most of the time this is   */\n  /*    used to multiply a given value by a 16.16 fixed-point factor.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The first multiplier.                                         */\n  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */\n  /*         possible (see note below).                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a*b)/0x10000'.                                     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function has been optimized for the case where the absolute   */\n  /*    value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */\n  /*    As this happens mainly when scaling from notional units to         */\n  /*    fractional pixels in FreeType, it resulted in noticeable speed     */\n  /*    improvements between versions 2.x and 1.x.                         */\n  /*                                                                       */\n  /*    As a conclusion, always try to place a 16.16 factor as the         */\n  /*    _second_ argument of this function; this can make a great          */\n  /*    difference.                                                        */\n  /*                                                                       */\n  FT_EXPORT( FT_Long )\n  FT_MulFix( FT_Long  a,\n             FT_Long  b );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_DivFix                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to perform the computation             */\n  /*    `(a*0x10000)/b' with maximum accuracy.  Most of the time, this is  */\n  /*    used to divide a given value by a 16.16 fixed-point factor.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The numerator.                                                */\n  /*    b :: The denominator.  Use a 16.16 factor here.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a*0x10000)/b'.                                     */\n  /*                                                                       */\n  FT_EXPORT( FT_Long )\n  FT_DivFix( FT_Long  a,\n             FT_Long  b );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_RoundFix                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to round a 16.16 fixed number.         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The number to be rounded.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a + 0x8000) & -0x10000'.                           */\n  /*                                                                       */\n  FT_EXPORT( FT_Fixed )\n  FT_RoundFix( FT_Fixed  a );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_CeilFix                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to compute the ceiling function of a   */\n  /*    16.16 fixed number.                                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The number for which the ceiling function is to be computed.  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a + 0x10000 - 1) & -0x10000'.                      */\n  /*                                                                       */\n  FT_EXPORT( FT_Fixed )\n  FT_CeilFix( FT_Fixed  a );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_FloorFix                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to compute the floor function of a     */\n  /*    16.16 fixed number.                                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The number for which the floor function is to be computed.    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `a & -0x10000'.                                      */\n  /*                                                                       */\n  FT_EXPORT( FT_Fixed )\n  FT_FloorFix( FT_Fixed  a );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Vector_Transform                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Transform a single vector through a 2x2 matrix.                    */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    vector :: The target vector to transform.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    matrix :: A pointer to the source 2x2 matrix.                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The result is undefined if either `vector' or `matrix' is invalid. */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Vector_Transform( FT_Vector*        vec,\n                       const FT_Matrix*  matrix );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    version                                                            */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    FreeType Version                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Functions and macros related to FreeType versions.                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Note that those functions and macros are of limited use because    */\n  /*    even a new release of FreeType with only documentation changes     */\n  /*    increases the version number.                                      */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_Library_Version                                                 */\n  /*                                                                       */\n  /*    FREETYPE_MAJOR                                                     */\n  /*    FREETYPE_MINOR                                                     */\n  /*    FREETYPE_PATCH                                                     */\n  /*                                                                       */\n  /*    FT_Face_CheckTrueTypePatents                                       */\n  /*    FT_Face_SetUnpatentedHinting                                       */\n  /*                                                                       */\n  /*    FREETYPE_XXX                                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @enum:\n   *   FREETYPE_XXX\n   *\n   * @description:\n   *   These three macros identify the FreeType source code version.\n   *   Use @FT_Library_Version to access them at runtime.\n   *\n   * @values:\n   *   FREETYPE_MAJOR :: The major version number.\n   *   FREETYPE_MINOR :: The minor version number.\n   *   FREETYPE_PATCH :: The patch level.\n   *\n   * @note:\n   *   The version number of FreeType if built as a dynamic link library\n   *   with the `libtool' package is _not_ controlled by these three\n   *   macros.\n   *\n   */\n#define FREETYPE_MAJOR  2\n#define FREETYPE_MINOR  5\n#define FREETYPE_PATCH  5\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Library_Version                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the version of the FreeType library being used.  This is    */\n  /*    useful when dynamically linking to the library, since one cannot   */\n  /*    use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and               */\n  /*    @FREETYPE_PATCH.                                                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A source library handle.                                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    amajor  :: The major version number.                               */\n  /*                                                                       */\n  /*    aminor  :: The minor version number.                               */\n  /*                                                                       */\n  /*    apatch  :: The patch version number.                               */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The reason why this function takes a `library' argument is because */\n  /*    certain programs implement library initialization in a custom way  */\n  /*    that doesn't use @FT_Init_FreeType.                                */\n  /*                                                                       */\n  /*    In such cases, the library version might not be available before   */\n  /*    the library object has been created.                               */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Library_Version( FT_Library   library,\n                      FT_Int      *amajor,\n                      FT_Int      *aminor,\n                      FT_Int      *apatch );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_CheckTrueTypePatents                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Parse all bytecode instructions of a TrueType font file to check   */\n  /*    whether any of the patented opcodes are used.  This is only useful */\n  /*    if you want to be able to use the unpatented hinter with           */\n  /*    fonts that do *not* use these opcodes.                             */\n  /*                                                                       */\n  /*    Note that this function parses *all* glyph instructions in the     */\n  /*    font file, which may be slow.                                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A face handle.                                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    1~if this is a TrueType font that uses one of the patented         */\n  /*    opcodes, 0~otherwise.                                              */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Since May 2010, TrueType hinting is no longer patented.            */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.5                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Bool )\n  FT_Face_CheckTrueTypePatents( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_SetUnpatentedHinting                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Enable or disable the unpatented hinter for a given face.          */\n  /*    Only enable it if you have determined that the face doesn't        */\n  /*    use any patented opcodes (see @FT_Face_CheckTrueTypePatents).      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face  :: A face handle.                                            */\n  /*                                                                       */\n  /*    value :: New boolean setting.                                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The old setting value.  This will always be false if this is not   */\n  /*    an SFNT font, or if the unpatented hinter is not compiled in this  */\n  /*    instance of the library.                                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Since May 2010, TrueType hinting is no longer patented.            */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.5                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Bool )\n  FT_Face_SetUnpatentedHinting( FT_Face  face,\n                                FT_Bool  value );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FREETYPE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ft2build.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ft2build.h                                                             */\n/*                                                                         */\n/*    FreeType 2 build and setup macros.                                   */\n/*                                                                         */\n/*  Copyright 1996-2001, 2006, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This is the `entry point' for FreeType header file inclusions.  It is */\n  /* the only header file which should be included directly; all other     */\n  /* FreeType header files should be accessed with macro names (after      */\n  /* including `ft2build.h').                                              */\n  /*                                                                       */\n  /* A typical example is                                                  */\n  /*                                                                       */\n  /*   #include <ft2build.h>                                               */\n  /*   #include FT_FREETYPE_H                                              */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FT2BUILD_H__\n#define __FT2BUILD_H__\n\n#include <config/ftheader.h>\n\n#endif /* __FT2BUILD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftadvanc.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftadvanc.h                                                             */\n/*                                                                         */\n/*    Quick computation of advance widths (specification only).            */\n/*                                                                         */\n/*  Copyright 2008, 2013, 2014 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTADVANC_H__\n#define __FTADVANC_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   quick_advance\n   *\n   * @title:\n   *   Quick retrieval of advance values\n   *\n   * @abstract:\n   *   Retrieve horizontal and vertical advance values without processing\n   *   glyph outlines, if possible.\n   *\n   * @description:\n   *   This section contains functions to quickly extract advance values\n   *   without handling glyph outlines, if possible.\n   *\n   * @order:\n   *   FT_Get_Advance\n   *   FT_Get_Advances\n   *\n   */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Const>                                                               */\n  /*    FT_ADVANCE_FLAG_FAST_ONLY                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A bit-flag to be OR-ed with the `flags' parameter of the           */\n  /*    @FT_Get_Advance and @FT_Get_Advances functions.                    */\n  /*                                                                       */\n  /*    If set, it indicates that you want these functions to fail if the  */\n  /*    corresponding hinting mode or font driver doesn't allow for very   */\n  /*    quick advance computation.                                         */\n  /*                                                                       */\n  /*    Typically, glyphs that are either unscaled, unhinted, bitmapped,   */\n  /*    or light-hinted can have their advance width computed very         */\n  /*    quickly.                                                           */\n  /*                                                                       */\n  /*    Normal and bytecode hinted modes that require loading, scaling,    */\n  /*    and hinting of the glyph outline, are extremely slow by            */\n  /*    comparison.                                                        */\n  /*                                                                       */\n#define FT_ADVANCE_FLAG_FAST_ONLY  0x20000000UL\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Advance                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the advance value of a given glyph outline in an          */\n  /*    @FT_Face.                                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face       :: The source @FT_Face handle.                          */\n  /*                                                                       */\n  /*    gindex     :: The glyph index.                                     */\n  /*                                                                       */\n  /*    load_flags :: A set of bit flags similar to those used when        */\n  /*                  calling @FT_Load_Glyph, used to determine what kind  */\n  /*                  of advances you need.                                */\n  /* <Output>                                                              */\n  /*    padvance :: The advance value.  If scaling is performed (based on  */\n  /*                the value of `load_flags'), the advance value is in    */\n  /*                16.16 format.  Otherwise, it is in font units.         */\n  /*                                                                       */\n  /*                If @FT_LOAD_VERTICAL_LAYOUT is set, this is the        */\n  /*                vertical advance corresponding to a vertical layout.   */\n  /*                Otherwise, it is the horizontal advance in a           */\n  /*                horizontal layout.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and   */\n  /*    if the corresponding font backend doesn't have a quick way to      */\n  /*    retrieve the advances.                                             */\n  /*                                                                       */\n  /*    A scaled advance is returned in 16.16 format but isn't transformed */\n  /*    by the affine transformation specified by @FT_Set_Transform.       */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Advance( FT_Face    face,\n                  FT_UInt    gindex,\n                  FT_Int32   load_flags,\n                  FT_Fixed  *padvance );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Advances                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the advance values of several glyph outlines in an        */\n  /*    @FT_Face.                                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: The source @FT_Face handle.                         */\n  /*                                                                       */\n  /*    start       :: The first glyph index.                              */\n  /*                                                                       */\n  /*    count       :: The number of advance values you want to retrieve.  */\n  /*                                                                       */\n  /*    load_flags  :: A set of bit flags similar to those used when       */\n  /*                   calling @FT_Load_Glyph.                             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    padvance :: The advance values.  This array, to be provided by the */\n  /*                caller, must contain at least `count' elements.        */\n  /*                                                                       */\n  /*                If scaling is performed (based on the value of         */\n  /*                `load_flags'), the advance values are in 16.16 format. */\n  /*                Otherwise, they are in font units.                     */\n  /*                                                                       */\n  /*                If @FT_LOAD_VERTICAL_LAYOUT is set, these are the      */\n  /*                vertical advances corresponding to a vertical layout.  */\n  /*                Otherwise, they are the horizontal advances in a       */\n  /*                horizontal layout.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and   */\n  /*    if the corresponding font backend doesn't have a quick way to      */\n  /*    retrieve the advances.                                             */\n  /*                                                                       */\n  /*    Scaled advances are returned in 16.16 format but aren't            */\n  /*    transformed by the affine transformation specified by              */\n  /*    @FT_Set_Transform.                                                 */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Advances( FT_Face    face,\n                   FT_UInt    start,\n                   FT_UInt    count,\n                   FT_Int32   load_flags,\n                   FT_Fixed  *padvances );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTADVANC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftautoh.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftautoh.h                                                              */\n/*                                                                         */\n/*    FreeType API for controlling the auto-hinter (specification only).   */\n/*                                                                         */\n/*  Copyright 2012, 2013 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTAUTOH_H__\n#define __FTAUTOH_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   auto_hinter\n   *\n   * @title:\n   *   The auto-hinter\n   *\n   * @abstract:\n   *   Controlling the auto-hinting module.\n   *\n   * @description:\n   *   While FreeType's auto-hinter doesn't expose API functions by itself,\n   *   it is possible to control its behaviour with @FT_Property_Set and\n   *   @FT_Property_Get.  The following lists the available properties\n   *   together with the necessary macros and structures.\n   *\n   *   Note that the auto-hinter's module name is `autofitter' for\n   *   historical reasons.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   glyph-to-script-map\n   *\n   * @description:\n   *   *Experimental* *only*\n   *\n   *   The auto-hinter provides various script modules to hint glyphs.\n   *   Examples of supported scripts are Latin or CJK.  Before a glyph is\n   *   auto-hinted, the Unicode character map of the font gets examined, and\n   *   the script is then determined based on Unicode character ranges, see\n   *   below.\n   *\n   *   OpenType fonts, however, often provide much more glyphs than\n   *   character codes (small caps, superscripts, ligatures, swashes, etc.),\n   *   to be controlled by so-called `features'.  Handling OpenType features\n   *   can be quite complicated and thus needs a separate library on top of\n   *   FreeType.\n   *\n   *   The mapping between glyph indices and scripts (in the auto-hinter\n   *   sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an\n   *   array with `num_glyphs' elements, as found in the font's @FT_Face\n   *   structure.  The `glyph-to-script-map' property returns a pointer to\n   *   this array, which can be modified as needed.  Note that the\n   *   modification should happen before the first glyph gets processed by\n   *   the auto-hinter so that the global analysis of the font shapes\n   *   actually uses the modified mapping.\n   *\n   *   The following example code demonstrates how to access it (omitting\n   *   the error handling).\n   *\n   *   {\n   *     FT_Library                library;\n   *     FT_Face                   face;\n   *     FT_Prop_GlyphToScriptMap  prop;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *     FT_New_Face( library, \"foo.ttf\", 0, &face );\n   *\n   *     prop.face = face;\n   *\n   *     FT_Property_Get( library, \"autofitter\",\n   *                               \"glyph-to-script-map\", &prop );\n   *\n   *     // adjust `prop.map' as needed right here\n   *\n   *     FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );\n   *   }\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_AUTOHINTER_SCRIPT_XXX\n   *\n   * @description:\n   *   *Experimental* *only*\n   *\n   *   A list of constants used for the @glyph-to-script-map property to\n   *   specify the script submodule the auto-hinter should use for hinting a\n   *   particular glyph.\n   *\n   * @values:\n   *   FT_AUTOHINTER_SCRIPT_NONE ::\n   *     Don't auto-hint this glyph.\n   *\n   *   FT_AUTOHINTER_SCRIPT_LATIN ::\n   *     Apply the latin auto-hinter.  For the auto-hinter, `latin' is a\n   *     very broad term, including Cyrillic and Greek also since characters\n   *     from those scripts share the same design constraints.\n   *\n   *     By default, characters from the following Unicode ranges are\n   *     assigned to this submodule.\n   *\n   *     {\n   *       U+0020 - U+007F  // Basic Latin (no control characters)\n   *       U+00A0 - U+00FF  // Latin-1 Supplement (no control characters)\n   *       U+0100 - U+017F  // Latin Extended-A\n   *       U+0180 - U+024F  // Latin Extended-B\n   *       U+0250 - U+02AF  // IPA Extensions\n   *       U+02B0 - U+02FF  // Spacing Modifier Letters\n   *       U+0300 - U+036F  // Combining Diacritical Marks\n   *       U+0370 - U+03FF  // Greek and Coptic\n   *       U+0400 - U+04FF  // Cyrillic\n   *       U+0500 - U+052F  // Cyrillic Supplement\n   *       U+1D00 - U+1D7F  // Phonetic Extensions\n   *       U+1D80 - U+1DBF  // Phonetic Extensions Supplement\n   *       U+1DC0 - U+1DFF  // Combining Diacritical Marks Supplement\n   *       U+1E00 - U+1EFF  // Latin Extended Additional\n   *       U+1F00 - U+1FFF  // Greek Extended\n   *       U+2000 - U+206F  // General Punctuation\n   *       U+2070 - U+209F  // Superscripts and Subscripts\n   *       U+20A0 - U+20CF  // Currency Symbols\n   *       U+2150 - U+218F  // Number Forms\n   *       U+2460 - U+24FF  // Enclosed Alphanumerics\n   *       U+2C60 - U+2C7F  // Latin Extended-C\n   *       U+2DE0 - U+2DFF  // Cyrillic Extended-A\n   *       U+2E00 - U+2E7F  // Supplemental Punctuation\n   *       U+A640 - U+A69F  // Cyrillic Extended-B\n   *       U+A720 - U+A7FF  // Latin Extended-D\n   *       U+FB00 - U+FB06  // Alphab. Present. Forms (Latin Ligatures)\n   *      U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols\n   *      U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement\n   *     }\n   *\n   *   FT_AUTOHINTER_SCRIPT_CJK ::\n   *     Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old\n   *     Vietnamese, and some other scripts.\n   *\n   *     By default, characters from the following Unicode ranges are\n   *     assigned to this submodule.\n   *\n   *     {\n   *       U+1100 - U+11FF  // Hangul Jamo\n   *       U+2E80 - U+2EFF  // CJK Radicals Supplement\n   *       U+2F00 - U+2FDF  // Kangxi Radicals\n   *       U+2FF0 - U+2FFF  // Ideographic Description Characters\n   *       U+3000 - U+303F  // CJK Symbols and Punctuation\n   *       U+3040 - U+309F  // Hiragana\n   *       U+30A0 - U+30FF  // Katakana\n   *       U+3100 - U+312F  // Bopomofo\n   *       U+3130 - U+318F  // Hangul Compatibility Jamo\n   *       U+3190 - U+319F  // Kanbun\n   *       U+31A0 - U+31BF  // Bopomofo Extended\n   *       U+31C0 - U+31EF  // CJK Strokes\n   *       U+31F0 - U+31FF  // Katakana Phonetic Extensions\n   *       U+3200 - U+32FF  // Enclosed CJK Letters and Months\n   *       U+3300 - U+33FF  // CJK Compatibility\n   *       U+3400 - U+4DBF  // CJK Unified Ideographs Extension A\n   *       U+4DC0 - U+4DFF  // Yijing Hexagram Symbols\n   *       U+4E00 - U+9FFF  // CJK Unified Ideographs\n   *       U+A960 - U+A97F  // Hangul Jamo Extended-A\n   *       U+AC00 - U+D7AF  // Hangul Syllables\n   *       U+D7B0 - U+D7FF  // Hangul Jamo Extended-B\n   *       U+F900 - U+FAFF  // CJK Compatibility Ideographs\n   *       U+FE10 - U+FE1F  // Vertical forms\n   *       U+FE30 - U+FE4F  // CJK Compatibility Forms\n   *       U+FF00 - U+FFEF  // Halfwidth and Fullwidth Forms\n   *      U+1B000 - U+1B0FF // Kana Supplement\n   *      U+1D300 - U+1D35F // Tai Xuan Hing Symbols\n   *      U+1F200 - U+1F2FF // Enclosed Ideographic Supplement\n   *      U+20000 - U+2A6DF // CJK Unified Ideographs Extension B\n   *      U+2A700 - U+2B73F // CJK Unified Ideographs Extension C\n   *      U+2B740 - U+2B81F // CJK Unified Ideographs Extension D\n   *      U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement\n   *     }\n   *\n   *   FT_AUTOHINTER_SCRIPT_INDIC ::\n   *     Apply the indic auto-hinter, covering all major scripts from the\n   *     Indian sub-continent and some other related scripts like Thai, Lao,\n   *     or Tibetan.\n   *\n   *     By default, characters from the following Unicode ranges are\n   *     assigned to this submodule.\n   *\n   *     {\n   *       U+0900 - U+0DFF  // Indic Range\n   *       U+0F00 - U+0FFF  // Tibetan\n   *       U+1900 - U+194F  // Limbu\n   *       U+1B80 - U+1BBF  // Sundanese\n   *       U+1C80 - U+1CDF  // Meetei Mayak\n   *       U+A800 - U+A82F  // Syloti Nagri\n   *      U+11800 - U+118DF // Sharada\n   *     }\n   *\n   *     Note that currently Indic support is rudimentary only, missing blue\n   *     zone support.\n   *\n   */\n#define FT_AUTOHINTER_SCRIPT_NONE   0\n#define FT_AUTOHINTER_SCRIPT_LATIN  1\n#define FT_AUTOHINTER_SCRIPT_CJK    2\n#define FT_AUTOHINTER_SCRIPT_INDIC  3\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Prop_GlyphToScriptMap\n   *\n   * @description:\n   *   *Experimental* *only*\n   *\n   *   The data exchange structure for the @glyph-to-script-map property.\n   *\n   */\n  typedef struct  FT_Prop_GlyphToScriptMap_\n  {\n    FT_Face   face;\n    FT_Byte*  map;\n\n  } FT_Prop_GlyphToScriptMap;\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   fallback-script\n   *\n   * @description:\n   *   *Experimental* *only*\n   *\n   *   If no auto-hinter script module can be assigned to a glyph, a\n   *   fallback script gets assigned to it (see also the\n   *   @glyph-to-script-map property).  By default, this is\n   *   @FT_AUTOHINTER_SCRIPT_CJK.  Using the `fallback-script' property,\n   *   this fallback value can be changed.\n   *\n   *   {\n   *     FT_Library  library;\n   *     FT_UInt     fallback_script = FT_AUTOHINTER_SCRIPT_NONE;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"autofitter\",\n   *                               \"fallback-script\", &fallback_script );\n   *   }\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   It's important to use the right timing for changing this value: The\n   *   creation of the glyph-to-script map that eventually uses the\n   *   fallback script value gets triggered either by setting or reading a\n   *   face-specific property like @glyph-to-script-map, or by auto-hinting\n   *   any glyph from that face.  In particular, if you have already created\n   *   an @FT_Face structure but not loaded any glyph (using the\n   *   auto-hinter), a change of the fallback script will affect this face.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   default-script\n   *\n   * @description:\n   *   *Experimental* *only*\n   *\n   *   If Freetype gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make\n   *   the HarfBuzz library access OpenType features for getting better\n   *   glyph coverages, this property sets the (auto-fitter) script to be\n   *   used for the default (OpenType) script data of a font's GSUB table.\n   *   Features for the default script are intended for all scripts not\n   *   explicitly handled in GSUB; an example is a `dlig' feature,\n   *   containing the combination of the characters `T', `E', and `L' to\n   *   form a `TEL' ligature.\n   *\n   *   By default, this is @FT_AUTOHINTER_SCRIPT_LATIN.  Using the\n   *   `default-script' property, this default value can be changed.\n   *\n   *   {\n   *     FT_Library  library;\n   *     FT_UInt     default_script = FT_AUTOHINTER_SCRIPT_NONE;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"autofitter\",\n   *                               \"default-script\", &default_script );\n   *   }\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   It's important to use the right timing for changing this value: The\n   *   creation of the glyph-to-script map that eventually uses the\n   *   default script value gets triggered either by setting or reading a\n   *   face-specific property like @glyph-to-script-map, or by auto-hinting\n   *   any glyph from that face.  In particular, if you have already created\n   *   an @FT_Face structure but not loaded any glyph (using the\n   *   auto-hinter), a change of the default script will affect this face.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   increase-x-height\n   *\n   * @description:\n   *   For ppem values in the range 6~<= ppem <= `increase-x-height', round\n   *   up the font's x~height much more often than normally.  If the value\n   *   is set to~0, which is the default, this feature is switched off.  Use\n   *   this property to improve the legibility of small font sizes if\n   *   necessary.\n   *\n   *   {\n   *     FT_Library               library;\n   *     FT_Face                  face;\n   *     FT_Prop_IncreaseXHeight  prop;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *     FT_New_Face( library, \"foo.ttf\", 0, &face );\n   *     FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );\n   *\n   *     prop.face  = face;\n   *     prop.limit = 14;\n   *\n   *     FT_Property_Set( library, \"autofitter\",\n   *                               \"increase-x-height\", &prop );\n   *   }\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   Set this value right after calling @FT_Set_Char_Size, but before\n   *   loading any glyph (using the auto-hinter).\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Prop_IncreaseXHeight\n   *\n   * @description:\n   *   The data exchange structure for the @increase-x-height property.\n   *\n   */\n  typedef struct  FT_Prop_IncreaseXHeight_\n  {\n    FT_Face  face;\n    FT_UInt  limit;\n\n  } FT_Prop_IncreaseXHeight;\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTAUTOH_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftbbox.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbbox.h                                                               */\n/*                                                                         */\n/*    FreeType exact bbox computation (specification).                     */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2007, 2011, 2013 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This component has a _single_ role: to compute exact outline bounding */\n  /* boxes.                                                                */\n  /*                                                                       */\n  /* It is separated from the rest of the engine for various technical     */\n  /* reasons.  It may well be integrated in `ftoutln' later.               */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTBBOX_H__\n#define __FTBBOX_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    outline_processing                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Get_BBox                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Compute the exact bounding box of an outline.  This is slower      */\n  /*    than computing the control box.  However, it uses an advanced      */\n  /*    algorithm that returns _very_ quickly when the two boxes           */\n  /*    coincide.  Otherwise, the outline Bézier arcs are traversed to     */\n  /*    extract their extrema.                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    outline :: A pointer to the source outline.                        */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    abbox   :: The outline's exact bounding box.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If the font is tricky and the glyph has been loaded with           */\n  /*    @FT_LOAD_NO_SCALE, the resulting BBox is meaningless.  To get      */\n  /*    reasonable values for the BBox it is necessary to load the glyph   */\n  /*    at a large ppem value (so that the hinting instructions can        */\n  /*    properly shift and scale the subglyphs), then extracting the BBox, */\n  /*    which can be eventually converted back to font units.              */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Get_BBox( FT_Outline*  outline,\n                       FT_BBox     *abbox );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTBBOX_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftbdf.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbdf.h                                                                */\n/*                                                                         */\n/*    FreeType API for accessing BDF-specific strings (specification).     */\n/*                                                                         */\n/*  Copyright 2002-2004, 2006, 2009, 2014 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTBDF_H__\n#define __FTBDF_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    bdf_fonts                                                          */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    BDF and PCF Files                                                  */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    BDF and PCF specific API.                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of functions specific to BDF */\n  /*    and PCF fonts.                                                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /**********************************************************************\n   *\n   * @enum:\n   *    BDF_PropertyType\n   *\n   * @description:\n   *    A list of BDF property types.\n   *\n   * @values:\n   *    BDF_PROPERTY_TYPE_NONE ::\n   *      Value~0 is used to indicate a missing property.\n   *\n   *    BDF_PROPERTY_TYPE_ATOM ::\n   *      Property is a string atom.\n   *\n   *    BDF_PROPERTY_TYPE_INTEGER ::\n   *      Property is a 32-bit signed integer.\n   *\n   *    BDF_PROPERTY_TYPE_CARDINAL ::\n   *      Property is a 32-bit unsigned integer.\n   */\n  typedef enum  BDF_PropertyType_\n  {\n    BDF_PROPERTY_TYPE_NONE     = 0,\n    BDF_PROPERTY_TYPE_ATOM     = 1,\n    BDF_PROPERTY_TYPE_INTEGER  = 2,\n    BDF_PROPERTY_TYPE_CARDINAL = 3\n\n  } BDF_PropertyType;\n\n\n  /**********************************************************************\n   *\n   * @type:\n   *    BDF_Property\n   *\n   * @description:\n   *    A handle to a @BDF_PropertyRec structure to model a given\n   *    BDF/PCF property.\n   */\n  typedef struct BDF_PropertyRec_*  BDF_Property;\n\n\n /**********************************************************************\n  *\n  * @struct:\n  *    BDF_PropertyRec\n  *\n  * @description:\n  *    This structure models a given BDF/PCF property.\n  *\n  * @fields:\n  *    type ::\n  *      The property type.\n  *\n  *    u.atom ::\n  *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.  May be\n  *      NULL, indicating an empty string.\n  *\n  *    u.integer ::\n  *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.\n  *\n  *    u.cardinal ::\n  *      An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.\n  */\n  typedef struct  BDF_PropertyRec_\n  {\n    BDF_PropertyType  type;\n    union {\n      const char*     atom;\n      FT_Int32        integer;\n      FT_UInt32       cardinal;\n\n    } u;\n\n  } BDF_PropertyRec;\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_BDF_Charset_ID\n  *\n  * @description:\n  *    Retrieve a BDF font character set identity, according to\n  *    the BDF specification.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  * @output:\n  *    acharset_encoding ::\n  *       Charset encoding, as a C~string, owned by the face.\n  *\n  *    acharset_registry ::\n  *       Charset registry, as a C~string, owned by the face.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   This function only works with BDF faces, returning an error otherwise.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_BDF_Charset_ID( FT_Face       face,\n                         const char*  *acharset_encoding,\n                         const char*  *acharset_registry );\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_BDF_Property\n  *\n  * @description:\n  *    Retrieve a BDF property from a BDF or PCF font file.\n  *\n  * @input:\n  *    face :: A handle to the input face.\n  *\n  *    name :: The property name.\n  *\n  * @output:\n  *    aproperty :: The property.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   This function works with BDF _and_ PCF fonts.  It returns an error\n  *   otherwise.  It also returns an error if the property is not in the\n  *   font.\n  *\n  *   A `property' is a either key-value pair within the STARTPROPERTIES\n  *   ... ENDPROPERTIES block of a BDF font or a key-value pair from the\n  *   `info->props' array within a `FontRec' structure of a PCF font.\n  *\n  *   Integer properties are always stored as `signed' within PCF fonts;\n  *   consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value\n  *   for BDF fonts only.\n  *\n  *   In case of error, `aproperty->type' is always set to\n  *   @BDF_PROPERTY_TYPE_NONE.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_BDF_Property( FT_Face           face,\n                       const char*       prop_name,\n                       BDF_PropertyRec  *aproperty );\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __FTBDF_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftbitmap.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbitmap.h                                                             */\n/*                                                                         */\n/*    FreeType utility functions for bitmaps (specification).              */\n/*                                                                         */\n/*  Copyright 2004-2006, 2008, 2013, 2014 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTBITMAP_H__\n#define __FTBITMAP_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    bitmap_handling                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Bitmap Handling                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Handling FT_Bitmap objects.                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains functions for handling @FT_Bitmap objects.   */\n  /*    Note that none of the functions changes the bitmap's `flow' (as    */\n  /*    indicated by the sign of the `pitch' field in `FT_Bitmap').        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_New                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initialize a pointer to an @FT_Bitmap structure.                   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    abitmap :: A pointer to the bitmap structure.                      */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Bitmap_New( FT_Bitmap  *abitmap );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_Copy                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Copy a bitmap into another one.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to a library object.                           */\n  /*                                                                       */\n  /*    source  :: A handle to the source bitmap.                          */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    target  :: A handle to the target bitmap.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Copy( FT_Library        library,\n                  const FT_Bitmap  *source,\n                  FT_Bitmap        *target);\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_Embolden                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Embolden a bitmap.  The new bitmap will be about `xStrength'       */\n  /*    pixels wider and `yStrength' pixels higher.  The left and bottom   */\n  /*    borders are kept unchanged.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library   :: A handle to a library object.                         */\n  /*                                                                       */\n  /*    xStrength :: How strong the glyph is emboldened horizontally.      */\n  /*                 Expressed in 26.6 pixel format.                       */\n  /*                                                                       */\n  /*    yStrength :: How strong the glyph is emboldened vertically.        */\n  /*                 Expressed in 26.6 pixel format.                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    bitmap    :: A handle to the target bitmap.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The current implementation restricts `xStrength' to be less than   */\n  /*    or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO.      */\n  /*                                                                       */\n  /*    If you want to embolden the bitmap owned by a @FT_GlyphSlotRec,    */\n  /*    you should call @FT_GlyphSlot_Own_Bitmap on the slot first.        */\n  /*                                                                       */\n  /*    Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format    */\n  /*    are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp).          */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Embolden( FT_Library  library,\n                      FT_Bitmap*  bitmap,\n                      FT_Pos      xStrength,\n                      FT_Pos      yStrength );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_Convert                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */\n  /*    to a bitmap object with depth 8bpp, making the number of used      */\n  /*    bytes line (a.k.a. the `pitch') a multiple of `alignment'.         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library   :: A handle to a library object.                         */\n  /*                                                                       */\n  /*    source    :: The source bitmap.                                    */\n  /*                                                                       */\n  /*    alignment :: The pitch of the bitmap is a multiple of this         */\n  /*                 parameter.  Common values are 1, 2, or 4.             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    target    :: The target bitmap.                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    It is possible to call @FT_Bitmap_Convert multiple times without   */\n  /*    calling @FT_Bitmap_Done (the memory is simply reallocated).        */\n  /*                                                                       */\n  /*    Use @FT_Bitmap_Done to finally remove the bitmap object.           */\n  /*                                                                       */\n  /*    The `library' argument is taken to have access to FreeType's       */\n  /*    memory handling functions.                                         */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Convert( FT_Library        library,\n                     const FT_Bitmap  *source,\n                     FT_Bitmap        *target,\n                     FT_Int            alignment );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_GlyphSlot_Own_Bitmap                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Make sure that a glyph slot owns `slot->bitmap'.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    slot :: The glyph slot.                                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function is to be used in combination with                    */\n  /*    @FT_Bitmap_Embolden.                                               */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot  slot );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_Done                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy a bitmap object created with @FT_Bitmap_New.               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to a library object.                           */\n  /*                                                                       */\n  /*    bitmap  :: The bitmap object to be freed.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The `library' argument is taken to have access to FreeType's       */\n  /*    memory handling functions.                                         */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Done( FT_Library  library,\n                  FT_Bitmap  *bitmap );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTBITMAP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftbzip2.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbzip2.h                                                              */\n/*                                                                         */\n/*    Bzip2-compressed stream support.                                     */\n/*                                                                         */\n/*  Copyright 2010 by                                                      */\n/*  Joel Klinghed.                                                         */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTBZIP2_H__\n#define __FTBZIP2_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    bzip2                                                              */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    BZIP2 Streams                                                      */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Using bzip2-compressed font files.                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of Bzip2-specific functions. */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n /************************************************************************\n  *\n  * @function:\n  *   FT_Stream_OpenBzip2\n  *\n  * @description:\n  *   Open a new stream to parse bzip2-compressed font files.  This is\n  *   mainly used to support the compressed `*.pcf.bz2' fonts that come\n  *   with XFree86.\n  *\n  * @input:\n  *   stream ::\n  *     The target embedding stream.\n  *\n  *   source ::\n  *     The source stream.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   The source stream must be opened _before_ calling this function.\n  *\n  *   Calling the internal function `FT_Stream_Close' on the new stream will\n  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream\n  *   objects will be released to the heap.\n  *\n  *   The stream implementation is very basic and resets the decompression\n  *   process each time seeking backwards is needed within the stream.\n  *\n  *   In certain builds of the library, bzip2 compression recognition is\n  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.\n  *   This means that if no font driver is capable of handling the raw\n  *   compressed file, the library will try to open a bzip2 compressed stream\n  *   from it and re-open the face with it.\n  *\n  *   This function may return `FT_Err_Unimplemented_Feature' if your build\n  *   of FreeType was not compiled with bzip2 support.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Stream_OpenBzip2( FT_Stream  stream,\n                       FT_Stream  source );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTBZIP2_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftcache.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcache.h                                                              */\n/*                                                                         */\n/*    FreeType Cache subsystem (specification).                            */\n/*                                                                         */\n/*  Copyright 1996-2008, 2010, 2013, 2014 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTCACHE_H__\n#define __FTCACHE_H__\n\n\n#include <ft2build.h>\n#include FT_GLYPH_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************\n   *\n   * <Section>\n   *    cache_subsystem\n   *\n   * <Title>\n   *    Cache Sub-System\n   *\n   * <Abstract>\n   *    How to cache face, size, and glyph data with FreeType~2.\n   *\n   * <Description>\n   *   This section describes the FreeType~2 cache sub-system, which is used\n   *   to limit the number of concurrently opened @FT_Face and @FT_Size\n   *   objects, as well as caching information like character maps and glyph\n   *   images while limiting their maximum memory usage.\n   *\n   *   Note that all types and functions begin with the `FTC_' prefix.\n   *\n   *   The cache is highly portable and thus doesn't know anything about the\n   *   fonts installed on your system, or how to access them.  This implies\n   *   the following scheme:\n   *\n   *   First, available or installed font faces are uniquely identified by\n   *   @FTC_FaceID values, provided to the cache by the client.  Note that\n   *   the cache only stores and compares these values, and doesn't try to\n   *   interpret them in any way.\n   *\n   *   Second, the cache calls, only when needed, a client-provided function\n   *   to convert an @FTC_FaceID into a new @FT_Face object.  The latter is\n   *   then completely managed by the cache, including its termination\n   *   through @FT_Done_Face.  To monitor termination of face objects, the\n   *   finalizer callback in the `generic' field of the @FT_Face object can\n   *   be used, which might also be used to store the @FTC_FaceID of the\n   *   face.\n   *\n   *   Clients are free to map face IDs to anything else.  The most simple\n   *   usage is to associate them to a (pathname,face_index) pair that is\n   *   used to call @FT_New_Face.  However, more complex schemes are also\n   *   possible.\n   *\n   *   Note that for the cache to work correctly, the face ID values must be\n   *   *persistent*, which means that the contents they point to should not\n   *   change at runtime, or that their value should not become invalid.\n   *\n   *   If this is unavoidable (e.g., when a font is uninstalled at runtime),\n   *   you should call @FTC_Manager_RemoveFaceID as soon as possible, to let\n   *   the cache get rid of any references to the old @FTC_FaceID it may\n   *   keep internally.  Failure to do so will lead to incorrect behaviour\n   *   or even crashes.\n   *\n   *   To use the cache, start with calling @FTC_Manager_New to create a new\n   *   @FTC_Manager object, which models a single cache instance.  You can\n   *   then look up @FT_Face and @FT_Size objects with\n   *   @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively.\n   *\n   *   If you want to use the charmap caching, call @FTC_CMapCache_New, then\n   *   later use @FTC_CMapCache_Lookup to perform the equivalent of\n   *   @FT_Get_Char_Index, only much faster.\n   *\n   *   If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then\n   *   later use @FTC_ImageCache_Lookup to retrieve the corresponding\n   *   @FT_Glyph objects from the cache.\n   *\n   *   If you need lots of small bitmaps, it is much more memory efficient\n   *   to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup.  This\n   *   returns @FTC_SBitRec structures, which are used to store small\n   *   bitmaps directly.  (A small bitmap is one whose metrics and\n   *   dimensions all fit into 8-bit integers).\n   *\n   *   We hope to also provide a kerning cache in the near future.\n   *\n   *\n   * <Order>\n   *   FTC_Manager\n   *   FTC_FaceID\n   *   FTC_Face_Requester\n   *\n   *   FTC_Manager_New\n   *   FTC_Manager_Reset\n   *   FTC_Manager_Done\n   *   FTC_Manager_LookupFace\n   *   FTC_Manager_LookupSize\n   *   FTC_Manager_RemoveFaceID\n   *\n   *   FTC_Node\n   *   FTC_Node_Unref\n   *\n   *   FTC_ImageCache\n   *   FTC_ImageCache_New\n   *   FTC_ImageCache_Lookup\n   *\n   *   FTC_SBit\n   *   FTC_SBitCache\n   *   FTC_SBitCache_New\n   *   FTC_SBitCache_Lookup\n   *\n   *   FTC_CMapCache\n   *   FTC_CMapCache_New\n   *   FTC_CMapCache_Lookup\n   *\n   *************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    BASIC TYPE DEFINITIONS                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @type: FTC_FaceID\n   *\n   * @description:\n   *   An opaque pointer type that is used to identity face objects.  The\n   *   contents of such objects is application-dependent.\n   *\n   *   These pointers are typically used to point to a user-defined\n   *   structure containing a font file path, and face index.\n   *\n   * @note:\n   *   Never use NULL as a valid @FTC_FaceID.\n   *\n   *   Face IDs are passed by the client to the cache manager that calls,\n   *   when needed, the @FTC_Face_Requester to translate them into new\n   *   @FT_Face objects.\n   *\n   *   If the content of a given face ID changes at runtime, or if the value\n   *   becomes invalid (e.g., when uninstalling a font), you should\n   *   immediately call @FTC_Manager_RemoveFaceID before any other cache\n   *   function.\n   *\n   *   Failure to do so will result in incorrect behaviour or even\n   *   memory leaks and crashes.\n   */\n  typedef FT_Pointer  FTC_FaceID;\n\n\n  /************************************************************************\n   *\n   * @functype:\n   *   FTC_Face_Requester\n   *\n   * @description:\n   *   A callback function provided by client applications.  It is used by\n   *   the cache manager to translate a given @FTC_FaceID into a new valid\n   *   @FT_Face object, on demand.\n   *\n   * <Input>\n   *   face_id ::\n   *     The face ID to resolve.\n   *\n   *   library ::\n   *     A handle to a FreeType library object.\n   *\n   *   req_data ::\n   *     Application-provided request data (see note below).\n   *\n   * <Output>\n   *   aface ::\n   *     A new @FT_Face handle.\n   *\n   * <Return>\n   *   FreeType error code.  0~means success.\n   *\n   * <Note>\n   *   The third parameter `req_data' is the same as the one passed by the\n   *   client when @FTC_Manager_New is called.\n   *\n   *   The face requester should not perform funny things on the returned\n   *   face object, like creating a new @FT_Size for it, or setting a\n   *   transformation through @FT_Set_Transform!\n   */\n  typedef FT_Error\n  (*FTC_Face_Requester)( FTC_FaceID  face_id,\n                         FT_Library  library,\n                         FT_Pointer  req_data,\n                         FT_Face*    aface );\n\n  /* */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      CACHE MANAGER OBJECT                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_Manager                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This object corresponds to one instance of the cache-subsystem.    */\n  /*    It is used to cache one or more @FT_Face objects, along with       */\n  /*    corresponding @FT_Size objects.                                    */\n  /*                                                                       */\n  /*    The manager intentionally limits the total number of opened        */\n  /*    @FT_Face and @FT_Size objects to control memory usage.  See the    */\n  /*    `max_faces' and `max_sizes' parameters of @FTC_Manager_New.        */\n  /*                                                                       */\n  /*    The manager is also used to cache `nodes' of various types while   */\n  /*    limiting their total memory usage.                                 */\n  /*                                                                       */\n  /*    All limitations are enforced by keeping lists of managed objects   */\n  /*    in most-recently-used order, and flushing old nodes to make room   */\n  /*    for new ones.                                                      */\n  /*                                                                       */\n  typedef struct FTC_ManagerRec_*  FTC_Manager;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_Node                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An opaque handle to a cache node object.  Each cache node is       */\n  /*    reference-counted.  A node with a count of~0 might be flushed      */\n  /*    out of a full cache whenever a lookup request is performed.        */\n  /*                                                                       */\n  /*    If you look up nodes, you have the ability to `acquire' them,      */\n  /*    i.e., to increment their reference count.  This will prevent the   */\n  /*    node from being flushed out of the cache until you explicitly      */\n  /*    `release' it (see @FTC_Node_Unref).                                */\n  /*                                                                       */\n  /*    See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup.         */\n  /*                                                                       */\n  typedef struct FTC_NodeRec_*  FTC_Node;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_New                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new cache manager.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library   :: The parent FreeType library handle to use.            */\n  /*                                                                       */\n  /*    max_faces :: Maximum number of opened @FT_Face objects managed by  */\n  /*                 this cache instance.  Use~0 for defaults.             */\n  /*                                                                       */\n  /*    max_sizes :: Maximum number of opened @FT_Size objects managed by  */\n  /*                 this cache instance.  Use~0 for defaults.             */\n  /*                                                                       */\n  /*    max_bytes :: Maximum number of bytes to use for cached data nodes. */\n  /*                 Use~0 for defaults.  Note that this value does not    */\n  /*                 account for managed @FT_Face and @FT_Size objects.    */\n  /*                                                                       */\n  /*    requester :: An application-provided callback used to translate    */\n  /*                 face IDs into real @FT_Face objects.                  */\n  /*                                                                       */\n  /*    req_data  :: A generic pointer that is passed to the requester     */\n  /*                 each time it is called (see @FTC_Face_Requester).     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    amanager  :: A handle to a new manager object.  0~in case of       */\n  /*                 failure.                                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_Manager_New( FT_Library          library,\n                   FT_UInt             max_faces,\n                   FT_UInt             max_sizes,\n                   FT_ULong            max_bytes,\n                   FTC_Face_Requester  requester,\n                   FT_Pointer          req_data,\n                   FTC_Manager        *amanager );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_Reset                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Empty a given cache manager.  This simply gets rid of all the      */\n  /*    currently cached @FT_Face and @FT_Size objects within the manager. */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    manager :: A handle to the manager.                                */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FTC_Manager_Reset( FTC_Manager  manager );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_Done                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy a given manager after emptying it.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: A handle to the target cache manager object.            */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FTC_Manager_Done( FTC_Manager  manager );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_LookupFace                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the @FT_Face object that corresponds to a given face ID   */\n  /*    through a cache manager.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: A handle to the cache manager.                          */\n  /*                                                                       */\n  /*    face_id :: The ID of the face object.                              */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface   :: A handle to the face object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned @FT_Face object is always owned by the manager.  You  */\n  /*    should never try to discard it yourself.                           */\n  /*                                                                       */\n  /*    The @FT_Face object doesn't necessarily have a current size object */\n  /*    (i.e., face->size can be~0).  If you need a specific `font size',  */\n  /*    use @FTC_Manager_LookupSize instead.                               */\n  /*                                                                       */\n  /*    Never change the face's transformation matrix (i.e., never call    */\n  /*    the @FT_Set_Transform function) on a returned face!  If you need   */\n  /*    to transform glyphs, do it yourself after glyph loading.           */\n  /*                                                                       */\n  /*    When you perform a lookup, out-of-memory errors are detected       */\n  /*    _within_ the lookup and force incremental flushes of the cache     */\n  /*    until enough memory is released for the lookup to succeed.         */\n  /*                                                                       */\n  /*    If a lookup fails with `FT_Err_Out_Of_Memory' the cache has        */\n  /*    already been completely flushed, and still no memory was available */\n  /*    for the operation.                                                 */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_Manager_LookupFace( FTC_Manager  manager,\n                          FTC_FaceID   face_id,\n                          FT_Face     *aface );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FTC_ScalerRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to describe a given character size in either      */\n  /*    pixels or points to the cache manager.  See                        */\n  /*    @FTC_Manager_LookupSize.                                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    face_id :: The source face ID.                                     */\n  /*                                                                       */\n  /*    width   :: The character width.                                    */\n  /*                                                                       */\n  /*    height  :: The character height.                                   */\n  /*                                                                       */\n  /*    pixel   :: A Boolean.  If 1, the `width' and `height' fields are   */\n  /*               interpreted as integer pixel character sizes.           */\n  /*               Otherwise, they are expressed as 1/64th of points.      */\n  /*                                                                       */\n  /*    x_res   :: Only used when `pixel' is value~0 to indicate the       */\n  /*               horizontal resolution in dpi.                           */\n  /*                                                                       */\n  /*    y_res   :: Only used when `pixel' is value~0 to indicate the       */\n  /*               vertical resolution in dpi.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This type is mainly used to retrieve @FT_Size objects through the  */\n  /*    cache manager.                                                     */\n  /*                                                                       */\n  typedef struct  FTC_ScalerRec_\n  {\n    FTC_FaceID  face_id;\n    FT_UInt     width;\n    FT_UInt     height;\n    FT_Int      pixel;\n    FT_UInt     x_res;\n    FT_UInt     y_res;\n\n  } FTC_ScalerRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FTC_Scaler                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an @FTC_ScalerRec structure.                           */\n  /*                                                                       */\n  typedef struct FTC_ScalerRec_*  FTC_Scaler;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_LookupSize                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the @FT_Size object that corresponds to a given           */\n  /*    @FTC_ScalerRec pointer through a cache manager.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: A handle to the cache manager.                          */\n  /*                                                                       */\n  /*    scaler  :: A scaler handle.                                        */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    asize   :: A handle to the size object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned @FT_Size object is always owned by the manager.  You  */\n  /*    should never try to discard it by yourself.                        */\n  /*                                                                       */\n  /*    You can access the parent @FT_Face object simply as `size->face'   */\n  /*    if you need it.  Note that this object is also owned by the        */\n  /*    manager.                                                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    When you perform a lookup, out-of-memory errors are detected       */\n  /*    _within_ the lookup and force incremental flushes of the cache     */\n  /*    until enough memory is released for the lookup to succeed.         */\n  /*                                                                       */\n  /*    If a lookup fails with `FT_Err_Out_Of_Memory' the cache has        */\n  /*    already been completely flushed, and still no memory is available  */\n  /*    for the operation.                                                 */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_Manager_LookupSize( FTC_Manager  manager,\n                          FTC_Scaler   scaler,\n                          FT_Size     *asize );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Node_Unref                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Decrement a cache node's internal reference count.  When the count */\n  /*    reaches 0, it is not destroyed but becomes eligible for subsequent */\n  /*    cache flushes.                                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    node    :: The cache node handle.                                  */\n  /*                                                                       */\n  /*    manager :: The cache manager handle.                               */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FTC_Node_Unref( FTC_Node     node,\n                  FTC_Manager  manager );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FTC_Manager_RemoveFaceID\n   *\n   * @description:\n   *   A special function used to indicate to the cache manager that\n   *   a given @FTC_FaceID is no longer valid, either because its\n   *   content changed, or because it was deallocated or uninstalled.\n   *\n   * @input:\n   *   manager ::\n   *     The cache manager handle.\n   *\n   *   face_id ::\n   *     The @FTC_FaceID to be removed.\n   *\n   * @note:\n   *   This function flushes all nodes from the cache corresponding to this\n   *   `face_id', with the exception of nodes with a non-null reference\n   *   count.\n   *\n   *   Such nodes are however modified internally so as to never appear\n   *   in later lookups with the same `face_id' value, and to be immediately\n   *   destroyed when released by all their users.\n   *\n   */\n  FT_EXPORT( void )\n  FTC_Manager_RemoveFaceID( FTC_Manager  manager,\n                            FTC_FaceID   face_id );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    cache_subsystem                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FTC_CMapCache\n   *\n   * @description:\n   *   An opaque handle used to model a charmap cache.  This cache is to\n   *   hold character codes -> glyph indices mappings.\n   *\n   */\n  typedef struct FTC_CMapCacheRec_*  FTC_CMapCache;\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FTC_CMapCache_New\n   *\n   * @description:\n   *   Create a new charmap cache.\n   *\n   * @input:\n   *   manager ::\n   *     A handle to the cache manager.\n   *\n   * @output:\n   *   acache ::\n   *     A new cache handle.  NULL in case of error.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Like all other caches, this one will be destroyed with the cache\n   *   manager.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FTC_CMapCache_New( FTC_Manager     manager,\n                     FTC_CMapCache  *acache );\n\n\n  /************************************************************************\n   *\n   * @function:\n   *   FTC_CMapCache_Lookup\n   *\n   * @description:\n   *   Translate a character code into a glyph index, using the charmap\n   *   cache.\n   *\n   * @input:\n   *   cache ::\n   *     A charmap cache handle.\n   *\n   *   face_id ::\n   *     The source face ID.\n   *\n   *   cmap_index ::\n   *     The index of the charmap in the source face.  Any negative value\n   *     means to use the cache @FT_Face's default charmap.\n   *\n   *   char_code ::\n   *     The character code (in the corresponding charmap).\n   *\n   * @return:\n   *    Glyph index.  0~means `no glyph'.\n   *\n   */\n  FT_EXPORT( FT_UInt )\n  FTC_CMapCache_Lookup( FTC_CMapCache  cache,\n                        FTC_FaceID     face_id,\n                        FT_Int         cmap_index,\n                        FT_UInt32      char_code );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    cache_subsystem                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       IMAGE CACHE OBJECT                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   FTC_ImageTypeRec\n   *\n   * @description:\n   *   A structure used to model the type of images in a glyph cache.\n   *\n   * @fields:\n   *   face_id ::\n   *     The face ID.\n   *\n   *   width ::\n   *     The width in pixels.\n   *\n   *   height ::\n   *     The height in pixels.\n   *\n   *   flags ::\n   *     The load flags, as in @FT_Load_Glyph.\n   *\n   */\n  typedef struct  FTC_ImageTypeRec_\n  {\n    FTC_FaceID  face_id;\n    FT_Int      width;\n    FT_Int      height;\n    FT_Int32    flags;\n\n  } FTC_ImageTypeRec;\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FTC_ImageType\n   *\n   * @description:\n   *   A handle to an @FTC_ImageTypeRec structure.\n   *\n   */\n  typedef struct FTC_ImageTypeRec_*  FTC_ImageType;\n\n\n  /* */\n\n\n#define FTC_IMAGE_TYPE_COMPARE( d1, d2 )      \\\n          ( (d1)->face_id == (d2)->face_id && \\\n            (d1)->width   == (d2)->width   && \\\n            (d1)->flags   == (d2)->flags   )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_ImageCache                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a glyph image cache object.  They are designed to      */\n  /*    hold many distinct glyph images while not exceeding a certain      */\n  /*    memory threshold.                                                  */\n  /*                                                                       */\n  typedef struct FTC_ImageCacheRec_*  FTC_ImageCache;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_ImageCache_New                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new glyph image cache.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: The parent manager for the image cache.                 */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    acache  :: A handle to the new glyph image cache object.           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_ImageCache_New( FTC_Manager      manager,\n                      FTC_ImageCache  *acache );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_ImageCache_Lookup                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve a given glyph image from a glyph image cache.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    cache  :: A handle to the source glyph image cache.                */\n  /*                                                                       */\n  /*    type   :: A pointer to a glyph image type descriptor.              */\n  /*                                                                       */\n  /*    gindex :: The glyph index to retrieve.                             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aglyph :: The corresponding @FT_Glyph object.  0~in case of        */\n  /*              failure.                                                 */\n  /*                                                                       */\n  /*    anode  :: Used to return the address of of the corresponding cache */\n  /*              node after incrementing its reference count (see note    */\n  /*              below).                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned glyph is owned and managed by the glyph image cache.  */\n  /*    Never try to transform or discard it manually!  You can however    */\n  /*    create a copy with @FT_Glyph_Copy and modify the new one.          */\n  /*                                                                       */\n  /*    If `anode' is _not_ NULL, it receives the address of the cache     */\n  /*    node containing the glyph image, after increasing its reference    */\n  /*    count.  This ensures that the node (as well as the @FT_Glyph) will */\n  /*    always be kept in the cache until you call @FTC_Node_Unref to      */\n  /*    `release' it.                                                      */\n  /*                                                                       */\n  /*    If `anode' is NULL, the cache node is left unchanged, which means  */\n  /*    that the @FT_Glyph could be flushed out of the cache on the next   */\n  /*    call to one of the caching sub-system APIs.  Don't assume that it  */\n  /*    is persistent!                                                     */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_ImageCache_Lookup( FTC_ImageCache  cache,\n                         FTC_ImageType   type,\n                         FT_UInt         gindex,\n                         FT_Glyph       *aglyph,\n                         FTC_Node       *anode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_ImageCache_LookupScaler                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec    */\n  /*    to specify the face ID and its size.                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    cache      :: A handle to the source glyph image cache.            */\n  /*                                                                       */\n  /*    scaler     :: A pointer to a scaler descriptor.                    */\n  /*                                                                       */\n  /*    load_flags :: The corresponding load flags.                        */\n  /*                                                                       */\n  /*    gindex     :: The glyph index to retrieve.                         */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aglyph     :: The corresponding @FT_Glyph object.  0~in case of    */\n  /*                  failure.                                             */\n  /*                                                                       */\n  /*    anode      :: Used to return the address of of the corresponding   */\n  /*                  cache node after incrementing its reference count    */\n  /*                  (see note below).                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned glyph is owned and managed by the glyph image cache.  */\n  /*    Never try to transform or discard it manually!  You can however    */\n  /*    create a copy with @FT_Glyph_Copy and modify the new one.          */\n  /*                                                                       */\n  /*    If `anode' is _not_ NULL, it receives the address of the cache     */\n  /*    node containing the glyph image, after increasing its reference    */\n  /*    count.  This ensures that the node (as well as the @FT_Glyph) will */\n  /*    always be kept in the cache until you call @FTC_Node_Unref to      */\n  /*    `release' it.                                                      */\n  /*                                                                       */\n  /*    If `anode' is NULL, the cache node is left unchanged, which means  */\n  /*    that the @FT_Glyph could be flushed out of the cache on the next   */\n  /*    call to one of the caching sub-system APIs.  Don't assume that it  */\n  /*    is persistent!                                                     */\n  /*                                                                       */\n  /*    Calls to @FT_Set_Char_Size and friends have no effect on cached    */\n  /*    glyphs; you should always use the FreeType cache API instead.      */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_ImageCache_LookupScaler( FTC_ImageCache  cache,\n                               FTC_Scaler      scaler,\n                               FT_ULong        load_flags,\n                               FT_UInt         gindex,\n                               FT_Glyph       *aglyph,\n                               FTC_Node       *anode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_SBit                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a small bitmap descriptor.  See the @FTC_SBitRec       */\n  /*    structure for details.                                             */\n  /*                                                                       */\n  typedef struct FTC_SBitRec_*  FTC_SBit;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FTC_SBitRec                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very compact structure used to describe a small glyph bitmap.    */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    width     :: The bitmap width in pixels.                           */\n  /*                                                                       */\n  /*    height    :: The bitmap height in pixels.                          */\n  /*                                                                       */\n  /*    left      :: The horizontal distance from the pen position to the  */\n  /*                 left bitmap border (a.k.a. `left side bearing', or    */\n  /*                 `lsb').                                               */\n  /*                                                                       */\n  /*    top       :: The vertical distance from the pen position (on the   */\n  /*                 baseline) to the upper bitmap border (a.k.a. `top     */\n  /*                 side bearing').  The distance is positive for upwards */\n  /*                 y~coordinates.                                        */\n  /*                                                                       */\n  /*    format    :: The format of the glyph bitmap (monochrome or gray).  */\n  /*                                                                       */\n  /*    max_grays :: Maximum gray level value (in the range 1 to~255).     */\n  /*                                                                       */\n  /*    pitch     :: The number of bytes per bitmap line.  May be positive */\n  /*                 or negative.                                          */\n  /*                                                                       */\n  /*    xadvance  :: The horizontal advance width in pixels.               */\n  /*                                                                       */\n  /*    yadvance  :: The vertical advance height in pixels.                */\n  /*                                                                       */\n  /*    buffer    :: A pointer to the bitmap pixels.                       */\n  /*                                                                       */\n  typedef struct  FTC_SBitRec_\n  {\n    FT_Byte   width;\n    FT_Byte   height;\n    FT_Char   left;\n    FT_Char   top;\n\n    FT_Byte   format;\n    FT_Byte   max_grays;\n    FT_Short  pitch;\n    FT_Char   xadvance;\n    FT_Char   yadvance;\n\n    FT_Byte*  buffer;\n\n  } FTC_SBitRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_SBitCache                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a small bitmap cache.  These are special cache objects */\n  /*    used to store small glyph bitmaps (and anti-aliased pixmaps) in a  */\n  /*    much more efficient way than the traditional glyph image cache     */\n  /*    implemented by @FTC_ImageCache.                                    */\n  /*                                                                       */\n  typedef struct FTC_SBitCacheRec_*  FTC_SBitCache;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_SBitCache_New                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new cache to store small glyph bitmaps.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: A handle to the source cache manager.                   */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    acache  :: A handle to the new sbit cache.  NULL in case of error. */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_SBitCache_New( FTC_Manager     manager,\n                     FTC_SBitCache  *acache );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_SBitCache_Lookup                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Look up a given small glyph bitmap in a given sbit cache and       */\n  /*    `lock' it to prevent its flushing from the cache until needed.     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    cache  :: A handle to the source sbit cache.                       */\n  /*                                                                       */\n  /*    type   :: A pointer to the glyph image type descriptor.            */\n  /*                                                                       */\n  /*    gindex :: The glyph index.                                         */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    sbit   :: A handle to a small bitmap descriptor.                   */\n  /*                                                                       */\n  /*    anode  :: Used to return the address of of the corresponding cache */\n  /*              node after incrementing its reference count (see note    */\n  /*              below).                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The small bitmap descriptor and its bit buffer are owned by the    */\n  /*    cache and should never be freed by the application.  They might    */\n  /*    as well disappear from memory on the next cache lookup, so don't   */\n  /*    treat them as persistent data.                                     */\n  /*                                                                       */\n  /*    The descriptor's `buffer' field is set to~0 to indicate a missing  */\n  /*    glyph bitmap.                                                      */\n  /*                                                                       */\n  /*    If `anode' is _not_ NULL, it receives the address of the cache     */\n  /*    node containing the bitmap, after increasing its reference count.  */\n  /*    This ensures that the node (as well as the image) will always be   */\n  /*    kept in the cache until you call @FTC_Node_Unref to `release' it.  */\n  /*                                                                       */\n  /*    If `anode' is NULL, the cache node is left unchanged, which means  */\n  /*    that the bitmap could be flushed out of the cache on the next      */\n  /*    call to one of the caching sub-system APIs.  Don't assume that it  */\n  /*    is persistent!                                                     */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_SBitCache_Lookup( FTC_SBitCache    cache,\n                        FTC_ImageType    type,\n                        FT_UInt          gindex,\n                        FTC_SBit        *sbit,\n                        FTC_Node        *anode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_SBitCache_LookupScaler                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec     */\n  /*    to specify the face ID and its size.                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    cache      :: A handle to the source sbit cache.                   */\n  /*                                                                       */\n  /*    scaler     :: A pointer to the scaler descriptor.                  */\n  /*                                                                       */\n  /*    load_flags :: The corresponding load flags.                        */\n  /*                                                                       */\n  /*    gindex     :: The glyph index.                                     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    sbit       :: A handle to a small bitmap descriptor.               */\n  /*                                                                       */\n  /*    anode      :: Used to return the address of of the corresponding   */\n  /*                  cache node after incrementing its reference count    */\n  /*                  (see note below).                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The small bitmap descriptor and its bit buffer are owned by the    */\n  /*    cache and should never be freed by the application.  They might    */\n  /*    as well disappear from memory on the next cache lookup, so don't   */\n  /*    treat them as persistent data.                                     */\n  /*                                                                       */\n  /*    The descriptor's `buffer' field is set to~0 to indicate a missing  */\n  /*    glyph bitmap.                                                      */\n  /*                                                                       */\n  /*    If `anode' is _not_ NULL, it receives the address of the cache     */\n  /*    node containing the bitmap, after increasing its reference count.  */\n  /*    This ensures that the node (as well as the image) will always be   */\n  /*    kept in the cache until you call @FTC_Node_Unref to `release' it.  */\n  /*                                                                       */\n  /*    If `anode' is NULL, the cache node is left unchanged, which means  */\n  /*    that the bitmap could be flushed out of the cache on the next      */\n  /*    call to one of the caching sub-system APIs.  Don't assume that it  */\n  /*    is persistent!                                                     */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_SBitCache_LookupScaler( FTC_SBitCache  cache,\n                              FTC_Scaler     scaler,\n                              FT_ULong       load_flags,\n                              FT_UInt        gindex,\n                              FTC_SBit      *sbit,\n                              FTC_Node      *anode );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTCACHE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftcffdrv.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcffdrv.h                                                             */\n/*                                                                         */\n/*    FreeType API for controlling the CFF driver (specification only).    */\n/*                                                                         */\n/*  Copyright 2013, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTCFFDRV_H__\n#define __FTCFFDRV_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   cff_driver\n   *\n   * @title:\n   *   The CFF driver\n   *\n   * @abstract:\n   *   Controlling the CFF driver module.\n   *\n   * @description:\n   *   While FreeType's CFF driver doesn't expose API functions by itself,\n   *   it is possible to control its behaviour with @FT_Property_Set and\n   *   @FT_Property_Get.  The list below gives the available properties\n   *   together with the necessary macros and structures.\n   *\n   *   The CFF driver's module name is `cff'.\n   *\n   *   *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine*\n   *\n   *   The rasterizer is positioning horizontal features (e.g., ascender\n   *   height & x-height, or crossbars) on the pixel grid and minimizing the\n   *   amount of antialiasing applied to them, while placing vertical\n   *   features (vertical stems) on the pixel grid without hinting, thus\n   *   representing the stem position and weight accurately.  Sometimes the\n   *   vertical stems may be only partially black.  In this context,\n   *   `antialiasing' means that stems are not positioned exactly on pixel\n   *   borders, causing a fuzzy appearance.\n   *\n   *   There are two principles behind this approach.\n   *\n   *   1) No hinting in the horizontal direction: Unlike `superhinted'\n   *   TrueType, which changes glyph widths to accommodate regular\n   *   inter-glyph spacing, Adobe's approach is `faithful to the design' in\n   *   representing both the glyph width and the inter-glyph spacing\n   *   designed for the font.  This makes the screen display as close as it\n   *   can be to the result one would get with infinite resolution, while\n   *   preserving what is considered the key characteristics of each glyph.\n   *   Note that the distances between unhinted and grid-fitted positions at\n   *   small sizes are comparable to kerning values and thus would be\n   *   noticeable (and distracting) while reading if hinting were applied.\n   *\n   *   One of the reasons to not hint horizontally is antialiasing for LCD\n   *   screens: The pixel geometry of modern displays supplies three\n   *   vertical sub-pixels as the eye moves horizontally across each visible\n   *   pixel.  On devices where we can be certain this characteristic is\n   *   present a rasterizer can take advantage of the sub-pixels to add\n   *   increments of weight.  In Western writing systems this turns out to\n   *   be the more critical direction anyway; the weights and spacing of\n   *   vertical stems (see above) are central to Armenian, Cyrillic, Greek,\n   *   and Latin type designs.  Even when the rasterizer uses greyscale\n   *   antialiasing instead of color (a necessary compromise when one\n   *   doesn't know the screen characteristics), the unhinted vertical\n   *   features preserve the design's weight and spacing much better than\n   *   aliased type would.\n   *\n   *   2) Aligment in the vertical direction: Weights and spacing along the\n   *   y~axis are less critical; what is much more important is the visual\n   *   alignment of related features (like cap-height and x-height).  The\n   *   sense of alignment for these is enhanced by the sharpness of grid-fit\n   *   edges, while the cruder vertical resolution (full pixels instead of\n   *   1/3 pixels) is less of a problem.\n   *\n   *   On the technical side, horizontal alignment zones for ascender,\n   *   x-height, and other important height values (traditionally called\n   *   `blue zones') as defined in the font are positioned independently,\n   *   each being rounded to the nearest pixel edge, taking care of\n   *   overshoot suppression at small sizes, stem darkening, and scaling.\n   *\n   *   Hstems (this is, hint values defined in the font to help align\n   *   horizontal features) that fall within a blue zone are said to be\n   *   `captured' and are aligned to that zone.  Uncaptured stems are moved\n   *   in one of four ways, top edge up or down, bottom edge up or down.\n   *   Unless there are conflicting hstems, the smallest movement is taken\n   *   to minimize distortion.\n   *\n   * @order:\n   *   hinting-engine\n   *   no-stem-darkening\n   *   darkening-parameters\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   hinting-engine\n   *\n   * @description:\n   *   Thanks to Adobe, which contributed a new hinting (and parsing)\n   *   engine, an application can select between `freetype' and `adobe' if\n   *   compiled with CFF_CONFIG_OPTION_OLD_ENGINE.  If this configuration\n   *   macro isn't defined, `hinting-engine' does nothing.\n   *\n   *   The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is\n   *   defined, and `adobe' otherwise.\n   *\n   *   The following example code demonstrates how to select Adobe's hinting\n   *   engine (omitting the error handling).\n   *\n   *   {\n   *     FT_Library  library;\n   *     FT_UInt     hinting_engine = FT_CFF_HINTING_ADOBE;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"cff\",\n   *                               \"hinting-engine\", &hinting_engine );\n   *   }\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_CFF_HINTING_XXX\n   *\n   * @description:\n   *   A list of constants used for the @hinting-engine property to select\n   *   the hinting engine for CFF fonts.\n   *\n   * @values:\n   *   FT_CFF_HINTING_FREETYPE ::\n   *     Use the old FreeType hinting engine.\n   *\n   *   FT_CFF_HINTING_ADOBE ::\n   *     Use the hinting engine contributed by Adobe.\n   *\n   */\n#define FT_CFF_HINTING_FREETYPE  0\n#define FT_CFF_HINTING_ADOBE     1\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   no-stem-darkening\n   *\n   * @description:\n   *   By default, the Adobe CFF engine darkens stems at smaller sizes,\n   *   regardless of hinting, to enhance contrast.  This feature requires\n   *   a rendering system with proper gamma correction.  Setting this\n   *   property, stem darkening gets switched off.\n   *\n   *   Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.\n   *\n   *   {\n   *     FT_Library  library;\n   *     FT_Bool     no_stem_darkening = TRUE;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"cff\",\n   *                               \"no-stem-darkening\", &no_stem_darkening );\n   *   }\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   darkening-parameters\n   *\n   * @description:\n   *   By default, the Adobe CFF engine darkens stems as follows (if the\n   *   `no-stem-darkening' property isn't set):\n   *\n   *   {\n   *     stem width <= 0.5px:   darkening amount = 0.4px\n   *     stem width  = 1px:     darkening amount = 0.275px\n   *     stem width  = 1.667px: darkening amount = 0.275px\n   *     stem width >= 2.333px: darkening amount = 0px\n   *   }\n   *\n   *   and piecewise linear in-between.  At configuration time, these four\n   *   control points can be set with the macro\n   *   `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'.  At runtime, the control\n   *   points can be changed using the `darkening-parameters' property, as\n   *   the following example demonstrates.\n   *\n   *   {\n   *     FT_Library  library;\n   *     FT_Int      darken_params[8] = {  500, 300,   // x1, y1\n   *                                      1000, 200,   // x2, y2\n   *                                      1500, 100,   // x3, y3\n   *                                      2000,   0 }; // x4, y4\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"cff\",\n   *                               \"darkening-parameters\", darken_params );\n   *   }\n   *\n   *   The x~values give the stem width, and the y~values the darkening\n   *   amount.  The unit is 1000th of pixels.  All coordinate values must be\n   *   positive; the x~values must be monotonically increasing; the\n   *   y~values must be monotonically decreasing and smaller than or\n   *   equal to 500 (corresponding to half a pixel); the slope of each\n   *   linear piece must be shallower than -1 (e.g., -.4).\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   */\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __FTCFFDRV_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftchapters.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/* This file defines the structure of the FreeType reference.              */\n/* It is used by the python script that generates the HTML files.          */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    general_remarks                                                      */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    General Remarks                                                      */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    header_inclusion                                                     */\n/*    user_allocation                                                      */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    core_api                                                             */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    Core API                                                             */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    version                                                              */\n/*    basic_types                                                          */\n/*    base_interface                                                       */\n/*    glyph_variants                                                       */\n/*    glyph_management                                                     */\n/*    mac_specific                                                         */\n/*    sizes_management                                                     */\n/*    header_file_macros                                                   */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    format_specific                                                      */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    Format-Specific API                                                  */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    multiple_masters                                                     */\n/*    truetype_tables                                                      */\n/*    type1_tables                                                         */\n/*    sfnt_names                                                           */\n/*    bdf_fonts                                                            */\n/*    cid_fonts                                                            */\n/*    pfr_fonts                                                            */\n/*    winfnt_fonts                                                         */\n/*    font_formats                                                         */\n/*    gasp_table                                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    module_specific                                                      */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    Controlling FreeType Modules                                         */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    auto_hinter                                                          */\n/*    cff_driver                                                           */\n/*    tt_driver                                                            */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    cache_subsystem                                                      */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    Cache Sub-System                                                     */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    cache_subsystem                                                      */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    support_api                                                          */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    Support API                                                          */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    computations                                                         */\n/*    list_processing                                                      */\n/*    outline_processing                                                   */\n/*    quick_advance                                                        */\n/*    bitmap_handling                                                      */\n/*    raster                                                               */\n/*    glyph_stroker                                                        */\n/*    system_interface                                                     */\n/*    module_management                                                    */\n/*    gzip                                                                 */\n/*    lzw                                                                  */\n/*    bzip2                                                                */\n/*    lcd_filtering                                                        */\n/*                                                                         */\n/***************************************************************************/\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftcid.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcid.h                                                                */\n/*                                                                         */\n/*    FreeType API for accessing CID font information (specification).     */\n/*                                                                         */\n/*  Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal.                  */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTCID_H__\n#define __FTCID_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    cid_fonts                                                          */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    CID Fonts                                                          */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    CID-keyed font specific API.                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of CID-keyed font specific   */\n  /*    functions.                                                         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Get_CID_Registry_Ordering_Supplement\n   *\n   * @description:\n   *    Retrieve the Registry/Ordering/Supplement triple (also known as the\n   *    \"R/O/S\") from a CID-keyed font.\n   *\n   * @input:\n   *    face ::\n   *       A handle to the input face.\n   *\n   * @output:\n   *    registry ::\n   *       The registry, as a C~string, owned by the face.\n   *\n   *    ordering ::\n   *       The ordering, as a C~string, owned by the face.\n   *\n   *    supplement ::\n   *       The supplement.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function only works with CID faces, returning an error\n   *    otherwise.\n   *\n   * @since:\n   *    2.3.6\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_CID_Registry_Ordering_Supplement( FT_Face       face,\n                                           const char*  *registry,\n                                           const char*  *ordering,\n                                           FT_Int       *supplement);\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Get_CID_Is_Internally_CID_Keyed\n   *\n   * @description:\n   *    Retrieve the type of the input face, CID keyed or not.  In\n   *    constrast to the @FT_IS_CID_KEYED macro this function returns\n   *    successfully also for CID-keyed fonts in an SNFT wrapper.\n   *\n   * @input:\n   *    face ::\n   *       A handle to the input face.\n   *\n   * @output:\n   *    is_cid ::\n   *       The type of the face as an @FT_Bool.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function only works with CID faces and OpenType fonts,\n   *    returning an error otherwise.\n   *\n   * @since:\n   *    2.3.9\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_CID_Is_Internally_CID_Keyed( FT_Face   face,\n                                      FT_Bool  *is_cid );\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Get_CID_From_Glyph_Index\n   *\n   * @description:\n   *    Retrieve the CID of the input glyph index.\n   *\n   * @input:\n   *    face ::\n   *       A handle to the input face.\n   *\n   *    glyph_index ::\n   *       The input glyph index.\n   *\n   * @output:\n   *    cid ::\n   *       The CID as an @FT_UInt.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function only works with CID faces and OpenType fonts,\n   *    returning an error otherwise.\n   *\n   * @since:\n   *    2.3.9\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_CID_From_Glyph_Index( FT_Face   face,\n                               FT_UInt   glyph_index,\n                               FT_UInt  *cid );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTCID_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/fterrdef.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fterrdef.h                                                             */\n/*                                                                         */\n/*    FreeType error codes (specification).                                */\n/*                                                                         */\n/*  Copyright 2002, 2004, 2006, 2007, 2010-2013 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                LIST OF ERROR CODES/MESSAGES             *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n  /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */\n  /* including this file.                                           */\n\n\n  /* generic errors */\n\n  FT_NOERRORDEF_( Ok,                                        0x00,\n                  \"no error\" )\n\n  FT_ERRORDEF_( Cannot_Open_Resource,                        0x01,\n                \"cannot open resource\" )\n  FT_ERRORDEF_( Unknown_File_Format,                         0x02,\n                \"unknown file format\" )\n  FT_ERRORDEF_( Invalid_File_Format,                         0x03,\n                \"broken file\" )\n  FT_ERRORDEF_( Invalid_Version,                             0x04,\n                \"invalid FreeType version\" )\n  FT_ERRORDEF_( Lower_Module_Version,                        0x05,\n                \"module version is too low\" )\n  FT_ERRORDEF_( Invalid_Argument,                            0x06,\n                \"invalid argument\" )\n  FT_ERRORDEF_( Unimplemented_Feature,                       0x07,\n                \"unimplemented feature\" )\n  FT_ERRORDEF_( Invalid_Table,                               0x08,\n                \"broken table\" )\n  FT_ERRORDEF_( Invalid_Offset,                              0x09,\n                \"broken offset within table\" )\n  FT_ERRORDEF_( Array_Too_Large,                             0x0A,\n                \"array allocation size too large\" )\n  FT_ERRORDEF_( Missing_Module,                              0x0B,\n                \"missing module\" )\n  FT_ERRORDEF_( Missing_Property,                            0x0C,\n                \"missing property\" )\n\n  /* glyph/character errors */\n\n  FT_ERRORDEF_( Invalid_Glyph_Index,                         0x10,\n                \"invalid glyph index\" )\n  FT_ERRORDEF_( Invalid_Character_Code,                      0x11,\n                \"invalid character code\" )\n  FT_ERRORDEF_( Invalid_Glyph_Format,                        0x12,\n                \"unsupported glyph image format\" )\n  FT_ERRORDEF_( Cannot_Render_Glyph,                         0x13,\n                \"cannot render this glyph format\" )\n  FT_ERRORDEF_( Invalid_Outline,                             0x14,\n                \"invalid outline\" )\n  FT_ERRORDEF_( Invalid_Composite,                           0x15,\n                \"invalid composite glyph\" )\n  FT_ERRORDEF_( Too_Many_Hints,                              0x16,\n                \"too many hints\" )\n  FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17,\n                \"invalid pixel size\" )\n\n  /* handle errors */\n\n  FT_ERRORDEF_( Invalid_Handle,                              0x20,\n                \"invalid object handle\" )\n  FT_ERRORDEF_( Invalid_Library_Handle,                      0x21,\n                \"invalid library handle\" )\n  FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22,\n                \"invalid module handle\" )\n  FT_ERRORDEF_( Invalid_Face_Handle,                         0x23,\n                \"invalid face handle\" )\n  FT_ERRORDEF_( Invalid_Size_Handle,                         0x24,\n                \"invalid size handle\" )\n  FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25,\n                \"invalid glyph slot handle\" )\n  FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26,\n                \"invalid charmap handle\" )\n  FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27,\n                \"invalid cache manager handle\" )\n  FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28,\n                \"invalid stream handle\" )\n\n  /* driver errors */\n\n  FT_ERRORDEF_( Too_Many_Drivers,                            0x30,\n                \"too many modules\" )\n  FT_ERRORDEF_( Too_Many_Extensions,                         0x31,\n                \"too many extensions\" )\n\n  /* memory errors */\n\n  FT_ERRORDEF_( Out_Of_Memory,                               0x40,\n                \"out of memory\" )\n  FT_ERRORDEF_( Unlisted_Object,                             0x41,\n                \"unlisted object\" )\n\n  /* stream errors */\n\n  FT_ERRORDEF_( Cannot_Open_Stream,                          0x51,\n                \"cannot open stream\" )\n  FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52,\n                \"invalid stream seek\" )\n  FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53,\n                \"invalid stream skip\" )\n  FT_ERRORDEF_( Invalid_Stream_Read,                         0x54,\n                \"invalid stream read\" )\n  FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55,\n                \"invalid stream operation\" )\n  FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56,\n                \"invalid frame operation\" )\n  FT_ERRORDEF_( Nested_Frame_Access,                         0x57,\n                \"nested frame access\" )\n  FT_ERRORDEF_( Invalid_Frame_Read,                          0x58,\n                \"invalid frame read\" )\n\n  /* raster errors */\n\n  FT_ERRORDEF_( Raster_Uninitialized,                        0x60,\n                \"raster uninitialized\" )\n  FT_ERRORDEF_( Raster_Corrupted,                            0x61,\n                \"raster corrupted\" )\n  FT_ERRORDEF_( Raster_Overflow,                             0x62,\n                \"raster overflow\" )\n  FT_ERRORDEF_( Raster_Negative_Height,                      0x63,\n                \"negative height while rastering\" )\n\n  /* cache errors */\n\n  FT_ERRORDEF_( Too_Many_Caches,                             0x70,\n                \"too many registered caches\" )\n\n  /* TrueType and SFNT errors */\n\n  FT_ERRORDEF_( Invalid_Opcode,                              0x80,\n                \"invalid opcode\" )\n  FT_ERRORDEF_( Too_Few_Arguments,                           0x81,\n                \"too few arguments\" )\n  FT_ERRORDEF_( Stack_Overflow,                              0x82,\n                \"stack overflow\" )\n  FT_ERRORDEF_( Code_Overflow,                               0x83,\n                \"code overflow\" )\n  FT_ERRORDEF_( Bad_Argument,                                0x84,\n                \"bad argument\" )\n  FT_ERRORDEF_( Divide_By_Zero,                              0x85,\n                \"division by zero\" )\n  FT_ERRORDEF_( Invalid_Reference,                           0x86,\n                \"invalid reference\" )\n  FT_ERRORDEF_( Debug_OpCode,                                0x87,\n                \"found debug opcode\" )\n  FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88,\n                \"found ENDF opcode in execution stream\" )\n  FT_ERRORDEF_( Nested_DEFS,                                 0x89,\n                \"nested DEFS\" )\n  FT_ERRORDEF_( Invalid_CodeRange,                           0x8A,\n                \"invalid code range\" )\n  FT_ERRORDEF_( Execution_Too_Long,                          0x8B,\n                \"execution context too long\" )\n  FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C,\n                \"too many function definitions\" )\n  FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D,\n                \"too many instruction definitions\" )\n  FT_ERRORDEF_( Table_Missing,                               0x8E,\n                \"SFNT font table missing\" )\n  FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F,\n                \"horizontal header (hhea) table missing\" )\n  FT_ERRORDEF_( Locations_Missing,                           0x90,\n                \"locations (loca) table missing\" )\n  FT_ERRORDEF_( Name_Table_Missing,                          0x91,\n                \"name table missing\" )\n  FT_ERRORDEF_( CMap_Table_Missing,                          0x92,\n                \"character map (cmap) table missing\" )\n  FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93,\n                \"horizontal metrics (hmtx) table missing\" )\n  FT_ERRORDEF_( Post_Table_Missing,                          0x94,\n                \"PostScript (post) table missing\" )\n  FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95,\n                \"invalid horizontal metrics\" )\n  FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96,\n                \"invalid character map (cmap) format\" )\n  FT_ERRORDEF_( Invalid_PPem,                                0x97,\n                \"invalid ppem value\" )\n  FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98,\n                \"invalid vertical metrics\" )\n  FT_ERRORDEF_( Could_Not_Find_Context,                      0x99,\n                \"could not find context\" )\n  FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A,\n                \"invalid PostScript (post) table format\" )\n  FT_ERRORDEF_( Invalid_Post_Table,                          0x9B,\n                \"invalid PostScript (post) table\" )\n\n  /* CFF, CID, and Type 1 errors */\n\n  FT_ERRORDEF_( Syntax_Error,                                0xA0,\n                \"opcode syntax error\" )\n  FT_ERRORDEF_( Stack_Underflow,                             0xA1,\n                \"argument stack underflow\" )\n  FT_ERRORDEF_( Ignore,                                      0xA2,\n                \"ignore\" )\n  FT_ERRORDEF_( No_Unicode_Glyph_Name,                       0xA3,\n                \"no Unicode glyph name found\" )\n  FT_ERRORDEF_( Glyph_Too_Big,                               0xA4,\n                \"glyph to big for hinting\" )\n\n  /* BDF errors */\n\n  FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0,\n                \"`STARTFONT' field missing\" )\n  FT_ERRORDEF_( Missing_Font_Field,                          0xB1,\n                \"`FONT' field missing\" )\n  FT_ERRORDEF_( Missing_Size_Field,                          0xB2,\n                \"`SIZE' field missing\" )\n  FT_ERRORDEF_( Missing_Fontboundingbox_Field,               0xB3,\n                \"`FONTBOUNDINGBOX' field missing\" )\n  FT_ERRORDEF_( Missing_Chars_Field,                         0xB4,\n                \"`CHARS' field missing\" )\n  FT_ERRORDEF_( Missing_Startchar_Field,                     0xB5,\n                \"`STARTCHAR' field missing\" )\n  FT_ERRORDEF_( Missing_Encoding_Field,                      0xB6,\n                \"`ENCODING' field missing\" )\n  FT_ERRORDEF_( Missing_Bbx_Field,                           0xB7,\n                \"`BBX' field missing\" )\n  FT_ERRORDEF_( Bbx_Too_Big,                                 0xB8,\n                \"`BBX' too big\" )\n  FT_ERRORDEF_( Corrupted_Font_Header,                       0xB9,\n                \"Font header corrupted or missing fields\" )\n  FT_ERRORDEF_( Corrupted_Font_Glyphs,                       0xBA,\n                \"Font glyphs corrupted or missing fields\" )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/fterrors.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fterrors.h                                                             */\n/*                                                                         */\n/*    FreeType error code handling (specification).                        */\n/*                                                                         */\n/*  Copyright 1996-2002, 2004, 2007, 2013 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This special header file is used to define the handling of FT2        */\n  /* enumeration constants.  It can also be used to generate error message */\n  /* strings with a small macro trick explained below.                     */\n  /*                                                                       */\n  /* I - Error Formats                                                     */\n  /* -----------------                                                     */\n  /*                                                                       */\n  /*   The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be   */\n  /*   defined in ftoption.h in order to make the higher byte indicate     */\n  /*   the module where the error has happened (this is not compatible     */\n  /*   with standard builds of FreeType 2).  See the file `ftmoderr.h' for */\n  /*   more details.                                                       */\n  /*                                                                       */\n  /*                                                                       */\n  /* II - Error Message strings                                            */\n  /* --------------------------                                            */\n  /*                                                                       */\n  /*   The error definitions below are made through special macros that    */\n  /*   allow client applications to build a table of error message strings */\n  /*   if they need it.  The strings are not included in a normal build of */\n  /*   FreeType 2 to save space (most client applications do not use       */\n  /*   them).                                                              */\n  /*                                                                       */\n  /*   To do so, you have to define the following macros before including  */\n  /*   this file:                                                          */\n  /*                                                                       */\n  /*   FT_ERROR_START_LIST ::                                              */\n  /*     This macro is called before anything else to define the start of  */\n  /*     the error list.  It is followed by several FT_ERROR_DEF calls     */\n  /*     (see below).                                                      */\n  /*                                                                       */\n  /*   FT_ERROR_DEF( e, v, s ) ::                                          */\n  /*     This macro is called to define one single error.                  */\n  /*     `e' is the error code identifier (e.g. FT_Err_Invalid_Argument).  */\n  /*     `v' is the error numerical value.                                 */\n  /*     `s' is the corresponding error string.                            */\n  /*                                                                       */\n  /*   FT_ERROR_END_LIST ::                                                */\n  /*     This macro ends the list.                                         */\n  /*                                                                       */\n  /*   Additionally, you have to undefine __FTERRORS_H__ before #including */\n  /*   this file.                                                          */\n  /*                                                                       */\n  /*   Here is a simple example:                                           */\n  /*                                                                       */\n  /*     {                                                                 */\n  /*       #undef __FTERRORS_H__                                           */\n  /*       #define FT_ERRORDEF( e, v, s )  { e, s },                       */\n  /*       #define FT_ERROR_START_LIST     {                               */\n  /*       #define FT_ERROR_END_LIST       { 0, 0 } };                     */\n  /*                                                                       */\n  /*       const struct                                                    */\n  /*       {                                                               */\n  /*         int          err_code;                                        */\n  /*         const char*  err_msg;                                         */\n  /*       } ft_errors[] =                                                 */\n  /*                                                                       */\n  /*       #include FT_ERRORS_H                                            */\n  /*     }                                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTERRORS_H__\n#define __FTERRORS_H__\n\n\n  /* include module base error codes */\n#include FT_MODULE_ERRORS_H\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                       SETUP MACROS                      *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#undef  FT_NEED_EXTERN_C\n\n\n  /* FT_ERR_PREFIX is used as a prefix for error identifiers. */\n  /* By default, we use `FT_Err_'.                            */\n  /*                                                          */\n#ifndef FT_ERR_PREFIX\n#define FT_ERR_PREFIX  FT_Err_\n#endif\n\n\n  /* FT_ERR_BASE is used as the base for module-specific errors. */\n  /*                                                             */\n#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n\n#ifndef FT_ERR_BASE\n#define FT_ERR_BASE  FT_Mod_Err_Base\n#endif\n\n#else\n\n#undef FT_ERR_BASE\n#define FT_ERR_BASE  0\n\n#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */\n\n\n  /* If FT_ERRORDEF is not defined, we need to define a simple */\n  /* enumeration type.                                         */\n  /*                                                           */\n#ifndef FT_ERRORDEF\n\n#define FT_ERRORDEF( e, v, s )  e = v,\n#define FT_ERROR_START_LIST     enum {\n#define FT_ERROR_END_LIST       FT_ERR_CAT( FT_ERR_PREFIX, Max ) };\n\n#ifdef __cplusplus\n#define FT_NEED_EXTERN_C\n  extern \"C\" {\n#endif\n\n#endif /* !FT_ERRORDEF */\n\n\n  /* this macro is used to define an error */\n#define FT_ERRORDEF_( e, v, s )                                             \\\n          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )\n\n  /* this is only used for <module>_Err_Ok, which must be 0! */\n#define FT_NOERRORDEF_( e, v, s )                             \\\n          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )\n\n\n#ifdef FT_ERROR_START_LIST\n  FT_ERROR_START_LIST\n#endif\n\n\n  /* now include the error codes */\n#include FT_ERROR_DEFINITIONS_H\n\n\n#ifdef FT_ERROR_END_LIST\n  FT_ERROR_END_LIST\n#endif\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                      SIMPLE CLEANUP                     *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n#ifdef FT_NEED_EXTERN_C\n  }\n#endif\n\n#undef FT_ERROR_START_LIST\n#undef FT_ERROR_END_LIST\n\n#undef FT_ERRORDEF\n#undef FT_ERRORDEF_\n#undef FT_NOERRORDEF_\n\n#undef FT_NEED_EXTERN_C\n#undef FT_ERR_BASE\n\n  /* FT_ERR_PREFIX is needed internally */\n#ifndef FT2_BUILD_LIBRARY\n#undef FT_ERR_PREFIX\n#endif\n\n#endif /* __FTERRORS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftgasp.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgasp.h                                                               */\n/*                                                                         */\n/*    Access of TrueType's `gasp' table (specification).                   */\n/*                                                                         */\n/*  Copyright 2007, 2008, 2011 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef _FT_GASP_H_\n#define _FT_GASP_H_\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\n  /***************************************************************************\n   *\n   * @section:\n   *   gasp_table\n   *\n   * @title:\n   *   Gasp Table\n   *\n   * @abstract:\n   *   Retrieving TrueType `gasp' table entries.\n   *\n   * @description:\n   *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType\n   *   font for specific entries in its `gasp' table, if any.  This is\n   *   mainly useful when implementing native TrueType hinting with the\n   *   bytecode interpreter to duplicate the Windows text rendering results.\n   */\n\n  /*************************************************************************\n   *\n   * @enum:\n   *   FT_GASP_XXX\n   *\n   * @description:\n   *   A list of values and/or bit-flags returned by the @FT_Get_Gasp\n   *   function.\n   *\n   * @values:\n   *   FT_GASP_NO_TABLE ::\n   *     This special value means that there is no GASP table in this face.\n   *     It is up to the client to decide what to do.\n   *\n   *   FT_GASP_DO_GRIDFIT ::\n   *     Grid-fitting and hinting should be performed at the specified ppem.\n   *     This *really* means TrueType bytecode interpretation.  If this bit\n   *     is not set, no hinting gets applied.\n   *\n   *   FT_GASP_DO_GRAY ::\n   *     Anti-aliased rendering should be performed at the specified ppem.\n   *     If not set, do monochrome rendering.\n   *\n   *   FT_GASP_SYMMETRIC_SMOOTHING ::\n   *     If set, smoothing along multiple axes must be used with ClearType.\n   *\n   *   FT_GASP_SYMMETRIC_GRIDFIT ::\n   *     Grid-fitting must be used with ClearType's symmetric smoothing.\n   *\n   * @note:\n   *   The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be\n   *   used for standard font rasterization only.  Independently of that,\n   *   `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to\n   *   be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and\n   *   `FT_GASP_DO_GRAY' are consequently ignored).\n   *\n   *   `ClearType' is Microsoft's implementation of LCD rendering, partly\n   *   protected by patents.\n   *\n   * @since:\n   *   2.3.0\n   */\n#define FT_GASP_NO_TABLE               -1\n#define FT_GASP_DO_GRIDFIT           0x01\n#define FT_GASP_DO_GRAY              0x02\n#define FT_GASP_SYMMETRIC_SMOOTHING  0x08\n#define FT_GASP_SYMMETRIC_GRIDFIT    0x10\n\n\n  /*************************************************************************\n   *\n   * @func:\n   *   FT_Get_Gasp\n   *\n   * @description:\n   *   Read the `gasp' table from a TrueType or OpenType font file and\n   *   return the entry corresponding to a given character pixel size.\n   *\n   * @input:\n   *   face :: The source face handle.\n   *   ppem :: The vertical character pixel size.\n   *\n   * @return:\n   *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no\n   *   `gasp' table in the face.\n   *\n   * @since:\n   *   2.3.0\n   */\n  FT_EXPORT( FT_Int )\n  FT_Get_Gasp( FT_Face  face,\n               FT_UInt  ppem );\n\n  /* */\n\n\n#endif /* _FT_GASP_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftglyph.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftglyph.h                                                              */\n/*                                                                         */\n/*    FreeType convenience functions to handle glyphs (specification).     */\n/*                                                                         */\n/*  Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013, 2014 by             */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file contains the definition of several convenience functions    */\n  /* that can be used by client applications to easily retrieve glyph      */\n  /* bitmaps and outlines from a given face.                               */\n  /*                                                                       */\n  /* These functions should be optional if you are writing a font server   */\n  /* or text layout engine on top of FreeType.  However, they are pretty   */\n  /* handy for many other simple uses of the library.                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTGLYPH_H__\n#define __FTGLYPH_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    glyph_management                                                   */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Glyph Management                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Generic interface to manage individual glyph data.                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains definitions used to manage glyph data        */\n  /*    through generic FT_Glyph objects.  Each of them can contain a      */\n  /*    bitmap, a vector outline, or even images in other formats.         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* forward declaration to a private type */\n  typedef struct FT_Glyph_Class_  FT_Glyph_Class;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Glyph                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Handle to an object used to model generic glyph images.  It is a   */\n  /*    pointer to the @FT_GlyphRec structure and can contain a glyph      */\n  /*    bitmap or pointer.                                                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Glyph objects are not owned by the library.  You must thus release */\n  /*    them manually (through @FT_Done_Glyph) _before_ calling            */\n  /*    @FT_Done_FreeType.                                                 */\n  /*                                                                       */\n  typedef struct FT_GlyphRec_*  FT_Glyph;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_GlyphRec                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The root glyph structure contains a given glyph image plus its     */\n  /*    advance width in 16.16 fixed-point format.                         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    library :: A handle to the FreeType library object.                */\n  /*                                                                       */\n  /*    clazz   :: A pointer to the glyph's class.  Private.               */\n  /*                                                                       */\n  /*    format  :: The format of the glyph's image.                        */\n  /*                                                                       */\n  /*    advance :: A 16.16 vector that gives the glyph's advance width.    */\n  /*                                                                       */\n  typedef struct  FT_GlyphRec_\n  {\n    FT_Library             library;\n    const FT_Glyph_Class*  clazz;\n    FT_Glyph_Format        format;\n    FT_Vector              advance;\n\n  } FT_GlyphRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_BitmapGlyph                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an object used to model a bitmap glyph image.  This is */\n  /*    a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec.     */\n  /*                                                                       */\n  typedef struct FT_BitmapGlyphRec_*  FT_BitmapGlyph;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_BitmapGlyphRec                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used for bitmap glyph images.  This really is a        */\n  /*    `sub-class' of @FT_GlyphRec.                                       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root   :: The root @FT_Glyph fields.                               */\n  /*                                                                       */\n  /*    left   :: The left-side bearing, i.e., the horizontal distance     */\n  /*              from the current pen position to the left border of the  */\n  /*              glyph bitmap.                                            */\n  /*                                                                       */\n  /*    top    :: The top-side bearing, i.e., the vertical distance from   */\n  /*              the current pen position to the top border of the glyph  */\n  /*              bitmap.  This distance is positive for upwards~y!        */\n  /*                                                                       */\n  /*    bitmap :: A descriptor for the bitmap.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have       */\n  /*    `glyph->format == FT_GLYPH_FORMAT_BITMAP'.  This lets you access   */\n  /*    the bitmap's contents easily.                                      */\n  /*                                                                       */\n  /*    The corresponding pixel buffer is always owned by @FT_BitmapGlyph  */\n  /*    and is thus created and destroyed with it.                         */\n  /*                                                                       */\n  typedef struct  FT_BitmapGlyphRec_\n  {\n    FT_GlyphRec  root;\n    FT_Int       left;\n    FT_Int       top;\n    FT_Bitmap    bitmap;\n\n  } FT_BitmapGlyphRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_OutlineGlyph                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an object used to model an outline glyph image.  This  */\n  /*    is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */\n  /*                                                                       */\n  typedef struct FT_OutlineGlyphRec_*  FT_OutlineGlyph;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_OutlineGlyphRec                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used for outline (vectorial) glyph images.  This       */\n  /*    really is a `sub-class' of @FT_GlyphRec.                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root    :: The root @FT_Glyph fields.                              */\n  /*                                                                       */\n  /*    outline :: A descriptor for the outline.                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have      */\n  /*    `glyph->format == FT_GLYPH_FORMAT_OUTLINE'.  This lets you access  */\n  /*    the outline's content easily.                                      */\n  /*                                                                       */\n  /*    As the outline is extracted from a glyph slot, its coordinates are */\n  /*    expressed normally in 26.6 pixels, unless the flag                 */\n  /*    @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */\n  /*                                                                       */\n  /*    The outline's tables are always owned by the object and are        */\n  /*    destroyed with it.                                                 */\n  /*                                                                       */\n  typedef struct  FT_OutlineGlyphRec_\n  {\n    FT_GlyphRec  root;\n    FT_Outline   outline;\n\n  } FT_OutlineGlyphRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Glyph                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to extract a glyph image from a slot.  Note that   */\n  /*    the created @FT_Glyph object must be released with @FT_Done_Glyph. */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    slot   :: A handle to the source glyph slot.                       */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aglyph :: A handle to the glyph object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Glyph( FT_GlyphSlot  slot,\n                FT_Glyph     *aglyph );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Glyph_Copy                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to copy a glyph image.  Note that the created      */\n  /*    @FT_Glyph object must be released with @FT_Done_Glyph.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    source :: A handle to the source glyph object.                     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    target :: A handle to the target glyph object.  0~in case of       */\n  /*              error.                                                   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_Copy( FT_Glyph   source,\n                 FT_Glyph  *target );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Glyph_Transform                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Transform a glyph image if its format is scalable.                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    glyph  :: A handle to the target glyph object.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    matrix :: A pointer to a 2x2 matrix to apply.                      */\n  /*                                                                       */\n  /*    delta  :: A pointer to a 2d vector to apply.  Coordinates are      */\n  /*              expressed in 1/64th of a pixel.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code (if not 0, the glyph format is not scalable).  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The 2x2 transformation matrix is also applied to the glyph's       */\n  /*    advance vector.                                                    */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_Transform( FT_Glyph    glyph,\n                      FT_Matrix*  matrix,\n                      FT_Vector*  delta );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Glyph_BBox_Mode                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The mode how the values of @FT_Glyph_Get_CBox are returned.        */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_GLYPH_BBOX_UNSCALED ::                                          */\n  /*      Return unscaled font units.                                      */\n  /*                                                                       */\n  /*    FT_GLYPH_BBOX_SUBPIXELS ::                                         */\n  /*      Return unfitted 26.6 coordinates.                                */\n  /*                                                                       */\n  /*    FT_GLYPH_BBOX_GRIDFIT ::                                           */\n  /*      Return grid-fitted 26.6 coordinates.                             */\n  /*                                                                       */\n  /*    FT_GLYPH_BBOX_TRUNCATE ::                                          */\n  /*      Return coordinates in integer pixels.                            */\n  /*                                                                       */\n  /*    FT_GLYPH_BBOX_PIXELS ::                                            */\n  /*      Return grid-fitted pixel coordinates.                            */\n  /*                                                                       */\n  typedef enum  FT_Glyph_BBox_Mode_\n  {\n    FT_GLYPH_BBOX_UNSCALED  = 0,\n    FT_GLYPH_BBOX_SUBPIXELS = 0,\n    FT_GLYPH_BBOX_GRIDFIT   = 1,\n    FT_GLYPH_BBOX_TRUNCATE  = 2,\n    FT_GLYPH_BBOX_PIXELS    = 3\n\n  } FT_Glyph_BBox_Mode;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_Glyph_BBox_Mode' values instead                   */\n#define ft_glyph_bbox_unscaled   FT_GLYPH_BBOX_UNSCALED\n#define ft_glyph_bbox_subpixels  FT_GLYPH_BBOX_SUBPIXELS\n#define ft_glyph_bbox_gridfit    FT_GLYPH_BBOX_GRIDFIT\n#define ft_glyph_bbox_truncate   FT_GLYPH_BBOX_TRUNCATE\n#define ft_glyph_bbox_pixels     FT_GLYPH_BBOX_PIXELS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Glyph_Get_CBox                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a glyph's `control box'.  The control box encloses all the  */\n  /*    outline's points, including Bézier control points.  Though it      */\n  /*    coincides with the exact bounding box for most glyphs, it can be   */\n  /*    slightly larger in some situations (like when rotating an outline  */\n  /*    that contains Bézier outside arcs).                                */\n  /*                                                                       */\n  /*    Computing the control box is very fast, while getting the bounding */\n  /*    box can take much more time as it needs to walk over all segments  */\n  /*    and arcs in the outline.  To get the latter, you can use the       */\n  /*    `ftbbox' component, which is dedicated to this single task.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    glyph :: A handle to the source glyph object.                      */\n  /*                                                                       */\n  /*    mode  :: The mode that indicates how to interpret the returned     */\n  /*             bounding box values.                                      */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    acbox :: The glyph coordinate bounding box.  Coordinates are       */\n  /*             expressed in 1/64th of pixels if it is grid-fitted.       */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Coordinates are relative to the glyph origin, using the y~upwards  */\n  /*    convention.                                                        */\n  /*                                                                       */\n  /*    If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode'   */\n  /*    must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font        */\n  /*    units in 26.6 pixel format.  The value @FT_GLYPH_BBOX_SUBPIXELS    */\n  /*    is another name for this constant.                                 */\n  /*                                                                       */\n  /*    If the font is tricky and the glyph has been loaded with           */\n  /*    @FT_LOAD_NO_SCALE, the resulting CBox is meaningless.  To get      */\n  /*    reasonable values for the CBox it is necessary to load the glyph   */\n  /*    at a large ppem value (so that the hinting instructions can        */\n  /*    properly shift and scale the subglyphs), then extracting the CBox, */\n  /*    which can be eventually converted back to font units.              */\n  /*                                                                       */\n  /*    Note that the maximum coordinates are exclusive, which means that  */\n  /*    one can compute the width and height of the glyph image (be it in  */\n  /*    integer or 26.6 pixels) as:                                        */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      width  = bbox.xMax - bbox.xMin;                                  */\n  /*      height = bbox.yMax - bbox.yMin;                                  */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    Note also that for 26.6 coordinates, if `bbox_mode' is set to      */\n  /*    @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted,  */\n  /*    which corresponds to:                                              */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      bbox.xMin = FLOOR(bbox.xMin);                                    */\n  /*      bbox.yMin = FLOOR(bbox.yMin);                                    */\n  /*      bbox.xMax = CEILING(bbox.xMax);                                  */\n  /*      bbox.yMax = CEILING(bbox.yMax);                                  */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    To get the bbox in pixel coordinates, set `bbox_mode' to           */\n  /*    @FT_GLYPH_BBOX_TRUNCATE.                                           */\n  /*                                                                       */\n  /*    To get the bbox in grid-fitted pixel coordinates, set `bbox_mode'  */\n  /*    to @FT_GLYPH_BBOX_PIXELS.                                          */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Glyph_Get_CBox( FT_Glyph  glyph,\n                     FT_UInt   bbox_mode,\n                     FT_BBox  *acbox );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Glyph_To_Bitmap                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Convert a given glyph object to a bitmap glyph object.             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    the_glyph   :: A pointer to a handle to the target glyph.          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    render_mode :: An enumeration that describes how the data is       */\n  /*                   rendered.                                           */\n  /*                                                                       */\n  /*    origin      :: A pointer to a vector used to translate the glyph   */\n  /*                   image before rendering.  Can be~0 (if no            */\n  /*                   translation).  The origin is expressed in           */\n  /*                   26.6 pixels.                                        */\n  /*                                                                       */\n  /*    destroy     :: A boolean that indicates that the original glyph    */\n  /*                   image should be destroyed by this function.  It is  */\n  /*                   never destroyed in case of error.                   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function does nothing if the glyph format isn't scalable.     */\n  /*                                                                       */\n  /*    The glyph image is translated with the `origin' vector before      */\n  /*    rendering.                                                         */\n  /*                                                                       */\n  /*    The first parameter is a pointer to an @FT_Glyph handle, that will */\n  /*    be _replaced_ by this function (with newly allocated data).        */\n  /*    Typically, you would use (omitting error handling):                */\n  /*                                                                       */\n  /*                                                                       */\n  /*      {                                                                */\n  /*        FT_Glyph        glyph;                                         */\n  /*        FT_BitmapGlyph  glyph_bitmap;                                  */\n  /*                                                                       */\n  /*                                                                       */\n  /*        // load glyph                                                  */\n  /*        error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT );     */\n  /*                                                                       */\n  /*        // extract glyph image                                         */\n  /*        error = FT_Get_Glyph( face->glyph, &glyph );                   */\n  /*                                                                       */\n  /*        // convert to a bitmap (default render mode + destroying old)  */\n  /*        if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )                 */\n  /*        {                                                              */\n  /*          error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL,   */\n  /*                                      0, 1 );                          */\n  /*          if ( error ) // `glyph' unchanged                            */\n  /*            ...                                                        */\n  /*        }                                                              */\n  /*                                                                       */\n  /*        // access bitmap content by typecasting                        */\n  /*        glyph_bitmap = (FT_BitmapGlyph)glyph;                          */\n  /*                                                                       */\n  /*        // do funny stuff with it, like blitting/drawing               */\n  /*        ...                                                            */\n  /*                                                                       */\n  /*        // discard glyph image (bitmap or not)                         */\n  /*        FT_Done_Glyph( glyph );                                        */\n  /*      }                                                                */\n  /*                                                                       */\n  /*                                                                       */\n  /*    Here another example, again without error handling:                */\n  /*                                                                       */\n  /*                                                                       */\n  /*      {                                                                */\n  /*        FT_Glyph  glyphs[MAX_GLYPHS]                                   */\n  /*                                                                       */\n  /*                                                                       */\n  /*        ...                                                            */\n  /*                                                                       */\n  /*        for ( idx = 0; i < MAX_GLYPHS; i++ )                           */\n  /*          error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||       */\n  /*                  FT_Get_Glyph ( face->glyph, &glyph[idx] );           */\n  /*                                                                       */\n  /*        ...                                                            */\n  /*                                                                       */\n  /*        for ( idx = 0; i < MAX_GLYPHS; i++ )                           */\n  /*        {                                                              */\n  /*          FT_Glyph  bitmap = glyphs[idx];                              */\n  /*                                                                       */\n  /*                                                                       */\n  /*          ...                                                          */\n  /*                                                                       */\n  /*          // after this call, `bitmap' no longer points into           */\n  /*          // the `glyphs' array (and the old value isn't destroyed)    */\n  /*          FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 );    */\n  /*                                                                       */\n  /*          ...                                                          */\n  /*                                                                       */\n  /*          FT_Done_Glyph( bitmap );                                     */\n  /*        }                                                              */\n  /*                                                                       */\n  /*        ...                                                            */\n  /*                                                                       */\n  /*        for ( idx = 0; i < MAX_GLYPHS; i++ )                           */\n  /*          FT_Done_Glyph( glyphs[idx] );                                */\n  /*      }                                                                */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_To_Bitmap( FT_Glyph*       the_glyph,\n                      FT_Render_Mode  render_mode,\n                      FT_Vector*      origin,\n                      FT_Bool         destroy );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_Glyph                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy a given glyph.                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    glyph :: A handle to the target glyph object.                      */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Done_Glyph( FT_Glyph  glyph );\n\n  /* */\n\n\n  /* other helpful functions */\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    computations                                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Matrix_Multiply                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Perform the matrix operation `b = a*b'.                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: A pointer to matrix `a'.                                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    b :: A pointer to matrix `b'.                                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The result is undefined if either `a' or `b' is zero.              */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Matrix_Multiply( const FT_Matrix*  a,\n                      FT_Matrix*        b );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Matrix_Invert                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Invert a 2x2 matrix.  Return an error if it can't be inverted.     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    matrix :: A pointer to the target matrix.  Remains untouched in    */\n  /*              case of error.                                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Matrix_Invert( FT_Matrix*  matrix );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTGLYPH_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftgxval.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgxval.h                                                              */\n/*                                                                         */\n/*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */\n/*                                                                         */\n/*  Copyright 2004-2006, 2013 by                                           */\n/*  Masatake YAMATO, Redhat K.K,                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTGXVAL_H__\n#define __FTGXVAL_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    gx_validation                                                      */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    TrueTypeGX/AAT Validation                                          */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    An API to validate TrueTypeGX/AAT tables.                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of functions to validate     */\n  /*    some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd,  */\n  /*    trak, prop, lcar).                                                 */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_TrueTypeGX_Validate                                             */\n  /*    FT_TrueTypeGX_Free                                                 */\n  /*                                                                       */\n  /*    FT_ClassicKern_Validate                                            */\n  /*    FT_ClassicKern_Free                                                */\n  /*                                                                       */\n  /*    FT_VALIDATE_GX_LENGTH                                              */\n  /*    FT_VALIDATE_GXXXX                                                  */\n  /*    FT_VALIDATE_CKERNXXX                                               */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                                                                       */\n  /* Warning: Use FT_VALIDATE_XXX to validate a table.                     */\n  /*          Following definitions are for gxvalid developers.            */\n  /*                                                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n#define FT_VALIDATE_feat_INDEX     0\n#define FT_VALIDATE_mort_INDEX     1\n#define FT_VALIDATE_morx_INDEX     2\n#define FT_VALIDATE_bsln_INDEX     3\n#define FT_VALIDATE_just_INDEX     4\n#define FT_VALIDATE_kern_INDEX     5\n#define FT_VALIDATE_opbd_INDEX     6\n#define FT_VALIDATE_trak_INDEX     7\n#define FT_VALIDATE_prop_INDEX     8\n#define FT_VALIDATE_lcar_INDEX     9\n#define FT_VALIDATE_GX_LAST_INDEX  FT_VALIDATE_lcar_INDEX\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_VALIDATE_GX_LENGTH\n   *\n   * @description:\n   *   The number of tables checked in this module.  Use it as a parameter\n   *   for the `table-length' argument of function @FT_TrueTypeGX_Validate.\n   */\n#define FT_VALIDATE_GX_LENGTH     (FT_VALIDATE_GX_LAST_INDEX + 1)\n\n  /* */\n\n  /* Up to 0x1000 is used by otvalid.\n     Ox2xxx is reserved for feature OT extension. */\n#define FT_VALIDATE_GX_START 0x4000\n#define FT_VALIDATE_GX_BITFIELD( tag )                  \\\n  ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )\n\n\n /**********************************************************************\n  *\n  * @enum:\n  *    FT_VALIDATE_GXXXX\n  *\n  * @description:\n  *    A list of bit-field constants used with @FT_TrueTypeGX_Validate to\n  *    indicate which TrueTypeGX/AAT Type tables should be validated.\n  *\n  * @values:\n  *    FT_VALIDATE_feat ::\n  *      Validate `feat' table.\n  *\n  *    FT_VALIDATE_mort ::\n  *      Validate `mort' table.\n  *\n  *    FT_VALIDATE_morx ::\n  *      Validate `morx' table.\n  *\n  *    FT_VALIDATE_bsln ::\n  *      Validate `bsln' table.\n  *\n  *    FT_VALIDATE_just ::\n  *      Validate `just' table.\n  *\n  *    FT_VALIDATE_kern ::\n  *      Validate `kern' table.\n  *\n  *    FT_VALIDATE_opbd ::\n  *      Validate `opbd' table.\n  *\n  *    FT_VALIDATE_trak ::\n  *      Validate `trak' table.\n  *\n  *    FT_VALIDATE_prop ::\n  *      Validate `prop' table.\n  *\n  *    FT_VALIDATE_lcar ::\n  *      Validate `lcar' table.\n  *\n  *    FT_VALIDATE_GX ::\n  *      Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern,\n  *      opbd, trak, prop and lcar).\n  *\n  */\n\n#define FT_VALIDATE_feat  FT_VALIDATE_GX_BITFIELD( feat )\n#define FT_VALIDATE_mort  FT_VALIDATE_GX_BITFIELD( mort )\n#define FT_VALIDATE_morx  FT_VALIDATE_GX_BITFIELD( morx )\n#define FT_VALIDATE_bsln  FT_VALIDATE_GX_BITFIELD( bsln )\n#define FT_VALIDATE_just  FT_VALIDATE_GX_BITFIELD( just )\n#define FT_VALIDATE_kern  FT_VALIDATE_GX_BITFIELD( kern )\n#define FT_VALIDATE_opbd  FT_VALIDATE_GX_BITFIELD( opbd )\n#define FT_VALIDATE_trak  FT_VALIDATE_GX_BITFIELD( trak )\n#define FT_VALIDATE_prop  FT_VALIDATE_GX_BITFIELD( prop )\n#define FT_VALIDATE_lcar  FT_VALIDATE_GX_BITFIELD( lcar )\n\n#define FT_VALIDATE_GX  ( FT_VALIDATE_feat | \\\n                          FT_VALIDATE_mort | \\\n                          FT_VALIDATE_morx | \\\n                          FT_VALIDATE_bsln | \\\n                          FT_VALIDATE_just | \\\n                          FT_VALIDATE_kern | \\\n                          FT_VALIDATE_opbd | \\\n                          FT_VALIDATE_trak | \\\n                          FT_VALIDATE_prop | \\\n                          FT_VALIDATE_lcar )\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_TrueTypeGX_Validate\n  *\n  * @description:\n  *    Validate various TrueTypeGX tables to assure that all offsets and\n  *    indices are valid.  The idea is that a higher-level library that\n  *    actually does the text layout can access those tables without\n  *    error checking (which can be quite time consuming).\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    validation_flags ::\n  *       A bit field that specifies the tables to be validated.  See\n  *       @FT_VALIDATE_GXXXX for possible values.\n  *\n  *    table_length ::\n  *       The size of the `tables' array.  Normally, @FT_VALIDATE_GX_LENGTH\n  *       should be passed.\n  *\n  * @output:\n  *    tables ::\n  *       The array where all validated sfnt tables are stored.\n  *       The array itself must be allocated by a client.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   This function only works with TrueTypeGX fonts, returning an error\n  *   otherwise.\n  *\n  *   After use, the application should deallocate the buffers pointed to by\n  *   each `tables' element, by calling @FT_TrueTypeGX_Free.  A NULL value\n  *   indicates that the table either doesn't exist in the font, the\n  *   application hasn't asked for validation, or the validator doesn't have\n  *   the ability to validate the sfnt table.\n  */\n  FT_EXPORT( FT_Error )\n  FT_TrueTypeGX_Validate( FT_Face   face,\n                          FT_UInt   validation_flags,\n                          FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],\n                          FT_UInt   table_length );\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_TrueTypeGX_Free\n  *\n  * @description:\n  *    Free the buffer allocated by TrueTypeGX validator.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    table ::\n  *       The pointer to the buffer allocated by\n  *       @FT_TrueTypeGX_Validate.\n  *\n  * @note:\n  *   This function must be used to free the buffer allocated by\n  *   @FT_TrueTypeGX_Validate only.\n  */\n  FT_EXPORT( void )\n  FT_TrueTypeGX_Free( FT_Face   face,\n                      FT_Bytes  table );\n\n\n /**********************************************************************\n  *\n  * @enum:\n  *    FT_VALIDATE_CKERNXXX\n  *\n  * @description:\n  *    A list of bit-field constants used with @FT_ClassicKern_Validate\n  *    to indicate the classic kern dialect or dialects.  If the selected\n  *    type doesn't fit, @FT_ClassicKern_Validate regards the table as\n  *    invalid.\n  *\n  * @values:\n  *    FT_VALIDATE_MS ::\n  *      Handle the `kern' table as a classic Microsoft kern table.\n  *\n  *    FT_VALIDATE_APPLE ::\n  *      Handle the `kern' table as a classic Apple kern table.\n  *\n  *    FT_VALIDATE_CKERN ::\n  *      Handle the `kern' as either classic Apple or Microsoft kern table.\n  */\n#define FT_VALIDATE_MS     ( FT_VALIDATE_GX_START << 0 )\n#define FT_VALIDATE_APPLE  ( FT_VALIDATE_GX_START << 1 )\n\n#define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_ClassicKern_Validate\n  *\n  * @description:\n  *    Validate classic (16-bit format) kern table to assure that the offsets\n  *    and indices are valid.  The idea is that a higher-level library that\n  *    actually does the text layout can access those tables without error\n  *    checking (which can be quite time consuming).\n  *\n  *    The `kern' table validator in @FT_TrueTypeGX_Validate deals with both\n  *    the new 32-bit format and the classic 16-bit format, while\n  *    FT_ClassicKern_Validate only supports the classic 16-bit format.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    validation_flags ::\n  *       A bit field that specifies the dialect to be validated.  See\n  *       @FT_VALIDATE_CKERNXXX for possible values.\n  *\n  * @output:\n  *    ckern_table ::\n  *       A pointer to the kern table.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   After use, the application should deallocate the buffers pointed to by\n  *   `ckern_table', by calling @FT_ClassicKern_Free.  A NULL value\n  *   indicates that the table doesn't exist in the font.\n  */\n  FT_EXPORT( FT_Error )\n  FT_ClassicKern_Validate( FT_Face    face,\n                           FT_UInt    validation_flags,\n                           FT_Bytes  *ckern_table );\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_ClassicKern_Free\n  *\n  * @description:\n  *    Free the buffer allocated by classic Kern validator.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    table ::\n  *       The pointer to the buffer that is allocated by\n  *       @FT_ClassicKern_Validate.\n  *\n  * @note:\n  *   This function must be used to free the buffer allocated by\n  *   @FT_ClassicKern_Validate only.\n  */\n  FT_EXPORT( void )\n  FT_ClassicKern_Free( FT_Face   face,\n                       FT_Bytes  table );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTGXVAL_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftgzip.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgzip.h                                                               */\n/*                                                                         */\n/*    Gzip-compressed stream support.                                      */\n/*                                                                         */\n/*  Copyright 2002-2004, 2006, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTGZIP_H__\n#define __FTGZIP_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    gzip                                                               */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    GZIP Streams                                                       */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Using gzip-compressed font files.                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of Gzip-specific functions.  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n /************************************************************************\n  *\n  * @function:\n  *   FT_Stream_OpenGzip\n  *\n  * @description:\n  *   Open a new stream to parse gzip-compressed font files.  This is\n  *   mainly used to support the compressed `*.pcf.gz' fonts that come\n  *   with XFree86.\n  *\n  * @input:\n  *   stream ::\n  *     The target embedding stream.\n  *\n  *   source ::\n  *     The source stream.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   The source stream must be opened _before_ calling this function.\n  *\n  *   Calling the internal function `FT_Stream_Close' on the new stream will\n  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream\n  *   objects will be released to the heap.\n  *\n  *   The stream implementation is very basic and resets the decompression\n  *   process each time seeking backwards is needed within the stream.\n  *\n  *   In certain builds of the library, gzip compression recognition is\n  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.\n  *   This means that if no font driver is capable of handling the raw\n  *   compressed file, the library will try to open a gzipped stream from\n  *   it and re-open the face with it.\n  *\n  *   This function may return `FT_Err_Unimplemented_Feature' if your build\n  *   of FreeType was not compiled with zlib support.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Stream_OpenGzip( FT_Stream  stream,\n                      FT_Stream  source );\n\n\n /************************************************************************\n  *\n  * @function:\n  *   FT_Gzip_Uncompress\n  *\n  * @description:\n  *   Decompress a zipped input buffer into an output buffer.  This function\n  *   is modeled after zlib's `uncompress' function.\n  *\n  * @input:\n  *   memory ::\n  *     A FreeType memory handle.\n  *\n  *   input ::\n  *     The input buffer.\n  *\n  *   input_len ::\n  *     The length of the input buffer.\n  *\n  * @output:\n  *   output::\n  *     The output buffer.\n  *\n  * @inout:\n  *   output_len ::\n  *     Before calling the function, this is the the total size of the\n  *     output buffer, which must be large enough to hold the entire\n  *     uncompressed data (so the size of the uncompressed data must be\n  *     known in advance).  After calling the function, `output_len' is the\n  *     size of the used data in `output'.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   This function may return `FT_Err_Unimplemented_Feature' if your build\n  *   of FreeType was not compiled with zlib support.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Gzip_Uncompress( FT_Memory       memory,\n                      FT_Byte*        output,\n                      FT_ULong*       output_len,\n                      const FT_Byte*  input,\n                      FT_ULong        input_len );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTGZIP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftimage.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftimage.h                                                              */\n/*                                                                         */\n/*    FreeType glyph image formats and default raster interface            */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 1996-2010, 2013, 2014 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Note: A `raster' is simply a scan-line converter, used to render      */\n  /*       FT_Outlines into FT_Bitmaps.                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTIMAGE_H__\n#define __FTIMAGE_H__\n\n\n  /* _STANDALONE_ is from ftgrays.c */\n#ifndef _STANDALONE_\n#include <ft2build.h>\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    basic_types                                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Pos                                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The type FT_Pos is used to store vectorial coordinates.  Depending */\n  /*    on the context, these can represent distances in integer font      */\n  /*    units, or 16.16, or 26.6 fixed-point pixel coordinates.            */\n  /*                                                                       */\n  typedef signed long  FT_Pos;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Vector                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to store a 2D vector; coordinates are of   */\n  /*    the FT_Pos type.                                                   */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    x :: The horizontal coordinate.                                    */\n  /*    y :: The vertical coordinate.                                      */\n  /*                                                                       */\n  typedef struct  FT_Vector_\n  {\n    FT_Pos  x;\n    FT_Pos  y;\n\n  } FT_Vector;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_BBox                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to hold an outline's bounding box, i.e., the      */\n  /*    coordinates of its extrema in the horizontal and vertical          */\n  /*    directions.                                                        */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    xMin :: The horizontal minimum (left-most).                        */\n  /*                                                                       */\n  /*    yMin :: The vertical minimum (bottom-most).                        */\n  /*                                                                       */\n  /*    xMax :: The horizontal maximum (right-most).                       */\n  /*                                                                       */\n  /*    yMax :: The vertical maximum (top-most).                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The bounding box is specified with the coordinates of the lower    */\n  /*    left and the upper right corner.  In PostScript, those values are  */\n  /*    often called (llx,lly) and (urx,ury), respectively.                */\n  /*                                                                       */\n  /*    If `yMin' is negative, this value gives the glyph's descender.     */\n  /*    Otherwise, the glyph doesn't descend below the baseline.           */\n  /*    Similarly, if `ymax' is positive, this value gives the glyph's     */\n  /*    ascender.                                                          */\n  /*                                                                       */\n  /*    `xMin' gives the horizontal distance from the glyph's origin to    */\n  /*    the left edge of the glyph's bounding box.  If `xMin' is negative, */\n  /*    the glyph extends to the left of the origin.                       */\n  /*                                                                       */\n  typedef struct  FT_BBox_\n  {\n    FT_Pos  xMin, yMin;\n    FT_Pos  xMax, yMax;\n\n  } FT_BBox;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Pixel_Mode                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration type used to describe the format of pixels in a     */\n  /*    given bitmap.  Note that additional formats may be added in the    */\n  /*    future.                                                            */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_PIXEL_MODE_NONE ::                                              */\n  /*      Value~0 is reserved.                                             */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_MONO ::                                              */\n  /*      A monochrome bitmap, using 1~bit per pixel.  Note that pixels    */\n  /*      are stored in most-significant order (MSB), which means that     */\n  /*      the left-most pixel in a byte has value 128.                     */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_GRAY ::                                              */\n  /*      An 8-bit bitmap, generally used to represent anti-aliased glyph  */\n  /*      images.  Each pixel is stored in one byte.  Note that the number */\n  /*      of `gray' levels is stored in the `num_grays' field of the       */\n  /*      @FT_Bitmap structure (it generally is 256).                      */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_GRAY2 ::                                             */\n  /*      A 2-bit per pixel bitmap, used to represent embedded             */\n  /*      anti-aliased bitmaps in font files according to the OpenType     */\n  /*      specification.  We haven't found a single font using this        */\n  /*      format, however.                                                 */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_GRAY4 ::                                             */\n  /*      A 4-bit per pixel bitmap, representing embedded anti-aliased     */\n  /*      bitmaps in font files according to the OpenType specification.   */\n  /*      We haven't found a single font using this format, however.       */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_LCD ::                                               */\n  /*      An 8-bit bitmap, representing RGB or BGR decimated glyph images  */\n  /*      used for display on LCD displays; the bitmap is three times      */\n  /*      wider than the original glyph image.  See also                   */\n  /*      @FT_RENDER_MODE_LCD.                                             */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_LCD_V ::                                             */\n  /*      An 8-bit bitmap, representing RGB or BGR decimated glyph images  */\n  /*      used for display on rotated LCD displays; the bitmap is three    */\n  /*      times taller than the original glyph image.  See also            */\n  /*      @FT_RENDER_MODE_LCD_V.                                           */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_BGRA ::                                              */\n  /*      An image with four 8-bit channels per pixel, representing a      */\n  /*      color image (such as emoticons) with alpha channel.  For each    */\n  /*      pixel, the format is BGRA, which means, the blue channel comes   */\n  /*      first in memory.  The color channels are pre-multiplied and in   */\n  /*      the sRGB colorspace.  For example, full red at half-translucent  */\n  /*      opacity will be represented as `00,00,80,80', not `00,00,FF,80'. */\n  /*      See also @FT_LOAD_COLOR.                                         */\n  /*                                                                       */\n  typedef enum  FT_Pixel_Mode_\n  {\n    FT_PIXEL_MODE_NONE = 0,\n    FT_PIXEL_MODE_MONO,\n    FT_PIXEL_MODE_GRAY,\n    FT_PIXEL_MODE_GRAY2,\n    FT_PIXEL_MODE_GRAY4,\n    FT_PIXEL_MODE_LCD,\n    FT_PIXEL_MODE_LCD_V,\n    FT_PIXEL_MODE_BGRA,\n\n    FT_PIXEL_MODE_MAX      /* do not remove */\n\n  } FT_Pixel_Mode;\n\n\n  /* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */\n  /* values instead.                                                       */\n#define ft_pixel_mode_none   FT_PIXEL_MODE_NONE\n#define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO\n#define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY\n#define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2\n#define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Bitmap                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to describe a bitmap or pixmap to the raster.     */\n  /*    Note that we now manage pixmaps of various depths through the      */\n  /*    `pixel_mode' field.                                                */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    rows         :: The number of bitmap rows.                         */\n  /*                                                                       */\n  /*    width        :: The number of pixels in bitmap row.                */\n  /*                                                                       */\n  /*    pitch        :: The pitch's absolute value is the number of bytes  */\n  /*                    taken by one bitmap row, including padding.        */\n  /*                    However, the pitch is positive when the bitmap has */\n  /*                    a `down' flow, and negative when it has an `up'    */\n  /*                    flow.  In all cases, the pitch is an offset to add */\n  /*                    to a bitmap pointer in order to go down one row.   */\n  /*                                                                       */\n  /*                    Note that `padding' means the alignment of a       */\n  /*                    bitmap to a byte border, and FreeType functions    */\n  /*                    normally align to the smallest possible integer    */\n  /*                    value.                                             */\n  /*                                                                       */\n  /*                    For the B/W rasterizer, `pitch' is always an even  */\n  /*                    number.                                            */\n  /*                                                                       */\n  /*                    To change the pitch of a bitmap (say, to make it a */\n  /*                    multiple of 4), use @FT_Bitmap_Convert.            */\n  /*                    Alternatively, you might use callback functions to */\n  /*                    directly render to the application's surface; see  */\n  /*                    the file `example2.cpp' in the tutorial for a      */\n  /*                    demonstration.                                     */\n  /*                                                                       */\n  /*    buffer       :: A typeless pointer to the bitmap buffer.  This     */\n  /*                    value should be aligned on 32-bit boundaries in    */\n  /*                    most cases.                                        */\n  /*                                                                       */\n  /*    num_grays    :: This field is only used with                       */\n  /*                    @FT_PIXEL_MODE_GRAY; it gives the number of gray   */\n  /*                    levels used in the bitmap.                         */\n  /*                                                                       */\n  /*    pixel_mode   :: The pixel mode, i.e., how pixel bits are stored.   */\n  /*                    See @FT_Pixel_Mode for possible values.            */\n  /*                                                                       */\n  /*    palette_mode :: This field is intended for paletted pixel modes;   */\n  /*                    it indicates how the palette is stored.  Not       */\n  /*                    used currently.                                    */\n  /*                                                                       */\n  /*    palette      :: A typeless pointer to the bitmap palette; this     */\n  /*                    field is intended for paletted pixel modes.  Not   */\n  /*                    used currently.                                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*   For now, the only pixel modes supported by FreeType are mono and    */\n  /*   grays.  However, drivers might be added in the future to support    */\n  /*   more `colorful' options.                                            */\n  /*                                                                       */\n  typedef struct  FT_Bitmap_\n  {\n    unsigned int    rows;\n    unsigned int    width;\n    int             pitch;\n    unsigned char*  buffer;\n    unsigned short  num_grays;\n    unsigned char   pixel_mode;\n    unsigned char   palette_mode;\n    void*           palette;\n\n  } FT_Bitmap;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    outline_processing                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Outline                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure is used to describe an outline to the scan-line     */\n  /*    converter.                                                         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    n_contours :: The number of contours in the outline.               */\n  /*                                                                       */\n  /*    n_points   :: The number of points in the outline.                 */\n  /*                                                                       */\n  /*    points     :: A pointer to an array of `n_points' @FT_Vector       */\n  /*                  elements, giving the outline's point coordinates.    */\n  /*                                                                       */\n  /*    tags       :: A pointer to an array of `n_points' chars, giving    */\n  /*                  each outline point's type.                           */\n  /*                                                                       */\n  /*                  If bit~0 is unset, the point is `off' the curve,     */\n  /*                  i.e., a Bézier control point, while it is `on' if    */\n  /*                  set.                                                 */\n  /*                                                                       */\n  /*                  Bit~1 is meaningful for `off' points only.  If set,  */\n  /*                  it indicates a third-order Bézier arc control point; */\n  /*                  and a second-order control point if unset.           */\n  /*                                                                       */\n  /*                  If bit~2 is set, bits 5-7 contain the drop-out mode  */\n  /*                  (as defined in the OpenType specification; the value */\n  /*                  is the same as the argument to the SCANMODE          */\n  /*                  instruction).                                        */\n  /*                                                                       */\n  /*                  Bits 3 and~4 are reserved for internal purposes.     */\n  /*                                                                       */\n  /*    contours   :: An array of `n_contours' shorts, giving the end      */\n  /*                  point of each contour within the outline.  For       */\n  /*                  example, the first contour is defined by the points  */\n  /*                  `0' to `contours[0]', the second one is defined by   */\n  /*                  the points `contours[0]+1' to `contours[1]', etc.    */\n  /*                                                                       */\n  /*    flags      :: A set of bit flags used to characterize the outline  */\n  /*                  and give hints to the scan-converter and hinter on   */\n  /*                  how to convert/grid-fit it.  See @FT_OUTLINE_XXX.    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The B/W rasterizer only checks bit~2 in the `tags' array for the   */\n  /*    first point of each contour.  The drop-out mode as given with      */\n  /*    @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and       */\n  /*    @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden.           */\n  /*                                                                       */\n  typedef struct  FT_Outline_\n  {\n    short       n_contours;      /* number of contours in glyph        */\n    short       n_points;        /* number of points in the glyph      */\n\n    FT_Vector*  points;          /* the outline's points               */\n    char*       tags;            /* the points flags                   */\n    short*      contours;        /* the contour end points             */\n\n    int         flags;           /* outline masks                      */\n\n  } FT_Outline;\n\n  /* */\n\n  /* Following limits must be consistent with */\n  /* FT_Outline.{n_contours,n_points}         */\n#define FT_OUTLINE_CONTOURS_MAX  SHRT_MAX\n#define FT_OUTLINE_POINTS_MAX    SHRT_MAX\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_OUTLINE_XXX                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit-field constants use for the flags in an outline's    */\n  /*    `flags' field.                                                     */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_OUTLINE_NONE ::                                                 */\n  /*      Value~0 is reserved.                                             */\n  /*                                                                       */\n  /*    FT_OUTLINE_OWNER ::                                                */\n  /*      If set, this flag indicates that the outline's field arrays      */\n  /*      (i.e., `points', `flags', and `contours') are `owned' by the     */\n  /*      outline object, and should thus be freed when it is destroyed.   */\n  /*                                                                       */\n  /*    FT_OUTLINE_EVEN_ODD_FILL ::                                        */\n  /*      By default, outlines are filled using the non-zero winding rule. */\n  /*      If set to 1, the outline will be filled using the even-odd fill  */\n  /*      rule (only works with the smooth rasterizer).                    */\n  /*                                                                       */\n  /*    FT_OUTLINE_REVERSE_FILL ::                                         */\n  /*      By default, outside contours of an outline are oriented in       */\n  /*      clock-wise direction, as defined in the TrueType specification.  */\n  /*      This flag is set if the outline uses the opposite direction      */\n  /*      (typically for Type~1 fonts).  This flag is ignored by the scan  */\n  /*      converter.                                                       */\n  /*                                                                       */\n  /*    FT_OUTLINE_IGNORE_DROPOUTS ::                                      */\n  /*      By default, the scan converter will try to detect drop-outs in   */\n  /*      an outline and correct the glyph bitmap to ensure consistent     */\n  /*      shape continuity.  If set, this flag hints the scan-line         */\n  /*      converter to ignore such cases.  See below for more information. */\n  /*                                                                       */\n  /*    FT_OUTLINE_SMART_DROPOUTS ::                                       */\n  /*      Select smart dropout control.  If unset, use simple dropout      */\n  /*      control.  Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set.  See    */\n  /*      below for more information.                                      */\n  /*                                                                       */\n  /*    FT_OUTLINE_INCLUDE_STUBS ::                                        */\n  /*      If set, turn pixels on for `stubs', otherwise exclude them.      */\n  /*      Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set.  See below for    */\n  /*      more information.                                                */\n  /*                                                                       */\n  /*    FT_OUTLINE_HIGH_PRECISION ::                                       */\n  /*      This flag indicates that the scan-line converter should try to   */\n  /*      convert this outline to bitmaps with the highest possible        */\n  /*      quality.  It is typically set for small character sizes.  Note   */\n  /*      that this is only a hint that might be completely ignored by a   */\n  /*      given scan-converter.                                            */\n  /*                                                                       */\n  /*    FT_OUTLINE_SINGLE_PASS ::                                          */\n  /*      This flag is set to force a given scan-converter to only use a   */\n  /*      single pass over the outline to render a bitmap glyph image.     */\n  /*      Normally, it is set for very large character sizes.  It is only  */\n  /*      a hint that might be completely ignored by a given               */\n  /*      scan-converter.                                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */\n  /*    and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth            */\n  /*    rasterizer.                                                        */\n  /*                                                                       */\n  /*    There exists a second mechanism to pass the drop-out mode to the   */\n  /*    B/W rasterizer; see the `tags' field in @FT_Outline.               */\n  /*                                                                       */\n  /*    Please refer to the description of the `SCANTYPE' instruction in   */\n  /*    the OpenType specification (in file `ttinst1.doc') how simple      */\n  /*    drop-outs, smart drop-outs, and stubs are defined.                 */\n  /*                                                                       */\n#define FT_OUTLINE_NONE             0x0\n#define FT_OUTLINE_OWNER            0x1\n#define FT_OUTLINE_EVEN_ODD_FILL    0x2\n#define FT_OUTLINE_REVERSE_FILL     0x4\n#define FT_OUTLINE_IGNORE_DROPOUTS  0x8\n#define FT_OUTLINE_SMART_DROPOUTS   0x10\n#define FT_OUTLINE_INCLUDE_STUBS    0x20\n\n#define FT_OUTLINE_HIGH_PRECISION   0x100\n#define FT_OUTLINE_SINGLE_PASS      0x200\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_OUTLINE_XXX' values instead                       */\n#define ft_outline_none             FT_OUTLINE_NONE\n#define ft_outline_owner            FT_OUTLINE_OWNER\n#define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL\n#define ft_outline_reverse_fill     FT_OUTLINE_REVERSE_FILL\n#define ft_outline_ignore_dropouts  FT_OUTLINE_IGNORE_DROPOUTS\n#define ft_outline_high_precision   FT_OUTLINE_HIGH_PRECISION\n#define ft_outline_single_pass      FT_OUTLINE_SINGLE_PASS\n\n  /* */\n\n#define FT_CURVE_TAG( flag )  ( flag & 3 )\n\n#define FT_CURVE_TAG_ON            1\n#define FT_CURVE_TAG_CONIC         0\n#define FT_CURVE_TAG_CUBIC         2\n\n#define FT_CURVE_TAG_HAS_SCANMODE  4\n\n#define FT_CURVE_TAG_TOUCH_X       8  /* reserved for the TrueType hinter */\n#define FT_CURVE_TAG_TOUCH_Y      16  /* reserved for the TrueType hinter */\n\n#define FT_CURVE_TAG_TOUCH_BOTH    ( FT_CURVE_TAG_TOUCH_X | \\\n                                     FT_CURVE_TAG_TOUCH_Y )\n\n#define FT_Curve_Tag_On       FT_CURVE_TAG_ON\n#define FT_Curve_Tag_Conic    FT_CURVE_TAG_CONIC\n#define FT_Curve_Tag_Cubic    FT_CURVE_TAG_CUBIC\n#define FT_Curve_Tag_Touch_X  FT_CURVE_TAG_TOUCH_X\n#define FT_Curve_Tag_Touch_Y  FT_CURVE_TAG_TOUCH_Y\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Outline_MoveToFunc                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function pointer type used to describe the signature of a `move  */\n  /*    to' function during outline walking/decomposition.                 */\n  /*                                                                       */\n  /*    A `move to' is emitted to start a new contour in an outline.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    to   :: A pointer to the target point of the `move to'.            */\n  /*                                                                       */\n  /*    user :: A typeless pointer, which is passed from the caller of the */\n  /*            decomposition function.                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  typedef int\n  (*FT_Outline_MoveToFunc)( const FT_Vector*  to,\n                            void*             user );\n\n#define FT_Outline_MoveTo_Func  FT_Outline_MoveToFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Outline_LineToFunc                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function pointer type used to describe the signature of a `line  */\n  /*    to' function during outline walking/decomposition.                 */\n  /*                                                                       */\n  /*    A `line to' is emitted to indicate a segment in the outline.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    to   :: A pointer to the target point of the `line to'.            */\n  /*                                                                       */\n  /*    user :: A typeless pointer, which is passed from the caller of the */\n  /*            decomposition function.                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  typedef int\n  (*FT_Outline_LineToFunc)( const FT_Vector*  to,\n                            void*             user );\n\n#define FT_Outline_LineTo_Func  FT_Outline_LineToFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Outline_ConicToFunc                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function pointer type used to describe the signature of a `conic */\n  /*    to' function during outline walking or decomposition.              */\n  /*                                                                       */\n  /*    A `conic to' is emitted to indicate a second-order Bézier arc in   */\n  /*    the outline.                                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    control :: An intermediate control point between the last position */\n  /*               and the new target in `to'.                             */\n  /*                                                                       */\n  /*    to      :: A pointer to the target end point of the conic arc.     */\n  /*                                                                       */\n  /*    user    :: A typeless pointer, which is passed from the caller of  */\n  /*               the decomposition function.                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  typedef int\n  (*FT_Outline_ConicToFunc)( const FT_Vector*  control,\n                             const FT_Vector*  to,\n                             void*             user );\n\n#define FT_Outline_ConicTo_Func  FT_Outline_ConicToFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Outline_CubicToFunc                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function pointer type used to describe the signature of a `cubic */\n  /*    to' function during outline walking or decomposition.              */\n  /*                                                                       */\n  /*    A `cubic to' is emitted to indicate a third-order Bézier arc.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    control1 :: A pointer to the first Bézier control point.           */\n  /*                                                                       */\n  /*    control2 :: A pointer to the second Bézier control point.          */\n  /*                                                                       */\n  /*    to       :: A pointer to the target end point.                     */\n  /*                                                                       */\n  /*    user     :: A typeless pointer, which is passed from the caller of */\n  /*                the decomposition function.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  typedef int\n  (*FT_Outline_CubicToFunc)( const FT_Vector*  control1,\n                             const FT_Vector*  control2,\n                             const FT_Vector*  to,\n                             void*             user );\n\n#define FT_Outline_CubicTo_Func  FT_Outline_CubicToFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Outline_Funcs                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure to hold various function pointers used during outline  */\n  /*    decomposition in order to emit segments, conic, and cubic Béziers. */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    move_to  :: The `move to' emitter.                                 */\n  /*                                                                       */\n  /*    line_to  :: The segment emitter.                                   */\n  /*                                                                       */\n  /*    conic_to :: The second-order Bézier arc emitter.                   */\n  /*                                                                       */\n  /*    cubic_to :: The third-order Bézier arc emitter.                    */\n  /*                                                                       */\n  /*    shift    :: The shift that is applied to coordinates before they   */\n  /*                are sent to the emitter.                               */\n  /*                                                                       */\n  /*    delta    :: The delta that is applied to coordinates before they   */\n  /*                are sent to the emitter, but after the shift.          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The point coordinates sent to the emitters are the transformed     */\n  /*    version of the original coordinates (this is important for high    */\n  /*    accuracy during scan-conversion).  The transformation is simple:   */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      x' = (x << shift) - delta                                        */\n  /*      y' = (x << shift) - delta                                        */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    Set the values of `shift' and `delta' to~0 to get the original     */\n  /*    point coordinates.                                                 */\n  /*                                                                       */\n  typedef struct  FT_Outline_Funcs_\n  {\n    FT_Outline_MoveToFunc   move_to;\n    FT_Outline_LineToFunc   line_to;\n    FT_Outline_ConicToFunc  conic_to;\n    FT_Outline_CubicToFunc  cubic_to;\n\n    int                     shift;\n    FT_Pos                  delta;\n\n  } FT_Outline_Funcs;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    basic_types                                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_IMAGE_TAG                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro converts four-letter tags to an unsigned long type.     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Since many 16-bit compilers don't like 32-bit enumerations, you    */\n  /*    should redefine this macro in case of problems to something like   */\n  /*    this:                                                              */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  value         */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    to get a simple enumeration without assigning special numbers.     */\n  /*                                                                       */\n#ifndef FT_IMAGE_TAG\n#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \\\n          value = ( ( (unsigned long)_x1 << 24 ) | \\\n                    ( (unsigned long)_x2 << 16 ) | \\\n                    ( (unsigned long)_x3 << 8  ) | \\\n                      (unsigned long)_x4         )\n#endif /* FT_IMAGE_TAG */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Glyph_Format                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration type used to describe the format of a given glyph   */\n  /*    image.  Note that this version of FreeType only supports two image */\n  /*    formats, even though future font drivers will be able to register  */\n  /*    their own format.                                                  */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_GLYPH_FORMAT_NONE ::                                            */\n  /*      The value~0 is reserved.                                         */\n  /*                                                                       */\n  /*    FT_GLYPH_FORMAT_COMPOSITE ::                                       */\n  /*      The glyph image is a composite of several other images.  This    */\n  /*      format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to   */\n  /*      report compound glyphs (like accented characters).               */\n  /*                                                                       */\n  /*    FT_GLYPH_FORMAT_BITMAP ::                                          */\n  /*      The glyph image is a bitmap, and can be described as an          */\n  /*      @FT_Bitmap.  You generally need to access the `bitmap' field of  */\n  /*      the @FT_GlyphSlotRec structure to read it.                       */\n  /*                                                                       */\n  /*    FT_GLYPH_FORMAT_OUTLINE ::                                         */\n  /*      The glyph image is a vectorial outline made of line segments     */\n  /*      and Bézier arcs; it can be described as an @FT_Outline; you      */\n  /*      generally want to access the `outline' field of the              */\n  /*      @FT_GlyphSlotRec structure to read it.                           */\n  /*                                                                       */\n  /*    FT_GLYPH_FORMAT_PLOTTER ::                                         */\n  /*      The glyph image is a vectorial path with no inside and outside   */\n  /*      contours.  Some Type~1 fonts, like those in the Hershey family,  */\n  /*      contain glyphs in this format.  These are described as           */\n  /*      @FT_Outline, but FreeType isn't currently capable of rendering   */\n  /*      them correctly.                                                  */\n  /*                                                                       */\n  typedef enum  FT_Glyph_Format_\n  {\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),\n\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )\n\n  } FT_Glyph_Format;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_Glyph_Format' values instead.                     */\n#define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE\n#define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE\n#define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP\n#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE\n#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****            R A S T E R   D E F I N I T I O N S                *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* A raster is a scan converter, in charge of rendering an outline into  */\n  /* a a bitmap.  This section contains the public API for rasters.        */\n  /*                                                                       */\n  /* Note that in FreeType 2, all rasters are now encapsulated within      */\n  /* specific modules called `renderers'.  See `ftrender.h' for more       */\n  /* details on renderers.                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    raster                                                             */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Scanline Converter                                                 */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    How vectorial outlines are converted into bitmaps and pixmaps.     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains technical definitions.                       */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_Raster                                                          */\n  /*    FT_Span                                                            */\n  /*    FT_SpanFunc                                                        */\n  /*                                                                       */\n  /*    FT_Raster_Params                                                   */\n  /*    FT_RASTER_FLAG_XXX                                                 */\n  /*                                                                       */\n  /*    FT_Raster_NewFunc                                                  */\n  /*    FT_Raster_DoneFunc                                                 */\n  /*    FT_Raster_ResetFunc                                                */\n  /*    FT_Raster_SetModeFunc                                              */\n  /*    FT_Raster_RenderFunc                                               */\n  /*    FT_Raster_Funcs                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Raster                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An opaque handle (pointer) to a raster object.  Each object can be */\n  /*    used independently to convert an outline into a bitmap or pixmap.  */\n  /*                                                                       */\n  typedef struct FT_RasterRec_*  FT_Raster;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Span                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a single span of gray pixels when        */\n  /*    rendering an anti-aliased bitmap.                                  */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    x        :: The span's horizontal start position.                  */\n  /*                                                                       */\n  /*    len      :: The span's length in pixels.                           */\n  /*                                                                       */\n  /*    coverage :: The span color/coverage, ranging from 0 (background)   */\n  /*                to 255 (foreground).                                   */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This structure is used by the span drawing callback type named     */\n  /*    @FT_SpanFunc that takes the y~coordinate of the span as a          */\n  /*    parameter.                                                         */\n  /*                                                                       */\n  /*    The coverage value is always between 0 and 255.  If you want less  */\n  /*    gray values, the callback function has to reduce them.             */\n  /*                                                                       */\n  typedef struct  FT_Span_\n  {\n    short           x;\n    unsigned short  len;\n    unsigned char   coverage;\n\n  } FT_Span;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_SpanFunc                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used as a call-back by the anti-aliased renderer in     */\n  /*    order to let client applications draw themselves the gray pixel    */\n  /*    spans on each scan line.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    y     :: The scanline's y~coordinate.                              */\n  /*                                                                       */\n  /*    count :: The number of spans to draw on this scanline.             */\n  /*                                                                       */\n  /*    spans :: A table of `count' spans to draw on the scanline.         */\n  /*                                                                       */\n  /*    user  :: User-supplied data that is passed to the callback.        */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This callback allows client applications to directly render the    */\n  /*    gray spans of the anti-aliased bitmap to any kind of surfaces.     */\n  /*                                                                       */\n  /*    This can be used to write anti-aliased outlines directly to a      */\n  /*    given background bitmap, and even perform translucency.            */\n  /*                                                                       */\n  /*    Note that the `count' field cannot be greater than a fixed value   */\n  /*    defined by the `FT_MAX_GRAY_SPANS' configuration macro in          */\n  /*    `ftoption.h'.  By default, this value is set to~32, which means    */\n  /*    that if there are more than 32~spans on a given scanline, the      */\n  /*    callback is called several times with the same `y' parameter in    */\n  /*    order to draw all callbacks.                                       */\n  /*                                                                       */\n  /*    Otherwise, the callback is only called once per scan-line, and     */\n  /*    only for those scanlines that do have `gray' pixels on them.       */\n  /*                                                                       */\n  typedef void\n  (*FT_SpanFunc)( int             y,\n                  int             count,\n                  const FT_Span*  spans,\n                  void*           user );\n\n#define FT_Raster_Span_Func  FT_SpanFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_BitTest_Func                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Deprecated, unimplemented.                                         */\n  /*                                                                       */\n  typedef int\n  (*FT_Raster_BitTest_Func)( int    y,\n                             int    x,\n                             void*  user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_BitSet_Func                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Deprecated, unimplemented.                                         */\n  /*                                                                       */\n  typedef void\n  (*FT_Raster_BitSet_Func)( int    y,\n                            int    x,\n                            void*  user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_RASTER_FLAG_XXX                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit flag constants as used in the `flags' field of a     */\n  /*    @FT_Raster_Params structure.                                       */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_RASTER_FLAG_DEFAULT :: This value is 0.                         */\n  /*                                                                       */\n  /*    FT_RASTER_FLAG_AA      :: This flag is set to indicate that an     */\n  /*                              anti-aliased glyph image should be       */\n  /*                              generated.  Otherwise, it will be        */\n  /*                              monochrome (1-bit).                      */\n  /*                                                                       */\n  /*    FT_RASTER_FLAG_DIRECT  :: This flag is set to indicate direct      */\n  /*                              rendering.  In this mode, client         */\n  /*                              applications must provide their own span */\n  /*                              callback.  This lets them directly       */\n  /*                              draw or compose over an existing bitmap. */\n  /*                              If this bit is not set, the target       */\n  /*                              pixmap's buffer _must_ be zeroed before  */\n  /*                              rendering.                               */\n  /*                                                                       */\n  /*                              Direct rendering is only possible with   */\n  /*                              anti-aliased glyphs.                     */\n  /*                                                                       */\n  /*    FT_RASTER_FLAG_CLIP    :: This flag is only used in direct         */\n  /*                              rendering mode.  If set, the output will */\n  /*                              be clipped to a box specified in the     */\n  /*                              `clip_box' field of the                  */\n  /*                              @FT_Raster_Params structure.             */\n  /*                                                                       */\n  /*                              Note that by default, the glyph bitmap   */\n  /*                              is clipped to the target pixmap, except  */\n  /*                              in direct rendering mode where all spans */\n  /*                              are generated if no clipping box is set. */\n  /*                                                                       */\n#define FT_RASTER_FLAG_DEFAULT  0x0\n#define FT_RASTER_FLAG_AA       0x1\n#define FT_RASTER_FLAG_DIRECT   0x2\n#define FT_RASTER_FLAG_CLIP     0x4\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_RASTER_FLAG_XXX' values instead                   */\n#define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT\n#define ft_raster_flag_aa       FT_RASTER_FLAG_AA\n#define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT\n#define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Raster_Params                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure to hold the arguments used by a raster's render        */\n  /*    function.                                                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    target      :: The target bitmap.                                  */\n  /*                                                                       */\n  /*    source      :: A pointer to the source glyph image (e.g., an       */\n  /*                   @FT_Outline).                                       */\n  /*                                                                       */\n  /*    flags       :: The rendering flags.                                */\n  /*                                                                       */\n  /*    gray_spans  :: The gray span drawing callback.                     */\n  /*                                                                       */\n  /*    black_spans :: Unused.                                             */\n  /*                                                                       */\n  /*    bit_test    :: Unused.                                             */\n  /*                                                                       */\n  /*    bit_set     :: Unused.                                             */\n  /*                                                                       */\n  /*    user        :: User-supplied data that is passed to each drawing   */\n  /*                   callback.                                           */\n  /*                                                                       */\n  /*    clip_box    :: An optional clipping box.  It is only used in       */\n  /*                   direct rendering mode.  Note that coordinates here  */\n  /*                   should be expressed in _integer_ pixels (and not in */\n  /*                   26.6 fixed-point units).                            */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA    */\n  /*    bit flag is set in the `flags' field, otherwise a monochrome       */\n  /*    bitmap is generated.                                               */\n  /*                                                                       */\n  /*    If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the      */\n  /*    raster will call the `gray_spans' callback to draw gray pixel      */\n  /*    spans.  This allows direct composition over a pre-existing bitmap  */\n  /*    through user-provided callbacks to perform the span drawing and    */\n  /*    composition.    Not supported by the monochrome rasterizer.        */\n  /*                                                                       */\n  typedef struct  FT_Raster_Params_\n  {\n    const FT_Bitmap*        target;\n    const void*             source;\n    int                     flags;\n    FT_SpanFunc             gray_spans;\n    FT_SpanFunc             black_spans;  /* unused */\n    FT_Raster_BitTest_Func  bit_test;     /* unused */\n    FT_Raster_BitSet_Func   bit_set;      /* unused */\n    void*                   user;\n    FT_BBox                 clip_box;\n\n  } FT_Raster_Params;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_NewFunc                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to create a new raster object.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory :: A handle to the memory allocator.                        */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    raster :: A handle to the new raster object.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The `memory' parameter is a typeless pointer in order to avoid     */\n  /*    un-wanted dependencies on the rest of the FreeType code.  In       */\n  /*    practice, it is an @FT_Memory object, i.e., a handle to the        */\n  /*    standard FreeType memory allocator.  However, this field can be    */\n  /*    completely ignored by a given raster implementation.               */\n  /*                                                                       */\n  typedef int\n  (*FT_Raster_NewFunc)( void*       memory,\n                        FT_Raster*  raster );\n\n#define FT_Raster_New_Func  FT_Raster_NewFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_DoneFunc                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to destroy a given raster object.                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    raster :: A handle to the raster object.                           */\n  /*                                                                       */\n  typedef void\n  (*FT_Raster_DoneFunc)( FT_Raster  raster );\n\n#define FT_Raster_Done_Func  FT_Raster_DoneFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_ResetFunc                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType provides an area of memory called the `render pool',      */\n  /*    available to all registered rasters.  This pool can be freely used */\n  /*    during a given scan-conversion but is shared by all rasters.  Its  */\n  /*    content is thus transient.                                         */\n  /*                                                                       */\n  /*    This function is called each time the render pool changes, or just */\n  /*    after a new raster object is created.                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    raster    :: A handle to the new raster object.                    */\n  /*                                                                       */\n  /*    pool_base :: The address in memory of the render pool.             */\n  /*                                                                       */\n  /*    pool_size :: The size in bytes of the render pool.                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Rasters can ignore the render pool and rely on dynamic memory      */\n  /*    allocation if they want to (a handle to the memory allocator is    */\n  /*    passed to the raster constructor).  However, this is not           */\n  /*    recommended for efficiency purposes.                               */\n  /*                                                                       */\n  typedef void\n  (*FT_Raster_ResetFunc)( FT_Raster       raster,\n                          unsigned char*  pool_base,\n                          unsigned long   pool_size );\n\n#define FT_Raster_Reset_Func  FT_Raster_ResetFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_SetModeFunc                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is a generic facility to change modes or attributes  */\n  /*    in a given raster.  This can be used for debugging purposes, or    */\n  /*    simply to allow implementation-specific `features' in a given      */\n  /*    raster module.                                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    raster :: A handle to the new raster object.                       */\n  /*                                                                       */\n  /*    mode   :: A 4-byte tag used to name the mode or property.          */\n  /*                                                                       */\n  /*    args   :: A pointer to the new mode/property to use.               */\n  /*                                                                       */\n  typedef int\n  (*FT_Raster_SetModeFunc)( FT_Raster      raster,\n                            unsigned long  mode,\n                            void*          args );\n\n#define FT_Raster_Set_Mode_Func  FT_Raster_SetModeFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_RenderFunc                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Invoke a given raster to scan-convert a given glyph image into a   */\n  /*    target bitmap.                                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    raster :: A handle to the raster object.                           */\n  /*                                                                       */\n  /*    params :: A pointer to an @FT_Raster_Params structure used to      */\n  /*              store the rendering parameters.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The exact format of the source image depends on the raster's glyph */\n  /*    format defined in its @FT_Raster_Funcs structure.  It can be an    */\n  /*    @FT_Outline or anything else in order to support a large array of  */\n  /*    glyph formats.                                                     */\n  /*                                                                       */\n  /*    Note also that the render function can fail and return a           */\n  /*    `FT_Err_Unimplemented_Feature' error code if the raster used does  */\n  /*    not support direct composition.                                    */\n  /*                                                                       */\n  /*    XXX: For now, the standard raster doesn't support direct           */\n  /*         composition but this should change for the final release (see */\n  /*         the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c'    */\n  /*         for examples of distinct implementations that support direct  */\n  /*         composition).                                                 */\n  /*                                                                       */\n  typedef int\n  (*FT_Raster_RenderFunc)( FT_Raster                raster,\n                           const FT_Raster_Params*  params );\n\n#define FT_Raster_Render_Func  FT_Raster_RenderFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Raster_Funcs                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   A structure used to describe a given raster class to the library.   */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    glyph_format  :: The supported glyph format for this raster.       */\n  /*                                                                       */\n  /*    raster_new    :: The raster constructor.                           */\n  /*                                                                       */\n  /*    raster_reset  :: Used to reset the render pool within the raster.  */\n  /*                                                                       */\n  /*    raster_render :: A function to render a glyph into a given bitmap. */\n  /*                                                                       */\n  /*    raster_done   :: The raster destructor.                            */\n  /*                                                                       */\n  typedef struct  FT_Raster_Funcs_\n  {\n    FT_Glyph_Format        glyph_format;\n    FT_Raster_NewFunc      raster_new;\n    FT_Raster_ResetFunc    raster_reset;\n    FT_Raster_SetModeFunc  raster_set_mode;\n    FT_Raster_RenderFunc   raster_render;\n    FT_Raster_DoneFunc     raster_done;\n\n  } FT_Raster_Funcs;\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTIMAGE_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftincrem.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftincrem.h                                                             */\n/*                                                                         */\n/*    FreeType incremental loading (specification).                        */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2006-2008, 2010, 2014 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTINCREM_H__\n#define __FTINCREM_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /***************************************************************************\n   *\n   * @section:\n   *    incremental\n   *\n   * @title:\n   *    Incremental Loading\n   *\n   * @abstract:\n   *    Custom Glyph Loading.\n   *\n   * @description:\n   *   This section contains various functions used to perform so-called\n   *   `incremental' glyph loading.  This is a mode where all glyphs loaded\n   *   from a given @FT_Face are provided by the client application.\n   *\n   *   Apart from that, all other tables are loaded normally from the font\n   *   file.  This mode is useful when FreeType is used within another\n   *   engine, e.g., a PostScript Imaging Processor.\n   *\n   *   To enable this mode, you must use @FT_Open_Face, passing an\n   *   @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an\n   *   @FT_Incremental_Interface value.  See the comments for\n   *   @FT_Incremental_InterfaceRec for an example.\n   *\n   */\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental\n   *\n   * @description:\n   *   An opaque type describing a user-provided object used to implement\n   *   `incremental' glyph loading within FreeType.  This is used to support\n   *   embedded fonts in certain environments (e.g., PostScript interpreters),\n   *   where the glyph data isn't in the font file, or must be overridden by\n   *   different values.\n   *\n   * @note:\n   *   It is up to client applications to create and implement @FT_Incremental\n   *   objects, as long as they provide implementations for the methods\n   *   @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc\n   *   and @FT_Incremental_GetGlyphMetricsFunc.\n   *\n   *   See the description of @FT_Incremental_InterfaceRec to understand how\n   *   to use incremental objects with FreeType.\n   *\n   */\n  typedef struct FT_IncrementalRec_*  FT_Incremental;\n\n\n  /***************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_MetricsRec\n   *\n   * @description:\n   *   A small structure used to contain the basic glyph metrics returned\n   *   by the @FT_Incremental_GetGlyphMetricsFunc method.\n   *\n   * @fields:\n   *   bearing_x ::\n   *     Left bearing, in font units.\n   *\n   *   bearing_y ::\n   *     Top bearing, in font units.\n   *\n   *   advance ::\n   *     Horizontal component of glyph advance, in font units.\n   *\n   *   advance_v ::\n   *     Vertical component of glyph advance, in font units.\n   *\n   * @note:\n   *   These correspond to horizontal or vertical metrics depending on the\n   *   value of the `vertical' argument to the function\n   *   @FT_Incremental_GetGlyphMetricsFunc.\n   *\n   */\n  typedef struct  FT_Incremental_MetricsRec_\n  {\n    FT_Long  bearing_x;\n    FT_Long  bearing_y;\n    FT_Long  advance;\n    FT_Long  advance_v;     /* since 2.3.12 */\n\n  } FT_Incremental_MetricsRec;\n\n\n  /***************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_Metrics\n   *\n   * @description:\n   *   A handle to an @FT_Incremental_MetricsRec structure.\n   *\n   */\n   typedef struct FT_Incremental_MetricsRec_*  FT_Incremental_Metrics;\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_GetGlyphDataFunc\n   *\n   * @description:\n   *   A function called by FreeType to access a given glyph's data bytes\n   *   during @FT_Load_Glyph or @FT_Load_Char if incremental loading is\n   *   enabled.\n   *\n   *   Note that the format of the glyph's data bytes depends on the font\n   *   file format.  For TrueType, it must correspond to the raw bytes within\n   *   the `glyf' table.  For PostScript formats, it must correspond to the\n   *   *unencrypted* charstring bytes, without any `lenIV' header.  It is\n   *   undefined for any other format.\n   *\n   * @input:\n   *   incremental ::\n   *     Handle to an opaque @FT_Incremental handle provided by the client\n   *     application.\n   *\n   *   glyph_index ::\n   *     Index of relevant glyph.\n   *\n   * @output:\n   *   adata ::\n   *     A structure describing the returned glyph data bytes (which will be\n   *     accessed as a read-only byte block).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If this function returns successfully the method\n   *   @FT_Incremental_FreeGlyphDataFunc will be called later to release\n   *   the data bytes.\n   *\n   *   Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for\n   *   compound glyphs.\n   *\n   */\n  typedef FT_Error\n  (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental  incremental,\n                                      FT_UInt         glyph_index,\n                                      FT_Data*        adata );\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_FreeGlyphDataFunc\n   *\n   * @description:\n   *   A function used to release the glyph data bytes returned by a\n   *   successful call to @FT_Incremental_GetGlyphDataFunc.\n   *\n   * @input:\n   *   incremental ::\n   *     A handle to an opaque @FT_Incremental handle provided by the client\n   *     application.\n   *\n   *   data ::\n   *     A structure describing the glyph data bytes (which will be accessed\n   *     as a read-only byte block).\n   *\n   */\n  typedef void\n  (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental  incremental,\n                                       FT_Data*        data );\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_GetGlyphMetricsFunc\n   *\n   * @description:\n   *   A function used to retrieve the basic metrics of a given glyph index\n   *   before accessing its data.  This is necessary because, in certain\n   *   formats like TrueType, the metrics are stored in a different place from\n   *   the glyph images proper.\n   *\n   * @input:\n   *   incremental ::\n   *     A handle to an opaque @FT_Incremental handle provided by the client\n   *     application.\n   *\n   *   glyph_index ::\n   *     Index of relevant glyph.\n   *\n   *   vertical ::\n   *     If true, return vertical metrics.\n   *\n   *   ametrics ::\n   *     This parameter is used for both input and output.\n   *     The original glyph metrics, if any, in font units.  If metrics are\n   *     not available all the values must be set to zero.\n   *\n   * @output:\n   *   ametrics ::\n   *     The replacement glyph metrics in font units.\n   *\n   */\n  typedef FT_Error\n  (*FT_Incremental_GetGlyphMetricsFunc)\n                      ( FT_Incremental              incremental,\n                        FT_UInt                     glyph_index,\n                        FT_Bool                     vertical,\n                        FT_Incremental_MetricsRec  *ametrics );\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_FuncsRec\n   *\n   * @description:\n   *   A table of functions for accessing fonts that load data\n   *   incrementally.  Used in @FT_Incremental_InterfaceRec.\n   *\n   * @fields:\n   *   get_glyph_data ::\n   *     The function to get glyph data.  Must not be null.\n   *\n   *   free_glyph_data ::\n   *     The function to release glyph data.  Must not be null.\n   *\n   *   get_glyph_metrics ::\n   *     The function to get glyph metrics.  May be null if the font does\n   *     not provide overriding glyph metrics.\n   *\n   */\n  typedef struct  FT_Incremental_FuncsRec_\n  {\n    FT_Incremental_GetGlyphDataFunc     get_glyph_data;\n    FT_Incremental_FreeGlyphDataFunc    free_glyph_data;\n    FT_Incremental_GetGlyphMetricsFunc  get_glyph_metrics;\n\n  } FT_Incremental_FuncsRec;\n\n\n  /***************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_InterfaceRec\n   *\n   * @description:\n   *   A structure to be used with @FT_Open_Face to indicate that the user\n   *   wants to support incremental glyph loading.  You should use it with\n   *   @FT_PARAM_TAG_INCREMENTAL as in the following example:\n   *\n   *     {\n   *       FT_Incremental_InterfaceRec  inc_int;\n   *       FT_Parameter                 parameter;\n   *       FT_Open_Args                 open_args;\n   *\n   *\n   *       // set up incremental descriptor\n   *       inc_int.funcs  = my_funcs;\n   *       inc_int.object = my_object;\n   *\n   *       // set up optional parameter\n   *       parameter.tag  = FT_PARAM_TAG_INCREMENTAL;\n   *       parameter.data = &inc_int;\n   *\n   *       // set up FT_Open_Args structure\n   *       open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;\n   *       open_args.pathname   = my_font_pathname;\n   *       open_args.num_params = 1;\n   *       open_args.params     = &parameter; // we use one optional argument\n   *\n   *       // open the font\n   *       error = FT_Open_Face( library, &open_args, index, &face );\n   *       ...\n   *     }\n   *\n   */\n  typedef struct  FT_Incremental_InterfaceRec_\n  {\n    const FT_Incremental_FuncsRec*  funcs;\n    FT_Incremental                  object;\n\n  } FT_Incremental_InterfaceRec;\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_Interface\n   *\n   * @description:\n   *   A pointer to an @FT_Incremental_InterfaceRec structure.\n   *\n   */\n  typedef FT_Incremental_InterfaceRec*   FT_Incremental_Interface;\n\n\n  /***************************************************************************\n   *\n   * @constant:\n   *   FT_PARAM_TAG_INCREMENTAL\n   *\n   * @description:\n   *   A constant used as the tag of @FT_Parameter structures to indicate\n   *   an incremental loading object to be used by FreeType.\n   *\n   */\n#define FT_PARAM_TAG_INCREMENTAL  FT_MAKE_TAG( 'i', 'n', 'c', 'r' )\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTINCREM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftlcdfil.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftlcdfil.h                                                             */\n/*                                                                         */\n/*    FreeType API for color filtering of subpixel bitmap glyphs           */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2006-2008, 2010, 2013, 2014 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FT_LCD_FILTER_H__\n#define __FT_LCD_FILTER_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /***************************************************************************\n   *\n   * @section:\n   *   lcd_filtering\n   *\n   * @title:\n   *   LCD Filtering\n   *\n   * @abstract:\n   *   Reduce color fringes of LCD-optimized bitmaps.\n   *\n   * @description:\n   *   The @FT_Library_SetLcdFilter API can be used to specify a low-pass\n   *   filter, which is then applied to LCD-optimized bitmaps generated\n   *   through @FT_Render_Glyph.  This is useful to reduce color fringes\n   *   that would occur with unfiltered rendering.\n   *\n   *   Note that no filter is active by default, and that this function is\n   *   *not* implemented in default builds of the library.  You need to\n   *   #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file\n   *   in order to activate it.\n   *\n   *   FreeType generates alpha coverage maps, which are linear by nature.\n   *   For instance, the value 0x80 in bitmap representation means that\n   *   (within numerical precision) 0x80/0xFF fraction of that pixel is\n   *   covered by the glyph's outline.  The blending function for placing\n   *   text over a background is\n   *\n   *   {\n   *     dst = alpha * src + (1 - alpha) * dst    ,\n   *   }\n   *\n   *   which is known as OVER.  However, when calculating the output of the\n   *   OVER operator, the source colors should first be transformed to a\n   *   linear color space, then alpha blended in that space, and transformed\n   *   back to the output color space.\n   *\n   *   When linear light blending is used, the default FIR5 filtering\n   *   weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as\n   *   they have been designed for black on white rendering while lacking\n   *   gamma correction.  To preserve color neutrality, weights for a FIR5\n   *   filter should be chosen according to two free parameters `a' and `c',\n   *   and the FIR weights should be\n   *\n   *   {\n   *     [a - c, a + c, 2 * a, a + c, a - c]    .\n   *   }\n   *\n   *   This formula generates equal weights for all the color primaries\n   *   across the filter kernel, which makes it colorless.  One suggested\n   *   set of weights is\n   *\n   *   {\n   *     [0x10, 0x50, 0x60, 0x50, 0x10]    ,\n   *   }\n   *\n   *   where `a' has value 0x30 and `b' value 0x20.  The weights in filter\n   *   may have a sum larger than 0x100, which increases coloration slightly\n   *   but also improves contrast.\n   */\n\n\n  /****************************************************************************\n   *\n   * @enum:\n   *   FT_LcdFilter\n   *\n   * @description:\n   *   A list of values to identify various types of LCD filters.\n   *\n   * @values:\n   *   FT_LCD_FILTER_NONE ::\n   *     Do not perform filtering.  When used with subpixel rendering, this\n   *     results in sometimes severe color fringes.\n   *\n   *   FT_LCD_FILTER_DEFAULT ::\n   *     The default filter reduces color fringes considerably, at the cost\n   *     of a slight blurriness in the output.\n   *\n   *   FT_LCD_FILTER_LIGHT ::\n   *     The light filter is a variant that produces less blurriness at the\n   *     cost of slightly more color fringes than the default one.  It might\n   *     be better, depending on taste, your monitor, or your personal vision.\n   *\n   *   FT_LCD_FILTER_LEGACY ::\n   *     This filter corresponds to the original libXft color filter.  It\n   *     provides high contrast output but can exhibit really bad color\n   *     fringes if glyphs are not extremely well hinted to the pixel grid.\n   *     In other words, it only works well if the TrueType bytecode\n   *     interpreter is enabled *and* high-quality hinted fonts are used.\n   *\n   *     This filter is only provided for comparison purposes, and might be\n   *     disabled or stay unsupported in the future.\n   *\n   * @since:\n   *   2.3.0\n   */\n  typedef enum  FT_LcdFilter_\n  {\n    FT_LCD_FILTER_NONE    = 0,\n    FT_LCD_FILTER_DEFAULT = 1,\n    FT_LCD_FILTER_LIGHT   = 2,\n    FT_LCD_FILTER_LEGACY  = 16,\n\n    FT_LCD_FILTER_MAX   /* do not remove */\n\n  } FT_LcdFilter;\n\n\n  /**************************************************************************\n   *\n   * @func:\n   *   FT_Library_SetLcdFilter\n   *\n   * @description:\n   *   This function is used to apply color filtering to LCD decimated\n   *   bitmaps, like the ones used when calling @FT_Render_Glyph with\n   *   @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the target library instance.\n   *\n   *   filter ::\n   *     The filter type.\n   *\n   *     You can use @FT_LCD_FILTER_NONE here to disable this feature, or\n   *     @FT_LCD_FILTER_DEFAULT to use a default filter that should work\n   *     well on most LCD screens.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This feature is always disabled by default.  Clients must make an\n   *   explicit call to this function with a `filter' value other than\n   *   @FT_LCD_FILTER_NONE in order to enable it.\n   *\n   *   Due to *PATENTS* covering subpixel rendering, this function doesn't\n   *   do anything except returning `FT_Err_Unimplemented_Feature' if the\n   *   configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not\n   *   defined in your build of the library, which should correspond to all\n   *   default builds of FreeType.\n   *\n   *   The filter affects glyph bitmaps rendered through @FT_Render_Glyph,\n   *   @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char.\n   *\n   *   It does _not_ affect the output of @FT_Outline_Render and\n   *   @FT_Outline_Get_Bitmap.\n   *\n   *   If this feature is activated, the dimensions of LCD glyph bitmaps are\n   *   either larger or taller than the dimensions of the corresponding\n   *   outline with regards to the pixel grid.  For example, for\n   *   @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and\n   *   up to 3~pixels to the right.\n   *\n   *   The bitmap offset values are adjusted correctly, so clients shouldn't\n   *   need to modify their layout and glyph positioning code when enabling\n   *   the filter.\n   *\n   * @since:\n   *   2.3.0\n   */\n  FT_EXPORT( FT_Error )\n  FT_Library_SetLcdFilter( FT_Library    library,\n                           FT_LcdFilter  filter );\n\n\n  /**************************************************************************\n   *\n   * @func:\n   *   FT_Library_SetLcdFilterWeights\n   *\n   * @description:\n   *   Use this function to override the filter weights selected by\n   *   @FT_Library_SetLcdFilter.  By default, FreeType uses the quintuple\n   *   (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,\n   *   0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and\n   *   FT_LCD_FILTER_LEGACY.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the target library instance.\n   *\n   *   weights ::\n   *     A pointer to an array; the function copies the first five bytes and\n   *     uses them to specify the filter weights.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Due to *PATENTS* covering subpixel rendering, this function doesn't\n   *   do anything except returning `FT_Err_Unimplemented_Feature' if the\n   *   configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not\n   *   defined in your build of the library, which should correspond to all\n   *   default builds of FreeType.\n   *\n   *   This function must be called after @FT_Library_SetLcdFilter to have\n   *   any effect.\n   *\n   * @since:\n   *   2.4.0\n   */\n  FT_EXPORT( FT_Error )\n  FT_Library_SetLcdFilterWeights( FT_Library      library,\n                                  unsigned char  *weights );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FT_LCD_FILTER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftlist.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftlist.h                                                               */\n/*                                                                         */\n/*    Generic list support for FreeType (specification).                   */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2007, 2010, 2013, 2014 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  This file implements functions relative to list processing.  Its     */\n  /*  data structures are defined in `freetype.h'.                         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTLIST_H__\n#define __FTLIST_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    list_processing                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    List Processing                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Simple management of lists.                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains various definitions related to list          */\n  /*    processing using doubly-linked nodes.                              */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_List                                                            */\n  /*    FT_ListNode                                                        */\n  /*    FT_ListRec                                                         */\n  /*    FT_ListNodeRec                                                     */\n  /*                                                                       */\n  /*    FT_List_Add                                                        */\n  /*    FT_List_Insert                                                     */\n  /*    FT_List_Find                                                       */\n  /*    FT_List_Remove                                                     */\n  /*    FT_List_Up                                                         */\n  /*    FT_List_Iterate                                                    */\n  /*    FT_List_Iterator                                                   */\n  /*    FT_List_Finalize                                                   */\n  /*    FT_List_Destructor                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Find                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Find the list node for a given listed object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    list :: A pointer to the parent list.                              */\n  /*    data :: The address of the listed object.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    List node.  NULL if it wasn't found.                               */\n  /*                                                                       */\n  FT_EXPORT( FT_ListNode )\n  FT_List_Find( FT_List  list,\n                void*    data );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Add                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Append an element to the end of a list.                            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    list :: A pointer to the parent list.                              */\n  /*    node :: The node to append.                                        */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Add( FT_List      list,\n               FT_ListNode  node );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Insert                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Insert an element at the head of a list.                           */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    list :: A pointer to parent list.                                  */\n  /*    node :: The node to insert.                                        */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Insert( FT_List      list,\n                  FT_ListNode  node );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Remove                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Remove a node from a list.  This function doesn't check whether    */\n  /*    the node is in the list!                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    node :: The node to remove.                                        */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    list :: A pointer to the parent list.                              */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Remove( FT_List      list,\n                  FT_ListNode  node );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Up                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Move a node to the head/top of a list.  Used to maintain LRU       */\n  /*    lists.                                                             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    list :: A pointer to the parent list.                              */\n  /*    node :: The node to move.                                          */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Up( FT_List      list,\n              FT_ListNode  node );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_List_Iterator                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An FT_List iterator function that is called during a list parse    */\n  /*    by @FT_List_Iterate.                                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    node :: The current iteration list node.                           */\n  /*                                                                       */\n  /*    user :: A typeless pointer passed to @FT_List_Iterate.             */\n  /*            Can be used to point to the iteration's state.             */\n  /*                                                                       */\n  typedef FT_Error\n  (*FT_List_Iterator)( FT_ListNode  node,\n                       void*        user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Iterate                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Parse a list and calls a given iterator function on each element.  */\n  /*    Note that parsing is stopped as soon as one of the iterator calls  */\n  /*    returns a non-zero value.                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    list     :: A handle to the list.                                  */\n  /*    iterator :: An iterator function, called on each node of the list. */\n  /*    user     :: A user-supplied field that is passed as the second     */\n  /*                argument to the iterator.                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result (a FreeType error code) of the last iterator call.      */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_List_Iterate( FT_List           list,\n                   FT_List_Iterator  iterator,\n                   void*             user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_List_Destructor                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An @FT_List iterator function that is called during a list         */\n  /*    finalization by @FT_List_Finalize to destroy all elements in a     */\n  /*    given list.                                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    system :: The current system object.                               */\n  /*                                                                       */\n  /*    data   :: The current object to destroy.                           */\n  /*                                                                       */\n  /*    user   :: A typeless pointer passed to @FT_List_Iterate.  It can   */\n  /*              be used to point to the iteration's state.               */\n  /*                                                                       */\n  typedef void\n  (*FT_List_Destructor)( FT_Memory  memory,\n                         void*      data,\n                         void*      user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Finalize                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy all elements in the list as well as the list itself.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    list    :: A handle to the list.                                   */\n  /*                                                                       */\n  /*    destroy :: A list destructor that will be applied to each element  */\n  /*               of the list.  Set this to NULL if not needed.           */\n  /*                                                                       */\n  /*    memory  :: The current memory object that handles deallocation.    */\n  /*                                                                       */\n  /*    user    :: A user-supplied field that is passed as the last        */\n  /*               argument to the destructor.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function expects that all nodes added by @FT_List_Add or      */\n  /*    @FT_List_Insert have been dynamically allocated.                   */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Finalize( FT_List             list,\n                    FT_List_Destructor  destroy,\n                    FT_Memory           memory,\n                    void*               user );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTLIST_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftlzw.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftlzw.h                                                                */\n/*                                                                         */\n/*    LZW-compressed stream support.                                       */\n/*                                                                         */\n/*  Copyright 2004, 2006 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTLZW_H__\n#define __FTLZW_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    lzw                                                                */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    LZW Streams                                                        */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Using LZW-compressed font files.                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of LZW-specific functions.   */\n  /*                                                                       */\n  /*************************************************************************/\n\n /************************************************************************\n  *\n  * @function:\n  *   FT_Stream_OpenLZW\n  *\n  * @description:\n  *   Open a new stream to parse LZW-compressed font files.  This is\n  *   mainly used to support the compressed `*.pcf.Z' fonts that come\n  *   with XFree86.\n  *\n  * @input:\n  *   stream :: The target embedding stream.\n  *\n  *   source :: The source stream.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   The source stream must be opened _before_ calling this function.\n  *\n  *   Calling the internal function `FT_Stream_Close' on the new stream will\n  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream\n  *   objects will be released to the heap.\n  *\n  *   The stream implementation is very basic and resets the decompression\n  *   process each time seeking backwards is needed within the stream\n  *\n  *   In certain builds of the library, LZW compression recognition is\n  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.\n  *   This means that if no font driver is capable of handling the raw\n  *   compressed file, the library will try to open a LZW stream from it\n  *   and re-open the face with it.\n  *\n  *   This function may return `FT_Err_Unimplemented_Feature' if your build\n  *   of FreeType was not compiled with LZW support.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Stream_OpenLZW( FT_Stream  stream,\n                     FT_Stream  source );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTLZW_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftmac.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmac.h                                                                */\n/*                                                                         */\n/*    Additional Mac-specific API.                                         */\n/*                                                                         */\n/*  Copyright 1996-2001, 2004, 2006, 2007, 2013 by                         */\n/*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* NOTE: Include this file after FT_FREETYPE_H and after any               */\n/*       Mac-specific headers (because this header uses Mac types such as  */\n/*       Handle, FSSpec, FSRef, etc.)                                      */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTMAC_H__\n#define __FTMAC_H__\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n\n/* gcc-3.4.1 and later can warn about functions tagged as deprecated */\n#ifndef FT_DEPRECATED_ATTRIBUTE\n#if defined(__GNUC__)                                               && \\\n    ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))\n#define FT_DEPRECATED_ATTRIBUTE  __attribute__((deprecated))\n#else\n#define FT_DEPRECATED_ATTRIBUTE\n#endif\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    mac_specific                                                       */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Mac Specific Interface                                             */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Only available on the Macintosh.                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The following definitions are only available if FreeType is        */\n  /*    compiled on a Macintosh.                                           */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face_From_FOND                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new face object from a FOND resource.                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    fond       :: A FOND resource.                                     */\n  /*                                                                       */\n  /*    face_index :: Only supported for the -1 `sanity check' special     */\n  /*                  case.                                                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Notes>                                                               */\n  /*    This function can be used to create @FT_Face objects from fonts    */\n  /*    that are installed in the system as follows.                       */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      fond = GetResource( 'FOND', fontName );                          */\n  /*      error = FT_New_Face_From_FOND( library, fond, 0, &face );        */\n  /*    }                                                                  */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Face_From_FOND( FT_Library  library,\n                         Handle      fond,\n                         FT_Long     face_index,\n                         FT_Face    *aface )\n                       FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_GetFile_From_Mac_Name                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return an FSSpec for the disk file containing the named font.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    fontName   :: Mac OS name of the font (e.g., Times New Roman       */\n  /*                  Bold).                                               */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    pathSpec   :: FSSpec to the file.  For passing to                  */\n  /*                  @FT_New_Face_From_FSSpec.                            */\n  /*                                                                       */\n  /*    face_index :: Index of the face.  For passing to                   */\n  /*                  @FT_New_Face_From_FSSpec.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_GetFile_From_Mac_Name( const char*  fontName,\n                            FSSpec*      pathSpec,\n                            FT_Long*     face_index )\n                          FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_GetFile_From_Mac_ATS_Name                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return an FSSpec for the disk file containing the named font.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    fontName   :: Mac OS name of the font in ATS framework.            */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    pathSpec   :: FSSpec to the file. For passing to                   */\n  /*                  @FT_New_Face_From_FSSpec.                            */\n  /*                                                                       */\n  /*    face_index :: Index of the face. For passing to                    */\n  /*                  @FT_New_Face_From_FSSpec.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_GetFile_From_Mac_ATS_Name( const char*  fontName,\n                                FSSpec*      pathSpec,\n                                FT_Long*     face_index )\n                              FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_GetFilePath_From_Mac_ATS_Name                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a pathname of the disk file and face index for given font   */\n  /*    name that is handled by ATS framework.                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    fontName    :: Mac OS name of the font in ATS framework.           */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    path        :: Buffer to store pathname of the file.  For passing  */\n  /*                   to @FT_New_Face.  The client must allocate this     */\n  /*                   buffer before calling this function.                */\n  /*                                                                       */\n  /*    maxPathSize :: Lengths of the buffer `path' that client allocated. */\n  /*                                                                       */\n  /*    face_index  :: Index of the face.  For passing to @FT_New_Face.    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_GetFilePath_From_Mac_ATS_Name( const char*  fontName,\n                                    UInt8*       path,\n                                    UInt32       maxPathSize,\n                                    FT_Long*     face_index )\n                                  FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face_From_FSSpec                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new face object from a given resource and typeface index  */\n  /*    using an FSSpec to the font file.                                  */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    spec       :: FSSpec to the font file.                             */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the resource.  The      */\n  /*                  first face has index~0.                              */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    @FT_New_Face_From_FSSpec is identical to @FT_New_Face except       */\n  /*    it accepts an FSSpec instead of a path.                            */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Face_From_FSSpec( FT_Library     library,\n                           const FSSpec  *spec,\n                           FT_Long        face_index,\n                           FT_Face       *aface )\n                         FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face_From_FSRef                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new face object from a given resource and typeface index  */\n  /*    using an FSRef to the font file.                                   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    spec       :: FSRef to the font file.                              */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the resource.  The      */\n  /*                  first face has index~0.                              */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    @FT_New_Face_From_FSRef is identical to @FT_New_Face except        */\n  /*    it accepts an FSRef instead of a path.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Face_From_FSRef( FT_Library    library,\n                          const FSRef  *ref,\n                          FT_Long       face_index,\n                          FT_Face      *aface )\n                        FT_DEPRECATED_ATTRIBUTE;\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __FTMAC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftmm.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmm.h                                                                 */\n/*                                                                         */\n/*    FreeType Multiple Master font interface (specification).             */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTMM_H__\n#define __FTMM_H__\n\n\n#include <ft2build.h>\n#include FT_TYPE1_TABLES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    multiple_masters                                                   */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Multiple Masters                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    How to manage Multiple Masters fonts.                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The following types and functions are used to manage Multiple      */\n  /*    Master fonts, i.e., the selection of specific design instances by  */\n  /*    setting design axis coordinates.                                   */\n  /*                                                                       */\n  /*    George Williams has extended this interface to make it work with   */\n  /*    both Type~1 Multiple Masters fonts and GX distortable (var)        */\n  /*    fonts.  Some of these routines only work with MM fonts, others     */\n  /*    will work with both types.  They are similar enough that a         */\n  /*    consistent interface makes sense.                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_MM_Axis                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to model a given axis in design space for  */\n  /*    Multiple Masters fonts.                                            */\n  /*                                                                       */\n  /*    This structure can't be used for GX var fonts.                     */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    name    :: The axis's name.                                        */\n  /*                                                                       */\n  /*    minimum :: The axis's minimum design coordinate.                   */\n  /*                                                                       */\n  /*    maximum :: The axis's maximum design coordinate.                   */\n  /*                                                                       */\n  typedef struct  FT_MM_Axis_\n  {\n    FT_String*  name;\n    FT_Long     minimum;\n    FT_Long     maximum;\n\n  } FT_MM_Axis;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Multi_Master                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model the axes and space of a Multiple Masters */\n  /*    font.                                                              */\n  /*                                                                       */\n  /*    This structure can't be used for GX var fonts.                     */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_axis    :: Number of axes.  Cannot exceed~4.                   */\n  /*                                                                       */\n  /*    num_designs :: Number of designs; should be normally 2^num_axis    */\n  /*                   even though the Type~1 specification strangely      */\n  /*                   allows for intermediate designs to be present. This */\n  /*                   number cannot exceed~16.                            */\n  /*                                                                       */\n  /*    axis        :: A table of axis descriptors.                        */\n  /*                                                                       */\n  typedef struct  FT_Multi_Master_\n  {\n    FT_UInt     num_axis;\n    FT_UInt     num_designs;\n    FT_MM_Axis  axis[T1_MAX_MM_AXIS];\n\n  } FT_Multi_Master;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Var_Axis                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to model a given axis in design space for  */\n  /*    Multiple Masters and GX var fonts.                                 */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    name    :: The axis's name.                                        */\n  /*               Not always meaningful for GX.                           */\n  /*                                                                       */\n  /*    minimum :: The axis's minimum design coordinate.                   */\n  /*                                                                       */\n  /*    def     :: The axis's default design coordinate.                   */\n  /*               FreeType computes meaningful default values for MM; it  */\n  /*               is then an integer value, not in 16.16 format.          */\n  /*                                                                       */\n  /*    maximum :: The axis's maximum design coordinate.                   */\n  /*                                                                       */\n  /*    tag     :: The axis's tag (the GX equivalent to `name').           */\n  /*               FreeType provides default values for MM if possible.    */\n  /*                                                                       */\n  /*    strid   :: The entry in `name' table (another GX version of        */\n  /*               `name').                                                */\n  /*               Not meaningful for MM.                                  */\n  /*                                                                       */\n  typedef struct  FT_Var_Axis_\n  {\n    FT_String*  name;\n\n    FT_Fixed    minimum;\n    FT_Fixed    def;\n    FT_Fixed    maximum;\n\n    FT_ULong    tag;\n    FT_UInt     strid;\n\n  } FT_Var_Axis;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Var_Named_Style                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to model a named style in a GX var font.   */\n  /*                                                                       */\n  /*    This structure can't be used for MM fonts.                         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    coords :: The design coordinates for this style.                   */\n  /*              This is an array with one entry for each axis.           */\n  /*                                                                       */\n  /*    strid  :: The entry in `name' table identifying this style.        */\n  /*                                                                       */\n  typedef struct  FT_Var_Named_Style_\n  {\n    FT_Fixed*  coords;\n    FT_UInt    strid;\n\n  } FT_Var_Named_Style;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_MM_Var                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model the axes and space of a Multiple Masters */\n  /*    or GX var distortable font.                                        */\n  /*                                                                       */\n  /*    Some fields are specific to one format and not to the other.       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_axis        :: The number of axes.  The maximum value is~4 for */\n  /*                       MM; no limit in GX.                             */\n  /*                                                                       */\n  /*    num_designs     :: The number of designs; should be normally       */\n  /*                       2^num_axis for MM fonts.  Not meaningful for GX */\n  /*                       (where every glyph could have a different       */\n  /*                       number of designs).                             */\n  /*                                                                       */\n  /*    num_namedstyles :: The number of named styles; only meaningful for */\n  /*                       GX that allows certain design coordinates to    */\n  /*                       have a string ID (in the `name' table)          */\n  /*                       associated with them.  The font can tell the    */\n  /*                       user that, for example, Weight=1.5 is `Bold'.   */\n  /*                                                                       */\n  /*    axis            :: A table of axis descriptors.                    */\n  /*                       GX fonts contain slightly more data than MM.    */\n  /*                                                                       */\n  /*    namedstyles     :: A table of named styles.                        */\n  /*                       Only meaningful with GX.                        */\n  /*                                                                       */\n  typedef struct  FT_MM_Var_\n  {\n    FT_UInt              num_axis;\n    FT_UInt              num_designs;\n    FT_UInt              num_namedstyles;\n    FT_Var_Axis*         axis;\n    FT_Var_Named_Style*  namedstyle;\n\n  } FT_MM_Var;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Multi_Master                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the Multiple Master descriptor of a given font.           */\n  /*                                                                       */\n  /*    This function can't be used with GX fonts.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face    :: A handle to the source face.                            */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    amaster :: The Multiple Masters descriptor.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Multi_Master( FT_Face           face,\n                       FT_Multi_Master  *amaster );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_MM_Var                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the Multiple Master/GX var descriptor of a given font.    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face    :: A handle to the source face.                            */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    amaster :: The Multiple Masters/GX var descriptor.                 */\n  /*               Allocates a data structure, which the user must free.   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_MM_Var( FT_Face      face,\n                 FT_MM_Var*  *amaster );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_MM_Design_Coordinates                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    For Multiple Masters fonts, choose an interpolated font design     */\n  /*    through design coordinates.                                        */\n  /*                                                                       */\n  /*    This function can't be used with GX fonts.                         */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: A handle to the source face.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    num_coords :: The number of design coordinates (must be equal to   */\n  /*                  the number of axes in the font).                     */\n  /*                                                                       */\n  /*    coords     :: An array of design coordinates.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_MM_Design_Coordinates( FT_Face   face,\n                                FT_UInt   num_coords,\n                                FT_Long*  coords );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Var_Design_Coordinates                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    For Multiple Master or GX Var fonts, choose an interpolated font   */\n  /*    design through design coordinates.                                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: A handle to the source face.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    num_coords :: The number of design coordinates (must be equal to   */\n  /*                  the number of axes in the font).                     */\n  /*                                                                       */\n  /*    coords     :: An array of design coordinates.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Var_Design_Coordinates( FT_Face    face,\n                                 FT_UInt    num_coords,\n                                 FT_Fixed*  coords );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_MM_Blend_Coordinates                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    For Multiple Masters and GX var fonts, choose an interpolated font */\n  /*    design through normalized blend coordinates.                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: A handle to the source face.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    num_coords :: The number of design coordinates (must be equal to   */\n  /*                  the number of axes in the font).                     */\n  /*                                                                       */\n  /*    coords     :: The design coordinates array (each element must be   */\n  /*                  between 0 and 1.0).                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_MM_Blend_Coordinates( FT_Face    face,\n                               FT_UInt    num_coords,\n                               FT_Fixed*  coords );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Var_Blend_Coordinates                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This is another name of @FT_Set_MM_Blend_Coordinates.              */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Var_Blend_Coordinates( FT_Face    face,\n                                FT_UInt    num_coords,\n                                FT_Fixed*  coords );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTMM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftmodapi.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmodapi.h                                                             */\n/*                                                                         */\n/*    FreeType modules public interface (specification).                   */\n/*                                                                         */\n/*  Copyright 1996-2003, 2006, 2008-2010, 2012, 2013 by                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTMODAPI_H__\n#define __FTMODAPI_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    module_management                                                  */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Module Management                                                  */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    How to add, upgrade, remove, and control modules from FreeType.    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The definitions below are used to manage modules within FreeType.  */\n  /*    Modules can be added, upgraded, and removed at runtime.            */\n  /*    Additionally, some module properties can be controlled also.       */\n  /*                                                                       */\n  /*    Here is a list of possible values of the `module_name' field in    */\n  /*    the @FT_Module_Class structure.                                    */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      autofitter                                                       */\n  /*      bdf                                                              */\n  /*      cff                                                              */\n  /*      gxvalid                                                          */\n  /*      otvalid                                                          */\n  /*      pcf                                                              */\n  /*      pfr                                                              */\n  /*      psaux                                                            */\n  /*      pshinter                                                         */\n  /*      psnames                                                          */\n  /*      raster1, raster5                                                 */\n  /*      sfnt                                                             */\n  /*      smooth, smooth-lcd, smooth-lcdv                                  */\n  /*      truetype                                                         */\n  /*      type1                                                            */\n  /*      type42                                                           */\n  /*      t1cid                                                            */\n  /*      winfonts                                                         */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    Note that the FreeType Cache sub-system is not a FreeType module.  */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_Module                                                          */\n  /*    FT_Module_Constructor                                              */\n  /*    FT_Module_Destructor                                               */\n  /*    FT_Module_Requester                                                */\n  /*    FT_Module_Class                                                    */\n  /*                                                                       */\n  /*    FT_Add_Module                                                      */\n  /*    FT_Get_Module                                                      */\n  /*    FT_Remove_Module                                                   */\n  /*    FT_Add_Default_Modules                                             */\n  /*                                                                       */\n  /*    FT_Property_Set                                                    */\n  /*    FT_Property_Get                                                    */\n  /*                                                                       */\n  /*    FT_New_Library                                                     */\n  /*    FT_Done_Library                                                    */\n  /*    FT_Reference_Library                                               */\n  /*                                                                       */\n  /*    FT_Renderer                                                        */\n  /*    FT_Renderer_Class                                                  */\n  /*                                                                       */\n  /*    FT_Get_Renderer                                                    */\n  /*    FT_Set_Renderer                                                    */\n  /*                                                                       */\n  /*    FT_Set_Debug_Hook                                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* module bit flags */\n#define FT_MODULE_FONT_DRIVER         1  /* this module is a font driver  */\n#define FT_MODULE_RENDERER            2  /* this module is a renderer     */\n#define FT_MODULE_HINTER              4  /* this module is a glyph hinter */\n#define FT_MODULE_STYLER              8  /* this module is a styler       */\n\n#define FT_MODULE_DRIVER_SCALABLE     0x100   /* the driver supports      */\n                                              /* scalable fonts           */\n#define FT_MODULE_DRIVER_NO_OUTLINES  0x200   /* the driver does not      */\n                                              /* support vector outlines  */\n#define FT_MODULE_DRIVER_HAS_HINTER   0x400   /* the driver provides its  */\n                                              /* own hinter               */\n\n\n  /* deprecated values */\n#define ft_module_font_driver         FT_MODULE_FONT_DRIVER\n#define ft_module_renderer            FT_MODULE_RENDERER\n#define ft_module_hinter              FT_MODULE_HINTER\n#define ft_module_styler              FT_MODULE_STYLER\n\n#define ft_module_driver_scalable     FT_MODULE_DRIVER_SCALABLE\n#define ft_module_driver_no_outlines  FT_MODULE_DRIVER_NO_OUTLINES\n#define ft_module_driver_has_hinter   FT_MODULE_DRIVER_HAS_HINTER\n\n\n  typedef FT_Pointer  FT_Module_Interface;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Module_Constructor                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to initialize (not create) a new module object.    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    module :: The module to initialize.                                */\n  /*                                                                       */\n  typedef FT_Error\n  (*FT_Module_Constructor)( FT_Module  module );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Module_Destructor                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to finalize (not destroy) a given module object.   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    module :: The module to finalize.                                  */\n  /*                                                                       */\n  typedef void\n  (*FT_Module_Destructor)( FT_Module  module );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Module_Requester                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to query a given module for a specific interface.  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    module :: The module to be searched.                               */\n  /*                                                                       */\n  /*    name ::   The name of the interface in the module.                 */\n  /*                                                                       */\n  typedef FT_Module_Interface\n  (*FT_Module_Requester)( FT_Module    module,\n                          const char*  name );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Module_Class                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The module class descriptor.                                       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    module_flags    :: Bit flags describing the module.                */\n  /*                                                                       */\n  /*    module_size     :: The size of one module object/instance in       */\n  /*                       bytes.                                          */\n  /*                                                                       */\n  /*    module_name     :: The name of the module.                         */\n  /*                                                                       */\n  /*    module_version  :: The version, as a 16.16 fixed number            */\n  /*                       (major.minor).                                  */\n  /*                                                                       */\n  /*    module_requires :: The version of FreeType this module requires,   */\n  /*                       as a 16.16 fixed number (major.minor).  Starts  */\n  /*                       at version 2.0, i.e., 0x20000.                  */\n  /*                                                                       */\n  /*    module_init     :: The initializing function.                      */\n  /*                                                                       */\n  /*    module_done     :: The finalizing function.                        */\n  /*                                                                       */\n  /*    get_interface   :: The interface requesting function.              */\n  /*                                                                       */\n  typedef struct  FT_Module_Class_\n  {\n    FT_ULong               module_flags;\n    FT_Long                module_size;\n    const FT_String*       module_name;\n    FT_Fixed               module_version;\n    FT_Fixed               module_requires;\n\n    const void*            module_interface;\n\n    FT_Module_Constructor  module_init;\n    FT_Module_Destructor   module_done;\n    FT_Module_Requester    get_interface;\n\n  } FT_Module_Class;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Add_Module                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Add a new module to a given library instance.                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library :: A handle to the library object.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    clazz   :: A pointer to class descriptor for the module.           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    An error will be returned if a module already exists by that name, */\n  /*    or if the module requires a version of FreeType that is too great. */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Add_Module( FT_Library              library,\n                 const FT_Module_Class*  clazz );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Module                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Find a module by its name.                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library     :: A handle to the library object.                     */\n  /*                                                                       */\n  /*    module_name :: The module's name (as an ASCII string).             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A module handle.  0~if none was found.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    FreeType's internal modules aren't documented very well, and you   */\n  /*    should look up the source code for details.                        */\n  /*                                                                       */\n  FT_EXPORT( FT_Module )\n  FT_Get_Module( FT_Library   library,\n                 const char*  module_name );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Remove_Module                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Remove a given module from a library instance.                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library :: A handle to a library object.                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    module  :: A handle to a module object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The module object is destroyed by the function in case of success. */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Remove_Module( FT_Library  library,\n                    FT_Module   module );\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Property_Set\n   *\n   * @description:\n   *    Set a property for a given module.\n   *\n   * @input:\n   *    library ::\n   *       A handle to the library the module is part of.\n   *\n   *    module_name ::\n   *       The module name.\n   *\n   *    property_name ::\n   *       The property name.  Properties are described in the `Synopsis'\n   *       subsection of the module's documentation.\n   *\n   *       Note that only a few modules have properties.\n   *\n   *    value ::\n   *       A generic pointer to a variable or structure that gives the new\n   *       value of the property.  The exact definition of `value' is\n   *       dependent on the property; see the `Synopsis' subsection of the\n   *       module's documentation.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *    If `module_name' isn't a valid module name, or `property_name'\n   *    doesn't specify a valid property, or if `value' doesn't represent a\n   *    valid value for the given property, an error is returned.\n   *\n   *    The following example sets property `bar' (a simple integer) in\n   *    module `foo' to value~1.\n   *\n   *    {\n   *      FT_UInt  bar;\n   *\n   *\n   *      bar = 1;\n   *      FT_Property_Set( library, \"foo\", \"bar\", &bar );\n   *    }\n   *\n   *    Note that the FreeType Cache sub-system doesn't recognize module\n   *    property changes.  To avoid glyph lookup confusion within the cache\n   *    you should call @FTC_Manager_Reset to completely flush the cache if\n   *    a module property gets changed after @FTC_Manager_New has been\n   *    called.\n   *\n   *    It is not possible to set properties of the FreeType Cache\n   *    sub-system itself with FT_Property_Set; use @FTC_Property_Set\n   *    instead.\n   *\n   *  @since:\n   *    2.4.11\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Property_Set( FT_Library        library,\n                   const FT_String*  module_name,\n                   const FT_String*  property_name,\n                   const void*       value );\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Property_Get\n   *\n   * @description:\n   *    Get a module's property value.\n   *\n   * @input:\n   *    library ::\n   *       A handle to the library the module is part of.\n   *\n   *    module_name ::\n   *       The module name.\n   *\n   *    property_name ::\n   *       The property name.  Properties are described in the `Synopsis'\n   *       subsection of the module's documentation.\n   *\n   * @inout:\n   *    value ::\n   *       A generic pointer to a variable or structure that gives the\n   *       value of the property.  The exact definition of `value' is\n   *       dependent on the property; see the `Synopsis' subsection of the\n   *       module's documentation.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *    If `module_name' isn't a valid module name, or `property_name'\n   *    doesn't specify a valid property, or if `value' doesn't represent a\n   *    valid value for the given property, an error is returned.\n   *\n   *    The following example gets property `baz' (a range) in module `foo'.\n   *\n   *    {\n   *      typedef  range_\n   *      {\n   *        FT_Int32  min;\n   *        FT_Int32  max;\n   *\n   *      } range;\n   *\n   *      range  baz;\n   *\n   *\n   *      FT_Property_Get( library, \"foo\", \"baz\", &baz );\n   *    }\n   *\n   *    It is not possible to retrieve properties of the FreeType Cache\n   *    sub-system with FT_Property_Get; use @FTC_Property_Get instead.\n   *\n   *  @since:\n   *    2.4.11\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Property_Get( FT_Library        library,\n                   const FT_String*  module_name,\n                   const FT_String*  property_name,\n                   void*             value );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Reference_Library                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A counter gets initialized to~1 at the time an @FT_Library         */\n  /*    structure is created.  This function increments the counter.       */\n  /*    @FT_Done_Library then only destroys a library if the counter is~1, */\n  /*    otherwise it simply decrements the counter.                        */\n  /*                                                                       */\n  /*    This function helps in managing life-cycles of structures that     */\n  /*    reference @FT_Library objects.                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to a target library object.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.4.2                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Reference_Library( FT_Library  library );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Library                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used to create a new FreeType library instance    */\n  /*    from a given memory object.  It is thus possible to use libraries  */\n  /*    with distinct memory allocators within the same program.           */\n  /*                                                                       */\n  /*    Normally, you would call this function (followed by a call to      */\n  /*    @FT_Add_Default_Modules or a series of calls to @FT_Add_Module)    */\n  /*    instead of @FT_Init_FreeType to initialize the FreeType library.   */\n  /*                                                                       */\n  /*    Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a      */\n  /*    library instance.                                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory   :: A handle to the original memory object.                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    alibrary :: A pointer to handle of a new library object.           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    See the discussion of reference counters in the description of     */\n  /*    @FT_Reference_Library.                                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Library( FT_Memory    memory,\n                  FT_Library  *alibrary );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_Library                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Discard a given library object.  This closes all drivers and       */\n  /*    discards all resource objects.                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to the target library.                         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    See the discussion of reference counters in the description of     */\n  /*    @FT_Reference_Library.                                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Done_Library( FT_Library  library );\n\n  /* */\n\n  typedef void\n  (*FT_DebugHook_Func)( void*  arg );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Debug_Hook                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Set a debug hook function for debugging the interpreter of a font  */\n  /*    format.                                                            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    hook_index :: The index of the debug hook.  You should use the     */\n  /*                  values defined in `ftobjs.h', e.g.,                  */\n  /*                  `FT_DEBUG_HOOK_TRUETYPE'.                            */\n  /*                                                                       */\n  /*    debug_hook :: The function used to debug the interpreter.          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Currently, four debug hook slots are available, but only two (for  */\n  /*    the TrueType and the Type~1 interpreter) are defined.              */\n  /*                                                                       */\n  /*    Since the internal headers of FreeType are no longer installed,    */\n  /*    the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly.      */\n  /*    This is a bug and will be fixed in a forthcoming release.          */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Set_Debug_Hook( FT_Library         library,\n                     FT_UInt            hook_index,\n                     FT_DebugHook_Func  debug_hook );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Add_Default_Modules                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Add the set of default drivers to a given library object.          */\n  /*    This is only useful when you create a library object with          */\n  /*    @FT_New_Library (usually to plug a custom memory manager).         */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library :: A handle to a new library object.                       */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Add_Default_Modules( FT_Library  library );\n\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   truetype_engine\n   *\n   * @title:\n   *   The TrueType Engine\n   *\n   * @abstract:\n   *   TrueType bytecode support.\n   *\n   * @description:\n   *   This section contains a function used to query the level of TrueType\n   *   bytecode support compiled in this version of the library.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   *  @enum:\n   *     FT_TrueTypeEngineType\n   *\n   *  @description:\n   *     A list of values describing which kind of TrueType bytecode\n   *     engine is implemented in a given FT_Library instance.  It is used\n   *     by the @FT_Get_TrueType_Engine_Type function.\n   *\n   *  @values:\n   *     FT_TRUETYPE_ENGINE_TYPE_NONE ::\n   *       The library doesn't implement any kind of bytecode interpreter.\n   *\n   *     FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::\n   *       The library implements a bytecode interpreter that doesn't\n   *       support the patented operations of the TrueType virtual machine.\n   *\n   *       Its main use is to load certain Asian fonts that position and\n   *       scale glyph components with bytecode instructions.  It produces\n   *       bad output for most other fonts.\n   *\n   *     FT_TRUETYPE_ENGINE_TYPE_PATENTED ::\n   *       The library implements a bytecode interpreter that covers\n   *       the full instruction set of the TrueType virtual machine (this\n   *       was governed by patents until May 2010, hence the name).\n   *\n   *  @since:\n   *     2.2\n   *\n   */\n  typedef enum  FT_TrueTypeEngineType_\n  {\n    FT_TRUETYPE_ENGINE_TYPE_NONE = 0,\n    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,\n    FT_TRUETYPE_ENGINE_TYPE_PATENTED\n\n  } FT_TrueTypeEngineType;\n\n\n  /**************************************************************************\n   *\n   *  @func:\n   *     FT_Get_TrueType_Engine_Type\n   *\n   *  @description:\n   *     Return an @FT_TrueTypeEngineType value to indicate which level of\n   *     the TrueType virtual machine a given library instance supports.\n   *\n   *  @input:\n   *     library ::\n   *       A library instance.\n   *\n   *  @return:\n   *     A value indicating which level is supported.\n   *\n   *  @since:\n   *     2.2\n   *\n   */\n  FT_EXPORT( FT_TrueTypeEngineType )\n  FT_Get_TrueType_Engine_Type( FT_Library  library );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTMODAPI_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftmoderr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmoderr.h                                                             */\n/*                                                                         */\n/*    FreeType module error offsets (specification).                       */\n/*                                                                         */\n/*  Copyright 2001-2005, 2010, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the FreeType module error codes.          */\n  /*                                                                       */\n  /* If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h' is    */\n  /* set, the lower byte of an error value identifies the error code as    */\n  /* usual.  In addition, the higher byte identifies the module.  For      */\n  /* example, the error `FT_Err_Invalid_File_Format' has value 0x0003, the */\n  /* error `TT_Err_Invalid_File_Format' has value 0x1303, the error        */\n  /* `T1_Err_Invalid_File_Format' has value 0x1403, etc.                   */\n  /*                                                                       */\n  /* Note that `FT_Err_Ok', `TT_Err_Ok', etc. are always equal to zero,    */\n  /* including the high byte.                                              */\n  /*                                                                       */\n  /* If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of   */\n  /* an error value is set to zero.                                        */\n  /*                                                                       */\n  /* To hide the various `XXX_Err_' prefixes in the source code, FreeType  */\n  /* provides some macros in `fttypes.h'.                                  */\n  /*                                                                       */\n  /*   FT_ERR( err )                                                       */\n  /*     Add current error module prefix (as defined with the              */\n  /*     `FT_ERR_PREFIX' macro) to `err'.  For example, in the BDF module  */\n  /*     the line                                                          */\n  /*                                                                       */\n  /*       error = FT_ERR( Invalid_Outline );                              */\n  /*                                                                       */\n  /*     expands to                                                        */\n  /*                                                                       */\n  /*       error = BDF_Err_Invalid_Outline;                                */\n  /*                                                                       */\n  /*     For simplicity, you can always use `FT_Err_Ok' directly instead   */\n  /*     of `FT_ERR( Ok )'.                                                */\n  /*                                                                       */\n  /*   FT_ERR_EQ( errcode, err )                                           */\n  /*   FT_ERR_NEQ( errcode, err )                                          */\n  /*     Compare error code `errcode' with the error `err' for equality    */\n  /*     and inequality, respectively.  Example:                           */\n  /*                                                                       */\n  /*       if ( FT_ERR_EQ( error, Invalid_Outline ) )                      */\n  /*         ...                                                           */\n  /*                                                                       */\n  /*     Using this macro you don't have to think about error prefixes.    */\n  /*     Of course, if module errors are not active, the above example is  */\n  /*     the same as                                                       */\n  /*                                                                       */\n  /*       if ( error == FT_Err_Invalid_Outline )                          */\n  /*         ...                                                           */\n  /*                                                                       */\n  /*   FT_ERROR_BASE( errcode )                                            */\n  /*   FT_ERROR_MODULE( errcode )                                          */\n  /*     Get base error and module error code, respectively.               */\n  /*                                                                       */\n  /*                                                                       */\n  /* It can also be used to create a module error message table easily     */\n  /* with something like                                                   */\n  /*                                                                       */\n  /*   {                                                                   */\n  /*     #undef __FTMODERR_H__                                             */\n  /*     #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },         */\n  /*     #define FT_MODERR_START_LIST     {                                */\n  /*     #define FT_MODERR_END_LIST       { 0, 0 } };                      */\n  /*                                                                       */\n  /*     const struct                                                      */\n  /*     {                                                                 */\n  /*       int          mod_err_offset;                                    */\n  /*       const char*  mod_err_msg                                        */\n  /*     } ft_mod_errors[] =                                               */\n  /*                                                                       */\n  /*     #include FT_MODULE_ERRORS_H                                       */\n  /*   }                                                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTMODERR_H__\n#define __FTMODERR_H__\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                       SETUP MACROS                      *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#undef  FT_NEED_EXTERN_C\n\n#ifndef FT_MODERRDEF\n\n#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = v,\n#else\n#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = 0,\n#endif\n\n#define FT_MODERR_START_LIST  enum {\n#define FT_MODERR_END_LIST    FT_Mod_Err_Max };\n\n#ifdef __cplusplus\n#define FT_NEED_EXTERN_C\n  extern \"C\" {\n#endif\n\n#endif /* !FT_MODERRDEF */\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****               LIST MODULE ERROR BASES                   *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#ifdef FT_MODERR_START_LIST\n  FT_MODERR_START_LIST\n#endif\n\n\n  FT_MODERRDEF( Base,      0x000, \"base module\" )\n  FT_MODERRDEF( Autofit,   0x100, \"autofitter module\" )\n  FT_MODERRDEF( BDF,       0x200, \"BDF module\" )\n  FT_MODERRDEF( Bzip2,     0x300, \"Bzip2 module\" )\n  FT_MODERRDEF( Cache,     0x400, \"cache module\" )\n  FT_MODERRDEF( CFF,       0x500, \"CFF module\" )\n  FT_MODERRDEF( CID,       0x600, \"CID module\" )\n  FT_MODERRDEF( Gzip,      0x700, \"Gzip module\" )\n  FT_MODERRDEF( LZW,       0x800, \"LZW module\" )\n  FT_MODERRDEF( OTvalid,   0x900, \"OpenType validation module\" )\n  FT_MODERRDEF( PCF,       0xA00, \"PCF module\" )\n  FT_MODERRDEF( PFR,       0xB00, \"PFR module\" )\n  FT_MODERRDEF( PSaux,     0xC00, \"PS auxiliary module\" )\n  FT_MODERRDEF( PShinter,  0xD00, \"PS hinter module\" )\n  FT_MODERRDEF( PSnames,   0xE00, \"PS names module\" )\n  FT_MODERRDEF( Raster,    0xF00, \"raster module\" )\n  FT_MODERRDEF( SFNT,     0x1000, \"SFNT module\" )\n  FT_MODERRDEF( Smooth,   0x1100, \"smooth raster module\" )\n  FT_MODERRDEF( TrueType, 0x1200, \"TrueType module\" )\n  FT_MODERRDEF( Type1,    0x1300, \"Type 1 module\" )\n  FT_MODERRDEF( Type42,   0x1400, \"Type 42 module\" )\n  FT_MODERRDEF( Winfonts, 0x1500, \"Windows FON/FNT module\" )\n  FT_MODERRDEF( GXvalid,  0x1600, \"GX validation module\" )\n\n\n#ifdef FT_MODERR_END_LIST\n  FT_MODERR_END_LIST\n#endif\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                      CLEANUP                            *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#ifdef FT_NEED_EXTERN_C\n  }\n#endif\n\n#undef FT_MODERR_START_LIST\n#undef FT_MODERR_END_LIST\n#undef FT_MODERRDEF\n#undef FT_NEED_EXTERN_C\n\n\n#endif /* __FTMODERR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftotval.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftotval.h                                                              */\n/*                                                                         */\n/*    FreeType API for validating OpenType tables (specification).         */\n/*                                                                         */\n/*  Copyright 2004-2007, 2013, 2014 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/*                                                                         */\n/* Warning: This module might be moved to a different library in the       */\n/*          future to avoid a tight dependency between FreeType and the    */\n/*          OpenType specification.                                        */\n/*                                                                         */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTOTVAL_H__\n#define __FTOTVAL_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    ot_validation                                                      */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    OpenType Validation                                                */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    An API to validate OpenType tables.                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of functions to validate     */\n  /*    some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).         */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_OpenType_Validate                                               */\n  /*    FT_OpenType_Free                                                   */\n  /*                                                                       */\n  /*    FT_VALIDATE_OTXXX                                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n /**********************************************************************\n  *\n  * @enum:\n  *    FT_VALIDATE_OTXXX\n  *\n  * @description:\n  *    A list of bit-field constants used with @FT_OpenType_Validate to\n  *    indicate which OpenType tables should be validated.\n  *\n  * @values:\n  *    FT_VALIDATE_BASE ::\n  *      Validate BASE table.\n  *\n  *    FT_VALIDATE_GDEF ::\n  *      Validate GDEF table.\n  *\n  *    FT_VALIDATE_GPOS ::\n  *      Validate GPOS table.\n  *\n  *    FT_VALIDATE_GSUB ::\n  *      Validate GSUB table.\n  *\n  *    FT_VALIDATE_JSTF ::\n  *      Validate JSTF table.\n  *\n  *    FT_VALIDATE_MATH ::\n  *      Validate MATH table.\n  *\n  *    FT_VALIDATE_OT ::\n  *      Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).\n  *\n  */\n#define FT_VALIDATE_BASE  0x0100\n#define FT_VALIDATE_GDEF  0x0200\n#define FT_VALIDATE_GPOS  0x0400\n#define FT_VALIDATE_GSUB  0x0800\n#define FT_VALIDATE_JSTF  0x1000\n#define FT_VALIDATE_MATH  0x2000\n\n#define FT_VALIDATE_OT  FT_VALIDATE_BASE | \\\n                        FT_VALIDATE_GDEF | \\\n                        FT_VALIDATE_GPOS | \\\n                        FT_VALIDATE_GSUB | \\\n                        FT_VALIDATE_JSTF | \\\n                        FT_VALIDATE_MATH\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_OpenType_Validate\n  *\n  * @description:\n  *    Validate various OpenType tables to assure that all offsets and\n  *    indices are valid.  The idea is that a higher-level library that\n  *    actually does the text layout can access those tables without\n  *    error checking (which can be quite time consuming).\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    validation_flags ::\n  *       A bit field that specifies the tables to be validated.  See\n  *       @FT_VALIDATE_OTXXX for possible values.\n  *\n  * @output:\n  *    BASE_table ::\n  *       A pointer to the BASE table.\n  *\n  *    GDEF_table ::\n  *       A pointer to the GDEF table.\n  *\n  *    GPOS_table ::\n  *       A pointer to the GPOS table.\n  *\n  *    GSUB_table ::\n  *       A pointer to the GSUB table.\n  *\n  *    JSTF_table ::\n  *       A pointer to the JSTF table.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   This function only works with OpenType fonts, returning an error\n  *   otherwise.\n  *\n  *   After use, the application should deallocate the five tables with\n  *   @FT_OpenType_Free.  A NULL value indicates that the table either\n  *   doesn't exist in the font, or the application hasn't asked for\n  *   validation.\n  */\n  FT_EXPORT( FT_Error )\n  FT_OpenType_Validate( FT_Face    face,\n                        FT_UInt    validation_flags,\n                        FT_Bytes  *BASE_table,\n                        FT_Bytes  *GDEF_table,\n                        FT_Bytes  *GPOS_table,\n                        FT_Bytes  *GSUB_table,\n                        FT_Bytes  *JSTF_table );\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_OpenType_Free\n  *\n  * @description:\n  *    Free the buffer allocated by OpenType validator.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    table ::\n  *       The pointer to the buffer that is allocated by\n  *       @FT_OpenType_Validate.\n  *\n  * @note:\n  *   This function must be used to free the buffer allocated by\n  *   @FT_OpenType_Validate only.\n  */\n  FT_EXPORT( void )\n  FT_OpenType_Free( FT_Face   face,\n                    FT_Bytes  table );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTOTVAL_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftoutln.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftoutln.h                                                              */\n/*                                                                         */\n/*    Support for the FT_Outline type used to store glyph shapes of        */\n/*    most scalable font formats (specification).                          */\n/*                                                                         */\n/*  Copyright 1996-2003, 2005-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTOUTLN_H__\n#define __FTOUTLN_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    outline_processing                                                 */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Outline Processing                                                 */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Functions to create, transform, and render vectorial glyph images. */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains routines used to create and destroy scalable */\n  /*    glyph images known as `outlines'.  These can also be measured,     */\n  /*    transformed, and converted into bitmaps and pixmaps.               */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_Outline                                                         */\n  /*    FT_Outline_New                                                     */\n  /*    FT_Outline_Done                                                    */\n  /*    FT_Outline_Copy                                                    */\n  /*    FT_Outline_Translate                                               */\n  /*    FT_Outline_Transform                                               */\n  /*    FT_Outline_Embolden                                                */\n  /*    FT_Outline_EmboldenXY                                              */\n  /*    FT_Outline_Reverse                                                 */\n  /*    FT_Outline_Check                                                   */\n  /*                                                                       */\n  /*    FT_Outline_Get_CBox                                                */\n  /*    FT_Outline_Get_BBox                                                */\n  /*                                                                       */\n  /*    FT_Outline_Get_Bitmap                                              */\n  /*    FT_Outline_Render                                                  */\n  /*    FT_Outline_Decompose                                               */\n  /*    FT_Outline_Funcs                                                   */\n  /*    FT_Outline_MoveToFunc                                              */\n  /*    FT_Outline_LineToFunc                                              */\n  /*    FT_Outline_ConicToFunc                                             */\n  /*    FT_Outline_CubicToFunc                                             */\n  /*                                                                       */\n  /*    FT_Orientation                                                     */\n  /*    FT_Outline_Get_Orientation                                         */\n  /*                                                                       */\n  /*    FT_OUTLINE_XXX                                                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Decompose                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Walk over an outline's structure to decompose it into individual   */\n  /*    segments and Bézier arcs.  This function also emits `move to'      */\n  /*    operations to indicate the start of new contours in the outline.   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    outline        :: A pointer to the source target.                  */\n  /*                                                                       */\n  /*    func_interface :: A table of `emitters', i.e., function pointers   */\n  /*                      called during decomposition to indicate path     */\n  /*                      operations.                                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    user           :: A typeless pointer that is passed to each        */\n  /*                      emitter during the decomposition.  It can be     */\n  /*                      used to store the state during the               */\n  /*                      decomposition.                                   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    A contour that contains a single point only is represented by a    */\n  /*    `move to' operation followed by `line to' to the same point.  In   */\n  /*    most cases, it is best to filter this out before using the         */\n  /*    outline for stroking purposes (otherwise it would result in a      */\n  /*    visible dot when round caps are used).                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Decompose( FT_Outline*              outline,\n                        const FT_Outline_Funcs*  func_interface,\n                        void*                    user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_New                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new outline of a given size.                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library     :: A handle to the library object from where the       */\n  /*                   outline is allocated.  Note however that the new    */\n  /*                   outline will *not* necessarily be *freed*, when     */\n  /*                   destroying the library, by @FT_Done_FreeType.       */\n  /*                                                                       */\n  /*    numPoints   :: The maximum number of points within the outline.    */\n  /*                   Must be smaller than or equal to 0xFFFF (65535).    */\n  /*                                                                       */\n  /*    numContours :: The maximum number of contours within the outline.  */\n  /*                   This value must be in the range 0 to `numPoints'.   */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    anoutline   :: A handle to the new outline.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The reason why this function takes a `library' parameter is simply */\n  /*    to use the library's memory allocator.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_New( FT_Library   library,\n                  FT_UInt      numPoints,\n                  FT_Int       numContours,\n                  FT_Outline  *anoutline );\n\n\n  FT_EXPORT( FT_Error )\n  FT_Outline_New_Internal( FT_Memory    memory,\n                           FT_UInt      numPoints,\n                           FT_Int       numContours,\n                           FT_Outline  *anoutline );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Done                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy an outline created with @FT_Outline_New.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle of the library object used to allocate the     */\n  /*               outline.                                                */\n  /*                                                                       */\n  /*    outline :: A pointer to the outline object to be discarded.        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If the outline's `owner' field is not set, only the outline        */\n  /*    descriptor will be released.                                       */\n  /*                                                                       */\n  /*    The reason why this function takes an `library' parameter is       */\n  /*    simply to use ft_mem_free().                                       */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Done( FT_Library   library,\n                   FT_Outline*  outline );\n\n\n  FT_EXPORT( FT_Error )\n  FT_Outline_Done_Internal( FT_Memory    memory,\n                            FT_Outline*  outline );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Check                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Check the contents of an outline descriptor.                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    outline :: A handle to a source outline.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Check( FT_Outline*  outline );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Get_CBox                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return an outline's `control box'.  The control box encloses all   */\n  /*    the outline's points, including Bézier control points.  Though it  */\n  /*    coincides with the exact bounding box for most glyphs, it can be   */\n  /*    slightly larger in some situations (like when rotating an outline  */\n  /*    that contains Bézier outside arcs).                                */\n  /*                                                                       */\n  /*    Computing the control box is very fast, while getting the bounding */\n  /*    box can take much more time as it needs to walk over all segments  */\n  /*    and arcs in the outline.  To get the latter, you can use the       */\n  /*    `ftbbox' component, which is dedicated to this single task.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    outline :: A pointer to the source outline descriptor.             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    acbox   :: The outline's control box.                              */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    See @FT_Glyph_Get_CBox for a discussion of tricky fonts.           */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Outline_Get_CBox( const FT_Outline*  outline,\n                       FT_BBox           *acbox );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Translate                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Apply a simple translation to the points of an outline.            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    outline :: A pointer to the target outline descriptor.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    xOffset :: The horizontal offset.                                  */\n  /*                                                                       */\n  /*    yOffset :: The vertical offset.                                    */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Outline_Translate( const FT_Outline*  outline,\n                        FT_Pos             xOffset,\n                        FT_Pos             yOffset );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Copy                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Copy an outline into another one.  Both objects must have the      */\n  /*    same sizes (number of points & number of contours) when this       */\n  /*    function is called.                                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    source :: A handle to the source outline.                          */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    target :: A handle to the target outline.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Copy( const FT_Outline*  source,\n                   FT_Outline        *target );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Transform                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Apply a simple 2x2 matrix to all of an outline's points.  Useful   */\n  /*    for applying rotations, slanting, flipping, etc.                   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    outline :: A pointer to the target outline descriptor.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    matrix  :: A pointer to the transformation matrix.                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You can use @FT_Outline_Translate if you need to translate the     */\n  /*    outline's points.                                                  */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Outline_Transform( const FT_Outline*  outline,\n                        const FT_Matrix*   matrix );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Embolden                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Embolden an outline.  The new outline will be at most 4~times      */\n  /*    `strength' pixels wider and higher.  You may think of the left and */\n  /*    bottom borders as unchanged.                                       */\n  /*                                                                       */\n  /*    Negative `strength' values to reduce the outline thickness are     */\n  /*    possible also.                                                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    outline  :: A handle to the target outline.                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    strength :: How strong the glyph is emboldened.  Expressed in      */\n  /*                26.6 pixel format.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The used algorithm to increase or decrease the thickness of the    */\n  /*    glyph doesn't change the number of points; this means that certain */\n  /*    situations like acute angles or intersections are sometimes        */\n  /*    handled incorrectly.                                               */\n  /*                                                                       */\n  /*    If you need `better' metrics values you should call                */\n  /*    @FT_Outline_Get_CBox or @FT_Outline_Get_BBox.                      */\n  /*                                                                       */\n  /*    Example call:                                                      */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );                   */\n  /*      if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE )             */\n  /*        FT_Outline_Embolden( &face->slot->outline, strength );         */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    To get meaningful results, font scaling values must be set with    */\n  /*    functions like @FT_Set_Char_Size before calling FT_Render_Glyph.   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Embolden( FT_Outline*  outline,\n                       FT_Pos       strength );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_EmboldenXY                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Embolden an outline.  The new outline will be `xstrength' pixels   */\n  /*    wider and `ystrength' pixels higher.  Otherwise, it is similar to  */\n  /*    @FT_Outline_Embolden, which uses the same strength in both         */\n  /*    directions.                                                        */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_EmboldenXY( FT_Outline*  outline,\n                         FT_Pos       xstrength,\n                         FT_Pos       ystrength );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Reverse                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Reverse the drawing direction of an outline.  This is used to      */\n  /*    ensure consistent fill conventions for mirrored glyphs.            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    outline :: A pointer to the target outline descriptor.             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in     */\n  /*    the outline's `flags' field.                                       */\n  /*                                                                       */\n  /*    It shouldn't be used by a normal client application, unless it     */\n  /*    knows what it is doing.                                            */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Outline_Reverse( FT_Outline*  outline );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Get_Bitmap                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Render an outline within a bitmap.  The outline's image is simply  */\n  /*    OR-ed to the target bitmap.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to a FreeType library object.                  */\n  /*                                                                       */\n  /*    outline :: A pointer to the source outline descriptor.             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    abitmap :: A pointer to the target bitmap descriptor.              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function does NOT CREATE the bitmap, it only renders an       */\n  /*    outline image within the one you pass to it!  Consequently, the    */\n  /*    various fields in `abitmap' should be set accordingly.             */\n  /*                                                                       */\n  /*    It will use the raster corresponding to the default glyph format.  */\n  /*                                                                       */\n  /*    The value of the `num_grays' field in `abitmap' is ignored.  If    */\n  /*    you select the gray-level rasterizer, and you want less than 256   */\n  /*    gray levels, you have to use @FT_Outline_Render directly.          */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Get_Bitmap( FT_Library        library,\n                         FT_Outline*       outline,\n                         const FT_Bitmap  *abitmap );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Render                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Render an outline within a bitmap using the current scan-convert.  */\n  /*    This function uses an @FT_Raster_Params structure as an argument,  */\n  /*    allowing advanced features like direct composition, translucency,  */\n  /*    etc.                                                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to a FreeType library object.                  */\n  /*                                                                       */\n  /*    outline :: A pointer to the source outline descriptor.             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    params  :: A pointer to an @FT_Raster_Params structure used to     */\n  /*               describe the rendering operation.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You should know what you are doing and how @FT_Raster_Params works */\n  /*    to use this function.                                              */\n  /*                                                                       */\n  /*    The field `params.source' will be set to `outline' before the scan */\n  /*    converter is called, which means that the value you give to it is  */\n  /*    actually ignored.                                                  */\n  /*                                                                       */\n  /*    The gray-level rasterizer always uses 256 gray levels.  If you     */\n  /*    want less gray levels, you have to provide your own span callback. */\n  /*    See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the   */\n  /*    @FT_Raster_Params structure for more details.                      */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Render( FT_Library         library,\n                     FT_Outline*        outline,\n                     FT_Raster_Params*  params );\n\n\n /**************************************************************************\n  *\n  * @enum:\n  *   FT_Orientation\n  *\n  * @description:\n  *   A list of values used to describe an outline's contour orientation.\n  *\n  *   The TrueType and PostScript specifications use different conventions\n  *   to determine whether outline contours should be filled or unfilled.\n  *\n  * @values:\n  *   FT_ORIENTATION_TRUETYPE ::\n  *     According to the TrueType specification, clockwise contours must\n  *     be filled, and counter-clockwise ones must be unfilled.\n  *\n  *   FT_ORIENTATION_POSTSCRIPT ::\n  *     According to the PostScript specification, counter-clockwise contours\n  *     must be filled, and clockwise ones must be unfilled.\n  *\n  *   FT_ORIENTATION_FILL_RIGHT ::\n  *     This is identical to @FT_ORIENTATION_TRUETYPE, but is used to\n  *     remember that in TrueType, everything that is to the right of\n  *     the drawing direction of a contour must be filled.\n  *\n  *   FT_ORIENTATION_FILL_LEFT ::\n  *     This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to\n  *     remember that in PostScript, everything that is to the left of\n  *     the drawing direction of a contour must be filled.\n  *\n  *   FT_ORIENTATION_NONE ::\n  *     The orientation cannot be determined.  That is, different parts of\n  *     the glyph have different orientation.\n  *\n  */\n  typedef enum  FT_Orientation_\n  {\n    FT_ORIENTATION_TRUETYPE   = 0,\n    FT_ORIENTATION_POSTSCRIPT = 1,\n    FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,\n    FT_ORIENTATION_FILL_LEFT  = FT_ORIENTATION_POSTSCRIPT,\n    FT_ORIENTATION_NONE\n\n  } FT_Orientation;\n\n\n /**************************************************************************\n  *\n  * @function:\n  *   FT_Outline_Get_Orientation\n  *\n  * @description:\n  *   This function analyzes a glyph outline and tries to compute its\n  *   fill orientation (see @FT_Orientation).  This is done by integrating\n  *   the total area covered by the outline. The positive integral\n  *   corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT\n  *   is returned. The negative integral corresponds to the counter-clockwise\n  *   orientation and @FT_ORIENTATION_TRUETYPE is returned.\n  *\n  *   Note that this will return @FT_ORIENTATION_TRUETYPE for empty\n  *   outlines.\n  *\n  * @input:\n  *   outline ::\n  *     A handle to the source outline.\n  *\n  * @return:\n  *   The orientation.\n  *\n  */\n  FT_EXPORT( FT_Orientation )\n  FT_Outline_Get_Orientation( FT_Outline*  outline );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTOUTLN_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftpfr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftpfr.h                                                                */\n/*                                                                         */\n/*    FreeType API for accessing PFR-specific data (specification only).   */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2004, 2006, 2008, 2009 by                        */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTPFR_H__\n#define __FTPFR_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    pfr_fonts                                                          */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    PFR Fonts                                                          */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    PFR/TrueDoc specific API.                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of PFR-specific functions.   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_PFR_Metrics\n  *\n  * @description:\n  *    Return the outline and metrics resolutions of a given PFR face.\n  *\n  * @input:\n  *    face :: Handle to the input face.  It can be a non-PFR face.\n  *\n  * @output:\n  *    aoutline_resolution ::\n  *      Outline resolution.  This is equivalent to `face->units_per_EM'\n  *      for non-PFR fonts.  Optional (parameter can be NULL).\n  *\n  *    ametrics_resolution ::\n  *      Metrics resolution.  This is equivalent to `outline_resolution'\n  *      for non-PFR fonts.  Optional (parameter can be NULL).\n  *\n  *    ametrics_x_scale ::\n  *      A 16.16 fixed-point number used to scale distance expressed\n  *      in metrics units to device sub-pixels.  This is equivalent to\n  *      `face->size->x_scale', but for metrics only.  Optional (parameter\n  *      can be NULL).\n  *\n  *    ametrics_y_scale ::\n  *      Same as `ametrics_x_scale' but for the vertical direction.\n  *      optional (parameter can be NULL).\n  *\n  * @return:\n  *    FreeType error code.  0~means success.\n  *\n  * @note:\n  *   If the input face is not a PFR, this function will return an error.\n  *   However, in all cases, it will return valid values.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_PFR_Metrics( FT_Face    face,\n                      FT_UInt   *aoutline_resolution,\n                      FT_UInt   *ametrics_resolution,\n                      FT_Fixed  *ametrics_x_scale,\n                      FT_Fixed  *ametrics_y_scale );\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_PFR_Kerning\n  *\n  * @description:\n  *    Return the kerning pair corresponding to two glyphs in a PFR face.\n  *    The distance is expressed in metrics units, unlike the result of\n  *    @FT_Get_Kerning.\n  *\n  * @input:\n  *    face  :: A handle to the input face.\n  *\n  *    left  :: Index of the left glyph.\n  *\n  *    right :: Index of the right glyph.\n  *\n  * @output:\n  *    avector :: A kerning vector.\n  *\n  * @return:\n  *    FreeType error code.  0~means success.\n  *\n  * @note:\n  *    This function always return distances in original PFR metrics\n  *    units.  This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED\n  *    mode, which always returns distances converted to outline units.\n  *\n  *    You can use the value of the `x_scale' and `y_scale' parameters\n  *    returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_PFR_Kerning( FT_Face     face,\n                      FT_UInt     left,\n                      FT_UInt     right,\n                      FT_Vector  *avector );\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_PFR_Advance\n  *\n  * @description:\n  *    Return a given glyph advance, expressed in original metrics units,\n  *    from a PFR font.\n  *\n  * @input:\n  *    face   :: A handle to the input face.\n  *\n  *    gindex :: The glyph index.\n  *\n  * @output:\n  *    aadvance :: The glyph advance in metrics units.\n  *\n  * @return:\n  *    FreeType error code.  0~means success.\n  *\n  * @note:\n  *    You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics\n  *    to convert the advance to device sub-pixels (i.e., 1/64th of pixels).\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_PFR_Advance( FT_Face   face,\n                      FT_UInt   gindex,\n                      FT_Pos   *aadvance );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTPFR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftrender.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftrender.h                                                             */\n/*                                                                         */\n/*    FreeType renderer modules public interface (specification).          */\n/*                                                                         */\n/*  Copyright 1996-2001, 2005, 2006, 2010 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTRENDER_H__\n#define __FTRENDER_H__\n\n\n#include <ft2build.h>\n#include FT_MODULE_H\n#include FT_GLYPH_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    module_management                                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* create a new glyph object */\n  typedef FT_Error\n  (*FT_Glyph_InitFunc)( FT_Glyph      glyph,\n                        FT_GlyphSlot  slot );\n\n  /* destroys a given glyph object */\n  typedef void\n  (*FT_Glyph_DoneFunc)( FT_Glyph  glyph );\n\n  typedef void\n  (*FT_Glyph_TransformFunc)( FT_Glyph          glyph,\n                             const FT_Matrix*  matrix,\n                             const FT_Vector*  delta );\n\n  typedef void\n  (*FT_Glyph_GetBBoxFunc)( FT_Glyph  glyph,\n                           FT_BBox*  abbox );\n\n  typedef FT_Error\n  (*FT_Glyph_CopyFunc)( FT_Glyph   source,\n                        FT_Glyph   target );\n\n  typedef FT_Error\n  (*FT_Glyph_PrepareFunc)( FT_Glyph      glyph,\n                           FT_GlyphSlot  slot );\n\n/* deprecated */\n#define FT_Glyph_Init_Func       FT_Glyph_InitFunc\n#define FT_Glyph_Done_Func       FT_Glyph_DoneFunc\n#define FT_Glyph_Transform_Func  FT_Glyph_TransformFunc\n#define FT_Glyph_BBox_Func       FT_Glyph_GetBBoxFunc\n#define FT_Glyph_Copy_Func       FT_Glyph_CopyFunc\n#define FT_Glyph_Prepare_Func    FT_Glyph_PrepareFunc\n\n\n  struct  FT_Glyph_Class_\n  {\n    FT_Long                 glyph_size;\n    FT_Glyph_Format         glyph_format;\n    FT_Glyph_InitFunc       glyph_init;\n    FT_Glyph_DoneFunc       glyph_done;\n    FT_Glyph_CopyFunc       glyph_copy;\n    FT_Glyph_TransformFunc  glyph_transform;\n    FT_Glyph_GetBBoxFunc    glyph_bbox;\n    FT_Glyph_PrepareFunc    glyph_prepare;\n  };\n\n\n  typedef FT_Error\n  (*FT_Renderer_RenderFunc)( FT_Renderer       renderer,\n                             FT_GlyphSlot      slot,\n                             FT_UInt           mode,\n                             const FT_Vector*  origin );\n\n  typedef FT_Error\n  (*FT_Renderer_TransformFunc)( FT_Renderer       renderer,\n                                FT_GlyphSlot      slot,\n                                const FT_Matrix*  matrix,\n                                const FT_Vector*  delta );\n\n\n  typedef void\n  (*FT_Renderer_GetCBoxFunc)( FT_Renderer   renderer,\n                              FT_GlyphSlot  slot,\n                              FT_BBox*      cbox );\n\n\n  typedef FT_Error\n  (*FT_Renderer_SetModeFunc)( FT_Renderer  renderer,\n                              FT_ULong     mode_tag,\n                              FT_Pointer   mode_ptr );\n\n/* deprecated identifiers */\n#define FTRenderer_render  FT_Renderer_RenderFunc\n#define FTRenderer_transform  FT_Renderer_TransformFunc\n#define FTRenderer_getCBox  FT_Renderer_GetCBoxFunc\n#define FTRenderer_setMode  FT_Renderer_SetModeFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Renderer_Class                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The renderer module class descriptor.                              */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root            :: The root @FT_Module_Class fields.               */\n  /*                                                                       */\n  /*    glyph_format    :: The glyph image format this renderer handles.   */\n  /*                                                                       */\n  /*    render_glyph    :: A method used to render the image that is in a  */\n  /*                       given glyph slot into a bitmap.                 */\n  /*                                                                       */\n  /*    transform_glyph :: A method used to transform the image that is in */\n  /*                       a given glyph slot.                             */\n  /*                                                                       */\n  /*    get_glyph_cbox  :: A method used to access the glyph's cbox.       */\n  /*                                                                       */\n  /*    set_mode        :: A method used to pass additional parameters.    */\n  /*                                                                       */\n  /*    raster_class    :: For @FT_GLYPH_FORMAT_OUTLINE renderers only.    */\n  /*                       This is a pointer to its raster's class.        */\n  /*                                                                       */\n  typedef struct  FT_Renderer_Class_\n  {\n    FT_Module_Class            root;\n\n    FT_Glyph_Format            glyph_format;\n\n    FT_Renderer_RenderFunc     render_glyph;\n    FT_Renderer_TransformFunc  transform_glyph;\n    FT_Renderer_GetCBoxFunc    get_glyph_cbox;\n    FT_Renderer_SetModeFunc    set_mode;\n\n    FT_Raster_Funcs*           raster_class;\n\n  } FT_Renderer_Class;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Renderer                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the current renderer for a given glyph format.            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to the library object.                         */\n  /*                                                                       */\n  /*    format  :: The glyph format.                                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A renderer handle.  0~if none found.                               */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    An error will be returned if a module already exists by that name, */\n  /*    or if the module requires a version of FreeType that is too great. */\n  /*                                                                       */\n  /*    To add a new renderer, simply use @FT_Add_Module.  To retrieve a   */\n  /*    renderer by its name, use @FT_Get_Module.                          */\n  /*                                                                       */\n  FT_EXPORT( FT_Renderer )\n  FT_Get_Renderer( FT_Library       library,\n                   FT_Glyph_Format  format );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Renderer                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Set the current renderer to use, and set additional mode.          */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    renderer   :: A handle to the renderer object.                     */\n  /*                                                                       */\n  /*    num_params :: The number of additional parameters.                 */\n  /*                                                                       */\n  /*    parameters :: Additional parameters.                               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    In case of success, the renderer will be used to convert glyph     */\n  /*    images in the renderer's known format into bitmaps.                */\n  /*                                                                       */\n  /*    This doesn't change the current renderer for other formats.        */\n  /*                                                                       */\n  /*    Currently, only the B/W renderer, if compiled with                 */\n  /*    FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels               */\n  /*    anti-aliasing mode; this option must be set directly in            */\n  /*    `ftraster.c' and is undefined by default) accepts a single tag     */\n  /*    `pal5' to set its gray palette as a character string with          */\n  /*    5~elements.  Consequently, the third and fourth argument are zero  */\n  /*    normally.                                                          */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Renderer( FT_Library     library,\n                   FT_Renderer    renderer,\n                   FT_UInt        num_params,\n                   FT_Parameter*  parameters );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTRENDER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftsizes.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsizes.h                                                              */\n/*                                                                         */\n/*    FreeType size objects management (specification).                    */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Typical application would normally not need to use these functions.   */\n  /* However, they have been placed in a public API for the rare cases     */\n  /* where they are needed.                                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTSIZES_H__\n#define __FTSIZES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    sizes_management                                                   */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Size Management                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Managing multiple sizes per face.                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    When creating a new face object (e.g., with @FT_New_Face), an      */\n  /*    @FT_Size object is automatically created and used to store all     */\n  /*    pixel-size dependent information, available in the `face->size'    */\n  /*    field.                                                             */\n  /*                                                                       */\n  /*    It is however possible to create more sizes for a given face,      */\n  /*    mostly in order to manage several character pixel sizes of the     */\n  /*    same font family and style.  See @FT_New_Size and @FT_Done_Size.   */\n  /*                                                                       */\n  /*    Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only           */\n  /*    modify the contents of the current `active' size; you thus need    */\n  /*    to use @FT_Activate_Size to change it.                             */\n  /*                                                                       */\n  /*    99% of applications won't need the functions provided here,        */\n  /*    especially if they use the caching sub-system, so be cautious      */\n  /*    when using these.                                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Size                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new size object from a given face object.                 */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to a parent face object.                          */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    asize :: A handle to a new size object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You need to call @FT_Activate_Size in order to select the new size */\n  /*    for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,      */\n  /*    @FT_Load_Glyph, @FT_Load_Char, etc.                                */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Size( FT_Face   face,\n               FT_Size*  size );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_Size                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Discard a given size object.  Note that @FT_Done_Face              */\n  /*    automatically discards all size objects allocated with             */\n  /*    @FT_New_Size.                                                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    size :: A handle to a target size object.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Done_Size( FT_Size  size );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Activate_Size                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Even though it is possible to create several size objects for a    */\n  /*    given face (see @FT_New_Size for details), functions like          */\n  /*    @FT_Load_Glyph or @FT_Load_Char only use the one that has been     */\n  /*    activated last to determine the `current character pixel size'.    */\n  /*                                                                       */\n  /*    This function can be used to `activate' a previously created size  */\n  /*    object.                                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    size :: A handle to a target size object.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If `face' is the size's parent face object, this function changes  */\n  /*    the value of `face->size' to the input size handle.                */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Activate_Size( FT_Size  size );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTSIZES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftsnames.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsnames.h                                                             */\n/*                                                                         */\n/*    Simple interface to access SFNT name tables (which are used          */\n/*    to hold font names, copyright info, notices, etc.) (specification).  */\n/*                                                                         */\n/*    This is _not_ used to retrieve glyph names!                          */\n/*                                                                         */\n/*  Copyright 1996-2003, 2006, 2009, 2010, 2013 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FT_SFNT_NAMES_H__\n#define __FT_SFNT_NAMES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    sfnt_names                                                         */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    SFNT Names                                                         */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Access the names embedded in TrueType and OpenType files.          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The TrueType and OpenType specifications allow the inclusion of    */\n  /*    a special `names table' in font files.  This table contains        */\n  /*    textual (and internationalized) information regarding the font,    */\n  /*    like family name, copyright, version, etc.                         */\n  /*                                                                       */\n  /*    The definitions below are used to access them if available.        */\n  /*                                                                       */\n  /*    Note that this has nothing to do with glyph names!                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_SfntName                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model an SFNT `name' table entry.              */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    platform_id :: The platform ID for `string'.                       */\n  /*                                                                       */\n  /*    encoding_id :: The encoding ID for `string'.                       */\n  /*                                                                       */\n  /*    language_id :: The language ID for `string'.                       */\n  /*                                                                       */\n  /*    name_id     :: An identifier for `string'.                         */\n  /*                                                                       */\n  /*    string      :: The `name' string.  Note that its format differs    */\n  /*                   depending on the (platform,encoding) pair.  It can  */\n  /*                   be a Pascal String, a UTF-16 one, etc.              */\n  /*                                                                       */\n  /*                   Generally speaking, the string is not               */\n  /*                   zero-terminated.  Please refer to the TrueType      */\n  /*                   specification for details.                          */\n  /*                                                                       */\n  /*    string_len  :: The length of `string' in bytes.                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Possible values for `platform_id', `encoding_id', `language_id',   */\n  /*    and `name_id' are given in the file `ttnameid.h'.  For details     */\n  /*    please refer to the TrueType or OpenType specification.            */\n  /*                                                                       */\n  /*    See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX,       */\n  /*    @TT_ISO_ID_XXX, and @TT_MS_ID_XXX.                                 */\n  /*                                                                       */\n  typedef struct  FT_SfntName_\n  {\n    FT_UShort  platform_id;\n    FT_UShort  encoding_id;\n    FT_UShort  language_id;\n    FT_UShort  name_id;\n\n    FT_Byte*   string;      /* this string is *not* null-terminated! */\n    FT_UInt    string_len;  /* in bytes */\n\n  } FT_SfntName;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Sfnt_Name_Count                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the number of name strings in the SFNT `name' table.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source face.                               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The number of strings in the `name' table.                         */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt )\n  FT_Get_Sfnt_Name_Count( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Sfnt_Name                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve a string of the SFNT `name' table for a given index.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face  :: A handle to the source face.                              */\n  /*                                                                       */\n  /*    idx   :: The index of the `name' string.                           */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aname :: The indexed @FT_SfntName structure.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The `string' array returned in the `aname' structure is not        */\n  /*    null-terminated.  The application should deallocate it if it is no */\n  /*    longer in use.                                                     */\n  /*                                                                       */\n  /*    Use @FT_Get_Sfnt_Name_Count to get the total number of available   */\n  /*    `name' table entries, then do a loop until you get the right       */\n  /*    platform, encoding, and name ID.                                   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Sfnt_Name( FT_Face       face,\n                    FT_UInt       idx,\n                    FT_SfntName  *aname );\n\n\n  /***************************************************************************\n   *\n   * @constant:\n   *   FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY\n   *\n   * @description:\n   *   A constant used as the tag of @FT_Parameter structures to make\n   *   FT_Open_Face() ignore preferred family subfamily names in `name'\n   *   table since OpenType version 1.4.  For backwards compatibility with\n   *   legacy systems that have a 4-face-per-family restriction.\n   *\n   */\n#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY  FT_MAKE_TAG( 'i', 'g', 'p', 'f' )\n\n\n  /***************************************************************************\n   *\n   * @constant:\n   *   FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY\n   *\n   * @description:\n   *   A constant used as the tag of @FT_Parameter structures to make\n   *   FT_Open_Face() ignore preferred subfamily names in `name' table since\n   *   OpenType version 1.4.  For backwards compatibility with legacy\n   *   systems that have a 4-face-per-family restriction.\n   *\n   */\n#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY  FT_MAKE_TAG( 'i', 'g', 'p', 's' )\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FT_SFNT_NAMES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftstroke.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftstroke.h                                                             */\n/*                                                                         */\n/*    FreeType path stroker (specification).                               */\n/*                                                                         */\n/*  Copyright 2002-2006, 2008, 2009, 2011-2012, 2014 by                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FT_STROKE_H__\n#define __FT_STROKE_H__\n\n#include <ft2build.h>\n#include FT_OUTLINE_H\n#include FT_GLYPH_H\n\n\nFT_BEGIN_HEADER\n\n\n /************************************************************************\n  *\n  * @section:\n  *    glyph_stroker\n  *\n  * @title:\n  *    Glyph Stroker\n  *\n  * @abstract:\n  *    Generating bordered and stroked glyphs.\n  *\n  * @description:\n  *    This component generates stroked outlines of a given vectorial\n  *    glyph.  It also allows you to retrieve the `outside' and/or the\n  *    `inside' borders of the stroke.\n  *\n  *    This can be useful to generate `bordered' glyph, i.e., glyphs\n  *    displayed with a coloured (and anti-aliased) border around their\n  *    shape.\n  *\n  * @order:\n  *    FT_Stroker\n  *\n  *    FT_Stroker_LineJoin\n  *    FT_Stroker_LineCap\n  *    FT_StrokerBorder\n  *\n  *    FT_Outline_GetInsideBorder\n  *    FT_Outline_GetOutsideBorder\n  *\n  *    FT_Glyph_Stroke\n  *    FT_Glyph_StrokeBorder\n  *\n  *    FT_Stroker_New\n  *    FT_Stroker_Set\n  *    FT_Stroker_Rewind\n  *    FT_Stroker_ParseOutline\n  *    FT_Stroker_Done\n  *\n  *    FT_Stroker_BeginSubPath\n  *    FT_Stroker_EndSubPath\n  *\n  *    FT_Stroker_LineTo\n  *    FT_Stroker_ConicTo\n  *    FT_Stroker_CubicTo\n  *\n  *    FT_Stroker_GetBorderCounts\n  *    FT_Stroker_ExportBorder\n  *    FT_Stroker_GetCounts\n  *    FT_Stroker_Export\n  *\n  */\n\n\n /**************************************************************\n  *\n  * @type:\n  *   FT_Stroker\n  *\n  * @description:\n  *   Opaque handle to a path stroker object.\n  */\n  typedef struct FT_StrokerRec_*  FT_Stroker;\n\n\n  /**************************************************************\n   *\n   * @enum:\n   *   FT_Stroker_LineJoin\n   *\n   * @description:\n   *   These values determine how two joining lines are rendered\n   *   in a stroker.\n   *\n   * @values:\n   *   FT_STROKER_LINEJOIN_ROUND ::\n   *     Used to render rounded line joins.  Circular arcs are used\n   *     to join two lines smoothly.\n   *\n   *   FT_STROKER_LINEJOIN_BEVEL ::\n   *     Used to render beveled line joins.  The outer corner of\n   *     the joined lines is filled by enclosing the triangular\n   *     region of the corner with a straight line between the\n   *     outer corners of each stroke.\n   *\n   *   FT_STROKER_LINEJOIN_MITER_FIXED ::\n   *     Used to render mitered line joins, with fixed bevels if the\n   *     miter limit is exceeded.  The outer edges of the strokes\n   *     for the two segments are extended until they meet at an\n   *     angle.  If the segments meet at too sharp an angle (such\n   *     that the miter would extend from the intersection of the\n   *     segments a distance greater than the product of the miter\n   *     limit value and the border radius), then a bevel join (see\n   *     above) is used instead.  This prevents long spikes being\n   *     created.  FT_STROKER_LINEJOIN_MITER_FIXED generates a miter\n   *     line join as used in PostScript and PDF.\n   *\n   *   FT_STROKER_LINEJOIN_MITER_VARIABLE ::\n   *   FT_STROKER_LINEJOIN_MITER ::\n   *     Used to render mitered line joins, with variable bevels if\n   *     the miter limit is exceeded.  The intersection of the\n   *     strokes is clipped at a line perpendicular to the bisector\n   *     of the angle between the strokes, at the distance from the\n   *     intersection of the segments equal to the product of the\n   *     miter limit value and the border radius.  This prevents\n   *     long spikes being created.\n   *     FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line\n   *     join as used in XPS.  FT_STROKER_LINEJOIN_MITER is an alias\n   *     for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for\n   *     backwards compatibility.\n   */\n  typedef enum  FT_Stroker_LineJoin_\n  {\n    FT_STROKER_LINEJOIN_ROUND          = 0,\n    FT_STROKER_LINEJOIN_BEVEL          = 1,\n    FT_STROKER_LINEJOIN_MITER_VARIABLE = 2,\n    FT_STROKER_LINEJOIN_MITER          = FT_STROKER_LINEJOIN_MITER_VARIABLE,\n    FT_STROKER_LINEJOIN_MITER_FIXED    = 3\n\n  } FT_Stroker_LineJoin;\n\n\n  /**************************************************************\n   *\n   * @enum:\n   *   FT_Stroker_LineCap\n   *\n   * @description:\n   *   These values determine how the end of opened sub-paths are\n   *   rendered in a stroke.\n   *\n   * @values:\n   *   FT_STROKER_LINECAP_BUTT ::\n   *     The end of lines is rendered as a full stop on the last\n   *     point itself.\n   *\n   *   FT_STROKER_LINECAP_ROUND ::\n   *     The end of lines is rendered as a half-circle around the\n   *     last point.\n   *\n   *   FT_STROKER_LINECAP_SQUARE ::\n   *     The end of lines is rendered as a square around the\n   *     last point.\n   */\n  typedef enum  FT_Stroker_LineCap_\n  {\n    FT_STROKER_LINECAP_BUTT = 0,\n    FT_STROKER_LINECAP_ROUND,\n    FT_STROKER_LINECAP_SQUARE\n\n  } FT_Stroker_LineCap;\n\n\n  /**************************************************************\n   *\n   * @enum:\n   *   FT_StrokerBorder\n   *\n   * @description:\n   *   These values are used to select a given stroke border\n   *   in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.\n   *\n   * @values:\n   *   FT_STROKER_BORDER_LEFT ::\n   *     Select the left border, relative to the drawing direction.\n   *\n   *   FT_STROKER_BORDER_RIGHT ::\n   *     Select the right border, relative to the drawing direction.\n   *\n   * @note:\n   *   Applications are generally interested in the `inside' and `outside'\n   *   borders.  However, there is no direct mapping between these and the\n   *   `left' and `right' ones, since this really depends on the glyph's\n   *   drawing orientation, which varies between font formats.\n   *\n   *   You can however use @FT_Outline_GetInsideBorder and\n   *   @FT_Outline_GetOutsideBorder to get these.\n   */\n  typedef enum  FT_StrokerBorder_\n  {\n    FT_STROKER_BORDER_LEFT = 0,\n    FT_STROKER_BORDER_RIGHT\n\n  } FT_StrokerBorder;\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Outline_GetInsideBorder\n   *\n   * @description:\n   *   Retrieve the @FT_StrokerBorder value corresponding to the\n   *   `inside' borders of a given outline.\n   *\n   * @input:\n   *   outline ::\n   *     The source outline handle.\n   *\n   * @return:\n   *   The border index.  @FT_STROKER_BORDER_RIGHT for empty or invalid\n   *   outlines.\n   */\n  FT_EXPORT( FT_StrokerBorder )\n  FT_Outline_GetInsideBorder( FT_Outline*  outline );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Outline_GetOutsideBorder\n   *\n   * @description:\n   *   Retrieve the @FT_StrokerBorder value corresponding to the\n   *   `outside' borders of a given outline.\n   *\n   * @input:\n   *   outline ::\n   *     The source outline handle.\n   *\n   * @return:\n   *   The border index.  @FT_STROKER_BORDER_LEFT for empty or invalid\n   *   outlines.\n   */\n  FT_EXPORT( FT_StrokerBorder )\n  FT_Outline_GetOutsideBorder( FT_Outline*  outline );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_New\n   *\n   * @description:\n   *   Create a new stroker object.\n   *\n   * @input:\n   *   library ::\n   *     FreeType library handle.\n   *\n   * @output:\n   *   astroker ::\n   *     A new stroker object handle.  NULL in case of error.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_New( FT_Library   library,\n                  FT_Stroker  *astroker );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Set\n   *\n   * @description:\n   *   Reset a stroker object's attributes.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   radius ::\n   *     The border radius.\n   *\n   *   line_cap ::\n   *     The line cap style.\n   *\n   *   line_join ::\n   *     The line join style.\n   *\n   *   miter_limit ::\n   *     The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and\n   *     FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles,\n   *     expressed as 16.16 fixed-point value.\n   *\n   * @note:\n   *   The radius is expressed in the same units as the outline\n   *   coordinates.\n   *\n   *   This function calls @FT_Stroker_Rewind automatically.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Set( FT_Stroker           stroker,\n                  FT_Fixed             radius,\n                  FT_Stroker_LineCap   line_cap,\n                  FT_Stroker_LineJoin  line_join,\n                  FT_Fixed             miter_limit );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Rewind\n   *\n   * @description:\n   *   Reset a stroker object without changing its attributes.\n   *   You should call this function before beginning a new\n   *   series of calls to @FT_Stroker_BeginSubPath or\n   *   @FT_Stroker_EndSubPath.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Rewind( FT_Stroker  stroker );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_ParseOutline\n   *\n   * @description:\n   *   A convenience function used to parse a whole outline with\n   *   the stroker.  The resulting outline(s) can be retrieved\n   *   later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   outline ::\n   *     The source outline.\n   *\n   *   opened ::\n   *     A boolean.  If~1, the outline is treated as an open path instead\n   *     of a closed one.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If `opened' is~0 (the default), the outline is treated as a closed\n   *   path, and the stroker generates two distinct `border' outlines.\n   *\n   *   If `opened' is~1, the outline is processed as an open path, and the\n   *   stroker generates a single `stroke' outline.\n   *\n   *   This function calls @FT_Stroker_Rewind automatically.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_ParseOutline( FT_Stroker   stroker,\n                           FT_Outline*  outline,\n                           FT_Bool      opened );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_BeginSubPath\n   *\n   * @description:\n   *   Start a new sub-path in the stroker.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   to ::\n   *     A pointer to the start vector.\n   *\n   *   open ::\n   *     A boolean.  If~1, the sub-path is treated as an open one.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function is useful when you need to stroke a path that is\n   *   not stored as an @FT_Outline object.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_BeginSubPath( FT_Stroker  stroker,\n                           FT_Vector*  to,\n                           FT_Bool     open );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_EndSubPath\n   *\n   * @description:\n   *   Close the current sub-path in the stroker.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function after @FT_Stroker_BeginSubPath.\n   *   If the subpath was not `opened', this function `draws' a\n   *   single line segment to the start position when needed.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_EndSubPath( FT_Stroker  stroker );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_LineTo\n   *\n   * @description:\n   *   `Draw' a single line segment in the stroker's current sub-path,\n   *   from the last position.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   to ::\n   *     A pointer to the destination point.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function between @FT_Stroker_BeginSubPath and\n   *   @FT_Stroker_EndSubPath.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_LineTo( FT_Stroker  stroker,\n                     FT_Vector*  to );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_ConicTo\n   *\n   * @description:\n   *   `Draw' a single quadratic Bézier in the stroker's current sub-path,\n   *   from the last position.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   control ::\n   *     A pointer to a Bézier control point.\n   *\n   *   to ::\n   *     A pointer to the destination point.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function between @FT_Stroker_BeginSubPath and\n   *   @FT_Stroker_EndSubPath.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_ConicTo( FT_Stroker  stroker,\n                      FT_Vector*  control,\n                      FT_Vector*  to );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_CubicTo\n   *\n   * @description:\n   *   `Draw' a single cubic Bézier in the stroker's current sub-path,\n   *   from the last position.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   control1 ::\n   *     A pointer to the first Bézier control point.\n   *\n   *   control2 ::\n   *     A pointer to second Bézier control point.\n   *\n   *   to ::\n   *     A pointer to the destination point.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function between @FT_Stroker_BeginSubPath and\n   *   @FT_Stroker_EndSubPath.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_CubicTo( FT_Stroker  stroker,\n                      FT_Vector*  control1,\n                      FT_Vector*  control2,\n                      FT_Vector*  to );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_GetBorderCounts\n   *\n   * @description:\n   *   Call this function once you have finished parsing your paths\n   *   with the stroker.  It returns the number of points and\n   *   contours necessary to export one of the `border' or `stroke'\n   *   outlines generated by the stroker.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   border ::\n   *     The border index.\n   *\n   * @output:\n   *   anum_points ::\n   *     The number of points.\n   *\n   *   anum_contours ::\n   *     The number of contours.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   When an outline, or a sub-path, is `closed', the stroker generates\n   *   two independent `border' outlines, named `left' and `right'.\n   *\n   *   When the outline, or a sub-path, is `opened', the stroker merges\n   *   the `border' outlines with caps.  The `left' border receives all\n   *   points, while the `right' border becomes empty.\n   *\n   *   Use the function @FT_Stroker_GetCounts instead if you want to\n   *   retrieve the counts associated to both borders.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_GetBorderCounts( FT_Stroker        stroker,\n                              FT_StrokerBorder  border,\n                              FT_UInt          *anum_points,\n                              FT_UInt          *anum_contours );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_ExportBorder\n   *\n   * @description:\n   *   Call this function after @FT_Stroker_GetBorderCounts to\n   *   export the corresponding border to your own @FT_Outline\n   *   structure.\n   *\n   *   Note that this function appends the border points and\n   *   contours to your outline, but does not try to resize its\n   *   arrays.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   border ::\n   *     The border index.\n   *\n   *   outline ::\n   *     The target outline handle.\n   *\n   * @note:\n   *   Always call this function after @FT_Stroker_GetBorderCounts to\n   *   get sure that there is enough room in your @FT_Outline object to\n   *   receive all new data.\n   *\n   *   When an outline, or a sub-path, is `closed', the stroker generates\n   *   two independent `border' outlines, named `left' and `right'.\n   *\n   *   When the outline, or a sub-path, is `opened', the stroker merges\n   *   the `border' outlines with caps.  The `left' border receives all\n   *   points, while the `right' border becomes empty.\n   *\n   *   Use the function @FT_Stroker_Export instead if you want to\n   *   retrieve all borders at once.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_ExportBorder( FT_Stroker        stroker,\n                           FT_StrokerBorder  border,\n                           FT_Outline*       outline );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_GetCounts\n   *\n   * @description:\n   *   Call this function once you have finished parsing your paths\n   *   with the stroker.  It returns the number of points and\n   *   contours necessary to export all points/borders from the stroked\n   *   outline/path.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   * @output:\n   *   anum_points ::\n   *     The number of points.\n   *\n   *   anum_contours ::\n   *     The number of contours.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_GetCounts( FT_Stroker  stroker,\n                        FT_UInt    *anum_points,\n                        FT_UInt    *anum_contours );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Export\n   *\n   * @description:\n   *   Call this function after @FT_Stroker_GetBorderCounts to\n   *   export all borders to your own @FT_Outline structure.\n   *\n   *   Note that this function appends the border points and\n   *   contours to your outline, but does not try to resize its\n   *   arrays.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   outline ::\n   *     The target outline handle.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Export( FT_Stroker   stroker,\n                     FT_Outline*  outline );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Done\n   *\n   * @description:\n   *   Destroy a stroker object.\n   *\n   * @input:\n   *   stroker ::\n   *     A stroker handle.  Can be NULL.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Done( FT_Stroker  stroker );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Glyph_Stroke\n   *\n   * @description:\n   *   Stroke a given outline glyph object with a given stroker.\n   *\n   * @inout:\n   *   pglyph ::\n   *     Source glyph handle on input, new glyph handle on output.\n   *\n   * @input:\n   *   stroker ::\n   *     A stroker handle.\n   *\n   *   destroy ::\n   *     A Boolean.  If~1, the source glyph object is destroyed\n   *     on success.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The source glyph is untouched in case of error.\n   *\n   *   Adding stroke may yield a significantly wider and taller glyph\n   *   depending on how large of a radius was used to stroke the glyph.  You\n   *   may need to manually adjust horizontal and vertical advance amounts\n   *   to account for this added size.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_Stroke( FT_Glyph    *pglyph,\n                   FT_Stroker   stroker,\n                   FT_Bool      destroy );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Glyph_StrokeBorder\n   *\n   * @description:\n   *   Stroke a given outline glyph object with a given stroker, but\n   *   only return either its inside or outside border.\n   *\n   * @inout:\n   *   pglyph ::\n   *     Source glyph handle on input, new glyph handle on output.\n   *\n   * @input:\n   *   stroker ::\n   *     A stroker handle.\n   *\n   *   inside ::\n   *     A Boolean.  If~1, return the inside border, otherwise\n   *     the outside border.\n   *\n   *   destroy ::\n   *     A Boolean.  If~1, the source glyph object is destroyed\n   *     on success.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The source glyph is untouched in case of error.\n   *\n   *   Adding stroke may yield a significantly wider and taller glyph\n   *   depending on how large of a radius was used to stroke the glyph.  You\n   *   may need to manually adjust horizontal and vertical advance amounts\n   *   to account for this added size.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_StrokeBorder( FT_Glyph    *pglyph,\n                         FT_Stroker   stroker,\n                         FT_Bool      inside,\n                         FT_Bool      destroy );\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __FT_STROKE_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftsynth.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsynth.h                                                              */\n/*                                                                         */\n/*    FreeType synthesizing code for emboldening and slanting              */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*********                                                       *********/\n  /*********        WARNING, THIS IS ALPHA CODE!  THIS API         *********/\n  /*********    IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE    *********/\n  /*********            FREETYPE DEVELOPMENT TEAM                  *********/\n  /*********                                                       *********/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* Main reason for not lifting the functions in this module to a  */\n  /* `standard' API is that the used parameters for emboldening and */\n  /* slanting are not configurable.  Consider the functions as a    */\n  /* code resource that should be copied into the application and   */\n  /* adapted to the particular needs.                               */\n\n\n#ifndef __FTSYNTH_H__\n#define __FTSYNTH_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /* Embolden a glyph by a `reasonable' value (which is highly a matter of */\n  /* taste).  This function is actually a convenience function, providing  */\n  /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden.           */\n  /*                                                                       */\n  /* For emboldened outlines the height, width, and advance metrics are    */\n  /* increased by the strength of the emboldening.  You can also call      */\n  /* @FT_Outline_Get_CBox to get precise values.                           */\n  FT_EXPORT( void )\n  FT_GlyphSlot_Embolden( FT_GlyphSlot  slot );\n\n  /* Slant an outline glyph to the right by about 12 degrees. */\n  FT_EXPORT( void )\n  FT_GlyphSlot_Oblique( FT_GlyphSlot  slot );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTSYNTH_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftsystem.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsystem.h                                                             */\n/*                                                                         */\n/*    FreeType low-level system interface definition (specification).      */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2005, 2010, 2014 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTSYSTEM_H__\n#define __FTSYSTEM_H__\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*   system_interface                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*   System Interface                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*   How FreeType manages memory and i/o.                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   This section contains various definitions related to memory         */\n  /*   management and i/o access.  You need to understand this             */\n  /*   information if you want to use a custom memory manager or you own   */\n  /*   i/o streams.                                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                  M E M O R Y   M A N A G E M E N T                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FT_Memory\n   *\n   * @description:\n   *   A handle to a given memory manager object, defined with an\n   *   @FT_MemoryRec structure.\n   *\n   */\n  typedef struct FT_MemoryRec_*  FT_Memory;\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Alloc_Func\n   *\n   * @description:\n   *   A function used to allocate `size' bytes from `memory'.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the source memory manager.\n   *\n   *   size ::\n   *     The size in bytes to allocate.\n   *\n   * @return:\n   *   Address of new memory block.  0~in case of failure.\n   *\n   */\n  typedef void*\n  (*FT_Alloc_Func)( FT_Memory  memory,\n                    long       size );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Free_Func\n   *\n   * @description:\n   *   A function used to release a given block of memory.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the source memory manager.\n   *\n   *   block ::\n   *     The address of the target memory block.\n   *\n   */\n  typedef void\n  (*FT_Free_Func)( FT_Memory  memory,\n                   void*      block );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Realloc_Func\n   *\n   * @description:\n   *   A function used to re-allocate a given block of memory.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the source memory manager.\n   *\n   *   cur_size ::\n   *     The block's current size in bytes.\n   *\n   *   new_size ::\n   *     The block's requested new size.\n   *\n   *   block ::\n   *     The block's current address.\n   *\n   * @return:\n   *   New block address.  0~in case of memory shortage.\n   *\n   * @note:\n   *   In case of error, the old block must still be available.\n   *\n   */\n  typedef void*\n  (*FT_Realloc_Func)( FT_Memory  memory,\n                      long       cur_size,\n                      long       new_size,\n                      void*      block );\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   FT_MemoryRec\n   *\n   * @description:\n   *   A structure used to describe a given memory manager to FreeType~2.\n   *\n   * @fields:\n   *   user ::\n   *     A generic typeless pointer for user data.\n   *\n   *   alloc ::\n   *     A pointer type to an allocation function.\n   *\n   *   free ::\n   *     A pointer type to an memory freeing function.\n   *\n   *   realloc ::\n   *     A pointer type to a reallocation function.\n   *\n   */\n  struct  FT_MemoryRec_\n  {\n    void*            user;\n    FT_Alloc_Func    alloc;\n    FT_Free_Func     free;\n    FT_Realloc_Func  realloc;\n  };\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                       I / O   M A N A G E M E N T                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FT_Stream\n   *\n   * @description:\n   *   A handle to an input stream.\n   *\n   * @also:\n   *   See @FT_StreamRec for the publicly accessible fields of a given\n   *   stream object.\n   *\n   */\n  typedef struct FT_StreamRec_*  FT_Stream;\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   FT_StreamDesc\n   *\n   * @description:\n   *   A union type used to store either a long or a pointer.  This is used\n   *   to store a file descriptor or a `FILE*' in an input stream.\n   *\n   */\n  typedef union  FT_StreamDesc_\n  {\n    long   value;\n    void*  pointer;\n\n  } FT_StreamDesc;\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Stream_IoFunc\n   *\n   * @description:\n   *   A function used to seek and read data from a given input stream.\n   *\n   * @input:\n   *   stream ::\n   *     A handle to the source stream.\n   *\n   *   offset ::\n   *     The offset of read in stream (always from start).\n   *\n   *   buffer ::\n   *     The address of the read buffer.\n   *\n   *   count ::\n   *     The number of bytes to read from the stream.\n   *\n   * @return:\n   *   The number of bytes effectively read by the stream.\n   *\n   * @note:\n   *   This function might be called to perform a seek or skip operation\n   *   with a `count' of~0.  A non-zero return value then indicates an\n   *   error.\n   *\n   */\n  typedef unsigned long\n  (*FT_Stream_IoFunc)( FT_Stream       stream,\n                       unsigned long   offset,\n                       unsigned char*  buffer,\n                       unsigned long   count );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Stream_CloseFunc\n   *\n   * @description:\n   *   A function used to close a given input stream.\n   *\n   * @input:\n   *  stream ::\n   *     A handle to the target stream.\n   *\n   */\n  typedef void\n  (*FT_Stream_CloseFunc)( FT_Stream  stream );\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   FT_StreamRec\n   *\n   * @description:\n   *   A structure used to describe an input stream.\n   *\n   * @input:\n   *   base ::\n   *     For memory-based streams, this is the address of the first stream\n   *     byte in memory.  This field should always be set to NULL for\n   *     disk-based streams.\n   *\n   *   size ::\n   *     The stream size in bytes.\n   *\n   *     In case of compressed streams where the size is unknown before\n   *     actually doing the decompression, the value is set to 0x7FFFFFFF. \n   *     (Note that this size value can occur for normal streams also; it is\n   *     thus just a hint.)\n   *\n   *   pos ::\n   *     The current position within the stream.\n   *\n   *   descriptor ::\n   *     This field is a union that can hold an integer or a pointer.  It is\n   *     used by stream implementations to store file descriptors or `FILE*'\n   *     pointers.\n   *\n   *   pathname ::\n   *     This field is completely ignored by FreeType.  However, it is often\n   *     useful during debugging to use it to store the stream's filename\n   *     (where available).\n   *\n   *   read ::\n   *     The stream's input function.\n   *\n   *   close ::\n   *     The stream's close function.\n   *\n   *   memory ::\n   *     The memory manager to use to preload frames.  This is set\n   *     internally by FreeType and shouldn't be touched by stream\n   *     implementations.\n   *\n   *   cursor ::\n   *     This field is set and used internally by FreeType when parsing\n   *     frames.\n   *\n   *   limit ::\n   *     This field is set and used internally by FreeType when parsing\n   *     frames.\n   *\n   */\n  typedef struct  FT_StreamRec_\n  {\n    unsigned char*       base;\n    unsigned long        size;\n    unsigned long        pos;\n\n    FT_StreamDesc        descriptor;\n    FT_StreamDesc        pathname;\n    FT_Stream_IoFunc     read;\n    FT_Stream_CloseFunc  close;\n\n    FT_Memory            memory;\n    unsigned char*       cursor;\n    unsigned char*       limit;\n\n  } FT_StreamRec;\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTSYSTEM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/fttrigon.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fttrigon.h                                                             */\n/*                                                                         */\n/*    FreeType trigonometric functions (specification).                    */\n/*                                                                         */\n/*  Copyright 2001, 2003, 2005, 2007, 2013 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTTRIGON_H__\n#define __FTTRIGON_H__\n\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*   computations                                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FT_Angle\n   *\n   * @description:\n   *   This type is used to model angle values in FreeType.  Note that the\n   *   angle is a 16.16 fixed-point value expressed in degrees.\n   *\n   */\n  typedef FT_Fixed  FT_Angle;\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_PI\n   *\n   * @description:\n   *   The angle pi expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_PI  ( 180L << 16 )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_2PI\n   *\n   * @description:\n   *   The angle 2*pi expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_2PI  ( FT_ANGLE_PI * 2 )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_PI2\n   *\n   * @description:\n   *   The angle pi/2 expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_PI2  ( FT_ANGLE_PI / 2 )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_PI4\n   *\n   * @description:\n   *   The angle pi/4 expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_PI4  ( FT_ANGLE_PI / 4 )\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Sin\n   *\n   * @description:\n   *   Return the sinus of a given angle in fixed-point format.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   * @return:\n   *   The sinus value.\n   *\n   * @note:\n   *   If you need both the sinus and cosinus for a given angle, use the\n   *   function @FT_Vector_Unit.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Sin( FT_Angle  angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Cos\n   *\n   * @description:\n   *   Return the cosinus of a given angle in fixed-point format.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   * @return:\n   *   The cosinus value.\n   *\n   * @note:\n   *   If you need both the sinus and cosinus for a given angle, use the\n   *   function @FT_Vector_Unit.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Cos( FT_Angle  angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Tan\n   *\n   * @description:\n   *   Return the tangent of a given angle in fixed-point format.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   * @return:\n   *   The tangent value.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Tan( FT_Angle  angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Atan2\n   *\n   * @description:\n   *   Return the arc-tangent corresponding to a given vector (x,y) in\n   *   the 2d plane.\n   *\n   * @input:\n   *   x ::\n   *     The horizontal vector coordinate.\n   *\n   *   y ::\n   *     The vertical vector coordinate.\n   *\n   * @return:\n   *   The arc-tangent value (i.e. angle).\n   *\n   */\n  FT_EXPORT( FT_Angle )\n  FT_Atan2( FT_Fixed  x,\n            FT_Fixed  y );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Angle_Diff\n   *\n   * @description:\n   *   Return the difference between two angles.  The result is always\n   *   constrained to the ]-PI..PI] interval.\n   *\n   * @input:\n   *   angle1 ::\n   *     First angle.\n   *\n   *   angle2 ::\n   *     Second angle.\n   *\n   * @return:\n   *   Constrained value of `value2-value1'.\n   *\n   */\n  FT_EXPORT( FT_Angle )\n  FT_Angle_Diff( FT_Angle  angle1,\n                 FT_Angle  angle2 );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Unit\n   *\n   * @description:\n   *   Return the unit vector corresponding to a given angle.  After the\n   *   call, the value of `vec.x' will be `sin(angle)', and the value of\n   *   `vec.y' will be `cos(angle)'.\n   *\n   *   This function is useful to retrieve both the sinus and cosinus of a\n   *   given angle quickly.\n   *\n   * @output:\n   *   vec ::\n   *     The address of target vector.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_Unit( FT_Vector*  vec,\n                  FT_Angle    angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Rotate\n   *\n   * @description:\n   *   Rotate a vector by a given angle.\n   *\n   * @inout:\n   *   vec ::\n   *     The address of target vector.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_Rotate( FT_Vector*  vec,\n                    FT_Angle    angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Length\n   *\n   * @description:\n   *   Return the length of a given vector.\n   *\n   * @input:\n   *   vec ::\n   *     The address of target vector.\n   *\n   * @return:\n   *   The vector length, expressed in the same units that the original\n   *   vector coordinates.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Vector_Length( FT_Vector*  vec );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Polarize\n   *\n   * @description:\n   *   Compute both the length and angle of a given vector.\n   *\n   * @input:\n   *   vec ::\n   *     The address of source vector.\n   *\n   * @output:\n   *   length ::\n   *     The vector length.\n   *\n   *   angle ::\n   *     The vector angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_Polarize( FT_Vector*  vec,\n                      FT_Fixed   *length,\n                      FT_Angle   *angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_From_Polar\n   *\n   * @description:\n   *   Compute vector coordinates from a length and angle.\n   *\n   * @output:\n   *   vec ::\n   *     The address of source vector.\n   *\n   * @input:\n   *   length ::\n   *     The vector length.\n   *\n   *   angle ::\n   *     The vector angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_From_Polar( FT_Vector*  vec,\n                        FT_Fixed    length,\n                        FT_Angle    angle );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTTRIGON_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftttdrv.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftttdrv.h                                                              */\n/*                                                                         */\n/*    FreeType API for controlling the TrueType driver                     */\n/*    (specification only).                                                */\n/*                                                                         */\n/*  Copyright 2013 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTTTDRV_H__\n#define __FTTTDRV_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   tt_driver\n   *\n   * @title:\n   *   The TrueType driver\n   *\n   * @abstract:\n   *   Controlling the TrueType driver module.\n   *\n   * @description:\n   *   While FreeType's TrueType driver doesn't expose API functions by\n   *   itself, it is possible to control its behaviour with @FT_Property_Set\n   *   and @FT_Property_Get.  The following lists the available properties\n   *   together with the necessary macros and structures.\n   *\n   *   The TrueType driver's module name is `truetype'.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   interpreter-version\n   *\n   * @description:\n   *   Currently, two versions are available, representing the bytecode\n   *   interpreter with and without subpixel hinting support,\n   *   respectively.  The default is subpixel support if\n   *   TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel\n   *   support otherwise (since it isn't available then).\n   *\n   *   If subpixel hinting is on, many TrueType bytecode instructions\n   *   behave differently compared to B/W or grayscale rendering.  The\n   *   main idea is to render at a much increased horizontal resolution,\n   *   then sampling down the created output to subpixel precision.\n   *   However, many older fonts are not suited to this and must be\n   *   specially taken care of by applying (hardcoded) font-specific\n   *   tweaks.\n   *\n   *   Details on subpixel hinting and some of the necessary tweaks can be\n   *   found in Greg Hitchcock's whitepaper at\n   *   `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.\n   *\n   *   The following example code demonstrates how to activate subpixel\n   *   hinting (omitting the error handling).\n   *\n   *   {\n   *     FT_Library  library;\n   *     FT_Face     face;\n   *     FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_38;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"truetype\",\n   *                               \"interpreter-version\",\n   *                               &interpreter_version );\n   *   }\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_INTERPRETER_VERSION_XXX\n   *\n   * @description:\n   *   A list of constants used for the @interpreter-version property to\n   *   select the hinting engine for Truetype fonts.\n   *\n   *   The numeric value in the constant names represents the version\n   *   number as returned by the `GETINFO' bytecode instruction.\n   *\n   * @values:\n   *   TT_INTERPRETER_VERSION_35 ::\n   *     Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in\n   *     Windows~98; only grayscale and B/W rasterizing is supported.\n   *\n   *   TT_INTERPRETER_VERSION_38 ::\n   *     Version~38 corresponds to MS rasterizer v.1.9; it is roughly\n   *     equivalent to the hinting provided by DirectWrite ClearType (as\n   *     can be found, for example, in the Internet Explorer~9 running on\n   *     Windows~7).\n   *\n   * @note:\n   *   This property controls the behaviour of the bytecode interpreter\n   *   and thus how outlines get hinted.  It does *not* control how glyph\n   *   get rasterized!  In particular, it does not control subpixel color\n   *   filtering.\n   *\n   *   If FreeType has not been compiled with configuration option\n   *   FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 causes an\n   *   `FT_Err_Unimplemented_Feature' error.\n   *\n   *   Depending on the graphics framework, Microsoft uses different\n   *   bytecode engines.  As a consequence, the version numbers returned by\n   *   a call to the `GETINFO[1]' bytecode instruction are more convoluted\n   *   than desired.\n   *\n   *   {\n   *      framework   Windows version   result of GETINFO[1]\n   *     ----------------------------------------------------\n   *       GDI         before XP         35\n   *       GDI         XP and later      37\n   *       GDI+ old    before Vista      37\n   *       GDI+ old    Vista, 7          38\n   *       GDI+        after 7           40\n   *       DWrite      before 8          39\n   *       DWrite      8 and later       40\n   *   }\n   *\n   *   Since FreeType doesn't provide all capabilities of DWrite ClearType,\n   *   using version~38 seems justified.\n   *\n   */\n#define TT_INTERPRETER_VERSION_35  35\n#define TT_INTERPRETER_VERSION_38  38\n\n /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __FTTTDRV_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/fttypes.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fttypes.h                                                              */\n/*                                                                         */\n/*    FreeType simple types definitions (specification only).              */\n/*                                                                         */\n/*  Copyright 1996-2002, 2004, 2006-2009, 2012-2014 by                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTTYPES_H__\n#define __FTTYPES_H__\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_SYSTEM_H\n#include FT_IMAGE_H\n\n#include <stddef.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    basic_types                                                        */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Basic Data Types                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    The basic data types defined by the library.                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the basic data types defined by FreeType~2,  */\n  /*    ranging from simple scalar types to bitmap descriptors.  More      */\n  /*    font-specific structures are defined in a different section.       */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_Byte                                                            */\n  /*    FT_Bytes                                                           */\n  /*    FT_Char                                                            */\n  /*    FT_Int                                                             */\n  /*    FT_UInt                                                            */\n  /*    FT_Int16                                                           */\n  /*    FT_UInt16                                                          */\n  /*    FT_Int32                                                           */\n  /*    FT_UInt32                                                          */\n  /*    FT_Int64                                                           */\n  /*    FT_UInt64                                                          */\n  /*    FT_Short                                                           */\n  /*    FT_UShort                                                          */\n  /*    FT_Long                                                            */\n  /*    FT_ULong                                                           */\n  /*    FT_Bool                                                            */\n  /*    FT_Offset                                                          */\n  /*    FT_PtrDist                                                         */\n  /*    FT_String                                                          */\n  /*    FT_Tag                                                             */\n  /*    FT_Error                                                           */\n  /*    FT_Fixed                                                           */\n  /*    FT_Pointer                                                         */\n  /*    FT_Pos                                                             */\n  /*    FT_Vector                                                          */\n  /*    FT_BBox                                                            */\n  /*    FT_Matrix                                                          */\n  /*    FT_FWord                                                           */\n  /*    FT_UFWord                                                          */\n  /*    FT_F2Dot14                                                         */\n  /*    FT_UnitVector                                                      */\n  /*    FT_F26Dot6                                                         */\n  /*    FT_Data                                                            */\n  /*                                                                       */\n  /*    FT_MAKE_TAG                                                        */\n  /*                                                                       */\n  /*    FT_Generic                                                         */\n  /*    FT_Generic_Finalizer                                               */\n  /*                                                                       */\n  /*    FT_Bitmap                                                          */\n  /*    FT_Pixel_Mode                                                      */\n  /*    FT_Palette_Mode                                                    */\n  /*    FT_Glyph_Format                                                    */\n  /*    FT_IMAGE_TAG                                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Bool                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef of unsigned char, used for simple booleans.  As usual,   */\n  /*    values 1 and~0 represent true and false, respectively.             */\n  /*                                                                       */\n  typedef unsigned char  FT_Bool;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_FWord                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A signed 16-bit integer used to store a distance in original font  */\n  /*    units.                                                             */\n  /*                                                                       */\n  typedef signed short  FT_FWord;   /* distance in FUnits */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_UFWord                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An unsigned 16-bit integer used to store a distance in original    */\n  /*    font units.                                                        */\n  /*                                                                       */\n  typedef unsigned short  FT_UFWord;  /* unsigned distance */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Char                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple typedef for the _signed_ char type.                       */\n  /*                                                                       */\n  typedef signed char  FT_Char;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Byte                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple typedef for the _unsigned_ char type.                     */\n  /*                                                                       */\n  typedef unsigned char  FT_Byte;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Bytes                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for constant memory areas.                               */\n  /*                                                                       */\n  typedef const FT_Byte*  FT_Bytes;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Tag                                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for 32-bit tags (as used in the SFNT format).            */\n  /*                                                                       */\n  typedef FT_UInt32  FT_Tag;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_String                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple typedef for the char type, usually used for strings.      */\n  /*                                                                       */\n  typedef char  FT_String;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Short                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for signed short.                                        */\n  /*                                                                       */\n  typedef signed short  FT_Short;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_UShort                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for unsigned short.                                      */\n  /*                                                                       */\n  typedef unsigned short  FT_UShort;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Int                                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for the int type.                                        */\n  /*                                                                       */\n  typedef signed int  FT_Int;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_UInt                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for the unsigned int type.                               */\n  /*                                                                       */\n  typedef unsigned int  FT_UInt;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Long                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for signed long.                                         */\n  /*                                                                       */\n  typedef signed long  FT_Long;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_ULong                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for unsigned long.                                       */\n  /*                                                                       */\n  typedef unsigned long  FT_ULong;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_F2Dot14                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A signed 2.14 fixed-point type used for unit vectors.              */\n  /*                                                                       */\n  typedef signed short  FT_F2Dot14;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_F26Dot6                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A signed 26.6 fixed-point type used for vectorial pixel            */\n  /*    coordinates.                                                       */\n  /*                                                                       */\n  typedef signed long  FT_F26Dot6;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Fixed                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This type is used to store 16.16 fixed-point values, like scaling  */\n  /*    values or matrix coefficients.                                     */\n  /*                                                                       */\n  typedef signed long  FT_Fixed;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Error                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The FreeType error code type.  A value of~0 is always interpreted  */\n  /*    as a successful operation.                                         */\n  /*                                                                       */\n  typedef int  FT_Error;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Pointer                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple typedef for a typeless pointer.                           */\n  /*                                                                       */\n  typedef void*  FT_Pointer;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Offset                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This is equivalent to the ANSI~C `size_t' type, i.e., the largest  */\n  /*    _unsigned_ integer type used to express a file size or position,   */\n  /*    or a memory block size.                                            */\n  /*                                                                       */\n  typedef size_t  FT_Offset;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_PtrDist                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the       */\n  /*    largest _signed_ integer type used to express the distance         */\n  /*    between two pointers.                                              */\n  /*                                                                       */\n  typedef ft_ptrdiff_t  FT_PtrDist;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_UnitVector                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to store a 2D vector unit vector.  Uses    */\n  /*    FT_F2Dot14 types.                                                  */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    x :: Horizontal coordinate.                                        */\n  /*                                                                       */\n  /*    y :: Vertical coordinate.                                          */\n  /*                                                                       */\n  typedef struct  FT_UnitVector_\n  {\n    FT_F2Dot14  x;\n    FT_F2Dot14  y;\n\n  } FT_UnitVector;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Matrix                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to store a 2x2 matrix.  Coefficients are   */\n  /*    in 16.16 fixed-point format.  The computation performed is:        */\n  /*                                                                       */\n  /*       {                                                               */\n  /*          x' = x*xx + y*xy                                             */\n  /*          y' = x*yx + y*yy                                             */\n  /*       }                                                               */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    xx :: Matrix coefficient.                                          */\n  /*                                                                       */\n  /*    xy :: Matrix coefficient.                                          */\n  /*                                                                       */\n  /*    yx :: Matrix coefficient.                                          */\n  /*                                                                       */\n  /*    yy :: Matrix coefficient.                                          */\n  /*                                                                       */\n  typedef struct  FT_Matrix_\n  {\n    FT_Fixed  xx, xy;\n    FT_Fixed  yx, yy;\n\n  } FT_Matrix;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Data                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Read-only binary data represented as a pointer and a length.       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    pointer :: The data.                                               */\n  /*                                                                       */\n  /*    length  :: The length of the data in bytes.                        */\n  /*                                                                       */\n  typedef struct  FT_Data_\n  {\n    const FT_Byte*  pointer;\n    FT_Int          length;\n\n  } FT_Data;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Generic_Finalizer                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Describe a function used to destroy the `client' data of any       */\n  /*    FreeType object.  See the description of the @FT_Generic type for  */\n  /*    details of usage.                                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    The address of the FreeType object that is under finalization.     */\n  /*    Its client data is accessed through its `generic' field.           */\n  /*                                                                       */\n  typedef void  (*FT_Generic_Finalizer)(void*  object);\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Generic                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Client applications often need to associate their own data to a    */\n  /*    variety of FreeType core objects.  For example, a text layout API  */\n  /*    might want to associate a glyph cache to a given size object.      */\n  /*                                                                       */\n  /*    Some FreeType object contains a `generic' field, of type           */\n  /*    FT_Generic, which usage is left to client applications and font    */\n  /*    servers.                                                           */\n  /*                                                                       */\n  /*    It can be used to store a pointer to client-specific data, as well */\n  /*    as the address of a `finalizer' function, which will be called by  */\n  /*    FreeType when the object is destroyed (for example, the previous   */\n  /*    client example would put the address of the glyph cache destructor */\n  /*    in the `finalizer' field).                                         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    data      :: A typeless pointer to any client-specified data. This */\n  /*                 field is completely ignored by the FreeType library.  */\n  /*                                                                       */\n  /*    finalizer :: A pointer to a `generic finalizer' function, which    */\n  /*                 will be called when the object is destroyed.  If this */\n  /*                 field is set to NULL, no code will be called.         */\n  /*                                                                       */\n  typedef struct  FT_Generic_\n  {\n    void*                 data;\n    FT_Generic_Finalizer  finalizer;\n\n  } FT_Generic;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_MAKE_TAG                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro converts four-letter tags that are used to label        */\n  /*    TrueType tables into an unsigned long, to be used within FreeType. */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The produced values *must* be 32-bit integers.  Don't redefine     */\n  /*    this macro.                                                        */\n  /*                                                                       */\n#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \\\n          (FT_Tag)                        \\\n          ( ( (FT_ULong)_x1 << 24 ) |     \\\n            ( (FT_ULong)_x2 << 16 ) |     \\\n            ( (FT_ULong)_x3 <<  8 ) |     \\\n              (FT_ULong)_x4         )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                    L I S T   M A N A G E M E N T                      */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    list_processing                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_ListNode                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*     Many elements and objects in FreeType are listed through an       */\n  /*     @FT_List record (see @FT_ListRec).  As its name suggests, an      */\n  /*     FT_ListNode is a handle to a single list element.                 */\n  /*                                                                       */\n  typedef struct FT_ListNodeRec_*  FT_ListNode;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_List                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a list record (see @FT_ListRec).                       */\n  /*                                                                       */\n  typedef struct FT_ListRec_*  FT_List;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_ListNodeRec                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to hold a single list element.                    */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    prev :: The previous element in the list.  NULL if first.          */\n  /*                                                                       */\n  /*    next :: The next element in the list.  NULL if last.               */\n  /*                                                                       */\n  /*    data :: A typeless pointer to the listed object.                   */\n  /*                                                                       */\n  typedef struct  FT_ListNodeRec_\n  {\n    FT_ListNode  prev;\n    FT_ListNode  next;\n    void*        data;\n\n  } FT_ListNodeRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_ListRec                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to hold a simple doubly-linked list.  These are   */\n  /*    used in many parts of FreeType.                                    */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    head :: The head (first element) of doubly-linked list.            */\n  /*                                                                       */\n  /*    tail :: The tail (last element) of doubly-linked list.             */\n  /*                                                                       */\n  typedef struct  FT_ListRec_\n  {\n    FT_ListNode  head;\n    FT_ListNode  tail;\n\n  } FT_ListRec;\n\n  /* */\n\n\n#define FT_IS_EMPTY( list )  ( (list).head == 0 )\n#define FT_BOOL( x )  ( (FT_Bool)( x ) )\n\n  /* concatenate C tokens */\n#define FT_ERR_XCAT( x, y )  x ## y\n#define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )\n\n  /* see `ftmoderr.h' for descriptions of the following macros */\n\n#define FT_ERR( e )  FT_ERR_CAT( FT_ERR_PREFIX, e )\n\n#define FT_ERROR_BASE( x )    ( (x) & 0xFF )\n#define FT_ERROR_MODULE( x )  ( (x) & 0xFF00U )\n\n#define FT_ERR_EQ( x, e )                                        \\\n          ( FT_ERROR_BASE( x ) == FT_ERROR_BASE( FT_ERR( e ) ) )\n#define FT_ERR_NEQ( x, e )                                       \\\n          ( FT_ERROR_BASE( x ) != FT_ERROR_BASE( FT_ERR( e ) ) )\n\n\nFT_END_HEADER\n\n#endif /* __FTTYPES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftwinfnt.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftwinfnt.h                                                             */\n/*                                                                         */\n/*    FreeType API for accessing Windows fnt-specific data.                */\n/*                                                                         */\n/*  Copyright 2003, 2004, 2008 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTWINFNT_H__\n#define __FTWINFNT_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    winfnt_fonts                                                       */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Window FNT Files                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Windows FNT specific API.                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of Windows FNT specific      */\n  /*    functions.                                                         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @enum:\n   *   FT_WinFNT_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `charset' byte in\n   *   @FT_WinFNT_HeaderRec.  Exact mapping tables for the various cpXXXX\n   *   encodings (except for cp1361) can be found at\n   *   ftp://ftp.unicode.org/public in the MAPPINGS/VENDORS/MICSFT/WINDOWS\n   *   subdirectory.  cp1361 is roughly a superset of\n   *   MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.\n   *\n   * @values:\n   *   FT_WinFNT_ID_DEFAULT ::\n   *     This is used for font enumeration and font creation as a\n   *     `don't care' value.  Valid font files don't contain this value.\n   *     When querying for information about the character set of the font\n   *     that is currently selected into a specified device context, this\n   *     return value (of the related Windows API) simply denotes failure.\n   *\n   *   FT_WinFNT_ID_SYMBOL ::\n   *     There is no known mapping table available.\n   *\n   *   FT_WinFNT_ID_MAC ::\n   *     Mac Roman encoding.\n   *\n   *   FT_WinFNT_ID_OEM ::\n   *     From Michael Pöttgen <michael@poettgen.de>:\n   *\n   *       The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM\n   *       is used for the charset of vector fonts, like `modern.fon',\n   *       `roman.fon', and `script.fon' on Windows.\n   *\n   *       The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value\n   *       specifies a character set that is operating-system dependent.\n   *\n   *       The `IFIMETRICS' documentation from the `Windows Driver\n   *       Development Kit' says: This font supports an OEM-specific\n   *       character set.  The OEM character set is system dependent.\n   *\n   *       In general OEM, as opposed to ANSI (i.e., cp1252), denotes the\n   *       second default codepage that most international versions of\n   *       Windows have.  It is one of the OEM codepages from\n   *\n   *         http://www.microsoft.com/globaldev/reference/cphome.mspx,\n   *\n   *       and is used for the `DOS boxes', to support legacy applications.\n   *       A German Windows version for example usually uses ANSI codepage\n   *       1252 and OEM codepage 850.\n   *\n   *   FT_WinFNT_ID_CP874 ::\n   *     A superset of Thai TIS 620 and ISO 8859-11.\n   *\n   *   FT_WinFNT_ID_CP932 ::\n   *     A superset of Japanese Shift-JIS (with minor deviations).\n   *\n   *   FT_WinFNT_ID_CP936 ::\n   *     A superset of simplified Chinese GB 2312-1980 (with different\n   *     ordering and minor deviations).\n   *\n   *   FT_WinFNT_ID_CP949 ::\n   *     A superset of Korean Hangul KS~C 5601-1987 (with different\n   *     ordering and minor deviations).\n   *\n   *   FT_WinFNT_ID_CP950 ::\n   *     A superset of traditional Chinese Big~5 ETen (with different\n   *     ordering and minor deviations).\n   *\n   *   FT_WinFNT_ID_CP1250 ::\n   *     A superset of East European ISO 8859-2 (with slightly different\n   *     ordering).\n   *\n   *   FT_WinFNT_ID_CP1251 ::\n   *     A superset of Russian ISO 8859-5 (with different ordering).\n   *\n   *   FT_WinFNT_ID_CP1252 ::\n   *     ANSI encoding.  A superset of ISO 8859-1.\n   *\n   *   FT_WinFNT_ID_CP1253 ::\n   *     A superset of Greek ISO 8859-7 (with minor modifications).\n   *\n   *   FT_WinFNT_ID_CP1254 ::\n   *     A superset of Turkish ISO 8859-9.\n   *\n   *   FT_WinFNT_ID_CP1255 ::\n   *     A superset of Hebrew ISO 8859-8 (with some modifications).\n   *\n   *   FT_WinFNT_ID_CP1256 ::\n   *     A superset of Arabic ISO 8859-6 (with different ordering).\n   *\n   *   FT_WinFNT_ID_CP1257 ::\n   *     A superset of Baltic ISO 8859-13 (with some deviations).\n   *\n   *   FT_WinFNT_ID_CP1258 ::\n   *     For Vietnamese.  This encoding doesn't cover all necessary\n   *     characters.\n   *\n   *   FT_WinFNT_ID_CP1361 ::\n   *     Korean (Johab).\n   */\n\n#define FT_WinFNT_ID_CP1252    0\n#define FT_WinFNT_ID_DEFAULT   1\n#define FT_WinFNT_ID_SYMBOL    2\n#define FT_WinFNT_ID_MAC      77\n#define FT_WinFNT_ID_CP932   128\n#define FT_WinFNT_ID_CP949   129\n#define FT_WinFNT_ID_CP1361  130\n#define FT_WinFNT_ID_CP936   134\n#define FT_WinFNT_ID_CP950   136\n#define FT_WinFNT_ID_CP1253  161\n#define FT_WinFNT_ID_CP1254  162\n#define FT_WinFNT_ID_CP1258  163\n#define FT_WinFNT_ID_CP1255  177\n#define FT_WinFNT_ID_CP1256  178\n#define FT_WinFNT_ID_CP1257  186\n#define FT_WinFNT_ID_CP1251  204\n#define FT_WinFNT_ID_CP874   222\n#define FT_WinFNT_ID_CP1250  238\n#define FT_WinFNT_ID_OEM     255\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_WinFNT_HeaderRec                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Windows FNT Header info.                                           */\n  /*                                                                       */\n  typedef struct  FT_WinFNT_HeaderRec_\n  {\n    FT_UShort  version;\n    FT_ULong   file_size;\n    FT_Byte    copyright[60];\n    FT_UShort  file_type;\n    FT_UShort  nominal_point_size;\n    FT_UShort  vertical_resolution;\n    FT_UShort  horizontal_resolution;\n    FT_UShort  ascent;\n    FT_UShort  internal_leading;\n    FT_UShort  external_leading;\n    FT_Byte    italic;\n    FT_Byte    underline;\n    FT_Byte    strike_out;\n    FT_UShort  weight;\n    FT_Byte    charset;\n    FT_UShort  pixel_width;\n    FT_UShort  pixel_height;\n    FT_Byte    pitch_and_family;\n    FT_UShort  avg_width;\n    FT_UShort  max_width;\n    FT_Byte    first_char;\n    FT_Byte    last_char;\n    FT_Byte    default_char;\n    FT_Byte    break_char;\n    FT_UShort  bytes_per_row;\n    FT_ULong   device_offset;\n    FT_ULong   face_name_offset;\n    FT_ULong   bits_pointer;\n    FT_ULong   bits_offset;\n    FT_Byte    reserved;\n    FT_ULong   flags;\n    FT_UShort  A_space;\n    FT_UShort  B_space;\n    FT_UShort  C_space;\n    FT_UShort  color_table_offset;\n    FT_ULong   reserved1[4];\n\n  } FT_WinFNT_HeaderRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_WinFNT_Header                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an @FT_WinFNT_HeaderRec structure.                     */\n  /*                                                                       */\n  typedef struct FT_WinFNT_HeaderRec_*  FT_WinFNT_Header;\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Get_WinFNT_Header\n   *\n   * @description:\n   *    Retrieve a Windows FNT font info header.\n   *\n   * @input:\n   *    face    :: A handle to the input face.\n   *\n   * @output:\n   *    aheader :: The WinFNT header.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function only works with Windows FNT faces, returning an error\n   *   otherwise.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_WinFNT_Header( FT_Face               face,\n                        FT_WinFNT_HeaderRec  *aheader );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTWINFNT_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ftxf86.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftxf86.h                                                               */\n/*                                                                         */\n/*    Support functions for X11.                                           */\n/*                                                                         */\n/*  Copyright 2002-2004, 2006, 2007, 2013 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTXF86_H__\n#define __FTXF86_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*   font_formats                                                        */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*   Font Formats                                                        */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*   Getting the font format.                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   The single function in this section can be used to get the font     */\n  /*   format.  Note that this information is not needed normally;         */\n  /*   however, there are special cases (like in PDF devices) where it is  */\n  /*   important to differentiate, in spite of FreeType's uniform API.     */\n  /*                                                                       */\n  /*   This function is in the X11/xf86 namespace for historical reasons   */\n  /*   and in no way depends on that windowing system.                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*   FT_Get_X11_Font_Format                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   Return a string describing the format of a given face, using values */\n  /*   that can be used as an X11 FONT_PROPERTY.  Possible values are      */\n  /*   `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */\n  /*   `PFR', and `Windows~FNT'.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*   face ::                                                             */\n  /*     Input face handle.                                                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*   Font format string.  NULL in case of error.                         */\n  /*                                                                       */\n  FT_EXPORT( const char* )\n  FT_Get_X11_Font_Format( FT_Face  face );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTXF86_H__ */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/autohint.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  autohint.h                                                             */\n/*                                                                         */\n/*    High-level `autohint' module-specific interface (specification).     */\n/*                                                                         */\n/*  Copyright 1996-2002, 2007, 2009, 2012 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The auto-hinter is used to load and automatically hint glyphs if a    */\n  /* format-specific hinter isn't available.                               */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __AUTOHINT_H__\n#define __AUTOHINT_H__\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* A small technical note regarding automatic hinting in order to        */\n  /* clarify this module interface.                                        */\n  /*                                                                       */\n  /* An automatic hinter might compute two kinds of data for a given face: */\n  /*                                                                       */\n  /* - global hints: Usually some metrics that describe global properties  */\n  /*                 of the face.  It is computed by scanning more or less */\n  /*                 aggressively the glyphs in the face, and thus can be  */\n  /*                 very slow to compute (even if the size of global      */\n  /*                 hints is really small).                               */\n  /*                                                                       */\n  /* - glyph hints:  These describe some important features of the glyph   */\n  /*                 outline, as well as how to align them.  They are      */\n  /*                 generally much faster to compute than global hints.   */\n  /*                                                                       */\n  /* The current FreeType auto-hinter does a pretty good job while         */\n  /* performing fast computations for both global and glyph hints.         */\n  /* However, we might be interested in introducing more complex and       */\n  /* powerful algorithms in the future, like the one described in the John */\n  /* D. Hobby paper, which unfortunately requires a lot more horsepower.   */\n  /*                                                                       */\n  /* Because a sufficiently sophisticated font management system would     */\n  /* typically implement an LRU cache of opened face objects to reduce     */\n  /* memory usage, it is a good idea to be able to avoid recomputing       */\n  /* global hints every time the same face is re-opened.                   */\n  /*                                                                       */\n  /* We thus provide the ability to cache global hints outside of the face */\n  /* object, in order to speed up font re-opening time.  Of course, this   */\n  /* feature is purely optional, so most client programs won't even notice */\n  /* it.                                                                   */\n  /*                                                                       */\n  /* I initially thought that it would be a good idea to cache the glyph   */\n  /* hints too.  However, my general idea now is that if you really need   */\n  /* to cache these too, you are simply in need of a new font format,      */\n  /* where all this information could be stored within the font file and   */\n  /* decoded on the fly.                                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n\nFT_BEGIN_HEADER\n\n\n  typedef struct FT_AutoHinterRec_  *FT_AutoHinter;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_AutoHinter_GlobalGetFunc                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the global hints computed for a given face object.  The   */\n  /*    resulting data is dissociated from the face and will survive a     */\n  /*    call to FT_Done_Face().  It must be discarded through the API      */\n  /*    FT_AutoHinter_GlobalDoneFunc().                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    hinter       :: A handle to the source auto-hinter.                */\n  /*                                                                       */\n  /*    face         :: A handle to the source face object.                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    global_hints :: A typeless pointer to the global hints.            */\n  /*                                                                       */\n  /*    global_len   :: The size in bytes of the global hints.             */\n  /*                                                                       */\n  typedef void\n  (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter  hinter,\n                                  FT_Face        face,\n                                  void**         global_hints,\n                                  long*          global_len );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_AutoHinter_GlobalDoneFunc                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Discard the global hints retrieved through                         */\n  /*    FT_AutoHinter_GlobalGetFunc().  This is the only way these hints   */\n  /*    are freed from memory.                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    hinter :: A handle to the auto-hinter module.                      */\n  /*                                                                       */\n  /*    global :: A pointer to retrieved global hints to discard.          */\n  /*                                                                       */\n  typedef void\n  (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter  hinter,\n                                   void*          global );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_AutoHinter_GlobalResetFunc                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used to recompute the global metrics in a given   */\n  /*    font.  This is useful when global font data changes (e.g. Multiple */\n  /*    Masters fonts where blend coordinates change).                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    hinter :: A handle to the source auto-hinter.                      */\n  /*                                                                       */\n  /*    face   :: A handle to the face.                                    */\n  /*                                                                       */\n  typedef void\n  (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter  hinter,\n                                    FT_Face        face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_AutoHinter_GlyphLoadFunc                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used to load, scale, and automatically hint a     */\n  /*    glyph from a given face.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: A handle to the face.                               */\n  /*                                                                       */\n  /*    glyph_index :: The glyph index.                                    */\n  /*                                                                       */\n  /*    load_flags  :: The load flags.                                     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function is capable of loading composite glyphs by hinting    */\n  /*    each sub-glyph independently (which improves quality).             */\n  /*                                                                       */\n  /*    It will call the font driver with @FT_Load_Glyph, with             */\n  /*    @FT_LOAD_NO_SCALE set.                                             */\n  /*                                                                       */\n  typedef FT_Error\n  (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter  hinter,\n                                  FT_GlyphSlot   slot,\n                                  FT_Size        size,\n                                  FT_UInt        glyph_index,\n                                  FT_Int32       load_flags );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_AutoHinter_InterfaceRec                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The auto-hinter module's interface.                                */\n  /*                                                                       */\n  typedef struct  FT_AutoHinter_InterfaceRec_\n  {\n    FT_AutoHinter_GlobalResetFunc  reset_face;\n    FT_AutoHinter_GlobalGetFunc    get_global_hints;\n    FT_AutoHinter_GlobalDoneFunc   done_global_hints;\n    FT_AutoHinter_GlyphLoadFunc    load_glyph;\n\n  } FT_AutoHinter_InterfaceRec, *FT_AutoHinter_Interface;\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_AUTOHINTER_INTERFACE(       \\\n          class_,                             \\\n          reset_face_,                        \\\n          get_global_hints_,                  \\\n          done_global_hints_,                 \\\n          load_glyph_ )                       \\\n  FT_CALLBACK_TABLE_DEF                       \\\n  const FT_AutoHinter_InterfaceRec  class_ =  \\\n  {                                           \\\n    reset_face_,                              \\\n    get_global_hints_,                        \\\n    done_global_hints_,                       \\\n    load_glyph_                               \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_AUTOHINTER_INTERFACE(                            \\\n          class_,                                                  \\\n          reset_face_,                                             \\\n          get_global_hints_,                                       \\\n          done_global_hints_,                                      \\\n          load_glyph_ )                                            \\\n  void                                                             \\\n  FT_Init_Class_ ## class_( FT_Library                   library,  \\\n                            FT_AutoHinter_InterfaceRec*  clazz )   \\\n  {                                                                \\\n    FT_UNUSED( library );                                          \\\n                                                                   \\\n    clazz->reset_face        = reset_face_;                        \\\n    clazz->get_global_hints  = get_global_hints_;                  \\\n    clazz->done_global_hints = done_global_hints_;                 \\\n    clazz->load_glyph        = load_glyph_;                        \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\nFT_END_HEADER\n\n#endif /* __AUTOHINT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftcalc.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcalc.h                                                               */\n/*                                                                         */\n/*    Arithmetic computations (specification).                             */\n/*                                                                         */\n/*  Copyright 1996-2006, 2008, 2009, 2012-2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTCALC_H__\n#define __FTCALC_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FT_MulDiv() and FT_MulFix() are declared in freetype.h.               */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER\n  /* Provide assembler fragments for performance-critical functions. */\n  /* These must be defined `static __inline__' with GCC.             */\n\n#if defined( __CC_ARM ) || defined( __ARMCC__ )  /* RVCT */\n\n#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm\n\n  /* documentation is in freetype.h */\n\n  static __inline FT_Int32\n  FT_MulFix_arm( FT_Int32  a,\n                 FT_Int32  b )\n  {\n    register FT_Int32  t, t2;\n\n\n    __asm\n    {\n      smull t2, t,  b,  a           /* (lo=t2,hi=t) = a*b */\n      mov   a,  t,  asr #31         /* a   = (hi >> 31) */\n      add   a,  a,  #0x8000         /* a  += 0x8000 */\n      adds  t2, t2, a               /* t2 += a */\n      adc   t,  t,  #0              /* t  += carry */\n      mov   a,  t2, lsr #16         /* a   = t2 >> 16 */\n      orr   a,  a,  t,  lsl #16     /* a  |= t << 16 */\n    }\n    return a;\n  }\n\n#endif /* __CC_ARM || __ARMCC__ */\n\n\n#ifdef __GNUC__\n\n#if defined( __arm__ )                                 && \\\n    ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \\\n    !( defined( __CC_ARM ) || defined( __ARMCC__ ) )\n\n#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm\n\n  /* documentation is in freetype.h */\n\n  static __inline__ FT_Int32\n  FT_MulFix_arm( FT_Int32  a,\n                 FT_Int32  b )\n  {\n    register FT_Int32  t, t2;\n\n\n    __asm__ __volatile__ (\n      \"smull  %1, %2, %4, %3\\n\\t\"       /* (lo=%1,hi=%2) = a*b */\n      \"mov    %0, %2, asr #31\\n\\t\"      /* %0  = (hi >> 31) */\n#if defined( __clang__ ) && defined( __thumb2__ )\n      \"add.w  %0, %0, #0x8000\\n\\t\"      /* %0 += 0x8000 */\n#else\n      \"add    %0, %0, #0x8000\\n\\t\"      /* %0 += 0x8000 */\n#endif\n      \"adds   %1, %1, %0\\n\\t\"           /* %1 += %0 */\n      \"adc    %2, %2, #0\\n\\t\"           /* %2 += carry */\n      \"mov    %0, %1, lsr #16\\n\\t\"      /* %0  = %1 >> 16 */\n      \"orr    %0, %0, %2, lsl #16\\n\\t\"  /* %0 |= %2 << 16 */\n      : \"=r\"(a), \"=&r\"(t2), \"=&r\"(t)\n      : \"r\"(a), \"r\"(b)\n      : \"cc\" );\n    return a;\n  }\n\n#endif /* __arm__                      && */\n       /* ( __thumb2__ || !__thumb__ ) && */\n       /* !( __CC_ARM || __ARMCC__ )      */\n\n\n#if defined( __i386__ )\n\n#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386\n\n  /* documentation is in freetype.h */\n\n  static __inline__ FT_Int32\n  FT_MulFix_i386( FT_Int32  a,\n                  FT_Int32  b )\n  {\n    register FT_Int32  result;\n\n\n    __asm__ __volatile__ (\n      \"imul  %%edx\\n\"\n      \"movl  %%edx, %%ecx\\n\"\n      \"sarl  $31, %%ecx\\n\"\n      \"addl  $0x8000, %%ecx\\n\"\n      \"addl  %%ecx, %%eax\\n\"\n      \"adcl  $0, %%edx\\n\"\n      \"shrl  $16, %%eax\\n\"\n      \"shll  $16, %%edx\\n\"\n      \"addl  %%edx, %%eax\\n\"\n      : \"=a\"(result), \"=d\"(b)\n      : \"a\"(a), \"d\"(b)\n      : \"%ecx\", \"cc\" );\n    return result;\n  }\n\n#endif /* i386 */\n\n#endif /* __GNUC__ */\n\n\n#ifdef _MSC_VER /* Visual C++ */\n\n#ifdef _M_IX86\n\n#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386\n\n  /* documentation is in freetype.h */\n\n  static __inline FT_Int32\n  FT_MulFix_i386( FT_Int32  a,\n                  FT_Int32  b )\n  {\n    register FT_Int32  result;\n\n    __asm\n    {\n      mov eax, a\n      mov edx, b\n      imul edx\n      mov ecx, edx\n      sar ecx, 31\n      add ecx, 8000h\n      add eax, ecx\n      adc edx, 0\n      shr eax, 16\n      shl edx, 16\n      add eax, edx\n      mov result, eax\n    }\n    return result;\n  }\n\n#endif /* _M_IX86 */\n\n#endif /* _MSC_VER */\n\n\n#if defined( __GNUC__ ) && defined( __x86_64__ )\n\n#define FT_MULFIX_ASSEMBLER  FT_MulFix_x86_64\n\n  static __inline__ FT_Int32\n  FT_MulFix_x86_64( FT_Int32  a,\n                    FT_Int32  b )\n  {\n    /* Temporarily disable the warning that C90 doesn't support */\n    /* `long long'.                                             */\n#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wlong-long\"\n#endif\n\n#if 1\n    /* Technically not an assembly fragment, but GCC does a really good */\n    /* job at inlining it and generating good machine code for it.      */\n    long long  ret, tmp;\n\n\n    ret  = (long long)a * b;\n    tmp  = ret >> 63;\n    ret += 0x8000 + tmp;\n\n    return (FT_Int32)( ret >> 16 );\n#else\n\n    /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine  */\n    /* code from the lines below.  The main issue is that `wide_a' is not  */\n    /* properly initialized by sign-extending `a'.  Instead, the generated */\n    /* machine code assumes that the register that contains `a' on input   */\n    /* can be used directly as a 64-bit value, which is wrong most of the  */\n    /* time.                                                               */\n    long long  wide_a = (long long)a;\n    long long  wide_b = (long long)b;\n    long long  result;\n\n\n    __asm__ __volatile__ (\n      \"imul %2, %1\\n\"\n      \"mov %1, %0\\n\"\n      \"sar $63, %0\\n\"\n      \"lea 0x8000(%1, %0), %0\\n\"\n      \"sar $16, %0\\n\"\n      : \"=&r\"(result), \"=&r\"(wide_a)\n      : \"r\"(wide_b)\n      : \"cc\" );\n\n    return (FT_Int32)result;\n#endif\n\n#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )\n#pragma GCC diagnostic pop\n#endif\n  }\n\n#endif /* __GNUC__ && __x86_64__ */\n\n#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */\n\n\n#ifdef FT_CONFIG_OPTION_INLINE_MULFIX\n#ifdef FT_MULFIX_ASSEMBLER\n#define FT_MulFix( a, b )  FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) )\n#endif\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_MulDiv_No_Round                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to perform the computation `(a*b)/c'   */\n  /*    (without rounding) with maximum accuracy (it uses a 64-bit         */\n  /*    intermediate integer whenever necessary).                          */\n  /*                                                                       */\n  /*    This function isn't necessarily as fast as some processor specific */\n  /*    operations, but is at least completely portable.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The first multiplier.                                         */\n  /*    b :: The second multiplier.                                        */\n  /*    c :: The divisor.                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a*b)/c'.  This function never traps when trying to */\n  /*    divide by zero; it simply returns `MaxInt' or `MinInt' depending   */\n  /*    on the signs of `a' and `b'.                                       */\n  /*                                                                       */\n  FT_BASE( FT_Long )\n  FT_MulDiv_No_Round( FT_Long  a,\n                      FT_Long  b,\n                      FT_Long  c );\n\n\n  /*\n   *  A variant of FT_Matrix_Multiply which scales its result afterwards.\n   *  The idea is that both `a' and `b' are scaled by factors of 10 so that\n   *  the values are as precise as possible to get a correct result during\n   *  the 64bit multiplication.  Let `sa' and `sb' be the scaling factors of\n   *  `a' and `b', respectively, then the scaling factor of the result is\n   *  `sa*sb'.\n   */\n  FT_BASE( void )\n  FT_Matrix_Multiply_Scaled( const FT_Matrix*  a,\n                             FT_Matrix        *b,\n                             FT_Long           scaling );\n\n\n  /*\n   *  A variant of FT_Vector_Transform.  See comments for\n   *  FT_Matrix_Multiply_Scaled.\n   */\n  FT_BASE( void )\n  FT_Vector_Transform_Scaled( FT_Vector*        vector,\n                              const FT_Matrix*  matrix,\n                              FT_Long           scaling );\n\n\n  /*\n   *  Return -1, 0, or +1, depending on the orientation of a given corner.\n   *  We use the Cartesian coordinate system, with positive vertical values\n   *  going upwards.  The function returns +1 if the corner turns to the\n   *  left, -1 to the right, and 0 for undecidable cases.\n   */\n  FT_BASE( FT_Int )\n  ft_corner_orientation( FT_Pos  in_x,\n                         FT_Pos  in_y,\n                         FT_Pos  out_x,\n                         FT_Pos  out_y );\n\n\n  /*\n   *  Return TRUE if a corner is flat or nearly flat.  This is equivalent to\n   *  saying that the corner point is close to its neighbors, or inside an\n   *  ellipse defined by the neighbor focal points to be more precise.\n   */\n  FT_BASE( FT_Int )\n  ft_corner_is_flat( FT_Pos  in_x,\n                     FT_Pos  in_y,\n                     FT_Pos  out_x,\n                     FT_Pos  out_y );\n\n\n  /*\n   *  Return the most significant bit index.\n   */\n\n#ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER\n#if defined( __GNUC__ )                                          && \\\n    ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) )\n\n#if FT_SIZEOF_INT == 4\n\n#define FT_MSB( x )  ( 31 - __builtin_clz( x ) )\n\n#elif FT_SIZEOF_LONG == 4\n\n#define FT_MSB( x )  ( 31 - __builtin_clzl( x ) )\n\n#endif\n\n#endif /* __GNUC__ */\n#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */\n\n#ifndef FT_MSB\n\n  FT_BASE( FT_Int )\n  FT_MSB( FT_UInt32  z );\n\n#endif\n\n\n  /*\n   *  Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses\n   *  two fixed-point arguments instead.\n   */\n  FT_BASE( FT_Fixed )\n  FT_Hypot( FT_Fixed  x,\n            FT_Fixed  y );\n\n\n#if 0\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_SqrtFixed                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Computes the square root of a 16.16 fixed-point value.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    x :: The value to compute the root for.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `sqrt(x)'.                                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function is not very fast.                                    */\n  /*                                                                       */\n  FT_BASE( FT_Int32 )\n  FT_SqrtFixed( FT_Int32  x );\n\n#endif /* 0 */\n\n\n#define INT_TO_F26DOT6( x )    ( (FT_Long)(x) << 6  )\n#define INT_TO_F2DOT14( x )    ( (FT_Long)(x) << 14 )\n#define INT_TO_FIXED( x )      ( (FT_Long)(x) << 16 )\n#define F2DOT14_TO_FIXED( x )  ( (FT_Long)(x) << 2  )\n#define FLOAT_TO_FIXED( x )    ( (FT_Long)( x * 65536.0 ) )\n#define FIXED_TO_INT( x )      ( FT_RoundFix( x ) >> 16 )\n\n#define ROUND_F26DOT6( x )     ( x >= 0 ? (    ( (x) + 32 ) & -64 )     \\\n                                        : ( -( ( 32 - (x) ) & -64 ) ) )\n\n\nFT_END_HEADER\n\n#endif /* __FTCALC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftdebug.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftdebug.h                                                              */\n/*                                                                         */\n/*    Debugging and logging component (specification).                     */\n/*                                                                         */\n/*  Copyright 1996-2002, 2004, 2006-2009, 2013 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/*                                                                         */\n/*  IMPORTANT: A description of FreeType's debugging support can be        */\n/*             found in `docs/DEBUG.TXT'.  Read it if you need to use or   */\n/*             understand this code.                                       */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTDEBUG_H__\n#define __FTDEBUG_H__\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_FREETYPE_H\n\n\nFT_BEGIN_HEADER\n\n\n  /* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */\n  /* is already defined; this simplifies the following #ifdefs            */\n  /*                                                                      */\n#ifdef FT_DEBUG_LEVEL_TRACE\n#undef  FT_DEBUG_LEVEL_ERROR\n#define FT_DEBUG_LEVEL_ERROR\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define the trace enums as well as the trace levels array when they    */\n  /* are needed.                                                           */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n#define FT_TRACE_DEF( x )  trace_ ## x ,\n\n  /* defining the enumeration */\n  typedef enum  FT_Trace_\n  {\n#include FT_INTERNAL_TRACE_H\n    trace_count\n\n  } FT_Trace;\n\n\n  /* defining the array of trace levels, provided by `src/base/ftdebug.c' */\n  extern int  ft_trace_levels[trace_count];\n\n#undef FT_TRACE_DEF\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define the FT_TRACE macro                                             */\n  /*                                                                       */\n  /* IMPORTANT!                                                            */\n  /*                                                                       */\n  /* Each component must define the macro FT_COMPONENT to a valid FT_Trace */\n  /* value before using any TRACE macro.                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n#define FT_TRACE( level, varformat )                      \\\n          do                                              \\\n          {                                               \\\n            if ( ft_trace_levels[FT_COMPONENT] >= level ) \\\n              FT_Message varformat;                       \\\n          } while ( 0 )\n\n#else /* !FT_DEBUG_LEVEL_TRACE */\n\n#define FT_TRACE( level, varformat )  do { } while ( 0 )      /* nothing */\n\n#endif /* !FT_DEBUG_LEVEL_TRACE */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Trace_Get_Count                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the number of available trace components.                   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The number of trace components.  0 if FreeType 2 is not built with */\n  /*    FT_DEBUG_LEVEL_TRACE definition.                                   */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function may be useful if you want to access elements of      */\n  /*    the internal `ft_trace_levels' array by an index.                  */\n  /*                                                                       */\n  FT_BASE( FT_Int )\n  FT_Trace_Get_Count( void );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Trace_Get_Name                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the name of a trace component.                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    The index of the trace component.                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The name of the trace component.  This is a statically allocated   */\n  /*    C string, so do not free it after use.  NULL if FreeType 2 is not  */\n  /*    built with FT_DEBUG_LEVEL_TRACE definition.                        */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Use @FT_Trace_Get_Count to get the number of available trace       */\n  /*    components.                                                        */\n  /*                                                                       */\n  /*    This function may be useful if you want to control FreeType 2's    */\n  /*    debug level in your application.                                   */\n  /*                                                                       */\n  FT_BASE( const char * )\n  FT_Trace_Get_Name( FT_Int  idx );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* You need two opening and closing parentheses!                         */\n  /*                                                                       */\n  /* Example: FT_TRACE0(( \"Value is %i\", foo ))                            */\n  /*                                                                       */\n  /* Output of the FT_TRACEX macros is sent to stderr.                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n#define FT_TRACE0( varformat )  FT_TRACE( 0, varformat )\n#define FT_TRACE1( varformat )  FT_TRACE( 1, varformat )\n#define FT_TRACE2( varformat )  FT_TRACE( 2, varformat )\n#define FT_TRACE3( varformat )  FT_TRACE( 3, varformat )\n#define FT_TRACE4( varformat )  FT_TRACE( 4, varformat )\n#define FT_TRACE5( varformat )  FT_TRACE( 5, varformat )\n#define FT_TRACE6( varformat )  FT_TRACE( 6, varformat )\n#define FT_TRACE7( varformat )  FT_TRACE( 7, varformat )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define the FT_ERROR macro.                                            */\n  /*                                                                       */\n  /* Output of this macro is sent to stderr.                               */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifdef FT_DEBUG_LEVEL_ERROR\n\n#define FT_ERROR( varformat )  FT_Message  varformat\n\n#else  /* !FT_DEBUG_LEVEL_ERROR */\n\n#define FT_ERROR( varformat )  do { } while ( 0 )      /* nothing */\n\n#endif /* !FT_DEBUG_LEVEL_ERROR */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define the FT_ASSERT and FT_THROW macros.  The call to `FT_Throw'     */\n  /* makes it possible to easily set a breakpoint at this function.        */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifdef FT_DEBUG_LEVEL_ERROR\n\n#define FT_ASSERT( condition )                                      \\\n          do                                                        \\\n          {                                                         \\\n            if ( !( condition ) )                                   \\\n              FT_Panic( \"assertion failed on line %d of file %s\\n\", \\\n                        __LINE__, __FILE__ );                       \\\n          } while ( 0 )\n\n#define FT_THROW( e )                                   \\\n          ( FT_Throw( FT_ERR_CAT( FT_ERR_PREFIX, e ),   \\\n                      __LINE__,                         \\\n                      __FILE__ )                      | \\\n            FT_ERR_CAT( FT_ERR_PREFIX, e )            )\n\n#else /* !FT_DEBUG_LEVEL_ERROR */\n\n#define FT_ASSERT( condition )  do { } while ( 0 )\n\n#define FT_THROW( e )  FT_ERR_CAT( FT_ERR_PREFIX, e )\n\n#endif /* !FT_DEBUG_LEVEL_ERROR */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define `FT_Message' and `FT_Panic' when needed.                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifdef FT_DEBUG_LEVEL_ERROR\n\n#include \"stdio.h\"  /* for vfprintf() */\n\n  /* print a message */\n  FT_BASE( void )\n  FT_Message( const char*  fmt,\n              ... );\n\n  /* print a message and exit */\n  FT_BASE( void )\n  FT_Panic( const char*  fmt,\n            ... );\n\n  /* report file name and line number of an error */\n  FT_BASE( int )\n  FT_Throw( FT_Error     error,\n            int          line,\n            const char*  file );\n\n#endif /* FT_DEBUG_LEVEL_ERROR */\n\n\n  FT_BASE( void )\n  ft_debug_init( void );\n\nFT_END_HEADER\n\n#endif /* __FTDEBUG_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftdriver.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftdriver.h                                                             */\n/*                                                                         */\n/*    FreeType font driver interface (specification).                      */\n/*                                                                         */\n/*  Copyright 1996-2003, 2006, 2008, 2011-2013 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTDRIVER_H__\n#define __FTDRIVER_H__\n\n\n#include <ft2build.h>\n#include FT_MODULE_H\n\n\nFT_BEGIN_HEADER\n\n\n  typedef FT_Error\n  (*FT_Face_InitFunc)( FT_Stream      stream,\n                       FT_Face        face,\n                       FT_Int         typeface_index,\n                       FT_Int         num_params,\n                       FT_Parameter*  parameters );\n\n  typedef void\n  (*FT_Face_DoneFunc)( FT_Face  face );\n\n\n  typedef FT_Error\n  (*FT_Size_InitFunc)( FT_Size  size );\n\n  typedef void\n  (*FT_Size_DoneFunc)( FT_Size  size );\n\n\n  typedef FT_Error\n  (*FT_Slot_InitFunc)( FT_GlyphSlot  slot );\n\n  typedef void\n  (*FT_Slot_DoneFunc)( FT_GlyphSlot  slot );\n\n\n  typedef FT_Error\n  (*FT_Size_RequestFunc)( FT_Size          size,\n                          FT_Size_Request  req );\n\n  typedef FT_Error\n  (*FT_Size_SelectFunc)( FT_Size   size,\n                         FT_ULong  size_index );\n\n  typedef FT_Error\n  (*FT_Slot_LoadFunc)( FT_GlyphSlot  slot,\n                       FT_Size       size,\n                       FT_UInt       glyph_index,\n                       FT_Int32      load_flags );\n\n\n  typedef FT_UInt\n  (*FT_CharMap_CharIndexFunc)( FT_CharMap  charmap,\n                               FT_Long     charcode );\n\n  typedef FT_Long\n  (*FT_CharMap_CharNextFunc)( FT_CharMap  charmap,\n                              FT_Long     charcode );\n\n\n  typedef FT_Error\n  (*FT_Face_GetKerningFunc)( FT_Face     face,\n                             FT_UInt     left_glyph,\n                             FT_UInt     right_glyph,\n                             FT_Vector*  kerning );\n\n\n  typedef FT_Error\n  (*FT_Face_AttachFunc)( FT_Face    face,\n                         FT_Stream  stream );\n\n\n  typedef FT_Error\n  (*FT_Face_GetAdvancesFunc)( FT_Face    face,\n                              FT_UInt    first,\n                              FT_UInt    count,\n                              FT_Int32   flags,\n                              FT_Fixed*  advances );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Driver_ClassRec                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The font driver class.  This structure mostly contains pointers to */\n  /*    driver methods.                                                    */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root             :: The parent module.                             */\n  /*                                                                       */\n  /*    face_object_size :: The size of a face object in bytes.            */\n  /*                                                                       */\n  /*    size_object_size :: The size of a size object in bytes.            */\n  /*                                                                       */\n  /*    slot_object_size :: The size of a glyph object in bytes.           */\n  /*                                                                       */\n  /*    init_face        :: The format-specific face constructor.          */\n  /*                                                                       */\n  /*    done_face        :: The format-specific face destructor.           */\n  /*                                                                       */\n  /*    init_size        :: The format-specific size constructor.          */\n  /*                                                                       */\n  /*    done_size        :: The format-specific size destructor.           */\n  /*                                                                       */\n  /*    init_slot        :: The format-specific slot constructor.          */\n  /*                                                                       */\n  /*    done_slot        :: The format-specific slot destructor.           */\n  /*                                                                       */\n  /*                                                                       */\n  /*    load_glyph       :: A function handle to load a glyph to a slot.   */\n  /*                        This field is mandatory!                       */\n  /*                                                                       */\n  /*    get_kerning      :: A function handle to return the unscaled       */\n  /*                        kerning for a given pair of glyphs.  Can be    */\n  /*                        set to 0 if the format doesn't support         */\n  /*                        kerning.                                       */\n  /*                                                                       */\n  /*    attach_file      :: This function handle is used to read           */\n  /*                        additional data for a face from another        */\n  /*                        file/stream.  For example, this can be used to */\n  /*                        add data from AFM or PFM files on a Type 1     */\n  /*                        face, or a CIDMap on a CID-keyed face.         */\n  /*                                                                       */\n  /*    get_advances     :: A function handle used to return advance       */\n  /*                        widths of `count' glyphs (in font units),      */\n  /*                        starting at `first'.  The `vertical' flag must */\n  /*                        be set to get vertical advance heights.  The   */\n  /*                        `advances' buffer is caller-allocated.         */\n  /*                        The idea of this function is to be able to     */\n  /*                        perform device-independent text layout without */\n  /*                        loading a single glyph image.                  */\n  /*                                                                       */\n  /*    request_size     :: A handle to a function used to request the new */\n  /*                        character size.  Can be set to 0 if the        */\n  /*                        scaling done in the base layer suffices.       */\n  /*                                                                       */\n  /*    select_size      :: A handle to a function used to select a new    */\n  /*                        fixed size.  It is used only if                */\n  /*                        @FT_FACE_FLAG_FIXED_SIZES is set.  Can be set  */\n  /*                        to 0 if the scaling done in the base layer     */\n  /*                        suffices.                                      */\n  /* <Note>                                                                */\n  /*    Most function pointers, with the exception of `load_glyph', can be */\n  /*    set to 0 to indicate a default behaviour.                          */\n  /*                                                                       */\n  typedef struct  FT_Driver_ClassRec_\n  {\n    FT_Module_Class          root;\n\n    FT_Long                  face_object_size;\n    FT_Long                  size_object_size;\n    FT_Long                  slot_object_size;\n\n    FT_Face_InitFunc         init_face;\n    FT_Face_DoneFunc         done_face;\n\n    FT_Size_InitFunc         init_size;\n    FT_Size_DoneFunc         done_size;\n\n    FT_Slot_InitFunc         init_slot;\n    FT_Slot_DoneFunc         done_slot;\n\n    FT_Slot_LoadFunc         load_glyph;\n\n    FT_Face_GetKerningFunc   get_kerning;\n    FT_Face_AttachFunc       attach_file;\n    FT_Face_GetAdvancesFunc  get_advances;\n\n    /* since version 2.2 */\n    FT_Size_RequestFunc      request_size;\n    FT_Size_SelectFunc       select_size;\n\n  } FT_Driver_ClassRec, *FT_Driver_Class;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DECLARE_DRIVER                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to create a forward declaration of an FT_Driver_ClassRec      */\n  /*    struct instance.                                                   */\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DEFINE_DRIVER                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to initialize an instance of FT_Driver_ClassRec struct.       */\n  /*                                                                       */\n  /*    When FT_CONFIG_OPTION_PIC is defined a `create' function has to be */\n  /*    called with a pointer where the allocated structure is returned.   */\n  /*    And when it is no longer needed a `destroy' function needs to be   */\n  /*    called to release that allocation.                                 */\n  /*                                                                       */\n  /*    `fcinit.c' (ft_create_default_module_classes) already contains a   */\n  /*    mechanism to call these functions for the default modules          */\n  /*    described in `ftmodule.h'.                                         */\n  /*                                                                       */\n  /*    Notice that the created `create' and `destroy' functions call      */\n  /*    `pic_init' and `pic_free' to allow you to manually allocate and    */\n  /*    initialize any additional global data, like a module specific      */\n  /*    interface, and put them in the global pic container defined in     */\n  /*    `ftpic.h'.  If you don't need them just implement the functions as */\n  /*    empty to resolve the link error.  Also the `pic_init' and          */\n  /*    `pic_free' functions should be declared in `pic.h', to be referred */\n  /*    by driver definition calling `FT_DEFINE_DRIVER' in following.      */\n  /*                                                                       */\n  /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */\n  /*    allocated in the global scope (or the scope where the macro is     */\n  /*    used).                                                             */\n  /*                                                                       */\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DECLARE_DRIVER( class_ )  \\\n  FT_CALLBACK_TABLE                  \\\n  const FT_Driver_ClassRec  class_;\n\n#define FT_DEFINE_DRIVER(                    \\\n          class_,                            \\\n          flags_,                            \\\n          size_,                             \\\n          name_,                             \\\n          version_,                          \\\n          requires_,                         \\\n          interface_,                        \\\n          init_,                             \\\n          done_,                             \\\n          get_interface_,                    \\\n          face_object_size_,                 \\\n          size_object_size_,                 \\\n          slot_object_size_,                 \\\n          init_face_,                        \\\n          done_face_,                        \\\n          init_size_,                        \\\n          done_size_,                        \\\n          init_slot_,                        \\\n          done_slot_,                        \\\n          load_glyph_,                       \\\n          get_kerning_,                      \\\n          attach_file_,                      \\\n          get_advances_,                     \\\n          request_size_,                     \\\n          select_size_ )                     \\\n  FT_CALLBACK_TABLE_DEF                      \\\n  const FT_Driver_ClassRec  class_ =         \\\n  {                                          \\\n    FT_DEFINE_ROOT_MODULE( flags_,           \\\n                           size_,            \\\n                           name_,            \\\n                           version_,         \\\n                           requires_,        \\\n                           interface_,       \\\n                           init_,            \\\n                           done_,            \\\n                           get_interface_ )  \\\n                                             \\\n    face_object_size_,                       \\\n    size_object_size_,                       \\\n    slot_object_size_,                       \\\n                                             \\\n    init_face_,                              \\\n    done_face_,                              \\\n                                             \\\n    init_size_,                              \\\n    done_size_,                              \\\n                                             \\\n    init_slot_,                              \\\n    done_slot_,                              \\\n                                             \\\n    load_glyph_,                             \\\n                                             \\\n    get_kerning_,                            \\\n    attach_file_,                            \\\n    get_advances_,                           \\\n                                             \\\n    request_size_,                           \\\n    select_size_                             \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DECLARE_DRIVER( class_ )  FT_DECLARE_MODULE( class_ )\n\n#define FT_DEFINE_DRIVER(                                        \\\n          class_,                                                \\\n          flags_,                                                \\\n          size_,                                                 \\\n          name_,                                                 \\\n          version_,                                              \\\n          requires_,                                             \\\n          interface_,                                            \\\n          init_,                                                 \\\n          done_,                                                 \\\n          get_interface_,                                        \\\n          face_object_size_,                                     \\\n          size_object_size_,                                     \\\n          slot_object_size_,                                     \\\n          init_face_,                                            \\\n          done_face_,                                            \\\n          init_size_,                                            \\\n          done_size_,                                            \\\n          init_slot_,                                            \\\n          done_slot_,                                            \\\n          load_glyph_,                                           \\\n          get_kerning_,                                          \\\n          attach_file_,                                          \\\n          get_advances_,                                         \\\n          request_size_,                                         \\\n          select_size_ )                                         \\\n  void                                                           \\\n  FT_Destroy_Class_ ## class_( FT_Library        library,        \\\n                               FT_Module_Class*  clazz )         \\\n  {                                                              \\\n    FT_Memory        memory = library->memory;                   \\\n    FT_Driver_Class  dclazz = (FT_Driver_Class)clazz;            \\\n                                                                 \\\n                                                                 \\\n    class_ ## _pic_free( library );                              \\\n    if ( dclazz )                                                \\\n      FT_FREE( dclazz );                                         \\\n  }                                                              \\\n                                                                 \\\n                                                                 \\\n  FT_Error                                                       \\\n  FT_Create_Class_ ## class_( FT_Library         library,        \\\n                              FT_Module_Class**  output_class )  \\\n  {                                                              \\\n    FT_Driver_Class  clazz  = NULL;                              \\\n    FT_Error         error;                                      \\\n    FT_Memory        memory = library->memory;                   \\\n                                                                 \\\n                                                                 \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) )                  \\\n      return error;                                              \\\n                                                                 \\\n    error = class_ ## _pic_init( library );                      \\\n    if ( error )                                                 \\\n    {                                                            \\\n      FT_FREE( clazz );                                          \\\n      return error;                                              \\\n    }                                                            \\\n                                                                 \\\n    FT_DEFINE_ROOT_MODULE( flags_,                               \\\n                           size_,                                \\\n                           name_,                                \\\n                           version_,                             \\\n                           requires_,                            \\\n                           interface_,                           \\\n                           init_,                                \\\n                           done_,                                \\\n                           get_interface_ )                      \\\n                                                                 \\\n    clazz->face_object_size = face_object_size_;                 \\\n    clazz->size_object_size = size_object_size_;                 \\\n    clazz->slot_object_size = slot_object_size_;                 \\\n                                                                 \\\n    clazz->init_face        = init_face_;                        \\\n    clazz->done_face        = done_face_;                        \\\n                                                                 \\\n    clazz->init_size        = init_size_;                        \\\n    clazz->done_size        = done_size_;                        \\\n                                                                 \\\n    clazz->init_slot        = init_slot_;                        \\\n    clazz->done_slot        = done_slot_;                        \\\n                                                                 \\\n    clazz->load_glyph       = load_glyph_;                       \\\n                                                                 \\\n    clazz->get_kerning      = get_kerning_;                      \\\n    clazz->attach_file      = attach_file_;                      \\\n    clazz->get_advances     = get_advances_;                     \\\n                                                                 \\\n    clazz->request_size     = request_size_;                     \\\n    clazz->select_size      = select_size_;                      \\\n                                                                 \\\n    *output_class = (FT_Module_Class*)clazz;                     \\\n                                                                 \\\n    return FT_Err_Ok;                                            \\\n  }\n\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\nFT_END_HEADER\n\n#endif /* __FTDRIVER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftgloadr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgloadr.h                                                             */\n/*                                                                         */\n/*    The FreeType glyph loader (specification).                           */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2005, 2006 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg                       */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTGLOADR_H__\n#define __FTGLOADR_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_GlyphLoader                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The glyph loader is an internal object used to load several glyphs */\n  /*    together (for example, in the case of composites).                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The glyph loader implementation is not part of the high-level API, */\n  /*    hence the forward structure declaration.                           */\n  /*                                                                       */\n  typedef struct FT_GlyphLoaderRec_*  FT_GlyphLoader ;\n\n\n#if 0  /* moved to freetype.h in version 2.2 */\n#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1\n#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2\n#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4\n#define FT_SUBGLYPH_FLAG_SCALE                   8\n#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40\n#define FT_SUBGLYPH_FLAG_2X2                  0x80\n#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200\n#endif\n\n\n  typedef struct  FT_SubGlyphRec_\n  {\n    FT_Int     index;\n    FT_UShort  flags;\n    FT_Int     arg1;\n    FT_Int     arg2;\n    FT_Matrix  transform;\n\n  } FT_SubGlyphRec;\n\n\n  typedef struct  FT_GlyphLoadRec_\n  {\n    FT_Outline   outline;       /* outline                   */\n    FT_Vector*   extra_points;  /* extra points table        */\n    FT_Vector*   extra_points2; /* second extra points table */\n    FT_UInt      num_subglyphs; /* number of subglyphs       */\n    FT_SubGlyph  subglyphs;     /* subglyphs                 */\n\n  } FT_GlyphLoadRec, *FT_GlyphLoad;\n\n\n  typedef struct  FT_GlyphLoaderRec_\n  {\n    FT_Memory        memory;\n    FT_UInt          max_points;\n    FT_UInt          max_contours;\n    FT_UInt          max_subglyphs;\n    FT_Bool          use_extra;\n\n    FT_GlyphLoadRec  base;\n    FT_GlyphLoadRec  current;\n\n    void*            other;            /* for possible future extension? */\n\n  } FT_GlyphLoaderRec;\n\n\n  /* create new empty glyph loader */\n  FT_BASE( FT_Error )\n  FT_GlyphLoader_New( FT_Memory        memory,\n                      FT_GlyphLoader  *aloader );\n\n  /* add an extra points table to a glyph loader */\n  FT_BASE( FT_Error )\n  FT_GlyphLoader_CreateExtra( FT_GlyphLoader  loader );\n\n  /* destroy a glyph loader */\n  FT_BASE( void )\n  FT_GlyphLoader_Done( FT_GlyphLoader  loader );\n\n  /* reset a glyph loader (frees everything int it) */\n  FT_BASE( void )\n  FT_GlyphLoader_Reset( FT_GlyphLoader  loader );\n\n  /* rewind a glyph loader */\n  FT_BASE( void )\n  FT_GlyphLoader_Rewind( FT_GlyphLoader  loader );\n\n  /* check that there is enough space to add `n_points' and `n_contours' */\n  /* to the glyph loader                                                 */\n  FT_BASE( FT_Error )\n  FT_GlyphLoader_CheckPoints( FT_GlyphLoader  loader,\n                              FT_UInt         n_points,\n                              FT_UInt         n_contours );\n\n\n#define FT_GLYPHLOADER_CHECK_P( _loader, _count )           \\\n  ( (_count) == 0                                        || \\\n    ( (_loader)->base.outline.n_points    +                 \\\n      (_loader)->current.outline.n_points +                 \\\n      (unsigned long)(_count) ) <= (_loader)->max_points )\n\n#define FT_GLYPHLOADER_CHECK_C( _loader, _count )            \\\n  ( (_count) == 0                                         || \\\n    ( (_loader)->base.outline.n_contours    +                \\\n      (_loader)->current.outline.n_contours +                \\\n      (unsigned long)(_count)) <= (_loader)->max_contours )\n\n#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours )      \\\n  ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points )   &&                   \\\n      FT_GLYPHLOADER_CHECK_C( _loader, _contours ) )                    \\\n    ? 0                                                                 \\\n    : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) )\n\n\n  /* check that there is enough space to add `n_subs' sub-glyphs to */\n  /* a glyph loader                                                 */\n  FT_BASE( FT_Error )\n  FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader  loader,\n                                 FT_UInt         n_subs );\n\n  /* prepare a glyph loader, i.e. empty the current glyph */\n  FT_BASE( void )\n  FT_GlyphLoader_Prepare( FT_GlyphLoader  loader );\n\n  /* add the current glyph to the base glyph */\n  FT_BASE( void )\n  FT_GlyphLoader_Add( FT_GlyphLoader  loader );\n\n  /* copy points from one glyph loader to another */\n  FT_BASE( FT_Error )\n  FT_GlyphLoader_CopyPoints( FT_GlyphLoader  target,\n                             FT_GlyphLoader  source );\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTGLOADR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftmemory.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmemory.h                                                             */\n/*                                                                         */\n/*    The FreeType memory management macros (specification).               */\n/*                                                                         */\n/*  Copyright 1996-2002, 2004-2007, 2010, 2013 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg                       */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTMEMORY_H__\n#define __FTMEMORY_H__\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_SET_ERROR                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro is used to set an implicit `error' variable to a given  */\n  /*    expression's value (usually a function call), and convert it to a  */\n  /*    boolean which is set whenever the value is != 0.                   */\n  /*                                                                       */\n#undef  FT_SET_ERROR\n#define FT_SET_ERROR( expression ) \\\n          ( ( error = (expression) ) != 0 )\n\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                           M E M O R Y                           ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*\n   *  C++ refuses to handle statements like p = (void*)anything, with `p' a\n   *  typed pointer.  Since we don't have a `typeof' operator in standard\n   *  C++, we have to use a template to emulate it.\n   */\n\n#ifdef __cplusplus\n\n  extern \"C++\"\n  template <typename T> inline T*\n  cplusplus_typeof(        T*,\n                    void  *v )\n  {\n    return static_cast <T*> ( v );\n  }\n\n#define FT_ASSIGNP( p, val )  (p) = cplusplus_typeof( (p), (val) )\n\n#else\n\n#define FT_ASSIGNP( p, val )  (p) = (val)\n\n#endif\n\n\n\n#ifdef FT_DEBUG_MEMORY\n\n  FT_BASE( const char* )  _ft_debug_file;\n  FT_BASE( long )         _ft_debug_lineno;\n\n#define FT_DEBUG_INNER( exp )  ( _ft_debug_file   = __FILE__, \\\n                                 _ft_debug_lineno = __LINE__, \\\n                                 (exp) )\n\n#define FT_ASSIGNP_INNER( p, exp )  ( _ft_debug_file   = __FILE__, \\\n                                      _ft_debug_lineno = __LINE__, \\\n                                      FT_ASSIGNP( p, exp ) )\n\n#else /* !FT_DEBUG_MEMORY */\n\n#define FT_DEBUG_INNER( exp )       (exp)\n#define FT_ASSIGNP_INNER( p, exp )  FT_ASSIGNP( p, exp )\n\n#endif /* !FT_DEBUG_MEMORY */\n\n\n  /*\n   *  The allocation functions return a pointer, and the error code\n   *  is written to through the `p_error' parameter.  See below for\n   *  for documentation.\n   */\n\n  FT_BASE( FT_Pointer )\n  ft_mem_alloc( FT_Memory  memory,\n                FT_Long    size,\n                FT_Error  *p_error );\n\n  FT_BASE( FT_Pointer )\n  ft_mem_qalloc( FT_Memory  memory,\n                 FT_Long    size,\n                 FT_Error  *p_error );\n\n  FT_BASE( FT_Pointer )\n  ft_mem_realloc( FT_Memory  memory,\n                  FT_Long    item_size,\n                  FT_Long    cur_count,\n                  FT_Long    new_count,\n                  void*      block,\n                  FT_Error  *p_error );\n\n  FT_BASE( FT_Pointer )\n  ft_mem_qrealloc( FT_Memory  memory,\n                   FT_Long    item_size,\n                   FT_Long    cur_count,\n                   FT_Long    new_count,\n                   void*      block,\n                   FT_Error  *p_error );\n\n  FT_BASE( void )\n  ft_mem_free( FT_Memory    memory,\n               const void*  P );\n\n\n#define FT_MEM_ALLOC( ptr, size )                               \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory,          \\\n                                               (FT_Long)(size), \\\n                                               &error ) )\n\n#define FT_MEM_FREE( ptr )                \\\n          FT_BEGIN_STMNT                  \\\n            ft_mem_free( memory, (ptr) ); \\\n            (ptr) = NULL;                 \\\n          FT_END_STMNT\n\n#define FT_MEM_NEW( ptr )                        \\\n          FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) )\n\n#define FT_MEM_REALLOC( ptr, cursz, newsz )                        \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory,           \\\n                                                 1,                \\\n                                                 (FT_Long)(cursz), \\\n                                                 (FT_Long)(newsz), \\\n                                                 (ptr),            \\\n                                                 &error ) )\n\n#define FT_MEM_QALLOC( ptr, size )                               \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory,          \\\n                                                (FT_Long)(size), \\\n                                                &error ) )\n\n#define FT_MEM_QNEW( ptr )                        \\\n          FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) )\n\n#define FT_MEM_QREALLOC( ptr, cursz, newsz )                        \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory,           \\\n                                                  1,                \\\n                                                  (FT_Long)(cursz), \\\n                                                  (FT_Long)(newsz), \\\n                                                  (ptr),            \\\n                                                  &error ) )\n\n#define FT_MEM_ALLOC_MULT( ptr, count, item_size )                     \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory,               \\\n                                                 (FT_Long)(item_size), \\\n                                                 0,                    \\\n                                                 (FT_Long)(count),     \\\n                                                 NULL,                 \\\n                                                 &error ) )\n\n#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz )           \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory,            \\\n                                                 (FT_Long)(itmsz),  \\\n                                                 (FT_Long)(oldcnt), \\\n                                                 (FT_Long)(newcnt), \\\n                                                 (ptr),             \\\n                                                 &error ) )\n\n#define FT_MEM_QALLOC_MULT( ptr, count, item_size )                     \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory,               \\\n                                                  (FT_Long)(item_size), \\\n                                                  0,                    \\\n                                                  (FT_Long)(count),     \\\n                                                  NULL,                 \\\n                                                  &error ) )\n\n#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz)            \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory,            \\\n                                                  (FT_Long)(itmsz),  \\\n                                                  (FT_Long)(oldcnt), \\\n                                                  (FT_Long)(newcnt), \\\n                                                  (ptr),             \\\n                                                  &error ) )\n\n\n#define FT_MEM_SET_ERROR( cond )  ( (cond), error != 0 )\n\n\n#define FT_MEM_SET( dest, byte, count )     ft_memset( dest, byte, count )\n\n#define FT_MEM_COPY( dest, source, count )  ft_memcpy( dest, source, count )\n\n#define FT_MEM_MOVE( dest, source, count )  ft_memmove( dest, source, count )\n\n\n#define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )\n\n#define FT_ZERO( p )                FT_MEM_ZERO( p, sizeof ( *(p) ) )\n\n\n#define FT_ARRAY_ZERO( dest, count )                        \\\n          FT_MEM_ZERO( dest, (count) * sizeof ( *(dest) ) )\n\n#define FT_ARRAY_COPY( dest, source, count )                        \\\n          FT_MEM_COPY( dest, source, (count) * sizeof ( *(dest) ) )\n\n#define FT_ARRAY_MOVE( dest, source, count )                        \\\n          FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) )\n\n\n  /*\n   *  Return the maximum number of addressable elements in an array.\n   *  We limit ourselves to INT_MAX, rather than UINT_MAX, to avoid\n   *  any problems.\n   */\n#define FT_ARRAY_MAX( ptr )           ( FT_INT_MAX / sizeof ( *(ptr) ) )\n\n#define FT_ARRAY_CHECK( ptr, count )  ( (count) <= FT_ARRAY_MAX( ptr ) )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The following functions macros expect that their pointer argument is  */\n  /* _typed_ in order to automatically compute array element sizes.        */\n  /*                                                                       */\n\n#define FT_MEM_NEW_ARRAY( ptr, count )                              \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory,            \\\n                                                 sizeof ( *(ptr) ), \\\n                                                 0,                 \\\n                                                 (FT_Long)(count),  \\\n                                                 NULL,              \\\n                                                 &error ) )\n\n#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz )                     \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory,            \\\n                                                 sizeof ( *(ptr) ), \\\n                                                 (FT_Long)(cursz),  \\\n                                                 (FT_Long)(newsz),  \\\n                                                 (ptr),             \\\n                                                 &error ) )\n\n#define FT_MEM_QNEW_ARRAY( ptr, count )                              \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory,            \\\n                                                  sizeof ( *(ptr) ), \\\n                                                  0,                 \\\n                                                  (FT_Long)(count),  \\\n                                                  NULL,              \\\n                                                  &error ) )\n\n#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz )                     \\\n          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory,            \\\n                                                  sizeof ( *(ptr) ), \\\n                                                  (FT_Long)(cursz),  \\\n                                                  (FT_Long)(newsz),  \\\n                                                  (ptr),             \\\n                                                  &error ) )\n\n#define FT_ALLOC( ptr, size )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_ALLOC( ptr, size ) )\n\n#define FT_REALLOC( ptr, cursz, newsz )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_REALLOC( ptr, cursz, newsz ) )\n\n#define FT_ALLOC_MULT( ptr, count, item_size )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_ALLOC_MULT( ptr, count, item_size ) )\n\n#define FT_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz )              \\\n          FT_MEM_SET_ERROR( FT_MEM_REALLOC_MULT( ptr, oldcnt,      \\\n                                                 newcnt, itmsz ) )\n\n#define FT_QALLOC( ptr, size )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_QALLOC( ptr, size ) )\n\n#define FT_QREALLOC( ptr, cursz, newsz )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_QREALLOC( ptr, cursz, newsz ) )\n\n#define FT_QALLOC_MULT( ptr, count, item_size )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_QALLOC_MULT( ptr, count, item_size ) )\n\n#define FT_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz )              \\\n          FT_MEM_SET_ERROR( FT_MEM_QREALLOC_MULT( ptr, oldcnt,      \\\n                                                  newcnt, itmsz ) )\n\n#define FT_FREE( ptr )  FT_MEM_FREE( ptr )\n\n#define FT_NEW( ptr )  FT_MEM_SET_ERROR( FT_MEM_NEW( ptr ) )\n\n#define FT_NEW_ARRAY( ptr, count )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) )\n\n#define FT_RENEW_ARRAY( ptr, curcnt, newcnt )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )\n\n#define FT_QNEW( ptr )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) )\n\n#define FT_QNEW_ARRAY( ptr, count )                          \\\n          FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) )\n\n#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt )                          \\\n          FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )\n\n\n  FT_BASE( FT_Pointer )\n  ft_mem_strdup( FT_Memory    memory,\n                 const char*  str,\n                 FT_Error    *p_error );\n\n  FT_BASE( FT_Pointer )\n  ft_mem_dup( FT_Memory    memory,\n              const void*  address,\n              FT_ULong     size,\n              FT_Error    *p_error );\n\n\n#define FT_MEM_STRDUP( dst, str )                                            \\\n          (dst) = (char*)ft_mem_strdup( memory, (const char*)(str), &error )\n\n#define FT_STRDUP( dst, str )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_STRDUP( dst, str ) )\n\n#define FT_MEM_DUP( dst, address, size )                                    \\\n          (dst) = ft_mem_dup( memory, (address), (FT_ULong)(size), &error )\n\n#define FT_DUP( dst, address, size )                           \\\n          FT_MEM_SET_ERROR( FT_MEM_DUP( dst, address, size ) )\n\n\n  /* Return >= 1 if a truncation occurs.            */\n  /* Return 0 if the source string fits the buffer. */\n  /* This is *not* the same as strlcpy().           */\n  FT_BASE( FT_Int )\n  ft_mem_strcpyn( char*        dst,\n                  const char*  src,\n                  FT_ULong     size );\n\n#define FT_STRCPYN( dst, src, size )                                         \\\n          ft_mem_strcpyn( (char*)dst, (const char*)(src), (FT_ULong)(size) )\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTMEMORY_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftobjs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftobjs.h                                                               */\n/*                                                                         */\n/*    The FreeType private base classes (specification).                   */\n/*                                                                         */\n/*  Copyright 1996-2006, 2008, 2010, 2012-2013 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  This file contains the definition of all internal FreeType classes.  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTOBJS_H__\n#define __FTOBJS_H__\n\n#include <ft2build.h>\n#include FT_RENDER_H\n#include FT_SIZES_H\n#include FT_LCD_FILTER_H\n#include FT_INTERNAL_MEMORY_H\n#include FT_INTERNAL_GLYPH_LOADER_H\n#include FT_INTERNAL_DRIVER_H\n#include FT_INTERNAL_AUTOHINT_H\n#include FT_INTERNAL_SERVICE_H\n#include FT_INTERNAL_PIC_H\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n#include FT_INCREMENTAL_H\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Some generic definitions.                                             */\n  /*                                                                       */\n#ifndef TRUE\n#define TRUE  1\n#endif\n\n#ifndef FALSE\n#define FALSE  0\n#endif\n\n#ifndef NULL\n#define NULL  (void*)0\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The min and max functions missing in C.  As usual, be careful not to  */\n  /* write things like FT_MIN( a++, b++ ) to avoid side effects.           */\n  /*                                                                       */\n#define FT_MIN( a, b )  ( (a) < (b) ? (a) : (b) )\n#define FT_MAX( a, b )  ( (a) > (b) ? (a) : (b) )\n\n#define FT_ABS( a )     ( (a) < 0 ? -(a) : (a) )\n\n  /*\n   *  Approximate sqrt(x*x+y*y) using the `alpha max plus beta min'\n   *  algorithm.  We use alpha = 1, beta = 3/8, giving us results with a\n   *  largest error less than 7% compared to the exact value.\n   */\n#define FT_HYPOT( x, y )                 \\\n          ( x = FT_ABS( x ),             \\\n            y = FT_ABS( y ),             \\\n            x > y ? x + ( 3 * y >> 3 )   \\\n                  : y + ( 3 * x >> 3 ) )\n\n#define FT_PAD_FLOOR( x, n )  ( (x) & ~((n)-1) )\n#define FT_PAD_ROUND( x, n )  FT_PAD_FLOOR( (x) + ((n)/2), n )\n#define FT_PAD_CEIL( x, n )   FT_PAD_FLOOR( (x) + ((n)-1), n )\n\n#define FT_PIX_FLOOR( x )     ( (x) & ~63 )\n#define FT_PIX_ROUND( x )     FT_PIX_FLOOR( (x) + 32 )\n#define FT_PIX_CEIL( x )      FT_PIX_FLOOR( (x) + 63 )\n\n\n  /*\n   *  character classification functions -- since these are used to parse\n   *  font files, we must not use those in <ctypes.h> which are\n   *  locale-dependent\n   */\n#define  ft_isdigit( x )   ( ( (unsigned)(x) - '0' ) < 10U )\n\n#define  ft_isxdigit( x )  ( ( (unsigned)(x) - '0' ) < 10U || \\\n                             ( (unsigned)(x) - 'a' ) < 6U  || \\\n                             ( (unsigned)(x) - 'A' ) < 6U  )\n\n  /* the next two macros assume ASCII representation */\n#define  ft_isupper( x )  ( ( (unsigned)(x) - 'A' ) < 26U )\n#define  ft_islower( x )  ( ( (unsigned)(x) - 'a' ) < 26U )\n\n#define  ft_isalpha( x )  ( ft_isupper( x ) || ft_islower( x ) )\n#define  ft_isalnum( x )  ( ft_isdigit( x ) || ft_isalpha( x ) )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                       C H A R M A P S                           ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* handle to internal charmap object */\n  typedef struct FT_CMapRec_*              FT_CMap;\n\n  /* handle to charmap class structure */\n  typedef const struct FT_CMap_ClassRec_*  FT_CMap_Class;\n\n  /* internal charmap object structure */\n  typedef struct  FT_CMapRec_\n  {\n    FT_CharMapRec  charmap;\n    FT_CMap_Class  clazz;\n\n  } FT_CMapRec;\n\n  /* typecase any pointer to a charmap handle */\n#define FT_CMAP( x )              ((FT_CMap)( x ))\n\n  /* obvious macros */\n#define FT_CMAP_PLATFORM_ID( x )  FT_CMAP( x )->charmap.platform_id\n#define FT_CMAP_ENCODING_ID( x )  FT_CMAP( x )->charmap.encoding_id\n#define FT_CMAP_ENCODING( x )     FT_CMAP( x )->charmap.encoding\n#define FT_CMAP_FACE( x )         FT_CMAP( x )->charmap.face\n\n\n  /* class method definitions */\n  typedef FT_Error\n  (*FT_CMap_InitFunc)( FT_CMap     cmap,\n                       FT_Pointer  init_data );\n\n  typedef void\n  (*FT_CMap_DoneFunc)( FT_CMap  cmap );\n\n  typedef FT_UInt\n  (*FT_CMap_CharIndexFunc)( FT_CMap    cmap,\n                            FT_UInt32  char_code );\n\n  typedef FT_UInt\n  (*FT_CMap_CharNextFunc)( FT_CMap     cmap,\n                           FT_UInt32  *achar_code );\n\n  typedef FT_UInt\n  (*FT_CMap_CharVarIndexFunc)( FT_CMap    cmap,\n                               FT_CMap    unicode_cmap,\n                               FT_UInt32  char_code,\n                               FT_UInt32  variant_selector );\n\n  typedef FT_Bool\n  (*FT_CMap_CharVarIsDefaultFunc)( FT_CMap    cmap,\n                                   FT_UInt32  char_code,\n                                   FT_UInt32  variant_selector );\n\n  typedef FT_UInt32 *\n  (*FT_CMap_VariantListFunc)( FT_CMap    cmap,\n                              FT_Memory  mem );\n\n  typedef FT_UInt32 *\n  (*FT_CMap_CharVariantListFunc)( FT_CMap    cmap,\n                                  FT_Memory  mem,\n                                  FT_UInt32  char_code );\n\n  typedef FT_UInt32 *\n  (*FT_CMap_VariantCharListFunc)( FT_CMap    cmap,\n                                  FT_Memory  mem,\n                                  FT_UInt32  variant_selector );\n\n\n  typedef struct  FT_CMap_ClassRec_\n  {\n    FT_ULong               size;\n    FT_CMap_InitFunc       init;\n    FT_CMap_DoneFunc       done;\n    FT_CMap_CharIndexFunc  char_index;\n    FT_CMap_CharNextFunc   char_next;\n\n    /* Subsequent entries are special ones for format 14 -- the variant */\n    /* selector subtable which behaves like no other                    */\n\n    FT_CMap_CharVarIndexFunc      char_var_index;\n    FT_CMap_CharVarIsDefaultFunc  char_var_default;\n    FT_CMap_VariantListFunc       variant_list;\n    FT_CMap_CharVariantListFunc   charvariant_list;\n    FT_CMap_VariantCharListFunc   variantchar_list;\n\n  } FT_CMap_ClassRec;\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DECLARE_CMAP_CLASS( class_ )              \\\n  FT_CALLBACK_TABLE const  FT_CMap_ClassRec class_;\n\n#define FT_DEFINE_CMAP_CLASS(       \\\n          class_,                   \\\n          size_,                    \\\n          init_,                    \\\n          done_,                    \\\n          char_index_,              \\\n          char_next_,               \\\n          char_var_index_,          \\\n          char_var_default_,        \\\n          variant_list_,            \\\n          charvariant_list_,        \\\n          variantchar_list_ )       \\\n  FT_CALLBACK_TABLE_DEF             \\\n  const FT_CMap_ClassRec  class_ =  \\\n  {                                 \\\n    size_,                          \\\n    init_,                          \\\n    done_,                          \\\n    char_index_,                    \\\n    char_next_,                     \\\n    char_var_index_,                \\\n    char_var_default_,              \\\n    variant_list_,                  \\\n    charvariant_list_,              \\\n    variantchar_list_               \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DECLARE_CMAP_CLASS( class_ )                  \\\n  void                                                   \\\n  FT_Init_Class_ ## class_( FT_Library         library,  \\\n                            FT_CMap_ClassRec*  clazz );\n\n#define FT_DEFINE_CMAP_CLASS(                            \\\n          class_,                                        \\\n          size_,                                         \\\n          init_,                                         \\\n          done_,                                         \\\n          char_index_,                                   \\\n          char_next_,                                    \\\n          char_var_index_,                               \\\n          char_var_default_,                             \\\n          variant_list_,                                 \\\n          charvariant_list_,                             \\\n          variantchar_list_ )                            \\\n  void                                                   \\\n  FT_Init_Class_ ## class_( FT_Library         library,  \\\n                            FT_CMap_ClassRec*  clazz )   \\\n  {                                                      \\\n    FT_UNUSED( library );                                \\\n                                                         \\\n    clazz->size             = size_;                     \\\n    clazz->init             = init_;                     \\\n    clazz->done             = done_;                     \\\n    clazz->char_index       = char_index_;               \\\n    clazz->char_next        = char_next_;                \\\n    clazz->char_var_index   = char_var_index_;           \\\n    clazz->char_var_default = char_var_default_;         \\\n    clazz->variant_list     = variant_list_;             \\\n    clazz->charvariant_list = charvariant_list_;         \\\n    clazz->variantchar_list = variantchar_list_;         \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n  /* create a new charmap and add it to charmap->face */\n  FT_BASE( FT_Error )\n  FT_CMap_New( FT_CMap_Class  clazz,\n               FT_Pointer     init_data,\n               FT_CharMap     charmap,\n               FT_CMap       *acmap );\n\n  /* destroy a charmap and remove it from face's list */\n  FT_BASE( void )\n  FT_CMap_Done( FT_CMap  cmap );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Face_InternalRec                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure contains the internal fields of each FT_Face        */\n  /*    object.  These fields may change between different releases of     */\n  /*    FreeType.                                                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    max_points ::                                                      */\n  /*      The maximum number of points used to store the vectorial outline */\n  /*      of any glyph in this face.  If this value cannot be known in     */\n  /*      advance, or if the face isn't scalable, this should be set to 0. */\n  /*      Only relevant for scalable formats.                              */\n  /*                                                                       */\n  /*    max_contours ::                                                    */\n  /*      The maximum number of contours used to store the vectorial       */\n  /*      outline of any glyph in this face.  If this value cannot be      */\n  /*      known in advance, or if the face isn't scalable, this should be  */\n  /*      set to 0.  Only relevant for scalable formats.                   */\n  /*                                                                       */\n  /*    transform_matrix ::                                                */\n  /*      A 2x2 matrix of 16.16 coefficients used to transform glyph       */\n  /*      outlines after they are loaded from the font.  Only used by the  */\n  /*      convenience functions.                                           */\n  /*                                                                       */\n  /*    transform_delta ::                                                 */\n  /*      A translation vector used to transform glyph outlines after they */\n  /*      are loaded from the font.  Only used by the convenience          */\n  /*      functions.                                                       */\n  /*                                                                       */\n  /*    transform_flags ::                                                 */\n  /*      Some flags used to classify the transform.  Only used by the     */\n  /*      convenience functions.                                           */\n  /*                                                                       */\n  /*    services ::                                                        */\n  /*      A cache for frequently used services.  It should be only         */\n  /*      accessed with the macro `FT_FACE_LOOKUP_SERVICE'.                */\n  /*                                                                       */\n  /*    incremental_interface ::                                           */\n  /*      If non-null, the interface through which glyph data and metrics  */\n  /*      are loaded incrementally for faces that do not provide all of    */\n  /*      this data when first opened.  This field exists only if          */\n  /*      @FT_CONFIG_OPTION_INCREMENTAL is defined.                        */\n  /*                                                                       */\n  /*    ignore_unpatented_hinter ::                                        */\n  /*      This boolean flag instructs the glyph loader to ignore the       */\n  /*      native font hinter, if one is found.  This is exclusively used   */\n  /*      in the case when the unpatented hinter is compiled within the    */\n  /*      library.                                                         */\n  /*                                                                       */\n  /*    refcount ::                                                        */\n  /*      A counter initialized to~1 at the time an @FT_Face structure is  */\n  /*      created.  @FT_Reference_Face increments this counter, and        */\n  /*      @FT_Done_Face only destroys a face if the counter is~1,          */\n  /*      otherwise it simply decrements it.                               */\n  /*                                                                       */\n  typedef struct  FT_Face_InternalRec_\n  {\n    FT_Matrix           transform_matrix;\n    FT_Vector           transform_delta;\n    FT_Int              transform_flags;\n\n    FT_ServiceCacheRec  services;\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    FT_Incremental_InterfaceRec*  incremental_interface;\n#endif\n\n    FT_Bool             ignore_unpatented_hinter;\n    FT_Int              refcount;\n\n  } FT_Face_InternalRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Slot_InternalRec                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure contains the internal fields of each FT_GlyphSlot   */\n  /*    object.  These fields may change between different releases of     */\n  /*    FreeType.                                                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    loader            :: The glyph loader object used to load outlines */\n  /*                         into the glyph slot.                          */\n  /*                                                                       */\n  /*    flags             :: Possible values are zero or                   */\n  /*                         FT_GLYPH_OWN_BITMAP.  The latter indicates    */\n  /*                         that the FT_GlyphSlot structure owns the      */\n  /*                         bitmap buffer.                                */\n  /*                                                                       */\n  /*    glyph_transformed :: Boolean.  Set to TRUE when the loaded glyph   */\n  /*                         must be transformed through a specific        */\n  /*                         font transformation.  This is _not_ the same  */\n  /*                         as the face transform set through             */\n  /*                         FT_Set_Transform().                           */\n  /*                                                                       */\n  /*    glyph_matrix      :: The 2x2 matrix corresponding to the glyph     */\n  /*                         transformation, if necessary.                 */\n  /*                                                                       */\n  /*    glyph_delta       :: The 2d translation vector corresponding to    */\n  /*                         the glyph transformation, if necessary.       */\n  /*                                                                       */\n  /*    glyph_hints       :: Format-specific glyph hints management.       */\n  /*                                                                       */\n\n#define FT_GLYPH_OWN_BITMAP  0x1\n\n  typedef struct  FT_Slot_InternalRec_\n  {\n    FT_GlyphLoader  loader;\n    FT_UInt         flags;\n    FT_Bool         glyph_transformed;\n    FT_Matrix       glyph_matrix;\n    FT_Vector       glyph_delta;\n    void*           glyph_hints;\n\n  } FT_GlyphSlot_InternalRec;\n\n\n#if 0\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Size_InternalRec                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure contains the internal fields of each FT_Size        */\n  /*    object.  Currently, it's empty.                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n  typedef struct  FT_Size_InternalRec_\n  {\n    /* empty */\n\n  } FT_Size_InternalRec;\n\n#endif\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                         M O D U L E S                           ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_ModuleRec                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A module object instance.                                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    clazz   :: A pointer to the module's class.                        */\n  /*                                                                       */\n  /*    library :: A handle to the parent library object.                  */\n  /*                                                                       */\n  /*    memory  :: A handle to the memory manager.                         */\n  /*                                                                       */\n  typedef struct  FT_ModuleRec_\n  {\n    FT_Module_Class*  clazz;\n    FT_Library        library;\n    FT_Memory         memory;\n\n  } FT_ModuleRec;\n\n\n  /* typecast an object to an FT_Module */\n#define FT_MODULE( x )          ((FT_Module)( x ))\n#define FT_MODULE_CLASS( x )    FT_MODULE( x )->clazz\n#define FT_MODULE_LIBRARY( x )  FT_MODULE( x )->library\n#define FT_MODULE_MEMORY( x )   FT_MODULE( x )->memory\n\n\n#define FT_MODULE_IS_DRIVER( x )  ( FT_MODULE_CLASS( x )->module_flags & \\\n                                    FT_MODULE_FONT_DRIVER )\n\n#define FT_MODULE_IS_RENDERER( x )  ( FT_MODULE_CLASS( x )->module_flags & \\\n                                      FT_MODULE_RENDERER )\n\n#define FT_MODULE_IS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \\\n                                    FT_MODULE_HINTER )\n\n#define FT_MODULE_IS_STYLER( x )  ( FT_MODULE_CLASS( x )->module_flags & \\\n                                    FT_MODULE_STYLER )\n\n#define FT_DRIVER_IS_SCALABLE( x )  ( FT_MODULE_CLASS( x )->module_flags & \\\n                                      FT_MODULE_DRIVER_SCALABLE )\n\n#define FT_DRIVER_USES_OUTLINES( x )  !( FT_MODULE_CLASS( x )->module_flags & \\\n                                         FT_MODULE_DRIVER_NO_OUTLINES )\n\n#define FT_DRIVER_HAS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \\\n                                     FT_MODULE_DRIVER_HAS_HINTER )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Module_Interface                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finds a module and returns its specific interface as a typeless    */\n  /*    pointer.                                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library     :: A handle to the library object.                     */\n  /*                                                                       */\n  /*    module_name :: The module's name (as an ASCII string).             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A module-specific interface if available, 0 otherwise.             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You should better be familiar with FreeType internals to know      */\n  /*    which module to look for, and what its interface is :-)            */\n  /*                                                                       */\n  FT_BASE( const void* )\n  FT_Get_Module_Interface( FT_Library   library,\n                           const char*  mod_name );\n\n  FT_BASE( FT_Pointer )\n  ft_module_get_service( FT_Module    module,\n                         const char*  service_id );\n\n  /* */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****   F A C E,   S I Z E   &   G L Y P H   S L O T   O B J E C T S  ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* a few macros used to perform easy typecasts with minimal brain damage */\n\n#define FT_FACE( x )          ((FT_Face)(x))\n#define FT_SIZE( x )          ((FT_Size)(x))\n#define FT_SLOT( x )          ((FT_GlyphSlot)(x))\n\n#define FT_FACE_DRIVER( x )   FT_FACE( x )->driver\n#define FT_FACE_LIBRARY( x )  FT_FACE_DRIVER( x )->root.library\n#define FT_FACE_MEMORY( x )   FT_FACE( x )->memory\n#define FT_FACE_STREAM( x )   FT_FACE( x )->stream\n\n#define FT_SIZE_FACE( x )     FT_SIZE( x )->face\n#define FT_SLOT_FACE( x )     FT_SLOT( x )->face\n\n#define FT_FACE_SLOT( x )     FT_FACE( x )->glyph\n#define FT_FACE_SIZE( x )     FT_FACE( x )->size\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_GlyphSlot                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    It is sometimes useful to have more than one glyph slot for a      */\n  /*    given face object.  This function is used to create additional     */\n  /*    slots.  All of them are automatically discarded when the face is   */\n  /*    destroyed.                                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face  :: A handle to a parent face object.                         */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aslot :: A handle to a new glyph slot object.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_BASE( FT_Error )\n  FT_New_GlyphSlot( FT_Face        face,\n                    FT_GlyphSlot  *aslot );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_GlyphSlot                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroys a given glyph slot.  Remember however that all slots are  */\n  /*    automatically destroyed with its parent.  Using this function is   */\n  /*    not always mandatory.                                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    slot :: A handle to a target glyph slot.                           */\n  /*                                                                       */\n  FT_BASE( void )\n  FT_Done_GlyphSlot( FT_GlyphSlot  slot );\n\n /* */\n\n#define FT_REQUEST_WIDTH( req )                                            \\\n          ( (req)->horiResolution                                          \\\n              ? (FT_Pos)( (req)->width * (req)->horiResolution + 36 ) / 72 \\\n              : (req)->width )\n\n#define FT_REQUEST_HEIGHT( req )                                            \\\n          ( (req)->vertResolution                                           \\\n              ? (FT_Pos)( (req)->height * (req)->vertResolution + 36 ) / 72 \\\n              : (req)->height )\n\n\n  /* Set the metrics according to a bitmap strike. */\n  FT_BASE( void )\n  FT_Select_Metrics( FT_Face   face,\n                     FT_ULong  strike_index );\n\n\n  /* Set the metrics according to a size request. */\n  FT_BASE( void )\n  FT_Request_Metrics( FT_Face          face,\n                      FT_Size_Request  req );\n\n\n  /* Match a size request against `available_sizes'. */\n  FT_BASE( FT_Error )\n  FT_Match_Size( FT_Face          face,\n                 FT_Size_Request  req,\n                 FT_Bool          ignore_width,\n                 FT_ULong*        size_index );\n\n\n  /* Use the horizontal metrics to synthesize the vertical metrics. */\n  /* If `advance' is zero, it is also synthesized.                  */\n  FT_BASE( void )\n  ft_synthesize_vertical_metrics( FT_Glyph_Metrics*  metrics,\n                                  FT_Pos             advance );\n\n\n  /* Free the bitmap of a given glyphslot when needed (i.e., only when it */\n  /* was allocated with ft_glyphslot_alloc_bitmap).                       */\n  FT_BASE( void )\n  ft_glyphslot_free_bitmap( FT_GlyphSlot  slot );\n\n\n  /* Allocate a new bitmap buffer in a glyph slot. */\n  FT_BASE( FT_Error )\n  ft_glyphslot_alloc_bitmap( FT_GlyphSlot  slot,\n                             FT_ULong      size );\n\n\n  /* Set the bitmap buffer in a glyph slot to a given pointer.  The buffer */\n  /* will not be freed by a later call to ft_glyphslot_free_bitmap.        */\n  FT_BASE( void )\n  ft_glyphslot_set_bitmap( FT_GlyphSlot  slot,\n                           FT_Byte*      buffer );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                        R E N D E R E R S                        ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n#define FT_RENDERER( x )      ((FT_Renderer)( x ))\n#define FT_GLYPH( x )         ((FT_Glyph)( x ))\n#define FT_BITMAP_GLYPH( x )  ((FT_BitmapGlyph)( x ))\n#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x ))\n\n\n  typedef struct  FT_RendererRec_\n  {\n    FT_ModuleRec            root;\n    FT_Renderer_Class*      clazz;\n    FT_Glyph_Format         glyph_format;\n    FT_Glyph_Class          glyph_class;\n\n    FT_Raster               raster;\n    FT_Raster_Render_Func   raster_render;\n    FT_Renderer_RenderFunc  render;\n\n  } FT_RendererRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                    F O N T   D R I V E R S                      ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* typecast a module into a driver easily */\n#define FT_DRIVER( x )        ((FT_Driver)(x))\n\n  /* typecast a module as a driver, and get its driver class */\n#define FT_DRIVER_CLASS( x )  FT_DRIVER( x )->clazz\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_DriverRec                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The root font driver class.  A font driver is responsible for      */\n  /*    managing and loading font files of a given format.                 */\n  /*                                                                       */\n  /*  <Fields>                                                             */\n  /*     root         :: Contains the fields of the root module class.     */\n  /*                                                                       */\n  /*     clazz        :: A pointer to the font driver's class.  Note that  */\n  /*                     this is NOT root.clazz.  `class' wasn't used      */\n  /*                     as it is a reserved word in C++.                  */\n  /*                                                                       */\n  /*     faces_list   :: The list of faces currently opened by this        */\n  /*                     driver.                                           */\n  /*                                                                       */\n  /*     glyph_loader :: The glyph loader for all faces managed by this    */\n  /*                     driver.  This object isn't defined for unscalable */\n  /*                     formats.                                          */\n  /*                                                                       */\n  typedef struct  FT_DriverRec_\n  {\n    FT_ModuleRec     root;\n    FT_Driver_Class  clazz;\n    FT_ListRec       faces_list;\n    FT_GlyphLoader   glyph_loader;\n\n  } FT_DriverRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                       L I B R A R I E S                         ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* This hook is used by the TrueType debugger.  It must be set to an */\n  /* alternate truetype bytecode interpreter function.                 */\n#define FT_DEBUG_HOOK_TRUETYPE            0\n\n\n  /* Set this debug hook to a non-null pointer to force unpatented hinting */\n  /* for all faces when both TT_USE_BYTECODE_INTERPRETER and               */\n  /* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined.  This is only used   */\n  /* during debugging.                                                     */\n#define FT_DEBUG_HOOK_UNPATENTED_HINTING  1\n\n\n  typedef void  (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap*      bitmap,\n                                            FT_Render_Mode  render_mode,\n                                            FT_Library      library );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_LibraryRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The FreeType library class.  This is the root of all FreeType      */\n  /*    data.  Use FT_New_Library() to create a library object, and        */\n  /*    FT_Done_Library() to discard it and all child objects.             */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    memory           :: The library's memory object.  Manages memory   */\n  /*                        allocation.                                    */\n  /*                                                                       */\n  /*    version_major    :: The major version number of the library.       */\n  /*                                                                       */\n  /*    version_minor    :: The minor version number of the library.       */\n  /*                                                                       */\n  /*    version_patch    :: The current patch level of the library.        */\n  /*                                                                       */\n  /*    num_modules      :: The number of modules currently registered     */\n  /*                        within this library.  This is set to 0 for new */\n  /*                        libraries.  New modules are added through the  */\n  /*                        FT_Add_Module() API function.                  */\n  /*                                                                       */\n  /*    modules          :: A table used to store handles to the currently */\n  /*                        registered modules. Note that each font driver */\n  /*                        contains a list of its opened faces.           */\n  /*                                                                       */\n  /*    renderers        :: The list of renderers currently registered     */\n  /*                        within the library.                            */\n  /*                                                                       */\n  /*    cur_renderer     :: The current outline renderer.  This is a       */\n  /*                        shortcut used to avoid parsing the list on     */\n  /*                        each call to FT_Outline_Render().  It is a     */\n  /*                        handle to the current renderer for the         */\n  /*                        FT_GLYPH_FORMAT_OUTLINE format.                */\n  /*                                                                       */\n  /*    auto_hinter      :: XXX                                            */\n  /*                                                                       */\n  /*    raster_pool      :: The raster object's render pool.  This can     */\n  /*                        ideally be changed dynamically at run-time.    */\n  /*                                                                       */\n  /*    raster_pool_size :: The size of the render pool in bytes.          */\n  /*                                                                       */\n  /*    debug_hooks      :: XXX                                            */\n  /*                                                                       */\n  /*    lcd_filter       :: If subpixel rendering is activated, the        */\n  /*                        selected LCD filter mode.                      */\n  /*                                                                       */\n  /*    lcd_extra        :: If subpixel rendering is activated, the number */\n  /*                        of extra pixels needed for the LCD filter.     */\n  /*                                                                       */\n  /*    lcd_weights      :: If subpixel rendering is activated, the LCD    */\n  /*                        filter weights, if any.                        */\n  /*                                                                       */\n  /*    lcd_filter_func  :: If subpixel rendering is activated, the LCD    */\n  /*                        filtering callback function.                   */\n  /*                                                                       */\n  /*    pic_container    :: Contains global structs and tables, instead    */\n  /*                        of defining them globallly.                    */\n  /*                                                                       */\n  /*    refcount         :: A counter initialized to~1 at the time an      */\n  /*                        @FT_Library structure is created.              */\n  /*                        @FT_Reference_Library increments this counter, */\n  /*                        and @FT_Done_Library only destroys a library   */\n  /*                        if the counter is~1, otherwise it simply       */\n  /*                        decrements it.                                 */\n  /*                                                                       */\n  typedef struct  FT_LibraryRec_\n  {\n    FT_Memory          memory;           /* library's memory manager */\n\n    FT_Int             version_major;\n    FT_Int             version_minor;\n    FT_Int             version_patch;\n\n    FT_UInt            num_modules;\n    FT_Module          modules[FT_MAX_MODULES];  /* module objects  */\n\n    FT_ListRec         renderers;        /* list of renderers        */\n    FT_Renderer        cur_renderer;     /* current outline renderer */\n    FT_Module          auto_hinter;\n\n    FT_Byte*           raster_pool;      /* scan-line conversion */\n                                         /* render pool          */\n    FT_ULong           raster_pool_size; /* size of render pool in bytes */\n\n    FT_DebugHook_Func  debug_hooks[4];\n\n#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING\n    FT_LcdFilter             lcd_filter;\n    FT_Int                   lcd_extra;        /* number of extra pixels */\n    FT_Byte                  lcd_weights[7];   /* filter weights, if any */\n    FT_Bitmap_LcdFilterFunc  lcd_filter_func;  /* filtering callback     */\n#endif\n\n#ifdef FT_CONFIG_OPTION_PIC\n    FT_PIC_Container   pic_container;\n#endif\n\n    FT_Int             refcount;\n\n  } FT_LibraryRec;\n\n\n  FT_BASE( FT_Renderer )\n  FT_Lookup_Renderer( FT_Library       library,\n                      FT_Glyph_Format  format,\n                      FT_ListNode*     node );\n\n  FT_BASE( FT_Error )\n  FT_Render_Glyph_Internal( FT_Library      library,\n                            FT_GlyphSlot    slot,\n                            FT_Render_Mode  render_mode );\n\n  typedef const char*\n  (*FT_Face_GetPostscriptNameFunc)( FT_Face  face );\n\n  typedef FT_Error\n  (*FT_Face_GetGlyphNameFunc)( FT_Face     face,\n                               FT_UInt     glyph_index,\n                               FT_Pointer  buffer,\n                               FT_UInt     buffer_max );\n\n  typedef FT_UInt\n  (*FT_Face_GetGlyphNameIndexFunc)( FT_Face     face,\n                                    FT_String*  glyph_name );\n\n\n#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Memory                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Creates a new memory object.                                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A pointer to the new memory object.  0 in case of error.           */\n  /*                                                                       */\n  FT_BASE( FT_Memory )\n  FT_New_Memory( void );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_Memory                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Discards memory manager.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory :: A handle to the memory manager.                          */\n  /*                                                                       */\n  FT_BASE( void )\n  FT_Done_Memory( FT_Memory  memory );\n\n#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */\n\n\n  /* Define default raster's interface.  The default raster is located in  */\n  /* `src/base/ftraster.c'.                                                */\n  /*                                                                       */\n  /* Client applications can register new rasters through the              */\n  /* FT_Set_Raster() API.                                                  */\n\n#ifndef FT_NO_DEFAULT_RASTER\n  FT_EXPORT_VAR( FT_Raster_Funcs )  ft_default_raster;\n#endif\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                      P I C   S U P P O R T                      ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* PIC support macros for ftimage.h */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DEFINE_OUTLINE_FUNCS                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to initialize an instance of FT_Outline_Funcs struct.         */\n  /*    When FT_CONFIG_OPTION_PIC is defined an init funtion will need to  */\n  /*    be called with a pre-allocated structure to be filled.             */\n  /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */\n  /*    allocated in the global scope (or the scope where the macro        */\n  /*    is used).                                                          */\n  /*                                                                       */\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_OUTLINE_FUNCS(           \\\n          class_,                          \\\n          move_to_,                        \\\n          line_to_,                        \\\n          conic_to_,                       \\\n          cubic_to_,                       \\\n          shift_,                          \\\n          delta_ )                         \\\n  static const  FT_Outline_Funcs class_ =  \\\n  {                                        \\\n    move_to_,                              \\\n    line_to_,                              \\\n    conic_to_,                             \\\n    cubic_to_,                             \\\n    shift_,                                \\\n    delta_                                 \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_OUTLINE_FUNCS(                     \\\n          class_,                                    \\\n          move_to_,                                  \\\n          line_to_,                                  \\\n          conic_to_,                                 \\\n          cubic_to_,                                 \\\n          shift_,                                    \\\n          delta_ )                                   \\\n  static FT_Error                                    \\\n  Init_Class_ ## class_( FT_Outline_Funcs*  clazz )  \\\n  {                                                  \\\n    clazz->move_to  = move_to_;                      \\\n    clazz->line_to  = line_to_;                      \\\n    clazz->conic_to = conic_to_;                     \\\n    clazz->cubic_to = cubic_to_;                     \\\n    clazz->shift    = shift_;                        \\\n    clazz->delta    = delta_;                        \\\n                                                     \\\n    return FT_Err_Ok;                                \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DEFINE_RASTER_FUNCS                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to initialize an instance of FT_Raster_Funcs struct.          */\n  /*    When FT_CONFIG_OPTION_PIC is defined an init funtion will need to  */\n  /*    be called with a pre-allocated structure to be filled.             */\n  /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */\n  /*    allocated in the global scope (or the scope where the macro        */\n  /*    is used).                                                          */\n  /*                                                                       */\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_RASTER_FUNCS(    \\\n          class_,                  \\\n          glyph_format_,           \\\n          raster_new_,             \\\n          raster_reset_,           \\\n          raster_set_mode_,        \\\n          raster_render_,          \\\n          raster_done_ )           \\\n  const FT_Raster_Funcs  class_ =  \\\n  {                                \\\n    glyph_format_,                 \\\n    raster_new_,                   \\\n    raster_reset_,                 \\\n    raster_set_mode_,              \\\n    raster_render_,                \\\n    raster_done_                   \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_RASTER_FUNCS(                        \\\n          class_,                                      \\\n          glyph_format_,                               \\\n          raster_new_,                                 \\\n          raster_reset_,                               \\\n          raster_set_mode_,                            \\\n          raster_render_,                              \\\n          raster_done_ )                               \\\n  void                                                 \\\n  FT_Init_Class_ ## class_( FT_Raster_Funcs*  clazz )  \\\n  {                                                    \\\n    clazz->glyph_format    = glyph_format_;            \\\n    clazz->raster_new      = raster_new_;              \\\n    clazz->raster_reset    = raster_reset_;            \\\n    clazz->raster_set_mode = raster_set_mode_;         \\\n    clazz->raster_render   = raster_render_;           \\\n    clazz->raster_done     = raster_done_;             \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n  /* PIC support macros for ftrender.h */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DEFINE_GLYPH                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to initialize an instance of FT_Glyph_Class struct.           */\n  /*    When FT_CONFIG_OPTION_PIC is defined an init funtion will need to  */\n  /*    be called with a pre-allocated stcture to be filled.               */\n  /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */\n  /*    allocated in the global scope (or the scope where the macro        */\n  /*    is used).                                                          */\n  /*                                                                       */\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_GLYPH(          \\\n          class_,                 \\\n          size_,                  \\\n          format_,                \\\n          init_,                  \\\n          done_,                  \\\n          copy_,                  \\\n          transform_,             \\\n          bbox_,                  \\\n          prepare_ )              \\\n  FT_CALLBACK_TABLE_DEF           \\\n  const FT_Glyph_Class  class_ =  \\\n  {                               \\\n    size_,                        \\\n    format_,                      \\\n    init_,                        \\\n    done_,                        \\\n    copy_,                        \\\n    transform_,                   \\\n    bbox_,                        \\\n    prepare_                      \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_GLYPH(                              \\\n          class_,                                     \\\n          size_,                                      \\\n          format_,                                    \\\n          init_,                                      \\\n          done_,                                      \\\n          copy_,                                      \\\n          transform_,                                 \\\n          bbox_,                                      \\\n          prepare_ )                                  \\\n  void                                                \\\n  FT_Init_Class_ ## class_( FT_Glyph_Class*  clazz )  \\\n  {                                                   \\\n    clazz->glyph_size      = size_;                   \\\n    clazz->glyph_format    = format_;                 \\\n    clazz->glyph_init      = init_;                   \\\n    clazz->glyph_done      = done_;                   \\\n    clazz->glyph_copy      = copy_;                   \\\n    clazz->glyph_transform = transform_;              \\\n    clazz->glyph_bbox      = bbox_;                   \\\n    clazz->glyph_prepare   = prepare_;                \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DECLARE_RENDERER                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to create a forward declaration of a                          */\n  /*    FT_Renderer_Class struct instance.                                 */\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DEFINE_RENDERER                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to initialize an instance of FT_Renderer_Class struct.        */\n  /*                                                                       */\n  /*    When FT_CONFIG_OPTION_PIC is defined a `create' funtion will need  */\n  /*    to be called with a pointer where the allocated structure is       */\n  /*    returned.  And when it is no longer needed a `destroy' function    */\n  /*    needs to be called to release that allocation.                     */\n  /*    `fcinit.c' (ft_create_default_module_classes) already contains     */\n  /*    a mechanism to call these functions for the default modules        */\n  /*    described in `ftmodule.h'.                                         */\n  /*                                                                       */\n  /*    Notice that the created `create' and `destroy' functions call      */\n  /*    `pic_init' and `pic_free' to allow you to manually allocate and    */\n  /*    initialize any additional global data, like a module specific      */\n  /*    interface, and put them in the global pic container defined in     */\n  /*    `ftpic.h'.  If you don't need them just implement the functions as */\n  /*    empty to resolve the link error.  Also the `pic_init' and          */\n  /*    `pic_free' functions should be declared in `pic.h', to be referred */\n  /*    by the renderer definition calling `FT_DEFINE_RENDERER' in the     */\n  /*    following.                                                         */\n  /*                                                                       */\n  /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */\n  /*    allocated in the global scope (or the scope where the macro        */\n  /*    is used).                                                          */\n  /*                                                                       */\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DECLARE_RENDERER( class_ )               \\\n  FT_EXPORT_VAR( const FT_Renderer_Class ) class_;\n\n#define FT_DEFINE_RENDERER(                  \\\n          class_,                            \\\n          flags_,                            \\\n          size_,                             \\\n          name_,                             \\\n          version_,                          \\\n          requires_,                         \\\n          interface_,                        \\\n          init_,                             \\\n          done_,                             \\\n          get_interface_,                    \\\n          glyph_format_,                     \\\n          render_glyph_,                     \\\n          transform_glyph_,                  \\\n          get_glyph_cbox_,                   \\\n          set_mode_,                         \\\n          raster_class_ )                    \\\n  FT_CALLBACK_TABLE_DEF                      \\\n  const FT_Renderer_Class  class_ =          \\\n  {                                          \\\n    FT_DEFINE_ROOT_MODULE( flags_,           \\\n                           size_,            \\\n                           name_,            \\\n                           version_,         \\\n                           requires_,        \\\n                           interface_,       \\\n                           init_,            \\\n                           done_,            \\\n                           get_interface_ )  \\\n    glyph_format_,                           \\\n                                             \\\n    render_glyph_,                           \\\n    transform_glyph_,                        \\\n    get_glyph_cbox_,                         \\\n    set_mode_,                               \\\n                                             \\\n    raster_class_                            \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DECLARE_RENDERER( class_ )  FT_DECLARE_MODULE( class_ )\n\n#define FT_DEFINE_RENDERER(                                      \\\n          class_,                                                \\\n          flags_,                                                \\\n          size_,                                                 \\\n          name_,                                                 \\\n          version_,                                              \\\n          requires_,                                             \\\n          interface_,                                            \\\n          init_,                                                 \\\n          done_,                                                 \\\n          get_interface_,                                        \\\n          glyph_format_,                                         \\\n          render_glyph_,                                         \\\n          transform_glyph_,                                      \\\n          get_glyph_cbox_,                                       \\\n          set_mode_,                                             \\\n          raster_class_ )                                        \\\n  void                                                           \\\n  FT_Destroy_Class_ ## class_( FT_Library        library,        \\\n                               FT_Module_Class*  clazz )         \\\n  {                                                              \\\n    FT_Renderer_Class*  rclazz = (FT_Renderer_Class*)clazz;      \\\n    FT_Memory           memory = library->memory;                \\\n                                                                 \\\n                                                                 \\\n    class_ ## _pic_free( library );                              \\\n    if ( rclazz )                                                \\\n      FT_FREE( rclazz );                                         \\\n  }                                                              \\\n                                                                 \\\n                                                                 \\\n  FT_Error                                                       \\\n  FT_Create_Class_ ## class_( FT_Library         library,        \\\n                              FT_Module_Class**  output_class )  \\\n  {                                                              \\\n    FT_Renderer_Class*  clazz = NULL;                            \\\n    FT_Error            error;                                   \\\n    FT_Memory           memory = library->memory;                \\\n                                                                 \\\n                                                                 \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) )                  \\\n      return error;                                              \\\n                                                                 \\\n    error = class_ ## _pic_init( library );                      \\\n    if ( error )                                                 \\\n    {                                                            \\\n      FT_FREE( clazz );                                          \\\n      return error;                                              \\\n    }                                                            \\\n                                                                 \\\n    FT_DEFINE_ROOT_MODULE( flags_,                               \\\n                           size_,                                \\\n                           name_,                                \\\n                           version_,                             \\\n                           requires_,                            \\\n                           interface_,                           \\\n                           init_,                                \\\n                           done_,                                \\\n                           get_interface_ )                      \\\n                                                                 \\\n    clazz->glyph_format    = glyph_format_;                      \\\n                                                                 \\\n    clazz->render_glyph    = render_glyph_;                      \\\n    clazz->transform_glyph = transform_glyph_;                   \\\n    clazz->get_glyph_cbox  = get_glyph_cbox_;                    \\\n    clazz->set_mode        = set_mode_;                          \\\n                                                                 \\\n    clazz->raster_class    = raster_class_;                      \\\n                                                                 \\\n    *output_class = (FT_Module_Class*)clazz;                     \\\n                                                                 \\\n    return FT_Err_Ok;                                            \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n  /* PIC support macros for ftmodapi.h **/\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Module_Creator                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to create (allocate) a new module class object.    */\n  /*    The object's members are initialized, but the module itself is     */\n  /*    not.                                                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory       :: A handle to the memory manager.                    */\n  /*    output_class :: Initialized with the newly allocated class.        */\n  /*                                                                       */\n  typedef FT_Error\n  (*FT_Module_Creator)( FT_Memory          memory,\n                        FT_Module_Class**  output_class );\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Module_Destroyer                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to destroy (deallocate) a module class object.     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory :: A handle to the memory manager.                          */\n  /*    clazz  :: Module class to destroy.                                 */\n  /*                                                                       */\n  typedef void\n  (*FT_Module_Destroyer)( FT_Memory         memory,\n                          FT_Module_Class*  clazz );\n\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DECLARE_MODULE                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to create a forward declaration of a                          */\n  /*    FT_Module_Class struct instance.                                   */\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DEFINE_MODULE                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to initialize an instance of an FT_Module_Class struct.       */\n  /*                                                                       */\n  /*    When FT_CONFIG_OPTION_PIC is defined a `create' funtion needs to   */\n  /*    be called with a pointer where the allocated structure is          */\n  /*    returned.  And when it is no longer needed a `destroy' function    */\n  /*    needs to be called to release that allocation.                     */\n  /*    `fcinit.c' (ft_create_default_module_classes) already contains     */\n  /*    a mechanism to call these functions for the default modules        */\n  /*    described in `ftmodule.h'.                                         */\n  /*                                                                       */\n  /*    Notice that the created `create' and `destroy' functions call      */\n  /*    `pic_init' and `pic_free' to allow you to manually allocate and    */\n  /*    initialize any additional global data, like a module specific      */\n  /*    interface, and put them in the global pic container defined in     */\n  /*    `ftpic.h'.  If you don't need them just implement the functions as */\n  /*    empty to resolve the link error.  Also the `pic_init' and          */\n  /*    `pic_free' functions should be declared in `pic.h', to be referred */\n  /*    by the module definition calling `FT_DEFINE_MODULE' in the         */\n  /*    following.                                                         */\n  /*                                                                       */\n  /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */\n  /*    allocated in the global scope (or the scope where the macro        */\n  /*    is used).                                                          */\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DEFINE_ROOT_MODULE                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to initialize an instance of an FT_Module_Class struct inside */\n  /*    another struct that contains it or in a function that initializes  */\n  /*    that containing struct.                                            */\n  /*                                                                       */\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DECLARE_MODULE( class_ )  \\\n  FT_CALLBACK_TABLE                  \\\n  const FT_Module_Class  class_;\n\n#define FT_DEFINE_ROOT_MODULE(  \\\n          flags_,               \\\n          size_,                \\\n          name_,                \\\n          version_,             \\\n          requires_,            \\\n          interface_,           \\\n          init_,                \\\n          done_,                \\\n          get_interface_ )      \\\n  {                             \\\n    flags_,                     \\\n    size_,                      \\\n                                \\\n    name_,                      \\\n    version_,                   \\\n    requires_,                  \\\n                                \\\n    interface_,                 \\\n                                \\\n    init_,                      \\\n    done_,                      \\\n    get_interface_,             \\\n  },\n\n#define FT_DEFINE_MODULE(         \\\n          class_,                 \\\n          flags_,                 \\\n          size_,                  \\\n          name_,                  \\\n          version_,               \\\n          requires_,              \\\n          interface_,             \\\n          init_,                  \\\n          done_,                  \\\n          get_interface_ )        \\\n  FT_CALLBACK_TABLE_DEF           \\\n  const FT_Module_Class class_ =  \\\n  {                               \\\n    flags_,                       \\\n    size_,                        \\\n                                  \\\n    name_,                        \\\n    version_,                     \\\n    requires_,                    \\\n                                  \\\n    interface_,                   \\\n                                  \\\n    init_,                        \\\n    done_,                        \\\n    get_interface_,               \\\n  };\n\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DECLARE_MODULE( class_ )                               \\\n  FT_Error                                                        \\\n  FT_Create_Class_ ## class_( FT_Library         library,         \\\n                              FT_Module_Class**  output_class );  \\\n  void                                                            \\\n  FT_Destroy_Class_ ## class_( FT_Library        library,         \\\n                               FT_Module_Class*  clazz );\n\n#define FT_DEFINE_ROOT_MODULE(                      \\\n          flags_,                                   \\\n          size_,                                    \\\n          name_,                                    \\\n          version_,                                 \\\n          requires_,                                \\\n          interface_,                               \\\n          init_,                                    \\\n          done_,                                    \\\n          get_interface_ )                          \\\n    clazz->root.module_flags     = flags_;          \\\n    clazz->root.module_size      = size_;           \\\n    clazz->root.module_name      = name_;           \\\n    clazz->root.module_version   = version_;        \\\n    clazz->root.module_requires  = requires_;       \\\n                                                    \\\n    clazz->root.module_interface = interface_;      \\\n                                                    \\\n    clazz->root.module_init      = init_;           \\\n    clazz->root.module_done      = done_;           \\\n    clazz->root.get_interface    = get_interface_;\n\n#define FT_DEFINE_MODULE(                                        \\\n          class_,                                                \\\n          flags_,                                                \\\n          size_,                                                 \\\n          name_,                                                 \\\n          version_,                                              \\\n          requires_,                                             \\\n          interface_,                                            \\\n          init_,                                                 \\\n          done_,                                                 \\\n          get_interface_ )                                       \\\n  void                                                           \\\n  FT_Destroy_Class_ ## class_( FT_Library        library,        \\\n                               FT_Module_Class*  clazz )         \\\n  {                                                              \\\n    FT_Memory memory = library->memory;                          \\\n                                                                 \\\n                                                                 \\\n    class_ ## _pic_free( library );                              \\\n    if ( clazz )                                                 \\\n      FT_FREE( clazz );                                          \\\n  }                                                              \\\n                                                                 \\\n                                                                 \\\n  FT_Error                                                       \\\n  FT_Create_Class_ ## class_( FT_Library         library,        \\\n                              FT_Module_Class**  output_class )  \\\n  {                                                              \\\n    FT_Memory         memory = library->memory;                  \\\n    FT_Module_Class*  clazz  = NULL;                             \\\n    FT_Error          error;                                     \\\n                                                                 \\\n                                                                 \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) )                  \\\n      return error;                                              \\\n    error = class_ ## _pic_init( library );                      \\\n    if ( error )                                                 \\\n    {                                                            \\\n      FT_FREE( clazz );                                          \\\n      return error;                                              \\\n    }                                                            \\\n                                                                 \\\n    clazz->module_flags     = flags_;                            \\\n    clazz->module_size      = size_;                             \\\n    clazz->module_name      = name_;                             \\\n    clazz->module_version   = version_;                          \\\n    clazz->module_requires  = requires_;                         \\\n                                                                 \\\n    clazz->module_interface = interface_;                        \\\n                                                                 \\\n    clazz->module_init      = init_;                             \\\n    clazz->module_done      = done_;                             \\\n    clazz->get_interface    = get_interface_;                    \\\n                                                                 \\\n    *output_class = clazz;                                       \\\n                                                                 \\\n    return FT_Err_Ok;                                            \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\nFT_END_HEADER\n\n#endif /* __FTOBJS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftpic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftpic.h                                                                */\n/*                                                                         */\n/*    The FreeType position independent code services (declaration).       */\n/*                                                                         */\n/*  Copyright 2009, 2012 by                                                */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  Modules that ordinarily have const global data that need address     */\n  /*  can instead define pointers here.                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTPIC_H__\n#define __FTPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  typedef struct  FT_PIC_Container_\n  {\n    /* pic containers for base */\n    void*  base;\n\n    /* pic containers for modules */\n    void*  autofit;\n    void*  cff;\n    void*  pshinter;\n    void*  psnames;\n    void*  raster;\n    void*  sfnt;\n    void*  smooth;\n    void*  truetype;\n\n  } FT_PIC_Container;\n\n\n  /* Initialize the various function tables, structs, etc. */\n  /* stored in the container.                              */\n  FT_BASE( FT_Error )\n  ft_pic_container_init( FT_Library  library );\n\n\n  /* Destroy the contents of the container. */\n  FT_BASE( void )\n  ft_pic_container_destroy( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FTPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftrfork.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftrfork.h                                                              */\n/*                                                                         */\n/*    Embedded resource forks accessor (specification).                    */\n/*                                                                         */\n/*  Copyright 2004, 2006, 2007, 2012, 2013 by                              */\n/*  Masatake YAMATO and Redhat K.K.                                        */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/* Development of the code in this file is support of                      */\n/* Information-technology Promotion Agency, Japan.                         */\n/***************************************************************************/\n\n\n#ifndef __FTRFORK_H__\n#define __FTRFORK_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n\n\nFT_BEGIN_HEADER\n\n\n  /* Number of guessing rules supported in `FT_Raccess_Guess'.            */\n  /* Don't forget to increment the number if you add a new guessing rule. */\n#define FT_RACCESS_N_RULES  9\n\n\n  /* A structure to describe a reference in a resource by its resource ID */\n  /* and internal offset.  The `POST' resource expects to be concatenated */\n  /* by the order of resource IDs instead of its appearance in the file.  */\n\n  typedef struct  FT_RFork_Ref_\n  {\n    FT_UShort  res_id;\n    FT_ULong   offset;\n\n  } FT_RFork_Ref;\n\n#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n  typedef FT_Error\n  (*ft_raccess_guess_func)( FT_Library  library,\n                            FT_Stream   stream,\n                            char       *base_file_name,\n                            char      **result_file_name,\n                            FT_Long    *result_offset );\n\n  typedef enum  FT_RFork_Rule_ {\n    FT_RFork_Rule_invalid = -2,\n    FT_RFork_Rule_uknown, /* -1 */\n    FT_RFork_Rule_apple_double,\n    FT_RFork_Rule_apple_single,\n    FT_RFork_Rule_darwin_ufs_export,\n    FT_RFork_Rule_darwin_newvfs,\n    FT_RFork_Rule_darwin_hfsplus,\n    FT_RFork_Rule_vfat,\n    FT_RFork_Rule_linux_cap,\n    FT_RFork_Rule_linux_double,\n    FT_RFork_Rule_linux_netatalk\n  } FT_RFork_Rule;\n\n  /* For fast translation between rule index and rule type,\n   * the macros FT_RFORK_xxx should be kept consistent with\n   * the raccess_guess_funcs table\n   */\n  typedef struct ft_raccess_guess_rec_ {\n    ft_raccess_guess_func  func;\n    FT_RFork_Rule          type;\n  } ft_raccess_guess_rec;\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n  /* this array is a storage in non-PIC mode, so ; is needed in END */\n#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type )  \\\n          const type name[] = {\n#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix )  \\\n          { raccess_guess_ ## func_suffix,                           \\\n            FT_RFork_Rule_ ## type_suffix },\n#define CONST_FT_RFORK_RULE_ARRAY_END  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n  /* this array is a function in PIC mode, so no ; is needed in END */\n#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type )  \\\n          void                                         \\\n          FT_Init_Table_ ## name( type*  storage )     \\\n          {                                            \\\n            type*  local = storage;                    \\\n                                                       \\\n                                                       \\\n            int  i = 0;\n#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix )  \\\n          local[i].func = raccess_guess_ ## func_suffix;             \\\n          local[i].type = FT_RFork_Rule_ ## type_suffix;             \\\n          i++;\n#define CONST_FT_RFORK_RULE_ARRAY_END  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Raccess_Guess                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Guess a file name and offset where the actual resource fork is     */\n  /*    stored.  The macro FT_RACCESS_N_RULES holds the number of          */\n  /*    guessing rules;  the guessed result for the Nth rule is            */\n  /*    represented as a triplet: a new file name (new_names[N]), a file   */\n  /*    offset (offsets[N]), and an error code (errors[N]).                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library ::                                                         */\n  /*      A FreeType library instance.                                     */\n  /*                                                                       */\n  /*    stream ::                                                          */\n  /*      A file stream containing the resource fork.                      */\n  /*                                                                       */\n  /*    base_name ::                                                       */\n  /*      The (base) file name of the resource fork used for some          */\n  /*      guessing rules.                                                  */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    new_names ::                                                       */\n  /*      An array of guessed file names in which the resource forks may   */\n  /*      exist.  If `new_names[N]' is NULL, the guessed file name is      */\n  /*      equal to `base_name'.                                            */\n  /*                                                                       */\n  /*    offsets ::                                                         */\n  /*      An array of guessed file offsets.  `offsets[N]' holds the file   */\n  /*      offset of the possible start of the resource fork in file        */\n  /*      `new_names[N]'.                                                  */\n  /*                                                                       */\n  /*    errors ::                                                          */\n  /*      An array of FreeType error codes.  `errors[N]' is the error      */\n  /*      code of Nth guessing rule function.  If `errors[N]' is not       */\n  /*      FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless.      */\n  /*                                                                       */\n  FT_BASE( void )\n  FT_Raccess_Guess( FT_Library  library,\n                    FT_Stream   stream,\n                    char*       base_name,\n                    char**      new_names,\n                    FT_Long*    offsets,\n                    FT_Error*   errors );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Raccess_Get_HeaderInfo                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Get the information from the header of resource fork.  The         */\n  /*    information includes the file offset where the resource map        */\n  /*    starts, and the file offset where the resource data starts.        */\n  /*    `FT_Raccess_Get_DataOffsets' requires these two data.              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library ::                                                         */\n  /*      A FreeType library instance.                                     */\n  /*                                                                       */\n  /*    stream ::                                                          */\n  /*      A file stream containing the resource fork.                      */\n  /*                                                                       */\n  /*    rfork_offset ::                                                    */\n  /*      The file offset where the resource fork starts.                  */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    map_offset ::                                                      */\n  /*      The file offset where the resource map starts.                   */\n  /*                                                                       */\n  /*    rdata_pos ::                                                       */\n  /*      The file offset where the resource data starts.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  FT_Err_Ok means success.                     */\n  /*                                                                       */\n  FT_BASE( FT_Error )\n  FT_Raccess_Get_HeaderInfo( FT_Library  library,\n                             FT_Stream   stream,\n                             FT_Long     rfork_offset,\n                             FT_Long    *map_offset,\n                             FT_Long    *rdata_pos );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Raccess_Get_DataOffsets                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Get the data offsets for a tag in a resource fork.  Offsets are    */\n  /*    stored in an array because, in some cases, resources in a resource */\n  /*    fork have the same tag.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library ::                                                         */\n  /*      A FreeType library instance.                                     */\n  /*                                                                       */\n  /*    stream ::                                                          */\n  /*      A file stream containing the resource fork.                      */\n  /*                                                                       */\n  /*    map_offset ::                                                      */\n  /*      The file offset where the resource map starts.                   */\n  /*                                                                       */\n  /*    rdata_pos ::                                                       */\n  /*      The file offset where the resource data starts.                  */\n  /*                                                                       */\n  /*    tag ::                                                             */\n  /*      The resource tag.                                                */\n  /*                                                                       */\n  /*    sort_by_res_id ::                                                  */\n  /*      A Boolean to sort the fragmented resource by their ids.          */\n  /*      The fragmented resources for `POST' resource should be sorted    */\n  /*      to restore Type1 font properly.  For `snft' resources, sorting   */\n  /*      may induce a different order of the faces in comparison to that  */\n  /*      by QuickDraw API.                                                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    offsets ::                                                         */\n  /*      The stream offsets for the resource data specified by `tag'.     */\n  /*      This array is allocated by the function, so you have to call     */\n  /*      @ft_mem_free after use.                                          */\n  /*                                                                       */\n  /*    count ::                                                           */\n  /*      The length of offsets array.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  FT_Err_Ok means success.                     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Normally you should use `FT_Raccess_Get_HeaderInfo' to get the     */\n  /*    value for `map_offset' and `rdata_pos'.                            */\n  /*                                                                       */\n  FT_BASE( FT_Error )\n  FT_Raccess_Get_DataOffsets( FT_Library  library,\n                              FT_Stream   stream,\n                              FT_Long     map_offset,\n                              FT_Long     rdata_pos,\n                              FT_Long     tag,\n                              FT_Bool     sort_by_res_id,\n                              FT_Long   **offsets,\n                              FT_Long    *count );\n\n\nFT_END_HEADER\n\n#endif /* __FTRFORK_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftserv.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftserv.h                                                               */\n/*                                                                         */\n/*    The FreeType services (specification only).                          */\n/*                                                                         */\n/*  Copyright 2003-2007, 2009, 2012, 2013 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  Each module can export one or more `services'.  Each service is      */\n  /*  identified by a constant string and modeled by a pointer; the latter */\n  /*  generally corresponds to a structure containing function pointers.   */\n  /*                                                                       */\n  /*  Note that a service's data cannot be a mere function pointer because */\n  /*  in C it is possible that function pointers might be implemented      */\n  /*  differently than data pointers (e.g. 48 bits instead of 32).         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTSERV_H__\n#define __FTSERV_H__\n\n\nFT_BEGIN_HEADER\n\n  /*\n   * @macro:\n   *   FT_FACE_FIND_SERVICE\n   *\n   * @description:\n   *   This macro is used to look up a service from a face's driver module.\n   *\n   * @input:\n   *   face ::\n   *     The source face handle.\n   *\n   *   id ::\n   *     A string describing the service as defined in the service's\n   *     header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to\n   *     `multi-masters').  It is automatically prefixed with\n   *     `FT_SERVICE_ID_'.\n   *\n   * @output:\n   *   ptr ::\n   *     A variable that receives the service pointer.  Will be NULL\n   *     if not found.\n   */\n#ifdef __cplusplus\n\n#define FT_FACE_FIND_SERVICE( face, ptr, id )                               \\\n  FT_BEGIN_STMNT                                                            \\\n    FT_Module    module = FT_MODULE( FT_FACE( face )->driver );             \\\n    FT_Pointer   _tmp_  = NULL;                                             \\\n    FT_Pointer*  _pptr_ = (FT_Pointer*)&(ptr);                              \\\n                                                                            \\\n                                                                            \\\n    if ( module->clazz->get_interface )                                     \\\n      _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \\\n    *_pptr_ = _tmp_;                                                        \\\n  FT_END_STMNT\n\n#else /* !C++ */\n\n#define FT_FACE_FIND_SERVICE( face, ptr, id )                               \\\n  FT_BEGIN_STMNT                                                            \\\n    FT_Module   module = FT_MODULE( FT_FACE( face )->driver );              \\\n    FT_Pointer  _tmp_  = NULL;                                              \\\n                                                                            \\\n    if ( module->clazz->get_interface )                                     \\\n      _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \\\n    ptr = _tmp_;                                                            \\\n  FT_END_STMNT\n\n#endif /* !C++ */\n\n\n  /*\n   * @macro:\n   *   FT_FACE_FIND_GLOBAL_SERVICE\n   *\n   * @description:\n   *   This macro is used to look up a service from all modules.\n   *\n   * @input:\n   *   face ::\n   *     The source face handle.\n   *\n   *   id ::\n   *     A string describing the service as defined in the service's\n   *     header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to\n   *     `multi-masters').  It is automatically prefixed with\n   *     `FT_SERVICE_ID_'.\n   *\n   * @output:\n   *   ptr ::\n   *     A variable that receives the service pointer.  Will be NULL\n   *     if not found.\n   */\n#ifdef __cplusplus\n\n#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \\\n  FT_BEGIN_STMNT                                                   \\\n    FT_Module    module = FT_MODULE( FT_FACE( face )->driver );    \\\n    FT_Pointer   _tmp_;                                            \\\n    FT_Pointer*  _pptr_ = (FT_Pointer*)&(ptr);                     \\\n                                                                   \\\n                                                                   \\\n    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \\\n    *_pptr_ = _tmp_;                                               \\\n  FT_END_STMNT\n\n#else /* !C++ */\n\n#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \\\n  FT_BEGIN_STMNT                                                   \\\n    FT_Module   module = FT_MODULE( FT_FACE( face )->driver );     \\\n    FT_Pointer  _tmp_;                                             \\\n                                                                   \\\n                                                                   \\\n    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \\\n    ptr   = _tmp_;                                                 \\\n  FT_END_STMNT\n\n#endif /* !C++ */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****         S E R V I C E   D E S C R I P T O R S                 *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n   *  The following structure is used to _describe_ a given service\n   *  to the library.  This is useful to build simple static service lists.\n   */\n  typedef struct  FT_ServiceDescRec_\n  {\n    const char*  serv_id;     /* service name         */\n    const void*  serv_data;   /* service pointer/data */\n\n  } FT_ServiceDescRec;\n\n  typedef const FT_ServiceDescRec*  FT_ServiceDesc;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_DEFINE_SERVICEDESCREC1                                          */\n  /*    FT_DEFINE_SERVICEDESCREC2                                          */\n  /*    FT_DEFINE_SERVICEDESCREC3                                          */\n  /*    FT_DEFINE_SERVICEDESCREC4                                          */\n  /*    FT_DEFINE_SERVICEDESCREC5                                          */\n  /*    FT_DEFINE_SERVICEDESCREC6                                          */\n  /*    FT_DEFINE_SERVICEDESCREC7                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Used to initialize an array of FT_ServiceDescRec structures.       */\n  /*                                                                       */\n  /*    When FT_CONFIG_OPTION_PIC is defined a `create' function needs to  */\n  /*    be called with a pointer to return an allocated array.  As soon as */\n  /*    it is no longer needed, a `destroy' function needs to be called to */\n  /*    release that allocation.                                           */\n  /*                                                                       */\n  /*    These functions should be manually called from the `pic_init' and  */\n  /*    `pic_free' functions of your module (see FT_DEFINE_MODULE).        */\n  /*                                                                       */\n  /*    When FT_CONFIG_OPTION_PIC is not defined the array will be         */\n  /*    allocated in the global scope (or the scope where the macro is     */\n  /*    used).                                                             */\n  /*                                                                       */\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICEDESCREC1( class_,                                  \\\n                                   serv_id_1, serv_data_1 )                 \\\n  static const FT_ServiceDescRec  class_[] =                                \\\n  {                                                                         \\\n    { serv_id_1, serv_data_1 },                                             \\\n    { NULL, NULL }                                                          \\\n  };\n\n#define FT_DEFINE_SERVICEDESCREC2( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2 )                 \\\n  static const FT_ServiceDescRec  class_[] =                                \\\n  {                                                                         \\\n    { serv_id_1, serv_data_1 },                                             \\\n    { serv_id_2, serv_data_2 },                                             \\\n    { NULL, NULL }                                                          \\\n  };\n\n#define FT_DEFINE_SERVICEDESCREC3( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3 )                 \\\n  static const FT_ServiceDescRec  class_[] =                                \\\n  {                                                                         \\\n    { serv_id_1, serv_data_1 },                                             \\\n    { serv_id_2, serv_data_2 },                                             \\\n    { serv_id_3, serv_data_3 },                                             \\\n    { NULL, NULL }                                                          \\\n  };\n\n#define FT_DEFINE_SERVICEDESCREC4( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3,                  \\\n                                   serv_id_4, serv_data_4 )                 \\\n  static const FT_ServiceDescRec  class_[] =                                \\\n  {                                                                         \\\n    { serv_id_1, serv_data_1 },                                             \\\n    { serv_id_2, serv_data_2 },                                             \\\n    { serv_id_3, serv_data_3 },                                             \\\n    { serv_id_4, serv_data_4 },                                             \\\n    { NULL, NULL }                                                          \\\n  };\n\n#define FT_DEFINE_SERVICEDESCREC5( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3,                  \\\n                                   serv_id_4, serv_data_4,                  \\\n                                   serv_id_5, serv_data_5 )                 \\\n  static const FT_ServiceDescRec  class_[] =                                \\\n  {                                                                         \\\n    { serv_id_1, serv_data_1 },                                             \\\n    { serv_id_2, serv_data_2 },                                             \\\n    { serv_id_3, serv_data_3 },                                             \\\n    { serv_id_4, serv_data_4 },                                             \\\n    { serv_id_5, serv_data_5 },                                             \\\n    { NULL, NULL }                                                          \\\n  };\n\n#define FT_DEFINE_SERVICEDESCREC6( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3,                  \\\n                                   serv_id_4, serv_data_4,                  \\\n                                   serv_id_5, serv_data_5,                  \\\n                                   serv_id_6, serv_data_6 )                 \\\n  static const FT_ServiceDescRec  class_[] =                                \\\n  {                                                                         \\\n    { serv_id_1, serv_data_1 },                                             \\\n    { serv_id_2, serv_data_2 },                                             \\\n    { serv_id_3, serv_data_3 },                                             \\\n    { serv_id_4, serv_data_4 },                                             \\\n    { serv_id_5, serv_data_5 },                                             \\\n    { serv_id_6, serv_data_6 },                                             \\\n    { NULL, NULL }                                                          \\\n  };\n\n#define FT_DEFINE_SERVICEDESCREC7( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3,                  \\\n                                   serv_id_4, serv_data_4,                  \\\n                                   serv_id_5, serv_data_5,                  \\\n                                   serv_id_6, serv_data_6,                  \\\n                                   serv_id_7, serv_data_7 )                 \\\n  static const FT_ServiceDescRec  class_[] =                                \\\n  {                                                                         \\\n    { serv_id_1, serv_data_1 },                                             \\\n    { serv_id_2, serv_data_2 },                                             \\\n    { serv_id_3, serv_data_3 },                                             \\\n    { serv_id_4, serv_data_4 },                                             \\\n    { serv_id_5, serv_data_5 },                                             \\\n    { serv_id_6, serv_data_6 },                                             \\\n    { serv_id_7, serv_data_7 },                                             \\\n    { NULL, NULL }                                                          \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICEDESCREC1( class_,                                  \\\n                                   serv_id_1, serv_data_1 )                 \\\n  void                                                                      \\\n  FT_Destroy_Class_ ## class_( FT_Library          library,                 \\\n                               FT_ServiceDescRec*  clazz )                  \\\n  {                                                                         \\\n    FT_Memory  memory = library->memory;                                    \\\n                                                                            \\\n                                                                            \\\n    if ( clazz )                                                            \\\n      FT_FREE( clazz );                                                     \\\n  }                                                                         \\\n                                                                            \\\n  FT_Error                                                                  \\\n  FT_Create_Class_ ## class_( FT_Library           library,                 \\\n                              FT_ServiceDescRec**  output_class )           \\\n  {                                                                         \\\n    FT_ServiceDescRec*  clazz  = NULL;                                      \\\n    FT_Error            error;                                              \\\n    FT_Memory           memory = library->memory;                           \\\n                                                                            \\\n                                                                            \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 2 ) )                         \\\n      return error;                                                         \\\n                                                                            \\\n    clazz[0].serv_id   = serv_id_1;                                         \\\n    clazz[0].serv_data = serv_data_1;                                       \\\n    clazz[1].serv_id   = NULL;                                              \\\n    clazz[1].serv_data = NULL;                                              \\\n                                                                            \\\n    *output_class = clazz;                                                  \\\n                                                                            \\\n    return FT_Err_Ok;                                                       \\\n  }\n\n#define FT_DEFINE_SERVICEDESCREC2( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2 )                 \\\n  void                                                                      \\\n  FT_Destroy_Class_ ## class_( FT_Library          library,                 \\\n                               FT_ServiceDescRec*  clazz )                  \\\n  {                                                                         \\\n    FT_Memory  memory = library->memory;                                    \\\n                                                                            \\\n                                                                            \\\n    if ( clazz )                                                            \\\n      FT_FREE( clazz );                                                     \\\n  }                                                                         \\\n                                                                            \\\n  FT_Error                                                                  \\\n  FT_Create_Class_ ## class_( FT_Library           library,                 \\\n                              FT_ServiceDescRec**  output_class )           \\\n  {                                                                         \\\n    FT_ServiceDescRec*  clazz  = NULL;                                      \\\n    FT_Error            error;                                              \\\n    FT_Memory           memory = library->memory;                           \\\n                                                                            \\\n                                                                            \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 3 ) )                         \\\n      return error;                                                         \\\n                                                                            \\\n    clazz[0].serv_id   = serv_id_1;                                         \\\n    clazz[0].serv_data = serv_data_1;                                       \\\n    clazz[1].serv_id   = serv_id_2;                                         \\\n    clazz[1].serv_data = serv_data_2;                                       \\\n    clazz[2].serv_id   = NULL;                                              \\\n    clazz[2].serv_data = NULL;                                              \\\n                                                                            \\\n    *output_class = clazz;                                                  \\\n                                                                            \\\n    return FT_Err_Ok;                                                       \\\n  }\n\n#define FT_DEFINE_SERVICEDESCREC3( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3 )                 \\\n  void                                                                      \\\n  FT_Destroy_Class_ ## class_( FT_Library          library,                 \\\n                               FT_ServiceDescRec*  clazz )                  \\\n  {                                                                         \\\n    FT_Memory  memory = library->memory;                                    \\\n                                                                            \\\n                                                                            \\\n    if ( clazz )                                                            \\\n      FT_FREE( clazz );                                                     \\\n  }                                                                         \\\n                                                                            \\\n  FT_Error                                                                  \\\n  FT_Create_Class_ ## class_( FT_Library           library,                 \\\n                              FT_ServiceDescRec**  output_class )           \\\n  {                                                                         \\\n    FT_ServiceDescRec*  clazz  = NULL;                                      \\\n    FT_Error            error;                                              \\\n    FT_Memory           memory = library->memory;                           \\\n                                                                            \\\n                                                                            \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 4 ) )                         \\\n      return error;                                                         \\\n                                                                            \\\n    clazz[0].serv_id   = serv_id_1;                                         \\\n    clazz[0].serv_data = serv_data_1;                                       \\\n    clazz[1].serv_id   = serv_id_2;                                         \\\n    clazz[1].serv_data = serv_data_2;                                       \\\n    clazz[2].serv_id   = serv_id_3;                                         \\\n    clazz[2].serv_data = serv_data_3;                                       \\\n    clazz[3].serv_id   = NULL;                                              \\\n    clazz[3].serv_data = NULL;                                              \\\n                                                                            \\\n    *output_class = clazz;                                                  \\\n                                                                            \\\n    return FT_Err_Ok;                                                       \\\n  }\n\n#define FT_DEFINE_SERVICEDESCREC4( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3,                  \\\n                                   serv_id_4, serv_data_4 )                 \\\n  void                                                                      \\\n  FT_Destroy_Class_ ## class_( FT_Library          library,                 \\\n                               FT_ServiceDescRec*  clazz )                  \\\n  {                                                                         \\\n    FT_Memory  memory = library->memory;                                    \\\n                                                                            \\\n                                                                            \\\n    if ( clazz )                                                            \\\n      FT_FREE( clazz );                                                     \\\n  }                                                                         \\\n                                                                            \\\n  FT_Error                                                                  \\\n  FT_Create_Class_ ## class_( FT_Library           library,                 \\\n                              FT_ServiceDescRec**  output_class )           \\\n  {                                                                         \\\n    FT_ServiceDescRec*  clazz  = NULL;                                      \\\n    FT_Error            error;                                              \\\n    FT_Memory           memory = library->memory;                           \\\n                                                                            \\\n                                                                            \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 5 ) )                         \\\n      return error;                                                         \\\n                                                                            \\\n    clazz[0].serv_id   = serv_id_1;                                         \\\n    clazz[0].serv_data = serv_data_1;                                       \\\n    clazz[1].serv_id   = serv_id_2;                                         \\\n    clazz[1].serv_data = serv_data_2;                                       \\\n    clazz[2].serv_id   = serv_id_3;                                         \\\n    clazz[2].serv_data = serv_data_3;                                       \\\n    clazz[3].serv_id   = serv_id_4;                                         \\\n    clazz[3].serv_data = serv_data_4;                                       \\\n    clazz[4].serv_id   = NULL;                                              \\\n    clazz[4].serv_data = NULL;                                              \\\n                                                                            \\\n    *output_class = clazz;                                                  \\\n                                                                            \\\n    return FT_Err_Ok;                                                       \\\n  }\n\n#define FT_DEFINE_SERVICEDESCREC5( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3,                  \\\n                                   serv_id_4, serv_data_4,                  \\\n                                   serv_id_5, serv_data_5 )                 \\\n  void                                                                      \\\n  FT_Destroy_Class_ ## class_( FT_Library          library,                 \\\n                               FT_ServiceDescRec*  clazz )                  \\\n  {                                                                         \\\n    FT_Memory  memory = library->memory;                                    \\\n                                                                            \\\n                                                                            \\\n    if ( clazz )                                                            \\\n      FT_FREE( clazz );                                                     \\\n  }                                                                         \\\n                                                                            \\\n  FT_Error                                                                  \\\n  FT_Create_Class_ ## class_( FT_Library           library,                 \\\n                              FT_ServiceDescRec**  output_class )           \\\n  {                                                                         \\\n    FT_ServiceDescRec*  clazz  = NULL;                                      \\\n    FT_Error            error;                                              \\\n    FT_Memory           memory = library->memory;                           \\\n                                                                            \\\n                                                                            \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 6 ) )                         \\\n      return error;                                                         \\\n                                                                            \\\n    clazz[0].serv_id   = serv_id_1;                                         \\\n    clazz[0].serv_data = serv_data_1;                                       \\\n    clazz[1].serv_id   = serv_id_2;                                         \\\n    clazz[1].serv_data = serv_data_2;                                       \\\n    clazz[2].serv_id   = serv_id_3;                                         \\\n    clazz[2].serv_data = serv_data_3;                                       \\\n    clazz[3].serv_id   = serv_id_4;                                         \\\n    clazz[3].serv_data = serv_data_4;                                       \\\n    clazz[4].serv_id   = serv_id_5;                                         \\\n    clazz[4].serv_data = serv_data_5;                                       \\\n    clazz[5].serv_id   = NULL;                                              \\\n    clazz[5].serv_data = NULL;                                              \\\n                                                                            \\\n    *output_class = clazz;                                                  \\\n                                                                            \\\n    return FT_Err_Ok;                                                       \\\n  }\n\n#define FT_DEFINE_SERVICEDESCREC6( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3,                  \\\n                                   serv_id_4, serv_data_4,                  \\\n                                   serv_id_5, serv_data_5,                  \\\n                                   serv_id_6, serv_data_6 )                 \\\n  void                                                                      \\\n  FT_Destroy_Class_ ## class_( FT_Library          library,                 \\\n                               FT_ServiceDescRec*  clazz )                  \\\n  {                                                                         \\\n    FT_Memory  memory = library->memory;                                    \\\n                                                                            \\\n                                                                            \\\n    if ( clazz )                                                            \\\n      FT_FREE( clazz );                                                     \\\n  }                                                                         \\\n                                                                            \\\n  FT_Error                                                                  \\\n  FT_Create_Class_ ## class_( FT_Library           library,                 \\\n                              FT_ServiceDescRec**  output_class)            \\\n  {                                                                         \\\n    FT_ServiceDescRec*  clazz  = NULL;                                      \\\n    FT_Error            error;                                              \\\n    FT_Memory           memory = library->memory;                           \\\n                                                                            \\\n                                                                            \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 7 ) )                         \\\n      return error;                                                         \\\n                                                                            \\\n    clazz[0].serv_id   = serv_id_1;                                         \\\n    clazz[0].serv_data = serv_data_1;                                       \\\n    clazz[1].serv_id   = serv_id_2;                                         \\\n    clazz[1].serv_data = serv_data_2;                                       \\\n    clazz[2].serv_id   = serv_id_3;                                         \\\n    clazz[2].serv_data = serv_data_3;                                       \\\n    clazz[3].serv_id   = serv_id_4;                                         \\\n    clazz[3].serv_data = serv_data_4;                                       \\\n    clazz[4].serv_id   = serv_id_5;                                         \\\n    clazz[4].serv_data = serv_data_5;                                       \\\n    clazz[5].serv_id   = serv_id_6;                                         \\\n    clazz[5].serv_data = serv_data_6;                                       \\\n    clazz[6].serv_id   = NULL;                                              \\\n    clazz[6].serv_data = NULL;                                              \\\n                                                                            \\\n    *output_class = clazz;                                                  \\\n                                                                            \\\n    return FT_Err_Ok;                                                       \\\n  }\n\n#define FT_DEFINE_SERVICEDESCREC7( class_,                                  \\\n                                   serv_id_1, serv_data_1,                  \\\n                                   serv_id_2, serv_data_2,                  \\\n                                   serv_id_3, serv_data_3,                  \\\n                                   serv_id_4, serv_data_4,                  \\\n                                   serv_id_5, serv_data_5,                  \\\n                                   serv_id_6, serv_data_6,                  \\\n                                   serv_id_7, serv_data_7 )                 \\\n  void                                                                      \\\n  FT_Destroy_Class_ ## class_( FT_Library          library,                 \\\n                               FT_ServiceDescRec*  clazz )                  \\\n  {                                                                         \\\n    FT_Memory  memory = library->memory;                                    \\\n                                                                            \\\n                                                                            \\\n    if ( clazz )                                                            \\\n      FT_FREE( clazz );                                                     \\\n  }                                                                         \\\n                                                                            \\\n  FT_Error                                                                  \\\n  FT_Create_Class_ ## class_( FT_Library           library,                 \\\n                              FT_ServiceDescRec**  output_class)            \\\n  {                                                                         \\\n    FT_ServiceDescRec*  clazz  = NULL;                                      \\\n    FT_Error            error;                                              \\\n    FT_Memory           memory = library->memory;                           \\\n                                                                            \\\n                                                                            \\\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 8 ) )                         \\\n      return error;                                                         \\\n                                                                            \\\n    clazz[0].serv_id   = serv_id_1;                                         \\\n    clazz[0].serv_data = serv_data_1;                                       \\\n    clazz[1].serv_id   = serv_id_2;                                         \\\n    clazz[1].serv_data = serv_data_2;                                       \\\n    clazz[2].serv_id   = serv_id_3;                                         \\\n    clazz[2].serv_data = serv_data_3;                                       \\\n    clazz[3].serv_id   = serv_id_4;                                         \\\n    clazz[3].serv_data = serv_data_4;                                       \\\n    clazz[4].serv_id   = serv_id_5;                                         \\\n    clazz[4].serv_data = serv_data_5;                                       \\\n    clazz[5].serv_id   = serv_id_6;                                         \\\n    clazz[5].serv_data = serv_data_6;                                       \\\n    clazz[6].serv_id   = serv_id_7;                                         \\\n    clazz[6].serv_data = serv_data_7;                                       \\\n    clazz[7].serv_id   = NULL;                                              \\\n    clazz[7].serv_data = NULL;                                              \\\n                                                                            \\\n    *output_class = clazz;                                                  \\\n                                                                            \\\n    return FT_Err_Ok;                                                       \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n  /*\n   *  Parse a list of FT_ServiceDescRec descriptors and look for\n   *  a specific service by ID.  Note that the last element in the\n   *  array must be { NULL, NULL }, and that the function should\n   *  return NULL if the service isn't available.\n   *\n   *  This function can be used by modules to implement their\n   *  `get_service' method.\n   */\n  FT_BASE( FT_Pointer )\n  ft_service_list_lookup( FT_ServiceDesc  service_descriptors,\n                          const char*     service_id );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****             S E R V I C E S   C A C H E                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n   *  This structure is used to store a cache for several frequently used\n   *  services.  It is the type of `face->internal->services'.  You\n   *  should only use FT_FACE_LOOKUP_SERVICE to access it.\n   *\n   *  All fields should have the type FT_Pointer to relax compilation\n   *  dependencies.  We assume the developer isn't completely stupid.\n   *\n   *  Each field must be named `service_XXXX' where `XXX' corresponds to\n   *  the correct FT_SERVICE_ID_XXXX macro.  See the definition of\n   *  FT_FACE_LOOKUP_SERVICE below how this is implemented.\n   *\n   */\n  typedef struct  FT_ServiceCacheRec_\n  {\n    FT_Pointer  service_POSTSCRIPT_FONT_NAME;\n    FT_Pointer  service_MULTI_MASTERS;\n    FT_Pointer  service_GLYPH_DICT;\n    FT_Pointer  service_PFR_METRICS;\n    FT_Pointer  service_WINFNT;\n\n  } FT_ServiceCacheRec, *FT_ServiceCache;\n\n\n  /*\n   *  A magic number used within the services cache.\n   */\n\n  /* ensure that value `1' has the same width as a pointer */\n#define FT_SERVICE_UNAVAILABLE  ((FT_Pointer)~(FT_PtrDist)1)\n\n\n  /*\n   * @macro:\n   *   FT_FACE_LOOKUP_SERVICE\n   *\n   * @description:\n   *   This macro is used to lookup a service from a face's driver module\n   *   using its cache.\n   *\n   * @input:\n   *   face::\n   *     The source face handle containing the cache.\n   *\n   *   field ::\n   *     The field name in the cache.\n   *\n   *   id ::\n   *     The service ID.\n   *\n   * @output:\n   *   ptr ::\n   *     A variable receiving the service data.  NULL if not available.\n   */\n#ifdef __cplusplus\n\n#define FT_FACE_LOOKUP_SERVICE( face, ptr, id )                \\\n  FT_BEGIN_STMNT                                               \\\n    FT_Pointer   svc;                                          \\\n    FT_Pointer*  Pptr = (FT_Pointer*)&(ptr);                   \\\n                                                               \\\n                                                               \\\n    svc = FT_FACE( face )->internal->services. service_ ## id; \\\n    if ( svc == FT_SERVICE_UNAVAILABLE )                       \\\n      svc = NULL;                                              \\\n    else if ( svc == NULL )                                    \\\n    {                                                          \\\n      FT_FACE_FIND_SERVICE( face, svc, id );                   \\\n                                                               \\\n      FT_FACE( face )->internal->services. service_ ## id =    \\\n        (FT_Pointer)( svc != NULL ? svc                        \\\n                                  : FT_SERVICE_UNAVAILABLE );  \\\n    }                                                          \\\n    *Pptr = svc;                                               \\\n  FT_END_STMNT\n\n#else /* !C++ */\n\n#define FT_FACE_LOOKUP_SERVICE( face, ptr, id )                \\\n  FT_BEGIN_STMNT                                               \\\n    FT_Pointer  svc;                                           \\\n                                                               \\\n                                                               \\\n    svc = FT_FACE( face )->internal->services. service_ ## id; \\\n    if ( svc == FT_SERVICE_UNAVAILABLE )                       \\\n      svc = NULL;                                              \\\n    else if ( svc == NULL )                                    \\\n    {                                                          \\\n      FT_FACE_FIND_SERVICE( face, svc, id );                   \\\n                                                               \\\n      FT_FACE( face )->internal->services. service_ ## id =    \\\n        (FT_Pointer)( svc != NULL ? svc                        \\\n                                  : FT_SERVICE_UNAVAILABLE );  \\\n    }                                                          \\\n    ptr = svc;                                                 \\\n  FT_END_STMNT\n\n#endif /* !C++ */\n\n  /*\n   *  A macro used to define new service structure types.\n   */\n\n#define FT_DEFINE_SERVICE( name )            \\\n  typedef struct FT_Service_ ## name ## Rec_ \\\n    FT_Service_ ## name ## Rec ;             \\\n  typedef struct FT_Service_ ## name ## Rec_ \\\n    const * FT_Service_ ## name ;            \\\n  struct FT_Service_ ## name ## Rec_\n\n  /* */\n\n  /*\n   *  The header files containing the services.\n   */\n\n#define FT_SERVICE_BDF_H                <internal/services/svbdf.h>\n#define FT_SERVICE_CID_H                <internal/services/svcid.h>\n#define FT_SERVICE_GLYPH_DICT_H         <internal/services/svgldict.h>\n#define FT_SERVICE_GX_VALIDATE_H        <internal/services/svgxval.h>\n#define FT_SERVICE_KERNING_H            <internal/services/svkern.h>\n#define FT_SERVICE_MULTIPLE_MASTERS_H   <internal/services/svmm.h>\n#define FT_SERVICE_OPENTYPE_VALIDATE_H  <internal/services/svotval.h>\n#define FT_SERVICE_PFR_H                <internal/services/svpfr.h>\n#define FT_SERVICE_POSTSCRIPT_CMAPS_H   <internal/services/svpscmap.h>\n#define FT_SERVICE_POSTSCRIPT_INFO_H    <internal/services/svpsinfo.h>\n#define FT_SERVICE_POSTSCRIPT_NAME_H    <internal/services/svpostnm.h>\n#define FT_SERVICE_PROPERTIES_H         <internal/services/svprop.h>\n#define FT_SERVICE_SFNT_H               <internal/services/svsfnt.h>\n#define FT_SERVICE_TRUETYPE_ENGINE_H    <internal/services/svtteng.h>\n#define FT_SERVICE_TT_CMAP_H            <internal/services/svttcmap.h>\n#define FT_SERVICE_WINFNT_H             <internal/services/svwinfnt.h>\n#define FT_SERVICE_XFREE86_NAME_H       <internal/services/svxf86nm.h>\n#define FT_SERVICE_TRUETYPE_GLYF_H      <internal/services/svttglyf.h>\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FTSERV_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftstream.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftstream.h                                                             */\n/*                                                                         */\n/*    Stream handling (specification).                                     */\n/*                                                                         */\n/*  Copyright 1996-2002, 2004-2006, 2011, 2013 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTSTREAM_H__\n#define __FTSTREAM_H__\n\n\n#include <ft2build.h>\n#include FT_SYSTEM_H\n#include FT_INTERNAL_OBJECTS_H\n\n\nFT_BEGIN_HEADER\n\n\n  /* format of an 8-bit frame_op value:           */\n  /*                                              */\n  /* bit  76543210                                */\n  /*      xxxxxxes                                */\n  /*                                              */\n  /* s is set to 1 if the value is signed.        */\n  /* e is set to 1 if the value is little-endian. */\n  /* xxx is a command.                            */\n\n#define FT_FRAME_OP_SHIFT         2\n#define FT_FRAME_OP_SIGNED        1\n#define FT_FRAME_OP_LITTLE        2\n#define FT_FRAME_OP_COMMAND( x )  ( x >> FT_FRAME_OP_SHIFT )\n\n#define FT_MAKE_FRAME_OP( command, little, sign ) \\\n          ( ( command << FT_FRAME_OP_SHIFT ) | ( little << 1 ) | sign )\n\n#define FT_FRAME_OP_END    0\n#define FT_FRAME_OP_START  1  /* start a new frame     */\n#define FT_FRAME_OP_BYTE   2  /* read 1-byte value     */\n#define FT_FRAME_OP_SHORT  3  /* read 2-byte value     */\n#define FT_FRAME_OP_LONG   4  /* read 4-byte value     */\n#define FT_FRAME_OP_OFF3   5  /* read 3-byte value     */\n#define FT_FRAME_OP_BYTES  6  /* read a bytes sequence */\n\n\n  typedef enum  FT_Frame_Op_\n  {\n    ft_frame_end       = 0,\n    ft_frame_start     = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ),\n\n    ft_frame_byte      = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE,  0, 0 ),\n    ft_frame_schar     = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE,  0, 1 ),\n\n    ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ),\n    ft_frame_short_be  = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ),\n    ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ),\n    ft_frame_short_le  = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ),\n\n    ft_frame_ulong_be  = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ),\n    ft_frame_long_be   = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ),\n    ft_frame_ulong_le  = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ),\n    ft_frame_long_le   = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 1 ),\n\n    ft_frame_uoff3_be  = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ),\n    ft_frame_off3_be   = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ),\n    ft_frame_uoff3_le  = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ),\n    ft_frame_off3_le   = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ),\n\n    ft_frame_bytes     = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ),\n    ft_frame_skip      = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 )\n\n  } FT_Frame_Op;\n\n\n  typedef struct  FT_Frame_Field_\n  {\n    FT_Byte    value;\n    FT_Byte    size;\n    FT_UShort  offset;\n\n  } FT_Frame_Field;\n\n\n  /* Construct an FT_Frame_Field out of a structure type and a field name. */\n  /* The structure type must be set in the FT_STRUCTURE macro before       */\n  /* calling the FT_FRAME_START() macro.                                   */\n  /*                                                                       */\n#define FT_FIELD_SIZE( f ) \\\n          (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f )\n\n#define FT_FIELD_SIZE_DELTA( f ) \\\n          (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f[0] )\n\n#define FT_FIELD_OFFSET( f ) \\\n          (FT_UShort)( offsetof( FT_STRUCTURE, f ) )\n\n#define FT_FRAME_FIELD( frame_op, field ) \\\n          {                               \\\n            frame_op,                     \\\n            FT_FIELD_SIZE( field ),       \\\n            FT_FIELD_OFFSET( field )      \\\n          }\n\n#define FT_MAKE_EMPTY_FIELD( frame_op )  { frame_op, 0, 0 }\n\n#define FT_FRAME_START( size )   { ft_frame_start, 0, size }\n#define FT_FRAME_END             { ft_frame_end, 0, 0 }\n\n#define FT_FRAME_LONG( f )       FT_FRAME_FIELD( ft_frame_long_be, f )\n#define FT_FRAME_ULONG( f )      FT_FRAME_FIELD( ft_frame_ulong_be, f )\n#define FT_FRAME_SHORT( f )      FT_FRAME_FIELD( ft_frame_short_be, f )\n#define FT_FRAME_USHORT( f )     FT_FRAME_FIELD( ft_frame_ushort_be, f )\n#define FT_FRAME_OFF3( f )       FT_FRAME_FIELD( ft_frame_off3_be, f )\n#define FT_FRAME_UOFF3( f )      FT_FRAME_FIELD( ft_frame_uoff3_be, f )\n#define FT_FRAME_BYTE( f )       FT_FRAME_FIELD( ft_frame_byte, f )\n#define FT_FRAME_CHAR( f )       FT_FRAME_FIELD( ft_frame_schar, f )\n\n#define FT_FRAME_LONG_LE( f )    FT_FRAME_FIELD( ft_frame_long_le, f )\n#define FT_FRAME_ULONG_LE( f )   FT_FRAME_FIELD( ft_frame_ulong_le, f )\n#define FT_FRAME_SHORT_LE( f )   FT_FRAME_FIELD( ft_frame_short_le, f )\n#define FT_FRAME_USHORT_LE( f )  FT_FRAME_FIELD( ft_frame_ushort_le, f )\n#define FT_FRAME_OFF3_LE( f )    FT_FRAME_FIELD( ft_frame_off3_le, f )\n#define FT_FRAME_UOFF3_LE( f )   FT_FRAME_FIELD( ft_frame_uoff3_le, f )\n\n#define FT_FRAME_SKIP_LONG       { ft_frame_long_be, 0, 0 }\n#define FT_FRAME_SKIP_SHORT      { ft_frame_short_be, 0, 0 }\n#define FT_FRAME_SKIP_BYTE       { ft_frame_byte, 0, 0 }\n\n#define FT_FRAME_BYTES( field, count ) \\\n          {                            \\\n            ft_frame_bytes,            \\\n            count,                     \\\n            FT_FIELD_OFFSET( field )   \\\n          }\n\n#define FT_FRAME_SKIP_BYTES( count )  { ft_frame_skip, count, 0 }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Integer extraction macros -- the `buffer' parameter must ALWAYS be of */\n  /* type `char*' or equivalent (1-byte elements).                         */\n  /*                                                                       */\n\n#define FT_BYTE_( p, i )  ( ((const FT_Byte*)(p))[(i)] )\n\n#define FT_INT16( x )   ( (FT_Int16)(x)  )\n#define FT_UINT16( x )  ( (FT_UInt16)(x) )\n#define FT_INT32( x )   ( (FT_Int32)(x)  )\n#define FT_UINT32( x )  ( (FT_UInt32)(x) )\n\n\n#define FT_BYTE_U16( p, i, s )  ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) )\n#define FT_BYTE_U32( p, i, s )  ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )\n\n\n#define FT_PEEK_SHORT( p )  FT_INT16( FT_BYTE_U16( p, 0, 8) | \\\n                                      FT_BYTE_U16( p, 1, 0) )\n\n#define FT_PEEK_USHORT( p )  FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \\\n                                        FT_BYTE_U16( p, 1, 0 ) )\n\n#define FT_PEEK_LONG( p )  FT_INT32( FT_BYTE_U32( p, 0, 24 ) | \\\n                                     FT_BYTE_U32( p, 1, 16 ) | \\\n                                     FT_BYTE_U32( p, 2,  8 ) | \\\n                                     FT_BYTE_U32( p, 3,  0 ) )\n\n#define FT_PEEK_ULONG( p )  FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \\\n                                       FT_BYTE_U32( p, 1, 16 ) | \\\n                                       FT_BYTE_U32( p, 2,  8 ) | \\\n                                       FT_BYTE_U32( p, 3,  0 ) )\n\n#define FT_PEEK_OFF3( p )  FT_INT32( FT_BYTE_U32( p, 0, 16 ) | \\\n                                     FT_BYTE_U32( p, 1,  8 ) | \\\n                                     FT_BYTE_U32( p, 2,  0 ) )\n\n#define FT_PEEK_UOFF3( p )  FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \\\n                                       FT_BYTE_U32( p, 1,  8 ) | \\\n                                       FT_BYTE_U32( p, 2,  0 ) )\n\n#define FT_PEEK_SHORT_LE( p )  FT_INT16( FT_BYTE_U16( p, 1, 8 ) | \\\n                                         FT_BYTE_U16( p, 0, 0 ) )\n\n#define FT_PEEK_USHORT_LE( p )  FT_UINT16( FT_BYTE_U16( p, 1, 8 ) |  \\\n                                           FT_BYTE_U16( p, 0, 0 ) )\n\n#define FT_PEEK_LONG_LE( p )  FT_INT32( FT_BYTE_U32( p, 3, 24 ) | \\\n                                        FT_BYTE_U32( p, 2, 16 ) | \\\n                                        FT_BYTE_U32( p, 1,  8 ) | \\\n                                        FT_BYTE_U32( p, 0,  0 ) )\n\n#define FT_PEEK_ULONG_LE( p )  FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \\\n                                          FT_BYTE_U32( p, 2, 16 ) | \\\n                                          FT_BYTE_U32( p, 1,  8 ) | \\\n                                          FT_BYTE_U32( p, 0,  0 ) )\n\n#define FT_PEEK_OFF3_LE( p )  FT_INT32( FT_BYTE_U32( p, 2, 16 ) | \\\n                                        FT_BYTE_U32( p, 1,  8 ) | \\\n                                        FT_BYTE_U32( p, 0,  0 ) )\n\n#define FT_PEEK_UOFF3_LE( p )  FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \\\n                                          FT_BYTE_U32( p, 1,  8 ) | \\\n                                          FT_BYTE_U32( p, 0,  0 ) )\n\n\n#define FT_NEXT_CHAR( buffer )       \\\n          ( (signed char)*buffer++ )\n\n#define FT_NEXT_BYTE( buffer )         \\\n          ( (unsigned char)*buffer++ )\n\n#define FT_NEXT_SHORT( buffer )                                   \\\n          ( (short)( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) ) )\n\n#define FT_NEXT_USHORT( buffer )                                            \\\n          ( (unsigned short)( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) ) )\n\n#define FT_NEXT_OFF3( buffer )                                  \\\n          ( (long)( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) ) )\n\n#define FT_NEXT_UOFF3( buffer )                                           \\\n          ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) ) )\n\n#define FT_NEXT_LONG( buffer )                                  \\\n          ( (long)( buffer += 4, FT_PEEK_LONG( buffer - 4 ) ) )\n\n#define FT_NEXT_ULONG( buffer )                                           \\\n          ( (unsigned long)( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) ) )\n\n\n#define FT_NEXT_SHORT_LE( buffer )                                   \\\n          ( (short)( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) ) )\n\n#define FT_NEXT_USHORT_LE( buffer )                                            \\\n          ( (unsigned short)( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) ) )\n\n#define FT_NEXT_OFF3_LE( buffer )                                  \\\n          ( (long)( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) ) )\n\n#define FT_NEXT_UOFF3_LE( buffer )                                           \\\n          ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) ) )\n\n#define FT_NEXT_LONG_LE( buffer )                                  \\\n          ( (long)( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) ) )\n\n#define FT_NEXT_ULONG_LE( buffer )                                           \\\n          ( (unsigned long)( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) ) )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Each GET_xxxx() macro uses an implicit `stream' variable.             */\n  /*                                                                       */\n#if 0\n#define FT_GET_MACRO( type )    FT_NEXT_ ## type ( stream->cursor )\n\n#define FT_GET_CHAR()       FT_GET_MACRO( CHAR )\n#define FT_GET_BYTE()       FT_GET_MACRO( BYTE )\n#define FT_GET_SHORT()      FT_GET_MACRO( SHORT )\n#define FT_GET_USHORT()     FT_GET_MACRO( USHORT )\n#define FT_GET_OFF3()       FT_GET_MACRO( OFF3 )\n#define FT_GET_UOFF3()      FT_GET_MACRO( UOFF3 )\n#define FT_GET_LONG()       FT_GET_MACRO( LONG )\n#define FT_GET_ULONG()      FT_GET_MACRO( ULONG )\n#define FT_GET_TAG4()       FT_GET_MACRO( ULONG )\n\n#define FT_GET_SHORT_LE()   FT_GET_MACRO( SHORT_LE )\n#define FT_GET_USHORT_LE()  FT_GET_MACRO( USHORT_LE )\n#define FT_GET_LONG_LE()    FT_GET_MACRO( LONG_LE )\n#define FT_GET_ULONG_LE()   FT_GET_MACRO( ULONG_LE )\n\n#else\n#define FT_GET_MACRO( func, type )        ( (type)func( stream ) )\n\n#define FT_GET_CHAR()       FT_GET_MACRO( FT_Stream_GetChar, FT_Char )\n#define FT_GET_BYTE()       FT_GET_MACRO( FT_Stream_GetChar, FT_Byte )\n#define FT_GET_SHORT()      FT_GET_MACRO( FT_Stream_GetUShort, FT_Short )\n#define FT_GET_USHORT()     FT_GET_MACRO( FT_Stream_GetUShort, FT_UShort )\n#define FT_GET_OFF3()       FT_GET_MACRO( FT_Stream_GetUOffset, FT_Long )\n#define FT_GET_UOFF3()      FT_GET_MACRO( FT_Stream_GetUOffset, FT_ULong )\n#define FT_GET_LONG()       FT_GET_MACRO( FT_Stream_GetULong, FT_Long )\n#define FT_GET_ULONG()      FT_GET_MACRO( FT_Stream_GetULong, FT_ULong )\n#define FT_GET_TAG4()       FT_GET_MACRO( FT_Stream_GetULong, FT_ULong )\n\n#define FT_GET_SHORT_LE()   FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Short )\n#define FT_GET_USHORT_LE()  FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UShort )\n#define FT_GET_LONG_LE()    FT_GET_MACRO( FT_Stream_GetULongLE, FT_Long )\n#define FT_GET_ULONG_LE()   FT_GET_MACRO( FT_Stream_GetULongLE, FT_ULong )\n#endif\n\n#define FT_READ_MACRO( func, type, var )        \\\n          ( var = (type)func( stream, &error ), \\\n            error != FT_Err_Ok )\n\n#define FT_READ_BYTE( var )       FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var )\n#define FT_READ_CHAR( var )       FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var )\n#define FT_READ_SHORT( var )      FT_READ_MACRO( FT_Stream_ReadUShort, FT_Short, var )\n#define FT_READ_USHORT( var )     FT_READ_MACRO( FT_Stream_ReadUShort, FT_UShort, var )\n#define FT_READ_OFF3( var )       FT_READ_MACRO( FT_Stream_ReadUOffset, FT_Long, var )\n#define FT_READ_UOFF3( var )      FT_READ_MACRO( FT_Stream_ReadUOffset, FT_ULong, var )\n#define FT_READ_LONG( var )       FT_READ_MACRO( FT_Stream_ReadULong, FT_Long, var )\n#define FT_READ_ULONG( var )      FT_READ_MACRO( FT_Stream_ReadULong, FT_ULong, var )\n\n#define FT_READ_SHORT_LE( var )   FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_Short, var )\n#define FT_READ_USHORT_LE( var )  FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_UShort, var )\n#define FT_READ_LONG_LE( var )    FT_READ_MACRO( FT_Stream_ReadULongLE, FT_Long, var )\n#define FT_READ_ULONG_LE( var )   FT_READ_MACRO( FT_Stream_ReadULongLE, FT_ULong, var )\n\n\n#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM\n\n  /* initialize a stream for reading a regular system stream */\n  FT_BASE( FT_Error )\n  FT_Stream_Open( FT_Stream    stream,\n                  const char*  filepathname );\n\n#endif /* FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */\n\n\n  /* create a new (input) stream from an FT_Open_Args structure */\n  FT_BASE( FT_Error )\n  FT_Stream_New( FT_Library           library,\n                 const FT_Open_Args*  args,\n                 FT_Stream           *astream );\n\n  /* free a stream */\n  FT_BASE( void )\n  FT_Stream_Free( FT_Stream  stream,\n                  FT_Int     external );\n\n  /* initialize a stream for reading in-memory data */\n  FT_BASE( void )\n  FT_Stream_OpenMemory( FT_Stream       stream,\n                        const FT_Byte*  base,\n                        FT_ULong        size );\n\n  /* close a stream (does not destroy the stream structure) */\n  FT_BASE( void )\n  FT_Stream_Close( FT_Stream  stream );\n\n\n  /* seek within a stream. position is relative to start of stream */\n  FT_BASE( FT_Error )\n  FT_Stream_Seek( FT_Stream  stream,\n                  FT_ULong   pos );\n\n  /* skip bytes in a stream */\n  FT_BASE( FT_Error )\n  FT_Stream_Skip( FT_Stream  stream,\n                  FT_Long    distance );\n\n  /* return current stream position */\n  FT_BASE( FT_Long )\n  FT_Stream_Pos( FT_Stream  stream );\n\n  /* read bytes from a stream into a user-allocated buffer, returns an */\n  /* error if not all bytes could be read.                             */\n  FT_BASE( FT_Error )\n  FT_Stream_Read( FT_Stream  stream,\n                  FT_Byte*   buffer,\n                  FT_ULong   count );\n\n  /* read bytes from a stream at a given position */\n  FT_BASE( FT_Error )\n  FT_Stream_ReadAt( FT_Stream  stream,\n                    FT_ULong   pos,\n                    FT_Byte*   buffer,\n                    FT_ULong   count );\n\n  /* try to read bytes at the end of a stream; return number of bytes */\n  /* really available                                                 */\n  FT_BASE( FT_ULong )\n  FT_Stream_TryRead( FT_Stream  stream,\n                     FT_Byte*   buffer,\n                     FT_ULong   count );\n\n  /* Enter a frame of `count' consecutive bytes in a stream.  Returns an */\n  /* error if the frame could not be read/accessed.  The caller can use  */\n  /* the FT_Stream_Get_XXX functions to retrieve frame data without      */\n  /* error checks.                                                       */\n  /*                                                                     */\n  /* You must _always_ call FT_Stream_ExitFrame() once you have entered  */\n  /* a stream frame!                                                     */\n  /*                                                                     */\n  FT_BASE( FT_Error )\n  FT_Stream_EnterFrame( FT_Stream  stream,\n                        FT_ULong   count );\n\n  /* exit a stream frame */\n  FT_BASE( void )\n  FT_Stream_ExitFrame( FT_Stream  stream );\n\n  /* Extract a stream frame.  If the stream is disk-based, a heap block */\n  /* is allocated and the frame bytes are read into it.  If the stream  */\n  /* is memory-based, this function simply set a pointer to the data.   */\n  /*                                                                    */\n  /* Useful to optimize access to memory-based streams transparently.   */\n  /*                                                                    */\n  /* All extracted frames must be `freed' with a call to the function   */\n  /* FT_Stream_ReleaseFrame().                                          */\n  /*                                                                    */\n  FT_BASE( FT_Error )\n  FT_Stream_ExtractFrame( FT_Stream  stream,\n                          FT_ULong   count,\n                          FT_Byte**  pbytes );\n\n  /* release an extract frame (see FT_Stream_ExtractFrame) */\n  FT_BASE( void )\n  FT_Stream_ReleaseFrame( FT_Stream  stream,\n                          FT_Byte**  pbytes );\n\n  /* read a byte from an entered frame */\n  FT_BASE( FT_Char )\n  FT_Stream_GetChar( FT_Stream  stream );\n\n  /* read a 16-bit big-endian unsigned integer from an entered frame */\n  FT_BASE( FT_UShort )\n  FT_Stream_GetUShort( FT_Stream  stream );\n\n  /* read a 24-bit big-endian unsigned integer from an entered frame */\n  FT_BASE( FT_ULong )\n  FT_Stream_GetUOffset( FT_Stream  stream );\n\n  /* read a 32-bit big-endian unsigned integer from an entered frame */\n  FT_BASE( FT_ULong )\n  FT_Stream_GetULong( FT_Stream  stream );\n\n  /* read a 16-bit little-endian unsigned integer from an entered frame */\n  FT_BASE( FT_UShort )\n  FT_Stream_GetUShortLE( FT_Stream  stream );\n\n  /* read a 32-bit little-endian unsigned integer from an entered frame */\n  FT_BASE( FT_ULong )\n  FT_Stream_GetULongLE( FT_Stream  stream );\n\n\n  /* read a byte from a stream */\n  FT_BASE( FT_Char )\n  FT_Stream_ReadChar( FT_Stream  stream,\n                      FT_Error*  error );\n\n  /* read a 16-bit big-endian unsigned integer from a stream */\n  FT_BASE( FT_UShort )\n  FT_Stream_ReadUShort( FT_Stream  stream,\n                        FT_Error*  error );\n\n  /* read a 24-bit big-endian unsigned integer from a stream */\n  FT_BASE( FT_ULong )\n  FT_Stream_ReadUOffset( FT_Stream  stream,\n                         FT_Error*  error );\n\n  /* read a 32-bit big-endian integer from a stream */\n  FT_BASE( FT_ULong )\n  FT_Stream_ReadULong( FT_Stream  stream,\n                       FT_Error*  error );\n\n  /* read a 16-bit little-endian unsigned integer from a stream */\n  FT_BASE( FT_UShort )\n  FT_Stream_ReadUShortLE( FT_Stream  stream,\n                          FT_Error*  error );\n\n  /* read a 32-bit little-endian unsigned integer from a stream */\n  FT_BASE( FT_ULong )\n  FT_Stream_ReadULongLE( FT_Stream  stream,\n                         FT_Error*  error );\n\n  /* Read a structure from a stream.  The structure must be described */\n  /* by an array of FT_Frame_Field records.                           */\n  FT_BASE( FT_Error )\n  FT_Stream_ReadFields( FT_Stream              stream,\n                        const FT_Frame_Field*  fields,\n                        void*                  structure );\n\n\n#define FT_STREAM_POS()           \\\n          FT_Stream_Pos( stream )\n\n#define FT_STREAM_SEEK( position )                               \\\n          FT_SET_ERROR( FT_Stream_Seek( stream,                  \\\n                                        (FT_ULong)(position) ) )\n\n#define FT_STREAM_SKIP( distance )                              \\\n          FT_SET_ERROR( FT_Stream_Skip( stream,                 \\\n                                        (FT_Long)(distance) ) )\n\n#define FT_STREAM_READ( buffer, count )                       \\\n          FT_SET_ERROR( FT_Stream_Read( stream,               \\\n                                        (FT_Byte*)(buffer),   \\\n                                        (FT_ULong)(count) ) )\n\n#define FT_STREAM_READ_AT( position, buffer, count )            \\\n          FT_SET_ERROR( FT_Stream_ReadAt( stream,               \\\n                                          (FT_ULong)(position), \\\n                                          (FT_Byte*)buffer,     \\\n                                          (FT_ULong)(count) ) )\n\n#define FT_STREAM_READ_FIELDS( fields, object )                          \\\n          FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) )\n\n\n#define FT_FRAME_ENTER( size )                                           \\\n          FT_SET_ERROR(                                                  \\\n            FT_DEBUG_INNER( FT_Stream_EnterFrame( stream,                \\\n                                                  (FT_ULong)(size) ) ) )\n\n#define FT_FRAME_EXIT()                                   \\\n          FT_DEBUG_INNER( FT_Stream_ExitFrame( stream ) )\n\n#define FT_FRAME_EXTRACT( size, bytes )                                       \\\n          FT_SET_ERROR(                                                       \\\n            FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream,                   \\\n                                                    (FT_ULong)(size),         \\\n                                                    (FT_Byte**)&(bytes) ) ) )\n\n#define FT_FRAME_RELEASE( bytes )                                         \\\n          FT_DEBUG_INNER( FT_Stream_ReleaseFrame( stream,                 \\\n                                                  (FT_Byte**)&(bytes) ) )\n\n\nFT_END_HEADER\n\n#endif /* __FTSTREAM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/fttrace.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fttrace.h                                                              */\n/*                                                                         */\n/*    Tracing handling (specification only).                               */\n/*                                                                         */\n/*  Copyright 2002, 2004-2007, 2009, 2011-2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /* definitions of trace levels for FreeType 2 */\n\n  /* the first level must always be `trace_any' */\nFT_TRACE_DEF( any )\n\n  /* base components */\nFT_TRACE_DEF( calc )      /* calculations            (ftcalc.c)   */\nFT_TRACE_DEF( memory )    /* memory manager          (ftobjs.c)   */\nFT_TRACE_DEF( stream )    /* stream manager          (ftstream.c) */\nFT_TRACE_DEF( io )        /* i/o interface           (ftsystem.c) */\nFT_TRACE_DEF( list )      /* list management         (ftlist.c)   */\nFT_TRACE_DEF( init )      /* initialization          (ftinit.c)   */\nFT_TRACE_DEF( objs )      /* base objects            (ftobjs.c)   */\nFT_TRACE_DEF( outline )   /* outline management      (ftoutln.c)  */\nFT_TRACE_DEF( glyph )     /* glyph management        (ftglyph.c)  */\nFT_TRACE_DEF( gloader )   /* glyph loader            (ftgloadr.c) */\n\nFT_TRACE_DEF( raster )    /* monochrome rasterizer   (ftraster.c) */\nFT_TRACE_DEF( smooth )    /* anti-aliasing raster    (ftgrays.c)  */\nFT_TRACE_DEF( mm )        /* MM interface            (ftmm.c)     */\nFT_TRACE_DEF( raccess )   /* resource fork accessor  (ftrfork.c)  */\nFT_TRACE_DEF( synth )     /* bold/slant synthesizer  (ftsynth.c)  */\nFT_TRACE_DEF( bitmap )    /* bitmap checksum         (ftobjs.c)   */\n\n  /* Cache sub-system */\nFT_TRACE_DEF( cache )     /* cache sub-system        (ftcache.c, etc.) */\n\n  /* SFNT driver components */\nFT_TRACE_DEF( sfdriver )  /* SFNT font driver        (sfdriver.c) */\nFT_TRACE_DEF( sfobjs )    /* SFNT object handler     (sfobjs.c)   */\nFT_TRACE_DEF( ttcmap )    /* charmap handler         (ttcmap.c)   */\nFT_TRACE_DEF( ttkern )    /* kerning handler         (ttkern.c)   */\nFT_TRACE_DEF( ttload )    /* basic TrueType tables   (ttload.c)   */\nFT_TRACE_DEF( ttmtx )     /* metrics-related tables  (ttmtx.c)    */\nFT_TRACE_DEF( ttpost )    /* PS table processing     (ttpost.c)   */\nFT_TRACE_DEF( ttsbit )    /* TrueType sbit handling  (ttsbit.c)   */\nFT_TRACE_DEF( ttbdf )     /* TrueType embedded BDF   (ttbdf.c)    */\n\n  /* TrueType driver components */\nFT_TRACE_DEF( ttdriver )  /* TT font driver          (ttdriver.c) */\nFT_TRACE_DEF( ttgload )   /* TT glyph loader         (ttgload.c)  */\nFT_TRACE_DEF( ttinterp )  /* bytecode interpreter    (ttinterp.c) */\nFT_TRACE_DEF( ttobjs )    /* TT objects manager      (ttobjs.c)   */\nFT_TRACE_DEF( ttpload )   /* TT data/program loader  (ttpload.c)  */\nFT_TRACE_DEF( ttgxvar )   /* TrueType GX var handler (ttgxvar.c)  */\n\n  /* Type 1 driver components */\nFT_TRACE_DEF( t1afm )\nFT_TRACE_DEF( t1driver )\nFT_TRACE_DEF( t1gload )\nFT_TRACE_DEF( t1hint )\nFT_TRACE_DEF( t1load )\nFT_TRACE_DEF( t1objs )\nFT_TRACE_DEF( t1parse )\n\n  /* PostScript helper module `psaux' */\nFT_TRACE_DEF( t1decode )\nFT_TRACE_DEF( psobjs )\nFT_TRACE_DEF( psconv )\n\n  /* PostScript hinting module `pshinter' */\nFT_TRACE_DEF( pshrec )\nFT_TRACE_DEF( pshalgo1 )\nFT_TRACE_DEF( pshalgo2 )\n\n  /* Type 2 driver components */\nFT_TRACE_DEF( cffdriver )\nFT_TRACE_DEF( cffgload )\nFT_TRACE_DEF( cffload )\nFT_TRACE_DEF( cffobjs )\nFT_TRACE_DEF( cffparse )\n\nFT_TRACE_DEF( cf2blues )\nFT_TRACE_DEF( cf2hints )\nFT_TRACE_DEF( cf2interp )\n\n  /* Type 42 driver component */\nFT_TRACE_DEF( t42 )\n\n  /* CID driver components */\nFT_TRACE_DEF( cidafm )\nFT_TRACE_DEF( ciddriver )\nFT_TRACE_DEF( cidgload )\nFT_TRACE_DEF( cidload )\nFT_TRACE_DEF( cidobjs )\nFT_TRACE_DEF( cidparse )\n\n  /* Windows font component */\nFT_TRACE_DEF( winfnt )\n\n  /* PCF font components */\nFT_TRACE_DEF( pcfdriver )\nFT_TRACE_DEF( pcfread )\n\n  /* BDF font components */\nFT_TRACE_DEF( bdfdriver )\nFT_TRACE_DEF( bdflib )\n\n  /* PFR font component */\nFT_TRACE_DEF( pfr )\n\n  /* OpenType validation components */\nFT_TRACE_DEF( otvmodule )\nFT_TRACE_DEF( otvcommon )\nFT_TRACE_DEF( otvbase )\nFT_TRACE_DEF( otvgdef )\nFT_TRACE_DEF( otvgpos )\nFT_TRACE_DEF( otvgsub )\nFT_TRACE_DEF( otvjstf )\nFT_TRACE_DEF( otvmath )\n\n  /* TrueTypeGX/AAT validation components */\nFT_TRACE_DEF( gxvmodule )\nFT_TRACE_DEF( gxvcommon )\nFT_TRACE_DEF( gxvfeat )\nFT_TRACE_DEF( gxvmort )\nFT_TRACE_DEF( gxvmorx )\nFT_TRACE_DEF( gxvbsln )\nFT_TRACE_DEF( gxvjust )\nFT_TRACE_DEF( gxvkern )\nFT_TRACE_DEF( gxvopbd )\nFT_TRACE_DEF( gxvtrak )\nFT_TRACE_DEF( gxvprop )\nFT_TRACE_DEF( gxvlcar )\n\n  /* autofit components */\nFT_TRACE_DEF( afmodule )\nFT_TRACE_DEF( afhints )\nFT_TRACE_DEF( afcjk )\nFT_TRACE_DEF( aflatin )\nFT_TRACE_DEF( aflatin2 )\nFT_TRACE_DEF( afwarp )\nFT_TRACE_DEF( afharfbuzz )\nFT_TRACE_DEF( afglobal )\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/ftvalid.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftvalid.h                                                              */\n/*                                                                         */\n/*    FreeType validation support (specification).                         */\n/*                                                                         */\n/*  Copyright 2004, 2013, 2014 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTVALID_H__\n#define __FTVALID_H__\n\n#include <ft2build.h>\n#include FT_CONFIG_STANDARD_LIBRARY_H   /* for ft_setjmp and ft_longjmp */\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                    V A L I D A T I O N                          ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* handle to a validation object */\n  typedef struct FT_ValidatorRec_ volatile*  FT_Validator;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* There are three distinct validation levels defined here:              */\n  /*                                                                       */\n  /* FT_VALIDATE_DEFAULT ::                                                */\n  /*   A table that passes this validation level can be used reliably by   */\n  /*   FreeType.  It generally means that all offsets have been checked to */\n  /*   prevent out-of-bound reads, that array counts are correct, etc.     */\n  /*                                                                       */\n  /* FT_VALIDATE_TIGHT ::                                                  */\n  /*   A table that passes this validation level can be used reliably and  */\n  /*   doesn't contain invalid data.  For example, a charmap table that    */\n  /*   returns invalid glyph indices will not pass, even though it can     */\n  /*   be used with FreeType in default mode (the library will simply      */\n  /*   return an error later when trying to load the glyph).               */\n  /*                                                                       */\n  /*   It also checks that fields which must be a multiple of 2, 4, or 8,  */\n  /*   don't have incorrect values, etc.                                   */\n  /*                                                                       */\n  /* FT_VALIDATE_PARANOID ::                                               */\n  /*   Only for font debugging.  Checks that a table follows the           */\n  /*   specification by 100%.  Very few fonts will be able to pass this    */\n  /*   level anyway but it can be useful for certain tools like font       */\n  /*   editors/converters.                                                 */\n  /*                                                                       */\n  typedef enum  FT_ValidationLevel_\n  {\n    FT_VALIDATE_DEFAULT = 0,\n    FT_VALIDATE_TIGHT,\n    FT_VALIDATE_PARANOID\n\n  } FT_ValidationLevel;\n\n\n#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */\n  /* We disable the warning `structure was padded due to   */\n  /* __declspec(align())' in order to compile cleanly with */\n  /* the maximum level of warnings.                        */\n#pragma warning( push )\n#pragma warning( disable : 4324 )\n#endif /* _MSC_VER */\n\n  /* validator structure */\n  typedef struct  FT_ValidatorRec_\n  {\n    ft_jmp_buf          jump_buffer; /* used for exception handling      */\n\n    const FT_Byte*      base;        /* address of table in memory       */\n    const FT_Byte*      limit;       /* `base' + sizeof(table) in memory */\n    FT_ValidationLevel  level;       /* validation level                 */\n    FT_Error            error;       /* error returned. 0 means success  */\n\n  } FT_ValidatorRec;\n\n#if defined( _MSC_VER )\n#pragma warning( pop )\n#endif\n\n#define FT_VALIDATOR( x )  ( (FT_Validator)( x ) )\n\n\n  FT_BASE( void )\n  ft_validator_init( FT_Validator        valid,\n                     const FT_Byte*      base,\n                     const FT_Byte*      limit,\n                     FT_ValidationLevel  level );\n\n  /* Do not use this. It's broken and will cause your validator to crash */\n  /* if you run it on an invalid font.                                   */\n  FT_BASE( FT_Int )\n  ft_validator_run( FT_Validator  valid );\n\n  /* Sets the error field in a validator, then calls `longjmp' to return */\n  /* to high-level caller.  Using `setjmp/longjmp' avoids many stupid    */\n  /* error checks within the validation routines.                        */\n  /*                                                                     */\n  FT_BASE( void )\n  ft_validator_error( FT_Validator  valid,\n                      FT_Error      error );\n\n\n  /* Calls ft_validate_error.  Assumes that the `valid' local variable */\n  /* holds a pointer to the current validator object.                  */\n  /*                                                                   */\n#define FT_INVALID( _error )  FT_INVALID_( _error )\n#define FT_INVALID_( _error ) \\\n          ft_validator_error( valid, FT_THROW( _error ) )\n\n  /* called when a broken table is detected */\n#define FT_INVALID_TOO_SHORT \\\n          FT_INVALID( Invalid_Table )\n\n  /* called when an invalid offset is detected */\n#define FT_INVALID_OFFSET \\\n          FT_INVALID( Invalid_Offset )\n\n  /* called when an invalid format/value is detected */\n#define FT_INVALID_FORMAT \\\n          FT_INVALID( Invalid_Table )\n\n  /* called when an invalid glyph index is detected */\n#define FT_INVALID_GLYPH_ID \\\n          FT_INVALID( Invalid_Glyph_Index )\n\n  /* called when an invalid field value is detected */\n#define FT_INVALID_DATA \\\n          FT_INVALID( Invalid_Table )\n\n\nFT_END_HEADER\n\n#endif /* __FTVALID_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/internal.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  internal.h                                                             */\n/*                                                                         */\n/*    Internal header files (specification only).                          */\n/*                                                                         */\n/*  Copyright 1996-2004, 2013 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is automatically included by `ft2build.h'.                  */\n  /* Do not include it manually!                                           */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#define FT_INTERNAL_OBJECTS_H             <internal/ftobjs.h>\n#define FT_INTERNAL_PIC_H                 <internal/ftpic.h>\n#define FT_INTERNAL_STREAM_H              <internal/ftstream.h>\n#define FT_INTERNAL_MEMORY_H              <internal/ftmemory.h>\n#define FT_INTERNAL_DEBUG_H               <internal/ftdebug.h>\n#define FT_INTERNAL_CALC_H                <internal/ftcalc.h>\n#define FT_INTERNAL_DRIVER_H              <internal/ftdriver.h>\n#define FT_INTERNAL_TRACE_H               <internal/fttrace.h>\n#define FT_INTERNAL_GLYPH_LOADER_H        <internal/ftgloadr.h>\n#define FT_INTERNAL_SFNT_H                <internal/sfnt.h>\n#define FT_INTERNAL_SERVICE_H             <internal/ftserv.h>\n#define FT_INTERNAL_RFORK_H               <internal/ftrfork.h>\n#define FT_INTERNAL_VALIDATE_H            <internal/ftvalid.h>\n\n#define FT_INTERNAL_TRUETYPE_TYPES_H      <internal/tttypes.h>\n#define FT_INTERNAL_TYPE1_TYPES_H         <internal/t1types.h>\n\n#define FT_INTERNAL_POSTSCRIPT_AUX_H      <internal/psaux.h>\n#define FT_INTERNAL_POSTSCRIPT_HINTS_H    <internal/pshints.h>\n#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H  <internal/psglobal.h>\n\n#define FT_INTERNAL_AUTOHINT_H            <internal/autohint.h>\n\n\n#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */\n\n  /* We disable the warning `conditional expression is constant' here */\n  /* in order to compile cleanly with the maximum level of warnings.  */\n  /* In particular, the warning complains about stuff like `while(0)' */\n  /* which is very useful in macro definitions.  There is no benefit  */\n  /* in having it enabled.                                            */\n#pragma warning( disable : 4127 )\n\n#endif /* _MSC_VER */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/psaux.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psaux.h                                                                */\n/*                                                                         */\n/*    Auxiliary functions and data structures related to PostScript fonts  */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006, 2008, 2009, 2012 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSAUX_H__\n#define __PSAUX_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                             T1_TABLE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  typedef struct PS_TableRec_*              PS_Table;\n  typedef const struct PS_Table_FuncsRec_*  PS_Table_Funcs;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_Table_FuncsRec                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A set of function pointers to manage PS_Table objects.             */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    table_init    :: Used to initialize a table.                       */\n  /*                                                                       */\n  /*    table_done    :: Finalizes resp. destroy a given table.            */\n  /*                                                                       */\n  /*    table_add     :: Adds a new object to a table.                     */\n  /*                                                                       */\n  /*    table_release :: Releases table data, then finalizes it.           */\n  /*                                                                       */\n  typedef struct  PS_Table_FuncsRec_\n  {\n    FT_Error\n    (*init)( PS_Table   table,\n             FT_Int     count,\n             FT_Memory  memory );\n\n    void\n    (*done)( PS_Table  table );\n\n    FT_Error\n    (*add)( PS_Table    table,\n            FT_Int      idx,\n            void*       object,\n            FT_PtrDist  length );\n\n    void\n    (*release)( PS_Table  table );\n\n  } PS_Table_FuncsRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_TableRec                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A PS_Table is a simple object used to store an array of objects in */\n  /*    a single memory block.                                             */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    block     :: The address in memory of the growheap's block.  This  */\n  /*                 can change between two object adds, due to            */\n  /*                 reallocation.                                         */\n  /*                                                                       */\n  /*    cursor    :: The current top of the grow heap within its block.    */\n  /*                                                                       */\n  /*    capacity  :: The current size of the heap block.  Increments by    */\n  /*                 1kByte chunks.                                        */\n  /*                                                                       */\n  /*    init      :: Set to 0xDEADBEEF if `elements' and `lengths' have    */\n  /*                 been allocated.                                       */\n  /*                                                                       */\n  /*    max_elems :: The maximum number of elements in table.              */\n  /*                                                                       */\n  /*    num_elems :: The current number of elements in table.              */\n  /*                                                                       */\n  /*    elements  :: A table of element addresses within the block.        */\n  /*                                                                       */\n  /*    lengths   :: A table of element sizes within the block.            */\n  /*                                                                       */\n  /*    memory    :: The object used for memory operations                 */\n  /*                 (alloc/realloc).                                      */\n  /*                                                                       */\n  /*    funcs     :: A table of method pointers for this object.           */\n  /*                                                                       */\n  typedef struct  PS_TableRec_\n  {\n    FT_Byte*           block;          /* current memory block           */\n    FT_Offset          cursor;         /* current cursor in memory block */\n    FT_Offset          capacity;       /* current size of memory block   */\n    FT_Long            init;\n\n    FT_Int             max_elems;\n    FT_Int             num_elems;\n    FT_Byte**          elements;       /* addresses of table elements */\n    FT_PtrDist*        lengths;        /* lengths of table elements   */\n\n    FT_Memory          memory;\n    PS_Table_FuncsRec  funcs;\n\n  } PS_TableRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       T1 FIELDS & TOKENS                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct PS_ParserRec_*  PS_Parser;\n\n  typedef struct T1_TokenRec_*   T1_Token;\n\n  typedef struct T1_FieldRec_*   T1_Field;\n\n\n  /* simple enumeration type used to identify token types */\n  typedef enum  T1_TokenType_\n  {\n    T1_TOKEN_TYPE_NONE = 0,\n    T1_TOKEN_TYPE_ANY,\n    T1_TOKEN_TYPE_STRING,\n    T1_TOKEN_TYPE_ARRAY,\n    T1_TOKEN_TYPE_KEY, /* aka `name' */\n\n    /* do not remove */\n    T1_TOKEN_TYPE_MAX\n\n  } T1_TokenType;\n\n\n  /* a simple structure used to identify tokens */\n  typedef struct  T1_TokenRec_\n  {\n    FT_Byte*      start;   /* first character of token in input stream */\n    FT_Byte*      limit;   /* first character after the token          */\n    T1_TokenType  type;    /* type of token                            */\n\n  } T1_TokenRec;\n\n\n  /* enumeration type used to identify object fields */\n  typedef enum  T1_FieldType_\n  {\n    T1_FIELD_TYPE_NONE = 0,\n    T1_FIELD_TYPE_BOOL,\n    T1_FIELD_TYPE_INTEGER,\n    T1_FIELD_TYPE_FIXED,\n    T1_FIELD_TYPE_FIXED_1000,\n    T1_FIELD_TYPE_STRING,\n    T1_FIELD_TYPE_KEY,\n    T1_FIELD_TYPE_BBOX,\n    T1_FIELD_TYPE_MM_BBOX,\n    T1_FIELD_TYPE_INTEGER_ARRAY,\n    T1_FIELD_TYPE_FIXED_ARRAY,\n    T1_FIELD_TYPE_CALLBACK,\n\n    /* do not remove */\n    T1_FIELD_TYPE_MAX\n\n  } T1_FieldType;\n\n\n  typedef enum  T1_FieldLocation_\n  {\n    T1_FIELD_LOCATION_CID_INFO,\n    T1_FIELD_LOCATION_FONT_DICT,\n    T1_FIELD_LOCATION_FONT_EXTRA,\n    T1_FIELD_LOCATION_FONT_INFO,\n    T1_FIELD_LOCATION_PRIVATE,\n    T1_FIELD_LOCATION_BBOX,\n    T1_FIELD_LOCATION_LOADER,\n    T1_FIELD_LOCATION_FACE,\n    T1_FIELD_LOCATION_BLEND,\n\n    /* do not remove */\n    T1_FIELD_LOCATION_MAX\n\n  } T1_FieldLocation;\n\n\n  typedef void\n  (*T1_Field_ParseFunc)( FT_Face     face,\n                         FT_Pointer  parser );\n\n\n  /* structure type used to model object fields */\n  typedef struct  T1_FieldRec_\n  {\n    const char*         ident;        /* field identifier               */\n    T1_FieldLocation    location;\n    T1_FieldType        type;         /* type of field                  */\n    T1_Field_ParseFunc  reader;\n    FT_UInt             offset;       /* offset of field in object      */\n    FT_Byte             size;         /* size of field in bytes         */\n    FT_UInt             array_max;    /* maximum number of elements for */\n                                      /* array                          */\n    FT_UInt             count_offset; /* offset of element count for    */\n                                      /* arrays; must not be zero if in */\n                                      /* use -- in other words, a       */\n                                      /* `num_FOO' element must not     */\n                                      /* start the used structure if we */\n                                      /* parse a `FOO' array            */\n    FT_UInt             dict;         /* where we expect it             */\n  } T1_FieldRec;\n\n#define T1_FIELD_DICT_FONTDICT ( 1 << 0 ) /* also FontInfo and FDArray */\n#define T1_FIELD_DICT_PRIVATE  ( 1 << 1 )\n\n\n\n#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname, _dict ) \\\n          {                                                 \\\n            _ident, T1CODE, _type,                          \\\n            0,                                              \\\n            FT_FIELD_OFFSET( _fname ),                      \\\n            FT_FIELD_SIZE( _fname ),                        \\\n            0, 0,                                           \\\n            _dict                                           \\\n          },\n\n#define T1_NEW_CALLBACK_FIELD( _ident, _reader, _dict ) \\\n          {                                             \\\n            _ident, T1CODE, T1_FIELD_TYPE_CALLBACK,     \\\n            (T1_Field_ParseFunc)_reader,                \\\n            0, 0,                                       \\\n            0, 0,                                       \\\n            _dict                                       \\\n          },\n\n#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max, _dict ) \\\n          {                                                      \\\n            _ident, T1CODE, _type,                               \\\n            0,                                                   \\\n            FT_FIELD_OFFSET( _fname ),                           \\\n            FT_FIELD_SIZE_DELTA( _fname ),                       \\\n            _max,                                                \\\n            FT_FIELD_OFFSET( num_ ## _fname ),                   \\\n            _dict                                                \\\n          },\n\n#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max, _dict ) \\\n          {                                                       \\\n            _ident, T1CODE, _type,                                \\\n            0,                                                    \\\n            FT_FIELD_OFFSET( _fname ),                            \\\n            FT_FIELD_SIZE_DELTA( _fname ),                        \\\n            _max, 0,                                              \\\n            _dict                                                 \\\n          },\n\n\n#define T1_FIELD_BOOL( _ident, _fname, _dict )                             \\\n          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname, _dict )\n\n#define T1_FIELD_NUM( _ident, _fname, _dict )                                 \\\n          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname, _dict )\n\n#define T1_FIELD_FIXED( _ident, _fname, _dict )                             \\\n          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname, _dict )\n\n#define T1_FIELD_FIXED_1000( _ident, _fname, _dict )                     \\\n          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname, \\\n                               _dict )\n\n#define T1_FIELD_STRING( _ident, _fname, _dict )                             \\\n          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname, _dict )\n\n#define T1_FIELD_KEY( _ident, _fname, _dict )                             \\\n          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname, _dict )\n\n#define T1_FIELD_BBOX( _ident, _fname, _dict )                             \\\n          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname, _dict )\n\n\n#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax, _dict )         \\\n          T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \\\n                              _fname, _fmax, _dict )\n\n#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax, _dict )     \\\n          T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \\\n                              _fname, _fmax, _dict )\n\n#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax, _dict )         \\\n          T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \\\n                               _fname, _fmax, _dict )\n\n#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax, _dict )     \\\n          T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \\\n                               _fname, _fmax, _dict )\n\n#define T1_FIELD_CALLBACK( _ident, _name, _dict )       \\\n          T1_NEW_CALLBACK_FIELD( _ident, _name, _dict )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                            T1 PARSER                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef const struct PS_Parser_FuncsRec_*  PS_Parser_Funcs;\n\n  typedef struct  PS_Parser_FuncsRec_\n  {\n    void\n    (*init)( PS_Parser  parser,\n             FT_Byte*   base,\n             FT_Byte*   limit,\n             FT_Memory  memory );\n\n    void\n    (*done)( PS_Parser  parser );\n\n    void\n    (*skip_spaces)( PS_Parser  parser );\n    void\n    (*skip_PS_token)( PS_Parser  parser );\n\n    FT_Long\n    (*to_int)( PS_Parser  parser );\n    FT_Fixed\n    (*to_fixed)( PS_Parser  parser,\n                 FT_Int     power_ten );\n\n    FT_Error\n    (*to_bytes)( PS_Parser  parser,\n                 FT_Byte*   bytes,\n                 FT_Offset  max_bytes,\n                 FT_Long*   pnum_bytes,\n                 FT_Bool    delimiters );\n\n    FT_Int\n    (*to_coord_array)( PS_Parser  parser,\n                       FT_Int     max_coords,\n                       FT_Short*  coords );\n    FT_Int\n    (*to_fixed_array)( PS_Parser  parser,\n                       FT_Int     max_values,\n                       FT_Fixed*  values,\n                       FT_Int     power_ten );\n\n    void\n    (*to_token)( PS_Parser  parser,\n                 T1_Token   token );\n    void\n    (*to_token_array)( PS_Parser  parser,\n                       T1_Token   tokens,\n                       FT_UInt    max_tokens,\n                       FT_Int*    pnum_tokens );\n\n    FT_Error\n    (*load_field)( PS_Parser       parser,\n                   const T1_Field  field,\n                   void**          objects,\n                   FT_UInt         max_objects,\n                   FT_ULong*       pflags );\n\n    FT_Error\n    (*load_field_table)( PS_Parser       parser,\n                         const T1_Field  field,\n                         void**          objects,\n                         FT_UInt         max_objects,\n                         FT_ULong*       pflags );\n\n  } PS_Parser_FuncsRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_ParserRec                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A PS_Parser is an object used to parse a Type 1 font very quickly. */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    cursor :: The current position in the text.                        */\n  /*                                                                       */\n  /*    base   :: Start of the processed text.                             */\n  /*                                                                       */\n  /*    limit  :: End of the processed text.                               */\n  /*                                                                       */\n  /*    error  :: The last error returned.                                 */\n  /*                                                                       */\n  /*    memory :: The object used for memory operations (alloc/realloc).   */\n  /*                                                                       */\n  /*    funcs  :: A table of functions for the parser.                     */\n  /*                                                                       */\n  typedef struct  PS_ParserRec_\n  {\n    FT_Byte*   cursor;\n    FT_Byte*   base;\n    FT_Byte*   limit;\n    FT_Error   error;\n    FT_Memory  memory;\n\n    PS_Parser_FuncsRec  funcs;\n\n  } PS_ParserRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         T1 BUILDER                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  typedef struct T1_BuilderRec_*  T1_Builder;\n\n\n  typedef FT_Error\n  (*T1_Builder_Check_Points_Func)( T1_Builder  builder,\n                                   FT_Int      count );\n\n  typedef void\n  (*T1_Builder_Add_Point_Func)( T1_Builder  builder,\n                                FT_Pos      x,\n                                FT_Pos      y,\n                                FT_Byte     flag );\n\n  typedef FT_Error\n  (*T1_Builder_Add_Point1_Func)( T1_Builder  builder,\n                                 FT_Pos      x,\n                                 FT_Pos      y );\n\n  typedef FT_Error\n  (*T1_Builder_Add_Contour_Func)( T1_Builder  builder );\n\n  typedef FT_Error\n  (*T1_Builder_Start_Point_Func)( T1_Builder  builder,\n                                  FT_Pos      x,\n                                  FT_Pos      y );\n\n  typedef void\n  (*T1_Builder_Close_Contour_Func)( T1_Builder  builder );\n\n\n  typedef const struct T1_Builder_FuncsRec_*  T1_Builder_Funcs;\n\n  typedef struct  T1_Builder_FuncsRec_\n  {\n    void\n    (*init)( T1_Builder    builder,\n             FT_Face       face,\n             FT_Size       size,\n             FT_GlyphSlot  slot,\n             FT_Bool       hinting );\n\n    void\n    (*done)( T1_Builder   builder );\n\n    T1_Builder_Check_Points_Func   check_points;\n    T1_Builder_Add_Point_Func      add_point;\n    T1_Builder_Add_Point1_Func     add_point1;\n    T1_Builder_Add_Contour_Func    add_contour;\n    T1_Builder_Start_Point_Func    start_point;\n    T1_Builder_Close_Contour_Func  close_contour;\n\n  } T1_Builder_FuncsRec;\n\n\n  /* an enumeration type to handle charstring parsing states */\n  typedef enum  T1_ParseState_\n  {\n    T1_Parse_Start,\n    T1_Parse_Have_Width,\n    T1_Parse_Have_Moveto,\n    T1_Parse_Have_Path\n\n  } T1_ParseState;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Structure>                                                           */\n  /*    T1_BuilderRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*     A structure used during glyph loading to store its outline.       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    memory       :: The current memory object.                         */\n  /*                                                                       */\n  /*    face         :: The current face object.                           */\n  /*                                                                       */\n  /*    glyph        :: The current glyph slot.                            */\n  /*                                                                       */\n  /*    loader       :: XXX                                                */\n  /*                                                                       */\n  /*    base         :: The base glyph outline.                            */\n  /*                                                                       */\n  /*    current      :: The current glyph outline.                         */\n  /*                                                                       */\n  /*    max_points   :: maximum points in builder outline                  */\n  /*                                                                       */\n  /*    max_contours :: Maximum number of contours in builder outline.     */\n  /*                                                                       */\n  /*    pos_x        :: The horizontal translation (if composite glyph).   */\n  /*                                                                       */\n  /*    pos_y        :: The vertical translation (if composite glyph).     */\n  /*                                                                       */\n  /*    left_bearing :: The left side bearing point.                       */\n  /*                                                                       */\n  /*    advance      :: The horizontal advance vector.                     */\n  /*                                                                       */\n  /*    bbox         :: Unused.                                            */\n  /*                                                                       */\n  /*    parse_state  :: An enumeration which controls the charstring       */\n  /*                    parsing state.                                     */\n  /*                                                                       */\n  /*    load_points  :: If this flag is not set, no points are loaded.     */\n  /*                                                                       */\n  /*    no_recurse   :: Set but not used.                                  */\n  /*                                                                       */\n  /*    metrics_only :: A boolean indicating that we only want to compute  */\n  /*                    the metrics of a given glyph, not load all of its  */\n  /*                    points.                                            */\n  /*                                                                       */\n  /*    funcs        :: An array of function pointers for the builder.     */\n  /*                                                                       */\n  typedef struct  T1_BuilderRec_\n  {\n    FT_Memory       memory;\n    FT_Face         face;\n    FT_GlyphSlot    glyph;\n    FT_GlyphLoader  loader;\n    FT_Outline*     base;\n    FT_Outline*     current;\n\n    FT_Pos          pos_x;\n    FT_Pos          pos_y;\n\n    FT_Vector       left_bearing;\n    FT_Vector       advance;\n\n    FT_BBox         bbox;          /* bounding box */\n    T1_ParseState   parse_state;\n    FT_Bool         load_points;\n    FT_Bool         no_recurse;\n\n    FT_Bool         metrics_only;\n\n    void*           hints_funcs;    /* hinter-specific */\n    void*           hints_globals;  /* hinter-specific */\n\n    T1_Builder_FuncsRec  funcs;\n\n  } T1_BuilderRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         T1 DECODER                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#if 0\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */\n  /* calls during glyph loading.                                           */\n  /*                                                                       */\n#define T1_MAX_SUBRS_CALLS  8\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */\n  /* minimum of 16 is required.                                            */\n  /*                                                                       */\n#define T1_MAX_CHARSTRINGS_OPERANDS  32\n\n#endif /* 0 */\n\n\n  typedef struct  T1_Decoder_ZoneRec_\n  {\n    FT_Byte*  cursor;\n    FT_Byte*  base;\n    FT_Byte*  limit;\n\n  } T1_Decoder_ZoneRec, *T1_Decoder_Zone;\n\n\n  typedef struct T1_DecoderRec_*              T1_Decoder;\n  typedef const struct T1_Decoder_FuncsRec_*  T1_Decoder_Funcs;\n\n\n  typedef FT_Error\n  (*T1_Decoder_Callback)( T1_Decoder  decoder,\n                          FT_UInt     glyph_index );\n\n\n  typedef struct  T1_Decoder_FuncsRec_\n  {\n    FT_Error\n    (*init)( T1_Decoder           decoder,\n             FT_Face              face,\n             FT_Size              size,\n             FT_GlyphSlot         slot,\n             FT_Byte**            glyph_names,\n             PS_Blend             blend,\n             FT_Bool              hinting,\n             FT_Render_Mode       hint_mode,\n             T1_Decoder_Callback  callback );\n\n    void\n    (*done)( T1_Decoder  decoder );\n\n    FT_Error\n    (*parse_charstrings)( T1_Decoder  decoder,\n                          FT_Byte*    base,\n                          FT_UInt     len );\n\n  } T1_Decoder_FuncsRec;\n\n\n  typedef struct  T1_DecoderRec_\n  {\n    T1_BuilderRec        builder;\n\n    FT_Long              stack[T1_MAX_CHARSTRINGS_OPERANDS];\n    FT_Long*             top;\n\n    T1_Decoder_ZoneRec   zones[T1_MAX_SUBRS_CALLS + 1];\n    T1_Decoder_Zone      zone;\n\n    FT_Service_PsCMaps   psnames;      /* for seac */\n    FT_UInt              num_glyphs;\n    FT_Byte**            glyph_names;\n\n    FT_Int               lenIV;        /* internal for sub routine calls */\n    FT_UInt              num_subrs;\n    FT_Byte**            subrs;\n    FT_PtrDist*          subrs_len;    /* array of subrs length (optional) */\n\n    FT_Matrix            font_matrix;\n    FT_Vector            font_offset;\n\n    FT_Int               flex_state;\n    FT_Int               num_flex_vectors;\n    FT_Vector            flex_vectors[7];\n\n    PS_Blend             blend;       /* for multiple master support */\n\n    FT_Render_Mode       hint_mode;\n\n    T1_Decoder_Callback  parse_callback;\n    T1_Decoder_FuncsRec  funcs;\n\n    FT_Long*             buildchar;\n    FT_UInt              len_buildchar;\n\n    FT_Bool              seac;\n\n  } T1_DecoderRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                            AFM PARSER                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct AFM_ParserRec_*  AFM_Parser;\n\n  typedef struct  AFM_Parser_FuncsRec_\n  {\n    FT_Error\n    (*init)( AFM_Parser  parser,\n             FT_Memory   memory,\n             FT_Byte*    base,\n             FT_Byte*    limit );\n\n    void\n    (*done)( AFM_Parser  parser );\n\n    FT_Error\n    (*parse)( AFM_Parser  parser );\n\n  } AFM_Parser_FuncsRec;\n\n\n  typedef struct AFM_StreamRec_*  AFM_Stream;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    AFM_ParserRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An AFM_Parser is a parser for the AFM files.                       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    memory    :: The object used for memory operations (alloc and      */\n  /*                 realloc).                                             */\n  /*                                                                       */\n  /*    stream    :: This is an opaque object.                             */\n  /*                                                                       */\n  /*    FontInfo  :: The result will be stored here.                       */\n  /*                                                                       */\n  /*    get_index :: A user provided function to get a glyph index by its  */\n  /*                 name.                                                 */\n  /*                                                                       */\n  typedef struct  AFM_ParserRec_\n  {\n    FT_Memory     memory;\n    AFM_Stream    stream;\n\n    AFM_FontInfo  FontInfo;\n\n    FT_Int\n    (*get_index)( const char*  name,\n                  FT_Offset    len,\n                  void*        user_data );\n\n    void*         user_data;\n\n  } AFM_ParserRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     TYPE1 CHARMAPS                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef const struct T1_CMap_ClassesRec_*  T1_CMap_Classes;\n\n  typedef struct T1_CMap_ClassesRec_\n  {\n    FT_CMap_Class  standard;\n    FT_CMap_Class  expert;\n    FT_CMap_Class  custom;\n    FT_CMap_Class  unicode;\n\n  } T1_CMap_ClassesRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        PSAux Module Interface                 *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  PSAux_ServiceRec_\n  {\n    /* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */\n    const PS_Table_FuncsRec*    ps_table_funcs;\n    const PS_Parser_FuncsRec*   ps_parser_funcs;\n    const T1_Builder_FuncsRec*  t1_builder_funcs;\n    const T1_Decoder_FuncsRec*  t1_decoder_funcs;\n\n    void\n    (*t1_decrypt)( FT_Byte*   buffer,\n                   FT_Offset  length,\n                   FT_UShort  seed );\n\n    T1_CMap_Classes  t1_cmap_classes;\n\n    /* fields after this comment line were added after version 2.1.10 */\n    const AFM_Parser_FuncsRec*  afm_parser_funcs;\n\n  } PSAux_ServiceRec, *PSAux_Service;\n\n  /* backwards-compatible type definition */\n  typedef PSAux_ServiceRec   PSAux_Interface;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                 Some convenience functions                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define IS_PS_NEWLINE( ch ) \\\n  ( (ch) == '\\r' ||         \\\n    (ch) == '\\n' )\n\n#define IS_PS_SPACE( ch )  \\\n  ( (ch) == ' '         || \\\n    IS_PS_NEWLINE( ch ) || \\\n    (ch) == '\\t'        || \\\n    (ch) == '\\f'        || \\\n    (ch) == '\\0' )\n\n#define IS_PS_SPECIAL( ch )       \\\n  ( (ch) == '/'                || \\\n    (ch) == '(' || (ch) == ')' || \\\n    (ch) == '<' || (ch) == '>' || \\\n    (ch) == '[' || (ch) == ']' || \\\n    (ch) == '{' || (ch) == '}' || \\\n    (ch) == '%'                )\n\n#define IS_PS_DELIM( ch )  \\\n  ( IS_PS_SPACE( ch )   || \\\n    IS_PS_SPECIAL( ch ) )\n\n#define IS_PS_DIGIT( ch )        \\\n  ( (ch) >= '0' && (ch) <= '9' )\n\n#define IS_PS_XDIGIT( ch )            \\\n  ( IS_PS_DIGIT( ch )              || \\\n    ( (ch) >= 'A' && (ch) <= 'F' ) || \\\n    ( (ch) >= 'a' && (ch) <= 'f' ) )\n\n#define IS_PS_BASE85( ch )       \\\n  ( (ch) >= '!' && (ch) <= 'u' )\n\n#define IS_PS_TOKEN( cur, limit, token )                                \\\n  ( (char)(cur)[0] == (token)[0]                                     && \\\n    ( (cur) + sizeof ( (token) ) == (limit) ||                          \\\n      ( (cur) + sizeof( (token) ) < (limit)          &&                 \\\n        IS_PS_DELIM( (cur)[sizeof ( (token) ) - 1] ) ) )             && \\\n    ft_strncmp( (char*)(cur), (token), sizeof ( (token) ) - 1 ) == 0 )\n\n\nFT_END_HEADER\n\n#endif /* __PSAUX_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/pshints.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshints.h                                                              */\n/*                                                                         */\n/*    Interface to Postscript-specific (Type 1 and Type 2) hints           */\n/*    recorders (specification only).  These are used to support native    */\n/*    T1/T2 hints in the `type1', `cid', and `cff' font drivers.           */\n/*                                                                         */\n/*  Copyright 2001-2003, 2005-2007, 2009, 2012, 2014 by                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSHINTS_H__\n#define __PSHINTS_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_TYPE1_TABLES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****               INTERNAL REPRESENTATION OF GLOBALS              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct PSH_GlobalsRec_*  PSH_Globals;\n\n  typedef FT_Error\n  (*PSH_Globals_NewFunc)( FT_Memory     memory,\n                          T1_Private*   private_dict,\n                          PSH_Globals*  aglobals );\n\n  typedef void\n  (*PSH_Globals_SetScaleFunc)( PSH_Globals  globals,\n                               FT_Fixed     x_scale,\n                               FT_Fixed     y_scale,\n                               FT_Fixed     x_delta,\n                               FT_Fixed     y_delta );\n\n  typedef void\n  (*PSH_Globals_DestroyFunc)( PSH_Globals  globals );\n\n\n  typedef struct  PSH_Globals_FuncsRec_\n  {\n    PSH_Globals_NewFunc       create;\n    PSH_Globals_SetScaleFunc  set_scale;\n    PSH_Globals_DestroyFunc   destroy;\n\n  } PSH_Globals_FuncsRec, *PSH_Globals_Funcs;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  PUBLIC TYPE 1 HINTS RECORDER                 *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************\n   *\n   * @type:\n   *   T1_Hints\n   *\n   * @description:\n   *   This is a handle to an opaque structure used to record glyph hints\n   *   from a Type 1 character glyph character string.\n   *\n   *   The methods used to operate on this object are defined by the\n   *   @T1_Hints_FuncsRec structure.  Recording glyph hints is normally\n   *   achieved through the following scheme:\n   *\n   *   - Open a new hint recording session by calling the `open' method.\n   *     This rewinds the recorder and prepare it for new input.\n   *\n   *   - For each hint found in the glyph charstring, call the corresponding\n   *     method (`stem', `stem3', or `reset').  Note that these functions do\n   *     not return an error code.\n   *\n   *   - Close the recording session by calling the `close' method.  It\n   *     returns an error code if the hints were invalid or something\n   *     strange happened (e.g., memory shortage).\n   *\n   *   The hints accumulated in the object can later be used by the\n   *   PostScript hinter.\n   *\n   */\n  typedef struct T1_HintsRec_*  T1_Hints;\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   T1_Hints_Funcs\n   *\n   * @description:\n   *   A pointer to the @T1_Hints_FuncsRec structure that defines the API of\n   *   a given @T1_Hints object.\n   *\n   */\n  typedef const struct T1_Hints_FuncsRec_*  T1_Hints_Funcs;\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T1_Hints_OpenFunc\n   *\n   * @description:\n   *   A method of the @T1_Hints class used to prepare it for a new Type 1\n   *   hints recording session.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 1 hints recorder.\n   *\n   * @note:\n   *   You should always call the @T1_Hints_CloseFunc method in order to\n   *   close an opened recording session.\n   *\n   */\n  typedef void\n  (*T1_Hints_OpenFunc)( T1_Hints  hints );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T1_Hints_SetStemFunc\n   *\n   * @description:\n   *   A method of the @T1_Hints class used to record a new horizontal or\n   *   vertical stem.  This corresponds to the Type 1 `hstem' and `vstem'\n   *   operators.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 1 hints recorder.\n   *\n   *   dimension ::\n   *     0 for horizontal stems (hstem), 1 for vertical ones (vstem).\n   *\n   *   coords ::\n   *     Array of 2 coordinates in 16.16 format, used as (position,length)\n   *     stem descriptor.\n   *\n   * @note:\n   *   Use vertical coordinates (y) for horizontal stems (dim=0).  Use\n   *   horizontal coordinates (x) for vertical stems (dim=1).\n   *\n   *   `coords[0]' is the absolute stem position (lowest coordinate);\n   *   `coords[1]' is the length.\n   *\n   *   The length can be negative, in which case it must be either -20 or\n   *   -21.  It is interpreted as a `ghost' stem, according to the Type 1\n   *   specification.\n   *\n   *   If the length is -21 (corresponding to a bottom ghost stem), then\n   *   the real stem position is `coords[0]+coords[1]'.\n   *\n   */\n  typedef void\n  (*T1_Hints_SetStemFunc)( T1_Hints   hints,\n                           FT_UInt    dimension,\n                           FT_Fixed*  coords );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T1_Hints_SetStem3Func\n   *\n   * @description:\n   *   A method of the @T1_Hints class used to record three\n   *   counter-controlled horizontal or vertical stems at once.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 1 hints recorder.\n   *\n   *   dimension ::\n   *     0 for horizontal stems, 1 for vertical ones.\n   *\n   *   coords ::\n   *     An array of 6 values in 16.16 format, holding 3 (position,length)\n   *     pairs for the counter-controlled stems.\n   *\n   * @note:\n   *   Use vertical coordinates (y) for horizontal stems (dim=0).  Use\n   *   horizontal coordinates (x) for vertical stems (dim=1).\n   *\n   *   The lengths cannot be negative (ghost stems are never\n   *   counter-controlled).\n   *\n   */\n  typedef void\n  (*T1_Hints_SetStem3Func)( T1_Hints   hints,\n                            FT_UInt    dimension,\n                            FT_Fixed*  coords );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T1_Hints_ResetFunc\n   *\n   * @description:\n   *   A method of the @T1_Hints class used to reset the stems hints in a\n   *   recording session.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 1 hints recorder.\n   *\n   *   end_point ::\n   *     The index of the last point in the input glyph in which the\n   *     previously defined hints apply.\n   *\n   */\n  typedef void\n  (*T1_Hints_ResetFunc)( T1_Hints  hints,\n                         FT_UInt   end_point );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T1_Hints_CloseFunc\n   *\n   * @description:\n   *   A method of the @T1_Hints class used to close a hint recording\n   *   session.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 1 hints recorder.\n   *\n   *   end_point ::\n   *     The index of the last point in the input glyph.\n   *\n   * @return:\n   *   FreeType error code.  0 means success.\n   *\n   * @note:\n   *   The error code is set to indicate that an error occurred during the\n   *   recording session.\n   *\n   */\n  typedef FT_Error\n  (*T1_Hints_CloseFunc)( T1_Hints  hints,\n                         FT_UInt   end_point );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T1_Hints_ApplyFunc\n   *\n   * @description:\n   *   A method of the @T1_Hints class used to apply hints to the\n   *   corresponding glyph outline.  Must be called once all hints have been\n   *   recorded.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 1 hints recorder.\n   *\n   *   outline ::\n   *     A pointer to the target outline descriptor.\n   *\n   *   globals ::\n   *     The hinter globals for this font.\n   *\n   *   hint_mode ::\n   *     Hinting information.\n   *\n   * @return:\n   *   FreeType error code.  0 means success.\n   *\n   * @note:\n   *   On input, all points within the outline are in font coordinates. On\n   *   output, they are in 1/64th of pixels.\n   *\n   *   The scaling transformation is taken from the `globals' object which\n   *   must correspond to the same font as the glyph.\n   *\n   */\n  typedef FT_Error\n  (*T1_Hints_ApplyFunc)( T1_Hints        hints,\n                         FT_Outline*     outline,\n                         PSH_Globals     globals,\n                         FT_Render_Mode  hint_mode );\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   T1_Hints_FuncsRec\n   *\n   * @description:\n   *   The structure used to provide the API to @T1_Hints objects.\n   *\n   * @fields:\n   *   hints ::\n   *     A handle to the T1 Hints recorder.\n   *\n   *   open ::\n   *     The function to open a recording session.\n   *\n   *   close ::\n   *     The function to close a recording session.\n   *\n   *   stem ::\n   *     The function to set a simple stem.\n   *\n   *   stem3 ::\n   *     The function to set counter-controlled stems.\n   *\n   *   reset ::\n   *     The function to reset stem hints.\n   *\n   *   apply ::\n   *     The function to apply the hints to the corresponding glyph outline.\n   *\n   */\n  typedef struct  T1_Hints_FuncsRec_\n  {\n    T1_Hints               hints;\n    T1_Hints_OpenFunc      open;\n    T1_Hints_CloseFunc     close;\n    T1_Hints_SetStemFunc   stem;\n    T1_Hints_SetStem3Func  stem3;\n    T1_Hints_ResetFunc     reset;\n    T1_Hints_ApplyFunc     apply;\n\n  } T1_Hints_FuncsRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  PUBLIC TYPE 2 HINTS RECORDER                 *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************\n   *\n   * @type:\n   *   T2_Hints\n   *\n   * @description:\n   *   This is a handle to an opaque structure used to record glyph hints\n   *   from a Type 2 character glyph character string.\n   *\n   *   The methods used to operate on this object are defined by the\n   *   @T2_Hints_FuncsRec structure.  Recording glyph hints is normally\n   *   achieved through the following scheme:\n   *\n   *   - Open a new hint recording session by calling the `open' method.\n   *     This rewinds the recorder and prepare it for new input.\n   *\n   *   - For each hint found in the glyph charstring, call the corresponding\n   *     method (`stems', `hintmask', `counters').  Note that these\n   *     functions do not return an error code.\n   *\n   *   - Close the recording session by calling the `close' method.  It\n   *     returns an error code if the hints were invalid or something\n   *     strange happened (e.g., memory shortage).\n   *\n   *   The hints accumulated in the object can later be used by the\n   *   Postscript hinter.\n   *\n   */\n  typedef struct T2_HintsRec_*  T2_Hints;\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   T2_Hints_Funcs\n   *\n   * @description:\n   *   A pointer to the @T2_Hints_FuncsRec structure that defines the API of\n   *   a given @T2_Hints object.\n   *\n   */\n  typedef const struct T2_Hints_FuncsRec_*  T2_Hints_Funcs;\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T2_Hints_OpenFunc\n   *\n   * @description:\n   *   A method of the @T2_Hints class used to prepare it for a new Type 2\n   *   hints recording session.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 2 hints recorder.\n   *\n   * @note:\n   *   You should always call the @T2_Hints_CloseFunc method in order to\n   *   close an opened recording session.\n   *\n   */\n  typedef void\n  (*T2_Hints_OpenFunc)( T2_Hints  hints );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T2_Hints_StemsFunc\n   *\n   * @description:\n   *   A method of the @T2_Hints class used to set the table of stems in\n   *   either the vertical or horizontal dimension.  Equivalent to the\n   *   `hstem', `vstem', `hstemhm', and `vstemhm' Type 2 operators.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 2 hints recorder.\n   *\n   *   dimension ::\n   *     0 for horizontal stems (hstem), 1 for vertical ones (vstem).\n   *\n   *   count ::\n   *     The number of stems.\n   *\n   *   coords ::\n   *     An array of `count' (position,length) pairs in 16.16 format.\n   *\n   * @note:\n   *   Use vertical coordinates (y) for horizontal stems (dim=0).  Use\n   *   horizontal coordinates (x) for vertical stems (dim=1).\n   *\n   *   There are `2*count' elements in the `coords' array.  Each even\n   *   element is an absolute position in font units, each odd element is a\n   *   length in font units.\n   *\n   *   A length can be negative, in which case it must be either -20 or\n   *   -21.  It is interpreted as a `ghost' stem, according to the Type 1\n   *   specification.\n   *\n   */\n  typedef void\n  (*T2_Hints_StemsFunc)( T2_Hints   hints,\n                         FT_UInt    dimension,\n                         FT_UInt    count,\n                         FT_Fixed*  coordinates );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T2_Hints_MaskFunc\n   *\n   * @description:\n   *   A method of the @T2_Hints class used to set a given hintmask (this\n   *   corresponds to the `hintmask' Type 2 operator).\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 2 hints recorder.\n   *\n   *   end_point ::\n   *     The glyph index of the last point to which the previously defined\n   *     or activated hints apply.\n   *\n   *   bit_count ::\n   *     The number of bits in the hint mask.\n   *\n   *   bytes ::\n   *     An array of bytes modelling the hint mask.\n   *\n   * @note:\n   *   If the hintmask starts the charstring (before any glyph point\n   *   definition), the value of `end_point' should be 0.\n   *\n   *   `bit_count' is the number of meaningful bits in the `bytes' array; it\n   *   must be equal to the total number of hints defined so far (i.e.,\n   *   horizontal+verticals).\n   *\n   *   The `bytes' array can come directly from the Type 2 charstring and\n   *   respects the same format.\n   *\n   */\n  typedef void\n  (*T2_Hints_MaskFunc)( T2_Hints        hints,\n                        FT_UInt         end_point,\n                        FT_UInt         bit_count,\n                        const FT_Byte*  bytes );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T2_Hints_CounterFunc\n   *\n   * @description:\n   *   A method of the @T2_Hints class used to set a given counter mask\n   *   (this corresponds to the `hintmask' Type 2 operator).\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 2 hints recorder.\n   *\n   *   end_point ::\n   *     A glyph index of the last point to which the previously defined or\n   *     active hints apply.\n   *\n   *   bit_count ::\n   *     The number of bits in the hint mask.\n   *\n   *   bytes ::\n   *     An array of bytes modelling the hint mask.\n   *\n   * @note:\n   *   If the hintmask starts the charstring (before any glyph point\n   *   definition), the value of `end_point' should be 0.\n   *\n   *   `bit_count' is the number of meaningful bits in the `bytes' array; it\n   *   must be equal to the total number of hints defined so far (i.e.,\n   *   horizontal+verticals).\n   *\n   *    The `bytes' array can come directly from the Type 2 charstring and\n   *    respects the same format.\n   *\n   */\n  typedef void\n  (*T2_Hints_CounterFunc)( T2_Hints        hints,\n                           FT_UInt         bit_count,\n                           const FT_Byte*  bytes );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T2_Hints_CloseFunc\n   *\n   * @description:\n   *   A method of the @T2_Hints class used to close a hint recording\n   *   session.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 2 hints recorder.\n   *\n   *   end_point ::\n   *     The index of the last point in the input glyph.\n   *\n   * @return:\n   *   FreeType error code.  0 means success.\n   *\n   * @note:\n   *   The error code is set to indicate that an error occurred during the\n   *   recording session.\n   *\n   */\n  typedef FT_Error\n  (*T2_Hints_CloseFunc)( T2_Hints  hints,\n                         FT_UInt   end_point );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   T2_Hints_ApplyFunc\n   *\n   * @description:\n   *   A method of the @T2_Hints class used to apply hints to the\n   *   corresponding glyph outline.  Must be called after the `close'\n   *   method.\n   *\n   * @input:\n   *   hints ::\n   *     A handle to the Type 2 hints recorder.\n   *\n   *   outline ::\n   *     A pointer to the target outline descriptor.\n   *\n   *   globals ::\n   *     The hinter globals for this font.\n   *\n   *   hint_mode ::\n   *     Hinting information.\n   *\n   * @return:\n   *   FreeType error code.  0 means success.\n   *\n   * @note:\n   *   On input, all points within the outline are in font coordinates. On\n   *   output, they are in 1/64th of pixels.\n   *\n   *   The scaling transformation is taken from the `globals' object which\n   *   must correspond to the same font than the glyph.\n   *\n   */\n  typedef FT_Error\n  (*T2_Hints_ApplyFunc)( T2_Hints        hints,\n                         FT_Outline*     outline,\n                         PSH_Globals     globals,\n                         FT_Render_Mode  hint_mode );\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   T2_Hints_FuncsRec\n   *\n   * @description:\n   *   The structure used to provide the API to @T2_Hints objects.\n   *\n   * @fields:\n   *   hints ::\n   *     A handle to the T2 hints recorder object.\n   *\n   *   open ::\n   *     The function to open a recording session.\n   *\n   *   close ::\n   *     The function to close a recording session.\n   *\n   *   stems ::\n   *     The function to set the dimension's stems table.\n   *\n   *   hintmask ::\n   *     The function to set hint masks.\n   *\n   *   counter ::\n   *     The function to set counter masks.\n   *\n   *   apply ::\n   *     The function to apply the hints on the corresponding glyph outline.\n   *\n   */\n  typedef struct  T2_Hints_FuncsRec_\n  {\n    T2_Hints              hints;\n    T2_Hints_OpenFunc     open;\n    T2_Hints_CloseFunc    close;\n    T2_Hints_StemsFunc    stems;\n    T2_Hints_MaskFunc     hintmask;\n    T2_Hints_CounterFunc  counter;\n    T2_Hints_ApplyFunc    apply;\n\n  } T2_Hints_FuncsRec;\n\n\n  /* */\n\n\n  typedef struct  PSHinter_Interface_\n  {\n    PSH_Globals_Funcs  (*get_globals_funcs)( FT_Module  module );\n    T1_Hints_Funcs     (*get_t1_funcs)     ( FT_Module  module );\n    T2_Hints_Funcs     (*get_t2_funcs)     ( FT_Module  module );\n\n  } PSHinter_Interface;\n\n  typedef PSHinter_Interface*  PSHinter_Service;\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_PSHINTER_INTERFACE(        \\\n          class_,                            \\\n          get_globals_funcs_,                \\\n          get_t1_funcs_,                     \\\n          get_t2_funcs_ )                    \\\n  static const PSHinter_Interface  class_ =  \\\n  {                                          \\\n    get_globals_funcs_,                      \\\n    get_t1_funcs_,                           \\\n    get_t2_funcs_                            \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_PSHINTER_INTERFACE(                      \\\n          class_,                                          \\\n          get_globals_funcs_,                              \\\n          get_t1_funcs_,                                   \\\n          get_t2_funcs_ )                                  \\\n  void                                                     \\\n  FT_Init_Class_ ## class_( FT_Library           library,  \\\n                            PSHinter_Interface*  clazz )   \\\n  {                                                        \\\n    FT_UNUSED( library );                                  \\\n                                                           \\\n    clazz->get_globals_funcs = get_globals_funcs_;         \\\n    clazz->get_t1_funcs      = get_t1_funcs_;              \\\n    clazz->get_t2_funcs      = get_t2_funcs_;              \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\nFT_END_HEADER\n\n#endif /* __PSHINTS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svbdf.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svbdf.h                                                                */\n/*                                                                         */\n/*    The FreeType BDF services (specification).                           */\n/*                                                                         */\n/*  Copyright 2003, 2009, 2012 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVBDF_H__\n#define __SVBDF_H__\n\n#include FT_BDF_H\n#include FT_INTERNAL_SERVICE_H\n\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_BDF  \"bdf\"\n\n  typedef FT_Error\n  (*FT_BDF_GetCharsetIdFunc)( FT_Face       face,\n                              const char*  *acharset_encoding,\n                              const char*  *acharset_registry );\n\n  typedef FT_Error\n  (*FT_BDF_GetPropertyFunc)( FT_Face           face,\n                             const char*       prop_name,\n                             BDF_PropertyRec  *aproperty );\n\n\n  FT_DEFINE_SERVICE( BDF )\n  {\n    FT_BDF_GetCharsetIdFunc  get_charset_id;\n    FT_BDF_GetPropertyFunc   get_property;\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_BDFRec( class_,                                \\\n                                  get_charset_id_,                       \\\n                                  get_property_ )                        \\\n  static const FT_Service_BDFRec  class_ =                               \\\n  {                                                                      \\\n    get_charset_id_, get_property_                                       \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_BDFRec( class_,                                \\\n                                  get_charset_id_,                       \\\n                                  get_property_ )                        \\\n  void                                                                   \\\n  FT_Init_Class_ ## class_( FT_Service_BDFRec*  clazz )                  \\\n  {                                                                      \\\n    clazz->get_charset_id = get_charset_id_;                             \\\n    clazz->get_property   = get_property_;                               \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVBDF_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svcid.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svcid.h                                                                */\n/*                                                                         */\n/*    The FreeType CID font services (specification).                      */\n/*                                                                         */\n/*  Copyright 2007, 2009, 2012 by Derek Clegg, Michael Toftdal.            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVCID_H__\n#define __SVCID_H__\n\n#include FT_INTERNAL_SERVICE_H\n\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_CID  \"CID\"\n\n  typedef FT_Error\n  (*FT_CID_GetRegistryOrderingSupplementFunc)( FT_Face       face,\n                                               const char*  *registry,\n                                               const char*  *ordering,\n                                               FT_Int       *supplement );\n  typedef FT_Error\n  (*FT_CID_GetIsInternallyCIDKeyedFunc)( FT_Face   face,\n                                         FT_Bool  *is_cid );\n  typedef FT_Error\n  (*FT_CID_GetCIDFromGlyphIndexFunc)( FT_Face   face,\n                                      FT_UInt   glyph_index,\n                                      FT_UInt  *cid );\n\n  FT_DEFINE_SERVICE( CID )\n  {\n    FT_CID_GetRegistryOrderingSupplementFunc  get_ros;\n    FT_CID_GetIsInternallyCIDKeyedFunc        get_is_cid;\n    FT_CID_GetCIDFromGlyphIndexFunc           get_cid_from_glyph_index;\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_CIDREC( class_,                                   \\\n                                  get_ros_,                                 \\\n                                  get_is_cid_,                              \\\n                                  get_cid_from_glyph_index_ )               \\\n  static const FT_Service_CIDRec class_ =                                   \\\n  {                                                                         \\\n    get_ros_, get_is_cid_, get_cid_from_glyph_index_                        \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_CIDREC( class_,                                   \\\n                                  get_ros_,                                 \\\n                                  get_is_cid_,                              \\\n                                  get_cid_from_glyph_index_ )               \\\n  void                                                                      \\\n  FT_Init_Class_ ## class_( FT_Library          library,                    \\\n                            FT_Service_CIDRec*  clazz )                     \\\n  {                                                                         \\\n    FT_UNUSED( library );                                                   \\\n                                                                            \\\n    clazz->get_ros                  = get_ros_;                             \\\n    clazz->get_is_cid               = get_is_cid_;                          \\\n    clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_;            \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVCID_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svgldict.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svgldict.h                                                             */\n/*                                                                         */\n/*    The FreeType glyph dictionary services (specification).              */\n/*                                                                         */\n/*  Copyright 2003, 2009, 2012 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVGLDICT_H__\n#define __SVGLDICT_H__\n\n#include FT_INTERNAL_SERVICE_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*\n   *  A service used to retrieve glyph names, as well as to find the\n   *  index of a given glyph name in a font.\n   *\n   */\n\n#define FT_SERVICE_ID_GLYPH_DICT  \"glyph-dict\"\n\n\n  typedef FT_Error\n  (*FT_GlyphDict_GetNameFunc)( FT_Face     face,\n                               FT_UInt     glyph_index,\n                               FT_Pointer  buffer,\n                               FT_UInt     buffer_max );\n\n  typedef FT_UInt\n  (*FT_GlyphDict_NameIndexFunc)( FT_Face     face,\n                                 FT_String*  glyph_name );\n\n\n  FT_DEFINE_SERVICE( GlyphDict )\n  {\n    FT_GlyphDict_GetNameFunc    get_name;\n    FT_GlyphDict_NameIndexFunc  name_index;  /* optional */\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_,                        \\\n                                        get_name_,                     \\\n                                        name_index_)                   \\\n  static const FT_Service_GlyphDictRec  class_ =                       \\\n  {                                                                    \\\n    get_name_, name_index_                                             \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_,                        \\\n                                        get_name_,                     \\\n                                        name_index_)                   \\\n  void                                                                 \\\n  FT_Init_Class_ ## class_( FT_Library                library,         \\\n                            FT_Service_GlyphDictRec*  clazz )          \\\n  {                                                                    \\\n    FT_UNUSED( library );                                              \\\n                                                                       \\\n    clazz->get_name   = get_name_;                                     \\\n    clazz->name_index = name_index_;                                   \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVGLDICT_H__ */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svgxval.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svgxval.h                                                              */\n/*                                                                         */\n/*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */\n/*                                                                         */\n/*  Copyright 2004, 2005 by                                                */\n/*  Masatake YAMATO, Red Hat K.K.,                                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVGXVAL_H__\n#define __SVGXVAL_H__\n\n#include FT_GX_VALIDATE_H\n#include FT_INTERNAL_VALIDATE_H\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_GX_VALIDATE           \"truetypegx-validate\"\n#define FT_SERVICE_ID_CLASSICKERN_VALIDATE  \"classickern-validate\"\n\n  typedef FT_Error\n  (*gxv_validate_func)( FT_Face   face,\n                        FT_UInt   gx_flags,\n                        FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],\n                        FT_UInt   table_length );\n\n\n  typedef FT_Error\n  (*ckern_validate_func)( FT_Face   face,\n                          FT_UInt   ckern_flags,\n                          FT_Bytes  *ckern_table );\n\n\n  FT_DEFINE_SERVICE( GXvalidate )\n  {\n    gxv_validate_func  validate;\n  };\n\n  FT_DEFINE_SERVICE( CKERNvalidate )\n  {\n    ckern_validate_func  validate;\n  };\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVGXVAL_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svkern.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svkern.h                                                               */\n/*                                                                         */\n/*    The FreeType Kerning service (specification).                        */\n/*                                                                         */\n/*  Copyright 2006 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVKERN_H__\n#define __SVKERN_H__\n\n#include FT_INTERNAL_SERVICE_H\n#include FT_TRUETYPE_TABLES_H\n\n\nFT_BEGIN_HEADER\n\n#define FT_SERVICE_ID_KERNING  \"kerning\"\n\n\n  typedef FT_Error\n  (*FT_Kerning_TrackGetFunc)( FT_Face    face,\n                              FT_Fixed   point_size,\n                              FT_Int     degree,\n                              FT_Fixed*  akerning );\n\n  FT_DEFINE_SERVICE( Kerning )\n  {\n    FT_Kerning_TrackGetFunc  get_track;\n  };\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVKERN_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svmm.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svmm.h                                                                 */\n/*                                                                         */\n/*    The FreeType Multiple Masters and GX var services (specification).   */\n/*                                                                         */\n/*  Copyright 2003, 2004, 2009, 2012 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVMM_H__\n#define __SVMM_H__\n\n#include FT_INTERNAL_SERVICE_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*\n   *  A service used to manage multiple-masters data in a given face.\n   *\n   *  See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).\n   *\n   */\n\n#define FT_SERVICE_ID_MULTI_MASTERS  \"multi-masters\"\n\n\n  typedef FT_Error\n  (*FT_Get_MM_Func)( FT_Face           face,\n                     FT_Multi_Master*  master );\n\n  typedef FT_Error\n  (*FT_Get_MM_Var_Func)( FT_Face      face,\n                         FT_MM_Var*  *master );\n\n  typedef FT_Error\n  (*FT_Set_MM_Design_Func)( FT_Face   face,\n                            FT_UInt   num_coords,\n                            FT_Long*  coords );\n\n  typedef FT_Error\n  (*FT_Set_Var_Design_Func)( FT_Face    face,\n                             FT_UInt    num_coords,\n                             FT_Fixed*  coords );\n\n  typedef FT_Error\n  (*FT_Set_MM_Blend_Func)( FT_Face   face,\n                           FT_UInt   num_coords,\n                           FT_Long*  coords );\n\n\n  FT_DEFINE_SERVICE( MultiMasters )\n  {\n    FT_Get_MM_Func          get_mm;\n    FT_Set_MM_Design_Func   set_mm_design;\n    FT_Set_MM_Blend_Func    set_mm_blend;\n    FT_Get_MM_Var_Func      get_mm_var;\n    FT_Set_Var_Design_Func  set_var_design;\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,                          \\\n                                           get_mm_,                         \\\n                                           set_mm_design_,                  \\\n                                           set_mm_blend_,                   \\\n                                           get_mm_var_,                     \\\n                                           set_var_design_ )                \\\n  static const FT_Service_MultiMastersRec  class_ =                         \\\n  {                                                                         \\\n    get_mm_, set_mm_design_, set_mm_blend_, get_mm_var_, set_var_design_    \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,                          \\\n                                           get_mm_,                         \\\n                                           set_mm_design_,                  \\\n                                           set_mm_blend_,                   \\\n                                           get_mm_var_,                     \\\n                                           set_var_design_ )                \\\n  void                                                                      \\\n  FT_Init_Class_ ## class_( FT_Service_MultiMastersRec*  clazz )            \\\n  {                                                                         \\\n    clazz->get_mm         = get_mm_;                                        \\\n    clazz->set_mm_design  = set_mm_design_;                                 \\\n    clazz->set_mm_blend   = set_mm_blend_;                                  \\\n    clazz->get_mm_var     = get_mm_var_;                                    \\\n    clazz->set_var_design = set_var_design_;                                \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __SVMM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svotval.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svotval.h                                                              */\n/*                                                                         */\n/*    The FreeType OpenType validation service (specification).            */\n/*                                                                         */\n/*  Copyright 2004, 2006 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVOTVAL_H__\n#define __SVOTVAL_H__\n\n#include FT_OPENTYPE_VALIDATE_H\n#include FT_INTERNAL_VALIDATE_H\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_OPENTYPE_VALIDATE  \"opentype-validate\"\n\n\n  typedef FT_Error\n  (*otv_validate_func)( FT_Face volatile  face,\n                        FT_UInt           ot_flags,\n                        FT_Bytes         *base,\n                        FT_Bytes         *gdef,\n                        FT_Bytes         *gpos,\n                        FT_Bytes         *gsub,\n                        FT_Bytes         *jstf );\n\n\n  FT_DEFINE_SERVICE( OTvalidate )\n  {\n    otv_validate_func  validate;\n  };\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVOTVAL_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svpfr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svpfr.h                                                                */\n/*                                                                         */\n/*    Internal PFR service functions (specification).                      */\n/*                                                                         */\n/*  Copyright 2003, 2006 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVPFR_H__\n#define __SVPFR_H__\n\n#include FT_PFR_H\n#include FT_INTERNAL_SERVICE_H\n\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_PFR_METRICS  \"pfr-metrics\"\n\n\n  typedef FT_Error\n  (*FT_PFR_GetMetricsFunc)( FT_Face    face,\n                            FT_UInt   *aoutline,\n                            FT_UInt   *ametrics,\n                            FT_Fixed  *ax_scale,\n                            FT_Fixed  *ay_scale );\n\n  typedef FT_Error\n  (*FT_PFR_GetKerningFunc)( FT_Face     face,\n                            FT_UInt     left,\n                            FT_UInt     right,\n                            FT_Vector  *avector );\n\n  typedef FT_Error\n  (*FT_PFR_GetAdvanceFunc)( FT_Face   face,\n                            FT_UInt   gindex,\n                            FT_Pos   *aadvance );\n\n\n  FT_DEFINE_SERVICE( PfrMetrics )\n  {\n    FT_PFR_GetMetricsFunc  get_metrics;\n    FT_PFR_GetKerningFunc  get_kerning;\n    FT_PFR_GetAdvanceFunc  get_advance;\n\n  };\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __SVPFR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svpostnm.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svpostnm.h                                                             */\n/*                                                                         */\n/*    The FreeType PostScript name services (specification).               */\n/*                                                                         */\n/*  Copyright 2003, 2007, 2009, 2012 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVPOSTNM_H__\n#define __SVPOSTNM_H__\n\n#include FT_INTERNAL_SERVICE_H\n\n\nFT_BEGIN_HEADER\n\n  /*\n   *  A trivial service used to retrieve the PostScript name of a given\n   *  font when available.  The `get_name' field should never be NULL.\n   *\n   *  The corresponding function can return NULL to indicate that the\n   *  PostScript name is not available.\n   *\n   *  The name is owned by the face and will be destroyed with it.\n   */\n\n#define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME  \"postscript-font-name\"\n\n\n  typedef const char*\n  (*FT_PsName_GetFunc)( FT_Face  face );\n\n\n  FT_DEFINE_SERVICE( PsFontName )\n  {\n    FT_PsName_GetFunc  get_ps_font_name;\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \\\n  static const FT_Service_PsFontNameRec  class_ =                    \\\n  {                                                                  \\\n    get_ps_font_name_                                                \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \\\n  void                                                               \\\n  FT_Init_Class_ ## class_( FT_Library                 library,      \\\n                            FT_Service_PsFontNameRec*  clazz )       \\\n  {                                                                  \\\n    FT_UNUSED( library );                                            \\\n                                                                     \\\n    clazz->get_ps_font_name = get_ps_font_name_;                     \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVPOSTNM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svprop.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svprop.h                                                               */\n/*                                                                         */\n/*    The FreeType property service (specification).                       */\n/*                                                                         */\n/*  Copyright 2012 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVPROP_H__\n#define __SVPROP_H__\n\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_PROPERTIES  \"properties\"\n\n\n  typedef FT_Error\n  (*FT_Properties_SetFunc)( FT_Module    module,\n                            const char*  property_name,\n                            const void*  value );\n\n  typedef FT_Error\n  (*FT_Properties_GetFunc)( FT_Module    module,\n                            const char*  property_name,\n                            void*        value );\n\n\n  FT_DEFINE_SERVICE( Properties )\n  {\n    FT_Properties_SetFunc  set_property;\n    FT_Properties_GetFunc  get_property;\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_PROPERTIESREC( class_,          \\\n                                         set_property_,   \\\n                                         get_property_ )  \\\n  static const FT_Service_PropertiesRec  class_ =         \\\n  {                                                       \\\n    set_property_,                                        \\\n    get_property_                                         \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_PROPERTIESREC( class_,                \\\n                                         set_property_,         \\\n                                         get_property_ )        \\\n  void                                                          \\\n  FT_Init_Class_ ## class_( FT_Service_PropertiesRec*  clazz )  \\\n  {                                                             \\\n    clazz->set_property = set_property_;                        \\\n    clazz->get_property = get_property_;                        \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVPROP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svpscmap.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svpscmap.h                                                             */\n/*                                                                         */\n/*    The FreeType PostScript charmap service (specification).             */\n/*                                                                         */\n/*  Copyright 2003, 2006, 2009, 2012 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVPSCMAP_H__\n#define __SVPSCMAP_H__\n\n#include FT_INTERNAL_OBJECTS_H\n\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_POSTSCRIPT_CMAPS  \"postscript-cmaps\"\n\n\n  /*\n   *  Adobe glyph name to unicode value.\n   */\n  typedef FT_UInt32\n  (*PS_Unicode_ValueFunc)( const char*  glyph_name );\n\n  /*\n   *  Macintosh name id to glyph name.  NULL if invalid index.\n   */\n  typedef const char*\n  (*PS_Macintosh_NameFunc)( FT_UInt  name_index );\n\n  /*\n   *  Adobe standard string ID to glyph name.  NULL if invalid index.\n   */\n  typedef const char*\n  (*PS_Adobe_Std_StringsFunc)( FT_UInt  string_index );\n\n\n  /*\n   *  Simple unicode -> glyph index charmap built from font glyph names\n   *  table.\n   */\n  typedef struct  PS_UniMap_\n  {\n    FT_UInt32  unicode;      /* bit 31 set: is glyph variant */\n    FT_UInt    glyph_index;\n\n  } PS_UniMap;\n\n\n  typedef struct PS_UnicodesRec_*  PS_Unicodes;\n\n  typedef struct  PS_UnicodesRec_\n  {\n    FT_CMapRec  cmap;\n    FT_UInt     num_maps;\n    PS_UniMap*  maps;\n\n  } PS_UnicodesRec;\n\n\n  /*\n   *  A function which returns a glyph name for a given index.  Returns\n   *  NULL if invalid index.\n   */\n  typedef const char*\n  (*PS_GetGlyphNameFunc)( FT_Pointer  data,\n                          FT_UInt     string_index );\n\n  /*\n   *  A function used to release the glyph name returned by\n   *  PS_GetGlyphNameFunc, when needed\n   */\n  typedef void\n  (*PS_FreeGlyphNameFunc)( FT_Pointer  data,\n                           const char*  name );\n\n  typedef FT_Error\n  (*PS_Unicodes_InitFunc)( FT_Memory             memory,\n                           PS_Unicodes           unicodes,\n                           FT_UInt               num_glyphs,\n                           PS_GetGlyphNameFunc   get_glyph_name,\n                           PS_FreeGlyphNameFunc  free_glyph_name,\n                           FT_Pointer            glyph_data );\n\n  typedef FT_UInt\n  (*PS_Unicodes_CharIndexFunc)( PS_Unicodes  unicodes,\n                                FT_UInt32    unicode );\n\n  typedef FT_UInt32\n  (*PS_Unicodes_CharNextFunc)( PS_Unicodes  unicodes,\n                               FT_UInt32   *unicode );\n\n\n  FT_DEFINE_SERVICE( PsCMaps )\n  {\n    PS_Unicode_ValueFunc       unicode_value;\n\n    PS_Unicodes_InitFunc       unicodes_init;\n    PS_Unicodes_CharIndexFunc  unicodes_char_index;\n    PS_Unicodes_CharNextFunc   unicodes_char_next;\n\n    PS_Macintosh_NameFunc      macintosh_name;\n    PS_Adobe_Std_StringsFunc   adobe_std_strings;\n    const unsigned short*      adobe_std_encoding;\n    const unsigned short*      adobe_expert_encoding;\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_PSCMAPSREC( class_,                               \\\n                                      unicode_value_,                       \\\n                                      unicodes_init_,                       \\\n                                      unicodes_char_index_,                 \\\n                                      unicodes_char_next_,                  \\\n                                      macintosh_name_,                      \\\n                                      adobe_std_strings_,                   \\\n                                      adobe_std_encoding_,                  \\\n                                      adobe_expert_encoding_ )              \\\n  static const FT_Service_PsCMapsRec  class_ =                              \\\n  {                                                                         \\\n    unicode_value_, unicodes_init_,                                         \\\n    unicodes_char_index_, unicodes_char_next_, macintosh_name_,             \\\n    adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_         \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_PSCMAPSREC( class_,                               \\\n                                      unicode_value_,                       \\\n                                      unicodes_init_,                       \\\n                                      unicodes_char_index_,                 \\\n                                      unicodes_char_next_,                  \\\n                                      macintosh_name_,                      \\\n                                      adobe_std_strings_,                   \\\n                                      adobe_std_encoding_,                  \\\n                                      adobe_expert_encoding_ )              \\\n  void                                                                      \\\n  FT_Init_Class_ ## class_( FT_Library              library,                \\\n                            FT_Service_PsCMapsRec*  clazz )                 \\\n  {                                                                         \\\n    FT_UNUSED( library );                                                   \\\n                                                                            \\\n    clazz->unicode_value         = unicode_value_;                          \\\n    clazz->unicodes_init         = unicodes_init_;                          \\\n    clazz->unicodes_char_index   = unicodes_char_index_;                    \\\n    clazz->unicodes_char_next    = unicodes_char_next_;                     \\\n    clazz->macintosh_name        = macintosh_name_;                         \\\n    clazz->adobe_std_strings     = adobe_std_strings_;                      \\\n    clazz->adobe_std_encoding    = adobe_std_encoding_;                     \\\n    clazz->adobe_expert_encoding = adobe_expert_encoding_;                  \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVPSCMAP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svpsinfo.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svpsinfo.h                                                             */\n/*                                                                         */\n/*    The FreeType PostScript info service (specification).                */\n/*                                                                         */\n/*  Copyright 2003, 2004, 2009, 2011, 2012 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVPSINFO_H__\n#define __SVPSINFO_H__\n\n#include FT_INTERNAL_SERVICE_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_POSTSCRIPT_INFO  \"postscript-info\"\n\n\n  typedef FT_Error\n  (*PS_GetFontInfoFunc)( FT_Face          face,\n                         PS_FontInfoRec*  afont_info );\n\n  typedef FT_Error\n  (*PS_GetFontExtraFunc)( FT_Face           face,\n                          PS_FontExtraRec*  afont_extra );\n\n  typedef FT_Int\n  (*PS_HasGlyphNamesFunc)( FT_Face  face );\n\n  typedef FT_Error\n  (*PS_GetFontPrivateFunc)( FT_Face         face,\n                            PS_PrivateRec*  afont_private );\n\n  typedef FT_Long\n  (*PS_GetFontValueFunc)( FT_Face       face,\n                          PS_Dict_Keys  key,\n                          FT_UInt       idx,\n                          void         *value,\n                          FT_Long       value_len );\n\n\n  FT_DEFINE_SERVICE( PsInfo )\n  {\n    PS_GetFontInfoFunc     ps_get_font_info;\n    PS_GetFontExtraFunc    ps_get_font_extra;\n    PS_HasGlyphNamesFunc   ps_has_glyph_names;\n    PS_GetFontPrivateFunc  ps_get_font_private;\n    PS_GetFontValueFunc    ps_get_font_value;\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_PSINFOREC( class_,                     \\\n                                     get_font_info_,             \\\n                                     ps_get_font_extra_,         \\\n                                     has_glyph_names_,           \\\n                                     get_font_private_,          \\\n                                     get_font_value_ )           \\\n  static const FT_Service_PsInfoRec  class_ =                    \\\n  {                                                              \\\n    get_font_info_, ps_get_font_extra_, has_glyph_names_,        \\\n    get_font_private_, get_font_value_                           \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_PSINFOREC( class_,                     \\\n                                     get_font_info_,             \\\n                                     ps_get_font_extra_,         \\\n                                     has_glyph_names_,           \\\n                                     get_font_private_,          \\\n                                     get_font_value_ )           \\\n  void                                                           \\\n  FT_Init_Class_ ## class_( FT_Library             library,      \\\n                            FT_Service_PsInfoRec*  clazz )       \\\n  {                                                              \\\n    FT_UNUSED( library );                                        \\\n                                                                 \\\n    clazz->ps_get_font_info    = get_font_info_;                 \\\n    clazz->ps_get_font_extra   = ps_get_font_extra_;             \\\n    clazz->ps_has_glyph_names  = has_glyph_names_;               \\\n    clazz->ps_get_font_private = get_font_private_;              \\\n    clazz->ps_get_font_value   = get_font_value_;                \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVPSINFO_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svsfnt.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svsfnt.h                                                               */\n/*                                                                         */\n/*    The FreeType SFNT table loading service (specification).             */\n/*                                                                         */\n/*  Copyright 2003, 2004, 2009, 2012 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVSFNT_H__\n#define __SVSFNT_H__\n\n#include FT_INTERNAL_SERVICE_H\n#include FT_TRUETYPE_TABLES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*\n   *  SFNT table loading service.\n   */\n\n#define FT_SERVICE_ID_SFNT_TABLE  \"sfnt-table\"\n\n\n  /*\n   * Used to implement FT_Load_Sfnt_Table().\n   */\n  typedef FT_Error\n  (*FT_SFNT_TableLoadFunc)( FT_Face    face,\n                            FT_ULong   tag,\n                            FT_Long    offset,\n                            FT_Byte*   buffer,\n                            FT_ULong*  length );\n\n  /*\n   * Used to implement FT_Get_Sfnt_Table().\n   */\n  typedef void*\n  (*FT_SFNT_TableGetFunc)( FT_Face      face,\n                           FT_Sfnt_Tag  tag );\n\n\n  /*\n   * Used to implement FT_Sfnt_Table_Info().\n   */\n  typedef FT_Error\n  (*FT_SFNT_TableInfoFunc)( FT_Face    face,\n                            FT_UInt    idx,\n                            FT_ULong  *tag,\n                            FT_ULong  *offset,\n                            FT_ULong  *length );\n\n\n  FT_DEFINE_SERVICE( SFNT_Table )\n  {\n    FT_SFNT_TableLoadFunc  load_table;\n    FT_SFNT_TableGetFunc   get_table;\n    FT_SFNT_TableInfoFunc  table_info;\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ )  \\\n  static const FT_Service_SFNT_TableRec  class_ =                      \\\n  {                                                                    \\\n    load_, get_, info_                                                 \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \\\n  void                                                                \\\n  FT_Init_Class_ ## class_( FT_Service_SFNT_TableRec*  clazz )        \\\n  {                                                                   \\\n    clazz->load_table = load_;                                        \\\n    clazz->get_table  = get_;                                         \\\n    clazz->table_info = info_;                                        \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVSFNT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svttcmap.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svttcmap.h                                                             */\n/*                                                                         */\n/*    The FreeType TrueType/sfnt cmap extra information service.           */\n/*                                                                         */\n/*  Copyright 2003 by                                                      */\n/*  Masatake YAMATO, Redhat K.K.                                           */\n/*                                                                         */\n/*  Copyright 2003, 2008, 2009, 2012, 2013 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/* Development of this service is support of\n   Information-technology Promotion Agency, Japan. */\n\n#ifndef __SVTTCMAP_H__\n#define __SVTTCMAP_H__\n\n#include FT_INTERNAL_SERVICE_H\n#include FT_TRUETYPE_TABLES_H\n\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_TT_CMAP  \"tt-cmaps\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_CMapInfo                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to store TrueType/sfnt specific cmap information  */\n  /*    which is not covered by the generic @FT_CharMap structure.  This   */\n  /*    structure can be accessed with the @FT_Get_TT_CMap_Info function.  */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    language ::                                                        */\n  /*      The language ID used in Mac fonts.  Definitions of values are in */\n  /*      `ttnameid.h'.                                                    */\n  /*                                                                       */\n  /*    format ::                                                          */\n  /*      The cmap format.  OpenType 1.5 defines the formats 0 (byte       */\n  /*      encoding table), 2~(high-byte mapping through table), 4~(segment */\n  /*      mapping to delta values), 6~(trimmed table mapping), 8~(mixed    */\n  /*      16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented   */\n  /*      coverage), and 14 (Unicode Variation Sequences).                 */\n  /*                                                                       */\n  typedef struct  TT_CMapInfo_\n  {\n    FT_ULong  language;\n    FT_Long   format;\n\n  } TT_CMapInfo;\n\n\n  typedef FT_Error\n  (*TT_CMap_Info_GetFunc)( FT_CharMap    charmap,\n                           TT_CMapInfo  *cmap_info );\n\n\n  FT_DEFINE_SERVICE( TTCMaps )\n  {\n    TT_CMap_Info_GetFunc  get_cmap_info;\n  };\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ )  \\\n  static const FT_Service_TTCMapsRec  class_ =                  \\\n  {                                                             \\\n    get_cmap_info_                                              \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ )  \\\n  void                                                          \\\n  FT_Init_Class_ ## class_( FT_Library              library,    \\\n                            FT_Service_TTCMapsRec*  clazz )     \\\n  {                                                             \\\n    FT_UNUSED( library );                                       \\\n                                                                \\\n    clazz->get_cmap_info = get_cmap_info_;                      \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __SVTTCMAP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svtteng.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svtteng.h                                                              */\n/*                                                                         */\n/*    The FreeType TrueType engine query service (specification).          */\n/*                                                                         */\n/*  Copyright 2006 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVTTENG_H__\n#define __SVTTENG_H__\n\n#include FT_INTERNAL_SERVICE_H\n#include FT_MODULE_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*\n   *  SFNT table loading service.\n   */\n\n#define FT_SERVICE_ID_TRUETYPE_ENGINE  \"truetype-engine\"\n\n  /*\n   * Used to implement FT_Get_TrueType_Engine_Type\n   */\n\n  FT_DEFINE_SERVICE( TrueTypeEngine )\n  {\n    FT_TrueTypeEngineType  engine_type;\n  };\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVTTENG_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svttglyf.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svttglyf.h                                                             */\n/*                                                                         */\n/*    The FreeType TrueType glyph service.                                 */\n/*                                                                         */\n/*  Copyright 2007, 2009, 2012 by David Turner.                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#ifndef __SVTTGLYF_H__\n#define __SVTTGLYF_H__\n\n#include FT_INTERNAL_SERVICE_H\n#include FT_TRUETYPE_TABLES_H\n\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_TT_GLYF  \"tt-glyf\"\n\n\n  typedef FT_ULong\n  (*TT_Glyf_GetLocationFunc)( FT_Face    face,\n                              FT_UInt    gindex,\n                              FT_ULong  *psize );\n\n  FT_DEFINE_SERVICE( TTGlyf )\n  {\n    TT_Glyf_GetLocationFunc  get_location;\n  };\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ )  \\\n  static const FT_Service_TTGlyfRec  class_ =                 \\\n  {                                                           \\\n    get_location_                                             \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ )  \\\n  void                                                        \\\n  FT_Init_Class_ ## class_( FT_Service_TTGlyfRec*  clazz )    \\\n  {                                                           \\\n    clazz->get_location = get_location_;                      \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __SVTTGLYF_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svwinfnt.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svwinfnt.h                                                             */\n/*                                                                         */\n/*    The FreeType Windows FNT/FONT service (specification).               */\n/*                                                                         */\n/*  Copyright 2003 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVWINFNT_H__\n#define __SVWINFNT_H__\n\n#include FT_INTERNAL_SERVICE_H\n#include FT_WINFONTS_H\n\n\nFT_BEGIN_HEADER\n\n\n#define FT_SERVICE_ID_WINFNT  \"winfonts\"\n\n  typedef FT_Error\n  (*FT_WinFnt_GetHeaderFunc)( FT_Face               face,\n                              FT_WinFNT_HeaderRec  *aheader );\n\n\n  FT_DEFINE_SERVICE( WinFnt )\n  {\n    FT_WinFnt_GetHeaderFunc  get_header;\n  };\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVWINFNT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/services/svxf86nm.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  svxf86nm.h                                                             */\n/*                                                                         */\n/*    The FreeType XFree86 services (specification only).                  */\n/*                                                                         */\n/*  Copyright 2003 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SVXF86NM_H__\n#define __SVXF86NM_H__\n\n#include FT_INTERNAL_SERVICE_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*\n   *  A trivial service used to return the name of a face's font driver,\n   *  according to the XFree86 nomenclature.  Note that the service data\n   *  is a simple constant string pointer.\n   */\n\n#define FT_SERVICE_ID_XF86_NAME  \"xf86-driver-name\"\n\n#define FT_XF86_FORMAT_TRUETYPE  \"TrueType\"\n#define FT_XF86_FORMAT_TYPE_1    \"Type 1\"\n#define FT_XF86_FORMAT_BDF       \"BDF\"\n#define FT_XF86_FORMAT_PCF       \"PCF\"\n#define FT_XF86_FORMAT_TYPE_42   \"Type 42\"\n#define FT_XF86_FORMAT_CID       \"CID Type 1\"\n#define FT_XF86_FORMAT_CFF       \"CFF\"\n#define FT_XF86_FORMAT_PFR       \"PFR\"\n#define FT_XF86_FORMAT_WINFNT    \"Windows FNT\"\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __SVXF86NM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/sfnt.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  sfnt.h                                                                 */\n/*                                                                         */\n/*    High-level `sfnt' driver interface (specification).                  */\n/*                                                                         */\n/*  Copyright 1996-2006, 2009, 2012-2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SFNT_H__\n#define __SFNT_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Init_Face_Func                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    First part of the SFNT face object initialization.  This finds     */\n  /*    the face in a SFNT file or collection, and load its format tag in  */\n  /*    face->format_tag.                                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream     :: The input stream.                                    */\n  /*                                                                       */\n  /*    face       :: A handle to the target face object.                  */\n  /*                                                                       */\n  /*    face_index :: The index of the TrueType font, if we are opening a  */\n  /*                  collection.                                          */\n  /*                                                                       */\n  /*    num_params :: The number of additional parameters.                 */\n  /*                                                                       */\n  /*    params     :: Optional additional parameters.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The stream cursor must be at the font file's origin.               */\n  /*                                                                       */\n  /*    This function recognizes fonts embedded in a `TrueType             */\n  /*    collection'.                                                       */\n  /*                                                                       */\n  /*    Once the format tag has been validated by the font driver, it      */\n  /*    should then call the TT_Load_Face_Func() callback to read the rest */\n  /*    of the SFNT tables in the object.                                  */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Init_Face_Func)( FT_Stream      stream,\n                        TT_Face        face,\n                        FT_Int         face_index,\n                        FT_Int         num_params,\n                        FT_Parameter*  params );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Load_Face_Func                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Second part of the SFNT face object initialization.  This loads    */\n  /*    the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the    */\n  /*    face object.                                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream     :: The input stream.                                    */\n  /*                                                                       */\n  /*    face       :: A handle to the target face object.                  */\n  /*                                                                       */\n  /*    face_index :: The index of the TrueType font, if we are opening a  */\n  /*                  collection.                                          */\n  /*                                                                       */\n  /*    num_params :: The number of additional parameters.                 */\n  /*                                                                       */\n  /*    params     :: Optional additional parameters.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function must be called after TT_Init_Face_Func().            */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Load_Face_Func)( FT_Stream      stream,\n                        TT_Face        face,\n                        FT_Int         face_index,\n                        FT_Int         num_params,\n                        FT_Parameter*  params );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Done_Face_Func                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A callback used to delete the common SFNT data from a face.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the target face object.                        */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function does NOT destroy the face object.                    */\n  /*                                                                       */\n  typedef void\n  (*TT_Done_Face_Func)( TT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Load_Any_Func                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load any font table into client memory.                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: The face object to look for.                             */\n  /*                                                                       */\n  /*    tag    :: The tag of table to load.  Use the value 0 if you want   */\n  /*              to access the whole font file, else set this parameter   */\n  /*              to a valid TrueType table tag that you can forge with    */\n  /*              the MAKE_TT_TAG macro.                                   */\n  /*                                                                       */\n  /*    offset :: The starting offset in the table (or the file if         */\n  /*              tag == 0).                                               */\n  /*                                                                       */\n  /*    length :: The address of the decision variable:                    */\n  /*                                                                       */\n  /*                If length == NULL:                                     */\n  /*                  Loads the whole table.  Returns an error if          */\n  /*                  `offset' == 0!                                       */\n  /*                                                                       */\n  /*                If *length == 0:                                       */\n  /*                  Exits immediately; returning the length of the given */\n  /*                  table or of the font file, depending on the value of */\n  /*                  `tag'.                                               */\n  /*                                                                       */\n  /*                If *length != 0:                                       */\n  /*                  Loads the next `length' bytes of table or font,      */\n  /*                  starting at offset `offset' (in table or font too).  */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    buffer :: The address of target buffer.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    TrueType error code.  0 means success.                             */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Load_Any_Func)( TT_Face    face,\n                       FT_ULong   tag,\n                       FT_Long    offset,\n                       FT_Byte   *buffer,\n                       FT_ULong*  length );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Find_SBit_Image_Func                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Check whether an embedded bitmap (an `sbit') exists for a given    */\n  /*    glyph, at a given strike.                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face          :: The target face object.                           */\n  /*                                                                       */\n  /*    glyph_index   :: The glyph index.                                  */\n  /*                                                                       */\n  /*    strike_index  :: The current strike index.                         */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    arange        :: The SBit range containing the glyph index.        */\n  /*                                                                       */\n  /*    astrike       :: The SBit strike containing the glyph index.       */\n  /*                                                                       */\n  /*    aglyph_offset :: The offset of the glyph data in `EBDT' table.     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.  Returns                    */\n  /*    SFNT_Err_Invalid_Argument if no sbit exists for the requested      */\n  /*    glyph.                                                             */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Find_SBit_Image_Func)( TT_Face          face,\n                              FT_UInt          glyph_index,\n                              FT_ULong         strike_index,\n                              TT_SBit_Range   *arange,\n                              TT_SBit_Strike  *astrike,\n                              FT_ULong        *aglyph_offset );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Load_SBit_Metrics_Func                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Get the big metrics for a given embedded bitmap.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream      :: The input stream.                                   */\n  /*                                                                       */\n  /*    range       :: The SBit range containing the glyph.                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    big_metrics :: A big SBit metrics structure for the glyph.         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The stream cursor must be positioned at the glyph's offset within  */\n  /*    the `EBDT' table before the call.                                  */\n  /*                                                                       */\n  /*    If the image format uses variable metrics, the stream cursor is    */\n  /*    positioned just after the metrics header in the `EBDT' table on    */\n  /*    function exit.                                                     */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Load_SBit_Metrics_Func)( FT_Stream        stream,\n                                TT_SBit_Range    range,\n                                TT_SBit_Metrics  metrics );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Load_SBit_Image_Func                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load a given glyph sbit image from the font resource.  This also   */\n  /*    returns its metrics.                                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      The target face object.                                          */\n  /*                                                                       */\n  /*    strike_index ::                                                    */\n  /*      The strike index.                                                */\n  /*                                                                       */\n  /*    glyph_index ::                                                     */\n  /*      The current glyph index.                                         */\n  /*                                                                       */\n  /*    load_flags ::                                                      */\n  /*      The current load flags.                                          */\n  /*                                                                       */\n  /*    stream ::                                                          */\n  /*      The input stream.                                                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    amap ::                                                            */\n  /*      The target pixmap.                                               */\n  /*                                                                       */\n  /*    ametrics ::                                                        */\n  /*      A big sbit metrics structure for the glyph image.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.  Returns an error if no     */\n  /*    glyph sbit exists for the index.                                   */\n  /*                                                                       */\n  /*  <Note>                                                               */\n  /*    The `map.buffer' field is always freed before the glyph is loaded. */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Load_SBit_Image_Func)( TT_Face              face,\n                              FT_ULong             strike_index,\n                              FT_UInt              glyph_index,\n                              FT_UInt              load_flags,\n                              FT_Stream            stream,\n                              FT_Bitmap           *amap,\n                              TT_SBit_MetricsRec  *ametrics );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Set_SBit_Strike_Func                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Select an sbit strike for a given size request.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face          :: The target face object.                           */\n  /*                                                                       */\n  /*    req           :: The size request.                                 */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    astrike_index :: The index of the sbit strike.                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.  Returns an error if no     */\n  /*    sbit strike exists for the selected ppem values.                   */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Set_SBit_Strike_Func)( TT_Face          face,\n                              FT_Size_Request  req,\n                              FT_ULong*        astrike_index );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Load_Strike_Metrics_Func                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the metrics of a given strike.                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face          :: The target face object.                           */\n  /*                                                                       */\n  /*    strike_index  :: The strike index.                                 */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    metrics       :: the metrics of the strike.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.  Returns an error if no     */\n  /*    such sbit strike exists.                                           */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Load_Strike_Metrics_Func)( TT_Face           face,\n                                  FT_ULong          strike_index,\n                                  FT_Size_Metrics*  metrics );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Get_PS_Name_Func                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Get the PostScript glyph name of a glyph.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    idx  :: The glyph index.                                           */\n  /*                                                                       */\n  /*    PSname :: The address of a string pointer.  Will be NULL in case   */\n  /*              of error, otherwise it is a pointer to the glyph name.   */\n  /*                                                                       */\n  /*              You must not modify the returned string!                 */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Get_PS_Name_Func)( TT_Face      face,\n                          FT_UInt      idx,\n                          FT_String**  PSname );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Load_Metrics_Func                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load a metrics table, which is a table with a horizontal and a     */\n  /*    vertical version.                                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face     :: A handle to the target face object.                    */\n  /*                                                                       */\n  /*    stream   :: The input stream.                                      */\n  /*                                                                       */\n  /*    vertical :: A boolean flag.  If set, load the vertical one.        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Load_Metrics_Func)( TT_Face    face,\n                           FT_Stream  stream,\n                           FT_Bool    vertical );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Get_Metrics_Func                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the horizontal or vertical header in a face object.           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face     :: A handle to the target face object.                    */\n  /*                                                                       */\n  /*    vertical :: A boolean flag.  If set, load vertical metrics.        */\n  /*                                                                       */\n  /*    gindex   :: The glyph index.                                       */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    abearing :: The horizontal (or vertical) bearing.  Set to zero in  */\n  /*                case of error.                                         */\n  /*                                                                       */\n  /*    aadvance :: The horizontal (or vertical) advance.  Set to zero in  */\n  /*                case of error.                                         */\n  /*                                                                       */\n  typedef void\n  (*TT_Get_Metrics_Func)( TT_Face     face,\n                          FT_Bool     vertical,\n                          FT_UInt     gindex,\n                          FT_Short*   abearing,\n                          FT_UShort*  aadvance );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Load_Table_Func                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load a given TrueType table.                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: The input stream.                                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The function uses `face->goto_table' to seek the stream to the     */\n  /*    start of the table, except while loading the font directory.       */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Load_Table_Func)( TT_Face    face,\n                         FT_Stream  stream );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Free_Table_Func                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Free a given TrueType table.                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the target face object.                        */\n  /*                                                                       */\n  typedef void\n  (*TT_Free_Table_Func)( TT_Face  face );\n\n\n  /*\n   * @functype:\n   *    TT_Face_GetKerningFunc\n   *\n   * @description:\n   *    Return the horizontal kerning value between two glyphs.\n   *\n   * @input:\n   *    face        :: A handle to the source face object.\n   *    left_glyph  :: The left glyph index.\n   *    right_glyph :: The right glyph index.\n   *\n   * @return:\n   *    The kerning value in font units.\n   */\n  typedef FT_Int\n  (*TT_Face_GetKerningFunc)( TT_Face  face,\n                             FT_UInt  left_glyph,\n                             FT_UInt  right_glyph );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    SFNT_Interface                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure holds pointers to the functions used to load and    */\n  /*    free the basic tables that are required in a `sfnt' font file.     */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    Check the various xxx_Func() descriptions for details.             */\n  /*                                                                       */\n  typedef struct  SFNT_Interface_\n  {\n    TT_Loader_GotoTableFunc      goto_table;\n\n    TT_Init_Face_Func            init_face;\n    TT_Load_Face_Func            load_face;\n    TT_Done_Face_Func            done_face;\n    FT_Module_Requester          get_interface;\n\n    TT_Load_Any_Func             load_any;\n\n    /* these functions are called by `load_face' but they can also  */\n    /* be called from external modules, if there is a need to do so */\n    TT_Load_Table_Func           load_head;\n    TT_Load_Metrics_Func         load_hhea;\n    TT_Load_Table_Func           load_cmap;\n    TT_Load_Table_Func           load_maxp;\n    TT_Load_Table_Func           load_os2;\n    TT_Load_Table_Func           load_post;\n\n    TT_Load_Table_Func           load_name;\n    TT_Free_Table_Func           free_name;\n\n    /* this field was called `load_kerning' up to version 2.1.10 */\n    TT_Load_Table_Func           load_kern;\n\n    TT_Load_Table_Func           load_gasp;\n    TT_Load_Table_Func           load_pclt;\n\n    /* see `ttload.h'; this field was called `load_bitmap_header' up to */\n    /* version 2.1.10                                                   */\n    TT_Load_Table_Func           load_bhed;\n\n    TT_Load_SBit_Image_Func      load_sbit_image;\n\n    /* see `ttpost.h' */\n    TT_Get_PS_Name_Func          get_psname;\n    TT_Free_Table_Func           free_psnames;\n\n    /* starting here, the structure differs from version 2.1.7 */\n\n    /* this field was introduced in version 2.1.8, named `get_psname' */\n    TT_Face_GetKerningFunc       get_kerning;\n\n    /* new elements introduced after version 2.1.10 */\n\n    /* load the font directory, i.e., the offset table and */\n    /* the table directory                                 */\n    TT_Load_Table_Func           load_font_dir;\n    TT_Load_Metrics_Func         load_hmtx;\n\n    TT_Load_Table_Func           load_eblc;\n    TT_Free_Table_Func           free_eblc;\n\n    TT_Set_SBit_Strike_Func      set_sbit_strike;\n    TT_Load_Strike_Metrics_Func  load_strike_metrics;\n\n    TT_Get_Metrics_Func          get_metrics;\n\n  } SFNT_Interface;\n\n\n  /* transitional */\n  typedef SFNT_Interface*   SFNT_Service;\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_SFNT_INTERFACE(        \\\n          class_,                        \\\n          goto_table_,                   \\\n          init_face_,                    \\\n          load_face_,                    \\\n          done_face_,                    \\\n          get_interface_,                \\\n          load_any_,                     \\\n          load_head_,                    \\\n          load_hhea_,                    \\\n          load_cmap_,                    \\\n          load_maxp_,                    \\\n          load_os2_,                     \\\n          load_post_,                    \\\n          load_name_,                    \\\n          free_name_,                    \\\n          load_kern_,                    \\\n          load_gasp_,                    \\\n          load_pclt_,                    \\\n          load_bhed_,                    \\\n          load_sbit_image_,              \\\n          get_psname_,                   \\\n          free_psnames_,                 \\\n          get_kerning_,                  \\\n          load_font_dir_,                \\\n          load_hmtx_,                    \\\n          load_eblc_,                    \\\n          free_eblc_,                    \\\n          set_sbit_strike_,              \\\n          load_strike_metrics_,          \\\n          get_metrics_ )                 \\\n  static const SFNT_Interface  class_ =  \\\n  {                                      \\\n    goto_table_,                         \\\n    init_face_,                          \\\n    load_face_,                          \\\n    done_face_,                          \\\n    get_interface_,                      \\\n    load_any_,                           \\\n    load_head_,                          \\\n    load_hhea_,                          \\\n    load_cmap_,                          \\\n    load_maxp_,                          \\\n    load_os2_,                           \\\n    load_post_,                          \\\n    load_name_,                          \\\n    free_name_,                          \\\n    load_kern_,                          \\\n    load_gasp_,                          \\\n    load_pclt_,                          \\\n    load_bhed_,                          \\\n    load_sbit_image_,                    \\\n    get_psname_,                         \\\n    free_psnames_,                       \\\n    get_kerning_,                        \\\n    load_font_dir_,                      \\\n    load_hmtx_,                          \\\n    load_eblc_,                          \\\n    free_eblc_,                          \\\n    set_sbit_strike_,                    \\\n    load_strike_metrics_,                \\\n    get_metrics_,                        \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_INTERNAL( a, a_ )  \\\n          clazz->a = a_;\n\n#define FT_DEFINE_SFNT_INTERFACE(                       \\\n          class_,                                       \\\n          goto_table_,                                  \\\n          init_face_,                                   \\\n          load_face_,                                   \\\n          done_face_,                                   \\\n          get_interface_,                               \\\n          load_any_,                                    \\\n          load_head_,                                   \\\n          load_hhea_,                                   \\\n          load_cmap_,                                   \\\n          load_maxp_,                                   \\\n          load_os2_,                                    \\\n          load_post_,                                   \\\n          load_name_,                                   \\\n          free_name_,                                   \\\n          load_kern_,                                   \\\n          load_gasp_,                                   \\\n          load_pclt_,                                   \\\n          load_bhed_,                                   \\\n          load_sbit_image_,                             \\\n          get_psname_,                                  \\\n          free_psnames_,                                \\\n          get_kerning_,                                 \\\n          load_font_dir_,                               \\\n          load_hmtx_,                                   \\\n          load_eblc_,                                   \\\n          free_eblc_,                                   \\\n          set_sbit_strike_,                             \\\n          load_strike_metrics_,                         \\\n          get_metrics_ )                                \\\n  void                                                  \\\n  FT_Init_Class_ ## class_( FT_Library       library,   \\\n                            SFNT_Interface*  clazz )    \\\n  {                                                     \\\n    FT_UNUSED( library );                               \\\n                                                        \\\n    clazz->goto_table          = goto_table_;           \\\n    clazz->init_face           = init_face_;            \\\n    clazz->load_face           = load_face_;            \\\n    clazz->done_face           = done_face_;            \\\n    clazz->get_interface       = get_interface_;        \\\n    clazz->load_any            = load_any_;             \\\n    clazz->load_head           = load_head_;            \\\n    clazz->load_hhea           = load_hhea_;            \\\n    clazz->load_cmap           = load_cmap_;            \\\n    clazz->load_maxp           = load_maxp_;            \\\n    clazz->load_os2            = load_os2_;             \\\n    clazz->load_post           = load_post_;            \\\n    clazz->load_name           = load_name_;            \\\n    clazz->free_name           = free_name_;            \\\n    clazz->load_kern           = load_kern_;            \\\n    clazz->load_gasp           = load_gasp_;            \\\n    clazz->load_pclt           = load_pclt_;            \\\n    clazz->load_bhed           = load_bhed_;            \\\n    clazz->load_sbit_image     = load_sbit_image_;      \\\n    clazz->get_psname          = get_psname_;           \\\n    clazz->free_psnames        = free_psnames_;         \\\n    clazz->get_kerning         = get_kerning_;          \\\n    clazz->load_font_dir       = load_font_dir_;        \\\n    clazz->load_hmtx           = load_hmtx_;            \\\n    clazz->load_eblc           = load_eblc_;            \\\n    clazz->free_eblc           = free_eblc_;            \\\n    clazz->set_sbit_strike     = set_sbit_strike_;      \\\n    clazz->load_strike_metrics = load_strike_metrics_;  \\\n    clazz->get_metrics         = get_metrics_;          \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\nFT_END_HEADER\n\n#endif /* __SFNT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/t1types.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1types.h                                                              */\n/*                                                                         */\n/*    Basic Type1/Type2 type definitions and interface (specification      */\n/*    only).                                                               */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1TYPES_H__\n#define __T1TYPES_H__\n\n\n#include <ft2build.h>\n#include FT_TYPE1_TABLES_H\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n#include FT_INTERNAL_SERVICE_H\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***              REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS              ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    T1_EncodingRec                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure modeling a custom encoding.                            */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_chars  :: The number of character codes in the encoding.       */\n  /*                  Usually 256.                                         */\n  /*                                                                       */\n  /*    code_first :: The lowest valid character code in the encoding.     */\n  /*                                                                       */\n  /*    code_last  :: The highest valid character code in the encoding     */\n  /*                  + 1. When equal to code_first there are no valid     */\n  /*                  character codes.                                     */\n  /*                                                                       */\n  /*    char_index :: An array of corresponding glyph indices.             */\n  /*                                                                       */\n  /*    char_name  :: An array of corresponding glyph names.               */\n  /*                                                                       */\n  typedef struct  T1_EncodingRecRec_\n  {\n    FT_Int       num_chars;\n    FT_Int       code_first;\n    FT_Int       code_last;\n\n    FT_UShort*   char_index;\n    FT_String**  char_name;\n\n  } T1_EncodingRec, *T1_Encoding;\n\n\n  /* used to hold extra data of PS_FontInfoRec that\n   * cannot be stored in the publicly defined structure.\n   *\n   * Note these can't be blended with multiple-masters.\n   */\n  typedef struct  PS_FontExtraRec_\n  {\n    FT_UShort  fs_type;\n\n  } PS_FontExtraRec;\n\n\n  typedef struct  T1_FontRec_\n  {\n    PS_FontInfoRec   font_info;         /* font info dictionary   */\n    PS_FontExtraRec  font_extra;        /* font info extra fields */\n    PS_PrivateRec    private_dict;      /* private dictionary     */\n    FT_String*       font_name;         /* top-level dictionary   */\n\n    T1_EncodingType  encoding_type;\n    T1_EncodingRec   encoding;\n\n    FT_Byte*         subrs_block;\n    FT_Byte*         charstrings_block;\n    FT_Byte*         glyph_names_block;\n\n    FT_Int           num_subrs;\n    FT_Byte**        subrs;\n    FT_PtrDist*      subrs_len;\n\n    FT_Int           num_glyphs;\n    FT_String**      glyph_names;       /* array of glyph names       */\n    FT_Byte**        charstrings;       /* array of glyph charstrings */\n    FT_PtrDist*      charstrings_len;\n\n    FT_Byte          paint_type;\n    FT_Byte          font_type;\n    FT_Matrix        font_matrix;\n    FT_Vector        font_offset;\n    FT_BBox          font_bbox;\n    FT_Long          font_id;\n\n    FT_Fixed         stroke_width;\n\n  } T1_FontRec, *T1_Font;\n\n\n  typedef struct  CID_SubrsRec_\n  {\n    FT_UInt    num_subrs;\n    FT_Byte**  code;\n\n  } CID_SubrsRec, *CID_Subrs;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***                AFM FONT INFORMATION STRUCTURES                    ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  AFM_TrackKernRec_\n  {\n    FT_Int    degree;\n    FT_Fixed  min_ptsize;\n    FT_Fixed  min_kern;\n    FT_Fixed  max_ptsize;\n    FT_Fixed  max_kern;\n\n  } AFM_TrackKernRec, *AFM_TrackKern;\n\n  typedef struct  AFM_KernPairRec_\n  {\n    FT_Int  index1;\n    FT_Int  index2;\n    FT_Int  x;\n    FT_Int  y;\n\n  } AFM_KernPairRec, *AFM_KernPair;\n\n  typedef struct  AFM_FontInfoRec_\n  {\n    FT_Bool        IsCIDFont;\n    FT_BBox        FontBBox;\n    FT_Fixed       Ascender;\n    FT_Fixed       Descender;\n    AFM_TrackKern  TrackKerns;   /* free if non-NULL */\n    FT_Int         NumTrackKern;\n    AFM_KernPair   KernPairs;    /* free if non-NULL */\n    FT_Int         NumKernPair;\n\n  } AFM_FontInfoRec, *AFM_FontInfo;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***                ORIGINAL T1_FACE CLASS DEFINITION                  ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  typedef struct T1_FaceRec_*   T1_Face;\n  typedef struct CID_FaceRec_*  CID_Face;\n\n\n  typedef struct  T1_FaceRec_\n  {\n    FT_FaceRec      root;\n    T1_FontRec      type1;\n    const void*     psnames;\n    const void*     psaux;\n    const void*     afm_data;\n    FT_CharMapRec   charmaprecs[2];\n    FT_CharMap      charmaps[2];\n\n    /* support for Multiple Masters fonts */\n    PS_Blend        blend;\n\n    /* undocumented, optional: indices of subroutines that express      */\n    /* the NormalizeDesignVector and the ConvertDesignVector procedure, */\n    /* respectively, as Type 2 charstrings; -1 if keywords not present  */\n    FT_Int           ndv_idx;\n    FT_Int           cdv_idx;\n\n    /* undocumented, optional: has the same meaning as len_buildchar */\n    /* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25    */\n    FT_UInt          len_buildchar;\n    FT_Long*         buildchar;\n\n    /* since version 2.1 - interface to PostScript hinter */\n    const void*     pshinter;\n\n  } T1_FaceRec;\n\n\n  typedef struct  CID_FaceRec_\n  {\n    FT_FaceRec       root;\n    void*            psnames;\n    void*            psaux;\n    CID_FaceInfoRec  cid;\n    PS_FontExtraRec  font_extra;\n#if 0\n    void*            afm_data;\n#endif\n    CID_Subrs        subrs;\n\n    /* since version 2.1 - interface to PostScript hinter */\n    void*            pshinter;\n\n    /* since version 2.1.8, but was originally positioned after `afm_data' */\n    FT_Byte*         binary_data; /* used if hex data has been converted */\n    FT_Stream        cid_stream;\n\n  } CID_FaceRec;\n\n\nFT_END_HEADER\n\n#endif /* __T1TYPES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/internal/tttypes.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  tttypes.h                                                              */\n/*                                                                         */\n/*    Basic SFNT/TrueType type definitions and interface (specification    */\n/*    only).                                                               */\n/*                                                                         */\n/*  Copyright 1996-2002, 2004-2008, 2012-2013 by                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTTYPES_H__\n#define __TTTYPES_H__\n\n\n#include <ft2build.h>\n#include FT_TRUETYPE_TABLES_H\n#include FT_INTERNAL_OBJECTS_H\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n#include FT_MULTIPLE_MASTERS_H\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***             REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS         ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TTC_HeaderRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    TrueType collection header.  This table contains the offsets of    */\n  /*    the font headers of each distinct TrueType face in the file.       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    tag     :: Must be `ttc ' to indicate a TrueType collection.       */\n  /*                                                                       */\n  /*    version :: The version number.                                     */\n  /*                                                                       */\n  /*    count   :: The number of faces in the collection.  The             */\n  /*               specification says this should be an unsigned long, but */\n  /*               we use a signed long since we need the value -1 for     */\n  /*               specific purposes.                                      */\n  /*                                                                       */\n  /*    offsets :: The offsets of the font headers, one per face.          */\n  /*                                                                       */\n  typedef struct  TTC_HeaderRec_\n  {\n    FT_ULong   tag;\n    FT_Fixed   version;\n    FT_Long    count;\n    FT_ULong*  offsets;\n\n  } TTC_HeaderRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    SFNT_HeaderRec                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    SFNT file format header.                                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    format_tag     :: The font format tag.                             */\n  /*                                                                       */\n  /*    num_tables     :: The number of tables in file.                    */\n  /*                                                                       */\n  /*    search_range   :: Must be `16 * (max power of 2 <= num_tables)'.   */\n  /*                                                                       */\n  /*    entry_selector :: Must be log2 of `search_range / 16'.             */\n  /*                                                                       */\n  /*    range_shift    :: Must be `num_tables * 16 - search_range'.        */\n  /*                                                                       */\n  typedef struct  SFNT_HeaderRec_\n  {\n    FT_ULong   format_tag;\n    FT_UShort  num_tables;\n    FT_UShort  search_range;\n    FT_UShort  entry_selector;\n    FT_UShort  range_shift;\n\n    FT_ULong   offset;  /* not in file */\n\n  } SFNT_HeaderRec, *SFNT_Header;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_TableRec                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure describes a given table of a TrueType font.         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    Tag      :: A four-bytes tag describing the table.                 */\n  /*                                                                       */\n  /*    CheckSum :: The table checksum.  This value can be ignored.        */\n  /*                                                                       */\n  /*    Offset   :: The offset of the table from the start of the TrueType */\n  /*                font in its resource.                                  */\n  /*                                                                       */\n  /*    Length   :: The table length (in bytes).                           */\n  /*                                                                       */\n  typedef struct  TT_TableRec_\n  {\n    FT_ULong  Tag;        /*        table type */\n    FT_ULong  CheckSum;   /*    table checksum */\n    FT_ULong  Offset;     /* table file offset */\n    FT_ULong  Length;     /*      table length */\n\n  } TT_TableRec, *TT_Table;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    WOFF_HeaderRec                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    WOFF file format header.                                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    See                                                                */\n  /*                                                                       */\n  /*      http://www.w3.org/TR/WOFF/#WOFFHeader                            */\n  /*                                                                       */\n  typedef struct  WOFF_HeaderRec_\n  {\n    FT_ULong   signature;\n    FT_ULong   flavor;\n    FT_ULong   length;\n    FT_UShort  num_tables;\n    FT_UShort  reserved;\n    FT_ULong   totalSfntSize;\n    FT_UShort  majorVersion;\n    FT_UShort  minorVersion;\n    FT_ULong   metaOffset;\n    FT_ULong   metaLength;\n    FT_ULong   metaOrigLength;\n    FT_ULong   privOffset;\n    FT_ULong   privLength;\n\n  } WOFF_HeaderRec, *WOFF_Header;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    WOFF_TableRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure describes a given table of a WOFF font.             */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    Tag        :: A four-bytes tag describing the table.               */\n  /*                                                                       */\n  /*    Offset     :: The offset of the table from the start of the WOFF   */\n  /*                  font in its resource.                                */\n  /*                                                                       */\n  /*    CompLength :: Compressed table length (in bytes).                  */\n  /*                                                                       */\n  /*    OrigLength :: Unompressed table length (in bytes).                 */\n  /*                                                                       */\n  /*    CheckSum   :: The table checksum.  This value can be ignored.      */\n  /*                                                                       */\n  /*    OrigOffset :: The uncompressed table file offset.  This value gets */\n  /*                  computed while constructing the (uncompressed) SFNT  */\n  /*                  header.  It is not contained in the WOFF file.       */\n  /*                                                                       */\n  typedef struct  WOFF_TableRec_\n  {\n    FT_ULong  Tag;           /* table ID                  */\n    FT_ULong  Offset;        /* table file offset         */\n    FT_ULong  CompLength;    /* compressed table length   */\n    FT_ULong  OrigLength;    /* uncompressed table length */\n    FT_ULong  CheckSum;      /* uncompressed checksum     */\n\n    FT_ULong  OrigOffset;    /* uncompressed table file offset */\n                             /* (not in the WOFF file)         */\n  } WOFF_TableRec, *WOFF_Table;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_LongMetricsRec                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure modeling the long metrics of the `hmtx' and `vmtx'     */\n  /*    TrueType tables.  The values are expressed in font units.          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    advance :: The advance width or height for the glyph.              */\n  /*                                                                       */\n  /*    bearing :: The left-side or top-side bearing for the glyph.        */\n  /*                                                                       */\n  typedef struct  TT_LongMetricsRec_\n  {\n    FT_UShort  advance;\n    FT_Short   bearing;\n\n  } TT_LongMetricsRec, *TT_LongMetrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    TT_ShortMetrics                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple type to model the short metrics of the `hmtx' and `vmtx'  */\n  /*    tables.                                                            */\n  /*                                                                       */\n  typedef FT_Short  TT_ShortMetrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_NameEntryRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure modeling TrueType name records.  Name records are used */\n  /*    to store important strings like family name, style name,           */\n  /*    copyright, etc. in _localized_ versions (i.e., language, encoding, */\n  /*    etc).                                                              */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    platformID   :: The ID of the name's encoding platform.            */\n  /*                                                                       */\n  /*    encodingID   :: The platform-specific ID for the name's encoding.  */\n  /*                                                                       */\n  /*    languageID   :: The platform-specific ID for the name's language.  */\n  /*                                                                       */\n  /*    nameID       :: The ID specifying what kind of name this is.       */\n  /*                                                                       */\n  /*    stringLength :: The length of the string in bytes.                 */\n  /*                                                                       */\n  /*    stringOffset :: The offset to the string in the `name' table.      */\n  /*                                                                       */\n  /*    string       :: A pointer to the string's bytes.  Note that these  */\n  /*                    are usually UTF-16 encoded characters.             */\n  /*                                                                       */\n  typedef struct  TT_NameEntryRec_\n  {\n    FT_UShort  platformID;\n    FT_UShort  encodingID;\n    FT_UShort  languageID;\n    FT_UShort  nameID;\n    FT_UShort  stringLength;\n    FT_ULong   stringOffset;\n\n    /* this last field is not defined in the spec */\n    /* but used by the FreeType engine            */\n\n    FT_Byte*   string;\n\n  } TT_NameEntryRec, *TT_NameEntry;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_NameTableRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure modeling the TrueType name table.                      */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    format         :: The format of the name table.                    */\n  /*                                                                       */\n  /*    numNameRecords :: The number of names in table.                    */\n  /*                                                                       */\n  /*    storageOffset  :: The offset of the name table in the `name'       */\n  /*                      TrueType table.                                  */\n  /*                                                                       */\n  /*    names          :: An array of name records.                        */\n  /*                                                                       */\n  /*    stream         :: the file's input stream.                         */\n  /*                                                                       */\n  typedef struct  TT_NameTableRec_\n  {\n    FT_UShort         format;\n    FT_UInt           numNameRecords;\n    FT_UInt           storageOffset;\n    TT_NameEntryRec*  names;\n    FT_Stream         stream;\n\n  } TT_NameTableRec, *TT_NameTable;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***             OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS         ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_GaspRangeRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A tiny structure used to model a gasp range according to the       */\n  /*    TrueType specification.                                            */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    maxPPEM  :: The maximum ppem value to which `gaspFlag' applies.    */\n  /*                                                                       */\n  /*    gaspFlag :: A flag describing the grid-fitting and anti-aliasing   */\n  /*                modes to be used.                                      */\n  /*                                                                       */\n  typedef struct  TT_GaspRangeRec_\n  {\n    FT_UShort  maxPPEM;\n    FT_UShort  gaspFlag;\n\n  } TT_GaspRangeRec, *TT_GaspRange;\n\n\n#define TT_GASP_GRIDFIT  0x01\n#define TT_GASP_DOGRAY   0x02\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_GaspRec                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure modeling the TrueType `gasp' table used to specify     */\n  /*    grid-fitting and anti-aliasing behaviour.                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    version    :: The version number.                                  */\n  /*                                                                       */\n  /*    numRanges  :: The number of gasp ranges in table.                  */\n  /*                                                                       */\n  /*    gaspRanges :: An array of gasp ranges.                             */\n  /*                                                                       */\n  typedef struct  TT_Gasp_\n  {\n    FT_UShort     version;\n    FT_UShort     numRanges;\n    TT_GaspRange  gaspRanges;\n\n  } TT_GaspRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***                    EMBEDDED BITMAPS SUPPORT                       ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_SBit_MetricsRec                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to hold the big metrics of a given glyph bitmap   */\n  /*    in a TrueType or OpenType font.  These are usually found in the    */\n  /*    `EBDT' (Microsoft) or `bloc' (Apple) table.                        */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    height       :: The glyph height in pixels.                        */\n  /*                                                                       */\n  /*    width        :: The glyph width in pixels.                         */\n  /*                                                                       */\n  /*    horiBearingX :: The horizontal left bearing.                       */\n  /*                                                                       */\n  /*    horiBearingY :: The horizontal top bearing.                        */\n  /*                                                                       */\n  /*    horiAdvance  :: The horizontal advance.                            */\n  /*                                                                       */\n  /*    vertBearingX :: The vertical left bearing.                         */\n  /*                                                                       */\n  /*    vertBearingY :: The vertical top bearing.                          */\n  /*                                                                       */\n  /*    vertAdvance  :: The vertical advance.                              */\n  /*                                                                       */\n  typedef struct  TT_SBit_MetricsRec_\n  {\n    FT_UShort  height;\n    FT_UShort  width;\n\n    FT_Short   horiBearingX;\n    FT_Short   horiBearingY;\n    FT_UShort  horiAdvance;\n\n    FT_Short   vertBearingX;\n    FT_Short   vertBearingY;\n    FT_UShort  vertAdvance;\n\n  } TT_SBit_MetricsRec, *TT_SBit_Metrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_SBit_SmallMetricsRec                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to hold the small metrics of a given glyph bitmap */\n  /*    in a TrueType or OpenType font.  These are usually found in the    */\n  /*    `EBDT' (Microsoft) or the `bdat' (Apple) table.                    */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    height   :: The glyph height in pixels.                            */\n  /*                                                                       */\n  /*    width    :: The glyph width in pixels.                             */\n  /*                                                                       */\n  /*    bearingX :: The left-side bearing.                                 */\n  /*                                                                       */\n  /*    bearingY :: The top-side bearing.                                  */\n  /*                                                                       */\n  /*    advance  :: The advance width or height.                           */\n  /*                                                                       */\n  typedef struct  TT_SBit_Small_Metrics_\n  {\n    FT_Byte  height;\n    FT_Byte  width;\n\n    FT_Char  bearingX;\n    FT_Char  bearingY;\n    FT_Byte  advance;\n\n  } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_SBit_LineMetricsRec                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to describe the text line metrics of a given      */\n  /*    bitmap strike, for either a horizontal or vertical layout.         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    ascender                :: The ascender in pixels.                 */\n  /*                                                                       */\n  /*    descender               :: The descender in pixels.                */\n  /*                                                                       */\n  /*    max_width               :: The maximum glyph width in pixels.      */\n  /*                                                                       */\n  /*    caret_slope_enumerator  :: Rise of the caret slope, typically set  */\n  /*                               to 1 for non-italic fonts.              */\n  /*                                                                       */\n  /*    caret_slope_denominator :: Rise of the caret slope, typically set  */\n  /*                               to 0 for non-italic fonts.              */\n  /*                                                                       */\n  /*    caret_offset            :: Offset in pixels to move the caret for  */\n  /*                               proper positioning.                     */\n  /*                                                                       */\n  /*    min_origin_SB           :: Minimum of horiBearingX (resp.          */\n  /*                               vertBearingY).                          */\n  /*    min_advance_SB          :: Minimum of                              */\n  /*                                                                       */\n  /*                                 horizontal advance -                  */\n  /*                                   ( horiBearingX + width )            */\n  /*                                                                       */\n  /*                               resp.                                   */\n  /*                                                                       */\n  /*                                 vertical advance -                    */\n  /*                                   ( vertBearingY + height )           */\n  /*                                                                       */\n  /*    max_before_BL           :: Maximum of horiBearingY (resp.          */\n  /*                               vertBearingY).                          */\n  /*                                                                       */\n  /*    min_after_BL            :: Minimum of                              */\n  /*                                                                       */\n  /*                                 horiBearingY - height                 */\n  /*                                                                       */\n  /*                               resp.                                   */\n  /*                                                                       */\n  /*                                 vertBearingX - width                  */\n  /*                                                                       */\n  /*    pads                    :: Unused (to make the size of the record  */\n  /*                               a multiple of 32 bits.                  */\n  /*                                                                       */\n  typedef struct  TT_SBit_LineMetricsRec_\n  {\n    FT_Char  ascender;\n    FT_Char  descender;\n    FT_Byte  max_width;\n    FT_Char  caret_slope_numerator;\n    FT_Char  caret_slope_denominator;\n    FT_Char  caret_offset;\n    FT_Char  min_origin_SB;\n    FT_Char  min_advance_SB;\n    FT_Char  max_before_BL;\n    FT_Char  min_after_BL;\n    FT_Char  pads[2];\n\n  } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_SBit_RangeRec                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A TrueType/OpenType subIndexTable as defined in the `EBLC'         */\n  /*    (Microsoft) or `bloc' (Apple) tables.                              */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    first_glyph   :: The first glyph index in the range.               */\n  /*                                                                       */\n  /*    last_glyph    :: The last glyph index in the range.                */\n  /*                                                                       */\n  /*    index_format  :: The format of index table.  Valid values are 1    */\n  /*                     to 5.                                             */\n  /*                                                                       */\n  /*    image_format  :: The format of `EBDT' image data.                  */\n  /*                                                                       */\n  /*    image_offset  :: The offset to image data in `EBDT'.               */\n  /*                                                                       */\n  /*    image_size    :: For index formats 2 and 5.  This is the size in   */\n  /*                     bytes of each glyph bitmap.                       */\n  /*                                                                       */\n  /*    big_metrics   :: For index formats 2 and 5.  This is the big       */\n  /*                     metrics for each glyph bitmap.                    */\n  /*                                                                       */\n  /*    num_glyphs    :: For index formats 4 and 5.  This is the number of */\n  /*                     glyphs in the code array.                         */\n  /*                                                                       */\n  /*    glyph_offsets :: For index formats 1 and 3.                        */\n  /*                                                                       */\n  /*    glyph_codes   :: For index formats 4 and 5.                        */\n  /*                                                                       */\n  /*    table_offset  :: The offset of the index table in the `EBLC'       */\n  /*                     table.  Only used during strike loading.          */\n  /*                                                                       */\n  typedef struct  TT_SBit_RangeRec_\n  {\n    FT_UShort           first_glyph;\n    FT_UShort           last_glyph;\n\n    FT_UShort           index_format;\n    FT_UShort           image_format;\n    FT_ULong            image_offset;\n\n    FT_ULong            image_size;\n    TT_SBit_MetricsRec  metrics;\n    FT_ULong            num_glyphs;\n\n    FT_ULong*           glyph_offsets;\n    FT_UShort*          glyph_codes;\n\n    FT_ULong            table_offset;\n\n  } TT_SBit_RangeRec, *TT_SBit_Range;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_SBit_StrikeRec                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used describe a given bitmap strike in the `EBLC'      */\n  /*    (Microsoft) or `bloc' (Apple) tables.                              */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*   num_index_ranges :: The number of index ranges.                     */\n  /*                                                                       */\n  /*   index_ranges     :: An array of glyph index ranges.                 */\n  /*                                                                       */\n  /*   color_ref        :: Unused.  `color_ref' is put in for future       */\n  /*                       enhancements, but these fields are already      */\n  /*                       in use by other platforms (e.g. Newton).        */\n  /*                       For details, please see                         */\n  /*                                                                       */\n  /*                         http://fonts.apple.com/                       */\n  /*                                TTRefMan/RM06/Chap6bloc.html           */\n  /*                                                                       */\n  /*   hori             :: The line metrics for horizontal layouts.        */\n  /*                                                                       */\n  /*   vert             :: The line metrics for vertical layouts.          */\n  /*                                                                       */\n  /*   start_glyph      :: The lowest glyph index for this strike.         */\n  /*                                                                       */\n  /*   end_glyph        :: The highest glyph index for this strike.        */\n  /*                                                                       */\n  /*   x_ppem           :: The number of horizontal pixels per EM.         */\n  /*                                                                       */\n  /*   y_ppem           :: The number of vertical pixels per EM.           */\n  /*                                                                       */\n  /*   bit_depth        :: The bit depth.  Valid values are 1, 2, 4,       */\n  /*                       and 8.                                          */\n  /*                                                                       */\n  /*   flags            :: Is this a vertical or horizontal strike?  For   */\n  /*                       details, please see                             */\n  /*                                                                       */\n  /*                         http://fonts.apple.com/                       */\n  /*                                TTRefMan/RM06/Chap6bloc.html           */\n  /*                                                                       */\n  typedef struct  TT_SBit_StrikeRec_\n  {\n    FT_Int                  num_ranges;\n    TT_SBit_Range           sbit_ranges;\n    FT_ULong                ranges_offset;\n\n    FT_ULong                color_ref;\n\n    TT_SBit_LineMetricsRec  hori;\n    TT_SBit_LineMetricsRec  vert;\n\n    FT_UShort               start_glyph;\n    FT_UShort               end_glyph;\n\n    FT_Byte                 x_ppem;\n    FT_Byte                 y_ppem;\n\n    FT_Byte                 bit_depth;\n    FT_Char                 flags;\n\n  } TT_SBit_StrikeRec, *TT_SBit_Strike;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_SBit_ComponentRec                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure to describe a compound sbit element.            */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    glyph_code :: The element's glyph index.                           */\n  /*                                                                       */\n  /*    x_offset   :: The element's left bearing.                          */\n  /*                                                                       */\n  /*    y_offset   :: The element's top bearing.                           */\n  /*                                                                       */\n  typedef struct  TT_SBit_ComponentRec_\n  {\n    FT_UShort  glyph_code;\n    FT_Char    x_offset;\n    FT_Char    y_offset;\n\n  } TT_SBit_ComponentRec, *TT_SBit_Component;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_SBit_ScaleRec                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used describe a given bitmap scaling table, as defined */\n  /*    in the `EBSC' table.                                               */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    hori              :: The horizontal line metrics.                  */\n  /*                                                                       */\n  /*    vert              :: The vertical line metrics.                    */\n  /*                                                                       */\n  /*    x_ppem            :: The number of horizontal pixels per EM.       */\n  /*                                                                       */\n  /*    y_ppem            :: The number of vertical pixels per EM.         */\n  /*                                                                       */\n  /*    x_ppem_substitute :: Substitution x_ppem value.                    */\n  /*                                                                       */\n  /*    y_ppem_substitute :: Substitution y_ppem value.                    */\n  /*                                                                       */\n  typedef struct  TT_SBit_ScaleRec_\n  {\n    TT_SBit_LineMetricsRec  hori;\n    TT_SBit_LineMetricsRec  vert;\n\n    FT_Byte                 x_ppem;\n    FT_Byte                 y_ppem;\n\n    FT_Byte                 x_ppem_substitute;\n    FT_Byte                 y_ppem_substitute;\n\n  } TT_SBit_ScaleRec, *TT_SBit_Scale;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***                  POSTSCRIPT GLYPH NAMES SUPPORT                   ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_Post_20Rec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Postscript names sub-table, format 2.0.  Stores the PS name of     */\n  /*    each glyph in the font face.                                       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_glyphs    :: The number of named glyphs in the table.          */\n  /*                                                                       */\n  /*    num_names     :: The number of PS names stored in the table.       */\n  /*                                                                       */\n  /*    glyph_indices :: The indices of the glyphs in the names arrays.    */\n  /*                                                                       */\n  /*    glyph_names   :: The PS names not in Mac Encoding.                 */\n  /*                                                                       */\n  typedef struct  TT_Post_20Rec_\n  {\n    FT_UShort   num_glyphs;\n    FT_UShort   num_names;\n    FT_UShort*  glyph_indices;\n    FT_Char**   glyph_names;\n\n  } TT_Post_20Rec, *TT_Post_20;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_Post_25Rec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Postscript names sub-table, format 2.5.  Stores the PS name of     */\n  /*    each glyph in the font face.                                       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_glyphs :: The number of glyphs in the table.                   */\n  /*                                                                       */\n  /*    offsets    :: An array of signed offsets in a normal Mac           */\n  /*                  Postscript name encoding.                            */\n  /*                                                                       */\n  typedef struct  TT_Post_25_\n  {\n    FT_UShort  num_glyphs;\n    FT_Char*   offsets;\n\n  } TT_Post_25Rec, *TT_Post_25;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_Post_NamesRec                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Postscript names table, either format 2.0 or 2.5.                  */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    loaded    :: A flag to indicate whether the PS names are loaded.   */\n  /*                                                                       */\n  /*    format_20 :: The sub-table used for format 2.0.                    */\n  /*                                                                       */\n  /*    format_25 :: The sub-table used for format 2.5.                    */\n  /*                                                                       */\n  typedef struct  TT_Post_NamesRec_\n  {\n    FT_Bool  loaded;\n\n    union\n    {\n      TT_Post_20Rec  format_20;\n      TT_Post_25Rec  format_25;\n\n    } names;\n\n  } TT_Post_NamesRec, *TT_Post_Names;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***                    GX VARIATION TABLE SUPPORT                     ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n  typedef struct GX_BlendRec_  *GX_Blend;\n#endif\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***              EMBEDDED BDF PROPERTIES TABLE SUPPORT                ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n   * These types are used to support a `BDF ' table that isn't part of the\n   * official TrueType specification.  It is mainly used in SFNT-based\n   * bitmap fonts that were generated from a set of BDF fonts.\n   *\n   * The format of the table is as follows.\n   *\n   *   USHORT   version      `BDF ' table version number, should be 0x0001.\n   *   USHORT   strikeCount  Number of strikes (bitmap sizes) in this table.\n   *   ULONG    stringTable  Offset (from start of BDF table) to string\n   *                         table.\n   *\n   * This is followed by an array of `strikeCount' descriptors, having the\n   * following format.\n   *\n   *   USHORT   ppem         Vertical pixels per EM for this strike.\n   *   USHORT   numItems     Number of items for this strike (properties and\n   *                         atoms).  Maximum is 255.\n   *\n   * This array in turn is followed by `strikeCount' value sets.  Each\n   * `value set' is an array of `numItems' items with the following format.\n   *\n   *   ULONG    item_name    Offset in string table to item name.\n   *   USHORT   item_type    The item type.  Possible values are\n   *                            0 => string (e.g., COMMENT)\n   *                            1 => atom   (e.g., FONT or even SIZE)\n   *                            2 => int32\n   *                            3 => uint32\n   *                         0x10 => A flag to indicate a properties.  This\n   *                                 is ORed with the above values.\n   *   ULONG    item_value   For strings  => Offset into string table without\n   *                                         the corresponding double quotes.\n   *                         For atoms    => Offset into string table.\n   *                         For integers => Direct value.\n   *\n   * All strings in the string table consist of bytes and are\n   * zero-terminated.\n   *\n   */\n\n#ifdef TT_CONFIG_OPTION_BDF\n\n  typedef struct  TT_BDFRec_\n  {\n    FT_Byte*   table;\n    FT_Byte*   table_end;\n    FT_Byte*   strings;\n    FT_ULong   strings_size;\n    FT_UInt    num_strikes;\n    FT_Bool    loaded;\n\n  } TT_BDFRec, *TT_BDF;\n\n#endif /* TT_CONFIG_OPTION_BDF */\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /***                  ORIGINAL TT_FACE CLASS DEFINITION                ***/\n  /***                                                                   ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This structure/class is defined here because it is common to the      */\n  /* following formats: TTF, OpenType-TT, and OpenType-CFF.                */\n  /*                                                                       */\n  /* Note, however, that the classes TT_Size and TT_GlyphSlot are not      */\n  /* shared between font drivers, and are thus defined in `ttobjs.h'.      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    TT_Face                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a TrueType face/font object.  A TT_Face encapsulates   */\n  /*    the resolution and scaling independent parts of a TrueType font    */\n  /*    resource.                                                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The TT_Face structure is also used as a `parent class' for the     */\n  /*    OpenType-CFF class (T2_Face).                                      */\n  /*                                                                       */\n  typedef struct TT_FaceRec_*  TT_Face;\n\n\n  /* a function type used for the truetype bytecode interpreter hooks */\n  typedef FT_Error\n  (*TT_Interpreter)( void*  exec_context );\n\n  /* forward declaration */\n  typedef struct TT_LoaderRec_*  TT_Loader;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Loader_GotoTableFunc                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Seeks a stream to the start of a given TrueType table.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    tag    :: A 4-byte tag used to name the table.                     */\n  /*                                                                       */\n  /*    stream :: The input stream.                                        */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    length :: The length of the table in bytes.  Set to 0 if not       */\n  /*              needed.                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The stream cursor must be at the font file's origin.               */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Loader_GotoTableFunc)( TT_Face    face,\n                              FT_ULong   tag,\n                              FT_Stream  stream,\n                              FT_ULong*  length );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Loader_StartGlyphFunc                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Seeks a stream to the start of a given glyph element, and opens a  */\n  /*    frame for it.                                                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    loader      :: The current TrueType glyph loader object.           */\n  /*                                                                       */\n  /*    glyph index :: The index of the glyph to access.                   */\n  /*                                                                       */\n  /*    offset      :: The offset of the glyph according to the            */\n  /*                   `locations' table.                                  */\n  /*                                                                       */\n  /*    byte_count  :: The size of the frame in bytes.                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function is normally equivalent to FT_STREAM_SEEK(offset)     */\n  /*    followed by FT_FRAME_ENTER(byte_count) with the loader's stream,   */\n  /*    but alternative formats (e.g. compressed ones) might use something */\n  /*    different.                                                         */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Loader_StartGlyphFunc)( TT_Loader  loader,\n                               FT_UInt    glyph_index,\n                               FT_ULong   offset,\n                               FT_UInt    byte_count );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Loader_ReadGlyphFunc                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Reads one glyph element (its header, a simple glyph, or a          */\n  /*    composite) from the loader's current stream frame.                 */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    loader :: The current TrueType glyph loader object.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  typedef FT_Error\n  (*TT_Loader_ReadGlyphFunc)( TT_Loader  loader );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    TT_Loader_EndGlyphFunc                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Closes the current loader stream frame for the glyph.              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    loader :: The current TrueType glyph loader object.                */\n  /*                                                                       */\n  typedef void\n  (*TT_Loader_EndGlyphFunc)( TT_Loader  loader );\n\n\n  typedef enum TT_SbitTableType_\n  {\n    TT_SBIT_TABLE_TYPE_NONE = 0,\n    TT_SBIT_TABLE_TYPE_EBLC, /* `EBLC' (Microsoft), */\n                             /* `bloc' (Apple)      */\n    TT_SBIT_TABLE_TYPE_CBLC, /* `CBLC' (Google)     */\n    TT_SBIT_TABLE_TYPE_SBIX, /* `sbix' (Apple)      */\n\n    /* do not remove */\n    TT_SBIT_TABLE_TYPE_MAX\n\n  } TT_SbitTableType;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                         TrueType Face Type                            */\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_Face                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The TrueType face class.  These objects model the resolution and   */\n  /*    point-size independent data found in a TrueType font file.         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root                 :: The base FT_Face structure, managed by the */\n  /*                            base layer.                                */\n  /*                                                                       */\n  /*    ttc_header           :: The TrueType collection header, used when  */\n  /*                            the file is a `ttc' rather than a `ttf'.   */\n  /*                            For ordinary font files, the field         */\n  /*                            `ttc_header.count' is set to 0.            */\n  /*                                                                       */\n  /*    format_tag           :: The font format tag.                       */\n  /*                                                                       */\n  /*    num_tables           :: The number of TrueType tables in this font */\n  /*                            file.                                      */\n  /*                                                                       */\n  /*    dir_tables           :: The directory of TrueType tables for this  */\n  /*                            font file.                                 */\n  /*                                                                       */\n  /*    header               :: The font's font header (`head' table).     */\n  /*                            Read on font opening.                      */\n  /*                                                                       */\n  /*    horizontal           :: The font's horizontal header (`hhea'       */\n  /*                            table).  This field also contains the      */\n  /*                            associated horizontal metrics table        */\n  /*                            (`hmtx').                                  */\n  /*                                                                       */\n  /*    max_profile          :: The font's maximum profile table.  Read on */\n  /*                            font opening.  Note that some maximum      */\n  /*                            values cannot be taken directly from this  */\n  /*                            table.  We thus define additional fields   */\n  /*                            below to hold the computed maxima.         */\n  /*                                                                       */\n  /*    vertical_info        :: A boolean which is set when the font file  */\n  /*                            contains vertical metrics.  If not, the    */\n  /*                            value of the `vertical' field is           */\n  /*                            undefined.                                 */\n  /*                                                                       */\n  /*    vertical             :: The font's vertical header (`vhea' table). */\n  /*                            This field also contains the associated    */\n  /*                            vertical metrics table (`vmtx'), if found. */\n  /*                            IMPORTANT: The contents of this field is   */\n  /*                            undefined if the `verticalInfo' field is   */\n  /*                            unset.                                     */\n  /*                                                                       */\n  /*    num_names            :: The number of name records within this     */\n  /*                            TrueType font.                             */\n  /*                                                                       */\n  /*    name_table           :: The table of name records (`name').        */\n  /*                                                                       */\n  /*    os2                  :: The font's OS/2 table (`OS/2').            */\n  /*                                                                       */\n  /*    postscript           :: The font's PostScript table (`post'        */\n  /*                            table).  The PostScript glyph names are    */\n  /*                            not loaded by the driver on face opening.  */\n  /*                            See the `ttpost' module for more details.  */\n  /*                                                                       */\n  /*    cmap_table           :: Address of the face's `cmap' SFNT table    */\n  /*                            in memory (it's an extracted frame).       */\n  /*                                                                       */\n  /*    cmap_size            :: The size in bytes of the `cmap_table'      */\n  /*                            described above.                           */\n  /*                                                                       */\n  /*    goto_table           :: A function called by each TrueType table   */\n  /*                            loader to position a stream's cursor to    */\n  /*                            the start of a given table according to    */\n  /*                            its tag.  It defaults to TT_Goto_Face but  */\n  /*                            can be different for strange formats (e.g. */\n  /*                            Type 42).                                  */\n  /*                                                                       */\n  /*    access_glyph_frame   :: A function used to access the frame of a   */\n  /*                            given glyph within the face's font file.   */\n  /*                                                                       */\n  /*    forget_glyph_frame   :: A function used to forget the frame of a   */\n  /*                            given glyph when all data has been loaded. */\n  /*                                                                       */\n  /*    read_glyph_header    :: A function used to read a glyph header.    */\n  /*                            It must be called between an `access' and  */\n  /*                            `forget'.                                  */\n  /*                                                                       */\n  /*    read_simple_glyph    :: A function used to read a simple glyph.    */\n  /*                            It must be called after the header was     */\n  /*                            read, and before the `forget'.             */\n  /*                                                                       */\n  /*    read_composite_glyph :: A function used to read a composite glyph. */\n  /*                            It must be called after the header was     */\n  /*                            read, and before the `forget'.             */\n  /*                                                                       */\n  /*    sfnt                 :: A pointer to the SFNT service.             */\n  /*                                                                       */\n  /*    psnames              :: A pointer to the PostScript names service. */\n  /*                                                                       */\n  /*    hdmx                 :: The face's horizontal device metrics       */\n  /*                            (`hdmx' table).  This table is optional in */\n  /*                            TrueType/OpenType fonts.                   */\n  /*                                                                       */\n  /*    gasp                 :: The grid-fitting and scaling properties    */\n  /*                            table (`gasp').  This table is optional in */\n  /*                            TrueType/OpenType fonts.                   */\n  /*                                                                       */\n  /*    pclt                 :: The `pclt' SFNT table.                     */\n  /*                                                                       */\n  /*    num_sbit_scales      :: The number of sbit scales for this font.   */\n  /*                                                                       */\n  /*    sbit_scales          :: Array of sbit scales embedded in this      */\n  /*                            font.  This table is optional in a         */\n  /*                            TrueType/OpenType font.                    */\n  /*                                                                       */\n  /*    postscript_names     :: A table used to store the Postscript names */\n  /*                            of  the glyphs for this font.  See the     */\n  /*                            file  `ttconfig.h' for comments on the     */\n  /*                            TT_CONFIG_OPTION_POSTSCRIPT_NAMES option.  */\n  /*                                                                       */\n  /*    num_locations        :: The number of glyph locations in this      */\n  /*                            TrueType file.  This should be             */\n  /*                            identical to the number of glyphs.         */\n  /*                            Ignored for Type 2 fonts.                  */\n  /*                                                                       */\n  /*    glyph_locations      :: An array of longs.  These are offsets to   */\n  /*                            glyph data within the `glyf' table.        */\n  /*                            Ignored for Type 2 font faces.             */\n  /*                                                                       */\n  /*    glyf_len             :: The length of the `glyf' table.  Needed    */\n  /*                            for malformed `loca' tables.               */\n  /*                                                                       */\n  /*    font_program_size    :: Size in bytecodes of the face's font       */\n  /*                            program.  0 if none defined.  Ignored for  */\n  /*                            Type 2 fonts.                              */\n  /*                                                                       */\n  /*    font_program         :: The face's font program (bytecode stream)  */\n  /*                            executed at load time, also used during    */\n  /*                            glyph rendering.  Comes from the `fpgm'    */\n  /*                            table.  Ignored for Type 2 font fonts.     */\n  /*                                                                       */\n  /*    cvt_program_size     :: The size in bytecodes of the face's cvt    */\n  /*                            program.  Ignored for Type 2 fonts.        */\n  /*                                                                       */\n  /*    cvt_program          :: The face's cvt program (bytecode stream)   */\n  /*                            executed each time an instance/size is     */\n  /*                            changed/reset.  Comes from the `prep'      */\n  /*                            table.  Ignored for Type 2 fonts.          */\n  /*                                                                       */\n  /*    cvt_size             :: Size of the control value table (in        */\n  /*                            entries).   Ignored for Type 2 fonts.      */\n  /*                                                                       */\n  /*    cvt                  :: The face's original control value table.   */\n  /*                            Coordinates are expressed in unscaled font */\n  /*                            units.  Comes from the `cvt ' table.       */\n  /*                            Ignored for Type 2 fonts.                  */\n  /*                                                                       */\n  /*    num_kern_pairs       :: The number of kerning pairs present in the */\n  /*                            font file.  The engine only loads the      */\n  /*                            first horizontal format 0 kern table it    */\n  /*                            finds in the font file.  Ignored for       */\n  /*                            Type 2 fonts.                              */\n  /*                                                                       */\n  /*    kern_table_index     :: The index of the kerning table in the font */\n  /*                            kerning directory.  Ignored for Type 2     */\n  /*                            fonts.                                     */\n  /*                                                                       */\n  /*    interpreter          :: A pointer to the TrueType bytecode         */\n  /*                            interpreters field is also used to hook    */\n  /*                            the debugger in `ttdebug'.                 */\n  /*                                                                       */\n  /*    unpatented_hinting   :: If true, use only unpatented methods in    */\n  /*                            the bytecode interpreter.                  */\n  /*                                                                       */\n  /*    doblend              :: A boolean which is set if the font should  */\n  /*                            be blended (this is for GX var).           */\n  /*                                                                       */\n  /*    blend                :: Contains the data needed to control GX     */\n  /*                            variation tables (rather like Multiple     */\n  /*                            Master data).                              */\n  /*                                                                       */\n  /*    extra                :: Reserved for third-party font drivers.     */\n  /*                                                                       */\n  /*    postscript_name      :: The PS name of the font.  Used by the      */\n  /*                            postscript name service.                   */\n  /*                                                                       */\n  typedef struct  TT_FaceRec_\n  {\n    FT_FaceRec            root;\n\n    TTC_HeaderRec         ttc_header;\n\n    FT_ULong              format_tag;\n    FT_UShort             num_tables;\n    TT_Table              dir_tables;\n\n    TT_Header             header;       /* TrueType header table          */\n    TT_HoriHeader         horizontal;   /* TrueType horizontal header     */\n\n    TT_MaxProfile         max_profile;\n\n    FT_Bool               vertical_info;\n    TT_VertHeader         vertical;     /* TT Vertical header, if present */\n\n    FT_UShort             num_names;    /* number of name records  */\n    TT_NameTableRec       name_table;   /* name table              */\n\n    TT_OS2                os2;          /* TrueType OS/2 table            */\n    TT_Postscript         postscript;   /* TrueType Postscript table      */\n\n    FT_Byte*              cmap_table;   /* extracted `cmap' table */\n    FT_ULong              cmap_size;\n\n    TT_Loader_GotoTableFunc   goto_table;\n\n    TT_Loader_StartGlyphFunc  access_glyph_frame;\n    TT_Loader_EndGlyphFunc    forget_glyph_frame;\n    TT_Loader_ReadGlyphFunc   read_glyph_header;\n    TT_Loader_ReadGlyphFunc   read_simple_glyph;\n    TT_Loader_ReadGlyphFunc   read_composite_glyph;\n\n    /* a typeless pointer to the SFNT_Interface table used to load */\n    /* the basic TrueType tables in the face object                */\n    void*                 sfnt;\n\n    /* a typeless pointer to the FT_Service_PsCMapsRec table used to */\n    /* handle glyph names <-> unicode & Mac values                   */\n    void*                 psnames;\n\n\n    /***********************************************************************/\n    /*                                                                     */\n    /* Optional TrueType/OpenType tables                                   */\n    /*                                                                     */\n    /***********************************************************************/\n\n    /* grid-fitting and scaling table */\n    TT_GaspRec            gasp;                 /* the `gasp' table */\n\n    /* PCL 5 table */\n    TT_PCLT               pclt;\n\n    /* embedded bitmaps support */\n    FT_ULong              num_sbit_scales;\n    TT_SBit_Scale         sbit_scales;\n\n    /* postscript names table */\n    TT_Post_NamesRec      postscript_names;\n\n\n    /***********************************************************************/\n    /*                                                                     */\n    /* TrueType-specific fields (ignored by the OTF-Type2 driver)          */\n    /*                                                                     */\n    /***********************************************************************/\n\n    /* the font program, if any */\n    FT_ULong              font_program_size;\n    FT_Byte*              font_program;\n\n    /* the cvt program, if any */\n    FT_ULong              cvt_program_size;\n    FT_Byte*              cvt_program;\n\n    /* the original, unscaled, control value table */\n    FT_ULong              cvt_size;\n    FT_Short*             cvt;\n\n    /* A pointer to the bytecode interpreter to use.  This is also */\n    /* used to hook the debugger for the `ttdebug' utility.        */\n    TT_Interpreter        interpreter;\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    /* Use unpatented hinting only. */\n    FT_Bool               unpatented_hinting;\n#endif\n\n    /***********************************************************************/\n    /*                                                                     */\n    /* Other tables or fields. This is used by derivative formats like     */\n    /* OpenType.                                                           */\n    /*                                                                     */\n    /***********************************************************************/\n\n    FT_Generic            extra;\n\n    const char*           postscript_name;\n\n    FT_ULong              glyf_len;\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n    FT_Bool               doblend;\n    GX_Blend              blend;\n#endif\n\n    /* since version 2.2 */\n\n    FT_Byte*              horz_metrics;\n    FT_ULong              horz_metrics_size;\n\n    FT_Byte*              vert_metrics;\n    FT_ULong              vert_metrics_size;\n\n    FT_ULong              num_locations; /* in broken TTF, gid > 0xFFFF */\n    FT_Byte*              glyph_locations;\n\n    FT_Byte*              hdmx_table;\n    FT_ULong              hdmx_table_size;\n    FT_UInt               hdmx_record_count;\n    FT_ULong              hdmx_record_size;\n    FT_Byte*              hdmx_record_sizes;\n\n    FT_Byte*              sbit_table;\n    FT_ULong              sbit_table_size;\n    TT_SbitTableType      sbit_table_type;\n    FT_UInt               sbit_num_strikes;\n\n    FT_Byte*              kern_table;\n    FT_ULong              kern_table_size;\n    FT_UInt               num_kern_tables;\n    FT_UInt32             kern_avail_bits;\n    FT_UInt32             kern_order_bits;\n\n#ifdef TT_CONFIG_OPTION_BDF\n    TT_BDFRec             bdf;\n#endif /* TT_CONFIG_OPTION_BDF */\n\n    /* since 2.3.0 */\n    FT_ULong              horz_metrics_offset;\n    FT_ULong              vert_metrics_offset;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    /* since 2.4.12 */\n    FT_ULong              sph_found_func_flags; /* special functions found */\n                                                /* for this face           */\n    FT_Bool               sph_compatibility_mode;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n  } TT_FaceRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  <Struct>                                                             */\n  /*     TT_GlyphZoneRec                                                   */\n  /*                                                                       */\n  /*  <Description>                                                        */\n  /*     A glyph zone is used to load, scale and hint glyph outline        */\n  /*     coordinates.                                                      */\n  /*                                                                       */\n  /*  <Fields>                                                             */\n  /*     memory       :: A handle to the memory manager.                   */\n  /*                                                                       */\n  /*     max_points   :: The maximum size in points of the zone.           */\n  /*                                                                       */\n  /*     max_contours :: Max size in links contours of the zone.           */\n  /*                                                                       */\n  /*     n_points     :: The current number of points in the zone.         */\n  /*                                                                       */\n  /*     n_contours   :: The current number of contours in the zone.       */\n  /*                                                                       */\n  /*     org          :: The original glyph coordinates (font              */\n  /*                     units/scaled).                                    */\n  /*                                                                       */\n  /*     cur          :: The current glyph coordinates (scaled/hinted).    */\n  /*                                                                       */\n  /*     tags         :: The point control tags.                           */\n  /*                                                                       */\n  /*     contours     :: The contours end points.                          */\n  /*                                                                       */\n  /*     first_point  :: Offset of the current subglyph's first point.     */\n  /*                                                                       */\n  typedef struct  TT_GlyphZoneRec_\n  {\n    FT_Memory   memory;\n    FT_UShort   max_points;\n    FT_UShort   max_contours;\n    FT_UShort   n_points;    /* number of points in zone    */\n    FT_Short    n_contours;  /* number of contours          */\n\n    FT_Vector*  org;         /* original point coordinates  */\n    FT_Vector*  cur;         /* current point coordinates   */\n    FT_Vector*  orus;        /* original (unscaled) point coordinates */\n\n    FT_Byte*    tags;        /* current touch flags         */\n    FT_UShort*  contours;    /* contour end points          */\n\n    FT_UShort   first_point; /* offset of first (#0) point  */\n\n  } TT_GlyphZoneRec, *TT_GlyphZone;\n\n\n  /* handle to execution context */\n  typedef struct TT_ExecContextRec_*  TT_ExecContext;\n\n  /* glyph loader structure */\n  typedef struct  TT_LoaderRec_\n  {\n    FT_Face          face;\n    FT_Size          size;\n    FT_GlyphSlot     glyph;\n    FT_GlyphLoader   gloader;\n\n    FT_ULong         load_flags;\n    FT_UInt          glyph_index;\n\n    FT_Stream        stream;\n    FT_Int           byte_len;\n\n    FT_Short         n_contours;\n    FT_BBox          bbox;\n    FT_Int           left_bearing;\n    FT_Int           advance;\n    FT_Int           linear;\n    FT_Bool          linear_def;\n    FT_Vector        pp1;\n    FT_Vector        pp2;\n\n    FT_ULong         glyf_offset;\n\n    /* the zone where we load our glyphs */\n    TT_GlyphZoneRec  base;\n    TT_GlyphZoneRec  zone;\n\n    TT_ExecContext   exec;\n    FT_Byte*         instructions;\n    FT_ULong         ins_pos;\n\n    /* for possible extensibility in other formats */\n    void*            other;\n\n    /* since version 2.1.8 */\n    FT_Int           top_bearing;\n    FT_Int           vadvance;\n    FT_Vector        pp3;\n    FT_Vector        pp4;\n\n    /* since version 2.2.1 */\n    FT_Byte*         cursor;\n    FT_Byte*         limit;\n\n  } TT_LoaderRec;\n\n\nFT_END_HEADER\n\n#endif /* __TTTYPES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/t1tables.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1tables.h                                                             */\n/*                                                                         */\n/*    Basic Type 1/Type 2 tables definitions and interface (specification  */\n/*    only).                                                               */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006, 2008, 2009, 2011, 2014 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1TABLES_H__\n#define __T1TABLES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    type1_tables                                                       */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Type 1 Tables                                                      */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Type~1 (PostScript) specific font tables.                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the definition of Type 1-specific tables,    */\n  /*    including structures related to other PostScript font formats.     */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    PS_FontInfoRec                                                     */\n  /*    PS_FontInfo                                                        */\n  /*    PS_PrivateRec                                                      */\n  /*    PS_Private                                                         */\n  /*                                                                       */\n  /*    CID_FaceDictRec                                                    */\n  /*    CID_FaceDict                                                       */\n  /*    CID_FaceInfoRec                                                    */\n  /*    CID_FaceInfo                                                       */\n  /*                                                                       */\n  /*    FT_Has_PS_Glyph_Names                                              */\n  /*    FT_Get_PS_Font_Info                                                */\n  /*    FT_Get_PS_Font_Private                                             */\n  /*    FT_Get_PS_Font_Value                                               */\n  /*                                                                       */\n  /*    T1_Blend_Flags                                                     */\n  /*    T1_EncodingType                                                    */\n  /*    PS_Dict_Keys                                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */\n  /* structures in order to support Multiple Master fonts.               */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_FontInfoRec                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a Type~1 or Type~2 FontInfo dictionary.  */\n  /*    Note that for Multiple Master fonts, each instance has its own     */\n  /*    FontInfo dictionary.                                               */\n  /*                                                                       */\n  typedef struct  PS_FontInfoRec_\n  {\n    FT_String*  version;\n    FT_String*  notice;\n    FT_String*  full_name;\n    FT_String*  family_name;\n    FT_String*  weight;\n    FT_Long     italic_angle;\n    FT_Bool     is_fixed_pitch;\n    FT_Short    underline_position;\n    FT_UShort   underline_thickness;\n\n  } PS_FontInfoRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_FontInfo                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a @PS_FontInfoRec structure.                           */\n  /*                                                                       */\n  typedef struct PS_FontInfoRec_*  PS_FontInfo;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    T1_FontInfo                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This type is equivalent to @PS_FontInfoRec.  It is deprecated but  */\n  /*    kept to maintain source compatibility between various versions of  */\n  /*    FreeType.                                                          */\n  /*                                                                       */\n  typedef PS_FontInfoRec  T1_FontInfo;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_PrivateRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a Type~1 or Type~2 private dictionary.   */\n  /*    Note that for Multiple Master fonts, each instance has its own     */\n  /*    Private dictionary.                                                */\n  /*                                                                       */\n  typedef struct  PS_PrivateRec_\n  {\n    FT_Int     unique_id;\n    FT_Int     lenIV;\n\n    FT_Byte    num_blue_values;\n    FT_Byte    num_other_blues;\n    FT_Byte    num_family_blues;\n    FT_Byte    num_family_other_blues;\n\n    FT_Short   blue_values[14];\n    FT_Short   other_blues[10];\n\n    FT_Short   family_blues      [14];\n    FT_Short   family_other_blues[10];\n\n    FT_Fixed   blue_scale;\n    FT_Int     blue_shift;\n    FT_Int     blue_fuzz;\n\n    FT_UShort  standard_width[1];\n    FT_UShort  standard_height[1];\n\n    FT_Byte    num_snap_widths;\n    FT_Byte    num_snap_heights;\n    FT_Bool    force_bold;\n    FT_Bool    round_stem_up;\n\n    FT_Short   snap_widths [13];  /* including std width  */\n    FT_Short   snap_heights[13];  /* including std height */\n\n    FT_Fixed   expansion_factor;\n\n    FT_Long    language_group;\n    FT_Long    password;\n\n    FT_Short   min_feature[2];\n\n  } PS_PrivateRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_Private                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a @PS_PrivateRec structure.                            */\n  /*                                                                       */\n  typedef struct PS_PrivateRec_*  PS_Private;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    T1_Private                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   This type is equivalent to @PS_PrivateRec.  It is deprecated but    */\n  /*   kept to maintain source compatibility between various versions of   */\n  /*   FreeType.                                                           */\n  /*                                                                       */\n  typedef PS_PrivateRec  T1_Private;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    T1_Blend_Flags                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A set of flags used to indicate which fields are present in a      */\n  /*    given blend dictionary (font info or private).  Used to support    */\n  /*    Multiple Masters fonts.                                            */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    T1_BLEND_UNDERLINE_POSITION ::                                     */\n  /*    T1_BLEND_UNDERLINE_THICKNESS ::                                    */\n  /*    T1_BLEND_ITALIC_ANGLE ::                                           */\n  /*    T1_BLEND_BLUE_VALUES ::                                            */\n  /*    T1_BLEND_OTHER_BLUES ::                                            */\n  /*    T1_BLEND_STANDARD_WIDTH ::                                         */\n  /*    T1_BLEND_STANDARD_HEIGHT ::                                        */\n  /*    T1_BLEND_STEM_SNAP_WIDTHS ::                                       */\n  /*    T1_BLEND_STEM_SNAP_HEIGHTS ::                                      */\n  /*    T1_BLEND_BLUE_SCALE ::                                             */\n  /*    T1_BLEND_BLUE_SHIFT ::                                             */\n  /*    T1_BLEND_FAMILY_BLUES ::                                           */\n  /*    T1_BLEND_FAMILY_OTHER_BLUES ::                                     */\n  /*    T1_BLEND_FORCE_BOLD ::                                             */\n  /*                                                                       */\n  typedef enum  T1_Blend_Flags_\n  {\n    /* required fields in a FontInfo blend dictionary */\n    T1_BLEND_UNDERLINE_POSITION = 0,\n    T1_BLEND_UNDERLINE_THICKNESS,\n    T1_BLEND_ITALIC_ANGLE,\n\n    /* required fields in a Private blend dictionary */\n    T1_BLEND_BLUE_VALUES,\n    T1_BLEND_OTHER_BLUES,\n    T1_BLEND_STANDARD_WIDTH,\n    T1_BLEND_STANDARD_HEIGHT,\n    T1_BLEND_STEM_SNAP_WIDTHS,\n    T1_BLEND_STEM_SNAP_HEIGHTS,\n    T1_BLEND_BLUE_SCALE,\n    T1_BLEND_BLUE_SHIFT,\n    T1_BLEND_FAMILY_BLUES,\n    T1_BLEND_FAMILY_OTHER_BLUES,\n    T1_BLEND_FORCE_BOLD,\n\n    T1_BLEND_MAX    /* do not remove */\n\n  } T1_Blend_Flags;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `T1_Blend_Flags' values instead                       */\n#define t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION\n#define t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS\n#define t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE\n#define t1_blend_blue_values          T1_BLEND_BLUE_VALUES\n#define t1_blend_other_blues          T1_BLEND_OTHER_BLUES\n#define t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH\n#define t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT\n#define t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS\n#define t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS\n#define t1_blend_blue_scale           T1_BLEND_BLUE_SCALE\n#define t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT\n#define t1_blend_family_blues         T1_BLEND_FAMILY_BLUES\n#define t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES\n#define t1_blend_force_bold           T1_BLEND_FORCE_BOLD\n#define t1_blend_max                  T1_BLEND_MAX\n\n  /* */\n\n\n  /* maximum number of Multiple Masters designs, as defined in the spec */\n#define T1_MAX_MM_DESIGNS     16\n\n  /* maximum number of Multiple Masters axes, as defined in the spec */\n#define T1_MAX_MM_AXIS        4\n\n  /* maximum number of elements in a design map */\n#define T1_MAX_MM_MAP_POINTS  20\n\n\n  /* this structure is used to store the BlendDesignMap entry for an axis */\n  typedef struct  PS_DesignMap_\n  {\n    FT_Byte    num_points;\n    FT_Long*   design_points;\n    FT_Fixed*  blend_points;\n\n  } PS_DesignMapRec, *PS_DesignMap;\n\n  /* backwards-compatible definition */\n  typedef PS_DesignMapRec  T1_DesignMap;\n\n\n  typedef struct  PS_BlendRec_\n  {\n    FT_UInt          num_designs;\n    FT_UInt          num_axis;\n\n    FT_String*       axis_names[T1_MAX_MM_AXIS];\n    FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];\n    PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];\n\n    FT_Fixed*        weight_vector;\n    FT_Fixed*        default_weight_vector;\n\n    PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];\n    PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];\n\n    FT_ULong         blend_bitflags;\n\n    FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];\n\n    /* since 2.3.0 */\n\n    /* undocumented, optional: the default design instance;   */\n    /* corresponds to default_weight_vector --                */\n    /* num_default_design_vector == 0 means it is not present */\n    /* in the font and associated metrics files               */\n    FT_UInt          default_design_vector[T1_MAX_MM_DESIGNS];\n    FT_UInt          num_default_design_vector;\n\n  } PS_BlendRec, *PS_Blend;\n\n\n  /* backwards-compatible definition */\n  typedef PS_BlendRec  T1_Blend;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_FaceDictRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to represent data in a CID top-level dictionary.  */\n  /*                                                                       */\n  typedef struct  CID_FaceDictRec_\n  {\n    PS_PrivateRec  private_dict;\n\n    FT_UInt        len_buildchar;\n    FT_Fixed       forcebold_threshold;\n    FT_Pos         stroke_width;\n    FT_Fixed       expansion_factor;\n\n    FT_Byte        paint_type;\n    FT_Byte        font_type;\n    FT_Matrix      font_matrix;\n    FT_Vector      font_offset;\n\n    FT_UInt        num_subrs;\n    FT_ULong       subrmap_offset;\n    FT_Int         sd_bytes;\n\n  } CID_FaceDictRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_FaceDict                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a @CID_FaceDictRec structure.                          */\n  /*                                                                       */\n  typedef struct CID_FaceDictRec_*  CID_FaceDict;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_FontDict                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This type is equivalent to @CID_FaceDictRec.  It is deprecated but */\n  /*    kept to maintain source compatibility between various versions of  */\n  /*    FreeType.                                                          */\n  /*                                                                       */\n  typedef CID_FaceDictRec  CID_FontDict;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_FaceInfoRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to represent CID Face information.                */\n  /*                                                                       */\n  typedef struct  CID_FaceInfoRec_\n  {\n    FT_String*      cid_font_name;\n    FT_Fixed        cid_version;\n    FT_Int          cid_font_type;\n\n    FT_String*      registry;\n    FT_String*      ordering;\n    FT_Int          supplement;\n\n    PS_FontInfoRec  font_info;\n    FT_BBox         font_bbox;\n    FT_ULong        uid_base;\n\n    FT_Int          num_xuid;\n    FT_ULong        xuid[16];\n\n    FT_ULong        cidmap_offset;\n    FT_Int          fd_bytes;\n    FT_Int          gd_bytes;\n    FT_ULong        cid_count;\n\n    FT_Int          num_dicts;\n    CID_FaceDict    font_dicts;\n\n    FT_ULong        data_offset;\n\n  } CID_FaceInfoRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_FaceInfo                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a @CID_FaceInfoRec structure.                          */\n  /*                                                                       */\n  typedef struct CID_FaceInfoRec_*  CID_FaceInfo;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_Info                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   This type is equivalent to @CID_FaceInfoRec.  It is deprecated but  */\n  /*   kept to maintain source compatibility between various versions of   */\n  /*   FreeType.                                                           */\n  /*                                                                       */\n  typedef CID_FaceInfoRec  CID_Info;\n\n\n  /************************************************************************\n   *\n   * @function:\n   *    FT_Has_PS_Glyph_Names\n   *\n   * @description:\n   *    Return true if a given face provides reliable PostScript glyph\n   *    names.  This is similar to using the @FT_HAS_GLYPH_NAMES macro,\n   *    except that certain fonts (mostly TrueType) contain incorrect\n   *    glyph name tables.\n   *\n   *    When this function returns true, the caller is sure that the glyph\n   *    names returned by @FT_Get_Glyph_Name are reliable.\n   *\n   * @input:\n   *    face ::\n   *       face handle\n   *\n   * @return:\n   *    Boolean.  True if glyph names are reliable.\n   *\n   */\n  FT_EXPORT( FT_Int )\n  FT_Has_PS_Glyph_Names( FT_Face  face );\n\n\n  /************************************************************************\n   *\n   * @function:\n   *    FT_Get_PS_Font_Info\n   *\n   * @description:\n   *    Retrieve the @PS_FontInfoRec structure corresponding to a given\n   *    PostScript font.\n   *\n   * @input:\n   *    face ::\n   *       PostScript face handle.\n   *\n   * @output:\n   *    afont_info ::\n   *       Output font info structure pointer.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    The string pointers within the font info structure are owned by\n   *    the face and don't need to be freed by the caller.\n   *\n   *    If the font's format is not PostScript-based, this function will\n   *    return the `FT_Err_Invalid_Argument' error code.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_PS_Font_Info( FT_Face      face,\n                       PS_FontInfo  afont_info );\n\n\n  /************************************************************************\n   *\n   * @function:\n   *    FT_Get_PS_Font_Private\n   *\n   * @description:\n   *    Retrieve the @PS_PrivateRec structure corresponding to a given\n   *    PostScript font.\n   *\n   * @input:\n   *    face ::\n   *       PostScript face handle.\n   *\n   * @output:\n   *    afont_private ::\n   *       Output private dictionary structure pointer.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    The string pointers within the @PS_PrivateRec structure are owned by\n   *    the face and don't need to be freed by the caller.\n   *\n   *    If the font's format is not PostScript-based, this function returns\n   *    the `FT_Err_Invalid_Argument' error code.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_PS_Font_Private( FT_Face     face,\n                          PS_Private  afont_private );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    T1_EncodingType                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration describing the `Encoding' entry in a Type 1         */\n  /*    dictionary.                                                        */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    T1_ENCODING_TYPE_NONE ::                                           */\n  /*    T1_ENCODING_TYPE_ARRAY ::                                          */\n  /*    T1_ENCODING_TYPE_STANDARD ::                                       */\n  /*    T1_ENCODING_TYPE_ISOLATIN1 ::                                      */\n  /*    T1_ENCODING_TYPE_EXPERT ::                                         */\n  /*                                                                       */\n  typedef enum  T1_EncodingType_\n  {\n    T1_ENCODING_TYPE_NONE = 0,\n    T1_ENCODING_TYPE_ARRAY,\n    T1_ENCODING_TYPE_STANDARD,\n    T1_ENCODING_TYPE_ISOLATIN1,\n    T1_ENCODING_TYPE_EXPERT\n\n  } T1_EncodingType;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    PS_Dict_Keys                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration used in calls to @FT_Get_PS_Font_Value to identify  */\n  /*    the Type~1 dictionary entry to retrieve.                           */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    PS_DICT_FONT_TYPE ::                                               */\n  /*    PS_DICT_FONT_MATRIX ::                                             */\n  /*    PS_DICT_FONT_BBOX ::                                               */\n  /*    PS_DICT_PAINT_TYPE ::                                              */\n  /*    PS_DICT_FONT_NAME ::                                               */\n  /*    PS_DICT_UNIQUE_ID ::                                               */\n  /*    PS_DICT_NUM_CHAR_STRINGS ::                                        */\n  /*    PS_DICT_CHAR_STRING_KEY ::                                         */\n  /*    PS_DICT_CHAR_STRING ::                                             */\n  /*    PS_DICT_ENCODING_TYPE ::                                           */\n  /*    PS_DICT_ENCODING_ENTRY ::                                          */\n  /*    PS_DICT_NUM_SUBRS ::                                               */\n  /*    PS_DICT_SUBR ::                                                    */\n  /*    PS_DICT_STD_HW ::                                                  */\n  /*    PS_DICT_STD_VW ::                                                  */\n  /*    PS_DICT_NUM_BLUE_VALUES ::                                         */\n  /*    PS_DICT_BLUE_VALUE ::                                              */\n  /*    PS_DICT_BLUE_FUZZ ::                                               */\n  /*    PS_DICT_NUM_OTHER_BLUES ::                                         */\n  /*    PS_DICT_OTHER_BLUE ::                                              */\n  /*    PS_DICT_NUM_FAMILY_BLUES ::                                        */\n  /*    PS_DICT_FAMILY_BLUE ::                                             */\n  /*    PS_DICT_NUM_FAMILY_OTHER_BLUES ::                                  */\n  /*    PS_DICT_FAMILY_OTHER_BLUE ::                                       */\n  /*    PS_DICT_BLUE_SCALE ::                                              */\n  /*    PS_DICT_BLUE_SHIFT ::                                              */\n  /*    PS_DICT_NUM_STEM_SNAP_H ::                                         */\n  /*    PS_DICT_STEM_SNAP_H ::                                             */\n  /*    PS_DICT_NUM_STEM_SNAP_V ::                                         */\n  /*    PS_DICT_STEM_SNAP_V ::                                             */\n  /*    PS_DICT_FORCE_BOLD ::                                              */\n  /*    PS_DICT_RND_STEM_UP ::                                             */\n  /*    PS_DICT_MIN_FEATURE ::                                             */\n  /*    PS_DICT_LEN_IV ::                                                  */\n  /*    PS_DICT_PASSWORD ::                                                */\n  /*    PS_DICT_LANGUAGE_GROUP ::                                          */\n  /*    PS_DICT_VERSION ::                                                 */\n  /*    PS_DICT_NOTICE ::                                                  */\n  /*    PS_DICT_FULL_NAME ::                                               */\n  /*    PS_DICT_FAMILY_NAME ::                                             */\n  /*    PS_DICT_WEIGHT ::                                                  */\n  /*    PS_DICT_IS_FIXED_PITCH ::                                          */\n  /*    PS_DICT_UNDERLINE_POSITION ::                                      */\n  /*    PS_DICT_UNDERLINE_THICKNESS ::                                     */\n  /*    PS_DICT_FS_TYPE ::                                                 */\n  /*    PS_DICT_ITALIC_ANGLE ::                                            */\n  /*                                                                       */\n  typedef enum  PS_Dict_Keys_\n  {\n    /* conventionally in the font dictionary */\n    PS_DICT_FONT_TYPE,              /* FT_Byte         */\n    PS_DICT_FONT_MATRIX,            /* FT_Fixed        */\n    PS_DICT_FONT_BBOX,              /* FT_Fixed        */\n    PS_DICT_PAINT_TYPE,             /* FT_Byte         */\n    PS_DICT_FONT_NAME,              /* FT_String*      */\n    PS_DICT_UNIQUE_ID,              /* FT_Int          */\n    PS_DICT_NUM_CHAR_STRINGS,       /* FT_Int          */\n    PS_DICT_CHAR_STRING_KEY,        /* FT_String*      */\n    PS_DICT_CHAR_STRING,            /* FT_String*      */\n    PS_DICT_ENCODING_TYPE,          /* T1_EncodingType */\n    PS_DICT_ENCODING_ENTRY,         /* FT_String*      */\n\n    /* conventionally in the font Private dictionary */\n    PS_DICT_NUM_SUBRS,              /* FT_Int     */\n    PS_DICT_SUBR,                   /* FT_String* */\n    PS_DICT_STD_HW,                 /* FT_UShort  */\n    PS_DICT_STD_VW,                 /* FT_UShort  */\n    PS_DICT_NUM_BLUE_VALUES,        /* FT_Byte    */\n    PS_DICT_BLUE_VALUE,             /* FT_Short   */\n    PS_DICT_BLUE_FUZZ,              /* FT_Int     */\n    PS_DICT_NUM_OTHER_BLUES,        /* FT_Byte    */\n    PS_DICT_OTHER_BLUE,             /* FT_Short   */\n    PS_DICT_NUM_FAMILY_BLUES,       /* FT_Byte    */\n    PS_DICT_FAMILY_BLUE,            /* FT_Short   */\n    PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte    */\n    PS_DICT_FAMILY_OTHER_BLUE,      /* FT_Short   */\n    PS_DICT_BLUE_SCALE,             /* FT_Fixed   */\n    PS_DICT_BLUE_SHIFT,             /* FT_Int     */\n    PS_DICT_NUM_STEM_SNAP_H,        /* FT_Byte    */\n    PS_DICT_STEM_SNAP_H,            /* FT_Short   */\n    PS_DICT_NUM_STEM_SNAP_V,        /* FT_Byte    */\n    PS_DICT_STEM_SNAP_V,            /* FT_Short   */\n    PS_DICT_FORCE_BOLD,             /* FT_Bool    */\n    PS_DICT_RND_STEM_UP,            /* FT_Bool    */\n    PS_DICT_MIN_FEATURE,            /* FT_Short   */\n    PS_DICT_LEN_IV,                 /* FT_Int     */\n    PS_DICT_PASSWORD,               /* FT_Long    */\n    PS_DICT_LANGUAGE_GROUP,         /* FT_Long    */\n\n    /* conventionally in the font FontInfo dictionary */\n    PS_DICT_VERSION,                /* FT_String* */\n    PS_DICT_NOTICE,                 /* FT_String* */\n    PS_DICT_FULL_NAME,              /* FT_String* */\n    PS_DICT_FAMILY_NAME,            /* FT_String* */\n    PS_DICT_WEIGHT,                 /* FT_String* */\n    PS_DICT_IS_FIXED_PITCH,         /* FT_Bool    */\n    PS_DICT_UNDERLINE_POSITION,     /* FT_Short   */\n    PS_DICT_UNDERLINE_THICKNESS,    /* FT_UShort  */\n    PS_DICT_FS_TYPE,                /* FT_UShort  */\n    PS_DICT_ITALIC_ANGLE,           /* FT_Long    */\n\n    PS_DICT_MAX = PS_DICT_ITALIC_ANGLE\n\n  } PS_Dict_Keys;\n\n\n  /************************************************************************\n   *\n   * @function:\n   *    FT_Get_PS_Font_Value\n   *\n   * @description:\n   *    Retrieve the value for the supplied key from a PostScript font.\n   *\n   * @input:\n   *    face ::\n   *       PostScript face handle.\n   *\n   *    key ::\n   *       An enumeration value representing the dictionary key to retrieve.\n   *\n   *    idx ::\n   *       For array values, this specifies the index to be returned.\n   *\n   *    value ::\n   *       A pointer to memory into which to write the value.\n   *\n   *    valen_len ::\n   *       The size, in bytes, of the memory supplied for the value.\n   *\n   * @output:\n   *    value ::\n   *       The value matching the above key, if it exists.\n   *\n   * @return:\n   *    The amount of memory (in bytes) required to hold the requested\n   *    value (if it exists, -1 otherwise).\n   *\n   * @note:\n   *    The values returned are not pointers into the internal structures of\n   *    the face, but are `fresh' copies, so that the memory containing them\n   *    belongs to the calling application.  This also enforces the\n   *    `read-only' nature of these values, i.e., this function cannot be\n   *    used to manipulate the face.\n   *\n   *    `value' is a void pointer because the values returned can be of\n   *    various types.\n   *\n   *    If either `value' is NULL or `value_len' is too small, just the\n   *    required memory size for the requested entry is returned.\n   *\n   *    The `idx' parameter is used, not only to retrieve elements of, for\n   *    example, the FontMatrix or FontBBox, but also to retrieve name keys\n   *    from the CharStrings dictionary, and the charstrings themselves.  It\n   *    is ignored for atomic values.\n   *\n   *    PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000.  To\n   *    get the value as in the font stream, you need to divide by\n   *    65536000.0 (to remove the FT_Fixed scale, and the x1000 scale).\n   *\n   *    IMPORTANT: Only key/value pairs read by the FreeType interpreter can\n   *    be retrieved.  So, for example, PostScript procedures such as NP,\n   *    ND, and RD are not available.  Arbitrary keys are, obviously, not be\n   *    available either.\n   *\n   *    If the font's format is not PostScript-based, this function returns\n   *    the `FT_Err_Invalid_Argument' error code.\n   *\n   */\n  FT_EXPORT( FT_Long )\n  FT_Get_PS_Font_Value( FT_Face       face,\n                        PS_Dict_Keys  key,\n                        FT_UInt       idx,\n                        void         *value,\n                        FT_Long       value_len );\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __T1TABLES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ttnameid.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttnameid.h                                                             */\n/*                                                                         */\n/*    TrueType name ID definitions (specification only).                   */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006-2008, 2012-2014 by                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTNAMEID_H__\n#define __TTNAMEID_H__\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    truetype_tables                                                    */\n  /*                                                                       */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Possible values for the `platform' identifier code in the name        */\n  /* records of the TTF `name' table.                                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_PLATFORM_XXX\n   *\n   * @description:\n   *   A list of valid values for the `platform_id' identifier code in\n   *   @FT_CharMapRec and @FT_SfntName structures.\n   *\n   * @values:\n   *   TT_PLATFORM_APPLE_UNICODE ::\n   *     Used by Apple to indicate a Unicode character map and/or name entry.\n   *     See @TT_APPLE_ID_XXX for corresponding `encoding_id' values.  Note\n   *     that name entries in this format are coded as big-endian UCS-2\n   *     character codes _only_.\n   *\n   *   TT_PLATFORM_MACINTOSH ::\n   *     Used by Apple to indicate a MacOS-specific charmap and/or name entry.\n   *     See @TT_MAC_ID_XXX for corresponding `encoding_id' values.  Note that\n   *     most TrueType fonts contain an Apple roman charmap to be usable on\n   *     MacOS systems (even if they contain a Microsoft charmap as well).\n   *\n   *   TT_PLATFORM_ISO ::\n   *     This value was used to specify ISO/IEC 10646 charmaps.  It is however\n   *     now deprecated.  See @TT_ISO_ID_XXX for a list of corresponding\n   *     `encoding_id' values.\n   *\n   *   TT_PLATFORM_MICROSOFT ::\n   *     Used by Microsoft to indicate Windows-specific charmaps.  See\n   *     @TT_MS_ID_XXX for a list of corresponding `encoding_id' values.\n   *     Note that most fonts contain a Unicode charmap using\n   *     (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS).\n   *\n   *   TT_PLATFORM_CUSTOM ::\n   *     Used to indicate application-specific charmaps.\n   *\n   *   TT_PLATFORM_ADOBE ::\n   *     This value isn't part of any font format specification, but is used\n   *     by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec\n   *     structure.  See @TT_ADOBE_ID_XXX.\n   */\n\n#define TT_PLATFORM_APPLE_UNICODE  0\n#define TT_PLATFORM_MACINTOSH      1\n#define TT_PLATFORM_ISO            2 /* deprecated */\n#define TT_PLATFORM_MICROSOFT      3\n#define TT_PLATFORM_CUSTOM         4\n#define TT_PLATFORM_ADOBE          7 /* artificial */\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_APPLE_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_APPLE_UNICODE charmaps and name entries.\n   *\n   * @values:\n   *   TT_APPLE_ID_DEFAULT ::\n   *     Unicode version 1.0.\n   *\n   *   TT_APPLE_ID_UNICODE_1_1 ::\n   *     Unicode 1.1; specifies Hangul characters starting at U+34xx.\n   *\n   *   TT_APPLE_ID_ISO_10646 ::\n   *     Deprecated (identical to preceding).\n   *\n   *   TT_APPLE_ID_UNICODE_2_0 ::\n   *     Unicode 2.0 and beyond (UTF-16 BMP only).\n   *\n   *   TT_APPLE_ID_UNICODE_32 ::\n   *     Unicode 3.1 and beyond, using UTF-32.\n   *\n   *   TT_APPLE_ID_VARIANT_SELECTOR ::\n   *     From Adobe, not Apple.  Not a normal cmap.  Specifies variations\n   *     on a real cmap.\n   */\n\n#define TT_APPLE_ID_DEFAULT           0 /* Unicode 1.0 */\n#define TT_APPLE_ID_UNICODE_1_1       1 /* specify Hangul at U+34xx */\n#define TT_APPLE_ID_ISO_10646         2 /* deprecated */\n#define TT_APPLE_ID_UNICODE_2_0       3 /* or later */\n#define TT_APPLE_ID_UNICODE_32        4 /* 2.0 or later, full repertoire */\n#define TT_APPLE_ID_VARIANT_SELECTOR  5 /* variation selector data */\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_MAC_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_MACINTOSH charmaps and name entries.\n   *\n   * @values:\n   *   TT_MAC_ID_ROMAN ::\n   *   TT_MAC_ID_JAPANESE ::\n   *   TT_MAC_ID_TRADITIONAL_CHINESE ::\n   *   TT_MAC_ID_KOREAN ::\n   *   TT_MAC_ID_ARABIC ::\n   *   TT_MAC_ID_HEBREW ::\n   *   TT_MAC_ID_GREEK ::\n   *   TT_MAC_ID_RUSSIAN ::\n   *   TT_MAC_ID_RSYMBOL ::\n   *   TT_MAC_ID_DEVANAGARI ::\n   *   TT_MAC_ID_GURMUKHI ::\n   *   TT_MAC_ID_GUJARATI ::\n   *   TT_MAC_ID_ORIYA ::\n   *   TT_MAC_ID_BENGALI ::\n   *   TT_MAC_ID_TAMIL ::\n   *   TT_MAC_ID_TELUGU ::\n   *   TT_MAC_ID_KANNADA ::\n   *   TT_MAC_ID_MALAYALAM ::\n   *   TT_MAC_ID_SINHALESE ::\n   *   TT_MAC_ID_BURMESE ::\n   *   TT_MAC_ID_KHMER ::\n   *   TT_MAC_ID_THAI ::\n   *   TT_MAC_ID_LAOTIAN ::\n   *   TT_MAC_ID_GEORGIAN ::\n   *   TT_MAC_ID_ARMENIAN ::\n   *   TT_MAC_ID_MALDIVIAN ::\n   *   TT_MAC_ID_SIMPLIFIED_CHINESE ::\n   *   TT_MAC_ID_TIBETAN ::\n   *   TT_MAC_ID_MONGOLIAN ::\n   *   TT_MAC_ID_GEEZ ::\n   *   TT_MAC_ID_SLAVIC ::\n   *   TT_MAC_ID_VIETNAMESE ::\n   *   TT_MAC_ID_SINDHI ::\n   *   TT_MAC_ID_UNINTERP ::\n   */\n\n#define TT_MAC_ID_ROMAN                 0\n#define TT_MAC_ID_JAPANESE              1\n#define TT_MAC_ID_TRADITIONAL_CHINESE   2\n#define TT_MAC_ID_KOREAN                3\n#define TT_MAC_ID_ARABIC                4\n#define TT_MAC_ID_HEBREW                5\n#define TT_MAC_ID_GREEK                 6\n#define TT_MAC_ID_RUSSIAN               7\n#define TT_MAC_ID_RSYMBOL               8\n#define TT_MAC_ID_DEVANAGARI            9\n#define TT_MAC_ID_GURMUKHI             10\n#define TT_MAC_ID_GUJARATI             11\n#define TT_MAC_ID_ORIYA                12\n#define TT_MAC_ID_BENGALI              13\n#define TT_MAC_ID_TAMIL                14\n#define TT_MAC_ID_TELUGU               15\n#define TT_MAC_ID_KANNADA              16\n#define TT_MAC_ID_MALAYALAM            17\n#define TT_MAC_ID_SINHALESE            18\n#define TT_MAC_ID_BURMESE              19\n#define TT_MAC_ID_KHMER                20\n#define TT_MAC_ID_THAI                 21\n#define TT_MAC_ID_LAOTIAN              22\n#define TT_MAC_ID_GEORGIAN             23\n#define TT_MAC_ID_ARMENIAN             24\n#define TT_MAC_ID_MALDIVIAN            25\n#define TT_MAC_ID_SIMPLIFIED_CHINESE   25\n#define TT_MAC_ID_TIBETAN              26\n#define TT_MAC_ID_MONGOLIAN            27\n#define TT_MAC_ID_GEEZ                 28\n#define TT_MAC_ID_SLAVIC               29\n#define TT_MAC_ID_VIETNAMESE           30\n#define TT_MAC_ID_SINDHI               31\n#define TT_MAC_ID_UNINTERP             32\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_ISO_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_ISO charmaps and name entries.\n   *\n   *   Their use is now deprecated.\n   *\n   * @values:\n   *   TT_ISO_ID_7BIT_ASCII ::\n   *     ASCII.\n   *   TT_ISO_ID_10646 ::\n   *     ISO/10646.\n   *   TT_ISO_ID_8859_1 ::\n   *     Also known as Latin-1.\n   */\n\n#define TT_ISO_ID_7BIT_ASCII  0\n#define TT_ISO_ID_10646       1\n#define TT_ISO_ID_8859_1      2\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_MS_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_MICROSOFT charmaps and name entries.\n   *\n   * @values:\n   *   TT_MS_ID_SYMBOL_CS ::\n   *     Corresponds to Microsoft symbol encoding. See\n   *     @FT_ENCODING_MS_SYMBOL.\n   *\n   *   TT_MS_ID_UNICODE_CS ::\n   *     Corresponds to a Microsoft WGL4 charmap, matching Unicode.  See\n   *     @FT_ENCODING_UNICODE.\n   *\n   *   TT_MS_ID_SJIS ::\n   *     Corresponds to SJIS Japanese encoding.  See @FT_ENCODING_SJIS.\n   *\n   *   TT_MS_ID_GB2312 ::\n   *     Corresponds to Simplified Chinese as used in Mainland China.  See\n   *     @FT_ENCODING_GB2312.\n   *\n   *   TT_MS_ID_BIG_5 ::\n   *     Corresponds to Traditional Chinese as used in Taiwan and Hong Kong.\n   *     See @FT_ENCODING_BIG5.\n   *\n   *   TT_MS_ID_WANSUNG ::\n   *     Corresponds to Korean Wansung encoding.  See @FT_ENCODING_WANSUNG.\n   *\n   *   TT_MS_ID_JOHAB ::\n   *     Corresponds to Johab encoding.  See @FT_ENCODING_JOHAB.\n   *\n   *   TT_MS_ID_UCS_4 ::\n   *     Corresponds to UCS-4 or UTF-32 charmaps.  This has been added to\n   *     the OpenType specification version 1.4 (mid-2001.)\n   */\n\n#define TT_MS_ID_SYMBOL_CS    0\n#define TT_MS_ID_UNICODE_CS   1\n#define TT_MS_ID_SJIS         2\n#define TT_MS_ID_GB2312       3\n#define TT_MS_ID_BIG_5        4\n#define TT_MS_ID_WANSUNG      5\n#define TT_MS_ID_JOHAB        6\n#define TT_MS_ID_UCS_4       10\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_ADOBE_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_ADOBE charmaps.  This is a FreeType-specific extension!\n   *\n   * @values:\n   *   TT_ADOBE_ID_STANDARD ::\n   *     Adobe standard encoding.\n   *   TT_ADOBE_ID_EXPERT ::\n   *     Adobe expert encoding.\n   *   TT_ADOBE_ID_CUSTOM ::\n   *     Adobe custom encoding.\n   *   TT_ADOBE_ID_LATIN_1 ::\n   *     Adobe Latin~1 encoding.\n   */\n\n#define TT_ADOBE_ID_STANDARD  0\n#define TT_ADOBE_ID_EXPERT    1\n#define TT_ADOBE_ID_CUSTOM    2\n#define TT_ADOBE_ID_LATIN_1   3\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Possible values of the language identifier field in the name records  */\n  /* of the TTF `name' table if the `platform' identifier code is          */\n  /* TT_PLATFORM_MACINTOSH.  These values are also used as return values   */\n  /* for function @FT_Get_CMap_Language_ID.                                */\n  /*                                                                       */\n  /* The canonical source for the Apple assigned Language ID's is at       */\n  /*                                                                       */\n  /*   https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html      */\n  /*                                                                       */\n#define TT_MAC_LANGID_ENGLISH                       0\n#define TT_MAC_LANGID_FRENCH                        1\n#define TT_MAC_LANGID_GERMAN                        2\n#define TT_MAC_LANGID_ITALIAN                       3\n#define TT_MAC_LANGID_DUTCH                         4\n#define TT_MAC_LANGID_SWEDISH                       5\n#define TT_MAC_LANGID_SPANISH                       6\n#define TT_MAC_LANGID_DANISH                        7\n#define TT_MAC_LANGID_PORTUGUESE                    8\n#define TT_MAC_LANGID_NORWEGIAN                     9\n#define TT_MAC_LANGID_HEBREW                       10\n#define TT_MAC_LANGID_JAPANESE                     11\n#define TT_MAC_LANGID_ARABIC                       12\n#define TT_MAC_LANGID_FINNISH                      13\n#define TT_MAC_LANGID_GREEK                        14\n#define TT_MAC_LANGID_ICELANDIC                    15\n#define TT_MAC_LANGID_MALTESE                      16\n#define TT_MAC_LANGID_TURKISH                      17\n#define TT_MAC_LANGID_CROATIAN                     18\n#define TT_MAC_LANGID_CHINESE_TRADITIONAL          19\n#define TT_MAC_LANGID_URDU                         20\n#define TT_MAC_LANGID_HINDI                        21\n#define TT_MAC_LANGID_THAI                         22\n#define TT_MAC_LANGID_KOREAN                       23\n#define TT_MAC_LANGID_LITHUANIAN                   24\n#define TT_MAC_LANGID_POLISH                       25\n#define TT_MAC_LANGID_HUNGARIAN                    26\n#define TT_MAC_LANGID_ESTONIAN                     27\n#define TT_MAC_LANGID_LETTISH                      28\n#define TT_MAC_LANGID_SAAMISK                      29\n#define TT_MAC_LANGID_FAEROESE                     30\n#define TT_MAC_LANGID_FARSI                        31\n#define TT_MAC_LANGID_RUSSIAN                      32\n#define TT_MAC_LANGID_CHINESE_SIMPLIFIED           33\n#define TT_MAC_LANGID_FLEMISH                      34\n#define TT_MAC_LANGID_IRISH                        35\n#define TT_MAC_LANGID_ALBANIAN                     36\n#define TT_MAC_LANGID_ROMANIAN                     37\n#define TT_MAC_LANGID_CZECH                        38\n#define TT_MAC_LANGID_SLOVAK                       39\n#define TT_MAC_LANGID_SLOVENIAN                    40\n#define TT_MAC_LANGID_YIDDISH                      41\n#define TT_MAC_LANGID_SERBIAN                      42\n#define TT_MAC_LANGID_MACEDONIAN                   43\n#define TT_MAC_LANGID_BULGARIAN                    44\n#define TT_MAC_LANGID_UKRAINIAN                    45\n#define TT_MAC_LANGID_BYELORUSSIAN                 46\n#define TT_MAC_LANGID_UZBEK                        47\n#define TT_MAC_LANGID_KAZAKH                       48\n#define TT_MAC_LANGID_AZERBAIJANI                  49\n#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT  49\n#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT    50\n#define TT_MAC_LANGID_ARMENIAN                     51\n#define TT_MAC_LANGID_GEORGIAN                     52\n#define TT_MAC_LANGID_MOLDAVIAN                    53\n#define TT_MAC_LANGID_KIRGHIZ                      54\n#define TT_MAC_LANGID_TAJIKI                       55\n#define TT_MAC_LANGID_TURKMEN                      56\n#define TT_MAC_LANGID_MONGOLIAN                    57\n#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT   57\n#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT    58\n#define TT_MAC_LANGID_PASHTO                       59\n#define TT_MAC_LANGID_KURDISH                      60\n#define TT_MAC_LANGID_KASHMIRI                     61\n#define TT_MAC_LANGID_SINDHI                       62\n#define TT_MAC_LANGID_TIBETAN                      63\n#define TT_MAC_LANGID_NEPALI                       64\n#define TT_MAC_LANGID_SANSKRIT                     65\n#define TT_MAC_LANGID_MARATHI                      66\n#define TT_MAC_LANGID_BENGALI                      67\n#define TT_MAC_LANGID_ASSAMESE                     68\n#define TT_MAC_LANGID_GUJARATI                     69\n#define TT_MAC_LANGID_PUNJABI                      70\n#define TT_MAC_LANGID_ORIYA                        71\n#define TT_MAC_LANGID_MALAYALAM                    72\n#define TT_MAC_LANGID_KANNADA                      73\n#define TT_MAC_LANGID_TAMIL                        74\n#define TT_MAC_LANGID_TELUGU                       75\n#define TT_MAC_LANGID_SINHALESE                    76\n#define TT_MAC_LANGID_BURMESE                      77\n#define TT_MAC_LANGID_KHMER                        78\n#define TT_MAC_LANGID_LAO                          79\n#define TT_MAC_LANGID_VIETNAMESE                   80\n#define TT_MAC_LANGID_INDONESIAN                   81\n#define TT_MAC_LANGID_TAGALOG                      82\n#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT           83\n#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT          84\n#define TT_MAC_LANGID_AMHARIC                      85\n#define TT_MAC_LANGID_TIGRINYA                     86\n#define TT_MAC_LANGID_GALLA                        87\n#define TT_MAC_LANGID_SOMALI                       88\n#define TT_MAC_LANGID_SWAHILI                      89\n#define TT_MAC_LANGID_RUANDA                       90\n#define TT_MAC_LANGID_RUNDI                        91\n#define TT_MAC_LANGID_CHEWA                        92\n#define TT_MAC_LANGID_MALAGASY                     93\n#define TT_MAC_LANGID_ESPERANTO                    94\n#define TT_MAC_LANGID_WELSH                       128\n#define TT_MAC_LANGID_BASQUE                      129\n#define TT_MAC_LANGID_CATALAN                     130\n#define TT_MAC_LANGID_LATIN                       131\n#define TT_MAC_LANGID_QUECHUA                     132\n#define TT_MAC_LANGID_GUARANI                     133\n#define TT_MAC_LANGID_AYMARA                      134\n#define TT_MAC_LANGID_TATAR                       135\n#define TT_MAC_LANGID_UIGHUR                      136\n#define TT_MAC_LANGID_DZONGKHA                    137\n#define TT_MAC_LANGID_JAVANESE                    138\n#define TT_MAC_LANGID_SUNDANESE                   139\n\n\n#if 0  /* these seem to be errors that have been dropped */\n\n#define TT_MAC_LANGID_SCOTTISH_GAELIC             140\n#define TT_MAC_LANGID_IRISH_GAELIC                141\n\n#endif\n\n\n  /* The following codes are new as of 2000-03-10 */\n#define TT_MAC_LANGID_GALICIAN                    140\n#define TT_MAC_LANGID_AFRIKAANS                   141\n#define TT_MAC_LANGID_BRETON                      142\n#define TT_MAC_LANGID_INUKTITUT                   143\n#define TT_MAC_LANGID_SCOTTISH_GAELIC             144\n#define TT_MAC_LANGID_MANX_GAELIC                 145\n#define TT_MAC_LANGID_IRISH_GAELIC                146\n#define TT_MAC_LANGID_TONGAN                      147\n#define TT_MAC_LANGID_GREEK_POLYTONIC             148\n#define TT_MAC_LANGID_GREELANDIC                  149\n#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Possible values of the language identifier field in the name records  */\n  /* of the TTF `name' table if the `platform' identifier code is          */\n  /* TT_PLATFORM_MICROSOFT.                                                */\n  /*                                                                       */\n  /* The canonical source for the MS assigned LCIDs is                     */\n  /*                                                                       */\n  /*   http://www.microsoft.com/globaldev/reference/lcid-all.mspx          */\n  /*                                                                       */\n\n#define TT_MS_LANGID_ARABIC_GENERAL                    0x0001\n#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA               0x0401\n#define TT_MS_LANGID_ARABIC_IRAQ                       0x0801\n#define TT_MS_LANGID_ARABIC_EGYPT                      0x0C01\n#define TT_MS_LANGID_ARABIC_LIBYA                      0x1001\n#define TT_MS_LANGID_ARABIC_ALGERIA                    0x1401\n#define TT_MS_LANGID_ARABIC_MOROCCO                    0x1801\n#define TT_MS_LANGID_ARABIC_TUNISIA                    0x1C01\n#define TT_MS_LANGID_ARABIC_OMAN                       0x2001\n#define TT_MS_LANGID_ARABIC_YEMEN                      0x2401\n#define TT_MS_LANGID_ARABIC_SYRIA                      0x2801\n#define TT_MS_LANGID_ARABIC_JORDAN                     0x2C01\n#define TT_MS_LANGID_ARABIC_LEBANON                    0x3001\n#define TT_MS_LANGID_ARABIC_KUWAIT                     0x3401\n#define TT_MS_LANGID_ARABIC_UAE                        0x3801\n#define TT_MS_LANGID_ARABIC_BAHRAIN                    0x3C01\n#define TT_MS_LANGID_ARABIC_QATAR                      0x4001\n#define TT_MS_LANGID_BULGARIAN_BULGARIA                0x0402\n#define TT_MS_LANGID_CATALAN_SPAIN                     0x0403\n#define TT_MS_LANGID_CHINESE_GENERAL                   0x0004\n#define TT_MS_LANGID_CHINESE_TAIWAN                    0x0404\n#define TT_MS_LANGID_CHINESE_PRC                       0x0804\n#define TT_MS_LANGID_CHINESE_HONG_KONG                 0x0C04\n#define TT_MS_LANGID_CHINESE_SINGAPORE                 0x1004\n\n#if 1  /* this looks like the correct value */\n#define TT_MS_LANGID_CHINESE_MACAU                     0x1404\n#else  /* but beware, Microsoft may change its mind...\n          the most recent Word reference has the following: */\n#define TT_MS_LANGID_CHINESE_MACAU  TT_MS_LANGID_CHINESE_HONG_KONG\n#endif\n\n#if 0  /* used only with .NET `cultures'; commented out */\n#define TT_MS_LANGID_CHINESE_TRADITIONAL               0x7C04\n#endif\n\n#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC              0x0405\n#define TT_MS_LANGID_DANISH_DENMARK                    0x0406\n#define TT_MS_LANGID_GERMAN_GERMANY                    0x0407\n#define TT_MS_LANGID_GERMAN_SWITZERLAND                0x0807\n#define TT_MS_LANGID_GERMAN_AUSTRIA                    0x0C07\n#define TT_MS_LANGID_GERMAN_LUXEMBOURG                 0x1007\n#define TT_MS_LANGID_GERMAN_LIECHTENSTEI               0x1407\n#define TT_MS_LANGID_GREEK_GREECE                      0x0408\n\n  /* don't ask what this one means... It is commented out currently. */\n#if 0\n#define TT_MS_LANGID_GREEK_GREECE2                     0x2008\n#endif\n\n#define TT_MS_LANGID_ENGLISH_GENERAL                   0x0009\n#define TT_MS_LANGID_ENGLISH_UNITED_STATES             0x0409\n#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM            0x0809\n#define TT_MS_LANGID_ENGLISH_AUSTRALIA                 0x0C09\n#define TT_MS_LANGID_ENGLISH_CANADA                    0x1009\n#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND               0x1409\n#define TT_MS_LANGID_ENGLISH_IRELAND                   0x1809\n#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA              0x1C09\n#define TT_MS_LANGID_ENGLISH_JAMAICA                   0x2009\n#define TT_MS_LANGID_ENGLISH_CARIBBEAN                 0x2409\n#define TT_MS_LANGID_ENGLISH_BELIZE                    0x2809\n#define TT_MS_LANGID_ENGLISH_TRINIDAD                  0x2C09\n#define TT_MS_LANGID_ENGLISH_ZIMBABWE                  0x3009\n#define TT_MS_LANGID_ENGLISH_PHILIPPINES               0x3409\n#define TT_MS_LANGID_ENGLISH_INDONESIA                 0x3809\n#define TT_MS_LANGID_ENGLISH_HONG_KONG                 0x3C09\n#define TT_MS_LANGID_ENGLISH_INDIA                     0x4009\n#define TT_MS_LANGID_ENGLISH_MALAYSIA                  0x4409\n#define TT_MS_LANGID_ENGLISH_SINGAPORE                 0x4809\n#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT    0x040A\n#define TT_MS_LANGID_SPANISH_MEXICO                    0x080A\n#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT  0x0C0A\n#define TT_MS_LANGID_SPANISH_GUATEMALA                 0x100A\n#define TT_MS_LANGID_SPANISH_COSTA_RICA                0x140A\n#define TT_MS_LANGID_SPANISH_PANAMA                    0x180A\n#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC        0x1C0A\n#define TT_MS_LANGID_SPANISH_VENEZUELA                 0x200A\n#define TT_MS_LANGID_SPANISH_COLOMBIA                  0x240A\n#define TT_MS_LANGID_SPANISH_PERU                      0x280A\n#define TT_MS_LANGID_SPANISH_ARGENTINA                 0x2C0A\n#define TT_MS_LANGID_SPANISH_ECUADOR                   0x300A\n#define TT_MS_LANGID_SPANISH_CHILE                     0x340A\n#define TT_MS_LANGID_SPANISH_URUGUAY                   0x380A\n#define TT_MS_LANGID_SPANISH_PARAGUAY                  0x3C0A\n#define TT_MS_LANGID_SPANISH_BOLIVIA                   0x400A\n#define TT_MS_LANGID_SPANISH_EL_SALVADOR               0x440A\n#define TT_MS_LANGID_SPANISH_HONDURAS                  0x480A\n#define TT_MS_LANGID_SPANISH_NICARAGUA                 0x4C0A\n#define TT_MS_LANGID_SPANISH_PUERTO_RICO               0x500A\n#define TT_MS_LANGID_SPANISH_UNITED_STATES             0x540A\n  /* The following ID blatantly violate MS specs by using a */\n  /* sublanguage > 0x1F.                                    */\n#define TT_MS_LANGID_SPANISH_LATIN_AMERICA             0xE40AU\n#define TT_MS_LANGID_FINNISH_FINLAND                   0x040B\n#define TT_MS_LANGID_FRENCH_FRANCE                     0x040C\n#define TT_MS_LANGID_FRENCH_BELGIUM                    0x080C\n#define TT_MS_LANGID_FRENCH_CANADA                     0x0C0C\n#define TT_MS_LANGID_FRENCH_SWITZERLAND                0x100C\n#define TT_MS_LANGID_FRENCH_LUXEMBOURG                 0x140C\n#define TT_MS_LANGID_FRENCH_MONACO                     0x180C\n#define TT_MS_LANGID_FRENCH_WEST_INDIES                0x1C0C\n#define TT_MS_LANGID_FRENCH_REUNION                    0x200C\n#define TT_MS_LANGID_FRENCH_CONGO                      0x240C\n  /* which was formerly: */\n#define TT_MS_LANGID_FRENCH_ZAIRE  TT_MS_LANGID_FRENCH_CONGO\n#define TT_MS_LANGID_FRENCH_SENEGAL                    0x280C\n#define TT_MS_LANGID_FRENCH_CAMEROON                   0x2C0C\n#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE              0x300C\n#define TT_MS_LANGID_FRENCH_MALI                       0x340C\n#define TT_MS_LANGID_FRENCH_MOROCCO                    0x380C\n#define TT_MS_LANGID_FRENCH_HAITI                      0x3C0C\n  /* and another violation of the spec (see 0xE40AU) */\n#define TT_MS_LANGID_FRENCH_NORTH_AFRICA               0xE40CU\n#define TT_MS_LANGID_HEBREW_ISRAEL                     0x040D\n#define TT_MS_LANGID_HUNGARIAN_HUNGARY                 0x040E\n#define TT_MS_LANGID_ICELANDIC_ICELAND                 0x040F\n#define TT_MS_LANGID_ITALIAN_ITALY                     0x0410\n#define TT_MS_LANGID_ITALIAN_SWITZERLAND               0x0810\n#define TT_MS_LANGID_JAPANESE_JAPAN                    0x0411\n#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA     0x0412\n#define TT_MS_LANGID_KOREAN_JOHAB_KOREA                0x0812\n#define TT_MS_LANGID_DUTCH_NETHERLANDS                 0x0413\n#define TT_MS_LANGID_DUTCH_BELGIUM                     0x0813\n#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL           0x0414\n#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK          0x0814\n#define TT_MS_LANGID_POLISH_POLAND                     0x0415\n#define TT_MS_LANGID_PORTUGUESE_BRAZIL                 0x0416\n#define TT_MS_LANGID_PORTUGUESE_PORTUGAL               0x0816\n#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND        0x0417\n#define TT_MS_LANGID_ROMANIAN_ROMANIA                  0x0418\n#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA                0x0818\n#define TT_MS_LANGID_RUSSIAN_RUSSIA                    0x0419\n#define TT_MS_LANGID_RUSSIAN_MOLDAVIA                  0x0819\n#define TT_MS_LANGID_CROATIAN_CROATIA                  0x041A\n#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN              0x081A\n#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC           0x0C1A\n\n#if 0  /* this used to be this value, but it looks like we were wrong */\n#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x101A\n#else  /* current sources say */\n#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA       0x101A\n#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x141A\n       /* and XPsp2 Platform SDK added (2004-07-26) */\n       /* Names are shortened to be significant within 40 chars. */\n#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN         0x181A\n#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC      0x181A\n#endif\n\n#define TT_MS_LANGID_SLOVAK_SLOVAKIA                   0x041B\n#define TT_MS_LANGID_ALBANIAN_ALBANIA                  0x041C\n#define TT_MS_LANGID_SWEDISH_SWEDEN                    0x041D\n#define TT_MS_LANGID_SWEDISH_FINLAND                   0x081D\n#define TT_MS_LANGID_THAI_THAILAND                     0x041E\n#define TT_MS_LANGID_TURKISH_TURKEY                    0x041F\n#define TT_MS_LANGID_URDU_PAKISTAN                     0x0420\n#define TT_MS_LANGID_URDU_INDIA                        0x0820\n#define TT_MS_LANGID_INDONESIAN_INDONESIA              0x0421\n#define TT_MS_LANGID_UKRAINIAN_UKRAINE                 0x0422\n#define TT_MS_LANGID_BELARUSIAN_BELARUS                0x0423\n#define TT_MS_LANGID_SLOVENE_SLOVENIA                  0x0424\n#define TT_MS_LANGID_ESTONIAN_ESTONIA                  0x0425\n#define TT_MS_LANGID_LATVIAN_LATVIA                    0x0426\n#define TT_MS_LANGID_LITHUANIAN_LITHUANIA              0x0427\n#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA      0x0827\n#define TT_MS_LANGID_TAJIK_TAJIKISTAN                  0x0428\n#define TT_MS_LANGID_FARSI_IRAN                        0x0429\n#define TT_MS_LANGID_VIETNAMESE_VIET_NAM               0x042A\n#define TT_MS_LANGID_ARMENIAN_ARMENIA                  0x042B\n#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN            0x042C\n#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC         0x082C\n#define TT_MS_LANGID_BASQUE_SPAIN                      0x042D\n#define TT_MS_LANGID_SORBIAN_GERMANY                   0x042E\n#define TT_MS_LANGID_MACEDONIAN_MACEDONIA              0x042F\n#define TT_MS_LANGID_SUTU_SOUTH_AFRICA                 0x0430\n#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA               0x0431\n#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA               0x0432\n#define TT_MS_LANGID_VENDA_SOUTH_AFRICA                0x0433\n#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA                0x0434\n#define TT_MS_LANGID_ZULU_SOUTH_AFRICA                 0x0435\n#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA            0x0436\n#define TT_MS_LANGID_GEORGIAN_GEORGIA                  0x0437\n#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS           0x0438\n#define TT_MS_LANGID_HINDI_INDIA                       0x0439\n#define TT_MS_LANGID_MALTESE_MALTA                     0x043A\n  /* Added by XPsp2 Platform SDK (2004-07-26) */\n#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY              0x043B\n#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN              0x083B\n#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND             0x0C3B\n#define TT_MS_LANGID_SAMI_LULE_NORWAY                  0x103B\n#define TT_MS_LANGID_SAMI_LULE_SWEDEN                  0x143B\n#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY              0x183B\n#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN              0x1C3B\n#define TT_MS_LANGID_SAMI_SKOLT_FINLAND                0x203B\n#define TT_MS_LANGID_SAMI_INARI_FINLAND                0x243B\n  /* ... and we also keep our old identifier... */\n#define TT_MS_LANGID_SAAMI_LAPONIA                     0x043B\n\n#if 0 /* this seems to be a previous inversion */\n#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043C\n#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083C\n#else\n#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083C\n#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043C\n#endif\n\n#define TT_MS_LANGID_YIDDISH_GERMANY                   0x043D\n#define TT_MS_LANGID_MALAY_MALAYSIA                    0x043E\n#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM           0x083E\n#define TT_MS_LANGID_KAZAK_KAZAKSTAN                   0x043F\n#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440\n  /* alias declared in Windows 2000 */\n#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \\\n          TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN\n\n#define TT_MS_LANGID_SWAHILI_KENYA                     0x0441\n#define TT_MS_LANGID_TURKMEN_TURKMENISTAN              0x0442\n#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN            0x0443\n#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC         0x0843\n#define TT_MS_LANGID_TATAR_TATARSTAN                   0x0444\n#define TT_MS_LANGID_BENGALI_INDIA                     0x0445\n#define TT_MS_LANGID_BENGALI_BANGLADESH                0x0845\n#define TT_MS_LANGID_PUNJABI_INDIA                     0x0446\n#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN           0x0846\n#define TT_MS_LANGID_GUJARATI_INDIA                    0x0447\n#define TT_MS_LANGID_ORIYA_INDIA                       0x0448\n#define TT_MS_LANGID_TAMIL_INDIA                       0x0449\n#define TT_MS_LANGID_TELUGU_INDIA                      0x044A\n#define TT_MS_LANGID_KANNADA_INDIA                     0x044B\n#define TT_MS_LANGID_MALAYALAM_INDIA                   0x044C\n#define TT_MS_LANGID_ASSAMESE_INDIA                    0x044D\n#define TT_MS_LANGID_MARATHI_INDIA                     0x044E\n#define TT_MS_LANGID_SANSKRIT_INDIA                    0x044F\n#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450\n#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN      0x0850\n#define TT_MS_LANGID_TIBETAN_CHINA                     0x0451\n  /* Don't use the next constant!  It has            */\n  /*   (1) the wrong spelling (Dzonghka)             */\n  /*   (2) Microsoft doesn't officially define it -- */\n  /*       at least it is not in the List of Local   */\n  /*       ID Values.                                */\n  /*   (3) Dzongkha is not the same language as      */\n  /*       Tibetan, so merging it is wrong anyway.   */\n  /*                                                 */\n  /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW.    */\n#define TT_MS_LANGID_DZONGHKA_BHUTAN                   0x0851\n\n#if 0\n  /* the following used to be defined */\n#define TT_MS_LANGID_TIBETAN_BHUTAN                    0x0451\n  /* ... but it was changed; */\n#else\n  /* So we will continue to #define it, but with the correct value */\n#define TT_MS_LANGID_TIBETAN_BHUTAN   TT_MS_LANGID_DZONGHKA_BHUTAN\n#endif\n\n#define TT_MS_LANGID_WELSH_WALES                       0x0452\n#define TT_MS_LANGID_KHMER_CAMBODIA                    0x0453\n#define TT_MS_LANGID_LAO_LAOS                          0x0454\n#define TT_MS_LANGID_BURMESE_MYANMAR                   0x0455\n#define TT_MS_LANGID_GALICIAN_SPAIN                    0x0456\n#define TT_MS_LANGID_KONKANI_INDIA                     0x0457\n#define TT_MS_LANGID_MANIPURI_INDIA  /* Bengali */     0x0458\n#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */         0x0459\n#define TT_MS_LANGID_SINDHI_PAKISTAN                   0x0859\n  /* Missing a LCID for Sindhi in Devanagari script */\n#define TT_MS_LANGID_SYRIAC_SYRIA                      0x045A\n#define TT_MS_LANGID_SINHALESE_SRI_LANKA               0x045B\n#define TT_MS_LANGID_CHEROKEE_UNITED_STATES            0x045C\n#define TT_MS_LANGID_INUKTITUT_CANADA                  0x045D\n#define TT_MS_LANGID_AMHARIC_ETHIOPIA                  0x045E\n#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */    0x045F\n#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN           0x085F\n  /* Missing a LCID for Tifinagh script */\n#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */    0x0460\n  /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */\n  /* script is yet unclear... might be Arabic, Nagari or Sharada */\n#define TT_MS_LANGID_KASHMIRI_SASIA                    0x0860\n  /* ... and aliased (by MS) for compatibility reasons. */\n#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA\n#define TT_MS_LANGID_NEPALI_NEPAL                      0x0461\n#define TT_MS_LANGID_NEPALI_INDIA                      0x0861\n#define TT_MS_LANGID_FRISIAN_NETHERLANDS               0x0462\n#define TT_MS_LANGID_PASHTO_AFGHANISTAN                0x0463\n#define TT_MS_LANGID_FILIPINO_PHILIPPINES              0x0464\n#define TT_MS_LANGID_DHIVEHI_MALDIVES                  0x0465\n  /* alias declared in Windows 2000 */\n#define TT_MS_LANGID_DIVEHI_MALDIVES  TT_MS_LANGID_DHIVEHI_MALDIVES\n#define TT_MS_LANGID_EDO_NIGERIA                       0x0466\n#define TT_MS_LANGID_FULFULDE_NIGERIA                  0x0467\n#define TT_MS_LANGID_HAUSA_NIGERIA                     0x0468\n#define TT_MS_LANGID_IBIBIO_NIGERIA                    0x0469\n#define TT_MS_LANGID_YORUBA_NIGERIA                    0x046A\n#define TT_MS_LANGID_QUECHUA_BOLIVIA                   0x046B\n#define TT_MS_LANGID_QUECHUA_ECUADOR                   0x086B\n#define TT_MS_LANGID_QUECHUA_PERU                      0x0C6B\n#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA               0x046C\n  /* Also spelled by XPsp2 Platform SDK (2004-07-26) */\n#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \\\n          TT_MS_LANGID_SEPEDI_SOUTH_AFRICA\n  /* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */\n#define TT_MS_LANGID_IGBO_NIGERIA                      0x0470\n#define TT_MS_LANGID_KANURI_NIGERIA                    0x0471\n#define TT_MS_LANGID_OROMO_ETHIOPIA                    0x0472\n#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA                 0x0473\n#define TT_MS_LANGID_TIGRIGNA_ERYTHREA                 0x0873\n  /* also spelled in the `Passport SDK' list as: */\n#define TT_MS_LANGID_TIGRIGNA_ERYTREA  TT_MS_LANGID_TIGRIGNA_ERYTHREA\n#define TT_MS_LANGID_GUARANI_PARAGUAY                  0x0474\n#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES            0x0475\n#define TT_MS_LANGID_LATIN                             0x0476\n#define TT_MS_LANGID_SOMALI_SOMALIA                    0x0477\n  /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */\n  /*       not written (but OTOH the peculiar writing system is worth     */\n  /*       studying).                                                     */\n#define TT_MS_LANGID_YI_CHINA                          0x0478\n#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES   0x0479\n  /* language codes from 0x047A to 0x047F are (still) unknown. */\n#define TT_MS_LANGID_UIGHUR_CHINA                      0x0480\n#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0481\n\n#if 0  /* not deemed useful for fonts */\n#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE            0x04FF\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Possible values of the `name' identifier field in the name records of */\n  /* the TTF `name' table.  These values are platform independent.         */\n  /*                                                                       */\n#define TT_NAME_ID_COPYRIGHT            0\n#define TT_NAME_ID_FONT_FAMILY          1\n#define TT_NAME_ID_FONT_SUBFAMILY       2\n#define TT_NAME_ID_UNIQUE_ID            3\n#define TT_NAME_ID_FULL_NAME            4\n#define TT_NAME_ID_VERSION_STRING       5\n#define TT_NAME_ID_PS_NAME              6\n#define TT_NAME_ID_TRADEMARK            7\n\n  /* the following values are from the OpenType spec */\n#define TT_NAME_ID_MANUFACTURER         8\n#define TT_NAME_ID_DESIGNER             9\n#define TT_NAME_ID_DESCRIPTION          10\n#define TT_NAME_ID_VENDOR_URL           11\n#define TT_NAME_ID_DESIGNER_URL         12\n#define TT_NAME_ID_LICENSE              13\n#define TT_NAME_ID_LICENSE_URL          14\n  /* number 15 is reserved */\n#define TT_NAME_ID_PREFERRED_FAMILY     16\n#define TT_NAME_ID_PREFERRED_SUBFAMILY  17\n#define TT_NAME_ID_MAC_FULL_NAME        18\n\n  /* The following code is new as of 2000-01-21 */\n#define TT_NAME_ID_SAMPLE_TEXT          19\n\n  /* This is new in OpenType 1.3 */\n#define TT_NAME_ID_CID_FINDFONT_NAME    20\n\n  /* This is new in OpenType 1.5 */\n#define TT_NAME_ID_WWS_FAMILY           21\n#define TT_NAME_ID_WWS_SUBFAMILY        22\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table.     */\n  /*                                                                       */\n  /* Updated 08-Nov-2008.                                                  */\n  /*                                                                       */\n\n  /* Bit  0   Basic Latin */\n#define TT_UCR_BASIC_LATIN                     (1L <<  0) /* U+0020-U+007E */\n  /* Bit  1   C1 Controls and Latin-1 Supplement */\n#define TT_UCR_LATIN1_SUPPLEMENT               (1L <<  1) /* U+0080-U+00FF */\n  /* Bit  2   Latin Extended-A */\n#define TT_UCR_LATIN_EXTENDED_A                (1L <<  2) /* U+0100-U+017F */\n  /* Bit  3   Latin Extended-B */\n#define TT_UCR_LATIN_EXTENDED_B                (1L <<  3) /* U+0180-U+024F */\n  /* Bit  4   IPA Extensions                 */\n  /*          Phonetic Extensions            */\n  /*          Phonetic Extensions Supplement */\n#define TT_UCR_IPA_EXTENSIONS                  (1L <<  4) /* U+0250-U+02AF */\n                                                          /* U+1D00-U+1D7F */\n                                                          /* U+1D80-U+1DBF */\n  /* Bit  5   Spacing Modifier Letters */\n  /*          Modifier Tone Letters    */\n#define TT_UCR_SPACING_MODIFIER                (1L <<  5) /* U+02B0-U+02FF */\n                                                          /* U+A700-U+A71F */\n  /* Bit  6   Combining Diacritical Marks            */\n  /*          Combining Diacritical Marks Supplement */\n#define TT_UCR_COMBINING_DIACRITICS            (1L <<  6) /* U+0300-U+036F */\n                                                          /* U+1DC0-U+1DFF */\n  /* Bit  7   Greek and Coptic */\n#define TT_UCR_GREEK                           (1L <<  7) /* U+0370-U+03FF */\n  /* Bit  8   Coptic */\n#define TT_UCR_COPTIC                          (1L <<  8) /* U+2C80-U+2CFF */\n  /* Bit  9   Cyrillic            */\n  /*          Cyrillic Supplement */\n  /*          Cyrillic Extended-A */\n  /*          Cyrillic Extended-B */\n#define TT_UCR_CYRILLIC                        (1L <<  9) /* U+0400-U+04FF */\n                                                          /* U+0500-U+052F */\n                                                          /* U+2DE0-U+2DFF */\n                                                          /* U+A640-U+A69F */\n  /* Bit 10   Armenian */\n#define TT_UCR_ARMENIAN                        (1L << 10) /* U+0530-U+058F */\n  /* Bit 11   Hebrew */\n#define TT_UCR_HEBREW                          (1L << 11) /* U+0590-U+05FF */\n  /* Bit 12   Vai */\n#define TT_UCR_VAI                             (1L << 12) /* U+A500-U+A63F */\n  /* Bit 13   Arabic            */\n  /*          Arabic Supplement */\n#define TT_UCR_ARABIC                          (1L << 13) /* U+0600-U+06FF */\n                                                          /* U+0750-U+077F */\n  /* Bit 14   NKo */\n#define TT_UCR_NKO                             (1L << 14) /* U+07C0-U+07FF */\n  /* Bit 15   Devanagari */\n#define TT_UCR_DEVANAGARI                      (1L << 15) /* U+0900-U+097F */\n  /* Bit 16   Bengali */\n#define TT_UCR_BENGALI                         (1L << 16) /* U+0980-U+09FF */\n  /* Bit 17   Gurmukhi */\n#define TT_UCR_GURMUKHI                        (1L << 17) /* U+0A00-U+0A7F */\n  /* Bit 18   Gujarati */\n#define TT_UCR_GUJARATI                        (1L << 18) /* U+0A80-U+0AFF */\n  /* Bit 19   Oriya */\n#define TT_UCR_ORIYA                           (1L << 19) /* U+0B00-U+0B7F */\n  /* Bit 20   Tamil */\n#define TT_UCR_TAMIL                           (1L << 20) /* U+0B80-U+0BFF */\n  /* Bit 21   Telugu */\n#define TT_UCR_TELUGU                          (1L << 21) /* U+0C00-U+0C7F */\n  /* Bit 22   Kannada */\n#define TT_UCR_KANNADA                         (1L << 22) /* U+0C80-U+0CFF */\n  /* Bit 23   Malayalam */\n#define TT_UCR_MALAYALAM                       (1L << 23) /* U+0D00-U+0D7F */\n  /* Bit 24   Thai */\n#define TT_UCR_THAI                            (1L << 24) /* U+0E00-U+0E7F */\n  /* Bit 25   Lao */\n#define TT_UCR_LAO                             (1L << 25) /* U+0E80-U+0EFF */\n  /* Bit 26   Georgian            */\n  /*          Georgian Supplement */\n#define TT_UCR_GEORGIAN                        (1L << 26) /* U+10A0-U+10FF */\n                                                          /* U+2D00-U+2D2F */\n  /* Bit 27   Balinese */\n#define TT_UCR_BALINESE                        (1L << 27) /* U+1B00-U+1B7F */\n  /* Bit 28   Hangul Jamo */\n#define TT_UCR_HANGUL_JAMO                     (1L << 28) /* U+1100-U+11FF */\n  /* Bit 29   Latin Extended Additional */\n  /*          Latin Extended-C          */\n  /*          Latin Extended-D          */\n#define TT_UCR_LATIN_EXTENDED_ADDITIONAL       (1L << 29) /* U+1E00-U+1EFF */\n                                                          /* U+2C60-U+2C7F */\n                                                          /* U+A720-U+A7FF */\n  /* Bit 30   Greek Extended */\n#define TT_UCR_GREEK_EXTENDED                  (1L << 30) /* U+1F00-U+1FFF */\n  /* Bit 31   General Punctuation      */\n  /*          Supplemental Punctuation */\n#define TT_UCR_GENERAL_PUNCTUATION             (1L << 31) /* U+2000-U+206F */\n                                                          /* U+2E00-U+2E7F */\n  /* Bit 32   Superscripts And Subscripts */\n#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS         (1L <<  0) /* U+2070-U+209F */\n  /* Bit 33   Currency Symbols */\n#define TT_UCR_CURRENCY_SYMBOLS                (1L <<  1) /* U+20A0-U+20CF */\n  /* Bit 34   Combining Diacritical Marks For Symbols */\n#define TT_UCR_COMBINING_DIACRITICS_SYMB       (1L <<  2) /* U+20D0-U+20FF */\n  /* Bit 35   Letterlike Symbols */\n#define TT_UCR_LETTERLIKE_SYMBOLS              (1L <<  3) /* U+2100-U+214F */\n  /* Bit 36   Number Forms */\n#define TT_UCR_NUMBER_FORMS                    (1L <<  4) /* U+2150-U+218F */\n  /* Bit 37   Arrows                           */\n  /*          Supplemental Arrows-A            */\n  /*          Supplemental Arrows-B            */\n  /*          Miscellaneous Symbols and Arrows */\n#define TT_UCR_ARROWS                          (1L <<  5) /* U+2190-U+21FF */\n                                                          /* U+27F0-U+27FF */\n                                                          /* U+2900-U+297F */\n                                                          /* U+2B00-U+2BFF */\n  /* Bit 38   Mathematical Operators               */\n  /*          Supplemental Mathematical Operators  */\n  /*          Miscellaneous Mathematical Symbols-A */\n  /*          Miscellaneous Mathematical Symbols-B */\n#define TT_UCR_MATHEMATICAL_OPERATORS          (1L <<  6) /* U+2200-U+22FF */\n                                                          /* U+2A00-U+2AFF */\n                                                          /* U+27C0-U+27EF */\n                                                          /* U+2980-U+29FF */\n  /* Bit 39 Miscellaneous Technical */\n#define TT_UCR_MISCELLANEOUS_TECHNICAL         (1L <<  7) /* U+2300-U+23FF */\n  /* Bit 40   Control Pictures */\n#define TT_UCR_CONTROL_PICTURES                (1L <<  8) /* U+2400-U+243F */\n  /* Bit 41   Optical Character Recognition */\n#define TT_UCR_OCR                             (1L <<  9) /* U+2440-U+245F */\n  /* Bit 42   Enclosed Alphanumerics */\n#define TT_UCR_ENCLOSED_ALPHANUMERICS          (1L << 10) /* U+2460-U+24FF */\n  /* Bit 43   Box Drawing */\n#define TT_UCR_BOX_DRAWING                     (1L << 11) /* U+2500-U+257F */\n  /* Bit 44   Block Elements */\n#define TT_UCR_BLOCK_ELEMENTS                  (1L << 12) /* U+2580-U+259F */\n  /* Bit 45   Geometric Shapes */\n#define TT_UCR_GEOMETRIC_SHAPES                (1L << 13) /* U+25A0-U+25FF */\n  /* Bit 46   Miscellaneous Symbols */\n#define TT_UCR_MISCELLANEOUS_SYMBOLS           (1L << 14) /* U+2600-U+26FF */\n  /* Bit 47   Dingbats */\n#define TT_UCR_DINGBATS                        (1L << 15) /* U+2700-U+27BF */\n  /* Bit 48   CJK Symbols and Punctuation */\n#define TT_UCR_CJK_SYMBOLS                     (1L << 16) /* U+3000-U+303F */\n  /* Bit 49   Hiragana */\n#define TT_UCR_HIRAGANA                        (1L << 17) /* U+3040-U+309F */\n  /* Bit 50   Katakana                     */\n  /*          Katakana Phonetic Extensions */\n#define TT_UCR_KATAKANA                        (1L << 18) /* U+30A0-U+30FF */\n                                                          /* U+31F0-U+31FF */\n  /* Bit 51   Bopomofo          */\n  /*          Bopomofo Extended */\n#define TT_UCR_BOPOMOFO                        (1L << 19) /* U+3100-U+312F */\n                                                          /* U+31A0-U+31BF */\n  /* Bit 52   Hangul Compatibility Jamo */\n#define TT_UCR_HANGUL_COMPATIBILITY_JAMO       (1L << 20) /* U+3130-U+318F */\n  /* Bit 53   Phags-Pa */\n#define TT_UCR_CJK_MISC                        (1L << 21) /* U+A840-U+A87F */\n#define TT_UCR_KANBUN  TT_UCR_CJK_MISC /* deprecated */\n#define TT_UCR_PHAGSPA\n  /* Bit 54   Enclosed CJK Letters and Months */\n#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS     (1L << 22) /* U+3200-U+32FF */\n  /* Bit 55   CJK Compatibility */\n#define TT_UCR_CJK_COMPATIBILITY               (1L << 23) /* U+3300-U+33FF */\n  /* Bit 56   Hangul Syllables */\n#define TT_UCR_HANGUL                          (1L << 24) /* U+AC00-U+D7A3 */\n  /* Bit 57   High Surrogates              */\n  /*          High Private Use Surrogates  */\n  /*          Low Surrogates               */\n  /*                                       */\n  /* According to OpenType specs v.1.3+,   */\n  /* setting bit 57 implies that there is  */\n  /* at least one codepoint beyond the     */\n  /* Basic Multilingual Plane that is      */\n  /* supported by this font.  So it really */\n  /* means >= U+10000                      */\n#define TT_UCR_SURROGATES                      (1L << 25) /* U+D800-U+DB7F */\n                                                          /* U+DB80-U+DBFF */\n                                                          /* U+DC00-U+DFFF */\n#define TT_UCR_NON_PLANE_0  TT_UCR_SURROGATES\n  /* Bit 58  Phoenician */\n#define TT_UCR_PHOENICIAN                      (1L << 26) /*U+10900-U+1091F*/\n  /* Bit 59   CJK Unified Ideographs             */\n  /*          CJK Radicals Supplement            */\n  /*          Kangxi Radicals                    */\n  /*          Ideographic Description Characters */\n  /*          CJK Unified Ideographs Extension A */\n  /*          CJK Unified Ideographs Extension B */\n  /*          Kanbun                             */\n#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS          (1L << 27) /* U+4E00-U+9FFF */\n                                                          /* U+2E80-U+2EFF */\n                                                          /* U+2F00-U+2FDF */\n                                                          /* U+2FF0-U+2FFF */\n                                                          /* U+3400-U+4DB5 */\n                                                          /*U+20000-U+2A6DF*/\n                                                          /* U+3190-U+319F */\n  /* Bit 60   Private Use */\n#define TT_UCR_PRIVATE_USE                     (1L << 28) /* U+E000-U+F8FF */\n  /* Bit 61   CJK Strokes                             */\n  /*          CJK Compatibility Ideographs            */\n  /*          CJK Compatibility Ideographs Supplement */\n#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS    (1L << 29) /* U+31C0-U+31EF */\n                                                          /* U+F900-U+FAFF */\n                                                          /*U+2F800-U+2FA1F*/\n  /* Bit 62   Alphabetic Presentation Forms */\n#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS   (1L << 30) /* U+FB00-U+FB4F */\n  /* Bit 63   Arabic Presentation Forms-A */\n#define TT_UCR_ARABIC_PRESENTATIONS_A          (1L << 31) /* U+FB50-U+FDFF */\n  /* Bit 64   Combining Half Marks */\n#define TT_UCR_COMBINING_HALF_MARKS            (1L <<  0) /* U+FE20-U+FE2F */\n  /* Bit 65   Vertical forms          */\n  /*          CJK Compatibility Forms */\n#define TT_UCR_CJK_COMPATIBILITY_FORMS         (1L <<  1) /* U+FE10-U+FE1F */\n                                                          /* U+FE30-U+FE4F */\n  /* Bit 66   Small Form Variants */\n#define TT_UCR_SMALL_FORM_VARIANTS             (1L <<  2) /* U+FE50-U+FE6F */\n  /* Bit 67   Arabic Presentation Forms-B */\n#define TT_UCR_ARABIC_PRESENTATIONS_B          (1L <<  3) /* U+FE70-U+FEFE */\n  /* Bit 68   Halfwidth and Fullwidth Forms */\n#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS       (1L <<  4) /* U+FF00-U+FFEF */\n  /* Bit 69   Specials */\n#define TT_UCR_SPECIALS                        (1L <<  5) /* U+FFF0-U+FFFD */\n  /* Bit 70   Tibetan */\n#define TT_UCR_TIBETAN                         (1L <<  6) /* U+0F00-U+0FFF */\n  /* Bit 71   Syriac */\n#define TT_UCR_SYRIAC                          (1L <<  7) /* U+0700-U+074F */\n  /* Bit 72   Thaana */\n#define TT_UCR_THAANA                          (1L <<  8) /* U+0780-U+07BF */\n  /* Bit 73   Sinhala */\n#define TT_UCR_SINHALA                         (1L <<  9) /* U+0D80-U+0DFF */\n  /* Bit 74   Myanmar */\n#define TT_UCR_MYANMAR                         (1L << 10) /* U+1000-U+109F */\n  /* Bit 75   Ethiopic            */\n  /*          Ethiopic Supplement */\n  /*          Ethiopic Extended   */\n#define TT_UCR_ETHIOPIC                        (1L << 11) /* U+1200-U+137F */\n                                                          /* U+1380-U+139F */\n                                                          /* U+2D80-U+2DDF */\n  /* Bit 76   Cherokee */\n#define TT_UCR_CHEROKEE                        (1L << 12) /* U+13A0-U+13FF */\n  /* Bit 77   Unified Canadian Aboriginal Syllabics */\n#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS   (1L << 13) /* U+1400-U+167F */\n  /* Bit 78   Ogham */\n#define TT_UCR_OGHAM                           (1L << 14) /* U+1680-U+169F */\n  /* Bit 79   Runic */\n#define TT_UCR_RUNIC                           (1L << 15) /* U+16A0-U+16FF */\n  /* Bit 80   Khmer         */\n  /*          Khmer Symbols */\n#define TT_UCR_KHMER                           (1L << 16) /* U+1780-U+17FF */\n                                                          /* U+19E0-U+19FF */\n  /* Bit 81   Mongolian */\n#define TT_UCR_MONGOLIAN                       (1L << 17) /* U+1800-U+18AF */\n  /* Bit 82   Braille Patterns */\n#define TT_UCR_BRAILLE                         (1L << 18) /* U+2800-U+28FF */\n  /* Bit 83   Yi Syllables */\n  /*          Yi Radicals  */\n#define TT_UCR_YI                              (1L << 19) /* U+A000-U+A48F */\n                                                          /* U+A490-U+A4CF */\n  /* Bit 84   Tagalog  */\n  /*          Hanunoo  */\n  /*          Buhid    */\n  /*          Tagbanwa */\n#define TT_UCR_PHILIPPINE                      (1L << 20) /* U+1700-U+171F */\n                                                          /* U+1720-U+173F */\n                                                          /* U+1740-U+175F */\n                                                          /* U+1760-U+177F */\n  /* Bit 85   Old Italic */\n#define TT_UCR_OLD_ITALIC                      (1L << 21) /*U+10300-U+1032F*/\n  /* Bit 86   Gothic */\n#define TT_UCR_GOTHIC                          (1L << 22) /*U+10330-U+1034F*/\n  /* Bit 87   Deseret */\n#define TT_UCR_DESERET                         (1L << 23) /*U+10400-U+1044F*/\n  /* Bit 88   Byzantine Musical Symbols      */\n  /*          Musical Symbols                */\n  /*          Ancient Greek Musical Notation */\n#define TT_UCR_MUSICAL_SYMBOLS                 (1L << 24) /*U+1D000-U+1D0FF*/\n                                                          /*U+1D100-U+1D1FF*/\n                                                          /*U+1D200-U+1D24F*/\n  /* Bit 89   Mathematical Alphanumeric Symbols */\n#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS       (1L << 25) /*U+1D400-U+1D7FF*/\n  /* Bit 90   Private Use (plane 15) */\n  /*          Private Use (plane 16) */\n#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY       (1L << 26) /*U+F0000-U+FFFFD*/\n                                                        /*U+100000-U+10FFFD*/\n  /* Bit 91   Variation Selectors            */\n  /*          Variation Selectors Supplement */\n#define TT_UCR_VARIATION_SELECTORS             (1L << 27) /* U+FE00-U+FE0F */\n                                                          /*U+E0100-U+E01EF*/\n  /* Bit 92   Tags */\n#define TT_UCR_TAGS                            (1L << 28) /*U+E0000-U+E007F*/\n  /* Bit 93   Limbu */\n#define TT_UCR_LIMBU                           (1L << 29) /* U+1900-U+194F */\n  /* Bit 94   Tai Le */\n#define TT_UCR_TAI_LE                          (1L << 30) /* U+1950-U+197F */\n  /* Bit 95   New Tai Lue */\n#define TT_UCR_NEW_TAI_LUE                     (1L << 31) /* U+1980-U+19DF */\n  /* Bit 96   Buginese */\n#define TT_UCR_BUGINESE                        (1L <<  0) /* U+1A00-U+1A1F */\n  /* Bit 97   Glagolitic */\n#define TT_UCR_GLAGOLITIC                      (1L <<  1) /* U+2C00-U+2C5F */\n  /* Bit 98   Tifinagh */\n#define TT_UCR_TIFINAGH                        (1L <<  2) /* U+2D30-U+2D7F */\n  /* Bit 99   Yijing Hexagram Symbols */\n#define TT_UCR_YIJING                          (1L <<  3) /* U+4DC0-U+4DFF */\n  /* Bit 100  Syloti Nagri */\n#define TT_UCR_SYLOTI_NAGRI                    (1L <<  4) /* U+A800-U+A82F */\n  /* Bit 101  Linear B Syllabary */\n  /*          Linear B Ideograms */\n  /*          Aegean Numbers     */\n#define TT_UCR_LINEAR_B                        (1L <<  5) /*U+10000-U+1007F*/\n                                                          /*U+10080-U+100FF*/\n                                                          /*U+10100-U+1013F*/\n  /* Bit 102  Ancient Greek Numbers */\n#define TT_UCR_ANCIENT_GREEK_NUMBERS           (1L <<  6) /*U+10140-U+1018F*/\n  /* Bit 103  Ugaritic */\n#define TT_UCR_UGARITIC                        (1L <<  7) /*U+10380-U+1039F*/\n  /* Bit 104  Old Persian */\n#define TT_UCR_OLD_PERSIAN                     (1L <<  8) /*U+103A0-U+103DF*/\n  /* Bit 105  Shavian */\n#define TT_UCR_SHAVIAN                         (1L <<  9) /*U+10450-U+1047F*/\n  /* Bit 106  Osmanya */\n#define TT_UCR_OSMANYA                         (1L << 10) /*U+10480-U+104AF*/\n  /* Bit 107  Cypriot Syllabary */\n#define TT_UCR_CYPRIOT_SYLLABARY               (1L << 11) /*U+10800-U+1083F*/\n  /* Bit 108  Kharoshthi */\n#define TT_UCR_KHAROSHTHI                      (1L << 12) /*U+10A00-U+10A5F*/\n  /* Bit 109  Tai Xuan Jing Symbols */\n#define TT_UCR_TAI_XUAN_JING                   (1L << 13) /*U+1D300-U+1D35F*/\n  /* Bit 110  Cuneiform                         */\n  /*          Cuneiform Numbers and Punctuation */\n#define TT_UCR_CUNEIFORM                       (1L << 14) /*U+12000-U+123FF*/\n                                                          /*U+12400-U+1247F*/\n  /* Bit 111  Counting Rod Numerals */\n#define TT_UCR_COUNTING_ROD_NUMERALS           (1L << 15) /*U+1D360-U+1D37F*/\n  /* Bit 112  Sundanese */\n#define TT_UCR_SUNDANESE                       (1L << 16) /* U+1B80-U+1BBF */\n  /* Bit 113  Lepcha */\n#define TT_UCR_LEPCHA                          (1L << 17) /* U+1C00-U+1C4F */\n  /* Bit 114  Ol Chiki */\n#define TT_UCR_OL_CHIKI                        (1L << 18) /* U+1C50-U+1C7F */\n  /* Bit 115  Saurashtra */\n#define TT_UCR_SAURASHTRA                      (1L << 19) /* U+A880-U+A8DF */\n  /* Bit 116  Kayah Li */\n#define TT_UCR_KAYAH_LI                        (1L << 20) /* U+A900-U+A92F */\n  /* Bit 117  Rejang */\n#define TT_UCR_REJANG                          (1L << 21) /* U+A930-U+A95F */\n  /* Bit 118  Cham */\n#define TT_UCR_CHAM                            (1L << 22) /* U+AA00-U+AA5F */\n  /* Bit 119  Ancient Symbols */\n#define TT_UCR_ANCIENT_SYMBOLS                 (1L << 23) /*U+10190-U+101CF*/\n  /* Bit 120  Phaistos Disc */\n#define TT_UCR_PHAISTOS_DISC                   (1L << 24) /*U+101D0-U+101FF*/\n  /* Bit 121  Carian */\n  /*          Lycian */\n  /*          Lydian */\n#define TT_UCR_OLD_ANATOLIAN                   (1L << 25) /*U+102A0-U+102DF*/\n                                                          /*U+10280-U+1029F*/\n                                                          /*U+10920-U+1093F*/\n  /* Bit 122  Domino Tiles  */\n  /*          Mahjong Tiles */\n#define TT_UCR_GAME_TILES                      (1L << 26) /*U+1F030-U+1F09F*/\n                                                          /*U+1F000-U+1F02F*/\n  /* Bit 123-127 Reserved for process-internal usage */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Some compilers have a very limited length of identifiers.             */\n  /*                                                                       */\n#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ )\n#define HAVE_LIMIT_ON_IDENTS\n#endif\n\n\n#ifndef HAVE_LIMIT_ON_IDENTS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Here some alias #defines in order to be clearer.                      */\n  /*                                                                       */\n  /* These are not always #defined to stay within the 31~character limit,  */\n  /* which some compilers have.                                            */\n  /*                                                                       */\n  /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern  */\n  /* Borland compilers (read: from BC++ 3.1 on) can increase this limit.   */\n  /* If you get a warning with such a compiler, use the -i40 switch.       */\n  /*                                                                       */\n#define TT_UCR_ARABIC_PRESENTATION_FORMS_A      \\\n         TT_UCR_ARABIC_PRESENTATIONS_A\n#define TT_UCR_ARABIC_PRESENTATION_FORMS_B      \\\n         TT_UCR_ARABIC_PRESENTATIONS_B\n\n#define TT_UCR_COMBINING_DIACRITICAL_MARKS      \\\n         TT_UCR_COMBINING_DIACRITICS\n#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \\\n         TT_UCR_COMBINING_DIACRITICS_SYMB\n\n\n#endif /* !HAVE_LIMIT_ON_IDENTS */\n\n\nFT_END_HEADER\n\n#endif /* __TTNAMEID_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/tttables.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  tttables.h                                                             */\n/*                                                                         */\n/*    Basic SFNT/TrueType tables definitions and interface                 */\n/*    (specification only).                                                */\n/*                                                                         */\n/*  Copyright 1996-2005, 2008-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTTABLES_H__\n#define __TTTABLES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    truetype_tables                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    TrueType Tables                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    TrueType specific table types and functions.                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the definition of TrueType-specific tables   */\n  /*    as well as some routines used to access and process them.          */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    TT_Header                                                          */\n  /*    TT_HoriHeader                                                      */\n  /*    TT_VertHeader                                                      */\n  /*    TT_OS2                                                             */\n  /*    TT_Postscript                                                      */\n  /*    TT_PCLT                                                            */\n  /*    TT_MaxProfile                                                      */\n  /*                                                                       */\n  /*    FT_Sfnt_Tag                                                        */\n  /*    FT_Get_Sfnt_Table                                                  */\n  /*    FT_Load_Sfnt_Table                                                 */\n  /*    FT_Sfnt_Table_Info                                                 */\n  /*                                                                       */\n  /*    FT_Get_CMap_Language_ID                                            */\n  /*    FT_Get_CMap_Format                                                 */\n  /*                                                                       */\n  /*    FT_PARAM_TAG_UNPATENTED_HINTING                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_Header                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType font header table.  All       */\n  /*    fields follow the TrueType specification.                          */\n  /*                                                                       */\n  typedef struct  TT_Header_\n  {\n    FT_Fixed   Table_Version;\n    FT_Fixed   Font_Revision;\n\n    FT_Long    CheckSum_Adjust;\n    FT_Long    Magic_Number;\n\n    FT_UShort  Flags;\n    FT_UShort  Units_Per_EM;\n\n    FT_Long    Created [2];\n    FT_Long    Modified[2];\n\n    FT_Short   xMin;\n    FT_Short   yMin;\n    FT_Short   xMax;\n    FT_Short   yMax;\n\n    FT_UShort  Mac_Style;\n    FT_UShort  Lowest_Rec_PPEM;\n\n    FT_Short   Font_Direction;\n    FT_Short   Index_To_Loc_Format;\n    FT_Short   Glyph_Data_Format;\n\n  } TT_Header;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_HoriHeader                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType horizontal header, the `hhea' */\n  /*    table, as well as the corresponding horizontal metrics table,      */\n  /*    i.e., the `hmtx' table.                                            */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    Version                :: The table version.                       */\n  /*                                                                       */\n  /*    Ascender               :: The font's ascender, i.e., the distance  */\n  /*                              from the baseline to the top-most of all */\n  /*                              glyph points found in the font.          */\n  /*                                                                       */\n  /*                              This value is invalid in many fonts, as  */\n  /*                              it is usually set by the font designer,  */\n  /*                              and often reflects only a portion of the */\n  /*                              glyphs found in the font (maybe ASCII).  */\n  /*                                                                       */\n  /*                              You should use the `sTypoAscender' field */\n  /*                              of the OS/2 table instead if you want    */\n  /*                              the correct one.                         */\n  /*                                                                       */\n  /*    Descender              :: The font's descender, i.e., the distance */\n  /*                              from the baseline to the bottom-most of  */\n  /*                              all glyph points found in the font.  It  */\n  /*                              is negative.                             */\n  /*                                                                       */\n  /*                              This value is invalid in many fonts, as  */\n  /*                              it is usually set by the font designer,  */\n  /*                              and often reflects only a portion of the */\n  /*                              glyphs found in the font (maybe ASCII).  */\n  /*                                                                       */\n  /*                              You should use the `sTypoDescender'      */\n  /*                              field of the OS/2 table instead if you   */\n  /*                              want the correct one.                    */\n  /*                                                                       */\n  /*    Line_Gap               :: The font's line gap, i.e., the distance  */\n  /*                              to add to the ascender and descender to  */\n  /*                              get the BTB, i.e., the                   */\n  /*                              baseline-to-baseline distance for the    */\n  /*                              font.                                    */\n  /*                                                                       */\n  /*    advance_Width_Max      :: This field is the maximum of all advance */\n  /*                              widths found in the font.  It can be     */\n  /*                              used to compute the maximum width of an  */\n  /*                              arbitrary string of text.                */\n  /*                                                                       */\n  /*    min_Left_Side_Bearing  :: The minimum left side bearing of all     */\n  /*                              glyphs within the font.                  */\n  /*                                                                       */\n  /*    min_Right_Side_Bearing :: The minimum right side bearing of all    */\n  /*                              glyphs within the font.                  */\n  /*                                                                       */\n  /*    xMax_Extent            :: The maximum horizontal extent (i.e., the */\n  /*                              `width' of a glyph's bounding box) for   */\n  /*                              all glyphs in the font.                  */\n  /*                                                                       */\n  /*    caret_Slope_Rise       :: The rise coefficient of the cursor's     */\n  /*                              slope of the cursor (slope=rise/run).    */\n  /*                                                                       */\n  /*    caret_Slope_Run        :: The run coefficient of the cursor's      */\n  /*                              slope.                                   */\n  /*                                                                       */\n  /*    Reserved               :: 8~reserved bytes.                        */\n  /*                                                                       */\n  /*    metric_Data_Format     :: Always~0.                                */\n  /*                                                                       */\n  /*    number_Of_HMetrics     :: Number of HMetrics entries in the `hmtx' */\n  /*                              table -- this value can be smaller than  */\n  /*                              the total number of glyphs in the font.  */\n  /*                                                                       */\n  /*    long_metrics           :: A pointer into the `hmtx' table.         */\n  /*                                                                       */\n  /*    short_metrics          :: A pointer into the `hmtx' table.         */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */\n  /*               be identical except for the names of their fields,      */\n  /*               which are different.                                    */\n  /*                                                                       */\n  /*               This ensures that a single function in the `ttload'     */\n  /*               module is able to read both the horizontal and vertical */\n  /*               headers.                                                */\n  /*                                                                       */\n  typedef struct  TT_HoriHeader_\n  {\n    FT_Fixed   Version;\n    FT_Short   Ascender;\n    FT_Short   Descender;\n    FT_Short   Line_Gap;\n\n    FT_UShort  advance_Width_Max;      /* advance width maximum */\n\n    FT_Short   min_Left_Side_Bearing;  /* minimum left-sb       */\n    FT_Short   min_Right_Side_Bearing; /* minimum right-sb      */\n    FT_Short   xMax_Extent;            /* xmax extents          */\n    FT_Short   caret_Slope_Rise;\n    FT_Short   caret_Slope_Run;\n    FT_Short   caret_Offset;\n\n    FT_Short   Reserved[4];\n\n    FT_Short   metric_Data_Format;\n    FT_UShort  number_Of_HMetrics;\n\n    /* The following fields are not defined by the TrueType specification */\n    /* but they are used to connect the metrics header to the relevant    */\n    /* `HMTX' table.                                                      */\n\n    void*      long_metrics;\n    void*      short_metrics;\n\n  } TT_HoriHeader;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_VertHeader                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType vertical header, the `vhea'   */\n  /*    table, as well as the corresponding vertical metrics table, i.e.,  */\n  /*    the `vmtx' table.                                                  */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    Version                 :: The table version.                      */\n  /*                                                                       */\n  /*    Ascender                :: The font's ascender, i.e., the distance */\n  /*                               from the baseline to the top-most of    */\n  /*                               all glyph points found in the font.     */\n  /*                                                                       */\n  /*                               This value is invalid in many fonts, as */\n  /*                               it is usually set by the font designer, */\n  /*                               and often reflects only a portion of    */\n  /*                               the glyphs found in the font (maybe     */\n  /*                               ASCII).                                 */\n  /*                                                                       */\n  /*                               You should use the `sTypoAscender'      */\n  /*                               field of the OS/2 table instead if you  */\n  /*                               want the correct one.                   */\n  /*                                                                       */\n  /*    Descender               :: The font's descender, i.e., the         */\n  /*                               distance from the baseline to the       */\n  /*                               bottom-most of all glyph points found   */\n  /*                               in the font.  It is negative.           */\n  /*                                                                       */\n  /*                               This value is invalid in many fonts, as */\n  /*                               it is usually set by the font designer, */\n  /*                               and often reflects only a portion of    */\n  /*                               the glyphs found in the font (maybe     */\n  /*                               ASCII).                                 */\n  /*                                                                       */\n  /*                               You should use the `sTypoDescender'     */\n  /*                               field of the OS/2 table instead if you  */\n  /*                               want the correct one.                   */\n  /*                                                                       */\n  /*    Line_Gap                :: The font's line gap, i.e., the distance */\n  /*                               to add to the ascender and descender to */\n  /*                               get the BTB, i.e., the                  */\n  /*                               baseline-to-baseline distance for the   */\n  /*                               font.                                   */\n  /*                                                                       */\n  /*    advance_Height_Max      :: This field is the maximum of all        */\n  /*                               advance heights found in the font.  It  */\n  /*                               can be used to compute the maximum      */\n  /*                               height of an arbitrary string of text.  */\n  /*                                                                       */\n  /*    min_Top_Side_Bearing    :: The minimum top side bearing of all     */\n  /*                               glyphs within the font.                 */\n  /*                                                                       */\n  /*    min_Bottom_Side_Bearing :: The minimum bottom side bearing of all  */\n  /*                               glyphs within the font.                 */\n  /*                                                                       */\n  /*    yMax_Extent             :: The maximum vertical extent (i.e., the  */\n  /*                               `height' of a glyph's bounding box) for */\n  /*                               all glyphs in the font.                 */\n  /*                                                                       */\n  /*    caret_Slope_Rise        :: The rise coefficient of the cursor's    */\n  /*                               slope of the cursor (slope=rise/run).   */\n  /*                                                                       */\n  /*    caret_Slope_Run         :: The run coefficient of the cursor's     */\n  /*                               slope.                                  */\n  /*                                                                       */\n  /*    caret_Offset            :: The cursor's offset for slanted fonts.  */\n  /*                               This value is `reserved' in vmtx        */\n  /*                               version 1.0.                            */\n  /*                                                                       */\n  /*    Reserved                :: 8~reserved bytes.                       */\n  /*                                                                       */\n  /*    metric_Data_Format      :: Always~0.                               */\n  /*                                                                       */\n  /*    number_Of_HMetrics      :: Number of VMetrics entries in the       */\n  /*                               `vmtx' table -- this value can be       */\n  /*                               smaller than the total number of glyphs */\n  /*                               in the font.                            */\n  /*                                                                       */\n  /*    long_metrics           :: A pointer into the `vmtx' table.         */\n  /*                                                                       */\n  /*    short_metrics          :: A pointer into the `vmtx' table.         */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */\n  /*               be identical except for the names of their fields,      */\n  /*               which are different.                                    */\n  /*                                                                       */\n  /*               This ensures that a single function in the `ttload'     */\n  /*               module is able to read both the horizontal and vertical */\n  /*               headers.                                                */\n  /*                                                                       */\n  typedef struct  TT_VertHeader_\n  {\n    FT_Fixed   Version;\n    FT_Short   Ascender;\n    FT_Short   Descender;\n    FT_Short   Line_Gap;\n\n    FT_UShort  advance_Height_Max;      /* advance height maximum */\n\n    FT_Short   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */\n    FT_Short   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */\n    FT_Short   yMax_Extent;             /* xmax or ymax extents            */\n    FT_Short   caret_Slope_Rise;\n    FT_Short   caret_Slope_Run;\n    FT_Short   caret_Offset;\n\n    FT_Short   Reserved[4];\n\n    FT_Short   metric_Data_Format;\n    FT_UShort  number_Of_VMetrics;\n\n    /* The following fields are not defined by the TrueType specification */\n    /* but they're used to connect the metrics header to the relevant     */\n    /* `HMTX' or `VMTX' table.                                            */\n\n    void*      long_metrics;\n    void*      short_metrics;\n\n  } TT_VertHeader;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_OS2                                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType OS/2 table.  All fields       */\n  /*    comply to the OpenType specification.                              */\n  /*                                                                       */\n  /*    Note that we now support old Mac fonts that do not include an OS/2 */\n  /*    table.  In this case, the `version' field is always set to 0xFFFF. */\n  /*                                                                       */\n  typedef struct  TT_OS2_\n  {\n    FT_UShort  version;                /* 0x0001 - more or 0xFFFF */\n    FT_Short   xAvgCharWidth;\n    FT_UShort  usWeightClass;\n    FT_UShort  usWidthClass;\n    FT_Short   fsType;\n    FT_Short   ySubscriptXSize;\n    FT_Short   ySubscriptYSize;\n    FT_Short   ySubscriptXOffset;\n    FT_Short   ySubscriptYOffset;\n    FT_Short   ySuperscriptXSize;\n    FT_Short   ySuperscriptYSize;\n    FT_Short   ySuperscriptXOffset;\n    FT_Short   ySuperscriptYOffset;\n    FT_Short   yStrikeoutSize;\n    FT_Short   yStrikeoutPosition;\n    FT_Short   sFamilyClass;\n\n    FT_Byte    panose[10];\n\n    FT_ULong   ulUnicodeRange1;        /* Bits 0-31   */\n    FT_ULong   ulUnicodeRange2;        /* Bits 32-63  */\n    FT_ULong   ulUnicodeRange3;        /* Bits 64-95  */\n    FT_ULong   ulUnicodeRange4;        /* Bits 96-127 */\n\n    FT_Char    achVendID[4];\n\n    FT_UShort  fsSelection;\n    FT_UShort  usFirstCharIndex;\n    FT_UShort  usLastCharIndex;\n    FT_Short   sTypoAscender;\n    FT_Short   sTypoDescender;\n    FT_Short   sTypoLineGap;\n    FT_UShort  usWinAscent;\n    FT_UShort  usWinDescent;\n\n    /* only version 1 and higher: */\n\n    FT_ULong   ulCodePageRange1;       /* Bits 0-31   */\n    FT_ULong   ulCodePageRange2;       /* Bits 32-63  */\n\n    /* only version 2 and higher: */\n\n    FT_Short   sxHeight;\n    FT_Short   sCapHeight;\n    FT_UShort  usDefaultChar;\n    FT_UShort  usBreakChar;\n    FT_UShort  usMaxContext;\n\n    /* only version 5 and higher: */\n\n    FT_UShort  usLowerOpticalPointSize;       /* in twips (1/20th points) */\n    FT_UShort  usUpperOpticalPointSize;       /* in twips (1/20th points) */\n\n  } TT_OS2;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_Postscript                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType PostScript table.  All fields */\n  /*    comply to the TrueType specification.  This structure does not     */\n  /*    reference the PostScript glyph names, which can be nevertheless    */\n  /*    accessed with the `ttpost' module.                                 */\n  /*                                                                       */\n  typedef struct  TT_Postscript_\n  {\n    FT_Fixed  FormatType;\n    FT_Fixed  italicAngle;\n    FT_Short  underlinePosition;\n    FT_Short  underlineThickness;\n    FT_ULong  isFixedPitch;\n    FT_ULong  minMemType42;\n    FT_ULong  maxMemType42;\n    FT_ULong  minMemType1;\n    FT_ULong  maxMemType1;\n\n    /* Glyph names follow in the file, but we don't   */\n    /* load them by default.  See the ttpost.c file.  */\n\n  } TT_Postscript;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_PCLT                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType PCLT table.  All fields       */\n  /*    comply to the TrueType specification.                              */\n  /*                                                                       */\n  typedef struct  TT_PCLT_\n  {\n    FT_Fixed   Version;\n    FT_ULong   FontNumber;\n    FT_UShort  Pitch;\n    FT_UShort  xHeight;\n    FT_UShort  Style;\n    FT_UShort  TypeFamily;\n    FT_UShort  CapHeight;\n    FT_UShort  SymbolSet;\n    FT_Char    TypeFace[16];\n    FT_Char    CharacterComplement[8];\n    FT_Char    FileName[6];\n    FT_Char    StrokeWeight;\n    FT_Char    WidthType;\n    FT_Byte    SerifStyle;\n    FT_Byte    Reserved;\n\n  } TT_PCLT;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_MaxProfile                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The maximum profile is a table containing many max values, which   */\n  /*    can be used to pre-allocate arrays.  This ensures that no memory   */\n  /*    allocation occurs during a glyph load.                             */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    version               :: The version number.                       */\n  /*                                                                       */\n  /*    numGlyphs             :: The number of glyphs in this TrueType     */\n  /*                             font.                                     */\n  /*                                                                       */\n  /*    maxPoints             :: The maximum number of points in a         */\n  /*                             non-composite TrueType glyph.  See also   */\n  /*                             the structure element                     */\n  /*                             `maxCompositePoints'.                     */\n  /*                                                                       */\n  /*    maxContours           :: The maximum number of contours in a       */\n  /*                             non-composite TrueType glyph.  See also   */\n  /*                             the structure element                     */\n  /*                             `maxCompositeContours'.                   */\n  /*                                                                       */\n  /*    maxCompositePoints    :: The maximum number of points in a         */\n  /*                             composite TrueType glyph.  See also the   */\n  /*                             structure element `maxPoints'.            */\n  /*                                                                       */\n  /*    maxCompositeContours  :: The maximum number of contours in a       */\n  /*                             composite TrueType glyph.  See also the   */\n  /*                             structure element `maxContours'.          */\n  /*                                                                       */\n  /*    maxZones              :: The maximum number of zones used for      */\n  /*                             glyph hinting.                            */\n  /*                                                                       */\n  /*    maxTwilightPoints     :: The maximum number of points in the       */\n  /*                             twilight zone used for glyph hinting.     */\n  /*                                                                       */\n  /*    maxStorage            :: The maximum number of elements in the     */\n  /*                             storage area used for glyph hinting.      */\n  /*                                                                       */\n  /*    maxFunctionDefs       :: The maximum number of function            */\n  /*                             definitions in the TrueType bytecode for  */\n  /*                             this font.                                */\n  /*                                                                       */\n  /*    maxInstructionDefs    :: The maximum number of instruction         */\n  /*                             definitions in the TrueType bytecode for  */\n  /*                             this font.                                */\n  /*                                                                       */\n  /*    maxStackElements      :: The maximum number of stack elements used */\n  /*                             during bytecode interpretation.           */\n  /*                                                                       */\n  /*    maxSizeOfInstructions :: The maximum number of TrueType opcodes    */\n  /*                             used for glyph hinting.                   */\n  /*                                                                       */\n  /*    maxComponentElements  :: The maximum number of simple (i.e., non-  */\n  /*                             composite) glyphs in a composite glyph.   */\n  /*                                                                       */\n  /*    maxComponentDepth     :: The maximum nesting depth of composite    */\n  /*                             glyphs.                                   */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This structure is only used during font loading.                   */\n  /*                                                                       */\n  typedef struct  TT_MaxProfile_\n  {\n    FT_Fixed   version;\n    FT_UShort  numGlyphs;\n    FT_UShort  maxPoints;\n    FT_UShort  maxContours;\n    FT_UShort  maxCompositePoints;\n    FT_UShort  maxCompositeContours;\n    FT_UShort  maxZones;\n    FT_UShort  maxTwilightPoints;\n    FT_UShort  maxStorage;\n    FT_UShort  maxFunctionDefs;\n    FT_UShort  maxInstructionDefs;\n    FT_UShort  maxStackElements;\n    FT_UShort  maxSizeOfInstructions;\n    FT_UShort  maxComponentElements;\n    FT_UShort  maxComponentDepth;\n\n  } TT_MaxProfile;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Sfnt_Tag                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration used to specify the index of an SFNT table.         */\n  /*    Used in the @FT_Get_Sfnt_Table API function.                       */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_SFNT_HEAD :: To access the font's @TT_Header structure.         */\n  /*                                                                       */\n  /*    FT_SFNT_MAXP :: To access the font's @TT_MaxProfile structure.     */\n  /*                                                                       */\n  /*    FT_SFNT_OS2  :: To access the font's @TT_OS2 structure.            */\n  /*                                                                       */\n  /*    FT_SFNT_HHEA :: To access the font's @TT_HoriHeader structure.     */\n  /*                                                                       */\n  /*    FT_SFNT_VHEA :: To access the font's @TT_VertHeader struture.      */\n  /*                                                                       */\n  /*    FT_SFNT_POST :: To access the font's @TT_Postscript structure.     */\n  /*                                                                       */\n  /*    FT_SFNT_PCLT :: To access the font's @TT_PCLT structure.           */\n  /*                                                                       */\n  typedef enum  FT_Sfnt_Tag_\n  {\n    FT_SFNT_HEAD,\n    FT_SFNT_MAXP,\n    FT_SFNT_OS2,\n    FT_SFNT_HHEA,\n    FT_SFNT_VHEA,\n    FT_SFNT_POST,\n    FT_SFNT_PCLT,\n\n    FT_SFNT_MAX\n\n  } FT_Sfnt_Tag;\n\n  /* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */\n  /* values instead                                                      */\n#define ft_sfnt_head  FT_SFNT_HEAD\n#define ft_sfnt_maxp  FT_SFNT_MAXP\n#define ft_sfnt_os2   FT_SFNT_OS2\n#define ft_sfnt_hhea  FT_SFNT_HHEA\n#define ft_sfnt_vhea  FT_SFNT_VHEA\n#define ft_sfnt_post  FT_SFNT_POST\n#define ft_sfnt_pclt  FT_SFNT_PCLT\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Sfnt_Table                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a pointer to a given SFNT table within a face.              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source.                                    */\n  /*                                                                       */\n  /*    tag  :: The index of the SFNT table.                               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A type-less pointer to the table.  This will be~0 in case of       */\n  /*    error, or if the corresponding table was not found *OR* loaded     */\n  /*    from the file.                                                     */\n  /*                                                                       */\n  /*    Use a typecast according to `tag' to access the structure          */\n  /*    elements.                                                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The table is owned by the face object and disappears with it.      */\n  /*                                                                       */\n  /*    This function is only useful to access SFNT tables that are loaded */\n  /*    by the sfnt, truetype, and opentype drivers.  See @FT_Sfnt_Tag for */\n  /*    a list.                                                            */\n  /*                                                                       */\n  /*    Here an example how to access the `vhea' table:                    */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      TT_VertHeader*  vert_header;                                     */\n  /*                                                                       */\n  /*                                                                       */\n  /*      vert_header =                                                    */\n  /*        (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA );       */\n  /*    }                                                                  */\n  /*                                                                       */\n  FT_EXPORT( void* )\n  FT_Get_Sfnt_Table( FT_Face      face,\n                     FT_Sfnt_Tag  tag );\n\n\n /**************************************************************************\n  *\n  * @function:\n  *   FT_Load_Sfnt_Table\n  *\n  * @description:\n  *   Load any font table into client memory.\n  *\n  * @input:\n  *   face ::\n  *     A handle to the source face.\n  *\n  *   tag ::\n  *     The four-byte tag of the table to load.  Use the value~0 if you want\n  *     to access the whole font file.  Otherwise, you can use one of the\n  *     definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new\n  *     one with @FT_MAKE_TAG.\n  *\n  *   offset ::\n  *     The starting offset in the table (or file if tag == 0).\n  *\n  * @output:\n  *   buffer ::\n  *     The target buffer address.  The client must ensure that the memory\n  *     array is big enough to hold the data.\n  *\n  * @inout:\n  *   length ::\n  *     If the `length' parameter is NULL, then try to load the whole table.\n  *     Return an error code if it fails.\n  *\n  *     Else, if `*length' is~0, exit immediately while returning the\n  *     table's (or file) full size in it.\n  *\n  *     Else the number of bytes to read from the table or file, from the\n  *     starting offset.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   If you need to determine the table's length you should first call this\n  *   function with `*length' set to~0, as in the following example:\n  *\n  *     {\n  *       FT_ULong  length = 0;\n  *\n  *\n  *       error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );\n  *       if ( error ) { ... table does not exist ... }\n  *\n  *       buffer = malloc( length );\n  *       if ( buffer == NULL ) { ... not enough memory ... }\n  *\n  *       error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );\n  *       if ( error ) { ... could not load table ... }\n  *     }\n  *\n  *   Note that structures like @TT_Header or @TT_OS2 can't be used with\n  *   this function; they are limited to @FT_Get_Sfnt_Table.  Reason is that\n  *   those structures depend on the processor architecture, with varying\n  *   size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).\n  *\n  */\n  FT_EXPORT( FT_Error )\n  FT_Load_Sfnt_Table( FT_Face    face,\n                      FT_ULong   tag,\n                      FT_Long    offset,\n                      FT_Byte*   buffer,\n                      FT_ULong*  length );\n\n\n /**************************************************************************\n  *\n  * @function:\n  *   FT_Sfnt_Table_Info\n  *\n  * @description:\n  *   Return information on an SFNT table.\n  *\n  * @input:\n  *   face ::\n  *     A handle to the source face.\n  *\n  *   table_index ::\n  *     The index of an SFNT table.  The function returns\n  *     FT_Err_Table_Missing for an invalid value.\n  *\n  * @inout:\n  *   tag ::\n  *     The name tag of the SFNT table.  If the value is NULL, `table_index'\n  *     is ignored, and `length' returns the number of SFNT tables in the\n  *     font.\n  *\n  * @output:\n  *   length ::\n  *     The length of the SFNT table (or the number of SFNT tables, depending\n  *     on `tag').\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   While parsing fonts, FreeType handles SFNT tables with length zero as\n  *   missing.\n  *\n  */\n  FT_EXPORT( FT_Error )\n  FT_Sfnt_Table_Info( FT_Face    face,\n                      FT_UInt    table_index,\n                      FT_ULong  *tag,\n                      FT_ULong  *length );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_CMap_Language_ID                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return TrueType/sfnt specific cmap language ID.  Definitions of    */\n  /*    language ID values are in `ttnameid.h'.                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    charmap ::                                                         */\n  /*      The target charmap.                                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The language ID of `charmap'.  If `charmap' doesn't belong to a    */\n  /*    TrueType/sfnt face, just return~0 as the default value.            */\n  /*                                                                       */\n  /*    For a format~14 cmap (to access Unicode IVS), the return value is  */\n  /*    0xFFFFFFFF.                                                        */\n  /*                                                                       */\n  FT_EXPORT( FT_ULong )\n  FT_Get_CMap_Language_ID( FT_CharMap  charmap );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_CMap_Format                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return TrueType/sfnt specific cmap format.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    charmap ::                                                         */\n  /*      The target charmap.                                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The format of `charmap'.  If `charmap' doesn't belong to a         */\n  /*    TrueType/sfnt face, return -1.                                     */\n  /*                                                                       */\n  FT_EXPORT( FT_Long )\n  FT_Get_CMap_Format( FT_CharMap  charmap );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __TTTABLES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/tttags.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  tttags.h                                                               */\n/*                                                                         */\n/*    Tags for TrueType and OpenType tables (specification only).          */\n/*                                                                         */\n/*  Copyright 1996-2001, 2004, 2005, 2007, 2008, 2013 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTAGS_H__\n#define __TTAGS_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n#define TTAG_avar  FT_MAKE_TAG( 'a', 'v', 'a', 'r' )\n#define TTAG_BASE  FT_MAKE_TAG( 'B', 'A', 'S', 'E' )\n#define TTAG_bdat  FT_MAKE_TAG( 'b', 'd', 'a', 't' )\n#define TTAG_BDF   FT_MAKE_TAG( 'B', 'D', 'F', ' ' )\n#define TTAG_bhed  FT_MAKE_TAG( 'b', 'h', 'e', 'd' )\n#define TTAG_bloc  FT_MAKE_TAG( 'b', 'l', 'o', 'c' )\n#define TTAG_bsln  FT_MAKE_TAG( 'b', 's', 'l', 'n' )\n#define TTAG_CBDT  FT_MAKE_TAG( 'C', 'B', 'D', 'T' )\n#define TTAG_CBLC  FT_MAKE_TAG( 'C', 'B', 'L', 'C' )\n#define TTAG_CFF   FT_MAKE_TAG( 'C', 'F', 'F', ' ' )\n#define TTAG_CID   FT_MAKE_TAG( 'C', 'I', 'D', ' ' )\n#define TTAG_cmap  FT_MAKE_TAG( 'c', 'm', 'a', 'p' )\n#define TTAG_cvar  FT_MAKE_TAG( 'c', 'v', 'a', 'r' )\n#define TTAG_cvt   FT_MAKE_TAG( 'c', 'v', 't', ' ' )\n#define TTAG_DSIG  FT_MAKE_TAG( 'D', 'S', 'I', 'G' )\n#define TTAG_EBDT  FT_MAKE_TAG( 'E', 'B', 'D', 'T' )\n#define TTAG_EBLC  FT_MAKE_TAG( 'E', 'B', 'L', 'C' )\n#define TTAG_EBSC  FT_MAKE_TAG( 'E', 'B', 'S', 'C' )\n#define TTAG_feat  FT_MAKE_TAG( 'f', 'e', 'a', 't' )\n#define TTAG_FOND  FT_MAKE_TAG( 'F', 'O', 'N', 'D' )\n#define TTAG_fpgm  FT_MAKE_TAG( 'f', 'p', 'g', 'm' )\n#define TTAG_fvar  FT_MAKE_TAG( 'f', 'v', 'a', 'r' )\n#define TTAG_gasp  FT_MAKE_TAG( 'g', 'a', 's', 'p' )\n#define TTAG_GDEF  FT_MAKE_TAG( 'G', 'D', 'E', 'F' )\n#define TTAG_glyf  FT_MAKE_TAG( 'g', 'l', 'y', 'f' )\n#define TTAG_GPOS  FT_MAKE_TAG( 'G', 'P', 'O', 'S' )\n#define TTAG_GSUB  FT_MAKE_TAG( 'G', 'S', 'U', 'B' )\n#define TTAG_gvar  FT_MAKE_TAG( 'g', 'v', 'a', 'r' )\n#define TTAG_hdmx  FT_MAKE_TAG( 'h', 'd', 'm', 'x' )\n#define TTAG_head  FT_MAKE_TAG( 'h', 'e', 'a', 'd' )\n#define TTAG_hhea  FT_MAKE_TAG( 'h', 'h', 'e', 'a' )\n#define TTAG_hmtx  FT_MAKE_TAG( 'h', 'm', 't', 'x' )\n#define TTAG_JSTF  FT_MAKE_TAG( 'J', 'S', 'T', 'F' )\n#define TTAG_just  FT_MAKE_TAG( 'j', 'u', 's', 't' )\n#define TTAG_kern  FT_MAKE_TAG( 'k', 'e', 'r', 'n' )\n#define TTAG_lcar  FT_MAKE_TAG( 'l', 'c', 'a', 'r' )\n#define TTAG_loca  FT_MAKE_TAG( 'l', 'o', 'c', 'a' )\n#define TTAG_LTSH  FT_MAKE_TAG( 'L', 'T', 'S', 'H' )\n#define TTAG_LWFN  FT_MAKE_TAG( 'L', 'W', 'F', 'N' )\n#define TTAG_MATH  FT_MAKE_TAG( 'M', 'A', 'T', 'H' )\n#define TTAG_maxp  FT_MAKE_TAG( 'm', 'a', 'x', 'p' )\n#define TTAG_META  FT_MAKE_TAG( 'M', 'E', 'T', 'A' )\n#define TTAG_MMFX  FT_MAKE_TAG( 'M', 'M', 'F', 'X' )\n#define TTAG_MMSD  FT_MAKE_TAG( 'M', 'M', 'S', 'D' )\n#define TTAG_mort  FT_MAKE_TAG( 'm', 'o', 'r', 't' )\n#define TTAG_morx  FT_MAKE_TAG( 'm', 'o', 'r', 'x' )\n#define TTAG_name  FT_MAKE_TAG( 'n', 'a', 'm', 'e' )\n#define TTAG_opbd  FT_MAKE_TAG( 'o', 'p', 'b', 'd' )\n#define TTAG_OS2   FT_MAKE_TAG( 'O', 'S', '/', '2' )\n#define TTAG_OTTO  FT_MAKE_TAG( 'O', 'T', 'T', 'O' )\n#define TTAG_PCLT  FT_MAKE_TAG( 'P', 'C', 'L', 'T' )\n#define TTAG_POST  FT_MAKE_TAG( 'P', 'O', 'S', 'T' )\n#define TTAG_post  FT_MAKE_TAG( 'p', 'o', 's', 't' )\n#define TTAG_prep  FT_MAKE_TAG( 'p', 'r', 'e', 'p' )\n#define TTAG_prop  FT_MAKE_TAG( 'p', 'r', 'o', 'p' )\n#define TTAG_sbix  FT_MAKE_TAG( 's', 'b', 'i', 'x' )\n#define TTAG_sfnt  FT_MAKE_TAG( 's', 'f', 'n', 't' )\n#define TTAG_SING  FT_MAKE_TAG( 'S', 'I', 'N', 'G' )\n#define TTAG_trak  FT_MAKE_TAG( 't', 'r', 'a', 'k' )\n#define TTAG_true  FT_MAKE_TAG( 't', 'r', 'u', 'e' )\n#define TTAG_ttc   FT_MAKE_TAG( 't', 't', 'c', ' ' )\n#define TTAG_ttcf  FT_MAKE_TAG( 't', 't', 'c', 'f' )\n#define TTAG_TYP1  FT_MAKE_TAG( 'T', 'Y', 'P', '1' )\n#define TTAG_typ1  FT_MAKE_TAG( 't', 'y', 'p', '1' )\n#define TTAG_VDMX  FT_MAKE_TAG( 'V', 'D', 'M', 'X' )\n#define TTAG_vhea  FT_MAKE_TAG( 'v', 'h', 'e', 'a' )\n#define TTAG_vmtx  FT_MAKE_TAG( 'v', 'm', 't', 'x' )\n#define TTAG_wOFF  FT_MAKE_TAG( 'w', 'O', 'F', 'F' )\n\n\nFT_END_HEADER\n\n#endif /* __TTAGS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/include/ttunpat.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttunpat.h                                                              */\n/*                                                                         */\n/*    Definitions for the unpatented TrueType hinting system               */\n/*                                                                         */\n/*  Copyright 2003, 2006 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  Written by Graham Asher <graham.asher@btinternet.com>                  */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTUNPAT_H__\n#define __TTUNPAT_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n /***************************************************************************\n  *\n  * @constant:\n  *   FT_PARAM_TAG_UNPATENTED_HINTING\n  *\n  * @description:\n  *   A constant used as the tag of an @FT_Parameter structure to indicate\n  *   that unpatented methods only should be used by the TrueType bytecode\n  *   interpreter for a typeface opened by @FT_Open_Face.\n  *\n  */\n#define FT_PARAM_TAG_UNPATENTED_HINTING  FT_MAKE_TAG( 'u', 'n', 'p', 'a' )\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __TTUNPAT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afangles.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afangles.c                                                             */\n/*                                                                         */\n/*    Routines used to compute vector angles with limited accuracy         */\n/*    and very high speed.  It also contains sorting routines (body).      */\n/*                                                                         */\n/*  Copyright 2003-2006, 2011-2012 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"aftypes.h\"\n\n\n  /*\n   *  We are not using `af_angle_atan' anymore, but we keep the source\n   *  code below just in case...\n   */\n\n\n#if 0\n\n\n  /*\n   *  The trick here is to realize that we don't need a very accurate angle\n   *  approximation.  We are going to use the result of `af_angle_atan' to\n   *  only compare the sign of angle differences, or check whether its\n   *  magnitude is very small.\n   *\n   *  The approximation\n   *\n   *    dy * PI / (|dx|+|dy|)\n   *\n   *  should be enough, and much faster to compute.\n   */\n  FT_LOCAL_DEF( AF_Angle )\n  af_angle_atan( FT_Fixed  dx,\n                 FT_Fixed  dy )\n  {\n    AF_Angle  angle;\n    FT_Fixed  ax = dx;\n    FT_Fixed  ay = dy;\n\n\n    if ( ax < 0 )\n      ax = -ax;\n    if ( ay < 0 )\n      ay = -ay;\n\n    ax += ay;\n\n    if ( ax == 0 )\n      angle = 0;\n    else\n    {\n      angle = ( AF_ANGLE_PI2 * dy ) / ( ax + ay );\n      if ( dx < 0 )\n      {\n        if ( angle >= 0 )\n          angle = AF_ANGLE_PI - angle;\n        else\n          angle = -AF_ANGLE_PI - angle;\n      }\n    }\n\n    return angle;\n  }\n\n\n#elif 0\n\n\n  /* the following table has been automatically generated with */\n  /* the `mather.py' Python script                             */\n\n#define AF_ATAN_BITS  8\n\n  static const FT_Byte  af_arctan[1L << AF_ATAN_BITS] =\n  {\n     0,  0,  1,  1,  1,  2,  2,  2,\n     3,  3,  3,  3,  4,  4,  4,  5,\n     5,  5,  6,  6,  6,  7,  7,  7,\n     8,  8,  8,  9,  9,  9, 10, 10,\n    10, 10, 11, 11, 11, 12, 12, 12,\n    13, 13, 13, 14, 14, 14, 14, 15,\n    15, 15, 16, 16, 16, 17, 17, 17,\n    18, 18, 18, 18, 19, 19, 19, 20,\n    20, 20, 21, 21, 21, 21, 22, 22,\n    22, 23, 23, 23, 24, 24, 24, 24,\n    25, 25, 25, 26, 26, 26, 26, 27,\n    27, 27, 28, 28, 28, 28, 29, 29,\n    29, 30, 30, 30, 30, 31, 31, 31,\n    31, 32, 32, 32, 33, 33, 33, 33,\n    34, 34, 34, 34, 35, 35, 35, 35,\n    36, 36, 36, 36, 37, 37, 37, 38,\n    38, 38, 38, 39, 39, 39, 39, 40,\n    40, 40, 40, 41, 41, 41, 41, 42,\n    42, 42, 42, 42, 43, 43, 43, 43,\n    44, 44, 44, 44, 45, 45, 45, 45,\n    46, 46, 46, 46, 46, 47, 47, 47,\n    47, 48, 48, 48, 48, 48, 49, 49,\n    49, 49, 50, 50, 50, 50, 50, 51,\n    51, 51, 51, 51, 52, 52, 52, 52,\n    52, 53, 53, 53, 53, 53, 54, 54,\n    54, 54, 54, 55, 55, 55, 55, 55,\n    56, 56, 56, 56, 56, 57, 57, 57,\n    57, 57, 57, 58, 58, 58, 58, 58,\n    59, 59, 59, 59, 59, 59, 60, 60,\n    60, 60, 60, 61, 61, 61, 61, 61,\n    61, 62, 62, 62, 62, 62, 62, 63,\n    63, 63, 63, 63, 63, 64, 64, 64\n  };\n\n\n  FT_LOCAL_DEF( AF_Angle )\n  af_angle_atan( FT_Fixed  dx,\n                 FT_Fixed  dy )\n  {\n    AF_Angle  angle;\n\n\n    /* check trivial cases */\n    if ( dy == 0 )\n    {\n      angle = 0;\n      if ( dx < 0 )\n        angle = AF_ANGLE_PI;\n      return angle;\n    }\n    else if ( dx == 0 )\n    {\n      angle = AF_ANGLE_PI2;\n      if ( dy < 0 )\n        angle = -AF_ANGLE_PI2;\n      return angle;\n    }\n\n    angle = 0;\n    if ( dx < 0 )\n    {\n      dx = -dx;\n      dy = -dy;\n      angle = AF_ANGLE_PI;\n    }\n\n    if ( dy < 0 )\n    {\n      FT_Pos  tmp;\n\n\n      tmp = dx;\n      dx  = -dy;\n      dy  = tmp;\n      angle -= AF_ANGLE_PI2;\n    }\n\n    if ( dx == 0 && dy == 0 )\n      return 0;\n\n    if ( dx == dy )\n      angle += AF_ANGLE_PI4;\n    else if ( dx > dy )\n      angle += af_arctan[FT_DivFix( dy, dx ) >> ( 16 - AF_ATAN_BITS )];\n    else\n      angle += AF_ANGLE_PI2 -\n               af_arctan[FT_DivFix( dx, dy ) >> ( 16 - AF_ATAN_BITS )];\n\n    if ( angle > AF_ANGLE_PI )\n      angle -= AF_ANGLE_2PI;\n\n    return angle;\n  }\n\n\n#endif /* 0 */\n\n\n  FT_LOCAL_DEF( void )\n  af_sort_pos( FT_UInt  count,\n               FT_Pos*  table )\n  {\n    FT_UInt  i, j;\n    FT_Pos   swap;\n\n\n    for ( i = 1; i < count; i++ )\n    {\n      for ( j = i; j > 0; j-- )\n      {\n        if ( table[j] >= table[j - 1] )\n          break;\n\n        swap         = table[j];\n        table[j]     = table[j - 1];\n        table[j - 1] = swap;\n      }\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  af_sort_and_quantize_widths( FT_UInt*  count,\n                               AF_Width  table,\n                               FT_Pos    threshold )\n  {\n    FT_UInt      i, j;\n    FT_UInt      cur_idx;\n    FT_Pos       cur_val;\n    FT_Pos       sum;\n    AF_WidthRec  swap;\n\n\n    if ( *count == 1 )\n      return;\n\n    /* sort */\n    for ( i = 1; i < *count; i++ )\n    {\n      for ( j = i; j > 0; j-- )\n      {\n        if ( table[j].org >= table[j - 1].org )\n          break;\n\n        swap         = table[j];\n        table[j]     = table[j - 1];\n        table[j - 1] = swap;\n      }\n    }\n\n    cur_idx = 0;\n    cur_val = table[cur_idx].org;\n\n    /* compute and use mean values for clusters not larger than  */\n    /* `threshold'; this is very primitive and might not yield   */\n    /* the best result, but normally, using reference character  */\n    /* `o', `*count' is 2, so the code below is fully sufficient */\n    for ( i = 1; i < *count; i++ )\n    {\n      if ( table[i].org - cur_val > threshold ||\n           i == *count - 1                    )\n      {\n        sum = 0;\n\n        /* fix loop for end of array */\n        if ( table[i].org - cur_val <= threshold &&\n             i == *count - 1                     )\n          i++;\n\n        for ( j = cur_idx; j < i; j++ )\n        {\n          sum         += table[j].org;\n          table[j].org = 0;\n        }\n        table[cur_idx].org = sum / j;\n\n        if ( i < *count - 1 )\n        {\n          cur_idx = i + 1;\n          cur_val = table[cur_idx].org;\n        }\n      }\n    }\n\n    cur_idx = 1;\n\n    /* compress array to remove zero values */\n    for ( i = 1; i < *count; i++ )\n    {\n      if ( table[i].org )\n        table[cur_idx++] = table[i];\n    }\n\n    *count = cur_idx;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afangles.h",
    "content": "/*\n *  afangles.h\n *\n *  This is a dummy file, used to please the build system.  It is never\n *  included by the auto-fitter sources.\n *\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afblue.c",
    "content": "/* This file has been generated by the Perl script `afblue.pl', */\n/* using data from file `afblue.dat'.                           */\n\n/***************************************************************************/\n/*                                                                         */\n/*  afblue.c                                                               */\n/*                                                                         */\n/*    Auto-fitter data for blue strings (body).                            */\n/*                                                                         */\n/*  Copyright 2013 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"aftypes.h\"\n\n\n  FT_LOCAL_ARRAY_DEF( char )\n  af_blue_strings[] =\n  {\n    /* */\n    '\\xD0', '\\x91', '\\xD0', '\\x92', '\\xD0', '\\x95', '\\xD0', '\\x9F', '\\xD0', '\\x97', '\\xD0', '\\x9E', '\\xD0', '\\xA1', '\\xD0', '\\xAD',  /* БВЕПЗОСЭ */\n    '\\0',\n    '\\xD0', '\\x91', '\\xD0', '\\x92', '\\xD0', '\\x95', '\\xD0', '\\xA8', '\\xD0', '\\x97', '\\xD0', '\\x9E', '\\xD0', '\\xA1', '\\xD0', '\\xAD',  /* БВЕШЗОСЭ */\n    '\\0',\n    '\\xD1', '\\x85', '\\xD0', '\\xBF', '\\xD0', '\\xBD', '\\xD1', '\\x88', '\\xD0', '\\xB5', '\\xD0', '\\xB7', '\\xD0', '\\xBE', '\\xD1', '\\x81',  /* хпншезос */\n    '\\0',\n    '\\xD1', '\\x80', '\\xD1', '\\x83', '\\xD1', '\\x84',  /* руф */\n    '\\0',\n    '\\xE0', '\\xA4', '\\x95', '\\xE0', '\\xA4', '\\xAE', '\\xE0', '\\xA4', '\\x85', '\\xE0', '\\xA4', '\\x86', '\\xE0', '\\xA4', '\\xA5', '\\xE0', '\\xA4', '\\xA7', '\\xE0', '\\xA4', '\\xAD', '\\xE0', '\\xA4', '\\xB6',  /* क म अ आ थ ध भ श */\n    '\\0',\n    '\\xE0', '\\xA4', '\\x88', '\\xE0', '\\xA4', '\\x90', '\\xE0', '\\xA4', '\\x93', '\\xE0', '\\xA4', '\\x94', '\\xE0', '\\xA4', '\\xBF', '\\xE0', '\\xA5', '\\x80', '\\xE0', '\\xA5', '\\x8B', '\\xE0', '\\xA5', '\\x8C',  /* ई ऐ ओ औ ि ी ो ौ */\n    '\\0',\n    '\\xE0', '\\xA4', '\\x95', '\\xE0', '\\xA4', '\\xAE', '\\xE0', '\\xA4', '\\x85', '\\xE0', '\\xA4', '\\x86', '\\xE0', '\\xA4', '\\xA5', '\\xE0', '\\xA4', '\\xA7', '\\xE0', '\\xA4', '\\xAD', '\\xE0', '\\xA4', '\\xB6',  /* क म अ आ थ ध भ श */\n    '\\0',\n    '\\xE0', '\\xA5', '\\x81', '\\xE0', '\\xA5', '\\x83',  /* ु ृ */\n    '\\0',\n    '\\xCE', '\\x93', '\\xCE', '\\x92', '\\xCE', '\\x95', '\\xCE', '\\x96', '\\xCE', '\\x98', '\\xCE', '\\x9F', '\\xCE', '\\xA9',  /* ΓΒΕΖΘΟΩ */\n    '\\0',\n    '\\xCE', '\\x92', '\\xCE', '\\x94', '\\xCE', '\\x96', '\\xCE', '\\x9E', '\\xCE', '\\x98', '\\xCE', '\\x9F',  /* ΒΔΖΞΘΟ */\n    '\\0',\n    '\\xCE', '\\xB2', '\\xCE', '\\xB8', '\\xCE', '\\xB4', '\\xCE', '\\xB6', '\\xCE', '\\xBB', '\\xCE', '\\xBE',  /* βθδζλξ */\n    '\\0',\n    '\\xCE', '\\xB1', '\\xCE', '\\xB5', '\\xCE', '\\xB9', '\\xCE', '\\xBF', '\\xCF', '\\x80', '\\xCF', '\\x83', '\\xCF', '\\x84', '\\xCF', '\\x89',  /* αειοπστω */\n    '\\0',\n    '\\xCE', '\\xB2', '\\xCE', '\\xB3', '\\xCE', '\\xB7', '\\xCE', '\\xBC', '\\xCF', '\\x81', '\\xCF', '\\x86', '\\xCF', '\\x87', '\\xCF', '\\x88',  /* βγημρφχψ */\n    '\\0',\n    '\\xD7', '\\x91', '\\xD7', '\\x93', '\\xD7', '\\x94', '\\xD7', '\\x97', '\\xD7', '\\x9A', '\\xD7', '\\x9B', '\\xD7', '\\x9D', '\\xD7', '\\xA1',  /* בדהחךכםס */\n    '\\0',\n    '\\xD7', '\\x91', '\\xD7', '\\x98', '\\xD7', '\\x9B', '\\xD7', '\\x9D', '\\xD7', '\\xA1', '\\xD7', '\\xA6',  /* בטכםסצ */\n    '\\0',\n    '\\xD7', '\\xA7', '\\xD7', '\\x9A', '\\xD7', '\\x9F', '\\xD7', '\\xA3', '\\xD7', '\\xA5',  /* קךןףץ */\n    '\\0',\n    'T', 'H', 'E', 'Z', 'O', 'C', 'Q', 'S',  /* THEZOCQS */\n    '\\0',\n    'H', 'E', 'Z', 'L', 'O', 'C', 'U', 'S',  /* HEZLOCUS */\n    '\\0',\n    'f', 'i', 'j', 'k', 'd', 'b', 'h',  /* fijkdbh */\n    '\\0',\n    'x', 'z', 'r', 'o', 'e', 's', 'c',  /* xzroesc */\n    '\\0',\n    'p', 'q', 'g', 'j', 'y',  /* pqgjy */\n    '\\0',\n    '\\xE0', '\\xB0', '\\x87', '\\xE0', '\\xB0', '\\x8C', '\\xE0', '\\xB0', '\\x99', '\\xE0', '\\xB0', '\\x9E', '\\xE0', '\\xB0', '\\xA3', '\\xE0', '\\xB0', '\\xB1', '\\xE0', '\\xB1', '\\xAF',  /* ఇ ఌ ఙ ఞ ణ ఱ ౯ */\n    '\\0',\n    '\\xE0', '\\xB0', '\\x85', '\\xE0', '\\xB0', '\\x95', '\\xE0', '\\xB0', '\\x9A', '\\xE0', '\\xB0', '\\xB0', '\\xE0', '\\xB0', '\\xBD', '\\xE0', '\\xB1', '\\xA8', '\\xE0', '\\xB1', '\\xAC',  /* అ క చ ర ఽ ౨ ౬ */\n#ifdef AF_CONFIG_OPTION_CJK\n    '\\0',\n    '\\xE4', '\\xBB', '\\x96', '\\xE4', '\\xBB', '\\xAC', '\\xE4', '\\xBD', '\\xA0', '\\xE4', '\\xBE', '\\x86', '\\xE5', '\\x80', '\\x91', '\\xE5', '\\x88', '\\xB0', '\\xE5', '\\x92', '\\x8C', '\\xE5', '\\x9C', '\\xB0',  /* 他们你來們到和地 */\n    '\\xE5', '\\xAF', '\\xB9', '\\xE5', '\\xB0', '\\x8D', '\\xE5', '\\xB0', '\\xB1', '\\xE5', '\\xB8', '\\xAD', '\\xE6', '\\x88', '\\x91', '\\xE6', '\\x97', '\\xB6', '\\xE6', '\\x99', '\\x82', '\\xE6', '\\x9C', '\\x83',  /* 对對就席我时時會 */\n    '\\xE6', '\\x9D', '\\xA5', '\\xE7', '\\x82', '\\xBA', '\\xE8', '\\x83', '\\xBD', '\\xE8', '\\x88', '\\xB0', '\\xE8', '\\xAA', '\\xAA', '\\xE8', '\\xAF', '\\xB4', '\\xE8', '\\xBF', '\\x99', '\\xE9', '\\x80', '\\x99',  /* 来為能舰說说这這 */\n    '\\xE9', '\\xBD', '\\x8A', '|',  /* 齊 | */\n    '\\xE5', '\\x86', '\\x9B', '\\xE5', '\\x90', '\\x8C', '\\xE5', '\\xB7', '\\xB2', '\\xE6', '\\x84', '\\xBF', '\\xE6', '\\x97', '\\xA2', '\\xE6', '\\x98', '\\x9F', '\\xE6', '\\x98', '\\xAF', '\\xE6', '\\x99', '\\xAF',  /* 军同已愿既星是景 */\n    '\\xE6', '\\xB0', '\\x91', '\\xE7', '\\x85', '\\xA7', '\\xE7', '\\x8E', '\\xB0', '\\xE7', '\\x8F', '\\xBE', '\\xE7', '\\x90', '\\x86', '\\xE7', '\\x94', '\\xA8', '\\xE7', '\\xBD', '\\xAE', '\\xE8', '\\xA6', '\\x81',  /* 民照现現理用置要 */\n    '\\xE8', '\\xBB', '\\x8D', '\\xE9', '\\x82', '\\xA3', '\\xE9', '\\x85', '\\x8D', '\\xE9', '\\x87', '\\x8C', '\\xE9', '\\x96', '\\x8B', '\\xE9', '\\x9B', '\\xB7', '\\xE9', '\\x9C', '\\xB2', '\\xE9', '\\x9D', '\\xA2',  /* 軍那配里開雷露面 */\n    '\\xE9', '\\xA1', '\\xBE',  /* 顾 */\n    '\\0',\n    '\\xE4', '\\xB8', '\\xAA', '\\xE4', '\\xB8', '\\xBA', '\\xE4', '\\xBA', '\\xBA', '\\xE4', '\\xBB', '\\x96', '\\xE4', '\\xBB', '\\xA5', '\\xE4', '\\xBB', '\\xAC', '\\xE4', '\\xBD', '\\xA0', '\\xE4', '\\xBE', '\\x86',  /* 个为人他以们你來 */\n    '\\xE5', '\\x80', '\\x8B', '\\xE5', '\\x80', '\\x91', '\\xE5', '\\x88', '\\xB0', '\\xE5', '\\x92', '\\x8C', '\\xE5', '\\xA4', '\\xA7', '\\xE5', '\\xAF', '\\xB9', '\\xE5', '\\xB0', '\\x8D', '\\xE5', '\\xB0', '\\xB1',  /* 個們到和大对對就 */\n    '\\xE6', '\\x88', '\\x91', '\\xE6', '\\x97', '\\xB6', '\\xE6', '\\x99', '\\x82', '\\xE6', '\\x9C', '\\x89', '\\xE6', '\\x9D', '\\xA5', '\\xE7', '\\x82', '\\xBA', '\\xE8', '\\xA6', '\\x81', '\\xE8', '\\xAA', '\\xAA',  /* 我时時有来為要說 */\n    '\\xE8', '\\xAF', '\\xB4', '|',  /* 说 | */\n    '\\xE4', '\\xB8', '\\xBB', '\\xE4', '\\xBA', '\\x9B', '\\xE5', '\\x9B', '\\xA0', '\\xE5', '\\xAE', '\\x83', '\\xE6', '\\x83', '\\xB3', '\\xE6', '\\x84', '\\x8F', '\\xE7', '\\x90', '\\x86', '\\xE7', '\\x94', '\\x9F',  /* 主些因它想意理生 */\n    '\\xE7', '\\x95', '\\xB6', '\\xE7', '\\x9C', '\\x8B', '\\xE7', '\\x9D', '\\x80', '\\xE7', '\\xBD', '\\xAE', '\\xE8', '\\x80', '\\x85', '\\xE8', '\\x87', '\\xAA', '\\xE8', '\\x91', '\\x97', '\\xE8', '\\xA3', '\\xA1',  /* 當看着置者自著裡 */\n    '\\xE8', '\\xBF', '\\x87', '\\xE8', '\\xBF', '\\x98', '\\xE8', '\\xBF', '\\x9B', '\\xE9', '\\x80', '\\xB2', '\\xE9', '\\x81', '\\x8E', '\\xE9', '\\x81', '\\x93', '\\xE9', '\\x82', '\\x84', '\\xE9', '\\x87', '\\x8C',  /* 过还进進過道還里 */\n    '\\xE9', '\\x9D', '\\xA2',  /* 面 */\n#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT\n    '\\0',\n    '\\xE4', '\\xBA', '\\x9B', '\\xE4', '\\xBB', '\\xAC', '\\xE4', '\\xBD', '\\xA0', '\\xE4', '\\xBE', '\\x86', '\\xE5', '\\x80', '\\x91', '\\xE5', '\\x88', '\\xB0', '\\xE5', '\\x92', '\\x8C', '\\xE5', '\\x9C', '\\xB0',  /* 些们你來們到和地 */\n    '\\xE5', '\\xA5', '\\xB9', '\\xE5', '\\xB0', '\\x86', '\\xE5', '\\xB0', '\\x87', '\\xE5', '\\xB0', '\\xB1', '\\xE5', '\\xB9', '\\xB4', '\\xE5', '\\xBE', '\\x97', '\\xE6', '\\x83', '\\x85', '\\xE6', '\\x9C', '\\x80',  /* 她将將就年得情最 */\n    '\\xE6', '\\xA0', '\\xB7', '\\xE6', '\\xA8', '\\xA3', '\\xE7', '\\x90', '\\x86', '\\xE8', '\\x83', '\\xBD', '\\xE8', '\\xAA', '\\xAA', '\\xE8', '\\xAF', '\\xB4', '\\xE8', '\\xBF', '\\x99', '\\xE9', '\\x80', '\\x99',  /* 样樣理能說说这這 */\n    '\\xE9', '\\x80', '\\x9A', '|',  /* 通 | */\n    '\\xE5', '\\x8D', '\\xB3', '\\xE5', '\\x90', '\\x97', '\\xE5', '\\x90', '\\xA7', '\\xE5', '\\x90', '\\xAC', '\\xE5', '\\x91', '\\xA2', '\\xE5', '\\x93', '\\x81', '\\xE5', '\\x93', '\\x8D', '\\xE5', '\\x97', '\\x8E',  /* 即吗吧听呢品响嗎 */\n    '\\xE5', '\\xB8', '\\x88', '\\xE5', '\\xB8', '\\xAB', '\\xE6', '\\x94', '\\xB6', '\\xE6', '\\x96', '\\xAD', '\\xE6', '\\x96', '\\xB7', '\\xE6', '\\x98', '\\x8E', '\\xE7', '\\x9C', '\\xBC', '\\xE9', '\\x96', '\\x93',  /* 师師收断斷明眼間 */\n    '\\xE9', '\\x97', '\\xB4', '\\xE9', '\\x99', '\\x85', '\\xE9', '\\x99', '\\x88', '\\xE9', '\\x99', '\\x90', '\\xE9', '\\x99', '\\xA4', '\\xE9', '\\x99', '\\xB3', '\\xE9', '\\x9A', '\\x8F', '\\xE9', '\\x9A', '\\x9B',  /* 间际陈限除陳随際 */\n    '\\xE9', '\\x9A', '\\xA8',  /* 隨 */\n    '\\0',\n    '\\xE4', '\\xBA', '\\x8B', '\\xE5', '\\x89', '\\x8D', '\\xE5', '\\xAD', '\\xB8', '\\xE5', '\\xB0', '\\x86', '\\xE5', '\\xB0', '\\x87', '\\xE6', '\\x83', '\\x85', '\\xE6', '\\x83', '\\xB3', '\\xE6', '\\x88', '\\x96',  /* 事前學将將情想或 */\n    '\\xE6', '\\x94', '\\xBF', '\\xE6', '\\x96', '\\xAF', '\\xE6', '\\x96', '\\xB0', '\\xE6', '\\xA0', '\\xB7', '\\xE6', '\\xA8', '\\xA3', '\\xE6', '\\xB0', '\\x91', '\\xE6', '\\xB2', '\\x92', '\\xE6', '\\xB2', '\\xA1',  /* 政斯新样樣民沒没 */\n    '\\xE7', '\\x84', '\\xB6', '\\xE7', '\\x89', '\\xB9', '\\xE7', '\\x8E', '\\xB0', '\\xE7', '\\x8F', '\\xBE', '\\xE7', '\\x90', '\\x83', '\\xE7', '\\xAC', '\\xAC', '\\xE7', '\\xB6', '\\x93', '\\xE8', '\\xB0', '\\x81',  /* 然特现現球第經谁 */\n    '\\xE8', '\\xB5', '\\xB7', '|',  /* 起 | */\n    '\\xE4', '\\xBE', '\\x8B', '\\xE5', '\\x88', '\\xA5', '\\xE5', '\\x88', '\\xAB', '\\xE5', '\\x88', '\\xB6', '\\xE5', '\\x8A', '\\xA8', '\\xE5', '\\x8B', '\\x95', '\\xE5', '\\x90', '\\x97', '\\xE5', '\\x97', '\\x8E',  /* 例別别制动動吗嗎 */\n    '\\xE5', '\\xA2', '\\x9E', '\\xE6', '\\x8C', '\\x87', '\\xE6', '\\x98', '\\x8E', '\\xE6', '\\x9C', '\\x9D', '\\xE6', '\\x9C', '\\x9F', '\\xE6', '\\x9E', '\\x84', '\\xE7', '\\x89', '\\xA9', '\\xE7', '\\xA1', '\\xAE',  /* 增指明朝期构物确 */\n    '\\xE7', '\\xA7', '\\x8D', '\\xE8', '\\xAA', '\\xBF', '\\xE8', '\\xB0', '\\x83', '\\xE8', '\\xB2', '\\xBB', '\\xE8', '\\xB4', '\\xB9', '\\xE9', '\\x82', '\\xA3', '\\xE9', '\\x83', '\\xBD', '\\xE9', '\\x96', '\\x93',  /* 种調调費费那都間 */\n    '\\xE9', '\\x97', '\\xB4',  /* 间 */\n#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */\n#endif /* AF_CONFIG_OPTION_CJK                */\n    '\\0',\n\n  };\n\n\n  /* stringsets are specific to styles */\n  FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec )\n  af_blue_stringsets[] =\n  {\n    /* */\n    { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },\n    { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM,  0                                 },\n    { AF_BLUE_STRING_CYRILLIC_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |\n                                               AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },\n    { AF_BLUE_STRING_CYRILLIC_SMALL,           0                                 },\n    { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0                                 },\n    { AF_BLUE_STRING_MAX,                      0                                 },\n    { AF_BLUE_STRING_DEVANAGARI_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        },\n    { AF_BLUE_STRING_DEVANAGARI_HEAD,   AF_BLUE_PROPERTY_LATIN_TOP        },\n    { AF_BLUE_STRING_DEVANAGARI_BASE,   AF_BLUE_PROPERTY_LATIN_TOP      |\n                                        AF_BLUE_PROPERTY_LATIN_NEUTRAL  |\n                                        AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },\n    { AF_BLUE_STRING_DEVANAGARI_BASE,   0                                 },\n    { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0                                 },\n    { AF_BLUE_STRING_MAX,               0                                 },\n    { AF_BLUE_STRING_GREEK_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },\n    { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM,  0                                 },\n    { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP,  AF_BLUE_PROPERTY_LATIN_TOP        },\n    { AF_BLUE_STRING_GREEK_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |\n                                            AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },\n    { AF_BLUE_STRING_GREEK_SMALL,           0                                 },\n    { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0                                 },\n    { AF_BLUE_STRING_MAX,                   0                                 },\n    { AF_BLUE_STRING_HEBREW_TOP,       AF_BLUE_PROPERTY_LATIN_TOP  |\n                                       AF_BLUE_PROPERTY_LATIN_LONG   },\n    { AF_BLUE_STRING_HEBREW_BOTTOM,    0                             },\n    { AF_BLUE_STRING_HEBREW_DESCENDER, 0                             },\n    { AF_BLUE_STRING_MAX,              0                             },\n    { AF_BLUE_STRING_LATIN_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },\n    { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM,  0                                 },\n    { AF_BLUE_STRING_LATIN_SMALL_F_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },\n    { AF_BLUE_STRING_LATIN_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |\n                                            AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },\n    { AF_BLUE_STRING_LATIN_SMALL,           0                                 },\n    { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0                                 },\n    { AF_BLUE_STRING_MAX,                   0                                 },\n    { AF_BLUE_STRING_TELUGU_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },\n    { AF_BLUE_STRING_TELUGU_BOTTOM, 0                          },\n    { AF_BLUE_STRING_MAX,           0                          },\n#ifdef AF_CONFIG_OPTION_CJK\n    { AF_BLUE_STRING_CJK_TOP,    AF_BLUE_PROPERTY_CJK_TOP     },\n    { AF_BLUE_STRING_CJK_BOTTOM, 0                            },\n#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT\n    { AF_BLUE_STRING_CJK_LEFT,   AF_BLUE_PROPERTY_CJK_HORIZ   },\n    { AF_BLUE_STRING_CJK_RIGHT,  AF_BLUE_PROPERTY_CJK_HORIZ |\n                                 AF_BLUE_PROPERTY_CJK_RIGHT   },\n#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */\n    { AF_BLUE_STRING_MAX,        0                            },\n#endif /* AF_CONFIG_OPTION_CJK                */\n\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afblue.cin",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afblue.c                                                               */\n/*                                                                         */\n/*    Auto-fitter data for blue strings (body).                            */\n/*                                                                         */\n/*  Copyright 2013 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"aftypes.h\"\n\n\n  FT_LOCAL_ARRAY_DEF( char )\n  af_blue_strings[] =\n  {\n    /* */\n@AF_BLUE_STRINGS_ARRAY@\n  };\n\n\n  /* stringsets are specific to styles */\n  FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec )\n  af_blue_stringsets[] =\n  {\n    /* */\n@AF_BLUE_STRINGSETS_ARRAY@\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afblue.h",
    "content": "/* This file has been generated by the Perl script `afblue.pl', */\n/* using data from file `afblue.dat'.                           */\n\n/***************************************************************************/\n/*                                                                         */\n/*  afblue.h                                                               */\n/*                                                                         */\n/*    Auto-fitter data for blue strings (specification).                   */\n/*                                                                         */\n/*  Copyright 2013, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFBLUE_H__\n#define __AFBLUE_H__\n\n\nFT_BEGIN_HEADER\n\n\n  /* an auxiliary macro to decode a UTF-8 character -- since we only use */\n  /* hard-coded, self-converted data, no error checking is performed     */\n#define GET_UTF8_CHAR( ch, p )                    \\\n          ch = (unsigned char)*p++;               \\\n          if ( ch >= 0x80 )                       \\\n          {                                       \\\n            FT_UInt  len;                         \\\n                                                  \\\n                                                  \\\n            if ( ch < 0xE0 )                      \\\n            {                                     \\\n              len = 1;                            \\\n              ch &= 0x1F;                         \\\n            }                                     \\\n            else if ( ch < 0xF0 )                 \\\n            {                                     \\\n              len = 2;                            \\\n              ch &= 0x0F;                         \\\n            }                                     \\\n            else                                  \\\n            {                                     \\\n              len = 3;                            \\\n              ch &= 0x07;                         \\\n            }                                     \\\n                                                  \\\n            for ( ; len > 0; len-- )              \\\n              ch = ( ch << 6 ) | ( *p++ & 0x3F ); \\\n          }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    B L U E   S T R I N G S                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* At the bottommost level, we define strings for finding blue zones. */\n\n\n#define AF_BLUE_STRING_MAX_LEN  51\n\n  /* The AF_Blue_String enumeration values are offsets into the */\n  /* `af_blue_strings' array.                                   */\n\n  typedef enum  AF_Blue_String_\n  {\n    AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 0,\n    AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 17,\n    AF_BLUE_STRING_CYRILLIC_SMALL = 34,\n    AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 51,\n    AF_BLUE_STRING_DEVANAGARI_BASE = 58,\n    AF_BLUE_STRING_DEVANAGARI_TOP = 83,\n    AF_BLUE_STRING_DEVANAGARI_HEAD = 108,\n    AF_BLUE_STRING_DEVANAGARI_BOTTOM = 133,\n    AF_BLUE_STRING_GREEK_CAPITAL_TOP = 140,\n    AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 155,\n    AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 168,\n    AF_BLUE_STRING_GREEK_SMALL = 181,\n    AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 198,\n    AF_BLUE_STRING_HEBREW_TOP = 215,\n    AF_BLUE_STRING_HEBREW_BOTTOM = 232,\n    AF_BLUE_STRING_HEBREW_DESCENDER = 245,\n    AF_BLUE_STRING_LATIN_CAPITAL_TOP = 256,\n    AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 265,\n    AF_BLUE_STRING_LATIN_SMALL_F_TOP = 274,\n    AF_BLUE_STRING_LATIN_SMALL = 282,\n    AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 290,\n    AF_BLUE_STRING_TELUGU_TOP = 296,\n    AF_BLUE_STRING_TELUGU_BOTTOM = 318,\n    af_blue_1_1 = 339,\n#ifdef AF_CONFIG_OPTION_CJK\n    AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,\n    AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 153,\n    af_blue_1_1_1 = af_blue_1_1 + 304,\n#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT\n    AF_BLUE_STRING_CJK_LEFT = af_blue_1_1_1 + 1,\n    AF_BLUE_STRING_CJK_RIGHT = af_blue_1_1_1 + 153,\n    af_blue_1_1_2 = af_blue_1_1_1 + 304,\n#else\n    af_blue_1_1_2 = af_blue_1_1_1 + 0,\n#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */\n    af_blue_1_2 = af_blue_1_1_2 + 0,\n#else\n    af_blue_1_2 = af_blue_1_1 + 0,\n#endif /* AF_CONFIG_OPTION_CJK                */\n\n\n    AF_BLUE_STRING_MAX   /* do not remove */\n\n  } AF_Blue_String;\n\n\n  FT_LOCAL_ARRAY( char )\n  af_blue_strings[];\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                 B L U E   S T R I N G S E T S                 *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* The next level is to group blue strings into style-specific sets. */\n\n\n  /* Properties are specific to a writing system.  We assume that a given  */\n  /* blue string can't be used in more than a single writing system, which */\n  /* is a safe bet.                                                        */\n#define AF_BLUE_PROPERTY_LATIN_TOP       ( 1 << 0 )   /* must have value 1 */\n#define AF_BLUE_PROPERTY_LATIN_NEUTRAL   ( 1 << 1 )\n#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT  ( 1 << 2 )\n#define AF_BLUE_PROPERTY_LATIN_LONG      ( 1 << 3 )\n\n#define AF_BLUE_PROPERTY_CJK_TOP    ( 1 << 0 )        /* must have value 1 */\n#define AF_BLUE_PROPERTY_CJK_HORIZ  ( 1 << 1 )        /* must have value 2 */\n#define AF_BLUE_PROPERTY_CJK_RIGHT  AF_BLUE_PROPERTY_CJK_TOP\n\n\n#define AF_BLUE_STRINGSET_MAX_LEN  7\n\n  /* The AF_Blue_Stringset enumeration values are offsets into the */\n  /* `af_blue_stringsets' array.                                   */\n\n  typedef enum  AF_Blue_Stringset_\n  {\n    AF_BLUE_STRINGSET_CYRL = 0,\n    AF_BLUE_STRINGSET_DEVA = 6,\n    AF_BLUE_STRINGSET_GREK = 12,\n    AF_BLUE_STRINGSET_HEBR = 19,\n    AF_BLUE_STRINGSET_LATN = 23,\n    AF_BLUE_STRINGSET_TELU = 30,\n    af_blue_2_1 = 33,\n#ifdef AF_CONFIG_OPTION_CJK\n    AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,\n    af_blue_2_1_1 = af_blue_2_1 + 2,\n#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT\n    af_blue_2_1_2 = af_blue_2_1_1 + 2,\n#else\n    af_blue_2_1_2 = af_blue_2_1_1 + 0,\n#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */\n    af_blue_2_2 = af_blue_2_1_2 + 1,\n#else\n    af_blue_2_2 = af_blue_2_1 + 0,\n#endif /* AF_CONFIG_OPTION_CJK                */\n\n\n    AF_BLUE_STRINGSET_MAX   /* do not remove */\n\n  } AF_Blue_Stringset;\n\n\n  typedef struct  AF_Blue_StringRec_\n  {\n    AF_Blue_String  string;\n    FT_UShort       properties;\n\n  } AF_Blue_StringRec;\n\n\n  FT_LOCAL_ARRAY( AF_Blue_StringRec )\n  af_blue_stringsets[];\n\n/* */\n\nFT_END_HEADER\n\n\n#endif /* __AFBLUE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afblue.hin",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afblue.h                                                               */\n/*                                                                         */\n/*    Auto-fitter data for blue strings (specification).                   */\n/*                                                                         */\n/*  Copyright 2013, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFBLUE_H__\n#define __AFBLUE_H__\n\n\nFT_BEGIN_HEADER\n\n\n  /* an auxiliary macro to decode a UTF-8 character -- since we only use */\n  /* hard-coded, self-converted data, no error checking is performed     */\n#define GET_UTF8_CHAR( ch, p )                    \\\n          ch = (unsigned char)*p++;               \\\n          if ( ch >= 0x80 )                       \\\n          {                                       \\\n            FT_UInt  len;                         \\\n                                                  \\\n                                                  \\\n            if ( ch < 0xE0 )                      \\\n            {                                     \\\n              len = 1;                            \\\n              ch &= 0x1F;                         \\\n            }                                     \\\n            else if ( ch < 0xF0 )                 \\\n            {                                     \\\n              len = 2;                            \\\n              ch &= 0x0F;                         \\\n            }                                     \\\n            else                                  \\\n            {                                     \\\n              len = 3;                            \\\n              ch &= 0x07;                         \\\n            }                                     \\\n                                                  \\\n            for ( ; len > 0; len-- )              \\\n              ch = ( ch << 6 ) | ( *p++ & 0x3F ); \\\n          }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    B L U E   S T R I N G S                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* At the bottommost level, we define strings for finding blue zones. */\n\n\n#define AF_BLUE_STRING_MAX_LEN  @AF_BLUE_STRING_MAX_LEN@\n\n  /* The AF_Blue_String enumeration values are offsets into the */\n  /* `af_blue_strings' array.                                   */\n\n  typedef enum  AF_Blue_String_\n  {\n@AF_BLUE_STRING_ENUM@\n\n    AF_BLUE_STRING_MAX   /* do not remove */\n\n  } AF_Blue_String;\n\n\n  FT_LOCAL_ARRAY( char )\n  af_blue_strings[];\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                 B L U E   S T R I N G S E T S                 *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* The next level is to group blue strings into style-specific sets. */\n\n\n  /* Properties are specific to a writing system.  We assume that a given  */\n  /* blue string can't be used in more than a single writing system, which */\n  /* is a safe bet.                                                        */\n#define AF_BLUE_PROPERTY_LATIN_TOP       ( 1 << 0 )   /* must have value 1 */\n#define AF_BLUE_PROPERTY_LATIN_NEUTRAL   ( 1 << 1 )\n#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT  ( 1 << 2 )\n#define AF_BLUE_PROPERTY_LATIN_LONG      ( 1 << 3 )\n\n#define AF_BLUE_PROPERTY_CJK_TOP    ( 1 << 0 )        /* must have value 1 */\n#define AF_BLUE_PROPERTY_CJK_HORIZ  ( 1 << 1 )        /* must have value 2 */\n#define AF_BLUE_PROPERTY_CJK_RIGHT  AF_BLUE_PROPERTY_CJK_TOP\n\n\n#define AF_BLUE_STRINGSET_MAX_LEN  @AF_BLUE_STRINGSET_MAX_LEN@\n\n  /* The AF_Blue_Stringset enumeration values are offsets into the */\n  /* `af_blue_stringsets' array.                                   */\n\n  typedef enum  AF_Blue_Stringset_\n  {\n@AF_BLUE_STRINGSET_ENUM@\n\n    AF_BLUE_STRINGSET_MAX   /* do not remove */\n\n  } AF_Blue_Stringset;\n\n\n  typedef struct  AF_Blue_StringRec_\n  {\n    AF_Blue_String  string;\n    FT_UShort       properties;\n\n  } AF_Blue_StringRec;\n\n\n  FT_LOCAL_ARRAY( AF_Blue_StringRec )\n  af_blue_stringsets[];\n\n/* */\n\nFT_END_HEADER\n\n\n#endif /* __AFBLUE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afcjk.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afcjk.c                                                                */\n/*                                                                         */\n/*    Auto-fitter hinting routines for CJK writing system (body).          */\n/*                                                                         */\n/*  Copyright 2006-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*\n   *  The algorithm is based on akito's autohint patch, available here:\n   *\n   *  http://www.kde.gr.jp/~akito/patch/freetype2/\n   *\n   */\n\n#include <ft2build.h>\n#include FT_ADVANCES_H\n#include FT_INTERNAL_DEBUG_H\n\n#include \"afglobal.h\"\n#include \"afpic.h\"\n#include \"aflatin.h\"\n\n\n#ifdef AF_CONFIG_OPTION_CJK\n\n#undef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT\n\n#include \"afcjk.h\"\n#include \"aferrors.h\"\n\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n#include \"afwarp.h\"\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_afcjk\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****              C J K   G L O B A L   M E T R I C S              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* Basically the Latin version with AF_CJKMetrics */\n  /* to replace AF_LatinMetrics.                    */\n\n  FT_LOCAL_DEF( void )\n  af_cjk_metrics_init_widths( AF_CJKMetrics  metrics,\n                              FT_Face        face )\n  {\n    /* scan the array of segments in each direction */\n    AF_GlyphHintsRec  hints[1];\n\n\n    FT_TRACE5(( \"\\n\"\n                \"cjk standard widths computation (style `%s')\\n\"\n                \"===================================================\\n\"\n                \"\\n\",\n                af_style_names[metrics->root.style_class->style] ));\n\n    af_glyph_hints_init( hints, face->memory );\n\n    metrics->axis[AF_DIMENSION_HORZ].width_count = 0;\n    metrics->axis[AF_DIMENSION_VERT].width_count = 0;\n\n    {\n      FT_Error          error;\n      FT_ULong          glyph_index;\n      FT_Long           y_offset;\n      int               dim;\n      AF_CJKMetricsRec  dummy[1];\n      AF_Scaler         scaler = &dummy->root.scaler;\n\n#ifdef FT_CONFIG_OPTION_PIC\n      AF_FaceGlobals  globals = metrics->root.globals;\n#endif\n\n      AF_StyleClass   style_class  = metrics->root.style_class;\n      AF_ScriptClass  script_class = AF_SCRIPT_CLASSES_GET\n                                       [style_class->script];\n\n      FT_UInt32  standard_char;\n\n\n      standard_char = script_class->standard_char1;\n      af_get_char_index( &metrics->root,\n                         standard_char,\n                         &glyph_index,\n                         &y_offset );\n      if ( !glyph_index )\n      {\n        if ( script_class->standard_char2 )\n        {\n          standard_char = script_class->standard_char2;\n          af_get_char_index( &metrics->root,\n                             standard_char,\n                             &glyph_index,\n                             &y_offset );\n          if ( !glyph_index )\n          {\n            if ( script_class->standard_char3 )\n            {\n              standard_char = script_class->standard_char3;\n              af_get_char_index( &metrics->root,\n                                 standard_char,\n                                 &glyph_index,\n                                 &y_offset );\n              if ( !glyph_index )\n                goto Exit;\n            }\n            else\n              goto Exit;\n          }\n        }\n        else\n          goto Exit;\n      }\n\n      FT_TRACE5(( \"standard character: U+%04lX (glyph index %d)\\n\",\n                  standard_char, glyph_index ));\n\n      error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );\n      if ( error || face->glyph->outline.n_points <= 0 )\n        goto Exit;\n\n      FT_ZERO( dummy );\n\n      dummy->units_per_em = metrics->units_per_em;\n\n      scaler->x_scale = 0x10000L;\n      scaler->y_scale = 0x10000L;\n      scaler->x_delta = 0;\n      scaler->y_delta = 0;\n\n      scaler->face        = face;\n      scaler->render_mode = FT_RENDER_MODE_NORMAL;\n      scaler->flags       = 0;\n\n      af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy );\n\n      error = af_glyph_hints_reload( hints, &face->glyph->outline );\n      if ( error )\n        goto Exit;\n\n      for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n      {\n        AF_CJKAxis    axis    = &metrics->axis[dim];\n        AF_AxisHints  axhints = &hints->axis[dim];\n        AF_Segment    seg, limit, link;\n        FT_UInt       num_widths = 0;\n\n\n        error = af_latin_hints_compute_segments( hints,\n                                                 (AF_Dimension)dim );\n        if ( error )\n          goto Exit;\n\n        af_latin_hints_link_segments( hints,\n                                      0,\n                                      NULL,\n                                      (AF_Dimension)dim );\n\n        seg   = axhints->segments;\n        limit = seg + axhints->num_segments;\n\n        for ( ; seg < limit; seg++ )\n        {\n          link = seg->link;\n\n          /* we only consider stem segments there! */\n          if ( link && link->link == seg && link > seg )\n          {\n            FT_Pos  dist;\n\n\n            dist = seg->pos - link->pos;\n            if ( dist < 0 )\n              dist = -dist;\n\n            if ( num_widths < AF_CJK_MAX_WIDTHS )\n              axis->widths[num_widths++].org = dist;\n          }\n        }\n\n        /* this also replaces multiple almost identical stem widths */\n        /* with a single one (the value 100 is heuristic)           */\n        af_sort_and_quantize_widths( &num_widths, axis->widths,\n                                     dummy->units_per_em / 100 );\n        axis->width_count = num_widths;\n      }\n\n    Exit:\n      for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n      {\n        AF_CJKAxis  axis = &metrics->axis[dim];\n        FT_Pos      stdw;\n\n\n        stdw = ( axis->width_count > 0 ) ? axis->widths[0].org\n                                         : AF_LATIN_CONSTANT( metrics, 50 );\n\n        /* let's try 20% of the smallest width */\n        axis->edge_distance_threshold = stdw / 5;\n        axis->standard_width          = stdw;\n        axis->extra_light             = 0;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        {\n          FT_UInt  i;\n\n\n          FT_TRACE5(( \"%s widths:\\n\",\n                      dim == AF_DIMENSION_VERT ? \"horizontal\"\n                                               : \"vertical\" ));\n\n          FT_TRACE5(( \"  %d (standard)\", axis->standard_width ));\n          for ( i = 1; i < axis->width_count; i++ )\n            FT_TRACE5(( \" %d\", axis->widths[i].org ));\n\n          FT_TRACE5(( \"\\n\" ));\n        }\n#endif\n      }\n    }\n\n    FT_TRACE5(( \"\\n\" ));\n\n    af_glyph_hints_done( hints );\n  }\n\n\n  /* Find all blue zones. */\n\n  static void\n  af_cjk_metrics_init_blues( AF_CJKMetrics  metrics,\n                             FT_Face        face )\n  {\n    FT_Pos      fills[AF_BLUE_STRING_MAX_LEN];\n    FT_Pos      flats[AF_BLUE_STRING_MAX_LEN];\n\n    FT_Int      num_fills;\n    FT_Int      num_flats;\n\n    FT_Bool     fill;\n\n    AF_CJKBlue  blue;\n    FT_Error    error;\n    AF_CJKAxis  axis;\n    FT_Outline  outline;\n\n    AF_StyleClass  sc = metrics->root.style_class;\n\n    AF_Blue_Stringset         bss = sc->blue_stringset;\n    const AF_Blue_StringRec*  bs  = &af_blue_stringsets[bss];\n\n\n    /* we walk over the blue character strings as specified in the   */\n    /* style's entry in the `af_blue_stringset' array, computing its */\n    /* extremum points (depending on the string properties)          */\n\n    FT_TRACE5(( \"cjk blue zones computation\\n\"\n                \"==========================\\n\"\n                \"\\n\" ));\n\n    for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ )\n    {\n      const char*  p = &af_blue_strings[bs->string];\n      FT_Pos*      blue_ref;\n      FT_Pos*      blue_shoot;\n\n\n      if ( AF_CJK_IS_HORIZ_BLUE( bs ) )\n        axis = &metrics->axis[AF_DIMENSION_HORZ];\n      else\n        axis = &metrics->axis[AF_DIMENSION_VERT];\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n      {\n        FT_String*  cjk_blue_name[4] =\n        {\n          (FT_String*)\"bottom\",    /* --   , --  */\n          (FT_String*)\"top\",       /* --   , TOP */\n          (FT_String*)\"left\",      /* HORIZ, --  */\n          (FT_String*)\"right\"      /* HORIZ, TOP */\n        };\n\n\n        FT_TRACE5(( \"blue zone %d (%s):\\n\",\n                    axis->blue_count,\n                    cjk_blue_name[AF_CJK_IS_HORIZ_BLUE( bs ) |\n                                  AF_CJK_IS_TOP_BLUE( bs )   ] ));\n      }\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n      num_fills = 0;\n      num_flats = 0;\n\n      fill = 1;  /* start with characters that define fill values */\n      FT_TRACE5(( \"  [overshoot values]\\n\" ));\n\n      while ( *p )\n      {\n        FT_ULong    ch;\n        FT_ULong    glyph_index;\n        FT_Long     y_offset;\n        FT_Pos      best_pos;       /* same as points.y or points.x, resp. */\n        FT_Int      best_point;\n        FT_Vector*  points;\n\n\n        GET_UTF8_CHAR( ch, p );\n\n        /* switch to characters that define flat values */\n        if ( ch == '|' )\n        {\n          fill = 0;\n          FT_TRACE5(( \"  [reference values]\\n\" ));\n          continue;\n        }\n\n        /* load the character in the face -- skip unknown or empty ones */\n        af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset );\n        if ( glyph_index == 0 )\n        {\n          FT_TRACE5(( \"  U+%04lX unavailable\\n\", ch ));\n          continue;\n        }\n\n        error   = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );\n        outline = face->glyph->outline;\n        if ( error || outline.n_points <= 0 )\n        {\n          FT_TRACE5(( \"  U+%04lX contains no outlines\\n\", ch ));\n          continue;\n        }\n\n        /* now compute min or max point indices and coordinates */\n        points     = outline.points;\n        best_point = -1;\n        best_pos   = 0;  /* make compiler happy */\n\n        {\n          FT_Int  nn;\n          FT_Int  first = 0;\n          FT_Int  last  = -1;\n\n\n          for ( nn = 0; nn < outline.n_contours; first = last + 1, nn++ )\n          {\n            FT_Int  pp;\n\n\n            last = outline.contours[nn];\n\n            /* Avoid single-point contours since they are never rasterized. */\n            /* In some fonts, they correspond to mark attachment points     */\n            /* which are way outside of the glyph's real outline.           */\n            if ( last <= first )\n              continue;\n\n            if ( AF_CJK_IS_HORIZ_BLUE( bs ) )\n            {\n              if ( AF_CJK_IS_RIGHT_BLUE( bs ) )\n              {\n                for ( pp = first; pp <= last; pp++ )\n                  if ( best_point < 0 || points[pp].x > best_pos )\n                  {\n                    best_point = pp;\n                    best_pos   = points[pp].x;\n                  }\n              }\n              else\n              {\n                for ( pp = first; pp <= last; pp++ )\n                  if ( best_point < 0 || points[pp].x < best_pos )\n                  {\n                    best_point = pp;\n                    best_pos   = points[pp].x;\n                  }\n              }\n            }\n            else\n            {\n              if ( AF_CJK_IS_TOP_BLUE( bs ) )\n              {\n                for ( pp = first; pp <= last; pp++ )\n                  if ( best_point < 0 || points[pp].y > best_pos )\n                  {\n                    best_point = pp;\n                    best_pos   = points[pp].y;\n                  }\n              }\n              else\n              {\n                for ( pp = first; pp <= last; pp++ )\n                  if ( best_point < 0 || points[pp].y < best_pos )\n                  {\n                    best_point = pp;\n                    best_pos   = points[pp].y;\n                  }\n              }\n            }\n          }\n\n          FT_TRACE5(( \"  U+%04lX: best_pos = %5ld\\n\", ch, best_pos ));\n        }\n\n        if ( fill )\n          fills[num_fills++] = best_pos;\n        else\n          flats[num_flats++] = best_pos;\n      }\n\n      if ( num_flats == 0 && num_fills == 0 )\n      {\n        /*\n         *  we couldn't find a single glyph to compute this blue zone,\n         *  we will simply ignore it then\n         */\n        FT_TRACE5(( \"  empty\\n\" ));\n        continue;\n      }\n\n      /* we have computed the contents of the `fill' and `flats' tables,   */\n      /* now determine the reference and overshoot position of the blue -- */\n      /* we simply take the median value after a simple sort               */\n      af_sort_pos( num_fills, fills );\n      af_sort_pos( num_flats, flats );\n\n      blue       = &axis->blues[axis->blue_count];\n      blue_ref   = &blue->ref.org;\n      blue_shoot = &blue->shoot.org;\n\n      axis->blue_count++;\n\n      if ( num_flats == 0 )\n      {\n        *blue_ref   =\n        *blue_shoot = fills[num_fills / 2];\n      }\n      else if ( num_fills == 0 )\n      {\n        *blue_ref   =\n        *blue_shoot = flats[num_flats / 2];\n      }\n      else\n      {\n        *blue_ref   = fills[num_fills / 2];\n        *blue_shoot = flats[num_flats / 2];\n      }\n\n      /* make sure blue_ref >= blue_shoot for top/right or */\n      /* vice versa for bottom/left                        */\n      if ( *blue_shoot != *blue_ref )\n      {\n        FT_Pos   ref       = *blue_ref;\n        FT_Pos   shoot     = *blue_shoot;\n        FT_Bool  under_ref = FT_BOOL( shoot < ref );\n\n\n        /* AF_CJK_IS_TOP_BLUE covers `right' and `top' */\n        if ( AF_CJK_IS_TOP_BLUE( bs ) ^ under_ref )\n        {\n          *blue_ref   =\n          *blue_shoot = ( shoot + ref ) / 2;\n\n          FT_TRACE5(( \"  [reference smaller than overshoot,\"\n                      \" taking mean value]\\n\" ));\n        }\n      }\n\n      blue->flags = 0;\n      if ( AF_CJK_IS_TOP_BLUE( bs ) )\n        blue->flags |= AF_CJK_BLUE_TOP;\n\n      FT_TRACE5(( \"    -> reference = %ld\\n\"\n                  \"       overshoot = %ld\\n\",\n                  *blue_ref, *blue_shoot ));\n    }\n\n    FT_TRACE5(( \"\\n\" ));\n\n    return;\n  }\n\n\n  /* Basically the Latin version with type AF_CJKMetrics for metrics. */\n\n  FT_LOCAL_DEF( void )\n  af_cjk_metrics_check_digits( AF_CJKMetrics  metrics,\n                               FT_Face        face )\n  {\n    FT_UInt   i;\n    FT_Bool   started = 0, same_width = 1;\n    FT_Fixed  advance, old_advance = 0;\n\n\n    /* digit `0' is 0x30 in all supported charmaps */\n    for ( i = 0x30; i <= 0x39; i++ )\n    {\n      FT_ULong  glyph_index;\n      FT_Long   y_offset;\n\n\n      af_get_char_index( &metrics->root, i, &glyph_index, &y_offset );\n      if ( glyph_index == 0 )\n        continue;\n\n      if ( FT_Get_Advance( face, glyph_index,\n                           FT_LOAD_NO_SCALE         |\n                           FT_LOAD_NO_HINTING       |\n                           FT_LOAD_IGNORE_TRANSFORM,\n                           &advance ) )\n        continue;\n\n      if ( started )\n      {\n        if ( advance != old_advance )\n        {\n          same_width = 0;\n          break;\n        }\n      }\n      else\n      {\n        old_advance = advance;\n        started     = 1;\n      }\n    }\n\n    metrics->root.digits_have_same_width = same_width;\n  }\n\n\n  /* Initialize global metrics. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_cjk_metrics_init( AF_CJKMetrics  metrics,\n                       FT_Face        face )\n  {\n    FT_CharMap  oldmap = face->charmap;\n\n\n    metrics->units_per_em = face->units_per_EM;\n\n    if ( !FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )\n    {\n      af_cjk_metrics_init_widths( metrics, face );\n      af_cjk_metrics_init_blues( metrics, face );\n      af_cjk_metrics_check_digits( metrics, face );\n    }\n\n    FT_Set_Charmap( face, oldmap );\n    return FT_Err_Ok;\n  }\n\n\n  /* Adjust scaling value, then scale and shift widths   */\n  /* and blue zones (if applicable) for given dimension. */\n\n  static void\n  af_cjk_metrics_scale_dim( AF_CJKMetrics  metrics,\n                            AF_Scaler      scaler,\n                            AF_Dimension   dim )\n  {\n    FT_Fixed    scale;\n    FT_Pos      delta;\n    AF_CJKAxis  axis;\n    FT_UInt     nn;\n\n\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      scale = scaler->x_scale;\n      delta = scaler->x_delta;\n    }\n    else\n    {\n      scale = scaler->y_scale;\n      delta = scaler->y_delta;\n    }\n\n    axis = &metrics->axis[dim];\n\n    if ( axis->org_scale == scale && axis->org_delta == delta )\n      return;\n\n    axis->org_scale = scale;\n    axis->org_delta = delta;\n\n    axis->scale = scale;\n    axis->delta = delta;\n\n    /* scale the blue zones */\n    for ( nn = 0; nn < axis->blue_count; nn++ )\n    {\n      AF_CJKBlue  blue = &axis->blues[nn];\n      FT_Pos      dist;\n\n\n      blue->ref.cur   = FT_MulFix( blue->ref.org, scale ) + delta;\n      blue->ref.fit   = blue->ref.cur;\n      blue->shoot.cur = FT_MulFix( blue->shoot.org, scale ) + delta;\n      blue->shoot.fit = blue->shoot.cur;\n      blue->flags    &= ~AF_CJK_BLUE_ACTIVE;\n\n      /* a blue zone is only active if it is less than 3/4 pixels tall */\n      dist = FT_MulFix( blue->ref.org - blue->shoot.org, scale );\n      if ( dist <= 48 && dist >= -48 )\n      {\n        FT_Pos  delta1, delta2;\n\n\n        blue->ref.fit  = FT_PIX_ROUND( blue->ref.cur );\n\n        /* shoot is under shoot for cjk */\n        delta1 = FT_DivFix( blue->ref.fit, scale ) - blue->shoot.org;\n        delta2 = delta1;\n        if ( delta1 < 0 )\n          delta2 = -delta2;\n\n        delta2 = FT_MulFix( delta2, scale );\n\n        FT_TRACE5(( \"delta: %d\", delta1 ));\n        if ( delta2 < 32 )\n          delta2 = 0;\n#if 0\n        else if ( delta2 < 64 )\n          delta2 = 32 + ( ( ( delta2 - 32 ) + 16 ) & ~31 );\n#endif\n        else\n          delta2 = FT_PIX_ROUND( delta2 );\n        FT_TRACE5(( \"/%d\\n\", delta2 ));\n\n        if ( delta1 < 0 )\n          delta2 = -delta2;\n\n        blue->shoot.fit = blue->ref.fit - delta2;\n\n        FT_TRACE5(( \">> active cjk blue zone %c%d[%ld/%ld]:\\n\"\n                    \"     ref:   cur=%.2f fit=%.2f\\n\"\n                    \"     shoot: cur=%.2f fit=%.2f\\n\",\n                    ( dim == AF_DIMENSION_HORZ ) ? 'H' : 'V',\n                    nn, blue->ref.org, blue->shoot.org,\n                    blue->ref.cur / 64.0, blue->ref.fit / 64.0,\n                    blue->shoot.cur / 64.0, blue->shoot.fit / 64.0 ));\n\n        blue->flags |= AF_CJK_BLUE_ACTIVE;\n      }\n    }\n  }\n\n\n  /* Scale global values in both directions. */\n\n  FT_LOCAL_DEF( void )\n  af_cjk_metrics_scale( AF_CJKMetrics  metrics,\n                        AF_Scaler      scaler )\n  {\n    /* we copy the whole structure since the x and y scaling values */\n    /* are not modified, contrary to e.g. the `latin' auto-hinter   */\n    metrics->root.scaler = *scaler;\n\n    af_cjk_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ );\n    af_cjk_metrics_scale_dim( metrics, scaler, AF_DIMENSION_VERT );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****              C J K   G L Y P H   A N A L Y S I S              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* Walk over all contours and compute its segments. */\n\n  static FT_Error\n  af_cjk_hints_compute_segments( AF_GlyphHints  hints,\n                                 AF_Dimension   dim )\n  {\n    AF_AxisHints  axis          = &hints->axis[dim];\n    AF_Segment    segments      = axis->segments;\n    AF_Segment    segment_limit = segments + axis->num_segments;\n    FT_Error      error;\n    AF_Segment    seg;\n\n\n    error = af_latin_hints_compute_segments( hints, dim );\n    if ( error )\n      return error;\n\n    /* a segment is round if it doesn't have successive */\n    /* on-curve points.                                 */\n    for ( seg = segments; seg < segment_limit; seg++ )\n    {\n      AF_Point  pt   = seg->first;\n      AF_Point  last = seg->last;\n      AF_Flags  f0   = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );\n      AF_Flags  f1;\n\n\n      seg->flags &= ~AF_EDGE_ROUND;\n\n      for ( ; pt != last; f0 = f1 )\n      {\n        pt = pt->next;\n        f1 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );\n\n        if ( !f0 && !f1 )\n          break;\n\n        if ( pt == last )\n          seg->flags |= AF_EDGE_ROUND;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  static void\n  af_cjk_hints_link_segments( AF_GlyphHints  hints,\n                              AF_Dimension   dim )\n  {\n    AF_AxisHints  axis          = &hints->axis[dim];\n    AF_Segment    segments      = axis->segments;\n    AF_Segment    segment_limit = segments + axis->num_segments;\n    AF_Direction  major_dir     = axis->major_dir;\n    AF_Segment    seg1, seg2;\n    FT_Pos        len_threshold;\n    FT_Pos        dist_threshold;\n\n\n    len_threshold = AF_LATIN_CONSTANT( hints->metrics, 8 );\n\n    dist_threshold = ( dim == AF_DIMENSION_HORZ ) ? hints->x_scale\n                                                  : hints->y_scale;\n    dist_threshold = FT_DivFix( 64 * 3, dist_threshold );\n\n    /* now compare each segment to the others */\n    for ( seg1 = segments; seg1 < segment_limit; seg1++ )\n    {\n      if ( seg1->dir != major_dir )\n        continue;\n\n      for ( seg2 = segments; seg2 < segment_limit; seg2++ )\n        if ( seg2 != seg1 && seg1->dir + seg2->dir == 0 )\n        {\n          FT_Pos  dist = seg2->pos - seg1->pos;\n\n\n          if ( dist < 0 )\n            continue;\n\n          {\n            FT_Pos  min = seg1->min_coord;\n            FT_Pos  max = seg1->max_coord;\n            FT_Pos  len;\n\n\n            if ( min < seg2->min_coord )\n              min = seg2->min_coord;\n\n            if ( max > seg2->max_coord )\n              max = seg2->max_coord;\n\n            len = max - min;\n            if ( len >= len_threshold )\n            {\n              if ( dist * 8 < seg1->score * 9                        &&\n                   ( dist * 8 < seg1->score * 7 || seg1->len < len ) )\n              {\n                seg1->score = dist;\n                seg1->len   = len;\n                seg1->link  = seg2;\n              }\n\n              if ( dist * 8 < seg2->score * 9                        &&\n                   ( dist * 8 < seg2->score * 7 || seg2->len < len ) )\n              {\n                seg2->score = dist;\n                seg2->len   = len;\n                seg2->link  = seg1;\n              }\n            }\n          }\n        }\n    }\n\n    /*\n     *  now compute the `serif' segments\n     *\n     *  In Hanzi, some strokes are wider on one or both of the ends.\n     *  We either identify the stems on the ends as serifs or remove\n     *  the linkage, depending on the length of the stems.\n     *\n     */\n\n    {\n      AF_Segment  link1, link2;\n\n\n      for ( seg1 = segments; seg1 < segment_limit; seg1++ )\n      {\n        link1 = seg1->link;\n        if ( !link1 || link1->link != seg1 || link1->pos <= seg1->pos )\n          continue;\n\n        if ( seg1->score >= dist_threshold )\n          continue;\n\n        for ( seg2 = segments; seg2 < segment_limit; seg2++ )\n        {\n          if ( seg2->pos > seg1->pos || seg1 == seg2 )\n            continue;\n\n          link2 = seg2->link;\n          if ( !link2 || link2->link != seg2 || link2->pos < link1->pos )\n            continue;\n\n          if ( seg1->pos == seg2->pos && link1->pos == link2->pos )\n            continue;\n\n          if ( seg2->score <= seg1->score || seg1->score * 4 <= seg2->score )\n            continue;\n\n          /* seg2 < seg1 < link1 < link2 */\n\n          if ( seg1->len >= seg2->len * 3 )\n          {\n            AF_Segment  seg;\n\n\n            for ( seg = segments; seg < segment_limit; seg++ )\n            {\n              AF_Segment  link = seg->link;\n\n\n              if ( link == seg2 )\n              {\n                seg->link  = 0;\n                seg->serif = link1;\n              }\n              else if ( link == link2 )\n              {\n                seg->link  = 0;\n                seg->serif = seg1;\n              }\n            }\n          }\n          else\n          {\n            seg1->link = link1->link = 0;\n\n            break;\n          }\n        }\n      }\n    }\n\n    for ( seg1 = segments; seg1 < segment_limit; seg1++ )\n    {\n      seg2 = seg1->link;\n\n      if ( seg2 )\n      {\n        seg2->num_linked++;\n        if ( seg2->link != seg1 )\n        {\n          seg1->link = 0;\n\n          if ( seg2->score < dist_threshold || seg1->score < seg2->score * 4 )\n            seg1->serif = seg2->link;\n          else\n            seg2->num_linked--;\n        }\n      }\n    }\n  }\n\n\n  static FT_Error\n  af_cjk_hints_compute_edges( AF_GlyphHints  hints,\n                              AF_Dimension   dim )\n  {\n    AF_AxisHints  axis   = &hints->axis[dim];\n    FT_Error      error  = FT_Err_Ok;\n    FT_Memory     memory = hints->memory;\n    AF_CJKAxis    laxis  = &((AF_CJKMetrics)hints->metrics)->axis[dim];\n\n    AF_Segment    segments      = axis->segments;\n    AF_Segment    segment_limit = segments + axis->num_segments;\n    AF_Segment    seg;\n\n    FT_Fixed      scale;\n    FT_Pos        edge_distance_threshold;\n\n\n    axis->num_edges = 0;\n\n    scale = ( dim == AF_DIMENSION_HORZ ) ? hints->x_scale\n                                         : hints->y_scale;\n\n    /*********************************************************************/\n    /*                                                                   */\n    /* We begin by generating a sorted table of edges for the current    */\n    /* direction.  To do so, we simply scan each segment and try to find */\n    /* an edge in our table that corresponds to its position.            */\n    /*                                                                   */\n    /* If no edge is found, we create and insert a new edge in the       */\n    /* sorted table.  Otherwise, we simply add the segment to the edge's */\n    /* list which is then processed in the second step to compute the    */\n    /* edge's properties.                                                */\n    /*                                                                   */\n    /* Note that the edges table is sorted along the segment/edge        */\n    /* position.                                                         */\n    /*                                                                   */\n    /*********************************************************************/\n\n    edge_distance_threshold = FT_MulFix( laxis->edge_distance_threshold,\n                                         scale );\n    if ( edge_distance_threshold > 64 / 4 )\n      edge_distance_threshold = FT_DivFix( 64 / 4, scale );\n    else\n      edge_distance_threshold = laxis->edge_distance_threshold;\n\n    for ( seg = segments; seg < segment_limit; seg++ )\n    {\n      AF_Edge  found = NULL;\n      FT_Pos   best  = 0xFFFFU;\n      FT_Int   ee;\n\n\n      /* look for an edge corresponding to the segment */\n      for ( ee = 0; ee < axis->num_edges; ee++ )\n      {\n        AF_Edge  edge = axis->edges + ee;\n        FT_Pos   dist;\n\n\n        if ( edge->dir != seg->dir )\n          continue;\n\n        dist = seg->pos - edge->fpos;\n        if ( dist < 0 )\n          dist = -dist;\n\n        if ( dist < edge_distance_threshold && dist < best )\n        {\n          AF_Segment  link = seg->link;\n\n\n          /* check whether all linked segments of the candidate edge */\n          /* can make a single edge.                                 */\n          if ( link )\n          {\n            AF_Segment  seg1  = edge->first;\n            FT_Pos      dist2 = 0;\n\n\n            do\n            {\n              AF_Segment  link1 = seg1->link;\n\n\n              if ( link1 )\n              {\n                dist2 = AF_SEGMENT_DIST( link, link1 );\n                if ( dist2 >= edge_distance_threshold )\n                  break;\n              }\n\n            } while ( ( seg1 = seg1->edge_next ) != edge->first );\n\n            if ( dist2 >= edge_distance_threshold )\n              continue;\n          }\n\n          best  = dist;\n          found = edge;\n        }\n      }\n\n      if ( !found )\n      {\n        AF_Edge  edge;\n\n\n        /* insert a new edge in the list and */\n        /* sort according to the position    */\n        error = af_axis_hints_new_edge( axis, seg->pos,\n                                        (AF_Direction)seg->dir,\n                                        memory, &edge );\n        if ( error )\n          goto Exit;\n\n        /* add the segment to the new edge's list */\n        FT_ZERO( edge );\n\n        edge->first    = seg;\n        edge->last     = seg;\n        edge->dir      = seg->dir;\n        edge->fpos     = seg->pos;\n        edge->opos     = FT_MulFix( seg->pos, scale );\n        edge->pos      = edge->opos;\n        seg->edge_next = seg;\n      }\n      else\n      {\n        /* if an edge was found, simply add the segment to the edge's */\n        /* list                                                       */\n        seg->edge_next         = found->first;\n        found->last->edge_next = seg;\n        found->last            = seg;\n      }\n    }\n\n    /******************************************************************/\n    /*                                                                */\n    /* Good, we now compute each edge's properties according to the   */\n    /* segments found on its position.  Basically, these are          */\n    /*                                                                */\n    /*  - the edge's main direction                                   */\n    /*  - stem edge, serif edge or both (which defaults to stem then) */\n    /*  - rounded edge, straight or both (which defaults to straight) */\n    /*  - link for edge                                               */\n    /*                                                                */\n    /******************************************************************/\n\n    /* first of all, set the `edge' field in each segment -- this is */\n    /* required in order to compute edge links                       */\n\n    /*\n     * Note that removing this loop and setting the `edge' field of each\n     * segment directly in the code above slows down execution speed for\n     * some reasons on platforms like the Sun.\n     */\n    {\n      AF_Edge  edges      = axis->edges;\n      AF_Edge  edge_limit = edges + axis->num_edges;\n      AF_Edge  edge;\n\n\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        seg = edge->first;\n        if ( seg )\n          do\n          {\n            seg->edge = edge;\n            seg       = seg->edge_next;\n\n          } while ( seg != edge->first );\n      }\n\n      /* now compute each edge properties */\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        FT_Int  is_round    = 0;  /* does it contain round segments?    */\n        FT_Int  is_straight = 0;  /* does it contain straight segments? */\n\n\n        seg = edge->first;\n\n        do\n        {\n          FT_Bool  is_serif;\n\n\n          /* check for roundness of segment */\n          if ( seg->flags & AF_EDGE_ROUND )\n            is_round++;\n          else\n            is_straight++;\n\n          /* check for links -- if seg->serif is set, then seg->link must */\n          /* be ignored                                                   */\n          is_serif = (FT_Bool)( seg->serif && seg->serif->edge != edge );\n\n          if ( seg->link || is_serif )\n          {\n            AF_Edge     edge2;\n            AF_Segment  seg2;\n\n\n            edge2 = edge->link;\n            seg2  = seg->link;\n\n            if ( is_serif )\n            {\n              seg2  = seg->serif;\n              edge2 = edge->serif;\n            }\n\n            if ( edge2 )\n            {\n              FT_Pos  edge_delta;\n              FT_Pos  seg_delta;\n\n\n              edge_delta = edge->fpos - edge2->fpos;\n              if ( edge_delta < 0 )\n                edge_delta = -edge_delta;\n\n              seg_delta = AF_SEGMENT_DIST( seg, seg2 );\n\n              if ( seg_delta < edge_delta )\n                edge2 = seg2->edge;\n            }\n            else\n              edge2 = seg2->edge;\n\n            if ( is_serif )\n            {\n              edge->serif   = edge2;\n              edge2->flags |= AF_EDGE_SERIF;\n            }\n            else\n              edge->link  = edge2;\n          }\n\n          seg = seg->edge_next;\n\n        } while ( seg != edge->first );\n\n        /* set the round/straight flags */\n        edge->flags = AF_EDGE_NORMAL;\n\n        if ( is_round > 0 && is_round >= is_straight )\n          edge->flags |= AF_EDGE_ROUND;\n\n        /* get rid of serifs if link is set                 */\n        /* XXX: This gets rid of many unpleasant artefacts! */\n        /*      Example: the `c' in cour.pfa at size 13     */\n\n        if ( edge->serif && edge->link )\n          edge->serif = 0;\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* Detect segments and edges for given dimension. */\n\n  static FT_Error\n  af_cjk_hints_detect_features( AF_GlyphHints  hints,\n                                AF_Dimension   dim )\n  {\n    FT_Error  error;\n\n\n    error = af_cjk_hints_compute_segments( hints, dim );\n    if ( !error )\n    {\n      af_cjk_hints_link_segments( hints, dim );\n\n      error = af_cjk_hints_compute_edges( hints, dim );\n    }\n    return error;\n  }\n\n\n  /* Compute all edges which lie within blue zones. */\n\n  FT_LOCAL_DEF( void )\n  af_cjk_hints_compute_blue_edges( AF_GlyphHints  hints,\n                                   AF_CJKMetrics  metrics,\n                                   AF_Dimension   dim )\n  {\n    AF_AxisHints  axis       = &hints->axis[dim];\n    AF_Edge       edge       = axis->edges;\n    AF_Edge       edge_limit = edge + axis->num_edges;\n    AF_CJKAxis    cjk        = &metrics->axis[dim];\n    FT_Fixed      scale      = cjk->scale;\n    FT_Pos        best_dist0;  /* initial threshold */\n\n\n    /* compute the initial threshold as a fraction of the EM size */\n    best_dist0 = FT_MulFix( metrics->units_per_em / 40, scale );\n\n    if ( best_dist0 > 64 / 2 ) /* maximum 1/2 pixel */\n      best_dist0 = 64 / 2;\n\n    /* compute which blue zones are active, i.e. have their scaled */\n    /* size < 3/4 pixels                                           */\n\n    /* If the distant between an edge and a blue zone is shorter than */\n    /* best_dist0, set the blue zone for the edge.  Then search for   */\n    /* the blue zone with the smallest best_dist to the edge.         */\n\n    for ( ; edge < edge_limit; edge++ )\n    {\n      FT_UInt   bb;\n      AF_Width  best_blue = NULL;\n      FT_Pos    best_dist = best_dist0;\n\n\n      for ( bb = 0; bb < cjk->blue_count; bb++ )\n      {\n        AF_CJKBlue  blue = cjk->blues + bb;\n        FT_Bool     is_top_right_blue, is_major_dir;\n\n\n        /* skip inactive blue zones (i.e., those that are too small) */\n        if ( !( blue->flags & AF_CJK_BLUE_ACTIVE ) )\n          continue;\n\n        /* if it is a top zone, check for right edges -- if it is a bottom */\n        /* zone, check for left edges                                      */\n        /*                                                                 */\n        /* of course, that's for TrueType                                  */\n        is_top_right_blue =\n          (FT_Byte)( ( blue->flags & AF_CJK_BLUE_TOP ) != 0 );\n        is_major_dir =\n          FT_BOOL( edge->dir == axis->major_dir );\n\n        /* if it is a top zone, the edge must be against the major    */\n        /* direction; if it is a bottom zone, it must be in the major */\n        /* direction                                                  */\n        if ( is_top_right_blue ^ is_major_dir )\n        {\n          FT_Pos    dist;\n          AF_Width  compare;\n\n\n          /* Compare the edge to the closest blue zone type */\n          if ( FT_ABS( edge->fpos - blue->ref.org ) >\n               FT_ABS( edge->fpos - blue->shoot.org ) )\n            compare = &blue->shoot;\n          else\n            compare = &blue->ref;\n\n          dist = edge->fpos - compare->org;\n          if ( dist < 0 )\n            dist = -dist;\n\n          dist = FT_MulFix( dist, scale );\n          if ( dist < best_dist )\n          {\n            best_dist = dist;\n            best_blue = compare;\n          }\n        }\n      }\n\n      if ( best_blue )\n        edge->blue_edge = best_blue;\n    }\n  }\n\n\n  /* Initalize hinting engine. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_cjk_hints_init( AF_GlyphHints  hints,\n                     AF_CJKMetrics  metrics )\n  {\n    FT_Render_Mode  mode;\n    FT_UInt32       scaler_flags, other_flags;\n\n\n    af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );\n\n    /*\n     *  correct x_scale and y_scale when needed, since they may have\n     *  been modified af_cjk_scale_dim above\n     */\n    hints->x_scale = metrics->axis[AF_DIMENSION_HORZ].scale;\n    hints->x_delta = metrics->axis[AF_DIMENSION_HORZ].delta;\n    hints->y_scale = metrics->axis[AF_DIMENSION_VERT].scale;\n    hints->y_delta = metrics->axis[AF_DIMENSION_VERT].delta;\n\n    /* compute flags depending on render mode, etc. */\n    mode = metrics->root.scaler.render_mode;\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n    if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )\n      metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;\n#endif\n\n    scaler_flags = hints->scaler_flags;\n    other_flags  = 0;\n\n    /*\n     *  We snap the width of vertical stems for the monochrome and\n     *  horizontal LCD rendering targets only.\n     */\n    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )\n      other_flags |= AF_LATIN_HINTS_HORZ_SNAP;\n\n    /*\n     *  We snap the width of horizontal stems for the monochrome and\n     *  vertical LCD rendering targets only.\n     */\n    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )\n      other_flags |= AF_LATIN_HINTS_VERT_SNAP;\n\n    /*\n     *  We adjust stems to full pixels only if we don't use the `light' mode.\n     */\n    if ( mode != FT_RENDER_MODE_LIGHT )\n      other_flags |= AF_LATIN_HINTS_STEM_ADJUST;\n\n    if ( mode == FT_RENDER_MODE_MONO )\n      other_flags |= AF_LATIN_HINTS_MONO;\n\n    scaler_flags |= AF_SCALER_FLAG_NO_ADVANCE;\n\n    hints->scaler_flags = scaler_flags;\n    hints->other_flags  = other_flags;\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****          C J K   G L Y P H   G R I D - F I T T I N G          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* Snap a given width in scaled coordinates to one of the */\n  /* current standard widths.                               */\n\n  static FT_Pos\n  af_cjk_snap_width( AF_Width  widths,\n                     FT_Int    count,\n                     FT_Pos    width )\n  {\n    int     n;\n    FT_Pos  best      = 64 + 32 + 2;\n    FT_Pos  reference = width;\n    FT_Pos  scaled;\n\n\n    for ( n = 0; n < count; n++ )\n    {\n      FT_Pos  w;\n      FT_Pos  dist;\n\n\n      w = widths[n].cur;\n      dist = width - w;\n      if ( dist < 0 )\n        dist = -dist;\n      if ( dist < best )\n      {\n        best      = dist;\n        reference = w;\n      }\n    }\n\n    scaled = FT_PIX_ROUND( reference );\n\n    if ( width >= reference )\n    {\n      if ( width < scaled + 48 )\n        width = reference;\n    }\n    else\n    {\n      if ( width > scaled - 48 )\n        width = reference;\n    }\n\n    return width;\n  }\n\n\n  /* Compute the snapped width of a given stem.                          */\n  /* There is a lot of voodoo in this function; changing the hard-coded  */\n  /* parameters influence the whole hinting process.                     */\n\n  static FT_Pos\n  af_cjk_compute_stem_width( AF_GlyphHints  hints,\n                             AF_Dimension   dim,\n                             FT_Pos         width,\n                             AF_Edge_Flags  base_flags,\n                             AF_Edge_Flags  stem_flags )\n  {\n    AF_CJKMetrics  metrics  = (AF_CJKMetrics)hints->metrics;\n    AF_CJKAxis     axis     = &metrics->axis[dim];\n    FT_Pos         dist     = width;\n    FT_Int         sign     = 0;\n    FT_Bool        vertical = FT_BOOL( dim == AF_DIMENSION_VERT );\n\n    FT_UNUSED( base_flags );\n    FT_UNUSED( stem_flags );\n\n\n    if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) )\n      return width;\n\n    if ( dist < 0 )\n    {\n      dist = -width;\n      sign = 1;\n    }\n\n    if ( (  vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) ||\n         ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) )\n    {\n      /* smooth hinting process: very lightly quantize the stem width */\n\n      if ( axis->width_count > 0 )\n      {\n        if ( FT_ABS( dist - axis->widths[0].cur ) < 40 )\n        {\n          dist = axis->widths[0].cur;\n          if ( dist < 48 )\n            dist = 48;\n\n          goto Done_Width;\n        }\n      }\n\n      if ( dist < 54 )\n        dist += ( 54 - dist ) / 2 ;\n      else if ( dist < 3 * 64 )\n      {\n        FT_Pos  delta;\n\n\n        delta  = dist & 63;\n        dist  &= -64;\n\n        if ( delta < 10 )\n          dist += delta;\n        else if ( delta < 22 )\n          dist += 10;\n        else if ( delta < 42 )\n          dist += delta;\n        else if ( delta < 54 )\n          dist += 54;\n        else\n          dist += delta;\n      }\n    }\n    else\n    {\n      /* strong hinting process: snap the stem width to integer pixels */\n\n      dist = af_cjk_snap_width( axis->widths, axis->width_count, dist );\n\n      if ( vertical )\n      {\n        /* in the case of vertical hinting, always round */\n        /* the stem heights to integer pixels            */\n\n        if ( dist >= 64 )\n          dist = ( dist + 16 ) & ~63;\n        else\n          dist = 64;\n      }\n      else\n      {\n        if ( AF_LATIN_HINTS_DO_MONO( hints ) )\n        {\n          /* monochrome horizontal hinting: snap widths to integer pixels */\n          /* with a different threshold                                   */\n\n          if ( dist < 64 )\n            dist = 64;\n          else\n            dist = ( dist + 32 ) & ~63;\n        }\n        else\n        {\n          /* for horizontal anti-aliased hinting, we adopt a more subtle */\n          /* approach: we strengthen small stems, round stems whose size */\n          /* is between 1 and 2 pixels to an integer, otherwise nothing  */\n\n          if ( dist < 48 )\n            dist = ( dist + 64 ) >> 1;\n\n          else if ( dist < 128 )\n            dist = ( dist + 22 ) & ~63;\n          else\n            /* round otherwise to prevent color fringes in LCD mode */\n            dist = ( dist + 32 ) & ~63;\n        }\n      }\n    }\n\n  Done_Width:\n    if ( sign )\n      dist = -dist;\n\n    return dist;\n  }\n\n\n  /* Align one stem edge relative to the previous stem edge. */\n\n  static void\n  af_cjk_align_linked_edge( AF_GlyphHints  hints,\n                            AF_Dimension   dim,\n                            AF_Edge        base_edge,\n                            AF_Edge        stem_edge )\n  {\n    FT_Pos  dist = stem_edge->opos - base_edge->opos;\n\n    FT_Pos  fitted_width = af_cjk_compute_stem_width(\n                             hints, dim, dist,\n                             (AF_Edge_Flags)base_edge->flags,\n                             (AF_Edge_Flags)stem_edge->flags );\n\n\n    stem_edge->pos = base_edge->pos + fitted_width;\n\n    FT_TRACE5(( \"  CJKLINK: edge %d @%d (opos=%.2f) linked to %.2f,\"\n                \" dist was %.2f, now %.2f\\n\",\n                stem_edge - hints->axis[dim].edges, stem_edge->fpos,\n                stem_edge->opos / 64.0, stem_edge->pos / 64.0,\n                dist / 64.0, fitted_width / 64.0 ));\n  }\n\n\n  /* Shift the coordinates of the `serif' edge by the same amount */\n  /* as the corresponding `base' edge has been moved already.     */\n\n  static void\n  af_cjk_align_serif_edge( AF_GlyphHints  hints,\n                           AF_Edge        base,\n                           AF_Edge        serif )\n  {\n    FT_UNUSED( hints );\n\n    serif->pos = base->pos + ( serif->opos - base->opos );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                    E D G E   H I N T I N G                      ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n#define AF_LIGHT_MODE_MAX_HORZ_GAP    9\n#define AF_LIGHT_MODE_MAX_VERT_GAP   15\n#define AF_LIGHT_MODE_MAX_DELTA_ABS  14\n\n\n  static FT_Pos\n  af_hint_normal_stem( AF_GlyphHints  hints,\n                       AF_Edge        edge,\n                       AF_Edge        edge2,\n                       FT_Pos         anchor,\n                       AF_Dimension   dim )\n  {\n    FT_Pos  org_len, cur_len, org_center;\n    FT_Pos  cur_pos1, cur_pos2;\n    FT_Pos  d_off1, u_off1, d_off2, u_off2, delta;\n    FT_Pos  offset;\n    FT_Pos  threshold = 64;\n\n\n    if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) )\n    {\n      if ( ( edge->flags  & AF_EDGE_ROUND ) &&\n           ( edge2->flags & AF_EDGE_ROUND ) )\n      {\n        if ( dim == AF_DIMENSION_VERT )\n          threshold = 64 - AF_LIGHT_MODE_MAX_HORZ_GAP;\n        else\n          threshold = 64 - AF_LIGHT_MODE_MAX_VERT_GAP;\n      }\n      else\n      {\n        if ( dim == AF_DIMENSION_VERT )\n          threshold = 64 - AF_LIGHT_MODE_MAX_HORZ_GAP / 3;\n        else\n          threshold = 64 - AF_LIGHT_MODE_MAX_VERT_GAP / 3;\n      }\n    }\n\n    org_len    = edge2->opos - edge->opos;\n    cur_len    = af_cjk_compute_stem_width( hints, dim, org_len,\n                                            (AF_Edge_Flags)edge->flags,\n                                            (AF_Edge_Flags)edge2->flags );\n\n    org_center = ( edge->opos + edge2->opos ) / 2 + anchor;\n    cur_pos1   = org_center - cur_len / 2;\n    cur_pos2   = cur_pos1 + cur_len;\n    d_off1     = cur_pos1 - FT_PIX_FLOOR( cur_pos1 );\n    d_off2     = cur_pos2 - FT_PIX_FLOOR( cur_pos2 );\n    u_off1     = 64 - d_off1;\n    u_off2     = 64 - d_off2;\n    delta      = 0;\n\n\n    if ( d_off1 == 0 || d_off2 == 0 )\n      goto Exit;\n\n    if ( cur_len <= threshold )\n    {\n      if ( d_off2 < cur_len )\n      {\n        if ( u_off1 <= d_off2 )\n          delta =  u_off1;\n        else\n          delta = -d_off2;\n      }\n\n      goto Exit;\n    }\n\n    if ( threshold < 64 )\n    {\n      if ( d_off1 >= threshold || u_off1 >= threshold ||\n           d_off2 >= threshold || u_off2 >= threshold )\n        goto Exit;\n    }\n\n    offset = cur_len & 63;\n\n    if ( offset < 32 )\n    {\n      if ( u_off1 <= offset || d_off2 <= offset )\n        goto Exit;\n    }\n    else\n      offset = 64 - threshold;\n\n    d_off1 = threshold - u_off1;\n    u_off1 = u_off1    - offset;\n    u_off2 = threshold - d_off2;\n    d_off2 = d_off2    - offset;\n\n    if ( d_off1 <= u_off1 )\n      u_off1 = -d_off1;\n\n    if ( d_off2 <= u_off2 )\n      u_off2 = -d_off2;\n\n    if ( FT_ABS( u_off1 ) <= FT_ABS( u_off2 ) )\n      delta = u_off1;\n    else\n      delta = u_off2;\n\n  Exit:\n\n#if 1\n    if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) )\n    {\n      if ( delta > AF_LIGHT_MODE_MAX_DELTA_ABS )\n        delta = AF_LIGHT_MODE_MAX_DELTA_ABS;\n      else if ( delta < -AF_LIGHT_MODE_MAX_DELTA_ABS )\n        delta = -AF_LIGHT_MODE_MAX_DELTA_ABS;\n    }\n#endif\n\n    cur_pos1 += delta;\n\n    if ( edge->opos < edge2->opos )\n    {\n      edge->pos  = cur_pos1;\n      edge2->pos = cur_pos1 + cur_len;\n    }\n    else\n    {\n      edge->pos  = cur_pos1 + cur_len;\n      edge2->pos = cur_pos1;\n    }\n\n    return delta;\n  }\n\n\n  /* The main grid-fitting routine. */\n\n  static void\n  af_cjk_hint_edges( AF_GlyphHints  hints,\n                     AF_Dimension   dim )\n  {\n    AF_AxisHints  axis       = &hints->axis[dim];\n    AF_Edge       edges      = axis->edges;\n    AF_Edge       edge_limit = edges + axis->num_edges;\n    FT_PtrDist    n_edges;\n    AF_Edge       edge;\n    AF_Edge       anchor   = 0;\n    FT_Pos        delta    = 0;\n    FT_Int        skipped  = 0;\n    FT_Bool       has_last_stem = FALSE;\n    FT_Pos        last_stem_pos = 0;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    FT_UInt       num_actions = 0;\n#endif\n\n\n    FT_TRACE5(( \"cjk %s edge hinting (style `%s')\\n\",\n                dim == AF_DIMENSION_VERT ? \"horizontal\" : \"vertical\",\n                af_style_names[hints->metrics->style_class->style] ));\n\n    /* we begin by aligning all stems relative to the blue zone */\n\n    if ( AF_HINTS_DO_BLUES( hints ) )\n    {\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        AF_Width  blue;\n        AF_Edge   edge1, edge2;\n\n\n        if ( edge->flags & AF_EDGE_DONE )\n          continue;\n\n        blue  = edge->blue_edge;\n        edge1 = NULL;\n        edge2 = edge->link;\n\n        if ( blue )\n        {\n          edge1 = edge;\n        }\n        else if ( edge2 && edge2->blue_edge )\n        {\n          blue  = edge2->blue_edge;\n          edge1 = edge2;\n          edge2 = edge;\n        }\n\n        if ( !edge1 )\n          continue;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        FT_TRACE5(( \"  CJKBLUE: edge %d @%d (opos=%.2f) snapped to %.2f,\"\n                    \" was %.2f\\n\",\n                    edge1 - edges, edge1->fpos, edge1->opos / 64.0,\n                    blue->fit / 64.0, edge1->pos / 64.0 ));\n\n        num_actions++;\n#endif\n\n        edge1->pos    = blue->fit;\n        edge1->flags |= AF_EDGE_DONE;\n\n        if ( edge2 && !edge2->blue_edge )\n        {\n          af_cjk_align_linked_edge( hints, dim, edge1, edge2 );\n          edge2->flags |= AF_EDGE_DONE;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n          num_actions++;\n#endif\n        }\n\n        if ( !anchor )\n          anchor = edge;\n      }\n    }\n\n    /* now we align all stem edges. */\n    for ( edge = edges; edge < edge_limit; edge++ )\n    {\n      AF_Edge  edge2;\n\n\n      if ( edge->flags & AF_EDGE_DONE )\n        continue;\n\n      /* skip all non-stem edges */\n      edge2 = edge->link;\n      if ( !edge2 )\n      {\n        skipped++;\n        continue;\n      }\n\n      /* Some CJK characters have so many stems that\n       * the hinter is likely to merge two adjacent ones.\n       * To solve this problem, if either edge of a stem\n       * is too close to the previous one, we avoid\n       * aligning the two edges, but rather interpolate\n       * their locations at the end of this function in\n       * order to preserve the space between the stems.\n       */\n      if ( has_last_stem                       &&\n           ( edge->pos  < last_stem_pos + 64 ||\n             edge2->pos < last_stem_pos + 64 ) )\n      {\n        skipped++;\n        continue;\n      }\n\n      /* now align the stem */\n\n      /* this should not happen, but it's better to be safe */\n      if ( edge2->blue_edge )\n      {\n        FT_TRACE5(( \"ASSERTION FAILED for edge %d\\n\", edge2-edges ));\n\n        af_cjk_align_linked_edge( hints, dim, edge2, edge );\n        edge->flags |= AF_EDGE_DONE;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        num_actions++;\n#endif\n\n        continue;\n      }\n\n      if ( edge2 < edge )\n      {\n        af_cjk_align_linked_edge( hints, dim, edge2, edge );\n        edge->flags |= AF_EDGE_DONE;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        num_actions++;\n#endif\n\n        /* We rarely reaches here it seems;\n         * usually the two edges belonging\n         * to one stem are marked as DONE together\n         */\n        has_last_stem = TRUE;\n        last_stem_pos = edge->pos;\n        continue;\n      }\n\n      if ( dim != AF_DIMENSION_VERT && !anchor )\n      {\n\n#if 0\n        if ( fixedpitch )\n        {\n          AF_Edge     left  = edge;\n          AF_Edge     right = edge_limit - 1;\n          AF_EdgeRec  left1, left2, right1, right2;\n          FT_Pos      target, center1, center2;\n          FT_Pos      delta1, delta2, d1, d2;\n\n\n          while ( right > left && !right->link )\n            right--;\n\n          left1  = *left;\n          left2  = *left->link;\n          right1 = *right->link;\n          right2 = *right;\n\n          delta  = ( ( ( hinter->pp2.x + 32 ) & -64 ) - hinter->pp2.x ) / 2;\n          target = left->opos + ( right->opos - left->opos ) / 2 + delta - 16;\n\n          delta1  = delta;\n          delta1 += af_hint_normal_stem( hints, left, left->link,\n                                         delta1, 0 );\n\n          if ( left->link != right )\n            af_hint_normal_stem( hints, right->link, right, delta1, 0 );\n\n          center1 = left->pos + ( right->pos - left->pos ) / 2;\n\n          if ( center1 >= target )\n            delta2 = delta - 32;\n          else\n            delta2 = delta + 32;\n\n          delta2 += af_hint_normal_stem( hints, &left1, &left2, delta2, 0 );\n\n          if ( delta1 != delta2 )\n          {\n            if ( left->link != right )\n              af_hint_normal_stem( hints, &right1, &right2, delta2, 0 );\n\n            center2 = left1.pos + ( right2.pos - left1.pos ) / 2;\n\n            d1 = center1 - target;\n            d2 = center2 - target;\n\n            if ( FT_ABS( d2 ) < FT_ABS( d1 ) )\n            {\n              left->pos       = left1.pos;\n              left->link->pos = left2.pos;\n\n              if ( left->link != right )\n              {\n                right->link->pos = right1.pos;\n                right->pos       = right2.pos;\n              }\n\n              delta1 = delta2;\n            }\n          }\n\n          delta               = delta1;\n          right->link->flags |= AF_EDGE_DONE;\n          right->flags       |= AF_EDGE_DONE;\n        }\n        else\n\n#endif /* 0 */\n\n          delta = af_hint_normal_stem( hints, edge, edge2, 0,\n                                       AF_DIMENSION_HORZ );\n      }\n      else\n        af_hint_normal_stem( hints, edge, edge2, delta, dim );\n\n#if 0\n      printf( \"stem (%d,%d) adjusted (%.1f,%.1f)\\n\",\n               edge - edges, edge2 - edges,\n               ( edge->pos - edge->opos ) / 64.0,\n               ( edge2->pos - edge2->opos ) / 64.0 );\n#endif\n\n      anchor = edge;\n      edge->flags  |= AF_EDGE_DONE;\n      edge2->flags |= AF_EDGE_DONE;\n      has_last_stem = TRUE;\n      last_stem_pos = edge2->pos;\n    }\n\n    /* make sure that lowercase m's maintain their symmetry */\n\n    /* In general, lowercase m's have six vertical edges if they are sans */\n    /* serif, or twelve if they are with serifs.  This implementation is  */\n    /* based on that assumption, and seems to work very well with most    */\n    /* faces.  However, if for a certain face this assumption is not      */\n    /* true, the m is just rendered like before.  In addition, any stem   */\n    /* correction will only be applied to symmetrical glyphs (even if the */\n    /* glyph is not an m), so the potential for unwanted distortion is    */\n    /* relatively low.                                                    */\n\n    /* We don't handle horizontal edges since we can't easily assure that */\n    /* the third (lowest) stem aligns with the base line; it might end up */\n    /* one pixel higher or lower.                                         */\n\n    n_edges = edge_limit - edges;\n    if ( dim == AF_DIMENSION_HORZ && ( n_edges == 6 || n_edges == 12 ) )\n    {\n      AF_Edge  edge1, edge2, edge3;\n      FT_Pos   dist1, dist2, span;\n\n\n      if ( n_edges == 6 )\n      {\n        edge1 = edges;\n        edge2 = edges + 2;\n        edge3 = edges + 4;\n      }\n      else\n      {\n        edge1 = edges + 1;\n        edge2 = edges + 5;\n        edge3 = edges + 9;\n      }\n\n      dist1 = edge2->opos - edge1->opos;\n      dist2 = edge3->opos - edge2->opos;\n\n      span = dist1 - dist2;\n      if ( span < 0 )\n        span = -span;\n\n      if ( edge1->link == edge1 + 1 &&\n           edge2->link == edge2 + 1 &&\n           edge3->link == edge3 + 1 && span < 8 )\n      {\n        delta = edge3->pos - ( 2 * edge2->pos - edge1->pos );\n        edge3->pos -= delta;\n        if ( edge3->link )\n          edge3->link->pos -= delta;\n\n        /* move the serifs along with the stem */\n        if ( n_edges == 12 )\n        {\n          ( edges + 8 )->pos -= delta;\n          ( edges + 11 )->pos -= delta;\n        }\n\n        edge3->flags |= AF_EDGE_DONE;\n        if ( edge3->link )\n          edge3->link->flags |= AF_EDGE_DONE;\n      }\n    }\n\n    if ( !skipped )\n      goto Exit;\n\n    /*\n     *  now hint the remaining edges (serifs and single) in order\n     *  to complete our processing\n     */\n    for ( edge = edges; edge < edge_limit; edge++ )\n    {\n      if ( edge->flags & AF_EDGE_DONE )\n        continue;\n\n      if ( edge->serif )\n      {\n        af_cjk_align_serif_edge( hints, edge->serif, edge );\n        edge->flags |= AF_EDGE_DONE;\n        skipped--;\n      }\n    }\n\n    if ( !skipped )\n      goto Exit;\n\n    for ( edge = edges; edge < edge_limit; edge++ )\n    {\n      AF_Edge  before, after;\n\n\n      if ( edge->flags & AF_EDGE_DONE )\n        continue;\n\n      before = after = edge;\n\n      while ( --before >= edges )\n        if ( before->flags & AF_EDGE_DONE )\n          break;\n\n      while ( ++after < edge_limit )\n        if ( after->flags & AF_EDGE_DONE )\n          break;\n\n      if ( before >= edges || after < edge_limit )\n      {\n        if ( before < edges )\n          af_cjk_align_serif_edge( hints, after, edge );\n        else if ( after >= edge_limit )\n          af_cjk_align_serif_edge( hints, before, edge );\n        else\n        {\n          if ( after->fpos == before->fpos )\n            edge->pos = before->pos;\n          else\n            edge->pos = before->pos +\n                        FT_MulDiv( edge->fpos - before->fpos,\n                                   after->pos - before->pos,\n                                   after->fpos - before->fpos );\n        }\n      }\n    }\n\n  Exit:\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    if ( !num_actions )\n      FT_TRACE5(( \"  (none)\\n\" ));\n    FT_TRACE5(( \"\\n\" ));\n#endif\n\n    return;\n  }\n\n\n  static void\n  af_cjk_align_edge_points( AF_GlyphHints  hints,\n                            AF_Dimension   dim )\n  {\n    AF_AxisHints  axis       = & hints->axis[dim];\n    AF_Edge       edges      = axis->edges;\n    AF_Edge       edge_limit = edges + axis->num_edges;\n    AF_Edge       edge;\n    FT_Bool       snapping;\n\n\n    snapping = FT_BOOL( ( dim == AF_DIMENSION_HORZ             &&\n                          AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) )  ||\n                        ( dim == AF_DIMENSION_VERT             &&\n                          AF_LATIN_HINTS_DO_VERT_SNAP( hints ) )  );\n\n    for ( edge = edges; edge < edge_limit; edge++ )\n    {\n      /* move the points of each segment     */\n      /* in each edge to the edge's position */\n      AF_Segment  seg = edge->first;\n\n\n      if ( snapping )\n      {\n        do\n        {\n          AF_Point  point = seg->first;\n\n\n          for (;;)\n          {\n            if ( dim == AF_DIMENSION_HORZ )\n            {\n              point->x      = edge->pos;\n              point->flags |= AF_FLAG_TOUCH_X;\n            }\n            else\n            {\n              point->y      = edge->pos;\n              point->flags |= AF_FLAG_TOUCH_Y;\n            }\n\n            if ( point == seg->last )\n              break;\n\n            point = point->next;\n          }\n\n          seg = seg->edge_next;\n\n        } while ( seg != edge->first );\n      }\n      else\n      {\n        FT_Pos  delta = edge->pos - edge->opos;\n\n\n        do\n        {\n          AF_Point  point = seg->first;\n\n\n          for (;;)\n          {\n            if ( dim == AF_DIMENSION_HORZ )\n            {\n              point->x     += delta;\n              point->flags |= AF_FLAG_TOUCH_X;\n            }\n            else\n            {\n              point->y     += delta;\n              point->flags |= AF_FLAG_TOUCH_Y;\n            }\n\n            if ( point == seg->last )\n              break;\n\n            point = point->next;\n          }\n\n          seg = seg->edge_next;\n\n        } while ( seg != edge->first );\n      }\n    }\n  }\n\n\n  /* Apply the complete hinting algorithm to a CJK glyph. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_cjk_hints_apply( AF_GlyphHints  hints,\n                      FT_Outline*    outline,\n                      AF_CJKMetrics  metrics )\n  {\n    FT_Error  error;\n    int       dim;\n\n    FT_UNUSED( metrics );\n\n\n    error = af_glyph_hints_reload( hints, outline );\n    if ( error )\n      goto Exit;\n\n    /* analyze glyph outline */\n    if ( AF_HINTS_DO_HORIZONTAL( hints ) )\n    {\n      error = af_cjk_hints_detect_features( hints, AF_DIMENSION_HORZ );\n      if ( error )\n        goto Exit;\n\n      af_cjk_hints_compute_blue_edges( hints, metrics, AF_DIMENSION_HORZ );\n    }\n\n    if ( AF_HINTS_DO_VERTICAL( hints ) )\n    {\n      error = af_cjk_hints_detect_features( hints, AF_DIMENSION_VERT );\n      if ( error )\n        goto Exit;\n\n      af_cjk_hints_compute_blue_edges( hints, metrics, AF_DIMENSION_VERT );\n    }\n\n    /* grid-fit the outline */\n    for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n    {\n      if ( ( dim == AF_DIMENSION_HORZ && AF_HINTS_DO_HORIZONTAL( hints ) ) ||\n           ( dim == AF_DIMENSION_VERT && AF_HINTS_DO_VERTICAL( hints ) )   )\n      {\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n        if ( dim == AF_DIMENSION_HORZ                                  &&\n             metrics->root.scaler.render_mode == FT_RENDER_MODE_NORMAL )\n        {\n          AF_WarperRec  warper;\n          FT_Fixed      scale;\n          FT_Pos        delta;\n\n\n          af_warper_compute( &warper, hints, (AF_Dimension)dim,\n                             &scale, &delta );\n          af_glyph_hints_scale_dim( hints, (AF_Dimension)dim,\n                                    scale, delta );\n          continue;\n        }\n#endif /* AF_CONFIG_OPTION_USE_WARPER */\n\n        af_cjk_hint_edges( hints, (AF_Dimension)dim );\n        af_cjk_align_edge_points( hints, (AF_Dimension)dim );\n        af_glyph_hints_align_strong_points( hints, (AF_Dimension)dim );\n        af_glyph_hints_align_weak_points( hints, (AF_Dimension)dim );\n      }\n    }\n\n#if 0\n    af_glyph_hints_dump_points( hints );\n    af_glyph_hints_dump_segments( hints );\n    af_glyph_hints_dump_edges( hints );\n#endif\n\n    af_glyph_hints_save( hints, outline );\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                C J K   S C R I P T   C L A S S                *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  AF_DEFINE_WRITING_SYSTEM_CLASS(\n    af_cjk_writing_system_class,\n\n    AF_WRITING_SYSTEM_CJK,\n\n    sizeof ( AF_CJKMetricsRec ),\n\n    (AF_WritingSystem_InitMetricsFunc) af_cjk_metrics_init,\n    (AF_WritingSystem_ScaleMetricsFunc)af_cjk_metrics_scale,\n    (AF_WritingSystem_DoneMetricsFunc) NULL,\n\n    (AF_WritingSystem_InitHintsFunc)   af_cjk_hints_init,\n    (AF_WritingSystem_ApplyHintsFunc)  af_cjk_hints_apply\n  )\n\n\n#else /* !AF_CONFIG_OPTION_CJK */\n\n\n  AF_DEFINE_WRITING_SYSTEM_CLASS(\n    af_cjk_writing_system_class,\n\n    AF_WRITING_SYSTEM_CJK,\n\n    sizeof ( AF_CJKMetricsRec ),\n\n    (AF_WritingSystem_InitMetricsFunc) NULL,\n    (AF_WritingSystem_ScaleMetricsFunc)NULL,\n    (AF_WritingSystem_DoneMetricsFunc) NULL,\n\n    (AF_WritingSystem_InitHintsFunc)   NULL,\n    (AF_WritingSystem_ApplyHintsFunc)  NULL\n  )\n\n\n#endif /* !AF_CONFIG_OPTION_CJK */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afcjk.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afcjk.h                                                                */\n/*                                                                         */\n/*    Auto-fitter hinting routines for CJK writing system (specification). */\n/*                                                                         */\n/*  Copyright 2006, 2007, 2011-2014 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFCJK_H__\n#define __AFCJK_H__\n\n#include \"afhints.h\"\n#include \"aflatin.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /* the CJK-specific writing system */\n\n  AF_DECLARE_WRITING_SYSTEM_CLASS( af_cjk_writing_system_class )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****              C J K   G L O B A L   M E T R I C S              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*\n   *  CJK glyphs tend to fill the square.  So we have both vertical and\n   *  horizontal blue zones.  But some glyphs have flat bounding strokes that\n   *  leave some space between neighbour glyphs.\n   */\n\n#define AF_CJK_IS_TOP_BLUE( b ) \\\n          ( (b)->properties & AF_BLUE_PROPERTY_CJK_TOP )\n#define AF_CJK_IS_HORIZ_BLUE( b ) \\\n          ( (b)->properties & AF_BLUE_PROPERTY_CJK_HORIZ )\n#define AF_CJK_IS_RIGHT_BLUE  AF_CJK_IS_TOP_BLUE\n\n#define AF_CJK_MAX_WIDTHS  16\n\n\n  enum\n  {\n    AF_CJK_BLUE_ACTIVE     = 1 << 0,  /* set if zone height is <= 3/4px */\n    AF_CJK_BLUE_TOP        = 1 << 1,  /* result of AF_CJK_IS_TOP_BLUE   */\n    AF_CJK_BLUE_ADJUSTMENT = 1 << 2,  /* used for scale adjustment      */\n                                      /* optimization                   */\n    AF_CJK_BLUE_FLAG_MAX\n  };\n\n\n  typedef struct  AF_CJKBlueRec_\n  {\n    AF_WidthRec  ref;\n    AF_WidthRec  shoot; /* undershoot */\n    FT_UInt      flags;\n\n  } AF_CJKBlueRec, *AF_CJKBlue;\n\n\n  typedef struct  AF_CJKAxisRec_\n  {\n    FT_Fixed       scale;\n    FT_Pos         delta;\n\n    FT_UInt        width_count;                   /* number of used widths */\n    AF_WidthRec    widths[AF_CJK_MAX_WIDTHS];     /* widths array          */\n    FT_Pos         edge_distance_threshold;     /* used for creating edges */\n    FT_Pos         standard_width;           /* the default stem thickness */\n    FT_Bool        extra_light;           /* is standard width very light? */\n\n    /* used for horizontal metrics too for CJK */\n    FT_Bool        control_overshoot;\n    FT_UInt        blue_count;\n    AF_CJKBlueRec  blues[AF_BLUE_STRINGSET_MAX];\n\n    FT_Fixed       org_scale;\n    FT_Pos         org_delta;\n\n  } AF_CJKAxisRec, *AF_CJKAxis;\n\n\n  typedef struct  AF_CJKMetricsRec_\n  {\n    AF_StyleMetricsRec  root;\n    FT_UInt             units_per_em;\n    AF_CJKAxisRec       axis[AF_DIMENSION_MAX];\n\n  } AF_CJKMetricsRec, *AF_CJKMetrics;\n\n\n#ifdef AF_CONFIG_OPTION_CJK\n  FT_LOCAL( FT_Error )\n  af_cjk_metrics_init( AF_CJKMetrics  metrics,\n                       FT_Face        face );\n\n  FT_LOCAL( void )\n  af_cjk_metrics_scale( AF_CJKMetrics  metrics,\n                        AF_Scaler      scaler );\n\n  FT_LOCAL( FT_Error )\n  af_cjk_hints_init( AF_GlyphHints  hints,\n                     AF_CJKMetrics  metrics );\n\n  FT_LOCAL( FT_Error )\n  af_cjk_hints_apply( AF_GlyphHints  hints,\n                      FT_Outline*    outline,\n                      AF_CJKMetrics  metrics );\n\n  /* shared; called from afindic.c */\n  FT_LOCAL( void )\n  af_cjk_metrics_check_digits( AF_CJKMetrics  metrics,\n                               FT_Face        face );\n\n  FT_LOCAL( void )\n  af_cjk_metrics_init_widths( AF_CJKMetrics  metrics,\n                              FT_Face        face );\n#endif /* AF_CONFIG_OPTION_CJK */\n\n\n/* */\n\nFT_END_HEADER\n\n#endif /* __AFCJK_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afcover.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afcover.h                                                              */\n/*                                                                         */\n/*    Auto-fitter coverages (specification only).                          */\n/*                                                                         */\n/*  Copyright 2013, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /* This header file can be included multiple times. */\n  /* Define `COVERAGE' as needed.                     */\n\n\n  /* Add new coverages here.  The first and second arguments are the   */\n  /* coverage name in lowercase and uppercase, respectively, followed  */\n  /* by a description string.  The last four arguments are the four    */\n  /* characters defining the corresponding OpenType feature.           */\n\n#if 0\n  /* XXX: It's not possible to define blue zone characters in advance. */\n  COVERAGE( alternative_fractions, ALTERNATIVE_FRACTIONS,\n            \"alternative fractions\",\n            'a', 'f', 'r', 'c' )\n#endif\n\n  COVERAGE( petite_capitals_from_capitals, PETITE_CAPITALS_FROM_CAPITALS,\n            \"petite capitals from capitals\",\n            'c', '2', 'c', 'p' )\n\n  COVERAGE( small_capitals_from_capitals, SMALL_CAPITALS_FROM_CAPITALS,\n            \"small capitals from capitals\",\n            'c', '2', 's', 'c' )\n\n#if 0\n  /* XXX: Only digits are in this coverage, however, both normal style */\n  /*      and oldstyle representation forms are possible.              */\n  COVERAGE( denominators, DENOMINATORS,\n            \"denominators\",\n            'd', 'n', 'o', 'm' )\n#endif\n\n#if 0\n  /* XXX: It's not possible to define blue zone characters in advance. */\n  COVERAGE( fractions, FRACTIONS,\n            \"fractions\",\n            'f', 'r', 'a', 'c' )\n#endif\n\n#if 0\n  /* XXX: Only digits are in this coverage, however, both normal style */\n  /*      and oldstyle representation forms are possible.              */\n  COVERAGE( numerators, NUMERATORS,\n            \"numerators\",\n            'n', 'u', 'm', 'r' )\n#endif\n\n  COVERAGE( ordinals, ORDINALS,\n            \"ordinals\",\n            'o', 'r', 'd', 'n' )\n\n  COVERAGE( petite_capitals, PETITE_CAPITALS,\n            \"petite capitals\",\n            'p', 'c', 'a', 'p' )\n\n  COVERAGE( ruby, RUBY,\n            \"ruby\",\n            'r', 'u', 'b', 'y' )\n\n  COVERAGE( scientific_inferiors, SCIENTIFIC_INFERIORS,\n            \"scientific inferiors\",\n            's', 'i', 'n', 'f' )\n\n  COVERAGE( small_capitals, SMALL_CAPITALS,\n            \"small capitals\",\n            's', 'm', 'c', 'p' )\n\n  COVERAGE( subscript, SUBSCRIPT,\n            \"subscript\",\n            's', 'u', 'b', 's' )\n\n  COVERAGE( superscript, SUPERSCRIPT,\n            \"superscript\",\n            's', 'u', 'p', 's' )\n\n  COVERAGE( titling, TITLING,\n            \"titling\",\n            't', 'i', 't', 'l' )\n\n#if 0\n  /* to be always excluded */\n  COVERAGE(nalt, 'n', 'a', 'l', 't'); /* Alternate Annotation Forms (?) */\n  COVERAGE(ornm, 'o', 'r', 'n', 'm'); /* Ornaments (?) */\n#endif\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afdummy.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afdummy.c                                                              */\n/*                                                                         */\n/*    Auto-fitter dummy routines to be used if no hinting should be        */\n/*    performed (body).                                                    */\n/*                                                                         */\n/*  Copyright 2003-2005, 2011, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"afdummy.h\"\n#include \"afhints.h\"\n#include \"aferrors.h\"\n\n\n  static FT_Error\n  af_dummy_hints_init( AF_GlyphHints    hints,\n                       AF_StyleMetrics  metrics )\n  {\n    af_glyph_hints_rescale( hints, metrics );\n\n    hints->x_scale = metrics->scaler.x_scale;\n    hints->y_scale = metrics->scaler.y_scale;\n    hints->x_delta = metrics->scaler.x_delta;\n    hints->y_delta = metrics->scaler.y_delta;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  af_dummy_hints_apply( AF_GlyphHints  hints,\n                        FT_Outline*    outline )\n  {\n    FT_Error  error;\n\n\n    error = af_glyph_hints_reload( hints, outline );\n    if ( !error )\n      af_glyph_hints_save( hints, outline );\n\n    return error;\n  }\n\n\n  AF_DEFINE_WRITING_SYSTEM_CLASS(\n    af_dummy_writing_system_class,\n\n    AF_WRITING_SYSTEM_DUMMY,\n\n    sizeof ( AF_StyleMetricsRec ),\n\n    (AF_WritingSystem_InitMetricsFunc) NULL,\n    (AF_WritingSystem_ScaleMetricsFunc)NULL,\n    (AF_WritingSystem_DoneMetricsFunc) NULL,\n\n    (AF_WritingSystem_InitHintsFunc)   af_dummy_hints_init,\n    (AF_WritingSystem_ApplyHintsFunc)  af_dummy_hints_apply\n  )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afdummy.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afdummy.h                                                              */\n/*                                                                         */\n/*    Auto-fitter dummy routines to be used if no hinting should be        */\n/*    performed (specification).                                           */\n/*                                                                         */\n/*  Copyright 2003-2005, 2011, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFDUMMY_H__\n#define __AFDUMMY_H__\n\n#include \"aftypes.h\"\n\n\nFT_BEGIN_HEADER\n\n  /* A dummy writing system used when no hinting should be performed. */\n\n  AF_DECLARE_WRITING_SYSTEM_CLASS( af_dummy_writing_system_class )\n\n/* */\n\nFT_END_HEADER\n\n\n#endif /* __AFDUMMY_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/aferrors.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  aferrors.h                                                             */\n/*                                                                         */\n/*    Autofitter error codes (specification only).                         */\n/*                                                                         */\n/*  Copyright 2005, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the Autofitter error enumeration          */\n  /* constants.                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __AFERRORS_H__\n#define __AFERRORS_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  AF_Err_\n#define FT_ERR_BASE    FT_Mod_Err_Autofit\n\n#include FT_ERRORS_H\n\n#endif /* __AFERRORS_H__ */\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afglobal.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afglobal.c                                                             */\n/*                                                                         */\n/*    Auto-fitter routines to compute global hinting values (body).        */\n/*                                                                         */\n/*  Copyright 2003-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"afglobal.h\"\n#include \"afranges.h\"\n#include \"hbshim.h\"\n#include FT_INTERNAL_DEBUG_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_afglobal\n\n\n  /* get writing system specific header files */\n#undef  WRITING_SYSTEM\n#define WRITING_SYSTEM( ws, WS )  /* empty */\n#include \"afwrtsys.h\"\n\n#include \"aferrors.h\"\n#include \"afpic.h\"\n\n\n#undef  SCRIPT\n#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \\\n          AF_DEFINE_SCRIPT_CLASS(           \\\n            af_ ## s ## _script_class,      \\\n            AF_SCRIPT_ ## S,                \\\n            af_ ## s ## _uniranges,         \\\n            sc1, sc2, sc3 )\n\n#include \"afscript.h\"\n\n\n#undef  STYLE\n#define STYLE( s, S, d, ws, sc, ss, c )  \\\n          AF_DEFINE_STYLE_CLASS(         \\\n            af_ ## s ## _style_class,    \\\n            AF_STYLE_ ## S,              \\\n            ws,                          \\\n            sc,                          \\\n            ss,                          \\\n            c )\n\n#include \"afstyles.h\"\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#undef  WRITING_SYSTEM\n#define WRITING_SYSTEM( ws, WS )               \\\n          &af_ ## ws ## _writing_system_class,\n\n  FT_LOCAL_ARRAY_DEF( AF_WritingSystemClass )\n  af_writing_system_classes[] =\n  {\n\n#include \"afwrtsys.h\"\n\n    NULL  /* do not remove */\n  };\n\n\n#undef  SCRIPT\n#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \\\n          &af_ ## s ## _script_class,\n\n  FT_LOCAL_ARRAY_DEF( AF_ScriptClass )\n  af_script_classes[] =\n  {\n\n#include \"afscript.h\"\n\n    NULL  /* do not remove */\n  };\n\n\n#undef  STYLE\n#define STYLE( s, S, d, ws, sc, ss, c ) \\\n          &af_ ## s ## _style_class,\n\n  FT_LOCAL_ARRAY_DEF( AF_StyleClass )\n  af_style_classes[] =\n  {\n\n#include \"afstyles.h\"\n\n    NULL  /* do not remove */\n  };\n\n#endif /* !FT_CONFIG_OPTION_PIC */\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n#undef  STYLE\n#define STYLE( s, S, d, ws, sc, ss, c )  #s,\n\n  FT_LOCAL_ARRAY_DEF( char* )\n  af_style_names[] =\n  {\n\n#include \"afstyles.h\"\n\n  };\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n\n  /* Compute the style index of each glyph within a given face. */\n\n  static FT_Error\n  af_face_globals_compute_style_coverage( AF_FaceGlobals  globals )\n  {\n    FT_Error    error;\n    FT_Face     face        = globals->face;\n    FT_CharMap  old_charmap = face->charmap;\n    FT_Byte*    gstyles     = globals->glyph_styles;\n    FT_UInt     ss;\n    FT_UInt     i;\n    FT_UInt     dflt        = ~0U; /* a non-valid value */\n\n\n    /* the value AF_STYLE_UNASSIGNED means `uncovered glyph' */\n    FT_MEM_SET( globals->glyph_styles,\n                AF_STYLE_UNASSIGNED,\n                globals->glyph_count );\n\n    error = FT_Select_Charmap( face, FT_ENCODING_UNICODE );\n    if ( error )\n    {\n      /*\n       * Ignore this error; we simply use the fallback style.\n       * XXX: Shouldn't we rather disable hinting?\n       */\n      error = FT_Err_Ok;\n      goto Exit;\n    }\n\n    /* scan each style in a Unicode charmap */\n    for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )\n    {\n      AF_StyleClass       style_class =\n                            AF_STYLE_CLASSES_GET[ss];\n      AF_ScriptClass      script_class =\n                            AF_SCRIPT_CLASSES_GET[style_class->script];\n      AF_Script_UniRange  range;\n\n\n      if ( script_class->script_uni_ranges == NULL )\n        continue;\n\n      /*\n       *  Scan all Unicode points in the range and set the corresponding\n       *  glyph style index.\n       */\n      if ( style_class->coverage == AF_COVERAGE_DEFAULT )\n      {\n        if ( (FT_UInt)style_class->script ==\n             globals->module->default_script )\n          dflt = ss;\n\n        for ( range = script_class->script_uni_ranges;\n              range->first != 0;\n              range++ )\n        {\n          FT_ULong  charcode = range->first;\n          FT_UInt   gindex;\n\n\n          gindex = FT_Get_Char_Index( face, charcode );\n\n          if ( gindex != 0                             &&\n               gindex < (FT_ULong)globals->glyph_count &&\n               gstyles[gindex] == AF_STYLE_UNASSIGNED  )\n            gstyles[gindex] = (FT_Byte)ss;\n\n          for (;;)\n          {\n            charcode = FT_Get_Next_Char( face, charcode, &gindex );\n\n            if ( gindex == 0 || charcode > range->last )\n              break;\n\n            if ( gindex < (FT_ULong)globals->glyph_count &&\n                 gstyles[gindex] == AF_STYLE_UNASSIGNED  )\n              gstyles[gindex] = (FT_Byte)ss;\n          }\n        }\n      }\n      else\n      {\n        /* get glyphs not directly addressable by cmap */\n        af_get_coverage( globals, style_class, gstyles );\n      }\n    }\n\n    /* handle the default OpenType features of the default script ... */\n    af_get_coverage( globals, AF_STYLE_CLASSES_GET[dflt], gstyles );\n\n    /* ... and the remaining default OpenType features */\n    for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )\n    {\n      AF_StyleClass  style_class = AF_STYLE_CLASSES_GET[ss];\n\n\n      if ( ss != dflt && style_class->coverage == AF_COVERAGE_DEFAULT )\n        af_get_coverage( globals, style_class, gstyles );\n    }\n\n    /* mark ASCII digits */\n    for ( i = 0x30; i <= 0x39; i++ )\n    {\n      FT_UInt  gindex = FT_Get_Char_Index( face, i );\n\n\n      if ( gindex != 0 && gindex < (FT_ULong)globals->glyph_count )\n        gstyles[gindex] |= AF_DIGIT;\n    }\n\n  Exit:\n    /*\n     *  By default, all uncovered glyphs are set to the fallback style.\n     *  XXX: Shouldn't we disable hinting or do something similar?\n     */\n    if ( globals->module->fallback_style != AF_STYLE_UNASSIGNED )\n    {\n      FT_Long  nn;\n\n\n      for ( nn = 0; nn < globals->glyph_count; nn++ )\n      {\n        if ( ( gstyles[nn] & ~AF_DIGIT ) == AF_STYLE_UNASSIGNED )\n        {\n          gstyles[nn] &= ~AF_STYLE_UNASSIGNED;\n          gstyles[nn] |= globals->module->fallback_style;\n        }\n      }\n    }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n    FT_TRACE4(( \"\\n\"\n                \"style coverage\\n\"\n                \"==============\\n\"\n                \"\\n\" ));\n\n    for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )\n    {\n      AF_StyleClass  style_class = AF_STYLE_CLASSES_GET[ss];\n      FT_UInt        count       = 0;\n      FT_Long        idx;\n\n\n      FT_TRACE4(( \"%s:\\n\", af_style_names[style_class->style] ));\n\n      for ( idx = 0; idx < globals->glyph_count; idx++ )\n      {\n        if ( ( gstyles[idx] & ~AF_DIGIT ) == style_class->style )\n        {\n          if ( !( count % 10 ) )\n            FT_TRACE4(( \" \" ));\n\n          FT_TRACE4(( \" %d\", idx ));\n          count++;\n\n          if ( !( count % 10 ) )\n            FT_TRACE4(( \"\\n\" ));\n        }\n      }\n\n      if ( !count )\n        FT_TRACE4(( \"  (none)\\n\" ));\n      if ( count % 10 )\n        FT_TRACE4(( \"\\n\" ));\n    }\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n    FT_Set_Charmap( face, old_charmap );\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  af_face_globals_new( FT_Face          face,\n                       AF_FaceGlobals  *aglobals,\n                       AF_Module        module )\n  {\n    FT_Error        error;\n    FT_Memory       memory;\n    AF_FaceGlobals  globals = NULL;\n\n\n    memory = face->memory;\n\n    if ( FT_ALLOC( globals, sizeof ( *globals ) +\n                            face->num_glyphs * sizeof ( FT_Byte ) ) )\n      goto Exit;\n\n    globals->face         = face;\n    globals->glyph_count  = face->num_glyphs;\n    globals->glyph_styles = (FT_Byte*)( globals + 1 );\n    globals->module       = module;\n\n#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ\n    globals->hb_font = hb_ft_font_create( face, NULL );\n#endif\n\n    error = af_face_globals_compute_style_coverage( globals );\n    if ( error )\n    {\n      af_face_globals_free( globals );\n      globals = NULL;\n    }\n    else\n      globals->increase_x_height = AF_PROP_INCREASE_X_HEIGHT_MAX;\n\n  Exit:\n    *aglobals = globals;\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  af_face_globals_free( AF_FaceGlobals  globals )\n  {\n    if ( globals )\n    {\n      FT_Memory  memory = globals->face->memory;\n      FT_UInt    nn;\n\n\n      for ( nn = 0; nn < AF_STYLE_MAX; nn++ )\n      {\n        if ( globals->metrics[nn] )\n        {\n          AF_StyleClass          style_class =\n            AF_STYLE_CLASSES_GET[nn];\n          AF_WritingSystemClass  writing_system_class =\n            AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system];\n\n\n          if ( writing_system_class->style_metrics_done )\n            writing_system_class->style_metrics_done( globals->metrics[nn] );\n\n          FT_FREE( globals->metrics[nn] );\n        }\n      }\n\n#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ\n      hb_font_destroy( globals->hb_font );\n      globals->hb_font = NULL;\n#endif\n\n      globals->glyph_count  = 0;\n      globals->glyph_styles = NULL;  /* no need to free this one! */\n      globals->face         = NULL;\n\n      FT_FREE( globals );\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  af_face_globals_get_metrics( AF_FaceGlobals    globals,\n                               FT_UInt           gindex,\n                               FT_UInt           options,\n                               AF_StyleMetrics  *ametrics )\n  {\n    AF_StyleMetrics  metrics = NULL;\n\n    AF_Style               style = (AF_Style)options;\n    AF_WritingSystemClass  writing_system_class;\n    AF_StyleClass          style_class;\n\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( gindex >= (FT_ULong)globals->glyph_count )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* if we have a forced style (via `options'), use it, */\n    /* otherwise look into `glyph_styles' array           */\n    if ( style == AF_STYLE_NONE_DFLT || style + 1 >= AF_STYLE_MAX )\n      style = (AF_Style)( globals->glyph_styles[gindex] &\n                          AF_STYLE_UNASSIGNED           );\n\n    style_class          = AF_STYLE_CLASSES_GET[style];\n    writing_system_class = AF_WRITING_SYSTEM_CLASSES_GET\n                             [style_class->writing_system];\n\n    metrics = globals->metrics[style];\n    if ( metrics == NULL )\n    {\n      /* create the global metrics object if necessary */\n      FT_Memory  memory = globals->face->memory;\n\n\n      if ( FT_ALLOC( metrics, writing_system_class->style_metrics_size ) )\n        goto Exit;\n\n      metrics->style_class = style_class;\n      metrics->globals     = globals;\n\n      if ( writing_system_class->style_metrics_init )\n      {\n        error = writing_system_class->style_metrics_init( metrics,\n                                                          globals->face );\n        if ( error )\n        {\n          if ( writing_system_class->style_metrics_done )\n            writing_system_class->style_metrics_done( metrics );\n\n          FT_FREE( metrics );\n          goto Exit;\n        }\n      }\n\n      globals->metrics[style] = metrics;\n    }\n\n  Exit:\n    *ametrics = metrics;\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  af_face_globals_is_digit( AF_FaceGlobals  globals,\n                            FT_UInt         gindex )\n  {\n    if ( gindex < (FT_ULong)globals->glyph_count )\n      return (FT_Bool)( globals->glyph_styles[gindex] & AF_DIGIT );\n\n    return (FT_Bool)0;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afglobal.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afglobal.h                                                             */\n/*                                                                         */\n/*    Auto-fitter routines to compute global hinting values                */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2003-2005, 2007, 2009, 2011-2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFGLOBAL_H__\n#define __AFGLOBAL_H__\n\n\n#include \"aftypes.h\"\n#include \"afmodule.h\"\n#include \"hbshim.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL_ARRAY( AF_WritingSystemClass )\n  af_writing_system_classes[];\n\n\n#undef  SCRIPT\n#define SCRIPT( s, S, d, h, sc1, sc2, sc3 )                    \\\n          AF_DECLARE_SCRIPT_CLASS( af_ ## s ## _script_class )\n\n#include \"afscript.h\"\n\n  FT_LOCAL_ARRAY( AF_ScriptClass )\n  af_script_classes[];\n\n\n#undef  STYLE\n#define STYLE( s, S, d, ws, sc, ss, c )                      \\\n          AF_DECLARE_STYLE_CLASS( af_ ## s ## _style_class )\n\n#include \"afstyles.h\"\n\n  FT_LOCAL_ARRAY( AF_StyleClass )\n  af_style_classes[];\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n  FT_LOCAL_ARRAY( char* )\n  af_style_names[];\n#endif\n\n\n  /*\n   *  Default values and flags for both autofitter globals (found in\n   *  AF_ModuleRec) and face globals (in AF_FaceGlobalsRec).\n   */\n\n  /* index of fallback style in `af_style_classes' */\n#ifdef AF_CONFIG_OPTION_CJK\n#define AF_STYLE_FALLBACK    AF_STYLE_HANI_DFLT\n#else\n#define AF_STYLE_FALLBACK    AF_STYLE_NONE_DFLT\n#endif\n  /* default script for OpenType; ignored if HarfBuzz isn't used */\n#define AF_SCRIPT_DEFAULT    AF_SCRIPT_LATN\n  /* a bit mask indicating an uncovered glyph        */\n#define AF_STYLE_UNASSIGNED  0x7F\n  /* if this flag is set, we have an ASCII digit     */\n#define AF_DIGIT             0x80\n\n  /* `increase-x-height' property */\n#define AF_PROP_INCREASE_X_HEIGHT_MIN  6\n#define AF_PROP_INCREASE_X_HEIGHT_MAX  0\n\n\n  /************************************************************************/\n  /************************************************************************/\n  /*****                                                              *****/\n  /*****                  F A C E   G L O B A L S                     *****/\n  /*****                                                              *****/\n  /************************************************************************/\n  /************************************************************************/\n\n\n  /*\n   *  Note that glyph_styles[] maps each glyph to an index into the\n   *  `af_style_classes' array.\n   *\n   */\n  typedef struct  AF_FaceGlobalsRec_\n  {\n    FT_Face          face;\n    FT_Long          glyph_count;    /* same as face->num_glyphs */\n    FT_Byte*         glyph_styles;\n\n#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ\n    hb_font_t*       hb_font;\n#endif\n\n    /* per-face auto-hinter properties */\n    FT_UInt          increase_x_height;\n\n    AF_StyleMetrics  metrics[AF_STYLE_MAX];\n\n    AF_Module        module;         /* to access global properties */\n\n  } AF_FaceGlobalsRec;\n\n\n  /*\n   *  model the global hints data for a given face, decomposed into\n   *  style-specific items\n   */\n\n  FT_LOCAL( FT_Error )\n  af_face_globals_new( FT_Face          face,\n                       AF_FaceGlobals  *aglobals,\n                       AF_Module        module );\n\n  FT_LOCAL( FT_Error )\n  af_face_globals_get_metrics( AF_FaceGlobals    globals,\n                               FT_UInt           gindex,\n                               FT_UInt           options,\n                               AF_StyleMetrics  *ametrics );\n\n  FT_LOCAL( void )\n  af_face_globals_free( AF_FaceGlobals  globals );\n\n  FT_LOCAL_DEF( FT_Bool )\n  af_face_globals_is_digit( AF_FaceGlobals  globals,\n                            FT_UInt         gindex );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __AFGLOBAL_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afhints.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afhints.c                                                              */\n/*                                                                         */\n/*    Auto-fitter hinting routines (body).                                 */\n/*                                                                         */\n/*  Copyright 2003-2007, 2009-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"afhints.h\"\n#include \"aferrors.h\"\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_DEBUG_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_afhints\n\n\n  /* Get new segment for given axis. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_axis_hints_new_segment( AF_AxisHints  axis,\n                             FT_Memory     memory,\n                             AF_Segment   *asegment )\n  {\n    FT_Error    error   = FT_Err_Ok;\n    AF_Segment  segment = NULL;\n\n\n    if ( axis->num_segments >= axis->max_segments )\n    {\n      FT_Int  old_max = axis->max_segments;\n      FT_Int  new_max = old_max;\n      FT_Int  big_max = (FT_Int)( FT_INT_MAX / sizeof ( *segment ) );\n\n\n      if ( old_max >= big_max )\n      {\n        error = FT_THROW( Out_Of_Memory );\n        goto Exit;\n      }\n\n      new_max += ( new_max >> 2 ) + 4;\n      if ( new_max < old_max || new_max > big_max )\n        new_max = big_max;\n\n      if ( FT_RENEW_ARRAY( axis->segments, old_max, new_max ) )\n        goto Exit;\n\n      axis->max_segments = new_max;\n    }\n\n    segment = axis->segments + axis->num_segments++;\n\n  Exit:\n    *asegment = segment;\n    return error;\n  }\n\n\n  /* Get new edge for given axis, direction, and position, */\n  /* without initializing the edge itself.                 */\n\n  FT_LOCAL( FT_Error )\n  af_axis_hints_new_edge( AF_AxisHints  axis,\n                          FT_Int        fpos,\n                          AF_Direction  dir,\n                          FT_Memory     memory,\n                          AF_Edge      *anedge )\n  {\n    FT_Error  error = FT_Err_Ok;\n    AF_Edge   edge  = NULL;\n    AF_Edge   edges;\n\n\n    if ( axis->num_edges >= axis->max_edges )\n    {\n      FT_Int  old_max = axis->max_edges;\n      FT_Int  new_max = old_max;\n      FT_Int  big_max = (FT_Int)( FT_INT_MAX / sizeof ( *edge ) );\n\n\n      if ( old_max >= big_max )\n      {\n        error = FT_THROW( Out_Of_Memory );\n        goto Exit;\n      }\n\n      new_max += ( new_max >> 2 ) + 4;\n      if ( new_max < old_max || new_max > big_max )\n        new_max = big_max;\n\n      if ( FT_RENEW_ARRAY( axis->edges, old_max, new_max ) )\n        goto Exit;\n\n      axis->max_edges = new_max;\n    }\n\n    edges = axis->edges;\n    edge  = edges + axis->num_edges;\n\n    while ( edge > edges )\n    {\n      if ( edge[-1].fpos < fpos )\n        break;\n\n      /* we want the edge with same position and minor direction */\n      /* to appear before those in the major one in the list     */\n      if ( edge[-1].fpos == fpos && dir == axis->major_dir )\n        break;\n\n      edge[0] = edge[-1];\n      edge--;\n    }\n\n    axis->num_edges++;\n\n  Exit:\n    *anedge = edge;\n    return error;\n  }\n\n\n#ifdef FT_DEBUG_AUTOFIT\n\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n  /* The dump functions are used in the `ftgrid' demo program, too. */\n#define AF_DUMP( varformat )          \\\n          do                          \\\n          {                           \\\n            if ( to_stdout )          \\\n              printf varformat;       \\\n            else                      \\\n              FT_TRACE7( varformat ); \\\n          } while ( 0 )\n\n\n  static const char*\n  af_dir_str( AF_Direction  dir )\n  {\n    const char*  result;\n\n\n    switch ( dir )\n    {\n    case AF_DIR_UP:\n      result = \"up\";\n      break;\n    case AF_DIR_DOWN:\n      result = \"down\";\n      break;\n    case AF_DIR_LEFT:\n      result = \"left\";\n      break;\n    case AF_DIR_RIGHT:\n      result = \"right\";\n      break;\n    default:\n      result = \"none\";\n    }\n\n    return result;\n  }\n\n\n#define AF_INDEX_NUM( ptr, base )  (int)( (ptr) ? ( (ptr) - (base) ) : -1 )\n\n\n#ifdef __cplusplus\n  extern \"C\" {\n#endif\n  void\n  af_glyph_hints_dump_points( AF_GlyphHints  hints,\n                              FT_Bool        to_stdout )\n  {\n    AF_Point  points = hints->points;\n    AF_Point  limit  = points + hints->num_points;\n    AF_Point  point;\n\n\n    AF_DUMP(( \"Table of points:\\n\"\n              \"  [ index |  xorg |  yorg | xscale | yscale\"\n              \" |  xfit |  yfit |  flags ]\\n\" ));\n\n    for ( point = points; point < limit; point++ )\n      AF_DUMP(( \"  [ %5d | %5d | %5d | %6.2f | %6.2f\"\n                \" | %5.2f | %5.2f | %c ]\\n\",\n                AF_INDEX_NUM( point, points ),\n                point->fx,\n                point->fy,\n                point->ox / 64.0,\n                point->oy / 64.0,\n                point->x / 64.0,\n                point->y / 64.0,\n                ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ? 'w' : ' '));\n    AF_DUMP(( \"\\n\" ));\n  }\n#ifdef __cplusplus\n  }\n#endif\n\n\n  static const char*\n  af_edge_flags_to_string( AF_Edge_Flags  flags )\n  {\n    static char  temp[32];\n    int          pos = 0;\n\n\n    if ( flags & AF_EDGE_ROUND )\n    {\n      ft_memcpy( temp + pos, \"round\", 5 );\n      pos += 5;\n    }\n    if ( flags & AF_EDGE_SERIF )\n    {\n      if ( pos > 0 )\n        temp[pos++] = ' ';\n      ft_memcpy( temp + pos, \"serif\", 5 );\n      pos += 5;\n    }\n    if ( pos == 0 )\n      return \"normal\";\n\n    temp[pos] = '\\0';\n\n    return temp;\n  }\n\n\n  /* Dump the array of linked segments. */\n\n#ifdef __cplusplus\n  extern \"C\" {\n#endif\n  void\n  af_glyph_hints_dump_segments( AF_GlyphHints  hints,\n                                FT_Bool        to_stdout )\n  {\n    FT_Int  dimension;\n\n\n    for ( dimension = 1; dimension >= 0; dimension-- )\n    {\n      AF_AxisHints  axis     = &hints->axis[dimension];\n      AF_Point      points   = hints->points;\n      AF_Edge       edges    = axis->edges;\n      AF_Segment    segments = axis->segments;\n      AF_Segment    limit    = segments + axis->num_segments;\n      AF_Segment    seg;\n\n\n      AF_DUMP(( \"Table of %s segments:\\n\",\n                dimension == AF_DIMENSION_HORZ ? \"vertical\"\n                                               : \"horizontal\" ));\n      if ( axis->num_segments )\n        AF_DUMP(( \"  [ index |  pos  |  dir  | from\"\n                  \" |  to  | link | serif | edge\"\n                  \" | height | extra |    flags    ]\\n\" ));\n      else\n        AF_DUMP(( \"  (none)\\n\" ));\n\n      for ( seg = segments; seg < limit; seg++ )\n        AF_DUMP(( \"  [ %5d | %5.2g | %5s | %4d\"\n                  \" | %4d | %4d | %5d | %4d\"\n                  \" | %6d | %5d | %11s ]\\n\",\n                  AF_INDEX_NUM( seg, segments ),\n                  dimension == AF_DIMENSION_HORZ\n                               ? (int)seg->first->ox / 64.0\n                               : (int)seg->first->oy / 64.0,\n                  af_dir_str( (AF_Direction)seg->dir ),\n                  AF_INDEX_NUM( seg->first, points ),\n                  AF_INDEX_NUM( seg->last, points ),\n                  AF_INDEX_NUM( seg->link, segments ),\n                  AF_INDEX_NUM( seg->serif, segments ),\n                  AF_INDEX_NUM( seg->edge, edges ),\n                  seg->height,\n                  seg->height - ( seg->max_coord - seg->min_coord ),\n                  af_edge_flags_to_string( (AF_Edge_Flags)seg->flags ) ));\n      AF_DUMP(( \"\\n\" ));\n    }\n  }\n#ifdef __cplusplus\n  }\n#endif\n\n\n  /* Fetch number of segments. */\n\n#ifdef __cplusplus\n  extern \"C\" {\n#endif\n  FT_Error\n  af_glyph_hints_get_num_segments( AF_GlyphHints  hints,\n                                   FT_Int         dimension,\n                                   FT_Int*        num_segments )\n  {\n    AF_Dimension  dim;\n    AF_AxisHints  axis;\n\n\n    dim = ( dimension == 0 ) ? AF_DIMENSION_HORZ : AF_DIMENSION_VERT;\n\n    axis          = &hints->axis[dim];\n    *num_segments = axis->num_segments;\n\n    return FT_Err_Ok;\n  }\n#ifdef __cplusplus\n  }\n#endif\n\n\n  /* Fetch offset of segments into user supplied offset array. */\n\n#ifdef __cplusplus\n  extern \"C\" {\n#endif\n  FT_Error\n  af_glyph_hints_get_segment_offset( AF_GlyphHints  hints,\n                                     FT_Int         dimension,\n                                     FT_Int         idx,\n                                     FT_Pos        *offset,\n                                     FT_Bool       *is_blue,\n                                     FT_Pos        *blue_offset )\n  {\n    AF_Dimension  dim;\n    AF_AxisHints  axis;\n    AF_Segment    seg;\n\n\n    if ( !offset )\n      return FT_THROW( Invalid_Argument );\n\n    dim = ( dimension == 0 ) ? AF_DIMENSION_HORZ : AF_DIMENSION_VERT;\n\n    axis = &hints->axis[dim];\n\n    if ( idx < 0 || idx >= axis->num_segments )\n      return FT_THROW( Invalid_Argument );\n\n    seg      = &axis->segments[idx];\n    *offset  = ( dim == AF_DIMENSION_HORZ ) ? seg->first->ox\n                                            : seg->first->oy;\n    if ( seg->edge )\n      *is_blue = (FT_Bool)( seg->edge->blue_edge != 0 );\n    else\n      *is_blue = FALSE;\n\n    if ( *is_blue )\n      *blue_offset = seg->edge->blue_edge->cur;\n    else\n      *blue_offset = 0;\n\n    return FT_Err_Ok;\n  }\n#ifdef __cplusplus\n  }\n#endif\n\n\n  /* Dump the array of linked edges. */\n\n#ifdef __cplusplus\n  extern \"C\" {\n#endif\n  void\n  af_glyph_hints_dump_edges( AF_GlyphHints  hints,\n                             FT_Bool        to_stdout )\n  {\n    FT_Int  dimension;\n\n\n    for ( dimension = 1; dimension >= 0; dimension-- )\n    {\n      AF_AxisHints  axis  = &hints->axis[dimension];\n      AF_Edge       edges = axis->edges;\n      AF_Edge       limit = edges + axis->num_edges;\n      AF_Edge       edge;\n\n\n      /*\n       *  note: AF_DIMENSION_HORZ corresponds to _vertical_ edges\n       *        since they have a constant X coordinate.\n       */\n      AF_DUMP(( \"Table of %s edges:\\n\",\n                dimension == AF_DIMENSION_HORZ ? \"vertical\"\n                                               : \"horizontal\" ));\n      if ( axis->num_edges )\n        AF_DUMP(( \"  [ index |  pos  |  dir  | link\"\n                  \" | serif | blue | opos  |  pos  |    flags    ]\\n\" ));\n      else\n        AF_DUMP(( \"  (none)\\n\" ));\n\n      for ( edge = edges; edge < limit; edge++ )\n        AF_DUMP(( \"  [ %5d | %5.2g | %5s | %4d\"\n                  \" | %5d |   %c  | %5.2f | %5.2f | %11s ]\\n\",\n                  AF_INDEX_NUM( edge, edges ),\n                  (int)edge->opos / 64.0,\n                  af_dir_str( (AF_Direction)edge->dir ),\n                  AF_INDEX_NUM( edge->link, edges ),\n                  AF_INDEX_NUM( edge->serif, edges ),\n                  edge->blue_edge ? 'y' : 'n',\n                  edge->opos / 64.0,\n                  edge->pos / 64.0,\n                  af_edge_flags_to_string( (AF_Edge_Flags)edge->flags ) ));\n      AF_DUMP(( \"\\n\" ));\n    }\n  }\n#ifdef __cplusplus\n  }\n#endif\n\n#undef AF_DUMP\n\n#endif /* !FT_DEBUG_AUTOFIT */\n\n\n  /* Compute the direction value of a given vector. */\n\n  FT_LOCAL_DEF( AF_Direction )\n  af_direction_compute( FT_Pos  dx,\n                        FT_Pos  dy )\n  {\n    FT_Pos        ll, ss;  /* long and short arm lengths */\n    AF_Direction  dir;     /* candidate direction        */\n\n\n    if ( dy >= dx )\n    {\n      if ( dy >= -dx )\n      {\n        dir = AF_DIR_UP;\n        ll  = dy;\n        ss  = dx;\n      }\n      else\n      {\n        dir = AF_DIR_LEFT;\n        ll  = -dx;\n        ss  = dy;\n      }\n    }\n    else /* dy < dx */\n    {\n      if ( dy >= -dx )\n      {\n        dir = AF_DIR_RIGHT;\n        ll  = dx;\n        ss  = dy;\n      }\n      else\n      {\n        dir = AF_DIR_DOWN;\n        ll  = dy;\n        ss  = dx;\n      }\n    }\n\n    /* return no direction if arm lengths differ too much            */\n    /* (value 14 is heuristic, corresponding to approx. 4.1 degrees) */\n    ss *= 14;\n    if ( FT_ABS( ll ) <= FT_ABS( ss ) )\n      dir = AF_DIR_NONE;\n\n    return dir;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  af_glyph_hints_init( AF_GlyphHints  hints,\n                       FT_Memory      memory )\n  {\n    FT_ZERO( hints );\n    hints->memory = memory;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  af_glyph_hints_done( AF_GlyphHints  hints )\n  {\n    FT_Memory  memory = hints->memory;\n    int        dim;\n\n\n    if ( !( hints && hints->memory ) )\n      return;\n\n    /*\n     *  note that we don't need to free the segment and edge\n     *  buffers since they are really within the hints->points array\n     */\n    for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n    {\n      AF_AxisHints  axis = &hints->axis[dim];\n\n\n      axis->num_segments = 0;\n      axis->max_segments = 0;\n      FT_FREE( axis->segments );\n\n      axis->num_edges = 0;\n      axis->max_edges = 0;\n      FT_FREE( axis->edges );\n    }\n\n    FT_FREE( hints->contours );\n    hints->max_contours = 0;\n    hints->num_contours = 0;\n\n    FT_FREE( hints->points );\n    hints->num_points = 0;\n    hints->max_points = 0;\n\n    hints->memory = NULL;\n  }\n\n\n  /* Reset metrics. */\n\n  FT_LOCAL_DEF( void )\n  af_glyph_hints_rescale( AF_GlyphHints    hints,\n                          AF_StyleMetrics  metrics )\n  {\n    hints->metrics      = metrics;\n    hints->scaler_flags = metrics->scaler.flags;\n  }\n\n\n  /* Recompute all AF_Point in AF_GlyphHints from the definitions */\n  /* in a source outline.                                         */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_glyph_hints_reload( AF_GlyphHints  hints,\n                         FT_Outline*    outline )\n  {\n    FT_Error   error   = FT_Err_Ok;\n    AF_Point   points;\n    FT_UInt    old_max, new_max;\n    FT_Fixed   x_scale = hints->x_scale;\n    FT_Fixed   y_scale = hints->y_scale;\n    FT_Pos     x_delta = hints->x_delta;\n    FT_Pos     y_delta = hints->y_delta;\n    FT_Memory  memory  = hints->memory;\n\n\n    hints->num_points   = 0;\n    hints->num_contours = 0;\n\n    hints->axis[0].num_segments = 0;\n    hints->axis[0].num_edges    = 0;\n    hints->axis[1].num_segments = 0;\n    hints->axis[1].num_edges    = 0;\n\n    /* first of all, reallocate the contours array if necessary */\n    new_max = (FT_UInt)outline->n_contours;\n    old_max = hints->max_contours;\n    if ( new_max > old_max )\n    {\n      new_max = ( new_max + 3 ) & ~3; /* round up to a multiple of 4 */\n\n      if ( FT_RENEW_ARRAY( hints->contours, old_max, new_max ) )\n        goto Exit;\n\n      hints->max_contours = new_max;\n    }\n\n    /*\n     *  then reallocate the points arrays if necessary --\n     *  note that we reserve two additional point positions, used to\n     *  hint metrics appropriately\n     */\n    new_max = (FT_UInt)( outline->n_points + 2 );\n    old_max = hints->max_points;\n    if ( new_max > old_max )\n    {\n      new_max = ( new_max + 2 + 7 ) & ~7; /* round up to a multiple of 8 */\n\n      if ( FT_RENEW_ARRAY( hints->points, old_max, new_max ) )\n        goto Exit;\n\n      hints->max_points = new_max;\n    }\n\n    hints->num_points   = outline->n_points;\n    hints->num_contours = outline->n_contours;\n\n    /* We can't rely on the value of `FT_Outline.flags' to know the fill   */\n    /* direction used for a glyph, given that some fonts are broken (e.g., */\n    /* the Arphic ones).  We thus recompute it each time we need to.       */\n    /*                                                                     */\n    hints->axis[AF_DIMENSION_HORZ].major_dir = AF_DIR_UP;\n    hints->axis[AF_DIMENSION_VERT].major_dir = AF_DIR_LEFT;\n\n    if ( FT_Outline_Get_Orientation( outline ) == FT_ORIENTATION_POSTSCRIPT )\n    {\n      hints->axis[AF_DIMENSION_HORZ].major_dir = AF_DIR_DOWN;\n      hints->axis[AF_DIMENSION_VERT].major_dir = AF_DIR_RIGHT;\n    }\n\n    hints->x_scale = x_scale;\n    hints->y_scale = y_scale;\n    hints->x_delta = x_delta;\n    hints->y_delta = y_delta;\n\n    hints->xmin_delta = 0;\n    hints->xmax_delta = 0;\n\n    points = hints->points;\n    if ( hints->num_points == 0 )\n      goto Exit;\n\n    {\n      AF_Point  point;\n      AF_Point  point_limit = points + hints->num_points;\n\n\n      /* compute coordinates & Bezier flags, next and prev */\n      {\n        FT_Vector*  vec           = outline->points;\n        char*       tag           = outline->tags;\n        AF_Point    end           = points + outline->contours[0];\n        AF_Point    prev          = end;\n        FT_Int      contour_index = 0;\n\n\n        for ( point = points; point < point_limit; point++, vec++, tag++ )\n        {\n          point->in_dir  = (FT_Char)AF_DIR_NONE;\n          point->out_dir = (FT_Char)AF_DIR_NONE;\n\n          point->fx = (FT_Short)vec->x;\n          point->fy = (FT_Short)vec->y;\n          point->ox = point->x = FT_MulFix( vec->x, x_scale ) + x_delta;\n          point->oy = point->y = FT_MulFix( vec->y, y_scale ) + y_delta;\n\n          switch ( FT_CURVE_TAG( *tag ) )\n          {\n          case FT_CURVE_TAG_CONIC:\n            point->flags = AF_FLAG_CONIC;\n            break;\n          case FT_CURVE_TAG_CUBIC:\n            point->flags = AF_FLAG_CUBIC;\n            break;\n          default:\n            point->flags = AF_FLAG_NONE;\n          }\n\n          point->prev = prev;\n          prev->next  = point;\n          prev        = point;\n\n          if ( point == end )\n          {\n            if ( ++contour_index < outline->n_contours )\n            {\n              end  = points + outline->contours[contour_index];\n              prev = end;\n            }\n          }\n        }\n      }\n\n      /* set up the contours array */\n      {\n        AF_Point*  contour       = hints->contours;\n        AF_Point*  contour_limit = contour + hints->num_contours;\n        short*     end           = outline->contours;\n        short      idx           = 0;\n\n\n        for ( ; contour < contour_limit; contour++, end++ )\n        {\n          contour[0] = points + idx;\n          idx        = (short)( end[0] + 1 );\n        }\n      }\n\n      {\n        /*\n         *  Compute directions of `in' and `out' vectors.\n         *\n         *  Note that distances between points that are very near to each\n         *  other are accumulated.  In other words, the auto-hinter\n         *  prepends the small vectors between near points to the first\n         *  non-near vector.  All intermediate points are tagged as\n         *  weak; the directions are adjusted also to be equal to the\n         *  accumulated one.\n         */\n\n        /* value 20 in `near_limit' is heuristic */\n        FT_UInt  units_per_em = hints->metrics->scaler.face->units_per_EM;\n        FT_Int   near_limit   = 20 * units_per_em / 2048;\n        FT_Int   near_limit2  = 2 * near_limit - 1;\n\n        AF_Point*  contour;\n        AF_Point*  contour_limit = hints->contours + hints->num_contours;\n\n\n        for ( contour = hints->contours; contour < contour_limit; contour++ )\n        {\n          AF_Point  first = *contour;\n          AF_Point  next, prev, curr;\n\n          FT_Pos  out_x, out_y;\n\n          FT_Bool  is_first;\n\n\n          /* since the first point of a contour could be part of a */\n          /* series of near points, go backwards to find the first */\n          /* non-near point and adjust `first'                     */\n\n          point = first;\n          prev  = first->prev;\n\n          while ( prev != first )\n          {\n            out_x = point->fx - prev->fx;\n            out_y = point->fy - prev->fy;\n\n            /*\n             *  We use Taxicab metrics to measure the vector length.\n             *\n             *  Note that the accumulated distances so far could have the\n             *  opposite direction of the distance measured here.  For this\n             *  reason we use `near_limit2' for the comparison to get a\n             *  non-near point even in the worst case.\n             */\n            if ( FT_ABS( out_x ) + FT_ABS( out_y ) >= near_limit2 )\n              break;\n\n            point = prev;\n            prev  = prev->prev;\n          }\n\n          /* adjust first point */\n          first = point;\n\n          /* now loop over all points of the contour to get */\n          /* `in' and `out' vector directions               */\n\n          curr  = first;\n\n          /*\n           *  We abuse the `u' and `v' fields to store index deltas to the\n           *  next and previous non-near point, respectively.\n           *\n           *  To avoid problems with not having non-near points, we point to\n           *  `first' by default as the next non-near point.\n           *\n           */\n          curr->u  = (FT_Pos)( first - curr );\n          first->v = -curr->u;\n\n          out_x = 0;\n          out_y = 0;\n\n          is_first = 1;\n\n          for ( point = first;\n                point != first || is_first;\n                point = point->next )\n          {\n            AF_Direction  out_dir;\n\n\n            is_first = 0;\n\n            next = point->next;\n\n            out_x += next->fx - point->fx;\n            out_y += next->fy - point->fy;\n\n            if ( FT_ABS( out_x ) + FT_ABS( out_y ) < near_limit )\n            {\n              next->flags |= AF_FLAG_WEAK_INTERPOLATION;\n              continue;\n            }\n\n            curr->u = (FT_Pos)( next - curr );\n            next->v = -curr->u;\n\n            out_dir = af_direction_compute( out_x, out_y );\n\n            /* adjust directions for all points inbetween; */\n            /* the loop also updates position of `curr'    */\n            curr->out_dir = (FT_Char)out_dir;\n            for ( curr = curr->next; curr != next; curr = curr->next )\n            {\n              curr->in_dir  = (FT_Char)out_dir;\n              curr->out_dir = (FT_Char)out_dir;\n            }\n            next->in_dir = (FT_Char)out_dir;\n\n            curr->u  = (FT_Pos)( first - curr );\n            first->v = -curr->u;\n\n            out_x = 0;\n            out_y = 0;\n          }\n        }\n\n        /*\n         *  The next step is to `simplify' an outline's topology so that we\n         *  can identify local extrema more reliably: A series of\n         *  non-horizontal or non-vertical vectors pointing into the same\n         *  quadrant are handled as a single, long vector.  From a\n         *  topological point of the view, the intermediate points are of no\n         *  interest and thus tagged as weak.\n         */\n\n        for ( point = points; point < point_limit; point++ )\n        {\n          if ( point->flags & AF_FLAG_WEAK_INTERPOLATION )\n            continue;\n\n          if ( point->in_dir  == AF_DIR_NONE &&\n               point->out_dir == AF_DIR_NONE )\n          {\n            /* check whether both vectors point into the same quadrant */\n\n            FT_Pos  in_x, in_y;\n            FT_Pos  out_x, out_y;\n\n            AF_Point  next_u = point + point->u;\n            AF_Point  prev_v = point + point->v;\n\n\n            in_x = point->fx - prev_v->fx;\n            in_y = point->fy - prev_v->fy;\n\n            out_x = next_u->fx - point->fx;\n            out_y = next_u->fy - point->fy;\n\n            if ( ( in_x ^ out_x ) >= 0 && ( in_y ^ out_y ) >= 0 )\n            {\n              /* yes, so tag current point as weak */\n              /* and update index deltas           */\n\n              point->flags |= AF_FLAG_WEAK_INTERPOLATION;\n\n              prev_v->u = (FT_Pos)( next_u - prev_v );\n              next_u->v = -prev_v->u;\n            }\n          }\n        }\n\n        /*\n         *  Finally, check for remaining weak points.  Everything else not\n         *  collected in edges so far is then implicitly classified as strong\n         *  points.\n         */\n\n        for ( point = points; point < point_limit; point++ )\n        {\n          if ( point->flags & AF_FLAG_WEAK_INTERPOLATION )\n            continue;\n\n          if ( point->flags & AF_FLAG_CONTROL )\n          {\n            /* control points are always weak */\n          Is_Weak_Point:\n            point->flags |= AF_FLAG_WEAK_INTERPOLATION;\n          }\n          else if ( point->out_dir == point->in_dir )\n          {\n            if ( point->out_dir != AF_DIR_NONE )\n            {\n              /* current point lies on a horizontal or          */\n              /* vertical segment (but doesn't start or end it) */\n              goto Is_Weak_Point;\n            }\n\n            {\n              AF_Point  next_u = point + point->u;\n              AF_Point  prev_v = point + point->v;\n\n\n              if ( ft_corner_is_flat( point->fx  - prev_v->fx,\n                                      point->fy  - prev_v->fy,\n                                      next_u->fx - point->fx,\n                                      next_u->fy - point->fy ) )\n              {\n                /* either the `in' or the `out' vector is much more  */\n                /* dominant than the other one, so tag current point */\n                /* as weak and update index deltas                   */\n\n                prev_v->u = (FT_Pos)( next_u - prev_v );\n                next_u->v = -prev_v->u;\n\n                goto Is_Weak_Point;\n              }\n            }\n          }\n          else if ( point->in_dir == -point->out_dir )\n          {\n            /* current point forms a spike */\n            goto Is_Weak_Point;\n          }\n        }\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* Store the hinted outline in an FT_Outline structure. */\n\n  FT_LOCAL_DEF( void )\n  af_glyph_hints_save( AF_GlyphHints  hints,\n                       FT_Outline*    outline )\n  {\n    AF_Point    point = hints->points;\n    AF_Point    limit = point + hints->num_points;\n    FT_Vector*  vec   = outline->points;\n    char*       tag   = outline->tags;\n\n\n    for ( ; point < limit; point++, vec++, tag++ )\n    {\n      vec->x = point->x;\n      vec->y = point->y;\n\n      if ( point->flags & AF_FLAG_CONIC )\n        tag[0] = FT_CURVE_TAG_CONIC;\n      else if ( point->flags & AF_FLAG_CUBIC )\n        tag[0] = FT_CURVE_TAG_CUBIC;\n      else\n        tag[0] = FT_CURVE_TAG_ON;\n    }\n  }\n\n\n  /****************************************************************\n   *\n   *                     EDGE POINT GRID-FITTING\n   *\n   ****************************************************************/\n\n\n  /* Align all points of an edge to the same coordinate value, */\n  /* either horizontally or vertically.                        */\n\n  FT_LOCAL_DEF( void )\n  af_glyph_hints_align_edge_points( AF_GlyphHints  hints,\n                                    AF_Dimension   dim )\n  {\n    AF_AxisHints  axis          = & hints->axis[dim];\n    AF_Segment    segments      = axis->segments;\n    AF_Segment    segment_limit = segments + axis->num_segments;\n    AF_Segment    seg;\n\n\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      for ( seg = segments; seg < segment_limit; seg++ )\n      {\n        AF_Edge   edge = seg->edge;\n        AF_Point  point, first, last;\n\n\n        if ( edge == NULL )\n          continue;\n\n        first = seg->first;\n        last  = seg->last;\n        point = first;\n        for (;;)\n        {\n          point->x      = edge->pos;\n          point->flags |= AF_FLAG_TOUCH_X;\n\n          if ( point == last )\n            break;\n\n          point = point->next;\n        }\n      }\n    }\n    else\n    {\n      for ( seg = segments; seg < segment_limit; seg++ )\n      {\n        AF_Edge   edge = seg->edge;\n        AF_Point  point, first, last;\n\n\n        if ( edge == NULL )\n          continue;\n\n        first = seg->first;\n        last  = seg->last;\n        point = first;\n        for (;;)\n        {\n          point->y      = edge->pos;\n          point->flags |= AF_FLAG_TOUCH_Y;\n\n          if ( point == last )\n            break;\n\n          point = point->next;\n        }\n      }\n    }\n  }\n\n\n  /****************************************************************\n   *\n   *                    STRONG POINT INTERPOLATION\n   *\n   ****************************************************************/\n\n\n  /* Hint the strong points -- this is equivalent to the TrueType `IP' */\n  /* hinting instruction.                                              */\n\n  FT_LOCAL_DEF( void )\n  af_glyph_hints_align_strong_points( AF_GlyphHints  hints,\n                                      AF_Dimension   dim )\n  {\n    AF_Point      points      = hints->points;\n    AF_Point      point_limit = points + hints->num_points;\n    AF_AxisHints  axis        = &hints->axis[dim];\n    AF_Edge       edges       = axis->edges;\n    AF_Edge       edge_limit  = edges + axis->num_edges;\n    AF_Flags      touch_flag;\n\n\n    if ( dim == AF_DIMENSION_HORZ )\n      touch_flag = AF_FLAG_TOUCH_X;\n    else\n      touch_flag  = AF_FLAG_TOUCH_Y;\n\n    if ( edges < edge_limit )\n    {\n      AF_Point  point;\n      AF_Edge   edge;\n\n\n      for ( point = points; point < point_limit; point++ )\n      {\n        FT_Pos  u, ou, fu;  /* point position */\n        FT_Pos  delta;\n\n\n        if ( point->flags & touch_flag )\n          continue;\n\n        /* if this point is candidate to weak interpolation, we       */\n        /* interpolate it after all strong points have been processed */\n\n        if ( ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) )\n          continue;\n\n        if ( dim == AF_DIMENSION_VERT )\n        {\n          u  = point->fy;\n          ou = point->oy;\n        }\n        else\n        {\n          u  = point->fx;\n          ou = point->ox;\n        }\n\n        fu = u;\n\n        /* is the point before the first edge? */\n        edge  = edges;\n        delta = edge->fpos - u;\n        if ( delta >= 0 )\n        {\n          u = edge->pos - ( edge->opos - ou );\n          goto Store_Point;\n        }\n\n        /* is the point after the last edge? */\n        edge  = edge_limit - 1;\n        delta = u - edge->fpos;\n        if ( delta >= 0 )\n        {\n          u = edge->pos + ( ou - edge->opos );\n          goto Store_Point;\n        }\n\n        {\n          FT_PtrDist  min, max, mid;\n          FT_Pos      fpos;\n\n\n          /* find enclosing edges */\n          min = 0;\n          max = edge_limit - edges;\n\n#if 1\n          /* for a small number of edges, a linear search is better */\n          if ( max <= 8 )\n          {\n            FT_PtrDist  nn;\n\n\n            for ( nn = 0; nn < max; nn++ )\n              if ( edges[nn].fpos >= u )\n                break;\n\n            if ( edges[nn].fpos == u )\n            {\n              u = edges[nn].pos;\n              goto Store_Point;\n            }\n            min = nn;\n          }\n          else\n#endif\n          while ( min < max )\n          {\n            mid  = ( max + min ) >> 1;\n            edge = edges + mid;\n            fpos = edge->fpos;\n\n            if ( u < fpos )\n              max = mid;\n            else if ( u > fpos )\n              min = mid + 1;\n            else\n            {\n              /* we are on the edge */\n              u = edge->pos;\n              goto Store_Point;\n            }\n          }\n\n          /* point is not on an edge */\n          {\n            AF_Edge  before = edges + min - 1;\n            AF_Edge  after  = edges + min + 0;\n\n\n            /* assert( before && after && before != after ) */\n            if ( before->scale == 0 )\n              before->scale = FT_DivFix( after->pos - before->pos,\n                                         after->fpos - before->fpos );\n\n            u = before->pos + FT_MulFix( fu - before->fpos,\n                                         before->scale );\n          }\n        }\n\n      Store_Point:\n        /* save the point position */\n        if ( dim == AF_DIMENSION_HORZ )\n          point->x = u;\n        else\n          point->y = u;\n\n        point->flags |= touch_flag;\n      }\n    }\n  }\n\n\n  /****************************************************************\n   *\n   *                    WEAK POINT INTERPOLATION\n   *\n   ****************************************************************/\n\n\n  /* Shift the original coordinates of all points between `p1' and */\n  /* `p2' to get hinted coordinates, using the same difference as  */\n  /* given by `ref'.                                               */\n\n  static void\n  af_iup_shift( AF_Point  p1,\n                AF_Point  p2,\n                AF_Point  ref )\n  {\n    AF_Point  p;\n    FT_Pos    delta = ref->u - ref->v;\n\n\n    if ( delta == 0 )\n      return;\n\n    for ( p = p1; p < ref; p++ )\n      p->u = p->v + delta;\n\n    for ( p = ref + 1; p <= p2; p++ )\n      p->u = p->v + delta;\n  }\n\n\n  /* Interpolate the original coordinates of all points between `p1' and  */\n  /* `p2' to get hinted coordinates, using `ref1' and `ref2' as the       */\n  /* reference points.  The `u' and `v' members are the current and       */\n  /* original coordinate values, respectively.                            */\n  /*                                                                      */\n  /* Details can be found in the TrueType bytecode specification.         */\n\n  static void\n  af_iup_interp( AF_Point  p1,\n                 AF_Point  p2,\n                 AF_Point  ref1,\n                 AF_Point  ref2 )\n  {\n    AF_Point  p;\n    FT_Pos    u;\n    FT_Pos    v1 = ref1->v;\n    FT_Pos    v2 = ref2->v;\n    FT_Pos    d1 = ref1->u - v1;\n    FT_Pos    d2 = ref2->u - v2;\n\n\n    if ( p1 > p2 )\n      return;\n\n    if ( v1 == v2 )\n    {\n      for ( p = p1; p <= p2; p++ )\n      {\n        u = p->v;\n\n        if ( u <= v1 )\n          u += d1;\n        else\n          u += d2;\n\n        p->u = u;\n      }\n      return;\n    }\n\n    if ( v1 < v2 )\n    {\n      for ( p = p1; p <= p2; p++ )\n      {\n        u = p->v;\n\n        if ( u <= v1 )\n          u += d1;\n        else if ( u >= v2 )\n          u += d2;\n        else\n          u = ref1->u + FT_MulDiv( u - v1, ref2->u - ref1->u, v2 - v1 );\n\n        p->u = u;\n      }\n    }\n    else\n    {\n      for ( p = p1; p <= p2; p++ )\n      {\n        u = p->v;\n\n        if ( u <= v2 )\n          u += d2;\n        else if ( u >= v1 )\n          u += d1;\n        else\n          u = ref1->u + FT_MulDiv( u - v1, ref2->u - ref1->u, v2 - v1 );\n\n        p->u = u;\n      }\n    }\n  }\n\n\n  /* Hint the weak points -- this is equivalent to the TrueType `IUP' */\n  /* hinting instruction.                                             */\n\n  FT_LOCAL_DEF( void )\n  af_glyph_hints_align_weak_points( AF_GlyphHints  hints,\n                                    AF_Dimension   dim )\n  {\n    AF_Point   points        = hints->points;\n    AF_Point   point_limit   = points + hints->num_points;\n    AF_Point*  contour       = hints->contours;\n    AF_Point*  contour_limit = contour + hints->num_contours;\n    AF_Flags   touch_flag;\n    AF_Point   point;\n    AF_Point   end_point;\n    AF_Point   first_point;\n\n\n    /* PASS 1: Move segment points to edge positions */\n\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      touch_flag = AF_FLAG_TOUCH_X;\n\n      for ( point = points; point < point_limit; point++ )\n      {\n        point->u = point->x;\n        point->v = point->ox;\n      }\n    }\n    else\n    {\n      touch_flag = AF_FLAG_TOUCH_Y;\n\n      for ( point = points; point < point_limit; point++ )\n      {\n        point->u = point->y;\n        point->v = point->oy;\n      }\n    }\n\n    for ( ; contour < contour_limit; contour++ )\n    {\n      AF_Point  first_touched, last_touched;\n\n\n      point       = *contour;\n      end_point   = point->prev;\n      first_point = point;\n\n      /* find first touched point */\n      for (;;)\n      {\n        if ( point > end_point )  /* no touched point in contour */\n          goto NextContour;\n\n        if ( point->flags & touch_flag )\n          break;\n\n        point++;\n      }\n\n      first_touched = point;\n\n      for (;;)\n      {\n        FT_ASSERT( point <= end_point                 &&\n                   ( point->flags & touch_flag ) != 0 );\n\n        /* skip any touched neighbours */\n        while ( point < end_point                    &&\n                ( point[1].flags & touch_flag ) != 0 )\n          point++;\n\n        last_touched = point;\n\n        /* find the next touched point, if any */\n        point++;\n        for (;;)\n        {\n          if ( point > end_point )\n            goto EndContour;\n\n          if ( ( point->flags & touch_flag ) != 0 )\n            break;\n\n          point++;\n        }\n\n        /* interpolate between last_touched and point */\n        af_iup_interp( last_touched + 1, point - 1,\n                       last_touched, point );\n      }\n\n    EndContour:\n      /* special case: only one point was touched */\n      if ( last_touched == first_touched )\n        af_iup_shift( first_point, end_point, first_touched );\n\n      else /* interpolate the last part */\n      {\n        if ( last_touched < end_point )\n          af_iup_interp( last_touched + 1, end_point,\n                         last_touched, first_touched );\n\n        if ( first_touched > points )\n          af_iup_interp( first_point, first_touched - 1,\n                         last_touched, first_touched );\n      }\n\n    NextContour:\n      ;\n    }\n\n    /* now save the interpolated values back to x/y */\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      for ( point = points; point < point_limit; point++ )\n        point->x = point->u;\n    }\n    else\n    {\n      for ( point = points; point < point_limit; point++ )\n        point->y = point->u;\n    }\n  }\n\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n\n  /* Apply (small) warp scale and warp delta for given dimension. */\n\n  FT_LOCAL_DEF( void )\n  af_glyph_hints_scale_dim( AF_GlyphHints  hints,\n                            AF_Dimension   dim,\n                            FT_Fixed       scale,\n                            FT_Pos         delta )\n  {\n    AF_Point  points       = hints->points;\n    AF_Point  points_limit = points + hints->num_points;\n    AF_Point  point;\n\n\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      for ( point = points; point < points_limit; point++ )\n        point->x = FT_MulFix( point->fx, scale ) + delta;\n    }\n    else\n    {\n      for ( point = points; point < points_limit; point++ )\n        point->y = FT_MulFix( point->fy, scale ) + delta;\n    }\n  }\n\n#endif /* AF_CONFIG_OPTION_USE_WARPER */\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afhints.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afhints.h                                                              */\n/*                                                                         */\n/*    Auto-fitter hinting routines (specification).                        */\n/*                                                                         */\n/*  Copyright 2003-2008, 2010-2012, 2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFHINTS_H__\n#define __AFHINTS_H__\n\n#include \"aftypes.h\"\n\n#define xxAF_SORT_SEGMENTS\n\nFT_BEGIN_HEADER\n\n  /*\n   *  The definition of outline glyph hints.  These are shared by all\n   *  writing system analysis routines (until now).\n   */\n\n  typedef enum  AF_Dimension_\n  {\n    AF_DIMENSION_HORZ = 0,  /* x coordinates,                    */\n                            /* i.e., vertical segments & edges   */\n    AF_DIMENSION_VERT = 1,  /* y coordinates,                    */\n                            /* i.e., horizontal segments & edges */\n\n    AF_DIMENSION_MAX  /* do not remove */\n\n  } AF_Dimension;\n\n\n  /* hint directions -- the values are computed so that two vectors are */\n  /* in opposite directions iff `dir1 + dir2 == 0'                      */\n  typedef enum  AF_Direction_\n  {\n    AF_DIR_NONE  =  4,\n    AF_DIR_RIGHT =  1,\n    AF_DIR_LEFT  = -1,\n    AF_DIR_UP    =  2,\n    AF_DIR_DOWN  = -2\n\n  } AF_Direction;\n\n\n  /*\n   *  The following explanations are mostly taken from the article\n   *\n   *    Real-Time Grid Fitting of Typographic Outlines\n   *\n   *  by David Turner and Werner Lemberg\n   *\n   *    http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf\n   *\n   *  with appropriate updates.\n   *\n   *\n   *  Segments\n   *\n   *    `af_{cjk,latin,...}_hints_compute_segments' are the functions to\n   *    find segments in an outline.\n   *\n   *    A segment is a series of at least two consecutive points that are\n   *    approximately aligned along a coordinate axis.  The analysis to do\n   *    so is specific to a writing system.\n   *\n   *\n   *  Edges\n   *\n   *    `af_{cjk,latin,...}_hints_compute_edges' are the functions to find\n   *    edges.\n   *\n   *    As soon as segments are defined, the auto-hinter groups them into\n   *    edges.  An edge corresponds to a single position on the main\n   *    dimension that collects one or more segments (allowing for a small\n   *    threshold).\n   *\n   *    As an example, the `latin' writing system first tries to grid-fit\n   *    edges, then to align segments on the edges unless it detects that\n   *    they form a serif.\n   *\n   *\n   *                      A          H\n   *                       |        |\n   *                       |        |\n   *                       |        |\n   *                       |        |\n   *         C             |        |             F\n   *          +------<-----+        +-----<------+\n   *          |             B      G             |\n   *          |                                  |\n   *          |                                  |\n   *          +--------------->------------------+\n   *         D                                    E\n   *\n   *\n   *  Stems\n   *\n   *    Stems are detected by `af_{cjk,latin,...}_hint_edges'.\n   *\n   *    Segments need to be `linked' to other ones in order to detect stems.\n   *    A stem is made of two segments that face each other in opposite\n   *    directions and that are sufficiently close to each other.  Using\n   *    vocabulary from the TrueType specification, stem segments form a\n   *    `black distance'.\n   *\n   *    In the above ASCII drawing, the horizontal segments are BC, DE, and\n   *    FG; the vertical segments are AB, CD, EF, and GH.\n   *\n   *    Each segment has at most one `best' candidate to form a black\n   *    distance, or no candidate at all.  Notice that two distinct segments\n   *    can have the same candidate, which frequently means a serif.\n   *\n   *    A stem is recognized by the following condition:\n   *\n   *      best segment_1 = segment_2 && best segment_2 = segment_1\n   *\n   *    The best candidate is stored in field `link' in structure\n   *    `AF_Segment'.\n   *\n   *    In the above ASCII drawing, the best candidate for both AB and CD is\n   *    GH, while the best candidate for GH is AB.  Similarly, the best\n   *    candidate for EF and GH is AB, while the best candidate for AB is\n   *    GH.\n   *\n   *    The detection and handling of stems is dependent on the writing\n   *    system.\n   *\n   *\n   *  Serifs\n   *\n   *    Serifs are detected by `af_{cjk,latin,...}_hint_edges'.\n   *\n   *    In comparison to a stem, a serif (as handled by the auto-hinter\n   *    module that takes care of the `latin' writing system) has\n   *\n   *      best segment_1 = segment_2 && best segment_2 != segment_1\n   *\n   *    where segment_1 corresponds to the serif segment (CD and EF in the\n   *    above ASCII drawing).\n   *\n   *    The best candidate is stored in field `serif' in structure\n   *    `AF_Segment' (and `link' is set to NULL).\n   *\n   *\n   *  Touched points\n   *\n   *    A point is called `touched' if it has been processed somehow by the\n   *    auto-hinter.  It basically means that it shouldn't be moved again\n   *    (or moved only under certain constraints to preserve the already\n   *    applied processing).\n   *\n   *\n   *  Flat and round segments\n   *\n   *    Segments are `round' or `flat', depending on the series of points\n   *    that define them.  A segment is round if the next and previous point\n   *    of an extremum (which can be either a single point or sequence of\n   *    points) are both conic or cubic control points.  Otherwise, a\n   *    segment with an extremum is flat.\n   *\n   *\n   *  Strong Points\n   *\n   *    Experience has shown that points not part of an edge need to be\n   *    interpolated linearly between their two closest edges, even if these\n   *    are not part of the contour of those particular points.  Typical\n   *    candidates for this are\n   *\n   *    - angle points (i.e., points where the `in' and `out' direction\n   *      differ greatly)\n   *\n   *    - inflection points (i.e., where the `in' and `out' angles are the\n   *      same, but the curvature changes sign) [currently, such points\n   *      aren't handled specially in the auto-hinter]\n   *\n   *    `af_glyph_hints_align_strong_points' is the function that takes\n   *    care of such situations; it is equivalent to the TrueType `IP'\n   *    hinting instruction.\n   *\n   *\n   *  Weak Points\n   *\n   *    Other points in the outline must be interpolated using the\n   *    coordinates of their previous and next unfitted contour neighbours.\n   *    These are called `weak points' and are touched by the function\n   *    `af_glyph_hints_align_weak_points', equivalent to the TrueType `IUP'\n   *    hinting instruction.  Typical candidates are control points and\n   *    points on the contour without a major direction.\n   *\n   *    The major effect is to reduce possible distortion caused by\n   *    alignment of edges and strong points, thus weak points are processed\n   *    after strong points.\n   */\n\n\n  /* point hint flags */\n  typedef enum  AF_Flags_\n  {\n    AF_FLAG_NONE = 0,\n\n    /* point type flags */\n    AF_FLAG_CONIC   = 1 << 0,\n    AF_FLAG_CUBIC   = 1 << 1,\n    AF_FLAG_CONTROL = AF_FLAG_CONIC | AF_FLAG_CUBIC,\n\n    /* point touch flags */\n    AF_FLAG_TOUCH_X = 1 << 2,\n    AF_FLAG_TOUCH_Y = 1 << 3,\n\n    /* candidates for weak interpolation have this flag set */\n    AF_FLAG_WEAK_INTERPOLATION = 1 << 4\n\n  } AF_Flags;\n\n\n  /* edge hint flags */\n  typedef enum  AF_Edge_Flags_\n  {\n    AF_EDGE_NORMAL  = 0,\n    AF_EDGE_ROUND   = 1 << 0,\n    AF_EDGE_SERIF   = 1 << 1,\n    AF_EDGE_DONE    = 1 << 2,\n    AF_EDGE_NEUTRAL = 1 << 3  /* set if edge aligns to a neutral blue zone */\n\n  } AF_Edge_Flags;\n\n\n  typedef struct AF_PointRec_*    AF_Point;\n  typedef struct AF_SegmentRec_*  AF_Segment;\n  typedef struct AF_EdgeRec_*     AF_Edge;\n\n\n  typedef struct  AF_PointRec_\n  {\n    FT_UShort  flags;    /* point flags used by hinter   */\n    FT_Char    in_dir;   /* direction of inwards vector  */\n    FT_Char    out_dir;  /* direction of outwards vector */\n\n    FT_Pos     ox, oy;   /* original, scaled position                   */\n    FT_Short   fx, fy;   /* original, unscaled position (in font units) */\n    FT_Pos     x, y;     /* current position                            */\n    FT_Pos     u, v;     /* current (x,y) or (y,x) depending on context */\n\n    AF_Point   next;     /* next point in contour     */\n    AF_Point   prev;     /* previous point in contour */\n\n  } AF_PointRec;\n\n\n  typedef struct  AF_SegmentRec_\n  {\n    FT_Byte     flags;       /* edge/segment flags for this segment */\n    FT_Char     dir;         /* segment direction                   */\n    FT_Short    pos;         /* position of segment                 */\n    FT_Short    min_coord;   /* minimum coordinate of segment       */\n    FT_Short    max_coord;   /* maximum coordinate of segment       */\n    FT_Short    height;      /* the hinted segment height           */\n\n    AF_Edge     edge;        /* the segment's parent edge           */\n    AF_Segment  edge_next;   /* link to next segment in parent edge */\n\n    AF_Segment  link;        /* (stem) link segment        */\n    AF_Segment  serif;       /* primary segment for serifs */\n    FT_Pos      num_linked;  /* number of linked segments  */\n    FT_Pos      score;       /* used during stem matching  */\n    FT_Pos      len;         /* used during stem matching  */\n\n    AF_Point    first;       /* first point in edge segment */\n    AF_Point    last;        /* last point in edge segment  */\n\n  } AF_SegmentRec;\n\n\n  typedef struct  AF_EdgeRec_\n  {\n    FT_Short    fpos;       /* original, unscaled position (in font units) */\n    FT_Pos      opos;       /* original, scaled position                   */\n    FT_Pos      pos;        /* current position                            */\n\n    FT_Byte     flags;      /* edge flags                                   */\n    FT_Char     dir;        /* edge direction                               */\n    FT_Fixed    scale;      /* used to speed up interpolation between edges */\n\n    AF_Width    blue_edge;  /* non-NULL if this is a blue edge */\n    AF_Edge     link;       /* link edge                       */\n    AF_Edge     serif;      /* primary edge for serifs         */\n    FT_Short    num_linked; /* number of linked edges          */\n    FT_Int      score;      /* used during stem matching       */\n\n    AF_Segment  first;      /* first segment in edge */\n    AF_Segment  last;       /* last segment in edge  */\n\n  } AF_EdgeRec;\n\n\n  typedef struct  AF_AxisHintsRec_\n  {\n    FT_Int        num_segments; /* number of used segments      */\n    FT_Int        max_segments; /* number of allocated segments */\n    AF_Segment    segments;     /* segments array               */\n#ifdef AF_SORT_SEGMENTS\n    FT_Int        mid_segments;\n#endif\n\n    FT_Int        num_edges;    /* number of used edges      */\n    FT_Int        max_edges;    /* number of allocated edges */\n    AF_Edge       edges;        /* edges array               */\n\n    AF_Direction  major_dir;    /* either vertical or horizontal */\n\n  } AF_AxisHintsRec, *AF_AxisHints;\n\n\n  typedef struct  AF_GlyphHintsRec_\n  {\n    FT_Memory        memory;\n\n    FT_Fixed         x_scale;\n    FT_Pos           x_delta;\n\n    FT_Fixed         y_scale;\n    FT_Pos           y_delta;\n\n    FT_Int           max_points;    /* number of allocated points */\n    FT_Int           num_points;    /* number of used points      */\n    AF_Point         points;        /* points array               */\n\n    FT_Int           max_contours;  /* number of allocated contours */\n    FT_Int           num_contours;  /* number of used contours      */\n    AF_Point*        contours;      /* contours array               */\n\n    AF_AxisHintsRec  axis[AF_DIMENSION_MAX];\n\n    FT_UInt32        scaler_flags;  /* copy of scaler flags    */\n    FT_UInt32        other_flags;   /* free for style-specific */\n                                    /* implementations         */\n    AF_StyleMetrics  metrics;\n\n    FT_Pos           xmin_delta;    /* used for warping */\n    FT_Pos           xmax_delta;\n\n  } AF_GlyphHintsRec;\n\n\n#define AF_HINTS_TEST_SCALER( h, f )  ( (h)->scaler_flags & (f) )\n#define AF_HINTS_TEST_OTHER( h, f )   ( (h)->other_flags  & (f) )\n\n\n#ifdef FT_DEBUG_AUTOFIT\n\n#define AF_HINTS_DO_HORIZONTAL( h )                                     \\\n          ( !_af_debug_disable_horz_hints                            && \\\n            !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_HORIZONTAL ) )\n\n#define AF_HINTS_DO_VERTICAL( h )                                     \\\n          ( !_af_debug_disable_vert_hints                          && \\\n            !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_VERTICAL ) )\n\n#define AF_HINTS_DO_ADVANCE( h )                                \\\n          !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_ADVANCE )\n\n#define AF_HINTS_DO_BLUES( h )  ( !_af_debug_disable_blue_hints )\n\n#else /* !FT_DEBUG_AUTOFIT */\n\n#define AF_HINTS_DO_HORIZONTAL( h )                                \\\n          !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_HORIZONTAL )\n\n#define AF_HINTS_DO_VERTICAL( h )                                \\\n          !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_VERTICAL )\n\n#define AF_HINTS_DO_ADVANCE( h )                                \\\n          !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_ADVANCE )\n\n#define AF_HINTS_DO_BLUES( h )  1\n\n#endif /* !FT_DEBUG_AUTOFIT */\n\n\n  FT_LOCAL( AF_Direction )\n  af_direction_compute( FT_Pos  dx,\n                        FT_Pos  dy );\n\n\n  FT_LOCAL( FT_Error )\n  af_axis_hints_new_segment( AF_AxisHints  axis,\n                             FT_Memory     memory,\n                             AF_Segment   *asegment );\n\n  FT_LOCAL( FT_Error)\n  af_axis_hints_new_edge( AF_AxisHints  axis,\n                          FT_Int        fpos,\n                          AF_Direction  dir,\n                          FT_Memory     memory,\n                          AF_Edge      *edge );\n\n  FT_LOCAL( void )\n  af_glyph_hints_init( AF_GlyphHints  hints,\n                       FT_Memory      memory );\n\n  FT_LOCAL( void )\n  af_glyph_hints_rescale( AF_GlyphHints    hints,\n                          AF_StyleMetrics  metrics );\n\n  FT_LOCAL( FT_Error )\n  af_glyph_hints_reload( AF_GlyphHints  hints,\n                         FT_Outline*    outline );\n\n  FT_LOCAL( void )\n  af_glyph_hints_save( AF_GlyphHints  hints,\n                       FT_Outline*    outline );\n\n  FT_LOCAL( void )\n  af_glyph_hints_align_edge_points( AF_GlyphHints  hints,\n                                    AF_Dimension   dim );\n\n  FT_LOCAL( void )\n  af_glyph_hints_align_strong_points( AF_GlyphHints  hints,\n                                      AF_Dimension   dim );\n\n  FT_LOCAL( void )\n  af_glyph_hints_align_weak_points( AF_GlyphHints  hints,\n                                    AF_Dimension   dim );\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n  FT_LOCAL( void )\n  af_glyph_hints_scale_dim( AF_GlyphHints  hints,\n                            AF_Dimension   dim,\n                            FT_Fixed       scale,\n                            FT_Pos         delta );\n#endif\n\n  FT_LOCAL( void )\n  af_glyph_hints_done( AF_GlyphHints  hints );\n\n/* */\n\n#define AF_SEGMENT_LEN( seg )          ( (seg)->max_coord - (seg)->min_coord )\n\n#define AF_SEGMENT_DIST( seg1, seg2 )  ( ( (seg1)->pos > (seg2)->pos )   \\\n                                           ? (seg1)->pos - (seg2)->pos   \\\n                                           : (seg2)->pos - (seg1)->pos )\n\n\nFT_END_HEADER\n\n#endif /* __AFHINTS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afindic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afindic.c                                                              */\n/*                                                                         */\n/*    Auto-fitter hinting routines for Indic writing system (body).        */\n/*                                                                         */\n/*  Copyright 2007, 2011-2013 by                                           */\n/*  Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>.    */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"aftypes.h\"\n#include \"aflatin.h\"\n\n\n#ifdef AF_CONFIG_OPTION_INDIC\n\n#include \"afindic.h\"\n#include \"aferrors.h\"\n#include \"afcjk.h\"\n\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n#include \"afwarp.h\"\n#endif\n\n\n  static FT_Error\n  af_indic_metrics_init( AF_CJKMetrics  metrics,\n                         FT_Face        face )\n  {\n    /* skip blue zone init in CJK routines */\n    FT_CharMap  oldmap = face->charmap;\n\n\n    metrics->units_per_em = face->units_per_EM;\n\n    if ( FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )\n      face->charmap = NULL;\n    else\n    {\n      af_cjk_metrics_init_widths( metrics, face );\n#if 0\n      /* either need indic specific blue_chars[] or just skip blue zones */\n      af_cjk_metrics_init_blues( metrics, face, af_cjk_blue_chars );\n#endif\n      af_cjk_metrics_check_digits( metrics, face );\n    }\n\n    FT_Set_Charmap( face, oldmap );\n\n    return FT_Err_Ok;\n  }\n\n\n  static void\n  af_indic_metrics_scale( AF_CJKMetrics  metrics,\n                          AF_Scaler      scaler )\n  {\n    /* use CJK routines */\n    af_cjk_metrics_scale( metrics, scaler );\n  }\n\n\n  static FT_Error\n  af_indic_hints_init( AF_GlyphHints  hints,\n                       AF_CJKMetrics  metrics )\n  {\n    /* use CJK routines */\n    return af_cjk_hints_init( hints, metrics );\n  }\n\n\n  static FT_Error\n  af_indic_hints_apply( AF_GlyphHints  hints,\n                        FT_Outline*    outline,\n                        AF_CJKMetrics  metrics )\n  {\n    /* use CJK routines */\n    return af_cjk_hints_apply( hints, outline, metrics );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                I N D I C   S C R I P T   C L A S S            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  AF_DEFINE_WRITING_SYSTEM_CLASS(\n    af_indic_writing_system_class,\n\n    AF_WRITING_SYSTEM_INDIC,\n\n    sizeof ( AF_CJKMetricsRec ),\n\n    (AF_WritingSystem_InitMetricsFunc) af_indic_metrics_init,\n    (AF_WritingSystem_ScaleMetricsFunc)af_indic_metrics_scale,\n    (AF_WritingSystem_DoneMetricsFunc) NULL,\n\n    (AF_WritingSystem_InitHintsFunc)   af_indic_hints_init,\n    (AF_WritingSystem_ApplyHintsFunc)  af_indic_hints_apply\n  )\n\n\n#else /* !AF_CONFIG_OPTION_INDIC */\n\n\n  AF_DEFINE_WRITING_SYSTEM_CLASS(\n    af_indic_writing_system_class,\n\n    AF_WRITING_SYSTEM_INDIC,\n\n    sizeof ( AF_CJKMetricsRec ),\n\n    (AF_WritingSystem_InitMetricsFunc) NULL,\n    (AF_WritingSystem_ScaleMetricsFunc)NULL,\n    (AF_WritingSystem_DoneMetricsFunc) NULL,\n\n    (AF_WritingSystem_InitHintsFunc)   NULL,\n    (AF_WritingSystem_ApplyHintsFunc)  NULL\n  )\n\n\n#endif /* !AF_CONFIG_OPTION_INDIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afindic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afindic.h                                                              */\n/*                                                                         */\n/*    Auto-fitter hinting routines for Indic writing system                */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2007, 2012, 2013 by                                          */\n/*  Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>.    */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFINDIC_H__\n#define __AFINDIC_H__\n\n#include \"afhints.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /* the `indic' writing system */\n\n  AF_DECLARE_WRITING_SYSTEM_CLASS( af_indic_writing_system_class )\n\n\n/* */\n\nFT_END_HEADER\n\n#endif /* __AFINDIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/aflatin.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  aflatin.c                                                              */\n/*                                                                         */\n/*    Auto-fitter hinting routines for latin writing system (body).        */\n/*                                                                         */\n/*  Copyright 2003-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_ADVANCES_H\n#include FT_INTERNAL_DEBUG_H\n\n#include \"afglobal.h\"\n#include \"afpic.h\"\n#include \"aflatin.h\"\n#include \"aferrors.h\"\n\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n#include \"afwarp.h\"\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_aflatin\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****            L A T I N   G L O B A L   M E T R I C S            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* Find segments and links, compute all stem widths, and initialize */\n  /* standard width and height for the glyph with given charcode.     */\n\n  FT_LOCAL_DEF( void )\n  af_latin_metrics_init_widths( AF_LatinMetrics  metrics,\n                                FT_Face          face )\n  {\n    /* scan the array of segments in each direction */\n    AF_GlyphHintsRec  hints[1];\n\n\n    FT_TRACE5(( \"\\n\"\n                \"latin standard widths computation (style `%s')\\n\"\n                \"=====================================================\\n\"\n                \"\\n\",\n                af_style_names[metrics->root.style_class->style] ));\n\n    af_glyph_hints_init( hints, face->memory );\n\n    metrics->axis[AF_DIMENSION_HORZ].width_count = 0;\n    metrics->axis[AF_DIMENSION_VERT].width_count = 0;\n\n    {\n      FT_Error            error;\n      FT_ULong            glyph_index;\n      FT_Long             y_offset;\n      int                 dim;\n      AF_LatinMetricsRec  dummy[1];\n      AF_Scaler           scaler = &dummy->root.scaler;\n\n#ifdef FT_CONFIG_OPTION_PIC\n      AF_FaceGlobals  globals = metrics->root.globals;\n#endif\n\n      AF_StyleClass   style_class  = metrics->root.style_class;\n      AF_ScriptClass  script_class = AF_SCRIPT_CLASSES_GET\n                                       [style_class->script];\n\n      FT_UInt32  standard_char;\n\n\n      /*\n       * We check more than a single standard character to catch features\n       * like `c2sc' (small caps from caps) that don't contain lowercase\n       * letters by definition, or other features that mainly operate on\n       * numerals.\n       */\n\n      standard_char = script_class->standard_char1;\n      af_get_char_index( &metrics->root,\n                         standard_char,\n                         &glyph_index,\n                         &y_offset );\n      if ( !glyph_index )\n      {\n        if ( script_class->standard_char2 )\n        {\n          standard_char = script_class->standard_char2;\n          af_get_char_index( &metrics->root,\n                             standard_char,\n                             &glyph_index,\n                             &y_offset );\n          if ( !glyph_index )\n          {\n            if ( script_class->standard_char3 )\n            {\n              standard_char = script_class->standard_char3;\n              af_get_char_index( &metrics->root,\n                                 standard_char,\n                                 &glyph_index,\n                                 &y_offset );\n              if ( !glyph_index )\n                goto Exit;\n            }\n            else\n              goto Exit;\n          }\n        }\n        else\n          goto Exit;\n      }\n\n      FT_TRACE5(( \"standard character: U+%04lX (glyph index %d)\\n\",\n                  standard_char, glyph_index ));\n\n      error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );\n      if ( error || face->glyph->outline.n_points <= 0 )\n        goto Exit;\n\n      FT_ZERO( dummy );\n\n      dummy->units_per_em = metrics->units_per_em;\n\n      scaler->x_scale = 0x10000L;\n      scaler->y_scale = 0x10000L;\n      scaler->x_delta = 0;\n      scaler->y_delta = 0;\n\n      scaler->face        = face;\n      scaler->render_mode = FT_RENDER_MODE_NORMAL;\n      scaler->flags       = 0;\n\n      af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy );\n\n      error = af_glyph_hints_reload( hints, &face->glyph->outline );\n      if ( error )\n        goto Exit;\n\n      for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n      {\n        AF_LatinAxis  axis    = &metrics->axis[dim];\n        AF_AxisHints  axhints = &hints->axis[dim];\n        AF_Segment    seg, limit, link;\n        FT_UInt       num_widths = 0;\n\n\n        error = af_latin_hints_compute_segments( hints,\n                                                 (AF_Dimension)dim );\n        if ( error )\n          goto Exit;\n\n        /*\n         *  We assume that the glyphs selected for the stem width\n         *  computation are `featureless' enough so that the linking\n         *  algorithm works fine without adjustments of its scoring\n         *  function.\n         */\n        af_latin_hints_link_segments( hints,\n                                      0,\n                                      NULL,\n                                      (AF_Dimension)dim );\n\n        seg   = axhints->segments;\n        limit = seg + axhints->num_segments;\n\n        for ( ; seg < limit; seg++ )\n        {\n          link = seg->link;\n\n          /* we only consider stem segments there! */\n          if ( link && link->link == seg && link > seg )\n          {\n            FT_Pos  dist;\n\n\n            dist = seg->pos - link->pos;\n            if ( dist < 0 )\n              dist = -dist;\n\n            if ( num_widths < AF_LATIN_MAX_WIDTHS )\n              axis->widths[num_widths++].org = dist;\n          }\n        }\n\n        /* this also replaces multiple almost identical stem widths */\n        /* with a single one (the value 100 is heuristic)           */\n        af_sort_and_quantize_widths( &num_widths, axis->widths,\n                                     dummy->units_per_em / 100 );\n        axis->width_count = num_widths;\n      }\n\n    Exit:\n      for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n      {\n        AF_LatinAxis  axis = &metrics->axis[dim];\n        FT_Pos        stdw;\n\n\n        stdw = ( axis->width_count > 0 ) ? axis->widths[0].org\n                                         : AF_LATIN_CONSTANT( metrics, 50 );\n\n        /* let's try 20% of the smallest width */\n        axis->edge_distance_threshold = stdw / 5;\n        axis->standard_width          = stdw;\n        axis->extra_light             = 0;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        {\n          FT_UInt  i;\n\n\n          FT_TRACE5(( \"%s widths:\\n\",\n                      dim == AF_DIMENSION_VERT ? \"horizontal\"\n                                               : \"vertical\" ));\n\n          FT_TRACE5(( \"  %d (standard)\", axis->standard_width ));\n          for ( i = 1; i < axis->width_count; i++ )\n            FT_TRACE5(( \" %d\", axis->widths[i].org ));\n\n          FT_TRACE5(( \"\\n\" ));\n        }\n#endif\n      }\n    }\n\n    FT_TRACE5(( \"\\n\" ));\n\n    af_glyph_hints_done( hints );\n  }\n\n\n  /* Find all blue zones.  Flat segments give the reference points, */\n  /* round segments the overshoot positions.                        */\n\n  static void\n  af_latin_metrics_init_blues( AF_LatinMetrics  metrics,\n                               FT_Face          face )\n  {\n    FT_Pos        flats [AF_BLUE_STRING_MAX_LEN];\n    FT_Pos        rounds[AF_BLUE_STRING_MAX_LEN];\n\n    FT_Int        num_flats;\n    FT_Int        num_rounds;\n\n    AF_LatinBlue  blue;\n    FT_Error      error;\n    AF_LatinAxis  axis = &metrics->axis[AF_DIMENSION_VERT];\n    FT_Outline    outline;\n\n    AF_StyleClass  sc = metrics->root.style_class;\n\n    AF_Blue_Stringset         bss = sc->blue_stringset;\n    const AF_Blue_StringRec*  bs  = &af_blue_stringsets[bss];\n\n\n    /* we walk over the blue character strings as specified in the */\n    /* style's entry in the `af_blue_stringset' array              */\n\n    FT_TRACE5(( \"latin blue zones computation\\n\"\n                \"============================\\n\"\n                \"\\n\" ));\n\n    for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ )\n    {\n      const char*  p = &af_blue_strings[bs->string];\n      FT_Pos*      blue_ref;\n      FT_Pos*      blue_shoot;\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n      {\n        FT_Bool  have_flag = 0;\n\n\n        FT_TRACE5(( \"blue zone %d\", axis->blue_count ));\n\n        if ( bs->properties )\n        {\n          FT_TRACE5(( \" (\" ));\n\n          if ( AF_LATIN_IS_TOP_BLUE( bs ) )\n          {\n            FT_TRACE5(( \"top\" ));\n            have_flag = 1;\n          }\n\n          if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) )\n          {\n            if ( have_flag )\n              FT_TRACE5(( \", \" ));\n            FT_TRACE5(( \"neutral\" ));\n            have_flag = 1;\n          }\n\n          if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) )\n          {\n            if ( have_flag )\n              FT_TRACE5(( \", \" ));\n            FT_TRACE5(( \"small top\" ));\n            have_flag = 1;\n          }\n\n          if ( AF_LATIN_IS_LONG_BLUE( bs ) )\n          {\n            if ( have_flag )\n              FT_TRACE5(( \", \" ));\n            FT_TRACE5(( \"long\" ));\n          }\n\n          FT_TRACE5(( \")\" ));\n        }\n\n        FT_TRACE5(( \":\\n\" ));\n      }\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n      num_flats  = 0;\n      num_rounds = 0;\n\n      while ( *p )\n      {\n        FT_ULong    ch;\n        FT_ULong    glyph_index;\n        FT_Long     y_offset;\n        FT_Pos      best_y;                            /* same as points.y */\n        FT_Int      best_point, best_contour_first, best_contour_last;\n        FT_Vector*  points;\n        FT_Bool     round = 0;\n\n\n        GET_UTF8_CHAR( ch, p );\n\n        /* load the character in the face -- skip unknown or empty ones */\n        af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset );\n        if ( glyph_index == 0 )\n        {\n          FT_TRACE5(( \"  U+%04lX unavailable\\n\", ch ));\n          continue;\n        }\n\n        error   = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );\n        outline = face->glyph->outline;\n        if ( error || outline.n_points <= 0 )\n        {\n          FT_TRACE5(( \"  U+%04lX contains no outlines\\n\", ch ));\n          continue;\n        }\n\n        /* now compute min or max point indices and coordinates */\n        points             = outline.points;\n        best_point         = -1;\n        best_y             = 0;  /* make compiler happy */\n        best_contour_first = 0;  /* ditto */\n        best_contour_last  = 0;  /* ditto */\n\n        {\n          FT_Int  nn;\n          FT_Int  first = 0;\n          FT_Int  last  = -1;\n\n\n          for ( nn = 0; nn < outline.n_contours; first = last + 1, nn++ )\n          {\n            FT_Int  old_best_point = best_point;\n            FT_Int  pp;\n\n\n            last = outline.contours[nn];\n\n            /* Avoid single-point contours since they are never rasterized. */\n            /* In some fonts, they correspond to mark attachment points     */\n            /* that are way outside of the glyph's real outline.            */\n            if ( last <= first )\n              continue;\n\n            if ( AF_LATIN_IS_TOP_BLUE( bs ) )\n            {\n              for ( pp = first; pp <= last; pp++ )\n                if ( best_point < 0 || points[pp].y > best_y )\n                {\n                  best_point = pp;\n                  best_y     = points[pp].y;\n                }\n            }\n            else\n            {\n              for ( pp = first; pp <= last; pp++ )\n                if ( best_point < 0 || points[pp].y < best_y )\n                {\n                  best_point = pp;\n                  best_y     = points[pp].y;\n                }\n            }\n\n            if ( best_point != old_best_point )\n            {\n              best_contour_first = first;\n              best_contour_last  = last;\n            }\n          }\n        }\n\n        /* now check whether the point belongs to a straight or round   */\n        /* segment; we first need to find in which contour the extremum */\n        /* lies, then inspect its previous and next points              */\n        if ( best_point >= 0 )\n        {\n          FT_Pos  best_x = points[best_point].x;\n          FT_Int  prev, next;\n          FT_Int  best_segment_first, best_segment_last;\n          FT_Int  best_on_point_first, best_on_point_last;\n          FT_Pos  dist;\n\n\n          best_segment_first = best_point;\n          best_segment_last  = best_point;\n\n          if ( FT_CURVE_TAG( outline.tags[best_point] ) == FT_CURVE_TAG_ON )\n          {\n            best_on_point_first = best_point;\n            best_on_point_last  = best_point;\n          }\n          else\n          {\n            best_on_point_first = -1;\n            best_on_point_last  = -1;\n          }\n\n          /* look for the previous and next points on the contour  */\n          /* that are not on the same Y coordinate, then threshold */\n          /* the `closeness'...                                    */\n          prev = best_point;\n          next = prev;\n\n          do\n          {\n            if ( prev > best_contour_first )\n              prev--;\n            else\n              prev = best_contour_last;\n\n            dist = FT_ABS( points[prev].y - best_y );\n            /* accept a small distance or a small angle (both values are */\n            /* heuristic; value 20 corresponds to approx. 2.9 degrees)   */\n            if ( dist > 5 )\n              if ( FT_ABS( points[prev].x - best_x ) <= 20 * dist )\n                break;\n\n            best_segment_first = prev;\n\n            if ( FT_CURVE_TAG( outline.tags[prev] ) == FT_CURVE_TAG_ON )\n            {\n              best_on_point_first = prev;\n              if ( best_on_point_last < 0 )\n                best_on_point_last = prev;\n            }\n\n          } while ( prev != best_point );\n\n          do\n          {\n            if ( next < best_contour_last )\n              next++;\n            else\n              next = best_contour_first;\n\n            dist = FT_ABS( points[next].y - best_y );\n            if ( dist > 5 )\n              if ( FT_ABS( points[next].x - best_x ) <= 20 * dist )\n                break;\n\n            best_segment_last = next;\n\n            if ( FT_CURVE_TAG( outline.tags[next] ) == FT_CURVE_TAG_ON )\n            {\n              best_on_point_last = next;\n              if ( best_on_point_first < 0 )\n                best_on_point_first = next;\n            }\n\n          } while ( next != best_point );\n\n          if ( AF_LATIN_IS_LONG_BLUE( bs ) )\n          {\n            /* If this flag is set, we have an additional constraint to  */\n            /* get the blue zone distance: Find a segment of the topmost */\n            /* (or bottommost) contour that is longer than a heuristic   */\n            /* threshold.  This ensures that small bumps in the outline  */\n            /* are ignored (for example, the `vertical serifs' found in  */\n            /* many Hebrew glyph designs).                               */\n\n            /* If this segment is long enough, we are done.  Otherwise,  */\n            /* search the segment next to the extremum that is long      */\n            /* enough, has the same direction, and a not too large       */\n            /* vertical distance from the extremum.  Note that the       */\n            /* algorithm doesn't check whether the found segment is      */\n            /* actually the one (vertically) nearest to the extremum.    */\n\n            /* heuristic threshold value */\n            FT_Pos  length_threshold = metrics->units_per_em / 25;\n\n\n            dist = FT_ABS( points[best_segment_last].x -\n                             points[best_segment_first].x );\n\n            if ( dist < length_threshold                       &&\n                 best_segment_last - best_segment_first + 2 <=\n                   best_contour_last - best_contour_first      )\n            {\n              /* heuristic threshold value */\n              FT_Pos  height_threshold = metrics->units_per_em / 4;\n\n              FT_Int   first;\n              FT_Int   last;\n              FT_Bool  hit;\n\n              /* we intentionally declare these two variables        */\n              /* outside of the loop since various compilers emit    */\n              /* incorrect warning messages otherwise, talking about */\n              /* `possibly uninitialized variables'                  */\n              FT_Int  p_first = 0;            /* make compiler happy */\n              FT_Int  p_last  = 0;\n\n              FT_Bool  left2right;\n\n\n              /* compute direction */\n              prev = best_point;\n\n              do\n              {\n                if ( prev > best_contour_first )\n                  prev--;\n                else\n                  prev = best_contour_last;\n\n                if ( points[prev].x != best_x )\n                  break;\n\n              } while ( prev != best_point );\n\n              /* skip glyph for the degenerate case */\n              if ( prev == best_point )\n                continue;\n\n              left2right = FT_BOOL( points[prev].x < points[best_point].x );\n\n              first = best_segment_last;\n              last  = first;\n              hit   = 0;\n\n              do\n              {\n                FT_Bool  l2r;\n                FT_Pos   d;\n\n\n                if ( !hit )\n                {\n                  /* no hit; adjust first point */\n                  first = last;\n\n                  /* also adjust first and last on point */\n                  if ( FT_CURVE_TAG( outline.tags[first] ) ==\n                         FT_CURVE_TAG_ON )\n                  {\n                    p_first = first;\n                    p_last  = first;\n                  }\n                  else\n                  {\n                    p_first = -1;\n                    p_last  = -1;\n                  }\n\n                  hit = 1;\n                }\n\n                if ( last < best_contour_last )\n                  last++;\n                else\n                  last = best_contour_first;\n\n                if ( FT_ABS( best_y - points[first].y ) > height_threshold )\n                {\n                  /* vertical distance too large */\n                  hit = 0;\n                  continue;\n                }\n\n                /* same test as above */\n                dist = FT_ABS( points[last].y - points[first].y );\n                if ( dist > 5 )\n                  if ( FT_ABS( points[last].x - points[first].x ) <=\n                         20 * dist )\n                  {\n                    hit = 0;\n                    continue;\n                  }\n\n                if ( FT_CURVE_TAG( outline.tags[last] ) == FT_CURVE_TAG_ON )\n                {\n                  p_last = last;\n                  if ( p_first < 0 )\n                    p_first = last;\n                }\n\n                l2r = FT_BOOL( points[first].x < points[last].x );\n                d   = FT_ABS( points[last].x - points[first].x );\n\n                if ( l2r == left2right     &&\n                     d >= length_threshold )\n                {\n                  /* all constraints are met; update segment after finding */\n                  /* its end                                               */\n                  do\n                  {\n                    if ( last < best_contour_last )\n                      last++;\n                    else\n                      last = best_contour_first;\n\n                    d = FT_ABS( points[last].y - points[first].y );\n                    if ( d > 5 )\n                      if ( FT_ABS( points[next].x - points[first].x ) <=\n                             20 * dist )\n                      {\n                        if ( last > best_contour_first )\n                          last--;\n                        else\n                          last = best_contour_last;\n                        break;\n                      }\n\n                    p_last = last;\n\n                    if ( FT_CURVE_TAG( outline.tags[last] ) ==\n                           FT_CURVE_TAG_ON )\n                    {\n                      p_last = last;\n                      if ( p_first < 0 )\n                        p_first = last;\n                    }\n\n                  } while ( last != best_segment_first );\n\n                  best_y = points[first].y;\n\n                  best_segment_first = first;\n                  best_segment_last  = last;\n\n                  best_on_point_first = p_first;\n                  best_on_point_last  = p_last;\n\n                  break;\n                }\n\n              } while ( last != best_segment_first );\n            }\n          }\n\n          /* for computing blue zones, we add the y offset as returned */\n          /* by the currently used OpenType feature -- for example,    */\n          /* superscript glyphs might be identical to subscript glyphs */\n          /* with a vertical shift                                     */\n          best_y += y_offset;\n\n          FT_TRACE5(( \"  U+%04lX: best_y = %5ld\", ch, best_y ));\n\n          /* now set the `round' flag depending on the segment's kind: */\n          /*                                                           */\n          /* - if the horizontal distance between the first and last   */\n          /*   `on' point is larger than upem/8 (value 8 is heuristic) */\n          /*   we have a flat segment                                  */\n          /* - if either the first or the last point of the segment is */\n          /*   an `off' point, the segment is round, otherwise it is   */\n          /*   flat                                                    */\n          if ( best_on_point_first >= 0                               &&\n               best_on_point_last >= 0                                &&\n               (FT_UInt)( FT_ABS( points[best_on_point_last].x -\n                                  points[best_on_point_first].x ) ) >\n                 metrics->units_per_em / 8                            )\n            round = 0;\n          else\n            round = FT_BOOL(\n                      FT_CURVE_TAG( outline.tags[best_segment_first] ) !=\n                        FT_CURVE_TAG_ON                                   ||\n                      FT_CURVE_TAG( outline.tags[best_segment_last]  ) !=\n                        FT_CURVE_TAG_ON                                   );\n\n          if ( round && AF_LATIN_IS_NEUTRAL_BLUE( bs ) )\n          {\n            /* only use flat segments for a neutral blue zone */\n            FT_TRACE5(( \" (round, skipped)\\n\" ));\n            continue;\n          }\n\n          FT_TRACE5(( \" (%s)\\n\", round ? \"round\" : \"flat\" ));\n        }\n\n        if ( round )\n          rounds[num_rounds++] = best_y;\n        else\n          flats[num_flats++]   = best_y;\n      }\n\n      if ( num_flats == 0 && num_rounds == 0 )\n      {\n        /*\n         *  we couldn't find a single glyph to compute this blue zone,\n         *  we will simply ignore it then\n         */\n        FT_TRACE5(( \"  empty\\n\" ));\n        continue;\n      }\n\n      /* we have computed the contents of the `rounds' and `flats' tables, */\n      /* now determine the reference and overshoot position of the blue -- */\n      /* we simply take the median value after a simple sort               */\n      af_sort_pos( num_rounds, rounds );\n      af_sort_pos( num_flats,  flats );\n\n      blue       = &axis->blues[axis->blue_count];\n      blue_ref   = &blue->ref.org;\n      blue_shoot = &blue->shoot.org;\n\n      axis->blue_count++;\n\n      if ( num_flats == 0 )\n      {\n        *blue_ref   =\n        *blue_shoot = rounds[num_rounds / 2];\n      }\n      else if ( num_rounds == 0 )\n      {\n        *blue_ref   =\n        *blue_shoot = flats[num_flats / 2];\n      }\n      else\n      {\n        *blue_ref   = flats [num_flats  / 2];\n        *blue_shoot = rounds[num_rounds / 2];\n      }\n\n      /* there are sometimes problems: if the overshoot position of top     */\n      /* zones is under its reference position, or the opposite for bottom  */\n      /* zones.  We must thus check everything there and correct the errors */\n      if ( *blue_shoot != *blue_ref )\n      {\n        FT_Pos   ref      = *blue_ref;\n        FT_Pos   shoot    = *blue_shoot;\n        FT_Bool  over_ref = FT_BOOL( shoot > ref );\n\n\n        if ( AF_LATIN_IS_TOP_BLUE( bs ) ^ over_ref )\n        {\n          *blue_ref   =\n          *blue_shoot = ( shoot + ref ) / 2;\n\n          FT_TRACE5(( \"  [overshoot smaller than reference,\"\n                      \" taking mean value]\\n\" ));\n        }\n      }\n\n      blue->flags = 0;\n      if ( AF_LATIN_IS_TOP_BLUE( bs ) )\n        blue->flags |= AF_LATIN_BLUE_TOP;\n      if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) )\n        blue->flags |= AF_LATIN_BLUE_NEUTRAL;\n\n      /*\n       * The following flag is used later to adjust the y and x scales\n       * in order to optimize the pixel grid alignment of the top of small\n       * letters.\n       */\n      if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) )\n        blue->flags |= AF_LATIN_BLUE_ADJUSTMENT;\n\n      FT_TRACE5(( \"    -> reference = %ld\\n\"\n                  \"       overshoot = %ld\\n\",\n                  *blue_ref, *blue_shoot ));\n    }\n\n    FT_TRACE5(( \"\\n\" ));\n\n    return;\n  }\n\n\n  /* Check whether all ASCII digits have the same advance width. */\n\n  FT_LOCAL_DEF( void )\n  af_latin_metrics_check_digits( AF_LatinMetrics  metrics,\n                                 FT_Face          face )\n  {\n    FT_UInt   i;\n    FT_Bool   started = 0, same_width = 1;\n    FT_Fixed  advance, old_advance = 0;\n\n\n    /* digit `0' is 0x30 in all supported charmaps */\n    for ( i = 0x30; i <= 0x39; i++ )\n    {\n      FT_ULong  glyph_index;\n      FT_Long   y_offset;\n\n\n      af_get_char_index( &metrics->root, i, &glyph_index, &y_offset );\n      if ( glyph_index == 0 )\n        continue;\n\n      if ( FT_Get_Advance( face, glyph_index,\n                           FT_LOAD_NO_SCALE         |\n                           FT_LOAD_NO_HINTING       |\n                           FT_LOAD_IGNORE_TRANSFORM,\n                           &advance ) )\n        continue;\n\n      if ( started )\n      {\n        if ( advance != old_advance )\n        {\n          same_width = 0;\n          break;\n        }\n      }\n      else\n      {\n        old_advance = advance;\n        started     = 1;\n      }\n    }\n\n    metrics->root.digits_have_same_width = same_width;\n  }\n\n\n  /* Initialize global metrics. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_latin_metrics_init( AF_LatinMetrics  metrics,\n                         FT_Face          face )\n  {\n    FT_CharMap  oldmap = face->charmap;\n\n\n    metrics->units_per_em = face->units_per_EM;\n\n    if ( !FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )\n    {\n      af_latin_metrics_init_widths( metrics, face );\n      af_latin_metrics_init_blues( metrics, face );\n      af_latin_metrics_check_digits( metrics, face );\n    }\n\n    FT_Set_Charmap( face, oldmap );\n    return FT_Err_Ok;\n  }\n\n\n  /* Adjust scaling value, then scale and shift widths   */\n  /* and blue zones (if applicable) for given dimension. */\n\n  static void\n  af_latin_metrics_scale_dim( AF_LatinMetrics  metrics,\n                              AF_Scaler        scaler,\n                              AF_Dimension     dim )\n  {\n    FT_Fixed      scale;\n    FT_Pos        delta;\n    AF_LatinAxis  axis;\n    FT_UInt       nn;\n\n\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      scale = scaler->x_scale;\n      delta = scaler->x_delta;\n    }\n    else\n    {\n      scale = scaler->y_scale;\n      delta = scaler->y_delta;\n    }\n\n    axis = &metrics->axis[dim];\n\n    if ( axis->org_scale == scale && axis->org_delta == delta )\n      return;\n\n    axis->org_scale = scale;\n    axis->org_delta = delta;\n\n    /*\n     * correct X and Y scale to optimize the alignment of the top of small\n     * letters to the pixel grid\n     */\n    {\n      AF_LatinAxis  Axis = &metrics->axis[AF_DIMENSION_VERT];\n      AF_LatinBlue  blue = NULL;\n\n\n      for ( nn = 0; nn < Axis->blue_count; nn++ )\n      {\n        if ( Axis->blues[nn].flags & AF_LATIN_BLUE_ADJUSTMENT )\n        {\n          blue = &Axis->blues[nn];\n          break;\n        }\n      }\n\n      if ( blue )\n      {\n        FT_Pos   scaled;\n        FT_Pos   threshold;\n        FT_Pos   fitted;\n        FT_UInt  limit;\n        FT_UInt  ppem;\n\n\n        scaled    = FT_MulFix( blue->shoot.org, scaler->y_scale );\n        ppem      = metrics->root.scaler.face->size->metrics.x_ppem;\n        limit     = metrics->root.globals->increase_x_height;\n        threshold = 40;\n\n        /* if the `increase-x-height' property is active, */\n        /* we round up much more often                    */\n        if ( limit                                 &&\n             ppem <= limit                         &&\n             ppem >= AF_PROP_INCREASE_X_HEIGHT_MIN )\n          threshold = 52;\n\n        fitted = ( scaled + threshold ) & ~63;\n\n        if ( scaled != fitted )\n        {\n#if 0\n          if ( dim == AF_DIMENSION_HORZ )\n          {\n            if ( fitted < scaled )\n              scale -= scale / 50;  /* scale *= 0.98 */\n          }\n          else\n#endif\n          if ( dim == AF_DIMENSION_VERT )\n          {\n            scale = FT_MulDiv( scale, fitted, scaled );\n\n            FT_TRACE5((\n              \"af_latin_metrics_scale_dim:\"\n              \" x height alignment (style `%s'):\\n\"\n              \"                           \"\n              \" vertical scaling changed from %.4f to %.4f (by %d%%)\\n\"\n              \"\\n\",\n              af_style_names[metrics->root.style_class->style],\n              axis->org_scale / 65536.0,\n              scale / 65536.0,\n              ( fitted - scaled ) * 100 / scaled ));\n          }\n        }\n      }\n    }\n\n    axis->scale = scale;\n    axis->delta = delta;\n\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      metrics->root.scaler.x_scale = scale;\n      metrics->root.scaler.x_delta = delta;\n    }\n    else\n    {\n      metrics->root.scaler.y_scale = scale;\n      metrics->root.scaler.y_delta = delta;\n    }\n\n    FT_TRACE5(( \"%s widths (style `%s')\\n\",\n                dim == AF_DIMENSION_HORZ ? \"horizontal\" : \"vertical\",\n                af_style_names[metrics->root.style_class->style] ));\n\n    /* scale the widths */\n    for ( nn = 0; nn < axis->width_count; nn++ )\n    {\n      AF_Width  width = axis->widths + nn;\n\n\n      width->cur = FT_MulFix( width->org, scale );\n      width->fit = width->cur;\n\n      FT_TRACE5(( \"  %d scaled to %.2f\\n\",\n                  width->org,\n                  width->cur / 64.0 ));\n    }\n\n    FT_TRACE5(( \"\\n\" ));\n\n    /* an extra-light axis corresponds to a standard width that is */\n    /* smaller than 5/8 pixels                                     */\n    axis->extra_light =\n      (FT_Bool)( FT_MulFix( axis->standard_width, scale ) < 32 + 8 );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    if ( axis->extra_light )\n      FT_TRACE5(( \"`%s' style is extra light (at current resolution)\\n\"\n                  \"\\n\",\n                  af_style_names[metrics->root.style_class->style] ));\n#endif\n\n    if ( dim == AF_DIMENSION_VERT )\n    {\n      FT_TRACE5(( \"blue zones (style `%s')\\n\",\n                  af_style_names[metrics->root.style_class->style] ));\n\n      /* scale the blue zones */\n      for ( nn = 0; nn < axis->blue_count; nn++ )\n      {\n        AF_LatinBlue  blue = &axis->blues[nn];\n        FT_Pos        dist;\n\n\n        blue->ref.cur   = FT_MulFix( blue->ref.org, scale ) + delta;\n        blue->ref.fit   = blue->ref.cur;\n        blue->shoot.cur = FT_MulFix( blue->shoot.org, scale ) + delta;\n        blue->shoot.fit = blue->shoot.cur;\n        blue->flags    &= ~AF_LATIN_BLUE_ACTIVE;\n\n        /* a blue zone is only active if it is less than 3/4 pixels tall */\n        dist = FT_MulFix( blue->ref.org - blue->shoot.org, scale );\n        if ( dist <= 48 && dist >= -48 )\n        {\n#if 0\n          FT_Pos  delta1;\n#endif\n          FT_Pos  delta2;\n\n\n          /* use discrete values for blue zone widths */\n\n#if 0\n\n          /* generic, original code */\n          delta1 = blue->shoot.org - blue->ref.org;\n          delta2 = delta1;\n          if ( delta1 < 0 )\n            delta2 = -delta2;\n\n          delta2 = FT_MulFix( delta2, scale );\n\n          if ( delta2 < 32 )\n            delta2 = 0;\n          else if ( delta2 < 64 )\n            delta2 = 32 + ( ( ( delta2 - 32 ) + 16 ) & ~31 );\n          else\n            delta2 = FT_PIX_ROUND( delta2 );\n\n          if ( delta1 < 0 )\n            delta2 = -delta2;\n\n          blue->ref.fit   = FT_PIX_ROUND( blue->ref.cur );\n          blue->shoot.fit = blue->ref.fit + delta2;\n\n#else\n\n          /* simplified version due to abs(dist) <= 48 */\n          delta2 = dist;\n          if ( dist < 0 )\n            delta2 = -delta2;\n\n          if ( delta2 < 32 )\n            delta2 = 0;\n          else if ( delta2 < 48 )\n            delta2 = 32;\n          else\n            delta2 = 64;\n\n          if ( dist < 0 )\n            delta2 = -delta2;\n\n          blue->ref.fit   = FT_PIX_ROUND( blue->ref.cur );\n          blue->shoot.fit = blue->ref.fit - delta2;\n\n#endif\n\n          blue->flags |= AF_LATIN_BLUE_ACTIVE;\n\n          FT_TRACE5(( \"  reference %d: %d scaled to %.2f%s\\n\"\n                      \"  overshoot %d: %d scaled to %.2f%s\\n\",\n                      nn,\n                      blue->ref.org,\n                      blue->ref.fit / 64.0,\n                      blue->flags & AF_LATIN_BLUE_ACTIVE ? \"\"\n                                                         : \" (inactive)\",\n                      nn,\n                      blue->shoot.org,\n                      blue->shoot.fit / 64.0,\n                      blue->flags & AF_LATIN_BLUE_ACTIVE ? \"\"\n                                                         : \" (inactive)\" ));\n        }\n      }\n    }\n  }\n\n\n  /* Scale global values in both directions. */\n\n  FT_LOCAL_DEF( void )\n  af_latin_metrics_scale( AF_LatinMetrics  metrics,\n                          AF_Scaler        scaler )\n  {\n    metrics->root.scaler.render_mode = scaler->render_mode;\n    metrics->root.scaler.face        = scaler->face;\n    metrics->root.scaler.flags       = scaler->flags;\n\n    af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ );\n    af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_VERT );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****           L A T I N   G L Y P H   A N A L Y S I S             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* Walk over all contours and compute its segments. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_latin_hints_compute_segments( AF_GlyphHints  hints,\n                                   AF_Dimension   dim )\n  {\n    AF_AxisHints   axis          = &hints->axis[dim];\n    FT_Memory      memory        = hints->memory;\n    FT_Error       error         = FT_Err_Ok;\n    AF_Segment     segment       = NULL;\n    AF_SegmentRec  seg0;\n    AF_Point*      contour       = hints->contours;\n    AF_Point*      contour_limit = contour + hints->num_contours;\n    AF_Direction   major_dir, segment_dir;\n\n\n    FT_ZERO( &seg0 );\n    seg0.score = 32000;\n    seg0.flags = AF_EDGE_NORMAL;\n\n    major_dir   = (AF_Direction)FT_ABS( axis->major_dir );\n    segment_dir = major_dir;\n\n    axis->num_segments = 0;\n\n    /* set up (u,v) in each point */\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      AF_Point  point = hints->points;\n      AF_Point  limit = point + hints->num_points;\n\n\n      for ( ; point < limit; point++ )\n      {\n        point->u = point->fx;\n        point->v = point->fy;\n      }\n    }\n    else\n    {\n      AF_Point  point = hints->points;\n      AF_Point  limit = point + hints->num_points;\n\n\n      for ( ; point < limit; point++ )\n      {\n        point->u = point->fy;\n        point->v = point->fx;\n      }\n    }\n\n    /* do each contour separately */\n    for ( ; contour < contour_limit; contour++ )\n    {\n      AF_Point  point   =  contour[0];\n      AF_Point  last    =  point->prev;\n      int       on_edge =  0;\n      FT_Pos    min_pos =  32000;  /* minimum segment pos != min_coord */\n      FT_Pos    max_pos = -32000;  /* maximum segment pos != max_coord */\n      FT_Bool   passed;\n\n\n      if ( point == last )  /* skip singletons -- just in case */\n        continue;\n\n      if ( FT_ABS( last->out_dir )  == major_dir &&\n           FT_ABS( point->out_dir ) == major_dir )\n      {\n        /* we are already on an edge, try to locate its start */\n        last = point;\n\n        for (;;)\n        {\n          point = point->prev;\n          if ( FT_ABS( point->out_dir ) != major_dir )\n          {\n            point = point->next;\n            break;\n          }\n          if ( point == last )\n            break;\n        }\n      }\n\n      last   = point;\n      passed = 0;\n\n      for (;;)\n      {\n        FT_Pos  u, v;\n\n\n        if ( on_edge )\n        {\n          u = point->u;\n          if ( u < min_pos )\n            min_pos = u;\n          if ( u > max_pos )\n            max_pos = u;\n\n          if ( point->out_dir != segment_dir || point == last )\n          {\n            /* we are just leaving an edge; record a new segment! */\n            segment->last = point;\n            segment->pos  = (FT_Short)( ( min_pos + max_pos ) >> 1 );\n\n            /* a segment is round if either its first or last point */\n            /* is a control point                                   */\n            if ( ( segment->first->flags | point->flags ) &\n                 AF_FLAG_CONTROL                          )\n              segment->flags |= AF_EDGE_ROUND;\n\n            /* compute segment size */\n            min_pos = max_pos = point->v;\n\n            v = segment->first->v;\n            if ( v < min_pos )\n              min_pos = v;\n            if ( v > max_pos )\n              max_pos = v;\n\n            segment->min_coord = (FT_Short)min_pos;\n            segment->max_coord = (FT_Short)max_pos;\n            segment->height    = (FT_Short)( segment->max_coord -\n                                             segment->min_coord );\n\n            on_edge = 0;\n            segment = NULL;\n            /* fall through */\n          }\n        }\n\n        /* now exit if we are at the start/end point */\n        if ( point == last )\n        {\n          if ( passed )\n            break;\n          passed = 1;\n        }\n\n        if ( !on_edge && FT_ABS( point->out_dir ) == major_dir )\n        {\n          /* this is the start of a new segment! */\n          segment_dir = (AF_Direction)point->out_dir;\n\n          error = af_axis_hints_new_segment( axis, memory, &segment );\n          if ( error )\n            goto Exit;\n\n          /* clear all segment fields */\n          segment[0] = seg0;\n\n          segment->dir      = (FT_Char)segment_dir;\n          min_pos = max_pos = point->u;\n          segment->first    = point;\n          segment->last     = point;\n\n          on_edge = 1;\n        }\n\n        point = point->next;\n      }\n\n    } /* contours */\n\n\n    /* now slightly increase the height of segments if this makes */\n    /* sense -- this is used to better detect and ignore serifs   */\n    {\n      AF_Segment  segments     = axis->segments;\n      AF_Segment  segments_end = segments + axis->num_segments;\n\n\n      for ( segment = segments; segment < segments_end; segment++ )\n      {\n        AF_Point  first   = segment->first;\n        AF_Point  last    = segment->last;\n        FT_Pos    first_v = first->v;\n        FT_Pos    last_v  = last->v;\n\n\n        if ( first_v < last_v )\n        {\n          AF_Point  p;\n\n\n          p = first->prev;\n          if ( p->v < first_v )\n            segment->height = (FT_Short)( segment->height +\n                                          ( ( first_v - p->v ) >> 1 ) );\n\n          p = last->next;\n          if ( p->v > last_v )\n            segment->height = (FT_Short)( segment->height +\n                                          ( ( p->v - last_v ) >> 1 ) );\n        }\n        else\n        {\n          AF_Point  p;\n\n\n          p = first->prev;\n          if ( p->v > first_v )\n            segment->height = (FT_Short)( segment->height +\n                                          ( ( p->v - first_v ) >> 1 ) );\n\n          p = last->next;\n          if ( p->v < last_v )\n            segment->height = (FT_Short)( segment->height +\n                                          ( ( last_v - p->v ) >> 1 ) );\n        }\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* Link segments to form stems and serifs.  If `width_count' and      */\n  /* `widths' are non-zero, use them to fine-tune the scoring function. */\n\n  FT_LOCAL_DEF( void )\n  af_latin_hints_link_segments( AF_GlyphHints  hints,\n                                FT_UInt        width_count,\n                                AF_WidthRec*   widths,\n                                AF_Dimension   dim )\n  {\n    AF_AxisHints  axis          = &hints->axis[dim];\n    AF_Segment    segments      = axis->segments;\n    AF_Segment    segment_limit = segments + axis->num_segments;\n    FT_Pos        len_threshold, len_score, dist_score, max_width;\n    AF_Segment    seg1, seg2;\n\n\n    if ( width_count )\n      max_width = widths[width_count - 1].org;\n    else\n      max_width = 0;\n\n    /* a heuristic value to set up a minimum value for overlapping */\n    len_threshold = AF_LATIN_CONSTANT( hints->metrics, 8 );\n    if ( len_threshold == 0 )\n      len_threshold = 1;\n\n    /* a heuristic value to weight lengths */\n    len_score = AF_LATIN_CONSTANT( hints->metrics, 6000 );\n\n    /* a heuristic value to weight distances (no call to    */\n    /* AF_LATIN_CONSTANT needed, since we work on multiples */\n    /* of the stem width)                                   */\n    dist_score = 3000;\n\n    /* now compare each segment to the others */\n    for ( seg1 = segments; seg1 < segment_limit; seg1++ )\n    {\n      if ( seg1->dir != axis->major_dir )\n        continue;\n\n      /* search for stems having opposite directions, */\n      /* with seg1 to the `left' of seg2              */\n      for ( seg2 = segments; seg2 < segment_limit; seg2++ )\n      {\n        FT_Pos  pos1 = seg1->pos;\n        FT_Pos  pos2 = seg2->pos;\n\n\n        if ( seg1->dir + seg2->dir == 0 && pos2 > pos1 )\n        {\n          /* compute distance between the two segments */\n          FT_Pos  min = seg1->min_coord;\n          FT_Pos  max = seg1->max_coord;\n          FT_Pos  len;\n\n\n          if ( min < seg2->min_coord )\n            min = seg2->min_coord;\n\n          if ( max > seg2->max_coord )\n            max = seg2->max_coord;\n\n          /* compute maximum coordinate difference of the two segments */\n          /* (this is, how much they overlap)                          */\n          len = max - min;\n          if ( len >= len_threshold )\n          {\n            /*\n             *  The score is the sum of two demerits indicating the\n             *  `badness' of a fit, measured along the segments' main axis\n             *  and orthogonal to it, respectively.\n             *\n             *  o The less overlapping along the main axis, the worse it\n             *    is, causing a larger demerit.\n             *\n             *  o The nearer the orthogonal distance to a stem width, the\n             *    better it is, causing a smaller demerit.  For simplicity,\n             *    however, we only increase the demerit for values that\n             *    exceed the largest stem width.\n             */\n\n            FT_Pos  dist = pos2 - pos1;\n\n            FT_Pos  dist_demerit, score;\n\n\n            if ( max_width )\n            {\n              /* distance demerits are based on multiples of `max_width'; */\n              /* we scale by 1024 for getting more precision              */\n              FT_Pos  delta = ( dist << 10 ) / max_width - ( 1 << 10 );\n\n\n              if ( delta > 10000 )\n                dist_demerit = 32000;\n              else if ( delta > 0 )\n                dist_demerit = delta * delta / dist_score;\n              else\n                dist_demerit = 0;\n            }\n            else\n              dist_demerit = dist; /* default if no widths available */\n\n            score = dist_demerit + len_score / len;\n\n            /* and we search for the smallest score */\n            if ( score < seg1->score )\n            {\n              seg1->score = score;\n              seg1->link  = seg2;\n            }\n\n            if ( score < seg2->score )\n            {\n              seg2->score = score;\n              seg2->link  = seg1;\n            }\n          }\n        }\n      }\n    }\n\n    /* now compute the `serif' segments, cf. explanations in `afhints.h' */\n    for ( seg1 = segments; seg1 < segment_limit; seg1++ )\n    {\n      seg2 = seg1->link;\n\n      if ( seg2 )\n      {\n        if ( seg2->link != seg1 )\n        {\n          seg1->link  = 0;\n          seg1->serif = seg2->link;\n        }\n      }\n    }\n  }\n\n\n  /* Link segments to edges, using feature analysis for selection. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_latin_hints_compute_edges( AF_GlyphHints  hints,\n                                AF_Dimension   dim )\n  {\n    AF_AxisHints  axis   = &hints->axis[dim];\n    FT_Error      error  = FT_Err_Ok;\n    FT_Memory     memory = hints->memory;\n    AF_LatinAxis  laxis  = &((AF_LatinMetrics)hints->metrics)->axis[dim];\n\n    AF_Segment    segments      = axis->segments;\n    AF_Segment    segment_limit = segments + axis->num_segments;\n    AF_Segment    seg;\n\n#if 0\n    AF_Direction  up_dir;\n#endif\n    FT_Fixed      scale;\n    FT_Pos        edge_distance_threshold;\n    FT_Pos        segment_length_threshold;\n\n\n    axis->num_edges = 0;\n\n    scale = ( dim == AF_DIMENSION_HORZ ) ? hints->x_scale\n                                         : hints->y_scale;\n\n#if 0\n    up_dir = ( dim == AF_DIMENSION_HORZ ) ? AF_DIR_UP\n                                          : AF_DIR_RIGHT;\n#endif\n\n    /*\n     *  We ignore all segments that are less than 1 pixel in length\n     *  to avoid many problems with serif fonts.  We compute the\n     *  corresponding threshold in font units.\n     */\n    if ( dim == AF_DIMENSION_HORZ )\n        segment_length_threshold = FT_DivFix( 64, hints->y_scale );\n    else\n        segment_length_threshold = 0;\n\n    /*********************************************************************/\n    /*                                                                   */\n    /* We begin by generating a sorted table of edges for the current    */\n    /* direction.  To do so, we simply scan each segment and try to find */\n    /* an edge in our table that corresponds to its position.            */\n    /*                                                                   */\n    /* If no edge is found, we create and insert a new edge in the       */\n    /* sorted table.  Otherwise, we simply add the segment to the edge's */\n    /* list which gets processed in the second step to compute the       */\n    /* edge's properties.                                                */\n    /*                                                                   */\n    /* Note that the table of edges is sorted along the segment/edge     */\n    /* position.                                                         */\n    /*                                                                   */\n    /*********************************************************************/\n\n    /* assure that edge distance threshold is at most 0.25px */\n    edge_distance_threshold = FT_MulFix( laxis->edge_distance_threshold,\n                                         scale );\n    if ( edge_distance_threshold > 64 / 4 )\n      edge_distance_threshold = 64 / 4;\n\n    edge_distance_threshold = FT_DivFix( edge_distance_threshold,\n                                         scale );\n\n    for ( seg = segments; seg < segment_limit; seg++ )\n    {\n      AF_Edge  found = NULL;\n      FT_Int   ee;\n\n\n      if ( seg->height < segment_length_threshold )\n        continue;\n\n      /* A special case for serif edges: If they are smaller than */\n      /* 1.5 pixels we ignore them.                               */\n      if ( seg->serif                                     &&\n           2 * seg->height < 3 * segment_length_threshold )\n        continue;\n\n      /* look for an edge corresponding to the segment */\n      for ( ee = 0; ee < axis->num_edges; ee++ )\n      {\n        AF_Edge  edge = axis->edges + ee;\n        FT_Pos   dist;\n\n\n        dist = seg->pos - edge->fpos;\n        if ( dist < 0 )\n          dist = -dist;\n\n        if ( dist < edge_distance_threshold && edge->dir == seg->dir )\n        {\n          found = edge;\n          break;\n        }\n      }\n\n      if ( !found )\n      {\n        AF_Edge  edge;\n\n\n        /* insert a new edge in the list and */\n        /* sort according to the position    */\n        error = af_axis_hints_new_edge( axis, seg->pos,\n                                        (AF_Direction)seg->dir,\n                                        memory, &edge );\n        if ( error )\n          goto Exit;\n\n        /* add the segment to the new edge's list */\n        FT_ZERO( edge );\n\n        edge->first    = seg;\n        edge->last     = seg;\n        edge->dir      = seg->dir;\n        edge->fpos     = seg->pos;\n        edge->opos     = FT_MulFix( seg->pos, scale );\n        edge->pos      = edge->opos;\n        seg->edge_next = seg;\n      }\n      else\n      {\n        /* if an edge was found, simply add the segment to the edge's */\n        /* list                                                       */\n        seg->edge_next         = found->first;\n        found->last->edge_next = seg;\n        found->last            = seg;\n      }\n    }\n\n\n    /******************************************************************/\n    /*                                                                */\n    /* Good, we now compute each edge's properties according to the   */\n    /* segments found on its position.  Basically, these are          */\n    /*                                                                */\n    /*  - the edge's main direction                                   */\n    /*  - stem edge, serif edge or both (which defaults to stem then) */\n    /*  - rounded edge, straight or both (which defaults to straight) */\n    /*  - link for edge                                               */\n    /*                                                                */\n    /******************************************************************/\n\n    /* first of all, set the `edge' field in each segment -- this is */\n    /* required in order to compute edge links                       */\n\n    /*\n     * Note that removing this loop and setting the `edge' field of each\n     * segment directly in the code above slows down execution speed for\n     * some reasons on platforms like the Sun.\n     */\n    {\n      AF_Edge  edges      = axis->edges;\n      AF_Edge  edge_limit = edges + axis->num_edges;\n      AF_Edge  edge;\n\n\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        seg = edge->first;\n        if ( seg )\n          do\n          {\n            seg->edge = edge;\n            seg       = seg->edge_next;\n\n          } while ( seg != edge->first );\n      }\n\n      /* now compute each edge properties */\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        FT_Int  is_round    = 0;  /* does it contain round segments?    */\n        FT_Int  is_straight = 0;  /* does it contain straight segments? */\n#if 0\n        FT_Pos  ups         = 0;  /* number of upwards segments         */\n        FT_Pos  downs       = 0;  /* number of downwards segments       */\n#endif\n\n\n        seg = edge->first;\n\n        do\n        {\n          FT_Bool  is_serif;\n\n\n          /* check for roundness of segment */\n          if ( seg->flags & AF_EDGE_ROUND )\n            is_round++;\n          else\n            is_straight++;\n\n#if 0\n          /* check for segment direction */\n          if ( seg->dir == up_dir )\n            ups   += seg->max_coord - seg->min_coord;\n          else\n            downs += seg->max_coord - seg->min_coord;\n#endif\n\n          /* check for links -- if seg->serif is set, then seg->link must */\n          /* be ignored                                                   */\n          is_serif = (FT_Bool)( seg->serif               &&\n                                seg->serif->edge         &&\n                                seg->serif->edge != edge );\n\n          if ( ( seg->link && seg->link->edge != NULL ) || is_serif )\n          {\n            AF_Edge     edge2;\n            AF_Segment  seg2;\n\n\n            edge2 = edge->link;\n            seg2  = seg->link;\n\n            if ( is_serif )\n            {\n              seg2  = seg->serif;\n              edge2 = edge->serif;\n            }\n\n            if ( edge2 )\n            {\n              FT_Pos  edge_delta;\n              FT_Pos  seg_delta;\n\n\n              edge_delta = edge->fpos - edge2->fpos;\n              if ( edge_delta < 0 )\n                edge_delta = -edge_delta;\n\n              seg_delta = seg->pos - seg2->pos;\n              if ( seg_delta < 0 )\n                seg_delta = -seg_delta;\n\n              if ( seg_delta < edge_delta )\n                edge2 = seg2->edge;\n            }\n            else\n              edge2 = seg2->edge;\n\n            if ( is_serif )\n            {\n              edge->serif   = edge2;\n              edge2->flags |= AF_EDGE_SERIF;\n            }\n            else\n              edge->link  = edge2;\n          }\n\n          seg = seg->edge_next;\n\n        } while ( seg != edge->first );\n\n        /* set the round/straight flags */\n        edge->flags = AF_EDGE_NORMAL;\n\n        if ( is_round > 0 && is_round >= is_straight )\n          edge->flags |= AF_EDGE_ROUND;\n\n#if 0\n        /* set the edge's main direction */\n        edge->dir = AF_DIR_NONE;\n\n        if ( ups > downs )\n          edge->dir = (FT_Char)up_dir;\n\n        else if ( ups < downs )\n          edge->dir = (FT_Char)-up_dir;\n\n        else if ( ups == downs )\n          edge->dir = 0;  /* both up and down! */\n#endif\n\n        /* get rid of serifs if link is set                 */\n        /* XXX: This gets rid of many unpleasant artefacts! */\n        /*      Example: the `c' in cour.pfa at size 13     */\n\n        if ( edge->serif && edge->link )\n          edge->serif = 0;\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* Detect segments and edges for given dimension. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_latin_hints_detect_features( AF_GlyphHints  hints,\n                                  FT_UInt        width_count,\n                                  AF_WidthRec*   widths,\n                                  AF_Dimension   dim )\n  {\n    FT_Error  error;\n\n\n    error = af_latin_hints_compute_segments( hints, dim );\n    if ( !error )\n    {\n      af_latin_hints_link_segments( hints, width_count, widths, dim );\n\n      error = af_latin_hints_compute_edges( hints, dim );\n    }\n\n    return error;\n  }\n\n\n  /* Compute all edges which lie within blue zones. */\n\n  FT_LOCAL_DEF( void )\n  af_latin_hints_compute_blue_edges( AF_GlyphHints    hints,\n                                     AF_LatinMetrics  metrics )\n  {\n    AF_AxisHints  axis       = &hints->axis[AF_DIMENSION_VERT];\n    AF_Edge       edge       = axis->edges;\n    AF_Edge       edge_limit = edge + axis->num_edges;\n    AF_LatinAxis  latin      = &metrics->axis[AF_DIMENSION_VERT];\n    FT_Fixed      scale      = latin->scale;\n\n\n    /* compute which blue zones are active, i.e. have their scaled */\n    /* size < 3/4 pixels                                           */\n\n    /* for each horizontal edge search the blue zone which is closest */\n    for ( ; edge < edge_limit; edge++ )\n    {\n      FT_UInt   bb;\n      AF_Width  best_blue            = NULL;\n      FT_Bool   best_blue_is_neutral = 0;\n      FT_Pos    best_dist;                 /* initial threshold */\n\n\n      /* compute the initial threshold as a fraction of the EM size */\n      /* (the value 40 is heuristic)                                */\n      best_dist = FT_MulFix( metrics->units_per_em / 40, scale );\n\n      /* assure a minimum distance of 0.5px */\n      if ( best_dist > 64 / 2 )\n        best_dist = 64 / 2;\n\n      for ( bb = 0; bb < latin->blue_count; bb++ )\n      {\n        AF_LatinBlue  blue = latin->blues + bb;\n        FT_Bool       is_top_blue, is_neutral_blue, is_major_dir;\n\n\n        /* skip inactive blue zones (i.e., those that are too large) */\n        if ( !( blue->flags & AF_LATIN_BLUE_ACTIVE ) )\n          continue;\n\n        /* if it is a top zone, check for right edges (against the major */\n        /* direction); if it is a bottom zone, check for left edges (in  */\n        /* the major direction) -- this assumes the TrueType convention  */\n        /* for the orientation of contours                               */\n        is_top_blue =\n          (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_TOP ) != 0 );\n        is_neutral_blue =\n          (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_NEUTRAL ) != 0);\n        is_major_dir =\n          FT_BOOL( edge->dir == axis->major_dir );\n\n        /* neutral blue zones are handled for both directions */\n        if ( is_top_blue ^ is_major_dir || is_neutral_blue )\n        {\n          FT_Pos  dist;\n\n\n          /* first of all, compare it to the reference position */\n          dist = edge->fpos - blue->ref.org;\n          if ( dist < 0 )\n            dist = -dist;\n\n          dist = FT_MulFix( dist, scale );\n          if ( dist < best_dist )\n          {\n            best_dist            = dist;\n            best_blue            = &blue->ref;\n            best_blue_is_neutral = is_neutral_blue;\n          }\n\n          /* now compare it to the overshoot position and check whether */\n          /* the edge is rounded, and whether the edge is over the      */\n          /* reference position of a top zone, or under the reference   */\n          /* position of a bottom zone (provided we don't have a        */\n          /* neutral blue zone)                                         */\n          if ( edge->flags & AF_EDGE_ROUND &&\n               dist != 0                   &&\n               !is_neutral_blue            )\n          {\n            FT_Bool  is_under_ref = FT_BOOL( edge->fpos < blue->ref.org );\n\n\n            if ( is_top_blue ^ is_under_ref )\n            {\n              dist = edge->fpos - blue->shoot.org;\n              if ( dist < 0 )\n                dist = -dist;\n\n              dist = FT_MulFix( dist, scale );\n              if ( dist < best_dist )\n              {\n                best_dist            = dist;\n                best_blue            = &blue->shoot;\n                best_blue_is_neutral = is_neutral_blue;\n              }\n            }\n          }\n        }\n      }\n\n      if ( best_blue )\n      {\n        edge->blue_edge = best_blue;\n        if ( best_blue_is_neutral )\n          edge->flags |= AF_EDGE_NEUTRAL;\n      }\n    }\n  }\n\n\n  /* Initalize hinting engine. */\n\n  static FT_Error\n  af_latin_hints_init( AF_GlyphHints    hints,\n                       AF_LatinMetrics  metrics )\n  {\n    FT_Render_Mode  mode;\n    FT_UInt32       scaler_flags, other_flags;\n    FT_Face         face = metrics->root.scaler.face;\n\n\n    af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );\n\n    /*\n     *  correct x_scale and y_scale if needed, since they may have\n     *  been modified by `af_latin_metrics_scale_dim' above\n     */\n    hints->x_scale = metrics->axis[AF_DIMENSION_HORZ].scale;\n    hints->x_delta = metrics->axis[AF_DIMENSION_HORZ].delta;\n    hints->y_scale = metrics->axis[AF_DIMENSION_VERT].scale;\n    hints->y_delta = metrics->axis[AF_DIMENSION_VERT].delta;\n\n    /* compute flags depending on render mode, etc. */\n    mode = metrics->root.scaler.render_mode;\n\n#if 0 /* #ifdef AF_CONFIG_OPTION_USE_WARPER */\n    if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )\n      metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;\n#endif\n\n    scaler_flags = hints->scaler_flags;\n    other_flags  = 0;\n\n    /*\n     *  We snap the width of vertical stems for the monochrome and\n     *  horizontal LCD rendering targets only.\n     */\n    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )\n      other_flags |= AF_LATIN_HINTS_HORZ_SNAP;\n\n    /*\n     *  We snap the width of horizontal stems for the monochrome and\n     *  vertical LCD rendering targets only.\n     */\n    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )\n      other_flags |= AF_LATIN_HINTS_VERT_SNAP;\n\n    /*\n     *  We adjust stems to full pixels only if we don't use the `light' mode.\n     */\n    if ( mode != FT_RENDER_MODE_LIGHT )\n      other_flags |= AF_LATIN_HINTS_STEM_ADJUST;\n\n    if ( mode == FT_RENDER_MODE_MONO )\n      other_flags |= AF_LATIN_HINTS_MONO;\n\n    /*\n     *  In `light' hinting mode we disable horizontal hinting completely.\n     *  We also do it if the face is italic.\n     */\n    if ( mode == FT_RENDER_MODE_LIGHT                      ||\n         ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )\n      scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL;\n\n    hints->scaler_flags = scaler_flags;\n    hints->other_flags  = other_flags;\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****        L A T I N   G L Y P H   G R I D - F I T T I N G        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* Snap a given width in scaled coordinates to one of the */\n  /* current standard widths.                               */\n\n  static FT_Pos\n  af_latin_snap_width( AF_Width  widths,\n                       FT_Int    count,\n                       FT_Pos    width )\n  {\n    int     n;\n    FT_Pos  best      = 64 + 32 + 2;\n    FT_Pos  reference = width;\n    FT_Pos  scaled;\n\n\n    for ( n = 0; n < count; n++ )\n    {\n      FT_Pos  w;\n      FT_Pos  dist;\n\n\n      w = widths[n].cur;\n      dist = width - w;\n      if ( dist < 0 )\n        dist = -dist;\n      if ( dist < best )\n      {\n        best      = dist;\n        reference = w;\n      }\n    }\n\n    scaled = FT_PIX_ROUND( reference );\n\n    if ( width >= reference )\n    {\n      if ( width < scaled + 48 )\n        width = reference;\n    }\n    else\n    {\n      if ( width > scaled - 48 )\n        width = reference;\n    }\n\n    return width;\n  }\n\n\n  /* Compute the snapped width of a given stem, ignoring very thin ones. */\n  /* There is a lot of voodoo in this function; changing the hard-coded  */\n  /* parameters influence the whole hinting process.                     */\n\n  static FT_Pos\n  af_latin_compute_stem_width( AF_GlyphHints  hints,\n                               AF_Dimension   dim,\n                               FT_Pos         width,\n                               AF_Edge_Flags  base_flags,\n                               AF_Edge_Flags  stem_flags )\n  {\n    AF_LatinMetrics  metrics  = (AF_LatinMetrics)hints->metrics;\n    AF_LatinAxis     axis     = &metrics->axis[dim];\n    FT_Pos           dist     = width;\n    FT_Int           sign     = 0;\n    FT_Int           vertical = ( dim == AF_DIMENSION_VERT );\n\n\n    if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) ||\n         axis->extra_light                       )\n      return width;\n\n    if ( dist < 0 )\n    {\n      dist = -width;\n      sign = 1;\n    }\n\n    if ( (  vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) ||\n         ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) )\n    {\n      /* smooth hinting process: very lightly quantize the stem width */\n\n      /* leave the widths of serifs alone */\n      if ( ( stem_flags & AF_EDGE_SERIF ) &&\n           vertical                       &&\n           ( dist < 3 * 64 )              )\n        goto Done_Width;\n\n      else if ( base_flags & AF_EDGE_ROUND )\n      {\n        if ( dist < 80 )\n          dist = 64;\n      }\n      else if ( dist < 56 )\n        dist = 56;\n\n      if ( axis->width_count > 0 )\n      {\n        FT_Pos  delta;\n\n\n        /* compare to standard width */\n        delta = dist - axis->widths[0].cur;\n\n        if ( delta < 0 )\n          delta = -delta;\n\n        if ( delta < 40 )\n        {\n          dist = axis->widths[0].cur;\n          if ( dist < 48 )\n            dist = 48;\n\n          goto Done_Width;\n        }\n\n        if ( dist < 3 * 64 )\n        {\n          delta  = dist & 63;\n          dist  &= -64;\n\n          if ( delta < 10 )\n            dist += delta;\n\n          else if ( delta < 32 )\n            dist += 10;\n\n          else if ( delta < 54 )\n            dist += 54;\n\n          else\n            dist += delta;\n        }\n        else\n          dist = ( dist + 32 ) & ~63;\n      }\n    }\n    else\n    {\n      /* strong hinting process: snap the stem width to integer pixels */\n\n      FT_Pos  org_dist = dist;\n\n\n      dist = af_latin_snap_width( axis->widths, axis->width_count, dist );\n\n      if ( vertical )\n      {\n        /* in the case of vertical hinting, always round */\n        /* the stem heights to integer pixels            */\n\n        if ( dist >= 64 )\n          dist = ( dist + 16 ) & ~63;\n        else\n          dist = 64;\n      }\n      else\n      {\n        if ( AF_LATIN_HINTS_DO_MONO( hints ) )\n        {\n          /* monochrome horizontal hinting: snap widths to integer pixels */\n          /* with a different threshold                                   */\n\n          if ( dist < 64 )\n            dist = 64;\n          else\n            dist = ( dist + 32 ) & ~63;\n        }\n        else\n        {\n          /* for horizontal anti-aliased hinting, we adopt a more subtle */\n          /* approach: we strengthen small stems, round stems whose size */\n          /* is between 1 and 2 pixels to an integer, otherwise nothing  */\n\n          if ( dist < 48 )\n            dist = ( dist + 64 ) >> 1;\n\n          else if ( dist < 128 )\n          {\n            /* We only round to an integer width if the corresponding */\n            /* distortion is less than 1/4 pixel.  Otherwise this     */\n            /* makes everything worse since the diagonals, which are  */\n            /* not hinted, appear a lot bolder or thinner than the    */\n            /* vertical stems.                                        */\n\n            FT_Pos  delta;\n\n\n            dist = ( dist + 22 ) & ~63;\n            delta = dist - org_dist;\n            if ( delta < 0 )\n              delta = -delta;\n\n            if ( delta >= 16 )\n            {\n              dist = org_dist;\n              if ( dist < 48 )\n                dist = ( dist + 64 ) >> 1;\n            }\n          }\n          else\n            /* round otherwise to prevent color fringes in LCD mode */\n            dist = ( dist + 32 ) & ~63;\n        }\n      }\n    }\n\n  Done_Width:\n    if ( sign )\n      dist = -dist;\n\n    return dist;\n  }\n\n\n  /* Align one stem edge relative to the previous stem edge. */\n\n  static void\n  af_latin_align_linked_edge( AF_GlyphHints  hints,\n                              AF_Dimension   dim,\n                              AF_Edge        base_edge,\n                              AF_Edge        stem_edge )\n  {\n    FT_Pos  dist = stem_edge->opos - base_edge->opos;\n\n    FT_Pos  fitted_width = af_latin_compute_stem_width(\n                             hints, dim, dist,\n                             (AF_Edge_Flags)base_edge->flags,\n                             (AF_Edge_Flags)stem_edge->flags );\n\n\n    stem_edge->pos = base_edge->pos + fitted_width;\n\n    FT_TRACE5(( \"  LINK: edge %d (opos=%.2f) linked to %.2f,\"\n                \" dist was %.2f, now %.2f\\n\",\n                stem_edge - hints->axis[dim].edges, stem_edge->opos / 64.0,\n                stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 ));\n  }\n\n\n  /* Shift the coordinates of the `serif' edge by the same amount */\n  /* as the corresponding `base' edge has been moved already.     */\n\n  static void\n  af_latin_align_serif_edge( AF_GlyphHints  hints,\n                             AF_Edge        base,\n                             AF_Edge        serif )\n  {\n    FT_UNUSED( hints );\n\n    serif->pos = base->pos + ( serif->opos - base->opos );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                    E D G E   H I N T I N G                      ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* The main grid-fitting routine. */\n\n  FT_LOCAL_DEF( void )\n  af_latin_hint_edges( AF_GlyphHints  hints,\n                       AF_Dimension   dim )\n  {\n    AF_AxisHints  axis       = &hints->axis[dim];\n    AF_Edge       edges      = axis->edges;\n    AF_Edge       edge_limit = edges + axis->num_edges;\n    FT_PtrDist    n_edges;\n    AF_Edge       edge;\n    AF_Edge       anchor     = NULL;\n    FT_Int        has_serifs = 0;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    FT_UInt       num_actions = 0;\n#endif\n\n\n    FT_TRACE5(( \"latin %s edge hinting (style `%s')\\n\",\n                dim == AF_DIMENSION_VERT ? \"horizontal\" : \"vertical\",\n                af_style_names[hints->metrics->style_class->style] ));\n\n    /* we begin by aligning all stems relative to the blue zone */\n    /* if needed -- that's only for horizontal edges            */\n\n    if ( dim == AF_DIMENSION_VERT && AF_HINTS_DO_BLUES( hints ) )\n    {\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        AF_Width  blue;\n        AF_Edge   edge1, edge2; /* these edges form the stem to check */\n\n\n        if ( edge->flags & AF_EDGE_DONE )\n          continue;\n\n        edge1 = NULL;\n        edge2 = edge->link;\n\n        /*\n         *  If a stem contains both a neutral and a non-neutral blue zone,\n         *  skip the neutral one.  Otherwise, outlines with different\n         *  directions might be incorrectly aligned at the same vertical\n         *  position.\n         *\n         *  If we have two neutral blue zones, skip one of them.\n         *\n         */\n        if ( edge->blue_edge && edge2 && edge2->blue_edge )\n        {\n          FT_Byte  neutral  = edge->flags  & AF_EDGE_NEUTRAL;\n          FT_Byte  neutral2 = edge2->flags & AF_EDGE_NEUTRAL;\n\n\n          if ( ( neutral && neutral2 ) || neutral2 )\n          {\n            edge2->blue_edge = NULL;\n            edge2->flags    &= ~AF_EDGE_NEUTRAL;\n          }\n          else if ( neutral )\n          {\n            edge->blue_edge = NULL;\n            edge->flags    &= ~AF_EDGE_NEUTRAL;\n          }\n        }\n\n        blue = edge->blue_edge;\n        if ( blue )\n          edge1 = edge;\n\n        /* flip edges if the other edge is aligned to a blue zone */\n        else if ( edge2 && edge2->blue_edge )\n        {\n          blue  = edge2->blue_edge;\n          edge1 = edge2;\n          edge2 = edge;\n        }\n\n        if ( !edge1 )\n          continue;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        if ( !anchor )\n          FT_TRACE5(( \"  BLUE_ANCHOR: edge %d (opos=%.2f) snapped to %.2f,\"\n                      \" was %.2f (anchor=edge %d)\\n\",\n                      edge1 - edges, edge1->opos / 64.0, blue->fit / 64.0,\n                      edge1->pos / 64.0, edge - edges ));\n        else\n          FT_TRACE5(( \"  BLUE: edge %d (opos=%.2f) snapped to %.2f,\"\n                      \" was %.2f\\n\",\n                      edge1 - edges, edge1->opos / 64.0, blue->fit / 64.0,\n                      edge1->pos / 64.0 ));\n\n        num_actions++;\n#endif\n\n        edge1->pos    = blue->fit;\n        edge1->flags |= AF_EDGE_DONE;\n\n        if ( edge2 && !edge2->blue_edge )\n        {\n          af_latin_align_linked_edge( hints, dim, edge1, edge2 );\n          edge2->flags |= AF_EDGE_DONE;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n          num_actions++;\n#endif\n        }\n\n        if ( !anchor )\n          anchor = edge;\n      }\n    }\n\n    /* now we align all other stem edges, trying to maintain the */\n    /* relative order of stems in the glyph                      */\n    for ( edge = edges; edge < edge_limit; edge++ )\n    {\n      AF_Edge  edge2;\n\n\n      if ( edge->flags & AF_EDGE_DONE )\n        continue;\n\n      /* skip all non-stem edges */\n      edge2 = edge->link;\n      if ( !edge2 )\n      {\n        has_serifs++;\n        continue;\n      }\n\n      /* now align the stem */\n\n      /* this should not happen, but it's better to be safe */\n      if ( edge2->blue_edge )\n      {\n        FT_TRACE5(( \"  ASSERTION FAILED for edge %d\\n\", edge2 - edges ));\n\n        af_latin_align_linked_edge( hints, dim, edge2, edge );\n        edge->flags |= AF_EDGE_DONE;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        num_actions++;\n#endif\n        continue;\n      }\n\n      if ( !anchor )\n      {\n        /* if we reach this if clause, no stem has been aligned yet */\n\n        FT_Pos  org_len, org_center, cur_len;\n        FT_Pos  cur_pos1, error1, error2, u_off, d_off;\n\n\n        org_len = edge2->opos - edge->opos;\n        cur_len = af_latin_compute_stem_width(\n                    hints, dim, org_len,\n                    (AF_Edge_Flags)edge->flags,\n                    (AF_Edge_Flags)edge2->flags );\n\n        /* some voodoo to specially round edges for small stem widths; */\n        /* the idea is to align the center of a stem, then shifting    */\n        /* the stem edges to suitable positions                        */\n        if ( cur_len <= 64 )\n        {\n          /* width <= 1px */\n          u_off = 32;\n          d_off = 32;\n        }\n        else\n        {\n          /* 1px < width < 1.5px */\n          u_off = 38;\n          d_off = 26;\n        }\n\n        if ( cur_len < 96 )\n        {\n          org_center = edge->opos + ( org_len >> 1 );\n          cur_pos1   = FT_PIX_ROUND( org_center );\n\n          error1 = org_center - ( cur_pos1 - u_off );\n          if ( error1 < 0 )\n            error1 = -error1;\n\n          error2 = org_center - ( cur_pos1 + d_off );\n          if ( error2 < 0 )\n            error2 = -error2;\n\n          if ( error1 < error2 )\n            cur_pos1 -= u_off;\n          else\n            cur_pos1 += d_off;\n\n          edge->pos  = cur_pos1 - cur_len / 2;\n          edge2->pos = edge->pos + cur_len;\n        }\n        else\n          edge->pos = FT_PIX_ROUND( edge->opos );\n\n        anchor       = edge;\n        edge->flags |= AF_EDGE_DONE;\n\n        FT_TRACE5(( \"  ANCHOR: edge %d (opos=%.2f) and %d (opos=%.2f)\"\n                    \" snapped to %.2f and %.2f\\n\",\n                    edge - edges, edge->opos / 64.0,\n                    edge2 - edges, edge2->opos / 64.0,\n                    edge->pos / 64.0, edge2->pos / 64.0 ));\n\n        af_latin_align_linked_edge( hints, dim, edge, edge2 );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        num_actions += 2;\n#endif\n      }\n      else\n      {\n        FT_Pos  org_pos, org_len, org_center, cur_len;\n        FT_Pos  cur_pos1, cur_pos2, delta1, delta2;\n\n\n        org_pos    = anchor->pos + ( edge->opos - anchor->opos );\n        org_len    = edge2->opos - edge->opos;\n        org_center = org_pos + ( org_len >> 1 );\n\n        cur_len = af_latin_compute_stem_width(\n                    hints, dim, org_len,\n                    (AF_Edge_Flags)edge->flags,\n                    (AF_Edge_Flags)edge2->flags );\n\n        if ( edge2->flags & AF_EDGE_DONE )\n        {\n          FT_TRACE5(( \"  ADJUST: edge %d (pos=%.2f) moved to %.2f\\n\",\n                      edge - edges, edge->pos / 64.0,\n                      ( edge2->pos - cur_len ) / 64.0 ));\n\n          edge->pos = edge2->pos - cur_len;\n        }\n\n        else if ( cur_len < 96 )\n        {\n          FT_Pos  u_off, d_off;\n\n\n          cur_pos1 = FT_PIX_ROUND( org_center );\n\n          if ( cur_len <= 64 )\n          {\n            u_off = 32;\n            d_off = 32;\n          }\n          else\n          {\n            u_off = 38;\n            d_off = 26;\n          }\n\n          delta1 = org_center - ( cur_pos1 - u_off );\n          if ( delta1 < 0 )\n            delta1 = -delta1;\n\n          delta2 = org_center - ( cur_pos1 + d_off );\n          if ( delta2 < 0 )\n            delta2 = -delta2;\n\n          if ( delta1 < delta2 )\n            cur_pos1 -= u_off;\n          else\n            cur_pos1 += d_off;\n\n          edge->pos  = cur_pos1 - cur_len / 2;\n          edge2->pos = cur_pos1 + cur_len / 2;\n\n          FT_TRACE5(( \"  STEM: edge %d (opos=%.2f) linked to %d (opos=%.2f)\"\n                      \" snapped to %.2f and %.2f\\n\",\n                      edge - edges, edge->opos / 64.0,\n                      edge2 - edges, edge2->opos / 64.0,\n                      edge->pos / 64.0, edge2->pos / 64.0 ));\n        }\n\n        else\n        {\n          org_pos    = anchor->pos + ( edge->opos - anchor->opos );\n          org_len    = edge2->opos - edge->opos;\n          org_center = org_pos + ( org_len >> 1 );\n\n          cur_len    = af_latin_compute_stem_width(\n                         hints, dim, org_len,\n                         (AF_Edge_Flags)edge->flags,\n                         (AF_Edge_Flags)edge2->flags );\n\n          cur_pos1 = FT_PIX_ROUND( org_pos );\n          delta1   = cur_pos1 + ( cur_len >> 1 ) - org_center;\n          if ( delta1 < 0 )\n            delta1 = -delta1;\n\n          cur_pos2 = FT_PIX_ROUND( org_pos + org_len ) - cur_len;\n          delta2   = cur_pos2 + ( cur_len >> 1 ) - org_center;\n          if ( delta2 < 0 )\n            delta2 = -delta2;\n\n          edge->pos  = ( delta1 < delta2 ) ? cur_pos1 : cur_pos2;\n          edge2->pos = edge->pos + cur_len;\n\n          FT_TRACE5(( \"  STEM: edge %d (opos=%.2f) linked to %d (opos=%.2f)\"\n                      \" snapped to %.2f and %.2f\\n\",\n                      edge - edges, edge->opos / 64.0,\n                      edge2 - edges, edge2->opos / 64.0,\n                      edge->pos / 64.0, edge2->pos / 64.0 ));\n        }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        num_actions++;\n#endif\n\n        edge->flags  |= AF_EDGE_DONE;\n        edge2->flags |= AF_EDGE_DONE;\n\n        if ( edge > edges && edge->pos < edge[-1].pos )\n        {\n#ifdef FT_DEBUG_LEVEL_TRACE\n          FT_TRACE5(( \"  BOUND: edge %d (pos=%.2f) moved to %.2f\\n\",\n                      edge - edges, edge->pos / 64.0, edge[-1].pos / 64.0 ));\n\n          num_actions++;\n#endif\n\n          edge->pos = edge[-1].pos;\n        }\n      }\n    }\n\n    /* make sure that lowercase m's maintain their symmetry */\n\n    /* In general, lowercase m's have six vertical edges if they are sans */\n    /* serif, or twelve if they are with serifs.  This implementation is  */\n    /* based on that assumption, and seems to work very well with most    */\n    /* faces.  However, if for a certain face this assumption is not      */\n    /* true, the m is just rendered like before.  In addition, any stem   */\n    /* correction will only be applied to symmetrical glyphs (even if the */\n    /* glyph is not an m), so the potential for unwanted distortion is    */\n    /* relatively low.                                                    */\n\n    /* We don't handle horizontal edges since we can't easily assure that */\n    /* the third (lowest) stem aligns with the base line; it might end up */\n    /* one pixel higher or lower.                                         */\n\n    n_edges = edge_limit - edges;\n    if ( dim == AF_DIMENSION_HORZ && ( n_edges == 6 || n_edges == 12 ) )\n    {\n      AF_Edge  edge1, edge2, edge3;\n      FT_Pos   dist1, dist2, span, delta;\n\n\n      if ( n_edges == 6 )\n      {\n        edge1 = edges;\n        edge2 = edges + 2;\n        edge3 = edges + 4;\n      }\n      else\n      {\n        edge1 = edges + 1;\n        edge2 = edges + 5;\n        edge3 = edges + 9;\n      }\n\n      dist1 = edge2->opos - edge1->opos;\n      dist2 = edge3->opos - edge2->opos;\n\n      span = dist1 - dist2;\n      if ( span < 0 )\n        span = -span;\n\n      if ( span < 8 )\n      {\n        delta = edge3->pos - ( 2 * edge2->pos - edge1->pos );\n        edge3->pos -= delta;\n        if ( edge3->link )\n          edge3->link->pos -= delta;\n\n        /* move the serifs along with the stem */\n        if ( n_edges == 12 )\n        {\n          ( edges + 8 )->pos -= delta;\n          ( edges + 11 )->pos -= delta;\n        }\n\n        edge3->flags |= AF_EDGE_DONE;\n        if ( edge3->link )\n          edge3->link->flags |= AF_EDGE_DONE;\n      }\n    }\n\n    if ( has_serifs || !anchor )\n    {\n      /*\n       *  now hint the remaining edges (serifs and single) in order\n       *  to complete our processing\n       */\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        FT_Pos  delta;\n\n\n        if ( edge->flags & AF_EDGE_DONE )\n          continue;\n\n        delta = 1000;\n\n        if ( edge->serif )\n        {\n          delta = edge->serif->opos - edge->opos;\n          if ( delta < 0 )\n            delta = -delta;\n        }\n\n        if ( delta < 64 + 16 )\n        {\n          af_latin_align_serif_edge( hints, edge->serif, edge );\n          FT_TRACE5(( \"  SERIF: edge %d (opos=%.2f) serif to %d (opos=%.2f)\"\n                      \" aligned to %.2f\\n\",\n                      edge - edges, edge->opos / 64.0,\n                      edge->serif - edges, edge->serif->opos / 64.0,\n                      edge->pos / 64.0 ));\n        }\n        else if ( !anchor )\n        {\n          edge->pos = FT_PIX_ROUND( edge->opos );\n          anchor    = edge;\n          FT_TRACE5(( \"  SERIF_ANCHOR: edge %d (opos=%.2f)\"\n                      \" snapped to %.2f\\n\",\n                      edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));\n        }\n        else\n        {\n          AF_Edge  before, after;\n\n\n          for ( before = edge - 1; before >= edges; before-- )\n            if ( before->flags & AF_EDGE_DONE )\n              break;\n\n          for ( after = edge + 1; after < edge_limit; after++ )\n            if ( after->flags & AF_EDGE_DONE )\n              break;\n\n          if ( before >= edges && before < edge   &&\n               after < edge_limit && after > edge )\n          {\n            if ( after->opos == before->opos )\n              edge->pos = before->pos;\n            else\n              edge->pos = before->pos +\n                          FT_MulDiv( edge->opos - before->opos,\n                                     after->pos - before->pos,\n                                     after->opos - before->opos );\n\n            FT_TRACE5(( \"  SERIF_LINK1: edge %d (opos=%.2f) snapped to %.2f\"\n                        \" from %d (opos=%.2f)\\n\",\n                        edge - edges, edge->opos / 64.0,\n                        edge->pos / 64.0,\n                        before - edges, before->opos / 64.0 ));\n          }\n          else\n          {\n            edge->pos = anchor->pos +\n                        ( ( edge->opos - anchor->opos + 16 ) & ~31 );\n            FT_TRACE5(( \"  SERIF_LINK2: edge %d (opos=%.2f)\"\n                        \" snapped to %.2f\\n\",\n                        edge - edges, edge->opos / 64.0, edge->pos / 64.0 ));\n          }\n        }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        num_actions++;\n#endif\n        edge->flags |= AF_EDGE_DONE;\n\n        if ( edge > edges && edge->pos < edge[-1].pos )\n        {\n#ifdef FT_DEBUG_LEVEL_TRACE\n          FT_TRACE5(( \"  BOUND: edge %d (pos=%.2f) moved to %.2f\\n\",\n                      edge - edges, edge->pos / 64.0, edge[-1].pos / 64.0 ));\n\n          num_actions++;\n#endif\n          edge->pos = edge[-1].pos;\n        }\n\n        if ( edge + 1 < edge_limit        &&\n             edge[1].flags & AF_EDGE_DONE &&\n             edge->pos > edge[1].pos      )\n        {\n#ifdef FT_DEBUG_LEVEL_TRACE\n          FT_TRACE5(( \"  BOUND: edge %d (pos=%.2f) moved to %.2f\\n\",\n                      edge - edges, edge->pos / 64.0, edge[1].pos / 64.0 ));\n\n          num_actions++;\n#endif\n\n          edge->pos = edge[1].pos;\n        }\n      }\n    }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    if ( !num_actions )\n      FT_TRACE5(( \"  (none)\\n\" ));\n    FT_TRACE5(( \"\\n\" ));\n#endif\n  }\n\n\n  /* Apply the complete hinting algorithm to a latin glyph. */\n\n  static FT_Error\n  af_latin_hints_apply( AF_GlyphHints    hints,\n                        FT_Outline*      outline,\n                        AF_LatinMetrics  metrics )\n  {\n    FT_Error  error;\n    int       dim;\n\n    AF_LatinAxis  axis;\n\n\n    error = af_glyph_hints_reload( hints, outline );\n    if ( error )\n      goto Exit;\n\n    /* analyze glyph outline */\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n    if ( metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT ||\n         AF_HINTS_DO_HORIZONTAL( hints )                          )\n#else\n    if ( AF_HINTS_DO_HORIZONTAL( hints ) )\n#endif\n    {\n      axis  = &metrics->axis[AF_DIMENSION_HORZ];\n      error = af_latin_hints_detect_features( hints,\n                                              axis->width_count,\n                                              axis->widths,\n                                              AF_DIMENSION_HORZ );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( AF_HINTS_DO_VERTICAL( hints ) )\n    {\n      axis  = &metrics->axis[AF_DIMENSION_VERT];\n      error = af_latin_hints_detect_features( hints,\n                                              axis->width_count,\n                                              axis->widths,\n                                              AF_DIMENSION_VERT );\n      if ( error )\n        goto Exit;\n\n      af_latin_hints_compute_blue_edges( hints, metrics );\n    }\n\n    /* grid-fit the outline */\n    for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n    {\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n      if ( dim == AF_DIMENSION_HORZ                                 &&\n           metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT )\n      {\n        AF_WarperRec  warper;\n        FT_Fixed      scale;\n        FT_Pos        delta;\n\n\n        af_warper_compute( &warper, hints, (AF_Dimension)dim,\n                           &scale, &delta );\n        af_glyph_hints_scale_dim( hints, (AF_Dimension)dim,\n                                  scale, delta );\n        continue;\n      }\n#endif\n\n      if ( ( dim == AF_DIMENSION_HORZ && AF_HINTS_DO_HORIZONTAL( hints ) ) ||\n           ( dim == AF_DIMENSION_VERT && AF_HINTS_DO_VERTICAL( hints ) )   )\n      {\n        af_latin_hint_edges( hints, (AF_Dimension)dim );\n        af_glyph_hints_align_edge_points( hints, (AF_Dimension)dim );\n        af_glyph_hints_align_strong_points( hints, (AF_Dimension)dim );\n        af_glyph_hints_align_weak_points( hints, (AF_Dimension)dim );\n      }\n    }\n\n    af_glyph_hints_save( hints, outline );\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****              L A T I N   S C R I P T   C L A S S              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  AF_DEFINE_WRITING_SYSTEM_CLASS(\n    af_latin_writing_system_class,\n\n    AF_WRITING_SYSTEM_LATIN,\n\n    sizeof ( AF_LatinMetricsRec ),\n\n    (AF_WritingSystem_InitMetricsFunc) af_latin_metrics_init,\n    (AF_WritingSystem_ScaleMetricsFunc)af_latin_metrics_scale,\n    (AF_WritingSystem_DoneMetricsFunc) NULL,\n\n    (AF_WritingSystem_InitHintsFunc)   af_latin_hints_init,\n    (AF_WritingSystem_ApplyHintsFunc)  af_latin_hints_apply\n  )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/aflatin.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  aflatin.h                                                              */\n/*                                                                         */\n/*    Auto-fitter hinting routines for latin writing system                */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2003-2007, 2009, 2011-2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFLATIN_H__\n#define __AFLATIN_H__\n\n#include \"afhints.h\"\n\n\nFT_BEGIN_HEADER\n\n  /* the `latin' writing system */\n\n  AF_DECLARE_WRITING_SYSTEM_CLASS( af_latin_writing_system_class )\n\n\n  /* constants are given with units_per_em == 2048 in mind */\n#define AF_LATIN_CONSTANT( metrics, c )                                      \\\n  ( ( (c) * (FT_Long)( (AF_LatinMetrics)(metrics) )->units_per_em ) / 2048 )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****            L A T I N   G L O B A L   M E T R I C S            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*\n   *  The following declarations could be embedded in the file `aflatin.c';\n   *  they have been made semi-public to allow alternate writing system\n   *  hinters to re-use some of them.\n   */\n\n\n#define AF_LATIN_IS_TOP_BLUE( b ) \\\n          ( (b)->properties & AF_BLUE_PROPERTY_LATIN_TOP )\n#define AF_LATIN_IS_NEUTRAL_BLUE( b ) \\\n          ( (b)->properties & AF_BLUE_PROPERTY_LATIN_NEUTRAL )\n#define AF_LATIN_IS_X_HEIGHT_BLUE( b ) \\\n          ( (b)->properties & AF_BLUE_PROPERTY_LATIN_X_HEIGHT )\n#define AF_LATIN_IS_LONG_BLUE( b ) \\\n          ( (b)->properties & AF_BLUE_PROPERTY_LATIN_LONG )\n\n#define AF_LATIN_MAX_WIDTHS  16\n\n\n  enum\n  {\n    AF_LATIN_BLUE_ACTIVE     = 1 << 0, /* set if zone height is <= 3/4px   */\n    AF_LATIN_BLUE_TOP        = 1 << 1, /* set if we have a top blue zone   */\n    AF_LATIN_BLUE_NEUTRAL    = 1 << 2, /* set if we have neutral blue zone */\n    AF_LATIN_BLUE_ADJUSTMENT = 1 << 3, /* used for scale adjustment        */\n                                       /* optimization                     */\n    AF_LATIN_BLUE_FLAG_MAX\n  };\n\n\n  typedef struct  AF_LatinBlueRec_\n  {\n    AF_WidthRec  ref;\n    AF_WidthRec  shoot;\n    FT_UInt      flags;\n\n  } AF_LatinBlueRec, *AF_LatinBlue;\n\n\n  typedef struct  AF_LatinAxisRec_\n  {\n    FT_Fixed         scale;\n    FT_Pos           delta;\n\n    FT_UInt          width_count;                 /* number of used widths */\n    AF_WidthRec      widths[AF_LATIN_MAX_WIDTHS]; /* widths array          */\n    FT_Pos           edge_distance_threshold;   /* used for creating edges */\n    FT_Pos           standard_width;         /* the default stem thickness */\n    FT_Bool          extra_light;         /* is standard width very light? */\n\n    /* ignored for horizontal metrics */\n    FT_UInt          blue_count;\n    AF_LatinBlueRec  blues[AF_BLUE_STRINGSET_MAX];\n\n    FT_Fixed         org_scale;\n    FT_Pos           org_delta;\n\n  } AF_LatinAxisRec, *AF_LatinAxis;\n\n\n  typedef struct  AF_LatinMetricsRec_\n  {\n    AF_StyleMetricsRec  root;\n    FT_UInt             units_per_em;\n    AF_LatinAxisRec     axis[AF_DIMENSION_MAX];\n\n  } AF_LatinMetricsRec, *AF_LatinMetrics;\n\n\n  FT_LOCAL( FT_Error )\n  af_latin_metrics_init( AF_LatinMetrics  metrics,\n                         FT_Face          face );\n\n  FT_LOCAL( void )\n  af_latin_metrics_scale( AF_LatinMetrics  metrics,\n                          AF_Scaler        scaler );\n\n  FT_LOCAL( void )\n  af_latin_metrics_init_widths( AF_LatinMetrics  metrics,\n                                FT_Face          face );\n\n  FT_LOCAL( void )\n  af_latin_metrics_check_digits( AF_LatinMetrics  metrics,\n                                 FT_Face          face );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****           L A T I N   G L Y P H   A N A L Y S I S             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  enum\n  {\n    AF_LATIN_HINTS_HORZ_SNAP   = 1 << 0, /* enable stem width snapping  */\n    AF_LATIN_HINTS_VERT_SNAP   = 1 << 1, /* enable stem height snapping */\n    AF_LATIN_HINTS_STEM_ADJUST = 1 << 2, /* enable stem width/height    */\n                                         /* adjustment                  */\n    AF_LATIN_HINTS_MONO        = 1 << 3  /* indicate monochrome         */\n                                         /* rendering                   */\n  };\n\n\n#define AF_LATIN_HINTS_DO_HORZ_SNAP( h )             \\\n  AF_HINTS_TEST_OTHER( h, AF_LATIN_HINTS_HORZ_SNAP )\n\n#define AF_LATIN_HINTS_DO_VERT_SNAP( h )             \\\n  AF_HINTS_TEST_OTHER( h, AF_LATIN_HINTS_VERT_SNAP )\n\n#define AF_LATIN_HINTS_DO_STEM_ADJUST( h )             \\\n  AF_HINTS_TEST_OTHER( h, AF_LATIN_HINTS_STEM_ADJUST )\n\n#define AF_LATIN_HINTS_DO_MONO( h )             \\\n  AF_HINTS_TEST_OTHER( h, AF_LATIN_HINTS_MONO )\n\n\n  /*\n   *  The next functions shouldn't normally be exported.  However, other\n   *  writing systems might like to use these functions as-is.\n   */\n  FT_LOCAL( FT_Error )\n  af_latin_hints_compute_segments( AF_GlyphHints  hints,\n                                   AF_Dimension   dim );\n\n  FT_LOCAL( void )\n  af_latin_hints_link_segments( AF_GlyphHints  hints,\n                                FT_UInt        width_count,\n                                AF_WidthRec*   widths,\n                                AF_Dimension   dim );\n\n  FT_LOCAL( FT_Error )\n  af_latin_hints_compute_edges( AF_GlyphHints  hints,\n                                AF_Dimension   dim );\n\n  FT_LOCAL( FT_Error )\n  af_latin_hints_detect_features( AF_GlyphHints  hints,\n                                  FT_UInt        width_count,\n                                  AF_WidthRec*   widths,\n                                  AF_Dimension   dim );\n\n/* */\n\nFT_END_HEADER\n\n#endif /* __AFLATIN_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/aflatin2.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  aflatin2.c                                                             */\n/*                                                                         */\n/*    Auto-fitter hinting routines for latin writing system (body).        */\n/*                                                                         */\n/*  Copyright 2003-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include FT_ADVANCES_H\n\n#include \"afglobal.h\"\n#include \"aflatin.h\"\n#include \"aflatin2.h\"\n#include \"aferrors.h\"\n\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n#include \"afwarp.h\"\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_aflatin2\n\n\n  FT_LOCAL_DEF( FT_Error )\n  af_latin2_hints_compute_segments( AF_GlyphHints  hints,\n                                    AF_Dimension   dim );\n\n  FT_LOCAL_DEF( void )\n  af_latin2_hints_link_segments( AF_GlyphHints  hints,\n                                 AF_Dimension   dim );\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****            L A T I N   G L O B A L   M E T R I C S            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  af_latin2_metrics_init_widths( AF_LatinMetrics  metrics,\n                                 FT_Face          face )\n  {\n    /* scan the array of segments in each direction */\n    AF_GlyphHintsRec  hints[1];\n\n\n    af_glyph_hints_init( hints, face->memory );\n\n    metrics->axis[AF_DIMENSION_HORZ].width_count = 0;\n    metrics->axis[AF_DIMENSION_VERT].width_count = 0;\n\n    {\n      FT_Error             error;\n      FT_UInt              glyph_index;\n      int                  dim;\n      AF_LatinMetricsRec   dummy[1];\n      AF_Scaler            scaler = &dummy->root.scaler;\n\n\n      glyph_index = FT_Get_Char_Index(\n                      face,\n                      metrics->root.style_class->standard_char );\n      if ( glyph_index == 0 )\n        goto Exit;\n\n      error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );\n      if ( error || face->glyph->outline.n_points <= 0 )\n        goto Exit;\n\n      FT_ZERO( dummy );\n\n      dummy->units_per_em = metrics->units_per_em;\n      scaler->x_scale     = scaler->y_scale = 0x10000L;\n      scaler->x_delta     = scaler->y_delta = 0;\n      scaler->face        = face;\n      scaler->render_mode = FT_RENDER_MODE_NORMAL;\n      scaler->flags       = 0;\n\n      af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy );\n\n      error = af_glyph_hints_reload( hints, &face->glyph->outline );\n      if ( error )\n        goto Exit;\n\n      for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n      {\n        AF_LatinAxis  axis    = &metrics->axis[dim];\n        AF_AxisHints  axhints = &hints->axis[dim];\n        AF_Segment    seg, limit, link;\n        FT_UInt       num_widths = 0;\n\n\n        error = af_latin2_hints_compute_segments( hints,\n                                                 (AF_Dimension)dim );\n        if ( error )\n          goto Exit;\n\n        af_latin2_hints_link_segments( hints,\n                                      (AF_Dimension)dim );\n\n        seg   = axhints->segments;\n        limit = seg + axhints->num_segments;\n\n        for ( ; seg < limit; seg++ )\n        {\n          link = seg->link;\n\n          /* we only consider stem segments there! */\n          if ( link && link->link == seg && link > seg )\n          {\n            FT_Pos  dist;\n\n\n            dist = seg->pos - link->pos;\n            if ( dist < 0 )\n              dist = -dist;\n\n            if ( num_widths < AF_LATIN_MAX_WIDTHS )\n              axis->widths[num_widths++].org = dist;\n          }\n        }\n\n        af_sort_widths( num_widths, axis->widths );\n        axis->width_count = num_widths;\n      }\n\n  Exit:\n      for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n      {\n        AF_LatinAxis  axis = &metrics->axis[dim];\n        FT_Pos        stdw;\n\n\n        stdw = ( axis->width_count > 0 )\n                 ? axis->widths[0].org\n                 : AF_LATIN_CONSTANT( metrics, 50 );\n\n        /* let's try 20% of the smallest width */\n        axis->edge_distance_threshold = stdw / 5;\n        axis->standard_width          = stdw;\n        axis->extra_light             = 0;\n      }\n    }\n\n    af_glyph_hints_done( hints );\n  }\n\n\n\n#define AF_LATIN_MAX_TEST_CHARACTERS  12\n\n\n  static const char af_latin2_blue_chars[AF_LATIN_MAX_BLUES]\n                                        [AF_LATIN_MAX_TEST_CHARACTERS+1] =\n  {\n    \"THEZOCQS\",\n    \"HEZLOCUS\",\n    \"fijkdbh\",\n    \"xzroesc\",\n    \"xzroesc\",\n    \"pqgjy\"\n  };\n\n\n  static void\n  af_latin2_metrics_init_blues( AF_LatinMetrics  metrics,\n                                FT_Face          face )\n  {\n    FT_Pos        flats [AF_LATIN_MAX_TEST_CHARACTERS];\n    FT_Pos        rounds[AF_LATIN_MAX_TEST_CHARACTERS];\n    FT_Int        num_flats;\n    FT_Int        num_rounds;\n    FT_Int        bb;\n    AF_LatinBlue  blue;\n    FT_Error      error;\n    AF_LatinAxis  axis  = &metrics->axis[AF_DIMENSION_VERT];\n    FT_GlyphSlot  glyph = face->glyph;\n\n\n    /* we compute the blues simply by loading each character from the     */\n    /* 'af_latin2_blue_chars[blues]' string, then compute its top-most or */\n    /* bottom-most points (depending on `AF_IS_TOP_BLUE')                 */\n\n    FT_TRACE5(( \"blue zones computation\\n\"\n                \"======================\\n\\n\" ));\n\n    for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ )\n    {\n      const char*  p     = af_latin2_blue_chars[bb];\n      const char*  limit = p + AF_LATIN_MAX_TEST_CHARACTERS;\n      FT_Pos*      blue_ref;\n      FT_Pos*      blue_shoot;\n\n\n      FT_TRACE5(( \"blue zone %d:\\n\", bb ));\n\n      num_flats  = 0;\n      num_rounds = 0;\n\n      for ( ; p < limit && *p; p++ )\n      {\n        FT_UInt     glyph_index;\n        FT_Int      best_point, best_y, best_first, best_last;\n        FT_Vector*  points;\n        FT_Bool     round;\n\n\n        /* load the character in the face -- skip unknown or empty ones */\n        glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p );\n        if ( glyph_index == 0 )\n          continue;\n\n        error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );\n        if ( error || glyph->outline.n_points <= 0 )\n          continue;\n\n        /* now compute min or max point indices and coordinates */\n        points      = glyph->outline.points;\n        best_point  = -1;\n        best_y      = 0;  /* make compiler happy */\n        best_first  = 0;  /* ditto */\n        best_last   = 0;  /* ditto */\n\n        {\n          FT_Int  nn;\n          FT_Int  first = 0;\n          FT_Int  last  = -1;\n\n\n          for ( nn = 0; nn < glyph->outline.n_contours; first = last+1, nn++ )\n          {\n            FT_Int  old_best_point = best_point;\n            FT_Int  pp;\n\n\n            last = glyph->outline.contours[nn];\n\n            /* Avoid single-point contours since they are never rasterized. */\n            /* In some fonts, they correspond to mark attachment points     */\n            /* which are way outside of the glyph's real outline.           */\n            if ( last == first )\n                continue;\n\n            if ( AF_LATIN_IS_TOP_BLUE( bb ) )\n            {\n              for ( pp = first; pp <= last; pp++ )\n                if ( best_point < 0 || points[pp].y > best_y )\n                {\n                  best_point = pp;\n                  best_y     = points[pp].y;\n                }\n            }\n            else\n            {\n              for ( pp = first; pp <= last; pp++ )\n                if ( best_point < 0 || points[pp].y < best_y )\n                {\n                  best_point = pp;\n                  best_y     = points[pp].y;\n                }\n            }\n\n            if ( best_point != old_best_point )\n            {\n              best_first = first;\n              best_last  = last;\n            }\n          }\n          FT_TRACE5(( \"  %c  %d\", *p, best_y ));\n        }\n\n        /* now check whether the point belongs to a straight or round   */\n        /* segment; we first need to find in which contour the extremum */\n        /* lies, then inspect its previous and next points              */\n        {\n          FT_Pos  best_x = points[best_point].x;\n          FT_Int  start, end, prev, next;\n          FT_Pos  dist;\n\n\n          /* now look for the previous and next points that are not on the */\n          /* same Y coordinate.  Threshold the `closeness'...              */\n          start = end = best_point;\n\n          do\n          {\n            prev = start - 1;\n            if ( prev < best_first )\n              prev = best_last;\n\n            dist = FT_ABS( points[prev].y - best_y );\n            /* accept a small distance or a small angle (both values are */\n            /* heuristic; value 20 corresponds to approx. 2.9 degrees)   */\n            if ( dist > 5 )\n              if ( FT_ABS( points[prev].x - best_x ) <= 20 * dist )\n                break;\n\n            start = prev;\n\n          } while ( start != best_point );\n\n          do\n          {\n            next = end + 1;\n            if ( next > best_last )\n              next = best_first;\n\n            dist = FT_ABS( points[next].y - best_y );\n            if ( dist > 5 )\n              if ( FT_ABS( points[next].x - best_x ) <= 20 * dist )\n                break;\n\n            end = next;\n\n          } while ( end != best_point );\n\n          /* now, set the `round' flag depending on the segment's kind */\n          round = FT_BOOL(\n            FT_CURVE_TAG( glyph->outline.tags[start] ) != FT_CURVE_TAG_ON ||\n            FT_CURVE_TAG( glyph->outline.tags[ end ] ) != FT_CURVE_TAG_ON );\n\n          FT_TRACE5(( \" (%s)\\n\", round ? \"round\" : \"flat\" ));\n        }\n\n        if ( round )\n          rounds[num_rounds++] = best_y;\n        else\n          flats[num_flats++]   = best_y;\n      }\n\n      if ( num_flats == 0 && num_rounds == 0 )\n      {\n        /*\n         *  we couldn't find a single glyph to compute this blue zone,\n         *  we will simply ignore it then\n         */\n        FT_TRACE5(( \"  empty\\n\" ));\n        continue;\n      }\n\n      /* we have computed the contents of the `rounds' and `flats' tables, */\n      /* now determine the reference and overshoot position of the blue -- */\n      /* we simply take the median value after a simple sort               */\n      af_sort_pos( num_rounds, rounds );\n      af_sort_pos( num_flats,  flats );\n\n      blue       = & axis->blues[axis->blue_count];\n      blue_ref   = & blue->ref.org;\n      blue_shoot = & blue->shoot.org;\n\n      axis->blue_count++;\n\n      if ( num_flats == 0 )\n      {\n        *blue_ref   =\n        *blue_shoot = rounds[num_rounds / 2];\n      }\n      else if ( num_rounds == 0 )\n      {\n        *blue_ref   =\n        *blue_shoot = flats[num_flats / 2];\n      }\n      else\n      {\n        *blue_ref   = flats[num_flats / 2];\n        *blue_shoot = rounds[num_rounds / 2];\n      }\n\n      /* there are sometimes problems: if the overshoot position of top     */\n      /* zones is under its reference position, or the opposite for bottom  */\n      /* zones.  We must thus check everything there and correct the errors */\n      if ( *blue_shoot != *blue_ref )\n      {\n        FT_Pos   ref      = *blue_ref;\n        FT_Pos   shoot    = *blue_shoot;\n        FT_Bool  over_ref = FT_BOOL( shoot > ref );\n\n\n        if ( AF_LATIN_IS_TOP_BLUE( bb ) ^ over_ref )\n        {\n          *blue_ref   =\n          *blue_shoot = ( shoot + ref ) / 2;\n\n          FT_TRACE5(( \"  [overshoot smaller than reference,\"\n                      \" taking mean value]\\n\" ));\n        }\n      }\n\n      blue->flags = 0;\n      if ( AF_LATIN_IS_TOP_BLUE( bb ) )\n        blue->flags |= AF_LATIN_BLUE_TOP;\n\n      /*\n       * The following flag is used later to adjust the y and x scales\n       * in order to optimize the pixel grid alignment of the top of small\n       * letters.\n       */\n      if ( AF_LATIN_IS_X_HEIGHT_BLUE( bb ) )\n        blue->flags |= AF_LATIN_BLUE_ADJUSTMENT;\n\n      FT_TRACE5(( \"    -> reference = %ld\\n\"\n                  \"       overshoot = %ld\\n\",\n                  *blue_ref, *blue_shoot ));\n    }\n\n    return;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  af_latin2_metrics_check_digits( AF_LatinMetrics  metrics,\n                                  FT_Face          face )\n  {\n    FT_UInt   i;\n    FT_Bool   started = 0, same_width = 1;\n    FT_Fixed  advance, old_advance = 0;\n\n\n    /* check whether all ASCII digits have the same advance width; */\n    /* digit `0' is 0x30 in all supported charmaps                 */\n    for ( i = 0x30; i <= 0x39; i++ )\n    {\n      FT_UInt  glyph_index;\n\n\n      glyph_index = FT_Get_Char_Index( face, i );\n      if ( glyph_index == 0 )\n        continue;\n\n      if ( FT_Get_Advance( face, glyph_index,\n                           FT_LOAD_NO_SCALE         |\n                           FT_LOAD_NO_HINTING       |\n                           FT_LOAD_IGNORE_TRANSFORM,\n                           &advance ) )\n        continue;\n\n      if ( started )\n      {\n        if ( advance != old_advance )\n        {\n          same_width = 0;\n          break;\n        }\n      }\n      else\n      {\n        old_advance = advance;\n        started     = 1;\n      }\n    }\n\n    metrics->root.digits_have_same_width = same_width;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  af_latin2_metrics_init( AF_LatinMetrics  metrics,\n                          FT_Face          face )\n  {\n    FT_Error    error  = FT_Err_Ok;\n    FT_CharMap  oldmap = face->charmap;\n    FT_UInt     ee;\n\n    static const FT_Encoding  latin_encodings[] =\n    {\n      FT_ENCODING_UNICODE,\n      FT_ENCODING_APPLE_ROMAN,\n      FT_ENCODING_ADOBE_STANDARD,\n      FT_ENCODING_ADOBE_LATIN_1,\n      FT_ENCODING_NONE  /* end of list */\n    };\n\n\n    metrics->units_per_em = face->units_per_EM;\n\n    /* do we have a latin charmap in there? */\n    for ( ee = 0; latin_encodings[ee] != FT_ENCODING_NONE; ee++ )\n    {\n      error = FT_Select_Charmap( face, latin_encodings[ee] );\n      if ( !error )\n        break;\n    }\n\n    if ( !error )\n    {\n      af_latin2_metrics_init_widths( metrics, face );\n      af_latin2_metrics_init_blues( metrics, face );\n      af_latin2_metrics_check_digits( metrics, face );\n    }\n\n    FT_Set_Charmap( face, oldmap );\n    return FT_Err_Ok;\n  }\n\n\n  static void\n  af_latin2_metrics_scale_dim( AF_LatinMetrics  metrics,\n                               AF_Scaler        scaler,\n                               AF_Dimension     dim )\n  {\n    FT_Fixed      scale;\n    FT_Pos        delta;\n    AF_LatinAxis  axis;\n    FT_UInt       nn;\n\n\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      scale = scaler->x_scale;\n      delta = scaler->x_delta;\n    }\n    else\n    {\n      scale = scaler->y_scale;\n      delta = scaler->y_delta;\n    }\n\n    axis = &metrics->axis[dim];\n\n    if ( axis->org_scale == scale && axis->org_delta == delta )\n      return;\n\n    axis->org_scale = scale;\n    axis->org_delta = delta;\n\n    /*\n     * correct Y scale to optimize the alignment of the top of small\n     * letters to the pixel grid\n     */\n    if ( dim == AF_DIMENSION_VERT )\n    {\n      AF_LatinAxis  vaxis = &metrics->axis[AF_DIMENSION_VERT];\n      AF_LatinBlue  blue = NULL;\n\n\n      for ( nn = 0; nn < vaxis->blue_count; nn++ )\n      {\n        if ( vaxis->blues[nn].flags & AF_LATIN_BLUE_ADJUSTMENT )\n        {\n          blue = &vaxis->blues[nn];\n          break;\n        }\n      }\n\n      if ( blue )\n      {\n        FT_Pos   scaled;\n        FT_Pos   threshold;\n        FT_Pos   fitted;\n        FT_UInt  limit;\n        FT_UInt  ppem;\n\n\n        scaled    = FT_MulFix( blue->shoot.org, scaler->y_scale );\n        ppem      = metrics->root.scaler.face->size->metrics.x_ppem;\n        limit     = metrics->root.globals->increase_x_height;\n        threshold = 40;\n\n        /* if the `increase-x-height' property is active, */\n        /* we round up much more often                    */\n        if ( limit                                 &&\n             ppem <= limit                         &&\n             ppem >= AF_PROP_INCREASE_X_HEIGHT_MIN )\n          threshold = 52;\n\n        fitted = ( scaled + threshold ) & ~63;\n\n#if 1\n        if ( scaled != fitted )\n        {\n          scale = FT_MulDiv( scale, fitted, scaled );\n          FT_TRACE5(( \"== scaled x-top = %.2g\"\n                      \"  fitted = %.2g, scaling = %.4g\\n\",\n                      scaled / 64.0, fitted / 64.0,\n                      ( fitted * 1.0 ) / scaled ));\n        }\n#endif\n      }\n    }\n\n    axis->scale = scale;\n    axis->delta = delta;\n\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      metrics->root.scaler.x_scale = scale;\n      metrics->root.scaler.x_delta = delta;\n    }\n    else\n    {\n      metrics->root.scaler.y_scale = scale;\n      metrics->root.scaler.y_delta = delta;\n    }\n\n    /* scale the standard widths */\n    for ( nn = 0; nn < axis->width_count; nn++ )\n    {\n      AF_Width  width = axis->widths + nn;\n\n\n      width->cur = FT_MulFix( width->org, scale );\n      width->fit = width->cur;\n    }\n\n    /* an extra-light axis corresponds to a standard width that is */\n    /* smaller than 5/8 pixels                                     */\n    axis->extra_light =\n      (FT_Bool)( FT_MulFix( axis->standard_width, scale ) < 32 + 8 );\n\n    if ( dim == AF_DIMENSION_VERT )\n    {\n      /* scale the blue zones */\n      for ( nn = 0; nn < axis->blue_count; nn++ )\n      {\n        AF_LatinBlue  blue = &axis->blues[nn];\n        FT_Pos        dist;\n\n\n        blue->ref.cur   = FT_MulFix( blue->ref.org, scale ) + delta;\n        blue->ref.fit   = blue->ref.cur;\n        blue->shoot.cur = FT_MulFix( blue->shoot.org, scale ) + delta;\n        blue->shoot.fit = blue->shoot.cur;\n        blue->flags    &= ~AF_LATIN_BLUE_ACTIVE;\n\n        /* a blue zone is only active if it is less than 3/4 pixels tall */\n        dist = FT_MulFix( blue->ref.org - blue->shoot.org, scale );\n        if ( dist <= 48 && dist >= -48 )\n        {\n          FT_Pos  delta1, delta2;\n\n          delta1 = blue->shoot.org - blue->ref.org;\n          delta2 = delta1;\n          if ( delta1 < 0 )\n            delta2 = -delta2;\n\n          delta2 = FT_MulFix( delta2, scale );\n\n          if ( delta2 < 32 )\n            delta2 = 0;\n          else if ( delta2 < 64 )\n            delta2 = 32 + ( ( ( delta2 - 32 ) + 16 ) & ~31 );\n          else\n            delta2 = FT_PIX_ROUND( delta2 );\n\n          if ( delta1 < 0 )\n            delta2 = -delta2;\n\n          blue->ref.fit   = FT_PIX_ROUND( blue->ref.cur );\n          blue->shoot.fit = blue->ref.fit + delta2;\n\n          FT_TRACE5(( \">> activating blue zone %d:\"\n                      \"  ref.cur=%.2g ref.fit=%.2g\"\n                      \"  shoot.cur=%.2g shoot.fit=%.2g\\n\",\n                      nn, blue->ref.cur / 64.0, blue->ref.fit / 64.0,\n                      blue->shoot.cur / 64.0, blue->shoot.fit / 64.0 ));\n\n          blue->flags |= AF_LATIN_BLUE_ACTIVE;\n        }\n      }\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  af_latin2_metrics_scale( AF_LatinMetrics  metrics,\n                           AF_Scaler        scaler )\n  {\n    metrics->root.scaler.render_mode = scaler->render_mode;\n    metrics->root.scaler.face        = scaler->face;\n    metrics->root.scaler.flags       = scaler->flags;\n\n    af_latin2_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ );\n    af_latin2_metrics_scale_dim( metrics, scaler, AF_DIMENSION_VERT );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****           L A T I N   G L Y P H   A N A L Y S I S             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define  SORT_SEGMENTS\n\n  FT_LOCAL_DEF( FT_Error )\n  af_latin2_hints_compute_segments( AF_GlyphHints  hints,\n                                    AF_Dimension   dim )\n  {\n    AF_AxisHints  axis          = &hints->axis[dim];\n    FT_Memory     memory        = hints->memory;\n    FT_Error      error         = FT_Err_Ok;\n    AF_Segment    segment       = NULL;\n    AF_SegmentRec seg0;\n    AF_Point*     contour       = hints->contours;\n    AF_Point*     contour_limit = contour + hints->num_contours;\n    AF_Direction  major_dir, segment_dir;\n\n\n    FT_ZERO( &seg0 );\n    seg0.score = 32000;\n    seg0.flags = AF_EDGE_NORMAL;\n\n    major_dir   = (AF_Direction)FT_ABS( axis->major_dir );\n    segment_dir = major_dir;\n\n    axis->num_segments = 0;\n\n    /* set up (u,v) in each point */\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      AF_Point  point = hints->points;\n      AF_Point  limit = point + hints->num_points;\n\n\n      for ( ; point < limit; point++ )\n      {\n        point->u = point->fx;\n        point->v = point->fy;\n      }\n    }\n    else\n    {\n      AF_Point  point = hints->points;\n      AF_Point  limit = point + hints->num_points;\n\n\n      for ( ; point < limit; point++ )\n      {\n        point->u = point->fy;\n        point->v = point->fx;\n      }\n    }\n\n    /* do each contour separately */\n    for ( ; contour < contour_limit; contour++ )\n    {\n      AF_Point  point   =  contour[0];\n      AF_Point  start   =  point;\n      AF_Point  last    =  point->prev;\n\n\n      if ( point == last )  /* skip singletons -- just in case */\n        continue;\n\n      /* already on an edge ?, backtrack to find its start */\n      if ( FT_ABS( point->in_dir ) == major_dir )\n      {\n        point = point->prev;\n\n        while ( point->in_dir == start->in_dir )\n          point = point->prev;\n      }\n      else  /* otherwise, find first segment start, if any */\n      {\n        while ( FT_ABS( point->out_dir ) != major_dir )\n        {\n          point = point->next;\n\n          if ( point == start )\n            goto NextContour;\n        }\n      }\n\n      start = point;\n\n      for  (;;)\n      {\n        AF_Point  first;\n        FT_Pos    min_u, min_v, max_u, max_v;\n\n        /* we're at the start of a new segment */\n        FT_ASSERT( FT_ABS( point->out_dir ) == major_dir &&\n                           point->in_dir != point->out_dir );\n        first = point;\n\n        min_u = max_u = point->u;\n        min_v = max_v = point->v;\n\n        point = point->next;\n\n        while ( point->out_dir == first->out_dir )\n        {\n          point = point->next;\n\n          if ( point->u < min_u )\n            min_u = point->u;\n\n          if ( point->u > max_u )\n            max_u = point->u;\n        }\n\n        if ( point->v < min_v )\n          min_v = point->v;\n\n        if ( point->v > max_v )\n          max_v = point->v;\n\n        /* record new segment */\n        error = af_axis_hints_new_segment( axis, memory, &segment );\n        if ( error )\n          goto Exit;\n\n        segment[0]         = seg0;\n        segment->dir       = first->out_dir;\n        segment->first     = first;\n        segment->last      = point;\n        segment->pos       = (FT_Short)( ( min_u + max_u ) >> 1 );\n        segment->min_coord = (FT_Short) min_v;\n        segment->max_coord = (FT_Short) max_v;\n        segment->height    = (FT_Short)( max_v - min_v );\n\n        /* a segment is round if it doesn't have successive */\n        /* on-curve points.                                 */\n        {\n          AF_Point  pt   = first;\n          AF_Point  last = point;\n          AF_Flags  f0   = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );\n          AF_Flags  f1;\n\n\n          segment->flags &= ~AF_EDGE_ROUND;\n\n          for ( ; pt != last; f0 = f1 )\n          {\n            pt = pt->next;\n            f1 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );\n\n            if ( !f0 && !f1 )\n              break;\n\n            if ( pt == last )\n              segment->flags |= AF_EDGE_ROUND;\n          }\n        }\n\n       /* this can happen in the case of a degenerate contour\n        * e.g. a 2-point vertical contour\n        */\n        if ( point == start )\n          break;\n\n        /* jump to the start of the next segment, if any */\n        while ( FT_ABS( point->out_dir ) != major_dir )\n        {\n          point = point->next;\n\n          if ( point == start )\n            goto NextContour;\n        }\n      }\n\n    NextContour:\n      ;\n    } /* contours */\n\n    /* now slightly increase the height of segments when this makes */\n    /* sense -- this is used to better detect and ignore serifs     */\n    {\n      AF_Segment  segments     = axis->segments;\n      AF_Segment  segments_end = segments + axis->num_segments;\n\n\n      for ( segment = segments; segment < segments_end; segment++ )\n      {\n        AF_Point  first   = segment->first;\n        AF_Point  last    = segment->last;\n        AF_Point  p;\n        FT_Pos    first_v = first->v;\n        FT_Pos    last_v  = last->v;\n\n\n        if ( first_v < last_v )\n        {\n          p = first->prev;\n          if ( p->v < first_v )\n            segment->height = (FT_Short)( segment->height +\n                                          ( ( first_v - p->v ) >> 1 ) );\n\n          p = last->next;\n          if ( p->v > last_v )\n            segment->height = (FT_Short)( segment->height +\n                                          ( ( p->v - last_v ) >> 1 ) );\n        }\n        else\n        {\n          p = first->prev;\n          if ( p->v > first_v )\n            segment->height = (FT_Short)( segment->height +\n                                          ( ( p->v - first_v ) >> 1 ) );\n\n          p = last->next;\n          if ( p->v < last_v )\n            segment->height = (FT_Short)( segment->height +\n                                          ( ( last_v - p->v ) >> 1 ) );\n        }\n      }\n    }\n\n#ifdef AF_SORT_SEGMENTS\n   /* place all segments with a negative direction to the start\n    * of the array, used to speed up segment linking later...\n    */\n    {\n      AF_Segment  segments = axis->segments;\n      FT_UInt     count    = axis->num_segments;\n      FT_UInt     ii, jj;\n\n      for ( ii = 0; ii < count; ii++ )\n      {\n        if ( segments[ii].dir > 0 )\n        {\n          for ( jj = ii + 1; jj < count; jj++ )\n          {\n            if ( segments[jj].dir < 0 )\n            {\n              AF_SegmentRec  tmp;\n\n\n              tmp          = segments[ii];\n              segments[ii] = segments[jj];\n              segments[jj] = tmp;\n\n              break;\n            }\n          }\n\n          if ( jj == count )\n            break;\n        }\n      }\n      axis->mid_segments = ii;\n    }\n#endif\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  af_latin2_hints_link_segments( AF_GlyphHints  hints,\n                                 AF_Dimension   dim )\n  {\n    AF_AxisHints  axis          = &hints->axis[dim];\n    AF_Segment    segments      = axis->segments;\n    AF_Segment    segment_limit = segments + axis->num_segments;\n#ifdef AF_SORT_SEGMENTS\n    AF_Segment    segment_mid   = segments + axis->mid_segments;\n#endif\n    FT_Pos        len_threshold, len_score;\n    AF_Segment    seg1, seg2;\n\n\n    len_threshold = AF_LATIN_CONSTANT( hints->metrics, 8 );\n    if ( len_threshold == 0 )\n      len_threshold = 1;\n\n    len_score = AF_LATIN_CONSTANT( hints->metrics, 6000 );\n\n#ifdef AF_SORT_SEGMENTS\n    for ( seg1 = segments; seg1 < segment_mid; seg1++ )\n    {\n      if ( seg1->dir != axis->major_dir )\n        continue;\n\n      for ( seg2 = segment_mid; seg2 < segment_limit; seg2++ )\n#else\n    /* now compare each segment to the others */\n    for ( seg1 = segments; seg1 < segment_limit; seg1++ )\n    {\n      if ( seg1->dir != axis->major_dir )\n        continue;\n\n      for ( seg2 = segments; seg2 < segment_limit; seg2++ )\n        if ( seg1->dir + seg2->dir == 0 && seg2->pos > seg1->pos )\n#endif\n        {\n          FT_Pos  pos1 = seg1->pos;\n          FT_Pos  pos2 = seg2->pos;\n          FT_Pos  dist = pos2 - pos1;\n\n\n          if ( dist < 0 )\n            continue;\n\n          {\n            FT_Pos  min = seg1->min_coord;\n            FT_Pos  max = seg1->max_coord;\n            FT_Pos  len, score;\n\n\n            if ( min < seg2->min_coord )\n              min = seg2->min_coord;\n\n            if ( max > seg2->max_coord )\n              max = seg2->max_coord;\n\n            len = max - min;\n            if ( len >= len_threshold )\n            {\n              score = dist + len_score / len;\n              if ( score < seg1->score )\n              {\n                seg1->score = score;\n                seg1->link  = seg2;\n              }\n\n              if ( score < seg2->score )\n              {\n                seg2->score = score;\n                seg2->link  = seg1;\n              }\n            }\n          }\n        }\n    }\n#if 0\n    }\n#endif\n\n    /* now, compute the `serif' segments */\n    for ( seg1 = segments; seg1 < segment_limit; seg1++ )\n    {\n      seg2 = seg1->link;\n\n      if ( seg2 )\n      {\n        if ( seg2->link != seg1 )\n        {\n          seg1->link  = 0;\n          seg1->serif = seg2->link;\n        }\n      }\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  af_latin2_hints_compute_edges( AF_GlyphHints  hints,\n                                 AF_Dimension   dim )\n  {\n    AF_AxisHints  axis   = &hints->axis[dim];\n    FT_Error      error  = FT_Err_Ok;\n    FT_Memory     memory = hints->memory;\n    AF_LatinAxis  laxis  = &((AF_LatinMetrics)hints->metrics)->axis[dim];\n\n    AF_Segment    segments      = axis->segments;\n    AF_Segment    segment_limit = segments + axis->num_segments;\n    AF_Segment    seg;\n\n    AF_Direction  up_dir;\n    FT_Fixed      scale;\n    FT_Pos        edge_distance_threshold;\n    FT_Pos        segment_length_threshold;\n\n\n    axis->num_edges = 0;\n\n    scale = ( dim == AF_DIMENSION_HORZ ) ? hints->x_scale\n                                         : hints->y_scale;\n\n    up_dir = ( dim == AF_DIMENSION_HORZ ) ? AF_DIR_UP\n                                          : AF_DIR_RIGHT;\n\n    /*\n     *  We want to ignore very small (mostly serif) segments, we do that\n     *  by ignoring those that whose length is less than a given fraction\n     *  of the standard width. If there is no standard width, we ignore\n     *  those that are less than a given size in pixels\n     *\n     *  also, unlink serif segments that are linked to segments farther\n     *  than 50% of the standard width\n     */\n    if ( dim == AF_DIMENSION_HORZ )\n    {\n      if ( laxis->width_count > 0 )\n        segment_length_threshold = ( laxis->standard_width * 10 ) >> 4;\n      else\n        segment_length_threshold = FT_DivFix( 64, hints->y_scale );\n    }\n    else\n      segment_length_threshold = 0;\n\n    /*********************************************************************/\n    /*                                                                   */\n    /* We will begin by generating a sorted table of edges for the       */\n    /* current direction.  To do so, we simply scan each segment and try */\n    /* to find an edge in our table that corresponds to its position.    */\n    /*                                                                   */\n    /* If no edge is found, we create and insert a new edge in the       */\n    /* sorted table.  Otherwise, we simply add the segment to the edge's */\n    /* list which will be processed in the second step to compute the    */\n    /* edge's properties.                                                */\n    /*                                                                   */\n    /* Note that the edges table is sorted along the segment/edge        */\n    /* position.                                                         */\n    /*                                                                   */\n    /*********************************************************************/\n\n    edge_distance_threshold = FT_MulFix( laxis->edge_distance_threshold,\n                                         scale );\n    if ( edge_distance_threshold > 64 / 4 )\n      edge_distance_threshold = 64 / 4;\n\n    edge_distance_threshold = FT_DivFix( edge_distance_threshold,\n                                         scale );\n\n    for ( seg = segments; seg < segment_limit; seg++ )\n    {\n      AF_Edge  found = 0;\n      FT_Int   ee;\n\n\n      if ( seg->height < segment_length_threshold )\n        continue;\n\n      /* A special case for serif edges: If they are smaller than */\n      /* 1.5 pixels we ignore them.                               */\n      if ( seg->serif )\n      {\n        FT_Pos  dist = seg->serif->pos - seg->pos;\n\n\n        if ( dist < 0 )\n          dist = -dist;\n\n        if ( dist >= laxis->standard_width >> 1 )\n        {\n          /* unlink this serif, it is too distant from its reference stem */\n          seg->serif = NULL;\n        }\n        else if ( 2*seg->height < 3 * segment_length_threshold )\n          continue;\n      }\n\n      /* look for an edge corresponding to the segment */\n      for ( ee = 0; ee < axis->num_edges; ee++ )\n      {\n        AF_Edge  edge = axis->edges + ee;\n        FT_Pos   dist;\n\n\n        dist = seg->pos - edge->fpos;\n        if ( dist < 0 )\n          dist = -dist;\n\n        if ( dist < edge_distance_threshold && edge->dir == seg->dir )\n        {\n          found = edge;\n          break;\n        }\n      }\n\n      if ( !found )\n      {\n        AF_Edge   edge;\n\n\n        /* insert a new edge in the list and */\n        /* sort according to the position    */\n        error = af_axis_hints_new_edge( axis, seg->pos, seg->dir,\n                                        memory, &edge );\n        if ( error )\n          goto Exit;\n\n        /* add the segment to the new edge's list */\n        FT_ZERO( edge );\n\n        edge->first    = seg;\n        edge->last     = seg;\n        edge->dir      = seg->dir;\n        edge->fpos     = seg->pos;\n        edge->opos     = FT_MulFix( seg->pos, scale );\n        edge->pos      = edge->opos;\n        seg->edge_next = seg;\n      }\n      else\n      {\n        /* if an edge was found, simply add the segment to the edge's */\n        /* list                                                       */\n        seg->edge_next         = found->first;\n        found->last->edge_next = seg;\n        found->last            = seg;\n      }\n    }\n\n\n    /*********************************************************************/\n    /*                                                                   */\n    /* Good, we will now compute each edge's properties according to     */\n    /* segments found on its position.  Basically, these are:            */\n    /*                                                                   */\n    /*  - edge's main direction                                          */\n    /*  - stem edge, serif edge or both (which defaults to stem then)    */\n    /*  - rounded edge, straight or both (which defaults to straight)    */\n    /*  - link for edge                                                  */\n    /*                                                                   */\n    /*********************************************************************/\n\n    /* first of all, set the `edge' field in each segment -- this is */\n    /* required in order to compute edge links                       */\n\n    /*\n     * Note that removing this loop and setting the `edge' field of each\n     * segment directly in the code above slows down execution speed for\n     * some reasons on platforms like the Sun.\n     */\n    {\n      AF_Edge  edges      = axis->edges;\n      AF_Edge  edge_limit = edges + axis->num_edges;\n      AF_Edge  edge;\n\n\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        seg = edge->first;\n        if ( seg )\n          do\n          {\n            seg->edge = edge;\n            seg       = seg->edge_next;\n\n          } while ( seg != edge->first );\n      }\n\n      /* now, compute each edge properties */\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        FT_Int  is_round    = 0;  /* does it contain round segments?    */\n        FT_Int  is_straight = 0;  /* does it contain straight segments? */\n#if 0\n        FT_Pos  ups         = 0;  /* number of upwards segments         */\n        FT_Pos  downs       = 0;  /* number of downwards segments       */\n#endif\n\n\n        seg = edge->first;\n\n        do\n        {\n          FT_Bool  is_serif;\n\n\n          /* check for roundness of segment */\n          if ( seg->flags & AF_EDGE_ROUND )\n            is_round++;\n          else\n            is_straight++;\n\n#if 0\n          /* check for segment direction */\n          if ( seg->dir == up_dir )\n            ups   += seg->max_coord-seg->min_coord;\n          else\n            downs += seg->max_coord-seg->min_coord;\n#endif\n\n          /* check for links -- if seg->serif is set, then seg->link must */\n          /* be ignored                                                   */\n          is_serif = (FT_Bool)( seg->serif               &&\n                                seg->serif->edge         &&\n                                seg->serif->edge != edge );\n\n          if ( ( seg->link && seg->link->edge != NULL ) || is_serif )\n          {\n            AF_Edge     edge2;\n            AF_Segment  seg2;\n\n\n            edge2 = edge->link;\n            seg2  = seg->link;\n\n            if ( is_serif )\n            {\n              seg2  = seg->serif;\n              edge2 = edge->serif;\n            }\n\n            if ( edge2 )\n            {\n              FT_Pos  edge_delta;\n              FT_Pos  seg_delta;\n\n\n              edge_delta = edge->fpos - edge2->fpos;\n              if ( edge_delta < 0 )\n                edge_delta = -edge_delta;\n\n              seg_delta = seg->pos - seg2->pos;\n              if ( seg_delta < 0 )\n                seg_delta = -seg_delta;\n\n              if ( seg_delta < edge_delta )\n                edge2 = seg2->edge;\n            }\n            else\n              edge2 = seg2->edge;\n\n            if ( is_serif )\n            {\n              edge->serif   = edge2;\n              edge2->flags |= AF_EDGE_SERIF;\n            }\n            else\n              edge->link  = edge2;\n          }\n\n          seg = seg->edge_next;\n\n        } while ( seg != edge->first );\n\n        /* set the round/straight flags */\n        edge->flags = AF_EDGE_NORMAL;\n\n        if ( is_round > 0 && is_round >= is_straight )\n          edge->flags |= AF_EDGE_ROUND;\n\n#if 0\n        /* set the edge's main direction */\n        edge->dir = AF_DIR_NONE;\n\n        if ( ups > downs )\n          edge->dir = (FT_Char)up_dir;\n\n        else if ( ups < downs )\n          edge->dir = (FT_Char)-up_dir;\n\n        else if ( ups == downs )\n          edge->dir = 0;  /* both up and down! */\n#endif\n\n        /* gets rid of serifs if link is set                */\n        /* XXX: This gets rid of many unpleasant artefacts! */\n        /*      Example: the `c' in cour.pfa at size 13     */\n\n        if ( edge->serif && edge->link )\n          edge->serif = 0;\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  af_latin2_hints_detect_features( AF_GlyphHints  hints,\n                                   AF_Dimension   dim )\n  {\n    FT_Error  error;\n\n\n    error = af_latin2_hints_compute_segments( hints, dim );\n    if ( !error )\n    {\n      af_latin2_hints_link_segments( hints, dim );\n\n      error = af_latin2_hints_compute_edges( hints, dim );\n    }\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  af_latin2_hints_compute_blue_edges( AF_GlyphHints    hints,\n                                      AF_LatinMetrics  metrics )\n  {\n    AF_AxisHints  axis       = &hints->axis[AF_DIMENSION_VERT];\n    AF_Edge       edge       = axis->edges;\n    AF_Edge       edge_limit = edge + axis->num_edges;\n    AF_LatinAxis  latin      = &metrics->axis[AF_DIMENSION_VERT];\n    FT_Fixed      scale      = latin->scale;\n    FT_Pos        best_dist0;  /* initial threshold */\n\n\n    /* compute the initial threshold as a fraction of the EM size */\n    best_dist0 = FT_MulFix( metrics->units_per_em / 40, scale );\n\n    if ( best_dist0 > 64 / 2 )\n      best_dist0 = 64 / 2;\n\n    /* compute which blue zones are active, i.e. have their scaled */\n    /* size < 3/4 pixels                                           */\n\n    /* for each horizontal edge search the blue zone which is closest */\n    for ( ; edge < edge_limit; edge++ )\n    {\n      FT_Int    bb;\n      AF_Width  best_blue = NULL;\n      FT_Pos    best_dist = best_dist0;\n\n      for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ )\n      {\n        AF_LatinBlue  blue = latin->blues + bb;\n        FT_Bool       is_top_blue, is_major_dir;\n\n\n        /* skip inactive blue zones (i.e., those that are too small) */\n        if ( !( blue->flags & AF_LATIN_BLUE_ACTIVE ) )\n          continue;\n\n        /* if it is a top zone, check for right edges -- if it is a bottom */\n        /* zone, check for left edges                                      */\n        /*                                                                 */\n        /* of course, that's for TrueType                                  */\n        is_top_blue  = (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_TOP ) != 0 );\n        is_major_dir = FT_BOOL( edge->dir == axis->major_dir );\n\n        /* if it is a top zone, the edge must be against the major    */\n        /* direction; if it is a bottom zone, it must be in the major */\n        /* direction                                                  */\n        if ( is_top_blue ^ is_major_dir )\n        {\n          FT_Pos     dist;\n          AF_Width   compare;\n\n\n          /* if it's a rounded edge, compare it to the overshoot position */\n          /* if it's a flat edge, compare it to the reference position    */\n          if ( edge->flags & AF_EDGE_ROUND )\n            compare = &blue->shoot;\n          else\n            compare = &blue->ref;\n\n          dist = edge->fpos - compare->org;\n          if ( dist < 0 )\n            dist = -dist;\n\n          dist = FT_MulFix( dist, scale );\n          if ( dist < best_dist )\n          {\n            best_dist = dist;\n            best_blue = compare;\n          }\n\n#if 0\n          /* now, compare it to the overshoot position if the edge is     */\n          /* rounded, and if the edge is over the reference position of a */\n          /* top zone, or under the reference position of a bottom zone   */\n          if ( edge->flags & AF_EDGE_ROUND && dist != 0 )\n          {\n            FT_Bool  is_under_ref = FT_BOOL( edge->fpos < blue->ref.org );\n\n\n            if ( is_top_blue ^ is_under_ref )\n            {\n              blue = latin->blues + bb;\n              dist = edge->fpos - blue->shoot.org;\n              if ( dist < 0 )\n                dist = -dist;\n\n              dist = FT_MulFix( dist, scale );\n              if ( dist < best_dist )\n              {\n                best_dist = dist;\n                best_blue = & blue->shoot;\n              }\n            }\n          }\n#endif\n        }\n      }\n\n      if ( best_blue )\n        edge->blue_edge = best_blue;\n    }\n  }\n\n\n  static FT_Error\n  af_latin2_hints_init( AF_GlyphHints    hints,\n                        AF_LatinMetrics  metrics )\n  {\n    FT_Render_Mode  mode;\n    FT_UInt32       scaler_flags, other_flags;\n    FT_Face         face = metrics->root.scaler.face;\n\n\n    af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );\n\n    /*\n     *  correct x_scale and y_scale if needed, since they may have\n     *  been modified `af_latin2_metrics_scale_dim' above\n     */\n    hints->x_scale = metrics->axis[AF_DIMENSION_HORZ].scale;\n    hints->x_delta = metrics->axis[AF_DIMENSION_HORZ].delta;\n    hints->y_scale = metrics->axis[AF_DIMENSION_VERT].scale;\n    hints->y_delta = metrics->axis[AF_DIMENSION_VERT].delta;\n\n    /* compute flags depending on render mode, etc. */\n    mode = metrics->root.scaler.render_mode;\n\n#if 0 /* #ifdef AF_CONFIG_OPTION_USE_WARPER */\n    if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )\n    {\n      metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;\n    }\n#endif\n\n    scaler_flags = hints->scaler_flags;\n    other_flags  = 0;\n\n    /*\n     *  We snap the width of vertical stems for the monochrome and\n     *  horizontal LCD rendering targets only.\n     */\n    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )\n      other_flags |= AF_LATIN_HINTS_HORZ_SNAP;\n\n    /*\n     *  We snap the width of horizontal stems for the monochrome and\n     *  vertical LCD rendering targets only.\n     */\n    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )\n      other_flags |= AF_LATIN_HINTS_VERT_SNAP;\n\n    /*\n     *  We adjust stems to full pixels only if we don't use the `light' mode.\n     */\n    if ( mode != FT_RENDER_MODE_LIGHT )\n      other_flags |= AF_LATIN_HINTS_STEM_ADJUST;\n\n    if ( mode == FT_RENDER_MODE_MONO )\n      other_flags |= AF_LATIN_HINTS_MONO;\n\n    /*\n     *  In `light' hinting mode we disable horizontal hinting completely.\n     *  We also do it if the face is italic.\n     */\n    if ( mode == FT_RENDER_MODE_LIGHT                      ||\n         ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )\n      scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL;\n\n    hints->scaler_flags = scaler_flags;\n    hints->other_flags  = other_flags;\n\n    return 0;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****        L A T I N   G L Y P H   G R I D - F I T T I N G        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* snap a given width in scaled coordinates to one of the */\n  /* current standard widths                                */\n\n  static FT_Pos\n  af_latin2_snap_width( AF_Width  widths,\n                        FT_Int    count,\n                        FT_Pos    width )\n  {\n    int     n;\n    FT_Pos  best      = 64 + 32 + 2;\n    FT_Pos  reference = width;\n    FT_Pos  scaled;\n\n\n    for ( n = 0; n < count; n++ )\n    {\n      FT_Pos  w;\n      FT_Pos  dist;\n\n\n      w = widths[n].cur;\n      dist = width - w;\n      if ( dist < 0 )\n        dist = -dist;\n      if ( dist < best )\n      {\n        best      = dist;\n        reference = w;\n      }\n    }\n\n    scaled = FT_PIX_ROUND( reference );\n\n    if ( width >= reference )\n    {\n      if ( width < scaled + 48 )\n        width = reference;\n    }\n    else\n    {\n      if ( width > scaled - 48 )\n        width = reference;\n    }\n\n    return width;\n  }\n\n\n  /* compute the snapped width of a given stem */\n\n  static FT_Pos\n  af_latin2_compute_stem_width( AF_GlyphHints  hints,\n                                AF_Dimension   dim,\n                                FT_Pos         width,\n                                AF_Edge_Flags  base_flags,\n                                AF_Edge_Flags  stem_flags )\n  {\n    AF_LatinMetrics  metrics  = (AF_LatinMetrics) hints->metrics;\n    AF_LatinAxis     axis     = & metrics->axis[dim];\n    FT_Pos           dist     = width;\n    FT_Int           sign     = 0;\n    FT_Int           vertical = ( dim == AF_DIMENSION_VERT );\n\n    FT_UNUSED( base_flags );\n\n\n    if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) ||\n          axis->extra_light                      )\n      return width;\n\n    if ( dist < 0 )\n    {\n      dist = -width;\n      sign = 1;\n    }\n\n    if ( (  vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) ||\n         ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) )\n    {\n      /* smooth hinting process: very lightly quantize the stem width */\n\n      /* leave the widths of serifs alone */\n\n      if ( ( stem_flags & AF_EDGE_SERIF ) && vertical && ( dist < 3 * 64 ) )\n        goto Done_Width;\n\n#if 0\n      else if ( ( base_flags & AF_EDGE_ROUND ) )\n      {\n        if ( dist < 80 )\n          dist = 64;\n      }\n      else if ( dist < 56 )\n        dist = 56;\n#endif\n      if ( axis->width_count > 0 )\n      {\n        FT_Pos  delta;\n\n\n        /* compare to standard width */\n        if ( axis->width_count > 0 )\n        {\n          delta = dist - axis->widths[0].cur;\n\n          if ( delta < 0 )\n            delta = -delta;\n\n          if ( delta < 40 )\n          {\n            dist = axis->widths[0].cur;\n            if ( dist < 48 )\n              dist = 48;\n\n            goto Done_Width;\n          }\n        }\n\n        if ( dist < 3 * 64 )\n        {\n          delta  = dist & 63;\n          dist  &= -64;\n\n          if ( delta < 10 )\n            dist += delta;\n\n          else if ( delta < 32 )\n            dist += 10;\n\n          else if ( delta < 54 )\n            dist += 54;\n\n          else\n            dist += delta;\n        }\n        else\n          dist = ( dist + 32 ) & ~63;\n      }\n    }\n    else\n    {\n      /* strong hinting process: snap the stem width to integer pixels */\n      FT_Pos  org_dist = dist;\n\n\n      dist = af_latin2_snap_width( axis->widths, axis->width_count, dist );\n\n      if ( vertical )\n      {\n        /* in the case of vertical hinting, always round */\n        /* the stem heights to integer pixels            */\n\n        if ( dist >= 64 )\n          dist = ( dist + 16 ) & ~63;\n        else\n          dist = 64;\n      }\n      else\n      {\n        if ( AF_LATIN_HINTS_DO_MONO( hints ) )\n        {\n          /* monochrome horizontal hinting: snap widths to integer pixels */\n          /* with a different threshold                                   */\n\n          if ( dist < 64 )\n            dist = 64;\n          else\n            dist = ( dist + 32 ) & ~63;\n        }\n        else\n        {\n          /* for horizontal anti-aliased hinting, we adopt a more subtle */\n          /* approach: we strengthen small stems, round stems whose size */\n          /* is between 1 and 2 pixels to an integer, otherwise nothing  */\n\n          if ( dist < 48 )\n            dist = ( dist + 64 ) >> 1;\n\n          else if ( dist < 128 )\n          {\n            /* We only round to an integer width if the corresponding */\n            /* distortion is less than 1/4 pixel.  Otherwise this     */\n            /* makes everything worse since the diagonals, which are  */\n            /* not hinted, appear a lot bolder or thinner than the    */\n            /* vertical stems.                                        */\n\n            FT_Int  delta;\n\n\n            dist = ( dist + 22 ) & ~63;\n            delta = dist - org_dist;\n            if ( delta < 0 )\n              delta = -delta;\n\n            if ( delta >= 16 )\n            {\n              dist = org_dist;\n              if ( dist < 48 )\n                dist = ( dist + 64 ) >> 1;\n            }\n          }\n          else\n            /* round otherwise to prevent color fringes in LCD mode */\n            dist = ( dist + 32 ) & ~63;\n        }\n      }\n    }\n\n  Done_Width:\n    if ( sign )\n      dist = -dist;\n\n    return dist;\n  }\n\n\n  /* align one stem edge relative to the previous stem edge */\n\n  static void\n  af_latin2_align_linked_edge( AF_GlyphHints  hints,\n                               AF_Dimension   dim,\n                               AF_Edge        base_edge,\n                               AF_Edge        stem_edge )\n  {\n    FT_Pos  dist = stem_edge->opos - base_edge->opos;\n\n    FT_Pos  fitted_width = af_latin2_compute_stem_width(\n                             hints, dim, dist,\n                             (AF_Edge_Flags)base_edge->flags,\n                             (AF_Edge_Flags)stem_edge->flags );\n\n\n    stem_edge->pos = base_edge->pos + fitted_width;\n\n    FT_TRACE5(( \"LINK: edge %d (opos=%.2f) linked to (%.2f), \"\n                \"dist was %.2f, now %.2f\\n\",\n                stem_edge-hints->axis[dim].edges, stem_edge->opos / 64.0,\n                stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 ));\n  }\n\n\n  static void\n  af_latin2_align_serif_edge( AF_GlyphHints  hints,\n                              AF_Edge        base,\n                              AF_Edge        serif )\n  {\n    FT_UNUSED( hints );\n\n    serif->pos = base->pos + ( serif->opos - base->opos );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                    E D G E   H I N T I N G                      ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_LOCAL_DEF( void )\n  af_latin2_hint_edges( AF_GlyphHints  hints,\n                        AF_Dimension   dim )\n  {\n    AF_AxisHints  axis       = &hints->axis[dim];\n    AF_Edge       edges      = axis->edges;\n    AF_Edge       edge_limit = edges + axis->num_edges;\n    AF_Edge       edge;\n    AF_Edge       anchor     = 0;\n    FT_Int        has_serifs = 0;\n    FT_Pos        anchor_drift = 0;\n\n\n\n    FT_TRACE5(( \"==== hinting %s edges =====\\n\",\n                dim == AF_DIMENSION_HORZ ? \"vertical\" : \"horizontal\" ));\n\n    /* we begin by aligning all stems relative to the blue zone */\n    /* if needed -- that's only for horizontal edges            */\n\n    if ( dim == AF_DIMENSION_VERT && AF_HINTS_DO_BLUES( hints ) )\n    {\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        AF_Width  blue;\n        AF_Edge   edge1, edge2;\n\n\n        if ( edge->flags & AF_EDGE_DONE )\n          continue;\n\n        blue  = edge->blue_edge;\n        edge1 = NULL;\n        edge2 = edge->link;\n\n        if ( blue )\n        {\n          edge1 = edge;\n        }\n        else if ( edge2 && edge2->blue_edge )\n        {\n          blue  = edge2->blue_edge;\n          edge1 = edge2;\n          edge2 = edge;\n        }\n\n        if ( !edge1 )\n          continue;\n\n        FT_TRACE5(( \"BLUE: edge %d (opos=%.2f) snapped to (%.2f), \"\n                    \"was (%.2f)\\n\",\n                    edge1-edges, edge1->opos / 64.0, blue->fit / 64.0,\n                    edge1->pos / 64.0 ));\n\n        edge1->pos    = blue->fit;\n        edge1->flags |= AF_EDGE_DONE;\n\n        if ( edge2 && !edge2->blue_edge )\n        {\n          af_latin2_align_linked_edge( hints, dim, edge1, edge2 );\n          edge2->flags |= AF_EDGE_DONE;\n        }\n\n        if ( !anchor )\n        {\n          anchor = edge;\n\n          anchor_drift = ( anchor->pos - anchor->opos );\n          if ( edge2 )\n            anchor_drift = ( anchor_drift +\n                             ( edge2->pos - edge2->opos ) ) >> 1;\n        }\n      }\n    }\n\n    /* now we will align all stem edges, trying to maintain the */\n    /* relative order of stems in the glyph                     */\n    for ( edge = edges; edge < edge_limit; edge++ )\n    {\n      AF_Edge  edge2;\n\n\n      if ( edge->flags & AF_EDGE_DONE )\n        continue;\n\n      /* skip all non-stem edges */\n      edge2 = edge->link;\n      if ( !edge2 )\n      {\n        has_serifs++;\n        continue;\n      }\n\n      /* now align the stem */\n\n      /* this should not happen, but it's better to be safe */\n      if ( edge2->blue_edge )\n      {\n        FT_TRACE5(( \"ASSERTION FAILED for edge %d\\n\", edge2-edges ));\n\n        af_latin2_align_linked_edge( hints, dim, edge2, edge );\n        edge->flags |= AF_EDGE_DONE;\n        continue;\n      }\n\n      if ( !anchor )\n      {\n        FT_Pos  org_len, org_center, cur_len;\n        FT_Pos  cur_pos1, error1, error2, u_off, d_off;\n\n\n        org_len = edge2->opos - edge->opos;\n        cur_len = af_latin2_compute_stem_width(\n                    hints, dim, org_len,\n                    (AF_Edge_Flags)edge->flags,\n                    (AF_Edge_Flags)edge2->flags );\n        if ( cur_len <= 64 )\n          u_off = d_off = 32;\n        else\n        {\n          u_off = 38;\n          d_off = 26;\n        }\n\n        if ( cur_len < 96 )\n        {\n          org_center = edge->opos + ( org_len >> 1 );\n\n          cur_pos1   = FT_PIX_ROUND( org_center );\n\n          error1 = org_center - ( cur_pos1 - u_off );\n          if ( error1 < 0 )\n            error1 = -error1;\n\n          error2 = org_center - ( cur_pos1 + d_off );\n          if ( error2 < 0 )\n            error2 = -error2;\n\n          if ( error1 < error2 )\n            cur_pos1 -= u_off;\n          else\n            cur_pos1 += d_off;\n\n          edge->pos  = cur_pos1 - cur_len / 2;\n          edge2->pos = edge->pos + cur_len;\n        }\n        else\n          edge->pos = FT_PIX_ROUND( edge->opos );\n\n        FT_TRACE5(( \"ANCHOR: edge %d (opos=%.2f) and %d (opos=%.2f)\"\n                    \" snapped to (%.2f) (%.2f)\\n\",\n                    edge-edges, edge->opos / 64.0,\n                    edge2-edges, edge2->opos / 64.0,\n                    edge->pos / 64.0, edge2->pos / 64.0 ));\n        anchor = edge;\n\n        edge->flags |= AF_EDGE_DONE;\n\n        af_latin2_align_linked_edge( hints, dim, edge, edge2 );\n\n        edge2->flags |= AF_EDGE_DONE;\n\n        anchor_drift = ( ( anchor->pos - anchor->opos ) +\n                         ( edge2->pos - edge2->opos ) ) >> 1;\n\n        FT_TRACE5(( \"DRIFT: %.2f\\n\", anchor_drift/64.0 ));\n      }\n      else\n      {\n        FT_Pos   org_pos, org_len, org_center, cur_center, cur_len;\n        FT_Pos   org_left, org_right;\n\n\n        org_pos    = edge->opos + anchor_drift;\n        org_len    = edge2->opos - edge->opos;\n        org_center = org_pos + ( org_len >> 1 );\n\n        cur_len = af_latin2_compute_stem_width(\n                   hints, dim, org_len,\n                   (AF_Edge_Flags)edge->flags,\n                   (AF_Edge_Flags)edge2->flags );\n\n        org_left  = org_pos + ( ( org_len - cur_len ) >> 1 );\n        org_right = org_pos + ( ( org_len + cur_len ) >> 1 );\n\n        FT_TRACE5(( \"ALIGN: left=%.2f right=%.2f \",\n                    org_left / 64.0, org_right / 64.0 ));\n        cur_center = org_center;\n\n        if ( edge2->flags & AF_EDGE_DONE )\n        {\n          FT_TRACE5(( \"\\n\" ));\n          edge->pos = edge2->pos - cur_len;\n        }\n        else\n        {\n         /* we want to compare several displacement, and choose\n          * the one that increases fitness while minimizing\n          * distortion as well\n          */\n          FT_Pos   displacements[6], scores[6], org, fit, delta;\n          FT_UInt  count = 0;\n\n          /* note: don't even try to fit tiny stems */\n          if ( cur_len < 32 )\n          {\n            FT_TRACE5(( \"tiny stem\\n\" ));\n            goto AlignStem;\n          }\n\n          /* if the span is within a single pixel, don't touch it */\n          if ( FT_PIX_FLOOR( org_left ) == FT_PIX_CEIL( org_right ) )\n          {\n            FT_TRACE5(( \"single pixel stem\\n\" ));\n            goto AlignStem;\n          }\n\n          if ( cur_len <= 96 )\n          {\n           /* we want to avoid the absolute worst case which is\n            * when the left and right edges of the span each represent\n            * about 50% of the gray. we'd better want to change this\n            * to 25/75%, since this is much more pleasant to the eye with\n            * very acceptable distortion\n            */\n            FT_Pos  frac_left  = org_left  & 63;\n            FT_Pos  frac_right = org_right & 63;\n\n            if ( frac_left  >= 22 && frac_left  <= 42 &&\n                 frac_right >= 22 && frac_right <= 42 )\n            {\n              org = frac_left;\n              fit = ( org <= 32 ) ? 16 : 48;\n              delta = FT_ABS( fit - org );\n              displacements[count] = fit - org;\n              scores[count++]      = delta;\n              FT_TRACE5(( \"dispA=%.2f (%d) \", ( fit - org ) / 64.0, delta ));\n\n              org = frac_right;\n              fit = ( org <= 32 ) ? 16 : 48;\n              delta = FT_ABS( fit - org );\n              displacements[count] = fit - org;\n              scores[count++]     = delta;\n              FT_TRACE5(( \"dispB=%.2f (%d) \", ( fit - org ) / 64.0, delta ));\n            }\n          }\n\n          /* snapping the left edge to the grid */\n          org   = org_left;\n          fit   = FT_PIX_ROUND( org );\n          delta = FT_ABS( fit - org );\n          displacements[count] = fit - org;\n          scores[count++]      = delta;\n          FT_TRACE5(( \"dispC=%.2f (%d) \", ( fit - org ) / 64.0, delta ));\n\n          /* snapping the right edge to the grid */\n          org   = org_right;\n          fit   = FT_PIX_ROUND( org );\n          delta = FT_ABS( fit - org );\n          displacements[count] = fit - org;\n          scores[count++]      = delta;\n          FT_TRACE5(( \"dispD=%.2f (%d) \", ( fit - org ) / 64.0, delta ));\n\n          /* now find the best displacement */\n          {\n            FT_Pos  best_score = scores[0];\n            FT_Pos  best_disp  = displacements[0];\n            FT_UInt nn;\n\n            for ( nn = 1; nn < count; nn++ )\n            {\n              if ( scores[nn] < best_score )\n              {\n                best_score = scores[nn];\n                best_disp  = displacements[nn];\n              }\n            }\n\n            cur_center = org_center + best_disp;\n          }\n          FT_TRACE5(( \"\\n\" ));\n        }\n\n      AlignStem:\n        edge->pos  = cur_center - ( cur_len >> 1 );\n        edge2->pos = edge->pos + cur_len;\n\n        FT_TRACE5(( \"STEM1: %d (opos=%.2f) to %d (opos=%.2f)\"\n                    \" snapped to (%.2f) and (%.2f),\"\n                    \" org_len=%.2f cur_len=%.2f\\n\",\n                    edge-edges, edge->opos / 64.0,\n                    edge2-edges, edge2->opos / 64.0,\n                    edge->pos / 64.0, edge2->pos / 64.0,\n                    org_len / 64.0, cur_len / 64.0 ));\n\n        edge->flags  |= AF_EDGE_DONE;\n        edge2->flags |= AF_EDGE_DONE;\n\n        if ( edge > edges && edge->pos < edge[-1].pos )\n        {\n          FT_TRACE5(( \"BOUND: %d (pos=%.2f) to (%.2f)\\n\",\n                      edge-edges, edge->pos / 64.0, edge[-1].pos / 64.0 ));\n          edge->pos = edge[-1].pos;\n        }\n      }\n    }\n\n    /* make sure that lowercase m's maintain their symmetry */\n\n    /* In general, lowercase m's have six vertical edges if they are sans */\n    /* serif, or twelve if they are with serifs.  This implementation is  */\n    /* based on that assumption, and seems to work very well with most    */\n    /* faces.  However, if for a certain face this assumption is not      */\n    /* true, the m is just rendered like before.  In addition, any stem   */\n    /* correction will only be applied to symmetrical glyphs (even if the */\n    /* glyph is not an m), so the potential for unwanted distortion is    */\n    /* relatively low.                                                    */\n\n    /* We don't handle horizontal edges since we can't easily assure that */\n    /* the third (lowest) stem aligns with the base line; it might end up */\n    /* one pixel higher or lower.                                         */\n\n#if 0\n    {\n      FT_Int  n_edges = edge_limit - edges;\n\n\n      if ( dim == AF_DIMENSION_HORZ && ( n_edges == 6 || n_edges == 12 ) )\n      {\n        AF_Edge  edge1, edge2, edge3;\n        FT_Pos   dist1, dist2, span, delta;\n\n\n        if ( n_edges == 6 )\n        {\n          edge1 = edges;\n          edge2 = edges + 2;\n          edge3 = edges + 4;\n        }\n        else\n        {\n          edge1 = edges + 1;\n          edge2 = edges + 5;\n          edge3 = edges + 9;\n        }\n\n        dist1 = edge2->opos - edge1->opos;\n        dist2 = edge3->opos - edge2->opos;\n\n        span = dist1 - dist2;\n        if ( span < 0 )\n          span = -span;\n\n        if ( span < 8 )\n        {\n          delta = edge3->pos - ( 2 * edge2->pos - edge1->pos );\n          edge3->pos -= delta;\n          if ( edge3->link )\n            edge3->link->pos -= delta;\n\n          /* move the serifs along with the stem */\n          if ( n_edges == 12 )\n          {\n            ( edges + 8 )->pos -= delta;\n            ( edges + 11 )->pos -= delta;\n          }\n\n          edge3->flags |= AF_EDGE_DONE;\n          if ( edge3->link )\n            edge3->link->flags |= AF_EDGE_DONE;\n        }\n      }\n    }\n#endif\n\n    if ( has_serifs || !anchor )\n    {\n      /*\n       *  now hint the remaining edges (serifs and single) in order\n       *  to complete our processing\n       */\n      for ( edge = edges; edge < edge_limit; edge++ )\n      {\n        FT_Pos  delta;\n\n\n        if ( edge->flags & AF_EDGE_DONE )\n          continue;\n\n        delta = 1000;\n\n        if ( edge->serif )\n        {\n          delta = edge->serif->opos - edge->opos;\n          if ( delta < 0 )\n            delta = -delta;\n        }\n\n        if ( delta < 64 + 16 )\n        {\n          af_latin2_align_serif_edge( hints, edge->serif, edge );\n          FT_TRACE5(( \"SERIF: edge %d (opos=%.2f) serif to %d (opos=%.2f)\"\n                      \" aligned to (%.2f)\\n\",\n                      edge-edges, edge->opos / 64.0,\n                      edge->serif - edges, edge->serif->opos / 64.0,\n                      edge->pos / 64.0 ));\n        }\n        else if ( !anchor )\n        {\n          FT_TRACE5(( \"SERIF_ANCHOR: edge %d (opos=%.2f)\"\n                      \" snapped to (%.2f)\\n\",\n                      edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));\n          edge->pos = FT_PIX_ROUND( edge->opos );\n          anchor    = edge;\n        }\n        else\n        {\n          AF_Edge  before, after;\n\n\n          for ( before = edge - 1; before >= edges; before-- )\n            if ( before->flags & AF_EDGE_DONE )\n              break;\n\n          for ( after = edge + 1; after < edge_limit; after++ )\n            if ( after->flags & AF_EDGE_DONE )\n              break;\n\n          if ( before >= edges && before < edge   &&\n               after < edge_limit && after > edge )\n          {\n            if ( after->opos == before->opos )\n              edge->pos = before->pos;\n            else\n              edge->pos = before->pos +\n                          FT_MulDiv( edge->opos - before->opos,\n                                     after->pos - before->pos,\n                                     after->opos - before->opos );\n            FT_TRACE5(( \"SERIF_LINK1: edge %d (opos=%.2f) snapped to (%.2f)\"\n                        \" from %d (opos=%.2f)\\n\",\n                        edge-edges, edge->opos / 64.0, edge->pos / 64.0,\n                        before - edges, before->opos / 64.0 ));\n          }\n          else\n          {\n            edge->pos = anchor->pos +\n                        ( ( edge->opos - anchor->opos + 16 ) & ~31 );\n\n            FT_TRACE5(( \"SERIF_LINK2: edge %d (opos=%.2f)\"\n                        \" snapped to (%.2f)\\n\",\n                        edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));\n          }\n        }\n\n        edge->flags |= AF_EDGE_DONE;\n\n        if ( edge > edges && edge->pos < edge[-1].pos )\n          edge->pos = edge[-1].pos;\n\n        if ( edge + 1 < edge_limit        &&\n             edge[1].flags & AF_EDGE_DONE &&\n             edge->pos > edge[1].pos      )\n          edge->pos = edge[1].pos;\n      }\n    }\n  }\n\n\n  static FT_Error\n  af_latin2_hints_apply( AF_GlyphHints    hints,\n                         FT_Outline*      outline,\n                         AF_LatinMetrics  metrics )\n  {\n    FT_Error  error;\n    int       dim;\n\n\n    error = af_glyph_hints_reload( hints, outline );\n    if ( error )\n      goto Exit;\n\n    /* analyze glyph outline */\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n    if ( metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT ||\n         AF_HINTS_DO_HORIZONTAL( hints ) )\n#else\n    if ( AF_HINTS_DO_HORIZONTAL( hints ) )\n#endif\n    {\n      error = af_latin2_hints_detect_features( hints, AF_DIMENSION_HORZ );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( AF_HINTS_DO_VERTICAL( hints ) )\n    {\n      error = af_latin2_hints_detect_features( hints, AF_DIMENSION_VERT );\n      if ( error )\n        goto Exit;\n\n      af_latin2_hints_compute_blue_edges( hints, metrics );\n    }\n\n    /* grid-fit the outline */\n    for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )\n    {\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n      if ( ( dim == AF_DIMENSION_HORZ &&\n             metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT ) )\n      {\n        AF_WarperRec  warper;\n        FT_Fixed      scale;\n        FT_Pos        delta;\n\n\n        af_warper_compute( &warper, hints, dim, &scale, &delta );\n        af_glyph_hints_scale_dim( hints, dim, scale, delta );\n        continue;\n      }\n#endif\n\n      if ( ( dim == AF_DIMENSION_HORZ && AF_HINTS_DO_HORIZONTAL( hints ) ) ||\n           ( dim == AF_DIMENSION_VERT && AF_HINTS_DO_VERTICAL( hints ) )   )\n      {\n        af_latin2_hint_edges( hints, (AF_Dimension)dim );\n        af_glyph_hints_align_edge_points( hints, (AF_Dimension)dim );\n        af_glyph_hints_align_strong_points( hints, (AF_Dimension)dim );\n        af_glyph_hints_align_weak_points( hints, (AF_Dimension)dim );\n      }\n    }\n    af_glyph_hints_save( hints, outline );\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****              L A T I N   S C R I P T   C L A S S              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  AF_DEFINE_WRITING_SYSTEM_CLASS(\n    af_latin2_writing_system_class,\n\n    AF_WRITING_SYSTEM_LATIN2,\n\n    sizeof ( AF_LatinMetricsRec ),\n\n    (AF_WritingSystem_InitMetricsFunc) af_latin2_metrics_init,\n    (AF_WritingSystem_ScaleMetricsFunc)af_latin2_metrics_scale,\n    (AF_WritingSystem_DoneMetricsFunc) NULL,\n\n    (AF_WritingSystem_InitHintsFunc)   af_latin2_hints_init,\n    (AF_WritingSystem_ApplyHintsFunc)  af_latin2_hints_apply\n  )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/aflatin2.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  aflatin2.h                                                             */\n/*                                                                         */\n/*    Auto-fitter hinting routines for latin writing system                */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2003-2007, 2012, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFLATIN2_H__\n#define __AFLATIN2_H__\n\n#include \"afhints.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /* the `latin' writing system */\n\n  AF_DECLARE_WRITING_SYSTEM_CLASS( af_latin2_writing_system_class )\n\n\n/* */\n\nFT_END_HEADER\n\n#endif /* __AFLATIN_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afloader.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afloader.c                                                             */\n/*                                                                         */\n/*    Auto-fitter glyph loading routines (body).                           */\n/*                                                                         */\n/*  Copyright 2003-2009, 2011-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"afglobal.h\"\n#include \"afloader.h\"\n#include \"afhints.h\"\n#include \"aferrors.h\"\n#include \"afmodule.h\"\n#include \"afpic.h\"\n\n\n  /* Initialize glyph loader. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_loader_init( AF_Module  module )\n  {\n    AF_Loader  loader = module->loader;\n    FT_Memory  memory = module->root.library->memory;\n\n\n    FT_ZERO( loader );\n\n    af_glyph_hints_init( &loader->hints, memory );\n#ifdef FT_DEBUG_AUTOFIT\n    _af_debug_hints = &loader->hints;\n#endif\n    return FT_GlyphLoader_New( memory, &loader->gloader );\n  }\n\n\n  /* Reset glyph loader and compute globals if necessary. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_loader_reset( AF_Module  module,\n                   FT_Face    face )\n  {\n    FT_Error   error  = FT_Err_Ok;\n    AF_Loader  loader = module->loader;\n\n\n    loader->face    = face;\n    loader->globals = (AF_FaceGlobals)face->autohint.data;\n\n    FT_GlyphLoader_Rewind( loader->gloader );\n\n    if ( loader->globals == NULL )\n    {\n      error = af_face_globals_new( face, &loader->globals, module );\n      if ( !error )\n      {\n        face->autohint.data =\n          (FT_Pointer)loader->globals;\n        face->autohint.finalizer =\n          (FT_Generic_Finalizer)af_face_globals_free;\n      }\n    }\n\n    return error;\n  }\n\n\n  /* Finalize glyph loader. */\n\n  FT_LOCAL_DEF( void )\n  af_loader_done( AF_Module  module )\n  {\n    AF_Loader  loader = module->loader;\n\n\n    af_glyph_hints_done( &loader->hints );\n\n    loader->face    = NULL;\n    loader->globals = NULL;\n\n#ifdef FT_DEBUG_AUTOFIT\n    _af_debug_hints = NULL;\n#endif\n    FT_GlyphLoader_Done( loader->gloader );\n    loader->gloader = NULL;\n  }\n\n\n  /* Load a single glyph component.  This routine calls itself */\n  /* recursively, if necessary, and does the main work of      */\n  /* `af_loader_load_glyph.'                                   */\n\n  static FT_Error\n  af_loader_load_g( AF_Loader  loader,\n                    AF_Scaler  scaler,\n                    FT_UInt    glyph_index,\n                    FT_Int32   load_flags,\n                    FT_UInt    depth )\n  {\n    FT_Error          error;\n    FT_Face           face     = loader->face;\n    FT_GlyphLoader    gloader  = loader->gloader;\n    AF_StyleMetrics   metrics  = loader->metrics;\n    AF_GlyphHints     hints    = &loader->hints;\n    FT_GlyphSlot      slot     = face->glyph;\n    FT_Slot_Internal  internal = slot->internal;\n    FT_Int32          flags;\n\n\n    flags = load_flags | FT_LOAD_LINEAR_DESIGN;\n    error = FT_Load_Glyph( face, glyph_index, flags );\n    if ( error )\n      goto Exit;\n\n    loader->transformed = internal->glyph_transformed;\n    if ( loader->transformed )\n    {\n      FT_Matrix  inverse;\n\n\n      loader->trans_matrix = internal->glyph_matrix;\n      loader->trans_delta  = internal->glyph_delta;\n\n      inverse = loader->trans_matrix;\n      if ( !FT_Matrix_Invert( &inverse ) )\n        FT_Vector_Transform( &loader->trans_delta, &inverse );\n    }\n\n    switch ( slot->format )\n    {\n    case FT_GLYPH_FORMAT_OUTLINE:\n      /* translate the loaded glyph when an internal transform is needed */\n      if ( loader->transformed )\n        FT_Outline_Translate( &slot->outline,\n                              loader->trans_delta.x,\n                              loader->trans_delta.y );\n\n      /* copy the outline points in the loader's current                */\n      /* extra points which are used to keep original glyph coordinates */\n      error = FT_GLYPHLOADER_CHECK_POINTS( gloader,\n                                           slot->outline.n_points + 4,\n                                           slot->outline.n_contours );\n      if ( error )\n        goto Exit;\n\n      FT_ARRAY_COPY( gloader->current.outline.points,\n                     slot->outline.points,\n                     slot->outline.n_points );\n\n      FT_ARRAY_COPY( gloader->current.outline.contours,\n                     slot->outline.contours,\n                     slot->outline.n_contours );\n\n      FT_ARRAY_COPY( gloader->current.outline.tags,\n                     slot->outline.tags,\n                     slot->outline.n_points );\n\n      gloader->current.outline.n_points   = slot->outline.n_points;\n      gloader->current.outline.n_contours = slot->outline.n_contours;\n\n      /* compute original horizontal phantom points (and ignore */\n      /* vertical ones)                                         */\n      loader->pp1.x = hints->x_delta;\n      loader->pp1.y = hints->y_delta;\n      loader->pp2.x = FT_MulFix( slot->metrics.horiAdvance,\n                                 hints->x_scale ) + hints->x_delta;\n      loader->pp2.y = hints->y_delta;\n\n      /* be sure to check for spacing glyphs */\n      if ( slot->outline.n_points == 0 )\n        goto Hint_Metrics;\n\n      /* now load the slot image into the auto-outline and run the */\n      /* automatic hinting process                                 */\n      {\n#ifdef FT_CONFIG_OPTION_PIC\n        AF_FaceGlobals         globals = loader->globals;\n#endif\n        AF_StyleClass          style_class = metrics->style_class;\n        AF_WritingSystemClass  writing_system_class =\n          AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system];\n\n\n        if ( writing_system_class->style_hints_apply )\n          writing_system_class->style_hints_apply( hints,\n                                                   &gloader->current.outline,\n                                                   metrics );\n      }\n\n      /* we now need to adjust the metrics according to the change in */\n      /* width/positioning that occurred during the hinting process   */\n      if ( scaler->render_mode != FT_RENDER_MODE_LIGHT )\n      {\n        FT_Pos        old_rsb, old_lsb, new_lsb;\n        FT_Pos        pp1x_uh, pp2x_uh;\n        AF_AxisHints  axis  = &hints->axis[AF_DIMENSION_HORZ];\n        AF_Edge       edge1 = axis->edges;         /* leftmost edge  */\n        AF_Edge       edge2 = edge1 +\n                              axis->num_edges - 1; /* rightmost edge */\n\n\n        if ( axis->num_edges > 1 && AF_HINTS_DO_ADVANCE( hints ) )\n        {\n          old_rsb = loader->pp2.x - edge2->opos;\n          old_lsb = edge1->opos;\n          new_lsb = edge1->pos;\n\n          /* remember unhinted values to later account */\n          /* for rounding errors                       */\n\n          pp1x_uh = new_lsb    - old_lsb;\n          pp2x_uh = edge2->pos + old_rsb;\n\n          /* prefer too much space over too little space */\n          /* for very small sizes                        */\n\n          if ( old_lsb < 24 )\n            pp1x_uh -= 8;\n\n          if ( old_rsb < 24 )\n            pp2x_uh += 8;\n\n          loader->pp1.x = FT_PIX_ROUND( pp1x_uh );\n          loader->pp2.x = FT_PIX_ROUND( pp2x_uh );\n\n          if ( loader->pp1.x >= new_lsb && old_lsb > 0 )\n            loader->pp1.x -= 64;\n\n          if ( loader->pp2.x <= edge2->pos && old_rsb > 0 )\n            loader->pp2.x += 64;\n\n          slot->lsb_delta = loader->pp1.x - pp1x_uh;\n          slot->rsb_delta = loader->pp2.x - pp2x_uh;\n        }\n        else\n        {\n          FT_Pos  pp1x = loader->pp1.x;\n          FT_Pos  pp2x = loader->pp2.x;\n\n\n          loader->pp1.x = FT_PIX_ROUND( pp1x );\n          loader->pp2.x = FT_PIX_ROUND( pp2x );\n\n          slot->lsb_delta = loader->pp1.x - pp1x;\n          slot->rsb_delta = loader->pp2.x - pp2x;\n        }\n      }\n      else\n      {\n        FT_Pos  pp1x = loader->pp1.x;\n        FT_Pos  pp2x = loader->pp2.x;\n\n\n        loader->pp1.x = FT_PIX_ROUND( pp1x + hints->xmin_delta );\n        loader->pp2.x = FT_PIX_ROUND( pp2x + hints->xmax_delta );\n\n        slot->lsb_delta = loader->pp1.x - pp1x;\n        slot->rsb_delta = loader->pp2.x - pp2x;\n      }\n\n      /* good, we simply add the glyph to our loader's base */\n      FT_GlyphLoader_Add( gloader );\n      break;\n\n    case FT_GLYPH_FORMAT_COMPOSITE:\n      {\n        FT_UInt      nn, num_subglyphs = slot->num_subglyphs;\n        FT_UInt      num_base_subgs, start_point;\n        FT_SubGlyph  subglyph;\n\n\n        start_point = gloader->base.outline.n_points;\n\n        /* first of all, copy the subglyph descriptors in the glyph loader */\n        error = FT_GlyphLoader_CheckSubGlyphs( gloader, num_subglyphs );\n        if ( error )\n          goto Exit;\n\n        FT_ARRAY_COPY( gloader->current.subglyphs,\n                       slot->subglyphs,\n                       num_subglyphs );\n\n        gloader->current.num_subglyphs = num_subglyphs;\n        num_base_subgs                 = gloader->base.num_subglyphs;\n\n        /* now read each subglyph independently */\n        for ( nn = 0; nn < num_subglyphs; nn++ )\n        {\n          FT_Vector  pp1, pp2;\n          FT_Pos     x, y;\n          FT_UInt    num_points, num_new_points, num_base_points;\n\n\n          /* gloader.current.subglyphs can change during glyph loading due */\n          /* to re-allocation -- we must recompute the current subglyph on */\n          /* each iteration                                                */\n          subglyph = gloader->base.subglyphs + num_base_subgs + nn;\n\n          pp1 = loader->pp1;\n          pp2 = loader->pp2;\n\n          num_base_points = gloader->base.outline.n_points;\n\n          error = af_loader_load_g( loader, scaler, subglyph->index,\n                                    load_flags, depth + 1 );\n          if ( error )\n            goto Exit;\n\n          /* recompute subglyph pointer */\n          subglyph = gloader->base.subglyphs + num_base_subgs + nn;\n\n          if ( !( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS ) )\n          {\n            loader->pp1 = pp1;\n            loader->pp2 = pp2;\n          }\n\n          num_points     = gloader->base.outline.n_points;\n          num_new_points = num_points - num_base_points;\n\n          /* now perform the transformation required for this subglyph */\n\n          if ( subglyph->flags & ( FT_SUBGLYPH_FLAG_SCALE    |\n                                   FT_SUBGLYPH_FLAG_XY_SCALE |\n                                   FT_SUBGLYPH_FLAG_2X2      ) )\n          {\n            FT_Vector*  cur   = gloader->base.outline.points +\n                                num_base_points;\n            FT_Vector*  limit = cur + num_new_points;\n\n\n            for ( ; cur < limit; cur++ )\n              FT_Vector_Transform( cur, &subglyph->transform );\n          }\n\n          /* apply offset */\n\n          if ( !( subglyph->flags & FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ) )\n          {\n            FT_Int      k = subglyph->arg1;\n            FT_UInt     l = subglyph->arg2;\n            FT_Vector*  p1;\n            FT_Vector*  p2;\n\n\n            if ( start_point + k >= num_base_points         ||\n                               l >= (FT_UInt)num_new_points )\n            {\n              error = FT_THROW( Invalid_Composite );\n              goto Exit;\n            }\n\n            l += num_base_points;\n\n            /* for now, only use the current point coordinates; */\n            /* we eventually may consider another approach      */\n            p1 = gloader->base.outline.points + start_point + k;\n            p2 = gloader->base.outline.points + start_point + l;\n\n            x = p1->x - p2->x;\n            y = p1->y - p2->y;\n          }\n          else\n          {\n            x = FT_MulFix( subglyph->arg1, hints->x_scale ) + hints->x_delta;\n            y = FT_MulFix( subglyph->arg2, hints->y_scale ) + hints->y_delta;\n\n            x = FT_PIX_ROUND( x );\n            y = FT_PIX_ROUND( y );\n          }\n\n          {\n            FT_Outline  dummy = gloader->base.outline;\n\n\n            dummy.points  += num_base_points;\n            dummy.n_points = (short)num_new_points;\n\n            FT_Outline_Translate( &dummy, x, y );\n          }\n        }\n      }\n      break;\n\n    default:\n      /* we don't support other formats (yet?) */\n      error = FT_THROW( Unimplemented_Feature );\n    }\n\n  Hint_Metrics:\n    if ( depth == 0 )\n    {\n      FT_BBox    bbox;\n      FT_Vector  vvector;\n\n\n      vvector.x = slot->metrics.vertBearingX - slot->metrics.horiBearingX;\n      vvector.y = slot->metrics.vertBearingY - slot->metrics.horiBearingY;\n      vvector.x = FT_MulFix( vvector.x, metrics->scaler.x_scale );\n      vvector.y = FT_MulFix( vvector.y, metrics->scaler.y_scale );\n\n      /* transform the hinted outline if needed */\n      if ( loader->transformed )\n      {\n        FT_Outline_Transform( &gloader->base.outline, &loader->trans_matrix );\n        FT_Vector_Transform( &vvector, &loader->trans_matrix );\n      }\n#if 1\n      /* we must translate our final outline by -pp1.x and compute */\n      /* the new metrics                                           */\n      if ( loader->pp1.x )\n        FT_Outline_Translate( &gloader->base.outline, -loader->pp1.x, 0 );\n#endif\n      FT_Outline_Get_CBox( &gloader->base.outline, &bbox );\n\n      bbox.xMin = FT_PIX_FLOOR( bbox.xMin );\n      bbox.yMin = FT_PIX_FLOOR( bbox.yMin );\n      bbox.xMax = FT_PIX_CEIL(  bbox.xMax );\n      bbox.yMax = FT_PIX_CEIL(  bbox.yMax );\n\n      slot->metrics.width        = bbox.xMax - bbox.xMin;\n      slot->metrics.height       = bbox.yMax - bbox.yMin;\n      slot->metrics.horiBearingX = bbox.xMin;\n      slot->metrics.horiBearingY = bbox.yMax;\n\n      slot->metrics.vertBearingX = FT_PIX_FLOOR( bbox.xMin + vvector.x );\n      slot->metrics.vertBearingY = FT_PIX_FLOOR( bbox.yMax + vvector.y );\n\n      /* for mono-width fonts (like Andale, Courier, etc.) we need */\n      /* to keep the original rounded advance width; ditto for     */\n      /* digits if all have the same advance width                 */\n#if 0\n      if ( !FT_IS_FIXED_WIDTH( slot->face ) )\n        slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;\n      else\n        slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,\n                                               x_scale );\n#else\n      if ( scaler->render_mode != FT_RENDER_MODE_LIGHT                      &&\n           ( FT_IS_FIXED_WIDTH( slot->face )                              ||\n             ( af_face_globals_is_digit( loader->globals, glyph_index ) &&\n               metrics->digits_have_same_width                          ) ) )\n      {\n        slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,\n                                               metrics->scaler.x_scale );\n\n        /* Set delta values to 0.  Otherwise code that uses them is */\n        /* going to ruin the fixed advance width.                   */\n        slot->lsb_delta = 0;\n        slot->rsb_delta = 0;\n      }\n      else\n      {\n        /* non-spacing glyphs must stay as-is */\n        if ( slot->metrics.horiAdvance )\n          slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;\n      }\n#endif\n\n      slot->metrics.vertAdvance = FT_MulFix( slot->metrics.vertAdvance,\n                                             metrics->scaler.y_scale );\n\n      slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );\n      slot->metrics.vertAdvance = FT_PIX_ROUND( slot->metrics.vertAdvance );\n\n      /* now copy outline into glyph slot */\n      FT_GlyphLoader_Rewind( internal->loader );\n      error = FT_GlyphLoader_CopyPoints( internal->loader, gloader );\n      if ( error )\n        goto Exit;\n\n      /* reassign all outline fields except flags to protect them */\n      slot->outline.n_contours = internal->loader->base.outline.n_contours;\n      slot->outline.n_points   = internal->loader->base.outline.n_points;\n      slot->outline.points     = internal->loader->base.outline.points;\n      slot->outline.tags       = internal->loader->base.outline.tags;\n      slot->outline.contours   = internal->loader->base.outline.contours;\n\n      slot->format  = FT_GLYPH_FORMAT_OUTLINE;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* Load a glyph. */\n\n  FT_LOCAL_DEF( FT_Error )\n  af_loader_load_glyph( AF_Module  module,\n                        FT_Face    face,\n                        FT_UInt    gindex,\n                        FT_Int32   load_flags )\n  {\n    FT_Error      error;\n    FT_Size       size   = face->size;\n    AF_Loader     loader = module->loader;\n    AF_ScalerRec  scaler;\n\n\n    if ( !size )\n      return FT_THROW( Invalid_Size_Handle );\n\n    FT_ZERO( &scaler );\n\n    scaler.face    = face;\n    scaler.x_scale = size->metrics.x_scale;\n    scaler.x_delta = 0;  /* XXX: TODO: add support for sub-pixel hinting */\n    scaler.y_scale = size->metrics.y_scale;\n    scaler.y_delta = 0;  /* XXX: TODO: add support for sub-pixel hinting */\n\n    scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );\n    scaler.flags       = 0;  /* XXX: fix this */\n\n    error = af_loader_reset( module, face );\n    if ( !error )\n    {\n      AF_StyleMetrics  metrics;\n      FT_UInt          options = AF_STYLE_NONE_DFLT;\n\n\n#ifdef FT_OPTION_AUTOFIT2\n      /* XXX: undocumented hook to activate the latin2 writing system */\n      if ( load_flags & ( 1UL << 20 ) )\n        options = AF_STYLE_LTN2_DFLT;\n#endif\n\n      error = af_face_globals_get_metrics( loader->globals, gindex,\n                                           options, &metrics );\n      if ( !error )\n      {\n#ifdef FT_CONFIG_OPTION_PIC\n        AF_FaceGlobals         globals = loader->globals;\n#endif\n        AF_StyleClass          style_class = metrics->style_class;\n        AF_WritingSystemClass  writing_system_class =\n          AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system];\n\n\n        loader->metrics = metrics;\n\n        if ( writing_system_class->style_metrics_scale )\n          writing_system_class->style_metrics_scale( metrics, &scaler );\n        else\n          metrics->scaler = scaler;\n\n        load_flags |=  FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM;\n        load_flags &= ~FT_LOAD_RENDER;\n\n        if ( writing_system_class->style_hints_init )\n        {\n          error = writing_system_class->style_hints_init( &loader->hints,\n                                                          metrics );\n          if ( error )\n            goto Exit;\n        }\n\n        error = af_loader_load_g( loader, &scaler, gindex, load_flags, 0 );\n      }\n    }\n  Exit:\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afloader.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afloader.h                                                             */\n/*                                                                         */\n/*    Auto-fitter glyph loading routines (specification).                  */\n/*                                                                         */\n/*  Copyright 2003-2005, 2011-2013 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFLOADER_H__\n#define __AFLOADER_H__\n\n#include \"afhints.h\"\n#include \"afglobal.h\"\n\n\nFT_BEGIN_HEADER\n\n  typedef struct AF_ModuleRec_*  AF_Module;\n\n  /*\n   *  The autofitter module's (global) data structure to communicate with\n   *  actual fonts.  If necessary, `local' data like the current face, the\n   *  current face's auto-hint data, or the current glyph's parameters\n   *  relevant to auto-hinting are `swapped in'.  Cf. functions like\n   *  `af_loader_reset' and `af_loader_load_g'.\n   */\n\n  typedef struct  AF_LoaderRec_\n  {\n    /* current face data */\n    FT_Face           face;\n    AF_FaceGlobals    globals;\n\n    /* current glyph data */\n    FT_GlyphLoader    gloader;\n    AF_GlyphHintsRec  hints;\n    AF_StyleMetrics   metrics;\n    FT_Bool           transformed;\n    FT_Matrix         trans_matrix;\n    FT_Vector         trans_delta;\n    FT_Vector         pp1;\n    FT_Vector         pp2;\n    /* we don't handle vertical phantom points */\n\n  } AF_LoaderRec, *AF_Loader;\n\n\n  FT_LOCAL( FT_Error )\n  af_loader_init( AF_Module  module );\n\n\n  FT_LOCAL( FT_Error )\n  af_loader_reset( AF_Module  module,\n                   FT_Face    face );\n\n\n  FT_LOCAL( void )\n  af_loader_done( AF_Module  module );\n\n\n  FT_LOCAL( FT_Error )\n  af_loader_load_glyph( AF_Module  module,\n                        FT_Face    face,\n                        FT_UInt    gindex,\n                        FT_Int32   load_flags );\n\n/* */\n\n\nFT_END_HEADER\n\n#endif /* __AFLOADER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afmodule.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afmodule.c                                                             */\n/*                                                                         */\n/*    Auto-fitter module implementation (body).                            */\n/*                                                                         */\n/*  Copyright 2003-2006, 2009, 2011-2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"afglobal.h\"\n#include \"afmodule.h\"\n#include \"afloader.h\"\n#include \"aferrors.h\"\n#include \"afpic.h\"\n\n#ifdef FT_DEBUG_AUTOFIT\n  int    _af_debug_disable_horz_hints;\n  int    _af_debug_disable_vert_hints;\n  int    _af_debug_disable_blue_hints;\n  void*  _af_debug_hints;\n#endif\n\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_AUTOHINTER_H\n#include FT_SERVICE_PROPERTIES_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_afmodule\n\n\n  static FT_Error\n  af_property_get_face_globals( FT_Face          face,\n                                AF_FaceGlobals*  aglobals,\n                                AF_Module        module )\n  {\n    FT_Error        error = FT_Err_Ok;\n    AF_FaceGlobals  globals;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    globals = (AF_FaceGlobals)face->autohint.data;\n    if ( !globals )\n    {\n      /* trigger computation of the global style data */\n      /* in case it hasn't been done yet              */\n      error = af_face_globals_new( face, &globals, module );\n      if ( !error )\n      {\n        face->autohint.data =\n          (FT_Pointer)globals;\n        face->autohint.finalizer =\n          (FT_Generic_Finalizer)af_face_globals_free;\n      }\n    }\n\n    if ( !error )\n      *aglobals = globals;\n\n    return error;\n  }\n\n\n  static FT_Error\n  af_property_set( FT_Module    ft_module,\n                   const char*  property_name,\n                   const void*  value )\n  {\n    FT_Error   error  = FT_Err_Ok;\n    AF_Module  module = (AF_Module)ft_module;\n\n\n    if ( !ft_strcmp( property_name, \"fallback-script\" ) )\n    {\n      FT_UInt*  fallback_script = (FT_UInt*)value;\n\n      FT_UInt  ss;\n\n\n      /* We translate the fallback script to a fallback style that uses */\n      /* `fallback-script' as its script and `AF_COVERAGE_NONE' as its  */\n      /* coverage value.                                                */\n      for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )\n      {\n        AF_StyleClass  style_class = AF_STYLE_CLASSES_GET[ss];\n\n\n        if ( (FT_UInt)style_class->script == *fallback_script &&\n             style_class->coverage == AF_COVERAGE_DEFAULT     )\n        {\n          module->fallback_style = ss;\n          break;\n        }\n      }\n\n      if ( !AF_STYLE_CLASSES_GET[ss] )\n      {\n        FT_TRACE0(( \"af_property_set: Invalid value %d for property `%s'\\n\",\n                    fallback_script, property_name ));\n        return FT_THROW( Invalid_Argument );\n      }\n\n      return error;\n    }\n    else if ( !ft_strcmp( property_name, \"default-script\" ) )\n    {\n      FT_UInt*  default_script = (FT_UInt*)value;\n\n\n      module->default_script = *default_script;\n\n      return error;\n    }\n    else if ( !ft_strcmp( property_name, \"increase-x-height\" ) )\n    {\n      FT_Prop_IncreaseXHeight*  prop = (FT_Prop_IncreaseXHeight*)value;\n      AF_FaceGlobals            globals;\n\n\n      error = af_property_get_face_globals( prop->face, &globals, module );\n      if ( !error )\n        globals->increase_x_height = prop->limit;\n\n      return error;\n    }\n\n    FT_TRACE0(( \"af_property_set: missing property `%s'\\n\",\n                property_name ));\n    return FT_THROW( Missing_Property );\n  }\n\n\n  static FT_Error\n  af_property_get( FT_Module    ft_module,\n                   const char*  property_name,\n                   void*        value )\n  {\n    FT_Error   error          = FT_Err_Ok;\n    AF_Module  module         = (AF_Module)ft_module;\n    FT_UInt    fallback_style = module->fallback_style;\n    FT_UInt    default_script = module->default_script;\n\n\n    if ( !ft_strcmp( property_name, \"glyph-to-script-map\" ) )\n    {\n      FT_Prop_GlyphToScriptMap*  prop = (FT_Prop_GlyphToScriptMap*)value;\n      AF_FaceGlobals             globals;\n\n\n      error = af_property_get_face_globals( prop->face, &globals, module );\n      if ( !error )\n        prop->map = globals->glyph_styles;\n\n      return error;\n    }\n    else if ( !ft_strcmp( property_name, \"fallback-script\" ) )\n    {\n      FT_UInt*  val = (FT_UInt*)value;\n\n      AF_StyleClass  style_class = AF_STYLE_CLASSES_GET[fallback_style];\n\n\n      *val = style_class->script;\n\n      return error;\n    }\n    else if ( !ft_strcmp( property_name, \"default-script\" ) )\n    {\n      FT_UInt*  val = (FT_UInt*)value;\n\n\n      *val = default_script;\n\n      return error;\n    }\n    else if ( !ft_strcmp( property_name, \"increase-x-height\" ) )\n    {\n      FT_Prop_IncreaseXHeight*  prop = (FT_Prop_IncreaseXHeight*)value;\n      AF_FaceGlobals            globals;\n\n\n      error = af_property_get_face_globals( prop->face, &globals, module );\n      if ( !error )\n        prop->limit = globals->increase_x_height;\n\n      return error;\n    }\n\n\n    FT_TRACE0(( \"af_property_get: missing property `%s'\\n\",\n                property_name ));\n    return FT_THROW( Missing_Property );\n  }\n\n\n  FT_DEFINE_SERVICE_PROPERTIESREC(\n    af_service_properties,\n    (FT_Properties_SetFunc)af_property_set,\n    (FT_Properties_GetFunc)af_property_get )\n\n\n  FT_DEFINE_SERVICEDESCREC1(\n    af_services,\n    FT_SERVICE_ID_PROPERTIES, &AF_SERVICE_PROPERTIES_GET )\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  af_get_interface( FT_Module    module,\n                    const char*  module_interface )\n  {\n    /* AF_SERVICES_GET dereferences `library' in PIC mode */\n#ifdef FT_CONFIG_OPTION_PIC\n    FT_Library  library;\n\n\n    if ( !module )\n      return NULL;\n    library = module->library;\n    if ( !library )\n      return NULL;\n#else\n    FT_UNUSED( module );\n#endif\n\n    return ft_service_list_lookup( AF_SERVICES_GET, module_interface );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  af_autofitter_init( FT_Module  ft_module )      /* AF_Module */\n  {\n    AF_Module  module = (AF_Module)ft_module;\n\n\n    module->fallback_style = AF_STYLE_FALLBACK;\n    module->default_script = AF_SCRIPT_DEFAULT;\n\n    return af_loader_init( module );\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  af_autofitter_done( FT_Module  ft_module )      /* AF_Module */\n  {\n    AF_Module  module = (AF_Module)ft_module;\n\n\n    af_loader_done( module );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  af_autofitter_load_glyph( AF_Module     module,\n                            FT_GlyphSlot  slot,\n                            FT_Size       size,\n                            FT_UInt       glyph_index,\n                            FT_Int32      load_flags )\n  {\n    FT_UNUSED( size );\n\n    return af_loader_load_glyph( module, slot->face,\n                                 glyph_index, load_flags );\n  }\n\n\n  FT_DEFINE_AUTOHINTER_INTERFACE(\n    af_autofitter_interface,\n    NULL,                                                    /* reset_face */\n    NULL,                                              /* get_global_hints */\n    NULL,                                             /* done_global_hints */\n    (FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph )  /* load_glyph */\n\n\n  FT_DEFINE_MODULE(\n    autofit_module_class,\n\n    FT_MODULE_HINTER,\n    sizeof ( AF_ModuleRec ),\n\n    \"autofitter\",\n    0x10000L,   /* version 1.0 of the autofitter  */\n    0x20000L,   /* requires FreeType 2.0 or above */\n\n    (const void*)&AF_INTERFACE_GET,\n\n    (FT_Module_Constructor)af_autofitter_init,\n    (FT_Module_Destructor) af_autofitter_done,\n    (FT_Module_Requester)  af_get_interface )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afmodule.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afmodule.h                                                             */\n/*                                                                         */\n/*    Auto-fitter module implementation (specification).                   */\n/*                                                                         */\n/*  Copyright 2003-2005, 2009, 2012, 2013 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFMODULE_H__\n#define __AFMODULE_H__\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_MODULE_H\n\n#include \"afloader.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /*\n   *  This is the `extended' FT_Module structure which holds the\n   *  autofitter's global data.  Right before hinting a glyph, the data\n   *  specific to the glyph's face (blue zones, stem widths, etc.) are\n   *  loaded into `loader' (see function `af_loader_reset').\n   */\n\n  typedef struct  AF_ModuleRec_\n  {\n    FT_ModuleRec  root;\n\n    FT_UInt       fallback_style;\n    FT_UInt       default_script;\n\n    AF_LoaderRec  loader[1];\n\n  } AF_ModuleRec;\n\n\nFT_DECLARE_MODULE(autofit_module_class)\n\n\nFT_END_HEADER\n\n#endif /* __AFMODULE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afpic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afpic.c                                                                */\n/*                                                                         */\n/*    The FreeType position independent code services for autofit module.  */\n/*                                                                         */\n/*  Copyright 2009-2014 by                                                 */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"afpic.h\"\n#include \"afglobal.h\"\n#include \"aferrors.h\"\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* forward declaration of PIC init functions from afmodule.c */\n  FT_Error\n  FT_Create_Class_af_services( FT_Library           library,\n                               FT_ServiceDescRec**  output_class );\n\n  void\n  FT_Destroy_Class_af_services( FT_Library          library,\n                                FT_ServiceDescRec*  clazz );\n\n  void\n  FT_Init_Class_af_service_properties( FT_Service_PropertiesRec*  clazz );\n\n  void FT_Init_Class_af_autofitter_interface(\n    FT_Library                   library,\n    FT_AutoHinter_InterfaceRec*  clazz );\n\n\n  /* forward declaration of PIC init functions from writing system classes */\n#undef  WRITING_SYSTEM\n#define WRITING_SYSTEM( ws, WS )  /* empty */\n\n#include \"afwrtsys.h\"\n\n\n  void\n  autofit_module_class_pic_free( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Memory          memory        = library->memory;\n\n\n    if ( pic_container->autofit )\n    {\n      AFModulePIC*  container = (AFModulePIC*)pic_container->autofit;\n\n\n      if ( container->af_services )\n        FT_Destroy_Class_af_services( library,\n                                      container->af_services );\n      container->af_services = NULL;\n\n      FT_FREE( container );\n      pic_container->autofit = NULL;\n    }\n  }\n\n\n  FT_Error\n  autofit_module_class_pic_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_UInt            ss;\n    FT_Error           error         = FT_Err_Ok;\n    AFModulePIC*       container     = NULL;\n    FT_Memory          memory        = library->memory;\n\n\n    /* allocate pointer, clear and set global container pointer */\n    if ( FT_ALLOC ( container, sizeof ( *container ) ) )\n      return error;\n    FT_MEM_SET( container, 0, sizeof ( *container ) );\n    pic_container->autofit = container;\n\n    /* initialize pointer table -                       */\n    /* this is how the module usually expects this data */\n    error = FT_Create_Class_af_services( library,\n                                         &container->af_services );\n    if ( error )\n      goto Exit;\n\n    FT_Init_Class_af_service_properties( &container->af_service_properties );\n\n    for ( ss = 0; ss < AF_WRITING_SYSTEM_MAX; ss++ )\n      container->af_writing_system_classes[ss] =\n        &container->af_writing_system_classes_rec[ss];\n    container->af_writing_system_classes[AF_WRITING_SYSTEM_MAX] = NULL;\n\n    for ( ss = 0; ss < AF_SCRIPT_MAX; ss++ )\n      container->af_script_classes[ss] =\n        &container->af_script_classes_rec[ss];\n    container->af_script_classes[AF_SCRIPT_MAX] = NULL;\n\n    for ( ss = 0; ss < AF_STYLE_MAX; ss++ )\n      container->af_style_classes[ss] =\n        &container->af_style_classes_rec[ss];\n    container->af_style_classes[AF_STYLE_MAX] = NULL;\n\n#undef  WRITING_SYSTEM\n#define WRITING_SYSTEM( ws, WS )                             \\\n        FT_Init_Class_af_ ## ws ## _writing_system_class(    \\\n          &container->af_writing_system_classes_rec[ss++] );\n\n    ss = 0;\n#include \"afwrtsys.h\"\n\n#undef  SCRIPT\n#define SCRIPT( s, S, d, h, sc1, sc2, sc3 )          \\\n        FT_Init_Class_af_ ## s ## _script_class(     \\\n          &container->af_script_classes_rec[ss++] );\n\n    ss = 0;\n#include \"afscript.h\"\n\n#undef  STYLE\n#define STYLE( s, S, d, ws, sc, bss, c )            \\\n        FT_Init_Class_af_ ## s ## _style_class(     \\\n          &container->af_style_classes_rec[ss++] );\n\n    ss = 0;\n#include \"afstyles.h\"\n\n    FT_Init_Class_af_autofitter_interface(\n      library, &container->af_autofitter_interface );\n\n  Exit:\n    if ( error )\n      autofit_module_class_pic_free( library );\n    return error;\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afpic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afpic.h                                                                */\n/*                                                                         */\n/*    The FreeType position independent code services for autofit module.  */\n/*                                                                         */\n/*  Copyright 2009, 2011-2013 by                                           */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFPIC_H__\n#define __AFPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#include FT_INTERNAL_PIC_H\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define AF_SERVICES_GET                af_services\n#define AF_SERVICE_PROPERTIES_GET      af_service_properties\n\n#define AF_WRITING_SYSTEM_CLASSES_GET  af_writing_system_classes\n#define AF_SCRIPT_CLASSES_GET          af_script_classes\n#define AF_STYLE_CLASSES_GET           af_style_classes\n#define AF_INTERFACE_GET               af_autofitter_interface\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n  /* some include files required for members of AFModulePIC */\n#include FT_SERVICE_PROPERTIES_H\n\n#include \"aftypes.h\"\n\n\n  typedef struct  AFModulePIC_\n  {\n    FT_ServiceDescRec*          af_services;\n    FT_Service_PropertiesRec    af_service_properties;\n\n    AF_WritingSystemClass       af_writing_system_classes\n                                  [AF_WRITING_SYSTEM_MAX + 1];\n    AF_WritingSystemClassRec    af_writing_system_classes_rec\n                                  [AF_WRITING_SYSTEM_MAX];\n\n    AF_ScriptClass              af_script_classes\n                                  [AF_SCRIPT_MAX + 1];\n    AF_ScriptClassRec           af_script_classes_rec\n                                  [AF_SCRIPT_MAX];\n\n    AF_StyleClass               af_style_classes\n                                  [AF_STYLE_MAX + 1];\n    AF_StyleClassRec            af_style_classes_rec\n                                  [AF_STYLE_MAX];\n\n    FT_AutoHinter_InterfaceRec  af_autofitter_interface;\n\n  } AFModulePIC;\n\n\n#define GET_PIC( lib )  \\\n          ( (AFModulePIC*)((lib)->pic_container.autofit) )\n\n#define AF_SERVICES_GET  \\\n          ( GET_PIC( library )->af_services )\n#define AF_SERVICE_PROPERTIES_GET  \\\n          ( GET_PIC( library )->af_service_properties )\n\n#define AF_WRITING_SYSTEM_CLASSES_GET  \\\n          ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_writing_system_classes )\n#define AF_SCRIPT_CLASSES_GET  \\\n          ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_script_classes )\n#define AF_STYLE_CLASSES_GET  \\\n          ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_style_classes )\n#define AF_INTERFACE_GET  \\\n          ( GET_PIC( library )->af_autofitter_interface )\n\n\n  /* see afpic.c for the implementation */\n  void\n  autofit_module_class_pic_free( FT_Library  library );\n\n  FT_Error\n  autofit_module_class_pic_init( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __AFPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afranges.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afranges.c                                                             */\n/*                                                                         */\n/*    Auto-fitter Unicode script ranges (body).                            */\n/*                                                                         */\n/*  Copyright 2013, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"afranges.h\"\n\n\n  const AF_Script_UniRangeRec  af_cyrl_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0400UL,  0x04FFUL ),  /* Cyrillic            */\n    AF_UNIRANGE_REC(  0x0500UL,  0x052FUL ),  /* Cyrillic Supplement */\n    AF_UNIRANGE_REC(  0x2DE0UL,  0x2DFFUL ),  /* Cyrillic Extended-A */\n    AF_UNIRANGE_REC(  0xA640UL,  0xA69FUL ),  /* Cyrillic Extended-B */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  /* there are some characters in the Devanagari Unicode block that are    */\n  /* generic to Indic scripts; we omit them so that their presence doesn't */\n  /* trigger Devanagari                                                    */\n\n  const AF_Script_UniRangeRec  af_deva_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0900UL,  0x093BUL ),  /* Devanagari       */\n    /* omitting U+093C nukta */\n    AF_UNIRANGE_REC(  0x093DUL,  0x0950UL ),\n    /* omitting U+0951 udatta, U+0952 anudatta */\n    AF_UNIRANGE_REC(  0x0953UL,  0x0963UL ),\n    /* omitting U+0964 danda, U+0965 double danda */\n    AF_UNIRANGE_REC(  0x0966UL,  0x097FUL ),\n    AF_UNIRANGE_REC(  0x20B9UL,  0x20B9UL ),  /* (new) Rupee sign */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_grek_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0370UL,  0x03FFUL ),  /* Greek and Coptic */\n    AF_UNIRANGE_REC(  0x1F00UL,  0x1FFFUL ),  /* Greek Extended   */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_hebr_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0590UL,  0x05FFUL ),  /* Hebrew                          */\n    AF_UNIRANGE_REC(  0xFB1DUL,  0xFB4FUL ),  /* Alphab. Present. Forms (Hebrew) */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_latn_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0020UL,  0x007FUL ),  /* Basic Latin (no control chars)         */\n    AF_UNIRANGE_REC(  0x00A0UL,  0x00FFUL ),  /* Latin-1 Supplement (no control chars)  */\n    AF_UNIRANGE_REC(  0x0100UL,  0x017FUL ),  /* Latin Extended-A                       */\n    AF_UNIRANGE_REC(  0x0180UL,  0x024FUL ),  /* Latin Extended-B                       */\n    AF_UNIRANGE_REC(  0x0250UL,  0x02AFUL ),  /* IPA Extensions                         */\n    AF_UNIRANGE_REC(  0x02B0UL,  0x02FFUL ),  /* Spacing Modifier Letters               */\n    AF_UNIRANGE_REC(  0x0300UL,  0x036FUL ),  /* Combining Diacritical Marks            */\n    AF_UNIRANGE_REC(  0x1D00UL,  0x1D7FUL ),  /* Phonetic Extensions                    */\n    AF_UNIRANGE_REC(  0x1D80UL,  0x1DBFUL ),  /* Phonetic Extensions Supplement         */\n    AF_UNIRANGE_REC(  0x1DC0UL,  0x1DFFUL ),  /* Combining Diacritical Marks Supplement */\n    AF_UNIRANGE_REC(  0x1E00UL,  0x1EFFUL ),  /* Latin Extended Additional              */\n    AF_UNIRANGE_REC(  0x2000UL,  0x206FUL ),  /* General Punctuation                    */\n    AF_UNIRANGE_REC(  0x2070UL,  0x209FUL ),  /* Superscripts and Subscripts            */\n    AF_UNIRANGE_REC(  0x20A0UL,  0x20B8UL ),  /* Currency Symbols ...                   */\n    AF_UNIRANGE_REC(  0x20BAUL,  0x20CFUL ),  /* ... except new Rupee sign              */\n    AF_UNIRANGE_REC(  0x2150UL,  0x218FUL ),  /* Number Forms                           */\n    AF_UNIRANGE_REC(  0x2460UL,  0x24FFUL ),  /* Enclosed Alphanumerics                 */\n    AF_UNIRANGE_REC(  0x2C60UL,  0x2C7FUL ),  /* Latin Extended-C                       */\n    AF_UNIRANGE_REC(  0x2E00UL,  0x2E7FUL ),  /* Supplemental Punctuation               */\n    AF_UNIRANGE_REC(  0xA720UL,  0xA7FFUL ),  /* Latin Extended-D                       */\n    AF_UNIRANGE_REC(  0xFB00UL,  0xFB06UL ),  /* Alphab. Present. Forms (Latin Ligs)    */\n    AF_UNIRANGE_REC( 0x1D400UL, 0x1D7FFUL ),  /* Mathematical Alphanumeric Symbols      */\n    AF_UNIRANGE_REC( 0x1F100UL, 0x1F1FFUL ),  /* Enclosed Alphanumeric Supplement       */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_none_uniranges[] =\n  {\n    AF_UNIRANGE_REC( 0UL, 0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_telu_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0C00UL,  0x0C7FUL ),  /* Telugu */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n#ifdef AF_CONFIG_OPTION_INDIC\n\n  const AF_Script_UniRangeRec  af_beng_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0980UL,  0x09FFUL ),  /* Bengali */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_gujr_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0A80UL,  0x0AFFUL ),  /* Gujarati */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_guru_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0A00UL,  0x0A7FUL ),  /* Gurmukhi */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_knda_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0C80UL,  0x0CFFUL ),  /* Kannada */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_limb_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x1900UL,  0x194FUL ),  /* Limbu */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_mlym_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0D00UL,  0x0D7FUL ),  /* Malayalam */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_orya_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0B00UL,  0x0B7FUL ),  /* Oriya */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_sinh_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0D80UL,  0x0DFFUL ),  /* Sinhala */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_sund_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x1B80UL,  0x1BBFUL ),  /* Sundanese */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_sylo_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0xA800UL,  0xA82FUL ),  /* Syloti Nagri */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_taml_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0B80UL,  0x0BFFUL ),  /* Tamil */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n  const AF_Script_UniRangeRec  af_tibt_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x0F00UL,  0x0FFFUL ),  /* Tibetan */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n#endif /* !AF_CONFIG_OPTION_INDIC */\n\n#ifdef AF_CONFIG_OPTION_CJK\n\n  /* this corresponds to Unicode 6.0 */\n\n  const AF_Script_UniRangeRec  af_hani_uniranges[] =\n  {\n    AF_UNIRANGE_REC(  0x1100UL,  0x11FFUL ),  /* Hangul Jamo                             */\n    AF_UNIRANGE_REC(  0x2E80UL,  0x2EFFUL ),  /* CJK Radicals Supplement                 */\n    AF_UNIRANGE_REC(  0x2F00UL,  0x2FDFUL ),  /* Kangxi Radicals                         */\n    AF_UNIRANGE_REC(  0x2FF0UL,  0x2FFFUL ),  /* Ideographic Description Characters      */\n    AF_UNIRANGE_REC(  0x3000UL,  0x303FUL ),  /* CJK Symbols and Punctuation             */\n    AF_UNIRANGE_REC(  0x3040UL,  0x309FUL ),  /* Hiragana                                */\n    AF_UNIRANGE_REC(  0x30A0UL,  0x30FFUL ),  /* Katakana                                */\n    AF_UNIRANGE_REC(  0x3100UL,  0x312FUL ),  /* Bopomofo                                */\n    AF_UNIRANGE_REC(  0x3130UL,  0x318FUL ),  /* Hangul Compatibility Jamo               */\n    AF_UNIRANGE_REC(  0x3190UL,  0x319FUL ),  /* Kanbun                                  */\n    AF_UNIRANGE_REC(  0x31A0UL,  0x31BFUL ),  /* Bopomofo Extended                       */\n    AF_UNIRANGE_REC(  0x31C0UL,  0x31EFUL ),  /* CJK Strokes                             */\n    AF_UNIRANGE_REC(  0x31F0UL,  0x31FFUL ),  /* Katakana Phonetic Extensions            */\n    AF_UNIRANGE_REC(  0x3200UL,  0x32FFUL ),  /* Enclosed CJK Letters and Months         */\n    AF_UNIRANGE_REC(  0x3300UL,  0x33FFUL ),  /* CJK Compatibility                       */\n    AF_UNIRANGE_REC(  0x3400UL,  0x4DBFUL ),  /* CJK Unified Ideographs Extension A      */\n    AF_UNIRANGE_REC(  0x4DC0UL,  0x4DFFUL ),  /* Yijing Hexagram Symbols                 */\n    AF_UNIRANGE_REC(  0x4E00UL,  0x9FFFUL ),  /* CJK Unified Ideographs                  */\n    AF_UNIRANGE_REC(  0xA960UL,  0xA97FUL ),  /* Hangul Jamo Extended-A                  */\n    AF_UNIRANGE_REC(  0xAC00UL,  0xD7AFUL ),  /* Hangul Syllables                        */\n    AF_UNIRANGE_REC(  0xD7B0UL,  0xD7FFUL ),  /* Hangul Jamo Extended-B                  */\n    AF_UNIRANGE_REC(  0xF900UL,  0xFAFFUL ),  /* CJK Compatibility Ideographs            */\n    AF_UNIRANGE_REC(  0xFE10UL,  0xFE1FUL ),  /* Vertical forms                          */\n    AF_UNIRANGE_REC(  0xFE30UL,  0xFE4FUL ),  /* CJK Compatibility Forms                 */\n    AF_UNIRANGE_REC(  0xFF00UL,  0xFFEFUL ),  /* Halfwidth and Fullwidth Forms           */\n    AF_UNIRANGE_REC( 0x1B000UL, 0x1B0FFUL ),  /* Kana Supplement                         */\n    AF_UNIRANGE_REC( 0x1D300UL, 0x1D35FUL ),  /* Tai Xuan Hing Symbols                   */\n    AF_UNIRANGE_REC( 0x1F200UL, 0x1F2FFUL ),  /* Enclosed Ideographic Supplement         */\n    AF_UNIRANGE_REC( 0x20000UL, 0x2A6DFUL ),  /* CJK Unified Ideographs Extension B      */\n    AF_UNIRANGE_REC( 0x2A700UL, 0x2B73FUL ),  /* CJK Unified Ideographs Extension C      */\n    AF_UNIRANGE_REC( 0x2B740UL, 0x2B81FUL ),  /* CJK Unified Ideographs Extension D      */\n    AF_UNIRANGE_REC( 0x2F800UL, 0x2FA1FUL ),  /* CJK Compatibility Ideographs Supplement */\n    AF_UNIRANGE_REC(       0UL,       0UL )\n  };\n\n#endif /* !AF_CONFIG_OPTION_CJK */\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afranges.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afranges.h                                                             */\n/*                                                                         */\n/*    Auto-fitter Unicode script ranges (specification).                   */\n/*                                                                         */\n/*  Copyright 2013, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFRANGES_H__\n#define __AFRANGES_H__\n\n\n#include \"aftypes.h\"\n\n\nFT_BEGIN_HEADER\n\n#undef  SCRIPT\n#define SCRIPT( s, S, d, h, sc1, sc2, sc3 )                             \\\n          extern const AF_Script_UniRangeRec  af_ ## s ## _uniranges[];\n\n#include \"afscript.h\"\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __AFRANGES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afscript.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afscript.h                                                             */\n/*                                                                         */\n/*    Auto-fitter scripts (specification only).                            */\n/*                                                                         */\n/*  Copyright 2013, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /* The following part can be included multiple times. */\n  /* Define `SCRIPT' as needed.                         */\n\n\n  /* Add new scripts here.  The first and second arguments are the    */\n  /* script name in lowercase and uppercase, respectively, followed   */\n  /* by a description string.  Then comes the corresponding HarfBuzz  */\n  /* script name tag, followed by a string of standard characters (to */\n  /* derive the standard width and height of stems).                  */\n\n  SCRIPT( cyrl, CYRL,\n          \"Cyrillic\",\n          HB_SCRIPT_CYRILLIC,\n          0x43E, 0x41E, 0x0 ) /* оО */\n\n  SCRIPT( deva, DEVA,\n          \"Devanagari\",\n          HB_SCRIPT_DEVANAGARI,\n          0x920, 0x935, 0x91F ) /* ठ व ट */\n\n  SCRIPT( grek, GREK,\n          \"Greek\",\n          HB_SCRIPT_GREEK,\n          0x3BF, 0x39F, 0x0 ) /* οΟ */\n\n  SCRIPT( hebr, HEBR,\n          \"Hebrew\",\n          HB_SCRIPT_HEBREW,\n          0x5DD, 0x0, 0x0 ) /* ם */\n\n  SCRIPT( latn, LATN,\n          \"Latin\",\n          HB_SCRIPT_LATIN,\n          'o', 'O', '0' )\n\n  SCRIPT( none, NONE,\n          \"no script\",\n          HB_SCRIPT_INVALID,\n          0x0, 0x0, 0x0 )\n\n  /* there are no simple forms for letters; we thus use two digit shapes */\n  SCRIPT( telu, TELU,\n          \"Telugu\",\n          HB_SCRIPT_TELUGU,\n          0xC66, 0xC67, 0x0 ) /* ౦ ౧ */\n\n#ifdef AF_CONFIG_OPTION_INDIC\n\n  SCRIPT( beng, BENG,\n          \"Bengali\",\n          HB_SCRIPT_BENGALI,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( gujr, GUJR,\n          \"Gujarati\",\n          HB_SCRIPT_GUJARATI,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( guru, GURU,\n          \"Gurmukhi\",\n          HB_SCRIPT_GURMUKHI,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( knda, KNDA,\n          \"Kannada\",\n          HB_SCRIPT_KANNADA,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( limb, LIMB,\n          \"Limbu\",\n          HB_SCRIPT_LIMBU,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( mlym, MLYM,\n          \"Malayalam\",\n          HB_SCRIPT_MALAYALAM,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( orya, ORYA,\n          \"Oriya\",\n          HB_SCRIPT_ORIYA,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( sinh, SINH,\n          \"Sinhala\",\n          HB_SCRIPT_SINHALA,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( sund, SUND,\n          \"Sundanese\",\n          HB_SCRIPT_SUNDANESE,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( sylo, SYLO,\n          \"Syloti Nagri\",\n          HB_SCRIPT_SYLOTI_NAGRI,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( taml, TAML,\n          \"Tamil\",\n          HB_SCRIPT_TAMIL,\n          'o', 0x0, 0x0 ) /* XXX */\n\n  SCRIPT( tibt, TIBT,\n          \"Tibetan\",\n          HB_SCRIPT_TIBETAN,\n          'o', 0x0, 0x0 ) /* XXX */\n\n#endif /* AF_CONFIG_OPTION_INDIC */\n\n#ifdef AF_CONFIG_OPTION_CJK\n\n  SCRIPT( hani, HANI,\n          \"CJKV ideographs\",\n          HB_SCRIPT_HAN,\n          0x7530, 0x56D7, 0x0 ) /* 田囗 */\n\n#endif /* AF_CONFIG_OPTION_CJK */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afstyles.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afstyles.h                                                             */\n/*                                                                         */\n/*    Auto-fitter styles (specification only).                             */\n/*                                                                         */\n/*  Copyright 2013, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /* The following part can be included multiple times. */\n  /* Define `STYLE' as needed.                          */\n\n\n  /* Add new styles here.  The first and second arguments are the  */\n  /* style name in lowercase and uppercase, respectively, followed */\n  /* by a description string.  The next arguments are the          */\n  /* corresponding writing system, script, blue stringset, and     */\n  /* coverage.                                                     */\n  /*                                                               */\n  /* Note that styles using `AF_COVERAGE_DEFAULT' should always    */\n  /* come after styles with other coverages.                       */\n  /*                                                               */\n  /* Example:                                                      */\n  /*                                                               */\n  /*   STYLE( cyrl_dflt, CYRL_DFLT,                                */\n  /*          \"Cyrillic default style\",                            */\n  /*          AF_WRITING_SYSTEM_LATIN,                             */\n  /*          AF_SCRIPT_CYRL,                                      */\n  /*          AF_BLUE_STRINGSET_CYRL,                              */\n  /*          AF_COVERAGE_DEFAULT )                                */\n\n#undef  STYLE_LATIN\n#define STYLE_LATIN( s, S, f, F, ds, df, C ) \\\n          STYLE( s ## _ ## f, S ## _ ## F,   \\\n                 ds \" \" df \" style\",         \\\n                 AF_WRITING_SYSTEM_LATIN,    \\\n                 AF_SCRIPT_ ## S,            \\\n                 AF_BLUE_STRINGSET_ ## S,    \\\n                 AF_COVERAGE_ ## C )\n\n#undef  META_STYLE_LATIN\n#define META_STYLE_LATIN( s, S, ds )                     \\\n          STYLE_LATIN( s, S, c2cp, C2CP, ds,             \\\n                       \"petite capticals from capitals\", \\\n                       PETITE_CAPITALS_FROM_CAPITALS )   \\\n          STYLE_LATIN( s, S, c2sc, C2SC, ds,             \\\n                       \"small capticals from capitals\",  \\\n                       SMALL_CAPITALS_FROM_CAPITALS )    \\\n          STYLE_LATIN( s, S, ordn, ORDN, ds,             \\\n                       \"ordinals\",                       \\\n                       ORDINALS )                        \\\n          STYLE_LATIN( s, S, pcap, PCAP, ds,             \\\n                       \"petite capitals\",                \\\n                       PETITE_CAPITALS )                 \\\n          STYLE_LATIN( s, S, sinf, SINF, ds,             \\\n                       \"scientific inferiors\",           \\\n                       SCIENTIFIC_INFERIORS )            \\\n          STYLE_LATIN( s, S, smcp, SMCP, ds,             \\\n                       \"small capitals\",                 \\\n                       SMALL_CAPITALS )                  \\\n          STYLE_LATIN( s, S, subs, SUBS, ds,             \\\n                       \"subscript\",                      \\\n                       SUBSCRIPT )                       \\\n          STYLE_LATIN( s, S, sups, SUPS, ds,             \\\n                       \"superscript\",                    \\\n                       SUPERSCRIPT )                     \\\n          STYLE_LATIN( s, S, titl, TITL, ds,             \\\n                       \"titling\",                        \\\n                       TITLING )                         \\\n          STYLE_LATIN( s, S, dflt, DFLT, ds,             \\\n                       \"default\",                        \\\n                       DEFAULT )\n\n  META_STYLE_LATIN( cyrl, CYRL, \"Cyrillic\" )\n\n  META_STYLE_LATIN( grek, GREK, \"Greek\" )\n\n  STYLE( hebr_dflt, HEBR_DFLT,\n         \"Hebrew default style\",\n         AF_WRITING_SYSTEM_LATIN,\n         AF_SCRIPT_HEBR,\n         AF_BLUE_STRINGSET_HEBR,\n         AF_COVERAGE_DEFAULT )\n  META_STYLE_LATIN( latn, LATN, \"Latin\" )\n\n  STYLE( deva_dflt, DEVA_DFLT,\n         \"Devanagari default style\",\n         AF_WRITING_SYSTEM_LATIN,\n         AF_SCRIPT_DEVA,\n         AF_BLUE_STRINGSET_DEVA,\n         AF_COVERAGE_DEFAULT )\n\n#ifdef FT_OPTION_AUTOFIT2\n  STYLE( ltn2_dflt, LTN2_DFLT,\n         \"Latin 2 default style\",\n         AF_WRITING_SYSTEM_LATIN2,\n         AF_SCRIPT_LATN,\n         AF_BLUE_STRINGSET_LATN,\n         AF_COVERAGE_DEFAULT )\n#endif\n\n  STYLE( none_dflt, NONE_DFLT,\n         \"no style\",\n         AF_WRITING_SYSTEM_DUMMY,\n         AF_SCRIPT_NONE,\n         (AF_Blue_Stringset)0,\n         AF_COVERAGE_DEFAULT )\n\n  STYLE( telu_dflt, TELU_DFLT,\n         \"Telugu default style\",\n         AF_WRITING_SYSTEM_LATIN,\n         AF_SCRIPT_TELU,\n         AF_BLUE_STRINGSET_TELU,\n         AF_COVERAGE_DEFAULT )\n\n#ifdef AF_CONFIG_OPTION_INDIC\n\n  /* no blue stringset support for the Indic writing system yet */\n#undef  STYLE_DEFAULT_INDIC\n#define STYLE_DEFAULT_INDIC( s, S, d )    \\\n          STYLE( s ## _dflt, S ## _DFLT,  \\\n                 d \" default style\",      \\\n                 AF_WRITING_SYSTEM_INDIC, \\\n                 AF_SCRIPT_ ## S,         \\\n                 (AF_Blue_Stringset)0,    \\\n                 AF_COVERAGE_DEFAULT )\n\n  STYLE_DEFAULT_INDIC( beng, BENG, \"Bengali\" )\n  STYLE_DEFAULT_INDIC( gujr, GUJR, \"Gujarati\" )\n  STYLE_DEFAULT_INDIC( guru, GURU, \"Gurmukhi\" )\n  STYLE_DEFAULT_INDIC( knda, KNDA, \"Kannada\" )\n  STYLE_DEFAULT_INDIC( limb, LIMB, \"Limbu\" )\n  STYLE_DEFAULT_INDIC( mlym, MLYM, \"Malayalam\" )\n  STYLE_DEFAULT_INDIC( orya, ORYA, \"Oriya\" )\n  STYLE_DEFAULT_INDIC( sinh, SINH, \"Sinhala\" )\n  STYLE_DEFAULT_INDIC( sund, SUND, \"Sundanese\" )\n  STYLE_DEFAULT_INDIC( sylo, SYLO, \"Syloti Nagri\" )\n  STYLE_DEFAULT_INDIC( taml, TAML, \"Tamil\" )\n  STYLE_DEFAULT_INDIC( tibt, TIBT, \"Tibetan\" )\n\n#endif /* AF_CONFIG_OPTION_INDIC */\n\n#ifdef AF_CONFIG_OPTION_CJK\n\n  STYLE( hani_dflt, HANI_DFLT,\n         \"CJKV ideographs default style\",\n         AF_WRITING_SYSTEM_CJK,\n         AF_SCRIPT_HANI,\n         AF_BLUE_STRINGSET_HANI,\n         AF_COVERAGE_DEFAULT )\n\n#endif /* AF_CONFIG_OPTION_CJK */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/aftypes.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  aftypes.h                                                              */\n/*                                                                         */\n/*    Auto-fitter types (specification only).                              */\n/*                                                                         */\n/*  Copyright 2003-2009, 2011-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************\n   *\n   *  The auto-fitter is a complete rewrite of the old auto-hinter.\n   *  Its main feature is the ability to differentiate between different\n   *  writing systems and scripts in order to apply specific rules.\n   *\n   *  The code has also been compartmentized into several entities that\n   *  should make algorithmic experimentation easier than with the old\n   *  code.\n   *\n   *************************************************************************/\n\n\n#ifndef __AFTYPES_H__\n#define __AFTYPES_H__\n\n#include <ft2build.h>\n\n#include FT_FREETYPE_H\n#include FT_OUTLINE_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n\n#include \"afblue.h\"\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    D E B U G G I N G                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#ifdef FT_DEBUG_AUTOFIT\n\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\nextern int    _af_debug_disable_horz_hints;\nextern int    _af_debug_disable_vert_hints;\nextern int    _af_debug_disable_blue_hints;\nextern void*  _af_debug_hints;\n\n#endif /* FT_DEBUG_AUTOFIT */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                 U T I L I T Y   S T U F F                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  AF_WidthRec_\n  {\n    FT_Pos  org;  /* original position/width in font units              */\n    FT_Pos  cur;  /* current/scaled position/width in device sub-pixels */\n    FT_Pos  fit;  /* current/fitted position/width in device sub-pixels */\n\n  } AF_WidthRec, *AF_Width;\n\n\n  FT_LOCAL( void )\n  af_sort_pos( FT_UInt  count,\n               FT_Pos*  table );\n\n  FT_LOCAL( void )\n  af_sort_and_quantize_widths( FT_UInt*  count,\n                               AF_Width  widths,\n                               FT_Pos    threshold );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                   A N G L E   T Y P E S                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n   *  The auto-fitter doesn't need a very high angular accuracy;\n   *  this allows us to speed up some computations considerably with a\n   *  light Cordic algorithm (see afangles.c).\n   */\n\n  typedef FT_Int  AF_Angle;\n\n\n#define AF_ANGLE_PI   256\n#define AF_ANGLE_2PI  ( AF_ANGLE_PI * 2 )\n#define AF_ANGLE_PI2  ( AF_ANGLE_PI / 2 )\n#define AF_ANGLE_PI4  ( AF_ANGLE_PI / 4 )\n\n\n#if 0\n  /*\n   *  compute the angle of a given 2-D vector\n   */\n  FT_LOCAL( AF_Angle )\n  af_angle_atan( FT_Pos  dx,\n                 FT_Pos  dy );\n\n\n  /*\n   *  compute `angle2 - angle1'; the result is always within\n   *  the range [-AF_ANGLE_PI .. AF_ANGLE_PI - 1]\n   */\n  FT_LOCAL( AF_Angle )\n  af_angle_diff( AF_Angle  angle1,\n                 AF_Angle  angle2 );\n#endif /* 0 */\n\n\n#define AF_ANGLE_DIFF( result, angle1, angle2 ) \\\n  FT_BEGIN_STMNT                                \\\n    AF_Angle  _delta = (angle2) - (angle1);     \\\n                                                \\\n                                                \\\n    _delta %= AF_ANGLE_2PI;                     \\\n    if ( _delta < 0 )                           \\\n      _delta += AF_ANGLE_2PI;                   \\\n                                                \\\n    if ( _delta > AF_ANGLE_PI )                 \\\n      _delta -= AF_ANGLE_2PI;                   \\\n                                                \\\n    result = _delta;                            \\\n  FT_END_STMNT\n\n\n  /*  opaque handle to glyph-specific hints -- see `afhints.h' for more\n   *  details\n   */\n  typedef struct AF_GlyphHintsRec_*  AF_GlyphHints;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       S C A L E R S                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n   *  A scaler models the target pixel device that will receive the\n   *  auto-hinted glyph image.\n   */\n\n  typedef enum  AF_ScalerFlags_\n  {\n    AF_SCALER_FLAG_NO_HORIZONTAL = 1,  /* disable horizontal hinting */\n    AF_SCALER_FLAG_NO_VERTICAL   = 2,  /* disable vertical hinting   */\n    AF_SCALER_FLAG_NO_ADVANCE    = 4   /* disable advance hinting    */\n\n  } AF_ScalerFlags;\n\n\n  typedef struct  AF_ScalerRec_\n  {\n    FT_Face         face;        /* source font face                        */\n    FT_Fixed        x_scale;     /* from font units to 1/64th device pixels */\n    FT_Fixed        y_scale;     /* from font units to 1/64th device pixels */\n    FT_Pos          x_delta;     /* in 1/64th device pixels                 */\n    FT_Pos          y_delta;     /* in 1/64th device pixels                 */\n    FT_Render_Mode  render_mode; /* monochrome, anti-aliased, LCD, etc.     */\n    FT_UInt32       flags;       /* additional control flags, see above     */\n\n  } AF_ScalerRec, *AF_Scaler;\n\n\n#define AF_SCALER_EQUAL_SCALES( a, b )      \\\n          ( (a)->x_scale == (b)->x_scale && \\\n            (a)->y_scale == (b)->y_scale && \\\n            (a)->x_delta == (b)->x_delta && \\\n            (a)->y_delta == (b)->y_delta )\n\n\n  typedef struct AF_StyleMetricsRec_*  AF_StyleMetrics;\n\n  /*  This function parses an FT_Face to compute global metrics for\n   *  a specific style.\n   */\n  typedef FT_Error\n  (*AF_WritingSystem_InitMetricsFunc)( AF_StyleMetrics  metrics,\n                                       FT_Face          face );\n\n  typedef void\n  (*AF_WritingSystem_ScaleMetricsFunc)( AF_StyleMetrics  metrics,\n                                        AF_Scaler        scaler );\n\n  typedef void\n  (*AF_WritingSystem_DoneMetricsFunc)( AF_StyleMetrics  metrics );\n\n\n  typedef FT_Error\n  (*AF_WritingSystem_InitHintsFunc)( AF_GlyphHints    hints,\n                                     AF_StyleMetrics  metrics );\n\n  typedef void\n  (*AF_WritingSystem_ApplyHintsFunc)( AF_GlyphHints    hints,\n                                      FT_Outline*      outline,\n                                      AF_StyleMetrics  metrics );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                W R I T I N G   S Y S T E M S                  *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n   *  For the auto-hinter, a writing system consists of multiple scripts that\n   *  can be handled similarly *in a typographical way*; the relationship is\n   *  not based on history.  For example, both the Greek and the unrelated\n   *  Armenian scripts share the same features like ascender, descender,\n   *  x-height, etc.  Essentially, a writing system is covered by a\n   *  submodule of the auto-fitter; it contains\n   *\n   *  - a specific global analyzer that computes global metrics specific to\n   *    the script (based on script-specific characters to identify ascender\n   *    height, x-height, etc.),\n   *\n   *  - a specific glyph analyzer that computes segments and edges for each\n   *    glyph covered by the script,\n   *\n   *  - a specific grid-fitting algorithm that distorts the scaled glyph\n   *    outline according to the results of the glyph analyzer.\n   */\n\n#define __AFWRTSYS_H__  /* don't load header files */\n#undef  WRITING_SYSTEM\n#define WRITING_SYSTEM( ws, WS )    \\\n          AF_WRITING_SYSTEM_ ## WS,\n\n  /* The list of known writing systems. */\n  typedef enum  AF_WritingSystem_\n  {\n\n#include \"afwrtsys.h\"\n\n    AF_WRITING_SYSTEM_MAX   /* do not remove */\n\n  } AF_WritingSystem;\n\n#undef  __AFWRTSYS_H__\n\n\n  typedef struct  AF_WritingSystemClassRec_\n  {\n    AF_WritingSystem  writing_system;\n\n    FT_Offset                          style_metrics_size;\n    AF_WritingSystem_InitMetricsFunc   style_metrics_init;\n    AF_WritingSystem_ScaleMetricsFunc  style_metrics_scale;\n    AF_WritingSystem_DoneMetricsFunc   style_metrics_done;\n\n    AF_WritingSystem_InitHintsFunc     style_hints_init;\n    AF_WritingSystem_ApplyHintsFunc    style_hints_apply;\n\n  } AF_WritingSystemClassRec;\n\n  typedef const AF_WritingSystemClassRec*  AF_WritingSystemClass;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        S C R I P T S                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n   *  Each script is associated with a set of Unicode ranges that gets used\n   *  to test whether the font face supports the script.\n   *\n   *  We use four-letter script tags from the OpenType specification,\n   *  extended by `NONE', which indicates `no script'.\n   */\n\n#undef  SCRIPT\n#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \\\n          AF_SCRIPT_ ## S,\n\n  /* The list of known scripts. */\n  typedef enum  AF_Script_\n  {\n\n#include \"afscript.h\"\n\n    AF_SCRIPT_MAX   /* do not remove */\n\n  } AF_Script;\n\n\n  typedef struct  AF_Script_UniRangeRec_\n  {\n    FT_UInt32  first;\n    FT_UInt32  last;\n\n  } AF_Script_UniRangeRec;\n\n#define AF_UNIRANGE_REC( a, b ) { (FT_UInt32)(a), (FT_UInt32)(b) }\n\n  typedef const AF_Script_UniRangeRec*  AF_Script_UniRange;\n\n\n  typedef struct  AF_ScriptClassRec_\n  {\n    AF_Script  script;\n\n    AF_Script_UniRange  script_uni_ranges; /* last must be { 0, 0 }        */\n\n    FT_UInt32  standard_char1;             /* for default width and height */\n    FT_UInt32  standard_char2;             /* ditto                        */\n    FT_UInt32  standard_char3;             /* ditto                        */\n\n  } AF_ScriptClassRec;\n\n  typedef const AF_ScriptClassRec*  AF_ScriptClass;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      C O V E R A G E S                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n   *  Usually, a font contains more glyphs than can be addressed by its\n   *  character map.\n   *\n   *  In the PostScript font world, encoding vectors specific to a given\n   *  task are used to select such glyphs, and these glyphs can be often\n   *  recognized by having a suffix in its glyph names.  For example, a\n   *  superscript glyph `A' might be called `A.sup'.  Unfortunately, this\n   *  naming scheme is not standardized and thus unusable for us.\n   *\n   *  In the OpenType world, a better solution was invented, namely\n   *  `features', which cleanly separate a character's input encoding from\n   *  the corresponding glyph's appearance, and which don't use glyph names\n   *  at all.  For our purposes, and slightly generalized, an OpenType\n   *  feature is a name of a mapping that maps character codes to\n   *  non-standard glyph indices (features get used for other things also).\n   *  For example, the `sups' feature provides superscript glyphs, thus\n   *  mapping character codes like `A' or `B' to superscript glyph\n   *  representation forms.  How this mapping happens is completely\n   *  uninteresting to us.\n   *\n   *  For the auto-hinter, a `coverage' represents all glyphs of an OpenType\n   *  feature collected in a set (as listed below) that can be hinted\n   *  together.  To continue the above example, superscript glyphs must not\n   *  be hinted together with normal glyphs because the blue zones\n   *  completely differ.\n   *\n   *  Note that FreeType itself doesn't compute coverages; it only provides\n   *  the glyphs addressable by the default Unicode character map.  Instead,\n   *  we use the HarfBuzz library (if available), which has many functions\n   *  exactly for this purpose.\n   *\n   *  AF_COVERAGE_DEFAULT is special: It should cover everything that isn't\n   *  listed separately (including the glyphs addressable by the character\n   *  map).  In case HarfBuzz isn't available, it exactly covers the glyphs\n   *  addressable by the character map.\n   *\n   */\n\n#undef  COVERAGE\n#define COVERAGE( name, NAME, description, \\\n                  tag1, tag2, tag3, tag4 ) \\\n          AF_COVERAGE_ ## NAME,\n\n\n  typedef enum  AF_Coverage_\n  {\n#include \"afcover.h\"\n\n    AF_COVERAGE_DEFAULT\n\n  } AF_Coverage;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         S T Y L E S                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n   *  The topmost structure for modelling the auto-hinter glyph input data\n   *  is a `style class', grouping everything together.\n   */\n\n#undef  STYLE\n#define STYLE( s, S, d, ws, sc, ss, c ) \\\n          AF_STYLE_ ## S,\n\n  /* The list of known styles. */\n  typedef enum  AF_Style_\n  {\n\n#include \"afstyles.h\"\n\n    AF_STYLE_MAX   /* do not remove */\n\n  } AF_Style;\n\n\n  typedef struct  AF_StyleClassRec_\n  {\n    AF_Style  style;\n\n    AF_WritingSystem   writing_system;\n    AF_Script          script;\n    AF_Blue_Stringset  blue_stringset;\n    AF_Coverage        coverage;\n\n  } AF_StyleClassRec;\n\n  typedef const AF_StyleClassRec*  AF_StyleClass;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                   S T Y L E   M E T R I C S                   *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct AF_FaceGlobalsRec_*  AF_FaceGlobals;\n\n  /* This is the main structure that combines everything.  Autofit modules */\n  /* specific to writing systems derive their structures from it, for      */\n  /* example `AF_LatinMetrics'.                                            */\n\n  typedef struct  AF_StyleMetricsRec_\n  {\n    AF_StyleClass   style_class;\n    AF_ScalerRec    scaler;\n    FT_Bool         digits_have_same_width;\n\n    AF_FaceGlobals  globals;    /* to access properties */\n\n  } AF_StyleMetricsRec;\n\n\n  /* Declare and define vtables for classes */\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define AF_DECLARE_WRITING_SYSTEM_CLASS( writing_system_class ) \\\n  FT_CALLBACK_TABLE const AF_WritingSystemClassRec              \\\n  writing_system_class;\n\n#define AF_DEFINE_WRITING_SYSTEM_CLASS(                  \\\n          writing_system_class,                          \\\n          system,                                        \\\n          m_size,                                        \\\n          m_init,                                        \\\n          m_scale,                                       \\\n          m_done,                                        \\\n          h_init,                                        \\\n          h_apply )                                      \\\n  FT_CALLBACK_TABLE_DEF                                  \\\n  const AF_WritingSystemClassRec  writing_system_class = \\\n  {                                                      \\\n    system,                                              \\\n                                                         \\\n    m_size,                                              \\\n                                                         \\\n    m_init,                                              \\\n    m_scale,                                             \\\n    m_done,                                              \\\n                                                         \\\n    h_init,                                              \\\n    h_apply                                              \\\n  };\n\n\n#define AF_DECLARE_SCRIPT_CLASS( script_class ) \\\n  FT_CALLBACK_TABLE const AF_ScriptClassRec     \\\n  script_class;\n\n#define AF_DEFINE_SCRIPT_CLASS(           \\\n          script_class,                   \\\n          script,                         \\\n          ranges,                         \\\n          std_char1,                      \\\n          std_char2,                      \\\n          std_char3 )                     \\\n  FT_CALLBACK_TABLE_DEF                   \\\n  const AF_ScriptClassRec  script_class = \\\n  {                                       \\\n    script,                               \\\n    ranges,                               \\\n    std_char1,                            \\\n    std_char2,                            \\\n    std_char3                             \\\n  };\n\n\n#define AF_DECLARE_STYLE_CLASS( style_class ) \\\n  FT_CALLBACK_TABLE const AF_StyleClassRec    \\\n  style_class;\n\n#define AF_DEFINE_STYLE_CLASS(          \\\n          style_class,                  \\\n          style,                        \\\n          writing_system,               \\\n          script,                       \\\n          blue_stringset,               \\\n          coverage )                    \\\n  FT_CALLBACK_TABLE_DEF                 \\\n  const AF_StyleClassRec  style_class = \\\n  {                                     \\\n    style,                              \\\n    writing_system,                     \\\n    script,                             \\\n    blue_stringset,                     \\\n    coverage                            \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define AF_DECLARE_WRITING_SYSTEM_CLASS( writing_system_class )            \\\n  FT_LOCAL( void )                                                         \\\n  FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec*  ac );\n\n#define AF_DEFINE_WRITING_SYSTEM_CLASS(                                   \\\n          writing_system_class,                                           \\\n          system,                                                         \\\n          m_size,                                                         \\\n          m_init,                                                         \\\n          m_scale,                                                        \\\n          m_done,                                                         \\\n          h_init,                                                         \\\n          h_apply )                                                       \\\n  FT_LOCAL_DEF( void )                                                    \\\n  FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec*  ac ) \\\n  {                                                                       \\\n    ac->writing_system      = system;                                     \\\n                                                                          \\\n    ac->style_metrics_size  = m_size;                                     \\\n                                                                          \\\n    ac->style_metrics_init  = m_init;                                     \\\n    ac->style_metrics_scale = m_scale;                                    \\\n    ac->style_metrics_done  = m_done;                                     \\\n                                                                          \\\n    ac->style_hints_init    = h_init;                                     \\\n    ac->style_hints_apply   = h_apply;                                    \\\n  }\n\n\n#define AF_DECLARE_SCRIPT_CLASS( script_class )             \\\n  FT_LOCAL( void )                                          \\\n  FT_Init_Class_ ## script_class( AF_ScriptClassRec*  ac );\n\n#define AF_DEFINE_SCRIPT_CLASS(                            \\\n          script_class,                                    \\\n          script_,                                         \\\n          ranges,                                          \\\n          std_char1,                                       \\\n          std_char2,                                       \\\n          std_char3 )                                      \\\n  FT_LOCAL_DEF( void )                                     \\\n  FT_Init_Class_ ## script_class( AF_ScriptClassRec*  ac ) \\\n  {                                                        \\\n    ac->script            = script_;                       \\\n    ac->script_uni_ranges = ranges;                        \\\n    ac->standard_char1    = std_char1;                     \\\n    ac->standard_char2    = std_char2;                     \\\n    ac->standard_char3    = std_char3;                     \\\n  }\n\n\n#define AF_DECLARE_STYLE_CLASS( style_class )             \\\n  FT_LOCAL( void )                                        \\\n  FT_Init_Class_ ## style_class( AF_StyleClassRec*  ac );\n\n#define AF_DEFINE_STYLE_CLASS(                           \\\n          style_class,                                   \\\n          style_,                                        \\\n          writing_system_,                               \\\n          script_,                                       \\\n          blue_stringset_,                               \\\n          coverage_ )                                    \\\n  FT_LOCAL_DEF( void )                                   \\\n  FT_Init_Class_ ## style_class( AF_StyleClassRec*  ac ) \\\n  {                                                      \\\n    ac->style          = style_;                         \\\n    ac->writing_system = writing_system_;                \\\n    ac->script         = script_;                        \\\n    ac->blue_stringset = blue_stringset_;                \\\n    ac->coverage       = coverage_;                      \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* */\n\nFT_END_HEADER\n\n#endif /* __AFTYPES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afwarp.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afwarp.c                                                               */\n/*                                                                         */\n/*    Auto-fitter warping algorithm (body).                                */\n/*                                                                         */\n/*  Copyright 2006, 2007, 2011 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*\n   *  The idea of the warping code is to slightly scale and shift a glyph\n   *  within a single dimension so that as much of its segments are aligned\n   *  (more or less) on the grid.  To find out the optimal scaling and\n   *  shifting value, various parameter combinations are tried and scored.\n   */\n\n#include \"afwarp.h\"\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_afwarp\n\n\n  /* The weights cover the range 0/64 - 63/64 of a pixel.  Obviously, */\n  /* values around a half pixel (which means exactly between two grid */\n  /* lines) gets the worst weight.                                    */\n#if 1\n  static const AF_WarpScore\n  af_warper_weights[64] =\n  {\n    35, 32, 30, 25, 20, 15, 12, 10,  5,  1,  0,  0,  0,  0,  0,  0,\n     0,  0,  0,  0,  0,  0, -1, -2, -5, -8,-10,-10,-20,-20,-30,-30,\n\n   -30,-30,-20,-20,-10,-10, -8, -5, -2, -1,  0,  0,  0,  0,  0,  0,\n     0,  0,  0,  0,  0,  0,  0,  1,  5, 10, 12, 15, 20, 25, 30, 32,\n  };\n#else\n  static const AF_WarpScore\n  af_warper_weights[64] =\n  {\n    30, 20, 10,  5,  4,  4,  3,  2,  1,  0,  0,  0,  0,  0,  0,  0,\n     0,  0,  0,  0,  0,  0,  0, -1, -2, -2, -5, -5,-10,-10,-15,-20,\n\n   -20,-15,-15,-10,-10, -5, -5, -2, -2, -1,  0,  0,  0,  0,  0,  0,\n     0,  0,  0,  0,  0,  0,  0,  0,  1,  2,  3,  4,  4,  5, 10, 20,\n  };\n#endif\n\n\n  /* Score segments for a given `scale' and `delta' in the range */\n  /* `xx1' to `xx2', and store the best result in `warper'.  If  */\n  /* the new best score is equal to the old one, prefer the      */\n  /* value with a smaller distortion (around `base_distort').    */\n\n  static void\n  af_warper_compute_line_best( AF_Warper     warper,\n                               FT_Fixed      scale,\n                               FT_Pos        delta,\n                               FT_Pos        xx1,\n                               FT_Pos        xx2,\n                               AF_WarpScore  base_distort,\n                               AF_Segment    segments,\n                               FT_UInt       num_segments )\n  {\n    FT_Int        idx_min, idx_max, idx0;\n    FT_UInt       nn;\n    AF_WarpScore  scores[65];\n\n\n    for ( nn = 0; nn < 65; nn++ )\n      scores[nn] = 0;\n\n    idx0 = xx1 - warper->t1;\n\n    /* compute minimum and maximum indices */\n    {\n      FT_Pos  xx1min = warper->x1min;\n      FT_Pos  xx1max = warper->x1max;\n      FT_Pos  w      = xx2 - xx1;\n\n\n      if ( xx1min + w < warper->x2min )\n        xx1min = warper->x2min - w;\n\n      xx1max = warper->x1max;\n      if ( xx1max + w > warper->x2max )\n        xx1max = warper->x2max - w;\n\n      idx_min = xx1min - warper->t1;\n      idx_max = xx1max - warper->t1;\n\n      if ( idx_min < 0 || idx_min > idx_max || idx_max > 64 )\n      {\n        FT_TRACE5(( \"invalid indices:\\n\"\n                    \"  min=%d max=%d, xx1=%ld xx2=%ld,\\n\"\n                    \"  x1min=%ld x1max=%ld, x2min=%ld x2max=%ld\\n\",\n                    idx_min, idx_max, xx1, xx2,\n                    warper->x1min, warper->x1max,\n                    warper->x2min, warper->x2max ));\n        return;\n      }\n    }\n\n    for ( nn = 0; nn < num_segments; nn++ )\n    {\n      FT_Pos  len = segments[nn].max_coord - segments[nn].min_coord;\n      FT_Pos  y0  = FT_MulFix( segments[nn].pos, scale ) + delta;\n      FT_Pos  y   = y0 + ( idx_min - idx0 );\n      FT_Int  idx;\n\n\n      /* score the length of the segments for the given range */\n      for ( idx = idx_min; idx <= idx_max; idx++, y++ )\n        scores[idx] += af_warper_weights[y & 63] * len;\n    }\n\n    /* find best score */\n    {\n      FT_Int  idx;\n\n\n      for ( idx = idx_min; idx <= idx_max; idx++ )\n      {\n        AF_WarpScore  score = scores[idx];\n        AF_WarpScore  distort = base_distort + ( idx - idx0 );\n\n\n        if ( score > warper->best_score         ||\n             ( score == warper->best_score    &&\n               distort < warper->best_distort ) )\n        {\n          warper->best_score   = score;\n          warper->best_distort = distort;\n          warper->best_scale   = scale;\n          warper->best_delta   = delta + ( idx - idx0 );\n        }\n      }\n    }\n  }\n\n\n  /* Compute optimal scaling and delta values for a given glyph and */\n  /* dimension.                                                     */\n\n  FT_LOCAL_DEF( void )\n  af_warper_compute( AF_Warper      warper,\n                     AF_GlyphHints  hints,\n                     AF_Dimension   dim,\n                     FT_Fixed      *a_scale,\n                     FT_Pos        *a_delta )\n  {\n    AF_AxisHints  axis;\n    AF_Point      points;\n\n    FT_Fixed      org_scale;\n    FT_Pos        org_delta;\n\n    FT_UInt       nn, num_points, num_segments;\n    FT_Int        X1, X2;\n    FT_Int        w;\n\n    AF_WarpScore  base_distort;\n    AF_Segment    segments;\n\n\n    /* get original scaling transformation */\n    if ( dim == AF_DIMENSION_VERT )\n    {\n      org_scale = hints->y_scale;\n      org_delta = hints->y_delta;\n    }\n    else\n    {\n      org_scale = hints->x_scale;\n      org_delta = hints->x_delta;\n    }\n\n    warper->best_scale   = org_scale;\n    warper->best_delta   = org_delta;\n    warper->best_score   = INT_MIN;\n    warper->best_distort = 0;\n\n    axis         = &hints->axis[dim];\n    segments     = axis->segments;\n    num_segments = axis->num_segments;\n    points       = hints->points;\n    num_points   = hints->num_points;\n\n    *a_scale = org_scale;\n    *a_delta = org_delta;\n\n    /* get X1 and X2, minimum and maximum in original coordinates */\n    if ( num_segments < 1 )\n      return;\n\n#if 1\n    X1 = X2 = points[0].fx;\n    for ( nn = 1; nn < num_points; nn++ )\n    {\n      FT_Int  X = points[nn].fx;\n\n\n      if ( X < X1 )\n        X1 = X;\n      if ( X > X2 )\n        X2 = X;\n    }\n#else\n    X1 = X2 = segments[0].pos;\n    for ( nn = 1; nn < num_segments; nn++ )\n    {\n      FT_Int  X = segments[nn].pos;\n\n\n      if ( X < X1 )\n        X1 = X;\n      if ( X > X2 )\n        X2 = X;\n    }\n#endif\n\n    if ( X1 >= X2 )\n      return;\n\n    warper->x1 = FT_MulFix( X1, org_scale ) + org_delta;\n    warper->x2 = FT_MulFix( X2, org_scale ) + org_delta;\n\n    warper->t1 = AF_WARPER_FLOOR( warper->x1 );\n    warper->t2 = AF_WARPER_CEIL( warper->x2 );\n\n    /* examine a half pixel wide range around the maximum coordinates */\n    warper->x1min = warper->x1 & ~31;\n    warper->x1max = warper->x1min + 32;\n    warper->x2min = warper->x2 & ~31;\n    warper->x2max = warper->x2min + 32;\n\n    if ( warper->x1max > warper->x2 )\n      warper->x1max = warper->x2;\n\n    if ( warper->x2min < warper->x1 )\n      warper->x2min = warper->x1;\n\n    warper->w0 = warper->x2 - warper->x1;\n\n    if ( warper->w0 <= 64 )\n    {\n      warper->x1max = warper->x1;\n      warper->x2min = warper->x2;\n    }\n\n    /* examine (at most) a pixel wide range around the natural width */\n    warper->wmin = warper->x2min - warper->x1max;\n    warper->wmax = warper->x2max - warper->x1min;\n\n#if 1\n    /* some heuristics to reduce the number of widths to be examined */\n    {\n      int  margin = 16;\n\n\n      if ( warper->w0 <= 128 )\n      {\n         margin = 8;\n         if ( warper->w0 <= 96 )\n           margin = 4;\n      }\n\n      if ( warper->wmin < warper->w0 - margin )\n        warper->wmin = warper->w0 - margin;\n\n      if ( warper->wmax > warper->w0 + margin )\n        warper->wmax = warper->w0 + margin;\n    }\n\n    if ( warper->wmin < warper->w0 * 3 / 4 )\n      warper->wmin = warper->w0 * 3 / 4;\n\n    if ( warper->wmax > warper->w0 * 5 / 4 )\n      warper->wmax = warper->w0 * 5 / 4;\n#else\n    /* no scaling, just translation */\n    warper->wmin = warper->wmax = warper->w0;\n#endif\n\n    for ( w = warper->wmin; w <= warper->wmax; w++ )\n    {\n      FT_Fixed  new_scale;\n      FT_Pos    new_delta;\n      FT_Pos    xx1, xx2;\n\n\n      /* compute min and max positions for given width,       */\n      /* assuring that they stay within the coordinate ranges */\n      xx1 = warper->x1;\n      xx2 = warper->x2;\n      if ( w >= warper->w0 )\n      {\n        xx1 -= w - warper->w0;\n        if ( xx1 < warper->x1min )\n        {\n          xx2 += warper->x1min - xx1;\n          xx1  = warper->x1min;\n        }\n      }\n      else\n      {\n        xx1 -= w - warper->w0;\n        if ( xx1 > warper->x1max )\n        {\n          xx2 -= xx1 - warper->x1max;\n          xx1  = warper->x1max;\n        }\n      }\n\n      if ( xx1 < warper->x1 )\n        base_distort = warper->x1 - xx1;\n      else\n        base_distort = xx1 - warper->x1;\n\n      if ( xx2 < warper->x2 )\n        base_distort += warper->x2 - xx2;\n      else\n        base_distort += xx2 - warper->x2;\n\n      /* give base distortion a greater weight while scoring */\n      base_distort *= 10;\n\n      new_scale = org_scale + FT_DivFix( w - warper->w0, X2 - X1 );\n      new_delta = xx1 - FT_MulFix( X1, new_scale );\n\n      af_warper_compute_line_best( warper, new_scale, new_delta, xx1, xx2,\n                                   base_distort,\n                                   segments, num_segments );\n    }\n\n    {\n      FT_Fixed  best_scale = warper->best_scale;\n      FT_Pos    best_delta = warper->best_delta;\n\n\n      hints->xmin_delta = FT_MulFix( X1, best_scale - org_scale )\n                          + best_delta;\n      hints->xmax_delta = FT_MulFix( X2, best_scale - org_scale )\n                          + best_delta;\n\n      *a_scale = best_scale;\n      *a_delta = best_delta;\n    }\n  }\n\n#else /* !AF_CONFIG_OPTION_USE_WARPER */\n\n  /* ANSI C doesn't like empty source files */\n  typedef int  _af_warp_dummy;\n\n#endif /* !AF_CONFIG_OPTION_USE_WARPER */\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afwarp.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afwarp.h                                                               */\n/*                                                                         */\n/*    Auto-fitter warping algorithm (specification).                       */\n/*                                                                         */\n/*  Copyright 2006, 2007 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFWARP_H__\n#define __AFWARP_H__\n\n#include \"afhints.h\"\n\nFT_BEGIN_HEADER\n\n#define AF_WARPER_SCALE\n\n#define AF_WARPER_FLOOR( x )  ( (x) & ~63 )\n#define AF_WARPER_CEIL( x )   AF_WARPER_FLOOR( (x) + 63 )\n\n\n  typedef FT_Int32  AF_WarpScore;\n\n  typedef struct  AF_WarperRec_\n  {\n    FT_Pos        x1, x2;\n    FT_Pos        t1, t2;\n    FT_Pos        x1min, x1max;\n    FT_Pos        x2min, x2max;\n    FT_Pos        w0, wmin, wmax;\n\n    FT_Fixed      best_scale;\n    FT_Pos        best_delta;\n    AF_WarpScore  best_score;\n    AF_WarpScore  best_distort;\n\n  } AF_WarperRec, *AF_Warper;\n\n\n  FT_LOCAL( void )\n  af_warper_compute( AF_Warper      warper,\n                     AF_GlyphHints  hints,\n                     AF_Dimension   dim,\n                     FT_Fixed      *a_scale,\n                     FT_Fixed      *a_delta );\n\n\nFT_END_HEADER\n\n\n#endif /* __AFWARP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/afwrtsys.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afwrtsys.h                                                             */\n/*                                                                         */\n/*    Auto-fitter writing systems (specification only).                    */\n/*                                                                         */\n/*  Copyright 2013 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFWRTSYS_H__\n#define __AFWRTSYS_H__\n\n  /* Since preprocessor directives can't create other preprocessor */\n  /* directives, we have to include the header files manually.     */\n\n#include \"afdummy.h\"\n#include \"aflatin.h\"\n#include \"afcjk.h\"\n#include \"afindic.h\"\n#ifdef FT_OPTION_AUTOFIT2\n#include \"aflatin2.h\"\n#endif\n\n#endif /* __AFWRTSYS_H__ */\n\n\n  /* The following part can be included multiple times. */\n  /* Define `WRITING_SYSTEM' as needed.                 */\n\n\n  /* Add new writing systems here.  The arguments are the writing system */\n  /* name in lowercase and uppercase, respectively.                      */\n\n  WRITING_SYSTEM( dummy,  DUMMY  )\n  WRITING_SYSTEM( latin,  LATIN  )\n  WRITING_SYSTEM( cjk,    CJK    )\n  WRITING_SYSTEM( indic,  INDIC  )\n#ifdef FT_OPTION_AUTOFIT2\n  WRITING_SYSTEM( latin2, LATIN2 )\n#endif\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/autofit.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  autofit.c                                                              */\n/*                                                                         */\n/*    Auto-fitter module (body).                                           */\n/*                                                                         */\n/*  Copyright 2003-2007, 2011, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n#include <ft2build.h>\n#include \"afpic.c\"\n#include \"afangles.c\"\n#include \"afblue.c\"\n#include \"afglobal.c\"\n#include \"afhints.c\"\n\n#include \"afranges.c\"\n\n#include \"afdummy.c\"\n#include \"aflatin.c\"\n#ifdef FT_OPTION_AUTOFIT2\n#include \"aflatin2.c\"\n#endif\n#include \"afcjk.c\"\n#include \"afindic.c\"\n\n#include \"hbshim.c\"\n\n#include \"afloader.c\"\n#include \"afmodule.c\"\n\n#ifdef AF_CONFIG_OPTION_USE_WARPER\n#include \"afwarp.c\"\n#endif\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/hbshim.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  hbshim.c                                                               */\n/*                                                                         */\n/*    HarfBuzz interface for accessing OpenType features (body).           */\n/*                                                                         */\n/*  Copyright 2013, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include \"afglobal.h\"\n#include \"aftypes.h\"\n#include \"hbshim.h\"\n\n#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_afharfbuzz\n\n\n  /*\n   * We use `sets' (in the HarfBuzz sense, which comes quite near to the\n   * usual mathematical meaning) to manage both lookups and glyph indices.\n   *\n   * 1. For each coverage, collect lookup IDs in a set.  Note that an\n   *    auto-hinter `coverage' is represented by one `feature', and a\n   *    feature consists of an arbitrary number of (font specific) `lookup's\n   *    that actually do the mapping job.  Please check the OpenType\n   *    specification for more details on features and lookups.\n   *\n   * 2. Create glyph ID sets from the corresponding lookup sets.\n   *\n   * 3. The glyph set corresponding to AF_COVERAGE_DEFAULT is computed\n   *    with all lookups specific to the OpenType script activated.  It\n   *    relies on the order of AF_DEFINE_STYLE_CLASS entries so that\n   *    special coverages (like `oldstyle figures') don't get overwritten.\n   *\n   */\n\n\n  /* load coverage tags */\n#undef  COVERAGE\n#define COVERAGE( name, NAME, description,             \\\n                  tag1, tag2, tag3, tag4 )             \\\n          static const hb_tag_t  name ## _coverage[] = \\\n          {                                            \\\n            HB_TAG( tag1, tag2, tag3, tag4 ),          \\\n            HB_TAG_NONE                                \\\n          };\n\n\n#include \"afcover.h\"\n\n\n  /* define mapping between coverage tags and AF_Coverage */\n#undef  COVERAGE\n#define COVERAGE( name, NAME, description, \\\n                  tag1, tag2, tag3, tag4 ) \\\n          name ## _coverage,\n\n\n  static const hb_tag_t*  coverages[] =\n  {\n#include \"afcover.h\"\n\n    NULL /* AF_COVERAGE_DEFAULT */\n  };\n\n\n  /* load HarfBuzz script tags */\n#undef  SCRIPT\n#define SCRIPT( s, S, d, h, sc1, sc2, sc3 )  h,\n\n\n  static const hb_script_t  scripts[] =\n  {\n#include \"afscript.h\"\n  };\n\n\n  FT_Error\n  af_get_coverage( AF_FaceGlobals  globals,\n                   AF_StyleClass   style_class,\n                   FT_Byte*        gstyles )\n  {\n    hb_face_t*  face;\n\n    hb_set_t*  gsub_lookups;  /* GSUB lookups for a given script */\n    hb_set_t*  gsub_glyphs;   /* glyphs covered by GSUB lookups  */\n    hb_set_t*  gpos_lookups;  /* GPOS lookups for a given script */\n    hb_set_t*  gpos_glyphs;   /* glyphs covered by GPOS lookups  */\n\n    hb_script_t      script;\n    const hb_tag_t*  coverage_tags;\n    hb_tag_t         script_tags[] = { HB_TAG_NONE,\n                                       HB_TAG_NONE,\n                                       HB_TAG_NONE,\n                                       HB_TAG_NONE };\n\n    hb_codepoint_t  idx;\n#ifdef FT_DEBUG_LEVEL_TRACE\n    int             count;\n#endif\n\n\n    if ( !globals || !style_class || !gstyles )\n      return FT_THROW( Invalid_Argument );\n\n    face = hb_font_get_face( globals->hb_font );\n\n    gsub_lookups = hb_set_create();\n    gsub_glyphs  = hb_set_create();\n    gpos_lookups = hb_set_create();\n    gpos_glyphs  = hb_set_create();\n\n    coverage_tags = coverages[style_class->coverage];\n    script        = scripts[style_class->script];\n\n    /* Convert a HarfBuzz script tag into the corresponding OpenType */\n    /* tag or tags -- some Indic scripts like Devanagari have an old */\n    /* and a new set of features.                                    */\n    hb_ot_tags_from_script( script,\n                            &script_tags[0],\n                            &script_tags[1] );\n\n    /* `hb_ot_tags_from_script' usually returns HB_OT_TAG_DEFAULT_SCRIPT */\n    /* as the second tag.  We change that to HB_TAG_NONE except for the  */\n    /* default script.                                                   */\n    if ( style_class->script == globals->module->default_script &&\n         style_class->coverage == AF_COVERAGE_DEFAULT           )\n    {\n      if ( script_tags[0] == HB_TAG_NONE )\n        script_tags[0] = HB_OT_TAG_DEFAULT_SCRIPT;\n      else\n      {\n        if ( script_tags[1] == HB_TAG_NONE )\n          script_tags[1] = HB_OT_TAG_DEFAULT_SCRIPT;\n        else if ( script_tags[1] != HB_OT_TAG_DEFAULT_SCRIPT )\n          script_tags[2] = HB_OT_TAG_DEFAULT_SCRIPT;\n      }\n    }\n    else\n    {\n      if ( script_tags[1] == HB_OT_TAG_DEFAULT_SCRIPT )\n        script_tags[1] = HB_TAG_NONE;\n    }\n\n    hb_ot_layout_collect_lookups( face,\n                                  HB_OT_TAG_GSUB,\n                                  script_tags,\n                                  NULL,\n                                  coverage_tags,\n                                  gsub_lookups );\n\n    if ( hb_set_is_empty( gsub_lookups ) )\n      goto Exit; /* nothing to do */\n\n    hb_ot_layout_collect_lookups( face,\n                                  HB_OT_TAG_GPOS,\n                                  script_tags,\n                                  NULL,\n                                  coverage_tags,\n                                  gpos_lookups );\n\n    FT_TRACE4(( \"GSUB lookups (style `%s'):\\n\"\n                \" \",\n                af_style_names[style_class->style] ));\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    count = 0;\n#endif\n\n    for ( idx = -1; hb_set_next( gsub_lookups, &idx ); )\n    {\n#ifdef FT_DEBUG_LEVEL_TRACE\n      FT_TRACE4(( \" %d\", idx ));\n      count++;\n#endif\n\n      /* get output coverage of GSUB feature */\n      hb_ot_layout_lookup_collect_glyphs( face,\n                                          HB_OT_TAG_GSUB,\n                                          idx,\n                                          NULL,\n                                          NULL,\n                                          NULL,\n                                          gsub_glyphs );\n    }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    if ( !count )\n      FT_TRACE4(( \" (none)\" ));\n    FT_TRACE4(( \"\\n\\n\" ));\n#endif\n\n    FT_TRACE4(( \"GPOS lookups (style `%s'):\\n\"\n                \" \",\n                af_style_names[style_class->style] ));\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    count = 0;\n#endif\n\n    for ( idx = -1; hb_set_next( gpos_lookups, &idx ); )\n    {\n#ifdef FT_DEBUG_LEVEL_TRACE\n      FT_TRACE4(( \" %d\", idx ));\n      count++;\n#endif\n\n      /* get input coverage of GPOS feature */\n      hb_ot_layout_lookup_collect_glyphs( face,\n                                          HB_OT_TAG_GPOS,\n                                          idx,\n                                          NULL,\n                                          gpos_glyphs,\n                                          NULL,\n                                          NULL );\n    }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    if ( !count )\n      FT_TRACE4(( \" (none)\" ));\n    FT_TRACE4(( \"\\n\\n\" ));\n#endif\n\n    /*\n     * We now check whether we can construct blue zones, using glyphs\n     * covered by the feature only.  In case there is not a single zone\n     * (this is, not a single character is covered), we skip this coverage.\n     *\n     */\n    if ( style_class->coverage != AF_COVERAGE_DEFAULT )\n    {\n      AF_Blue_Stringset         bss = style_class->blue_stringset;\n      const AF_Blue_StringRec*  bs  = &af_blue_stringsets[bss];\n\n      FT_Bool  found = 0;\n\n\n      for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ )\n      {\n        const char*  p = &af_blue_strings[bs->string];\n\n\n        while ( *p )\n        {\n          hb_codepoint_t  ch;\n\n\n          GET_UTF8_CHAR( ch, p );\n\n          for ( idx = -1; hb_set_next( gsub_lookups, &idx ); )\n          {\n            hb_codepoint_t  gidx = FT_Get_Char_Index( globals->face, ch );\n\n\n            if ( hb_ot_layout_lookup_would_substitute( face, idx,\n                                                       &gidx, 1, 1 ) )\n            {\n              found = 1;\n              break;\n            }\n          }\n        }\n      }\n\n      if ( !found )\n      {\n        FT_TRACE4(( \"  no blue characters found; style skipped\\n\" ));\n        goto Exit;\n      }\n    }\n\n    /*\n     * Various OpenType features might use the same glyphs at different\n     * vertical positions; for example, superscript and subscript glyphs\n     * could be the same.  However, the auto-hinter is completely\n     * agnostic of OpenType features after the feature analysis has been\n     * completed: The engine then simply receives a glyph index and returns a\n     * hinted and usually rendered glyph.\n     *\n     * Consider the superscript feature of font `pala.ttf': Some of the\n     * glyphs are `real', this is, they have a zero vertical offset, but\n     * most of them are small caps glyphs shifted up to the superscript\n     * position (this is, the `sups' feature is present in both the GSUB and\n     * GPOS tables).  The code for blue zones computation actually uses a\n     * feature's y offset so that the `real' glyphs get correct hints.  But\n     * later on it is impossible to decide whether a glyph index belongs to,\n     * say, the small caps or superscript feature.\n     *\n     * For this reason, we don't assign a style to a glyph if the current\n     * feature covers the glyph in both the GSUB and the GPOS tables.  This\n     * is quite a broad condition, assuming that\n     *\n     *   (a) glyphs that get used in multiple features are present in a\n     *       feature without vertical shift,\n     *\n     * and\n     *\n     *   (b) a feature's GPOS data really moves the glyph vertically.\n     *\n     * Not fulfilling condition (a) makes a font larger; it would also\n     * reduce the number of glyphs that could be addressed directly without\n     * using OpenType features, so this assumption is rather strong.\n     *\n     * Condition (b) is much weaker, and there might be glyphs which get\n     * missed.  However, the OpenType features we are going to handle are\n     * primarily located in GSUB, and HarfBuzz doesn't provide an API to\n     * directly get the necessary information from the GPOS table.  A\n     * possible solution might be to directly parse the GPOS table to find\n     * out whether a glyph gets shifted vertically, but this is something I\n     * would like to avoid if not really necessary.\n     *\n     * Note that we don't follow this logic for the default coverage.\n     * Complex scripts like Devanagari have mandatory GPOS features to\n     * position many glyph elements, using mark-to-base or mark-to-ligature\n     * tables; the number of glyphs missed due to condition (b) would be far\n     * too large.\n     *\n     */\n    if ( style_class->coverage != AF_COVERAGE_DEFAULT )\n      hb_set_subtract( gsub_glyphs, gpos_glyphs );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    FT_TRACE4(( \"  glyphs without GPOS data (`*' means already assigned)\" ));\n    count = 0;\n#endif\n\n    for ( idx = -1; hb_set_next( gsub_glyphs, &idx ); )\n    {\n#ifdef FT_DEBUG_LEVEL_TRACE\n      if ( !( count % 10 ) )\n        FT_TRACE4(( \"\\n\"\n                    \"   \" ));\n\n      FT_TRACE4(( \" %d\", idx ));\n      count++;\n#endif\n\n      /* glyph indices returned by `hb_ot_layout_lookup_collect_glyphs' */\n      /* can be arbitrary: some fonts use fake indices for processing   */\n      /* internal to GSUB or GPOS, which is fully valid                 */\n      if ( idx >= (hb_codepoint_t)globals->glyph_count )\n        continue;\n\n      if ( gstyles[idx] == AF_STYLE_UNASSIGNED )\n        gstyles[idx] = (FT_Byte)style_class->style;\n#ifdef FT_DEBUG_LEVEL_TRACE\n      else\n        FT_TRACE4(( \"*\" ));\n#endif\n    }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    if ( !count )\n      FT_TRACE4(( \"\\n\"\n                  \"    (none)\" ));\n    FT_TRACE4(( \"\\n\\n\" ));\n#endif\n\n  Exit:\n    hb_set_destroy( gsub_lookups );\n    hb_set_destroy( gsub_glyphs  );\n    hb_set_destroy( gpos_lookups );\n    hb_set_destroy( gpos_glyphs  );\n\n    return FT_Err_Ok;\n  }\n\n\n  /* construct HarfBuzz features */\n#undef  COVERAGE\n#define COVERAGE( name, NAME, description,                \\\n                  tag1, tag2, tag3, tag4 )                \\\n          static const hb_feature_t  name ## _feature[] = \\\n          {                                               \\\n            {                                             \\\n              HB_TAG( tag1, tag2, tag3, tag4 ),           \\\n              1, 0, (unsigned int)-1                      \\\n            }                                             \\\n          };\n\n\n#include \"afcover.h\"\n\n\n  /* define mapping between HarfBuzz features and AF_Coverage */\n#undef  COVERAGE\n#define COVERAGE( name, NAME, description, \\\n                  tag1, tag2, tag3, tag4 ) \\\n          name ## _feature,\n\n\n  static const hb_feature_t*  features[] =\n  {\n#include \"afcover.h\"\n\n    NULL /* AF_COVERAGE_DEFAULT */\n  };\n\n\n  FT_Error\n  af_get_char_index( AF_StyleMetrics  metrics,\n                     FT_ULong         charcode,\n                     FT_ULong        *codepoint,\n                     FT_Long         *y_offset )\n  {\n    AF_StyleClass  style_class;\n\n    const hb_feature_t*  feature;\n\n    FT_ULong  in_idx, out_idx;\n\n\n    if ( !metrics )\n      return FT_THROW( Invalid_Argument );\n\n    in_idx = FT_Get_Char_Index( metrics->globals->face, charcode );\n\n    style_class = metrics->style_class;\n\n    feature = features[style_class->coverage];\n\n    if ( feature )\n    {\n      FT_UInt  upem = metrics->globals->face->units_per_EM;\n\n      hb_font_t*    font = metrics->globals->hb_font;\n      hb_buffer_t*  buf  = hb_buffer_create();\n\n      uint32_t  c = (uint32_t)charcode;\n\n      hb_glyph_info_t*      ginfo;\n      hb_glyph_position_t*  gpos;\n      unsigned int          gcount;\n\n\n      /* we shape at a size of units per EM; this means font units */\n      hb_font_set_scale( font, upem, upem );\n\n      /* XXX: is this sufficient for a single character of any script? */\n      hb_buffer_set_direction( buf, HB_DIRECTION_LTR );\n      hb_buffer_set_script( buf, scripts[style_class->script] );\n\n      /* we add one character to `buf' ... */\n      hb_buffer_add_utf32( buf, &c, 1, 0, 1 );\n\n      /* ... and apply one feature */\n      hb_shape( font, buf, feature, 1 );\n\n      ginfo = hb_buffer_get_glyph_infos( buf, &gcount );\n      gpos  = hb_buffer_get_glyph_positions( buf, &gcount );\n\n      out_idx = ginfo[0].codepoint;\n\n      /* getting the same index indicates no substitution,         */\n      /* which means that the glyph isn't available in the feature */\n      if ( in_idx == out_idx )\n      {\n        *codepoint = 0;\n        *y_offset  = 0;\n      }\n      else\n      {\n        *codepoint = out_idx;\n        *y_offset  = gpos[0].y_offset;\n      }\n\n      hb_buffer_destroy( buf );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n      if ( gcount > 1 )\n        FT_TRACE1(( \"af_get_char_index:\"\n                    \" input character mapped to multiple glyphs\\n\" ));\n#endif\n    }\n    else\n    {\n      *codepoint = in_idx;\n      *y_offset  = 0;\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n#else /* !FT_CONFIG_OPTION_USE_HARFBUZZ */\n\n\n  FT_Error\n  af_get_coverage( AF_FaceGlobals  globals,\n                   AF_StyleClass   style_class,\n                   FT_Byte*        gstyles )\n  {\n    FT_UNUSED( globals );\n    FT_UNUSED( style_class );\n    FT_UNUSED( gstyles );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_Error\n  af_get_char_index( AF_StyleMetrics  metrics,\n                     FT_ULong         charcode,\n                     FT_ULong        *codepoint,\n                     FT_Long         *y_offset )\n  {\n    FT_Face  face;\n\n\n    if ( !metrics )\n      return FT_THROW( Invalid_Argument );\n\n    face = metrics->globals->face;\n\n    *codepoint = FT_Get_Char_Index( face, charcode );\n    *y_offset  = 0;\n\n    return FT_Err_Ok;\n  }\n\n\n#endif /* !FT_CONFIG_OPTION_USE_HARFBUZZ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/autofit/hbshim.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  hbshim.h                                                               */\n/*                                                                         */\n/*    HarfBuzz interface for accessing OpenType features (specification).  */\n/*                                                                         */\n/*  Copyright 2013 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __HBSHIM_H__\n#define __HBSHIM_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n\n#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ\n\n#include <hb.h>\n#include <hb-ot.h>\n#include <hb-ft.h>\n\n#endif\n\n\nFT_BEGIN_HEADER\n\n  FT_Error\n  af_get_coverage( AF_FaceGlobals  globals,\n                   AF_StyleClass   style_class,\n                   FT_Byte*        gstyles );\n\n  FT_Error\n  af_get_char_index( AF_StyleMetrics  metrics,\n                     FT_ULong         charcode,\n                     FT_ULong        *codepoint,\n                     FT_Long         *y_offset );\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __HBSHIM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/basepic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  basepic.c                                                              */\n/*                                                                         */\n/*    The FreeType position independent code services for base.            */\n/*                                                                         */\n/*  Copyright 2009, 2012, 2013 by                                          */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"basepic.h\"\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* forward declaration of PIC init functions from ftglyph.c */\n  void\n  FT_Init_Class_ft_outline_glyph_class( FT_Glyph_Class*  clazz );\n\n  void\n  FT_Init_Class_ft_bitmap_glyph_class( FT_Glyph_Class*  clazz );\n\n#ifdef FT_CONFIG_OPTION_MAC_FONTS\n  /* forward declaration of PIC init function from ftrfork.c */\n  /* (not modularized)                                       */\n  void\n  FT_Init_Table_ft_raccess_guess_table( ft_raccess_guess_rec*  record );\n#endif\n\n  /* forward declaration of PIC init functions from ftinit.c */\n  FT_Error\n  ft_create_default_module_classes( FT_Library  library );\n\n  void\n  ft_destroy_default_module_classes( FT_Library  library );\n\n\n  void\n  ft_base_pic_free( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Memory          memory        = library->memory;\n\n\n    if ( pic_container->base )\n    {\n      /* destroy default module classes            */\n      /* (in case FT_Add_Default_Modules was used) */\n      ft_destroy_default_module_classes( library );\n\n      FT_FREE( pic_container->base );\n      pic_container->base = NULL;\n    }\n  }\n\n\n  FT_Error\n  ft_base_pic_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Error           error         = FT_Err_Ok;\n    BasePIC*           container     = NULL;\n    FT_Memory          memory        = library->memory;\n\n\n    /* allocate pointer, clear and set global container pointer */\n    if ( FT_ALLOC( container, sizeof ( *container ) ) )\n      return error;\n    FT_MEM_SET( container, 0, sizeof ( *container ) );\n    pic_container->base = container;\n\n    /* initialize default modules list and pointers */\n    error = ft_create_default_module_classes( library );\n    if ( error )\n      goto Exit;\n\n    /* initialize pointer table -                       */\n    /* this is how the module usually expects this data */\n    FT_Init_Class_ft_outline_glyph_class(\n      &container->ft_outline_glyph_class );\n    FT_Init_Class_ft_bitmap_glyph_class(\n      &container->ft_bitmap_glyph_class );\n#ifdef FT_CONFIG_OPTION_MAC_FONTS\n    FT_Init_Table_ft_raccess_guess_table(\n      (ft_raccess_guess_rec*)&container->ft_raccess_guess_table );\n#endif\n\n  Exit:\n    if ( error )\n      ft_base_pic_free( library );\n    return error;\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/basepic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  basepic.h                                                              */\n/*                                                                         */\n/*    The FreeType position independent code services for base.            */\n/*                                                                         */\n/*  Copyright 2009 by                                                      */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __BASEPIC_H__\n#define __BASEPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#include FT_INTERNAL_PIC_H\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_OUTLINE_GLYPH_CLASS_GET  &ft_outline_glyph_class\n#define FT_BITMAP_GLYPH_CLASS_GET   &ft_bitmap_glyph_class\n#define FT_DEFAULT_MODULES_GET      ft_default_modules\n\n#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n#define FT_RACCESS_GUESS_TABLE_GET  ft_raccess_guess_table\n#endif\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#include FT_GLYPH_H\n\n#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n#include FT_INTERNAL_RFORK_H\n#endif\n\n\n  typedef struct  BasePIC_\n  {\n    FT_Module_Class**  default_module_classes;\n    FT_Glyph_Class     ft_outline_glyph_class;\n    FT_Glyph_Class     ft_bitmap_glyph_class;\n\n#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n    ft_raccess_guess_rec  ft_raccess_guess_table[FT_RACCESS_N_RULES];\n#endif\n\n  } BasePIC;\n\n\n#define GET_PIC( lib )  ( (BasePIC*)( (lib)->pic_container.base ) )\n\n#define FT_OUTLINE_GLYPH_CLASS_GET                      \\\n          ( &GET_PIC( library )->ft_outline_glyph_class )\n#define FT_BITMAP_GLYPH_CLASS_GET                        \\\n          ( &GET_PIC( library )->ft_bitmap_glyph_class )\n#define FT_DEFAULT_MODULES_GET                           \\\n          ( GET_PIC( library )->default_module_classes )\n\n#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n#define FT_RACCESS_GUESS_TABLE_GET                       \\\n          ( GET_PIC( library )->ft_raccess_guess_table )\n#endif\n\n\n  /* see basepic.c for the implementation */\n  void\n  ft_base_pic_free( FT_Library  library );\n\n  FT_Error\n  ft_base_pic_init( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __BASEPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftadvanc.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftadvanc.c                                                             */\n/*                                                                         */\n/*    Quick computation of advance widths (body).                          */\n/*                                                                         */\n/*  Copyright 2008, 2009, 2011, 2013, 2014 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_ADVANCES_H\n#include FT_INTERNAL_OBJECTS_H\n\n\n  static FT_Error\n  _ft_face_scale_advances( FT_Face    face,\n                           FT_Fixed*  advances,\n                           FT_UInt    count,\n                           FT_Int32   flags )\n  {\n    FT_Fixed  scale;\n    FT_UInt   nn;\n\n\n    if ( flags & FT_LOAD_NO_SCALE )\n      return FT_Err_Ok;\n\n    if ( face->size == NULL )\n      return FT_THROW( Invalid_Size_Handle );\n\n    if ( flags & FT_LOAD_VERTICAL_LAYOUT )\n      scale = face->size->metrics.y_scale;\n    else\n      scale = face->size->metrics.x_scale;\n\n    /* this must be the same scaling as to get linear{Hori,Vert}Advance */\n    /* (see `FT_Load_Glyph' implementation in src/base/ftobjs.c)        */\n\n    for ( nn = 0; nn < count; nn++ )\n      advances[nn] = FT_MulDiv( advances[nn], scale, 64 );\n\n    return FT_Err_Ok;\n  }\n\n\n   /* at the moment, we can perform fast advance retrieval only in */\n   /* the following cases:                                         */\n   /*                                                              */\n   /*  - unscaled load                                             */\n   /*  - unhinted load                                             */\n   /*  - light-hinted load                                         */\n\n#define LOAD_ADVANCE_FAST_CHECK( flags )                            \\\n          ( flags & ( FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING )    || \\\n            FT_LOAD_TARGET_MODE( flags ) == FT_RENDER_MODE_LIGHT )\n\n\n  /* documentation is in ftadvanc.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_Advance( FT_Face    face,\n                  FT_UInt    gindex,\n                  FT_Int32   flags,\n                  FT_Fixed  *padvance )\n  {\n    FT_Face_GetAdvancesFunc  func;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !padvance )\n      return FT_THROW( Invalid_Argument );\n\n    if ( gindex >= (FT_UInt)face->num_glyphs )\n      return FT_THROW( Invalid_Glyph_Index );\n\n    func = face->driver->clazz->get_advances;\n    if ( func && LOAD_ADVANCE_FAST_CHECK( flags ) )\n    {\n      FT_Error  error;\n\n\n      error = func( face, gindex, 1, flags, padvance );\n      if ( !error )\n        return _ft_face_scale_advances( face, padvance, 1, flags );\n\n      if ( FT_ERR_NEQ( error, Unimplemented_Feature ) )\n        return error;\n    }\n\n    return FT_Get_Advances( face, gindex, 1, flags, padvance );\n  }\n\n\n  /* documentation is in ftadvanc.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_Advances( FT_Face    face,\n                   FT_UInt    start,\n                   FT_UInt    count,\n                   FT_Int32   flags,\n                   FT_Fixed  *padvances )\n  {\n    FT_Face_GetAdvancesFunc  func;\n    FT_UInt                  num, end, nn;\n    FT_Error                 error = FT_Err_Ok;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !padvances )\n      return FT_THROW( Invalid_Argument );\n\n    num = (FT_UInt)face->num_glyphs;\n    end = start + count;\n    if ( start >= num || end < start || end > num )\n      return FT_THROW( Invalid_Glyph_Index );\n\n    if ( count == 0 )\n      return FT_Err_Ok;\n\n    func = face->driver->clazz->get_advances;\n    if ( func && LOAD_ADVANCE_FAST_CHECK( flags ) )\n    {\n      error = func( face, start, count, flags, padvances );\n      if ( !error )\n        return _ft_face_scale_advances( face, padvances, count, flags );\n\n      if ( FT_ERR_NEQ( error, Unimplemented_Feature ) )\n        return error;\n    }\n\n    error = FT_Err_Ok;\n\n    if ( flags & FT_ADVANCE_FLAG_FAST_ONLY )\n      return FT_THROW( Unimplemented_Feature );\n\n    flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY;\n    for ( nn = 0; nn < count; nn++ )\n    {\n      error = FT_Load_Glyph( face, start + nn, flags );\n      if ( error )\n        break;\n\n      /* scale from 26.6 to 16.16 */\n      padvances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT )\n                      ? face->glyph->advance.y << 10\n                      : face->glyph->advance.x << 10;\n    }\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftapi.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftapi.c                                                                */\n/*                                                                         */\n/*    The FreeType compatibility functions (body).                         */\n/*                                                                         */\n/*  Copyright 2002 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_LIST_H\n#include FT_OUTLINE_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TABLES_H\n#include FT_OUTLINE_H\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                 C O M P A T I B I L I T Y                       ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* backwards compatibility API */\n\n  FT_BASE_DEF( void )\n  FT_New_Memory_Stream( FT_Library  library,\n                        FT_Byte*    base,\n                        FT_ULong    size,\n                        FT_Stream   stream )\n  {\n    FT_UNUSED( library );\n\n    FT_Stream_OpenMemory( stream, base, size );\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Seek_Stream( FT_Stream  stream,\n                  FT_ULong   pos )\n  {\n    return FT_Stream_Seek( stream, pos );\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Skip_Stream( FT_Stream  stream,\n                  FT_Long    distance )\n  {\n    return FT_Stream_Skip( stream, distance );\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Read_Stream( FT_Stream  stream,\n                  FT_Byte*   buffer,\n                  FT_ULong   count )\n  {\n    return FT_Stream_Read( stream, buffer, count );\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Read_Stream_At( FT_Stream  stream,\n                     FT_ULong   pos,\n                     FT_Byte*   buffer,\n                     FT_ULong   count )\n  {\n    return FT_Stream_ReadAt( stream, pos, buffer, count );\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Extract_Frame( FT_Stream  stream,\n                    FT_ULong   count,\n                    FT_Byte**  pbytes )\n  {\n    return FT_Stream_ExtractFrame( stream, count, pbytes );\n  }\n\n\n  FT_BASE_DEF( void )\n  FT_Release_Frame( FT_Stream  stream,\n                    FT_Byte**  pbytes )\n  {\n    FT_Stream_ReleaseFrame( stream, pbytes );\n  }\n\n  FT_BASE_DEF( FT_Error )\n  FT_Access_Frame( FT_Stream  stream,\n                   FT_ULong   count )\n  {\n    return FT_Stream_EnterFrame( stream, count );\n  }\n\n\n  FT_BASE_DEF( void )\n  FT_Forget_Frame( FT_Stream  stream )\n  {\n    FT_Stream_ExitFrame( stream );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftbase.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbase.c                                                               */\n/*                                                                         */\n/*    Single object library component (body only).                         */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n\n#define  FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include \"ftpic.c\"\n#include \"basepic.c\"\n#include \"ftadvanc.c\"\n#include \"ftcalc.c\"\n#include \"ftdbgmem.c\"\n#include \"ftgloadr.c\"\n#include \"ftobjs.c\"\n#include \"ftoutln.c\"\n#include \"ftrfork.c\"\n#include \"ftsnames.c\"\n#include \"ftstream.c\"\n#include \"fttrigon.c\"\n#include \"ftutil.c\"\n\n#ifdef FT_MACINTOSH\n#include \"ftmac.c\"\n#endif\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftbase.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbase.h                                                               */\n/*                                                                         */\n/*    The FreeType private functions used in base module (specification).  */\n/*                                                                         */\n/*  Copyright 2008, 2010 by                                                */\n/*  David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya.      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTBASE_H__\n#define __FTBASE_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n\n\nFT_BEGIN_HEADER\n\n\n  /* Assume the stream is sfnt-wrapped PS Type1 or sfnt-wrapped CID-keyed */\n  /* font, and try to load a face specified by the face_index.            */\n  FT_LOCAL( FT_Error )\n  open_face_PS_from_sfnt_stream( FT_Library     library,\n                                 FT_Stream      stream,\n                                 FT_Long        face_index,\n                                 FT_Int         num_params,\n                                 FT_Parameter  *params,\n                                 FT_Face       *aface );\n\n\n  /* Create a new FT_Face given a buffer and a driver name. */\n  /* From ftmac.c.                                          */\n  FT_LOCAL( FT_Error )\n  open_face_from_buffer( FT_Library   library,\n                         FT_Byte*     base,\n                         FT_ULong     size,\n                         FT_Long      face_index,\n                         const char*  driver_name,\n                         FT_Face     *aface );\n\n\n#if  defined( FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK ) && \\\n    !defined( FT_MACINTOSH )\n  /* Mac OS X/Darwin kernel often changes recommended method to access */\n  /* the resource fork and older methods makes the kernel issue the    */\n  /* warning of deprecated method.  To calm it down, the methods based */\n  /* on Darwin VFS should be grouped and skip the rest methods after   */\n  /* the case the resource is opened but found to lack a font in it.   */\n  FT_LOCAL( FT_Bool )\n  ft_raccess_rule_by_darwin_vfs( FT_Library library, FT_UInt  rule_index );\n#endif\n\n\nFT_END_HEADER\n\n#endif /* __FTBASE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftbbox.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbbox.c                                                               */\n/*                                                                         */\n/*    FreeType bbox computation (body).                                    */\n/*                                                                         */\n/*  Copyright 1996-2002, 2004, 2006, 2010, 2013, 2014 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used        */\n/*  modified and distributed under the terms of the FreeType project       */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This component has a _single_ role: to compute exact outline bounding */\n  /* boxes.                                                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_BBOX_H\n#include FT_IMAGE_H\n#include FT_OUTLINE_H\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_OBJECTS_H\n\n\n  typedef struct  TBBox_Rec_\n  {\n    FT_Vector  last;\n    FT_BBox    bbox;\n\n  } TBBox_Rec;\n\n\n#define FT_UPDATE_BBOX( p, bbox ) \\\n  FT_BEGIN_STMNT                  \\\n    if ( p->x < bbox.xMin )       \\\n      bbox.xMin = p->x;           \\\n    if ( p->x > bbox.xMax )       \\\n      bbox.xMax = p->x;           \\\n    if ( p->y < bbox.yMin )       \\\n      bbox.yMin = p->y;           \\\n    if ( p->y > bbox.yMax )       \\\n      bbox.yMax = p->y;           \\\n  FT_END_STMNT\n\n#define CHECK_X( p, bbox )                         \\\n          ( p->x < bbox.xMin || p->x > bbox.xMax )\n\n#define CHECK_Y( p, bbox )                         \\\n          ( p->y < bbox.yMin || p->y > bbox.yMax )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    BBox_Move_To                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used as a `move_to' emitter during                */\n  /*    FT_Outline_Decompose().  It simply records the destination point   */\n  /*    in `user->last'. We also update bbox in case contour starts with   */\n  /*    an implicit `on' point.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    to   :: A pointer to the destination vector.                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    user :: A pointer to the current walk context.                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Always 0.  Needed for the interface only.                          */\n  /*                                                                       */\n  static int\n  BBox_Move_To( FT_Vector*  to,\n                TBBox_Rec*  user )\n  {\n    FT_UPDATE_BBOX( to, user->bbox );\n\n    user->last = *to;\n\n    return 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    BBox_Line_To                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used as a `line_to' emitter during                */\n  /*    FT_Outline_Decompose().  It simply records the destination point   */\n  /*    in `user->last'; no further computations are necessary because     */\n  /*    bbox already contains both explicit ends of the line segment.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    to   :: A pointer to the destination vector.                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    user :: A pointer to the current walk context.                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Always 0.  Needed for the interface only.                          */\n  /*                                                                       */\n  static int\n  BBox_Line_To( FT_Vector*  to,\n                TBBox_Rec*  user )\n  {\n    user->last = *to;\n\n    return 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    BBox_Conic_Check                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Find the extrema of a 1-dimensional conic Bezier curve and update  */\n  /*    a bounding range.  This version uses direct computation, as it     */\n  /*    doesn't need square roots.                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    y1  :: The start coordinate.                                       */\n  /*                                                                       */\n  /*    y2  :: The coordinate of the control point.                        */\n  /*                                                                       */\n  /*    y3  :: The end coordinate.                                         */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    min :: The address of the current minimum.                         */\n  /*                                                                       */\n  /*    max :: The address of the current maximum.                         */\n  /*                                                                       */\n  static void\n  BBox_Conic_Check( FT_Pos   y1,\n                    FT_Pos   y2,\n                    FT_Pos   y3,\n                    FT_Pos*  min,\n                    FT_Pos*  max )\n  {\n    /* This function is only called when a control off-point is outside */\n    /* the bbox that contains all on-points.  It finds a local extremum */\n    /* within the segment, equal to (y1*y3 - y2*y2)/(y1 - 2*y2 + y3).   */\n    /* Or, offsetting from y2, we get                                   */\n\n    y1 -= y2;\n    y3 -= y2;\n    y2 += FT_MulDiv( y1, y3, y1 + y3 );\n\n    if ( y2 < *min )\n      *min = y2;\n    if ( y2 > *max )\n      *max = y2;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    BBox_Conic_To                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used as a `conic_to' emitter during               */\n  /*    FT_Outline_Decompose().  It checks a conic Bezier curve with the   */\n  /*    current bounding box, and computes its extrema if necessary to     */\n  /*    update it.                                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    control :: A pointer to a control point.                           */\n  /*                                                                       */\n  /*    to      :: A pointer to the destination vector.                    */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    user    :: The address of the current walk context.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Always 0.  Needed for the interface only.                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    In the case of a non-monotonous arc, we compute directly the       */\n  /*    extremum coordinates, as it is sufficiently fast.                  */\n  /*                                                                       */\n  static int\n  BBox_Conic_To( FT_Vector*  control,\n                 FT_Vector*  to,\n                 TBBox_Rec*  user )\n  {\n    /* in case `to' is implicit and not included in bbox yet */\n    FT_UPDATE_BBOX( to, user->bbox );\n\n    if ( CHECK_X( control, user->bbox ) )\n      BBox_Conic_Check( user->last.x,\n                        control->x,\n                        to->x,\n                        &user->bbox.xMin,\n                        &user->bbox.xMax );\n\n    if ( CHECK_Y( control, user->bbox ) )\n      BBox_Conic_Check( user->last.y,\n                        control->y,\n                        to->y,\n                        &user->bbox.yMin,\n                        &user->bbox.yMax );\n\n    user->last = *to;\n\n    return 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    BBox_Cubic_Check                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Find the extrema of a 1-dimensional cubic Bezier curve and         */\n  /*    update a bounding range.  This version uses iterative splitting    */\n  /*    because it is faster than the exact solution with square roots.    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    p1  :: The start coordinate.                                       */\n  /*                                                                       */\n  /*    p2  :: The coordinate of the first control point.                  */\n  /*                                                                       */\n  /*    p3  :: The coordinate of the second control point.                 */\n  /*                                                                       */\n  /*    p4  :: The end coordinate.                                         */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    min :: The address of the current minimum.                         */\n  /*                                                                       */\n  /*    max :: The address of the current maximum.                         */\n  /*                                                                       */\n  static FT_Pos\n  cubic_peak( FT_Pos  q1,\n              FT_Pos  q2,\n              FT_Pos  q3,\n              FT_Pos  q4 )\n  {\n    FT_Pos  peak = 0;\n    FT_Int  shift;\n\n    /* This function finds a peak of a cubic segment if it is above 0    */\n    /* using iterative bisection of the segment, or returns 0.           */\n    /* The fixed-point arithmetic of bisection is inherently stable      */\n    /* but may loose accuracy in the two lowest bits.  To compensate,    */\n    /* we upscale the segment if there is room.  Large values may need   */\n    /* to be downscaled to avoid overflows during bisection.             */\n    /* It is called with either q2 or q3 positive, which is necessary    */\n    /* for the peak to exist and avoids undefined FT_MSB.                */\n\n    shift = 27 -\n      FT_MSB( FT_ABS( q1 ) | FT_ABS( q2 ) | FT_ABS( q3 ) | FT_ABS( q4 ) );\n\n    if ( shift > 0 )\n    {\n      /* upscaling too much just wastes time */\n      if ( shift > 2 )\n        shift = 2;\n\n      q1 <<=  shift;\n      q2 <<=  shift;\n      q3 <<=  shift;\n      q4 <<=  shift;\n    }\n    else\n    {\n      q1 >>= -shift;\n      q2 >>= -shift;\n      q3 >>= -shift;\n      q4 >>= -shift;\n    }\n\n    /* for a peak to exist above 0, the cubic segment must have */\n    /* at least one of its control off-points above 0.          */\n    while ( q2 > 0 || q3 > 0 )\n    {\n      /* determine which half contains the maximum and split */\n      if ( q1 + q2 > q3 + q4 ) /* first half */\n      {\n        q4 = q4 + q3;\n        q3 = q3 + q2;\n        q2 = q2 + q1;\n        q4 = q4 + q3;\n        q3 = q3 + q2;\n        q4 = ( q4 + q3 ) / 8;\n        q3 = q3 / 4;\n        q2 = q2 / 2;\n      }\n      else                     /* second half */\n      {\n        q1 = q1 + q2;\n        q2 = q2 + q3;\n        q3 = q3 + q4;\n        q1 = q1 + q2;\n        q2 = q2 + q3;\n        q1 = ( q1 + q2 ) / 8;\n        q2 = q2 / 4;\n        q3 = q3 / 2;\n      }\n\n      /* check whether either end reached the maximum */\n      if ( q1 == q2 && q1 >= q3 )\n      {\n        peak = q1;\n        break;\n      }\n      if ( q3 == q4 && q2 <= q4 )\n      {\n        peak = q4;\n        break;\n      }\n    }\n\n    if ( shift > 0 )\n      peak >>=  shift;\n    else\n      peak <<= -shift;\n\n    return peak;\n  }\n\n\n  static void\n  BBox_Cubic_Check( FT_Pos   p1,\n                    FT_Pos   p2,\n                    FT_Pos   p3,\n                    FT_Pos   p4,\n                    FT_Pos*  min,\n                    FT_Pos*  max )\n  {\n    /* This function is only called when a control off-point is outside  */\n    /* the bbox that contains all on-points.  So at least one of the     */\n    /* conditions below holds and cubic_peak is called with at least one */\n    /* non-zero argument.                                                */\n\n    if ( p2 > *max || p3 > *max )\n      *max += cubic_peak( p1 - *max, p2 - *max, p3 - *max, p4 - *max );\n\n    /* now flip the signs to update the minimum */\n    if ( p2 < *min || p3 < *min )\n      *min -= cubic_peak( *min - p1, *min - p2, *min - p3, *min - p4 );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    BBox_Cubic_To                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used as a `cubic_to' emitter during               */\n  /*    FT_Outline_Decompose().  It checks a cubic Bezier curve with the   */\n  /*    current bounding box, and computes its extrema if necessary to     */\n  /*    update it.                                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    control1 :: A pointer to the first control point.                  */\n  /*                                                                       */\n  /*    control2 :: A pointer to the second control point.                 */\n  /*                                                                       */\n  /*    to       :: A pointer to the destination vector.                   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    user     :: The address of the current walk context.               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Always 0.  Needed for the interface only.                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    In the case of a non-monotonous arc, we don't compute directly     */\n  /*    extremum coordinates, we subdivide instead.                        */\n  /*                                                                       */\n  static int\n  BBox_Cubic_To( FT_Vector*  control1,\n                 FT_Vector*  control2,\n                 FT_Vector*  to,\n                 TBBox_Rec*  user )\n  {\n    /* We don't need to check `to' since it is always an on-point,    */\n    /* thus within the bbox.  Only segments with an off-point outside */\n    /* the bbox can possibly reach new extreme values.                */\n\n    if ( CHECK_X( control1, user->bbox ) ||\n         CHECK_X( control2, user->bbox ) )\n      BBox_Cubic_Check( user->last.x,\n                        control1->x,\n                        control2->x,\n                        to->x,\n                        &user->bbox.xMin,\n                        &user->bbox.xMax );\n\n    if ( CHECK_Y( control1, user->bbox ) ||\n         CHECK_Y( control2, user->bbox ) )\n      BBox_Cubic_Check( user->last.y,\n                        control1->y,\n                        control2->y,\n                        to->y,\n                        &user->bbox.yMin,\n                        &user->bbox.yMax );\n\n    user->last = *to;\n\n    return 0;\n  }\n\n\n  FT_DEFINE_OUTLINE_FUNCS(bbox_interface,\n    (FT_Outline_MoveTo_Func) BBox_Move_To,\n    (FT_Outline_LineTo_Func) BBox_Line_To,\n    (FT_Outline_ConicTo_Func)BBox_Conic_To,\n    (FT_Outline_CubicTo_Func)BBox_Cubic_To,\n    0, 0\n  )\n\n\n  /* documentation is in ftbbox.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_Get_BBox( FT_Outline*  outline,\n                       FT_BBox     *abbox )\n  {\n    FT_BBox     cbox = {  0x7FFFFFFFL,  0x7FFFFFFFL,\n                         -0x7FFFFFFFL, -0x7FFFFFFFL };\n    FT_BBox     bbox = {  0x7FFFFFFFL,  0x7FFFFFFFL,\n                         -0x7FFFFFFFL, -0x7FFFFFFFL };\n    FT_Vector*  vec;\n    FT_UShort   n;\n\n\n    if ( !abbox )\n      return FT_THROW( Invalid_Argument );\n\n    if ( !outline )\n      return FT_THROW( Invalid_Outline );\n\n    /* if outline is empty, return (0,0,0,0) */\n    if ( outline->n_points == 0 || outline->n_contours <= 0 )\n    {\n      abbox->xMin = abbox->xMax = 0;\n      abbox->yMin = abbox->yMax = 0;\n      return 0;\n    }\n\n    /* We compute the control box as well as the bounding box of  */\n    /* all `on' points in the outline.  Then, if the two boxes    */\n    /* coincide, we exit immediately.                             */\n\n    vec = outline->points;\n\n    for ( n = 0; n < outline->n_points; n++ )\n    {\n      FT_UPDATE_BBOX( vec, cbox);\n\n      if ( FT_CURVE_TAG( outline->tags[n] ) == FT_CURVE_TAG_ON )\n        FT_UPDATE_BBOX( vec, bbox);\n\n      vec++;\n    }\n\n    /* test two boxes for equality */\n    if ( cbox.xMin < bbox.xMin || cbox.xMax > bbox.xMax ||\n         cbox.yMin < bbox.yMin || cbox.yMax > bbox.yMax )\n    {\n      /* the two boxes are different, now walk over the outline to */\n      /* get the Bezier arc extrema.                               */\n\n      FT_Error   error;\n      TBBox_Rec  user;\n\n#ifdef FT_CONFIG_OPTION_PIC\n      FT_Outline_Funcs bbox_interface;\n      Init_Class_bbox_interface(&bbox_interface);\n#endif\n\n      user.bbox = bbox;\n\n      error = FT_Outline_Decompose( outline, &bbox_interface, &user );\n      if ( error )\n        return error;\n\n      *abbox = user.bbox;\n    }\n    else\n      *abbox = bbox;\n\n    return FT_Err_Ok;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftbdf.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbdf.c                                                                */\n/*                                                                         */\n/*    FreeType API for accessing BDF-specific strings (body).              */\n/*                                                                         */\n/*  Copyright 2002-2004, 2013, 2014 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_BDF_H\n\n\n  /* documentation is in ftbdf.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_BDF_Charset_ID( FT_Face       face,\n                         const char*  *acharset_encoding,\n                         const char*  *acharset_registry )\n  {\n    FT_Error     error;\n    const char*  encoding = NULL;\n    const char*  registry = NULL;\n\n    FT_Service_BDF  service;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    FT_FACE_FIND_SERVICE( face, service, BDF );\n\n    if ( service && service->get_charset_id )\n      error = service->get_charset_id( face, &encoding, &registry );\n    else\n      error = FT_THROW( Invalid_Argument );\n\n    if ( acharset_encoding )\n      *acharset_encoding = encoding;\n\n    if ( acharset_registry )\n      *acharset_registry = registry;\n\n    return error;\n  }\n\n\n  /* documentation is in ftbdf.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_BDF_Property( FT_Face           face,\n                       const char*       prop_name,\n                       BDF_PropertyRec  *aproperty )\n  {\n    FT_Error  error;\n\n    FT_Service_BDF  service;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !aproperty )\n      return FT_THROW( Invalid_Argument );\n\n    aproperty->type = BDF_PROPERTY_TYPE_NONE;\n\n    FT_FACE_FIND_SERVICE( face, service, BDF );\n\n    if ( service && service->get_property )\n      error = service->get_property( face, prop_name, aproperty );\n    else\n      error = FT_THROW( Invalid_Argument );\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftbitmap.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbitmap.c                                                             */\n/*                                                                         */\n/*    FreeType utility functions for bitmaps (body).                       */\n/*                                                                         */\n/*  Copyright 2004-2009, 2011, 2013, 2014 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_BITMAP_H\n#include FT_IMAGE_H\n#include FT_INTERNAL_OBJECTS_H\n\n\n  static\n  const FT_Bitmap  null_bitmap = { 0, 0, 0, 0, 0, 0, 0, 0 };\n\n\n  /* documentation is in ftbitmap.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Bitmap_New( FT_Bitmap  *abitmap )\n  {\n    if ( abitmap )\n      *abitmap = null_bitmap;\n  }\n\n\n  /* documentation is in ftbitmap.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Bitmap_Copy( FT_Library        library,\n                  const FT_Bitmap  *source,\n                  FT_Bitmap        *target)\n  {\n    FT_Memory  memory;\n    FT_Error   error  = FT_Err_Ok;\n\n    FT_Int    pitch;\n    FT_ULong  size;\n\n    FT_Int  source_pitch_sign, target_pitch_sign;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !source || !target )\n      return FT_THROW( Invalid_Argument );\n\n    if ( source == target )\n      return FT_Err_Ok;\n\n    source_pitch_sign = source->pitch < 0 ? -1 : 1;\n    target_pitch_sign = target->pitch < 0 ? -1 : 1;\n\n    if ( source->buffer == NULL )\n    {\n      *target = *source;\n      if ( source_pitch_sign != target_pitch_sign )\n        target->pitch = -target->pitch;\n\n      return FT_Err_Ok;\n    }\n\n    memory = library->memory;\n    pitch  = source->pitch;\n\n    if ( pitch < 0 )\n      pitch = -pitch;\n    size = (FT_ULong)pitch * source->rows;\n\n    if ( target->buffer )\n    {\n      FT_Int    target_pitch = target->pitch;\n      FT_ULong  target_size;\n\n\n      if ( target_pitch < 0 )\n        target_pitch = -target_pitch;\n      target_size = (FT_ULong)target_pitch * target->rows;\n\n      if ( target_size != size )\n        (void)FT_QREALLOC( target->buffer, target_size, size );\n    }\n    else\n      (void)FT_QALLOC( target->buffer, size );\n\n    if ( !error )\n    {\n      unsigned char *p;\n\n\n      p = target->buffer;\n      *target = *source;\n      target->buffer = p;\n\n      if ( source_pitch_sign == target_pitch_sign )\n        FT_MEM_COPY( target->buffer, source->buffer, size );\n      else\n      {\n        /* take care of bitmap flow */\n        FT_UInt   i;\n        FT_Byte*  s = source->buffer;\n        FT_Byte*  t = target->buffer;\n\n\n        t += pitch * ( target->rows - 1 );\n\n        for ( i = target->rows; i > 0; i-- )\n        {\n          FT_ARRAY_COPY( t, s, pitch );\n\n          s += pitch;\n          t -= pitch;\n        }\n      }\n    }\n\n    return error;\n  }\n\n\n  /* Enlarge `bitmap' horizontally and vertically by `xpixels' */\n  /* and `ypixels', respectively.                              */\n\n  static FT_Error\n  ft_bitmap_assure_buffer( FT_Memory   memory,\n                           FT_Bitmap*  bitmap,\n                           FT_UInt     xpixels,\n                           FT_UInt     ypixels )\n  {\n    FT_Error        error;\n    int             pitch;\n    int             new_pitch;\n    FT_UInt         bpp;\n    FT_UInt         i, width, height;\n    unsigned char*  buffer = NULL;\n\n\n    width  = bitmap->width;\n    height = bitmap->rows;\n    pitch  = bitmap->pitch;\n    if ( pitch < 0 )\n      pitch = -pitch;\n\n    switch ( bitmap->pixel_mode )\n    {\n    case FT_PIXEL_MODE_MONO:\n      bpp       = 1;\n      new_pitch = ( width + xpixels + 7 ) >> 3;\n      break;\n    case FT_PIXEL_MODE_GRAY2:\n      bpp       = 2;\n      new_pitch = ( width + xpixels + 3 ) >> 2;\n      break;\n    case FT_PIXEL_MODE_GRAY4:\n      bpp       = 4;\n      new_pitch = ( width + xpixels + 1 ) >> 1;\n      break;\n    case FT_PIXEL_MODE_GRAY:\n    case FT_PIXEL_MODE_LCD:\n    case FT_PIXEL_MODE_LCD_V:\n      bpp       = 8;\n      new_pitch = ( width + xpixels );\n      break;\n    default:\n      return FT_THROW( Invalid_Glyph_Format );\n    }\n\n    /* if no need to allocate memory */\n    if ( ypixels == 0 && new_pitch <= pitch )\n    {\n      /* zero the padding */\n      FT_UInt  bit_width = pitch * 8;\n      FT_UInt  bit_last  = ( width + xpixels ) * bpp;\n\n\n      if ( bit_last < bit_width )\n      {\n        FT_Byte*  line  = bitmap->buffer + ( bit_last >> 3 );\n        FT_Byte*  end   = bitmap->buffer + pitch;\n        FT_UInt   shift = bit_last & 7;\n        FT_UInt   mask  = 0xFF00U >> shift;\n        FT_UInt   count = height;\n\n\n        for ( ; count > 0; count--, line += pitch, end += pitch )\n        {\n          FT_Byte*  write = line;\n\n\n          if ( shift > 0 )\n          {\n            write[0] = (FT_Byte)( write[0] & mask );\n            write++;\n          }\n          if ( write < end )\n            FT_MEM_ZERO( write, end - write );\n        }\n      }\n\n      return FT_Err_Ok;\n    }\n\n    /* otherwise allocate new buffer */\n    if ( FT_QALLOC_MULT( buffer, new_pitch, bitmap->rows + ypixels ) )\n      return error;\n\n    /* new rows get added at the top of the bitmap, */\n    /* thus take care of the flow direction         */\n    if ( bitmap->pitch > 0 )\n    {\n      FT_UInt  len = ( width * bpp + 7 ) >> 3;\n\n\n      for ( i = 0; i < bitmap->rows; i++ )\n        FT_MEM_COPY( buffer + new_pitch * ( ypixels + i ),\n                     bitmap->buffer + pitch * i, len );\n    }\n    else\n    {\n      FT_UInt  len = ( width * bpp + 7 ) >> 3;\n\n\n      for ( i = 0; i < bitmap->rows; i++ )\n        FT_MEM_COPY( buffer + new_pitch * i,\n                     bitmap->buffer + pitch * i, len );\n    }\n\n    FT_FREE( bitmap->buffer );\n    bitmap->buffer = buffer;\n\n    if ( bitmap->pitch < 0 )\n      new_pitch = -new_pitch;\n\n    /* set pitch only, width and height are left untouched */\n    bitmap->pitch = new_pitch;\n\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in ftbitmap.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Bitmap_Embolden( FT_Library  library,\n                      FT_Bitmap*  bitmap,\n                      FT_Pos      xStrength,\n                      FT_Pos      yStrength )\n  {\n    FT_Error        error;\n    unsigned char*  p;\n    FT_Int          i, x, pitch;\n    FT_UInt         y;\n    FT_Int          xstr, ystr;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !bitmap || !bitmap->buffer )\n      return FT_THROW( Invalid_Argument );\n\n    if ( ( ( FT_PIX_ROUND( xStrength ) >> 6 ) > FT_INT_MAX ) ||\n         ( ( FT_PIX_ROUND( yStrength ) >> 6 ) > FT_INT_MAX ) )\n      return FT_THROW( Invalid_Argument );\n\n    xstr = (FT_Int)FT_PIX_ROUND( xStrength ) >> 6;\n    ystr = (FT_Int)FT_PIX_ROUND( yStrength ) >> 6;\n\n    if ( xstr == 0 && ystr == 0 )\n      return FT_Err_Ok;\n    else if ( xstr < 0 || ystr < 0 )\n      return FT_THROW( Invalid_Argument );\n\n    switch ( bitmap->pixel_mode )\n    {\n    case FT_PIXEL_MODE_GRAY2:\n    case FT_PIXEL_MODE_GRAY4:\n      {\n        FT_Bitmap  tmp;\n\n\n        /* convert to 8bpp */\n        FT_Bitmap_New( &tmp );\n        error = FT_Bitmap_Convert( library, bitmap, &tmp, 1 );\n        if ( error )\n          return error;\n\n        FT_Bitmap_Done( library, bitmap );\n        *bitmap = tmp;\n      }\n      break;\n\n    case FT_PIXEL_MODE_MONO:\n      if ( xstr > 8 )\n        xstr = 8;\n      break;\n\n    case FT_PIXEL_MODE_LCD:\n      xstr *= 3;\n      break;\n\n    case FT_PIXEL_MODE_LCD_V:\n      ystr *= 3;\n      break;\n\n    case FT_PIXEL_MODE_BGRA:\n      /* We don't embolden color glyphs. */\n      return FT_Err_Ok;\n    }\n\n    error = ft_bitmap_assure_buffer( library->memory, bitmap, xstr, ystr );\n    if ( error )\n      return error;\n\n    /* take care of bitmap flow */\n    pitch = bitmap->pitch;\n    if ( pitch > 0 )\n      p = bitmap->buffer + pitch * ystr;\n    else\n    {\n      pitch = -pitch;\n      p = bitmap->buffer + pitch * ( bitmap->rows - 1 );\n    }\n\n    /* for each row */\n    for ( y = 0; y < bitmap->rows ; y++ )\n    {\n      /*\n       * Horizontally:\n       *\n       * From the last pixel on, make each pixel or'ed with the\n       * `xstr' pixels before it.\n       */\n      for ( x = pitch - 1; x >= 0; x-- )\n      {\n        unsigned char  tmp;\n\n\n        tmp = p[x];\n        for ( i = 1; i <= xstr; i++ )\n        {\n          if ( bitmap->pixel_mode == FT_PIXEL_MODE_MONO )\n          {\n            p[x] |= tmp >> i;\n\n            /* the maximum value of 8 for `xstr' comes from here */\n            if ( x > 0 )\n              p[x] |= p[x - 1] << ( 8 - i );\n\n#if 0\n            if ( p[x] == 0xFF )\n              break;\n#endif\n          }\n          else\n          {\n            if ( x - i >= 0 )\n            {\n              if ( p[x] + p[x - i] > bitmap->num_grays - 1 )\n              {\n                p[x] = (unsigned char)( bitmap->num_grays - 1 );\n                break;\n              }\n              else\n              {\n                p[x] = (unsigned char)( p[x] + p[x - i] );\n                if ( p[x] == bitmap->num_grays - 1 )\n                  break;\n              }\n            }\n            else\n              break;\n          }\n        }\n      }\n\n      /*\n       * Vertically:\n       *\n       * Make the above `ystr' rows or'ed with it.\n       */\n      for ( x = 1; x <= ystr; x++ )\n      {\n        unsigned char*  q;\n\n\n        q = p - bitmap->pitch * x;\n        for ( i = 0; i < pitch; i++ )\n          q[i] |= p[i];\n      }\n\n      p += bitmap->pitch;\n    }\n\n    bitmap->width += xstr;\n    bitmap->rows += ystr;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Byte\n  ft_gray_for_premultiplied_srgb_bgra( const FT_Byte*  bgra )\n  {\n    FT_UInt  a = bgra[3];\n    FT_UInt  l;\n\n\n    /* Short-circuit transparent color to avoid division by zero. */\n    if ( !a )\n      return 0;\n\n    /*\n     * Luminosity for sRGB is defined using ~0.2126,0.7152,0.0722\n     * coefficients for RGB channels *on the linear colors*.\n     * A gamma of 2.2 is fair to assume.  And then, we need to\n     * undo the premultiplication too.\n     *\n     *   http://accessibility.kde.org/hsl-adjusted.php\n     *\n     * We do the computation with integers only, applying a gamma of 2.0.\n     * We guarantee 32-bit arithmetic to avoid overflow but the resulting\n     * luminosity fits into 16 bits.\n     *\n     */\n\n    l = (  4732UL /* 0.0722 * 65536 */ * bgra[0] * bgra[0] +\n          46871UL /* 0.7152 * 65536 */ * bgra[1] * bgra[1] +\n          13933UL /* 0.2126 * 65536 */ * bgra[2] * bgra[2] ) >> 16;\n\n    /*\n     * Final transparency can be determined as follows.\n     *\n     * - If alpha is zero, we want 0.\n     * - If alpha is zero and luminosity is zero, we want 255.\n     * - If alpha is zero and luminosity is one, we want 0.\n     *\n     * So the formula is a * (1 - l) = a - l * a.\n     *\n     * We still need to undo premultiplication by dividing l by a*a.\n     *\n     */\n\n    return (FT_Byte)( a - l / a );\n  }\n\n\n  /* documentation is in ftbitmap.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Bitmap_Convert( FT_Library        library,\n                     const FT_Bitmap  *source,\n                     FT_Bitmap        *target,\n                     FT_Int            alignment )\n  {\n    FT_Error   error = FT_Err_Ok;\n    FT_Memory  memory;\n\n    FT_Byte*  s;\n    FT_Byte*  t;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !source || !target )\n      return FT_THROW( Invalid_Argument );\n\n    memory = library->memory;\n\n    switch ( source->pixel_mode )\n    {\n    case FT_PIXEL_MODE_MONO:\n    case FT_PIXEL_MODE_GRAY:\n    case FT_PIXEL_MODE_GRAY2:\n    case FT_PIXEL_MODE_GRAY4:\n    case FT_PIXEL_MODE_LCD:\n    case FT_PIXEL_MODE_LCD_V:\n    case FT_PIXEL_MODE_BGRA:\n      {\n        FT_Int    pad, old_target_pitch, target_pitch;\n        FT_ULong  old_size;\n\n\n        old_target_pitch = target->pitch;\n        if ( old_target_pitch < 0 )\n          old_target_pitch = -old_target_pitch;\n\n        old_size = target->rows * old_target_pitch;\n\n        target->pixel_mode = FT_PIXEL_MODE_GRAY;\n        target->rows       = source->rows;\n        target->width      = source->width;\n\n        pad = 0;\n        if ( alignment > 0 )\n        {\n          pad = source->width % alignment;\n          if ( pad != 0 )\n            pad = alignment - pad;\n        }\n\n        target_pitch = source->width + pad;\n\n        if ( target_pitch > 0                                     &&\n             (FT_ULong)target->rows > FT_ULONG_MAX / target_pitch )\n          return FT_THROW( Invalid_Argument );\n\n        if ( target->rows * target_pitch > old_size               &&\n             FT_QREALLOC( target->buffer,\n                          old_size, target->rows * target_pitch ) )\n          return error;\n\n        target->pitch = target->pitch < 0 ? -target_pitch : target_pitch;\n      }\n      break;\n\n    default:\n      error = FT_THROW( Invalid_Argument );\n    }\n\n    s = source->buffer;\n    t = target->buffer;\n\n    /* take care of bitmap flow */\n    if ( source->pitch < 0 )\n      s -= source->pitch * ( source->rows - 1 );\n    if ( target->pitch < 0 )\n      t -= target->pitch * ( target->rows - 1 );\n\n    switch ( source->pixel_mode )\n    {\n    case FT_PIXEL_MODE_MONO:\n      {\n        FT_UInt  i;\n\n\n        target->num_grays = 2;\n\n        for ( i = source->rows; i > 0; i-- )\n        {\n          FT_Byte*  ss = s;\n          FT_Byte*  tt = t;\n          FT_UInt   j;\n\n\n          /* get the full bytes */\n          for ( j = source->width >> 3; j > 0; j-- )\n          {\n            FT_Int  val = ss[0]; /* avoid a byte->int cast on each line */\n\n\n            tt[0] = (FT_Byte)( ( val & 0x80 ) >> 7 );\n            tt[1] = (FT_Byte)( ( val & 0x40 ) >> 6 );\n            tt[2] = (FT_Byte)( ( val & 0x20 ) >> 5 );\n            tt[3] = (FT_Byte)( ( val & 0x10 ) >> 4 );\n            tt[4] = (FT_Byte)( ( val & 0x08 ) >> 3 );\n            tt[5] = (FT_Byte)( ( val & 0x04 ) >> 2 );\n            tt[6] = (FT_Byte)( ( val & 0x02 ) >> 1 );\n            tt[7] = (FT_Byte)(   val & 0x01 );\n\n            tt += 8;\n            ss += 1;\n          }\n\n          /* get remaining pixels (if any) */\n          j = source->width & 7;\n          if ( j > 0 )\n          {\n            FT_Int  val = *ss;\n\n\n            for ( ; j > 0; j-- )\n            {\n              tt[0] = (FT_Byte)( ( val & 0x80 ) >> 7);\n              val <<= 1;\n              tt   += 1;\n            }\n          }\n\n          s += source->pitch;\n          t += target->pitch;\n        }\n      }\n      break;\n\n\n    case FT_PIXEL_MODE_GRAY:\n    case FT_PIXEL_MODE_LCD:\n    case FT_PIXEL_MODE_LCD_V:\n      {\n        FT_Int   width = source->width;\n        FT_UInt  i;\n\n\n        target->num_grays = 256;\n\n        for ( i = source->rows; i > 0; i-- )\n        {\n          FT_ARRAY_COPY( t, s, width );\n\n          s += source->pitch;\n          t += target->pitch;\n        }\n      }\n      break;\n\n\n    case FT_PIXEL_MODE_GRAY2:\n      {\n        FT_UInt  i;\n\n\n        target->num_grays = 4;\n\n        for ( i = source->rows; i > 0; i-- )\n        {\n          FT_Byte*  ss = s;\n          FT_Byte*  tt = t;\n          FT_UInt   j;\n\n\n          /* get the full bytes */\n          for ( j = source->width >> 2; j > 0; j-- )\n          {\n            FT_Int  val = ss[0];\n\n\n            tt[0] = (FT_Byte)( ( val & 0xC0 ) >> 6 );\n            tt[1] = (FT_Byte)( ( val & 0x30 ) >> 4 );\n            tt[2] = (FT_Byte)( ( val & 0x0C ) >> 2 );\n            tt[3] = (FT_Byte)( ( val & 0x03 ) );\n\n            ss += 1;\n            tt += 4;\n          }\n\n          j = source->width & 3;\n          if ( j > 0 )\n          {\n            FT_Int  val = ss[0];\n\n\n            for ( ; j > 0; j-- )\n            {\n              tt[0]  = (FT_Byte)( ( val & 0xC0 ) >> 6 );\n              val  <<= 2;\n              tt    += 1;\n            }\n          }\n\n          s += source->pitch;\n          t += target->pitch;\n        }\n      }\n      break;\n\n\n    case FT_PIXEL_MODE_GRAY4:\n      {\n        FT_UInt  i;\n\n\n        target->num_grays = 16;\n\n        for ( i = source->rows; i > 0; i-- )\n        {\n          FT_Byte*  ss = s;\n          FT_Byte*  tt = t;\n          FT_UInt   j;\n\n\n          /* get the full bytes */\n          for ( j = source->width >> 1; j > 0; j-- )\n          {\n            FT_Int  val = ss[0];\n\n\n            tt[0] = (FT_Byte)( ( val & 0xF0 ) >> 4 );\n            tt[1] = (FT_Byte)( ( val & 0x0F ) );\n\n            ss += 1;\n            tt += 2;\n          }\n\n          if ( source->width & 1 )\n            tt[0] = (FT_Byte)( ( ss[0] & 0xF0 ) >> 4 );\n\n          s += source->pitch;\n          t += target->pitch;\n        }\n      }\n      break;\n\n\n    case FT_PIXEL_MODE_BGRA:\n      {\n        FT_UInt  i;\n\n\n        target->num_grays = 256;\n\n        for ( i = source->rows; i > 0; i-- )\n        {\n          FT_Byte*  ss = s;\n          FT_Byte*  tt = t;\n          FT_UInt   j;\n\n\n          for ( j = source->width; j > 0; j-- )\n          {\n            tt[0] = ft_gray_for_premultiplied_srgb_bgra( ss );\n\n            ss += 4;\n            tt += 1;\n          }\n\n          s += source->pitch;\n          t += target->pitch;\n        }\n      }\n      break;\n\n    default:\n      ;\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftbitmap.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot  slot )\n  {\n    if ( slot && slot->format == FT_GLYPH_FORMAT_BITMAP   &&\n         !( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )\n    {\n      FT_Bitmap  bitmap;\n      FT_Error   error;\n\n\n      FT_Bitmap_New( &bitmap );\n      error = FT_Bitmap_Copy( slot->library, &slot->bitmap, &bitmap );\n      if ( error )\n        return error;\n\n      slot->bitmap = bitmap;\n      slot->internal->flags |= FT_GLYPH_OWN_BITMAP;\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in ftbitmap.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Bitmap_Done( FT_Library  library,\n                  FT_Bitmap  *bitmap )\n  {\n    FT_Memory  memory;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !bitmap )\n      return FT_THROW( Invalid_Argument );\n\n    memory = library->memory;\n\n    FT_FREE( bitmap->buffer );\n    *bitmap = null_bitmap;\n\n    return FT_Err_Ok;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftcalc.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcalc.c                                                               */\n/*                                                                         */\n/*    Arithmetic computations (body).                                      */\n/*                                                                         */\n/*  Copyright 1996-2006, 2008, 2012-2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Support for 1-complement arithmetic has been totally dropped in this  */\n  /* release.  You can still write your own code if you need it.           */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Implementing basic computation routines.                              */\n  /*                                                                       */\n  /* FT_MulDiv(), FT_MulFix(), FT_DivFix(), FT_RoundFix(), FT_CeilFix(),   */\n  /* and FT_FloorFix() are declared in freetype.h.                         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_GLYPH_H\n#include FT_TRIGONOMETRY_H\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n\n\n#ifdef FT_MULFIX_ASSEMBLER\n#undef FT_MulFix\n#endif\n\n/* we need to emulate a 64-bit data type if a real one isn't available */\n\n#ifndef FT_LONG64\n\n  typedef struct  FT_Int64_\n  {\n    FT_UInt32  lo;\n    FT_UInt32  hi;\n\n  } FT_Int64;\n\n#endif /* !FT_LONG64 */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_calc\n\n\n  /* transfer sign leaving a positive number */\n#define FT_MOVE_SIGN( x, s ) \\\n  FT_BEGIN_STMNT             \\\n    if ( x < 0 )             \\\n    {                        \\\n      x = -x;                \\\n      s = -s;                \\\n    }                        \\\n  FT_END_STMNT\n\n  /* The following three functions are available regardless of whether */\n  /* FT_LONG64 is defined.                                             */\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Fixed )\n  FT_RoundFix( FT_Fixed  a )\n  {\n    return a >= 0 ?   ( a + 0x8000L ) & ~0xFFFFL\n                  : -((-a + 0x8000L ) & ~0xFFFFL );\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Fixed )\n  FT_CeilFix( FT_Fixed  a )\n  {\n    return a >= 0 ?   ( a + 0xFFFFL ) & ~0xFFFFL\n                  : -((-a + 0xFFFFL ) & ~0xFFFFL );\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Fixed )\n  FT_FloorFix( FT_Fixed  a )\n  {\n    return a >= 0 ?   a & ~0xFFFFL\n                  : -((-a) & ~0xFFFFL );\n  }\n\n#ifndef FT_MSB\n\n  FT_BASE_DEF ( FT_Int )\n  FT_MSB( FT_UInt32 z )\n  {\n    FT_Int  shift = 0;\n\n\n    /* determine msb bit index in `shift' */\n    if ( z & 0xFFFF0000UL )\n    {\n      z     >>= 16;\n      shift  += 16;\n    }\n    if ( z & 0x0000FF00UL )\n    {\n      z     >>= 8;\n      shift  += 8;\n    }\n    if ( z & 0x000000F0UL )\n    {\n      z     >>= 4;\n      shift  += 4;\n    }\n    if ( z & 0x0000000CUL )\n    {\n      z     >>= 2;\n      shift  += 2;\n    }\n    if ( z & 0x00000002UL )\n    {\n   /* z     >>= 1; */\n      shift  += 1;\n    }\n\n    return shift;\n  }\n\n#endif /* !FT_MSB */\n\n\n  /* documentation is in ftcalc.h */\n\n  FT_BASE_DEF( FT_Fixed )\n  FT_Hypot( FT_Fixed  x,\n            FT_Fixed  y )\n  {\n    FT_Vector  v;\n\n\n    v.x = x;\n    v.y = y;\n\n    return FT_Vector_Length( &v );\n  }\n\n\n#ifdef FT_LONG64\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Long )\n  FT_MulDiv( FT_Long  a,\n             FT_Long  b,\n             FT_Long  c )\n  {\n    FT_Int   s = 1;\n    FT_Long  d;\n\n\n    FT_MOVE_SIGN( a, s );\n    FT_MOVE_SIGN( b, s );\n    FT_MOVE_SIGN( c, s );\n\n    d = (FT_Long)( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c\n                         : 0x7FFFFFFFL );\n\n    return s < 0 ? -d : d;\n  }\n\n\n  /* documentation is in ftcalc.h */\n\n  FT_BASE_DEF( FT_Long )\n  FT_MulDiv_No_Round( FT_Long  a,\n                      FT_Long  b,\n                      FT_Long  c )\n  {\n    FT_Int   s = 1;\n    FT_Long  d;\n\n\n    FT_MOVE_SIGN( a, s );\n    FT_MOVE_SIGN( b, s );\n    FT_MOVE_SIGN( c, s );\n\n    d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c\n                         : 0x7FFFFFFFL );\n\n    return s < 0 ? -d : d;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Long )\n  FT_MulFix( FT_Long  a,\n             FT_Long  b )\n  {\n#ifdef FT_MULFIX_ASSEMBLER\n\n    return FT_MULFIX_ASSEMBLER( a, b );\n\n#else\n\n    FT_Int   s = 1;\n    FT_Long  c;\n\n\n    FT_MOVE_SIGN( a, s );\n    FT_MOVE_SIGN( b, s );\n\n    c = (FT_Long)( ( (FT_Int64)a * b + 0x8000L ) >> 16 );\n\n    return s < 0 ? -c : c;\n\n#endif /* FT_MULFIX_ASSEMBLER */\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Long )\n  FT_DivFix( FT_Long  a,\n             FT_Long  b )\n  {\n    FT_Int   s = 1;\n    FT_Long  q;\n\n\n    FT_MOVE_SIGN( a, s );\n    FT_MOVE_SIGN( b, s );\n\n    q = (FT_Long)( b > 0 ? ( ( (FT_UInt64)a << 16 ) + ( b >> 1 ) ) / b\n                         : 0x7FFFFFFFL );\n\n    return s < 0 ? -q : q;\n  }\n\n\n#else /* !FT_LONG64 */\n\n\n  static void\n  ft_multo64( FT_UInt32  x,\n              FT_UInt32  y,\n              FT_Int64  *z )\n  {\n    FT_UInt32  lo1, hi1, lo2, hi2, lo, hi, i1, i2;\n\n\n    lo1 = x & 0x0000FFFFU;  hi1 = x >> 16;\n    lo2 = y & 0x0000FFFFU;  hi2 = y >> 16;\n\n    lo = lo1 * lo2;\n    i1 = lo1 * hi2;\n    i2 = lo2 * hi1;\n    hi = hi1 * hi2;\n\n    /* Check carry overflow of i1 + i2 */\n    i1 += i2;\n    hi += (FT_UInt32)( i1 < i2 ) << 16;\n\n    hi += i1 >> 16;\n    i1  = i1 << 16;\n\n    /* Check carry overflow of i1 + lo */\n    lo += i1;\n    hi += ( lo < i1 );\n\n    z->lo = lo;\n    z->hi = hi;\n  }\n\n\n  static FT_UInt32\n  ft_div64by32( FT_UInt32  hi,\n                FT_UInt32  lo,\n                FT_UInt32  y )\n  {\n    FT_UInt32  r, q;\n    FT_Int     i;\n\n\n    if ( hi >= y )\n      return (FT_UInt32)0x7FFFFFFFL;\n\n    /* We shift as many bits as we can into the high register, perform     */\n    /* 32-bit division with modulo there, then work through the remaining  */\n    /* bits with long division. This optimization is especially noticeable */\n    /* for smaller dividends that barely use the high register.            */\n\n    i = 31 - FT_MSB( hi );\n    r = ( hi << i ) | ( lo >> ( 32 - i ) ); lo <<= i; /* left 64-bit shift */\n    q = r / y;\n    r -= q * y;   /* remainder */\n\n    i = 32 - i;   /* bits remaining in low register */\n    do\n    {\n      q <<= 1;\n      r   = ( r << 1 ) | ( lo >> 31 ); lo <<= 1;\n\n      if ( r >= y )\n      {\n        r -= y;\n        q |= 1;\n      }\n    } while ( --i );\n\n    return q;\n  }\n\n\n  static void\n  FT_Add64( FT_Int64*  x,\n            FT_Int64*  y,\n            FT_Int64  *z )\n  {\n    FT_UInt32  lo, hi;\n\n\n    lo = x->lo + y->lo;\n    hi = x->hi + y->hi + ( lo < x->lo );\n\n    z->lo = lo;\n    z->hi = hi;\n  }\n\n\n  /*  The FT_MulDiv function has been optimized thanks to ideas from     */\n  /*  Graham Asher and Alexei Podtelezhnikov.  The trick is to optimize  */\n  /*  a rather common case when everything fits within 32-bits.          */\n  /*                                                                     */\n  /*  We compute 'a*b+c/2', then divide it by 'c' (all positive values). */\n  /*                                                                     */\n  /*  The product of two positive numbers never exceeds the square of    */\n  /*  its mean values.  Therefore, we always avoid the overflow by       */\n  /*  imposing                                                           */\n  /*                                                                     */\n  /*    (a + b) / 2 <= sqrt(X - c/2)    ,                                */\n  /*                                                                     */\n  /*  where X = 2^32 - 1, the maximum unsigned 32-bit value, and using   */\n  /*  unsigned arithmetic.  Now we replace `sqrt' with a linear function */\n  /*  that is smaller or equal for all values of c in the interval       */\n  /*  [0;X/2]; it should be equal to sqrt(X) and sqrt(3X/4) at the       */\n  /*  endpoints.  Substituting the linear solution and explicit numbers  */\n  /*  we get                                                             */\n  /*                                                                     */\n  /*    a + b <= 131071.99 - c / 122291.84    .                          */\n  /*                                                                     */\n  /*  In practice, we should use a faster and even stronger inequality   */\n  /*                                                                     */\n  /*    a + b <= 131071 - (c >> 16)                                      */\n  /*                                                                     */\n  /*  or, alternatively,                                                 */\n  /*                                                                     */\n  /*    a + b <= 129894 - (c >> 17)    .                                 */\n  /*                                                                     */\n  /*  FT_MulFix, on the other hand, is optimized for a small value of    */\n  /*  the first argument, when the second argument can be much larger.   */\n  /*  This can be achieved by scaling the second argument and the limit  */\n  /*  in the above inequalities.  For example,                           */\n  /*                                                                     */\n  /*    a + (b >> 8) <= (131071 >> 4)                                    */\n  /*                                                                     */\n  /*  covers the practical range of use. The actual test below is a bit  */\n  /*  tighter to avoid the border case overflows.                        */\n  /*                                                                     */\n  /*  In the case of FT_DivFix, the exact overflow check                 */\n  /*                                                                     */\n  /*    a << 16 <= X - c/2                                               */\n  /*                                                                     */\n  /*  is scaled down by 2^16 and we use                                  */\n  /*                                                                     */\n  /*    a <= 65535 - (c >> 17)    .                                      */\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Long )\n  FT_MulDiv( FT_Long  a,\n             FT_Long  b,\n             FT_Long  c )\n  {\n    FT_Int  s = 1;\n\n\n    /* XXX: this function does not allow 64-bit arguments */\n    if ( a == 0 || b == c )\n      return a;\n\n    FT_MOVE_SIGN( a, s );\n    FT_MOVE_SIGN( b, s );\n    FT_MOVE_SIGN( c, s );\n\n    if ( c == 0 )\n      a = 0x7FFFFFFFL;\n\n    else if ( (FT_ULong)a + b <= 129894UL - ( c >> 17 ) )\n      a = ( (FT_ULong)a * b + ( c >> 1 ) ) / c;\n\n    else\n    {\n      FT_Int64  temp, temp2;\n\n\n      ft_multo64( a, b, &temp );\n\n      temp2.hi = 0;\n      temp2.lo = c >> 1;\n\n      FT_Add64( &temp, &temp2, &temp );\n\n      /* last attempt to ditch long division */\n      a = temp.hi == 0 ? temp.lo / c\n                       : ft_div64by32( temp.hi, temp.lo, c );\n    }\n\n    return s < 0 ? -a : a;\n  }\n\n\n  FT_BASE_DEF( FT_Long )\n  FT_MulDiv_No_Round( FT_Long  a,\n                      FT_Long  b,\n                      FT_Long  c )\n  {\n    FT_Int  s = 1;\n\n\n    if ( a == 0 || b == c )\n      return a;\n\n    FT_MOVE_SIGN( a, s );\n    FT_MOVE_SIGN( b, s );\n    FT_MOVE_SIGN( c, s );\n\n    if ( c == 0 )\n      a = 0x7FFFFFFFL;\n\n    else if ( (FT_ULong)a + b <= 131071UL )\n      a = (FT_ULong)a * b / c;\n\n    else\n    {\n      FT_Int64  temp;\n\n\n      ft_multo64( a, b, &temp );\n\n      /* last attempt to ditch long division */\n      a = temp.hi == 0 ? temp.lo / c\n                       : ft_div64by32( temp.hi, temp.lo, c );\n    }\n\n    return s < 0 ? -a : a;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Long )\n  FT_MulFix( FT_Long  a,\n             FT_Long  b )\n  {\n#ifdef FT_MULFIX_ASSEMBLER\n\n    return FT_MULFIX_ASSEMBLER( a, b );\n\n#elif 0\n\n    /*\n     *  This code is nonportable.  See comment below.\n     *\n     *  However, on a platform where right-shift of a signed quantity fills\n     *  the leftmost bits by copying the sign bit, it might be faster.\n     */\n\n    FT_Long   sa, sb;\n    FT_ULong  ua, ub;\n\n\n    if ( a == 0 || b == 0x10000L )\n      return a;\n\n    /*\n     *  This is a clever way of converting a signed number `a' into its\n     *  absolute value (stored back into `a') and its sign.  The sign is\n     *  stored in `sa'; 0 means `a' was positive or zero, and -1 means `a'\n     *  was negative.  (Similarly for `b' and `sb').\n     *\n     *  Unfortunately, it doesn't work (at least not portably).\n     *\n     *  It makes the assumption that right-shift on a negative signed value\n     *  fills the leftmost bits by copying the sign bit.  This is wrong.\n     *  According to K&R 2nd ed, section `A7.8 Shift Operators' on page 206,\n     *  the result of right-shift of a negative signed value is\n     *  implementation-defined.  At least one implementation fills the\n     *  leftmost bits with 0s (i.e., it is exactly the same as an unsigned\n     *  right shift).  This means that when `a' is negative, `sa' ends up\n     *  with the value 1 rather than -1.  After that, everything else goes\n     *  wrong.\n     */\n    sa = ( a >> ( sizeof ( a ) * 8 - 1 ) );\n    a  = ( a ^ sa ) - sa;\n    sb = ( b >> ( sizeof ( b ) * 8 - 1 ) );\n    b  = ( b ^ sb ) - sb;\n\n    ua = (FT_ULong)a;\n    ub = (FT_ULong)b;\n\n    if ( ua + ( ub >> 8 ) <= 8190UL )\n      ua = ( ua * ub + 0x8000U ) >> 16;\n    else\n    {\n      FT_ULong  al = ua & 0xFFFFU;\n\n\n      ua = ( ua >> 16 ) * ub +  al * ( ub >> 16 ) +\n           ( ( al * ( ub & 0xFFFFU ) + 0x8000U ) >> 16 );\n    }\n\n    sa ^= sb,\n    ua  = (FT_ULong)(( ua ^ sa ) - sa);\n\n    return (FT_Long)ua;\n\n#else /* 0 */\n\n    FT_Int    s = 1;\n    FT_ULong  ua, ub;\n\n\n    if ( a == 0 || b == 0x10000L )\n      return a;\n\n    FT_MOVE_SIGN( a, s );\n    FT_MOVE_SIGN( b, s );\n\n    ua = (FT_ULong)a;\n    ub = (FT_ULong)b;\n\n    if ( ua + ( ub >> 8 ) <= 8190UL )\n      ua = ( ua * ub + 0x8000UL ) >> 16;\n    else\n    {\n      FT_ULong  al = ua & 0xFFFFUL;\n\n\n      ua = ( ua >> 16 ) * ub +  al * ( ub >> 16 ) +\n           ( ( al * ( ub & 0xFFFFUL ) + 0x8000UL ) >> 16 );\n    }\n\n    return s < 0 ? -(FT_Long)ua : (FT_Long)ua;\n\n#endif /* 0 */\n\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Long )\n  FT_DivFix( FT_Long  a,\n             FT_Long  b )\n  {\n    FT_Int   s = 1;\n    FT_Long  q;\n\n\n    /* XXX: this function does not allow 64-bit arguments */\n\n    FT_MOVE_SIGN( a, s );\n    FT_MOVE_SIGN( b, s );\n\n    if ( b == 0 )\n    {\n      /* check for division by 0 */\n      q = 0x7FFFFFFFL;\n    }\n    else if ( a <= 65535L - ( b >> 17 ) )\n    {\n      /* compute result directly */\n      q = (FT_Long)( ( ( (FT_ULong)a << 16 ) + ( b >> 1 ) ) / b );\n    }\n    else\n    {\n      /* we need more bits; we have to do it by hand */\n      FT_Int64  temp, temp2;\n\n\n      temp.hi  = a >> 16;\n      temp.lo  = a << 16;\n      temp2.hi = 0;\n      temp2.lo = b >> 1;\n\n      FT_Add64( &temp, &temp2, &temp );\n      q = (FT_Long)ft_div64by32( temp.hi, temp.lo, b );\n    }\n\n    return s < 0 ? -q : q;\n  }\n\n\n#endif /* FT_LONG64 */\n\n\n  /* documentation is in ftglyph.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Matrix_Multiply( const FT_Matrix*  a,\n                      FT_Matrix        *b )\n  {\n    FT_Fixed  xx, xy, yx, yy;\n\n\n    if ( !a || !b )\n      return;\n\n    xx = FT_MulFix( a->xx, b->xx ) + FT_MulFix( a->xy, b->yx );\n    xy = FT_MulFix( a->xx, b->xy ) + FT_MulFix( a->xy, b->yy );\n    yx = FT_MulFix( a->yx, b->xx ) + FT_MulFix( a->yy, b->yx );\n    yy = FT_MulFix( a->yx, b->xy ) + FT_MulFix( a->yy, b->yy );\n\n    b->xx = xx;  b->xy = xy;\n    b->yx = yx;  b->yy = yy;\n  }\n\n\n  /* documentation is in ftglyph.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Matrix_Invert( FT_Matrix*  matrix )\n  {\n    FT_Pos  delta, xx, yy;\n\n\n    if ( !matrix )\n      return FT_THROW( Invalid_Argument );\n\n    /* compute discriminant */\n    delta = FT_MulFix( matrix->xx, matrix->yy ) -\n            FT_MulFix( matrix->xy, matrix->yx );\n\n    if ( !delta )\n      return FT_THROW( Invalid_Argument );  /* matrix can't be inverted */\n\n    matrix->xy = - FT_DivFix( matrix->xy, delta );\n    matrix->yx = - FT_DivFix( matrix->yx, delta );\n\n    xx = matrix->xx;\n    yy = matrix->yy;\n\n    matrix->xx = FT_DivFix( yy, delta );\n    matrix->yy = FT_DivFix( xx, delta );\n\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in ftcalc.h */\n\n  FT_BASE_DEF( void )\n  FT_Matrix_Multiply_Scaled( const FT_Matrix*  a,\n                             FT_Matrix        *b,\n                             FT_Long           scaling )\n  {\n    FT_Fixed  xx, xy, yx, yy;\n\n    FT_Long   val = 0x10000L * scaling;\n\n\n    if ( !a || !b )\n      return;\n\n    xx = FT_MulDiv( a->xx, b->xx, val ) + FT_MulDiv( a->xy, b->yx, val );\n    xy = FT_MulDiv( a->xx, b->xy, val ) + FT_MulDiv( a->xy, b->yy, val );\n    yx = FT_MulDiv( a->yx, b->xx, val ) + FT_MulDiv( a->yy, b->yx, val );\n    yy = FT_MulDiv( a->yx, b->xy, val ) + FT_MulDiv( a->yy, b->yy, val );\n\n    b->xx = xx;  b->xy = xy;\n    b->yx = yx;  b->yy = yy;\n  }\n\n\n  /* documentation is in ftcalc.h */\n\n  FT_BASE_DEF( void )\n  FT_Vector_Transform_Scaled( FT_Vector*        vector,\n                              const FT_Matrix*  matrix,\n                              FT_Long           scaling )\n  {\n    FT_Pos   xz, yz;\n\n    FT_Long  val = 0x10000L * scaling;\n\n\n    if ( !vector || !matrix )\n      return;\n\n    xz = FT_MulDiv( vector->x, matrix->xx, val ) +\n         FT_MulDiv( vector->y, matrix->xy, val );\n\n    yz = FT_MulDiv( vector->x, matrix->yx, val ) +\n         FT_MulDiv( vector->y, matrix->yy, val );\n\n    vector->x = xz;\n    vector->y = yz;\n  }\n\n\n#if 0\n\n  /* documentation is in ftcalc.h */\n\n  FT_BASE_DEF( FT_Int32 )\n  FT_SqrtFixed( FT_Int32  x )\n  {\n    FT_UInt32  root, rem_hi, rem_lo, test_div;\n    FT_Int     count;\n\n\n    root = 0;\n\n    if ( x > 0 )\n    {\n      rem_hi = 0;\n      rem_lo = x;\n      count  = 24;\n      do\n      {\n        rem_hi   = ( rem_hi << 2 ) | ( rem_lo >> 30 );\n        rem_lo <<= 2;\n        root   <<= 1;\n        test_div = ( root << 1 ) + 1;\n\n        if ( rem_hi >= test_div )\n        {\n          rem_hi -= test_div;\n          root   += 1;\n        }\n      } while ( --count );\n    }\n\n    return (FT_Int32)root;\n  }\n\n#endif /* 0 */\n\n\n  /* documentation is in ftcalc.h */\n\n  FT_BASE_DEF( FT_Int )\n  ft_corner_orientation( FT_Pos  in_x,\n                         FT_Pos  in_y,\n                         FT_Pos  out_x,\n                         FT_Pos  out_y )\n  {\n    FT_Long  result; /* avoid overflow on 16-bit system */\n\n\n    /* deal with the trivial cases quickly */\n    if ( in_y == 0 )\n    {\n      if ( in_x >= 0 )\n        result = out_y;\n      else\n        result = -out_y;\n    }\n    else if ( in_x == 0 )\n    {\n      if ( in_y >= 0 )\n        result = -out_x;\n      else\n        result = out_x;\n    }\n    else if ( out_y == 0 )\n    {\n      if ( out_x >= 0 )\n        result = in_y;\n      else\n        result = -in_y;\n    }\n    else if ( out_x == 0 )\n    {\n      if ( out_y >= 0 )\n        result = -in_x;\n      else\n        result =  in_x;\n    }\n    else /* general case */\n    {\n#ifdef FT_LONG64\n\n      FT_Int64  delta = (FT_Int64)in_x * out_y - (FT_Int64)in_y * out_x;\n\n\n      if ( delta == 0 )\n        result = 0;\n      else\n        result = 1 - 2 * ( delta < 0 );\n\n#else\n\n      FT_Int64  z1, z2;\n\n\n      /* XXX: this function does not allow 64-bit arguments */\n      ft_multo64( (FT_Int32)in_x, (FT_Int32)out_y, &z1 );\n      ft_multo64( (FT_Int32)in_y, (FT_Int32)out_x, &z2 );\n\n      if ( z1.hi > z2.hi )\n        result = +1;\n      else if ( z1.hi < z2.hi )\n        result = -1;\n      else if ( z1.lo > z2.lo )\n        result = +1;\n      else if ( z1.lo < z2.lo )\n        result = -1;\n      else\n        result = 0;\n\n#endif\n    }\n\n    /* XXX: only the sign of return value, +1/0/-1 must be used */\n    return (FT_Int)result;\n  }\n\n\n  /* documentation is in ftcalc.h */\n\n  FT_BASE_DEF( FT_Int )\n  ft_corner_is_flat( FT_Pos  in_x,\n                     FT_Pos  in_y,\n                     FT_Pos  out_x,\n                     FT_Pos  out_y )\n  {\n    FT_Pos  ax = in_x + out_x;\n    FT_Pos  ay = in_y + out_y;\n\n    FT_Pos  d_in, d_out, d_hypot;\n\n\n    /* The idea of this function is to compare the length of the */\n    /* hypotenuse with the `in' and `out' length.  The `corner'  */\n    /* represented by `in' and `out' is flat if the hypotenuse's */\n    /* length isn't too large.                                   */\n    /*                                                           */\n    /* This approach has the advantage that the angle between    */\n    /* `in' and `out' is not checked.  In case one of the two    */\n    /* vectors is `dominant', this is, much larger than the      */\n    /* other vector, we thus always have a flat corner.          */\n    /*                                                           */\n    /*                hypotenuse                                 */\n    /*       x---------------------------x                       */\n    /*        \\                      /                           */\n    /*         \\                /                                */\n    /*      in  \\          /  out                                */\n    /*           \\    /                                          */\n    /*            o                                              */\n    /*              Point                                        */\n\n    d_in    = FT_HYPOT(  in_x,  in_y );\n    d_out   = FT_HYPOT( out_x, out_y );\n    d_hypot = FT_HYPOT(    ax,    ay );\n\n    /* now do a simple length comparison: */\n    /*                                    */\n    /*   d_in + d_out < 17/16 d_hypot     */\n\n    return ( d_in + d_out - d_hypot ) < ( d_hypot >> 4 );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftcid.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcid.c                                                                */\n/*                                                                         */\n/*    FreeType API for accessing CID font information.                     */\n/*                                                                         */\n/*  Copyright 2007, 2009, 2013 by Derek Clegg, Michael Toftdal.            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_CID_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_CID_H\n\n\n  /* documentation is in ftcid.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_CID_Registry_Ordering_Supplement( FT_Face       face,\n                                           const char*  *registry,\n                                           const char*  *ordering,\n                                           FT_Int       *supplement)\n  {\n    FT_Error     error;\n    const char*  r = NULL;\n    const char*  o = NULL;\n    FT_Int       s = 0;\n\n\n    error = FT_ERR( Invalid_Argument );\n\n    if ( face )\n    {\n      FT_Service_CID  service;\n\n\n      FT_FACE_FIND_SERVICE( face, service, CID );\n\n      if ( service && service->get_ros )\n        error = service->get_ros( face, &r, &o, &s );\n    }\n\n    if ( registry )\n      *registry = r;\n\n    if ( ordering )\n      *ordering = o;\n\n    if ( supplement )\n      *supplement = s;\n\n    return error;\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_CID_Is_Internally_CID_Keyed( FT_Face   face,\n                                      FT_Bool  *is_cid )\n  {\n    FT_Error  error = FT_ERR( Invalid_Argument );\n    FT_Bool   ic = 0;\n\n\n    if ( face )\n    {\n      FT_Service_CID  service;\n\n\n      FT_FACE_FIND_SERVICE( face, service, CID );\n\n      if ( service && service->get_is_cid )\n        error = service->get_is_cid( face, &ic);\n    }\n\n    if ( is_cid )\n      *is_cid = ic;\n\n    return error;\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_CID_From_Glyph_Index( FT_Face   face,\n                               FT_UInt   glyph_index,\n                               FT_UInt  *cid )\n  {\n    FT_Error  error = FT_ERR( Invalid_Argument );\n    FT_UInt   c = 0;\n\n\n    if ( face )\n    {\n      FT_Service_CID  service;\n\n\n      FT_FACE_FIND_SERVICE( face, service, CID );\n\n      if ( service && service->get_cid_from_glyph_index )\n        error = service->get_cid_from_glyph_index( face, glyph_index, &c);\n    }\n\n    if ( cid )\n      *cid = c;\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftdbgmem.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftdbgmem.c                                                             */\n/*                                                                         */\n/*    Memory debugger (body).                                              */\n/*                                                                         */\n/*  Copyright 2001-2006, 2009, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_MEMORY_H\n#include FT_SYSTEM_H\n#include FT_ERRORS_H\n#include FT_TYPES_H\n\n\n#ifdef FT_DEBUG_MEMORY\n\n#define  KEEPALIVE /* `Keep alive' means that freed blocks aren't released\n                    * to the heap.  This is useful to detect double-frees\n                    * or weird heap corruption, but it uses large amounts of\n                    * memory, however.\n                    */\n\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n  FT_BASE_DEF( const char* )  _ft_debug_file   = 0;\n  FT_BASE_DEF( long )         _ft_debug_lineno = 0;\n\n  extern void\n  FT_DumpMemory( FT_Memory  memory );\n\n\n  typedef struct FT_MemSourceRec_*  FT_MemSource;\n  typedef struct FT_MemNodeRec_*    FT_MemNode;\n  typedef struct FT_MemTableRec_*   FT_MemTable;\n\n\n#define FT_MEM_VAL( addr )  ((FT_PtrDist)(FT_Pointer)( addr ))\n\n  /*\n   *  This structure holds statistics for a single allocation/release\n   *  site.  This is useful to know where memory operations happen the\n   *  most.\n   */\n  typedef struct  FT_MemSourceRec_\n  {\n    const char*   file_name;\n    long          line_no;\n\n    FT_Long       cur_blocks;   /* current number of allocated blocks */\n    FT_Long       max_blocks;   /* max. number of allocated blocks    */\n    FT_Long       all_blocks;   /* total number of blocks allocated   */\n\n    FT_Long       cur_size;     /* current cumulative allocated size */\n    FT_Long       max_size;     /* maximum cumulative allocated size */\n    FT_Long       all_size;     /* total cumulative allocated size   */\n\n    FT_Long       cur_max;      /* current maximum allocated size */\n\n    FT_UInt32     hash;\n    FT_MemSource  link;\n\n  } FT_MemSourceRec;\n\n\n  /*\n   *  We don't need a resizable array for the memory sources, because\n   *  their number is pretty limited within FreeType.\n   */\n#define FT_MEM_SOURCE_BUCKETS  128\n\n  /*\n   *  This structure holds information related to a single allocated\n   *  memory block.  If KEEPALIVE is defined, blocks that are freed by\n   *  FreeType are never released to the system.  Instead, their `size'\n   *  field is set to -size.  This is mainly useful to detect double frees,\n   *  at the price of large memory footprint during execution.\n   */\n  typedef struct  FT_MemNodeRec_\n  {\n    FT_Byte*      address;\n    FT_Long       size;     /* < 0 if the block was freed */\n\n    FT_MemSource  source;\n\n#ifdef KEEPALIVE\n    const char*   free_file_name;\n    FT_Long       free_line_no;\n#endif\n\n    FT_MemNode    link;\n\n  } FT_MemNodeRec;\n\n\n  /*\n   *  The global structure, containing compound statistics and all hash\n   *  tables.\n   */\n  typedef struct  FT_MemTableRec_\n  {\n    FT_ULong         size;\n    FT_ULong         nodes;\n    FT_MemNode*      buckets;\n\n    FT_ULong         alloc_total;\n    FT_ULong         alloc_current;\n    FT_ULong         alloc_max;\n    FT_ULong         alloc_count;\n\n    FT_Bool          bound_total;\n    FT_ULong         alloc_total_max;\n\n    FT_Bool          bound_count;\n    FT_ULong         alloc_count_max;\n\n    FT_MemSource     sources[FT_MEM_SOURCE_BUCKETS];\n\n    FT_Bool          keep_alive;\n\n    FT_Memory        memory;\n    FT_Pointer       memory_user;\n    FT_Alloc_Func    alloc;\n    FT_Free_Func     free;\n    FT_Realloc_Func  realloc;\n\n  } FT_MemTableRec;\n\n\n#define FT_MEM_SIZE_MIN  7\n#define FT_MEM_SIZE_MAX  13845163\n\n#define FT_FILENAME( x )  ((x) ? (x) : \"unknown file\")\n\n\n  /*\n   *  Prime numbers are ugly to handle.  It would be better to implement\n   *  L-Hashing, which is 10% faster and doesn't require divisions.\n   */\n  static const FT_UInt  ft_mem_primes[] =\n  {\n    7,\n    11,\n    19,\n    37,\n    73,\n    109,\n    163,\n    251,\n    367,\n    557,\n    823,\n    1237,\n    1861,\n    2777,\n    4177,\n    6247,\n    9371,\n    14057,\n    21089,\n    31627,\n    47431,\n    71143,\n    106721,\n    160073,\n    240101,\n    360163,\n    540217,\n    810343,\n    1215497,\n    1823231,\n    2734867,\n    4102283,\n    6153409,\n    9230113,\n    13845163,\n  };\n\n\n  static FT_ULong\n  ft_mem_closest_prime( FT_ULong  num )\n  {\n    FT_UInt  i;\n\n\n    for ( i = 0;\n          i < sizeof ( ft_mem_primes ) / sizeof ( ft_mem_primes[0] ); i++ )\n      if ( ft_mem_primes[i] > num )\n        return ft_mem_primes[i];\n\n    return FT_MEM_SIZE_MAX;\n  }\n\n\n  extern void\n  ft_mem_debug_panic( const char*  fmt,\n                      ... )\n  {\n    va_list  ap;\n\n\n    printf( \"FreeType.Debug: \" );\n\n    va_start( ap, fmt );\n    vprintf( fmt, ap );\n    va_end( ap );\n\n    printf( \"\\n\" );\n    exit( EXIT_FAILURE );\n  }\n\n\n  static FT_Pointer\n  ft_mem_table_alloc( FT_MemTable  table,\n                      FT_Long      size )\n  {\n    FT_Memory   memory = table->memory;\n    FT_Pointer  block;\n\n\n    memory->user = table->memory_user;\n    block = table->alloc( memory, size );\n    memory->user = table;\n\n    return block;\n  }\n\n\n  static void\n  ft_mem_table_free( FT_MemTable  table,\n                     FT_Pointer   block )\n  {\n    FT_Memory  memory = table->memory;\n\n\n    memory->user = table->memory_user;\n    table->free( memory, block );\n    memory->user = table;\n  }\n\n\n  static void\n  ft_mem_table_resize( FT_MemTable  table )\n  {\n    FT_ULong  new_size;\n\n\n    new_size = ft_mem_closest_prime( table->nodes );\n    if ( new_size != table->size )\n    {\n      FT_MemNode*  new_buckets;\n      FT_ULong     i;\n\n\n      new_buckets = (FT_MemNode *)\n                      ft_mem_table_alloc( table,\n                                          new_size * sizeof ( FT_MemNode ) );\n      if ( new_buckets == NULL )\n        return;\n\n      FT_ARRAY_ZERO( new_buckets, new_size );\n\n      for ( i = 0; i < table->size; i++ )\n      {\n        FT_MemNode  node, next, *pnode;\n        FT_PtrDist  hash;\n\n\n        node = table->buckets[i];\n        while ( node )\n        {\n          next  = node->link;\n          hash  = FT_MEM_VAL( node->address ) % new_size;\n          pnode = new_buckets + hash;\n\n          node->link = pnode[0];\n          pnode[0]   = node;\n\n          node = next;\n        }\n      }\n\n      if ( table->buckets )\n        ft_mem_table_free( table, table->buckets );\n\n      table->buckets = new_buckets;\n      table->size    = new_size;\n    }\n  }\n\n\n  static FT_MemTable\n  ft_mem_table_new( FT_Memory  memory )\n  {\n    FT_MemTable  table;\n\n\n    table = (FT_MemTable)memory->alloc( memory, sizeof ( *table ) );\n    if ( table == NULL )\n      goto Exit;\n\n    FT_ZERO( table );\n\n    table->size  = FT_MEM_SIZE_MIN;\n    table->nodes = 0;\n\n    table->memory = memory;\n\n    table->memory_user = memory->user;\n\n    table->alloc   = memory->alloc;\n    table->realloc = memory->realloc;\n    table->free    = memory->free;\n\n    table->buckets = (FT_MemNode *)\n                       memory->alloc( memory,\n                                      table->size * sizeof ( FT_MemNode ) );\n    if ( table->buckets )\n      FT_ARRAY_ZERO( table->buckets, table->size );\n    else\n    {\n      memory->free( memory, table );\n      table = NULL;\n    }\n\n  Exit:\n    return table;\n  }\n\n\n  static void\n  ft_mem_table_destroy( FT_MemTable  table )\n  {\n    FT_ULong  i;\n    FT_Long   leak_count = 0;\n    FT_ULong  leaks      = 0;\n\n\n    FT_DumpMemory( table->memory );\n\n    /* remove all blocks from the table, revealing leaked ones */\n    for ( i = 0; i < table->size; i++ )\n    {\n      FT_MemNode  *pnode = table->buckets + i, next, node = *pnode;\n\n\n      while ( node )\n      {\n        next       = node->link;\n        node->link = 0;\n\n        if ( node->size > 0 )\n        {\n          printf(\n            \"leaked memory block at address %p, size %8ld in (%s:%ld)\\n\",\n            node->address, node->size,\n            FT_FILENAME( node->source->file_name ),\n            node->source->line_no );\n\n          leak_count++;\n          leaks += node->size;\n\n          ft_mem_table_free( table, node->address );\n        }\n\n        node->address = NULL;\n        node->size    = 0;\n\n        ft_mem_table_free( table, node );\n        node = next;\n      }\n      table->buckets[i] = 0;\n    }\n\n    ft_mem_table_free( table, table->buckets );\n    table->buckets = NULL;\n\n    table->size  = 0;\n    table->nodes = 0;\n\n    /* remove all sources */\n    for ( i = 0; i < FT_MEM_SOURCE_BUCKETS; i++ )\n    {\n      FT_MemSource  source, next;\n\n\n      for ( source = table->sources[i]; source != NULL; source = next )\n      {\n        next = source->link;\n        ft_mem_table_free( table, source );\n      }\n\n      table->sources[i] = NULL;\n    }\n\n    printf( \"FreeType: total memory allocations = %ld\\n\",\n            table->alloc_total );\n    printf( \"FreeType: maximum memory footprint = %ld\\n\",\n            table->alloc_max );\n\n    ft_mem_table_free( table, table );\n\n    if ( leak_count > 0 )\n      ft_mem_debug_panic(\n        \"FreeType: %ld bytes of memory leaked in %ld blocks\\n\",\n        leaks, leak_count );\n\n    printf( \"FreeType: no memory leaks detected\\n\" );\n  }\n\n\n  static FT_MemNode*\n  ft_mem_table_get_nodep( FT_MemTable  table,\n                          FT_Byte*     address )\n  {\n    FT_PtrDist   hash;\n    FT_MemNode  *pnode, node;\n\n\n    hash  = FT_MEM_VAL( address );\n    pnode = table->buckets + ( hash % table->size );\n\n    for (;;)\n    {\n      node = pnode[0];\n      if ( !node )\n        break;\n\n      if ( node->address == address )\n        break;\n\n      pnode = &node->link;\n    }\n    return pnode;\n  }\n\n\n  static FT_MemSource\n  ft_mem_table_get_source( FT_MemTable  table )\n  {\n    FT_UInt32     hash;\n    FT_MemSource  node, *pnode;\n\n\n    /* cast to FT_PtrDist first since void* can be larger */\n    /* than FT_UInt32 and GCC 4.1.1 emits a warning       */\n    hash  = (FT_UInt32)(FT_PtrDist)(void*)_ft_debug_file +\n              (FT_UInt32)( 5 * _ft_debug_lineno );\n    pnode = &table->sources[hash % FT_MEM_SOURCE_BUCKETS];\n\n    for ( ;; )\n    {\n      node = *pnode;\n      if ( node == NULL )\n        break;\n\n      if ( node->file_name == _ft_debug_file &&\n           node->line_no   == _ft_debug_lineno   )\n        goto Exit;\n\n      pnode = &node->link;\n    }\n\n    node = (FT_MemSource)ft_mem_table_alloc( table, sizeof ( *node ) );\n    if ( node == NULL )\n      ft_mem_debug_panic(\n        \"not enough memory to perform memory debugging\\n\" );\n\n    node->file_name = _ft_debug_file;\n    node->line_no   = _ft_debug_lineno;\n\n    node->cur_blocks = 0;\n    node->max_blocks = 0;\n    node->all_blocks = 0;\n\n    node->cur_size   = 0;\n    node->max_size   = 0;\n    node->all_size   = 0;\n\n    node->cur_max    = 0;\n\n    node->link = NULL;\n    node->hash = hash;\n    *pnode     = node;\n\n  Exit:\n    return node;\n  }\n\n\n  static void\n  ft_mem_table_set( FT_MemTable  table,\n                    FT_Byte*     address,\n                    FT_ULong     size,\n                    FT_Long      delta )\n  {\n    FT_MemNode  *pnode, node;\n\n\n    if ( table )\n    {\n      FT_MemSource  source;\n\n\n      pnode = ft_mem_table_get_nodep( table, address );\n      node  = *pnode;\n      if ( node )\n      {\n        if ( node->size < 0 )\n        {\n          /* This block was already freed.  Our memory is now completely */\n          /* corrupted!                                                  */\n          /* This can only happen in keep-alive mode.                    */\n          ft_mem_debug_panic(\n            \"memory heap corrupted (allocating freed block)\" );\n        }\n        else\n        {\n          /* This block was already allocated.  This means that our memory */\n          /* is also corrupted!                                            */\n          ft_mem_debug_panic(\n            \"memory heap corrupted (re-allocating allocated block at\"\n            \" %p, of size %ld)\\n\"\n            \"org=%s:%d new=%s:%d\\n\",\n            node->address, node->size,\n            FT_FILENAME( node->source->file_name ), node->source->line_no,\n            FT_FILENAME( _ft_debug_file ), _ft_debug_lineno );\n        }\n      }\n\n      /* we need to create a new node in this table */\n      node = (FT_MemNode)ft_mem_table_alloc( table, sizeof ( *node ) );\n      if ( node == NULL )\n        ft_mem_debug_panic( \"not enough memory to run memory tests\" );\n\n      node->address = address;\n      node->size    = size;\n      node->source  = source = ft_mem_table_get_source( table );\n\n      if ( delta == 0 )\n      {\n        /* this is an allocation */\n        source->all_blocks++;\n        source->cur_blocks++;\n        if ( source->cur_blocks > source->max_blocks )\n          source->max_blocks = source->cur_blocks;\n      }\n\n      if ( size > (FT_ULong)source->cur_max )\n        source->cur_max = size;\n\n      if ( delta != 0 )\n      {\n        /* we are growing or shrinking a reallocated block */\n        source->cur_size     += delta;\n        table->alloc_current += delta;\n      }\n      else\n      {\n        /* we are allocating a new block */\n        source->cur_size     += size;\n        table->alloc_current += size;\n      }\n\n      source->all_size += size;\n\n      if ( source->cur_size > source->max_size )\n        source->max_size = source->cur_size;\n\n      node->free_file_name = NULL;\n      node->free_line_no   = 0;\n\n      node->link = pnode[0];\n\n      pnode[0] = node;\n      table->nodes++;\n\n      table->alloc_total += size;\n\n      if ( table->alloc_current > table->alloc_max )\n        table->alloc_max = table->alloc_current;\n\n      if ( table->nodes * 3 < table->size  ||\n           table->size  * 3 < table->nodes )\n        ft_mem_table_resize( table );\n    }\n  }\n\n\n  static void\n  ft_mem_table_remove( FT_MemTable  table,\n                       FT_Byte*     address,\n                       FT_Long      delta )\n  {\n    if ( table )\n    {\n      FT_MemNode  *pnode, node;\n\n\n      pnode = ft_mem_table_get_nodep( table, address );\n      node  = *pnode;\n      if ( node )\n      {\n        FT_MemSource  source;\n\n\n        if ( node->size < 0 )\n          ft_mem_debug_panic(\n            \"freeing memory block at %p more than once at (%s:%ld)\\n\"\n            \"block allocated at (%s:%ld) and released at (%s:%ld)\",\n            address,\n            FT_FILENAME( _ft_debug_file ), _ft_debug_lineno,\n            FT_FILENAME( node->source->file_name ), node->source->line_no,\n            FT_FILENAME( node->free_file_name ), node->free_line_no );\n\n        /* scramble the node's content for additional safety */\n        FT_MEM_SET( address, 0xF3, node->size );\n\n        if ( delta == 0 )\n        {\n          source = node->source;\n\n          source->cur_blocks--;\n          source->cur_size -= node->size;\n\n          table->alloc_current -= node->size;\n        }\n\n        if ( table->keep_alive )\n        {\n          /* we simply invert the node's size to indicate that the node */\n          /* was freed.                                                 */\n          node->size           = -node->size;\n          node->free_file_name = _ft_debug_file;\n          node->free_line_no   = _ft_debug_lineno;\n        }\n        else\n        {\n          table->nodes--;\n\n          *pnode = node->link;\n\n          node->size   = 0;\n          node->source = NULL;\n\n          ft_mem_table_free( table, node );\n\n          if ( table->nodes * 3 < table->size  ||\n               table->size  * 3 < table->nodes )\n            ft_mem_table_resize( table );\n        }\n      }\n      else\n        ft_mem_debug_panic(\n          \"trying to free unknown block at %p in (%s:%ld)\\n\",\n          address,\n          FT_FILENAME( _ft_debug_file ), _ft_debug_lineno );\n    }\n  }\n\n\n  extern FT_Pointer\n  ft_mem_debug_alloc( FT_Memory  memory,\n                      FT_Long    size )\n  {\n    FT_MemTable  table = (FT_MemTable)memory->user;\n    FT_Byte*     block;\n\n\n    if ( size <= 0 )\n      ft_mem_debug_panic( \"negative block size allocation (%ld)\", size );\n\n    /* return NULL if the maximum number of allocations was reached */\n    if ( table->bound_count                           &&\n         table->alloc_count >= table->alloc_count_max )\n      return NULL;\n\n    /* return NULL if this allocation would overflow the maximum heap size */\n    if ( table->bound_total                                             &&\n         table->alloc_total_max - table->alloc_current > (FT_ULong)size )\n      return NULL;\n\n    block = (FT_Byte *)ft_mem_table_alloc( table, size );\n    if ( block )\n    {\n      ft_mem_table_set( table, block, (FT_ULong)size, 0 );\n\n      table->alloc_count++;\n    }\n\n    _ft_debug_file   = \"<unknown>\";\n    _ft_debug_lineno = 0;\n\n    return (FT_Pointer)block;\n  }\n\n\n  extern void\n  ft_mem_debug_free( FT_Memory   memory,\n                     FT_Pointer  block )\n  {\n    FT_MemTable  table = (FT_MemTable)memory->user;\n\n\n    if ( block == NULL )\n      ft_mem_debug_panic( \"trying to free NULL in (%s:%ld)\",\n                          FT_FILENAME( _ft_debug_file ),\n                          _ft_debug_lineno );\n\n    ft_mem_table_remove( table, (FT_Byte*)block, 0 );\n\n    if ( !table->keep_alive )\n      ft_mem_table_free( table, block );\n\n    table->alloc_count--;\n\n    _ft_debug_file   = \"<unknown>\";\n    _ft_debug_lineno = 0;\n  }\n\n\n  extern FT_Pointer\n  ft_mem_debug_realloc( FT_Memory   memory,\n                        FT_Long     cur_size,\n                        FT_Long     new_size,\n                        FT_Pointer  block )\n  {\n    FT_MemTable  table = (FT_MemTable)memory->user;\n    FT_MemNode   node, *pnode;\n    FT_Pointer   new_block;\n    FT_Long      delta;\n\n    const char*  file_name = FT_FILENAME( _ft_debug_file );\n    FT_Long      line_no   = _ft_debug_lineno;\n\n\n    /* unlikely, but possible */\n    if ( new_size == cur_size )\n      return block;\n\n    /* the following is valid according to ANSI C */\n#if 0\n    if ( block == NULL || cur_size == 0 )\n      ft_mem_debug_panic( \"trying to reallocate NULL in (%s:%ld)\",\n                          file_name, line_no );\n#endif\n\n    /* while the following is allowed in ANSI C also, we abort since */\n    /* such case should be handled by FreeType.                      */\n    if ( new_size <= 0 )\n      ft_mem_debug_panic(\n        \"trying to reallocate %p to size 0 (current is %ld) in (%s:%ld)\",\n        block, cur_size, file_name, line_no );\n\n    /* check `cur_size' value */\n    pnode = ft_mem_table_get_nodep( table, (FT_Byte*)block );\n    node  = *pnode;\n    if ( !node )\n      ft_mem_debug_panic(\n        \"trying to reallocate unknown block at %p in (%s:%ld)\",\n        block, file_name, line_no );\n\n    if ( node->size <= 0 )\n      ft_mem_debug_panic(\n        \"trying to reallocate freed block at %p in (%s:%ld)\",\n        block, file_name, line_no );\n\n    if ( node->size != cur_size )\n      ft_mem_debug_panic( \"invalid ft_realloc request for %p. cur_size is \"\n                          \"%ld instead of %ld in (%s:%ld)\",\n                          block, cur_size, node->size, file_name, line_no );\n\n    /* return NULL if the maximum number of allocations was reached */\n    if ( table->bound_count                           &&\n         table->alloc_count >= table->alloc_count_max )\n      return NULL;\n\n    delta = (FT_Long)( new_size - cur_size );\n\n    /* return NULL if this allocation would overflow the maximum heap size */\n    if ( delta > 0                                                       &&\n         table->bound_total                                              &&\n         table->alloc_current + (FT_ULong)delta > table->alloc_total_max )\n      return NULL;\n\n    new_block = (FT_Byte *)ft_mem_table_alloc( table, new_size );\n    if ( new_block == NULL )\n      return NULL;\n\n    ft_mem_table_set( table, (FT_Byte*)new_block, new_size, delta );\n\n    ft_memcpy( new_block, block, cur_size < new_size ? cur_size : new_size );\n\n    ft_mem_table_remove( table, (FT_Byte*)block, delta );\n\n    _ft_debug_file   = \"<unknown>\";\n    _ft_debug_lineno = 0;\n\n    if ( !table->keep_alive )\n      ft_mem_table_free( table, block );\n\n    return new_block;\n  }\n\n\n  extern FT_Int\n  ft_mem_debug_init( FT_Memory  memory )\n  {\n    FT_MemTable  table;\n    FT_Int       result = 0;\n\n\n    if ( getenv( \"FT2_DEBUG_MEMORY\" ) )\n    {\n      table = ft_mem_table_new( memory );\n      if ( table )\n      {\n        const char*  p;\n\n\n        memory->user    = table;\n        memory->alloc   = ft_mem_debug_alloc;\n        memory->realloc = ft_mem_debug_realloc;\n        memory->free    = ft_mem_debug_free;\n\n        p = getenv( \"FT2_ALLOC_TOTAL_MAX\" );\n        if ( p != NULL )\n        {\n          FT_Long   total_max = ft_atol( p );\n\n\n          if ( total_max > 0 )\n          {\n            table->bound_total     = 1;\n            table->alloc_total_max = (FT_ULong)total_max;\n          }\n        }\n\n        p = getenv( \"FT2_ALLOC_COUNT_MAX\" );\n        if ( p != NULL )\n        {\n          FT_Long  total_count = ft_atol( p );\n\n\n          if ( total_count > 0 )\n          {\n            table->bound_count     = 1;\n            table->alloc_count_max = (FT_ULong)total_count;\n          }\n        }\n\n        p = getenv( \"FT2_KEEP_ALIVE\" );\n        if ( p != NULL )\n        {\n          FT_Long  keep_alive = ft_atol( p );\n\n\n          if ( keep_alive > 0 )\n            table->keep_alive = 1;\n        }\n\n        result = 1;\n      }\n    }\n    return result;\n  }\n\n\n  extern void\n  ft_mem_debug_done( FT_Memory  memory )\n  {\n    FT_MemTable  table = (FT_MemTable)memory->user;\n\n\n    if ( table )\n    {\n      memory->free    = table->free;\n      memory->realloc = table->realloc;\n      memory->alloc   = table->alloc;\n\n      ft_mem_table_destroy( table );\n      memory->user = NULL;\n    }\n  }\n\n\n\n  static int\n  ft_mem_source_compare( const void*  p1,\n                         const void*  p2 )\n  {\n    FT_MemSource  s1 = *(FT_MemSource*)p1;\n    FT_MemSource  s2 = *(FT_MemSource*)p2;\n\n\n    if ( s2->max_size > s1->max_size )\n      return 1;\n    else if ( s2->max_size < s1->max_size )\n      return -1;\n    else\n      return 0;\n  }\n\n\n  extern void\n  FT_DumpMemory( FT_Memory  memory )\n  {\n    FT_MemTable  table = (FT_MemTable)memory->user;\n\n\n    if ( table )\n    {\n      FT_MemSource*  bucket = table->sources;\n      FT_MemSource*  limit  = bucket + FT_MEM_SOURCE_BUCKETS;\n      FT_MemSource*  sources;\n      FT_UInt        nn, count;\n      const char*    fmt;\n\n\n      count = 0;\n      for ( ; bucket < limit; bucket++ )\n      {\n        FT_MemSource  source = *bucket;\n\n\n        for ( ; source; source = source->link )\n          count++;\n      }\n\n      sources = (FT_MemSource*)ft_mem_table_alloc(\n                                 table, sizeof ( *sources ) * count );\n\n      count = 0;\n      for ( bucket = table->sources; bucket < limit; bucket++ )\n      {\n        FT_MemSource  source = *bucket;\n\n\n        for ( ; source; source = source->link )\n          sources[count++] = source;\n      }\n\n      ft_qsort( sources, count, sizeof ( *sources ), ft_mem_source_compare );\n\n      printf( \"FreeType Memory Dump: \"\n              \"current=%ld max=%ld total=%ld count=%ld\\n\",\n              table->alloc_current, table->alloc_max,\n              table->alloc_total, table->alloc_count );\n      printf( \" block  block    sizes    sizes    sizes   source\\n\" );\n      printf( \" count   high      sum  highsum      max   location\\n\" );\n      printf( \"-------------------------------------------------\\n\" );\n\n      fmt = \"%6ld %6ld %8ld %8ld %8ld %s:%d\\n\";\n\n      for ( nn = 0; nn < count; nn++ )\n      {\n        FT_MemSource  source = sources[nn];\n\n\n        printf( fmt,\n                source->cur_blocks, source->max_blocks,\n                source->cur_size, source->max_size, source->cur_max,\n                FT_FILENAME( source->file_name ),\n                source->line_no );\n      }\n      printf( \"------------------------------------------------\\n\" );\n\n      ft_mem_table_free( table, sources );\n    }\n  }\n\n#else  /* !FT_DEBUG_MEMORY */\n\n  /* ANSI C doesn't like empty source files */\n  typedef int  _debug_mem_dummy;\n\n#endif /* !FT_DEBUG_MEMORY */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftdebug.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftdebug.c                                                              */\n/*                                                                         */\n/*    Debugging and logging component (body).                              */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2004, 2008, 2013 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This component contains various macros and functions used to ease the */\n  /* debugging of the FreeType engine.  Its main purpose is in assertion   */\n  /* checking, tracing, and error detection.                               */\n  /*                                                                       */\n  /* There are now three debugging modes:                                  */\n  /*                                                                       */\n  /* - trace mode                                                          */\n  /*                                                                       */\n  /*   Error and trace messages are sent to the log file (which can be the */\n  /*   standard error output).                                             */\n  /*                                                                       */\n  /* - error mode                                                          */\n  /*                                                                       */\n  /*   Only error messages are generated.                                  */\n  /*                                                                       */\n  /* - release mode:                                                       */\n  /*                                                                       */\n  /*   No error message is sent or generated.  The code is free from any   */\n  /*   debugging parts.                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_DEBUG_H\n\n\n#ifdef FT_DEBUG_LEVEL_ERROR\n\n  /* documentation is in ftdebug.h */\n\n  FT_BASE_DEF( void )\n  FT_Message( const char*  fmt,\n              ... )\n  {\n    va_list  ap;\n\n\n    va_start( ap, fmt );\n    vfprintf( stderr, fmt, ap );\n    va_end( ap );\n  }\n\n\n  /* documentation is in ftdebug.h */\n\n  FT_BASE_DEF( void )\n  FT_Panic( const char*  fmt,\n            ... )\n  {\n    va_list  ap;\n\n\n    va_start( ap, fmt );\n    vfprintf( stderr, fmt, ap );\n    va_end( ap );\n\n    exit( EXIT_FAILURE );\n  }\n\n\n  /* documentation is in ftdebug.h */\n\n  FT_BASE_DEF( int )\n  FT_Throw( FT_Error     error,\n            int          line,\n            const char*  file )\n  {\n    FT_UNUSED( error );\n    FT_UNUSED( line );\n    FT_UNUSED( file );\n\n    return 0;\n  }\n\n#endif /* FT_DEBUG_LEVEL_ERROR */\n\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n  /* array of trace levels, initialized to 0 */\n  int  ft_trace_levels[trace_count];\n\n\n  /* define array of trace toggle names */\n#define FT_TRACE_DEF( x )  #x ,\n\n  static const char*  ft_trace_toggles[trace_count + 1] =\n  {\n#include FT_INTERNAL_TRACE_H\n    NULL\n  };\n\n#undef FT_TRACE_DEF\n\n\n  /* documentation is in ftdebug.h */\n\n  FT_BASE_DEF( FT_Int )\n  FT_Trace_Get_Count( void )\n  {\n    return trace_count;\n  }\n\n\n  /* documentation is in ftdebug.h */\n\n  FT_BASE_DEF( const char * )\n  FT_Trace_Get_Name( FT_Int  idx )\n  {\n    int  max = FT_Trace_Get_Count();\n\n\n    if ( idx < max )\n      return ft_trace_toggles[idx];\n    else\n      return NULL;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Initialize the tracing sub-system.  This is done by retrieving the    */\n  /* value of the `FT2_DEBUG' environment variable.  It must be a list of  */\n  /* toggles, separated by spaces, `;', or `,'.  Example:                  */\n  /*                                                                       */\n  /*    export FT2_DEBUG=\"any:3 memory:7 stream:5\"                         */\n  /*                                                                       */\n  /* This requests that all levels be set to 3, except the trace level for */\n  /* the memory and stream components which are set to 7 and 5,            */\n  /* respectively.                                                         */\n  /*                                                                       */\n  /* See the file <include/internal/fttrace.h> for details of the          */\n  /* available toggle names.                                               */\n  /*                                                                       */\n  /* The level must be between 0 and 7; 0 means quiet (except for serious  */\n  /* runtime errors), and 7 means _very_ verbose.                          */\n  /*                                                                       */\n  FT_BASE_DEF( void )\n  ft_debug_init( void )\n  {\n    const char*  ft2_debug = getenv( \"FT2_DEBUG\" );\n\n\n    if ( ft2_debug )\n    {\n      const char*  p = ft2_debug;\n      const char*  q;\n\n\n      for ( ; *p; p++ )\n      {\n        /* skip leading whitespace and separators */\n        if ( *p == ' ' || *p == '\\t' || *p == ',' || *p == ';' || *p == '=' )\n          continue;\n\n        /* read toggle name, followed by ':' */\n        q = p;\n        while ( *p && *p != ':' )\n          p++;\n\n        if ( !*p )\n          break;\n\n        if ( *p == ':' && p > q )\n        {\n          FT_Int  n, i, len = (FT_Int)( p - q );\n          FT_Int  level = -1, found = -1;\n\n\n          for ( n = 0; n < trace_count; n++ )\n          {\n            const char*  toggle = ft_trace_toggles[n];\n\n\n            for ( i = 0; i < len; i++ )\n            {\n              if ( toggle[i] != q[i] )\n                break;\n            }\n\n            if ( i == len && toggle[i] == 0 )\n            {\n              found = n;\n              break;\n            }\n          }\n\n          /* read level */\n          p++;\n          if ( *p )\n          {\n            level = *p - '0';\n            if ( level < 0 || level > 7 )\n              level = -1;\n          }\n\n          if ( found >= 0 && level >= 0 )\n          {\n            if ( found == trace_any )\n            {\n              /* special case for `any' */\n              for ( n = 0; n < trace_count; n++ )\n                ft_trace_levels[n] = level;\n            }\n            else\n              ft_trace_levels[found] = level;\n          }\n        }\n      }\n    }\n  }\n\n\n#else  /* !FT_DEBUG_LEVEL_TRACE */\n\n\n  FT_BASE_DEF( void )\n  ft_debug_init( void )\n  {\n    /* nothing */\n  }\n\n\n  FT_BASE_DEF( FT_Int )\n  FT_Trace_Get_Count( void )\n  {\n    return 0;\n  }\n\n\n  FT_BASE_DEF( const char * )\n  FT_Trace_Get_Name( FT_Int  idx )\n  {\n    FT_UNUSED( idx );\n\n    return NULL;\n  }\n\n\n#endif /* !FT_DEBUG_LEVEL_TRACE */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftfstype.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftfstype.c                                                             */\n/*                                                                         */\n/*    FreeType utility file to access FSType data (body).                  */\n/*                                                                         */\n/*  Copyright 2008, 2009, 2014 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#include <ft2build.h>\n#include FT_TYPE1_TABLES_H\n#include FT_TRUETYPE_TABLES_H\n#include FT_INTERNAL_SERVICE_H\n#include FT_SERVICE_POSTSCRIPT_INFO_H\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_UShort )\n  FT_Get_FSType_Flags( FT_Face  face )\n  {\n    TT_OS2*  os2;\n\n\n    /* first, try to get the fs_type directly from the font */\n    if ( face )\n    {\n      FT_Service_PsInfo  service = NULL;\n\n\n      FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );\n\n      if ( service && service->ps_get_font_extra )\n      {\n        PS_FontExtraRec  extra;\n\n\n        if ( !service->ps_get_font_extra( face, &extra ) &&\n             extra.fs_type != 0                          )\n          return extra.fs_type;\n      }\n    }\n\n    /* look at FSType before fsType for Type42 */\n\n    if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, FT_SFNT_OS2 ) ) != NULL &&\n         os2->version != 0xFFFFU                                           )\n      return os2->fsType;\n\n    return 0;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftgasp.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgasp.c                                                               */\n/*                                                                         */\n/*    Access of TrueType's `gasp' table (body).                            */\n/*                                                                         */\n/*  Copyright 2007 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_GASP_H\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n\n\n  FT_EXPORT_DEF( FT_Int )\n  FT_Get_Gasp( FT_Face  face,\n               FT_UInt  ppem )\n  {\n    FT_Int  result = FT_GASP_NO_TABLE;\n\n\n    if ( face && FT_IS_SFNT( face ) )\n    {\n      TT_Face  ttface = (TT_Face)face;\n\n\n      if ( ttface->gasp.numRanges > 0 )\n      {\n        TT_GaspRange  range     = ttface->gasp.gaspRanges;\n        TT_GaspRange  range_end = range + ttface->gasp.numRanges;\n\n\n        while ( ppem > range->maxPPEM )\n        {\n          range++;\n          if ( range >= range_end )\n            goto Exit;\n        }\n\n        result = range->gaspFlag;\n\n        /* ensure that we don't have spurious bits */\n        if ( ttface->gasp.version == 0 )\n          result &= 3;\n      }\n    }\n  Exit:\n    return result;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftgloadr.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgloadr.c                                                             */\n/*                                                                         */\n/*    The FreeType glyph loader (body).                                    */\n/*                                                                         */\n/*  Copyright 2002-2006, 2010, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg                       */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_GLYPH_LOADER_H\n#include FT_INTERNAL_MEMORY_H\n#include FT_INTERNAL_OBJECTS_H\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gloader\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                                                               *****/\n  /*****                    G L Y P H   L O A D E R                    *****/\n  /*****                                                               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The glyph loader is a simple object which is used to load a set of    */\n  /* glyphs easily.  It is critical for the correct loading of composites. */\n  /*                                                                       */\n  /* Ideally, one can see it as a stack of abstract `glyph' objects.       */\n  /*                                                                       */\n  /*   loader.base     Is really the bottom of the stack.  It describes a  */\n  /*                   single glyph image made of the juxtaposition of     */\n  /*                   several glyphs (those `in the stack').              */\n  /*                                                                       */\n  /*   loader.current  Describes the top of the stack, on which a new      */\n  /*                   glyph can be loaded.                                */\n  /*                                                                       */\n  /*   Rewind          Clears the stack.                                   */\n  /*   Prepare         Set up `loader.current' for addition of a new glyph */\n  /*                   image.                                              */\n  /*   Add             Add the `current' glyph image to the `base' one,    */\n  /*                   and prepare for another one.                        */\n  /*                                                                       */\n  /* The glyph loader is now a base object.  Each driver used to           */\n  /* re-implement it in one way or the other, which wasted code and        */\n  /* energy.                                                               */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* create a new glyph loader */\n  FT_BASE_DEF( FT_Error )\n  FT_GlyphLoader_New( FT_Memory        memory,\n                      FT_GlyphLoader  *aloader )\n  {\n    FT_GlyphLoader  loader = NULL;\n    FT_Error        error;\n\n\n    if ( !FT_NEW( loader ) )\n    {\n      loader->memory = memory;\n      *aloader       = loader;\n    }\n    return error;\n  }\n\n\n  /* rewind the glyph loader - reset counters to 0 */\n  FT_BASE_DEF( void )\n  FT_GlyphLoader_Rewind( FT_GlyphLoader  loader )\n  {\n    FT_GlyphLoad  base    = &loader->base;\n    FT_GlyphLoad  current = &loader->current;\n\n\n    base->outline.n_points   = 0;\n    base->outline.n_contours = 0;\n    base->num_subglyphs      = 0;\n\n    *current = *base;\n  }\n\n\n  /* reset the glyph loader, frees all allocated tables */\n  /* and starts from zero                               */\n  FT_BASE_DEF( void )\n  FT_GlyphLoader_Reset( FT_GlyphLoader  loader )\n  {\n    FT_Memory memory = loader->memory;\n\n\n    FT_FREE( loader->base.outline.points );\n    FT_FREE( loader->base.outline.tags );\n    FT_FREE( loader->base.outline.contours );\n    FT_FREE( loader->base.extra_points );\n    FT_FREE( loader->base.subglyphs );\n\n    loader->base.extra_points2 = NULL;\n\n    loader->max_points    = 0;\n    loader->max_contours  = 0;\n    loader->max_subglyphs = 0;\n\n    FT_GlyphLoader_Rewind( loader );\n  }\n\n\n  /* delete a glyph loader */\n  FT_BASE_DEF( void )\n  FT_GlyphLoader_Done( FT_GlyphLoader  loader )\n  {\n    if ( loader )\n    {\n      FT_Memory memory = loader->memory;\n\n\n      FT_GlyphLoader_Reset( loader );\n      FT_FREE( loader );\n    }\n  }\n\n\n  /* re-adjust the `current' outline fields */\n  static void\n  FT_GlyphLoader_Adjust_Points( FT_GlyphLoader  loader )\n  {\n    FT_Outline*  base    = &loader->base.outline;\n    FT_Outline*  current = &loader->current.outline;\n\n\n    current->points   = base->points   + base->n_points;\n    current->tags     = base->tags     + base->n_points;\n    current->contours = base->contours + base->n_contours;\n\n    /* handle extra points table - if any */\n    if ( loader->use_extra )\n    {\n      loader->current.extra_points  = loader->base.extra_points +\n                                      base->n_points;\n\n      loader->current.extra_points2 = loader->base.extra_points2 +\n                                      base->n_points;\n    }\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_GlyphLoader_CreateExtra( FT_GlyphLoader  loader )\n  {\n    FT_Error   error;\n    FT_Memory  memory = loader->memory;\n\n\n    if ( !FT_NEW_ARRAY( loader->base.extra_points, 2 * loader->max_points ) )\n    {\n      loader->use_extra          = 1;\n      loader->base.extra_points2 = loader->base.extra_points +\n                                   loader->max_points;\n\n      FT_GlyphLoader_Adjust_Points( loader );\n    }\n    return error;\n  }\n\n\n  /* re-adjust the `current' subglyphs field */\n  static void\n  FT_GlyphLoader_Adjust_Subglyphs( FT_GlyphLoader  loader )\n  {\n    FT_GlyphLoad  base    = &loader->base;\n    FT_GlyphLoad  current = &loader->current;\n\n\n    current->subglyphs = base->subglyphs + base->num_subglyphs;\n  }\n\n\n  /* Ensure that we can add `n_points' and `n_contours' to our glyph.      */\n  /* This function reallocates its outline tables if necessary.  Note that */\n  /* it DOESN'T change the number of points within the loader!             */\n  /*                                                                       */\n  FT_BASE_DEF( FT_Error )\n  FT_GlyphLoader_CheckPoints( FT_GlyphLoader  loader,\n                              FT_UInt         n_points,\n                              FT_UInt         n_contours )\n  {\n    FT_Memory    memory  = loader->memory;\n    FT_Error     error   = FT_Err_Ok;\n    FT_Outline*  base    = &loader->base.outline;\n    FT_Outline*  current = &loader->current.outline;\n    FT_Bool      adjust  = 0;\n\n    FT_UInt      new_max, old_max;\n\n\n    /* check points & tags */\n    new_max = base->n_points + current->n_points + n_points;\n    old_max = loader->max_points;\n\n    if ( new_max > old_max )\n    {\n      new_max = FT_PAD_CEIL( new_max, 8 );\n\n      if ( new_max > FT_OUTLINE_POINTS_MAX )\n        return FT_THROW( Array_Too_Large );\n\n      if ( FT_RENEW_ARRAY( base->points, old_max, new_max ) ||\n           FT_RENEW_ARRAY( base->tags,   old_max, new_max ) )\n        goto Exit;\n\n      if ( loader->use_extra )\n      {\n        if ( FT_RENEW_ARRAY( loader->base.extra_points,\n                             old_max * 2, new_max * 2 ) )\n          goto Exit;\n\n        FT_ARRAY_MOVE( loader->base.extra_points + new_max,\n                       loader->base.extra_points + old_max,\n                       old_max );\n\n        loader->base.extra_points2 = loader->base.extra_points + new_max;\n      }\n\n      adjust = 1;\n      loader->max_points = new_max;\n    }\n\n    /* check contours */\n    old_max = loader->max_contours;\n    new_max = base->n_contours + current->n_contours +\n              n_contours;\n    if ( new_max > old_max )\n    {\n      new_max = FT_PAD_CEIL( new_max, 4 );\n\n      if ( new_max > FT_OUTLINE_CONTOURS_MAX )\n        return FT_THROW( Array_Too_Large );\n\n      if ( FT_RENEW_ARRAY( base->contours, old_max, new_max ) )\n        goto Exit;\n\n      adjust = 1;\n      loader->max_contours = new_max;\n    }\n\n    if ( adjust )\n      FT_GlyphLoader_Adjust_Points( loader );\n\n  Exit:\n    if ( error )\n      FT_GlyphLoader_Reset( loader );\n\n    return error;\n  }\n\n\n  /* Ensure that we can add `n_subglyphs' to our glyph. this function */\n  /* reallocates its subglyphs table if necessary.  Note that it DOES */\n  /* NOT change the number of subglyphs within the loader!            */\n  /*                                                                  */\n  FT_BASE_DEF( FT_Error )\n  FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader  loader,\n                                 FT_UInt         n_subs )\n  {\n    FT_Memory     memory = loader->memory;\n    FT_Error      error  = FT_Err_Ok;\n    FT_UInt       new_max, old_max;\n\n    FT_GlyphLoad  base    = &loader->base;\n    FT_GlyphLoad  current = &loader->current;\n\n\n    new_max = base->num_subglyphs + current->num_subglyphs + n_subs;\n    old_max = loader->max_subglyphs;\n    if ( new_max > old_max )\n    {\n      new_max = FT_PAD_CEIL( new_max, 2 );\n      if ( FT_RENEW_ARRAY( base->subglyphs, old_max, new_max ) )\n        goto Exit;\n\n      loader->max_subglyphs = new_max;\n\n      FT_GlyphLoader_Adjust_Subglyphs( loader );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* prepare loader for the addition of a new glyph on top of the base one */\n  FT_BASE_DEF( void )\n  FT_GlyphLoader_Prepare( FT_GlyphLoader  loader )\n  {\n    FT_GlyphLoad  current = &loader->current;\n\n\n    current->outline.n_points   = 0;\n    current->outline.n_contours = 0;\n    current->num_subglyphs      = 0;\n\n    FT_GlyphLoader_Adjust_Points   ( loader );\n    FT_GlyphLoader_Adjust_Subglyphs( loader );\n  }\n\n\n  /* add current glyph to the base image -- and prepare for another */\n  FT_BASE_DEF( void )\n  FT_GlyphLoader_Add( FT_GlyphLoader  loader )\n  {\n    FT_GlyphLoad  base;\n    FT_GlyphLoad  current;\n\n    FT_UInt       n_curr_contours;\n    FT_UInt       n_base_points;\n    FT_UInt       n;\n\n\n    if ( !loader )\n      return;\n\n    base    = &loader->base;\n    current = &loader->current;\n\n    n_curr_contours = current->outline.n_contours;\n    n_base_points   = base->outline.n_points;\n\n    base->outline.n_points =\n      (short)( base->outline.n_points + current->outline.n_points );\n    base->outline.n_contours =\n      (short)( base->outline.n_contours + current->outline.n_contours );\n\n    base->num_subglyphs += current->num_subglyphs;\n\n    /* adjust contours count in newest outline */\n    for ( n = 0; n < n_curr_contours; n++ )\n      current->outline.contours[n] =\n        (short)( current->outline.contours[n] + n_base_points );\n\n    /* prepare for another new glyph image */\n    FT_GlyphLoader_Prepare( loader );\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_GlyphLoader_CopyPoints( FT_GlyphLoader  target,\n                             FT_GlyphLoader  source )\n  {\n    FT_Error  error;\n    FT_UInt   num_points   = source->base.outline.n_points;\n    FT_UInt   num_contours = source->base.outline.n_contours;\n\n\n    error = FT_GlyphLoader_CheckPoints( target, num_points, num_contours );\n    if ( !error )\n    {\n      FT_Outline*  out = &target->base.outline;\n      FT_Outline*  in  = &source->base.outline;\n\n\n      FT_ARRAY_COPY( out->points, in->points,\n                     num_points );\n      FT_ARRAY_COPY( out->tags, in->tags,\n                     num_points );\n      FT_ARRAY_COPY( out->contours, in->contours,\n                     num_contours );\n\n      /* do we need to copy the extra points? */\n      if ( target->use_extra && source->use_extra )\n      {\n        FT_ARRAY_COPY( target->base.extra_points, source->base.extra_points,\n                       num_points );\n        FT_ARRAY_COPY( target->base.extra_points2, source->base.extra_points2,\n                       num_points );\n      }\n\n      out->n_points   = (short)num_points;\n      out->n_contours = (short)num_contours;\n\n      FT_GlyphLoader_Adjust_Points( target );\n    }\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftglyph.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftglyph.c                                                              */\n/*                                                                         */\n/*    FreeType convenience functions to handle glyphs (body).              */\n/*                                                                         */\n/*  Copyright 1996-2005, 2007, 2008, 2010, 2012-2014 by                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  This file contains the definition of several convenience functions   */\n  /*  that can be used by client applications to easily retrieve glyph     */\n  /*  bitmaps and outlines from a given face.                              */\n  /*                                                                       */\n  /*  These functions should be optional if you are writing a font server  */\n  /*  or text layout engine on top of FreeType.  However, they are pretty  */\n  /*  handy for many other simple uses of the library.                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_GLYPH_H\n#include FT_OUTLINE_H\n#include FT_BITMAP_H\n#include FT_INTERNAL_OBJECTS_H\n\n#include \"basepic.h\"\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_glyph\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****   FT_BitmapGlyph support                                        ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_CALLBACK_DEF( FT_Error )\n  ft_bitmap_glyph_init( FT_Glyph      bitmap_glyph,\n                        FT_GlyphSlot  slot )\n  {\n    FT_BitmapGlyph  glyph   = (FT_BitmapGlyph)bitmap_glyph;\n    FT_Error        error   = FT_Err_Ok;\n    FT_Library      library = FT_GLYPH( glyph )->library;\n\n\n    if ( slot->format != FT_GLYPH_FORMAT_BITMAP )\n    {\n      error = FT_THROW( Invalid_Glyph_Format );\n      goto Exit;\n    }\n\n    glyph->left = slot->bitmap_left;\n    glyph->top  = slot->bitmap_top;\n\n    /* do lazy copying whenever possible */\n    if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )\n    {\n      glyph->bitmap = slot->bitmap;\n      slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;\n    }\n    else\n    {\n      FT_Bitmap_New( &glyph->bitmap );\n      error = FT_Bitmap_Copy( library, &slot->bitmap, &glyph->bitmap );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ft_bitmap_glyph_copy( FT_Glyph  bitmap_source,\n                        FT_Glyph  bitmap_target )\n  {\n    FT_Library      library = bitmap_source->library;\n    FT_BitmapGlyph  source  = (FT_BitmapGlyph)bitmap_source;\n    FT_BitmapGlyph  target  = (FT_BitmapGlyph)bitmap_target;\n\n\n    target->left = source->left;\n    target->top  = source->top;\n\n    return FT_Bitmap_Copy( library, &source->bitmap, &target->bitmap );\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  ft_bitmap_glyph_done( FT_Glyph  bitmap_glyph )\n  {\n    FT_BitmapGlyph  glyph   = (FT_BitmapGlyph)bitmap_glyph;\n    FT_Library      library = FT_GLYPH( glyph )->library;\n\n\n    FT_Bitmap_Done( library, &glyph->bitmap );\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  ft_bitmap_glyph_bbox( FT_Glyph  bitmap_glyph,\n                        FT_BBox*  cbox )\n  {\n    FT_BitmapGlyph  glyph = (FT_BitmapGlyph)bitmap_glyph;\n\n\n    cbox->xMin = glyph->left << 6;\n    cbox->xMax = cbox->xMin + ( glyph->bitmap.width << 6 );\n    cbox->yMax = glyph->top << 6;\n    cbox->yMin = cbox->yMax - ( glyph->bitmap.rows << 6 );\n  }\n\n\n  FT_DEFINE_GLYPH(ft_bitmap_glyph_class,\n    sizeof ( FT_BitmapGlyphRec ),\n    FT_GLYPH_FORMAT_BITMAP,\n\n    ft_bitmap_glyph_init,\n    ft_bitmap_glyph_done,\n    ft_bitmap_glyph_copy,\n    0,                          /* FT_Glyph_TransformFunc */\n    ft_bitmap_glyph_bbox,\n    0                           /* FT_Glyph_PrepareFunc   */\n  )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****   FT_OutlineGlyph support                                       ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ft_outline_glyph_init( FT_Glyph      outline_glyph,\n                         FT_GlyphSlot  slot )\n  {\n    FT_OutlineGlyph  glyph   = (FT_OutlineGlyph)outline_glyph;\n    FT_Error         error   = FT_Err_Ok;\n    FT_Library       library = FT_GLYPH( glyph )->library;\n    FT_Outline*      source  = &slot->outline;\n    FT_Outline*      target  = &glyph->outline;\n\n\n    /* check format in glyph slot */\n    if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )\n    {\n      error = FT_THROW( Invalid_Glyph_Format );\n      goto Exit;\n    }\n\n    /* allocate new outline */\n    error = FT_Outline_New( library, source->n_points, source->n_contours,\n                            &glyph->outline );\n    if ( error )\n      goto Exit;\n\n    FT_Outline_Copy( source, target );\n\n  Exit:\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  ft_outline_glyph_done( FT_Glyph  outline_glyph )\n  {\n    FT_OutlineGlyph  glyph = (FT_OutlineGlyph)outline_glyph;\n\n\n    FT_Outline_Done( FT_GLYPH( glyph )->library, &glyph->outline );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ft_outline_glyph_copy( FT_Glyph  outline_source,\n                         FT_Glyph  outline_target )\n  {\n    FT_OutlineGlyph  source  = (FT_OutlineGlyph)outline_source;\n    FT_OutlineGlyph  target  = (FT_OutlineGlyph)outline_target;\n    FT_Error         error;\n    FT_Library       library = FT_GLYPH( source )->library;\n\n\n    error = FT_Outline_New( library, source->outline.n_points,\n                            source->outline.n_contours, &target->outline );\n    if ( !error )\n      FT_Outline_Copy( &source->outline, &target->outline );\n\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  ft_outline_glyph_transform( FT_Glyph          outline_glyph,\n                              const FT_Matrix*  matrix,\n                              const FT_Vector*  delta )\n  {\n    FT_OutlineGlyph  glyph = (FT_OutlineGlyph)outline_glyph;\n\n\n    if ( matrix )\n      FT_Outline_Transform( &glyph->outline, matrix );\n\n    if ( delta )\n      FT_Outline_Translate( &glyph->outline, delta->x, delta->y );\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  ft_outline_glyph_bbox( FT_Glyph  outline_glyph,\n                         FT_BBox*  bbox )\n  {\n    FT_OutlineGlyph  glyph = (FT_OutlineGlyph)outline_glyph;\n\n\n    FT_Outline_Get_CBox( &glyph->outline, bbox );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ft_outline_glyph_prepare( FT_Glyph      outline_glyph,\n                            FT_GlyphSlot  slot )\n  {\n    FT_OutlineGlyph  glyph = (FT_OutlineGlyph)outline_glyph;\n\n\n    slot->format         = FT_GLYPH_FORMAT_OUTLINE;\n    slot->outline        = glyph->outline;\n    slot->outline.flags &= ~FT_OUTLINE_OWNER;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_GLYPH( ft_outline_glyph_class,\n    sizeof ( FT_OutlineGlyphRec ),\n    FT_GLYPH_FORMAT_OUTLINE,\n\n    ft_outline_glyph_init,\n    ft_outline_glyph_done,\n    ft_outline_glyph_copy,\n    ft_outline_glyph_transform,\n    ft_outline_glyph_bbox,\n    ft_outline_glyph_prepare\n  )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****   FT_Glyph class and API                                        ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n   static FT_Error\n   ft_new_glyph( FT_Library             library,\n                 const FT_Glyph_Class*  clazz,\n                 FT_Glyph*              aglyph )\n   {\n     FT_Memory  memory = library->memory;\n     FT_Error   error;\n     FT_Glyph   glyph  = NULL;\n\n\n     *aglyph = 0;\n\n     if ( !FT_ALLOC( glyph, clazz->glyph_size ) )\n     {\n       glyph->library = library;\n       glyph->clazz   = clazz;\n       glyph->format  = clazz->glyph_format;\n\n       *aglyph = glyph;\n     }\n\n     return error;\n   }\n\n\n  /* documentation is in ftglyph.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Glyph_Copy( FT_Glyph   source,\n                 FT_Glyph  *target )\n  {\n    FT_Glyph               copy;\n    FT_Error               error;\n    const FT_Glyph_Class*  clazz;\n\n\n    /* check arguments */\n    if ( !target || !source || !source->clazz )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    *target = NULL;\n\n    if ( !source || !source->clazz )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    clazz = source->clazz;\n    error = ft_new_glyph( source->library, clazz, &copy );\n    if ( error )\n      goto Exit;\n\n    copy->advance = source->advance;\n    copy->format  = source->format;\n\n    if ( clazz->glyph_copy )\n      error = clazz->glyph_copy( source, copy );\n\n    if ( error )\n      FT_Done_Glyph( copy );\n    else\n      *target = copy;\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftglyph.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_Glyph( FT_GlyphSlot  slot,\n                FT_Glyph     *aglyph )\n  {\n    FT_Library  library;\n    FT_Error    error;\n    FT_Glyph    glyph;\n\n    const FT_Glyph_Class*  clazz = NULL;\n\n\n    if ( !slot )\n      return FT_THROW( Invalid_Slot_Handle );\n\n    library = slot->library;\n\n    if ( !aglyph )\n      return FT_THROW( Invalid_Argument );\n\n    /* if it is a bitmap, that's easy :-) */\n    if ( slot->format == FT_GLYPH_FORMAT_BITMAP )\n      clazz = FT_BITMAP_GLYPH_CLASS_GET;\n\n    /* if it is an outline */\n    else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )\n      clazz = FT_OUTLINE_GLYPH_CLASS_GET;\n\n    else\n    {\n      /* try to find a renderer that supports the glyph image format */\n      FT_Renderer  render = FT_Lookup_Renderer( library, slot->format, 0 );\n\n\n      if ( render )\n        clazz = &render->glyph_class;\n    }\n\n    if ( !clazz )\n    {\n      error = FT_THROW( Invalid_Glyph_Format );\n      goto Exit;\n    }\n\n    /* create FT_Glyph object */\n    error = ft_new_glyph( library, clazz, &glyph );\n    if ( error )\n      goto Exit;\n\n    /* copy advance while converting it to 16.16 format */\n    glyph->advance.x = slot->advance.x << 10;\n    glyph->advance.y = slot->advance.y << 10;\n\n    /* now import the image from the glyph slot */\n    error = clazz->glyph_init( glyph, slot );\n\n    /* if an error occurred, destroy the glyph */\n    if ( error )\n      FT_Done_Glyph( glyph );\n    else\n      *aglyph = glyph;\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftglyph.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Glyph_Transform( FT_Glyph    glyph,\n                      FT_Matrix*  matrix,\n                      FT_Vector*  delta )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( !glyph || !glyph->clazz )\n      error = FT_THROW( Invalid_Argument );\n    else\n    {\n      const FT_Glyph_Class*  clazz = glyph->clazz;\n\n\n      if ( clazz->glyph_transform )\n      {\n        /* transform glyph image */\n        clazz->glyph_transform( glyph, matrix, delta );\n\n        /* transform advance vector */\n        if ( matrix )\n          FT_Vector_Transform( &glyph->advance, matrix );\n      }\n      else\n        error = FT_THROW( Invalid_Glyph_Format );\n    }\n    return error;\n  }\n\n\n  /* documentation is in ftglyph.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Glyph_Get_CBox( FT_Glyph  glyph,\n                     FT_UInt   bbox_mode,\n                     FT_BBox  *acbox )\n  {\n    const FT_Glyph_Class*  clazz;\n\n\n    if ( !acbox )\n      return;\n\n    acbox->xMin = acbox->yMin = acbox->xMax = acbox->yMax = 0;\n\n    if ( !glyph || !glyph->clazz )\n      return;\n\n    clazz = glyph->clazz;\n    if ( !clazz->glyph_bbox )\n      return;\n\n    /* retrieve bbox in 26.6 coordinates */\n    clazz->glyph_bbox( glyph, acbox );\n\n    /* perform grid fitting if needed */\n    if ( bbox_mode == FT_GLYPH_BBOX_GRIDFIT ||\n         bbox_mode == FT_GLYPH_BBOX_PIXELS  )\n    {\n      acbox->xMin = FT_PIX_FLOOR( acbox->xMin );\n      acbox->yMin = FT_PIX_FLOOR( acbox->yMin );\n      acbox->xMax = FT_PIX_CEIL( acbox->xMax );\n      acbox->yMax = FT_PIX_CEIL( acbox->yMax );\n    }\n\n    /* convert to integer pixels if needed */\n    if ( bbox_mode == FT_GLYPH_BBOX_TRUNCATE ||\n         bbox_mode == FT_GLYPH_BBOX_PIXELS   )\n    {\n      acbox->xMin >>= 6;\n      acbox->yMin >>= 6;\n      acbox->xMax >>= 6;\n      acbox->yMax >>= 6;\n    }\n  }\n\n\n  /* documentation is in ftglyph.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Glyph_To_Bitmap( FT_Glyph*       the_glyph,\n                      FT_Render_Mode  render_mode,\n                      FT_Vector*      origin,\n                      FT_Bool         destroy )\n  {\n    FT_GlyphSlotRec           dummy;\n    FT_GlyphSlot_InternalRec  dummy_internal;\n    FT_Error                  error = FT_Err_Ok;\n    FT_Glyph                  b, glyph;\n    FT_BitmapGlyph            bitmap = NULL;\n    const FT_Glyph_Class*     clazz;\n\n    /* FT_BITMAP_GLYPH_CLASS_GET dereferences `library' in PIC mode */\n    FT_Library                library;\n\n\n    /* check argument */\n    if ( !the_glyph )\n      goto Bad;\n    glyph = *the_glyph;\n    if ( !glyph )\n      goto Bad;\n\n    clazz   = glyph->clazz;\n    library = glyph->library;\n    if ( !library || !clazz )\n      goto Bad;\n\n    /* when called with a bitmap glyph, do nothing and return successfully */\n    if ( clazz == FT_BITMAP_GLYPH_CLASS_GET )\n      goto Exit;\n\n    if ( !clazz->glyph_prepare )\n      goto Bad;\n\n    /* we render the glyph into a glyph bitmap using a `dummy' glyph slot */\n    /* then calling FT_Render_Glyph_Internal()                            */\n\n    FT_MEM_ZERO( &dummy, sizeof ( dummy ) );\n    FT_MEM_ZERO( &dummy_internal, sizeof ( dummy_internal ) );\n    dummy.internal = &dummy_internal;\n    dummy.library  = library;\n    dummy.format   = clazz->glyph_format;\n\n    /* create result bitmap glyph */\n    error = ft_new_glyph( library, FT_BITMAP_GLYPH_CLASS_GET, &b );\n    if ( error )\n      goto Exit;\n    bitmap = (FT_BitmapGlyph)b;\n\n#if 1\n    /* if `origin' is set, translate the glyph image */\n    if ( origin )\n      FT_Glyph_Transform( glyph, 0, origin );\n#else\n    FT_UNUSED( origin );\n#endif\n\n    /* prepare dummy slot for rendering */\n    error = clazz->glyph_prepare( glyph, &dummy );\n    if ( !error )\n      error = FT_Render_Glyph_Internal( glyph->library, &dummy, render_mode );\n\n#if 1\n    if ( !destroy && origin )\n    {\n      FT_Vector  v;\n\n\n      v.x = -origin->x;\n      v.y = -origin->y;\n      FT_Glyph_Transform( glyph, 0, &v );\n    }\n#endif\n\n    if ( error )\n      goto Exit;\n\n    /* in case of success, copy the bitmap to the glyph bitmap */\n    error = ft_bitmap_glyph_init( (FT_Glyph)bitmap, &dummy );\n    if ( error )\n      goto Exit;\n\n    /* copy advance */\n    bitmap->root.advance = glyph->advance;\n\n    if ( destroy )\n      FT_Done_Glyph( glyph );\n\n    *the_glyph = FT_GLYPH( bitmap );\n\n  Exit:\n    if ( error && bitmap )\n      FT_Done_Glyph( FT_GLYPH( bitmap ) );\n\n    return error;\n\n  Bad:\n    error = FT_THROW( Invalid_Argument );\n    goto Exit;\n  }\n\n\n  /* documentation is in ftglyph.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Done_Glyph( FT_Glyph  glyph )\n  {\n    if ( glyph )\n    {\n      FT_Memory              memory = glyph->library->memory;\n      const FT_Glyph_Class*  clazz  = glyph->clazz;\n\n\n      if ( clazz->glyph_done )\n        clazz->glyph_done( glyph );\n\n      FT_FREE( glyph );\n    }\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftgxval.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgxval.c                                                              */\n/*                                                                         */\n/*    FreeType API for validating TrueTyepGX/AAT tables (body).            */\n/*                                                                         */\n/*  Copyright 2004-2006, 2010, 2013, 2014 by                               */\n/*  Masatake YAMATO, Redhat K.K,                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_GX_VALIDATE_H\n\n\n  /* documentation is in ftgxval.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_TrueTypeGX_Validate( FT_Face   face,\n                          FT_UInt   validation_flags,\n                          FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],\n                          FT_UInt   table_length )\n  {\n    FT_Service_GXvalidate  service;\n    FT_Error               error;\n\n\n    if ( !face )\n    {\n      error = FT_THROW( Invalid_Face_Handle );\n      goto Exit;\n    }\n\n    if ( !tables )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    FT_FACE_FIND_GLOBAL_SERVICE( face, service, GX_VALIDATE );\n\n    if ( service )\n      error = service->validate( face,\n                                 validation_flags,\n                                 tables,\n                                 table_length );\n    else\n      error = FT_THROW( Unimplemented_Feature );\n\n  Exit:\n    return error;\n  }\n\n\n  FT_EXPORT_DEF( void )\n  FT_TrueTypeGX_Free( FT_Face   face,\n                      FT_Bytes  table )\n  {\n    FT_Memory  memory;\n\n\n    if ( !face )\n      return;\n\n    memory = FT_FACE_MEMORY( face );\n\n    FT_FREE( table );\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_ClassicKern_Validate( FT_Face    face,\n                           FT_UInt    validation_flags,\n                           FT_Bytes  *ckern_table )\n  {\n    FT_Service_CKERNvalidate  service;\n    FT_Error                  error;\n\n\n    if ( !face )\n    {\n      error = FT_THROW( Invalid_Face_Handle );\n      goto Exit;\n    }\n\n    if ( !ckern_table )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    FT_FACE_FIND_GLOBAL_SERVICE( face, service, CLASSICKERN_VALIDATE );\n\n    if ( service )\n      error = service->validate( face,\n                                 validation_flags,\n                                 ckern_table );\n    else\n      error = FT_THROW( Unimplemented_Feature );\n\n  Exit:\n    return error;\n  }\n\n\n  FT_EXPORT_DEF( void )\n  FT_ClassicKern_Free( FT_Face   face,\n                       FT_Bytes  table )\n  {\n    FT_Memory  memory;\n\n\n    if ( !face )\n      return;\n\n    memory = FT_FACE_MEMORY( face );\n\n\n    FT_FREE( table );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftinit.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftinit.c                                                               */\n/*                                                                         */\n/*    FreeType initialization layer (body).                                */\n/*                                                                         */\n/*  Copyright 1996-2002, 2005, 2007, 2009, 2012-2014 by                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  The purpose of this file is to implement the following two           */\n  /*  functions:                                                           */\n  /*                                                                       */\n  /*  FT_Add_Default_Modules():                                            */\n  /*     This function is used to add the set of default modules to a      */\n  /*     fresh new library object.  The set is taken from the header file  */\n  /*     `config/ftmodule.h'.  See the document `FreeType 2.0 Build        */\n  /*     System' for more information.                                     */\n  /*                                                                       */\n  /*  FT_Init_FreeType():                                                  */\n  /*     This function creates a system object for the current platform,   */\n  /*     builds a library out of it, then calls FT_Default_Drivers().      */\n  /*                                                                       */\n  /*  Note that even if FT_Init_FreeType() uses the implementation of the  */\n  /*  system object defined at build time, client applications are still   */\n  /*  able to provide their own `ftsystem.c'.                              */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_MODULE_H\n#include \"basepic.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_init\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n\n#undef  FT_USE_MODULE\n#ifdef __cplusplus\n#define FT_USE_MODULE( type, x )  extern \"C\" const type  x;\n#else\n#define FT_USE_MODULE( type, x )  extern const type  x;\n#endif\n\n#include FT_CONFIG_MODULES_H\n\n#undef  FT_USE_MODULE\n#define FT_USE_MODULE( type, x )  (const FT_Module_Class*)&(x),\n\n  static\n  const FT_Module_Class*  const ft_default_modules[] =\n  {\n#include FT_CONFIG_MODULES_H\n    0\n  };\n\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n\n#ifdef __cplusplus\n#define FT_EXTERNC  extern \"C\"\n#else\n#define FT_EXTERNC  extern\n#endif\n\n  /* declare the module's class creation/destruction functions */\n#undef  FT_USE_MODULE\n#define FT_USE_MODULE( type, x )                            \\\n  FT_EXTERNC FT_Error                                       \\\n  FT_Create_Class_ ## x( FT_Library         library,        \\\n                         FT_Module_Class*  *output_class ); \\\n  FT_EXTERNC void                                           \\\n  FT_Destroy_Class_ ## x( FT_Library        library,        \\\n                          FT_Module_Class*  clazz );\n\n#include FT_CONFIG_MODULES_H\n\n  /* count all module classes */\n#undef  FT_USE_MODULE\n#define FT_USE_MODULE( type, x )  MODULE_CLASS_ ## x,\n\n  enum\n  {\n#include FT_CONFIG_MODULES_H\n    FT_NUM_MODULE_CLASSES\n  };\n\n  /* destroy all module classes */\n#undef  FT_USE_MODULE\n#define FT_USE_MODULE( type, x )                   \\\n  if ( classes[i] )                                \\\n  {                                                \\\n    FT_Destroy_Class_ ## x( library, classes[i] ); \\\n  }                                                \\\n  i++;\n\n\n  FT_BASE_DEF( void )\n  ft_destroy_default_module_classes( FT_Library  library )\n  {\n    FT_Module_Class*  *classes;\n    FT_Memory          memory;\n    FT_UInt            i;\n    BasePIC*           pic_container = (BasePIC*)library->pic_container.base;\n\n\n    if ( !pic_container->default_module_classes )\n      return;\n\n    memory  = library->memory;\n    classes = pic_container->default_module_classes;\n    i       = 0;\n\n#include FT_CONFIG_MODULES_H\n\n    FT_FREE( classes );\n    pic_container->default_module_classes = 0;\n  }\n\n\n  /* initialize all module classes and the pointer table */\n#undef  FT_USE_MODULE\n#define FT_USE_MODULE( type, x )                     \\\n  error = FT_Create_Class_ ## x( library, &clazz );  \\\n  if ( error )                                       \\\n    goto Exit;                                       \\\n  classes[i++] = clazz;\n\n\n  FT_BASE_DEF( FT_Error )\n  ft_create_default_module_classes( FT_Library  library )\n  {\n    FT_Error           error;\n    FT_Memory          memory;\n    FT_Module_Class*  *classes = NULL;\n    FT_Module_Class*   clazz;\n    FT_UInt            i;\n    BasePIC*           pic_container = (BasePIC*)library->pic_container.base;\n\n\n    memory = library->memory;\n\n    pic_container->default_module_classes = 0;\n\n    if ( FT_ALLOC( classes, sizeof ( FT_Module_Class* ) *\n                              ( FT_NUM_MODULE_CLASSES + 1 ) ) )\n      return error;\n\n    /* initialize all pointers to 0, especially the last one */\n    for ( i = 0; i < FT_NUM_MODULE_CLASSES; i++ )\n      classes[i] = 0;\n    classes[FT_NUM_MODULE_CLASSES] = 0;\n\n    i = 0;\n\n#include FT_CONFIG_MODULES_H\n\n  Exit:\n    if ( error )\n      ft_destroy_default_module_classes( library );\n    else\n      pic_container->default_module_classes = classes;\n\n    return error;\n  }\n\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Add_Default_Modules( FT_Library  library )\n  {\n    FT_Error                       error;\n    const FT_Module_Class* const*  cur;\n\n\n    /* FT_DEFAULT_MODULES_GET dereferences `library' in PIC mode */\n#ifdef FT_CONFIG_OPTION_PIC\n    if ( !library )\n      return;\n#endif\n\n    /* GCC 4.6 warns the type difference:\n     *   FT_Module_Class** != const FT_Module_Class* const*\n     */\n    cur = (const FT_Module_Class* const*)FT_DEFAULT_MODULES_GET;\n\n    /* test for valid `library' delayed to FT_Add_Module() */\n    while ( *cur )\n    {\n      error = FT_Add_Module( library, *cur );\n      /* notify errors, but don't stop */\n      if ( error )\n        FT_TRACE0(( \"FT_Add_Default_Module:\"\n                    \" Cannot install `%s', error = 0x%x\\n\",\n                    (*cur)->module_name, error ));\n      cur++;\n    }\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Init_FreeType( FT_Library  *alibrary )\n  {\n    FT_Error   error;\n    FT_Memory  memory;\n\n\n    /* check of `alibrary' delayed to `FT_New_Library' */\n\n    /* First of all, allocate a new system object -- this function is part */\n    /* of the system-specific component, i.e. `ftsystem.c'.                */\n\n    memory = FT_New_Memory();\n    if ( !memory )\n    {\n      FT_ERROR(( \"FT_Init_FreeType: cannot find memory manager\\n\" ));\n      return FT_THROW( Unimplemented_Feature );\n    }\n\n    /* build a library out of it, then fill it with the set of */\n    /* default drivers.                                        */\n\n    error = FT_New_Library( memory, alibrary );\n    if ( error )\n      FT_Done_Memory( memory );\n    else\n      FT_Add_Default_Modules( *alibrary );\n\n    return error;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Done_FreeType( FT_Library  library )\n  {\n    FT_Memory  memory;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    memory = library->memory;\n\n    /* Discard the library object */\n    FT_Done_Library( library );\n\n    /* discard memory manager */\n    FT_Done_Memory( memory );\n\n    return FT_Err_Ok;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftlcdfil.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftlcdfil.c                                                             */\n/*                                                                         */\n/*    FreeType API for color filtering of subpixel bitmap glyphs (body).   */\n/*                                                                         */\n/*  Copyright 2006, 2008-2010, 2013, 2014 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_LCD_FILTER_H\n#include FT_IMAGE_H\n#include FT_INTERNAL_OBJECTS_H\n\n\n#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING\n\n/* define USE_LEGACY to implement the legacy filter */\n#define  USE_LEGACY\n\n  /* FIR filter used by the default and light filters */\n  static void\n  _ft_lcd_filter_fir( FT_Bitmap*      bitmap,\n                      FT_Render_Mode  mode,\n                      FT_Library      library )\n  {\n    FT_Byte*  weights = library->lcd_weights;\n    FT_UInt   width   = (FT_UInt)bitmap->width;\n    FT_UInt   height  = (FT_UInt)bitmap->rows;\n\n\n    /* horizontal in-place FIR filter */\n    if ( mode == FT_RENDER_MODE_LCD && width >= 4 )\n    {\n      FT_Byte*  line = bitmap->buffer;\n\n\n      /* take care of bitmap flow */\n      if ( bitmap->pitch < 0 )\n        line -= bitmap->pitch * ( bitmap->rows - 1 );\n\n      /* `fir' and `pix' must be at least 32 bit wide, since the sum of */\n      /* the values in `weights' can exceed 0xFF                        */\n\n      for ( ; height > 0; height--, line += bitmap->pitch )\n      {\n        FT_UInt  fir[4];        /* below, `pix' is used as the 5th element */\n        FT_UInt  val1, xx;\n\n\n        val1   = line[0];\n        fir[0] = weights[2] * val1;\n        fir[1] = weights[3] * val1;\n        fir[2] = weights[4] * val1;\n        fir[3] = 0;\n\n        val1    = line[1];\n        fir[0] += weights[1] * val1;\n        fir[1] += weights[2] * val1;\n        fir[2] += weights[3] * val1;\n        fir[3] += weights[4] * val1;\n\n        for ( xx = 2; xx < width; xx++ )\n        {\n          FT_UInt  val, pix;\n\n\n          val    = line[xx];\n          pix    = fir[0] + weights[0] * val;\n          fir[0] = fir[1] + weights[1] * val;\n          fir[1] = fir[2] + weights[2] * val;\n          fir[2] = fir[3] + weights[3] * val;\n          fir[3] =          weights[4] * val;\n\n          pix        >>= 8;\n          pix         |= (FT_UInt)-(FT_Int)( pix >> 8 );\n          line[xx - 2] = (FT_Byte)pix;\n        }\n\n        {\n          FT_UInt  pix;\n\n\n          pix          = fir[0] >> 8;\n          pix         |= (FT_UInt)-(FT_Int)( pix >> 8 );\n          line[xx - 2] = (FT_Byte)pix;\n\n          pix          = fir[1] >> 8;\n          pix         |= (FT_UInt)-(FT_Int)( pix >> 8 );\n          line[xx - 1] = (FT_Byte)pix;\n        }\n      }\n    }\n\n    /* vertical in-place FIR filter */\n    else if ( mode == FT_RENDER_MODE_LCD_V && height >= 4 )\n    {\n      FT_Byte*  column = bitmap->buffer;\n      FT_Int    pitch  = bitmap->pitch;\n\n\n      /* take care of bitmap flow */\n      if ( bitmap->pitch < 0 )\n        column -= bitmap->pitch * ( bitmap->rows - 1 );\n\n      for ( ; width > 0; width--, column++ )\n      {\n        FT_Byte*  col = column;\n        FT_UInt   fir[4];       /* below, `pix' is used as the 5th element */\n        FT_UInt   val1, yy;\n\n\n        val1   = col[0];\n        fir[0] = weights[2] * val1;\n        fir[1] = weights[3] * val1;\n        fir[2] = weights[4] * val1;\n        fir[3] = 0;\n        col   += pitch;\n\n        val1    = col[0];\n        fir[0] += weights[1] * val1;\n        fir[1] += weights[2] * val1;\n        fir[2] += weights[3] * val1;\n        fir[3] += weights[4] * val1;\n        col    += pitch;\n\n        for ( yy = 2; yy < height; yy++ )\n        {\n          FT_UInt  val, pix;\n\n\n          val    = col[0];\n          pix    = fir[0] + weights[0] * val;\n          fir[0] = fir[1] + weights[1] * val;\n          fir[1] = fir[2] + weights[2] * val;\n          fir[2] = fir[3] + weights[3] * val;\n          fir[3] =          weights[4] * val;\n\n          pix           >>= 8;\n          pix            |= (FT_UInt)-(FT_Int)( pix >> 8 );\n          col[-2 * pitch] = (FT_Byte)pix;\n          col            += pitch;\n        }\n\n        {\n          FT_UInt  pix;\n\n\n          pix             = fir[0] >> 8;\n          pix            |= (FT_UInt)-(FT_Int)( pix >> 8 );\n          col[-2 * pitch] = (FT_Byte)pix;\n\n          pix         = fir[1] >> 8;\n          pix        |= (FT_UInt)-(FT_Int)( pix >> 8 );\n          col[-pitch] = (FT_Byte)pix;\n        }\n      }\n    }\n  }\n\n\n#ifdef USE_LEGACY\n\n  /* intra-pixel filter used by the legacy filter */\n  static void\n  _ft_lcd_filter_legacy( FT_Bitmap*      bitmap,\n                         FT_Render_Mode  mode,\n                         FT_Library      library )\n  {\n    FT_UInt  width  = (FT_UInt)bitmap->width;\n    FT_UInt  height = (FT_UInt)bitmap->rows;\n    FT_Int   pitch  = bitmap->pitch;\n\n    static const int  filters[3][3] =\n    {\n      { 65538 * 9/13, 65538 * 1/6, 65538 * 1/13 },\n      { 65538 * 3/13, 65538 * 4/6, 65538 * 3/13 },\n      { 65538 * 1/13, 65538 * 1/6, 65538 * 9/13 }\n    };\n\n    FT_UNUSED( library );\n\n\n    /* horizontal in-place intra-pixel filter */\n    if ( mode == FT_RENDER_MODE_LCD && width >= 3 )\n    {\n      FT_Byte*  line = bitmap->buffer;\n\n\n      /* take care of bitmap flow */\n      if ( bitmap->pitch < 0 )\n        line -= bitmap->pitch * ( bitmap->rows - 1 );\n\n      for ( ; height > 0; height--, line += pitch )\n      {\n        FT_UInt  xx;\n\n\n        for ( xx = 0; xx < width; xx += 3 )\n        {\n          FT_UInt  r = 0;\n          FT_UInt  g = 0;\n          FT_UInt  b = 0;\n          FT_UInt  p;\n\n\n          p  = line[xx];\n          r += filters[0][0] * p;\n          g += filters[0][1] * p;\n          b += filters[0][2] * p;\n\n          p  = line[xx + 1];\n          r += filters[1][0] * p;\n          g += filters[1][1] * p;\n          b += filters[1][2] * p;\n\n          p  = line[xx + 2];\n          r += filters[2][0] * p;\n          g += filters[2][1] * p;\n          b += filters[2][2] * p;\n\n          line[xx]     = (FT_Byte)( r / 65536 );\n          line[xx + 1] = (FT_Byte)( g / 65536 );\n          line[xx + 2] = (FT_Byte)( b / 65536 );\n        }\n      }\n    }\n    else if ( mode == FT_RENDER_MODE_LCD_V && height >= 3 )\n    {\n      FT_Byte*  column = bitmap->buffer;\n\n\n      /* take care of bitmap flow */\n      if ( bitmap->pitch < 0 )\n        column -= bitmap->pitch * ( bitmap->rows - 1 );\n\n      for ( ; width > 0; width--, column++ )\n      {\n        FT_Byte*  col     = column;\n        FT_Byte*  col_end = col + height * pitch;\n\n\n        for ( ; col < col_end; col += 3 * pitch )\n        {\n          FT_UInt  r = 0;\n          FT_UInt  g = 0;\n          FT_UInt  b = 0;\n          FT_UInt  p;\n\n\n          p  = col[0];\n          r += filters[0][0] * p;\n          g += filters[0][1] * p;\n          b += filters[0][2] * p;\n\n          p  = col[pitch];\n          r += filters[1][0] * p;\n          g += filters[1][1] * p;\n          b += filters[1][2] * p;\n\n          p  = col[pitch * 2];\n          r += filters[2][0] * p;\n          g += filters[2][1] * p;\n          b += filters[2][2] * p;\n\n          col[0]         = (FT_Byte)( r / 65536 );\n          col[pitch]     = (FT_Byte)( g / 65536 );\n          col[2 * pitch] = (FT_Byte)( b / 65536 );\n        }\n      }\n    }\n  }\n\n#endif /* USE_LEGACY */\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Library_SetLcdFilterWeights( FT_Library      library,\n                                  unsigned char  *weights )\n  {\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !weights )\n      return FT_THROW( Invalid_Argument );\n\n    ft_memcpy( library->lcd_weights, weights, 5 );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Library_SetLcdFilter( FT_Library    library,\n                           FT_LcdFilter  filter )\n  {\n    static const FT_Byte  light_filter[5] =\n                            { 0x00, 0x55, 0x56, 0x55, 0x00 };\n    /* the values here sum up to a value larger than 256, */\n    /* providing a cheap gamma correction                 */\n    static const FT_Byte  default_filter[5] =\n                            { 0x10, 0x40, 0x70, 0x40, 0x10 };\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    switch ( filter )\n    {\n    case FT_LCD_FILTER_NONE:\n      library->lcd_filter_func = NULL;\n      library->lcd_extra       = 0;\n      break;\n\n    case FT_LCD_FILTER_DEFAULT:\n#if defined( FT_FORCE_LEGACY_LCD_FILTER )\n\n      library->lcd_filter_func = _ft_lcd_filter_legacy;\n      library->lcd_extra       = 0;\n\n#elif defined( FT_FORCE_LIGHT_LCD_FILTER )\n\n      ft_memcpy( library->lcd_weights, light_filter, 5 );\n      library->lcd_filter_func = _ft_lcd_filter_fir;\n      library->lcd_extra       = 2;\n\n#else\n\n      ft_memcpy( library->lcd_weights, default_filter, 5 );\n      library->lcd_filter_func = _ft_lcd_filter_fir;\n      library->lcd_extra       = 2;\n\n#endif\n\n      break;\n\n    case FT_LCD_FILTER_LIGHT:\n      ft_memcpy( library->lcd_weights, light_filter, 5 );\n      library->lcd_filter_func = _ft_lcd_filter_fir;\n      library->lcd_extra       = 2;\n      break;\n\n#ifdef USE_LEGACY\n\n    case FT_LCD_FILTER_LEGACY:\n      library->lcd_filter_func = _ft_lcd_filter_legacy;\n      library->lcd_extra       = 0;\n      break;\n\n#endif\n\n    default:\n      return FT_THROW( Invalid_Argument );\n    }\n\n    library->lcd_filter = filter;\n\n    return FT_Err_Ok;\n  }\n\n#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Library_SetLcdFilterWeights( FT_Library      library,\n                                  unsigned char  *weights )\n  {\n    FT_UNUSED( library );\n    FT_UNUSED( weights );\n\n    return FT_THROW( Unimplemented_Feature );\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Library_SetLcdFilter( FT_Library    library,\n                           FT_LcdFilter  filter )\n  {\n    FT_UNUSED( library );\n    FT_UNUSED( filter );\n\n    return FT_THROW( Unimplemented_Feature );\n  }\n\n#endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftmac.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmac.c                                                                */\n/*                                                                         */\n/*    Mac FOND support.  Written by just@letterror.com.                    */\n/*  Heavily modified by mpsuzuki, George Williams, and Sean McBride.       */\n/*                                                                         */\n/*  This file is for Mac OS X only; see builds/mac/ftoldmac.c for          */\n/*  classic platforms built by MPW.                                        */\n/*                                                                         */\n/*  Copyright 1996-2009, 2013, 2014 by                                     */\n/*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*\n    Notes\n\n    Mac suitcase files can (and often do!) contain multiple fonts.  To\n    support this I use the face_index argument of FT_(Open|New)_Face()\n    functions, and pretend the suitcase file is a collection.\n\n    Warning: fbit and NFNT bitmap resources are not supported yet.  In old\n    sfnt fonts, bitmap glyph data for each size is stored in each `NFNT'\n    resources instead of the `bdat' table in the sfnt resource.  Therefore,\n    face->num_fixed_sizes is set to 0, because bitmap data in `NFNT'\n    resource is unavailable at present.\n\n    The Mac FOND support works roughly like this:\n\n    - Check whether the offered stream points to a Mac suitcase file.  This\n      is done by checking the file type: it has to be 'FFIL' or 'tfil'.  The\n      stream that gets passed to our init_face() routine is a stdio stream,\n      which isn't usable for us, since the FOND resources live in the\n      resource fork.  So we just grab the stream->pathname field.\n\n    - Read the FOND resource into memory, then check whether there is a\n      TrueType font and/or(!) a Type 1 font available.\n\n    - If there is a Type 1 font available (as a separate `LWFN' file), read\n      its data into memory, massage it slightly so it becomes PFB data, wrap\n      it into a memory stream, load the Type 1 driver and delegate the rest\n      of the work to it by calling FT_Open_Face().  (XXX TODO: after this\n      has been done, the kerning data from the FOND resource should be\n      appended to the face: On the Mac there are usually no AFM files\n      available.  However, this is tricky since we need to map Mac char\n      codes to ps glyph names to glyph ID's...)\n\n    - If there is a TrueType font (an `sfnt' resource), read it into memory,\n      wrap it into a memory stream, load the TrueType driver and delegate\n      the rest of the work to it, by calling FT_Open_Face().\n\n    - Some suitcase fonts (notably Onyx) might point the `LWFN' file to\n      itself, even though it doesn't contains `POST' resources.  To handle\n      this special case without opening the file an extra time, we just\n      ignore errors from the `LWFN' and fallback to the `sfnt' if both are\n      available.\n  */\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_INTERNAL_STREAM_H\n#include \"ftbase.h\"\n\n  /* This is for Mac OS X.  Without redefinition, OS_INLINE */\n  /* expands to `static inline' which doesn't survive the   */\n  /* -ansi compilation flag of GCC.                         */\n#if !HAVE_ANSI_OS_INLINE\n#undef  OS_INLINE\n#define OS_INLINE  static __inline__\n#endif\n\n  /* `configure' checks the availability of `ResourceIndex' strictly */\n  /* and sets HAVE_TYPE_RESOURCE_INDEX 1 or 0 always.  If it is      */\n  /* not set (e.g., a build without `configure'), the availability   */\n  /* is guessed from the SDK version.                                */\n#ifndef HAVE_TYPE_RESOURCE_INDEX\n#if !defined( MAC_OS_X_VERSION_10_5 ) || \\\n    ( MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 )\n#define HAVE_TYPE_RESOURCE_INDEX 0\n#else\n#define HAVE_TYPE_RESOURCE_INDEX 1\n#endif\n#endif /* !HAVE_TYPE_RESOURCE_INDEX */\n\n#if ( HAVE_TYPE_RESOURCE_INDEX == 0 )\n  typedef short  ResourceIndex;\n#endif\n\n#include <CoreServices/CoreServices.h>\n#include <ApplicationServices/ApplicationServices.h>\n#include <sys/syslimits.h> /* PATH_MAX */\n\n  /* Don't want warnings about our own use of deprecated functions. */\n#define FT_DEPRECATED_ATTRIBUTE\n\n#include FT_MAC_H\n\n#ifndef kATSOptionFlagsUnRestrictedScope /* since Mac OS X 10.1 */\n#define kATSOptionFlagsUnRestrictedScope kATSOptionFlagsDefault\n#endif\n\n\n  /* Set PREFER_LWFN to 1 if LWFN (Type 1) is preferred over\n     TrueType in case *both* are available (this is not common,\n     but it *is* possible). */\n#ifndef PREFER_LWFN\n#define PREFER_LWFN  1\n#endif\n\n\n#ifdef FT_MACINTOSH\n\n  /* This function is deprecated because FSSpec is deprecated in Mac OS X  */\n  FT_EXPORT_DEF( FT_Error )\n  FT_GetFile_From_Mac_Name( const char*  fontName,\n                            FSSpec*      pathSpec,\n                            FT_Long*     face_index )\n  {\n    FT_UNUSED( fontName );\n    FT_UNUSED( pathSpec );\n    FT_UNUSED( face_index );\n\n    return FT_THROW( Unimplemented_Feature );\n  }\n\n\n  /* Private function.                                         */\n  /* The FSSpec type has been discouraged for a long time,     */\n  /* unfortunately an FSRef replacement API for                */\n  /* ATSFontGetFileSpecification() is only available in        */\n  /* Mac OS X 10.5 and later.                                  */\n  static OSStatus\n  FT_ATSFontGetFileReference( ATSFontRef  ats_font_id,\n                              FSRef*      ats_font_ref )\n  {\n#if defined( MAC_OS_X_VERSION_10_5 ) && \\\n    ( MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 )\n\n    OSStatus  err;\n\n    err = ATSFontGetFileReference( ats_font_id, ats_font_ref );\n\n    return err;\n#elif __LP64__ /* No 64bit Carbon API on legacy platforms */\n    FT_UNUSED( ats_font_id );\n    FT_UNUSED( ats_font_ref );\n\n\n    return fnfErr;\n#else /* 32bit Carbon API on legacy platforms */\n    OSStatus  err;\n    FSSpec    spec;\n\n\n    err = ATSFontGetFileSpecification( ats_font_id, &spec );\n    if ( noErr == err )\n      err = FSpMakeFSRef( &spec, ats_font_ref );\n\n    return err;\n#endif\n  }\n\n\n  static FT_Error\n  FT_GetFileRef_From_Mac_ATS_Name( const char*  fontName,\n                                   FSRef*       ats_font_ref,\n                                   FT_Long*     face_index )\n  {\n    CFStringRef  cf_fontName;\n    ATSFontRef   ats_font_id;\n\n\n    *face_index = 0;\n\n    cf_fontName = CFStringCreateWithCString( NULL, fontName,\n                                             kCFStringEncodingMacRoman );\n    ats_font_id = ATSFontFindFromName( cf_fontName,\n                                       kATSOptionFlagsUnRestrictedScope );\n    CFRelease( cf_fontName );\n\n    if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )\n      return FT_THROW( Unknown_File_Format );\n\n    if ( noErr != FT_ATSFontGetFileReference( ats_font_id, ats_font_ref ) )\n      return FT_THROW( Unknown_File_Format );\n\n    /* face_index calculation by searching preceding fontIDs */\n    /* with same FSRef                                       */\n    {\n      ATSFontRef  id2 = ats_font_id - 1;\n      FSRef       ref2;\n\n\n      while ( id2 > 0 )\n      {\n        if ( noErr != FT_ATSFontGetFileReference( id2, &ref2 ) )\n          break;\n        if ( noErr != FSCompareFSRefs( ats_font_ref, &ref2 ) )\n          break;\n\n        id2 --;\n      }\n      *face_index = ats_font_id - ( id2 + 1 );\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_GetFilePath_From_Mac_ATS_Name( const char*  fontName,\n                                    UInt8*       path,\n                                    UInt32       maxPathSize,\n                                    FT_Long*     face_index )\n  {\n    FSRef     ref;\n    FT_Error  err;\n\n\n    if ( !fontName || !face_index )\n      return FT_THROW( Invalid_Argument) ;\n\n    err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );\n    if ( err )\n      return err;\n\n    if ( noErr != FSRefMakePath( &ref, path, maxPathSize ) )\n      return FT_THROW( Unknown_File_Format );\n\n    return FT_Err_Ok;\n  }\n\n\n  /* This function is deprecated because FSSpec is deprecated in Mac OS X  */\n  FT_EXPORT_DEF( FT_Error )\n  FT_GetFile_From_Mac_ATS_Name( const char*  fontName,\n                                FSSpec*      pathSpec,\n                                FT_Long*     face_index )\n  {\n#if ( __LP64__ ) || ( defined( MAC_OS_X_VERSION_10_5 ) && \\\n      ( MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 ) )\n    FT_UNUSED( fontName );\n    FT_UNUSED( pathSpec );\n    FT_UNUSED( face_index );\n\n    return FT_THROW( Unimplemented_Feature );\n#else\n    FSRef     ref;\n    FT_Error  err;\n\n\n    if ( !fontName || !face_index )\n      return FT_THROW( Invalid_Argument );\n\n    err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );\n    if ( err )\n      return err;\n\n    if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL,\n                                    pathSpec, NULL ) )\n      return FT_THROW( Unknown_File_Format );\n\n    return FT_Err_Ok;\n#endif\n  }\n\n\n  static OSErr\n  FT_FSPathMakeRes( const UInt8*    pathname,\n                    ResFileRefNum*  res )\n  {\n    OSErr  err;\n    FSRef  ref;\n\n\n    if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )\n      return FT_THROW( Cannot_Open_Resource );\n\n    /* at present, no support for dfont format */\n    err = FSOpenResourceFile( &ref, 0, NULL, fsRdPerm, res );\n    if ( noErr == err )\n      return err;\n\n    /* fallback to original resource-fork font */\n    *res = FSOpenResFile( &ref, fsRdPerm );\n    err  = ResError();\n\n    return err;\n  }\n\n\n  /* Return the file type for given pathname */\n  static OSType\n  get_file_type_from_path( const UInt8*  pathname )\n  {\n    FSRef          ref;\n    FSCatalogInfo  info;\n\n\n    if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )\n      return ( OSType ) 0;\n\n    if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoFinderInfo, &info,\n                                    NULL, NULL, NULL ) )\n      return ( OSType ) 0;\n\n    return ((FInfo *)(info.finderInfo))->fdType;\n  }\n\n\n  /* Given a PostScript font name, create the Macintosh LWFN file name. */\n  static void\n  create_lwfn_name( char*   ps_name,\n                    Str255  lwfn_file_name )\n  {\n    int       max = 5, count = 0;\n    FT_Byte*  p = lwfn_file_name;\n    FT_Byte*  q = (FT_Byte*)ps_name;\n\n\n    lwfn_file_name[0] = 0;\n\n    while ( *q )\n    {\n      if ( ft_isupper( *q ) )\n      {\n        if ( count )\n          max = 3;\n        count = 0;\n      }\n      if ( count < max && ( ft_isalnum( *q ) || *q == '_' ) )\n      {\n        *++p = *q;\n        lwfn_file_name[0]++;\n        count++;\n      }\n      q++;\n    }\n  }\n\n\n  static short\n  count_faces_sfnt( char*  fond_data )\n  {\n    /* The count is 1 greater than the value in the FOND.  */\n    /* Isn't that cute? :-)                                */\n\n    return EndianS16_BtoN( *( (short*)( fond_data +\n                                        sizeof ( FamRec ) ) ) ) + 1;\n  }\n\n\n  static short\n  count_faces_scalable( char*  fond_data )\n  {\n    AsscEntry*  assoc;\n    short       i, face, face_all;\n\n\n    face_all = EndianS16_BtoN( *( (short *)( fond_data +\n                                             sizeof ( FamRec ) ) ) ) + 1;\n    assoc    = (AsscEntry*)( fond_data + sizeof ( FamRec ) + 2 );\n    face     = 0;\n\n    for ( i = 0; i < face_all; i++ )\n    {\n      if ( 0 == EndianS16_BtoN( assoc[i].fontSize ) )\n        face++;\n    }\n    return face;\n  }\n\n\n  /* Look inside the FOND data, answer whether there should be an SFNT\n     resource, and answer the name of a possible LWFN Type 1 file.\n\n     Thanks to Paul Miller (paulm@profoundeffects.com) for the fix\n     to load a face OTHER than the first one in the FOND!\n  */\n\n\n  static void\n  parse_fond( char*   fond_data,\n              short*  have_sfnt,\n              ResID*  sfnt_id,\n              Str255  lwfn_file_name,\n              short   face_index )\n  {\n    AsscEntry*  assoc;\n    AsscEntry*  base_assoc;\n    FamRec*     fond;\n\n\n    *sfnt_id          = 0;\n    *have_sfnt        = 0;\n    lwfn_file_name[0] = 0;\n\n    fond       = (FamRec*)fond_data;\n    assoc      = (AsscEntry*)( fond_data + sizeof ( FamRec ) + 2 );\n    base_assoc = assoc;\n\n    /* the maximum faces in a FOND is 48, size of StyleTable.indexes[] */\n    if ( 47 < face_index )\n      return;\n\n    /* Let's do a little range checking before we get too excited here */\n    if ( face_index < count_faces_sfnt( fond_data ) )\n    {\n      assoc += face_index;        /* add on the face_index! */\n\n      /* if the face at this index is not scalable,\n         fall back to the first one (old behavior) */\n      if ( EndianS16_BtoN( assoc->fontSize ) == 0 )\n      {\n        *have_sfnt = 1;\n        *sfnt_id   = EndianS16_BtoN( assoc->fontID );\n      }\n      else if ( base_assoc->fontSize == 0 )\n      {\n        *have_sfnt = 1;\n        *sfnt_id   = EndianS16_BtoN( base_assoc->fontID );\n      }\n    }\n\n    if ( EndianS32_BtoN( fond->ffStylOff ) )\n    {\n      unsigned char*  p = (unsigned char*)fond_data;\n      StyleTable*     style;\n      unsigned short  string_count;\n      char            ps_name[256];\n      unsigned char*  names[64];\n      int             i;\n\n\n      p += EndianS32_BtoN( fond->ffStylOff );\n      style = (StyleTable*)p;\n      p += sizeof ( StyleTable );\n      string_count = EndianS16_BtoN( *(short*)(p) );\n      string_count = FT_MIN( 64, string_count );\n      p += sizeof ( short );\n\n      for ( i = 0; i < string_count; i++ )\n      {\n        names[i] = p;\n        p       += names[i][0];\n        p++;\n      }\n\n      {\n        size_t  ps_name_len = (size_t)names[0][0];\n\n\n        if ( ps_name_len != 0 )\n        {\n          ft_memcpy(ps_name, names[0] + 1, ps_name_len);\n          ps_name[ps_name_len] = 0;\n        }\n        if ( style->indexes[face_index] > 1 &&\n             style->indexes[face_index] <= string_count )\n        {\n          unsigned char*  suffixes = names[style->indexes[face_index] - 1];\n\n\n          for ( i = 1; i <= suffixes[0]; i++ )\n          {\n            unsigned char*  s;\n            size_t          j = suffixes[i] - 1;\n\n\n            if ( j < string_count && ( s = names[j] ) != NULL )\n            {\n              size_t  s_len = (size_t)s[0];\n\n\n              if ( s_len != 0 && ps_name_len + s_len < sizeof ( ps_name ) )\n              {\n                ft_memcpy( ps_name + ps_name_len, s + 1, s_len );\n                ps_name_len += s_len;\n                ps_name[ps_name_len] = 0;\n              }\n            }\n          }\n        }\n      }\n\n      create_lwfn_name( ps_name, lwfn_file_name );\n    }\n  }\n\n\n  static  FT_Error\n  lookup_lwfn_by_fond( const UInt8*      path_fond,\n                       ConstStr255Param  base_lwfn,\n                       UInt8*            path_lwfn,\n                       size_t            path_size )\n  {\n    FSRef   ref, par_ref;\n    size_t  dirname_len;\n\n\n    /* Pathname for FSRef can be in various formats: HFS, HFS+, and POSIX. */\n    /* We should not extract parent directory by string manipulation.      */\n\n    if ( noErr != FSPathMakeRef( path_fond, &ref, FALSE ) )\n      return FT_THROW( Invalid_Argument );\n\n    if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,\n                                    NULL, NULL, NULL, &par_ref ) )\n      return FT_THROW( Invalid_Argument );\n\n    if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) )\n      return FT_THROW( Invalid_Argument );\n\n    if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )\n      return FT_THROW( Invalid_Argument );\n\n    /* now we have absolute dirname in path_lwfn */\n    ft_strcat( (char *)path_lwfn, \"/\" );\n    dirname_len = ft_strlen( (char *)path_lwfn );\n    ft_strcat( (char *)path_lwfn, (char *)base_lwfn + 1 );\n    path_lwfn[dirname_len + base_lwfn[0]] = '\\0';\n\n    if ( noErr != FSPathMakeRef( path_lwfn, &ref, FALSE ) )\n      return FT_THROW( Cannot_Open_Resource );\n\n    if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,\n                                    NULL, NULL, NULL, NULL ) )\n      return FT_THROW( Cannot_Open_Resource );\n\n    return FT_Err_Ok;\n  }\n\n\n  static short\n  count_faces( Handle        fond,\n               const UInt8*  pathname )\n  {\n    ResID     sfnt_id;\n    short     have_sfnt, have_lwfn;\n    Str255    lwfn_file_name;\n    UInt8     buff[PATH_MAX];\n    FT_Error  err;\n    short     num_faces;\n\n\n    have_sfnt = have_lwfn = 0;\n\n    parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, 0 );\n\n    if ( lwfn_file_name[0] )\n    {\n      err = lookup_lwfn_by_fond( pathname, lwfn_file_name,\n                                 buff, sizeof ( buff )  );\n      if ( !err )\n        have_lwfn = 1;\n    }\n\n    if ( have_lwfn && ( !have_sfnt || PREFER_LWFN ) )\n      num_faces = 1;\n    else\n      num_faces = count_faces_scalable( *fond );\n\n    return num_faces;\n  }\n\n\n  /* Read Type 1 data from the POST resources inside the LWFN file,\n     return a PFB buffer.  This is somewhat convoluted because the FT2\n     PFB parser wants the ASCII header as one chunk, and the LWFN\n     chunks are often not organized that way, so we glue chunks\n     of the same type together. */\n  static FT_Error\n  read_lwfn( FT_Memory      memory,\n             ResFileRefNum  res,\n             FT_Byte**      pfb_data,\n             FT_ULong*      size )\n  {\n    FT_Error       error = FT_Err_Ok;\n    ResID          res_id;\n    unsigned char  *buffer, *p, *size_p = NULL;\n    FT_ULong       total_size = 0;\n    FT_ULong       old_total_size = 0;\n    FT_ULong       post_size, pfb_chunk_size;\n    Handle         post_data;\n    char           code, last_code;\n\n\n    UseResFile( res );\n\n    /* First pass: load all POST resources, and determine the size of */\n    /* the output buffer.                                             */\n    res_id    = 501;\n    last_code = -1;\n\n    for (;;)\n    {\n      post_data = Get1Resource( TTAG_POST, res_id++ );\n      if ( post_data == NULL )\n        break;  /* we are done */\n\n      code = (*post_data)[0];\n\n      if ( code != last_code )\n      {\n        if ( code == 5 )\n          total_size += 2; /* just the end code */\n        else\n          total_size += 6; /* code + 4 bytes chunk length */\n      }\n\n      total_size += GetHandleSize( post_data ) - 2;\n      last_code = code;\n\n      /* detect integer overflows */\n      if ( total_size < old_total_size )\n      {\n        error = FT_THROW( Array_Too_Large );\n        goto Error;\n      }\n\n      old_total_size = total_size;\n    }\n\n    if ( FT_ALLOC( buffer, (FT_Long)total_size ) )\n      goto Error;\n\n    /* Second pass: append all POST data to the buffer, add PFB fields. */\n    /* Glue all consecutive chunks of the same type together.           */\n    p              = buffer;\n    res_id         = 501;\n    last_code      = -1;\n    pfb_chunk_size = 0;\n\n    for (;;)\n    {\n      post_data = Get1Resource( TTAG_POST, res_id++ );\n      if ( post_data == NULL )\n        break;  /* we are done */\n\n      post_size = (FT_ULong)GetHandleSize( post_data ) - 2;\n      code = (*post_data)[0];\n\n      if ( code != last_code )\n      {\n        if ( last_code != -1 )\n        {\n          /* we are done adding a chunk, fill in the size field */\n          if ( size_p != NULL )\n          {\n            *size_p++ = (FT_Byte)(   pfb_chunk_size         & 0xFF );\n            *size_p++ = (FT_Byte)( ( pfb_chunk_size >> 8  ) & 0xFF );\n            *size_p++ = (FT_Byte)( ( pfb_chunk_size >> 16 ) & 0xFF );\n            *size_p++ = (FT_Byte)( ( pfb_chunk_size >> 24 ) & 0xFF );\n          }\n          pfb_chunk_size = 0;\n        }\n\n        *p++ = 0x80;\n        if ( code == 5 )\n          *p++ = 0x03;  /* the end */\n        else if ( code == 2 )\n          *p++ = 0x02;  /* binary segment */\n        else\n          *p++ = 0x01;  /* ASCII segment */\n\n        if ( code != 5 )\n        {\n          size_p = p;   /* save for later */\n          p += 4;       /* make space for size field */\n        }\n      }\n\n      ft_memcpy( p, *post_data + 2, post_size );\n      pfb_chunk_size += post_size;\n      p += post_size;\n      last_code = code;\n    }\n\n    *pfb_data = buffer;\n    *size = total_size;\n\n  Error:\n    CloseResFile( res );\n    return error;\n  }\n\n\n  /* Create a new FT_Face from a file path to an LWFN file. */\n  static FT_Error\n  FT_New_Face_From_LWFN( FT_Library    library,\n                         const UInt8*  pathname,\n                         FT_Long       face_index,\n                         FT_Face*      aface )\n  {\n    FT_Byte*       pfb_data;\n    FT_ULong       pfb_size;\n    FT_Error       error;\n    ResFileRefNum  res;\n\n\n    if ( noErr != FT_FSPathMakeRes( pathname, &res ) )\n      return FT_THROW( Cannot_Open_Resource );\n\n    pfb_data = NULL;\n    pfb_size = 0;\n    error = read_lwfn( library->memory, res, &pfb_data, &pfb_size );\n    CloseResFile( res ); /* PFB is already loaded, useless anymore */\n    if ( error )\n      return error;\n\n    return open_face_from_buffer( library,\n                                  pfb_data,\n                                  pfb_size,\n                                  face_index,\n                                  \"type1\",\n                                  aface );\n  }\n\n\n  /* Create a new FT_Face from an SFNT resource, specified by res ID. */\n  static FT_Error\n  FT_New_Face_From_SFNT( FT_Library  library,\n                         ResID       sfnt_id,\n                         FT_Long     face_index,\n                         FT_Face*    aface )\n  {\n    Handle     sfnt = NULL;\n    FT_Byte*   sfnt_data;\n    size_t     sfnt_size;\n    FT_Error   error  = FT_Err_Ok;\n    FT_Memory  memory = library->memory;\n    int        is_cff, is_sfnt_ps;\n\n\n    sfnt = GetResource( TTAG_sfnt, sfnt_id );\n    if ( sfnt == NULL )\n      return FT_THROW( Invalid_Handle );\n\n    sfnt_size = (FT_ULong)GetHandleSize( sfnt );\n    if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) )\n    {\n      ReleaseResource( sfnt );\n      return error;\n    }\n\n    ft_memcpy( sfnt_data, *sfnt, sfnt_size );\n    ReleaseResource( sfnt );\n\n    is_cff     = sfnt_size > 4 && !ft_memcmp( sfnt_data, \"OTTO\", 4 );\n    is_sfnt_ps = sfnt_size > 4 && !ft_memcmp( sfnt_data, \"typ1\", 4 );\n\n    if ( is_sfnt_ps )\n    {\n      FT_Stream  stream;\n\n\n      if ( FT_NEW( stream ) )\n        goto Try_OpenType;\n\n      FT_Stream_OpenMemory( stream, sfnt_data, sfnt_size );\n      if ( !open_face_PS_from_sfnt_stream( library,\n                                           stream,\n                                           face_index,\n                                           0, NULL,\n                                           aface ) )\n      {\n        FT_Stream_Close( stream );\n        FT_FREE( stream );\n        FT_FREE( sfnt_data );\n        goto Exit;\n      }\n\n      FT_FREE( stream );\n    }\n  Try_OpenType:\n    error = open_face_from_buffer( library,\n                                   sfnt_data,\n                                   sfnt_size,\n                                   face_index,\n                                   is_cff ? \"cff\" : \"truetype\",\n                                   aface );\n  Exit:\n    return error;\n  }\n\n\n  /* Create a new FT_Face from a file path to a suitcase file. */\n  static FT_Error\n  FT_New_Face_From_Suitcase( FT_Library    library,\n                             const UInt8*  pathname,\n                             FT_Long       face_index,\n                             FT_Face*      aface )\n  {\n    FT_Error       error = FT_ERR( Cannot_Open_Resource );\n    ResFileRefNum  res_ref;\n    ResourceIndex  res_index;\n    Handle         fond;\n    short          num_faces_in_res;\n\n\n    if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) )\n      return FT_THROW( Cannot_Open_Resource );\n\n    UseResFile( res_ref );\n    if ( ResError() )\n      return FT_THROW( Cannot_Open_Resource );\n\n    num_faces_in_res = 0;\n    for ( res_index = 1; ; ++res_index )\n    {\n      short  num_faces_in_fond;\n\n\n      fond = Get1IndResource( TTAG_FOND, res_index );\n      if ( ResError() )\n        break;\n\n      num_faces_in_fond  = count_faces( fond, pathname );\n      num_faces_in_res  += num_faces_in_fond;\n\n      if ( 0 <= face_index && face_index < num_faces_in_fond && error )\n        error = FT_New_Face_From_FOND( library, fond, face_index, aface );\n\n      face_index -= num_faces_in_fond;\n    }\n\n    CloseResFile( res_ref );\n    if ( !error && aface && *aface )\n      (*aface)->num_faces = num_faces_in_res;\n    return error;\n  }\n\n\n  /* documentation is in ftmac.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_New_Face_From_FOND( FT_Library  library,\n                         Handle      fond,\n                         FT_Long     face_index,\n                         FT_Face*    aface )\n  {\n    short     have_sfnt, have_lwfn = 0;\n    ResID     sfnt_id, fond_id;\n    OSType    fond_type;\n    Str255    fond_name;\n    Str255    lwfn_file_name;\n    UInt8     path_lwfn[PATH_MAX];\n    OSErr     err;\n    FT_Error  error = FT_Err_Ok;\n\n\n    /* check of `library' and `aface' delayed to `FT_New_Face_From_XXX' */\n\n    GetResInfo( fond, &fond_id, &fond_type, fond_name );\n    if ( ResError() != noErr || fond_type != TTAG_FOND )\n      return FT_THROW( Invalid_File_Format );\n\n    parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, face_index );\n\n    if ( lwfn_file_name[0] )\n    {\n      ResFileRefNum  res;\n\n\n      res = HomeResFile( fond );\n      if ( noErr != ResError() )\n        goto found_no_lwfn_file;\n\n      {\n        UInt8  path_fond[PATH_MAX];\n        FSRef  ref;\n\n\n        err = FSGetForkCBInfo( res, kFSInvalidVolumeRefNum,\n                               NULL, NULL, NULL, &ref, NULL );\n        if ( noErr != err )\n          goto found_no_lwfn_file;\n\n        err = FSRefMakePath( &ref, path_fond, sizeof ( path_fond ) );\n        if ( noErr != err )\n          goto found_no_lwfn_file;\n\n        error = lookup_lwfn_by_fond( path_fond, lwfn_file_name,\n                                     path_lwfn, sizeof ( path_lwfn ) );\n        if ( !error )\n          have_lwfn = 1;\n      }\n    }\n\n    if ( have_lwfn && ( !have_sfnt || PREFER_LWFN ) )\n      error = FT_New_Face_From_LWFN( library,\n                                     path_lwfn,\n                                     face_index,\n                                     aface );\n    else\n      error = FT_THROW( Unknown_File_Format );\n\n  found_no_lwfn_file:\n    if ( have_sfnt && error )\n      error = FT_New_Face_From_SFNT( library,\n                                     sfnt_id,\n                                     face_index,\n                                     aface );\n\n    return error;\n  }\n\n\n  /* Common function to load a new FT_Face from a resource file. */\n  static FT_Error\n  FT_New_Face_From_Resource( FT_Library    library,\n                             const UInt8*  pathname,\n                             FT_Long       face_index,\n                             FT_Face*      aface )\n  {\n    OSType    file_type;\n    FT_Error  error;\n\n\n    /* LWFN is a (very) specific file format, check for it explicitly */\n    file_type = get_file_type_from_path( pathname );\n    if ( file_type == TTAG_LWFN )\n      return FT_New_Face_From_LWFN( library, pathname, face_index, aface );\n\n    /* Otherwise the file type doesn't matter (there are more than  */\n    /* `FFIL' and `tfil').  Just try opening it as a font suitcase; */\n    /* if it works, fine.                                           */\n\n    error = FT_New_Face_From_Suitcase( library, pathname, face_index, aface );\n    if ( error == 0 )\n      return error;\n\n    /* let it fall through to normal loader (.ttf, .otf, etc.); */\n    /* we signal this by returning no error and no FT_Face      */\n    *aface = NULL;\n    return 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This is the Mac-specific implementation of FT_New_Face.  In        */\n  /*    addition to the standard FT_New_Face() functionality, it also      */\n  /*    accepts pathnames to Mac suitcase files.  For further              */\n  /*    documentation see the original FT_New_Face() in freetype.h.        */\n  /*                                                                       */\n  FT_EXPORT_DEF( FT_Error )\n  FT_New_Face( FT_Library   library,\n               const char*  pathname,\n               FT_Long      face_index,\n               FT_Face*     aface )\n  {\n    FT_Open_Args  args;\n    FT_Error      error;\n\n\n    /* test for valid `library' and `aface' delayed to FT_Open_Face() */\n    if ( !pathname )\n      return FT_THROW( Invalid_Argument );\n\n    *aface = NULL;\n\n    /* try resourcefork based font: LWFN, FFIL */\n    error = FT_New_Face_From_Resource( library, (UInt8 *)pathname,\n                                       face_index, aface );\n    if ( error != 0 || *aface != NULL )\n      return error;\n\n    /* let it fall through to normal loader (.ttf, .otf, etc.) */\n    args.flags    = FT_OPEN_PATHNAME;\n    args.pathname = (char*)pathname;\n    return FT_Open_Face( library, &args, face_index, aface );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face_From_FSRef                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FT_New_Face_From_FSRef is identical to FT_New_Face except it       */\n  /*    accepts an FSRef instead of a path.                                */\n  /*                                                                       */\n  /* This function is deprecated because Carbon data types (FSRef)         */\n  /* are not cross-platform, and thus not suitable for the freetype API.   */\n  FT_EXPORT_DEF( FT_Error )\n  FT_New_Face_From_FSRef( FT_Library    library,\n                          const FSRef*  ref,\n                          FT_Long       face_index,\n                          FT_Face*      aface )\n  {\n    FT_Error      error;\n    FT_Open_Args  args;\n\n    OSErr  err;\n    UInt8  pathname[PATH_MAX];\n\n\n    /* check of `library' and `aface' delayed to */\n    /* `FT_New_Face_From_Resource'               */\n\n    if ( !ref )\n      return FT_THROW( Invalid_Argument );\n\n    err = FSRefMakePath( ref, pathname, sizeof ( pathname ) );\n    if ( err )\n      error = FT_THROW( Cannot_Open_Resource );\n\n    error = FT_New_Face_From_Resource( library, pathname, face_index, aface );\n    if ( error != 0 || *aface != NULL )\n      return error;\n\n    /* fallback to datafork font */\n    args.flags    = FT_OPEN_PATHNAME;\n    args.pathname = (char*)pathname;\n    return FT_Open_Face( library, &args, face_index, aface );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face_From_FSSpec                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FT_New_Face_From_FSSpec is identical to FT_New_Face except it      */\n  /*    accepts an FSSpec instead of a path.                               */\n  /*                                                                       */\n  /* This function is deprecated because FSSpec is deprecated in Mac OS X  */\n  FT_EXPORT_DEF( FT_Error )\n  FT_New_Face_From_FSSpec( FT_Library     library,\n                           const FSSpec*  spec,\n                           FT_Long        face_index,\n                           FT_Face*       aface )\n  {\n#if ( __LP64__ ) || ( defined( MAC_OS_X_VERSION_10_5 ) && \\\n      ( MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 ) )\n    FT_UNUSED( library );\n    FT_UNUSED( spec );\n    FT_UNUSED( face_index );\n    FT_UNUSED( aface );\n\n    return FT_THROW( Unimplemented_Feature );\n#else\n    FSRef  ref;\n\n\n    /* check of `library' and `aface' delayed to `FT_New_Face_From_FSRef' */\n\n    if ( !spec || FSpMakeFSRef( spec, &ref ) != noErr )\n      return FT_THROW( Invalid_Argument );\n    else\n      return FT_New_Face_From_FSRef( library, &ref, face_index, aface );\n#endif\n  }\n\n#endif /* FT_MACINTOSH */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftmm.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmm.c                                                                 */\n/*                                                                         */\n/*    Multiple Master font support (body).                                 */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2004, 2009, 2013, 2014 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_MULTIPLE_MASTERS_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_MULTIPLE_MASTERS_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_mm\n\n\n  static FT_Error\n  ft_face_get_mm_service( FT_Face                   face,\n                          FT_Service_MultiMasters  *aservice )\n  {\n    FT_Error  error;\n\n\n    *aservice = NULL;\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    error = FT_ERR( Invalid_Argument );\n\n    if ( FT_HAS_MULTIPLE_MASTERS( face ) )\n    {\n      FT_FACE_LOOKUP_SERVICE( face,\n                              *aservice,\n                              MULTI_MASTERS );\n\n      if ( *aservice )\n        error = FT_Err_Ok;\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftmm.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_Multi_Master( FT_Face           face,\n                       FT_Multi_Master  *amaster )\n  {\n    FT_Error                 error;\n    FT_Service_MultiMasters  service;\n\n\n    /* check of `face' delayed to `ft_face_get_mm_service' */\n\n    if ( !amaster )\n      return FT_THROW( Invalid_Argument );\n\n    error = ft_face_get_mm_service( face, &service );\n    if ( !error )\n    {\n      error = FT_ERR( Invalid_Argument );\n      if ( service->get_mm )\n        error = service->get_mm( face, amaster );\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftmm.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_MM_Var( FT_Face      face,\n                 FT_MM_Var*  *amaster )\n  {\n    FT_Error                 error;\n    FT_Service_MultiMasters  service;\n\n\n    /* check of `face' delayed to `ft_face_get_mm_service' */\n\n    if ( !amaster )\n      return FT_THROW( Invalid_Argument );\n\n    error = ft_face_get_mm_service( face, &service );\n    if ( !error )\n    {\n      error = FT_ERR( Invalid_Argument );\n      if ( service->get_mm_var )\n        error = service->get_mm_var( face, amaster );\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftmm.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Set_MM_Design_Coordinates( FT_Face   face,\n                                FT_UInt   num_coords,\n                                FT_Long*  coords )\n  {\n    FT_Error                 error;\n    FT_Service_MultiMasters  service;\n\n\n    /* check of `face' delayed to `ft_face_get_mm_service' */\n\n    if ( !coords )\n      return FT_THROW( Invalid_Argument );\n\n    error = ft_face_get_mm_service( face, &service );\n    if ( !error )\n    {\n      error = FT_ERR( Invalid_Argument );\n      if ( service->set_mm_design )\n        error = service->set_mm_design( face, num_coords, coords );\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftmm.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Set_Var_Design_Coordinates( FT_Face    face,\n                                 FT_UInt    num_coords,\n                                 FT_Fixed*  coords )\n  {\n    FT_Error                 error;\n    FT_Service_MultiMasters  service;\n\n\n    /* check of `face' delayed to `ft_face_get_mm_service' */\n\n    if ( !coords )\n      return FT_THROW( Invalid_Argument );\n\n    error = ft_face_get_mm_service( face, &service );\n    if ( !error )\n    {\n      error = FT_ERR( Invalid_Argument );\n      if ( service->set_var_design )\n        error = service->set_var_design( face, num_coords, coords );\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftmm.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Set_MM_Blend_Coordinates( FT_Face    face,\n                               FT_UInt    num_coords,\n                               FT_Fixed*  coords )\n  {\n    FT_Error                 error;\n    FT_Service_MultiMasters  service;\n\n\n    /* check of `face' delayed to `ft_face_get_mm_service' */\n\n    if ( !coords )\n      return FT_THROW( Invalid_Argument );\n\n    error = ft_face_get_mm_service( face, &service );\n    if ( !error )\n    {\n      error = FT_ERR( Invalid_Argument );\n      if ( service->set_mm_blend )\n         error = service->set_mm_blend( face, num_coords, coords );\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftmm.h */\n\n  /* This is exactly the same as the previous function.  It exists for */\n  /* orthogonality.                                                    */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Set_Var_Blend_Coordinates( FT_Face    face,\n                                FT_UInt    num_coords,\n                                FT_Fixed*  coords )\n  {\n    FT_Error                 error;\n    FT_Service_MultiMasters  service;\n\n\n    /* check of `face' delayed to `ft_face_get_mm_service' */\n\n    if ( !coords )\n      return FT_THROW( Invalid_Argument );\n\n    error = ft_face_get_mm_service( face, &service );\n    if ( !error )\n    {\n      error = FT_ERR( Invalid_Argument );\n      if ( service->set_mm_blend )\n         error = service->set_mm_blend( face, num_coords, coords );\n    }\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftobjs.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftobjs.c                                                               */\n/*                                                                         */\n/*    The FreeType private base classes (body).                            */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_LIST_H\n#include FT_OUTLINE_H\n#include FT_INTERNAL_VALIDATE_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_RFORK_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_SFNT_H    /* for SFNT_Load_Table_Func */\n#include FT_TRUETYPE_TABLES_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_TRUETYPE_IDS_H\n\n#include FT_SERVICE_PROPERTIES_H\n#include FT_SERVICE_SFNT_H\n#include FT_SERVICE_POSTSCRIPT_NAME_H\n#include FT_SERVICE_GLYPH_DICT_H\n#include FT_SERVICE_TT_CMAP_H\n#include FT_SERVICE_KERNING_H\n#include FT_SERVICE_TRUETYPE_ENGINE_H\n\n#ifdef FT_CONFIG_OPTION_MAC_FONTS\n#include \"ftbase.h\"\n#endif\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n#include FT_BITMAP_H\n\n#if defined( _MSC_VER )      /* Visual C++ (and Intel C++)   */\n  /* We disable the warning `conversion from XXX to YYY,     */\n  /* possible loss of data' in order to compile cleanly with */\n  /* the maximum level of warnings: `md5.c' is non-FreeType  */\n  /* code, and it gets used during development builds only.  */\n#pragma warning( push )\n#pragma warning( disable : 4244 )\n#endif /* _MSC_VER */\n\n  /* it's easiest to include `md5.c' directly */\n#include \"md5.c\"\n\n#if defined( _MSC_VER )\n#pragma warning( pop )\n#endif\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n\n#define GRID_FIT_METRICS\n\n\n  FT_BASE_DEF( FT_Pointer )\n  ft_service_list_lookup( FT_ServiceDesc  service_descriptors,\n                          const char*     service_id )\n  {\n    FT_Pointer      result = NULL;\n    FT_ServiceDesc  desc   = service_descriptors;\n\n\n    if ( desc && service_id )\n    {\n      for ( ; desc->serv_id != NULL; desc++ )\n      {\n        if ( ft_strcmp( desc->serv_id, service_id ) == 0 )\n        {\n          result = (FT_Pointer)desc->serv_data;\n          break;\n        }\n      }\n    }\n\n    return result;\n  }\n\n\n  FT_BASE_DEF( void )\n  ft_validator_init( FT_Validator        valid,\n                     const FT_Byte*      base,\n                     const FT_Byte*      limit,\n                     FT_ValidationLevel  level )\n  {\n    valid->base  = base;\n    valid->limit = limit;\n    valid->level = level;\n    valid->error = FT_Err_Ok;\n  }\n\n\n  FT_BASE_DEF( FT_Int )\n  ft_validator_run( FT_Validator  valid )\n  {\n    /* This function doesn't work!  None should call it. */\n    FT_UNUSED( valid );\n\n    return -1;\n  }\n\n\n  FT_BASE_DEF( void )\n  ft_validator_error( FT_Validator  valid,\n                      FT_Error      error )\n  {\n    /* since the cast below also disables the compiler's */\n    /* type check, we introduce a dummy variable, which  */\n    /* will be optimized away                            */\n    volatile ft_jmp_buf* jump_buffer = &valid->jump_buffer;\n\n\n    valid->error = error;\n\n    /* throw away volatileness; use `jump_buffer' or the  */\n    /* compiler may warn about an unused local variable   */\n    ft_longjmp( *(ft_jmp_buf*) jump_buffer, 1 );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                           S T R E A M                           ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* create a new input stream from an FT_Open_Args structure */\n  /*                                                          */\n  FT_BASE_DEF( FT_Error )\n  FT_Stream_New( FT_Library           library,\n                 const FT_Open_Args*  args,\n                 FT_Stream           *astream )\n  {\n    FT_Error   error;\n    FT_Memory  memory;\n    FT_Stream  stream = NULL;\n\n\n    *astream = 0;\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !args )\n      return FT_THROW( Invalid_Argument );\n\n    memory = library->memory;\n\n    if ( FT_NEW( stream ) )\n      goto Exit;\n\n    stream->memory = memory;\n\n    if ( args->flags & FT_OPEN_MEMORY )\n    {\n      /* create a memory-based stream */\n      FT_Stream_OpenMemory( stream,\n                            (const FT_Byte*)args->memory_base,\n                            args->memory_size );\n    }\n\n#ifndef FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT\n\n    else if ( args->flags & FT_OPEN_PATHNAME )\n    {\n      /* create a normal system stream */\n      error = FT_Stream_Open( stream, args->pathname );\n      stream->pathname.pointer = args->pathname;\n    }\n    else if ( ( args->flags & FT_OPEN_STREAM ) && args->stream )\n    {\n      /* use an existing, user-provided stream */\n\n      /* in this case, we do not need to allocate a new stream object */\n      /* since the caller is responsible for closing it himself       */\n      FT_FREE( stream );\n      stream = args->stream;\n    }\n\n#endif\n\n    else\n      error = FT_THROW( Invalid_Argument );\n\n    if ( error )\n      FT_FREE( stream );\n    else\n      stream->memory = memory;  /* just to be certain */\n\n    *astream = stream;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_BASE_DEF( void )\n  FT_Stream_Free( FT_Stream  stream,\n                  FT_Int     external )\n  {\n    if ( stream )\n    {\n      FT_Memory  memory = stream->memory;\n\n\n      FT_Stream_Close( stream );\n\n      if ( !external )\n        FT_FREE( stream );\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_objs\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****               FACE, SIZE & GLYPH SLOT OBJECTS                   ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  static FT_Error\n  ft_glyphslot_init( FT_GlyphSlot  slot )\n  {\n    FT_Driver         driver   = slot->face->driver;\n    FT_Driver_Class   clazz    = driver->clazz;\n    FT_Memory         memory   = driver->root.memory;\n    FT_Error          error    = FT_Err_Ok;\n    FT_Slot_Internal  internal = NULL;\n\n\n    slot->library = driver->root.library;\n\n    if ( FT_NEW( internal ) )\n      goto Exit;\n\n    slot->internal = internal;\n\n    if ( FT_DRIVER_USES_OUTLINES( driver ) )\n      error = FT_GlyphLoader_New( memory, &internal->loader );\n\n    if ( !error && clazz->init_slot )\n      error = clazz->init_slot( slot );\n\n  Exit:\n    return error;\n  }\n\n\n  FT_BASE_DEF( void )\n  ft_glyphslot_free_bitmap( FT_GlyphSlot  slot )\n  {\n    if ( slot->internal && ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )\n    {\n      FT_Memory  memory = FT_FACE_MEMORY( slot->face );\n\n\n      FT_FREE( slot->bitmap.buffer );\n      slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;\n    }\n    else\n    {\n      /* assume that the bitmap buffer was stolen or not */\n      /* allocated from the heap                         */\n      slot->bitmap.buffer = NULL;\n    }\n  }\n\n\n  FT_BASE_DEF( void )\n  ft_glyphslot_set_bitmap( FT_GlyphSlot  slot,\n                           FT_Byte*      buffer )\n  {\n    ft_glyphslot_free_bitmap( slot );\n\n    slot->bitmap.buffer = buffer;\n\n    FT_ASSERT( (slot->internal->flags & FT_GLYPH_OWN_BITMAP) == 0 );\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  ft_glyphslot_alloc_bitmap( FT_GlyphSlot  slot,\n                             FT_ULong      size )\n  {\n    FT_Memory  memory = FT_FACE_MEMORY( slot->face );\n    FT_Error   error;\n\n\n    if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )\n      FT_FREE( slot->bitmap.buffer );\n    else\n      slot->internal->flags |= FT_GLYPH_OWN_BITMAP;\n\n    (void)FT_ALLOC( slot->bitmap.buffer, size );\n    return error;\n  }\n\n\n  static void\n  ft_glyphslot_clear( FT_GlyphSlot  slot )\n  {\n    /* free bitmap if needed */\n    ft_glyphslot_free_bitmap( slot );\n\n    /* clear all public fields in the glyph slot */\n    FT_ZERO( &slot->metrics );\n    FT_ZERO( &slot->outline );\n\n    slot->bitmap.width      = 0;\n    slot->bitmap.rows       = 0;\n    slot->bitmap.pitch      = 0;\n    slot->bitmap.pixel_mode = 0;\n    /* `slot->bitmap.buffer' has been handled by ft_glyphslot_free_bitmap */\n\n    slot->bitmap_left   = 0;\n    slot->bitmap_top    = 0;\n    slot->num_subglyphs = 0;\n    slot->subglyphs     = 0;\n    slot->control_data  = 0;\n    slot->control_len   = 0;\n    slot->other         = 0;\n    slot->format        = FT_GLYPH_FORMAT_NONE;\n\n    slot->linearHoriAdvance = 0;\n    slot->linearVertAdvance = 0;\n    slot->lsb_delta         = 0;\n    slot->rsb_delta         = 0;\n  }\n\n\n  static void\n  ft_glyphslot_done( FT_GlyphSlot  slot )\n  {\n    FT_Driver        driver = slot->face->driver;\n    FT_Driver_Class  clazz  = driver->clazz;\n    FT_Memory        memory = driver->root.memory;\n\n\n    if ( clazz->done_slot )\n      clazz->done_slot( slot );\n\n    /* free bitmap buffer if needed */\n    ft_glyphslot_free_bitmap( slot );\n\n    /* slot->internal might be NULL in out-of-memory situations */\n    if ( slot->internal )\n    {\n      /* free glyph loader */\n      if ( FT_DRIVER_USES_OUTLINES( driver ) )\n      {\n        FT_GlyphLoader_Done( slot->internal->loader );\n        slot->internal->loader = 0;\n      }\n\n      FT_FREE( slot->internal );\n    }\n  }\n\n\n  /* documentation is in ftobjs.h */\n\n  FT_BASE_DEF( FT_Error )\n  FT_New_GlyphSlot( FT_Face        face,\n                    FT_GlyphSlot  *aslot )\n  {\n    FT_Error         error;\n    FT_Driver        driver;\n    FT_Driver_Class  clazz;\n    FT_Memory        memory;\n    FT_GlyphSlot     slot = NULL;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !face->driver )\n      return FT_THROW( Invalid_Argument );\n\n    driver = face->driver;\n    clazz  = driver->clazz;\n    memory = driver->root.memory;\n\n    FT_TRACE4(( \"FT_New_GlyphSlot: Creating new slot object\\n\" ));\n    if ( !FT_ALLOC( slot, clazz->slot_object_size ) )\n    {\n      slot->face = face;\n\n      error = ft_glyphslot_init( slot );\n      if ( error )\n      {\n        ft_glyphslot_done( slot );\n        FT_FREE( slot );\n        goto Exit;\n      }\n\n      slot->next  = face->glyph;\n      face->glyph = slot;\n\n      if ( aslot )\n        *aslot = slot;\n    }\n    else if ( aslot )\n      *aslot = 0;\n\n\n  Exit:\n    FT_TRACE4(( \"FT_New_GlyphSlot: Return %d\\n\", error ));\n    return error;\n  }\n\n\n  /* documentation is in ftobjs.h */\n\n  FT_BASE_DEF( void )\n  FT_Done_GlyphSlot( FT_GlyphSlot  slot )\n  {\n    if ( slot )\n    {\n      FT_Driver     driver = slot->face->driver;\n      FT_Memory     memory = driver->root.memory;\n      FT_GlyphSlot  prev;\n      FT_GlyphSlot  cur;\n\n\n      /* Remove slot from its parent face's list */\n      prev = NULL;\n      cur  = slot->face->glyph;\n\n      while ( cur )\n      {\n        if ( cur == slot )\n        {\n          if ( !prev )\n            slot->face->glyph = cur->next;\n          else\n            prev->next = cur->next;\n\n          /* finalize client-specific data */\n          if ( slot->generic.finalizer )\n            slot->generic.finalizer( slot );\n\n          ft_glyphslot_done( slot );\n          FT_FREE( slot );\n          break;\n        }\n        prev = cur;\n        cur  = cur->next;\n      }\n    }\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Set_Transform( FT_Face     face,\n                    FT_Matrix*  matrix,\n                    FT_Vector*  delta )\n  {\n    FT_Face_Internal  internal;\n\n\n    if ( !face )\n      return;\n\n    internal = face->internal;\n\n    internal->transform_flags = 0;\n\n    if ( !matrix )\n    {\n      internal->transform_matrix.xx = 0x10000L;\n      internal->transform_matrix.xy = 0;\n      internal->transform_matrix.yx = 0;\n      internal->transform_matrix.yy = 0x10000L;\n\n      matrix = &internal->transform_matrix;\n    }\n    else\n      internal->transform_matrix = *matrix;\n\n    /* set transform_flags bit flag 0 if `matrix' isn't the identity */\n    if ( ( matrix->xy | matrix->yx ) ||\n         matrix->xx != 0x10000L      ||\n         matrix->yy != 0x10000L      )\n      internal->transform_flags |= 1;\n\n    if ( !delta )\n    {\n      internal->transform_delta.x = 0;\n      internal->transform_delta.y = 0;\n\n      delta = &internal->transform_delta;\n    }\n    else\n      internal->transform_delta = *delta;\n\n    /* set transform_flags bit flag 1 if `delta' isn't the null vector */\n    if ( delta->x | delta->y )\n      internal->transform_flags |= 2;\n  }\n\n\n  static FT_Renderer\n  ft_lookup_glyph_renderer( FT_GlyphSlot  slot );\n\n\n#ifdef GRID_FIT_METRICS\n  static void\n  ft_glyphslot_grid_fit_metrics( FT_GlyphSlot  slot,\n                                 FT_Bool       vertical )\n  {\n    FT_Glyph_Metrics*  metrics = &slot->metrics;\n    FT_Pos             right, bottom;\n\n\n    if ( vertical )\n    {\n      metrics->horiBearingX = FT_PIX_FLOOR( metrics->horiBearingX );\n      metrics->horiBearingY = FT_PIX_CEIL ( metrics->horiBearingY );\n\n      right  = FT_PIX_CEIL( metrics->vertBearingX + metrics->width );\n      bottom = FT_PIX_CEIL( metrics->vertBearingY + metrics->height );\n\n      metrics->vertBearingX = FT_PIX_FLOOR( metrics->vertBearingX );\n      metrics->vertBearingY = FT_PIX_FLOOR( metrics->vertBearingY );\n\n      metrics->width  = right - metrics->vertBearingX;\n      metrics->height = bottom - metrics->vertBearingY;\n    }\n    else\n    {\n      metrics->vertBearingX = FT_PIX_FLOOR( metrics->vertBearingX );\n      metrics->vertBearingY = FT_PIX_FLOOR( metrics->vertBearingY );\n\n      right  = FT_PIX_CEIL ( metrics->horiBearingX + metrics->width );\n      bottom = FT_PIX_FLOOR( metrics->horiBearingY - metrics->height );\n\n      metrics->horiBearingX = FT_PIX_FLOOR( metrics->horiBearingX );\n      metrics->horiBearingY = FT_PIX_CEIL ( metrics->horiBearingY );\n\n      metrics->width  = right - metrics->horiBearingX;\n      metrics->height = metrics->horiBearingY - bottom;\n    }\n\n    metrics->horiAdvance = FT_PIX_ROUND( metrics->horiAdvance );\n    metrics->vertAdvance = FT_PIX_ROUND( metrics->vertAdvance );\n  }\n#endif /* GRID_FIT_METRICS */\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Load_Glyph( FT_Face   face,\n                 FT_UInt   glyph_index,\n                 FT_Int32  load_flags )\n  {\n    FT_Error      error;\n    FT_Driver     driver;\n    FT_GlyphSlot  slot;\n    FT_Library    library;\n    FT_Bool       autohint = FALSE;\n    FT_Module     hinter;\n    TT_Face       ttface = (TT_Face)face;\n\n\n    if ( !face || !face->size || !face->glyph )\n      return FT_THROW( Invalid_Face_Handle );\n\n    /* The validity test for `glyph_index' is performed by the */\n    /* font drivers.                                           */\n\n    slot = face->glyph;\n    ft_glyphslot_clear( slot );\n\n    driver  = face->driver;\n    library = driver->root.library;\n    hinter  = library->auto_hinter;\n\n    /* resolve load flags dependencies */\n\n    if ( load_flags & FT_LOAD_NO_RECURSE )\n      load_flags |= FT_LOAD_NO_SCALE         |\n                    FT_LOAD_IGNORE_TRANSFORM;\n\n    if ( load_flags & FT_LOAD_NO_SCALE )\n    {\n      load_flags |= FT_LOAD_NO_HINTING |\n                    FT_LOAD_NO_BITMAP;\n\n      load_flags &= ~FT_LOAD_RENDER;\n    }\n\n    /*\n     * Determine whether we need to auto-hint or not.\n     * The general rules are:\n     *\n     * - Do only auto-hinting if we have a hinter module, a scalable font\n     *   format dealing with outlines, and no transforms except simple\n     *   slants and/or rotations by integer multiples of 90 degrees.\n     *\n     * - Then, auto-hint if FT_LOAD_FORCE_AUTOHINT is set or if we don't\n     *   have a native font hinter.\n     *\n     * - Otherwise, auto-hint for LIGHT hinting mode or if there isn't\n     *   any hinting bytecode in the TrueType/OpenType font.\n     *\n     * - Exception: The font is `tricky' and requires the native hinter to\n     *   load properly.\n     */\n\n    if ( hinter                                           &&\n         !( load_flags & FT_LOAD_NO_HINTING )             &&\n         !( load_flags & FT_LOAD_NO_AUTOHINT )            &&\n         FT_DRIVER_IS_SCALABLE( driver )                  &&\n         FT_DRIVER_USES_OUTLINES( driver )                &&\n         !FT_IS_TRICKY( face )                            &&\n         ( ( load_flags & FT_LOAD_IGNORE_TRANSFORM )    ||\n           ( face->internal->transform_matrix.yx == 0 &&\n             face->internal->transform_matrix.xx != 0 ) ||\n           ( face->internal->transform_matrix.xx == 0 &&\n             face->internal->transform_matrix.yx != 0 ) ) )\n    {\n      if ( ( load_flags & FT_LOAD_FORCE_AUTOHINT ) ||\n           !FT_DRIVER_HAS_HINTER( driver )         )\n        autohint = TRUE;\n      else\n      {\n        FT_Render_Mode  mode = FT_LOAD_TARGET_MODE( load_flags );\n\n\n        /* the check for `num_locations' assures that we actually    */\n        /* test for instructions in a TTF and not in a CFF-based OTF */\n        /*                                                           */\n        /* since `maxSizeOfInstructions' might be unreliable, we     */\n        /* check the size of the `fpgm' and `prep' tables, too --    */\n        /* the assumption is that there don't exist real TTFs where  */\n        /* both `fpgm' and `prep' tables are missing                 */\n        if ( mode == FT_RENDER_MODE_LIGHT                       ||\n             face->internal->ignore_unpatented_hinter           ||\n             ( FT_IS_SFNT( face )                             &&\n               ttface->num_locations                          &&\n               ttface->max_profile.maxSizeOfInstructions == 0 &&\n               ttface->font_program_size == 0                 &&\n               ttface->cvt_program_size == 0                  ) )\n          autohint = TRUE;\n      }\n    }\n\n    if ( autohint )\n    {\n      FT_AutoHinter_Interface  hinting;\n\n\n      /* try to load embedded bitmaps first if available            */\n      /*                                                            */\n      /* XXX: This is really a temporary hack that should disappear */\n      /*      promptly with FreeType 2.1!                           */\n      /*                                                            */\n      if ( FT_HAS_FIXED_SIZES( face )             &&\n          ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )\n      {\n        error = driver->clazz->load_glyph( slot, face->size,\n                                           glyph_index,\n                                           load_flags | FT_LOAD_SBITS_ONLY );\n\n        if ( !error && slot->format == FT_GLYPH_FORMAT_BITMAP )\n          goto Load_Ok;\n      }\n\n      {\n        FT_Face_Internal  internal        = face->internal;\n        FT_Int            transform_flags = internal->transform_flags;\n\n\n        /* since the auto-hinter calls FT_Load_Glyph by itself, */\n        /* make sure that glyphs aren't transformed             */\n        internal->transform_flags = 0;\n\n        /* load auto-hinted outline */\n        hinting = (FT_AutoHinter_Interface)hinter->clazz->module_interface;\n\n        error   = hinting->load_glyph( (FT_AutoHinter)hinter,\n                                       slot, face->size,\n                                       glyph_index, load_flags );\n\n        internal->transform_flags = transform_flags;\n      }\n    }\n    else\n    {\n      error = driver->clazz->load_glyph( slot,\n                                         face->size,\n                                         glyph_index,\n                                         load_flags );\n      if ( error )\n        goto Exit;\n\n      if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )\n      {\n        /* check that the loaded outline is correct */\n        error = FT_Outline_Check( &slot->outline );\n        if ( error )\n          goto Exit;\n\n#ifdef GRID_FIT_METRICS\n        if ( !( load_flags & FT_LOAD_NO_HINTING ) )\n          ft_glyphslot_grid_fit_metrics( slot,\n              FT_BOOL( load_flags & FT_LOAD_VERTICAL_LAYOUT ) );\n#endif\n      }\n    }\n\n  Load_Ok:\n    /* compute the advance */\n    if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )\n    {\n      slot->advance.x = 0;\n      slot->advance.y = slot->metrics.vertAdvance;\n    }\n    else\n    {\n      slot->advance.x = slot->metrics.horiAdvance;\n      slot->advance.y = 0;\n    }\n\n    /* compute the linear advance in 16.16 pixels */\n    if ( ( load_flags & FT_LOAD_LINEAR_DESIGN ) == 0 &&\n         ( FT_IS_SCALABLE( face ) )                  )\n    {\n      FT_Size_Metrics*  metrics = &face->size->metrics;\n\n\n      /* it's tricky! */\n      slot->linearHoriAdvance = FT_MulDiv( slot->linearHoriAdvance,\n                                           metrics->x_scale, 64 );\n\n      slot->linearVertAdvance = FT_MulDiv( slot->linearVertAdvance,\n                                           metrics->y_scale, 64 );\n    }\n\n    if ( ( load_flags & FT_LOAD_IGNORE_TRANSFORM ) == 0 )\n    {\n      FT_Face_Internal  internal = face->internal;\n\n\n      /* now, transform the glyph image if needed */\n      if ( internal->transform_flags )\n      {\n        /* get renderer */\n        FT_Renderer  renderer = ft_lookup_glyph_renderer( slot );\n\n\n        if ( renderer )\n          error = renderer->clazz->transform_glyph(\n                                     renderer, slot,\n                                     &internal->transform_matrix,\n                                     &internal->transform_delta );\n        else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )\n        {\n          /* apply `standard' transformation if no renderer is available */\n          if ( internal->transform_flags & 1 )\n            FT_Outline_Transform( &slot->outline,\n                                  &internal->transform_matrix );\n\n          if ( internal->transform_flags & 2 )\n            FT_Outline_Translate( &slot->outline,\n                                  internal->transform_delta.x,\n                                  internal->transform_delta.y );\n        }\n\n        /* transform advance */\n        FT_Vector_Transform( &slot->advance, &internal->transform_matrix );\n      }\n    }\n\n    FT_TRACE5(( \"  x advance: %d\\n\" , slot->advance.x ));\n    FT_TRACE5(( \"  y advance: %d\\n\" , slot->advance.y ));\n\n    FT_TRACE5(( \"  linear x advance: %d\\n\" , slot->linearHoriAdvance ));\n    FT_TRACE5(( \"  linear y advance: %d\\n\" , slot->linearVertAdvance ));\n\n    /* do we need to render the image now? */\n    if ( !error                                    &&\n         slot->format != FT_GLYPH_FORMAT_BITMAP    &&\n         slot->format != FT_GLYPH_FORMAT_COMPOSITE &&\n         load_flags & FT_LOAD_RENDER )\n    {\n      FT_Render_Mode  mode = FT_LOAD_TARGET_MODE( load_flags );\n\n\n      if ( mode == FT_RENDER_MODE_NORMAL      &&\n           (load_flags & FT_LOAD_MONOCHROME ) )\n        mode = FT_RENDER_MODE_MONO;\n\n      error = FT_Render_Glyph( slot, mode );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Load_Char( FT_Face   face,\n                FT_ULong  char_code,\n                FT_Int32  load_flags )\n  {\n    FT_UInt  glyph_index;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    glyph_index = (FT_UInt)char_code;\n    if ( face->charmap )\n      glyph_index = FT_Get_Char_Index( face, char_code );\n\n    return FT_Load_Glyph( face, glyph_index, load_flags );\n  }\n\n\n  /* destructor for sizes list */\n  static void\n  destroy_size( FT_Memory  memory,\n                FT_Size    size,\n                FT_Driver  driver )\n  {\n    /* finalize client-specific data */\n    if ( size->generic.finalizer )\n      size->generic.finalizer( size );\n\n    /* finalize format-specific stuff */\n    if ( driver->clazz->done_size )\n      driver->clazz->done_size( size );\n\n    FT_FREE( size->internal );\n    FT_FREE( size );\n  }\n\n\n  static void\n  ft_cmap_done_internal( FT_CMap  cmap );\n\n\n  static void\n  destroy_charmaps( FT_Face    face,\n                    FT_Memory  memory )\n  {\n    FT_Int  n;\n\n\n    if ( !face )\n      return;\n\n    for ( n = 0; n < face->num_charmaps; n++ )\n    {\n      FT_CMap  cmap = FT_CMAP( face->charmaps[n] );\n\n\n      ft_cmap_done_internal( cmap );\n\n      face->charmaps[n] = NULL;\n    }\n\n    FT_FREE( face->charmaps );\n    face->num_charmaps = 0;\n  }\n\n\n  /* destructor for faces list */\n  static void\n  destroy_face( FT_Memory  memory,\n                FT_Face    face,\n                FT_Driver  driver )\n  {\n    FT_Driver_Class  clazz = driver->clazz;\n\n\n    /* discard auto-hinting data */\n    if ( face->autohint.finalizer )\n      face->autohint.finalizer( face->autohint.data );\n\n    /* Discard glyph slots for this face.                           */\n    /* Beware!  FT_Done_GlyphSlot() changes the field `face->glyph' */\n    while ( face->glyph )\n      FT_Done_GlyphSlot( face->glyph );\n\n    /* discard all sizes for this face */\n    FT_List_Finalize( &face->sizes_list,\n                      (FT_List_Destructor)destroy_size,\n                      memory,\n                      driver );\n    face->size = 0;\n\n    /* now discard client data */\n    if ( face->generic.finalizer )\n      face->generic.finalizer( face );\n\n    /* discard charmaps */\n    destroy_charmaps( face, memory );\n\n    /* finalize format-specific stuff */\n    if ( clazz->done_face )\n      clazz->done_face( face );\n\n    /* close the stream for this face if needed */\n    FT_Stream_Free(\n      face->stream,\n      ( face->face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 );\n\n    face->stream = 0;\n\n    /* get rid of it */\n    if ( face->internal )\n    {\n      FT_FREE( face->internal );\n    }\n    FT_FREE( face );\n  }\n\n\n  static void\n  Destroy_Driver( FT_Driver  driver )\n  {\n    FT_List_Finalize( &driver->faces_list,\n                      (FT_List_Destructor)destroy_face,\n                      driver->root.memory,\n                      driver );\n\n    /* check whether we need to drop the driver's glyph loader */\n    if ( FT_DRIVER_USES_OUTLINES( driver ) )\n      FT_GlyphLoader_Done( driver->glyph_loader );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    find_unicode_charmap                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function finds a Unicode charmap, if there is one.            */\n  /*    And if there is more than one, it tries to favour the more         */\n  /*    extensive one, i.e., one that supports UCS-4 against those which   */\n  /*    are limited to the BMP (said UCS-2 encoding.)                      */\n  /*                                                                       */\n  /*    This function is called from open_face() (just below), and also    */\n  /*    from FT_Select_Charmap( ..., FT_ENCODING_UNICODE ).                */\n  /*                                                                       */\n  static FT_Error\n  find_unicode_charmap( FT_Face  face )\n  {\n    FT_CharMap*  first;\n    FT_CharMap*  cur;\n\n\n    /* caller should have already checked that `face' is valid */\n    FT_ASSERT( face );\n\n    first = face->charmaps;\n\n    if ( !first )\n      return FT_THROW( Invalid_CharMap_Handle );\n\n    /*\n     *  The original TrueType specification(s) only specified charmap\n     *  formats that are capable of mapping 8 or 16 bit character codes to\n     *  glyph indices.\n     *\n     *  However, recent updates to the Apple and OpenType specifications\n     *  introduced new formats that are capable of mapping 32-bit character\n     *  codes as well.  And these are already used on some fonts, mainly to\n     *  map non-BMP Asian ideographs as defined in Unicode.\n     *\n     *  For compatibility purposes, these fonts generally come with\n     *  *several* Unicode charmaps:\n     *\n     *   - One of them in the \"old\" 16-bit format, that cannot access\n     *     all glyphs in the font.\n     *\n     *   - Another one in the \"new\" 32-bit format, that can access all\n     *     the glyphs.\n     *\n     *  This function has been written to always favor a 32-bit charmap\n     *  when found.  Otherwise, a 16-bit one is returned when found.\n     */\n\n    /* Since the `interesting' table, with IDs (3,10), is normally the */\n    /* last one, we loop backwards.  This loses with type1 fonts with  */\n    /* non-BMP characters (<.0001%), this wins with .ttf with non-BMP  */\n    /* chars (.01% ?), and this is the same about 99.99% of the time!  */\n\n    cur = first + face->num_charmaps;  /* points after the last one */\n\n    for ( ; --cur >= first; )\n    {\n      if ( cur[0]->encoding == FT_ENCODING_UNICODE )\n      {\n        /* XXX If some new encodings to represent UCS-4 are added, */\n        /*     they should be added here.                          */\n        if ( ( cur[0]->platform_id == TT_PLATFORM_MICROSOFT &&\n               cur[0]->encoding_id == TT_MS_ID_UCS_4        )     ||\n             ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE &&\n               cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32    ) )\n        {\n          face->charmap = cur[0];\n          return FT_Err_Ok;\n        }\n      }\n    }\n\n    /* We do not have any UCS-4 charmap.                */\n    /* Do the loop again and search for UCS-2 charmaps. */\n    cur = first + face->num_charmaps;\n\n    for ( ; --cur >= first; )\n    {\n      if ( cur[0]->encoding == FT_ENCODING_UNICODE )\n      {\n        face->charmap = cur[0];\n        return FT_Err_Ok;\n      }\n    }\n\n    return FT_THROW( Invalid_CharMap_Handle );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    find_variant_selector_charmap                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function finds the variant selector charmap, if there is one. */\n  /*    There can only be one (platform=0, specific=5, format=14).         */\n  /*                                                                       */\n  static FT_CharMap\n  find_variant_selector_charmap( FT_Face  face )\n  {\n    FT_CharMap*  first;\n    FT_CharMap*  end;\n    FT_CharMap*  cur;\n\n\n    /* caller should have already checked that `face' is valid */\n    FT_ASSERT( face );\n\n    first = face->charmaps;\n\n    if ( !first )\n      return NULL;\n\n    end = first + face->num_charmaps;  /* points after the last one */\n\n    for ( cur = first; cur < end; ++cur )\n    {\n      if ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE    &&\n           cur[0]->encoding_id == TT_APPLE_ID_VARIANT_SELECTOR &&\n           FT_Get_CMap_Format( cur[0] ) == 14                  )\n        return cur[0];\n    }\n\n    return NULL;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    open_face                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function does some work for FT_Open_Face().                   */\n  /*                                                                       */\n  static FT_Error\n  open_face( FT_Driver      driver,\n             FT_Stream      *astream,\n             FT_Bool        external_stream,\n             FT_Long        face_index,\n             FT_Int         num_params,\n             FT_Parameter*  params,\n             FT_Face       *aface )\n  {\n    FT_Memory         memory;\n    FT_Driver_Class   clazz;\n    FT_Face           face     = NULL;\n    FT_Face_Internal  internal = NULL;\n\n    FT_Error          error, error2;\n\n\n    clazz  = driver->clazz;\n    memory = driver->root.memory;\n\n    /* allocate the face object and perform basic initialization */\n    if ( FT_ALLOC( face, clazz->face_object_size ) )\n      goto Fail;\n\n    face->driver = driver;\n    face->memory = memory;\n    face->stream = *astream;\n\n    /* set the FT_FACE_FLAG_EXTERNAL_STREAM bit for FT_Done_Face */\n    if ( external_stream )\n      face->face_flags |= FT_FACE_FLAG_EXTERNAL_STREAM;\n\n    if ( FT_NEW( internal ) )\n      goto Fail;\n\n    face->internal = internal;\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    {\n      int  i;\n\n\n      face->internal->incremental_interface = 0;\n      for ( i = 0; i < num_params && !face->internal->incremental_interface;\n            i++ )\n        if ( params[i].tag == FT_PARAM_TAG_INCREMENTAL )\n          face->internal->incremental_interface =\n            (FT_Incremental_Interface)params[i].data;\n    }\n#endif\n\n    if ( clazz->init_face )\n      error = clazz->init_face( *astream,\n                                face,\n                                (FT_Int)face_index,\n                                num_params,\n                                params );\n    *astream = face->stream; /* Stream may have been changed. */\n    if ( error )\n      goto Fail;\n\n    /* select Unicode charmap by default */\n    error2 = find_unicode_charmap( face );\n\n    /* if no Unicode charmap can be found, FT_Err_Invalid_CharMap_Handle */\n    /* is returned.                                                      */\n\n    /* no error should happen, but we want to play safe */\n    if ( error2 && FT_ERR_NEQ( error2, Invalid_CharMap_Handle ) )\n    {\n      error = error2;\n      goto Fail;\n    }\n\n    *aface = face;\n\n  Fail:\n    if ( error )\n    {\n      destroy_charmaps( face, memory );\n      if ( clazz->done_face )\n        clazz->done_face( face );\n      FT_FREE( internal );\n      FT_FREE( face );\n      *aface = 0;\n    }\n\n    return error;\n  }\n\n\n  /* there's a Mac-specific extended implementation of FT_New_Face() */\n  /* in src/base/ftmac.c                                             */\n\n#ifndef FT_MACINTOSH\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_New_Face( FT_Library   library,\n               const char*  pathname,\n               FT_Long      face_index,\n               FT_Face     *aface )\n  {\n    FT_Open_Args  args;\n\n\n    /* test for valid `library' and `aface' delayed to `FT_Open_Face' */\n    if ( !pathname )\n      return FT_THROW( Invalid_Argument );\n\n    args.flags    = FT_OPEN_PATHNAME;\n    args.pathname = (char*)pathname;\n    args.stream   = NULL;\n\n    return FT_Open_Face( library, &args, face_index, aface );\n  }\n\n#endif\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_New_Memory_Face( FT_Library      library,\n                      const FT_Byte*  file_base,\n                      FT_Long         file_size,\n                      FT_Long         face_index,\n                      FT_Face        *aface )\n  {\n    FT_Open_Args  args;\n\n\n    /* test for valid `library' and `face' delayed to `FT_Open_Face' */\n    if ( !file_base )\n      return FT_THROW( Invalid_Argument );\n\n    args.flags       = FT_OPEN_MEMORY;\n    args.memory_base = file_base;\n    args.memory_size = file_size;\n    args.stream      = NULL;\n\n    return FT_Open_Face( library, &args, face_index, aface );\n  }\n\n\n#ifdef FT_CONFIG_OPTION_MAC_FONTS\n\n  /* The behavior here is very similar to that in base/ftmac.c, but it     */\n  /* is designed to work on non-mac systems, so no mac specific calls.     */\n  /*                                                                       */\n  /* We look at the file and determine if it is a mac dfont file or a mac  */\n  /* resource file, or a macbinary file containing a mac resource file.    */\n  /*                                                                       */\n  /* Unlike ftmac I'm not going to look at a `FOND'.  I don't really see   */\n  /* the point, especially since there may be multiple `FOND' resources.   */\n  /* Instead I'll just look for `sfnt' and `POST' resources, ordered as    */\n  /* they occur in the file.                                               */\n  /*                                                                       */\n  /* Note that multiple `POST' resources do not mean multiple postscript   */\n  /* fonts; they all get jammed together to make what is essentially a     */\n  /* pfb file.                                                             */\n  /*                                                                       */\n  /* We aren't interested in `NFNT' or `FONT' bitmap resources.            */\n  /*                                                                       */\n  /* As soon as we get an `sfnt' load it into memory and pass it off to    */\n  /* FT_Open_Face.                                                         */\n  /*                                                                       */\n  /* If we have a (set of) `POST' resources, massage them into a (memory)  */\n  /* pfb file and pass that to FT_Open_Face.  (As with ftmac.c I'm not     */\n  /* going to try to save the kerning info.  After all that lives in the   */\n  /* `FOND' which isn't in the file containing the `POST' resources so     */\n  /* we don't really have access to it.                                    */\n\n\n  /* Finalizer for a memory stream; gets called by FT_Done_Face(). */\n  /* It frees the memory it uses.                                  */\n  /* From ftmac.c.                                                 */\n  static void\n  memory_stream_close( FT_Stream  stream )\n  {\n    FT_Memory  memory = stream->memory;\n\n\n    FT_FREE( stream->base );\n\n    stream->size  = 0;\n    stream->base  = 0;\n    stream->close = 0;\n  }\n\n\n  /* Create a new memory stream from a buffer and a size. */\n  /* From ftmac.c.                                        */\n  static FT_Error\n  new_memory_stream( FT_Library           library,\n                     FT_Byte*             base,\n                     FT_ULong             size,\n                     FT_Stream_CloseFunc  close,\n                     FT_Stream           *astream )\n  {\n    FT_Error   error;\n    FT_Memory  memory;\n    FT_Stream  stream = NULL;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !base )\n      return FT_THROW( Invalid_Argument );\n\n    *astream = 0;\n    memory = library->memory;\n    if ( FT_NEW( stream ) )\n      goto Exit;\n\n    FT_Stream_OpenMemory( stream, base, size );\n\n    stream->close = close;\n\n    *astream = stream;\n\n  Exit:\n    return error;\n  }\n\n\n  /* Create a new FT_Face given a buffer and a driver name. */\n  /* from ftmac.c */\n  FT_LOCAL_DEF( FT_Error )\n  open_face_from_buffer( FT_Library   library,\n                         FT_Byte*     base,\n                         FT_ULong     size,\n                         FT_Long      face_index,\n                         const char*  driver_name,\n                         FT_Face     *aface )\n  {\n    FT_Open_Args  args;\n    FT_Error      error;\n    FT_Stream     stream = NULL;\n    FT_Memory     memory = library->memory;\n\n\n    error = new_memory_stream( library,\n                               base,\n                               size,\n                               memory_stream_close,\n                               &stream );\n    if ( error )\n    {\n      FT_FREE( base );\n      return error;\n    }\n\n    args.flags = FT_OPEN_STREAM;\n    args.stream = stream;\n    if ( driver_name )\n    {\n      args.flags = args.flags | FT_OPEN_DRIVER;\n      args.driver = FT_Get_Module( library, driver_name );\n    }\n\n#ifdef FT_MACINTOSH\n    /* At this point, face_index has served its purpose;      */\n    /* whoever calls this function has already used it to     */\n    /* locate the correct font data.  We should not propagate */\n    /* this index to FT_Open_Face() (unless it is negative).  */\n\n    if ( face_index > 0 )\n      face_index = 0;\n#endif\n\n    error = FT_Open_Face( library, &args, face_index, aface );\n\n    if ( error == FT_Err_Ok )\n      (*aface)->face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM;\n    else\n#ifdef FT_MACINTOSH\n      FT_Stream_Free( stream, 0 );\n#else\n    {\n      FT_Stream_Close( stream );\n      FT_FREE( stream );\n    }\n#endif\n\n    return error;\n  }\n\n\n  /* Look up `TYP1' or `CID ' table from sfnt table directory.       */\n  /* `offset' and `length' must exclude the binary header in tables. */\n\n  /* Type 1 and CID-keyed font drivers should recognize sfnt-wrapped */\n  /* format too.  Here, since we can't expect that the TrueType font */\n  /* driver is loaded unconditially, we must parse the font by       */\n  /* ourselves.  We are only interested in the name of the table and */\n  /* the offset.                                                     */\n\n  static FT_Error\n  ft_lookup_PS_in_sfnt_stream( FT_Stream  stream,\n                               FT_Long    face_index,\n                               FT_ULong*  offset,\n                               FT_ULong*  length,\n                               FT_Bool*   is_sfnt_cid )\n  {\n    FT_Error   error;\n    FT_UShort  numTables;\n    FT_Long    pstable_index;\n    FT_ULong   tag;\n    int        i;\n\n\n    *offset = 0;\n    *length = 0;\n    *is_sfnt_cid = FALSE;\n\n    /* TODO: support for sfnt-wrapped PS/CID in TTC format */\n\n    /* version check for 'typ1' (should be ignored?) */\n    if ( FT_READ_ULONG( tag ) )\n      return error;\n    if ( tag != TTAG_typ1 )\n      return FT_THROW( Unknown_File_Format );\n\n    if ( FT_READ_USHORT( numTables ) )\n      return error;\n    if ( FT_STREAM_SKIP( 2 * 3 ) ) /* skip binary search header */\n      return error;\n\n    pstable_index = -1;\n    *is_sfnt_cid  = FALSE;\n\n    for ( i = 0; i < numTables; i++ )\n    {\n      if ( FT_READ_ULONG( tag )     || FT_STREAM_SKIP( 4 )      ||\n           FT_READ_ULONG( *offset ) || FT_READ_ULONG( *length ) )\n        return error;\n\n      if ( tag == TTAG_CID )\n      {\n        pstable_index++;\n        *offset += 22;\n        *length -= 22;\n        *is_sfnt_cid = TRUE;\n        if ( face_index < 0 )\n          return FT_Err_Ok;\n      }\n      else if ( tag == TTAG_TYP1 )\n      {\n        pstable_index++;\n        *offset += 24;\n        *length -= 24;\n        *is_sfnt_cid = FALSE;\n        if ( face_index < 0 )\n          return FT_Err_Ok;\n      }\n      if ( face_index >= 0 && pstable_index == face_index )\n        return FT_Err_Ok;\n    }\n    return FT_THROW( Table_Missing );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  open_face_PS_from_sfnt_stream( FT_Library     library,\n                                 FT_Stream      stream,\n                                 FT_Long        face_index,\n                                 FT_Int         num_params,\n                                 FT_Parameter  *params,\n                                 FT_Face       *aface )\n  {\n    FT_Error   error;\n    FT_Memory  memory = library->memory;\n    FT_ULong   offset, length;\n    FT_Long    pos;\n    FT_Bool    is_sfnt_cid;\n    FT_Byte*   sfnt_ps = NULL;\n\n    FT_UNUSED( num_params );\n    FT_UNUSED( params );\n\n\n    pos = FT_Stream_Pos( stream );\n\n    error = ft_lookup_PS_in_sfnt_stream( stream,\n                                         face_index,\n                                         &offset,\n                                         &length,\n                                         &is_sfnt_cid );\n    if ( error )\n      goto Exit;\n\n    if ( FT_Stream_Seek( stream, pos + offset ) )\n      goto Exit;\n\n    if ( FT_ALLOC( sfnt_ps, (FT_Long)length ) )\n      goto Exit;\n\n    error = FT_Stream_Read( stream, (FT_Byte *)sfnt_ps, length );\n    if ( error )\n      goto Exit;\n\n    error = open_face_from_buffer( library,\n                                   sfnt_ps,\n                                   length,\n                                   FT_MIN( face_index, 0 ),\n                                   is_sfnt_cid ? \"cid\" : \"type1\",\n                                   aface );\n  Exit:\n    {\n      FT_Error  error1;\n\n\n      if ( FT_ERR_EQ( error, Unknown_File_Format ) )\n      {\n        error1 = FT_Stream_Seek( stream, pos );\n        if ( error1 )\n          return error1;\n      }\n\n      return error;\n    }\n  }\n\n\n#ifndef FT_MACINTOSH\n\n  /* The resource header says we've got resource_cnt `POST' (type1) */\n  /* resources in this file.  They all need to be coalesced into    */\n  /* one lump which gets passed on to the type1 driver.             */\n  /* Here can be only one PostScript font in a file so face_index   */\n  /* must be 0 (or -1).                                             */\n  /*                                                                */\n  static FT_Error\n  Mac_Read_POST_Resource( FT_Library  library,\n                          FT_Stream   stream,\n                          FT_Long    *offsets,\n                          FT_Long     resource_cnt,\n                          FT_Long     face_index,\n                          FT_Face    *aface )\n  {\n    FT_Error   error  = FT_ERR( Cannot_Open_Resource );\n    FT_Memory  memory = library->memory;\n    FT_Byte*   pfb_data = NULL;\n    int        i, type, flags;\n    FT_ULong   len;\n    FT_ULong   pfb_len, pfb_pos, pfb_lenpos;\n    FT_ULong   rlen, temp;\n\n\n    if ( face_index == -1 )\n      face_index = 0;\n    if ( face_index != 0 )\n      return error;\n\n    /* Find the length of all the POST resources, concatenated.  Assume */\n    /* worst case (each resource in its own section).                   */\n    pfb_len = 0;\n    for ( i = 0; i < resource_cnt; ++i )\n    {\n      error = FT_Stream_Seek( stream, offsets[i] );\n      if ( error )\n        goto Exit;\n      if ( FT_READ_ULONG( temp ) )\n        goto Exit;\n\n      /* FT2 allocator takes signed long buffer length,\n       * too large value causing overflow should be checked\n       */\n      FT_TRACE4(( \"                 POST fragment #%d: length=0x%08x\\n\",\n                  i, temp));\n      if ( 0x7FFFFFFFUL < temp || pfb_len + temp + 6 < pfb_len )\n      {\n        FT_TRACE2(( \"             too long fragment length makes\"\n                    \" pfb_len confused: temp=0x%08x\\n\", temp ));\n        error = FT_THROW( Invalid_Offset );\n        goto Exit;\n      }\n\n      pfb_len += temp + 6;\n    }\n\n    FT_TRACE2(( \"             total buffer size to concatenate %d\"\n                \" POST fragments: 0x%08x\\n\",\n                 resource_cnt, pfb_len + 2));\n    if ( pfb_len + 2 < 6 ) {\n      FT_TRACE2(( \"             too long fragment length makes\"\n                  \" pfb_len confused: pfb_len=0x%08x\\n\", pfb_len ));\n      error = FT_THROW( Array_Too_Large );\n      goto Exit;\n    }\n    if ( FT_ALLOC( pfb_data, (FT_Long)pfb_len + 2 ) )\n      goto Exit;\n\n    pfb_data[0] = 0x80;\n    pfb_data[1] = 1;            /* Ascii section */\n    pfb_data[2] = 0;            /* 4-byte length, fill in later */\n    pfb_data[3] = 0;\n    pfb_data[4] = 0;\n    pfb_data[5] = 0;\n    pfb_pos     = 6;\n    pfb_lenpos  = 2;\n\n    len = 0;\n    type = 1;\n    for ( i = 0; i < resource_cnt; ++i )\n    {\n      error = FT_Stream_Seek( stream, offsets[i] );\n      if ( error )\n        goto Exit2;\n      if ( FT_READ_ULONG( rlen ) )\n        goto Exit2;\n\n      /* FT2 allocator takes signed long buffer length,\n       * too large fragment length causing overflow should be checked\n       */\n      if ( 0x7FFFFFFFUL < rlen )\n      {\n        error = FT_THROW( Invalid_Offset );\n        goto Exit2;\n      }\n\n      if ( FT_READ_USHORT( flags ) )\n        goto Exit2;\n      FT_TRACE3(( \"POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\\n\",\n                   i, offsets[i], rlen, flags ));\n\n      error = FT_ERR( Array_Too_Large );\n      /* postpone the check of rlen longer than buffer until FT_Stream_Read() */\n      if ( ( flags >> 8 ) == 0 )        /* Comment, should not be loaded */\n      {\n        FT_TRACE3(( \"    Skip POST fragment #%d because it is a comment\\n\", i ));\n        continue;\n      }\n\n      /* the flags are part of the resource, so rlen >= 2.  */\n      /* but some fonts declare rlen = 0 for empty fragment */\n      if ( rlen > 2 )\n        rlen -= 2;\n      else\n        rlen = 0;\n\n      if ( ( flags >> 8 ) == type )\n        len += rlen;\n      else\n      {\n        FT_TRACE3(( \"    Write POST fragment #%d header (4-byte) to buffer\"\n                    \" 0x%p + 0x%08x\\n\", i, pfb_data, pfb_lenpos ));\n        if ( pfb_lenpos + 3 > pfb_len + 2 )\n          goto Exit2;\n        pfb_data[pfb_lenpos    ] = (FT_Byte)( len );\n        pfb_data[pfb_lenpos + 1] = (FT_Byte)( len >> 8 );\n        pfb_data[pfb_lenpos + 2] = (FT_Byte)( len >> 16 );\n        pfb_data[pfb_lenpos + 3] = (FT_Byte)( len >> 24 );\n\n        if ( ( flags >> 8 ) == 5 )      /* End of font mark */\n          break;\n\n        FT_TRACE3(( \"    Write POST fragment #%d header (6-byte) to buffer\"\n                    \" 0x%p + 0x%08x\\n\", i, pfb_data, pfb_pos ));\n        if ( pfb_pos + 6 > pfb_len + 2 )\n          goto Exit2;\n        pfb_data[pfb_pos++] = 0x80;\n\n        type = flags >> 8;\n        len = rlen;\n\n        pfb_data[pfb_pos++] = (FT_Byte)type;\n        pfb_lenpos          = pfb_pos;\n        pfb_data[pfb_pos++] = 0;        /* 4-byte length, fill in later */\n        pfb_data[pfb_pos++] = 0;\n        pfb_data[pfb_pos++] = 0;\n        pfb_data[pfb_pos++] = 0;\n      }\n\n      if ( pfb_pos > pfb_len || pfb_pos + rlen > pfb_len )\n        goto Exit2;\n\n      FT_TRACE3(( \"    Load POST fragment #%d (%d byte) to buffer\"\n                  \" 0x%p + 0x%08x\\n\", i, rlen, pfb_data, pfb_pos ));\n      error = FT_Stream_Read( stream, (FT_Byte *)pfb_data + pfb_pos, rlen );\n      if ( error )\n        goto Exit2;\n      pfb_pos += rlen;\n    }\n\n    error = FT_ERR( Array_Too_Large );\n    if ( pfb_pos + 2 > pfb_len + 2 )\n      goto Exit2;\n    pfb_data[pfb_pos++] = 0x80;\n    pfb_data[pfb_pos++] = 3;\n\n    if ( pfb_lenpos + 3 > pfb_len + 2 )\n      goto Exit2;\n    pfb_data[pfb_lenpos    ] = (FT_Byte)( len );\n    pfb_data[pfb_lenpos + 1] = (FT_Byte)( len >> 8 );\n    pfb_data[pfb_lenpos + 2] = (FT_Byte)( len >> 16 );\n    pfb_data[pfb_lenpos + 3] = (FT_Byte)( len >> 24 );\n\n    return open_face_from_buffer( library,\n                                  pfb_data,\n                                  pfb_pos,\n                                  face_index,\n                                  \"type1\",\n                                  aface );\n\n  Exit2:\n    if ( error == FT_ERR( Array_Too_Large ) )\n      FT_TRACE2(( \"  Abort due to too-short buffer to store\"\n                  \" all POST fragments\\n\" ));\n    else if ( error == FT_ERR( Invalid_Offset ) )\n      FT_TRACE2(( \"  Abort due to invalid offset in a POST fragment\\n\" ));\n    if ( error )\n      error = FT_ERR( Cannot_Open_Resource );\n    FT_FREE( pfb_data );\n\n  Exit:\n    return error;\n  }\n\n\n  /* The resource header says we've got resource_cnt `sfnt'      */\n  /* (TrueType/OpenType) resources in this file.  Look through   */\n  /* them for the one indicated by face_index, load it into mem, */\n  /* pass it on the the truetype driver and return it.           */\n  /*                                                             */\n  static FT_Error\n  Mac_Read_sfnt_Resource( FT_Library  library,\n                          FT_Stream   stream,\n                          FT_Long    *offsets,\n                          FT_Long     resource_cnt,\n                          FT_Long     face_index,\n                          FT_Face    *aface )\n  {\n    FT_Memory  memory = library->memory;\n    FT_Byte*   sfnt_data = NULL;\n    FT_Error   error;\n    FT_Long    flag_offset;\n    FT_Long    rlen;\n    int        is_cff;\n    FT_Long    face_index_in_resource = 0;\n\n\n    if ( face_index == -1 )\n      face_index = 0;\n    if ( face_index >= resource_cnt )\n      return FT_THROW( Cannot_Open_Resource );\n\n    flag_offset = offsets[face_index];\n    error = FT_Stream_Seek( stream, flag_offset );\n    if ( error )\n      goto Exit;\n\n    if ( FT_READ_LONG( rlen ) )\n      goto Exit;\n    if ( rlen == -1 )\n      return FT_THROW( Cannot_Open_Resource );\n\n    error = open_face_PS_from_sfnt_stream( library,\n                                           stream,\n                                           face_index,\n                                           0, NULL,\n                                           aface );\n    if ( !error )\n      goto Exit;\n\n    /* rewind sfnt stream before open_face_PS_from_sfnt_stream() */\n    if ( FT_Stream_Seek( stream, flag_offset + 4 ) )\n      goto Exit;\n\n    if ( FT_ALLOC( sfnt_data, (FT_Long)rlen ) )\n      return error;\n    error = FT_Stream_Read( stream, (FT_Byte *)sfnt_data, rlen );\n    if ( error )\n      goto Exit;\n\n    is_cff = rlen > 4 && !ft_memcmp( sfnt_data, \"OTTO\", 4 );\n    error = open_face_from_buffer( library,\n                                   sfnt_data,\n                                   rlen,\n                                   face_index_in_resource,\n                                   is_cff ? \"cff\" : \"truetype\",\n                                   aface );\n\n  Exit:\n    return error;\n  }\n\n\n  /* Check for a valid resource fork header, or a valid dfont    */\n  /* header.  In a resource fork the first 16 bytes are repeated */\n  /* at the location specified by bytes 4-7.  In a dfont bytes   */\n  /* 4-7 point to 16 bytes of zeroes instead.                    */\n  /*                                                             */\n  static FT_Error\n  IsMacResource( FT_Library  library,\n                 FT_Stream   stream,\n                 FT_Long     resource_offset,\n                 FT_Long     face_index,\n                 FT_Face    *aface )\n  {\n    FT_Memory  memory = library->memory;\n    FT_Error   error;\n    FT_Long    map_offset, rdara_pos;\n    FT_Long    *data_offsets;\n    FT_Long    count;\n\n\n    error = FT_Raccess_Get_HeaderInfo( library, stream, resource_offset,\n                                       &map_offset, &rdara_pos );\n    if ( error )\n      return error;\n\n    /* POST resources must be sorted to concatenate properly */\n    error = FT_Raccess_Get_DataOffsets( library, stream,\n                                        map_offset, rdara_pos,\n                                        TTAG_POST, TRUE,\n                                        &data_offsets, &count );\n    if ( !error )\n    {\n      error = Mac_Read_POST_Resource( library, stream, data_offsets, count,\n                                      face_index, aface );\n      FT_FREE( data_offsets );\n      /* POST exists in an LWFN providing a single face */\n      if ( !error )\n        (*aface)->num_faces = 1;\n      return error;\n    }\n\n    /* sfnt resources should not be sorted to preserve the face order by\n       QuickDraw API */\n    error = FT_Raccess_Get_DataOffsets( library, stream,\n                                        map_offset, rdara_pos,\n                                        TTAG_sfnt, FALSE,\n                                        &data_offsets, &count );\n    if ( !error )\n    {\n      FT_Long  face_index_internal = face_index % count;\n\n\n      error = Mac_Read_sfnt_Resource( library, stream, data_offsets, count,\n                                      face_index_internal, aface );\n      FT_FREE( data_offsets );\n      if ( !error )\n        (*aface)->num_faces = count;\n    }\n\n    return error;\n  }\n\n\n  /* Check for a valid macbinary header, and if we find one   */\n  /* check that the (flattened) resource fork in it is valid. */\n  /*                                                          */\n  static FT_Error\n  IsMacBinary( FT_Library  library,\n               FT_Stream   stream,\n               FT_Long     face_index,\n               FT_Face    *aface )\n  {\n    unsigned char  header[128];\n    FT_Error       error;\n    FT_Long        dlen, offset;\n\n\n    if ( NULL == stream )\n      return FT_THROW( Invalid_Stream_Operation );\n\n    error = FT_Stream_Seek( stream, 0 );\n    if ( error )\n      goto Exit;\n\n    error = FT_Stream_Read( stream, (FT_Byte*)header, 128 );\n    if ( error )\n      goto Exit;\n\n    if (            header[ 0] !=  0 ||\n                    header[74] !=  0 ||\n                    header[82] !=  0 ||\n                    header[ 1] ==  0 ||\n                    header[ 1] >  33 ||\n                    header[63] !=  0 ||\n         header[2 + header[1]] !=  0 )\n      return FT_THROW( Unknown_File_Format );\n\n    dlen = ( header[0x53] << 24 ) |\n           ( header[0x54] << 16 ) |\n           ( header[0x55] <<  8 ) |\n             header[0x56];\n#if 0\n    rlen = ( header[0x57] << 24 ) |\n           ( header[0x58] << 16 ) |\n           ( header[0x59] <<  8 ) |\n             header[0x5A];\n#endif /* 0 */\n    offset = 128 + ( ( dlen + 127 ) & ~127 );\n\n    return IsMacResource( library, stream, offset, face_index, aface );\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  load_face_in_embedded_rfork( FT_Library           library,\n                               FT_Stream            stream,\n                               FT_Long              face_index,\n                               FT_Face             *aface,\n                               const FT_Open_Args  *args )\n  {\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_raccess\n\n    FT_Memory  memory = library->memory;\n    FT_Error   error  = FT_ERR( Unknown_File_Format );\n    int        i;\n\n    char *     file_names[FT_RACCESS_N_RULES];\n    FT_Long    offsets[FT_RACCESS_N_RULES];\n    FT_Error   errors[FT_RACCESS_N_RULES];\n    FT_Bool    is_darwin_vfs, vfs_rfork_has_no_font = FALSE; /* not tested */\n\n    FT_Open_Args  args2;\n    FT_Stream     stream2 = 0;\n\n\n    FT_Raccess_Guess( library, stream,\n                      args->pathname, file_names, offsets, errors );\n\n    for ( i = 0; i < FT_RACCESS_N_RULES; i++ )\n    {\n      is_darwin_vfs = ft_raccess_rule_by_darwin_vfs( library, i );\n      if ( is_darwin_vfs && vfs_rfork_has_no_font )\n      {\n        FT_TRACE3(( \"Skip rule %d: darwin vfs resource fork\"\n                    \" is already checked and\"\n                    \" no font is found\\n\", i ));\n        continue;\n      }\n\n      if ( errors[i] )\n      {\n        FT_TRACE3(( \"Error[%d] has occurred in rule %d\\n\", errors[i], i ));\n        continue;\n      }\n\n      args2.flags    = FT_OPEN_PATHNAME;\n      args2.pathname = file_names[i] ? file_names[i] : args->pathname;\n\n      FT_TRACE3(( \"Try rule %d: %s (offset=%d) ...\",\n                  i, args2.pathname, offsets[i] ));\n\n      error = FT_Stream_New( library, &args2, &stream2 );\n      if ( is_darwin_vfs && FT_ERR_EQ( error, Cannot_Open_Stream ) )\n        vfs_rfork_has_no_font = TRUE;\n\n      if ( error )\n      {\n        FT_TRACE3(( \"failed\\n\" ));\n        continue;\n      }\n\n      error = IsMacResource( library, stream2, offsets[i],\n                             face_index, aface );\n      FT_Stream_Free( stream2, 0 );\n\n      FT_TRACE3(( \"%s\\n\", error ? \"failed\": \"successful\" ));\n\n      if ( !error )\n          break;\n      else if ( is_darwin_vfs )\n          vfs_rfork_has_no_font = TRUE;\n    }\n\n    for (i = 0; i < FT_RACCESS_N_RULES; i++)\n    {\n      if ( file_names[i] )\n        FT_FREE( file_names[i] );\n    }\n\n    /* Caller (load_mac_face) requires FT_Err_Unknown_File_Format. */\n    if ( error )\n      error = FT_ERR( Unknown_File_Format );\n\n    return error;\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_objs\n\n  }\n\n\n  /* Check for some macintosh formats without Carbon framework.    */\n  /* Is this a macbinary file?  If so look at the resource fork.   */\n  /* Is this a mac dfont file?                                     */\n  /* Is this an old style resource fork? (in data)                 */\n  /* Else call load_face_in_embedded_rfork to try extra rules      */\n  /* (defined in `ftrfork.c').                                     */\n  /*                                                               */\n  static FT_Error\n  load_mac_face( FT_Library           library,\n                 FT_Stream            stream,\n                 FT_Long              face_index,\n                 FT_Face             *aface,\n                 const FT_Open_Args  *args )\n  {\n    FT_Error error;\n    FT_UNUSED( args );\n\n\n    error = IsMacBinary( library, stream, face_index, aface );\n    if ( FT_ERR_EQ( error, Unknown_File_Format ) )\n    {\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_raccess\n\n      FT_TRACE3(( \"Try as dfont: %s ...\", args->pathname ));\n\n      error = IsMacResource( library, stream, 0, face_index, aface );\n\n      FT_TRACE3(( \"%s\\n\", error ? \"failed\" : \"successful\" ));\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_objs\n\n    }\n\n    if ( ( FT_ERR_EQ( error, Unknown_File_Format )      ||\n           FT_ERR_EQ( error, Invalid_Stream_Operation ) ) &&\n         ( args->flags & FT_OPEN_PATHNAME )               )\n      error = load_face_in_embedded_rfork( library, stream,\n                                           face_index, aface, args );\n    return error;\n  }\n#endif\n\n#endif  /* !FT_MACINTOSH && FT_CONFIG_OPTION_MAC_FONTS */\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Open_Face( FT_Library           library,\n                const FT_Open_Args*  args,\n                FT_Long              face_index,\n                FT_Face             *aface )\n  {\n    FT_Error     error;\n    FT_Driver    driver = NULL;\n    FT_Memory    memory = NULL;\n    FT_Stream    stream = NULL;\n    FT_Face      face   = NULL;\n    FT_ListNode  node   = NULL;\n    FT_Bool      external_stream;\n    FT_Module*   cur;\n    FT_Module*   limit;\n\n\n    /* test for valid `library' delayed to `FT_Stream_New' */\n\n    if ( ( !aface && face_index >= 0 ) || !args )\n      return FT_THROW( Invalid_Argument );\n\n    external_stream = FT_BOOL( ( args->flags & FT_OPEN_STREAM ) &&\n                               args->stream                     );\n\n    /* create input stream */\n    error = FT_Stream_New( library, args, &stream );\n    if ( error )\n      goto Fail3;\n\n    memory = library->memory;\n\n    /* If the font driver is specified in the `args' structure, use */\n    /* it.  Otherwise, we scan the list of registered drivers.      */\n    if ( ( args->flags & FT_OPEN_DRIVER ) && args->driver )\n    {\n      driver = FT_DRIVER( args->driver );\n\n      /* not all modules are drivers, so check... */\n      if ( FT_MODULE_IS_DRIVER( driver ) )\n      {\n        FT_Int         num_params = 0;\n        FT_Parameter*  params     = 0;\n\n\n        if ( args->flags & FT_OPEN_PARAMS )\n        {\n          num_params = args->num_params;\n          params     = args->params;\n        }\n\n        error = open_face( driver, &stream, external_stream, face_index,\n                           num_params, params, &face );\n        if ( !error )\n          goto Success;\n      }\n      else\n        error = FT_THROW( Invalid_Handle );\n\n      FT_Stream_Free( stream, external_stream );\n      goto Fail;\n    }\n    else\n    {\n      error = FT_ERR( Missing_Module );\n\n      /* check each font driver for an appropriate format */\n      cur   = library->modules;\n      limit = cur + library->num_modules;\n\n      for ( ; cur < limit; cur++ )\n      {\n        /* not all modules are font drivers, so check... */\n        if ( FT_MODULE_IS_DRIVER( cur[0] ) )\n        {\n          FT_Int         num_params = 0;\n          FT_Parameter*  params     = 0;\n\n\n          driver = FT_DRIVER( cur[0] );\n\n          if ( args->flags & FT_OPEN_PARAMS )\n          {\n            num_params = args->num_params;\n            params     = args->params;\n          }\n\n          error = open_face( driver, &stream, external_stream, face_index,\n                             num_params, params, &face );\n          if ( !error )\n            goto Success;\n\n#ifdef FT_CONFIG_OPTION_MAC_FONTS\n          if ( ft_strcmp( cur[0]->clazz->module_name, \"truetype\" ) == 0 &&\n               FT_ERR_EQ( error, Table_Missing )                        )\n          {\n            /* TrueType but essential tables are missing */\n            if ( FT_Stream_Seek( stream, 0 ) )\n              break;\n\n            error = open_face_PS_from_sfnt_stream( library,\n                                                   stream,\n                                                   face_index,\n                                                   num_params,\n                                                   params,\n                                                   aface );\n            if ( !error )\n            {\n              FT_Stream_Free( stream, external_stream );\n              return error;\n            }\n          }\n#endif\n\n          if ( FT_ERR_NEQ( error, Unknown_File_Format ) )\n            goto Fail3;\n        }\n      }\n\n    Fail3:\n      /* If we are on the mac, and we get an                          */\n      /* FT_Err_Invalid_Stream_Operation it may be because we have an */\n      /* empty data fork, so we need to check the resource fork.      */\n      if ( FT_ERR_NEQ( error, Cannot_Open_Stream )       &&\n           FT_ERR_NEQ( error, Unknown_File_Format )      &&\n           FT_ERR_NEQ( error, Invalid_Stream_Operation ) )\n        goto Fail2;\n\n#if !defined( FT_MACINTOSH ) && defined( FT_CONFIG_OPTION_MAC_FONTS )\n      error = load_mac_face( library, stream, face_index, aface, args );\n      if ( !error )\n      {\n        /* We don't want to go to Success here.  We've already done that. */\n        /* On the other hand, if we succeeded we still need to close this */\n        /* stream (we opened a different stream which extracted the       */\n        /* interesting information out of this stream here.  That stream  */\n        /* will still be open and the face will point to it).             */\n        FT_Stream_Free( stream, external_stream );\n        return error;\n      }\n\n      if ( FT_ERR_NEQ( error, Unknown_File_Format ) )\n        goto Fail2;\n#endif  /* !FT_MACINTOSH && FT_CONFIG_OPTION_MAC_FONTS */\n\n      /* no driver is able to handle this format */\n      error = FT_THROW( Unknown_File_Format );\n\n  Fail2:\n      FT_Stream_Free( stream, external_stream );\n      goto Fail;\n    }\n\n  Success:\n    FT_TRACE4(( \"FT_Open_Face: New face object, adding to list\\n\" ));\n\n    /* add the face object to its driver's list */\n    if ( FT_NEW( node ) )\n      goto Fail;\n\n    node->data = face;\n    /* don't assume driver is the same as face->driver, so use */\n    /* face->driver instead.                                   */\n    FT_List_Add( &face->driver->faces_list, node );\n\n    /* now allocate a glyph slot object for the face */\n    FT_TRACE4(( \"FT_Open_Face: Creating glyph slot\\n\" ));\n\n    if ( face_index >= 0 )\n    {\n      error = FT_New_GlyphSlot( face, NULL );\n      if ( error )\n        goto Fail;\n\n      /* finally, allocate a size object for the face */\n      {\n        FT_Size  size;\n\n\n        FT_TRACE4(( \"FT_Open_Face: Creating size object\\n\" ));\n\n        error = FT_New_Size( face, &size );\n        if ( error )\n          goto Fail;\n\n        face->size = size;\n      }\n    }\n\n    /* some checks */\n\n    if ( FT_IS_SCALABLE( face ) )\n    {\n      if ( face->height < 0 )\n        face->height = (FT_Short)-face->height;\n\n      if ( !FT_HAS_VERTICAL( face ) )\n        face->max_advance_height = (FT_Short)face->height;\n    }\n\n    if ( FT_HAS_FIXED_SIZES( face ) )\n    {\n      FT_Int  i;\n\n\n      for ( i = 0; i < face->num_fixed_sizes; i++ )\n      {\n        FT_Bitmap_Size*  bsize = face->available_sizes + i;\n\n\n        if ( bsize->height < 0 )\n          bsize->height = (FT_Short)-bsize->height;\n        if ( bsize->x_ppem < 0 )\n          bsize->x_ppem = (FT_Short)-bsize->x_ppem;\n        if ( bsize->y_ppem < 0 )\n          bsize->y_ppem = -bsize->y_ppem;\n      }\n    }\n\n    /* initialize internal face data */\n    {\n      FT_Face_Internal  internal = face->internal;\n\n\n      internal->transform_matrix.xx = 0x10000L;\n      internal->transform_matrix.xy = 0;\n      internal->transform_matrix.yx = 0;\n      internal->transform_matrix.yy = 0x10000L;\n\n      internal->transform_delta.x = 0;\n      internal->transform_delta.y = 0;\n\n      internal->refcount = 1;\n    }\n\n    if ( aface )\n      *aface = face;\n    else\n      FT_Done_Face( face );\n\n    goto Exit;\n\n  Fail:\n    if ( node )\n      FT_Done_Face( face );    /* face must be in the driver's list */\n    else if ( face )\n      destroy_face( memory, face, driver );\n\n  Exit:\n    FT_TRACE4(( \"FT_Open_Face: Return %d\\n\", error ));\n\n    return error;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Attach_File( FT_Face      face,\n                  const char*  filepathname )\n  {\n    FT_Open_Args  open;\n\n\n    /* test for valid `face' delayed to `FT_Attach_Stream' */\n\n    if ( !filepathname )\n      return FT_THROW( Invalid_Argument );\n\n    open.stream   = NULL;\n    open.flags    = FT_OPEN_PATHNAME;\n    open.pathname = (char*)filepathname;\n\n    return FT_Attach_Stream( face, &open );\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Attach_Stream( FT_Face        face,\n                    FT_Open_Args*  parameters )\n  {\n    FT_Stream  stream;\n    FT_Error   error;\n    FT_Driver  driver;\n\n    FT_Driver_Class  clazz;\n\n\n    /* test for valid `parameters' delayed to `FT_Stream_New' */\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    driver = face->driver;\n    if ( !driver )\n      return FT_THROW( Invalid_Driver_Handle );\n\n    error = FT_Stream_New( driver->root.library, parameters, &stream );\n    if ( error )\n      goto Exit;\n\n    /* we implement FT_Attach_Stream in each driver through the */\n    /* `attach_file' interface                                  */\n\n    error = FT_ERR( Unimplemented_Feature );\n    clazz = driver->clazz;\n    if ( clazz->attach_file )\n      error = clazz->attach_file( face, stream );\n\n    /* close the attached stream */\n    FT_Stream_Free( stream,\n                    (FT_Bool)( parameters->stream &&\n                               ( parameters->flags & FT_OPEN_STREAM ) ) );\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Reference_Face( FT_Face  face )\n  {\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    face->internal->refcount++;\n\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Done_Face( FT_Face  face )\n  {\n    FT_Error     error;\n    FT_Driver    driver;\n    FT_Memory    memory;\n    FT_ListNode  node;\n\n\n    error = FT_ERR( Invalid_Face_Handle );\n    if ( face && face->driver )\n    {\n      face->internal->refcount--;\n      if ( face->internal->refcount > 0 )\n        error = FT_Err_Ok;\n      else\n      {\n        driver = face->driver;\n        memory = driver->root.memory;\n\n        /* find face in driver's list */\n        node = FT_List_Find( &driver->faces_list, face );\n        if ( node )\n        {\n          /* remove face object from the driver's list */\n          FT_List_Remove( &driver->faces_list, node );\n          FT_FREE( node );\n\n          /* now destroy the object proper */\n          destroy_face( memory, face, driver );\n          error = FT_Err_Ok;\n        }\n      }\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftobjs.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_New_Size( FT_Face   face,\n               FT_Size  *asize )\n  {\n    FT_Error         error;\n    FT_Memory        memory;\n    FT_Driver        driver;\n    FT_Driver_Class  clazz;\n\n    FT_Size          size = 0;\n    FT_ListNode      node = 0;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !asize )\n      return FT_THROW( Invalid_Argument );\n\n    if ( !face->driver )\n      return FT_THROW( Invalid_Driver_Handle );\n\n    *asize = 0;\n\n    driver = face->driver;\n    clazz  = driver->clazz;\n    memory = face->memory;\n\n    /* Allocate new size object and perform basic initialisation */\n    if ( FT_ALLOC( size, clazz->size_object_size ) || FT_NEW( node ) )\n      goto Exit;\n\n    size->face = face;\n\n    /* for now, do not use any internal fields in size objects */\n    size->internal = 0;\n\n    if ( clazz->init_size )\n      error = clazz->init_size( size );\n\n    /* in case of success, add to the face's list */\n    if ( !error )\n    {\n      *asize     = size;\n      node->data = size;\n      FT_List_Add( &face->sizes_list, node );\n    }\n\n  Exit:\n    if ( error )\n    {\n      FT_FREE( node );\n      FT_FREE( size );\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftobjs.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Done_Size( FT_Size  size )\n  {\n    FT_Error     error;\n    FT_Driver    driver;\n    FT_Memory    memory;\n    FT_Face      face;\n    FT_ListNode  node;\n\n\n    if ( !size )\n      return FT_THROW( Invalid_Size_Handle );\n\n    face = size->face;\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    driver = face->driver;\n    if ( !driver )\n      return FT_THROW( Invalid_Driver_Handle );\n\n    memory = driver->root.memory;\n\n    error = FT_Err_Ok;\n    node  = FT_List_Find( &face->sizes_list, size );\n    if ( node )\n    {\n      FT_List_Remove( &face->sizes_list, node );\n      FT_FREE( node );\n\n      if ( face->size == size )\n      {\n        face->size = 0;\n        if ( face->sizes_list.head )\n          face->size = (FT_Size)(face->sizes_list.head->data);\n      }\n\n      destroy_size( memory, size, driver );\n    }\n    else\n      error = FT_THROW( Invalid_Size_Handle );\n\n    return error;\n  }\n\n\n  /* documentation is in ftobjs.h */\n\n  FT_BASE_DEF( FT_Error )\n  FT_Match_Size( FT_Face          face,\n                 FT_Size_Request  req,\n                 FT_Bool          ignore_width,\n                 FT_ULong*        size_index )\n  {\n    FT_Int   i;\n    FT_Long  w, h;\n\n\n    if ( !FT_HAS_FIXED_SIZES( face ) )\n      return FT_THROW( Invalid_Face_Handle );\n\n    /* FT_Bitmap_Size doesn't provide enough info... */\n    if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )\n      return FT_THROW( Unimplemented_Feature );\n\n    w = FT_REQUEST_WIDTH ( req );\n    h = FT_REQUEST_HEIGHT( req );\n\n    if ( req->width && !req->height )\n      h = w;\n    else if ( !req->width && req->height )\n      w = h;\n\n    w = FT_PIX_ROUND( w );\n    h = FT_PIX_ROUND( h );\n\n    for ( i = 0; i < face->num_fixed_sizes; i++ )\n    {\n      FT_Bitmap_Size*  bsize = face->available_sizes + i;\n\n\n      if ( h != FT_PIX_ROUND( bsize->y_ppem ) )\n        continue;\n\n      if ( w == FT_PIX_ROUND( bsize->x_ppem ) || ignore_width )\n      {\n        FT_TRACE3(( \"FT_Match_Size: bitmap strike %d matches\\n\", i ));\n\n        if ( size_index )\n          *size_index = (FT_ULong)i;\n\n        return FT_Err_Ok;\n      }\n    }\n\n    return FT_THROW( Invalid_Pixel_Size );\n  }\n\n\n  /* documentation is in ftobjs.h */\n\n  FT_BASE_DEF( void )\n  ft_synthesize_vertical_metrics( FT_Glyph_Metrics*  metrics,\n                                  FT_Pos             advance )\n  {\n    FT_Pos  height = metrics->height;\n\n\n    /* compensate for glyph with bbox above/below the baseline */\n    if ( metrics->horiBearingY < 0 )\n    {\n      if ( height < metrics->horiBearingY )\n        height = metrics->horiBearingY;\n    }\n    else if ( metrics->horiBearingY > 0 )\n      height -= metrics->horiBearingY;\n\n    /* the factor 1.2 is a heuristical value */\n    if ( !advance )\n      advance = height * 12 / 10;\n\n    metrics->vertBearingX = metrics->horiBearingX - metrics->horiAdvance / 2;\n    metrics->vertBearingY = ( advance - height ) / 2;\n    metrics->vertAdvance  = advance;\n  }\n\n\n  static void\n  ft_recompute_scaled_metrics( FT_Face           face,\n                               FT_Size_Metrics*  metrics )\n  {\n    /* Compute root ascender, descender, test height, and max_advance */\n\n#ifdef GRID_FIT_METRICS\n    metrics->ascender    = FT_PIX_CEIL( FT_MulFix( face->ascender,\n                                                   metrics->y_scale ) );\n\n    metrics->descender   = FT_PIX_FLOOR( FT_MulFix( face->descender,\n                                                    metrics->y_scale ) );\n\n    metrics->height      = FT_PIX_ROUND( FT_MulFix( face->height,\n                                                    metrics->y_scale ) );\n\n    metrics->max_advance = FT_PIX_ROUND( FT_MulFix( face->max_advance_width,\n                                                    metrics->x_scale ) );\n#else /* !GRID_FIT_METRICS */\n    metrics->ascender    = FT_MulFix( face->ascender,\n                                      metrics->y_scale );\n\n    metrics->descender   = FT_MulFix( face->descender,\n                                      metrics->y_scale );\n\n    metrics->height      = FT_MulFix( face->height,\n                                      metrics->y_scale );\n\n    metrics->max_advance = FT_MulFix( face->max_advance_width,\n                                      metrics->x_scale );\n#endif /* !GRID_FIT_METRICS */\n  }\n\n\n  FT_BASE_DEF( void )\n  FT_Select_Metrics( FT_Face   face,\n                     FT_ULong  strike_index )\n  {\n    FT_Size_Metrics*  metrics;\n    FT_Bitmap_Size*   bsize;\n\n\n    metrics = &face->size->metrics;\n    bsize   = face->available_sizes + strike_index;\n\n    metrics->x_ppem = (FT_UShort)( ( bsize->x_ppem + 32 ) >> 6 );\n    metrics->y_ppem = (FT_UShort)( ( bsize->y_ppem + 32 ) >> 6 );\n\n    if ( FT_IS_SCALABLE( face ) )\n    {\n      metrics->x_scale = FT_DivFix( bsize->x_ppem,\n                                    face->units_per_EM );\n      metrics->y_scale = FT_DivFix( bsize->y_ppem,\n                                    face->units_per_EM );\n\n      ft_recompute_scaled_metrics( face, metrics );\n    }\n    else\n    {\n      metrics->x_scale     = 1L << 16;\n      metrics->y_scale     = 1L << 16;\n      metrics->ascender    = bsize->y_ppem;\n      metrics->descender   = 0;\n      metrics->height      = bsize->height << 6;\n      metrics->max_advance = bsize->x_ppem;\n    }\n\n    FT_TRACE5(( \"FT_Select_Metrics:\\n\" ));\n    FT_TRACE5(( \"  x scale: %d (%f)\\n\",\n                metrics->x_scale, metrics->x_scale / 65536.0 ));\n    FT_TRACE5(( \"  y scale: %d (%f)\\n\",\n                metrics->y_scale, metrics->y_scale / 65536.0 ));\n    FT_TRACE5(( \"  ascender: %f\\n\",    metrics->ascender / 64.0 ));\n    FT_TRACE5(( \"  descender: %f\\n\",   metrics->descender / 64.0 ));\n    FT_TRACE5(( \"  height: %f\\n\",      metrics->height / 64.0 ));\n    FT_TRACE5(( \"  max advance: %f\\n\", metrics->max_advance / 64.0 ));\n    FT_TRACE5(( \"  x ppem: %d\\n\",      metrics->x_ppem ));\n    FT_TRACE5(( \"  y ppem: %d\\n\",      metrics->y_ppem ));\n  }\n\n\n  FT_BASE_DEF( void )\n  FT_Request_Metrics( FT_Face          face,\n                      FT_Size_Request  req )\n  {\n    FT_Size_Metrics*  metrics;\n\n\n    metrics = &face->size->metrics;\n\n    if ( FT_IS_SCALABLE( face ) )\n    {\n      FT_Long  w = 0, h = 0, scaled_w = 0, scaled_h = 0;\n\n\n      switch ( req->type )\n      {\n      case FT_SIZE_REQUEST_TYPE_NOMINAL:\n        w = h = face->units_per_EM;\n        break;\n\n      case FT_SIZE_REQUEST_TYPE_REAL_DIM:\n        w = h = face->ascender - face->descender;\n        break;\n\n      case FT_SIZE_REQUEST_TYPE_BBOX:\n        w = face->bbox.xMax - face->bbox.xMin;\n        h = face->bbox.yMax - face->bbox.yMin;\n        break;\n\n      case FT_SIZE_REQUEST_TYPE_CELL:\n        w = face->max_advance_width;\n        h = face->ascender - face->descender;\n        break;\n\n      case FT_SIZE_REQUEST_TYPE_SCALES:\n        metrics->x_scale = (FT_Fixed)req->width;\n        metrics->y_scale = (FT_Fixed)req->height;\n        if ( !metrics->x_scale )\n          metrics->x_scale = metrics->y_scale;\n        else if ( !metrics->y_scale )\n          metrics->y_scale = metrics->x_scale;\n        goto Calculate_Ppem;\n\n      case FT_SIZE_REQUEST_TYPE_MAX:\n        break;\n      }\n\n      /* to be on the safe side */\n      if ( w < 0 )\n        w = -w;\n\n      if ( h < 0 )\n        h = -h;\n\n      scaled_w = FT_REQUEST_WIDTH ( req );\n      scaled_h = FT_REQUEST_HEIGHT( req );\n\n      /* determine scales */\n      if ( req->width )\n      {\n        metrics->x_scale = FT_DivFix( scaled_w, w );\n\n        if ( req->height )\n        {\n          metrics->y_scale = FT_DivFix( scaled_h, h );\n\n          if ( req->type == FT_SIZE_REQUEST_TYPE_CELL )\n          {\n            if ( metrics->y_scale > metrics->x_scale )\n              metrics->y_scale = metrics->x_scale;\n            else\n              metrics->x_scale = metrics->y_scale;\n          }\n        }\n        else\n        {\n          metrics->y_scale = metrics->x_scale;\n          scaled_h = FT_MulDiv( scaled_w, h, w );\n        }\n      }\n      else\n      {\n        metrics->x_scale = metrics->y_scale = FT_DivFix( scaled_h, h );\n        scaled_w = FT_MulDiv( scaled_h, w, h );\n      }\n\n  Calculate_Ppem:\n      /* calculate the ppems */\n      if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )\n      {\n        scaled_w = FT_MulFix( face->units_per_EM, metrics->x_scale );\n        scaled_h = FT_MulFix( face->units_per_EM, metrics->y_scale );\n      }\n\n      metrics->x_ppem = (FT_UShort)( ( scaled_w + 32 ) >> 6 );\n      metrics->y_ppem = (FT_UShort)( ( scaled_h + 32 ) >> 6 );\n\n      ft_recompute_scaled_metrics( face, metrics );\n    }\n    else\n    {\n      FT_ZERO( metrics );\n      metrics->x_scale = 1L << 16;\n      metrics->y_scale = 1L << 16;\n    }\n\n    FT_TRACE5(( \"FT_Request_Metrics:\\n\" ));\n    FT_TRACE5(( \"  x scale: %d (%f)\\n\",\n                metrics->x_scale, metrics->x_scale / 65536.0 ));\n    FT_TRACE5(( \"  y scale: %d (%f)\\n\",\n                metrics->y_scale, metrics->y_scale / 65536.0 ));\n    FT_TRACE5(( \"  ascender: %f\\n\",    metrics->ascender / 64.0 ));\n    FT_TRACE5(( \"  descender: %f\\n\",   metrics->descender / 64.0 ));\n    FT_TRACE5(( \"  height: %f\\n\",      metrics->height / 64.0 ));\n    FT_TRACE5(( \"  max advance: %f\\n\", metrics->max_advance / 64.0 ));\n    FT_TRACE5(( \"  x ppem: %d\\n\",      metrics->x_ppem ));\n    FT_TRACE5(( \"  y ppem: %d\\n\",      metrics->y_ppem ));\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Select_Size( FT_Face  face,\n                  FT_Int   strike_index )\n  {\n    FT_Driver_Class  clazz;\n\n\n    if ( !face || !FT_HAS_FIXED_SIZES( face ) )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( strike_index < 0 || strike_index >= face->num_fixed_sizes )\n      return FT_THROW( Invalid_Argument );\n\n    clazz = face->driver->clazz;\n\n    if ( clazz->select_size )\n    {\n      FT_Error  error;\n\n\n      error = clazz->select_size( face->size, (FT_ULong)strike_index );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n      {\n        FT_Size_Metrics*  metrics = &face->size->metrics;\n\n\n        FT_TRACE5(( \"FT_Select_Size (font driver's `select_size'):\\n\" ));\n        FT_TRACE5(( \"  x scale: %d (%f)\\n\",\n                    metrics->x_scale, metrics->x_scale / 65536.0 ));\n        FT_TRACE5(( \"  y scale: %d (%f)\\n\",\n                    metrics->y_scale, metrics->y_scale / 65536.0 ));\n        FT_TRACE5(( \"  ascender: %f\\n\",    metrics->ascender / 64.0 ));\n        FT_TRACE5(( \"  descender: %f\\n\",   metrics->descender / 64.0 ));\n        FT_TRACE5(( \"  height: %f\\n\",      metrics->height / 64.0 ));\n        FT_TRACE5(( \"  max advance: %f\\n\", metrics->max_advance / 64.0 ));\n        FT_TRACE5(( \"  x ppem: %d\\n\",      metrics->x_ppem ));\n        FT_TRACE5(( \"  y ppem: %d\\n\",      metrics->y_ppem ));\n      }\n#endif\n\n      return error;\n    }\n\n    FT_Select_Metrics( face, (FT_ULong)strike_index );\n\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Request_Size( FT_Face          face,\n                   FT_Size_Request  req )\n  {\n    FT_Driver_Class  clazz;\n    FT_ULong         strike_index;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !req || req->width < 0 || req->height < 0 ||\n         req->type >= FT_SIZE_REQUEST_TYPE_MAX )\n      return FT_THROW( Invalid_Argument );\n\n    clazz = face->driver->clazz;\n\n    if ( clazz->request_size )\n    {\n      FT_Error  error;\n\n\n      error = clazz->request_size( face->size, req );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n      {\n        FT_Size_Metrics*  metrics = &face->size->metrics;\n\n\n        FT_TRACE5(( \"FT_Request_Size (font driver's `request_size'):\\n\" ));\n        FT_TRACE5(( \"  x scale: %d (%f)\\n\",\n                    metrics->x_scale, metrics->x_scale / 65536.0 ));\n        FT_TRACE5(( \"  y scale: %d (%f)\\n\",\n                    metrics->y_scale, metrics->y_scale / 65536.0 ));\n        FT_TRACE5(( \"  ascender: %f\\n\",    metrics->ascender / 64.0 ));\n        FT_TRACE5(( \"  descender: %f\\n\",   metrics->descender / 64.0 ));\n        FT_TRACE5(( \"  height: %f\\n\",      metrics->height / 64.0 ));\n        FT_TRACE5(( \"  max advance: %f\\n\", metrics->max_advance / 64.0 ));\n        FT_TRACE5(( \"  x ppem: %d\\n\",      metrics->x_ppem ));\n        FT_TRACE5(( \"  y ppem: %d\\n\",      metrics->y_ppem ));\n      }\n#endif\n\n      return error;\n    }\n\n    /*\n     * The reason that a driver doesn't have `request_size' defined is\n     * either that the scaling here suffices or that the supported formats\n     * are bitmap-only and size matching is not implemented.\n     *\n     * In the latter case, a simple size matching is done.\n     */\n    if ( !FT_IS_SCALABLE( face ) && FT_HAS_FIXED_SIZES( face ) )\n    {\n      FT_Error  error;\n\n\n      error = FT_Match_Size( face, req, 0, &strike_index );\n      if ( error )\n        return error;\n\n      return FT_Select_Size( face, (FT_Int)strike_index );\n    }\n\n    FT_Request_Metrics( face, req );\n\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Set_Char_Size( FT_Face     face,\n                    FT_F26Dot6  char_width,\n                    FT_F26Dot6  char_height,\n                    FT_UInt     horz_resolution,\n                    FT_UInt     vert_resolution )\n  {\n    FT_Size_RequestRec  req;\n\n\n    /* check of `face' delayed to `FT_Request_Size' */\n\n    if ( !char_width )\n      char_width = char_height;\n    else if ( !char_height )\n      char_height = char_width;\n\n    if ( !horz_resolution )\n      horz_resolution = vert_resolution;\n    else if ( !vert_resolution )\n      vert_resolution = horz_resolution;\n\n    if ( char_width  < 1 * 64 )\n      char_width  = 1 * 64;\n    if ( char_height < 1 * 64 )\n      char_height = 1 * 64;\n\n    if ( !horz_resolution )\n      horz_resolution = vert_resolution = 72;\n\n    req.type           = FT_SIZE_REQUEST_TYPE_NOMINAL;\n    req.width          = char_width;\n    req.height         = char_height;\n    req.horiResolution = horz_resolution;\n    req.vertResolution = vert_resolution;\n\n    return FT_Request_Size( face, &req );\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Set_Pixel_Sizes( FT_Face  face,\n                      FT_UInt  pixel_width,\n                      FT_UInt  pixel_height )\n  {\n    FT_Size_RequestRec  req;\n\n\n    /* check of `face' delayed to `FT_Request_Size' */\n\n    if ( pixel_width == 0 )\n      pixel_width = pixel_height;\n    else if ( pixel_height == 0 )\n      pixel_height = pixel_width;\n\n    if ( pixel_width  < 1 )\n      pixel_width  = 1;\n    if ( pixel_height < 1 )\n      pixel_height = 1;\n\n    /* use `>=' to avoid potential compiler warning on 16bit platforms */\n    if ( pixel_width  >= 0xFFFFU )\n      pixel_width  = 0xFFFFU;\n    if ( pixel_height >= 0xFFFFU )\n      pixel_height = 0xFFFFU;\n\n    req.type           = FT_SIZE_REQUEST_TYPE_NOMINAL;\n    req.width          = pixel_width << 6;\n    req.height         = pixel_height << 6;\n    req.horiResolution = 0;\n    req.vertResolution = 0;\n\n    return FT_Request_Size( face, &req );\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_Kerning( FT_Face     face,\n                  FT_UInt     left_glyph,\n                  FT_UInt     right_glyph,\n                  FT_UInt     kern_mode,\n                  FT_Vector  *akerning )\n  {\n    FT_Error   error = FT_Err_Ok;\n    FT_Driver  driver;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !akerning )\n      return FT_THROW( Invalid_Argument );\n\n    driver = face->driver;\n\n    akerning->x = 0;\n    akerning->y = 0;\n\n    if ( driver->clazz->get_kerning )\n    {\n      error = driver->clazz->get_kerning( face,\n                                          left_glyph,\n                                          right_glyph,\n                                          akerning );\n      if ( !error )\n      {\n        if ( kern_mode != FT_KERNING_UNSCALED )\n        {\n          akerning->x = FT_MulFix( akerning->x, face->size->metrics.x_scale );\n          akerning->y = FT_MulFix( akerning->y, face->size->metrics.y_scale );\n\n          if ( kern_mode != FT_KERNING_UNFITTED )\n          {\n            /* we scale down kerning values for small ppem values */\n            /* to avoid that rounding makes them too big.         */\n            /* `25' has been determined heuristically.            */\n            if ( face->size->metrics.x_ppem < 25 )\n              akerning->x = FT_MulDiv( akerning->x,\n                                       face->size->metrics.x_ppem, 25 );\n            if ( face->size->metrics.y_ppem < 25 )\n              akerning->y = FT_MulDiv( akerning->y,\n                                       face->size->metrics.y_ppem, 25 );\n\n            akerning->x = FT_PIX_ROUND( akerning->x );\n            akerning->y = FT_PIX_ROUND( akerning->y );\n          }\n        }\n      }\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_Track_Kerning( FT_Face    face,\n                        FT_Fixed   point_size,\n                        FT_Int     degree,\n                        FT_Fixed*  akerning )\n  {\n    FT_Service_Kerning  service;\n    FT_Error            error = FT_Err_Ok;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !akerning )\n      return FT_THROW( Invalid_Argument );\n\n    FT_FACE_FIND_SERVICE( face, service, KERNING );\n    if ( !service )\n      return FT_THROW( Unimplemented_Feature );\n\n    error = service->get_track( face,\n                                point_size,\n                                degree,\n                                akerning );\n\n    return error;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Select_Charmap( FT_Face      face,\n                     FT_Encoding  encoding )\n  {\n    FT_CharMap*  cur;\n    FT_CharMap*  limit;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( encoding == FT_ENCODING_NONE )\n      return FT_THROW( Invalid_Argument );\n\n    /* FT_ENCODING_UNICODE is special.  We try to find the `best' Unicode */\n    /* charmap available, i.e., one with UCS-4 characters, if possible.   */\n    /*                                                                    */\n    /* This is done by find_unicode_charmap() above, to share code.       */\n    if ( encoding == FT_ENCODING_UNICODE )\n      return find_unicode_charmap( face );\n\n    cur = face->charmaps;\n    if ( !cur )\n      return FT_THROW( Invalid_CharMap_Handle );\n\n    limit = cur + face->num_charmaps;\n\n    for ( ; cur < limit; cur++ )\n    {\n      if ( cur[0]->encoding == encoding )\n      {\n        face->charmap = cur[0];\n        return 0;\n      }\n    }\n\n    return FT_THROW( Invalid_Argument );\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Set_Charmap( FT_Face     face,\n                  FT_CharMap  charmap )\n  {\n    FT_CharMap*  cur;\n    FT_CharMap*  limit;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    cur = face->charmaps;\n    if ( !cur || !charmap )\n      return FT_THROW( Invalid_CharMap_Handle );\n\n    if ( FT_Get_CMap_Format( charmap ) == 14 )\n      return FT_THROW( Invalid_Argument );\n\n    limit = cur + face->num_charmaps;\n\n    for ( ; cur < limit; cur++ )\n    {\n      if ( cur[0] == charmap )\n      {\n        face->charmap = cur[0];\n        return FT_Err_Ok;\n      }\n    }\n\n    return FT_THROW( Invalid_Argument );\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Int )\n  FT_Get_Charmap_Index( FT_CharMap  charmap )\n  {\n    FT_Int  i;\n\n\n    if ( !charmap || !charmap->face )\n      return -1;\n\n    for ( i = 0; i < charmap->face->num_charmaps; i++ )\n      if ( charmap->face->charmaps[i] == charmap )\n        break;\n\n    FT_ASSERT( i < charmap->face->num_charmaps );\n\n    return i;\n  }\n\n\n  static void\n  ft_cmap_done_internal( FT_CMap  cmap )\n  {\n    FT_CMap_Class  clazz  = cmap->clazz;\n    FT_Face        face   = cmap->charmap.face;\n    FT_Memory      memory = FT_FACE_MEMORY( face );\n\n\n    if ( clazz->done )\n      clazz->done( cmap );\n\n    FT_FREE( cmap );\n  }\n\n\n  FT_BASE_DEF( void )\n  FT_CMap_Done( FT_CMap  cmap )\n  {\n    if ( cmap )\n    {\n      FT_Face    face   = cmap->charmap.face;\n      FT_Memory  memory = FT_FACE_MEMORY( face );\n      FT_Error   error;\n      FT_Int     i, j;\n\n\n      for ( i = 0; i < face->num_charmaps; i++ )\n      {\n        if ( (FT_CMap)face->charmaps[i] == cmap )\n        {\n          FT_CharMap  last_charmap = face->charmaps[face->num_charmaps - 1];\n\n\n          if ( FT_RENEW_ARRAY( face->charmaps,\n                               face->num_charmaps,\n                               face->num_charmaps - 1 ) )\n            return;\n\n          /* remove it from our list of charmaps */\n          for ( j = i + 1; j < face->num_charmaps; j++ )\n          {\n            if ( j == face->num_charmaps - 1 )\n              face->charmaps[j - 1] = last_charmap;\n            else\n              face->charmaps[j - 1] = face->charmaps[j];\n          }\n\n          face->num_charmaps--;\n\n          if ( (FT_CMap)face->charmap == cmap )\n            face->charmap = NULL;\n\n          ft_cmap_done_internal( cmap );\n\n          break;\n        }\n      }\n    }\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_CMap_New( FT_CMap_Class  clazz,\n               FT_Pointer     init_data,\n               FT_CharMap     charmap,\n               FT_CMap       *acmap )\n  {\n    FT_Error   error = FT_Err_Ok;\n    FT_Face    face;\n    FT_Memory  memory;\n    FT_CMap    cmap = NULL;\n\n\n    if ( clazz == NULL || charmap == NULL || charmap->face == NULL )\n      return FT_THROW( Invalid_Argument );\n\n    face   = charmap->face;\n    memory = FT_FACE_MEMORY( face );\n\n    if ( !FT_ALLOC( cmap, clazz->size ) )\n    {\n      cmap->charmap = *charmap;\n      cmap->clazz   = clazz;\n\n      if ( clazz->init )\n      {\n        error = clazz->init( cmap, init_data );\n        if ( error )\n          goto Fail;\n      }\n\n      /* add it to our list of charmaps */\n      if ( FT_RENEW_ARRAY( face->charmaps,\n                           face->num_charmaps,\n                           face->num_charmaps + 1 ) )\n        goto Fail;\n\n      face->charmaps[face->num_charmaps++] = (FT_CharMap)cmap;\n    }\n\n  Exit:\n    if ( acmap )\n      *acmap = cmap;\n\n    return error;\n\n  Fail:\n    ft_cmap_done_internal( cmap );\n    cmap = NULL;\n    goto Exit;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_UInt )\n  FT_Get_Char_Index( FT_Face   face,\n                     FT_ULong  charcode )\n  {\n    FT_UInt  result = 0;\n\n\n    if ( face && face->charmap )\n    {\n      FT_CMap  cmap = FT_CMAP( face->charmap );\n\n\n      if ( charcode > 0xFFFFFFFFUL )\n      {\n        FT_TRACE1(( \"FT_Get_Char_Index: too large charcode\" ));\n        FT_TRACE1(( \" 0x%x is truncated\\n\", charcode ));\n      }\n      result = cmap->clazz->char_index( cmap, (FT_UInt32)charcode );\n    }\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_ULong )\n  FT_Get_First_Char( FT_Face   face,\n                     FT_UInt  *agindex )\n  {\n    FT_ULong  result = 0;\n    FT_UInt   gindex = 0;\n\n\n    /* only do something if we have a charmap, and we have glyphs at all */\n    if ( face && face->charmap && face->num_glyphs )\n    {\n      gindex = FT_Get_Char_Index( face, 0 );\n      if ( gindex == 0 || gindex >= (FT_UInt)face->num_glyphs )\n        result = FT_Get_Next_Char( face, 0, &gindex );\n    }\n\n    if ( agindex )\n      *agindex = gindex;\n\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_ULong )\n  FT_Get_Next_Char( FT_Face   face,\n                    FT_ULong  charcode,\n                    FT_UInt  *agindex )\n  {\n    FT_ULong  result = 0;\n    FT_UInt   gindex = 0;\n\n\n    if ( face && face->charmap && face->num_glyphs )\n    {\n      FT_UInt32  code = (FT_UInt32)charcode;\n      FT_CMap    cmap = FT_CMAP( face->charmap );\n\n\n      do\n      {\n        gindex = cmap->clazz->char_next( cmap, &code );\n\n      } while ( gindex >= (FT_UInt)face->num_glyphs );\n\n      result = ( gindex == 0 ) ? 0 : code;\n    }\n\n    if ( agindex )\n      *agindex = gindex;\n\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_UInt )\n  FT_Face_GetCharVariantIndex( FT_Face   face,\n                               FT_ULong  charcode,\n                               FT_ULong  variantSelector )\n  {\n    FT_UInt  result = 0;\n\n\n    if ( face                                           &&\n         face->charmap                                  &&\n         face->charmap->encoding == FT_ENCODING_UNICODE )\n    {\n      FT_CharMap  charmap = find_variant_selector_charmap( face );\n      FT_CMap     ucmap = FT_CMAP( face->charmap );\n\n\n      if ( charmap != NULL )\n      {\n        FT_CMap  vcmap = FT_CMAP( charmap );\n\n\n        if ( charcode > 0xFFFFFFFFUL )\n        {\n          FT_TRACE1(( \"FT_Get_Char_Index: too large charcode\" ));\n          FT_TRACE1(( \" 0x%x is truncated\\n\", charcode ));\n        }\n        if ( variantSelector > 0xFFFFFFFFUL )\n        {\n          FT_TRACE1(( \"FT_Get_Char_Index: too large variantSelector\" ));\n          FT_TRACE1(( \" 0x%x is truncated\\n\", variantSelector ));\n        }\n\n        result = vcmap->clazz->char_var_index( vcmap, ucmap,\n                                               (FT_UInt32)charcode,\n                                               (FT_UInt32)variantSelector );\n      }\n    }\n\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Int )\n  FT_Face_GetCharVariantIsDefault( FT_Face   face,\n                                   FT_ULong  charcode,\n                                   FT_ULong  variantSelector )\n  {\n    FT_Int  result = -1;\n\n\n    if ( face )\n    {\n      FT_CharMap  charmap = find_variant_selector_charmap( face );\n\n\n      if ( charmap != NULL )\n      {\n        FT_CMap  vcmap = FT_CMAP( charmap );\n\n\n        if ( charcode > 0xFFFFFFFFUL )\n        {\n          FT_TRACE1(( \"FT_Get_Char_Index: too large charcode\" ));\n          FT_TRACE1(( \" 0x%x is truncated\\n\", charcode ));\n        }\n        if ( variantSelector > 0xFFFFFFFFUL )\n        {\n          FT_TRACE1(( \"FT_Get_Char_Index: too large variantSelector\" ));\n          FT_TRACE1(( \" 0x%x is truncated\\n\", variantSelector ));\n        }\n\n        result = vcmap->clazz->char_var_default( vcmap,\n                                                 (FT_UInt32)charcode,\n                                                 (FT_UInt32)variantSelector );\n      }\n    }\n\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_UInt32* )\n  FT_Face_GetVariantSelectors( FT_Face  face )\n  {\n    FT_UInt32  *result = NULL;\n\n\n    if ( face )\n    {\n      FT_CharMap  charmap = find_variant_selector_charmap( face );\n\n\n      if ( charmap != NULL )\n      {\n        FT_CMap    vcmap  = FT_CMAP( charmap );\n        FT_Memory  memory = FT_FACE_MEMORY( face );\n\n\n        result = vcmap->clazz->variant_list( vcmap, memory );\n      }\n    }\n\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_UInt32* )\n  FT_Face_GetVariantsOfChar( FT_Face   face,\n                             FT_ULong  charcode )\n  {\n    FT_UInt32  *result = NULL;\n\n\n    if ( face )\n    {\n      FT_CharMap  charmap = find_variant_selector_charmap( face );\n\n\n      if ( charmap != NULL )\n      {\n        FT_CMap    vcmap  = FT_CMAP( charmap );\n        FT_Memory  memory = FT_FACE_MEMORY( face );\n\n\n        if ( charcode > 0xFFFFFFFFUL )\n        {\n          FT_TRACE1(( \"FT_Get_Char_Index: too large charcode\" ));\n          FT_TRACE1(( \" 0x%x is truncated\\n\", charcode ));\n        }\n\n        result = vcmap->clazz->charvariant_list( vcmap, memory,\n                                                 (FT_UInt32)charcode );\n      }\n    }\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_UInt32* )\n  FT_Face_GetCharsOfVariant( FT_Face   face,\n                             FT_ULong  variantSelector )\n  {\n    FT_UInt32  *result = NULL;\n\n\n    if ( face )\n    {\n      FT_CharMap  charmap = find_variant_selector_charmap( face );\n\n\n      if ( charmap != NULL )\n      {\n        FT_CMap    vcmap  = FT_CMAP( charmap );\n        FT_Memory  memory = FT_FACE_MEMORY( face );\n\n\n        if ( variantSelector > 0xFFFFFFFFUL )\n        {\n          FT_TRACE1(( \"FT_Get_Char_Index: too large variantSelector\" ));\n          FT_TRACE1(( \" 0x%x is truncated\\n\", variantSelector ));\n        }\n\n        result = vcmap->clazz->variantchar_list( vcmap, memory,\n                                                 (FT_UInt32)variantSelector );\n      }\n    }\n\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_UInt )\n  FT_Get_Name_Index( FT_Face     face,\n                     FT_String*  glyph_name )\n  {\n    FT_UInt  result = 0;\n\n\n    if ( face                       &&\n         FT_HAS_GLYPH_NAMES( face ) &&\n         glyph_name                 )\n    {\n      FT_Service_GlyphDict  service;\n\n\n      FT_FACE_LOOKUP_SERVICE( face,\n                              service,\n                              GLYPH_DICT );\n\n      if ( service && service->name_index )\n        result = service->name_index( face, glyph_name );\n    }\n\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_Glyph_Name( FT_Face     face,\n                     FT_UInt     glyph_index,\n                     FT_Pointer  buffer,\n                     FT_UInt     buffer_max )\n  {\n    FT_Error              error;\n    FT_Service_GlyphDict  service;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !buffer || buffer_max == 0 )\n      return FT_THROW( Invalid_Argument );\n\n    /* clean up buffer */\n    ((FT_Byte*)buffer)[0] = '\\0';\n\n    if ( (FT_Long)glyph_index >= face->num_glyphs )\n      return FT_THROW( Invalid_Glyph_Index );\n\n    if ( !FT_HAS_GLYPH_NAMES( face ) )\n      return FT_THROW( Invalid_Argument );\n\n    FT_FACE_LOOKUP_SERVICE( face, service, GLYPH_DICT );\n    if ( service && service->get_name )\n      error = service->get_name( face, glyph_index, buffer, buffer_max );\n    else\n      error = FT_THROW( Invalid_Argument );\n\n    return error;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( const char* )\n  FT_Get_Postscript_Name( FT_Face  face )\n  {\n    const char*  result = NULL;\n\n\n    if ( !face )\n      goto Exit;\n\n    if ( !result )\n    {\n      FT_Service_PsFontName  service;\n\n\n      FT_FACE_LOOKUP_SERVICE( face,\n                              service,\n                              POSTSCRIPT_FONT_NAME );\n\n      if ( service && service->get_ps_font_name )\n        result = service->get_ps_font_name( face );\n    }\n\n  Exit:\n    return result;\n  }\n\n\n  /* documentation is in tttables.h */\n\n  FT_EXPORT_DEF( void* )\n  FT_Get_Sfnt_Table( FT_Face      face,\n                     FT_Sfnt_Tag  tag )\n  {\n    void*                  table = NULL;\n    FT_Service_SFNT_Table  service;\n\n\n    if ( face && FT_IS_SFNT( face ) )\n    {\n      FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );\n      if ( service != NULL )\n        table = service->get_table( face, tag );\n    }\n\n    return table;\n  }\n\n\n  /* documentation is in tttables.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Load_Sfnt_Table( FT_Face    face,\n                      FT_ULong   tag,\n                      FT_Long    offset,\n                      FT_Byte*   buffer,\n                      FT_ULong*  length )\n  {\n    FT_Service_SFNT_Table  service;\n\n\n    if ( !face || !FT_IS_SFNT( face ) )\n      return FT_THROW( Invalid_Face_Handle );\n\n    FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );\n    if ( service == NULL )\n      return FT_THROW( Unimplemented_Feature );\n\n    return service->load_table( face, tag, offset, buffer, length );\n  }\n\n\n  /* documentation is in tttables.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Sfnt_Table_Info( FT_Face    face,\n                      FT_UInt    table_index,\n                      FT_ULong  *tag,\n                      FT_ULong  *length )\n  {\n    FT_Service_SFNT_Table  service;\n    FT_ULong               offset;\n\n\n    /* test for valid `length' delayed to `service->table_info' */\n\n    if ( !face || !FT_IS_SFNT( face ) )\n      return FT_THROW( Invalid_Face_Handle );\n\n    FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );\n    if ( service == NULL )\n      return FT_THROW( Unimplemented_Feature );\n\n    return service->table_info( face, table_index, tag, &offset, length );\n  }\n\n\n  /* documentation is in tttables.h */\n\n  FT_EXPORT_DEF( FT_ULong )\n  FT_Get_CMap_Language_ID( FT_CharMap  charmap )\n  {\n    FT_Service_TTCMaps  service;\n    FT_Face             face;\n    TT_CMapInfo         cmap_info;\n\n\n    if ( !charmap || !charmap->face )\n      return 0;\n\n    face = charmap->face;\n    FT_FACE_FIND_SERVICE( face, service, TT_CMAP );\n    if ( service == NULL )\n      return 0;\n    if ( service->get_cmap_info( charmap, &cmap_info ))\n      return 0;\n\n    return cmap_info.language;\n  }\n\n\n  /* documentation is in tttables.h */\n\n  FT_EXPORT_DEF( FT_Long )\n  FT_Get_CMap_Format( FT_CharMap  charmap )\n  {\n    FT_Service_TTCMaps  service;\n    FT_Face             face;\n    TT_CMapInfo         cmap_info;\n\n\n    if ( !charmap || !charmap->face )\n      return -1;\n\n    face = charmap->face;\n    FT_FACE_FIND_SERVICE( face, service, TT_CMAP );\n    if ( service == NULL )\n      return -1;\n    if ( service->get_cmap_info( charmap, &cmap_info ))\n      return -1;\n\n    return cmap_info.format;\n  }\n\n\n  /* documentation is in ftsizes.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Activate_Size( FT_Size  size )\n  {\n    FT_Face  face;\n\n\n    if ( !size )\n      return FT_THROW( Invalid_Size_Handle );\n\n    face = size->face;\n    if ( !face || !face->driver )\n      return FT_THROW( Invalid_Face_Handle );\n\n    /* we don't need anything more complex than that; all size objects */\n    /* are already listed by the face                                  */\n    face->size = size;\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                        R E N D E R E R S                        ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* lookup a renderer by glyph format in the library's list */\n  FT_BASE_DEF( FT_Renderer )\n  FT_Lookup_Renderer( FT_Library       library,\n                      FT_Glyph_Format  format,\n                      FT_ListNode*     node )\n  {\n    FT_ListNode  cur;\n    FT_Renderer  result = 0;\n\n\n    if ( !library )\n      goto Exit;\n\n    cur = library->renderers.head;\n\n    if ( node )\n    {\n      if ( *node )\n        cur = (*node)->next;\n      *node = 0;\n    }\n\n    while ( cur )\n    {\n      FT_Renderer  renderer = FT_RENDERER( cur->data );\n\n\n      if ( renderer->glyph_format == format )\n      {\n        if ( node )\n          *node = cur;\n\n        result = renderer;\n        break;\n      }\n      cur = cur->next;\n    }\n\n  Exit:\n    return result;\n  }\n\n\n  static FT_Renderer\n  ft_lookup_glyph_renderer( FT_GlyphSlot  slot )\n  {\n    FT_Face      face    = slot->face;\n    FT_Library   library = FT_FACE_LIBRARY( face );\n    FT_Renderer  result  = library->cur_renderer;\n\n\n    if ( !result || result->glyph_format != slot->format )\n      result = FT_Lookup_Renderer( library, slot->format, 0 );\n\n    return result;\n  }\n\n\n  static void\n  ft_set_current_renderer( FT_Library  library )\n  {\n    FT_Renderer  renderer;\n\n\n    renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE, 0 );\n    library->cur_renderer = renderer;\n  }\n\n\n  static FT_Error\n  ft_add_renderer( FT_Module  module )\n  {\n    FT_Library   library = module->library;\n    FT_Memory    memory  = library->memory;\n    FT_Error     error;\n    FT_ListNode  node    = NULL;\n\n\n    if ( FT_NEW( node ) )\n      goto Exit;\n\n    {\n      FT_Renderer         render = FT_RENDERER( module );\n      FT_Renderer_Class*  clazz  = (FT_Renderer_Class*)module->clazz;\n\n\n      render->clazz        = clazz;\n      render->glyph_format = clazz->glyph_format;\n\n      /* allocate raster object if needed */\n      if ( clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&\n           clazz->raster_class->raster_new                )\n      {\n        error = clazz->raster_class->raster_new( memory, &render->raster );\n        if ( error )\n          goto Fail;\n\n        render->raster_render = clazz->raster_class->raster_render;\n        render->render        = clazz->render_glyph;\n      }\n\n      /* add to list */\n      node->data = module;\n      FT_List_Add( &library->renderers, node );\n\n      ft_set_current_renderer( library );\n    }\n\n  Fail:\n    if ( error )\n      FT_FREE( node );\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  ft_remove_renderer( FT_Module  module )\n  {\n    FT_Library   library;\n    FT_Memory    memory;\n    FT_ListNode  node;\n\n\n    library = module->library;\n    if ( !library )\n      return;\n\n    memory = library->memory;\n\n    node = FT_List_Find( &library->renderers, module );\n    if ( node )\n    {\n      FT_Renderer  render = FT_RENDERER( module );\n\n\n      /* release raster object, if any */\n      if ( render->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&\n           render->raster                                         )\n        render->clazz->raster_class->raster_done( render->raster );\n\n      /* remove from list */\n      FT_List_Remove( &library->renderers, node );\n      FT_FREE( node );\n\n      ft_set_current_renderer( library );\n    }\n  }\n\n\n  /* documentation is in ftrender.h */\n\n  FT_EXPORT_DEF( FT_Renderer )\n  FT_Get_Renderer( FT_Library       library,\n                   FT_Glyph_Format  format )\n  {\n    /* test for valid `library' delayed to `FT_Lookup_Renderer' */\n\n    return FT_Lookup_Renderer( library, format, 0 );\n  }\n\n\n  /* documentation is in ftrender.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Set_Renderer( FT_Library     library,\n                   FT_Renderer    renderer,\n                   FT_UInt        num_params,\n                   FT_Parameter*  parameters )\n  {\n    FT_ListNode  node;\n    FT_Error     error = FT_Err_Ok;\n\n    FT_Renderer_SetModeFunc  set_mode;\n\n\n    if ( !library )\n    {\n      error = FT_THROW( Invalid_Library_Handle );\n      goto Exit;\n    }\n\n    if ( !renderer )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    if ( num_params > 0 && !parameters )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    node = FT_List_Find( &library->renderers, renderer );\n    if ( !node )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    FT_List_Up( &library->renderers, node );\n\n    if ( renderer->glyph_format == FT_GLYPH_FORMAT_OUTLINE )\n      library->cur_renderer = renderer;\n\n    set_mode = renderer->clazz->set_mode;\n\n    for ( ; num_params > 0; num_params-- )\n    {\n      error = set_mode( renderer, parameters->tag, parameters->data );\n      if ( error )\n        break;\n      parameters++;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Render_Glyph_Internal( FT_Library      library,\n                            FT_GlyphSlot    slot,\n                            FT_Render_Mode  render_mode )\n  {\n    FT_Error     error = FT_Err_Ok;\n    FT_Renderer  renderer;\n\n\n    /* if it is already a bitmap, no need to do anything */\n    switch ( slot->format )\n    {\n    case FT_GLYPH_FORMAT_BITMAP:   /* already a bitmap, don't do anything */\n      break;\n\n    default:\n      {\n        FT_ListNode  node   = 0;\n        FT_Bool      update = 0;\n\n\n        /* small shortcut for the very common case */\n        if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )\n        {\n          renderer = library->cur_renderer;\n          node     = library->renderers.head;\n        }\n        else\n          renderer = FT_Lookup_Renderer( library, slot->format, &node );\n\n        error = FT_ERR( Unimplemented_Feature );\n        while ( renderer )\n        {\n          error = renderer->render( renderer, slot, render_mode, NULL );\n          if ( !error                                   ||\n               FT_ERR_NEQ( error, Cannot_Render_Glyph ) )\n            break;\n\n          /* FT_Err_Cannot_Render_Glyph is returned if the render mode   */\n          /* is unsupported by the current renderer for this glyph image */\n          /* format.                                                     */\n\n          /* now, look for another renderer that supports the same */\n          /* format.                                               */\n          renderer = FT_Lookup_Renderer( library, slot->format, &node );\n          update   = 1;\n        }\n\n        /* if we changed the current renderer for the glyph image format */\n        /* we need to select it as the next current one                  */\n        if ( !error && update && renderer )\n        {\n          error = FT_Set_Renderer( library, renderer, 0, 0 );\n          if ( error )\n            break;\n        }\n      }\n    }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_bitmap\n\n    /* we convert to a single bitmap format for computing the checksum */\n    if ( !error )\n    {\n      FT_Bitmap  bitmap;\n      FT_Error   err;\n\n\n      FT_Bitmap_New( &bitmap );\n\n      /* this also converts the bitmap flow to `down' (i.e., pitch > 0) */\n      err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 );\n      if ( !err )\n      {\n        MD5_CTX        ctx;\n        unsigned char  md5[16];\n        int            i;\n\n\n        MD5_Init( &ctx);\n        MD5_Update( &ctx, bitmap.buffer, bitmap.rows * bitmap.pitch );\n        MD5_Final( md5, &ctx );\n\n        FT_TRACE3(( \"MD5 checksum for %dx%d bitmap:\\n\"\n                    \"  \",\n                    bitmap.rows, bitmap.pitch ));\n        for ( i = 0; i < 16; i++ )\n          FT_TRACE3(( \"%02X\", md5[i] ));\n        FT_TRACE3(( \"\\n\" ));\n      }\n\n      FT_Bitmap_Done( library, &bitmap );\n    }\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_objs\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n    return error;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Render_Glyph( FT_GlyphSlot    slot,\n                   FT_Render_Mode  render_mode )\n  {\n    FT_Library  library;\n\n\n    if ( !slot || !slot->face )\n      return FT_THROW( Invalid_Argument );\n\n    library = FT_FACE_LIBRARY( slot->face );\n\n    return FT_Render_Glyph_Internal( library, slot, render_mode );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                         M O D U L E S                           ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Destroy_Module                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroys a given module object.  For drivers, this also destroys   */\n  /*    all child faces.                                                   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    module :: A handle to the target driver object.                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The driver _must_ be LOCKED!                                       */\n  /*                                                                       */\n  static void\n  Destroy_Module( FT_Module  module )\n  {\n    FT_Memory         memory  = module->memory;\n    FT_Module_Class*  clazz   = module->clazz;\n    FT_Library        library = module->library;\n\n\n    if ( library && library->auto_hinter == module )\n      library->auto_hinter = 0;\n\n    /* if the module is a renderer */\n    if ( FT_MODULE_IS_RENDERER( module ) )\n      ft_remove_renderer( module );\n\n    /* if the module is a font driver, add some steps */\n    if ( FT_MODULE_IS_DRIVER( module ) )\n      Destroy_Driver( FT_DRIVER( module ) );\n\n    /* finalize the module object */\n    if ( clazz->module_done )\n      clazz->module_done( module );\n\n    /* discard it */\n    FT_FREE( module );\n  }\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Add_Module( FT_Library              library,\n                 const FT_Module_Class*  clazz )\n  {\n    FT_Error   error;\n    FT_Memory  memory;\n    FT_Module  module;\n    FT_UInt    nn;\n\n\n#define FREETYPE_VER_FIXED  ( ( (FT_Long)FREETYPE_MAJOR << 16 ) | \\\n                                FREETYPE_MINOR                  )\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !clazz )\n      return FT_THROW( Invalid_Argument );\n\n    /* check freetype version */\n    if ( clazz->module_requires > FREETYPE_VER_FIXED )\n      return FT_THROW( Invalid_Version );\n\n    /* look for a module with the same name in the library's table */\n    for ( nn = 0; nn < library->num_modules; nn++ )\n    {\n      module = library->modules[nn];\n      if ( ft_strcmp( module->clazz->module_name, clazz->module_name ) == 0 )\n      {\n        /* this installed module has the same name, compare their versions */\n        if ( clazz->module_version <= module->clazz->module_version )\n          return FT_THROW( Lower_Module_Version );\n\n        /* remove the module from our list, then exit the loop to replace */\n        /* it by our new version..                                        */\n        FT_Remove_Module( library, module );\n        break;\n      }\n    }\n\n    memory = library->memory;\n    error  = FT_Err_Ok;\n\n    if ( library->num_modules >= FT_MAX_MODULES )\n    {\n      error = FT_THROW( Too_Many_Drivers );\n      goto Exit;\n    }\n\n    /* allocate module object */\n    if ( FT_ALLOC( module, clazz->module_size ) )\n      goto Exit;\n\n    /* base initialization */\n    module->library = library;\n    module->memory  = memory;\n    module->clazz   = (FT_Module_Class*)clazz;\n\n    /* check whether the module is a renderer - this must be performed */\n    /* before the normal module initialization                         */\n    if ( FT_MODULE_IS_RENDERER( module ) )\n    {\n      /* add to the renderers list */\n      error = ft_add_renderer( module );\n      if ( error )\n        goto Fail;\n    }\n\n    /* is the module a auto-hinter? */\n    if ( FT_MODULE_IS_HINTER( module ) )\n      library->auto_hinter = module;\n\n    /* if the module is a font driver */\n    if ( FT_MODULE_IS_DRIVER( module ) )\n    {\n      /* allocate glyph loader if needed */\n      FT_Driver  driver = FT_DRIVER( module );\n\n\n      driver->clazz = (FT_Driver_Class)module->clazz;\n      if ( FT_DRIVER_USES_OUTLINES( driver ) )\n      {\n        error = FT_GlyphLoader_New( memory, &driver->glyph_loader );\n        if ( error )\n          goto Fail;\n      }\n    }\n\n    if ( clazz->module_init )\n    {\n      error = clazz->module_init( module );\n      if ( error )\n        goto Fail;\n    }\n\n    /* add module to the library's table */\n    library->modules[library->num_modules++] = module;\n\n  Exit:\n    return error;\n\n  Fail:\n    if ( FT_MODULE_IS_DRIVER( module ) )\n    {\n      FT_Driver  driver = FT_DRIVER( module );\n\n\n      if ( FT_DRIVER_USES_OUTLINES( driver ) )\n        FT_GlyphLoader_Done( driver->glyph_loader );\n    }\n\n    if ( FT_MODULE_IS_RENDERER( module ) )\n    {\n      FT_Renderer  renderer = FT_RENDERER( module );\n\n\n      if ( renderer->clazz                                          &&\n           renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&\n           renderer->raster                                         )\n        renderer->clazz->raster_class->raster_done( renderer->raster );\n    }\n\n    FT_FREE( module );\n    goto Exit;\n  }\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( FT_Module )\n  FT_Get_Module( FT_Library   library,\n                 const char*  module_name )\n  {\n    FT_Module   result = NULL;\n    FT_Module*  cur;\n    FT_Module*  limit;\n\n\n    if ( !library || !module_name )\n      return result;\n\n    cur   = library->modules;\n    limit = cur + library->num_modules;\n\n    for ( ; cur < limit; cur++ )\n      if ( ft_strcmp( cur[0]->clazz->module_name, module_name ) == 0 )\n      {\n        result = cur[0];\n        break;\n      }\n\n    return result;\n  }\n\n\n  /* documentation is in ftobjs.h */\n\n  FT_BASE_DEF( const void* )\n  FT_Get_Module_Interface( FT_Library   library,\n                           const char*  mod_name )\n  {\n    FT_Module  module;\n\n\n    /* test for valid `library' delayed to FT_Get_Module() */\n\n    module = FT_Get_Module( library, mod_name );\n\n    return module ? module->clazz->module_interface : 0;\n  }\n\n\n  FT_BASE_DEF( FT_Pointer )\n  ft_module_get_service( FT_Module    module,\n                         const char*  service_id )\n  {\n    FT_Pointer  result = NULL;\n\n\n    if ( module )\n    {\n      FT_ASSERT( module->clazz && module->clazz->get_interface );\n\n      /* first, look for the service in the module */\n      if ( module->clazz->get_interface )\n        result = module->clazz->get_interface( module, service_id );\n\n      if ( result == NULL )\n      {\n        /* we didn't find it, look in all other modules then */\n        FT_Library  library = module->library;\n        FT_Module*  cur     = library->modules;\n        FT_Module*  limit   = cur + library->num_modules;\n\n\n        for ( ; cur < limit; cur++ )\n        {\n          if ( cur[0] != module )\n          {\n            FT_ASSERT( cur[0]->clazz );\n\n            if ( cur[0]->clazz->get_interface )\n            {\n              result = cur[0]->clazz->get_interface( cur[0], service_id );\n              if ( result != NULL )\n                break;\n            }\n          }\n        }\n      }\n    }\n\n    return result;\n  }\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Remove_Module( FT_Library  library,\n                    FT_Module   module )\n  {\n    /* try to find the module from the table, then remove it from there */\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( module )\n    {\n      FT_Module*  cur   = library->modules;\n      FT_Module*  limit = cur + library->num_modules;\n\n\n      for ( ; cur < limit; cur++ )\n      {\n        if ( cur[0] == module )\n        {\n          /* remove it from the table */\n          library->num_modules--;\n          limit--;\n          while ( cur < limit )\n          {\n            cur[0] = cur[1];\n            cur++;\n          }\n          limit[0] = 0;\n\n          /* destroy the module */\n          Destroy_Module( module );\n\n          return FT_Err_Ok;\n        }\n      }\n    }\n    return FT_THROW( Invalid_Driver_Handle );\n  }\n\n\n  static FT_Error\n  ft_property_do( FT_Library        library,\n                  const FT_String*  module_name,\n                  const FT_String*  property_name,\n                  void*             value,\n                  FT_Bool           set )\n  {\n    FT_Module*           cur;\n    FT_Module*           limit;\n    FT_Module_Interface  interface;\n\n    FT_Service_Properties  service;\n\n#ifdef FT_DEBUG_LEVEL_ERROR\n    const FT_String*  set_name  = \"FT_Property_Set\";\n    const FT_String*  get_name  = \"FT_Property_Get\";\n    const FT_String*  func_name = set ? set_name : get_name;\n#endif\n\n    FT_Bool  missing_func;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !module_name || !property_name || !value )\n      return FT_THROW( Invalid_Argument );\n\n    cur   = library->modules;\n    limit = cur + library->num_modules;\n\n    /* search module */\n    for ( ; cur < limit; cur++ )\n      if ( !ft_strcmp( cur[0]->clazz->module_name, module_name ) )\n        break;\n\n    if ( cur == limit )\n    {\n      FT_ERROR(( \"%s: can't find module `%s'\\n\",\n                 func_name, module_name ));\n      return FT_THROW( Missing_Module );\n    }\n\n    /* check whether we have a service interface */\n    if ( !cur[0]->clazz->get_interface )\n    {\n      FT_ERROR(( \"%s: module `%s' doesn't support properties\\n\",\n                 func_name, module_name ));\n      return FT_THROW( Unimplemented_Feature );\n    }\n\n    /* search property service */\n    interface = cur[0]->clazz->get_interface( cur[0],\n                                              FT_SERVICE_ID_PROPERTIES );\n    if ( !interface )\n    {\n      FT_ERROR(( \"%s: module `%s' doesn't support properties\\n\",\n                 func_name, module_name ));\n      return FT_THROW( Unimplemented_Feature );\n    }\n\n    service = (FT_Service_Properties)interface;\n\n    if ( set )\n      missing_func = (FT_Bool)( !service->set_property );\n    else\n      missing_func = (FT_Bool)( !service->get_property );\n\n    if ( missing_func )\n    {\n      FT_ERROR(( \"%s: property service of module `%s' is broken\\n\",\n                 func_name, module_name ));\n      return FT_THROW( Unimplemented_Feature );\n    }\n\n    return set ? service->set_property( cur[0], property_name, value )\n               : service->get_property( cur[0], property_name, value );\n  }\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Property_Set( FT_Library        library,\n                   const FT_String*  module_name,\n                   const FT_String*  property_name,\n                   const void*       value )\n  {\n    return ft_property_do( library,\n                           module_name,\n                           property_name,\n                           (void*)value,\n                           TRUE );\n  }\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Property_Get( FT_Library        library,\n                   const FT_String*  module_name,\n                   const FT_String*  property_name,\n                   void*             value )\n  {\n    return ft_property_do( library,\n                           module_name,\n                           property_name,\n                           value,\n                           FALSE );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                         L I B R A R Y                           ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Reference_Library( FT_Library  library )\n  {\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    library->refcount++;\n\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_New_Library( FT_Memory    memory,\n                  FT_Library  *alibrary )\n  {\n    FT_Library  library = NULL;\n    FT_Error    error;\n\n\n    if ( !memory || !alibrary )\n      return FT_THROW( Invalid_Argument );\n\n#ifdef FT_DEBUG_LEVEL_ERROR\n    /* init debugging support */\n    ft_debug_init();\n#endif\n\n    /* first of all, allocate the library object */\n    if ( FT_NEW( library ) )\n      return error;\n\n    library->memory = memory;\n\n#ifdef FT_CONFIG_OPTION_PIC\n    /* initialize position independent code containers */\n    error = ft_pic_container_init( library );\n    if ( error )\n      goto Fail;\n#endif\n\n    /* allocate the render pool */\n    library->raster_pool_size = FT_RENDER_POOL_SIZE;\n#if FT_RENDER_POOL_SIZE > 0\n    if ( FT_ALLOC( library->raster_pool, FT_RENDER_POOL_SIZE ) )\n      goto Fail;\n#endif\n\n    library->version_major = FREETYPE_MAJOR;\n    library->version_minor = FREETYPE_MINOR;\n    library->version_patch = FREETYPE_PATCH;\n\n    library->refcount = 1;\n\n    /* That's ok now */\n    *alibrary = library;\n\n    return FT_Err_Ok;\n\n  Fail:\n#ifdef FT_CONFIG_OPTION_PIC\n    ft_pic_container_destroy( library );\n#endif\n    FT_FREE( library );\n    return error;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Library_Version( FT_Library   library,\n                      FT_Int      *amajor,\n                      FT_Int      *aminor,\n                      FT_Int      *apatch )\n  {\n    FT_Int  major = 0;\n    FT_Int  minor = 0;\n    FT_Int  patch = 0;\n\n\n    if ( library )\n    {\n      major = library->version_major;\n      minor = library->version_minor;\n      patch = library->version_patch;\n    }\n\n    if ( amajor )\n      *amajor = major;\n\n    if ( aminor )\n      *aminor = minor;\n\n    if ( apatch )\n      *apatch = patch;\n  }\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Done_Library( FT_Library  library )\n  {\n    FT_Memory  memory;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    library->refcount--;\n    if ( library->refcount > 0 )\n      goto Exit;\n\n    memory = library->memory;\n\n    /*\n     * Close all faces in the library.  If we don't do this, we can have\n     * some subtle memory leaks.\n     *\n     * Example:\n     *\n     *  - the cff font driver uses the pshinter module in cff_size_done\n     *  - if the pshinter module is destroyed before the cff font driver,\n     *    opened FT_Face objects managed by the driver are not properly\n     *    destroyed, resulting in a memory leak\n     *\n     * Some faces are dependent on other faces, like Type42 faces that\n     * depend on TrueType faces synthesized internally.\n     *\n     * The order of drivers should be specified in driver_name[].\n     */\n    {\n      FT_UInt      m, n;\n      const char*  driver_name[] = { \"type42\", NULL };\n\n\n      for ( m = 0;\n            m < sizeof ( driver_name ) / sizeof ( driver_name[0] );\n            m++ )\n      {\n        for ( n = 0; n < library->num_modules; n++ )\n        {\n          FT_Module    module      = library->modules[n];\n          const char*  module_name = module->clazz->module_name;\n          FT_List      faces;\n\n\n          if ( driver_name[m]                                &&\n               ft_strcmp( module_name, driver_name[m] ) != 0 )\n            continue;\n\n          if ( ( module->clazz->module_flags & FT_MODULE_FONT_DRIVER ) == 0 )\n            continue;\n\n          FT_TRACE7(( \"FT_Done_Library: close faces for %s\\n\", module_name ));\n\n          faces = &FT_DRIVER( module )->faces_list;\n          while ( faces->head )\n          {\n            FT_Done_Face( FT_FACE( faces->head->data ) );\n            if ( faces->head )\n              FT_TRACE0(( \"FT_Done_Library: failed to free some faces\\n\" ));\n          }\n        }\n      }\n    }\n\n    /* Close all other modules in the library */\n#if 1\n    /* XXX Modules are removed in the reversed order so that  */\n    /* type42 module is removed before truetype module.  This */\n    /* avoids double free in some occasions.  It is a hack.   */\n    while ( library->num_modules > 0 )\n      FT_Remove_Module( library,\n                        library->modules[library->num_modules - 1] );\n#else\n    {\n      FT_UInt  n;\n\n\n      for ( n = 0; n < library->num_modules; n++ )\n      {\n        FT_Module  module = library->modules[n];\n\n\n        if ( module )\n        {\n          Destroy_Module( module );\n          library->modules[n] = 0;\n        }\n      }\n    }\n#endif\n\n    /* Destroy raster objects */\n    FT_FREE( library->raster_pool );\n    library->raster_pool_size = 0;\n\n#ifdef FT_CONFIG_OPTION_PIC\n    /* Destroy pic container contents */\n    ft_pic_container_destroy( library );\n#endif\n\n    FT_FREE( library );\n\n  Exit:\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Set_Debug_Hook( FT_Library         library,\n                     FT_UInt            hook_index,\n                     FT_DebugHook_Func  debug_hook )\n  {\n    if ( library && debug_hook &&\n         hook_index <\n           ( sizeof ( library->debug_hooks ) / sizeof ( void* ) ) )\n      library->debug_hooks[hook_index] = debug_hook;\n  }\n\n\n  /* documentation is in ftmodapi.h */\n\n  FT_EXPORT_DEF( FT_TrueTypeEngineType )\n  FT_Get_TrueType_Engine_Type( FT_Library  library )\n  {\n    FT_TrueTypeEngineType  result = FT_TRUETYPE_ENGINE_TYPE_NONE;\n\n\n    if ( library )\n    {\n      FT_Module  module = FT_Get_Module( library, \"truetype\" );\n\n\n      if ( module )\n      {\n        FT_Service_TrueTypeEngine  service;\n\n\n        service = (FT_Service_TrueTypeEngine)\n                    ft_module_get_service( module,\n                                           FT_SERVICE_ID_TRUETYPE_ENGINE );\n        if ( service )\n          result = service->engine_type;\n      }\n    }\n\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_SubGlyph_Info( FT_GlyphSlot  glyph,\n                        FT_UInt       sub_index,\n                        FT_Int       *p_index,\n                        FT_UInt      *p_flags,\n                        FT_Int       *p_arg1,\n                        FT_Int       *p_arg2,\n                        FT_Matrix    *p_transform )\n  {\n    FT_Error  error = FT_ERR( Invalid_Argument );\n\n\n    if ( glyph                                      &&\n         glyph->subglyphs                           &&\n         glyph->format == FT_GLYPH_FORMAT_COMPOSITE &&\n         sub_index < glyph->num_subglyphs           )\n    {\n      FT_SubGlyph  subg = glyph->subglyphs + sub_index;\n\n\n      *p_index     = subg->index;\n      *p_flags     = subg->flags;\n      *p_arg1      = subg->arg1;\n      *p_arg2      = subg->arg2;\n      *p_transform = subg->transform;\n\n      error = FT_Err_Ok;\n    }\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftotval.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftotval.c                                                              */\n/*                                                                         */\n/*    FreeType API for validating OpenType tables (body).                  */\n/*                                                                         */\n/*  Copyright 2004, 2006, 2008, 2010, 2013 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_OPENTYPE_VALIDATE_H\n#include FT_OPENTYPE_VALIDATE_H\n\n\n  /* documentation is in ftotval.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_OpenType_Validate( FT_Face    face,\n                        FT_UInt    validation_flags,\n                        FT_Bytes  *BASE_table,\n                        FT_Bytes  *GDEF_table,\n                        FT_Bytes  *GPOS_table,\n                        FT_Bytes  *GSUB_table,\n                        FT_Bytes  *JSTF_table )\n  {\n    FT_Service_OTvalidate  service;\n    FT_Error               error;\n\n\n    if ( !face )\n    {\n      error = FT_THROW( Invalid_Face_Handle );\n      goto Exit;\n    }\n\n    if ( !( BASE_table &&\n            GDEF_table &&\n            GPOS_table &&\n            GSUB_table &&\n            JSTF_table ) )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    FT_FACE_FIND_GLOBAL_SERVICE( face, service, OPENTYPE_VALIDATE );\n\n    if ( service )\n      error = service->validate( face,\n                                 validation_flags,\n                                 BASE_table,\n                                 GDEF_table,\n                                 GPOS_table,\n                                 GSUB_table,\n                                 JSTF_table );\n    else\n      error = FT_THROW( Unimplemented_Feature );\n\n  Exit:\n    return error;\n  }\n\n\n  FT_EXPORT_DEF( void )\n  FT_OpenType_Free( FT_Face   face,\n                    FT_Bytes  table )\n  {\n    FT_Memory  memory;\n\n\n    if ( !face )\n      return;\n\n    memory = FT_FACE_MEMORY( face );\n\n    FT_FREE( table );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftoutln.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftoutln.c                                                              */\n/*                                                                         */\n/*    FreeType outline management (body).                                  */\n/*                                                                         */\n/*  Copyright 1996-2008, 2010, 2012-2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* All functions are declared in freetype.h.                             */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_OUTLINE_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_TRIGONOMETRY_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_outline\n\n\n  static\n  const FT_Outline  null_outline = { 0, 0, 0, 0, 0, 0 };\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_Decompose( FT_Outline*              outline,\n                        const FT_Outline_Funcs*  func_interface,\n                        void*                    user )\n  {\n#undef SCALED\n#define SCALED( x )  ( ( (x) << shift ) - delta )\n\n    FT_Vector   v_last;\n    FT_Vector   v_control;\n    FT_Vector   v_start;\n\n    FT_Vector*  point;\n    FT_Vector*  limit;\n    char*       tags;\n\n    FT_Error    error;\n\n    FT_Int   n;         /* index of contour in outline     */\n    FT_UInt  first;     /* index of first point in contour */\n    FT_Int   tag;       /* current point's state           */\n\n    FT_Int   shift;\n    FT_Pos   delta;\n\n\n    if ( !outline )\n      return FT_THROW( Invalid_Outline );\n\n    if ( !func_interface )\n      return FT_THROW( Invalid_Argument );\n\n    shift = func_interface->shift;\n    delta = func_interface->delta;\n    first = 0;\n\n    for ( n = 0; n < outline->n_contours; n++ )\n    {\n      FT_Int  last;  /* index of last point in contour */\n\n\n      FT_TRACE5(( \"FT_Outline_Decompose: Outline %d\\n\", n ));\n\n      last = outline->contours[n];\n      if ( last < 0 )\n        goto Invalid_Outline;\n      limit = outline->points + last;\n\n      v_start   = outline->points[first];\n      v_start.x = SCALED( v_start.x );\n      v_start.y = SCALED( v_start.y );\n\n      v_last   = outline->points[last];\n      v_last.x = SCALED( v_last.x );\n      v_last.y = SCALED( v_last.y );\n\n      v_control = v_start;\n\n      point = outline->points + first;\n      tags  = outline->tags   + first;\n      tag   = FT_CURVE_TAG( tags[0] );\n\n      /* A contour cannot start with a cubic control point! */\n      if ( tag == FT_CURVE_TAG_CUBIC )\n        goto Invalid_Outline;\n\n      /* check first point to determine origin */\n      if ( tag == FT_CURVE_TAG_CONIC )\n      {\n        /* first point is conic control.  Yes, this happens. */\n        if ( FT_CURVE_TAG( outline->tags[last] ) == FT_CURVE_TAG_ON )\n        {\n          /* start at last point if it is on the curve */\n          v_start = v_last;\n          limit--;\n        }\n        else\n        {\n          /* if both first and last points are conic,         */\n          /* start at their middle and record its position    */\n          /* for closure                                      */\n          v_start.x = ( v_start.x + v_last.x ) / 2;\n          v_start.y = ( v_start.y + v_last.y ) / 2;\n\n       /* v_last = v_start; */\n        }\n        point--;\n        tags--;\n      }\n\n      FT_TRACE5(( \"  move to (%.2f, %.2f)\\n\",\n                  v_start.x / 64.0, v_start.y / 64.0 ));\n      error = func_interface->move_to( &v_start, user );\n      if ( error )\n        goto Exit;\n\n      while ( point < limit )\n      {\n        point++;\n        tags++;\n\n        tag = FT_CURVE_TAG( tags[0] );\n        switch ( tag )\n        {\n        case FT_CURVE_TAG_ON:  /* emit a single line_to */\n          {\n            FT_Vector  vec;\n\n\n            vec.x = SCALED( point->x );\n            vec.y = SCALED( point->y );\n\n            FT_TRACE5(( \"  line to (%.2f, %.2f)\\n\",\n                        vec.x / 64.0, vec.y / 64.0 ));\n            error = func_interface->line_to( &vec, user );\n            if ( error )\n              goto Exit;\n            continue;\n          }\n\n        case FT_CURVE_TAG_CONIC:  /* consume conic arcs */\n          v_control.x = SCALED( point->x );\n          v_control.y = SCALED( point->y );\n\n        Do_Conic:\n          if ( point < limit )\n          {\n            FT_Vector  vec;\n            FT_Vector  v_middle;\n\n\n            point++;\n            tags++;\n            tag = FT_CURVE_TAG( tags[0] );\n\n            vec.x = SCALED( point->x );\n            vec.y = SCALED( point->y );\n\n            if ( tag == FT_CURVE_TAG_ON )\n            {\n              FT_TRACE5(( \"  conic to (%.2f, %.2f)\"\n                          \" with control (%.2f, %.2f)\\n\",\n                          vec.x / 64.0, vec.y / 64.0,\n                          v_control.x / 64.0, v_control.y / 64.0 ));\n              error = func_interface->conic_to( &v_control, &vec, user );\n              if ( error )\n                goto Exit;\n              continue;\n            }\n\n            if ( tag != FT_CURVE_TAG_CONIC )\n              goto Invalid_Outline;\n\n            v_middle.x = ( v_control.x + vec.x ) / 2;\n            v_middle.y = ( v_control.y + vec.y ) / 2;\n\n            FT_TRACE5(( \"  conic to (%.2f, %.2f)\"\n                        \" with control (%.2f, %.2f)\\n\",\n                        v_middle.x / 64.0, v_middle.y / 64.0,\n                        v_control.x / 64.0, v_control.y / 64.0 ));\n            error = func_interface->conic_to( &v_control, &v_middle, user );\n            if ( error )\n              goto Exit;\n\n            v_control = vec;\n            goto Do_Conic;\n          }\n\n          FT_TRACE5(( \"  conic to (%.2f, %.2f)\"\n                      \" with control (%.2f, %.2f)\\n\",\n                      v_start.x / 64.0, v_start.y / 64.0,\n                      v_control.x / 64.0, v_control.y / 64.0 ));\n          error = func_interface->conic_to( &v_control, &v_start, user );\n          goto Close;\n\n        default:  /* FT_CURVE_TAG_CUBIC */\n          {\n            FT_Vector  vec1, vec2;\n\n\n            if ( point + 1 > limit                             ||\n                 FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )\n              goto Invalid_Outline;\n\n            point += 2;\n            tags  += 2;\n\n            vec1.x = SCALED( point[-2].x );\n            vec1.y = SCALED( point[-2].y );\n\n            vec2.x = SCALED( point[-1].x );\n            vec2.y = SCALED( point[-1].y );\n\n            if ( point <= limit )\n            {\n              FT_Vector  vec;\n\n\n              vec.x = SCALED( point->x );\n              vec.y = SCALED( point->y );\n\n              FT_TRACE5(( \"  cubic to (%.2f, %.2f)\"\n                          \" with controls (%.2f, %.2f) and (%.2f, %.2f)\\n\",\n                          vec.x / 64.0, vec.y / 64.0,\n                          vec1.x / 64.0, vec1.y / 64.0,\n                          vec2.x / 64.0, vec2.y / 64.0 ));\n              error = func_interface->cubic_to( &vec1, &vec2, &vec, user );\n              if ( error )\n                goto Exit;\n              continue;\n            }\n\n            FT_TRACE5(( \"  cubic to (%.2f, %.2f)\"\n                        \" with controls (%.2f, %.2f) and (%.2f, %.2f)\\n\",\n                        v_start.x / 64.0, v_start.y / 64.0,\n                        vec1.x / 64.0, vec1.y / 64.0,\n                        vec2.x / 64.0, vec2.y / 64.0 ));\n            error = func_interface->cubic_to( &vec1, &vec2, &v_start, user );\n            goto Close;\n          }\n        }\n      }\n\n      /* close the contour with a line segment */\n      FT_TRACE5(( \"  line to (%.2f, %.2f)\\n\",\n                  v_start.x / 64.0, v_start.y / 64.0 ));\n      error = func_interface->line_to( &v_start, user );\n\n    Close:\n      if ( error )\n        goto Exit;\n\n      first = last + 1;\n    }\n\n    FT_TRACE5(( \"FT_Outline_Decompose: Done\\n\", n ));\n    return FT_Err_Ok;\n\n  Exit:\n    FT_TRACE5(( \"FT_Outline_Decompose: Error %d\\n\", error ));\n    return error;\n\n  Invalid_Outline:\n    return FT_THROW( Invalid_Outline );\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_New_Internal( FT_Memory    memory,\n                           FT_UInt      numPoints,\n                           FT_Int       numContours,\n                           FT_Outline  *anoutline )\n  {\n    FT_Error  error;\n\n\n    if ( !anoutline || !memory )\n      return FT_THROW( Invalid_Argument );\n\n    *anoutline = null_outline;\n\n    if ( numContours < 0                  ||\n         (FT_UInt)numContours > numPoints )\n      return FT_THROW( Invalid_Argument );\n\n    if ( numPoints > FT_OUTLINE_POINTS_MAX )\n      return FT_THROW( Array_Too_Large );\n\n    if ( FT_NEW_ARRAY( anoutline->points,   numPoints   ) ||\n         FT_NEW_ARRAY( anoutline->tags,     numPoints   ) ||\n         FT_NEW_ARRAY( anoutline->contours, numContours ) )\n      goto Fail;\n\n    anoutline->n_points    = (FT_UShort)numPoints;\n    anoutline->n_contours  = (FT_Short)numContours;\n    anoutline->flags      |= FT_OUTLINE_OWNER;\n\n    return FT_Err_Ok;\n\n  Fail:\n    anoutline->flags |= FT_OUTLINE_OWNER;\n    FT_Outline_Done_Internal( memory, anoutline );\n\n    return error;\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_New( FT_Library   library,\n                  FT_UInt      numPoints,\n                  FT_Int       numContours,\n                  FT_Outline  *anoutline )\n  {\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    return FT_Outline_New_Internal( library->memory, numPoints,\n                                    numContours, anoutline );\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_Check( FT_Outline*  outline )\n  {\n    if ( outline )\n    {\n      FT_Int  n_points   = outline->n_points;\n      FT_Int  n_contours = outline->n_contours;\n      FT_Int  end0, end;\n      FT_Int  n;\n\n\n      /* empty glyph? */\n      if ( n_points == 0 && n_contours == 0 )\n        return FT_Err_Ok;\n\n      /* check point and contour counts */\n      if ( n_points <= 0 || n_contours <= 0 )\n        goto Bad;\n\n      end0 = end = -1;\n      for ( n = 0; n < n_contours; n++ )\n      {\n        end = outline->contours[n];\n\n        /* note that we don't accept empty contours */\n        if ( end <= end0 || end >= n_points )\n          goto Bad;\n\n        end0 = end;\n      }\n\n      if ( end != n_points - 1 )\n        goto Bad;\n\n      /* XXX: check the tags array */\n      return FT_Err_Ok;\n    }\n\n  Bad:\n    return FT_THROW( Invalid_Argument );\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_Copy( const FT_Outline*  source,\n                   FT_Outline        *target )\n  {\n    FT_Int  is_owner;\n\n\n    if ( !source || !target )\n      return FT_THROW( Invalid_Outline );\n\n    if ( source->n_points   != target->n_points   ||\n         source->n_contours != target->n_contours )\n      return FT_THROW( Invalid_Argument );\n\n    if ( source == target )\n      return FT_Err_Ok;\n\n    FT_ARRAY_COPY( target->points, source->points, source->n_points );\n\n    FT_ARRAY_COPY( target->tags, source->tags, source->n_points );\n\n    FT_ARRAY_COPY( target->contours, source->contours, source->n_contours );\n\n    /* copy all flags, except the `FT_OUTLINE_OWNER' one */\n    is_owner      = target->flags & FT_OUTLINE_OWNER;\n    target->flags = source->flags;\n\n    target->flags &= ~FT_OUTLINE_OWNER;\n    target->flags |= is_owner;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_Done_Internal( FT_Memory    memory,\n                            FT_Outline*  outline )\n  {\n    if ( !outline )\n      return FT_THROW( Invalid_Outline );\n\n    if ( !memory )\n      return FT_THROW( Invalid_Argument );\n\n    if ( outline->flags & FT_OUTLINE_OWNER )\n    {\n      FT_FREE( outline->points   );\n      FT_FREE( outline->tags     );\n      FT_FREE( outline->contours );\n    }\n    *outline = null_outline;\n\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_Done( FT_Library   library,\n                   FT_Outline*  outline )\n  {\n    /* check for valid `outline' in FT_Outline_Done_Internal() */\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    return FT_Outline_Done_Internal( library->memory, outline );\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Outline_Get_CBox( const FT_Outline*  outline,\n                       FT_BBox           *acbox )\n  {\n    FT_Pos  xMin, yMin, xMax, yMax;\n\n\n    if ( outline && acbox )\n    {\n      if ( outline->n_points == 0 )\n      {\n        xMin = 0;\n        yMin = 0;\n        xMax = 0;\n        yMax = 0;\n      }\n      else\n      {\n        FT_Vector*  vec   = outline->points;\n        FT_Vector*  limit = vec + outline->n_points;\n\n\n        xMin = xMax = vec->x;\n        yMin = yMax = vec->y;\n        vec++;\n\n        for ( ; vec < limit; vec++ )\n        {\n          FT_Pos  x, y;\n\n\n          x = vec->x;\n          if ( x < xMin ) xMin = x;\n          if ( x > xMax ) xMax = x;\n\n          y = vec->y;\n          if ( y < yMin ) yMin = y;\n          if ( y > yMax ) yMax = y;\n        }\n      }\n      acbox->xMin = xMin;\n      acbox->xMax = xMax;\n      acbox->yMin = yMin;\n      acbox->yMax = yMax;\n    }\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Outline_Translate( const FT_Outline*  outline,\n                        FT_Pos             xOffset,\n                        FT_Pos             yOffset )\n  {\n    FT_UShort   n;\n    FT_Vector*  vec;\n\n\n    if ( !outline )\n      return;\n\n    vec = outline->points;\n\n    for ( n = 0; n < outline->n_points; n++ )\n    {\n      vec->x += xOffset;\n      vec->y += yOffset;\n      vec++;\n    }\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Outline_Reverse( FT_Outline*  outline )\n  {\n    FT_UShort  n;\n    FT_Int     first, last;\n\n\n    if ( !outline )\n      return;\n\n    first = 0;\n\n    for ( n = 0; n < outline->n_contours; n++ )\n    {\n      last  = outline->contours[n];\n\n      /* reverse point table */\n      {\n        FT_Vector*  p = outline->points + first;\n        FT_Vector*  q = outline->points + last;\n        FT_Vector   swap;\n\n\n        while ( p < q )\n        {\n          swap = *p;\n          *p   = *q;\n          *q   = swap;\n          p++;\n          q--;\n        }\n      }\n\n      /* reverse tags table */\n      {\n        char*  p = outline->tags + first;\n        char*  q = outline->tags + last;\n\n\n        while ( p < q )\n        {\n          char  swap;\n\n\n          swap = *p;\n          *p   = *q;\n          *q   = swap;\n          p++;\n          q--;\n        }\n      }\n\n      first = last + 1;\n    }\n\n    outline->flags ^= FT_OUTLINE_REVERSE_FILL;\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_Render( FT_Library         library,\n                     FT_Outline*        outline,\n                     FT_Raster_Params*  params )\n  {\n    FT_Error     error;\n    FT_Bool      update = FALSE;\n    FT_Renderer  renderer;\n    FT_ListNode  node;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !outline )\n      return FT_THROW( Invalid_Outline );\n\n    if ( !params )\n      return FT_THROW( Invalid_Argument );\n\n    renderer = library->cur_renderer;\n    node     = library->renderers.head;\n\n    params->source = (void*)outline;\n\n    error = FT_ERR( Cannot_Render_Glyph );\n    while ( renderer )\n    {\n      error = renderer->raster_render( renderer->raster, params );\n      if ( !error || FT_ERR_NEQ( error, Cannot_Render_Glyph ) )\n        break;\n\n      /* FT_Err_Cannot_Render_Glyph is returned if the render mode   */\n      /* is unsupported by the current renderer for this glyph image */\n      /* format                                                      */\n\n      /* now, look for another renderer that supports the same */\n      /* format                                                */\n      renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE,\n                                     &node );\n      update   = TRUE;\n    }\n\n    /* if we changed the current renderer for the glyph image format */\n    /* we need to select it as the next current one                  */\n    if ( !error && update && renderer )\n      error = FT_Set_Renderer( library, renderer, 0, 0 );\n\n    return error;\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_Get_Bitmap( FT_Library        library,\n                         FT_Outline*       outline,\n                         const FT_Bitmap  *abitmap )\n  {\n    FT_Raster_Params  params;\n\n\n    if ( !abitmap )\n      return FT_THROW( Invalid_Argument );\n\n    /* other checks are delayed to `FT_Outline_Render' */\n\n    params.target = abitmap;\n    params.flags  = 0;\n\n    if ( abitmap->pixel_mode == FT_PIXEL_MODE_GRAY  ||\n         abitmap->pixel_mode == FT_PIXEL_MODE_LCD   ||\n         abitmap->pixel_mode == FT_PIXEL_MODE_LCD_V )\n      params.flags |= FT_RASTER_FLAG_AA;\n\n    return FT_Outline_Render( library, outline, &params );\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Vector_Transform( FT_Vector*        vector,\n                       const FT_Matrix*  matrix )\n  {\n    FT_Pos  xz, yz;\n\n\n    if ( !vector || !matrix )\n      return;\n\n    xz = FT_MulFix( vector->x, matrix->xx ) +\n         FT_MulFix( vector->y, matrix->xy );\n\n    yz = FT_MulFix( vector->x, matrix->yx ) +\n         FT_MulFix( vector->y, matrix->yy );\n\n    vector->x = xz;\n    vector->y = yz;\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Outline_Transform( const FT_Outline*  outline,\n                        const FT_Matrix*   matrix )\n  {\n    FT_Vector*  vec;\n    FT_Vector*  limit;\n\n\n    if ( !outline || !matrix )\n      return;\n\n    vec   = outline->points;\n    limit = vec + outline->n_points;\n\n    for ( ; vec < limit; vec++ )\n      FT_Vector_Transform( vec, matrix );\n  }\n\n\n#if 0\n\n#define FT_OUTLINE_GET_CONTOUR( outline, c, first, last )  \\\n  do                                                       \\\n  {                                                        \\\n    (first) = ( c > 0 ) ? (outline)->points +              \\\n                            (outline)->contours[c - 1] + 1 \\\n                        : (outline)->points;               \\\n    (last) = (outline)->points + (outline)->contours[c];   \\\n  } while ( 0 )\n\n\n  /* Is a point in some contour?                     */\n  /*                                                 */\n  /* We treat every point of the contour as if it    */\n  /* it were ON.  That is, we allow false positives, */\n  /* but disallow false negatives.  (XXX really?)    */\n  static FT_Bool\n  ft_contour_has( FT_Outline*  outline,\n                  FT_Short     c,\n                  FT_Vector*   point )\n  {\n    FT_Vector*  first;\n    FT_Vector*  last;\n    FT_Vector*  a;\n    FT_Vector*  b;\n    FT_UInt     n = 0;\n\n\n    FT_OUTLINE_GET_CONTOUR( outline, c, first, last );\n\n    for ( a = first; a <= last; a++ )\n    {\n      FT_Pos  x;\n      FT_Int  intersect;\n\n\n      b = ( a == last ) ? first : a + 1;\n\n      intersect = ( a->y - point->y ) ^ ( b->y - point->y );\n\n      /* a and b are on the same side */\n      if ( intersect >= 0 )\n      {\n        if ( intersect == 0 && a->y == point->y )\n        {\n          if ( ( a->x <= point->x && b->x >= point->x ) ||\n               ( a->x >= point->x && b->x <= point->x ) )\n            return 1;\n        }\n\n        continue;\n      }\n\n      x = a->x + ( b->x - a->x ) * (point->y - a->y ) / ( b->y - a->y );\n\n      if ( x < point->x )\n        n++;\n      else if ( x == point->x )\n        return 1;\n    }\n\n    return n & 1;\n  }\n\n\n  static FT_Bool\n  ft_contour_enclosed( FT_Outline*  outline,\n                       FT_UShort    c )\n  {\n    FT_Vector*  first;\n    FT_Vector*  last;\n    FT_Short    i;\n\n\n    FT_OUTLINE_GET_CONTOUR( outline, c, first, last );\n\n    for ( i = 0; i < outline->n_contours; i++ )\n    {\n      if ( i != c && ft_contour_has( outline, i, first ) )\n      {\n        FT_Vector*  pt;\n\n\n        for ( pt = first + 1; pt <= last; pt++ )\n          if ( !ft_contour_has( outline, i, pt ) )\n            return 0;\n\n        return 1;\n      }\n    }\n\n    return 0;\n  }\n\n\n  /* This version differs from the public one in that each */\n  /* part (contour not enclosed in another contour) of the */\n  /* outline is checked for orientation.  This is          */\n  /* necessary for some buggy CJK fonts.                   */\n  static FT_Orientation\n  ft_outline_get_orientation( FT_Outline*  outline )\n  {\n    FT_Short        i;\n    FT_Vector*      first;\n    FT_Vector*      last;\n    FT_Orientation  orient = FT_ORIENTATION_NONE;\n\n\n    first = outline->points;\n    for ( i = 0; i < outline->n_contours; i++, first = last + 1 )\n    {\n      FT_Vector*  point;\n      FT_Vector*  xmin_point;\n      FT_Pos      xmin;\n\n\n      last = outline->points + outline->contours[i];\n\n      /* skip degenerate contours */\n      if ( last < first + 2 )\n        continue;\n\n      if ( ft_contour_enclosed( outline, i ) )\n        continue;\n\n      xmin       = first->x;\n      xmin_point = first;\n\n      for ( point = first + 1; point <= last; point++ )\n      {\n        if ( point->x < xmin )\n        {\n          xmin       = point->x;\n          xmin_point = point;\n        }\n      }\n\n      /* check the orientation of the contour */\n      {\n        FT_Vector*      prev;\n        FT_Vector*      next;\n        FT_Orientation  o;\n\n\n        prev = ( xmin_point == first ) ? last : xmin_point - 1;\n        next = ( xmin_point == last ) ? first : xmin_point + 1;\n\n        if ( FT_Atan2( prev->x - xmin_point->x, prev->y - xmin_point->y ) >\n             FT_Atan2( next->x - xmin_point->x, next->y - xmin_point->y ) )\n          o = FT_ORIENTATION_POSTSCRIPT;\n        else\n          o = FT_ORIENTATION_TRUETYPE;\n\n        if ( orient == FT_ORIENTATION_NONE )\n          orient = o;\n        else if ( orient != o )\n          return FT_ORIENTATION_NONE;\n      }\n    }\n\n    return orient;\n  }\n\n#endif /* 0 */\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_Embolden( FT_Outline*  outline,\n                       FT_Pos       strength )\n  {\n    return FT_Outline_EmboldenXY( outline, strength, strength );\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Outline_EmboldenXY( FT_Outline*  outline,\n                         FT_Pos       xstrength,\n                         FT_Pos       ystrength )\n  {\n    FT_Vector*  points;\n    FT_Vector   v_prev, v_first, v_next, v_cur;\n    FT_Int      c, n, first;\n    FT_Int      orientation;\n\n\n    if ( !outline )\n      return FT_THROW( Invalid_Outline );\n\n    xstrength /= 2;\n    ystrength /= 2;\n    if ( xstrength == 0 && ystrength == 0 )\n      return FT_Err_Ok;\n\n    orientation = FT_Outline_Get_Orientation( outline );\n    if ( orientation == FT_ORIENTATION_NONE )\n    {\n      if ( outline->n_contours )\n        return FT_THROW( Invalid_Argument );\n      else\n        return FT_Err_Ok;\n    }\n\n    points = outline->points;\n\n    first = 0;\n    for ( c = 0; c < outline->n_contours; c++ )\n    {\n      FT_Vector  in, out, shift;\n      FT_Fixed   l_in, l_out, l, q, d;\n      int        last = outline->contours[c];\n\n\n      v_first = points[first];\n      v_prev  = points[last];\n      v_cur   = v_first;\n\n      /* compute incoming normalized vector */\n      in.x = v_cur.x - v_prev.x;\n      in.y = v_cur.y - v_prev.y;\n      l_in = FT_Vector_Length( &in );\n      if ( l_in )\n      {\n        in.x = FT_DivFix( in.x, l_in );\n        in.y = FT_DivFix( in.y, l_in );\n      }\n\n      for ( n = first; n <= last; n++ )\n      {\n        if ( n < last )\n          v_next = points[n + 1];\n        else\n          v_next = v_first;\n\n        /* compute outgoing normalized vector */\n        out.x = v_next.x - v_cur.x;\n        out.y = v_next.y - v_cur.y;\n        l_out = FT_Vector_Length( &out );\n        if ( l_out )\n        {\n          out.x = FT_DivFix( out.x, l_out );\n          out.y = FT_DivFix( out.y, l_out );\n        }\n\n        d = FT_MulFix( in.x, out.x ) + FT_MulFix( in.y, out.y );\n\n        /* shift only if turn is less than ~160 degrees */\n        if ( d > -0xF000L )\n        {\n          d = d + 0x10000L;\n\n          /* shift components are aligned along lateral bisector */\n          /* and directed according to the outline orientation.  */\n          shift.x = in.y + out.y;\n          shift.y = in.x + out.x;\n\n          if ( orientation == FT_ORIENTATION_TRUETYPE )\n            shift.x = -shift.x;\n          else\n            shift.y = -shift.y;\n\n          /* restrict shift magnitude to better handle collapsing segments */\n          q = FT_MulFix( out.x, in.y ) - FT_MulFix( out.y, in.x );\n          if ( orientation == FT_ORIENTATION_TRUETYPE )\n            q = -q;\n\n          l = FT_MIN( l_in, l_out );\n\n          /* non-strict inequalities avoid divide-by-zero when q == l == 0 */\n          if ( FT_MulFix( xstrength, q ) <= FT_MulFix( d, l ) )\n            shift.x = FT_MulDiv( shift.x, xstrength, d );\n          else\n            shift.x = FT_MulDiv( shift.x, l, q );\n\n\n          if ( FT_MulFix( ystrength, q ) <= FT_MulFix( d, l ) )\n            shift.y = FT_MulDiv( shift.y, ystrength, d );\n          else\n            shift.y = FT_MulDiv( shift.y, l, q );\n        }\n        else\n          shift.x = shift.y = 0;\n\n        outline->points[n].x = v_cur.x + xstrength + shift.x;\n        outline->points[n].y = v_cur.y + ystrength + shift.y;\n\n        in    = out;\n        l_in  = l_out;\n        v_cur = v_next;\n      }\n\n      first = last + 1;\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  /* documentation is in ftoutln.h */\n\n  FT_EXPORT_DEF( FT_Orientation )\n  FT_Outline_Get_Orientation( FT_Outline*  outline )\n  {\n    FT_BBox     cbox;\n    FT_Int      xshift, yshift;\n    FT_Vector*  points;\n    FT_Vector   v_prev, v_cur;\n    FT_Int      c, n, first;\n    FT_Pos      area = 0;\n\n\n    if ( !outline || outline->n_points <= 0 )\n      return FT_ORIENTATION_TRUETYPE;\n\n    /* We use the nonzero winding rule to find the orientation.       */\n    /* Since glyph outlines behave much more `regular' than arbitrary */\n    /* cubic or quadratic curves, this test deals with the polygon    */\n    /* only which is spanned up by the control points.                */\n\n    FT_Outline_Get_CBox( outline, &cbox );\n\n    /* Handle collapsed outlines to avoid undefined FT_MSB. */\n    if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax )\n      return FT_ORIENTATION_NONE;\n\n    xshift = FT_MSB( FT_ABS( cbox.xMax ) | FT_ABS( cbox.xMin ) ) - 14;\n    xshift = FT_MAX( xshift, 0 );\n\n    yshift = FT_MSB( cbox.yMax - cbox.yMin ) - 14;\n    yshift = FT_MAX( yshift, 0 );\n\n    points = outline->points;\n\n    first = 0;\n    for ( c = 0; c < outline->n_contours; c++ )\n    {\n      FT_Int  last = outline->contours[c];\n\n\n      v_prev = points[last];\n\n      for ( n = first; n <= last; n++ )\n      {\n        v_cur = points[n];\n        area += ( ( v_cur.y - v_prev.y ) >> yshift ) *\n                ( ( v_cur.x + v_prev.x ) >> xshift );\n        v_prev = v_cur;\n      }\n\n      first = last + 1;\n    }\n\n    if ( area > 0 )\n      return FT_ORIENTATION_POSTSCRIPT;\n    else if ( area < 0 )\n      return FT_ORIENTATION_TRUETYPE;\n    else\n      return FT_ORIENTATION_NONE;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftpatent.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftpatent.c                                                             */\n/*                                                                         */\n/*    FreeType API for checking patented TrueType bytecode instructions    */\n/*    (body).                                                              */\n/*                                                                         */\n/*  Copyright 2007, 2008, 2010 by David Turner.                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_STREAM_H\n#include FT_SERVICE_SFNT_H\n#include FT_SERVICE_TRUETYPE_GLYF_H\n\n\n  static FT_Bool\n  _tt_check_patents_in_range( FT_Stream  stream,\n                              FT_ULong   size )\n  {\n    FT_Bool   result = FALSE;\n    FT_Error  error;\n    FT_Bytes  p, end;\n\n\n    if ( FT_FRAME_ENTER( size ) )\n      return 0;\n\n    p   = stream->cursor;\n    end = p + size;\n\n    while ( p < end )\n    {\n      switch (p[0])\n      {\n      case 0x06:  /* SPvTL // */\n      case 0x07:  /* SPvTL +  */\n      case 0x08:  /* SFvTL // */\n      case 0x09:  /* SFvTL +  */\n      case 0x0A:  /* SPvFS    */\n      case 0x0B:  /* SFvFS    */\n        result = TRUE;\n        goto Exit;\n\n      case 0x40:\n        if ( p + 1 >= end )\n          goto Exit;\n\n        p += p[1] + 2;\n        break;\n\n      case 0x41:\n        if ( p + 1 >= end )\n          goto Exit;\n\n        p += p[1] * 2 + 2;\n        break;\n\n      case 0x71:  /* DELTAP2 */\n      case 0x72:  /* DELTAP3 */\n      case 0x73:  /* DELTAC0 */\n      case 0x74:  /* DELTAC1 */\n      case 0x75:  /* DELTAC2 */\n        result = TRUE;\n        goto Exit;\n\n      case 0xB0:\n      case 0xB1:\n      case 0xB2:\n      case 0xB3:\n      case 0xB4:\n      case 0xB5:\n      case 0xB6:\n      case 0xB7:\n        p += ( p[0] - 0xB0 ) + 2;\n        break;\n\n      case 0xB8:\n      case 0xB9:\n      case 0xBA:\n      case 0xBB:\n      case 0xBC:\n      case 0xBD:\n      case 0xBE:\n      case 0xBF:\n        p += ( p[0] - 0xB8 ) * 2 + 3;\n        break;\n\n      default:\n        p += 1;\n        break;\n      }\n    }\n\n  Exit:\n    FT_UNUSED( error );\n    FT_FRAME_EXIT();\n    return result;\n  }\n\n\n  static FT_Bool\n  _tt_check_patents_in_table( FT_Face   face,\n                              FT_ULong  tag )\n  {\n    FT_Stream              stream = face->stream;\n    FT_Error               error  = FT_Err_Ok;\n    FT_Service_SFNT_Table  service;\n    FT_Bool                result = FALSE;\n\n\n    FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );\n\n    if ( service )\n    {\n      FT_UInt   i = 0;\n      FT_ULong  tag_i = 0, offset_i = 0, length_i = 0;\n\n\n      for ( i = 0; !error && tag_i != tag ; i++ )\n        error = service->table_info( face, i,\n                                     &tag_i, &offset_i, &length_i );\n\n      if ( error                      ||\n           FT_STREAM_SEEK( offset_i ) )\n        goto Exit;\n\n      result = _tt_check_patents_in_range( stream, length_i );\n    }\n\n  Exit:\n    return result;\n  }\n\n\n  static FT_Bool\n  _tt_face_check_patents( FT_Face  face )\n  {\n    FT_Stream  stream = face->stream;\n    FT_UInt    gindex;\n    FT_Error   error;\n    FT_Bool    result;\n\n    FT_Service_TTGlyf  service;\n\n\n    result = _tt_check_patents_in_table( face, TTAG_fpgm );\n    if ( result )\n      goto Exit;\n\n    result = _tt_check_patents_in_table( face, TTAG_prep );\n    if ( result )\n      goto Exit;\n\n    FT_FACE_FIND_SERVICE( face, service, TT_GLYF );\n    if ( service == NULL )\n      goto Exit;\n\n    for ( gindex = 0; gindex < (FT_UInt)face->num_glyphs; gindex++ )\n    {\n      FT_ULong  offset, num_ins, size;\n      FT_Int    num_contours;\n\n\n      offset = service->get_location( face, gindex, &size );\n      if ( size == 0 )\n        continue;\n\n      if ( FT_STREAM_SEEK( offset )      ||\n           FT_READ_SHORT( num_contours ) )\n        continue;\n\n      if ( num_contours >= 0 )  /* simple glyph */\n      {\n        if ( FT_STREAM_SKIP( 8 + num_contours * 2 ) )\n          continue;\n      }\n      else  /* compound glyph */\n      {\n        FT_Bool  has_instr = 0;\n\n\n        if ( FT_STREAM_SKIP( 8 ) )\n          continue;\n\n        /* now read each component */\n        for (;;)\n        {\n          FT_UInt  flags, toskip;\n\n\n          if( FT_READ_USHORT( flags ) )\n            break;\n\n          toskip = 2 + 1 + 1;\n\n          if ( ( flags & ( 1 << 0 ) ) != 0 )       /* ARGS_ARE_WORDS */\n            toskip += 2;\n\n          if ( ( flags & ( 1 << 3 ) ) != 0 )       /* WE_HAVE_A_SCALE */\n            toskip += 2;\n          else if ( ( flags & ( 1 << 6 ) ) != 0 )  /* WE_HAVE_X_Y_SCALE */\n            toskip += 4;\n          else if ( ( flags & ( 1 << 7 ) ) != 0 )  /* WE_HAVE_A_2x2 */\n            toskip += 8;\n\n          if ( ( flags & ( 1 << 8 ) ) != 0 )       /* WE_HAVE_INSTRUCTIONS */\n            has_instr = 1;\n\n          if ( FT_STREAM_SKIP( toskip ) )\n            goto NextGlyph;\n\n          if ( ( flags & ( 1 << 5 ) ) == 0 )       /* MORE_COMPONENTS */\n            break;\n        }\n\n        if ( !has_instr )\n          goto NextGlyph;\n      }\n\n      if ( FT_READ_USHORT( num_ins ) )\n        continue;\n\n      result = _tt_check_patents_in_range( stream, num_ins );\n      if ( result )\n        goto Exit;\n\n    NextGlyph:\n      ;\n    }\n\n  Exit:\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Bool )\n  FT_Face_CheckTrueTypePatents( FT_Face  face )\n  {\n    FT_Bool  result = FALSE;\n\n\n    if ( face && FT_IS_SFNT( face ) )\n      result = _tt_face_check_patents( face );\n\n    return result;\n  }\n\n\n  /* documentation is in freetype.h */\n\n  FT_EXPORT_DEF( FT_Bool )\n  FT_Face_SetUnpatentedHinting( FT_Face  face,\n                                FT_Bool  value )\n  {\n    FT_Bool  result = FALSE;\n\n\n#if defined( TT_CONFIG_OPTION_UNPATENTED_HINTING ) && \\\n    !defined( TT_CONFIG_OPTION_BYTECODE_INTERPRETER )\n    if ( face && FT_IS_SFNT( face ) )\n    {\n      result = !face->internal->ignore_unpatented_hinter;\n      face->internal->ignore_unpatented_hinter = !value;\n    }\n#else\n    FT_UNUSED( face );\n    FT_UNUSED( value );\n#endif\n\n    return result;\n  }\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftpfr.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftpfr.c                                                                */\n/*                                                                         */\n/*    FreeType API for accessing PFR-specific data (body).                 */\n/*                                                                         */\n/*  Copyright 2002-2004, 2008, 2010, 2013, 2014 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_PFR_H\n\n\n  /* check the format */\n  static FT_Service_PfrMetrics\n  ft_pfr_check( FT_Face  face )\n  {\n    FT_Service_PfrMetrics  service = NULL;\n\n\n    if ( face )\n      FT_FACE_LOOKUP_SERVICE( face, service, PFR_METRICS );\n\n    return service;\n  }\n\n\n  /* documentation is in ftpfr.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_PFR_Metrics( FT_Face    face,\n                      FT_UInt   *aoutline_resolution,\n                      FT_UInt   *ametrics_resolution,\n                      FT_Fixed  *ametrics_x_scale,\n                      FT_Fixed  *ametrics_y_scale )\n  {\n    FT_Error               error = FT_Err_Ok;\n    FT_Service_PfrMetrics  service;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    service = ft_pfr_check( face );\n    if ( service )\n    {\n      error = service->get_metrics( face,\n                                    aoutline_resolution,\n                                    ametrics_resolution,\n                                    ametrics_x_scale,\n                                    ametrics_y_scale );\n    }\n    else\n    {\n      FT_Fixed  x_scale, y_scale;\n\n\n      /* this is not a PFR font */\n      if ( aoutline_resolution )\n        *aoutline_resolution = face->units_per_EM;\n\n      if ( ametrics_resolution )\n        *ametrics_resolution = face->units_per_EM;\n\n      x_scale = y_scale = 0x10000L;\n      if ( face->size )\n      {\n        x_scale = face->size->metrics.x_scale;\n        y_scale = face->size->metrics.y_scale;\n      }\n\n      if ( ametrics_x_scale )\n        *ametrics_x_scale = x_scale;\n\n      if ( ametrics_y_scale )\n        *ametrics_y_scale = y_scale;\n\n      error = FT_THROW( Unknown_File_Format );\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftpfr.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_PFR_Kerning( FT_Face     face,\n                      FT_UInt     left,\n                      FT_UInt     right,\n                      FT_Vector  *avector )\n  {\n    FT_Error               error;\n    FT_Service_PfrMetrics  service;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !avector )\n      return FT_THROW( Invalid_Argument );\n\n    service = ft_pfr_check( face );\n    if ( service )\n      error = service->get_kerning( face, left, right, avector );\n    else\n      error = FT_Get_Kerning( face, left, right,\n                              FT_KERNING_UNSCALED, avector );\n\n    return error;\n  }\n\n\n  /* documentation is in ftpfr.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_PFR_Advance( FT_Face   face,\n                      FT_UInt   gindex,\n                      FT_Pos   *aadvance )\n  {\n    FT_Error               error;\n    FT_Service_PfrMetrics  service;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !aadvance )\n      return FT_THROW( Invalid_Argument );\n\n    service = ft_pfr_check( face );\n    if ( service )\n      error = service->get_advance( face, gindex, aadvance );\n    else\n      /* XXX: TODO: PROVIDE ADVANCE-LOADING METHOD TO ALL FONT DRIVERS */\n      error = FT_THROW( Invalid_Argument );\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftpic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftpic.c                                                                */\n/*                                                                         */\n/*    The FreeType position independent code services (body).              */\n/*                                                                         */\n/*  Copyright 2009, 2013 by                                                */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"basepic.h\"\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* documentation is in ftpic.h */\n\n  FT_BASE_DEF( FT_Error )\n  ft_pic_container_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Error           error;\n\n\n    FT_MEM_SET( pic_container, 0, sizeof ( *pic_container ) );\n\n    error = ft_base_pic_init( library );\n    if ( error )\n      return error;\n\n    return FT_Err_Ok;\n  }\n\n\n  /* Destroy the contents of the container. */\n  FT_BASE_DEF( void )\n  ft_pic_container_destroy( FT_Library  library )\n  {\n    ft_base_pic_free( library );\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftrfork.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftrfork.c                                                              */\n/*                                                                         */\n/*    Embedded resource forks accessor (body).                             */\n/*                                                                         */\n/*  Copyright 2004-2010, 2013, 2014 by                                     */\n/*  Masatake YAMATO and Redhat K.K.                                        */\n/*                                                                         */\n/*  FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are     */\n/*  derived from ftobjs.c.                                                 */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/* Development of the code in this file is support of                      */\n/* Information-technology Promotion Agency, Japan.                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_RFORK_H\n#include \"basepic.h\"\n#include \"ftbase.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_raccess\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****               Resource fork directory access                    ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_BASE_DEF( FT_Error )\n  FT_Raccess_Get_HeaderInfo( FT_Library  library,\n                             FT_Stream   stream,\n                             FT_Long     rfork_offset,\n                             FT_Long    *map_offset,\n                             FT_Long    *rdata_pos )\n  {\n    FT_Error       error;\n    unsigned char  head[16], head2[16];\n    FT_Long        map_pos, rdata_len;\n    int            allzeros, allmatch, i;\n    FT_Long        type_list;\n\n    FT_UNUSED( library );\n\n\n    error = FT_Stream_Seek( stream, rfork_offset );\n    if ( error )\n      return error;\n\n    error = FT_Stream_Read( stream, (FT_Byte *)head, 16 );\n    if ( error )\n      return error;\n\n    *rdata_pos = rfork_offset + ( ( head[0] << 24 ) |\n                                  ( head[1] << 16 ) |\n                                  ( head[2] <<  8 ) |\n                                    head[3]         );\n    map_pos    = rfork_offset + ( ( head[4] << 24 ) |\n                                  ( head[5] << 16 ) |\n                                  ( head[6] <<  8 ) |\n                                    head[7]         );\n    rdata_len = ( head[ 8] << 24 ) |\n                ( head[ 9] << 16 ) |\n                ( head[10] <<  8 ) |\n                  head[11];\n\n    /* map_len = head[12] .. head[15] */\n\n    if ( *rdata_pos + rdata_len != map_pos || map_pos == rfork_offset )\n      return FT_THROW( Unknown_File_Format );\n\n    error = FT_Stream_Seek( stream, map_pos );\n    if ( error )\n      return error;\n\n    head2[15] = (FT_Byte)( head[15] + 1 );       /* make it be different */\n\n    error = FT_Stream_Read( stream, (FT_Byte*)head2, 16 );\n    if ( error )\n      return error;\n\n    allzeros = 1;\n    allmatch = 1;\n    for ( i = 0; i < 16; ++i )\n    {\n      if ( head2[i] != 0 )\n        allzeros = 0;\n      if ( head2[i] != head[i] )\n        allmatch = 0;\n    }\n    if ( !allzeros && !allmatch )\n      return FT_THROW( Unknown_File_Format );\n\n    /* If we have reached this point then it is probably a mac resource */\n    /* file.  Now, does it contain any interesting resources?           */\n    /* Skip handle to next resource map, the file resource number, and  */\n    /* attributes.                                                      */\n    (void)FT_STREAM_SKIP( 4        /* skip handle to next resource map */\n                          + 2      /* skip file resource number */\n                          + 2 );   /* skip attributes */\n\n    if ( FT_READ_USHORT( type_list ) )\n      return error;\n    if ( type_list == -1 )\n      return FT_THROW( Unknown_File_Format );\n\n    error = FT_Stream_Seek( stream, map_pos + type_list );\n    if ( error )\n      return error;\n\n    *map_offset = map_pos + type_list;\n    return FT_Err_Ok;\n  }\n\n\n  static int\n  ft_raccess_sort_ref_by_id( FT_RFork_Ref*  a,\n                             FT_RFork_Ref*  b )\n  {\n    if ( a->res_id < b->res_id )\n      return -1;\n    else if ( a->res_id > b->res_id )\n      return 1;\n    else\n      return 0;\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Raccess_Get_DataOffsets( FT_Library  library,\n                              FT_Stream   stream,\n                              FT_Long     map_offset,\n                              FT_Long     rdata_pos,\n                              FT_Long     tag,\n                              FT_Bool     sort_by_res_id,\n                              FT_Long   **offsets,\n                              FT_Long    *count )\n  {\n    FT_Error      error;\n    int           i, j, cnt, subcnt;\n    FT_Long       tag_internal, rpos;\n    FT_Memory     memory = library->memory;\n    FT_Long       temp;\n    FT_Long       *offsets_internal = NULL;\n    FT_RFork_Ref  *ref = NULL;\n\n\n    FT_TRACE3(( \"\\n\" ));\n    error = FT_Stream_Seek( stream, map_offset );\n    if ( error )\n      return error;\n\n    if ( FT_READ_USHORT( cnt ) )\n      return error;\n    cnt++;\n\n    for ( i = 0; i < cnt; ++i )\n    {\n      if ( FT_READ_LONG( tag_internal ) ||\n           FT_READ_USHORT( subcnt )     ||\n           FT_READ_USHORT( rpos )       )\n        return error;\n\n      FT_TRACE2(( \"Resource tags: %c%c%c%c\\n\",\n                  (char)( 0xFF & ( tag_internal >> 24 ) ),\n                  (char)( 0xFF & ( tag_internal >> 16 ) ),\n                  (char)( 0xFF & ( tag_internal >>  8 ) ),\n                  (char)( 0xFF & ( tag_internal >>  0 ) ) ));\n      FT_TRACE3(( \"             : subcount=%d, suboffset=0x%04x\\n\",\n                  subcnt, rpos ));\n\n      if ( tag_internal == tag )\n      {\n        *count = subcnt + 1;\n        rpos  += map_offset;\n\n        error = FT_Stream_Seek( stream, rpos );\n        if ( error )\n          return error;\n\n        if ( FT_NEW_ARRAY( ref, *count ) )\n          return error;\n\n        for ( j = 0; j < *count; ++j )\n        {\n          if ( FT_READ_USHORT( ref[j].res_id ) )\n            goto Exit;\n          if ( FT_STREAM_SKIP( 2 ) ) /* resource name */\n            goto Exit;\n          if ( FT_READ_LONG( temp ) )\n            goto Exit;\n          if ( FT_STREAM_SKIP( 4 ) ) /* mbz */\n            goto Exit;\n\n          ref[j].offset = temp & 0xFFFFFFL;\n          FT_TRACE3(( \"             [%d]:\"\n                      \" resource_id=0x%04x, offset=0x%08x\\n\",\n                      j, ref[j].res_id, ref[j].offset ));\n        }\n\n        if (sort_by_res_id)\n        {\n          ft_qsort( ref, *count, sizeof ( FT_RFork_Ref ),\n                    ( int(*)(const void*, const void*) )\n                    ft_raccess_sort_ref_by_id );\n\n          FT_TRACE3(( \"             -- sort resources by their ids --\\n\" ));\n          for ( j = 0; j < *count; ++ j ) {\n            FT_TRACE3(( \"             [%d]:\"\n                        \" resource_id=0x%04x, offset=0x%08x\\n\",\n                        j, ref[j].res_id, ref[j].offset ));\n          }\n        }\n\n        if ( FT_NEW_ARRAY( offsets_internal, *count ) )\n          goto Exit;\n\n        /* XXX: duplicated reference ID,\n         *      gap between reference IDs are acceptable?\n         *      further investigation on Apple implementation is needed.\n         */\n        for ( j = 0; j < *count; ++j )\n          offsets_internal[j] = rdata_pos + ref[j].offset;\n\n        *offsets = offsets_internal;\n        error    = FT_Err_Ok;\n\n      Exit:\n        FT_FREE( ref );\n        return error;\n      }\n    }\n\n    return FT_THROW( Cannot_Open_Resource );\n  }\n\n\n#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                     Guessing functions                          ****/\n  /****                                                                 ****/\n  /****            When you add a new guessing function,                ****/\n  /****           update FT_RACCESS_N_RULES in ftrfork.h.               ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static FT_Error\n  raccess_guess_apple_double( FT_Library  library,\n                              FT_Stream   stream,\n                              char       *base_file_name,\n                              char      **result_file_name,\n                              FT_Long    *result_offset );\n\n  static FT_Error\n  raccess_guess_apple_single( FT_Library  library,\n                              FT_Stream   stream,\n                              char       *base_file_name,\n                              char      **result_file_name,\n                              FT_Long    *result_offset );\n\n  static FT_Error\n  raccess_guess_darwin_ufs_export( FT_Library  library,\n                                   FT_Stream   stream,\n                                   char       *base_file_name,\n                                   char      **result_file_name,\n                                   FT_Long    *result_offset );\n\n  static FT_Error\n  raccess_guess_darwin_newvfs( FT_Library  library,\n                               FT_Stream   stream,\n                               char       *base_file_name,\n                               char      **result_file_name,\n                               FT_Long    *result_offset );\n\n  static FT_Error\n  raccess_guess_darwin_hfsplus( FT_Library  library,\n                                FT_Stream   stream,\n                                char       *base_file_name,\n                                char      **result_file_name,\n                                FT_Long    *result_offset );\n\n  static FT_Error\n  raccess_guess_vfat( FT_Library  library,\n                      FT_Stream   stream,\n                      char       *base_file_name,\n                      char      **result_file_name,\n                      FT_Long    *result_offset );\n\n  static FT_Error\n  raccess_guess_linux_cap( FT_Library  library,\n                           FT_Stream   stream,\n                           char       *base_file_name,\n                           char      **result_file_name,\n                           FT_Long    *result_offset );\n\n  static FT_Error\n  raccess_guess_linux_double( FT_Library  library,\n                              FT_Stream   stream,\n                              char       *base_file_name,\n                              char      **result_file_name,\n                              FT_Long    *result_offset );\n\n  static FT_Error\n  raccess_guess_linux_netatalk( FT_Library  library,\n                                FT_Stream   stream,\n                                char       *base_file_name,\n                                char      **result_file_name,\n                                FT_Long    *result_offset );\n\n\n  CONST_FT_RFORK_RULE_ARRAY_BEGIN(ft_raccess_guess_table,\n                                  ft_raccess_guess_rec)\n  CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_double,      apple_double)\n  CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_single,      apple_single)\n  CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_ufs_export, darwin_ufs_export)\n  CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_newvfs,     darwin_newvfs)\n  CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_hfsplus,    darwin_hfsplus)\n  CONST_FT_RFORK_RULE_ARRAY_ENTRY(vfat,              vfat)\n  CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_cap,         linux_cap)\n  CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_double,      linux_double)\n  CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_netatalk,    linux_netatalk)\n  CONST_FT_RFORK_RULE_ARRAY_END\n\n\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                       Helper functions                          ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n\n  static FT_Error\n  raccess_guess_apple_generic( FT_Library  library,\n                               FT_Stream   stream,\n                               char       *base_file_name,\n                               FT_Int32    magic,\n                               FT_Long    *result_offset );\n\n  static FT_Error\n  raccess_guess_linux_double_from_file_name( FT_Library  library,\n                                             char *      file_name,\n                                             FT_Long    *result_offset );\n\n  static char *\n  raccess_make_file_name( FT_Memory    memory,\n                          const char  *original_name,\n                          const char  *insertion );\n\n  FT_BASE_DEF( void )\n  FT_Raccess_Guess( FT_Library  library,\n                    FT_Stream   stream,\n                    char*       base_name,\n                    char      **new_names,\n                    FT_Long    *offsets,\n                    FT_Error   *errors )\n  {\n    FT_Int  i;\n\n\n    for ( i = 0; i < FT_RACCESS_N_RULES; i++ )\n    {\n      new_names[i] = NULL;\n      if ( NULL != stream )\n        errors[i] = FT_Stream_Seek( stream, 0 );\n      else\n        errors[i] = FT_Err_Ok;\n\n      if ( errors[i] )\n        continue ;\n\n      errors[i] = (FT_RACCESS_GUESS_TABLE_GET[i].func)( library,\n                                                 stream, base_name,\n                                                 &(new_names[i]),\n                                                 &(offsets[i]) );\n    }\n\n    return;\n  }\n\n\n#ifndef FT_MACINTOSH\n  static FT_RFork_Rule\n  raccess_get_rule_type_from_rule_index( FT_Library  library,\n                                         FT_UInt     rule_index )\n  {\n    FT_UNUSED( library );\n\n    if ( rule_index >= FT_RACCESS_N_RULES )\n      return FT_RFork_Rule_invalid;\n\n    return FT_RACCESS_GUESS_TABLE_GET[rule_index].type;\n  }\n\n\n  /*\n   * For this function, refer ftbase.h.\n   */\n  FT_LOCAL_DEF( FT_Bool )\n  ft_raccess_rule_by_darwin_vfs( FT_Library  library,\n                                 FT_UInt     rule_index )\n  {\n    switch( raccess_get_rule_type_from_rule_index( library, rule_index ) )\n    {\n      case FT_RFork_Rule_darwin_newvfs:\n      case FT_RFork_Rule_darwin_hfsplus:\n        return TRUE;\n\n      default:\n        return FALSE;\n    }\n  }\n#endif\n\n\n  static FT_Error\n  raccess_guess_apple_double( FT_Library  library,\n                              FT_Stream   stream,\n                              char       *base_file_name,\n                              char      **result_file_name,\n                              FT_Long    *result_offset )\n  {\n    FT_Int32  magic = ( 0x00 << 24 ) |\n                      ( 0x05 << 16 ) |\n                      ( 0x16 <<  8 ) |\n                        0x07;\n\n\n    *result_file_name = NULL;\n    if ( NULL == stream )\n      return FT_THROW( Cannot_Open_Stream );\n\n    return raccess_guess_apple_generic( library, stream, base_file_name,\n                                        magic, result_offset );\n  }\n\n\n  static FT_Error\n  raccess_guess_apple_single( FT_Library  library,\n                              FT_Stream   stream,\n                              char       *base_file_name,\n                              char      **result_file_name,\n                              FT_Long    *result_offset )\n  {\n    FT_Int32  magic = ( 0x00 << 24 ) |\n                      ( 0x05 << 16 ) |\n                      ( 0x16 <<  8 ) |\n                        0x00;\n\n\n    *result_file_name = NULL;\n    if ( NULL == stream )\n      return FT_THROW( Cannot_Open_Stream );\n\n    return raccess_guess_apple_generic( library, stream, base_file_name,\n                                        magic, result_offset );\n  }\n\n\n  static FT_Error\n  raccess_guess_darwin_ufs_export( FT_Library  library,\n                                   FT_Stream   stream,\n                                   char       *base_file_name,\n                                   char      **result_file_name,\n                                   FT_Long    *result_offset )\n  {\n    char*      newpath;\n    FT_Error   error;\n    FT_Memory  memory;\n\n    FT_UNUSED( stream );\n\n\n    memory  = library->memory;\n    newpath = raccess_make_file_name( memory, base_file_name, \"._\" );\n    if ( !newpath )\n      return FT_THROW( Out_Of_Memory );\n\n    error = raccess_guess_linux_double_from_file_name( library, newpath,\n                                                       result_offset );\n    if ( !error )\n      *result_file_name = newpath;\n    else\n      FT_FREE( newpath );\n\n    return error;\n  }\n\n\n  static FT_Error\n  raccess_guess_darwin_hfsplus( FT_Library  library,\n                                FT_Stream   stream,\n                                char       *base_file_name,\n                                char      **result_file_name,\n                                FT_Long    *result_offset )\n  {\n    /*\n      Only meaningful on systems with hfs+ drivers (or Macs).\n     */\n    FT_Error   error;\n    char*      newpath = NULL;\n    FT_Memory  memory;\n    FT_Long    base_file_len = (FT_Long)ft_strlen( base_file_name );\n\n    FT_UNUSED( stream );\n\n\n    memory = library->memory;\n\n    if ( base_file_len + 6 > FT_INT_MAX )\n      return FT_THROW( Array_Too_Large );\n\n    if ( FT_ALLOC( newpath, base_file_len + 6 ) )\n      return error;\n\n    FT_MEM_COPY( newpath, base_file_name, base_file_len );\n    FT_MEM_COPY( newpath + base_file_len, \"/rsrc\", 6 );\n\n    *result_file_name = newpath;\n    *result_offset    = 0;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  raccess_guess_darwin_newvfs( FT_Library  library,\n                               FT_Stream   stream,\n                               char       *base_file_name,\n                               char      **result_file_name,\n                               FT_Long    *result_offset )\n  {\n    /*\n      Only meaningful on systems with Mac OS X (> 10.1).\n     */\n    FT_Error   error;\n    char*      newpath = NULL;\n    FT_Memory  memory;\n    FT_Long    base_file_len = (FT_Long)ft_strlen( base_file_name );\n\n    FT_UNUSED( stream );\n\n\n    memory = library->memory;\n\n    if ( base_file_len + 18 > FT_INT_MAX )\n      return FT_THROW( Array_Too_Large );\n\n    if ( FT_ALLOC( newpath, base_file_len + 18 ) )\n      return error;\n\n    FT_MEM_COPY( newpath, base_file_name, base_file_len );\n    FT_MEM_COPY( newpath + base_file_len, \"/..namedfork/rsrc\", 18 );\n\n    *result_file_name = newpath;\n    *result_offset    = 0;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  raccess_guess_vfat( FT_Library  library,\n                      FT_Stream   stream,\n                      char       *base_file_name,\n                      char      **result_file_name,\n                      FT_Long    *result_offset )\n  {\n    char*      newpath;\n    FT_Memory  memory;\n\n    FT_UNUSED( stream );\n\n\n    memory = library->memory;\n\n    newpath = raccess_make_file_name( memory, base_file_name,\n                                      \"resource.frk/\" );\n    if ( !newpath )\n      return FT_THROW( Out_Of_Memory );\n\n    *result_file_name = newpath;\n    *result_offset    = 0;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  raccess_guess_linux_cap( FT_Library  library,\n                           FT_Stream   stream,\n                           char       *base_file_name,\n                           char      **result_file_name,\n                           FT_Long    *result_offset )\n  {\n    char*      newpath;\n    FT_Memory  memory;\n\n    FT_UNUSED( stream );\n\n\n    memory = library->memory;\n\n    newpath = raccess_make_file_name( memory, base_file_name, \".resource/\" );\n    if ( !newpath )\n      return FT_THROW( Out_Of_Memory );\n\n    *result_file_name = newpath;\n    *result_offset    = 0;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  raccess_guess_linux_double( FT_Library  library,\n                              FT_Stream   stream,\n                              char       *base_file_name,\n                              char      **result_file_name,\n                              FT_Long    *result_offset )\n  {\n    char*      newpath;\n    FT_Error   error;\n    FT_Memory  memory;\n\n    FT_UNUSED( stream );\n\n\n    memory = library->memory;\n\n    newpath = raccess_make_file_name( memory, base_file_name, \"%\" );\n    if ( !newpath )\n      return FT_THROW( Out_Of_Memory );\n\n    error = raccess_guess_linux_double_from_file_name( library, newpath,\n                                                       result_offset );\n    if ( !error )\n      *result_file_name = newpath;\n    else\n      FT_FREE( newpath );\n\n    return error;\n  }\n\n\n  static FT_Error\n  raccess_guess_linux_netatalk( FT_Library  library,\n                                FT_Stream   stream,\n                                char       *base_file_name,\n                                char      **result_file_name,\n                                FT_Long    *result_offset )\n  {\n    char*      newpath;\n    FT_Error   error;\n    FT_Memory  memory;\n\n    FT_UNUSED( stream );\n\n\n    memory = library->memory;\n\n    newpath = raccess_make_file_name( memory, base_file_name,\n                                      \".AppleDouble/\" );\n    if ( !newpath )\n      return FT_THROW( Out_Of_Memory );\n\n    error = raccess_guess_linux_double_from_file_name( library, newpath,\n                                                       result_offset );\n    if ( !error )\n      *result_file_name = newpath;\n    else\n      FT_FREE( newpath );\n\n    return error;\n  }\n\n\n  static FT_Error\n  raccess_guess_apple_generic( FT_Library  library,\n                               FT_Stream   stream,\n                               char       *base_file_name,\n                               FT_Int32    magic,\n                               FT_Long    *result_offset )\n  {\n    FT_Int32   magic_from_stream;\n    FT_Error   error;\n    FT_Int32   version_number = 0;\n    FT_UShort  n_of_entries;\n\n    int        i;\n    FT_UInt32  entry_id, entry_offset, entry_length = 0;\n\n    const FT_UInt32  resource_fork_entry_id = 0x2;\n\n    FT_UNUSED( library );\n    FT_UNUSED( base_file_name );\n    FT_UNUSED( version_number );\n    FT_UNUSED( entry_length   );\n\n\n    if ( FT_READ_LONG( magic_from_stream ) )\n      return error;\n    if ( magic_from_stream != magic )\n      return FT_THROW( Unknown_File_Format );\n\n    if ( FT_READ_LONG( version_number ) )\n      return error;\n\n    /* filler */\n    error = FT_Stream_Skip( stream, 16 );\n    if ( error )\n      return error;\n\n    if ( FT_READ_USHORT( n_of_entries ) )\n      return error;\n    if ( n_of_entries == 0 )\n      return FT_THROW( Unknown_File_Format );\n\n    for ( i = 0; i < n_of_entries; i++ )\n    {\n      if ( FT_READ_LONG( entry_id ) )\n        return error;\n      if ( entry_id == resource_fork_entry_id )\n      {\n        if ( FT_READ_LONG( entry_offset ) ||\n             FT_READ_LONG( entry_length ) )\n          continue;\n        *result_offset = entry_offset;\n\n        return FT_Err_Ok;\n      }\n      else\n      {\n        error = FT_Stream_Skip( stream, 4 + 4 );    /* offset + length */\n        if ( error )\n          return error;\n      }\n    }\n\n    return FT_THROW( Unknown_File_Format );\n  }\n\n\n  static FT_Error\n  raccess_guess_linux_double_from_file_name( FT_Library  library,\n                                             char       *file_name,\n                                             FT_Long    *result_offset )\n  {\n    FT_Open_Args  args2;\n    FT_Stream     stream2;\n    char *        nouse = NULL;\n    FT_Error      error;\n\n\n    args2.flags    = FT_OPEN_PATHNAME;\n    args2.pathname = file_name;\n    error = FT_Stream_New( library, &args2, &stream2 );\n    if ( error )\n      return error;\n\n    error = raccess_guess_apple_double( library, stream2, file_name,\n                                        &nouse, result_offset );\n\n    FT_Stream_Free( stream2, 0 );\n\n    return error;\n  }\n\n\n  static char*\n  raccess_make_file_name( FT_Memory    memory,\n                          const char  *original_name,\n                          const char  *insertion )\n  {\n    char*        new_name = NULL;\n    const char*  tmp;\n    const char*  slash;\n    size_t       new_length;\n    FT_Error     error = FT_Err_Ok;\n\n    FT_UNUSED( error );\n\n\n    new_length = ft_strlen( original_name ) + ft_strlen( insertion );\n    if ( FT_ALLOC( new_name, new_length + 1 ) )\n      return NULL;\n\n    tmp = ft_strrchr( original_name, '/' );\n    if ( tmp )\n    {\n      ft_strncpy( new_name, original_name, tmp - original_name + 1 );\n      new_name[tmp - original_name + 1] = '\\0';\n      slash = tmp + 1;\n    }\n    else\n    {\n      slash       = original_name;\n      new_name[0] = '\\0';\n    }\n\n    ft_strcat( new_name, insertion );\n    ft_strcat( new_name, slash );\n\n    return new_name;\n  }\n\n\n#else   /* !FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */\n\n\n  /*************************************************************************/\n  /*                  Dummy function; just sets errors                     */\n  /*************************************************************************/\n\n  FT_BASE_DEF( void )\n  FT_Raccess_Guess( FT_Library  library,\n                    FT_Stream   stream,\n                    char       *base_name,\n                    char      **new_names,\n                    FT_Long    *offsets,\n                    FT_Error   *errors )\n  {\n    FT_Int  i;\n\n    FT_UNUSED( library );\n    FT_UNUSED( stream );\n    FT_UNUSED( base_name );\n\n\n    for ( i = 0; i < FT_RACCESS_N_RULES; i++ )\n    {\n      new_names[i] = NULL;\n      offsets[i]   = 0;\n      errors[i]    = FT_ERR( Unimplemented_Feature );\n    }\n  }\n\n\n#endif  /* !FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftsnames.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsnames.c                                                             */\n/*                                                                         */\n/*    Simple interface to access SFNT name tables (which are used          */\n/*    to hold font names, copyright info, notices, etc.) (body).           */\n/*                                                                         */\n/*    This is _not_ used to retrieve glyph names!                          */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2009 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_SFNT_NAMES_H\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n#include FT_INTERNAL_STREAM_H\n\n\n#ifdef TT_CONFIG_OPTION_SFNT_NAMES\n\n\n  /* documentation is in ftsnames.h */\n\n  FT_EXPORT_DEF( FT_UInt )\n  FT_Get_Sfnt_Name_Count( FT_Face  face )\n  {\n    return ( face && FT_IS_SFNT( face ) ) ? ((TT_Face)face)->num_names : 0;\n  }\n\n\n  /* documentation is in ftsnames.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_Sfnt_Name( FT_Face       face,\n                    FT_UInt       idx,\n                    FT_SfntName  *aname )\n  {\n    FT_Error  error = FT_ERR( Invalid_Argument );\n\n\n    if ( aname && face && FT_IS_SFNT( face ) )\n    {\n      TT_Face  ttface = (TT_Face)face;\n\n\n      if ( idx < (FT_UInt)ttface->num_names )\n      {\n        TT_NameEntryRec*  entry = ttface->name_table.names + idx;\n\n\n        /* load name on demand */\n        if ( entry->stringLength > 0 && entry->string == NULL )\n        {\n          FT_Memory  memory = face->memory;\n          FT_Stream  stream = face->stream;\n\n\n          if ( FT_NEW_ARRAY  ( entry->string, entry->stringLength ) ||\n               FT_STREAM_SEEK( entry->stringOffset )                ||\n               FT_STREAM_READ( entry->string, entry->stringLength ) )\n          {\n            FT_FREE( entry->string );\n            entry->stringLength = 0;\n          }\n        }\n\n        aname->platform_id = entry->platformID;\n        aname->encoding_id = entry->encodingID;\n        aname->language_id = entry->languageID;\n        aname->name_id     = entry->nameID;\n        aname->string      = (FT_Byte*)entry->string;\n        aname->string_len  = entry->stringLength;\n\n        error = FT_Err_Ok;\n      }\n    }\n\n    return error;\n  }\n\n\n#endif /* TT_CONFIG_OPTION_SFNT_NAMES */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftstream.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftstream.c                                                             */\n/*                                                                         */\n/*    I/O stream support (body).                                           */\n/*                                                                         */\n/*  Copyright 2000-2002, 2004-2006, 2008-2011, 2013 by                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_DEBUG_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_stream\n\n\n  FT_BASE_DEF( void )\n  FT_Stream_OpenMemory( FT_Stream       stream,\n                        const FT_Byte*  base,\n                        FT_ULong        size )\n  {\n    stream->base   = (FT_Byte*) base;\n    stream->size   = size;\n    stream->pos    = 0;\n    stream->cursor = 0;\n    stream->read   = 0;\n    stream->close  = 0;\n  }\n\n\n  FT_BASE_DEF( void )\n  FT_Stream_Close( FT_Stream  stream )\n  {\n    if ( stream && stream->close )\n      stream->close( stream );\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Stream_Seek( FT_Stream  stream,\n                  FT_ULong   pos )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( stream->read )\n    {\n      if ( stream->read( stream, pos, 0, 0 ) )\n      {\n        FT_ERROR(( \"FT_Stream_Seek:\"\n                   \" invalid i/o; pos = 0x%lx, size = 0x%lx\\n\",\n                   pos, stream->size ));\n\n        error = FT_THROW( Invalid_Stream_Operation );\n      }\n    }\n    /* note that seeking to the first position after the file is valid */\n    else if ( pos > stream->size )\n    {\n      FT_ERROR(( \"FT_Stream_Seek:\"\n                 \" invalid i/o; pos = 0x%lx, size = 0x%lx\\n\",\n                 pos, stream->size ));\n\n      error = FT_THROW( Invalid_Stream_Operation );\n    }\n\n    if ( !error )\n      stream->pos = pos;\n\n    return error;\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Stream_Skip( FT_Stream  stream,\n                  FT_Long    distance )\n  {\n    if ( distance < 0 )\n      return FT_THROW( Invalid_Stream_Operation );\n\n    return FT_Stream_Seek( stream, (FT_ULong)( stream->pos + distance ) );\n  }\n\n\n  FT_BASE_DEF( FT_Long )\n  FT_Stream_Pos( FT_Stream  stream )\n  {\n    return stream->pos;\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Stream_Read( FT_Stream  stream,\n                  FT_Byte*   buffer,\n                  FT_ULong   count )\n  {\n    return FT_Stream_ReadAt( stream, stream->pos, buffer, count );\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Stream_ReadAt( FT_Stream  stream,\n                    FT_ULong   pos,\n                    FT_Byte*   buffer,\n                    FT_ULong   count )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_ULong  read_bytes;\n\n\n    if ( pos >= stream->size )\n    {\n      FT_ERROR(( \"FT_Stream_ReadAt:\"\n                 \" invalid i/o; pos = 0x%lx, size = 0x%lx\\n\",\n                 pos, stream->size ));\n\n      return FT_THROW( Invalid_Stream_Operation );\n    }\n\n    if ( stream->read )\n      read_bytes = stream->read( stream, pos, buffer, count );\n    else\n    {\n      read_bytes = stream->size - pos;\n      if ( read_bytes > count )\n        read_bytes = count;\n\n      FT_MEM_COPY( buffer, stream->base + pos, read_bytes );\n    }\n\n    stream->pos = pos + read_bytes;\n\n    if ( read_bytes < count )\n    {\n      FT_ERROR(( \"FT_Stream_ReadAt:\"\n                 \" invalid read; expected %lu bytes, got %lu\\n\",\n                 count, read_bytes ));\n\n      error = FT_THROW( Invalid_Stream_Operation );\n    }\n\n    return error;\n  }\n\n\n  FT_BASE_DEF( FT_ULong )\n  FT_Stream_TryRead( FT_Stream  stream,\n                     FT_Byte*   buffer,\n                     FT_ULong   count )\n  {\n    FT_ULong  read_bytes = 0;\n\n\n    if ( stream->pos >= stream->size )\n      goto Exit;\n\n    if ( stream->read )\n      read_bytes = stream->read( stream, stream->pos, buffer, count );\n    else\n    {\n      read_bytes = stream->size - stream->pos;\n      if ( read_bytes > count )\n        read_bytes = count;\n\n      FT_MEM_COPY( buffer, stream->base + stream->pos, read_bytes );\n    }\n\n    stream->pos += read_bytes;\n\n  Exit:\n    return read_bytes;\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Stream_ExtractFrame( FT_Stream  stream,\n                          FT_ULong   count,\n                          FT_Byte**  pbytes )\n  {\n    FT_Error  error;\n\n\n    error = FT_Stream_EnterFrame( stream, count );\n    if ( !error )\n    {\n      *pbytes = (FT_Byte*)stream->cursor;\n\n      /* equivalent to FT_Stream_ExitFrame(), with no memory block release */\n      stream->cursor = 0;\n      stream->limit  = 0;\n    }\n\n    return error;\n  }\n\n\n  FT_BASE_DEF( void )\n  FT_Stream_ReleaseFrame( FT_Stream  stream,\n                          FT_Byte**  pbytes )\n  {\n    if ( stream && stream->read )\n    {\n      FT_Memory  memory = stream->memory;\n\n#ifdef FT_DEBUG_MEMORY\n      ft_mem_free( memory, *pbytes );\n      *pbytes = NULL;\n#else\n      FT_FREE( *pbytes );\n#endif\n    }\n    *pbytes = 0;\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Stream_EnterFrame( FT_Stream  stream,\n                        FT_ULong   count )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_ULong  read_bytes;\n\n\n    /* check for nested frame access */\n    FT_ASSERT( stream && stream->cursor == 0 );\n\n    if ( stream->read )\n    {\n      /* allocate the frame in memory */\n      FT_Memory  memory = stream->memory;\n\n\n      /* simple sanity check */\n      if ( count > stream->size )\n      {\n        FT_ERROR(( \"FT_Stream_EnterFrame:\"\n                   \" frame size (%lu) larger than stream size (%lu)\\n\",\n                   count, stream->size ));\n\n        error = FT_THROW( Invalid_Stream_Operation );\n        goto Exit;\n      }\n\n#ifdef FT_DEBUG_MEMORY\n      /* assume _ft_debug_file and _ft_debug_lineno are already set */\n      stream->base = (unsigned char*)ft_mem_qalloc( memory, count, &error );\n      if ( error )\n        goto Exit;\n#else\n      if ( FT_QALLOC( stream->base, count ) )\n        goto Exit;\n#endif\n      /* read it */\n      read_bytes = stream->read( stream, stream->pos,\n                                 stream->base, count );\n      if ( read_bytes < count )\n      {\n        FT_ERROR(( \"FT_Stream_EnterFrame:\"\n                   \" invalid read; expected %lu bytes, got %lu\\n\",\n                   count, read_bytes ));\n\n        FT_FREE( stream->base );\n        error = FT_THROW( Invalid_Stream_Operation );\n      }\n      stream->cursor = stream->base;\n      stream->limit  = stream->cursor + count;\n      stream->pos   += read_bytes;\n    }\n    else\n    {\n      /* check current and new position */\n      if ( stream->pos >= stream->size        ||\n           stream->size - stream->pos < count )\n      {\n        FT_ERROR(( \"FT_Stream_EnterFrame:\"\n                   \" invalid i/o; pos = 0x%lx, count = %lu, size = 0x%lx\\n\",\n                   stream->pos, count, stream->size ));\n\n        error = FT_THROW( Invalid_Stream_Operation );\n        goto Exit;\n      }\n\n      /* set cursor */\n      stream->cursor = stream->base + stream->pos;\n      stream->limit  = stream->cursor + count;\n      stream->pos   += count;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_BASE_DEF( void )\n  FT_Stream_ExitFrame( FT_Stream  stream )\n  {\n    /* IMPORTANT: The assertion stream->cursor != 0 was removed, given    */\n    /*            that it is possible to access a frame of length 0 in    */\n    /*            some weird fonts (usually, when accessing an array of   */\n    /*            0 records, like in some strange kern tables).           */\n    /*                                                                    */\n    /*  In this case, the loader code handles the 0-length table          */\n    /*  gracefully; however, stream.cursor is really set to 0 by the      */\n    /*  FT_Stream_EnterFrame() call, and this is not an error.            */\n    /*                                                                    */\n    FT_ASSERT( stream );\n\n    if ( stream->read )\n    {\n      FT_Memory  memory = stream->memory;\n\n#ifdef FT_DEBUG_MEMORY\n      ft_mem_free( memory, stream->base );\n      stream->base = NULL;\n#else\n      FT_FREE( stream->base );\n#endif\n    }\n    stream->cursor = 0;\n    stream->limit  = 0;\n  }\n\n\n  FT_BASE_DEF( FT_Char )\n  FT_Stream_GetChar( FT_Stream  stream )\n  {\n    FT_Char  result;\n\n\n    FT_ASSERT( stream && stream->cursor );\n\n    result = 0;\n    if ( stream->cursor < stream->limit )\n      result = *stream->cursor++;\n\n    return result;\n  }\n\n\n  FT_BASE_DEF( FT_UShort )\n  FT_Stream_GetUShort( FT_Stream  stream )\n  {\n    FT_Byte*  p;\n    FT_Short  result;\n\n\n    FT_ASSERT( stream && stream->cursor );\n\n    result         = 0;\n    p              = stream->cursor;\n    if ( p + 1 < stream->limit )\n      result       = FT_NEXT_USHORT( p );\n    stream->cursor = p;\n\n    return result;\n  }\n\n\n  FT_BASE_DEF( FT_UShort )\n  FT_Stream_GetUShortLE( FT_Stream  stream )\n  {\n    FT_Byte*  p;\n    FT_Short  result;\n\n\n    FT_ASSERT( stream && stream->cursor );\n\n    result         = 0;\n    p              = stream->cursor;\n    if ( p + 1 < stream->limit )\n      result       = FT_NEXT_USHORT_LE( p );\n    stream->cursor = p;\n\n    return result;\n  }\n\n\n  FT_BASE_DEF( FT_ULong )\n  FT_Stream_GetUOffset( FT_Stream  stream )\n  {\n    FT_Byte*  p;\n    FT_Long   result;\n\n\n    FT_ASSERT( stream && stream->cursor );\n\n    result         = 0;\n    p              = stream->cursor;\n    if ( p + 2 < stream->limit )\n      result       = FT_NEXT_UOFF3( p );\n    stream->cursor = p;\n    return result;\n  }\n\n\n  FT_BASE_DEF( FT_ULong )\n  FT_Stream_GetULong( FT_Stream  stream )\n  {\n    FT_Byte*  p;\n    FT_Long   result;\n\n\n    FT_ASSERT( stream && stream->cursor );\n\n    result         = 0;\n    p              = stream->cursor;\n    if ( p + 3 < stream->limit )\n      result       = FT_NEXT_ULONG( p );\n    stream->cursor = p;\n    return result;\n  }\n\n\n  FT_BASE_DEF( FT_ULong )\n  FT_Stream_GetULongLE( FT_Stream  stream )\n  {\n    FT_Byte*  p;\n    FT_Long   result;\n\n\n    FT_ASSERT( stream && stream->cursor );\n\n    result         = 0;\n    p              = stream->cursor;\n    if ( p + 3 < stream->limit )\n      result       = FT_NEXT_ULONG_LE( p );\n    stream->cursor = p;\n    return result;\n  }\n\n\n  FT_BASE_DEF( FT_Char )\n  FT_Stream_ReadChar( FT_Stream  stream,\n                      FT_Error*  error )\n  {\n    FT_Byte  result = 0;\n\n\n    FT_ASSERT( stream );\n\n    *error = FT_Err_Ok;\n\n    if ( stream->read )\n    {\n      if ( stream->read( stream, stream->pos, &result, 1L ) != 1L )\n        goto Fail;\n    }\n    else\n    {\n      if ( stream->pos < stream->size )\n        result = stream->base[stream->pos];\n      else\n        goto Fail;\n    }\n    stream->pos++;\n\n    return result;\n\n  Fail:\n    *error = FT_THROW( Invalid_Stream_Operation );\n    FT_ERROR(( \"FT_Stream_ReadChar:\"\n               \" invalid i/o; pos = 0x%lx, size = 0x%lx\\n\",\n               stream->pos, stream->size ));\n\n    return 0;\n  }\n\n\n  FT_BASE_DEF( FT_UShort )\n  FT_Stream_ReadUShort( FT_Stream  stream,\n                       FT_Error*  error )\n  {\n    FT_Byte   reads[2];\n    FT_Byte*  p = 0;\n    FT_Short  result = 0;\n\n\n    FT_ASSERT( stream );\n\n    *error = FT_Err_Ok;\n\n    if ( stream->pos + 1 < stream->size )\n    {\n      if ( stream->read )\n      {\n        if ( stream->read( stream, stream->pos, reads, 2L ) != 2L )\n          goto Fail;\n\n        p = reads;\n      }\n      else\n      {\n        p = stream->base + stream->pos;\n      }\n\n      if ( p )\n        result = FT_NEXT_USHORT( p );\n    }\n    else\n      goto Fail;\n\n    stream->pos += 2;\n\n    return result;\n\n  Fail:\n    *error = FT_THROW( Invalid_Stream_Operation );\n    FT_ERROR(( \"FT_Stream_ReadUShort:\"\n               \" invalid i/o; pos = 0x%lx, size = 0x%lx\\n\",\n               stream->pos, stream->size ));\n\n    return 0;\n  }\n\n\n  FT_BASE_DEF( FT_UShort )\n  FT_Stream_ReadUShortLE( FT_Stream  stream,\n                         FT_Error*  error )\n  {\n    FT_Byte   reads[2];\n    FT_Byte*  p = 0;\n    FT_Short  result = 0;\n\n\n    FT_ASSERT( stream );\n\n    *error = FT_Err_Ok;\n\n    if ( stream->pos + 1 < stream->size )\n    {\n      if ( stream->read )\n      {\n        if ( stream->read( stream, stream->pos, reads, 2L ) != 2L )\n          goto Fail;\n\n        p = reads;\n      }\n      else\n      {\n        p = stream->base + stream->pos;\n      }\n\n      if ( p )\n        result = FT_NEXT_USHORT_LE( p );\n    }\n    else\n      goto Fail;\n\n    stream->pos += 2;\n\n    return result;\n\n  Fail:\n    *error = FT_THROW( Invalid_Stream_Operation );\n    FT_ERROR(( \"FT_Stream_ReadUShortLE:\"\n               \" invalid i/o; pos = 0x%lx, size = 0x%lx\\n\",\n               stream->pos, stream->size ));\n\n    return 0;\n  }\n\n\n  FT_BASE_DEF( FT_ULong )\n  FT_Stream_ReadUOffset( FT_Stream  stream,\n                        FT_Error*  error )\n  {\n    FT_Byte   reads[3];\n    FT_Byte*  p = 0;\n    FT_Long   result = 0;\n\n\n    FT_ASSERT( stream );\n\n    *error = FT_Err_Ok;\n\n    if ( stream->pos + 2 < stream->size )\n    {\n      if ( stream->read )\n      {\n        if (stream->read( stream, stream->pos, reads, 3L ) != 3L )\n          goto Fail;\n\n        p = reads;\n      }\n      else\n      {\n        p = stream->base + stream->pos;\n      }\n\n      if ( p )\n        result = FT_NEXT_UOFF3( p );\n    }\n    else\n      goto Fail;\n\n    stream->pos += 3;\n\n    return result;\n\n  Fail:\n    *error = FT_THROW( Invalid_Stream_Operation );\n    FT_ERROR(( \"FT_Stream_ReadUOffset:\"\n               \" invalid i/o; pos = 0x%lx, size = 0x%lx\\n\",\n               stream->pos, stream->size ));\n\n    return 0;\n  }\n\n\n  FT_BASE_DEF( FT_ULong )\n  FT_Stream_ReadULong( FT_Stream  stream,\n                      FT_Error*  error )\n  {\n    FT_Byte   reads[4];\n    FT_Byte*  p = 0;\n    FT_Long   result = 0;\n\n\n    FT_ASSERT( stream );\n\n    *error = FT_Err_Ok;\n\n    if ( stream->pos + 3 < stream->size )\n    {\n      if ( stream->read )\n      {\n        if ( stream->read( stream, stream->pos, reads, 4L ) != 4L )\n          goto Fail;\n\n        p = reads;\n      }\n      else\n      {\n        p = stream->base + stream->pos;\n      }\n\n      if ( p )\n        result = FT_NEXT_ULONG( p );\n    }\n    else\n      goto Fail;\n\n    stream->pos += 4;\n\n    return result;\n\n  Fail:\n    *error = FT_THROW( Invalid_Stream_Operation );\n    FT_ERROR(( \"FT_Stream_ReadULong:\"\n               \" invalid i/o; pos = 0x%lx, size = 0x%lx\\n\",\n               stream->pos, stream->size ));\n\n    return 0;\n  }\n\n\n  FT_BASE_DEF( FT_ULong )\n  FT_Stream_ReadULongLE( FT_Stream  stream,\n                        FT_Error*  error )\n  {\n    FT_Byte   reads[4];\n    FT_Byte*  p = 0;\n    FT_Long   result = 0;\n\n\n    FT_ASSERT( stream );\n\n    *error = FT_Err_Ok;\n\n    if ( stream->pos + 3 < stream->size )\n    {\n      if ( stream->read )\n      {\n        if ( stream->read( stream, stream->pos, reads, 4L ) != 4L )\n          goto Fail;\n\n        p = reads;\n      }\n      else\n      {\n        p = stream->base + stream->pos;\n      }\n\n      if ( p )\n        result = FT_NEXT_ULONG_LE( p );\n    }\n    else\n      goto Fail;\n\n    stream->pos += 4;\n\n    return result;\n\n  Fail:\n    *error = FT_THROW( Invalid_Stream_Operation );\n    FT_ERROR(( \"FT_Stream_ReadULongLE:\"\n               \" invalid i/o; pos = 0x%lx, size = 0x%lx\\n\",\n               stream->pos, stream->size ));\n\n    return 0;\n  }\n\n\n  FT_BASE_DEF( FT_Error )\n  FT_Stream_ReadFields( FT_Stream              stream,\n                        const FT_Frame_Field*  fields,\n                        void*                  structure )\n  {\n    FT_Error  error;\n    FT_Bool   frame_accessed = 0;\n    FT_Byte*  cursor;\n\n\n    if ( !fields )\n      return FT_THROW( Invalid_Argument );\n\n    if ( !stream )\n      return FT_THROW( Invalid_Stream_Handle );\n\n    cursor = stream->cursor;\n\n    error = FT_Err_Ok;\n    do\n    {\n      FT_ULong  value;\n      FT_Int    sign_shift;\n      FT_Byte*  p;\n\n\n      switch ( fields->value )\n      {\n      case ft_frame_start:  /* access a new frame */\n        error = FT_Stream_EnterFrame( stream, fields->offset );\n        if ( error )\n          goto Exit;\n\n        frame_accessed = 1;\n        cursor         = stream->cursor;\n        fields++;\n        continue;  /* loop! */\n\n      case ft_frame_bytes:  /* read a byte sequence */\n      case ft_frame_skip:   /* skip some bytes      */\n        {\n          FT_UInt  len = fields->size;\n\n\n          if ( cursor + len > stream->limit )\n          {\n            error = FT_THROW( Invalid_Stream_Operation );\n            goto Exit;\n          }\n\n          if ( fields->value == ft_frame_bytes )\n          {\n            p = (FT_Byte*)structure + fields->offset;\n            FT_MEM_COPY( p, cursor, len );\n          }\n          cursor += len;\n          fields++;\n          continue;\n        }\n\n      case ft_frame_byte:\n      case ft_frame_schar:  /* read a single byte */\n        value = FT_NEXT_BYTE( cursor );\n        sign_shift = 24;\n        break;\n\n      case ft_frame_short_be:\n      case ft_frame_ushort_be:  /* read a 2-byte big-endian short */\n        value = FT_NEXT_USHORT( cursor) ;\n        sign_shift = 16;\n        break;\n\n      case ft_frame_short_le:\n      case ft_frame_ushort_le:  /* read a 2-byte little-endian short */\n        value = FT_NEXT_USHORT_LE( cursor );\n        sign_shift = 16;\n        break;\n\n      case ft_frame_long_be:\n      case ft_frame_ulong_be:  /* read a 4-byte big-endian long */\n        value = FT_NEXT_ULONG( cursor );\n        sign_shift = 0;\n        break;\n\n      case ft_frame_long_le:\n      case ft_frame_ulong_le:  /* read a 4-byte little-endian long */\n        value = FT_NEXT_ULONG_LE( cursor );\n        sign_shift = 0;\n        break;\n\n      case ft_frame_off3_be:\n      case ft_frame_uoff3_be:  /* read a 3-byte big-endian long */\n        value = FT_NEXT_UOFF3( cursor );\n        sign_shift = 8;\n        break;\n\n      case ft_frame_off3_le:\n      case ft_frame_uoff3_le:  /* read a 3-byte little-endian long */\n        value = FT_NEXT_UOFF3_LE( cursor );\n        sign_shift = 8;\n        break;\n\n      default:\n        /* otherwise, exit the loop */\n        stream->cursor = cursor;\n        goto Exit;\n      }\n\n      /* now, compute the signed value is necessary */\n      if ( fields->value & FT_FRAME_OP_SIGNED )\n        value = (FT_ULong)( (FT_Int32)( value << sign_shift ) >> sign_shift );\n\n      /* finally, store the value in the object */\n\n      p = (FT_Byte*)structure + fields->offset;\n      switch ( fields->size )\n      {\n      case ( 8 / FT_CHAR_BIT ):\n        *(FT_Byte*)p = (FT_Byte)value;\n        break;\n\n      case ( 16 / FT_CHAR_BIT ):\n        *(FT_UShort*)p = (FT_UShort)value;\n        break;\n\n      case ( 32 / FT_CHAR_BIT ):\n        *(FT_UInt32*)p = (FT_UInt32)value;\n        break;\n\n      default:  /* for 64-bit systems */\n        *(FT_ULong*)p = (FT_ULong)value;\n      }\n\n      /* go to next field */\n      fields++;\n    }\n    while ( 1 );\n\n  Exit:\n    /* close the frame if it was opened by this read */\n    if ( frame_accessed )\n      FT_Stream_ExitFrame( stream );\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftstroke.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftstroke.c                                                             */\n/*                                                                         */\n/*    FreeType path stroker (body).                                        */\n/*                                                                         */\n/*  Copyright 2002-2006, 2008-2011, 2013, 2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_STROKER_H\n#include FT_TRIGONOMETRY_H\n#include FT_OUTLINE_H\n#include FT_INTERNAL_MEMORY_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_StrokerBorder )\n  FT_Outline_GetInsideBorder( FT_Outline*  outline )\n  {\n    FT_Orientation  o = FT_Outline_Get_Orientation( outline );\n\n\n    return o == FT_ORIENTATION_TRUETYPE ? FT_STROKER_BORDER_RIGHT\n                                        : FT_STROKER_BORDER_LEFT;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_StrokerBorder )\n  FT_Outline_GetOutsideBorder( FT_Outline*  outline )\n  {\n    FT_Orientation  o = FT_Outline_Get_Orientation( outline );\n\n\n    return o == FT_ORIENTATION_TRUETYPE ? FT_STROKER_BORDER_LEFT\n                                        : FT_STROKER_BORDER_RIGHT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      BEZIER COMPUTATIONS                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define FT_SMALL_CONIC_THRESHOLD  ( FT_ANGLE_PI / 6 )\n#define FT_SMALL_CUBIC_THRESHOLD  ( FT_ANGLE_PI / 8 )\n\n#define FT_EPSILON  2\n\n#define FT_IS_SMALL( x )  ( (x) > -FT_EPSILON && (x) < FT_EPSILON )\n\n\n  static FT_Pos\n  ft_pos_abs( FT_Pos  x )\n  {\n    return x >= 0 ? x : -x;\n  }\n\n\n  static void\n  ft_conic_split( FT_Vector*  base )\n  {\n    FT_Pos  a, b;\n\n\n    base[4].x = base[2].x;\n    b = base[1].x;\n    a = base[3].x = ( base[2].x + b ) / 2;\n    b = base[1].x = ( base[0].x + b ) / 2;\n    base[2].x = ( a + b ) / 2;\n\n    base[4].y = base[2].y;\n    b = base[1].y;\n    a = base[3].y = ( base[2].y + b ) / 2;\n    b = base[1].y = ( base[0].y + b ) / 2;\n    base[2].y = ( a + b ) / 2;\n  }\n\n\n  static FT_Bool\n  ft_conic_is_small_enough( FT_Vector*  base,\n                            FT_Angle   *angle_in,\n                            FT_Angle   *angle_out )\n  {\n    FT_Vector  d1, d2;\n    FT_Angle   theta;\n    FT_Int     close1, close2;\n\n\n    d1.x = base[1].x - base[2].x;\n    d1.y = base[1].y - base[2].y;\n    d2.x = base[0].x - base[1].x;\n    d2.y = base[0].y - base[1].y;\n\n    close1 = FT_IS_SMALL( d1.x ) && FT_IS_SMALL( d1.y );\n    close2 = FT_IS_SMALL( d2.x ) && FT_IS_SMALL( d2.y );\n\n    if ( close1 )\n    {\n      if ( close2 )\n      {\n        /* basically a point;                      */\n        /* do nothing to retain original direction */\n      }\n      else\n      {\n        *angle_in  =\n        *angle_out = FT_Atan2( d2.x, d2.y );\n      }\n    }\n    else /* !close1 */\n    {\n      if ( close2 )\n      {\n        *angle_in  =\n        *angle_out = FT_Atan2( d1.x, d1.y );\n      }\n      else\n      {\n        *angle_in  = FT_Atan2( d1.x, d1.y );\n        *angle_out = FT_Atan2( d2.x, d2.y );\n      }\n    }\n\n    theta = ft_pos_abs( FT_Angle_Diff( *angle_in, *angle_out ) );\n\n    return FT_BOOL( theta < FT_SMALL_CONIC_THRESHOLD );\n  }\n\n\n  static void\n  ft_cubic_split( FT_Vector*  base )\n  {\n    FT_Pos  a, b, c, d;\n\n\n    base[6].x = base[3].x;\n    c = base[1].x;\n    d = base[2].x;\n    base[1].x = a = ( base[0].x + c ) / 2;\n    base[5].x = b = ( base[3].x + d ) / 2;\n    c = ( c + d ) / 2;\n    base[2].x = a = ( a + c ) / 2;\n    base[4].x = b = ( b + c ) / 2;\n    base[3].x = ( a + b ) / 2;\n\n    base[6].y = base[3].y;\n    c = base[1].y;\n    d = base[2].y;\n    base[1].y = a = ( base[0].y + c ) / 2;\n    base[5].y = b = ( base[3].y + d ) / 2;\n    c = ( c + d ) / 2;\n    base[2].y = a = ( a + c ) / 2;\n    base[4].y = b = ( b + c ) / 2;\n    base[3].y = ( a + b ) / 2;\n  }\n\n\n  /* Return the average of `angle1' and `angle2'.            */\n  /* This gives correct result even if `angle1' and `angle2' */\n  /* have opposite signs.                                    */\n  static FT_Angle\n  ft_angle_mean( FT_Angle  angle1,\n                 FT_Angle  angle2 )\n  {\n    return angle1 + FT_Angle_Diff( angle1, angle2 ) / 2;\n  }\n\n\n  static FT_Bool\n  ft_cubic_is_small_enough( FT_Vector*  base,\n                            FT_Angle   *angle_in,\n                            FT_Angle   *angle_mid,\n                            FT_Angle   *angle_out )\n  {\n    FT_Vector  d1, d2, d3;\n    FT_Angle   theta1, theta2;\n    FT_Int     close1, close2, close3;\n\n\n    d1.x = base[2].x - base[3].x;\n    d1.y = base[2].y - base[3].y;\n    d2.x = base[1].x - base[2].x;\n    d2.y = base[1].y - base[2].y;\n    d3.x = base[0].x - base[1].x;\n    d3.y = base[0].y - base[1].y;\n\n    close1 = FT_IS_SMALL( d1.x ) && FT_IS_SMALL( d1.y );\n    close2 = FT_IS_SMALL( d2.x ) && FT_IS_SMALL( d2.y );\n    close3 = FT_IS_SMALL( d3.x ) && FT_IS_SMALL( d3.y );\n\n    if ( close1 )\n    {\n      if ( close2 )\n      {\n        if ( close3 )\n        {\n          /* basically a point;                      */\n          /* do nothing to retain original direction */\n        }\n        else /* !close3 */\n        {\n          *angle_in  =\n          *angle_mid =\n          *angle_out = FT_Atan2( d3.x, d3.y );\n        }\n      }\n      else /* !close2 */\n      {\n        if ( close3 )\n        {\n          *angle_in  =\n          *angle_mid =\n          *angle_out = FT_Atan2( d2.x, d2.y );\n        }\n        else /* !close3 */\n        {\n          *angle_in  =\n          *angle_mid = FT_Atan2( d2.x, d2.y );\n          *angle_out = FT_Atan2( d3.x, d3.y );\n        }\n      }\n    }\n    else /* !close1 */\n    {\n      if ( close2 )\n      {\n        if ( close3 )\n        {\n          *angle_in  =\n          *angle_mid =\n          *angle_out = FT_Atan2( d1.x, d1.y );\n        }\n        else /* !close3 */\n        {\n          *angle_in  = FT_Atan2( d1.x, d1.y );\n          *angle_out = FT_Atan2( d3.x, d3.y );\n          *angle_mid = ft_angle_mean( *angle_in, *angle_out );\n        }\n      }\n      else /* !close2 */\n      {\n        if ( close3 )\n        {\n          *angle_in  = FT_Atan2( d1.x, d1.y );\n          *angle_mid =\n          *angle_out = FT_Atan2( d2.x, d2.y );\n        }\n        else /* !close3 */\n        {\n          *angle_in  = FT_Atan2( d1.x, d1.y );\n          *angle_mid = FT_Atan2( d2.x, d2.y );\n          *angle_out = FT_Atan2( d3.x, d3.y );\n        }\n      }\n    }\n\n    theta1 = ft_pos_abs( FT_Angle_Diff( *angle_in,  *angle_mid ) );\n    theta2 = ft_pos_abs( FT_Angle_Diff( *angle_mid, *angle_out ) );\n\n    return FT_BOOL( theta1 < FT_SMALL_CUBIC_THRESHOLD &&\n                    theta2 < FT_SMALL_CUBIC_THRESHOLD );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       STROKE BORDERS                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef enum  FT_StrokeTags_\n  {\n    FT_STROKE_TAG_ON    = 1,   /* on-curve point  */\n    FT_STROKE_TAG_CUBIC = 2,   /* cubic off-point */\n    FT_STROKE_TAG_BEGIN = 4,   /* sub-path start  */\n    FT_STROKE_TAG_END   = 8    /* sub-path end    */\n\n  } FT_StrokeTags;\n\n#define  FT_STROKE_TAG_BEGIN_END  ( FT_STROKE_TAG_BEGIN | FT_STROKE_TAG_END )\n\n  typedef struct  FT_StrokeBorderRec_\n  {\n    FT_UInt     num_points;\n    FT_UInt     max_points;\n    FT_Vector*  points;\n    FT_Byte*    tags;\n    FT_Bool     movable;  /* TRUE for ends of lineto borders */\n    FT_Int      start;    /* index of current sub-path start point */\n    FT_Memory   memory;\n    FT_Bool     valid;\n\n  } FT_StrokeBorderRec, *FT_StrokeBorder;\n\n\n  static FT_Error\n  ft_stroke_border_grow( FT_StrokeBorder  border,\n                         FT_UInt          new_points )\n  {\n    FT_UInt   old_max = border->max_points;\n    FT_UInt   new_max = border->num_points + new_points;\n    FT_Error  error   = FT_Err_Ok;\n\n\n    if ( new_max > old_max )\n    {\n      FT_UInt    cur_max = old_max;\n      FT_Memory  memory  = border->memory;\n\n\n      while ( cur_max < new_max )\n        cur_max += ( cur_max >> 1 ) + 16;\n\n      if ( FT_RENEW_ARRAY( border->points, old_max, cur_max ) ||\n           FT_RENEW_ARRAY( border->tags,   old_max, cur_max ) )\n        goto Exit;\n\n      border->max_points = cur_max;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  ft_stroke_border_close( FT_StrokeBorder  border,\n                          FT_Bool          reverse )\n  {\n    FT_UInt  start = border->start;\n    FT_UInt  count = border->num_points;\n\n\n    FT_ASSERT( border->start >= 0 );\n\n    /* don't record empty paths! */\n    if ( count <= start + 1U )\n      border->num_points = start;\n    else\n    {\n      /* copy the last point to the start of this sub-path, since */\n      /* it contains the `adjusted' starting coordinates          */\n      border->num_points    = --count;\n      border->points[start] = border->points[count];\n\n      if ( reverse )\n      {\n        /* reverse the points */\n        {\n          FT_Vector*  vec1 = border->points + start + 1;\n          FT_Vector*  vec2 = border->points + count - 1;\n\n\n          for ( ; vec1 < vec2; vec1++, vec2-- )\n          {\n            FT_Vector  tmp;\n\n\n            tmp   = *vec1;\n            *vec1 = *vec2;\n            *vec2 = tmp;\n          }\n        }\n\n        /* then the tags */\n        {\n          FT_Byte*  tag1 = border->tags + start + 1;\n          FT_Byte*  tag2 = border->tags + count - 1;\n\n\n          for ( ; tag1 < tag2; tag1++, tag2-- )\n          {\n            FT_Byte  tmp;\n\n\n            tmp   = *tag1;\n            *tag1 = *tag2;\n            *tag2 = tmp;\n          }\n        }\n      }\n\n      border->tags[start    ] |= FT_STROKE_TAG_BEGIN;\n      border->tags[count - 1] |= FT_STROKE_TAG_END;\n    }\n\n    border->start   = -1;\n    border->movable = FALSE;\n  }\n\n\n  static FT_Error\n  ft_stroke_border_lineto( FT_StrokeBorder  border,\n                           FT_Vector*       to,\n                           FT_Bool          movable )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    FT_ASSERT( border->start >= 0 );\n\n    if ( border->movable )\n    {\n      /* move last point */\n      border->points[border->num_points - 1] = *to;\n    }\n    else\n    {\n      /* don't add zero-length lineto */\n      if ( border->num_points > 0                                          &&\n           FT_IS_SMALL( border->points[border->num_points - 1].x - to->x ) &&\n           FT_IS_SMALL( border->points[border->num_points - 1].y - to->y ) )\n        return error;\n\n      /* add one point */\n      error = ft_stroke_border_grow( border, 1 );\n      if ( !error )\n      {\n        FT_Vector*  vec = border->points + border->num_points;\n        FT_Byte*    tag = border->tags   + border->num_points;\n\n\n        vec[0] = *to;\n        tag[0] = FT_STROKE_TAG_ON;\n\n        border->num_points += 1;\n      }\n    }\n    border->movable = movable;\n    return error;\n  }\n\n\n  static FT_Error\n  ft_stroke_border_conicto( FT_StrokeBorder  border,\n                            FT_Vector*       control,\n                            FT_Vector*       to )\n  {\n    FT_Error  error;\n\n\n    FT_ASSERT( border->start >= 0 );\n\n    error = ft_stroke_border_grow( border, 2 );\n    if ( !error )\n    {\n      FT_Vector*  vec = border->points + border->num_points;\n      FT_Byte*    tag = border->tags   + border->num_points;\n\n\n      vec[0] = *control;\n      vec[1] = *to;\n\n      tag[0] = 0;\n      tag[1] = FT_STROKE_TAG_ON;\n\n      border->num_points += 2;\n    }\n\n    border->movable = FALSE;\n\n    return error;\n  }\n\n\n  static FT_Error\n  ft_stroke_border_cubicto( FT_StrokeBorder  border,\n                            FT_Vector*       control1,\n                            FT_Vector*       control2,\n                            FT_Vector*       to )\n  {\n    FT_Error  error;\n\n\n    FT_ASSERT( border->start >= 0 );\n\n    error = ft_stroke_border_grow( border, 3 );\n    if ( !error )\n    {\n      FT_Vector*  vec = border->points + border->num_points;\n      FT_Byte*    tag = border->tags   + border->num_points;\n\n\n      vec[0] = *control1;\n      vec[1] = *control2;\n      vec[2] = *to;\n\n      tag[0] = FT_STROKE_TAG_CUBIC;\n      tag[1] = FT_STROKE_TAG_CUBIC;\n      tag[2] = FT_STROKE_TAG_ON;\n\n      border->num_points += 3;\n    }\n\n    border->movable = FALSE;\n\n    return error;\n  }\n\n\n#define FT_ARC_CUBIC_ANGLE  ( FT_ANGLE_PI / 2 )\n\n\n  static FT_Error\n  ft_stroke_border_arcto( FT_StrokeBorder  border,\n                          FT_Vector*       center,\n                          FT_Fixed         radius,\n                          FT_Angle         angle_start,\n                          FT_Angle         angle_diff )\n  {\n    FT_Angle   total, angle, step, rotate, next, theta;\n    FT_Vector  a, b, a2, b2;\n    FT_Fixed   length;\n    FT_Error   error = FT_Err_Ok;\n\n\n    /* compute start point */\n    FT_Vector_From_Polar( &a, radius, angle_start );\n    a.x += center->x;\n    a.y += center->y;\n\n    total  = angle_diff;\n    angle  = angle_start;\n    rotate = ( angle_diff >= 0 ) ? FT_ANGLE_PI2 : -FT_ANGLE_PI2;\n\n    while ( total != 0 )\n    {\n      step = total;\n      if ( step > FT_ARC_CUBIC_ANGLE )\n        step = FT_ARC_CUBIC_ANGLE;\n\n      else if ( step < -FT_ARC_CUBIC_ANGLE )\n        step = -FT_ARC_CUBIC_ANGLE;\n\n      next  = angle + step;\n      theta = step;\n      if ( theta < 0 )\n        theta = -theta;\n\n      theta >>= 1;\n\n      /* compute end point */\n      FT_Vector_From_Polar( &b, radius, next );\n      b.x += center->x;\n      b.y += center->y;\n\n      /* compute first and second control points */\n      length = FT_MulDiv( radius, FT_Sin( theta ) * 4,\n                          ( 0x10000L + FT_Cos( theta ) ) * 3 );\n\n      FT_Vector_From_Polar( &a2, length, angle + rotate );\n      a2.x += a.x;\n      a2.y += a.y;\n\n      FT_Vector_From_Polar( &b2, length, next - rotate );\n      b2.x += b.x;\n      b2.y += b.y;\n\n      /* add cubic arc */\n      error = ft_stroke_border_cubicto( border, &a2, &b2, &b );\n      if ( error )\n        break;\n\n      /* process the rest of the arc ?? */\n      a      = b;\n      total -= step;\n      angle  = next;\n    }\n\n    return error;\n  }\n\n\n  static FT_Error\n  ft_stroke_border_moveto( FT_StrokeBorder  border,\n                           FT_Vector*       to )\n  {\n    /* close current open path if any ? */\n    if ( border->start >= 0 )\n      ft_stroke_border_close( border, FALSE );\n\n    border->start = border->num_points;\n    border->movable = FALSE;\n\n    return ft_stroke_border_lineto( border, to, FALSE );\n  }\n\n\n  static void\n  ft_stroke_border_init( FT_StrokeBorder  border,\n                         FT_Memory        memory )\n  {\n    border->memory = memory;\n    border->points = NULL;\n    border->tags   = NULL;\n\n    border->num_points = 0;\n    border->max_points = 0;\n    border->start      = -1;\n    border->valid      = FALSE;\n  }\n\n\n  static void\n  ft_stroke_border_reset( FT_StrokeBorder  border )\n  {\n    border->num_points = 0;\n    border->start      = -1;\n    border->valid      = FALSE;\n  }\n\n\n  static void\n  ft_stroke_border_done( FT_StrokeBorder  border )\n  {\n    FT_Memory  memory = border->memory;\n\n\n    FT_FREE( border->points );\n    FT_FREE( border->tags );\n\n    border->num_points = 0;\n    border->max_points = 0;\n    border->start      = -1;\n    border->valid      = FALSE;\n  }\n\n\n  static FT_Error\n  ft_stroke_border_get_counts( FT_StrokeBorder  border,\n                               FT_UInt         *anum_points,\n                               FT_UInt         *anum_contours )\n  {\n    FT_Error  error        = FT_Err_Ok;\n    FT_UInt   num_points   = 0;\n    FT_UInt   num_contours = 0;\n\n    FT_UInt     count      = border->num_points;\n    FT_Vector*  point      = border->points;\n    FT_Byte*    tags       = border->tags;\n    FT_Int      in_contour = 0;\n\n\n    for ( ; count > 0; count--, num_points++, point++, tags++ )\n    {\n      if ( tags[0] & FT_STROKE_TAG_BEGIN )\n      {\n        if ( in_contour != 0 )\n          goto Fail;\n\n        in_contour = 1;\n      }\n      else if ( in_contour == 0 )\n        goto Fail;\n\n      if ( tags[0] & FT_STROKE_TAG_END )\n      {\n        in_contour = 0;\n        num_contours++;\n      }\n    }\n\n    if ( in_contour != 0 )\n      goto Fail;\n\n    border->valid = TRUE;\n\n  Exit:\n    *anum_points   = num_points;\n    *anum_contours = num_contours;\n    return error;\n\n  Fail:\n    num_points   = 0;\n    num_contours = 0;\n    goto Exit;\n  }\n\n\n  static void\n  ft_stroke_border_export( FT_StrokeBorder  border,\n                           FT_Outline*      outline )\n  {\n    /* copy point locations */\n    FT_ARRAY_COPY( outline->points + outline->n_points,\n                   border->points,\n                   border->num_points );\n\n    /* copy tags */\n    {\n      FT_UInt   count = border->num_points;\n      FT_Byte*  read  = border->tags;\n      FT_Byte*  write = (FT_Byte*)outline->tags + outline->n_points;\n\n\n      for ( ; count > 0; count--, read++, write++ )\n      {\n        if ( *read & FT_STROKE_TAG_ON )\n          *write = FT_CURVE_TAG_ON;\n        else if ( *read & FT_STROKE_TAG_CUBIC )\n          *write = FT_CURVE_TAG_CUBIC;\n        else\n          *write = FT_CURVE_TAG_CONIC;\n      }\n    }\n\n    /* copy contours */\n    {\n      FT_UInt    count = border->num_points;\n      FT_Byte*   tags  = border->tags;\n      FT_Short*  write = outline->contours + outline->n_contours;\n      FT_Short   idx   = (FT_Short)outline->n_points;\n\n\n      for ( ; count > 0; count--, tags++, idx++ )\n      {\n        if ( *tags & FT_STROKE_TAG_END )\n        {\n          *write++ = idx;\n          outline->n_contours++;\n        }\n      }\n    }\n\n    outline->n_points = (short)( outline->n_points + border->num_points );\n\n    FT_ASSERT( FT_Outline_Check( outline ) == 0 );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                           STROKER                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define FT_SIDE_TO_ROTATE( s )   ( FT_ANGLE_PI2 - (s) * FT_ANGLE_PI )\n\n  typedef struct  FT_StrokerRec_\n  {\n    FT_Angle             angle_in;             /* direction into curr join */\n    FT_Angle             angle_out;            /* direction out of join  */\n    FT_Vector            center;               /* current position */\n    FT_Fixed             line_length;          /* length of last lineto */\n    FT_Bool              first_point;          /* is this the start? */\n    FT_Bool              subpath_open;         /* is the subpath open? */\n    FT_Angle             subpath_angle;        /* subpath start direction */\n    FT_Vector            subpath_start;        /* subpath start position */\n    FT_Fixed             subpath_line_length;  /* subpath start lineto len */\n    FT_Bool              handle_wide_strokes;  /* use wide strokes logic? */\n\n    FT_Stroker_LineCap   line_cap;\n    FT_Stroker_LineJoin  line_join;\n    FT_Stroker_LineJoin  line_join_saved;\n    FT_Fixed             miter_limit;\n    FT_Fixed             radius;\n\n    FT_StrokeBorderRec   borders[2];\n    FT_Library           library;\n\n  } FT_StrokerRec;\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stroker_New( FT_Library   library,\n                  FT_Stroker  *astroker )\n  {\n    FT_Error    error;           /* assigned in FT_NEW */\n    FT_Memory   memory;\n    FT_Stroker  stroker = NULL;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !astroker )\n      return FT_THROW( Invalid_Argument );\n\n    memory = library->memory;\n\n    if ( !FT_NEW( stroker ) )\n    {\n      stroker->library = library;\n\n      ft_stroke_border_init( &stroker->borders[0], memory );\n      ft_stroke_border_init( &stroker->borders[1], memory );\n    }\n\n    *astroker = stroker;\n\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Stroker_Set( FT_Stroker           stroker,\n                  FT_Fixed             radius,\n                  FT_Stroker_LineCap   line_cap,\n                  FT_Stroker_LineJoin  line_join,\n                  FT_Fixed             miter_limit )\n  {\n    if ( !stroker )\n      return;\n\n    stroker->radius      = radius;\n    stroker->line_cap    = line_cap;\n    stroker->line_join   = line_join;\n    stroker->miter_limit = miter_limit;\n\n    /* ensure miter limit has sensible value */\n    if ( stroker->miter_limit < 0x10000L )\n      stroker->miter_limit = 0x10000L;\n\n    /* save line join style:                                           */\n    /* line join style can be temporarily changed when stroking curves */\n    stroker->line_join_saved = line_join;\n\n    FT_Stroker_Rewind( stroker );\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Stroker_Rewind( FT_Stroker  stroker )\n  {\n    if ( stroker )\n    {\n      ft_stroke_border_reset( &stroker->borders[0] );\n      ft_stroke_border_reset( &stroker->borders[1] );\n    }\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Stroker_Done( FT_Stroker  stroker )\n  {\n    if ( stroker )\n    {\n      FT_Memory  memory = stroker->library->memory;\n\n\n      ft_stroke_border_done( &stroker->borders[0] );\n      ft_stroke_border_done( &stroker->borders[1] );\n\n      stroker->library = NULL;\n      FT_FREE( stroker );\n    }\n  }\n\n\n  /* create a circular arc at a corner or cap */\n  static FT_Error\n  ft_stroker_arcto( FT_Stroker  stroker,\n                    FT_Int      side )\n  {\n    FT_Angle         total, rotate;\n    FT_Fixed         radius = stroker->radius;\n    FT_Error         error  = FT_Err_Ok;\n    FT_StrokeBorder  border = stroker->borders + side;\n\n\n    rotate = FT_SIDE_TO_ROTATE( side );\n\n    total = FT_Angle_Diff( stroker->angle_in, stroker->angle_out );\n    if ( total == FT_ANGLE_PI )\n      total = -rotate * 2;\n\n    error = ft_stroke_border_arcto( border,\n                                    &stroker->center,\n                                    radius,\n                                    stroker->angle_in + rotate,\n                                    total );\n    border->movable = FALSE;\n    return error;\n  }\n\n\n  /* add a cap at the end of an opened path */\n  static FT_Error\n  ft_stroker_cap( FT_Stroker  stroker,\n                  FT_Angle    angle,\n                  FT_Int      side )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( stroker->line_cap == FT_STROKER_LINECAP_ROUND )\n    {\n      /* add a round cap */\n      stroker->angle_in  = angle;\n      stroker->angle_out = angle + FT_ANGLE_PI;\n\n      error = ft_stroker_arcto( stroker, side );\n    }\n    else if ( stroker->line_cap == FT_STROKER_LINECAP_SQUARE )\n    {\n      /* add a square cap */\n      FT_Vector        delta, delta2;\n      FT_Angle         rotate = FT_SIDE_TO_ROTATE( side );\n      FT_Fixed         radius = stroker->radius;\n      FT_StrokeBorder  border = stroker->borders + side;\n\n\n      FT_Vector_From_Polar( &delta2, radius, angle + rotate );\n      FT_Vector_From_Polar( &delta,  radius, angle );\n\n      delta.x += stroker->center.x + delta2.x;\n      delta.y += stroker->center.y + delta2.y;\n\n      error = ft_stroke_border_lineto( border, &delta, FALSE );\n      if ( error )\n        goto Exit;\n\n      FT_Vector_From_Polar( &delta2, radius, angle - rotate );\n      FT_Vector_From_Polar( &delta,  radius, angle );\n\n      delta.x += delta2.x + stroker->center.x;\n      delta.y += delta2.y + stroker->center.y;\n\n      error = ft_stroke_border_lineto( border, &delta, FALSE );\n    }\n    else if ( stroker->line_cap == FT_STROKER_LINECAP_BUTT )\n    {\n      /* add a butt ending */\n      FT_Vector        delta;\n      FT_Angle         rotate = FT_SIDE_TO_ROTATE( side );\n      FT_Fixed         radius = stroker->radius;\n      FT_StrokeBorder  border = stroker->borders + side;\n\n\n      FT_Vector_From_Polar( &delta, radius, angle + rotate );\n\n      delta.x += stroker->center.x;\n      delta.y += stroker->center.y;\n\n      error = ft_stroke_border_lineto( border, &delta, FALSE );\n      if ( error )\n        goto Exit;\n\n      FT_Vector_From_Polar( &delta, radius, angle - rotate );\n\n      delta.x += stroker->center.x;\n      delta.y += stroker->center.y;\n\n      error = ft_stroke_border_lineto( border, &delta, FALSE );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* process an inside corner, i.e. compute intersection */\n  static FT_Error\n  ft_stroker_inside( FT_Stroker  stroker,\n                     FT_Int      side,\n                     FT_Fixed    line_length )\n  {\n    FT_StrokeBorder  border = stroker->borders + side;\n    FT_Angle         phi, theta, rotate;\n    FT_Fixed         length, thcos;\n    FT_Vector        delta;\n    FT_Error         error = FT_Err_Ok;\n    FT_Bool          intersect;          /* use intersection of lines? */\n\n\n    rotate = FT_SIDE_TO_ROTATE( side );\n\n    theta = FT_Angle_Diff( stroker->angle_in, stroker->angle_out ) / 2;\n\n    /* Only intersect borders if between two lineto's and both */\n    /* lines are long enough (line_length is zero for curves). */\n    if ( !border->movable || line_length == 0 )\n      intersect = FALSE;\n    else\n    {\n      /* compute minimum required length of lines */\n      FT_Fixed  min_length = ft_pos_abs( FT_MulFix( stroker->radius,\n                                                    FT_Tan( theta ) ) );\n\n\n      intersect = FT_BOOL( min_length                         &&\n                           stroker->line_length >= min_length &&\n                           line_length          >= min_length );\n    }\n\n    if ( !intersect )\n    {\n      FT_Vector_From_Polar( &delta, stroker->radius,\n                            stroker->angle_out + rotate );\n      delta.x += stroker->center.x;\n      delta.y += stroker->center.y;\n\n      border->movable = FALSE;\n    }\n    else\n    {\n      /* compute median angle */\n      phi = stroker->angle_in + theta;\n\n      thcos = FT_Cos( theta );\n\n      length = FT_DivFix( stroker->radius, thcos );\n\n      FT_Vector_From_Polar( &delta, length, phi + rotate );\n      delta.x += stroker->center.x;\n      delta.y += stroker->center.y;\n    }\n\n    error = ft_stroke_border_lineto( border, &delta, FALSE );\n\n    return error;\n  }\n\n\n  /* process an outside corner, i.e. compute bevel/miter/round */\n  static FT_Error\n  ft_stroker_outside( FT_Stroker  stroker,\n                      FT_Int      side,\n                      FT_Fixed    line_length )\n  {\n    FT_StrokeBorder  border = stroker->borders + side;\n    FT_Error         error;\n    FT_Angle         rotate;\n\n\n    if ( stroker->line_join == FT_STROKER_LINEJOIN_ROUND )\n      error = ft_stroker_arcto( stroker, side );\n    else\n    {\n      /* this is a mitered (pointed) or beveled (truncated) corner */\n      FT_Fixed  sigma = 0, radius = stroker->radius;\n      FT_Angle  theta = 0, phi = 0;\n      FT_Fixed  thcos = 0;\n      FT_Bool   bevel, fixed_bevel;\n\n\n      rotate = FT_SIDE_TO_ROTATE( side );\n\n      bevel =\n        FT_BOOL( stroker->line_join == FT_STROKER_LINEJOIN_BEVEL );\n\n      fixed_bevel =\n        FT_BOOL( stroker->line_join != FT_STROKER_LINEJOIN_MITER_VARIABLE );\n\n      if ( !bevel )\n      {\n        theta = FT_Angle_Diff( stroker->angle_in, stroker->angle_out );\n\n        if ( theta == FT_ANGLE_PI )\n        {\n          theta = rotate;\n          phi   = stroker->angle_in;\n        }\n        else\n        {\n          theta /= 2;\n          phi    = stroker->angle_in + theta + rotate;\n        }\n\n        thcos = FT_Cos( theta );\n        sigma = FT_MulFix( stroker->miter_limit, thcos );\n\n        /* is miter limit exceeded? */\n        if ( sigma < 0x10000L )\n        {\n          /* don't create variable bevels for very small deviations; */\n          /* FT_Sin(x) = 0 for x <= 57                               */\n          if ( fixed_bevel || ft_pos_abs( theta ) > 57 )\n            bevel = TRUE;\n        }\n      }\n\n      if ( bevel )  /* this is a bevel (broken angle) */\n      {\n        if ( fixed_bevel )\n        {\n          /* the outer corners are simply joined together */\n          FT_Vector  delta;\n\n\n          /* add bevel */\n          FT_Vector_From_Polar( &delta,\n                                radius,\n                                stroker->angle_out + rotate );\n          delta.x += stroker->center.x;\n          delta.y += stroker->center.y;\n\n          border->movable = FALSE;\n          error = ft_stroke_border_lineto( border, &delta, FALSE );\n        }\n        else /* variable bevel */\n        {\n          /* the miter is truncated */\n          FT_Vector  middle, delta;\n          FT_Fixed   length;\n\n\n          /* compute middle point */\n          FT_Vector_From_Polar( &middle,\n                                FT_MulFix( radius, stroker->miter_limit ),\n                                phi );\n          middle.x += stroker->center.x;\n          middle.y += stroker->center.y;\n\n          /* compute first angle point */\n          length = FT_MulDiv( radius, 0x10000L - sigma,\n                              ft_pos_abs( FT_Sin( theta ) ) );\n\n          FT_Vector_From_Polar( &delta, length, phi + rotate );\n          delta.x += middle.x;\n          delta.y += middle.y;\n\n          error = ft_stroke_border_lineto( border, &delta, FALSE );\n          if ( error )\n            goto Exit;\n\n          /* compute second angle point */\n          FT_Vector_From_Polar( &delta, length, phi - rotate );\n          delta.x += middle.x;\n          delta.y += middle.y;\n\n          error = ft_stroke_border_lineto( border, &delta, FALSE );\n          if ( error )\n            goto Exit;\n\n          /* finally, add an end point; only needed if not lineto */\n          /* (line_length is zero for curves)                     */\n          if ( line_length == 0 )\n          {\n            FT_Vector_From_Polar( &delta,\n                                  radius,\n                                  stroker->angle_out + rotate );\n\n            delta.x += stroker->center.x;\n            delta.y += stroker->center.y;\n\n            error = ft_stroke_border_lineto( border, &delta, FALSE );\n          }\n        }\n      }\n      else /* this is a miter (intersection) */\n      {\n        FT_Fixed   length;\n        FT_Vector  delta;\n\n\n        length = FT_DivFix( stroker->radius, thcos );\n\n        FT_Vector_From_Polar( &delta, length, phi );\n        delta.x += stroker->center.x;\n        delta.y += stroker->center.y;\n\n        error = ft_stroke_border_lineto( border, &delta, FALSE );\n        if ( error )\n          goto Exit;\n\n        /* now add an end point; only needed if not lineto */\n        /* (line_length is zero for curves)                */\n        if ( line_length == 0 )\n        {\n          FT_Vector_From_Polar( &delta,\n                                stroker->radius,\n                                stroker->angle_out + rotate );\n          delta.x += stroker->center.x;\n          delta.y += stroker->center.y;\n\n          error = ft_stroke_border_lineto( border, &delta, FALSE );\n        }\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  ft_stroker_process_corner( FT_Stroker  stroker,\n                             FT_Fixed    line_length )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_Angle  turn;\n    FT_Int    inside_side;\n\n\n    turn = FT_Angle_Diff( stroker->angle_in, stroker->angle_out );\n\n    /* no specific corner processing is required if the turn is 0 */\n    if ( turn == 0 )\n      goto Exit;\n\n    /* when we turn to the right, the inside side is 0 */\n    inside_side = 0;\n\n    /* otherwise, the inside side is 1 */\n    if ( turn < 0 )\n      inside_side = 1;\n\n    /* process the inside side */\n    error = ft_stroker_inside( stroker, inside_side, line_length );\n    if ( error )\n      goto Exit;\n\n    /* process the outside side */\n    error = ft_stroker_outside( stroker, 1 - inside_side, line_length );\n\n  Exit:\n    return error;\n  }\n\n\n  /* add two points to the left and right borders corresponding to the */\n  /* start of the subpath                                              */\n  static FT_Error\n  ft_stroker_subpath_start( FT_Stroker  stroker,\n                            FT_Angle    start_angle,\n                            FT_Fixed    line_length )\n  {\n    FT_Vector        delta;\n    FT_Vector        point;\n    FT_Error         error;\n    FT_StrokeBorder  border;\n\n\n    FT_Vector_From_Polar( &delta, stroker->radius,\n                          start_angle + FT_ANGLE_PI2 );\n\n    point.x = stroker->center.x + delta.x;\n    point.y = stroker->center.y + delta.y;\n\n    border = stroker->borders;\n    error = ft_stroke_border_moveto( border, &point );\n    if ( error )\n      goto Exit;\n\n    point.x = stroker->center.x - delta.x;\n    point.y = stroker->center.y - delta.y;\n\n    border++;\n    error = ft_stroke_border_moveto( border, &point );\n\n    /* save angle, position, and line length for last join */\n    /* (line_length is zero for curves)                    */\n    stroker->subpath_angle       = start_angle;\n    stroker->first_point         = FALSE;\n    stroker->subpath_line_length = line_length;\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stroker_LineTo( FT_Stroker  stroker,\n                     FT_Vector*  to )\n  {\n    FT_Error         error = FT_Err_Ok;\n    FT_StrokeBorder  border;\n    FT_Vector        delta;\n    FT_Angle         angle;\n    FT_Int           side;\n    FT_Fixed         line_length;\n\n\n    if ( !stroker || !to )\n      return FT_THROW( Invalid_Argument );\n\n    delta.x = to->x - stroker->center.x;\n    delta.y = to->y - stroker->center.y;\n\n    /* a zero-length lineto is a no-op; avoid creating a spurious corner */\n    if ( delta.x == 0 && delta.y == 0 )\n       goto Exit;\n\n    /* compute length of line */\n    line_length = FT_Vector_Length( &delta );\n\n    angle = FT_Atan2( delta.x, delta.y );\n    FT_Vector_From_Polar( &delta, stroker->radius, angle + FT_ANGLE_PI2 );\n\n    /* process corner if necessary */\n    if ( stroker->first_point )\n    {\n      /* This is the first segment of a subpath.  We need to     */\n      /* add a point to each border at their respective starting */\n      /* point locations.                                        */\n      error = ft_stroker_subpath_start( stroker, angle, line_length );\n      if ( error )\n        goto Exit;\n    }\n    else\n    {\n      /* process the current corner */\n      stroker->angle_out = angle;\n      error = ft_stroker_process_corner( stroker, line_length );\n      if ( error )\n        goto Exit;\n    }\n\n    /* now add a line segment to both the `inside' and `outside' paths */\n    for ( border = stroker->borders, side = 1; side >= 0; side--, border++ )\n    {\n      FT_Vector  point;\n\n\n      point.x = to->x + delta.x;\n      point.y = to->y + delta.y;\n\n      /* the ends of lineto borders are movable */\n      error = ft_stroke_border_lineto( border, &point, TRUE );\n      if ( error )\n        goto Exit;\n\n      delta.x = -delta.x;\n      delta.y = -delta.y;\n    }\n\n    stroker->angle_in    = angle;\n    stroker->center      = *to;\n    stroker->line_length = line_length;\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stroker_ConicTo( FT_Stroker  stroker,\n                      FT_Vector*  control,\n                      FT_Vector*  to )\n  {\n    FT_Error    error = FT_Err_Ok;\n    FT_Vector   bez_stack[34];\n    FT_Vector*  arc;\n    FT_Vector*  limit = bez_stack + 30;\n    FT_Bool     first_arc = TRUE;\n\n\n    if ( !stroker || !control || !to )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* if all control points are coincident, this is a no-op; */\n    /* avoid creating a spurious corner                       */\n    if ( FT_IS_SMALL( stroker->center.x - control->x ) &&\n         FT_IS_SMALL( stroker->center.y - control->y ) &&\n         FT_IS_SMALL( control->x        - to->x      ) &&\n         FT_IS_SMALL( control->y        - to->y      ) )\n    {\n       stroker->center = *to;\n       goto Exit;\n    }\n\n    arc    = bez_stack;\n    arc[0] = *to;\n    arc[1] = *control;\n    arc[2] = stroker->center;\n\n    while ( arc >= bez_stack )\n    {\n      FT_Angle  angle_in, angle_out;\n\n\n      /* initialize with current direction */\n      angle_in = angle_out = stroker->angle_in;\n\n      if ( arc < limit                                             &&\n           !ft_conic_is_small_enough( arc, &angle_in, &angle_out ) )\n      {\n        if ( stroker->first_point )\n          stroker->angle_in = angle_in;\n\n        ft_conic_split( arc );\n        arc += 2;\n        continue;\n      }\n\n      if ( first_arc )\n      {\n        first_arc = FALSE;\n\n        /* process corner if necessary */\n        if ( stroker->first_point )\n          error = ft_stroker_subpath_start( stroker, angle_in, 0 );\n        else\n        {\n          stroker->angle_out = angle_in;\n          error = ft_stroker_process_corner( stroker, 0 );\n        }\n      }\n      else if ( ft_pos_abs( FT_Angle_Diff( stroker->angle_in, angle_in ) ) >\n                  FT_SMALL_CONIC_THRESHOLD / 4                             )\n      {\n        /* if the deviation from one arc to the next is too great, */\n        /* add a round corner                                      */\n        stroker->center    = arc[2];\n        stroker->angle_out = angle_in;\n        stroker->line_join = FT_STROKER_LINEJOIN_ROUND;\n\n        error = ft_stroker_process_corner( stroker, 0 );\n\n        /* reinstate line join style */\n        stroker->line_join = stroker->line_join_saved;\n      }\n\n      if ( error )\n        goto Exit;\n\n      /* the arc's angle is small enough; we can add it directly to each */\n      /* border                                                          */\n      {\n        FT_Vector        ctrl, end;\n        FT_Angle         theta, phi, rotate, alpha0 = 0;\n        FT_Fixed         length;\n        FT_StrokeBorder  border;\n        FT_Int           side;\n\n\n        theta  = FT_Angle_Diff( angle_in, angle_out ) / 2;\n        phi    = angle_in + theta;\n        length = FT_DivFix( stroker->radius, FT_Cos( theta ) );\n\n        /* compute direction of original arc */\n        if ( stroker->handle_wide_strokes )\n          alpha0 = FT_Atan2( arc[0].x - arc[2].x, arc[0].y - arc[2].y );\n\n        for ( border = stroker->borders, side = 0;\n              side <= 1;\n              side++, border++ )\n        {\n          rotate = FT_SIDE_TO_ROTATE( side );\n\n          /* compute control point */\n          FT_Vector_From_Polar( &ctrl, length, phi + rotate );\n          ctrl.x += arc[1].x;\n          ctrl.y += arc[1].y;\n\n          /* compute end point */\n          FT_Vector_From_Polar( &end, stroker->radius, angle_out + rotate );\n          end.x += arc[0].x;\n          end.y += arc[0].y;\n\n          if ( stroker->handle_wide_strokes )\n          {\n            FT_Vector  start;\n            FT_Angle   alpha1;\n\n\n            /* determine whether the border radius is greater than the */\n            /* radius of curvature of the original arc                 */\n            start = border->points[border->num_points - 1];\n\n            alpha1 = FT_Atan2( end.x - start.x, end.y - start.y );\n\n            /* is the direction of the border arc opposite to */\n            /* that of the original arc? */\n            if ( ft_pos_abs( FT_Angle_Diff( alpha0, alpha1 ) ) >\n                   FT_ANGLE_PI / 2                             )\n            {\n              FT_Angle   beta, gamma;\n              FT_Vector  bvec, delta;\n              FT_Fixed   blen, sinA, sinB, alen;\n\n\n              /* use the sine rule to find the intersection point */\n              beta  = FT_Atan2( arc[2].x - start.x, arc[2].y - start.y );\n              gamma = FT_Atan2( arc[0].x - end.x,   arc[0].y - end.y );\n\n              bvec.x = end.x - start.x;\n              bvec.y = end.y - start.y;\n\n              blen = FT_Vector_Length( &bvec );\n\n              sinA = ft_pos_abs( FT_Sin( alpha1 - gamma ) );\n              sinB = ft_pos_abs( FT_Sin( beta - gamma ) );\n\n              alen = FT_MulDiv( blen, sinA, sinB );\n\n              FT_Vector_From_Polar( &delta, alen, beta );\n              delta.x += start.x;\n              delta.y += start.y;\n\n              /* circumnavigate the negative sector backwards */\n              border->movable = FALSE;\n              error = ft_stroke_border_lineto( border, &delta, FALSE );\n              if ( error )\n                goto Exit;\n              error = ft_stroke_border_lineto( border, &end, FALSE );\n              if ( error )\n                goto Exit;\n              error = ft_stroke_border_conicto( border, &ctrl, &start );\n              if ( error )\n                goto Exit;\n              /* and then move to the endpoint */\n              error = ft_stroke_border_lineto( border, &end, FALSE );\n              if ( error )\n                goto Exit;\n\n              continue;\n            }\n\n            /* else fall through */\n          }\n\n          /* simply add an arc */\n          error = ft_stroke_border_conicto( border, &ctrl, &end );\n          if ( error )\n            goto Exit;\n        }\n      }\n\n      arc -= 2;\n\n      stroker->angle_in = angle_out;\n    }\n\n    stroker->center = *to;\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stroker_CubicTo( FT_Stroker  stroker,\n                      FT_Vector*  control1,\n                      FT_Vector*  control2,\n                      FT_Vector*  to )\n  {\n    FT_Error    error = FT_Err_Ok;\n    FT_Vector   bez_stack[37];\n    FT_Vector*  arc;\n    FT_Vector*  limit = bez_stack + 32;\n    FT_Bool     first_arc = TRUE;\n\n\n    if ( !stroker || !control1 || !control2 || !to )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* if all control points are coincident, this is a no-op; */\n    /* avoid creating a spurious corner */\n    if ( FT_IS_SMALL( stroker->center.x - control1->x ) &&\n         FT_IS_SMALL( stroker->center.y - control1->y ) &&\n         FT_IS_SMALL( control1->x       - control2->x ) &&\n         FT_IS_SMALL( control1->y       - control2->y ) &&\n         FT_IS_SMALL( control2->x       - to->x       ) &&\n         FT_IS_SMALL( control2->y       - to->y       ) )\n    {\n       stroker->center = *to;\n       goto Exit;\n    }\n\n    arc    = bez_stack;\n    arc[0] = *to;\n    arc[1] = *control2;\n    arc[2] = *control1;\n    arc[3] = stroker->center;\n\n    while ( arc >= bez_stack )\n    {\n      FT_Angle  angle_in, angle_mid, angle_out;\n\n\n      /* initialize with current direction */\n      angle_in = angle_out = angle_mid = stroker->angle_in;\n\n      if ( arc < limit                                         &&\n           !ft_cubic_is_small_enough( arc, &angle_in,\n                                      &angle_mid, &angle_out ) )\n      {\n        if ( stroker->first_point )\n          stroker->angle_in = angle_in;\n\n        ft_cubic_split( arc );\n        arc += 3;\n        continue;\n      }\n\n      if ( first_arc )\n      {\n        first_arc = FALSE;\n\n        /* process corner if necessary */\n        if ( stroker->first_point )\n          error = ft_stroker_subpath_start( stroker, angle_in, 0 );\n        else\n        {\n          stroker->angle_out = angle_in;\n          error = ft_stroker_process_corner( stroker, 0 );\n        }\n      }\n      else if ( ft_pos_abs( FT_Angle_Diff( stroker->angle_in, angle_in ) ) >\n                  FT_SMALL_CUBIC_THRESHOLD / 4                             )\n      {\n        /* if the deviation from one arc to the next is too great, */\n        /* add a round corner                                      */\n        stroker->center    = arc[3];\n        stroker->angle_out = angle_in;\n        stroker->line_join = FT_STROKER_LINEJOIN_ROUND;\n\n        error = ft_stroker_process_corner( stroker, 0 );\n\n        /* reinstate line join style */\n        stroker->line_join = stroker->line_join_saved;\n      }\n\n      if ( error )\n        goto Exit;\n\n      /* the arc's angle is small enough; we can add it directly to each */\n      /* border                                                          */\n      {\n        FT_Vector        ctrl1, ctrl2, end;\n        FT_Angle         theta1, phi1, theta2, phi2, rotate, alpha0 = 0;\n        FT_Fixed         length1, length2;\n        FT_StrokeBorder  border;\n        FT_Int           side;\n\n\n        theta1  = FT_Angle_Diff( angle_in,  angle_mid ) / 2;\n        theta2  = FT_Angle_Diff( angle_mid, angle_out ) / 2;\n        phi1    = ft_angle_mean( angle_in,  angle_mid );\n        phi2    = ft_angle_mean( angle_mid, angle_out );\n        length1 = FT_DivFix( stroker->radius, FT_Cos( theta1 ) );\n        length2 = FT_DivFix( stroker->radius, FT_Cos( theta2 ) );\n\n        /* compute direction of original arc */\n        if ( stroker->handle_wide_strokes )\n          alpha0 = FT_Atan2( arc[0].x - arc[3].x, arc[0].y - arc[3].y );\n\n        for ( border = stroker->borders, side = 0;\n              side <= 1;\n              side++, border++ )\n        {\n          rotate = FT_SIDE_TO_ROTATE( side );\n\n          /* compute control points */\n          FT_Vector_From_Polar( &ctrl1, length1, phi1 + rotate );\n          ctrl1.x += arc[2].x;\n          ctrl1.y += arc[2].y;\n\n          FT_Vector_From_Polar( &ctrl2, length2, phi2 + rotate );\n          ctrl2.x += arc[1].x;\n          ctrl2.y += arc[1].y;\n\n          /* compute end point */\n          FT_Vector_From_Polar( &end, stroker->radius, angle_out + rotate );\n          end.x += arc[0].x;\n          end.y += arc[0].y;\n\n          if ( stroker->handle_wide_strokes )\n          {\n            FT_Vector  start;\n            FT_Angle   alpha1;\n\n\n            /* determine whether the border radius is greater than the */\n            /* radius of curvature of the original arc                 */\n            start = border->points[border->num_points - 1];\n\n            alpha1 = FT_Atan2( end.x - start.x, end.y - start.y );\n\n            /* is the direction of the border arc opposite to */\n            /* that of the original arc? */\n            if ( ft_pos_abs( FT_Angle_Diff( alpha0, alpha1 ) ) >\n                   FT_ANGLE_PI / 2                             )\n            {\n              FT_Angle   beta, gamma;\n              FT_Vector  bvec, delta;\n              FT_Fixed   blen, sinA, sinB, alen;\n\n\n              /* use the sine rule to find the intersection point */\n              beta  = FT_Atan2( arc[3].x - start.x, arc[3].y - start.y );\n              gamma = FT_Atan2( arc[0].x - end.x,   arc[0].y - end.y );\n\n              bvec.x = end.x - start.x;\n              bvec.y = end.y - start.y;\n\n              blen = FT_Vector_Length( &bvec );\n\n              sinA = ft_pos_abs( FT_Sin( alpha1 - gamma ) );\n              sinB = ft_pos_abs( FT_Sin( beta - gamma ) );\n\n              alen = FT_MulDiv( blen, sinA, sinB );\n\n              FT_Vector_From_Polar( &delta, alen, beta );\n              delta.x += start.x;\n              delta.y += start.y;\n\n              /* circumnavigate the negative sector backwards */\n              border->movable = FALSE;\n              error = ft_stroke_border_lineto( border, &delta, FALSE );\n              if ( error )\n                goto Exit;\n              error = ft_stroke_border_lineto( border, &end, FALSE );\n              if ( error )\n                goto Exit;\n              error = ft_stroke_border_cubicto( border,\n                                                &ctrl2,\n                                                &ctrl1,\n                                                &start );\n              if ( error )\n                goto Exit;\n              /* and then move to the endpoint */\n              error = ft_stroke_border_lineto( border, &end, FALSE );\n              if ( error )\n                goto Exit;\n\n              continue;\n            }\n\n            /* else fall through */\n          }\n\n          /* simply add an arc */\n          error = ft_stroke_border_cubicto( border, &ctrl1, &ctrl2, &end );\n          if ( error )\n            goto Exit;\n        }\n      }\n\n      arc -= 3;\n\n      stroker->angle_in = angle_out;\n    }\n\n    stroker->center = *to;\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stroker_BeginSubPath( FT_Stroker  stroker,\n                           FT_Vector*  to,\n                           FT_Bool     open )\n  {\n    if ( !stroker || !to )\n      return FT_THROW( Invalid_Argument );\n\n    /* We cannot process the first point, because there is not enough      */\n    /* information regarding its corner/cap.  The latter will be processed */\n    /* in the `FT_Stroker_EndSubPath' routine.                             */\n    /*                                                                     */\n    stroker->first_point  = TRUE;\n    stroker->center       = *to;\n    stroker->subpath_open = open;\n\n    /* Determine if we need to check whether the border radius is greater */\n    /* than the radius of curvature of a curve, to handle this case       */\n    /* specially.  This is only required if bevel joins or butt caps may  */\n    /* be created, because round & miter joins and round & square caps    */\n    /* cover the negative sector created with wide strokes.               */\n    stroker->handle_wide_strokes =\n      FT_BOOL( stroker->line_join != FT_STROKER_LINEJOIN_ROUND  ||\n               ( stroker->subpath_open                        &&\n                 stroker->line_cap == FT_STROKER_LINECAP_BUTT ) );\n\n    /* record the subpath start point for each border */\n    stroker->subpath_start = *to;\n\n    stroker->angle_in = 0;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  ft_stroker_add_reverse_left( FT_Stroker  stroker,\n                               FT_Bool     open )\n  {\n    FT_StrokeBorder  right = stroker->borders + 0;\n    FT_StrokeBorder  left  = stroker->borders + 1;\n    FT_Int           new_points;\n    FT_Error         error = FT_Err_Ok;\n\n\n    FT_ASSERT( left->start >= 0 );\n\n    new_points = left->num_points - left->start;\n    if ( new_points > 0 )\n    {\n      error = ft_stroke_border_grow( right, (FT_UInt)new_points );\n      if ( error )\n        goto Exit;\n\n      {\n        FT_Vector*  dst_point = right->points + right->num_points;\n        FT_Byte*    dst_tag   = right->tags   + right->num_points;\n        FT_Vector*  src_point = left->points  + left->num_points - 1;\n        FT_Byte*    src_tag   = left->tags    + left->num_points - 1;\n\n\n        while ( src_point >= left->points + left->start )\n        {\n          *dst_point = *src_point;\n          *dst_tag   = *src_tag;\n\n          if ( open )\n            dst_tag[0] &= ~FT_STROKE_TAG_BEGIN_END;\n          else\n          {\n            FT_Byte  ttag =\n                       (FT_Byte)( dst_tag[0] & FT_STROKE_TAG_BEGIN_END );\n\n\n            /* switch begin/end tags if necessary */\n            if ( ttag == FT_STROKE_TAG_BEGIN ||\n                 ttag == FT_STROKE_TAG_END   )\n              dst_tag[0] ^= FT_STROKE_TAG_BEGIN_END;\n          }\n\n          src_point--;\n          src_tag--;\n          dst_point++;\n          dst_tag++;\n        }\n      }\n\n      left->num_points   = left->start;\n      right->num_points += new_points;\n\n      right->movable = FALSE;\n      left->movable  = FALSE;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  /* there's a lot of magic in this function! */\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stroker_EndSubPath( FT_Stroker  stroker )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( !stroker )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    if ( stroker->subpath_open )\n    {\n      FT_StrokeBorder  right = stroker->borders;\n\n\n      /* All right, this is an opened path, we need to add a cap between */\n      /* right & left, add the reverse of left, then add a final cap     */\n      /* between left & right.                                           */\n      error = ft_stroker_cap( stroker, stroker->angle_in, 0 );\n      if ( error )\n        goto Exit;\n\n      /* add reversed points from `left' to `right' */\n      error = ft_stroker_add_reverse_left( stroker, TRUE );\n      if ( error )\n        goto Exit;\n\n      /* now add the final cap */\n      stroker->center = stroker->subpath_start;\n      error = ft_stroker_cap( stroker,\n                              stroker->subpath_angle + FT_ANGLE_PI, 0 );\n      if ( error )\n        goto Exit;\n\n      /* Now end the right subpath accordingly.  The left one is */\n      /* rewind and doesn't need further processing.             */\n      ft_stroke_border_close( right, FALSE );\n    }\n    else\n    {\n      FT_Angle  turn;\n      FT_Int    inside_side;\n\n\n      /* close the path if needed */\n      if ( stroker->center.x != stroker->subpath_start.x ||\n           stroker->center.y != stroker->subpath_start.y )\n      {\n         error = FT_Stroker_LineTo( stroker, &stroker->subpath_start );\n         if ( error )\n           goto Exit;\n      }\n\n      /* process the corner */\n      stroker->angle_out = stroker->subpath_angle;\n      turn               = FT_Angle_Diff( stroker->angle_in,\n                                          stroker->angle_out );\n\n      /* no specific corner processing is required if the turn is 0 */\n      if ( turn != 0 )\n      {\n        /* when we turn to the right, the inside side is 0 */\n        inside_side = 0;\n\n        /* otherwise, the inside side is 1 */\n        if ( turn < 0 )\n          inside_side = 1;\n\n        error = ft_stroker_inside( stroker,\n                                   inside_side,\n                                   stroker->subpath_line_length );\n        if ( error )\n          goto Exit;\n\n        /* process the outside side */\n        error = ft_stroker_outside( stroker,\n                                    1 - inside_side,\n                                    stroker->subpath_line_length );\n        if ( error )\n          goto Exit;\n      }\n\n      /* then end our two subpaths */\n      ft_stroke_border_close( stroker->borders + 0, FALSE );\n      ft_stroke_border_close( stroker->borders + 1, TRUE );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stroker_GetBorderCounts( FT_Stroker        stroker,\n                              FT_StrokerBorder  border,\n                              FT_UInt          *anum_points,\n                              FT_UInt          *anum_contours )\n  {\n    FT_UInt   num_points = 0, num_contours = 0;\n    FT_Error  error;\n\n\n    if ( !stroker || border > 1 )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    error = ft_stroke_border_get_counts( stroker->borders + border,\n                                         &num_points, &num_contours );\n  Exit:\n    if ( anum_points )\n      *anum_points = num_points;\n\n    if ( anum_contours )\n      *anum_contours = num_contours;\n\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stroker_GetCounts( FT_Stroker  stroker,\n                        FT_UInt    *anum_points,\n                        FT_UInt    *anum_contours )\n  {\n    FT_UInt   count1, count2, num_points   = 0;\n    FT_UInt   count3, count4, num_contours = 0;\n    FT_Error  error;\n\n\n    if ( !stroker )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    error = ft_stroke_border_get_counts( stroker->borders + 0,\n                                         &count1, &count2 );\n    if ( error )\n      goto Exit;\n\n    error = ft_stroke_border_get_counts( stroker->borders + 1,\n                                         &count3, &count4 );\n    if ( error )\n      goto Exit;\n\n    num_points   = count1 + count3;\n    num_contours = count2 + count4;\n\n  Exit:\n    if ( anum_points )\n      *anum_points   = num_points;\n\n    if ( anum_contours )\n      *anum_contours = num_contours;\n\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Stroker_ExportBorder( FT_Stroker        stroker,\n                           FT_StrokerBorder  border,\n                           FT_Outline*       outline )\n  {\n    if ( !stroker || !outline )\n      return;\n\n    if ( border == FT_STROKER_BORDER_LEFT  ||\n         border == FT_STROKER_BORDER_RIGHT )\n    {\n      FT_StrokeBorder  sborder = & stroker->borders[border];\n\n\n      if ( sborder->valid )\n        ft_stroke_border_export( sborder, outline );\n    }\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Stroker_Export( FT_Stroker   stroker,\n                     FT_Outline*  outline )\n  {\n    FT_Stroker_ExportBorder( stroker, FT_STROKER_BORDER_LEFT, outline );\n    FT_Stroker_ExportBorder( stroker, FT_STROKER_BORDER_RIGHT, outline );\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  /*\n   *  The following is very similar to FT_Outline_Decompose, except\n   *  that we do support opened paths, and do not scale the outline.\n   */\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stroker_ParseOutline( FT_Stroker   stroker,\n                           FT_Outline*  outline,\n                           FT_Bool      opened )\n  {\n    FT_Vector   v_last;\n    FT_Vector   v_control;\n    FT_Vector   v_start;\n\n    FT_Vector*  point;\n    FT_Vector*  limit;\n    char*       tags;\n\n    FT_Error    error;\n\n    FT_Int      n;         /* index of contour in outline     */\n    FT_UInt     first;     /* index of first point in contour */\n    FT_Int      tag;       /* current point's state           */\n\n\n    if ( !outline )\n      return FT_THROW( Invalid_Outline );\n\n    if ( !stroker )\n      return FT_THROW( Invalid_Argument );\n\n    FT_Stroker_Rewind( stroker );\n\n    first = 0;\n\n    for ( n = 0; n < outline->n_contours; n++ )\n    {\n      FT_UInt  last;  /* index of last point in contour */\n\n\n      last  = outline->contours[n];\n      limit = outline->points + last;\n\n      /* skip empty points; we don't stroke these */\n      if ( last <= first )\n      {\n        first = last + 1;\n        continue;\n      }\n\n      v_start = outline->points[first];\n      v_last  = outline->points[last];\n\n      v_control = v_start;\n\n      point = outline->points + first;\n      tags  = outline->tags   + first;\n      tag   = FT_CURVE_TAG( tags[0] );\n\n      /* A contour cannot start with a cubic control point! */\n      if ( tag == FT_CURVE_TAG_CUBIC )\n        goto Invalid_Outline;\n\n      /* check first point to determine origin */\n      if ( tag == FT_CURVE_TAG_CONIC )\n      {\n        /* First point is conic control.  Yes, this happens. */\n        if ( FT_CURVE_TAG( outline->tags[last] ) == FT_CURVE_TAG_ON )\n        {\n          /* start at last point if it is on the curve */\n          v_start = v_last;\n          limit--;\n        }\n        else\n        {\n          /* if both first and last points are conic, */\n          /* start at their middle                    */\n          v_start.x = ( v_start.x + v_last.x ) / 2;\n          v_start.y = ( v_start.y + v_last.y ) / 2;\n        }\n        point--;\n        tags--;\n      }\n\n      error = FT_Stroker_BeginSubPath( stroker, &v_start, opened );\n      if ( error )\n        goto Exit;\n\n      while ( point < limit )\n      {\n        point++;\n        tags++;\n\n        tag = FT_CURVE_TAG( tags[0] );\n        switch ( tag )\n        {\n        case FT_CURVE_TAG_ON:  /* emit a single line_to */\n          {\n            FT_Vector  vec;\n\n\n            vec.x = point->x;\n            vec.y = point->y;\n\n            error = FT_Stroker_LineTo( stroker, &vec );\n            if ( error )\n              goto Exit;\n            continue;\n          }\n\n        case FT_CURVE_TAG_CONIC:  /* consume conic arcs */\n          v_control.x = point->x;\n          v_control.y = point->y;\n\n        Do_Conic:\n          if ( point < limit )\n          {\n            FT_Vector  vec;\n            FT_Vector  v_middle;\n\n\n            point++;\n            tags++;\n            tag = FT_CURVE_TAG( tags[0] );\n\n            vec = point[0];\n\n            if ( tag == FT_CURVE_TAG_ON )\n            {\n              error = FT_Stroker_ConicTo( stroker, &v_control, &vec );\n              if ( error )\n                goto Exit;\n              continue;\n            }\n\n            if ( tag != FT_CURVE_TAG_CONIC )\n              goto Invalid_Outline;\n\n            v_middle.x = ( v_control.x + vec.x ) / 2;\n            v_middle.y = ( v_control.y + vec.y ) / 2;\n\n            error = FT_Stroker_ConicTo( stroker, &v_control, &v_middle );\n            if ( error )\n              goto Exit;\n\n            v_control = vec;\n            goto Do_Conic;\n          }\n\n          error = FT_Stroker_ConicTo( stroker, &v_control, &v_start );\n          goto Close;\n\n        default:  /* FT_CURVE_TAG_CUBIC */\n          {\n            FT_Vector  vec1, vec2;\n\n\n            if ( point + 1 > limit                             ||\n                 FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )\n              goto Invalid_Outline;\n\n            point += 2;\n            tags  += 2;\n\n            vec1 = point[-2];\n            vec2 = point[-1];\n\n            if ( point <= limit )\n            {\n              FT_Vector  vec;\n\n\n              vec = point[0];\n\n              error = FT_Stroker_CubicTo( stroker, &vec1, &vec2, &vec );\n              if ( error )\n                goto Exit;\n              continue;\n            }\n\n            error = FT_Stroker_CubicTo( stroker, &vec1, &vec2, &v_start );\n            goto Close;\n          }\n        }\n      }\n\n    Close:\n      if ( error )\n        goto Exit;\n\n      /* don't try to end the path if no segments have been generated */\n      if ( !stroker->first_point )\n      {\n        error = FT_Stroker_EndSubPath( stroker );\n        if ( error )\n          goto Exit;\n      }\n\n      first = last + 1;\n    }\n\n    return FT_Err_Ok;\n\n  Exit:\n    return error;\n\n  Invalid_Outline:\n    return FT_THROW( Invalid_Outline );\n  }\n\n\n  /* declare an extern to access `ft_outline_glyph_class' globally     */\n  /* allocated  in `ftglyph.c', and use the FT_OUTLINE_GLYPH_CLASS_GET */\n  /* macro to access it when FT_CONFIG_OPTION_PIC is defined           */\n#ifndef FT_CONFIG_OPTION_PIC\n  extern const FT_Glyph_Class  ft_outline_glyph_class;\n#endif\n#include \"basepic.h\"\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Glyph_Stroke( FT_Glyph    *pglyph,\n                   FT_Stroker   stroker,\n                   FT_Bool      destroy )\n  {\n    FT_Error  error = FT_ERR( Invalid_Argument );\n    FT_Glyph  glyph = NULL;\n\n    /* for FT_OUTLINE_GLYPH_CLASS_GET (in PIC mode) */\n    FT_Library  library = stroker->library;\n\n    FT_UNUSED( library );\n\n\n    if ( !pglyph )\n      goto Exit;\n\n    glyph = *pglyph;\n    if ( !glyph || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET )\n      goto Exit;\n\n    {\n      FT_Glyph  copy;\n\n\n      error = FT_Glyph_Copy( glyph, &copy );\n      if ( error )\n        goto Exit;\n\n      glyph = copy;\n    }\n\n    {\n      FT_OutlineGlyph  oglyph  = (FT_OutlineGlyph)glyph;\n      FT_Outline*      outline = &oglyph->outline;\n      FT_UInt          num_points, num_contours;\n\n\n      error = FT_Stroker_ParseOutline( stroker, outline, FALSE );\n      if ( error )\n        goto Fail;\n\n      FT_Stroker_GetCounts( stroker, &num_points, &num_contours );\n\n      FT_Outline_Done( glyph->library, outline );\n\n      error = FT_Outline_New( glyph->library,\n                              num_points, num_contours, outline );\n      if ( error )\n        goto Fail;\n\n      outline->n_points   = 0;\n      outline->n_contours = 0;\n\n      FT_Stroker_Export( stroker, outline );\n    }\n\n    if ( destroy )\n      FT_Done_Glyph( *pglyph );\n\n    *pglyph = glyph;\n    goto Exit;\n\n  Fail:\n    FT_Done_Glyph( glyph );\n    glyph = NULL;\n\n    if ( !destroy )\n      *pglyph = NULL;\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftstroke.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Glyph_StrokeBorder( FT_Glyph    *pglyph,\n                         FT_Stroker   stroker,\n                         FT_Bool      inside,\n                         FT_Bool      destroy )\n  {\n    FT_Error  error = FT_ERR( Invalid_Argument );\n    FT_Glyph  glyph = NULL;\n\n    /* for FT_OUTLINE_GLYPH_CLASS_GET (in PIC mode) */\n    FT_Library  library = stroker->library;\n\n    FT_UNUSED( library );\n\n\n    if ( !pglyph )\n      goto Exit;\n\n    glyph = *pglyph;\n    if ( !glyph || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET )\n      goto Exit;\n\n    {\n      FT_Glyph  copy;\n\n\n      error = FT_Glyph_Copy( glyph, &copy );\n      if ( error )\n        goto Exit;\n\n      glyph = copy;\n    }\n\n    {\n      FT_OutlineGlyph   oglyph  = (FT_OutlineGlyph)glyph;\n      FT_StrokerBorder  border;\n      FT_Outline*       outline = &oglyph->outline;\n      FT_UInt           num_points, num_contours;\n\n\n      border = FT_Outline_GetOutsideBorder( outline );\n      if ( inside )\n      {\n        if ( border == FT_STROKER_BORDER_LEFT )\n          border = FT_STROKER_BORDER_RIGHT;\n        else\n          border = FT_STROKER_BORDER_LEFT;\n      }\n\n      error = FT_Stroker_ParseOutline( stroker, outline, FALSE );\n      if ( error )\n        goto Fail;\n\n      FT_Stroker_GetBorderCounts( stroker, border,\n                                  &num_points, &num_contours );\n\n      FT_Outline_Done( glyph->library, outline );\n\n      error = FT_Outline_New( glyph->library,\n                              num_points,\n                              num_contours,\n                              outline );\n      if ( error )\n        goto Fail;\n\n      outline->n_points   = 0;\n      outline->n_contours = 0;\n\n      FT_Stroker_ExportBorder( stroker, border, outline );\n    }\n\n    if ( destroy )\n      FT_Done_Glyph( *pglyph );\n\n    *pglyph = glyph;\n    goto Exit;\n\n  Fail:\n    FT_Done_Glyph( glyph );\n    glyph = NULL;\n\n    if ( !destroy )\n      *pglyph = NULL;\n\n  Exit:\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftsynth.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsynth.c                                                              */\n/*                                                                         */\n/*    FreeType synthesizing code for emboldening and slanting (body).      */\n/*                                                                         */\n/*  Copyright 2000-2006, 2010, 2012-2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_SYNTHESIS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_OUTLINE_H\n#include FT_BITMAP_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_synth\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****   EXPERIMENTAL OBLIQUING SUPPORT                                ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* documentation is in ftsynth.h */\n\n  FT_EXPORT_DEF( void )\n  FT_GlyphSlot_Oblique( FT_GlyphSlot  slot )\n  {\n    FT_Matrix    transform;\n    FT_Outline*  outline;\n\n\n    if ( !slot )\n      return;\n\n    outline = &slot->outline;\n\n    /* only oblique outline glyphs */\n    if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )\n      return;\n\n    /* we don't touch the advance width */\n\n    /* For italic, simply apply a shear transform, with an angle */\n    /* of about 12 degrees.                                      */\n\n    transform.xx = 0x10000L;\n    transform.yx = 0x00000L;\n\n    transform.xy = 0x0366AL;\n    transform.yy = 0x10000L;\n\n    FT_Outline_Transform( outline, &transform );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****   EXPERIMENTAL EMBOLDENING SUPPORT                              ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* documentation is in ftsynth.h */\n\n  FT_EXPORT_DEF( void )\n  FT_GlyphSlot_Embolden( FT_GlyphSlot  slot )\n  {\n    FT_Library  library;\n    FT_Face     face;\n    FT_Error    error;\n    FT_Pos      xstr, ystr;\n\n\n    if ( !slot )\n      return;\n\n    library = slot->library;\n    face    = slot->face;\n\n    if ( slot->format != FT_GLYPH_FORMAT_OUTLINE &&\n         slot->format != FT_GLYPH_FORMAT_BITMAP  )\n      return;\n\n    /* some reasonable strength */\n    xstr = FT_MulFix( face->units_per_EM,\n                      face->size->metrics.y_scale ) / 24;\n    ystr = xstr;\n\n    if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )\n      FT_Outline_EmboldenXY( &slot->outline, xstr, ystr );\n\n    else /* slot->format == FT_GLYPH_FORMAT_BITMAP */\n    {\n      /* round to full pixels */\n      xstr &= ~63;\n      if ( xstr == 0 )\n        xstr = 1 << 6;\n      ystr &= ~63;\n\n      /*\n       * XXX: overflow check for 16-bit system, for compatibility\n       *      with FT_GlyphSlot_Embolden() since freetype-2.1.10.\n       *      unfortunately, this function return no informations\n       *      about the cause of error.\n       */\n      if ( ( ystr >> 6 ) > FT_INT_MAX || ( ystr >> 6 ) < FT_INT_MIN )\n      {\n        FT_TRACE1(( \"FT_GlyphSlot_Embolden:\" ));\n        FT_TRACE1(( \"too strong embolding parameter ystr=%d\\n\", ystr ));\n        return;\n      }\n      error = FT_GlyphSlot_Own_Bitmap( slot );\n      if ( error )\n        return;\n\n      error = FT_Bitmap_Embolden( library, &slot->bitmap, xstr, ystr );\n      if ( error )\n        return;\n    }\n\n    if ( slot->advance.x )\n      slot->advance.x += xstr;\n\n    if ( slot->advance.y )\n      slot->advance.y += ystr;\n\n    slot->metrics.width        += xstr;\n    slot->metrics.height       += ystr;\n    slot->metrics.horiAdvance  += xstr;\n    slot->metrics.vertAdvance  += ystr;\n    slot->metrics.horiBearingY += ystr;\n\n    /* XXX: 16-bit overflow case must be excluded before here */\n    if ( slot->format == FT_GLYPH_FORMAT_BITMAP )\n      slot->bitmap_top += (FT_Int)( ystr >> 6 );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftsystem.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsystem.c                                                             */\n/*                                                                         */\n/*    ANSI-specific FreeType low-level system interface (body).            */\n/*                                                                         */\n/*  Copyright 1996-2002, 2006, 2008-2011, 2013 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file contains the default interface used by FreeType to access   */\n  /* low-level, i.e. memory management, i/o access as well as thread       */\n  /* synchronisation.  It can be replaced by user-specific routines if     */\n  /* necessary.                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_SYSTEM_H\n#include FT_ERRORS_H\n#include FT_TYPES_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                       MEMORY MANAGEMENT INTERFACE                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* It is not necessary to do any error checking for the                  */\n  /* allocation-related functions.  This will be done by the higher level  */\n  /* routines like ft_mem_alloc() or ft_mem_realloc().                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_alloc                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The memory allocation function.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory :: A pointer to the memory object.                          */\n  /*                                                                       */\n  /*    size   :: The requested size in bytes.                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The address of newly allocated block.                              */\n  /*                                                                       */\n  FT_CALLBACK_DEF( void* )\n  ft_alloc( FT_Memory  memory,\n            long       size )\n  {\n    FT_UNUSED( memory );\n\n    return ft_smalloc( size );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_realloc                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The memory reallocation function.                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory   :: A pointer to the memory object.                        */\n  /*                                                                       */\n  /*    cur_size :: The current size of the allocated memory block.        */\n  /*                                                                       */\n  /*    new_size :: The newly requested size in bytes.                     */\n  /*                                                                       */\n  /*    block    :: The current address of the block in memory.            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The address of the reallocated memory block.                       */\n  /*                                                                       */\n  FT_CALLBACK_DEF( void* )\n  ft_realloc( FT_Memory  memory,\n              long       cur_size,\n              long       new_size,\n              void*      block )\n  {\n    FT_UNUSED( memory );\n    FT_UNUSED( cur_size );\n\n    return ft_srealloc( block, new_size );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_free                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The memory release function.                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory  :: A pointer to the memory object.                         */\n  /*                                                                       */\n  /*    block   :: The address of block in memory to be freed.             */\n  /*                                                                       */\n  FT_CALLBACK_DEF( void )\n  ft_free( FT_Memory  memory,\n           void*      block )\n  {\n    FT_UNUSED( memory );\n\n    ft_sfree( block );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                     RESOURCE MANAGEMENT INTERFACE                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_io\n\n  /* We use the macro STREAM_FILE for convenience to extract the       */\n  /* system-specific stream handle from a given FreeType stream object */\n#define STREAM_FILE( stream )  ( (FT_FILE*)stream->descriptor.pointer )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_ansi_stream_close                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The function to close a stream.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream :: A pointer to the stream object.                          */\n  /*                                                                       */\n  FT_CALLBACK_DEF( void )\n  ft_ansi_stream_close( FT_Stream  stream )\n  {\n    ft_fclose( STREAM_FILE( stream ) );\n\n    stream->descriptor.pointer = NULL;\n    stream->size               = 0;\n    stream->base               = 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_ansi_stream_io                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The function to open a stream.                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream :: A pointer to the stream object.                          */\n  /*                                                                       */\n  /*    offset :: The position in the data stream to start reading.        */\n  /*                                                                       */\n  /*    buffer :: The address of buffer to store the read data.            */\n  /*                                                                       */\n  /*    count  :: The number of bytes to read from the stream.             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The number of bytes actually read.  If `count' is zero (this is,   */\n  /*    the function is used for seeking), a non-zero return value         */\n  /*    indicates an error.                                                */\n  /*                                                                       */\n  FT_CALLBACK_DEF( unsigned long )\n  ft_ansi_stream_io( FT_Stream       stream,\n                     unsigned long   offset,\n                     unsigned char*  buffer,\n                     unsigned long   count )\n  {\n    FT_FILE*  file;\n\n\n    if ( !count && offset > stream->size )\n      return 1;\n\n    file = STREAM_FILE( stream );\n\n    if ( stream->pos != offset )\n      ft_fseek( file, offset, SEEK_SET );\n\n    return (unsigned long)ft_fread( buffer, 1, count, file );\n  }\n\n\n  /* documentation is in ftstream.h */\n\n  FT_BASE_DEF( FT_Error )\n  FT_Stream_Open( FT_Stream    stream,\n                  const char*  filepathname )\n  {\n    FT_FILE*  file;\n\n\n    if ( !stream )\n      return FT_THROW( Invalid_Stream_Handle );\n\n    stream->descriptor.pointer = NULL;\n    stream->pathname.pointer   = (char*)filepathname;\n    stream->base               = 0;\n    stream->pos                = 0;\n    stream->read               = NULL;\n    stream->close              = NULL;\n\n    file = ft_fopen( filepathname, \"rb\" );\n    if ( !file )\n    {\n      FT_ERROR(( \"FT_Stream_Open:\"\n                 \" could not open `%s'\\n\", filepathname ));\n\n      return FT_THROW( Cannot_Open_Resource );\n    }\n\n    ft_fseek( file, 0, SEEK_END );\n    stream->size = ft_ftell( file );\n    if ( !stream->size )\n    {\n      FT_ERROR(( \"FT_Stream_Open:\" ));\n      FT_ERROR(( \" opened `%s' but zero-sized\\n\", filepathname ));\n      ft_fclose( file );\n      return FT_THROW( Cannot_Open_Stream );\n    }\n    ft_fseek( file, 0, SEEK_SET );\n\n    stream->descriptor.pointer = file;\n    stream->read  = ft_ansi_stream_io;\n    stream->close = ft_ansi_stream_close;\n\n    FT_TRACE1(( \"FT_Stream_Open:\" ));\n    FT_TRACE1(( \" opened `%s' (%d bytes) successfully\\n\",\n                filepathname, stream->size ));\n\n    return FT_Err_Ok;\n  }\n\n#endif /* !FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */\n\n#ifdef FT_DEBUG_MEMORY\n\n  extern FT_Int\n  ft_mem_debug_init( FT_Memory  memory );\n\n  extern void\n  ft_mem_debug_done( FT_Memory  memory );\n\n#endif\n\n\n  /* documentation is in ftobjs.h */\n\n  FT_BASE_DEF( FT_Memory )\n  FT_New_Memory( void )\n  {\n    FT_Memory  memory;\n\n\n    memory = (FT_Memory)ft_smalloc( sizeof ( *memory ) );\n    if ( memory )\n    {\n      memory->user    = 0;\n      memory->alloc   = ft_alloc;\n      memory->realloc = ft_realloc;\n      memory->free    = ft_free;\n#ifdef FT_DEBUG_MEMORY\n      ft_mem_debug_init( memory );\n#endif\n    }\n\n    return memory;\n  }\n\n\n  /* documentation is in ftobjs.h */\n\n  FT_BASE_DEF( void )\n  FT_Done_Memory( FT_Memory  memory )\n  {\n#ifdef FT_DEBUG_MEMORY\n    ft_mem_debug_done( memory );\n#endif\n    ft_sfree( memory );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/fttrigon.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fttrigon.c                                                             */\n/*                                                                         */\n/*    FreeType trigonometric functions (body).                             */\n/*                                                                         */\n/*  Copyright 2001-2005, 2012-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This is a fixed-point CORDIC implementation of trigonometric          */\n  /* functions as well as transformations between Cartesian and polar      */\n  /* coordinates.  The angles are represented as 16.16 fixed-point values  */\n  /* in degrees, i.e., the angular resolution is 2^-16 degrees.  Note that */\n  /* only vectors longer than 2^16*180/pi (or at least 22 bits) on a       */\n  /* discrete Cartesian grid can have the same or better angular           */\n  /* resolution.  Therefore, to maintain this precision, some functions    */\n  /* require an interim upscaling of the vectors, whereas others operate   */\n  /* with 24-bit long vectors directly.                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_CALC_H\n#include FT_TRIGONOMETRY_H\n\n\n  /* the Cordic shrink factor 0.858785336480436 * 2^32 */\n#define FT_TRIG_SCALE      0xDBD95B16UL\n\n  /* the highest bit in overflow-safe vector components, */\n  /* MSB of 0.858785336480436 * sqrt(0.5) * 2^30         */\n#define FT_TRIG_SAFE_MSB   29\n\n  /* this table was generated for FT_PI = 180L << 16, i.e. degrees */\n#define FT_TRIG_MAX_ITERS  23\n\n  static const FT_Angle\n  ft_trig_arctan_table[] =\n  {\n    1740967L, 919879L, 466945L, 234379L, 117304L, 58666L, 29335L,\n    14668L, 7334L, 3667L, 1833L, 917L, 458L, 229L, 115L,\n    57L, 29L, 14L, 7L, 4L, 2L, 1L\n  };\n\n\n#ifdef FT_LONG64\n\n  /* multiply a given value by the CORDIC shrink factor */\n  static FT_Fixed\n  ft_trig_downscale( FT_Fixed  val )\n  {\n    FT_Int  s = 1;\n\n\n    if ( val < 0 )\n    {\n       val = -val;\n       s = -1;\n    }\n\n    /* 0x40000000 comes from regression analysis between true */\n    /* and CORDIC hypotenuse, so it minimizes the error       */\n    val = (FT_Fixed)( ( (FT_Int64)val * FT_TRIG_SCALE + 0x40000000UL ) >> 32 );\n\n    return s < 0 ? -val : val;\n  }\n\n#else /* !FT_LONG64 */\n\n  /* multiply a given value by the CORDIC shrink factor */\n  static FT_Fixed\n  ft_trig_downscale( FT_Fixed  val )\n  {\n    FT_Int     s = 1;\n    FT_UInt32  lo1, hi1, lo2, hi2, lo, hi, i1, i2;\n\n\n    if ( val < 0 )\n    {\n       val = -val;\n       s = -1;\n    }\n\n    lo1 = val & 0x0000FFFFU;\n    hi1 = val >> 16;\n    lo2 = FT_TRIG_SCALE & 0x0000FFFFU;\n    hi2 = FT_TRIG_SCALE >> 16;\n\n    lo = lo1 * lo2;\n    i1 = lo1 * hi2;\n    i2 = lo2 * hi1;\n    hi = hi1 * hi2;\n\n    /* Check carry overflow of i1 + i2 */\n    i1 += i2;\n    hi += (FT_UInt32)( i1 < i2 ) << 16;\n\n    hi += i1 >> 16;\n    i1  = i1 << 16;\n\n    /* Check carry overflow of i1 + lo */\n    lo += i1;\n    hi += ( lo < i1 );\n\n    /* 0x40000000 comes from regression analysis between true */\n    /* and CORDIC hypotenuse, so it minimizes the error       */\n\n    /* Check carry overflow of lo + 0x40000000 */\n    lo += 0x40000000UL;\n    hi += ( lo < 0x40000000UL );\n\n    val  = (FT_Fixed)hi;\n\n    return s < 0 ? -val : val;\n  }\n\n#endif /* !FT_LONG64 */\n\n\n  /* undefined and never called for zero vector */\n  static FT_Int\n  ft_trig_prenorm( FT_Vector*  vec )\n  {\n    FT_Pos  x, y;\n    FT_Int  shift;\n\n\n    x = vec->x;\n    y = vec->y;\n\n    shift = FT_MSB( FT_ABS( x ) | FT_ABS( y ) );\n\n    if ( shift <= FT_TRIG_SAFE_MSB )\n    {\n      shift  = FT_TRIG_SAFE_MSB - shift;\n      vec->x = (FT_Pos)( (FT_ULong)x << shift );\n      vec->y = (FT_Pos)( (FT_ULong)y << shift );\n    }\n    else\n    {\n      shift -= FT_TRIG_SAFE_MSB;\n      vec->x = x >> shift;\n      vec->y = y >> shift;\n      shift  = -shift;\n    }\n\n    return shift;\n  }\n\n\n  static void\n  ft_trig_pseudo_rotate( FT_Vector*  vec,\n                         FT_Angle    theta )\n  {\n    FT_Int           i;\n    FT_Fixed         x, y, xtemp, b;\n    const FT_Angle  *arctanptr;\n\n\n    x = vec->x;\n    y = vec->y;\n\n    /* Rotate inside [-PI/4,PI/4] sector */\n    while ( theta < -FT_ANGLE_PI4 )\n    {\n      xtemp  =  y;\n      y      = -x;\n      x      =  xtemp;\n      theta +=  FT_ANGLE_PI2;\n    }\n\n    while ( theta > FT_ANGLE_PI4 )\n    {\n      xtemp  = -y;\n      y      =  x;\n      x      =  xtemp;\n      theta -=  FT_ANGLE_PI2;\n    }\n\n    arctanptr = ft_trig_arctan_table;\n\n    /* Pseudorotations, with right shifts */\n    for ( i = 1, b = 1; i < FT_TRIG_MAX_ITERS; b <<= 1, i++ )\n    {\n      if ( theta < 0 )\n      {\n        xtemp  = x + ( ( y + b ) >> i );\n        y      = y - ( ( x + b ) >> i );\n        x      = xtemp;\n        theta += *arctanptr++;\n      }\n      else\n      {\n        xtemp  = x - ( ( y + b ) >> i );\n        y      = y + ( ( x + b ) >> i );\n        x      = xtemp;\n        theta -= *arctanptr++;\n      }\n    }\n\n    vec->x = x;\n    vec->y = y;\n  }\n\n\n  static void\n  ft_trig_pseudo_polarize( FT_Vector*  vec )\n  {\n    FT_Angle         theta;\n    FT_Int           i;\n    FT_Fixed         x, y, xtemp, b;\n    const FT_Angle  *arctanptr;\n\n\n    x = vec->x;\n    y = vec->y;\n\n    /* Get the vector into [-PI/4,PI/4] sector */\n    if ( y > x )\n    {\n      if ( y > -x )\n      {\n        theta =  FT_ANGLE_PI2;\n        xtemp =  y;\n        y     = -x;\n        x     =  xtemp;\n      }\n      else\n      {\n        theta =  y > 0 ? FT_ANGLE_PI : -FT_ANGLE_PI;\n        x     = -x;\n        y     = -y;\n      }\n    }\n    else\n    {\n      if ( y < -x )\n      {\n        theta = -FT_ANGLE_PI2;\n        xtemp = -y;\n        y     =  x;\n        x     =  xtemp;\n      }\n      else\n      {\n        theta = 0;\n      }\n    }\n\n    arctanptr = ft_trig_arctan_table;\n\n    /* Pseudorotations, with right shifts */\n    for ( i = 1, b = 1; i < FT_TRIG_MAX_ITERS; b <<= 1, i++ )\n    {\n      if ( y > 0 )\n      {\n        xtemp  = x + ( ( y + b ) >> i );\n        y      = y - ( ( x + b ) >> i );\n        x      = xtemp;\n        theta += *arctanptr++;\n      }\n      else\n      {\n        xtemp  = x - ( ( y + b ) >> i );\n        y      = y + ( ( x + b ) >> i );\n        x      = xtemp;\n        theta -= *arctanptr++;\n      }\n    }\n\n    /* round theta to acknowledge its error that mostly comes */\n    /* from accumulated rounding errors in the arctan table   */\n    if ( theta >= 0 )\n      theta = FT_PAD_ROUND( theta, 16 );\n    else\n      theta = -FT_PAD_ROUND( -theta, 16 );\n\n    vec->x = x;\n    vec->y = theta;\n  }\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( FT_Fixed )\n  FT_Cos( FT_Angle  angle )\n  {\n    FT_Vector  v;\n\n\n    v.x = FT_TRIG_SCALE >> 8;\n    v.y = 0;\n    ft_trig_pseudo_rotate( &v, angle );\n\n    return ( v.x + 0x80L ) >> 8;\n  }\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( FT_Fixed )\n  FT_Sin( FT_Angle  angle )\n  {\n    return FT_Cos( FT_ANGLE_PI2 - angle );\n  }\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( FT_Fixed )\n  FT_Tan( FT_Angle  angle )\n  {\n    FT_Vector  v;\n\n\n    v.x = FT_TRIG_SCALE >> 8;\n    v.y = 0;\n    ft_trig_pseudo_rotate( &v, angle );\n\n    return FT_DivFix( v.y, v.x );\n  }\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( FT_Angle )\n  FT_Atan2( FT_Fixed  dx,\n            FT_Fixed  dy )\n  {\n    FT_Vector  v;\n\n\n    if ( dx == 0 && dy == 0 )\n      return 0;\n\n    v.x = dx;\n    v.y = dy;\n    ft_trig_prenorm( &v );\n    ft_trig_pseudo_polarize( &v );\n\n    return v.y;\n  }\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Vector_Unit( FT_Vector*  vec,\n                  FT_Angle    angle )\n  {\n    if ( !vec )\n      return;\n\n    vec->x = FT_TRIG_SCALE >> 8;\n    vec->y = 0;\n    ft_trig_pseudo_rotate( vec, angle );\n    vec->x = ( vec->x + 0x80L ) >> 8;\n    vec->y = ( vec->y + 0x80L ) >> 8;\n  }\n\n\n  /* these macros return 0 for positive numbers,\n     and -1 for negative ones */\n#define FT_SIGN_LONG( x )   ( (x) >> ( FT_SIZEOF_LONG * 8 - 1 ) )\n#define FT_SIGN_INT( x )    ( (x) >> ( FT_SIZEOF_INT * 8 - 1 ) )\n#define FT_SIGN_INT32( x )  ( (x) >> 31 )\n#define FT_SIGN_INT16( x )  ( (x) >> 15 )\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Vector_Rotate( FT_Vector*  vec,\n                    FT_Angle    angle )\n  {\n    FT_Int     shift;\n    FT_Vector  v;\n\n\n    if ( !vec )\n      return;\n\n    v.x   = vec->x;\n    v.y   = vec->y;\n\n    if ( angle && ( v.x != 0 || v.y != 0 ) )\n    {\n      shift = ft_trig_prenorm( &v );\n      ft_trig_pseudo_rotate( &v, angle );\n      v.x = ft_trig_downscale( v.x );\n      v.y = ft_trig_downscale( v.y );\n\n      if ( shift > 0 )\n      {\n        FT_Int32  half = (FT_Int32)1L << ( shift - 1 );\n\n\n        vec->x = ( v.x + half + FT_SIGN_LONG( v.x ) ) >> shift;\n        vec->y = ( v.y + half + FT_SIGN_LONG( v.y ) ) >> shift;\n      }\n      else\n      {\n        shift  = -shift;\n        vec->x = (FT_Pos)( (FT_ULong)v.x << shift );\n        vec->y = (FT_Pos)( (FT_ULong)v.y << shift );\n      }\n    }\n  }\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( FT_Fixed )\n  FT_Vector_Length( FT_Vector*  vec )\n  {\n    FT_Int     shift;\n    FT_Vector  v;\n\n\n    if ( !vec )\n      return 0;\n\n    v = *vec;\n\n    /* handle trivial cases */\n    if ( v.x == 0 )\n    {\n      return FT_ABS( v.y );\n    }\n    else if ( v.y == 0 )\n    {\n      return FT_ABS( v.x );\n    }\n\n    /* general case */\n    shift = ft_trig_prenorm( &v );\n    ft_trig_pseudo_polarize( &v );\n\n    v.x = ft_trig_downscale( v.x );\n\n    if ( shift > 0 )\n      return ( v.x + ( 1 << ( shift - 1 ) ) ) >> shift;\n\n    return (FT_Fixed)( (FT_UInt32)v.x << -shift );\n  }\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Vector_Polarize( FT_Vector*  vec,\n                      FT_Fixed   *length,\n                      FT_Angle   *angle )\n  {\n    FT_Int     shift;\n    FT_Vector  v;\n\n\n    if ( !vec || !length || !angle )\n      return;\n\n    v = *vec;\n\n    if ( v.x == 0 && v.y == 0 )\n      return;\n\n    shift = ft_trig_prenorm( &v );\n    ft_trig_pseudo_polarize( &v );\n\n    v.x = ft_trig_downscale( v.x );\n\n    *length = shift >= 0 ?                      ( v.x >>  shift )\n                         : (FT_Fixed)( (FT_UInt32)v.x << -shift );\n    *angle  = v.y;\n  }\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( void )\n  FT_Vector_From_Polar( FT_Vector*  vec,\n                        FT_Fixed    length,\n                        FT_Angle    angle )\n  {\n    if ( !vec )\n      return;\n\n    vec->x = length;\n    vec->y = 0;\n\n    FT_Vector_Rotate( vec, angle );\n  }\n\n\n  /* documentation is in fttrigon.h */\n\n  FT_EXPORT_DEF( FT_Angle )\n  FT_Angle_Diff( FT_Angle  angle1,\n                 FT_Angle  angle2 )\n  {\n    FT_Angle  delta = angle2 - angle1;\n\n\n    delta %= FT_ANGLE_2PI;\n    if ( delta < 0 )\n      delta += FT_ANGLE_2PI;\n\n    if ( delta > FT_ANGLE_PI )\n      delta -= FT_ANGLE_2PI;\n\n    return delta;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/fttype1.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fttype1.c                                                              */\n/*                                                                         */\n/*    FreeType utility file for PS names support (body).                   */\n/*                                                                         */\n/*  Copyright 2002-2004, 2011, 2014 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_SERVICE_H\n#include FT_SERVICE_POSTSCRIPT_INFO_H\n\n\n  /* documentation is in t1tables.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_PS_Font_Info( FT_Face          face,\n                       PS_FontInfoRec*  afont_info )\n  {\n    FT_Error           error;\n    FT_Service_PsInfo  service;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !afont_info )\n      return FT_THROW( Invalid_Argument );\n\n    FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );\n\n    if ( service && service->ps_get_font_info )\n      error = service->ps_get_font_info( face, afont_info );\n    else\n      error = FT_THROW( Invalid_Argument );\n\n    return error;\n  }\n\n\n  /* documentation is in t1tables.h */\n\n  FT_EXPORT_DEF( FT_Int )\n  FT_Has_PS_Glyph_Names( FT_Face  face )\n  {\n    FT_Int             result = 0;\n    FT_Service_PsInfo  service;\n\n\n    if ( face )\n    {\n      FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );\n\n      if ( service && service->ps_has_glyph_names )\n        result = service->ps_has_glyph_names( face );\n    }\n\n    return result;\n  }\n\n\n  /* documentation is in t1tables.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_PS_Font_Private( FT_Face         face,\n                          PS_PrivateRec*  afont_private )\n  {\n    FT_Error           error;\n    FT_Service_PsInfo  service;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !afont_private )\n      return FT_THROW( Invalid_Argument );\n\n    FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );\n\n    if ( service && service->ps_get_font_private )\n      error = service->ps_get_font_private( face, afont_private );\n    else\n      error = FT_THROW( Invalid_Argument );\n\n    return error;\n  }\n\n\n  /* documentation is in t1tables.h */\n\n  FT_EXPORT_DEF( FT_Long )\n  FT_Get_PS_Font_Value( FT_Face       face,\n                        PS_Dict_Keys  key,\n                        FT_UInt       idx,\n                        void         *value,\n                        FT_Long       value_len )\n  {\n    FT_Int             result  = 0;\n    FT_Service_PsInfo  service = NULL;\n\n\n    if ( face )\n    {\n      FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );\n\n      if ( service && service->ps_get_font_value )\n        result = service->ps_get_font_value( face, key, idx,\n                                             value, value_len );\n    }\n\n    return result;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftutil.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftutil.c                                                               */\n/*                                                                         */\n/*    FreeType utility file for memory and list management (body).         */\n/*                                                                         */\n/*  Copyright 2002, 2004-2007, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_MEMORY_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_LIST_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_memory\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                                                               *****/\n  /*****               M E M O R Y   M A N A G E M E N T               *****/\n  /*****                                                               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_BASE_DEF( FT_Pointer )\n  ft_mem_alloc( FT_Memory  memory,\n                FT_Long    size,\n                FT_Error  *p_error )\n  {\n    FT_Error    error;\n    FT_Pointer  block = ft_mem_qalloc( memory, size, &error );\n\n    if ( !error && size > 0 )\n      FT_MEM_ZERO( block, size );\n\n    *p_error = error;\n    return block;\n  }\n\n\n  FT_BASE_DEF( FT_Pointer )\n  ft_mem_qalloc( FT_Memory  memory,\n                 FT_Long    size,\n                 FT_Error  *p_error )\n  {\n    FT_Error    error = FT_Err_Ok;\n    FT_Pointer  block = NULL;\n\n\n    if ( size > 0 )\n    {\n      block = memory->alloc( memory, size );\n      if ( block == NULL )\n        error = FT_THROW( Out_Of_Memory );\n    }\n    else if ( size < 0 )\n    {\n      /* may help catch/prevent security issues */\n      error = FT_THROW( Invalid_Argument );\n    }\n\n    *p_error = error;\n    return block;\n  }\n\n\n  FT_BASE_DEF( FT_Pointer )\n  ft_mem_realloc( FT_Memory  memory,\n                  FT_Long    item_size,\n                  FT_Long    cur_count,\n                  FT_Long    new_count,\n                  void*      block,\n                  FT_Error  *p_error )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    block = ft_mem_qrealloc( memory, item_size,\n                             cur_count, new_count, block, &error );\n    if ( !error && new_count > cur_count )\n      FT_MEM_ZERO( (char*)block + cur_count * item_size,\n                   ( new_count - cur_count ) * item_size );\n\n    *p_error = error;\n    return block;\n  }\n\n\n  FT_BASE_DEF( FT_Pointer )\n  ft_mem_qrealloc( FT_Memory  memory,\n                   FT_Long    item_size,\n                   FT_Long    cur_count,\n                   FT_Long    new_count,\n                   void*      block,\n                   FT_Error  *p_error )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    /* Note that we now accept `item_size == 0' as a valid parameter, in\n     * order to cover very weird cases where an ALLOC_MULT macro would be\n     * called.\n     */\n    if ( cur_count < 0 || new_count < 0 || item_size < 0 )\n    {\n      /* may help catch/prevent nasty security issues */\n      error = FT_THROW( Invalid_Argument );\n    }\n    else if ( new_count == 0 || item_size == 0 )\n    {\n      ft_mem_free( memory, block );\n      block = NULL;\n    }\n    else if ( new_count > FT_INT_MAX/item_size )\n    {\n      error = FT_THROW( Array_Too_Large );\n    }\n    else if ( cur_count == 0 )\n    {\n      FT_ASSERT( block == NULL );\n\n      block = ft_mem_alloc( memory, new_count*item_size, &error );\n    }\n    else\n    {\n      FT_Pointer  block2;\n      FT_Long     cur_size = cur_count*item_size;\n      FT_Long     new_size = new_count*item_size;\n\n\n      block2 = memory->realloc( memory, cur_size, new_size, block );\n      if ( block2 == NULL )\n        error = FT_THROW( Out_Of_Memory );\n      else\n        block = block2;\n    }\n\n    *p_error = error;\n    return block;\n  }\n\n\n  FT_BASE_DEF( void )\n  ft_mem_free( FT_Memory   memory,\n               const void *P )\n  {\n    if ( P )\n      memory->free( memory, (void*)P );\n  }\n\n\n  FT_BASE_DEF( FT_Pointer )\n  ft_mem_dup( FT_Memory    memory,\n              const void*  address,\n              FT_ULong     size,\n              FT_Error    *p_error )\n  {\n    FT_Error    error;\n    FT_Pointer  p = ft_mem_qalloc( memory, size, &error );\n\n\n    if ( !error && address )\n      ft_memcpy( p, address, size );\n\n    *p_error = error;\n    return p;\n  }\n\n\n  FT_BASE_DEF( FT_Pointer )\n  ft_mem_strdup( FT_Memory    memory,\n                 const char*  str,\n                 FT_Error    *p_error )\n  {\n    FT_ULong  len = str ? (FT_ULong)ft_strlen( str ) + 1\n                        : 0;\n\n\n    return ft_mem_dup( memory, str, len, p_error );\n  }\n\n\n  FT_BASE_DEF( FT_Int )\n  ft_mem_strcpyn( char*        dst,\n                  const char*  src,\n                  FT_ULong     size )\n  {\n    while ( size > 1 && *src != 0 )\n    {\n      *dst++ = *src++;\n      size--;\n    }\n\n    *dst = 0;  /* always zero-terminate */\n\n    return *src != 0;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                                                               *****/\n  /*****            D O U B L Y   L I N K E D   L I S T S              *****/\n  /*****                                                               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_list\n\n  /* documentation is in ftlist.h */\n\n  FT_EXPORT_DEF( FT_ListNode )\n  FT_List_Find( FT_List  list,\n                void*    data )\n  {\n    FT_ListNode  cur;\n\n\n    if ( !list )\n      return NULL;\n\n    cur = list->head;\n    while ( cur )\n    {\n      if ( cur->data == data )\n        return cur;\n\n      cur = cur->next;\n    }\n\n    return NULL;\n  }\n\n\n  /* documentation is in ftlist.h */\n\n  FT_EXPORT_DEF( void )\n  FT_List_Add( FT_List      list,\n               FT_ListNode  node )\n  {\n    FT_ListNode  before;\n\n\n    if ( !list || !node )\n      return;\n\n    before = list->tail;\n\n    node->next = 0;\n    node->prev = before;\n\n    if ( before )\n      before->next = node;\n    else\n      list->head = node;\n\n    list->tail = node;\n  }\n\n\n  /* documentation is in ftlist.h */\n\n  FT_EXPORT_DEF( void )\n  FT_List_Insert( FT_List      list,\n                  FT_ListNode  node )\n  {\n    FT_ListNode  after;\n\n\n    if ( !list || !node )\n      return;\n\n    after = list->head;\n\n    node->next = after;\n    node->prev = 0;\n\n    if ( !after )\n      list->tail = node;\n    else\n      after->prev = node;\n\n    list->head = node;\n  }\n\n\n  /* documentation is in ftlist.h */\n\n  FT_EXPORT_DEF( void )\n  FT_List_Remove( FT_List      list,\n                  FT_ListNode  node )\n  {\n    FT_ListNode  before, after;\n\n\n    if ( !list || !node )\n      return;\n\n    before = node->prev;\n    after  = node->next;\n\n    if ( before )\n      before->next = after;\n    else\n      list->head = after;\n\n    if ( after )\n      after->prev = before;\n    else\n      list->tail = before;\n  }\n\n\n  /* documentation is in ftlist.h */\n\n  FT_EXPORT_DEF( void )\n  FT_List_Up( FT_List      list,\n              FT_ListNode  node )\n  {\n    FT_ListNode  before, after;\n\n\n    if ( !list || !node )\n      return;\n\n    before = node->prev;\n    after  = node->next;\n\n    /* check whether we are already on top of the list */\n    if ( !before )\n      return;\n\n    before->next = after;\n\n    if ( after )\n      after->prev = before;\n    else\n      list->tail = before;\n\n    node->prev       = 0;\n    node->next       = list->head;\n    list->head->prev = node;\n    list->head       = node;\n  }\n\n\n  /* documentation is in ftlist.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_List_Iterate( FT_List           list,\n                   FT_List_Iterator  iterator,\n                   void*             user )\n  {\n    FT_ListNode  cur;\n    FT_Error     error = FT_Err_Ok;\n\n\n    if ( !list || !iterator )\n      return FT_THROW( Invalid_Argument );\n\n    cur = list->head;\n\n    while ( cur )\n    {\n      FT_ListNode  next = cur->next;\n\n\n      error = iterator( cur, user );\n      if ( error )\n        break;\n\n      cur = next;\n    }\n\n    return error;\n  }\n\n\n  /* documentation is in ftlist.h */\n\n  FT_EXPORT_DEF( void )\n  FT_List_Finalize( FT_List             list,\n                    FT_List_Destructor  destroy,\n                    FT_Memory           memory,\n                    void*               user )\n  {\n    FT_ListNode  cur;\n\n\n    if ( !list || !memory )\n      return;\n\n    cur = list->head;\n    while ( cur )\n    {\n      FT_ListNode  next = cur->next;\n      void*        data = cur->data;\n\n\n      if ( destroy )\n        destroy( memory, data, user );\n\n      FT_FREE( cur );\n      cur = next;\n    }\n\n    list->head = 0;\n    list->tail = 0;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftwinfnt.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftwinfnt.c                                                             */\n/*                                                                         */\n/*    FreeType API for accessing Windows FNT specific info (body).         */\n/*                                                                         */\n/*  Copyright 2003, 2004, 2014 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_WINFONTS_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_WINFNT_H\n\n\n  /* documentation is in ftwinfnt.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Get_WinFNT_Header( FT_Face               face,\n                        FT_WinFNT_HeaderRec  *header )\n  {\n    FT_Service_WinFnt  service;\n    FT_Error           error;\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( !header )\n      return FT_THROW( Invalid_Argument );\n\n    FT_FACE_LOOKUP_SERVICE( face, service, WINFNT );\n\n    if ( service )\n      error = service->get_header( face, header );\n    else\n      error = FT_THROW( Invalid_Argument );\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/ftxf86.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftxf86.c                                                               */\n/*                                                                         */\n/*    FreeType utility file for X11 support (body).                        */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2004 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_XFREE86_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_XFREE86_NAME_H\n\n\n  /* documentation is in ftxf86.h */\n\n  FT_EXPORT_DEF( const char* )\n  FT_Get_X11_Font_Format( FT_Face  face )\n  {\n    const char*  result = NULL;\n\n\n    if ( face )\n      FT_FACE_FIND_SERVICE( face, result, XF86_NAME );\n\n    return result;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/md5.c",
    "content": "/*\n * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.\n * MD5 Message-Digest Algorithm (RFC 1321).\n *\n * Homepage:\n * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5\n *\n * Author:\n * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>\n *\n * This software was written by Alexander Peslyak in 2001.  No copyright is\n * claimed, and the software is hereby placed in the public domain.\n * In case this attempt to disclaim copyright and place the software in the\n * public domain is deemed null and void, then the software is\n * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the\n * general public under the following terms:\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted.\n *\n * There's ABSOLUTELY NO WARRANTY, express or implied.\n *\n * (This is a heavily cut-down \"BSD license\".)\n *\n * This differs from Colin Plumb's older public domain implementation in that\n * no exactly 32-bit integer data type is required (any 32-bit or wider\n * unsigned integer data type will do), there's no compile-time endianness\n * configuration, and the function prototypes match OpenSSL's.  No code from\n * Colin Plumb's implementation has been reused; this comment merely compares\n * the properties of the two independent implementations.\n *\n * The primary goals of this implementation are portability and ease of use.\n * It is meant to be fast, but not as fast as possible.  Some known\n * optimizations are not included to reduce source code size and avoid\n * compile-time configuration.\n */\n\n#ifndef HAVE_OPENSSL\n\n#include <string.h>\n\n#include \"md5.h\"\n\n/*\n * The basic MD5 functions.\n *\n * F and G are optimized compared to their RFC 1321 definitions for\n * architectures that lack an AND-NOT instruction, just like in Colin Plumb's\n * implementation.\n */\n#define F(x, y, z)\t\t\t((z) ^ ((x) & ((y) ^ (z))))\n#define G(x, y, z)\t\t\t((y) ^ ((z) & ((x) ^ (y))))\n#define H(x, y, z)\t\t\t(((x) ^ (y)) ^ (z))\n#define H2(x, y, z)\t\t\t((x) ^ ((y) ^ (z)))\n#define I(x, y, z)\t\t\t((y) ^ ((x) | ~(z)))\n\n/*\n * The MD5 transformation for all four rounds.\n */\n#define STEP(f, a, b, c, d, x, t, s) \\\n\t(a) += f((b), (c), (d)) + (x) + (t); \\\n\t(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \\\n\t(a) += (b);\n\n/*\n * SET reads 4 input bytes in little-endian byte order and stores them\n * in a properly aligned word in host byte order.\n *\n * The check for little-endian architectures that tolerate unaligned\n * memory accesses is just an optimization.  Nothing will break if it\n * doesn't work.\n */\n#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)\n#define SET(n) \\\n\t(*(MD5_u32plus *)&ptr[(n) * 4])\n#define GET(n) \\\n\tSET(n)\n#else\n#define SET(n) \\\n\t(ctx->block[(n)] = \\\n\t(MD5_u32plus)ptr[(n) * 4] | \\\n\t((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \\\n\t((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \\\n\t((MD5_u32plus)ptr[(n) * 4 + 3] << 24))\n#define GET(n) \\\n\t(ctx->block[(n)])\n#endif\n\n/*\n * This processes one or more 64-byte data blocks, but does NOT update\n * the bit counters.  There are no alignment requirements.\n */\nstatic const void *body(MD5_CTX *ctx, const void *data, unsigned long size)\n{\n\tconst unsigned char *ptr;\n\tMD5_u32plus a, b, c, d;\n\tMD5_u32plus saved_a, saved_b, saved_c, saved_d;\n\n\tptr = (const unsigned char *)data;\n\n\ta = ctx->a;\n\tb = ctx->b;\n\tc = ctx->c;\n\td = ctx->d;\n\n\tdo {\n\t\tsaved_a = a;\n\t\tsaved_b = b;\n\t\tsaved_c = c;\n\t\tsaved_d = d;\n\n/* Round 1 */\n\t\tSTEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)\n\t\tSTEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)\n\t\tSTEP(F, c, d, a, b, SET(2), 0x242070db, 17)\n\t\tSTEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)\n\t\tSTEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)\n\t\tSTEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)\n\t\tSTEP(F, c, d, a, b, SET(6), 0xa8304613, 17)\n\t\tSTEP(F, b, c, d, a, SET(7), 0xfd469501, 22)\n\t\tSTEP(F, a, b, c, d, SET(8), 0x698098d8, 7)\n\t\tSTEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)\n\t\tSTEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)\n\t\tSTEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)\n\t\tSTEP(F, a, b, c, d, SET(12), 0x6b901122, 7)\n\t\tSTEP(F, d, a, b, c, SET(13), 0xfd987193, 12)\n\t\tSTEP(F, c, d, a, b, SET(14), 0xa679438e, 17)\n\t\tSTEP(F, b, c, d, a, SET(15), 0x49b40821, 22)\n\n/* Round 2 */\n\t\tSTEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)\n\t\tSTEP(G, d, a, b, c, GET(6), 0xc040b340, 9)\n\t\tSTEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)\n\t\tSTEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)\n\t\tSTEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)\n\t\tSTEP(G, d, a, b, c, GET(10), 0x02441453, 9)\n\t\tSTEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)\n\t\tSTEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)\n\t\tSTEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)\n\t\tSTEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)\n\t\tSTEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)\n\t\tSTEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)\n\t\tSTEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)\n\t\tSTEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)\n\t\tSTEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)\n\t\tSTEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)\n\n/* Round 3 */\n\t\tSTEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)\n\t\tSTEP(H2, d, a, b, c, GET(8), 0x8771f681, 11)\n\t\tSTEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)\n\t\tSTEP(H2, b, c, d, a, GET(14), 0xfde5380c, 23)\n\t\tSTEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)\n\t\tSTEP(H2, d, a, b, c, GET(4), 0x4bdecfa9, 11)\n\t\tSTEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)\n\t\tSTEP(H2, b, c, d, a, GET(10), 0xbebfbc70, 23)\n\t\tSTEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)\n\t\tSTEP(H2, d, a, b, c, GET(0), 0xeaa127fa, 11)\n\t\tSTEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)\n\t\tSTEP(H2, b, c, d, a, GET(6), 0x04881d05, 23)\n\t\tSTEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)\n\t\tSTEP(H2, d, a, b, c, GET(12), 0xe6db99e5, 11)\n\t\tSTEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)\n\t\tSTEP(H2, b, c, d, a, GET(2), 0xc4ac5665, 23)\n\n/* Round 4 */\n\t\tSTEP(I, a, b, c, d, GET(0), 0xf4292244, 6)\n\t\tSTEP(I, d, a, b, c, GET(7), 0x432aff97, 10)\n\t\tSTEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)\n\t\tSTEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)\n\t\tSTEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)\n\t\tSTEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)\n\t\tSTEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)\n\t\tSTEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)\n\t\tSTEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)\n\t\tSTEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)\n\t\tSTEP(I, c, d, a, b, GET(6), 0xa3014314, 15)\n\t\tSTEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)\n\t\tSTEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)\n\t\tSTEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)\n\t\tSTEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)\n\t\tSTEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)\n\n\t\ta += saved_a;\n\t\tb += saved_b;\n\t\tc += saved_c;\n\t\td += saved_d;\n\n\t\tptr += 64;\n\t} while (size -= 64);\n\n\tctx->a = a;\n\tctx->b = b;\n\tctx->c = c;\n\tctx->d = d;\n\n\treturn ptr;\n}\n\nvoid MD5_Init(MD5_CTX *ctx)\n{\n\tctx->a = 0x67452301;\n\tctx->b = 0xefcdab89;\n\tctx->c = 0x98badcfe;\n\tctx->d = 0x10325476;\n\n\tctx->lo = 0;\n\tctx->hi = 0;\n}\n\nvoid MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)\n{\n\tMD5_u32plus saved_lo;\n\tunsigned long used, available;\n\n\tsaved_lo = ctx->lo;\n\tif ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)\n\t\tctx->hi++;\n\tctx->hi += size >> 29;\n\n\tused = saved_lo & 0x3f;\n\n\tif (used) {\n\t\tavailable = 64 - used;\n\n\t\tif (size < available) {\n\t\t\tmemcpy(&ctx->buffer[used], data, size);\n\t\t\treturn;\n\t\t}\n\n\t\tmemcpy(&ctx->buffer[used], data, available);\n\t\tdata = (const unsigned char *)data + available;\n\t\tsize -= available;\n\t\tbody(ctx, ctx->buffer, 64);\n\t}\n\n\tif (size >= 64) {\n\t\tdata = body(ctx, data, size & ~(unsigned long)0x3f);\n\t\tsize &= 0x3f;\n\t}\n\n\tmemcpy(ctx->buffer, data, size);\n}\n\nvoid MD5_Final(unsigned char *result, MD5_CTX *ctx)\n{\n\tunsigned long used, available;\n\n\tused = ctx->lo & 0x3f;\n\n\tctx->buffer[used++] = 0x80;\n\n\tavailable = 64 - used;\n\n\tif (available < 8) {\n\t\tmemset(&ctx->buffer[used], 0, available);\n\t\tbody(ctx, ctx->buffer, 64);\n\t\tused = 0;\n\t\tavailable = 64;\n\t}\n\n\tmemset(&ctx->buffer[used], 0, available - 8);\n\n\tctx->lo <<= 3;\n\tctx->buffer[56] = ctx->lo;\n\tctx->buffer[57] = ctx->lo >> 8;\n\tctx->buffer[58] = ctx->lo >> 16;\n\tctx->buffer[59] = ctx->lo >> 24;\n\tctx->buffer[60] = ctx->hi;\n\tctx->buffer[61] = ctx->hi >> 8;\n\tctx->buffer[62] = ctx->hi >> 16;\n\tctx->buffer[63] = ctx->hi >> 24;\n\n\tbody(ctx, ctx->buffer, 64);\n\n\tresult[0] = ctx->a;\n\tresult[1] = ctx->a >> 8;\n\tresult[2] = ctx->a >> 16;\n\tresult[3] = ctx->a >> 24;\n\tresult[4] = ctx->b;\n\tresult[5] = ctx->b >> 8;\n\tresult[6] = ctx->b >> 16;\n\tresult[7] = ctx->b >> 24;\n\tresult[8] = ctx->c;\n\tresult[9] = ctx->c >> 8;\n\tresult[10] = ctx->c >> 16;\n\tresult[11] = ctx->c >> 24;\n\tresult[12] = ctx->d;\n\tresult[13] = ctx->d >> 8;\n\tresult[14] = ctx->d >> 16;\n\tresult[15] = ctx->d >> 24;\n\n\tmemset(ctx, 0, sizeof(*ctx));\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/base/md5.h",
    "content": "/*\n * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.\n * MD5 Message-Digest Algorithm (RFC 1321).\n *\n * Homepage:\n * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5\n *\n * Author:\n * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>\n *\n * This software was written by Alexander Peslyak in 2001.  No copyright is\n * claimed, and the software is hereby placed in the public domain.\n * In case this attempt to disclaim copyright and place the software in the\n * public domain is deemed null and void, then the software is\n * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the\n * general public under the following terms:\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted.\n *\n * There's ABSOLUTELY NO WARRANTY, express or implied.\n *\n * See md5.c for more information.\n */\n\n#ifdef HAVE_OPENSSL\n#include <openssl/md5.h>\n#elif !defined(_MD5_H)\n#define _MD5_H\n\n/* Any 32-bit or wider unsigned integer data type will do */\ntypedef unsigned int MD5_u32plus;\n\ntypedef struct {\n\tMD5_u32plus lo, hi;\n\tMD5_u32plus a, b, c, d;\n\tunsigned char buffer[64];\n\tMD5_u32plus block[16];\n} MD5_CTX;\n\nextern void MD5_Init(MD5_CTX *ctx);\nextern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size);\nextern void MD5_Final(unsigned char *result, MD5_CTX *ctx);\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/bdf/README",
    "content": "                  FreeType font driver for BDF fonts\n\n                       Francesco Zappa Nardelli\n                  <francesco.zappa.nardelli@ens.fr>\n\n\nIntroduction\n************\n\nBDF (Bitmap Distribution Format) is a bitmap font format defined by Adobe,\nwhich is intended to be easily understood by both humans and computers.\nThis code implements a BDF driver for the FreeType library, following the\nAdobe Specification V 2.2.  The specification of the BDF font format is\navailable from Adobe's web site:\n\n  http://partners.adobe.com/public/developer/en/font/5005.BDF_Spec.pdf\n\nMany good bitmap fonts in bdf format come with XFree86 (www.XFree86.org).\nThey do not define vertical metrics, because the X Consortium BDF\nspecification has removed them.\n\n\nEncodings\n*********\n\nThe variety of encodings that accompanies bdf fonts appears to encompass the\nsmall set defined in freetype.h.  On the other hand, two properties that\nspecify encoding and registry are usually defined in bdf fonts.\n\nI decided to make these two properties directly accessible, leaving to the\nclient application the work of interpreting them.  For instance:\n\n\n  #include FT_INTERNAL_BDF_TYPES_H\n\n  FT_Face          face;\n  BDF_Public_Face  bdfface;\n\n\n  FT_New_Face( library, ..., &face );\n\n  bdfface = (BDF_Public_Face)face;\n\n  if ( ( bdfface->charset_registry == \"ISO10646\" ) &&\n       ( bdfface->charset_encoding == \"1\" )        )\n    [..]\n\n\nThus the driver always exports `ft_encoding_none' as face->charmap.encoding.\nFT_Get_Char_Index's behavior is unmodified, that is, it converts the ULong\nvalue given as argument into the corresponding glyph number.\n\nIf the two properties are not available, Adobe Standard Encoding should be\nassumed.\n\n\nAnti-Aliased Bitmaps\n********************\n\nThe driver supports an extension to the BDF format as used in Mark Leisher's\nxmbdfed bitmap font editor.  Microsoft's SBIT tool expects bitmap fonts in\nthat format for adding anti-aliased them to TrueType fonts.  It introduces a\nfourth field to the `SIZE' keyword which gives the bpp value (bits per\npixel) of the glyph data in the font.  Possible values are 1 (the default),\n2 (four gray levels), 4 (16 gray levels), and 8 (256 gray levels).  The\ndriver returns either a bitmap with 1 bit per pixel or a pixmap with 8bits\nper pixel (using 4, 16, and 256 gray levels, respectively).\n\n\nKnown problems\n**************\n\n- A font is entirely loaded into memory.  Obviously, this is not the Right\n  Thing(TM).  If you have big fonts I suggest you convert them into PCF\n  format (using the bdftopcf utility): the PCF font drive of FreeType can\n  perform incremental glyph loading.\n\nWhen I have some time, I will implement on-demand glyph parsing.\n\n- Except for encodings properties, client applications have no visibility of\n  the PCF_Face object.  This means that applications cannot directly access\n  font tables and must trust FreeType.\n\n- Currently, glyph names are ignored.\n\n  I plan to give full visibility of the BDF_Face object in an upcoming\n  revision of the driver, thus implementing also glyph names.\n\n- As I have never seen a BDF font that defines vertical metrics, vertical\n  metrics are (parsed and) discarded.  If you own a BDF font that defines\n  vertical metrics, please let me know (I will implement them in 5-10\n  minutes).\n\n\nLicense\n*******\n\nCopyright (C) 2001-2002 by Francesco Zappa Nardelli\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*** Portions of the driver (that is, bdflib.c and bdf.h):\n\nCopyright 2000 Computing Research Labs, New Mexico State University\nCopyright 2001-2002, 2011 Francesco Zappa Nardelli\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies 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\nTHE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT\nOR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR\nTHE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\nCredits\n*******\n\nThis driver is based on excellent Mark Leisher's bdf library.  If you\nfind something good in this driver you should probably thank him, not\nme.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/bdf/bdf.c",
    "content": "/*  bdf.c\n\n    FreeType font driver for bdf files\n\n    Copyright (C) 2001, 2002 by\n    Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"bdflib.c\"\n#include \"bdfdrivr.c\"\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/bdf/bdf.h",
    "content": "/*\n * Copyright 2000 Computing Research Labs, New Mexico State University\n * Copyright 2001-2004, 2011 Francesco Zappa Nardelli\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT\n * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR\n * THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n#ifndef __BDF_H__\n#define __BDF_H__\n\n\n/*\n * Based on bdf.h,v 1.16 2000/03/16 20:08:51 mleisher\n */\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_STREAM_H\n\n\nFT_BEGIN_HEADER\n\n\n/* Imported from bdfP.h */\n\n#define _bdf_glyph_modified( map, e )                 \\\n          ( (map)[(e) >> 5] & ( 1 << ( (e) & 31 ) ) )\n#define _bdf_set_glyph_modified( map, e )              \\\n          ( (map)[(e) >> 5] |= ( 1 << ( (e) & 31 ) ) )\n#define _bdf_clear_glyph_modified( map, e )             \\\n          ( (map)[(e) >> 5] &= ~( 1 << ( (e) & 31 ) ) )\n\n/* end of bdfP.h */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* BDF font options macros and types.                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#define BDF_CORRECT_METRICS  0x01 /* Correct invalid metrics when loading. */\n#define BDF_KEEP_COMMENTS    0x02 /* Preserve the font comments.           */\n#define BDF_KEEP_UNENCODED   0x04 /* Keep the unencoded glyphs.            */\n#define BDF_PROPORTIONAL     0x08 /* Font has proportional spacing.        */\n#define BDF_MONOWIDTH        0x10 /* Font has mono width.                  */\n#define BDF_CHARCELL         0x20 /* Font has charcell spacing.            */\n\n#define BDF_ALL_SPACING  ( BDF_PROPORTIONAL | \\\n                           BDF_MONOWIDTH    | \\\n                           BDF_CHARCELL     )\n\n#define BDF_DEFAULT_LOAD_OPTIONS  ( BDF_CORRECT_METRICS | \\\n                                    BDF_KEEP_COMMENTS   | \\\n                                    BDF_KEEP_UNENCODED  | \\\n                                    BDF_PROPORTIONAL    )\n\n\n  typedef struct  bdf_options_t_\n  {\n    int            correct_metrics;\n    int            keep_unencoded;\n    int            keep_comments;\n    int            font_spacing;\n\n  } bdf_options_t;\n\n\n  /* Callback function type for unknown configuration options. */\n  typedef int\n  (*bdf_options_callback_t)( bdf_options_t*  opts,\n                             char**          params,\n                             unsigned long   nparams,\n                             void*           client_data );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* BDF font property macros and types.                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#define BDF_ATOM      1\n#define BDF_INTEGER   2\n#define BDF_CARDINAL  3\n\n\n  /* This structure represents a particular property of a font. */\n  /* There are a set of defaults and each font has their own.   */\n  typedef struct  bdf_property_t_\n  {\n    char*  name;         /* Name of the property.   */\n    int    format;       /* Format of the property. */\n    int    builtin;      /* A builtin property.     */\n    union\n    {\n      char*          atom;\n      long           l;\n      unsigned long  ul;\n\n    } value;             /* Value of the property.  */\n\n  } bdf_property_t;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* BDF font metric and glyph types.                                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  typedef struct  bdf_bbx_t_\n  {\n    unsigned short  width;\n    unsigned short  height;\n\n    short           x_offset;\n    short           y_offset;\n\n    short           ascent;\n    short           descent;\n\n  } bdf_bbx_t;\n\n\n  typedef struct  bdf_glyph_t_\n  {\n    char*           name;        /* Glyph name.                          */\n    long            encoding;    /* Glyph encoding.                      */\n    unsigned short  swidth;      /* Scalable width.                      */\n    unsigned short  dwidth;      /* Device width.                        */\n    bdf_bbx_t       bbx;         /* Glyph bounding box.                  */\n    unsigned char*  bitmap;      /* Glyph bitmap.                        */\n    unsigned long   bpr;         /* Number of bytes used per row.        */\n    unsigned short  bytes;       /* Number of bytes used for the bitmap. */\n\n  } bdf_glyph_t;\n\n\n  typedef struct  _hashnode_\n  {\n    const char*  key;\n    size_t       data;\n\n  } _hashnode, *hashnode;\n\n\n  typedef struct  hashtable_\n  {\n    int        limit;\n    int        size;\n    int        used;\n    hashnode*  table;\n\n  } hashtable;\n\n\n  typedef struct  bdf_glyphlist_t_\n  {\n    unsigned short  pad;          /* Pad to 4-byte boundary.              */\n    unsigned short  bpp;          /* Bits per pixel.                      */\n    long            start;        /* Beginning encoding value of glyphs.  */\n    long            end;          /* Ending encoding value of glyphs.     */\n    bdf_glyph_t*    glyphs;       /* Glyphs themselves.                   */\n    unsigned long   glyphs_size;  /* Glyph structures allocated.          */\n    unsigned long   glyphs_used;  /* Glyph structures used.               */\n    bdf_bbx_t       bbx;          /* Overall bounding box of glyphs.      */\n\n  } bdf_glyphlist_t;\n\n\n  typedef struct  bdf_font_t_\n  {\n    char*            name;           /* Name of the font.                   */\n    bdf_bbx_t        bbx;            /* Font bounding box.                  */\n\n    long             point_size;     /* Point size of the font.             */\n    unsigned long    resolution_x;   /* Font horizontal resolution.         */\n    unsigned long    resolution_y;   /* Font vertical resolution.           */\n\n    int              spacing;        /* Font spacing value.                 */\n\n    unsigned short   monowidth;      /* Logical width for monowidth font.   */\n\n    long             default_char;   /* Encoding of the default glyph.      */\n\n    long             font_ascent;    /* Font ascent.                        */\n    long             font_descent;   /* Font descent.                       */\n\n    unsigned long    glyphs_size;    /* Glyph structures allocated.         */\n    unsigned long    glyphs_used;    /* Glyph structures used.              */\n    bdf_glyph_t*     glyphs;         /* Glyphs themselves.                  */\n\n    unsigned long    unencoded_size; /* Unencoded glyph struct. allocated.  */\n    unsigned long    unencoded_used; /* Unencoded glyph struct. used.       */\n    bdf_glyph_t*     unencoded;      /* Unencoded glyphs themselves.        */\n\n    unsigned long    props_size;     /* Font properties allocated.          */\n    unsigned long    props_used;     /* Font properties used.               */\n    bdf_property_t*  props;          /* Font properties themselves.         */\n\n    char*            comments;       /* Font comments.                      */\n    unsigned long    comments_len;   /* Length of comment string.           */\n\n    bdf_glyphlist_t  overflow;       /* Storage used for glyph insertion.   */\n\n    void*            internal;       /* Internal data for the font.         */\n\n    /* The size of the next two arrays must be in sync with the */\n    /* size of the `have' array in the `bdf_parse_t' structure. */\n    unsigned long    nmod[34816];    /* Bitmap indicating modified glyphs.  */\n    unsigned long    umod[34816];    /* Bitmap indicating modified          */\n                                     /* unencoded glyphs.                   */\n    unsigned short   modified;       /* Boolean indicating font modified.   */\n    unsigned short   bpp;            /* Bits per pixel.                     */\n\n    FT_Memory        memory;\n\n    bdf_property_t*  user_props;\n    unsigned long    nuser_props;\n    hashtable        proptbl;\n\n  } bdf_font_t;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Types for load/save callbacks.                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* Error codes. */\n#define BDF_MISSING_START       -1\n#define BDF_MISSING_FONTNAME    -2\n#define BDF_MISSING_SIZE        -3\n#define BDF_MISSING_CHARS       -4\n#define BDF_MISSING_STARTCHAR   -5\n#define BDF_MISSING_ENCODING    -6\n#define BDF_MISSING_BBX         -7\n\n#define BDF_OUT_OF_MEMORY      -20\n\n#define BDF_INVALID_LINE      -100\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* BDF font API.                                                         */\n  /*                                                                       */\n  /*************************************************************************/\n\n  FT_LOCAL( FT_Error )\n  bdf_load_font( FT_Stream       stream,\n                 FT_Memory       memory,\n                 bdf_options_t*  opts,\n                 bdf_font_t*    *font );\n\n  FT_LOCAL( void )\n  bdf_free_font( bdf_font_t*  font );\n\n  FT_LOCAL( bdf_property_t * )\n  bdf_get_property( char*        name,\n                    bdf_font_t*  font );\n\n  FT_LOCAL( bdf_property_t * )\n  bdf_get_font_property( bdf_font_t*  font,\n                         const char*  name );\n\n\nFT_END_HEADER\n\n\n#endif /* __BDF_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/bdf/bdfdrivr.c",
    "content": "/*  bdfdrivr.c\n\n    FreeType font driver for bdf files\n\n    Copyright (C) 2001-2008, 2011, 2013, 2014 by\n    Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n#include <ft2build.h>\n\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_BDF_H\n#include FT_TRUETYPE_IDS_H\n\n#include FT_SERVICE_BDF_H\n#include FT_SERVICE_XFREE86_NAME_H\n\n#include \"bdf.h\"\n#include \"bdfdrivr.h\"\n\n#include \"bdferror.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_bdfdriver\n\n\n  typedef struct  BDF_CMapRec_\n  {\n    FT_CMapRec        cmap;\n    FT_ULong          num_encodings; /* ftobjs.h: FT_CMap->clazz->size */\n    BDF_encoding_el*  encodings;\n\n  } BDF_CMapRec, *BDF_CMap;\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  bdf_cmap_init( FT_CMap     bdfcmap,\n                 FT_Pointer  init_data )\n  {\n    BDF_CMap  cmap = (BDF_CMap)bdfcmap;\n    BDF_Face  face = (BDF_Face)FT_CMAP_FACE( cmap );\n    FT_UNUSED( init_data );\n\n\n    cmap->num_encodings = face->bdffont->glyphs_used;\n    cmap->encodings     = face->en_table;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  bdf_cmap_done( FT_CMap  bdfcmap )\n  {\n    BDF_CMap  cmap = (BDF_CMap)bdfcmap;\n\n\n    cmap->encodings     = NULL;\n    cmap->num_encodings = 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  bdf_cmap_char_index( FT_CMap    bdfcmap,\n                       FT_UInt32  charcode )\n  {\n    BDF_CMap          cmap      = (BDF_CMap)bdfcmap;\n    BDF_encoding_el*  encodings = cmap->encodings;\n    FT_ULong          min, max, mid; /* num_encodings */\n    FT_UShort         result    = 0; /* encodings->glyph */\n\n\n    min = 0;\n    max = cmap->num_encodings;\n\n    while ( min < max )\n    {\n      FT_ULong  code;\n\n\n      mid  = ( min + max ) >> 1;\n      code = encodings[mid].enc;\n\n      if ( charcode == code )\n      {\n        /* increase glyph index by 1 --              */\n        /* we reserve slot 0 for the undefined glyph */\n        result = encodings[mid].glyph + 1;\n        break;\n      }\n\n      if ( charcode < code )\n        max = mid;\n      else\n        min = mid + 1;\n    }\n\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  bdf_cmap_char_next( FT_CMap     bdfcmap,\n                      FT_UInt32  *acharcode )\n  {\n    BDF_CMap          cmap      = (BDF_CMap)bdfcmap;\n    BDF_encoding_el*  encodings = cmap->encodings;\n    FT_ULong          min, max, mid; /* num_encodings */\n    FT_UShort         result   = 0;  /* encodings->glyph */\n    FT_ULong          charcode = *acharcode + 1;\n\n\n    min = 0;\n    max = cmap->num_encodings;\n\n    while ( min < max )\n    {\n      FT_ULong  code; /* same as BDF_encoding_el.enc */\n\n\n      mid  = ( min + max ) >> 1;\n      code = encodings[mid].enc;\n\n      if ( charcode == code )\n      {\n        /* increase glyph index by 1 --              */\n        /* we reserve slot 0 for the undefined glyph */\n        result = encodings[mid].glyph + 1;\n        goto Exit;\n      }\n\n      if ( charcode < code )\n        max = mid;\n      else\n        min = mid + 1;\n    }\n\n    charcode = 0;\n    if ( min < cmap->num_encodings )\n    {\n      charcode = encodings[min].enc;\n      result   = encodings[min].glyph + 1;\n    }\n\n  Exit:\n    if ( charcode > 0xFFFFFFFFUL )\n    {\n      FT_TRACE1(( \"bdf_cmap_char_next: charcode 0x%x > 32bit API\" ));\n      *acharcode = 0;\n      /* XXX: result should be changed to indicate an overflow error */\n    }\n    else\n      *acharcode = (FT_UInt32)charcode;\n    return result;\n  }\n\n\n  static\n  const FT_CMap_ClassRec  bdf_cmap_class =\n  {\n    sizeof ( BDF_CMapRec ),\n    bdf_cmap_init,\n    bdf_cmap_done,\n    bdf_cmap_char_index,\n    bdf_cmap_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  };\n\n\n  static FT_Error\n  bdf_interpret_style( BDF_Face  bdf )\n  {\n    FT_Error         error  = FT_Err_Ok;\n    FT_Face          face   = FT_FACE( bdf );\n    FT_Memory        memory = face->memory;\n    bdf_font_t*      font   = bdf->bdffont;\n    bdf_property_t*  prop;\n\n    char*   strings[4] = { NULL, NULL, NULL, NULL };\n    size_t  nn, len, lengths[4];\n\n\n    face->style_flags = 0;\n\n    prop = bdf_get_font_property( font, (char *)\"SLANT\" );\n    if ( prop && prop->format == BDF_ATOM                             &&\n         prop->value.atom                                             &&\n         ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' ||\n           *(prop->value.atom) == 'I' || *(prop->value.atom) == 'i' ) )\n    {\n      face->style_flags |= FT_STYLE_FLAG_ITALIC;\n      strings[2] = ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' )\n                   ? (char *)\"Oblique\"\n                   : (char *)\"Italic\";\n    }\n\n    prop = bdf_get_font_property( font, (char *)\"WEIGHT_NAME\" );\n    if ( prop && prop->format == BDF_ATOM                             &&\n         prop->value.atom                                             &&\n         ( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) )\n    {\n      face->style_flags |= FT_STYLE_FLAG_BOLD;\n      strings[1] = (char *)\"Bold\";\n    }\n\n    prop = bdf_get_font_property( font, (char *)\"SETWIDTH_NAME\" );\n    if ( prop && prop->format == BDF_ATOM                              &&\n         prop->value.atom && *(prop->value.atom)                       &&\n         !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )\n      strings[3] = (char *)(prop->value.atom);\n\n    prop = bdf_get_font_property( font, (char *)\"ADD_STYLE_NAME\" );\n    if ( prop && prop->format == BDF_ATOM                              &&\n         prop->value.atom && *(prop->value.atom)                       &&\n         !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )\n      strings[0] = (char *)(prop->value.atom);\n\n    for ( len = 0, nn = 0; nn < 4; nn++ )\n    {\n      lengths[nn] = 0;\n      if ( strings[nn] )\n      {\n        lengths[nn] = ft_strlen( strings[nn] );\n        len        += lengths[nn] + 1;\n      }\n    }\n\n    if ( len == 0 )\n    {\n      strings[0] = (char *)\"Regular\";\n      lengths[0] = ft_strlen( strings[0] );\n      len        = lengths[0] + 1;\n    }\n\n    {\n      char*  s;\n\n\n      if ( FT_ALLOC( face->style_name, len ) )\n        return error;\n\n      s = face->style_name;\n\n      for ( nn = 0; nn < 4; nn++ )\n      {\n        char*  src = strings[nn];\n\n\n        len = lengths[nn];\n\n        if ( src == NULL )\n          continue;\n\n        /* separate elements with a space */\n        if ( s != face->style_name )\n          *s++ = ' ';\n\n        ft_memcpy( s, src, len );\n\n        /* need to convert spaces to dashes for */\n        /* add_style_name and setwidth_name     */\n        if ( nn == 0 || nn == 3 )\n        {\n          size_t  mm;\n\n\n          for ( mm = 0; mm < len; mm++ )\n            if ( s[mm] == ' ' )\n              s[mm] = '-';\n        }\n\n        s += len;\n      }\n      *s = 0;\n    }\n\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  BDF_Face_Done( FT_Face  bdfface )         /* BDF_Face */\n  {\n    BDF_Face   face = (BDF_Face)bdfface;\n    FT_Memory  memory;\n\n\n    if ( !face )\n      return;\n\n    memory = FT_FACE_MEMORY( face );\n\n    bdf_free_font( face->bdffont );\n\n    FT_FREE( face->en_table );\n\n    FT_FREE( face->charset_encoding );\n    FT_FREE( face->charset_registry );\n    FT_FREE( bdfface->family_name );\n    FT_FREE( bdfface->style_name );\n\n    FT_FREE( bdfface->available_sizes );\n\n    FT_FREE( face->bdffont );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  BDF_Face_Init( FT_Stream      stream,\n                 FT_Face        bdfface,        /* BDF_Face */\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params )\n  {\n    FT_Error       error  = FT_Err_Ok;\n    BDF_Face       face   = (BDF_Face)bdfface;\n    FT_Memory      memory = FT_FACE_MEMORY( face );\n\n    bdf_font_t*    font = NULL;\n    bdf_options_t  options;\n\n    FT_UNUSED( num_params );\n    FT_UNUSED( params );\n\n\n    FT_TRACE2(( \"BDF driver\\n\" ));\n\n    if ( FT_STREAM_SEEK( 0 ) )\n      goto Exit;\n\n    options.correct_metrics = 1;   /* FZ XXX: options semantics */\n    options.keep_unencoded  = 1;\n    options.keep_comments   = 0;\n    options.font_spacing    = BDF_PROPORTIONAL;\n\n    error = bdf_load_font( stream, memory, &options, &font );\n    if ( FT_ERR_EQ( error, Missing_Startfont_Field ) )\n    {\n      FT_TRACE2(( \"  not a BDF file\\n\" ));\n      goto Fail;\n    }\n    else if ( error )\n      goto Exit;\n\n    /* we have a bdf font: let's construct the face object */\n    face->bdffont = font;\n\n    /* BDF could not have multiple face in single font file.\n     * XXX: non-zero face_index is already invalid argument, but\n     *      Type1, Type42 driver has a convention to return\n     *      an invalid argument error when the font could be\n     *      opened by the specified driver.\n     */\n    if ( face_index > 0 ) {\n      FT_ERROR(( \"BDF_Face_Init: invalid face index\\n\" ));\n      BDF_Face_Done( bdfface );\n      return FT_THROW( Invalid_Argument );\n    }\n\n    {\n      bdf_property_t*  prop = NULL;\n\n\n      FT_TRACE4(( \"  number of glyphs: allocated %d (used %d)\\n\",\n                  font->glyphs_size,\n                  font->glyphs_used ));\n      FT_TRACE4(( \"  number of unencoded glyphs: allocated %d (used %d)\\n\",\n                  font->unencoded_size,\n                  font->unencoded_used ));\n\n      bdfface->num_faces  = 1;\n      bdfface->face_index = 0;\n\n      bdfface->face_flags |= FT_FACE_FLAG_FIXED_SIZES |\n                             FT_FACE_FLAG_HORIZONTAL  |\n                             FT_FACE_FLAG_FAST_GLYPHS;\n\n      prop = bdf_get_font_property( font, \"SPACING\" );\n      if ( prop && prop->format == BDF_ATOM                             &&\n           prop->value.atom                                             &&\n           ( *(prop->value.atom) == 'M' || *(prop->value.atom) == 'm' ||\n             *(prop->value.atom) == 'C' || *(prop->value.atom) == 'c' ) )\n        bdfface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;\n\n      /* FZ XXX: TO DO: FT_FACE_FLAGS_VERTICAL   */\n      /* FZ XXX: I need a font to implement this */\n\n      prop = bdf_get_font_property( font, \"FAMILY_NAME\" );\n      if ( prop && prop->value.atom )\n      {\n        if ( FT_STRDUP( bdfface->family_name, prop->value.atom ) )\n          goto Exit;\n      }\n      else\n        bdfface->family_name = 0;\n\n      if ( ( error = bdf_interpret_style( face ) ) != 0 )\n        goto Exit;\n\n      /* the number of glyphs (with one slot for the undefined glyph */\n      /* at position 0 and all unencoded glyphs)                     */\n      bdfface->num_glyphs = font->glyphs_size + 1;\n\n      bdfface->num_fixed_sizes = 1;\n      if ( FT_NEW_ARRAY( bdfface->available_sizes, 1 ) )\n        goto Exit;\n\n      {\n        FT_Bitmap_Size*  bsize = bdfface->available_sizes;\n        FT_Short         resolution_x = 0, resolution_y = 0;\n\n\n        FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );\n\n        bsize->height = (FT_Short)( font->font_ascent + font->font_descent );\n\n        prop = bdf_get_font_property( font, \"AVERAGE_WIDTH\" );\n        if ( prop )\n          bsize->width = (FT_Short)( ( prop->value.l + 5 ) / 10 );\n        else\n          bsize->width = (FT_Short)( bsize->height * 2/3 );\n\n        prop = bdf_get_font_property( font, \"POINT_SIZE\" );\n        if ( prop )\n          /* convert from 722.7 decipoints to 72 points per inch */\n          bsize->size =\n            (FT_Pos)( ( prop->value.l * 64 * 7200 + 36135L ) / 72270L );\n        else\n          bsize->size = bsize->width << 6;\n\n        prop = bdf_get_font_property( font, \"PIXEL_SIZE\" );\n        if ( prop )\n          bsize->y_ppem = (FT_Short)prop->value.l << 6;\n\n        prop = bdf_get_font_property( font, \"RESOLUTION_X\" );\n        if ( prop )\n          resolution_x = (FT_Short)prop->value.l;\n\n        prop = bdf_get_font_property( font, \"RESOLUTION_Y\" );\n        if ( prop )\n          resolution_y = (FT_Short)prop->value.l;\n\n        if ( bsize->y_ppem == 0 )\n        {\n          bsize->y_ppem = bsize->size;\n          if ( resolution_y )\n            bsize->y_ppem = bsize->y_ppem * resolution_y / 72;\n        }\n        if ( resolution_x && resolution_y )\n          bsize->x_ppem = bsize->y_ppem * resolution_x / resolution_y;\n        else\n          bsize->x_ppem = bsize->y_ppem;\n      }\n\n      /* encoding table */\n      {\n        bdf_glyph_t*   cur = font->glyphs;\n        unsigned long  n;\n\n\n        if ( FT_NEW_ARRAY( face->en_table, font->glyphs_size ) )\n          goto Exit;\n\n        face->default_glyph = 0;\n        for ( n = 0; n < font->glyphs_size; n++ )\n        {\n          (face->en_table[n]).enc = cur[n].encoding;\n          FT_TRACE4(( \"  idx %d, val 0x%lX\\n\", n, cur[n].encoding ));\n          (face->en_table[n]).glyph = (FT_Short)n;\n\n          if ( cur[n].encoding == font->default_char )\n          {\n            if ( n < FT_UINT_MAX )\n              face->default_glyph = (FT_UInt)n;\n            else\n              FT_TRACE1(( \"BDF_Face_Init:\"\n                          \" idx %d is too large for this system\\n\", n ));\n          }\n        }\n      }\n\n      /* charmaps */\n      {\n        bdf_property_t  *charset_registry = 0, *charset_encoding = 0;\n        FT_Bool          unicode_charmap  = 0;\n\n\n        charset_registry =\n          bdf_get_font_property( font, \"CHARSET_REGISTRY\" );\n        charset_encoding =\n          bdf_get_font_property( font, \"CHARSET_ENCODING\" );\n        if ( charset_registry && charset_encoding )\n        {\n          if ( charset_registry->format == BDF_ATOM &&\n               charset_encoding->format == BDF_ATOM &&\n               charset_registry->value.atom         &&\n               charset_encoding->value.atom         )\n          {\n            const char*  s;\n\n\n            if ( FT_STRDUP( face->charset_encoding,\n                            charset_encoding->value.atom ) ||\n                 FT_STRDUP( face->charset_registry,\n                            charset_registry->value.atom ) )\n              goto Exit;\n\n            /* Uh, oh, compare first letters manually to avoid dependency */\n            /* on locales.                                                */\n            s = face->charset_registry;\n            if ( ( s[0] == 'i' || s[0] == 'I' ) &&\n                 ( s[1] == 's' || s[1] == 'S' ) &&\n                 ( s[2] == 'o' || s[2] == 'O' ) )\n            {\n              s += 3;\n              if ( !ft_strcmp( s, \"10646\" )                      ||\n                   ( !ft_strcmp( s, \"8859\" ) &&\n                     !ft_strcmp( face->charset_encoding, \"1\" ) ) )\n              unicode_charmap = 1;\n            }\n\n            {\n              FT_CharMapRec  charmap;\n\n\n              charmap.face        = FT_FACE( face );\n              charmap.encoding    = FT_ENCODING_NONE;\n              /* initial platform/encoding should indicate unset status? */\n              charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;\n              charmap.encoding_id = TT_APPLE_ID_DEFAULT;\n\n              if ( unicode_charmap )\n              {\n                charmap.encoding    = FT_ENCODING_UNICODE;\n                charmap.platform_id = TT_PLATFORM_MICROSOFT;\n                charmap.encoding_id = TT_MS_ID_UNICODE_CS;\n              }\n\n              error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );\n\n#if 0\n              /* Select default charmap */\n              if ( bdfface->num_charmaps )\n                bdfface->charmap = bdfface->charmaps[0];\n#endif\n            }\n\n            goto Exit;\n          }\n        }\n\n        /* otherwise assume Adobe standard encoding */\n\n        {\n          FT_CharMapRec  charmap;\n\n\n          charmap.face        = FT_FACE( face );\n          charmap.encoding    = FT_ENCODING_ADOBE_STANDARD;\n          charmap.platform_id = TT_PLATFORM_ADOBE;\n          charmap.encoding_id = TT_ADOBE_ID_STANDARD;\n\n          error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );\n\n          /* Select default charmap */\n          if ( bdfface->num_charmaps )\n            bdfface->charmap = bdfface->charmaps[0];\n        }\n      }\n    }\n\n  Exit:\n    return error;\n\n  Fail:\n    BDF_Face_Done( bdfface );\n    return FT_THROW( Unknown_File_Format );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  BDF_Size_Select( FT_Size   size,\n                   FT_ULong  strike_index )\n  {\n    bdf_font_t*  bdffont = ( (BDF_Face)size->face )->bdffont;\n\n\n    FT_Select_Metrics( size->face, strike_index );\n\n    size->metrics.ascender    = bdffont->font_ascent << 6;\n    size->metrics.descender   = -bdffont->font_descent << 6;\n    size->metrics.max_advance = bdffont->bbx.width << 6;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  BDF_Size_Request( FT_Size          size,\n                    FT_Size_Request  req )\n  {\n    FT_Face          face    = size->face;\n    FT_Bitmap_Size*  bsize   = face->available_sizes;\n    bdf_font_t*      bdffont = ( (BDF_Face)face )->bdffont;\n    FT_Error         error   = FT_ERR( Invalid_Pixel_Size );\n    FT_Long          height;\n\n\n    height = FT_REQUEST_HEIGHT( req );\n    height = ( height + 32 ) >> 6;\n\n    switch ( req->type )\n    {\n    case FT_SIZE_REQUEST_TYPE_NOMINAL:\n      if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) )\n        error = FT_Err_Ok;\n      break;\n\n    case FT_SIZE_REQUEST_TYPE_REAL_DIM:\n      if ( height == ( bdffont->font_ascent +\n                       bdffont->font_descent ) )\n        error = FT_Err_Ok;\n      break;\n\n    default:\n      error = FT_THROW( Unimplemented_Feature );\n      break;\n    }\n\n    if ( error )\n      return error;\n    else\n      return BDF_Size_Select( size, 0 );\n  }\n\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  BDF_Glyph_Load( FT_GlyphSlot  slot,\n                  FT_Size       size,\n                  FT_UInt       glyph_index,\n                  FT_Int32      load_flags )\n  {\n    BDF_Face     bdf    = (BDF_Face)FT_SIZE_FACE( size );\n    FT_Face      face   = FT_FACE( bdf );\n    FT_Error     error  = FT_Err_Ok;\n    FT_Bitmap*   bitmap = &slot->bitmap;\n    bdf_glyph_t  glyph;\n    int          bpp    = bdf->bdffont->bpp;\n\n    FT_UNUSED( load_flags );\n\n\n    if ( !face )\n    {\n      error = FT_THROW( Invalid_Face_Handle );\n      goto Exit;\n    }\n\n    if ( glyph_index >= (FT_UInt)face->num_glyphs )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    FT_TRACE1(( \"BDF_Glyph_Load: glyph index %d\\n\", glyph_index ));\n\n    /* index 0 is the undefined glyph */\n    if ( glyph_index == 0 )\n      glyph_index = bdf->default_glyph;\n    else\n      glyph_index--;\n\n    /* slot, bitmap => freetype, glyph => bdflib */\n    glyph = bdf->bdffont->glyphs[glyph_index];\n\n    bitmap->rows  = glyph.bbx.height;\n    bitmap->width = glyph.bbx.width;\n    if ( glyph.bpr > INT_MAX )\n      FT_TRACE1(( \"BDF_Glyph_Load: too large pitch %d is truncated\\n\",\n                   glyph.bpr ));\n    bitmap->pitch = (int)glyph.bpr; /* same as FT_Bitmap.pitch */\n\n    /* note: we don't allocate a new array to hold the bitmap; */\n    /*       we can simply point to it                         */\n    ft_glyphslot_set_bitmap( slot, glyph.bitmap );\n\n    switch ( bpp )\n    {\n    case 1:\n      bitmap->pixel_mode = FT_PIXEL_MODE_MONO;\n      break;\n    case 2:\n      bitmap->pixel_mode = FT_PIXEL_MODE_GRAY2;\n      break;\n    case 4:\n      bitmap->pixel_mode = FT_PIXEL_MODE_GRAY4;\n      break;\n    case 8:\n      bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;\n      bitmap->num_grays  = 256;\n      break;\n    }\n\n    slot->format      = FT_GLYPH_FORMAT_BITMAP;\n    slot->bitmap_left = glyph.bbx.x_offset;\n    slot->bitmap_top  = glyph.bbx.ascent;\n\n    slot->metrics.horiAdvance  = glyph.dwidth << 6;\n    slot->metrics.horiBearingX = glyph.bbx.x_offset << 6;\n    slot->metrics.horiBearingY = glyph.bbx.ascent << 6;\n    slot->metrics.width        = bitmap->width << 6;\n    slot->metrics.height       = bitmap->rows << 6;\n\n    /*\n     * XXX DWIDTH1 and VVECTOR should be parsed and\n     * used here, provided such fonts do exist.\n     */\n    ft_synthesize_vertical_metrics( &slot->metrics,\n                                    bdf->bdffont->bbx.height << 6 );\n\n  Exit:\n    return error;\n  }\n\n\n /*\n  *\n  *  BDF SERVICE\n  *\n  */\n\n  static FT_Error\n  bdf_get_bdf_property( BDF_Face          face,\n                        const char*       prop_name,\n                        BDF_PropertyRec  *aproperty )\n  {\n    bdf_property_t*  prop;\n\n\n    FT_ASSERT( face && face->bdffont );\n\n    prop = bdf_get_font_property( face->bdffont, prop_name );\n    if ( prop )\n    {\n      switch ( prop->format )\n      {\n      case BDF_ATOM:\n        aproperty->type   = BDF_PROPERTY_TYPE_ATOM;\n        aproperty->u.atom = prop->value.atom;\n        break;\n\n      case BDF_INTEGER:\n        if ( prop->value.l > 0x7FFFFFFFL || prop->value.l < ( -1 - 0x7FFFFFFFL ) )\n        {\n          FT_TRACE1(( \"bdf_get_bdf_property:\"\n                      \" too large integer 0x%x is truncated\\n\" ));\n        }\n        aproperty->type      = BDF_PROPERTY_TYPE_INTEGER;\n        aproperty->u.integer = (FT_Int32)prop->value.l;\n        break;\n\n      case BDF_CARDINAL:\n        if ( prop->value.ul > 0xFFFFFFFFUL )\n        {\n          FT_TRACE1(( \"bdf_get_bdf_property:\"\n                      \" too large cardinal 0x%x is truncated\\n\" ));\n        }\n        aproperty->type       = BDF_PROPERTY_TYPE_CARDINAL;\n        aproperty->u.cardinal = (FT_UInt32)prop->value.ul;\n        break;\n\n      default:\n        goto Fail;\n      }\n      return 0;\n    }\n\n  Fail:\n    return FT_THROW( Invalid_Argument );\n  }\n\n\n  static FT_Error\n  bdf_get_charset_id( BDF_Face      face,\n                      const char*  *acharset_encoding,\n                      const char*  *acharset_registry )\n  {\n    *acharset_encoding = face->charset_encoding;\n    *acharset_registry = face->charset_registry;\n\n    return 0;\n  }\n\n\n  static const FT_Service_BDFRec  bdf_service_bdf =\n  {\n    (FT_BDF_GetCharsetIdFunc)bdf_get_charset_id,\n    (FT_BDF_GetPropertyFunc) bdf_get_bdf_property\n  };\n\n\n /*\n  *\n  *  SERVICES LIST\n  *\n  */\n\n  static const FT_ServiceDescRec  bdf_services[] =\n  {\n    { FT_SERVICE_ID_BDF,       &bdf_service_bdf },\n    { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_BDF },\n    { NULL, NULL }\n  };\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  bdf_driver_requester( FT_Module    module,\n                        const char*  name )\n  {\n    FT_UNUSED( module );\n\n    return ft_service_list_lookup( bdf_services, name );\n  }\n\n\n\n  FT_CALLBACK_TABLE_DEF\n  const FT_Driver_ClassRec  bdf_driver_class =\n  {\n    {\n      FT_MODULE_FONT_DRIVER         |\n      FT_MODULE_DRIVER_NO_OUTLINES,\n      sizeof ( FT_DriverRec ),\n\n      \"bdf\",\n      0x10000L,\n      0x20000L,\n\n      0,\n\n      0,                        /* FT_Module_Constructor */\n      0,                        /* FT_Module_Destructor  */\n      bdf_driver_requester\n    },\n\n    sizeof ( BDF_FaceRec ),\n    sizeof ( FT_SizeRec ),\n    sizeof ( FT_GlyphSlotRec ),\n\n    BDF_Face_Init,\n    BDF_Face_Done,\n    0,                          /* FT_Size_InitFunc */\n    0,                          /* FT_Size_DoneFunc */\n    0,                          /* FT_Slot_InitFunc */\n    0,                          /* FT_Slot_DoneFunc */\n\n    BDF_Glyph_Load,\n\n    0,                          /* FT_Face_GetKerningFunc  */\n    0,                          /* FT_Face_AttachFunc      */\n    0,                          /* FT_Face_GetAdvancesFunc */\n\n    BDF_Size_Request,\n    BDF_Size_Select\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/bdf/bdfdrivr.h",
    "content": "/*  bdfdrivr.h\n\n    FreeType font driver for bdf fonts\n\n  Copyright (C) 2001, 2002, 2003, 2004 by\n  Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n\n#ifndef __BDFDRIVR_H__\n#define __BDFDRIVR_H__\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n\n#include \"bdf.h\"\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n\n  typedef struct  BDF_encoding_el_\n  {\n    FT_ULong   enc;\n    FT_UShort  glyph;\n\n  } BDF_encoding_el;\n\n\n  typedef struct  BDF_FaceRec_\n  {\n    FT_FaceRec        root;\n\n    char*             charset_encoding;\n    char*             charset_registry;\n\n    bdf_font_t*       bdffont;\n\n    BDF_encoding_el*  en_table;\n\n    FT_CharMap        charmap_handle;\n    FT_CharMapRec     charmap;  /* a single charmap per face */\n\n    FT_UInt           default_glyph;\n\n  } BDF_FaceRec, *BDF_Face;\n\n\n  FT_EXPORT_VAR( const FT_Driver_ClassRec )  bdf_driver_class;\n\n\nFT_END_HEADER\n\n\n#endif /* __BDFDRIVR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/bdf/bdferror.h",
    "content": "/*\n * Copyright 2001, 2002, 2012 Francesco Zappa Nardelli\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT\n * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR\n * THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the BDF error enumeration constants.      */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __BDFERROR_H__\n#define __BDFERROR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  BDF_Err_\n#define FT_ERR_BASE    FT_Mod_Err_BDF\n\n#include FT_ERRORS_H\n\n#endif /* __BDFERROR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/bdf/bdflib.c",
    "content": "/*\n * Copyright 2000 Computing Research Labs, New Mexico State University\n * Copyright 2001-2014\n *   Francesco Zappa Nardelli\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT\n * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR\n * THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  This file is based on bdf.c,v 1.22 2000/03/16 20:08:50               */\n  /*                                                                       */\n  /*  taken from Mark Leisher's xmbdfed package                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n\n#include FT_FREETYPE_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_OBJECTS_H\n\n#include \"bdf.h\"\n#include \"bdferror.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_bdflib\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Default BDF font options.                                             */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  static const bdf_options_t  _bdf_opts =\n  {\n    1,                /* Correct metrics.               */\n    1,                /* Preserve unencoded glyphs.     */\n    0,                /* Preserve comments.             */\n    BDF_PROPORTIONAL  /* Default spacing.               */\n  };\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Builtin BDF font properties.                                          */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /* List of most properties that might appear in a font.  Doesn't include */\n  /* the RAW_* and AXIS_* properties in X11R6 polymorphic fonts.           */\n\n  static const bdf_property_t  _bdf_properties[] =\n  {\n    { (char *)\"ADD_STYLE_NAME\",          BDF_ATOM,     1, { 0 } },\n    { (char *)\"AVERAGE_WIDTH\",           BDF_INTEGER,  1, { 0 } },\n    { (char *)\"AVG_CAPITAL_WIDTH\",       BDF_INTEGER,  1, { 0 } },\n    { (char *)\"AVG_LOWERCASE_WIDTH\",     BDF_INTEGER,  1, { 0 } },\n    { (char *)\"CAP_HEIGHT\",              BDF_INTEGER,  1, { 0 } },\n    { (char *)\"CHARSET_COLLECTIONS\",     BDF_ATOM,     1, { 0 } },\n    { (char *)\"CHARSET_ENCODING\",        BDF_ATOM,     1, { 0 } },\n    { (char *)\"CHARSET_REGISTRY\",        BDF_ATOM,     1, { 0 } },\n    { (char *)\"COMMENT\",                 BDF_ATOM,     1, { 0 } },\n    { (char *)\"COPYRIGHT\",               BDF_ATOM,     1, { 0 } },\n    { (char *)\"DEFAULT_CHAR\",            BDF_CARDINAL, 1, { 0 } },\n    { (char *)\"DESTINATION\",             BDF_CARDINAL, 1, { 0 } },\n    { (char *)\"DEVICE_FONT_NAME\",        BDF_ATOM,     1, { 0 } },\n    { (char *)\"END_SPACE\",               BDF_INTEGER,  1, { 0 } },\n    { (char *)\"FACE_NAME\",               BDF_ATOM,     1, { 0 } },\n    { (char *)\"FAMILY_NAME\",             BDF_ATOM,     1, { 0 } },\n    { (char *)\"FIGURE_WIDTH\",            BDF_INTEGER,  1, { 0 } },\n    { (char *)\"FONT\",                    BDF_ATOM,     1, { 0 } },\n    { (char *)\"FONTNAME_REGISTRY\",       BDF_ATOM,     1, { 0 } },\n    { (char *)\"FONT_ASCENT\",             BDF_INTEGER,  1, { 0 } },\n    { (char *)\"FONT_DESCENT\",            BDF_INTEGER,  1, { 0 } },\n    { (char *)\"FOUNDRY\",                 BDF_ATOM,     1, { 0 } },\n    { (char *)\"FULL_NAME\",               BDF_ATOM,     1, { 0 } },\n    { (char *)\"ITALIC_ANGLE\",            BDF_INTEGER,  1, { 0 } },\n    { (char *)\"MAX_SPACE\",               BDF_INTEGER,  1, { 0 } },\n    { (char *)\"MIN_SPACE\",               BDF_INTEGER,  1, { 0 } },\n    { (char *)\"NORM_SPACE\",              BDF_INTEGER,  1, { 0 } },\n    { (char *)\"NOTICE\",                  BDF_ATOM,     1, { 0 } },\n    { (char *)\"PIXEL_SIZE\",              BDF_INTEGER,  1, { 0 } },\n    { (char *)\"POINT_SIZE\",              BDF_INTEGER,  1, { 0 } },\n    { (char *)\"QUAD_WIDTH\",              BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_ASCENT\",              BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_AVERAGE_WIDTH\",       BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_AVG_CAPITAL_WIDTH\",   BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_AVG_LOWERCASE_WIDTH\", BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_CAP_HEIGHT\",          BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_DESCENT\",             BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_END_SPACE\",           BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_FIGURE_WIDTH\",        BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_MAX_SPACE\",           BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_MIN_SPACE\",           BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_NORM_SPACE\",          BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_PIXEL_SIZE\",          BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_POINT_SIZE\",          BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_PIXELSIZE\",           BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_POINTSIZE\",           BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_QUAD_WIDTH\",          BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_SMALL_CAP_SIZE\",      BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_STRIKEOUT_ASCENT\",    BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_STRIKEOUT_DESCENT\",   BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_SUBSCRIPT_SIZE\",      BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_SUBSCRIPT_X\",         BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_SUBSCRIPT_Y\",         BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_SUPERSCRIPT_SIZE\",    BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_SUPERSCRIPT_X\",       BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_SUPERSCRIPT_Y\",       BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_UNDERLINE_POSITION\",  BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_UNDERLINE_THICKNESS\", BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RAW_X_HEIGHT\",            BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RELATIVE_SETWIDTH\",       BDF_CARDINAL, 1, { 0 } },\n    { (char *)\"RELATIVE_WEIGHT\",         BDF_CARDINAL, 1, { 0 } },\n    { (char *)\"RESOLUTION\",              BDF_INTEGER,  1, { 0 } },\n    { (char *)\"RESOLUTION_X\",            BDF_CARDINAL, 1, { 0 } },\n    { (char *)\"RESOLUTION_Y\",            BDF_CARDINAL, 1, { 0 } },\n    { (char *)\"SETWIDTH_NAME\",           BDF_ATOM,     1, { 0 } },\n    { (char *)\"SLANT\",                   BDF_ATOM,     1, { 0 } },\n    { (char *)\"SMALL_CAP_SIZE\",          BDF_INTEGER,  1, { 0 } },\n    { (char *)\"SPACING\",                 BDF_ATOM,     1, { 0 } },\n    { (char *)\"STRIKEOUT_ASCENT\",        BDF_INTEGER,  1, { 0 } },\n    { (char *)\"STRIKEOUT_DESCENT\",       BDF_INTEGER,  1, { 0 } },\n    { (char *)\"SUBSCRIPT_SIZE\",          BDF_INTEGER,  1, { 0 } },\n    { (char *)\"SUBSCRIPT_X\",             BDF_INTEGER,  1, { 0 } },\n    { (char *)\"SUBSCRIPT_Y\",             BDF_INTEGER,  1, { 0 } },\n    { (char *)\"SUPERSCRIPT_SIZE\",        BDF_INTEGER,  1, { 0 } },\n    { (char *)\"SUPERSCRIPT_X\",           BDF_INTEGER,  1, { 0 } },\n    { (char *)\"SUPERSCRIPT_Y\",           BDF_INTEGER,  1, { 0 } },\n    { (char *)\"UNDERLINE_POSITION\",      BDF_INTEGER,  1, { 0 } },\n    { (char *)\"UNDERLINE_THICKNESS\",     BDF_INTEGER,  1, { 0 } },\n    { (char *)\"WEIGHT\",                  BDF_CARDINAL, 1, { 0 } },\n    { (char *)\"WEIGHT_NAME\",             BDF_ATOM,     1, { 0 } },\n    { (char *)\"X_HEIGHT\",                BDF_INTEGER,  1, { 0 } },\n    { (char *)\"_MULE_BASELINE_OFFSET\",   BDF_INTEGER,  1, { 0 } },\n    { (char *)\"_MULE_RELATIVE_COMPOSE\",  BDF_INTEGER,  1, { 0 } },\n  };\n\n  static const unsigned long\n  _num_bdf_properties = sizeof ( _bdf_properties ) /\n                        sizeof ( _bdf_properties[0] );\n\n\n  /* An auxiliary macro to parse properties, to be used in conditionals. */\n  /* It behaves like `strncmp' but also tests the following character    */\n  /* whether it is a whitespace or NULL.                                 */\n  /* `property' is a constant string of length `n' to compare with.      */\n#define _bdf_strncmp( name, property, n )      \\\n          ( ft_strncmp( name, property, n ) || \\\n            !( name[n] == ' '  ||              \\\n               name[n] == '\\0' ||              \\\n               name[n] == '\\n' ||              \\\n               name[n] == '\\r' ||              \\\n               name[n] == '\\t' )            )\n\n  /* Auto correction messages. */\n#define ACMSG1   \"FONT_ASCENT property missing.  \" \\\n                 \"Added `FONT_ASCENT %hd'.\\n\"\n#define ACMSG2   \"FONT_DESCENT property missing.  \" \\\n                 \"Added `FONT_DESCENT %hd'.\\n\"\n#define ACMSG3   \"Font width != actual width.  Old: %hd New: %hd.\\n\"\n#define ACMSG4   \"Font left bearing != actual left bearing.  \" \\\n                 \"Old: %hd New: %hd.\\n\"\n#define ACMSG5   \"Font ascent != actual ascent.  Old: %hd New: %hd.\\n\"\n#define ACMSG6   \"Font descent != actual descent.  Old: %hd New: %hd.\\n\"\n#define ACMSG7   \"Font height != actual height. Old: %hd New: %hd.\\n\"\n#define ACMSG8   \"Glyph scalable width (SWIDTH) adjustments made.\\n\"\n#define ACMSG9   \"SWIDTH field missing at line %ld.  Set automatically.\\n\"\n#define ACMSG10  \"DWIDTH field missing at line %ld.  Set to glyph width.\\n\"\n#define ACMSG11  \"SIZE bits per pixel field adjusted to %hd.\\n\"\n#define ACMSG12  \"Duplicate encoding %ld (%s) changed to unencoded.\\n\"\n#define ACMSG13  \"Glyph %ld extra rows removed.\\n\"\n#define ACMSG14  \"Glyph %ld extra columns removed.\\n\"\n#define ACMSG15  \"Incorrect glyph count: %ld indicated but %ld found.\\n\"\n#define ACMSG16  \"Glyph %ld missing columns padded with zero bits.\\n\"\n\n  /* Error messages. */\n#define ERRMSG1  \"[line %ld] Missing `%s' line.\\n\"\n#define ERRMSG2  \"[line %ld] Font header corrupted or missing fields.\\n\"\n#define ERRMSG3  \"[line %ld] Font glyphs corrupted or missing fields.\\n\"\n#define ERRMSG4  \"[line %ld] BBX too big.\\n\"\n#define ERRMSG5  \"[line %ld] `%s' value too big.\\n\"\n#define ERRMSG6  \"[line %ld] Input line too long.\\n\"\n#define ERRMSG7  \"[line %ld] Font name too long.\\n\"\n#define ERRMSG8  \"[line %ld] Invalid `%s' value.\\n\"\n#define ERRMSG9  \"[line %ld] Invalid keyword.\\n\"\n\n  /* Debug messages. */\n#define DBGMSG1  \"  [%6ld] %s\" /* no \\n */\n#define DBGMSG2  \" (0x%lX)\\n\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Hash table utilities for the properties.                              */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /* XXX: Replace this with FreeType's hash functions */\n\n\n#define INITIAL_HT_SIZE  241\n\n  typedef void\n  (*hash_free_func)( hashnode  node );\n\n  static hashnode*\n  hash_bucket( const char*  key,\n               hashtable*   ht )\n  {\n    const char*    kp  = key;\n    unsigned long  res = 0;\n    hashnode*      bp  = ht->table, *ndp;\n\n\n    /* Mocklisp hash function. */\n    while ( *kp )\n      res = ( res << 5 ) - res + *kp++;\n\n    ndp = bp + ( res % ht->size );\n    while ( *ndp )\n    {\n      kp = (*ndp)->key;\n      if ( kp[0] == key[0] && ft_strcmp( kp, key ) == 0 )\n        break;\n      ndp--;\n      if ( ndp < bp )\n        ndp = bp + ( ht->size - 1 );\n    }\n\n    return ndp;\n  }\n\n\n  static FT_Error\n  hash_rehash( hashtable*  ht,\n               FT_Memory   memory )\n  {\n    hashnode*  obp = ht->table, *bp, *nbp;\n    int        i, sz = ht->size;\n    FT_Error   error = FT_Err_Ok;\n\n\n    ht->size <<= 1;\n    ht->limit  = ht->size / 3;\n\n    if ( FT_NEW_ARRAY( ht->table, ht->size ) )\n      goto Exit;\n\n    for ( i = 0, bp = obp; i < sz; i++, bp++ )\n    {\n      if ( *bp )\n      {\n        nbp = hash_bucket( (*bp)->key, ht );\n        *nbp = *bp;\n      }\n    }\n    FT_FREE( obp );\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  hash_init( hashtable*  ht,\n             FT_Memory   memory )\n  {\n    int       sz    = INITIAL_HT_SIZE;\n    FT_Error  error = FT_Err_Ok;\n\n\n    ht->size  = sz;\n    ht->limit = sz / 3;\n    ht->used  = 0;\n\n    if ( FT_NEW_ARRAY( ht->table, sz ) )\n      goto Exit;\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  hash_free( hashtable*  ht,\n             FT_Memory   memory )\n  {\n    if ( ht != 0 )\n    {\n      int        i, sz = ht->size;\n      hashnode*  bp = ht->table;\n\n\n      for ( i = 0; i < sz; i++, bp++ )\n        FT_FREE( *bp );\n\n      FT_FREE( ht->table );\n    }\n  }\n\n\n  static FT_Error\n  hash_insert( char*       key,\n               size_t      data,\n               hashtable*  ht,\n               FT_Memory   memory )\n  {\n    hashnode   nn;\n    hashnode*  bp      = hash_bucket( key, ht );\n    FT_Error   error   = FT_Err_Ok;\n\n\n    nn = *bp;\n    if ( !nn )\n    {\n      if ( FT_NEW( nn ) )\n        goto Exit;\n      *bp = nn;\n\n      nn->key  = key;\n      nn->data = data;\n\n      if ( ht->used >= ht->limit )\n      {\n        error = hash_rehash( ht, memory );\n        if ( error )\n          goto Exit;\n      }\n      ht->used++;\n    }\n    else\n      nn->data = data;\n\n  Exit:\n    return error;\n  }\n\n\n  static hashnode\n  hash_lookup( const char* key,\n               hashtable*  ht )\n  {\n    hashnode *np = hash_bucket( key, ht );\n\n\n    return *np;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Utility types and functions.                                          */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* Function type for parsing lines of a BDF font. */\n\n  typedef FT_Error\n  (*_bdf_line_func_t)( char*          line,\n                       unsigned long  linelen,\n                       unsigned long  lineno,\n                       void*          call_data,\n                       void*          client_data );\n\n\n  /* List structure for splitting lines into fields. */\n\n  typedef struct  _bdf_list_t_\n  {\n    char**         field;\n    unsigned long  size;\n    unsigned long  used;\n    FT_Memory      memory;\n\n  } _bdf_list_t;\n\n\n  /* Structure used while loading BDF fonts. */\n\n  typedef struct  _bdf_parse_t_\n  {\n    unsigned long   flags;\n    unsigned long   cnt;\n    unsigned long   row;\n\n    short           minlb;\n    short           maxlb;\n    short           maxrb;\n    short           maxas;\n    short           maxds;\n\n    short           rbearing;\n\n    char*           glyph_name;\n    long            glyph_enc;\n\n    bdf_font_t*     font;\n    bdf_options_t*  opts;\n\n    unsigned long   have[34816]; /* must be in sync with `nmod' and `umod' */\n                                 /* arrays from `bdf_font_t' structure     */\n    _bdf_list_t     list;\n\n    FT_Memory       memory;\n\n  } _bdf_parse_t;\n\n\n#define setsbit( m, cc ) \\\n          ( m[(FT_Byte)(cc) >> 3] |= (FT_Byte)( 1 << ( (cc) & 7 ) ) )\n#define sbitset( m, cc ) \\\n          ( m[(FT_Byte)(cc) >> 3]  & ( 1 << ( (cc) & 7 ) ) )\n\n\n  static void\n  _bdf_list_init( _bdf_list_t*  list,\n                  FT_Memory     memory )\n  {\n    FT_ZERO( list );\n    list->memory = memory;\n  }\n\n\n  static void\n  _bdf_list_done( _bdf_list_t*  list )\n  {\n    FT_Memory  memory = list->memory;\n\n\n    if ( memory )\n    {\n      FT_FREE( list->field );\n      FT_ZERO( list );\n    }\n  }\n\n\n  static FT_Error\n  _bdf_list_ensure( _bdf_list_t*   list,\n                    unsigned long  num_items ) /* same as _bdf_list_t.used */\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( num_items > list->size )\n    {\n      unsigned long  oldsize = list->size; /* same as _bdf_list_t.size */\n      unsigned long  newsize = oldsize + ( oldsize >> 1 ) + 5;\n      unsigned long  bigsize = (unsigned long)( FT_INT_MAX / sizeof ( char* ) );\n      FT_Memory      memory  = list->memory;\n\n\n      if ( oldsize == bigsize )\n      {\n        error = FT_THROW( Out_Of_Memory );\n        goto Exit;\n      }\n      else if ( newsize < oldsize || newsize > bigsize )\n        newsize = bigsize;\n\n      if ( FT_RENEW_ARRAY( list->field, oldsize, newsize ) )\n        goto Exit;\n\n      list->size = newsize;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  _bdf_list_shift( _bdf_list_t*   list,\n                   unsigned long  n )\n  {\n    unsigned long  i, u;\n\n\n    if ( list == 0 || list->used == 0 || n == 0 )\n      return;\n\n    if ( n >= list->used )\n    {\n      list->used = 0;\n      return;\n    }\n\n    for ( u = n, i = 0; u < list->used; i++, u++ )\n      list->field[i] = list->field[u];\n    list->used -= n;\n  }\n\n\n  /* An empty string for empty fields. */\n\n  static const char  empty[1] = { 0 };      /* XXX eliminate this */\n\n\n  static char *\n  _bdf_list_join( _bdf_list_t*    list,\n                  int             c,\n                  unsigned long  *alen )\n  {\n    unsigned long  i, j;\n    char*          dp;\n\n\n    *alen = 0;\n\n    if ( list == 0 || list->used == 0 )\n      return 0;\n\n    dp = list->field[0];\n    for ( i = j = 0; i < list->used; i++ )\n    {\n      char*  fp = list->field[i];\n\n\n      while ( *fp )\n        dp[j++] = *fp++;\n\n      if ( i + 1 < list->used )\n        dp[j++] = (char)c;\n    }\n    if ( dp != empty )\n      dp[j] = 0;\n\n    *alen = j;\n    return dp;\n  }\n\n\n  /* The code below ensures that we have at least 4 + 1 `field' */\n  /* elements in `list' (which are possibly NULL) so that we    */\n  /* don't have to check the number of fields in most cases.    */\n\n  static FT_Error\n  _bdf_list_split( _bdf_list_t*   list,\n                   char*          separators,\n                   char*          line,\n                   unsigned long  linelen )\n  {\n    int       mult, final_empty;\n    char      *sp, *ep, *end;\n    char      seps[32];\n    FT_Error  error = FT_Err_Ok;\n\n\n    /* Initialize the list. */\n    list->used = 0;\n    if ( list->size )\n    {\n      list->field[0] = (char*)empty;\n      list->field[1] = (char*)empty;\n      list->field[2] = (char*)empty;\n      list->field[3] = (char*)empty;\n      list->field[4] = (char*)empty;\n    }\n\n    /* If the line is empty, then simply return. */\n    if ( linelen == 0 || line[0] == 0 )\n      goto Exit;\n\n    /* In the original code, if the `separators' parameter is NULL or */\n    /* empty, the list is split into individual bytes.  We don't need */\n    /* this, so an error is signaled.                                 */\n    if ( separators == 0 || *separators == 0 )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* Prepare the separator bitmap. */\n    FT_MEM_ZERO( seps, 32 );\n\n    /* If the very last character of the separator string is a plus, then */\n    /* set the `mult' flag to indicate that multiple separators should be */\n    /* collapsed into one.                                                */\n    for ( mult = 0, sp = separators; sp && *sp; sp++ )\n    {\n      if ( *sp == '+' && *( sp + 1 ) == 0 )\n        mult = 1;\n      else\n        setsbit( seps, *sp );\n    }\n\n    /* Break the line up into fields. */\n    for ( final_empty = 0, sp = ep = line, end = sp + linelen;\n          sp < end && *sp; )\n    {\n      /* Collect everything that is not a separator. */\n      for ( ; *ep && !sbitset( seps, *ep ); ep++ )\n        ;\n\n      /* Resize the list if necessary. */\n      if ( list->used == list->size )\n      {\n        error = _bdf_list_ensure( list, list->used + 1 );\n        if ( error )\n          goto Exit;\n      }\n\n      /* Assign the field appropriately. */\n      list->field[list->used++] = ( ep > sp ) ? sp : (char*)empty;\n\n      sp = ep;\n\n      if ( mult )\n      {\n        /* If multiple separators should be collapsed, do it now by */\n        /* setting all the separator characters to 0.               */\n        for ( ; *ep && sbitset( seps, *ep ); ep++ )\n          *ep = 0;\n      }\n      else if ( *ep != 0 )\n        /* Don't collapse multiple separators by making them 0, so just */\n        /* make the one encountered 0.                                  */\n        *ep++ = 0;\n\n      final_empty = ( ep > sp && *ep == 0 );\n      sp = ep;\n    }\n\n    /* Finally, NULL-terminate the list. */\n    if ( list->used + final_empty >= list->size )\n    {\n      error = _bdf_list_ensure( list, list->used + final_empty + 1 );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( final_empty )\n      list->field[list->used++] = (char*)empty;\n\n    list->field[list->used] = 0;\n\n  Exit:\n    return error;\n  }\n\n\n#define NO_SKIP  256  /* this value cannot be stored in a 'char' */\n\n\n  static FT_Error\n  _bdf_readstream( FT_Stream         stream,\n                   _bdf_line_func_t  callback,\n                   void*             client_data,\n                   unsigned long    *lno )\n  {\n    _bdf_line_func_t  cb;\n    unsigned long     lineno, buf_size;\n    int               refill, hold, to_skip;\n    ptrdiff_t         bytes, start, end, cursor, avail;\n    char*             buf    = 0;\n    FT_Memory         memory = stream->memory;\n    FT_Error          error  = FT_Err_Ok;\n\n\n    if ( callback == 0 )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* initial size and allocation of the input buffer */\n    buf_size = 1024;\n\n    if ( FT_NEW_ARRAY( buf, buf_size ) )\n      goto Exit;\n\n    cb      = callback;\n    lineno  = 1;\n    buf[0]  = 0;\n    start   = 0;\n    avail   = 0;\n    cursor  = 0;\n    refill  = 1;\n    to_skip = NO_SKIP;\n    bytes   = 0;        /* make compiler happy */\n\n    for (;;)\n    {\n      if ( refill )\n      {\n        bytes  = (ptrdiff_t)FT_Stream_TryRead(\n                   stream, (FT_Byte*)buf + cursor,\n                   (FT_ULong)( buf_size - cursor ) );\n        avail  = cursor + bytes;\n        cursor = 0;\n        refill = 0;\n      }\n\n      end = start;\n\n      /* should we skip an optional character like \\n or \\r? */\n      if ( start < avail && buf[start] == to_skip )\n      {\n        start  += 1;\n        to_skip = NO_SKIP;\n        continue;\n      }\n\n      /* try to find the end of the line */\n      while ( end < avail && buf[end] != '\\n' && buf[end] != '\\r' )\n        end++;\n\n      /* if we hit the end of the buffer, try shifting its content */\n      /* or even resizing it                                       */\n      if ( end >= avail )\n      {\n        if ( bytes == 0 )  /* last line in file doesn't end in \\r or \\n */\n          break;           /* ignore it then exit                       */\n\n        if ( start == 0 )\n        {\n          /* this line is definitely too long; try resizing the input */\n          /* buffer a bit to handle it.                               */\n          FT_ULong  new_size;\n\n\n          if ( buf_size >= 65536UL )  /* limit ourselves to 64KByte */\n          {\n            FT_ERROR(( \"_bdf_readstream: \" ERRMSG6, lineno ));\n            error = FT_THROW( Invalid_Argument );\n            goto Exit;\n          }\n\n          new_size = buf_size * 2;\n          if ( FT_RENEW_ARRAY( buf, buf_size, new_size ) )\n            goto Exit;\n\n          cursor   = buf_size;\n          buf_size = new_size;\n        }\n        else\n        {\n          bytes = avail - start;\n\n          FT_MEM_MOVE( buf, buf + start, bytes );\n\n          cursor = bytes;\n          avail -= bytes;\n          start  = 0;\n        }\n        refill = 1;\n        continue;\n      }\n\n      /* Temporarily NUL-terminate the line. */\n      hold     = buf[end];\n      buf[end] = 0;\n\n      /* XXX: Use encoding independent value for 0x1A */\n      if ( buf[start] != '#' && buf[start] != 0x1A && end > start )\n      {\n        error = (*cb)( buf + start, (unsigned long)( end - start ), lineno,\n                       (void*)&cb, client_data );\n        /* Redo if we have encountered CHARS without properties. */\n        if ( error == -1 )\n          error = (*cb)( buf + start, (unsigned long)( end - start ), lineno,\n                         (void*)&cb, client_data );\n        if ( error )\n          break;\n      }\n\n      lineno  += 1;\n      buf[end] = (char)hold;\n      start    = end + 1;\n\n      if ( hold == '\\n' )\n        to_skip = '\\r';\n      else if ( hold == '\\r' )\n        to_skip = '\\n';\n      else\n        to_skip = NO_SKIP;\n    }\n\n    *lno = lineno;\n\n  Exit:\n    FT_FREE( buf );\n    return error;\n  }\n\n\n  /* XXX: make this work with EBCDIC also */\n\n  static const unsigned char  a2i[128] =\n  {\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00\n  };\n\n  static const unsigned char  odigits[32] =\n  {\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n  };\n\n  static const unsigned char  ddigits[32] =\n  {\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n  };\n\n  static const unsigned char  hdigits[32] =\n  {\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,\n    0x7E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n  };\n\n\n  /* Routine to convert an ASCII string into an unsigned long integer. */\n  static unsigned long\n  _bdf_atoul( char*   s,\n              char**  end,\n              int     base )\n  {\n    unsigned long         v;\n    const unsigned char*  dmap;\n\n\n    if ( s == 0 || *s == 0 )\n      return 0;\n\n    /* Make sure the radix is something recognizable.  Default to 10. */\n    switch ( base )\n    {\n    case 8:\n      dmap = odigits;\n      break;\n    case 16:\n      dmap = hdigits;\n      break;\n    default:\n      base = 10;\n      dmap = ddigits;\n      break;\n    }\n\n    /* Check for the special hex prefix. */\n    if ( *s == '0'                                  &&\n         ( *( s + 1 ) == 'x' || *( s + 1 ) == 'X' ) )\n    {\n      base = 16;\n      dmap = hdigits;\n      s   += 2;\n    }\n\n    for ( v = 0; sbitset( dmap, *s ); s++ )\n      v = v * base + a2i[(int)*s];\n\n    if ( end != 0 )\n      *end = s;\n\n    return v;\n  }\n\n\n  /* Routine to convert an ASCII string into an signed long integer. */\n  static long\n  _bdf_atol( char*   s,\n             char**  end,\n             int     base )\n  {\n    long                  v, neg;\n    const unsigned char*  dmap;\n\n\n    if ( s == 0 || *s == 0 )\n      return 0;\n\n    /* Make sure the radix is something recognizable.  Default to 10. */\n    switch ( base )\n    {\n    case 8:\n      dmap = odigits;\n      break;\n    case 16:\n      dmap = hdigits;\n      break;\n    default:\n      base = 10;\n      dmap = ddigits;\n      break;\n    }\n\n    /* Check for a minus sign. */\n    neg = 0;\n    if ( *s == '-' )\n    {\n      s++;\n      neg = 1;\n    }\n\n    /* Check for the special hex prefix. */\n    if ( *s == '0'                                  &&\n         ( *( s + 1 ) == 'x' || *( s + 1 ) == 'X' ) )\n    {\n      base = 16;\n      dmap = hdigits;\n      s   += 2;\n    }\n\n    for ( v = 0; sbitset( dmap, *s ); s++ )\n      v = v * base + a2i[(int)*s];\n\n    if ( end != 0 )\n      *end = s;\n\n    return ( !neg ) ? v : -v;\n  }\n\n\n  /* Routine to convert an ASCII string into an signed short integer. */\n  static short\n  _bdf_atos( char*   s,\n             char**  end,\n             int     base )\n  {\n    short                 v, neg;\n    const unsigned char*  dmap;\n\n\n    if ( s == 0 || *s == 0 )\n      return 0;\n\n    /* Make sure the radix is something recognizable.  Default to 10. */\n    switch ( base )\n    {\n    case 8:\n      dmap = odigits;\n      break;\n    case 16:\n      dmap = hdigits;\n      break;\n    default:\n      base = 10;\n      dmap = ddigits;\n      break;\n    }\n\n    /* Check for a minus. */\n    neg = 0;\n    if ( *s == '-' )\n    {\n      s++;\n      neg = 1;\n    }\n\n    /* Check for the special hex prefix. */\n    if ( *s == '0'                                  &&\n         ( *( s + 1 ) == 'x' || *( s + 1 ) == 'X' ) )\n    {\n      base = 16;\n      dmap = hdigits;\n      s   += 2;\n    }\n\n    for ( v = 0; sbitset( dmap, *s ); s++ )\n      v = (short)( v * base + a2i[(int)*s] );\n\n    if ( end != 0 )\n      *end = s;\n\n    return (short)( ( !neg ) ? v : -v );\n  }\n\n\n  /* Routine to compare two glyphs by encoding so they can be sorted. */\n  static int\n  by_encoding( const void*  a,\n               const void*  b )\n  {\n    bdf_glyph_t  *c1, *c2;\n\n\n    c1 = (bdf_glyph_t *)a;\n    c2 = (bdf_glyph_t *)b;\n\n    if ( c1->encoding < c2->encoding )\n      return -1;\n\n    if ( c1->encoding > c2->encoding )\n      return 1;\n\n    return 0;\n  }\n\n\n  static FT_Error\n  bdf_create_property( char*        name,\n                       int          format,\n                       bdf_font_t*  font )\n  {\n    size_t           n;\n    bdf_property_t*  p;\n    FT_Memory        memory = font->memory;\n    FT_Error         error  = FT_Err_Ok;\n\n\n    /* First check whether the property has        */\n    /* already been added or not.  If it has, then */\n    /* simply ignore it.                           */\n    if ( hash_lookup( name, &(font->proptbl) ) )\n      goto Exit;\n\n    if ( FT_RENEW_ARRAY( font->user_props,\n                         font->nuser_props,\n                         font->nuser_props + 1 ) )\n      goto Exit;\n\n    p = font->user_props + font->nuser_props;\n    FT_ZERO( p );\n\n    n = ft_strlen( name ) + 1;\n    if ( n > FT_ULONG_MAX )\n      return FT_THROW( Invalid_Argument );\n\n    if ( FT_NEW_ARRAY( p->name, n ) )\n      goto Exit;\n\n    FT_MEM_COPY( (char *)p->name, name, n );\n\n    p->format  = format;\n    p->builtin = 0;\n\n    n = _num_bdf_properties + font->nuser_props;\n\n    error = hash_insert( p->name, n, &(font->proptbl), memory );\n    if ( error )\n      goto Exit;\n\n    font->nuser_props++;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( bdf_property_t * )\n  bdf_get_property( char*        name,\n                    bdf_font_t*  font )\n  {\n    hashnode  hn;\n    size_t    propid;\n\n\n    if ( name == 0 || *name == 0 )\n      return 0;\n\n    if ( ( hn = hash_lookup( name, &(font->proptbl) ) ) == 0 )\n      return 0;\n\n    propid = hn->data;\n    if ( propid >= _num_bdf_properties )\n      return font->user_props + ( propid - _num_bdf_properties );\n\n    return (bdf_property_t*)_bdf_properties + propid;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* BDF font file parsing flags and functions.                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* Parse flags. */\n\n#define _BDF_START      0x0001\n#define _BDF_FONT_NAME  0x0002\n#define _BDF_SIZE       0x0004\n#define _BDF_FONT_BBX   0x0008\n#define _BDF_PROPS      0x0010\n#define _BDF_GLYPHS     0x0020\n#define _BDF_GLYPH      0x0040\n#define _BDF_ENCODING   0x0080\n#define _BDF_SWIDTH     0x0100\n#define _BDF_DWIDTH     0x0200\n#define _BDF_BBX        0x0400\n#define _BDF_BITMAP     0x0800\n\n#define _BDF_SWIDTH_ADJ  0x1000\n\n#define _BDF_GLYPH_BITS ( _BDF_GLYPH    | \\\n                          _BDF_ENCODING | \\\n                          _BDF_SWIDTH   | \\\n                          _BDF_DWIDTH   | \\\n                          _BDF_BBX      | \\\n                          _BDF_BITMAP   )\n\n#define _BDF_GLYPH_WIDTH_CHECK   0x40000000UL\n#define _BDF_GLYPH_HEIGHT_CHECK  0x80000000UL\n\n\n  static FT_Error\n  _bdf_add_comment( bdf_font_t*    font,\n                    char*          comment,\n                    unsigned long  len )\n  {\n    char*      cp;\n    FT_Memory  memory = font->memory;\n    FT_Error   error  = FT_Err_Ok;\n\n\n    if ( FT_RENEW_ARRAY( font->comments,\n                         font->comments_len,\n                         font->comments_len + len + 1 ) )\n      goto Exit;\n\n    cp = font->comments + font->comments_len;\n\n    FT_MEM_COPY( cp, comment, len );\n    cp[len] = '\\n';\n\n    font->comments_len += len + 1;\n\n  Exit:\n    return error;\n  }\n\n\n  /* Set the spacing from the font name if it exists, or set it to the */\n  /* default specified in the options.                                 */\n  static FT_Error\n  _bdf_set_default_spacing( bdf_font_t*     font,\n                            bdf_options_t*  opts,\n                            unsigned long   lineno )\n  {\n    size_t       len;\n    char         name[256];\n    _bdf_list_t  list;\n    FT_Memory    memory;\n    FT_Error     error = FT_Err_Ok;\n\n    FT_UNUSED( lineno );        /* only used in debug mode */\n\n\n    if ( font == 0 || font->name == 0 || font->name[0] == 0 )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    memory = font->memory;\n\n    _bdf_list_init( &list, memory );\n\n    font->spacing = opts->font_spacing;\n\n    len = ft_strlen( font->name ) + 1;\n    /* Limit ourselves to 256 characters in the font name. */\n    if ( len >= 256 )\n    {\n      FT_ERROR(( \"_bdf_set_default_spacing: \" ERRMSG7, lineno ));\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    FT_MEM_COPY( name, font->name, len );\n\n    error = _bdf_list_split( &list, (char *)\"-\", name, (unsigned long)len );\n    if ( error )\n      goto Fail;\n\n    if ( list.used == 15 )\n    {\n      switch ( list.field[11][0] )\n      {\n      case 'C':\n      case 'c':\n        font->spacing = BDF_CHARCELL;\n        break;\n      case 'M':\n      case 'm':\n        font->spacing = BDF_MONOWIDTH;\n        break;\n      case 'P':\n      case 'p':\n        font->spacing = BDF_PROPORTIONAL;\n        break;\n      }\n    }\n\n  Fail:\n    _bdf_list_done( &list );\n\n  Exit:\n    return error;\n  }\n\n\n  /* Determine whether the property is an atom or not.  If it is, then */\n  /* clean it up so the double quotes are removed if they exist.       */\n  static int\n  _bdf_is_atom( char*          line,\n                unsigned long  linelen,\n                char**         name,\n                char**         value,\n                bdf_font_t*    font )\n  {\n    int              hold;\n    char             *sp, *ep;\n    bdf_property_t*  p;\n\n\n    *name = sp = ep = line;\n\n    while ( *ep && *ep != ' ' && *ep != '\\t' )\n      ep++;\n\n    hold = -1;\n    if ( *ep )\n    {\n      hold = *ep;\n      *ep  = 0;\n    }\n\n    p = bdf_get_property( sp, font );\n\n    /* Restore the character that was saved before any return can happen. */\n    if ( hold != -1 )\n      *ep = (char)hold;\n\n    /* If the property exists and is not an atom, just return here. */\n    if ( p && p->format != BDF_ATOM )\n      return 0;\n\n    /* The property is an atom.  Trim all leading and trailing whitespace */\n    /* and double quotes for the atom value.                              */\n    sp = ep;\n    ep = line + linelen;\n\n    /* Trim the leading whitespace if it exists. */\n    if ( *sp )\n      *sp++ = 0;\n    while ( *sp                           &&\n            ( *sp == ' ' || *sp == '\\t' ) )\n      sp++;\n\n    /* Trim the leading double quote if it exists. */\n    if ( *sp == '\"' )\n      sp++;\n    *value = sp;\n\n    /* Trim the trailing whitespace if it exists. */\n    while ( ep > sp                                       &&\n            ( *( ep - 1 ) == ' ' || *( ep - 1 ) == '\\t' ) )\n      *--ep = 0;\n\n    /* Trim the trailing double quote if it exists. */\n    if ( ep > sp && *( ep - 1 ) == '\"' )\n      *--ep = 0;\n\n    return 1;\n  }\n\n\n  static FT_Error\n  _bdf_add_property( bdf_font_t*    font,\n                     char*          name,\n                     char*          value,\n                     unsigned long  lineno )\n  {\n    size_t          propid;\n    hashnode        hn;\n    bdf_property_t  *prop, *fp;\n    FT_Memory       memory = font->memory;\n    FT_Error        error  = FT_Err_Ok;\n\n    FT_UNUSED( lineno );        /* only used in debug mode */\n\n\n    /* First, check whether the property already exists in the font. */\n    if ( ( hn = hash_lookup( name, (hashtable *)font->internal ) ) != 0 )\n    {\n      /* The property already exists in the font, so simply replace */\n      /* the value of the property with the current value.          */\n      fp = font->props + hn->data;\n\n      switch ( fp->format )\n      {\n      case BDF_ATOM:\n        /* Delete the current atom if it exists. */\n        FT_FREE( fp->value.atom );\n\n        if ( value && value[0] != 0 )\n        {\n          if ( FT_STRDUP( fp->value.atom, value ) )\n            goto Exit;\n        }\n        break;\n\n      case BDF_INTEGER:\n        fp->value.l = _bdf_atol( value, 0, 10 );\n        break;\n\n      case BDF_CARDINAL:\n        fp->value.ul = _bdf_atoul( value, 0, 10 );\n        break;\n\n      default:\n        ;\n      }\n\n      goto Exit;\n    }\n\n    /* See whether this property type exists yet or not. */\n    /* If not, create it.                                */\n    hn = hash_lookup( name, &(font->proptbl) );\n    if ( hn == 0 )\n    {\n      error = bdf_create_property( name, BDF_ATOM, font );\n      if ( error )\n        goto Exit;\n      hn = hash_lookup( name, &(font->proptbl) );\n    }\n\n    /* Allocate another property if this is overflow. */\n    if ( font->props_used == font->props_size )\n    {\n      if ( font->props_size == 0 )\n      {\n        if ( FT_NEW_ARRAY( font->props, 1 ) )\n          goto Exit;\n      }\n      else\n      {\n        if ( FT_RENEW_ARRAY( font->props,\n                             font->props_size,\n                             font->props_size + 1 ) )\n          goto Exit;\n      }\n\n      fp = font->props + font->props_size;\n      FT_MEM_ZERO( fp, sizeof ( bdf_property_t ) );\n      font->props_size++;\n    }\n\n    propid = hn->data;\n    if ( propid >= _num_bdf_properties )\n      prop = font->user_props + ( propid - _num_bdf_properties );\n    else\n      prop = (bdf_property_t*)_bdf_properties + propid;\n\n    fp = font->props + font->props_used;\n\n    fp->name    = prop->name;\n    fp->format  = prop->format;\n    fp->builtin = prop->builtin;\n\n    switch ( prop->format )\n    {\n    case BDF_ATOM:\n      fp->value.atom = 0;\n      if ( value != 0 && value[0] )\n      {\n        if ( FT_STRDUP( fp->value.atom, value ) )\n          goto Exit;\n      }\n      break;\n\n    case BDF_INTEGER:\n      fp->value.l = _bdf_atol( value, 0, 10 );\n      break;\n\n    case BDF_CARDINAL:\n      fp->value.ul = _bdf_atoul( value, 0, 10 );\n      break;\n    }\n\n    /* If the property happens to be a comment, then it doesn't need */\n    /* to be added to the internal hash table.                       */\n    if ( _bdf_strncmp( name, \"COMMENT\", 7 ) != 0 )\n    {\n      /* Add the property to the font property table. */\n      error = hash_insert( fp->name,\n                           font->props_used,\n                           (hashtable *)font->internal,\n                           memory );\n      if ( error )\n        goto Exit;\n    }\n\n    font->props_used++;\n\n    /* Some special cases need to be handled here.  The DEFAULT_CHAR       */\n    /* property needs to be located if it exists in the property list, the */\n    /* FONT_ASCENT and FONT_DESCENT need to be assigned if they are        */\n    /* present, and the SPACING property should override the default       */\n    /* spacing.                                                            */\n    if ( _bdf_strncmp( name, \"DEFAULT_CHAR\", 12 ) == 0 )\n      font->default_char = fp->value.l;\n    else if ( _bdf_strncmp( name, \"FONT_ASCENT\", 11 ) == 0 )\n      font->font_ascent = fp->value.l;\n    else if ( _bdf_strncmp( name, \"FONT_DESCENT\", 12 ) == 0 )\n      font->font_descent = fp->value.l;\n    else if ( _bdf_strncmp( name, \"SPACING\", 7 ) == 0 )\n    {\n      if ( !fp->value.atom )\n      {\n        FT_ERROR(( \"_bdf_add_property: \" ERRMSG8, lineno, \"SPACING\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      if ( fp->value.atom[0] == 'p' || fp->value.atom[0] == 'P' )\n        font->spacing = BDF_PROPORTIONAL;\n      else if ( fp->value.atom[0] == 'm' || fp->value.atom[0] == 'M' )\n        font->spacing = BDF_MONOWIDTH;\n      else if ( fp->value.atom[0] == 'c' || fp->value.atom[0] == 'C' )\n        font->spacing = BDF_CHARCELL;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static const unsigned char nibble_mask[8] =\n  {\n    0xFF, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE\n  };\n\n\n  /* Actually parse the glyph info and bitmaps. */\n  static FT_Error\n  _bdf_parse_glyphs( char*          line,\n                     unsigned long  linelen,\n                     unsigned long  lineno,\n                     void*          call_data,\n                     void*          client_data )\n  {\n    int                c, mask_index;\n    char*              s;\n    unsigned char*     bp;\n    unsigned long      i, slen, nibbles;\n\n    _bdf_parse_t*      p;\n    bdf_glyph_t*       glyph;\n    bdf_font_t*        font;\n\n    FT_Memory          memory;\n    FT_Error           error = FT_Err_Ok;\n\n    FT_UNUSED( call_data );\n    FT_UNUSED( lineno );        /* only used in debug mode */\n\n\n    p = (_bdf_parse_t *)client_data;\n\n    font   = p->font;\n    memory = font->memory;\n\n    /* Check for a comment. */\n    if ( _bdf_strncmp( line, \"COMMENT\", 7 ) == 0 )\n    {\n      linelen -= 7;\n\n      s = line + 7;\n      if ( *s != 0 )\n      {\n        s++;\n        linelen--;\n      }\n      error = _bdf_add_comment( p->font, s, linelen );\n      goto Exit;\n    }\n\n    /* The very first thing expected is the number of glyphs. */\n    if ( !( p->flags & _BDF_GLYPHS ) )\n    {\n      if ( _bdf_strncmp( line, \"CHARS\", 5 ) != 0 )\n      {\n        FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG1, lineno, \"CHARS\" ));\n        error = FT_THROW( Missing_Chars_Field );\n        goto Exit;\n      }\n\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n      p->cnt = font->glyphs_size = _bdf_atoul( p->list.field[1], 0, 10 );\n\n      /* Make sure the number of glyphs is non-zero. */\n      if ( p->cnt == 0 )\n        font->glyphs_size = 64;\n\n      /* Limit ourselves to 1,114,112 glyphs in the font (this is the */\n      /* number of code points available in Unicode).                 */\n      if ( p->cnt >= 0x110000UL )\n      {\n        FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG5, lineno, \"CHARS\" ));\n        error = FT_THROW( Invalid_Argument );\n        goto Exit;\n      }\n\n      if ( FT_NEW_ARRAY( font->glyphs, font->glyphs_size ) )\n        goto Exit;\n\n      p->flags |= _BDF_GLYPHS;\n\n      goto Exit;\n    }\n\n    /* Check for the ENDFONT field. */\n    if ( _bdf_strncmp( line, \"ENDFONT\", 7 ) == 0 )\n    {\n      if ( p->flags & _BDF_GLYPH_BITS )\n      {\n        /* Missing ENDCHAR field. */\n        FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG1, lineno, \"ENDCHAR\" ));\n        error = FT_THROW( Corrupted_Font_Glyphs );\n        goto Exit;\n      }\n\n      /* Sort the glyphs by encoding. */\n      ft_qsort( (char *)font->glyphs,\n                font->glyphs_used,\n                sizeof ( bdf_glyph_t ),\n                by_encoding );\n\n      p->flags &= ~_BDF_START;\n\n      goto Exit;\n    }\n\n    /* Check for the ENDCHAR field. */\n    if ( _bdf_strncmp( line, \"ENDCHAR\", 7 ) == 0 )\n    {\n      p->glyph_enc = 0;\n      p->flags    &= ~_BDF_GLYPH_BITS;\n\n      goto Exit;\n    }\n\n    /* Check whether a glyph is being scanned but should be */\n    /* ignored because it is an unencoded glyph.            */\n    if ( ( p->flags & _BDF_GLYPH )     &&\n         p->glyph_enc            == -1 &&\n         p->opts->keep_unencoded == 0  )\n      goto Exit;\n\n    /* Check for the STARTCHAR field. */\n    if ( _bdf_strncmp( line, \"STARTCHAR\", 9 ) == 0 )\n    {\n      /* Set the character name in the parse info first until the */\n      /* encoding can be checked for an unencoded character.      */\n      FT_FREE( p->glyph_name );\n\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n\n      _bdf_list_shift( &p->list, 1 );\n\n      s = _bdf_list_join( &p->list, ' ', &slen );\n\n      if ( !s )\n      {\n        FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG8, lineno, \"STARTCHAR\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      if ( FT_NEW_ARRAY( p->glyph_name, slen + 1 ) )\n        goto Exit;\n\n      FT_MEM_COPY( p->glyph_name, s, slen + 1 );\n\n      p->flags |= _BDF_GLYPH;\n\n      FT_TRACE4(( DBGMSG1, lineno, s ));\n\n      goto Exit;\n    }\n\n    /* Check for the ENCODING field. */\n    if ( _bdf_strncmp( line, \"ENCODING\", 8 ) == 0 )\n    {\n      if ( !( p->flags & _BDF_GLYPH ) )\n      {\n        /* Missing STARTCHAR field. */\n        FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG1, lineno, \"STARTCHAR\" ));\n        error = FT_THROW( Missing_Startchar_Field );\n        goto Exit;\n      }\n\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n\n      p->glyph_enc = _bdf_atol( p->list.field[1], 0, 10 );\n\n      /* Normalize negative encoding values.  The specification only */\n      /* allows -1, but we can be more generous here.                */\n      if ( p->glyph_enc < -1 )\n        p->glyph_enc = -1;\n\n      /* Check for alternative encoding format. */\n      if ( p->glyph_enc == -1 && p->list.used > 2 )\n        p->glyph_enc = _bdf_atol( p->list.field[2], 0, 10 );\n\n      if ( p->glyph_enc < -1 )\n        p->glyph_enc = -1;\n\n      FT_TRACE4(( DBGMSG2, p->glyph_enc ));\n\n      /* Check that the encoding is in the Unicode range because  */\n      /* otherwise p->have (a bitmap with static size) overflows. */\n      if ( p->glyph_enc > 0                                      &&\n           (size_t)p->glyph_enc >= sizeof ( p->have ) /\n                                   sizeof ( unsigned long ) * 32 )\n      {\n        FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG5, lineno, \"ENCODING\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      /* Check whether this encoding has already been encountered. */\n      /* If it has then change it to unencoded so it gets added if */\n      /* indicated.                                                */\n      if ( p->glyph_enc >= 0 )\n      {\n        if ( _bdf_glyph_modified( p->have, p->glyph_enc ) )\n        {\n          /* Emit a message saying a glyph has been moved to the */\n          /* unencoded area.                                     */\n          FT_TRACE2(( \"_bdf_parse_glyphs: \" ACMSG12,\n                      p->glyph_enc, p->glyph_name ));\n          p->glyph_enc = -1;\n          font->modified = 1;\n        }\n        else\n          _bdf_set_glyph_modified( p->have, p->glyph_enc );\n      }\n\n      if ( p->glyph_enc >= 0 )\n      {\n        /* Make sure there are enough glyphs allocated in case the */\n        /* number of characters happen to be wrong.                */\n        if ( font->glyphs_used == font->glyphs_size )\n        {\n          if ( FT_RENEW_ARRAY( font->glyphs,\n                               font->glyphs_size,\n                               font->glyphs_size + 64 ) )\n            goto Exit;\n\n          font->glyphs_size += 64;\n        }\n\n        glyph           = font->glyphs + font->glyphs_used++;\n        glyph->name     = p->glyph_name;\n        glyph->encoding = p->glyph_enc;\n\n        /* Reset the initial glyph info. */\n        p->glyph_name = 0;\n      }\n      else\n      {\n        /* Unencoded glyph.  Check whether it should */\n        /* be added or not.                          */\n        if ( p->opts->keep_unencoded != 0 )\n        {\n          /* Allocate the next unencoded glyph. */\n          if ( font->unencoded_used == font->unencoded_size )\n          {\n            if ( FT_RENEW_ARRAY( font->unencoded ,\n                                 font->unencoded_size,\n                                 font->unencoded_size + 4 ) )\n              goto Exit;\n\n            font->unencoded_size += 4;\n          }\n\n          glyph           = font->unencoded + font->unencoded_used;\n          glyph->name     = p->glyph_name;\n          glyph->encoding = font->unencoded_used++;\n        }\n        else\n          /* Free up the glyph name if the unencoded shouldn't be */\n          /* kept.                                                */\n          FT_FREE( p->glyph_name );\n\n        p->glyph_name = 0;\n      }\n\n      /* Clear the flags that might be added when width and height are */\n      /* checked for consistency.                                      */\n      p->flags &= ~( _BDF_GLYPH_WIDTH_CHECK | _BDF_GLYPH_HEIGHT_CHECK );\n\n      p->flags |= _BDF_ENCODING;\n\n      goto Exit;\n    }\n\n    /* Point at the glyph being constructed. */\n    if ( p->glyph_enc == -1 )\n      glyph = font->unencoded + ( font->unencoded_used - 1 );\n    else\n      glyph = font->glyphs + ( font->glyphs_used - 1 );\n\n    /* Check whether a bitmap is being constructed. */\n    if ( p->flags & _BDF_BITMAP )\n    {\n      /* If there are more rows than are specified in the glyph metrics, */\n      /* ignore the remaining lines.                                     */\n      if ( p->row >= (unsigned long)glyph->bbx.height )\n      {\n        if ( !( p->flags & _BDF_GLYPH_HEIGHT_CHECK ) )\n        {\n          FT_TRACE2(( \"_bdf_parse_glyphs: \" ACMSG13, glyph->encoding ));\n          p->flags |= _BDF_GLYPH_HEIGHT_CHECK;\n          font->modified = 1;\n        }\n\n        goto Exit;\n      }\n\n      /* Only collect the number of nibbles indicated by the glyph     */\n      /* metrics.  If there are more columns, they are simply ignored. */\n      nibbles = glyph->bpr << 1;\n      bp      = glyph->bitmap + p->row * glyph->bpr;\n\n      for ( i = 0; i < nibbles; i++ )\n      {\n        c = line[i];\n        if ( !sbitset( hdigits, c ) )\n          break;\n        *bp = (FT_Byte)( ( *bp << 4 ) + a2i[c] );\n        if ( i + 1 < nibbles && ( i & 1 ) )\n          *++bp = 0;\n      }\n\n      /* If any line has not enough columns,            */\n      /* indicate they have been padded with zero bits. */\n      if ( i < nibbles                            &&\n           !( p->flags & _BDF_GLYPH_WIDTH_CHECK ) )\n      {\n        FT_TRACE2(( \"_bdf_parse_glyphs: \" ACMSG16, glyph->encoding ));\n        p->flags       |= _BDF_GLYPH_WIDTH_CHECK;\n        font->modified  = 1;\n      }\n\n      /* Remove possible garbage at the right. */\n      mask_index = ( glyph->bbx.width * p->font->bpp ) & 7;\n      if ( glyph->bbx.width )\n        *bp &= nibble_mask[mask_index];\n\n      /* If any line has extra columns, indicate they have been removed. */\n      if ( i == nibbles                           &&\n           sbitset( hdigits, line[nibbles] )      &&\n           !( p->flags & _BDF_GLYPH_WIDTH_CHECK ) )\n      {\n        FT_TRACE2(( \"_bdf_parse_glyphs: \" ACMSG14, glyph->encoding ));\n        p->flags       |= _BDF_GLYPH_WIDTH_CHECK;\n        font->modified  = 1;\n      }\n\n      p->row++;\n      goto Exit;\n    }\n\n    /* Expect the SWIDTH (scalable width) field next. */\n    if ( _bdf_strncmp( line, \"SWIDTH\", 6 ) == 0 )\n    {\n      if ( !( p->flags & _BDF_ENCODING ) )\n        goto Missing_Encoding;\n\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n\n      glyph->swidth = (unsigned short)_bdf_atoul( p->list.field[1], 0, 10 );\n      p->flags |= _BDF_SWIDTH;\n\n      goto Exit;\n    }\n\n    /* Expect the DWIDTH (scalable width) field next. */\n    if ( _bdf_strncmp( line, \"DWIDTH\", 6 ) == 0 )\n    {\n      if ( !( p->flags & _BDF_ENCODING ) )\n        goto Missing_Encoding;\n\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n\n      glyph->dwidth = (unsigned short)_bdf_atoul( p->list.field[1], 0, 10 );\n\n      if ( !( p->flags & _BDF_SWIDTH ) )\n      {\n        /* Missing SWIDTH field.  Emit an auto correction message and set */\n        /* the scalable width from the device width.                      */\n        FT_TRACE2(( \"_bdf_parse_glyphs: \" ACMSG9, lineno ));\n\n        glyph->swidth = (unsigned short)FT_MulDiv(\n                          glyph->dwidth, 72000L,\n                          (FT_Long)( font->point_size *\n                                     font->resolution_x ) );\n      }\n\n      p->flags |= _BDF_DWIDTH;\n      goto Exit;\n    }\n\n    /* Expect the BBX field next. */\n    if ( _bdf_strncmp( line, \"BBX\", 3 ) == 0 )\n    {\n      if ( !( p->flags & _BDF_ENCODING ) )\n        goto Missing_Encoding;\n\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n\n      glyph->bbx.width    = _bdf_atos( p->list.field[1], 0, 10 );\n      glyph->bbx.height   = _bdf_atos( p->list.field[2], 0, 10 );\n      glyph->bbx.x_offset = _bdf_atos( p->list.field[3], 0, 10 );\n      glyph->bbx.y_offset = _bdf_atos( p->list.field[4], 0, 10 );\n\n      /* Generate the ascent and descent of the character. */\n      glyph->bbx.ascent  = (short)( glyph->bbx.height + glyph->bbx.y_offset );\n      glyph->bbx.descent = (short)( -glyph->bbx.y_offset );\n\n      /* Determine the overall font bounding box as the characters are */\n      /* loaded so corrections can be done later if indicated.         */\n      p->maxas    = (short)FT_MAX( glyph->bbx.ascent, p->maxas );\n      p->maxds    = (short)FT_MAX( glyph->bbx.descent, p->maxds );\n\n      p->rbearing = (short)( glyph->bbx.width + glyph->bbx.x_offset );\n\n      p->maxrb    = (short)FT_MAX( p->rbearing, p->maxrb );\n      p->minlb    = (short)FT_MIN( glyph->bbx.x_offset, p->minlb );\n      p->maxlb    = (short)FT_MAX( glyph->bbx.x_offset, p->maxlb );\n\n      if ( !( p->flags & _BDF_DWIDTH ) )\n      {\n        /* Missing DWIDTH field.  Emit an auto correction message and set */\n        /* the device width to the glyph width.                           */\n        FT_TRACE2(( \"_bdf_parse_glyphs: \" ACMSG10, lineno ));\n        glyph->dwidth = glyph->bbx.width;\n      }\n\n      /* If the BDF_CORRECT_METRICS flag is set, then adjust the SWIDTH */\n      /* value if necessary.                                            */\n      if ( p->opts->correct_metrics != 0 )\n      {\n        /* Determine the point size of the glyph. */\n        unsigned short  sw = (unsigned short)FT_MulDiv(\n                               glyph->dwidth, 72000L,\n                               (FT_Long)( font->point_size *\n                                          font->resolution_x ) );\n\n\n        if ( sw != glyph->swidth )\n        {\n          glyph->swidth = sw;\n\n          if ( p->glyph_enc == -1 )\n            _bdf_set_glyph_modified( font->umod,\n                                     font->unencoded_used - 1 );\n          else\n            _bdf_set_glyph_modified( font->nmod, glyph->encoding );\n\n          p->flags       |= _BDF_SWIDTH_ADJ;\n          font->modified  = 1;\n        }\n      }\n\n      p->flags |= _BDF_BBX;\n      goto Exit;\n    }\n\n    /* And finally, gather up the bitmap. */\n    if ( _bdf_strncmp( line, \"BITMAP\", 6 ) == 0 )\n    {\n      unsigned long  bitmap_size;\n\n\n      if ( !( p->flags & _BDF_BBX ) )\n      {\n        /* Missing BBX field. */\n        FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG1, lineno, \"BBX\" ));\n        error = FT_THROW( Missing_Bbx_Field );\n        goto Exit;\n      }\n\n      /* Allocate enough space for the bitmap. */\n      glyph->bpr = ( glyph->bbx.width * p->font->bpp + 7 ) >> 3;\n\n      bitmap_size = glyph->bpr * glyph->bbx.height;\n      if ( glyph->bpr > 0xFFFFU || bitmap_size > 0xFFFFU )\n      {\n        FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG4, lineno ));\n        error = FT_THROW( Bbx_Too_Big );\n        goto Exit;\n      }\n      else\n        glyph->bytes = (unsigned short)bitmap_size;\n\n      if ( FT_NEW_ARRAY( glyph->bitmap, glyph->bytes ) )\n        goto Exit;\n\n      p->row    = 0;\n      p->flags |= _BDF_BITMAP;\n\n      goto Exit;\n    }\n\n    FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG9, lineno ));\n    error = FT_THROW( Invalid_File_Format );\n    goto Exit;\n\n  Missing_Encoding:\n    /* Missing ENCODING field. */\n    FT_ERROR(( \"_bdf_parse_glyphs: \" ERRMSG1, lineno, \"ENCODING\" ));\n    error = FT_THROW( Missing_Encoding_Field );\n\n  Exit:\n    if ( error && ( p->flags & _BDF_GLYPH ) )\n      FT_FREE( p->glyph_name );\n\n    return error;\n  }\n\n\n  /* Load the font properties. */\n  static FT_Error\n  _bdf_parse_properties( char*          line,\n                         unsigned long  linelen,\n                         unsigned long  lineno,\n                         void*          call_data,\n                         void*          client_data )\n  {\n    unsigned long      vlen;\n    _bdf_line_func_t*  next;\n    _bdf_parse_t*      p;\n    char*              name;\n    char*              value;\n    char               nbuf[128];\n    FT_Error           error = FT_Err_Ok;\n\n    FT_UNUSED( lineno );\n\n\n    next = (_bdf_line_func_t *)call_data;\n    p    = (_bdf_parse_t *)    client_data;\n\n    /* Check for the end of the properties. */\n    if ( _bdf_strncmp( line, \"ENDPROPERTIES\", 13 ) == 0 )\n    {\n      /* If the FONT_ASCENT or FONT_DESCENT properties have not been      */\n      /* encountered yet, then make sure they are added as properties and */\n      /* make sure they are set from the font bounding box info.          */\n      /*                                                                  */\n      /* This is *always* done regardless of the options, because X11     */\n      /* requires these two fields to compile fonts.                      */\n      if ( bdf_get_font_property( p->font, \"FONT_ASCENT\" ) == 0 )\n      {\n        p->font->font_ascent = p->font->bbx.ascent;\n        ft_sprintf( nbuf, \"%hd\", p->font->bbx.ascent );\n        error = _bdf_add_property( p->font, (char *)\"FONT_ASCENT\",\n                                   nbuf, lineno );\n        if ( error )\n          goto Exit;\n\n        FT_TRACE2(( \"_bdf_parse_properties: \" ACMSG1, p->font->bbx.ascent ));\n        p->font->modified = 1;\n      }\n\n      if ( bdf_get_font_property( p->font, \"FONT_DESCENT\" ) == 0 )\n      {\n        p->font->font_descent = p->font->bbx.descent;\n        ft_sprintf( nbuf, \"%hd\", p->font->bbx.descent );\n        error = _bdf_add_property( p->font, (char *)\"FONT_DESCENT\",\n                                   nbuf, lineno );\n        if ( error )\n          goto Exit;\n\n        FT_TRACE2(( \"_bdf_parse_properties: \" ACMSG2, p->font->bbx.descent ));\n        p->font->modified = 1;\n      }\n\n      p->flags &= ~_BDF_PROPS;\n      *next     = _bdf_parse_glyphs;\n\n      goto Exit;\n    }\n\n    /* Ignore the _XFREE86_GLYPH_RANGES properties. */\n    if ( _bdf_strncmp( line, \"_XFREE86_GLYPH_RANGES\", 21 ) == 0 )\n      goto Exit;\n\n    /* Handle COMMENT fields and properties in a special way to preserve */\n    /* the spacing.                                                      */\n    if ( _bdf_strncmp( line, \"COMMENT\", 7 ) == 0 )\n    {\n      name = value = line;\n      value += 7;\n      if ( *value )\n        *value++ = 0;\n      error = _bdf_add_property( p->font, name, value, lineno );\n      if ( error )\n        goto Exit;\n    }\n    else if ( _bdf_is_atom( line, linelen, &name, &value, p->font ) )\n    {\n      error = _bdf_add_property( p->font, name, value, lineno );\n      if ( error )\n        goto Exit;\n    }\n    else\n    {\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n      name = p->list.field[0];\n\n      _bdf_list_shift( &p->list, 1 );\n      value = _bdf_list_join( &p->list, ' ', &vlen );\n\n      error = _bdf_add_property( p->font, name, value, lineno );\n      if ( error )\n        goto Exit;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* Load the font header. */\n  static FT_Error\n  _bdf_parse_start( char*          line,\n                    unsigned long  linelen,\n                    unsigned long  lineno,\n                    void*          call_data,\n                    void*          client_data )\n  {\n    unsigned long      slen;\n    _bdf_line_func_t*  next;\n    _bdf_parse_t*      p;\n    bdf_font_t*        font;\n    char               *s;\n\n    FT_Memory          memory = NULL;\n    FT_Error           error  = FT_Err_Ok;\n\n    FT_UNUSED( lineno );            /* only used in debug mode */\n\n\n    next = (_bdf_line_func_t *)call_data;\n    p    = (_bdf_parse_t *)    client_data;\n\n    if ( p->font )\n      memory = p->font->memory;\n\n    /* Check for a comment.  This is done to handle those fonts that have */\n    /* comments before the STARTFONT line for some reason.                */\n    if ( _bdf_strncmp( line, \"COMMENT\", 7 ) == 0 )\n    {\n      if ( p->opts->keep_comments != 0 && p->font != 0 )\n      {\n        linelen -= 7;\n\n        s = line + 7;\n        if ( *s != 0 )\n        {\n          s++;\n          linelen--;\n        }\n\n        error = _bdf_add_comment( p->font, s, linelen );\n        if ( error )\n          goto Exit;\n        /* here font is not defined! */\n      }\n\n      goto Exit;\n    }\n\n    if ( !( p->flags & _BDF_START ) )\n    {\n      memory = p->memory;\n\n      if ( _bdf_strncmp( line, \"STARTFONT\", 9 ) != 0 )\n      {\n        /* we don't emit an error message since this code gets */\n        /* explicitly caught one level higher                  */\n        error = FT_THROW( Missing_Startfont_Field );\n        goto Exit;\n      }\n\n      p->flags = _BDF_START;\n      font = p->font = 0;\n\n      if ( FT_NEW( font ) )\n        goto Exit;\n      p->font = font;\n\n      font->memory = p->memory;\n      p->memory    = 0;\n\n      { /* setup */\n        size_t           i;\n        bdf_property_t*  prop;\n\n\n        error = hash_init( &(font->proptbl), memory );\n        if ( error )\n          goto Exit;\n        for ( i = 0, prop = (bdf_property_t*)_bdf_properties;\n              i < _num_bdf_properties; i++, prop++ )\n        {\n          error = hash_insert( prop->name, i,\n                               &(font->proptbl), memory );\n          if ( error )\n            goto Exit;\n        }\n      }\n\n      if ( FT_ALLOC( p->font->internal, sizeof ( hashtable ) ) )\n        goto Exit;\n      error = hash_init( (hashtable *)p->font->internal,memory );\n      if ( error )\n        goto Exit;\n      p->font->spacing      = p->opts->font_spacing;\n      p->font->default_char = -1;\n\n      goto Exit;\n    }\n\n    /* Check for the start of the properties. */\n    if ( _bdf_strncmp( line, \"STARTPROPERTIES\", 15 ) == 0 )\n    {\n      if ( !( p->flags & _BDF_FONT_BBX ) )\n      {\n        /* Missing the FONTBOUNDINGBOX field. */\n        FT_ERROR(( \"_bdf_parse_start: \" ERRMSG1, lineno, \"FONTBOUNDINGBOX\" ));\n        error = FT_THROW( Missing_Fontboundingbox_Field );\n        goto Exit;\n      }\n\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n      /* at this point, `p->font' can't be NULL */\n      p->cnt = p->font->props_size = _bdf_atoul( p->list.field[1], 0, 10 );\n\n      if ( FT_NEW_ARRAY( p->font->props, p->cnt ) )\n      {\n        p->font->props_size = 0;\n        goto Exit;\n      }\n\n      p->flags |= _BDF_PROPS;\n      *next     = _bdf_parse_properties;\n\n      goto Exit;\n    }\n\n    /* Check for the FONTBOUNDINGBOX field. */\n    if ( _bdf_strncmp( line, \"FONTBOUNDINGBOX\", 15 ) == 0 )\n    {\n      if ( !( p->flags & _BDF_SIZE ) )\n      {\n        /* Missing the SIZE field. */\n        FT_ERROR(( \"_bdf_parse_start: \" ERRMSG1, lineno, \"SIZE\" ));\n        error = FT_THROW( Missing_Size_Field );\n        goto Exit;\n      }\n\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n\n      p->font->bbx.width  = _bdf_atos( p->list.field[1], 0, 10 );\n      p->font->bbx.height = _bdf_atos( p->list.field[2], 0, 10 );\n\n      p->font->bbx.x_offset = _bdf_atos( p->list.field[3], 0, 10 );\n      p->font->bbx.y_offset = _bdf_atos( p->list.field[4], 0, 10 );\n\n      p->font->bbx.ascent  = (short)( p->font->bbx.height +\n                                      p->font->bbx.y_offset );\n\n      p->font->bbx.descent = (short)( -p->font->bbx.y_offset );\n\n      p->flags |= _BDF_FONT_BBX;\n\n      goto Exit;\n    }\n\n    /* The next thing to check for is the FONT field. */\n    if ( _bdf_strncmp( line, \"FONT\", 4 ) == 0 )\n    {\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n      _bdf_list_shift( &p->list, 1 );\n\n      s = _bdf_list_join( &p->list, ' ', &slen );\n\n      if ( !s )\n      {\n        FT_ERROR(( \"_bdf_parse_start: \" ERRMSG8, lineno, \"FONT\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      /* Allowing multiple `FONT' lines (which is invalid) doesn't hurt... */\n      FT_FREE( p->font->name );\n\n      if ( FT_NEW_ARRAY( p->font->name, slen + 1 ) )\n        goto Exit;\n      FT_MEM_COPY( p->font->name, s, slen + 1 );\n\n      /* If the font name is an XLFD name, set the spacing to the one in  */\n      /* the font name.  If there is no spacing fall back on the default. */\n      error = _bdf_set_default_spacing( p->font, p->opts, lineno );\n      if ( error )\n        goto Exit;\n\n      p->flags |= _BDF_FONT_NAME;\n\n      goto Exit;\n    }\n\n    /* Check for the SIZE field. */\n    if ( _bdf_strncmp( line, \"SIZE\", 4 ) == 0 )\n    {\n      if ( !( p->flags & _BDF_FONT_NAME ) )\n      {\n        /* Missing the FONT field. */\n        FT_ERROR(( \"_bdf_parse_start: \" ERRMSG1, lineno, \"FONT\" ));\n        error = FT_THROW( Missing_Font_Field );\n        goto Exit;\n      }\n\n      error = _bdf_list_split( &p->list, (char *)\" +\", line, linelen );\n      if ( error )\n        goto Exit;\n\n      p->font->point_size   = _bdf_atoul( p->list.field[1], 0, 10 );\n      p->font->resolution_x = _bdf_atoul( p->list.field[2], 0, 10 );\n      p->font->resolution_y = _bdf_atoul( p->list.field[3], 0, 10 );\n\n      /* Check for the bits per pixel field. */\n      if ( p->list.used == 5 )\n      {\n        unsigned short bitcount, i, shift;\n\n\n        p->font->bpp = (unsigned short)_bdf_atos( p->list.field[4], 0, 10 );\n\n        /* Only values 1, 2, 4, 8 are allowed. */\n        shift = p->font->bpp;\n        bitcount = 0;\n        for ( i = 0; shift > 0; i++ )\n        {\n          if ( shift & 1 )\n            bitcount = i;\n          shift >>= 1;\n        }\n\n        shift = (short)( ( bitcount > 3 ) ? 8 : ( 1 << bitcount ) );\n\n        if ( p->font->bpp > shift || p->font->bpp != shift )\n        {\n          /* select next higher value */\n          p->font->bpp = (unsigned short)( shift << 1 );\n          FT_TRACE2(( \"_bdf_parse_start: \" ACMSG11, p->font->bpp ));\n        }\n      }\n      else\n        p->font->bpp = 1;\n\n      p->flags |= _BDF_SIZE;\n\n      goto Exit;\n    }\n\n    /* Check for the CHARS field -- font properties are optional */\n    if ( _bdf_strncmp( line, \"CHARS\", 5 ) == 0 )\n    {\n      char  nbuf[128];\n\n\n      if ( !( p->flags & _BDF_FONT_BBX ) )\n      {\n        /* Missing the FONTBOUNDINGBOX field. */\n        FT_ERROR(( \"_bdf_parse_start: \" ERRMSG1, lineno, \"FONTBOUNDINGBOX\" ));\n        error = FT_THROW( Missing_Fontboundingbox_Field );\n        goto Exit;\n      }\n\n      /* Add the two standard X11 properties which are required */\n      /* for compiling fonts.                                   */\n      p->font->font_ascent = p->font->bbx.ascent;\n      ft_sprintf( nbuf, \"%hd\", p->font->bbx.ascent );\n      error = _bdf_add_property( p->font, (char *)\"FONT_ASCENT\",\n                                 nbuf, lineno );\n      if ( error )\n        goto Exit;\n      FT_TRACE2(( \"_bdf_parse_properties: \" ACMSG1, p->font->bbx.ascent ));\n\n      p->font->font_descent = p->font->bbx.descent;\n      ft_sprintf( nbuf, \"%hd\", p->font->bbx.descent );\n      error = _bdf_add_property( p->font, (char *)\"FONT_DESCENT\",\n                                 nbuf, lineno );\n      if ( error )\n        goto Exit;\n      FT_TRACE2(( \"_bdf_parse_properties: \" ACMSG2, p->font->bbx.descent ));\n\n      p->font->modified = 1;\n\n      *next = _bdf_parse_glyphs;\n\n      /* A special return value. */\n      error = -1;\n      goto Exit;\n    }\n\n    FT_ERROR(( \"_bdf_parse_start: \" ERRMSG9, lineno ));\n    error = FT_THROW( Invalid_File_Format );\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* API.                                                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  FT_LOCAL_DEF( FT_Error )\n  bdf_load_font( FT_Stream       stream,\n                 FT_Memory       extmemory,\n                 bdf_options_t*  opts,\n                 bdf_font_t*    *font )\n  {\n    unsigned long  lineno = 0; /* make compiler happy */\n    _bdf_parse_t   *p     = NULL;\n\n    FT_Memory  memory = extmemory; /* needed for FT_NEW */\n    FT_Error   error  = FT_Err_Ok;\n\n\n    if ( FT_NEW( p ) )\n      goto Exit;\n\n    memory    = NULL;\n    p->opts   = (bdf_options_t*)( ( opts != 0 ) ? opts : &_bdf_opts );\n    p->minlb  = 32767;\n    p->memory = extmemory;  /* only during font creation */\n\n    _bdf_list_init( &p->list, extmemory );\n\n    error = _bdf_readstream( stream, _bdf_parse_start,\n                             (void *)p, &lineno );\n    if ( error )\n      goto Fail;\n\n    if ( p->font != 0 )\n    {\n      /* If the font is not proportional, set the font's monowidth */\n      /* field to the width of the font bounding box.              */\n\n      if ( p->font->spacing != BDF_PROPORTIONAL )\n        p->font->monowidth = p->font->bbx.width;\n\n      /* If the number of glyphs loaded is not that of the original count, */\n      /* indicate the difference.                                          */\n      if ( p->cnt != p->font->glyphs_used + p->font->unencoded_used )\n      {\n        FT_TRACE2(( \"bdf_load_font: \" ACMSG15, p->cnt,\n                    p->font->glyphs_used + p->font->unencoded_used ));\n        p->font->modified = 1;\n      }\n\n      /* Once the font has been loaded, adjust the overall font metrics if */\n      /* necessary.                                                        */\n      if ( p->opts->correct_metrics != 0 &&\n           ( p->font->glyphs_used > 0 || p->font->unencoded_used > 0 ) )\n      {\n        if ( p->maxrb - p->minlb != p->font->bbx.width )\n        {\n          FT_TRACE2(( \"bdf_load_font: \" ACMSG3,\n                      p->font->bbx.width, p->maxrb - p->minlb ));\n          p->font->bbx.width = (unsigned short)( p->maxrb - p->minlb );\n          p->font->modified  = 1;\n        }\n\n        if ( p->font->bbx.x_offset != p->minlb )\n        {\n          FT_TRACE2(( \"bdf_load_font: \" ACMSG4,\n                      p->font->bbx.x_offset, p->minlb ));\n          p->font->bbx.x_offset = p->minlb;\n          p->font->modified     = 1;\n        }\n\n        if ( p->font->bbx.ascent != p->maxas )\n        {\n          FT_TRACE2(( \"bdf_load_font: \" ACMSG5,\n                      p->font->bbx.ascent, p->maxas ));\n          p->font->bbx.ascent = p->maxas;\n          p->font->modified   = 1;\n        }\n\n        if ( p->font->bbx.descent != p->maxds )\n        {\n          FT_TRACE2(( \"bdf_load_font: \" ACMSG6,\n                      p->font->bbx.descent, p->maxds ));\n          p->font->bbx.descent  = p->maxds;\n          p->font->bbx.y_offset = (short)( -p->maxds );\n          p->font->modified     = 1;\n        }\n\n        if ( p->maxas + p->maxds != p->font->bbx.height )\n        {\n          FT_TRACE2(( \"bdf_load_font: \" ACMSG7,\n                      p->font->bbx.height, p->maxas + p->maxds ));\n          p->font->bbx.height = (unsigned short)( p->maxas + p->maxds );\n        }\n\n        if ( p->flags & _BDF_SWIDTH_ADJ )\n          FT_TRACE2(( \"bdf_load_font: \" ACMSG8 ));\n      }\n    }\n\n    if ( p->flags & _BDF_START )\n    {\n      /* The ENDFONT field was never reached or did not exist. */\n      if ( !( p->flags & _BDF_GLYPHS ) )\n      {\n        /* Error happened while parsing header. */\n        FT_ERROR(( \"bdf_load_font: \" ERRMSG2, lineno ));\n        error = FT_THROW( Corrupted_Font_Header );\n        goto Exit;\n      }\n      else\n      {\n        /* Error happened when parsing glyphs. */\n        FT_ERROR(( \"bdf_load_font: \" ERRMSG3, lineno ));\n        error = FT_THROW( Corrupted_Font_Glyphs );\n        goto Exit;\n      }\n    }\n\n    if ( p->font != 0 )\n    {\n      /* Make sure the comments are NULL terminated if they exist. */\n      memory = p->font->memory;\n\n      if ( p->font->comments_len > 0 )\n      {\n        if ( FT_RENEW_ARRAY( p->font->comments,\n                             p->font->comments_len,\n                             p->font->comments_len + 1 ) )\n          goto Fail;\n\n        p->font->comments[p->font->comments_len] = 0;\n      }\n    }\n    else if ( error == FT_Err_Ok )\n      error = FT_THROW( Invalid_File_Format );\n\n    *font = p->font;\n\n  Exit:\n    if ( p )\n    {\n      _bdf_list_done( &p->list );\n\n      memory = extmemory;\n\n      FT_FREE( p );\n    }\n\n    return error;\n\n  Fail:\n    bdf_free_font( p->font );\n\n    memory = extmemory;\n\n    FT_FREE( p->font );\n\n    goto Exit;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  bdf_free_font( bdf_font_t*  font )\n  {\n    bdf_property_t*  prop;\n    unsigned long    i;\n    bdf_glyph_t*     glyphs;\n    FT_Memory        memory;\n\n\n    if ( font == 0 )\n      return;\n\n    memory = font->memory;\n\n    FT_FREE( font->name );\n\n    /* Free up the internal hash table of property names. */\n    if ( font->internal )\n    {\n      hash_free( (hashtable *)font->internal, memory );\n      FT_FREE( font->internal );\n    }\n\n    /* Free up the comment info. */\n    FT_FREE( font->comments );\n\n    /* Free up the properties. */\n    for ( i = 0; i < font->props_size; i++ )\n    {\n      if ( font->props[i].format == BDF_ATOM )\n        FT_FREE( font->props[i].value.atom );\n    }\n\n    FT_FREE( font->props );\n\n    /* Free up the character info. */\n    for ( i = 0, glyphs = font->glyphs;\n          i < font->glyphs_used; i++, glyphs++ )\n    {\n      FT_FREE( glyphs->name );\n      FT_FREE( glyphs->bitmap );\n    }\n\n    for ( i = 0, glyphs = font->unencoded; i < font->unencoded_used;\n          i++, glyphs++ )\n    {\n      FT_FREE( glyphs->name );\n      FT_FREE( glyphs->bitmap );\n    }\n\n    FT_FREE( font->glyphs );\n    FT_FREE( font->unencoded );\n\n    /* Free up the overflow storage if it was used. */\n    for ( i = 0, glyphs = font->overflow.glyphs;\n          i < font->overflow.glyphs_used; i++, glyphs++ )\n    {\n      FT_FREE( glyphs->name );\n      FT_FREE( glyphs->bitmap );\n    }\n\n    FT_FREE( font->overflow.glyphs );\n\n    /* bdf_cleanup */\n    hash_free( &(font->proptbl), memory );\n\n    /* Free up the user defined properties. */\n    for ( prop = font->user_props, i = 0;\n          i < font->nuser_props; i++, prop++ )\n    {\n      FT_FREE( prop->name );\n      if ( prop->format == BDF_ATOM )\n        FT_FREE( prop->value.atom );\n    }\n\n    FT_FREE( font->user_props );\n\n    /* FREE( font ); */ /* XXX Fixme */\n  }\n\n\n  FT_LOCAL_DEF( bdf_property_t * )\n  bdf_get_font_property( bdf_font_t*  font,\n                         const char*  name )\n  {\n    hashnode  hn;\n\n\n    if ( font == 0 || font->props_size == 0 || name == 0 || *name == 0 )\n      return 0;\n\n    hn = hash_lookup( name, (hashtable *)font->internal );\n\n    return hn ? ( font->props + hn->data ) : 0;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/bzip2/ftbzip2.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbzip2.c                                                              */\n/*                                                                         */\n/*    FreeType support for .bz2 compressed files.                          */\n/*                                                                         */\n/*  This optional component relies on libbz2.  It should mainly be used to */\n/*  parse compressed PCF fonts, as found with many X11 server              */\n/*  distributions.                                                         */\n/*                                                                         */\n/*  Copyright 2010, 2012-2014 by                                           */\n/*  Joel Klinghed.                                                         */\n/*                                                                         */\n/*  Based on src/gzip/ftgzip.c, Copyright 2002 - 2010 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_MEMORY_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_BZIP2_H\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  Bzip2_Err_\n#define FT_ERR_BASE    FT_Mod_Err_Bzip2\n\n#include FT_ERRORS_H\n\n\n#ifdef FT_CONFIG_OPTION_USE_BZIP2\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"bzip2 code does not support PIC yet\"\n#endif\n\n#define BZ_NO_STDIO /* Do not need FILE */\n#include <bzlib.h>\n\n\n/***************************************************************************/\n/***************************************************************************/\n/*****                                                                 *****/\n/*****           B Z I P 2   M E M O R Y   M A N A G E M E N T         *****/\n/*****                                                                 *****/\n/***************************************************************************/\n/***************************************************************************/\n\n  /* it is better to use FreeType memory routines instead of raw\n     'malloc/free' */\n\n  typedef void *(* alloc_func)(void*, int, int);\n  typedef void (* free_func)(void*, void*);\n\n  static void*\n  ft_bzip2_alloc( FT_Memory  memory,\n                  int        items,\n                  int        size )\n  {\n    FT_ULong    sz = (FT_ULong)size * items;\n    FT_Error    error;\n    FT_Pointer  p  = NULL;\n\n\n    (void)FT_ALLOC( p, sz );\n    return p;\n  }\n\n\n  static void\n  ft_bzip2_free( FT_Memory  memory,\n                 void*      address )\n  {\n    FT_MEM_FREE( address );\n  }\n\n\n/***************************************************************************/\n/***************************************************************************/\n/*****                                                                 *****/\n/*****              B Z I P 2   F I L E   D E S C R I P T O R          *****/\n/*****                                                                 *****/\n/***************************************************************************/\n/***************************************************************************/\n\n#define FT_BZIP2_BUFFER_SIZE  4096\n\n  typedef struct  FT_BZip2FileRec_\n  {\n    FT_Stream  source;         /* parent/source stream        */\n    FT_Stream  stream;         /* embedding stream            */\n    FT_Memory  memory;         /* memory allocator            */\n    bz_stream  bzstream;       /* bzlib input stream          */\n\n    FT_Byte    input[FT_BZIP2_BUFFER_SIZE];  /* input read buffer  */\n\n    FT_Byte    buffer[FT_BZIP2_BUFFER_SIZE]; /* output buffer      */\n    FT_ULong   pos;                          /* position in output */\n    FT_Byte*   cursor;\n    FT_Byte*   limit;\n\n  } FT_BZip2FileRec, *FT_BZip2File;\n\n\n  /* check and skip .bz2 header - we don't support `transparent' compression */\n  static FT_Error\n  ft_bzip2_check_header( FT_Stream  stream )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_Byte   head[4];\n\n\n    if ( FT_STREAM_SEEK( 0 )       ||\n         FT_STREAM_READ( head, 4 ) )\n      goto Exit;\n\n    /* head[0] && head[1] are the magic numbers;    */\n    /* head[2] is the version, and head[3] the blocksize */\n    if ( head[0] != 0x42  ||\n         head[1] != 0x5A  ||\n         head[2] != 0x68  )  /* only support bzip2 (huffman) */\n    {\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  ft_bzip2_file_init( FT_BZip2File  zip,\n                      FT_Stream     stream,\n                      FT_Stream     source )\n  {\n    bz_stream*  bzstream = &zip->bzstream;\n    FT_Error    error    = FT_Err_Ok;\n\n\n    zip->stream = stream;\n    zip->source = source;\n    zip->memory = stream->memory;\n\n    zip->limit  = zip->buffer + FT_BZIP2_BUFFER_SIZE;\n    zip->cursor = zip->limit;\n    zip->pos    = 0;\n\n    /* check .bz2 header */\n    {\n      stream = source;\n\n      error = ft_bzip2_check_header( stream );\n      if ( error )\n        goto Exit;\n\n      if ( FT_STREAM_SEEK( 0 ) )\n        goto Exit;\n    }\n\n    /* initialize bzlib */\n    bzstream->bzalloc = (alloc_func)ft_bzip2_alloc;\n    bzstream->bzfree  = (free_func) ft_bzip2_free;\n    bzstream->opaque  = zip->memory;\n\n    bzstream->avail_in = 0;\n    bzstream->next_in  = (char*)zip->buffer;\n\n    if ( BZ2_bzDecompressInit( bzstream, 0, 0 ) != BZ_OK ||\n         bzstream->next_in == NULL                       )\n      error = FT_THROW( Invalid_File_Format );\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  ft_bzip2_file_done( FT_BZip2File  zip )\n  {\n    bz_stream*  bzstream = &zip->bzstream;\n\n\n    BZ2_bzDecompressEnd( bzstream );\n\n    /* clear the rest */\n    bzstream->bzalloc   = NULL;\n    bzstream->bzfree    = NULL;\n    bzstream->opaque    = NULL;\n    bzstream->next_in   = NULL;\n    bzstream->next_out  = NULL;\n    bzstream->avail_in  = 0;\n    bzstream->avail_out = 0;\n\n    zip->memory = NULL;\n    zip->source = NULL;\n    zip->stream = NULL;\n  }\n\n\n  static FT_Error\n  ft_bzip2_file_reset( FT_BZip2File  zip )\n  {\n    FT_Stream  stream = zip->source;\n    FT_Error   error;\n\n\n    if ( !FT_STREAM_SEEK( 0 ) )\n    {\n      bz_stream*  bzstream = &zip->bzstream;\n\n\n      BZ2_bzDecompressEnd( bzstream );\n\n      bzstream->avail_in  = 0;\n      bzstream->next_in   = (char*)zip->input;\n      bzstream->avail_out = 0;\n      bzstream->next_out  = (char*)zip->buffer;\n\n      zip->limit  = zip->buffer + FT_BZIP2_BUFFER_SIZE;\n      zip->cursor = zip->limit;\n      zip->pos    = 0;\n\n      BZ2_bzDecompressInit( bzstream, 0, 0 );\n    }\n\n    return error;\n  }\n\n\n  static FT_Error\n  ft_bzip2_file_fill_input( FT_BZip2File  zip )\n  {\n    bz_stream*  bzstream = &zip->bzstream;\n    FT_Stream   stream    = zip->source;\n    FT_ULong    size;\n\n\n    if ( stream->read )\n    {\n      size = stream->read( stream, stream->pos, zip->input,\n                           FT_BZIP2_BUFFER_SIZE );\n      if ( size == 0 )\n        return FT_THROW( Invalid_Stream_Operation );\n    }\n    else\n    {\n      size = stream->size - stream->pos;\n      if ( size > FT_BZIP2_BUFFER_SIZE )\n        size = FT_BZIP2_BUFFER_SIZE;\n\n      if ( size == 0 )\n        return FT_THROW( Invalid_Stream_Operation );\n\n      FT_MEM_COPY( zip->input, stream->base + stream->pos, size );\n    }\n    stream->pos += size;\n\n    bzstream->next_in  = (char*)zip->input;\n    bzstream->avail_in = size;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  ft_bzip2_file_fill_output( FT_BZip2File  zip )\n  {\n    bz_stream*  bzstream = &zip->bzstream;\n    FT_Error    error    = FT_Err_Ok;\n\n\n    zip->cursor         = zip->buffer;\n    bzstream->next_out  = (char*)zip->cursor;\n    bzstream->avail_out = FT_BZIP2_BUFFER_SIZE;\n\n    while ( bzstream->avail_out > 0 )\n    {\n      int  err;\n\n\n      if ( bzstream->avail_in == 0 )\n      {\n        error = ft_bzip2_file_fill_input( zip );\n        if ( error )\n          break;\n      }\n\n      err = BZ2_bzDecompress( bzstream );\n\n      if ( err == BZ_STREAM_END )\n      {\n        zip->limit = (FT_Byte*)bzstream->next_out;\n        if ( zip->limit == zip->cursor )\n          error = FT_THROW( Invalid_Stream_Operation );\n        break;\n      }\n      else if ( err != BZ_OK )\n      {\n        error = FT_THROW( Invalid_Stream_Operation );\n        break;\n      }\n    }\n\n    return error;\n  }\n\n\n  /* fill output buffer; `count' must be <= FT_BZIP2_BUFFER_SIZE */\n  static FT_Error\n  ft_bzip2_file_skip_output( FT_BZip2File  zip,\n                             FT_ULong      count )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_ULong  delta;\n\n\n    for (;;)\n    {\n      delta = (FT_ULong)( zip->limit - zip->cursor );\n      if ( delta >= count )\n        delta = count;\n\n      zip->cursor += delta;\n      zip->pos    += delta;\n\n      count -= delta;\n      if ( count == 0 )\n        break;\n\n      error = ft_bzip2_file_fill_output( zip );\n      if ( error )\n        break;\n    }\n\n    return error;\n  }\n\n\n  static FT_ULong\n  ft_bzip2_file_io( FT_BZip2File  zip,\n                    FT_ULong      pos,\n                    FT_Byte*      buffer,\n                    FT_ULong      count )\n  {\n    FT_ULong  result = 0;\n    FT_Error  error;\n\n\n    /* Reset inflate stream if we're seeking backwards.        */\n    /* Yes, that is not too efficient, but it saves memory :-) */\n    if ( pos < zip->pos )\n    {\n      error = ft_bzip2_file_reset( zip );\n      if ( error )\n        goto Exit;\n    }\n\n    /* skip unwanted bytes */\n    if ( pos > zip->pos )\n    {\n      error = ft_bzip2_file_skip_output( zip, (FT_ULong)( pos - zip->pos ) );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( count == 0 )\n      goto Exit;\n\n    /* now read the data */\n    for (;;)\n    {\n      FT_ULong  delta;\n\n\n      delta = (FT_ULong)( zip->limit - zip->cursor );\n      if ( delta >= count )\n        delta = count;\n\n      FT_MEM_COPY( buffer, zip->cursor, delta );\n      buffer      += delta;\n      result      += delta;\n      zip->cursor += delta;\n      zip->pos    += delta;\n\n      count -= delta;\n      if ( count == 0 )\n        break;\n\n      error = ft_bzip2_file_fill_output( zip );\n      if ( error )\n        break;\n    }\n\n  Exit:\n    return result;\n  }\n\n\n/***************************************************************************/\n/***************************************************************************/\n/*****                                                                 *****/\n/*****               B Z   E M B E D D I N G   S T R E A M             *****/\n/*****                                                                 *****/\n/***************************************************************************/\n/***************************************************************************/\n\n  static void\n  ft_bzip2_stream_close( FT_Stream  stream )\n  {\n    FT_BZip2File  zip    = (FT_BZip2File)stream->descriptor.pointer;\n    FT_Memory     memory = stream->memory;\n\n\n    if ( zip )\n    {\n      /* finalize bzip file descriptor */\n      ft_bzip2_file_done( zip );\n\n      FT_FREE( zip );\n\n      stream->descriptor.pointer = NULL;\n    }\n  }\n\n\n  static FT_ULong\n  ft_bzip2_stream_io( FT_Stream  stream,\n                      FT_ULong   pos,\n                      FT_Byte*   buffer,\n                      FT_ULong   count )\n  {\n    FT_BZip2File  zip = (FT_BZip2File)stream->descriptor.pointer;\n\n\n    return ft_bzip2_file_io( zip, pos, buffer, count );\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stream_OpenBzip2( FT_Stream  stream,\n                       FT_Stream  source )\n  {\n    FT_Error      error;\n    FT_Memory     memory;\n    FT_BZip2File  zip = NULL;\n\n\n    if ( !stream || !source )\n    {\n      error = FT_THROW( Invalid_Stream_Handle );\n      goto Exit;\n    }\n\n    memory = source->memory;\n\n    /*\n     *  check the header right now; this prevents allocating unnecessary\n     *  objects when we don't need them\n     */\n    error = ft_bzip2_check_header( source );\n    if ( error )\n      goto Exit;\n\n    FT_ZERO( stream );\n    stream->memory = memory;\n\n    if ( !FT_QNEW( zip ) )\n    {\n      error = ft_bzip2_file_init( zip, stream, source );\n      if ( error )\n      {\n        FT_FREE( zip );\n        goto Exit;\n      }\n\n      stream->descriptor.pointer = zip;\n    }\n\n    stream->size  = 0x7FFFFFFFL;  /* don't know the real size! */\n    stream->pos   = 0;\n    stream->base  = 0;\n    stream->read  = ft_bzip2_stream_io;\n    stream->close = ft_bzip2_stream_close;\n\n  Exit:\n    return error;\n  }\n\n#else  /* !FT_CONFIG_OPTION_USE_BZIP2 */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stream_OpenBzip2( FT_Stream  stream,\n                       FT_Stream  source )\n  {\n    FT_UNUSED( stream );\n    FT_UNUSED( source );\n\n    return FT_THROW( Unimplemented_Feature );\n  }\n\n#endif /* !FT_CONFIG_OPTION_USE_BZIP2 */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcache.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcache.c                                                              */\n/*                                                                         */\n/*    The FreeType Caching sub-system (body only).                         */\n/*                                                                         */\n/*  Copyright 2000-2001, 2003 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"ftcmru.c\"\n#include \"ftcmanag.c\"\n#include \"ftccache.c\"\n#include \"ftccmap.c\"\n#include \"ftcglyph.c\"\n#include \"ftcimage.c\"\n#include \"ftcsbits.c\"\n#include \"ftcbasic.c\"\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcbasic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcbasic.c                                                             */\n/*                                                                         */\n/*    The FreeType basic cache interface (body).                           */\n/*                                                                         */\n/*  Copyright 2003-2007, 2009-2011, 2013, 2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_CACHE_H\n#include \"ftcglyph.h\"\n#include \"ftcimage.h\"\n#include \"ftcsbits.h\"\n\n#include \"ftccback.h\"\n#include \"ftcerror.h\"\n\n#define FT_COMPONENT  trace_cache\n\n\n  /*\n   *  Basic Families\n   *\n   */\n  typedef struct  FTC_BasicAttrRec_\n  {\n    FTC_ScalerRec  scaler;\n    FT_UInt        load_flags;\n\n  } FTC_BasicAttrRec, *FTC_BasicAttrs;\n\n#define FTC_BASIC_ATTR_COMPARE( a, b )                                 \\\n          FT_BOOL( FTC_SCALER_COMPARE( &(a)->scaler, &(b)->scaler ) && \\\n                   (a)->load_flags == (b)->load_flags               )\n\n#define FTC_BASIC_ATTR_HASH( a )                                   \\\n          ( FTC_SCALER_HASH( &(a)->scaler ) + 31*(a)->load_flags )\n\n\n  typedef struct  FTC_BasicQueryRec_\n  {\n    FTC_GQueryRec     gquery;\n    FTC_BasicAttrRec  attrs;\n\n  } FTC_BasicQueryRec, *FTC_BasicQuery;\n\n\n  typedef struct  FTC_BasicFamilyRec_\n  {\n    FTC_FamilyRec     family;\n    FTC_BasicAttrRec  attrs;\n\n  } FTC_BasicFamilyRec, *FTC_BasicFamily;\n\n\n  FT_CALLBACK_DEF( FT_Bool )\n  ftc_basic_family_compare( FTC_MruNode  ftcfamily,\n                            FT_Pointer   ftcquery )\n  {\n    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;\n    FTC_BasicQuery   query  = (FTC_BasicQuery)ftcquery;\n\n\n    return FTC_BASIC_ATTR_COMPARE( &family->attrs, &query->attrs );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ftc_basic_family_init( FTC_MruNode  ftcfamily,\n                         FT_Pointer   ftcquery,\n                         FT_Pointer   ftccache )\n  {\n    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;\n    FTC_BasicQuery   query  = (FTC_BasicQuery)ftcquery;\n    FTC_Cache        cache  = (FTC_Cache)ftccache;\n\n\n    FTC_Family_Init( FTC_FAMILY( family ), cache );\n    family->attrs = query->attrs;\n    return 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  ftc_basic_family_get_count( FTC_Family   ftcfamily,\n                              FTC_Manager  manager )\n  {\n    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;\n    FT_Error         error;\n    FT_Face          face;\n    FT_UInt          result = 0;\n\n\n    error = FTC_Manager_LookupFace( manager, family->attrs.scaler.face_id,\n                                    &face );\n\n    if ( error || !face )\n      return result;\n\n    if ( (FT_ULong)face->num_glyphs > FT_UINT_MAX || 0 > face->num_glyphs )\n      FT_TRACE1(( \"ftc_basic_family_get_count:\"\n                  \" too large number of glyphs in this face, truncated\\n\",\n                  face->num_glyphs ));\n\n    if ( !error )\n      result = (FT_UInt)face->num_glyphs;\n\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ftc_basic_family_load_bitmap( FTC_Family   ftcfamily,\n                                FT_UInt      gindex,\n                                FTC_Manager  manager,\n                                FT_Face     *aface )\n  {\n    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;\n    FT_Error         error;\n    FT_Size          size;\n\n\n    error = FTC_Manager_LookupSize( manager, &family->attrs.scaler, &size );\n    if ( !error )\n    {\n      FT_Face  face = size->face;\n\n\n      error = FT_Load_Glyph( face, gindex,\n                             family->attrs.load_flags | FT_LOAD_RENDER );\n      if ( !error )\n        *aface = face;\n    }\n\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ftc_basic_family_load_glyph( FTC_Family  ftcfamily,\n                               FT_UInt     gindex,\n                               FTC_Cache   cache,\n                               FT_Glyph   *aglyph )\n  {\n    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;\n    FT_Error         error;\n    FTC_Scaler       scaler = &family->attrs.scaler;\n    FT_Face          face;\n    FT_Size          size;\n\n\n    /* we will now load the glyph image */\n    error = FTC_Manager_LookupSize( cache->manager,\n                                    scaler,\n                                    &size );\n    if ( !error )\n    {\n      face = size->face;\n\n      error = FT_Load_Glyph( face, gindex, family->attrs.load_flags );\n      if ( !error )\n      {\n        if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP  ||\n             face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )\n        {\n          /* ok, copy it */\n          FT_Glyph  glyph;\n\n\n          error = FT_Get_Glyph( face->glyph, &glyph );\n          if ( !error )\n          {\n            *aglyph = glyph;\n            goto Exit;\n          }\n        }\n        else\n          error = FT_THROW( Invalid_Argument );\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Bool )\n  ftc_basic_gnode_compare_faceid( FTC_Node    ftcgnode,\n                                  FT_Pointer  ftcface_id,\n                                  FTC_Cache   cache,\n                                  FT_Bool*    list_changed )\n  {\n    FTC_GNode        gnode   = (FTC_GNode)ftcgnode;\n    FTC_FaceID       face_id = (FTC_FaceID)ftcface_id;\n    FTC_BasicFamily  family  = (FTC_BasicFamily)gnode->family;\n    FT_Bool          result;\n\n\n    if ( list_changed )\n      *list_changed = FALSE;\n    result = FT_BOOL( family->attrs.scaler.face_id == face_id );\n    if ( result )\n    {\n      /* we must call this function to avoid this node from appearing\n       * in later lookups with the same face_id!\n       */\n      FTC_GNode_UnselectFamily( gnode, cache );\n    }\n    return result;\n  }\n\n\n /*\n  *\n  * basic image cache\n  *\n  */\n\n  static\n  const FTC_IFamilyClassRec  ftc_basic_image_family_class =\n  {\n    {\n      sizeof ( FTC_BasicFamilyRec ),\n      ftc_basic_family_compare,\n      ftc_basic_family_init,\n      0,                        /* FTC_MruNode_ResetFunc */\n      0                         /* FTC_MruNode_DoneFunc  */\n    },\n    ftc_basic_family_load_glyph\n  };\n\n\n  static\n  const FTC_GCacheClassRec  ftc_basic_image_cache_class =\n  {\n    {\n      ftc_inode_new,\n      ftc_inode_weight,\n      ftc_gnode_compare,\n      ftc_basic_gnode_compare_faceid,\n      ftc_inode_free,\n\n      sizeof ( FTC_GCacheRec ),\n      ftc_gcache_init,\n      ftc_gcache_done\n    },\n    (FTC_MruListClass)&ftc_basic_image_family_class\n  };\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_ImageCache_New( FTC_Manager      manager,\n                      FTC_ImageCache  *acache )\n  {\n    return FTC_GCache_New( manager, &ftc_basic_image_cache_class,\n                           (FTC_GCache*)acache );\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_ImageCache_Lookup( FTC_ImageCache  cache,\n                         FTC_ImageType   type,\n                         FT_UInt         gindex,\n                         FT_Glyph       *aglyph,\n                         FTC_Node       *anode )\n  {\n    FTC_BasicQueryRec  query;\n    FTC_Node           node = 0; /* make compiler happy */\n    FT_Error           error;\n    FT_PtrDist         hash;\n\n\n    /* some argument checks are delayed to `FTC_Cache_Lookup' */\n    if ( !aglyph )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    *aglyph = NULL;\n    if ( anode )\n      *anode  = NULL;\n\n    if ( (FT_ULong)( type->flags - FT_INT_MIN ) > FT_UINT_MAX )\n      FT_TRACE1(( \"FTC_ImageCache_Lookup:\"\n                  \" higher bits in load_flags 0x%x are dropped\\n\",\n                  type->flags & ~((FT_ULong)FT_UINT_MAX) ));\n\n    query.attrs.scaler.face_id = type->face_id;\n    query.attrs.scaler.width   = type->width;\n    query.attrs.scaler.height  = type->height;\n    query.attrs.load_flags     = (FT_UInt)type->flags;\n\n    query.attrs.scaler.pixel = 1;\n    query.attrs.scaler.x_res = 0;  /* make compilers happy */\n    query.attrs.scaler.y_res = 0;\n\n    hash = FTC_BASIC_ATTR_HASH( &query.attrs ) + gindex;\n\n#if 1  /* inlining is about 50% faster! */\n    FTC_GCACHE_LOOKUP_CMP( cache,\n                           ftc_basic_family_compare,\n                           FTC_GNode_Compare,\n                           hash, gindex,\n                           &query,\n                           node,\n                           error );\n#else\n    error = FTC_GCache_Lookup( FTC_GCACHE( cache ),\n                               hash, gindex,\n                               FTC_GQUERY( &query ),\n                               &node );\n#endif\n    if ( !error )\n    {\n      *aglyph = FTC_INODE( node )->glyph;\n\n      if ( anode )\n      {\n        *anode = node;\n        node->ref_count++;\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_ImageCache_LookupScaler( FTC_ImageCache  cache,\n                               FTC_Scaler      scaler,\n                               FT_ULong        load_flags,\n                               FT_UInt         gindex,\n                               FT_Glyph       *aglyph,\n                               FTC_Node       *anode )\n  {\n    FTC_BasicQueryRec  query;\n    FTC_Node           node = 0; /* make compiler happy */\n    FT_Error           error;\n    FT_PtrDist         hash;\n\n\n    /* some argument checks are delayed to `FTC_Cache_Lookup' */\n    if ( !aglyph || !scaler )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    *aglyph = NULL;\n    if ( anode )\n      *anode  = NULL;\n\n    /* `FT_Load_Glyph' and `FT_Load_Char' take FT_UInt flags */\n    if ( load_flags > FT_UINT_MAX )\n      FT_TRACE1(( \"FTC_ImageCache_LookupScaler:\"\n                  \" higher bits in load_flags 0x%x are dropped\\n\",\n                  load_flags & ~((FT_ULong)FT_UINT_MAX) ));\n\n    query.attrs.scaler     = scaler[0];\n    query.attrs.load_flags = (FT_UInt)load_flags;\n\n    hash = FTC_BASIC_ATTR_HASH( &query.attrs ) + gindex;\n\n    FTC_GCACHE_LOOKUP_CMP( cache,\n                           ftc_basic_family_compare,\n                           FTC_GNode_Compare,\n                           hash, gindex,\n                           &query,\n                           node,\n                           error );\n    if ( !error )\n    {\n      *aglyph = FTC_INODE( node )->glyph;\n\n      if ( anode )\n      {\n        *anode = node;\n        node->ref_count++;\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*\n   *\n   * basic small bitmap cache\n   *\n   */\n\n  static\n  const FTC_SFamilyClassRec  ftc_basic_sbit_family_class =\n  {\n    {\n      sizeof ( FTC_BasicFamilyRec ),\n      ftc_basic_family_compare,\n      ftc_basic_family_init,\n      0,                            /* FTC_MruNode_ResetFunc */\n      0                             /* FTC_MruNode_DoneFunc  */\n    },\n    ftc_basic_family_get_count,\n    ftc_basic_family_load_bitmap\n  };\n\n\n  static\n  const FTC_GCacheClassRec  ftc_basic_sbit_cache_class =\n  {\n    {\n      ftc_snode_new,\n      ftc_snode_weight,\n      ftc_snode_compare,\n      ftc_basic_gnode_compare_faceid,\n      ftc_snode_free,\n\n      sizeof ( FTC_GCacheRec ),\n      ftc_gcache_init,\n      ftc_gcache_done\n    },\n    (FTC_MruListClass)&ftc_basic_sbit_family_class\n  };\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_SBitCache_New( FTC_Manager     manager,\n                     FTC_SBitCache  *acache )\n  {\n    return FTC_GCache_New( manager, &ftc_basic_sbit_cache_class,\n                           (FTC_GCache*)acache );\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_SBitCache_Lookup( FTC_SBitCache  cache,\n                        FTC_ImageType  type,\n                        FT_UInt        gindex,\n                        FTC_SBit      *ansbit,\n                        FTC_Node      *anode )\n  {\n    FT_Error           error;\n    FTC_BasicQueryRec  query;\n    FTC_Node           node = 0; /* make compiler happy */\n    FT_PtrDist         hash;\n\n\n    if ( anode )\n      *anode = NULL;\n\n    /* other argument checks delayed to `FTC_Cache_Lookup' */\n    if ( !ansbit )\n      return FT_THROW( Invalid_Argument );\n\n    *ansbit = NULL;\n\n    if ( (FT_ULong)( type->flags - FT_INT_MIN ) > FT_UINT_MAX )\n      FT_TRACE1(( \"FTC_ImageCache_Lookup:\"\n                  \" higher bits in load_flags 0x%x are dropped\\n\",\n                  type->flags & ~((FT_ULong)FT_UINT_MAX) ));\n\n    query.attrs.scaler.face_id = type->face_id;\n    query.attrs.scaler.width   = type->width;\n    query.attrs.scaler.height  = type->height;\n    query.attrs.load_flags     = (FT_UInt)type->flags;\n\n    query.attrs.scaler.pixel = 1;\n    query.attrs.scaler.x_res = 0;  /* make compilers happy */\n    query.attrs.scaler.y_res = 0;\n\n    /* beware, the hash must be the same for all glyph ranges! */\n    hash = FTC_BASIC_ATTR_HASH( &query.attrs ) +\n           gindex / FTC_SBIT_ITEMS_PER_NODE;\n\n#if 1  /* inlining is about 50% faster! */\n    FTC_GCACHE_LOOKUP_CMP( cache,\n                           ftc_basic_family_compare,\n                           FTC_SNode_Compare,\n                           hash, gindex,\n                           &query,\n                           node,\n                           error );\n#else\n    error = FTC_GCache_Lookup( FTC_GCACHE( cache ),\n                               hash,\n                               gindex,\n                               FTC_GQUERY( &query ),\n                               &node );\n#endif\n    if ( error )\n      goto Exit;\n\n    *ansbit = FTC_SNODE( node )->sbits +\n              ( gindex - FTC_GNODE( node )->gindex );\n\n    if ( anode )\n    {\n      *anode = node;\n      node->ref_count++;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_SBitCache_LookupScaler( FTC_SBitCache  cache,\n                              FTC_Scaler     scaler,\n                              FT_ULong       load_flags,\n                              FT_UInt        gindex,\n                              FTC_SBit      *ansbit,\n                              FTC_Node      *anode )\n  {\n    FT_Error           error;\n    FTC_BasicQueryRec  query;\n    FTC_Node           node = 0; /* make compiler happy */\n    FT_PtrDist         hash;\n\n\n    if ( anode )\n        *anode = NULL;\n\n    /* other argument checks delayed to `FTC_Cache_Lookup' */\n    if ( !ansbit || !scaler )\n        return FT_THROW( Invalid_Argument );\n\n    *ansbit = NULL;\n\n    /* `FT_Load_Glyph' and `FT_Load_Char' take FT_UInt flags */\n    if ( load_flags > FT_UINT_MAX )\n      FT_TRACE1(( \"FTC_ImageCache_LookupScaler:\"\n                  \" higher bits in load_flags 0x%x are dropped\\n\",\n                  load_flags & ~((FT_ULong)FT_UINT_MAX) ));\n\n    query.attrs.scaler     = scaler[0];\n    query.attrs.load_flags = (FT_UInt)load_flags;\n\n    /* beware, the hash must be the same for all glyph ranges! */\n    hash = FTC_BASIC_ATTR_HASH( &query.attrs ) +\n             gindex / FTC_SBIT_ITEMS_PER_NODE;\n\n    FTC_GCACHE_LOOKUP_CMP( cache,\n                           ftc_basic_family_compare,\n                           FTC_SNode_Compare,\n                           hash, gindex,\n                           &query,\n                           node,\n                           error );\n    if ( error )\n      goto Exit;\n\n    *ansbit = FTC_SNODE( node )->sbits +\n              ( gindex - FTC_GNODE( node )->gindex );\n\n    if ( anode )\n    {\n      *anode = node;\n      node->ref_count++;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftccache.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftccache.c                                                             */\n/*                                                                         */\n/*    The FreeType internal cache interface (body).                        */\n/*                                                                         */\n/*  Copyright 2000-2007, 2009-2011, 2013 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include \"ftcmanag.h\"\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n\n#include \"ftccback.h\"\n#include \"ftcerror.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cache\n\n\n#define FTC_HASH_MAX_LOAD  2\n#define FTC_HASH_MIN_LOAD  1\n#define FTC_HASH_SUB_LOAD  ( FTC_HASH_MAX_LOAD - FTC_HASH_MIN_LOAD )\n\n  /* this one _must_ be a power of 2! */\n#define FTC_HASH_INITIAL_SIZE  8\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                   CACHE NODE DEFINITIONS                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* add a new node to the head of the manager's circular MRU list */\n  static void\n  ftc_node_mru_link( FTC_Node     node,\n                     FTC_Manager  manager )\n  {\n    void  *nl = &manager->nodes_list;\n\n\n    FTC_MruNode_Prepend( (FTC_MruNode*)nl,\n                         (FTC_MruNode)node );\n    manager->num_nodes++;\n  }\n\n\n  /* remove a node from the manager's MRU list */\n  static void\n  ftc_node_mru_unlink( FTC_Node     node,\n                       FTC_Manager  manager )\n  {\n    void  *nl = &manager->nodes_list;\n\n\n    FTC_MruNode_Remove( (FTC_MruNode*)nl,\n                        (FTC_MruNode)node );\n    manager->num_nodes--;\n  }\n\n\n#ifndef FTC_INLINE\n\n  /* move a node to the head of the manager's MRU list */\n  static void\n  ftc_node_mru_up( FTC_Node     node,\n                   FTC_Manager  manager )\n  {\n    FTC_MruNode_Up( (FTC_MruNode*)&manager->nodes_list,\n                    (FTC_MruNode)node );\n  }\n\n\n  /* get a top bucket for specified hash from cache,\n   * body for FTC_NODE__TOP_FOR_HASH( cache, hash )\n   */\n  FT_LOCAL_DEF( FTC_Node* )\n  ftc_get_top_node_for_hash( FTC_Cache   cache,\n                             FT_PtrDist  hash )\n  {\n    FTC_Node*  pnode;\n    FT_UInt    idx;\n\n\n    idx = (FT_UInt)( hash & cache->mask );\n    if ( idx < cache->p )\n      idx = (FT_UInt)( hash & ( 2 * cache->mask + 1 ) );\n    pnode = cache->buckets + idx;\n    return pnode;\n  }\n\n#endif /* !FTC_INLINE */\n\n\n  /* Note that this function cannot fail.  If we cannot re-size the\n   * buckets array appropriately, we simply degrade the hash table's\n   * performance!\n   */\n  static void\n  ftc_cache_resize( FTC_Cache  cache )\n  {\n    for (;;)\n    {\n      FTC_Node  node, *pnode;\n      FT_UFast  p     = cache->p;\n      FT_UFast  mask  = cache->mask;\n      FT_UFast  count = mask + p + 1;    /* number of buckets */\n\n\n      /* do we need to shrink the buckets array? */\n      if ( cache->slack < 0 )\n      {\n        FTC_Node  new_list = NULL;\n\n\n        /* try to expand the buckets array _before_ splitting\n         * the bucket lists\n         */\n        if ( p >= mask )\n        {\n          FT_Memory  memory = cache->memory;\n          FT_Error   error;\n\n\n          /* if we can't expand the array, leave immediately */\n          if ( FT_RENEW_ARRAY( cache->buckets,\n                               ( mask + 1 ) * 2, ( mask + 1 ) * 4 ) )\n            break;\n        }\n\n        /* split a single bucket */\n        pnode = cache->buckets + p;\n\n        for (;;)\n        {\n          node = *pnode;\n          if ( node == NULL )\n            break;\n\n          if ( node->hash & ( mask + 1 ) )\n          {\n            *pnode     = node->link;\n            node->link = new_list;\n            new_list   = node;\n          }\n          else\n            pnode = &node->link;\n        }\n\n        cache->buckets[p + mask + 1] = new_list;\n\n        cache->slack += FTC_HASH_MAX_LOAD;\n\n        if ( p >= mask )\n        {\n          cache->mask = 2 * mask + 1;\n          cache->p    = 0;\n        }\n        else\n          cache->p = p + 1;\n      }\n\n      /* do we need to expand the buckets array? */\n      else if ( cache->slack > (FT_Long)count * FTC_HASH_SUB_LOAD )\n      {\n        FT_UFast   old_index = p + mask;\n        FTC_Node*  pold;\n\n\n        if ( old_index + 1 <= FTC_HASH_INITIAL_SIZE )\n          break;\n\n        if ( p == 0 )\n        {\n          FT_Memory  memory = cache->memory;\n          FT_Error   error;\n\n\n          /* if we can't shrink the array, leave immediately */\n          if ( FT_RENEW_ARRAY( cache->buckets,\n                               ( mask + 1 ) * 2, mask + 1 ) )\n            break;\n\n          cache->mask >>= 1;\n          p             = cache->mask;\n        }\n        else\n          p--;\n\n        pnode = cache->buckets + p;\n        while ( *pnode )\n          pnode = &(*pnode)->link;\n\n        pold   = cache->buckets + old_index;\n        *pnode = *pold;\n        *pold  = NULL;\n\n        cache->slack -= FTC_HASH_MAX_LOAD;\n        cache->p      = p;\n      }\n\n      /* otherwise, the hash table is balanced */\n      else\n        break;\n    }\n  }\n\n\n  /* remove a node from its cache's hash table */\n  static void\n  ftc_node_hash_unlink( FTC_Node   node0,\n                        FTC_Cache  cache )\n  {\n    FTC_Node  *pnode = FTC_NODE__TOP_FOR_HASH( cache, node0->hash );\n\n\n    for (;;)\n    {\n      FTC_Node  node = *pnode;\n\n\n      if ( node == NULL )\n      {\n        FT_TRACE0(( \"ftc_node_hash_unlink: unknown node\\n\" ));\n        return;\n      }\n\n      if ( node == node0 )\n        break;\n\n      pnode = &(*pnode)->link;\n    }\n\n    *pnode      = node0->link;\n    node0->link = NULL;\n\n    cache->slack++;\n    ftc_cache_resize( cache );\n  }\n\n\n  /* add a node to the `top' of its cache's hash table */\n  static void\n  ftc_node_hash_link( FTC_Node   node,\n                      FTC_Cache  cache )\n  {\n    FTC_Node  *pnode = FTC_NODE__TOP_FOR_HASH( cache, node->hash );\n\n\n    node->link = *pnode;\n    *pnode     = node;\n\n    cache->slack--;\n    ftc_cache_resize( cache );\n  }\n\n\n  /* remove a node from the cache manager */\n  FT_LOCAL_DEF( void )\n  ftc_node_destroy( FTC_Node     node,\n                    FTC_Manager  manager )\n  {\n    FTC_Cache  cache;\n\n\n#ifdef FT_DEBUG_ERROR\n    /* find node's cache */\n    if ( node->cache_index >= manager->num_caches )\n    {\n      FT_TRACE0(( \"ftc_node_destroy: invalid node handle\\n\" ));\n      return;\n    }\n#endif\n\n    cache = manager->caches[node->cache_index];\n\n#ifdef FT_DEBUG_ERROR\n    if ( cache == NULL )\n    {\n      FT_TRACE0(( \"ftc_node_destroy: invalid node handle\\n\" ));\n      return;\n    }\n#endif\n\n    manager->cur_weight -= cache->clazz.node_weight( node, cache );\n\n    /* remove node from mru list */\n    ftc_node_mru_unlink( node, manager );\n\n    /* remove node from cache's hash table */\n    ftc_node_hash_unlink( node, cache );\n\n    /* now finalize it */\n    cache->clazz.node_free( node, cache );\n\n#if 0\n    /* check, just in case of general corruption :-) */\n    if ( manager->num_nodes == 0 )\n      FT_TRACE0(( \"ftc_node_destroy: invalid cache node count (%d)\\n\",\n                  manager->num_nodes ));\n#endif\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    ABSTRACT CACHE CLASS                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_LOCAL_DEF( FT_Error )\n  FTC_Cache_Init( FTC_Cache  cache )\n  {\n    return ftc_cache_init( cache );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  ftc_cache_init( FTC_Cache  cache )\n  {\n    FT_Memory  memory = cache->memory;\n    FT_Error   error;\n\n\n    cache->p     = 0;\n    cache->mask  = FTC_HASH_INITIAL_SIZE - 1;\n    cache->slack = FTC_HASH_INITIAL_SIZE * FTC_HASH_MAX_LOAD;\n\n    (void)FT_NEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 );\n    return error;\n  }\n\n\n  static void\n  FTC_Cache_Clear( FTC_Cache  cache )\n  {\n    if ( cache && cache->buckets )\n    {\n      FTC_Manager  manager = cache->manager;\n      FT_UFast     i;\n      FT_UFast     count;\n\n\n      count = cache->p + cache->mask + 1;\n\n      for ( i = 0; i < count; i++ )\n      {\n        FTC_Node  *pnode = cache->buckets + i, next, node = *pnode;\n\n\n        while ( node )\n        {\n          next        = node->link;\n          node->link  = NULL;\n\n          /* remove node from mru list */\n          ftc_node_mru_unlink( node, manager );\n\n          /* now finalize it */\n          manager->cur_weight -= cache->clazz.node_weight( node, cache );\n\n          cache->clazz.node_free( node, cache );\n          node = next;\n        }\n        cache->buckets[i] = NULL;\n      }\n      ftc_cache_resize( cache );\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  ftc_cache_done( FTC_Cache  cache )\n  {\n    if ( cache->memory )\n    {\n      FT_Memory  memory = cache->memory;\n\n\n      FTC_Cache_Clear( cache );\n\n      FT_FREE( cache->buckets );\n      cache->mask  = 0;\n      cache->p     = 0;\n      cache->slack = 0;\n\n      cache->memory = NULL;\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_Cache_Done( FTC_Cache  cache )\n  {\n    ftc_cache_done( cache );\n  }\n\n\n  static void\n  ftc_cache_add( FTC_Cache  cache,\n                 FT_PtrDist hash,\n                 FTC_Node   node )\n  {\n    node->hash        = hash;\n    node->cache_index = (FT_UInt16)cache->index;\n    node->ref_count   = 0;\n\n    ftc_node_hash_link( node, cache );\n    ftc_node_mru_link( node, cache->manager );\n\n    {\n      FTC_Manager  manager = cache->manager;\n\n\n      manager->cur_weight += cache->clazz.node_weight( node, cache );\n\n      if ( manager->cur_weight >= manager->max_weight )\n      {\n        node->ref_count++;\n        FTC_Manager_Compress( manager );\n        node->ref_count--;\n      }\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  FTC_Cache_NewNode( FTC_Cache   cache,\n                     FT_PtrDist  hash,\n                     FT_Pointer  query,\n                     FTC_Node   *anode )\n  {\n    FT_Error  error;\n    FTC_Node  node;\n\n\n    /*\n     * We use the FTC_CACHE_TRYLOOP macros to support out-of-memory\n     * errors (OOM) correctly, i.e., by flushing the cache progressively\n     * in order to make more room.\n     */\n\n    FTC_CACHE_TRYLOOP( cache )\n    {\n      error = cache->clazz.node_new( &node, query, cache );\n    }\n    FTC_CACHE_TRYLOOP_END( NULL );\n\n    if ( error )\n      node = NULL;\n    else\n    {\n     /* don't assume that the cache has the same number of buckets, since\n      * our allocation request might have triggered global cache flushing\n      */\n      ftc_cache_add( cache, hash, node );\n    }\n\n    *anode = node;\n    return error;\n  }\n\n\n#ifndef FTC_INLINE\n\n  FT_LOCAL_DEF( FT_Error )\n  FTC_Cache_Lookup( FTC_Cache   cache,\n                    FT_PtrDist  hash,\n                    FT_Pointer  query,\n                    FTC_Node   *anode )\n  {\n    FTC_Node*  bucket;\n    FTC_Node*  pnode;\n    FTC_Node   node;\n    FT_Error   error        = FT_Err_Ok;\n    FT_Bool    list_changed = FALSE;\n\n    FTC_Node_CompareFunc  compare = cache->clazz.node_compare;\n\n\n    if ( cache == NULL || anode == NULL )\n      return FT_THROW( Invalid_Argument );\n\n    /* Go to the `top' node of the list sharing same masked hash */\n    bucket = pnode = FTC_NODE__TOP_FOR_HASH( cache, hash );\n\n    /* Lookup a node with exactly same hash and queried properties.  */\n    /* NOTE: _nodcomp() may change the linked list to reduce memory. */\n    for (;;)\n    {\n      node = *pnode;\n      if ( node == NULL )\n        goto NewNode;\n\n      if ( node->hash == hash                           &&\n           compare( node, query, cache, &list_changed ) )\n        break;\n\n      pnode = &node->link;\n    }\n\n    if ( list_changed )\n    {\n      /* Update bucket by modified linked list */\n      bucket = pnode = FTC_NODE__TOP_FOR_HASH( cache, hash );\n\n      /* Update pnode by modified linked list */\n      while ( *pnode != node )\n      {\n        if ( *pnode == NULL )\n        {\n          FT_ERROR(( \"FTC_Cache_Lookup: oops!!!  node missing\\n\" ));\n          goto NewNode;\n        }\n        else\n          pnode = &((*pnode)->link);\n      }\n    }\n\n    /* Reorder the list to move the found node to the `top' */\n    if ( node != *bucket )\n    {\n      *pnode     = node->link;\n      node->link = *bucket;\n      *bucket    = node;\n    }\n\n    /* move to head of MRU list */\n    {\n      FTC_Manager  manager = cache->manager;\n\n\n      if ( node != manager->nodes_list )\n        ftc_node_mru_up( node, manager );\n    }\n    *anode = node;\n\n    return error;\n\n  NewNode:\n    return FTC_Cache_NewNode( cache, hash, query, anode );\n  }\n\n#endif /* !FTC_INLINE */\n\n\n  FT_LOCAL_DEF( void )\n  FTC_Cache_RemoveFaceID( FTC_Cache   cache,\n                          FTC_FaceID  face_id )\n  {\n    FT_UFast     i, count;\n    FTC_Manager  manager = cache->manager;\n    FTC_Node     frees   = NULL;\n\n\n    count = cache->p + cache->mask + 1;\n    for ( i = 0; i < count; i++ )\n    {\n      FTC_Node*  bucket = cache->buckets + i;\n      FTC_Node*  pnode  = bucket;\n\n\n      for ( ;; )\n      {\n        FTC_Node  node = *pnode;\n        FT_Bool   list_changed = FALSE;\n\n\n        if ( node == NULL )\n          break;\n\n        if ( cache->clazz.node_remove_faceid( node, face_id,\n                                              cache, &list_changed ) )\n        {\n          *pnode     = node->link;\n          node->link = frees;\n          frees      = node;\n        }\n        else\n          pnode = &node->link;\n      }\n    }\n\n    /* remove all nodes in the free list */\n    while ( frees )\n    {\n      FTC_Node  node;\n\n\n      node  = frees;\n      frees = node->link;\n\n      manager->cur_weight -= cache->clazz.node_weight( node, cache );\n      ftc_node_mru_unlink( node, manager );\n\n      cache->clazz.node_free( node, cache );\n\n      cache->slack++;\n    }\n\n    ftc_cache_resize( cache );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftccache.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftccache.h                                                             */\n/*                                                                         */\n/*    FreeType internal cache interface (specification).                   */\n/*                                                                         */\n/*  Copyright 2000-2007, 2009-2011, 2013 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTCCACHE_H__\n#define __FTCCACHE_H__\n\n\n#include \"ftcmru.h\"\n\nFT_BEGIN_HEADER\n\n#define _FTC_FACE_ID_HASH( i )                                                \\\n          ((FT_PtrDist)(( (FT_PtrDist)(i) >> 3 ) ^ ( (FT_PtrDist)(i) << 7 )))\n\n  /* handle to cache object */\n  typedef struct FTC_CacheRec_*  FTC_Cache;\n\n  /* handle to cache class */\n  typedef const struct FTC_CacheClassRec_*  FTC_CacheClass;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                   CACHE NODE DEFINITIONS                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Each cache controls one or more cache nodes.  Each node is part of    */\n  /* the global_lru list of the manager.  Its `data' field however is used */\n  /* as a reference count for now.                                         */\n  /*                                                                       */\n  /* A node can be anything, depending on the type of information held by  */\n  /* the cache.  It can be an individual glyph image, a set of bitmaps     */\n  /* glyphs for a given size, some metrics, etc.                           */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /* structure size should be 20 bytes on 32-bits machines */\n  typedef struct  FTC_NodeRec_\n  {\n    FTC_MruNodeRec  mru;          /* circular mru list pointer           */\n    FTC_Node        link;         /* used for hashing                    */\n    FT_PtrDist      hash;         /* used for hashing too                */\n    FT_UShort       cache_index;  /* index of cache the node belongs to  */\n    FT_Short        ref_count;    /* reference count for this node       */\n\n  } FTC_NodeRec;\n\n\n#define FTC_NODE( x )    ( (FTC_Node)(x) )\n#define FTC_NODE_P( x )  ( (FTC_Node*)(x) )\n\n#define FTC_NODE__NEXT( x )  FTC_NODE( (x)->mru.next )\n#define FTC_NODE__PREV( x )  FTC_NODE( (x)->mru.prev )\n\n#ifdef FTC_INLINE\n#define FTC_NODE__TOP_FOR_HASH( cache, hash )                     \\\n        ( ( cache )->buckets +                                    \\\n            ( ( ( ( hash ) &   ( cache )->mask ) < ( cache )->p ) \\\n              ? ( ( hash ) & ( ( cache )->mask * 2 + 1 ) )        \\\n              : ( ( hash ) &   ( cache )->mask ) ) )\n#else\n  FT_LOCAL( FTC_Node* )\n  ftc_get_top_node_for_hash( FTC_Cache   cache,\n                             FT_PtrDist  hash );\n#define FTC_NODE__TOP_FOR_HASH( cache, hash )            \\\n        ftc_get_top_node_for_hash( ( cache ), ( hash ) )\n#endif\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       CACHE DEFINITIONS                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* initialize a new cache node */\n  typedef FT_Error\n  (*FTC_Node_NewFunc)( FTC_Node    *pnode,\n                       FT_Pointer   query,\n                       FTC_Cache    cache );\n\n  typedef FT_Offset\n  (*FTC_Node_WeightFunc)( FTC_Node   node,\n                          FTC_Cache  cache );\n\n  /* compare a node to a given key pair */\n  typedef FT_Bool\n  (*FTC_Node_CompareFunc)( FTC_Node    node,\n                           FT_Pointer  key,\n                           FTC_Cache   cache,\n                           FT_Bool*    list_changed );\n\n\n  typedef void\n  (*FTC_Node_FreeFunc)( FTC_Node   node,\n                        FTC_Cache  cache );\n\n  typedef FT_Error\n  (*FTC_Cache_InitFunc)( FTC_Cache  cache );\n\n  typedef void\n  (*FTC_Cache_DoneFunc)( FTC_Cache  cache );\n\n\n  typedef struct  FTC_CacheClassRec_\n  {\n    FTC_Node_NewFunc      node_new;\n    FTC_Node_WeightFunc   node_weight;\n    FTC_Node_CompareFunc  node_compare;\n    FTC_Node_CompareFunc  node_remove_faceid;\n    FTC_Node_FreeFunc     node_free;\n\n    FT_Offset             cache_size;\n    FTC_Cache_InitFunc    cache_init;\n    FTC_Cache_DoneFunc    cache_done;\n\n  } FTC_CacheClassRec;\n\n\n  /* each cache really implements a dynamic hash table to manage its nodes */\n  typedef struct  FTC_CacheRec_\n  {\n    FT_UFast           p;\n    FT_UFast           mask;\n    FT_Long            slack;\n    FTC_Node*          buckets;\n\n    FTC_CacheClassRec  clazz;       /* local copy, for speed  */\n\n    FTC_Manager        manager;\n    FT_Memory          memory;\n    FT_UInt            index;       /* in manager's table     */\n\n    FTC_CacheClass     org_class;   /* original class pointer */\n\n  } FTC_CacheRec;\n\n\n#define FTC_CACHE( x )    ( (FTC_Cache)(x) )\n#define FTC_CACHE_P( x )  ( (FTC_Cache*)(x) )\n\n\n  /* default cache initialize */\n  FT_LOCAL( FT_Error )\n  FTC_Cache_Init( FTC_Cache  cache );\n\n  /* default cache finalizer */\n  FT_LOCAL( void )\n  FTC_Cache_Done( FTC_Cache  cache );\n\n  /* Call this function to look up the cache.  If no corresponding\n   * node is found, a new one is automatically created.  This function\n   * is capable of flushing the cache adequately to make room for the\n   * new cache object.\n   */\n\n#ifndef FTC_INLINE\n  FT_LOCAL( FT_Error )\n  FTC_Cache_Lookup( FTC_Cache   cache,\n                    FT_PtrDist  hash,\n                    FT_Pointer  query,\n                    FTC_Node   *anode );\n#endif\n\n  FT_LOCAL( FT_Error )\n  FTC_Cache_NewNode( FTC_Cache   cache,\n                     FT_PtrDist  hash,\n                     FT_Pointer  query,\n                     FTC_Node   *anode );\n\n  /* Remove all nodes that relate to a given face_id.  This is useful\n   * when un-installing fonts.  Note that if a cache node relates to\n   * the face_id but is locked (i.e., has `ref_count > 0'), the node\n   * will _not_ be destroyed, but its internal face_id reference will\n   * be modified.\n   *\n   * The final result will be that the node will never come back\n   * in further lookup requests, and will be flushed on demand from\n   * the cache normally when its reference count reaches 0.\n   */\n  FT_LOCAL( void )\n  FTC_Cache_RemoveFaceID( FTC_Cache   cache,\n                          FTC_FaceID  face_id );\n\n\n#ifdef FTC_INLINE\n\n#define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \\\n  FT_BEGIN_STMNT                                                         \\\n    FTC_Node             *_bucket, *_pnode, _node;                       \\\n    FTC_Cache             _cache   = FTC_CACHE(cache);                   \\\n    FT_PtrDist            _hash    = (FT_PtrDist)(hash);                 \\\n    FTC_Node_CompareFunc  _nodcomp = (FTC_Node_CompareFunc)(nodecmp);    \\\n    FT_Bool               _list_changed = FALSE;                         \\\n                                                                         \\\n                                                                         \\\n    error = FT_Err_Ok;                                                   \\\n    node  = NULL;                                                        \\\n                                                                         \\\n    /* Go to the `top' node of the list sharing same masked hash */      \\\n    _bucket = _pnode = FTC_NODE__TOP_FOR_HASH( _cache, _hash );          \\\n                                                                         \\\n    /* Look up a node with identical hash and queried properties.    */  \\\n    /* NOTE: _nodcomp() may change the linked list to reduce memory. */  \\\n    for (;;)                                                             \\\n    {                                                                    \\\n      _node = *_pnode;                                                   \\\n      if ( _node == NULL )                                               \\\n        goto _NewNode;                                                   \\\n                                                                         \\\n      if ( _node->hash == _hash                             &&           \\\n           _nodcomp( _node, query, _cache, &_list_changed ) )            \\\n        break;                                                           \\\n                                                                         \\\n      _pnode = &_node->link;                                             \\\n    }                                                                    \\\n                                                                         \\\n    if ( _list_changed )                                                 \\\n    {                                                                    \\\n      /* Update _bucket by possibly modified linked list */              \\\n      _bucket = _pnode = FTC_NODE__TOP_FOR_HASH( _cache, _hash );        \\\n                                                                         \\\n      /* Update _pnode by possibly modified linked list */               \\\n      while ( *_pnode != _node )                                         \\\n      {                                                                  \\\n        if ( *_pnode == NULL )                                           \\\n        {                                                                \\\n          FT_ERROR(( \"FTC_CACHE_LOOKUP_CMP: oops!!! node missing\\n\" ));  \\\n          goto _NewNode;                                                 \\\n        }                                                                \\\n        else                                                             \\\n          _pnode = &((*_pnode)->link);                                   \\\n      }                                                                  \\\n    }                                                                    \\\n                                                                         \\\n    /* Reorder the list to move the found node to the `top' */           \\\n    if ( _node != *_bucket )                                             \\\n    {                                                                    \\\n      *_pnode     = _node->link;                                         \\\n      _node->link = *_bucket;                                            \\\n      *_bucket    = _node;                                               \\\n    }                                                                    \\\n                                                                         \\\n    /* Update MRU list */                                                \\\n    {                                                                    \\\n      FTC_Manager  _manager = _cache->manager;                           \\\n      void*        _nl      = &_manager->nodes_list;                     \\\n                                                                         \\\n                                                                         \\\n      if ( _node != _manager->nodes_list )                               \\\n        FTC_MruNode_Up( (FTC_MruNode*)_nl,                               \\\n                        (FTC_MruNode)_node );                            \\\n    }                                                                    \\\n    goto _Ok;                                                            \\\n                                                                         \\\n  _NewNode:                                                              \\\n    error = FTC_Cache_NewNode( _cache, _hash, query, &_node );           \\\n                                                                         \\\n  _Ok:                                                                   \\\n    node = _node;                                                        \\\n  FT_END_STMNT\n\n#else /* !FTC_INLINE */\n\n#define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \\\n  FT_BEGIN_STMNT                                                         \\\n    error = FTC_Cache_Lookup( FTC_CACHE( cache ), hash, query,           \\\n                              (FTC_Node*)&(node) );                      \\\n  FT_END_STMNT\n\n#endif /* !FTC_INLINE */\n\n\n  /*\n   * This macro, together with FTC_CACHE_TRYLOOP_END, defines a retry\n   * loop to flush the cache repeatedly in case of memory overflows.\n   *\n   * It is used when creating a new cache node, or within a lookup\n   * that needs to allocate data (e.g. the sbit cache lookup).\n   *\n   * Example:\n   *\n   *   {\n   *     FTC_CACHE_TRYLOOP( cache )\n   *       error = load_data( ... );\n   *     FTC_CACHE_TRYLOOP_END()\n   *   }\n   *\n   */\n#define FTC_CACHE_TRYLOOP( cache )                           \\\n  {                                                          \\\n    FTC_Manager  _try_manager = FTC_CACHE( cache )->manager; \\\n    FT_UInt      _try_count   = 4;                           \\\n                                                             \\\n                                                             \\\n    for (;;)                                                 \\\n    {                                                        \\\n      FT_UInt  _try_done;\n\n\n#define FTC_CACHE_TRYLOOP_END( list_changed )                     \\\n      if ( !error || FT_ERR_NEQ( error, Out_Of_Memory ) )         \\\n        break;                                                    \\\n                                                                  \\\n      _try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \\\n      if ( _try_done > 0 && ( list_changed ) )                    \\\n        *(FT_Bool*)( list_changed ) = TRUE;                       \\\n                                                                  \\\n      if ( _try_done == 0 )                                       \\\n        break;                                                    \\\n                                                                  \\\n      if ( _try_done == _try_count )                              \\\n      {                                                           \\\n        _try_count *= 2;                                          \\\n        if ( _try_count < _try_done              ||               \\\n            _try_count > _try_manager->num_nodes )                \\\n          _try_count = _try_manager->num_nodes;                   \\\n      }                                                           \\\n    }                                                             \\\n  }\n\n /* */\n\nFT_END_HEADER\n\n\n#endif /* __FTCCACHE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftccback.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftccback.h                                                             */\n/*                                                                         */\n/*    Callback functions of the caching sub-system (specification only).   */\n/*                                                                         */\n/*  Copyright 2004-2006, 2011, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#ifndef __FTCCBACK_H__\n#define __FTCCBACK_H__\n\n#include <ft2build.h>\n#include FT_CACHE_H\n#include \"ftcmru.h\"\n#include \"ftcimage.h\"\n#include \"ftcmanag.h\"\n#include \"ftcglyph.h\"\n#include \"ftcsbits.h\"\n\n\n  FT_LOCAL( void )\n  ftc_inode_free( FTC_Node   inode,\n                  FTC_Cache  cache );\n\n  FT_LOCAL( FT_Error )\n  ftc_inode_new( FTC_Node   *pinode,\n                 FT_Pointer  gquery,\n                 FTC_Cache   cache );\n\n  FT_LOCAL( FT_Offset )\n  ftc_inode_weight( FTC_Node   inode,\n                    FTC_Cache  cache );\n\n\n  FT_LOCAL( void )\n  ftc_snode_free( FTC_Node   snode,\n                  FTC_Cache  cache );\n\n  FT_LOCAL( FT_Error )\n  ftc_snode_new( FTC_Node   *psnode,\n                 FT_Pointer  gquery,\n                 FTC_Cache   cache );\n\n  FT_LOCAL( FT_Offset )\n  ftc_snode_weight( FTC_Node   snode,\n                    FTC_Cache  cache );\n\n  FT_LOCAL( FT_Bool )\n  ftc_snode_compare( FTC_Node    snode,\n                     FT_Pointer  gquery,\n                     FTC_Cache   cache,\n                     FT_Bool*    list_changed );\n\n\n  FT_LOCAL( FT_Bool )\n  ftc_gnode_compare( FTC_Node    gnode,\n                     FT_Pointer  gquery,\n                     FTC_Cache   cache,\n                     FT_Bool*    list_changed );\n\n\n  FT_LOCAL( FT_Error )\n  ftc_gcache_init( FTC_Cache  cache );\n\n  FT_LOCAL( void )\n  ftc_gcache_done( FTC_Cache  cache );\n\n\n  FT_LOCAL( FT_Error )\n  ftc_cache_init( FTC_Cache  cache );\n\n  FT_LOCAL( void )\n  ftc_cache_done( FTC_Cache  cache );\n\n  FT_LOCAL( void )\n  ftc_node_destroy( FTC_Node     node,\n                    FTC_Manager  manager );\n\n\n#endif /* __FTCCBACK_H__ */\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftccmap.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftccmap.c                                                              */\n/*                                                                         */\n/*    FreeType CharMap cache (body)                                        */\n/*                                                                         */\n/*  Copyright 2000-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_CACHE_H\n#include \"ftcmanag.h\"\n#include FT_INTERNAL_MEMORY_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n\n#include \"ftccback.h\"\n#include \"ftcerror.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cache\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Each FTC_CMapNode contains a simple array to map a range of character */\n  /* codes to equivalent glyph indices.                                    */\n  /*                                                                       */\n  /* For now, the implementation is very basic: Each node maps a range of  */\n  /* 128 consecutive character codes to their corresponding glyph indices. */\n  /*                                                                       */\n  /* We could do more complex things, but I don't think it is really very  */\n  /* useful.                                                               */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* number of glyph indices / character code per node */\n#define FTC_CMAP_INDICES_MAX  128\n\n  /* compute a query/node hash */\n#define FTC_CMAP_HASH( faceid, index, charcode )         \\\n          ( _FTC_FACE_ID_HASH( faceid ) + 211 * (index) + \\\n            ( (charcode) / FTC_CMAP_INDICES_MAX )      )\n\n  /* the charmap query */\n  typedef struct  FTC_CMapQueryRec_\n  {\n    FTC_FaceID  face_id;\n    FT_UInt     cmap_index;\n    FT_UInt32   char_code;\n\n  } FTC_CMapQueryRec, *FTC_CMapQuery;\n\n#define FTC_CMAP_QUERY( x )  ((FTC_CMapQuery)(x))\n#define FTC_CMAP_QUERY_HASH( x )                                         \\\n          FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->char_code )\n\n  /* the cmap cache node */\n  typedef struct  FTC_CMapNodeRec_\n  {\n    FTC_NodeRec  node;\n    FTC_FaceID   face_id;\n    FT_UInt      cmap_index;\n    FT_UInt32    first;                         /* first character in node */\n    FT_UInt16    indices[FTC_CMAP_INDICES_MAX]; /* array of glyph indices  */\n\n  } FTC_CMapNodeRec, *FTC_CMapNode;\n\n#define FTC_CMAP_NODE( x ) ( (FTC_CMapNode)( x ) )\n#define FTC_CMAP_NODE_HASH( x )                                      \\\n          FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->first )\n\n  /* if (indices[n] == FTC_CMAP_UNKNOWN), we assume that the corresponding */\n  /* glyph indices haven't been queried through FT_Get_Glyph_Index() yet   */\n#define FTC_CMAP_UNKNOWN  (FT_UInt16)~0\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        CHARMAP NODES                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_CALLBACK_DEF( void )\n  ftc_cmap_node_free( FTC_Node   ftcnode,\n                      FTC_Cache  cache )\n  {\n    FTC_CMapNode  node   = (FTC_CMapNode)ftcnode;\n    FT_Memory     memory = cache->memory;\n\n\n    FT_FREE( node );\n  }\n\n\n  /* initialize a new cmap node */\n  FT_CALLBACK_DEF( FT_Error )\n  ftc_cmap_node_new( FTC_Node   *ftcanode,\n                     FT_Pointer  ftcquery,\n                     FTC_Cache   cache )\n  {\n    FTC_CMapNode  *anode  = (FTC_CMapNode*)ftcanode;\n    FTC_CMapQuery  query  = (FTC_CMapQuery)ftcquery;\n    FT_Error       error;\n    FT_Memory      memory = cache->memory;\n    FTC_CMapNode   node   = NULL;\n    FT_UInt        nn;\n\n\n    if ( !FT_NEW( node ) )\n    {\n      node->face_id    = query->face_id;\n      node->cmap_index = query->cmap_index;\n      node->first      = (query->char_code / FTC_CMAP_INDICES_MAX) *\n                         FTC_CMAP_INDICES_MAX;\n\n      for ( nn = 0; nn < FTC_CMAP_INDICES_MAX; nn++ )\n        node->indices[nn] = FTC_CMAP_UNKNOWN;\n    }\n\n    *anode = node;\n    return error;\n  }\n\n\n  /* compute the weight of a given cmap node */\n  FT_CALLBACK_DEF( FT_Offset )\n  ftc_cmap_node_weight( FTC_Node   cnode,\n                        FTC_Cache  cache )\n  {\n    FT_UNUSED( cnode );\n    FT_UNUSED( cache );\n\n    return sizeof ( *cnode );\n  }\n\n\n  /* compare a cmap node to a given query */\n  FT_CALLBACK_DEF( FT_Bool )\n  ftc_cmap_node_compare( FTC_Node    ftcnode,\n                         FT_Pointer  ftcquery,\n                         FTC_Cache   cache,\n                         FT_Bool*    list_changed )\n  {\n    FTC_CMapNode   node  = (FTC_CMapNode)ftcnode;\n    FTC_CMapQuery  query = (FTC_CMapQuery)ftcquery;\n    FT_UNUSED( cache );\n\n\n    if ( list_changed )\n      *list_changed = FALSE;\n    if ( node->face_id    == query->face_id    &&\n         node->cmap_index == query->cmap_index )\n    {\n      FT_UInt32  offset = (FT_UInt32)( query->char_code - node->first );\n\n\n      return FT_BOOL( offset < FTC_CMAP_INDICES_MAX );\n    }\n\n    return 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Bool )\n  ftc_cmap_node_remove_faceid( FTC_Node    ftcnode,\n                               FT_Pointer  ftcface_id,\n                               FTC_Cache   cache,\n                               FT_Bool*    list_changed )\n  {\n    FTC_CMapNode  node    = (FTC_CMapNode)ftcnode;\n    FTC_FaceID    face_id = (FTC_FaceID)ftcface_id;\n    FT_UNUSED( cache );\n\n\n    if ( list_changed )\n      *list_changed = FALSE;\n    return FT_BOOL( node->face_id == face_id );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    GLYPH IMAGE CACHE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  static\n  const FTC_CacheClassRec  ftc_cmap_cache_class =\n  {\n    ftc_cmap_node_new,\n    ftc_cmap_node_weight,\n    ftc_cmap_node_compare,\n    ftc_cmap_node_remove_faceid,\n    ftc_cmap_node_free,\n\n    sizeof ( FTC_CacheRec ),\n    ftc_cache_init,\n    ftc_cache_done,\n  };\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_CMapCache_New( FTC_Manager     manager,\n                     FTC_CMapCache  *acache )\n  {\n    return FTC_Manager_RegisterCache( manager,\n                                      &ftc_cmap_cache_class,\n                                      FTC_CACHE_P( acache ) );\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_UInt )\n  FTC_CMapCache_Lookup( FTC_CMapCache  cmap_cache,\n                        FTC_FaceID     face_id,\n                        FT_Int         cmap_index,\n                        FT_UInt32      char_code )\n  {\n    FTC_Cache         cache = FTC_CACHE( cmap_cache );\n    FTC_CMapQueryRec  query;\n    FTC_Node          node;\n    FT_Error          error;\n    FT_UInt           gindex = 0;\n    FT_PtrDist        hash;\n    FT_Int            no_cmap_change = 0;\n\n\n    if ( cmap_index < 0 )\n    {\n      /* Treat a negative cmap index as a special value, meaning that you */\n      /* don't want to change the FT_Face's character map through this    */\n      /* call.  This can be useful if the face requester callback already */\n      /* sets the face's charmap to the appropriate value.                */\n\n      no_cmap_change = 1;\n      cmap_index     = 0;\n    }\n\n    if ( !cache )\n    {\n      FT_TRACE0(( \"FTC_CMapCache_Lookup: bad arguments, returning 0\\n\" ));\n      return 0;\n    }\n\n    if ( !face_id )\n      return 0;\n\n    query.face_id    = face_id;\n    query.cmap_index = (FT_UInt)cmap_index;\n    query.char_code  = char_code;\n\n    hash = FTC_CMAP_HASH( face_id, cmap_index, char_code );\n\n#if 1\n    FTC_CACHE_LOOKUP_CMP( cache, ftc_cmap_node_compare, hash, &query,\n                          node, error );\n#else\n    error = FTC_Cache_Lookup( cache, hash, &query, &node );\n#endif\n    if ( error )\n      goto Exit;\n\n    FT_ASSERT( (FT_UInt)( char_code - FTC_CMAP_NODE( node )->first ) <\n                FTC_CMAP_INDICES_MAX );\n\n    /* something rotten can happen with rogue clients */\n    if ( (FT_UInt)( char_code - FTC_CMAP_NODE( node )->first >=\n                    FTC_CMAP_INDICES_MAX ) )\n      return 0; /* XXX: should return appropriate error */\n\n    gindex = FTC_CMAP_NODE( node )->indices[char_code -\n                                            FTC_CMAP_NODE( node )->first];\n    if ( gindex == FTC_CMAP_UNKNOWN )\n    {\n      FT_Face  face;\n\n\n      gindex = 0;\n\n      error = FTC_Manager_LookupFace( cache->manager,\n                                      FTC_CMAP_NODE( node )->face_id,\n                                      &face );\n      if ( error )\n        goto Exit;\n\n      if ( (FT_UInt)cmap_index < (FT_UInt)face->num_charmaps )\n      {\n        FT_CharMap  old, cmap  = NULL;\n\n\n        old  = face->charmap;\n        cmap = face->charmaps[cmap_index];\n\n        if ( old != cmap && !no_cmap_change )\n          FT_Set_Charmap( face, cmap );\n\n        gindex = FT_Get_Char_Index( face, char_code );\n\n        if ( old != cmap && !no_cmap_change )\n          FT_Set_Charmap( face, old );\n      }\n\n      FTC_CMAP_NODE( node )->indices[char_code -\n                                     FTC_CMAP_NODE( node )->first]\n        = (FT_UShort)gindex;\n    }\n\n  Exit:\n    return gindex;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcerror.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcerror.h                                                             */\n/*                                                                         */\n/*    Caching sub-system error codes (specification only).                 */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the caching sub-system error enumeration  */\n  /* constants.                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __FTCERROR_H__\n#define __FTCERROR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  FTC_Err_\n#define FT_ERR_BASE    FT_Mod_Err_Cache\n\n#include FT_ERRORS_H\n\n#endif /* __FTCERROR_H__ */\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcglyph.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcglyph.c                                                             */\n/*                                                                         */\n/*    FreeType Glyph Image (FT_Glyph) cache (body).                        */\n/*                                                                         */\n/*  Copyright 2000-2001, 2003, 2004, 2006, 2009, 2011 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_CACHE_H\n#include \"ftcglyph.h\"\n#include FT_ERRORS_H\n\n#include \"ftccback.h\"\n#include \"ftcerror.h\"\n\n\n  /* create a new chunk node, setting its cache index and ref count */\n  FT_LOCAL_DEF( void )\n  FTC_GNode_Init( FTC_GNode   gnode,\n                  FT_UInt     gindex,\n                  FTC_Family  family )\n  {\n    gnode->family = family;\n    gnode->gindex = gindex;\n    family->num_nodes++;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_GNode_UnselectFamily( FTC_GNode  gnode,\n                            FTC_Cache  cache )\n  {\n    FTC_Family  family = gnode->family;\n\n\n    gnode->family = NULL;\n    if ( family && --family->num_nodes == 0 )\n      FTC_FAMILY_FREE( family, cache );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_GNode_Done( FTC_GNode  gnode,\n                  FTC_Cache  cache )\n  {\n    /* finalize the node */\n    gnode->gindex = 0;\n\n    FTC_GNode_UnselectFamily( gnode, cache );\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  ftc_gnode_compare( FTC_Node    ftcgnode,\n                     FT_Pointer  ftcgquery,\n                     FTC_Cache   cache,\n                     FT_Bool*    list_changed )\n  {\n    FTC_GNode   gnode  = (FTC_GNode)ftcgnode;\n    FTC_GQuery  gquery = (FTC_GQuery)ftcgquery;\n    FT_UNUSED( cache );\n\n\n    if ( list_changed )\n      *list_changed = FALSE;\n    return FT_BOOL( gnode->family == gquery->family &&\n                    gnode->gindex == gquery->gindex );\n  }\n\n\n#ifdef FTC_INLINE\n\n  FT_LOCAL_DEF( FT_Bool )\n  FTC_GNode_Compare( FTC_GNode   gnode,\n                     FTC_GQuery  gquery,\n                     FTC_Cache   cache,\n                     FT_Bool*    list_changed )\n  {\n    return ftc_gnode_compare( FTC_NODE( gnode ), gquery,\n                              cache, list_changed );\n  }\n\n#endif\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      CHUNK SETS                               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  FTC_Family_Init( FTC_Family  family,\n                   FTC_Cache   cache )\n  {\n    FTC_GCacheClass  clazz = FTC_CACHE__GCACHE_CLASS( cache );\n\n\n    family->clazz     = clazz->family_class;\n    family->num_nodes = 0;\n    family->cache     = cache;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  ftc_gcache_init( FTC_Cache  ftccache )\n  {\n    FTC_GCache  cache = (FTC_GCache)ftccache;\n    FT_Error    error;\n\n\n    error = FTC_Cache_Init( FTC_CACHE( cache ) );\n    if ( !error )\n    {\n      FTC_GCacheClass   clazz = (FTC_GCacheClass)FTC_CACHE( cache )->org_class;\n\n      FTC_MruList_Init( &cache->families,\n                        clazz->family_class,\n                        0,  /* no maximum here! */\n                        cache,\n                        FTC_CACHE( cache )->memory );\n    }\n\n    return error;\n  }\n\n\n#if 0\n\n  FT_LOCAL_DEF( FT_Error )\n  FTC_GCache_Init( FTC_GCache  cache )\n  {\n    return ftc_gcache_init( FTC_CACHE( cache ) );\n  }\n\n#endif /* 0 */\n\n\n  FT_LOCAL_DEF( void )\n  ftc_gcache_done( FTC_Cache  ftccache )\n  {\n    FTC_GCache  cache = (FTC_GCache)ftccache;\n\n\n    FTC_Cache_Done( (FTC_Cache)cache );\n    FTC_MruList_Done( &cache->families );\n  }\n\n\n#if 0\n\n  FT_LOCAL_DEF( void )\n  FTC_GCache_Done( FTC_GCache  cache )\n  {\n    ftc_gcache_done( FTC_CACHE( cache ) );\n  }\n\n#endif /* 0 */\n\n\n  FT_LOCAL_DEF( FT_Error )\n  FTC_GCache_New( FTC_Manager       manager,\n                  FTC_GCacheClass   clazz,\n                  FTC_GCache       *acache )\n  {\n    return FTC_Manager_RegisterCache( manager, (FTC_CacheClass)clazz,\n                                      (FTC_Cache*)acache );\n  }\n\n\n#ifndef FTC_INLINE\n\n  FT_LOCAL_DEF( FT_Error )\n  FTC_GCache_Lookup( FTC_GCache   cache,\n                     FT_PtrDist   hash,\n                     FT_UInt      gindex,\n                     FTC_GQuery   query,\n                     FTC_Node    *anode )\n  {\n    FT_Error  error;\n\n\n    query->gindex = gindex;\n\n    FTC_MRULIST_LOOKUP( &cache->families, query, query->family, error );\n    if ( !error )\n    {\n      FTC_Family  family = query->family;\n\n\n      /* prevent the family from being destroyed too early when an        */\n      /* out-of-memory condition occurs during glyph node initialization. */\n      family->num_nodes++;\n\n      error = FTC_Cache_Lookup( FTC_CACHE( cache ), hash, query, anode );\n\n      if ( --family->num_nodes == 0 )\n        FTC_FAMILY_FREE( family, cache );\n    }\n    return error;\n  }\n\n#endif /* !FTC_INLINE */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcglyph.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcglyph.h                                                             */\n/*                                                                         */\n/*    FreeType abstract glyph cache (specification).                       */\n/*                                                                         */\n/*  Copyright 2000-2001, 2003, 2004, 2006, 2007, 2011 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*\n   *\n   *  FTC_GCache is an _abstract_ cache object optimized to store glyph\n   *  data.  It works as follows:\n   *\n   *   - It manages FTC_GNode objects. Each one of them can hold one or more\n   *     glyph `items'.  Item types are not specified in the FTC_GCache but\n   *     in classes that extend it.\n   *\n   *   - Glyph attributes, like face ID, character size, render mode, etc.,\n   *     can be grouped into abstract `glyph families'.  This avoids storing\n   *     the attributes within the FTC_GCache, since it is likely that many\n   *     FTC_GNodes will belong to the same family in typical uses.\n   *\n   *   - Each FTC_GNode is thus an FTC_Node with two additional fields:\n   *\n   *       * gindex: A glyph index, or the first index in a glyph range.\n   *       * family: A pointer to a glyph `family'.\n   *\n   *   - Family types are not fully specific in the FTC_Family type, but\n   *     by classes that extend it.\n   *\n   *  Note that both FTC_ImageCache and FTC_SBitCache extend FTC_GCache.\n   *  They share an FTC_Family sub-class called FTC_BasicFamily which is\n   *  used to store the following data: face ID, pixel/point sizes, load\n   *  flags.  For more details see the file `src/cache/ftcbasic.c'.\n   *\n   *  Client applications can extend FTC_GNode with their own FTC_GNode\n   *  and FTC_Family sub-classes to implement more complex caches (e.g.,\n   *  handling automatic synthesis, like obliquing & emboldening, colored\n   *  glyphs, etc.).\n   *\n   *  See also the FTC_ICache & FTC_SCache classes in `ftcimage.h' and\n   *  `ftcsbits.h', which both extend FTC_GCache with additional\n   *  optimizations.\n   *\n   *  A typical FTC_GCache implementation must provide at least the\n   *  following:\n   *\n   *  - FTC_GNode sub-class, e.g. MyNode, with relevant methods:\n   *        my_node_new            (must call FTC_GNode_Init)\n   *        my_node_free           (must call FTC_GNode_Done)\n   *        my_node_compare        (must call FTC_GNode_Compare)\n   *        my_node_remove_faceid  (must call ftc_gnode_unselect in case\n   *                                of match)\n   *\n   *  - FTC_Family sub-class, e.g. MyFamily, with relevant methods:\n   *        my_family_compare\n   *        my_family_init\n   *        my_family_reset (optional)\n   *        my_family_done\n   *\n   *  - FTC_GQuery sub-class, e.g. MyQuery, to hold cache-specific query\n   *    data.\n   *\n   *  - Constant structures for a FTC_GNodeClass.\n   *\n   *  - MyCacheNew() can be implemented easily as a call to the convenience\n   *    function FTC_GCache_New.\n   *\n   *  - MyCacheLookup with a call to FTC_GCache_Lookup.  This function will\n   *    automatically:\n   *\n   *    - Search for the corresponding family in the cache, or create\n   *      a new one if necessary.  Put it in FTC_GQUERY(myquery).family\n   *\n   *    - Call FTC_Cache_Lookup.\n   *\n   *    If it returns NULL, you should create a new node, then call\n   *    ftc_cache_add as usual.\n   */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Important: The functions defined in this file are only used to        */\n  /*            implement an abstract glyph cache class.  You need to      */\n  /*            provide additional logic to implement a complete cache.    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*********                                                       *********/\n  /*********             WARNING, THIS IS BETA CODE.               *********/\n  /*********                                                       *********/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n#ifndef __FTCGLYPH_H__\n#define __FTCGLYPH_H__\n\n\n#include <ft2build.h>\n#include \"ftcmanag.h\"\n\n\nFT_BEGIN_HEADER\n\n\n /*\n  *  We can group glyphs into `families'.  Each family correspond to a\n  *  given face ID, character size, transform, etc.\n  *\n  *  Families are implemented as MRU list nodes.  They are\n  *  reference-counted.\n  */\n\n  typedef struct  FTC_FamilyRec_\n  {\n    FTC_MruNodeRec    mrunode;\n    FT_UInt           num_nodes; /* current number of nodes in this family */\n    FTC_Cache         cache;\n    FTC_MruListClass  clazz;\n\n  } FTC_FamilyRec, *FTC_Family;\n\n#define  FTC_FAMILY(x)    ( (FTC_Family)(x) )\n#define  FTC_FAMILY_P(x)  ( (FTC_Family*)(x) )\n\n\n  typedef struct  FTC_GNodeRec_\n  {\n    FTC_NodeRec      node;\n    FTC_Family       family;\n    FT_UInt          gindex;\n\n  } FTC_GNodeRec, *FTC_GNode;\n\n#define FTC_GNODE( x )    ( (FTC_GNode)(x) )\n#define FTC_GNODE_P( x )  ( (FTC_GNode*)(x) )\n\n\n  typedef struct  FTC_GQueryRec_\n  {\n    FT_UInt      gindex;\n    FTC_Family   family;\n\n  } FTC_GQueryRec, *FTC_GQuery;\n\n#define FTC_GQUERY( x )  ( (FTC_GQuery)(x) )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* These functions are exported so that they can be called from          */\n  /* user-provided cache classes; otherwise, they are really part of the   */\n  /* cache sub-system internals.                                           */\n  /*                                                                       */\n\n  /* must be called by derived FTC_Node_InitFunc routines */\n  FT_LOCAL( void )\n  FTC_GNode_Init( FTC_GNode   node,\n                  FT_UInt     gindex,  /* glyph index for node */\n                  FTC_Family  family );\n\n#ifdef FTC_INLINE\n\n  /* returns TRUE iff the query's glyph index correspond to the node;  */\n  /* this assumes that the `family' and `hash' fields of the query are */\n  /* already correctly set                                             */\n  FT_LOCAL( FT_Bool )\n  FTC_GNode_Compare( FTC_GNode   gnode,\n                     FTC_GQuery  gquery,\n                     FTC_Cache   cache,\n                     FT_Bool*    list_changed );\n\n#endif\n\n  /* call this function to clear a node's family -- this is necessary */\n  /* to implement the `node_remove_faceid' cache method correctly     */\n  FT_LOCAL( void )\n  FTC_GNode_UnselectFamily( FTC_GNode  gnode,\n                            FTC_Cache  cache );\n\n  /* must be called by derived FTC_Node_DoneFunc routines */\n  FT_LOCAL( void )\n  FTC_GNode_Done( FTC_GNode  node,\n                  FTC_Cache  cache );\n\n\n  FT_LOCAL( void )\n  FTC_Family_Init( FTC_Family  family,\n                   FTC_Cache   cache );\n\n  typedef struct FTC_GCacheRec_\n  {\n    FTC_CacheRec    cache;\n    FTC_MruListRec  families;\n\n  } FTC_GCacheRec, *FTC_GCache;\n\n#define FTC_GCACHE( x )  ((FTC_GCache)(x))\n\n\n#if 0\n  /* can be used as @FTC_Cache_InitFunc */\n  FT_LOCAL( FT_Error )\n  FTC_GCache_Init( FTC_GCache  cache );\n#endif\n\n\n#if 0\n  /* can be used as @FTC_Cache_DoneFunc */\n  FT_LOCAL( void )\n  FTC_GCache_Done( FTC_GCache  cache );\n#endif\n\n\n  /* the glyph cache class adds fields for the family implementation */\n  typedef struct  FTC_GCacheClassRec_\n  {\n    FTC_CacheClassRec  clazz;\n    FTC_MruListClass   family_class;\n\n  } FTC_GCacheClassRec;\n\n  typedef const FTC_GCacheClassRec*   FTC_GCacheClass;\n\n#define FTC_GCACHE_CLASS( x )  ((FTC_GCacheClass)(x))\n\n#define FTC_CACHE__GCACHE_CLASS( x ) \\\n          FTC_GCACHE_CLASS( FTC_CACHE(x)->org_class )\n#define FTC_CACHE__FAMILY_CLASS( x ) \\\n          ( (FTC_MruListClass)FTC_CACHE__GCACHE_CLASS( x )->family_class )\n\n\n  /* convenience function; use it instead of FTC_Manager_Register_Cache */\n  FT_LOCAL( FT_Error )\n  FTC_GCache_New( FTC_Manager       manager,\n                  FTC_GCacheClass   clazz,\n                  FTC_GCache       *acache );\n\n#ifndef FTC_INLINE\n  FT_LOCAL( FT_Error )\n  FTC_GCache_Lookup( FTC_GCache   cache,\n                     FT_PtrDist   hash,\n                     FT_UInt      gindex,\n                     FTC_GQuery   query,\n                     FTC_Node    *anode );\n#endif\n\n\n  /* */\n\n\n#define FTC_FAMILY_FREE( family, cache )                      \\\n          FTC_MruList_Remove( &FTC_GCACHE((cache))->families, \\\n                              (FTC_MruNode)(family) )\n\n\n#ifdef FTC_INLINE\n\n#define FTC_GCACHE_LOOKUP_CMP( cache, famcmp, nodecmp, hash,                \\\n                               gindex, query, node, error )                 \\\n  FT_BEGIN_STMNT                                                            \\\n    FTC_GCache               _gcache   = FTC_GCACHE( cache );               \\\n    FTC_GQuery               _gquery   = (FTC_GQuery)( query );             \\\n    FTC_MruNode_CompareFunc  _fcompare = (FTC_MruNode_CompareFunc)(famcmp); \\\n    FTC_MruNode              _mrunode;                                      \\\n                                                                            \\\n                                                                            \\\n    _gquery->gindex = (gindex);                                             \\\n                                                                            \\\n    FTC_MRULIST_LOOKUP_CMP( &_gcache->families, _gquery, _fcompare,         \\\n                            _mrunode, error );                              \\\n    _gquery->family = FTC_FAMILY( _mrunode );                               \\\n    if ( !error )                                                           \\\n    {                                                                       \\\n      FTC_Family  _gqfamily = _gquery->family;                              \\\n                                                                            \\\n                                                                            \\\n      _gqfamily->num_nodes++;                                               \\\n                                                                            \\\n      FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error );     \\\n                                                                            \\\n      if ( --_gqfamily->num_nodes == 0 )                                    \\\n        FTC_FAMILY_FREE( _gqfamily, _gcache );                              \\\n    }                                                                       \\\n  FT_END_STMNT\n  /* */\n\n#else /* !FTC_INLINE */\n\n#define FTC_GCACHE_LOOKUP_CMP( cache, famcmp, nodecmp, hash,          \\\n                               gindex, query, node, error )           \\\n   FT_BEGIN_STMNT                                                     \\\n                                                                      \\\n     error = FTC_GCache_Lookup( FTC_GCACHE( cache ), hash, gindex,    \\\n                                FTC_GQUERY( query ), &node );         \\\n                                                                      \\\n   FT_END_STMNT\n\n#endif /* !FTC_INLINE */\n\n\nFT_END_HEADER\n\n\n#endif /* __FTCGLYPH_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcimage.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcimage.c                                                             */\n/*                                                                         */\n/*    FreeType Image cache (body).                                         */\n/*                                                                         */\n/*  Copyright 2000-2001, 2003, 2004, 2006, 2010 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_CACHE_H\n#include \"ftcimage.h\"\n#include FT_INTERNAL_MEMORY_H\n\n#include \"ftccback.h\"\n#include \"ftcerror.h\"\n\n\n  /* finalize a given glyph image node */\n  FT_LOCAL_DEF( void )\n  ftc_inode_free( FTC_Node   ftcinode,\n                  FTC_Cache  cache )\n  {\n    FTC_INode  inode = (FTC_INode)ftcinode;\n    FT_Memory  memory = cache->memory;\n\n\n    if ( inode->glyph )\n    {\n      FT_Done_Glyph( inode->glyph );\n      inode->glyph = NULL;\n    }\n\n    FTC_GNode_Done( FTC_GNODE( inode ), cache );\n    FT_FREE( inode );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_INode_Free( FTC_INode  inode,\n                  FTC_Cache  cache )\n  {\n    ftc_inode_free( FTC_NODE( inode ), cache );\n  }\n\n\n  /* initialize a new glyph image node */\n  FT_LOCAL_DEF( FT_Error )\n  FTC_INode_New( FTC_INode   *pinode,\n                 FTC_GQuery   gquery,\n                 FTC_Cache    cache )\n  {\n    FT_Memory  memory = cache->memory;\n    FT_Error   error;\n    FTC_INode  inode  = NULL;\n\n\n    if ( !FT_NEW( inode ) )\n    {\n      FTC_GNode         gnode  = FTC_GNODE( inode );\n      FTC_Family        family = gquery->family;\n      FT_UInt           gindex = gquery->gindex;\n      FTC_IFamilyClass  clazz  = FTC_CACHE__IFAMILY_CLASS( cache );\n\n\n      /* initialize its inner fields */\n      FTC_GNode_Init( gnode, gindex, family );\n\n      /* we will now load the glyph image */\n      error = clazz->family_load_glyph( family, gindex, cache,\n                                        &inode->glyph );\n      if ( error )\n      {\n        FTC_INode_Free( inode, cache );\n        inode = NULL;\n      }\n    }\n\n    *pinode = inode;\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  ftc_inode_new( FTC_Node   *ftcpinode,\n                 FT_Pointer  ftcgquery,\n                 FTC_Cache   cache )\n  {\n    FTC_INode  *pinode = (FTC_INode*)ftcpinode;\n    FTC_GQuery  gquery = (FTC_GQuery)ftcgquery;\n\n\n    return FTC_INode_New( pinode, gquery, cache );\n  }\n\n\n  FT_LOCAL_DEF( FT_Offset )\n  ftc_inode_weight( FTC_Node   ftcinode,\n                    FTC_Cache  ftccache )\n  {\n    FTC_INode  inode = (FTC_INode)ftcinode;\n    FT_Offset  size  = 0;\n    FT_Glyph   glyph = inode->glyph;\n\n    FT_UNUSED( ftccache );\n\n\n    switch ( glyph->format )\n    {\n    case FT_GLYPH_FORMAT_BITMAP:\n      {\n        FT_BitmapGlyph  bitg;\n\n\n        bitg = (FT_BitmapGlyph)glyph;\n        size = bitg->bitmap.rows * ft_labs( bitg->bitmap.pitch ) +\n               sizeof ( *bitg );\n      }\n      break;\n\n    case FT_GLYPH_FORMAT_OUTLINE:\n      {\n        FT_OutlineGlyph  outg;\n\n\n        outg = (FT_OutlineGlyph)glyph;\n        size = outg->outline.n_points *\n                 ( sizeof ( FT_Vector ) + sizeof ( FT_Byte ) ) +\n               outg->outline.n_contours * sizeof ( FT_Short ) +\n               sizeof ( *outg );\n      }\n      break;\n\n    default:\n      ;\n    }\n\n    size += sizeof ( *inode );\n    return size;\n  }\n\n\n#if 0\n\n  FT_LOCAL_DEF( FT_Offset )\n  FTC_INode_Weight( FTC_INode  inode )\n  {\n    return ftc_inode_weight( FTC_NODE( inode ), NULL );\n  }\n\n#endif /* 0 */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcimage.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcimage.h                                                             */\n/*                                                                         */\n/*    FreeType Generic Image cache (specification)                         */\n/*                                                                         */\n/*  Copyright 2000-2001, 2002, 2003, 2006 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n /*\n  *  FTC_ICache is an _abstract_ cache used to store a single FT_Glyph\n  *  image per cache node.\n  *\n  *  FTC_ICache extends FTC_GCache.  For an implementation example,\n  *  see FTC_ImageCache in `src/cache/ftbasic.c'.\n  */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Each image cache really manages FT_Glyph objects.                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTCIMAGE_H__\n#define __FTCIMAGE_H__\n\n\n#include <ft2build.h>\n#include FT_CACHE_H\n#include \"ftcglyph.h\"\n\nFT_BEGIN_HEADER\n\n\n  /* the FT_Glyph image node type - we store only 1 glyph per node */\n  typedef struct  FTC_INodeRec_\n  {\n    FTC_GNodeRec  gnode;\n    FT_Glyph      glyph;\n\n  } FTC_INodeRec, *FTC_INode;\n\n#define FTC_INODE( x )         ( (FTC_INode)( x ) )\n#define FTC_INODE_GINDEX( x )  FTC_GNODE(x)->gindex\n#define FTC_INODE_FAMILY( x )  FTC_GNODE(x)->family\n\n  typedef FT_Error\n  (*FTC_IFamily_LoadGlyphFunc)( FTC_Family  family,\n                                FT_UInt     gindex,\n                                FTC_Cache   cache,\n                                FT_Glyph   *aglyph );\n\n  typedef struct  FTC_IFamilyClassRec_\n  {\n    FTC_MruListClassRec        clazz;\n    FTC_IFamily_LoadGlyphFunc  family_load_glyph;\n\n  } FTC_IFamilyClassRec;\n\n  typedef const FTC_IFamilyClassRec*  FTC_IFamilyClass;\n\n#define FTC_IFAMILY_CLASS( x )  ((FTC_IFamilyClass)(x))\n\n#define FTC_CACHE__IFAMILY_CLASS( x ) \\\n          FTC_IFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS(x)->family_class )\n\n\n  /* can be used as a @FTC_Node_FreeFunc */\n  FT_LOCAL( void )\n  FTC_INode_Free( FTC_INode  inode,\n                  FTC_Cache  cache );\n\n  /* Can be used as @FTC_Node_NewFunc.  `gquery.index' and `gquery.family'\n   * must be set correctly.  This function will call the `family_load_glyph'\n   * method to load the FT_Glyph into the cache node.\n   */\n  FT_LOCAL( FT_Error )\n  FTC_INode_New( FTC_INode   *pinode,\n                 FTC_GQuery   gquery,\n                 FTC_Cache    cache );\n\n#if 0\n  /* can be used as @FTC_Node_WeightFunc */\n  FT_LOCAL( FT_ULong )\n  FTC_INode_Weight( FTC_INode  inode );\n#endif\n\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FTCIMAGE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcmanag.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcmanag.c                                                             */\n/*                                                                         */\n/*    FreeType Cache Manager (body).                                       */\n/*                                                                         */\n/*  Copyright 2000-2006, 2008-2010, 2013, 2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_CACHE_H\n#include \"ftcmanag.h\"\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_SIZES_H\n\n#include \"ftccback.h\"\n#include \"ftcerror.h\"\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"cache system does not support PIC yet\"\n#endif\n\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cache\n\n#define FTC_LRU_GET_MANAGER( lru )  ( (FTC_Manager)(lru)->user_data )\n\n\n  static FT_Error\n  ftc_scaler_lookup_size( FTC_Manager  manager,\n                          FTC_Scaler   scaler,\n                          FT_Size     *asize )\n  {\n    FT_Face   face;\n    FT_Size   size = NULL;\n    FT_Error  error;\n\n\n    error = FTC_Manager_LookupFace( manager, scaler->face_id, &face );\n    if ( error )\n      goto Exit;\n\n    error = FT_New_Size( face, &size );\n    if ( error )\n      goto Exit;\n\n    FT_Activate_Size( size );\n\n    if ( scaler->pixel )\n      error = FT_Set_Pixel_Sizes( face, scaler->width, scaler->height );\n    else\n      error = FT_Set_Char_Size( face, scaler->width, scaler->height,\n                                scaler->x_res, scaler->y_res );\n    if ( error )\n    {\n      FT_Done_Size( size );\n      size = NULL;\n    }\n\n  Exit:\n    *asize = size;\n    return error;\n  }\n\n\n  typedef struct  FTC_SizeNodeRec_\n  {\n    FTC_MruNodeRec  node;\n    FT_Size         size;\n    FTC_ScalerRec   scaler;\n\n  } FTC_SizeNodeRec, *FTC_SizeNode;\n\n#define FTC_SIZE_NODE( x ) ( (FTC_SizeNode)( x ) )\n\n\n  FT_CALLBACK_DEF( void )\n  ftc_size_node_done( FTC_MruNode  ftcnode,\n                      FT_Pointer   data )\n  {\n    FTC_SizeNode  node = (FTC_SizeNode)ftcnode;\n    FT_Size       size = node->size;\n    FT_UNUSED( data );\n\n\n    if ( size )\n      FT_Done_Size( size );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Bool )\n  ftc_size_node_compare( FTC_MruNode  ftcnode,\n                         FT_Pointer   ftcscaler )\n  {\n    FTC_SizeNode  node    = (FTC_SizeNode)ftcnode;\n    FTC_Scaler    scaler  = (FTC_Scaler)ftcscaler;\n    FTC_Scaler    scaler0 = &node->scaler;\n\n\n    if ( FTC_SCALER_COMPARE( scaler0, scaler ) )\n    {\n      FT_Activate_Size( node->size );\n      return 1;\n    }\n    return 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ftc_size_node_init( FTC_MruNode  ftcnode,\n                      FT_Pointer   ftcscaler,\n                      FT_Pointer   ftcmanager )\n  {\n    FTC_SizeNode  node    = (FTC_SizeNode)ftcnode;\n    FTC_Scaler    scaler  = (FTC_Scaler)ftcscaler;\n    FTC_Manager   manager = (FTC_Manager)ftcmanager;\n\n\n    node->scaler = scaler[0];\n\n    return ftc_scaler_lookup_size( manager, scaler, &node->size );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ftc_size_node_reset( FTC_MruNode  ftcnode,\n                       FT_Pointer   ftcscaler,\n                       FT_Pointer   ftcmanager )\n  {\n    FTC_SizeNode  node    = (FTC_SizeNode)ftcnode;\n    FTC_Scaler    scaler  = (FTC_Scaler)ftcscaler;\n    FTC_Manager   manager = (FTC_Manager)ftcmanager;\n\n\n    FT_Done_Size( node->size );\n\n    node->scaler = scaler[0];\n\n    return ftc_scaler_lookup_size( manager, scaler, &node->size );\n  }\n\n\n  static\n  const FTC_MruListClassRec  ftc_size_list_class =\n  {\n    sizeof ( FTC_SizeNodeRec ),\n    ftc_size_node_compare,\n    ftc_size_node_init,\n    ftc_size_node_reset,\n    ftc_size_node_done\n  };\n\n\n  /* helper function used by ftc_face_node_done */\n  static FT_Bool\n  ftc_size_node_compare_faceid( FTC_MruNode  ftcnode,\n                                FT_Pointer   ftcface_id )\n  {\n    FTC_SizeNode  node    = (FTC_SizeNode)ftcnode;\n    FTC_FaceID    face_id = (FTC_FaceID)ftcface_id;\n\n\n    return FT_BOOL( node->scaler.face_id == face_id );\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_Manager_LookupSize( FTC_Manager  manager,\n                          FTC_Scaler   scaler,\n                          FT_Size     *asize )\n  {\n    FT_Error     error;\n    FTC_MruNode  mrunode;\n\n\n    if ( !asize || !scaler )\n      return FT_THROW( Invalid_Argument );\n\n    *asize = NULL;\n\n    if ( !manager )\n      return FT_THROW( Invalid_Cache_Handle );\n\n#ifdef FTC_INLINE\n\n    FTC_MRULIST_LOOKUP_CMP( &manager->sizes, scaler, ftc_size_node_compare,\n                            mrunode, error );\n\n#else\n    error = FTC_MruList_Lookup( &manager->sizes, scaler, &mrunode );\n#endif\n\n    if ( !error )\n      *asize = FTC_SIZE_NODE( mrunode )->size;\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    FACE MRU IMPLEMENTATION                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  FTC_FaceNodeRec_\n  {\n    FTC_MruNodeRec  node;\n    FTC_FaceID      face_id;\n    FT_Face         face;\n\n  } FTC_FaceNodeRec, *FTC_FaceNode;\n\n#define FTC_FACE_NODE( x ) ( ( FTC_FaceNode )( x ) )\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  ftc_face_node_init( FTC_MruNode  ftcnode,\n                      FT_Pointer   ftcface_id,\n                      FT_Pointer   ftcmanager )\n  {\n    FTC_FaceNode  node    = (FTC_FaceNode)ftcnode;\n    FTC_FaceID    face_id = (FTC_FaceID)ftcface_id;\n    FTC_Manager   manager = (FTC_Manager)ftcmanager;\n    FT_Error      error;\n\n\n    node->face_id = face_id;\n\n    error = manager->request_face( face_id,\n                                   manager->library,\n                                   manager->request_data,\n                                   &node->face );\n    if ( !error )\n    {\n      /* destroy initial size object; it will be re-created later */\n      if ( node->face->size )\n        FT_Done_Size( node->face->size );\n    }\n\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  ftc_face_node_done( FTC_MruNode  ftcnode,\n                      FT_Pointer   ftcmanager )\n  {\n    FTC_FaceNode  node    = (FTC_FaceNode)ftcnode;\n    FTC_Manager   manager = (FTC_Manager)ftcmanager;\n\n\n    /* we must begin by removing all scalers for the target face */\n    /* from the manager's list                                   */\n    FTC_MruList_RemoveSelection( &manager->sizes,\n                                 ftc_size_node_compare_faceid,\n                                 node->face_id );\n\n    /* all right, we can discard the face now */\n    FT_Done_Face( node->face );\n    node->face    = NULL;\n    node->face_id = NULL;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Bool )\n  ftc_face_node_compare( FTC_MruNode  ftcnode,\n                         FT_Pointer   ftcface_id )\n  {\n    FTC_FaceNode  node    = (FTC_FaceNode)ftcnode;\n    FTC_FaceID    face_id = (FTC_FaceID)ftcface_id;\n\n\n    return FT_BOOL( node->face_id == face_id );\n  }\n\n\n  static\n  const FTC_MruListClassRec  ftc_face_list_class =\n  {\n    sizeof ( FTC_FaceNodeRec),\n\n    ftc_face_node_compare,\n    ftc_face_node_init,\n    0,                          /* FTC_MruNode_ResetFunc */\n    ftc_face_node_done\n  };\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_Manager_LookupFace( FTC_Manager  manager,\n                          FTC_FaceID   face_id,\n                          FT_Face     *aface )\n  {\n    FT_Error     error;\n    FTC_MruNode  mrunode;\n\n\n    if ( !aface || !face_id )\n      return FT_THROW( Invalid_Argument );\n\n    *aface = NULL;\n\n    if ( !manager )\n      return FT_THROW( Invalid_Cache_Handle );\n\n    /* we break encapsulation for the sake of speed */\n#ifdef FTC_INLINE\n\n    FTC_MRULIST_LOOKUP_CMP( &manager->faces, face_id, ftc_face_node_compare,\n                            mrunode, error );\n\n#else\n    error = FTC_MruList_Lookup( &manager->faces, face_id, &mrunode );\n#endif\n\n    if ( !error )\n      *aface = FTC_FACE_NODE( mrunode )->face;\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    CACHE MANAGER ROUTINES                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FTC_Manager_New( FT_Library          library,\n                   FT_UInt             max_faces,\n                   FT_UInt             max_sizes,\n                   FT_ULong            max_bytes,\n                   FTC_Face_Requester  requester,\n                   FT_Pointer          req_data,\n                   FTC_Manager        *amanager )\n  {\n    FT_Error     error;\n    FT_Memory    memory;\n    FTC_Manager  manager = 0;\n\n\n    if ( !library )\n      return FT_THROW( Invalid_Library_Handle );\n\n    if ( !amanager || !requester )\n      return FT_THROW( Invalid_Argument );\n\n    memory = library->memory;\n\n    if ( FT_NEW( manager ) )\n      goto Exit;\n\n    if ( max_faces == 0 )\n      max_faces = FTC_MAX_FACES_DEFAULT;\n\n    if ( max_sizes == 0 )\n      max_sizes = FTC_MAX_SIZES_DEFAULT;\n\n    if ( max_bytes == 0 )\n      max_bytes = FTC_MAX_BYTES_DEFAULT;\n\n    manager->library      = library;\n    manager->memory       = memory;\n    manager->max_weight   = max_bytes;\n\n    manager->request_face = requester;\n    manager->request_data = req_data;\n\n    FTC_MruList_Init( &manager->faces,\n                      &ftc_face_list_class,\n                      max_faces,\n                      manager,\n                      memory );\n\n    FTC_MruList_Init( &manager->sizes,\n                      &ftc_size_list_class,\n                      max_sizes,\n                      manager,\n                      memory );\n\n    *amanager = manager;\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( void )\n  FTC_Manager_Done( FTC_Manager  manager )\n  {\n    FT_Memory  memory;\n    FT_UInt    idx;\n\n\n    if ( !manager || !manager->library )\n      return;\n\n    memory = manager->memory;\n\n    /* now discard all caches */\n    for (idx = manager->num_caches; idx-- > 0; )\n    {\n      FTC_Cache  cache = manager->caches[idx];\n\n\n      if ( cache )\n      {\n        cache->clazz.cache_done( cache );\n        FT_FREE( cache );\n        manager->caches[idx] = NULL;\n      }\n    }\n    manager->num_caches = 0;\n\n    /* discard faces and sizes */\n    FTC_MruList_Done( &manager->sizes );\n    FTC_MruList_Done( &manager->faces );\n\n    manager->library = NULL;\n    manager->memory  = NULL;\n\n    FT_FREE( manager );\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( void )\n  FTC_Manager_Reset( FTC_Manager  manager )\n  {\n    if ( !manager )\n      return;\n\n    FTC_MruList_Reset( &manager->sizes );\n    FTC_MruList_Reset( &manager->faces );\n\n    FTC_Manager_FlushN( manager, manager->num_nodes );\n  }\n\n\n#ifdef FT_DEBUG_ERROR\n\n  static void\n  FTC_Manager_Check( FTC_Manager  manager )\n  {\n    FTC_Node  node, first;\n\n\n    first = manager->nodes_list;\n\n    /* check node weights */\n    if ( first )\n    {\n      FT_Offset  weight = 0;\n\n\n      node = first;\n\n      do\n      {\n        FTC_Cache  cache = manager->caches[node->cache_index];\n\n\n        if ( (FT_UInt)node->cache_index >= manager->num_caches )\n          FT_TRACE0(( \"FTC_Manager_Check: invalid node (cache index = %ld\\n\",\n                      node->cache_index ));\n        else\n          weight += cache->clazz.node_weight( node, cache );\n\n        node = FTC_NODE__NEXT( node );\n\n      } while ( node != first );\n\n      if ( weight != manager->cur_weight )\n        FT_TRACE0(( \"FTC_Manager_Check: invalid weight %ld instead of %ld\\n\",\n                    manager->cur_weight, weight ));\n    }\n\n    /* check circular list */\n    if ( first )\n    {\n      FT_UFast  count = 0;\n\n\n      node = first;\n      do\n      {\n        count++;\n        node = FTC_NODE__NEXT( node );\n\n      } while ( node != first );\n\n      if ( count != manager->num_nodes )\n        FT_TRACE0(( \"FTC_Manager_Check:\"\n                    \" invalid cache node count %d instead of %d\\n\",\n                    manager->num_nodes, count ));\n    }\n  }\n\n#endif /* FT_DEBUG_ERROR */\n\n\n  /* `Compress' the manager's data, i.e., get rid of old cache nodes */\n  /* that are not referenced anymore in order to limit the total     */\n  /* memory used by the cache.                                       */\n\n  /* documentation is in ftcmanag.h */\n\n  FT_LOCAL_DEF( void )\n  FTC_Manager_Compress( FTC_Manager  manager )\n  {\n    FTC_Node   node, first;\n\n\n    if ( !manager )\n      return;\n\n    first = manager->nodes_list;\n\n#ifdef FT_DEBUG_ERROR\n    FTC_Manager_Check( manager );\n\n    FT_TRACE0(( \"compressing, weight = %ld, max = %ld, nodes = %d\\n\",\n                manager->cur_weight, manager->max_weight,\n                manager->num_nodes ));\n#endif\n\n    if ( manager->cur_weight < manager->max_weight || first == NULL )\n      return;\n\n    /* go to last node -- it's a circular list */\n    node = FTC_NODE__PREV( first );\n    do\n    {\n      FTC_Node  prev;\n\n\n      prev = ( node == first ) ? NULL : FTC_NODE__PREV( node );\n\n      if ( node->ref_count <= 0 )\n        ftc_node_destroy( node, manager );\n\n      node = prev;\n\n    } while ( node && manager->cur_weight > manager->max_weight );\n  }\n\n\n  /* documentation is in ftcmanag.h */\n\n  FT_LOCAL_DEF( FT_Error )\n  FTC_Manager_RegisterCache( FTC_Manager      manager,\n                             FTC_CacheClass   clazz,\n                             FTC_Cache       *acache )\n  {\n    FT_Error   error = FT_ERR( Invalid_Argument );\n    FTC_Cache  cache = NULL;\n\n\n    if ( manager && clazz && acache )\n    {\n      FT_Memory  memory = manager->memory;\n\n\n      if ( manager->num_caches >= FTC_MAX_CACHES )\n      {\n        error = FT_THROW( Too_Many_Caches );\n        FT_ERROR(( \"FTC_Manager_RegisterCache:\"\n                   \" too many registered caches\\n\" ));\n        goto Exit;\n      }\n\n      if ( !FT_ALLOC( cache, clazz->cache_size ) )\n      {\n        cache->manager   = manager;\n        cache->memory    = memory;\n        cache->clazz     = clazz[0];\n        cache->org_class = clazz;\n\n        /* THIS IS VERY IMPORTANT!  IT WILL WRETCH THE MANAGER */\n        /* IF IT IS NOT SET CORRECTLY                          */\n        cache->index = manager->num_caches;\n\n        error = clazz->cache_init( cache );\n        if ( error )\n        {\n          clazz->cache_done( cache );\n          FT_FREE( cache );\n          goto Exit;\n        }\n\n        manager->caches[manager->num_caches++] = cache;\n      }\n    }\n\n  Exit:\n    if ( acache )\n      *acache = cache;\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  FTC_Manager_FlushN( FTC_Manager  manager,\n                      FT_UInt      count )\n  {\n    FTC_Node  first = manager->nodes_list;\n    FTC_Node  node;\n    FT_UInt   result;\n\n\n    /* try to remove `count' nodes from the list */\n    if ( first == NULL )  /* empty list! */\n      return 0;\n\n    /* go to last node - it's a circular list */\n    node = FTC_NODE__PREV(first);\n    for ( result = 0; result < count; )\n    {\n      FTC_Node  prev = FTC_NODE__PREV( node );\n\n\n      /* don't touch locked nodes */\n      if ( node->ref_count <= 0 )\n      {\n        ftc_node_destroy( node, manager );\n        result++;\n      }\n\n      if ( node == first )\n        break;\n\n      node = prev;\n    }\n    return  result;\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( void )\n  FTC_Manager_RemoveFaceID( FTC_Manager  manager,\n                            FTC_FaceID   face_id )\n  {\n    FT_UInt  nn;\n\n\n    if ( !manager || !face_id )\n      return;\n\n    /* this will remove all FTC_SizeNode that correspond to\n     * the face_id as well\n     */\n    FTC_MruList_RemoveSelection( &manager->faces,\n                                 ftc_face_node_compare,\n                                 face_id );\n\n    for ( nn = 0; nn < manager->num_caches; nn++ )\n      FTC_Cache_RemoveFaceID( manager->caches[nn], face_id );\n  }\n\n\n  /* documentation is in ftcache.h */\n\n  FT_EXPORT_DEF( void )\n  FTC_Node_Unref( FTC_Node     node,\n                  FTC_Manager  manager )\n  {\n    if ( node                                             &&\n         manager                                          &&\n         (FT_UInt)node->cache_index < manager->num_caches )\n      node->ref_count--;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcmanag.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcmanag.h                                                             */\n/*                                                                         */\n/*    FreeType Cache Manager (specification).                              */\n/*                                                                         */\n/*  Copyright 2000-2001, 2003, 2004, 2006, 2010, 2013 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* A cache manager is in charge of the following:                        */\n  /*                                                                       */\n  /*  - Maintain a mapping between generic FTC_FaceIDs and live FT_Face    */\n  /*    objects.  The mapping itself is performed through a user-provided  */\n  /*    callback.  However, the manager maintains a small cache of FT_Face */\n  /*    and FT_Size objects in order to speed up things considerably.      */\n  /*                                                                       */\n  /*  - Manage one or more cache objects.  Each cache is in charge of      */\n  /*    holding a varying number of `cache nodes'.  Each cache node        */\n  /*    represents a minimal amount of individually accessible cached      */\n  /*    data.  For example, a cache node can be an FT_Glyph image          */\n  /*    containing a vector outline, or some glyph metrics, or anything    */\n  /*    else.                                                              */\n  /*                                                                       */\n  /*    Each cache node has a certain size in bytes that is added to the   */\n  /*    total amount of `cache memory' within the manager.                 */\n  /*                                                                       */\n  /*    All cache nodes are located in a global LRU list, where the oldest */\n  /*    node is at the tail of the list.                                   */\n  /*                                                                       */\n  /*    Each node belongs to a single cache, and includes a reference      */\n  /*    count to avoid destroying it (due to caching).                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*********                                                       *********/\n  /*********             WARNING, THIS IS BETA CODE.               *********/\n  /*********                                                       *********/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n#ifndef __FTCMANAG_H__\n#define __FTCMANAG_H__\n\n\n#include <ft2build.h>\n#include FT_CACHE_H\n#include \"ftcmru.h\"\n#include \"ftccache.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    cache_subsystem                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#define FTC_MAX_FACES_DEFAULT  2\n#define FTC_MAX_SIZES_DEFAULT  4\n#define FTC_MAX_BYTES_DEFAULT  200000L  /* ~200kByte by default */\n\n  /* maximum number of caches registered in a single manager */\n#define FTC_MAX_CACHES         16\n\n\n  typedef struct  FTC_ManagerRec_\n  {\n    FT_Library          library;\n    FT_Memory           memory;\n\n    FTC_Node            nodes_list;\n    FT_Offset           max_weight;\n    FT_Offset           cur_weight;\n    FT_UInt             num_nodes;\n\n    FTC_Cache           caches[FTC_MAX_CACHES];\n    FT_UInt             num_caches;\n\n    FTC_MruListRec      faces;\n    FTC_MruListRec      sizes;\n\n    FT_Pointer          request_data;\n    FTC_Face_Requester  request_face;\n\n  } FTC_ManagerRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_Compress                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used to check the state of the cache manager if   */\n  /*    its `num_bytes' field is greater than its `max_bytes' field.  It   */\n  /*    will flush as many old cache nodes as possible (ignoring cache     */\n  /*    nodes with a non-zero reference count).                            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    manager :: A handle to the cache manager.                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Client applications should not call this function directly.  It is */\n  /*    normally invoked by specific cache implementations.                */\n  /*                                                                       */\n  /*    The reason this function is exported is to allow client-specific   */\n  /*    cache classes.                                                     */\n  /*                                                                       */\n  FT_LOCAL( void )\n  FTC_Manager_Compress( FTC_Manager  manager );\n\n\n  /* try to flush `count' old nodes from the cache; return the number\n   * of really flushed nodes\n   */\n  FT_LOCAL( FT_UInt )\n  FTC_Manager_FlushN( FTC_Manager  manager,\n                      FT_UInt      count );\n\n\n  /* this must be used internally for the moment */\n  FT_LOCAL( FT_Error )\n  FTC_Manager_RegisterCache( FTC_Manager      manager,\n                             FTC_CacheClass   clazz,\n                             FTC_Cache       *acache );\n\n /* */\n\n#define FTC_SCALER_COMPARE( a, b )                \\\n    ( (a)->face_id      == (b)->face_id      &&   \\\n      (a)->width        == (b)->width        &&   \\\n      (a)->height       == (b)->height       &&   \\\n      ((a)->pixel != 0) == ((b)->pixel != 0) &&   \\\n      ( (a)->pixel ||                             \\\n        ( (a)->x_res == (b)->x_res &&             \\\n          (a)->y_res == (b)->y_res ) ) )\n\n#define FTC_SCALER_HASH( q )                                 \\\n    ( _FTC_FACE_ID_HASH( (q)->face_id ) +                     \\\n      (q)->width + (q)->height*7 +                           \\\n      ( (q)->pixel ? 0 : ( (q)->x_res*33 ^ (q)->y_res*61 ) ) )\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FTCMANAG_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcmru.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcmru.c                                                               */\n/*                                                                         */\n/*    FreeType MRU support (body).                                         */\n/*                                                                         */\n/*  Copyright 2003, 2004, 2006, 2009 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_CACHE_H\n#include \"ftcmru.h\"\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n\n#include \"ftcerror.h\"\n\n\n  FT_LOCAL_DEF( void )\n  FTC_MruNode_Prepend( FTC_MruNode  *plist,\n                       FTC_MruNode   node )\n  {\n    FTC_MruNode  first = *plist;\n\n\n    if ( first )\n    {\n      FTC_MruNode  last = first->prev;\n\n\n#ifdef FT_DEBUG_ERROR\n      {\n        FTC_MruNode  cnode = first;\n\n\n        do\n        {\n          if ( cnode == node )\n          {\n            fprintf( stderr, \"FTC_MruNode_Prepend: invalid action\\n\" );\n            exit( 2 );\n          }\n          cnode = cnode->next;\n\n        } while ( cnode != first );\n      }\n#endif\n\n      first->prev = node;\n      last->next  = node;\n      node->next  = first;\n      node->prev  = last;\n    }\n    else\n    {\n      node->next = node;\n      node->prev = node;\n    }\n    *plist = node;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_MruNode_Up( FTC_MruNode  *plist,\n                  FTC_MruNode   node )\n  {\n    FTC_MruNode  first = *plist;\n\n\n    FT_ASSERT( first != NULL );\n\n    if ( first != node )\n    {\n      FTC_MruNode  prev, next, last;\n\n\n#ifdef FT_DEBUG_ERROR\n      {\n        FTC_MruNode  cnode = first;\n        do\n        {\n          if ( cnode == node )\n            goto Ok;\n          cnode = cnode->next;\n\n        } while ( cnode != first );\n\n        fprintf( stderr, \"FTC_MruNode_Up: invalid action\\n\" );\n        exit( 2 );\n      Ok:\n      }\n#endif\n      prev = node->prev;\n      next = node->next;\n\n      prev->next = next;\n      next->prev = prev;\n\n      last = first->prev;\n\n      last->next  = node;\n      first->prev = node;\n\n      node->next = first;\n      node->prev = last;\n\n      *plist = node;\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_MruNode_Remove( FTC_MruNode  *plist,\n                      FTC_MruNode   node )\n  {\n    FTC_MruNode  first = *plist;\n    FTC_MruNode  prev, next;\n\n\n    FT_ASSERT( first != NULL );\n\n#ifdef FT_DEBUG_ERROR\n      {\n        FTC_MruNode  cnode = first;\n\n\n        do\n        {\n          if ( cnode == node )\n            goto Ok;\n          cnode = cnode->next;\n\n        } while ( cnode != first );\n\n        fprintf( stderr, \"FTC_MruNode_Remove: invalid action\\n\" );\n        exit( 2 );\n      Ok:\n      }\n#endif\n\n    prev = node->prev;\n    next = node->next;\n\n    prev->next = next;\n    next->prev = prev;\n\n    if ( node == next )\n    {\n      FT_ASSERT( first == node );\n      FT_ASSERT( prev  == node );\n\n      *plist = NULL;\n    }\n    else if ( node == first )\n      *plist = next;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_MruList_Init( FTC_MruList       list,\n                    FTC_MruListClass  clazz,\n                    FT_UInt           max_nodes,\n                    FT_Pointer        data,\n                    FT_Memory         memory )\n  {\n    list->num_nodes = 0;\n    list->max_nodes = max_nodes;\n    list->nodes     = NULL;\n    list->clazz     = *clazz;\n    list->data      = data;\n    list->memory    = memory;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_MruList_Reset( FTC_MruList  list )\n  {\n    while ( list->nodes )\n      FTC_MruList_Remove( list, list->nodes );\n\n    FT_ASSERT( list->num_nodes == 0 );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_MruList_Done( FTC_MruList  list )\n  {\n    FTC_MruList_Reset( list );\n  }\n\n\n#ifndef FTC_INLINE\n  FT_LOCAL_DEF( FTC_MruNode )\n  FTC_MruList_Find( FTC_MruList  list,\n                    FT_Pointer   key )\n  {\n    FTC_MruNode_CompareFunc  compare = list->clazz.node_compare;\n    FTC_MruNode              first, node;\n\n\n    first = list->nodes;\n    node  = NULL;\n\n    if ( first )\n    {\n      node = first;\n      do\n      {\n        if ( compare( node, key ) )\n        {\n          if ( node != first )\n            FTC_MruNode_Up( &list->nodes, node );\n\n          return node;\n        }\n\n        node = node->next;\n\n      } while ( node != first);\n    }\n\n    return NULL;\n  }\n#endif\n\n  FT_LOCAL_DEF( FT_Error )\n  FTC_MruList_New( FTC_MruList   list,\n                   FT_Pointer    key,\n                   FTC_MruNode  *anode )\n  {\n    FT_Error     error;\n    FTC_MruNode  node = NULL;\n    FT_Memory    memory = list->memory;\n\n\n    if ( list->num_nodes >= list->max_nodes && list->max_nodes > 0 )\n    {\n      node = list->nodes->prev;\n\n      FT_ASSERT( node );\n\n      if ( list->clazz.node_reset )\n      {\n        FTC_MruNode_Up( &list->nodes, node );\n\n        error = list->clazz.node_reset( node, key, list->data );\n        if ( !error )\n          goto Exit;\n      }\n\n      FTC_MruNode_Remove( &list->nodes, node );\n      list->num_nodes--;\n\n      if ( list->clazz.node_done )\n        list->clazz.node_done( node, list->data );\n    }\n    else if ( FT_ALLOC( node, list->clazz.node_size ) )\n      goto Exit;\n\n    error = list->clazz.node_init( node, key, list->data );\n    if ( error )\n      goto Fail;\n\n    FTC_MruNode_Prepend( &list->nodes, node );\n    list->num_nodes++;\n\n  Exit:\n    *anode = node;\n    return error;\n\n  Fail:\n    if ( list->clazz.node_done )\n      list->clazz.node_done( node, list->data );\n\n    FT_FREE( node );\n    goto Exit;\n  }\n\n\n#ifndef FTC_INLINE\n  FT_LOCAL_DEF( FT_Error )\n  FTC_MruList_Lookup( FTC_MruList   list,\n                      FT_Pointer    key,\n                      FTC_MruNode  *anode )\n  {\n    FTC_MruNode  node;\n\n\n    node = FTC_MruList_Find( list, key );\n    if ( node == NULL )\n      return FTC_MruList_New( list, key, anode );\n\n    *anode = node;\n    return 0;\n  }\n#endif /* FTC_INLINE */\n\n  FT_LOCAL_DEF( void )\n  FTC_MruList_Remove( FTC_MruList  list,\n                      FTC_MruNode  node )\n  {\n    FTC_MruNode_Remove( &list->nodes, node );\n    list->num_nodes--;\n\n    {\n      FT_Memory  memory = list->memory;\n\n\n      if ( list->clazz.node_done )\n        list->clazz.node_done( node, list->data );\n\n      FT_FREE( node );\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_MruList_RemoveSelection( FTC_MruList              list,\n                               FTC_MruNode_CompareFunc  selection,\n                               FT_Pointer               key )\n  {\n    FTC_MruNode  first, node, next;\n\n\n    first = list->nodes;\n    while ( first && ( selection == NULL || selection( first, key ) ) )\n    {\n      FTC_MruList_Remove( list, first );\n      first = list->nodes;\n    }\n\n    if ( first )\n    {\n      node = first->next;\n      while ( node != first )\n      {\n        next = node->next;\n\n        if ( selection( node, key ) )\n          FTC_MruList_Remove( list, node );\n\n        node = next;\n      }\n    }\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcmru.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcmru.h                                                               */\n/*                                                                         */\n/*    Simple MRU list-cache (specification).                               */\n/*                                                                         */\n/*  Copyright 2000-2001, 2003-2006, 2010, 2013 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* An MRU is a list that cannot hold more than a certain number of       */\n  /* elements (`max_elements').  All elements in the list are sorted in    */\n  /* least-recently-used order, i.e., the `oldest' element is at the tail  */\n  /* of the list.                                                          */\n  /*                                                                       */\n  /* When doing a lookup (either through `Lookup()' or `Lookup_Node()'),   */\n  /* the list is searched for an element with the corresponding key.  If   */\n  /* it is found, the element is moved to the head of the list and is      */\n  /* returned.                                                             */\n  /*                                                                       */\n  /* If no corresponding element is found, the lookup routine will try to  */\n  /* obtain a new element with the relevant key.  If the list is already   */\n  /* full, the oldest element from the list is discarded and replaced by a */\n  /* new one; a new element is added to the list otherwise.                */\n  /*                                                                       */\n  /* Note that it is possible to pre-allocate the element list nodes.      */\n  /* This is handy if `max_elements' is sufficiently small, as it saves    */\n  /* allocations/releases during the lookup process.                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTCMRU_H__\n#define __FTCMRU_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n#define  xxFT_DEBUG_ERROR\n#define  FTC_INLINE\n\nFT_BEGIN_HEADER\n\n  typedef struct FTC_MruNodeRec_*  FTC_MruNode;\n\n  typedef struct  FTC_MruNodeRec_\n  {\n    FTC_MruNode  next;\n    FTC_MruNode  prev;\n\n  } FTC_MruNodeRec;\n\n\n  FT_LOCAL( void )\n  FTC_MruNode_Prepend( FTC_MruNode  *plist,\n                       FTC_MruNode   node );\n\n  FT_LOCAL( void )\n  FTC_MruNode_Up( FTC_MruNode  *plist,\n                  FTC_MruNode   node );\n\n  FT_LOCAL( void )\n  FTC_MruNode_Remove( FTC_MruNode  *plist,\n                      FTC_MruNode   node );\n\n\n  typedef struct FTC_MruListRec_*              FTC_MruList;\n\n  typedef struct FTC_MruListClassRec_ const *  FTC_MruListClass;\n\n\n  typedef FT_Bool\n  (*FTC_MruNode_CompareFunc)( FTC_MruNode  node,\n                              FT_Pointer   key );\n\n  typedef FT_Error\n  (*FTC_MruNode_InitFunc)( FTC_MruNode  node,\n                           FT_Pointer   key,\n                           FT_Pointer   data );\n\n  typedef FT_Error\n  (*FTC_MruNode_ResetFunc)( FTC_MruNode  node,\n                            FT_Pointer   key,\n                            FT_Pointer   data );\n\n  typedef void\n  (*FTC_MruNode_DoneFunc)( FTC_MruNode  node,\n                           FT_Pointer   data );\n\n\n  typedef struct  FTC_MruListClassRec_\n  {\n    FT_Offset                node_size;\n    FTC_MruNode_CompareFunc  node_compare;\n    FTC_MruNode_InitFunc     node_init;\n    FTC_MruNode_ResetFunc    node_reset;\n    FTC_MruNode_DoneFunc     node_done;\n\n  } FTC_MruListClassRec;\n\n  typedef struct  FTC_MruListRec_\n  {\n    FT_UInt              num_nodes;\n    FT_UInt              max_nodes;\n    FTC_MruNode          nodes;\n    FT_Pointer           data;\n    FTC_MruListClassRec  clazz;\n    FT_Memory            memory;\n\n  } FTC_MruListRec;\n\n\n  FT_LOCAL( void )\n  FTC_MruList_Init( FTC_MruList       list,\n                    FTC_MruListClass  clazz,\n                    FT_UInt           max_nodes,\n                    FT_Pointer        data,\n                    FT_Memory         memory );\n\n  FT_LOCAL( void )\n  FTC_MruList_Reset( FTC_MruList  list );\n\n\n  FT_LOCAL( void )\n  FTC_MruList_Done( FTC_MruList  list );\n\n\n  FT_LOCAL( FT_Error )\n  FTC_MruList_New( FTC_MruList   list,\n                   FT_Pointer    key,\n                   FTC_MruNode  *anode );\n\n  FT_LOCAL( void )\n  FTC_MruList_Remove( FTC_MruList  list,\n                      FTC_MruNode  node );\n\n  FT_LOCAL( void )\n  FTC_MruList_RemoveSelection( FTC_MruList              list,\n                               FTC_MruNode_CompareFunc  selection,\n                               FT_Pointer               key );\n\n\n#ifdef FTC_INLINE\n\n#define FTC_MRULIST_LOOKUP_CMP( list, key, compare, node, error )           \\\n  FT_BEGIN_STMNT                                                            \\\n    FTC_MruNode*             _pfirst  = &(list)->nodes;                     \\\n    FTC_MruNode_CompareFunc  _compare = (FTC_MruNode_CompareFunc)(compare); \\\n    FTC_MruNode              _first, _node;                                 \\\n                                                                            \\\n                                                                            \\\n    error  = FT_Err_Ok;                                                     \\\n    _first = *(_pfirst);                                                    \\\n    _node  = NULL;                                                          \\\n                                                                            \\\n    if ( _first )                                                           \\\n    {                                                                       \\\n      _node = _first;                                                       \\\n      do                                                                    \\\n      {                                                                     \\\n        if ( _compare( _node, (key) ) )                                     \\\n        {                                                                   \\\n          if ( _node != _first )                                            \\\n            FTC_MruNode_Up( _pfirst, _node );                               \\\n                                                                            \\\n          node = _node;                                                     \\\n          goto _MruOk;                                                      \\\n        }                                                                   \\\n        _node = _node->next;                                                \\\n                                                                            \\\n      } while ( _node != _first) ;                                          \\\n    }                                                                       \\\n                                                                            \\\n    error = FTC_MruList_New( (list), (key), (FTC_MruNode*)(void*)&(node) ); \\\n  _MruOk:                                                                   \\\n    ;                                                                       \\\n  FT_END_STMNT\n\n#define FTC_MRULIST_LOOKUP( list, key, node, error ) \\\n  FTC_MRULIST_LOOKUP_CMP( list, key, (list)->clazz.node_compare, node, error )\n\n#else  /* !FTC_INLINE */\n\n  FT_LOCAL( FTC_MruNode )\n  FTC_MruList_Find( FTC_MruList  list,\n                    FT_Pointer   key );\n\n  FT_LOCAL( FT_Error )\n  FTC_MruList_Lookup( FTC_MruList   list,\n                      FT_Pointer    key,\n                      FTC_MruNode  *pnode );\n\n#define FTC_MRULIST_LOOKUP( list, key, node, error ) \\\n  error = FTC_MruList_Lookup( (list), (key), (FTC_MruNode*)&(node) )\n\n#endif /* !FTC_INLINE */\n\n\n#define FTC_MRULIST_LOOP( list, node )        \\\n  FT_BEGIN_STMNT                              \\\n    FTC_MruNode  _first = (list)->nodes;      \\\n                                              \\\n                                              \\\n    if ( _first )                             \\\n    {                                         \\\n      FTC_MruNode  _node = _first;            \\\n                                              \\\n                                              \\\n      do                                      \\\n      {                                       \\\n        *(FTC_MruNode*)&(node) = _node;\n\n\n#define FTC_MRULIST_LOOP_END()               \\\n        _node = _node->next;                 \\\n                                             \\\n      } while ( _node != _first );           \\\n    }                                        \\\n  FT_END_STMNT\n\n /* */\n\nFT_END_HEADER\n\n\n#endif /* __FTCMRU_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcsbits.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcsbits.c                                                             */\n/*                                                                         */\n/*    FreeType sbits manager (body).                                       */\n/*                                                                         */\n/*  Copyright 2000-2006, 2009-2011, 2013, 2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_CACHE_H\n#include \"ftcsbits.h\"\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_ERRORS_H\n\n#include \"ftccback.h\"\n#include \"ftcerror.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cache\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     SBIT CACHE NODES                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  static FT_Error\n  ftc_sbit_copy_bitmap( FTC_SBit    sbit,\n                        FT_Bitmap*  bitmap,\n                        FT_Memory   memory )\n  {\n    FT_Error  error;\n    FT_Int    pitch = bitmap->pitch;\n    FT_ULong  size;\n\n\n    if ( pitch < 0 )\n      pitch = -pitch;\n\n    size = (FT_ULong)( pitch * bitmap->rows );\n\n    if ( !FT_ALLOC( sbit->buffer, size ) )\n      FT_MEM_COPY( sbit->buffer, bitmap->buffer, size );\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  ftc_snode_free( FTC_Node   ftcsnode,\n                  FTC_Cache  cache )\n  {\n    FTC_SNode  snode  = (FTC_SNode)ftcsnode;\n    FTC_SBit   sbit   = snode->sbits;\n    FT_UInt    count  = snode->count;\n    FT_Memory  memory = cache->memory;\n\n\n    for ( ; count > 0; sbit++, count-- )\n      FT_FREE( sbit->buffer );\n\n    FTC_GNode_Done( FTC_GNODE( snode ), cache );\n\n    FT_FREE( snode );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  FTC_SNode_Free( FTC_SNode  snode,\n                  FTC_Cache  cache )\n  {\n    ftc_snode_free( FTC_NODE( snode ), cache );\n  }\n\n\n  /*\n   *  This function tries to load a small bitmap within a given FTC_SNode.\n   *  Note that it returns a non-zero error code _only_ in the case of\n   *  out-of-memory condition.  For all other errors (e.g., corresponding\n   *  to a bad font file), this function will mark the sbit as `unavailable'\n   *  and return a value of 0.\n   *\n   *  You should also read the comment within the @ftc_snode_compare\n   *  function below to see how out-of-memory is handled during a lookup.\n   */\n  static FT_Error\n  ftc_snode_load( FTC_SNode    snode,\n                  FTC_Manager  manager,\n                  FT_UInt      gindex,\n                  FT_ULong    *asize )\n  {\n    FT_Error          error;\n    FTC_GNode         gnode  = FTC_GNODE( snode );\n    FTC_Family        family = gnode->family;\n    FT_Memory         memory = manager->memory;\n    FT_Face           face;\n    FTC_SBit          sbit;\n    FTC_SFamilyClass  clazz;\n\n\n    if ( (FT_UInt)(gindex - gnode->gindex) >= snode->count )\n    {\n      FT_ERROR(( \"ftc_snode_load: invalid glyph index\" ));\n      return FT_THROW( Invalid_Argument );\n    }\n\n    sbit  = snode->sbits + ( gindex - gnode->gindex );\n    clazz = (FTC_SFamilyClass)family->clazz;\n\n    sbit->buffer = 0;\n\n    error = clazz->family_load_glyph( family, gindex, manager, &face );\n    if ( error )\n      goto BadGlyph;\n\n    {\n      FT_Int        temp;\n      FT_GlyphSlot  slot   = face->glyph;\n      FT_Bitmap*    bitmap = &slot->bitmap;\n      FT_Pos        xadvance, yadvance; /* FT_GlyphSlot->advance.{x|y} */\n\n\n      if ( slot->format != FT_GLYPH_FORMAT_BITMAP )\n      {\n        FT_TRACE0(( \"ftc_snode_load:\"\n                    \" glyph loaded didn't return a bitmap\\n\" ));\n        goto BadGlyph;\n      }\n\n      /* Check whether our values fit into 8-bit containers!    */\n      /* If this is not the case, our bitmap is too large       */\n      /* and we will leave it as `missing' with sbit.buffer = 0 */\n\n#define CHECK_CHAR( d )  ( temp = (FT_Char)d, (FT_Int) temp == (FT_Int) d )\n#define CHECK_BYTE( d )  ( temp = (FT_Byte)d, (FT_UInt)temp == (FT_UInt)d )\n\n      /* horizontal advance in pixels */\n      xadvance = ( slot->advance.x + 32 ) >> 6;\n      yadvance = ( slot->advance.y + 32 ) >> 6;\n\n      if ( !CHECK_BYTE( bitmap->rows  )     ||\n           !CHECK_BYTE( bitmap->width )     ||\n           !CHECK_CHAR( bitmap->pitch )     ||\n           !CHECK_CHAR( slot->bitmap_left ) ||\n           !CHECK_CHAR( slot->bitmap_top  ) ||\n           !CHECK_CHAR( xadvance )          ||\n           !CHECK_CHAR( yadvance )          )\n      {\n        FT_TRACE2(( \"ftc_snode_load:\"\n                    \" glyph too large for small bitmap cache\\n\"));\n        goto BadGlyph;\n      }\n\n      sbit->width     = (FT_Byte)bitmap->width;\n      sbit->height    = (FT_Byte)bitmap->rows;\n      sbit->pitch     = (FT_Char)bitmap->pitch;\n      sbit->left      = (FT_Char)slot->bitmap_left;\n      sbit->top       = (FT_Char)slot->bitmap_top;\n      sbit->xadvance  = (FT_Char)xadvance;\n      sbit->yadvance  = (FT_Char)yadvance;\n      sbit->format    = (FT_Byte)bitmap->pixel_mode;\n      sbit->max_grays = (FT_Byte)(bitmap->num_grays - 1);\n\n      /* copy the bitmap into a new buffer -- ignore error */\n      error = ftc_sbit_copy_bitmap( sbit, bitmap, memory );\n\n      /* now, compute size */\n      if ( asize )\n        *asize = FT_ABS( sbit->pitch ) * sbit->height;\n\n    } /* glyph loading successful */\n\n    /* ignore the errors that might have occurred --   */\n    /* we mark unloaded glyphs with `sbit.buffer == 0' */\n    /* and `width == 255', `height == 0'               */\n    /*                                                 */\n    if ( error && FT_ERR_NEQ( error, Out_Of_Memory ) )\n    {\n    BadGlyph:\n      sbit->width  = 255;\n      sbit->height = 0;\n      sbit->buffer = NULL;\n      error        = FT_Err_Ok;\n      if ( asize )\n        *asize = 0;\n    }\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  FTC_SNode_New( FTC_SNode  *psnode,\n                 FTC_GQuery  gquery,\n                 FTC_Cache   cache )\n  {\n    FT_Memory   memory = cache->memory;\n    FT_Error    error;\n    FTC_SNode   snode  = NULL;\n    FT_UInt     gindex = gquery->gindex;\n    FTC_Family  family = gquery->family;\n\n    FTC_SFamilyClass  clazz = FTC_CACHE__SFAMILY_CLASS( cache );\n    FT_UInt           total;\n    FT_UInt           node_count;\n\n\n    total = clazz->family_get_count( family, cache->manager );\n    if ( total == 0 || gindex >= total )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    if ( !FT_NEW( snode ) )\n    {\n      FT_UInt  count, start;\n\n\n      start = gindex - ( gindex % FTC_SBIT_ITEMS_PER_NODE );\n      count = total - start;\n      if ( count > FTC_SBIT_ITEMS_PER_NODE )\n        count = FTC_SBIT_ITEMS_PER_NODE;\n\n      FTC_GNode_Init( FTC_GNODE( snode ), start, family );\n\n      snode->count = count;\n      for ( node_count = 0; node_count < count; node_count++ )\n      {\n        snode->sbits[node_count].width = 255;\n      }\n\n      error = ftc_snode_load( snode,\n                              cache->manager,\n                              gindex,\n                              NULL );\n      if ( error )\n      {\n        FTC_SNode_Free( snode, cache );\n        snode = NULL;\n      }\n    }\n\n  Exit:\n    *psnode = snode;\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  ftc_snode_new( FTC_Node   *ftcpsnode,\n                 FT_Pointer  ftcgquery,\n                 FTC_Cache   cache )\n  {\n    FTC_SNode  *psnode = (FTC_SNode*)ftcpsnode;\n    FTC_GQuery  gquery = (FTC_GQuery)ftcgquery;\n\n\n    return FTC_SNode_New( psnode, gquery, cache );\n  }\n\n\n  FT_LOCAL_DEF( FT_Offset )\n  ftc_snode_weight( FTC_Node   ftcsnode,\n                    FTC_Cache  cache )\n  {\n    FTC_SNode  snode = (FTC_SNode)ftcsnode;\n    FT_UInt    count = snode->count;\n    FTC_SBit   sbit  = snode->sbits;\n    FT_Int     pitch;\n    FT_Offset  size;\n\n    FT_UNUSED( cache );\n\n\n    FT_ASSERT( snode->count <= FTC_SBIT_ITEMS_PER_NODE );\n\n    /* the node itself */\n    size = sizeof ( *snode );\n\n    for ( ; count > 0; count--, sbit++ )\n    {\n      if ( sbit->buffer )\n      {\n        pitch = sbit->pitch;\n        if ( pitch < 0 )\n          pitch = -pitch;\n\n        /* add the size of a given glyph image */\n        size += pitch * sbit->height;\n      }\n    }\n\n    return size;\n  }\n\n\n#if 0\n\n  FT_LOCAL_DEF( FT_Offset )\n  FTC_SNode_Weight( FTC_SNode  snode )\n  {\n    return ftc_snode_weight( FTC_NODE( snode ), NULL );\n  }\n\n#endif /* 0 */\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  ftc_snode_compare( FTC_Node    ftcsnode,\n                     FT_Pointer  ftcgquery,\n                     FTC_Cache   cache,\n                     FT_Bool*    list_changed )\n  {\n    FTC_SNode   snode  = (FTC_SNode)ftcsnode;\n    FTC_GQuery  gquery = (FTC_GQuery)ftcgquery;\n    FTC_GNode   gnode  = FTC_GNODE( snode );\n    FT_UInt     gindex = gquery->gindex;\n    FT_Bool     result;\n\n\n    if (list_changed)\n      *list_changed = FALSE;\n    result = FT_BOOL( gnode->family == gquery->family                    &&\n                      (FT_UInt)( gindex - gnode->gindex ) < snode->count );\n    if ( result )\n    {\n      /* check if we need to load the glyph bitmap now */\n      FTC_SBit  sbit = snode->sbits + ( gindex - gnode->gindex );\n\n\n      /*\n       *  The following code illustrates what to do when you want to\n       *  perform operations that may fail within a lookup function.\n       *\n       *  Here, we want to load a small bitmap on-demand; we thus\n       *  need to call the `ftc_snode_load' function which may return\n       *  a non-zero error code only when we are out of memory (OOM).\n       *\n       *  The correct thing to do is to use @FTC_CACHE_TRYLOOP and\n       *  @FTC_CACHE_TRYLOOP_END in order to implement a retry loop\n       *  that is capable of flushing the cache incrementally when\n       *  an OOM errors occur.\n       *\n       *  However, we need to `lock' the node before this operation to\n       *  prevent it from being flushed within the loop.\n       *\n       *  When we exit the loop, we unlock the node, then check the `error'\n       *  variable.  If it is non-zero, this means that the cache was\n       *  completely flushed and that no usable memory was found to load\n       *  the bitmap.\n       *\n       *  We then prefer to return a value of 0 (i.e., NO MATCH).  This\n       *  ensures that the caller will try to allocate a new node.\n       *  This operation consequently _fail_ and the lookup function\n       *  returns the appropriate OOM error code.\n       *\n       *  Note that `buffer == NULL && width == 255' is a hack used to\n       *  tag `unavailable' bitmaps in the array.  We should never try\n       *  to load these.\n       *\n       */\n\n      if ( sbit->buffer == NULL && sbit->width == 255 )\n      {\n        FT_ULong  size;\n        FT_Error  error;\n\n\n        ftcsnode->ref_count++;  /* lock node to prevent flushing */\n                                /* in retry loop                 */\n\n        FTC_CACHE_TRYLOOP( cache )\n        {\n          error = ftc_snode_load( snode, cache->manager, gindex, &size );\n        }\n        FTC_CACHE_TRYLOOP_END( list_changed );\n\n        ftcsnode->ref_count--;  /* unlock the node */\n\n        if ( error )\n          result = 0;\n        else\n          cache->manager->cur_weight += size;\n      }\n    }\n\n    return result;\n  }\n\n\n#ifdef FTC_INLINE\n\n  FT_LOCAL_DEF( FT_Bool )\n  FTC_SNode_Compare( FTC_SNode   snode,\n                     FTC_GQuery  gquery,\n                     FTC_Cache   cache,\n                     FT_Bool*    list_changed )\n  {\n    return ftc_snode_compare( FTC_NODE( snode ), gquery,\n                              cache, list_changed );\n  }\n\n#endif\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cache/ftcsbits.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcsbits.h                                                             */\n/*                                                                         */\n/*    A small-bitmap cache (specification).                                */\n/*                                                                         */\n/*  Copyright 2000-2001, 2002, 2003, 2006, 2011 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTCSBITS_H__\n#define __FTCSBITS_H__\n\n\n#include <ft2build.h>\n#include FT_CACHE_H\n#include \"ftcglyph.h\"\n\n\nFT_BEGIN_HEADER\n\n#define FTC_SBIT_ITEMS_PER_NODE  16\n\n  typedef struct  FTC_SNodeRec_\n  {\n    FTC_GNodeRec  gnode;\n    FT_UInt       count;\n    FTC_SBitRec   sbits[FTC_SBIT_ITEMS_PER_NODE];\n\n  } FTC_SNodeRec, *FTC_SNode;\n\n\n#define FTC_SNODE( x )         ( (FTC_SNode)( x ) )\n#define FTC_SNODE_GINDEX( x )  FTC_GNODE( x )->gindex\n#define FTC_SNODE_FAMILY( x )  FTC_GNODE( x )->family\n\n  typedef FT_UInt\n  (*FTC_SFamily_GetCountFunc)( FTC_Family   family,\n                               FTC_Manager  manager );\n\n  typedef FT_Error\n  (*FTC_SFamily_LoadGlyphFunc)( FTC_Family   family,\n                                FT_UInt      gindex,\n                                FTC_Manager  manager,\n                                FT_Face     *aface );\n\n  typedef struct  FTC_SFamilyClassRec_\n  {\n    FTC_MruListClassRec        clazz;\n    FTC_SFamily_GetCountFunc   family_get_count;\n    FTC_SFamily_LoadGlyphFunc  family_load_glyph;\n\n  } FTC_SFamilyClassRec;\n\n  typedef const FTC_SFamilyClassRec*  FTC_SFamilyClass;\n\n#define FTC_SFAMILY_CLASS( x )  ((FTC_SFamilyClass)(x))\n\n#define FTC_CACHE__SFAMILY_CLASS( x )  \\\n          FTC_SFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS( x )->family_class )\n\n\n  FT_LOCAL( void )\n  FTC_SNode_Free( FTC_SNode  snode,\n                  FTC_Cache  cache );\n\n  FT_LOCAL( FT_Error )\n  FTC_SNode_New( FTC_SNode   *psnode,\n                 FTC_GQuery   gquery,\n                 FTC_Cache    cache );\n\n#if 0\n  FT_LOCAL( FT_ULong )\n  FTC_SNode_Weight( FTC_SNode  inode );\n#endif\n\n\n#ifdef FTC_INLINE\n\n  FT_LOCAL( FT_Bool )\n  FTC_SNode_Compare( FTC_SNode   snode,\n                     FTC_GQuery  gquery,\n                     FTC_Cache   cache,\n                     FT_Bool*    list_changed);\n\n#endif\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __FTCSBITS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2arrst.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2arrst.c                                                             */\n/*                                                                         */\n/*    Adobe's code for Array Stacks (body).                                */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"cf2ft.h\"\n#include FT_INTERNAL_DEBUG_H\n\n#include \"cf2glue.h\"\n#include \"cf2arrst.h\"\n\n#include \"cf2error.h\"\n\n\n  /*\n   * CF2_ArrStack uses an error pointer, to enable shared errors.\n   * Shared errors are necessary when multiple objects allow the program\n   * to continue after detecting errors.  Only the first error should be\n   * recorded.\n   */\n\n  FT_LOCAL_DEF( void )\n  cf2_arrstack_init( CF2_ArrStack  arrstack,\n                     FT_Memory     memory,\n                     FT_Error*     error,\n                     size_t        sizeItem )\n  {\n    FT_ASSERT( arrstack != NULL );\n\n    /* initialize the structure */\n    arrstack->memory    = memory;\n    arrstack->error     = error;\n    arrstack->sizeItem  = sizeItem;\n    arrstack->allocated = 0;\n    arrstack->chunk     = 10;    /* chunks of 10 items */\n    arrstack->count     = 0;\n    arrstack->totalSize = 0;\n    arrstack->ptr       = NULL;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_arrstack_finalize( CF2_ArrStack  arrstack )\n  {\n    FT_Memory  memory = arrstack->memory;     /* for FT_FREE */\n\n\n    FT_ASSERT( arrstack != NULL );\n\n    arrstack->allocated = 0;\n    arrstack->count     = 0;\n    arrstack->totalSize = 0;\n\n    /* free the data buffer */\n    FT_FREE( arrstack->ptr );\n  }\n\n\n  /* allocate or reallocate the buffer size; */\n  /* return false on memory error */\n  static FT_Bool\n  cf2_arrstack_setNumElements( CF2_ArrStack  arrstack,\n                               size_t        numElements )\n  {\n    FT_ASSERT( arrstack != NULL );\n\n    {\n      FT_Error   error  = FT_Err_Ok;        /* for FT_REALLOC */\n      FT_Memory  memory = arrstack->memory; /* for FT_REALLOC */\n\n      FT_Long  newSize = (FT_Long)( numElements * arrstack->sizeItem );\n\n\n      if ( numElements > LONG_MAX / arrstack->sizeItem )\n        goto exit;\n\n\n      FT_ASSERT( newSize > 0 );   /* avoid realloc with zero size */\n\n      if ( !FT_REALLOC( arrstack->ptr, arrstack->totalSize, newSize ) )\n      {\n        arrstack->allocated = numElements;\n        arrstack->totalSize = newSize;\n\n        if ( arrstack->count > numElements )\n        {\n          /* we truncated the list! */\n          CF2_SET_ERROR( arrstack->error, Stack_Overflow );\n          arrstack->count = numElements;\n          return FALSE;\n        }\n\n        return TRUE;     /* success */\n      }\n    }\n\n  exit:\n    /* if there's not already an error, store this one */\n    CF2_SET_ERROR( arrstack->error, Out_Of_Memory );\n\n    return FALSE;\n  }\n\n\n  /* set the count, ensuring allocation is sufficient */\n  FT_LOCAL_DEF( void )\n  cf2_arrstack_setCount( CF2_ArrStack  arrstack,\n                         size_t        numElements )\n  {\n    FT_ASSERT( arrstack != NULL );\n\n    if ( numElements > arrstack->allocated )\n    {\n      /* expand the allocation first */\n      if ( !cf2_arrstack_setNumElements( arrstack, numElements ) )\n        return;\n    }\n\n    arrstack->count = numElements;\n  }\n\n\n  /* clear the count */\n  FT_LOCAL_DEF( void )\n  cf2_arrstack_clear( CF2_ArrStack  arrstack )\n  {\n    FT_ASSERT( arrstack != NULL );\n\n    arrstack->count = 0;\n  }\n\n\n  /* current number of items */\n  FT_LOCAL_DEF( size_t )\n  cf2_arrstack_size( const CF2_ArrStack  arrstack )\n  {\n    FT_ASSERT( arrstack != NULL );\n\n    return arrstack->count;\n  }\n\n\n  FT_LOCAL_DEF( void* )\n  cf2_arrstack_getBuffer( const CF2_ArrStack  arrstack )\n  {\n    FT_ASSERT( arrstack != NULL );\n\n    return arrstack->ptr;\n  }\n\n\n  /* return pointer to the given element */\n  FT_LOCAL_DEF( void* )\n  cf2_arrstack_getPointer( const CF2_ArrStack  arrstack,\n                           size_t              idx )\n  {\n    void*  newPtr;\n\n\n    FT_ASSERT( arrstack != NULL );\n\n    if ( idx >= arrstack->count )\n    {\n      /* overflow */\n      CF2_SET_ERROR( arrstack->error, Stack_Overflow );\n      idx = 0;    /* choose safe default */\n    }\n\n    newPtr = (FT_Byte*)arrstack->ptr + idx * arrstack->sizeItem;\n\n    return newPtr;\n  }\n\n\n  /* push (append) an element at the end of the list;         */\n  /* return false on memory error                             */\n  /* TODO: should there be a length param for extra checking? */\n  FT_LOCAL_DEF( void )\n  cf2_arrstack_push( CF2_ArrStack  arrstack,\n                     const void*   ptr )\n  {\n    FT_ASSERT( arrstack != NULL );\n\n    if ( arrstack->count == arrstack->allocated )\n    {\n      /* grow the buffer by one chunk */\n      if ( !cf2_arrstack_setNumElements(\n             arrstack, arrstack->allocated + arrstack->chunk ) )\n      {\n        /* on error, ignore the push */\n        return;\n      }\n    }\n\n    FT_ASSERT( ptr != NULL );\n\n    {\n      size_t  offset = arrstack->count * arrstack->sizeItem;\n      void*   newPtr = (FT_Byte*)arrstack->ptr + offset;\n\n\n      FT_MEM_COPY( newPtr, ptr, arrstack->sizeItem );\n      arrstack->count += 1;\n    }\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2arrst.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2arrst.h                                                             */\n/*                                                                         */\n/*    Adobe's code for Array Stacks (specification).                       */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2ARRST_H__\n#define __CF2ARRST_H__\n\n\n#include \"cf2error.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /* need to define the struct here (not opaque) so it can be allocated by */\n  /* clients                                                               */\n  typedef struct  CF2_ArrStackRec_\n  {\n    FT_Memory  memory;\n    FT_Error*  error;\n\n    size_t  sizeItem;       /* bytes per element             */\n    size_t  allocated;      /* items allocated               */\n    size_t  chunk;          /* allocation increment in items */\n    size_t  count;          /* number of elements allocated  */\n    size_t  totalSize;      /* total bytes allocated         */\n\n    void*  ptr;             /* ptr to data                   */\n\n  } CF2_ArrStackRec, *CF2_ArrStack;\n\n\n  FT_LOCAL( void )\n  cf2_arrstack_init( CF2_ArrStack  arrstack,\n                     FT_Memory     memory,\n                     FT_Error*     error,\n                     size_t        sizeItem );\n  FT_LOCAL( void )\n  cf2_arrstack_finalize( CF2_ArrStack  arrstack );\n\n  FT_LOCAL( void )\n  cf2_arrstack_setCount( CF2_ArrStack  arrstack,\n                         size_t        numElements );\n  FT_LOCAL( void )\n  cf2_arrstack_clear( CF2_ArrStack  arrstack );\n  FT_LOCAL( size_t )\n  cf2_arrstack_size( const CF2_ArrStack  arrstack );\n\n  FT_LOCAL( void* )\n  cf2_arrstack_getBuffer( const CF2_ArrStack  arrstack );\n  FT_LOCAL( void* )\n  cf2_arrstack_getPointer( const CF2_ArrStack  arrstack,\n                           size_t              idx );\n\n  FT_LOCAL( void )\n  cf2_arrstack_push( CF2_ArrStack  arrstack,\n                     const void*   ptr );\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2ARRST_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2blues.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2blues.c                                                             */\n/*                                                                         */\n/*    Adobe's code for handling Blue Zones (body).                         */\n/*                                                                         */\n/*  Copyright 2009-2014 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"cf2ft.h\"\n#include FT_INTERNAL_DEBUG_H\n\n#include \"cf2blues.h\"\n#include \"cf2hints.h\"\n#include \"cf2font.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cf2blues\n\n\n  /*\n   * For blue values, the FreeType parser produces an array of integers,\n   * while the Adobe CFF engine produces an array of fixed.\n   * Define a macro to convert FreeType to fixed.\n   */\n#define cf2_blueToFixed( x )  cf2_intToFixed( x )\n\n\n  FT_LOCAL_DEF( void )\n  cf2_blues_init( CF2_Blues  blues,\n                  CF2_Font   font )\n  {\n    /* pointer to parsed font object */\n    CFF_Decoder*  decoder = font->decoder;\n\n    CF2_Fixed  zoneHeight;\n    CF2_Fixed  maxZoneHeight = 0;\n    CF2_Fixed  csUnitsPerPixel;\n\n    size_t  numBlueValues;\n    size_t  numOtherBlues;\n    size_t  numFamilyBlues;\n    size_t  numFamilyOtherBlues;\n\n    FT_Pos*  blueValues;\n    FT_Pos*  otherBlues;\n    FT_Pos*  familyBlues;\n    FT_Pos*  familyOtherBlues;\n\n    size_t     i;\n    CF2_Fixed  emBoxBottom, emBoxTop;\n\n#if 0\n    CF2_Int  unitsPerEm = font->unitsPerEm;\n\n\n    if ( unitsPerEm == 0 )\n      unitsPerEm = 1000;\n#endif\n\n    FT_ZERO( blues );\n    blues->scale = font->innerTransform.d;\n\n    cf2_getBlueMetrics( decoder,\n                        &blues->blueScale,\n                        &blues->blueShift,\n                        &blues->blueFuzz );\n\n    cf2_getBlueValues( decoder, &numBlueValues, &blueValues );\n    cf2_getOtherBlues( decoder, &numOtherBlues, &otherBlues );\n    cf2_getFamilyBlues( decoder, &numFamilyBlues, &familyBlues );\n    cf2_getFamilyOtherBlues( decoder, &numFamilyOtherBlues, &familyOtherBlues );\n\n    /*\n     * synthetic em box hint heuristic\n     *\n     * Apply this when ideographic dictionary (LanguageGroup 1) has no\n     * real alignment zones.  Adobe tools generate dummy zones at -250 and\n     * 1100 for a 1000 unit em.  Fonts with ICF-based alignment zones\n     * should not enable the heuristic.  When the heuristic is enabled,\n     * the font's blue zones are ignored.\n     *\n     */\n\n    /* get em box from OS/2 typoAscender/Descender                      */\n    /* TODO: FreeType does not parse these metrics.  Skip them for now. */\n#if 0\n    FCM_getHorizontalLineMetrics( &e,\n                                  font->font,\n                                  &ascender,\n                                  &descender,\n                                  &linegap );\n    if ( ascender - descender == unitsPerEm )\n    {\n      emBoxBottom = cf2_intToFixed( descender );\n      emBoxTop    = cf2_intToFixed( ascender );\n    }\n    else\n#endif\n    {\n      emBoxBottom = CF2_ICF_Bottom;\n      emBoxTop    = CF2_ICF_Top;\n    }\n\n    if ( cf2_getLanguageGroup( decoder ) == 1                   &&\n         ( numBlueValues == 0                                 ||\n           ( numBlueValues == 4                             &&\n             cf2_blueToFixed( blueValues[0] ) < emBoxBottom &&\n             cf2_blueToFixed( blueValues[1] ) < emBoxBottom &&\n             cf2_blueToFixed( blueValues[2] ) > emBoxTop    &&\n             cf2_blueToFixed( blueValues[3] ) > emBoxTop    ) ) )\n    {\n      /*\n       * Construct hint edges suitable for synthetic ghost hints at top\n       * and bottom of em box.  +-CF2_MIN_COUNTER allows for unhinted\n       * features above or below the last hinted edge.  This also gives a\n       * net 1 pixel boost to the height of ideographic glyphs.\n       *\n       * Note: Adjust synthetic hints outward by epsilon (0x.0001) to\n       *       avoid interference.  E.g., some fonts have real hints at\n       *       880 and -120.\n       */\n\n      blues->emBoxBottomEdge.csCoord = emBoxBottom - CF2_FIXED_EPSILON;\n      blues->emBoxBottomEdge.dsCoord = cf2_fixedRound(\n                                         FT_MulFix(\n                                           blues->emBoxBottomEdge.csCoord,\n                                           blues->scale ) ) -\n                                       CF2_MIN_COUNTER;\n      blues->emBoxBottomEdge.scale   = blues->scale;\n      blues->emBoxBottomEdge.flags   = CF2_GhostBottom |\n                                       CF2_Locked |\n                                       CF2_Synthetic;\n\n      blues->emBoxTopEdge.csCoord = emBoxTop + CF2_FIXED_EPSILON +\n                                    2 * font->darkenY;\n      blues->emBoxTopEdge.dsCoord = cf2_fixedRound(\n                                      FT_MulFix(\n                                        blues->emBoxTopEdge.csCoord,\n                                        blues->scale ) ) +\n                                    CF2_MIN_COUNTER;\n      blues->emBoxTopEdge.scale   = blues->scale;\n      blues->emBoxTopEdge.flags   = CF2_GhostTop |\n                                    CF2_Locked |\n                                    CF2_Synthetic;\n\n      blues->doEmBoxHints = TRUE;    /* enable the heuristic */\n\n      return;\n    }\n\n    /* copy `BlueValues' and `OtherBlues' to a combined array of top and */\n    /* bottom zones                                                      */\n    for ( i = 0; i < numBlueValues; i += 2 )\n    {\n      blues->zone[blues->count].csBottomEdge =\n        cf2_blueToFixed( blueValues[i] );\n      blues->zone[blues->count].csTopEdge =\n        cf2_blueToFixed( blueValues[i + 1] );\n\n      zoneHeight = blues->zone[blues->count].csTopEdge -\n                   blues->zone[blues->count].csBottomEdge;\n\n      if ( zoneHeight < 0 )\n      {\n        FT_TRACE4(( \"cf2_blues_init: ignoring negative zone height\\n\" ));\n        continue;   /* reject this zone */\n      }\n\n      if ( zoneHeight > maxZoneHeight )\n      {\n        /* take maximum before darkening adjustment      */\n        /* so overshoot suppression point doesn't change */\n        maxZoneHeight = zoneHeight;\n      }\n\n      /* adjust both edges of top zone upward by twice darkening amount */\n      if ( i != 0 )\n      {\n        blues->zone[blues->count].csTopEdge    += 2 * font->darkenY;\n        blues->zone[blues->count].csBottomEdge += 2 * font->darkenY;\n      }\n\n      /* first `BlueValue' is bottom zone; others are top */\n      if ( i == 0 )\n      {\n        blues->zone[blues->count].bottomZone =\n          TRUE;\n        blues->zone[blues->count].csFlatEdge =\n          blues->zone[blues->count].csTopEdge;\n      }\n      else\n      {\n        blues->zone[blues->count].bottomZone =\n          FALSE;\n        blues->zone[blues->count].csFlatEdge =\n          blues->zone[blues->count].csBottomEdge;\n      }\n\n      blues->count += 1;\n    }\n\n    for ( i = 0; i < numOtherBlues; i += 2 )\n    {\n      blues->zone[blues->count].csBottomEdge =\n        cf2_blueToFixed( otherBlues[i] );\n      blues->zone[blues->count].csTopEdge =\n        cf2_blueToFixed( otherBlues[i + 1] );\n\n      zoneHeight = blues->zone[blues->count].csTopEdge -\n                   blues->zone[blues->count].csBottomEdge;\n\n      if ( zoneHeight < 0 )\n      {\n        FT_TRACE4(( \"cf2_blues_init: ignoring negative zone height\\n\" ));\n        continue;   /* reject this zone */\n      }\n\n      if ( zoneHeight > maxZoneHeight )\n      {\n        /* take maximum before darkening adjustment      */\n        /* so overshoot suppression point doesn't change */\n        maxZoneHeight = zoneHeight;\n      }\n\n      /* Note: bottom zones are not adjusted for darkening amount */\n\n      /* all OtherBlues are bottom zone */\n      blues->zone[blues->count].bottomZone =\n        TRUE;\n      blues->zone[blues->count].csFlatEdge =\n        blues->zone[blues->count].csTopEdge;\n\n      blues->count += 1;\n    }\n\n    /* Adjust for FamilyBlues */\n\n    /* Search for the nearest flat edge in `FamilyBlues' or                */\n    /* `FamilyOtherBlues'.  According to the Black Book, any matching edge */\n    /* must be within one device pixel                                     */\n\n    csUnitsPerPixel = FT_DivFix( cf2_intToFixed( 1 ), blues->scale );\n\n    /* loop on all zones in this font */\n    for ( i = 0; i < blues->count; i++ )\n    {\n      size_t     j;\n      CF2_Fixed  minDiff;\n      CF2_Fixed  flatFamilyEdge, diff;\n      /* value for this font */\n      CF2_Fixed  flatEdge = blues->zone[i].csFlatEdge;\n\n\n      if ( blues->zone[i].bottomZone )\n      {\n        /* In a bottom zone, the top edge is the flat edge.             */\n        /* Search `FamilyOtherBlues' for bottom zones; look for closest */\n        /* Family edge that is within the one pixel threshold.          */\n\n        minDiff = CF2_FIXED_MAX;\n\n        for ( j = 0; j < numFamilyOtherBlues; j += 2 )\n        {\n          /* top edge */\n          flatFamilyEdge = cf2_blueToFixed( familyOtherBlues[j + 1] );\n\n          diff = cf2_fixedAbs( flatEdge - flatFamilyEdge );\n\n          if ( diff < minDiff && diff < csUnitsPerPixel )\n          {\n            blues->zone[i].csFlatEdge = flatFamilyEdge;\n            minDiff                   = diff;\n\n            if ( diff == 0 )\n              break;\n          }\n        }\n\n        /* check the first member of FamilyBlues, which is a bottom zone */\n        if ( numFamilyBlues >= 2 )\n        {\n          /* top edge */\n          flatFamilyEdge = cf2_blueToFixed( familyBlues[1] );\n\n          diff = cf2_fixedAbs( flatEdge - flatFamilyEdge );\n\n          if ( diff < minDiff && diff < csUnitsPerPixel )\n            blues->zone[i].csFlatEdge = flatFamilyEdge;\n        }\n      }\n      else\n      {\n        /* In a top zone, the bottom edge is the flat edge.                */\n        /* Search `FamilyBlues' for top zones; skip first zone, which is a */\n        /* bottom zone; look for closest Family edge that is within the    */\n        /* one pixel threshold                                             */\n\n        minDiff = CF2_FIXED_MAX;\n\n        for ( j = 2; j < numFamilyBlues; j += 2 )\n        {\n          /* bottom edge */\n          flatFamilyEdge = cf2_blueToFixed( familyBlues[j] );\n\n          /* adjust edges of top zone upward by twice darkening amount */\n          flatFamilyEdge += 2 * font->darkenY;      /* bottom edge */\n\n          diff = cf2_fixedAbs( flatEdge - flatFamilyEdge );\n\n          if ( diff < minDiff && diff < csUnitsPerPixel )\n          {\n            blues->zone[i].csFlatEdge = flatFamilyEdge;\n            minDiff                   = diff;\n\n            if ( diff == 0 )\n              break;\n          }\n        }\n      }\n    }\n\n    /* TODO: enforce separation of zones, including BlueFuzz */\n\n    /* Adjust BlueScale; similar to AdjustBlueScale() in coretype */\n    /* `bcsetup.c'.                                               */\n\n    if ( maxZoneHeight > 0 )\n    {\n      if ( blues->blueScale > FT_DivFix( cf2_intToFixed( 1 ),\n                                         maxZoneHeight ) )\n      {\n        /* clamp at maximum scale */\n        blues->blueScale = FT_DivFix( cf2_intToFixed( 1 ),\n                                      maxZoneHeight );\n      }\n\n      /*\n       * TODO: Revisit the bug fix for 613448.  The minimum scale\n       *       requirement catches a number of library fonts.  For\n       *       example, with default BlueScale (.039625) and 0.4 minimum,\n       *       the test below catches any font with maxZoneHeight < 10.1.\n       *       There are library fonts ranging from 2 to 10 that get\n       *       caught, including e.g., Eurostile LT Std Medium with\n       *       maxZoneHeight of 6.\n       *\n       */\n#if 0\n      if ( blueScale < .4 / maxZoneHeight )\n      {\n        tetraphilia_assert( 0 );\n        /* clamp at minimum scale, per bug 0613448 fix */\n        blueScale = .4 / maxZoneHeight;\n      }\n#endif\n\n    }\n\n    /*\n     * Suppress overshoot and boost blue zones at small sizes.  Boost\n     * amount varies linearly from 0.5 pixel near 0 to 0 pixel at\n     * blueScale cutoff.\n     * Note: This boost amount is different from the coretype heuristic.\n     *\n     */\n\n    if ( blues->scale < blues->blueScale )\n    {\n      blues->suppressOvershoot = TRUE;\n\n      /* Change rounding threshold for `dsFlatEdge'.                    */\n      /* Note: constant changed from 0.5 to 0.6 to avoid a problem with */\n      /*       10ppem Arial                                             */\n\n      blues->boost = cf2_floatToFixed( .6 ) -\n                       FT_MulDiv( cf2_floatToFixed ( .6 ),\n                                  blues->scale,\n                                  blues->blueScale );\n      if ( blues->boost > 0x7FFF )\n      {\n        /* boost must remain less than 0.5, or baseline could go negative */\n        blues->boost = 0x7FFF;\n      }\n    }\n\n    /* boost and darkening have similar effects; don't do both */\n    if ( font->stemDarkened )\n      blues->boost = 0;\n\n    /* set device space alignment for each zone;    */\n    /* apply boost amount before rounding flat edge */\n\n    for ( i = 0; i < blues->count; i++ )\n    {\n      if ( blues->zone[i].bottomZone )\n        blues->zone[i].dsFlatEdge = cf2_fixedRound(\n                                      FT_MulFix(\n                                        blues->zone[i].csFlatEdge,\n                                        blues->scale ) -\n                                      blues->boost );\n      else\n        blues->zone[i].dsFlatEdge = cf2_fixedRound(\n                                      FT_MulFix(\n                                        blues->zone[i].csFlatEdge,\n                                        blues->scale ) +\n                                      blues->boost );\n    }\n  }\n\n\n  /*\n   * Check whether `stemHint' is captured by one of the blue zones.\n   *\n   * Zero, one or both edges may be valid; only valid edges can be\n   * captured.  For compatibility with CoolType, search top and bottom\n   * zones in the same pass (see `BlueLock').  If a hint is captured,\n   * return true and position the edge(s) in one of 3 ways:\n   *\n   *  1) If `BlueScale' suppresses overshoot, position the captured edge\n   *     at the flat edge of the zone.\n   *  2) If overshoot is not suppressed and `BlueShift' requires\n   *     overshoot, position the captured edge a minimum of 1 device pixel\n   *     from the flat edge.\n   *  3) If overshoot is not suppressed or required, position the captured\n   *     edge at the nearest device pixel.\n   *\n   */\n  FT_LOCAL_DEF( FT_Bool )\n  cf2_blues_capture( const CF2_Blues  blues,\n                     CF2_Hint         bottomHintEdge,\n                     CF2_Hint         topHintEdge )\n  {\n    /* TODO: validate? */\n    CF2_Fixed  csFuzz = blues->blueFuzz;\n\n    /* new position of captured edge */\n    CF2_Fixed  dsNew;\n\n    /* amount that hint is moved when positioned */\n    CF2_Fixed  dsMove = 0;\n\n    FT_Bool   captured = FALSE;\n    CF2_UInt  i;\n\n\n    /* assert edge flags are consistent */\n    FT_ASSERT( !cf2_hint_isTop( bottomHintEdge ) &&\n               !cf2_hint_isBottom( topHintEdge ) );\n\n    /* TODO: search once without blue fuzz for compatibility with coretype? */\n    for ( i = 0; i < blues->count; i++ )\n    {\n      if ( blues->zone[i].bottomZone           &&\n           cf2_hint_isBottom( bottomHintEdge ) )\n      {\n        if ( ( blues->zone[i].csBottomEdge - csFuzz ) <=\n               bottomHintEdge->csCoord                   &&\n             bottomHintEdge->csCoord <=\n               ( blues->zone[i].csTopEdge + csFuzz )     )\n        {\n          /* bottom edge captured by bottom zone */\n\n          if ( blues->suppressOvershoot )\n            dsNew = blues->zone[i].dsFlatEdge;\n\n          else if ( ( blues->zone[i].csTopEdge - bottomHintEdge->csCoord ) >=\n                      blues->blueShift )\n          {\n            /* guarantee minimum of 1 pixel overshoot */\n            dsNew = FT_MIN(\n                      cf2_fixedRound( bottomHintEdge->dsCoord ),\n                      blues->zone[i].dsFlatEdge - cf2_intToFixed( 1 ) );\n          }\n\n          else\n          {\n            /* simply round captured edge */\n            dsNew = cf2_fixedRound( bottomHintEdge->dsCoord );\n          }\n\n          dsMove   = dsNew - bottomHintEdge->dsCoord;\n          captured = TRUE;\n\n          break;\n        }\n      }\n\n      if ( !blues->zone[i].bottomZone && cf2_hint_isTop( topHintEdge ) )\n      {\n        if ( ( blues->zone[i].csBottomEdge - csFuzz ) <=\n               topHintEdge->csCoord                      &&\n             topHintEdge->csCoord <=\n               ( blues->zone[i].csTopEdge + csFuzz )     )\n        {\n          /* top edge captured by top zone */\n\n          if ( blues->suppressOvershoot )\n            dsNew = blues->zone[i].dsFlatEdge;\n\n          else if ( ( topHintEdge->csCoord - blues->zone[i].csBottomEdge ) >=\n                      blues->blueShift )\n          {\n            /* guarantee minimum of 1 pixel overshoot */\n            dsNew = FT_MAX(\n                      cf2_fixedRound( topHintEdge->dsCoord ),\n                      blues->zone[i].dsFlatEdge + cf2_intToFixed( 1 ) );\n          }\n\n          else\n          {\n            /* simply round captured edge */\n            dsNew = cf2_fixedRound( topHintEdge->dsCoord );\n          }\n\n          dsMove   = dsNew - topHintEdge->dsCoord;\n          captured = TRUE;\n\n          break;\n        }\n      }\n    }\n\n    if ( captured )\n    {\n      /* move both edges and flag them `locked' */\n      if ( cf2_hint_isValid( bottomHintEdge ) )\n      {\n        bottomHintEdge->dsCoord += dsMove;\n        cf2_hint_lock( bottomHintEdge );\n      }\n\n      if ( cf2_hint_isValid( topHintEdge ) )\n      {\n        topHintEdge->dsCoord += dsMove;\n        cf2_hint_lock( topHintEdge );\n      }\n    }\n\n    return captured;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2blues.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2blues.h                                                             */\n/*                                                                         */\n/*    Adobe's code for handling Blue Zones (specification).                */\n/*                                                                         */\n/*  Copyright 2009-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*\n   * A `CF2_Blues' object stores the blue zones (horizontal alignment\n   * zones) of a font.  These are specified in the CFF private dictionary\n   * by `BlueValues', `OtherBlues', `FamilyBlues', and `FamilyOtherBlues'.\n   * Each zone is defined by a top and bottom edge in character space.\n   * Further, each zone is either a top zone or a bottom zone, as recorded\n   * by `bottomZone'.\n   *\n   * The maximum number of `BlueValues' and `FamilyBlues' is 7 each.\n   * However, these are combined to produce a total of 7 zones.\n   * Similarly, the maximum number of `OtherBlues' and `FamilyOtherBlues'\n   * is 5 and these are combined to produce an additional 5 zones.\n   *\n   * Blue zones are used to `capture' hints and force them to a common\n   * alignment point.  This alignment is recorded in device space in\n   * `dsFlatEdge'.  Except for this value, a `CF2_Blues' object could be\n   * constructed independently of scaling.  Construction may occur once\n   * the matrix is known.  Other features implemented in the Capture\n   * method are overshoot suppression, overshoot enforcement, and Blue\n   * Boost.\n   *\n   * Capture is determined by `BlueValues' and `OtherBlues', but the\n   * alignment point may be adjusted to the scaled flat edge of\n   * `FamilyBlues' or `FamilyOtherBlues'.  No alignment is done to the\n   * curved edge of a zone.\n   *\n   */\n\n\n#ifndef __CF2BLUES_H__\n#define __CF2BLUES_H__\n\n\n#include \"cf2glue.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /*\n   * `CF2_Hint' is shared by `cf2hints.h' and\n   * `cf2blues.h', but `cf2blues.h' depends on\n   * `cf2hints.h', so define it here.  Note: The typedef is in\n   * `cf2glue.h'.\n   *\n   */\n  enum\n  {\n    CF2_GhostBottom = 0x1,  /* a single bottom edge           */\n    CF2_GhostTop    = 0x2,  /* a single top edge              */\n    CF2_PairBottom  = 0x4,  /* the bottom edge of a stem hint */\n    CF2_PairTop     = 0x8,  /* the top edge of a stem hint    */\n    CF2_Locked      = 0x10, /* this edge has been aligned     */\n                            /* by a blue zone                 */\n    CF2_Synthetic   = 0x20  /* this edge was synthesized      */\n  };\n\n\n  /*\n   * Default value for OS/2 typoAscender/Descender when their difference\n   * is not equal to `unitsPerEm'.  The default is based on -250 and 1100\n   * in `CF2_Blues', assuming 1000 units per em here.\n   *\n   */\n  enum\n  {\n    CF2_ICF_Top    = cf2_intToFixed(  880 ),\n    CF2_ICF_Bottom = cf2_intToFixed( -120 )\n  };\n\n\n  /*\n   * Constant used for hint adjustment and for synthetic em box hint\n   * placement.\n   */\n#define CF2_MIN_COUNTER  cf2_floatToFixed( 0.5 )\n\n\n  /* shared typedef is in cf2glue.h */\n  struct  CF2_HintRec_\n  {\n    CF2_UInt  flags;  /* attributes of the edge            */\n    size_t    index;  /* index in original stem hint array */\n                      /* (if not synthetic)                */\n    CF2_Fixed  csCoord;\n    CF2_Fixed  dsCoord;\n    CF2_Fixed  scale;\n  };\n\n\n  typedef struct  CF2_BlueRec_\n  {\n    CF2_Fixed  csBottomEdge;\n    CF2_Fixed  csTopEdge;\n    CF2_Fixed  csFlatEdge; /* may be from either local or Family zones */\n    CF2_Fixed  dsFlatEdge; /* top edge of bottom zone or bottom edge   */\n                           /* of top zone (rounded)                    */\n    FT_Bool  bottomZone;\n\n  } CF2_BlueRec;\n\n\n  /* max total blue zones is 12 */\n  enum\n  {\n    CF2_MAX_BLUES      = 7,\n    CF2_MAX_OTHERBLUES = 5\n  };\n\n\n  typedef struct  CF2_BluesRec_\n  {\n    CF2_Fixed  scale;\n    CF2_UInt   count;\n    FT_Bool    suppressOvershoot;\n    FT_Bool    doEmBoxHints;\n\n    CF2_Fixed  blueScale;\n    CF2_Fixed  blueShift;\n    CF2_Fixed  blueFuzz;\n\n    CF2_Fixed  boost;\n\n    CF2_HintRec  emBoxTopEdge;\n    CF2_HintRec  emBoxBottomEdge;\n\n    CF2_BlueRec  zone[CF2_MAX_BLUES + CF2_MAX_OTHERBLUES];\n\n  } CF2_BluesRec, *CF2_Blues;\n\n\n  FT_LOCAL( void )\n  cf2_blues_init( CF2_Blues  blues,\n                  CF2_Font   font );\n  FT_LOCAL( FT_Bool )\n  cf2_blues_capture( const CF2_Blues  blues,\n                     CF2_Hint         bottomHintEdge,\n                     CF2_Hint         topHintEdge );\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2BLUES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2error.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2error.c                                                             */\n/*                                                                         */\n/*    Adobe's code for error handling (body).                              */\n/*                                                                         */\n/*  Copyright 2006-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"cf2ft.h\"\n#include \"cf2error.h\"\n\n\n  FT_LOCAL_DEF( void )\n  cf2_setError( FT_Error*  error,\n                FT_Error   value )\n  {\n    if ( error && *error == 0 )\n      *error = value;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2error.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2error.h                                                             */\n/*                                                                         */\n/*    Adobe's code for error handling (specification).                     */\n/*                                                                         */\n/*  Copyright 2006-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2ERROR_H__\n#define __CF2ERROR_H__\n\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  CF2_Err_\n#define FT_ERR_BASE    FT_Mod_Err_CF2\n\n\n#include FT_ERRORS_H\n#include \"cf2ft.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /*\n   * A poor-man error facility.\n   *\n   * This code being written in vanilla C, doesn't have the luxury of a\n   * language-supported exception mechanism such as the one available in\n   * Java.  Instead, we are stuck with using error codes that must be\n   * carefully managed and preserved.  However, it is convenient for us to\n   * model our error mechanism on a Java-like exception mechanism.\n   * When we assign an error code we are thus `throwing' an error.\n   *\n   * The perservation of an error code is done by coding convention.\n   * Upon a function call if the error code is anything other than\n   * `FT_Err_Ok', which is guaranteed to be zero, we\n   * will return without altering that error.  This will allow the\n   * error to propogate and be handled at the appropriate location in\n   * the code.\n   *\n   * This allows a style of code where the error code is initialized\n   * up front and a block of calls are made with the error code only\n   * being checked after the block.  If a new error occurs, the original\n   * error will be preserved and a functional no-op should result in any\n   * subsequent function that has an initial error code not equal to\n   * `FT_Err_Ok'.\n   *\n   * Errors are encoded by calling the `FT_THROW' macro.  For example,\n   *\n   * {\n   *   FT_Error  e;\n   *\n   *\n   *   ...\n   *   e = FT_THROW( Out_Of_Memory );\n   * }\n   *\n   */\n\n\n  /* Set error code to a particular value. */\n  FT_LOCAL( void )\n  cf2_setError( FT_Error*  error,\n                FT_Error   value );\n\n\n  /*\n   * A macro that conditionally sets an error code.\n   *\n   * This macro will first check whether `error' is set;\n   * if not, it will set it to `e'.\n   *\n  */\n#define CF2_SET_ERROR( error, e )              \\\n          cf2_setError( error, FT_THROW( e ) )\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2ERROR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2fixed.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2fixed.h                                                             */\n/*                                                                         */\n/*    Adobe's code for Fixed Point Mathematics (specification only).       */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2FIXED_H__\n#define __CF2FIXED_H__\n\n\nFT_BEGIN_HEADER\n\n\n  /* rasterizer integer and fixed point arithmetic must be 32-bit */\n\n#define   CF2_Fixed  CF2_F16Dot16\n  typedef FT_Int32   CF2_Frac;   /* 2.30 fixed point */\n\n\n#define CF2_FIXED_MAX      ( (CF2_Fixed)0x7FFFFFFFL )\n#define CF2_FIXED_MIN      ( (CF2_Fixed)0x80000000L )\n#define CF2_FIXED_ONE      0x10000L\n#define CF2_FIXED_EPSILON  0x0001\n\n  /* in C 89, left and right shift of negative numbers is  */\n  /* implementation specific behaviour in the general case */\n\n#define cf2_intToFixed( i )                                    \\\n          ( (CF2_Fixed)( (FT_UInt32)(i) << 16 ) )\n#define cf2_fixedToInt( x )                                    \\\n          ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )\n#define cf2_fixedRound( x )                                    \\\n          ( (CF2_Fixed)( ( (x) + 0x8000 ) & 0xFFFF0000L ) )\n#define cf2_floatToFixed( f )                                  \\\n          ( (CF2_Fixed)( (f) * 65536.0 + 0.5 ) )\n#define cf2_fixedAbs( x )                                      \\\n          ( (x) < 0 ? -(x) : (x) )\n#define cf2_fixedFloor( x )                                    \\\n          ( (CF2_Fixed)( (x) & 0xFFFF0000L ) )\n#define cf2_fixedFraction( x )                                 \\\n          ( (x) - cf2_fixedFloor( x ) )\n#define cf2_fracToFixed( x )                                   \\\n          ( (x) < 0 ? -( ( -(x) + 0x2000 ) >> 14 )             \\\n                    :  ( (  (x) + 0x2000 ) >> 14 ) )\n\n\n  /* signed numeric types */\n  typedef enum  CF2_NumberType_\n  {\n    CF2_NumberFixed,    /* 16.16 */\n    CF2_NumberFrac,     /*  2.30 */\n    CF2_NumberInt       /* 32.0  */\n\n  } CF2_NumberType;\n\n\nFT_END_HEADER\n\n\n#endif /*  __CF2FIXED_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2font.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2font.c                                                              */\n/*                                                                         */\n/*    Adobe's code for font instances (body).                              */\n/*                                                                         */\n/*  Copyright 2007-2014 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_CALC_H\n\n#include \"cf2ft.h\"\n\n#include \"cf2glue.h\"\n#include \"cf2font.h\"\n#include \"cf2error.h\"\n#include \"cf2intrp.h\"\n\n\n  /* Compute a stem darkening amount in character space. */\n  static void\n  cf2_computeDarkening( CF2_Fixed   emRatio,\n                        CF2_Fixed   ppem,\n                        CF2_Fixed   stemWidth,\n                        CF2_Fixed*  darkenAmount,\n                        CF2_Fixed   boldenAmount,\n                        FT_Bool     stemDarkened,\n                        FT_Int*     darkenParams )\n  {\n    /*\n     * Total darkening amount is computed in 1000 unit character space\n     * using the modified 5 part curve as Adobe's Avalon rasterizer.\n     * The darkening amount is smaller for thicker stems.\n     * It becomes zero when the stem is thicker than 2.333 pixels.\n     *\n     * By default, we use\n     *\n     *   darkenAmount = 0.4 pixels   if scaledStem <= 0.5 pixels,\n     *   darkenAmount = 0.275 pixels if 1 <= scaledStem <= 1.667 pixels,\n     *   darkenAmount = 0 pixel      if scaledStem >= 2.333 pixels,\n     *\n     * and piecewise linear in-between:\n     *\n     *\n     *   darkening\n     *       ^\n     *       |\n     *       |      (x1,y1)\n     *       |--------+\n     *       |         \\\n     *       |          \\\n     *       |           \\          (x3,y3)\n     *       |            +----------+\n     *       |        (x2,y2)         \\\n     *       |                         \\\n     *       |                          \\\n     *       |                           +-----------------\n     *       |                         (x4,y4)\n     *       +--------------------------------------------->   stem\n     *                                                       thickness\n     *\n     *\n     * This corresponds to the following values for the\n     * `darkening-parameters' property:\n     *\n     *   (x1, y1) = (500, 400)\n     *   (x2, y2) = (1000, 275)\n     *   (x3, y3) = (1667, 275)\n     *   (x4, y4) = (2333, 0)\n     *\n     */\n\n    /* Internal calculations are done in units per thousand for */\n    /* convenience. The x axis is scaled stem width in          */\n    /* thousandths of a pixel. That is, 1000 is 1 pixel.        */\n    /* The y axis is darkening amount in thousandths of a pixel.*/\n    /* In the code, below, dividing by ppem and                 */\n    /* adjusting for emRatio converts darkenAmount to character */\n    /* space (font units).                                      */\n    CF2_Fixed  stemWidthPer1000, scaledStem;\n    FT_Int     logBase2;\n\n\n    *darkenAmount = 0;\n\n    if ( boldenAmount == 0 && !stemDarkened )\n      return;\n\n    /* protect against range problems and divide by zero */\n    if ( emRatio < cf2_floatToFixed( .01 ) )\n      return;\n\n    if ( stemDarkened )\n    {\n      FT_Int  x1 = darkenParams[0];\n      FT_Int  y1 = darkenParams[1];\n      FT_Int  x2 = darkenParams[2];\n      FT_Int  y2 = darkenParams[3];\n      FT_Int  x3 = darkenParams[4];\n      FT_Int  y3 = darkenParams[5];\n      FT_Int  x4 = darkenParams[6];\n      FT_Int  y4 = darkenParams[7];\n\n\n      /* convert from true character space to 1000 unit character space; */\n      /* add synthetic emboldening effect                                */\n\n      /* `stemWidthPer1000' will not overflow for a legitimate font      */\n\n      stemWidthPer1000 = FT_MulFix( stemWidth + boldenAmount, emRatio );\n\n      /* `scaledStem' can easily overflow, so we must clamp its maximum  */\n      /* value; the test doesn't need to be precise, but must be         */\n      /* conservative.  The clamp value (default 2333) where             */\n      /* `darkenAmount' is zero is well below the overflow value of      */\n      /* 32767.                                                          */\n      /*                                                                 */\n      /* FT_MSB computes the integer part of the base 2 logarithm.  The  */\n      /* number of bits for the product is 1 or 2 more than the sum of   */\n      /* logarithms; remembering that the 16 lowest bits of the fraction */\n      /* are dropped this is correct to within a factor of almost 4.     */\n      /* For example, 0x80.0000 * 0x80.0000 = 0x4000.0000 is 23+23 and   */\n      /* is flagged as possible overflow because 0xFF.FFFF * 0xFF.FFFF = */\n      /* 0xFFFF.FE00 is also 23+23.                                      */\n\n      logBase2 = FT_MSB( (FT_UInt32)stemWidthPer1000 ) +\n                   FT_MSB( (FT_UInt32)ppem );\n\n      if ( logBase2 >= 46 )\n        /* possible overflow */\n        scaledStem = cf2_intToFixed( x4 );\n      else\n        scaledStem = FT_MulFix( stemWidthPer1000, ppem );\n\n      /* now apply the darkening parameters */\n\n      if ( scaledStem < cf2_intToFixed( x1 ) )\n        *darkenAmount = FT_DivFix( cf2_intToFixed( y1 ), ppem );\n\n      else if ( scaledStem < cf2_intToFixed( x2 ) )\n      {\n        FT_Int  xdelta = x2 - x1;\n        FT_Int  ydelta = y2 - y1;\n        FT_Int  x      = stemWidthPer1000 -\n                           FT_DivFix( cf2_intToFixed( x1 ), ppem );\n\n\n        if ( !xdelta )\n          goto Try_x3;\n\n        *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) +\n                          FT_DivFix( cf2_intToFixed( y1 ), ppem );\n      }\n\n      else if ( scaledStem < cf2_intToFixed( x3 ) )\n      {\n      Try_x3:\n        {\n          FT_Int  xdelta = x3 - x2;\n          FT_Int  ydelta = y3 - y2;\n          FT_Int  x      = stemWidthPer1000 -\n                             FT_DivFix( cf2_intToFixed( x2 ), ppem );\n\n\n          if ( !xdelta )\n            goto Try_x4;\n\n          *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) +\n                            FT_DivFix( cf2_intToFixed( y2 ), ppem );\n        }\n      }\n\n      else if ( scaledStem < cf2_intToFixed( x4 ) )\n      {\n      Try_x4:\n        {\n          FT_Int  xdelta = x4 - x3;\n          FT_Int  ydelta = y4 - y3;\n          FT_Int  x      = stemWidthPer1000 -\n                             FT_DivFix( cf2_intToFixed( x3 ), ppem );\n\n\n          if ( !xdelta )\n            goto Use_y4;\n\n          *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) +\n                            FT_DivFix( cf2_intToFixed( y3 ), ppem );\n        }\n      }\n\n      else\n      {\n      Use_y4:\n        *darkenAmount = FT_DivFix( cf2_intToFixed( y4 ), ppem );\n      }\n\n      /* use half the amount on each side and convert back to true */\n      /* character space                                           */\n      *darkenAmount = FT_DivFix( *darkenAmount, 2 * emRatio );\n    }\n\n    /* add synthetic emboldening effect in character space */\n    *darkenAmount += boldenAmount / 2;\n  }\n\n\n  /* set up values for the current FontDict and matrix */\n\n  /* caller's transform is adjusted for subpixel positioning */\n  static void\n  cf2_font_setup( CF2_Font           font,\n                  const CF2_Matrix*  transform )\n  {\n    /* pointer to parsed font object */\n    CFF_Decoder*  decoder = font->decoder;\n\n    FT_Bool  needExtraSetup = FALSE;\n\n    /* character space units */\n    CF2_Fixed  boldenX = font->syntheticEmboldeningAmountX;\n    CF2_Fixed  boldenY = font->syntheticEmboldeningAmountY;\n\n    CFF_SubFont  subFont;\n    CF2_Fixed    ppem;\n\n\n    /* clear previous error */\n    font->error = FT_Err_Ok;\n\n    /* if a CID fontDict has changed, we need to recompute some cached */\n    /* data                                                            */\n    subFont = cf2_getSubfont( decoder );\n    if ( font->lastSubfont != subFont )\n    {\n      font->lastSubfont = subFont;\n      needExtraSetup    = TRUE;\n    }\n\n    /* if ppem has changed, we need to recompute some cached data         */\n    /* note: because of CID font matrix concatenation, ppem and transform */\n    /*       do not necessarily track.                                    */\n    ppem = cf2_getPpemY( decoder );\n    if ( font->ppem != ppem )\n    {\n      font->ppem     = ppem;\n      needExtraSetup = TRUE;\n    }\n\n    /* copy hinted flag on each call */\n    font->hinted = (FT_Bool)( font->renderingFlags & CF2_FlagsHinted );\n\n    /* determine if transform has changed;       */\n    /* include Fontmatrix but ignore translation */\n    if ( ft_memcmp( transform,\n                    &font->currentTransform,\n                    4 * sizeof ( CF2_Fixed ) ) != 0 )\n    {\n      /* save `key' information for `cache of one' matrix data; */\n      /* save client transform, without the translation         */\n      font->currentTransform    = *transform;\n      font->currentTransform.tx =\n      font->currentTransform.ty = cf2_intToFixed( 0 );\n\n      /* TODO: FreeType transform is simple scalar; for now, use identity */\n      /*       for outer                                                  */\n      font->innerTransform   = *transform;\n      font->outerTransform.a =\n      font->outerTransform.d = cf2_intToFixed( 1 );\n      font->outerTransform.b =\n      font->outerTransform.c = cf2_intToFixed( 0 );\n\n      needExtraSetup = TRUE;\n    }\n\n    /*\n     * font->darkened is set to true if there is a stem darkening request or\n     * the font is synthetic emboldened.\n     * font->darkened controls whether to adjust blue zones, winding order,\n     * and hinting.\n     *\n     */\n    if ( font->stemDarkened != ( font->renderingFlags & CF2_FlagsDarkened ) )\n    {\n      font->stemDarkened =\n        (FT_Bool)( font->renderingFlags & CF2_FlagsDarkened );\n\n      /* blue zones depend on darkened flag */\n      needExtraSetup = TRUE;\n    }\n\n    /* recompute variables that are dependent on transform or FontDict or */\n    /* darken flag                                                        */\n    if ( needExtraSetup )\n    {\n      /* StdVW is found in the private dictionary;                       */\n      /* recompute darkening amounts whenever private dictionary or      */\n      /* transform change                                                */\n      /* Note: a rendering flag turns darkening on or off, so we want to */\n      /*       store the `on' amounts;                                   */\n      /*       darkening amount is computed in character space           */\n      /* TODO: testing size-dependent darkening here;                    */\n      /*       what to do for rotations?                                 */\n\n      CF2_Fixed  emRatio;\n      CF2_Fixed  stdHW;\n      CF2_Int    unitsPerEm = font->unitsPerEm;\n\n\n      if ( unitsPerEm == 0 )\n        unitsPerEm = 1000;\n\n      ppem = FT_MAX( cf2_intToFixed( 4 ),\n                     font->ppem ); /* use minimum ppem of 4 */\n\n#if 0\n      /* since vstem is measured in the x-direction, we use the `a' member */\n      /* of the fontMatrix                                                 */\n      emRatio = cf2_fixedFracMul( cf2_intToFixed( 1000 ), fontMatrix->a );\n#endif\n\n      /* Freetype does not preserve the fontMatrix when parsing; use */\n      /* unitsPerEm instead.                                         */\n      /* TODO: check precision of this                               */\n      emRatio     = cf2_intToFixed( 1000 ) / unitsPerEm;\n      font->stdVW = cf2_getStdVW( decoder );\n\n      if ( font->stdVW <= 0 )\n        font->stdVW = FT_DivFix( cf2_intToFixed( 75 ), emRatio );\n\n      if ( boldenX > 0 )\n      {\n        /* Ensure that boldenX is at least 1 pixel for synthetic bold font */\n        /* (similar to what Avalon does)                                   */\n        boldenX = FT_MAX( boldenX,\n                          FT_DivFix( cf2_intToFixed( unitsPerEm ), ppem ) );\n\n        /* Synthetic emboldening adds at least 1 pixel to darkenX, while */\n        /* stem darkening adds at most half pixel.  Since the purpose of */\n        /* stem darkening (readability at small sizes) is met with       */\n        /* synthetic emboldening, no need to add stem darkening for a    */\n        /* synthetic bold font.                                          */\n        cf2_computeDarkening( emRatio,\n                              ppem,\n                              font->stdVW,\n                              &font->darkenX,\n                              boldenX,\n                              FALSE,\n                              font->darkenParams );\n      }\n      else\n        cf2_computeDarkening( emRatio,\n                              ppem,\n                              font->stdVW,\n                              &font->darkenX,\n                              0,\n                              font->stemDarkened,\n                              font->darkenParams );\n\n#if 0\n      /* since hstem is measured in the y-direction, we use the `d' member */\n      /* of the fontMatrix                                                 */\n      /* TODO: use the same units per em as above; check this              */\n      emRatio = cf2_fixedFracMul( cf2_intToFixed( 1000 ), fontMatrix->d );\n#endif\n\n      /* set the default stem width, because it must be the same for all */\n      /* family members;                                                 */\n      /* choose a constant for StdHW that depends on font contrast       */\n      stdHW = cf2_getStdHW( decoder );\n\n      if ( stdHW > 0 && font->stdVW > 2 * stdHW )\n        font->stdHW = FT_DivFix( cf2_intToFixed( 75 ), emRatio );\n      else\n      {\n        /* low contrast font gets less hstem darkening */\n        font->stdHW = FT_DivFix( cf2_intToFixed( 110 ), emRatio );\n      }\n\n      cf2_computeDarkening( emRatio,\n                            ppem,\n                            font->stdHW,\n                            &font->darkenY,\n                            boldenY,\n                            font->stemDarkened,\n                            font->darkenParams );\n\n      if ( font->darkenX != 0 || font->darkenY != 0 )\n        font->darkened = TRUE;\n      else\n        font->darkened = FALSE;\n\n      font->reverseWinding = FALSE; /* initial expectation is CCW */\n\n      /* compute blue zones for this instance */\n      cf2_blues_init( &font->blues, font );\n    }\n  }\n\n\n  /* equivalent to AdobeGetOutline */\n  FT_LOCAL_DEF( FT_Error )\n  cf2_getGlyphOutline( CF2_Font           font,\n                       CF2_Buffer         charstring,\n                       const CF2_Matrix*  transform,\n                       CF2_F16Dot16*      glyphWidth )\n  {\n    FT_Error  lastError = FT_Err_Ok;\n\n    FT_Vector  translation;\n\n#if 0\n    FT_Vector  advancePoint;\n#endif\n\n    CF2_Fixed  advWidth = 0;\n    FT_Bool    needWinding;\n\n\n    /* Note: use both integer and fraction for outlines.  This allows bbox */\n    /*       to come out directly.                                         */\n\n    translation.x = transform->tx;\n    translation.y = transform->ty;\n\n    /* set up values based on transform */\n    cf2_font_setup( font, transform );\n    if ( font->error )\n      goto exit;                      /* setup encountered an error */\n\n    /* reset darken direction */\n    font->reverseWinding = FALSE;\n\n    /* winding order only affects darkening */\n    needWinding = font->darkened;\n\n    while ( 1 )\n    {\n      /* reset output buffer */\n      cf2_outline_reset( &font->outline );\n\n      /* build the outline, passing the full translation */\n      cf2_interpT2CharString( font,\n                              charstring,\n                              (CF2_OutlineCallbacks)&font->outline,\n                              &translation,\n                              FALSE,\n                              0,\n                              0,\n                              &advWidth );\n\n      if ( font->error )\n        goto exit;\n\n      if ( !needWinding )\n        break;\n\n      /* check winding order */\n      if ( font->outline.root.windingMomentum >= 0 ) /* CFF is CCW */\n        break;\n\n      /* invert darkening and render again                            */\n      /* TODO: this should be a parameter to getOutline-computeOffset */\n      font->reverseWinding = TRUE;\n\n      needWinding = FALSE;    /* exit after next iteration */\n    }\n\n    /* finish storing client outline */\n    cf2_outline_close( &font->outline );\n\n  exit:\n    /* FreeType just wants the advance width; there is no translation */\n    *glyphWidth = advWidth;\n\n    /* free resources and collect errors from objects we've used */\n    cf2_setError( &font->error, lastError );\n\n    return font->error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2font.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2font.h                                                              */\n/*                                                                         */\n/*    Adobe's code for font instances (specification).                     */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2FONT_H__\n#define __CF2FONT_H__\n\n\n#include \"cf2ft.h\"\n#include \"cf2blues.h\"\n\n\nFT_BEGIN_HEADER\n\n\n#define CF2_OPERAND_STACK_SIZE  48\n#define CF2_MAX_SUBR            10 /* maximum subroutine nesting */\n\n\n  /* typedef is in `cf2glue.h' */\n  struct  CF2_FontRec_\n  {\n    FT_Memory  memory;\n    FT_Error   error;     /* shared error for this instance */\n\n    CF2_RenderingFlags  renderingFlags;\n\n    /* variables that depend on Transform:  */\n    /* the following have zero translation; */\n    /* inner * outer = font * original      */\n\n    CF2_Matrix  currentTransform;  /* original client matrix           */\n    CF2_Matrix  innerTransform;    /* for hinting; erect, scaled       */\n    CF2_Matrix  outerTransform;    /* post hinting; includes rotations */\n    CF2_Fixed   ppem;              /* transform-dependent              */\n\n    CF2_Int  unitsPerEm;\n\n    CF2_Fixed  syntheticEmboldeningAmountX;   /* character space units */\n    CF2_Fixed  syntheticEmboldeningAmountY;   /* character space units */\n\n    /* FreeType related members */\n    CF2_OutlineRec  outline;       /* freetype glyph outline functions */\n    CFF_Decoder*    decoder;\n    CFF_SubFont     lastSubfont;              /* FreeType parsed data; */\n                                              /* top font or subfont   */\n\n    /* these flags can vary from one call to the next */\n    FT_Bool  hinted;\n    FT_Bool  darkened;       /* true if stemDarkened or synthetic bold */\n                             /* i.e. darkenX != 0 || darkenY != 0      */\n    FT_Bool  stemDarkened;\n\n    FT_Int  darkenParams[8];              /* 1000 unit character space */\n\n    /* variables that depend on both FontDict and Transform */\n    CF2_Fixed  stdVW;     /* in character space; depends on dict entry */\n    CF2_Fixed  stdHW;     /* in character space; depends on dict entry */\n    CF2_Fixed  darkenX;                    /* character space units    */\n    CF2_Fixed  darkenY;                    /* depends on transform     */\n                                           /* and private dict (StdVW) */\n    FT_Bool  reverseWinding;               /* darken assuming          */\n                                           /* counterclockwise winding */\n\n    CF2_BluesRec  blues;                         /* computed zone data */\n  };\n\n\n  FT_LOCAL( FT_Error )\n  cf2_getGlyphOutline( CF2_Font           font,\n                       CF2_Buffer         charstring,\n                       const CF2_Matrix*  transform,\n                       CF2_F16Dot16*      glyphWidth );\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2FONT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2ft.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2ft.c                                                                */\n/*                                                                         */\n/*    FreeType Glue Component to Adobe's Interpreter (body).               */\n/*                                                                         */\n/*  Copyright 2013-2014 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"cf2ft.h\"\n#include FT_INTERNAL_DEBUG_H\n\n#include \"cf2font.h\"\n#include \"cf2error.h\"\n\n\n#define CF2_MAX_SIZE  cf2_intToFixed( 2000 )    /* max ppem */\n\n\n  /*\n   * This check should avoid most internal overflow cases.  Clients should\n   * generally respond to `Glyph_Too_Big' by getting a glyph outline\n   * at EM size, scaling it and filling it as a graphics operation.\n   *\n   */\n  static FT_Error\n  cf2_checkTransform( const CF2_Matrix*  transform,\n                      CF2_Int            unitsPerEm )\n  {\n    CF2_Fixed  maxScale;\n\n\n    FT_ASSERT( unitsPerEm > 0 );\n\n    if ( transform->a <= 0 || transform->d <= 0 )\n      return FT_THROW( Invalid_Size_Handle );\n\n    FT_ASSERT( transform->b == 0 && transform->c == 0 );\n    FT_ASSERT( transform->tx == 0 && transform->ty == 0 );\n\n    if ( unitsPerEm > 0x7FFF )\n      return FT_THROW( Glyph_Too_Big );\n\n    maxScale = FT_DivFix( CF2_MAX_SIZE, cf2_intToFixed( unitsPerEm ) );\n\n    if ( transform->a > maxScale || transform->d > maxScale )\n      return FT_THROW( Glyph_Too_Big );\n\n    return FT_Err_Ok;\n  }\n\n\n  static void\n  cf2_setGlyphWidth( CF2_Outline  outline,\n                     CF2_Fixed    width )\n  {\n    CFF_Decoder*  decoder = outline->decoder;\n\n\n    FT_ASSERT( decoder );\n\n    decoder->glyph_width = cf2_fixedToInt( width );\n  }\n\n\n  /* Clean up font instance. */\n  static void\n  cf2_free_instance( void*  ptr )\n  {\n    CF2_Font  font = (CF2_Font)ptr;\n\n\n    if ( font )\n    {\n      FT_Memory  memory = font->memory;\n\n\n      (void)memory;\n    }\n  }\n\n\n  /********************************************/\n  /*                                          */\n  /* functions for handling client outline;   */\n  /* FreeType uses coordinates in 26.6 format */\n  /*                                          */\n  /********************************************/\n\n  static void\n  cf2_builder_moveTo( CF2_OutlineCallbacks      callbacks,\n                      const CF2_CallbackParams  params )\n  {\n    /* downcast the object pointer */\n    CF2_Outline   outline = (CF2_Outline)callbacks;\n    CFF_Builder*  builder;\n\n    (void)params;        /* only used in debug mode */\n\n\n    FT_ASSERT( outline && outline->decoder );\n    FT_ASSERT( params->op == CF2_PathOpMoveTo );\n\n    builder = &outline->decoder->builder;\n\n    /* note: two successive moves simply close the contour twice */\n    cff_builder_close_contour( builder );\n    builder->path_begun = 0;\n  }\n\n\n  static void\n  cf2_builder_lineTo( CF2_OutlineCallbacks      callbacks,\n                      const CF2_CallbackParams  params )\n  {\n    FT_Error  error;\n\n    /* downcast the object pointer */\n    CF2_Outline   outline = (CF2_Outline)callbacks;\n    CFF_Builder*  builder;\n\n\n    FT_ASSERT( outline && outline->decoder );\n    FT_ASSERT( params->op == CF2_PathOpLineTo );\n\n    builder = &outline->decoder->builder;\n\n    if ( !builder->path_begun )\n    {\n      /* record the move before the line; also check points and set */\n      /* `path_begun'                                               */\n      error = cff_builder_start_point( builder,\n                                       params->pt0.x,\n                                       params->pt0.y );\n      if ( error )\n      {\n        if ( !*callbacks->error )\n          *callbacks->error =  error;\n        return;\n      }\n    }\n\n    /* `cff_builder_add_point1' includes a check_points call for one point */\n    error = cff_builder_add_point1( builder,\n                                    params->pt1.x,\n                                    params->pt1.y );\n    if ( error )\n    {\n      if ( !*callbacks->error )\n        *callbacks->error =  error;\n      return;\n    }\n  }\n\n\n  static void\n  cf2_builder_cubeTo( CF2_OutlineCallbacks      callbacks,\n                      const CF2_CallbackParams  params )\n  {\n    FT_Error  error;\n\n    /* downcast the object pointer */\n    CF2_Outline   outline = (CF2_Outline)callbacks;\n    CFF_Builder*  builder;\n\n\n    FT_ASSERT( outline && outline->decoder );\n    FT_ASSERT( params->op == CF2_PathOpCubeTo );\n\n    builder = &outline->decoder->builder;\n\n    if ( !builder->path_begun )\n    {\n      /* record the move before the line; also check points and set */\n      /* `path_begun'                                               */\n      error = cff_builder_start_point( builder,\n                                       params->pt0.x,\n                                       params->pt0.y );\n      if ( error )\n      {\n        if ( !*callbacks->error )\n          *callbacks->error =  error;\n        return;\n      }\n    }\n\n    /* prepare room for 3 points: 2 off-curve, 1 on-curve */\n    error = cff_check_points( builder, 3 );\n    if ( error )\n    {\n      if ( !*callbacks->error )\n        *callbacks->error =  error;\n      return;\n    }\n\n    cff_builder_add_point( builder,\n                           params->pt1.x,\n                           params->pt1.y, 0 );\n    cff_builder_add_point( builder,\n                           params->pt2.x,\n                           params->pt2.y, 0 );\n    cff_builder_add_point( builder,\n                           params->pt3.x,\n                           params->pt3.y, 1 );\n  }\n\n\n  static void\n  cf2_outline_init( CF2_Outline  outline,\n                    FT_Memory    memory,\n                    FT_Error*    error )\n  {\n    FT_MEM_ZERO( outline, sizeof ( CF2_OutlineRec ) );\n\n    outline->root.memory = memory;\n    outline->root.error  = error;\n\n    outline->root.moveTo = cf2_builder_moveTo;\n    outline->root.lineTo = cf2_builder_lineTo;\n    outline->root.cubeTo = cf2_builder_cubeTo;\n  }\n\n\n  /* get scaling and hint flag from GlyphSlot */\n  static void\n  cf2_getScaleAndHintFlag( CFF_Decoder*  decoder,\n                           CF2_Fixed*    x_scale,\n                           CF2_Fixed*    y_scale,\n                           FT_Bool*      hinted,\n                           FT_Bool*      scaled )\n  {\n    FT_ASSERT( decoder && decoder->builder.glyph );\n\n    /* note: FreeType scale includes a factor of 64 */\n    *hinted = decoder->builder.glyph->hint;\n    *scaled = decoder->builder.glyph->scaled;\n\n    if ( *hinted )\n    {\n      *x_scale = ( decoder->builder.glyph->x_scale + 32 ) / 64;\n      *y_scale = ( decoder->builder.glyph->y_scale + 32 ) / 64;\n    }\n    else\n    {\n      /* for unhinted outlines, `cff_slot_load' does the scaling, */\n      /* thus render at `unity' scale                             */\n\n      *x_scale = 0x0400;   /* 1/64 as 16.16 */\n      *y_scale = 0x0400;\n    }\n  }\n\n\n  /* get units per em from `FT_Face' */\n  /* TODO: should handle font matrix concatenation? */\n  static FT_UShort\n  cf2_getUnitsPerEm( CFF_Decoder*  decoder )\n  {\n    FT_ASSERT( decoder && decoder->builder.face );\n    FT_ASSERT( decoder->builder.face->root.units_per_EM );\n\n    return decoder->builder.face->root.units_per_EM;\n  }\n\n\n  /* Main entry point: Render one glyph. */\n  FT_LOCAL_DEF( FT_Error )\n  cf2_decoder_parse_charstrings( CFF_Decoder*  decoder,\n                                 FT_Byte*      charstring_base,\n                                 FT_ULong      charstring_len )\n  {\n    FT_Memory  memory;\n    FT_Error   error = FT_Err_Ok;\n    CF2_Font   font;\n\n\n    FT_ASSERT( decoder && decoder->cff );\n\n    memory = decoder->builder.memory;\n\n    /* CF2 data is saved here across glyphs */\n    font = (CF2_Font)decoder->cff->cf2_instance.data;\n\n    /* on first glyph, allocate instance structure */\n    if ( decoder->cff->cf2_instance.data == NULL )\n    {\n      decoder->cff->cf2_instance.finalizer =\n        (FT_Generic_Finalizer)cf2_free_instance;\n\n      if ( FT_ALLOC( decoder->cff->cf2_instance.data,\n                     sizeof ( CF2_FontRec ) ) )\n        return FT_THROW( Out_Of_Memory );\n\n      font = (CF2_Font)decoder->cff->cf2_instance.data;\n\n      font->memory = memory;\n\n      /* initialize a client outline, to be shared by each glyph rendered */\n      cf2_outline_init( &font->outline, font->memory, &font->error );\n    }\n\n    /* save decoder; it is a stack variable and will be different on each */\n    /* call                                                               */\n    font->decoder         = decoder;\n    font->outline.decoder = decoder;\n\n    {\n      /* build parameters for Adobe engine */\n\n      CFF_Builder*  builder = &decoder->builder;\n      CFF_Driver    driver  = (CFF_Driver)FT_FACE_DRIVER( builder->face );\n\n      /* local error */\n      FT_Error       error2 = FT_Err_Ok;\n      CF2_BufferRec  buf;\n      CF2_Matrix     transform;\n      CF2_F16Dot16   glyphWidth;\n\n      FT_Bool  hinted;\n      FT_Bool  scaled;\n\n\n      /* FreeType has already looked up the GID; convert to         */\n      /* `RegionBuffer', assuming that the input has been validated */\n      FT_ASSERT( charstring_base + charstring_len >= charstring_base );\n\n      FT_ZERO( &buf );\n      buf.start =\n      buf.ptr   = charstring_base;\n      buf.end   = charstring_base + charstring_len;\n\n      FT_ZERO( &transform );\n\n      cf2_getScaleAndHintFlag( decoder,\n                               &transform.a,\n                               &transform.d,\n                               &hinted,\n                               &scaled );\n\n      font->renderingFlags = 0;\n      if ( hinted )\n        font->renderingFlags |= CF2_FlagsHinted;\n      if ( scaled && !driver->no_stem_darkening )\n        font->renderingFlags |= CF2_FlagsDarkened;\n\n      font->darkenParams[0] = driver->darken_params[0];\n      font->darkenParams[1] = driver->darken_params[1];\n      font->darkenParams[2] = driver->darken_params[2];\n      font->darkenParams[3] = driver->darken_params[3];\n      font->darkenParams[4] = driver->darken_params[4];\n      font->darkenParams[5] = driver->darken_params[5];\n      font->darkenParams[6] = driver->darken_params[6];\n      font->darkenParams[7] = driver->darken_params[7];\n\n      /* now get an outline for this glyph;      */\n      /* also get units per em to validate scale */\n      font->unitsPerEm = (CF2_Int)cf2_getUnitsPerEm( decoder );\n\n      if ( scaled )\n      {\n        error2 = cf2_checkTransform( &transform, font->unitsPerEm );\n        if ( error2 )\n          return error2;\n      }\n\n      error2 = cf2_getGlyphOutline( font, &buf, &transform, &glyphWidth );\n      if ( error2 )\n        return FT_ERR( Invalid_File_Format );\n\n      cf2_setGlyphWidth( &font->outline, glyphWidth );\n\n      return FT_Err_Ok;\n    }\n  }\n\n\n  /* get pointer to current FreeType subfont (based on current glyphID) */\n  FT_LOCAL_DEF( CFF_SubFont )\n  cf2_getSubfont( CFF_Decoder*  decoder )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    return decoder->current_subfont;\n  }\n\n\n  /* get `y_ppem' from `CFF_Size' */\n  FT_LOCAL_DEF( CF2_Fixed )\n  cf2_getPpemY( CFF_Decoder*  decoder )\n  {\n    FT_ASSERT( decoder                          &&\n               decoder->builder.face            &&\n               decoder->builder.face->root.size );\n\n    /*\n     * Note that `y_ppem' can be zero if there wasn't a call to\n     * `FT_Set_Char_Size' or something similar.  However, this isn't a\n     * problem since we come to this place in the code only if\n     * FT_LOAD_NO_SCALE is set (the other case gets caught by\n     * `cf2_checkTransform').  The ppem value is needed to compute the stem\n     * darkening, which is disabled for getting the unscaled outline.\n     *\n     */\n    return cf2_intToFixed(\n             decoder->builder.face->root.size->metrics.y_ppem );\n  }\n\n\n  /* get standard stem widths for the current subfont; */\n  /* FreeType stores these as integer font units       */\n  /* (note: variable names seem swapped)               */\n  FT_LOCAL_DEF( CF2_Fixed )\n  cf2_getStdVW( CFF_Decoder*  decoder )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    return cf2_intToFixed(\n             decoder->current_subfont->private_dict.standard_height );\n  }\n\n\n  FT_LOCAL_DEF( CF2_Fixed )\n  cf2_getStdHW( CFF_Decoder*  decoder )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    return cf2_intToFixed(\n             decoder->current_subfont->private_dict.standard_width );\n  }\n\n\n  /* note: FreeType stores 1000 times the actual value for `BlueScale' */\n  FT_LOCAL_DEF( void )\n  cf2_getBlueMetrics( CFF_Decoder*  decoder,\n                      CF2_Fixed*    blueScale,\n                      CF2_Fixed*    blueShift,\n                      CF2_Fixed*    blueFuzz )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    *blueScale = FT_DivFix(\n                   decoder->current_subfont->private_dict.blue_scale,\n                   cf2_intToFixed( 1000 ) );\n    *blueShift = cf2_intToFixed(\n                   decoder->current_subfont->private_dict.blue_shift );\n    *blueFuzz  = cf2_intToFixed(\n                   decoder->current_subfont->private_dict.blue_fuzz );\n  }\n\n\n  /* get blue values counts and arrays; the FreeType parser has validated */\n  /* the counts and verified that each is an even number                  */\n  FT_LOCAL_DEF( void )\n  cf2_getBlueValues( CFF_Decoder*  decoder,\n                     size_t*       count,\n                     FT_Pos*      *data )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    *count = decoder->current_subfont->private_dict.num_blue_values;\n    *data  = (FT_Pos*)\n               &decoder->current_subfont->private_dict.blue_values;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_getOtherBlues( CFF_Decoder*  decoder,\n                     size_t*       count,\n                     FT_Pos*      *data )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    *count = decoder->current_subfont->private_dict.num_other_blues;\n    *data  = (FT_Pos*)\n               &decoder->current_subfont->private_dict.other_blues;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_getFamilyBlues( CFF_Decoder*  decoder,\n                      size_t*       count,\n                      FT_Pos*      *data )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    *count = decoder->current_subfont->private_dict.num_family_blues;\n    *data  = (FT_Pos*)\n               &decoder->current_subfont->private_dict.family_blues;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_getFamilyOtherBlues( CFF_Decoder*  decoder,\n                           size_t*       count,\n                           FT_Pos*      *data )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    *count = decoder->current_subfont->private_dict.num_family_other_blues;\n    *data  = (FT_Pos*)\n               &decoder->current_subfont->private_dict.family_other_blues;\n  }\n\n\n  FT_LOCAL_DEF( CF2_Int )\n  cf2_getLanguageGroup( CFF_Decoder*  decoder )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    return decoder->current_subfont->private_dict.language_group;\n  }\n\n\n  /* convert unbiased subroutine index to `CF2_Buffer' and */\n  /* return 0 on success                                   */\n  FT_LOCAL_DEF( CF2_Int )\n  cf2_initGlobalRegionBuffer( CFF_Decoder*  decoder,\n                              CF2_UInt      idx,\n                              CF2_Buffer    buf )\n  {\n    FT_ASSERT( decoder );\n\n    FT_ZERO( buf );\n\n    idx += decoder->globals_bias;\n    if ( idx >= decoder->num_globals )\n      return TRUE;     /* error */\n\n    FT_ASSERT( decoder->globals );\n\n    buf->start =\n    buf->ptr   = decoder->globals[idx];\n    buf->end   = decoder->globals[idx + 1];\n\n    return FALSE;      /* success */\n  }\n\n\n  /* convert AdobeStandardEncoding code to CF2_Buffer; */\n  /* used for seac component                           */\n  FT_LOCAL_DEF( FT_Error )\n  cf2_getSeacComponent( CFF_Decoder*  decoder,\n                        CF2_UInt      code,\n                        CF2_Buffer    buf )\n  {\n    CF2_Int   gid;\n    FT_Byte*  charstring;\n    FT_ULong  len;\n    FT_Error  error;\n\n\n    FT_ASSERT( decoder );\n\n    FT_ZERO( buf );\n\n    gid = cff_lookup_glyph_by_stdcharcode( decoder->cff, code );\n    if ( gid < 0 )\n      return FT_THROW( Invalid_Glyph_Format );\n\n    error = cff_get_glyph_data( decoder->builder.face,\n                                gid,\n                                &charstring,\n                                &len );\n    /* TODO: for now, just pass the FreeType error through */\n    if ( error )\n      return error;\n\n    /* assume input has been validated */\n    FT_ASSERT( charstring + len >= charstring );\n\n    buf->start = charstring;\n    buf->end   = charstring + len;\n    buf->ptr   = buf->start;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_freeSeacComponent( CFF_Decoder*  decoder,\n                         CF2_Buffer    buf )\n  {\n    FT_ASSERT( decoder );\n\n    cff_free_glyph_data( decoder->builder.face,\n                         (FT_Byte**)&buf->start,\n                         (FT_ULong)( buf->end - buf->start ) );\n  }\n\n\n  FT_LOCAL_DEF( CF2_Int )\n  cf2_initLocalRegionBuffer( CFF_Decoder*  decoder,\n                             CF2_UInt      idx,\n                             CF2_Buffer    buf )\n  {\n    FT_ASSERT( decoder );\n\n    FT_ZERO( buf );\n\n    idx += decoder->locals_bias;\n    if ( idx >= decoder->num_locals )\n      return TRUE;     /* error */\n\n    FT_ASSERT( decoder->locals );\n\n    buf->start =\n    buf->ptr   = decoder->locals[idx];\n    buf->end   = decoder->locals[idx + 1];\n\n    return FALSE;      /* success */\n  }\n\n\n  FT_LOCAL_DEF( CF2_Fixed )\n  cf2_getDefaultWidthX( CFF_Decoder*  decoder )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    return cf2_intToFixed(\n             decoder->current_subfont->private_dict.default_width );\n  }\n\n\n  FT_LOCAL_DEF( CF2_Fixed )\n  cf2_getNominalWidthX( CFF_Decoder*  decoder )\n  {\n    FT_ASSERT( decoder && decoder->current_subfont );\n\n    return cf2_intToFixed(\n             decoder->current_subfont->private_dict.nominal_width );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_outline_reset( CF2_Outline  outline )\n  {\n    CFF_Decoder*  decoder = outline->decoder;\n\n\n    FT_ASSERT( decoder );\n\n    outline->root.windingMomentum = 0;\n\n    FT_GlyphLoader_Rewind( decoder->builder.loader );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_outline_close( CF2_Outline  outline )\n  {\n    CFF_Decoder*  decoder = outline->decoder;\n\n\n    FT_ASSERT( decoder );\n\n    cff_builder_close_contour( &decoder->builder );\n\n    FT_GlyphLoader_Add( decoder->builder.loader );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2ft.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2ft.h                                                                */\n/*                                                                         */\n/*    FreeType Glue Component to Adobe's Interpreter (specification).      */\n/*                                                                         */\n/*  Copyright 2013 Adobe Systems Incorporated.                             */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2FT_H__\n#define __CF2FT_H__\n\n\n#include \"cf2types.h\"\n\n\n  /* TODO: disable asserts for now */\n#define CF2_NDEBUG\n\n\n#include FT_SYSTEM_H\n\n#include \"cf2glue.h\"\n#include \"cffgload.h\"    /* for CFF_Decoder */\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error )\n  cf2_decoder_parse_charstrings( CFF_Decoder*  decoder,\n                                 FT_Byte*      charstring_base,\n                                 FT_ULong      charstring_len );\n\n  FT_LOCAL( CFF_SubFont )\n  cf2_getSubfont( CFF_Decoder*  decoder );\n\n\n  FT_LOCAL( CF2_Fixed )\n  cf2_getPpemY( CFF_Decoder*  decoder );\n  FT_LOCAL( CF2_Fixed )\n  cf2_getStdVW( CFF_Decoder*  decoder );\n  FT_LOCAL( CF2_Fixed )\n  cf2_getStdHW( CFF_Decoder*  decoder );\n\n  FT_LOCAL( void )\n  cf2_getBlueMetrics( CFF_Decoder*  decoder,\n                      CF2_Fixed*    blueScale,\n                      CF2_Fixed*    blueShift,\n                      CF2_Fixed*    blueFuzz );\n  FT_LOCAL( void )\n  cf2_getBlueValues( CFF_Decoder*  decoder,\n                     size_t*       count,\n                     FT_Pos*      *data );\n  FT_LOCAL( void )\n  cf2_getOtherBlues( CFF_Decoder*  decoder,\n                     size_t*       count,\n                     FT_Pos*      *data );\n  FT_LOCAL( void )\n  cf2_getFamilyBlues( CFF_Decoder*  decoder,\n                      size_t*       count,\n                      FT_Pos*      *data );\n  FT_LOCAL( void )\n  cf2_getFamilyOtherBlues( CFF_Decoder*  decoder,\n                           size_t*       count,\n                           FT_Pos*      *data );\n\n  FT_LOCAL( CF2_Int )\n  cf2_getLanguageGroup( CFF_Decoder*  decoder );\n\n  FT_LOCAL( CF2_Int )\n  cf2_initGlobalRegionBuffer( CFF_Decoder*  decoder,\n                              CF2_UInt      idx,\n                              CF2_Buffer    buf );\n  FT_LOCAL( FT_Error )\n  cf2_getSeacComponent( CFF_Decoder*  decoder,\n                        CF2_UInt      code,\n                        CF2_Buffer    buf );\n  FT_LOCAL( void )\n  cf2_freeSeacComponent( CFF_Decoder*  decoder,\n                         CF2_Buffer    buf );\n  FT_LOCAL( CF2_Int )\n  cf2_initLocalRegionBuffer( CFF_Decoder*  decoder,\n                             CF2_UInt      idx,\n                             CF2_Buffer    buf );\n\n  FT_LOCAL( CF2_Fixed )\n  cf2_getDefaultWidthX( CFF_Decoder*  decoder );\n  FT_LOCAL( CF2_Fixed )\n  cf2_getNominalWidthX( CFF_Decoder*  decoder );\n\n\n  /*\n   * FreeType client outline\n   *\n   * process output from the charstring interpreter\n   */\n  typedef struct  CF2_OutlineRec_\n  {\n    CF2_OutlineCallbacksRec  root;        /* base class must be first */\n    CFF_Decoder*             decoder;\n\n  } CF2_OutlineRec, *CF2_Outline;\n\n\n  FT_LOCAL( void )\n  cf2_outline_reset( CF2_Outline  outline );\n  FT_LOCAL( void )\n  cf2_outline_close( CF2_Outline  outline );\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2FT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2glue.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2glue.h                                                              */\n/*                                                                         */\n/*    Adobe's code for shared stuff (specification only).                  */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2GLUE_H__\n#define __CF2GLUE_H__\n\n\n/* common includes for other modules */\n#include \"cf2error.h\"\n#include \"cf2fixed.h\"\n#include \"cf2arrst.h\"\n#include \"cf2read.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /* rendering parameters */\n\n  /* apply hints to rendered glyphs */\n#define CF2_FlagsHinted    1\n  /* for testing */\n#define CF2_FlagsDarkened  2\n\n  /* type for holding the flags */\n  typedef CF2_Int  CF2_RenderingFlags;\n\n\n  /* elements of a glyph outline */\n  typedef enum  CF2_PathOp_\n  {\n    CF2_PathOpMoveTo = 1,     /* change the current point */\n    CF2_PathOpLineTo = 2,     /* line                     */\n    CF2_PathOpQuadTo = 3,     /* quadratic curve          */\n    CF2_PathOpCubeTo = 4      /* cubic curve              */\n\n  } CF2_PathOp;\n\n\n  /* a matrix of fixed point values */\n  typedef struct  CF2_Matrix_\n  {\n    CF2_F16Dot16  a;\n    CF2_F16Dot16  b;\n    CF2_F16Dot16  c;\n    CF2_F16Dot16  d;\n    CF2_F16Dot16  tx;\n    CF2_F16Dot16  ty;\n\n  } CF2_Matrix;\n\n\n  /* these typedefs are needed by more than one header file */\n  /* and gcc compiler doesn't allow redefinition            */\n  typedef struct CF2_FontRec_  CF2_FontRec, *CF2_Font;\n  typedef struct CF2_HintRec_  CF2_HintRec, *CF2_Hint;\n\n\n  /* A common structure for all callback parameters.                       */\n  /*                                                                       */\n  /* Some members may be unused.  For example, `pt0' is not used for       */\n  /* `moveTo' and `pt3' is not used for `quadTo'.  The initial point `pt0' */\n  /* is included for each path element for generality; curve conversions   */\n  /* need it.  The `op' parameter allows one function to handle multiple   */\n  /* element types.                                                        */\n\n  typedef struct  CF2_CallbackParamsRec_\n  {\n    FT_Vector  pt0;\n    FT_Vector  pt1;\n    FT_Vector  pt2;\n    FT_Vector  pt3;\n\n    CF2_Int  op;\n\n  } CF2_CallbackParamsRec, *CF2_CallbackParams;\n\n\n  /* forward reference */\n  typedef struct CF2_OutlineCallbacksRec_  CF2_OutlineCallbacksRec,\n                                           *CF2_OutlineCallbacks;\n\n  /* callback function pointers */\n  typedef void\n  (*CF2_Callback_Type)( CF2_OutlineCallbacks      callbacks,\n                        const CF2_CallbackParams  params );\n\n\n  struct  CF2_OutlineCallbacksRec_\n  {\n    CF2_Callback_Type  moveTo;\n    CF2_Callback_Type  lineTo;\n    CF2_Callback_Type  quadTo;\n    CF2_Callback_Type  cubeTo;\n\n    CF2_Int  windingMomentum;    /* for winding order detection */\n\n    FT_Memory  memory;\n    FT_Error*  error;\n  };\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2GLUE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2hints.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2hints.c                                                             */\n/*                                                                         */\n/*    Adobe's code for handling CFF hints (body).                          */\n/*                                                                         */\n/*  Copyright 2007-2014 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"cf2ft.h\"\n#include FT_INTERNAL_DEBUG_H\n\n#include \"cf2glue.h\"\n#include \"cf2font.h\"\n#include \"cf2hints.h\"\n#include \"cf2intrp.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cf2hints\n\n\n  typedef struct  CF2_HintMoveRec_\n  {\n    size_t     j;          /* index of upper hint map edge   */\n    CF2_Fixed  moveUp;     /* adjustment to optimum position */\n\n  } CF2_HintMoveRec, *CF2_HintMove;\n\n\n  /* Compute angular momentum for winding order detection.  It is called */\n  /* for all lines and curves, but not necessarily in element order.     */\n  static CF2_Int\n  cf2_getWindingMomentum( CF2_Fixed  x1,\n                          CF2_Fixed  y1,\n                          CF2_Fixed  x2,\n                          CF2_Fixed  y2 )\n  {\n    /* cross product of pt1 position from origin with pt2 position from  */\n    /* pt1; we reduce the precision so that the result fits into 32 bits */\n\n    return ( x1 >> 16 ) * ( ( y2 - y1 ) >> 16 ) -\n           ( y1 >> 16 ) * ( ( x2 - x1 ) >> 16 );\n  }\n\n\n  /*\n   * Construct from a StemHint; this is used as a parameter to\n   * `cf2_blues_capture'.\n   * `hintOrigin' is the character space displacement of a seac accent.\n   * Adjust stem hint for darkening here.\n   *\n   */\n  static void\n  cf2_hint_init( CF2_Hint            hint,\n                 const CF2_ArrStack  stemHintArray,\n                 size_t              indexStemHint,\n                 const CF2_Font      font,\n                 CF2_Fixed           hintOrigin,\n                 CF2_Fixed           scale,\n                 FT_Bool             bottom )\n  {\n    CF2_Fixed               width;\n    const CF2_StemHintRec*  stemHint;\n\n\n    FT_ZERO( hint );\n\n    stemHint = (const CF2_StemHintRec*)cf2_arrstack_getPointer(\n                                         stemHintArray,\n                                         indexStemHint );\n\n    width = stemHint->max - stemHint->min;\n\n    if ( width == cf2_intToFixed( -21 ) )\n    {\n      /* ghost bottom */\n\n      if ( bottom )\n      {\n        hint->csCoord = stemHint->max;\n        hint->flags   = CF2_GhostBottom;\n      }\n      else\n        hint->flags = 0;\n    }\n\n    else if ( width == cf2_intToFixed( -20 ) )\n    {\n      /* ghost top */\n\n      if ( bottom )\n        hint->flags = 0;\n      else\n      {\n        hint->csCoord = stemHint->min;\n        hint->flags   = CF2_GhostTop;\n      }\n    }\n\n    else if ( width < 0 )\n    {\n      /* inverted pair */\n\n      /*\n       * Hints with negative widths were produced by an early version of a\n       * non-Adobe font tool.  The Type 2 spec allows edge (ghost) hints\n       * with negative widths, but says\n       *\n       *   All other negative widths have undefined meaning.\n       *\n       * CoolType has a silent workaround that negates the hint width; for\n       * permissive mode, we do the same here.\n       *\n       * Note: Such fonts cannot use ghost hints, but should otherwise work.\n       * Note: Some poor hints in our faux fonts can produce negative\n       *       widths at some blends.  For example, see a light weight of\n       *       `u' in ASerifMM.\n       *\n       */\n      if ( bottom )\n      {\n        hint->csCoord = stemHint->max;\n        hint->flags   = CF2_PairBottom;\n      }\n      else\n      {\n        hint->csCoord = stemHint->min;\n        hint->flags   = CF2_PairTop;\n      }\n    }\n\n    else\n    {\n      /* normal pair */\n\n      if ( bottom )\n      {\n        hint->csCoord = stemHint->min;\n        hint->flags   = CF2_PairBottom;\n      }\n      else\n      {\n        hint->csCoord = stemHint->max;\n        hint->flags   = CF2_PairTop;\n      }\n    }\n\n    /* Now that ghost hints have been detected, adjust this edge for      */\n    /* darkening.  Bottoms are not changed; tops are incremented by twice */\n    /* `darkenY'.                                                         */\n    if ( cf2_hint_isTop( hint ) )\n      hint->csCoord += 2 * font->darkenY;\n\n    hint->csCoord += hintOrigin;\n    hint->scale    = scale;\n    hint->index    = indexStemHint;   /* index in original stem hint array */\n\n    /* if original stem hint has been used, use the same position */\n    if ( hint->flags != 0 && stemHint->used )\n    {\n      if ( cf2_hint_isTop( hint ) )\n        hint->dsCoord = stemHint->maxDS;\n      else\n        hint->dsCoord = stemHint->minDS;\n\n      cf2_hint_lock( hint );\n    }\n    else\n      hint->dsCoord = FT_MulFix( hint->csCoord, scale );\n  }\n\n\n  /* initialize an invalid hint map element */\n  static void\n  cf2_hint_initZero( CF2_Hint  hint )\n  {\n    FT_ZERO( hint );\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  cf2_hint_isValid( const CF2_Hint  hint )\n  {\n    return (FT_Bool)( hint->flags != 0 );\n  }\n\n\n  static FT_Bool\n  cf2_hint_isPair( const CF2_Hint  hint )\n  {\n    return (FT_Bool)( ( hint->flags                      &\n                        ( CF2_PairBottom | CF2_PairTop ) ) != 0 );\n  }\n\n\n  static FT_Bool\n  cf2_hint_isPairTop( const CF2_Hint  hint )\n  {\n    return (FT_Bool)( ( hint->flags & CF2_PairTop ) != 0 );\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  cf2_hint_isTop( const CF2_Hint  hint )\n  {\n    return (FT_Bool)( ( hint->flags                    &\n                        ( CF2_PairTop | CF2_GhostTop ) ) != 0 );\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  cf2_hint_isBottom( const CF2_Hint  hint )\n  {\n    return (FT_Bool)( ( hint->flags                          &\n                        ( CF2_PairBottom | CF2_GhostBottom ) ) != 0 );\n  }\n\n\n  static FT_Bool\n  cf2_hint_isLocked( const CF2_Hint  hint )\n  {\n    return (FT_Bool)( ( hint->flags & CF2_Locked ) != 0 );\n  }\n\n\n  static FT_Bool\n  cf2_hint_isSynthetic( const CF2_Hint  hint )\n  {\n    return (FT_Bool)( ( hint->flags & CF2_Synthetic ) != 0 );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_hint_lock( CF2_Hint  hint )\n  {\n    hint->flags |= CF2_Locked;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_hintmap_init( CF2_HintMap   hintmap,\n                    CF2_Font      font,\n                    CF2_HintMap   initialMap,\n                    CF2_ArrStack  hintMoves,\n                    CF2_Fixed     scale )\n  {\n    FT_ZERO( hintmap );\n\n    /* copy parameters from font instance */\n    hintmap->hinted         = font->hinted;\n    hintmap->scale          = scale;\n    hintmap->font           = font;\n    hintmap->initialHintMap = initialMap;\n    /* will clear in `cf2_hintmap_adjustHints' */\n    hintmap->hintMoves      = hintMoves;\n  }\n\n\n  static FT_Bool\n  cf2_hintmap_isValid( const CF2_HintMap  hintmap )\n  {\n    return hintmap->isValid;\n  }\n\n\n  /* transform character space coordinate to device space using hint map */\n  static CF2_Fixed\n  cf2_hintmap_map( CF2_HintMap  hintmap,\n                   CF2_Fixed    csCoord )\n  {\n    if ( hintmap->count == 0 || ! hintmap->hinted )\n    {\n      /* there are no hints; use uniform scale and zero offset */\n      return FT_MulFix( csCoord, hintmap->scale );\n    }\n    else\n    {\n      /* start linear search from last hit */\n      CF2_UInt  i = hintmap->lastIndex;\n\n      FT_ASSERT( hintmap->lastIndex < CF2_MAX_HINT_EDGES );\n\n      /* search up */\n      while ( i < hintmap->count - 1                  &&\n              csCoord >= hintmap->edge[i + 1].csCoord )\n        i += 1;\n\n      /* search down */\n      while ( i > 0 && csCoord < hintmap->edge[i].csCoord )\n        i -= 1;\n\n      hintmap->lastIndex = i;\n\n      if ( i == 0 && csCoord < hintmap->edge[0].csCoord )\n      {\n        /* special case for points below first edge: use uniform scale */\n        return FT_MulFix( csCoord - hintmap->edge[0].csCoord,\n                          hintmap->scale ) +\n                 hintmap->edge[0].dsCoord;\n      }\n      else\n      {\n        /*\n         * Note: entries with duplicate csCoord are allowed.\n         * Use edge[i], the highest entry where csCoord >= entry[i].csCoord\n         */\n        return FT_MulFix( csCoord - hintmap->edge[i].csCoord,\n                          hintmap->edge[i].scale ) +\n                 hintmap->edge[i].dsCoord;\n      }\n    }\n  }\n\n\n  /*\n   * This hinting policy moves a hint pair in device space so that one of\n   * its two edges is on a device pixel boundary (its fractional part is\n   * zero).  `cf2_hintmap_insertHint' guarantees no overlap in CS\n   * space.  Ensure here that there is no overlap in DS.\n   *\n   * In the first pass, edges are adjusted relative to adjacent hints.\n   * Those that are below have already been adjusted.  Those that are\n   * above have not yet been adjusted.  If a hint above blocks an\n   * adjustment to an optimal position, we will try again in a second\n   * pass.  The second pass is top-down.\n   *\n   */\n\n  static void\n  cf2_hintmap_adjustHints( CF2_HintMap  hintmap )\n  {\n    size_t  i, j;\n\n\n    cf2_arrstack_clear( hintmap->hintMoves );      /* working storage */\n\n    /*\n     * First pass is bottom-up (font hint order) without look-ahead.\n     * Locked edges are already adjusted.\n     * Unlocked edges begin with dsCoord from `initialHintMap'.\n     * Save edges that are not optimally adjusted in `hintMoves' array,\n     * and process them in second pass.\n     */\n\n    for ( i = 0; i < hintmap->count; i++ )\n    {\n      FT_Bool  isPair = cf2_hint_isPair( &hintmap->edge[i] );\n\n\n      /* index of upper edge (same value for ghost hint) */\n      j = isPair ? i + 1 : i;\n\n      FT_ASSERT( j < hintmap->count );\n      FT_ASSERT( cf2_hint_isValid( &hintmap->edge[i] ) );\n      FT_ASSERT( cf2_hint_isValid( &hintmap->edge[j] ) );\n      FT_ASSERT( cf2_hint_isLocked( &hintmap->edge[i] ) ==\n                   cf2_hint_isLocked( &hintmap->edge[j] ) );\n\n      if ( !cf2_hint_isLocked( &hintmap->edge[i] ) )\n      {\n        /* hint edge is not locked, we can adjust it */\n        CF2_Fixed  fracDown = cf2_fixedFraction( hintmap->edge[i].dsCoord );\n        CF2_Fixed  fracUp   = cf2_fixedFraction( hintmap->edge[j].dsCoord );\n\n        /* calculate all four possibilities; moves down are negative */\n        CF2_Fixed  downMoveDown = 0 - fracDown;\n        CF2_Fixed  upMoveDown   = 0 - fracUp;\n        CF2_Fixed  downMoveUp   = fracDown == 0\n                                    ? 0\n                                    : cf2_intToFixed( 1 ) - fracDown;\n        CF2_Fixed  upMoveUp     = fracUp == 0\n                                    ? 0\n                                    : cf2_intToFixed( 1 ) - fracUp;\n\n        /* smallest move up */\n        CF2_Fixed  moveUp   = FT_MIN( downMoveUp, upMoveUp );\n        /* smallest move down */\n        CF2_Fixed  moveDown = FT_MAX( downMoveDown, upMoveDown );\n\n        /* final amount to move edge or edge pair */\n        CF2_Fixed  move;\n\n        CF2_Fixed  downMinCounter = CF2_MIN_COUNTER;\n        CF2_Fixed  upMinCounter   = CF2_MIN_COUNTER;\n        FT_Bool    saveEdge       = FALSE;\n\n\n        /* minimum counter constraint doesn't apply when adjacent edges */\n        /* are synthetic                                                */\n        /* TODO: doesn't seem a big effect; for now, reduce the code    */\n#if 0\n        if ( i == 0                                        ||\n             cf2_hint_isSynthetic( &hintmap->edge[i - 1] ) )\n          downMinCounter = 0;\n\n        if ( j >= hintmap->count - 1                       ||\n             cf2_hint_isSynthetic( &hintmap->edge[j + 1] ) )\n          upMinCounter = 0;\n#endif\n\n        /* is there room to move up?                                    */\n        /* there is if we are at top of array or the next edge is at or */\n        /* beyond proposed move up?                                     */\n        if ( j >= hintmap->count - 1                            ||\n             hintmap->edge[j + 1].dsCoord >=\n               hintmap->edge[j].dsCoord + moveUp + upMinCounter )\n        {\n          /* there is room to move up; is there also room to move down? */\n          if ( i == 0                                                 ||\n               hintmap->edge[i - 1].dsCoord <=\n                 hintmap->edge[i].dsCoord + moveDown - downMinCounter )\n          {\n            /* move smaller absolute amount */\n            move = ( -moveDown < moveUp ) ? moveDown : moveUp;  /* optimum */\n          }\n          else\n            move = moveUp;\n        }\n        else\n        {\n          /* is there room to move down? */\n          if ( i == 0                                                 ||\n               hintmap->edge[i - 1].dsCoord <=\n                 hintmap->edge[i].dsCoord + moveDown - downMinCounter )\n          {\n            move     = moveDown;\n            /* true if non-optimum move */\n            saveEdge = (FT_Bool)( moveUp < -moveDown );\n          }\n          else\n          {\n            /* no room to move either way without overlapping or reducing */\n            /* the counter too much                                       */\n            move     = 0;\n            saveEdge = TRUE;\n          }\n        }\n\n        /* Identify non-moves and moves down that aren't optimal, and save */\n        /* them for second pass.                                           */\n        /* Do this only if there is an unlocked edge above (which could    */\n        /* possibly move).                                                 */\n        if ( saveEdge                                    &&\n             j < hintmap->count - 1                      &&\n             !cf2_hint_isLocked( &hintmap->edge[j + 1] ) )\n        {\n          CF2_HintMoveRec  savedMove;\n\n\n          savedMove.j      = j;\n          /* desired adjustment in second pass */\n          savedMove.moveUp = moveUp - move;\n\n          cf2_arrstack_push( hintmap->hintMoves, &savedMove );\n        }\n\n        /* move the edge(s) */\n        hintmap->edge[i].dsCoord += move;\n        if ( isPair )\n          hintmap->edge[j].dsCoord += move;\n      }\n\n      /* assert there are no overlaps in device space */\n      FT_ASSERT( i == 0                                                   ||\n                 hintmap->edge[i - 1].dsCoord <= hintmap->edge[i].dsCoord );\n      FT_ASSERT( i < j                                                ||\n                 hintmap->edge[i].dsCoord <= hintmap->edge[j].dsCoord );\n\n      /* adjust the scales, avoiding divide by zero */\n      if ( i > 0 )\n      {\n        if ( hintmap->edge[i].csCoord != hintmap->edge[i - 1].csCoord )\n          hintmap->edge[i - 1].scale =\n            FT_DivFix(\n              hintmap->edge[i].dsCoord - hintmap->edge[i - 1].dsCoord,\n              hintmap->edge[i].csCoord - hintmap->edge[i - 1].csCoord );\n      }\n\n      if ( isPair )\n      {\n        if ( hintmap->edge[j].csCoord != hintmap->edge[j - 1].csCoord )\n          hintmap->edge[j - 1].scale =\n            FT_DivFix(\n              hintmap->edge[j].dsCoord - hintmap->edge[j - 1].dsCoord,\n              hintmap->edge[j].csCoord - hintmap->edge[j - 1].csCoord );\n\n        i += 1;     /* skip upper edge on next loop */\n      }\n    }\n\n    /* second pass tries to move non-optimal hints up, in case there is */\n    /* room now                                                         */\n    for ( i = cf2_arrstack_size( hintmap->hintMoves ); i > 0; i-- )\n    {\n      CF2_HintMove  hintMove = (CF2_HintMove)\n                      cf2_arrstack_getPointer( hintmap->hintMoves, i - 1 );\n\n\n      j = hintMove->j;\n\n      /* this was tested before the push, above */\n      FT_ASSERT( j < hintmap->count - 1 );\n\n      /* is there room to move up? */\n      if ( hintmap->edge[j + 1].dsCoord >=\n             hintmap->edge[j].dsCoord + hintMove->moveUp + CF2_MIN_COUNTER )\n      {\n        /* there is more room now, move edge up */\n        hintmap->edge[j].dsCoord += hintMove->moveUp;\n\n        if ( cf2_hint_isPair( &hintmap->edge[j] ) )\n        {\n          FT_ASSERT( j > 0 );\n          hintmap->edge[j - 1].dsCoord += hintMove->moveUp;\n        }\n      }\n    }\n  }\n\n\n  /* insert hint edges into map, sorted by csCoord */\n  static void\n  cf2_hintmap_insertHint( CF2_HintMap  hintmap,\n                          CF2_Hint     bottomHintEdge,\n                          CF2_Hint     topHintEdge )\n  {\n    CF2_UInt  indexInsert;\n\n    /* set default values, then check for edge hints */\n    FT_Bool   isPair         = TRUE;\n    CF2_Hint  firstHintEdge  = bottomHintEdge;\n    CF2_Hint  secondHintEdge = topHintEdge;\n\n\n    /* one or none of the input params may be invalid when dealing with */\n    /* edge hints; at least one edge must be valid                      */\n    FT_ASSERT( cf2_hint_isValid( bottomHintEdge ) ||\n               cf2_hint_isValid( topHintEdge )    );\n\n    /* determine how many and which edges to insert */\n    if ( !cf2_hint_isValid( bottomHintEdge ) )\n    {\n      /* insert only the top edge */\n      firstHintEdge = topHintEdge;\n      isPair        = FALSE;\n    }\n    else if ( !cf2_hint_isValid( topHintEdge ) )\n    {\n      /* insert only the bottom edge */\n      isPair = FALSE;\n    }\n\n    /* paired edges must be in proper order */\n    FT_ASSERT( !isPair                                         ||\n               topHintEdge->csCoord >= bottomHintEdge->csCoord );\n\n    /* linear search to find index value of insertion point */\n    indexInsert = 0;\n    for ( ; indexInsert < hintmap->count; indexInsert++ )\n    {\n      if ( hintmap->edge[indexInsert].csCoord >= firstHintEdge->csCoord )\n        break;\n    }\n\n    /*\n     * Discard any hints that overlap in character space.  Most often, this\n     * is while building the initial map, where captured hints from all\n     * zones are combined.  Define overlap to include hints that `touch'\n     * (overlap zero).  Hiragino Sans/Gothic fonts have numerous hints that\n     * touch.  Some fonts have non-ideographic glyphs that overlap our\n     * synthetic hints.\n     *\n     * Overlap also occurs when darkening stem hints that are close.\n     *\n     */\n    if ( indexInsert < hintmap->count )\n    {\n      /* we are inserting before an existing edge:    */\n      /* verify that an existing edge is not the same */\n      if ( hintmap->edge[indexInsert].csCoord == firstHintEdge->csCoord )\n        return; /* ignore overlapping stem hint */\n\n      /* verify that a new pair does not straddle the next edge */\n      if ( isPair                                                        &&\n           hintmap->edge[indexInsert].csCoord <= secondHintEdge->csCoord )\n        return; /* ignore overlapping stem hint */\n\n      /* verify that we are not inserting between paired edges */\n      if ( cf2_hint_isPairTop( &hintmap->edge[indexInsert] ) )\n        return; /* ignore overlapping stem hint */\n    }\n\n    /* recompute device space locations using initial hint map */\n    if ( cf2_hintmap_isValid( hintmap->initialHintMap ) &&\n         !cf2_hint_isLocked( firstHintEdge )            )\n    {\n      if ( isPair )\n      {\n        /* Use hint map to position the center of stem, and nominal scale */\n        /* to position the two edges.  This preserves the stem width.     */\n        CF2_Fixed  midpoint  = cf2_hintmap_map(\n                                 hintmap->initialHintMap,\n                                 ( secondHintEdge->csCoord +\n                                   firstHintEdge->csCoord ) / 2 );\n        CF2_Fixed  halfWidth = FT_MulFix(\n                                 ( secondHintEdge->csCoord -\n                                   firstHintEdge->csCoord ) / 2,\n                                 hintmap->scale );\n\n\n        firstHintEdge->dsCoord  = midpoint - halfWidth;\n        secondHintEdge->dsCoord = midpoint + halfWidth;\n      }\n      else\n        firstHintEdge->dsCoord = cf2_hintmap_map( hintmap->initialHintMap,\n                                                  firstHintEdge->csCoord );\n    }\n\n    /*\n     * Discard any hints that overlap in device space; this can occur\n     * because locked hints have been moved to align with blue zones.\n     *\n     * TODO: Although we might correct this later during adjustment, we\n     * don't currently have a way to delete a conflicting hint once it has\n     * been inserted.  See v2.030 MinionPro-Regular, 12 ppem darkened,\n     * initial hint map for second path, glyph 945 (the perispomeni (tilde)\n     * in U+1F6E, Greek omega with psili and perispomeni).  Darkening is\n     * 25.  Pair 667,747 initially conflicts in design space with top edge\n     * 660.  This is because 667 maps to 7.87, and the top edge was\n     * captured by a zone at 8.0.  The pair is later successfully inserted\n     * in a zone without the top edge.  In this zone it is adjusted to 8.0,\n     * and no longer conflicts with the top edge in design space.  This\n     * means it can be included in yet a later zone which does have the top\n     * edge hint.  This produces a small mismatch between the first and\n     * last points of this path, even though the hint masks are the same.\n     * The density map difference is tiny (1/256).\n     *\n     */\n\n    if ( indexInsert > 0 )\n    {\n      /* we are inserting after an existing edge */\n      if ( firstHintEdge->dsCoord < hintmap->edge[indexInsert - 1].dsCoord )\n        return;\n    }\n\n    if ( indexInsert < hintmap->count )\n    {\n      /* we are inserting before an existing edge */\n      if ( isPair )\n      {\n        if ( secondHintEdge->dsCoord > hintmap->edge[indexInsert].dsCoord )\n          return;\n      }\n      else\n      {\n        if ( firstHintEdge->dsCoord > hintmap->edge[indexInsert].dsCoord )\n          return;\n      }\n    }\n\n    /* make room to insert */\n    {\n      CF2_Int  iSrc = hintmap->count - 1;\n      CF2_Int  iDst = isPair ? hintmap->count + 1 : hintmap->count;\n\n      CF2_Int  count = hintmap->count - indexInsert;\n\n\n      if ( iDst >= CF2_MAX_HINT_EDGES )\n      {\n        FT_TRACE4(( \"cf2_hintmap_insertHint: too many hintmaps\\n\" ));\n        return;\n      }\n\n      while ( count-- )\n        hintmap->edge[iDst--] = hintmap->edge[iSrc--];\n\n      /* insert first edge */\n      hintmap->edge[indexInsert] = *firstHintEdge;         /* copy struct */\n      hintmap->count += 1;\n\n      if ( isPair )\n      {\n        /* insert second edge */\n        hintmap->edge[indexInsert + 1] = *secondHintEdge;  /* copy struct */\n        hintmap->count                += 1;\n      }\n    }\n\n    return;\n  }\n\n\n  /*\n   * Build a map from hints and mask.\n   *\n   * This function may recur one level if `hintmap->initialHintMap' is not yet\n   * valid.\n   * If `initialMap' is true, simply build initial map.\n   *\n   * Synthetic hints are used in two ways.  A hint at zero is inserted, if\n   * needed, in the initial hint map, to prevent translations from\n   * propagating across the origin.  If synthetic em box hints are enabled\n   * for ideographic dictionaries, then they are inserted in all hint\n   * maps, including the initial one.\n   *\n   */\n  FT_LOCAL_DEF( void )\n  cf2_hintmap_build( CF2_HintMap   hintmap,\n                     CF2_ArrStack  hStemHintArray,\n                     CF2_ArrStack  vStemHintArray,\n                     CF2_HintMask  hintMask,\n                     CF2_Fixed     hintOrigin,\n                     FT_Bool       initialMap )\n  {\n    FT_Byte*  maskPtr;\n\n    CF2_Font         font = hintmap->font;\n    CF2_HintMaskRec  tempHintMask;\n\n    size_t   bitCount, i;\n    FT_Byte  maskByte;\n\n\n    /* check whether initial map is constructed */\n    if ( !initialMap && !cf2_hintmap_isValid( hintmap->initialHintMap ) )\n    {\n      /* make recursive call with initialHintMap and temporary mask; */\n      /* temporary mask will get all bits set, below */\n      cf2_hintmask_init( &tempHintMask, hintMask->error );\n      cf2_hintmap_build( hintmap->initialHintMap,\n                         hStemHintArray,\n                         vStemHintArray,\n                         &tempHintMask,\n                         hintOrigin,\n                         TRUE );\n    }\n\n    if ( !cf2_hintmask_isValid( hintMask ) )\n    {\n      /* without a hint mask, assume all hints are active */\n      cf2_hintmask_setAll( hintMask,\n                           cf2_arrstack_size( hStemHintArray ) +\n                             cf2_arrstack_size( vStemHintArray ) );\n      if ( !cf2_hintmask_isValid( hintMask ) )\n          return;                   /* too many stem hints */\n    }\n\n    /* begin by clearing the map */\n    hintmap->count     = 0;\n    hintmap->lastIndex = 0;\n\n    /* make a copy of the hint mask so we can modify it */\n    tempHintMask = *hintMask;\n    maskPtr      = cf2_hintmask_getMaskPtr( &tempHintMask );\n\n    /* use the hStem hints only, which are first in the mask */\n    bitCount = cf2_arrstack_size( hStemHintArray );\n\n    /* Defense-in-depth.  Should never return here. */\n    if ( bitCount > hintMask->bitCount )\n        return;\n\n    /* synthetic embox hints get highest priority */\n    if ( font->blues.doEmBoxHints )\n    {\n      CF2_HintRec  dummy;\n\n\n      cf2_hint_initZero( &dummy );   /* invalid hint map element */\n\n      /* ghost bottom */\n      cf2_hintmap_insertHint( hintmap,\n                              &font->blues.emBoxBottomEdge,\n                              &dummy );\n      /* ghost top */\n      cf2_hintmap_insertHint( hintmap,\n                              &dummy,\n                              &font->blues.emBoxTopEdge );\n    }\n\n    /* insert hints captured by a blue zone or already locked (higher */\n    /* priority)                                                      */\n    for ( i = 0, maskByte = 0x80; i < bitCount; i++ )\n    {\n      if ( maskByte & *maskPtr )\n      {\n        /* expand StemHint into two `CF2_Hint' elements */\n        CF2_HintRec  bottomHintEdge, topHintEdge;\n\n\n        cf2_hint_init( &bottomHintEdge,\n                       hStemHintArray,\n                       i,\n                       font,\n                       hintOrigin,\n                       hintmap->scale,\n                       TRUE /* bottom */ );\n        cf2_hint_init( &topHintEdge,\n                       hStemHintArray,\n                       i,\n                       font,\n                       hintOrigin,\n                       hintmap->scale,\n                       FALSE /* top */ );\n\n        if ( cf2_hint_isLocked( &bottomHintEdge ) ||\n             cf2_hint_isLocked( &topHintEdge )    ||\n             cf2_blues_capture( &font->blues,\n                                &bottomHintEdge,\n                                &topHintEdge )   )\n        {\n          /* insert captured hint into map */\n          cf2_hintmap_insertHint( hintmap, &bottomHintEdge, &topHintEdge );\n\n          *maskPtr &= ~maskByte;      /* turn off the bit for this hint */\n        }\n      }\n\n      if ( ( i & 7 ) == 7 )\n      {\n        /* move to next mask byte */\n        maskPtr++;\n        maskByte = 0x80;\n      }\n      else\n        maskByte >>= 1;\n    }\n\n    /* initial hint map includes only captured hints plus maybe one at 0 */\n\n    /*\n     * TODO: There is a problem here because we are trying to build a\n     *       single hint map containing all captured hints.  It is\n     *       possible for there to be conflicts between captured hints,\n     *       either because of darkening or because the hints are in\n     *       separate hint zones (we are ignoring hint zones for the\n     *       initial map).  An example of the latter is MinionPro-Regular\n     *       v2.030 glyph 883 (Greek Capital Alpha with Psili) at 15ppem.\n     *       A stem hint for the psili conflicts with the top edge hint\n     *       for the base character.  The stem hint gets priority because\n     *       of its sort order.  In glyph 884 (Greek Capital Alpha with\n     *       Psili and Oxia), the top of the base character gets a stem\n     *       hint, and the psili does not.  This creates different initial\n     *       maps for the two glyphs resulting in different renderings of\n     *       the base character.  Will probably defer this either as not\n     *       worth the cost or as a font bug.  I don't think there is any\n     *       good reason for an accent to be captured by an alignment\n     *       zone.  -darnold 2/12/10\n     */\n\n    if ( initialMap )\n    {\n      /* Apply a heuristic that inserts a point for (0,0), unless it's     */\n      /* already covered by a mapping.  This locks the baseline for glyphs */\n      /* that have no baseline hints.                                      */\n\n      if ( hintmap->count == 0                           ||\n           hintmap->edge[0].csCoord > 0                  ||\n           hintmap->edge[hintmap->count - 1].csCoord < 0 )\n      {\n        /* all edges are above 0 or all edges are below 0; */\n        /* construct a locked edge hint at 0               */\n\n        CF2_HintRec  edge, invalid;\n\n\n        cf2_hint_initZero( &edge );\n\n        edge.flags = CF2_GhostBottom |\n                     CF2_Locked      |\n                     CF2_Synthetic;\n        edge.scale = hintmap->scale;\n\n        cf2_hint_initZero( &invalid );\n        cf2_hintmap_insertHint( hintmap, &edge, &invalid );\n      }\n    }\n    else\n    {\n      /* insert remaining hints */\n\n      maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask );\n\n      for ( i = 0, maskByte = 0x80; i < bitCount; i++ )\n      {\n        if ( maskByte & *maskPtr )\n        {\n          CF2_HintRec  bottomHintEdge, topHintEdge;\n\n\n          cf2_hint_init( &bottomHintEdge,\n                         hStemHintArray,\n                         i,\n                         font,\n                         hintOrigin,\n                         hintmap->scale,\n                         TRUE /* bottom */ );\n          cf2_hint_init( &topHintEdge,\n                         hStemHintArray,\n                         i,\n                         font,\n                         hintOrigin,\n                         hintmap->scale,\n                         FALSE /* top */ );\n\n          cf2_hintmap_insertHint( hintmap, &bottomHintEdge, &topHintEdge );\n        }\n\n        if ( ( i & 7 ) == 7 )\n        {\n          /* move to next mask byte */\n          maskPtr++;\n          maskByte = 0x80;\n        }\n        else\n          maskByte >>= 1;\n      }\n    }\n\n    /*\n     * Note: The following line is a convenient place to break when\n     *       debugging hinting.  Examine `hintmap->edge' for the list of\n     *       enabled hints, then step over the call to see the effect of\n     *       adjustment.  We stop here first on the recursive call that\n     *       creates the initial map, and then on each counter group and\n     *       hint zone.\n     */\n\n    /* adjust positions of hint edges that are not locked to blue zones */\n    cf2_hintmap_adjustHints( hintmap );\n\n    /* save the position of all hints that were used in this hint map; */\n    /* if we use them again, we'll locate them in the same position    */\n    if ( !initialMap )\n    {\n      for ( i = 0; i < hintmap->count; i++ )\n      {\n        if ( !cf2_hint_isSynthetic( &hintmap->edge[i] ) )\n        {\n          /* Note: include both valid and invalid edges            */\n          /* Note: top and bottom edges are copied back separately */\n          CF2_StemHint  stemhint = (CF2_StemHint)\n                          cf2_arrstack_getPointer( hStemHintArray,\n                                                   hintmap->edge[i].index );\n\n\n          if ( cf2_hint_isTop( &hintmap->edge[i] ) )\n            stemhint->maxDS = hintmap->edge[i].dsCoord;\n          else\n            stemhint->minDS = hintmap->edge[i].dsCoord;\n\n          stemhint->used = TRUE;\n        }\n      }\n    }\n\n    /* hint map is ready to use */\n    hintmap->isValid = TRUE;\n\n    /* remember this mask has been used */\n    cf2_hintmask_setNew( hintMask, FALSE );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_glyphpath_init( CF2_GlyphPath         glyphpath,\n                      CF2_Font              font,\n                      CF2_OutlineCallbacks  callbacks,\n                      CF2_Fixed             scaleY,\n                      /* CF2_Fixed  hShift, */\n                      CF2_ArrStack          hStemHintArray,\n                      CF2_ArrStack          vStemHintArray,\n                      CF2_HintMask          hintMask,\n                      CF2_Fixed             hintOriginY,\n                      const CF2_Blues       blues,\n                      const FT_Vector*      fractionalTranslation )\n  {\n    FT_ZERO( glyphpath );\n\n    glyphpath->font      = font;\n    glyphpath->callbacks = callbacks;\n\n    cf2_arrstack_init( &glyphpath->hintMoves,\n                       font->memory,\n                       &font->error,\n                       sizeof ( CF2_HintMoveRec ) );\n\n    cf2_hintmap_init( &glyphpath->initialHintMap,\n                      font,\n                      &glyphpath->initialHintMap,\n                      &glyphpath->hintMoves,\n                      scaleY );\n    cf2_hintmap_init( &glyphpath->firstHintMap,\n                      font,\n                      &glyphpath->initialHintMap,\n                      &glyphpath->hintMoves,\n                      scaleY );\n    cf2_hintmap_init( &glyphpath->hintMap,\n                      font,\n                      &glyphpath->initialHintMap,\n                      &glyphpath->hintMoves,\n                      scaleY );\n\n    glyphpath->scaleX = font->innerTransform.a;\n    glyphpath->scaleC = font->innerTransform.c;\n    glyphpath->scaleY = font->innerTransform.d;\n\n    glyphpath->fractionalTranslation = *fractionalTranslation;\n\n#if 0\n    glyphpath->hShift = hShift;       /* for fauxing */\n#endif\n\n    glyphpath->hStemHintArray = hStemHintArray;\n    glyphpath->vStemHintArray = vStemHintArray;\n    glyphpath->hintMask       = hintMask;      /* ptr to current mask */\n    glyphpath->hintOriginY    = hintOriginY;\n    glyphpath->blues          = blues;\n    glyphpath->darken         = font->darkened; /* TODO: should we make copies? */\n    glyphpath->xOffset        = font->darkenX;\n    glyphpath->yOffset        = font->darkenY;\n    glyphpath->miterLimit     = 2 * FT_MAX(\n                                     cf2_fixedAbs( glyphpath->xOffset ),\n                                     cf2_fixedAbs( glyphpath->yOffset ) );\n\n    /* .1 character space unit */\n    glyphpath->snapThreshold = cf2_floatToFixed( 0.1f );\n\n    glyphpath->moveIsPending = TRUE;\n    glyphpath->pathIsOpen    = FALSE;\n    glyphpath->pathIsClosing = FALSE;\n    glyphpath->elemIsQueued  = FALSE;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_glyphpath_finalize( CF2_GlyphPath  glyphpath )\n  {\n    cf2_arrstack_finalize( &glyphpath->hintMoves );\n  }\n\n\n  /*\n   * Hint point in y-direction and apply outerTransform.\n   * Input `current' hint map (which is actually delayed by one element).\n   * Input x,y point in Character Space.\n   * Output x,y point in Device Space, including translation.\n   */\n  static void\n  cf2_glyphpath_hintPoint( CF2_GlyphPath  glyphpath,\n                           CF2_HintMap    hintmap,\n                           FT_Vector*     ppt,\n                           CF2_Fixed      x,\n                           CF2_Fixed      y )\n  {\n    FT_Vector  pt;   /* hinted point in upright DS */\n\n\n    pt.x = FT_MulFix( glyphpath->scaleX, x ) +\n             FT_MulFix( glyphpath->scaleC, y );\n    pt.y = cf2_hintmap_map( hintmap, y );\n\n    ppt->x = FT_MulFix( glyphpath->font->outerTransform.a, pt.x )   +\n               FT_MulFix( glyphpath->font->outerTransform.c, pt.y ) +\n               glyphpath->fractionalTranslation.x;\n    ppt->y = FT_MulFix( glyphpath->font->outerTransform.b, pt.x )   +\n               FT_MulFix( glyphpath->font->outerTransform.d, pt.y ) +\n               glyphpath->fractionalTranslation.y;\n  }\n\n\n  /*\n   * From two line segments, (u1,u2) and (v1,v2), compute a point of\n   * intersection on the corresponding lines.\n   * Return false if no intersection is found, or if the intersection is\n   * too far away from the ends of the line segments, u2 and v1.\n   *\n   */\n  static FT_Bool\n  cf2_glyphpath_computeIntersection( CF2_GlyphPath     glyphpath,\n                                     const FT_Vector*  u1,\n                                     const FT_Vector*  u2,\n                                     const FT_Vector*  v1,\n                                     const FT_Vector*  v2,\n                                     FT_Vector*        intersection )\n  {\n    /*\n     * Let `u' be a zero-based vector from the first segment, `v' from the\n     * second segment.\n     * Let `w 'be the zero-based vector from `u1' to `v1'.\n     * `perp' is the `perpendicular dot product'; see\n     * http://mathworld.wolfram.com/PerpDotProduct.html.\n     * `s' is the parameter for the parametric line for the first segment\n     * (`u').\n     *\n     * See notation in\n     * http://softsurfer.com/Archive/algorithm_0104/algorithm_0104B.htm.\n     * Calculations are done in 16.16, but must handle the squaring of\n     * line lengths in character space.  We scale all vectors by 1/32 to\n     * avoid overflow.  This allows values up to 4095 to be squared.  The\n     * scale factor cancels in the divide.\n     *\n     * TODO: the scale factor could be computed from UnitsPerEm.\n     *\n     */\n\n#define cf2_perp( a, b )                                    \\\n          ( FT_MulFix( a.x, b.y ) - FT_MulFix( a.y, b.x ) )\n\n  /* round and divide by 32 */\n#define CF2_CS_SCALE( x )         \\\n          ( ( (x) + 0x10 ) >> 5 )\n\n    FT_Vector  u, v, w;      /* scaled vectors */\n    CF2_Fixed  denominator, s;\n\n\n    u.x = CF2_CS_SCALE( u2->x - u1->x );\n    u.y = CF2_CS_SCALE( u2->y - u1->y );\n    v.x = CF2_CS_SCALE( v2->x - v1->x );\n    v.y = CF2_CS_SCALE( v2->y - v1->y );\n    w.x = CF2_CS_SCALE( v1->x - u1->x );\n    w.y = CF2_CS_SCALE( v1->y - u1->y );\n\n    denominator = cf2_perp( u, v );\n\n    if ( denominator == 0 )\n      return FALSE;           /* parallel or coincident lines */\n\n    s = FT_DivFix( cf2_perp( w, v ), denominator );\n\n    intersection->x = u1->x + FT_MulFix( s, u2->x - u1->x );\n    intersection->y = u1->y + FT_MulFix( s, u2->y - u1->y );\n\n    /*\n     * Special case snapping for horizontal and vertical lines.\n     * This cleans up intersections and reduces problems with winding\n     * order detection.\n     * Sample case is sbc cd KozGoPr6N-Medium.otf 20 16685.\n     * Note: these calculations are in character space.\n     *\n     */\n\n    if ( u1->x == u2->x                                                     &&\n         cf2_fixedAbs( intersection->x - u1->x ) < glyphpath->snapThreshold )\n      intersection->x = u1->x;\n    if ( u1->y == u2->y                                                     &&\n         cf2_fixedAbs( intersection->y - u1->y ) < glyphpath->snapThreshold )\n      intersection->y = u1->y;\n\n    if ( v1->x == v2->x                                                     &&\n         cf2_fixedAbs( intersection->x - v1->x ) < glyphpath->snapThreshold )\n      intersection->x = v1->x;\n    if ( v1->y == v2->y                                                     &&\n         cf2_fixedAbs( intersection->y - v1->y ) < glyphpath->snapThreshold )\n      intersection->y = v1->y;\n\n    /* limit the intersection distance from midpoint of u2 and v1 */\n    if ( cf2_fixedAbs( intersection->x - ( u2->x + v1->x ) / 2 ) >\n           glyphpath->miterLimit                                   ||\n         cf2_fixedAbs( intersection->y - ( u2->y + v1->y ) / 2 ) >\n           glyphpath->miterLimit                                   )\n      return FALSE;\n\n    return TRUE;\n  }\n\n\n  /*\n   * Push the cached element (glyphpath->prevElem*) to the outline\n   * consumer.  When a darkening offset is used, the end point of the\n   * cached element may be adjusted to an intersection point or we may\n   * synthesize a connecting line to the current element.  If we are\n   * closing a subpath, we may also generate a connecting line to the start\n   * point.\n   *\n   * This is where Character Space (CS) is converted to Device Space (DS)\n   * using a hint map.  This calculation must use a HintMap that was valid\n   * at the time the element was saved.  For the first point in a subpath,\n   * that is a saved HintMap.  For most elements, it just means the caller\n   * has delayed building a HintMap from the current HintMask.\n   *\n   * Transform each point with outerTransform and call the outline\n   * callbacks.  This is a general 3x3 transform:\n   *\n   *   x' = a*x + c*y + tx, y' = b*x + d*y + ty\n   *\n   * but it uses 4 elements from CF2_Font and the translation part\n   * from CF2_GlyphPath.\n   *\n   */\n  static void\n  cf2_glyphpath_pushPrevElem( CF2_GlyphPath  glyphpath,\n                              CF2_HintMap    hintmap,\n                              FT_Vector*     nextP0,\n                              FT_Vector      nextP1,\n                              FT_Bool        close )\n  {\n    CF2_CallbackParamsRec  params;\n\n    FT_Vector*  prevP0;\n    FT_Vector*  prevP1;\n\n    FT_Vector  intersection    = { 0, 0 };\n    FT_Bool    useIntersection = FALSE;\n\n\n    FT_ASSERT( glyphpath->prevElemOp == CF2_PathOpLineTo ||\n               glyphpath->prevElemOp == CF2_PathOpCubeTo );\n\n    if ( glyphpath->prevElemOp == CF2_PathOpLineTo )\n    {\n      prevP0 = &glyphpath->prevElemP0;\n      prevP1 = &glyphpath->prevElemP1;\n    }\n    else\n    {\n      prevP0 = &glyphpath->prevElemP2;\n      prevP1 = &glyphpath->prevElemP3;\n    }\n\n    /* optimization: if previous and next elements are offset by the same */\n    /* amount, then there will be no gap, and no need to compute an       */\n    /* intersection.                                                      */\n    if ( prevP1->x != nextP0->x || prevP1->y != nextP0->y )\n    {\n      /* previous element does not join next element:             */\n      /* adjust end point of previous element to the intersection */\n      useIntersection = cf2_glyphpath_computeIntersection( glyphpath,\n                                                           prevP0,\n                                                           prevP1,\n                                                           nextP0,\n                                                           &nextP1,\n                                                           &intersection );\n      if ( useIntersection )\n      {\n        /* modify the last point of the cached element (either line or */\n        /* curve)                                                      */\n        *prevP1 = intersection;\n      }\n    }\n\n    params.pt0 = glyphpath->currentDS;\n\n    switch( glyphpath->prevElemOp )\n    {\n    case CF2_PathOpLineTo:\n      params.op = CF2_PathOpLineTo;\n\n      /* note: pt2 and pt3 are unused */\n\n      if ( close )\n      {\n        /* use first hint map if closing */\n        cf2_glyphpath_hintPoint( glyphpath,\n                                 &glyphpath->firstHintMap,\n                                 &params.pt1,\n                                 glyphpath->prevElemP1.x,\n                                 glyphpath->prevElemP1.y );\n      }\n      else\n      {\n        cf2_glyphpath_hintPoint( glyphpath,\n                                 hintmap,\n                                 &params.pt1,\n                                 glyphpath->prevElemP1.x,\n                                 glyphpath->prevElemP1.y );\n      }\n\n      /* output only non-zero length lines */\n      if ( params.pt0.x != params.pt1.x || params.pt0.y != params.pt1.y )\n      {\n        glyphpath->callbacks->lineTo( glyphpath->callbacks, &params );\n\n        glyphpath->currentDS = params.pt1;\n      }\n      break;\n\n    case CF2_PathOpCubeTo:\n      params.op = CF2_PathOpCubeTo;\n\n      /* TODO: should we intersect the interior joins (p1-p2 and p2-p3)? */\n      cf2_glyphpath_hintPoint( glyphpath,\n                               hintmap,\n                               &params.pt1,\n                               glyphpath->prevElemP1.x,\n                               glyphpath->prevElemP1.y );\n      cf2_glyphpath_hintPoint( glyphpath,\n                               hintmap,\n                               &params.pt2,\n                               glyphpath->prevElemP2.x,\n                               glyphpath->prevElemP2.y );\n      cf2_glyphpath_hintPoint( glyphpath,\n                               hintmap,\n                               &params.pt3,\n                               glyphpath->prevElemP3.x,\n                               glyphpath->prevElemP3.y );\n\n      glyphpath->callbacks->cubeTo( glyphpath->callbacks, &params );\n\n      glyphpath->currentDS = params.pt3;\n\n      break;\n    }\n\n    if ( !useIntersection || close )\n    {\n      /* insert connecting line between end of previous element and start */\n      /* of current one                                                   */\n      /* note: at the end of a subpath, we might do both, so use `nextP0' */\n      /* before we change it, below                                       */\n\n      if ( close )\n      {\n        /* if we are closing the subpath, then nextP0 is in the first     */\n        /* hint zone                                                      */\n        cf2_glyphpath_hintPoint( glyphpath,\n                                 &glyphpath->firstHintMap,\n                                 &params.pt1,\n                                 nextP0->x,\n                                 nextP0->y );\n      }\n      else\n      {\n        cf2_glyphpath_hintPoint( glyphpath,\n                                 hintmap,\n                                 &params.pt1,\n                                 nextP0->x,\n                                 nextP0->y );\n      }\n\n      if ( params.pt1.x != glyphpath->currentDS.x ||\n           params.pt1.y != glyphpath->currentDS.y )\n      {\n        /* length is nonzero */\n        params.op  = CF2_PathOpLineTo;\n        params.pt0 = glyphpath->currentDS;\n\n        /* note: pt2 and pt3 are unused */\n        glyphpath->callbacks->lineTo( glyphpath->callbacks, &params );\n\n        glyphpath->currentDS = params.pt1;\n      }\n    }\n\n    if ( useIntersection )\n    {\n      /* return intersection point to caller */\n      *nextP0 = intersection;\n    }\n  }\n\n\n  /* push a MoveTo element based on current point and offset of current */\n  /* element                                                            */\n  static void\n  cf2_glyphpath_pushMove( CF2_GlyphPath  glyphpath,\n                          FT_Vector      start )\n  {\n    CF2_CallbackParamsRec  params;\n\n\n    params.op  = CF2_PathOpMoveTo;\n    params.pt0 = glyphpath->currentDS;\n\n    /* Test if move has really happened yet; it would have called */\n    /* `cf2_hintmap_build' to set `isValid'.                   */\n    if ( !cf2_hintmap_isValid( &glyphpath->hintMap ) )\n    {\n      /* we are here iff first subpath is missing a moveto operator: */\n      /* synthesize first moveTo to finish initialization of hintMap */\n      cf2_glyphpath_moveTo( glyphpath,\n                            glyphpath->start.x,\n                            glyphpath->start.y );\n    }\n\n    cf2_glyphpath_hintPoint( glyphpath,\n                             &glyphpath->hintMap,\n                             &params.pt1,\n                             start.x,\n                             start.y );\n\n    /* note: pt2 and pt3 are unused */\n    glyphpath->callbacks->moveTo( glyphpath->callbacks, &params );\n\n    glyphpath->currentDS    = params.pt1;\n    glyphpath->offsetStart0 = start;\n  }\n\n\n  /*\n   * All coordinates are in character space.\n   * On input, (x1, y1) and (x2, y2) give line segment.\n   * On output, (x, y) give offset vector.\n   * We use a piecewise approximation to trig functions.\n   *\n   * TODO: Offset true perpendicular and proper length\n   *       supply the y-translation for hinting here, too,\n   *       that adds yOffset unconditionally to *y.\n   */\n  static void\n  cf2_glyphpath_computeOffset( CF2_GlyphPath  glyphpath,\n                               CF2_Fixed      x1,\n                               CF2_Fixed      y1,\n                               CF2_Fixed      x2,\n                               CF2_Fixed      y2,\n                               CF2_Fixed*     x,\n                               CF2_Fixed*     y )\n  {\n    CF2_Fixed  dx = x2 - x1;\n    CF2_Fixed  dy = y2 - y1;\n\n\n    /* note: negative offsets don't work here; negate deltas to change */\n    /* quadrants, below                                                */\n    if ( glyphpath->font->reverseWinding )\n    {\n      dx = -dx;\n      dy = -dy;\n    }\n\n    *x = *y = 0;\n\n    if ( !glyphpath->darken )\n        return;\n\n    /* add momentum for this path element */\n    glyphpath->callbacks->windingMomentum +=\n      cf2_getWindingMomentum( x1, y1, x2, y2 );\n\n    /* note: allow mixed integer and fixed multiplication here */\n    if ( dx >= 0 )\n    {\n      if ( dy >= 0 )\n      {\n        /* first quadrant, +x +y */\n\n        if ( dx > 2 * dy )\n        {\n          /* +x */\n          *x = 0;\n          *y = 0;\n        }\n        else if ( dy > 2 * dx )\n        {\n          /* +y */\n          *x = glyphpath->xOffset;\n          *y = glyphpath->yOffset;\n        }\n        else\n        {\n          /* +x +y */\n          *x = FT_MulFix( cf2_floatToFixed( 0.7 ),\n                          glyphpath->xOffset );\n          *y = FT_MulFix( cf2_floatToFixed( 1.0 - 0.7 ),\n                          glyphpath->yOffset );\n        }\n      }\n      else\n      {\n        /* fourth quadrant, +x -y */\n\n        if ( dx > -2 * dy )\n        {\n          /* +x */\n          *x = 0;\n          *y = 0;\n        }\n        else if ( -dy > 2 * dx )\n        {\n          /* -y */\n          *x = -glyphpath->xOffset;\n          *y = glyphpath->yOffset;\n        }\n        else\n        {\n          /* +x -y */\n          *x = FT_MulFix( cf2_floatToFixed( -0.7 ),\n                          glyphpath->xOffset );\n          *y = FT_MulFix( cf2_floatToFixed( 1.0 - 0.7 ),\n                          glyphpath->yOffset );\n        }\n      }\n    }\n    else\n    {\n      if ( dy >= 0 )\n      {\n        /* second quadrant, -x +y */\n\n        if ( -dx > 2 * dy )\n        {\n          /* -x */\n          *x = 0;\n          *y = 2 * glyphpath->yOffset;\n        }\n        else if ( dy > -2 * dx )\n        {\n          /* +y */\n          *x = glyphpath->xOffset;\n          *y = glyphpath->yOffset;\n        }\n        else\n        {\n          /* -x +y */\n          *x = FT_MulFix( cf2_floatToFixed( 0.7 ),\n                          glyphpath->xOffset );\n          *y = FT_MulFix( cf2_floatToFixed( 1.0 + 0.7 ),\n                          glyphpath->yOffset );\n        }\n      }\n      else\n      {\n        /* third quadrant, -x -y */\n\n        if ( -dx > -2 * dy )\n        {\n          /* -x */\n          *x = 0;\n          *y = 2 * glyphpath->yOffset;\n        }\n        else if ( -dy > -2 * dx )\n        {\n          /* -y */\n          *x = -glyphpath->xOffset;\n          *y = glyphpath->yOffset;\n        }\n        else\n        {\n          /* -x -y */\n          *x = FT_MulFix( cf2_floatToFixed( -0.7 ),\n                          glyphpath->xOffset );\n          *y = FT_MulFix( cf2_floatToFixed( 1.0 + 0.7 ),\n                          glyphpath->yOffset );\n        }\n      }\n    }\n  }\n\n\n  /*\n   * The functions cf2_glyphpath_{moveTo,lineTo,curveTo,closeOpenPath} are\n   * called by the interpreter with Character Space (CS) coordinates.  Each\n   * path element is placed into a queue of length one to await the\n   * calculation of the following element.  At that time, the darkening\n   * offset of the following element is known and joins can be computed,\n   * including possible modification of this element, before mapping to\n   * Device Space (DS) and passing it on to the outline consumer.\n   *\n   */\n  FT_LOCAL_DEF( void )\n  cf2_glyphpath_moveTo( CF2_GlyphPath  glyphpath,\n                        CF2_Fixed      x,\n                        CF2_Fixed      y )\n  {\n    cf2_glyphpath_closeOpenPath( glyphpath );\n\n    /* save the parameters of the move for later, when we'll know how to */\n    /* offset it;                                                        */\n    /* also save last move point */\n    glyphpath->currentCS.x = glyphpath->start.x = x;\n    glyphpath->currentCS.y = glyphpath->start.y = y;\n\n    glyphpath->moveIsPending = TRUE;\n\n    /* ensure we have a valid map with current mask */\n    if ( !cf2_hintmap_isValid( &glyphpath->hintMap ) ||\n         cf2_hintmask_isNew( glyphpath->hintMask )   )\n      cf2_hintmap_build( &glyphpath->hintMap,\n                         glyphpath->hStemHintArray,\n                         glyphpath->vStemHintArray,\n                         glyphpath->hintMask,\n                         glyphpath->hintOriginY,\n                         FALSE );\n\n    /* save a copy of current HintMap to use when drawing initial point */\n    glyphpath->firstHintMap = glyphpath->hintMap;     /* structure copy */\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_glyphpath_lineTo( CF2_GlyphPath  glyphpath,\n                        CF2_Fixed      x,\n                        CF2_Fixed      y )\n  {\n    CF2_Fixed  xOffset, yOffset;\n    FT_Vector  P0, P1;\n    FT_Bool    newHintMap;\n\n    /*\n     * New hints will be applied after cf2_glyphpath_pushPrevElem has run.\n     * In case this is a synthesized closing line, any new hints should be\n     * delayed until this path is closed (`cf2_hintmask_isNew' will be\n     * called again before the next line or curve).\n     */\n\n    /* true if new hint map not on close */\n    newHintMap = cf2_hintmask_isNew( glyphpath->hintMask ) &&\n                 !glyphpath->pathIsClosing;\n\n    /*\n     * Zero-length lines may occur in the charstring.  Because we cannot\n     * compute darkening offsets or intersections from zero-length lines,\n     * it is best to remove them and avoid artifacts.  However, zero-length\n     * lines in CS at the start of a new hint map can generate non-zero\n     * lines in DS due to hint substitution.  We detect a change in hint\n     * map here and pass those zero-length lines along.\n     */\n\n    /*\n     * Note: Find explicitly closed paths here with a conditional\n     *       breakpoint using\n     *\n     *         !gp->pathIsClosing && gp->start.x == x && gp->start.y == y\n     *\n     */\n\n    if ( glyphpath->currentCS.x == x &&\n         glyphpath->currentCS.y == y &&\n         !newHintMap                 )\n      /*\n       * Ignore zero-length lines in CS where the hint map is the same\n       * because the line in DS will also be zero length.\n       *\n       * Ignore zero-length lines when we synthesize a closing line because\n       * the close will be handled in cf2_glyphPath_pushPrevElem.\n       */\n      return;\n\n    cf2_glyphpath_computeOffset( glyphpath,\n                                 glyphpath->currentCS.x,\n                                 glyphpath->currentCS.y,\n                                 x,\n                                 y,\n                                 &xOffset,\n                                 &yOffset );\n\n    /* construct offset points */\n    P0.x = glyphpath->currentCS.x + xOffset;\n    P0.y = glyphpath->currentCS.y + yOffset;\n    P1.x = x + xOffset;\n    P1.y = y + yOffset;\n\n    if ( glyphpath->moveIsPending )\n    {\n      /* emit offset 1st point as MoveTo */\n      cf2_glyphpath_pushMove( glyphpath, P0 );\n\n      glyphpath->moveIsPending = FALSE;  /* adjust state machine */\n      glyphpath->pathIsOpen    = TRUE;\n\n      glyphpath->offsetStart1 = P1;              /* record second point */\n    }\n\n    if ( glyphpath->elemIsQueued )\n    {\n      FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) ||\n                 glyphpath->hintMap.count == 0              );\n\n      cf2_glyphpath_pushPrevElem( glyphpath,\n                                  &glyphpath->hintMap,\n                                  &P0,\n                                  P1,\n                                  FALSE );\n    }\n\n    /* queue the current element with offset points */\n    glyphpath->elemIsQueued = TRUE;\n    glyphpath->prevElemOp   = CF2_PathOpLineTo;\n    glyphpath->prevElemP0   = P0;\n    glyphpath->prevElemP1   = P1;\n\n    /* update current map */\n    if ( newHintMap )\n      cf2_hintmap_build( &glyphpath->hintMap,\n                         glyphpath->hStemHintArray,\n                         glyphpath->vStemHintArray,\n                         glyphpath->hintMask,\n                         glyphpath->hintOriginY,\n                         FALSE );\n\n    glyphpath->currentCS.x = x;     /* pre-offset current point */\n    glyphpath->currentCS.y = y;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_glyphpath_curveTo( CF2_GlyphPath  glyphpath,\n                         CF2_Fixed      x1,\n                         CF2_Fixed      y1,\n                         CF2_Fixed      x2,\n                         CF2_Fixed      y2,\n                         CF2_Fixed      x3,\n                         CF2_Fixed      y3 )\n  {\n    CF2_Fixed  xOffset1, yOffset1, xOffset3, yOffset3;\n    FT_Vector  P0, P1, P2, P3;\n\n\n    /* TODO: ignore zero length portions of curve?? */\n    cf2_glyphpath_computeOffset( glyphpath,\n                                 glyphpath->currentCS.x,\n                                 glyphpath->currentCS.y,\n                                 x1,\n                                 y1,\n                                 &xOffset1,\n                                 &yOffset1 );\n    cf2_glyphpath_computeOffset( glyphpath,\n                                 x2,\n                                 y2,\n                                 x3,\n                                 y3,\n                                 &xOffset3,\n                                 &yOffset3 );\n\n    /* add momentum from the middle segment */\n    glyphpath->callbacks->windingMomentum +=\n      cf2_getWindingMomentum( x1, y1, x2, y2 );\n\n    /* construct offset points */\n    P0.x = glyphpath->currentCS.x + xOffset1;\n    P0.y = glyphpath->currentCS.y + yOffset1;\n    P1.x = x1 + xOffset1;\n    P1.y = y1 + yOffset1;\n    /* note: preserve angle of final segment by using offset3 at both ends */\n    P2.x = x2 + xOffset3;\n    P2.y = y2 + yOffset3;\n    P3.x = x3 + xOffset3;\n    P3.y = y3 + yOffset3;\n\n    if ( glyphpath->moveIsPending )\n    {\n      /* emit offset 1st point as MoveTo */\n      cf2_glyphpath_pushMove( glyphpath, P0 );\n\n      glyphpath->moveIsPending = FALSE;\n      glyphpath->pathIsOpen    = TRUE;\n\n      glyphpath->offsetStart1 = P1;              /* record second point */\n    }\n\n    if ( glyphpath->elemIsQueued )\n    {\n      FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) ||\n                 glyphpath->hintMap.count == 0              );\n\n      cf2_glyphpath_pushPrevElem( glyphpath,\n                                  &glyphpath->hintMap,\n                                  &P0,\n                                  P1,\n                                  FALSE );\n    }\n\n    /* queue the current element with offset points */\n    glyphpath->elemIsQueued = TRUE;\n    glyphpath->prevElemOp   = CF2_PathOpCubeTo;\n    glyphpath->prevElemP0   = P0;\n    glyphpath->prevElemP1   = P1;\n    glyphpath->prevElemP2   = P2;\n    glyphpath->prevElemP3   = P3;\n\n    /* update current map */\n    if ( cf2_hintmask_isNew( glyphpath->hintMask ) )\n      cf2_hintmap_build( &glyphpath->hintMap,\n                         glyphpath->hStemHintArray,\n                         glyphpath->vStemHintArray,\n                         glyphpath->hintMask,\n                         glyphpath->hintOriginY,\n                         FALSE );\n\n    glyphpath->currentCS.x = x3;       /* pre-offset current point */\n    glyphpath->currentCS.y = y3;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_glyphpath_closeOpenPath( CF2_GlyphPath  glyphpath )\n  {\n    if ( glyphpath->pathIsOpen )\n    {\n      /*\n       * A closing line in Character Space line is always generated below\n       * with `cf2_glyphPath_lineTo'.  It may be ignored later if it turns\n       * out to be zero length in Device Space.\n       */\n      glyphpath->pathIsClosing = TRUE;\n\n      cf2_glyphpath_lineTo( glyphpath,\n                            glyphpath->start.x,\n                            glyphpath->start.y );\n\n      /* empty the final element from the queue and close the path */\n      if ( glyphpath->elemIsQueued )\n        cf2_glyphpath_pushPrevElem( glyphpath,\n                                    &glyphpath->hintMap,\n                                    &glyphpath->offsetStart0,\n                                    glyphpath->offsetStart1,\n                                    TRUE );\n\n      /* reset state machine */\n      glyphpath->moveIsPending = TRUE;\n      glyphpath->pathIsOpen    = FALSE;\n      glyphpath->pathIsClosing = FALSE;\n      glyphpath->elemIsQueued  = FALSE;\n    }\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2hints.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2hints.h                                                             */\n/*                                                                         */\n/*    Adobe's code for handling CFF hints (body).                          */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2HINTS_H__\n#define __CF2HINTS_H__\n\n\nFT_BEGIN_HEADER\n\n\n  enum\n  {\n    CF2_MAX_HINTS = 96    /* maximum # of hints */\n  };\n\n\n  /*\n   * A HintMask object stores a bit mask that specifies which hints in the\n   * charstring are active at a given time.  Hints in CFF must be declared\n   * at the start, before any drawing operators, with horizontal hints\n   * preceding vertical hints.  The HintMask is ordered the same way, with\n   * horizontal hints immediately followed by vertical hints.  Clients are\n   * responsible for knowing how many of each type are present.\n   *\n   * The maximum total number of hints is 96, as specified by the CFF\n   * specification.\n   *\n   * A HintMask is built 0 or more times while interpreting a charstring, by\n   * the HintMask operator.  There is only one HintMask, but it is built or\n   * rebuilt each time there is a hint substitution (HintMask operator) in\n   * the charstring.  A default HintMask with all bits set is built if there\n   * has been no HintMask operator prior to the first drawing operator.\n   *\n   */\n\n  typedef struct  CF2_HintMaskRec_\n  {\n    FT_Error*  error;\n\n    FT_Bool  isValid;\n    FT_Bool  isNew;\n\n    size_t  bitCount;\n    size_t  byteCount;\n\n    FT_Byte  mask[( CF2_MAX_HINTS + 7 ) / 8];\n\n  } CF2_HintMaskRec, *CF2_HintMask;\n\n\n  typedef struct  CF2_StemHintRec_\n  {\n    FT_Bool  used;     /* DS positions are valid         */\n\n    CF2_Fixed  min;    /* original character space value */\n    CF2_Fixed  max;\n\n    CF2_Fixed  minDS;  /* DS position after first use    */\n    CF2_Fixed  maxDS;\n\n  } CF2_StemHintRec, *CF2_StemHint;\n\n\n  /*\n   * A HintMap object stores a piecewise linear function for mapping\n   * y-coordinates from character space to device space, providing\n   * appropriate pixel alignment to stem edges.\n   *\n   * The map is implemented as an array of `CF2_Hint' elements, each\n   * representing an edge.  When edges are paired, as from stem hints, the\n   * bottom edge must immediately precede the top edge in the array.\n   * Element character space AND device space positions must both increase\n   * monotonically in the array.  `CF2_Hint' elements are also used as\n   * parameters to `cf2_blues_capture'.\n   *\n   * The `cf2_hintmap_build' method must be called before any drawing\n   * operation (beginning with a Move operator) and at each hint\n   * substitution (HintMask operator).\n   *\n   * The `cf2_hintmap_map' method is called to transform y-coordinates at\n   * each drawing operation (move, line, curve).\n   *\n   */\n\n  /* TODO: make this a CF2_ArrStack and add a deep copy method */\n  enum\n  {\n    CF2_MAX_HINT_EDGES = CF2_MAX_HINTS * 2\n  };\n\n\n  typedef struct  CF2_HintMapRec_\n  {\n    CF2_Font  font;\n\n    /* initial map based on blue zones */\n    struct CF2_HintMapRec_*  initialHintMap;\n\n    /* working storage for 2nd pass adjustHints */\n    CF2_ArrStack  hintMoves;\n\n    FT_Bool  isValid;\n    FT_Bool  hinted;\n\n    CF2_Fixed  scale;\n    CF2_UInt   count;\n\n    /* start search from this index */\n    CF2_UInt  lastIndex;\n\n    CF2_HintRec  edge[CF2_MAX_HINT_EDGES]; /* 192 */\n\n  } CF2_HintMapRec, *CF2_HintMap;\n\n\n  FT_LOCAL( FT_Bool )\n  cf2_hint_isValid( const CF2_Hint  hint );\n  FT_LOCAL( FT_Bool )\n  cf2_hint_isTop( const CF2_Hint  hint );\n  FT_LOCAL( FT_Bool )\n  cf2_hint_isBottom( const CF2_Hint  hint );\n  FT_LOCAL( void )\n  cf2_hint_lock( CF2_Hint  hint );\n\n\n  FT_LOCAL( void )\n  cf2_hintmap_init( CF2_HintMap   hintmap,\n                    CF2_Font      font,\n                    CF2_HintMap   initialMap,\n                    CF2_ArrStack  hintMoves,\n                    CF2_Fixed     scale );\n  FT_LOCAL( void )\n  cf2_hintmap_build( CF2_HintMap   hintmap,\n                     CF2_ArrStack  hStemHintArray,\n                     CF2_ArrStack  vStemHintArray,\n                     CF2_HintMask  hintMask,\n                     CF2_Fixed     hintOrigin,\n                     FT_Bool       initialMap );\n\n\n  /*\n   * GlyphPath is a wrapper for drawing operations that scales the\n   * coordinates according to the render matrix and HintMap.  It also tracks\n   * open paths to control ClosePath and to insert MoveTo for broken fonts.\n   *\n   */\n  typedef struct  CF2_GlyphPathRec_\n  {\n    /* TODO: gather some of these into a hinting context */\n\n    CF2_Font              font;           /* font instance    */\n    CF2_OutlineCallbacks  callbacks;      /* outline consumer */\n\n\n    CF2_HintMapRec  hintMap;        /* current hint map            */\n    CF2_HintMapRec  firstHintMap;   /* saved copy                  */\n    CF2_HintMapRec  initialHintMap; /* based on all captured hints */\n\n    CF2_ArrStackRec  hintMoves;  /* list of hint moves for 2nd pass */\n\n    CF2_Fixed  scaleX;         /* matrix a */\n    CF2_Fixed  scaleC;         /* matrix c */\n    CF2_Fixed  scaleY;         /* matrix d */\n\n    FT_Vector  fractionalTranslation;  /* including deviceXScale */\n#if 0\n    CF2_Fixed  hShift;    /* character space horizontal shift */\n                          /* (for fauxing)                    */\n#endif\n\n    FT_Bool  pathIsOpen;     /* true after MoveTo                     */\n    FT_Bool  pathIsClosing;  /* true when synthesizing closepath line */\n    FT_Bool  darken;         /* true if stem darkening                */\n    FT_Bool  moveIsPending;  /* true between MoveTo and offset MoveTo */\n\n    /* references used to call `cf2_hintmap_build', if necessary */\n    CF2_ArrStack         hStemHintArray;\n    CF2_ArrStack         vStemHintArray;\n    CF2_HintMask         hintMask;     /* ptr to the current mask */\n    CF2_Fixed            hintOriginY;  /* copy of current origin  */\n    const CF2_BluesRec*  blues;\n\n    CF2_Fixed  xOffset;        /* character space offsets */\n    CF2_Fixed  yOffset;\n\n    /* character space miter limit threshold */\n    CF2_Fixed  miterLimit;\n    /* vertical/horzizontal snap distance in character space */\n    CF2_Fixed  snapThreshold;\n\n    FT_Vector  offsetStart0;  /* first and second points of first */\n    FT_Vector  offsetStart1;  /* element with offset applied      */\n\n    /* current point, character space, before offset */\n    FT_Vector  currentCS;\n    /* current point, device space */\n    FT_Vector  currentDS;\n    /* start point of subpath, character space */\n    FT_Vector  start;\n\n    /* the following members constitute the `queue' of one element */\n    FT_Bool  elemIsQueued;\n    CF2_Int  prevElemOp;\n\n    FT_Vector  prevElemP0;\n    FT_Vector  prevElemP1;\n    FT_Vector  prevElemP2;\n    FT_Vector  prevElemP3;\n\n  } CF2_GlyphPathRec, *CF2_GlyphPath;\n\n\n  FT_LOCAL( void )\n  cf2_glyphpath_init( CF2_GlyphPath         glyphpath,\n                      CF2_Font              font,\n                      CF2_OutlineCallbacks  callbacks,\n                      CF2_Fixed             scaleY,\n                      /* CF2_Fixed hShift, */\n                      CF2_ArrStack          hStemHintArray,\n                      CF2_ArrStack          vStemHintArray,\n                      CF2_HintMask          hintMask,\n                      CF2_Fixed             hintOrigin,\n                      const CF2_Blues       blues,\n                      const FT_Vector*      fractionalTranslation );\n  FT_LOCAL( void )\n  cf2_glyphpath_finalize( CF2_GlyphPath  glyphpath );\n\n  FT_LOCAL( void )\n  cf2_glyphpath_moveTo( CF2_GlyphPath  glyphpath,\n                        CF2_Fixed      x,\n                        CF2_Fixed      y );\n  FT_LOCAL( void )\n  cf2_glyphpath_lineTo( CF2_GlyphPath  glyphpath,\n                        CF2_Fixed      x,\n                        CF2_Fixed      y );\n  FT_LOCAL( void )\n  cf2_glyphpath_curveTo( CF2_GlyphPath  glyphpath,\n                         CF2_Fixed      x1,\n                         CF2_Fixed      y1,\n                         CF2_Fixed      x2,\n                         CF2_Fixed      y2,\n                         CF2_Fixed      x3,\n                         CF2_Fixed      y3 );\n  FT_LOCAL( void )\n  cf2_glyphpath_closeOpenPath( CF2_GlyphPath  glyphpath );\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2HINTS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2intrp.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2intrp.c                                                             */\n/*                                                                         */\n/*    Adobe's CFF Interpreter (body).                                      */\n/*                                                                         */\n/*  Copyright 2007-2014 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"cf2ft.h\"\n#include FT_INTERNAL_DEBUG_H\n\n#include \"cf2glue.h\"\n#include \"cf2font.h\"\n#include \"cf2stack.h\"\n#include \"cf2hints.h\"\n\n#include \"cf2error.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cf2interp\n\n\n  /* some operators are not implemented yet */\n#define CF2_FIXME  FT_TRACE4(( \"cf2_interpT2CharString:\"            \\\n                               \" operator not implemented yet\\n\" ))\n\n\n\n  FT_LOCAL_DEF( void )\n  cf2_hintmask_init( CF2_HintMask  hintmask,\n                     FT_Error*     error )\n  {\n    FT_ZERO( hintmask );\n\n    hintmask->error = error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  cf2_hintmask_isValid( const CF2_HintMask  hintmask )\n  {\n    return hintmask->isValid;\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  cf2_hintmask_isNew( const CF2_HintMask  hintmask )\n  {\n    return hintmask->isNew;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_hintmask_setNew( CF2_HintMask  hintmask,\n                       FT_Bool       val )\n  {\n    hintmask->isNew = val;\n  }\n\n\n  /* clients call `getMaskPtr' in order to iterate */\n  /* through hint mask                             */\n\n  FT_LOCAL_DEF( FT_Byte* )\n  cf2_hintmask_getMaskPtr( CF2_HintMask  hintmask )\n  {\n    return hintmask->mask;\n  }\n\n\n  static size_t\n  cf2_hintmask_setCounts( CF2_HintMask  hintmask,\n                          size_t        bitCount )\n  {\n    if ( bitCount > CF2_MAX_HINTS )\n    {\n      /* total of h and v stems must be <= 96 */\n      CF2_SET_ERROR( hintmask->error, Invalid_Glyph_Format );\n      return 0;\n    }\n\n    hintmask->bitCount  = bitCount;\n    hintmask->byteCount = ( hintmask->bitCount + 7 ) / 8;\n\n    hintmask->isValid = TRUE;\n    hintmask->isNew   = TRUE;\n\n    return bitCount;\n  }\n\n\n  /* consume the hintmask bytes from the charstring, advancing the src */\n  /* pointer                                                           */\n  static void\n  cf2_hintmask_read( CF2_HintMask  hintmask,\n                     CF2_Buffer    charstring,\n                     size_t        bitCount )\n  {\n    size_t  i;\n\n#ifndef CF2_NDEBUG\n    /* these are the bits in the final mask byte that should be zero  */\n    /* Note: this variable is only used in an assert expression below */\n    /* and then only if CF2_NDEBUG is not defined                     */\n    CF2_UInt  mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1;\n#endif\n\n\n    /* initialize counts and isValid */\n    if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 )\n      return;\n\n    FT_ASSERT( hintmask->byteCount > 0 );\n\n    FT_TRACE4(( \" (maskbytes:\" ));\n\n    /* set mask and advance interpreter's charstring pointer */\n    for ( i = 0; i < hintmask->byteCount; i++ )\n    {\n      hintmask->mask[i] = (FT_Byte)cf2_buf_readByte( charstring );\n      FT_TRACE4(( \" 0x%02X\", hintmask->mask[i] ));\n    }\n\n    FT_TRACE4(( \")\\n\" ));\n\n    /* assert any unused bits in last byte are zero unless there's a prior */\n    /* error                                                               */\n    /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1      */\n#ifndef CF2_NDEBUG\n    FT_ASSERT( ( hintmask->mask[hintmask->byteCount - 1] & mask ) == 0 ||\n               *hintmask->error                                        );\n#endif\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_hintmask_setAll( CF2_HintMask  hintmask,\n                       size_t        bitCount )\n  {\n    size_t    i;\n    CF2_UInt  mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1;\n\n\n    /* initialize counts and isValid */\n    if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 )\n      return;\n\n    FT_ASSERT( hintmask->byteCount > 0 );\n    FT_ASSERT( hintmask->byteCount <\n                 sizeof ( hintmask->mask ) / sizeof ( hintmask->mask[0] ) );\n\n    /* set mask to all ones */\n    for ( i = 0; i < hintmask->byteCount; i++ )\n      hintmask->mask[i] = 0xFF;\n\n    /* clear unused bits                                              */\n    /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */\n    hintmask->mask[hintmask->byteCount - 1] &= ~mask;\n  }\n\n\n  /* Type2 charstring opcodes */\n  enum\n  {\n    cf2_cmdRESERVED_0,   /* 0 */\n    cf2_cmdHSTEM,        /* 1 */\n    cf2_cmdRESERVED_2,   /* 2 */\n    cf2_cmdVSTEM,        /* 3 */\n    cf2_cmdVMOVETO,      /* 4 */\n    cf2_cmdRLINETO,      /* 5 */\n    cf2_cmdHLINETO,      /* 6 */\n    cf2_cmdVLINETO,      /* 7 */\n    cf2_cmdRRCURVETO,    /* 8 */\n    cf2_cmdRESERVED_9,   /* 9 */\n    cf2_cmdCALLSUBR,     /* 10 */\n    cf2_cmdRETURN,       /* 11 */\n    cf2_cmdESC,          /* 12 */\n    cf2_cmdRESERVED_13,  /* 13 */\n    cf2_cmdENDCHAR,      /* 14 */\n    cf2_cmdRESERVED_15,  /* 15 */\n    cf2_cmdRESERVED_16,  /* 16 */\n    cf2_cmdRESERVED_17,  /* 17 */\n    cf2_cmdHSTEMHM,      /* 18 */\n    cf2_cmdHINTMASK,     /* 19 */\n    cf2_cmdCNTRMASK,     /* 20 */\n    cf2_cmdRMOVETO,      /* 21 */\n    cf2_cmdHMOVETO,      /* 22 */\n    cf2_cmdVSTEMHM,      /* 23 */\n    cf2_cmdRCURVELINE,   /* 24 */\n    cf2_cmdRLINECURVE,   /* 25 */\n    cf2_cmdVVCURVETO,    /* 26 */\n    cf2_cmdHHCURVETO,    /* 27 */\n    cf2_cmdEXTENDEDNMBR, /* 28 */\n    cf2_cmdCALLGSUBR,    /* 29 */\n    cf2_cmdVHCURVETO,    /* 30 */\n    cf2_cmdHVCURVETO     /* 31 */\n  };\n\n  enum\n  {\n    cf2_escDOTSECTION,   /* 0 */\n    cf2_escRESERVED_1,   /* 1 */\n    cf2_escRESERVED_2,   /* 2 */\n    cf2_escAND,          /* 3 */\n    cf2_escOR,           /* 4 */\n    cf2_escNOT,          /* 5 */\n    cf2_escRESERVED_6,   /* 6 */\n    cf2_escRESERVED_7,   /* 7 */\n    cf2_escRESERVED_8,   /* 8 */\n    cf2_escABS,          /* 9 */\n    cf2_escADD,          /* 10     like otherADD */\n    cf2_escSUB,          /* 11     like otherSUB */\n    cf2_escDIV,          /* 12 */\n    cf2_escRESERVED_13,  /* 13 */\n    cf2_escNEG,          /* 14 */\n    cf2_escEQ,           /* 15 */\n    cf2_escRESERVED_16,  /* 16 */\n    cf2_escRESERVED_17,  /* 17 */\n    cf2_escDROP,         /* 18 */\n    cf2_escRESERVED_19,  /* 19 */\n    cf2_escPUT,          /* 20     like otherPUT    */\n    cf2_escGET,          /* 21     like otherGET    */\n    cf2_escIFELSE,       /* 22     like otherIFELSE */\n    cf2_escRANDOM,       /* 23     like otherRANDOM */\n    cf2_escMUL,          /* 24     like otherMUL    */\n    cf2_escRESERVED_25,  /* 25 */\n    cf2_escSQRT,         /* 26 */\n    cf2_escDUP,          /* 27     like otherDUP    */\n    cf2_escEXCH,         /* 28     like otherEXCH   */\n    cf2_escINDEX,        /* 29 */\n    cf2_escROLL,         /* 30 */\n    cf2_escRESERVED_31,  /* 31 */\n    cf2_escRESERVED_32,  /* 32 */\n    cf2_escRESERVED_33,  /* 33 */\n    cf2_escHFLEX,        /* 34 */\n    cf2_escFLEX,         /* 35 */\n    cf2_escHFLEX1,       /* 36 */\n    cf2_escFLEX1         /* 37 */\n  };\n\n\n  /* `stemHintArray' does not change once we start drawing the outline. */\n  static void\n  cf2_doStems( const CF2_Font  font,\n               CF2_Stack       opStack,\n               CF2_ArrStack    stemHintArray,\n               CF2_Fixed*      width,\n               FT_Bool*        haveWidth,\n               CF2_Fixed       hintOffset )\n  {\n    CF2_UInt  i;\n    CF2_UInt  count       = cf2_stack_count( opStack );\n    FT_Bool   hasWidthArg = (FT_Bool)( count & 1 );\n\n    /* variable accumulates delta values from operand stack */\n    CF2_Fixed  position = hintOffset;\n\n    if ( hasWidthArg && ! *haveWidth )\n      *width = cf2_stack_getReal( opStack, 0 ) +\n                 cf2_getNominalWidthX( font->decoder );\n\n    if ( font->decoder->width_only )\n      goto exit;\n\n    for ( i = hasWidthArg ? 1 : 0; i < count; i += 2 )\n    {\n      /* construct a CF2_StemHint and push it onto the list */\n      CF2_StemHintRec  stemhint;\n\n\n      stemhint.min  =\n        position   += cf2_stack_getReal( opStack, i );\n      stemhint.max  =\n        position   += cf2_stack_getReal( opStack, i + 1 );\n\n      stemhint.used  = FALSE;\n      stemhint.maxDS =\n      stemhint.minDS = 0;\n\n      cf2_arrstack_push( stemHintArray, &stemhint ); /* defer error check */\n    }\n\n    cf2_stack_clear( opStack );\n\n  exit:\n    /* cf2_doStems must define a width (may be default) */\n    *haveWidth = TRUE;\n  }\n\n\n  static void\n  cf2_doFlex( CF2_Stack       opStack,\n              CF2_Fixed*      curX,\n              CF2_Fixed*      curY,\n              CF2_GlyphPath   glyphPath,\n              const FT_Bool*  readFromStack,\n              FT_Bool         doConditionalLastRead )\n  {\n    CF2_Fixed  vals[14];\n    CF2_UInt   index;\n    FT_Bool    isHFlex;\n    CF2_Int    top, i, j;\n\n\n    vals[0] = *curX;\n    vals[1] = *curY;\n    index   = 0;\n    isHFlex = readFromStack[9] == FALSE;\n    top     = isHFlex ? 9 : 10;\n\n    for ( i = 0; i < top; i++ )\n    {\n      vals[i + 2] = vals[i];\n      if ( readFromStack[i] )\n        vals[i + 2] += cf2_stack_getReal( opStack, index++ );\n    }\n\n    if ( isHFlex )\n      vals[9 + 2] = *curY;\n\n    if ( doConditionalLastRead )\n    {\n      FT_Bool    lastIsX = (FT_Bool)( cf2_fixedAbs( vals[10] - *curX ) >\n                                        cf2_fixedAbs( vals[11] - *curY ) );\n      CF2_Fixed  lastVal = cf2_stack_getReal( opStack, index );\n\n\n      if ( lastIsX )\n      {\n        vals[12] = vals[10] + lastVal;\n        vals[13] = *curY;\n      }\n      else\n      {\n        vals[12] = *curX;\n        vals[13] = vals[11] + lastVal;\n      }\n    }\n    else\n    {\n      if ( readFromStack[10] )\n        vals[12] = vals[10] + cf2_stack_getReal( opStack, index++ );\n      else\n        vals[12] = *curX;\n\n      if ( readFromStack[11] )\n        vals[13] = vals[11] + cf2_stack_getReal( opStack, index );\n      else\n        vals[13] = *curY;\n    }\n\n    for ( j = 0; j < 2; j++ )\n      cf2_glyphpath_curveTo( glyphPath, vals[j * 6 + 2],\n                                        vals[j * 6 + 3],\n                                        vals[j * 6 + 4],\n                                        vals[j * 6 + 5],\n                                        vals[j * 6 + 6],\n                                        vals[j * 6 + 7] );\n\n    cf2_stack_clear( opStack );\n\n    *curX = vals[12];\n    *curY = vals[13];\n  }\n\n\n  /*\n   * `error' is a shared error code used by many objects in this\n   * routine.  Before the code continues from an error, it must check and\n   * record the error in `*error'.  The idea is that this shared\n   * error code will record the first error encountered.  If testing\n   * for an error anyway, the cost of `goto exit' is small, so we do it,\n   * even if continuing would be safe.  In this case, `lastError' is\n   * set, so the testing and storing can be done in one place, at `exit'.\n   *\n   * Continuing after an error is intended for objects which do their own\n   * testing of `*error', e.g., array stack functions.  This allows us to\n   * avoid an extra test after the call.\n   *\n   * Unimplemented opcodes are ignored.\n   *\n   */\n  FT_LOCAL_DEF( void )\n  cf2_interpT2CharString( CF2_Font              font,\n                          CF2_Buffer            buf,\n                          CF2_OutlineCallbacks  callbacks,\n                          const FT_Vector*      translation,\n                          FT_Bool               doingSeac,\n                          CF2_Fixed             curX,\n                          CF2_Fixed             curY,\n                          CF2_Fixed*            width )\n  {\n    /* lastError is used for errors that are immediately tested */\n    FT_Error  lastError = FT_Err_Ok;\n\n    /* pointer to parsed font object */\n    CFF_Decoder*  decoder = font->decoder;\n\n    FT_Error*  error  = &font->error;\n    FT_Memory  memory = font->memory;\n\n    CF2_Fixed  scaleY        = font->innerTransform.d;\n    CF2_Fixed  nominalWidthX = cf2_getNominalWidthX( decoder );\n\n    /* save this for hinting seac accents */\n    CF2_Fixed  hintOriginY = curY;\n\n    CF2_Stack  opStack = NULL;\n    FT_Byte    op1;                       /* first opcode byte */\n\n    /* instruction limit; 20,000,000 matches Avalon */\n    FT_UInt32  instructionLimit = 20000000UL;\n\n    CF2_ArrStackRec  subrStack;\n\n    FT_Bool     haveWidth;\n    CF2_Buffer  charstring = NULL;\n\n    CF2_Int  charstringIndex = -1;       /* initialize to empty */\n\n    /* TODO: placeholders for hint structures */\n\n    /* objects used for hinting */\n    CF2_ArrStackRec  hStemHintArray;\n    CF2_ArrStackRec  vStemHintArray;\n\n    CF2_HintMaskRec   hintMask;\n    CF2_GlyphPathRec  glyphPath;\n\n\n    /* initialize the remaining objects */\n    cf2_arrstack_init( &subrStack,\n                       memory,\n                       error,\n                       sizeof ( CF2_BufferRec ) );\n    cf2_arrstack_init( &hStemHintArray,\n                       memory,\n                       error,\n                       sizeof ( CF2_StemHintRec ) );\n    cf2_arrstack_init( &vStemHintArray,\n                       memory,\n                       error,\n                       sizeof ( CF2_StemHintRec ) );\n\n    /* initialize CF2_StemHint arrays */\n    cf2_hintmask_init( &hintMask, error );\n\n    /* initialize path map to manage drawing operations */\n\n    /* Note: last 4 params are used to handle `MoveToPermissive', which */\n    /*       may need to call `hintMap.Build'                           */\n    /* TODO: MoveToPermissive is gone; are these still needed?          */\n    cf2_glyphpath_init( &glyphPath,\n                        font,\n                        callbacks,\n                        scaleY,\n                        /* hShift, */\n                        &hStemHintArray,\n                        &vStemHintArray,\n                        &hintMask,\n                        hintOriginY,\n                        &font->blues,\n                        translation );\n\n    /*\n     * Initialize state for width parsing.  From the CFF Spec:\n     *\n     *   The first stack-clearing operator, which must be one of hstem,\n     *   hstemhm, vstem, vstemhm, cntrmask, hintmask, hmoveto, vmoveto,\n     *   rmoveto, or endchar, takes an additional argument - the width (as\n     *   described earlier), which may be expressed as zero or one numeric\n     *   argument.\n     *\n     * What we implement here uses the first validly specified width, but\n     * does not detect errors for specifying more than one width.\n     *\n     * If one of the above operators occurs without explicitly specifying\n     * a width, we assume the default width.\n     *\n     */\n    haveWidth = FALSE;\n    *width    = cf2_getDefaultWidthX( decoder );\n\n    /*\n     * Note: at this point, all pointers to resources must be NULL\n     * and all local objects must be initialized.\n     * There must be no branches to exit: above this point.\n     *\n     */\n\n    /* allocate an operand stack */\n    opStack = cf2_stack_init( memory, error );\n    if ( !opStack )\n    {\n      lastError = FT_THROW( Out_Of_Memory );\n      goto exit;\n    }\n\n    /* initialize subroutine stack by placing top level charstring as */\n    /* first element (max depth plus one for the charstring)          */\n    /* Note: Caller owns and must finalize the first charstring.      */\n    /*       Our copy of it does not change that requirement.         */\n    cf2_arrstack_setCount( &subrStack, CF2_MAX_SUBR + 1 );\n\n    charstring  = (CF2_Buffer)cf2_arrstack_getBuffer( &subrStack );\n    *charstring = *buf;    /* structure copy */\n\n    charstringIndex = 0;       /* entry is valid now */\n\n    /* catch errors so far */\n    if ( *error )\n      goto exit;\n\n    /* main interpreter loop */\n    while ( 1 )\n    {\n      if ( cf2_buf_isEnd( charstring ) )\n      {\n        /* If we've reached the end of the charstring, simulate a */\n        /* cf2_cmdRETURN or cf2_cmdENDCHAR.                       */\n        if ( charstringIndex )\n          op1 = cf2_cmdRETURN;  /* end of buffer for subroutine */\n        else\n          op1 = cf2_cmdENDCHAR; /* end of buffer for top level charstring */\n      }\n      else\n        op1 = (FT_Byte)cf2_buf_readByte( charstring );\n\n      /* check for errors once per loop */\n      if ( *error )\n        goto exit;\n\n      instructionLimit--;\n      if ( instructionLimit == 0 )\n      {\n        lastError = FT_THROW( Invalid_Glyph_Format );\n        goto exit;\n      }\n\n      switch( op1 )\n      {\n      case cf2_cmdRESERVED_0:\n      case cf2_cmdRESERVED_2:\n      case cf2_cmdRESERVED_9:\n      case cf2_cmdRESERVED_13:\n      case cf2_cmdRESERVED_15:\n      case cf2_cmdRESERVED_16:\n      case cf2_cmdRESERVED_17:\n        /* we may get here if we have a prior error */\n        FT_TRACE4(( \" unknown op (%d)\\n\", op1 ));\n        break;\n\n      case cf2_cmdHSTEMHM:\n      case cf2_cmdHSTEM:\n        FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? \" hstemhm\\n\" : \" hstem\\n\" ));\n\n        /* never add hints after the mask is computed */\n        if ( cf2_hintmask_isValid( &hintMask ) )\n        {\n          FT_TRACE4(( \"cf2_interpT2CharString:\"\n                      \" invalid horizontal hint mask\\n\" ));\n          break;\n        }\n\n        cf2_doStems( font,\n                     opStack,\n                     &hStemHintArray,\n                     width,\n                     &haveWidth,\n                     0 );\n\n        if ( font->decoder->width_only )\n            goto exit;\n\n        break;\n\n      case cf2_cmdVSTEMHM:\n      case cf2_cmdVSTEM:\n        FT_TRACE4(( op1 == cf2_cmdVSTEMHM ? \" vstemhm\\n\" : \" vstem\\n\" ));\n\n        /* never add hints after the mask is computed */\n        if ( cf2_hintmask_isValid( &hintMask ) )\n        {\n          FT_TRACE4(( \"cf2_interpT2CharString:\"\n                      \" invalid vertical hint mask\\n\" ));\n          break;\n        }\n\n        cf2_doStems( font,\n                     opStack,\n                     &vStemHintArray,\n                     width,\n                     &haveWidth,\n                     0 );\n\n        if ( font->decoder->width_only )\n            goto exit;\n\n        break;\n\n      case cf2_cmdVMOVETO:\n        FT_TRACE4(( \" vmoveto\\n\" ));\n\n        if ( cf2_stack_count( opStack ) > 1 && !haveWidth )\n          *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;\n\n        /* width is defined or default after this */\n        haveWidth = TRUE;\n\n        if ( font->decoder->width_only )\n            goto exit;\n\n        curY += cf2_stack_popFixed( opStack );\n\n        cf2_glyphpath_moveTo( &glyphPath, curX, curY );\n\n        break;\n\n      case cf2_cmdRLINETO:\n        {\n          CF2_UInt  index;\n          CF2_UInt  count = cf2_stack_count( opStack );\n\n\n          FT_TRACE4(( \" rlineto\\n\" ));\n\n          for ( index = 0; index < count; index += 2 )\n          {\n            curX += cf2_stack_getReal( opStack, index + 0 );\n            curY += cf2_stack_getReal( opStack, index + 1 );\n\n            cf2_glyphpath_lineTo( &glyphPath, curX, curY );\n          }\n\n          cf2_stack_clear( opStack );\n        }\n        continue; /* no need to clear stack again */\n\n      case cf2_cmdHLINETO:\n      case cf2_cmdVLINETO:\n        {\n          CF2_UInt  index;\n          CF2_UInt  count = cf2_stack_count( opStack );\n\n          FT_Bool  isX = op1 == cf2_cmdHLINETO;\n\n\n          FT_TRACE4(( isX ? \" hlineto\\n\" : \" vlineto\\n\" ));\n\n          for ( index = 0; index < count; index++ )\n          {\n            CF2_Fixed  v = cf2_stack_getReal( opStack, index );\n\n\n            if ( isX )\n              curX += v;\n            else\n              curY += v;\n\n            isX = !isX;\n\n            cf2_glyphpath_lineTo( &glyphPath, curX, curY );\n          }\n\n          cf2_stack_clear( opStack );\n        }\n        continue;\n\n      case cf2_cmdRCURVELINE:\n      case cf2_cmdRRCURVETO:\n        {\n          CF2_UInt  count = cf2_stack_count( opStack );\n          CF2_UInt  index = 0;\n\n\n          FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? \" rcurveline\\n\"\n                                               : \" rrcurveto\\n\" ));\n\n          while ( index + 6 <= count )\n          {\n            CF2_Fixed  x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;\n            CF2_Fixed  y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;\n            CF2_Fixed  x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;\n            CF2_Fixed  y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;\n            CF2_Fixed  x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;\n            CF2_Fixed  y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;\n\n\n            cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );\n\n            curX   = x3;\n            curY   = y3;\n            index += 6;\n          }\n\n          if ( op1 == cf2_cmdRCURVELINE )\n          {\n            curX += cf2_stack_getReal( opStack, index + 0 );\n            curY += cf2_stack_getReal( opStack, index + 1 );\n\n            cf2_glyphpath_lineTo( &glyphPath, curX, curY );\n          }\n\n          cf2_stack_clear( opStack );\n        }\n        continue; /* no need to clear stack again */\n\n      case cf2_cmdCALLGSUBR:\n      case cf2_cmdCALLSUBR:\n        {\n          CF2_UInt  subrIndex;\n\n\n          FT_TRACE4(( op1 == cf2_cmdCALLGSUBR ? \" callgsubr\"\n                                              : \" callsubr\" ));\n\n          if ( charstringIndex > CF2_MAX_SUBR )\n          {\n            /* max subr plus one for charstring */\n            lastError = FT_THROW( Invalid_Glyph_Format );\n            goto exit;                      /* overflow of stack */\n          }\n\n          /* push our current CFF charstring region on subrStack */\n          charstring = (CF2_Buffer)\n                         cf2_arrstack_getPointer( &subrStack,\n                                                  charstringIndex + 1 );\n\n          /* set up the new CFF region and pointer */\n          subrIndex = cf2_stack_popInt( opStack );\n\n          switch ( op1 )\n          {\n          case cf2_cmdCALLGSUBR:\n            FT_TRACE4(( \"(%d)\\n\", subrIndex + decoder->globals_bias ));\n\n            if ( cf2_initGlobalRegionBuffer( decoder,\n                                             subrIndex,\n                                             charstring ) )\n            {\n              lastError = FT_THROW( Invalid_Glyph_Format );\n              goto exit;  /* subroutine lookup or stream error */\n            }\n            break;\n\n          default:\n            /* cf2_cmdCALLSUBR */\n            FT_TRACE4(( \"(%d)\\n\", subrIndex + decoder->locals_bias ));\n\n            if ( cf2_initLocalRegionBuffer( decoder,\n                                            subrIndex,\n                                            charstring ) )\n            {\n              lastError = FT_THROW( Invalid_Glyph_Format );\n              goto exit;  /* subroutine lookup or stream error */\n            }\n          }\n\n          charstringIndex += 1;       /* entry is valid now */\n        }\n        continue; /* do not clear the stack */\n\n      case cf2_cmdRETURN:\n        FT_TRACE4(( \" return\\n\" ));\n\n        if ( charstringIndex < 1 )\n        {\n          /* Note: cannot return from top charstring */\n          lastError = FT_THROW( Invalid_Glyph_Format );\n          goto exit;                      /* underflow of stack */\n        }\n\n        /* restore position in previous charstring */\n        charstring = (CF2_Buffer)\n                       cf2_arrstack_getPointer( &subrStack,\n                                                --charstringIndex );\n        continue;     /* do not clear the stack */\n\n      case cf2_cmdESC:\n        {\n          FT_Byte  op2 = (FT_Byte)cf2_buf_readByte( charstring );\n\n\n          switch ( op2 )\n          {\n          case cf2_escDOTSECTION:\n            /* something about `flip type of locking' -- ignore it */\n            FT_TRACE4(( \" dotsection\\n\" ));\n\n            break;\n\n          /* TODO: should these operators be supported? */\n          case cf2_escAND: /* in spec */\n            FT_TRACE4(( \" and\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escOR: /* in spec */\n            FT_TRACE4(( \" or\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escNOT: /* in spec */\n            FT_TRACE4(( \" not\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escABS: /* in spec */\n            FT_TRACE4(( \" abs\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escADD: /* in spec */\n            FT_TRACE4(( \" add\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escSUB: /* in spec */\n            FT_TRACE4(( \" sub\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escDIV: /* in spec */\n            FT_TRACE4(( \" div\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escNEG: /* in spec */\n            FT_TRACE4(( \" neg\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escEQ: /* in spec */\n            FT_TRACE4(( \" eq\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escDROP: /* in spec */\n            FT_TRACE4(( \" drop\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escPUT: /* in spec */\n            FT_TRACE4(( \" put\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escGET: /* in spec */\n            FT_TRACE4(( \" get\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escIFELSE: /* in spec */\n            FT_TRACE4(( \" ifelse\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escRANDOM: /* in spec */\n            FT_TRACE4(( \" random\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escMUL: /* in spec */\n            FT_TRACE4(( \" mul\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escSQRT: /* in spec */\n            FT_TRACE4(( \" sqrt\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escDUP: /* in spec */\n            FT_TRACE4(( \" dup\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escEXCH: /* in spec */\n            FT_TRACE4(( \" exch\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escINDEX: /* in spec */\n            FT_TRACE4(( \" index\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escROLL: /* in spec */\n            FT_TRACE4(( \" roll\\n\" ));\n\n            CF2_FIXME;\n            break;\n\n          case cf2_escHFLEX:\n            {\n              static const FT_Bool  readFromStack[12] =\n              {\n                TRUE /* dx1 */, FALSE /* dy1 */,\n                TRUE /* dx2 */, TRUE  /* dy2 */,\n                TRUE /* dx3 */, FALSE /* dy3 */,\n                TRUE /* dx4 */, FALSE /* dy4 */,\n                TRUE /* dx5 */, FALSE /* dy5 */,\n                TRUE /* dx6 */, FALSE /* dy6 */\n              };\n\n\n              FT_TRACE4(( \" hflex\\n\" ));\n\n              cf2_doFlex( opStack,\n                          &curX,\n                          &curY,\n                          &glyphPath,\n                          readFromStack,\n                          FALSE /* doConditionalLastRead */ );\n            }\n            continue;\n\n          case cf2_escFLEX:\n            {\n              static const FT_Bool  readFromStack[12] =\n              {\n                TRUE /* dx1 */, TRUE /* dy1 */,\n                TRUE /* dx2 */, TRUE /* dy2 */,\n                TRUE /* dx3 */, TRUE /* dy3 */,\n                TRUE /* dx4 */, TRUE /* dy4 */,\n                TRUE /* dx5 */, TRUE /* dy5 */,\n                TRUE /* dx6 */, TRUE /* dy6 */\n              };\n\n\n              FT_TRACE4(( \" flex\\n\" ));\n\n              cf2_doFlex( opStack,\n                          &curX,\n                          &curY,\n                          &glyphPath,\n                          readFromStack,\n                          FALSE /* doConditionalLastRead */ );\n            }\n            break;      /* TODO: why is this not a continue? */\n\n          case cf2_escHFLEX1:\n            {\n              static const FT_Bool  readFromStack[12] =\n              {\n                TRUE /* dx1 */, TRUE  /* dy1 */,\n                TRUE /* dx2 */, TRUE  /* dy2 */,\n                TRUE /* dx3 */, FALSE /* dy3 */,\n                TRUE /* dx4 */, FALSE /* dy4 */,\n                TRUE /* dx5 */, TRUE  /* dy5 */,\n                TRUE /* dx6 */, FALSE /* dy6 */\n              };\n\n\n              FT_TRACE4(( \" hflex1\\n\" ));\n\n              cf2_doFlex( opStack,\n                          &curX,\n                          &curY,\n                          &glyphPath,\n                          readFromStack,\n                          FALSE /* doConditionalLastRead */ );\n            }\n            continue;\n\n          case cf2_escFLEX1:\n            {\n              static const FT_Bool  readFromStack[12] =\n              {\n                TRUE  /* dx1 */, TRUE  /* dy1 */,\n                TRUE  /* dx2 */, TRUE  /* dy2 */,\n                TRUE  /* dx3 */, TRUE  /* dy3 */,\n                TRUE  /* dx4 */, TRUE  /* dy4 */,\n                TRUE  /* dx5 */, TRUE  /* dy5 */,\n                FALSE /* dx6 */, FALSE /* dy6 */\n              };\n\n\n              FT_TRACE4(( \" flex1\\n\" ));\n\n              cf2_doFlex( opStack,\n                          &curX,\n                          &curY,\n                          &glyphPath,\n                          readFromStack,\n                          TRUE /* doConditionalLastRead */ );\n            }\n            continue;\n\n          case cf2_escRESERVED_1:\n          case cf2_escRESERVED_2:\n          case cf2_escRESERVED_6:\n          case cf2_escRESERVED_7:\n          case cf2_escRESERVED_8:\n          case cf2_escRESERVED_13:\n          case cf2_escRESERVED_16:\n          case cf2_escRESERVED_17:\n          case cf2_escRESERVED_19:\n          case cf2_escRESERVED_25:\n          case cf2_escRESERVED_31:\n          case cf2_escRESERVED_32:\n          case cf2_escRESERVED_33:\n          default:\n            FT_TRACE4(( \" unknown op (12, %d)\\n\", op2 ));\n\n          }; /* end of switch statement checking `op2' */\n\n        } /* case cf2_cmdESC */\n        break;\n\n      case cf2_cmdENDCHAR:\n        FT_TRACE4(( \" endchar\\n\" ));\n\n        if ( cf2_stack_count( opStack ) == 1 ||\n             cf2_stack_count( opStack ) == 5 )\n        {\n          if ( !haveWidth )\n            *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;\n        }\n\n        /* width is defined or default after this */\n        haveWidth = TRUE;\n\n        if ( font->decoder->width_only )\n            goto exit;\n\n        /* close path if still open */\n        cf2_glyphpath_closeOpenPath( &glyphPath );\n\n        if ( cf2_stack_count( opStack ) > 1 )\n        {\n          /* must be either 4 or 5 --                       */\n          /* this is a (deprecated) implied `seac' operator */\n\n          CF2_UInt       achar;\n          CF2_UInt       bchar;\n          CF2_BufferRec  component;\n          CF2_Fixed      dummyWidth;   /* ignore component width */\n          FT_Error       error2;\n\n\n          if ( doingSeac )\n          {\n            lastError = FT_THROW( Invalid_Glyph_Format );\n            goto exit;      /* nested seac */\n          }\n\n          achar = cf2_stack_popInt( opStack );\n          bchar = cf2_stack_popInt( opStack );\n\n          curY = cf2_stack_popFixed( opStack );\n          curX = cf2_stack_popFixed( opStack );\n\n          error2 = cf2_getSeacComponent( decoder, achar, &component );\n          if ( error2 )\n          {\n             lastError = error2;      /* pass FreeType error through */\n             goto exit;\n          }\n          cf2_interpT2CharString( font,\n                                  &component,\n                                  callbacks,\n                                  translation,\n                                  TRUE,\n                                  curX,\n                                  curY,\n                                  &dummyWidth );\n          cf2_freeSeacComponent( decoder, &component );\n\n          error2 = cf2_getSeacComponent( decoder, bchar, &component );\n          if ( error2 )\n          {\n            lastError = error2;      /* pass FreeType error through */\n            goto exit;\n          }\n          cf2_interpT2CharString( font,\n                                  &component,\n                                  callbacks,\n                                  translation,\n                                  TRUE,\n                                  0,\n                                  0,\n                                  &dummyWidth );\n          cf2_freeSeacComponent( decoder, &component );\n        }\n        goto exit;\n\n      case cf2_cmdCNTRMASK:\n      case cf2_cmdHINTMASK:\n        /* the final \\n in the tracing message gets added in      */\n        /* `cf2_hintmask_read' (which also traces the mask bytes) */\n        FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? \" cntrmask\" : \" hintmask\" ));\n\n        /* never add hints after the mask is computed */\n        if ( cf2_stack_count( opStack ) > 1    &&\n             cf2_hintmask_isValid( &hintMask ) )\n        {\n          FT_TRACE4(( \"cf2_interpT2CharString: invalid hint mask\\n\" ));\n          break;\n        }\n\n        /* if there are arguments on the stack, there this is an */\n        /* implied cf2_cmdVSTEMHM                                */\n        cf2_doStems( font,\n                     opStack,\n                     &vStemHintArray,\n                     width,\n                     &haveWidth,\n                     0 );\n\n        if ( font->decoder->width_only )\n            goto exit;\n\n        if ( op1 == cf2_cmdHINTMASK )\n        {\n          /* consume the hint mask bytes which follow the operator */\n          cf2_hintmask_read( &hintMask,\n                             charstring,\n                             cf2_arrstack_size( &hStemHintArray ) +\n                               cf2_arrstack_size( &vStemHintArray ) );\n        }\n        else\n        {\n          /*\n           * Consume the counter mask bytes which follow the operator:\n           * Build a temporary hint map, just to place and lock those\n           * stems participating in the counter mask.  These are most\n           * likely the dominant hstems, and are grouped together in a\n           * few counter groups, not necessarily in correspondence\n           * with the hint groups.  This reduces the chances of\n           * conflicts between hstems that are initially placed in\n           * separate hint groups and then brought together.  The\n           * positions are copied back to `hStemHintArray', so we can\n           * discard `counterMask' and `counterHintMap'.\n           *\n           */\n          CF2_HintMapRec   counterHintMap;\n          CF2_HintMaskRec  counterMask;\n\n\n          cf2_hintmap_init( &counterHintMap,\n                            font,\n                            &glyphPath.initialHintMap,\n                            &glyphPath.hintMoves,\n                            scaleY );\n          cf2_hintmask_init( &counterMask, error );\n\n          cf2_hintmask_read( &counterMask,\n                             charstring,\n                             cf2_arrstack_size( &hStemHintArray ) +\n                               cf2_arrstack_size( &vStemHintArray ) );\n          cf2_hintmap_build( &counterHintMap,\n                             &hStemHintArray,\n                             &vStemHintArray,\n                             &counterMask,\n                             0,\n                             FALSE );\n        }\n        break;\n\n      case cf2_cmdRMOVETO:\n        FT_TRACE4(( \" rmoveto\\n\" ));\n\n        if ( cf2_stack_count( opStack ) > 2 && !haveWidth )\n          *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;\n\n        /* width is defined or default after this */\n        haveWidth = TRUE;\n\n        if ( font->decoder->width_only )\n            goto exit;\n\n        curY += cf2_stack_popFixed( opStack );\n        curX += cf2_stack_popFixed( opStack );\n\n        cf2_glyphpath_moveTo( &glyphPath, curX, curY );\n\n        break;\n\n      case cf2_cmdHMOVETO:\n        FT_TRACE4(( \" hmoveto\\n\" ));\n\n        if ( cf2_stack_count( opStack ) > 1 && !haveWidth )\n          *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;\n\n        /* width is defined or default after this */\n        haveWidth = TRUE;\n\n        if ( font->decoder->width_only )\n            goto exit;\n\n        curX += cf2_stack_popFixed( opStack );\n\n        cf2_glyphpath_moveTo( &glyphPath, curX, curY );\n\n        break;\n\n      case cf2_cmdRLINECURVE:\n        {\n          CF2_UInt  count = cf2_stack_count( opStack );\n          CF2_UInt  index = 0;\n\n\n          FT_TRACE4(( \" rlinecurve\\n\" ));\n\n          while ( index + 6 < count )\n          {\n            curX += cf2_stack_getReal( opStack, index + 0 );\n            curY += cf2_stack_getReal( opStack, index + 1 );\n\n            cf2_glyphpath_lineTo( &glyphPath, curX, curY );\n            index += 2;\n          }\n\n          while ( index < count )\n          {\n            CF2_Fixed  x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;\n            CF2_Fixed  y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;\n            CF2_Fixed  x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;\n            CF2_Fixed  y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;\n            CF2_Fixed  x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;\n            CF2_Fixed  y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;\n\n\n            cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );\n\n            curX   = x3;\n            curY   = y3;\n            index += 6;\n          }\n\n          cf2_stack_clear( opStack );\n        }\n        continue; /* no need to clear stack again */\n\n      case cf2_cmdVVCURVETO:\n        {\n          CF2_UInt  count = cf2_stack_count( opStack );\n          CF2_UInt  index = 0;\n\n\n          FT_TRACE4(( \" vvcurveto\\n\" ));\n\n          while ( index < count )\n          {\n            CF2_Fixed  x1, y1, x2, y2, x3, y3;\n\n\n            if ( ( count - index ) & 1 )\n            {\n              x1 = cf2_stack_getReal( opStack, index ) + curX;\n\n              ++index;\n            }\n            else\n              x1 = curX;\n\n            y1 = cf2_stack_getReal( opStack, index + 0 ) + curY;\n            x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;\n            y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;\n            x3 = x2;\n            y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;\n\n            cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );\n\n            curX   = x3;\n            curY   = y3;\n            index += 4;\n          }\n\n          cf2_stack_clear( opStack );\n        }\n        continue; /* no need to clear stack again */\n\n      case cf2_cmdHHCURVETO:\n        {\n          CF2_UInt  count = cf2_stack_count( opStack );\n          CF2_UInt  index = 0;\n\n\n          FT_TRACE4(( \" hhcurveto\\n\" ));\n\n          while ( index < count )\n          {\n            CF2_Fixed  x1, y1, x2, y2, x3, y3;\n\n\n            if ( ( count - index ) & 1 )\n            {\n              y1 = cf2_stack_getReal( opStack, index ) + curY;\n\n              ++index;\n            }\n            else\n              y1 = curY;\n\n            x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;\n            x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;\n            y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;\n            x3 = cf2_stack_getReal( opStack, index + 3 ) + x2;\n            y3 = y2;\n\n            cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );\n\n            curX   = x3;\n            curY   = y3;\n            index += 4;\n          }\n\n          cf2_stack_clear( opStack );\n        }\n        continue; /* no need to clear stack again */\n\n      case cf2_cmdVHCURVETO:\n      case cf2_cmdHVCURVETO:\n        {\n          CF2_UInt  count = cf2_stack_count( opStack );\n          CF2_UInt  index = 0;\n\n          FT_Bool  alternate = op1 == cf2_cmdHVCURVETO;\n\n\n          FT_TRACE4(( alternate ? \" hvcurveto\\n\" : \" vhcurveto\\n\" ));\n\n          while ( index < count )\n          {\n            CF2_Fixed x1, x2, x3, y1, y2, y3;\n\n\n            if ( alternate )\n            {\n              x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;\n              y1 = curY;\n              x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;\n              y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;\n              y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;\n\n              if ( count - index == 5 )\n              {\n                x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;\n\n                ++index;\n              }\n              else\n                x3 = x2;\n\n              alternate = FALSE;\n            }\n            else\n            {\n              x1 = curX;\n              y1 = cf2_stack_getReal( opStack, index + 0 ) + curY;\n              x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;\n              y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;\n              x3 = cf2_stack_getReal( opStack, index + 3 ) + x2;\n\n              if ( count - index == 5 )\n              {\n                y3 = cf2_stack_getReal( opStack, index + 4 ) + y2;\n\n                ++index;\n              }\n              else\n                y3 = y2;\n\n              alternate = TRUE;\n            }\n\n            cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );\n\n            curX   = x3;\n            curY   = y3;\n            index += 4;\n          }\n\n          cf2_stack_clear( opStack );\n        }\n        continue;     /* no need to clear stack again */\n\n      case cf2_cmdEXTENDEDNMBR:\n        {\n          CF2_Int  v;\n\n\n          v = (FT_Short)( ( cf2_buf_readByte( charstring ) << 8 ) |\n                            cf2_buf_readByte( charstring )        );\n\n          FT_TRACE4(( \" %d\", v ));\n\n          cf2_stack_pushInt( opStack, v );\n        }\n        continue;\n\n      default:\n        /* numbers */\n        {\n          if ( /* op1 >= 32 && */ op1 <= 246 )\n          {\n            CF2_Int  v;\n\n\n            v = op1 - 139;\n\n            FT_TRACE4(( \" %d\", v ));\n\n            /* -107 .. 107 */\n            cf2_stack_pushInt( opStack, v );\n          }\n\n          else if ( /* op1 >= 247 && */ op1 <= 250 )\n          {\n            CF2_Int  v;\n\n\n            v  = op1;\n            v -= 247;\n            v *= 256;\n            v += cf2_buf_readByte( charstring );\n            v += 108;\n\n            FT_TRACE4(( \" %d\", v ));\n\n            /* 108 .. 1131 */\n            cf2_stack_pushInt( opStack, v );\n          }\n\n          else if ( /* op1 >= 251 && */ op1 <= 254 )\n          {\n            CF2_Int  v;\n\n\n            v  = op1;\n            v -= 251;\n            v *= 256;\n            v += cf2_buf_readByte( charstring );\n            v  = -v - 108;\n\n            FT_TRACE4(( \" %d\", v ));\n\n            /* -1131 .. -108 */\n            cf2_stack_pushInt( opStack, v );\n          }\n\n          else /* op1 == 255 */\n          {\n            CF2_Fixed  v;\n\n\n            v = (CF2_Fixed)\n                  ( ( (FT_UInt32)cf2_buf_readByte( charstring ) << 24 ) |\n                    ( (FT_UInt32)cf2_buf_readByte( charstring ) << 16 ) |\n                    ( (FT_UInt32)cf2_buf_readByte( charstring ) <<  8 ) |\n                      (FT_UInt32)cf2_buf_readByte( charstring )         );\n\n            FT_TRACE4(( \" %.2f\", v / 65536.0 ));\n\n            cf2_stack_pushFixed( opStack, v );\n          }\n        }\n        continue;   /* don't clear stack */\n\n      } /* end of switch statement checking `op1' */\n\n      cf2_stack_clear( opStack );\n\n    } /* end of main interpreter loop */\n\n    /* we get here if the charstring ends without cf2_cmdENDCHAR */\n    FT_TRACE4(( \"cf2_interpT2CharString:\"\n                \"  charstring ends without ENDCHAR\\n\" ));\n\n  exit:\n    /* check whether last error seen is also the first one */\n    cf2_setError( error, lastError );\n\n    /* free resources from objects we've used */\n    cf2_glyphpath_finalize( &glyphPath );\n    cf2_arrstack_finalize( &vStemHintArray );\n    cf2_arrstack_finalize( &hStemHintArray );\n    cf2_arrstack_finalize( &subrStack );\n    cf2_stack_free( opStack );\n\n    FT_TRACE4(( \"\\n\" ));\n\n    return;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2intrp.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2font.h                                                              */\n/*                                                                         */\n/*    Adobe's CFF Interpreter (specification).                             */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2INTRP_H__\n#define __CF2INTRP_H__\n\n\n#include \"cf2ft.h\"\n#include \"cf2hints.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( void )\n  cf2_hintmask_init( CF2_HintMask  hintmask,\n                     FT_Error*     error );\n  FT_LOCAL( FT_Bool )\n  cf2_hintmask_isValid( const CF2_HintMask  hintmask );\n  FT_LOCAL( FT_Bool )\n  cf2_hintmask_isNew( const CF2_HintMask  hintmask );\n  FT_LOCAL( void )\n  cf2_hintmask_setNew( CF2_HintMask  hintmask,\n                       FT_Bool       val );\n  FT_LOCAL( FT_Byte* )\n  cf2_hintmask_getMaskPtr( CF2_HintMask  hintmask );\n  FT_LOCAL( void )\n  cf2_hintmask_setAll( CF2_HintMask  hintmask,\n                       size_t        bitCount );\n\n  FT_LOCAL( void )\n  cf2_interpT2CharString( CF2_Font              font,\n                          CF2_Buffer            charstring,\n                          CF2_OutlineCallbacks  callbacks,\n                          const FT_Vector*      translation,\n                          FT_Bool               doingSeac,\n                          CF2_Fixed             curX,\n                          CF2_Fixed             curY,\n                          CF2_Fixed*            width );\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2INTRP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2read.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2read.c                                                              */\n/*                                                                         */\n/*    Adobe's code for stream handling (body).                             */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"cf2ft.h\"\n#include FT_INTERNAL_DEBUG_H\n\n#include \"cf2glue.h\"\n\n#include \"cf2error.h\"\n\n\n  /* Define CF2_IO_FAIL as 1 to enable random errors and random */\n  /* value errors in I/O.                                       */\n#define CF2_IO_FAIL  0\n\n\n#if CF2_IO_FAIL\n\n  /* set the .00 value to a nonzero probability */\n  static int\n  randomError2( void )\n  {\n    /* for region buffer ReadByte (interp) function */\n    return (double)rand() / RAND_MAX < .00;\n  }\n\n  /* set the .00 value to a nonzero probability */\n  static CF2_Int\n  randomValue()\n  {\n    return (double)rand() / RAND_MAX < .00 ? rand() : 0;\n  }\n\n#endif /* CF2_IO_FAIL */\n\n\n  /* Region Buffer                                      */\n  /*                                                    */\n  /* Can be constructed from a copied buffer managed by */\n  /* `FCM_getDatablock'.                                */\n  /* Reads bytes with check for end of buffer.          */\n\n  /* reading past the end of the buffer sets error and returns zero */\n  FT_LOCAL_DEF( CF2_Int )\n  cf2_buf_readByte( CF2_Buffer  buf )\n  {\n    if ( buf->ptr < buf->end )\n    {\n#if CF2_IO_FAIL\n      if ( randomError2() )\n      {\n        CF2_SET_ERROR( buf->error, Invalid_Stream_Operation );\n        return 0;\n      }\n\n      return *(buf->ptr)++ + randomValue();\n#else\n      return *(buf->ptr)++;\n#endif\n    }\n    else\n    {\n      CF2_SET_ERROR( buf->error, Invalid_Stream_Operation );\n      return 0;\n    }\n  }\n\n\n  /* note: end condition can occur without error */\n  FT_LOCAL_DEF( FT_Bool )\n  cf2_buf_isEnd( CF2_Buffer  buf )\n  {\n    return (FT_Bool)( buf->ptr >= buf->end );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2read.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2read.h                                                              */\n/*                                                                         */\n/*    Adobe's code for stream handling (specification).                    */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2READ_H__\n#define __CF2READ_H__\n\n\nFT_BEGIN_HEADER\n\n\n  typedef struct  CF2_BufferRec_\n  {\n    FT_Error*       error;\n    const FT_Byte*  start;\n    const FT_Byte*  end;\n    const FT_Byte*  ptr;\n\n  } CF2_BufferRec, *CF2_Buffer;\n\n\n  FT_LOCAL( CF2_Int )\n  cf2_buf_readByte( CF2_Buffer  buf );\n  FT_LOCAL( FT_Bool )\n  cf2_buf_isEnd( CF2_Buffer  buf );\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2READ_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2stack.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2stack.c                                                             */\n/*                                                                         */\n/*    Adobe's code for emulating a CFF stack (body).                       */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"cf2ft.h\"\n#include FT_INTERNAL_DEBUG_H\n\n#include \"cf2glue.h\"\n#include \"cf2font.h\"\n#include \"cf2stack.h\"\n\n#include \"cf2error.h\"\n\n\n  /* Allocate and initialize an instance of CF2_Stack.       */\n  /* Note: This function returns NULL on error (does not set */\n  /* `error').                                               */\n  FT_LOCAL_DEF( CF2_Stack )\n  cf2_stack_init( FT_Memory  memory,\n                  FT_Error*  e )\n  {\n    FT_Error  error = FT_Err_Ok;     /* for FT_QNEW */\n\n    CF2_Stack  stack = NULL;\n\n\n    if ( !FT_QNEW( stack ) )\n    {\n      /* initialize the structure; FT_QNEW zeroes it */\n      stack->memory = memory;\n      stack->error  = e;\n      stack->top    = &stack->buffer[0]; /* empty stack */\n    }\n\n    return stack;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_stack_free( CF2_Stack  stack )\n  {\n    if ( stack )\n    {\n      FT_Memory  memory = stack->memory;\n\n\n      /* free the main structure */\n      FT_FREE( stack );\n    }\n  }\n\n\n  FT_LOCAL_DEF( CF2_UInt )\n  cf2_stack_count( CF2_Stack  stack )\n  {\n    return (CF2_UInt)( stack->top - &stack->buffer[0] );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_stack_pushInt( CF2_Stack  stack,\n                     CF2_Int    val )\n  {\n    if ( stack->top == &stack->buffer[CF2_OPERAND_STACK_SIZE] )\n    {\n      CF2_SET_ERROR( stack->error, Stack_Overflow );\n      return;     /* stack overflow */\n    }\n\n    stack->top->u.i  = val;\n    stack->top->type = CF2_NumberInt;\n    ++stack->top;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_stack_pushFixed( CF2_Stack  stack,\n                       CF2_Fixed  val )\n  {\n    if ( stack->top == &stack->buffer[CF2_OPERAND_STACK_SIZE] )\n    {\n      CF2_SET_ERROR( stack->error, Stack_Overflow );\n      return;     /* stack overflow */\n    }\n\n    stack->top->u.r  = val;\n    stack->top->type = CF2_NumberFixed;\n    ++stack->top;\n  }\n\n\n  /* this function is only allowed to pop an integer type */\n  FT_LOCAL_DEF( CF2_Int )\n  cf2_stack_popInt( CF2_Stack  stack )\n  {\n    if ( stack->top == &stack->buffer[0] )\n    {\n      CF2_SET_ERROR( stack->error, Stack_Underflow );\n      return 0;   /* underflow */\n    }\n    if ( stack->top[-1].type != CF2_NumberInt )\n    {\n      CF2_SET_ERROR( stack->error, Syntax_Error );\n      return 0;   /* type mismatch */\n    }\n\n    --stack->top;\n\n    return stack->top->u.i;\n  }\n\n\n  /* Note: type mismatch is silently cast */\n  /* TODO: check this */\n  FT_LOCAL_DEF( CF2_Fixed )\n  cf2_stack_popFixed( CF2_Stack  stack )\n  {\n    if ( stack->top == &stack->buffer[0] )\n    {\n      CF2_SET_ERROR( stack->error, Stack_Underflow );\n      return cf2_intToFixed( 0 );    /* underflow */\n    }\n\n    --stack->top;\n\n    switch ( stack->top->type )\n    {\n    case CF2_NumberInt:\n      return cf2_intToFixed( stack->top->u.i );\n    case CF2_NumberFrac:\n      return cf2_fracToFixed( stack->top->u.f );\n    default:\n      return stack->top->u.r;\n    }\n  }\n\n\n  /* Note: type mismatch is silently cast */\n  /* TODO: check this */\n  FT_LOCAL_DEF( CF2_Fixed )\n  cf2_stack_getReal( CF2_Stack  stack,\n                     CF2_UInt   idx )\n  {\n    FT_ASSERT( cf2_stack_count( stack ) <= CF2_OPERAND_STACK_SIZE );\n\n    if ( idx >= cf2_stack_count( stack ) )\n    {\n      CF2_SET_ERROR( stack->error, Stack_Overflow );\n      return cf2_intToFixed( 0 );    /* bounds error */\n    }\n\n    switch ( stack->buffer[idx].type )\n    {\n    case CF2_NumberInt:\n      return cf2_intToFixed( stack->buffer[idx].u.i );\n    case CF2_NumberFrac:\n      return cf2_fracToFixed( stack->buffer[idx].u.f );\n    default:\n      return stack->buffer[idx].u.r;\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cf2_stack_clear( CF2_Stack  stack )\n  {\n    stack->top = &stack->buffer[0];\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2stack.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2stack.h                                                             */\n/*                                                                         */\n/*    Adobe's code for emulating a CFF stack (specification).              */\n/*                                                                         */\n/*  Copyright 2007-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2STACK_H__\n#define __CF2STACK_H__\n\n\nFT_BEGIN_HEADER\n\n\n  /* CFF operand stack; specified maximum of 48 or 192 values */\n  typedef struct  CF2_StackNumber_\n  {\n    union\n    {\n      CF2_Fixed  r;      /* 16.16 fixed point */\n      CF2_Frac   f;      /* 2.30 fixed point (for font matrix) */\n      CF2_Int    i;\n    } u;\n\n    CF2_NumberType  type;\n\n  } CF2_StackNumber;\n\n\n  typedef struct  CF2_StackRec_\n  {\n    FT_Memory         memory;\n    FT_Error*         error;\n    CF2_StackNumber   buffer[CF2_OPERAND_STACK_SIZE];\n    CF2_StackNumber*  top;\n\n  } CF2_StackRec, *CF2_Stack;\n\n\n  FT_LOCAL( CF2_Stack )\n  cf2_stack_init( FT_Memory  memory,\n                  FT_Error*  error );\n  FT_LOCAL( void )\n  cf2_stack_free( CF2_Stack  stack );\n\n  FT_LOCAL( CF2_UInt )\n  cf2_stack_count( CF2_Stack  stack );\n\n  FT_LOCAL( void )\n  cf2_stack_pushInt( CF2_Stack  stack,\n                     CF2_Int    val );\n  FT_LOCAL( void )\n  cf2_stack_pushFixed( CF2_Stack  stack,\n                       CF2_Fixed  val );\n\n  FT_LOCAL( CF2_Int )\n  cf2_stack_popInt( CF2_Stack  stack );\n  FT_LOCAL( CF2_Fixed )\n  cf2_stack_popFixed( CF2_Stack  stack );\n\n  FT_LOCAL( CF2_Fixed )\n  cf2_stack_getReal( CF2_Stack  stack,\n                     CF2_UInt   idx );\n\n  FT_LOCAL( void )\n  cf2_stack_clear( CF2_Stack  stack );\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2STACK_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cf2types.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cf2types.h                                                             */\n/*                                                                         */\n/*    Adobe's code for defining data types (specification only).           */\n/*                                                                         */\n/*  Copyright 2011-2013 Adobe Systems Incorporated.                        */\n/*                                                                         */\n/*  This software, and all works of authorship, whether in source or       */\n/*  object code form as indicated by the copyright notice(s) included      */\n/*  herein (collectively, the \"Work\") is made available, and may only be   */\n/*  used, modified, and distributed under the FreeType Project License,    */\n/*  LICENSE.TXT.  Additionally, subject to the terms and conditions of the */\n/*  FreeType Project License, each contributor to the Work hereby grants   */\n/*  to any individual or legal entity exercising permissions granted by    */\n/*  the FreeType Project License and this section (hereafter, \"You\" or     */\n/*  \"Your\") a perpetual, worldwide, non-exclusive, no-charge,              */\n/*  royalty-free, irrevocable (except as stated in this section) patent    */\n/*  license to make, have made, use, offer to sell, sell, import, and      */\n/*  otherwise transfer the Work, where such license applies only to those  */\n/*  patent claims licensable by such contributor that are necessarily      */\n/*  infringed by their contribution(s) alone or by combination of their    */\n/*  contribution(s) with the Work to which such contribution(s) was        */\n/*  submitted.  If You institute patent litigation against any entity      */\n/*  (including a cross-claim or counterclaim in a lawsuit) alleging that   */\n/*  the Work or a contribution incorporated within the Work constitutes    */\n/*  direct or contributory patent infringement, then any patent licenses   */\n/*  granted to You under this License for that Work shall terminate as of  */\n/*  the date such litigation is filed.                                     */\n/*                                                                         */\n/*  By using, modifying, or distributing the Work you indicate that you    */\n/*  have read and understood the terms and conditions of the               */\n/*  FreeType Project License as well as those provided in this section,    */\n/*  and you accept them fully.                                             */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CF2TYPES_H__\n#define __CF2TYPES_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*\n   * The data models that we expect to support are as follows:\n   *\n   *   name  char short int long long-long pointer example\n   *  -----------------------------------------------------\n   *   ILP32  8    16    32  32     64*      32    32-bit MacOS, x86\n   *   LLP64  8    16    32  32     64       64    x64\n   *   LP64   8    16    32  64     64       64    64-bit MacOS\n   *\n   *    *) type may be supported by emulation on a 32-bit architecture\n   *\n   */\n\n\n  /* integers at least 32 bits wide */\n#define CF2_UInt  FT_UFast\n#define CF2_Int   FT_Fast\n\n\n  /* fixed-float numbers */\n  typedef FT_Int32  CF2_F16Dot16;\n\n\nFT_END_HEADER\n\n\n#endif /* __CF2TYPES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cff.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cff.c                                                                  */\n/*                                                                         */\n/*    FreeType OpenType driver component (body only).                      */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n\n#include \"cffpic.c\"\n#include \"cffdrivr.c\"\n#include \"cffparse.c\"\n#include \"cffload.c\"\n#include \"cffobjs.c\"\n#include \"cffgload.c\"\n#include \"cffcmap.c\"\n\n#include \"cf2arrst.c\"\n#include \"cf2blues.c\"\n#include \"cf2error.c\"\n#include \"cf2font.c\"\n#include \"cf2ft.c\"\n#include \"cf2hints.c\"\n#include \"cf2intrp.c\"\n#include \"cf2read.c\"\n#include \"cf2stack.c\"\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffcmap.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffcmap.c                                                              */\n/*                                                                         */\n/*    CFF character mapping table (cmap) support (body).                   */\n/*                                                                         */\n/*  Copyright 2002-2007, 2010, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include \"cffcmap.h\"\n#include \"cffload.h\"\n\n#include \"cfferrs.h\"\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****           CFF STANDARD (AND EXPERT) ENCODING CMAPS            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_CALLBACK_DEF( FT_Error )\n  cff_cmap_encoding_init( CFF_CMapStd  cmap,\n                          FT_Pointer   pointer )\n  {\n    TT_Face       face     = (TT_Face)FT_CMAP_FACE( cmap );\n    CFF_Font      cff      = (CFF_Font)face->extra.data;\n    CFF_Encoding  encoding = &cff->encoding;\n\n    FT_UNUSED( pointer );\n\n\n    cmap->gids  = encoding->codes;\n\n    return 0;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  cff_cmap_encoding_done( CFF_CMapStd  cmap )\n  {\n    cmap->gids  = NULL;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  cff_cmap_encoding_char_index( CFF_CMapStd  cmap,\n                                FT_UInt32    char_code )\n  {\n    FT_UInt  result = 0;\n\n\n    if ( char_code < 256 )\n      result = cmap->gids[char_code];\n\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  cff_cmap_encoding_char_next( CFF_CMapStd   cmap,\n                               FT_UInt32    *pchar_code )\n  {\n    FT_UInt    result    = 0;\n    FT_UInt32  char_code = *pchar_code;\n\n\n    *pchar_code = 0;\n\n    if ( char_code < 255 )\n    {\n      FT_UInt  code = (FT_UInt)(char_code + 1);\n\n\n      for (;;)\n      {\n        if ( code >= 256 )\n          break;\n\n        result = cmap->gids[code];\n        if ( result != 0 )\n        {\n          *pchar_code = code;\n          break;\n        }\n\n        code++;\n      }\n    }\n    return result;\n  }\n\n\n  FT_DEFINE_CMAP_CLASS(cff_cmap_encoding_class_rec,\n    sizeof ( CFF_CMapStdRec ),\n\n    (FT_CMap_InitFunc)     cff_cmap_encoding_init,\n    (FT_CMap_DoneFunc)     cff_cmap_encoding_done,\n    (FT_CMap_CharIndexFunc)cff_cmap_encoding_char_index,\n    (FT_CMap_CharNextFunc) cff_cmap_encoding_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****              CFF SYNTHETIC UNICODE ENCODING CMAP              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_CALLBACK_DEF( const char* )\n  cff_sid_to_glyph_name( TT_Face  face,\n                         FT_UInt  idx )\n  {\n    CFF_Font     cff     = (CFF_Font)face->extra.data;\n    CFF_Charset  charset = &cff->charset;\n    FT_UInt      sid     = charset->sids[idx];\n\n\n    return cff_index_get_sid_string( cff, sid );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  cff_cmap_unicode_init( PS_Unicodes  unicodes,\n                         FT_Pointer   pointer )\n  {\n    TT_Face             face    = (TT_Face)FT_CMAP_FACE( unicodes );\n    FT_Memory           memory  = FT_FACE_MEMORY( face );\n    CFF_Font            cff     = (CFF_Font)face->extra.data;\n    CFF_Charset         charset = &cff->charset;\n    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)cff->psnames;\n\n    FT_UNUSED( pointer );\n\n\n    /* can't build Unicode map for CID-keyed font */\n    /* because we don't know glyph names.         */\n    if ( !charset->sids )\n      return FT_THROW( No_Unicode_Glyph_Name );\n\n    return psnames->unicodes_init( memory,\n                                   unicodes,\n                                   cff->num_glyphs,\n                                   (PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,\n                                   (PS_FreeGlyphNameFunc)NULL,\n                                   (FT_Pointer)face );\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  cff_cmap_unicode_done( PS_Unicodes  unicodes )\n  {\n    FT_Face    face   = FT_CMAP_FACE( unicodes );\n    FT_Memory  memory = FT_FACE_MEMORY( face );\n\n\n    FT_FREE( unicodes->maps );\n    unicodes->num_maps = 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  cff_cmap_unicode_char_index( PS_Unicodes  unicodes,\n                               FT_UInt32    char_code )\n  {\n    TT_Face             face    = (TT_Face)FT_CMAP_FACE( unicodes );\n    CFF_Font            cff     = (CFF_Font)face->extra.data;\n    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)cff->psnames;\n\n\n    return psnames->unicodes_char_index( unicodes, char_code );\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  cff_cmap_unicode_char_next( PS_Unicodes  unicodes,\n                              FT_UInt32   *pchar_code )\n  {\n    TT_Face             face    = (TT_Face)FT_CMAP_FACE( unicodes );\n    CFF_Font            cff     = (CFF_Font)face->extra.data;\n    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)cff->psnames;\n\n\n    return psnames->unicodes_char_next( unicodes, pchar_code );\n  }\n\n\n  FT_DEFINE_CMAP_CLASS(cff_cmap_unicode_class_rec,\n    sizeof ( PS_UnicodesRec ),\n\n    (FT_CMap_InitFunc)     cff_cmap_unicode_init,\n    (FT_CMap_DoneFunc)     cff_cmap_unicode_done,\n    (FT_CMap_CharIndexFunc)cff_cmap_unicode_char_index,\n    (FT_CMap_CharNextFunc) cff_cmap_unicode_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  )\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffcmap.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffcmap.h                                                              */\n/*                                                                         */\n/*    CFF character mapping table (cmap) support (specification).          */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2006 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CFFCMAP_H__\n#define __CFFCMAP_H__\n\n#include \"cffobjs.h\"\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****          TYPE1 STANDARD (AND EXPERT) ENCODING CMAPS           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* standard (and expert) encoding cmaps */\n  typedef struct CFF_CMapStdRec_*  CFF_CMapStd;\n\n  typedef struct  CFF_CMapStdRec_\n  {\n    FT_CMapRec  cmap;\n    FT_UShort*  gids;   /* up to 256 elements */\n\n  } CFF_CMapStdRec;\n\n\n  FT_DECLARE_CMAP_CLASS(cff_cmap_encoding_class_rec)\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****               CFF SYNTHETIC UNICODE ENCODING CMAP             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* unicode (synthetic) cmaps */\n\n  FT_DECLARE_CMAP_CLASS(cff_cmap_unicode_class_rec)\n\n\nFT_END_HEADER\n\n#endif /* __CFFCMAP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffdrivr.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffdrivr.c                                                             */\n/*                                                                         */\n/*    OpenType font driver implementation (body).                          */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_SFNT_H\n#include FT_SERVICE_CID_H\n#include FT_SERVICE_POSTSCRIPT_INFO_H\n#include FT_SERVICE_POSTSCRIPT_NAME_H\n#include FT_SERVICE_TT_CMAP_H\n\n#include \"cffdrivr.h\"\n#include \"cffgload.h\"\n#include \"cffload.h\"\n#include \"cffcmap.h\"\n#include \"cffparse.h\"\n\n#include \"cfferrs.h\"\n#include \"cffpic.h\"\n\n#include FT_SERVICE_XFREE86_NAME_H\n#include FT_SERVICE_GLYPH_DICT_H\n#include FT_SERVICE_PROPERTIES_H\n#include FT_CFF_DRIVER_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cffdriver\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                          F A C E S                              ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n#undef  PAIR_TAG\n#define PAIR_TAG( left, right )  ( ( (FT_ULong)left << 16 ) | \\\n                                     (FT_ULong)right        )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cff_get_kerning                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A driver method used to return the kerning vector between two      */\n  /*    glyphs of the same face.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: A handle to the source face object.                 */\n  /*                                                                       */\n  /*    left_glyph  :: The index of the left glyph in the kern pair.       */\n  /*                                                                       */\n  /*    right_glyph :: The index of the right glyph in the kern pair.      */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    kerning     :: The kerning vector.  This is in font units for      */\n  /*                   scalable formats, and in pixels for fixed-sizes     */\n  /*                   formats.                                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only horizontal layouts (left-to-right & right-to-left) are        */\n  /*    supported by this function.  Other layouts, or more sophisticated  */\n  /*    kernings, are out of scope of this method (the basic driver        */\n  /*    interface is meant to be simple).                                  */\n  /*                                                                       */\n  /*    They can be implemented by format-specific interfaces.             */\n  /*                                                                       */\n  FT_CALLBACK_DEF( FT_Error )\n  cff_get_kerning( FT_Face     ttface,          /* TT_Face */\n                   FT_UInt     left_glyph,\n                   FT_UInt     right_glyph,\n                   FT_Vector*  kerning )\n  {\n    TT_Face       face = (TT_Face)ttface;\n    SFNT_Service  sfnt = (SFNT_Service)face->sfnt;\n\n\n    kerning->x = 0;\n    kerning->y = 0;\n\n    if ( sfnt )\n      kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph );\n\n    return FT_Err_Ok;\n  }\n\n\n#undef PAIR_TAG\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cff_glyph_load                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A driver method used to load a glyph within a given glyph slot.    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    slot        :: A handle to the target slot object where the glyph  */\n  /*                   will be loaded.                                     */\n  /*                                                                       */\n  /*    size        :: A handle to the source face size at which the glyph */\n  /*                   must be scaled, loaded, etc.                        */\n  /*                                                                       */\n  /*    glyph_index :: The index of the glyph in the font file.            */\n  /*                                                                       */\n  /*    load_flags  :: A flag indicating what to load for this glyph.  The */\n  /*                   FT_LOAD_??? constants can be used to control the    */\n  /*                   glyph loading process (e.g., whether the outline    */\n  /*                   should be scaled, whether to load bitmaps or not,   */\n  /*                   whether to hint the outline, etc).                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_CALLBACK_DEF( FT_Error )\n  cff_glyph_load( FT_GlyphSlot  cffslot,      /* CFF_GlyphSlot */\n                  FT_Size       cffsize,      /* CFF_Size      */\n                  FT_UInt       glyph_index,\n                  FT_Int32      load_flags )\n  {\n    FT_Error       error;\n    CFF_GlyphSlot  slot = (CFF_GlyphSlot)cffslot;\n    CFF_Size       size = (CFF_Size)cffsize;\n\n\n    if ( !slot )\n      return FT_THROW( Invalid_Slot_Handle );\n\n    FT_TRACE1(( \"cff_glyph_load: glyph index %d\\n\", glyph_index ));\n\n    /* check whether we want a scaled outline or bitmap */\n    if ( !size )\n      load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;\n\n    /* reset the size object if necessary */\n    if ( load_flags & FT_LOAD_NO_SCALE )\n      size = NULL;\n\n    if ( size )\n    {\n      /* these two objects must have the same parent */\n      if ( cffsize->face != cffslot->face )\n        return FT_THROW( Invalid_Face_Handle );\n    }\n\n    /* now load the glyph outline if necessary */\n    error = cff_slot_load( slot, size, glyph_index, load_flags );\n\n    /* force drop-out mode to 2 - irrelevant now */\n    /* slot->outline.dropout_mode = 2; */\n\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  cff_get_advances( FT_Face    face,\n                    FT_UInt    start,\n                    FT_UInt    count,\n                    FT_Int32   flags,\n                    FT_Fixed*  advances )\n  {\n    FT_UInt       nn;\n    FT_Error      error = FT_Err_Ok;\n    FT_GlyphSlot  slot  = face->glyph;\n\n\n    flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY;\n\n    for ( nn = 0; nn < count; nn++ )\n    {\n      error = cff_glyph_load( slot, face->size, start + nn, flags );\n      if ( error )\n        break;\n\n      advances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT )\n                     ? slot->linearVertAdvance\n                     : slot->linearHoriAdvance;\n    }\n\n    return error;\n  }\n\n\n  /*\n   *  GLYPH DICT SERVICE\n   *\n   */\n\n  static FT_Error\n  cff_get_glyph_name( CFF_Face    face,\n                      FT_UInt     glyph_index,\n                      FT_Pointer  buffer,\n                      FT_UInt     buffer_max )\n  {\n    CFF_Font    font   = (CFF_Font)face->extra.data;\n    FT_String*  gname;\n    FT_UShort   sid;\n    FT_Error    error;\n\n\n    if ( !font->psnames )\n    {\n      FT_ERROR(( \"cff_get_glyph_name:\"\n                 \" cannot get glyph name from CFF & CEF fonts\\n\"\n                 \"                   \"\n                 \" without the `PSNames' module\\n\" ));\n      error = FT_THROW( Missing_Module );\n      goto Exit;\n    }\n\n    /* first, locate the sid in the charset table */\n    sid = font->charset.sids[glyph_index];\n\n    /* now, lookup the name itself */\n    gname = cff_index_get_sid_string( font, sid );\n\n    if ( gname )\n      FT_STRCPYN( buffer, gname, buffer_max );\n\n    error = FT_Err_Ok;\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_UInt\n  cff_get_name_index( CFF_Face    face,\n                      FT_String*  glyph_name )\n  {\n    CFF_Font            cff;\n    CFF_Charset         charset;\n    FT_Service_PsCMaps  psnames;\n    FT_String*          name;\n    FT_UShort           sid;\n    FT_UInt             i;\n\n\n    cff     = (CFF_FontRec *)face->extra.data;\n    charset = &cff->charset;\n\n    FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );\n    if ( !psnames )\n      return 0;\n\n    for ( i = 0; i < cff->num_glyphs; i++ )\n    {\n      sid = charset->sids[i];\n\n      if ( sid > 390 )\n        name = cff_index_get_string( cff, sid - 391 );\n      else\n        name = (FT_String *)psnames->adobe_std_strings( sid );\n\n      if ( !name )\n        continue;\n\n      if ( !ft_strcmp( glyph_name, name ) )\n        return i;\n    }\n\n    return 0;\n  }\n\n\n  FT_DEFINE_SERVICE_GLYPHDICTREC(\n    cff_service_glyph_dict,\n    (FT_GlyphDict_GetNameFunc)  cff_get_glyph_name,\n    (FT_GlyphDict_NameIndexFunc)cff_get_name_index\n  )\n\n\n  /*\n   *  POSTSCRIPT INFO SERVICE\n   *\n   */\n\n  static FT_Int\n  cff_ps_has_glyph_names( FT_Face  face )\n  {\n    return ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) > 0;\n  }\n\n\n  static FT_Error\n  cff_ps_get_font_info( CFF_Face         face,\n                        PS_FontInfoRec*  afont_info )\n  {\n    CFF_Font  cff   = (CFF_Font)face->extra.data;\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( cff && cff->font_info == NULL )\n    {\n      CFF_FontRecDict  dict   = &cff->top_font.font_dict;\n      PS_FontInfoRec  *font_info = NULL;\n      FT_Memory        memory = face->root.memory;\n\n\n      if ( FT_ALLOC( font_info, sizeof ( *font_info ) ) )\n        goto Fail;\n\n      font_info->version     = cff_index_get_sid_string( cff,\n                                                         dict->version );\n      font_info->notice      = cff_index_get_sid_string( cff,\n                                                         dict->notice );\n      font_info->full_name   = cff_index_get_sid_string( cff,\n                                                         dict->full_name );\n      font_info->family_name = cff_index_get_sid_string( cff,\n                                                         dict->family_name );\n      font_info->weight      = cff_index_get_sid_string( cff,\n                                                         dict->weight );\n      font_info->italic_angle        = dict->italic_angle;\n      font_info->is_fixed_pitch      = dict->is_fixed_pitch;\n      font_info->underline_position  = (FT_Short)dict->underline_position;\n      font_info->underline_thickness = (FT_Short)dict->underline_thickness;\n\n      cff->font_info = font_info;\n    }\n\n    if ( cff )\n      *afont_info = *cff->font_info;\n\n  Fail:\n    return error;\n  }\n\n\n  FT_DEFINE_SERVICE_PSINFOREC(\n    cff_service_ps_info,\n    (PS_GetFontInfoFunc)   cff_ps_get_font_info,\n    (PS_GetFontExtraFunc)  NULL,\n    (PS_HasGlyphNamesFunc) cff_ps_has_glyph_names,\n    (PS_GetFontPrivateFunc)NULL,        /* unsupported with CFF fonts */\n    (PS_GetFontValueFunc)  NULL         /* not implemented            */\n  )\n\n\n  /*\n   *  POSTSCRIPT NAME SERVICE\n   *\n   */\n\n  static const char*\n  cff_get_ps_name( CFF_Face  face )\n  {\n    CFF_Font  cff = (CFF_Font)face->extra.data;\n\n\n    return (const char*)cff->font_name;\n  }\n\n\n  FT_DEFINE_SERVICE_PSFONTNAMEREC(\n    cff_service_ps_name,\n    (FT_PsName_GetFunc)cff_get_ps_name\n  )\n\n\n  /*\n   * TT CMAP INFO\n   *\n   * If the charmap is a synthetic Unicode encoding cmap or\n   * a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO\n   * service defined in SFNT module.\n   *\n   * Otherwise call the service function in the sfnt module.\n   *\n   */\n  static FT_Error\n  cff_get_cmap_info( FT_CharMap    charmap,\n                     TT_CMapInfo  *cmap_info )\n  {\n    FT_CMap   cmap  = FT_CMAP( charmap );\n    FT_Error  error = FT_Err_Ok;\n\n    FT_Face     face    = FT_CMAP_FACE( cmap );\n    FT_Library  library = FT_FACE_LIBRARY( face );\n\n\n    cmap_info->language = 0;\n    cmap_info->format   = 0;\n\n    if ( cmap->clazz != &CFF_CMAP_ENCODING_CLASS_REC_GET &&\n         cmap->clazz != &CFF_CMAP_UNICODE_CLASS_REC_GET  )\n    {\n      FT_Module           sfnt    = FT_Get_Module( library, \"sfnt\" );\n      FT_Service_TTCMaps  service =\n        (FT_Service_TTCMaps)ft_module_get_service( sfnt,\n                                                   FT_SERVICE_ID_TT_CMAP );\n\n\n      if ( service && service->get_cmap_info )\n        error = service->get_cmap_info( charmap, cmap_info );\n    }\n\n    return error;\n  }\n\n\n  FT_DEFINE_SERVICE_TTCMAPSREC(\n    cff_service_get_cmap_info,\n    (TT_CMap_Info_GetFunc)cff_get_cmap_info\n  )\n\n\n  /*\n   *  CID INFO SERVICE\n   *\n   */\n  static FT_Error\n  cff_get_ros( CFF_Face      face,\n               const char*  *registry,\n               const char*  *ordering,\n               FT_Int       *supplement )\n  {\n    FT_Error  error = FT_Err_Ok;\n    CFF_Font  cff   = (CFF_Font)face->extra.data;\n\n\n    if ( cff )\n    {\n      CFF_FontRecDict  dict = &cff->top_font.font_dict;\n\n\n      if ( dict->cid_registry == 0xFFFFU )\n      {\n        error = FT_THROW( Invalid_Argument );\n        goto Fail;\n      }\n\n      if ( registry )\n      {\n        if ( cff->registry == NULL )\n          cff->registry = cff_index_get_sid_string( cff,\n                                                    dict->cid_registry );\n        *registry = cff->registry;\n      }\n\n      if ( ordering )\n      {\n        if ( cff->ordering == NULL )\n          cff->ordering = cff_index_get_sid_string( cff,\n                                                    dict->cid_ordering );\n        *ordering = cff->ordering;\n      }\n\n      /*\n       * XXX: According to Adobe TechNote #5176, the supplement in CFF\n       *      can be a real number. We truncate it to fit public API\n       *      since freetype-2.3.6.\n       */\n      if ( supplement )\n      {\n        if ( dict->cid_supplement < FT_INT_MIN ||\n             dict->cid_supplement > FT_INT_MAX )\n          FT_TRACE1(( \"cff_get_ros: too large supplement %d is truncated\\n\",\n                      dict->cid_supplement ));\n        *supplement = (FT_Int)dict->cid_supplement;\n      }\n    }\n\n  Fail:\n    return error;\n  }\n\n\n  static FT_Error\n  cff_get_is_cid( CFF_Face  face,\n                  FT_Bool  *is_cid )\n  {\n    FT_Error  error = FT_Err_Ok;\n    CFF_Font  cff   = (CFF_Font)face->extra.data;\n\n\n    *is_cid = 0;\n\n    if ( cff )\n    {\n      CFF_FontRecDict  dict = &cff->top_font.font_dict;\n\n\n      if ( dict->cid_registry != 0xFFFFU )\n        *is_cid = 1;\n    }\n\n    return error;\n  }\n\n\n  static FT_Error\n  cff_get_cid_from_glyph_index( CFF_Face  face,\n                                FT_UInt   glyph_index,\n                                FT_UInt  *cid )\n  {\n    FT_Error  error = FT_Err_Ok;\n    CFF_Font  cff;\n\n\n    cff = (CFF_Font)face->extra.data;\n\n    if ( cff )\n    {\n      FT_UInt          c;\n      CFF_FontRecDict  dict = &cff->top_font.font_dict;\n\n\n      if ( dict->cid_registry == 0xFFFFU )\n      {\n        error = FT_THROW( Invalid_Argument );\n        goto Fail;\n      }\n\n      if ( glyph_index > cff->num_glyphs )\n      {\n        error = FT_THROW( Invalid_Argument );\n        goto Fail;\n      }\n\n      c = cff->charset.sids[glyph_index];\n\n      if ( cid )\n        *cid = c;\n    }\n\n  Fail:\n    return error;\n  }\n\n\n  FT_DEFINE_SERVICE_CIDREC(\n    cff_service_cid_info,\n    (FT_CID_GetRegistryOrderingSupplementFunc)cff_get_ros,\n    (FT_CID_GetIsInternallyCIDKeyedFunc)      cff_get_is_cid,\n    (FT_CID_GetCIDFromGlyphIndexFunc)         cff_get_cid_from_glyph_index\n  )\n\n\n  /*\n   *  PROPERTY SERVICE\n   *\n   */\n  static FT_Error\n  cff_property_set( FT_Module    module,         /* CFF_Driver */\n                    const char*  property_name,\n                    const void*  value )\n  {\n    FT_Error    error  = FT_Err_Ok;\n    CFF_Driver  driver = (CFF_Driver)module;\n\n\n    if ( !ft_strcmp( property_name, \"darkening-parameters\" ) )\n    {\n      FT_Int*  darken_params = (FT_Int*)value;\n\n      FT_Int  x1 = darken_params[0];\n      FT_Int  y1 = darken_params[1];\n      FT_Int  x2 = darken_params[2];\n      FT_Int  y2 = darken_params[3];\n      FT_Int  x3 = darken_params[4];\n      FT_Int  y3 = darken_params[5];\n      FT_Int  x4 = darken_params[6];\n      FT_Int  y4 = darken_params[7];\n\n\n      if ( x1 < 0   || x2 < 0   || x3 < 0   || x4 < 0   ||\n           y1 < 0   || y2 < 0   || y3 < 0   || y4 < 0   ||\n           x1 > x2  || x2 > x3  || x3 > x4              ||\n           y1 > 500 || y2 > 500 || y3 > 500 || y4 > 500 )\n        return FT_THROW( Invalid_Argument );\n\n      driver->darken_params[0] = x1;\n      driver->darken_params[1] = y1;\n      driver->darken_params[2] = x2;\n      driver->darken_params[3] = y2;\n      driver->darken_params[4] = x3;\n      driver->darken_params[5] = y3;\n      driver->darken_params[6] = x4;\n      driver->darken_params[7] = y4;\n\n      return error;\n    }\n    else if ( !ft_strcmp( property_name, \"hinting-engine\" ) )\n    {\n      FT_UInt*  hinting_engine = (FT_UInt*)value;\n\n\n#ifndef CFF_CONFIG_OPTION_OLD_ENGINE\n      if ( *hinting_engine != FT_CFF_HINTING_ADOBE )\n        error = FT_ERR( Unimplemented_Feature );\n      else\n#endif\n        driver->hinting_engine = *hinting_engine;\n\n      return error;\n    }\n    else if ( !ft_strcmp( property_name, \"no-stem-darkening\" ) )\n    {\n      FT_Bool*  no_stem_darkening = (FT_Bool*)value;\n\n\n      driver->no_stem_darkening = *no_stem_darkening;\n\n      return error;\n    }\n\n    FT_TRACE0(( \"cff_property_set: missing property `%s'\\n\",\n                property_name ));\n    return FT_THROW( Missing_Property );\n  }\n\n\n  static FT_Error\n  cff_property_get( FT_Module    module,         /* CFF_Driver */\n                    const char*  property_name,\n                    const void*  value )\n  {\n    FT_Error    error  = FT_Err_Ok;\n    CFF_Driver  driver = (CFF_Driver)module;\n\n\n    if ( !ft_strcmp( property_name, \"darkening-parameters\" ) )\n    {\n      FT_Int*  darken_params = driver->darken_params;\n      FT_Int*  val           = (FT_Int*)value;\n\n\n      val[0] = darken_params[0];\n      val[1] = darken_params[1];\n      val[2] = darken_params[2];\n      val[3] = darken_params[3];\n      val[4] = darken_params[4];\n      val[5] = darken_params[5];\n      val[6] = darken_params[6];\n      val[7] = darken_params[7];\n\n      return error;\n    }\n    else if ( !ft_strcmp( property_name, \"hinting-engine\" ) )\n    {\n      FT_UInt   hinting_engine    = driver->hinting_engine;\n      FT_UInt*  val               = (FT_UInt*)value;\n\n\n      *val = hinting_engine;\n\n      return error;\n    }\n    else if ( !ft_strcmp( property_name, \"no-stem-darkening\" ) )\n    {\n      FT_Bool   no_stem_darkening = driver->no_stem_darkening;\n      FT_Bool*  val               = (FT_Bool*)value;\n\n\n      *val = no_stem_darkening;\n\n      return error;\n    }\n\n    FT_TRACE0(( \"cff_property_get: missing property `%s'\\n\",\n                property_name ));\n    return FT_THROW( Missing_Property );\n  }\n\n\n  FT_DEFINE_SERVICE_PROPERTIESREC(\n    cff_service_properties,\n    (FT_Properties_SetFunc)cff_property_set,\n    (FT_Properties_GetFunc)cff_property_get )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                D R I V E R  I N T E R F A C E                   ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES\n  FT_DEFINE_SERVICEDESCREC7(\n    cff_services,\n    FT_SERVICE_ID_XF86_NAME,            FT_XF86_FORMAT_CFF,\n    FT_SERVICE_ID_POSTSCRIPT_INFO,      &CFF_SERVICE_PS_INFO_GET,\n    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,\n    FT_SERVICE_ID_GLYPH_DICT,           &CFF_SERVICE_GLYPH_DICT_GET,\n    FT_SERVICE_ID_TT_CMAP,              &CFF_SERVICE_GET_CMAP_INFO_GET,\n    FT_SERVICE_ID_CID,                  &CFF_SERVICE_CID_INFO_GET,\n    FT_SERVICE_ID_PROPERTIES,           &CFF_SERVICE_PROPERTIES_GET\n  )\n#else\n  FT_DEFINE_SERVICEDESCREC6(\n    cff_services,\n    FT_SERVICE_ID_XF86_NAME,            FT_XF86_FORMAT_CFF,\n    FT_SERVICE_ID_POSTSCRIPT_INFO,      &CFF_SERVICE_PS_INFO_GET,\n    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,\n    FT_SERVICE_ID_TT_CMAP,              &CFF_SERVICE_GET_CMAP_INFO_GET,\n    FT_SERVICE_ID_CID,                  &CFF_SERVICE_CID_INFO_GET,\n    FT_SERVICE_ID_PROPERTIES,           &CFF_SERVICE_PROPERTIES_GET\n  )\n#endif\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  cff_get_interface( FT_Module    driver,       /* CFF_Driver */\n                     const char*  module_interface )\n  {\n    FT_Library           library;\n    FT_Module            sfnt;\n    FT_Module_Interface  result;\n\n\n    /* CFF_SERVICES_GET dereferences `library' in PIC mode */\n#ifdef FT_CONFIG_OPTION_PIC\n    if ( !driver )\n      return NULL;\n    library = driver->library;\n    if ( !library )\n      return NULL;\n#endif\n\n    result = ft_service_list_lookup( CFF_SERVICES_GET, module_interface );\n    if ( result != NULL )\n      return result;\n\n    /* `driver' is not yet evaluated in non-PIC mode */\n#ifndef FT_CONFIG_OPTION_PIC\n    if ( !driver )\n      return NULL;\n    library = driver->library;\n    if ( !library )\n      return NULL;\n#endif\n\n    /* we pass our request to the `sfnt' module */\n    sfnt = FT_Get_Module( library, \"sfnt\" );\n\n    return sfnt ? sfnt->clazz->get_interface( sfnt, module_interface ) : 0;\n  }\n\n\n  /* The FT_DriverInterface structure is defined in ftdriver.h. */\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n#define CFF_SIZE_SELECT cff_size_select\n#else\n#define CFF_SIZE_SELECT 0\n#endif\n\n  FT_DEFINE_DRIVER(\n    cff_driver_class,\n\n      FT_MODULE_FONT_DRIVER       |\n      FT_MODULE_DRIVER_SCALABLE   |\n      FT_MODULE_DRIVER_HAS_HINTER,\n\n      sizeof ( CFF_DriverRec ),\n      \"cff\",\n      0x10000L,\n      0x20000L,\n\n      0,   /* module-specific interface */\n\n      cff_driver_init,\n      cff_driver_done,\n      cff_get_interface,\n\n    /* now the specific driver fields */\n    sizeof ( TT_FaceRec ),\n    sizeof ( CFF_SizeRec ),\n    sizeof ( CFF_GlyphSlotRec ),\n\n    cff_face_init,\n    cff_face_done,\n    cff_size_init,\n    cff_size_done,\n    cff_slot_init,\n    cff_slot_done,\n\n    cff_glyph_load,\n\n    cff_get_kerning,\n    0,                       /* FT_Face_AttachFunc */\n    cff_get_advances,\n\n    cff_size_request,\n\n    CFF_SIZE_SELECT\n  )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffdrivr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffdrivr.h                                                             */\n/*                                                                         */\n/*    High-level OpenType driver interface (specification).                */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CFFDRIVER_H__\n#define __CFFDRIVER_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_DECLARE_DRIVER( cff_driver_class )\n\n\nFT_END_HEADER\n\n#endif /* __CFFDRIVER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cfferrs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cfferrs.h                                                              */\n/*                                                                         */\n/*    CFF error codes (specification only).                                */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the CFF error enumeration constants.      */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __CFFERRS_H__\n#define __CFFERRS_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  CFF_Err_\n#define FT_ERR_BASE    FT_Mod_Err_CFF\n\n\n#include FT_ERRORS_H\n\n#endif /* __CFFERRS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffgload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffgload.c                                                             */\n/*                                                                         */\n/*    OpenType Glyph Loader (body).                                        */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_SFNT_H\n#include FT_OUTLINE_H\n#include FT_CFF_DRIVER_H\n\n#include \"cffobjs.h\"\n#include \"cffload.h\"\n#include \"cffgload.h\"\n#include \"cf2ft.h\"      /* for cf2_decoder_parse_charstrings */\n\n#include \"cfferrs.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cffgload\n\n\n#ifdef CFF_CONFIG_OPTION_OLD_ENGINE\n\n  typedef enum  CFF_Operator_\n  {\n    cff_op_unknown = 0,\n\n    cff_op_rmoveto,\n    cff_op_hmoveto,\n    cff_op_vmoveto,\n\n    cff_op_rlineto,\n    cff_op_hlineto,\n    cff_op_vlineto,\n\n    cff_op_rrcurveto,\n    cff_op_hhcurveto,\n    cff_op_hvcurveto,\n    cff_op_rcurveline,\n    cff_op_rlinecurve,\n    cff_op_vhcurveto,\n    cff_op_vvcurveto,\n\n    cff_op_flex,\n    cff_op_hflex,\n    cff_op_hflex1,\n    cff_op_flex1,\n\n    cff_op_endchar,\n\n    cff_op_hstem,\n    cff_op_vstem,\n    cff_op_hstemhm,\n    cff_op_vstemhm,\n\n    cff_op_hintmask,\n    cff_op_cntrmask,\n    cff_op_dotsection,  /* deprecated, acts as no-op */\n\n    cff_op_abs,\n    cff_op_add,\n    cff_op_sub,\n    cff_op_div,\n    cff_op_neg,\n    cff_op_random,\n    cff_op_mul,\n    cff_op_sqrt,\n\n    cff_op_blend,\n\n    cff_op_drop,\n    cff_op_exch,\n    cff_op_index,\n    cff_op_roll,\n    cff_op_dup,\n\n    cff_op_put,\n    cff_op_get,\n    cff_op_store,\n    cff_op_load,\n\n    cff_op_and,\n    cff_op_or,\n    cff_op_not,\n    cff_op_eq,\n    cff_op_ifelse,\n\n    cff_op_callsubr,\n    cff_op_callgsubr,\n    cff_op_return,\n\n    /* Type 1 opcodes: invalid but seen in real life */\n    cff_op_hsbw,\n    cff_op_closepath,\n    cff_op_callothersubr,\n    cff_op_pop,\n    cff_op_seac,\n    cff_op_sbw,\n    cff_op_setcurrentpoint,\n\n    /* do not remove */\n    cff_op_max\n\n  } CFF_Operator;\n\n\n#define CFF_COUNT_CHECK_WIDTH  0x80\n#define CFF_COUNT_EXACT        0x40\n#define CFF_COUNT_CLEAR_STACK  0x20\n\n  /* count values which have the `CFF_COUNT_CHECK_WIDTH' flag set are  */\n  /* used for checking the width and requested numbers of arguments    */\n  /* only; they are set to zero afterwards                             */\n\n  /* the other two flags are informative only and unused currently     */\n\n  static const FT_Byte  cff_argument_counts[] =\n  {\n    0,  /* unknown */\n\n    2 | CFF_COUNT_CHECK_WIDTH | CFF_COUNT_EXACT, /* rmoveto */\n    1 | CFF_COUNT_CHECK_WIDTH | CFF_COUNT_EXACT,\n    1 | CFF_COUNT_CHECK_WIDTH | CFF_COUNT_EXACT,\n\n    0 | CFF_COUNT_CLEAR_STACK, /* rlineto */\n    0 | CFF_COUNT_CLEAR_STACK,\n    0 | CFF_COUNT_CLEAR_STACK,\n\n    0 | CFF_COUNT_CLEAR_STACK, /* rrcurveto */\n    0 | CFF_COUNT_CLEAR_STACK,\n    0 | CFF_COUNT_CLEAR_STACK,\n    0 | CFF_COUNT_CLEAR_STACK,\n    0 | CFF_COUNT_CLEAR_STACK,\n    0 | CFF_COUNT_CLEAR_STACK,\n    0 | CFF_COUNT_CLEAR_STACK,\n\n    13, /* flex */\n    7,\n    9,\n    11,\n\n    0 | CFF_COUNT_CHECK_WIDTH, /* endchar */\n\n    2 | CFF_COUNT_CHECK_WIDTH, /* hstem */\n    2 | CFF_COUNT_CHECK_WIDTH,\n    2 | CFF_COUNT_CHECK_WIDTH,\n    2 | CFF_COUNT_CHECK_WIDTH,\n\n    0 | CFF_COUNT_CHECK_WIDTH, /* hintmask */\n    0 | CFF_COUNT_CHECK_WIDTH, /* cntrmask */\n    0, /* dotsection */\n\n    1, /* abs */\n    2,\n    2,\n    2,\n    1,\n    0,\n    2,\n    1,\n\n    1, /* blend */\n\n    1, /* drop */\n    2,\n    1,\n    2,\n    1,\n\n    2, /* put */\n    1,\n    4,\n    3,\n\n    2, /* and */\n    2,\n    1,\n    2,\n    4,\n\n    1, /* callsubr */\n    1,\n    0,\n\n    2, /* hsbw */\n    0,\n    0,\n    0,\n    5, /* seac */\n    4, /* sbw */\n    2  /* setcurrentpoint */\n  };\n\n#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /**********                                                      *********/\n  /**********                                                      *********/\n  /**********             GENERIC CHARSTRING PARSING               *********/\n  /**********                                                      *********/\n  /**********                                                      *********/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cff_builder_init                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initializes a given glyph builder.                                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    builder :: A pointer to the glyph builder to initialize.           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face    :: The current face object.                                */\n  /*                                                                       */\n  /*    size    :: The current size object.                                */\n  /*                                                                       */\n  /*    glyph   :: The current glyph object.                               */\n  /*                                                                       */\n  /*    hinting :: Whether hinting is active.                              */\n  /*                                                                       */\n  static void\n  cff_builder_init( CFF_Builder*   builder,\n                    TT_Face        face,\n                    CFF_Size       size,\n                    CFF_GlyphSlot  glyph,\n                    FT_Bool        hinting )\n  {\n    builder->path_begun  = 0;\n    builder->load_points = 1;\n\n    builder->face   = face;\n    builder->glyph  = glyph;\n    builder->memory = face->root.memory;\n\n    if ( glyph )\n    {\n      FT_GlyphLoader  loader = glyph->root.internal->loader;\n\n\n      builder->loader  = loader;\n      builder->base    = &loader->base.outline;\n      builder->current = &loader->current.outline;\n      FT_GlyphLoader_Rewind( loader );\n\n      builder->hints_globals = 0;\n      builder->hints_funcs   = 0;\n\n      if ( hinting && size )\n      {\n        CFF_Internal  internal = (CFF_Internal)size->root.internal;\n\n\n        builder->hints_globals = (void *)internal->topfont;\n        builder->hints_funcs   = glyph->root.internal->glyph_hints;\n      }\n    }\n\n    builder->pos_x = 0;\n    builder->pos_y = 0;\n\n    builder->left_bearing.x = 0;\n    builder->left_bearing.y = 0;\n    builder->advance.x      = 0;\n    builder->advance.y      = 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cff_builder_done                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finalizes a given glyph builder.  Its contents can still be used   */\n  /*    after the call, but the function saves important information       */\n  /*    within the corresponding glyph slot.                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    builder :: A pointer to the glyph builder to finalize.             */\n  /*                                                                       */\n  static void\n  cff_builder_done( CFF_Builder*  builder )\n  {\n    CFF_GlyphSlot  glyph = builder->glyph;\n\n\n    if ( glyph )\n      glyph->root.outline = *builder->base;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cff_compute_bias                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Computes the bias value in dependence of the number of glyph       */\n  /*    subroutines.                                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    in_charstring_type :: The `CharstringType' value of the top DICT   */\n  /*                          dictionary.                                  */\n  /*                                                                       */\n  /*    num_subrs          :: The number of glyph subroutines.             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The bias value.                                                    */\n  static FT_Int\n  cff_compute_bias( FT_Int   in_charstring_type,\n                    FT_UInt  num_subrs )\n  {\n    FT_Int  result;\n\n\n    if ( in_charstring_type == 1 )\n      result = 0;\n    else if ( num_subrs < 1240 )\n      result = 107;\n    else if ( num_subrs < 33900U )\n      result = 1131;\n    else\n      result = 32768U;\n\n    return result;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cff_decoder_init                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initializes a given glyph decoder.                                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    decoder :: A pointer to the glyph builder to initialize.           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face      :: The current face object.                              */\n  /*                                                                       */\n  /*    size      :: The current size object.                              */\n  /*                                                                       */\n  /*    slot      :: The current glyph object.                             */\n  /*                                                                       */\n  /*    hinting   :: Whether hinting is active.                            */\n  /*                                                                       */\n  /*    hint_mode :: The hinting mode.                                     */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  cff_decoder_init( CFF_Decoder*    decoder,\n                    TT_Face         face,\n                    CFF_Size        size,\n                    CFF_GlyphSlot   slot,\n                    FT_Bool         hinting,\n                    FT_Render_Mode  hint_mode )\n  {\n    CFF_Font  cff = (CFF_Font)face->extra.data;\n\n\n    /* clear everything */\n    FT_MEM_ZERO( decoder, sizeof ( *decoder ) );\n\n    /* initialize builder */\n    cff_builder_init( &decoder->builder, face, size, slot, hinting );\n\n    /* initialize Type2 decoder */\n    decoder->cff          = cff;\n    decoder->num_globals  = cff->global_subrs_index.count;\n    decoder->globals      = cff->global_subrs;\n    decoder->globals_bias = cff_compute_bias(\n                              cff->top_font.font_dict.charstring_type,\n                              decoder->num_globals );\n\n    decoder->hint_mode    = hint_mode;\n  }\n\n\n  /* this function is used to select the subfont */\n  /* and the locals subrs array                  */\n  FT_LOCAL_DEF( FT_Error )\n  cff_decoder_prepare( CFF_Decoder*  decoder,\n                       CFF_Size      size,\n                       FT_UInt       glyph_index )\n  {\n    CFF_Builder  *builder = &decoder->builder;\n    CFF_Font      cff     = (CFF_Font)builder->face->extra.data;\n    CFF_SubFont   sub     = &cff->top_font;\n    FT_Error      error   = FT_Err_Ok;\n\n\n    /* manage CID fonts */\n    if ( cff->num_subfonts )\n    {\n      FT_Byte  fd_index = cff_fd_select_get( &cff->fd_select, glyph_index );\n\n\n      if ( fd_index >= cff->num_subfonts )\n      {\n        FT_TRACE4(( \"cff_decoder_prepare: invalid CID subfont index\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      FT_TRACE3(( \"  in subfont %d:\\n\", fd_index ));\n\n      sub = cff->subfonts[fd_index];\n\n      if ( builder->hints_funcs && size )\n      {\n        CFF_Internal  internal = (CFF_Internal)size->root.internal;\n\n\n        /* for CFFs without subfonts, this value has already been set */\n        builder->hints_globals = (void *)internal->subfonts[fd_index];\n      }\n    }\n\n    decoder->num_locals    = sub->local_subrs_index.count;\n    decoder->locals        = sub->local_subrs;\n    decoder->locals_bias   = cff_compute_bias(\n                               decoder->cff->top_font.font_dict.charstring_type,\n                               decoder->num_locals );\n\n    decoder->glyph_width   = sub->private_dict.default_width;\n    decoder->nominal_width = sub->private_dict.nominal_width;\n\n    decoder->current_subfont = sub;     /* for Adobe's CFF handler */\n\n  Exit:\n    return error;\n  }\n\n\n  /* check that there is enough space for `count' more points */\n  FT_LOCAL_DEF( FT_Error )\n  cff_check_points( CFF_Builder*  builder,\n                    FT_Int        count )\n  {\n    return FT_GLYPHLOADER_CHECK_POINTS( builder->loader, count, 0 );\n  }\n\n\n  /* add a new point, do not check space */\n  FT_LOCAL_DEF( void )\n  cff_builder_add_point( CFF_Builder*  builder,\n                         FT_Pos        x,\n                         FT_Pos        y,\n                         FT_Byte       flag )\n  {\n    FT_Outline*  outline = builder->current;\n\n\n    if ( builder->load_points )\n    {\n      FT_Vector*  point   = outline->points + outline->n_points;\n      FT_Byte*    control = (FT_Byte*)outline->tags + outline->n_points;\n\n#ifdef CFF_CONFIG_OPTION_OLD_ENGINE\n      CFF_Driver  driver  = (CFF_Driver)FT_FACE_DRIVER( builder->face );\n\n\n      if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE )\n      {\n        point->x = x >> 16;\n        point->y = y >> 16;\n      }\n      else\n#endif\n      {\n        /* cf2_decoder_parse_charstrings uses 16.16 coordinates */\n        point->x = x >> 10;\n        point->y = y >> 10;\n      }\n      *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );\n    }\n\n    outline->n_points++;\n  }\n\n\n  /* check space for a new on-curve point, then add it */\n  FT_LOCAL_DEF( FT_Error )\n  cff_builder_add_point1( CFF_Builder*  builder,\n                          FT_Pos        x,\n                          FT_Pos        y )\n  {\n    FT_Error  error;\n\n\n    error = cff_check_points( builder, 1 );\n    if ( !error )\n      cff_builder_add_point( builder, x, y, 1 );\n\n    return error;\n  }\n\n\n  /* check space for a new contour, then add it */\n  static FT_Error\n  cff_builder_add_contour( CFF_Builder*  builder )\n  {\n    FT_Outline*  outline = builder->current;\n    FT_Error     error;\n\n\n    if ( !builder->load_points )\n    {\n      outline->n_contours++;\n      return FT_Err_Ok;\n    }\n\n    error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 );\n    if ( !error )\n    {\n      if ( outline->n_contours > 0 )\n        outline->contours[outline->n_contours - 1] =\n          (short)( outline->n_points - 1 );\n\n      outline->n_contours++;\n    }\n\n    return error;\n  }\n\n\n  /* if a path was begun, add its first on-curve point */\n  FT_LOCAL_DEF( FT_Error )\n  cff_builder_start_point( CFF_Builder*  builder,\n                           FT_Pos        x,\n                           FT_Pos        y )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    /* test whether we are building a new contour */\n    if ( !builder->path_begun )\n    {\n      builder->path_begun = 1;\n      error = cff_builder_add_contour( builder );\n      if ( !error )\n        error = cff_builder_add_point1( builder, x, y );\n    }\n\n    return error;\n  }\n\n\n  /* close the current contour */\n  FT_LOCAL_DEF( void )\n  cff_builder_close_contour( CFF_Builder*  builder )\n  {\n    FT_Outline*  outline = builder->current;\n    FT_Int       first;\n\n\n    if ( !outline )\n      return;\n\n    first = outline->n_contours <= 1\n            ? 0 : outline->contours[outline->n_contours - 2] + 1;\n\n    /* We must not include the last point in the path if it */\n    /* is located on the first point.                       */\n    if ( outline->n_points > 1 )\n    {\n      FT_Vector*  p1      = outline->points + first;\n      FT_Vector*  p2      = outline->points + outline->n_points - 1;\n      FT_Byte*    control = (FT_Byte*)outline->tags + outline->n_points - 1;\n\n\n      /* `delete' last point only if it coincides with the first    */\n      /* point and if it is not a control point (which can happen). */\n      if ( p1->x == p2->x && p1->y == p2->y )\n        if ( *control == FT_CURVE_TAG_ON )\n          outline->n_points--;\n    }\n\n    if ( outline->n_contours > 0 )\n    {\n      /* Don't add contours only consisting of one point, i.e., */\n      /* check whether begin point and last point are the same. */\n      if ( first == outline->n_points - 1 )\n      {\n        outline->n_contours--;\n        outline->n_points--;\n      }\n      else\n        outline->contours[outline->n_contours - 1] =\n          (short)( outline->n_points - 1 );\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Int )\n  cff_lookup_glyph_by_stdcharcode( CFF_Font  cff,\n                                   FT_Int    charcode )\n  {\n    FT_UInt    n;\n    FT_UShort  glyph_sid;\n\n\n    /* CID-keyed fonts don't have glyph names */\n    if ( !cff->charset.sids )\n      return -1;\n\n    /* check range of standard char code */\n    if ( charcode < 0 || charcode > 255 )\n      return -1;\n\n    /* Get code to SID mapping from `cff_standard_encoding'. */\n    glyph_sid = cff_get_standard_encoding( (FT_UInt)charcode );\n\n    for ( n = 0; n < cff->num_glyphs; n++ )\n    {\n      if ( cff->charset.sids[n] == glyph_sid )\n        return n;\n    }\n\n    return -1;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_get_glyph_data( TT_Face    face,\n                      FT_UInt    glyph_index,\n                      FT_Byte**  pointer,\n                      FT_ULong*  length )\n  {\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    /* For incremental fonts get the character data using the */\n    /* callback function.                                     */\n    if ( face->root.internal->incremental_interface )\n    {\n      FT_Data   data;\n      FT_Error  error =\n                  face->root.internal->incremental_interface->funcs->get_glyph_data(\n                    face->root.internal->incremental_interface->object,\n                    glyph_index, &data );\n\n\n      *pointer = (FT_Byte*)data.pointer;\n      *length = data.length;\n\n      return error;\n    }\n    else\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n    {\n      CFF_Font  cff  = (CFF_Font)(face->extra.data);\n\n\n      return cff_index_access_element( &cff->charstrings_index, glyph_index,\n                                       pointer, length );\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cff_free_glyph_data( TT_Face    face,\n                       FT_Byte**  pointer,\n                       FT_ULong   length )\n  {\n#ifndef FT_CONFIG_OPTION_INCREMENTAL\n    FT_UNUSED( length );\n#endif\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    /* For incremental fonts get the character data using the */\n    /* callback function.                                     */\n    if ( face->root.internal->incremental_interface )\n    {\n      FT_Data  data;\n\n\n      data.pointer = *pointer;\n      data.length  = length;\n\n      face->root.internal->incremental_interface->funcs->free_glyph_data(\n        face->root.internal->incremental_interface->object, &data );\n    }\n    else\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n    {\n      CFF_Font  cff = (CFF_Font)(face->extra.data);\n\n\n      cff_index_forget_element( &cff->charstrings_index, pointer );\n    }\n  }\n\n\n#ifdef CFF_CONFIG_OPTION_OLD_ENGINE\n\n  static FT_Error\n  cff_operator_seac( CFF_Decoder*  decoder,\n                     FT_Pos        asb,\n                     FT_Pos        adx,\n                     FT_Pos        ady,\n                     FT_Int        bchar,\n                     FT_Int        achar )\n  {\n    FT_Error      error;\n    CFF_Builder*  builder = &decoder->builder;\n    FT_Int        bchar_index, achar_index;\n    TT_Face       face = decoder->builder.face;\n    FT_Vector     left_bearing, advance;\n    FT_Byte*      charstring;\n    FT_ULong      charstring_len;\n    FT_Pos        glyph_width;\n\n\n    if ( decoder->seac )\n    {\n      FT_ERROR(( \"cff_operator_seac: invalid nested seac\\n\" ));\n      return FT_THROW( Syntax_Error );\n    }\n\n    adx += decoder->builder.left_bearing.x;\n    ady += decoder->builder.left_bearing.y;\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    /* Incremental fonts don't necessarily have valid charsets.        */\n    /* They use the character code, not the glyph index, in this case. */\n    if ( face->root.internal->incremental_interface )\n    {\n      bchar_index = bchar;\n      achar_index = achar;\n    }\n    else\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n    {\n      CFF_Font cff = (CFF_Font)(face->extra.data);\n\n\n      bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );\n      achar_index = cff_lookup_glyph_by_stdcharcode( cff, achar );\n    }\n\n    if ( bchar_index < 0 || achar_index < 0 )\n    {\n      FT_ERROR(( \"cff_operator_seac:\"\n                 \" invalid seac character code arguments\\n\" ));\n      return FT_THROW( Syntax_Error );\n    }\n\n    /* If we are trying to load a composite glyph, do not load the */\n    /* accent character and return the array of subglyphs.         */\n    if ( builder->no_recurse )\n    {\n      FT_GlyphSlot    glyph  = (FT_GlyphSlot)builder->glyph;\n      FT_GlyphLoader  loader = glyph->internal->loader;\n      FT_SubGlyph     subg;\n\n\n      /* reallocate subglyph array if necessary */\n      error = FT_GlyphLoader_CheckSubGlyphs( loader, 2 );\n      if ( error )\n        goto Exit;\n\n      subg = loader->current.subglyphs;\n\n      /* subglyph 0 = base character */\n      subg->index = bchar_index;\n      subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES |\n                    FT_SUBGLYPH_FLAG_USE_MY_METRICS;\n      subg->arg1  = 0;\n      subg->arg2  = 0;\n      subg++;\n\n      /* subglyph 1 = accent character */\n      subg->index = achar_index;\n      subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;\n      subg->arg1  = (FT_Int)( adx >> 16 );\n      subg->arg2  = (FT_Int)( ady >> 16 );\n\n      /* set up remaining glyph fields */\n      glyph->num_subglyphs = 2;\n      glyph->subglyphs     = loader->base.subglyphs;\n      glyph->format        = FT_GLYPH_FORMAT_COMPOSITE;\n\n      loader->current.num_subglyphs = 2;\n    }\n\n    FT_GlyphLoader_Prepare( builder->loader );\n\n    /* First load `bchar' in builder */\n    error = cff_get_glyph_data( face, bchar_index,\n                                &charstring, &charstring_len );\n    if ( !error )\n    {\n      /* the seac operator must not be nested */\n      decoder->seac = TRUE;\n      error = cff_decoder_parse_charstrings( decoder, charstring,\n                                             charstring_len );\n      decoder->seac = FALSE;\n\n      cff_free_glyph_data( face, &charstring, charstring_len );\n\n      if ( error )\n        goto Exit;\n    }\n\n    /* Save the left bearing, advance and glyph width of the base */\n    /* character as they will be erased by the next load.         */\n\n    left_bearing = builder->left_bearing;\n    advance      = builder->advance;\n    glyph_width  = decoder->glyph_width;\n\n    builder->left_bearing.x = 0;\n    builder->left_bearing.y = 0;\n\n    builder->pos_x = adx - asb;\n    builder->pos_y = ady;\n\n    /* Now load `achar' on top of the base outline. */\n    error = cff_get_glyph_data( face, achar_index,\n                                &charstring, &charstring_len );\n    if ( !error )\n    {\n      /* the seac operator must not be nested */\n      decoder->seac = TRUE;\n      error = cff_decoder_parse_charstrings( decoder, charstring,\n                                             charstring_len );\n      decoder->seac = FALSE;\n\n      cff_free_glyph_data( face, &charstring, charstring_len );\n\n      if ( error )\n        goto Exit;\n    }\n\n    /* Restore the left side bearing, advance and glyph width */\n    /* of the base character.                                 */\n    builder->left_bearing = left_bearing;\n    builder->advance      = advance;\n    decoder->glyph_width  = glyph_width;\n\n    builder->pos_x = 0;\n    builder->pos_y = 0;\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cff_decoder_parse_charstrings                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Parses a given Type 2 charstrings program.                         */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    decoder         :: The current Type 1 decoder.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    charstring_base :: The base of the charstring stream.              */\n  /*                                                                       */\n  /*    charstring_len  :: The length in bytes of the charstring stream.   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  cff_decoder_parse_charstrings( CFF_Decoder*  decoder,\n                                 FT_Byte*      charstring_base,\n                                 FT_ULong      charstring_len )\n  {\n    FT_Error           error;\n    CFF_Decoder_Zone*  zone;\n    FT_Byte*           ip;\n    FT_Byte*           limit;\n    CFF_Builder*       builder = &decoder->builder;\n    FT_Pos             x, y;\n    FT_Fixed           seed;\n    FT_Fixed*          stack;\n    FT_Int             charstring_type =\n                         decoder->cff->top_font.font_dict.charstring_type;\n\n    T2_Hints_Funcs     hinter;\n\n\n    /* set default width */\n    decoder->num_hints  = 0;\n    decoder->read_width = 1;\n\n    /* compute random seed from stack address of parameter */\n    seed = (FT_Fixed)( ( (FT_PtrDist)(char*)&seed              ^\n                         (FT_PtrDist)(char*)&decoder           ^\n                         (FT_PtrDist)(char*)&charstring_base ) &\n                         FT_ULONG_MAX ) ;\n    seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;\n    if ( seed == 0 )\n      seed = 0x7384;\n\n    /* initialize the decoder */\n    decoder->top  = decoder->stack;\n    decoder->zone = decoder->zones;\n    zone          = decoder->zones;\n    stack         = decoder->top;\n\n    hinter = (T2_Hints_Funcs)builder->hints_funcs;\n\n    builder->path_begun = 0;\n\n    zone->base           = charstring_base;\n    limit = zone->limit  = charstring_base + charstring_len;\n    ip    = zone->cursor = zone->base;\n\n    error = FT_Err_Ok;\n\n    x = builder->pos_x;\n    y = builder->pos_y;\n\n    /* begin hints recording session, if any */\n    if ( hinter )\n      hinter->open( hinter->hints );\n\n    /* now execute loop */\n    while ( ip < limit )\n    {\n      CFF_Operator  op;\n      FT_Byte       v;\n\n\n      /********************************************************************/\n      /*                                                                  */\n      /* Decode operator or operand                                       */\n      /*                                                                  */\n      v = *ip++;\n      if ( v >= 32 || v == 28 )\n      {\n        FT_Int    shift = 16;\n        FT_Int32  val;\n\n\n        /* this is an operand, push it on the stack */\n\n        /* if we use shifts, all computations are done with unsigned */\n        /* values; the conversion to a signed value is the last step */\n        if ( v == 28 )\n        {\n          if ( ip + 1 >= limit )\n            goto Syntax_Error;\n          val = (FT_Short)( ( (FT_UShort)ip[0] << 8 ) | ip[1] );\n          ip += 2;\n        }\n        else if ( v < 247 )\n          val = (FT_Int32)v - 139;\n        else if ( v < 251 )\n        {\n          if ( ip >= limit )\n            goto Syntax_Error;\n          val = ( (FT_Int32)v - 247 ) * 256 + *ip++ + 108;\n        }\n        else if ( v < 255 )\n        {\n          if ( ip >= limit )\n            goto Syntax_Error;\n          val = -( (FT_Int32)v - 251 ) * 256 - *ip++ - 108;\n        }\n        else\n        {\n          if ( ip + 3 >= limit )\n            goto Syntax_Error;\n          val = (FT_Int32)( ( (FT_UInt32)ip[0] << 24 ) |\n                            ( (FT_UInt32)ip[1] << 16 ) |\n                            ( (FT_UInt32)ip[2] <<  8 ) |\n                              (FT_UInt32)ip[3]         );\n          ip    += 4;\n          if ( charstring_type == 2 )\n            shift = 0;\n        }\n        if ( decoder->top - stack >= CFF_MAX_OPERANDS )\n          goto Stack_Overflow;\n\n        val             = (FT_Int32)( (FT_UInt32)val << shift );\n        *decoder->top++ = val;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        if ( !( val & 0xFFFFL ) )\n          FT_TRACE4(( \" %hd\", (FT_Short)( (FT_UInt32)val >> 16 ) ));\n        else\n          FT_TRACE4(( \" %.2f\", val / 65536.0 ));\n#endif\n\n      }\n      else\n      {\n        /* The specification says that normally arguments are to be taken */\n        /* from the bottom of the stack.  However, this seems not to be   */\n        /* correct, at least for Acroread 7.0.8 on GNU/Linux: It pops the */\n        /* arguments similar to a PS interpreter.                         */\n\n        FT_Fixed*  args     = decoder->top;\n        FT_Int     num_args = (FT_Int)( args - decoder->stack );\n        FT_Int     req_args;\n\n\n        /* find operator */\n        op = cff_op_unknown;\n\n        switch ( v )\n        {\n        case 1:\n          op = cff_op_hstem;\n          break;\n        case 3:\n          op = cff_op_vstem;\n          break;\n        case 4:\n          op = cff_op_vmoveto;\n          break;\n        case 5:\n          op = cff_op_rlineto;\n          break;\n        case 6:\n          op = cff_op_hlineto;\n          break;\n        case 7:\n          op = cff_op_vlineto;\n          break;\n        case 8:\n          op = cff_op_rrcurveto;\n          break;\n        case 9:\n          op = cff_op_closepath;\n          break;\n        case 10:\n          op = cff_op_callsubr;\n          break;\n        case 11:\n          op = cff_op_return;\n          break;\n        case 12:\n          {\n            if ( ip >= limit )\n              goto Syntax_Error;\n            v = *ip++;\n\n            switch ( v )\n            {\n            case 0:\n              op = cff_op_dotsection;\n              break;\n            case 1: /* this is actually the Type1 vstem3 operator */\n              op = cff_op_vstem;\n              break;\n            case 2: /* this is actually the Type1 hstem3 operator */\n              op = cff_op_hstem;\n              break;\n            case 3:\n              op = cff_op_and;\n              break;\n            case 4:\n              op = cff_op_or;\n              break;\n            case 5:\n              op = cff_op_not;\n              break;\n            case 6:\n              op = cff_op_seac;\n              break;\n            case 7:\n              op = cff_op_sbw;\n              break;\n            case 8:\n              op = cff_op_store;\n              break;\n            case 9:\n              op = cff_op_abs;\n              break;\n            case 10:\n              op = cff_op_add;\n              break;\n            case 11:\n              op = cff_op_sub;\n              break;\n            case 12:\n              op = cff_op_div;\n              break;\n            case 13:\n              op = cff_op_load;\n              break;\n            case 14:\n              op = cff_op_neg;\n              break;\n            case 15:\n              op = cff_op_eq;\n              break;\n            case 16:\n              op = cff_op_callothersubr;\n              break;\n            case 17:\n              op = cff_op_pop;\n              break;\n            case 18:\n              op = cff_op_drop;\n              break;\n            case 20:\n              op = cff_op_put;\n              break;\n            case 21:\n              op = cff_op_get;\n              break;\n            case 22:\n              op = cff_op_ifelse;\n              break;\n            case 23:\n              op = cff_op_random;\n              break;\n            case 24:\n              op = cff_op_mul;\n              break;\n            case 26:\n              op = cff_op_sqrt;\n              break;\n            case 27:\n              op = cff_op_dup;\n              break;\n            case 28:\n              op = cff_op_exch;\n              break;\n            case 29:\n              op = cff_op_index;\n              break;\n            case 30:\n              op = cff_op_roll;\n              break;\n            case 33:\n              op = cff_op_setcurrentpoint;\n              break;\n            case 34:\n              op = cff_op_hflex;\n              break;\n            case 35:\n              op = cff_op_flex;\n              break;\n            case 36:\n              op = cff_op_hflex1;\n              break;\n            case 37:\n              op = cff_op_flex1;\n              break;\n            default:\n              FT_TRACE4(( \" unknown op (12, %d)\\n\", v ));\n              break;\n            }\n          }\n          break;\n        case 13:\n          op = cff_op_hsbw;\n          break;\n        case 14:\n          op = cff_op_endchar;\n          break;\n        case 16:\n          op = cff_op_blend;\n          break;\n        case 18:\n          op = cff_op_hstemhm;\n          break;\n        case 19:\n          op = cff_op_hintmask;\n          break;\n        case 20:\n          op = cff_op_cntrmask;\n          break;\n        case 21:\n          op = cff_op_rmoveto;\n          break;\n        case 22:\n          op = cff_op_hmoveto;\n          break;\n        case 23:\n          op = cff_op_vstemhm;\n          break;\n        case 24:\n          op = cff_op_rcurveline;\n          break;\n        case 25:\n          op = cff_op_rlinecurve;\n          break;\n        case 26:\n          op = cff_op_vvcurveto;\n          break;\n        case 27:\n          op = cff_op_hhcurveto;\n          break;\n        case 29:\n          op = cff_op_callgsubr;\n          break;\n        case 30:\n          op = cff_op_vhcurveto;\n          break;\n        case 31:\n          op = cff_op_hvcurveto;\n          break;\n        default:\n          FT_TRACE4(( \" unknown op (%d)\\n\", v ));\n          break;\n        }\n\n        if ( op == cff_op_unknown )\n          continue;\n\n        /* check arguments */\n        req_args = cff_argument_counts[op];\n        if ( req_args & CFF_COUNT_CHECK_WIDTH )\n        {\n          if ( num_args > 0 && decoder->read_width )\n          {\n            /* If `nominal_width' is non-zero, the number is really a      */\n            /* difference against `nominal_width'.  Else, the number here  */\n            /* is truly a width, not a difference against `nominal_width'. */\n            /* If the font does not set `nominal_width', then              */\n            /* `nominal_width' defaults to zero, and so we can set         */\n            /* `glyph_width' to `nominal_width' plus number on the stack   */\n            /* -- for either case.                                         */\n\n            FT_Int  set_width_ok;\n\n\n            switch ( op )\n            {\n            case cff_op_hmoveto:\n            case cff_op_vmoveto:\n              set_width_ok = num_args & 2;\n              break;\n\n            case cff_op_hstem:\n            case cff_op_vstem:\n            case cff_op_hstemhm:\n            case cff_op_vstemhm:\n            case cff_op_rmoveto:\n            case cff_op_hintmask:\n            case cff_op_cntrmask:\n              set_width_ok = num_args & 1;\n              break;\n\n            case cff_op_endchar:\n              /* If there is a width specified for endchar, we either have */\n              /* 1 argument or 5 arguments.  We like to argue.             */\n              set_width_ok = ( num_args == 5 ) || ( num_args == 1 );\n              break;\n\n            default:\n              set_width_ok = 0;\n              break;\n            }\n\n            if ( set_width_ok )\n            {\n              decoder->glyph_width = decoder->nominal_width +\n                                       ( stack[0] >> 16 );\n\n              if ( decoder->width_only )\n              {\n                /* we only want the advance width; stop here */\n                break;\n              }\n\n              /* Consumed an argument. */\n              num_args--;\n            }\n          }\n\n          decoder->read_width = 0;\n          req_args            = 0;\n        }\n\n        req_args &= 0x000F;\n        if ( num_args < req_args )\n          goto Stack_Underflow;\n        args     -= req_args;\n        num_args -= req_args;\n\n        /* At this point, `args' points to the first argument of the  */\n        /* operand in case `req_args' isn't zero.  Otherwise, we have */\n        /* to adjust `args' manually.                                 */\n\n        /* Note that we only pop arguments from the stack which we    */\n        /* really need and can digest so that we can continue in case */\n        /* of superfluous stack elements.                             */\n\n        switch ( op )\n        {\n        case cff_op_hstem:\n        case cff_op_vstem:\n        case cff_op_hstemhm:\n        case cff_op_vstemhm:\n          /* the number of arguments is always even here */\n          FT_TRACE4((\n              op == cff_op_hstem   ? \" hstem\\n\"   :\n            ( op == cff_op_vstem   ? \" vstem\\n\"   :\n            ( op == cff_op_hstemhm ? \" hstemhm\\n\" : \" vstemhm\\n\" ) ) ));\n\n          if ( hinter )\n            hinter->stems( hinter->hints,\n                           ( op == cff_op_hstem || op == cff_op_hstemhm ),\n                           num_args / 2,\n                           args - ( num_args & ~1 ) );\n\n          decoder->num_hints += num_args / 2;\n          args = stack;\n          break;\n\n        case cff_op_hintmask:\n        case cff_op_cntrmask:\n          FT_TRACE4(( op == cff_op_hintmask ? \" hintmask\" : \" cntrmask\" ));\n\n          /* implement vstem when needed --                        */\n          /* the specification doesn't say it, but this also works */\n          /* with the 'cntrmask' operator                          */\n          /*                                                       */\n          if ( num_args > 0 )\n          {\n            if ( hinter )\n              hinter->stems( hinter->hints,\n                             0,\n                             num_args / 2,\n                             args - ( num_args & ~1 ) );\n\n            decoder->num_hints += num_args / 2;\n          }\n\n          /* In a valid charstring there must be at least one byte */\n          /* after `hintmask' or `cntrmask' (e.g., for a `return'  */\n          /* instruction).  Additionally, there must be space for  */\n          /* `num_hints' bits.                                     */\n\n          if ( ( ip + ( ( decoder->num_hints + 7 ) >> 3 ) ) >= limit )\n            goto Syntax_Error;\n\n          if ( hinter )\n          {\n            if ( op == cff_op_hintmask )\n              hinter->hintmask( hinter->hints,\n                                builder->current->n_points,\n                                decoder->num_hints,\n                                ip );\n            else\n              hinter->counter( hinter->hints,\n                               decoder->num_hints,\n                               ip );\n          }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n          {\n            FT_UInt maskbyte;\n\n\n            FT_TRACE4(( \" (maskbytes:\" ));\n\n            for ( maskbyte = 0;\n                  maskbyte < (FT_UInt)( ( decoder->num_hints + 7 ) >> 3 );\n                  maskbyte++, ip++ )\n              FT_TRACE4(( \" 0x%02X\", *ip ));\n\n            FT_TRACE4(( \")\\n\" ));\n          }\n#else\n          ip += ( decoder->num_hints + 7 ) >> 3;\n#endif\n          args = stack;\n          break;\n\n        case cff_op_rmoveto:\n          FT_TRACE4(( \" rmoveto\\n\" ));\n\n          cff_builder_close_contour( builder );\n          builder->path_begun = 0;\n          x   += args[-2];\n          y   += args[-1];\n          args = stack;\n          break;\n\n        case cff_op_vmoveto:\n          FT_TRACE4(( \" vmoveto\\n\" ));\n\n          cff_builder_close_contour( builder );\n          builder->path_begun = 0;\n          y   += args[-1];\n          args = stack;\n          break;\n\n        case cff_op_hmoveto:\n          FT_TRACE4(( \" hmoveto\\n\" ));\n\n          cff_builder_close_contour( builder );\n          builder->path_begun = 0;\n          x   += args[-1];\n          args = stack;\n          break;\n\n        case cff_op_rlineto:\n          FT_TRACE4(( \" rlineto\\n\" ));\n\n          if ( cff_builder_start_point( builder, x, y )  ||\n               cff_check_points( builder, num_args / 2 ) )\n            goto Fail;\n\n          if ( num_args < 2 )\n            goto Stack_Underflow;\n\n          args -= num_args & ~1;\n          while ( args < decoder->top )\n          {\n            x += args[0];\n            y += args[1];\n            cff_builder_add_point( builder, x, y, 1 );\n            args += 2;\n          }\n          args = stack;\n          break;\n\n        case cff_op_hlineto:\n        case cff_op_vlineto:\n          {\n            FT_Int  phase = ( op == cff_op_hlineto );\n\n\n            FT_TRACE4(( op == cff_op_hlineto ? \" hlineto\\n\"\n                                             : \" vlineto\\n\" ));\n\n            if ( num_args < 0 )\n              goto Stack_Underflow;\n\n            /* there exist subsetted fonts (found in PDFs) */\n            /* which call `hlineto' without arguments      */\n            if ( num_args == 0 )\n              break;\n\n            if ( cff_builder_start_point( builder, x, y ) ||\n                 cff_check_points( builder, num_args )    )\n              goto Fail;\n\n            args = stack;\n            while ( args < decoder->top )\n            {\n              if ( phase )\n                x += args[0];\n              else\n                y += args[0];\n\n              if ( cff_builder_add_point1( builder, x, y ) )\n                goto Fail;\n\n              args++;\n              phase ^= 1;\n            }\n            args = stack;\n          }\n          break;\n\n        case cff_op_rrcurveto:\n          {\n            FT_Int  nargs;\n\n\n            FT_TRACE4(( \" rrcurveto\\n\" ));\n\n            if ( num_args < 6 )\n              goto Stack_Underflow;\n\n            nargs = num_args - num_args % 6;\n\n            if ( cff_builder_start_point( builder, x, y ) ||\n                 cff_check_points( builder, nargs / 2 )   )\n              goto Fail;\n\n            args -= nargs;\n            while ( args < decoder->top )\n            {\n              x += args[0];\n              y += args[1];\n              cff_builder_add_point( builder, x, y, 0 );\n              x += args[2];\n              y += args[3];\n              cff_builder_add_point( builder, x, y, 0 );\n              x += args[4];\n              y += args[5];\n              cff_builder_add_point( builder, x, y, 1 );\n              args += 6;\n            }\n            args = stack;\n          }\n          break;\n\n        case cff_op_vvcurveto:\n          {\n            FT_Int  nargs;\n\n\n            FT_TRACE4(( \" vvcurveto\\n\" ));\n\n            if ( num_args < 4 )\n              goto Stack_Underflow;\n\n            /* if num_args isn't of the form 4n or 4n+1, */\n            /* we enforce it by clearing the second bit  */\n\n            nargs = num_args & ~2;\n\n            if ( cff_builder_start_point( builder, x, y ) )\n              goto Fail;\n\n            args -= nargs;\n\n            if ( nargs & 1 )\n            {\n              x += args[0];\n              args++;\n              nargs--;\n            }\n\n            if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) )\n              goto Fail;\n\n            while ( args < decoder->top )\n            {\n              y += args[0];\n              cff_builder_add_point( builder, x, y, 0 );\n              x += args[1];\n              y += args[2];\n              cff_builder_add_point( builder, x, y, 0 );\n              y += args[3];\n              cff_builder_add_point( builder, x, y, 1 );\n              args += 4;\n            }\n            args = stack;\n          }\n          break;\n\n        case cff_op_hhcurveto:\n          {\n            FT_Int  nargs;\n\n\n            FT_TRACE4(( \" hhcurveto\\n\" ));\n\n            if ( num_args < 4 )\n              goto Stack_Underflow;\n\n            /* if num_args isn't of the form 4n or 4n+1, */\n            /* we enforce it by clearing the second bit  */\n\n            nargs = num_args & ~2;\n\n            if ( cff_builder_start_point( builder, x, y ) )\n              goto Fail;\n\n            args -= nargs;\n            if ( nargs & 1 )\n            {\n              y += args[0];\n              args++;\n              nargs--;\n            }\n\n            if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) )\n              goto Fail;\n\n            while ( args < decoder->top )\n            {\n              x += args[0];\n              cff_builder_add_point( builder, x, y, 0 );\n              x += args[1];\n              y += args[2];\n              cff_builder_add_point( builder, x, y, 0 );\n              x += args[3];\n              cff_builder_add_point( builder, x, y, 1 );\n              args += 4;\n            }\n            args = stack;\n          }\n          break;\n\n        case cff_op_vhcurveto:\n        case cff_op_hvcurveto:\n          {\n            FT_Int  phase;\n            FT_Int  nargs;\n\n\n            FT_TRACE4(( op == cff_op_vhcurveto ? \" vhcurveto\\n\"\n                                               : \" hvcurveto\\n\" ));\n\n            if ( cff_builder_start_point( builder, x, y ) )\n              goto Fail;\n\n            if ( num_args < 4 )\n              goto Stack_Underflow;\n\n            /* if num_args isn't of the form 8n, 8n+1, 8n+4, or 8n+5, */\n            /* we enforce it by clearing the second bit               */\n\n            nargs = num_args & ~2;\n\n            args -= nargs;\n            if ( cff_check_points( builder, ( nargs / 4 ) * 3 ) )\n              goto Stack_Underflow;\n\n            phase = ( op == cff_op_hvcurveto );\n\n            while ( nargs >= 4 )\n            {\n              nargs -= 4;\n              if ( phase )\n              {\n                x += args[0];\n                cff_builder_add_point( builder, x, y, 0 );\n                x += args[1];\n                y += args[2];\n                cff_builder_add_point( builder, x, y, 0 );\n                y += args[3];\n                if ( nargs == 1 )\n                  x += args[4];\n                cff_builder_add_point( builder, x, y, 1 );\n              }\n              else\n              {\n                y += args[0];\n                cff_builder_add_point( builder, x, y, 0 );\n                x += args[1];\n                y += args[2];\n                cff_builder_add_point( builder, x, y, 0 );\n                x += args[3];\n                if ( nargs == 1 )\n                  y += args[4];\n                cff_builder_add_point( builder, x, y, 1 );\n              }\n              args  += 4;\n              phase ^= 1;\n            }\n            args = stack;\n          }\n          break;\n\n        case cff_op_rlinecurve:\n          {\n            FT_Int  num_lines;\n            FT_Int  nargs;\n\n\n            FT_TRACE4(( \" rlinecurve\\n\" ));\n\n            if ( num_args < 8 )\n              goto Stack_Underflow;\n\n            nargs     = num_args & ~1;\n            num_lines = ( nargs - 6 ) / 2;\n\n            if ( cff_builder_start_point( builder, x, y )   ||\n                 cff_check_points( builder, num_lines + 3 ) )\n              goto Fail;\n\n            args -= nargs;\n\n            /* first, add the line segments */\n            while ( num_lines > 0 )\n            {\n              x += args[0];\n              y += args[1];\n              cff_builder_add_point( builder, x, y, 1 );\n              args += 2;\n              num_lines--;\n            }\n\n            /* then the curve */\n            x += args[0];\n            y += args[1];\n            cff_builder_add_point( builder, x, y, 0 );\n            x += args[2];\n            y += args[3];\n            cff_builder_add_point( builder, x, y, 0 );\n            x += args[4];\n            y += args[5];\n            cff_builder_add_point( builder, x, y, 1 );\n            args = stack;\n          }\n          break;\n\n        case cff_op_rcurveline:\n          {\n            FT_Int  num_curves;\n            FT_Int  nargs;\n\n\n            FT_TRACE4(( \" rcurveline\\n\" ));\n\n            if ( num_args < 8 )\n              goto Stack_Underflow;\n\n            nargs      = num_args - 2;\n            nargs      = nargs - nargs % 6 + 2;\n            num_curves = ( nargs - 2 ) / 6;\n\n            if ( cff_builder_start_point( builder, x, y )        ||\n                 cff_check_points( builder, num_curves * 3 + 2 ) )\n              goto Fail;\n\n            args -= nargs;\n\n            /* first, add the curves */\n            while ( num_curves > 0 )\n            {\n              x += args[0];\n              y += args[1];\n              cff_builder_add_point( builder, x, y, 0 );\n              x += args[2];\n              y += args[3];\n              cff_builder_add_point( builder, x, y, 0 );\n              x += args[4];\n              y += args[5];\n              cff_builder_add_point( builder, x, y, 1 );\n              args += 6;\n              num_curves--;\n            }\n\n            /* then the final line */\n            x += args[0];\n            y += args[1];\n            cff_builder_add_point( builder, x, y, 1 );\n            args = stack;\n          }\n          break;\n\n        case cff_op_hflex1:\n          {\n            FT_Pos start_y;\n\n\n            FT_TRACE4(( \" hflex1\\n\" ));\n\n            /* adding five more points: 4 control points, 1 on-curve point */\n            /* -- make sure we have enough space for the start point if it */\n            /* needs to be added                                           */\n            if ( cff_builder_start_point( builder, x, y ) ||\n                 cff_check_points( builder, 6 )           )\n              goto Fail;\n\n            /* record the starting point's y position for later use */\n            start_y = y;\n\n            /* first control point */\n            x += args[0];\n            y += args[1];\n            cff_builder_add_point( builder, x, y, 0 );\n\n            /* second control point */\n            x += args[2];\n            y += args[3];\n            cff_builder_add_point( builder, x, y, 0 );\n\n            /* join point; on curve, with y-value the same as the last */\n            /* control point's y-value                                 */\n            x += args[4];\n            cff_builder_add_point( builder, x, y, 1 );\n\n            /* third control point, with y-value the same as the join */\n            /* point's y-value                                        */\n            x += args[5];\n            cff_builder_add_point( builder, x, y, 0 );\n\n            /* fourth control point */\n            x += args[6];\n            y += args[7];\n            cff_builder_add_point( builder, x, y, 0 );\n\n            /* ending point, with y-value the same as the start   */\n            x += args[8];\n            y  = start_y;\n            cff_builder_add_point( builder, x, y, 1 );\n\n            args = stack;\n            break;\n          }\n\n        case cff_op_hflex:\n          {\n            FT_Pos start_y;\n\n\n            FT_TRACE4(( \" hflex\\n\" ));\n\n            /* adding six more points; 4 control points, 2 on-curve points */\n            if ( cff_builder_start_point( builder, x, y ) ||\n                 cff_check_points( builder, 6 )           )\n              goto Fail;\n\n            /* record the starting point's y-position for later use */\n            start_y = y;\n\n            /* first control point */\n            x += args[0];\n            cff_builder_add_point( builder, x, y, 0 );\n\n            /* second control point */\n            x += args[1];\n            y += args[2];\n            cff_builder_add_point( builder, x, y, 0 );\n\n            /* join point; on curve, with y-value the same as the last */\n            /* control point's y-value                                 */\n            x += args[3];\n            cff_builder_add_point( builder, x, y, 1 );\n\n            /* third control point, with y-value the same as the join */\n            /* point's y-value                                        */\n            x += args[4];\n            cff_builder_add_point( builder, x, y, 0 );\n\n            /* fourth control point */\n            x += args[5];\n            y  = start_y;\n            cff_builder_add_point( builder, x, y, 0 );\n\n            /* ending point, with y-value the same as the start point's */\n            /* y-value -- we don't add this point, though               */\n            x += args[6];\n            cff_builder_add_point( builder, x, y, 1 );\n\n            args = stack;\n            break;\n          }\n\n        case cff_op_flex1:\n          {\n            FT_Pos     start_x, start_y; /* record start x, y values for */\n                                         /* alter use                    */\n            FT_Fixed   dx = 0, dy = 0;   /* used in horizontal/vertical  */\n                                         /* algorithm below              */\n            FT_Int     horizontal, count;\n            FT_Fixed*  temp;\n\n\n            FT_TRACE4(( \" flex1\\n\" ));\n\n            /* adding six more points; 4 control points, 2 on-curve points */\n            if ( cff_builder_start_point( builder, x, y ) ||\n                 cff_check_points( builder, 6 )           )\n              goto Fail;\n\n            /* record the starting point's x, y position for later use */\n            start_x = x;\n            start_y = y;\n\n            /* XXX: figure out whether this is supposed to be a horizontal */\n            /*      or vertical flex; the Type 2 specification is vague... */\n\n            temp = args;\n\n            /* grab up to the last argument */\n            for ( count = 5; count > 0; count-- )\n            {\n              dx += temp[0];\n              dy += temp[1];\n              temp += 2;\n            }\n\n            if ( dx < 0 )\n              dx = -dx;\n            if ( dy < 0 )\n              dy = -dy;\n\n            /* strange test, but here it is... */\n            horizontal = ( dx > dy );\n\n            for ( count = 5; count > 0; count-- )\n            {\n              x += args[0];\n              y += args[1];\n              cff_builder_add_point( builder, x, y,\n                                     (FT_Bool)( count == 3 ) );\n              args += 2;\n            }\n\n            /* is last operand an x- or y-delta? */\n            if ( horizontal )\n            {\n              x += args[0];\n              y  = start_y;\n            }\n            else\n            {\n              x  = start_x;\n              y += args[0];\n            }\n\n            cff_builder_add_point( builder, x, y, 1 );\n\n            args = stack;\n            break;\n           }\n\n        case cff_op_flex:\n          {\n            FT_UInt  count;\n\n\n            FT_TRACE4(( \" flex\\n\" ));\n\n            if ( cff_builder_start_point( builder, x, y ) ||\n                 cff_check_points( builder, 6 )           )\n              goto Fail;\n\n            for ( count = 6; count > 0; count-- )\n            {\n              x += args[0];\n              y += args[1];\n              cff_builder_add_point( builder, x, y,\n                                     (FT_Bool)( count == 4 || count == 1 ) );\n              args += 2;\n            }\n\n            args = stack;\n          }\n          break;\n\n        case cff_op_seac:\n            FT_TRACE4(( \" seac\\n\" ));\n\n            error = cff_operator_seac( decoder,\n                                       args[0], args[1], args[2],\n                                       (FT_Int)( args[3] >> 16 ),\n                                       (FT_Int)( args[4] >> 16 ) );\n\n            /* add current outline to the glyph slot */\n            FT_GlyphLoader_Add( builder->loader );\n\n            /* return now! */\n            FT_TRACE4(( \"\\n\" ));\n            return error;\n\n        case cff_op_endchar:\n          FT_TRACE4(( \" endchar\\n\" ));\n\n          /* We are going to emulate the seac operator. */\n          if ( num_args >= 4 )\n          {\n            /* Save glyph width so that the subglyphs don't overwrite it. */\n            FT_Pos  glyph_width = decoder->glyph_width;\n\n\n            error = cff_operator_seac( decoder,\n                                       0L, args[-4], args[-3],\n                                       (FT_Int)( args[-2] >> 16 ),\n                                       (FT_Int)( args[-1] >> 16 ) );\n\n            decoder->glyph_width = glyph_width;\n          }\n          else\n          {\n            cff_builder_close_contour( builder );\n\n            /* close hints recording session */\n            if ( hinter )\n            {\n              if ( hinter->close( hinter->hints,\n                                  builder->current->n_points ) )\n                goto Syntax_Error;\n\n              /* apply hints to the loaded glyph outline now */\n              error = hinter->apply( hinter->hints,\n                                     builder->current,\n                                     (PSH_Globals)builder->hints_globals,\n                                     decoder->hint_mode );\n              if ( error )\n                goto Fail;\n            }\n\n            /* add current outline to the glyph slot */\n            FT_GlyphLoader_Add( builder->loader );\n          }\n\n          /* return now! */\n          FT_TRACE4(( \"\\n\" ));\n          return error;\n\n        case cff_op_abs:\n          FT_TRACE4(( \" abs\\n\" ));\n\n          if ( args[0] < 0 )\n            args[0] = -args[0];\n          args++;\n          break;\n\n        case cff_op_add:\n          FT_TRACE4(( \" add\\n\" ));\n\n          args[0] += args[1];\n          args++;\n          break;\n\n        case cff_op_sub:\n          FT_TRACE4(( \" sub\\n\" ));\n\n          args[0] -= args[1];\n          args++;\n          break;\n\n        case cff_op_div:\n          FT_TRACE4(( \" div\\n\" ));\n\n          args[0] = FT_DivFix( args[0], args[1] );\n          args++;\n          break;\n\n        case cff_op_neg:\n          FT_TRACE4(( \" neg\\n\" ));\n\n          args[0] = -args[0];\n          args++;\n          break;\n\n        case cff_op_random:\n          {\n            FT_Fixed  Rand;\n\n\n            FT_TRACE4(( \" rand\\n\" ));\n\n            Rand = seed;\n            if ( Rand >= 0x8000L )\n              Rand++;\n\n            args[0] = Rand;\n            seed    = FT_MulFix( seed, 0x10000L - seed );\n            if ( seed == 0 )\n              seed += 0x2873;\n            args++;\n          }\n          break;\n\n        case cff_op_mul:\n          FT_TRACE4(( \" mul\\n\" ));\n\n          args[0] = FT_MulFix( args[0], args[1] );\n          args++;\n          break;\n\n        case cff_op_sqrt:\n          FT_TRACE4(( \" sqrt\\n\" ));\n\n          if ( args[0] > 0 )\n          {\n            FT_Int    count = 9;\n            FT_Fixed  root  = args[0];\n            FT_Fixed  new_root;\n\n\n            for (;;)\n            {\n              new_root = ( root + FT_DivFix( args[0], root ) + 1 ) >> 1;\n              if ( new_root == root || count <= 0 )\n                break;\n              root = new_root;\n            }\n            args[0] = new_root;\n          }\n          else\n            args[0] = 0;\n          args++;\n          break;\n\n        case cff_op_drop:\n          /* nothing */\n          FT_TRACE4(( \" drop\\n\" ));\n\n          break;\n\n        case cff_op_exch:\n          {\n            FT_Fixed  tmp;\n\n\n            FT_TRACE4(( \" exch\\n\" ));\n\n            tmp     = args[0];\n            args[0] = args[1];\n            args[1] = tmp;\n            args   += 2;\n          }\n          break;\n\n        case cff_op_index:\n          {\n            FT_Int  idx = (FT_Int)( args[0] >> 16 );\n\n\n            FT_TRACE4(( \" index\\n\" ));\n\n            if ( idx < 0 )\n              idx = 0;\n            else if ( idx > num_args - 2 )\n              idx = num_args - 2;\n            args[0] = args[-( idx + 1 )];\n            args++;\n          }\n          break;\n\n        case cff_op_roll:\n          {\n            FT_Int  count = (FT_Int)( args[0] >> 16 );\n            FT_Int  idx   = (FT_Int)( args[1] >> 16 );\n\n\n            FT_TRACE4(( \" roll\\n\" ));\n\n            if ( count <= 0 )\n              count = 1;\n\n            args -= count;\n            if ( args < stack )\n              goto Stack_Underflow;\n\n            if ( idx >= 0 )\n            {\n              while ( idx > 0 )\n              {\n                FT_Fixed  tmp = args[count - 1];\n                FT_Int    i;\n\n\n                for ( i = count - 2; i >= 0; i-- )\n                  args[i + 1] = args[i];\n                args[0] = tmp;\n                idx--;\n              }\n            }\n            else\n            {\n              while ( idx < 0 )\n              {\n                FT_Fixed  tmp = args[0];\n                FT_Int    i;\n\n\n                for ( i = 0; i < count - 1; i++ )\n                  args[i] = args[i + 1];\n                args[count - 1] = tmp;\n                idx++;\n              }\n            }\n            args += count;\n          }\n          break;\n\n        case cff_op_dup:\n          FT_TRACE4(( \" dup\\n\" ));\n\n          args[1] = args[0];\n          args += 2;\n          break;\n\n        case cff_op_put:\n          {\n            FT_Fixed  val = args[0];\n            FT_Int    idx = (FT_Int)( args[1] >> 16 );\n\n\n            FT_TRACE4(( \" put\\n\" ));\n\n            if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )\n              decoder->buildchar[idx] = val;\n          }\n          break;\n\n        case cff_op_get:\n          {\n            FT_Int    idx = (FT_Int)( args[0] >> 16 );\n            FT_Fixed  val = 0;\n\n\n            FT_TRACE4(( \" get\\n\" ));\n\n            if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )\n              val = decoder->buildchar[idx];\n\n            args[0] = val;\n            args++;\n          }\n          break;\n\n        case cff_op_store:\n          FT_TRACE4(( \" store\\n\"));\n\n          goto Unimplemented;\n\n        case cff_op_load:\n          FT_TRACE4(( \" load\\n\" ));\n\n          goto Unimplemented;\n\n        case cff_op_dotsection:\n          /* this operator is deprecated and ignored by the parser */\n          FT_TRACE4(( \" dotsection\\n\" ));\n          break;\n\n        case cff_op_closepath:\n          /* this is an invalid Type 2 operator; however, there        */\n          /* exist fonts which are incorrectly converted from probably */\n          /* Type 1 to CFF, and some parsers seem to accept it         */\n\n          FT_TRACE4(( \" closepath (invalid op)\\n\" ));\n\n          args = stack;\n          break;\n\n        case cff_op_hsbw:\n          /* this is an invalid Type 2 operator; however, there        */\n          /* exist fonts which are incorrectly converted from probably */\n          /* Type 1 to CFF, and some parsers seem to accept it         */\n\n          FT_TRACE4(( \" hsbw (invalid op)\\n\" ));\n\n          decoder->glyph_width = decoder->nominal_width + ( args[1] >> 16 );\n\n          decoder->builder.left_bearing.x = args[0];\n          decoder->builder.left_bearing.y = 0;\n\n          x    = decoder->builder.pos_x + args[0];\n          y    = decoder->builder.pos_y;\n          args = stack;\n          break;\n\n        case cff_op_sbw:\n          /* this is an invalid Type 2 operator; however, there        */\n          /* exist fonts which are incorrectly converted from probably */\n          /* Type 1 to CFF, and some parsers seem to accept it         */\n\n          FT_TRACE4(( \" sbw (invalid op)\\n\" ));\n\n          decoder->glyph_width = decoder->nominal_width + ( args[2] >> 16 );\n\n          decoder->builder.left_bearing.x = args[0];\n          decoder->builder.left_bearing.y = args[1];\n\n          x    = decoder->builder.pos_x + args[0];\n          y    = decoder->builder.pos_y + args[1];\n          args = stack;\n          break;\n\n        case cff_op_setcurrentpoint:\n          /* this is an invalid Type 2 operator; however, there        */\n          /* exist fonts which are incorrectly converted from probably */\n          /* Type 1 to CFF, and some parsers seem to accept it         */\n\n          FT_TRACE4(( \" setcurrentpoint (invalid op)\\n\" ));\n\n          x    = decoder->builder.pos_x + args[0];\n          y    = decoder->builder.pos_y + args[1];\n          args = stack;\n          break;\n\n        case cff_op_callothersubr:\n          /* this is an invalid Type 2 operator; however, there        */\n          /* exist fonts which are incorrectly converted from probably */\n          /* Type 1 to CFF, and some parsers seem to accept it         */\n\n          FT_TRACE4(( \" callothersubr (invalid op)\\n\" ));\n\n          /* subsequent `pop' operands should add the arguments,       */\n          /* this is the implementation described for `unknown' other  */\n          /* subroutines in the Type1 spec.                            */\n          /*                                                           */\n          /* XXX Fix return arguments (see discussion below).          */\n          args -= 2 + ( args[-2] >> 16 );\n          if ( args < stack )\n            goto Stack_Underflow;\n          break;\n\n        case cff_op_pop:\n          /* this is an invalid Type 2 operator; however, there        */\n          /* exist fonts which are incorrectly converted from probably */\n          /* Type 1 to CFF, and some parsers seem to accept it         */\n\n          FT_TRACE4(( \" pop (invalid op)\\n\" ));\n\n          /* XXX Increasing `args' is wrong: After a certain number of */\n          /* `pop's we get a stack overflow.  Reason for doing it is   */\n          /* code like this (actually found in a CFF font):            */\n          /*                                                           */\n          /*   17 1 3 callothersubr                                    */\n          /*   pop                                                     */\n          /*   callsubr                                                */\n          /*                                                           */\n          /* Since we handle `callothersubr' as a no-op, and           */\n          /* `callsubr' needs at least one argument, `pop' can't be a  */\n          /* no-op too as it basically should be.                      */\n          /*                                                           */\n          /* The right solution would be to provide real support for   */\n          /* `callothersubr' as done in `t1decode.c', however, given   */\n          /* the fact that CFF fonts with `pop' are invalid, it is     */\n          /* questionable whether it is worth the time.                */\n          args++;\n          break;\n\n        case cff_op_and:\n          {\n            FT_Fixed  cond = args[0] && args[1];\n\n\n            FT_TRACE4(( \" and\\n\" ));\n\n            args[0] = cond ? 0x10000L : 0;\n            args++;\n          }\n          break;\n\n        case cff_op_or:\n          {\n            FT_Fixed  cond = args[0] || args[1];\n\n\n            FT_TRACE4(( \" or\\n\" ));\n\n            args[0] = cond ? 0x10000L : 0;\n            args++;\n          }\n          break;\n\n        case cff_op_eq:\n          {\n            FT_Fixed  cond = !args[0];\n\n\n            FT_TRACE4(( \" eq\\n\" ));\n\n            args[0] = cond ? 0x10000L : 0;\n            args++;\n          }\n          break;\n\n        case cff_op_ifelse:\n          {\n            FT_Fixed  cond = ( args[2] <= args[3] );\n\n\n            FT_TRACE4(( \" ifelse\\n\" ));\n\n            if ( !cond )\n              args[0] = args[1];\n            args++;\n          }\n          break;\n\n        case cff_op_callsubr:\n          {\n            FT_UInt  idx = (FT_UInt)( ( args[0] >> 16 ) +\n                                      decoder->locals_bias );\n\n\n            FT_TRACE4(( \" callsubr(%d)\\n\", idx ));\n\n            if ( idx >= decoder->num_locals )\n            {\n              FT_ERROR(( \"cff_decoder_parse_charstrings:\"\n                         \" invalid local subr index\\n\" ));\n              goto Syntax_Error;\n            }\n\n            if ( zone - decoder->zones >= CFF_MAX_SUBRS_CALLS )\n            {\n              FT_ERROR(( \"cff_decoder_parse_charstrings:\"\n                         \" too many nested subrs\\n\" ));\n              goto Syntax_Error;\n            }\n\n            zone->cursor = ip;  /* save current instruction pointer */\n\n            zone++;\n            zone->base   = decoder->locals[idx];\n            zone->limit  = decoder->locals[idx + 1];\n            zone->cursor = zone->base;\n\n            if ( !zone->base || zone->limit == zone->base )\n            {\n              FT_ERROR(( \"cff_decoder_parse_charstrings:\"\n                         \" invoking empty subrs\\n\" ));\n              goto Syntax_Error;\n            }\n\n            decoder->zone = zone;\n            ip            = zone->base;\n            limit         = zone->limit;\n          }\n          break;\n\n        case cff_op_callgsubr:\n          {\n            FT_UInt  idx = (FT_UInt)( ( args[0] >> 16 ) +\n                                      decoder->globals_bias );\n\n\n            FT_TRACE4(( \" callgsubr(%d)\\n\", idx ));\n\n            if ( idx >= decoder->num_globals )\n            {\n              FT_ERROR(( \"cff_decoder_parse_charstrings:\"\n                         \" invalid global subr index\\n\" ));\n              goto Syntax_Error;\n            }\n\n            if ( zone - decoder->zones >= CFF_MAX_SUBRS_CALLS )\n            {\n              FT_ERROR(( \"cff_decoder_parse_charstrings:\"\n                         \" too many nested subrs\\n\" ));\n              goto Syntax_Error;\n            }\n\n            zone->cursor = ip;  /* save current instruction pointer */\n\n            zone++;\n            zone->base   = decoder->globals[idx];\n            zone->limit  = decoder->globals[idx + 1];\n            zone->cursor = zone->base;\n\n            if ( !zone->base || zone->limit == zone->base )\n            {\n              FT_ERROR(( \"cff_decoder_parse_charstrings:\"\n                         \" invoking empty subrs\\n\" ));\n              goto Syntax_Error;\n            }\n\n            decoder->zone = zone;\n            ip            = zone->base;\n            limit         = zone->limit;\n          }\n          break;\n\n        case cff_op_return:\n          FT_TRACE4(( \" return\\n\" ));\n\n          if ( decoder->zone <= decoder->zones )\n          {\n            FT_ERROR(( \"cff_decoder_parse_charstrings:\"\n                       \" unexpected return\\n\" ));\n            goto Syntax_Error;\n          }\n\n          decoder->zone--;\n          zone  = decoder->zone;\n          ip    = zone->cursor;\n          limit = zone->limit;\n          break;\n\n        default:\n        Unimplemented:\n          FT_ERROR(( \"Unimplemented opcode: %d\", ip[-1] ));\n\n          if ( ip[-1] == 12 )\n            FT_ERROR(( \" %d\", ip[0] ));\n          FT_ERROR(( \"\\n\" ));\n\n          return FT_THROW( Unimplemented_Feature );\n        }\n\n        decoder->top = args;\n\n        if ( decoder->top - stack >= CFF_MAX_OPERANDS )\n          goto Stack_Overflow;\n\n      } /* general operator processing */\n\n    } /* while ip < limit */\n\n    FT_TRACE4(( \"..end..\\n\\n\" ));\n\n  Fail:\n    return error;\n\n  Syntax_Error:\n    FT_TRACE4(( \"cff_decoder_parse_charstrings: syntax error\\n\" ));\n    return FT_THROW( Invalid_File_Format );\n\n  Stack_Underflow:\n    FT_TRACE4(( \"cff_decoder_parse_charstrings: stack underflow\\n\" ));\n    return FT_THROW( Too_Few_Arguments );\n\n  Stack_Overflow:\n    FT_TRACE4(( \"cff_decoder_parse_charstrings: stack overflow\\n\" ));\n    return FT_THROW( Stack_Overflow );\n  }\n\n#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /**********                                                      *********/\n  /**********                                                      *********/\n  /**********            COMPUTE THE MAXIMUM ADVANCE WIDTH         *********/\n  /**********                                                      *********/\n  /**********    The following code is in charge of computing      *********/\n  /**********    the maximum advance width of the font.  It        *********/\n  /**********    quickly processes each glyph charstring to        *********/\n  /**********    extract the value from either a `sbw' or `seac'   *********/\n  /**********    operator.                                         *********/\n  /**********                                                      *********/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n#if 0 /* unused until we support pure CFF fonts */\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_compute_max_advance( TT_Face  face,\n                           FT_Int*  max_advance )\n  {\n    FT_Error     error = FT_Err_Ok;\n    CFF_Decoder  decoder;\n    FT_Int       glyph_index;\n    CFF_Font     cff = (CFF_Font)face->other;\n\n\n    *max_advance = 0;\n\n    /* Initialize load decoder */\n    cff_decoder_init( &decoder, face, 0, 0, 0, 0 );\n\n    decoder.builder.metrics_only = 1;\n    decoder.builder.load_points  = 0;\n\n    /* For each glyph, parse the glyph charstring and extract */\n    /* the advance width.                                     */\n    for ( glyph_index = 0; glyph_index < face->root.num_glyphs;\n          glyph_index++ )\n    {\n      FT_Byte*  charstring;\n      FT_ULong  charstring_len;\n\n\n      /* now get load the unscaled outline */\n      error = cff_get_glyph_data( face, glyph_index,\n                                  &charstring, &charstring_len );\n      if ( !error )\n      {\n        error = cff_decoder_prepare( &decoder, size, glyph_index );\n        if ( !error )\n          error = cff_decoder_parse_charstrings( &decoder,\n                                                 charstring,\n                                                 charstring_len );\n\n        cff_free_glyph_data( face, &charstring, &charstring_len );\n      }\n\n      /* ignore the error if one has occurred -- skip to next glyph */\n      error = FT_Err_Ok;\n    }\n\n    *max_advance = decoder.builder.advance.x;\n\n    return FT_Err_Ok;\n  }\n\n\n#endif /* 0 */\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_slot_load( CFF_GlyphSlot  glyph,\n                 CFF_Size       size,\n                 FT_UInt        glyph_index,\n                 FT_Int32       load_flags )\n  {\n    FT_Error     error;\n    CFF_Decoder  decoder;\n    TT_Face      face = (TT_Face)glyph->root.face;\n    FT_Bool      hinting, scaled, force_scaling;\n    CFF_Font     cff  = (CFF_Font)face->extra.data;\n\n    FT_Matrix    font_matrix;\n    FT_Vector    font_offset;\n\n\n    force_scaling = FALSE;\n\n    /* in a CID-keyed font, consider `glyph_index' as a CID and map */\n    /* it immediately to the real glyph_index -- if it isn't a      */\n    /* subsetted font, glyph_indices and CIDs are identical, though */\n    if ( cff->top_font.font_dict.cid_registry != 0xFFFFU &&\n         cff->charset.cids                               )\n    {\n      /* don't handle CID 0 (.notdef) which is directly mapped to GID 0 */\n      if ( glyph_index != 0 )\n      {\n        glyph_index = cff_charset_cid_to_gindex( &cff->charset,\n                                                 glyph_index );\n        if ( glyph_index == 0 )\n          return FT_THROW( Invalid_Argument );\n      }\n    }\n    else if ( glyph_index >= cff->num_glyphs )\n      return FT_THROW( Invalid_Argument );\n\n    if ( load_flags & FT_LOAD_NO_RECURSE )\n      load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;\n\n    glyph->x_scale = 0x10000L;\n    glyph->y_scale = 0x10000L;\n    if ( size )\n    {\n      glyph->x_scale = size->root.metrics.x_scale;\n      glyph->y_scale = size->root.metrics.y_scale;\n    }\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n    /* try to load embedded bitmap if any              */\n    /*                                                 */\n    /* XXX: The convention should be emphasized in     */\n    /*      the documents because it can be confusing. */\n    if ( size )\n    {\n      CFF_Face      cff_face = (CFF_Face)size->root.face;\n      SFNT_Service  sfnt     = (SFNT_Service)cff_face->sfnt;\n      FT_Stream     stream   = cff_face->root.stream;\n\n\n      if ( size->strike_index != 0xFFFFFFFFUL      &&\n           sfnt->load_eblc                         &&\n           ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )\n      {\n        TT_SBit_MetricsRec  metrics;\n\n\n        error = sfnt->load_sbit_image( face,\n                                       size->strike_index,\n                                       glyph_index,\n                                       (FT_Int)load_flags,\n                                       stream,\n                                       &glyph->root.bitmap,\n                                       &metrics );\n\n        if ( !error )\n        {\n          FT_Bool    has_vertical_info;\n          FT_UShort  advance;\n          FT_Short   dummy;\n\n\n          glyph->root.outline.n_points   = 0;\n          glyph->root.outline.n_contours = 0;\n\n          glyph->root.metrics.width  = (FT_Pos)metrics.width  << 6;\n          glyph->root.metrics.height = (FT_Pos)metrics.height << 6;\n\n          glyph->root.metrics.horiBearingX = (FT_Pos)metrics.horiBearingX << 6;\n          glyph->root.metrics.horiBearingY = (FT_Pos)metrics.horiBearingY << 6;\n          glyph->root.metrics.horiAdvance  = (FT_Pos)metrics.horiAdvance  << 6;\n\n          glyph->root.metrics.vertBearingX = (FT_Pos)metrics.vertBearingX << 6;\n          glyph->root.metrics.vertBearingY = (FT_Pos)metrics.vertBearingY << 6;\n          glyph->root.metrics.vertAdvance  = (FT_Pos)metrics.vertAdvance  << 6;\n\n          glyph->root.format = FT_GLYPH_FORMAT_BITMAP;\n\n          if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )\n          {\n            glyph->root.bitmap_left = metrics.vertBearingX;\n            glyph->root.bitmap_top  = metrics.vertBearingY;\n          }\n          else\n          {\n            glyph->root.bitmap_left = metrics.horiBearingX;\n            glyph->root.bitmap_top  = metrics.horiBearingY;\n          }\n\n          /* compute linear advance widths */\n\n          (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 0,\n                                                           glyph_index,\n                                                           &dummy,\n                                                           &advance );\n          glyph->root.linearHoriAdvance = advance;\n\n          has_vertical_info = FT_BOOL(\n                                face->vertical_info                   &&\n                                face->vertical.number_Of_VMetrics > 0 );\n\n          /* get the vertical metrics from the vtmx table if we have one */\n          if ( has_vertical_info )\n          {\n            (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1,\n                                                             glyph_index,\n                                                             &dummy,\n                                                             &advance );\n            glyph->root.linearVertAdvance = advance;\n          }\n          else\n          {\n            /* make up vertical ones */\n            if ( face->os2.version != 0xFFFFU )\n              glyph->root.linearVertAdvance = (FT_Pos)\n                ( face->os2.sTypoAscender - face->os2.sTypoDescender );\n            else\n              glyph->root.linearVertAdvance = (FT_Pos)\n                ( face->horizontal.Ascender - face->horizontal.Descender );\n          }\n\n          return error;\n        }\n      }\n    }\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n    /* return immediately if we only want the embedded bitmaps */\n    if ( load_flags & FT_LOAD_SBITS_ONLY )\n      return FT_THROW( Invalid_Argument );\n\n    /* if we have a CID subfont, use its matrix (which has already */\n    /* been multiplied with the root matrix)                       */\n\n    /* this scaling is only relevant if the PS hinter isn't active */\n    if ( cff->num_subfonts )\n    {\n      FT_ULong  top_upm, sub_upm;\n      FT_Byte   fd_index = cff_fd_select_get( &cff->fd_select,\n                                              glyph_index );\n\n\n      if ( fd_index >= cff->num_subfonts )\n        fd_index = (FT_Byte)( cff->num_subfonts - 1 );\n\n      top_upm = cff->top_font.font_dict.units_per_em;\n      sub_upm = cff->subfonts[fd_index]->font_dict.units_per_em;\n\n\n      font_matrix = cff->subfonts[fd_index]->font_dict.font_matrix;\n      font_offset = cff->subfonts[fd_index]->font_dict.font_offset;\n\n      if ( top_upm != sub_upm )\n      {\n        glyph->x_scale = FT_MulDiv( glyph->x_scale, top_upm, sub_upm );\n        glyph->y_scale = FT_MulDiv( glyph->y_scale, top_upm, sub_upm );\n\n        force_scaling = TRUE;\n      }\n    }\n    else\n    {\n      font_matrix = cff->top_font.font_dict.font_matrix;\n      font_offset = cff->top_font.font_dict.font_offset;\n    }\n\n    glyph->root.outline.n_points   = 0;\n    glyph->root.outline.n_contours = 0;\n\n    /* top-level code ensures that FT_LOAD_NO_HINTING is set */\n    /* if FT_LOAD_NO_SCALE is active                         */\n    hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_HINTING ) == 0 );\n    scaled  = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE   ) == 0 );\n\n    glyph->hint        = hinting;\n    glyph->scaled      = scaled;\n    glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;  /* by default */\n\n    {\n#ifdef CFF_CONFIG_OPTION_OLD_ENGINE\n      CFF_Driver  driver = (CFF_Driver)FT_FACE_DRIVER( face );\n#endif\n\n\n      FT_Byte*  charstring;\n      FT_ULong  charstring_len;\n\n\n      cff_decoder_init( &decoder, face, size, glyph, hinting,\n                        FT_LOAD_TARGET_MODE( load_flags ) );\n\n      if ( load_flags & FT_LOAD_ADVANCE_ONLY )\n        decoder.width_only = TRUE;\n\n      decoder.builder.no_recurse =\n        (FT_Bool)( load_flags & FT_LOAD_NO_RECURSE );\n\n      /* now load the unscaled outline */\n      error = cff_get_glyph_data( face, glyph_index,\n                                  &charstring, &charstring_len );\n      if ( error )\n        goto Glyph_Build_Finished;\n\n      error = cff_decoder_prepare( &decoder, size, glyph_index );\n      if ( error )\n        goto Glyph_Build_Finished;\n\n#ifdef CFF_CONFIG_OPTION_OLD_ENGINE\n      /* choose which CFF renderer to use */\n      if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE )\n        error = cff_decoder_parse_charstrings( &decoder,\n                                               charstring,\n                                               charstring_len );\n      else\n#endif\n      {\n        error = cf2_decoder_parse_charstrings( &decoder,\n                                               charstring,\n                                               charstring_len );\n\n        /* Adobe's engine uses 16.16 numbers everywhere;              */\n        /* as a consequence, glyphs larger than 2000ppem get rejected */\n        if ( FT_ERR_EQ( error, Glyph_Too_Big ) )\n        {\n          /* this time, we retry unhinted and scale up the glyph later on */\n          /* (the engine uses and sets the hardcoded value 0x10000 / 64 = */\n          /* 0x400 for both `x_scale' and `y_scale' in this case)         */\n          hinting       = FALSE;\n          force_scaling = TRUE;\n          glyph->hint   = hinting;\n\n          error = cf2_decoder_parse_charstrings( &decoder,\n                                                 charstring,\n                                                 charstring_len );\n        }\n      }\n\n      cff_free_glyph_data( face, &charstring, charstring_len );\n\n      if ( error )\n        goto Glyph_Build_Finished;\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n      /* Control data and length may not be available for incremental */\n      /* fonts.                                                       */\n      if ( face->root.internal->incremental_interface )\n      {\n        glyph->root.control_data = 0;\n        glyph->root.control_len = 0;\n      }\n      else\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n      /* We set control_data and control_len if charstrings is loaded. */\n      /* See how charstring loads at cff_index_access_element() in     */\n      /* cffload.c.                                                    */\n      {\n        CFF_Index  csindex = &cff->charstrings_index;\n\n\n        if ( csindex->offsets )\n        {\n          glyph->root.control_data = csindex->bytes +\n                                     csindex->offsets[glyph_index] - 1;\n          glyph->root.control_len  = charstring_len;\n        }\n      }\n\n  Glyph_Build_Finished:\n      /* save new glyph tables, if no error */\n      if ( !error )\n        cff_builder_done( &decoder.builder );\n      /* XXX: anything to do for broken glyph entry? */\n    }\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n    /* Incremental fonts can optionally override the metrics. */\n    if ( !error                                                               &&\n         face->root.internal->incremental_interface                           &&\n         face->root.internal->incremental_interface->funcs->get_glyph_metrics )\n    {\n      FT_Incremental_MetricsRec  metrics;\n\n\n      metrics.bearing_x = decoder.builder.left_bearing.x;\n      metrics.bearing_y = 0;\n      metrics.advance   = decoder.builder.advance.x;\n      metrics.advance_v = decoder.builder.advance.y;\n\n      error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(\n                face->root.internal->incremental_interface->object,\n                glyph_index, FALSE, &metrics );\n\n      decoder.builder.left_bearing.x = metrics.bearing_x;\n      decoder.builder.advance.x      = metrics.advance;\n      decoder.builder.advance.y      = metrics.advance_v;\n    }\n\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n    if ( !error )\n    {\n      /* Now, set the metrics -- this is rather simple, as   */\n      /* the left side bearing is the xMin, and the top side */\n      /* bearing the yMax.                                   */\n\n      /* For composite glyphs, return only left side bearing and */\n      /* advance width.                                          */\n      if ( load_flags & FT_LOAD_NO_RECURSE )\n      {\n        FT_Slot_Internal  internal = glyph->root.internal;\n\n\n        glyph->root.metrics.horiBearingX = decoder.builder.left_bearing.x;\n        glyph->root.metrics.horiAdvance  = decoder.glyph_width;\n        internal->glyph_matrix           = font_matrix;\n        internal->glyph_delta            = font_offset;\n        internal->glyph_transformed      = 1;\n      }\n      else\n      {\n        FT_BBox            cbox;\n        FT_Glyph_Metrics*  metrics = &glyph->root.metrics;\n        FT_Vector          advance;\n        FT_Bool            has_vertical_info;\n\n\n        /* copy the _unscaled_ advance width */\n        metrics->horiAdvance                    = decoder.glyph_width;\n        glyph->root.linearHoriAdvance           = decoder.glyph_width;\n        glyph->root.internal->glyph_transformed = 0;\n\n        has_vertical_info = FT_BOOL( face->vertical_info                   &&\n                                     face->vertical.number_Of_VMetrics > 0 );\n\n        /* get the vertical metrics from the vtmx table if we have one */\n        if ( has_vertical_info )\n        {\n          FT_Short   vertBearingY = 0;\n          FT_UShort  vertAdvance  = 0;\n\n\n          (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1,\n                                                           glyph_index,\n                                                           &vertBearingY,\n                                                           &vertAdvance );\n          metrics->vertBearingY = vertBearingY;\n          metrics->vertAdvance  = vertAdvance;\n        }\n        else\n        {\n          /* make up vertical ones */\n          if ( face->os2.version != 0xFFFFU )\n            metrics->vertAdvance = (FT_Pos)( face->os2.sTypoAscender -\n                                             face->os2.sTypoDescender );\n          else\n            metrics->vertAdvance = (FT_Pos)( face->horizontal.Ascender -\n                                             face->horizontal.Descender );\n        }\n\n        glyph->root.linearVertAdvance = metrics->vertAdvance;\n\n        glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;\n\n        glyph->root.outline.flags = 0;\n        if ( size && size->root.metrics.y_ppem < 24 )\n          glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;\n\n        glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;\n\n        if ( !( font_matrix.xx == 0x10000L &&\n                font_matrix.yy == 0x10000L &&\n                font_matrix.xy == 0        &&\n                font_matrix.yx == 0        ) )\n          FT_Outline_Transform( &glyph->root.outline, &font_matrix );\n\n        if ( !( font_offset.x == 0 &&\n                font_offset.y == 0 ) )\n          FT_Outline_Translate( &glyph->root.outline,\n                                font_offset.x, font_offset.y );\n\n        advance.x = metrics->horiAdvance;\n        advance.y = 0;\n        FT_Vector_Transform( &advance, &font_matrix );\n        metrics->horiAdvance = advance.x + font_offset.x;\n\n        advance.x = 0;\n        advance.y = metrics->vertAdvance;\n        FT_Vector_Transform( &advance, &font_matrix );\n        metrics->vertAdvance = advance.y + font_offset.y;\n\n        if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 || force_scaling )\n        {\n          /* scale the outline and the metrics */\n          FT_Int       n;\n          FT_Outline*  cur     = &glyph->root.outline;\n          FT_Vector*   vec     = cur->points;\n          FT_Fixed     x_scale = glyph->x_scale;\n          FT_Fixed     y_scale = glyph->y_scale;\n\n\n          /* First of all, scale the points */\n          if ( !hinting || !decoder.builder.hints_funcs )\n            for ( n = cur->n_points; n > 0; n--, vec++ )\n            {\n              vec->x = FT_MulFix( vec->x, x_scale );\n              vec->y = FT_MulFix( vec->y, y_scale );\n            }\n\n          /* Then scale the metrics */\n          metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale );\n          metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, y_scale );\n        }\n\n        /* compute the other metrics */\n        FT_Outline_Get_CBox( &glyph->root.outline, &cbox );\n\n        metrics->width  = cbox.xMax - cbox.xMin;\n        metrics->height = cbox.yMax - cbox.yMin;\n\n        metrics->horiBearingX = cbox.xMin;\n        metrics->horiBearingY = cbox.yMax;\n\n        if ( has_vertical_info )\n          metrics->vertBearingX = metrics->horiBearingX -\n                                    metrics->horiAdvance / 2;\n        else\n        {\n          if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )\n            ft_synthesize_vertical_metrics( metrics,\n                                            metrics->vertAdvance );\n        }\n      }\n    }\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffgload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffgload.h                                                             */\n/*                                                                         */\n/*    OpenType Glyph Loader (specification).                               */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006-2009, 2013 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CFFGLOAD_H__\n#define __CFFGLOAD_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include \"cffobjs.h\"\n\n\nFT_BEGIN_HEADER\n\n\n#define CFF_MAX_OPERANDS        48\n#define CFF_MAX_SUBRS_CALLS     32\n#define CFF_MAX_TRANS_ELEMENTS  32\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Structure>                                                           */\n  /*    CFF_Builder                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*     A structure used during glyph loading to store its outline.       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    memory        :: The current memory object.                        */\n  /*                                                                       */\n  /*    face          :: The current face object.                          */\n  /*                                                                       */\n  /*    glyph         :: The current glyph slot.                           */\n  /*                                                                       */\n  /*    loader        :: The current glyph loader.                         */\n  /*                                                                       */\n  /*    base          :: The base glyph outline.                           */\n  /*                                                                       */\n  /*    current       :: The current glyph outline.                        */\n  /*                                                                       */\n  /*    pos_x         :: The horizontal translation (if composite glyph).  */\n  /*                                                                       */\n  /*    pos_y         :: The vertical translation (if composite glyph).    */\n  /*                                                                       */\n  /*    left_bearing  :: The left side bearing point.                      */\n  /*                                                                       */\n  /*    advance       :: The horizontal advance vector.                    */\n  /*                                                                       */\n  /*    bbox          :: Unused.                                           */\n  /*                                                                       */\n  /*    path_begun    :: A flag which indicates that a new path has begun. */\n  /*                                                                       */\n  /*    load_points   :: If this flag is not set, no points are loaded.    */\n  /*                                                                       */\n  /*    no_recurse    :: Set but not used.                                 */\n  /*                                                                       */\n  /*    metrics_only  :: A boolean indicating that we only want to compute */\n  /*                     the metrics of a given glyph, not load all of its */\n  /*                     points.                                           */\n  /*                                                                       */\n  /*    hints_funcs   :: Auxiliary pointer for hinting.                    */\n  /*                                                                       */\n  /*    hints_globals :: Auxiliary pointer for hinting.                    */\n  /*                                                                       */\n  typedef struct  CFF_Builder_\n  {\n    FT_Memory       memory;\n    TT_Face         face;\n    CFF_GlyphSlot   glyph;\n    FT_GlyphLoader  loader;\n    FT_Outline*     base;\n    FT_Outline*     current;\n\n    FT_Pos          pos_x;\n    FT_Pos          pos_y;\n\n    FT_Vector       left_bearing;\n    FT_Vector       advance;\n\n    FT_BBox         bbox;          /* bounding box */\n    FT_Bool         path_begun;\n    FT_Bool         load_points;\n    FT_Bool         no_recurse;\n\n    FT_Bool         metrics_only;\n\n    void*           hints_funcs;    /* hinter-specific */\n    void*           hints_globals;  /* hinter-specific */\n\n  } CFF_Builder;\n\n\n  FT_LOCAL( FT_Error )\n  cff_check_points( CFF_Builder*  builder,\n                    FT_Int        count );\n\n  FT_LOCAL( void )\n  cff_builder_add_point( CFF_Builder*  builder,\n                         FT_Pos        x,\n                         FT_Pos        y,\n                         FT_Byte       flag );\n  FT_LOCAL( FT_Error )\n  cff_builder_add_point1( CFF_Builder*  builder,\n                          FT_Pos        x,\n                          FT_Pos        y );\n  FT_LOCAL( FT_Error )\n  cff_builder_start_point( CFF_Builder*  builder,\n                           FT_Pos        x,\n                           FT_Pos        y );\n  FT_LOCAL( void )\n  cff_builder_close_contour( CFF_Builder*  builder );\n\n\n  FT_LOCAL( FT_Int )\n  cff_lookup_glyph_by_stdcharcode( CFF_Font  cff,\n                                   FT_Int    charcode );\n  FT_LOCAL( FT_Error )\n  cff_get_glyph_data( TT_Face    face,\n                      FT_UInt    glyph_index,\n                      FT_Byte**  pointer,\n                      FT_ULong*  length );\n  FT_LOCAL( void )\n  cff_free_glyph_data( TT_Face    face,\n                       FT_Byte**  pointer,\n                       FT_ULong   length );\n\n\n  /* execution context charstring zone */\n\n  typedef struct  CFF_Decoder_Zone_\n  {\n    FT_Byte*  base;\n    FT_Byte*  limit;\n    FT_Byte*  cursor;\n\n  } CFF_Decoder_Zone;\n\n\n  typedef struct  CFF_Decoder_\n  {\n    CFF_Builder        builder;\n    CFF_Font           cff;\n\n    FT_Fixed           stack[CFF_MAX_OPERANDS + 1];\n    FT_Fixed*          top;\n\n    CFF_Decoder_Zone   zones[CFF_MAX_SUBRS_CALLS + 1];\n    CFF_Decoder_Zone*  zone;\n\n    FT_Int             flex_state;\n    FT_Int             num_flex_vectors;\n    FT_Vector          flex_vectors[7];\n\n    FT_Pos             glyph_width;\n    FT_Pos             nominal_width;\n\n    FT_Bool            read_width;\n    FT_Bool            width_only;\n    FT_Int             num_hints;\n    FT_Fixed           buildchar[CFF_MAX_TRANS_ELEMENTS];\n\n    FT_UInt            num_locals;\n    FT_UInt            num_globals;\n\n    FT_Int             locals_bias;\n    FT_Int             globals_bias;\n\n    FT_Byte**          locals;\n    FT_Byte**          globals;\n\n    FT_Byte**          glyph_names;   /* for pure CFF fonts only  */\n    FT_UInt            num_glyphs;    /* number of glyphs in font */\n\n    FT_Render_Mode     hint_mode;\n\n    FT_Bool            seac;\n\n    CFF_SubFont        current_subfont; /* for current glyph_index */\n\n  } CFF_Decoder;\n\n\n  FT_LOCAL( void )\n  cff_decoder_init( CFF_Decoder*    decoder,\n                    TT_Face         face,\n                    CFF_Size        size,\n                    CFF_GlyphSlot   slot,\n                    FT_Bool         hinting,\n                    FT_Render_Mode  hint_mode );\n\n  FT_LOCAL( FT_Error )\n  cff_decoder_prepare( CFF_Decoder*  decoder,\n                       CFF_Size      size,\n                       FT_UInt       glyph_index );\n\n#if 0  /* unused until we support pure CFF fonts */\n\n  /* Compute the maximum advance width of a font through quick parsing */\n  FT_LOCAL( FT_Error )\n  cff_compute_max_advance( TT_Face  face,\n                           FT_Int*  max_advance );\n\n#endif /* 0 */\n\n#ifdef CFF_CONFIG_OPTION_OLD_ENGINE\n  FT_LOCAL( FT_Error )\n  cff_decoder_parse_charstrings( CFF_Decoder*  decoder,\n                                 FT_Byte*      charstring_base,\n                                 FT_ULong      charstring_len );\n#endif\n\n  FT_LOCAL( FT_Error )\n  cff_slot_load( CFF_GlyphSlot  glyph,\n                 CFF_Size       size,\n                 FT_UInt        glyph_index,\n                 FT_Int32       load_flags );\n\n\nFT_END_HEADER\n\n#endif /* __CFFGLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffload.c                                                              */\n/*                                                                         */\n/*    OpenType and CFF data/program tables loader (body).                  */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_TYPE1_TABLES_H\n\n#include \"cffload.h\"\n#include \"cffparse.h\"\n\n#include \"cfferrs.h\"\n\n\n#if 1\n\n  static const FT_UShort  cff_isoadobe_charset[229] =\n  {\n      0,   1,   2,   3,   4,   5,   6,   7,\n      8,   9,  10,  11,  12,  13,  14,  15,\n     16,  17,  18,  19,  20,  21,  22,  23,\n     24,  25,  26,  27,  28,  29,  30,  31,\n     32,  33,  34,  35,  36,  37,  38,  39,\n     40,  41,  42,  43,  44,  45,  46,  47,\n     48,  49,  50,  51,  52,  53,  54,  55,\n     56,  57,  58,  59,  60,  61,  62,  63,\n     64,  65,  66,  67,  68,  69,  70,  71,\n     72,  73,  74,  75,  76,  77,  78,  79,\n     80,  81,  82,  83,  84,  85,  86,  87,\n     88,  89,  90,  91,  92,  93,  94,  95,\n     96,  97,  98,  99, 100, 101, 102, 103,\n    104, 105, 106, 107, 108, 109, 110, 111,\n    112, 113, 114, 115, 116, 117, 118, 119,\n    120, 121, 122, 123, 124, 125, 126, 127,\n    128, 129, 130, 131, 132, 133, 134, 135,\n    136, 137, 138, 139, 140, 141, 142, 143,\n    144, 145, 146, 147, 148, 149, 150, 151,\n    152, 153, 154, 155, 156, 157, 158, 159,\n    160, 161, 162, 163, 164, 165, 166, 167,\n    168, 169, 170, 171, 172, 173, 174, 175,\n    176, 177, 178, 179, 180, 181, 182, 183,\n    184, 185, 186, 187, 188, 189, 190, 191,\n    192, 193, 194, 195, 196, 197, 198, 199,\n    200, 201, 202, 203, 204, 205, 206, 207,\n    208, 209, 210, 211, 212, 213, 214, 215,\n    216, 217, 218, 219, 220, 221, 222, 223,\n    224, 225, 226, 227, 228\n  };\n\n  static const FT_UShort  cff_expert_charset[166] =\n  {\n      0,   1, 229, 230, 231, 232, 233, 234,\n    235, 236, 237, 238,  13,  14,  15,  99,\n    239, 240, 241, 242, 243, 244, 245, 246,\n    247, 248,  27,  28, 249, 250, 251, 252,\n    253, 254, 255, 256, 257, 258, 259, 260,\n    261, 262, 263, 264, 265, 266, 109, 110,\n    267, 268, 269, 270, 271, 272, 273, 274,\n    275, 276, 277, 278, 279, 280, 281, 282,\n    283, 284, 285, 286, 287, 288, 289, 290,\n    291, 292, 293, 294, 295, 296, 297, 298,\n    299, 300, 301, 302, 303, 304, 305, 306,\n    307, 308, 309, 310, 311, 312, 313, 314,\n    315, 316, 317, 318, 158, 155, 163, 319,\n    320, 321, 322, 323, 324, 325, 326, 150,\n    164, 169, 327, 328, 329, 330, 331, 332,\n    333, 334, 335, 336, 337, 338, 339, 340,\n    341, 342, 343, 344, 345, 346, 347, 348,\n    349, 350, 351, 352, 353, 354, 355, 356,\n    357, 358, 359, 360, 361, 362, 363, 364,\n    365, 366, 367, 368, 369, 370, 371, 372,\n    373, 374, 375, 376, 377, 378\n  };\n\n  static const FT_UShort  cff_expertsubset_charset[87] =\n  {\n      0,   1, 231, 232, 235, 236, 237, 238,\n     13,  14,  15,  99, 239, 240, 241, 242,\n    243, 244, 245, 246, 247, 248,  27,  28,\n    249, 250, 251, 253, 254, 255, 256, 257,\n    258, 259, 260, 261, 262, 263, 264, 265,\n    266, 109, 110, 267, 268, 269, 270, 272,\n    300, 301, 302, 305, 314, 315, 158, 155,\n    163, 320, 321, 322, 323, 324, 325, 326,\n    150, 164, 169, 327, 328, 329, 330, 331,\n    332, 333, 334, 335, 336, 337, 338, 339,\n    340, 341, 342, 343, 344, 345, 346\n  };\n\n  static const FT_UShort  cff_standard_encoding[256] =\n  {\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      1,   2,   3,   4,   5,   6,   7,   8,\n      9,  10,  11,  12,  13,  14,  15,  16,\n     17,  18,  19,  20,  21,  22,  23,  24,\n     25,  26,  27,  28,  29,  30,  31,  32,\n     33,  34,  35,  36,  37,  38,  39,  40,\n     41,  42,  43,  44,  45,  46,  47,  48,\n     49,  50,  51,  52,  53,  54,  55,  56,\n     57,  58,  59,  60,  61,  62,  63,  64,\n     65,  66,  67,  68,  69,  70,  71,  72,\n     73,  74,  75,  76,  77,  78,  79,  80,\n     81,  82,  83,  84,  85,  86,  87,  88,\n     89,  90,  91,  92,  93,  94,  95,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,  96,  97,  98,  99, 100, 101, 102,\n    103, 104, 105, 106, 107, 108, 109, 110,\n      0, 111, 112, 113, 114,   0, 115, 116,\n    117, 118, 119, 120, 121, 122,   0, 123,\n      0, 124, 125, 126, 127, 128, 129, 130,\n    131,   0, 132, 133,   0, 134, 135, 136,\n    137,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0, 138,   0, 139,   0,   0,   0,   0,\n    140, 141, 142, 143,   0,   0,   0,   0,\n      0, 144,   0,   0,   0, 145,   0,   0,\n    146, 147, 148, 149,   0,   0,   0,   0\n  };\n\n  static const FT_UShort  cff_expert_encoding[256] =\n  {\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      1, 229, 230,   0, 231, 232, 233, 234,\n    235, 236, 237, 238,  13,  14,  15,  99,\n    239, 240, 241, 242, 243, 244, 245, 246,\n    247, 248,  27,  28, 249, 250, 251, 252,\n      0, 253, 254, 255, 256, 257,   0,   0,\n      0, 258,   0,   0, 259, 260, 261, 262,\n      0,   0, 263, 264, 265,   0, 266, 109,\n    110, 267, 268, 269,   0, 270, 271, 272,\n    273, 274, 275, 276, 277, 278, 279, 280,\n    281, 282, 283, 284, 285, 286, 287, 288,\n    289, 290, 291, 292, 293, 294, 295, 296,\n    297, 298, 299, 300, 301, 302, 303,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0,   0,   0,   0,   0,   0,   0,   0,\n      0, 304, 305, 306,   0,   0, 307, 308,\n    309, 310, 311,   0, 312,   0,   0, 312,\n      0,   0, 314, 315,   0,   0, 316, 317,\n    318,   0,   0,   0, 158, 155, 163, 319,\n    320, 321, 322, 323, 324, 325,   0,   0,\n    326, 150, 164, 169, 327, 328, 329, 330,\n    331, 332, 333, 334, 335, 336, 337, 338,\n    339, 340, 341, 342, 343, 344, 345, 346,\n    347, 348, 349, 350, 351, 352, 353, 354,\n    355, 356, 357, 358, 359, 360, 361, 362,\n    363, 364, 365, 366, 367, 368, 369, 370,\n    371, 372, 373, 374, 375, 376, 377, 378\n  };\n\n#endif /* 1 */\n\n\n  FT_LOCAL_DEF( FT_UShort )\n  cff_get_standard_encoding( FT_UInt  charcode )\n  {\n    return (FT_UShort)( charcode < 256 ? cff_standard_encoding[charcode]\n                                       : 0 );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cffload\n\n\n  /* read an offset from the index's stream current position */\n  static FT_ULong\n  cff_index_read_offset( CFF_Index  idx,\n                         FT_Error  *errorp )\n  {\n    FT_Error   error;\n    FT_Stream  stream = idx->stream;\n    FT_Byte    tmp[4];\n    FT_ULong   result = 0;\n\n\n    if ( !FT_STREAM_READ( tmp, idx->off_size ) )\n    {\n      FT_Int  nn;\n\n\n      for ( nn = 0; nn < idx->off_size; nn++ )\n        result = ( result << 8 ) | tmp[nn];\n    }\n\n    *errorp = error;\n    return result;\n  }\n\n\n  static FT_Error\n  cff_index_init( CFF_Index  idx,\n                  FT_Stream  stream,\n                  FT_Bool    load )\n  {\n    FT_Error   error;\n    FT_Memory  memory = stream->memory;\n    FT_UShort  count;\n\n\n    FT_MEM_ZERO( idx, sizeof ( *idx ) );\n\n    idx->stream = stream;\n    idx->start  = FT_STREAM_POS();\n    if ( !FT_READ_USHORT( count ) &&\n         count > 0                )\n    {\n      FT_Byte   offsize;\n      FT_ULong  size;\n\n\n      /* there is at least one element; read the offset size,           */\n      /* then access the offset table to compute the index's total size */\n      if ( FT_READ_BYTE( offsize ) )\n        goto Exit;\n\n      if ( offsize < 1 || offsize > 4 )\n      {\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n\n      idx->count    = count;\n      idx->off_size = offsize;\n      size          = (FT_ULong)( count + 1 ) * offsize;\n\n      idx->data_offset = idx->start + 3 + size;\n\n      if ( FT_STREAM_SKIP( size - offsize ) )\n        goto Exit;\n\n      size = cff_index_read_offset( idx, &error );\n      if ( error )\n        goto Exit;\n\n      if ( size == 0 )\n      {\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n\n      idx->data_size = --size;\n\n      if ( load )\n      {\n        /* load the data */\n        if ( FT_FRAME_EXTRACT( size, idx->bytes ) )\n          goto Exit;\n      }\n      else\n      {\n        /* skip the data */\n        if ( FT_STREAM_SKIP( size ) )\n          goto Exit;\n      }\n    }\n\n  Exit:\n    if ( error )\n      FT_FREE( idx->offsets );\n\n    return error;\n  }\n\n\n  static void\n  cff_index_done( CFF_Index  idx )\n  {\n    if ( idx->stream )\n    {\n      FT_Stream  stream = idx->stream;\n      FT_Memory  memory = stream->memory;\n\n\n      if ( idx->bytes )\n        FT_FRAME_RELEASE( idx->bytes );\n\n      FT_FREE( idx->offsets );\n      FT_MEM_ZERO( idx, sizeof ( *idx ) );\n    }\n  }\n\n\n  static FT_Error\n  cff_index_load_offsets( CFF_Index  idx )\n  {\n    FT_Error   error  = FT_Err_Ok;\n    FT_Stream  stream = idx->stream;\n    FT_Memory  memory = stream->memory;\n\n\n    if ( idx->count > 0 && idx->offsets == NULL )\n    {\n      FT_Byte    offsize = idx->off_size;\n      FT_ULong   data_size;\n      FT_Byte*   p;\n      FT_Byte*   p_end;\n      FT_ULong*  poff;\n\n\n      data_size = (FT_ULong)( idx->count + 1 ) * offsize;\n\n      if ( FT_NEW_ARRAY( idx->offsets, idx->count + 1 ) ||\n           FT_STREAM_SEEK( idx->start + 3 )             ||\n           FT_FRAME_ENTER( data_size )                  )\n        goto Exit;\n\n      poff   = idx->offsets;\n      p      = (FT_Byte*)stream->cursor;\n      p_end  = p + data_size;\n\n      switch ( offsize )\n      {\n      case 1:\n        for ( ; p < p_end; p++, poff++ )\n          poff[0] = p[0];\n        break;\n\n      case 2:\n        for ( ; p < p_end; p += 2, poff++ )\n          poff[0] = FT_PEEK_USHORT( p );\n        break;\n\n      case 3:\n        for ( ; p < p_end; p += 3, poff++ )\n          poff[0] = FT_PEEK_OFF3( p );\n        break;\n\n      default:\n        for ( ; p < p_end; p += 4, poff++ )\n          poff[0] = FT_PEEK_ULONG( p );\n      }\n\n      FT_FRAME_EXIT();\n    }\n\n  Exit:\n    if ( error )\n      FT_FREE( idx->offsets );\n\n    return error;\n  }\n\n\n  /* Allocate a table containing pointers to an index's elements. */\n  /* The `pool' argument makes this function convert the index    */\n  /* entries to C-style strings (this is, NULL-terminated).       */\n  static FT_Error\n  cff_index_get_pointers( CFF_Index   idx,\n                          FT_Byte***  table,\n                          FT_Byte**   pool )\n  {\n    FT_Error   error     = FT_Err_Ok;\n    FT_Memory  memory    = idx->stream->memory;\n\n    FT_Byte**  t         = NULL;\n    FT_Byte*   new_bytes = NULL;\n\n\n    *table = NULL;\n\n    if ( idx->offsets == NULL )\n    {\n      error = cff_index_load_offsets( idx );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( idx->count > 0                                        &&\n         !FT_NEW_ARRAY( t, idx->count + 1 )                    &&\n         ( !pool || !FT_ALLOC( new_bytes,\n                               idx->data_size + idx->count ) ) )\n    {\n      FT_ULong  n, cur_offset;\n      FT_ULong  extra = 0;\n      FT_Byte*  org_bytes = idx->bytes;\n\n\n      /* at this point, `idx->offsets' can't be NULL */\n      cur_offset = idx->offsets[0] - 1;\n\n      /* sanity check */\n      if ( cur_offset != 0 )\n      {\n        FT_TRACE0(( \"cff_index_get_pointers:\"\n                    \" invalid first offset value %d set to zero\\n\",\n                    cur_offset ));\n        cur_offset = 0;\n      }\n\n      if ( !pool )\n        t[0] = org_bytes + cur_offset;\n      else\n        t[0] = new_bytes + cur_offset;\n\n      for ( n = 1; n <= idx->count; n++ )\n      {\n        FT_ULong  next_offset = idx->offsets[n] - 1;\n\n\n        /* two sanity checks for invalid offset tables */\n        if ( next_offset < cur_offset )\n          next_offset = cur_offset;\n        else if ( next_offset > idx->data_size )\n          next_offset = idx->data_size;\n\n        if ( !pool )\n          t[n] = org_bytes + next_offset;\n        else\n        {\n          t[n] = new_bytes + next_offset + extra;\n\n          if ( next_offset != cur_offset )\n          {\n            FT_MEM_COPY( t[n - 1], org_bytes + cur_offset, t[n] - t[n - 1] );\n            t[n][0] = '\\0';\n            t[n]   += 1;\n            extra++;\n          }\n        }\n\n        cur_offset = next_offset;\n      }\n      *table = t;\n\n      if ( pool )\n        *pool = new_bytes;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_index_access_element( CFF_Index  idx,\n                            FT_UInt    element,\n                            FT_Byte**  pbytes,\n                            FT_ULong*  pbyte_len )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( idx && idx->count > element )\n    {\n      /* compute start and end offsets */\n      FT_Stream  stream = idx->stream;\n      FT_ULong   off1, off2 = 0;\n\n\n      /* load offsets from file or the offset table */\n      if ( !idx->offsets )\n      {\n        FT_ULong  pos = element * idx->off_size;\n\n\n        if ( FT_STREAM_SEEK( idx->start + 3 + pos ) )\n          goto Exit;\n\n        off1 = cff_index_read_offset( idx, &error );\n        if ( error )\n          goto Exit;\n\n        if ( off1 != 0 )\n        {\n          do\n          {\n            element++;\n            off2 = cff_index_read_offset( idx, &error );\n          }\n          while ( off2 == 0 && element < idx->count );\n        }\n      }\n      else   /* use offsets table */\n      {\n        off1 = idx->offsets[element];\n        if ( off1 )\n        {\n          do\n          {\n            element++;\n            off2 = idx->offsets[element];\n\n          } while ( off2 == 0 && element < idx->count );\n        }\n      }\n\n      /* XXX: should check off2 does not exceed the end of this entry; */\n      /*      at present, only truncate off2 at the end of this stream */\n      if ( off2 > stream->size + 1                    ||\n           idx->data_offset > stream->size - off2 + 1 )\n      {\n        FT_ERROR(( \"cff_index_access_element:\"\n                   \" offset to next entry (%d)\"\n                   \" exceeds the end of stream (%d)\\n\",\n                   off2, stream->size - idx->data_offset + 1 ));\n        off2 = stream->size - idx->data_offset + 1;\n      }\n\n      /* access element */\n      if ( off1 && off2 > off1 )\n      {\n        *pbyte_len = off2 - off1;\n\n        if ( idx->bytes )\n        {\n          /* this index was completely loaded in memory, that's easy */\n          *pbytes = idx->bytes + off1 - 1;\n        }\n        else\n        {\n          /* this index is still on disk/file, access it through a frame */\n          if ( FT_STREAM_SEEK( idx->data_offset + off1 - 1 ) ||\n               FT_FRAME_EXTRACT( off2 - off1, *pbytes )      )\n            goto Exit;\n        }\n      }\n      else\n      {\n        /* empty index element */\n        *pbytes    = 0;\n        *pbyte_len = 0;\n      }\n    }\n    else\n      error = FT_THROW( Invalid_Argument );\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cff_index_forget_element( CFF_Index  idx,\n                            FT_Byte**  pbytes )\n  {\n    if ( idx->bytes == 0 )\n    {\n      FT_Stream  stream = idx->stream;\n\n\n      FT_FRAME_RELEASE( *pbytes );\n    }\n  }\n\n\n  /* get an entry from Name INDEX */\n  FT_LOCAL_DEF( FT_String* )\n  cff_index_get_name( CFF_Font  font,\n                      FT_UInt   element )\n  {\n    CFF_Index   idx = &font->name_index;\n    FT_Memory   memory = idx->stream->memory;\n    FT_Byte*    bytes;\n    FT_ULong    byte_len;\n    FT_Error    error;\n    FT_String*  name = 0;\n\n\n    error = cff_index_access_element( idx, element, &bytes, &byte_len );\n    if ( error )\n      goto Exit;\n\n    if ( !FT_ALLOC( name, byte_len + 1 ) )\n    {\n      FT_MEM_COPY( name, bytes, byte_len );\n      name[byte_len] = 0;\n    }\n    cff_index_forget_element( idx, &bytes );\n\n  Exit:\n    return name;\n  }\n\n\n  /* get an entry from String INDEX */\n  FT_LOCAL_DEF( FT_String* )\n  cff_index_get_string( CFF_Font  font,\n                        FT_UInt   element )\n  {\n    return ( element < font->num_strings )\n             ? (FT_String*)font->strings[element]\n             : NULL;\n  }\n\n\n  FT_LOCAL_DEF( FT_String* )\n  cff_index_get_sid_string( CFF_Font  font,\n                            FT_UInt   sid )\n  {\n    /* value 0xFFFFU indicates a missing dictionary entry */\n    if ( sid == 0xFFFFU )\n      return NULL;\n\n    /* if it is not a standard string, return it */\n    if ( sid > 390 )\n      return cff_index_get_string( font, sid - 391 );\n\n    /* CID-keyed CFF fonts don't have glyph names */\n    if ( !font->psnames )\n      return NULL;\n\n    /* this is a standard string */\n    return (FT_String *)font->psnames->adobe_std_strings( sid );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***   FD Select table support                                         ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  static void\n  CFF_Done_FD_Select( CFF_FDSelect  fdselect,\n                      FT_Stream     stream )\n  {\n    if ( fdselect->data )\n      FT_FRAME_RELEASE( fdselect->data );\n\n    fdselect->data_size   = 0;\n    fdselect->format      = 0;\n    fdselect->range_count = 0;\n  }\n\n\n  static FT_Error\n  CFF_Load_FD_Select( CFF_FDSelect  fdselect,\n                      FT_UInt       num_glyphs,\n                      FT_Stream     stream,\n                      FT_ULong      offset )\n  {\n    FT_Error  error;\n    FT_Byte   format;\n    FT_UInt   num_ranges;\n\n\n    /* read format */\n    if ( FT_STREAM_SEEK( offset ) || FT_READ_BYTE( format ) )\n      goto Exit;\n\n    fdselect->format      = format;\n    fdselect->cache_count = 0;   /* clear cache */\n\n    switch ( format )\n    {\n    case 0:     /* format 0, that's simple */\n      fdselect->data_size = num_glyphs;\n      goto Load_Data;\n\n    case 3:     /* format 3, a tad more complex */\n      if ( FT_READ_USHORT( num_ranges ) )\n        goto Exit;\n\n      if ( !num_ranges )\n      {\n        FT_TRACE0(( \"CFF_Load_FD_Select: empty FDSelect array\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      fdselect->data_size = num_ranges * 3 + 2;\n\n    Load_Data:\n      if ( FT_FRAME_EXTRACT( fdselect->data_size, fdselect->data ) )\n        goto Exit;\n      break;\n\n    default:    /* hmm... that's wrong */\n      error = FT_THROW( Invalid_File_Format );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Byte )\n  cff_fd_select_get( CFF_FDSelect  fdselect,\n                     FT_UInt       glyph_index )\n  {\n    FT_Byte  fd = 0;\n\n\n    switch ( fdselect->format )\n    {\n    case 0:\n      fd = fdselect->data[glyph_index];\n      break;\n\n    case 3:\n      /* first, compare to the cache */\n      if ( (FT_UInt)( glyph_index - fdselect->cache_first ) <\n                        fdselect->cache_count )\n      {\n        fd = fdselect->cache_fd;\n        break;\n      }\n\n      /* then, look up the ranges array */\n      {\n        FT_Byte*  p       = fdselect->data;\n        FT_Byte*  p_limit = p + fdselect->data_size;\n        FT_Byte   fd2;\n        FT_UInt   first, limit;\n\n\n        first = FT_NEXT_USHORT( p );\n        do\n        {\n          if ( glyph_index < first )\n            break;\n\n          fd2   = *p++;\n          limit = FT_NEXT_USHORT( p );\n\n          if ( glyph_index < limit )\n          {\n            fd = fd2;\n\n            /* update cache */\n            fdselect->cache_first = first;\n            fdselect->cache_count = limit - first;\n            fdselect->cache_fd    = fd2;\n            break;\n          }\n          first = limit;\n\n        } while ( p < p_limit );\n      }\n      break;\n\n    default:\n      ;\n    }\n\n    return fd;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /***                                                                   ***/\n  /***   CFF font support                                                ***/\n  /***                                                                   ***/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static FT_Error\n  cff_charset_compute_cids( CFF_Charset  charset,\n                            FT_UInt      num_glyphs,\n                            FT_Memory    memory )\n  {\n    FT_Error   error   = FT_Err_Ok;\n    FT_UInt    i;\n    FT_Long    j;\n    FT_UShort  max_cid = 0;\n\n\n    if ( charset->max_cid > 0 )\n      goto Exit;\n\n    for ( i = 0; i < num_glyphs; i++ )\n    {\n      if ( charset->sids[i] > max_cid )\n        max_cid = charset->sids[i];\n    }\n\n    if ( FT_NEW_ARRAY( charset->cids, (FT_ULong)max_cid + 1 ) )\n      goto Exit;\n\n    /* When multiple GIDs map to the same CID, we choose the lowest */\n    /* GID.  This is not described in any spec, but it matches the  */\n    /* behaviour of recent Acroread versions.                       */\n    for ( j = num_glyphs - 1; j >= 0 ; j-- )\n      charset->cids[charset->sids[j]] = (FT_UShort)j;\n\n    charset->max_cid    = max_cid;\n    charset->num_glyphs = num_glyphs;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  cff_charset_cid_to_gindex( CFF_Charset  charset,\n                             FT_UInt      cid )\n  {\n    FT_UInt  result = 0;\n\n\n    if ( cid <= charset->max_cid )\n      result = charset->cids[cid];\n\n    return result;\n  }\n\n\n  static void\n  cff_charset_free_cids( CFF_Charset  charset,\n                         FT_Memory    memory )\n  {\n    FT_FREE( charset->cids );\n    charset->max_cid = 0;\n  }\n\n\n  static void\n  cff_charset_done( CFF_Charset  charset,\n                    FT_Stream    stream )\n  {\n    FT_Memory  memory = stream->memory;\n\n\n    cff_charset_free_cids( charset, memory );\n\n    FT_FREE( charset->sids );\n    charset->format = 0;\n    charset->offset = 0;\n  }\n\n\n  static FT_Error\n  cff_charset_load( CFF_Charset  charset,\n                    FT_UInt      num_glyphs,\n                    FT_Stream    stream,\n                    FT_ULong     base_offset,\n                    FT_ULong     offset,\n                    FT_Bool      invert )\n  {\n    FT_Memory  memory = stream->memory;\n    FT_Error   error  = FT_Err_Ok;\n    FT_UShort  glyph_sid;\n\n\n    /* If the the offset is greater than 2, we have to parse the */\n    /* charset table.                                            */\n    if ( offset > 2 )\n    {\n      FT_UInt  j;\n\n\n      charset->offset = base_offset + offset;\n\n      /* Get the format of the table. */\n      if ( FT_STREAM_SEEK( charset->offset ) ||\n           FT_READ_BYTE( charset->format )   )\n        goto Exit;\n\n      /* Allocate memory for sids. */\n      if ( FT_NEW_ARRAY( charset->sids, num_glyphs ) )\n        goto Exit;\n\n      /* assign the .notdef glyph */\n      charset->sids[0] = 0;\n\n      switch ( charset->format )\n      {\n      case 0:\n        if ( num_glyphs > 0 )\n        {\n          if ( FT_FRAME_ENTER( ( num_glyphs - 1 ) * 2 ) )\n            goto Exit;\n\n          for ( j = 1; j < num_glyphs; j++ )\n            charset->sids[j] = FT_GET_USHORT();\n\n          FT_FRAME_EXIT();\n        }\n        break;\n\n      case 1:\n      case 2:\n        {\n          FT_UInt  nleft;\n          FT_UInt  i;\n\n\n          j = 1;\n\n          while ( j < num_glyphs )\n          {\n            /* Read the first glyph sid of the range. */\n            if ( FT_READ_USHORT( glyph_sid ) )\n              goto Exit;\n\n            /* Read the number of glyphs in the range.  */\n            if ( charset->format == 2 )\n            {\n              if ( FT_READ_USHORT( nleft ) )\n                goto Exit;\n            }\n            else\n            {\n              if ( FT_READ_BYTE( nleft ) )\n                goto Exit;\n            }\n\n            /* try to rescue some of the SIDs if `nleft' is too large */\n            if ( glyph_sid > 0xFFFFL - nleft )\n            {\n              FT_ERROR(( \"cff_charset_load: invalid SID range trimmed\"\n                         \" nleft=%d -> %d\\n\", nleft, 0xFFFFL - glyph_sid ));\n              nleft = ( FT_UInt )( 0xFFFFL - glyph_sid );\n            }\n\n            /* Fill in the range of sids -- `nleft + 1' glyphs. */\n            for ( i = 0; j < num_glyphs && i <= nleft; i++, j++, glyph_sid++ )\n              charset->sids[j] = glyph_sid;\n          }\n        }\n        break;\n\n      default:\n        FT_ERROR(( \"cff_charset_load: invalid table format\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n    }\n    else\n    {\n      /* Parse default tables corresponding to offset == 0, 1, or 2.  */\n      /* CFF specification intimates the following:                   */\n      /*                                                              */\n      /* In order to use a predefined charset, the following must be  */\n      /* true: The charset constructed for the glyphs in the font's   */\n      /* charstrings dictionary must match the predefined charset in  */\n      /* the first num_glyphs.                                        */\n\n      charset->offset = offset;  /* record charset type */\n\n      switch ( (FT_UInt)offset )\n      {\n      case 0:\n        if ( num_glyphs > 229 )\n        {\n          FT_ERROR(( \"cff_charset_load: implicit charset larger than\\n\"\n                     \"predefined charset (Adobe ISO-Latin)\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        /* Allocate memory for sids. */\n        if ( FT_NEW_ARRAY( charset->sids, num_glyphs ) )\n          goto Exit;\n\n        /* Copy the predefined charset into the allocated memory. */\n        FT_ARRAY_COPY( charset->sids, cff_isoadobe_charset, num_glyphs );\n\n        break;\n\n      case 1:\n        if ( num_glyphs > 166 )\n        {\n          FT_ERROR(( \"cff_charset_load: implicit charset larger than\\n\"\n                     \"predefined charset (Adobe Expert)\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        /* Allocate memory for sids. */\n        if ( FT_NEW_ARRAY( charset->sids, num_glyphs ) )\n          goto Exit;\n\n        /* Copy the predefined charset into the allocated memory.     */\n        FT_ARRAY_COPY( charset->sids, cff_expert_charset, num_glyphs );\n\n        break;\n\n      case 2:\n        if ( num_glyphs > 87 )\n        {\n          FT_ERROR(( \"cff_charset_load: implicit charset larger than\\n\"\n                     \"predefined charset (Adobe Expert Subset)\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        /* Allocate memory for sids. */\n        if ( FT_NEW_ARRAY( charset->sids, num_glyphs ) )\n          goto Exit;\n\n        /* Copy the predefined charset into the allocated memory.     */\n        FT_ARRAY_COPY( charset->sids, cff_expertsubset_charset, num_glyphs );\n\n        break;\n\n      default:\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n    }\n\n    /* we have to invert the `sids' array for subsetted CID-keyed fonts */\n    if ( invert )\n      error = cff_charset_compute_cids( charset, num_glyphs, memory );\n\n  Exit:\n    /* Clean up if there was an error. */\n    if ( error )\n    {\n      FT_FREE( charset->sids );\n      FT_FREE( charset->cids );\n      charset->format = 0;\n      charset->offset = 0;\n      charset->sids   = 0;\n    }\n\n    return error;\n  }\n\n\n  static void\n  cff_encoding_done( CFF_Encoding  encoding )\n  {\n    encoding->format = 0;\n    encoding->offset = 0;\n    encoding->count  = 0;\n  }\n\n\n  static FT_Error\n  cff_encoding_load( CFF_Encoding  encoding,\n                     CFF_Charset   charset,\n                     FT_UInt       num_glyphs,\n                     FT_Stream     stream,\n                     FT_ULong      base_offset,\n                     FT_ULong      offset )\n  {\n    FT_Error   error = FT_Err_Ok;\n    FT_UInt    count;\n    FT_UInt    j;\n    FT_UShort  glyph_sid;\n    FT_UInt    glyph_code;\n\n\n    /* Check for charset->sids.  If we do not have this, we fail. */\n    if ( !charset->sids )\n    {\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    /* Zero out the code to gid/sid mappings. */\n    for ( j = 0; j < 256; j++ )\n    {\n      encoding->sids [j] = 0;\n      encoding->codes[j] = 0;\n    }\n\n    /* Note: The encoding table in a CFF font is indexed by glyph index;  */\n    /* the first encoded glyph index is 1.  Hence, we read the character  */\n    /* code (`glyph_code') at index j and make the assignment:            */\n    /*                                                                    */\n    /*    encoding->codes[glyph_code] = j + 1                             */\n    /*                                                                    */\n    /* We also make the assignment:                                       */\n    /*                                                                    */\n    /*    encoding->sids[glyph_code] = charset->sids[j + 1]               */\n    /*                                                                    */\n    /* This gives us both a code to GID and a code to SID mapping.        */\n\n    if ( offset > 1 )\n    {\n      encoding->offset = base_offset + offset;\n\n      /* we need to parse the table to determine its size */\n      if ( FT_STREAM_SEEK( encoding->offset ) ||\n           FT_READ_BYTE( encoding->format )   ||\n           FT_READ_BYTE( count )              )\n        goto Exit;\n\n      switch ( encoding->format & 0x7F )\n      {\n      case 0:\n        {\n          FT_Byte*  p;\n\n\n          /* By convention, GID 0 is always \".notdef\" and is never */\n          /* coded in the font.  Hence, the number of codes found  */\n          /* in the table is `count+1'.                            */\n          /*                                                       */\n          encoding->count = count + 1;\n\n          if ( FT_FRAME_ENTER( count ) )\n            goto Exit;\n\n          p = (FT_Byte*)stream->cursor;\n\n          for ( j = 1; j <= count; j++ )\n          {\n            glyph_code = *p++;\n\n            /* Make sure j is not too big. */\n            if ( j < num_glyphs )\n            {\n              /* Assign code to GID mapping. */\n              encoding->codes[glyph_code] = (FT_UShort)j;\n\n              /* Assign code to SID mapping. */\n              encoding->sids[glyph_code] = charset->sids[j];\n            }\n          }\n\n          FT_FRAME_EXIT();\n        }\n        break;\n\n      case 1:\n        {\n          FT_UInt  nleft;\n          FT_UInt  i = 1;\n          FT_UInt  k;\n\n\n          encoding->count = 0;\n\n          /* Parse the Format1 ranges. */\n          for ( j = 0;  j < count; j++, i += nleft )\n          {\n            /* Read the first glyph code of the range. */\n            if ( FT_READ_BYTE( glyph_code ) )\n              goto Exit;\n\n            /* Read the number of codes in the range. */\n            if ( FT_READ_BYTE( nleft ) )\n              goto Exit;\n\n            /* Increment nleft, so we read `nleft + 1' codes/sids. */\n            nleft++;\n\n            /* compute max number of character codes */\n            if ( (FT_UInt)nleft > encoding->count )\n              encoding->count = nleft;\n\n            /* Fill in the range of codes/sids. */\n            for ( k = i; k < nleft + i; k++, glyph_code++ )\n            {\n              /* Make sure k is not too big. */\n              if ( k < num_glyphs && glyph_code < 256 )\n              {\n                /* Assign code to GID mapping. */\n                encoding->codes[glyph_code] = (FT_UShort)k;\n\n                /* Assign code to SID mapping. */\n                encoding->sids[glyph_code] = charset->sids[k];\n              }\n            }\n          }\n\n          /* simple check; one never knows what can be found in a font */\n          if ( encoding->count > 256 )\n            encoding->count = 256;\n        }\n        break;\n\n      default:\n        FT_ERROR(( \"cff_encoding_load: invalid table format\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      /* Parse supplemental encodings, if any. */\n      if ( encoding->format & 0x80 )\n      {\n        FT_UInt  gindex;\n\n\n        /* count supplements */\n        if ( FT_READ_BYTE( count ) )\n          goto Exit;\n\n        for ( j = 0; j < count; j++ )\n        {\n          /* Read supplemental glyph code. */\n          if ( FT_READ_BYTE( glyph_code ) )\n            goto Exit;\n\n          /* Read the SID associated with this glyph code. */\n          if ( FT_READ_USHORT( glyph_sid ) )\n            goto Exit;\n\n          /* Assign code to SID mapping. */\n          encoding->sids[glyph_code] = glyph_sid;\n\n          /* First, look up GID which has been assigned to */\n          /* SID glyph_sid.                                */\n          for ( gindex = 0; gindex < num_glyphs; gindex++ )\n          {\n            if ( charset->sids[gindex] == glyph_sid )\n            {\n              encoding->codes[glyph_code] = (FT_UShort)gindex;\n              break;\n            }\n          }\n        }\n      }\n    }\n    else\n    {\n      /* We take into account the fact a CFF font can use a predefined */\n      /* encoding without containing all of the glyphs encoded by this */\n      /* encoding (see the note at the end of section 12 in the CFF    */\n      /* specification).                                               */\n\n      switch ( (FT_UInt)offset )\n      {\n      case 0:\n        /* First, copy the code to SID mapping. */\n        FT_ARRAY_COPY( encoding->sids, cff_standard_encoding, 256 );\n        goto Populate;\n\n      case 1:\n        /* First, copy the code to SID mapping. */\n        FT_ARRAY_COPY( encoding->sids, cff_expert_encoding, 256 );\n\n      Populate:\n        /* Construct code to GID mapping from code to SID mapping */\n        /* and charset.                                           */\n\n        encoding->count = 0;\n\n        error = cff_charset_compute_cids( charset, num_glyphs,\n                                          stream->memory );\n        if ( error )\n          goto Exit;\n\n        for ( j = 0; j < 256; j++ )\n        {\n          FT_UInt  sid = encoding->sids[j];\n          FT_UInt  gid = 0;\n\n\n          if ( sid )\n            gid = cff_charset_cid_to_gindex( charset, sid );\n\n          if ( gid != 0 )\n          {\n            encoding->codes[j] = (FT_UShort)gid;\n            encoding->count    = j + 1;\n          }\n          else\n          {\n            encoding->codes[j] = 0;\n            encoding->sids [j] = 0;\n          }\n        }\n        break;\n\n      default:\n        FT_ERROR(( \"cff_encoding_load: invalid table format\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n    }\n\n  Exit:\n\n    /* Clean up if there was an error. */\n    return error;\n  }\n\n\n  static FT_Error\n  cff_subfont_load( CFF_SubFont  font,\n                    CFF_Index    idx,\n                    FT_UInt      font_index,\n                    FT_Stream    stream,\n                    FT_ULong     base_offset,\n                    FT_Library   library )\n  {\n    FT_Error         error;\n    CFF_ParserRec    parser;\n    FT_Byte*         dict = NULL;\n    FT_ULong         dict_len;\n    CFF_FontRecDict  top  = &font->font_dict;\n    CFF_Private      priv = &font->private_dict;\n\n\n    cff_parser_init( &parser, CFF_CODE_TOPDICT, &font->font_dict, library );\n\n    /* set defaults */\n    FT_MEM_ZERO( top, sizeof ( *top ) );\n\n    top->underline_position  = -( 100L << 16 );\n    top->underline_thickness = 50L << 16;\n    top->charstring_type     = 2;\n    top->font_matrix.xx      = 0x10000L;\n    top->font_matrix.yy      = 0x10000L;\n    top->cid_count           = 8720;\n\n    /* we use the implementation specific SID value 0xFFFF to indicate */\n    /* missing entries                                                 */\n    top->version             = 0xFFFFU;\n    top->notice              = 0xFFFFU;\n    top->copyright           = 0xFFFFU;\n    top->full_name           = 0xFFFFU;\n    top->family_name         = 0xFFFFU;\n    top->weight              = 0xFFFFU;\n    top->embedded_postscript = 0xFFFFU;\n\n    top->cid_registry        = 0xFFFFU;\n    top->cid_ordering        = 0xFFFFU;\n    top->cid_font_name       = 0xFFFFU;\n\n    error = cff_index_access_element( idx, font_index, &dict, &dict_len );\n    if ( !error )\n    {\n      FT_TRACE4(( \" top dictionary:\\n\" ));\n      error = cff_parser_run( &parser, dict, dict + dict_len );\n    }\n\n    cff_index_forget_element( idx, &dict );\n\n    if ( error )\n      goto Exit;\n\n    /* if it is a CID font, we stop there */\n    if ( top->cid_registry != 0xFFFFU )\n      goto Exit;\n\n    /* parse the private dictionary, if any */\n    if ( top->private_offset && top->private_size )\n    {\n      /* set defaults */\n      FT_MEM_ZERO( priv, sizeof ( *priv ) );\n\n      priv->blue_shift       = 7;\n      priv->blue_fuzz        = 1;\n      priv->lenIV            = -1;\n      priv->expansion_factor = (FT_Fixed)( 0.06 * 0x10000L );\n      priv->blue_scale       = (FT_Fixed)( 0.039625 * 0x10000L * 1000 );\n\n      cff_parser_init( &parser, CFF_CODE_PRIVATE, priv, library );\n\n      if ( FT_STREAM_SEEK( base_offset + font->font_dict.private_offset ) ||\n           FT_FRAME_ENTER( font->font_dict.private_size )                 )\n        goto Exit;\n\n      FT_TRACE4(( \" private dictionary:\\n\" ));\n      error = cff_parser_run( &parser,\n                              (FT_Byte*)stream->cursor,\n                              (FT_Byte*)stream->limit );\n      FT_FRAME_EXIT();\n      if ( error )\n        goto Exit;\n\n      /* ensure that `num_blue_values' is even */\n      priv->num_blue_values &= ~1;\n    }\n\n    /* read the local subrs, if any */\n    if ( priv->local_subrs_offset )\n    {\n      if ( FT_STREAM_SEEK( base_offset + top->private_offset +\n                           priv->local_subrs_offset ) )\n        goto Exit;\n\n      error = cff_index_init( &font->local_subrs_index, stream, 1 );\n      if ( error )\n        goto Exit;\n\n      error = cff_index_get_pointers( &font->local_subrs_index,\n                                      &font->local_subrs, NULL );\n      if ( error )\n        goto Exit;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  cff_subfont_done( FT_Memory    memory,\n                    CFF_SubFont  subfont )\n  {\n    if ( subfont )\n    {\n      cff_index_done( &subfont->local_subrs_index );\n      FT_FREE( subfont->local_subrs );\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_font_load( FT_Library library,\n                 FT_Stream  stream,\n                 FT_Int     face_index,\n                 CFF_Font   font,\n                 FT_Bool    pure_cff )\n  {\n    static const FT_Frame_Field  cff_header_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  CFF_FontRec\n\n      FT_FRAME_START( 4 ),\n        FT_FRAME_BYTE( version_major ),\n        FT_FRAME_BYTE( version_minor ),\n        FT_FRAME_BYTE( header_size ),\n        FT_FRAME_BYTE( absolute_offsize ),\n      FT_FRAME_END\n    };\n\n    FT_Error         error;\n    FT_Memory        memory = stream->memory;\n    FT_ULong         base_offset;\n    CFF_FontRecDict  dict;\n    CFF_IndexRec     string_index;\n    FT_Int           subfont_index;\n\n\n    FT_ZERO( font );\n    FT_ZERO( &string_index );\n\n    font->stream = stream;\n    font->memory = memory;\n    dict         = &font->top_font.font_dict;\n    base_offset  = FT_STREAM_POS();\n\n    /* read CFF font header */\n    if ( FT_STREAM_READ_FIELDS( cff_header_fields, font ) )\n      goto Exit;\n\n    /* check format */\n    if ( font->version_major   != 1 ||\n         font->header_size      < 4 ||\n         font->absolute_offsize > 4 )\n    {\n      FT_TRACE2(( \"  not a CFF font header\\n\" ));\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n\n    /* skip the rest of the header */\n    if ( FT_STREAM_SKIP( font->header_size - 4 ) )\n      goto Exit;\n\n    /* read the name, top dict, string and global subrs index */\n    if ( FT_SET_ERROR( cff_index_init( &font->name_index,\n                                       stream, 0 ) )                  ||\n         FT_SET_ERROR( cff_index_init( &font->font_dict_index,\n                                       stream, 0 ) )                  ||\n         FT_SET_ERROR( cff_index_init( &string_index,\n                                       stream, 1 ) )                  ||\n         FT_SET_ERROR( cff_index_init( &font->global_subrs_index,\n                                       stream, 1 ) )                  ||\n         FT_SET_ERROR( cff_index_get_pointers( &string_index,\n                                               &font->strings,\n                                               &font->string_pool ) ) )\n      goto Exit;\n\n    font->num_strings = string_index.count;\n\n    if ( pure_cff )\n    {\n      /* well, we don't really forget the `disabled' fonts... */\n      subfont_index = face_index;\n\n      if ( subfont_index >= (FT_Int)font->name_index.count )\n      {\n        FT_ERROR(( \"cff_font_load:\"\n                   \" invalid subfont index for pure CFF font (%d)\\n\",\n                   subfont_index ));\n        error = FT_THROW( Invalid_Argument );\n        goto Exit;\n      }\n\n      font->num_faces = font->name_index.count;\n    }\n    else\n    {\n      subfont_index = 0;\n\n      if ( font->name_index.count > 1 )\n      {\n        FT_ERROR(( \"cff_font_load:\"\n                   \" invalid CFF font with multiple subfonts\\n\"\n                   \"              \"\n                   \" in SFNT wrapper\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n    }\n\n    /* in case of a font format check, simply exit now */\n    if ( face_index < 0 )\n      goto Exit;\n\n    /* now, parse the top-level font dictionary */\n    FT_TRACE4(( \"parsing top-level\\n\" ));\n    error = cff_subfont_load( &font->top_font,\n                              &font->font_dict_index,\n                              subfont_index,\n                              stream,\n                              base_offset,\n                              library );\n    if ( error )\n      goto Exit;\n\n    if ( FT_STREAM_SEEK( base_offset + dict->charstrings_offset ) )\n      goto Exit;\n\n    error = cff_index_init( &font->charstrings_index, stream, 0 );\n    if ( error )\n      goto Exit;\n\n    /* now, check for a CID font */\n    if ( dict->cid_registry != 0xFFFFU )\n    {\n      CFF_IndexRec  fd_index;\n      CFF_SubFont   sub = NULL;\n      FT_UInt       idx;\n\n\n      /* this is a CID-keyed font, we must now allocate a table of */\n      /* sub-fonts, then load each of them separately              */\n      if ( FT_STREAM_SEEK( base_offset + dict->cid_fd_array_offset ) )\n        goto Exit;\n\n      error = cff_index_init( &fd_index, stream, 0 );\n      if ( error )\n        goto Exit;\n\n      if ( fd_index.count > CFF_MAX_CID_FONTS )\n      {\n        FT_TRACE0(( \"cff_font_load: FD array too large in CID font\\n\" ));\n        goto Fail_CID;\n      }\n\n      /* allocate & read each font dict independently */\n      font->num_subfonts = fd_index.count;\n      if ( FT_NEW_ARRAY( sub, fd_index.count ) )\n        goto Fail_CID;\n\n      /* set up pointer table */\n      for ( idx = 0; idx < fd_index.count; idx++ )\n        font->subfonts[idx] = sub + idx;\n\n      /* now load each subfont independently */\n      for ( idx = 0; idx < fd_index.count; idx++ )\n      {\n        sub = font->subfonts[idx];\n        FT_TRACE4(( \"parsing subfont %u\\n\", idx ));\n        error = cff_subfont_load( sub, &fd_index, idx,\n                                  stream, base_offset, library );\n        if ( error )\n          goto Fail_CID;\n      }\n\n      /* now load the FD Select array */\n      error = CFF_Load_FD_Select( &font->fd_select,\n                                  font->charstrings_index.count,\n                                  stream,\n                                  base_offset + dict->cid_fd_select_offset );\n\n    Fail_CID:\n      cff_index_done( &fd_index );\n\n      if ( error )\n        goto Exit;\n    }\n    else\n      font->num_subfonts = 0;\n\n    /* read the charstrings index now */\n    if ( dict->charstrings_offset == 0 )\n    {\n      FT_ERROR(( \"cff_font_load: no charstrings offset\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    font->num_glyphs = font->charstrings_index.count;\n\n    error = cff_index_get_pointers( &font->global_subrs_index,\n                                    &font->global_subrs, NULL );\n\n    if ( error )\n      goto Exit;\n\n    /* read the Charset and Encoding tables if available */\n    if ( font->num_glyphs > 0 )\n    {\n      FT_Bool  invert = FT_BOOL( dict->cid_registry != 0xFFFFU && pure_cff );\n\n\n      error = cff_charset_load( &font->charset, font->num_glyphs, stream,\n                                base_offset, dict->charset_offset, invert );\n      if ( error )\n        goto Exit;\n\n      /* CID-keyed CFFs don't have an encoding */\n      if ( dict->cid_registry == 0xFFFFU )\n      {\n        error = cff_encoding_load( &font->encoding,\n                                   &font->charset,\n                                   font->num_glyphs,\n                                   stream,\n                                   base_offset,\n                                   dict->encoding_offset );\n        if ( error )\n          goto Exit;\n      }\n    }\n\n    /* get the font name (/CIDFontName for CID-keyed fonts, */\n    /* /FontName otherwise)                                 */\n    font->font_name = cff_index_get_name( font, subfont_index );\n\n  Exit:\n    cff_index_done( &string_index );\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cff_font_done( CFF_Font  font )\n  {\n    FT_Memory  memory = font->memory;\n    FT_UInt    idx;\n\n\n    cff_index_done( &font->global_subrs_index );\n    cff_index_done( &font->font_dict_index );\n    cff_index_done( &font->name_index );\n    cff_index_done( &font->charstrings_index );\n\n    /* release font dictionaries, but only if working with */\n    /* a CID keyed CFF font                                */\n    if ( font->num_subfonts > 0 )\n    {\n      for ( idx = 0; idx < font->num_subfonts; idx++ )\n        cff_subfont_done( memory, font->subfonts[idx] );\n\n      /* the subfonts array has been allocated as a single block */\n      FT_FREE( font->subfonts[0] );\n    }\n\n    cff_encoding_done( &font->encoding );\n    cff_charset_done( &font->charset, font->stream );\n\n    cff_subfont_done( memory, &font->top_font );\n\n    CFF_Done_FD_Select( &font->fd_select, font->stream );\n\n    FT_FREE( font->font_info );\n\n    FT_FREE( font->font_name );\n    FT_FREE( font->global_subrs );\n    FT_FREE( font->strings );\n    FT_FREE( font->string_pool );\n\n    if ( font->cf2_instance.finalizer )\n    {\n      font->cf2_instance.finalizer( font->cf2_instance.data );\n      FT_FREE( font->cf2_instance.data );\n    }\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffload.h                                                              */\n/*                                                                         */\n/*    OpenType & CFF data/program tables loader (specification).           */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2007, 2008, 2010 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CFFLOAD_H__\n#define __CFFLOAD_H__\n\n\n#include <ft2build.h>\n#include \"cfftypes.h\"\n\n\nFT_BEGIN_HEADER\n\n  FT_LOCAL( FT_UShort )\n  cff_get_standard_encoding( FT_UInt  charcode );\n\n\n  FT_LOCAL( FT_String* )\n  cff_index_get_string( CFF_Font  font,\n                        FT_UInt   element );\n\n  FT_LOCAL( FT_String* )\n  cff_index_get_sid_string( CFF_Font  font,\n                            FT_UInt   sid );\n\n\n  FT_LOCAL( FT_Error )\n  cff_index_access_element( CFF_Index  idx,\n                            FT_UInt    element,\n                            FT_Byte**  pbytes,\n                            FT_ULong*  pbyte_len );\n\n  FT_LOCAL( void )\n  cff_index_forget_element( CFF_Index  idx,\n                            FT_Byte**  pbytes );\n\n  FT_LOCAL( FT_String* )\n  cff_index_get_name( CFF_Font  font,\n                      FT_UInt   element );\n\n\n  FT_LOCAL( FT_UInt )\n  cff_charset_cid_to_gindex( CFF_Charset  charset,\n                             FT_UInt      cid );\n\n\n  FT_LOCAL( FT_Error )\n  cff_font_load( FT_Library library,\n                 FT_Stream  stream,\n                 FT_Int     face_index,\n                 CFF_Font   font,\n                 FT_Bool    pure_cff );\n\n  FT_LOCAL( void )\n  cff_font_done( CFF_Font  font );\n\n\n  FT_LOCAL( FT_Byte )\n  cff_fd_select_get( CFF_FDSelect  fdselect,\n                     FT_UInt       glyph_index );\n\n\nFT_END_HEADER\n\n#endif /* __CFFLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffobjs.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffobjs.c                                                              */\n/*                                                                         */\n/*    OpenType objects manager (body).                                     */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_STREAM_H\n#include FT_ERRORS_H\n#include FT_TRUETYPE_IDS_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_INTERNAL_SFNT_H\n#include FT_CFF_DRIVER_H\n\n#include \"cffobjs.h\"\n#include \"cffload.h\"\n#include \"cffcmap.h\"\n#include \"cffpic.h\"\n\n#include \"cfferrs.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cffobjs\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                            SIZE FUNCTIONS                             */\n  /*                                                                       */\n  /*  Note that we store the global hints in the size's `internal' root    */\n  /*  field.                                                               */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  static PSH_Globals_Funcs\n  cff_size_get_globals_funcs( CFF_Size  size )\n  {\n    CFF_Face          face     = (CFF_Face)size->root.face;\n    CFF_Font          font     = (CFF_Font)face->extra.data;\n    PSHinter_Service  pshinter = font->pshinter;\n    FT_Module         module;\n\n\n    module = FT_Get_Module( size->root.face->driver->root.library,\n                            \"pshinter\" );\n    return ( module && pshinter && pshinter->get_globals_funcs )\n           ? pshinter->get_globals_funcs( module )\n           : 0;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cff_size_done( FT_Size  cffsize )        /* CFF_Size */\n  {\n    CFF_Size      size     = (CFF_Size)cffsize;\n    CFF_Face      face     = (CFF_Face)size->root.face;\n    CFF_Font      font     = (CFF_Font)face->extra.data;\n    CFF_Internal  internal = (CFF_Internal)cffsize->internal;\n\n\n    if ( internal )\n    {\n      PSH_Globals_Funcs  funcs;\n\n\n      funcs = cff_size_get_globals_funcs( size );\n      if ( funcs )\n      {\n        FT_UInt  i;\n\n\n        funcs->destroy( internal->topfont );\n\n        for ( i = font->num_subfonts; i > 0; i-- )\n          funcs->destroy( internal->subfonts[i - 1] );\n      }\n\n      /* `internal' is freed by destroy_size (in ftobjs.c) */\n    }\n  }\n\n\n  /* CFF and Type 1 private dictionaries have slightly different      */\n  /* structures; we need to synthesize a Type 1 dictionary on the fly */\n\n  static void\n  cff_make_private_dict( CFF_SubFont  subfont,\n                         PS_Private   priv )\n  {\n    CFF_Private  cpriv = &subfont->private_dict;\n    FT_UInt      n, count;\n\n\n    FT_MEM_ZERO( priv, sizeof ( *priv ) );\n\n    count = priv->num_blue_values = cpriv->num_blue_values;\n    for ( n = 0; n < count; n++ )\n      priv->blue_values[n] = (FT_Short)cpriv->blue_values[n];\n\n    count = priv->num_other_blues = cpriv->num_other_blues;\n    for ( n = 0; n < count; n++ )\n      priv->other_blues[n] = (FT_Short)cpriv->other_blues[n];\n\n    count = priv->num_family_blues = cpriv->num_family_blues;\n    for ( n = 0; n < count; n++ )\n      priv->family_blues[n] = (FT_Short)cpriv->family_blues[n];\n\n    count = priv->num_family_other_blues = cpriv->num_family_other_blues;\n    for ( n = 0; n < count; n++ )\n      priv->family_other_blues[n] = (FT_Short)cpriv->family_other_blues[n];\n\n    priv->blue_scale = cpriv->blue_scale;\n    priv->blue_shift = (FT_Int)cpriv->blue_shift;\n    priv->blue_fuzz  = (FT_Int)cpriv->blue_fuzz;\n\n    priv->standard_width[0]  = (FT_UShort)cpriv->standard_width;\n    priv->standard_height[0] = (FT_UShort)cpriv->standard_height;\n\n    count = priv->num_snap_widths = cpriv->num_snap_widths;\n    for ( n = 0; n < count; n++ )\n      priv->snap_widths[n] = (FT_Short)cpriv->snap_widths[n];\n\n    count = priv->num_snap_heights = cpriv->num_snap_heights;\n    for ( n = 0; n < count; n++ )\n      priv->snap_heights[n] = (FT_Short)cpriv->snap_heights[n];\n\n    priv->force_bold     = cpriv->force_bold;\n    priv->language_group = cpriv->language_group;\n    priv->lenIV          = cpriv->lenIV;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_size_init( FT_Size  cffsize )         /* CFF_Size */\n  {\n    CFF_Size           size  = (CFF_Size)cffsize;\n    FT_Error           error = FT_Err_Ok;\n    PSH_Globals_Funcs  funcs = cff_size_get_globals_funcs( size );\n\n\n    if ( funcs )\n    {\n      CFF_Face      face     = (CFF_Face)cffsize->face;\n      CFF_Font      font     = (CFF_Font)face->extra.data;\n      CFF_Internal  internal = NULL;\n\n      PS_PrivateRec  priv;\n      FT_Memory      memory = cffsize->face->memory;\n\n      FT_UInt  i;\n\n\n      if ( FT_NEW( internal ) )\n        goto Exit;\n\n      cff_make_private_dict( &font->top_font, &priv );\n      error = funcs->create( cffsize->face->memory, &priv,\n                             &internal->topfont );\n      if ( error )\n        goto Exit;\n\n      for ( i = font->num_subfonts; i > 0; i-- )\n      {\n        CFF_SubFont  sub = font->subfonts[i - 1];\n\n\n        cff_make_private_dict( sub, &priv );\n        error = funcs->create( cffsize->face->memory, &priv,\n                               &internal->subfonts[i - 1] );\n        if ( error )\n          goto Exit;\n      }\n\n      cffsize->internal = (FT_Size_Internal)(void*)internal;\n    }\n\n    size->strike_index = 0xFFFFFFFFUL;\n\n  Exit:\n    return error;\n  }\n\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_size_select( FT_Size   size,\n                   FT_ULong  strike_index )\n  {\n    CFF_Size           cffsize = (CFF_Size)size;\n    PSH_Globals_Funcs  funcs;\n\n\n    cffsize->strike_index = strike_index;\n\n    FT_Select_Metrics( size->face, strike_index );\n\n    funcs = cff_size_get_globals_funcs( cffsize );\n\n    if ( funcs )\n    {\n      CFF_Face      face     = (CFF_Face)size->face;\n      CFF_Font      font     = (CFF_Font)face->extra.data;\n      CFF_Internal  internal = (CFF_Internal)size->internal;\n\n      FT_ULong  top_upm  = font->top_font.font_dict.units_per_em;\n      FT_UInt   i;\n\n\n      funcs->set_scale( internal->topfont,\n                        size->metrics.x_scale, size->metrics.y_scale,\n                        0, 0 );\n\n      for ( i = font->num_subfonts; i > 0; i-- )\n      {\n        CFF_SubFont  sub     = font->subfonts[i - 1];\n        FT_ULong     sub_upm = sub->font_dict.units_per_em;\n        FT_Pos       x_scale, y_scale;\n\n\n        if ( top_upm != sub_upm )\n        {\n          x_scale = FT_MulDiv( size->metrics.x_scale, top_upm, sub_upm );\n          y_scale = FT_MulDiv( size->metrics.y_scale, top_upm, sub_upm );\n        }\n        else\n        {\n          x_scale = size->metrics.x_scale;\n          y_scale = size->metrics.y_scale;\n        }\n\n        funcs->set_scale( internal->subfonts[i - 1],\n                          x_scale, y_scale, 0, 0 );\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_size_request( FT_Size          size,\n                    FT_Size_Request  req )\n  {\n    CFF_Size           cffsize = (CFF_Size)size;\n    PSH_Globals_Funcs  funcs;\n\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n    if ( FT_HAS_FIXED_SIZES( size->face ) )\n    {\n      CFF_Face      cffface = (CFF_Face)size->face;\n      SFNT_Service  sfnt    = (SFNT_Service)cffface->sfnt;\n      FT_ULong      strike_index;\n\n\n      if ( sfnt->set_sbit_strike( cffface, req, &strike_index ) )\n        cffsize->strike_index = 0xFFFFFFFFUL;\n      else\n        return cff_size_select( size, strike_index );\n    }\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n    FT_Request_Metrics( size->face, req );\n\n    funcs = cff_size_get_globals_funcs( cffsize );\n\n    if ( funcs )\n    {\n      CFF_Face      cffface  = (CFF_Face)size->face;\n      CFF_Font      font     = (CFF_Font)cffface->extra.data;\n      CFF_Internal  internal = (CFF_Internal)size->internal;\n\n      FT_ULong  top_upm  = font->top_font.font_dict.units_per_em;\n      FT_UInt   i;\n\n\n      funcs->set_scale( internal->topfont,\n                        size->metrics.x_scale, size->metrics.y_scale,\n                        0, 0 );\n\n      for ( i = font->num_subfonts; i > 0; i-- )\n      {\n        CFF_SubFont  sub     = font->subfonts[i - 1];\n        FT_ULong     sub_upm = sub->font_dict.units_per_em;\n        FT_Pos       x_scale, y_scale;\n\n\n        if ( top_upm != sub_upm )\n        {\n          x_scale = FT_MulDiv( size->metrics.x_scale, top_upm, sub_upm );\n          y_scale = FT_MulDiv( size->metrics.y_scale, top_upm, sub_upm );\n        }\n        else\n        {\n          x_scale = size->metrics.x_scale;\n          y_scale = size->metrics.y_scale;\n        }\n\n        funcs->set_scale( internal->subfonts[i - 1],\n                          x_scale, y_scale, 0, 0 );\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                            SLOT  FUNCTIONS                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  cff_slot_done( FT_GlyphSlot  slot )\n  {\n    slot->internal->glyph_hints = 0;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_slot_init( FT_GlyphSlot  slot )\n  {\n    CFF_Face          face     = (CFF_Face)slot->face;\n    CFF_Font          font     = (CFF_Font)face->extra.data;\n    PSHinter_Service  pshinter = font->pshinter;\n\n\n    if ( pshinter )\n    {\n      FT_Module  module;\n\n\n      module = FT_Get_Module( slot->face->driver->root.library,\n                              \"pshinter\" );\n      if ( module )\n      {\n        T2_Hints_Funcs  funcs;\n\n\n        funcs = pshinter->get_t2_funcs( module );\n        slot->internal->glyph_hints = (void*)funcs;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                           FACE  FUNCTIONS                             */\n  /*                                                                       */\n  /*************************************************************************/\n\n  static FT_String*\n  cff_strcpy( FT_Memory         memory,\n              const FT_String*  source )\n  {\n    FT_Error    error;\n    FT_String*  result;\n\n\n    (void)FT_STRDUP( result, source );\n\n    FT_UNUSED( error );\n\n    return result;\n  }\n\n\n  /* Strip all subset prefixes of the form `ABCDEF+'.  Usually, there */\n  /* is only one, but font names like `APCOOG+JFABTD+FuturaBQ-Bold'   */\n  /* have been seen in the wild.                                      */\n\n  static void\n  remove_subset_prefix( FT_String*  name )\n  {\n    FT_Int32  idx             = 0;\n    FT_Int32  length          = (FT_Int32)strlen( name ) + 1;\n    FT_Bool   continue_search = 1;\n\n\n    while ( continue_search )\n    {\n      if ( length >= 7 && name[6] == '+' )\n      {\n        for ( idx = 0; idx < 6; idx++ )\n        {\n          /* ASCII uppercase letters */\n          if ( !( 'A' <= name[idx] && name[idx] <= 'Z' ) )\n            continue_search = 0;\n        }\n\n        if ( continue_search )\n        {\n          for ( idx = 7; idx < length; idx++ )\n            name[idx - 7] = name[idx];\n          length -= 7;\n        }\n      }\n      else\n        continue_search = 0;\n    }\n  }\n\n\n  /* Remove the style part from the family name (if present). */\n\n  static void\n  remove_style( FT_String*        family_name,\n                const FT_String*  style_name )\n  {\n    FT_Int32  family_name_length, style_name_length;\n\n\n    family_name_length = (FT_Int32)strlen( family_name );\n    style_name_length  = (FT_Int32)strlen( style_name );\n\n    if ( family_name_length > style_name_length )\n    {\n      FT_Int  idx;\n\n\n      for ( idx = 1; idx <= style_name_length; ++idx )\n      {\n        if ( family_name[family_name_length - idx] !=\n             style_name[style_name_length - idx] )\n          break;\n      }\n\n      if ( idx > style_name_length )\n      {\n        /* family_name ends with style_name; remove it */\n        idx = family_name_length - style_name_length - 1;\n\n        /* also remove special characters     */\n        /* between real family name and style */\n        while ( idx > 0                     &&\n                ( family_name[idx] == '-' ||\n                  family_name[idx] == ' ' ||\n                  family_name[idx] == '_' ||\n                  family_name[idx] == '+' ) )\n          --idx;\n\n        if ( idx > 0 )\n          family_name[idx + 1] = '\\0';\n      }\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_face_init( FT_Stream      stream,\n                 FT_Face        cffface,        /* CFF_Face */\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params )\n  {\n    CFF_Face            face        = (CFF_Face)cffface;\n    FT_Error            error;\n    SFNT_Service        sfnt;\n    FT_Service_PsCMaps  psnames;\n    PSHinter_Service    pshinter;\n    FT_Bool             pure_cff    = 1;\n    FT_Bool             sfnt_format = 0;\n    FT_Library          library     = cffface->driver->root.library;\n\n\n    sfnt = (SFNT_Service)FT_Get_Module_Interface(\n             library, \"sfnt\" );\n    if ( !sfnt )\n    {\n      FT_ERROR(( \"cff_face_init: cannot access `sfnt' module\\n\" ));\n      error = FT_THROW( Missing_Module );\n      goto Exit;\n    }\n\n    FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );\n\n    pshinter = (PSHinter_Service)FT_Get_Module_Interface(\n                 library, \"pshinter\" );\n\n    FT_TRACE2(( \"CFF driver\\n\" ));\n\n    /* create input stream from resource */\n    if ( FT_STREAM_SEEK( 0 ) )\n      goto Exit;\n\n    /* check whether we have a valid OpenType file */\n    error = sfnt->init_face( stream, face, face_index, num_params, params );\n    if ( !error )\n    {\n      if ( face->format_tag != TTAG_OTTO )  /* `OTTO'; OpenType/CFF font */\n      {\n        FT_TRACE2(( \"  not an OpenType/CFF font\\n\" ));\n        error = FT_THROW( Unknown_File_Format );\n        goto Exit;\n      }\n\n      /* if we are performing a simple font format check, exit immediately */\n      if ( face_index < 0 )\n        return FT_Err_Ok;\n\n      sfnt_format = 1;\n\n      /* now, the font can be either an OpenType/CFF font, or an SVG CEF */\n      /* font; in the latter case it doesn't have a `head' table         */\n      error = face->goto_table( face, TTAG_head, stream, 0 );\n      if ( !error )\n      {\n        pure_cff = 0;\n\n        /* load font directory */\n        error = sfnt->load_face( stream, face, face_index,\n                                 num_params, params );\n        if ( error )\n          goto Exit;\n      }\n      else\n      {\n        /* load the `cmap' table explicitly */\n        error = sfnt->load_cmap( face, stream );\n        if ( error )\n          goto Exit;\n      }\n\n      /* now load the CFF part of the file */\n      error = face->goto_table( face, TTAG_CFF, stream, 0 );\n      if ( error )\n        goto Exit;\n    }\n    else\n    {\n      /* rewind to start of file; we are going to load a pure-CFF font */\n      if ( FT_STREAM_SEEK( 0 ) )\n        goto Exit;\n      error = FT_Err_Ok;\n    }\n\n    /* now load and parse the CFF table in the file */\n    {\n      CFF_Font         cff = NULL;\n      CFF_FontRecDict  dict;\n      FT_Memory        memory = cffface->memory;\n      FT_Int32         flags;\n      FT_UInt          i;\n\n\n      if ( FT_NEW( cff ) )\n        goto Exit;\n\n      face->extra.data = cff;\n      error = cff_font_load( library, stream, face_index, cff, pure_cff );\n      if ( error )\n        goto Exit;\n\n      cff->pshinter = pshinter;\n      cff->psnames  = psnames;\n\n      cffface->face_index = face_index;\n\n      /* Complement the root flags with some interesting information. */\n      /* Note that this is only necessary for pure CFF and CEF fonts; */\n      /* SFNT based fonts use the `name' table instead.               */\n\n      cffface->num_glyphs = cff->num_glyphs;\n\n      dict = &cff->top_font.font_dict;\n\n      /* we need the `PSNames' module for CFF and CEF formats */\n      /* which aren't CID-keyed                               */\n      if ( dict->cid_registry == 0xFFFFU && !psnames )\n      {\n        FT_ERROR(( \"cff_face_init:\"\n                   \" cannot open CFF & CEF fonts\\n\"\n                   \"              \"\n                   \" without the `PSNames' module\\n\" ));\n        error = FT_THROW( Missing_Module );\n        goto Exit;\n      }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n      {\n        FT_UInt     idx;\n        FT_String*  s;\n\n\n        FT_TRACE4(( \"SIDs\\n\" ));\n\n        /* dump string index, including default strings for convenience */\n        for ( idx = 0; idx < cff->num_strings + 390; idx++ )\n        {\n          s = cff_index_get_sid_string( cff, idx );\n          if ( s )\n            FT_TRACE4((\"  %5d %s\\n\", idx, s ));\n        }\n      }\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n      if ( !dict->has_font_matrix )\n        dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;\n\n      /* Normalize the font matrix so that `matrix->xx' is 1; the */\n      /* scaling is done with `units_per_em' then (at this point, */\n      /* it already contains the scaling factor, but without      */\n      /* normalization of the matrix).                            */\n      /*                                                          */\n      /* Note that the offsets must be expressed in integer font  */\n      /* units.                                                   */\n\n      {\n        FT_Matrix*  matrix = &dict->font_matrix;\n        FT_Vector*  offset = &dict->font_offset;\n        FT_ULong*   upm    = &dict->units_per_em;\n        FT_Fixed    temp   = FT_ABS( matrix->yy );\n\n\n        if ( temp != 0x10000L )\n        {\n          *upm = FT_DivFix( *upm, temp );\n\n          matrix->xx = FT_DivFix( matrix->xx, temp );\n          matrix->yx = FT_DivFix( matrix->yx, temp );\n          matrix->xy = FT_DivFix( matrix->xy, temp );\n          matrix->yy = FT_DivFix( matrix->yy, temp );\n          offset->x  = FT_DivFix( offset->x,  temp );\n          offset->y  = FT_DivFix( offset->y,  temp );\n        }\n\n        offset->x >>= 16;\n        offset->y >>= 16;\n      }\n\n      for ( i = cff->num_subfonts; i > 0; i-- )\n      {\n        CFF_FontRecDict  sub = &cff->subfonts[i - 1]->font_dict;\n        CFF_FontRecDict  top = &cff->top_font.font_dict;\n\n        FT_Matrix*  matrix;\n        FT_Vector*  offset;\n        FT_ULong*   upm;\n        FT_Fixed    temp;\n\n\n        if ( sub->has_font_matrix )\n        {\n          FT_Long  scaling;\n\n\n          /* if we have a top-level matrix, */\n          /* concatenate the subfont matrix */\n\n          if ( top->has_font_matrix )\n          {\n            if ( top->units_per_em > 1 && sub->units_per_em > 1 )\n              scaling = FT_MIN( top->units_per_em, sub->units_per_em );\n            else\n              scaling = 1;\n\n            FT_Matrix_Multiply_Scaled( &top->font_matrix,\n                                       &sub->font_matrix,\n                                       scaling );\n            FT_Vector_Transform_Scaled( &sub->font_offset,\n                                        &top->font_matrix,\n                                        scaling );\n\n            sub->units_per_em = FT_MulDiv( sub->units_per_em,\n                                           top->units_per_em,\n                                           scaling );\n          }\n        }\n        else\n        {\n          sub->font_matrix = top->font_matrix;\n          sub->font_offset = top->font_offset;\n\n          sub->units_per_em = top->units_per_em;\n        }\n\n        matrix = &sub->font_matrix;\n        offset = &sub->font_offset;\n        upm    = &sub->units_per_em;\n        temp   = FT_ABS( matrix->yy );\n\n        if ( temp != 0x10000L )\n        {\n          *upm = FT_DivFix( *upm, temp );\n\n          matrix->xx = FT_DivFix( matrix->xx, temp );\n          matrix->yx = FT_DivFix( matrix->yx, temp );\n          matrix->xy = FT_DivFix( matrix->xy, temp );\n          matrix->yy = FT_DivFix( matrix->yy, temp );\n          offset->x  = FT_DivFix( offset->x,  temp );\n          offset->y  = FT_DivFix( offset->y,  temp );\n        }\n\n        offset->x >>= 16;\n        offset->y >>= 16;\n      }\n\n      if ( pure_cff )\n      {\n        char*  style_name = NULL;\n\n\n        /* set up num_faces */\n        cffface->num_faces = cff->num_faces;\n\n        /* compute number of glyphs */\n        if ( dict->cid_registry != 0xFFFFU )\n          cffface->num_glyphs = cff->charset.max_cid + 1;\n        else\n          cffface->num_glyphs = cff->charstrings_index.count;\n\n        /* set global bbox, as well as EM size */\n        cffface->bbox.xMin =   dict->font_bbox.xMin            >> 16;\n        cffface->bbox.yMin =   dict->font_bbox.yMin            >> 16;\n        /* no `U' suffix here to 0xFFFF! */\n        cffface->bbox.xMax = ( dict->font_bbox.xMax + 0xFFFF ) >> 16;\n        cffface->bbox.yMax = ( dict->font_bbox.yMax + 0xFFFF ) >> 16;\n\n        cffface->units_per_EM = (FT_UShort)( dict->units_per_em );\n\n        cffface->ascender  = (FT_Short)( cffface->bbox.yMax );\n        cffface->descender = (FT_Short)( cffface->bbox.yMin );\n\n        cffface->height = (FT_Short)( ( cffface->units_per_EM * 12 ) / 10 );\n        if ( cffface->height < cffface->ascender - cffface->descender )\n          cffface->height = (FT_Short)( cffface->ascender - cffface->descender );\n\n        cffface->underline_position  =\n          (FT_Short)( dict->underline_position >> 16 );\n        cffface->underline_thickness =\n          (FT_Short)( dict->underline_thickness >> 16 );\n\n        /* retrieve font family & style name */\n        cffface->family_name = cff_index_get_name( cff, face_index );\n        if ( cffface->family_name )\n        {\n          char*  full   = cff_index_get_sid_string( cff,\n                                                    dict->full_name );\n          char*  fullp  = full;\n          char*  family = cffface->family_name;\n          char*  family_name = NULL;\n\n\n          remove_subset_prefix( cffface->family_name );\n\n          if ( dict->family_name )\n          {\n            family_name = cff_index_get_sid_string( cff,\n                                                    dict->family_name );\n            if ( family_name )\n              family = family_name;\n          }\n\n          /* We try to extract the style name from the full name.   */\n          /* We need to ignore spaces and dashes during the search. */\n          if ( full && family )\n          {\n            while ( *fullp )\n            {\n              /* skip common characters at the start of both strings */\n              if ( *fullp == *family )\n              {\n                family++;\n                fullp++;\n                continue;\n              }\n\n              /* ignore spaces and dashes in full name during comparison */\n              if ( *fullp == ' ' || *fullp == '-' )\n              {\n                fullp++;\n                continue;\n              }\n\n              /* ignore spaces and dashes in family name during comparison */\n              if ( *family == ' ' || *family == '-' )\n              {\n                family++;\n                continue;\n              }\n\n              if ( !*family && *fullp )\n              {\n                /* The full name begins with the same characters as the  */\n                /* family name, with spaces and dashes removed.  In this */\n                /* case, the remaining string in `fullp' will be used as */\n                /* the style name.                                       */\n                style_name = cff_strcpy( memory, fullp );\n\n                /* remove the style part from the family name (if present) */\n                remove_style( cffface->family_name, style_name );\n              }\n              break;\n            }\n          }\n        }\n        else\n        {\n          char  *cid_font_name =\n                   cff_index_get_sid_string( cff,\n                                             dict->cid_font_name );\n\n\n          /* do we have a `/FontName' for a CID-keyed font? */\n          if ( cid_font_name )\n            cffface->family_name = cff_strcpy( memory, cid_font_name );\n        }\n\n        if ( style_name )\n          cffface->style_name = style_name;\n        else\n          /* assume \"Regular\" style if we don't know better */\n          cffface->style_name = cff_strcpy( memory, (char *)\"Regular\" );\n\n        /*******************************************************************/\n        /*                                                                 */\n        /* Compute face flags.                                             */\n        /*                                                                 */\n        flags = FT_FACE_FLAG_SCALABLE   | /* scalable outlines */\n                FT_FACE_FLAG_HORIZONTAL | /* horizontal data   */\n                FT_FACE_FLAG_HINTER;      /* has native hinter */\n\n        if ( sfnt_format )\n          flags |= FT_FACE_FLAG_SFNT;\n\n        /* fixed width font? */\n        if ( dict->is_fixed_pitch )\n          flags |= FT_FACE_FLAG_FIXED_WIDTH;\n\n  /* XXX: WE DO NOT SUPPORT KERNING METRICS IN THE GPOS TABLE FOR NOW */\n#if 0\n        /* kerning available? */\n        if ( face->kern_pairs )\n          flags |= FT_FACE_FLAG_KERNING;\n#endif\n\n        cffface->face_flags |= flags;\n\n        /*******************************************************************/\n        /*                                                                 */\n        /* Compute style flags.                                            */\n        /*                                                                 */\n        flags = 0;\n\n        if ( dict->italic_angle )\n          flags |= FT_STYLE_FLAG_ITALIC;\n\n        {\n          char  *weight = cff_index_get_sid_string( cff,\n                                                    dict->weight );\n\n\n          if ( weight )\n            if ( !ft_strcmp( weight, \"Bold\"  ) ||\n                 !ft_strcmp( weight, \"Black\" ) )\n              flags |= FT_STYLE_FLAG_BOLD;\n        }\n\n        /* double check */\n        if ( !(flags & FT_STYLE_FLAG_BOLD) && cffface->style_name )\n          if ( !ft_strncmp( cffface->style_name, \"Bold\", 4 )  ||\n               !ft_strncmp( cffface->style_name, \"Black\", 5 ) )\n            flags |= FT_STYLE_FLAG_BOLD;\n\n        cffface->style_flags = flags;\n      }\n\n\n#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES\n      /* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */\n      /* has unset this flag because of the 3.0 `post' table.          */\n      if ( dict->cid_registry == 0xFFFFU )\n        cffface->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;\n#endif\n\n      if ( dict->cid_registry != 0xFFFFU && pure_cff )\n        cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;\n\n\n      /*******************************************************************/\n      /*                                                                 */\n      /* Compute char maps.                                              */\n      /*                                                                 */\n\n      /* Try to synthesize a Unicode charmap if there is none available */\n      /* already.  If an OpenType font contains a Unicode \"cmap\", we    */\n      /* will use it, whatever be in the CFF part of the file.          */\n      {\n        FT_CharMapRec  cmaprec;\n        FT_CharMap     cmap;\n        FT_UInt        nn;\n        CFF_Encoding   encoding = &cff->encoding;\n\n\n        for ( nn = 0; nn < (FT_UInt)cffface->num_charmaps; nn++ )\n        {\n          cmap = cffface->charmaps[nn];\n\n          /* Windows Unicode? */\n          if ( cmap->platform_id == TT_PLATFORM_MICROSOFT &&\n               cmap->encoding_id == TT_MS_ID_UNICODE_CS   )\n            goto Skip_Unicode;\n\n          /* Apple Unicode platform id? */\n          if ( cmap->platform_id == TT_PLATFORM_APPLE_UNICODE )\n            goto Skip_Unicode; /* Apple Unicode */\n        }\n\n        /* since CID-keyed fonts don't contain glyph names, we can't */\n        /* construct a cmap                                          */\n        if ( pure_cff && cff->top_font.font_dict.cid_registry != 0xFFFFU )\n          goto Exit;\n\n        /* we didn't find a Unicode charmap -- synthesize one */\n        cmaprec.face        = cffface;\n        cmaprec.platform_id = TT_PLATFORM_MICROSOFT;\n        cmaprec.encoding_id = TT_MS_ID_UNICODE_CS;\n        cmaprec.encoding    = FT_ENCODING_UNICODE;\n\n        nn = (FT_UInt)cffface->num_charmaps;\n\n        error = FT_CMap_New( &CFF_CMAP_UNICODE_CLASS_REC_GET, NULL,\n                             &cmaprec, NULL );\n        if ( error                                      &&\n             FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )\n          goto Exit;\n        error = FT_Err_Ok;\n\n        /* if no Unicode charmap was previously selected, select this one */\n        if ( cffface->charmap == NULL && nn != (FT_UInt)cffface->num_charmaps )\n          cffface->charmap = cffface->charmaps[nn];\n\n      Skip_Unicode:\n        if ( encoding->count > 0 )\n        {\n          FT_CMap_Class  clazz;\n\n\n          cmaprec.face        = cffface;\n          cmaprec.platform_id = TT_PLATFORM_ADOBE;  /* Adobe platform id */\n\n          if ( encoding->offset == 0 )\n          {\n            cmaprec.encoding_id = TT_ADOBE_ID_STANDARD;\n            cmaprec.encoding    = FT_ENCODING_ADOBE_STANDARD;\n            clazz               = &CFF_CMAP_ENCODING_CLASS_REC_GET;\n          }\n          else if ( encoding->offset == 1 )\n          {\n            cmaprec.encoding_id = TT_ADOBE_ID_EXPERT;\n            cmaprec.encoding    = FT_ENCODING_ADOBE_EXPERT;\n            clazz               = &CFF_CMAP_ENCODING_CLASS_REC_GET;\n          }\n          else\n          {\n            cmaprec.encoding_id = TT_ADOBE_ID_CUSTOM;\n            cmaprec.encoding    = FT_ENCODING_ADOBE_CUSTOM;\n            clazz               = &CFF_CMAP_ENCODING_CLASS_REC_GET;\n          }\n\n          error = FT_CMap_New( clazz, NULL, &cmaprec, NULL );\n        }\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cff_face_done( FT_Face  cffface )         /* CFF_Face */\n  {\n    CFF_Face      face = (CFF_Face)cffface;\n    FT_Memory     memory;\n    SFNT_Service  sfnt;\n\n\n    if ( !face )\n      return;\n\n    memory = cffface->memory;\n    sfnt   = (SFNT_Service)face->sfnt;\n\n    if ( sfnt )\n      sfnt->done_face( face );\n\n    {\n      CFF_Font  cff = (CFF_Font)face->extra.data;\n\n\n      if ( cff )\n      {\n        cff_font_done( cff );\n        FT_FREE( face->extra.data );\n      }\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_driver_init( FT_Module  module )        /* CFF_Driver */\n  {\n    CFF_Driver  driver = (CFF_Driver)module;\n\n\n    /* set default property values, cf. `ftcffdrv.h' */\n#ifdef CFF_CONFIG_OPTION_OLD_ENGINE\n    driver->hinting_engine = FT_CFF_HINTING_FREETYPE;\n#else\n    driver->hinting_engine = FT_CFF_HINTING_ADOBE;\n#endif\n\n    driver->no_stem_darkening = FALSE;\n\n    driver->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1;\n    driver->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1;\n    driver->darken_params[2] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2;\n    driver->darken_params[3] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2;\n    driver->darken_params[4] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3;\n    driver->darken_params[5] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3;\n    driver->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4;\n    driver->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cff_driver_done( FT_Module  module )        /* CFF_Driver */\n  {\n    FT_UNUSED( module );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffobjs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffobjs.h                                                              */\n/*                                                                         */\n/*    OpenType objects manager (specification).                            */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006-2008, 2013 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CFFOBJS_H__\n#define __CFFOBJS_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include \"cfftypes.h\"\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    CFF_Driver                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an OpenType driver object.                             */\n  /*                                                                       */\n  typedef struct CFF_DriverRec_*  CFF_Driver;\n\n  typedef TT_Face  CFF_Face;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    CFF_Size                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an OpenType size object.                               */\n  /*                                                                       */\n  typedef struct  CFF_SizeRec_\n  {\n    FT_SizeRec  root;\n    FT_ULong    strike_index;    /* 0xFFFFFFFF to indicate invalid */\n\n  } CFF_SizeRec, *CFF_Size;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    CFF_GlyphSlot                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an OpenType glyph slot object.                         */\n  /*                                                                       */\n  typedef struct  CFF_GlyphSlotRec_\n  {\n    FT_GlyphSlotRec  root;\n\n    FT_Bool          hint;\n    FT_Bool          scaled;\n\n    FT_Fixed         x_scale;\n    FT_Fixed         y_scale;\n\n  } CFF_GlyphSlotRec, *CFF_GlyphSlot;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    CFF_Internal                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The interface to the `internal' field of `FT_Size'.                */\n  /*                                                                       */\n  typedef struct  CFF_InternalRec_\n  {\n    PSH_Globals  topfont;\n    PSH_Globals  subfonts[CFF_MAX_CID_FONTS];\n\n  } CFF_InternalRec, *CFF_Internal;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Subglyph transformation record.                                       */\n  /*                                                                       */\n  typedef struct  CFF_Transform_\n  {\n    FT_Fixed    xx, xy;     /* transformation matrix coefficients */\n    FT_Fixed    yx, yy;\n    FT_F26Dot6  ox, oy;     /* offsets        */\n\n  } CFF_Transform;\n\n\n  /***********************************************************************/\n  /*                                                                     */\n  /* CFF driver class.                                                   */\n  /*                                                                     */\n  typedef struct  CFF_DriverRec_\n  {\n    FT_DriverRec  root;\n\n    FT_UInt  hinting_engine;\n    FT_Bool  no_stem_darkening;\n\n    FT_Int  darken_params[8];\n\n  } CFF_DriverRec;\n\n\n  FT_LOCAL( FT_Error )\n  cff_size_init( FT_Size  size );           /* CFF_Size */\n\n  FT_LOCAL( void )\n  cff_size_done( FT_Size  size );           /* CFF_Size */\n\n  FT_LOCAL( FT_Error )\n  cff_size_request( FT_Size          size,\n                    FT_Size_Request  req );\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n  FT_LOCAL( FT_Error )\n  cff_size_select( FT_Size   size,\n                   FT_ULong  strike_index );\n\n#endif\n\n  FT_LOCAL( void )\n  cff_slot_done( FT_GlyphSlot  slot );\n\n  FT_LOCAL( FT_Error )\n  cff_slot_init( FT_GlyphSlot  slot );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Face functions                                                        */\n  /*                                                                       */\n  FT_LOCAL( FT_Error )\n  cff_face_init( FT_Stream      stream,\n                 FT_Face        face,           /* CFF_Face */\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params );\n\n  FT_LOCAL( void )\n  cff_face_done( FT_Face  face );               /* CFF_Face */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Driver functions                                                      */\n  /*                                                                       */\n  FT_LOCAL( FT_Error )\n  cff_driver_init( FT_Module  module );         /* CFF_Driver */\n\n  FT_LOCAL( void )\n  cff_driver_done( FT_Module  module );         /* CFF_Driver */\n\n\nFT_END_HEADER\n\n#endif /* __CFFOBJS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffparse.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffparse.c                                                             */\n/*                                                                         */\n/*    CFF token stream parser (body)                                       */\n/*                                                                         */\n/*  Copyright 1996-2004, 2007-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include \"cffparse.h\"\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_DEBUG_H\n\n#include \"cfferrs.h\"\n#include \"cffpic.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cffparse\n\n\n  FT_LOCAL_DEF( void )\n  cff_parser_init( CFF_Parser  parser,\n                   FT_UInt     code,\n                   void*       object,\n                   FT_Library  library)\n  {\n    FT_MEM_ZERO( parser, sizeof ( *parser ) );\n\n    parser->top         = parser->stack;\n    parser->object_code = code;\n    parser->object      = object;\n    parser->library     = library;\n  }\n\n\n  /* read an integer */\n  static FT_Long\n  cff_parse_integer( FT_Byte*  start,\n                     FT_Byte*  limit )\n  {\n    FT_Byte*  p   = start;\n    FT_Int    v   = *p++;\n    FT_Long   val = 0;\n\n\n    if ( v == 28 )\n    {\n      if ( p + 2 > limit )\n        goto Bad;\n\n      val = (FT_Short)( ( (FT_UShort)p[0] << 8 ) | p[1] );\n    }\n    else if ( v == 29 )\n    {\n      if ( p + 4 > limit )\n        goto Bad;\n\n      val = (FT_Long)( ( (FT_ULong)p[0] << 24 ) |\n                       ( (FT_ULong)p[1] << 16 ) |\n                       ( (FT_ULong)p[2] <<  8 ) |\n                         (FT_ULong)p[3]         );\n    }\n    else if ( v < 247 )\n    {\n      val = v - 139;\n    }\n    else if ( v < 251 )\n    {\n      if ( p + 1 > limit )\n        goto Bad;\n\n      val = ( v - 247 ) * 256 + p[0] + 108;\n    }\n    else\n    {\n      if ( p + 1 > limit )\n        goto Bad;\n\n      val = -( v - 251 ) * 256 - p[0] - 108;\n    }\n\n  Exit:\n    return val;\n\n  Bad:\n    val = 0;\n    FT_TRACE4(( \"!!!END OF DATA:!!!\" ));\n    goto Exit;\n  }\n\n\n  static const FT_Long power_tens[] =\n  {\n    1L,\n    10L,\n    100L,\n    1000L,\n    10000L,\n    100000L,\n    1000000L,\n    10000000L,\n    100000000L,\n    1000000000L\n  };\n\n\n  /* read a real */\n  static FT_Fixed\n  cff_parse_real( FT_Byte*  start,\n                  FT_Byte*  limit,\n                  FT_Long   power_ten,\n                  FT_Long*  scaling )\n  {\n    FT_Byte*  p = start;\n    FT_UInt   nib;\n    FT_UInt   phase;\n\n    FT_Long   result, number, exponent;\n    FT_Int    sign = 0, exponent_sign = 0, have_overflow = 0;\n    FT_Long   exponent_add, integer_length, fraction_length;\n\n\n    if ( scaling )\n      *scaling = 0;\n\n    result = 0;\n\n    number   = 0;\n    exponent = 0;\n\n    exponent_add    = 0;\n    integer_length  = 0;\n    fraction_length = 0;\n\n    /* First of all, read the integer part. */\n    phase = 4;\n\n    for (;;)\n    {\n      /* If we entered this iteration with phase == 4, we need to */\n      /* read a new byte.  This also skips past the initial 0x1E. */\n      if ( phase )\n      {\n        p++;\n\n        /* Make sure we don't read past the end. */\n        if ( p >= limit )\n          goto Bad;\n      }\n\n      /* Get the nibble. */\n      nib   = ( p[0] >> phase ) & 0xF;\n      phase = 4 - phase;\n\n      if ( nib == 0xE )\n        sign = 1;\n      else if ( nib > 9 )\n        break;\n      else\n      {\n        /* Increase exponent if we can't add the digit. */\n        if ( number >= 0xCCCCCCCL )\n          exponent_add++;\n        /* Skip leading zeros. */\n        else if ( nib || number )\n        {\n          integer_length++;\n          number = number * 10 + nib;\n        }\n      }\n    }\n\n    /* Read fraction part, if any. */\n    if ( nib == 0xA )\n      for (;;)\n      {\n        /* If we entered this iteration with phase == 4, we need */\n        /* to read a new byte.                                   */\n        if ( phase )\n        {\n          p++;\n\n          /* Make sure we don't read past the end. */\n          if ( p >= limit )\n            goto Bad;\n        }\n\n        /* Get the nibble. */\n        nib   = ( p[0] >> phase ) & 0xF;\n        phase = 4 - phase;\n        if ( nib >= 10 )\n          break;\n\n        /* Skip leading zeros if possible. */\n        if ( !nib && !number )\n          exponent_add--;\n        /* Only add digit if we don't overflow. */\n        else if ( number < 0xCCCCCCCL && fraction_length < 9 )\n        {\n          fraction_length++;\n          number = number * 10 + nib;\n        }\n      }\n\n    /* Read exponent, if any. */\n    if ( nib == 12 )\n    {\n      exponent_sign = 1;\n      nib           = 11;\n    }\n\n    if ( nib == 11 )\n    {\n      for (;;)\n      {\n        /* If we entered this iteration with phase == 4, */\n        /* we need to read a new byte.                   */\n        if ( phase )\n        {\n          p++;\n\n          /* Make sure we don't read past the end. */\n          if ( p >= limit )\n            goto Bad;\n        }\n\n        /* Get the nibble. */\n        nib   = ( p[0] >> phase ) & 0xF;\n        phase = 4 - phase;\n        if ( nib >= 10 )\n          break;\n\n        /* Arbitrarily limit exponent. */\n        if ( exponent > 1000 )\n          have_overflow = 1;\n        else\n          exponent = exponent * 10 + nib;\n      }\n\n      if ( exponent_sign )\n        exponent = -exponent;\n    }\n\n    if ( !number )\n      goto Exit;\n\n    if ( have_overflow )\n    {\n      if ( exponent_sign )\n        goto Underflow;\n      else\n        goto Overflow;\n    }\n\n    /* We don't check `power_ten' and `exponent_add'. */\n    exponent += power_ten + exponent_add;\n\n    if ( scaling )\n    {\n      /* Only use `fraction_length'. */\n      fraction_length += integer_length;\n      exponent        += integer_length;\n\n      if ( fraction_length <= 5 )\n      {\n        if ( number > 0x7FFFL )\n        {\n          result   = FT_DivFix( number, 10 );\n          *scaling = exponent - fraction_length + 1;\n        }\n        else\n        {\n          if ( exponent > 0 )\n          {\n            FT_Long  new_fraction_length, shift;\n\n\n            /* Make `scaling' as small as possible. */\n            new_fraction_length = FT_MIN( exponent, 5 );\n            shift               = new_fraction_length - fraction_length;\n\n            if ( shift > 0 )\n            {\n              exponent -= new_fraction_length;\n              number   *= power_tens[shift];\n              if ( number > 0x7FFFL )\n              {\n                number   /= 10;\n                exponent += 1;\n              }\n            }\n            else\n              exponent -= fraction_length;\n          }\n          else\n            exponent -= fraction_length;\n\n          result   = (FT_Long)( (FT_ULong)number << 16 );\n          *scaling = exponent;\n        }\n      }\n      else\n      {\n        if ( ( number / power_tens[fraction_length - 5] ) > 0x7FFFL )\n        {\n          result   = FT_DivFix( number, power_tens[fraction_length - 4] );\n          *scaling = exponent - 4;\n        }\n        else\n        {\n          result   = FT_DivFix( number, power_tens[fraction_length - 5] );\n          *scaling = exponent - 5;\n        }\n      }\n    }\n    else\n    {\n      integer_length  += exponent;\n      fraction_length -= exponent;\n\n      if ( integer_length > 5 )\n        goto Overflow;\n      if ( integer_length < -5 )\n        goto Underflow;\n\n      /* Remove non-significant digits. */\n      if ( integer_length < 0 )\n      {\n        number          /= power_tens[-integer_length];\n        fraction_length += integer_length;\n      }\n\n      /* this can only happen if exponent was non-zero */\n      if ( fraction_length == 10 )\n      {\n        number          /= 10;\n        fraction_length -= 1;\n      }\n\n      /* Convert into 16.16 format. */\n      if ( fraction_length > 0 )\n      {\n        if ( ( number / power_tens[fraction_length] ) > 0x7FFFL )\n          goto Exit;\n\n        result = FT_DivFix( number, power_tens[fraction_length] );\n      }\n      else\n      {\n        number *= power_tens[-fraction_length];\n\n        if ( number > 0x7FFFL )\n          goto Overflow;\n\n        result = (FT_Long)( (FT_ULong)number << 16 );\n      }\n    }\n\n  Exit:\n    if ( sign )\n      result = -result;\n\n    return result;\n\n  Overflow:\n    result = 0x7FFFFFFFL;\n    FT_TRACE4(( \"!!!OVERFLOW:!!!\" ));\n    goto Exit;\n\n  Underflow:\n    result = 0;\n    FT_TRACE4(( \"!!!UNDERFLOW:!!!\" ));\n    goto Exit;\n\n  Bad:\n    result = 0;\n    FT_TRACE4(( \"!!!END OF DATA:!!!\" ));\n    goto Exit;\n  }\n\n\n  /* read a number, either integer or real */\n  static FT_Long\n  cff_parse_num( FT_Byte**  d )\n  {\n    return **d == 30 ? ( cff_parse_real( d[0], d[1], 0, NULL ) >> 16 )\n                     :   cff_parse_integer( d[0], d[1] );\n  }\n\n\n  /* read a floating point number, either integer or real */\n  static FT_Fixed\n  do_fixed( FT_Byte**  d,\n            FT_Long    scaling )\n  {\n    if ( **d == 30 )\n      return cff_parse_real( d[0], d[1], scaling, NULL );\n    else\n    {\n      FT_Long  val = cff_parse_integer( d[0], d[1] );\n\n\n      if ( scaling )\n        val *= power_tens[scaling];\n\n      if ( val > 0x7FFF )\n      {\n        val = 0x7FFFFFFFL;\n        goto Overflow;\n      }\n      else if ( val < -0x7FFF )\n      {\n        val = -0x7FFFFFFFL;\n        goto Overflow;\n      }\n\n      return (FT_Long)( (FT_ULong)val << 16 );\n\n    Overflow:\n      FT_TRACE4(( \"!!!OVERFLOW:!!!\" ));\n      return val;\n    }\n  }\n\n\n  /* read a floating point number, either integer or real */\n  static FT_Fixed\n  cff_parse_fixed( FT_Byte**  d )\n  {\n    return do_fixed( d, 0 );\n  }\n\n\n  /* read a floating point number, either integer or real, */\n  /* but return `10^scaling' times the number read in      */\n  static FT_Fixed\n  cff_parse_fixed_scaled( FT_Byte**  d,\n                          FT_Long    scaling )\n  {\n    return do_fixed( d, scaling );\n  }\n\n\n  /* read a floating point number, either integer or real,     */\n  /* and return it as precise as possible -- `scaling' returns */\n  /* the scaling factor (as a power of 10)                     */\n  static FT_Fixed\n  cff_parse_fixed_dynamic( FT_Byte**  d,\n                           FT_Long*   scaling )\n  {\n    FT_ASSERT( scaling );\n\n    if ( **d == 30 )\n      return cff_parse_real( d[0], d[1], 0, scaling );\n    else\n    {\n      FT_Long  number;\n      FT_Int   integer_length;\n\n\n      number = cff_parse_integer( d[0], d[1] );\n\n      if ( number > 0x7FFFL )\n      {\n        for ( integer_length = 5; integer_length < 10; integer_length++ )\n          if ( number < power_tens[integer_length] )\n            break;\n\n        if ( ( number / power_tens[integer_length - 5] ) > 0x7FFFL )\n        {\n          *scaling = integer_length - 4;\n          return FT_DivFix( number, power_tens[integer_length - 4] );\n        }\n        else\n        {\n          *scaling = integer_length - 5;\n          return FT_DivFix( number, power_tens[integer_length - 5] );\n        }\n      }\n      else\n      {\n        *scaling = 0;\n        return (FT_Long)( (FT_ULong)number << 16 );\n      }\n    }\n  }\n\n\n  static FT_Error\n  cff_parse_font_matrix( CFF_Parser  parser )\n  {\n    CFF_FontRecDict  dict   = (CFF_FontRecDict)parser->object;\n    FT_Matrix*       matrix = &dict->font_matrix;\n    FT_Vector*       offset = &dict->font_offset;\n    FT_ULong*        upm    = &dict->units_per_em;\n    FT_Byte**        data   = parser->stack;\n    FT_Error         error  = FT_ERR( Stack_Underflow );\n\n\n    if ( parser->top >= parser->stack + 6 )\n    {\n      FT_Long  scaling;\n\n\n      error = FT_Err_Ok;\n\n      dict->has_font_matrix = TRUE;\n\n      /* We expect a well-formed font matrix, this is, the matrix elements */\n      /* `xx' and `yy' are of approximately the same magnitude.  To avoid  */\n      /* loss of precision, we use the magnitude of element `xx' to scale  */\n      /* all other elements.  The scaling factor is then contained in the  */\n      /* `units_per_em' value.                                             */\n\n      matrix->xx = cff_parse_fixed_dynamic( data++, &scaling );\n\n      scaling = -scaling;\n\n      if ( scaling < 0 || scaling > 9 )\n      {\n        /* Return default matrix in case of unlikely values. */\n\n        FT_TRACE1(( \"cff_parse_font_matrix:\"\n                    \" strange scaling value for xx element (%d),\\n\"\n                    \"                      \"\n                    \" using default matrix\\n\", scaling ));\n\n        matrix->xx = 0x10000L;\n        matrix->yx = 0;\n        matrix->xy = 0;\n        matrix->yy = 0x10000L;\n        offset->x  = 0;\n        offset->y  = 0;\n        *upm       = 1;\n\n        goto Exit;\n      }\n\n      matrix->yx = cff_parse_fixed_scaled( data++, scaling );\n      matrix->xy = cff_parse_fixed_scaled( data++, scaling );\n      matrix->yy = cff_parse_fixed_scaled( data++, scaling );\n      offset->x  = cff_parse_fixed_scaled( data++, scaling );\n      offset->y  = cff_parse_fixed_scaled( data,   scaling );\n\n      *upm = power_tens[scaling];\n\n      FT_TRACE4(( \" [%f %f %f %f %f %f]\\n\",\n                  (double)matrix->xx / *upm / 65536,\n                  (double)matrix->xy / *upm / 65536,\n                  (double)matrix->yx / *upm / 65536,\n                  (double)matrix->yy / *upm / 65536,\n                  (double)offset->x  / *upm / 65536,\n                  (double)offset->y  / *upm / 65536 ));\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  cff_parse_font_bbox( CFF_Parser  parser )\n  {\n    CFF_FontRecDict  dict = (CFF_FontRecDict)parser->object;\n    FT_BBox*         bbox = &dict->font_bbox;\n    FT_Byte**        data = parser->stack;\n    FT_Error         error;\n\n\n    error = FT_ERR( Stack_Underflow );\n\n    if ( parser->top >= parser->stack + 4 )\n    {\n      bbox->xMin = FT_RoundFix( cff_parse_fixed( data++ ) );\n      bbox->yMin = FT_RoundFix( cff_parse_fixed( data++ ) );\n      bbox->xMax = FT_RoundFix( cff_parse_fixed( data++ ) );\n      bbox->yMax = FT_RoundFix( cff_parse_fixed( data   ) );\n      error = FT_Err_Ok;\n\n      FT_TRACE4(( \" [%d %d %d %d]\\n\",\n                  bbox->xMin / 65536,\n                  bbox->yMin / 65536,\n                  bbox->xMax / 65536,\n                  bbox->yMax / 65536 ));\n    }\n\n    return error;\n  }\n\n\n  static FT_Error\n  cff_parse_private_dict( CFF_Parser  parser )\n  {\n    CFF_FontRecDict  dict = (CFF_FontRecDict)parser->object;\n    FT_Byte**        data = parser->stack;\n    FT_Error         error;\n\n\n    error = FT_ERR( Stack_Underflow );\n\n    if ( parser->top >= parser->stack + 2 )\n    {\n      dict->private_size   = cff_parse_num( data++ );\n      dict->private_offset = cff_parse_num( data   );\n      FT_TRACE4(( \" %lu %lu\\n\",\n                  dict->private_size, dict->private_offset ));\n\n      error = FT_Err_Ok;\n    }\n\n    return error;\n  }\n\n\n  static FT_Error\n  cff_parse_cid_ros( CFF_Parser  parser )\n  {\n    CFF_FontRecDict  dict = (CFF_FontRecDict)parser->object;\n    FT_Byte**        data = parser->stack;\n    FT_Error         error;\n\n\n    error = FT_ERR( Stack_Underflow );\n\n    if ( parser->top >= parser->stack + 3 )\n    {\n      dict->cid_registry = (FT_UInt)cff_parse_num( data++ );\n      dict->cid_ordering = (FT_UInt)cff_parse_num( data++ );\n      if ( **data == 30 )\n        FT_TRACE1(( \"cff_parse_cid_ros: real supplement is rounded\\n\" ));\n      dict->cid_supplement = cff_parse_num( data );\n      if ( dict->cid_supplement < 0 )\n        FT_TRACE1(( \"cff_parse_cid_ros: negative supplement %d is found\\n\",\n                   dict->cid_supplement ));\n      error = FT_Err_Ok;\n\n      FT_TRACE4(( \" %d %d %d\\n\",\n                  dict->cid_registry,\n                  dict->cid_ordering,\n                  dict->cid_supplement ));\n    }\n\n    return error;\n  }\n\n\n#define CFF_FIELD_NUM( code, name, id )             \\\n          CFF_FIELD( code, name, id, cff_kind_num )\n#define CFF_FIELD_FIXED( code, name, id )             \\\n          CFF_FIELD( code, name, id, cff_kind_fixed )\n#define CFF_FIELD_FIXED_1000( code, name, id )                 \\\n          CFF_FIELD( code, name, id, cff_kind_fixed_thousand )\n#define CFF_FIELD_STRING( code, name, id )             \\\n          CFF_FIELD( code, name, id, cff_kind_string )\n#define CFF_FIELD_BOOL( code, name, id )             \\\n          CFF_FIELD( code, name, id, cff_kind_bool )\n\n#define CFFCODE_TOPDICT  0x1000\n#define CFFCODE_PRIVATE  0x2000\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n\n#undef  CFF_FIELD\n#undef  CFF_FIELD_DELTA\n\n\n#ifndef FT_DEBUG_LEVEL_TRACE\n\n\n#define CFF_FIELD_CALLBACK( code, name, id ) \\\n          {                                  \\\n            cff_kind_callback,               \\\n            code | CFFCODE,                  \\\n            0, 0,                            \\\n            cff_parse_ ## name,              \\\n            0, 0                             \\\n          },\n\n#define CFF_FIELD( code, name, id, kind ) \\\n          {                               \\\n            kind,                         \\\n            code | CFFCODE,               \\\n            FT_FIELD_OFFSET( name ),      \\\n            FT_FIELD_SIZE( name ),        \\\n            0, 0, 0                       \\\n          },\n\n#define CFF_FIELD_DELTA( code, name, max, id ) \\\n          {                                    \\\n            cff_kind_delta,                    \\\n            code | CFFCODE,                    \\\n            FT_FIELD_OFFSET( name ),           \\\n            FT_FIELD_SIZE_DELTA( name ),       \\\n            0,                                 \\\n            max,                               \\\n            FT_FIELD_OFFSET( num_ ## name )    \\\n          },\n\n  static const CFF_Field_Handler  cff_field_handlers[] =\n  {\n\n#include \"cfftoken.h\"\n\n    { 0, 0, 0, 0, 0, 0, 0 }\n  };\n\n\n#else /* FT_DEBUG_LEVEL_TRACE */\n\n\n\n#define CFF_FIELD_CALLBACK( code, name, id ) \\\n          {                                  \\\n            cff_kind_callback,               \\\n            code | CFFCODE,                  \\\n            0, 0,                            \\\n            cff_parse_ ## name,              \\\n            0, 0,                            \\\n            id                               \\\n          },\n\n#define CFF_FIELD( code, name, id, kind ) \\\n          {                               \\\n            kind,                         \\\n            code | CFFCODE,               \\\n            FT_FIELD_OFFSET( name ),      \\\n            FT_FIELD_SIZE( name ),        \\\n            0, 0, 0,                      \\\n            id                            \\\n          },\n\n#define CFF_FIELD_DELTA( code, name, max, id ) \\\n          {                                    \\\n            cff_kind_delta,                    \\\n            code | CFFCODE,                    \\\n            FT_FIELD_OFFSET( name ),           \\\n            FT_FIELD_SIZE_DELTA( name ),       \\\n            0,                                 \\\n            max,                               \\\n            FT_FIELD_OFFSET( num_ ## name ),   \\\n            id                                 \\\n          },\n\n  static const CFF_Field_Handler  cff_field_handlers[] =\n  {\n\n#include \"cfftoken.h\"\n\n    { 0, 0, 0, 0, 0, 0, 0, 0 }\n  };\n\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n\n  void\n  FT_Destroy_Class_cff_field_handlers( FT_Library          library,\n                                       CFF_Field_Handler*  clazz )\n  {\n    FT_Memory  memory = library->memory;\n\n\n    if ( clazz )\n      FT_FREE( clazz );\n  }\n\n\n  FT_Error\n  FT_Create_Class_cff_field_handlers( FT_Library           library,\n                                      CFF_Field_Handler**  output_class )\n  {\n    CFF_Field_Handler*  clazz  = NULL;\n    FT_Error            error;\n    FT_Memory           memory = library->memory;\n\n    int  i = 0;\n\n\n#undef CFF_FIELD\n#define CFF_FIELD( code, name, id, kind ) i++;\n#undef CFF_FIELD_DELTA\n#define CFF_FIELD_DELTA( code, name, max, id ) i++;\n#undef CFF_FIELD_CALLBACK\n#define CFF_FIELD_CALLBACK( code, name, id ) i++;\n\n#include \"cfftoken.h\"\n\n    i++; /* { 0, 0, 0, 0, 0, 0, 0 } */\n\n    if ( FT_ALLOC( clazz, sizeof ( CFF_Field_Handler ) * i ) )\n      return error;\n\n    i = 0;\n\n\n#ifndef FT_DEBUG_LEVEL_TRACE\n\n\n#undef CFF_FIELD_CALLBACK\n#define CFF_FIELD_CALLBACK( code_, name_, id_ )        \\\n          clazz[i].kind         = cff_kind_callback;   \\\n          clazz[i].code         = code_ | CFFCODE;     \\\n          clazz[i].offset       = 0;                   \\\n          clazz[i].size         = 0;                   \\\n          clazz[i].reader       = cff_parse_ ## name_; \\\n          clazz[i].array_max    = 0;                   \\\n          clazz[i].count_offset = 0;                   \\\n          i++;\n\n#undef  CFF_FIELD\n#define CFF_FIELD( code_, name_, id_, kind_ )               \\\n          clazz[i].kind         = kind_;                    \\\n          clazz[i].code         = code_ | CFFCODE;          \\\n          clazz[i].offset       = FT_FIELD_OFFSET( name_ ); \\\n          clazz[i].size         = FT_FIELD_SIZE( name_ );   \\\n          clazz[i].reader       = 0;                        \\\n          clazz[i].array_max    = 0;                        \\\n          clazz[i].count_offset = 0;                        \\\n          i++;                                              \\\n\n#undef  CFF_FIELD_DELTA\n#define CFF_FIELD_DELTA( code_, name_, max_, id_ )                  \\\n          clazz[i].kind         = cff_kind_delta;                   \\\n          clazz[i].code         = code_ | CFFCODE;                  \\\n          clazz[i].offset       = FT_FIELD_OFFSET( name_ );         \\\n          clazz[i].size         = FT_FIELD_SIZE_DELTA( name_ );     \\\n          clazz[i].reader       = 0;                                \\\n          clazz[i].array_max    = max_;                             \\\n          clazz[i].count_offset = FT_FIELD_OFFSET( num_ ## name_ ); \\\n          i++;\n\n#include \"cfftoken.h\"\n\n    clazz[i].kind         = 0;\n    clazz[i].code         = 0;\n    clazz[i].offset       = 0;\n    clazz[i].size         = 0;\n    clazz[i].reader       = 0;\n    clazz[i].array_max    = 0;\n    clazz[i].count_offset = 0;\n\n\n#else /* FT_DEBUG_LEVEL_TRACE */\n\n\n#undef CFF_FIELD_CALLBACK\n#define CFF_FIELD_CALLBACK( code_, name_, id_ )        \\\n          clazz[i].kind         = cff_kind_callback;   \\\n          clazz[i].code         = code_ | CFFCODE;     \\\n          clazz[i].offset       = 0;                   \\\n          clazz[i].size         = 0;                   \\\n          clazz[i].reader       = cff_parse_ ## name_; \\\n          clazz[i].array_max    = 0;                   \\\n          clazz[i].count_offset = 0;                   \\\n          clazz[i].id           = id_;                 \\\n          i++;\n\n#undef  CFF_FIELD\n#define CFF_FIELD( code_, name_, id_, kind_ )               \\\n          clazz[i].kind         = kind_;                    \\\n          clazz[i].code         = code_ | CFFCODE;          \\\n          clazz[i].offset       = FT_FIELD_OFFSET( name_ ); \\\n          clazz[i].size         = FT_FIELD_SIZE( name_ );   \\\n          clazz[i].reader       = 0;                        \\\n          clazz[i].array_max    = 0;                        \\\n          clazz[i].count_offset = 0;                        \\\n          clazz[i].id           = id_;                      \\\n          i++;                                              \\\n\n#undef  CFF_FIELD_DELTA\n#define CFF_FIELD_DELTA( code_, name_, max_, id_ )                  \\\n          clazz[i].kind         = cff_kind_delta;                   \\\n          clazz[i].code         = code_ | CFFCODE;                  \\\n          clazz[i].offset       = FT_FIELD_OFFSET( name_ );         \\\n          clazz[i].size         = FT_FIELD_SIZE_DELTA( name_ );     \\\n          clazz[i].reader       = 0;                                \\\n          clazz[i].array_max    = max_;                             \\\n          clazz[i].count_offset = FT_FIELD_OFFSET( num_ ## name_ ); \\\n          clazz[i].id           = id_;                              \\\n          i++;\n\n#include \"cfftoken.h\"\n\n    clazz[i].kind         = 0;\n    clazz[i].code         = 0;\n    clazz[i].offset       = 0;\n    clazz[i].size         = 0;\n    clazz[i].reader       = 0;\n    clazz[i].array_max    = 0;\n    clazz[i].count_offset = 0;\n    clazz[i].id           = 0;\n\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n\n    *output_class = clazz;\n\n    return FT_Err_Ok;\n  }\n\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cff_parser_run( CFF_Parser  parser,\n                  FT_Byte*    start,\n                  FT_Byte*    limit )\n  {\n    FT_Byte*    p       = start;\n    FT_Error    error   = FT_Err_Ok;\n    FT_Library  library = parser->library;\n    FT_UNUSED( library );\n\n\n    parser->top    = parser->stack;\n    parser->start  = start;\n    parser->limit  = limit;\n    parser->cursor = start;\n\n    while ( p < limit )\n    {\n      FT_UInt  v = *p;\n\n\n      if ( v >= 27 && v != 31 )\n      {\n        /* it's a number; we will push its position on the stack */\n        if ( parser->top - parser->stack >= CFF_MAX_STACK_DEPTH )\n          goto Stack_Overflow;\n\n        *parser->top ++ = p;\n\n        /* now, skip it */\n        if ( v == 30 )\n        {\n          /* skip real number */\n          p++;\n          for (;;)\n          {\n            /* An unterminated floating point number at the */\n            /* end of a dictionary is invalid but harmless. */\n            if ( p >= limit )\n              goto Exit;\n            v = p[0] >> 4;\n            if ( v == 15 )\n              break;\n            v = p[0] & 0xF;\n            if ( v == 15 )\n              break;\n            p++;\n          }\n        }\n        else if ( v == 28 )\n          p += 2;\n        else if ( v == 29 )\n          p += 4;\n        else if ( v > 246 )\n          p += 1;\n      }\n      else\n      {\n        /* This is not a number, hence it's an operator.  Compute its code */\n        /* and look for it in our current list.                            */\n\n        FT_UInt                   code;\n        FT_UInt                   num_args = (FT_UInt)\n                                             ( parser->top - parser->stack );\n        const CFF_Field_Handler*  field;\n\n\n        *parser->top = p;\n        code = v;\n        if ( v == 12 )\n        {\n          /* two byte operator */\n          p++;\n          if ( p >= limit )\n            goto Syntax_Error;\n\n          code = 0x100 | p[0];\n        }\n        code = code | parser->object_code;\n\n        for ( field = CFF_FIELD_HANDLERS_GET; field->kind; field++ )\n        {\n          if ( field->code == (FT_Int)code )\n          {\n            /* we found our field's handler; read it */\n            FT_Long   val;\n            FT_Byte*  q = (FT_Byte*)parser->object + field->offset;\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n            FT_TRACE4(( \"  %s\", field->id ));\n#endif\n\n            /* check that we have enough arguments -- except for */\n            /* delta encoded arrays, which can be empty          */\n            if ( field->kind != cff_kind_delta && num_args < 1 )\n              goto Stack_Underflow;\n\n            switch ( field->kind )\n            {\n            case cff_kind_bool:\n            case cff_kind_string:\n            case cff_kind_num:\n              val = cff_parse_num( parser->stack );\n              goto Store_Number;\n\n            case cff_kind_fixed:\n              val = cff_parse_fixed( parser->stack );\n              goto Store_Number;\n\n            case cff_kind_fixed_thousand:\n              val = cff_parse_fixed_scaled( parser->stack, 3 );\n\n            Store_Number:\n              switch ( field->size )\n              {\n              case (8 / FT_CHAR_BIT):\n                *(FT_Byte*)q = (FT_Byte)val;\n                break;\n\n              case (16 / FT_CHAR_BIT):\n                *(FT_Short*)q = (FT_Short)val;\n                break;\n\n              case (32 / FT_CHAR_BIT):\n                *(FT_Int32*)q = (FT_Int)val;\n                break;\n\n              default:  /* for 64-bit systems */\n                *(FT_Long*)q = val;\n              }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n              switch ( field->kind )\n              {\n              case cff_kind_bool:\n                FT_TRACE4(( \" %s\\n\", val ? \"true\" : \"false\" ));\n                break;\n\n              case cff_kind_string:\n                FT_TRACE4(( \" %ld (SID)\\n\", val ));\n                break;\n\n              case cff_kind_num:\n                FT_TRACE4(( \" %ld\\n\", val ));\n                break;\n\n              case cff_kind_fixed:\n                FT_TRACE4(( \" %f\\n\", (double)val / 65536 ));\n                break;\n\n              case cff_kind_fixed_thousand:\n                FT_TRACE4(( \" %f\\n\", (double)val / 65536 / 1000 ));\n\n              default:\n                ; /* never reached */\n              }\n#endif\n\n              break;\n\n            case cff_kind_delta:\n              {\n                FT_Byte*   qcount = (FT_Byte*)parser->object +\n                                      field->count_offset;\n\n                FT_Byte**  data = parser->stack;\n\n\n                if ( num_args > field->array_max )\n                  num_args = field->array_max;\n\n                FT_TRACE4(( \" [\" ));\n\n                /* store count */\n                *qcount = (FT_Byte)num_args;\n\n                val = 0;\n                while ( num_args > 0 )\n                {\n                  val += cff_parse_num( data++ );\n                  switch ( field->size )\n                  {\n                  case (8 / FT_CHAR_BIT):\n                    *(FT_Byte*)q = (FT_Byte)val;\n                    break;\n\n                  case (16 / FT_CHAR_BIT):\n                    *(FT_Short*)q = (FT_Short)val;\n                    break;\n\n                  case (32 / FT_CHAR_BIT):\n                    *(FT_Int32*)q = (FT_Int)val;\n                    break;\n\n                  default:  /* for 64-bit systems */\n                    *(FT_Long*)q = val;\n                  }\n\n                  FT_TRACE4(( \" %ld\", val ));\n\n                  q += field->size;\n                  num_args--;\n                }\n\n                FT_TRACE4(( \"]\\n\" ));\n              }\n              break;\n\n            default:  /* callback */\n              error = field->reader( parser );\n              if ( error )\n                goto Exit;\n            }\n            goto Found;\n          }\n        }\n\n        /* this is an unknown operator, or it is unsupported; */\n        /* we will ignore it for now.                         */\n\n      Found:\n        /* clear stack */\n        parser->top = parser->stack;\n      }\n      p++;\n    }\n\n  Exit:\n    return error;\n\n  Stack_Overflow:\n    error = FT_THROW( Invalid_Argument );\n    goto Exit;\n\n  Stack_Underflow:\n    error = FT_THROW( Invalid_Argument );\n    goto Exit;\n\n  Syntax_Error:\n    error = FT_THROW( Invalid_Argument );\n    goto Exit;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffparse.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffparse.h                                                             */\n/*                                                                         */\n/*    CFF token stream parser (specification)                              */\n/*                                                                         */\n/*  Copyright 1996-2003, 2011 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CFF_PARSE_H__\n#define __CFF_PARSE_H__\n\n\n#include <ft2build.h>\n#include \"cfftypes.h\"\n#include FT_INTERNAL_OBJECTS_H\n\n\nFT_BEGIN_HEADER\n\n\n#define CFF_MAX_STACK_DEPTH  96\n\n#define CFF_CODE_TOPDICT  0x1000\n#define CFF_CODE_PRIVATE  0x2000\n\n\n  typedef struct  CFF_ParserRec_\n  {\n    FT_Library library;\n    FT_Byte*   start;\n    FT_Byte*   limit;\n    FT_Byte*   cursor;\n\n    FT_Byte*   stack[CFF_MAX_STACK_DEPTH + 1];\n    FT_Byte**  top;\n\n    FT_UInt    object_code;\n    void*      object;\n\n  } CFF_ParserRec, *CFF_Parser;\n\n\n  FT_LOCAL( void )\n  cff_parser_init( CFF_Parser  parser,\n                   FT_UInt     code,\n                   void*       object,\n                   FT_Library  library);\n\n  FT_LOCAL( FT_Error )\n  cff_parser_run( CFF_Parser  parser,\n                  FT_Byte*    start,\n                  FT_Byte*    limit );\n\n\n  enum\n  {\n    cff_kind_none = 0,\n    cff_kind_num,\n    cff_kind_fixed,\n    cff_kind_fixed_thousand,\n    cff_kind_string,\n    cff_kind_bool,\n    cff_kind_delta,\n    cff_kind_callback,\n\n    cff_kind_max  /* do not remove */\n  };\n\n\n  /* now generate handlers for the most simple fields */\n  typedef FT_Error  (*CFF_Field_Reader)( CFF_Parser  parser );\n\n  typedef struct  CFF_Field_Handler_\n  {\n    int               kind;\n    int               code;\n    FT_UInt           offset;\n    FT_Byte           size;\n    CFF_Field_Reader  reader;\n    FT_UInt           array_max;\n    FT_UInt           count_offset;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    const char*       id;\n#endif\n\n  } CFF_Field_Handler;\n\n\nFT_END_HEADER\n\n\n#endif /* __CFF_PARSE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffpic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffpic.c                                                               */\n/*                                                                         */\n/*    The FreeType position independent code services for cff module.      */\n/*                                                                         */\n/*  Copyright 2009, 2010, 2012, 2013 by                                    */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"cffcmap.h\"\n#include \"cffpic.h\"\n#include \"cfferrs.h\"\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* forward declaration of PIC init functions from cffdrivr.c */\n  FT_Error\n  FT_Create_Class_cff_services( FT_Library           library,\n                                FT_ServiceDescRec**  output_class );\n  void\n  FT_Destroy_Class_cff_services( FT_Library          library,\n                                 FT_ServiceDescRec*  clazz );\n  void\n  FT_Init_Class_cff_service_ps_info( FT_Library             library,\n                                     FT_Service_PsInfoRec*  clazz );\n  void\n  FT_Init_Class_cff_service_glyph_dict( FT_Library                library,\n                                        FT_Service_GlyphDictRec*  clazz );\n  void\n  FT_Init_Class_cff_service_ps_name( FT_Library                 library,\n                                     FT_Service_PsFontNameRec*  clazz );\n  void\n  FT_Init_Class_cff_service_get_cmap_info( FT_Library              library,\n                                           FT_Service_TTCMapsRec*  clazz );\n  void\n  FT_Init_Class_cff_service_cid_info( FT_Library          library,\n                                      FT_Service_CIDRec*  clazz );\n\n  /* forward declaration of PIC init functions from cffparse.c */\n  FT_Error\n  FT_Create_Class_cff_field_handlers( FT_Library           library,\n                                      CFF_Field_Handler**  output_class );\n  void\n  FT_Destroy_Class_cff_field_handlers( FT_Library          library,\n                                       CFF_Field_Handler*  clazz );\n\n\n  void\n  cff_driver_class_pic_free( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Memory          memory        = library->memory;\n\n\n    if ( pic_container->cff )\n    {\n      CffModulePIC*  container = (CffModulePIC*)pic_container->cff;\n\n\n      if ( container->cff_services )\n        FT_Destroy_Class_cff_services( library,\n                                       container->cff_services );\n      container->cff_services = NULL;\n      if ( container->cff_field_handlers )\n        FT_Destroy_Class_cff_field_handlers(\n          library, container->cff_field_handlers );\n      container->cff_field_handlers = NULL;\n      FT_FREE( container );\n      pic_container->cff = NULL;\n    }\n  }\n\n\n  FT_Error\n  cff_driver_class_pic_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Error           error         = FT_Err_Ok;\n    CffModulePIC*      container     = NULL;\n    FT_Memory          memory        = library->memory;\n\n\n    /* allocate pointer, clear and set global container pointer */\n    if ( FT_ALLOC ( container, sizeof ( *container ) ) )\n      return error;\n    FT_MEM_SET( container, 0, sizeof ( *container ) );\n    pic_container->cff = container;\n\n    /* initialize pointer table -                       */\n    /* this is how the module usually expects this data */\n    error = FT_Create_Class_cff_services( library,\n                                          &container->cff_services );\n    if ( error )\n      goto Exit;\n\n    error = FT_Create_Class_cff_field_handlers(\n              library, &container->cff_field_handlers );\n    if ( error )\n      goto Exit;\n\n    FT_Init_Class_cff_service_ps_info(\n      library, &container->cff_service_ps_info );\n    FT_Init_Class_cff_service_glyph_dict(\n      library, &container->cff_service_glyph_dict );\n    FT_Init_Class_cff_service_ps_name(\n      library, &container->cff_service_ps_name );\n    FT_Init_Class_cff_service_get_cmap_info(\n      library, &container->cff_service_get_cmap_info );\n    FT_Init_Class_cff_service_cid_info(\n      library, &container->cff_service_cid_info );\n    FT_Init_Class_cff_cmap_encoding_class_rec(\n      library, &container->cff_cmap_encoding_class_rec );\n    FT_Init_Class_cff_cmap_unicode_class_rec(\n      library, &container->cff_cmap_unicode_class_rec );\n\n  Exit:\n    if ( error )\n      cff_driver_class_pic_free( library );\n    return error;\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cffpic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cffpic.h                                                               */\n/*                                                                         */\n/*    The FreeType position independent code services for cff module.      */\n/*                                                                         */\n/*  Copyright 2009, 2012, 2013 by                                          */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CFFPIC_H__\n#define __CFFPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#include FT_INTERNAL_PIC_H\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define CFF_SERVICE_PS_INFO_GET          cff_service_ps_info\n#define CFF_SERVICE_GLYPH_DICT_GET       cff_service_glyph_dict\n#define CFF_SERVICE_PS_NAME_GET          cff_service_ps_name\n#define CFF_SERVICE_GET_CMAP_INFO_GET    cff_service_get_cmap_info\n#define CFF_SERVICE_CID_INFO_GET         cff_service_cid_info\n#define CFF_SERVICE_PROPERTIES_GET       cff_service_properties\n#define CFF_SERVICES_GET                 cff_services\n#define CFF_CMAP_ENCODING_CLASS_REC_GET  cff_cmap_encoding_class_rec\n#define CFF_CMAP_UNICODE_CLASS_REC_GET   cff_cmap_unicode_class_rec\n#define CFF_FIELD_HANDLERS_GET           cff_field_handlers\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#include FT_SERVICE_GLYPH_DICT_H\n#include \"cffparse.h\"\n#include FT_SERVICE_POSTSCRIPT_INFO_H\n#include FT_SERVICE_POSTSCRIPT_NAME_H\n#include FT_SERVICE_TT_CMAP_H\n#include FT_SERVICE_CID_H\n#include FT_SERVICE_PROPERTIES_H\n\n\n  typedef struct  CffModulePIC_\n  {\n    FT_ServiceDescRec*        cff_services;\n    CFF_Field_Handler*        cff_field_handlers;\n    FT_Service_PsInfoRec      cff_service_ps_info;\n    FT_Service_GlyphDictRec   cff_service_glyph_dict;\n    FT_Service_PsFontNameRec  cff_service_ps_name;\n    FT_Service_TTCMapsRec     cff_service_get_cmap_info;\n    FT_Service_CIDRec         cff_service_cid_info;\n    FT_Service_PropertiesRec  cff_service_properties;\n    FT_CMap_ClassRec          cff_cmap_encoding_class_rec;\n    FT_CMap_ClassRec          cff_cmap_unicode_class_rec;\n\n  } CffModulePIC;\n\n\n#define GET_PIC( lib )                                    \\\n          ( (CffModulePIC*)( (lib)->pic_container.cff ) )\n\n#define CFF_SERVICE_PS_INFO_GET                       \\\n          ( GET_PIC( library )->cff_service_ps_info )\n#define CFF_SERVICE_GLYPH_DICT_GET                       \\\n          ( GET_PIC( library )->cff_service_glyph_dict )\n#define CFF_SERVICE_PS_NAME_GET                       \\\n          ( GET_PIC( library )->cff_service_ps_name )\n#define CFF_SERVICE_GET_CMAP_INFO_GET                       \\\n          ( GET_PIC( library )->cff_service_get_cmap_info )\n#define CFF_SERVICE_CID_INFO_GET                       \\\n          ( GET_PIC( library )->cff_service_cid_info )\n#define CFF_SERVICE_PROPERTIES_GET                       \\\n          ( GET_PIC( library )->cff_service_properties )\n#define CFF_SERVICES_GET                       \\\n          ( GET_PIC( library )->cff_services )\n#define CFF_CMAP_ENCODING_CLASS_REC_GET                       \\\n          ( GET_PIC( library )->cff_cmap_encoding_class_rec )\n#define CFF_CMAP_UNICODE_CLASS_REC_GET                       \\\n          ( GET_PIC( library )->cff_cmap_unicode_class_rec )\n#define CFF_FIELD_HANDLERS_GET                       \\\n          ( GET_PIC( library )->cff_field_handlers )\n\n  /* see cffpic.c for the implementation */\n  void\n  cff_driver_class_pic_free( FT_Library  library );\n\n  FT_Error\n  cff_driver_class_pic_init( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __CFFPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cfftoken.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cfftoken.h                                                             */\n/*                                                                         */\n/*    CFF token definitions (specification only).                          */\n/*                                                                         */\n/*  Copyright 1996-2003, 2011 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  CFF_FontRecDictRec\n\n#undef  CFFCODE\n#define CFFCODE       CFFCODE_TOPDICT\n\n  CFF_FIELD_STRING  ( 0,     version,             \"Version\" )\n  CFF_FIELD_STRING  ( 1,     notice,              \"Notice\" )\n  CFF_FIELD_STRING  ( 0x100, copyright,           \"Copyright\" )\n  CFF_FIELD_STRING  ( 2,     full_name,           \"FullName\" )\n  CFF_FIELD_STRING  ( 3,     family_name,         \"FamilyName\" )\n  CFF_FIELD_STRING  ( 4,     weight,              \"Weight\" )\n  CFF_FIELD_BOOL    ( 0x101, is_fixed_pitch,      \"isFixedPitch\" )\n  CFF_FIELD_FIXED   ( 0x102, italic_angle,        \"ItalicAngle\" )\n  CFF_FIELD_FIXED   ( 0x103, underline_position,  \"UnderlinePosition\" )\n  CFF_FIELD_FIXED   ( 0x104, underline_thickness, \"UnderlineThickness\" )\n  CFF_FIELD_NUM     ( 0x105, paint_type,          \"PaintType\" )\n  CFF_FIELD_NUM     ( 0x106, charstring_type,     \"CharstringType\" )\n  CFF_FIELD_CALLBACK( 0x107, font_matrix,         \"FontMatrix\" )\n  CFF_FIELD_NUM     ( 13,    unique_id,           \"UniqueID\" )\n  CFF_FIELD_CALLBACK( 5,     font_bbox,           \"FontBBox\" )\n  CFF_FIELD_NUM     ( 0x108, stroke_width,        \"StrokeWidth\" )\n  CFF_FIELD_NUM     ( 15,    charset_offset,      \"charset\" )\n  CFF_FIELD_NUM     ( 16,    encoding_offset,     \"Encoding\" )\n  CFF_FIELD_NUM     ( 17,    charstrings_offset,  \"CharStrings\" )\n  CFF_FIELD_CALLBACK( 18,    private_dict,        \"Private\" )\n  CFF_FIELD_NUM     ( 0x114, synthetic_base,      \"SyntheticBase\" )\n  CFF_FIELD_STRING  ( 0x115, embedded_postscript, \"PostScript\" )\n\n#if 0\n  CFF_FIELD_STRING  ( 0x116, base_font_name,      \"BaseFontName\" )\n  CFF_FIELD_DELTA   ( 0x117, base_font_blend, 16, \"BaseFontBlend\" )\n  CFF_FIELD_CALLBACK( 0x118, multiple_master,     \"MultipleMaster\" )\n  CFF_FIELD_CALLBACK( 0x119, blend_axis_types,    \"BlendAxisTypes\" )\n#endif\n\n  CFF_FIELD_CALLBACK( 0x11E, cid_ros,              \"ROS\" )\n  CFF_FIELD_NUM     ( 0x11F, cid_font_version,     \"CIDFontVersion\" )\n  CFF_FIELD_NUM     ( 0x120, cid_font_revision,    \"CIDFontRevision\" )\n  CFF_FIELD_NUM     ( 0x121, cid_font_type,        \"CIDFontType\" )\n  CFF_FIELD_NUM     ( 0x122, cid_count,            \"CIDCount\" )\n  CFF_FIELD_NUM     ( 0x123, cid_uid_base,         \"UIDBase\" )\n  CFF_FIELD_NUM     ( 0x124, cid_fd_array_offset,  \"FDArray\" )\n  CFF_FIELD_NUM     ( 0x125, cid_fd_select_offset, \"FDSelect\" )\n  CFF_FIELD_STRING  ( 0x126, cid_font_name,        \"FontName\" )\n\n#if 0\n  CFF_FIELD_NUM     ( 0x127, chameleon, \"Chameleon\" )\n#endif\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  CFF_PrivateRec\n#undef  CFFCODE\n#define CFFCODE       CFFCODE_PRIVATE\n\n  CFF_FIELD_DELTA     ( 6,     blue_values, 14,        \"BlueValues\" )\n  CFF_FIELD_DELTA     ( 7,     other_blues, 10,        \"OtherBlues\" )\n  CFF_FIELD_DELTA     ( 8,     family_blues, 14,       \"FamilyBlues\" )\n  CFF_FIELD_DELTA     ( 9,     family_other_blues, 10, \"FamilyOtherBlues\" )\n  CFF_FIELD_FIXED_1000( 0x109, blue_scale,             \"BlueScale\" )\n  CFF_FIELD_NUM       ( 0x10A, blue_shift,             \"BlueShift\" )\n  CFF_FIELD_NUM       ( 0x10B, blue_fuzz,              \"BlueFuzz\" )\n  CFF_FIELD_NUM       ( 10,    standard_width,         \"StdHW\" )\n  CFF_FIELD_NUM       ( 11,    standard_height,        \"StdVW\" )\n  CFF_FIELD_DELTA     ( 0x10C, snap_widths, 13,        \"StemSnapH\" )\n  CFF_FIELD_DELTA     ( 0x10D, snap_heights, 13,       \"StemSnapV\" )\n  CFF_FIELD_BOOL      ( 0x10E, force_bold,             \"ForceBold\" )\n  CFF_FIELD_FIXED     ( 0x10F, force_bold_threshold,   \"ForceBoldThreshold\" )\n  CFF_FIELD_NUM       ( 0x110, lenIV,                  \"lenIV\" )\n  CFF_FIELD_NUM       ( 0x111, language_group,         \"LanguageGroup\" )\n  CFF_FIELD_FIXED     ( 0x112, expansion_factor,       \"ExpansionFactor\" )\n  CFF_FIELD_NUM       ( 0x113, initial_random_seed,    \"initialRandomSeed\" )\n  CFF_FIELD_NUM       ( 19,    local_subrs_offset,     \"Subrs\" )\n  CFF_FIELD_NUM       ( 20,    default_width,          \"defaultWidthX\" )\n  CFF_FIELD_NUM       ( 21,    nominal_width,          \"nominalWidthX\" )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cff/cfftypes.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cfftypes.h                                                             */\n/*                                                                         */\n/*    Basic OpenType/CFF type definitions and interface (specification     */\n/*    only).                                                               */\n/*                                                                         */\n/*  Copyright 1996-2003, 2006-2008, 2010-2011, 2013 by                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CFFTYPES_H__\n#define __CFFTYPES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_TYPE1_TABLES_H\n#include FT_INTERNAL_SERVICE_H\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CFF_IndexRec                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a CFF Index table.                       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    stream      :: The source input stream.                            */\n  /*                                                                       */\n  /*    start       :: The position of the first index byte in the         */\n  /*                   input stream.                                       */\n  /*                                                                       */\n  /*    count       :: The number of elements in the index.                */\n  /*                                                                       */\n  /*    off_size    :: The size in bytes of object offsets in index.       */\n  /*                                                                       */\n  /*    data_offset :: The position of first data byte in the index's      */\n  /*                   bytes.                                              */\n  /*                                                                       */\n  /*    data_size   :: The size of the data table in this index.           */\n  /*                                                                       */\n  /*    offsets     :: A table of element offsets in the index.  Must be   */\n  /*                   loaded explicitly.                                  */\n  /*                                                                       */\n  /*    bytes       :: If the index is loaded in memory, its bytes.        */\n  /*                                                                       */\n  typedef struct  CFF_IndexRec_\n  {\n    FT_Stream  stream;\n    FT_ULong   start;\n    FT_UInt    count;\n    FT_Byte    off_size;\n    FT_ULong   data_offset;\n    FT_ULong   data_size;\n\n    FT_ULong*  offsets;\n    FT_Byte*   bytes;\n\n  } CFF_IndexRec, *CFF_Index;\n\n\n  typedef struct  CFF_EncodingRec_\n  {\n    FT_UInt     format;\n    FT_ULong    offset;\n\n    FT_UInt     count;\n    FT_UShort   sids [256];  /* avoid dynamic allocations */\n    FT_UShort   codes[256];\n\n  } CFF_EncodingRec, *CFF_Encoding;\n\n\n  typedef struct  CFF_CharsetRec_\n  {\n\n    FT_UInt     format;\n    FT_ULong    offset;\n\n    FT_UShort*  sids;\n    FT_UShort*  cids;       /* the inverse mapping of `sids'; only needed */\n                            /* for CID-keyed fonts                        */\n    FT_UInt     max_cid;\n    FT_UInt     num_glyphs;\n\n  } CFF_CharsetRec, *CFF_Charset;\n\n\n  typedef struct  CFF_FontRecDictRec_\n  {\n    FT_UInt    version;\n    FT_UInt    notice;\n    FT_UInt    copyright;\n    FT_UInt    full_name;\n    FT_UInt    family_name;\n    FT_UInt    weight;\n    FT_Bool    is_fixed_pitch;\n    FT_Fixed   italic_angle;\n    FT_Fixed   underline_position;\n    FT_Fixed   underline_thickness;\n    FT_Int     paint_type;\n    FT_Int     charstring_type;\n    FT_Matrix  font_matrix;\n    FT_Bool    has_font_matrix;\n    FT_ULong   units_per_em;  /* temporarily used as scaling value also */\n    FT_Vector  font_offset;\n    FT_ULong   unique_id;\n    FT_BBox    font_bbox;\n    FT_Pos     stroke_width;\n    FT_ULong   charset_offset;\n    FT_ULong   encoding_offset;\n    FT_ULong   charstrings_offset;\n    FT_ULong   private_offset;\n    FT_ULong   private_size;\n    FT_Long    synthetic_base;\n    FT_UInt    embedded_postscript;\n\n    /* these should only be used for the top-level font dictionary */\n    FT_UInt    cid_registry;\n    FT_UInt    cid_ordering;\n    FT_Long    cid_supplement;\n\n    FT_Long    cid_font_version;\n    FT_Long    cid_font_revision;\n    FT_Long    cid_font_type;\n    FT_ULong   cid_count;\n    FT_ULong   cid_uid_base;\n    FT_ULong   cid_fd_array_offset;\n    FT_ULong   cid_fd_select_offset;\n    FT_UInt    cid_font_name;\n\n  } CFF_FontRecDictRec, *CFF_FontRecDict;\n\n\n  typedef struct  CFF_PrivateRec_\n  {\n    FT_Byte   num_blue_values;\n    FT_Byte   num_other_blues;\n    FT_Byte   num_family_blues;\n    FT_Byte   num_family_other_blues;\n\n    FT_Pos    blue_values[14];\n    FT_Pos    other_blues[10];\n    FT_Pos    family_blues[14];\n    FT_Pos    family_other_blues[10];\n\n    FT_Fixed  blue_scale;\n    FT_Pos    blue_shift;\n    FT_Pos    blue_fuzz;\n    FT_Pos    standard_width;\n    FT_Pos    standard_height;\n\n    FT_Byte   num_snap_widths;\n    FT_Byte   num_snap_heights;\n    FT_Pos    snap_widths[13];\n    FT_Pos    snap_heights[13];\n    FT_Bool   force_bold;\n    FT_Fixed  force_bold_threshold;\n    FT_Int    lenIV;\n    FT_Int    language_group;\n    FT_Fixed  expansion_factor;\n    FT_Long   initial_random_seed;\n    FT_ULong  local_subrs_offset;\n    FT_Pos    default_width;\n    FT_Pos    nominal_width;\n\n  } CFF_PrivateRec, *CFF_Private;\n\n\n  typedef struct  CFF_FDSelectRec_\n  {\n    FT_Byte   format;\n    FT_UInt   range_count;\n\n    /* that's the table, taken from the file `as is' */\n    FT_Byte*  data;\n    FT_UInt   data_size;\n\n    /* small cache for format 3 only */\n    FT_UInt   cache_first;\n    FT_UInt   cache_count;\n    FT_Byte   cache_fd;\n\n  } CFF_FDSelectRec, *CFF_FDSelect;\n\n\n  /* A SubFont packs a font dict and a private dict together.  They are */\n  /* needed to support CID-keyed CFF fonts.                             */\n  typedef struct  CFF_SubFontRec_\n  {\n    CFF_FontRecDictRec  font_dict;\n    CFF_PrivateRec      private_dict;\n\n    CFF_IndexRec        local_subrs_index;\n    FT_Byte**           local_subrs; /* array of pointers into Local Subrs INDEX data */\n\n  } CFF_SubFontRec, *CFF_SubFont;\n\n\n#define CFF_MAX_CID_FONTS  256\n\n\n  typedef struct  CFF_FontRec_\n  {\n    FT_Stream        stream;\n    FT_Memory        memory;\n    FT_UInt          num_faces;\n    FT_UInt          num_glyphs;\n\n    FT_Byte          version_major;\n    FT_Byte          version_minor;\n    FT_Byte          header_size;\n    FT_Byte          absolute_offsize;\n\n\n    CFF_IndexRec     name_index;\n    CFF_IndexRec     top_dict_index;\n    CFF_IndexRec     global_subrs_index;\n\n    CFF_EncodingRec  encoding;\n    CFF_CharsetRec   charset;\n\n    CFF_IndexRec     charstrings_index;\n    CFF_IndexRec     font_dict_index;\n    CFF_IndexRec     private_index;\n    CFF_IndexRec     local_subrs_index;\n\n    FT_String*       font_name;\n\n    /* array of pointers into Global Subrs INDEX data */\n    FT_Byte**        global_subrs;\n\n    /* array of pointers into String INDEX data stored at string_pool */\n    FT_UInt          num_strings;\n    FT_Byte**        strings;\n    FT_Byte*         string_pool;\n\n    CFF_SubFontRec   top_font;\n    FT_UInt          num_subfonts;\n    CFF_SubFont      subfonts[CFF_MAX_CID_FONTS];\n\n    CFF_FDSelectRec  fd_select;\n\n    /* interface to PostScript hinter */\n    PSHinter_Service  pshinter;\n\n    /* interface to Postscript Names service */\n    FT_Service_PsCMaps  psnames;\n\n    /* since version 2.3.0 */\n    PS_FontInfoRec*  font_info;   /* font info dictionary */\n\n    /* since version 2.3.6 */\n    FT_String*       registry;\n    FT_String*       ordering;\n\n    /* since version 2.4.12 */\n    FT_Generic       cf2_instance;\n\n  } CFF_FontRec, *CFF_Font;\n\n\nFT_END_HEADER\n\n#endif /* __CFFTYPES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/ciderrs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ciderrs.h                                                              */\n/*                                                                         */\n/*    CID error codes (specification only).                                */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the CID error enumeration constants.      */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __CIDERRS_H__\n#define __CIDERRS_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  CID_Err_\n#define FT_ERR_BASE    FT_Mod_Err_CID\n\n#include FT_ERRORS_H\n\n#endif /* __CIDERRS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidgload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidgload.c                                                             */\n/*                                                                         */\n/*    CID-keyed Type1 Glyph Loader (body).                                 */\n/*                                                                         */\n/*  Copyright 1996-2007, 2009, 2010, 2013 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include \"cidload.h\"\n#include \"cidgload.h\"\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_OUTLINE_H\n#include FT_INTERNAL_CALC_H\n\n#include \"ciderrs.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cidgload\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  cid_load_glyph( T1_Decoder  decoder,\n                  FT_UInt     glyph_index )\n  {\n    CID_Face       face = (CID_Face)decoder->builder.face;\n    CID_FaceInfo   cid  = &face->cid;\n    FT_Byte*       p;\n    FT_UInt        fd_select;\n    FT_Stream      stream       = face->cid_stream;\n    FT_Error       error        = FT_Err_Ok;\n    FT_Byte*       charstring   = 0;\n    FT_Memory      memory       = face->root.memory;\n    FT_ULong       glyph_length = 0;\n    PSAux_Service  psaux        = (PSAux_Service)face->psaux;\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    FT_Incremental_InterfaceRec *inc =\n                                  face->root.internal->incremental_interface;\n#endif\n\n\n    FT_TRACE1(( \"cid_load_glyph: glyph index %d\\n\", glyph_index ));\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n    /* For incremental fonts get the character data using */\n    /* the callback function.                             */\n    if ( inc )\n    {\n      FT_Data  glyph_data;\n\n\n      error = inc->funcs->get_glyph_data( inc->object,\n                                          glyph_index, &glyph_data );\n      if ( error )\n        goto Exit;\n\n      p         = (FT_Byte*)glyph_data.pointer;\n      fd_select = (FT_UInt)cid_get_offset( &p, (FT_Byte)cid->fd_bytes );\n\n      if ( glyph_data.length != 0 )\n      {\n        glyph_length = glyph_data.length - cid->fd_bytes;\n        (void)FT_ALLOC( charstring, glyph_length );\n        if ( !error )\n          ft_memcpy( charstring, glyph_data.pointer + cid->fd_bytes,\n                     glyph_length );\n      }\n\n      inc->funcs->free_glyph_data( inc->object, &glyph_data );\n\n      if ( error )\n        goto Exit;\n    }\n\n    else\n\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n    /* For ordinary fonts read the CID font dictionary index */\n    /* and charstring offset from the CIDMap.                */\n    {\n      FT_UInt   entry_len = cid->fd_bytes + cid->gd_bytes;\n      FT_ULong  off1;\n\n\n      if ( FT_STREAM_SEEK( cid->data_offset + cid->cidmap_offset +\n                           glyph_index * entry_len )               ||\n           FT_FRAME_ENTER( 2 * entry_len )                         )\n        goto Exit;\n\n      p            = (FT_Byte*)stream->cursor;\n      fd_select    = (FT_UInt) cid_get_offset( &p, (FT_Byte)cid->fd_bytes );\n      off1         = (FT_ULong)cid_get_offset( &p, (FT_Byte)cid->gd_bytes );\n      p           += cid->fd_bytes;\n      glyph_length = cid_get_offset( &p, (FT_Byte)cid->gd_bytes ) - off1;\n      FT_FRAME_EXIT();\n\n      if ( fd_select >= (FT_UInt)cid->num_dicts )\n      {\n        error = FT_THROW( Invalid_Offset );\n        goto Exit;\n      }\n      if ( glyph_length == 0 )\n        goto Exit;\n      if ( FT_ALLOC( charstring, glyph_length ) )\n        goto Exit;\n      if ( FT_STREAM_READ_AT( cid->data_offset + off1,\n                              charstring, glyph_length ) )\n        goto Exit;\n    }\n\n    /* Now set up the subrs array and parse the charstrings. */\n    {\n      CID_FaceDict  dict;\n      CID_Subrs     cid_subrs = face->subrs + fd_select;\n      FT_Int        cs_offset;\n\n\n      /* Set up subrs */\n      decoder->num_subrs = cid_subrs->num_subrs;\n      decoder->subrs     = cid_subrs->code;\n      decoder->subrs_len = 0;\n\n      /* Set up font matrix */\n      dict                 = cid->font_dicts + fd_select;\n\n      decoder->font_matrix = dict->font_matrix;\n      decoder->font_offset = dict->font_offset;\n      decoder->lenIV       = dict->private_dict.lenIV;\n\n      /* Decode the charstring. */\n\n      /* Adjustment for seed bytes. */\n      cs_offset = ( decoder->lenIV >= 0 ? decoder->lenIV : 0 );\n\n      /* Decrypt only if lenIV >= 0. */\n      if ( decoder->lenIV >= 0 )\n        psaux->t1_decrypt( charstring, glyph_length, 4330 );\n\n      error = decoder->funcs.parse_charstrings(\n                decoder, charstring + cs_offset,\n                (FT_Int)glyph_length - cs_offset );\n    }\n\n    FT_FREE( charstring );\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n    /* Incremental fonts can optionally override the metrics. */\n    if ( !error && inc && inc->funcs->get_glyph_metrics )\n    {\n      FT_Incremental_MetricsRec  metrics;\n\n\n      metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x );\n      metrics.bearing_y = 0;\n      metrics.advance   = FIXED_TO_INT( decoder->builder.advance.x );\n      metrics.advance_v = FIXED_TO_INT( decoder->builder.advance.y );\n\n      error = inc->funcs->get_glyph_metrics( inc->object,\n                                             glyph_index, FALSE, &metrics );\n\n      decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x );\n      decoder->builder.advance.x      = INT_TO_FIXED( metrics.advance );\n      decoder->builder.advance.y      = INT_TO_FIXED( metrics.advance_v );\n    }\n\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n  Exit:\n    return error;\n  }\n\n\n#if 0\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /**********                                                      *********/\n  /**********                                                      *********/\n  /**********            COMPUTE THE MAXIMUM ADVANCE WIDTH         *********/\n  /**********                                                      *********/\n  /**********    The following code is in charge of computing      *********/\n  /**********    the maximum advance width of the font.  It        *********/\n  /**********    quickly processes each glyph charstring to        *********/\n  /**********    extract the value from either a `sbw' or `seac'   *********/\n  /**********    operator.                                         *********/\n  /**********                                                      *********/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cid_face_compute_max_advance( CID_Face  face,\n                                FT_Int*   max_advance )\n  {\n    FT_Error       error;\n    T1_DecoderRec  decoder;\n    FT_Int         glyph_index;\n\n    PSAux_Service  psaux = (PSAux_Service)face->psaux;\n\n\n    *max_advance = 0;\n\n    /* Initialize load decoder */\n    error = psaux->t1_decoder_funcs->init( &decoder,\n                                           (FT_Face)face,\n                                           0, /* size       */\n                                           0, /* glyph slot */\n                                           0, /* glyph names! XXX */\n                                           0, /* blend == 0 */\n                                           0, /* hinting == 0 */\n                                           cid_load_glyph );\n    if ( error )\n      return error;\n\n    /* TODO: initialize decoder.len_buildchar and decoder.buildchar */\n    /*       if we ever support CID-keyed multiple master fonts     */\n\n    decoder.builder.metrics_only = 1;\n    decoder.builder.load_points  = 0;\n\n    /* for each glyph, parse the glyph charstring and extract */\n    /* the advance width                                      */\n    for ( glyph_index = 0; glyph_index < face->root.num_glyphs;\n          glyph_index++ )\n    {\n      /* now get load the unscaled outline */\n      error = cid_load_glyph( &decoder, glyph_index );\n      /* ignore the error if one occurred - skip to next glyph */\n    }\n\n    *max_advance = FIXED_TO_INT( decoder.builder.advance.x );\n\n    psaux->t1_decoder_funcs->done( &decoder );\n\n    return FT_Err_Ok;\n  }\n\n\n#endif /* 0 */\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cid_slot_load_glyph( FT_GlyphSlot  cidglyph,      /* CID_GlyphSlot */\n                       FT_Size       cidsize,       /* CID_Size      */\n                       FT_UInt       glyph_index,\n                       FT_Int32      load_flags )\n  {\n    CID_GlyphSlot  glyph = (CID_GlyphSlot)cidglyph;\n    FT_Error       error;\n    T1_DecoderRec  decoder;\n    CID_Face       face = (CID_Face)cidglyph->face;\n    FT_Bool        hinting;\n\n    PSAux_Service  psaux = (PSAux_Service)face->psaux;\n    FT_Matrix      font_matrix;\n    FT_Vector      font_offset;\n\n\n    if ( glyph_index >= (FT_UInt)face->root.num_glyphs )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    if ( load_flags & FT_LOAD_NO_RECURSE )\n      load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;\n\n    glyph->x_scale = cidsize->metrics.x_scale;\n    glyph->y_scale = cidsize->metrics.y_scale;\n\n    cidglyph->outline.n_points   = 0;\n    cidglyph->outline.n_contours = 0;\n\n    hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE   ) == 0 &&\n                       ( load_flags & FT_LOAD_NO_HINTING ) == 0 );\n\n    cidglyph->format = FT_GLYPH_FORMAT_OUTLINE;\n\n    error = psaux->t1_decoder_funcs->init( &decoder,\n                                           cidglyph->face,\n                                           cidsize,\n                                           cidglyph,\n                                           0, /* glyph names -- XXX */\n                                           0, /* blend == 0 */\n                                           hinting,\n                                           FT_LOAD_TARGET_MODE( load_flags ),\n                                           cid_load_glyph );\n    if ( error )\n      goto Exit;\n\n    /* TODO: initialize decoder.len_buildchar and decoder.buildchar */\n    /*       if we ever support CID-keyed multiple master fonts     */\n\n    /* set up the decoder */\n    decoder.builder.no_recurse = FT_BOOL(\n      ( ( load_flags & FT_LOAD_NO_RECURSE ) != 0 ) );\n\n    error = cid_load_glyph( &decoder, glyph_index );\n    if ( error )\n      goto Exit;\n\n    font_matrix = decoder.font_matrix;\n    font_offset = decoder.font_offset;\n\n    /* save new glyph tables */\n    psaux->t1_decoder_funcs->done( &decoder );\n\n    /* now set the metrics -- this is rather simple, as    */\n    /* the left side bearing is the xMin, and the top side */\n    /* bearing the yMax                                    */\n    cidglyph->outline.flags &= FT_OUTLINE_OWNER;\n    cidglyph->outline.flags |= FT_OUTLINE_REVERSE_FILL;\n\n    /* for composite glyphs, return only left side bearing and */\n    /* advance width                                           */\n    if ( load_flags & FT_LOAD_NO_RECURSE )\n    {\n      FT_Slot_Internal  internal = cidglyph->internal;\n\n\n      cidglyph->metrics.horiBearingX =\n        FIXED_TO_INT( decoder.builder.left_bearing.x );\n      cidglyph->metrics.horiAdvance =\n        FIXED_TO_INT( decoder.builder.advance.x );\n\n      internal->glyph_matrix      = font_matrix;\n      internal->glyph_delta       = font_offset;\n      internal->glyph_transformed = 1;\n    }\n    else\n    {\n      FT_BBox            cbox;\n      FT_Glyph_Metrics*  metrics = &cidglyph->metrics;\n      FT_Vector          advance;\n\n\n      /* copy the _unscaled_ advance width */\n      metrics->horiAdvance =\n        FIXED_TO_INT( decoder.builder.advance.x );\n      cidglyph->linearHoriAdvance =\n        FIXED_TO_INT( decoder.builder.advance.x );\n      cidglyph->internal->glyph_transformed = 0;\n\n      /* make up vertical ones */\n      metrics->vertAdvance        = ( face->cid.font_bbox.yMax -\n                                      face->cid.font_bbox.yMin ) >> 16;\n      cidglyph->linearVertAdvance = metrics->vertAdvance;\n\n      cidglyph->format            = FT_GLYPH_FORMAT_OUTLINE;\n\n      if ( cidsize->metrics.y_ppem < 24 )\n        cidglyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;\n\n      /* apply the font matrix */\n      FT_Outline_Transform( &cidglyph->outline, &font_matrix );\n\n      FT_Outline_Translate( &cidglyph->outline,\n                            font_offset.x,\n                            font_offset.y );\n\n      advance.x = metrics->horiAdvance;\n      advance.y = 0;\n      FT_Vector_Transform( &advance, &font_matrix );\n      metrics->horiAdvance = advance.x + font_offset.x;\n\n      advance.x = 0;\n      advance.y = metrics->vertAdvance;\n      FT_Vector_Transform( &advance, &font_matrix );\n      metrics->vertAdvance = advance.y + font_offset.y;\n\n      if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )\n      {\n        /* scale the outline and the metrics */\n        FT_Int       n;\n        FT_Outline*  cur = decoder.builder.base;\n        FT_Vector*   vec = cur->points;\n        FT_Fixed     x_scale = glyph->x_scale;\n        FT_Fixed     y_scale = glyph->y_scale;\n\n\n        /* First of all, scale the points */\n        if ( !hinting || !decoder.builder.hints_funcs )\n          for ( n = cur->n_points; n > 0; n--, vec++ )\n          {\n            vec->x = FT_MulFix( vec->x, x_scale );\n            vec->y = FT_MulFix( vec->y, y_scale );\n          }\n\n        /* Then scale the metrics */\n        metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale );\n        metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, y_scale );\n      }\n\n      /* compute the other metrics */\n      FT_Outline_Get_CBox( &cidglyph->outline, &cbox );\n\n      metrics->width  = cbox.xMax - cbox.xMin;\n      metrics->height = cbox.yMax - cbox.yMin;\n\n      metrics->horiBearingX = cbox.xMin;\n      metrics->horiBearingY = cbox.yMax;\n\n      if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )\n      {\n        /* make up vertical ones */\n        ft_synthesize_vertical_metrics( metrics,\n                                        metrics->vertAdvance );\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidgload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidgload.h                                                             */\n/*                                                                         */\n/*    OpenType Glyph Loader (specification).                               */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2004 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CIDGLOAD_H__\n#define __CIDGLOAD_H__\n\n\n#include <ft2build.h>\n#include \"cidobjs.h\"\n\n\nFT_BEGIN_HEADER\n\n\n#if 0\n\n  /* Compute the maximum advance width of a font through quick parsing */\n  FT_LOCAL( FT_Error )\n  cid_face_compute_max_advance( CID_Face  face,\n                                FT_Int*   max_advance );\n\n#endif /* 0 */\n\n  FT_LOCAL( FT_Error )\n  cid_slot_load_glyph( FT_GlyphSlot  glyph,         /* CID_Glyph_Slot */\n                       FT_Size       size,          /* CID_Size       */\n                       FT_UInt       glyph_index,\n                       FT_Int32      load_flags );\n\n\nFT_END_HEADER\n\n#endif /* __CIDGLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidload.c                                                              */\n/*                                                                         */\n/*    CID-keyed Type1 font loader (body).                                  */\n/*                                                                         */\n/*  Copyright 1996-2006, 2009, 2011-2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_CONFIG_CONFIG_H\n#include FT_MULTIPLE_MASTERS_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n\n#include \"cidload.h\"\n\n#include \"ciderrs.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cidload\n\n\n  /* read a single offset */\n  FT_LOCAL_DEF( FT_Long )\n  cid_get_offset( FT_Byte*  *start,\n                  FT_Byte    offsize )\n  {\n    FT_ULong  result;\n    FT_Byte*  p = *start;\n\n\n    for ( result = 0; offsize > 0; offsize-- )\n    {\n      result <<= 8;\n      result  |= *p++;\n    }\n\n    *start = p;\n    return (FT_Long)result;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    TYPE 1 SYMBOL PARSING                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  static FT_Error\n  cid_load_keyword( CID_Face        face,\n                    CID_Loader*     loader,\n                    const T1_Field  keyword )\n  {\n    FT_Error      error;\n    CID_Parser*   parser = &loader->parser;\n    FT_Byte*      object;\n    void*         dummy_object;\n    CID_FaceInfo  cid = &face->cid;\n\n\n    /* if the keyword has a dedicated callback, call it */\n    if ( keyword->type == T1_FIELD_TYPE_CALLBACK )\n    {\n      keyword->reader( (FT_Face)face, parser );\n      error = parser->root.error;\n      goto Exit;\n    }\n\n    /* we must now compute the address of our target object */\n    switch ( keyword->location )\n    {\n    case T1_FIELD_LOCATION_CID_INFO:\n      object = (FT_Byte*)cid;\n      break;\n\n    case T1_FIELD_LOCATION_FONT_INFO:\n      object = (FT_Byte*)&cid->font_info;\n      break;\n\n    case T1_FIELD_LOCATION_FONT_EXTRA:\n      object = (FT_Byte*)&face->font_extra;\n      break;\n\n    case T1_FIELD_LOCATION_BBOX:\n      object = (FT_Byte*)&cid->font_bbox;\n      break;\n\n    default:\n      {\n        CID_FaceDict  dict;\n\n\n        if ( parser->num_dict < 0 || parser->num_dict >= cid->num_dicts )\n        {\n          FT_ERROR(( \"cid_load_keyword: invalid use of `%s'\\n\",\n                     keyword->ident ));\n          error = FT_THROW( Syntax_Error );\n          goto Exit;\n        }\n\n        dict = cid->font_dicts + parser->num_dict;\n        switch ( keyword->location )\n        {\n        case T1_FIELD_LOCATION_PRIVATE:\n          object = (FT_Byte*)&dict->private_dict;\n          break;\n\n        default:\n          object = (FT_Byte*)dict;\n        }\n      }\n    }\n\n    dummy_object = object;\n\n    /* now, load the keyword data in the object's field(s) */\n    if ( keyword->type == T1_FIELD_TYPE_INTEGER_ARRAY ||\n         keyword->type == T1_FIELD_TYPE_FIXED_ARRAY   )\n      error = cid_parser_load_field_table( &loader->parser, keyword,\n                                           &dummy_object );\n    else\n      error = cid_parser_load_field( &loader->parser,\n                                     keyword, &dummy_object );\n  Exit:\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  cid_parse_font_matrix( CID_Face     face,\n                         CID_Parser*  parser )\n  {\n    CID_FaceDict  dict;\n    FT_Face       root = (FT_Face)&face->root;\n    FT_Fixed      temp[6];\n    FT_Fixed      temp_scale;\n\n\n    if ( parser->num_dict >= 0 && parser->num_dict < face->cid.num_dicts )\n    {\n      FT_Matrix*  matrix;\n      FT_Vector*  offset;\n      FT_Int      result;\n\n\n      dict   = face->cid.font_dicts + parser->num_dict;\n      matrix = &dict->font_matrix;\n      offset = &dict->font_offset;\n\n      result = cid_parser_to_fixed_array( parser, 6, temp, 3 );\n\n      if ( result < 6 )\n        return FT_THROW( Invalid_File_Format );\n\n      temp_scale = FT_ABS( temp[3] );\n\n      if ( temp_scale == 0 )\n      {\n        FT_ERROR(( \"cid_parse_font_matrix: invalid font matrix\\n\" ));\n        return FT_THROW( Invalid_File_Format );\n      }\n\n      /* Set Units per EM based on FontMatrix values.  We set the value to */\n      /* 1000 / temp_scale, because temp_scale was already multiplied by   */\n      /* 1000 (in t1_tofixed, from psobjs.c).                              */\n\n      root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );\n\n      /* we need to scale the values by 1.0/temp[3] */\n      if ( temp_scale != 0x10000L )\n      {\n        temp[0] = FT_DivFix( temp[0], temp_scale );\n        temp[1] = FT_DivFix( temp[1], temp_scale );\n        temp[2] = FT_DivFix( temp[2], temp_scale );\n        temp[4] = FT_DivFix( temp[4], temp_scale );\n        temp[5] = FT_DivFix( temp[5], temp_scale );\n        temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L;\n      }\n\n      matrix->xx = temp[0];\n      matrix->yx = temp[1];\n      matrix->xy = temp[2];\n      matrix->yy = temp[3];\n\n      /* note that the font offsets are expressed in integer font units */\n      offset->x  = temp[4] >> 16;\n      offset->y  = temp[5] >> 16;\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  parse_fd_array( CID_Face     face,\n                  CID_Parser*  parser )\n  {\n    CID_FaceInfo  cid    = &face->cid;\n    FT_Memory     memory = face->root.memory;\n    FT_Error      error  = FT_Err_Ok;\n    FT_Long       num_dicts;\n\n\n    num_dicts = cid_parser_to_int( parser );\n\n    if ( !cid->font_dicts )\n    {\n      FT_Int  n;\n\n\n      if ( FT_NEW_ARRAY( cid->font_dicts, num_dicts ) )\n        goto Exit;\n\n      cid->num_dicts = (FT_UInt)num_dicts;\n\n      /* don't forget to set a few defaults */\n      for ( n = 0; n < cid->num_dicts; n++ )\n      {\n        CID_FaceDict  dict = cid->font_dicts + n;\n\n\n        /* default value for lenIV */\n        dict->private_dict.lenIV = 4;\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* by mistake, `expansion_factor' appears both in PS_PrivateRec */\n  /* and CID_FaceDictRec (both are public header files and can't  */\n  /* changed); we simply copy the value                           */\n\n  FT_CALLBACK_DEF( FT_Error )\n  parse_expansion_factor( CID_Face     face,\n                          CID_Parser*  parser )\n  {\n    CID_FaceDict  dict;\n\n\n    if ( parser->num_dict >= 0 && parser->num_dict < face->cid.num_dicts )\n    {\n      dict = face->cid.font_dicts + parser->num_dict;\n\n      dict->expansion_factor              = cid_parser_to_fixed( parser, 0 );\n      dict->private_dict.expansion_factor = dict->expansion_factor;\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  static\n  const T1_FieldRec  cid_field_records[] =\n  {\n\n#include \"cidtoken.h\"\n\n    T1_FIELD_CALLBACK( \"FDArray\",         parse_fd_array, 0 )\n    T1_FIELD_CALLBACK( \"FontMatrix\",      cid_parse_font_matrix, 0 )\n    T1_FIELD_CALLBACK( \"ExpansionFactor\", parse_expansion_factor, 0 )\n\n    { 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0, 0 }\n  };\n\n\n  static FT_Error\n  cid_parse_dict( CID_Face     face,\n                  CID_Loader*  loader,\n                  FT_Byte*     base,\n                  FT_Long      size )\n  {\n    CID_Parser*  parser = &loader->parser;\n\n\n    parser->root.cursor = base;\n    parser->root.limit  = base + size;\n    parser->root.error  = FT_Err_Ok;\n\n    {\n      FT_Byte*  cur   = base;\n      FT_Byte*  limit = cur + size;\n\n\n      for (;;)\n      {\n        FT_Byte*  newlimit;\n\n\n        parser->root.cursor = cur;\n        cid_parser_skip_spaces( parser );\n\n        if ( parser->root.cursor >= limit )\n          newlimit = limit - 1 - 17;\n        else\n          newlimit = parser->root.cursor - 17;\n\n        /* look for `%ADOBeginFontDict' */\n        for ( ; cur < newlimit; cur++ )\n        {\n          if ( *cur == '%'                                            &&\n               ft_strncmp( (char*)cur, \"%ADOBeginFontDict\", 17 ) == 0 )\n          {\n            /* if /FDArray was found, then cid->num_dicts is > 0, and */\n            /* we can start increasing parser->num_dict               */\n            if ( face->cid.num_dicts > 0 )\n              parser->num_dict++;\n          }\n        }\n\n        cur = parser->root.cursor;\n        /* no error can occur in cid_parser_skip_spaces */\n        if ( cur >= limit )\n          break;\n\n        cid_parser_skip_PS_token( parser );\n        if ( parser->root.cursor >= limit || parser->root.error )\n          break;\n\n        /* look for immediates */\n        if ( *cur == '/' && cur + 2 < limit )\n        {\n          FT_PtrDist  len;\n\n\n          cur++;\n          len = parser->root.cursor - cur;\n\n          if ( len > 0 && len < 22 )\n          {\n            /* now compare the immediate name to the keyword table */\n            T1_Field  keyword = (T1_Field)cid_field_records;\n\n\n            for (;;)\n            {\n              FT_Byte*  name;\n\n\n              name = (FT_Byte*)keyword->ident;\n              if ( !name )\n                break;\n\n              if ( cur[0] == name[0]                                 &&\n                   len == (FT_PtrDist)ft_strlen( (const char*)name ) )\n              {\n                FT_PtrDist  n;\n\n\n                for ( n = 1; n < len; n++ )\n                  if ( cur[n] != name[n] )\n                    break;\n\n                if ( n >= len )\n                {\n                  /* we found it - run the parsing callback */\n                  parser->root.error = cid_load_keyword( face,\n                                                         loader,\n                                                         keyword );\n                  if ( parser->root.error )\n                    return parser->root.error;\n                  break;\n                }\n              }\n              keyword++;\n            }\n          }\n        }\n\n        cur = parser->root.cursor;\n      }\n    }\n    return parser->root.error;\n  }\n\n\n  /* read the subrmap and the subrs of each font dict */\n  static FT_Error\n  cid_read_subrs( CID_Face  face )\n  {\n    CID_FaceInfo   cid    = &face->cid;\n    FT_Memory      memory = face->root.memory;\n    FT_Stream      stream = face->cid_stream;\n    FT_Error       error;\n    FT_Int         n;\n    CID_Subrs      subr;\n    FT_UInt        max_offsets = 0;\n    FT_ULong*      offsets = 0;\n    PSAux_Service  psaux = (PSAux_Service)face->psaux;\n\n\n    if ( FT_NEW_ARRAY( face->subrs, cid->num_dicts ) )\n      goto Exit;\n\n    subr = face->subrs;\n    for ( n = 0; n < cid->num_dicts; n++, subr++ )\n    {\n      CID_FaceDict  dict  = cid->font_dicts + n;\n      FT_Int        lenIV = dict->private_dict.lenIV;\n      FT_UInt       count, num_subrs = dict->num_subrs;\n      FT_ULong      data_len;\n      FT_Byte*      p;\n\n\n      /* Check for possible overflow. */\n      if ( num_subrs == FT_UINT_MAX )\n      {\n        error = FT_THROW( Syntax_Error );\n        goto Fail;\n      }\n\n      /* reallocate offsets array if needed */\n      if ( num_subrs + 1 > max_offsets )\n      {\n        FT_UInt  new_max = FT_PAD_CEIL( num_subrs + 1, 4 );\n\n\n        if ( new_max <= max_offsets )\n        {\n          error = FT_THROW( Syntax_Error );\n          goto Fail;\n        }\n\n        if ( FT_RENEW_ARRAY( offsets, max_offsets, new_max ) )\n          goto Fail;\n\n        max_offsets = new_max;\n      }\n\n      /* read the subrmap's offsets */\n      if ( FT_STREAM_SEEK( cid->data_offset + dict->subrmap_offset ) ||\n           FT_FRAME_ENTER( ( num_subrs + 1 ) * dict->sd_bytes )      )\n        goto Fail;\n\n      p = (FT_Byte*)stream->cursor;\n      for ( count = 0; count <= num_subrs; count++ )\n        offsets[count] = cid_get_offset( &p, (FT_Byte)dict->sd_bytes );\n\n      FT_FRAME_EXIT();\n\n      /* offsets must be ordered */\n      for ( count = 1; count <= num_subrs; count++ )\n        if ( offsets[count - 1] > offsets[count] )\n          goto Fail;\n\n      /* now, compute the size of subrs charstrings, */\n      /* allocate, and read them                     */\n      data_len = offsets[num_subrs] - offsets[0];\n\n      if ( FT_NEW_ARRAY( subr->code, num_subrs + 1 ) ||\n               FT_ALLOC( subr->code[0], data_len )   )\n        goto Fail;\n\n      if ( FT_STREAM_SEEK( cid->data_offset + offsets[0] ) ||\n           FT_STREAM_READ( subr->code[0], data_len )  )\n        goto Fail;\n\n      /* set up pointers */\n      for ( count = 1; count <= num_subrs; count++ )\n      {\n        FT_ULong  len;\n\n\n        len               = offsets[count] - offsets[count - 1];\n        subr->code[count] = subr->code[count - 1] + len;\n      }\n\n      /* decrypt subroutines, but only if lenIV >= 0 */\n      if ( lenIV >= 0 )\n      {\n        for ( count = 0; count < num_subrs; count++ )\n        {\n          FT_ULong  len;\n\n\n          len = offsets[count + 1] - offsets[count];\n          psaux->t1_decrypt( subr->code[count], len, 4330 );\n        }\n      }\n\n      subr->num_subrs = num_subrs;\n    }\n\n  Exit:\n    FT_FREE( offsets );\n    return error;\n\n  Fail:\n    if ( face->subrs )\n    {\n      for ( n = 0; n < cid->num_dicts; n++ )\n      {\n        if ( face->subrs[n].code )\n          FT_FREE( face->subrs[n].code[0] );\n\n        FT_FREE( face->subrs[n].code );\n      }\n      FT_FREE( face->subrs );\n    }\n    goto Exit;\n  }\n\n\n  static void\n  cid_init_loader( CID_Loader*  loader,\n                   CID_Face     face )\n  {\n    FT_UNUSED( face );\n\n    FT_MEM_ZERO( loader, sizeof ( *loader ) );\n  }\n\n\n  static  void\n  cid_done_loader( CID_Loader*  loader )\n  {\n    CID_Parser*  parser = &loader->parser;\n\n\n    /* finalize parser */\n    cid_parser_done( parser );\n  }\n\n\n  static FT_Error\n  cid_hex_to_binary( FT_Byte*  data,\n                     FT_Long   data_len,\n                     FT_ULong  offset,\n                     CID_Face  face )\n  {\n    FT_Stream  stream = face->root.stream;\n    FT_Error   error;\n\n    FT_Byte    buffer[256];\n    FT_Byte   *p, *plimit;\n    FT_Byte   *d, *dlimit;\n    FT_Byte    val;\n\n    FT_Bool    upper_nibble, done;\n\n\n    if ( FT_STREAM_SEEK( offset ) )\n      goto Exit;\n\n    d      = data;\n    dlimit = d + data_len;\n    p      = buffer;\n    plimit = p;\n\n    upper_nibble = 1;\n    done         = 0;\n\n    while ( d < dlimit )\n    {\n      if ( p >= plimit )\n      {\n        FT_ULong  oldpos = FT_STREAM_POS();\n        FT_ULong  size   = stream->size - oldpos;\n\n\n        if ( size == 0 )\n        {\n          error = FT_THROW( Syntax_Error );\n          goto Exit;\n        }\n\n        if ( FT_STREAM_READ( buffer, 256 > size ? size : 256 ) )\n          goto Exit;\n        p      = buffer;\n        plimit = p + FT_STREAM_POS() - oldpos;\n      }\n\n      if ( ft_isdigit( *p ) )\n        val = (FT_Byte)( *p - '0' );\n      else if ( *p >= 'a' && *p <= 'f' )\n        val = (FT_Byte)( *p - 'a' );\n      else if ( *p >= 'A' && *p <= 'F' )\n        val = (FT_Byte)( *p - 'A' + 10 );\n      else if ( *p == ' '  ||\n                *p == '\\t' ||\n                *p == '\\r' ||\n                *p == '\\n' ||\n                *p == '\\f' ||\n                *p == '\\0' )\n      {\n        p++;\n        continue;\n      }\n      else if ( *p == '>' )\n      {\n        val  = 0;\n        done = 1;\n      }\n      else\n      {\n        error = FT_THROW( Syntax_Error );\n        goto Exit;\n      }\n\n      if ( upper_nibble )\n        *d = (FT_Byte)( val << 4 );\n      else\n      {\n        *d = (FT_Byte)( *d + val );\n        d++;\n      }\n\n      upper_nibble = (FT_Byte)( 1 - upper_nibble );\n\n      if ( done )\n        break;\n\n      p++;\n    }\n\n    error = FT_Err_Ok;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cid_face_open( CID_Face  face,\n                 FT_Int    face_index )\n  {\n    CID_Loader   loader;\n    CID_Parser*  parser;\n    FT_Memory    memory = face->root.memory;\n    FT_Error     error;\n\n\n    cid_init_loader( &loader, face );\n\n    parser = &loader.parser;\n    error = cid_parser_new( parser, face->root.stream, face->root.memory,\n                            (PSAux_Service)face->psaux );\n    if ( error )\n      goto Exit;\n\n    error = cid_parse_dict( face, &loader,\n                            parser->postscript,\n                            parser->postscript_len );\n    if ( error )\n      goto Exit;\n\n    if ( face_index < 0 )\n      goto Exit;\n\n    if ( FT_NEW( face->cid_stream ) )\n      goto Exit;\n\n    if ( parser->binary_length )\n    {\n      /* we must convert the data section from hexadecimal to binary */\n      if ( FT_ALLOC( face->binary_data, parser->binary_length )         ||\n           cid_hex_to_binary( face->binary_data, parser->binary_length,\n                              parser->data_offset, face )               )\n        goto Exit;\n\n      FT_Stream_OpenMemory( face->cid_stream,\n                            face->binary_data, parser->binary_length );\n      face->cid.data_offset = 0;\n    }\n    else\n    {\n      *face->cid_stream     = *face->root.stream;\n      face->cid.data_offset = loader.parser.data_offset;\n    }\n\n    error = cid_read_subrs( face );\n\n  Exit:\n    cid_done_loader( &loader );\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidload.h                                                              */\n/*                                                                         */\n/*    CID-keyed Type1 font loader (specification).                         */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CIDLOAD_H__\n#define __CIDLOAD_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_STREAM_H\n#include \"cidparse.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  typedef struct  CID_Loader_\n  {\n    CID_Parser  parser;          /* parser used to read the stream */\n    FT_Int      num_chars;       /* number of characters in encoding */\n\n  } CID_Loader;\n\n\n  FT_LOCAL( FT_Long )\n  cid_get_offset( FT_Byte**  start,\n                  FT_Byte    offsize );\n\n  FT_LOCAL( FT_Error )\n  cid_face_open( CID_Face  face,\n                 FT_Int    face_index );\n\n\nFT_END_HEADER\n\n#endif /* __CIDLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidobjs.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidobjs.c                                                              */\n/*                                                                         */\n/*    CID objects manager (body).                                          */\n/*                                                                         */\n/*  Copyright 1996-2006, 2008, 2010-2011, 2013 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n\n#include \"cidgload.h\"\n#include \"cidload.h\"\n\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n\n#include \"ciderrs.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cidobjs\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                            SLOT  FUNCTIONS                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  cid_slot_done( FT_GlyphSlot  slot )\n  {\n    slot->internal->glyph_hints = 0;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cid_slot_init( FT_GlyphSlot  slot )\n  {\n    CID_Face          face;\n    PSHinter_Service  pshinter;\n\n\n    face     = (CID_Face)slot->face;\n    pshinter = (PSHinter_Service)face->pshinter;\n\n    if ( pshinter )\n    {\n      FT_Module  module;\n\n\n      module = FT_Get_Module( slot->face->driver->root.library,\n                              \"pshinter\" );\n      if ( module )\n      {\n        T1_Hints_Funcs  funcs;\n\n\n        funcs = pshinter->get_t1_funcs( module );\n        slot->internal->glyph_hints = (void*)funcs;\n      }\n    }\n\n    return 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                           SIZE  FUNCTIONS                             */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  static PSH_Globals_Funcs\n  cid_size_get_globals_funcs( CID_Size  size )\n  {\n    CID_Face          face     = (CID_Face)size->root.face;\n    PSHinter_Service  pshinter = (PSHinter_Service)face->pshinter;\n    FT_Module         module;\n\n\n    module = FT_Get_Module( size->root.face->driver->root.library,\n                            \"pshinter\" );\n    return ( module && pshinter && pshinter->get_globals_funcs )\n           ? pshinter->get_globals_funcs( module )\n           : 0;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cid_size_done( FT_Size  cidsize )         /* CID_Size */\n  {\n    CID_Size  size = (CID_Size)cidsize;\n\n\n    if ( cidsize->internal )\n    {\n      PSH_Globals_Funcs  funcs;\n\n\n      funcs = cid_size_get_globals_funcs( size );\n      if ( funcs )\n        funcs->destroy( (PSH_Globals)cidsize->internal );\n\n      cidsize->internal = 0;\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cid_size_init( FT_Size  cidsize )     /* CID_Size */\n  {\n    CID_Size           size  = (CID_Size)cidsize;\n    FT_Error           error = FT_Err_Ok;\n    PSH_Globals_Funcs  funcs = cid_size_get_globals_funcs( size );\n\n\n    if ( funcs )\n    {\n      PSH_Globals   globals;\n      CID_Face      face = (CID_Face)cidsize->face;\n      CID_FaceDict  dict = face->cid.font_dicts + face->root.face_index;\n      PS_Private    priv = &dict->private_dict;\n\n\n      error = funcs->create( cidsize->face->memory, priv, &globals );\n      if ( !error )\n        cidsize->internal = (FT_Size_Internal)(void*)globals;\n    }\n\n    return error;\n  }\n\n\n  FT_LOCAL( FT_Error )\n  cid_size_request( FT_Size          size,\n                    FT_Size_Request  req )\n  {\n    PSH_Globals_Funcs  funcs;\n\n\n    FT_Request_Metrics( size->face, req );\n\n    funcs = cid_size_get_globals_funcs( (CID_Size)size );\n\n    if ( funcs )\n      funcs->set_scale( (PSH_Globals)size->internal,\n                        size->metrics.x_scale,\n                        size->metrics.y_scale,\n                        0, 0 );\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                           FACE  FUNCTIONS                             */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cid_face_done                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finalizes a given face object.                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A pointer to the face object to destroy.                   */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  cid_face_done( FT_Face  cidface )         /* CID_Face */\n  {\n    CID_Face      face = (CID_Face)cidface;\n    FT_Memory     memory;\n    CID_FaceInfo  cid;\n    PS_FontInfo   info;\n\n\n    if ( !face )\n      return;\n\n    cid    = &face->cid;\n    info   = &cid->font_info;\n    memory = cidface->memory;\n\n    /* release subrs */\n    if ( face->subrs )\n    {\n      FT_Int  n;\n\n\n      for ( n = 0; n < cid->num_dicts; n++ )\n      {\n        CID_Subrs  subr = face->subrs + n;\n\n\n        if ( subr->code )\n        {\n          FT_FREE( subr->code[0] );\n          FT_FREE( subr->code );\n        }\n      }\n\n      FT_FREE( face->subrs );\n    }\n\n    /* release FontInfo strings */\n    FT_FREE( info->version );\n    FT_FREE( info->notice );\n    FT_FREE( info->full_name );\n    FT_FREE( info->family_name );\n    FT_FREE( info->weight );\n\n    /* release font dictionaries */\n    FT_FREE( cid->font_dicts );\n    cid->num_dicts = 0;\n\n    /* release other strings */\n    FT_FREE( cid->cid_font_name );\n    FT_FREE( cid->registry );\n    FT_FREE( cid->ordering );\n\n    cidface->family_name = 0;\n    cidface->style_name  = 0;\n\n    FT_FREE( face->binary_data );\n    FT_FREE( face->cid_stream );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cid_face_init                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initializes a given CID face object.                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream     :: The source font stream.                              */\n  /*                                                                       */\n  /*    face_index :: The index of the font face in the resource.          */\n  /*                                                                       */\n  /*    num_params :: Number of additional generic parameters.  Ignored.   */\n  /*                                                                       */\n  /*    params     :: Additional generic parameters.  Ignored.             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: The newly built face object.                         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  cid_face_init( FT_Stream      stream,\n                 FT_Face        cidface,        /* CID_Face */\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params )\n  {\n    CID_Face          face = (CID_Face)cidface;\n    FT_Error          error;\n    PSAux_Service     psaux;\n    PSHinter_Service  pshinter;\n\n    FT_UNUSED( num_params );\n    FT_UNUSED( params );\n    FT_UNUSED( stream );\n\n\n    cidface->num_faces = 1;\n\n    psaux = (PSAux_Service)face->psaux;\n    if ( !psaux )\n    {\n      psaux = (PSAux_Service)FT_Get_Module_Interface(\n                FT_FACE_LIBRARY( face ), \"psaux\" );\n\n      if ( !psaux )\n      {\n        FT_ERROR(( \"cid_face_init: cannot access `psaux' module\\n\" ));\n        error = FT_THROW( Missing_Module );\n        goto Exit;\n      }\n\n      face->psaux = psaux;\n    }\n\n    pshinter = (PSHinter_Service)face->pshinter;\n    if ( !pshinter )\n    {\n      pshinter = (PSHinter_Service)FT_Get_Module_Interface(\n                   FT_FACE_LIBRARY( face ), \"pshinter\" );\n\n      face->pshinter = pshinter;\n    }\n\n    FT_TRACE2(( \"CID driver\\n\" ));\n\n    /* open the tokenizer; this will also check the font format */\n    if ( FT_STREAM_SEEK( 0 ) )\n      goto Exit;\n\n    error = cid_face_open( face, face_index );\n    if ( error )\n      goto Exit;\n\n    /* if we just wanted to check the format, leave successfully now */\n    if ( face_index < 0 )\n      goto Exit;\n\n    /* check the face index */\n    /* XXX: handle CID fonts with more than a single face */\n    if ( face_index != 0 )\n    {\n      FT_ERROR(( \"cid_face_init: invalid face index\\n\" ));\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* now load the font program into the face object */\n\n    /* initialize the face object fields */\n\n    /* set up root face fields */\n    {\n      CID_FaceInfo  cid  = &face->cid;\n      PS_FontInfo   info = &cid->font_info;\n\n\n      cidface->num_glyphs   = cid->cid_count;\n      cidface->num_charmaps = 0;\n\n      cidface->face_index = face_index;\n\n      cidface->face_flags |= FT_FACE_FLAG_SCALABLE   | /* scalable outlines */\n                             FT_FACE_FLAG_HORIZONTAL | /* horizontal data   */\n                             FT_FACE_FLAG_HINTER;      /* has native hinter */\n\n      if ( info->is_fixed_pitch )\n        cidface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;\n\n      /* XXX: TODO: add kerning with .afm support */\n\n      /* get style name -- be careful, some broken fonts only */\n      /* have a /FontName dictionary entry!                   */\n      cidface->family_name = info->family_name;\n      /* assume \"Regular\" style if we don't know better */\n      cidface->style_name = (char *)\"Regular\";\n      if ( cidface->family_name )\n      {\n        char*  full   = info->full_name;\n        char*  family = cidface->family_name;\n\n\n        if ( full )\n        {\n          while ( *full )\n          {\n            if ( *full == *family )\n            {\n              family++;\n              full++;\n            }\n            else\n            {\n              if ( *full == ' ' || *full == '-' )\n                full++;\n              else if ( *family == ' ' || *family == '-' )\n                family++;\n              else\n              {\n                if ( !*family )\n                  cidface->style_name = full;\n                break;\n              }\n            }\n          }\n        }\n      }\n      else\n      {\n        /* do we have a `/FontName'? */\n        if ( cid->cid_font_name )\n          cidface->family_name = cid->cid_font_name;\n      }\n\n      /* compute style flags */\n      cidface->style_flags = 0;\n      if ( info->italic_angle )\n        cidface->style_flags |= FT_STYLE_FLAG_ITALIC;\n      if ( info->weight )\n      {\n        if ( !ft_strcmp( info->weight, \"Bold\"  ) ||\n             !ft_strcmp( info->weight, \"Black\" ) )\n          cidface->style_flags |= FT_STYLE_FLAG_BOLD;\n      }\n\n      /* no embedded bitmap support */\n      cidface->num_fixed_sizes = 0;\n      cidface->available_sizes = 0;\n\n      cidface->bbox.xMin =   cid->font_bbox.xMin            >> 16;\n      cidface->bbox.yMin =   cid->font_bbox.yMin            >> 16;\n      /* no `U' suffix here to 0xFFFF! */\n      cidface->bbox.xMax = ( cid->font_bbox.xMax + 0xFFFF ) >> 16;\n      cidface->bbox.yMax = ( cid->font_bbox.yMax + 0xFFFF ) >> 16;\n\n      if ( !cidface->units_per_EM )\n        cidface->units_per_EM = 1000;\n\n      cidface->ascender  = (FT_Short)( cidface->bbox.yMax );\n      cidface->descender = (FT_Short)( cidface->bbox.yMin );\n\n      cidface->height = (FT_Short)( ( cidface->units_per_EM * 12 ) / 10 );\n      if ( cidface->height < cidface->ascender - cidface->descender )\n        cidface->height = (FT_Short)( cidface->ascender - cidface->descender );\n\n      cidface->underline_position  = (FT_Short)info->underline_position;\n      cidface->underline_thickness = (FT_Short)info->underline_thickness;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cid_driver_init                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initializes a given CID driver object.                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    driver :: A handle to the target driver object.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  cid_driver_init( FT_Module  driver )\n  {\n    FT_UNUSED( driver );\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    cid_driver_done                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finalizes a given CID driver.                                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    driver :: A handle to the target CID driver.                       */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  cid_driver_done( FT_Module  driver )\n  {\n    FT_UNUSED( driver );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidobjs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidobjs.h                                                              */\n/*                                                                         */\n/*    CID objects manager (specification).                                 */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2004, 2006 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CIDOBJS_H__\n#define __CIDOBJS_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_CONFIG_CONFIG_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /* The following structures must be defined by the hinter */\n  typedef struct CID_Size_Hints_   CID_Size_Hints;\n  typedef struct CID_Glyph_Hints_  CID_Glyph_Hints;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    CID_Driver                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a Type 1 driver object.                                */\n  /*                                                                       */\n  typedef struct CID_DriverRec_*  CID_Driver;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    CID_Size                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a Type 1 size object.                                  */\n  /*                                                                       */\n  typedef struct CID_SizeRec_*  CID_Size;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    CID_GlyphSlot                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a Type 1 glyph slot object.                            */\n  /*                                                                       */\n  typedef struct CID_GlyphSlotRec_*  CID_GlyphSlot;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    CID_CharMap                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a Type 1 character mapping object.                     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The Type 1 format doesn't use a charmap but an encoding table.     */\n  /*    The driver is responsible for making up charmap objects            */\n  /*    corresponding to these tables.                                     */\n  /*                                                                       */\n  typedef struct CID_CharMapRec_*  CID_CharMap;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* HERE BEGINS THE TYPE 1 SPECIFIC STUFF                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  typedef struct  CID_SizeRec_\n  {\n    FT_SizeRec  root;\n    FT_Bool     valid;\n\n  } CID_SizeRec;\n\n\n  typedef struct  CID_GlyphSlotRec_\n  {\n    FT_GlyphSlotRec  root;\n\n    FT_Bool          hint;\n    FT_Bool          scaled;\n\n    FT_Fixed         x_scale;\n    FT_Fixed         y_scale;\n\n  } CID_GlyphSlotRec;\n\n\n  FT_LOCAL( void )\n  cid_slot_done( FT_GlyphSlot  slot );\n\n  FT_LOCAL( FT_Error )\n  cid_slot_init( FT_GlyphSlot  slot );\n\n\n  FT_LOCAL( void )\n  cid_size_done( FT_Size  size );       /* CID_Size */\n\n  FT_LOCAL( FT_Error )\n  cid_size_init( FT_Size  size );       /* CID_Size */\n\n  FT_LOCAL( FT_Error )\n  cid_size_request( FT_Size          size,      /* CID_Size */\n                    FT_Size_Request  req );\n\n  FT_LOCAL( FT_Error )\n  cid_face_init( FT_Stream      stream,\n                 FT_Face        face,           /* CID_Face */\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params );\n\n  FT_LOCAL( void )\n  cid_face_done( FT_Face  face );               /* CID_Face */\n\n\n  FT_LOCAL( FT_Error )\n  cid_driver_init( FT_Module  driver );\n\n  FT_LOCAL( void )\n  cid_driver_done( FT_Module  driver );\n\n\nFT_END_HEADER\n\n#endif /* __CIDOBJS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidparse.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidparse.c                                                             */\n/*                                                                         */\n/*    CID-keyed Type1 parser (body).                                       */\n/*                                                                         */\n/*  Copyright 1996-2007, 2009, 2013, 2014 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_STREAM_H\n\n#include \"cidparse.h\"\n\n#include \"ciderrs.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_cidparse\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    INPUT STREAM PARSER                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_LOCAL_DEF( FT_Error )\n  cid_parser_new( CID_Parser*    parser,\n                  FT_Stream      stream,\n                  FT_Memory      memory,\n                  PSAux_Service  psaux )\n  {\n    FT_Error  error;\n    FT_ULong  base_offset, offset, ps_len;\n    FT_Byte   *cur, *limit;\n    FT_Byte   *arg1, *arg2;\n\n\n    FT_MEM_ZERO( parser, sizeof ( *parser ) );\n    psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory );\n\n    parser->stream = stream;\n\n    base_offset = FT_STREAM_POS();\n\n    /* first of all, check the font format in the header */\n    if ( FT_FRAME_ENTER( 31 ) )\n      goto Exit;\n\n    if ( ft_strncmp( (char *)stream->cursor,\n                     \"%!PS-Adobe-3.0 Resource-CIDFont\", 31 ) )\n    {\n      FT_TRACE2(( \"  not a CID-keyed font\\n\" ));\n      error = FT_THROW( Unknown_File_Format );\n    }\n\n    FT_FRAME_EXIT();\n    if ( error )\n      goto Exit;\n\n  Again:\n    /* now, read the rest of the file until we find */\n    /* `StartData' or `/sfnts'                      */\n    {\n      FT_Byte   buffer[256 + 10];\n      FT_Long   read_len = 256 + 10; /* same as signed FT_Stream->size */\n      FT_Byte*  p        = buffer;\n\n\n      for ( offset = FT_STREAM_POS(); ; offset += 256 )\n      {\n        FT_Long  stream_len; /* same as signed FT_Stream->size */\n\n\n        stream_len = stream->size - FT_STREAM_POS();\n        if ( stream_len == 0 )\n        {\n          FT_TRACE2(( \"cid_parser_new: no `StartData' keyword found\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        read_len = FT_MIN( read_len, stream_len );\n        if ( FT_STREAM_READ( p, read_len ) )\n          goto Exit;\n\n        if ( read_len < 256 )\n          p[read_len]  = '\\0';\n\n        limit = p + read_len - 10;\n\n        for ( p = buffer; p < limit; p++ )\n        {\n          if ( p[0] == 'S' && ft_strncmp( (char*)p, \"StartData\", 9 ) == 0 )\n          {\n            /* save offset of binary data after `StartData' */\n            offset += (FT_ULong)( p - buffer + 10 );\n            goto Found;\n          }\n          else if ( p[1] == 's' && ft_strncmp( (char*)p, \"/sfnts\", 6 ) == 0 )\n          {\n            offset += (FT_ULong)( p - buffer + 7 );\n            goto Found;\n          }\n        }\n\n        FT_MEM_MOVE( buffer, p, 10 );\n        read_len = 256;\n        p = buffer + 10;\n      }\n    }\n\n  Found:\n    /* We have found the start of the binary data or the `/sfnts' token. */\n    /* Now rewind and extract the frame corresponding to this PostScript */\n    /* section.                                                          */\n\n    ps_len = offset - base_offset;\n    if ( FT_STREAM_SEEK( base_offset )                  ||\n         FT_FRAME_EXTRACT( ps_len, parser->postscript ) )\n      goto Exit;\n\n    parser->data_offset    = offset;\n    parser->postscript_len = ps_len;\n    parser->root.base      = parser->postscript;\n    parser->root.cursor    = parser->postscript;\n    parser->root.limit     = parser->root.cursor + ps_len;\n    parser->num_dict       = -1;\n\n    /* Finally, we check whether `StartData' or `/sfnts' was real --  */\n    /* it could be in a comment or string.  We also get the arguments */\n    /* of `StartData' to find out whether the data is represented in  */\n    /* binary or hex format.                                          */\n\n    arg1 = parser->root.cursor;\n    cid_parser_skip_PS_token( parser );\n    cid_parser_skip_spaces  ( parser );\n    arg2 = parser->root.cursor;\n    cid_parser_skip_PS_token( parser );\n    cid_parser_skip_spaces  ( parser );\n\n    limit = parser->root.limit;\n    cur   = parser->root.cursor;\n\n    while ( cur < limit )\n    {\n      if ( parser->root.error )\n      {\n        error = parser->root.error;\n        goto Exit;\n      }\n\n      if ( cur[0] == 'S' && ft_strncmp( (char*)cur, \"StartData\", 9 ) == 0 )\n      {\n        if ( ft_strncmp( (char*)arg1, \"(Hex)\", 5 ) == 0 )\n          parser->binary_length = ft_atol( (const char *)arg2 );\n\n        goto Exit;\n      }\n      else if ( cur[1] == 's' && ft_strncmp( (char*)cur, \"/sfnts\", 6 ) == 0 )\n      {\n        FT_TRACE2(( \"cid_parser_new: cannot handle Type 11 fonts\\n\" ));\n        error = FT_THROW( Unknown_File_Format );\n        goto Exit;\n      }\n\n      cid_parser_skip_PS_token( parser );\n      cid_parser_skip_spaces  ( parser );\n      arg1 = arg2;\n      arg2 = cur;\n      cur  = parser->root.cursor;\n    }\n\n    /* we haven't found the correct `StartData'; go back and continue */\n    /* searching                                                      */\n    FT_FRAME_RELEASE( parser->postscript );\n    if ( !FT_STREAM_SEEK( offset ) )\n      goto Again;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  cid_parser_done( CID_Parser*  parser )\n  {\n    /* always free the private dictionary */\n    if ( parser->postscript )\n    {\n      FT_Stream  stream = parser->stream;\n\n\n      FT_FRAME_RELEASE( parser->postscript );\n    }\n    parser->root.funcs.done( &parser->root );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidparse.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidparse.h                                                             */\n/*                                                                         */\n/*    CID-keyed Type1 parser (specification).                              */\n/*                                                                         */\n/*  Copyright 1996-2004, 2014 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CIDPARSE_H__\n#define __CIDPARSE_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_TYPE1_TYPES_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_Parser                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A CID_Parser is an object used to parse a Type 1 fonts very        */\n  /*    quickly.                                                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root           :: The root PS_ParserRec fields.                    */\n  /*                                                                       */\n  /*    stream         :: The current input stream.                        */\n  /*                                                                       */\n  /*    postscript     :: A pointer to the data to be parsed.              */\n  /*                                                                       */\n  /*    postscript_len :: The length of the data to be parsed.             */\n  /*                                                                       */\n  /*    data_offset    :: The start position of the binary data (i.e., the */\n  /*                      end of the data to be parsed.                    */\n  /*                                                                       */\n  /*    binary_length  :: The length of the data after the `StartData'     */\n  /*                      command if the data format is hexadecimal.       */\n  /*                                                                       */\n  /*    cid            :: A structure which holds the information about    */\n  /*                      the current font.                                */\n  /*                                                                       */\n  /*    num_dict       :: The number of font dictionaries.                 */\n  /*                                                                       */\n  typedef struct  CID_Parser_\n  {\n    PS_ParserRec  root;\n    FT_Stream     stream;\n\n    FT_Byte*      postscript;\n    FT_Long       postscript_len;\n\n    FT_ULong      data_offset;\n\n    FT_Long       binary_length;\n\n    CID_FaceInfo  cid;\n    FT_Int        num_dict;\n\n  } CID_Parser;\n\n\n  FT_LOCAL( FT_Error )\n  cid_parser_new( CID_Parser*    parser,\n                  FT_Stream      stream,\n                  FT_Memory      memory,\n                  PSAux_Service  psaux );\n\n  FT_LOCAL( void )\n  cid_parser_done( CID_Parser*  parser );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                            PARSING ROUTINES                           */\n  /*                                                                       */\n  /*************************************************************************/\n\n#define cid_parser_skip_spaces( p )                 \\\n          (p)->root.funcs.skip_spaces( &(p)->root )\n#define cid_parser_skip_PS_token( p )                 \\\n          (p)->root.funcs.skip_PS_token( &(p)->root )\n\n#define cid_parser_to_int( p )       (p)->root.funcs.to_int( &(p)->root )\n#define cid_parser_to_fixed( p, t )  (p)->root.funcs.to_fixed( &(p)->root, t )\n\n#define cid_parser_to_coord_array( p, m, c )                 \\\n          (p)->root.funcs.to_coord_array( &(p)->root, m, c )\n#define cid_parser_to_fixed_array( p, m, f, t )                 \\\n          (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )\n#define cid_parser_to_token( p, t )                 \\\n          (p)->root.funcs.to_token( &(p)->root, t )\n#define cid_parser_to_token_array( p, t, m, c )                 \\\n          (p)->root.funcs.to_token_array( &(p)->root, t, m, c )\n\n#define cid_parser_load_field( p, f, o )                       \\\n          (p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )\n#define cid_parser_load_field_table( p, f, o )                       \\\n          (p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )\n\n\nFT_END_HEADER\n\n#endif /* __CIDPARSE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidriver.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidriver.c                                                             */\n/*                                                                         */\n/*    CID driver interface (body).                                         */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include \"cidriver.h\"\n#include \"cidgload.h\"\n#include FT_INTERNAL_DEBUG_H\n\n#include \"ciderrs.h\"\n\n#include FT_SERVICE_POSTSCRIPT_NAME_H\n#include FT_SERVICE_XFREE86_NAME_H\n#include FT_SERVICE_POSTSCRIPT_INFO_H\n#include FT_SERVICE_CID_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ciddriver\n\n\n  /*\n   *  POSTSCRIPT NAME SERVICE\n   *\n   */\n\n  static const char*\n  cid_get_postscript_name( CID_Face  face )\n  {\n    const char*  result = face->cid.cid_font_name;\n\n\n    if ( result && result[0] == '/' )\n      result++;\n\n    return result;\n  }\n\n\n  static const FT_Service_PsFontNameRec  cid_service_ps_name =\n  {\n    (FT_PsName_GetFunc) cid_get_postscript_name\n  };\n\n\n  /*\n   *  POSTSCRIPT INFO SERVICE\n   *\n   */\n\n  static FT_Error\n  cid_ps_get_font_info( FT_Face          face,\n                        PS_FontInfoRec*  afont_info )\n  {\n    *afont_info = ((CID_Face)face)->cid.font_info;\n\n    return FT_Err_Ok;\n  }\n\n  static FT_Error\n  cid_ps_get_font_extra( FT_Face          face,\n                        PS_FontExtraRec*  afont_extra )\n  {\n    *afont_extra = ((CID_Face)face)->font_extra;\n\n    return FT_Err_Ok;\n  }\n\n  static const FT_Service_PsInfoRec  cid_service_ps_info =\n  {\n    (PS_GetFontInfoFunc)   cid_ps_get_font_info,\n    (PS_GetFontExtraFunc)  cid_ps_get_font_extra,\n    (PS_HasGlyphNamesFunc) NULL,        /* unsupported with CID fonts */\n    (PS_GetFontPrivateFunc)NULL,        /* unsupported                */\n    (PS_GetFontValueFunc)  NULL         /* not implemented            */\n  };\n\n\n  /*\n   *  CID INFO SERVICE\n   *\n   */\n  static FT_Error\n  cid_get_ros( CID_Face      face,\n               const char*  *registry,\n               const char*  *ordering,\n               FT_Int       *supplement )\n  {\n    CID_FaceInfo  cid = &face->cid;\n\n\n    if ( registry )\n      *registry = cid->registry;\n\n    if ( ordering )\n      *ordering = cid->ordering;\n\n    if ( supplement )\n      *supplement = cid->supplement;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  cid_get_is_cid( CID_Face  face,\n                  FT_Bool  *is_cid )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_UNUSED( face );\n\n\n    if ( is_cid )\n      *is_cid = 1; /* cid driver is only used for CID keyed fonts */\n\n    return error;\n  }\n\n\n  static FT_Error\n  cid_get_cid_from_glyph_index( CID_Face  face,\n                                FT_UInt   glyph_index,\n                                FT_UInt  *cid )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_UNUSED( face );\n\n\n    if ( cid )\n      *cid = glyph_index; /* identity mapping */\n\n    return error;\n  }\n\n\n  static const FT_Service_CIDRec  cid_service_cid_info =\n  {\n     (FT_CID_GetRegistryOrderingSupplementFunc)cid_get_ros,\n     (FT_CID_GetIsInternallyCIDKeyedFunc)      cid_get_is_cid,\n     (FT_CID_GetCIDFromGlyphIndexFunc)         cid_get_cid_from_glyph_index\n  };\n\n\n  /*\n   *  SERVICE LIST\n   *\n   */\n\n  static const FT_ServiceDescRec  cid_services[] =\n  {\n    { FT_SERVICE_ID_XF86_NAME,            FT_XF86_FORMAT_CID },\n    { FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &cid_service_ps_name },\n    { FT_SERVICE_ID_POSTSCRIPT_INFO,      &cid_service_ps_info },\n    { FT_SERVICE_ID_CID,                  &cid_service_cid_info },\n    { NULL, NULL }\n  };\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  cid_get_interface( FT_Module    module,\n                     const char*  cid_interface )\n  {\n    FT_UNUSED( module );\n\n    return ft_service_list_lookup( cid_services, cid_interface );\n  }\n\n\n\n  FT_CALLBACK_TABLE_DEF\n  const FT_Driver_ClassRec  t1cid_driver_class =\n  {\n    /* first of all, the FT_Module_Class fields */\n    {\n      FT_MODULE_FONT_DRIVER       |\n      FT_MODULE_DRIVER_SCALABLE   |\n      FT_MODULE_DRIVER_HAS_HINTER,\n\n      sizeof ( FT_DriverRec ),\n      \"t1cid\",   /* module name           */\n      0x10000L,  /* version 1.0 of driver */\n      0x20000L,  /* requires FreeType 2.0 */\n\n      0,\n\n      cid_driver_init,\n      cid_driver_done,\n      cid_get_interface\n    },\n\n    /* then the other font drivers fields */\n    sizeof ( CID_FaceRec ),\n    sizeof ( CID_SizeRec ),\n    sizeof ( CID_GlyphSlotRec ),\n\n    cid_face_init,\n    cid_face_done,\n\n    cid_size_init,\n    cid_size_done,\n    cid_slot_init,\n    cid_slot_done,\n\n    cid_slot_load_glyph,\n\n    0,                      /* FT_Face_GetKerningFunc  */\n    0,                      /* FT_Face_AttachFunc      */\n\n    0,                      /* FT_Face_GetAdvancesFunc */\n\n    cid_size_request,\n    0                       /* FT_Size_SelectFunc      */\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidriver.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidriver.h                                                             */\n/*                                                                         */\n/*    High-level CID driver interface (specification).                     */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __CIDRIVER_H__\n#define __CIDRIVER_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n\n  FT_CALLBACK_TABLE\n  const FT_Driver_ClassRec  t1cid_driver_class;\n\n\nFT_END_HEADER\n\n#endif /* __CIDRIVER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/cidtoken.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  cidtoken.h                                                             */\n/*                                                                         */\n/*    CID token definitions (specification only).                          */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  CID_FaceInfoRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_CID_INFO\n\n  T1_FIELD_KEY   ( \"CIDFontName\",    cid_font_name, 0 )\n  T1_FIELD_FIXED ( \"CIDFontVersion\", cid_version,   0 )\n  T1_FIELD_NUM   ( \"CIDFontType\",    cid_font_type, 0 )\n  T1_FIELD_STRING( \"Registry\",       registry,      0 )\n  T1_FIELD_STRING( \"Ordering\",       ordering,      0 )\n  T1_FIELD_NUM   ( \"Supplement\",     supplement,    0 )\n  T1_FIELD_NUM   ( \"UIDBase\",        uid_base,      0 )\n  T1_FIELD_NUM   ( \"CIDMapOffset\",   cidmap_offset, 0 )\n  T1_FIELD_NUM   ( \"FDBytes\",        fd_bytes,      0 )\n  T1_FIELD_NUM   ( \"GDBytes\",        gd_bytes,      0 )\n  T1_FIELD_NUM   ( \"CIDCount\",       cid_count,     0 )\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PS_FontInfoRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FONT_INFO\n\n  T1_FIELD_STRING( \"version\",            version,             0 )\n  T1_FIELD_STRING( \"Notice\",             notice,              0 )\n  T1_FIELD_STRING( \"FullName\",           full_name,           0 )\n  T1_FIELD_STRING( \"FamilyName\",         family_name,         0 )\n  T1_FIELD_STRING( \"Weight\",             weight,              0 )\n  T1_FIELD_NUM   ( \"ItalicAngle\",        italic_angle,        0 )\n  T1_FIELD_BOOL  ( \"isFixedPitch\",       is_fixed_pitch,      0 )\n  T1_FIELD_NUM   ( \"UnderlinePosition\",  underline_position,  0 )\n  T1_FIELD_NUM   ( \"UnderlineThickness\", underline_thickness, 0 )\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PS_FontExtraRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FONT_EXTRA\n\n  T1_FIELD_NUM   ( \"FSType\",             fs_type,             0 )\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  CID_FaceDictRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FONT_DICT\n\n  T1_FIELD_NUM  ( \"PaintType\",          paint_type,          0 )\n  T1_FIELD_NUM  ( \"FontType\",           font_type,           0 )\n  T1_FIELD_NUM  ( \"SubrMapOffset\",      subrmap_offset,      0 )\n  T1_FIELD_NUM  ( \"SDBytes\",            sd_bytes,            0 )\n  T1_FIELD_NUM  ( \"SubrCount\",          num_subrs,           0 )\n  T1_FIELD_NUM  ( \"lenBuildCharArray\",  len_buildchar,       0 )\n  T1_FIELD_FIXED( \"ForceBoldThreshold\", forcebold_threshold, 0 )\n  T1_FIELD_FIXED( \"StrokeWidth\",        stroke_width,        0 )\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PS_PrivateRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_PRIVATE\n\n  T1_FIELD_NUM       ( \"UniqueID\",         unique_id,      0 )\n  T1_FIELD_NUM       ( \"lenIV\",            lenIV,          0 )\n  T1_FIELD_NUM       ( \"LanguageGroup\",    language_group, 0 )\n  T1_FIELD_NUM       ( \"password\",         password,       0 )\n\n  T1_FIELD_FIXED_1000( \"BlueScale\",        blue_scale,     0 )\n  T1_FIELD_NUM       ( \"BlueShift\",        blue_shift,     0 )\n  T1_FIELD_NUM       ( \"BlueFuzz\",         blue_fuzz,      0 )\n\n  T1_FIELD_NUM_TABLE ( \"BlueValues\",       blue_values,        14, 0 )\n  T1_FIELD_NUM_TABLE ( \"OtherBlues\",       other_blues,        10, 0 )\n  T1_FIELD_NUM_TABLE ( \"FamilyBlues\",      family_blues,       14, 0 )\n  T1_FIELD_NUM_TABLE ( \"FamilyOtherBlues\", family_other_blues, 10, 0 )\n\n  T1_FIELD_NUM_TABLE2( \"StdHW\",            standard_width,      1, 0 )\n  T1_FIELD_NUM_TABLE2( \"StdVW\",            standard_height,     1, 0 )\n  T1_FIELD_NUM_TABLE2( \"MinFeature\",       min_feature,         2, 0 )\n\n  T1_FIELD_NUM_TABLE ( \"StemSnapH\",        snap_widths,        12, 0 )\n  T1_FIELD_NUM_TABLE ( \"StemSnapV\",        snap_heights,       12, 0 )\n\n  T1_FIELD_BOOL      ( \"ForceBold\",        force_bold,          0 )\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  FT_BBox\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_BBOX\n\n  T1_FIELD_BBOX( \"FontBBox\", xMin, 0 )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/cid/type1cid.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  type1cid.c                                                             */\n/*                                                                         */\n/*    FreeType OpenType driver component (body only).                      */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"cidparse.c\"\n#include \"cidload.c\"\n#include \"cidobjs.c\"\n#include \"cidriver.c\"\n#include \"cidgload.c\"\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/README",
    "content": "gxvalid: TrueType GX validator\n==============================\n\n\n1. What is this\n---------------\n\n  `gxvalid' is a module to  validate TrueType GX tables: a collection of\n  additional tables  in TrueType  font which are  used by  `QuickDraw GX\n  Text',  Apple Advanced  Typography  (AAT).  In  addition, gxvalid  can\n  validates `kern'  tables which have  been extended for AAT.   Like the\n  otvalid  module,   gxvalid  uses  Freetype   2's  validator  framework\n  (ftvalid).\n\n  You can link gxvalid with your program; before running your own layout\n  engine, gxvalid validates a font  file.  As the result, you can remove\n  error-checking code  from the layout  engine.  It is also  possible to\n  use  gxvalid  as a  stand-alone  font  validator;  the `ftvalid'  test\n  program  included  in the  ft2demo  bundle  calls gxvalid  internally.\n  A stand-alone font validator may be useful for font developers.\n\n  This documents documents the following issues.\n\n  - supported TrueType GX tables\n  - fundamental validation limitations\n  - permissive error handling of broken GX tables\n  - `kern' table issue.\n\n\n2. Supported tables\n-------------------\n\n  The following GX tables are currently supported.\n\n    bsln\n    feat\n    just\n    kern(*)\n    lcar\n    mort\n    morx\n    opbd\n    prop\n    trak\n\n  The following GX tables are currently unsupported.\n\n    cvar\n    fdsc\n    fmtx\n    fvar\n    gvar\n    Zapf\n\n  The following GX tables won't be supported.\n\n    acnt(**)\n    hsty(***)\n\n  The following undocumented tables in TrueType fonts designed for Apple\n  platform aren't handled either.\n\n    addg\n    CVTM\n    TPNM\n    umif\n\n\n  *)   The `kern'  validator handles both  the classic and the  new kern\n       formats;  the former  is supported  on both  Microsoft  and Apple\n       platforms, while the latter is supported on Apple platforms.\n\n  **)  `acnt' tables are not supported by currently available Apple font\n       tools.\n\n  ***) There  is  one more  Apple  extension,  `hsty',  but  it  is  for\n       Newton-OS, not GX  (Newton-OS is a platform by  Apple, but it can\n       use  sfnt- housed bitmap  fonts only).   Therefore, it  should be\n       excluded  from  `Apple  platform'  in the  context  of  TrueType.\n       gxvalid ignores it as Apple font tools do so.\n\n\n  We have  checked 183  fonts bundled with  MacOS 9.1, MacOS  9.2, MacOS\n  10.0, MacOS X 10.1, MSIE  for MacOS, and AppleWorks 6.0.  In addition,\n  we have  checked 67 Dynalab fonts  (designed for MacOS)  and 189 Ricoh\n  fonts (designed for Windows and  MacOS dual platforms).  The number of\n  fonts including TrueType GX tables are as follows.\n\n    bsln:  76\n    feat: 191\n    just:  84\n    kern:  59\n    lcar:   4\n    mort: 326\n    morx:  19\n    opbd:   4\n    prop: 114\n    trak:  16\n\n  Dynalab  and Ricoh fonts  don't have  GX tables  except of  `feat' and\n  `mort'.\n\n\n3. Fundamental validation limitations\n-------------------------------------\n\n  TrueType  GX  provides  layout   information  to  libraries  for  font\n  rasterizers  and text layout.   gxvalid can  check whether  the layout\n  data in  a font is conformant  to the TrueType GX  format specified by\n  Apple.  But gxvalid cannot check  a how QuickDraw GX/AAT renderer uses\n  the stored information.\n\n  3-1. Validation of State Machine activity\n  -----------------------------------------\n\n    QuickDraw GX/AAT uses a `State Machine' to provide `stateful' layout\n    features,  and TrueType GX  stores the  state transition  diagram of\n    this `State  Machine' in a  `StateTable' data structure.   While the\n    State  Machine receives  a series  of glyph  IDs, the  State Machine\n    starts with `start  of text' state, walks around  various states and\n    generates various  layout information  to the  renderer, and finally\n    reaches the `end of text' state.\n\n    gxvalid can check essential errors like:\n\n      - possibility of state transitions to undefined states\n      - existence of glyph  IDs that the State Machine  doesn't know how\n        to handle\n      - the  State Machine  cannot compute  the layout  information from\n        given diagram\n\n    These errors  can be  checked within finite  steps, and  without the\n    State Machine itself, because these are `expression' errors of state\n    transition diagram.\n\n    There  is no  limitation  about  how long  the  State Machine  walks\n    around,  so validation  of  the algorithm  in  the state  transition\n    diagram requires infinite  steps, even if we had  a State Machine in\n    gxvalid.   Therefore, the  following errors  and problems  cannot be\n    checked.\n\n      - existence of states which the State Machine never transits to\n      - the  possibility that the  State Machine  never reaches  `end of\n        text'\n      - the possibility of stack underflow/overflow in the State Machine\n        (in  ligature  and  contextual  glyph substitutions,  the  State\n        Machine can store 16 glyphs onto its stack)\n\n    In addition, gxvalid doesn't check `temporary glyph IDs' used in the\n    chained State Machines  (in `mort' and `morx' tables).   If a layout\n    feature  is  implemented by  a  single  State  Machine, a  glyph  ID\n    converted by the State Machine is passed to the glyph renderer, thus\n    it  should not  point to  an undefined  glyph ID.   But if  a layout\n    feature is implemented by  chained State Machines, a component State\n    Machine  (if it  is  not the  final  one) is  permitted to  generate\n    undefined glyph IDs for temporary use, because it is handled by next\n    component State Machine and not  by the glyph renderer.  To validate\n    such temporary glyph IDs, gxvalid must stack all undefined glyph IDs\n    which  can occur in  the output  of the  previous State  Machine and\n    search  them in  the  `ClassTable' structure  of  the current  State\n    Machine.  It is too complex to  list all possible glyph IDs from the\n    StateTable, especially from a ligature substitution table.\n\n  3-2. Validation of relationship between multiple layout features\n  ----------------------------------------------------------------\n\n    gxvalid does  not validate the relationship  between multiple layout\n    features at all.\n\n    If  multiple layout  features  are defined  in  TrueType GX  tables,\n    possible  interactions,  overrides,  and  conflicts  between  layout\n    features are implicitly  given in the font too.   For example, there\n    are several predefined spacing control features:\n\n      - Text Spacing          (Proportional/Monospace/Half-width/Normal)\n      - Number Spacing        (Monospaced-numbers/Proportional-numbers)\n      - Kana Spacing          (Full-width/Proportional)\n      - Ideographic Spacing   (Full-width/Proportional)\n      - CJK Roman Spacing     (Half-width/Proportional/Default-roman\n                               /Full-width-roman/Proportional)\n\n    If all  layout features are  independently managed, we  can activate\n    inconsistent  typographic rules  like  `Text Spacing=Monospace'  and\n    `Ideographic Spacing=Proportional' at the same time.\n\n    The combinations  of layout features  is managed by a  32bit integer\n    (one bit each for selector  setting), so we can define relationships\n    between  up  to 32  features,  theoretically.   But  if one  feature\n    setting  affects  another   feature  setting,  we  need  typographic\n    priority  rules to  validate the  relationship.   Unfortunately, the\n    TrueType GX format specification does not give such information even\n    for predefined features.\n\n\n4. Permissive error handling of broken GX tables\n------------------------------------------------\n\n  When  Apple's font  rendering system  finds an  inconsistency,  like a\n  specification  violation or  an  unspecified value  in  a TrueType  GX\n  table, it does not always  return error.  In most cases, the rendering\n  engine silently  ignores such wrong  values or even whole  tables.  In\n  fact, MacOS is shipped with  fonts including broken GX/AAT tables, but\n  no harmful  effects due to  `officially broken' fonts are  observed by\n  end-users.\n\n  gxvalid  is designed  to continue  the validation  process as  long as\n  possible.  When gxvalid find wrong  values, gxvalid warns it at least,\n  and takes  a fallback procedure  if possible.  The  fallback procedure\n  depends on the debug level.\n\n  We used the following three tools to investigate Apple's error handling.\n\n    - FontValidator  (for MacOS 8.5 - 9.2)  resource fork font\n    - ftxvalidator   (for MacOS X 10.1 -)   dfont or naked-sfnt\n    - ftxdumperfuser (for MacOS X 10.1 -)   dfont or naked-sfnt\n\n  However, all tests were done on a PowerPC based Macintosh; at present,\n  we have not checked those tools on a m68k-based Macintosh.\n\n  In total, we checked 183 fonts  bundled to MacOS 9.1, MacOS 9.2, MacOS\n  10.0, MacOS X  10.1, MSIE for MacOS, and  AppleWorks 6.0.  These fonts\n  are distributed  officially, but many broken GX/AAT  tables were found\n  by Apple's font tools.  In the following, we list typical violation of\n  the GX specification, in fonts officially distributed with those Apple\n  systems.\n\n  4-1. broken BinSrchHeader (19/183)\n  ----------------------------------\n\n    `BinSrchHeader' is  a header of a  data array for  m68k platforms to\n    access memory efficiently.  Although  there are only two independent\n    parameters  for real  (`unitSize' and  `nUnits'),  BinSrchHeader has\n    three additional parameters which  can be calculated from `unitSize'\n    and  `nUnits',  for  fast  setup.   Apple  font  tools  ignore  them\n    silently, so gxvalid warns if it finds and inconsistency, and always\n    continues  validation.    The  additional  parameters   are  ignored\n    regardless of the consistency.\n\n      19  fonts include  such  inconsistencies; all  breaks  are in  the\n      BinSrchHeader structure of the `kern' table.\n\n  4-2. too-short LookupTable (5/183)\n  ----------------------------------\n\n    LookupTable format 0  is a simple array to get a  value from a given\n    GID (glyph  ID); the index of  this array is a  GID too.  Therefore,\n    the length  of the array is expected  to be same as  the maximum GID\n    value defined  in the `maxp' table,  but there are  some fonts whose\n    LookupTable format 0 is too  short to cover all GIDs.  FontValidator\n    ignores  this error silently,  ftxvalidator and  ftxdumperfuser both\n    warn and continue.  Similar problems are found in format 3 subtables\n    of `kern'.  gxvalid  warns always and abort if  the validation level\n    is set to FT_VALIDATE_PARANOID.\n\n      5 fonts include too-short kern format 0 subtables.\n      1 font includes too-short kern format 3 subtable.\n\n  4-3. broken LookupTable format 2 (1/183)\n  ----------------------------------------\n\n    LookupTable  format  2,  subformat  4  covers the  GID  space  by  a\n    collection  of  segments which  are  specified  by `firstGlyph'  and\n    `lastGlyph'.   Some  fonts  store  `firstGlyph' and  `lastGlyph'  in\n    reverse order,  so the segment specification is  broken.  Apple font\n    tools ignore this error silently;  a broken segment is ignored as if\n    it  did not  exist.   gxvalid  warns and  normalize  the segment  at\n    FT_VALIDATE_DEFAULT, or ignore  the segment at FT_VALIDATE_TIGHT, or\n    abort at FT_VALIDATE_PARANOID.\n\n      1 font includes broken LookupTable format 2, in the `just' table.\n\n    *) It seems  that all fonts manufactured by  ITC for AppleWorks have\n       this error.\n\n  4-4. bad bracketing in glyph property (14/183)\n  ----------------------------------------------\n\n    GX/AAT defines a  `bracketing' property of the glyphs  in the `prop'\n    table,  to control layout  features of  strings enclosed  inside and\n    outside  of   brackets.   Some  fonts   give  inappropriate  bracket\n    properties  to glyphs.   Apple  font tools  warn  about this  error;\n    gxvalid warns too and aborts at FT_VALIDATE_PARANOID.\n\n      14 fonts include wrong bracket properties.\n\n\n  4-5. invalid feature number (117/183)\n  -------------------------------------\n\n    The GX/AAT extension can  include 255 different layout features, but\n    popular      layout      features      are      predefined      (see\n    http://developer.apple.com/fonts/Registry/index.html).   Some  fonts\n    include feature  numbers which are incompatible  with the predefined\n    feature registry.\n\n    In our survey, there are 140 fonts including `feat' table.\n\n    a) 67 fonts use a feature number which should not be used.\n    b) 117 fonts set the wrong feature range (nSetting).  This is mostly\n       found in the `mort' and `morx' tables.\n\n    Apple  font tools give  no warning,  although they  cannot recognize\n    what  the feature  is.   At FT_VALIDATE_DEFAULT,  gxvalid warns  but\n    continues in both cases (a, b).  At FT_VALIDATE_TIGHT, gxvalid warns\n    and aborts for (a), but continues for (b).  At FT_VALIDATE_PARANOID,\n    gxvalid warns and aborts in both cases (a, b).\n\n  4-6. invalid prop version (10/183)\n  ----------------------------------\n\n    As most TrueType GX tables, the `prop' table must start with a 32bit\n    version identifier: 0x00010000,  0x00020000 or 0x00030000.  But some\n    fonts  store nonsense binary  data instead.   When Apple  font tools\n    find them, they abort the processing immediately, and the data which\n    follows is unhandled.  gxvalid does the same.\n\n      10 fonts include broken `prop' version.\n\n    All  of these  fonts are  classic  TrueType fonts  for the  Japanese\n    script, manufactured by Apple.\n\n  4-7. unknown resource name (2/183)\n  ------------------------------------\n\n    NOTE: THIS IS NOT A TRUETYPE GX ERROR.\n\n    If  a TrueType  font is  stored  in the  resource fork  or in  dfont\n    format, the data must be tagged as `sfnt' in the resource fork index\n    to invoke TrueType font handler for the data.  But the TrueType font\n    data  in   `Keyboard.dfont'  is  tagged   as  `kbd',  and   that  in\n    `LastResort.dfont' is tagged as  `lst'.  Apple font tools can detect\n    that the data is in  TrueType format and successfully validate them.\n    Maybe  this is possible  because they  are known  to be  dfont.  The\n    current  implementation  of the  resource  fork  driver of  FreeType\n    cannot do that, thus gxvalid cannot validate them.\n\n      2 fonts use an unknown tag for the TrueType font resource.\n\n5. `kern' table issues\n----------------------\n\n  In common terminology of TrueType, `kern' is classified as a basic and\n  platform-independent table.  But there are Apple extensions of `kern',\n  and  there is  an  extension which  requires  a GX  state machine  for\n  contextual kerning.   Therefore, gxvalid includes  a special validator\n  for  `kern' tables.   Unfortunately, there  is no  exact  algorithm to\n  check Apple's extension, so  gxvalid includes a heuristic algorithm to\n  find  the proper validation  routines for  all possible  data formats,\n  including    the   data    format   for    Microsoft.     By   calling\n  classic_kern_validate() instead of gxv_validate(), you can specify the\n  `kern' format  explicitly.  However, current  FreeType2 uses Microsoft\n  `kern' format  only, others  are ignored (and  should be handled  in a\n  library one level higher than FreeType).\n\n  5-1. History\n  ------------\n\n    The original  16bit version of `kern'  was designed by  Apple in the\n    pre-GX  era, and  it was  also approved  by  Microsoft.  Afterwards,\n    Apple designed a  new 32bit version of the  `kern' table.  According\n    to  the documentation, the  difference between  the 16bit  and 32bit\n    version is only the size of  variables in the `kern' header.  In the\n    following,  we call  the original  16bit version  as  `classic', and\n    32bit version as `new'.\n\n  5-2. Versions and dialects which should be differentiated\n  ---------------------------------------------------------\n\n    The `kern' table  consists of a table header  and several subtables.\n    The version number  which identifies a `classic' or  a `new' version\n    is  explicitly   written  in  the   table  header,  but   there  are\n    undocumented  differences between  Microsoft's and  Apple's formats.\n    It is  called a `dialect' in  the following.  There  are three cases\n    which  should  be  handled:   the  new  Apple-dialect,  the  classic\n    Apple-dialect,  and the classic  Microsoft-dialect.  An  analysis of\n    the formats and the auto detection algorithm of gxvalid is described\n    in the following.\n\n    5-2-1. Version detection: classic and new kern\n    ----------------------------------------------\n\n      According  to Apple  TrueType  specification, there  are only  two\n      differences between the classic and the new:\n\n        - The `kern' table header starts with the version number.\n          The classic version starts with 0x0000 (16bit),\n          the new version starts with 0x00010000 (32bit).\n\n        - In the  `kern' table header,  the number of  subtables follows\n          the version number.\n          In the classic version, it is stored as a 16bit value.\n          In the new version, it is stored as a 32bit value.\n\n      From Apple font tool's output (DumpKERN is also tested in addition\n      to  the  three  Apple  font  tools in  above),  there  is  another\n      undocumented difference.  In the  new version, the subtable header\n      includes a 16bit variable  named `tupleIndex' which does not exist\n      in the classic version.\n\n      The new version  can store all subtable formats (0,  1, 2, and 3),\n      but the Apple TrueType specification does not mention the subtable\n      formats available in the classic version.\n\n    5-2-2. Available subtable formats in classic version\n    ----------------------------------------------------\n\n      Although the  Apple TrueType  specification recommends to  use the\n      classic version in  the case if the font is  designed for both the\n      Apple and Microsoft platforms,  it does not document the available\n      subtable formats in the classic version.\n\n      According  to the Microsoft  TrueType specification,  the subtable\n      format  assured for  Windows  and OS/2  support  is only  subtable\n      format  0.  The  Microsoft TrueType  specification  also describes\n      subtable format  2, but does  not mention which  platforms support\n      it.  Aubtable formats 1, 3,  and higher are documented as reserved\n      for future use.  Therefore, the classic version can store subtable\n      formats 0 and 2, at least.  `ttfdump.exe', a font tool provided by\n      Microsoft,  ignores the  subtable format  written in  the subtable\n      header, and parses the table as if all subtables are in format 0.\n\n      `kern'  subtable format  1  uses  a StateTable,  so  it cannot  be\n      utilized without a GX  State Machine.  Therefore, it is reasonable\n      to assume  that format 1 (and  3) were introduced  after Apple had\n      introduced GX and moved to the new 32bit version.\n\n    5-2-3. Apple and Microsoft dialects\n    -----------------------------------\n\n      The  `kern' subtable  has  a 16bit  `coverage'  field to  describe\n      kerning attributes, but bit interpretations by Apple and Microsoft\n      are different:  For example, Apple  uses bits 0-7 to  identify the\n      subtable, while Microsoft uses bits 8-15.\n\n      In  addition, due  to the  output of  DumpKERN  and FontValidator,\n      Apple's bit interpretations of coverage in classic and new version\n      are  incompatible also.   In  summary, there  are three  dialects:\n      classic Apple  dialect, classic  Microsoft dialect, and  new Apple\n      dialect.  The classic Microsoft  dialect and the new Apple dialect\n      are documented  by each vendors' TrueType  font specification, but\n      the documentation for classic Apple dialect is not available.\n\n      For example,  in the  new Apple dialect,  bit 15 is  documented as\n      `set to  1 if  the kerning  is vertical'.  On  the other  hand, in\n      classic Microsoft dialect, bit 1 is documented as `set to 1 if the\n      kerning  is  horizontal'.   From   the  outputs  of  DumpKERN  and\n      FontValidator, classic  Apple dialect recognizes  15 as `set  to 1\n      when  the kerning  is horizontal'.   From the  results  of similar\n      experiments, classic Apple dialect  seems to be the Endian reverse\n      of the classic Microsoft dialect.\n\n      As a  conclusion it must be  noted that no font  tool can identify\n      classic Apple dialect or classic Microsoft dialect automatically.\n\n    5-2-4. gxvalid auto dialect detection algorithm\n    -----------------------------------------------\n\n      The first 16  bits of the `kern' table are  enough to identify the\n      version:\n\n        - if  the first  16  bits are  0x0000,  the `kern'  table is  in\n          classic Apple dialect or classic Microsoft dialect\n        - if the first 16 bits are  0x0001, and next 16 bits are 0x0000,\n          the kern table is in new Apple dialect.\n\n      If the `kern'  table is a classic one,  the 16bit `coverage' field\n      is checked next.   Firstly, the coverage bits are  decoded for the\n      classic Apple dialect using the following bit masks (this is based\n      on DumpKERN output):\n\n        0x8000: 1=horizontal, 0=vertical\n        0x4000: not used\n        0x2000: 1=cross-stream, 0=normal\n        0x1FF0: reserved\n        0x000F: subtable format\n\n      If  any  of  reserved  bits  are  set  or  the  subtable  bits  is\n      interpreted as format 1 or 3, we take it as `impossible in classic\n      Apple dialect' and retry, using the classic Microsoft dialect.\n\n        The most popular coverage in new Apple-dialect:         0x8000,\n        The most popular coverage in classic Apple-dialect:     0x0000,\n        The most popular coverage in classic Microsoft dialect: 0x0001.\n\n  5-3. Tested fonts\n  -----------------\n\n    We checked  59 fonts  bundled with MacOS  and 38 fonts  bundled with\n    Windows, where all font include a `kern' table.\n\n      - fonts bundled with MacOS\n        * new Apple dialect\n          format 0: 18\n          format 2:  1\n          format 3:  1\n        * classic Apple dialect\n          format 0: 14\n        * classic Microsoft dialect\n          format 0: 15\n\n      - fonts bundled with Windows\n        * classic Microsoft dialect\n          format 0: 38\n\n    It looks strange that classic Microsoft-dialect fonts are bundled to\n    MacOS: they come from MSIE for MacOS, except of MarkerFelt.dfont.\n\n\n  ACKNOWLEDGEMENT\n  ---------------\n\n  Some parts of gxvalid are  derived from both the `gxlayout' module and\n  the `otvalid'  module.  Development of  gxlayout was supported  by the\n  Information-technology Promotion Agency(IPA), Japan.\n\n  The detailed analysis of undefined  glyph ID utilization in `mort' and\n  `morx' tables is provided by George Williams.\n\n------------------------------------------------------------------------\n\nCopyright 2004, 2005, 2007 by\nsuzuki toshiya, Masatake YAMATO, Red hat K.K.,\nDavid Turner, Robert Wilhelm, and Werner Lemberg.\n\nThis  file is  part  of the  FreeType  project, and  may  only be  used,\nmodified,  and  distributed under  the  terms  of  the FreeType  project\nlicense, LICENSE.TXT.  By continuing  to use, modify, or distribute this\nfile  you indicate that  you have  read the  license and  understand and\naccept it fully.\n\n\n--- end of README ---\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvalid.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvalid.c                                                              */\n/*                                                                         */\n/*    FreeType validator for TrueTypeGX/AAT tables (body only).            */\n/*                                                                         */\n/*  Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n\n#include \"gxvfeat.c\"\n#include \"gxvcommn.c\"\n#include \"gxvbsln.c\"\n#include \"gxvtrak.c\"\n#include \"gxvjust.c\"\n#include \"gxvmort.c\"\n#include \"gxvmort0.c\"\n#include \"gxvmort1.c\"\n#include \"gxvmort2.c\"\n#include \"gxvmort4.c\"\n#include \"gxvmort5.c\"\n#include \"gxvmorx.c\"\n#include \"gxvmorx0.c\"\n#include \"gxvmorx1.c\"\n#include \"gxvmorx2.c\"\n#include \"gxvmorx4.c\"\n#include \"gxvmorx5.c\"\n#include \"gxvkern.c\"\n#include \"gxvopbd.c\"\n#include \"gxvprop.c\"\n#include \"gxvlcar.c\"\n#include \"gxvmod.c\"\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvalid.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvalid.h                                                              */\n/*                                                                         */\n/*    TrueTyeeGX/AAT table validation (specification only).                */\n/*                                                                         */\n/*  Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __GXVALID_H__\n#define __GXVALID_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#include \"gxverror.h\"          /* must come before FT_INTERNAL_VALIDATE_H */\n\n#include FT_INTERNAL_VALIDATE_H\n#include FT_INTERNAL_STREAM_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( void )\n  gxv_feat_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n\n  FT_LOCAL( void )\n  gxv_bsln_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n\n  FT_LOCAL( void )\n  gxv_trak_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  gxv_just_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  gxv_mort_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  gxv_morx_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  gxv_kern_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  gxv_kern_validate_classic( FT_Bytes      table,\n                             FT_Face       face,\n                             FT_Int        dialect_flags,\n                             FT_Validator  valid );\n\n  FT_LOCAL( void )\n  gxv_opbd_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  gxv_prop_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  gxv_lcar_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  valid );\n\n\nFT_END_HEADER\n\n\n#endif /* __GXVALID_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvbsln.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvbsln.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT bsln table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvbsln\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      Data and Types                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define GXV_BSLN_VALUE_COUNT  32\n#define GXV_BSLN_VALUE_EMPTY  0xFFFFU\n\n\n  typedef struct  GXV_bsln_DataRec_\n  {\n    FT_Bytes   ctlPoints_p;\n    FT_UShort  defaultBaseline;\n\n  } GXV_bsln_DataRec, *GXV_bsln_Data;\n\n\n#define GXV_BSLN_DATA( field )  GXV_TABLE_DATA( bsln, field )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  gxv_bsln_LookupValue_validate( FT_UShort            glyph,\n                                 GXV_LookupValueCPtr  value_p,\n                                 GXV_Validator        gxvalid )\n  {\n    FT_UShort     v = value_p->u;\n    FT_UShort*    ctlPoints;\n\n    FT_UNUSED( glyph );\n\n\n    GXV_NAME_ENTER( \"lookup value\" );\n\n    if ( v >= GXV_BSLN_VALUE_COUNT )\n      FT_INVALID_DATA;\n\n    ctlPoints = (FT_UShort*)GXV_BSLN_DATA( ctlPoints_p );\n    if ( ctlPoints && ctlPoints[v] == GXV_BSLN_VALUE_EMPTY )\n      FT_INVALID_DATA;\n\n    GXV_EXIT;\n  }\n\n\n  /*\n    +===============+ --------+\n    | lookup header |         |\n    +===============+         |\n    | BinSrchHeader |         |\n    +===============+         |\n    | lastGlyph[0]  |         |\n    +---------------+         |\n    | firstGlyph[0] |         |    head of lookup table\n    +---------------+         |             +\n    | offset[0]     |    ->   |          offset            [byte]\n    +===============+         |             +\n    | lastGlyph[1]  |         | (glyphID - firstGlyph) * 2 [byte]\n    +---------------+         |\n    | firstGlyph[1] |         |\n    +---------------+         |\n    | offset[1]     |         |\n    +===============+         |\n                              |\n    ...                       |\n                              |\n    16bit value array         |\n    +===============+         |\n    |     value     | <-------+\n    ...\n  */\n\n  static GXV_LookupValueDesc\n  gxv_bsln_LookupFmt4_transit( FT_UShort            relative_gindex,\n                               GXV_LookupValueCPtr  base_value_p,\n                               FT_Bytes             lookuptbl_limit,\n                               GXV_Validator        gxvalid )\n  {\n    FT_Bytes             p;\n    FT_Bytes             limit;\n    FT_UShort            offset;\n    GXV_LookupValueDesc  value;\n\n    /* XXX: check range ? */\n    offset = (FT_UShort)( base_value_p->u +\n                          ( relative_gindex * sizeof ( FT_UShort ) ) );\n\n    p     = gxvalid->lookuptbl_head + offset;\n    limit = lookuptbl_limit;\n    GXV_LIMIT_CHECK( 2 );\n\n    value.u = FT_NEXT_USHORT( p );\n\n    return value;\n  }\n\n\n  static void\n  gxv_bsln_parts_fmt0_validate( FT_Bytes       tables,\n                                FT_Bytes       limit,\n                                GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = tables;\n\n\n    GXV_NAME_ENTER( \"parts format 0\" );\n\n    /* deltas */\n    GXV_LIMIT_CHECK( 2 * GXV_BSLN_VALUE_COUNT );\n\n    gxvalid->table_data = NULL;      /* No ctlPoints here. */\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_bsln_parts_fmt1_validate( FT_Bytes       tables,\n                                FT_Bytes       limit,\n                                GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = tables;\n\n\n    GXV_NAME_ENTER( \"parts format 1\" );\n\n    /* deltas */\n    gxv_bsln_parts_fmt0_validate( p, limit, gxvalid );\n\n    /* mappingData */\n    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;\n    gxvalid->lookupval_func   = gxv_bsln_LookupValue_validate;\n    gxvalid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;\n    gxv_LookupTable_validate( p + 2 * GXV_BSLN_VALUE_COUNT,\n                              limit,\n                              gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_bsln_parts_fmt2_validate( FT_Bytes       tables,\n                                FT_Bytes       limit,\n                                GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = tables;\n\n    FT_UShort  stdGlyph;\n    FT_UShort  ctlPoint;\n    FT_Int     i;\n\n    FT_UShort  defaultBaseline = GXV_BSLN_DATA( defaultBaseline );\n\n\n    GXV_NAME_ENTER( \"parts format 2\" );\n\n    GXV_LIMIT_CHECK( 2 + ( 2 * GXV_BSLN_VALUE_COUNT ) );\n\n    /* stdGlyph */\n    stdGlyph = FT_NEXT_USHORT( p );\n    GXV_TRACE(( \" (stdGlyph = %u)\\n\", stdGlyph ));\n\n    gxv_glyphid_validate( stdGlyph, gxvalid );\n\n    /* Record the position of ctlPoints */\n    GXV_BSLN_DATA( ctlPoints_p ) = p;\n\n    /* ctlPoints */\n    for ( i = 0; i < GXV_BSLN_VALUE_COUNT; i++ )\n    {\n      ctlPoint = FT_NEXT_USHORT( p );\n      if ( ctlPoint == GXV_BSLN_VALUE_EMPTY )\n      {\n        if ( i == defaultBaseline )\n          FT_INVALID_DATA;\n      }\n      else\n        gxv_ctlPoint_validate( stdGlyph, (FT_Short)ctlPoint, gxvalid );\n    }\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_bsln_parts_fmt3_validate( FT_Bytes       tables,\n                                FT_Bytes       limit,\n                                GXV_Validator  gxvalid)\n  {\n    FT_Bytes  p = tables;\n\n\n    GXV_NAME_ENTER( \"parts format 3\" );\n\n    /* stdGlyph + ctlPoints */\n    gxv_bsln_parts_fmt2_validate( p, limit, gxvalid );\n\n    /* mappingData */\n    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;\n    gxvalid->lookupval_func   = gxv_bsln_LookupValue_validate;\n    gxvalid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;\n    gxv_LookupTable_validate( p + ( 2 + 2 * GXV_BSLN_VALUE_COUNT ),\n                              limit,\n                              gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         bsln TABLE                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  gxv_bsln_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    GXV_ValidatorRec  gxvalidrec;\n    GXV_Validator     gxvalid = &gxvalidrec;\n\n    GXV_bsln_DataRec  bslnrec;\n    GXV_bsln_Data     bsln = &bslnrec;\n\n    FT_Bytes  p     = table;\n    FT_Bytes  limit = 0;\n\n    FT_ULong   version;\n    FT_UShort  format;\n    FT_UShort  defaultBaseline;\n\n    GXV_Validate_Func  fmt_funcs_table [] =\n    {\n      gxv_bsln_parts_fmt0_validate,\n      gxv_bsln_parts_fmt1_validate,\n      gxv_bsln_parts_fmt2_validate,\n      gxv_bsln_parts_fmt3_validate,\n    };\n\n\n    gxvalid->root       = ftvalid;\n    gxvalid->table_data = bsln;\n    gxvalid->face       = face;\n\n    FT_TRACE3(( \"validating `bsln' table\\n\" ));\n    GXV_INIT;\n\n\n    GXV_LIMIT_CHECK( 4 + 2 + 2 );\n    version         = FT_NEXT_ULONG( p );\n    format          = FT_NEXT_USHORT( p );\n    defaultBaseline = FT_NEXT_USHORT( p );\n\n    /* only version 1.0 is defined (1996) */\n    if ( version != 0x00010000UL )\n      FT_INVALID_FORMAT;\n\n    /* only format 1, 2, 3 are defined (1996) */\n    GXV_TRACE(( \" (format = %d)\\n\", format ));\n    if ( format > 3 )\n      FT_INVALID_FORMAT;\n\n    if ( defaultBaseline > 31 )\n      FT_INVALID_FORMAT;\n\n    bsln->defaultBaseline = defaultBaseline;\n\n    fmt_funcs_table[format]( p, limit, gxvalid );\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* arch-tag: ebe81143-fdaa-4c68-a4d1-b57227daa3bc\n   (do not change this comment) */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvcommn.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvcommn.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT common tables validation (body).                      */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2009, 2010, 2013                                 */\n/*  by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvcommon\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       16bit offset sorter                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static int\n  gxv_compare_ushort_offset( FT_UShort*  a,\n                             FT_UShort*  b )\n  {\n    if ( *a < *b )\n      return -1;\n    else if ( *a > *b )\n      return 1;\n    else\n      return 0;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_set_length_by_ushort_offset( FT_UShort*     offset,\n                                   FT_UShort**    length,\n                                   FT_UShort*     buff,\n                                   FT_UInt        nmemb,\n                                   FT_UShort      limit,\n                                   GXV_Validator  gxvalid )\n  {\n    FT_UInt  i;\n\n\n    for ( i = 0; i < nmemb; i++ )\n      *(length[i]) = 0;\n\n    for ( i = 0; i < nmemb; i++ )\n      buff[i] = offset[i];\n    buff[nmemb] = limit;\n\n    ft_qsort( buff, ( nmemb + 1 ), sizeof ( FT_UShort ),\n              ( int(*)(const void*, const void*) )gxv_compare_ushort_offset );\n\n    if ( buff[nmemb] > limit )\n      FT_INVALID_OFFSET;\n\n    for ( i = 0; i < nmemb; i++ )\n    {\n      FT_UInt  j;\n\n\n      for ( j = 0; j < nmemb; j++ )\n        if ( buff[j] == offset[i] )\n          break;\n\n      if ( j == nmemb )\n        FT_INVALID_OFFSET;\n\n      *(length[i]) = (FT_UShort)( buff[j + 1] - buff[j] );\n\n      if ( 0 != offset[i] && 0 == *(length[i]) )\n        FT_INVALID_OFFSET;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       32bit offset sorter                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static int\n  gxv_compare_ulong_offset( FT_ULong*  a,\n                            FT_ULong*  b )\n  {\n    if ( *a < *b )\n      return -1;\n    else if ( *a > *b )\n      return 1;\n    else\n      return 0;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_set_length_by_ulong_offset( FT_ULong*      offset,\n                                  FT_ULong**     length,\n                                  FT_ULong*      buff,\n                                  FT_UInt        nmemb,\n                                  FT_ULong       limit,\n                                  GXV_Validator  gxvalid)\n  {\n    FT_UInt  i;\n\n\n    for ( i = 0; i < nmemb; i++ )\n      *(length[i]) = 0;\n\n    for ( i = 0; i < nmemb; i++ )\n      buff[i] = offset[i];\n    buff[nmemb] = limit;\n\n    ft_qsort( buff, ( nmemb + 1 ), sizeof ( FT_ULong ),\n              ( int(*)(const void*, const void*) )gxv_compare_ulong_offset );\n\n    if ( buff[nmemb] > limit )\n      FT_INVALID_OFFSET;\n\n    for ( i = 0; i < nmemb; i++ )\n    {\n      FT_UInt  j;\n\n\n      for ( j = 0; j < nmemb; j++ )\n        if ( buff[j] == offset[i] )\n          break;\n\n      if ( j == nmemb )\n        FT_INVALID_OFFSET;\n\n      *(length[i]) = buff[j + 1] - buff[j];\n\n      if ( 0 != offset[i] && 0 == *(length[i]) )\n        FT_INVALID_OFFSET;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****               scan value array and get min & max              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_LOCAL_DEF( void )\n  gxv_array_getlimits_byte( FT_Bytes       table,\n                            FT_Bytes       limit,\n                            FT_Byte*       min,\n                            FT_Byte*       max,\n                            GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    *min = 0xFF;\n    *max = 0x00;\n\n    while ( p < limit )\n    {\n      FT_Byte  val;\n\n\n      GXV_LIMIT_CHECK( 1 );\n      val = FT_NEXT_BYTE( p );\n\n      *min = (FT_Byte)FT_MIN( *min, val );\n      *max = (FT_Byte)FT_MAX( *max, val );\n    }\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_array_getlimits_ushort( FT_Bytes       table,\n                              FT_Bytes       limit,\n                              FT_UShort*     min,\n                              FT_UShort*     max,\n                              GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    *min = 0xFFFFU;\n    *max = 0x0000;\n\n    while ( p < limit )\n    {\n      FT_UShort  val;\n\n\n      GXV_LIMIT_CHECK( 2 );\n      val = FT_NEXT_USHORT( p );\n\n      *min = (FT_Byte)FT_MIN( *min, val );\n      *max = (FT_Byte)FT_MAX( *max, val );\n    }\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       BINSEARCHHEADER                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  GXV_BinSrchHeader_\n  {\n    FT_UShort  unitSize;\n    FT_UShort  nUnits;\n    FT_UShort  searchRange;\n    FT_UShort  entrySelector;\n    FT_UShort  rangeShift;\n\n  } GXV_BinSrchHeader;\n\n\n  static void\n  gxv_BinSrchHeader_check_consistency( GXV_BinSrchHeader*  binSrchHeader,\n                                       GXV_Validator       gxvalid )\n  {\n    FT_UShort  searchRange;\n    FT_UShort  entrySelector;\n    FT_UShort  rangeShift;\n\n\n    if ( binSrchHeader->unitSize == 0 )\n      FT_INVALID_DATA;\n\n    if ( binSrchHeader->nUnits == 0 )\n    {\n      if ( binSrchHeader->searchRange   == 0 &&\n           binSrchHeader->entrySelector == 0 &&\n           binSrchHeader->rangeShift    == 0 )\n        return;\n      else\n        FT_INVALID_DATA;\n    }\n\n    for ( searchRange = 1, entrySelector = 1;\n          ( searchRange * 2 ) <= binSrchHeader->nUnits &&\n            searchRange < 0x8000U;\n          searchRange *= 2, entrySelector++ )\n      ;\n\n    entrySelector--;\n    searchRange = (FT_UShort)( searchRange * binSrchHeader->unitSize );\n    rangeShift  = (FT_UShort)( binSrchHeader->nUnits * binSrchHeader->unitSize\n                               - searchRange );\n\n    if ( searchRange   != binSrchHeader->searchRange   ||\n         entrySelector != binSrchHeader->entrySelector ||\n         rangeShift    != binSrchHeader->rangeShift    )\n    {\n      GXV_TRACE(( \"Inconsistency found in BinSrchHeader\\n\" ));\n      GXV_TRACE(( \"originally: unitSize=%d, nUnits=%d, \"\n                  \"searchRange=%d, entrySelector=%d, \"\n                  \"rangeShift=%d\\n\",\n                  binSrchHeader->unitSize, binSrchHeader->nUnits,\n                  binSrchHeader->searchRange, binSrchHeader->entrySelector,\n                  binSrchHeader->rangeShift ));\n      GXV_TRACE(( \"calculated: unitSize=%d, nUnits=%d, \"\n                  \"searchRange=%d, entrySelector=%d, \"\n                  \"rangeShift=%d\\n\",\n                  binSrchHeader->unitSize, binSrchHeader->nUnits,\n                  searchRange, entrySelector, rangeShift ));\n\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n  }\n\n\n  /*\n   * parser & validator of BinSrchHeader\n   * which is used in LookupTable format 2, 4, 6.\n   *\n   * Essential parameters (unitSize, nUnits) are returned by\n   * given pointer, others (searchRange, entrySelector, rangeShift)\n   * can be calculated by essential parameters, so they are just\n   * validated and discarded.\n   *\n   * However, wrong values in searchRange, entrySelector, rangeShift\n   * won't cause fatal errors, because these parameters might be\n   * only used in old m68k font driver in MacOS.\n   *   -- suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>\n   */\n\n  FT_LOCAL_DEF( void )\n  gxv_BinSrchHeader_validate( FT_Bytes       table,\n                              FT_Bytes       limit,\n                              FT_UShort*     unitSize_p,\n                              FT_UShort*     nUnits_p,\n                              GXV_Validator  gxvalid )\n  {\n    FT_Bytes           p = table;\n    GXV_BinSrchHeader  binSrchHeader;\n\n\n    GXV_NAME_ENTER( \"BinSrchHeader validate\" );\n\n    if ( *unitSize_p == 0 )\n    {\n      GXV_LIMIT_CHECK( 2 );\n      binSrchHeader.unitSize =  FT_NEXT_USHORT( p );\n    }\n    else\n      binSrchHeader.unitSize = *unitSize_p;\n\n    if ( *nUnits_p == 0 )\n    {\n      GXV_LIMIT_CHECK( 2 );\n      binSrchHeader.nUnits = FT_NEXT_USHORT( p );\n    }\n    else\n      binSrchHeader.nUnits = *nUnits_p;\n\n    GXV_LIMIT_CHECK( 2 + 2 + 2 );\n    binSrchHeader.searchRange   = FT_NEXT_USHORT( p );\n    binSrchHeader.entrySelector = FT_NEXT_USHORT( p );\n    binSrchHeader.rangeShift    = FT_NEXT_USHORT( p );\n    GXV_TRACE(( \"nUnits %d\\n\", binSrchHeader.nUnits ));\n\n    gxv_BinSrchHeader_check_consistency( &binSrchHeader, gxvalid );\n\n    if ( *unitSize_p == 0 )\n      *unitSize_p = binSrchHeader.unitSize;\n\n    if ( *nUnits_p == 0 )\n      *nUnits_p = binSrchHeader.nUnits;\n\n    gxvalid->subtable_length = p - table;\n    GXV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         LOOKUP TABLE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define GXV_LOOKUP_VALUE_LOAD( P, SIGNSPEC )                   \\\n          ( P += 2, gxv_lookup_value_load( P - 2, SIGNSPEC ) )\n\n  static GXV_LookupValueDesc\n  gxv_lookup_value_load( FT_Bytes  p,\n                         int       signspec )\n  {\n    GXV_LookupValueDesc  v;\n\n\n    if ( signspec == GXV_LOOKUPVALUE_UNSIGNED )\n      v.u = FT_NEXT_USHORT( p );\n    else\n      v.s = FT_NEXT_SHORT( p );\n\n    return v;\n  }\n\n\n#define GXV_UNITSIZE_VALIDATE( FORMAT, UNITSIZE, NUNITS, CORRECTSIZE ) \\\n          FT_BEGIN_STMNT                                               \\\n            if ( UNITSIZE != CORRECTSIZE )                             \\\n            {                                                          \\\n              FT_ERROR(( \"unitSize=%d differs from\"                    \\\n                         \" expected unitSize=%d\"                       \\\n                         \" in LookupTable %s\\n\",                       \\\n                          UNITSIZE, CORRECTSIZE, FORMAT ));            \\\n              if ( UNITSIZE != 0 && NUNITS != 0 )                      \\\n              {                                                        \\\n                FT_ERROR(( \" cannot validate anymore\\n\" ));            \\\n                FT_INVALID_FORMAT;                                     \\\n              }                                                        \\\n              else                                                     \\\n                FT_ERROR(( \" forcibly continues\\n\" ));                 \\\n            }                                                          \\\n          FT_END_STMNT\n\n\n  /* ================= Simple Array Format 0 Lookup Table ================ */\n  static void\n  gxv_LookupTable_fmt0_validate( FT_Bytes       table,\n                                 FT_Bytes       limit,\n                                 GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  i;\n\n    GXV_LookupValueDesc  value;\n\n\n    GXV_NAME_ENTER( \"LookupTable format 0\" );\n\n    GXV_LIMIT_CHECK( 2 * gxvalid->face->num_glyphs );\n\n    for ( i = 0; i < gxvalid->face->num_glyphs; i++ )\n    {\n      GXV_LIMIT_CHECK( 2 );\n      if ( p + 2 >= limit )     /* some fonts have too-short fmt0 array */\n      {\n        GXV_TRACE(( \"too short, glyphs %d - %d are missing\\n\",\n                    i, gxvalid->face->num_glyphs ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n        break;\n      }\n\n      value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );\n      gxvalid->lookupval_func( i, &value, gxvalid );\n    }\n\n    gxvalid->subtable_length = p - table;\n    GXV_EXIT;\n  }\n\n\n  /* ================= Segment Single Format 2 Loolup Table ============== */\n  /*\n   * Apple spec says:\n   *\n   *   To guarantee that a binary search terminates, you must include one or\n   *   more special `end of search table' values at the end of the data to\n   *   be searched.  The number of termination values that need to be\n   *   included is table-specific.  The value that indicates binary search\n   *   termination is 0xFFFF.\n   *\n   * The problem is that nUnits does not include this end-marker.  It's\n   * quite difficult to discriminate whether the following 0xFFFF comes from\n   * the end-marker or some next data.\n   *\n   *   -- suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>\n   */\n  static void\n  gxv_LookupTable_fmt2_skip_endmarkers( FT_Bytes       table,\n                                        FT_UShort      unitSize,\n                                        GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    while ( ( p + 4 ) < gxvalid->root->limit )\n    {\n      if ( p[0] != 0xFF || p[1] != 0xFF || /* lastGlyph */\n           p[2] != 0xFF || p[3] != 0xFF )  /* firstGlyph */\n        break;\n      p += unitSize;\n    }\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  static void\n  gxv_LookupTable_fmt2_validate( FT_Bytes       table,\n                                 FT_Bytes       limit,\n                                 GXV_Validator  gxvalid )\n  {\n    FT_Bytes             p = table;\n    FT_UShort            gid;\n\n    FT_UShort            unitSize;\n    FT_UShort            nUnits;\n    FT_UShort            unit;\n    FT_UShort            lastGlyph;\n    FT_UShort            firstGlyph;\n    GXV_LookupValueDesc  value;\n\n\n    GXV_NAME_ENTER( \"LookupTable format 2\" );\n\n    unitSize = nUnits = 0;\n    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid );\n    p += gxvalid->subtable_length;\n\n    GXV_UNITSIZE_VALIDATE( \"format2\", unitSize, nUnits, 6 );\n\n    for ( unit = 0, gid = 0; unit < nUnits; unit++ )\n    {\n      GXV_LIMIT_CHECK( 2 + 2 + 2 );\n      lastGlyph  = FT_NEXT_USHORT( p );\n      firstGlyph = FT_NEXT_USHORT( p );\n      value      = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );\n\n      gxv_glyphid_validate( firstGlyph, gxvalid );\n      gxv_glyphid_validate( lastGlyph, gxvalid );\n\n      if ( lastGlyph < gid )\n      {\n        GXV_TRACE(( \"reverse ordered segment specification:\"\n                    \" lastGlyph[%d]=%d < lastGlyph[%d]=%d\\n\",\n                    unit, lastGlyph, unit - 1 , gid ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n      }\n\n      if ( lastGlyph < firstGlyph )\n      {\n        GXV_TRACE(( \"reverse ordered range specification at unit %d:\",\n                    \" lastGlyph %d < firstGlyph %d \",\n                    unit, lastGlyph, firstGlyph ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n\n        if ( gxvalid->root->level == FT_VALIDATE_TIGHT )\n          continue;     /* ftxvalidator silently skips such an entry */\n\n        FT_TRACE4(( \"continuing with exchanged values\\n\" ));\n        gid        = firstGlyph;\n        firstGlyph = lastGlyph;\n        lastGlyph  = gid;\n      }\n\n      for ( gid = firstGlyph; gid <= lastGlyph; gid++ )\n        gxvalid->lookupval_func( gid, &value, gxvalid );\n    }\n\n    gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, gxvalid );\n    p += gxvalid->subtable_length;\n\n    gxvalid->subtable_length = p - table;\n    GXV_EXIT;\n  }\n\n\n  /* ================= Segment Array Format 4 Lookup Table =============== */\n  static void\n  gxv_LookupTable_fmt4_validate( FT_Bytes       table,\n                                 FT_Bytes       limit,\n                                 GXV_Validator  gxvalid )\n  {\n    FT_Bytes             p = table;\n    FT_UShort            unit;\n    FT_UShort            gid;\n\n    FT_UShort            unitSize;\n    FT_UShort            nUnits;\n    FT_UShort            lastGlyph;\n    FT_UShort            firstGlyph;\n    GXV_LookupValueDesc  base_value;\n    GXV_LookupValueDesc  value;\n\n\n    GXV_NAME_ENTER( \"LookupTable format 4\" );\n\n    unitSize = nUnits = 0;\n    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid );\n    p += gxvalid->subtable_length;\n\n    GXV_UNITSIZE_VALIDATE( \"format4\", unitSize, nUnits, 6 );\n\n    for ( unit = 0, gid = 0; unit < nUnits; unit++ )\n    {\n      GXV_LIMIT_CHECK( 2 + 2 );\n      lastGlyph  = FT_NEXT_USHORT( p );\n      firstGlyph = FT_NEXT_USHORT( p );\n\n      gxv_glyphid_validate( firstGlyph, gxvalid );\n      gxv_glyphid_validate( lastGlyph, gxvalid );\n\n      if ( lastGlyph < gid )\n      {\n        GXV_TRACE(( \"reverse ordered segment specification:\"\n                    \" lastGlyph[%d]=%d < lastGlyph[%d]=%d\\n\",\n                    unit, lastGlyph, unit - 1 , gid ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n      }\n\n      if ( lastGlyph < firstGlyph )\n      {\n        GXV_TRACE(( \"reverse ordered range specification at unit %d:\",\n                    \" lastGlyph %d < firstGlyph %d \",\n                    unit, lastGlyph, firstGlyph ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n\n        if ( gxvalid->root->level == FT_VALIDATE_TIGHT )\n          continue; /* ftxvalidator silently skips such an entry */\n\n        FT_TRACE4(( \"continuing with exchanged values\\n\" ));\n        gid        = firstGlyph;\n        firstGlyph = lastGlyph;\n        lastGlyph  = gid;\n      }\n\n      GXV_LIMIT_CHECK( 2 );\n      base_value = GXV_LOOKUP_VALUE_LOAD( p, GXV_LOOKUPVALUE_UNSIGNED );\n\n      for ( gid = firstGlyph; gid <= lastGlyph; gid++ )\n      {\n        value = gxvalid->lookupfmt4_trans( (FT_UShort)( gid - firstGlyph ),\n                                         &base_value,\n                                         limit,\n                                         gxvalid );\n\n        gxvalid->lookupval_func( gid, &value, gxvalid );\n      }\n    }\n\n    gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, gxvalid );\n    p += gxvalid->subtable_length;\n\n    gxvalid->subtable_length = p - table;\n    GXV_EXIT;\n  }\n\n\n  /* ================= Segment Table Format 6 Lookup Table =============== */\n  static void\n  gxv_LookupTable_fmt6_skip_endmarkers( FT_Bytes       table,\n                                        FT_UShort      unitSize,\n                                        GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    while ( p < gxvalid->root->limit )\n    {\n      if ( p[0] != 0xFF || p[1] != 0xFF )\n        break;\n      p += unitSize;\n    }\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  static void\n  gxv_LookupTable_fmt6_validate( FT_Bytes       table,\n                                 FT_Bytes       limit,\n                                 GXV_Validator  gxvalid )\n  {\n    FT_Bytes             p = table;\n    FT_UShort            unit;\n    FT_UShort            prev_glyph;\n\n    FT_UShort            unitSize;\n    FT_UShort            nUnits;\n    FT_UShort            glyph;\n    GXV_LookupValueDesc  value;\n\n\n    GXV_NAME_ENTER( \"LookupTable format 6\" );\n\n    unitSize = nUnits = 0;\n    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid );\n    p += gxvalid->subtable_length;\n\n    GXV_UNITSIZE_VALIDATE( \"format6\", unitSize, nUnits, 4 );\n\n    for ( unit = 0, prev_glyph = 0; unit < nUnits; unit++ )\n    {\n      GXV_LIMIT_CHECK( 2 + 2 );\n      glyph = FT_NEXT_USHORT( p );\n      value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );\n\n      if ( gxv_glyphid_validate( glyph, gxvalid ) )\n        GXV_TRACE(( \" endmarker found within defined range\"\n                    \" (entry %d < nUnits=%d)\\n\",\n                    unit, nUnits ));\n\n      if ( prev_glyph > glyph )\n      {\n        GXV_TRACE(( \"current gid 0x%04x < previous gid 0x%04x\\n\",\n                    glyph, prev_glyph ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n      }\n      prev_glyph = glyph;\n\n      gxvalid->lookupval_func( glyph, &value, gxvalid );\n    }\n\n    gxv_LookupTable_fmt6_skip_endmarkers( p, unitSize, gxvalid );\n    p += gxvalid->subtable_length;\n\n    gxvalid->subtable_length = p - table;\n    GXV_EXIT;\n  }\n\n\n  /* ================= Trimmed Array Format 8 Lookup Table =============== */\n  static void\n  gxv_LookupTable_fmt8_validate( FT_Bytes       table,\n                                 FT_Bytes       limit,\n                                 GXV_Validator  gxvalid )\n  {\n    FT_Bytes              p = table;\n    FT_UShort             i;\n\n    GXV_LookupValueDesc   value;\n    FT_UShort             firstGlyph;\n    FT_UShort             glyphCount;\n\n\n    GXV_NAME_ENTER( \"LookupTable format 8\" );\n\n    /* firstGlyph + glyphCount */\n    GXV_LIMIT_CHECK( 2 + 2 );\n    firstGlyph = FT_NEXT_USHORT( p );\n    glyphCount = FT_NEXT_USHORT( p );\n\n    gxv_glyphid_validate( firstGlyph, gxvalid );\n    gxv_glyphid_validate( (FT_UShort)( firstGlyph + glyphCount ), gxvalid );\n\n    /* valueArray */\n    for ( i = 0; i < glyphCount; i++ )\n    {\n      GXV_LIMIT_CHECK( 2 );\n      value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );\n      gxvalid->lookupval_func( (FT_UShort)( firstGlyph + i ), &value, gxvalid );\n    }\n\n    gxvalid->subtable_length = p - table;\n    GXV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_LookupTable_validate( FT_Bytes       table,\n                            FT_Bytes       limit,\n                            GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  format;\n\n    GXV_Validate_Func  fmt_funcs_table[] =\n    {\n      gxv_LookupTable_fmt0_validate, /* 0 */\n      NULL,                          /* 1 */\n      gxv_LookupTable_fmt2_validate, /* 2 */\n      NULL,                          /* 3 */\n      gxv_LookupTable_fmt4_validate, /* 4 */\n      NULL,                          /* 5 */\n      gxv_LookupTable_fmt6_validate, /* 6 */\n      NULL,                          /* 7 */\n      gxv_LookupTable_fmt8_validate, /* 8 */\n    };\n\n    GXV_Validate_Func  func;\n\n\n    GXV_NAME_ENTER( \"LookupTable\" );\n\n    /* lookuptbl_head may be used in fmt4 transit function. */\n    gxvalid->lookuptbl_head = table;\n\n    /* format */\n    GXV_LIMIT_CHECK( 2 );\n    format = FT_NEXT_USHORT( p );\n    GXV_TRACE(( \" (format %d)\\n\", format ));\n\n    if ( format > 8 )\n      FT_INVALID_FORMAT;\n\n    func = fmt_funcs_table[format];\n    if ( func == NULL )\n      FT_INVALID_FORMAT;\n\n    func( p, limit, gxvalid );\n    p += gxvalid->subtable_length;\n\n    gxvalid->subtable_length = p - table;\n\n    GXV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          Glyph ID                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( FT_Int )\n  gxv_glyphid_validate( FT_UShort      gid,\n                        GXV_Validator  gxvalid )\n  {\n    FT_Face  face;\n\n\n    if ( gid == 0xFFFFU )\n    {\n      GXV_EXIT;\n      return 1;\n    }\n\n    face = gxvalid->face;\n    if ( face->num_glyphs < gid )\n    {\n      GXV_TRACE(( \" gxv_glyphid_check() gid overflow: num_glyphs %d < %d\\n\",\n                  face->num_glyphs, gid ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n    }\n\n    return 0;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        CONTROL POINT                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  gxv_ctlPoint_validate( FT_UShort      gid,\n                         FT_Short       ctl_point,\n                         GXV_Validator  gxvalid )\n  {\n    FT_Face       face;\n    FT_Error      error;\n\n    FT_GlyphSlot  glyph;\n    FT_Outline    outline;\n    short         n_points;\n\n\n    face = gxvalid->face;\n\n    error = FT_Load_Glyph( face,\n                           gid,\n                           FT_LOAD_NO_BITMAP | FT_LOAD_IGNORE_TRANSFORM );\n    if ( error )\n      FT_INVALID_GLYPH_ID;\n\n    glyph    = face->glyph;\n    outline  = glyph->outline;\n    n_points = outline.n_points;\n\n\n    if ( !( ctl_point < n_points ) )\n      FT_INVALID_DATA;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          SFNT NAME                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  gxv_sfntName_validate( FT_UShort      name_index,\n                         FT_UShort      min_index,\n                         FT_UShort      max_index,\n                         GXV_Validator  gxvalid )\n  {\n    FT_SfntName  name;\n    FT_UInt      i;\n    FT_UInt      nnames;\n\n\n    GXV_NAME_ENTER( \"sfntName\" );\n\n    if ( name_index < min_index || max_index < name_index )\n      FT_INVALID_FORMAT;\n\n    nnames = FT_Get_Sfnt_Name_Count( gxvalid->face );\n    for ( i = 0; i < nnames; i++ )\n    {\n      if ( FT_Get_Sfnt_Name( gxvalid->face, i, &name ) != FT_Err_Ok )\n        continue ;\n\n      if ( name.name_id == name_index )\n        goto Out;\n    }\n\n    GXV_TRACE(( \"  nameIndex = %d (UNTITLED)\\n\", name_index ));\n    FT_INVALID_DATA;\n    goto Exit;  /* make compiler happy */\n\n  Out:\n    FT_TRACE1(( \"  nameIndex = %d (\", name_index ));\n    GXV_TRACE_HEXDUMP_SFNTNAME( name );\n    FT_TRACE1(( \")\\n\" ));\n\n  Exit:\n    GXV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          STATE TABLE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* -------------------------- Class Table --------------------------- */\n\n  /*\n   * highestClass specifies how many classes are defined in this\n   * Class Subtable.  Apple spec does not mention whether undefined\n   * holes in the class (e.g.: 0-3 are predefined, 4 is unused, 5 is used)\n   * are permitted.  At present, holes in a defined class are not checked.\n   *   -- suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>\n   */\n\n  static void\n  gxv_ClassTable_validate( FT_Bytes       table,\n                           FT_UShort*     length_p,\n                           FT_UShort      stateSize,\n                           FT_Byte*       maxClassID_p,\n                           GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p     = table;\n    FT_Bytes   limit = table + *length_p;\n    FT_UShort  firstGlyph;\n    FT_UShort  nGlyphs;\n\n\n    GXV_NAME_ENTER( \"ClassTable\" );\n\n    *maxClassID_p = 3;  /* Classes 0, 2, and 3 are predefined */\n\n    GXV_LIMIT_CHECK( 2 + 2 );\n    firstGlyph = FT_NEXT_USHORT( p );\n    nGlyphs    = FT_NEXT_USHORT( p );\n\n    GXV_TRACE(( \" (firstGlyph = %d, nGlyphs = %d)\\n\", firstGlyph, nGlyphs ));\n\n    if ( !nGlyphs )\n      goto Out;\n\n    gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs ), gxvalid );\n\n    {\n      FT_Byte    nGlyphInClass[256];\n      FT_Byte    classID;\n      FT_UShort  i;\n\n\n      ft_memset( nGlyphInClass, 0, 256 );\n\n\n      for ( i = 0; i < nGlyphs; i++ )\n      {\n        GXV_LIMIT_CHECK( 1 );\n        classID = FT_NEXT_BYTE( p );\n        switch ( classID )\n        {\n          /* following classes should not appear in class array */\n        case 0:             /* end of text */\n        case 2:             /* out of bounds */\n        case 3:             /* end of line */\n          FT_INVALID_DATA;\n          break;\n\n        case 1:             /* out of bounds */\n        default:            /* user-defined: 4 - ( stateSize - 1 ) */\n          if ( classID >= stateSize )\n            FT_INVALID_DATA;   /* assign glyph to undefined state */\n\n          nGlyphInClass[classID]++;\n          break;\n        }\n      }\n      *length_p = (FT_UShort)( p - table );\n\n      /* scan max ClassID in use */\n      for ( i = 0; i < stateSize; i++ )\n        if ( ( 3 < i ) && ( nGlyphInClass[i] > 0 ) )\n          *maxClassID_p = (FT_Byte)i;  /* XXX: Check Range? */\n    }\n\n  Out:\n    GXV_TRACE(( \"Declared stateSize=0x%02x, Used maxClassID=0x%02x\\n\",\n                stateSize, *maxClassID_p ));\n    GXV_EXIT;\n  }\n\n\n  /* --------------------------- State Array ----------------------------- */\n\n  static void\n  gxv_StateArray_validate( FT_Bytes       table,\n                           FT_UShort*     length_p,\n                           FT_Byte        maxClassID,\n                           FT_UShort      stateSize,\n                           FT_Byte*       maxState_p,\n                           FT_Byte*       maxEntry_p,\n                           GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p     = table;\n    FT_Bytes  limit = table + *length_p;\n    FT_Byte   clazz;\n    FT_Byte   entry;\n\n    FT_UNUSED( stateSize ); /* for the non-debugging case */\n\n\n    GXV_NAME_ENTER( \"StateArray\" );\n\n    GXV_TRACE(( \"parse %d bytes by stateSize=%d maxClassID=%d\\n\",\n                (int)(*length_p), stateSize, (int)(maxClassID) ));\n\n    /*\n     * 2 states are predefined and must be described in StateArray:\n     * state 0 (start of text), 1 (start of line)\n     */\n    GXV_LIMIT_CHECK( ( 1 + maxClassID ) * 2 );\n\n    *maxState_p = 0;\n    *maxEntry_p = 0;\n\n    /* read if enough to read another state */\n    while ( p + ( 1 + maxClassID ) <= limit )\n    {\n      (*maxState_p)++;\n      for ( clazz = 0; clazz <= maxClassID; clazz++ )\n      {\n        entry = FT_NEXT_BYTE( p );\n        *maxEntry_p = (FT_Byte)FT_MAX( *maxEntry_p, entry );\n      }\n    }\n    GXV_TRACE(( \"parsed: maxState=%d, maxEntry=%d\\n\",\n                *maxState_p, *maxEntry_p ));\n\n    *length_p = (FT_UShort)( p - table );\n\n    GXV_EXIT;\n  }\n\n\n  /* --------------------------- Entry Table ----------------------------- */\n\n  static void\n  gxv_EntryTable_validate( FT_Bytes       table,\n                           FT_UShort*     length_p,\n                           FT_Byte        maxEntry,\n                           FT_UShort      stateArray,\n                           FT_UShort      stateArray_length,\n                           FT_Byte        maxClassID,\n                           FT_Bytes       statetable_table,\n                           FT_Bytes       statetable_limit,\n                           GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p     = table;\n    FT_Bytes  limit = table + *length_p;\n    FT_Byte   entry;\n    FT_Byte   state;\n    FT_Int    entrySize = 2 + 2 + GXV_GLYPHOFFSET_SIZE( statetable );\n\n    GXV_XStateTable_GlyphOffsetDesc  glyphOffset;\n\n\n    GXV_NAME_ENTER( \"EntryTable\" );\n\n    GXV_TRACE(( \"maxEntry=%d entrySize=%d\\n\", maxEntry, entrySize ));\n\n    if ( ( maxEntry + 1 ) * entrySize > *length_p )\n    {\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_TOO_SHORT );\n\n      /* ftxvalidator and FontValidator both warn and continue */\n      maxEntry = (FT_Byte)( *length_p / entrySize - 1 );\n      GXV_TRACE(( \"too large maxEntry, shrinking to %d fit EntryTable length\\n\",\n                  maxEntry ));\n    }\n\n    for ( entry = 0; entry <= maxEntry; entry++ )\n    {\n      FT_UShort  newState;\n      FT_UShort  flags;\n\n\n      GXV_LIMIT_CHECK( 2 + 2 );\n      newState = FT_NEXT_USHORT( p );\n      flags    = FT_NEXT_USHORT( p );\n\n\n      if ( newState < stateArray                     ||\n           stateArray + stateArray_length < newState )\n      {\n        GXV_TRACE(( \" newState offset 0x%04x is out of stateArray\\n\",\n                    newState ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n        continue;\n      }\n\n      if ( 0 != ( ( newState - stateArray ) % ( 1 + maxClassID ) ) )\n      {\n        GXV_TRACE(( \" newState offset 0x%04x is not aligned to %d-classes\\n\",\n                    newState,  1 + maxClassID ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n        continue;\n      }\n\n      state = (FT_Byte)( ( newState - stateArray ) / ( 1 + maxClassID ) );\n\n      switch ( GXV_GLYPHOFFSET_FMT( statetable ) )\n      {\n      case GXV_GLYPHOFFSET_NONE:\n        glyphOffset.uc = 0;  /* make compiler happy */\n        break;\n\n      case GXV_GLYPHOFFSET_UCHAR:\n        glyphOffset.uc = FT_NEXT_BYTE( p );\n        break;\n\n      case GXV_GLYPHOFFSET_CHAR:\n        glyphOffset.c = FT_NEXT_CHAR( p );\n        break;\n\n      case GXV_GLYPHOFFSET_USHORT:\n        glyphOffset.u = FT_NEXT_USHORT( p );\n        break;\n\n      case GXV_GLYPHOFFSET_SHORT:\n        glyphOffset.s = FT_NEXT_SHORT( p );\n        break;\n\n      case GXV_GLYPHOFFSET_ULONG:\n        glyphOffset.ul = FT_NEXT_ULONG( p );\n        break;\n\n      case GXV_GLYPHOFFSET_LONG:\n        glyphOffset.l = FT_NEXT_LONG( p );\n        break;\n\n      default:\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );\n        goto Exit;\n      }\n\n      if ( NULL != gxvalid->statetable.entry_validate_func )\n        gxvalid->statetable.entry_validate_func( state,\n                                                 flags,\n                                                 &glyphOffset,\n                                                 statetable_table,\n                                                 statetable_limit,\n                                                 gxvalid );\n    }\n\n  Exit:\n    *length_p = (FT_UShort)( p - table );\n\n    GXV_EXIT;\n  }\n\n\n  /* =========================== State Table ============================= */\n\n  FT_LOCAL_DEF( void )\n  gxv_StateTable_subtable_setup( FT_UShort      table_size,\n                                 FT_UShort      classTable,\n                                 FT_UShort      stateArray,\n                                 FT_UShort      entryTable,\n                                 FT_UShort*     classTable_length_p,\n                                 FT_UShort*     stateArray_length_p,\n                                 FT_UShort*     entryTable_length_p,\n                                 GXV_Validator  gxvalid )\n  {\n    FT_UShort   o[3];\n    FT_UShort*  l[3];\n    FT_UShort   buff[4];\n\n\n    o[0] = classTable;\n    o[1] = stateArray;\n    o[2] = entryTable;\n    l[0] = classTable_length_p;\n    l[1] = stateArray_length_p;\n    l[2] = entryTable_length_p;\n\n    gxv_set_length_by_ushort_offset( o, l, buff, 3, table_size, gxvalid );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_StateTable_validate( FT_Bytes       table,\n                           FT_Bytes       limit,\n                           GXV_Validator  gxvalid )\n  {\n    FT_UShort   stateSize;\n    FT_UShort   classTable;     /* offset to Class(Sub)Table */\n    FT_UShort   stateArray;     /* offset to StateArray */\n    FT_UShort   entryTable;     /* offset to EntryTable */\n\n    FT_UShort   classTable_length;\n    FT_UShort   stateArray_length;\n    FT_UShort   entryTable_length;\n    FT_Byte     maxClassID;\n    FT_Byte     maxState;\n    FT_Byte     maxEntry;\n\n    GXV_StateTable_Subtable_Setup_Func  setup_func;\n\n    FT_Bytes    p = table;\n\n\n    GXV_NAME_ENTER( \"StateTable\" );\n\n    GXV_TRACE(( \"StateTable header\\n\" ));\n\n    GXV_LIMIT_CHECK( 2 + 2 + 2 + 2 );\n    stateSize  = FT_NEXT_USHORT( p );\n    classTable = FT_NEXT_USHORT( p );\n    stateArray = FT_NEXT_USHORT( p );\n    entryTable = FT_NEXT_USHORT( p );\n\n    GXV_TRACE(( \"stateSize=0x%04x\\n\", stateSize ));\n    GXV_TRACE(( \"offset to classTable=0x%04x\\n\", classTable ));\n    GXV_TRACE(( \"offset to stateArray=0x%04x\\n\", stateArray ));\n    GXV_TRACE(( \"offset to entryTable=0x%04x\\n\", entryTable ));\n\n    if ( stateSize > 0xFF )\n      FT_INVALID_DATA;\n\n    if ( gxvalid->statetable.optdata_load_func != NULL )\n      gxvalid->statetable.optdata_load_func( p, limit, gxvalid );\n\n    if ( gxvalid->statetable.subtable_setup_func != NULL)\n      setup_func = gxvalid->statetable.subtable_setup_func;\n    else\n      setup_func = gxv_StateTable_subtable_setup;\n\n    setup_func( (FT_UShort)( limit - table ),\n                classTable,\n                stateArray,\n                entryTable,\n                &classTable_length,\n                &stateArray_length,\n                &entryTable_length,\n                gxvalid );\n\n    GXV_TRACE(( \"StateTable Subtables\\n\" ));\n\n    if ( classTable != 0 )\n      gxv_ClassTable_validate( table + classTable,\n                               &classTable_length,\n                               stateSize,\n                               &maxClassID,\n                               gxvalid );\n    else\n      maxClassID = (FT_Byte)( stateSize - 1 );\n\n    if ( stateArray != 0 )\n      gxv_StateArray_validate( table + stateArray,\n                               &stateArray_length,\n                               maxClassID,\n                               stateSize,\n                               &maxState,\n                               &maxEntry,\n                               gxvalid );\n    else\n    {\n#if 0\n      maxState = 1;     /* 0:start of text, 1:start of line are predefined */\n#endif\n      maxEntry = 0;\n    }\n\n    if ( maxEntry > 0 && entryTable == 0 )\n      FT_INVALID_OFFSET;\n\n    if ( entryTable != 0 )\n      gxv_EntryTable_validate( table + entryTable,\n                               &entryTable_length,\n                               maxEntry,\n                               stateArray,\n                               stateArray_length,\n                               maxClassID,\n                               table,\n                               limit,\n                               gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  /* ================= eXtended State Table (for morx) =================== */\n\n  FT_LOCAL_DEF( void )\n  gxv_XStateTable_subtable_setup( FT_ULong       table_size,\n                                  FT_ULong       classTable,\n                                  FT_ULong       stateArray,\n                                  FT_ULong       entryTable,\n                                  FT_ULong*      classTable_length_p,\n                                  FT_ULong*      stateArray_length_p,\n                                  FT_ULong*      entryTable_length_p,\n                                  GXV_Validator  gxvalid )\n  {\n    FT_ULong   o[3];\n    FT_ULong*  l[3];\n    FT_ULong   buff[4];\n\n\n    o[0] = classTable;\n    o[1] = stateArray;\n    o[2] = entryTable;\n    l[0] = classTable_length_p;\n    l[1] = stateArray_length_p;\n    l[2] = entryTable_length_p;\n\n    gxv_set_length_by_ulong_offset( o, l, buff, 3, table_size, gxvalid );\n  }\n\n\n  static void\n  gxv_XClassTable_lookupval_validate( FT_UShort            glyph,\n                                      GXV_LookupValueCPtr  value_p,\n                                      GXV_Validator        gxvalid )\n  {\n    FT_UNUSED( glyph );\n\n    if ( value_p->u >= gxvalid->xstatetable.nClasses )\n      FT_INVALID_DATA;\n    if ( value_p->u > gxvalid->xstatetable.maxClassID )\n      gxvalid->xstatetable.maxClassID = value_p->u;\n  }\n\n\n  /*\n    +===============+ --------+\n    | lookup header |         |\n    +===============+         |\n    | BinSrchHeader |         |\n    +===============+         |\n    | lastGlyph[0]  |         |\n    +---------------+         |\n    | firstGlyph[0] |         |    head of lookup table\n    +---------------+         |             +\n    | offset[0]     |    ->   |          offset            [byte]\n    +===============+         |             +\n    | lastGlyph[1]  |         | (glyphID - firstGlyph) * 2 [byte]\n    +---------------+         |\n    | firstGlyph[1] |         |\n    +---------------+         |\n    | offset[1]     |         |\n    +===============+         |\n                              |\n     ....                     |\n                              |\n    16bit value array         |\n    +===============+         |\n    |     value     | <-------+\n     ....\n  */\n  static GXV_LookupValueDesc\n  gxv_XClassTable_lookupfmt4_transit( FT_UShort            relative_gindex,\n                                      GXV_LookupValueCPtr  base_value_p,\n                                      FT_Bytes             lookuptbl_limit,\n                                      GXV_Validator        gxvalid )\n  {\n    FT_Bytes             p;\n    FT_Bytes             limit;\n    FT_UShort            offset;\n    GXV_LookupValueDesc  value;\n\n    /* XXX: check range? */\n    offset = (FT_UShort)( base_value_p->u +\n                          relative_gindex * sizeof ( FT_UShort ) );\n\n    p     = gxvalid->lookuptbl_head + offset;\n    limit = lookuptbl_limit;\n\n    GXV_LIMIT_CHECK ( 2 );\n    value.u = FT_NEXT_USHORT( p );\n\n    return value;\n  }\n\n\n  static void\n  gxv_XStateArray_validate( FT_Bytes       table,\n                            FT_ULong*      length_p,\n                            FT_UShort      maxClassID,\n                            FT_ULong       stateSize,\n                            FT_UShort*     maxState_p,\n                            FT_UShort*     maxEntry_p,\n                            GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_Bytes   limit = table + *length_p;\n    FT_UShort  clazz;\n    FT_UShort  entry;\n\n    FT_UNUSED( stateSize ); /* for the non-debugging case */\n\n\n    GXV_NAME_ENTER( \"XStateArray\" );\n\n    GXV_TRACE(( \"parse % 3d bytes by stateSize=% 3d maxClassID=% 3d\\n\",\n                (int)(*length_p), stateSize, (int)(maxClassID) ));\n\n    /*\n     * 2 states are predefined and must be described:\n     * state 0 (start of text), 1 (start of line)\n     */\n    GXV_LIMIT_CHECK( ( 1 + maxClassID ) * 2 * 2 );\n\n    *maxState_p = 0;\n    *maxEntry_p = 0;\n\n    /* read if enough to read another state */\n    while ( p + ( ( 1 + maxClassID ) * 2 ) <= limit )\n    {\n      (*maxState_p)++;\n      for ( clazz = 0; clazz <= maxClassID; clazz++ )\n      {\n        entry = FT_NEXT_USHORT( p );\n        *maxEntry_p = (FT_UShort)FT_MAX( *maxEntry_p, entry );\n      }\n    }\n    GXV_TRACE(( \"parsed: maxState=%d, maxEntry=%d\\n\",\n                *maxState_p, *maxEntry_p ));\n\n    *length_p = p - table;\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_XEntryTable_validate( FT_Bytes       table,\n                            FT_ULong*      length_p,\n                            FT_UShort      maxEntry,\n                            FT_ULong       stateArray_length,\n                            FT_UShort      maxClassID,\n                            FT_Bytes       xstatetable_table,\n                            FT_Bytes       xstatetable_limit,\n                            GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_Bytes   limit = table + *length_p;\n    FT_UShort  entry;\n    FT_UShort  state;\n    FT_Int     entrySize = 2 + 2 + GXV_GLYPHOFFSET_SIZE( xstatetable );\n\n\n    GXV_NAME_ENTER( \"XEntryTable\" );\n    GXV_TRACE(( \"maxEntry=%d entrySize=%d\\n\", maxEntry, entrySize ));\n\n    if ( ( p + ( maxEntry + 1 ) * entrySize ) > limit )\n      FT_INVALID_TOO_SHORT;\n\n    for (entry = 0; entry <= maxEntry ; entry++ )\n    {\n      FT_UShort                        newState_idx;\n      FT_UShort                        flags;\n      GXV_XStateTable_GlyphOffsetDesc  glyphOffset;\n\n\n      GXV_LIMIT_CHECK( 2 + 2 );\n      newState_idx = FT_NEXT_USHORT( p );\n      flags        = FT_NEXT_USHORT( p );\n\n      if ( stateArray_length < (FT_ULong)( newState_idx * 2 ) )\n      {\n        GXV_TRACE(( \"  newState index 0x%04x points out of stateArray\\n\",\n                    newState_idx ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n      }\n\n      state = (FT_UShort)( newState_idx / ( 1 + maxClassID ) );\n      if ( 0 != ( newState_idx % ( 1 + maxClassID ) ) )\n      {\n        FT_TRACE4(( \"-> new state = %d (supposed)\\n\"\n                    \"but newState index 0x%04x is not aligned to %d-classes\\n\",\n                    state, newState_idx,  1 + maxClassID ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n      }\n\n      switch ( GXV_GLYPHOFFSET_FMT( xstatetable ) )\n      {\n      case GXV_GLYPHOFFSET_NONE:\n        glyphOffset.uc = 0; /* make compiler happy */\n        break;\n\n      case GXV_GLYPHOFFSET_UCHAR:\n        glyphOffset.uc = FT_NEXT_BYTE( p );\n        break;\n\n      case GXV_GLYPHOFFSET_CHAR:\n        glyphOffset.c = FT_NEXT_CHAR( p );\n        break;\n\n      case GXV_GLYPHOFFSET_USHORT:\n        glyphOffset.u = FT_NEXT_USHORT( p );\n        break;\n\n      case GXV_GLYPHOFFSET_SHORT:\n        glyphOffset.s = FT_NEXT_SHORT( p );\n        break;\n\n      case GXV_GLYPHOFFSET_ULONG:\n        glyphOffset.ul = FT_NEXT_ULONG( p );\n        break;\n\n      case GXV_GLYPHOFFSET_LONG:\n        glyphOffset.l = FT_NEXT_LONG( p );\n        break;\n\n      default:\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );\n        goto Exit;\n      }\n\n      if ( NULL != gxvalid->xstatetable.entry_validate_func )\n        gxvalid->xstatetable.entry_validate_func( state,\n                                                  flags,\n                                                  &glyphOffset,\n                                                  xstatetable_table,\n                                                  xstatetable_limit,\n                                                  gxvalid );\n    }\n\n  Exit:\n    *length_p = p - table;\n\n    GXV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_XStateTable_validate( FT_Bytes       table,\n                            FT_Bytes       limit,\n                            GXV_Validator  gxvalid )\n  {\n    /* StateHeader members */\n    FT_ULong   classTable;      /* offset to Class(Sub)Table */\n    FT_ULong   stateArray;      /* offset to StateArray */\n    FT_ULong   entryTable;      /* offset to EntryTable */\n\n    FT_ULong   classTable_length;\n    FT_ULong   stateArray_length;\n    FT_ULong   entryTable_length;\n    FT_UShort  maxState;\n    FT_UShort  maxEntry;\n\n    GXV_XStateTable_Subtable_Setup_Func  setup_func;\n\n    FT_Bytes   p = table;\n\n\n    GXV_NAME_ENTER( \"XStateTable\" );\n\n    GXV_TRACE(( \"XStateTable header\\n\" ));\n\n    GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 );\n    gxvalid->xstatetable.nClasses = FT_NEXT_ULONG( p );\n    classTable = FT_NEXT_ULONG( p );\n    stateArray = FT_NEXT_ULONG( p );\n    entryTable = FT_NEXT_ULONG( p );\n\n    GXV_TRACE(( \"nClasses =0x%08x\\n\", gxvalid->xstatetable.nClasses ));\n    GXV_TRACE(( \"offset to classTable=0x%08x\\n\", classTable ));\n    GXV_TRACE(( \"offset to stateArray=0x%08x\\n\", stateArray ));\n    GXV_TRACE(( \"offset to entryTable=0x%08x\\n\", entryTable ));\n\n    if ( gxvalid->xstatetable.nClasses > 0xFFFFU )\n      FT_INVALID_DATA;\n\n    GXV_TRACE(( \"StateTable Subtables\\n\" ));\n\n    if ( gxvalid->xstatetable.optdata_load_func != NULL )\n      gxvalid->xstatetable.optdata_load_func( p, limit, gxvalid );\n\n    if ( gxvalid->xstatetable.subtable_setup_func != NULL )\n      setup_func = gxvalid->xstatetable.subtable_setup_func;\n    else\n      setup_func = gxv_XStateTable_subtable_setup;\n\n    setup_func( limit - table,\n                classTable,\n                stateArray,\n                entryTable,\n                &classTable_length,\n                &stateArray_length,\n                &entryTable_length,\n                gxvalid );\n\n    if ( classTable != 0 )\n    {\n      gxvalid->xstatetable.maxClassID = 0;\n      gxvalid->lookupval_sign         = GXV_LOOKUPVALUE_UNSIGNED;\n      gxvalid->lookupval_func         = gxv_XClassTable_lookupval_validate;\n      gxvalid->lookupfmt4_trans       = gxv_XClassTable_lookupfmt4_transit;\n      gxv_LookupTable_validate( table + classTable,\n                                table + classTable + classTable_length,\n                                gxvalid );\n#if 0\n      if ( gxvalid->subtable_length < classTable_length )\n        classTable_length = gxvalid->subtable_length;\n#endif\n    }\n    else\n    {\n      /* XXX: check range? */\n      gxvalid->xstatetable.maxClassID =\n        (FT_UShort)( gxvalid->xstatetable.nClasses - 1 );\n    }\n\n    if ( stateArray != 0 )\n      gxv_XStateArray_validate( table + stateArray,\n                                &stateArray_length,\n                                gxvalid->xstatetable.maxClassID,\n                                gxvalid->xstatetable.nClasses,\n                                &maxState,\n                                &maxEntry,\n                                gxvalid );\n    else\n    {\n#if 0\n      maxState = 1; /* 0:start of text, 1:start of line are predefined */\n#endif\n      maxEntry = 0;\n    }\n\n    if ( maxEntry > 0 && entryTable == 0 )\n      FT_INVALID_OFFSET;\n\n    if ( entryTable != 0 )\n      gxv_XEntryTable_validate( table + entryTable,\n                                &entryTable_length,\n                                maxEntry,\n                                stateArray_length,\n                                gxvalid->xstatetable.maxClassID,\n                                table,\n                                limit,\n                                gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        Table overlapping                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static int\n  gxv_compare_ranges( FT_Bytes  table1_start,\n                      FT_ULong  table1_length,\n                      FT_Bytes  table2_start,\n                      FT_ULong  table2_length )\n  {\n    if ( table1_start == table2_start )\n    {\n      if ( ( table1_length == 0 || table2_length == 0 ) )\n        goto Out;\n    }\n    else if ( table1_start < table2_start )\n    {\n      if ( ( table1_start + table1_length ) <= table2_start )\n        goto Out;\n    }\n    else if ( table1_start > table2_start )\n    {\n      if ( ( table1_start >= table2_start + table2_length ) )\n        goto Out;\n    }\n    return 1;\n\n  Out:\n    return 0;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_odtect_add_range( FT_Bytes          start,\n                        FT_ULong          length,\n                        const FT_String*  name,\n                        GXV_odtect_Range  odtect )\n  {\n    odtect->range[odtect->nRanges].start  = start;\n    odtect->range[odtect->nRanges].length = length;\n    odtect->range[odtect->nRanges].name   = (FT_String*)name;\n    odtect->nRanges++;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_odtect_validate( GXV_odtect_Range  odtect,\n                       GXV_Validator     gxvalid )\n  {\n    FT_UInt  i, j;\n\n\n    GXV_NAME_ENTER( \"check overlap among multi ranges\" );\n\n    for ( i = 0; i < odtect->nRanges; i++ )\n      for ( j = 0; j < i; j++ )\n        if ( 0 != gxv_compare_ranges( odtect->range[i].start,\n                                      odtect->range[i].length,\n                                      odtect->range[j].start,\n                                      odtect->range[j].length ) )\n        {\n#ifdef FT_DEBUG_LEVEL_TRACE\n          if ( odtect->range[i].name || odtect->range[j].name )\n            GXV_TRACE(( \"found overlap between range %d and range %d\\n\",\n                        i, j ));\n          else\n            GXV_TRACE(( \"found overlap between `%s' and `%s\\'\\n\",\n                        odtect->range[i].name,\n                        odtect->range[j].name ));\n#endif\n          FT_INVALID_OFFSET;\n        }\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvcommn.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvcommn.h                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT common tables validation (specification).             */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2012, 2014                                       */\n/*  by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*\n   * keywords in variable naming\n   * ---------------------------\n   *  table: Of type FT_Bytes, pointing to the start of this table/subtable.\n   *  limit: Of type FT_Bytes, pointing to the end of this table/subtable,\n   *         including padding for alignment.\n   *  offset: Of type FT_UInt, the number of octets from the start to target.\n   *  length: Of type FT_UInt, the number of octets from the start to the\n   *          end in this table/subtable, including padding for alignment.\n   *\n   *  _MIN, _MAX: Should be added to the tail of macros, as INT_MIN, etc.\n   */\n\n\n#ifndef __GXVCOMMN_H__\n#define __GXVCOMMN_H__\n\n\n#include <ft2build.h>\n#include \"gxvalid.h\"\n#include FT_INTERNAL_DEBUG_H\n#include FT_SFNT_NAMES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /* some variables are not evaluated or only used in trace */\n\n#ifdef  FT_DEBUG_LEVEL_TRACE\n#define GXV_LOAD_TRACE_VARS\n#else\n#undef  GXV_LOAD_TRACE_VARS\n#endif\n\n#undef GXV_LOAD_UNUSED_VARS /* debug purpose */\n\n#define IS_PARANOID_VALIDATION          ( gxvalid->root->level >= FT_VALIDATE_PARANOID )\n#define GXV_SET_ERR_IF_PARANOID( err )  { if ( IS_PARANOID_VALIDATION ) ( err ); }\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         VALIDATION                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct GXV_ValidatorRec_*  GXV_Validator;\n\n\n#define DUMMY_LIMIT 0\n\n  typedef void\n  (*GXV_Validate_Func)( FT_Bytes       table,\n                        FT_Bytes       limit,\n                        GXV_Validator  gxvalid );\n\n\n  /* ====================== LookupTable Validator ======================== */\n\n  typedef union  GXV_LookupValueDesc_\n  {\n    FT_UShort u;\n    FT_Short  s;\n\n  } GXV_LookupValueDesc;\n\n  typedef const GXV_LookupValueDesc* GXV_LookupValueCPtr;\n\n  typedef enum  GXV_LookupValue_SignSpec_\n  {\n    GXV_LOOKUPVALUE_UNSIGNED = 0,\n    GXV_LOOKUPVALUE_SIGNED\n\n  } GXV_LookupValue_SignSpec;\n\n\n  typedef void\n  (*GXV_Lookup_Value_Validate_Func)( FT_UShort            glyph,\n                                     GXV_LookupValueCPtr  value_p,\n                                     GXV_Validator        gxvalid );\n\n  typedef GXV_LookupValueDesc\n  (*GXV_Lookup_Fmt4_Transit_Func)( FT_UShort            relative_gindex,\n                                   GXV_LookupValueCPtr  base_value_p,\n                                   FT_Bytes             lookuptbl_limit,\n                                   GXV_Validator        gxvalid );\n\n\n  /* ====================== StateTable Validator ========================= */\n\n  typedef enum  GXV_GlyphOffset_Format_\n  {\n    GXV_GLYPHOFFSET_NONE   = -1,\n    GXV_GLYPHOFFSET_UCHAR  = 2,\n    GXV_GLYPHOFFSET_CHAR,\n    GXV_GLYPHOFFSET_USHORT = 4,\n    GXV_GLYPHOFFSET_SHORT,\n    GXV_GLYPHOFFSET_ULONG  = 8,\n    GXV_GLYPHOFFSET_LONG\n\n  } GXV_GlyphOffset_Format;\n\n\n#define GXV_GLYPHOFFSET_FMT( table )           \\\n        ( gxvalid->table.entry_glyphoffset_fmt )\n\n#define GXV_GLYPHOFFSET_SIZE( table )              \\\n        ( gxvalid->table.entry_glyphoffset_fmt / 2 )\n\n\n  /* ----------------------- 16bit StateTable ---------------------------- */\n\n  typedef union  GXV_StateTable_GlyphOffsetDesc_\n  {\n    FT_Byte    uc;\n    FT_UShort  u;       /* same as GXV_LookupValueDesc */\n    FT_ULong   ul;\n    FT_Char    c;\n    FT_Short   s;       /* same as GXV_LookupValueDesc */\n    FT_Long    l;\n\n  } GXV_StateTable_GlyphOffsetDesc;\n\n  typedef const GXV_StateTable_GlyphOffsetDesc* GXV_StateTable_GlyphOffsetCPtr;\n\n  typedef void\n  (*GXV_StateTable_Subtable_Setup_Func)( FT_UShort      table_size,\n                                         FT_UShort      classTable,\n                                         FT_UShort      stateArray,\n                                         FT_UShort      entryTable,\n                                         FT_UShort*     classTable_length_p,\n                                         FT_UShort*     stateArray_length_p,\n                                         FT_UShort*     entryTable_length_p,\n                                         GXV_Validator  gxvalid );\n\n  typedef void\n  (*GXV_StateTable_Entry_Validate_Func)(\n     FT_Byte                         state,\n     FT_UShort                       flags,\n     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n     FT_Bytes                        statetable_table,\n     FT_Bytes                        statetable_limit,\n     GXV_Validator                   gxvalid );\n\n  typedef void\n  (*GXV_StateTable_OptData_Load_Func)( FT_Bytes       table,\n                                       FT_Bytes       limit,\n                                       GXV_Validator  gxvalid );\n\n  typedef struct  GXV_StateTable_ValidatorRec_\n  {\n    GXV_GlyphOffset_Format              entry_glyphoffset_fmt;\n    void*                               optdata;\n\n    GXV_StateTable_Subtable_Setup_Func  subtable_setup_func;\n    GXV_StateTable_Entry_Validate_Func  entry_validate_func;\n    GXV_StateTable_OptData_Load_Func    optdata_load_func;\n\n  } GXV_StateTable_ValidatorRec, *GXV_StateTable_ValidatorRecData;\n\n\n  /* ---------------------- 32bit XStateTable ---------------------------- */\n\n  typedef GXV_StateTable_GlyphOffsetDesc  GXV_XStateTable_GlyphOffsetDesc;\n\n  typedef const GXV_XStateTable_GlyphOffsetDesc* GXV_XStateTable_GlyphOffsetCPtr;\n\n  typedef void\n  (*GXV_XStateTable_Subtable_Setup_Func)( FT_ULong       table_size,\n                                          FT_ULong       classTable,\n                                          FT_ULong       stateArray,\n                                          FT_ULong       entryTable,\n                                          FT_ULong*      classTable_length_p,\n                                          FT_ULong*      stateArray_length_p,\n                                          FT_ULong*      entryTable_length_p,\n                                          GXV_Validator  gxvalid );\n\n  typedef void\n  (*GXV_XStateTable_Entry_Validate_Func)(\n     FT_UShort                       state,\n     FT_UShort                       flags,\n     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n     FT_Bytes                        xstatetable_table,\n     FT_Bytes                        xstatetable_limit,\n     GXV_Validator                   gxvalid );\n\n\n  typedef GXV_StateTable_OptData_Load_Func  GXV_XStateTable_OptData_Load_Func;\n\n\n  typedef struct  GXV_XStateTable_ValidatorRec_\n  {\n    int                                  entry_glyphoffset_fmt;\n    void*                                optdata;\n\n    GXV_XStateTable_Subtable_Setup_Func  subtable_setup_func;\n    GXV_XStateTable_Entry_Validate_Func  entry_validate_func;\n    GXV_XStateTable_OptData_Load_Func    optdata_load_func;\n\n    FT_ULong                             nClasses;\n    FT_UShort                            maxClassID;\n\n  } GXV_XStateTable_ValidatorRec, *GXV_XStateTable_ValidatorRecData;\n\n\n  /* ===================================================================== */\n\n  typedef struct  GXV_ValidatorRec_\n  {\n    FT_Validator  root;\n\n    FT_Face       face;\n    void*         table_data;\n\n    FT_ULong      subtable_length;\n\n    GXV_LookupValue_SignSpec        lookupval_sign;\n    GXV_Lookup_Value_Validate_Func  lookupval_func;\n    GXV_Lookup_Fmt4_Transit_Func    lookupfmt4_trans;\n    FT_Bytes                        lookuptbl_head;\n\n    FT_UShort  min_gid;\n    FT_UShort  max_gid;\n\n    GXV_StateTable_ValidatorRec     statetable;\n    GXV_XStateTable_ValidatorRec    xstatetable;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    FT_UInt             debug_indent;\n    const FT_String*    debug_function_name[3];\n#endif\n\n  } GXV_ValidatorRec;\n\n\n#define GXV_TABLE_DATA( tag, field )                           \\\n        ( ( (GXV_ ## tag ## _Data)gxvalid->table_data )->field )\n\n#undef  FT_INVALID_\n#define FT_INVALID_( _error ) \\\n          ft_validator_error( gxvalid->root, FT_THROW( _error ) )\n\n#define GXV_LIMIT_CHECK( _count )                                     \\\n          FT_BEGIN_STMNT                                              \\\n            if ( p + _count > ( limit? limit : gxvalid->root->limit ) ) \\\n              FT_INVALID_TOO_SHORT;                                   \\\n          FT_END_STMNT\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n#define GXV_INIT  gxvalid->debug_indent = 0\n\n#define GXV_NAME_ENTER( name )                             \\\n          FT_BEGIN_STMNT                                   \\\n            gxvalid->debug_indent += 2;                      \\\n            FT_TRACE4(( \"%*.s\", gxvalid->debug_indent, 0 )); \\\n            FT_TRACE4(( \"%s table\\n\", name ));             \\\n          FT_END_STMNT\n\n#define GXV_EXIT  gxvalid->debug_indent -= 2\n\n#define GXV_TRACE( s )                                     \\\n          FT_BEGIN_STMNT                                   \\\n            FT_TRACE4(( \"%*.s\", gxvalid->debug_indent, 0 )); \\\n            FT_TRACE4( s );                                \\\n          FT_END_STMNT\n\n#else /* !FT_DEBUG_LEVEL_TRACE */\n\n#define GXV_INIT                do { } while ( 0 )\n#define GXV_NAME_ENTER( name )  do { } while ( 0 )\n#define GXV_EXIT                do { } while ( 0 )\n\n#define GXV_TRACE( s )          do { } while ( 0 )\n\n#endif  /* !FT_DEBUG_LEVEL_TRACE */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    32bit alignment checking                   *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define GXV_32BIT_ALIGNMENT_VALIDATE( a ) \\\n          FT_BEGIN_STMNT                  \\\n            {                             \\\n              if ( (a) & 3 )              \\\n                FT_INVALID_OFFSET;        \\\n            }                             \\\n          FT_END_STMNT\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    Dumping Binary Data                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define GXV_TRACE_HEXDUMP( p, len )                     \\\n          FT_BEGIN_STMNT                                \\\n            {                                           \\\n              FT_Bytes  b;                              \\\n                                                        \\\n                                                        \\\n              for ( b = p; b < (FT_Bytes)p + len; b++ ) \\\n                FT_TRACE1((\"\\\\x%02x\", *b)) ;            \\\n            }                                           \\\n          FT_END_STMNT\n\n#define GXV_TRACE_HEXDUMP_C( p, len )                   \\\n          FT_BEGIN_STMNT                                \\\n            {                                           \\\n              FT_Bytes  b;                              \\\n                                                        \\\n                                                        \\\n              for ( b = p; b < (FT_Bytes)p + len; b++ ) \\\n                if ( 0x40 < *b && *b < 0x7E )           \\\n                  FT_TRACE1((\"%c\", *b)) ;               \\\n                else                                    \\\n                  FT_TRACE1((\"\\\\x%02x\", *b)) ;          \\\n            }                                           \\\n          FT_END_STMNT\n\n#define GXV_TRACE_HEXDUMP_SFNTNAME( n )               \\\n          GXV_TRACE_HEXDUMP( n.string, n.string_len )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         LOOKUP TABLE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  gxv_BinSrchHeader_validate( FT_Bytes       p,\n                              FT_Bytes       limit,\n                              FT_UShort*     unitSize_p,\n                              FT_UShort*     nUnits_p,\n                              GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_LookupTable_validate( FT_Bytes       table,\n                            FT_Bytes       limit,\n                            GXV_Validator  gxvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          Glyph ID                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( FT_Int )\n  gxv_glyphid_validate( FT_UShort      gid,\n                        GXV_Validator  gxvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        CONTROL POINT                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  gxv_ctlPoint_validate( FT_UShort      gid,\n                         FT_Short       ctl_point,\n                         GXV_Validator  gxvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          SFNT NAME                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  gxv_sfntName_validate( FT_UShort      name_index,\n                         FT_UShort      min_index,\n                         FT_UShort      max_index,\n                         GXV_Validator  gxvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          STATE TABLE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  gxv_StateTable_subtable_setup( FT_UShort      table_size,\n                                 FT_UShort      classTable,\n                                 FT_UShort      stateArray,\n                                 FT_UShort      entryTable,\n                                 FT_UShort*     classTable_length_p,\n                                 FT_UShort*     stateArray_length_p,\n                                 FT_UShort*     entryTable_length_p,\n                                 GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_XStateTable_subtable_setup( FT_ULong       table_size,\n                                  FT_ULong       classTable,\n                                  FT_ULong       stateArray,\n                                  FT_ULong       entryTable,\n                                  FT_ULong*      classTable_length_p,\n                                  FT_ULong*      stateArray_length_p,\n                                  FT_ULong*      entryTable_length_p,\n                                  GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_StateTable_validate( FT_Bytes       table,\n                           FT_Bytes       limit,\n                           GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_XStateTable_validate( FT_Bytes       table,\n                            FT_Bytes       limit,\n                            GXV_Validator  gxvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                 UTILITY MACROS AND FUNCTIONS                  *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  gxv_array_getlimits_byte( FT_Bytes       table,\n                            FT_Bytes       limit,\n                            FT_Byte*       min,\n                            FT_Byte*       max,\n                            GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_array_getlimits_ushort( FT_Bytes       table,\n                              FT_Bytes       limit,\n                              FT_UShort*     min,\n                              FT_UShort*     max,\n                              GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_set_length_by_ushort_offset( FT_UShort*     offset,\n                                   FT_UShort**    length,\n                                   FT_UShort*     buff,\n                                   FT_UInt        nmemb,\n                                   FT_UShort      limit,\n                                   GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_set_length_by_ulong_offset( FT_ULong*      offset,\n                                  FT_ULong**     length,\n                                  FT_ULong*      buff,\n                                  FT_UInt        nmemb,\n                                  FT_ULong       limit,\n                                  GXV_Validator  gxvalid);\n\n\n#define GXV_SUBTABLE_OFFSET_CHECK( _offset )          \\\n          FT_BEGIN_STMNT                              \\\n            if ( (_offset) > gxvalid->subtable_length ) \\\n              FT_INVALID_OFFSET;                      \\\n          FT_END_STMNT\n\n#define GXV_SUBTABLE_LIMIT_CHECK( _count )                  \\\n          FT_BEGIN_STMNT                                    \\\n            if ( ( p + (_count) - gxvalid->subtable_start ) > \\\n                   gxvalid->subtable_length )                 \\\n              FT_INVALID_TOO_SHORT;                         \\\n          FT_END_STMNT\n\n#define GXV_USHORT_TO_SHORT( _us )                                    \\\n          ( ( 0x8000U < ( _us ) ) ? ( ( _us ) - 0x8000U ) : ( _us ) )\n\n#define GXV_STATETABLE_HEADER_SIZE  ( 2 + 2 + 2 + 2 )\n#define GXV_STATEHEADER_SIZE        GXV_STATETABLE_HEADER_SIZE\n\n#define GXV_XSTATETABLE_HEADER_SIZE  ( 4 + 4 + 4 + 4 )\n#define GXV_XSTATEHEADER_SIZE        GXV_XSTATETABLE_HEADER_SIZE\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        Table overlapping                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  GXV_odtect_DataRec_\n  {\n    FT_Bytes    start;\n    FT_ULong    length;\n    FT_String*  name;\n\n  } GXV_odtect_DataRec,  *GXV_odtect_Data;\n\n  typedef struct  GXV_odtect_RangeRec_\n  {\n    FT_UInt          nRanges;\n    GXV_odtect_Data  range;\n\n  } GXV_odtect_RangeRec, *GXV_odtect_Range;\n\n\n  FT_LOCAL( void )\n  gxv_odtect_add_range( FT_Bytes          start,\n                        FT_ULong          length,\n                        const FT_String*  name,\n                        GXV_odtect_Range  odtect );\n\n  FT_LOCAL( void )\n  gxv_odtect_validate( GXV_odtect_Range  odtect,\n                       GXV_Validator     gxvalid );\n\n\n#define GXV_ODTECT( n, odtect )                              \\\n          GXV_odtect_DataRec   odtect ## _range[n];          \\\n          GXV_odtect_RangeRec  odtect ## _rec = { 0, NULL }; \\\n          GXV_odtect_Range     odtect = NULL\n\n#define GXV_ODTECT_INIT( odtect )                      \\\n          FT_BEGIN_STMNT                               \\\n            odtect ## _rec.nRanges = 0;                \\\n            odtect ## _rec.range   = odtect ## _range; \\\n            odtect                 = & odtect ## _rec; \\\n          FT_END_STMNT\n\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __GXVCOMMN_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxverror.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxverror.h                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT validation module error codes (specification only).   */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2012-2013                                        */\n/*    by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the OpenType validation module error      */\n  /* enumeration constants.                                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __GXVERROR_H__\n#define __GXVERROR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  GXV_Err_\n#define FT_ERR_BASE    FT_Mod_Err_GXvalid\n\n#include FT_ERRORS_H\n\n#endif /* __GXVERROR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvfeat.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvfeat.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT feat table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2008, 2012 by                                    */\n/*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n#include \"gxvfeat.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvfeat\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      Data and Types                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  GXV_feat_DataRec_\n  {\n    FT_UInt    reserved_size;\n    FT_UShort  feature;\n    FT_UShort  setting;\n\n  } GXV_feat_DataRec, *GXV_feat_Data;\n\n\n#define GXV_FEAT_DATA( field )  GXV_TABLE_DATA( feat, field )\n\n\n  typedef enum  GXV_FeatureFlagsMask_\n  {\n    GXV_FEAT_MASK_EXCLUSIVE_SETTINGS = 0x8000U,\n    GXV_FEAT_MASK_DYNAMIC_DEFAULT    = 0x4000,\n    GXV_FEAT_MASK_UNUSED             = 0x3F00,\n    GXV_FEAT_MASK_DEFAULT_SETTING    = 0x00FF\n\n  } GXV_FeatureFlagsMask;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  gxv_feat_registry_validate( FT_UShort      feature,\n                              FT_UShort      nSettings,\n                              FT_Bool        exclusive,\n                              GXV_Validator  gxvalid )\n  {\n    GXV_NAME_ENTER( \"feature in registry\" );\n\n    GXV_TRACE(( \" (feature = %u)\\n\", feature ));\n\n    if ( feature >= gxv_feat_registry_length )\n    {\n      GXV_TRACE(( \"feature number %d is out of range %d\\n\",\n                  feature, gxv_feat_registry_length ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n      goto Exit;\n    }\n\n    if ( gxv_feat_registry[feature].existence == 0 )\n    {\n      GXV_TRACE(( \"feature number %d is in defined range but doesn't exist\\n\",\n                  feature ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n      goto Exit;\n    }\n\n    if ( gxv_feat_registry[feature].apple_reserved )\n    {\n      /* Don't use here. Apple is reserved. */\n      GXV_TRACE(( \"feature number %d is reserved by Apple\\n\", feature ));\n      if ( gxvalid->root->level >= FT_VALIDATE_TIGHT )\n        FT_INVALID_DATA;\n    }\n\n    if ( nSettings != gxv_feat_registry[feature].nSettings )\n    {\n      GXV_TRACE(( \"feature %d: nSettings %d != defined nSettings %d\\n\",\n                  feature, nSettings,\n                  gxv_feat_registry[feature].nSettings ));\n      if ( gxvalid->root->level >= FT_VALIDATE_TIGHT )\n        FT_INVALID_DATA;\n    }\n\n    if ( exclusive != gxv_feat_registry[feature].exclusive )\n    {\n      GXV_TRACE(( \"exclusive flag %d differs from predefined value\\n\",\n                  exclusive ));\n      if ( gxvalid->root->level >= FT_VALIDATE_TIGHT )\n        FT_INVALID_DATA;\n    }\n\n  Exit:\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_feat_name_index_validate( FT_Bytes       table,\n                                FT_Bytes       limit,\n                                GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    FT_Short  nameIndex;\n\n\n    GXV_NAME_ENTER( \"nameIndex\" );\n\n    GXV_LIMIT_CHECK( 2 );\n    nameIndex = FT_NEXT_SHORT ( p );\n    GXV_TRACE(( \" (nameIndex = %d)\\n\", nameIndex ));\n\n    gxv_sfntName_validate( (FT_UShort)nameIndex,\n                           255,\n                           32768U,\n                           gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_feat_setting_validate( FT_Bytes       table,\n                             FT_Bytes       limit,\n                             FT_Bool        exclusive,\n                             GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  setting;\n\n\n    GXV_NAME_ENTER( \"setting\" );\n\n    GXV_LIMIT_CHECK( 2 );\n\n    setting = FT_NEXT_USHORT( p );\n\n    /* If we have exclusive setting, the setting should be odd. */\n    if ( exclusive && ( setting & 1 ) == 0 )\n      FT_INVALID_DATA;\n\n    gxv_feat_name_index_validate( p, limit, gxvalid );\n\n    GXV_FEAT_DATA( setting ) = setting;\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_feat_name_validate( FT_Bytes       table,\n                          FT_Bytes       limit,\n                          GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p             = table;\n    FT_UInt    reserved_size = GXV_FEAT_DATA( reserved_size );\n\n    FT_UShort  feature;\n    FT_UShort  nSettings;\n    FT_ULong   settingTable;\n    FT_UShort  featureFlags;\n\n    FT_Bool    exclusive;\n    FT_Int     last_setting;\n    FT_UInt    i;\n\n\n    GXV_NAME_ENTER( \"name\" );\n\n    /* feature + nSettings + settingTable + featureFlags */\n    GXV_LIMIT_CHECK( 2 + 2 + 4 + 2 );\n\n    feature = FT_NEXT_USHORT( p );\n    GXV_FEAT_DATA( feature ) = feature;\n\n    nSettings    = FT_NEXT_USHORT( p );\n    settingTable = FT_NEXT_ULONG ( p );\n    featureFlags = FT_NEXT_USHORT( p );\n\n    if ( settingTable < reserved_size )\n      FT_INVALID_OFFSET;\n\n    if ( ( featureFlags & GXV_FEAT_MASK_UNUSED ) == 0 )\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n\n    exclusive = FT_BOOL( featureFlags & GXV_FEAT_MASK_EXCLUSIVE_SETTINGS );\n    if ( exclusive )\n    {\n      FT_Byte  dynamic_default;\n\n\n      if ( featureFlags & GXV_FEAT_MASK_DYNAMIC_DEFAULT )\n        dynamic_default = (FT_Byte)( featureFlags &\n                                     GXV_FEAT_MASK_DEFAULT_SETTING );\n      else\n        dynamic_default = 0;\n\n      /* If exclusive, check whether default setting is in the range. */\n      if ( !( dynamic_default < nSettings ) )\n        FT_INVALID_FORMAT;\n    }\n\n    gxv_feat_registry_validate( feature, nSettings, exclusive, gxvalid );\n\n    gxv_feat_name_index_validate( p, limit, gxvalid );\n\n    p = gxvalid->root->base + settingTable;\n    for ( last_setting = -1, i = 0; i < nSettings; i++ )\n    {\n      gxv_feat_setting_validate( p, limit, exclusive, gxvalid );\n\n      if ( (FT_Int)GXV_FEAT_DATA( setting ) <= last_setting )\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );\n\n      last_setting = (FT_Int)GXV_FEAT_DATA( setting );\n      /* setting + nameIndex */\n      p += ( 2 + 2 );\n    }\n\n    GXV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         feat TABLE                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  gxv_feat_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    GXV_ValidatorRec  gxvalidrec;\n    GXV_Validator     gxvalid = &gxvalidrec;\n\n    GXV_feat_DataRec  featrec;\n    GXV_feat_Data     feat = &featrec;\n\n    FT_Bytes          p     = table;\n    FT_Bytes          limit = 0;\n\n    FT_UInt           featureNameCount;\n\n    FT_UInt           i;\n    FT_Int            last_feature;\n\n\n    gxvalid->root       = ftvalid;\n    gxvalid->table_data = feat;\n    gxvalid->face       = face;\n\n    FT_TRACE3(( \"validating `feat' table\\n\" ));\n    GXV_INIT;\n\n    feat->reserved_size = 0;\n\n    /* version + featureNameCount + none_0 + none_1  */\n    GXV_LIMIT_CHECK( 4 + 2 + 2 + 4 );\n    feat->reserved_size += 4 + 2 + 2 + 4;\n\n    if ( FT_NEXT_ULONG( p ) != 0x00010000UL ) /* Version */\n      FT_INVALID_FORMAT;\n\n    featureNameCount = FT_NEXT_USHORT( p );\n    GXV_TRACE(( \" (featureNameCount = %d)\\n\", featureNameCount ));\n\n    if ( !( IS_PARANOID_VALIDATION ) )\n      p += 6; /* skip (none) and (none) */\n    else\n    {\n      if ( FT_NEXT_USHORT( p ) != 0 )\n        FT_INVALID_DATA;\n\n      if ( FT_NEXT_ULONG( p )  != 0 )\n        FT_INVALID_DATA;\n    }\n\n    feat->reserved_size += featureNameCount * ( 2 + 2 + 4 + 2 + 2 );\n\n    for ( last_feature = -1, i = 0; i < featureNameCount; i++ )\n    {\n      gxv_feat_name_validate( p, limit, gxvalid );\n\n      if ( (FT_Int)GXV_FEAT_DATA( feature ) <= last_feature )\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );\n\n      last_feature = GXV_FEAT_DATA( feature );\n      p += 2 + 2 + 4 + 2 + 2;\n    }\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvfeat.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvfeat.h                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT feat table validation (specification).                */\n/*                                                                         */\n/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __GXVFEAT_H__\n#define __GXVFEAT_H__\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                Registry predefined by Apple                   *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* TODO: More compact format */\n  typedef struct  GXV_Feature_RegistryRec_\n  {\n    FT_Bool  existence;\n    FT_Bool  apple_reserved;\n    FT_Bool  exclusive;\n    FT_Byte  nSettings;\n\n  } GX_Feature_RegistryRec;\n\n\n#define gxv_feat_registry_length                  \\\n          ( sizeof ( gxv_feat_registry ) /        \\\n              sizeof ( GX_Feature_RegistryRec ) )\n\n\n  static GX_Feature_RegistryRec  gxv_feat_registry[] =\n  {\n    /* Generated from gxvfgen.c */\n    {1, 0, 0,  1},   /* All Typographic Features */\n    {1, 0, 0,  8},   /* Ligatures */\n    {1, 0, 1,  3},   /* Cursive Connection */\n    {1, 0, 1,  6},   /* Letter Case */\n    {1, 0, 0,  1},   /* Vertical Substitution */\n    {1, 0, 0,  1},   /* Linguistic Rearrangement */\n    {1, 0, 1,  2},   /* Number Spacing */\n    {1, 1, 0,  0},   /* Apple Reserved 1 */\n    {1, 0, 0,  5},   /* Smart Swashes */\n    {1, 0, 1,  3},   /* Diacritics */\n    {1, 0, 1,  4},   /* Vertical Position */\n    {1, 0, 1,  3},   /* Fractions */\n    {1, 1, 0,  0},   /* Apple Reserved 2 */\n    {1, 0, 0,  1},   /* Overlapping Characters */\n    {1, 0, 0,  6},   /* Typographic Extras */\n    {1, 0, 0,  5},   /* Mathematical Extras */\n    {1, 0, 1,  7},   /* Ornament Sets */\n    {1, 0, 1,  1},   /* Character Alternatives */\n    {1, 0, 1,  5},   /* Design Complexity */\n    {1, 0, 1,  6},   /* Style Options */\n    {1, 0, 1, 11},   /* Character Shape */\n    {1, 0, 1,  2},   /* Number Case */\n    {1, 0, 1,  4},   /* Text Spacing */\n    {1, 0, 1, 10},   /* Transliteration */\n    {1, 0, 1,  9},   /* Annotation */\n    {1, 0, 1,  2},   /* Kana Spacing */\n    {1, 0, 1,  2},   /* Ideographic Spacing */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {0, 0, 0,  0},   /* __EMPTY__ */\n    {1, 0, 1,  4},   /* Text Spacing */\n    {1, 0, 1,  2},   /* Kana Spacing */\n    {1, 0, 1,  2},   /* Ideographic Spacing */\n    {1, 0, 1,  4},   /* CJK Roman Spacing */\n  };\n\n\n#endif /* __GXVFEAT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvfgen.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxfgen.c                                                               */\n/*                                                                         */\n/*    Generate feature registry data for gxv `feat' validator.             */\n/*    This program is derived from gxfeatreg.c in gxlayout.                */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2006 by Masatake YAMATO and Redhat K.K.          */\n/*                                                                         */\n/*  This file may only be used,                                            */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/*  gxfeatreg.c                                                            */\n/*                                                                         */\n/*    Database of font features pre-defined by Apple Computer, Inc.        */\n/*    http://developer.apple.com/fonts/Registry/                           */\n/*    (body).                                                              */\n/*                                                                         */\n/*  Copyright 2003 by                                                      */\n/*  Masatake YAMATO and Redhat K.K.                                        */\n/*                                                                         */\n/*  This file may only be used,                                            */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* Development of gxfeatreg.c is supported by                              */\n/* Information-technology Promotion Agency, Japan.                         */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* This file is compiled as a stand-alone executable.                      */\n/* This file is never compiled into `libfreetype2'.                        */\n/* The output of this file is used in `gxvfeat.c'.                         */\n/* ----------------------------------------------------------------------- */\n/* Compile: gcc `pkg-config --cflags freetype2` gxvfgen.c -o gxvfgen       */\n/* Run: ./gxvfgen > tmp.c                                                  */\n/*                                                                         */\n/***************************************************************************/\n\n  /*******************************************************************/\n  /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */\n  /*******************************************************************/\n\n  /*\n   * If you add a new setting to a feature, check the number of settings\n   * in the feature.  If the number is greater than the value defined as\n   * FEATREG_MAX_SETTING, update the value.\n   */\n#define FEATREG_MAX_SETTING  12\n\n  /*******************************************************************/\n  /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */\n  /*******************************************************************/\n\n\n#include <stdio.h>\n#include <string.h>\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      Data and Types                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define APPLE_RESERVED         \"Apple Reserved\"\n#define APPLE_RESERVED_LENGTH  14\n\n  typedef struct  GX_Feature_RegistryRec_\n  {\n    const char*  feat_name;\n    char         exclusive;\n    char*        setting_name[FEATREG_MAX_SETTING];\n\n  } GX_Feature_RegistryRec;\n\n\n#define EMPTYFEAT {0, 0, {NULL}}\n\n\n  static GX_Feature_RegistryRec featreg_table[] = {\n    {                                       /* 0 */\n      \"All Typographic Features\",\n      0,\n      {\n        \"All Type Features\",\n        NULL\n      }\n    }, {                                    /* 1 */\n      \"Ligatures\",\n      0,\n      {\n        \"Required Ligatures\",\n        \"Common Ligatures\",\n        \"Rare Ligatures\",\n        \"Logos\",\n        \"Rebus Pictures\",\n        \"Diphthong Ligatures\",\n        \"Squared Ligatures\",\n        \"Squared Ligatures, Abbreviated\",\n        NULL\n      }\n    }, {                                    /* 2 */\n      \"Cursive Connection\",\n      1,\n      {\n        \"Unconnected\",\n        \"Partially Connected\",\n        \"Cursive\",\n        NULL\n      }\n    }, {                                    /* 3 */\n      \"Letter Case\",\n      1,\n      {\n        \"Upper & Lower Case\",\n        \"All Caps\",\n        \"All Lower Case\",\n        \"Small Caps\",\n        \"Initial Caps\",\n        \"Initial Caps & Small Caps\",\n        NULL\n      }\n    }, {                                    /* 4 */\n      \"Vertical Substitution\",\n      0,\n      {\n        /* \"Substitute Vertical Forms\", */\n        \"Turns on the feature\",\n        NULL\n      }\n    }, {                                    /* 5 */\n      \"Linguistic Rearrangement\",\n      0,\n      {\n        /* \"Linguistic Rearrangement\", */\n        \"Turns on the feature\",\n        NULL\n      }\n    }, {                                    /* 6 */\n      \"Number Spacing\",\n      1,\n      {\n        \"Monospaced Numbers\",\n        \"Proportional Numbers\",\n        NULL\n      }\n    }, {                                    /* 7 */\n      APPLE_RESERVED \" 1\",\n      0,\n      {NULL}\n    }, {                                    /* 8 */\n      \"Smart Swashes\",\n      0,\n      {\n        \"Word Initial Swashes\",\n        \"Word Final Swashes\",\n        \"Line Initial Swashes\",\n        \"Line Final Swashes\",\n        \"Non-Final Swashes\",\n        NULL\n      }\n    }, {                                    /* 9 */\n      \"Diacritics\",\n      1,\n      {\n        \"Show Diacritics\",\n        \"Hide Diacritics\",\n        \"Decompose Diacritics\",\n        NULL\n      }\n    }, {                                    /* 10 */\n      \"Vertical Position\",\n      1,\n      {\n        /* \"Normal Position\", */\n        \"No Vertical Position\",\n        \"Superiors\",\n        \"Inferiors\",\n        \"Ordinals\",\n        NULL\n      }\n    }, {                                    /* 11 */\n      \"Fractions\",\n      1,\n      {\n        \"No Fractions\",\n        \"Vertical Fractions\",\n        \"Diagonal Fractions\",\n        NULL\n      }\n    }, {                                    /* 12 */\n      APPLE_RESERVED \" 2\",\n      0,\n      {NULL}\n    }, {                                    /* 13 */\n      \"Overlapping Characters\",\n      0,\n      {\n        /* \"Prevent Overlap\", */\n        \"Turns on the feature\",\n        NULL\n      }\n    }, {                                    /* 14 */\n      \"Typographic Extras\",\n      0,\n      {\n        \"Hyphens to Em Dash\",\n        \"Hyphens to En Dash\",\n        \"Unslashed Zero\",\n        \"Form Interrobang\",\n        \"Smart Quotes\",\n        \"Periods to Ellipsis\",\n        NULL\n      }\n    }, {                                    /* 15 */\n      \"Mathematical Extras\",\n      0,\n      {\n        \"Hyphens to Minus\",\n        \"Asterisk to Multiply\",\n        \"Slash to Divide\",\n        \"Inequality Ligatures\",\n        \"Exponents\",\n        NULL\n      }\n    }, {                                    /* 16 */\n      \"Ornament Sets\",\n      1,\n      {\n        \"No Ornaments\",\n        \"Dingbats\",\n        \"Pi Characters\",\n        \"Fleurons\",\n        \"Decorative Borders\",\n        \"International Symbols\",\n        \"Math Symbols\",\n        NULL\n      }\n    }, {                                    /* 17 */\n      \"Character Alternatives\",\n      1,\n      {\n        \"No Alternates\",\n        /* TODO */\n        NULL\n      }\n    }, {                                    /* 18 */\n      \"Design Complexity\",\n      1,\n      {\n        \"Design Level 1\",\n        \"Design Level 2\",\n        \"Design Level 3\",\n        \"Design Level 4\",\n        \"Design Level 5\",\n        /* TODO */\n        NULL\n      }\n    }, {                                    /* 19 */\n      \"Style Options\",\n      1,\n      {\n        \"No Style Options\",\n        \"Display Text\",\n        \"Engraved Text\",\n        \"Illuminated Caps\",\n        \"Tilling Caps\",\n        \"Tall Caps\",\n        NULL\n      }\n    }, {                                    /* 20 */\n      \"Character Shape\",\n      1,\n      {\n        \"Traditional Characters\",\n        \"Simplified Characters\",\n        \"JIS 1978 Characters\",\n        \"JIS 1983 Characters\",\n        \"JIS 1990 Characters\",\n        \"Traditional Characters, Alternative Set 1\",\n        \"Traditional Characters, Alternative Set 2\",\n        \"Traditional Characters, Alternative Set 3\",\n        \"Traditional Characters, Alternative Set 4\",\n        \"Traditional Characters, Alternative Set 5\",\n        \"Expert Characters\",\n        NULL                           /* count => 12 */\n      }\n    }, {                                    /* 21 */\n      \"Number Case\",\n      1,\n      {\n        \"Lower Case Numbers\",\n        \"Upper Case Numbers\",\n        NULL\n      }\n    }, {                                    /* 22 */\n      \"Text Spacing\",\n      1,\n      {\n        \"Proportional\",\n        \"Monospaced\",\n        \"Half-width\",\n        \"Normal\",\n        NULL\n      }\n    }, /* Here after Newer */  { /* 23 */\n      \"Transliteration\",\n      1,\n      {\n        \"No Transliteration\",\n        \"Hanja To Hangul\",\n        \"Hiragana to Katakana\",\n        \"Katakana to Hiragana\",\n        \"Kana to Romanization\",\n        \"Romanization to Hiragana\",\n        \"Romanization to Katakana\",\n        \"Hanja to Hangul, Alternative Set 1\",\n        \"Hanja to Hangul, Alternative Set 2\",\n        \"Hanja to Hangul, Alternative Set 3\",\n        NULL\n      }\n    }, {                                    /* 24 */\n      \"Annotation\",\n      1,\n      {\n        \"No Annotation\",\n        \"Box Annotation\",\n        \"Rounded Box Annotation\",\n        \"Circle Annotation\",\n        \"Inverted Circle Annotation\",\n        \"Parenthesis Annotation\",\n        \"Period Annotation\",\n        \"Roman Numeral Annotation\",\n        \"Diamond Annotation\",\n        NULL\n      }\n    }, {                                    /* 25 */\n      \"Kana Spacing\",\n      1,\n      {\n        \"Full Width\",\n        \"Proportional\",\n        NULL\n      }\n    }, {                                    /* 26 */\n      \"Ideographic Spacing\",\n      1,\n      {\n        \"Full Width\",\n        \"Proportional\",\n        NULL\n      }\n    }, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,         /* 27-30 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 31-35 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 36-40 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 40-45 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 46-50 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 51-55 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 56-60 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 61-65 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 66-70 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 71-75 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 76-80 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 81-85 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 86-90 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 91-95 */\n    EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,                       /* 96-98 */\n    EMPTYFEAT, /* 99 */ {                   /* 100 => 22 */\n      \"Text Spacing\",\n      1,\n      {\n        \"Proportional\",\n        \"Monospaced\",\n        \"Half-width\",\n        \"Normal\",\n        NULL\n      }\n    }, {                                    /* 101 => 25 */\n      \"Kana Spacing\",\n      1,\n      {\n        \"Full Width\",\n        \"Proportional\",\n        NULL\n      }\n    }, {                                    /* 102 => 26 */\n      \"Ideographic Spacing\",\n      1,\n      {\n        \"Full Width\",\n        \"Proportional\",\n        NULL\n      }\n    }, {                                    /* 103 */\n      \"CJK Roman Spacing\",\n      1,\n      {\n        \"Half-width\",\n        \"Proportional\",\n        \"Default Roman\",\n        \"Full-width Roman\",\n        NULL\n      }\n    }, {                                    /* 104 => 1 */\n      \"All Typographic Features\",\n      0,\n      {\n        \"All Type Features\",\n        NULL\n      }\n    }\n  };\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         Generator                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  int\n  main( void )\n  {\n    int  i;\n\n\n    printf( \"  {\\n\" );\n    printf( \"   /* Generated from %s */\\n\", __FILE__ );\n\n    for ( i = 0;\n          i < sizeof ( featreg_table ) / sizeof ( GX_Feature_RegistryRec );\n          i++ )\n    {\n      const char*  feat_name;\n      int          nSettings;\n\n\n      feat_name = featreg_table[i].feat_name;\n      for ( nSettings = 0;\n            featreg_table[i].setting_name[nSettings];\n            nSettings++)\n        ;                                   /* Do nothing */\n\n      printf( \"    {%1d, %1d, %1d, %2d},   /* %s */\\n\",\n              feat_name ? 1 : 0,\n              ( feat_name                                                  &&\n                ( ft_strncmp( feat_name,\n                              APPLE_RESERVED, APPLE_RESERVED_LENGTH ) == 0 )\n              ) ? 1 : 0,\n              featreg_table[i].exclusive ? 1 : 0,\n              nSettings,\n              feat_name ? feat_name : \"__EMPTY__\" );\n    }\n\n    printf( \"  };\\n\" );\n\n    return 0;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvjust.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvjust.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT just table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2005, 2014 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n#include FT_SFNT_NAMES_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvjust\n\n  /*\n   * referred `just' table format specification:\n   * http://developer.apple.com/fonts/TTRefMan/RM06/Chap6just.html\n   * last updated 2000.\n   * ----------------------------------------------\n   * [JUST HEADER]: GXV_JUST_HEADER_SIZE\n   * version     (fixed:  32bit) = 0x00010000\n   * format      (uint16: 16bit) = 0 is only defined (2000)\n   * horizOffset (uint16: 16bit)\n   * vertOffset  (uint16: 16bit)\n   * ----------------------------------------------\n   */\n\n  typedef struct  GXV_just_DataRec_\n  {\n    FT_UShort  wdc_offset_max;\n    FT_UShort  wdc_offset_min;\n    FT_UShort  pc_offset_max;\n    FT_UShort  pc_offset_min;\n\n  } GXV_just_DataRec, *GXV_just_Data;\n\n\n#define  GXV_JUST_DATA( a )  GXV_TABLE_DATA( just, a )\n\n\n  /* GX just table does not define their subset of GID */\n  static void\n  gxv_just_check_max_gid( FT_UShort         gid,\n                          const FT_String*  msg_tag,\n                          GXV_Validator     gxvalid )\n  {\n    if ( gid < gxvalid->face->num_glyphs )\n      return;\n\n    GXV_TRACE(( \"just table includes too large %s\"\n                \" GID=%d > %d (in maxp)\\n\",\n                msg_tag, gid, gxvalid->face->num_glyphs ));\n    GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n  }\n\n\n  static void\n  gxv_just_wdp_entry_validate( FT_Bytes       table,\n                               FT_Bytes       limit,\n                               GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_ULong   justClass;\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_Fixed   beforeGrowLimit;\n    FT_Fixed   beforeShrinkGrowLimit;\n    FT_Fixed   afterGrowLimit;\n    FT_Fixed   afterShrinkGrowLimit;\n    FT_UShort  growFlags;\n    FT_UShort  shrinkFlags;\n#endif\n\n\n    GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 + 4 + 2 + 2 );\n    justClass             = FT_NEXT_ULONG( p );\n#ifndef GXV_LOAD_UNUSED_VARS\n    p += 4 + 4 + 4 + 4 + 2 + 2;\n#else\n    beforeGrowLimit       = FT_NEXT_ULONG( p );\n    beforeShrinkGrowLimit = FT_NEXT_ULONG( p );\n    afterGrowLimit        = FT_NEXT_ULONG( p );\n    afterShrinkGrowLimit  = FT_NEXT_ULONG( p );\n    growFlags             = FT_NEXT_USHORT( p );\n    shrinkFlags           = FT_NEXT_USHORT( p );\n#endif\n\n    /* According to Apple spec, only 7bits in justClass is used */\n    if ( ( justClass & 0xFFFFFF80UL ) != 0 )\n    {\n      GXV_TRACE(( \"just table includes non-zero value\"\n                  \" in unused justClass higher bits\"\n                  \" of WidthDeltaPair\" ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  static void\n  gxv_just_wdc_entry_validate( FT_Bytes       table,\n                               FT_Bytes       limit,\n                               GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n    FT_ULong  count, i;\n\n\n    GXV_LIMIT_CHECK( 4 );\n    count = FT_NEXT_ULONG( p );\n    for ( i = 0; i < count; i++ )\n    {\n      GXV_TRACE(( \"validating wdc pair %d/%d\\n\", i + 1, count ));\n      gxv_just_wdp_entry_validate( p, limit, gxvalid );\n      p += gxvalid->subtable_length;\n    }\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  static void\n  gxv_just_widthDeltaClusters_validate( FT_Bytes       table,\n                                        FT_Bytes       limit,\n                                        GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p         = table ;\n    FT_Bytes  wdc_end   = table + GXV_JUST_DATA( wdc_offset_max );\n    FT_UInt   i;\n\n\n    GXV_NAME_ENTER( \"just justDeltaClusters\" );\n\n    if ( limit <= wdc_end )\n      FT_INVALID_OFFSET;\n\n    for ( i = 0; p <= wdc_end; i++ )\n    {\n      gxv_just_wdc_entry_validate( p, limit, gxvalid );\n      p += gxvalid->subtable_length;\n    }\n\n    gxvalid->subtable_length = p - table;\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_just_actSubrecord_type0_validate( FT_Bytes       table,\n                                        FT_Bytes       limit,\n                                        GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n\n    FT_Fixed   lowerLimit;\n    FT_Fixed   upperLimit;\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_UShort  order;\n#endif\n    FT_UShort  decomposedCount;\n\n    FT_UInt    i;\n\n\n    GXV_LIMIT_CHECK( 4 + 4 + 2 + 2 );\n    lowerLimit      = FT_NEXT_ULONG( p );\n    upperLimit      = FT_NEXT_ULONG( p );\n#ifdef GXV_LOAD_UNUSED_VARS\n    order           = FT_NEXT_USHORT( p );\n#else\n    p += 2;\n#endif\n    decomposedCount = FT_NEXT_USHORT( p );\n\n    if ( lowerLimit >= upperLimit )\n    {\n      GXV_TRACE(( \"just table includes invalid range spec:\"\n                  \" lowerLimit(%d) > upperLimit(%d)\\n\"     ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n\n    for ( i = 0; i < decomposedCount; i++ )\n    {\n      FT_UShort glyphs;\n\n\n      GXV_LIMIT_CHECK( 2 );\n      glyphs = FT_NEXT_USHORT( p );\n      gxv_just_check_max_gid( glyphs, \"type0:glyphs\", gxvalid );\n    }\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  static void\n  gxv_just_actSubrecord_type1_validate( FT_Bytes       table,\n                                        FT_Bytes       limit,\n                                        GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  addGlyph;\n\n\n    GXV_LIMIT_CHECK( 2 );\n    addGlyph = FT_NEXT_USHORT( p );\n\n    gxv_just_check_max_gid( addGlyph, \"type1:addGlyph\", gxvalid );\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  static void\n  gxv_just_actSubrecord_type2_validate( FT_Bytes       table,\n                                        FT_Bytes       limit,\n                                        GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_Fixed      substThreshhold; /* Apple misspelled \"Threshhold\" */\n#endif\n    FT_UShort  addGlyph;\n    FT_UShort  substGlyph;\n\n\n    GXV_LIMIT_CHECK( 4 + 2 + 2 );\n#ifdef GXV_LOAD_UNUSED_VARS\n    substThreshhold = FT_NEXT_ULONG( p );\n#else\n    p += 4;\n#endif\n    addGlyph        = FT_NEXT_USHORT( p );\n    substGlyph      = FT_NEXT_USHORT( p );\n\n    if ( addGlyph != 0xFFFF )\n      gxv_just_check_max_gid( addGlyph, \"type2:addGlyph\", gxvalid );\n\n    gxv_just_check_max_gid( substGlyph, \"type2:substGlyph\", gxvalid );\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  static void\n  gxv_just_actSubrecord_type4_validate( FT_Bytes       table,\n                                        FT_Bytes       limit,\n                                        GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n    FT_ULong  variantsAxis;\n    FT_Fixed  minimumLimit;\n    FT_Fixed  noStretchValue;\n    FT_Fixed  maximumLimit;\n\n\n    GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 );\n    variantsAxis   = FT_NEXT_ULONG( p );\n    minimumLimit   = FT_NEXT_ULONG( p );\n    noStretchValue = FT_NEXT_ULONG( p );\n    maximumLimit   = FT_NEXT_ULONG( p );\n\n    gxvalid->subtable_length = p - table;\n\n    if ( variantsAxis != 0x64756374L ) /* 'duct' */\n      GXV_TRACE(( \"variantsAxis 0x%08x is non default value\",\n                   variantsAxis ));\n\n    if ( minimumLimit > noStretchValue )\n      GXV_TRACE(( \"type4:minimumLimit 0x%08x > noStretchValue 0x%08x\\n\",\n                  minimumLimit, noStretchValue ));\n    else if ( noStretchValue > maximumLimit )\n      GXV_TRACE(( \"type4:noStretchValue 0x%08x > maximumLimit 0x%08x\\n\",\n                  noStretchValue, maximumLimit ));\n    else if ( !IS_PARANOID_VALIDATION )\n      return;\n\n    FT_INVALID_DATA;\n  }\n\n\n  static void\n  gxv_just_actSubrecord_type5_validate( FT_Bytes       table,\n                                        FT_Bytes       limit,\n                                        GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  flags;\n    FT_UShort  glyph;\n\n\n    GXV_LIMIT_CHECK( 2 + 2 );\n    flags = FT_NEXT_USHORT( p );\n    glyph = FT_NEXT_USHORT( p );\n\n    if ( flags )\n      GXV_TRACE(( \"type5: nonzero value 0x%04x in unused flags\\n\",\n                   flags ));\n    gxv_just_check_max_gid( glyph, \"type5:glyph\", gxvalid );\n\n    gxvalid->subtable_length = p - table;\n  }\n\n\n  /* parse single actSubrecord */\n  static void\n  gxv_just_actSubrecord_validate( FT_Bytes       table,\n                                  FT_Bytes       limit,\n                                  GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  actionClass;\n    FT_UShort  actionType;\n    FT_ULong   actionLength;\n\n\n    GXV_NAME_ENTER( \"just actSubrecord\" );\n\n    GXV_LIMIT_CHECK( 2 + 2 + 4 );\n    actionClass  = FT_NEXT_USHORT( p );\n    actionType   = FT_NEXT_USHORT( p );\n    actionLength = FT_NEXT_ULONG( p );\n\n    /* actionClass is related with justClass using 7bit only */\n    if ( ( actionClass & 0xFF80 ) != 0 )\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n\n    if ( actionType == 0 )\n      gxv_just_actSubrecord_type0_validate( p, limit, gxvalid );\n    else if ( actionType == 1 )\n      gxv_just_actSubrecord_type1_validate( p, limit, gxvalid );\n    else if ( actionType == 2 )\n      gxv_just_actSubrecord_type2_validate( p, limit, gxvalid );\n    else if ( actionType == 3 )\n      ;                         /* Stretch glyph action: no actionData */\n    else if ( actionType == 4 )\n      gxv_just_actSubrecord_type4_validate( p, limit, gxvalid );\n    else if ( actionType == 5 )\n      gxv_just_actSubrecord_type5_validate( p, limit, gxvalid );\n    else\n      FT_INVALID_DATA;\n\n    gxvalid->subtable_length = actionLength;\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_just_pcActionRecord_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n    FT_ULong  actionCount;\n    FT_ULong  i;\n\n\n    GXV_LIMIT_CHECK( 4 );\n    actionCount = FT_NEXT_ULONG( p );\n    GXV_TRACE(( \"actionCount = %d\\n\", actionCount ));\n\n    for ( i = 0; i < actionCount; i++ )\n    {\n      gxv_just_actSubrecord_validate( p, limit, gxvalid );\n      p += gxvalid->subtable_length;\n    }\n\n    gxvalid->subtable_length = p - table;\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_just_pcTable_LookupValue_entry_validate( FT_UShort            glyph,\n                                               GXV_LookupValueCPtr  value_p,\n                                               GXV_Validator        gxvalid )\n  {\n    FT_UNUSED( glyph );\n\n    if ( value_p->u > GXV_JUST_DATA( pc_offset_max ) )\n      GXV_JUST_DATA( pc_offset_max ) = value_p->u;\n    if ( value_p->u < GXV_JUST_DATA( pc_offset_max ) )\n      GXV_JUST_DATA( pc_offset_min ) = value_p->u;\n  }\n\n\n  static void\n  gxv_just_pcLookupTable_validate( FT_Bytes       table,\n                                   FT_Bytes       limit,\n                                   GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    GXV_NAME_ENTER( \"just pcLookupTable\" );\n    GXV_JUST_DATA( pc_offset_max ) = 0x0000;\n    GXV_JUST_DATA( pc_offset_min ) = 0xFFFFU;\n\n    gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;\n    gxvalid->lookupval_func = gxv_just_pcTable_LookupValue_entry_validate;\n\n    gxv_LookupTable_validate( p, limit, gxvalid );\n\n    /* subtable_length is set by gxv_LookupTable_validate() */\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_just_postcompTable_validate( FT_Bytes       table,\n                                   FT_Bytes       limit,\n                                   GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    GXV_NAME_ENTER( \"just postcompTable\" );\n\n    gxv_just_pcLookupTable_validate( p, limit, gxvalid );\n    p += gxvalid->subtable_length;\n\n    gxv_just_pcActionRecord_validate( p, limit, gxvalid );\n    p += gxvalid->subtable_length;\n\n    gxvalid->subtable_length = p - table;\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_just_classTable_entry_validate(\n    FT_Byte                         state,\n    FT_UShort                       flags,\n    GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n    FT_Bytes                        table,\n    FT_Bytes                        limit,\n    GXV_Validator                   gxvalid )\n  {\n#ifdef GXV_LOAD_UNUSED_VARS\n    /* TODO: validate markClass & currentClass */\n    FT_UShort  setMark;\n    FT_UShort  dontAdvance;\n    FT_UShort  markClass;\n    FT_UShort  currentClass;\n#endif\n\n    FT_UNUSED( state );\n    FT_UNUSED( glyphOffset_p );\n    FT_UNUSED( table );\n    FT_UNUSED( limit );\n    FT_UNUSED( gxvalid );\n\n#ifndef GXV_LOAD_UNUSED_VARS\n    FT_UNUSED( flags );\n#else\n    setMark      = (FT_UShort)( ( flags >> 15 ) & 1    );\n    dontAdvance  = (FT_UShort)( ( flags >> 14 ) & 1    );\n    markClass    = (FT_UShort)( ( flags >> 7  ) & 0x7F );\n    currentClass = (FT_UShort)(   flags         & 0x7F );\n#endif\n  }\n\n\n  static void\n  gxv_just_justClassTable_validate ( FT_Bytes       table,\n                                     FT_Bytes       limit,\n                                     GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  length;\n    FT_UShort  coverage;\n    FT_ULong   subFeatureFlags;\n\n\n    GXV_NAME_ENTER( \"just justClassTable\" );\n\n    GXV_LIMIT_CHECK( 2 + 2 + 4 );\n    length          = FT_NEXT_USHORT( p );\n    coverage        = FT_NEXT_USHORT( p );\n    subFeatureFlags = FT_NEXT_ULONG( p );\n\n    GXV_TRACE(( \"  justClassTable: coverage = 0x%04x (%s) \", coverage ));\n    if ( ( coverage & 0x4000 ) == 0  )\n      GXV_TRACE(( \"ascending\\n\" ));\n    else\n      GXV_TRACE(( \"descending\\n\" ));\n\n    if ( subFeatureFlags )\n      GXV_TRACE(( \"  justClassTable: nonzero value (0x%08x)\"\n                  \" in unused subFeatureFlags\\n\", subFeatureFlags ));\n\n    gxvalid->statetable.optdata               = NULL;\n    gxvalid->statetable.optdata_load_func     = NULL;\n    gxvalid->statetable.subtable_setup_func   = NULL;\n    gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;\n    gxvalid->statetable.entry_validate_func   =\n      gxv_just_classTable_entry_validate;\n\n    gxv_StateTable_validate( p, table + length, gxvalid );\n\n    /* subtable_length is set by gxv_LookupTable_validate() */\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_just_wdcTable_LookupValue_validate( FT_UShort            glyph,\n                                          GXV_LookupValueCPtr  value_p,\n                                          GXV_Validator        gxvalid )\n  {\n    FT_UNUSED( glyph );\n\n    if ( value_p->u > GXV_JUST_DATA( wdc_offset_max ) )\n      GXV_JUST_DATA( wdc_offset_max ) = value_p->u;\n    if ( value_p->u < GXV_JUST_DATA( wdc_offset_min ) )\n      GXV_JUST_DATA( wdc_offset_min ) = value_p->u;\n  }\n\n\n  static void\n  gxv_just_justData_lookuptable_validate( FT_Bytes       table,\n                                          FT_Bytes       limit,\n                                          GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    GXV_JUST_DATA( wdc_offset_max ) = 0x0000;\n    GXV_JUST_DATA( wdc_offset_min ) = 0xFFFFU;\n\n    gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;\n    gxvalid->lookupval_func = gxv_just_wdcTable_LookupValue_validate;\n\n    gxv_LookupTable_validate( p, limit, gxvalid );\n\n    /* subtable_length is set by gxv_LookupTable_validate() */\n\n    GXV_EXIT;\n  }\n\n\n  /*\n   * gxv_just_justData_validate() parses and validates horizData, vertData.\n   */\n  static void\n  gxv_just_justData_validate( FT_Bytes       table,\n                              FT_Bytes       limit,\n                              GXV_Validator  gxvalid )\n  {\n    /*\n     * following 3 offsets are measured from the start of `just'\n     * (which table points to), not justData\n     */\n    FT_UShort  justClassTableOffset;\n    FT_UShort  wdcTableOffset;\n    FT_UShort  pcTableOffset;\n    FT_Bytes   p = table;\n\n    GXV_ODTECT( 4, odtect );\n\n\n    GXV_NAME_ENTER( \"just justData\" );\n\n    GXV_ODTECT_INIT( odtect );\n    GXV_LIMIT_CHECK( 2 + 2 + 2 );\n    justClassTableOffset = FT_NEXT_USHORT( p );\n    wdcTableOffset       = FT_NEXT_USHORT( p );\n    pcTableOffset        = FT_NEXT_USHORT( p );\n\n    GXV_TRACE(( \" (justClassTableOffset = 0x%04x)\\n\", justClassTableOffset ));\n    GXV_TRACE(( \" (wdcTableOffset = 0x%04x)\\n\", wdcTableOffset ));\n    GXV_TRACE(( \" (pcTableOffset = 0x%04x)\\n\", pcTableOffset ));\n\n    gxv_just_justData_lookuptable_validate( p, limit, gxvalid );\n    gxv_odtect_add_range( p, gxvalid->subtable_length,\n                          \"just_LookupTable\", odtect );\n\n    if ( wdcTableOffset )\n    {\n      gxv_just_widthDeltaClusters_validate(\n        gxvalid->root->base + wdcTableOffset, limit, gxvalid );\n      gxv_odtect_add_range( gxvalid->root->base + wdcTableOffset,\n                            gxvalid->subtable_length, \"just_wdcTable\", odtect );\n    }\n\n    if ( pcTableOffset )\n    {\n      gxv_just_postcompTable_validate( gxvalid->root->base + pcTableOffset,\n                                       limit, gxvalid );\n      gxv_odtect_add_range( gxvalid->root->base + pcTableOffset,\n                            gxvalid->subtable_length, \"just_pcTable\", odtect );\n    }\n\n    if ( justClassTableOffset )\n    {\n      gxv_just_justClassTable_validate(\n        gxvalid->root->base + justClassTableOffset, limit, gxvalid );\n      gxv_odtect_add_range( gxvalid->root->base + justClassTableOffset,\n                            gxvalid->subtable_length, \"just_justClassTable\",\n                            odtect );\n    }\n\n    gxv_odtect_validate( odtect, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_just_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    FT_Bytes           p     = table;\n    FT_Bytes           limit = 0;\n\n    GXV_ValidatorRec   gxvalidrec;\n    GXV_Validator      gxvalid = &gxvalidrec;\n    GXV_just_DataRec   justrec;\n    GXV_just_Data      just = &justrec;\n\n    FT_ULong           version;\n    FT_UShort          format;\n    FT_UShort          horizOffset;\n    FT_UShort          vertOffset;\n\n    GXV_ODTECT( 3, odtect );\n\n\n    GXV_ODTECT_INIT( odtect );\n\n    gxvalid->root       = ftvalid;\n    gxvalid->table_data = just;\n    gxvalid->face       = face;\n\n    FT_TRACE3(( \"validating `just' table\\n\" ));\n    GXV_INIT;\n\n    limit      = gxvalid->root->limit;\n\n    GXV_LIMIT_CHECK( 4 + 2 + 2 + 2 );\n    version     = FT_NEXT_ULONG( p );\n    format      = FT_NEXT_USHORT( p );\n    horizOffset = FT_NEXT_USHORT( p );\n    vertOffset  = FT_NEXT_USHORT( p );\n    gxv_odtect_add_range( table, p - table, \"just header\", odtect );\n\n\n    /* Version 1.0 (always:2000) */\n    GXV_TRACE(( \" (version = 0x%08x)\\n\", version ));\n    if ( version != 0x00010000UL )\n      FT_INVALID_FORMAT;\n\n    /* format 0 (always:2000) */\n    GXV_TRACE(( \" (format = 0x%04x)\\n\", format ));\n    if ( format != 0x0000 )\n        FT_INVALID_FORMAT;\n\n    GXV_TRACE(( \" (horizOffset = %d)\\n\", horizOffset  ));\n    GXV_TRACE(( \" (vertOffset = %d)\\n\", vertOffset  ));\n\n\n    /* validate justData */\n    if ( 0 < horizOffset )\n    {\n      gxv_just_justData_validate( table + horizOffset, limit, gxvalid );\n      gxv_odtect_add_range( table + horizOffset, gxvalid->subtable_length,\n                            \"horizJustData\", odtect );\n    }\n\n    if ( 0 < vertOffset )\n    {\n      gxv_just_justData_validate( table + vertOffset, limit, gxvalid );\n      gxv_odtect_add_range( table + vertOffset, gxvalid->subtable_length,\n                            \"vertJustData\", odtect );\n    }\n\n    gxv_odtect_validate( odtect, gxvalid );\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvkern.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvkern.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT kern table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2004-2007, 2013                                              */\n/*  by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n#include FT_SFNT_NAMES_H\n#include FT_SERVICE_GX_VALIDATE_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvkern\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      Data and Types                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef enum  GXV_kern_Version_\n  {\n    KERN_VERSION_CLASSIC = 0x0000,\n    KERN_VERSION_NEW     = 0x0001\n\n  } GXV_kern_Version;\n\n\n  typedef enum GXV_kern_Dialect_\n  {\n    KERN_DIALECT_UNKNOWN = 0,\n    KERN_DIALECT_MS      = FT_VALIDATE_MS,\n    KERN_DIALECT_APPLE   = FT_VALIDATE_APPLE,\n    KERN_DIALECT_ANY     = FT_VALIDATE_CKERN\n\n  } GXV_kern_Dialect;\n\n\n  typedef struct  GXV_kern_DataRec_\n  {\n    GXV_kern_Version  version;\n    void             *subtable_data;\n    GXV_kern_Dialect  dialect_request;\n\n  } GXV_kern_DataRec, *GXV_kern_Data;\n\n\n#define GXV_KERN_DATA( field )  GXV_TABLE_DATA( kern, field )\n\n#define KERN_IS_CLASSIC( gxvalid )                               \\\n          ( KERN_VERSION_CLASSIC == GXV_KERN_DATA( version ) )\n#define KERN_IS_NEW( gxvalid )                                   \\\n          ( KERN_VERSION_NEW     == GXV_KERN_DATA( version ) )\n\n#define KERN_DIALECT( gxvalid )              \\\n          GXV_KERN_DATA( dialect_request )\n#define KERN_ALLOWS_MS( gxvalid )                       \\\n          ( KERN_DIALECT( gxvalid ) & KERN_DIALECT_MS )\n#define KERN_ALLOWS_APPLE( gxvalid )                       \\\n          ( KERN_DIALECT( gxvalid ) & KERN_DIALECT_APPLE )\n\n#define GXV_KERN_HEADER_SIZE           ( KERN_IS_NEW( gxvalid ) ? 8 : 4 )\n#define GXV_KERN_SUBTABLE_HEADER_SIZE  ( KERN_IS_NEW( gxvalid ) ? 8 : 6 )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      SUBTABLE VALIDATORS                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* ============================= format 0 ============================== */\n\n  static void\n  gxv_kern_subtable_fmt0_pairs_validate( FT_Bytes       table,\n                                         FT_Bytes       limit,\n                                         FT_UShort      nPairs,\n                                         GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  i;\n\n    FT_UShort  last_gid_left  = 0;\n    FT_UShort  last_gid_right = 0;\n\n    FT_UNUSED( limit );\n\n\n    GXV_NAME_ENTER( \"kern format 0 pairs\" );\n\n    for ( i = 0; i < nPairs; i++ )\n    {\n      FT_UShort  gid_left;\n      FT_UShort  gid_right;\n#ifdef GXV_LOAD_UNUSED_VARS\n      FT_Short   kernValue;\n#endif\n\n\n      /* left */\n      gid_left  = FT_NEXT_USHORT( p );\n      gxv_glyphid_validate( gid_left, gxvalid );\n\n      /* right */\n      gid_right = FT_NEXT_USHORT( p );\n      gxv_glyphid_validate( gid_right, gxvalid );\n\n      /* Pairs of left and right GIDs must be unique and sorted. */\n      GXV_TRACE(( \"left gid = %u, right gid = %u\\n\", gid_left, gid_right ));\n      if ( gid_left == last_gid_left )\n      {\n        if ( last_gid_right < gid_right )\n          last_gid_right = gid_right;\n        else\n          FT_INVALID_DATA;\n      }\n      else if ( last_gid_left < gid_left )\n      {\n        last_gid_left  = gid_left;\n        last_gid_right = gid_right;\n      }\n      else\n        FT_INVALID_DATA;\n\n      /* skip the kern value */\n#ifdef GXV_LOAD_UNUSED_VARS\n      kernValue = FT_NEXT_SHORT( p );\n#else\n      p += 2;\n#endif\n    }\n\n    GXV_EXIT;\n  }\n\n  static void\n  gxv_kern_subtable_fmt0_validate( FT_Bytes       table,\n                                   FT_Bytes       limit,\n                                   GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table + GXV_KERN_SUBTABLE_HEADER_SIZE;\n\n    FT_UShort  nPairs;\n    FT_UShort  unitSize;\n\n\n    GXV_NAME_ENTER( \"kern subtable format 0\" );\n\n    unitSize = 2 + 2 + 2;\n    nPairs   = 0;\n\n    /* nPairs, searchRange, entrySelector, rangeShift */\n    GXV_LIMIT_CHECK( 2 + 2 + 2 + 2 );\n    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nPairs, gxvalid );\n    p += 2 + 2 + 2 + 2;\n\n    gxv_kern_subtable_fmt0_pairs_validate( p, limit, nPairs, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  /* ============================= format 1 ============================== */\n\n\n  typedef struct  GXV_kern_fmt1_StateOptRec_\n  {\n    FT_UShort  valueTable;\n    FT_UShort  valueTable_length;\n\n  } GXV_kern_fmt1_StateOptRec, *GXV_kern_fmt1_StateOptRecData;\n\n\n  static void\n  gxv_kern_subtable_fmt1_valueTable_load( FT_Bytes       table,\n                                          FT_Bytes       limit,\n                                          GXV_Validator  gxvalid )\n  {\n    FT_Bytes                       p = table;\n    GXV_kern_fmt1_StateOptRecData  optdata =\n      (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata;\n\n\n    GXV_LIMIT_CHECK( 2 );\n    optdata->valueTable = FT_NEXT_USHORT( p );\n  }\n\n\n  /*\n   * passed tables_size covers whole StateTable, including kern fmt1 header\n   */\n  static void\n  gxv_kern_subtable_fmt1_subtable_setup( FT_UShort      table_size,\n                                         FT_UShort      classTable,\n                                         FT_UShort      stateArray,\n                                         FT_UShort      entryTable,\n                                         FT_UShort*     classTable_length_p,\n                                         FT_UShort*     stateArray_length_p,\n                                         FT_UShort*     entryTable_length_p,\n                                         GXV_Validator  gxvalid )\n  {\n    FT_UShort  o[4];\n    FT_UShort  *l[4];\n    FT_UShort  buff[5];\n\n    GXV_kern_fmt1_StateOptRecData  optdata =\n      (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata;\n\n\n    o[0] = classTable;\n    o[1] = stateArray;\n    o[2] = entryTable;\n    o[3] = optdata->valueTable;\n    l[0] = classTable_length_p;\n    l[1] = stateArray_length_p;\n    l[2] = entryTable_length_p;\n    l[3] = &(optdata->valueTable_length);\n\n    gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, gxvalid );\n  }\n\n\n  /*\n   * passed table & limit are of whole StateTable, not including subtables\n   */\n  static void\n  gxv_kern_subtable_fmt1_entry_validate(\n    FT_Byte                         state,\n    FT_UShort                       flags,\n    GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n    FT_Bytes                        table,\n    FT_Bytes                        limit,\n    GXV_Validator                   gxvalid )\n  {\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_UShort  push;\n    FT_UShort  dontAdvance;\n#endif\n    FT_UShort  valueOffset;\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_UShort  kernAction;\n    FT_UShort  kernValue;\n#endif\n\n    FT_UNUSED( state );\n    FT_UNUSED( glyphOffset_p );\n\n\n#ifdef GXV_LOAD_UNUSED_VARS\n    push        = (FT_UShort)( ( flags >> 15 ) & 1      );\n    dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1      );\n#endif\n    valueOffset = (FT_UShort)(   flags         & 0x3FFF );\n\n    {\n      GXV_kern_fmt1_StateOptRecData  vt_rec =\n        (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata;\n      FT_Bytes  p;\n\n\n      if ( valueOffset < vt_rec->valueTable )\n        FT_INVALID_OFFSET;\n\n      p     = table + valueOffset;\n      limit = table + vt_rec->valueTable + vt_rec->valueTable_length;\n\n      GXV_LIMIT_CHECK( 2 + 2 );\n#ifdef GXV_LOAD_UNUSED_VARS\n      kernAction = FT_NEXT_USHORT( p );\n      kernValue  = FT_NEXT_USHORT( p );\n#endif\n    }\n  }\n\n\n  static void\n  gxv_kern_subtable_fmt1_validate( FT_Bytes       table,\n                                   FT_Bytes       limit,\n                                   GXV_Validator  gxvalid )\n  {\n    FT_Bytes                   p = table;\n    GXV_kern_fmt1_StateOptRec  vt_rec;\n\n\n    GXV_NAME_ENTER( \"kern subtable format 1\" );\n\n    gxvalid->statetable.optdata =\n      &vt_rec;\n    gxvalid->statetable.optdata_load_func =\n      gxv_kern_subtable_fmt1_valueTable_load;\n    gxvalid->statetable.subtable_setup_func =\n      gxv_kern_subtable_fmt1_subtable_setup;\n    gxvalid->statetable.entry_glyphoffset_fmt =\n      GXV_GLYPHOFFSET_NONE;\n    gxvalid->statetable.entry_validate_func =\n      gxv_kern_subtable_fmt1_entry_validate;\n\n    gxv_StateTable_validate( p, limit, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  /* ================ Data for Class-Based Subtables 2, 3 ================ */\n\n  typedef enum  GXV_kern_ClassSpec_\n  {\n    GXV_KERN_CLS_L = 0,\n    GXV_KERN_CLS_R\n\n  } GXV_kern_ClassSpec;\n\n\n  /* ============================= format 2 ============================== */\n\n  /* ---------------------- format 2 specific data ----------------------- */\n\n  typedef struct  GXV_kern_subtable_fmt2_DataRec_\n  {\n    FT_UShort         rowWidth;\n    FT_UShort         array;\n    FT_UShort         offset_min[2];\n    FT_UShort         offset_max[2];\n    const FT_String*  class_tag[2];\n    GXV_odtect_Range  odtect;\n\n  } GXV_kern_subtable_fmt2_DataRec, *GXV_kern_subtable_fmt2_Data;\n\n\n#define GXV_KERN_FMT2_DATA( field )                         \\\n        ( ( (GXV_kern_subtable_fmt2_DataRec *)              \\\n              ( GXV_KERN_DATA( subtable_data ) ) )->field )\n\n\n  /* -------------------------- utility functions ----------------------- */\n\n  static void\n  gxv_kern_subtable_fmt2_clstbl_validate( FT_Bytes            table,\n                                          FT_Bytes            limit,\n                                          GXV_kern_ClassSpec  spec,\n                                          GXV_Validator       gxvalid )\n  {\n    const FT_String*  tag    = GXV_KERN_FMT2_DATA( class_tag[spec] );\n    GXV_odtect_Range  odtect = GXV_KERN_FMT2_DATA( odtect );\n\n    FT_Bytes   p = table;\n    FT_UShort  firstGlyph;\n    FT_UShort  nGlyphs;\n\n\n    GXV_NAME_ENTER( \"kern format 2 classTable\" );\n\n    GXV_LIMIT_CHECK( 2 + 2 );\n    firstGlyph = FT_NEXT_USHORT( p );\n    nGlyphs    = FT_NEXT_USHORT( p );\n    GXV_TRACE(( \" %s firstGlyph=%d, nGlyphs=%d\\n\",\n                tag, firstGlyph, nGlyphs ));\n\n    gxv_glyphid_validate( firstGlyph, gxvalid );\n    gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs - 1 ), gxvalid );\n\n    gxv_array_getlimits_ushort( p, p + ( 2 * nGlyphs ),\n                                &( GXV_KERN_FMT2_DATA( offset_min[spec] ) ),\n                                &( GXV_KERN_FMT2_DATA( offset_max[spec] ) ),\n                                gxvalid );\n\n    gxv_odtect_add_range( table, 2 * nGlyphs, tag, odtect );\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_kern_subtable_fmt2_validate( FT_Bytes       table,\n                                   FT_Bytes       limit,\n                                   GXV_Validator  gxvalid )\n  {\n    GXV_ODTECT( 3, odtect );\n    GXV_kern_subtable_fmt2_DataRec  fmt2_rec =\n      { 0, 0, { 0, 0 }, { 0, 0 }, { \"leftClass\", \"rightClass\" }, NULL };\n\n    FT_Bytes   p = table + GXV_KERN_SUBTABLE_HEADER_SIZE;\n    FT_UShort  leftOffsetTable;\n    FT_UShort  rightOffsetTable;\n\n\n    GXV_NAME_ENTER( \"kern subtable format 2\" );\n\n    GXV_ODTECT_INIT( odtect );\n    fmt2_rec.odtect = odtect;\n    GXV_KERN_DATA( subtable_data ) = &fmt2_rec;\n\n    GXV_LIMIT_CHECK( 2 + 2 + 2 + 2 );\n    GXV_KERN_FMT2_DATA( rowWidth ) = FT_NEXT_USHORT( p );\n    leftOffsetTable                = FT_NEXT_USHORT( p );\n    rightOffsetTable               = FT_NEXT_USHORT( p );\n    GXV_KERN_FMT2_DATA( array )    = FT_NEXT_USHORT( p );\n\n    GXV_TRACE(( \"rowWidth = %d\\n\", GXV_KERN_FMT2_DATA( rowWidth ) ));\n\n\n    GXV_LIMIT_CHECK( leftOffsetTable );\n    GXV_LIMIT_CHECK( rightOffsetTable );\n    GXV_LIMIT_CHECK( GXV_KERN_FMT2_DATA( array ) );\n\n    gxv_kern_subtable_fmt2_clstbl_validate( table + leftOffsetTable, limit,\n                                            GXV_KERN_CLS_L, gxvalid );\n\n    gxv_kern_subtable_fmt2_clstbl_validate( table + rightOffsetTable, limit,\n                                            GXV_KERN_CLS_R, gxvalid );\n\n    if ( GXV_KERN_FMT2_DATA( offset_min[GXV_KERN_CLS_L] ) +\n           GXV_KERN_FMT2_DATA( offset_min[GXV_KERN_CLS_R] )\n         < GXV_KERN_FMT2_DATA( array )                      )\n      FT_INVALID_OFFSET;\n\n    gxv_odtect_add_range( table + GXV_KERN_FMT2_DATA( array ),\n                          GXV_KERN_FMT2_DATA( offset_max[GXV_KERN_CLS_L] )\n                            + GXV_KERN_FMT2_DATA( offset_max[GXV_KERN_CLS_R] )\n                            - GXV_KERN_FMT2_DATA( array ),\n                          \"array\", odtect );\n\n    gxv_odtect_validate( odtect, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  /* ============================= format 3 ============================== */\n\n  static void\n  gxv_kern_subtable_fmt3_validate( FT_Bytes       table,\n                                   FT_Bytes       limit,\n                                   GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table + GXV_KERN_SUBTABLE_HEADER_SIZE;\n    FT_UShort  glyphCount;\n    FT_Byte    kernValueCount;\n    FT_Byte    leftClassCount;\n    FT_Byte    rightClassCount;\n    FT_Byte    flags;\n\n\n    GXV_NAME_ENTER( \"kern subtable format 3\" );\n\n    GXV_LIMIT_CHECK( 2 + 1 + 1 + 1 + 1 );\n    glyphCount      = FT_NEXT_USHORT( p );\n    kernValueCount  = FT_NEXT_BYTE( p );\n    leftClassCount  = FT_NEXT_BYTE( p );\n    rightClassCount = FT_NEXT_BYTE( p );\n    flags           = FT_NEXT_BYTE( p );\n\n    if ( gxvalid->face->num_glyphs != glyphCount )\n    {\n      GXV_TRACE(( \"maxGID=%d, but glyphCount=%d\\n\",\n                  gxvalid->face->num_glyphs, glyphCount ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n    }\n\n    if ( flags != 0 )\n      GXV_TRACE(( \"kern subtable fmt3 has nonzero value\"\n                  \" (%d) in unused flag\\n\", flags ));\n    /*\n     * just skip kernValue[kernValueCount]\n     */\n    GXV_LIMIT_CHECK( 2 * kernValueCount );\n    p += 2 * kernValueCount;\n\n    /*\n     * check leftClass[gid] < leftClassCount\n     */\n    {\n      FT_Byte  min, max;\n\n\n      GXV_LIMIT_CHECK( glyphCount );\n      gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, gxvalid );\n      p += gxvalid->subtable_length;\n\n      if ( leftClassCount < max )\n        FT_INVALID_DATA;\n    }\n\n    /*\n     * check rightClass[gid] < rightClassCount\n     */\n    {\n      FT_Byte  min, max;\n\n\n      GXV_LIMIT_CHECK( glyphCount );\n      gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, gxvalid );\n      p += gxvalid->subtable_length;\n\n      if ( rightClassCount < max )\n        FT_INVALID_DATA;\n    }\n\n    /*\n     * check kernIndex[i, j] < kernValueCount\n     */\n    {\n      FT_UShort  i, j;\n\n\n      for ( i = 0; i < leftClassCount; i++ )\n      {\n        for ( j = 0; j < rightClassCount; j++ )\n        {\n          GXV_LIMIT_CHECK( 1 );\n          if ( kernValueCount < FT_NEXT_BYTE( p ) )\n            FT_INVALID_OFFSET;\n        }\n      }\n    }\n\n    gxvalid->subtable_length = p - table;\n\n    GXV_EXIT;\n  }\n\n\n  static FT_Bool\n  gxv_kern_coverage_new_apple_validate( FT_UShort      coverage,\n                                        FT_UShort*     format,\n                                        GXV_Validator  gxvalid )\n  {\n    /* new Apple-dialect */\n#ifdef GXV_LOAD_TRACE_VARS\n    FT_Bool  kernVertical;\n    FT_Bool  kernCrossStream;\n    FT_Bool  kernVariation;\n#endif\n\n    FT_UNUSED( gxvalid );\n\n\n    /* reserved bits = 0 */\n    if ( coverage & 0x1FFC )\n      return FALSE;\n\n#ifdef GXV_LOAD_TRACE_VARS\n    kernVertical    = FT_BOOL( ( coverage >> 15 ) & 1 );\n    kernCrossStream = FT_BOOL( ( coverage >> 14 ) & 1 );\n    kernVariation   = FT_BOOL( ( coverage >> 13 ) & 1 );\n#endif\n\n    *format = (FT_UShort)( coverage & 0x0003 );\n\n    GXV_TRACE(( \"new Apple-dialect: \"\n                \"horizontal=%d, cross-stream=%d, variation=%d, format=%d\\n\",\n                 !kernVertical, kernCrossStream, kernVariation, *format ));\n\n    GXV_TRACE(( \"kerning values in Apple format subtable are ignored\\n\" ));\n\n    return TRUE;\n  }\n\n\n  static FT_Bool\n  gxv_kern_coverage_classic_apple_validate( FT_UShort      coverage,\n                                            FT_UShort*     format,\n                                            GXV_Validator  gxvalid )\n  {\n    /* classic Apple-dialect */\n#ifdef GXV_LOAD_TRACE_VARS\n    FT_Bool  horizontal;\n    FT_Bool  cross_stream;\n#endif\n\n\n    /* check expected flags, but don't check if MS-dialect is impossible */\n    if ( !( coverage & 0xFD00 ) && KERN_ALLOWS_MS( gxvalid ) )\n      return FALSE;\n\n    /* reserved bits = 0 */\n    if ( coverage & 0x02FC )\n      return FALSE;\n\n#ifdef GXV_LOAD_TRACE_VARS\n    horizontal   = FT_BOOL( ( coverage >> 15 ) & 1 );\n    cross_stream = FT_BOOL( ( coverage >> 13 ) & 1 );\n#endif\n\n    *format = (FT_UShort)( coverage & 0x0003 );\n\n    GXV_TRACE(( \"classic Apple-dialect: \"\n                \"horizontal=%d, cross-stream=%d, format=%d\\n\",\n                 horizontal, cross_stream, *format ));\n\n    /* format 1 requires GX State Machine, too new for classic */\n    if ( *format == 1 )\n      return FALSE;\n\n    GXV_TRACE(( \"kerning values in Apple format subtable are ignored\\n\" ));\n\n    return TRUE;\n  }\n\n\n  static FT_Bool\n  gxv_kern_coverage_classic_microsoft_validate( FT_UShort      coverage,\n                                                FT_UShort*     format,\n                                                GXV_Validator  gxvalid )\n  {\n    /* classic Microsoft-dialect */\n#ifdef GXV_LOAD_TRACE_VARS\n    FT_Bool  horizontal;\n    FT_Bool  minimum;\n    FT_Bool  cross_stream;\n    FT_Bool  override;\n#endif\n\n    FT_UNUSED( gxvalid );\n\n\n    /* reserved bits = 0 */\n    if ( coverage & 0xFDF0 )\n      return FALSE;\n\n#ifdef GXV_LOAD_TRACE_VARS\n    horizontal   = FT_BOOL(   coverage        & 1 );\n    minimum      = FT_BOOL( ( coverage >> 1 ) & 1 );\n    cross_stream = FT_BOOL( ( coverage >> 2 ) & 1 );\n    override     = FT_BOOL( ( coverage >> 3 ) & 1 );\n#endif\n\n    *format = (FT_UShort)( ( coverage >> 8 ) & 0x0003 );\n\n    GXV_TRACE(( \"classic Microsoft-dialect: \"\n                \"horizontal=%d, minimum=%d, cross-stream=%d, \"\n                \"override=%d, format=%d\\n\",\n                horizontal, minimum, cross_stream, override, *format ));\n\n    if ( *format == 2 )\n      GXV_TRACE((\n        \"kerning values in Microsoft format 2 subtable are ignored\\n\" ));\n\n    return TRUE;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                            MAIN                               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static GXV_kern_Dialect\n  gxv_kern_coverage_validate( FT_UShort      coverage,\n                              FT_UShort*     format,\n                              GXV_Validator  gxvalid )\n  {\n    GXV_kern_Dialect  result = KERN_DIALECT_UNKNOWN;\n\n\n    GXV_NAME_ENTER( \"validating coverage\" );\n\n    GXV_TRACE(( \"interprete coverage 0x%04x by Apple style\\n\", coverage ));\n\n    if ( KERN_IS_NEW( gxvalid ) )\n    {\n      if ( gxv_kern_coverage_new_apple_validate( coverage,\n                                                 format,\n                                                 gxvalid ) )\n      {\n        result = KERN_DIALECT_APPLE;\n        goto Exit;\n      }\n    }\n\n    if ( KERN_IS_CLASSIC( gxvalid ) && KERN_ALLOWS_APPLE( gxvalid ) )\n    {\n      if ( gxv_kern_coverage_classic_apple_validate( coverage,\n                                                     format,\n                                                     gxvalid ) )\n      {\n        result = KERN_DIALECT_APPLE;\n        goto Exit;\n      }\n    }\n\n    if ( KERN_IS_CLASSIC( gxvalid ) && KERN_ALLOWS_MS( gxvalid ) )\n    {\n      if ( gxv_kern_coverage_classic_microsoft_validate( coverage,\n                                                         format,\n                                                         gxvalid ) )\n      {\n        result = KERN_DIALECT_MS;\n        goto Exit;\n      }\n    }\n\n    GXV_TRACE(( \"cannot interprete coverage, broken kern subtable\\n\" ));\n\n  Exit:\n    GXV_EXIT;\n    return result;\n  }\n\n\n  static void\n  gxv_kern_subtable_validate( FT_Bytes       table,\n                              FT_Bytes       limit,\n                              GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n#ifdef GXV_LOAD_TRACE_VARS\n    FT_UShort  version = 0;    /* MS only: subtable version, unused */\n#endif\n    FT_ULong   length;         /* MS: 16bit, Apple: 32bit*/\n    FT_UShort  coverage;\n#ifdef GXV_LOAD_TRACE_VARS\n    FT_UShort  tupleIndex = 0; /* Apple only */\n#endif\n    FT_UShort  u16[2];\n    FT_UShort  format = 255;   /* subtable format */\n\n\n    GXV_NAME_ENTER( \"kern subtable\" );\n\n    GXV_LIMIT_CHECK( 2 + 2 + 2 );\n    u16[0]   = FT_NEXT_USHORT( p ); /* Apple: length_hi MS: version */\n    u16[1]   = FT_NEXT_USHORT( p ); /* Apple: length_lo MS: length */\n    coverage = FT_NEXT_USHORT( p );\n\n    switch ( gxv_kern_coverage_validate( coverage, &format, gxvalid ) )\n    {\n    case KERN_DIALECT_MS:\n#ifdef GXV_LOAD_TRACE_VARS\n      version    = u16[0];\n#endif\n      length     = u16[1];\n#ifdef GXV_LOAD_TRACE_VARS\n      tupleIndex = 0;\n#endif\n      GXV_TRACE(( \"Subtable version = %d\\n\", version ));\n      GXV_TRACE(( \"Subtable length = %d\\n\", length ));\n      break;\n\n    case KERN_DIALECT_APPLE:\n#ifdef GXV_LOAD_TRACE_VARS\n      version    = 0;\n#endif\n      length     = ( u16[0] << 16 ) + u16[1];\n#ifdef GXV_LOAD_TRACE_VARS\n      tupleIndex = 0;\n#endif\n      GXV_TRACE(( \"Subtable length = %d\\n\", length ));\n\n      if ( KERN_IS_NEW( gxvalid ) )\n      {\n        GXV_LIMIT_CHECK( 2 );\n#ifdef GXV_LOAD_TRACE_VARS\n        tupleIndex = FT_NEXT_USHORT( p );\n#else\n        p += 2;\n#endif\n        GXV_TRACE(( \"Subtable tupleIndex = %d\\n\", tupleIndex ));\n      }\n      break;\n\n    default:\n      length = u16[1];\n      GXV_TRACE(( \"cannot detect subtable dialect, \"\n                  \"just skip %d byte\\n\", length ));\n      goto Exit;\n    }\n\n    /* formats 1, 2, 3 require the position of the start of this subtable */\n    if ( format == 0 )\n      gxv_kern_subtable_fmt0_validate( table, table + length, gxvalid );\n    else if ( format == 1 )\n      gxv_kern_subtable_fmt1_validate( table, table + length, gxvalid );\n    else if ( format == 2 )\n      gxv_kern_subtable_fmt2_validate( table, table + length, gxvalid );\n    else if ( format == 3 )\n      gxv_kern_subtable_fmt3_validate( table, table + length, gxvalid );\n    else\n      FT_INVALID_DATA;\n\n  Exit:\n    gxvalid->subtable_length = length;\n    GXV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         kern TABLE                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  gxv_kern_validate_generic( FT_Bytes          table,\n                             FT_Face           face,\n                             FT_Bool           classic_only,\n                             GXV_kern_Dialect  dialect_request,\n                             FT_Validator      ftvalid )\n  {\n    GXV_ValidatorRec   gxvalidrec;\n    GXV_Validator      gxvalid = &gxvalidrec;\n\n    GXV_kern_DataRec   kernrec;\n    GXV_kern_Data      kern = &kernrec;\n\n    FT_Bytes           p     = table;\n    FT_Bytes           limit = 0;\n\n    FT_ULong           nTables = 0;\n    FT_UInt            i;\n\n\n    gxvalid->root       = ftvalid;\n    gxvalid->table_data = kern;\n    gxvalid->face       = face;\n\n    FT_TRACE3(( \"validating `kern' table\\n\" ));\n    GXV_INIT;\n    KERN_DIALECT( gxvalid ) = dialect_request;\n\n    GXV_LIMIT_CHECK( 2 );\n    GXV_KERN_DATA( version ) = (GXV_kern_Version)FT_NEXT_USHORT( p );\n    GXV_TRACE(( \"version 0x%04x (higher 16bit)\\n\",\n                GXV_KERN_DATA( version ) ));\n\n    if ( 0x0001 < GXV_KERN_DATA( version ) )\n      FT_INVALID_FORMAT;\n    else if ( KERN_IS_CLASSIC( gxvalid ) )\n    {\n      GXV_LIMIT_CHECK( 2 );\n      nTables = FT_NEXT_USHORT( p );\n    }\n    else if ( KERN_IS_NEW( gxvalid ) )\n    {\n      if ( classic_only )\n        FT_INVALID_FORMAT;\n\n      if ( 0x0000 != FT_NEXT_USHORT( p ) )\n        FT_INVALID_FORMAT;\n\n      GXV_LIMIT_CHECK( 4 );\n      nTables = FT_NEXT_ULONG( p );\n    }\n\n    for ( i = 0; i < nTables; i++ )\n    {\n      GXV_TRACE(( \"validating subtable %d/%d\\n\", i, nTables ));\n      /* p should be 32bit-aligned? */\n      gxv_kern_subtable_validate( p, 0, gxvalid );\n      p += gxvalid->subtable_length;\n    }\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_kern_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    gxv_kern_validate_generic( table, face, 0, KERN_DIALECT_ANY, ftvalid );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_kern_validate_classic( FT_Bytes      table,\n                             FT_Face       face,\n                             FT_Int        dialect_flags,\n                             FT_Validator  ftvalid )\n  {\n    GXV_kern_Dialect  dialect_request;\n\n\n    dialect_request = (GXV_kern_Dialect)dialect_flags;\n    gxv_kern_validate_generic( table, face, 1, dialect_request, ftvalid );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvlcar.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvlcar.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT lcar table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvlcar\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      Data and Types                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  GXV_lcar_DataRec_\n  {\n    FT_UShort  format;\n\n  } GXV_lcar_DataRec, *GXV_lcar_Data;\n\n\n#define GXV_LCAR_DATA( FIELD )  GXV_TABLE_DATA( lcar, FIELD )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  gxv_lcar_partial_validate( FT_UShort      partial,\n                             FT_UShort      glyph,\n                             GXV_Validator  gxvalid )\n  {\n    GXV_NAME_ENTER( \"partial\" );\n\n    if ( GXV_LCAR_DATA( format ) != 1 )\n      goto Exit;\n\n    gxv_ctlPoint_validate( glyph, partial, gxvalid );\n\n  Exit:\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_lcar_LookupValue_validate( FT_UShort            glyph,\n                                 GXV_LookupValueCPtr  value_p,\n                                 GXV_Validator        gxvalid )\n  {\n    FT_Bytes   p     = gxvalid->root->base + value_p->u;\n    FT_Bytes   limit = gxvalid->root->limit;\n    FT_UShort  count;\n    FT_Short   partial;\n    FT_UShort  i;\n\n\n    GXV_NAME_ENTER( \"element in lookupTable\" );\n\n    GXV_LIMIT_CHECK( 2 );\n    count = FT_NEXT_USHORT( p );\n\n    GXV_LIMIT_CHECK( 2 * count );\n    for ( i = 0; i < count; i++ )\n    {\n      partial = FT_NEXT_SHORT( p );\n      gxv_lcar_partial_validate( partial, glyph, gxvalid );\n    }\n\n    GXV_EXIT;\n  }\n\n\n  /*\n    +------ lcar --------------------+\n    |                                |\n    |      +===============+         |\n    |      | looup header  |         |\n    |      +===============+         |\n    |      | BinSrchHeader |         |\n    |      +===============+         |\n    |      | lastGlyph[0]  |         |\n    |      +---------------+         |\n    |      | firstGlyph[0] |         |  head of lcar sfnt table\n    |      +---------------+         |             +\n    |      | offset[0]     |    ->   |          offset            [byte]\n    |      +===============+         |             +\n    |      | lastGlyph[1]  |         | (glyphID - firstGlyph) * 2 [byte]\n    |      +---------------+         |\n    |      | firstGlyph[1] |         |\n    |      +---------------+         |\n    |      | offset[1]     |         |\n    |      +===============+         |\n    |                                |\n    |       ....                     |\n    |                                |\n    |      16bit value array         |\n    |      +===============+         |\n    +------|     value     | <-------+\n    |       ....\n    |\n    |\n    |\n    |\n    |\n    +---->  lcar values...handled by lcar callback function\n  */\n\n  static GXV_LookupValueDesc\n  gxv_lcar_LookupFmt4_transit( FT_UShort            relative_gindex,\n                               GXV_LookupValueCPtr  base_value_p,\n                               FT_Bytes             lookuptbl_limit,\n                               GXV_Validator        gxvalid )\n  {\n    FT_Bytes             p;\n    FT_Bytes             limit;\n    FT_UShort            offset;\n    GXV_LookupValueDesc  value;\n\n    FT_UNUSED( lookuptbl_limit );\n\n    /* XXX: check range? */\n    offset = (FT_UShort)( base_value_p->u +\n                          relative_gindex * sizeof ( FT_UShort ) );\n    p      = gxvalid->root->base + offset;\n    limit  = gxvalid->root->limit;\n\n    GXV_LIMIT_CHECK ( 2 );\n    value.u = FT_NEXT_USHORT( p );\n\n    return value;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          lcar TABLE                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  gxv_lcar_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    FT_Bytes          p     = table;\n    FT_Bytes          limit = 0;\n    GXV_ValidatorRec  gxvalidrec;\n    GXV_Validator     gxvalid = &gxvalidrec;\n\n    GXV_lcar_DataRec  lcarrec;\n    GXV_lcar_Data     lcar = &lcarrec;\n\n    FT_Fixed          version;\n\n\n    gxvalid->root       = ftvalid;\n    gxvalid->table_data = lcar;\n    gxvalid->face       = face;\n\n    FT_TRACE3(( \"validating `lcar' table\\n\" ));\n    GXV_INIT;\n\n    GXV_LIMIT_CHECK( 4 + 2 );\n    version = FT_NEXT_ULONG( p );\n    GXV_LCAR_DATA( format ) = FT_NEXT_USHORT( p );\n\n    if ( version != 0x00010000UL)\n      FT_INVALID_FORMAT;\n\n    if ( GXV_LCAR_DATA( format ) > 1 )\n      FT_INVALID_FORMAT;\n\n    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;\n    gxvalid->lookupval_func   = gxv_lcar_LookupValue_validate;\n    gxvalid->lookupfmt4_trans = gxv_lcar_LookupFmt4_transit;\n    gxv_LookupTable_validate( p, limit, gxvalid );\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmod.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmod.c                                                               */\n/*                                                                         */\n/*    FreeType's TrueTypeGX/AAT validation module implementation (body).   */\n/*                                                                         */\n/*  Copyright 2004-2006, 2013                                              */\n/*  by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_TRUETYPE_TABLES_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_GX_VALIDATE_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_GX_VALIDATE_H\n\n#include \"gxvmod.h\"\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmodule\n\n\n  static FT_Error\n  gxv_load_table( FT_Face             face,\n                  FT_Tag              tag,\n                  FT_Byte* volatile*  table,\n                  FT_ULong*           table_len )\n  {\n    FT_Error   error;\n    FT_Memory  memory = FT_FACE_MEMORY( face );\n\n\n    error = FT_Load_Sfnt_Table( face, tag, 0, NULL, table_len );\n    if ( FT_ERR_EQ( error, Table_Missing ) )\n      return FT_Err_Ok;\n    if ( error )\n      goto Exit;\n\n    if ( FT_ALLOC( *table, *table_len ) )\n      goto Exit;\n\n    error = FT_Load_Sfnt_Table( face, tag, 0, *table, table_len );\n\n  Exit:\n    return error;\n  }\n\n\n#define GXV_TABLE_DECL( _sfnt )                     \\\n          FT_Byte* volatile  _sfnt          = NULL; \\\n          FT_ULong            len_ ## _sfnt = 0\n\n#define GXV_TABLE_LOAD( _sfnt )                                     \\\n          if ( ( FT_VALIDATE_ ## _sfnt ## _INDEX < table_count ) && \\\n               ( gx_flags & FT_VALIDATE_ ## _sfnt )            )    \\\n          {                                                         \\\n            error = gxv_load_table( face, TTAG_ ## _sfnt,           \\\n                                    &_sfnt, &len_ ## _sfnt );       \\\n            if ( error )                                            \\\n              goto Exit;                                            \\\n          }\n\n#define GXV_TABLE_VALIDATE( _sfnt )                                  \\\n          if ( _sfnt )                                               \\\n          {                                                          \\\n            ft_validator_init( &valid, _sfnt, _sfnt + len_ ## _sfnt, \\\n                               FT_VALIDATE_DEFAULT );                \\\n            if ( ft_setjmp( valid.jump_buffer ) == 0 )               \\\n              gxv_ ## _sfnt ## _validate( _sfnt, face, &valid );     \\\n            error = valid.error;                                     \\\n            if ( error )                                             \\\n              goto Exit;                                             \\\n          }\n\n#define GXV_TABLE_SET( _sfnt )                                        \\\n          if ( FT_VALIDATE_ ## _sfnt ## _INDEX < table_count )        \\\n            tables[FT_VALIDATE_ ## _sfnt ## _INDEX] = (FT_Bytes)_sfnt\n\n\n  static FT_Error\n  gxv_validate( FT_Face   face,\n                FT_UInt   gx_flags,\n                FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],\n                FT_UInt   table_count )\n  {\n    FT_Memory volatile        memory = FT_FACE_MEMORY( face );\n\n    FT_Error                  error = FT_Err_Ok;\n    FT_ValidatorRec volatile  valid;\n\n    FT_UInt  i;\n\n\n    GXV_TABLE_DECL( feat );\n    GXV_TABLE_DECL( bsln );\n    GXV_TABLE_DECL( trak );\n    GXV_TABLE_DECL( just );\n    GXV_TABLE_DECL( mort );\n    GXV_TABLE_DECL( morx );\n    GXV_TABLE_DECL( kern );\n    GXV_TABLE_DECL( opbd );\n    GXV_TABLE_DECL( prop );\n    GXV_TABLE_DECL( lcar );\n\n    for ( i = 0; i < table_count; i++ )\n      tables[i] = 0;\n\n    /* load tables */\n    GXV_TABLE_LOAD( feat );\n    GXV_TABLE_LOAD( bsln );\n    GXV_TABLE_LOAD( trak );\n    GXV_TABLE_LOAD( just );\n    GXV_TABLE_LOAD( mort );\n    GXV_TABLE_LOAD( morx );\n    GXV_TABLE_LOAD( kern );\n    GXV_TABLE_LOAD( opbd );\n    GXV_TABLE_LOAD( prop );\n    GXV_TABLE_LOAD( lcar );\n\n    /* validate tables */\n    GXV_TABLE_VALIDATE( feat );\n    GXV_TABLE_VALIDATE( bsln );\n    GXV_TABLE_VALIDATE( trak );\n    GXV_TABLE_VALIDATE( just );\n    GXV_TABLE_VALIDATE( mort );\n    GXV_TABLE_VALIDATE( morx );\n    GXV_TABLE_VALIDATE( kern );\n    GXV_TABLE_VALIDATE( opbd );\n    GXV_TABLE_VALIDATE( prop );\n    GXV_TABLE_VALIDATE( lcar );\n\n    /* Set results */\n    GXV_TABLE_SET( feat );\n    GXV_TABLE_SET( mort );\n    GXV_TABLE_SET( morx );\n    GXV_TABLE_SET( bsln );\n    GXV_TABLE_SET( just );\n    GXV_TABLE_SET( kern );\n    GXV_TABLE_SET( opbd );\n    GXV_TABLE_SET( trak );\n    GXV_TABLE_SET( prop );\n    GXV_TABLE_SET( lcar );\n\n  Exit:\n    if ( error )\n    {\n      FT_FREE( feat );\n      FT_FREE( bsln );\n      FT_FREE( trak );\n      FT_FREE( just );\n      FT_FREE( mort );\n      FT_FREE( morx );\n      FT_FREE( kern );\n      FT_FREE( opbd );\n      FT_FREE( prop );\n      FT_FREE( lcar );\n    }\n\n    return error;\n  }\n\n\n  static FT_Error\n  classic_kern_validate( FT_Face    face,\n                         FT_UInt    ckern_flags,\n                         FT_Bytes*  ckern_table )\n  {\n    FT_Memory volatile        memory = FT_FACE_MEMORY( face );\n\n    FT_Byte* volatile         ckern     = NULL;\n    FT_ULong                  len_ckern = 0;\n\n    /* without volatile on `error' GCC 4.1.1. emits:                         */\n    /*  warning: variable 'error' might be clobbered by 'longjmp' or 'vfork' */\n    /* this warning seems spurious but ---                                   */\n    FT_Error volatile         error;\n    FT_ValidatorRec volatile  valid;\n\n\n    *ckern_table = NULL;\n\n    error = gxv_load_table( face, TTAG_kern, &ckern, &len_ckern );\n    if ( error )\n      goto Exit;\n\n    if ( ckern )\n    {\n      ft_validator_init( &valid, ckern, ckern + len_ckern,\n                         FT_VALIDATE_DEFAULT );\n      if ( ft_setjmp( valid.jump_buffer ) == 0 )\n        gxv_kern_validate_classic( ckern, face,\n                                   ckern_flags & FT_VALIDATE_CKERN, &valid );\n      error = valid.error;\n      if ( error )\n        goto Exit;\n    }\n\n    *ckern_table = ckern;\n\n  Exit:\n    if ( error )\n      FT_FREE( ckern );\n\n    return error;\n  }\n\n\n  static\n  const FT_Service_GXvalidateRec  gxvalid_interface =\n  {\n    gxv_validate\n  };\n\n\n  static\n  const FT_Service_CKERNvalidateRec  ckernvalid_interface =\n  {\n    classic_kern_validate\n  };\n\n\n  static\n  const FT_ServiceDescRec  gxvalid_services[] =\n  {\n    { FT_SERVICE_ID_GX_VALIDATE,          &gxvalid_interface },\n    { FT_SERVICE_ID_CLASSICKERN_VALIDATE, &ckernvalid_interface },\n    { NULL, NULL }\n  };\n\n\n  static FT_Pointer\n  gxvalid_get_service( FT_Module    module,\n                       const char*  service_id )\n  {\n    FT_UNUSED( module );\n\n    return ft_service_list_lookup( gxvalid_services, service_id );\n  }\n\n\n  FT_CALLBACK_TABLE_DEF\n  const FT_Module_Class  gxv_module_class =\n  {\n    0,\n    sizeof ( FT_ModuleRec ),\n    \"gxvalid\",\n    0x10000L,\n    0x20000L,\n\n    0,              /* module-specific interface */\n\n    (FT_Module_Constructor)0,\n    (FT_Module_Destructor) 0,\n    (FT_Module_Requester)  gxvalid_get_service\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmod.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmod.h                                                               */\n/*                                                                         */\n/*    FreeType's TrueTypeGX/AAT validation module implementation           */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __GXVMOD_H__\n#define __GXVMOD_H__\n\n#include <ft2build.h>\n#include FT_MODULE_H\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n\n  FT_EXPORT_VAR( const FT_Module_Class )  gxv_module_class;\n\n\nFT_END_HEADER\n\n#endif /* __GXVMOD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmort.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmort.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT mort table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2005, 2013 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmort.h\"\n#include \"gxvfeat.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmort\n\n\n  static void\n  gxv_mort_feature_validate( GXV_mort_feature  f,\n                             GXV_Validator     gxvalid )\n  {\n    if ( f->featureType >= gxv_feat_registry_length )\n    {\n      GXV_TRACE(( \"featureType %d is out of registered range, \"\n                  \"setting %d is unchecked\\n\",\n                  f->featureType, f->featureSetting ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n    else if ( !gxv_feat_registry[f->featureType].existence )\n    {\n      GXV_TRACE(( \"featureType %d is within registered area \"\n                  \"but undefined, setting %d is unchecked\\n\",\n                  f->featureType, f->featureSetting ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n    else\n    {\n      FT_Byte  nSettings_max;\n\n\n      /* nSettings in gxvfeat.c is halved for exclusive on/off settings */\n      nSettings_max = gxv_feat_registry[f->featureType].nSettings;\n      if ( gxv_feat_registry[f->featureType].exclusive )\n        nSettings_max = (FT_Byte)( 2 * nSettings_max );\n\n      GXV_TRACE(( \"featureType %d is registered\", f->featureType ));\n      GXV_TRACE(( \"setting %d\", f->featureSetting ));\n\n      if ( f->featureSetting > nSettings_max )\n      {\n        GXV_TRACE(( \"out of defined range %d\", nSettings_max ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n      }\n      GXV_TRACE(( \"\\n\" ));\n    }\n\n    /* TODO: enableFlags must be unique value in specified chain?  */\n  }\n\n\n  /*\n   * nFeatureFlags is typed to FT_ULong to accept that in\n   * mort (typed FT_UShort) and morx (typed FT_ULong).\n   */\n  FT_LOCAL_DEF( void )\n  gxv_mort_featurearray_validate( FT_Bytes       table,\n                                  FT_Bytes       limit,\n                                  FT_ULong       nFeatureFlags,\n                                  GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n    FT_ULong  i;\n\n    GXV_mort_featureRec  f = GXV_MORT_FEATURE_OFF;\n\n\n    GXV_NAME_ENTER( \"mort feature list\" );\n    for ( i = 0; i < nFeatureFlags; i++ )\n    {\n      GXV_LIMIT_CHECK( 2 + 2 + 4 + 4 );\n      f.featureType    = FT_NEXT_USHORT( p );\n      f.featureSetting = FT_NEXT_USHORT( p );\n      f.enableFlags    = FT_NEXT_ULONG( p );\n      f.disableFlags   = FT_NEXT_ULONG( p );\n\n      gxv_mort_feature_validate( &f, gxvalid );\n    }\n\n    if ( !IS_GXV_MORT_FEATURE_OFF( f ) )\n      FT_INVALID_DATA;\n\n    gxvalid->subtable_length = p - table;\n    GXV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_mort_coverage_validate( FT_UShort      coverage,\n                              GXV_Validator  gxvalid )\n  {\n    FT_UNUSED( gxvalid );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    if ( coverage & 0x8000U )\n      GXV_TRACE(( \" this subtable is for vertical text only\\n\" ));\n    else\n      GXV_TRACE(( \" this subtable is for horizontal text only\\n\" ));\n\n    if ( coverage & 0x4000 )\n      GXV_TRACE(( \" this subtable is applied to glyph array \"\n                  \"in descending order\\n\" ));\n    else\n      GXV_TRACE(( \" this subtable is applied to glyph array \"\n                  \"in ascending order\\n\" ));\n\n    if ( coverage & 0x2000 )\n      GXV_TRACE(( \" this subtable is forcibly applied to \"\n                  \"vertical/horizontal text\\n\" ));\n\n    if ( coverage & 0x1FF8 )\n      GXV_TRACE(( \" coverage has non-zero bits in reserved area\\n\" ));\n#endif\n  }\n\n\n  static void\n  gxv_mort_subtables_validate( FT_Bytes       table,\n                               FT_Bytes       limit,\n                               FT_UShort      nSubtables,\n                               GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_Validate_Func fmt_funcs_table[] =\n    {\n      gxv_mort_subtable_type0_validate, /* 0 */\n      gxv_mort_subtable_type1_validate, /* 1 */\n      gxv_mort_subtable_type2_validate, /* 2 */\n      NULL,                             /* 3 */\n      gxv_mort_subtable_type4_validate, /* 4 */\n      gxv_mort_subtable_type5_validate, /* 5 */\n\n    };\n\n    FT_UShort  i;\n\n\n    GXV_NAME_ENTER( \"subtables in a chain\" );\n\n    for ( i = 0; i < nSubtables; i++ )\n    {\n      GXV_Validate_Func  func;\n\n      FT_UShort  length;\n      FT_UShort  coverage;\n#ifdef GXV_LOAD_UNUSED_VARS\n      FT_ULong   subFeatureFlags;\n#endif\n      FT_UInt    type;\n      FT_UInt    rest;\n\n\n      GXV_LIMIT_CHECK( 2 + 2 + 4 );\n      length          = FT_NEXT_USHORT( p );\n      coverage        = FT_NEXT_USHORT( p );\n#ifdef GXV_LOAD_UNUSED_VARS\n      subFeatureFlags = FT_NEXT_ULONG( p );\n#else\n      p += 4;\n#endif\n\n      GXV_TRACE(( \"validating chain subtable %d/%d (%d bytes)\\n\",\n                  i + 1, nSubtables, length ));\n      type = coverage & 0x0007;\n      rest = length - ( 2 + 2 + 4 );\n\n      GXV_LIMIT_CHECK( rest );\n      gxv_mort_coverage_validate( coverage, gxvalid );\n\n      if ( type > 5 )\n        FT_INVALID_FORMAT;\n\n      func = fmt_funcs_table[type];\n      if ( func == NULL )\n        GXV_TRACE(( \"morx type %d is reserved\\n\", type ));\n\n      func( p, p + rest, gxvalid );\n\n      p += rest;\n      /* TODO: validate subFeatureFlags */\n    }\n\n    gxvalid->subtable_length = p - table;\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_mort_chain_validate( FT_Bytes       table,\n                           FT_Bytes       limit,\n                           GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_ULong   defaultFlags;\n#endif\n    FT_ULong   chainLength;\n    FT_UShort  nFeatureFlags;\n    FT_UShort  nSubtables;\n\n\n    GXV_NAME_ENTER( \"mort chain header\" );\n\n    GXV_LIMIT_CHECK( 4 + 4 + 2 + 2 );\n#ifdef GXV_LOAD_UNUSED_VARS\n    defaultFlags  = FT_NEXT_ULONG( p );\n#else\n    p += 4;\n#endif\n    chainLength   = FT_NEXT_ULONG( p );\n    nFeatureFlags = FT_NEXT_USHORT( p );\n    nSubtables    = FT_NEXT_USHORT( p );\n\n    gxv_mort_featurearray_validate( p, table + chainLength,\n                                    nFeatureFlags, gxvalid );\n    p += gxvalid->subtable_length;\n    gxv_mort_subtables_validate( p, table + chainLength, nSubtables, gxvalid );\n    gxvalid->subtable_length = chainLength;\n\n    /* TODO: validate defaultFlags */\n    GXV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_mort_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    GXV_ValidatorRec  gxvalidrec;\n    GXV_Validator     gxvalid = &gxvalidrec;\n    FT_Bytes          p     = table;\n    FT_Bytes          limit = 0;\n    FT_ULong          version;\n    FT_ULong          nChains;\n    FT_ULong          i;\n\n\n    gxvalid->root = ftvalid;\n    gxvalid->face = face;\n    limit         = gxvalid->root->limit;\n\n    FT_TRACE3(( \"validating `mort' table\\n\" ));\n    GXV_INIT;\n\n    GXV_LIMIT_CHECK( 4 + 4 );\n    version = FT_NEXT_ULONG( p );\n    nChains = FT_NEXT_ULONG( p );\n\n    if (version != 0x00010000UL)\n      FT_INVALID_FORMAT;\n\n    for ( i = 0; i < nChains; i++ )\n    {\n      GXV_TRACE(( \"validating chain %d/%d\\n\", i + 1, nChains ));\n      GXV_32BIT_ALIGNMENT_VALIDATE( p - table );\n      gxv_mort_chain_validate( p, limit, gxvalid );\n      p += gxvalid->subtable_length;\n    }\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmort.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmort.h                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT common definition for mort table (specification).     */\n/*                                                                         */\n/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __GXVMORT_H__\n#define __GXVMORT_H__\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n#include FT_SFNT_NAMES_H\n\n\n  typedef struct  GXV_mort_featureRec_\n  {\n    FT_UShort  featureType;\n    FT_UShort  featureSetting;\n    FT_ULong   enableFlags;\n    FT_ULong   disableFlags;\n\n  } GXV_mort_featureRec, *GXV_mort_feature;\n\n#define GXV_MORT_FEATURE_OFF  {0, 1, 0x00000000UL, 0x00000000UL}\n\n#define IS_GXV_MORT_FEATURE_OFF( f )              \\\n          ( (f).featureType    == 0            || \\\n            (f).featureSetting == 1            || \\\n            (f).enableFlags    == 0x00000000UL || \\\n            (f).disableFlags   == 0x00000000UL )\n\n\n  FT_LOCAL( void )\n  gxv_mort_featurearray_validate( FT_Bytes       table,\n                                  FT_Bytes       limit,\n                                  FT_ULong       nFeatureFlags,\n                                  GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_mort_coverage_validate( FT_UShort      coverage,\n                              GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_mort_subtable_type0_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_mort_subtable_type1_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_mort_subtable_type2_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_mort_subtable_type4_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_mort_subtable_type5_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n\n#endif /* __GXVMORT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmort0.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmort0.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT mort table validation                                 */\n/*    body for type0 (Indic Script Rearrangement) subtable.                */\n/*                                                                         */\n/*  Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmort.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmort\n\n\n  static const char* GXV_Mort_IndicScript_Msg[] =\n  {\n    \"no change\",\n    \"Ax => xA\",\n    \"xD => Dx\",\n    \"AxD => DxA\",\n    \"ABx => xAB\",\n    \"ABx => xBA\",\n    \"xCD => CDx\",\n    \"xCD => DCx\",\n    \"AxCD => CDxA\",\n    \"AxCD => DCxA\",\n    \"ABxD => DxAB\",\n    \"ABxD => DxBA\",\n    \"ABxCD => CDxAB\",\n    \"ABxCD => CDxBA\",\n    \"ABxCD => DCxAB\",\n    \"ABxCD => DCxBA\",\n\n  };\n\n\n  static void\n  gxv_mort_subtable_type0_entry_validate(\n    FT_Byte                         state,\n    FT_UShort                       flags,\n    GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n    FT_Bytes                        table,\n    FT_Bytes                        limit,\n    GXV_Validator                   gxvalid )\n  {\n    FT_UShort  markFirst;\n    FT_UShort  dontAdvance;\n    FT_UShort  markLast;\n    FT_UShort  reserved;\n    FT_UShort  verb = 0;\n\n    FT_UNUSED( state );\n    FT_UNUSED( table );\n    FT_UNUSED( limit );\n\n    FT_UNUSED( GXV_Mort_IndicScript_Msg[verb] ); /* for the non-debugging */\n    FT_UNUSED( glyphOffset_p );                  /* case                  */\n\n\n    markFirst   = (FT_UShort)( ( flags >> 15 ) & 1 );\n    dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );\n    markLast    = (FT_UShort)( ( flags >> 13 ) & 1 );\n\n    reserved = (FT_UShort)( flags & 0x1FF0 );\n    verb     = (FT_UShort)( flags & 0x000F );\n\n    GXV_TRACE(( \"  IndicScript MorphRule for glyphOffset 0x%04x\",\n                glyphOffset_p->u ));\n    GXV_TRACE(( \" markFirst=%01d\", markFirst ));\n    GXV_TRACE(( \" dontAdvance=%01d\", dontAdvance ));\n    GXV_TRACE(( \" markLast=%01d\", markLast ));\n    GXV_TRACE(( \" %02d\", verb ));\n    GXV_TRACE(( \" %s\\n\", GXV_Mort_IndicScript_Msg[verb] ));\n\n    if ( markFirst > 0 && markLast > 0 )\n    {\n      GXV_TRACE(( \"  [odd] a glyph is marked as the first and last\"\n                  \"  in Indic rearrangement\\n\" ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n\n    if ( markFirst > 0 && dontAdvance > 0 )\n    {\n      GXV_TRACE(( \"  [odd] the first glyph is marked as dontAdvance\"\n                  \" in Indic rearrangement\\n\" ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n\n    if ( 0 < reserved )\n    {\n      GXV_TRACE(( \" non-zero bits found in reserved range\\n\" ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n    else\n      GXV_TRACE(( \"\\n\" ));\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_mort_subtable_type0_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    GXV_NAME_ENTER(\n      \"mort chain subtable type0 (Indic-Script Rearrangement)\" );\n\n    GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE );\n\n    gxvalid->statetable.optdata               = NULL;\n    gxvalid->statetable.optdata_load_func     = NULL;\n    gxvalid->statetable.subtable_setup_func   = NULL;\n    gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;\n    gxvalid->statetable.entry_validate_func =\n      gxv_mort_subtable_type0_entry_validate;\n\n    gxv_StateTable_validate( p, limit, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmort1.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmort1.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT mort table validation                                 */\n/*    body for type1 (Contextual Substitution) subtable.                   */\n/*                                                                         */\n/*  Copyright 2005, 2007 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmort.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmort\n\n\n  typedef struct  GXV_mort_subtable_type1_StateOptRec_\n  {\n    FT_UShort  substitutionTable;\n    FT_UShort  substitutionTable_length;\n\n  }  GXV_mort_subtable_type1_StateOptRec,\n    *GXV_mort_subtable_type1_StateOptRecData;\n\n#define GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE \\\n          ( GXV_STATETABLE_HEADER_SIZE + 2 )\n\n\n  static void\n  gxv_mort_subtable_type1_substitutionTable_load( FT_Bytes       table,\n                                                  FT_Bytes       limit,\n                                                  GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_mort_subtable_type1_StateOptRecData  optdata =\n      (GXV_mort_subtable_type1_StateOptRecData)gxvalid->statetable.optdata;\n\n\n    GXV_LIMIT_CHECK( 2 );\n    optdata->substitutionTable = FT_NEXT_USHORT( p );\n  }\n\n\n  static void\n  gxv_mort_subtable_type1_subtable_setup( FT_UShort      table_size,\n                                          FT_UShort      classTable,\n                                          FT_UShort      stateArray,\n                                          FT_UShort      entryTable,\n                                          FT_UShort*     classTable_length_p,\n                                          FT_UShort*     stateArray_length_p,\n                                          FT_UShort*     entryTable_length_p,\n                                          GXV_Validator  gxvalid )\n  {\n    FT_UShort  o[4];\n    FT_UShort  *l[4];\n    FT_UShort  buff[5];\n\n    GXV_mort_subtable_type1_StateOptRecData  optdata =\n      (GXV_mort_subtable_type1_StateOptRecData)gxvalid->statetable.optdata;\n\n\n    o[0] = classTable;\n    o[1] = stateArray;\n    o[2] = entryTable;\n    o[3] = optdata->substitutionTable;\n    l[0] = classTable_length_p;\n    l[1] = stateArray_length_p;\n    l[2] = entryTable_length_p;\n    l[3] = &( optdata->substitutionTable_length );\n\n    gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, gxvalid );\n  }\n\n\n  static void\n  gxv_mort_subtable_type1_offset_to_subst_validate(\n    FT_Short          wordOffset,\n    const FT_String*  tag,\n    FT_Byte           state,\n    GXV_Validator     gxvalid )\n  {\n    FT_UShort  substTable;\n    FT_UShort  substTable_limit;\n\n    FT_UNUSED( tag );\n    FT_UNUSED( state );\n\n\n    substTable =\n      ((GXV_mort_subtable_type1_StateOptRec *)\n       (gxvalid->statetable.optdata))->substitutionTable;\n    substTable_limit =\n      (FT_UShort)( substTable +\n                   ((GXV_mort_subtable_type1_StateOptRec *)\n                    (gxvalid->statetable.optdata))->substitutionTable_length );\n\n    gxvalid->min_gid = (FT_UShort)( ( substTable       - wordOffset * 2 ) / 2 );\n    gxvalid->max_gid = (FT_UShort)( ( substTable_limit - wordOffset * 2 ) / 2 );\n    gxvalid->max_gid = (FT_UShort)( FT_MAX( gxvalid->max_gid,\n                                            gxvalid->face->num_glyphs ) );\n\n    /* XXX: check range? */\n\n    /* TODO: min_gid & max_gid comparison with ClassTable contents */\n  }\n\n\n  static void\n  gxv_mort_subtable_type1_entry_validate(\n    FT_Byte                         state,\n    FT_UShort                       flags,\n    GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n    FT_Bytes                        table,\n    FT_Bytes                        limit,\n    GXV_Validator                   gxvalid )\n  {\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_UShort  setMark;\n    FT_UShort  dontAdvance;\n#endif\n    FT_UShort  reserved;\n    FT_Short   markOffset;\n    FT_Short   currentOffset;\n\n    FT_UNUSED( table );\n    FT_UNUSED( limit );\n\n\n#ifdef GXV_LOAD_UNUSED_VARS\n    setMark       = (FT_UShort)(   flags >> 15            );\n    dontAdvance   = (FT_UShort)( ( flags >> 14 ) & 1      );\n#endif\n    reserved      = (FT_Short)(    flags         & 0x3FFF );\n\n    markOffset    = (FT_Short)( glyphOffset_p->ul >> 16 );\n    currentOffset = (FT_Short)( glyphOffset_p->ul       );\n\n    if ( 0 < reserved )\n    {\n      GXV_TRACE(( \" non-zero bits found in reserved range\\n\" ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n\n    gxv_mort_subtable_type1_offset_to_subst_validate( markOffset,\n                                                      \"markOffset\",\n                                                      state,\n                                                      gxvalid );\n\n    gxv_mort_subtable_type1_offset_to_subst_validate( currentOffset,\n                                                      \"currentOffset\",\n                                                      state,\n                                                      gxvalid );\n  }\n\n\n  static void\n  gxv_mort_subtable_type1_substTable_validate( FT_Bytes       table,\n                                               FT_Bytes       limit,\n                                               GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  num_gids = (FT_UShort)(\n                 ((GXV_mort_subtable_type1_StateOptRec *)\n                  (gxvalid->statetable.optdata))->substitutionTable_length / 2 );\n    FT_UShort  i;\n\n\n    GXV_NAME_ENTER( \"validating contents of substitutionTable\" );\n    for ( i = 0; i < num_gids ; i ++ )\n    {\n      FT_UShort  dst_gid;\n\n\n      GXV_LIMIT_CHECK( 2 );\n      dst_gid = FT_NEXT_USHORT( p );\n\n      if ( dst_gid >= 0xFFFFU )\n        continue;\n\n      if ( dst_gid < gxvalid->min_gid || gxvalid->max_gid < dst_gid )\n      {\n        GXV_TRACE(( \"substTable include a strange gid[%d]=%d >\"\n                    \" out of define range (%d..%d)\\n\",\n                    i, dst_gid, gxvalid->min_gid, gxvalid->max_gid ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n      }\n    }\n\n    GXV_EXIT;\n  }\n\n\n  /*\n   * subtable for Contextual glyph substitution is a modified StateTable.\n   * In addition to classTable, stateArray, and entryTable, the field\n   * `substitutionTable' is added.\n   */\n  FT_LOCAL_DEF( void )\n  gxv_mort_subtable_type1_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_mort_subtable_type1_StateOptRec  st_rec;\n\n\n    GXV_NAME_ENTER( \"mort chain subtable type1 (Contextual Glyph Subst)\" );\n\n    GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE );\n\n    gxvalid->statetable.optdata =\n      &st_rec;\n    gxvalid->statetable.optdata_load_func =\n      gxv_mort_subtable_type1_substitutionTable_load;\n    gxvalid->statetable.subtable_setup_func =\n      gxv_mort_subtable_type1_subtable_setup;\n    gxvalid->statetable.entry_glyphoffset_fmt =\n      GXV_GLYPHOFFSET_ULONG;\n    gxvalid->statetable.entry_validate_func =\n\n      gxv_mort_subtable_type1_entry_validate;\n    gxv_StateTable_validate( p, limit, gxvalid );\n\n    gxv_mort_subtable_type1_substTable_validate(\n      table + st_rec.substitutionTable,\n      table + st_rec.substitutionTable + st_rec.substitutionTable_length,\n      gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmort2.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmort2.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT mort table validation                                 */\n/*    body for type2 (Ligature Substitution) subtable.                     */\n/*                                                                         */\n/*  Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmort.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmort\n\n\n  typedef struct  GXV_mort_subtable_type2_StateOptRec_\n  {\n    FT_UShort  ligActionTable;\n    FT_UShort  componentTable;\n    FT_UShort  ligatureTable;\n    FT_UShort  ligActionTable_length;\n    FT_UShort  componentTable_length;\n    FT_UShort  ligatureTable_length;\n\n  }  GXV_mort_subtable_type2_StateOptRec,\n    *GXV_mort_subtable_type2_StateOptRecData;\n\n#define GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE \\\n          ( GXV_STATETABLE_HEADER_SIZE + 2 + 2 + 2 )\n\n\n  static void\n  gxv_mort_subtable_type2_opttable_load( FT_Bytes       table,\n                                         FT_Bytes       limit,\n                                         GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n    GXV_mort_subtable_type2_StateOptRecData  optdata =\n      (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;\n\n\n    GXV_LIMIT_CHECK( 2 + 2 + 2 );\n    optdata->ligActionTable = FT_NEXT_USHORT( p );\n    optdata->componentTable = FT_NEXT_USHORT( p );\n    optdata->ligatureTable  = FT_NEXT_USHORT( p );\n\n    GXV_TRACE(( \"offset to ligActionTable=0x%04x\\n\",\n                optdata->ligActionTable ));\n    GXV_TRACE(( \"offset to componentTable=0x%04x\\n\",\n                optdata->componentTable ));\n    GXV_TRACE(( \"offset to ligatureTable=0x%04x\\n\",\n                optdata->ligatureTable ));\n  }\n\n\n  static void\n  gxv_mort_subtable_type2_subtable_setup( FT_UShort      table_size,\n                                          FT_UShort      classTable,\n                                          FT_UShort      stateArray,\n                                          FT_UShort      entryTable,\n                                          FT_UShort      *classTable_length_p,\n                                          FT_UShort      *stateArray_length_p,\n                                          FT_UShort      *entryTable_length_p,\n                                          GXV_Validator  gxvalid )\n  {\n    FT_UShort  o[6];\n    FT_UShort  *l[6];\n    FT_UShort  buff[7];\n\n    GXV_mort_subtable_type2_StateOptRecData  optdata =\n      (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;\n\n\n    GXV_NAME_ENTER( \"subtable boundaries setup\" );\n\n    o[0] = classTable;\n    o[1] = stateArray;\n    o[2] = entryTable;\n    o[3] = optdata->ligActionTable;\n    o[4] = optdata->componentTable;\n    o[5] = optdata->ligatureTable;\n    l[0] = classTable_length_p;\n    l[1] = stateArray_length_p;\n    l[2] = entryTable_length_p;\n    l[3] = &(optdata->ligActionTable_length);\n    l[4] = &(optdata->componentTable_length);\n    l[5] = &(optdata->ligatureTable_length);\n\n    gxv_set_length_by_ushort_offset( o, l, buff, 6, table_size, gxvalid );\n\n    GXV_TRACE(( \"classTable: offset=0x%04x length=0x%04x\\n\",\n                classTable, *classTable_length_p ));\n    GXV_TRACE(( \"stateArray: offset=0x%04x length=0x%04x\\n\",\n                stateArray, *stateArray_length_p ));\n    GXV_TRACE(( \"entryTable: offset=0x%04x length=0x%04x\\n\",\n                entryTable, *entryTable_length_p ));\n    GXV_TRACE(( \"ligActionTable: offset=0x%04x length=0x%04x\\n\",\n                optdata->ligActionTable,\n                optdata->ligActionTable_length ));\n    GXV_TRACE(( \"componentTable: offset=0x%04x length=0x%04x\\n\",\n                optdata->componentTable,\n                optdata->componentTable_length ));\n    GXV_TRACE(( \"ligatureTable:  offset=0x%04x length=0x%04x\\n\",\n                optdata->ligatureTable,\n                optdata->ligatureTable_length ));\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_mort_subtable_type2_ligActionOffset_validate(\n    FT_Bytes       table,\n    FT_UShort      ligActionOffset,\n    GXV_Validator  gxvalid )\n  {\n    /* access ligActionTable */\n    GXV_mort_subtable_type2_StateOptRecData  optdata =\n      (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;\n\n    FT_Bytes lat_base  = table + optdata->ligActionTable;\n    FT_Bytes p         = table + ligActionOffset;\n    FT_Bytes lat_limit = lat_base + optdata->ligActionTable;\n\n\n    GXV_32BIT_ALIGNMENT_VALIDATE( ligActionOffset );\n    if ( p < lat_base )\n    {\n      GXV_TRACE(( \"too short offset 0x%04x: p < lat_base (%d byte rewind)\\n\",\n                  ligActionOffset, lat_base - p ));\n\n      /* FontValidator, ftxvalidator, ftxdumperfuser warn but continue */\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n    }\n    else if ( lat_limit < p )\n    {\n      GXV_TRACE(( \"too large offset 0x%04x: lat_limit < p (%d byte overrun)\\n\",\n                  ligActionOffset, p - lat_limit ));\n\n      /* FontValidator, ftxvalidator, ftxdumperfuser warn but continue */\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n    }\n    else\n    {\n      /* validate entry in ligActionTable */\n      FT_ULong   lig_action;\n#ifdef GXV_LOAD_UNUSED_VARS\n      FT_UShort  last;\n      FT_UShort  store;\n#endif\n      FT_ULong   offset;\n\n\n      lig_action = FT_NEXT_ULONG( p );\n#ifdef GXV_LOAD_UNUSED_VARS\n      last   = (FT_UShort)( ( lig_action >> 31 ) & 1 );\n      store  = (FT_UShort)( ( lig_action >> 30 ) & 1 );\n#endif\n\n      /* Apple spec defines this offset as a word offset */\n      offset = lig_action & 0x3FFFFFFFUL;\n      if ( offset * 2 < optdata->ligatureTable )\n      {\n        GXV_TRACE(( \"too short offset 0x%08x:\"\n                    \" 2 x offset < ligatureTable (%d byte rewind)\\n\",\n                     offset, optdata->ligatureTable - offset * 2 ));\n\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n      } else if ( offset * 2 >\n                  optdata->ligatureTable + optdata->ligatureTable_length )\n      {\n        GXV_TRACE(( \"too long offset 0x%08x:\"\n                    \" 2 x offset > ligatureTable + ligatureTable_length\"\n                    \" (%d byte overrun)\\n\",\n                     offset,\n                     optdata->ligatureTable + optdata->ligatureTable_length\n                     - offset * 2 ));\n\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n      }\n    }\n  }\n\n\n  static void\n  gxv_mort_subtable_type2_entry_validate(\n    FT_Byte                         state,\n    FT_UShort                       flags,\n    GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n    FT_Bytes                        table,\n    FT_Bytes                        limit,\n    GXV_Validator                   gxvalid )\n  {\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_UShort setComponent;\n    FT_UShort dontAdvance;\n#endif\n    FT_UShort offset;\n\n    FT_UNUSED( state );\n    FT_UNUSED( glyphOffset_p );\n    FT_UNUSED( limit );\n\n\n#ifdef GXV_LOAD_UNUSED_VARS\n    setComponent = (FT_UShort)( ( flags >> 15 ) & 1 );\n    dontAdvance  = (FT_UShort)( ( flags >> 14 ) & 1 );\n#endif\n\n    offset = (FT_UShort)( flags & 0x3FFFU );\n\n    if ( 0 < offset )\n      gxv_mort_subtable_type2_ligActionOffset_validate( table, offset,\n                                                        gxvalid );\n  }\n\n\n  static void\n  gxv_mort_subtable_type2_ligatureTable_validate( FT_Bytes       table,\n                                                  GXV_Validator  gxvalid )\n  {\n    GXV_mort_subtable_type2_StateOptRecData  optdata =\n      (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;\n\n    FT_Bytes p     = table + optdata->ligatureTable;\n    FT_Bytes limit = table + optdata->ligatureTable\n                           + optdata->ligatureTable_length;\n\n\n    GXV_NAME_ENTER( \"mort chain subtable type2 - substitutionTable\" );\n    if ( 0 != optdata->ligatureTable )\n    {\n      /* Apple does not give specification of ligatureTable format */\n      while ( p < limit )\n      {\n        FT_UShort  lig_gid;\n\n\n        GXV_LIMIT_CHECK( 2 );\n        lig_gid = FT_NEXT_USHORT( p );\n\n        if ( gxvalid->face->num_glyphs < lig_gid )\n          GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n      }\n    }\n    GXV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_mort_subtable_type2_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_mort_subtable_type2_StateOptRec  lig_rec;\n\n\n    GXV_NAME_ENTER( \"mort chain subtable type2 (Ligature Substitution)\" );\n\n    GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE );\n\n    gxvalid->statetable.optdata =\n      &lig_rec;\n    gxvalid->statetable.optdata_load_func =\n      gxv_mort_subtable_type2_opttable_load;\n    gxvalid->statetable.subtable_setup_func =\n      gxv_mort_subtable_type2_subtable_setup;\n    gxvalid->statetable.entry_glyphoffset_fmt =\n      GXV_GLYPHOFFSET_NONE;\n    gxvalid->statetable.entry_validate_func =\n      gxv_mort_subtable_type2_entry_validate;\n\n    gxv_StateTable_validate( p, limit, gxvalid );\n\n    p += gxvalid->subtable_length;\n    gxv_mort_subtable_type2_ligatureTable_validate( table, gxvalid );\n\n    gxvalid->subtable_length = p - table;\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmort4.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmort4.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT mort table validation                                 */\n/*    body for type4 (Non-Contextual Glyph Substitution) subtable.         */\n/*                                                                         */\n/*  Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmort.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmort\n\n\n  static void\n  gxv_mort_subtable_type4_lookupval_validate( FT_UShort            glyph,\n                                              GXV_LookupValueCPtr  value_p,\n                                              GXV_Validator        gxvalid )\n  {\n    FT_UNUSED( glyph );\n\n    gxv_glyphid_validate( value_p->u, gxvalid );\n  }\n\n  /*\n    +===============+ --------+\n    | lookup header |         |\n    +===============+         |\n    | BinSrchHeader |         |\n    +===============+         |\n    | lastGlyph[0]  |         |\n    +---------------+         |\n    | firstGlyph[0] |         |    head of lookup table\n    +---------------+         |             +\n    | offset[0]     |    ->   |          offset            [byte]\n    +===============+         |             +\n    | lastGlyph[1]  |         | (glyphID - firstGlyph) * 2 [byte]\n    +---------------+         |\n    | firstGlyph[1] |         |\n    +---------------+         |\n    | offset[1]     |         |\n    +===============+         |\n                              |\n     ....                     |\n                              |\n    16bit value array         |\n    +===============+         |\n    |     value     | <-------+\n     ....\n  */\n\n  static GXV_LookupValueDesc\n  gxv_mort_subtable_type4_lookupfmt4_transit(\n    FT_UShort            relative_gindex,\n    GXV_LookupValueCPtr  base_value_p,\n    FT_Bytes             lookuptbl_limit,\n    GXV_Validator        gxvalid )\n  {\n    FT_Bytes             p;\n    FT_Bytes             limit;\n    FT_UShort            offset;\n    GXV_LookupValueDesc  value;\n\n    /* XXX: check range? */\n    offset = (FT_UShort)( base_value_p->u +\n                          relative_gindex * sizeof ( FT_UShort ) );\n\n    p     = gxvalid->lookuptbl_head + offset;\n    limit = lookuptbl_limit;\n\n    GXV_LIMIT_CHECK( 2 );\n    value.u = FT_NEXT_USHORT( p );\n\n    return value;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_mort_subtable_type4_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    GXV_NAME_ENTER( \"mort chain subtable type4 \"\n                    \"(Non-Contextual Glyph Substitution)\" );\n\n    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;\n    gxvalid->lookupval_func   = gxv_mort_subtable_type4_lookupval_validate;\n    gxvalid->lookupfmt4_trans = gxv_mort_subtable_type4_lookupfmt4_transit;\n\n    gxv_LookupTable_validate( p, limit, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmort5.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmort5.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT mort table validation                                 */\n/*    body for type5 (Contextual Glyph Insertion) subtable.                */\n/*                                                                         */\n/*  Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmort.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmort\n\n\n  /*\n   * mort subtable type5 (Contextual Glyph Insertion)\n   * has the format of StateTable with insertion-glyph-list,\n   * but without name.  The offset is given by glyphOffset in\n   * entryTable.  There is no table location declaration\n   * like xxxTable.\n   */\n\n  typedef struct  GXV_mort_subtable_type5_StateOptRec_\n  {\n    FT_UShort   classTable;\n    FT_UShort   stateArray;\n    FT_UShort   entryTable;\n\n#define GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE  GXV_STATETABLE_HEADER_SIZE\n\n    FT_UShort*  classTable_length_p;\n    FT_UShort*  stateArray_length_p;\n    FT_UShort*  entryTable_length_p;\n\n  }  GXV_mort_subtable_type5_StateOptRec,\n    *GXV_mort_subtable_type5_StateOptRecData;\n\n\n  FT_LOCAL_DEF( void )\n  gxv_mort_subtable_type5_subtable_setup( FT_UShort      table_size,\n                                          FT_UShort      classTable,\n                                          FT_UShort      stateArray,\n                                          FT_UShort      entryTable,\n                                          FT_UShort*     classTable_length_p,\n                                          FT_UShort*     stateArray_length_p,\n                                          FT_UShort*     entryTable_length_p,\n                                          GXV_Validator  gxvalid )\n  {\n    GXV_mort_subtable_type5_StateOptRecData  optdata =\n      (GXV_mort_subtable_type5_StateOptRecData)gxvalid->statetable.optdata;\n\n\n    gxv_StateTable_subtable_setup( table_size,\n                                   classTable,\n                                   stateArray,\n                                   entryTable,\n                                   classTable_length_p,\n                                   stateArray_length_p,\n                                   entryTable_length_p,\n                                   gxvalid );\n\n    optdata->classTable = classTable;\n    optdata->stateArray = stateArray;\n    optdata->entryTable = entryTable;\n\n    optdata->classTable_length_p = classTable_length_p;\n    optdata->stateArray_length_p = stateArray_length_p;\n    optdata->entryTable_length_p = entryTable_length_p;\n  }\n\n\n  static void\n  gxv_mort_subtable_type5_InsertList_validate( FT_UShort      offset,\n                                               FT_UShort      count,\n                                               FT_Bytes       table,\n                                               FT_Bytes       limit,\n                                               GXV_Validator  gxvalid )\n  {\n    /*\n     * We don't know the range of insertion-glyph-list.\n     * Set range by whole of state table.\n     */\n    FT_Bytes  p = table + offset;\n\n    GXV_mort_subtable_type5_StateOptRecData  optdata =\n      (GXV_mort_subtable_type5_StateOptRecData)gxvalid->statetable.optdata;\n\n    if ( optdata->classTable < offset                                   &&\n         offset < optdata->classTable + *(optdata->classTable_length_p) )\n      GXV_TRACE(( \" offset runs into ClassTable\" ));\n    if ( optdata->stateArray < offset                                   &&\n         offset < optdata->stateArray + *(optdata->stateArray_length_p) )\n      GXV_TRACE(( \" offset runs into StateArray\" ));\n    if ( optdata->entryTable < offset                                   &&\n         offset < optdata->entryTable + *(optdata->entryTable_length_p) )\n      GXV_TRACE(( \" offset runs into EntryTable\" ));\n\n#ifndef GXV_LOAD_TRACE_VARS\n    GXV_LIMIT_CHECK( count * 2 );\n#else\n    while ( p < table + offset + ( count * 2 ) )\n    {\n      FT_UShort insert_glyphID;\n\n\n      GXV_LIMIT_CHECK( 2 );\n      insert_glyphID = FT_NEXT_USHORT( p );\n      GXV_TRACE(( \" 0x%04x\", insert_glyphID ));\n    }\n    GXV_TRACE(( \"\\n\" ));\n#endif\n  }\n\n\n  static void\n  gxv_mort_subtable_type5_entry_validate(\n    FT_Byte                         state,\n    FT_UShort                       flags,\n    GXV_StateTable_GlyphOffsetCPtr  glyphOffset,\n    FT_Bytes                        table,\n    FT_Bytes                        limit,\n    GXV_Validator                   gxvalid )\n  {\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_Bool    setMark;\n    FT_Bool    dontAdvance;\n    FT_Bool    currentIsKashidaLike;\n    FT_Bool    markedIsKashidaLike;\n    FT_Bool    currentInsertBefore;\n    FT_Bool    markedInsertBefore;\n#endif\n    FT_Byte    currentInsertCount;\n    FT_Byte    markedInsertCount;\n    FT_UShort  currentInsertList;\n    FT_UShort  markedInsertList;\n\n    FT_UNUSED( state );\n\n\n#ifdef GXV_LOAD_UNUSED_VARS\n    setMark              = FT_BOOL( ( flags >> 15 ) & 1 );\n    dontAdvance          = FT_BOOL( ( flags >> 14 ) & 1 );\n    currentIsKashidaLike = FT_BOOL( ( flags >> 13 ) & 1 );\n    markedIsKashidaLike  = FT_BOOL( ( flags >> 12 ) & 1 );\n    currentInsertBefore  = FT_BOOL( ( flags >> 11 ) & 1 );\n    markedInsertBefore   = FT_BOOL( ( flags >> 10 ) & 1 );\n#endif\n\n    currentInsertCount   = (FT_Byte)( ( flags >> 5 ) & 0x1F   );\n    markedInsertCount    = (FT_Byte)(   flags        & 0x001F );\n\n    currentInsertList    = (FT_UShort)( glyphOffset->ul >> 16 );\n    markedInsertList     = (FT_UShort)( glyphOffset->ul       );\n\n    if ( 0 != currentInsertList && 0 != currentInsertCount )\n    {\n      gxv_mort_subtable_type5_InsertList_validate( currentInsertList,\n                                                   currentInsertCount,\n                                                   table,\n                                                   limit,\n                                                   gxvalid );\n    }\n\n    if ( 0 != markedInsertList && 0 != markedInsertCount )\n    {\n      gxv_mort_subtable_type5_InsertList_validate( markedInsertList,\n                                                   markedInsertCount,\n                                                   table,\n                                                   limit,\n                                                   gxvalid );\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_mort_subtable_type5_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_mort_subtable_type5_StateOptRec      et_rec;\n    GXV_mort_subtable_type5_StateOptRecData  et = &et_rec;\n\n\n    GXV_NAME_ENTER( \"mort chain subtable type5 (Glyph Insertion)\" );\n\n    GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE );\n\n    gxvalid->statetable.optdata =\n      et;\n    gxvalid->statetable.optdata_load_func =\n      NULL;\n    gxvalid->statetable.subtable_setup_func =\n      gxv_mort_subtable_type5_subtable_setup;\n    gxvalid->statetable.entry_glyphoffset_fmt =\n      GXV_GLYPHOFFSET_ULONG;\n    gxvalid->statetable.entry_validate_func =\n      gxv_mort_subtable_type5_entry_validate;\n\n    gxv_StateTable_validate( p, limit, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmorx.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmorx.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT morx table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2005, 2008, 2013 by                                          */\n/*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmorx.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmorx\n\n\n  static void\n  gxv_morx_subtables_validate( FT_Bytes       table,\n                               FT_Bytes       limit,\n                               FT_UShort      nSubtables,\n                               GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_Validate_Func fmt_funcs_table[] =\n    {\n      gxv_morx_subtable_type0_validate, /* 0 */\n      gxv_morx_subtable_type1_validate, /* 1 */\n      gxv_morx_subtable_type2_validate, /* 2 */\n      NULL,                             /* 3 */\n      gxv_morx_subtable_type4_validate, /* 4 */\n      gxv_morx_subtable_type5_validate, /* 5 */\n\n    };\n\n    FT_UShort  i;\n\n\n    GXV_NAME_ENTER( \"subtables in a chain\" );\n\n    for ( i = 0; i < nSubtables; i++ )\n    {\n      GXV_Validate_Func  func;\n\n      FT_ULong  length;\n      FT_ULong  coverage;\n#ifdef GXV_LOAD_UNUSED_VARS\n      FT_ULong  subFeatureFlags;\n#endif\n      FT_ULong  type;\n      FT_ULong  rest;\n\n\n      GXV_LIMIT_CHECK( 4 + 4 + 4 );\n      length          = FT_NEXT_ULONG( p );\n      coverage        = FT_NEXT_ULONG( p );\n#ifdef GXV_LOAD_UNUSED_VARS\n      subFeatureFlags = FT_NEXT_ULONG( p );\n#else\n      p += 4;\n#endif\n\n      GXV_TRACE(( \"validating chain subtable %d/%d (%d bytes)\\n\",\n                  i + 1, nSubtables, length ));\n\n      type = coverage & 0x0007;\n      rest = length - ( 4 + 4 + 4 );\n      GXV_LIMIT_CHECK( rest );\n\n      /* morx coverage consists of mort_coverage & 16bit padding */\n      gxv_mort_coverage_validate( (FT_UShort)( ( coverage >> 16 ) | coverage ),\n                                  gxvalid );\n      if ( type > 5 )\n        FT_INVALID_FORMAT;\n\n      func = fmt_funcs_table[type];\n      if ( func == NULL )\n        GXV_TRACE(( \"morx type %d is reserved\\n\", type ));\n\n      func( p, p + rest, gxvalid );\n\n      /* TODO: subFeatureFlags should be unique in a table? */\n      p += rest;\n    }\n\n    gxvalid->subtable_length = p - table;\n\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_morx_chain_validate( FT_Bytes       table,\n                           FT_Bytes       limit,\n                           GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_ULong  defaultFlags;\n#endif\n    FT_ULong  chainLength;\n    FT_ULong  nFeatureFlags;\n    FT_ULong  nSubtables;\n\n\n    GXV_NAME_ENTER( \"morx chain header\" );\n\n    GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 );\n#ifdef GXV_LOAD_UNUSED_VARS\n    defaultFlags  = FT_NEXT_ULONG( p );\n#else\n    p += 4;\n#endif\n    chainLength   = FT_NEXT_ULONG( p );\n    nFeatureFlags = FT_NEXT_ULONG( p );\n    nSubtables    = FT_NEXT_ULONG( p );\n\n    /* feature-array of morx is same with that of mort */\n    gxv_mort_featurearray_validate( p, limit, nFeatureFlags, gxvalid );\n    p += gxvalid->subtable_length;\n\n    if ( nSubtables >= 0x10000L )\n      FT_INVALID_DATA;\n\n    gxv_morx_subtables_validate( p, table + chainLength,\n                                 (FT_UShort)nSubtables, gxvalid );\n\n    gxvalid->subtable_length = chainLength;\n\n    /* TODO: defaultFlags should be compared with the flags in tables */\n\n    GXV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_morx_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    GXV_ValidatorRec  gxvalidrec;\n    GXV_Validator     gxvalid = &gxvalidrec;\n    FT_Bytes          p     = table;\n    FT_Bytes          limit = 0;\n    FT_ULong          version;\n    FT_ULong          nChains;\n    FT_ULong          i;\n\n\n    gxvalid->root = ftvalid;\n    gxvalid->face = face;\n\n    FT_TRACE3(( \"validating `morx' table\\n\" ));\n    GXV_INIT;\n\n    GXV_LIMIT_CHECK( 4 + 4 );\n    version = FT_NEXT_ULONG( p );\n    nChains = FT_NEXT_ULONG( p );\n\n    if ( version != 0x00020000UL )\n      FT_INVALID_FORMAT;\n\n    for ( i = 0; i < nChains; i++ )\n    {\n      GXV_TRACE(( \"validating chain %d/%d\\n\", i + 1, nChains ));\n      GXV_32BIT_ALIGNMENT_VALIDATE( p - table );\n      gxv_morx_chain_validate( p, limit, gxvalid );\n      p += gxvalid->subtable_length;\n    }\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmorx.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmorx.h                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT common definition for morx table (specification).     */\n/*                                                                         */\n/*  Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __GXVMORX_H__\n#define __GXVMORX_H__\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n#include \"gxvmort.h\"\n\n#include FT_SFNT_NAMES_H\n\n\n  FT_LOCAL( void )\n  gxv_morx_subtable_type0_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_morx_subtable_type1_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_morx_subtable_type2_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_morx_subtable_type4_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n  FT_LOCAL( void )\n  gxv_morx_subtable_type5_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid );\n\n\n#endif /* __GXVMORX_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmorx0.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmorx0.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT morx table validation                                 */\n/*    body for type0 (Indic Script Rearrangement) subtable.                */\n/*                                                                         */\n/*  Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmorx.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmorx\n\n\n  static void\n  gxv_morx_subtable_type0_entry_validate(\n    FT_UShort                        state,\n    FT_UShort                        flags,\n    GXV_XStateTable_GlyphOffsetCPtr  glyphOffset_p,\n    FT_Bytes                         table,\n    FT_Bytes                         limit,\n    GXV_Validator                    gxvalid )\n  {\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_UShort  markFirst;\n    FT_UShort  dontAdvance;\n    FT_UShort  markLast;\n#endif\n    FT_UShort  reserved;\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_UShort  verb;\n#endif\n\n    FT_UNUSED( state );\n    FT_UNUSED( glyphOffset_p );\n    FT_UNUSED( table );\n    FT_UNUSED( limit );\n\n\n#ifdef GXV_LOAD_UNUSED_VARS\n    markFirst   = (FT_UShort)( ( flags >> 15 ) & 1 );\n    dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );\n    markLast    = (FT_UShort)( ( flags >> 13 ) & 1 );\n#endif\n\n    reserved = (FT_UShort)( flags & 0x1FF0 );\n#ifdef GXV_LOAD_UNUSED_VARS\n    verb     = (FT_UShort)( flags & 0x000F );\n#endif\n\n    if ( 0 < reserved )\n    {\n      GXV_TRACE(( \" non-zero bits found in reserved range\\n\" ));\n      FT_INVALID_DATA;\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_morx_subtable_type0_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n\n    GXV_NAME_ENTER(\n      \"morx chain subtable type0 (Indic-Script Rearrangement)\" );\n\n    GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE );\n\n    gxvalid->xstatetable.optdata               = NULL;\n    gxvalid->xstatetable.optdata_load_func     = NULL;\n    gxvalid->xstatetable.subtable_setup_func   = NULL;\n    gxvalid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;\n    gxvalid->xstatetable.entry_validate_func =\n      gxv_morx_subtable_type0_entry_validate;\n\n    gxv_XStateTable_validate( p, limit, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmorx1.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmorx1.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT morx table validation                                 */\n/*    body for type1 (Contextual Substitution) subtable.                   */\n/*                                                                         */\n/*  Copyright 2005, 2007 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmorx.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmorx\n\n\n  typedef struct  GXV_morx_subtable_type1_StateOptRec_\n  {\n    FT_ULong   substitutionTable;\n    FT_ULong   substitutionTable_length;\n    FT_UShort  substitutionTable_num_lookupTables;\n\n  }  GXV_morx_subtable_type1_StateOptRec,\n    *GXV_morx_subtable_type1_StateOptRecData;\n\n\n#define GXV_MORX_SUBTABLE_TYPE1_HEADER_SIZE \\\n          ( GXV_STATETABLE_HEADER_SIZE + 2 )\n\n\n  static void\n  gxv_morx_subtable_type1_substitutionTable_load( FT_Bytes       table,\n                                                  FT_Bytes       limit,\n                                                  GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_morx_subtable_type1_StateOptRecData  optdata =\n      (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;\n\n\n    GXV_LIMIT_CHECK( 2 );\n    optdata->substitutionTable = FT_NEXT_USHORT( p );\n  }\n\n\n  static void\n  gxv_morx_subtable_type1_subtable_setup( FT_ULong       table_size,\n                                          FT_ULong       classTable,\n                                          FT_ULong       stateArray,\n                                          FT_ULong       entryTable,\n                                          FT_ULong*      classTable_length_p,\n                                          FT_ULong*      stateArray_length_p,\n                                          FT_ULong*      entryTable_length_p,\n                                          GXV_Validator  gxvalid )\n  {\n    FT_ULong  o[4];\n    FT_ULong  *l[4];\n    FT_ULong  buff[5];\n\n    GXV_morx_subtable_type1_StateOptRecData  optdata =\n      (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;\n\n\n    o[0] = classTable;\n    o[1] = stateArray;\n    o[2] = entryTable;\n    o[3] = optdata->substitutionTable;\n    l[0] = classTable_length_p;\n    l[1] = stateArray_length_p;\n    l[2] = entryTable_length_p;\n    l[3] = &(optdata->substitutionTable_length);\n\n    gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, gxvalid );\n  }\n\n\n  static void\n  gxv_morx_subtable_type1_entry_validate(\n    FT_UShort                       state,\n    FT_UShort                       flags,\n    GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n    FT_Bytes                        table,\n    FT_Bytes                        limit,\n    GXV_Validator                   gxvalid )\n  {\n#ifdef GXV_LOAD_TRACE_VARS\n    FT_UShort  setMark;\n    FT_UShort  dontAdvance;\n#endif\n    FT_UShort  reserved;\n    FT_Short   markIndex;\n    FT_Short   currentIndex;\n\n    GXV_morx_subtable_type1_StateOptRecData  optdata =\n      (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;\n\n    FT_UNUSED( state );\n    FT_UNUSED( table );\n    FT_UNUSED( limit );\n\n\n#ifdef GXV_LOAD_TRACE_VARS\n    setMark      = (FT_UShort)( ( flags >> 15 ) & 1 );\n    dontAdvance  = (FT_UShort)( ( flags >> 14 ) & 1 );\n#endif\n\n    reserved = (FT_UShort)( flags & 0x3FFF );\n\n    markIndex    = (FT_Short)( glyphOffset_p->ul >> 16 );\n    currentIndex = (FT_Short)( glyphOffset_p->ul       );\n\n    GXV_TRACE(( \" setMark=%01d dontAdvance=%01d\\n\",\n                setMark, dontAdvance ));\n\n    if ( 0 < reserved )\n    {\n      GXV_TRACE(( \" non-zero bits found in reserved range\\n\" ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );\n    }\n\n    GXV_TRACE(( \"markIndex = %d, currentIndex = %d\\n\",\n                markIndex, currentIndex ));\n\n    if ( optdata->substitutionTable_num_lookupTables < markIndex + 1 )\n      optdata->substitutionTable_num_lookupTables =\n        (FT_Short)( markIndex + 1 );\n\n    if ( optdata->substitutionTable_num_lookupTables < currentIndex + 1 )\n      optdata->substitutionTable_num_lookupTables =\n        (FT_Short)( currentIndex + 1 );\n  }\n\n\n  static void\n  gxv_morx_subtable_type1_LookupValue_validate( FT_UShort            glyph,\n                                                GXV_LookupValueCPtr  value_p,\n                                                GXV_Validator        gxvalid )\n  {\n    FT_UNUSED( glyph ); /* for the non-debugging case */\n\n    GXV_TRACE(( \"morx subtable type1 subst.: %d -> %d\\n\", glyph, value_p->u ));\n\n    if ( value_p->u > gxvalid->face->num_glyphs )\n      FT_INVALID_GLYPH_ID;\n  }\n\n\n  static GXV_LookupValueDesc\n  gxv_morx_subtable_type1_LookupFmt4_transit(\n    FT_UShort            relative_gindex,\n    GXV_LookupValueCPtr  base_value_p,\n    FT_Bytes             lookuptbl_limit,\n    GXV_Validator        gxvalid )\n  {\n    FT_Bytes             p;\n    FT_Bytes             limit;\n    FT_UShort            offset;\n    GXV_LookupValueDesc  value;\n\n    /* XXX: check range? */\n    offset = (FT_UShort)( base_value_p->u +\n                          relative_gindex * sizeof ( FT_UShort ) );\n\n    p     = gxvalid->lookuptbl_head + offset;\n    limit = lookuptbl_limit;\n\n    GXV_LIMIT_CHECK ( 2 );\n    value.u = FT_NEXT_USHORT( p );\n\n    return value;\n  }\n\n\n  /*\n   * TODO: length should be limit?\n   **/\n  static void\n  gxv_morx_subtable_type1_substitutionTable_validate( FT_Bytes       table,\n                                                      FT_Bytes       limit,\n                                                      GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  i;\n\n    GXV_morx_subtable_type1_StateOptRecData  optdata =\n      (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;\n\n\n    /* TODO: calculate offset/length for each lookupTables */\n    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;\n    gxvalid->lookupval_func   = gxv_morx_subtable_type1_LookupValue_validate;\n    gxvalid->lookupfmt4_trans = gxv_morx_subtable_type1_LookupFmt4_transit;\n\n    for ( i = 0; i < optdata->substitutionTable_num_lookupTables; i++ )\n    {\n      FT_ULong  offset;\n\n\n      GXV_LIMIT_CHECK( 4 );\n      offset = FT_NEXT_ULONG( p );\n\n      gxv_LookupTable_validate( table + offset, limit, gxvalid );\n    }\n\n    /* TODO: overlapping of lookupTables in substitutionTable */\n  }\n\n\n  /*\n   * subtable for Contextual glyph substitution is a modified StateTable.\n   * In addition to classTable, stateArray, entryTable, the field\n   * `substitutionTable' is added.\n   */\n  FT_LOCAL_DEF( void )\n  gxv_morx_subtable_type1_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_morx_subtable_type1_StateOptRec  st_rec;\n\n\n    GXV_NAME_ENTER( \"morx chain subtable type1 (Contextual Glyph Subst)\" );\n\n    GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE1_HEADER_SIZE );\n\n    st_rec.substitutionTable_num_lookupTables = 0;\n\n    gxvalid->xstatetable.optdata =\n      &st_rec;\n    gxvalid->xstatetable.optdata_load_func =\n      gxv_morx_subtable_type1_substitutionTable_load;\n    gxvalid->xstatetable.subtable_setup_func =\n      gxv_morx_subtable_type1_subtable_setup;\n    gxvalid->xstatetable.entry_glyphoffset_fmt =\n      GXV_GLYPHOFFSET_ULONG;\n    gxvalid->xstatetable.entry_validate_func =\n      gxv_morx_subtable_type1_entry_validate;\n\n    gxv_XStateTable_validate( p, limit, gxvalid );\n\n    gxv_morx_subtable_type1_substitutionTable_validate(\n      table + st_rec.substitutionTable,\n      table + st_rec.substitutionTable + st_rec.substitutionTable_length,\n      gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmorx2.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmorx2.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT morx table validation                                 */\n/*    body for type2 (Ligature Substitution) subtable.                     */\n/*                                                                         */\n/*  Copyright 2005, 2013 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmorx.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmorx\n\n\n  typedef struct  GXV_morx_subtable_type2_StateOptRec_\n  {\n    FT_ULong  ligActionTable;\n    FT_ULong  componentTable;\n    FT_ULong  ligatureTable;\n    FT_ULong  ligActionTable_length;\n    FT_ULong  componentTable_length;\n    FT_ULong  ligatureTable_length;\n\n  }  GXV_morx_subtable_type2_StateOptRec,\n    *GXV_morx_subtable_type2_StateOptRecData;\n\n\n#define GXV_MORX_SUBTABLE_TYPE2_HEADER_SIZE \\\n          ( GXV_XSTATETABLE_HEADER_SIZE + 4 + 4 + 4 )\n\n\n  static void\n  gxv_morx_subtable_type2_opttable_load( FT_Bytes       table,\n                                         FT_Bytes       limit,\n                                         GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_morx_subtable_type2_StateOptRecData  optdata =\n      (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;\n\n\n    GXV_LIMIT_CHECK( 4 + 4 + 4 );\n    optdata->ligActionTable = FT_NEXT_ULONG( p );\n    optdata->componentTable = FT_NEXT_ULONG( p );\n    optdata->ligatureTable  = FT_NEXT_ULONG( p );\n\n    GXV_TRACE(( \"offset to ligActionTable=0x%08x\\n\",\n                optdata->ligActionTable ));\n    GXV_TRACE(( \"offset to componentTable=0x%08x\\n\",\n                optdata->componentTable ));\n    GXV_TRACE(( \"offset to ligatureTable=0x%08x\\n\",\n                optdata->ligatureTable ));\n  }\n\n\n  static void\n  gxv_morx_subtable_type2_subtable_setup( FT_ULong       table_size,\n                                          FT_ULong       classTable,\n                                          FT_ULong       stateArray,\n                                          FT_ULong       entryTable,\n                                          FT_ULong*      classTable_length_p,\n                                          FT_ULong*      stateArray_length_p,\n                                          FT_ULong*      entryTable_length_p,\n                                          GXV_Validator  gxvalid )\n  {\n    FT_ULong   o[6];\n    FT_ULong*  l[6];\n    FT_ULong   buff[7];\n\n    GXV_morx_subtable_type2_StateOptRecData  optdata =\n      (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;\n\n\n    GXV_NAME_ENTER( \"subtable boundaries setup\" );\n\n    o[0] = classTable;\n    o[1] = stateArray;\n    o[2] = entryTable;\n    o[3] = optdata->ligActionTable;\n    o[4] = optdata->componentTable;\n    o[5] = optdata->ligatureTable;\n    l[0] = classTable_length_p;\n    l[1] = stateArray_length_p;\n    l[2] = entryTable_length_p;\n    l[3] = &(optdata->ligActionTable_length);\n    l[4] = &(optdata->componentTable_length);\n    l[5] = &(optdata->ligatureTable_length);\n\n    gxv_set_length_by_ulong_offset( o, l, buff, 6, table_size, gxvalid );\n\n    GXV_TRACE(( \"classTable: offset=0x%08x length=0x%08x\\n\",\n                classTable, *classTable_length_p ));\n    GXV_TRACE(( \"stateArray: offset=0x%08x length=0x%08x\\n\",\n                stateArray, *stateArray_length_p ));\n    GXV_TRACE(( \"entryTable: offset=0x%08x length=0x%08x\\n\",\n                entryTable, *entryTable_length_p ));\n    GXV_TRACE(( \"ligActionTable: offset=0x%08x length=0x%08x\\n\",\n                optdata->ligActionTable,\n                optdata->ligActionTable_length ));\n    GXV_TRACE(( \"componentTable: offset=0x%08x length=0x%08x\\n\",\n                optdata->componentTable,\n                optdata->componentTable_length ));\n    GXV_TRACE(( \"ligatureTable:  offset=0x%08x length=0x%08x\\n\",\n                optdata->ligatureTable,\n                optdata->ligatureTable_length ));\n\n    GXV_EXIT;\n  }\n\n\n#define GXV_MORX_LIGACTION_ENTRY_SIZE  4\n\n\n  static void\n  gxv_morx_subtable_type2_ligActionIndex_validate(\n    FT_Bytes       table,\n    FT_UShort      ligActionIndex,\n    GXV_Validator  gxvalid )\n  {\n    /* access ligActionTable */\n    GXV_morx_subtable_type2_StateOptRecData optdata =\n      (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;\n\n    FT_Bytes lat_base  = table + optdata->ligActionTable;\n    FT_Bytes p         = lat_base +\n                         ligActionIndex * GXV_MORX_LIGACTION_ENTRY_SIZE;\n    FT_Bytes lat_limit = lat_base + optdata->ligActionTable;\n\n\n    if ( p < lat_base )\n    {\n      GXV_TRACE(( \"p < lat_base (%d byte rewind)\\n\", lat_base - p ));\n      FT_INVALID_OFFSET;\n    }\n    else if ( lat_limit < p )\n    {\n      GXV_TRACE(( \"lat_limit < p (%d byte overrun)\\n\", p - lat_limit ));\n      FT_INVALID_OFFSET;\n    }\n\n    {\n      /* validate entry in ligActionTable */\n      FT_ULong   lig_action;\n#ifdef GXV_LOAD_UNUSED_VARS\n      FT_UShort  last;\n      FT_UShort  store;\n#endif\n      FT_ULong   offset;\n      FT_Long    gid_limit;\n\n\n      lig_action = FT_NEXT_ULONG( p );\n#ifdef GXV_LOAD_UNUSED_VARS\n      last       = (FT_UShort)( ( lig_action >> 31 ) & 1 );\n      store      = (FT_UShort)( ( lig_action >> 30 ) & 1 );\n#endif\n\n      offset = lig_action & 0x3FFFFFFFUL;\n\n      /* this offset is 30-bit signed value to add to GID */\n      /* it is different from the location offset in mort */\n      if ( ( offset & 0x3FFF0000UL ) == 0x3FFF0000UL )\n      { /* negative offset */\n        gid_limit = gxvalid->face->num_glyphs - ( offset & 0x0000FFFFUL );\n        if ( gid_limit > 0 )\n          return;\n\n        GXV_TRACE(( \"ligature action table includes\"\n                    \" too negative offset moving all GID\"\n                    \" below defined range: 0x%04x\\n\",\n                    offset & 0xFFFFU ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n      }\n      else if ( ( offset & 0x3FFF0000UL ) == 0x00000000UL )\n      { /* positive offset */\n        if ( (FT_Long)offset < gxvalid->face->num_glyphs )\n          return;\n\n        GXV_TRACE(( \"ligature action table includes\"\n                    \" too large offset moving all GID\"\n                    \" over defined range: 0x%04x\\n\",\n                    offset & 0xFFFFU ));\n        GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n      }\n\n      GXV_TRACE(( \"ligature action table includes\"\n                  \" invalid offset to add to 16-bit GID:\"\n                  \" 0x%08x\\n\", offset ));\n      GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );\n    }\n  }\n\n\n  static void\n  gxv_morx_subtable_type2_entry_validate(\n    FT_UShort                       state,\n    FT_UShort                       flags,\n    GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n    FT_Bytes                        table,\n    FT_Bytes                        limit,\n    GXV_Validator                   gxvalid )\n  {\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_UShort  setComponent;\n    FT_UShort  dontAdvance;\n    FT_UShort  performAction;\n#endif\n    FT_UShort  reserved;\n    FT_UShort  ligActionIndex;\n\n    FT_UNUSED( state );\n    FT_UNUSED( limit );\n\n\n#ifdef GXV_LOAD_UNUSED_VARS\n    setComponent   = (FT_UShort)( ( flags >> 15 ) & 1 );\n    dontAdvance    = (FT_UShort)( ( flags >> 14 ) & 1 );\n    performAction  = (FT_UShort)( ( flags >> 13 ) & 1 );\n#endif\n\n    reserved       = (FT_UShort)( flags & 0x1FFF );\n    ligActionIndex = glyphOffset_p->u;\n\n    if ( reserved > 0 )\n      GXV_TRACE(( \"  reserved 14bit is non-zero\\n\" ));\n\n    if ( 0 < ligActionIndex )\n      gxv_morx_subtable_type2_ligActionIndex_validate(\n        table, ligActionIndex, gxvalid );\n  }\n\n\n  static void\n  gxv_morx_subtable_type2_ligatureTable_validate( FT_Bytes       table,\n                                                  GXV_Validator  gxvalid )\n  {\n    GXV_morx_subtable_type2_StateOptRecData  optdata =\n      (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;\n\n    FT_Bytes p     = table + optdata->ligatureTable;\n    FT_Bytes limit = table + optdata->ligatureTable\n                           + optdata->ligatureTable_length;\n\n\n    GXV_NAME_ENTER( \"morx chain subtable type2 - substitutionTable\" );\n\n    if ( 0 != optdata->ligatureTable )\n    {\n      /* Apple does not give specification of ligatureTable format */\n      while ( p < limit )\n      {\n        FT_UShort  lig_gid;\n\n\n        GXV_LIMIT_CHECK( 2 );\n        lig_gid = FT_NEXT_USHORT( p );\n        if ( lig_gid < gxvalid->face->num_glyphs )\n          GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );\n      }\n    }\n\n    GXV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_morx_subtable_type2_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_morx_subtable_type2_StateOptRec  lig_rec;\n\n\n    GXV_NAME_ENTER( \"morx chain subtable type2 (Ligature Substitution)\" );\n\n    GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE2_HEADER_SIZE );\n\n    gxvalid->xstatetable.optdata =\n      &lig_rec;\n    gxvalid->xstatetable.optdata_load_func =\n      gxv_morx_subtable_type2_opttable_load;\n    gxvalid->xstatetable.subtable_setup_func =\n      gxv_morx_subtable_type2_subtable_setup;\n    gxvalid->xstatetable.entry_glyphoffset_fmt =\n      GXV_GLYPHOFFSET_USHORT;\n    gxvalid->xstatetable.entry_validate_func =\n      gxv_morx_subtable_type2_entry_validate;\n\n    gxv_XStateTable_validate( p, limit, gxvalid );\n\n#if 0\n    p += gxvalid->subtable_length;\n#endif\n    gxv_morx_subtable_type2_ligatureTable_validate( table, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmorx4.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmorx4.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT morx table validation                                 */\n/*    body for \"morx\" type4 (Non-Contextual Glyph Substitution) subtable.  */\n/*                                                                         */\n/*  Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmorx.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmorx\n\n\n  FT_LOCAL_DEF( void )\n  gxv_morx_subtable_type4_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    GXV_NAME_ENTER( \"morx chain subtable type4 \"\n                    \"(Non-Contextual Glyph Substitution)\" );\n\n    gxv_mort_subtable_type4_validate( table, limit, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvmorx5.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvmorx5.c                                                             */\n/*                                                                         */\n/*    TrueTypeGX/AAT morx table validation                                 */\n/*    body for type5 (Contextual Glyph Insertion) subtable.                */\n/*                                                                         */\n/*  Copyright 2005, 2007 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvmorx.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvmorx\n\n\n  /*\n   * `morx' subtable type5 (Contextual Glyph Insertion)\n   * has format of a StateTable with insertion-glyph-list\n   * without name.  However, the 32bit offset from the head\n   * of subtable to the i-g-l is given after `entryTable',\n   * without variable name specification (the existence of\n   * this offset to the table is different from mort type5).\n   */\n\n\n  typedef struct  GXV_morx_subtable_type5_StateOptRec_\n  {\n    FT_ULong  insertionGlyphList;\n    FT_ULong  insertionGlyphList_length;\n\n  }  GXV_morx_subtable_type5_StateOptRec,\n    *GXV_morx_subtable_type5_StateOptRecData;\n\n\n#define GXV_MORX_SUBTABLE_TYPE5_HEADER_SIZE \\\n          ( GXV_STATETABLE_HEADER_SIZE + 4 )\n\n\n  static void\n  gxv_morx_subtable_type5_insertionGlyphList_load( FT_Bytes       table,\n                                                   FT_Bytes       limit,\n                                                   GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_morx_subtable_type5_StateOptRecData  optdata =\n      (GXV_morx_subtable_type5_StateOptRecData)gxvalid->xstatetable.optdata;\n\n\n    GXV_LIMIT_CHECK( 4 );\n    optdata->insertionGlyphList = FT_NEXT_ULONG( p );\n  }\n\n\n  static void\n  gxv_morx_subtable_type5_subtable_setup( FT_ULong       table_size,\n                                          FT_ULong       classTable,\n                                          FT_ULong       stateArray,\n                                          FT_ULong       entryTable,\n                                          FT_ULong*      classTable_length_p,\n                                          FT_ULong*      stateArray_length_p,\n                                          FT_ULong*      entryTable_length_p,\n                                          GXV_Validator  gxvalid )\n  {\n    FT_ULong   o[4];\n    FT_ULong*  l[4];\n    FT_ULong   buff[5];\n\n    GXV_morx_subtable_type5_StateOptRecData  optdata =\n      (GXV_morx_subtable_type5_StateOptRecData)gxvalid->xstatetable.optdata;\n\n\n    o[0] = classTable;\n    o[1] = stateArray;\n    o[2] = entryTable;\n    o[3] = optdata->insertionGlyphList;\n    l[0] = classTable_length_p;\n    l[1] = stateArray_length_p;\n    l[2] = entryTable_length_p;\n    l[3] = &(optdata->insertionGlyphList_length);\n\n    gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, gxvalid );\n  }\n\n\n  static void\n  gxv_morx_subtable_type5_InsertList_validate( FT_UShort      table_index,\n                                               FT_UShort      count,\n                                               FT_Bytes       table,\n                                               FT_Bytes       limit,\n                                               GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table + table_index * 2;\n\n\n#ifndef GXV_LOAD_TRACE_VARS\n    GXV_LIMIT_CHECK( count * 2 );\n#else\n    while ( p < table + count * 2 + table_index * 2 )\n    {\n      FT_UShort  insert_glyphID;\n\n\n      GXV_LIMIT_CHECK( 2 );\n      insert_glyphID = FT_NEXT_USHORT( p );\n      GXV_TRACE(( \" 0x%04x\", insert_glyphID ));\n    }\n\n    GXV_TRACE(( \"\\n\" ));\n#endif\n  }\n\n\n  static void\n  gxv_morx_subtable_type5_entry_validate(\n    FT_UShort                       state,\n    FT_UShort                       flags,\n    GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,\n    FT_Bytes                        table,\n    FT_Bytes                        limit,\n    GXV_Validator                   gxvalid )\n  {\n#ifdef GXV_LOAD_UNUSED_VARS\n    FT_Bool    setMark;\n    FT_Bool    dontAdvance;\n    FT_Bool    currentIsKashidaLike;\n    FT_Bool    markedIsKashidaLike;\n    FT_Bool    currentInsertBefore;\n    FT_Bool    markedInsertBefore;\n#endif\n    FT_Byte    currentInsertCount;\n    FT_Byte    markedInsertCount;\n    FT_Byte    currentInsertList;\n    FT_UShort  markedInsertList;\n\n    FT_UNUSED( state );\n\n\n#ifdef GXV_LOAD_UNUSED_VARS\n    setMark              = FT_BOOL( ( flags >> 15 ) & 1 );\n    dontAdvance          = FT_BOOL( ( flags >> 14 ) & 1 );\n    currentIsKashidaLike = FT_BOOL( ( flags >> 13 ) & 1 );\n    markedIsKashidaLike  = FT_BOOL( ( flags >> 12 ) & 1 );\n    currentInsertBefore  = FT_BOOL( ( flags >> 11 ) & 1 );\n    markedInsertBefore   = FT_BOOL( ( flags >> 10 ) & 1 );\n#endif\n\n    currentInsertCount = (FT_Byte)( ( flags >> 5 ) & 0x1F   );\n    markedInsertCount  = (FT_Byte)(   flags        & 0x001F );\n\n    currentInsertList = (FT_Byte)  ( glyphOffset_p->ul >> 16 );\n    markedInsertList  = (FT_UShort)( glyphOffset_p->ul       );\n\n    if ( currentInsertList && 0 != currentInsertCount )\n      gxv_morx_subtable_type5_InsertList_validate( currentInsertList,\n                                                   currentInsertCount,\n                                                   table, limit,\n                                                   gxvalid );\n\n    if ( markedInsertList && 0 != markedInsertCount )\n      gxv_morx_subtable_type5_InsertList_validate( markedInsertList,\n                                                   markedInsertCount,\n                                                   table, limit,\n                                                   gxvalid );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  gxv_morx_subtable_type5_validate( FT_Bytes       table,\n                                    FT_Bytes       limit,\n                                    GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    GXV_morx_subtable_type5_StateOptRec      et_rec;\n    GXV_morx_subtable_type5_StateOptRecData  et = &et_rec;\n\n\n    GXV_NAME_ENTER( \"morx chain subtable type5 (Glyph Insertion)\" );\n\n    GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE5_HEADER_SIZE );\n\n    gxvalid->xstatetable.optdata =\n      et;\n    gxvalid->xstatetable.optdata_load_func =\n      gxv_morx_subtable_type5_insertionGlyphList_load;\n    gxvalid->xstatetable.subtable_setup_func =\n      gxv_morx_subtable_type5_subtable_setup;\n    gxvalid->xstatetable.entry_glyphoffset_fmt =\n      GXV_GLYPHOFFSET_ULONG;\n    gxvalid->xstatetable.entry_validate_func =\n      gxv_morx_subtable_type5_entry_validate;\n\n    gxv_XStateTable_validate( p, limit, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvopbd.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvopbd.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT opbd table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvopbd\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      Data and Types                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  GXV_opbd_DataRec_\n  {\n    FT_UShort  format;\n    FT_UShort  valueOffset_min;\n\n  } GXV_opbd_DataRec, *GXV_opbd_Data;\n\n\n#define GXV_OPBD_DATA( FIELD )  GXV_TABLE_DATA( opbd, FIELD )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  gxv_opbd_LookupValue_validate( FT_UShort            glyph,\n                                 GXV_LookupValueCPtr  value_p,\n                                 GXV_Validator        gxvalid )\n  {\n    /* offset in LookupTable is measured from the head of opbd table */\n    FT_Bytes   p     = gxvalid->root->base + value_p->u;\n    FT_Bytes   limit = gxvalid->root->limit;\n    FT_Short   delta_value;\n    int        i;\n\n\n    if ( value_p->u < GXV_OPBD_DATA( valueOffset_min ) )\n      GXV_OPBD_DATA( valueOffset_min ) = value_p->u;\n\n    for ( i = 0; i < 4; i++ )\n    {\n      GXV_LIMIT_CHECK( 2 );\n      delta_value = FT_NEXT_SHORT( p );\n\n      if ( GXV_OPBD_DATA( format ) )    /* format 1, value is ctrl pt. */\n      {\n        if ( delta_value == -1 )\n          continue;\n\n        gxv_ctlPoint_validate( glyph, delta_value, gxvalid );\n      }\n      else                              /* format 0, value is distance */\n        continue;\n    }\n  }\n\n\n  /*\n    opbd ---------------------+\n                              |\n    +===============+         |\n    | lookup header |         |\n    +===============+         |\n    | BinSrchHeader |         |\n    +===============+         |\n    | lastGlyph[0]  |         |\n    +---------------+         |\n    | firstGlyph[0] |         |  head of opbd sfnt table\n    +---------------+         |             +\n    | offset[0]     |    ->   |          offset            [byte]\n    +===============+         |             +\n    | lastGlyph[1]  |         | (glyphID - firstGlyph) * 4 * sizeof(FT_Short) [byte]\n    +---------------+         |\n    | firstGlyph[1] |         |\n    +---------------+         |\n    | offset[1]     |         |\n    +===============+         |\n                              |\n     ....                     |\n                              |\n    48bit value array         |\n    +===============+         |\n    |     value     | <-------+\n    |               |\n    |               |\n    |               |\n    +---------------+\n    .... */\n\n  static GXV_LookupValueDesc\n  gxv_opbd_LookupFmt4_transit( FT_UShort            relative_gindex,\n                               GXV_LookupValueCPtr  base_value_p,\n                               FT_Bytes             lookuptbl_limit,\n                               GXV_Validator        gxvalid )\n  {\n    GXV_LookupValueDesc  value;\n\n    FT_UNUSED( lookuptbl_limit );\n    FT_UNUSED( gxvalid );\n\n    /* XXX: check range? */\n    value.u = (FT_UShort)( base_value_p->u +\n                           relative_gindex * 4 * sizeof ( FT_Short ) );\n\n    return value;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         opbd TABLE                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  gxv_opbd_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    GXV_ValidatorRec  gxvalidrec;\n    GXV_Validator     gxvalid = &gxvalidrec;\n    GXV_opbd_DataRec  opbdrec;\n    GXV_opbd_Data     opbd  = &opbdrec;\n    FT_Bytes          p     = table;\n    FT_Bytes          limit = 0;\n\n    FT_ULong  version;\n\n\n    gxvalid->root       = ftvalid;\n    gxvalid->table_data = opbd;\n    gxvalid->face       = face;\n\n    FT_TRACE3(( \"validating `opbd' table\\n\" ));\n    GXV_INIT;\n    GXV_OPBD_DATA( valueOffset_min ) = 0xFFFFU;\n\n\n    GXV_LIMIT_CHECK( 4 + 2 );\n    version                 = FT_NEXT_ULONG( p );\n    GXV_OPBD_DATA( format ) = FT_NEXT_USHORT( p );\n\n\n    /* only 0x00010000 is defined (1996) */\n    GXV_TRACE(( \"(version=0x%08x)\\n\", version ));\n    if ( 0x00010000UL != version )\n      FT_INVALID_FORMAT;\n\n    /* only values 0 and 1 are defined (1996) */\n    GXV_TRACE(( \"(format=0x%04x)\\n\", GXV_OPBD_DATA( format ) ));\n    if ( 0x0001 < GXV_OPBD_DATA( format ) )\n      FT_INVALID_FORMAT;\n\n    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;\n    gxvalid->lookupval_func   = gxv_opbd_LookupValue_validate;\n    gxvalid->lookupfmt4_trans = gxv_opbd_LookupFmt4_transit;\n\n    gxv_LookupTable_validate( p, limit, gxvalid );\n    p += gxvalid->subtable_length;\n\n    if ( p > table + GXV_OPBD_DATA( valueOffset_min ) )\n    {\n      GXV_TRACE((\n        \"found overlap between LookupTable and opbd_value array\\n\" ));\n      FT_INVALID_OFFSET;\n    }\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvprop.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvprop.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT prop table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvprop\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      Data and Types                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define GXV_PROP_HEADER_SIZE  ( 4 + 2 + 2 )\n#define GXV_PROP_SIZE_MIN     GXV_PROP_HEADER_SIZE\n\n  typedef struct  GXV_prop_DataRec_\n  {\n    FT_Fixed  version;\n\n  } GXV_prop_DataRec, *GXV_prop_Data;\n\n#define GXV_PROP_DATA( field )  GXV_TABLE_DATA( prop, field )\n\n#define GXV_PROP_FLOATER                      0x8000U\n#define GXV_PROP_USE_COMPLEMENTARY_BRACKET    0x1000U\n#define GXV_PROP_COMPLEMENTARY_BRACKET_OFFSET 0x0F00U\n#define GXV_PROP_ATTACHING_TO_RIGHT           0x0080U\n#define GXV_PROP_RESERVED                     0x0060U\n#define GXV_PROP_DIRECTIONALITY_CLASS         0x001FU\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  gxv_prop_zero_advance_validate( FT_UShort      gid,\n                                  GXV_Validator  gxvalid )\n  {\n    FT_Face       face;\n    FT_Error      error;\n    FT_GlyphSlot  glyph;\n\n\n    GXV_NAME_ENTER( \"zero advance\" );\n\n    face = gxvalid->face;\n\n    error = FT_Load_Glyph( face,\n                           gid,\n                           FT_LOAD_IGNORE_TRANSFORM );\n    if ( error )\n      FT_INVALID_GLYPH_ID;\n\n    glyph = face->glyph;\n\n    if ( glyph->advance.x != (FT_Pos)0 ||\n         glyph->advance.y != (FT_Pos)0 )\n    {\n      GXV_TRACE(( \"  found non-zero advance in zero-advance glyph\\n\" ));\n      FT_INVALID_DATA;\n    }\n\n    GXV_EXIT;\n  }\n\n\n  /* Pass 0 as GLYPH to check the default property */\n  static void\n  gxv_prop_property_validate( FT_UShort      property,\n                              FT_UShort      glyph,\n                              GXV_Validator  gxvalid )\n  {\n    if ( glyph != 0 && ( property & GXV_PROP_FLOATER ) )\n      gxv_prop_zero_advance_validate( glyph, gxvalid );\n\n    if ( property & GXV_PROP_USE_COMPLEMENTARY_BRACKET )\n    {\n      FT_UShort  offset;\n      char       complement;\n\n\n      offset = (FT_UShort)( property & GXV_PROP_COMPLEMENTARY_BRACKET_OFFSET );\n      if ( offset == 0 )\n      {\n        GXV_TRACE(( \"  found zero offset to property\\n\" ));\n        FT_INVALID_OFFSET;\n      }\n\n      complement = (char)( offset >> 8 );\n      if ( complement & 0x08 )\n      {\n        /* Top bit is set: negative */\n\n        /* Calculate the absolute offset */\n        complement = (char)( ( complement & 0x07 ) + 1 );\n\n        /* The gid for complement must be greater than 0 */\n        if ( glyph <= complement )\n        {\n          GXV_TRACE(( \"  found non-positive glyph complement\\n\" ));\n          FT_INVALID_DATA;\n        }\n      }\n      else\n      {\n        /* The gid for complement must be the face. */\n        gxv_glyphid_validate( (FT_UShort)( glyph + complement ), gxvalid );\n      }\n    }\n    else\n    {\n      if ( property & GXV_PROP_COMPLEMENTARY_BRACKET_OFFSET )\n        GXV_TRACE(( \"glyph %d cannot have complementary bracketing\\n\",\n                    glyph ));\n    }\n\n    /* this is introduced in version 2.0 */\n    if ( property & GXV_PROP_ATTACHING_TO_RIGHT )\n    {\n      if ( GXV_PROP_DATA( version ) == 0x00010000UL )\n      {\n        GXV_TRACE(( \"  found older version (1.0) in new version table\\n\" ));\n        FT_INVALID_DATA;\n      }\n    }\n\n    if ( property & GXV_PROP_RESERVED )\n    {\n      GXV_TRACE(( \"  found non-zero bits in reserved bits\\n\" ));\n      FT_INVALID_DATA;\n    }\n\n    if ( ( property & GXV_PROP_DIRECTIONALITY_CLASS ) > 11 )\n    {\n      /* TODO: Too restricted. Use the validation level. */\n      if ( GXV_PROP_DATA( version ) == 0x00010000UL ||\n           GXV_PROP_DATA( version ) == 0x00020000UL )\n      {\n        GXV_TRACE(( \"  found too old version in directionality class\\n\" ));\n        FT_INVALID_DATA;\n      }\n    }\n  }\n\n\n  static void\n  gxv_prop_LookupValue_validate( FT_UShort            glyph,\n                                 GXV_LookupValueCPtr  value_p,\n                                 GXV_Validator        gxvalid )\n  {\n    gxv_prop_property_validate( value_p->u, glyph, gxvalid );\n  }\n\n\n  /*\n    +===============+ --------+\n    | lookup header |         |\n    +===============+         |\n    | BinSrchHeader |         |\n    +===============+         |\n    | lastGlyph[0]  |         |\n    +---------------+         |\n    | firstGlyph[0] |         |    head of lookup table\n    +---------------+         |             +\n    | offset[0]     |    ->   |          offset            [byte]\n    +===============+         |             +\n    | lastGlyph[1]  |         | (glyphID - firstGlyph) * 2 [byte]\n    +---------------+         |\n    | firstGlyph[1] |         |\n    +---------------+         |\n    | offset[1]     |         |\n    +===============+         |\n                              |\n     ...                      |\n                              |\n    16bit value array         |\n    +===============+         |\n    |     value     | <-------+\n    ...\n  */\n\n  static GXV_LookupValueDesc\n  gxv_prop_LookupFmt4_transit( FT_UShort            relative_gindex,\n                               GXV_LookupValueCPtr  base_value_p,\n                               FT_Bytes             lookuptbl_limit,\n                               GXV_Validator        gxvalid )\n  {\n    FT_Bytes             p;\n    FT_Bytes             limit;\n    FT_UShort            offset;\n    GXV_LookupValueDesc  value;\n\n    /* XXX: check range? */\n    offset = (FT_UShort)( base_value_p->u +\n                          relative_gindex * sizeof ( FT_UShort ) );\n    p      = gxvalid->lookuptbl_head + offset;\n    limit  = lookuptbl_limit;\n\n    GXV_LIMIT_CHECK ( 2 );\n    value.u = FT_NEXT_USHORT( p );\n\n    return value;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         prop TABLE                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  gxv_prop_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    FT_Bytes          p     = table;\n    FT_Bytes          limit = 0;\n    GXV_ValidatorRec  gxvalidrec;\n    GXV_Validator     gxvalid = &gxvalidrec;\n\n    GXV_prop_DataRec  proprec;\n    GXV_prop_Data     prop = &proprec;\n\n    FT_Fixed          version;\n    FT_UShort         format;\n    FT_UShort         defaultProp;\n\n\n    gxvalid->root       = ftvalid;\n    gxvalid->table_data = prop;\n    gxvalid->face       = face;\n\n    FT_TRACE3(( \"validating `prop' table\\n\" ));\n    GXV_INIT;\n\n    GXV_LIMIT_CHECK( 4 + 2 + 2 );\n    version     = FT_NEXT_ULONG( p );\n    format      = FT_NEXT_USHORT( p );\n    defaultProp = FT_NEXT_USHORT( p );\n\n    GXV_TRACE(( \"  version 0x%08x\\n\", version ));\n    GXV_TRACE(( \"  format  0x%04x\\n\", format ));\n    GXV_TRACE(( \"  defaultProp  0x%04x\\n\", defaultProp ));\n\n    /* only versions 1.0, 2.0, 3.0 are defined (1996) */\n    if ( version != 0x00010000UL &&\n         version != 0x00020000UL &&\n         version != 0x00030000UL )\n    {\n      GXV_TRACE(( \"  found unknown version\\n\" ));\n      FT_INVALID_FORMAT;\n    }\n\n\n    /* only formats 0x0000, 0x0001 are defined (1996) */\n    if ( format > 1 )\n    {\n      GXV_TRACE(( \"  found unknown format\\n\" ));\n      FT_INVALID_FORMAT;\n    }\n\n    gxv_prop_property_validate( defaultProp, 0, gxvalid );\n\n    if ( format == 0 )\n    {\n      FT_TRACE3(( \"(format 0, no per-glyph properties, \"\n                  \"remaining %d bytes are skipped)\", limit - p ));\n      goto Exit;\n    }\n\n    /* format == 1 */\n    GXV_PROP_DATA( version ) = version;\n\n    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;\n    gxvalid->lookupval_func   = gxv_prop_LookupValue_validate;\n    gxvalid->lookupfmt4_trans = gxv_prop_LookupFmt4_transit;\n\n    gxv_LookupTable_validate( p, limit, gxvalid );\n\n  Exit:\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gxvalid/gxvtrak.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  gxvtrak.c                                                              */\n/*                                                                         */\n/*    TrueTypeGX/AAT trak table validation (body).                         */\n/*                                                                         */\n/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"gxvalid.h\"\n#include \"gxvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_gxvtrak\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      Data and Types                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n    /*\n     * referred track table format specification:\n     * http://developer.apple.com/fonts/TTRefMan/RM06/Chap6trak.html\n     * last update was 1996.\n     * ----------------------------------------------\n     * [MINIMUM HEADER]: GXV_TRAK_SIZE_MIN\n     * version          (fixed:  32bit) = 0x00010000\n     * format           (uint16: 16bit) = 0 is only defined (1996)\n     * horizOffset      (uint16: 16bit)\n     * vertOffset       (uint16: 16bit)\n     * reserved         (uint16: 16bit) = 0\n     * ----------------------------------------------\n     * [VARIABLE BODY]:\n     * horizData\n     *   header         ( 2 + 2 + 4\n     *   trackTable       + nTracks * ( 4 + 2 + 2 )\n     *   sizeTable        + nSizes * 4 )\n     * ----------------------------------------------\n     * vertData\n     *   header         ( 2 + 2 + 4\n     *   trackTable       + nTracks * ( 4 + 2 + 2 )\n     *   sizeTable        + nSizes * 4 )\n     * ----------------------------------------------\n     */\n  typedef struct  GXV_trak_DataRec_\n  {\n    FT_UShort  trackValueOffset_min;\n    FT_UShort  trackValueOffset_max;\n\n  } GXV_trak_DataRec, *GXV_trak_Data;\n\n\n#define GXV_TRAK_DATA( FIELD )  GXV_TABLE_DATA( trak, FIELD )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  gxv_trak_trackTable_validate( FT_Bytes       table,\n                                FT_Bytes       limit,\n                                FT_UShort      nTracks,\n                                GXV_Validator  gxvalid )\n  {\n    FT_Bytes  p = table;\n\n    FT_Fixed   track, t;\n    FT_UShort  nameIndex;\n    FT_UShort  offset;\n    FT_UShort  i, j;\n\n\n    GXV_NAME_ENTER( \"trackTable\" );\n\n    GXV_TRAK_DATA( trackValueOffset_min ) = 0xFFFFU;\n    GXV_TRAK_DATA( trackValueOffset_max ) = 0x0000;\n\n    GXV_LIMIT_CHECK( nTracks * ( 4 + 2 + 2 ) );\n\n    for ( i = 0; i < nTracks; i ++ )\n    {\n      p = table + i * ( 4 + 2 + 2 );\n      track     = FT_NEXT_LONG( p );\n      nameIndex = FT_NEXT_USHORT( p );\n      offset    = FT_NEXT_USHORT( p );\n\n      if ( offset < GXV_TRAK_DATA( trackValueOffset_min ) )\n        GXV_TRAK_DATA( trackValueOffset_min ) = offset;\n      if ( offset > GXV_TRAK_DATA( trackValueOffset_max ) )\n        GXV_TRAK_DATA( trackValueOffset_max ) = offset;\n\n      gxv_sfntName_validate( nameIndex, 256, 32767, gxvalid );\n\n      for ( j = i; j < nTracks; j ++ )\n      {\n         p = table + j * ( 4 + 2 + 2 );\n         t = FT_NEXT_LONG( p );\n         if ( t == track )\n           GXV_TRACE(( \"duplicated entries found for track value 0x%x\\n\",\n                        track ));\n      }\n    }\n\n    gxvalid->subtable_length = p - table;\n    GXV_EXIT;\n  }\n\n\n  static void\n  gxv_trak_trackData_validate( FT_Bytes       table,\n                               FT_Bytes       limit,\n                               GXV_Validator  gxvalid )\n  {\n    FT_Bytes   p = table;\n    FT_UShort  nTracks;\n    FT_UShort  nSizes;\n    FT_ULong   sizeTableOffset;\n\n    GXV_ODTECT( 4, odtect );\n\n\n    GXV_ODTECT_INIT( odtect );\n    GXV_NAME_ENTER( \"trackData\" );\n\n    /* read the header of trackData */\n    GXV_LIMIT_CHECK( 2 + 2 + 4 );\n    nTracks         = FT_NEXT_USHORT( p );\n    nSizes          = FT_NEXT_USHORT( p );\n    sizeTableOffset = FT_NEXT_ULONG( p );\n\n    gxv_odtect_add_range( table, p - table, \"trackData header\", odtect );\n\n    /* validate trackTable */\n    gxv_trak_trackTable_validate( p, limit, nTracks, gxvalid );\n    gxv_odtect_add_range( p, gxvalid->subtable_length,\n                          \"trackTable\", odtect );\n\n    /* sizeTable is array of FT_Fixed, don't check contents */\n    p = gxvalid->root->base + sizeTableOffset;\n    GXV_LIMIT_CHECK( nSizes * 4 );\n    gxv_odtect_add_range( p, nSizes * 4, \"sizeTable\", odtect );\n\n    /* validate trackValueOffet */\n    p = gxvalid->root->base + GXV_TRAK_DATA( trackValueOffset_min );\n    if ( limit - p < nTracks * nSizes * 2 )\n      GXV_TRACE(( \"too short trackValue array\\n\" ));\n\n    p = gxvalid->root->base + GXV_TRAK_DATA( trackValueOffset_max );\n    GXV_LIMIT_CHECK( nSizes * 2 );\n\n    gxv_odtect_add_range( gxvalid->root->base\n                            + GXV_TRAK_DATA( trackValueOffset_min ),\n                          GXV_TRAK_DATA( trackValueOffset_max )\n                            - GXV_TRAK_DATA( trackValueOffset_min )\n                            + nSizes * 2,\n                          \"trackValue array\", odtect );\n\n    gxv_odtect_validate( odtect, gxvalid );\n\n    GXV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          trak TABLE                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  gxv_trak_validate( FT_Bytes      table,\n                     FT_Face       face,\n                     FT_Validator  ftvalid )\n  {\n    FT_Bytes          p = table;\n    FT_Bytes          limit = 0;\n\n    GXV_ValidatorRec  gxvalidrec;\n    GXV_Validator     gxvalid = &gxvalidrec;\n    GXV_trak_DataRec  trakrec;\n    GXV_trak_Data     trak = &trakrec;\n\n    FT_ULong   version;\n    FT_UShort  format;\n    FT_UShort  horizOffset;\n    FT_UShort  vertOffset;\n    FT_UShort  reserved;\n\n\n    GXV_ODTECT( 3, odtect );\n\n    GXV_ODTECT_INIT( odtect );\n    gxvalid->root       = ftvalid;\n    gxvalid->table_data = trak;\n    gxvalid->face       = face;\n\n    limit      = gxvalid->root->limit;\n\n    FT_TRACE3(( \"validating `trak' table\\n\" ));\n    GXV_INIT;\n\n    GXV_LIMIT_CHECK( 4 + 2 + 2 + 2 + 2 );\n    version     = FT_NEXT_ULONG( p );\n    format      = FT_NEXT_USHORT( p );\n    horizOffset = FT_NEXT_USHORT( p );\n    vertOffset  = FT_NEXT_USHORT( p );\n    reserved    = FT_NEXT_USHORT( p );\n\n    GXV_TRACE(( \" (version = 0x%08x)\\n\", version ));\n    GXV_TRACE(( \" (format = 0x%04x)\\n\", format ));\n    GXV_TRACE(( \" (horizOffset = 0x%04x)\\n\", horizOffset ));\n    GXV_TRACE(( \" (vertOffset = 0x%04x)\\n\", vertOffset ));\n    GXV_TRACE(( \" (reserved = 0x%04x)\\n\", reserved ));\n\n    /* Version 1.0 (always:1996) */\n    if ( version != 0x00010000UL )\n      FT_INVALID_FORMAT;\n\n    /* format 0 (always:1996) */\n    if ( format != 0x0000 )\n      FT_INVALID_FORMAT;\n\n    GXV_32BIT_ALIGNMENT_VALIDATE( horizOffset );\n    GXV_32BIT_ALIGNMENT_VALIDATE( vertOffset );\n\n    /* Reserved Fixed Value (always) */\n    if ( reserved != 0x0000 )\n      FT_INVALID_DATA;\n\n    /* validate trackData */\n    if ( 0 < horizOffset )\n    {\n      gxv_trak_trackData_validate( table + horizOffset, limit, gxvalid );\n      gxv_odtect_add_range( table + horizOffset, gxvalid->subtable_length,\n                            \"horizJustData\", odtect );\n    }\n\n    if ( 0 < vertOffset )\n    {\n      gxv_trak_trackData_validate( table + vertOffset, limit, gxvalid );\n      gxv_odtect_add_range( table + vertOffset, gxvalid->subtable_length,\n                            \"vertJustData\", odtect );\n    }\n\n    gxv_odtect_validate( odtect, gxvalid );\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/adler32.c",
    "content": "/* adler32.c -- compute the Adler-32 checksum of a data stream\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#include \"zlib.h\"\n\n#define BASE 65521L /* largest prime smaller than 65536 */\n#define NMAX 5552\n/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */\n\n#define DO1(buf,i)  {s1 += buf[i]; s2 += s1;}\n#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);\n#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);\n#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);\n#define DO16(buf)   DO8(buf,0); DO8(buf,8);\n\n/* ========================================================================= */\nZEXPORT(uLong) adler32( /* adler, buf, len) */\n    uLong adler,\n    const Bytef *buf,\n    uInt len )\n{\n    unsigned long s1 = adler & 0xffff;\n    unsigned long s2 = (adler >> 16) & 0xffff;\n    int k;\n\n    if (buf == Z_NULL) return 1L;\n\n    while (len > 0) {\n        k = len < NMAX ? len : NMAX;\n        len -= k;\n        while (k >= 16) {\n            DO16(buf);\n            buf += 16;\n            k -= 16;\n        }\n        if (k != 0) do {\n            s1 += *buf++;\n            s2 += s1;\n        } while (--k);\n        s1 %= BASE;\n        s2 %= BASE;\n    }\n    return (s2 << 16) | s1;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/ftgzip.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgzip.c                                                               */\n/*                                                                         */\n/*    FreeType support for .gz compressed files.                           */\n/*                                                                         */\n/*  This optional component relies on zlib.  It should mainly be used to   */\n/*  parse compressed PCF fonts, as found with many X11 server              */\n/*  distributions.                                                         */\n/*                                                                         */\n/*  Copyright 2002-2006, 2009-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_MEMORY_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_GZIP_H\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  Gzip_Err_\n#define FT_ERR_BASE    FT_Mod_Err_Gzip\n\n#include FT_ERRORS_H\n\n\n#ifdef FT_CONFIG_OPTION_USE_ZLIB\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"gzip code does not support PIC yet\"\n#endif\n\n#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB\n\n#include <zlib.h>\n\n#else /* !FT_CONFIG_OPTION_SYSTEM_ZLIB */\n\n /* In this case, we include our own modified sources of the ZLib    */\n /* within the \"ftgzip\" component.  The modifications were necessary */\n /* to #include all files without conflicts, as well as preventing   */\n /* the definition of \"extern\" functions that may cause linking      */\n /* conflicts when a program is linked with both FreeType and the    */\n /* original ZLib.                                                   */\n\n#define NO_DUMMY_DECL\n#ifndef USE_ZLIB_ZCALLOC\n#define MY_ZCALLOC /* prevent all zcalloc() & zfree() in zutils.c */\n#endif\n\n#include \"zlib.h\"\n\n#undef  SLOW\n#define SLOW  1  /* we can't use asm-optimized sources here! */\n\n#if defined( _MSC_VER )      /* Visual C++ (and Intel C++)   */\n  /* We disable the warning `conversion from XXX to YYY,     */\n  /* possible loss of data' in order to compile cleanly with */\n  /* the maximum level of warnings: zlib is non-FreeType     */\n  /* code.                                                   */\n#pragma warning( push )\n#pragma warning( disable : 4244 )\n#endif /* _MSC_VER */\n\n  /* Urgh.  `inflate_mask' must not be declared twice -- C++ doesn't like\n     this.  We temporarily disable it and load all necessary header files. */\n#define NO_INFLATE_MASK\n#include \"zutil.h\"\n#include \"inftrees.h\"\n#include \"infblock.h\"\n#include \"infcodes.h\"\n#include \"infutil.h\"\n#undef  NO_INFLATE_MASK\n\n  /* infutil.c must be included before infcodes.c */\n#include \"zutil.c\"\n#include \"inftrees.c\"\n#include \"infutil.c\"\n#include \"infcodes.c\"\n#include \"infblock.c\"\n#include \"inflate.c\"\n#include \"adler32.c\"\n\n#if defined( _MSC_VER )\n#pragma warning( pop )\n#endif\n\n#endif /* !FT_CONFIG_OPTION_SYSTEM_ZLIB */\n\n\n/***************************************************************************/\n/***************************************************************************/\n/*****                                                                 *****/\n/*****            Z L I B   M E M O R Y   M A N A G E M E N T          *****/\n/*****                                                                 *****/\n/***************************************************************************/\n/***************************************************************************/\n\n  /* it is better to use FreeType memory routines instead of raw\n     'malloc/free' */\n\n  static voidpf\n  ft_gzip_alloc( FT_Memory  memory,\n                 uInt       items,\n                 uInt       size )\n  {\n    FT_ULong    sz = (FT_ULong)size * items;\n    FT_Error    error;\n    FT_Pointer  p  = NULL;\n\n\n    (void)FT_ALLOC( p, sz );\n    return p;\n  }\n\n\n  static void\n  ft_gzip_free( FT_Memory  memory,\n                voidpf     address )\n  {\n    FT_MEM_FREE( address );\n  }\n\n\n#if !defined( FT_CONFIG_OPTION_SYSTEM_ZLIB ) && !defined( USE_ZLIB_ZCALLOC )\n\n  local voidpf\n  zcalloc ( voidpf    opaque,\n            unsigned  items,\n            unsigned  size )\n  {\n    return ft_gzip_alloc( (FT_Memory)opaque, items, size );\n  }\n\n  local void\n  zcfree( voidpf  opaque,\n          voidpf  ptr )\n  {\n    ft_gzip_free( (FT_Memory)opaque, ptr );\n  }\n\n#endif /* !SYSTEM_ZLIB && !USE_ZLIB_ZCALLOC */\n\n\n/***************************************************************************/\n/***************************************************************************/\n/*****                                                                 *****/\n/*****               Z L I B   F I L E   D E S C R I P T O R           *****/\n/*****                                                                 *****/\n/***************************************************************************/\n/***************************************************************************/\n\n#define FT_GZIP_BUFFER_SIZE  4096\n\n  typedef struct  FT_GZipFileRec_\n  {\n    FT_Stream  source;         /* parent/source stream        */\n    FT_Stream  stream;         /* embedding stream            */\n    FT_Memory  memory;         /* memory allocator            */\n    z_stream   zstream;        /* zlib input stream           */\n\n    FT_ULong   start;          /* starting position, after .gz header */\n    FT_Byte    input[FT_GZIP_BUFFER_SIZE];   /* input read buffer  */\n\n    FT_Byte    buffer[FT_GZIP_BUFFER_SIZE];  /* output buffer      */\n    FT_ULong   pos;                          /* position in output */\n    FT_Byte*   cursor;\n    FT_Byte*   limit;\n\n  } FT_GZipFileRec, *FT_GZipFile;\n\n\n  /* gzip flag byte */\n#define FT_GZIP_ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */\n#define FT_GZIP_HEAD_CRC     0x02 /* bit 1 set: header CRC present */\n#define FT_GZIP_EXTRA_FIELD  0x04 /* bit 2 set: extra field present */\n#define FT_GZIP_ORIG_NAME    0x08 /* bit 3 set: original file name present */\n#define FT_GZIP_COMMENT      0x10 /* bit 4 set: file comment present */\n#define FT_GZIP_RESERVED     0xE0 /* bits 5..7: reserved */\n\n\n  /* check and skip .gz header - we don't support `transparent' compression */\n  static FT_Error\n  ft_gzip_check_header( FT_Stream  stream )\n  {\n    FT_Error  error;\n    FT_Byte   head[4];\n\n\n    if ( FT_STREAM_SEEK( 0 )       ||\n         FT_STREAM_READ( head, 4 ) )\n      goto Exit;\n\n    /* head[0] && head[1] are the magic numbers;    */\n    /* head[2] is the method, and head[3] the flags */\n    if ( head[0] != 0x1F              ||\n         head[1] != 0x8B              ||\n         head[2] != Z_DEFLATED        ||\n        (head[3] & FT_GZIP_RESERVED)  )\n    {\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    /* skip time, xflags and os code */\n    (void)FT_STREAM_SKIP( 6 );\n\n    /* skip the extra field */\n    if ( head[3] & FT_GZIP_EXTRA_FIELD )\n    {\n      FT_UInt  len;\n\n\n      if ( FT_READ_USHORT_LE( len ) ||\n           FT_STREAM_SKIP( len )    )\n        goto Exit;\n    }\n\n    /* skip original file name */\n    if ( head[3] & FT_GZIP_ORIG_NAME )\n      for (;;)\n      {\n        FT_UInt  c;\n\n\n        if ( FT_READ_BYTE( c ) )\n          goto Exit;\n\n        if ( c == 0 )\n          break;\n      }\n\n    /* skip .gz comment */\n    if ( head[3] & FT_GZIP_COMMENT )\n      for (;;)\n      {\n        FT_UInt  c;\n\n\n        if ( FT_READ_BYTE( c ) )\n          goto Exit;\n\n        if ( c == 0 )\n          break;\n      }\n\n    /* skip CRC */\n    if ( head[3] & FT_GZIP_HEAD_CRC )\n      if ( FT_STREAM_SKIP( 2 ) )\n        goto Exit;\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  ft_gzip_file_init( FT_GZipFile  zip,\n                     FT_Stream    stream,\n                     FT_Stream    source )\n  {\n    z_stream*  zstream = &zip->zstream;\n    FT_Error   error   = FT_Err_Ok;\n\n\n    zip->stream = stream;\n    zip->source = source;\n    zip->memory = stream->memory;\n\n    zip->limit  = zip->buffer + FT_GZIP_BUFFER_SIZE;\n    zip->cursor = zip->limit;\n    zip->pos    = 0;\n\n    /* check and skip .gz header */\n    {\n      stream = source;\n\n      error = ft_gzip_check_header( stream );\n      if ( error )\n        goto Exit;\n\n      zip->start = FT_STREAM_POS();\n    }\n\n    /* initialize zlib -- there is no zlib header in the compressed stream */\n    zstream->zalloc = (alloc_func)ft_gzip_alloc;\n    zstream->zfree  = (free_func) ft_gzip_free;\n    zstream->opaque = stream->memory;\n\n    zstream->avail_in = 0;\n    zstream->next_in  = zip->buffer;\n\n    if ( inflateInit2( zstream, -MAX_WBITS ) != Z_OK ||\n         zstream->next_in == NULL                     )\n      error = FT_THROW( Invalid_File_Format );\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  ft_gzip_file_done( FT_GZipFile  zip )\n  {\n    z_stream*  zstream = &zip->zstream;\n\n\n    inflateEnd( zstream );\n\n    /* clear the rest */\n    zstream->zalloc    = NULL;\n    zstream->zfree     = NULL;\n    zstream->opaque    = NULL;\n    zstream->next_in   = NULL;\n    zstream->next_out  = NULL;\n    zstream->avail_in  = 0;\n    zstream->avail_out = 0;\n\n    zip->memory = NULL;\n    zip->source = NULL;\n    zip->stream = NULL;\n  }\n\n\n  static FT_Error\n  ft_gzip_file_reset( FT_GZipFile  zip )\n  {\n    FT_Stream  stream = zip->source;\n    FT_Error   error;\n\n\n    if ( !FT_STREAM_SEEK( zip->start ) )\n    {\n      z_stream*  zstream = &zip->zstream;\n\n\n      inflateReset( zstream );\n\n      zstream->avail_in  = 0;\n      zstream->next_in   = zip->input;\n      zstream->avail_out = 0;\n      zstream->next_out  = zip->buffer;\n\n      zip->limit  = zip->buffer + FT_GZIP_BUFFER_SIZE;\n      zip->cursor = zip->limit;\n      zip->pos    = 0;\n    }\n\n    return error;\n  }\n\n\n  static FT_Error\n  ft_gzip_file_fill_input( FT_GZipFile  zip )\n  {\n    z_stream*  zstream = &zip->zstream;\n    FT_Stream  stream  = zip->source;\n    FT_ULong   size;\n\n\n    if ( stream->read )\n    {\n      size = stream->read( stream, stream->pos, zip->input,\n                           FT_GZIP_BUFFER_SIZE );\n      if ( size == 0 )\n        return FT_THROW( Invalid_Stream_Operation );\n    }\n    else\n    {\n      size = stream->size - stream->pos;\n      if ( size > FT_GZIP_BUFFER_SIZE )\n        size = FT_GZIP_BUFFER_SIZE;\n\n      if ( size == 0 )\n        return FT_THROW( Invalid_Stream_Operation );\n\n      FT_MEM_COPY( zip->input, stream->base + stream->pos, size );\n    }\n    stream->pos += size;\n\n    zstream->next_in  = zip->input;\n    zstream->avail_in = size;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  ft_gzip_file_fill_output( FT_GZipFile  zip )\n  {\n    z_stream*  zstream = &zip->zstream;\n    FT_Error   error   = FT_Err_Ok;\n\n\n    zip->cursor        = zip->buffer;\n    zstream->next_out  = zip->cursor;\n    zstream->avail_out = FT_GZIP_BUFFER_SIZE;\n\n    while ( zstream->avail_out > 0 )\n    {\n      int  err;\n\n\n      if ( zstream->avail_in == 0 )\n      {\n        error = ft_gzip_file_fill_input( zip );\n        if ( error )\n          break;\n      }\n\n      err = inflate( zstream, Z_NO_FLUSH );\n\n      if ( err == Z_STREAM_END )\n      {\n        zip->limit = zstream->next_out;\n        if ( zip->limit == zip->cursor )\n          error = FT_THROW( Invalid_Stream_Operation );\n        break;\n      }\n      else if ( err != Z_OK )\n      {\n        error = FT_THROW( Invalid_Stream_Operation );\n        break;\n      }\n    }\n\n    return error;\n  }\n\n\n  /* fill output buffer; `count' must be <= FT_GZIP_BUFFER_SIZE */\n  static FT_Error\n  ft_gzip_file_skip_output( FT_GZipFile  zip,\n                            FT_ULong     count )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_ULong  delta;\n\n\n    for (;;)\n    {\n      delta = (FT_ULong)( zip->limit - zip->cursor );\n      if ( delta >= count )\n        delta = count;\n\n      zip->cursor += delta;\n      zip->pos    += delta;\n\n      count -= delta;\n      if ( count == 0 )\n        break;\n\n      error = ft_gzip_file_fill_output( zip );\n      if ( error )\n        break;\n    }\n\n    return error;\n  }\n\n\n  static FT_ULong\n  ft_gzip_file_io( FT_GZipFile  zip,\n                   FT_ULong     pos,\n                   FT_Byte*     buffer,\n                   FT_ULong     count )\n  {\n    FT_ULong  result = 0;\n    FT_Error  error;\n\n\n    /* Reset inflate stream if we're seeking backwards.        */\n    /* Yes, that is not too efficient, but it saves memory :-) */\n    if ( pos < zip->pos )\n    {\n      error = ft_gzip_file_reset( zip );\n      if ( error )\n        goto Exit;\n    }\n\n    /* skip unwanted bytes */\n    if ( pos > zip->pos )\n    {\n      error = ft_gzip_file_skip_output( zip, (FT_ULong)( pos - zip->pos ) );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( count == 0 )\n      goto Exit;\n\n    /* now read the data */\n    for (;;)\n    {\n      FT_ULong  delta;\n\n\n      delta = (FT_ULong)( zip->limit - zip->cursor );\n      if ( delta >= count )\n        delta = count;\n\n      FT_MEM_COPY( buffer, zip->cursor, delta );\n      buffer      += delta;\n      result      += delta;\n      zip->cursor += delta;\n      zip->pos    += delta;\n\n      count -= delta;\n      if ( count == 0 )\n        break;\n\n      error = ft_gzip_file_fill_output( zip );\n      if ( error )\n        break;\n    }\n\n  Exit:\n    return result;\n  }\n\n\n/***************************************************************************/\n/***************************************************************************/\n/*****                                                                 *****/\n/*****               G Z   E M B E D D I N G   S T R E A M             *****/\n/*****                                                                 *****/\n/***************************************************************************/\n/***************************************************************************/\n\n  static void\n  ft_gzip_stream_close( FT_Stream  stream )\n  {\n    FT_GZipFile  zip    = (FT_GZipFile)stream->descriptor.pointer;\n    FT_Memory    memory = stream->memory;\n\n\n    if ( zip )\n    {\n      /* finalize gzip file descriptor */\n      ft_gzip_file_done( zip );\n\n      FT_FREE( zip );\n\n      stream->descriptor.pointer = NULL;\n    }\n  }\n\n\n  static FT_ULong\n  ft_gzip_stream_io( FT_Stream  stream,\n                     FT_ULong   pos,\n                     FT_Byte*   buffer,\n                     FT_ULong   count )\n  {\n    FT_GZipFile  zip = (FT_GZipFile)stream->descriptor.pointer;\n\n\n    return ft_gzip_file_io( zip, pos, buffer, count );\n  }\n\n\n  static FT_ULong\n  ft_gzip_get_uncompressed_size( FT_Stream  stream )\n  {\n    FT_Error  error;\n    FT_ULong  old_pos;\n    FT_ULong  result = 0;\n\n\n    old_pos = stream->pos;\n    if ( !FT_Stream_Seek( stream, stream->size - 4 ) )\n    {\n      result = FT_Stream_ReadULong( stream, &error );\n      if ( error )\n        result = 0;\n\n      (void)FT_Stream_Seek( stream, old_pos );\n    }\n\n    return result;\n  }\n\n\n  /* documentation is in ftgzip.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stream_OpenGzip( FT_Stream  stream,\n                      FT_Stream  source )\n  {\n    FT_Error     error;\n    FT_Memory    memory;\n    FT_GZipFile  zip = NULL;\n\n\n    if ( !stream || !source )\n    {\n      error = FT_THROW( Invalid_Stream_Handle );\n      goto Exit;\n    }\n\n    memory = source->memory;\n\n    /*\n     *  check the header right now; this prevents allocating un-necessary\n     *  objects when we don't need them\n     */\n    error = ft_gzip_check_header( source );\n    if ( error )\n      goto Exit;\n\n    FT_ZERO( stream );\n    stream->memory = memory;\n\n    if ( !FT_QNEW( zip ) )\n    {\n      error = ft_gzip_file_init( zip, stream, source );\n      if ( error )\n      {\n        FT_FREE( zip );\n        goto Exit;\n      }\n\n      stream->descriptor.pointer = zip;\n    }\n\n    /*\n     *  We use the following trick to try to dramatically improve the\n     *  performance while dealing with small files.  If the original stream\n     *  size is less than a certain threshold, we try to load the whole font\n     *  file into memory.  This saves us from using the 32KB buffer needed\n     *  to inflate the file, plus the two 4KB intermediate input/output\n     *  buffers used in the `FT_GZipFile' structure.\n     */\n    {\n      FT_ULong  zip_size = ft_gzip_get_uncompressed_size( source );\n\n\n      if ( zip_size != 0 && zip_size < 40 * 1024 )\n      {\n        FT_Byte*  zip_buff = NULL;\n\n\n        if ( !FT_ALLOC( zip_buff, zip_size ) )\n        {\n          FT_ULong  count;\n\n\n          count = ft_gzip_file_io( zip, 0, zip_buff, zip_size );\n          if ( count == zip_size )\n          {\n            ft_gzip_file_done( zip );\n            FT_FREE( zip );\n\n            stream->descriptor.pointer = NULL;\n\n            stream->size  = zip_size;\n            stream->pos   = 0;\n            stream->base  = zip_buff;\n            stream->read  = NULL;\n            stream->close = ft_gzip_stream_close;\n\n            goto Exit;\n          }\n\n          ft_gzip_file_io( zip, 0, NULL, 0 );\n          FT_FREE( zip_buff );\n        }\n        error = FT_Err_Ok;\n      }\n    }\n\n    stream->size  = 0x7FFFFFFFL;  /* don't know the real size! */\n    stream->pos   = 0;\n    stream->base  = 0;\n    stream->read  = ft_gzip_stream_io;\n    stream->close = ft_gzip_stream_close;\n\n  Exit:\n    return error;\n  }\n\n\n  /* documentation is in ftgzip.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Gzip_Uncompress( FT_Memory       memory,\n                      FT_Byte*        output,\n                      FT_ULong*       output_len,\n                      const FT_Byte*  input,\n                      FT_ULong        input_len )\n  {\n    z_stream  stream;\n    int       err;\n\n\n    /* check for `input' delayed to `inflate' */\n\n    if ( !memory || ! output_len || !output )\n      return FT_THROW( Invalid_Argument );\n\n    /* this function is modeled after zlib's `uncompress' function */\n\n    stream.next_in  = (Bytef*)input;\n    stream.avail_in = (uInt)input_len;\n\n    stream.next_out  = output;\n    stream.avail_out = (uInt)*output_len;\n\n    stream.zalloc = (alloc_func)ft_gzip_alloc;\n    stream.zfree  = (free_func) ft_gzip_free;\n    stream.opaque = memory;\n\n    err = inflateInit2( &stream, MAX_WBITS );\n    if ( err != Z_OK )\n      return FT_THROW( Invalid_Argument );\n\n    err = inflate( &stream, Z_FINISH );\n    if ( err != Z_STREAM_END )\n    {\n      inflateEnd( &stream );\n      if ( err == Z_OK )\n        err = Z_BUF_ERROR;\n    }\n    else\n    {\n      *output_len = stream.total_out;\n\n      err = inflateEnd( &stream );\n    }\n\n    if ( err == Z_MEM_ERROR )\n      return FT_THROW( Out_Of_Memory );\n\n    if ( err == Z_BUF_ERROR )\n      return FT_THROW( Array_Too_Large );\n\n    if ( err == Z_DATA_ERROR )\n      return FT_THROW( Invalid_Table );\n\n    return FT_Err_Ok;\n  }\n\n\n#else /* !FT_CONFIG_OPTION_USE_ZLIB */\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stream_OpenGzip( FT_Stream  stream,\n                      FT_Stream  source )\n  {\n    FT_UNUSED( stream );\n    FT_UNUSED( source );\n\n    return FT_THROW( Unimplemented_Feature );\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Gzip_Uncompress( FT_Memory       memory,\n                      FT_Byte*        output,\n                      FT_ULong*       output_len,\n                      const FT_Byte*  input,\n                      FT_ULong        input_len )\n  {\n    FT_UNUSED( memory );\n    FT_UNUSED( output );\n    FT_UNUSED( output_len );\n    FT_UNUSED( input );\n    FT_UNUSED( input_len );\n\n    return FT_THROW( Unimplemented_Feature );\n  }\n\n#endif /* !FT_CONFIG_OPTION_USE_ZLIB */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/infblock.c",
    "content": "/* infblock.c -- interpret and process block types to last block\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n#include \"zutil.h\"\n#include \"infblock.h\"\n#include \"inftrees.h\"\n#include \"infcodes.h\"\n#include \"infutil.h\"\n\n\n/* simplify the use of the inflate_huft type with some defines */\n#define exop word.what.Exop\n#define bits word.what.Bits\n\n/* Table for deflate from PKZIP's appnote.txt. */\nlocal const uInt border[] = { /* Order of the bit length code lengths */\n        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};\n\n/*\n   Notes beyond the 1.93a appnote.txt:\n\n   1. Distance pointers never point before the beginning of the output\n      stream.\n   2. Distance pointers can point back across blocks, up to 32k away.\n   3. There is an implied maximum of 7 bits for the bit length table and\n      15 bits for the actual data.\n   4. If only one code exists, then it is encoded using one bit.  (Zero\n      would be more efficient, but perhaps a little confusing.)  If two\n      codes exist, they are coded using one bit each (0 and 1).\n   5. There is no way of sending zero distance codes--a dummy must be\n      sent if there are none.  (History: a pre 2.0 version of PKZIP would\n      store blocks with no distance codes, but this was discovered to be\n      too harsh a criterion.)  Valid only for 1.93a.  2.04c does allow\n      zero distance codes, which is sent as one code of zero bits in\n      length.\n   6. There are up to 286 literal/length codes.  Code 256 represents the\n      end-of-block.  Note however that the static length tree defines\n      288 codes just to fill out the Huffman codes.  Codes 286 and 287\n      cannot be used though, since there is no length base or extra bits\n      defined for them.  Similarily, there are up to 30 distance codes.\n      However, static trees define 32 codes (all 5 bits) to fill out the\n      Huffman codes, but the last two had better not show up in the data.\n   7. Unzip can check dynamic Huffman blocks for complete code sets.\n      The exception is that a single code would not be complete (see #4).\n   8. The five bits following the block type is really the number of\n      literal codes sent minus 257.\n   9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits\n      (1+6+6).  Therefore, to output three times the length, you output\n      three codes (1+1+1), whereas to output four times the same length,\n      you only need two codes (1+3).  Hmm.\n  10. In the tree reconstruction algorithm, Code = Code + Increment\n      only if BitLength(i) is not zero.  (Pretty obvious.)\n  11. Correction: 4 Bits: # of Bit Length codes - 4     (4 - 19)\n  12. Note: length code 284 can represent 227-258, but length code 285\n      really is 258.  The last length deserves its own, short code\n      since it gets used a lot in very redundant files.  The length\n      258 is special since 258 - 3 (the min match length) is 255.\n  13. The literal/length and distance code bit lengths are read as a\n      single stream of lengths.  It is possible (and advantageous) for\n      a repeat code (16, 17, or 18) to go across the boundary between\n      the two sets of lengths.\n */\n\n\nlocal void inflate_blocks_reset( /* s, z, c) */\ninflate_blocks_statef *s,\nz_streamp z,\nuLongf *c )\n{\n  if (c != Z_NULL)\n    *c = s->check;\n  if (s->mode == BTREE || s->mode == DTREE)\n    ZFREE(z, s->sub.trees.blens);\n  if (s->mode == CODES)\n    inflate_codes_free(s->sub.decode.codes, z);\n  s->mode = TYPE;\n  s->bitk = 0;\n  s->bitb = 0;\n  s->read = s->write = s->window;\n  if (s->checkfn != Z_NULL)\n    z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)Z_NULL, 0);\n  Tracev((stderr, \"inflate:   blocks reset\\n\"));\n}\n\n\nlocal inflate_blocks_statef *inflate_blocks_new( /* z, c, w) */\nz_streamp z,\ncheck_func c,\nuInt w )\n{\n  inflate_blocks_statef *s;\n\n  if ((s = (inflate_blocks_statef *)ZALLOC\n       (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL)\n    return s;\n  if ((s->hufts =\n       (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL)\n  {\n    ZFREE(z, s);\n    return Z_NULL;\n  }\n  if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)\n  {\n    ZFREE(z, s->hufts);\n    ZFREE(z, s);\n    return Z_NULL;\n  }\n  s->end = s->window + w;\n  s->checkfn = c;\n  s->mode = TYPE;\n  Tracev((stderr, \"inflate:   blocks allocated\\n\"));\n  inflate_blocks_reset(s, z, Z_NULL);\n  return s;\n}\n\n\nlocal int inflate_blocks( /* s, z, r) */\ninflate_blocks_statef *s,\nz_streamp z,\nint r )\n{\n  uInt t;               /* temporary storage */\n  uLong b;              /* bit buffer */\n  uInt k;               /* bits in bit buffer */\n  Bytef *p;             /* input data pointer */\n  uInt n;               /* bytes available there */\n  Bytef *q;             /* output window write pointer */\n  uInt m;               /* bytes to end of window or read pointer */\n\n  /* copy input/output information to locals (UPDATE macro restores) */\n  LOAD\n\n  /* process input based on current state */\n  while (1) switch (s->mode)\n  {\n    case TYPE:\n      NEEDBITS(3)\n      t = (uInt)b & 7;\n      s->last = t & 1;\n      switch (t >> 1)\n      {\n        case 0:                         /* stored */\n          Tracev((stderr, \"inflate:     stored block%s\\n\",\n                 s->last ? \" (last)\" : \"\"));\n          DUMPBITS(3)\n          t = k & 7;                    /* go to byte boundary */\n          DUMPBITS(t)\n          s->mode = LENS;               /* get length of stored block */\n          break;\n        case 1:                         /* fixed */\n          Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n                 s->last ? \" (last)\" : \"\"));\n          {\n            uInt bl, bd;\n            inflate_huft *tl, *td;\n\n            inflate_trees_fixed(&bl, &bd, (const inflate_huft**)&tl,\n                                          (const inflate_huft**)&td, z);\n            s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);\n            if (s->sub.decode.codes == Z_NULL)\n            {\n              r = Z_MEM_ERROR;\n              LEAVE\n            }\n          }\n          DUMPBITS(3)\n          s->mode = CODES;\n          break;\n        case 2:                         /* dynamic */\n          Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n                 s->last ? \" (last)\" : \"\"));\n          DUMPBITS(3)\n          s->mode = TABLE;\n          break;\n        case 3:                         /* illegal */\n          DUMPBITS(3)\n          s->mode = BAD;\n          z->msg = (char*)\"invalid block type\";\n          r = Z_DATA_ERROR;\n          LEAVE\n      }\n      break;\n    case LENS:\n      NEEDBITS(32)\n      if ((((~b) >> 16) & 0xffff) != (b & 0xffff))\n      {\n        s->mode = BAD;\n        z->msg = (char*)\"invalid stored block lengths\";\n        r = Z_DATA_ERROR;\n        LEAVE\n      }\n      s->sub.left = (uInt)b & 0xffff;\n      b = k = 0;                      /* dump bits */\n      Tracev((stderr, \"inflate:       stored length %u\\n\", s->sub.left));\n      s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE);\n      break;\n    case STORED:\n      if (n == 0)\n        LEAVE\n      NEEDOUT\n      t = s->sub.left;\n      if (t > n) t = n;\n      if (t > m) t = m;\n      zmemcpy(q, p, t);\n      p += t;  n -= t;\n      q += t;  m -= t;\n      if ((s->sub.left -= t) != 0)\n        break;\n      Tracev((stderr, \"inflate:       stored end, %lu total out\\n\",\n              z->total_out + (q >= s->read ? q - s->read :\n              (s->end - s->read) + (q - s->window))));\n      s->mode = s->last ? DRY : TYPE;\n      break;\n    case TABLE:\n      NEEDBITS(14)\n      s->sub.trees.table = t = (uInt)b & 0x3fff;\n#ifndef PKZIP_BUG_WORKAROUND\n      if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)\n      {\n        s->mode = BAD;\n        z->msg = (char*)\"too many length or distance symbols\";\n        r = Z_DATA_ERROR;\n        LEAVE\n      }\n#endif\n      t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n      if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)\n      {\n        r = Z_MEM_ERROR;\n        LEAVE\n      }\n      DUMPBITS(14)\n      s->sub.trees.index = 0;\n      Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n      s->mode = BTREE;\n    case BTREE:\n      while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))\n      {\n        NEEDBITS(3)\n        s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;\n        DUMPBITS(3)\n      }\n      while (s->sub.trees.index < 19)\n        s->sub.trees.blens[border[s->sub.trees.index++]] = 0;\n      s->sub.trees.bb = 7;\n      t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,\n                             &s->sub.trees.tb, s->hufts, z);\n      if (t != Z_OK)\n      {\n        r = t;\n        if (r == Z_DATA_ERROR)\n        {\n          ZFREE(z, s->sub.trees.blens);\n          s->mode = BAD;\n        }\n        LEAVE\n      }\n      s->sub.trees.index = 0;\n      Tracev((stderr, \"inflate:       bits tree ok\\n\"));\n      s->mode = DTREE;\n    case DTREE:\n      while (t = s->sub.trees.table,\n             s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))\n      {\n        inflate_huft *h;\n        uInt i, j, c;\n\n        t = s->sub.trees.bb;\n        NEEDBITS(t)\n        h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);\n        t = h->bits;\n        c = h->base;\n        if (c < 16)\n        {\n          DUMPBITS(t)\n          s->sub.trees.blens[s->sub.trees.index++] = c;\n        }\n        else /* c == 16..18 */\n        {\n          i = c == 18 ? 7 : c - 14;\n          j = c == 18 ? 11 : 3;\n          NEEDBITS(t + i)\n          DUMPBITS(t)\n          j += (uInt)b & inflate_mask[i];\n          DUMPBITS(i)\n          i = s->sub.trees.index;\n          t = s->sub.trees.table;\n          if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||\n              (c == 16 && i < 1))\n          {\n            ZFREE(z, s->sub.trees.blens);\n            s->mode = BAD;\n            z->msg = (char*)\"invalid bit length repeat\";\n            r = Z_DATA_ERROR;\n            LEAVE\n          }\n          c = c == 16 ? s->sub.trees.blens[i - 1] : 0;\n          do {\n            s->sub.trees.blens[i++] = c;\n          } while (--j);\n          s->sub.trees.index = i;\n        }\n      }\n      s->sub.trees.tb = Z_NULL;\n      {\n        uInt bl, bd;\n        inflate_huft *tl, *td;\n        inflate_codes_statef *c;\n\n        bl = 9;         /* must be <= 9 for lookahead assumptions */\n        bd = 6;         /* must be <= 9 for lookahead assumptions */\n        t = s->sub.trees.table;\n        t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),\n                                  s->sub.trees.blens, &bl, &bd, &tl, &td,\n                                  s->hufts, z);\n        if (t != Z_OK)\n        {\n          if (t == (uInt)Z_DATA_ERROR)\n          {\n            ZFREE(z, s->sub.trees.blens);\n            s->mode = BAD;\n          }\n          r = t;\n          LEAVE\n        }\n        Tracev((stderr, \"inflate:       trees ok\\n\"));\n        if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)\n        {\n          r = Z_MEM_ERROR;\n          LEAVE\n        }\n        s->sub.decode.codes = c;\n      }\n      ZFREE(z, s->sub.trees.blens);\n      s->mode = CODES;\n    case CODES:\n      UPDATE\n      if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)\n        return inflate_flush(s, z, r);\n      r = Z_OK;\n      inflate_codes_free(s->sub.decode.codes, z);\n      LOAD\n      Tracev((stderr, \"inflate:       codes end, %lu total out\\n\",\n              z->total_out + (q >= s->read ? q - s->read :\n              (s->end - s->read) + (q - s->window))));\n      if (!s->last)\n      {\n        s->mode = TYPE;\n        break;\n      }\n      s->mode = DRY;\n    case DRY:\n      FLUSH\n      if (s->read != s->write)\n        LEAVE\n      s->mode = DONE;\n    case DONE:\n      r = Z_STREAM_END;\n      LEAVE\n    case BAD:\n      r = Z_DATA_ERROR;\n      LEAVE\n    default:\n      r = Z_STREAM_ERROR;\n      LEAVE\n  }\n#ifdef NEED_DUMMY_RETURN\n  return 0;\n#endif\n}\n\n\nlocal int inflate_blocks_free( /* s, z) */\ninflate_blocks_statef *s,\nz_streamp z )\n{\n  inflate_blocks_reset(s, z, Z_NULL);\n  ZFREE(z, s->window);\n  ZFREE(z, s->hufts);\n  ZFREE(z, s);\n  Tracev((stderr, \"inflate:   blocks freed\\n\"));\n  return Z_OK;\n}\n\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/infblock.h",
    "content": "/* infblock.h -- header to use infblock.c\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\n#ifndef _INFBLOCK_H\n#define _INFBLOCK_H\n\nstruct inflate_blocks_state;\ntypedef struct inflate_blocks_state FAR inflate_blocks_statef;\n\nlocal  inflate_blocks_statef * inflate_blocks_new OF((\n    z_streamp z,\n    check_func c,               /* check function */\n    uInt w));                   /* window size */\n\nlocal  int inflate_blocks OF((\n    inflate_blocks_statef *,\n    z_streamp ,\n    int));                      /* initial return code */\n\nlocal  void inflate_blocks_reset OF((\n    inflate_blocks_statef *,\n    z_streamp ,\n    uLongf *));                  /* check value on output */\n\nlocal  int inflate_blocks_free OF((\n    inflate_blocks_statef *,\n    z_streamp));\n\n#endif /* _INFBLOCK_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/infcodes.c",
    "content": "/* infcodes.c -- process literals and length/distance pairs\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n#include \"zutil.h\"\n#include \"inftrees.h\"\n#include \"infblock.h\"\n#include \"infcodes.h\"\n#include \"infutil.h\"\n\n/* simplify the use of the inflate_huft type with some defines */\n#define exop word.what.Exop\n#define bits word.what.Bits\n\ntypedef enum {        /* waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing */\n      START,    /* x: set up for LEN */\n      LEN,      /* i: get length/literal/eob next */\n      LENEXT,   /* i: getting length extra (have base) */\n      DIST,     /* i: get distance next */\n      DISTEXT,  /* i: getting distance extra */\n      COPY,     /* o: copying bytes in window, waiting for space */\n      LIT,      /* o: got literal, waiting for output space */\n      WASH,     /* o: got eob, possibly still output waiting */\n      END,      /* x: got eob and all data flushed */\n      BADCODE}  /* x: got error */\ninflate_codes_mode;\n\n/* inflate codes private state */\nstruct inflate_codes_state {\n\n  /* mode */\n  inflate_codes_mode mode;      /* current inflate_codes mode */\n\n  /* mode dependent information */\n  uInt len;\n  union {\n    struct {\n      inflate_huft *tree;       /* pointer into tree */\n      uInt need;                /* bits needed */\n    } code;             /* if LEN or DIST, where in tree */\n    uInt lit;           /* if LIT, literal */\n    struct {\n      uInt get;                 /* bits to get for extra */\n      uInt dist;                /* distance back to copy from */\n    } copy;             /* if EXT or COPY, where and how much */\n  } sub;                /* submode */\n\n  /* mode independent information */\n  Byte lbits;           /* ltree bits decoded per branch */\n  Byte dbits;           /* dtree bits decoder per branch */\n  inflate_huft *ltree;          /* literal/length/eob tree */\n  inflate_huft *dtree;          /* distance tree */\n\n};\n\n\nlocal inflate_codes_statef *inflate_codes_new( /* bl, bd, tl, td, z) */\nuInt bl, uInt bd,\ninflate_huft *tl,\ninflate_huft *td, /* need separate declaration for Borland C++ */\nz_streamp z )\n{\n  inflate_codes_statef *c;\n\n  if ((c = (inflate_codes_statef *)\n       ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL)\n  {\n    c->mode = START;\n    c->lbits = (Byte)bl;\n    c->dbits = (Byte)bd;\n    c->ltree = tl;\n    c->dtree = td;\n    Tracev((stderr, \"inflate:       codes new\\n\"));\n  }\n  return c;\n}\n\n\nlocal int inflate_codes( /* s, z, r) */\ninflate_blocks_statef *s,\nz_streamp z,\nint r )\n{\n  uInt j;               /* temporary storage */\n  inflate_huft *t;      /* temporary pointer */\n  uInt e;               /* extra bits or operation */\n  uLong b;              /* bit buffer */\n  uInt k;               /* bits in bit buffer */\n  Bytef *p;             /* input data pointer */\n  uInt n;               /* bytes available there */\n  Bytef *q;             /* output window write pointer */\n  uInt m;               /* bytes to end of window or read pointer */\n  Bytef *f;             /* pointer to copy strings from */\n  inflate_codes_statef *c = s->sub.decode.codes;  /* codes state */\n\n  /* copy input/output information to locals (UPDATE macro restores) */\n  LOAD\n\n  /* process input and output based on current state */\n  while (1) switch (c->mode)\n  {             /* waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing */\n    case START:         /* x: set up for LEN */\n#ifndef SLOW\n      if (m >= 258 && n >= 10)\n      {\n        UPDATE\n        r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z);\n        LOAD\n        if (r != Z_OK)\n        {\n          c->mode = r == Z_STREAM_END ? WASH : BADCODE;\n          break;\n        }\n      }\n#endif /* !SLOW */\n      c->sub.code.need = c->lbits;\n      c->sub.code.tree = c->ltree;\n      c->mode = LEN;\n    case LEN:           /* i: get length/literal/eob next */\n      j = c->sub.code.need;\n      NEEDBITS(j)\n      t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);\n      DUMPBITS(t->bits)\n      e = (uInt)(t->exop);\n      if (e == 0)               /* literal */\n      {\n        c->sub.lit = t->base;\n        Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?\n                 \"inflate:         literal '%c'\\n\" :\n                 \"inflate:         literal 0x%02x\\n\", t->base));\n        c->mode = LIT;\n        break;\n      }\n      if (e & 16)               /* length */\n      {\n        c->sub.copy.get = e & 15;\n        c->len = t->base;\n        c->mode = LENEXT;\n        break;\n      }\n      if ((e & 64) == 0)        /* next table */\n      {\n        c->sub.code.need = e;\n        c->sub.code.tree = t + t->base;\n        break;\n      }\n      if (e & 32)               /* end of block */\n      {\n        Tracevv((stderr, \"inflate:         end of block\\n\"));\n        c->mode = WASH;\n        break;\n      }\n      c->mode = BADCODE;        /* invalid code */\n      z->msg = (char*)\"invalid literal/length code\";\n      r = Z_DATA_ERROR;\n      LEAVE\n    case LENEXT:        /* i: getting length extra (have base) */\n      j = c->sub.copy.get;\n      NEEDBITS(j)\n      c->len += (uInt)b & inflate_mask[j];\n      DUMPBITS(j)\n      c->sub.code.need = c->dbits;\n      c->sub.code.tree = c->dtree;\n      Tracevv((stderr, \"inflate:         length %u\\n\", c->len));\n      c->mode = DIST;\n    case DIST:          /* i: get distance next */\n      j = c->sub.code.need;\n      NEEDBITS(j)\n      t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);\n      DUMPBITS(t->bits)\n      e = (uInt)(t->exop);\n      if (e & 16)               /* distance */\n      {\n        c->sub.copy.get = e & 15;\n        c->sub.copy.dist = t->base;\n        c->mode = DISTEXT;\n        break;\n      }\n      if ((e & 64) == 0)        /* next table */\n      {\n        c->sub.code.need = e;\n        c->sub.code.tree = t + t->base;\n        break;\n      }\n      c->mode = BADCODE;        /* invalid code */\n      z->msg = (char*)\"invalid distance code\";\n      r = Z_DATA_ERROR;\n      LEAVE\n    case DISTEXT:       /* i: getting distance extra */\n      j = c->sub.copy.get;\n      NEEDBITS(j)\n      c->sub.copy.dist += (uInt)b & inflate_mask[j];\n      DUMPBITS(j)\n      Tracevv((stderr, \"inflate:         distance %u\\n\", c->sub.copy.dist));\n      c->mode = COPY;\n    case COPY:          /* o: copying bytes in window, waiting for space */\n      f = q - c->sub.copy.dist;\n      while (f < s->window)             /* modulo window size-\"while\" instead */\n        f += s->end - s->window;        /* of \"if\" handles invalid distances */\n      while (c->len)\n      {\n        NEEDOUT\n        OUTBYTE(*f++)\n        if (f == s->end)\n          f = s->window;\n        c->len--;\n      }\n      c->mode = START;\n      break;\n    case LIT:           /* o: got literal, waiting for output space */\n      NEEDOUT\n      OUTBYTE(c->sub.lit)\n      c->mode = START;\n      break;\n    case WASH:          /* o: got eob, possibly more output */\n      if (k > 7)        /* return unused byte, if any */\n      {\n        Assert(k < 16, \"inflate_codes grabbed too many bytes\")\n        k -= 8;\n        n++;\n        p--;            /* can always return one */\n      }\n      FLUSH\n      if (s->read != s->write)\n        LEAVE\n      c->mode = END;\n    case END:\n      r = Z_STREAM_END;\n      LEAVE\n    case BADCODE:       /* x: got error */\n      r = Z_DATA_ERROR;\n      LEAVE\n    default:\n      r = Z_STREAM_ERROR;\n      LEAVE\n  }\n#ifdef NEED_DUMMY_RETURN\n  return Z_STREAM_ERROR;  /* Some dumb compilers complain without this */\n#endif\n}\n\n\nlocal void inflate_codes_free( /* c, z) */\ninflate_codes_statef *c,\nz_streamp z )\n{\n  ZFREE(z, c);\n  Tracev((stderr, \"inflate:       codes free\\n\"));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/infcodes.h",
    "content": "/* infcodes.h -- header to use infcodes.c\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\n#ifndef _INFCODES_H\n#define _INFCODES_H\n\nstruct inflate_codes_state;\ntypedef struct inflate_codes_state FAR inflate_codes_statef;\n\nlocal inflate_codes_statef *inflate_codes_new OF((\n    uInt, uInt,\n    inflate_huft *, inflate_huft *,\n    z_streamp ));\n\nlocal int inflate_codes OF((\n    inflate_blocks_statef *,\n    z_streamp ,\n    int));\n\nlocal void inflate_codes_free OF((\n    inflate_codes_statef *,\n    z_streamp ));\n\n#endif /* _INFCODES_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/inffixed.h",
    "content": "/* inffixed.h -- table for decoding fixed codes\n * Generated automatically by the maketree.c program\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\nlocal const uInt fixed_bl = 9;\nlocal const uInt fixed_bd = 5;\nlocal const inflate_huft fixed_tl[] = {\n    {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115},\n    {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192},\n    {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160},\n    {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},224},\n    {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},144},\n    {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},208},\n    {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},176},\n    {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},240},\n    {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227},\n    {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},200},\n    {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},168},\n    {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},232},\n    {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},152},\n    {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},216},\n    {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},184},\n    {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},248},\n    {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163},\n    {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},196},\n    {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},164},\n    {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},228},\n    {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},148},\n    {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},212},\n    {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},180},\n    {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},244},\n    {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0},\n    {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},204},\n    {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},172},\n    {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},236},\n    {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},156},\n    {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},220},\n    {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},188},\n    {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},252},\n    {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131},\n    {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},194},\n    {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},162},\n    {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},226},\n    {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},146},\n    {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},210},\n    {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},178},\n    {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},242},\n    {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258},\n    {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},202},\n    {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},170},\n    {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},234},\n    {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},154},\n    {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},218},\n    {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},186},\n    {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},250},\n    {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195},\n    {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},198},\n    {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},166},\n    {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},230},\n    {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},150},\n    {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},214},\n    {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},182},\n    {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},246},\n    {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0},\n    {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},206},\n    {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},174},\n    {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},238},\n    {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},158},\n    {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},222},\n    {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},190},\n    {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},254},\n    {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115},\n    {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},193},\n    {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},161},\n    {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},225},\n    {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},145},\n    {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},209},\n    {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},177},\n    {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},241},\n    {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227},\n    {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},201},\n    {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},169},\n    {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},233},\n    {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},153},\n    {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},217},\n    {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},185},\n    {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},249},\n    {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163},\n    {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},197},\n    {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},165},\n    {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},229},\n    {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},149},\n    {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},213},\n    {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},181},\n    {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},245},\n    {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0},\n    {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},205},\n    {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},173},\n    {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},237},\n    {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},157},\n    {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},221},\n    {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},189},\n    {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},253},\n    {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131},\n    {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},195},\n    {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},163},\n    {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},227},\n    {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},147},\n    {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},211},\n    {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},179},\n    {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},243},\n    {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258},\n    {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},203},\n    {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},171},\n    {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},235},\n    {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},155},\n    {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},219},\n    {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},187},\n    {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},251},\n    {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195},\n    {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},199},\n    {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},167},\n    {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},231},\n    {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},151},\n    {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},215},\n    {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},183},\n    {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},247},\n    {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0},\n    {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},207},\n    {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},175},\n    {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},239},\n    {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},159},\n    {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},223},\n    {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191},\n    {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255}\n  };\nlocal const inflate_huft fixed_td[] = {\n    {{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097},\n    {{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385},\n    {{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193},\n    {{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577},\n    {{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145},\n    {{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577},\n    {{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289},\n    {{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577}\n  };\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/inflate.c",
    "content": "/* inflate.c -- zlib interface to inflate modules\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n#include \"zutil.h\"\n#include \"infblock.h\"\n\n#define  DONE  INFLATE_DONE\n#define  BAD   INFLATE_BAD\n\ntypedef enum {\n      METHOD,   /* waiting for method byte */\n      FLAG,     /* waiting for flag byte */\n      DICT4,    /* four dictionary check bytes to go */\n      DICT3,    /* three dictionary check bytes to go */\n      DICT2,    /* two dictionary check bytes to go */\n      DICT1,    /* one dictionary check byte to go */\n      DICT0,    /* waiting for inflateSetDictionary */\n      BLOCKS,   /* decompressing blocks */\n      CHECK4,   /* four check bytes to go */\n      CHECK3,   /* three check bytes to go */\n      CHECK2,   /* two check bytes to go */\n      CHECK1,   /* one check byte to go */\n      DONE,     /* finished check, done */\n      BAD}      /* got an error--stay here */\ninflate_mode;\n\n/* inflate private state */\nstruct internal_state {\n\n  /* mode */\n  inflate_mode  mode;   /* current inflate mode */\n\n  /* mode dependent information */\n  union {\n    uInt method;        /* if FLAGS, method byte */\n    struct {\n      uLong was;                /* computed check value */\n      uLong need;               /* stream check value */\n    } check;            /* if CHECK, check values to compare */\n    uInt marker;        /* if BAD, inflateSync's marker bytes count */\n  } sub;        /* submode */\n\n  /* mode independent information */\n  int  nowrap;          /* flag for no wrapper */\n  uInt wbits;           /* log2(window size)  (8..15, defaults to 15) */\n  inflate_blocks_statef\n    *blocks;            /* current inflate_blocks state */\n\n};\n\n\nZEXPORT(int) inflateReset( /* z) */\nz_streamp z )\n{\n  if (z == Z_NULL || z->state == Z_NULL)\n    return Z_STREAM_ERROR;\n  z->total_in = z->total_out = 0;\n  z->msg = Z_NULL;\n  z->state->mode = z->state->nowrap ? BLOCKS : METHOD;\n  inflate_blocks_reset(z->state->blocks, z, Z_NULL);\n  Tracev((stderr, \"inflate: reset\\n\"));\n  return Z_OK;\n}\n\n\nZEXPORT(int) inflateEnd( /* z) */\nz_streamp z )\n{\n  if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)\n    return Z_STREAM_ERROR;\n  if (z->state->blocks != Z_NULL)\n    inflate_blocks_free(z->state->blocks, z);\n  ZFREE(z, z->state);\n  z->state = Z_NULL;\n  Tracev((stderr, \"inflate: end\\n\"));\n  return Z_OK;\n}\n\n\nZEXPORT(int) inflateInit2_( /* z, w, version, stream_size) */\nz_streamp z,\nint w,\nconst char *version,\nint stream_size )\n{\n  if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||\n      stream_size != sizeof(z_stream))\n      return Z_VERSION_ERROR;\n\n  /* initialize state */\n  if (z == Z_NULL)\n    return Z_STREAM_ERROR;\n  z->msg = Z_NULL;\n  if (z->zalloc == Z_NULL)\n  {\n    z->zalloc = zcalloc;\n    z->opaque = (voidpf)0;\n  }\n  if (z->zfree == Z_NULL) z->zfree = zcfree;\n  if ((z->state = (struct internal_state FAR *)\n       ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL)\n    return Z_MEM_ERROR;\n  z->state->blocks = Z_NULL;\n\n  /* handle undocumented nowrap option (no zlib header or check) */\n  z->state->nowrap = 0;\n  if (w < 0)\n  {\n    w = - w;\n    z->state->nowrap = 1;\n  }\n\n  /* set window size */\n  if (w < 8 || w > 15)\n  {\n    inflateEnd(z);\n    return Z_STREAM_ERROR;\n  }\n  z->state->wbits = (uInt)w;\n\n  /* create inflate_blocks state */\n  if ((z->state->blocks =\n      inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w))\n      == Z_NULL)\n  {\n    inflateEnd(z);\n    return Z_MEM_ERROR;\n  }\n  Tracev((stderr, \"inflate: allocated\\n\"));\n\n  /* reset state */\n  inflateReset(z);\n  return Z_OK;\n}\n\n\n\n#undef  NEEDBYTE\n#define NEEDBYTE {if(z->avail_in==0)return r;r=f;}\n\n#undef  NEXTBYTE\n#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)\n\n\nZEXPORT(int) inflate( /* z, f) */\nz_streamp z,\nint f )\n{\n  int r;\n  uInt b;\n\n  if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL)\n    return Z_STREAM_ERROR;\n  f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n  r = Z_BUF_ERROR;\n  while (1) switch (z->state->mode)\n  {\n    case METHOD:\n      NEEDBYTE\n      if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED)\n      {\n        z->state->mode = BAD;\n        z->msg = (char*)\"unknown compression method\";\n        z->state->sub.marker = 5;       /* can't try inflateSync */\n        break;\n      }\n      if ((z->state->sub.method >> 4) + 8 > z->state->wbits)\n      {\n        z->state->mode = BAD;\n        z->msg = (char*)\"invalid window size\";\n        z->state->sub.marker = 5;       /* can't try inflateSync */\n        break;\n      }\n      z->state->mode = FLAG;\n    case FLAG:\n      NEEDBYTE\n      b = NEXTBYTE;\n      if (((z->state->sub.method << 8) + b) % 31)\n      {\n        z->state->mode = BAD;\n        z->msg = (char*)\"incorrect header check\";\n        z->state->sub.marker = 5;       /* can't try inflateSync */\n        break;\n      }\n      Tracev((stderr, \"inflate: zlib header ok\\n\"));\n      if (!(b & PRESET_DICT))\n      {\n        z->state->mode = BLOCKS;\n        break;\n      }\n      z->state->mode = DICT4;\n    case DICT4:\n      NEEDBYTE\n      z->state->sub.check.need = (uLong)NEXTBYTE << 24;\n      z->state->mode = DICT3;\n    case DICT3:\n      NEEDBYTE\n      z->state->sub.check.need += (uLong)NEXTBYTE << 16;\n      z->state->mode = DICT2;\n    case DICT2:\n      NEEDBYTE\n      z->state->sub.check.need += (uLong)NEXTBYTE << 8;\n      z->state->mode = DICT1;\n    case DICT1:\n      NEEDBYTE\n      z->state->sub.check.need += (uLong)NEXTBYTE;\n      z->adler = z->state->sub.check.need;\n      z->state->mode = DICT0;\n      return Z_NEED_DICT;\n    case DICT0:\n      z->state->mode = BAD;\n      z->msg = (char*)\"need dictionary\";\n      z->state->sub.marker = 0;       /* can try inflateSync */\n      return Z_STREAM_ERROR;\n    case BLOCKS:\n      r = inflate_blocks(z->state->blocks, z, r);\n      if (r == Z_DATA_ERROR)\n      {\n        z->state->mode = BAD;\n        z->state->sub.marker = 0;       /* can try inflateSync */\n        break;\n      }\n      if (r == Z_OK)\n        r = f;\n      if (r != Z_STREAM_END)\n        return r;\n      r = f;\n      inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was);\n      if (z->state->nowrap)\n      {\n        z->state->mode = DONE;\n        break;\n      }\n      z->state->mode = CHECK4;\n    case CHECK4:\n      NEEDBYTE\n      z->state->sub.check.need = (uLong)NEXTBYTE << 24;\n      z->state->mode = CHECK3;\n    case CHECK3:\n      NEEDBYTE\n      z->state->sub.check.need += (uLong)NEXTBYTE << 16;\n      z->state->mode = CHECK2;\n    case CHECK2:\n      NEEDBYTE\n      z->state->sub.check.need += (uLong)NEXTBYTE << 8;\n      z->state->mode = CHECK1;\n    case CHECK1:\n      NEEDBYTE\n      z->state->sub.check.need += (uLong)NEXTBYTE;\n\n      if (z->state->sub.check.was != z->state->sub.check.need)\n      {\n        z->state->mode = BAD;\n        z->msg = (char*)\"incorrect data check\";\n        z->state->sub.marker = 5;       /* can't try inflateSync */\n        break;\n      }\n      Tracev((stderr, \"inflate: zlib check ok\\n\"));\n      z->state->mode = DONE;\n    case DONE:\n      return Z_STREAM_END;\n    case BAD:\n      return Z_DATA_ERROR;\n    default:\n      return Z_STREAM_ERROR;\n  }\n#ifdef NEED_DUMMY_RETURN\n  return Z_STREAM_ERROR;  /* Some dumb compilers complain without this */\n#endif\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/inftrees.c",
    "content": "/* inftrees.c -- generate Huffman trees for efficient decoding\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n#include \"zutil.h\"\n#include \"inftrees.h\"\n\n#if !defined(BUILDFIXED) && !defined(STDC)\n#  define BUILDFIXED   /* non ANSI compilers may not accept inffixed.h */\n#endif\n\n\n#if 0\nlocal const char inflate_copyright[] =\n   \" inflate 1.1.4 Copyright 1995-2002 Mark Adler \";\n#endif\n/*\n  If you use the zlib library in a product, an acknowledgment is welcome\n  in the documentation of your product. If for some reason you cannot\n  include such an acknowledgment, I would appreciate that you keep this\n  copyright string in the executable of your product.\n */\n\n/* simplify the use of the inflate_huft type with some defines */\n#define exop word.what.Exop\n#define bits word.what.Bits\n\n\nlocal int huft_build OF((\n    uIntf *,            /* code lengths in bits */\n    uInt,               /* number of codes */\n    uInt,               /* number of \"simple\" codes */\n    const uIntf *,      /* list of base values for non-simple codes */\n    const uIntf *,      /* list of extra bits for non-simple codes */\n    inflate_huft * FAR*,/* result: starting table */\n    uIntf *,            /* maximum lookup bits (returns actual) */\n    inflate_huft *,     /* space for trees */\n    uInt *,             /* hufts used in space */\n    uIntf * ));         /* space for values */\n\n/* Tables for deflate from PKZIP's appnote.txt. */\nlocal const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */\n        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};\n        /* see note #13 above about 258 */\nlocal const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */\n        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,\n        3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */\nlocal const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */\n        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n        8193, 12289, 16385, 24577};\nlocal const uInt cpdext[30] = { /* Extra bits for distance codes */\n        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,\n        7, 7, 8, 8, 9, 9, 10, 10, 11, 11,\n        12, 12, 13, 13};\n\n/*\n   Huffman code decoding is performed using a multi-level table lookup.\n   The fastest way to decode is to simply build a lookup table whose\n   size is determined by the longest code.  However, the time it takes\n   to build this table can also be a factor if the data being decoded\n   is not very long.  The most common codes are necessarily the\n   shortest codes, so those codes dominate the decoding time, and hence\n   the speed.  The idea is you can have a shorter table that decodes the\n   shorter, more probable codes, and then point to subsidiary tables for\n   the longer codes.  The time it costs to decode the longer codes is\n   then traded against the time it takes to make longer tables.\n\n   This results of this trade are in the variables lbits and dbits\n   below.  lbits is the number of bits the first level table for literal/\n   length codes can decode in one step, and dbits is the same thing for\n   the distance codes.  Subsequent tables are also less than or equal to\n   those sizes.  These values may be adjusted either when all of the\n   codes are shorter than that, in which case the longest code length in\n   bits is used, or when the shortest code is *longer* than the requested\n   table size, in which case the length of the shortest code in bits is\n   used.\n\n   There are two different values for the two tables, since they code a\n   different number of possibilities each.  The literal/length table\n   codes 286 possible values, or in a flat code, a little over eight\n   bits.  The distance table codes 30 possible values, or a little less\n   than five bits, flat.  The optimum values for speed end up being\n   about one bit more than those, so lbits is 8+1 and dbits is 5+1.\n   The optimum values may differ though from machine to machine, and\n   possibly even between compilers.  Your mileage may vary.\n */\n\n\n/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */\n#define BMAX 15         /* maximum bit length of any code */\n\nlocal int huft_build( /* b, n, s, d, e, t, m, hp, hn, v) */\nuIntf *b,               /* code lengths in bits (all assumed <= BMAX) */\nuInt n,                 /* number of codes (assumed <= 288) */\nuInt s,                 /* number of simple-valued codes (0..s-1) */\nconst uIntf *d,         /* list of base values for non-simple codes */\nconst uIntf *e,         /* list of extra bits for non-simple codes */\ninflate_huft * FAR *t,  /* result: starting table */\nuIntf *m,               /* maximum lookup bits, returns actual */\ninflate_huft *hp,       /* space for trees */\nuInt *hn,               /* hufts used in space */\nuIntf *v                /* working area: values in order of bit length */\n/* Given a list of code lengths and a maximum table size, make a set of\n   tables to decode that set of codes.  Return Z_OK on success, Z_BUF_ERROR\n   if the given code set is incomplete (the tables are still built in this\n   case), or Z_DATA_ERROR if the input is invalid. */\n)\n{\n\n  uInt a;                       /* counter for codes of length k */\n  uInt c[BMAX+1];               /* bit length count table */\n  uInt f;                       /* i repeats in table every f entries */\n  int g;                        /* maximum code length */\n  int h;                        /* table level */\n  uInt i;                       /* counter, current code */\n  uInt j;                       /* counter */\n  int k;                        /* number of bits in current code */\n  int l;                        /* bits per table (returned in m) */\n  uInt mask;                    /* (1 << w) - 1, to avoid cc -O bug on HP */\n  uIntf *p;                     /* pointer into c[], b[], or v[] */\n  inflate_huft *q;              /* points to current table */\n  struct inflate_huft_s r;      /* table entry for structure assignment */\n  inflate_huft *u[BMAX];        /* table stack */\n  int w;                        /* bits before this table == (l * h) */\n  uInt x[BMAX+1];               /* bit offsets, then code stack */\n  uIntf *xp;                    /* pointer into x */\n  int y;                        /* number of dummy codes added */\n  uInt z;                       /* number of entries in current table */\n\n\n  /* Make compiler happy */\n  r.base = 0;\n\n  /* Generate counts for each bit length */\n  p = c;\n#define C0 *p++ = 0;\n#define C2 C0 C0 C0 C0\n#define C4 C2 C2 C2 C2\n  C4                            /* clear c[]--assume BMAX+1 is 16 */\n  p = b;  i = n;\n  do {\n    c[*p++]++;                  /* assume all entries <= BMAX */\n  } while (--i);\n  if (c[0] == n)                /* null input--all zero length codes */\n  {\n    *t = (inflate_huft *)Z_NULL;\n    *m = 0;\n    return Z_OK;\n  }\n\n\n  /* Find minimum and maximum length, bound *m by those */\n  l = *m;\n  for (j = 1; j <= BMAX; j++)\n    if (c[j])\n      break;\n  k = j;                        /* minimum code length */\n  if ((uInt)l < j)\n    l = j;\n  for (i = BMAX; i; i--)\n    if (c[i])\n      break;\n  g = i;                        /* maximum code length */\n  if ((uInt)l > i)\n    l = i;\n  *m = l;\n\n\n  /* Adjust last length count to fill out codes, if needed */\n  for (y = 1 << j; j < i; j++, y <<= 1)\n    if ((y -= c[j]) < 0)\n      return Z_DATA_ERROR;\n  if ((y -= c[i]) < 0)\n    return Z_DATA_ERROR;\n  c[i] += y;\n\n\n  /* Generate starting offsets into the value table for each length */\n  x[1] = j = 0;\n  p = c + 1;  xp = x + 2;\n  while (--i) {                 /* note that i == g from above */\n    *xp++ = (j += *p++);\n  }\n\n\n  /* Make a table of values in order of bit lengths */\n  p = b;  i = 0;\n  do {\n    if ((j = *p++) != 0)\n      v[x[j]++] = i;\n  } while (++i < n);\n  n = x[g];                     /* set n to length of v */\n\n\n  /* Generate the Huffman codes and for each, make the table entries */\n  x[0] = i = 0;                 /* first Huffman code is zero */\n  p = v;                        /* grab values in bit order */\n  h = -1;                       /* no tables yet--level -1 */\n  w = -l;                       /* bits decoded == (l * h) */\n  u[0] = (inflate_huft *)Z_NULL;        /* just to keep compilers happy */\n  q = (inflate_huft *)Z_NULL;   /* ditto */\n  z = 0;                        /* ditto */\n\n  /* go through the bit lengths (k already is bits in shortest code) */\n  for (; k <= g; k++)\n  {\n    a = c[k];\n    while (a--)\n    {\n      /* here i is the Huffman code of length k bits for value *p */\n      /* make tables up to required level */\n      while (k > w + l)\n      {\n        h++;\n        w += l;                 /* previous table always l bits */\n\n        /* compute minimum size table less than or equal to l bits */\n        z = g - w;\n        z = z > (uInt)l ? (uInt)l : z;        /* table size upper limit */\n        if ((f = 1 << (j = k - w)) > a + 1)     /* try a k-w bit table */\n        {                       /* too few codes for k-w bit table */\n          f -= a + 1;           /* deduct codes from patterns left */\n          xp = c + k;\n          if (j < z)\n            while (++j < z)     /* try smaller tables up to z bits */\n            {\n              if ((f <<= 1) <= *++xp)\n                break;          /* enough codes to use up j bits */\n              f -= *xp;         /* else deduct codes from patterns */\n            }\n        }\n        z = 1 << j;             /* table entries for j-bit table */\n\n        /* allocate new table */\n        if (*hn + z > MANY)     /* (note: doesn't matter for fixed) */\n          return Z_DATA_ERROR;  /* overflow of MANY */\n        u[h] = q = hp + *hn;\n        *hn += z;\n\n        /* connect to last table, if there is one */\n        if (h)\n        {\n          x[h] = i;             /* save pattern for backing up */\n          r.bits = (Byte)l;     /* bits to dump before this table */\n          r.exop = (Byte)j;     /* bits in this table */\n          j = i >> (w - l);\n          r.base = (uInt)(q - u[h-1] - j);   /* offset to this table */\n          u[h-1][j] = r;        /* connect to last table */\n        }\n        else\n          *t = q;               /* first table is returned result */\n      }\n\n      /* set up table entry in r */\n      r.bits = (Byte)(k - w);\n      if (p >= v + n)\n        r.exop = 128 + 64;      /* out of values--invalid code */\n      else if (*p < s)\n      {\n        r.exop = (Byte)(*p < 256 ? 0 : 32 + 64);     /* 256 is end-of-block */\n        r.base = *p++;          /* simple code is just the value */\n      }\n      else\n      {\n        r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */\n        r.base = d[*p++ - s];\n      }\n\n      /* fill code-like entries with r */\n      f = 1 << (k - w);\n      for (j = i >> w; j < z; j += f)\n        q[j] = r;\n\n      /* backwards increment the k-bit code i */\n      for (j = 1 << (k - 1); i & j; j >>= 1)\n        i ^= j;\n      i ^= j;\n\n      /* backup over finished tables */\n      mask = (1 << w) - 1;      /* needed on HP, cc -O bug */\n      while ((i & mask) != x[h])\n      {\n        h--;                    /* don't need to update q */\n        w -= l;\n        mask = (1 << w) - 1;\n      }\n    }\n  }\n\n\n  /* Return Z_BUF_ERROR if we were given an incomplete table */\n  return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n}\n\n\nlocal int inflate_trees_bits( /* c, bb, tb, hp, z) */\nuIntf *c,               /* 19 code lengths */\nuIntf *bb,              /* bits tree desired/actual depth */\ninflate_huft * FAR *tb, /* bits tree result */\ninflate_huft *hp,       /* space for trees */\nz_streamp z             /* for messages */\n)\n{\n  int r;\n  uInt hn = 0;          /* hufts used in space */\n  uIntf *v;             /* work area for huft_build */\n\n  if ((v = (uIntf*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL)\n    return Z_MEM_ERROR;\n  r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL,\n                 tb, bb, hp, &hn, v);\n  if (r == Z_DATA_ERROR)\n    z->msg = (char*)\"oversubscribed dynamic bit lengths tree\";\n  else if (r == Z_BUF_ERROR || *bb == 0)\n  {\n    z->msg = (char*)\"incomplete dynamic bit lengths tree\";\n    r = Z_DATA_ERROR;\n  }\n  ZFREE(z, v);\n  return r;\n}\n\n\nlocal int inflate_trees_dynamic( /* nl, nd, c, bl, bd, tl, td, hp, z) */\nuInt nl,                /* number of literal/length codes */\nuInt nd,                /* number of distance codes */\nuIntf *c,               /* that many (total) code lengths */\nuIntf *bl,              /* literal desired/actual bit depth */\nuIntf *bd,              /* distance desired/actual bit depth */\ninflate_huft * FAR *tl, /* literal/length tree result */\ninflate_huft * FAR *td, /* distance tree result */\ninflate_huft *hp,       /* space for trees */\nz_streamp z             /* for messages */\n)\n{\n  int r;\n  uInt hn = 0;          /* hufts used in space */\n  uIntf *v;             /* work area for huft_build */\n\n  /* allocate work area */\n  if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL)\n    return Z_MEM_ERROR;\n\n  /* build literal/length tree */\n  r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v);\n  if (r != Z_OK || *bl == 0)\n  {\n    if (r == Z_DATA_ERROR)\n      z->msg = (char*)\"oversubscribed literal/length tree\";\n    else if (r != Z_MEM_ERROR)\n    {\n      z->msg = (char*)\"incomplete literal/length tree\";\n      r = Z_DATA_ERROR;\n    }\n    ZFREE(z, v);\n    return r;\n  }\n\n  /* build distance tree */\n  r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v);\n  if (r != Z_OK || (*bd == 0 && nl > 257))\n  {\n    if (r == Z_DATA_ERROR)\n      z->msg = (char*)\"oversubscribed distance tree\";\n    else if (r == Z_BUF_ERROR) {\n#if 0\n    {\n#endif\n#ifdef PKZIP_BUG_WORKAROUND\n      r = Z_OK;\n    }\n#else\n      z->msg = (char*)\"incomplete distance tree\";\n      r = Z_DATA_ERROR;\n    }\n    else if (r != Z_MEM_ERROR)\n    {\n      z->msg = (char*)\"empty distance tree with lengths\";\n      r = Z_DATA_ERROR;\n    }\n    ZFREE(z, v);\n    return r;\n#endif\n  }\n\n  /* done */\n  ZFREE(z, v);\n  return Z_OK;\n}\n\n\n/* build fixed tables only once--keep them here */\n#ifdef BUILDFIXED\nlocal int fixed_built = 0;\n#define FIXEDH 544      /* number of hufts used by fixed tables */\nlocal inflate_huft fixed_mem[FIXEDH];\nlocal uInt fixed_bl;\nlocal uInt fixed_bd;\nlocal inflate_huft *fixed_tl;\nlocal inflate_huft *fixed_td;\n#else\n#include \"inffixed.h\"\n#endif\n\n\nlocal int inflate_trees_fixed( /* bl, bd, tl, td, z) */\nuIntf *bl,                      /* literal desired/actual bit depth */\nuIntf *bd,                      /* distance desired/actual bit depth */\nconst inflate_huft * FAR *tl,   /* literal/length tree result */\nconst inflate_huft * FAR *td,   /* distance tree result */\nz_streamp z                     /* for memory allocation */\n)\n{\n#ifdef BUILDFIXED\n  /* build fixed tables if not already */\n  if (!fixed_built)\n  {\n    int k;              /* temporary variable */\n    uInt f = 0;         /* number of hufts used in fixed_mem */\n    uIntf *c;           /* length list for huft_build */\n    uIntf *v;           /* work area for huft_build */\n\n    /* allocate memory */\n    if ((c = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL)\n      return Z_MEM_ERROR;\n    if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL)\n    {\n      ZFREE(z, c);\n      return Z_MEM_ERROR;\n    }\n\n    /* literal table */\n    for (k = 0; k < 144; k++)\n      c[k] = 8;\n    for (; k < 256; k++)\n      c[k] = 9;\n    for (; k < 280; k++)\n      c[k] = 7;\n    for (; k < 288; k++)\n      c[k] = 8;\n    fixed_bl = 9;\n    huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl,\n               fixed_mem, &f, v);\n\n    /* distance table */\n    for (k = 0; k < 30; k++)\n      c[k] = 5;\n    fixed_bd = 5;\n    huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd,\n               fixed_mem, &f, v);\n\n    /* done */\n    ZFREE(z, v);\n    ZFREE(z, c);\n    fixed_built = 1;\n  }\n#else\n  FT_UNUSED(z);\n#endif\n  *bl = fixed_bl;\n  *bd = fixed_bd;\n  *tl = fixed_tl;\n  *td = fixed_td;\n  return Z_OK;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/inftrees.h",
    "content": "/* inftrees.h -- header to use inftrees.c\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\n/* Huffman code lookup table entry--this entry is four bytes for machines\n   that have 16-bit pointers (e.g. PC's in the small or medium model). */\n\n#ifndef _INFTREES_H\n#define _INFTREES_H\n\ntypedef struct inflate_huft_s FAR inflate_huft;\n\nstruct inflate_huft_s {\n  union {\n    struct {\n      Byte Exop;        /* number of extra bits or operation */\n      Byte Bits;        /* number of bits in this code or subcode */\n    } what;\n    uInt pad;           /* pad structure to a power of 2 (4 bytes for */\n  } word;               /*  16-bit, 8 bytes for 32-bit int's) */\n  uInt base;            /* literal, length base, distance base,\n                           or table offset */\n};\n\n/* Maximum size of dynamic tree.  The maximum found in a long but non-\n   exhaustive search was 1004 huft structures (850 for length/literals\n   and 154 for distances, the latter actually the result of an\n   exhaustive search).  The actual maximum is not known, but the\n   value below is more than safe. */\n#define MANY 1440\n\nlocal  int inflate_trees_bits OF((\n    uIntf *,                    /* 19 code lengths */\n    uIntf *,                    /* bits tree desired/actual depth */\n    inflate_huft * FAR *,       /* bits tree result */\n    inflate_huft *,             /* space for trees */\n    z_streamp));                /* for messages */\n\nlocal  int inflate_trees_dynamic OF((\n    uInt,                       /* number of literal/length codes */\n    uInt,                       /* number of distance codes */\n    uIntf *,                    /* that many (total) code lengths */\n    uIntf *,                    /* literal desired/actual bit depth */\n    uIntf *,                    /* distance desired/actual bit depth */\n    inflate_huft * FAR *,       /* literal/length tree result */\n    inflate_huft * FAR *,       /* distance tree result */\n    inflate_huft *,             /* space for trees */\n    z_streamp));                /* for messages */\n\nlocal  int inflate_trees_fixed OF((\n    uIntf *,                    /* literal desired/actual bit depth */\n    uIntf *,                    /* distance desired/actual bit depth */\n    const inflate_huft * FAR *, /* literal/length tree result */\n    const inflate_huft * FAR *, /* distance tree result */\n    z_streamp));                /* for memory allocation */\n\n#endif /* _INFTREES_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/infutil.c",
    "content": "/* inflate_util.c -- data and routines common to blocks and codes\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n#include \"zutil.h\"\n#include \"infblock.h\"\n#include \"inftrees.h\"\n#include \"infcodes.h\"\n#include \"infutil.h\"\n\n\n/* And'ing with mask[n] masks the lower n bits */\nlocal const uInt inflate_mask[17] = {\n    0x0000,\n    0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,\n    0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff\n};\n\n\n/* copy as much as possible from the sliding window to the output area */\nlocal int inflate_flush( /* s, z, r) */\ninflate_blocks_statef *s,\nz_streamp z,\nint r )\n{\n  uInt n;\n  Bytef *p;\n  Bytef *q;\n\n  /* local copies of source and destination pointers */\n  p = z->next_out;\n  q = s->read;\n\n  /* compute number of bytes to copy as far as end of window */\n  n = (uInt)((q <= s->write ? s->write : s->end) - q);\n  if (n > z->avail_out) n = z->avail_out;\n  if (n && r == Z_BUF_ERROR) r = Z_OK;\n\n  /* update counters */\n  z->avail_out -= n;\n  z->total_out += n;\n\n  /* update check information */\n  if (s->checkfn != Z_NULL)\n    z->adler = s->check = (*s->checkfn)(s->check, q, n);\n\n  /* copy as far as end of window */\n  zmemcpy(p, q, n);\n  p += n;\n  q += n;\n\n  /* see if more to copy at beginning of window */\n  if (q == s->end)\n  {\n    /* wrap pointers */\n    q = s->window;\n    if (s->write == s->end)\n      s->write = s->window;\n\n    /* compute bytes to copy */\n    n = (uInt)(s->write - q);\n    if (n > z->avail_out) n = z->avail_out;\n    if (n && r == Z_BUF_ERROR) r = Z_OK;\n\n    /* update counters */\n    z->avail_out -= n;\n    z->total_out += n;\n\n    /* update check information */\n    if (s->checkfn != Z_NULL)\n      z->adler = s->check = (*s->checkfn)(s->check, q, n);\n\n    /* copy */\n    zmemcpy(p, q, n);\n    p += n;\n    q += n;\n  }\n\n  /* update pointers */\n  z->next_out = p;\n  s->read = q;\n\n  /* done */\n  return r;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/infutil.h",
    "content": "/* infutil.h -- types and macros common to blocks and codes\n * Copyright (C) 1995-2002 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\n#ifndef _INFUTIL_H\n#define _INFUTIL_H\n\ntypedef enum {\n      TYPE,     /* get type bits (3, including end bit) */\n      LENS,     /* get lengths for stored */\n      STORED,   /* processing stored block */\n      TABLE,    /* get table lengths */\n      BTREE,    /* get bit lengths tree for a dynamic block */\n      DTREE,    /* get length, distance trees for a dynamic block */\n      CODES,    /* processing fixed or dynamic block */\n      DRY,      /* output remaining window bytes */\n      DONE,     /* finished last block, done */\n      BAD}      /* got a data error--stuck here */\ninflate_block_mode;\n\n/* inflate blocks semi-private state */\nstruct inflate_blocks_state {\n\n  /* mode */\n  inflate_block_mode  mode;     /* current inflate_block mode */\n\n  /* mode dependent information */\n  union {\n    uInt left;          /* if STORED, bytes left to copy */\n    struct {\n      uInt table;               /* table lengths (14 bits) */\n      uInt index;               /* index into blens (or border) */\n      uIntf *blens;             /* bit lengths of codes */\n      uInt bb;                  /* bit length tree depth */\n      inflate_huft *tb;         /* bit length decoding tree */\n    } trees;            /* if DTREE, decoding info for trees */\n    struct {\n      inflate_codes_statef\n         *codes;\n    } decode;           /* if CODES, current state */\n  } sub;                /* submode */\n  uInt last;            /* true if this block is the last block */\n\n  /* mode independent information */\n  uInt bitk;            /* bits in bit buffer */\n  uLong bitb;           /* bit buffer */\n  inflate_huft *hufts;  /* single malloc for tree space */\n  Bytef *window;        /* sliding window */\n  Bytef *end;           /* one byte after sliding window */\n  Bytef *read;          /* window read pointer */\n  Bytef *write;         /* window write pointer */\n  check_func checkfn;   /* check function */\n  uLong check;          /* check on output */\n\n};\n\n\n/* defines for inflate input/output */\n/*   update pointers and return */\n#define UPDBITS {s->bitb=b;s->bitk=k;}\n#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;}\n#define UPDOUT {s->write=q;}\n#define UPDATE {UPDBITS UPDIN UPDOUT}\n#define LEAVE {UPDATE return inflate_flush(s,z,r);}\n/*   get bytes and bits */\n#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}\n#define NEEDBYTE {if(n)r=Z_OK;else LEAVE}\n#define NEXTBYTE (n--,*p++)\n#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}\n#define DUMPBITS(j) {b>>=(j);k-=(j);}\n/*   output bytes */\n#define WAVAIL (uInt)(q<s->read?s->read-q-1:s->end-q)\n#define LOADOUT {q=s->write;m=(uInt)WAVAIL;}\n#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}\n#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT}\n#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}\n#define OUTBYTE(a) {*q++=(Byte)(a);m--;}\n/*   load local pointers */\n#define LOAD {LOADIN LOADOUT}\n\n/* masks for lower bits (size given to avoid silly warnings with Visual C++) */\n#ifndef NO_INFLATE_MASK\nlocal uInt inflate_mask[17];\n#endif\n\n/* copy as much as possible from the sliding window to the output area */\nlocal int inflate_flush OF((\n    inflate_blocks_statef *,\n    z_streamp ,\n    int));\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/zconf.h",
    "content": "/* zconf.h -- configuration of the zlib compression library\n * Copyright (C) 1995-2002 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#ifndef _ZCONF_H\n#define _ZCONF_H\n\n/*\n * If you *really* need a unique prefix for all types and library functions,\n * compile with -DZ_PREFIX. The \"standard\" zlib should be compiled without it.\n */\n#ifdef Z_PREFIX\n#  define deflateInit_         z_deflateInit_\n#  define deflate              z_deflate\n#  define deflateEnd           z_deflateEnd\n#  define inflateInit_         z_inflateInit_\n#  define inflate              z_inflate\n#  define inflateEnd           z_inflateEnd\n#  define deflateInit2_        z_deflateInit2_\n#  define deflateSetDictionary z_deflateSetDictionary\n#  define deflateCopy          z_deflateCopy\n#  define deflateReset         z_deflateReset\n#  define deflateParams        z_deflateParams\n#  define inflateInit2_        z_inflateInit2_\n#  define inflateSetDictionary z_inflateSetDictionary\n#  define inflateSync          z_inflateSync\n#  define inflateSyncPoint     z_inflateSyncPoint\n#  define inflateReset         z_inflateReset\n#  define compress             z_compress\n#  define compress2            z_compress2\n#  define uncompress           z_uncompress\n#  define adler32              z_adler32\n#  define crc32                z_crc32\n#  define get_crc_table        z_get_crc_table\n\n#  define Byte   z_Byte\n#  define uInt   z_uInt\n#  define uLong  z_uLong\n#  define Bytef  z_Bytef\n#  define charf  z_charf\n#  define intf   z_intf\n#  define uIntf  z_uIntf\n#  define uLongf z_uLongf\n#  define voidpf z_voidpf\n#  define voidp  z_voidp\n#endif\n\n#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)\n#  define WIN32\n#endif\n#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)\n#  ifndef __32BIT__\n#    define __32BIT__\n#  endif\n#endif\n#if defined(__MSDOS__) && !defined(MSDOS)\n#  define MSDOS\n#endif\n\n/* WinCE doesn't have errno.h */\n#ifdef _WIN32_WCE\n#  define NO_ERRNO_H\n#endif\n\n\n/*\n * Compile with -DMAXSEG_64K if the alloc function cannot allocate more\n * than 64k bytes at a time (needed on systems with 16-bit int).\n */\n#if defined(MSDOS) && !defined(__32BIT__)\n#  define MAXSEG_64K\n#endif\n#ifdef MSDOS\n#  define UNALIGNED_OK\n#endif\n\n#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32))  && !defined(STDC)\n#  define STDC\n#endif\n#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)\n#  ifndef STDC\n#    define STDC\n#  endif\n#endif\n\n#ifndef STDC\n#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */\n#    define const\n#  endif\n#endif\n\n/* Some Mac compilers merge all .h files incorrectly: */\n#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)\n#  define NO_DUMMY_DECL\n#endif\n\n/* Old Borland C and LCC incorrectly complains about missing returns: */\n#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)\n#  define NEED_DUMMY_RETURN\n#endif\n\n#if defined(__LCC__)\n#  define  NEED_DUMMY_RETURN\n#endif\n\n/* Maximum value for memLevel in deflateInit2 */\n#ifndef MAX_MEM_LEVEL\n#  ifdef MAXSEG_64K\n#    define MAX_MEM_LEVEL 8\n#  else\n#    define MAX_MEM_LEVEL 9\n#  endif\n#endif\n\n/* Maximum value for windowBits in deflateInit2 and inflateInit2.\n * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files\n * created by gzip. (Files created by minigzip can still be extracted by\n * gzip.)\n */\n#ifndef MAX_WBITS\n#  define MAX_WBITS   15 /* 32K LZ77 window */\n#endif\n\n/* The memory requirements for deflate are (in bytes):\n            (1 << (windowBits+2)) +  (1 << (memLevel+9))\n that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)\n plus a few kilobytes for small objects. For example, if you want to reduce\n the default memory requirements from 256K to 128K, compile with\n     make CFLAGS=\"-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7\"\n Of course this will generally degrade compression (there's no free lunch).\n\n   The memory requirements for inflate are (in bytes) 1 << windowBits\n that is, 32K for windowBits=15 (default value) plus a few kilobytes\n for small objects.\n*/\n\n                        /* Type declarations */\n\n#ifndef OF /* function prototypes */\n#  ifdef STDC\n#    define OF(args)  args\n#  else\n#    define OF(args)  ()\n#  endif\n#endif\n\n/* The following definitions for FAR are needed only for MSDOS mixed\n * model programming (small or medium model with some far allocations).\n * This was tested only with MSC; for other MSDOS compilers you may have\n * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,\n * just define FAR to be empty.\n */\n#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)\n   /* MSC small or medium model */\n#  define SMALL_MEDIUM\n#  ifdef _MSC_VER\n#    define FAR _far\n#  else\n#    define FAR far\n#  endif\n#endif\n#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))\n#  ifndef __32BIT__\n#    define SMALL_MEDIUM\n#    define FAR _far\n#  endif\n#endif\n\n/* Compile with -DZLIB_DLL for Windows DLL support */\n#if defined(ZLIB_DLL)\n#  if defined(_WINDOWS) || defined(WINDOWS)\n#    ifdef FAR\n#      undef FAR\n#    endif\n#    include <windows.h>\n#    define ZEXPORT(x)  x WINAPI\n#    ifdef WIN32\n#      define ZEXPORTVA(x)  x WINAPIV\n#    else\n#      define ZEXPORTVA(x)  x FAR _cdecl _export\n#    endif\n#  endif\n#  if defined (__BORLANDC__)\n#    if (__BORLANDC__ >= 0x0500) && defined (WIN32)\n#      include <windows.h>\n#      define ZEXPORT(x) x __declspec(dllexport) WINAPI\n#      define ZEXPORTRVA(x)  x __declspec(dllexport) WINAPIV\n#    else\n#      if defined (_Windows) && defined (__DLL__)\n#        define ZEXPORT(x) x _export\n#        define ZEXPORTVA(x) x _export\n#      endif\n#    endif\n#  endif\n#endif\n\n\n#ifndef ZEXPORT\n#  define ZEXPORT(x)   static x\n#endif\n#ifndef ZEXPORTVA\n#  define ZEXPORTVA(x)   static x\n#endif\n#ifndef ZEXTERN\n#  define ZEXTERN(x) static x\n#endif\n#ifndef ZEXTERNDEF\n#  define ZEXTERNDEF(x)  static x\n#endif\n\n#ifndef FAR\n#   define FAR\n#endif\n\n//#if !defined(MACOS) && !defined(TARGET_OS_MAC)\ntypedef unsigned char  Byte;  /* 8 bits */\n//#endif\ntypedef unsigned int   uInt;  /* 16 bits or more */\ntypedef unsigned long  uLong; /* 32 bits or more */\n\n#ifdef SMALL_MEDIUM\n   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */\n#  define Bytef Byte FAR\n#else\n   typedef Byte  FAR Bytef;\n#endif\ntypedef char  FAR charf;\ntypedef int   FAR intf;\ntypedef uInt  FAR uIntf;\ntypedef uLong FAR uLongf;\n\n#ifdef STDC\n   typedef void FAR *voidpf;\n   typedef void     *voidp;\n#else\n   typedef Byte FAR *voidpf;\n   typedef Byte     *voidp;\n#endif\n\n#ifdef HAVE_UNISTD_H\n#  include <sys/types.h> /* for off_t */\n#  include <unistd.h>    /* for SEEK_* and off_t */\n#  define z_off_t  off_t\n#endif\n#ifndef SEEK_SET\n#  define SEEK_SET        0       /* Seek from beginning of file.  */\n#  define SEEK_CUR        1       /* Seek from current position.  */\n#  define SEEK_END        2       /* Set file pointer to EOF plus \"offset\" */\n#endif\n#ifndef z_off_t\n#  define  z_off_t long\n#endif\n\n/* MVS linker does not support external names larger than 8 bytes */\n#if defined(__MVS__)\n#   pragma map(deflateInit_,\"DEIN\")\n#   pragma map(deflateInit2_,\"DEIN2\")\n#   pragma map(deflateEnd,\"DEEND\")\n#   pragma map(inflateInit_,\"ININ\")\n#   pragma map(inflateInit2_,\"ININ2\")\n#   pragma map(inflateEnd,\"INEND\")\n#   pragma map(inflateSync,\"INSY\")\n#   pragma map(inflateSetDictionary,\"INSEDI\")\n#   pragma map(inflate_blocks,\"INBL\")\n#   pragma map(inflate_blocks_new,\"INBLNE\")\n#   pragma map(inflate_blocks_free,\"INBLFR\")\n#   pragma map(inflate_blocks_reset,\"INBLRE\")\n#   pragma map(inflate_codes_free,\"INCOFR\")\n#   pragma map(inflate_codes,\"INCO\")\n#   pragma map(inflate_fast,\"INFA\")\n#   pragma map(inflate_flush,\"INFLU\")\n#   pragma map(inflate_mask,\"INMA\")\n#   pragma map(inflate_set_dictionary,\"INSEDI2\")\n#   pragma map(inflate_copyright,\"INCOPY\")\n#   pragma map(inflate_trees_bits,\"INTRBI\")\n#   pragma map(inflate_trees_dynamic,\"INTRDY\")\n#   pragma map(inflate_trees_fixed,\"INTRFI\")\n#   pragma map(inflate_trees_free,\"INTRFR\")\n#endif\n\n#endif /* _ZCONF_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/zlib.h",
    "content": "/* zlib.h -- interface of the 'zlib' general purpose compression library\n  version 1.1.4, March 11th, 2002\n\n  Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n\n  Jean-loup Gailly        Mark Adler\n  jloup@gzip.org          madler@alumni.caltech.edu\n\n\n  The data format used by the zlib library is described by RFCs (Request for\n  Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt\n  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).\n*/\n\n#ifndef _ZLIB_H\n#define _ZLIB_H\n\n#include \"zconf.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define ZLIB_VERSION \"1.1.4\"\n\n/*\n     The 'zlib' compression library provides in-memory compression and\n  decompression functions, including integrity checks of the uncompressed\n  data.  This version of the library supports only one compression method\n  (deflation) but other algorithms will be added later and will have the same\n  stream interface.\n\n     Compression can be done in a single step if the buffers are large\n  enough (for example if an input file is mmap'ed), or can be done by\n  repeated calls of the compression function.  In the latter case, the\n  application must provide more input and/or consume the output\n  (providing more output space) before each call.\n\n     The library also supports reading and writing files in gzip (.gz) format\n  with an interface similar to that of stdio.\n\n     The library does not install any signal handler. The decoder checks\n  the consistency of the compressed data, so the library should never\n  crash even in case of corrupted input.\n*/\n\ntypedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));\ntypedef void   (*free_func)  OF((voidpf opaque, voidpf address));\n\nstruct internal_state;\n\ntypedef struct z_stream_s {\n    Bytef    *next_in;  /* next input byte */\n    uInt     avail_in;  /* number of bytes available at next_in */\n    uLong    total_in;  /* total nb of input bytes read so far */\n\n    Bytef    *next_out; /* next output byte should be put there */\n    uInt     avail_out; /* remaining free space at next_out */\n    uLong    total_out; /* total nb of bytes output so far */\n\n    char     *msg;      /* last error message, NULL if no error */\n    struct internal_state FAR *state; /* not visible by applications */\n\n    alloc_func zalloc;  /* used to allocate the internal state */\n    free_func  zfree;   /* used to free the internal state */\n    voidpf     opaque;  /* private data object passed to zalloc and zfree */\n\n    int     data_type;  /* best guess about the data type: ascii or binary */\n    uLong   adler;      /* adler32 value of the uncompressed data */\n    uLong   reserved;   /* reserved for future use */\n} z_stream;\n\ntypedef z_stream FAR *z_streamp;\n\n/*\n   The application must update next_in and avail_in when avail_in has\n   dropped to zero. It must update next_out and avail_out when avail_out\n   has dropped to zero. The application must initialize zalloc, zfree and\n   opaque before calling the init function. All other fields are set by the\n   compression library and must not be updated by the application.\n\n   The opaque value provided by the application will be passed as the first\n   parameter for calls of zalloc and zfree. This can be useful for custom\n   memory management. The compression library attaches no meaning to the\n   opaque value.\n\n   zalloc must return Z_NULL if there is not enough memory for the object.\n   If zlib is used in a multi-threaded application, zalloc and zfree must be\n   thread safe.\n\n   On 16-bit systems, the functions zalloc and zfree must be able to allocate\n   exactly 65536 bytes, but will not be required to allocate more than this\n   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,\n   pointers returned by zalloc for objects of exactly 65536 bytes *must*\n   have their offset normalized to zero. The default allocation function\n   provided by this library ensures this (see zutil.c). To reduce memory\n   requirements and avoid any allocation of 64K objects, at the expense of\n   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).\n\n   The fields total_in and total_out can be used for statistics or\n   progress reports. After compression, total_in holds the total size of\n   the uncompressed data and may be saved for use in the decompressor\n   (particularly if the decompressor wants to decompress everything in\n   a single step).\n*/\n\n                        /* constants */\n\n#define Z_NO_FLUSH      0\n#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */\n#define Z_SYNC_FLUSH    2\n#define Z_FULL_FLUSH    3\n#define Z_FINISH        4\n/* Allowed flush values; see deflate() below for details */\n\n#define Z_OK            0\n#define Z_STREAM_END    1\n#define Z_NEED_DICT     2\n#define Z_ERRNO        (-1)\n#define Z_STREAM_ERROR (-2)\n#define Z_DATA_ERROR   (-3)\n#define Z_MEM_ERROR    (-4)\n#define Z_BUF_ERROR    (-5)\n#define Z_VERSION_ERROR (-6)\n/* Return codes for the compression/decompression functions. Negative\n * values are errors, positive values are used for special but normal events.\n */\n\n#define Z_NO_COMPRESSION         0\n#define Z_BEST_SPEED             1\n#define Z_BEST_COMPRESSION       9\n#define Z_DEFAULT_COMPRESSION  (-1)\n/* compression levels */\n\n#define Z_FILTERED            1\n#define Z_HUFFMAN_ONLY        2\n#define Z_DEFAULT_STRATEGY    0\n/* compression strategy; see deflateInit2() below for details */\n\n#define Z_BINARY   0\n#define Z_ASCII    1\n#define Z_UNKNOWN  2\n/* Possible values of the data_type field */\n\n#define Z_DEFLATED   8\n/* The deflate compression method (the only one supported in this version) */\n\n#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */\n\n\n                        /* basic functions */\n\n/* The application can compare zlibVersion and ZLIB_VERSION for consistency.\n   If the first character differs, the library code actually used is\n   not compatible with the zlib.h header file used by the application.\n   This check is automatically made by deflateInit and inflateInit.\n */\n\n/*\nZEXTERN(int)  deflateInit OF((z_streamp strm, int level));\n\n     Initializes the internal stream state for compression. The fields\n   zalloc, zfree and opaque must be initialized before by the caller.\n   If zalloc and zfree are set to Z_NULL, deflateInit updates them to\n   use default allocation functions.\n\n     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:\n   1 gives best speed, 9 gives best compression, 0 gives no compression at\n   all (the input data is simply copied a block at a time).\n   Z_DEFAULT_COMPRESSION requests a default compromise between speed and\n   compression (currently equivalent to level 6).\n\n     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_STREAM_ERROR if level is not a valid compression level,\n   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible\n   with the version assumed by the caller (ZLIB_VERSION).\n   msg is set to null if there is no error message.  deflateInit does not\n   perform any compression: this will be done by deflate().\n*/\n\n\n/*\n    deflate compresses as much data as possible, and stops when the input\n  buffer becomes empty or the output buffer becomes full. It may introduce some\n  output latency (reading input without producing any output) except when\n  forced to flush.\n\n    The detailed semantics are as follows. deflate performs one or both of the\n  following actions:\n\n  - Compress more input starting at next_in and update next_in and avail_in\n    accordingly. If not all input can be processed (because there is not\n    enough room in the output buffer), next_in and avail_in are updated and\n    processing will resume at this point for the next call of deflate().\n\n  - Provide more output starting at next_out and update next_out and avail_out\n    accordingly. This action is forced if the parameter flush is non zero.\n    Forcing flush frequently degrades the compression ratio, so this parameter\n    should be set only when necessary (in interactive applications).\n    Some output may be provided even if flush is not set.\n\n  Before the call of deflate(), the application should ensure that at least\n  one of the actions is possible, by providing more input and/or consuming\n  more output, and updating avail_in or avail_out accordingly; avail_out\n  should never be zero before the call. The application can consume the\n  compressed output when it wants, for example when the output buffer is full\n  (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK\n  and with zero avail_out, it must be called again after making room in the\n  output buffer because there might be more output pending.\n\n    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is\n  flushed to the output buffer and the output is aligned on a byte boundary, so\n  that the decompressor can get all input data available so far. (In particular\n  avail_in is zero after the call if enough output space has been provided\n  before the call.)  Flushing may degrade compression for some compression\n  algorithms and so it should be used only when necessary.\n\n    If flush is set to Z_FULL_FLUSH, all output is flushed as with\n  Z_SYNC_FLUSH, and the compression state is reset so that decompression can\n  restart from this point if previous compressed data has been damaged or if\n  random access is desired. Using Z_FULL_FLUSH too often can seriously degrade\n  the compression.\n\n    If deflate returns with avail_out == 0, this function must be called again\n  with the same value of the flush parameter and more output space (updated\n  avail_out), until the flush is complete (deflate returns with non-zero\n  avail_out).\n\n    If the parameter flush is set to Z_FINISH, pending input is processed,\n  pending output is flushed and deflate returns with Z_STREAM_END if there\n  was enough output space; if deflate returns with Z_OK, this function must be\n  called again with Z_FINISH and more output space (updated avail_out) but no\n  more input data, until it returns with Z_STREAM_END or an error. After\n  deflate has returned Z_STREAM_END, the only possible operations on the\n  stream are deflateReset or deflateEnd.\n\n    Z_FINISH can be used immediately after deflateInit if all the compression\n  is to be done in a single step. In this case, avail_out must be at least\n  0.1% larger than avail_in plus 12 bytes.  If deflate does not return\n  Z_STREAM_END, then it must be called again as described above.\n\n    deflate() sets strm->adler to the adler32 checksum of all input read\n  so far (that is, total_in bytes).\n\n    deflate() may update data_type if it can make a good guess about\n  the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered\n  binary. This field is only for information purposes and does not affect\n  the compression algorithm in any manner.\n\n    deflate() returns Z_OK if some progress has been made (more input\n  processed or more output produced), Z_STREAM_END if all input has been\n  consumed and all output has been produced (only when flush is set to\n  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example\n  if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible\n  (for example avail_in or avail_out was zero).\n*/\n\n\n/*\n     All dynamically allocated data structures for this stream are freed.\n   This function discards any unprocessed input and does not flush any\n   pending output.\n\n     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the\n   stream state was inconsistent, Z_DATA_ERROR if the stream was freed\n   prematurely (some input or output was discarded). In the error case,\n   msg may be set but then points to a static string (which must not be\n   deallocated).\n*/\n\n\n/*\nZEXTERN(int)  inflateInit OF((z_streamp strm));\n\n     Initializes the internal stream state for decompression. The fields\n   next_in, avail_in, zalloc, zfree and opaque must be initialized before by\n   the caller. If next_in is not Z_NULL and avail_in is large enough (the exact\n   value depends on the compression method), inflateInit determines the\n   compression method from the zlib header and allocates all data structures\n   accordingly; otherwise the allocation will be deferred to the first call of\n   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to\n   use default allocation functions.\n\n     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the\n   version assumed by the caller.  msg is set to null if there is no error\n   message. inflateInit does not perform any decompression apart from reading\n   the zlib header if present: this will be done by inflate().  (So next_in and\n   avail_in may be modified, but next_out and avail_out are unchanged.)\n*/\n\n\nZEXTERN(int) inflate OF((z_streamp strm, int flush));\n/*\n    inflate decompresses as much data as possible, and stops when the input\n  buffer becomes empty or the output buffer becomes full. It may some\n  introduce some output latency (reading input without producing any output)\n  except when forced to flush.\n\n  The detailed semantics are as follows. inflate performs one or both of the\n  following actions:\n\n  - Decompress more input starting at next_in and update next_in and avail_in\n    accordingly. If not all input can be processed (because there is not\n    enough room in the output buffer), next_in is updated and processing\n    will resume at this point for the next call of inflate().\n\n  - Provide more output starting at next_out and update next_out and avail_out\n    accordingly.  inflate() provides as much output as possible, until there\n    is no more input data or no more space in the output buffer (see below\n    about the flush parameter).\n\n  Before the call of inflate(), the application should ensure that at least\n  one of the actions is possible, by providing more input and/or consuming\n  more output, and updating the next_* and avail_* values accordingly.\n  The application can consume the uncompressed output when it wants, for\n  example when the output buffer is full (avail_out == 0), or after each\n  call of inflate(). If inflate returns Z_OK and with zero avail_out, it\n  must be called again after making room in the output buffer because there\n  might be more output pending.\n\n    If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much\n  output as possible to the output buffer. The flushing behavior of inflate is\n  not specified for values of the flush parameter other than Z_SYNC_FLUSH\n  and Z_FINISH, but the current implementation actually flushes as much output\n  as possible anyway.\n\n    inflate() should normally be called until it returns Z_STREAM_END or an\n  error. However if all decompression is to be performed in a single step\n  (a single call of inflate), the parameter flush should be set to\n  Z_FINISH. In this case all pending input is processed and all pending\n  output is flushed; avail_out must be large enough to hold all the\n  uncompressed data. (The size of the uncompressed data may have been saved\n  by the compressor for this purpose.) The next operation on this stream must\n  be inflateEnd to deallocate the decompression state. The use of Z_FINISH\n  is never required, but can be used to inform inflate that a faster routine\n  may be used for the single inflate() call.\n\n     If a preset dictionary is needed at this point (see inflateSetDictionary\n  below), inflate sets strm-adler to the adler32 checksum of the\n  dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise\n  it sets strm->adler to the adler32 checksum of all output produced\n  so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or\n  an error code as described below. At the end of the stream, inflate()\n  checks that its computed adler32 checksum is equal to that saved by the\n  compressor and returns Z_STREAM_END only if the checksum is correct.\n\n    inflate() returns Z_OK if some progress has been made (more input processed\n  or more output produced), Z_STREAM_END if the end of the compressed data has\n  been reached and all uncompressed output has been produced, Z_NEED_DICT if a\n  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was\n  corrupted (input stream not conforming to the zlib format or incorrect\n  adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent\n  (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not\n  enough memory, Z_BUF_ERROR if no progress is possible or if there was not\n  enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR\n  case, the application may then call inflateSync to look for a good\n  compression block.\n*/\n\n\nZEXTERN(int)  inflateEnd OF((z_streamp strm));\n/*\n     All dynamically allocated data structures for this stream are freed.\n   This function discards any unprocessed input and does not flush any\n   pending output.\n\n     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state\n   was inconsistent. In the error case, msg may be set but then points to a\n   static string (which must not be deallocated).\n*/\n\n                        /* Advanced functions */\n\n/*\n    The following functions are needed only in some special applications.\n*/\n\n/*\nZEXTERN(int)  deflateInit2 OF((z_streamp strm,\n                                     int  level,\n                                     int  method,\n                                     int  windowBits,\n                                     int  memLevel,\n                                     int  strategy));\n\n     This is another version of deflateInit with more compression options. The\n   fields next_in, zalloc, zfree and opaque must be initialized before by\n   the caller.\n\n     The method parameter is the compression method. It must be Z_DEFLATED in\n   this version of the library.\n\n     The windowBits parameter is the base two logarithm of the window size\n   (the size of the history buffer).  It should be in the range 8..15 for this\n   version of the library. Larger values of this parameter result in better\n   compression at the expense of memory usage. The default value is 15 if\n   deflateInit is used instead.\n\n     The memLevel parameter specifies how much memory should be allocated\n   for the internal compression state. memLevel=1 uses minimum memory but\n   is slow and reduces compression ratio; memLevel=9 uses maximum memory\n   for optimal speed. The default value is 8. See zconf.h for total memory\n   usage as a function of windowBits and memLevel.\n\n     The strategy parameter is used to tune the compression algorithm. Use the\n   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a\n   filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no\n   string match).  Filtered data consists mostly of small values with a\n   somewhat random distribution. In this case, the compression algorithm is\n   tuned to compress them better. The effect of Z_FILTERED is to force more\n   Huffman coding and less string matching; it is somewhat intermediate\n   between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects\n   the compression ratio but not the correctness of the compressed output even\n   if it is not set appropriately.\n\n      deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid\n   method). msg is set to null if there is no error message.  deflateInit2 does\n   not perform any compression: this will be done by deflate().\n*/\n\n/*\n     Initializes the compression dictionary from the given byte sequence\n   without producing any compressed output. This function must be called\n   immediately after deflateInit, deflateInit2 or deflateReset, before any\n   call of deflate. The compressor and decompressor must use exactly the same\n   dictionary (see inflateSetDictionary).\n\n     The dictionary should consist of strings (byte sequences) that are likely\n   to be encountered later in the data to be compressed, with the most commonly\n   used strings preferably put towards the end of the dictionary. Using a\n   dictionary is most useful when the data to be compressed is short and can be\n   predicted with good accuracy; the data can then be compressed better than\n   with the default empty dictionary.\n\n     Depending on the size of the compression data structures selected by\n   deflateInit or deflateInit2, a part of the dictionary may in effect be\n   discarded, for example if the dictionary is larger than the window size in\n   deflate or deflate2. Thus the strings most likely to be useful should be\n   put at the end of the dictionary, not at the front.\n\n     Upon return of this function, strm->adler is set to the Adler32 value\n   of the dictionary; the decompressor may later use this value to determine\n   which dictionary has been used by the compressor. (The Adler32 value\n   applies to the whole dictionary even if only a subset of the dictionary is\n   actually used by the compressor.)\n\n     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a\n   parameter is invalid (such as NULL dictionary) or the stream state is\n   inconsistent (for example if deflate has already been called for this stream\n   or if the compression method is bsort). deflateSetDictionary does not\n   perform any compression: this will be done by deflate().\n*/\n\n/*\n     Sets the destination stream as a complete copy of the source stream.\n\n     This function can be useful when several compression strategies will be\n   tried, for example when there are several ways of pre-processing the input\n   data with a filter. The streams that will be discarded should then be freed\n   by calling deflateEnd.  Note that deflateCopy duplicates the internal\n   compression state which can be quite large, so this strategy is slow and\n   can consume lots of memory.\n\n     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent\n   (such as zalloc being NULL). msg is left unchanged in both source and\n   destination.\n*/\n\n/*\n     This function is equivalent to deflateEnd followed by deflateInit,\n   but does not free and reallocate all the internal compression state.\n   The stream will keep the same compression level and any other attributes\n   that may have been set by deflateInit2.\n\n      deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source\n   stream state was inconsistent (such as zalloc or state being NULL).\n*/\n\n/*\n     Dynamically update the compression level and compression strategy.  The\n   interpretation of level and strategy is as in deflateInit2.  This can be\n   used to switch between compression and straight copy of the input data, or\n   to switch to a different kind of input data requiring a different\n   strategy. If the compression level is changed, the input available so far\n   is compressed with the old level (and may be flushed); the new level will\n   take effect only at the next call of deflate().\n\n     Before the call of deflateParams, the stream state must be set as for\n   a call of deflate(), since the currently available input may have to\n   be compressed and flushed. In particular, strm->avail_out must be non-zero.\n\n     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source\n   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR\n   if strm->avail_out was zero.\n*/\n\n/*\nZEXTERN(int)  inflateInit2 OF((z_streamp strm,\n                                     int  windowBits));\n\n     This is another version of inflateInit with an extra parameter. The\n   fields next_in, avail_in, zalloc, zfree and opaque must be initialized\n   before by the caller.\n\n     The windowBits parameter is the base two logarithm of the maximum window\n   size (the size of the history buffer).  It should be in the range 8..15 for\n   this version of the library. The default value is 15 if inflateInit is used\n   instead. If a compressed stream with a larger window size is given as\n   input, inflate() will return with the error code Z_DATA_ERROR instead of\n   trying to allocate a larger window.\n\n      inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative\n   memLevel). msg is set to null if there is no error message.  inflateInit2\n   does not perform any decompression apart from reading the zlib header if\n   present: this will be done by inflate(). (So next_in and avail_in may be\n   modified, but next_out and avail_out are unchanged.)\n*/\n\n/*\n     Initializes the decompression dictionary from the given uncompressed byte\n   sequence. This function must be called immediately after a call of inflate\n   if this call returned Z_NEED_DICT. The dictionary chosen by the compressor\n   can be determined from the Adler32 value returned by this call of\n   inflate. The compressor and decompressor must use exactly the same\n   dictionary (see deflateSetDictionary).\n\n     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a\n   parameter is invalid (such as NULL dictionary) or the stream state is\n   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the\n   expected one (incorrect Adler32 value). inflateSetDictionary does not\n   perform any decompression: this will be done by subsequent calls of\n   inflate().\n*/\n\n/*\n    Skips invalid compressed data until a full flush point (see above the\n  description of deflate with Z_FULL_FLUSH) can be found, or until all\n  available input is skipped. No output is provided.\n\n    inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR\n  if no more input was provided, Z_DATA_ERROR if no flush point has been found,\n  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success\n  case, the application may save the current current value of total_in which\n  indicates where valid compressed data was found. In the error case, the\n  application may repeatedly call inflateSync, providing more input each time,\n  until success or end of the input data.\n*/\n\nZEXTERN(int)  inflateReset OF((z_streamp strm));\n/*\n     This function is equivalent to inflateEnd followed by inflateInit,\n   but does not free and reallocate all the internal decompression state.\n   The stream will keep attributes that may have been set by inflateInit2.\n\n      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source\n   stream state was inconsistent (such as zalloc or state being NULL).\n*/\n\n\n                        /* utility functions */\n\n/*\n     The following utility functions are implemented on top of the\n   basic stream-oriented functions. To simplify the interface, some\n   default options are assumed (compression level and memory usage,\n   standard memory allocation functions). The source code of these\n   utility functions can easily be modified if you need special options.\n*/\n\n/*\n     Compresses the source buffer into the destination buffer.  sourceLen is\n   the byte length of the source buffer. Upon entry, destLen is the total\n   size of the destination buffer, which must be at least 0.1% larger than\n   sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the\n   compressed buffer.\n     This function can be used to compress a whole file at once if the\n   input file is mmap'ed.\n     compress returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_BUF_ERROR if there was not enough room in the output\n   buffer.\n*/\n\n/*\n     Compresses the source buffer into the destination buffer. The level\n   parameter has the same meaning as in deflateInit.  sourceLen is the byte\n   length of the source buffer. Upon entry, destLen is the total size of the\n   destination buffer, which must be at least 0.1% larger than sourceLen plus\n   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.\n\n     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_BUF_ERROR if there was not enough room in the output buffer,\n   Z_STREAM_ERROR if the level parameter is invalid.\n*/\n\n/*\n     Decompresses the source buffer into the destination buffer.  sourceLen is\n   the byte length of the source buffer. Upon entry, destLen is the total\n   size of the destination buffer, which must be large enough to hold the\n   entire uncompressed data. (The size of the uncompressed data must have\n   been saved previously by the compressor and transmitted to the decompressor\n   by some mechanism outside the scope of this compression library.)\n   Upon exit, destLen is the actual size of the compressed buffer.\n     This function can be used to decompress a whole file at once if the\n   input file is mmap'ed.\n\n     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_BUF_ERROR if there was not enough room in the output\n   buffer, or Z_DATA_ERROR if the input data was corrupted.\n*/\n\n\n/*\n     Opens a gzip (.gz) file for reading or writing. The mode parameter\n   is as in fopen (\"rb\" or \"wb\") but can also include a compression level\n   (\"wb9\") or a strategy: 'f' for filtered data as in \"wb6f\", 'h' for\n   Huffman only compression as in \"wb1h\". (See the description\n   of deflateInit2 for more information about the strategy parameter.)\n\n     gzopen can be used to read a file which is not in gzip format; in this\n   case gzread will directly read from the file without decompression.\n\n     gzopen returns NULL if the file could not be opened or if there was\n   insufficient memory to allocate the (de)compression state; errno\n   can be checked to distinguish the two cases (if errno is zero, the\n   zlib error is Z_MEM_ERROR).  */\n\n/*\n     gzdopen() associates a gzFile with the file descriptor fd.  File\n   descriptors are obtained from calls like open, dup, creat, pipe or\n   fileno (in the file has been previously opened with fopen).\n   The mode parameter is as in gzopen.\n     The next call of gzclose on the returned gzFile will also close the\n   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file\n   descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).\n     gzdopen returns NULL if there was insufficient memory to allocate\n   the (de)compression state.\n*/\n\n/*\n     Dynamically update the compression level or strategy. See the description\n   of deflateInit2 for the meaning of these parameters.\n     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not\n   opened for writing.\n*/\n\n/*\n     Reads the given number of uncompressed bytes from the compressed file.\n   If the input file was not in gzip format, gzread copies the given number\n   of bytes into the buffer.\n     gzread returns the number of uncompressed bytes actually read (0 for\n   end of file, -1 for error). */\n\n/*\n     Writes the given number of uncompressed bytes into the compressed file.\n   gzwrite returns the number of uncompressed bytes actually written\n   (0 in case of error).\n*/\n\n/*\n     Converts, formats, and writes the args to the compressed file under\n   control of the format string, as in fprintf. gzprintf returns the number of\n   uncompressed bytes actually written (0 in case of error).\n*/\n\n/*\n      Writes the given null-terminated string to the compressed file, excluding\n   the terminating null character.\n      gzputs returns the number of characters written, or -1 in case of error.\n*/\n\n/*\n      Reads bytes from the compressed file until len-1 characters are read, or\n   a newline character is read and transferred to buf, or an end-of-file\n   condition is encountered.  The string is then terminated with a null\n   character.\n      gzgets returns buf, or Z_NULL in case of error.\n*/\n\n/*\n      Writes c, converted to an unsigned char, into the compressed file.\n   gzputc returns the value that was written, or -1 in case of error.\n*/\n\n/*\n      Reads one byte from the compressed file. gzgetc returns this byte\n   or -1 in case of end of file or error.\n*/\n\n/*\n     Flushes all pending output into the compressed file. The parameter\n   flush is as in the deflate() function. The return value is the zlib\n   error number (see function gzerror below). gzflush returns Z_OK if\n   the flush parameter is Z_FINISH and all output could be flushed.\n     gzflush should be called only when strictly necessary because it can\n   degrade compression.\n*/\n\n/*\n      Sets the starting position for the next gzread or gzwrite on the\n   given compressed file. The offset represents a number of bytes in the\n   uncompressed data stream. The whence parameter is defined as in lseek(2);\n   the value SEEK_END is not supported.\n     If the file is opened for reading, this function is emulated but can be\n   extremely slow. If the file is opened for writing, only forward seeks are\n   supported; gzseek then compresses a sequence of zeroes up to the new\n   starting position.\n\n      gzseek returns the resulting offset location as measured in bytes from\n   the beginning of the uncompressed stream, or -1 in case of error, in\n   particular if the file is opened for writing and the new starting position\n   would be before the current position.\n*/\n\n/*\n     Rewinds the given file. This function is supported only for reading.\n\n   gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)\n*/\n\n/*\n     Returns the starting position for the next gzread or gzwrite on the\n   given compressed file. This position represents a number of bytes in the\n   uncompressed data stream.\n\n   gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)\n*/\n\n/*\n     Returns 1 when EOF has previously been detected reading the given\n   input stream, otherwise zero.\n*/\n\n/*\n     Flushes all pending output if necessary, closes the compressed file\n   and deallocates all the (de)compression state. The return value is the zlib\n   error number (see function gzerror below).\n*/\n\n/*\n     Returns the error message for the last error which occurred on the\n   given compressed file. errnum is set to zlib error number. If an\n   error occurred in the file system and not in the compression library,\n   errnum is set to Z_ERRNO and the application may consult errno\n   to get the exact error code.\n*/\n\n                        /* checksum functions */\n\n/*\n     These functions are not related to compression but are exported\n   anyway because they might be useful in applications using the\n   compression library.\n*/\n\nZEXTERN(uLong)  adler32 OF((uLong adler, const Bytef *buf, uInt len));\n\n/*\n     Update a running Adler-32 checksum with the bytes buf[0..len-1] and\n   return the updated checksum. If buf is NULL, this function returns\n   the required initial value for the checksum.\n   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed\n   much faster. Usage example:\n\n     uLong adler = adler32(0L, Z_NULL, 0);\n\n     while (read_buffer(buffer, length) != EOF) {\n       adler = adler32(adler, buffer, length);\n     }\n     if (adler != original_adler) error();\n*/\n\n/*\n     Update a running crc with the bytes buf[0..len-1] and return the updated\n   crc. If buf is NULL, this function returns the required initial value\n   for the crc. Pre- and post-conditioning (one's complement) is performed\n   within this function so it shouldn't be done by the application.\n   Usage example:\n\n     uLong crc = crc32(0L, Z_NULL, 0);\n\n     while (read_buffer(buffer, length) != EOF) {\n       crc = crc32(crc, buffer, length);\n     }\n     if (crc != original_crc) error();\n*/\n\n\n                        /* various hacks, don't look :) */\n\n/* deflateInit and inflateInit are macros to allow checking the zlib version\n * and the compiler's view of z_stream:\n */\nZEXTERN(int)  inflateInit2_ OF((z_streamp strm, int  windowBits,\n                                      const char *version, int stream_size));\n#define deflateInit(strm, level) \\\n        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))\n#define inflateInit(strm) \\\n        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))\n#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \\\n        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\\\n                      (strategy),           ZLIB_VERSION, sizeof(z_stream))\n#define inflateInit2(strm, windowBits) \\\n        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* _ZLIB_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/zutil.c",
    "content": "/* zutil.c -- target dependent utility functions for the compression library\n * Copyright (C) 1995-2002 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#include \"zutil.h\"\n\n#ifndef STDC\nextern void exit OF((int));\n#endif\n\n\n#ifndef HAVE_MEMCPY\n\nvoid zmemcpy(dest, source, len)\n    Bytef* dest;\n    const Bytef* source;\n    uInt  len;\n{\n    if (len == 0) return;\n    do {\n        *dest++ = *source++; /* ??? to be unrolled */\n    } while (--len != 0);\n}\n\nint zmemcmp(s1, s2, len)\n    const Bytef* s1;\n    const Bytef* s2;\n    uInt  len;\n{\n    uInt j;\n\n    for (j = 0; j < len; j++) {\n        if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;\n    }\n    return 0;\n}\n\nvoid zmemzero(dest, len)\n    Bytef* dest;\n    uInt  len;\n{\n    if (len == 0) return;\n    do {\n        *dest++ = 0;  /* ??? to be unrolled */\n    } while (--len != 0);\n}\n#endif\n\n#if defined( MSDOS ) && defined( __TURBOC__ ) && !defined( MY_ZCALLOC )\n#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__)\n/* Small and medium model in Turbo C are for now limited to near allocation\n * with reduced MAX_WBITS and MAX_MEM_LEVEL\n */\n#  define MY_ZCALLOC\n\n/* Turbo C malloc() does not allow dynamic allocation of 64K bytes\n * and farmalloc(64K) returns a pointer with an offset of 8, so we\n * must fix the pointer. Warning: the pointer must be put back to its\n * original form in order to free it, use zcfree().\n */\n\n#define MAX_PTR 10\n/* 10*64K = 640K */\n\nlocal int next_ptr = 0;\n\ntypedef struct ptr_table_s {\n    voidpf org_ptr;\n    voidpf new_ptr;\n} ptr_table;\n\nlocal ptr_table table[MAX_PTR];\n/* This table is used to remember the original form of pointers\n * to large buffers (64K). Such pointers are normalized with a zero offset.\n * Since MSDOS is not a preemptive multitasking OS, this table is not\n * protected from concurrent access. This hack doesn't work anyway on\n * a protected system like OS/2. Use Microsoft C instead.\n */\n\nvoidpf zcalloc (voidpf opaque, unsigned items, unsigned size)\n{\n    voidpf buf = opaque; /* just to make some compilers happy */\n    ulg bsize = (ulg)items*size;\n\n    /* If we allocate less than 65520 bytes, we assume that farmalloc\n     * will return a usable pointer which doesn't have to be normalized.\n     */\n    if (bsize < 65520L) {\n        buf = farmalloc(bsize);\n        if (*(ush*)&buf != 0) return buf;\n    } else {\n        buf = farmalloc(bsize + 16L);\n    }\n    if (buf == NULL || next_ptr >= MAX_PTR) return NULL;\n    table[next_ptr].org_ptr = buf;\n\n    /* Normalize the pointer to seg:0 */\n    *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;\n    *(ush*)&buf = 0;\n    table[next_ptr++].new_ptr = buf;\n    return buf;\n}\n\nvoid  zcfree (voidpf opaque, voidpf ptr)\n{\n    int n;\n    if (*(ush*)&ptr != 0) { /* object < 64K */\n        farfree(ptr);\n        return;\n    }\n    /* Find the original pointer */\n    for (n = 0; n < next_ptr; n++) {\n        if (ptr != table[n].new_ptr) continue;\n\n        farfree(table[n].org_ptr);\n        while (++n < next_ptr) {\n            table[n-1] = table[n];\n        }\n        next_ptr--;\n        return;\n    }\n    ptr = opaque; /* just to make some compilers happy */\n    Assert(0, \"zcfree: ptr not found\");\n}\n#endif\n#endif /* MSDOS && __TURBOC__ */\n\n\n#if defined(M_I86) && !defined(__32BIT__) && !defined( MY_ZCALLOC )\n/* Microsoft C in 16-bit mode */\n\n#  define MY_ZCALLOC\n\n#if (!defined(_MSC_VER) || (_MSC_VER <= 600))\n#  define _halloc  halloc\n#  define _hfree   hfree\n#endif\n\nvoidpf zcalloc (voidpf opaque, unsigned items, unsigned size)\n{\n    if (opaque) opaque = 0; /* to make compiler happy */\n    return _halloc((long)items, size);\n}\n\nvoid  zcfree (voidpf opaque, voidpf ptr)\n{\n    if (opaque) opaque = 0; /* to make compiler happy */\n    _hfree(ptr);\n}\n\n#endif /* MSC */\n\n\n#ifndef MY_ZCALLOC /* Any system without a special alloc function */\n\n#ifndef STDC\nextern voidp  ft_scalloc OF((uInt items, uInt size));\nextern void   ft_sfree   OF((voidpf ptr));\n#endif\n\nvoidpf zcalloc (opaque, items, size)\n    voidpf opaque;\n    unsigned items;\n    unsigned size;\n{\n    if (opaque) items += size - size; /* make compiler happy */\n    return (voidpf)ft_scalloc(items, size);\n}\n\nvoid  zcfree (opaque, ptr)\n    voidpf opaque;\n    voidpf ptr;\n{\n    ft_sfree(ptr);\n    if (opaque) return; /* make compiler happy */\n}\n\n#endif /* MY_ZCALLOC */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/gzip/zutil.h",
    "content": "/* zutil.h -- internal interface and configuration of the compression library\n * Copyright (C) 1995-2002 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\n/* @(#) $Id$ */\n\n#ifndef _Z_UTIL_H\n#define _Z_UTIL_H\n\n#include \"zlib.h\"\n\n#ifdef STDC\n#  include <stddef.h>\n#  include <string.h>\n#  include <stdlib.h>\n#endif\n#ifdef NO_ERRNO_H\n    extern int errno;\n#else\n#   include <errno.h>\n#endif\n\n#ifndef local\n#  define local static\n#endif\n/* compile with -Dlocal if your debugger can't find static symbols */\n\ntypedef unsigned char  uch;\ntypedef uch FAR uchf;\ntypedef unsigned short ush;\ntypedef ush FAR ushf;\ntypedef unsigned long  ulg;\n\n\n#define ERR_RETURN(strm,err) \\\n  return (strm->msg = (char*)ERR_MSG(err), (err))\n/* To be used only when the state is known to be valid */\n\n        /* common constants */\n\n#ifndef DEF_WBITS\n#  define DEF_WBITS MAX_WBITS\n#endif\n/* default windowBits for decompression. MAX_WBITS is for compression only */\n\n#if MAX_MEM_LEVEL >= 8\n#  define DEF_MEM_LEVEL 8\n#else\n#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL\n#endif\n/* default memLevel */\n\n#define STORED_BLOCK 0\n#define STATIC_TREES 1\n#define DYN_TREES    2\n/* The three kinds of block type */\n\n#define MIN_MATCH  3\n#define MAX_MATCH  258\n/* The minimum and maximum match lengths */\n\n#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */\n\n        /* target dependencies */\n\n#ifdef MSDOS\n#  define OS_CODE  0x00\n#  if defined(__TURBOC__) || defined(__BORLANDC__)\n#    if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))\n       /* Allow compilation with ANSI keywords only enabled */\n       void _Cdecl farfree( void *block );\n       void *_Cdecl farmalloc( unsigned long nbytes );\n#    else\n#     include <alloc.h>\n#    endif\n#  else /* MSC or DJGPP */\n#  endif\n#endif\n\n#ifdef OS2\n#  define OS_CODE  0x06\n#endif\n\n#ifdef WIN32 /* Window 95 & Windows NT */\n#  define OS_CODE  0x0b\n#endif\n\n#if defined(VAXC) || defined(VMS)\n#  define OS_CODE  0x02\n#  define F_OPEN(name, mode) \\\n     ft_fopen((name), (mode), \"mbc=60\", \"ctx=stm\", \"rfm=fix\", \"mrs=512\")\n#endif\n\n#ifdef AMIGA\n#  define OS_CODE  0x01\n#endif\n\n#if defined(ATARI) || defined(atarist)\n#  define OS_CODE  0x05\n#endif\n\n#if defined(MACOS) || defined(TARGET_OS_MAC)\n#  define OS_CODE  0x07\n#  if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os\n#    include <unix.h> /* for fdopen */\n#  else\n#    ifndef fdopen\n#      define fdopen(fd,mode) NULL /* No fdopen() */\n#    endif\n#  endif\n#endif\n\n#ifdef __50SERIES /* Prime/PRIMOS */\n#  define OS_CODE  0x0F\n#endif\n\n#ifdef TOPS20\n#  define OS_CODE  0x0a\n#endif\n\n#if defined(_BEOS_) || defined(RISCOS)\n#  define fdopen(fd,mode) NULL /* No fdopen() */\n#endif\n\n#if (defined(_MSC_VER) && (_MSC_VER > 600))\n#  define fdopen(fd,type)  _fdopen(fd,type)\n#endif\n\n\n        /* Common defaults */\n\n#ifndef OS_CODE\n#  define OS_CODE  0x03  /* assume Unix */\n#endif\n\n#ifndef F_OPEN\n#  define F_OPEN(name, mode) ft_fopen((name), (mode))\n#endif\n\n         /* functions */\n\n#ifdef HAVE_STRERROR\n   extern char *strerror OF((int));\n#  define zstrerror(errnum) strerror(errnum)\n#else\n#  define zstrerror(errnum) \"\"\n#endif\n\n#if defined(pyr)\n#  define NO_MEMCPY\n#endif\n#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)\n /* Use our own functions for small and medium model with MSC <= 5.0.\n  * You may have to use the same strategy for Borland C (untested).\n  * The __SC__ check is for Symantec.\n  */\n#  define NO_MEMCPY\n#endif\n#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)\n#  define HAVE_MEMCPY\n#endif\n#ifdef HAVE_MEMCPY\n#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */\n#    define zmemcpy _fmemcpy\n#    define zmemcmp _fmemcmp\n#    define zmemzero(dest, len) _fmemset(dest, 0, len)\n#  else\n#    define zmemcpy ft_memcpy\n#    define zmemcmp ft_memcmp\n#    define zmemzero(dest, len) ft_memset(dest, 0, len)\n#  endif\n#else\n   extern void zmemcpy  OF((Bytef* dest, const Bytef* source, uInt len));\n   extern int  zmemcmp  OF((const Bytef* s1, const Bytef* s2, uInt len));\n   extern void zmemzero OF((Bytef* dest, uInt len));\n#endif\n\n/* Diagnostic functions */\n#ifdef DEBUG\n#  include <stdio.h>\n   extern int z_verbose;\n   extern void z_error    OF((char *m));\n#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}\n#  define Trace(x) {if (z_verbose>=0) fprintf x ;}\n#  define Tracev(x) {if (z_verbose>0) fprintf x ;}\n#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}\n#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}\n#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}\n#else\n#  define Assert(cond,msg)\n#  define Trace(x)\n#  define Tracev(x)\n#  define Tracevv(x)\n#  define Tracec(c,x)\n#  define Tracecv(c,x)\n#endif\n\n\ntypedef uLong (*check_func) OF((uLong check, const Bytef *buf,\n                                uInt len));\nlocal voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));\nlocal void   zcfree  OF((voidpf opaque, voidpf ptr));\n\n#define ZALLOC(strm, items, size) \\\n           (*((strm)->zalloc))((strm)->opaque, (items), (size))\n#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))\n#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}\n\n#endif /* _Z_UTIL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/lzw/ftlzw.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftlzw.c                                                                */\n/*                                                                         */\n/*    FreeType support for .Z compressed files.                            */\n/*                                                                         */\n/*  This optional component relies on NetBSD's zopen().  It should mainly  */\n/*  be used to parse compressed PCF fonts, as found with many X11 server   */\n/*  distributions.                                                         */\n/*                                                                         */\n/*  Copyright 2004-2006, 2009, 2010, 2012-2014 by                          */\n/*  Albert Chin-A-Young.                                                   */\n/*                                                                         */\n/*  Based on code in src/gzip/ftgzip.c, Copyright 2004 by                  */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#include <ft2build.h>\n#include FT_INTERNAL_MEMORY_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_LZW_H\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  LZW_Err_\n#define FT_ERR_BASE    FT_Mod_Err_LZW\n\n#include FT_ERRORS_H\n\n\n#ifdef FT_CONFIG_OPTION_USE_LZW\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"lzw code does not support PIC yet\"\n#endif\n\n#include \"ftzopen.h\"\n\n\n/***************************************************************************/\n/***************************************************************************/\n/*****                                                                 *****/\n/*****                  M E M O R Y   M A N A G E M E N T              *****/\n/*****                                                                 *****/\n/***************************************************************************/\n/***************************************************************************/\n\n/***************************************************************************/\n/***************************************************************************/\n/*****                                                                 *****/\n/*****                   F I L E   D E S C R I P T O R                 *****/\n/*****                                                                 *****/\n/***************************************************************************/\n/***************************************************************************/\n\n#define FT_LZW_BUFFER_SIZE  4096\n\n  typedef struct  FT_LZWFileRec_\n  {\n    FT_Stream       source;         /* parent/source stream        */\n    FT_Stream       stream;         /* embedding stream            */\n    FT_Memory       memory;         /* memory allocator            */\n    FT_LzwStateRec  lzw;            /* lzw decompressor state      */\n\n    FT_Byte         buffer[FT_LZW_BUFFER_SIZE]; /* output buffer      */\n    FT_ULong        pos;                        /* position in output */\n    FT_Byte*        cursor;\n    FT_Byte*        limit;\n\n  } FT_LZWFileRec, *FT_LZWFile;\n\n\n  /* check and skip .Z header */\n  static FT_Error\n  ft_lzw_check_header( FT_Stream  stream )\n  {\n    FT_Error  error;\n    FT_Byte   head[2];\n\n\n    if ( FT_STREAM_SEEK( 0 )       ||\n         FT_STREAM_READ( head, 2 ) )\n      goto Exit;\n\n    /* head[0] && head[1] are the magic numbers */\n    if ( head[0] != 0x1F ||\n         head[1] != 0x9D )\n      error = FT_THROW( Invalid_File_Format );\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  ft_lzw_file_init( FT_LZWFile  zip,\n                    FT_Stream   stream,\n                    FT_Stream   source )\n  {\n    FT_LzwState  lzw   = &zip->lzw;\n    FT_Error     error;\n\n\n    zip->stream = stream;\n    zip->source = source;\n    zip->memory = stream->memory;\n\n    zip->limit  = zip->buffer + FT_LZW_BUFFER_SIZE;\n    zip->cursor = zip->limit;\n    zip->pos    = 0;\n\n    /* check and skip .Z header */\n    error = ft_lzw_check_header( source );\n    if ( error )\n      goto Exit;\n\n    /* initialize internal lzw variable */\n    ft_lzwstate_init( lzw, source );\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  ft_lzw_file_done( FT_LZWFile  zip )\n  {\n    /* clear the rest */\n    ft_lzwstate_done( &zip->lzw );\n\n    zip->memory = NULL;\n    zip->source = NULL;\n    zip->stream = NULL;\n  }\n\n\n  static FT_Error\n  ft_lzw_file_reset( FT_LZWFile  zip )\n  {\n    FT_Stream  stream = zip->source;\n    FT_Error   error;\n\n\n    if ( !FT_STREAM_SEEK( 0 ) )\n    {\n      ft_lzwstate_reset( &zip->lzw );\n\n      zip->limit  = zip->buffer + FT_LZW_BUFFER_SIZE;\n      zip->cursor = zip->limit;\n      zip->pos    = 0;\n    }\n\n    return error;\n  }\n\n\n  static FT_Error\n  ft_lzw_file_fill_output( FT_LZWFile  zip )\n  {\n    FT_LzwState  lzw = &zip->lzw;\n    FT_ULong     count;\n    FT_Error     error = FT_Err_Ok;\n\n\n    zip->cursor = zip->buffer;\n\n    count = ft_lzwstate_io( lzw, zip->buffer, FT_LZW_BUFFER_SIZE );\n\n    zip->limit = zip->cursor + count;\n\n    if ( count == 0 )\n      error = FT_THROW( Invalid_Stream_Operation );\n\n    return error;\n  }\n\n\n  /* fill output buffer; `count' must be <= FT_LZW_BUFFER_SIZE */\n  static FT_Error\n  ft_lzw_file_skip_output( FT_LZWFile  zip,\n                           FT_ULong    count )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    /* first, we skip what we can from the output buffer */\n    {\n      FT_ULong  delta = (FT_ULong)( zip->limit - zip->cursor );\n\n\n      if ( delta >= count )\n        delta = count;\n\n      zip->cursor += delta;\n      zip->pos    += delta;\n\n      count -= delta;\n    }\n\n    /* next, we skip as many bytes remaining as possible */\n    while ( count > 0 )\n    {\n      FT_ULong  delta = FT_LZW_BUFFER_SIZE;\n      FT_ULong  numread;\n\n\n      if ( delta > count )\n        delta = count;\n\n      numread = ft_lzwstate_io( &zip->lzw, NULL, delta );\n      if ( numread < delta )\n      {\n        /* not enough bytes */\n        error = FT_THROW( Invalid_Stream_Operation );\n        break;\n      }\n\n      zip->pos += delta;\n      count    -= delta;\n    }\n\n    return error;\n  }\n\n\n  static FT_ULong\n  ft_lzw_file_io( FT_LZWFile  zip,\n                  FT_ULong    pos,\n                  FT_Byte*    buffer,\n                  FT_ULong    count )\n  {\n    FT_ULong  result = 0;\n    FT_Error  error;\n\n\n    /* seeking backwards. */\n    if ( pos < zip->pos )\n    {\n      /* If the new position is within the output buffer, simply       */\n      /* decrement pointers, otherwise we reset the stream completely! */\n      if ( ( zip->pos - pos ) <= (FT_ULong)( zip->cursor - zip->buffer ) )\n      {\n        zip->cursor -= zip->pos - pos;\n        zip->pos     = pos;\n      }\n      else\n      {\n        error = ft_lzw_file_reset( zip );\n        if ( error )\n          goto Exit;\n      }\n    }\n\n    /* skip unwanted bytes */\n    if ( pos > zip->pos )\n    {\n      error = ft_lzw_file_skip_output( zip, (FT_ULong)( pos - zip->pos ) );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( count == 0 )\n      goto Exit;\n\n    /* now read the data */\n    for (;;)\n    {\n      FT_ULong  delta;\n\n\n      delta = (FT_ULong)( zip->limit - zip->cursor );\n      if ( delta >= count )\n        delta = count;\n\n      FT_MEM_COPY( buffer + result, zip->cursor, delta );\n      result      += delta;\n      zip->cursor += delta;\n      zip->pos    += delta;\n\n      count -= delta;\n      if ( count == 0 )\n        break;\n\n      error = ft_lzw_file_fill_output( zip );\n      if ( error )\n        break;\n    }\n\n  Exit:\n    return result;\n  }\n\n\n/***************************************************************************/\n/***************************************************************************/\n/*****                                                                 *****/\n/*****            L Z W   E M B E D D I N G   S T R E A M              *****/\n/*****                                                                 *****/\n/***************************************************************************/\n/***************************************************************************/\n\n  static void\n  ft_lzw_stream_close( FT_Stream  stream )\n  {\n    FT_LZWFile  zip    = (FT_LZWFile)stream->descriptor.pointer;\n    FT_Memory   memory = stream->memory;\n\n\n    if ( zip )\n    {\n      /* finalize lzw file descriptor */\n      ft_lzw_file_done( zip );\n\n      FT_FREE( zip );\n\n      stream->descriptor.pointer = NULL;\n    }\n  }\n\n\n  static FT_ULong\n  ft_lzw_stream_io( FT_Stream  stream,\n                    FT_ULong   pos,\n                    FT_Byte*   buffer,\n                    FT_ULong   count )\n  {\n    FT_LZWFile  zip = (FT_LZWFile)stream->descriptor.pointer;\n\n\n    return ft_lzw_file_io( zip, pos, buffer, count );\n  }\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stream_OpenLZW( FT_Stream  stream,\n                     FT_Stream  source )\n  {\n    FT_Error    error;\n    FT_Memory   memory;\n    FT_LZWFile  zip = NULL;\n\n\n    if ( !stream || !source )\n    {\n      error = FT_THROW( Invalid_Stream_Handle );\n      goto Exit;\n    }\n\n    memory = source->memory;\n\n    /*\n     *  Check the header right now; this prevents allocation of a huge\n     *  LZWFile object (400 KByte of heap memory) if not necessary.\n     *\n     *  Did I mention that you should never use .Z compressed font\n     *  files?\n     */\n    error = ft_lzw_check_header( source );\n    if ( error )\n      goto Exit;\n\n    FT_ZERO( stream );\n    stream->memory = memory;\n\n    if ( !FT_NEW( zip ) )\n    {\n      error = ft_lzw_file_init( zip, stream, source );\n      if ( error )\n      {\n        FT_FREE( zip );\n        goto Exit;\n      }\n\n      stream->descriptor.pointer = zip;\n    }\n\n    stream->size  = 0x7FFFFFFFL;  /* don't know the real size! */\n    stream->pos   = 0;\n    stream->base  = 0;\n    stream->read  = ft_lzw_stream_io;\n    stream->close = ft_lzw_stream_close;\n\n  Exit:\n    return error;\n  }\n\n\n#include \"ftzopen.c\"\n\n\n#else  /* !FT_CONFIG_OPTION_USE_LZW */\n\n\n  FT_EXPORT_DEF( FT_Error )\n  FT_Stream_OpenLZW( FT_Stream  stream,\n                     FT_Stream  source )\n  {\n    FT_UNUSED( stream );\n    FT_UNUSED( source );\n\n    return FT_THROW( Unimplemented_Feature );\n  }\n\n\n#endif /* !FT_CONFIG_OPTION_USE_LZW */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/lzw/ftzopen.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftzopen.c                                                              */\n/*                                                                         */\n/*    FreeType support for .Z compressed files.                            */\n/*                                                                         */\n/*  This optional component relies on NetBSD's zopen().  It should mainly  */\n/*  be used to parse compressed PCF fonts, as found with many X11 server   */\n/*  distributions.                                                         */\n/*                                                                         */\n/*  Copyright 2005-2007, 2009, 2011 by David Turner.                       */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#include \"ftzopen.h\"\n#include FT_INTERNAL_MEMORY_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_DEBUG_H\n\n\n  static int\n  ft_lzwstate_refill( FT_LzwState  state )\n  {\n    FT_ULong  count;\n\n\n    if ( state->in_eof )\n      return -1;\n\n    count = FT_Stream_TryRead( state->source,\n                               state->buf_tab,\n                               state->num_bits );  /* WHY? */\n\n    state->buf_size   = (FT_UInt)count;\n    state->buf_total += count;\n    state->in_eof     = FT_BOOL( count < state->num_bits );\n    state->buf_offset = 0;\n    state->buf_size   = ( state->buf_size << 3 ) - ( state->num_bits - 1 );\n\n    if ( count == 0 )  /* end of file */\n      return -1;\n\n    return 0;\n  }\n\n\n  static FT_Int32\n  ft_lzwstate_get_code( FT_LzwState  state )\n  {\n    FT_UInt   num_bits = state->num_bits;\n    FT_Int    offset   = state->buf_offset;\n    FT_Byte*  p;\n    FT_Int    result;\n\n\n    if ( state->buf_clear                    ||\n         offset >= state->buf_size           ||\n         state->free_ent >= state->free_bits )\n    {\n      if ( state->free_ent >= state->free_bits )\n      {\n        state->num_bits  = ++num_bits;\n        state->free_bits = state->num_bits < state->max_bits\n                           ? (FT_UInt)( ( 1UL << num_bits ) - 256 )\n                           : state->max_free + 1;\n      }\n\n      if ( state->buf_clear )\n      {\n        state->num_bits  = num_bits = LZW_INIT_BITS;\n        state->free_bits = (FT_UInt)( ( 1UL << num_bits ) - 256 );\n        state->buf_clear = 0;\n      }\n\n      if ( ft_lzwstate_refill( state ) < 0 )\n        return -1;\n\n      offset = 0;\n    }\n\n    state->buf_offset = offset + num_bits;\n\n    p         = &state->buf_tab[offset >> 3];\n    offset   &= 7;\n    result    = *p++ >> offset;\n    offset    = 8 - offset;\n    num_bits -= offset;\n\n    if ( num_bits >= 8 )\n    {\n      result   |= *p++ << offset;\n      offset   += 8;\n      num_bits -= 8;\n    }\n    if ( num_bits > 0 )\n      result |= ( *p & LZW_MASK( num_bits ) ) << offset;\n\n    return result;\n  }\n\n\n  /* grow the character stack */\n  static int\n  ft_lzwstate_stack_grow( FT_LzwState  state )\n  {\n    if ( state->stack_top >= state->stack_size )\n    {\n      FT_Memory  memory = state->memory;\n      FT_Error   error;\n      FT_Offset  old_size = state->stack_size;\n      FT_Offset  new_size = old_size;\n\n      new_size = new_size + ( new_size >> 1 ) + 4;\n\n      if ( state->stack == state->stack_0 )\n      {\n        state->stack = NULL;\n        old_size     = 0;\n      }\n\n      /* requirement of the character stack larger than 1<<LZW_MAX_BITS */\n      /* implies bug in the decompression code                          */\n      if ( new_size > ( 1 << LZW_MAX_BITS ) )\n      {\n        new_size = 1 << LZW_MAX_BITS;\n        if ( new_size == old_size )\n          return -1;\n      }\n\n      if ( FT_RENEW_ARRAY( state->stack, old_size, new_size ) )\n        return -1;\n\n      state->stack_size = new_size;\n    }\n    return 0;\n  }\n\n\n  /* grow the prefix/suffix arrays */\n  static int\n  ft_lzwstate_prefix_grow( FT_LzwState  state )\n  {\n    FT_UInt    old_size = state->prefix_size;\n    FT_UInt    new_size = old_size;\n    FT_Memory  memory   = state->memory;\n    FT_Error   error;\n\n\n    if ( new_size == 0 )  /* first allocation -> 9 bits */\n      new_size = 512;\n    else\n      new_size += new_size >> 2;  /* don't grow too fast */\n\n    /*\n     *  Note that the `suffix' array is located in the same memory block\n     *  pointed to by `prefix'.\n     *\n     *  I know that sizeof(FT_Byte) == 1 by definition, but it is clearer\n     *  to write it literally.\n     *\n     */\n    if ( FT_REALLOC_MULT( state->prefix, old_size, new_size,\n                          sizeof ( FT_UShort ) + sizeof ( FT_Byte ) ) )\n      return -1;\n\n    /* now adjust `suffix' and move the data accordingly */\n    state->suffix = (FT_Byte*)( state->prefix + new_size );\n\n    FT_MEM_MOVE( state->suffix,\n                 state->prefix + old_size,\n                 old_size * sizeof ( FT_Byte ) );\n\n    state->prefix_size = new_size;\n    return 0;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  ft_lzwstate_reset( FT_LzwState  state )\n  {\n    state->in_eof     = 0;\n    state->buf_offset = 0;\n    state->buf_size   = 0;\n    state->buf_clear  = 0;\n    state->buf_total  = 0;\n    state->stack_top  = 0;\n    state->num_bits   = LZW_INIT_BITS;\n    state->phase      = FT_LZW_PHASE_START;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  ft_lzwstate_init( FT_LzwState  state,\n                    FT_Stream    source )\n  {\n    FT_ZERO( state );\n\n    state->source = source;\n    state->memory = source->memory;\n\n    state->prefix      = NULL;\n    state->suffix      = NULL;\n    state->prefix_size = 0;\n\n    state->stack      = state->stack_0;\n    state->stack_size = sizeof ( state->stack_0 );\n\n    ft_lzwstate_reset( state );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  ft_lzwstate_done( FT_LzwState  state )\n  {\n    FT_Memory  memory = state->memory;\n\n\n    ft_lzwstate_reset( state );\n\n    if ( state->stack != state->stack_0 )\n      FT_FREE( state->stack );\n\n    FT_FREE( state->prefix );\n    state->suffix = NULL;\n\n    FT_ZERO( state );\n  }\n\n\n#define FTLZW_STACK_PUSH( c )                        \\\n  FT_BEGIN_STMNT                                     \\\n    if ( state->stack_top >= state->stack_size &&    \\\n         ft_lzwstate_stack_grow( state ) < 0   )     \\\n      goto Eof;                                      \\\n                                                     \\\n    state->stack[state->stack_top++] = (FT_Byte)(c); \\\n  FT_END_STMNT\n\n\n  FT_LOCAL_DEF( FT_ULong )\n  ft_lzwstate_io( FT_LzwState  state,\n                  FT_Byte*     buffer,\n                  FT_ULong     out_size )\n  {\n    FT_ULong  result = 0;\n\n    FT_UInt  old_char = state->old_char;\n    FT_UInt  old_code = state->old_code;\n    FT_UInt  in_code  = state->in_code;\n\n\n    if ( out_size == 0 )\n      goto Exit;\n\n    switch ( state->phase )\n    {\n    case FT_LZW_PHASE_START:\n      {\n        FT_Byte   max_bits;\n        FT_Int32  c;\n\n\n        /* skip magic bytes, and read max_bits + block_flag */\n        if ( FT_Stream_Seek( state->source, 2 ) != 0               ||\n             FT_Stream_TryRead( state->source, &max_bits, 1 ) != 1 )\n          goto Eof;\n\n        state->max_bits   = max_bits & LZW_BIT_MASK;\n        state->block_mode = max_bits & LZW_BLOCK_MASK;\n        state->max_free   = (FT_UInt)( ( 1UL << state->max_bits ) - 256 );\n\n        if ( state->max_bits > LZW_MAX_BITS )\n          goto Eof;\n\n        state->num_bits = LZW_INIT_BITS;\n        state->free_ent = ( state->block_mode ? LZW_FIRST\n                                              : LZW_CLEAR ) - 256;\n        in_code  = 0;\n\n        state->free_bits = state->num_bits < state->max_bits\n                           ? (FT_UInt)( ( 1UL << state->num_bits ) - 256 )\n                           : state->max_free + 1;\n\n        c = ft_lzwstate_get_code( state );\n        if ( c < 0 || c > 255 )\n          goto Eof;\n\n        old_code = old_char = (FT_UInt)c;\n\n        if ( buffer )\n          buffer[result] = (FT_Byte)old_char;\n\n        if ( ++result >= out_size )\n          goto Exit;\n\n        state->phase = FT_LZW_PHASE_CODE;\n      }\n      /* fall-through */\n\n    case FT_LZW_PHASE_CODE:\n      {\n        FT_Int32  c;\n        FT_UInt   code;\n\n\n      NextCode:\n        c = ft_lzwstate_get_code( state );\n        if ( c < 0 )\n          goto Eof;\n\n        code = (FT_UInt)c;\n\n        if ( code == LZW_CLEAR && state->block_mode )\n        {\n          /* why not LZW_FIRST-256 ? */\n          state->free_ent  = ( LZW_FIRST - 1 ) - 256;\n          state->buf_clear = 1;\n\n          /* not quite right, but at least more predictable */\n          old_code = 0;\n          old_char = 0;\n\n          goto NextCode;\n        }\n\n        in_code = code; /* save code for later */\n\n        if ( code >= 256U )\n        {\n          /* special case for KwKwKwK */\n          if ( code - 256U >= state->free_ent )\n          {\n            /* corrupted LZW stream */\n            if ( code - 256U > state->free_ent )\n              goto Eof;\n\n            FTLZW_STACK_PUSH( old_char );\n            code = old_code;\n          }\n\n          while ( code >= 256U )\n          {\n            if ( !state->prefix )\n              goto Eof;\n\n            FTLZW_STACK_PUSH( state->suffix[code - 256] );\n            code = state->prefix[code - 256];\n          }\n        }\n\n        old_char = code;\n        FTLZW_STACK_PUSH( old_char );\n\n        state->phase = FT_LZW_PHASE_STACK;\n      }\n      /* fall-through */\n\n    case FT_LZW_PHASE_STACK:\n      {\n        while ( state->stack_top > 0 )\n        {\n          --state->stack_top;\n\n          if ( buffer )\n            buffer[result] = state->stack[state->stack_top];\n\n          if ( ++result == out_size )\n            goto Exit;\n        }\n\n        /* now create new entry */\n        if ( state->free_ent < state->max_free )\n        {\n          if ( state->free_ent >= state->prefix_size &&\n               ft_lzwstate_prefix_grow( state ) < 0  )\n            goto Eof;\n\n          FT_ASSERT( state->free_ent < state->prefix_size );\n\n          state->prefix[state->free_ent] = (FT_UShort)old_code;\n          state->suffix[state->free_ent] = (FT_Byte)  old_char;\n\n          state->free_ent += 1;\n        }\n\n        old_code = in_code;\n\n        state->phase = FT_LZW_PHASE_CODE;\n        goto NextCode;\n      }\n\n    default:  /* state == EOF */\n      ;\n    }\n\n  Exit:\n    state->old_code = old_code;\n    state->old_char = old_char;\n    state->in_code  = in_code;\n\n    return result;\n\n  Eof:\n    state->phase = FT_LZW_PHASE_EOF;\n    goto Exit;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/lzw/ftzopen.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftzopen.h                                                              */\n/*                                                                         */\n/*    FreeType support for .Z compressed files.                            */\n/*                                                                         */\n/*  This optional component relies on NetBSD's zopen().  It should mainly  */\n/*  be used to parse compressed PCF fonts, as found with many X11 server   */\n/*  distributions.                                                         */\n/*                                                                         */\n/*  Copyright 2005, 2006, 2007, 2008 by David Turner.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#ifndef __FT_ZOPEN_H__\n#define __FT_ZOPEN_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n\n  /*\n   *  This is a complete re-implementation of the LZW file reader,\n   *  since the old one was incredibly badly written, using\n   *  400 KByte of heap memory before decompressing anything.\n   *\n   */\n\n#define FT_LZW_IN_BUFF_SIZE        64\n#define FT_LZW_DEFAULT_STACK_SIZE  64\n\n#define LZW_INIT_BITS     9\n#define LZW_MAX_BITS      16\n\n#define LZW_CLEAR         256\n#define LZW_FIRST         257\n\n#define LZW_BIT_MASK      0x1F\n#define LZW_BLOCK_MASK    0x80\n#define LZW_MASK( n )     ( ( 1U << (n) ) - 1U )\n\n\n  typedef enum  FT_LzwPhase_\n  {\n    FT_LZW_PHASE_START = 0,\n    FT_LZW_PHASE_CODE,\n    FT_LZW_PHASE_STACK,\n    FT_LZW_PHASE_EOF\n\n  } FT_LzwPhase;\n\n\n  /*\n   *  state of LZW decompressor\n   *\n   *  small technical note\n   *  --------------------\n   *\n   *  We use a few tricks in this implementation that are explained here to\n   *  ease debugging and maintenance.\n   *\n   *  - First of all, the `prefix' and `suffix' arrays contain the suffix\n   *    and prefix for codes over 256; this means that\n   *\n   *      prefix_of(code) == state->prefix[code-256]\n   *      suffix_of(code) == state->suffix[code-256]\n   *\n   *    Each prefix is a 16-bit code, and each suffix an 8-bit byte.\n   *\n   *    Both arrays are stored in a single memory block, pointed to by\n   *    `state->prefix'.  This means that the following equality is always\n   *    true:\n   *\n   *      state->suffix == (FT_Byte*)(state->prefix + state->prefix_size)\n   *\n   *    Of course, state->prefix_size is the number of prefix/suffix slots\n   *    in the arrays, corresponding to codes 256..255+prefix_size.\n   *\n   *  - `free_ent' is the index of the next free entry in the `prefix'\n   *    and `suffix' arrays.  This means that the corresponding `next free\n   *    code' is really `256+free_ent'.\n   *\n   *    Moreover, `max_free' is the maximum value that `free_ent' can reach.\n   *\n   *    `max_free' corresponds to `(1 << max_bits) - 256'.  Note that this\n   *    value is always <= 0xFF00, which means that both `free_ent' and\n   *    `max_free' can be stored in an FT_UInt variable, even on 16-bit\n   *    machines.\n   *\n   *    If `free_ent == max_free', you cannot add new codes to the\n   *    prefix/suffix table.\n   *\n   *  - `num_bits' is the current number of code bits, starting at 9 and\n   *    growing each time `free_ent' reaches the value of `free_bits'.  The\n   *    latter is computed as follows\n   *\n   *      if num_bits < max_bits:\n   *         free_bits = (1 << num_bits)-256\n   *      else:\n   *         free_bits = max_free + 1\n   *\n   *    Since the value of `max_free + 1' can never be reached by\n   *    `free_ent', `num_bits' cannot grow larger than `max_bits'.\n   */\n\n  typedef struct  FT_LzwStateRec_\n  {\n    FT_LzwPhase  phase;\n    FT_Int       in_eof;\n\n    FT_Byte      buf_tab[16];\n    FT_Int       buf_offset;\n    FT_Int       buf_size;\n    FT_Bool      buf_clear;\n    FT_Offset    buf_total;\n\n    FT_UInt      max_bits;    /* max code bits, from file header   */\n    FT_Int       block_mode;  /* block mode flag, from file header */\n    FT_UInt      max_free;    /* (1 << max_bits) - 256             */\n\n    FT_UInt      num_bits;    /* current code bit number */\n    FT_UInt      free_ent;    /* index of next free entry */\n    FT_UInt      free_bits;   /* if reached by free_ent, increment num_bits */\n    FT_UInt      old_code;\n    FT_UInt      old_char;\n    FT_UInt      in_code;\n\n    FT_UShort*   prefix;      /* always dynamically allocated / reallocated */\n    FT_Byte*     suffix;      /* suffix = (FT_Byte*)(prefix + prefix_size)  */\n    FT_UInt      prefix_size; /* number of slots in `prefix' or `suffix'    */\n\n    FT_Byte*     stack;       /* character stack */\n    FT_UInt      stack_top;\n    FT_Offset    stack_size;\n    FT_Byte      stack_0[FT_LZW_DEFAULT_STACK_SIZE]; /* minimize heap alloc */\n\n    FT_Stream    source;      /* source stream */\n    FT_Memory    memory;\n\n  } FT_LzwStateRec, *FT_LzwState;\n\n\n  FT_LOCAL( void )\n  ft_lzwstate_init( FT_LzwState  state,\n                    FT_Stream    source );\n\n  FT_LOCAL( void )\n  ft_lzwstate_done( FT_LzwState  state );\n\n\n  FT_LOCAL( void )\n  ft_lzwstate_reset( FT_LzwState  state );\n\n\n  FT_LOCAL( FT_ULong )\n  ft_lzwstate_io( FT_LzwState  state,\n                  FT_Byte*     buffer,\n                  FT_ULong     out_size );\n\n/* */\n\n#endif /* __FT_ZOPEN_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvalid.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvalid.c                                                              */\n/*                                                                         */\n/*    FreeType validator for OpenType tables (body only).                  */\n/*                                                                         */\n/*  Copyright 2004, 2007 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n\n#include \"otvbase.c\"\n#include \"otvcommn.c\"\n#include \"otvgdef.c\"\n#include \"otvgpos.c\"\n#include \"otvgsub.c\"\n#include \"otvjstf.c\"\n#include \"otvmath.c\"\n#include \"otvmod.c\"\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvalid.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvalid.h                                                              */\n/*                                                                         */\n/*    OpenType table validation (specification only).                      */\n/*                                                                         */\n/*  Copyright 2004, 2008 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __OTVALID_H__\n#define __OTVALID_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#include \"otverror.h\"           /* must come before FT_INTERNAL_VALIDATE_H */\n\n#include FT_INTERNAL_VALIDATE_H\n#include FT_INTERNAL_STREAM_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( void )\n  otv_BASE_validate( FT_Bytes      table,\n                     FT_Validator  valid );\n\n  /* GSUB and GPOS tables should already be validated; */\n  /* if missing, set corresponding argument to 0       */\n  FT_LOCAL( void )\n  otv_GDEF_validate( FT_Bytes      table,\n                     FT_Bytes      gsub,\n                     FT_Bytes      gpos,\n                     FT_UInt       glyph_count,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  otv_GPOS_validate( FT_Bytes      table,\n                     FT_UInt       glyph_count,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  otv_GSUB_validate( FT_Bytes      table,\n                     FT_UInt       glyph_count,\n                     FT_Validator  valid );\n\n  /* GSUB and GPOS tables should already be validated; */\n  /* if missing, set corresponding argument to 0       */\n  FT_LOCAL( void )\n  otv_JSTF_validate( FT_Bytes      table,\n                     FT_Bytes      gsub,\n                     FT_Bytes      gpos,\n                     FT_UInt       glyph_count,\n                     FT_Validator  valid );\n\n  FT_LOCAL( void )\n  otv_MATH_validate( FT_Bytes      table,\n                     FT_UInt       glyph_count,\n                     FT_Validator  ftvalid );\n\n\nFT_END_HEADER\n\n#endif /* __OTVALID_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvbase.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvbase.c                                                              */\n/*                                                                         */\n/*    OpenType BASE table validation (body).                               */\n/*                                                                         */\n/*  Copyright 2004, 2007 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"otvalid.h\"\n#include \"otvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_otvbase\n\n\n  static void\n  otv_BaseCoord_validate( FT_Bytes       table,\n                          OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   BaseCoordFormat;\n\n\n    OTV_NAME_ENTER( \"BaseCoord\" );\n\n    OTV_LIMIT_CHECK( 4 );\n    BaseCoordFormat = FT_NEXT_USHORT( p );\n    p += 2;     /* skip Coordinate */\n\n    OTV_TRACE(( \" (format %d)\\n\", BaseCoordFormat ));\n\n    switch ( BaseCoordFormat )\n    {\n    case 1:     /* BaseCoordFormat1 */\n      break;\n\n    case 2:     /* BaseCoordFormat2 */\n      OTV_LIMIT_CHECK( 4 );   /* ReferenceGlyph, BaseCoordPoint */\n      break;\n\n    case 3:     /* BaseCoordFormat3 */\n      OTV_LIMIT_CHECK( 2 );\n      /* DeviceTable */\n      otv_Device_validate( table + FT_NEXT_USHORT( p ), otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  static void\n  otv_BaseTagList_validate( FT_Bytes       table,\n                            OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   BaseTagCount;\n\n\n    OTV_NAME_ENTER( \"BaseTagList\" );\n\n    OTV_LIMIT_CHECK( 2 );\n\n    BaseTagCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (BaseTagCount = %d)\\n\", BaseTagCount ));\n\n    OTV_LIMIT_CHECK( BaseTagCount * 4 );          /* BaselineTag */\n\n    OTV_EXIT;\n  }\n\n\n  static void\n  otv_BaseValues_validate( FT_Bytes       table,\n                           OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   BaseCoordCount;\n\n\n    OTV_NAME_ENTER( \"BaseValues\" );\n\n    OTV_LIMIT_CHECK( 4 );\n\n    p             += 2;                     /* skip DefaultIndex */\n    BaseCoordCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (BaseCoordCount = %d)\\n\", BaseCoordCount ));\n\n    OTV_LIMIT_CHECK( BaseCoordCount * 2 );\n\n    /* BaseCoord */\n    for ( ; BaseCoordCount > 0; BaseCoordCount-- )\n      otv_BaseCoord_validate( table + FT_NEXT_USHORT( p ), otvalid );\n\n    OTV_EXIT;\n  }\n\n\n  static void\n  otv_MinMax_validate( FT_Bytes       table,\n                       OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   table_size;\n    FT_UInt   FeatMinMaxCount;\n\n    OTV_OPTIONAL_TABLE( MinCoord );\n    OTV_OPTIONAL_TABLE( MaxCoord );\n\n\n    OTV_NAME_ENTER( \"MinMax\" );\n\n    OTV_LIMIT_CHECK( 6 );\n\n    OTV_OPTIONAL_OFFSET( MinCoord );\n    OTV_OPTIONAL_OFFSET( MaxCoord );\n    FeatMinMaxCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (FeatMinMaxCount = %d)\\n\", FeatMinMaxCount ));\n\n    table_size = FeatMinMaxCount * 8 + 6;\n\n    OTV_SIZE_CHECK( MinCoord );\n    if ( MinCoord )\n      otv_BaseCoord_validate( table + MinCoord, otvalid );\n\n    OTV_SIZE_CHECK( MaxCoord );\n    if ( MaxCoord )\n      otv_BaseCoord_validate( table + MaxCoord, otvalid );\n\n    OTV_LIMIT_CHECK( FeatMinMaxCount * 8 );\n\n    /* FeatMinMaxRecord */\n    for ( ; FeatMinMaxCount > 0; FeatMinMaxCount-- )\n    {\n      p += 4;                           /* skip FeatureTableTag */\n\n      OTV_OPTIONAL_OFFSET( MinCoord );\n      OTV_OPTIONAL_OFFSET( MaxCoord );\n\n      OTV_SIZE_CHECK( MinCoord );\n      if ( MinCoord )\n        otv_BaseCoord_validate( table + MinCoord, otvalid );\n\n      OTV_SIZE_CHECK( MaxCoord );\n      if ( MaxCoord )\n        otv_BaseCoord_validate( table + MaxCoord, otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  static void\n  otv_BaseScript_validate( FT_Bytes       table,\n                           OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   table_size;\n    FT_UInt   BaseLangSysCount;\n\n    OTV_OPTIONAL_TABLE( BaseValues    );\n    OTV_OPTIONAL_TABLE( DefaultMinMax );\n\n\n    OTV_NAME_ENTER( \"BaseScript\" );\n\n    OTV_LIMIT_CHECK( 6 );\n    OTV_OPTIONAL_OFFSET( BaseValues    );\n    OTV_OPTIONAL_OFFSET( DefaultMinMax );\n    BaseLangSysCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (BaseLangSysCount = %d)\\n\", BaseLangSysCount ));\n\n    table_size = BaseLangSysCount * 6 + 6;\n\n    OTV_SIZE_CHECK( BaseValues );\n    if ( BaseValues )\n      otv_BaseValues_validate( table + BaseValues, otvalid );\n\n    OTV_SIZE_CHECK( DefaultMinMax );\n    if ( DefaultMinMax )\n      otv_MinMax_validate( table + DefaultMinMax, otvalid );\n\n    OTV_LIMIT_CHECK( BaseLangSysCount * 6 );\n\n    /* BaseLangSysRecord */\n    for ( ; BaseLangSysCount > 0; BaseLangSysCount-- )\n    {\n      p += 4;       /* skip BaseLangSysTag */\n\n      otv_MinMax_validate( table + FT_NEXT_USHORT( p ), otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  static void\n  otv_BaseScriptList_validate( FT_Bytes       table,\n                               OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   BaseScriptCount;\n\n\n    OTV_NAME_ENTER( \"BaseScriptList\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    BaseScriptCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (BaseScriptCount = %d)\\n\", BaseScriptCount ));\n\n    OTV_LIMIT_CHECK( BaseScriptCount * 6 );\n\n    /* BaseScriptRecord */\n    for ( ; BaseScriptCount > 0; BaseScriptCount-- )\n    {\n      p += 4;       /* skip BaseScriptTag */\n\n      /* BaseScript */\n      otv_BaseScript_validate( table + FT_NEXT_USHORT( p ), otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  static void\n  otv_Axis_validate( FT_Bytes       table,\n                     OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   table_size;\n\n    OTV_OPTIONAL_TABLE( BaseTagList );\n\n\n    OTV_NAME_ENTER( \"Axis\" );\n\n    OTV_LIMIT_CHECK( 4 );\n    OTV_OPTIONAL_OFFSET( BaseTagList );\n\n    table_size = 4;\n\n    OTV_SIZE_CHECK( BaseTagList );\n    if ( BaseTagList )\n      otv_BaseTagList_validate( table + BaseTagList, otvalid );\n\n    /* BaseScriptList */\n    otv_BaseScriptList_validate( table + FT_NEXT_USHORT( p ), otvalid );\n\n    OTV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  otv_BASE_validate( FT_Bytes      table,\n                     FT_Validator  ftvalid )\n  {\n    OTV_ValidatorRec  otvalidrec;\n    OTV_Validator     otvalid = &otvalidrec;\n    FT_Bytes          p       = table;\n    FT_UInt           table_size;\n\n    OTV_OPTIONAL_TABLE( HorizAxis );\n    OTV_OPTIONAL_TABLE( VertAxis  );\n\n\n    otvalid->root = ftvalid;\n\n    FT_TRACE3(( \"validating BASE table\\n\" ));\n    OTV_INIT;\n\n    OTV_LIMIT_CHECK( 6 );\n\n    if ( FT_NEXT_ULONG( p ) != 0x10000UL )      /* Version */\n      FT_INVALID_FORMAT;\n\n    table_size = 6;\n\n    OTV_OPTIONAL_OFFSET( HorizAxis );\n    OTV_SIZE_CHECK( HorizAxis );\n    if ( HorizAxis )\n      otv_Axis_validate( table + HorizAxis, otvalid );\n\n    OTV_OPTIONAL_OFFSET( VertAxis );\n    OTV_SIZE_CHECK( VertAxis );\n    if ( VertAxis )\n      otv_Axis_validate( table + VertAxis, otvalid );\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvcommn.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvcommn.c                                                             */\n/*                                                                         */\n/*    OpenType common tables validation (body).                            */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2006, 2007 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"otvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_otvcommon\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       COVERAGE TABLE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  otv_Coverage_validate( FT_Bytes       table,\n                         OTV_Validator  otvalid,\n                         FT_Int         expected_count )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   CoverageFormat;\n    FT_UInt   total = 0;\n\n\n    OTV_NAME_ENTER( \"Coverage\" );\n\n    OTV_LIMIT_CHECK( 4 );\n    CoverageFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", CoverageFormat ));\n\n    switch ( CoverageFormat )\n    {\n    case 1:     /* CoverageFormat1 */\n      {\n        FT_UInt  GlyphCount;\n        FT_UInt  i;\n\n\n        GlyphCount = FT_NEXT_USHORT( p );\n\n        OTV_TRACE(( \" (GlyphCount = %d)\\n\", GlyphCount ));\n\n        OTV_LIMIT_CHECK( GlyphCount * 2 );        /* GlyphArray */\n\n        for ( i = 0; i < GlyphCount; ++i )\n        {\n          FT_UInt  gid;\n\n\n          gid = FT_NEXT_USHORT( p );\n          if ( gid >= otvalid->glyph_count )\n            FT_INVALID_GLYPH_ID;\n        }\n\n        total = GlyphCount;\n      }\n      break;\n\n    case 2:     /* CoverageFormat2 */\n      {\n        FT_UInt  n, RangeCount;\n        FT_UInt  Start, End, StartCoverageIndex, last = 0;\n\n\n        RangeCount = FT_NEXT_USHORT( p );\n\n        OTV_TRACE(( \" (RangeCount = %d)\\n\", RangeCount ));\n\n        OTV_LIMIT_CHECK( RangeCount * 6 );\n\n        /* RangeRecord */\n        for ( n = 0; n < RangeCount; n++ )\n        {\n          Start              = FT_NEXT_USHORT( p );\n          End                = FT_NEXT_USHORT( p );\n          StartCoverageIndex = FT_NEXT_USHORT( p );\n\n          if ( Start > End || StartCoverageIndex != total )\n            FT_INVALID_DATA;\n\n          if ( End >= otvalid->glyph_count )\n            FT_INVALID_GLYPH_ID;\n\n          if ( n > 0 && Start <= last )\n            FT_INVALID_DATA;\n\n          total += End - Start + 1;\n          last   = End;\n        }\n      }\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    /* Generally, a coverage table offset has an associated count field.  */\n    /* The number of glyphs in the table should match this field.  If     */\n    /* there is no associated count, a value of -1 tells us not to check. */\n    if ( expected_count != -1 && (FT_UInt)expected_count != total )\n      FT_INVALID_DATA;\n\n    OTV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  otv_Coverage_get_first( FT_Bytes  table )\n  {\n    FT_Bytes  p = table;\n\n\n    p += 4;     /* skip CoverageFormat and Glyph/RangeCount */\n\n    return FT_NEXT_USHORT( p );\n  }\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  otv_Coverage_get_last( FT_Bytes  table )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   CoverageFormat = FT_NEXT_USHORT( p );\n    FT_UInt   count          = FT_NEXT_USHORT( p );     /* Glyph/RangeCount */\n    FT_UInt   result = 0;\n\n\n    switch ( CoverageFormat )\n    {\n    case 1:\n      p += ( count - 1 ) * 2;\n      result = FT_NEXT_USHORT( p );\n      break;\n\n    case 2:\n      p += ( count - 1 ) * 6 + 2;\n      result = FT_NEXT_USHORT( p );\n      break;\n\n    default:\n      ;\n    }\n\n    return result;\n  }\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  otv_Coverage_get_count( FT_Bytes  table )\n  {\n    FT_Bytes  p              = table;\n    FT_UInt   CoverageFormat = FT_NEXT_USHORT( p );\n    FT_UInt   count          = FT_NEXT_USHORT( p );     /* Glyph/RangeCount */\n    FT_UInt   result         = 0;\n\n\n    switch ( CoverageFormat )\n    {\n    case 1:\n      return count;\n\n    case 2:\n      {\n        FT_UInt  Start, End;\n\n\n        for ( ; count > 0; count-- )\n        {\n          Start = FT_NEXT_USHORT( p );\n          End   = FT_NEXT_USHORT( p );\n          p    += 2;                    /* skip StartCoverageIndex */\n\n          result += End - Start + 1;\n        }\n      }\n      break;\n\n    default:\n      ;\n    }\n\n    return result;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                   CLASS DEFINITION TABLE                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  otv_ClassDef_validate( FT_Bytes       table,\n                         OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   ClassFormat;\n\n\n    OTV_NAME_ENTER( \"ClassDef\" );\n\n    OTV_LIMIT_CHECK( 4 );\n    ClassFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", ClassFormat ));\n\n    switch ( ClassFormat )\n    {\n    case 1:     /* ClassDefFormat1 */\n      {\n        FT_UInt  StartGlyph;\n        FT_UInt  GlyphCount;\n\n\n        OTV_LIMIT_CHECK( 4 );\n\n        StartGlyph = FT_NEXT_USHORT( p );\n        GlyphCount = FT_NEXT_USHORT( p );\n\n        OTV_TRACE(( \" (GlyphCount = %d)\\n\", GlyphCount ));\n\n        OTV_LIMIT_CHECK( GlyphCount * 2 );    /* ClassValueArray */\n\n        if ( StartGlyph + GlyphCount - 1 >= otvalid->glyph_count )\n          FT_INVALID_GLYPH_ID;\n      }\n      break;\n\n    case 2:     /* ClassDefFormat2 */\n      {\n        FT_UInt  n, ClassRangeCount;\n        FT_UInt  Start, End, last = 0;\n\n\n        ClassRangeCount = FT_NEXT_USHORT( p );\n\n        OTV_TRACE(( \" (ClassRangeCount = %d)\\n\", ClassRangeCount ));\n\n        OTV_LIMIT_CHECK( ClassRangeCount * 6 );\n\n        /* ClassRangeRecord */\n        for ( n = 0; n < ClassRangeCount; n++ )\n        {\n          Start = FT_NEXT_USHORT( p );\n          End   = FT_NEXT_USHORT( p );\n          p    += 2;                        /* skip Class */\n\n          if ( Start > End || ( n > 0 && Start <= last ) )\n            FT_INVALID_DATA;\n\n          if ( End >= otvalid->glyph_count )\n            FT_INVALID_GLYPH_ID;\n\n          last = End;\n        }\n      }\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    /* no need to check glyph indices used as input to class definition   */\n    /* tables since even invalid glyph indices return a meaningful result */\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      DEVICE TABLE                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  otv_Device_validate( FT_Bytes       table,\n                       OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   StartSize, EndSize, DeltaFormat, count;\n\n\n    OTV_NAME_ENTER( \"Device\" );\n\n    OTV_LIMIT_CHECK( 8 );\n    StartSize   = FT_NEXT_USHORT( p );\n    EndSize     = FT_NEXT_USHORT( p );\n    DeltaFormat = FT_NEXT_USHORT( p );\n\n    if ( DeltaFormat < 1 || DeltaFormat > 3 )\n      FT_INVALID_FORMAT;\n\n    if ( EndSize < StartSize )\n      FT_INVALID_DATA;\n\n    count = EndSize - StartSize + 1;\n    OTV_LIMIT_CHECK( ( 1 << DeltaFormat ) * count / 8 );  /* DeltaValue */\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         LOOKUPS                               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* uses otvalid->type_count */\n  /* uses otvalid->type_funcs */\n\n  FT_LOCAL_DEF( void )\n  otv_Lookup_validate( FT_Bytes       table,\n                       OTV_Validator  otvalid )\n  {\n    FT_Bytes           p = table;\n    FT_UInt            LookupType, SubTableCount;\n    OTV_Validate_Func  validate;\n\n\n    OTV_NAME_ENTER( \"Lookup\" );\n\n    OTV_LIMIT_CHECK( 6 );\n    LookupType    = FT_NEXT_USHORT( p );\n    p            += 2;                      /* skip LookupFlag */\n    SubTableCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (type %d)\\n\", LookupType ));\n\n    if ( LookupType == 0 || LookupType > otvalid->type_count )\n      FT_INVALID_DATA;\n\n    validate = otvalid->type_funcs[LookupType - 1];\n\n    OTV_TRACE(( \" (SubTableCount = %d)\\n\", SubTableCount ));\n\n    OTV_LIMIT_CHECK( SubTableCount * 2 );\n\n    /* SubTable */\n    for ( ; SubTableCount > 0; SubTableCount-- )\n      validate( table + FT_NEXT_USHORT( p ), otvalid );\n\n    OTV_EXIT;\n  }\n\n\n  /* uses valid->lookup_count */\n\n  FT_LOCAL_DEF( void )\n  otv_LookupList_validate( FT_Bytes       table,\n                           OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   LookupCount;\n\n\n    OTV_NAME_ENTER( \"LookupList\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    LookupCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (LookupCount = %d)\\n\", LookupCount ));\n\n    OTV_LIMIT_CHECK( LookupCount * 2 );\n\n    otvalid->lookup_count = LookupCount;\n\n    /* Lookup */\n    for ( ; LookupCount > 0; LookupCount-- )\n      otv_Lookup_validate( table + FT_NEXT_USHORT( p ), otvalid );\n\n    OTV_EXIT;\n  }\n\n\n  static FT_UInt\n  otv_LookupList_get_count( FT_Bytes  table )\n  {\n    return FT_NEXT_USHORT( table );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        FEATURES                               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* uses otvalid->lookup_count */\n\n  FT_LOCAL_DEF( void )\n  otv_Feature_validate( FT_Bytes       table,\n                        OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   LookupCount;\n\n\n    OTV_NAME_ENTER( \"Feature\" );\n\n    OTV_LIMIT_CHECK( 4 );\n    p           += 2;                   /* skip FeatureParams (unused) */\n    LookupCount  = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (LookupCount = %d)\\n\", LookupCount ));\n\n    OTV_LIMIT_CHECK( LookupCount * 2 );\n\n    /* LookupListIndex */\n    for ( ; LookupCount > 0; LookupCount-- )\n      if ( FT_NEXT_USHORT( p ) >= otvalid->lookup_count )\n        FT_INVALID_DATA;\n\n    OTV_EXIT;\n  }\n\n\n  static FT_UInt\n  otv_Feature_get_count( FT_Bytes  table )\n  {\n    return FT_NEXT_USHORT( table );\n  }\n\n\n  /* sets otvalid->lookup_count */\n\n  FT_LOCAL_DEF( void )\n  otv_FeatureList_validate( FT_Bytes       table,\n                            FT_Bytes       lookups,\n                            OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   FeatureCount;\n\n\n    OTV_NAME_ENTER( \"FeatureList\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    FeatureCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (FeatureCount = %d)\\n\", FeatureCount ));\n\n    OTV_LIMIT_CHECK( FeatureCount * 2 );\n\n    otvalid->lookup_count = otv_LookupList_get_count( lookups );\n\n    /* FeatureRecord */\n    for ( ; FeatureCount > 0; FeatureCount-- )\n    {\n      p += 4;       /* skip FeatureTag */\n\n      /* Feature */\n      otv_Feature_validate( table + FT_NEXT_USHORT( p ), otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       LANGUAGE SYSTEM                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* uses otvalid->extra1 (number of features) */\n\n  FT_LOCAL_DEF( void )\n  otv_LangSys_validate( FT_Bytes       table,\n                        OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   ReqFeatureIndex;\n    FT_UInt   FeatureCount;\n\n\n    OTV_NAME_ENTER( \"LangSys\" );\n\n    OTV_LIMIT_CHECK( 6 );\n    p              += 2;                    /* skip LookupOrder (unused) */\n    ReqFeatureIndex = FT_NEXT_USHORT( p );\n    FeatureCount    = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (ReqFeatureIndex = %d)\\n\", ReqFeatureIndex ));\n    OTV_TRACE(( \" (FeatureCount = %d)\\n\",    FeatureCount    ));\n\n    if ( ReqFeatureIndex != 0xFFFFU && ReqFeatureIndex >= otvalid->extra1 )\n      FT_INVALID_DATA;\n\n    OTV_LIMIT_CHECK( FeatureCount * 2 );\n\n    /* FeatureIndex */\n    for ( ; FeatureCount > 0; FeatureCount-- )\n      if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 )\n        FT_INVALID_DATA;\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                           SCRIPTS                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  otv_Script_validate( FT_Bytes       table,\n                       OTV_Validator  otvalid )\n  {\n    FT_UInt   DefaultLangSys, LangSysCount;\n    FT_Bytes  p = table;\n\n\n    OTV_NAME_ENTER( \"Script\" );\n\n    OTV_LIMIT_CHECK( 4 );\n    DefaultLangSys = FT_NEXT_USHORT( p );\n    LangSysCount   = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (LangSysCount = %d)\\n\", LangSysCount ));\n\n    if ( DefaultLangSys != 0 )\n      otv_LangSys_validate( table + DefaultLangSys, otvalid );\n\n    OTV_LIMIT_CHECK( LangSysCount * 6 );\n\n    /* LangSysRecord */\n    for ( ; LangSysCount > 0; LangSysCount-- )\n    {\n      p += 4;       /* skip LangSysTag */\n\n      /* LangSys */\n      otv_LangSys_validate( table + FT_NEXT_USHORT( p ), otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /* sets otvalid->extra1 (number of features) */\n\n  FT_LOCAL_DEF( void )\n  otv_ScriptList_validate( FT_Bytes       table,\n                           FT_Bytes       features,\n                           OTV_Validator  otvalid )\n  {\n    FT_UInt   ScriptCount;\n    FT_Bytes  p = table;\n\n\n    OTV_NAME_ENTER( \"ScriptList\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    ScriptCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (ScriptCount = %d)\\n\", ScriptCount ));\n\n    OTV_LIMIT_CHECK( ScriptCount * 6 );\n\n    otvalid->extra1 = otv_Feature_get_count( features );\n\n    /* ScriptRecord */\n    for ( ; ScriptCount > 0; ScriptCount-- )\n    {\n      p += 4;       /* skip ScriptTag */\n\n      otv_Script_validate( table + FT_NEXT_USHORT( p ), otvalid ); /* Script */\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*\n     u:   uint16\n     ux:  unit16 [x]\n\n     s:   struct\n     sx:  struct [x]\n     sxy: struct [x], using external y count\n\n     x:   uint16 x\n\n     C:   Coverage\n\n     O:   Offset\n     On:  Offset (NULL)\n     Ox:  Offset [x]\n     Onx: Offset (NULL) [x]\n  */\n\n  FT_LOCAL_DEF( void )\n  otv_x_Ox( FT_Bytes       table,\n            OTV_Validator  otvalid )\n  {\n    FT_Bytes           p = table;\n    FT_UInt            Count;\n    OTV_Validate_Func  func;\n\n\n    OTV_ENTER;\n\n    OTV_LIMIT_CHECK( 2 );\n    Count = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (Count = %d)\\n\", Count ));\n\n    OTV_LIMIT_CHECK( Count * 2 );\n\n    otvalid->nesting_level++;\n    func = otvalid->func[otvalid->nesting_level];\n\n    for ( ; Count > 0; Count-- )\n      func( table + FT_NEXT_USHORT( p ), otvalid );\n\n    otvalid->nesting_level--;\n\n    OTV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  otv_u_C_x_Ox( FT_Bytes       table,\n                OTV_Validator  otvalid )\n  {\n    FT_Bytes           p = table;\n    FT_UInt            Count, Coverage;\n    OTV_Validate_Func  func;\n\n\n    OTV_ENTER;\n\n    p += 2;     /* skip Format */\n\n    OTV_LIMIT_CHECK( 4 );\n    Coverage = FT_NEXT_USHORT( p );\n    Count    = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (Count = %d)\\n\", Count ));\n\n    otv_Coverage_validate( table + Coverage, otvalid, Count );\n\n    OTV_LIMIT_CHECK( Count * 2 );\n\n    otvalid->nesting_level++;\n    func = otvalid->func[otvalid->nesting_level];\n\n    for ( ; Count > 0; Count-- )\n      func( table + FT_NEXT_USHORT( p ), otvalid );\n\n    otvalid->nesting_level--;\n\n    OTV_EXIT;\n  }\n\n\n  /* uses otvalid->extra1 (if > 0: array value limit) */\n\n  FT_LOCAL_DEF( void )\n  otv_x_ux( FT_Bytes       table,\n            OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   Count;\n\n\n    OTV_ENTER;\n\n    OTV_LIMIT_CHECK( 2 );\n    Count = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (Count = %d)\\n\", Count ));\n\n    OTV_LIMIT_CHECK( Count * 2 );\n\n    if ( otvalid->extra1 )\n    {\n      for ( ; Count > 0; Count-- )\n        if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 )\n          FT_INVALID_DATA;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /* `ux' in the function's name is not really correct since only x-1 */\n  /* elements are tested                                              */\n\n  /* uses otvalid->extra1 (array value limit) */\n\n  FT_LOCAL_DEF( void )\n  otv_x_y_ux_sy( FT_Bytes       table,\n                 OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   Count1, Count2;\n\n\n    OTV_ENTER;\n\n    OTV_LIMIT_CHECK( 4 );\n    Count1 = FT_NEXT_USHORT( p );\n    Count2 = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (Count1 = %d)\\n\", Count1 ));\n    OTV_TRACE(( \" (Count2 = %d)\\n\", Count2 ));\n\n    if ( Count1 == 0 )\n      FT_INVALID_DATA;\n\n    OTV_LIMIT_CHECK( ( Count1 - 1 ) * 2 + Count2 * 4 );\n    p += ( Count1 - 1 ) * 2;\n\n    for ( ; Count2 > 0; Count2-- )\n    {\n      if ( FT_NEXT_USHORT( p ) >= Count1 )\n        FT_INVALID_DATA;\n\n      if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 )\n        FT_INVALID_DATA;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /* `uy' in the function's name is not really correct since only y-1 */\n  /* elements are tested                                              */\n\n  /* uses otvalid->extra1 (array value limit) */\n\n  FT_LOCAL_DEF( void )\n  otv_x_ux_y_uy_z_uz_p_sp( FT_Bytes       table,\n                           OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   BacktrackCount, InputCount, LookaheadCount;\n    FT_UInt   Count;\n\n\n    OTV_ENTER;\n\n    OTV_LIMIT_CHECK( 2 );\n    BacktrackCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (BacktrackCount = %d)\\n\", BacktrackCount ));\n\n    OTV_LIMIT_CHECK( BacktrackCount * 2 + 2 );\n    p += BacktrackCount * 2;\n\n    InputCount = FT_NEXT_USHORT( p );\n    if ( InputCount == 0 )\n      FT_INVALID_DATA;\n\n    OTV_TRACE(( \" (InputCount = %d)\\n\", InputCount ));\n\n    OTV_LIMIT_CHECK( InputCount * 2 );\n    p += ( InputCount - 1 ) * 2;\n\n    LookaheadCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (LookaheadCount = %d)\\n\", LookaheadCount ));\n\n    OTV_LIMIT_CHECK( LookaheadCount * 2 + 2 );\n    p += LookaheadCount * 2;\n\n    Count = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (Count = %d)\\n\", Count ));\n\n    OTV_LIMIT_CHECK( Count * 4 );\n\n    for ( ; Count > 0; Count-- )\n    {\n      if ( FT_NEXT_USHORT( p ) >= InputCount )\n        FT_INVALID_DATA;\n\n      if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 )\n        FT_INVALID_DATA;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /* sets otvalid->extra1 (valid->lookup_count) */\n\n  FT_LOCAL_DEF( void )\n  otv_u_O_O_x_Onx( FT_Bytes       table,\n                   OTV_Validator  otvalid )\n  {\n    FT_Bytes           p = table;\n    FT_UInt            Coverage, ClassDef, ClassSetCount;\n    OTV_Validate_Func  func;\n\n\n    OTV_ENTER;\n\n    p += 2;     /* skip Format */\n\n    OTV_LIMIT_CHECK( 6 );\n    Coverage      = FT_NEXT_USHORT( p );\n    ClassDef      = FT_NEXT_USHORT( p );\n    ClassSetCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (ClassSetCount = %d)\\n\", ClassSetCount ));\n\n    otv_Coverage_validate( table + Coverage, otvalid, -1 );\n    otv_ClassDef_validate( table + ClassDef, otvalid );\n\n    OTV_LIMIT_CHECK( ClassSetCount * 2 );\n\n    otvalid->nesting_level++;\n    func          = otvalid->func[otvalid->nesting_level];\n    otvalid->extra1 = otvalid->lookup_count;\n\n    for ( ; ClassSetCount > 0; ClassSetCount-- )\n    {\n      FT_UInt  offset = FT_NEXT_USHORT( p );\n\n\n      if ( offset )\n        func( table + offset, otvalid );\n    }\n\n    otvalid->nesting_level--;\n\n    OTV_EXIT;\n  }\n\n\n  /* uses otvalid->lookup_count */\n\n  FT_LOCAL_DEF( void )\n  otv_u_x_y_Ox_sy( FT_Bytes       table,\n                   OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   GlyphCount, Count, count1;\n\n\n    OTV_ENTER;\n\n    p += 2;     /* skip Format */\n\n    OTV_LIMIT_CHECK( 4 );\n    GlyphCount = FT_NEXT_USHORT( p );\n    Count      = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (GlyphCount = %d)\\n\", GlyphCount ));\n    OTV_TRACE(( \" (Count = %d)\\n\",      Count      ));\n\n    OTV_LIMIT_CHECK( GlyphCount * 2 + Count * 4 );\n\n    for ( count1 = GlyphCount; count1 > 0; count1-- )\n      otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );\n\n    for ( ; Count > 0; Count-- )\n    {\n      if ( FT_NEXT_USHORT( p ) >= GlyphCount )\n        FT_INVALID_DATA;\n\n      if ( FT_NEXT_USHORT( p ) >= otvalid->lookup_count )\n        FT_INVALID_DATA;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /* sets otvalid->extra1 (valid->lookup_count)    */\n\n  FT_LOCAL_DEF( void )\n  otv_u_O_O_O_O_x_Onx( FT_Bytes       table,\n                       OTV_Validator  otvalid )\n  {\n    FT_Bytes           p = table;\n    FT_UInt            Coverage;\n    FT_UInt            BacktrackClassDef, InputClassDef, LookaheadClassDef;\n    FT_UInt            ChainClassSetCount;\n    OTV_Validate_Func  func;\n\n\n    OTV_ENTER;\n\n    p += 2;     /* skip Format */\n\n    OTV_LIMIT_CHECK( 10 );\n    Coverage           = FT_NEXT_USHORT( p );\n    BacktrackClassDef  = FT_NEXT_USHORT( p );\n    InputClassDef      = FT_NEXT_USHORT( p );\n    LookaheadClassDef  = FT_NEXT_USHORT( p );\n    ChainClassSetCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (ChainClassSetCount = %d)\\n\", ChainClassSetCount ));\n\n    otv_Coverage_validate( table + Coverage, otvalid, -1 );\n\n    otv_ClassDef_validate( table + BacktrackClassDef,  otvalid );\n    otv_ClassDef_validate( table + InputClassDef, otvalid );\n    otv_ClassDef_validate( table + LookaheadClassDef, otvalid );\n\n    OTV_LIMIT_CHECK( ChainClassSetCount * 2 );\n\n    otvalid->nesting_level++;\n    func          = otvalid->func[otvalid->nesting_level];\n    otvalid->extra1 = otvalid->lookup_count;\n\n    for ( ; ChainClassSetCount > 0; ChainClassSetCount-- )\n    {\n      FT_UInt  offset = FT_NEXT_USHORT( p );\n\n\n      if ( offset )\n        func( table + offset, otvalid );\n    }\n\n    otvalid->nesting_level--;\n\n    OTV_EXIT;\n  }\n\n\n  /* uses otvalid->lookup_count */\n\n  FT_LOCAL_DEF( void )\n  otv_u_x_Ox_y_Oy_z_Oz_p_sp( FT_Bytes       table,\n                             OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   BacktrackGlyphCount, InputGlyphCount, LookaheadGlyphCount;\n    FT_UInt   count1, count2;\n\n\n    OTV_ENTER;\n\n    p += 2;     /* skip Format */\n\n    OTV_LIMIT_CHECK( 2 );\n    BacktrackGlyphCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (BacktrackGlyphCount = %d)\\n\", BacktrackGlyphCount ));\n\n    OTV_LIMIT_CHECK( BacktrackGlyphCount * 2 + 2 );\n\n    for ( ; BacktrackGlyphCount > 0; BacktrackGlyphCount-- )\n      otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );\n\n    InputGlyphCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (InputGlyphCount = %d)\\n\", InputGlyphCount ));\n\n    OTV_LIMIT_CHECK( InputGlyphCount * 2 + 2 );\n\n    for ( count1 = InputGlyphCount; count1 > 0; count1-- )\n      otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );\n\n    LookaheadGlyphCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (LookaheadGlyphCount = %d)\\n\", LookaheadGlyphCount ));\n\n    OTV_LIMIT_CHECK( LookaheadGlyphCount * 2 + 2 );\n\n    for ( ; LookaheadGlyphCount > 0; LookaheadGlyphCount-- )\n      otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );\n\n    count2 = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (Count = %d)\\n\", count2 ));\n\n    OTV_LIMIT_CHECK( count2 * 4 );\n\n    for ( ; count2 > 0; count2-- )\n    {\n      if ( FT_NEXT_USHORT( p ) >= InputGlyphCount )\n        FT_INVALID_DATA;\n\n      if ( FT_NEXT_USHORT( p ) >= otvalid->lookup_count )\n        FT_INVALID_DATA;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  otv_GSUBGPOS_get_Lookup_count( FT_Bytes  table )\n  {\n    FT_Bytes  p = table + 8;\n\n\n    return otv_LookupList_get_count( table + FT_NEXT_USHORT( p ) );\n  }\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  otv_GSUBGPOS_have_MarkAttachmentType_flag( FT_Bytes  table )\n  {\n    FT_Bytes  p, lookup;\n    FT_UInt   count;\n\n\n    if ( !table )\n      return 0;\n\n    /* LookupList */\n    p      = table + 8;\n    table += FT_NEXT_USHORT( p );\n\n    /* LookupCount */\n    p     = table;\n    count = FT_NEXT_USHORT( p );\n\n    for ( ; count > 0; count-- )\n    {\n      FT_Bytes  oldp;\n\n\n      /* Lookup */\n      lookup = table + FT_NEXT_USHORT( p );\n\n      oldp = p;\n\n      /* LookupFlag */\n      p = lookup + 2;\n      if ( FT_NEXT_USHORT( p ) & 0xFF00U )\n        return 1;\n\n      p = oldp;\n    }\n\n    return 0;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvcommn.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvcommn.h                                                             */\n/*                                                                         */\n/*    OpenType common tables validation (specification).                   */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2007, 2009, 2014 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __OTVCOMMN_H__\n#define __OTVCOMMN_H__\n\n\n#include <ft2build.h>\n#include \"otvalid.h\"\n#include FT_INTERNAL_DEBUG_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         VALIDATION                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct OTV_ValidatorRec_*  OTV_Validator;\n\n  typedef void  (*OTV_Validate_Func)( FT_Bytes       table,\n                                      OTV_Validator  otvalid );\n\n  typedef struct  OTV_ValidatorRec_\n  {\n    FT_Validator        root;\n    FT_UInt             type_count;\n    OTV_Validate_Func*  type_funcs;\n\n    FT_UInt             lookup_count;\n    FT_UInt             glyph_count;\n\n    FT_UInt             nesting_level;\n\n    OTV_Validate_Func   func[3];\n\n    FT_UInt             extra1;     /* for passing parameters */\n    FT_UInt             extra2;\n    FT_Bytes            extra3;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    FT_UInt             debug_indent;\n    const FT_String*    debug_function_name[3];\n#endif\n\n  } OTV_ValidatorRec;\n\n\n#undef  FT_INVALID_\n#define FT_INVALID_( _error ) \\\n          ft_validator_error( otvalid->root, FT_THROW( _error ) )\n\n#define OTV_OPTIONAL_TABLE( _table )  FT_UShort  _table;      \\\n                                      FT_Bytes   _table ## _p\n\n#define OTV_OPTIONAL_OFFSET( _offset )           \\\n          FT_BEGIN_STMNT                         \\\n            _offset ## _p = p;                   \\\n            _offset       = FT_NEXT_USHORT( p ); \\\n          FT_END_STMNT\n\n#define OTV_LIMIT_CHECK( _count )                    \\\n          FT_BEGIN_STMNT                             \\\n            if ( p + (_count) > otvalid->root->limit ) \\\n              FT_INVALID_TOO_SHORT;                  \\\n          FT_END_STMNT\n\n#define OTV_SIZE_CHECK( _size )                                     \\\n          FT_BEGIN_STMNT                                            \\\n            if ( _size > 0 && _size < table_size )                  \\\n            {                                                       \\\n              if ( otvalid->root->level == FT_VALIDATE_PARANOID )     \\\n                FT_INVALID_OFFSET;                                  \\\n              else                                                  \\\n              {                                                     \\\n                /* strip off `const' */                             \\\n                FT_Byte*  pp = (FT_Byte*)_size ## _p;               \\\n                                                                    \\\n                                                                    \\\n                FT_TRACE3(( \"\\n\"                                    \\\n                            \"Invalid offset to optional table `%s'\" \\\n                            \" set to zero.\\n\"                       \\\n                            \"\\n\", #_size ));                        \\\n                                                                    \\\n                /* always assume 16bit entities */                  \\\n                _size = pp[0] = pp[1] = 0;                          \\\n              }                                                     \\\n            }                                                       \\\n          FT_END_STMNT\n\n\n#define  OTV_NAME_(x)  #x\n#define  OTV_NAME(x)   OTV_NAME_(x)\n\n#define  OTV_FUNC_(x)  x##Func\n#define  OTV_FUNC(x)   OTV_FUNC_(x)\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n#define OTV_NEST1( x )                                       \\\n          FT_BEGIN_STMNT                                     \\\n            otvalid->nesting_level          = 0;             \\\n            otvalid->func[0]                = OTV_FUNC( x ); \\\n            otvalid->debug_function_name[0] = OTV_NAME( x ); \\\n          FT_END_STMNT\n\n#define OTV_NEST2( x, y )                                    \\\n          FT_BEGIN_STMNT                                     \\\n            otvalid->nesting_level          = 0;             \\\n            otvalid->func[0]                = OTV_FUNC( x ); \\\n            otvalid->func[1]                = OTV_FUNC( y ); \\\n            otvalid->debug_function_name[0] = OTV_NAME( x ); \\\n            otvalid->debug_function_name[1] = OTV_NAME( y ); \\\n          FT_END_STMNT\n\n#define OTV_NEST3( x, y, z )                                 \\\n          FT_BEGIN_STMNT                                     \\\n            otvalid->nesting_level          = 0;             \\\n            otvalid->func[0]                = OTV_FUNC( x ); \\\n            otvalid->func[1]                = OTV_FUNC( y ); \\\n            otvalid->func[2]                = OTV_FUNC( z ); \\\n            otvalid->debug_function_name[0] = OTV_NAME( x ); \\\n            otvalid->debug_function_name[1] = OTV_NAME( y ); \\\n            otvalid->debug_function_name[2] = OTV_NAME( z ); \\\n          FT_END_STMNT\n\n#define OTV_INIT  otvalid->debug_indent = 0\n\n#define OTV_ENTER                                                              \\\n          FT_BEGIN_STMNT                                                       \\\n            otvalid->debug_indent += 2;                                        \\\n            FT_TRACE4(( \"%*.s\", otvalid->debug_indent, 0 ));                   \\\n            FT_TRACE4(( \"%s table\\n\",                                          \\\n                        otvalid->debug_function_name[otvalid->nesting_level] )); \\\n          FT_END_STMNT\n\n#define OTV_NAME_ENTER( name )                               \\\n          FT_BEGIN_STMNT                                     \\\n            otvalid->debug_indent += 2;                      \\\n            FT_TRACE4(( \"%*.s\", otvalid->debug_indent, 0 )); \\\n            FT_TRACE4(( \"%s table\\n\", name ));               \\\n          FT_END_STMNT\n\n#define OTV_EXIT  otvalid->debug_indent -= 2\n\n#define OTV_TRACE( s )                                       \\\n          FT_BEGIN_STMNT                                     \\\n            FT_TRACE4(( \"%*.s\", otvalid->debug_indent, 0 )); \\\n            FT_TRACE4( s );                                  \\\n          FT_END_STMNT\n\n#else   /* !FT_DEBUG_LEVEL_TRACE */\n\n#define OTV_NEST1( x )                              \\\n          FT_BEGIN_STMNT                            \\\n            otvalid->nesting_level = 0;             \\\n            otvalid->func[0]       = OTV_FUNC( x ); \\\n          FT_END_STMNT\n\n#define OTV_NEST2( x, y )                           \\\n          FT_BEGIN_STMNT                            \\\n            otvalid->nesting_level = 0;             \\\n            otvalid->func[0]       = OTV_FUNC( x ); \\\n            otvalid->func[1]       = OTV_FUNC( y ); \\\n          FT_END_STMNT\n\n#define OTV_NEST3( x, y, z )                        \\\n          FT_BEGIN_STMNT                            \\\n            otvalid->nesting_level = 0;             \\\n            otvalid->func[0]       = OTV_FUNC( x ); \\\n            otvalid->func[1]       = OTV_FUNC( y ); \\\n            otvalid->func[2]       = OTV_FUNC( z ); \\\n          FT_END_STMNT\n\n#define OTV_INIT                do { } while ( 0 )\n#define OTV_ENTER               do { } while ( 0 )\n#define OTV_NAME_ENTER( name )  do { } while ( 0 )\n#define OTV_EXIT                do { } while ( 0 )\n\n#define OTV_TRACE( s )          do { } while ( 0 )\n\n#endif  /* !FT_DEBUG_LEVEL_TRACE */\n\n\n#define OTV_RUN  otvalid->func[0]\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       COVERAGE TABLE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  otv_Coverage_validate( FT_Bytes       table,\n                         OTV_Validator  otvalid,\n                         FT_Int         expected_count );\n\n  /* return first covered glyph */\n  FT_LOCAL( FT_UInt )\n  otv_Coverage_get_first( FT_Bytes  table );\n\n  /* return last covered glyph */\n  FT_LOCAL( FT_UInt )\n  otv_Coverage_get_last( FT_Bytes  table );\n\n  /* return number of covered glyphs */\n  FT_LOCAL( FT_UInt )\n  otv_Coverage_get_count( FT_Bytes  table );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  CLASS DEFINITION TABLE                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  otv_ClassDef_validate( FT_Bytes       table,\n                         OTV_Validator  otvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      DEVICE TABLE                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  otv_Device_validate( FT_Bytes       table,\n                       OTV_Validator  otvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                           LOOKUPS                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  otv_Lookup_validate( FT_Bytes       table,\n                       OTV_Validator  otvalid );\n\n  FT_LOCAL( void )\n  otv_LookupList_validate( FT_Bytes       table,\n                           OTV_Validator  otvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        FEATURES                               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  otv_Feature_validate( FT_Bytes       table,\n                        OTV_Validator  otvalid );\n\n  /* lookups must already be validated */\n  FT_LOCAL( void )\n  otv_FeatureList_validate( FT_Bytes       table,\n                            FT_Bytes       lookups,\n                            OTV_Validator  otvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       LANGUAGE SYSTEM                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  otv_LangSys_validate( FT_Bytes       table,\n                        OTV_Validator  otvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                           SCRIPTS                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  otv_Script_validate( FT_Bytes       table,\n                       OTV_Validator  otvalid );\n\n  /* features must already be validated */\n  FT_LOCAL( void )\n  otv_ScriptList_validate( FT_Bytes       table,\n                           FT_Bytes       features,\n                           OTV_Validator  otvalid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define ChainPosClassSetFunc  otv_x_Ox\n#define ChainPosRuleSetFunc   otv_x_Ox\n#define ChainSubClassSetFunc  otv_x_Ox\n#define ChainSubRuleSetFunc   otv_x_Ox\n#define JstfLangSysFunc       otv_x_Ox\n#define JstfMaxFunc           otv_x_Ox\n#define LigGlyphFunc          otv_x_Ox\n#define LigatureArrayFunc     otv_x_Ox\n#define LigatureSetFunc       otv_x_Ox\n#define PosClassSetFunc       otv_x_Ox\n#define PosRuleSetFunc        otv_x_Ox\n#define SubClassSetFunc       otv_x_Ox\n#define SubRuleSetFunc        otv_x_Ox\n\n  FT_LOCAL( void )\n  otv_x_Ox ( FT_Bytes       table,\n             OTV_Validator  otvalid );\n\n#define AlternateSubstFormat1Func     otv_u_C_x_Ox\n#define ChainContextPosFormat1Func    otv_u_C_x_Ox\n#define ChainContextSubstFormat1Func  otv_u_C_x_Ox\n#define ContextPosFormat1Func         otv_u_C_x_Ox\n#define ContextSubstFormat1Func       otv_u_C_x_Ox\n#define LigatureSubstFormat1Func      otv_u_C_x_Ox\n#define MultipleSubstFormat1Func      otv_u_C_x_Ox\n\n  FT_LOCAL( void )\n  otv_u_C_x_Ox( FT_Bytes       table,\n                OTV_Validator  otvalid );\n\n#define AlternateSetFunc     otv_x_ux\n#define AttachPointFunc      otv_x_ux\n#define ExtenderGlyphFunc    otv_x_ux\n#define JstfGPOSModListFunc  otv_x_ux\n#define JstfGSUBModListFunc  otv_x_ux\n#define SequenceFunc         otv_x_ux\n\n  FT_LOCAL( void )\n  otv_x_ux( FT_Bytes       table,\n            OTV_Validator  otvalid );\n\n#define PosClassRuleFunc  otv_x_y_ux_sy\n#define PosRuleFunc       otv_x_y_ux_sy\n#define SubClassRuleFunc  otv_x_y_ux_sy\n#define SubRuleFunc       otv_x_y_ux_sy\n\n  FT_LOCAL( void )\n  otv_x_y_ux_sy( FT_Bytes       table,\n                 OTV_Validator  otvalid );\n\n#define ChainPosClassRuleFunc  otv_x_ux_y_uy_z_uz_p_sp\n#define ChainPosRuleFunc       otv_x_ux_y_uy_z_uz_p_sp\n#define ChainSubClassRuleFunc  otv_x_ux_y_uy_z_uz_p_sp\n#define ChainSubRuleFunc       otv_x_ux_y_uy_z_uz_p_sp\n\n  FT_LOCAL( void )\n  otv_x_ux_y_uy_z_uz_p_sp( FT_Bytes       table,\n                           OTV_Validator  otvalid );\n\n#define ContextPosFormat2Func    otv_u_O_O_x_Onx\n#define ContextSubstFormat2Func  otv_u_O_O_x_Onx\n\n  FT_LOCAL( void )\n  otv_u_O_O_x_Onx( FT_Bytes       table,\n                   OTV_Validator  otvalid );\n\n#define ContextPosFormat3Func    otv_u_x_y_Ox_sy\n#define ContextSubstFormat3Func  otv_u_x_y_Ox_sy\n\n  FT_LOCAL( void )\n  otv_u_x_y_Ox_sy( FT_Bytes       table,\n                   OTV_Validator  otvalid );\n\n#define ChainContextPosFormat2Func    otv_u_O_O_O_O_x_Onx\n#define ChainContextSubstFormat2Func  otv_u_O_O_O_O_x_Onx\n\n  FT_LOCAL( void )\n  otv_u_O_O_O_O_x_Onx( FT_Bytes       table,\n                       OTV_Validator  otvalid );\n\n#define ChainContextPosFormat3Func    otv_u_x_Ox_y_Oy_z_Oz_p_sp\n#define ChainContextSubstFormat3Func  otv_u_x_Ox_y_Oy_z_Oz_p_sp\n\n  FT_LOCAL( void )\n  otv_u_x_Ox_y_Oy_z_Oz_p_sp( FT_Bytes       table,\n                             OTV_Validator  otvalid );\n\n\n  FT_LOCAL( FT_UInt )\n  otv_GSUBGPOS_get_Lookup_count( FT_Bytes  table );\n\n  FT_LOCAL( FT_UInt )\n  otv_GSUBGPOS_have_MarkAttachmentType_flag( FT_Bytes  table );\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __OTVCOMMN_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otverror.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otverror.h                                                             */\n/*                                                                         */\n/*    OpenType validation module error codes (specification only).         */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2012, 2013 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the OpenType validation module error      */\n  /* enumeration constants.                                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __OTVERROR_H__\n#define __OTVERROR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  OTV_Err_\n#define FT_ERR_BASE    FT_Mod_Err_OTvalid\n\n#include FT_ERRORS_H\n\n#endif /* __OTVERROR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvgdef.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvgdef.c                                                              */\n/*                                                                         */\n/*    OpenType GDEF table validation (body).                               */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2007 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"otvalid.h\"\n#include \"otvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_otvgdef\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define AttachListFunc    otv_O_x_Ox\n#define LigCaretListFunc  otv_O_x_Ox\n\n  /* sets valid->extra1 (0)           */\n\n  static void\n  otv_O_x_Ox( FT_Bytes       table,\n              OTV_Validator  otvalid )\n  {\n    FT_Bytes           p = table;\n    FT_Bytes           Coverage;\n    FT_UInt            GlyphCount;\n    OTV_Validate_Func  func;\n\n\n    OTV_ENTER;\n\n    OTV_LIMIT_CHECK( 4 );\n    Coverage   = table + FT_NEXT_USHORT( p );\n    GlyphCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (GlyphCount = %d)\\n\", GlyphCount ));\n\n    otv_Coverage_validate( Coverage, otvalid, GlyphCount );\n    if ( GlyphCount != otv_Coverage_get_count( Coverage ) )\n      FT_INVALID_DATA;\n\n    OTV_LIMIT_CHECK( GlyphCount * 2 );\n\n    otvalid->nesting_level++;\n    func          = otvalid->func[otvalid->nesting_level];\n    otvalid->extra1 = 0;\n\n    for ( ; GlyphCount > 0; GlyphCount-- )\n      func( table + FT_NEXT_USHORT( p ), otvalid );\n\n    otvalid->nesting_level--;\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       LIGATURE CARETS                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define CaretValueFunc  otv_CaretValue_validate\n\n  static void\n  otv_CaretValue_validate( FT_Bytes       table,\n                           OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   CaretValueFormat;\n\n\n    OTV_ENTER;\n\n    OTV_LIMIT_CHECK( 4 );\n\n    CaretValueFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format = %d)\\n\", CaretValueFormat ));\n\n    switch ( CaretValueFormat )\n    {\n    case 1:     /* CaretValueFormat1 */\n      /* skip Coordinate, no test */\n      break;\n\n    case 2:     /* CaretValueFormat2 */\n      /* skip CaretValuePoint, no test */\n      break;\n\n    case 3:     /* CaretValueFormat3 */\n      p += 2;   /* skip Coordinate */\n\n      OTV_LIMIT_CHECK( 2 );\n\n      /* DeviceTable */\n      otv_Device_validate( table + FT_NEXT_USHORT( p ), otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         GDEF TABLE                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->glyph_count */\n\n  FT_LOCAL_DEF( void )\n  otv_GDEF_validate( FT_Bytes      table,\n                     FT_Bytes      gsub,\n                     FT_Bytes      gpos,\n                     FT_UInt       glyph_count,\n                     FT_Validator  ftvalid )\n  {\n    OTV_ValidatorRec  otvalidrec;\n    OTV_Validator     otvalid = &otvalidrec;\n    FT_Bytes          p     = table;\n    FT_UInt           table_size;\n    FT_Bool           need_MarkAttachClassDef;\n\n    OTV_OPTIONAL_TABLE( GlyphClassDef );\n    OTV_OPTIONAL_TABLE( AttachListOffset );\n    OTV_OPTIONAL_TABLE( LigCaretListOffset );\n    OTV_OPTIONAL_TABLE( MarkAttachClassDef );\n\n\n    otvalid->root = ftvalid;\n\n    FT_TRACE3(( \"validating GDEF table\\n\" ));\n    OTV_INIT;\n\n    OTV_LIMIT_CHECK( 12 );\n\n    if ( FT_NEXT_ULONG( p ) != 0x10000UL )          /* Version */\n      FT_INVALID_FORMAT;\n\n    /* MarkAttachClassDef has been added to the OpenType */\n    /* specification without increasing GDEF's version,  */\n    /* so we use this ugly hack to find out whether the  */\n    /* table is needed actually.                         */\n\n    need_MarkAttachClassDef = FT_BOOL(\n      otv_GSUBGPOS_have_MarkAttachmentType_flag( gsub ) ||\n      otv_GSUBGPOS_have_MarkAttachmentType_flag( gpos ) );\n\n    if ( need_MarkAttachClassDef )\n      table_size = 12;              /* OpenType >= 1.2 */\n    else\n      table_size = 10;              /* OpenType < 1.2  */\n\n    otvalid->glyph_count = glyph_count;\n\n    OTV_OPTIONAL_OFFSET( GlyphClassDef );\n    OTV_SIZE_CHECK( GlyphClassDef );\n    if ( GlyphClassDef )\n      otv_ClassDef_validate( table + GlyphClassDef, otvalid );\n\n    OTV_OPTIONAL_OFFSET( AttachListOffset );\n    OTV_SIZE_CHECK( AttachListOffset );\n    if ( AttachListOffset )\n    {\n      OTV_NEST2( AttachList, AttachPoint );\n      OTV_RUN( table + AttachListOffset, otvalid );\n    }\n\n    OTV_OPTIONAL_OFFSET( LigCaretListOffset );\n    OTV_SIZE_CHECK( LigCaretListOffset );\n    if ( LigCaretListOffset )\n    {\n      OTV_NEST3( LigCaretList, LigGlyph, CaretValue );\n      OTV_RUN( table + LigCaretListOffset, otvalid );\n    }\n\n    if ( need_MarkAttachClassDef )\n    {\n      OTV_OPTIONAL_OFFSET( MarkAttachClassDef );\n      OTV_SIZE_CHECK( MarkAttachClassDef );\n      if ( MarkAttachClassDef )\n        otv_ClassDef_validate( table + MarkAttachClassDef, otvalid );\n    }\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvgpos.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvgpos.c                                                              */\n/*                                                                         */\n/*    OpenType GPOS table validation (body).                               */\n/*                                                                         */\n/*  Copyright 2002, 2004, 2005, 2006, 2007, 2008 by                        */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"otvalid.h\"\n#include \"otvcommn.h\"\n#include \"otvgpos.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_otvgpos\n\n\n  static void\n  otv_Anchor_validate( FT_Bytes       table,\n                       OTV_Validator  valid );\n\n  static void\n  otv_MarkArray_validate( FT_Bytes       table,\n                          OTV_Validator  valid );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      UTILITY FUNCTIONS                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define BaseArrayFunc       otv_x_sxy\n#define LigatureAttachFunc  otv_x_sxy\n#define Mark2ArrayFunc      otv_x_sxy\n\n  /* uses valid->extra1 (counter)                             */\n  /* uses valid->extra2 (boolean to handle NULL anchor field) */\n\n  static void\n  otv_x_sxy( FT_Bytes       table,\n             OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   Count, count1, table_size;\n\n\n    OTV_ENTER;\n\n    OTV_LIMIT_CHECK( 2 );\n\n    Count = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (Count = %d)\\n\", Count ));\n\n    OTV_LIMIT_CHECK( Count * otvalid->extra1 * 2 );\n\n    table_size = Count * otvalid->extra1 * 2 + 2;\n\n    for ( ; Count > 0; Count-- )\n      for ( count1 = otvalid->extra1; count1 > 0; count1-- )\n      {\n        OTV_OPTIONAL_TABLE( anchor_offset );\n\n\n        OTV_OPTIONAL_OFFSET( anchor_offset );\n\n        if ( otvalid->extra2 )\n        {\n          OTV_SIZE_CHECK( anchor_offset );\n          if ( anchor_offset )\n            otv_Anchor_validate( table + anchor_offset, otvalid );\n        }\n        else\n          otv_Anchor_validate( table + anchor_offset, otvalid );\n      }\n\n    OTV_EXIT;\n  }\n\n\n#define MarkBasePosFormat1Func  otv_u_O_O_u_O_O\n#define MarkLigPosFormat1Func   otv_u_O_O_u_O_O\n#define MarkMarkPosFormat1Func  otv_u_O_O_u_O_O\n\n  /* sets otvalid->extra1 (class count) */\n\n  static void\n  otv_u_O_O_u_O_O( FT_Bytes       table,\n                   OTV_Validator  otvalid )\n  {\n    FT_Bytes           p = table;\n    FT_UInt            Coverage1, Coverage2, ClassCount;\n    FT_UInt            Array1, Array2;\n    OTV_Validate_Func  func;\n\n\n    OTV_ENTER;\n\n    p += 2;     /* skip PosFormat */\n\n    OTV_LIMIT_CHECK( 10 );\n    Coverage1  = FT_NEXT_USHORT( p );\n    Coverage2  = FT_NEXT_USHORT( p );\n    ClassCount = FT_NEXT_USHORT( p );\n    Array1     = FT_NEXT_USHORT( p );\n    Array2     = FT_NEXT_USHORT( p );\n\n    otv_Coverage_validate( table + Coverage1, otvalid, -1 );\n    otv_Coverage_validate( table + Coverage2, otvalid, -1 );\n\n    otv_MarkArray_validate( table + Array1, otvalid );\n\n    otvalid->nesting_level++;\n    func          = otvalid->func[otvalid->nesting_level];\n    otvalid->extra1 = ClassCount;\n\n    func( table + Array2, otvalid );\n\n    otvalid->nesting_level--;\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        VALUE RECORDS                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static FT_UInt\n  otv_value_length( FT_UInt  format )\n  {\n    FT_UInt  count;\n\n\n    count = ( ( format & 0xAA ) >> 1 ) + ( format & 0x55 );\n    count = ( ( count  & 0xCC ) >> 2 ) + ( count  & 0x33 );\n    count = ( ( count  & 0xF0 ) >> 4 ) + ( count  & 0x0F );\n\n    return count * 2;\n  }\n\n\n  /* uses otvalid->extra3 (pointer to base table) */\n\n  static void\n  otv_ValueRecord_validate( FT_Bytes       table,\n                            FT_UInt        format,\n                            OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   count;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    FT_Int    loop;\n    FT_ULong  res = 0;\n\n\n    OTV_NAME_ENTER( \"ValueRecord\" );\n\n    /* display `format' in dual representation */\n    for ( loop = 7; loop >= 0; loop-- )\n    {\n      res <<= 4;\n      res  += ( format >> loop ) & 1;\n    }\n\n    OTV_TRACE(( \" (format 0b%08lx)\\n\", res ));\n#endif\n\n    if ( format >= 0x100 )\n      FT_INVALID_FORMAT;\n\n    for ( count = 4; count > 0; count-- )\n    {\n      if ( format & 1 )\n      {\n        /* XPlacement, YPlacement, XAdvance, YAdvance */\n        OTV_LIMIT_CHECK( 2 );\n        p += 2;\n      }\n\n      format >>= 1;\n    }\n\n    for ( count = 4; count > 0; count-- )\n    {\n      if ( format & 1 )\n      {\n        FT_PtrDist  table_size;\n\n        OTV_OPTIONAL_TABLE( device );\n\n\n        /* XPlaDevice, YPlaDevice, XAdvDevice, YAdvDevice */\n        OTV_LIMIT_CHECK( 2 );\n        OTV_OPTIONAL_OFFSET( device );\n\n        /* XXX: this value is usually too small, especially if the current */\n        /* ValueRecord is part of an array -- getting the correct table    */\n        /* size is probably not worth the trouble                          */\n\n        table_size = p - otvalid->extra3;\n\n        OTV_SIZE_CHECK( device );\n        if ( device )\n          otv_Device_validate( otvalid->extra3 + device, otvalid );\n      }\n      format >>= 1;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                           ANCHORS                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  otv_Anchor_validate( FT_Bytes       table,\n                       OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   AnchorFormat;\n\n\n    OTV_NAME_ENTER( \"Anchor\");\n\n    OTV_LIMIT_CHECK( 6 );\n    AnchorFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", AnchorFormat ));\n\n    p += 4;     /* skip XCoordinate and YCoordinate */\n\n    switch ( AnchorFormat )\n    {\n    case 1:\n      break;\n\n    case 2:\n      OTV_LIMIT_CHECK( 2 );  /* AnchorPoint */\n      break;\n\n    case 3:\n      {\n        FT_UInt   table_size;\n\n        OTV_OPTIONAL_TABLE( XDeviceTable );\n        OTV_OPTIONAL_TABLE( YDeviceTable );\n\n\n        OTV_LIMIT_CHECK( 4 );\n        OTV_OPTIONAL_OFFSET( XDeviceTable );\n        OTV_OPTIONAL_OFFSET( YDeviceTable );\n\n        table_size = 6 + 4;\n\n        OTV_SIZE_CHECK( XDeviceTable );\n        if ( XDeviceTable )\n          otv_Device_validate( table + XDeviceTable, otvalid );\n\n        OTV_SIZE_CHECK( YDeviceTable );\n        if ( YDeviceTable )\n          otv_Device_validate( table + YDeviceTable, otvalid );\n      }\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         MARK ARRAYS                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  otv_MarkArray_validate( FT_Bytes       table,\n                          OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   MarkCount;\n\n\n    OTV_NAME_ENTER( \"MarkArray\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    MarkCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (MarkCount = %d)\\n\", MarkCount ));\n\n    OTV_LIMIT_CHECK( MarkCount * 4 );\n\n    /* MarkRecord */\n    for ( ; MarkCount > 0; MarkCount-- )\n    {\n      p += 2;   /* skip Class */\n      /* MarkAnchor */\n      otv_Anchor_validate( table + FT_NEXT_USHORT( p ), otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GPOS LOOKUP TYPE 1                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->extra3 (pointer to base table) */\n\n  static void\n  otv_SinglePos_validate( FT_Bytes       table,\n                          OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   PosFormat;\n\n\n    OTV_NAME_ENTER( \"SinglePos\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PosFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", PosFormat ));\n\n    otvalid->extra3 = table;\n\n    switch ( PosFormat )\n    {\n    case 1:     /* SinglePosFormat1 */\n      {\n        FT_UInt  Coverage, ValueFormat;\n\n\n        OTV_LIMIT_CHECK( 4 );\n        Coverage    = FT_NEXT_USHORT( p );\n        ValueFormat = FT_NEXT_USHORT( p );\n\n        otv_Coverage_validate( table + Coverage, otvalid, -1 );\n        otv_ValueRecord_validate( p, ValueFormat, otvalid ); /* Value */\n      }\n      break;\n\n    case 2:     /* SinglePosFormat2 */\n      {\n        FT_UInt  Coverage, ValueFormat, ValueCount, len_value;\n\n\n        OTV_LIMIT_CHECK( 6 );\n        Coverage    = FT_NEXT_USHORT( p );\n        ValueFormat = FT_NEXT_USHORT( p );\n        ValueCount  = FT_NEXT_USHORT( p );\n\n        OTV_TRACE(( \" (ValueCount = %d)\\n\", ValueCount ));\n\n        len_value = otv_value_length( ValueFormat );\n\n        otv_Coverage_validate( table + Coverage, otvalid, ValueCount );\n\n        OTV_LIMIT_CHECK( ValueCount * len_value );\n\n        /* Value */\n        for ( ; ValueCount > 0; ValueCount-- )\n        {\n          otv_ValueRecord_validate( p, ValueFormat, otvalid );\n          p += len_value;\n        }\n      }\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GPOS LOOKUP TYPE 2                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  otv_PairSet_validate( FT_Bytes       table,\n                        FT_UInt        format1,\n                        FT_UInt        format2,\n                        OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   value_len1, value_len2, PairValueCount;\n\n\n    OTV_NAME_ENTER( \"PairSet\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PairValueCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (PairValueCount = %d)\\n\", PairValueCount ));\n\n    value_len1 = otv_value_length( format1 );\n    value_len2 = otv_value_length( format2 );\n\n    OTV_LIMIT_CHECK( PairValueCount * ( value_len1 + value_len2 + 2 ) );\n\n    /* PairValueRecord */\n    for ( ; PairValueCount > 0; PairValueCount-- )\n    {\n      p += 2;       /* skip SecondGlyph */\n\n      if ( format1 )\n        otv_ValueRecord_validate( p, format1, otvalid ); /* Value1 */\n      p += value_len1;\n\n      if ( format2 )\n        otv_ValueRecord_validate( p, format2, otvalid ); /* Value2 */\n      p += value_len2;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /* sets otvalid->extra3 (pointer to base table) */\n\n  static void\n  otv_PairPos_validate( FT_Bytes       table,\n                        OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   PosFormat;\n\n\n    OTV_NAME_ENTER( \"PairPos\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PosFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", PosFormat ));\n\n    otvalid->extra3 = table;\n\n    switch ( PosFormat )\n    {\n    case 1:     /* PairPosFormat1 */\n      {\n        FT_UInt  Coverage, ValueFormat1, ValueFormat2, PairSetCount;\n\n\n        OTV_LIMIT_CHECK( 8 );\n        Coverage     = FT_NEXT_USHORT( p );\n        ValueFormat1 = FT_NEXT_USHORT( p );\n        ValueFormat2 = FT_NEXT_USHORT( p );\n        PairSetCount = FT_NEXT_USHORT( p );\n\n        OTV_TRACE(( \" (PairSetCount = %d)\\n\", PairSetCount ));\n\n        otv_Coverage_validate( table + Coverage, otvalid, -1 );\n\n        OTV_LIMIT_CHECK( PairSetCount * 2 );\n\n        /* PairSetOffset */\n        for ( ; PairSetCount > 0; PairSetCount-- )\n          otv_PairSet_validate( table + FT_NEXT_USHORT( p ),\n                                ValueFormat1, ValueFormat2, otvalid );\n      }\n      break;\n\n    case 2:     /* PairPosFormat2 */\n      {\n        FT_UInt  Coverage, ValueFormat1, ValueFormat2, ClassDef1, ClassDef2;\n        FT_UInt  ClassCount1, ClassCount2, len_value1, len_value2, count;\n\n\n        OTV_LIMIT_CHECK( 14 );\n        Coverage     = FT_NEXT_USHORT( p );\n        ValueFormat1 = FT_NEXT_USHORT( p );\n        ValueFormat2 = FT_NEXT_USHORT( p );\n        ClassDef1    = FT_NEXT_USHORT( p );\n        ClassDef2    = FT_NEXT_USHORT( p );\n        ClassCount1  = FT_NEXT_USHORT( p );\n        ClassCount2  = FT_NEXT_USHORT( p );\n\n        OTV_TRACE(( \" (ClassCount1 = %d)\\n\", ClassCount1 ));\n        OTV_TRACE(( \" (ClassCount2 = %d)\\n\", ClassCount2 ));\n\n        len_value1 = otv_value_length( ValueFormat1 );\n        len_value2 = otv_value_length( ValueFormat2 );\n\n        otv_Coverage_validate( table + Coverage, otvalid, -1 );\n        otv_ClassDef_validate( table + ClassDef1, otvalid );\n        otv_ClassDef_validate( table + ClassDef2, otvalid );\n\n        OTV_LIMIT_CHECK( ClassCount1 * ClassCount2 *\n                     ( len_value1 + len_value2 ) );\n\n        /* Class1Record */\n        for ( ; ClassCount1 > 0; ClassCount1-- )\n        {\n          /* Class2Record */\n          for ( count = ClassCount2; count > 0; count-- )\n          {\n            if ( ValueFormat1 )\n              /* Value1 */\n              otv_ValueRecord_validate( p, ValueFormat1, otvalid );\n            p += len_value1;\n\n            if ( ValueFormat2 )\n              /* Value2 */\n              otv_ValueRecord_validate( p, ValueFormat2, otvalid );\n            p += len_value2;\n          }\n        }\n      }\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GPOS LOOKUP TYPE 3                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  otv_CursivePos_validate( FT_Bytes       table,\n                           OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   PosFormat;\n\n\n    OTV_NAME_ENTER( \"CursivePos\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PosFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", PosFormat ));\n\n    switch ( PosFormat )\n    {\n    case 1:     /* CursivePosFormat1 */\n      {\n        FT_UInt   table_size;\n        FT_UInt   Coverage, EntryExitCount;\n\n        OTV_OPTIONAL_TABLE( EntryAnchor );\n        OTV_OPTIONAL_TABLE( ExitAnchor  );\n\n\n        OTV_LIMIT_CHECK( 4 );\n        Coverage       = FT_NEXT_USHORT( p );\n        EntryExitCount = FT_NEXT_USHORT( p );\n\n        OTV_TRACE(( \" (EntryExitCount = %d)\\n\", EntryExitCount ));\n\n        otv_Coverage_validate( table + Coverage, otvalid, EntryExitCount );\n\n        OTV_LIMIT_CHECK( EntryExitCount * 4 );\n\n        table_size = EntryExitCount * 4 + 4;\n\n        /* EntryExitRecord */\n        for ( ; EntryExitCount > 0; EntryExitCount-- )\n        {\n          OTV_OPTIONAL_OFFSET( EntryAnchor );\n          OTV_OPTIONAL_OFFSET( ExitAnchor  );\n\n          OTV_SIZE_CHECK( EntryAnchor );\n          if ( EntryAnchor )\n            otv_Anchor_validate( table + EntryAnchor, otvalid );\n\n          OTV_SIZE_CHECK( ExitAnchor );\n          if ( ExitAnchor )\n            otv_Anchor_validate( table + ExitAnchor, otvalid );\n        }\n      }\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GPOS LOOKUP TYPE 4                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* UNDOCUMENTED (in OpenType 1.5):              */\n  /* BaseRecord tables can contain NULL pointers. */\n\n  /* sets otvalid->extra2 (1) */\n\n  static void\n  otv_MarkBasePos_validate( FT_Bytes       table,\n                            OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   PosFormat;\n\n\n    OTV_NAME_ENTER( \"MarkBasePos\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PosFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", PosFormat ));\n\n    switch ( PosFormat )\n    {\n    case 1:\n      otvalid->extra2 = 1;\n      OTV_NEST2( MarkBasePosFormat1, BaseArray );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GPOS LOOKUP TYPE 5                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->extra2 (1) */\n\n  static void\n  otv_MarkLigPos_validate( FT_Bytes       table,\n                           OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   PosFormat;\n\n\n    OTV_NAME_ENTER( \"MarkLigPos\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PosFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", PosFormat ));\n\n    switch ( PosFormat )\n    {\n    case 1:\n      otvalid->extra2 = 1;\n      OTV_NEST3( MarkLigPosFormat1, LigatureArray, LigatureAttach );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GPOS LOOKUP TYPE 6                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->extra2 (0) */\n\n  static void\n  otv_MarkMarkPos_validate( FT_Bytes       table,\n                            OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   PosFormat;\n\n\n    OTV_NAME_ENTER( \"MarkMarkPos\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PosFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", PosFormat ));\n\n    switch ( PosFormat )\n    {\n    case 1:\n      otvalid->extra2 = 0;\n      OTV_NEST2( MarkMarkPosFormat1, Mark2Array );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GPOS LOOKUP TYPE 7                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->extra1 (lookup count) */\n\n  static void\n  otv_ContextPos_validate( FT_Bytes       table,\n                           OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   PosFormat;\n\n\n    OTV_NAME_ENTER( \"ContextPos\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PosFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", PosFormat ));\n\n    switch ( PosFormat )\n    {\n    case 1:\n      /* no need to check glyph indices/classes used as input for these */\n      /* context rules since even invalid glyph indices/classes return  */\n      /* meaningful results                                             */\n\n      otvalid->extra1 = otvalid->lookup_count;\n      OTV_NEST3( ContextPosFormat1, PosRuleSet, PosRule );\n      OTV_RUN( table, otvalid );\n      break;\n\n    case 2:\n      /* no need to check glyph indices/classes used as input for these */\n      /* context rules since even invalid glyph indices/classes return  */\n      /* meaningful results                                             */\n\n      OTV_NEST3( ContextPosFormat2, PosClassSet, PosClassRule );\n      OTV_RUN( table, otvalid );\n      break;\n\n    case 3:\n      OTV_NEST1( ContextPosFormat3 );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GPOS LOOKUP TYPE 8                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->extra1 (lookup count) */\n\n  static void\n  otv_ChainContextPos_validate( FT_Bytes       table,\n                                OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   PosFormat;\n\n\n    OTV_NAME_ENTER( \"ChainContextPos\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PosFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", PosFormat ));\n\n    switch ( PosFormat )\n    {\n    case 1:\n      /* no need to check glyph indices/classes used as input for these */\n      /* context rules since even invalid glyph indices/classes return  */\n      /* meaningful results                                             */\n\n      otvalid->extra1 = otvalid->lookup_count;\n      OTV_NEST3( ChainContextPosFormat1,\n                 ChainPosRuleSet, ChainPosRule );\n      OTV_RUN( table, otvalid );\n      break;\n\n    case 2:\n      /* no need to check glyph indices/classes used as input for these */\n      /* context rules since even invalid glyph indices/classes return  */\n      /* meaningful results                                             */\n\n      OTV_NEST3( ChainContextPosFormat2,\n                 ChainPosClassSet, ChainPosClassRule );\n      OTV_RUN( table, otvalid );\n      break;\n\n    case 3:\n      OTV_NEST1( ChainContextPosFormat3 );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GPOS LOOKUP TYPE 9                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* uses otvalid->type_funcs */\n\n  static void\n  otv_ExtensionPos_validate( FT_Bytes       table,\n                             OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   PosFormat;\n\n\n    OTV_NAME_ENTER( \"ExtensionPos\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    PosFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", PosFormat ));\n\n    switch ( PosFormat )\n    {\n    case 1:     /* ExtensionPosFormat1 */\n      {\n        FT_UInt            ExtensionLookupType;\n        FT_ULong           ExtensionOffset;\n        OTV_Validate_Func  validate;\n\n\n        OTV_LIMIT_CHECK( 6 );\n        ExtensionLookupType = FT_NEXT_USHORT( p );\n        ExtensionOffset     = FT_NEXT_ULONG( p );\n\n        if ( ExtensionLookupType == 0 || ExtensionLookupType >= 9 )\n          FT_INVALID_DATA;\n\n        validate = otvalid->type_funcs[ExtensionLookupType - 1];\n        validate( table + ExtensionOffset, otvalid );\n      }\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  static const OTV_Validate_Func  otv_gpos_validate_funcs[9] =\n  {\n    otv_SinglePos_validate,\n    otv_PairPos_validate,\n    otv_CursivePos_validate,\n    otv_MarkBasePos_validate,\n    otv_MarkLigPos_validate,\n    otv_MarkMarkPos_validate,\n    otv_ContextPos_validate,\n    otv_ChainContextPos_validate,\n    otv_ExtensionPos_validate\n  };\n\n\n  /* sets otvalid->type_count */\n  /* sets otvalid->type_funcs */\n\n  FT_LOCAL_DEF( void )\n  otv_GPOS_subtable_validate( FT_Bytes       table,\n                              OTV_Validator  otvalid )\n  {\n    otvalid->type_count = 9;\n    otvalid->type_funcs = (OTV_Validate_Func*)otv_gpos_validate_funcs;\n\n    otv_Lookup_validate( table, otvalid );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          GPOS TABLE                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->glyph_count */\n\n  FT_LOCAL_DEF( void )\n  otv_GPOS_validate( FT_Bytes      table,\n                     FT_UInt       glyph_count,\n                     FT_Validator  ftvalid )\n  {\n    OTV_ValidatorRec  validrec;\n    OTV_Validator     otvalid = &validrec;\n    FT_Bytes          p     = table;\n    FT_UInt           ScriptList, FeatureList, LookupList;\n\n\n    otvalid->root = ftvalid;\n\n    FT_TRACE3(( \"validating GPOS table\\n\" ));\n    OTV_INIT;\n\n    OTV_LIMIT_CHECK( 10 );\n\n    if ( FT_NEXT_ULONG( p ) != 0x10000UL )      /* Version */\n      FT_INVALID_FORMAT;\n\n    ScriptList  = FT_NEXT_USHORT( p );\n    FeatureList = FT_NEXT_USHORT( p );\n    LookupList  = FT_NEXT_USHORT( p );\n\n    otvalid->type_count  = 9;\n    otvalid->type_funcs  = (OTV_Validate_Func*)otv_gpos_validate_funcs;\n    otvalid->glyph_count = glyph_count;\n\n    otv_LookupList_validate( table + LookupList,\n                             otvalid );\n    otv_FeatureList_validate( table + FeatureList, table + LookupList,\n                              otvalid );\n    otv_ScriptList_validate( table + ScriptList, table + FeatureList,\n                             otvalid );\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvgpos.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvgpos.h                                                              */\n/*                                                                         */\n/*    OpenType GPOS table validator (specification).                       */\n/*                                                                         */\n/*  Copyright 2004 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __OTVGPOS_H__\n#define __OTVGPOS_H__\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( void )\n  otv_GPOS_subtable_validate( FT_Bytes       table,\n                              OTV_Validator  valid );\n\n\nFT_END_HEADER\n\n#endif /* __OTVGPOS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvgsub.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvgsub.c                                                              */\n/*                                                                         */\n/*    OpenType GSUB table validation (body).                               */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2007 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"otvalid.h\"\n#include \"otvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_otvgsub\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  GSUB LOOKUP TYPE 1                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* uses otvalid->glyph_count */\n\n  static void\n  otv_SingleSubst_validate( FT_Bytes       table,\n                            OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   SubstFormat;\n\n\n    OTV_NAME_ENTER( \"SingleSubst\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    SubstFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", SubstFormat ));\n\n    switch ( SubstFormat )\n    {\n    case 1:     /* SingleSubstFormat1 */\n      {\n        FT_Bytes  Coverage;\n        FT_Int    DeltaGlyphID;\n        FT_Long   idx;\n\n\n        OTV_LIMIT_CHECK( 4 );\n        Coverage     = table + FT_NEXT_USHORT( p );\n        DeltaGlyphID = FT_NEXT_SHORT( p );\n\n        otv_Coverage_validate( Coverage, otvalid, -1 );\n\n        idx = otv_Coverage_get_first( Coverage ) + DeltaGlyphID;\n        if ( idx < 0 )\n          FT_INVALID_DATA;\n\n        idx = otv_Coverage_get_last( Coverage ) + DeltaGlyphID;\n        if ( (FT_UInt)idx >= otvalid->glyph_count )\n          FT_INVALID_DATA;\n      }\n      break;\n\n    case 2:     /* SingleSubstFormat2 */\n      {\n        FT_UInt  Coverage, GlyphCount;\n\n\n        OTV_LIMIT_CHECK( 4 );\n        Coverage   = FT_NEXT_USHORT( p );\n        GlyphCount = FT_NEXT_USHORT( p );\n\n        OTV_TRACE(( \" (GlyphCount = %d)\\n\", GlyphCount ));\n\n        otv_Coverage_validate( table + Coverage, otvalid, GlyphCount );\n\n        OTV_LIMIT_CHECK( GlyphCount * 2 );\n\n        /* Substitute */\n        for ( ; GlyphCount > 0; GlyphCount-- )\n          if ( FT_NEXT_USHORT( p ) >= otvalid->glyph_count )\n            FT_INVALID_GLYPH_ID;\n      }\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  GSUB LOOKUP TYPE 2                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->extra1 (glyph count) */\n\n  static void\n  otv_MultipleSubst_validate( FT_Bytes       table,\n                              OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   SubstFormat;\n\n\n    OTV_NAME_ENTER( \"MultipleSubst\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    SubstFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", SubstFormat ));\n\n    switch ( SubstFormat )\n    {\n    case 1:\n      otvalid->extra1 = otvalid->glyph_count;\n      OTV_NEST2( MultipleSubstFormat1, Sequence );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    GSUB LOOKUP TYPE 3                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->extra1 (glyph count) */\n\n  static void\n  otv_AlternateSubst_validate( FT_Bytes       table,\n                               OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   SubstFormat;\n\n\n    OTV_NAME_ENTER( \"AlternateSubst\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    SubstFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", SubstFormat ));\n\n    switch ( SubstFormat )\n    {\n    case 1:\n      otvalid->extra1 = otvalid->glyph_count;\n      OTV_NEST2( AlternateSubstFormat1, AlternateSet );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    GSUB LOOKUP TYPE 4                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define LigatureFunc  otv_Ligature_validate\n\n  /* uses otvalid->glyph_count */\n\n  static void\n  otv_Ligature_validate( FT_Bytes       table,\n                         OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   LigatureGlyph, CompCount;\n\n\n    OTV_ENTER;\n\n    OTV_LIMIT_CHECK( 4 );\n    LigatureGlyph = FT_NEXT_USHORT( p );\n    if ( LigatureGlyph >= otvalid->glyph_count )\n      FT_INVALID_DATA;\n\n    CompCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (CompCount = %d)\\n\", CompCount ));\n\n    if ( CompCount == 0 )\n      FT_INVALID_DATA;\n\n    CompCount--;\n\n    OTV_LIMIT_CHECK( CompCount * 2 );     /* Component */\n\n    /* no need to check the Component glyph indices */\n\n    OTV_EXIT;\n  }\n\n\n  static void\n  otv_LigatureSubst_validate( FT_Bytes       table,\n                              OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   SubstFormat;\n\n\n    OTV_NAME_ENTER( \"LigatureSubst\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    SubstFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", SubstFormat ));\n\n    switch ( SubstFormat )\n    {\n    case 1:\n      OTV_NEST3( LigatureSubstFormat1, LigatureSet, Ligature );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  GSUB LOOKUP TYPE 5                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->extra1 (lookup count) */\n\n  static void\n  otv_ContextSubst_validate( FT_Bytes       table,\n                             OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   SubstFormat;\n\n\n    OTV_NAME_ENTER( \"ContextSubst\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    SubstFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", SubstFormat ));\n\n    switch ( SubstFormat )\n    {\n    case 1:\n      /* no need to check glyph indices/classes used as input for these */\n      /* context rules since even invalid glyph indices/classes return  */\n      /* meaningful results                                             */\n\n      otvalid->extra1 = otvalid->lookup_count;\n      OTV_NEST3( ContextSubstFormat1, SubRuleSet, SubRule );\n      OTV_RUN( table, otvalid );\n      break;\n\n    case 2:\n      /* no need to check glyph indices/classes used as input for these */\n      /* context rules since even invalid glyph indices/classes return  */\n      /* meaningful results                                             */\n\n      OTV_NEST3( ContextSubstFormat2, SubClassSet, SubClassRule );\n      OTV_RUN( table, otvalid );\n      break;\n\n    case 3:\n      OTV_NEST1( ContextSubstFormat3 );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    GSUB LOOKUP TYPE 6                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->extra1 (lookup count)            */\n\n  static void\n  otv_ChainContextSubst_validate( FT_Bytes       table,\n                                  OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   SubstFormat;\n\n\n    OTV_NAME_ENTER( \"ChainContextSubst\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    SubstFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", SubstFormat ));\n\n    switch ( SubstFormat )\n    {\n    case 1:\n      /* no need to check glyph indices/classes used as input for these */\n      /* context rules since even invalid glyph indices/classes return  */\n      /* meaningful results                                             */\n\n      otvalid->extra1 = otvalid->lookup_count;\n      OTV_NEST3( ChainContextSubstFormat1,\n                 ChainSubRuleSet, ChainSubRule );\n      OTV_RUN( table, otvalid );\n      break;\n\n    case 2:\n      /* no need to check glyph indices/classes used as input for these */\n      /* context rules since even invalid glyph indices/classes return  */\n      /* meaningful results                                             */\n\n      OTV_NEST3( ChainContextSubstFormat2,\n                 ChainSubClassSet, ChainSubClassRule );\n      OTV_RUN( table, otvalid );\n      break;\n\n    case 3:\n      OTV_NEST1( ChainContextSubstFormat3 );\n      OTV_RUN( table, otvalid );\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    GSUB LOOKUP TYPE 7                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* uses otvalid->type_funcs */\n\n  static void\n  otv_ExtensionSubst_validate( FT_Bytes       table,\n                               OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   SubstFormat;\n\n\n    OTV_NAME_ENTER( \"ExtensionSubst\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    SubstFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", SubstFormat ));\n\n    switch ( SubstFormat )\n    {\n    case 1:     /* ExtensionSubstFormat1 */\n      {\n        FT_UInt            ExtensionLookupType;\n        FT_ULong           ExtensionOffset;\n        OTV_Validate_Func  validate;\n\n\n        OTV_LIMIT_CHECK( 6 );\n        ExtensionLookupType = FT_NEXT_USHORT( p );\n        ExtensionOffset     = FT_NEXT_ULONG( p );\n\n        if ( ExtensionLookupType == 0 ||\n             ExtensionLookupType == 7 ||\n             ExtensionLookupType > 8  )\n          FT_INVALID_DATA;\n\n        validate = otvalid->type_funcs[ExtensionLookupType - 1];\n        validate( table + ExtensionOffset, otvalid );\n      }\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    GSUB LOOKUP TYPE 8                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* uses otvalid->glyph_count */\n\n  static void\n  otv_ReverseChainSingleSubst_validate( FT_Bytes       table,\n                                        OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table, Coverage;\n    FT_UInt   SubstFormat;\n    FT_UInt   BacktrackGlyphCount, LookaheadGlyphCount, GlyphCount;\n\n\n    OTV_NAME_ENTER( \"ReverseChainSingleSubst\" );\n\n    OTV_LIMIT_CHECK( 2 );\n    SubstFormat = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (format %d)\\n\", SubstFormat ));\n\n    switch ( SubstFormat )\n    {\n    case 1:     /* ReverseChainSingleSubstFormat1 */\n      OTV_LIMIT_CHECK( 4 );\n      Coverage            = table + FT_NEXT_USHORT( p );\n      BacktrackGlyphCount = FT_NEXT_USHORT( p );\n\n      OTV_TRACE(( \" (BacktrackGlyphCount = %d)\\n\", BacktrackGlyphCount ));\n\n      otv_Coverage_validate( Coverage, otvalid, -1 );\n\n      OTV_LIMIT_CHECK( BacktrackGlyphCount * 2 + 2 );\n\n      for ( ; BacktrackGlyphCount > 0; BacktrackGlyphCount-- )\n        otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );\n\n      LookaheadGlyphCount = FT_NEXT_USHORT( p );\n\n      OTV_TRACE(( \" (LookaheadGlyphCount = %d)\\n\", LookaheadGlyphCount ));\n\n      OTV_LIMIT_CHECK( LookaheadGlyphCount * 2 + 2 );\n\n      for ( ; LookaheadGlyphCount > 0; LookaheadGlyphCount-- )\n        otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );\n\n      GlyphCount = FT_NEXT_USHORT( p );\n\n      OTV_TRACE(( \" (GlyphCount = %d)\\n\", GlyphCount ));\n\n      if ( GlyphCount != otv_Coverage_get_count( Coverage ) )\n        FT_INVALID_DATA;\n\n      OTV_LIMIT_CHECK( GlyphCount * 2 );\n\n      /* Substitute */\n      for ( ; GlyphCount > 0; GlyphCount-- )\n        if ( FT_NEXT_USHORT( p ) >= otvalid->glyph_count )\n          FT_INVALID_DATA;\n\n      break;\n\n    default:\n      FT_INVALID_FORMAT;\n    }\n\n    OTV_EXIT;\n  }\n\n\n  static const OTV_Validate_Func  otv_gsub_validate_funcs[8] =\n  {\n    otv_SingleSubst_validate,\n    otv_MultipleSubst_validate,\n    otv_AlternateSubst_validate,\n    otv_LigatureSubst_validate,\n    otv_ContextSubst_validate,\n    otv_ChainContextSubst_validate,\n    otv_ExtensionSubst_validate,\n    otv_ReverseChainSingleSubst_validate\n  };\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          GSUB TABLE                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->type_count  */\n  /* sets otvalid->type_funcs  */\n  /* sets otvalid->glyph_count */\n\n  FT_LOCAL_DEF( void )\n  otv_GSUB_validate( FT_Bytes      table,\n                     FT_UInt       glyph_count,\n                     FT_Validator  ftvalid )\n  {\n    OTV_ValidatorRec  otvalidrec;\n    OTV_Validator     otvalid = &otvalidrec;\n    FT_Bytes          p       = table;\n    FT_UInt           ScriptList, FeatureList, LookupList;\n\n\n    otvalid->root = ftvalid;\n\n    FT_TRACE3(( \"validating GSUB table\\n\" ));\n    OTV_INIT;\n\n    OTV_LIMIT_CHECK( 10 );\n\n    if ( FT_NEXT_ULONG( p ) != 0x10000UL )      /* Version */\n      FT_INVALID_FORMAT;\n\n    ScriptList  = FT_NEXT_USHORT( p );\n    FeatureList = FT_NEXT_USHORT( p );\n    LookupList  = FT_NEXT_USHORT( p );\n\n    otvalid->type_count  = 8;\n    otvalid->type_funcs  = (OTV_Validate_Func*)otv_gsub_validate_funcs;\n    otvalid->glyph_count = glyph_count;\n\n    otv_LookupList_validate( table + LookupList,\n                             otvalid );\n    otv_FeatureList_validate( table + FeatureList, table + LookupList,\n                              otvalid );\n    otv_ScriptList_validate( table + ScriptList, table + FeatureList,\n                             otvalid );\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvjstf.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvjstf.c                                                              */\n/*                                                                         */\n/*    OpenType JSTF table validation (body).                               */\n/*                                                                         */\n/*  Copyright 2004, 2007 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"otvalid.h\"\n#include \"otvcommn.h\"\n#include \"otvgpos.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_otvjstf\n\n\n#define JstfPriorityFunc  otv_JstfPriority_validate\n#define JstfLookupFunc    otv_GPOS_subtable_validate\n\n  /* uses otvalid->extra1 (GSUB lookup count) */\n  /* uses otvalid->extra2 (GPOS lookup count) */\n  /* sets otvalid->extra1 (counter)           */\n\n  static void\n  otv_JstfPriority_validate( FT_Bytes       table,\n                             OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   table_size;\n    FT_UInt   gsub_lookup_count, gpos_lookup_count;\n\n    OTV_OPTIONAL_TABLE( ShrinkageEnableGSUB  );\n    OTV_OPTIONAL_TABLE( ShrinkageDisableGSUB );\n    OTV_OPTIONAL_TABLE( ShrinkageEnableGPOS  );\n    OTV_OPTIONAL_TABLE( ShrinkageDisableGPOS );\n    OTV_OPTIONAL_TABLE( ExtensionEnableGSUB  );\n    OTV_OPTIONAL_TABLE( ExtensionDisableGSUB );\n    OTV_OPTIONAL_TABLE( ExtensionEnableGPOS  );\n    OTV_OPTIONAL_TABLE( ExtensionDisableGPOS );\n    OTV_OPTIONAL_TABLE( ShrinkageJstfMax );\n    OTV_OPTIONAL_TABLE( ExtensionJstfMax );\n\n\n    OTV_ENTER;\n    OTV_TRACE(( \"JstfPriority table\\n\" ));\n\n    OTV_LIMIT_CHECK( 20 );\n\n    gsub_lookup_count = otvalid->extra1;\n    gpos_lookup_count = otvalid->extra2;\n\n    table_size = 20;\n\n    otvalid->extra1 = gsub_lookup_count;\n\n    OTV_OPTIONAL_OFFSET( ShrinkageEnableGSUB );\n    OTV_SIZE_CHECK( ShrinkageEnableGSUB );\n    if ( ShrinkageEnableGSUB )\n      otv_x_ux( table + ShrinkageEnableGSUB, otvalid );\n\n    OTV_OPTIONAL_OFFSET( ShrinkageDisableGSUB );\n    OTV_SIZE_CHECK( ShrinkageDisableGSUB );\n    if ( ShrinkageDisableGSUB )\n      otv_x_ux( table + ShrinkageDisableGSUB, otvalid );\n\n    otvalid->extra1 = gpos_lookup_count;\n\n    OTV_OPTIONAL_OFFSET( ShrinkageEnableGPOS );\n    OTV_SIZE_CHECK( ShrinkageEnableGPOS );\n    if ( ShrinkageEnableGPOS )\n      otv_x_ux( table + ShrinkageEnableGPOS, otvalid );\n\n    OTV_OPTIONAL_OFFSET( ShrinkageDisableGPOS );\n    OTV_SIZE_CHECK( ShrinkageDisableGPOS );\n    if ( ShrinkageDisableGPOS )\n      otv_x_ux( table + ShrinkageDisableGPOS, otvalid );\n\n    OTV_OPTIONAL_OFFSET( ShrinkageJstfMax );\n    OTV_SIZE_CHECK( ShrinkageJstfMax );\n    if ( ShrinkageJstfMax )\n    {\n      /* XXX: check lookup types? */\n      OTV_NEST2( JstfMax, JstfLookup );\n      OTV_RUN( table + ShrinkageJstfMax, otvalid );\n    }\n\n    otvalid->extra1 = gsub_lookup_count;\n\n    OTV_OPTIONAL_OFFSET( ExtensionEnableGSUB );\n    OTV_SIZE_CHECK( ExtensionEnableGSUB );\n    if ( ExtensionEnableGSUB )\n      otv_x_ux( table + ExtensionEnableGSUB, otvalid );\n\n    OTV_OPTIONAL_OFFSET( ExtensionDisableGSUB );\n    OTV_SIZE_CHECK( ExtensionDisableGSUB );\n    if ( ExtensionDisableGSUB )\n      otv_x_ux( table + ExtensionDisableGSUB, otvalid );\n\n    otvalid->extra1 = gpos_lookup_count;\n\n    OTV_OPTIONAL_OFFSET( ExtensionEnableGPOS );\n    OTV_SIZE_CHECK( ExtensionEnableGPOS );\n    if ( ExtensionEnableGPOS )\n      otv_x_ux( table + ExtensionEnableGPOS, otvalid );\n\n    OTV_OPTIONAL_OFFSET( ExtensionDisableGPOS );\n    OTV_SIZE_CHECK( ExtensionDisableGPOS );\n    if ( ExtensionDisableGPOS )\n      otv_x_ux( table + ExtensionDisableGPOS, otvalid );\n\n    OTV_OPTIONAL_OFFSET( ExtensionJstfMax );\n    OTV_SIZE_CHECK( ExtensionJstfMax );\n    if ( ExtensionJstfMax )\n    {\n      /* XXX: check lookup types? */\n      OTV_NEST2( JstfMax, JstfLookup );\n      OTV_RUN( table + ExtensionJstfMax, otvalid );\n    }\n\n    otvalid->extra1 = gsub_lookup_count;\n    otvalid->extra2 = gpos_lookup_count;\n\n    OTV_EXIT;\n  }\n\n\n  /* sets otvalid->extra (glyph count)               */\n  /* sets otvalid->func1 (otv_JstfPriority_validate) */\n\n  static void\n  otv_JstfScript_validate( FT_Bytes       table,\n                           OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   table_size;\n    FT_UInt   JstfLangSysCount;\n\n    OTV_OPTIONAL_TABLE( ExtGlyph );\n    OTV_OPTIONAL_TABLE( DefJstfLangSys );\n\n\n    OTV_NAME_ENTER( \"JstfScript\" );\n\n    OTV_LIMIT_CHECK( 6 );\n    OTV_OPTIONAL_OFFSET( ExtGlyph );\n    OTV_OPTIONAL_OFFSET( DefJstfLangSys );\n    JstfLangSysCount = FT_NEXT_USHORT( p );\n\n    OTV_TRACE(( \" (JstfLangSysCount = %d)\\n\", JstfLangSysCount ));\n\n    table_size = JstfLangSysCount * 6 + 6;\n\n    OTV_SIZE_CHECK( ExtGlyph );\n    if ( ExtGlyph )\n    {\n      otvalid->extra1 = otvalid->glyph_count;\n      OTV_NEST1( ExtenderGlyph );\n      OTV_RUN( table + ExtGlyph, otvalid );\n    }\n\n    OTV_SIZE_CHECK( DefJstfLangSys );\n    if ( DefJstfLangSys )\n    {\n      OTV_NEST2( JstfLangSys, JstfPriority );\n      OTV_RUN( table + DefJstfLangSys, otvalid );\n    }\n\n    OTV_LIMIT_CHECK( 6 * JstfLangSysCount );\n\n    /* JstfLangSysRecord */\n    OTV_NEST2( JstfLangSys, JstfPriority );\n    for ( ; JstfLangSysCount > 0; JstfLangSysCount-- )\n    {\n      p += 4;       /* skip JstfLangSysTag */\n\n      OTV_RUN( table + FT_NEXT_USHORT( p ), otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /* sets otvalid->extra1 (GSUB lookup count) */\n  /* sets otvalid->extra2 (GPOS lookup count) */\n  /* sets otvalid->glyph_count                */\n\n  FT_LOCAL_DEF( void )\n  otv_JSTF_validate( FT_Bytes      table,\n                     FT_Bytes      gsub,\n                     FT_Bytes      gpos,\n                     FT_UInt       glyph_count,\n                     FT_Validator  ftvalid )\n  {\n    OTV_ValidatorRec  otvalidrec;\n    OTV_Validator     otvalid = &otvalidrec;\n    FT_Bytes          p     = table;\n    FT_UInt           JstfScriptCount;\n\n\n    otvalid->root = ftvalid;\n\n\n    FT_TRACE3(( \"validating JSTF table\\n\" ));\n    OTV_INIT;\n\n    OTV_LIMIT_CHECK( 6 );\n\n    if ( FT_NEXT_ULONG( p ) != 0x10000UL )      /* Version */\n      FT_INVALID_FORMAT;\n\n    JstfScriptCount = FT_NEXT_USHORT( p );\n\n    FT_TRACE3(( \" (JstfScriptCount = %d)\\n\", JstfScriptCount ));\n\n    OTV_LIMIT_CHECK( JstfScriptCount * 6 );\n\n    if ( gsub )\n      otvalid->extra1 = otv_GSUBGPOS_get_Lookup_count( gsub );\n    else\n      otvalid->extra1 = 0;\n\n    if ( gpos )\n      otvalid->extra2 = otv_GSUBGPOS_get_Lookup_count( gpos );\n    else\n      otvalid->extra2 = 0;\n\n    otvalid->glyph_count = glyph_count;\n\n    /* JstfScriptRecord */\n    for ( ; JstfScriptCount > 0; JstfScriptCount-- )\n    {\n      p += 4;       /* skip JstfScriptTag */\n\n      /* JstfScript */\n      otv_JstfScript_validate( table + FT_NEXT_USHORT( p ), otvalid );\n    }\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvmath.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvmath.c                                                              */\n/*                                                                         */\n/*    OpenType MATH table validation (body).                               */\n/*                                                                         */\n/*  Copyright 2007, 2008 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  Written by George Williams.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"otvalid.h\"\n#include \"otvcommn.h\"\n#include \"otvgpos.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_otvmath\n\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  MATH TYPOGRAPHIC CONSTANTS                   *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  otv_MathConstants_validate( FT_Bytes       table,\n                              OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   i;\n    FT_UInt   table_size;\n\n    OTV_OPTIONAL_TABLE( DeviceTableOffset );\n\n\n    OTV_NAME_ENTER( \"MathConstants\" );\n\n    /* 56 constants, 51 have device tables */\n    OTV_LIMIT_CHECK( 2 * ( 56 + 51 ) );\n    table_size = 2 * ( 56 + 51 );\n\n    p += 4 * 2;                 /* First 4 constants have no device tables */\n    for ( i = 0; i < 51; ++i )\n    {\n      p += 2;                                            /* skip the value */\n      OTV_OPTIONAL_OFFSET( DeviceTableOffset );\n      OTV_SIZE_CHECK( DeviceTableOffset );\n      if ( DeviceTableOffset )\n        otv_Device_validate( table + DeviceTableOffset, otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                   MATH ITALICS CORRECTION                     *****/\n  /*****                 MATH TOP ACCENT ATTACHMENT                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  otv_MathItalicsCorrectionInfo_validate( FT_Bytes       table,\n                                          OTV_Validator  otvalid,\n                                          FT_Int         isItalic )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   i, cnt, table_size ;\n\n    OTV_OPTIONAL_TABLE( Coverage );\n    OTV_OPTIONAL_TABLE( DeviceTableOffset );\n\n    FT_UNUSED( isItalic );  /* only used if tracing is active */\n\n\n    OTV_NAME_ENTER( isItalic ? \"MathItalicsCorrectionInfo\"\n                             : \"MathTopAccentAttachment\" );\n\n    OTV_LIMIT_CHECK( 4 );\n\n    OTV_OPTIONAL_OFFSET( Coverage );\n    cnt = FT_NEXT_USHORT( p );\n\n    OTV_LIMIT_CHECK( 4 * cnt );\n    table_size = 4 + 4 * cnt;\n\n    OTV_SIZE_CHECK( Coverage );\n    otv_Coverage_validate( table + Coverage, otvalid, cnt );\n\n    for ( i = 0; i < cnt; ++i )\n    {\n      p += 2;                                            /* Skip the value */\n      OTV_OPTIONAL_OFFSET( DeviceTableOffset );\n      OTV_SIZE_CHECK( DeviceTableOffset );\n      if ( DeviceTableOffset )\n        otv_Device_validate( table + DeviceTableOffset, otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                           MATH KERNING                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  otv_MathKern_validate( FT_Bytes       table,\n                         OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   i, cnt, table_size;\n\n    OTV_OPTIONAL_TABLE( DeviceTableOffset );\n\n\n    /* OTV_NAME_ENTER( \"MathKern\" );*/\n\n    OTV_LIMIT_CHECK( 2 );\n\n    cnt = FT_NEXT_USHORT( p );\n\n    OTV_LIMIT_CHECK( 4 * cnt + 2 );\n    table_size = 4 + 4 * cnt;\n\n    /* Heights */\n    for ( i = 0; i < cnt; ++i )\n    {\n      p += 2;                                            /* Skip the value */\n      OTV_OPTIONAL_OFFSET( DeviceTableOffset );\n      OTV_SIZE_CHECK( DeviceTableOffset );\n      if ( DeviceTableOffset )\n        otv_Device_validate( table + DeviceTableOffset, otvalid );\n    }\n\n    /* One more Kerning value */\n    for ( i = 0; i < cnt + 1; ++i )\n    {\n      p += 2;                                            /* Skip the value */\n      OTV_OPTIONAL_OFFSET( DeviceTableOffset );\n      OTV_SIZE_CHECK( DeviceTableOffset );\n      if ( DeviceTableOffset )\n        otv_Device_validate( table + DeviceTableOffset, otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  static void\n  otv_MathKernInfo_validate( FT_Bytes       table,\n                             OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   i, j, cnt, table_size;\n\n    OTV_OPTIONAL_TABLE( Coverage );\n    OTV_OPTIONAL_TABLE( MKRecordOffset );\n\n\n    OTV_NAME_ENTER( \"MathKernInfo\" );\n\n    OTV_LIMIT_CHECK( 4 );\n\n    OTV_OPTIONAL_OFFSET( Coverage );\n    cnt = FT_NEXT_USHORT( p );\n\n    OTV_LIMIT_CHECK( 8 * cnt );\n    table_size = 4 + 8 * cnt;\n\n    OTV_SIZE_CHECK( Coverage );\n    otv_Coverage_validate( table + Coverage, otvalid, cnt );\n\n    for ( i = 0; i < cnt; ++i )\n    {\n      for ( j = 0; j < 4; ++j )\n      {\n        OTV_OPTIONAL_OFFSET( MKRecordOffset );\n        OTV_SIZE_CHECK( MKRecordOffset );\n        if ( MKRecordOffset )\n          otv_MathKern_validate( table + MKRecordOffset, otvalid );\n      }\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                         MATH GLYPH INFO                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  otv_MathGlyphInfo_validate( FT_Bytes       table,\n                              OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   MathItalicsCorrectionInfo, MathTopAccentAttachment;\n    FT_UInt   ExtendedShapeCoverage, MathKernInfo;\n\n\n    OTV_NAME_ENTER( \"MathGlyphInfo\" );\n\n    OTV_LIMIT_CHECK( 8 );\n\n    MathItalicsCorrectionInfo = FT_NEXT_USHORT( p );\n    MathTopAccentAttachment   = FT_NEXT_USHORT( p );\n    ExtendedShapeCoverage     = FT_NEXT_USHORT( p );\n    MathKernInfo              = FT_NEXT_USHORT( p );\n\n    if ( MathItalicsCorrectionInfo )\n      otv_MathItalicsCorrectionInfo_validate(\n        table + MathItalicsCorrectionInfo, otvalid, TRUE );\n\n    /* Italic correction and Top Accent Attachment have the same format */\n    if ( MathTopAccentAttachment )\n      otv_MathItalicsCorrectionInfo_validate(\n        table + MathTopAccentAttachment, otvalid, FALSE );\n\n    if ( ExtendedShapeCoverage )\n    {\n      OTV_NAME_ENTER( \"ExtendedShapeCoverage\" );\n      otv_Coverage_validate( table + ExtendedShapeCoverage, otvalid, -1 );\n      OTV_EXIT;\n    }\n\n    if ( MathKernInfo )\n      otv_MathKernInfo_validate( table + MathKernInfo, otvalid );\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    MATH GLYPH CONSTRUCTION                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  otv_GlyphAssembly_validate( FT_Bytes       table,\n                              OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   pcnt, table_size;\n    FT_UInt   i;\n\n    OTV_OPTIONAL_TABLE( DeviceTableOffset );\n\n\n    /* OTV_NAME_ENTER( \"GlyphAssembly\" ); */\n\n    OTV_LIMIT_CHECK( 6 );\n\n    p += 2;                           /* Skip the Italics Correction value */\n    OTV_OPTIONAL_OFFSET( DeviceTableOffset );\n    pcnt = FT_NEXT_USHORT( p );\n\n    OTV_LIMIT_CHECK( 8 * pcnt );\n    table_size = 6 + 8 * pcnt;\n\n    OTV_SIZE_CHECK( DeviceTableOffset );\n    if ( DeviceTableOffset )\n      otv_Device_validate( table + DeviceTableOffset, otvalid );\n\n    for ( i = 0; i < pcnt; ++i )\n    {\n      FT_UInt  gid;\n\n\n      gid = FT_NEXT_USHORT( p );\n      if ( gid >= otvalid->glyph_count )\n        FT_INVALID_GLYPH_ID;\n      p += 2*4;             /* skip the Start, End, Full, and Flags fields */\n    }\n\n    /* OTV_EXIT; */\n  }\n\n\n  static void\n  otv_MathGlyphConstruction_validate( FT_Bytes       table,\n                                      OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   vcnt, table_size;\n    FT_UInt   i;\n\n    OTV_OPTIONAL_TABLE( GlyphAssembly );\n\n\n    /* OTV_NAME_ENTER( \"MathGlyphConstruction\" ); */\n\n    OTV_LIMIT_CHECK( 4 );\n\n    OTV_OPTIONAL_OFFSET( GlyphAssembly );\n    vcnt = FT_NEXT_USHORT( p );\n\n    OTV_LIMIT_CHECK( 4 * vcnt );\n    table_size = 4 + 4 * vcnt;\n\n    for ( i = 0; i < vcnt; ++i )\n    {\n      FT_UInt  gid;\n\n\n      gid = FT_NEXT_USHORT( p );\n      if ( gid >= otvalid->glyph_count )\n        FT_INVALID_GLYPH_ID;\n      p += 2;                          /* skip the size */\n    }\n\n    OTV_SIZE_CHECK( GlyphAssembly );\n    if ( GlyphAssembly )\n      otv_GlyphAssembly_validate( table+GlyphAssembly, otvalid );\n\n    /* OTV_EXIT; */\n  }\n\n\n  static void\n  otv_MathVariants_validate( FT_Bytes       table,\n                             OTV_Validator  otvalid )\n  {\n    FT_Bytes  p = table;\n    FT_UInt   vcnt, hcnt, i, table_size;\n\n    OTV_OPTIONAL_TABLE( VCoverage );\n    OTV_OPTIONAL_TABLE( HCoverage );\n    OTV_OPTIONAL_TABLE( Offset );\n\n\n    OTV_NAME_ENTER( \"MathVariants\" );\n\n    OTV_LIMIT_CHECK( 10 );\n\n    p += 2;                       /* Skip the MinConnectorOverlap constant */\n    OTV_OPTIONAL_OFFSET( VCoverage );\n    OTV_OPTIONAL_OFFSET( HCoverage );\n    vcnt = FT_NEXT_USHORT( p );\n    hcnt = FT_NEXT_USHORT( p );\n\n    OTV_LIMIT_CHECK( 2 * vcnt + 2 * hcnt );\n    table_size = 10 + 2 * vcnt + 2 * hcnt;\n\n    OTV_SIZE_CHECK( VCoverage );\n    if ( VCoverage )\n      otv_Coverage_validate( table + VCoverage, otvalid, vcnt );\n\n    OTV_SIZE_CHECK( HCoverage );\n    if ( HCoverage )\n      otv_Coverage_validate( table + HCoverage, otvalid, hcnt );\n\n    for ( i = 0; i < vcnt; ++i )\n    {\n      OTV_OPTIONAL_OFFSET( Offset );\n      OTV_SIZE_CHECK( Offset );\n      otv_MathGlyphConstruction_validate( table + Offset, otvalid );\n    }\n\n    for ( i = 0; i < hcnt; ++i )\n    {\n      OTV_OPTIONAL_OFFSET( Offset );\n      OTV_SIZE_CHECK( Offset );\n      otv_MathGlyphConstruction_validate( table + Offset, otvalid );\n    }\n\n    OTV_EXIT;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          MATH TABLE                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* sets otvalid->glyph_count */\n\n  FT_LOCAL_DEF( void )\n  otv_MATH_validate( FT_Bytes      table,\n                     FT_UInt       glyph_count,\n                     FT_Validator  ftvalid )\n  {\n    OTV_ValidatorRec  otvalidrec;\n    OTV_Validator     otvalid = &otvalidrec;\n    FT_Bytes          p       = table;\n    FT_UInt           MathConstants, MathGlyphInfo, MathVariants;\n\n\n    otvalid->root = ftvalid;\n\n    FT_TRACE3(( \"validating MATH table\\n\" ));\n    OTV_INIT;\n\n    OTV_LIMIT_CHECK( 10 );\n\n    if ( FT_NEXT_ULONG( p ) != 0x10000UL )      /* Version */\n      FT_INVALID_FORMAT;\n\n    MathConstants = FT_NEXT_USHORT( p );\n    MathGlyphInfo = FT_NEXT_USHORT( p );\n    MathVariants  = FT_NEXT_USHORT( p );\n\n    otvalid->glyph_count = glyph_count;\n\n    otv_MathConstants_validate( table + MathConstants,\n                                otvalid );\n    otv_MathGlyphInfo_validate( table + MathGlyphInfo,\n                                otvalid );\n    otv_MathVariants_validate ( table + MathVariants,\n                                otvalid );\n\n    FT_TRACE4(( \"\\n\" ));\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvmod.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvmod.c                                                               */\n/*                                                                         */\n/*    FreeType's OpenType validation module implementation (body).         */\n/*                                                                         */\n/*  Copyright 2004-2008, 2013 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_TRUETYPE_TABLES_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_OPENTYPE_VALIDATE_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_OPENTYPE_VALIDATE_H\n\n#include \"otvmod.h\"\n#include \"otvalid.h\"\n#include \"otvcommn.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_otvmodule\n\n\n  static FT_Error\n  otv_load_table( FT_Face             face,\n                  FT_Tag              tag,\n                  FT_Byte* volatile*  table,\n                  FT_ULong*           table_len )\n  {\n    FT_Error   error;\n    FT_Memory  memory = FT_FACE_MEMORY( face );\n\n\n    error = FT_Load_Sfnt_Table( face, tag, 0, NULL, table_len );\n    if ( FT_ERR_EQ( error, Table_Missing ) )\n      return FT_Err_Ok;\n    if ( error )\n      goto Exit;\n\n    if ( FT_ALLOC( *table, *table_len ) )\n      goto Exit;\n\n    error = FT_Load_Sfnt_Table( face, tag, 0, *table, table_len );\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  otv_validate( FT_Face volatile   face,\n                FT_UInt            ot_flags,\n                FT_Bytes          *ot_base,\n                FT_Bytes          *ot_gdef,\n                FT_Bytes          *ot_gpos,\n                FT_Bytes          *ot_gsub,\n                FT_Bytes          *ot_jstf )\n  {\n    FT_Error                  error = FT_Err_Ok;\n    FT_Byte* volatile         base;\n    FT_Byte* volatile         gdef;\n    FT_Byte* volatile         gpos;\n    FT_Byte* volatile         gsub;\n    FT_Byte* volatile         jstf;\n    FT_Byte* volatile         math;\n    FT_ULong                  len_base, len_gdef, len_gpos, len_gsub, len_jstf;\n    FT_ULong                  len_math;\n    FT_UInt                   num_glyphs = (FT_UInt)face->num_glyphs;\n    FT_ValidatorRec volatile  valid;\n\n\n    base     = gdef     = gpos     = gsub     = jstf     = math     = NULL;\n    len_base = len_gdef = len_gpos = len_gsub = len_jstf = len_math = 0;\n\n    /*\n     * XXX: OpenType tables cannot handle 32-bit glyph index,\n     *      although broken TrueType can have 32-bit glyph index.\n     */\n    if ( face->num_glyphs > 0xFFFFL )\n    {\n      FT_TRACE1(( \"otv_validate: Invalid glyphs index (0x0000FFFF - 0x%08x) \",\n                  face->num_glyphs ));\n      FT_TRACE1(( \"are not handled by OpenType tables\\n\" ));\n      num_glyphs = 0xFFFF;\n    }\n\n    /* load tables */\n\n    if ( ot_flags & FT_VALIDATE_BASE )\n    {\n      error = otv_load_table( face, TTAG_BASE, &base, &len_base );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( ot_flags & FT_VALIDATE_GDEF )\n    {\n      error = otv_load_table( face, TTAG_GDEF, &gdef, &len_gdef );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( ot_flags & FT_VALIDATE_GPOS )\n    {\n      error = otv_load_table( face, TTAG_GPOS, &gpos, &len_gpos );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( ot_flags & FT_VALIDATE_GSUB )\n    {\n      error = otv_load_table( face, TTAG_GSUB, &gsub, &len_gsub );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( ot_flags & FT_VALIDATE_JSTF )\n    {\n      error = otv_load_table( face, TTAG_JSTF, &jstf, &len_jstf );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( ot_flags & FT_VALIDATE_MATH )\n    {\n      error = otv_load_table( face, TTAG_MATH, &math, &len_math );\n      if ( error )\n        goto Exit;\n    }\n\n    /* validate tables */\n\n    if ( base )\n    {\n      ft_validator_init( &valid, base, base + len_base, FT_VALIDATE_DEFAULT );\n      if ( ft_setjmp( valid.jump_buffer ) == 0 )\n        otv_BASE_validate( base, &valid );\n      error = valid.error;\n      if ( error )\n        goto Exit;\n    }\n\n    if ( gpos )\n    {\n      ft_validator_init( &valid, gpos, gpos + len_gpos, FT_VALIDATE_DEFAULT );\n      if ( ft_setjmp( valid.jump_buffer ) == 0 )\n        otv_GPOS_validate( gpos, num_glyphs, &valid );\n      error = valid.error;\n      if ( error )\n        goto Exit;\n    }\n\n    if ( gsub )\n    {\n      ft_validator_init( &valid, gsub, gsub + len_gsub, FT_VALIDATE_DEFAULT );\n      if ( ft_setjmp( valid.jump_buffer ) == 0 )\n        otv_GSUB_validate( gsub, num_glyphs, &valid );\n      error = valid.error;\n      if ( error )\n        goto Exit;\n    }\n\n    if ( gdef )\n    {\n      ft_validator_init( &valid, gdef, gdef + len_gdef, FT_VALIDATE_DEFAULT );\n      if ( ft_setjmp( valid.jump_buffer ) == 0 )\n        otv_GDEF_validate( gdef, gsub, gpos, num_glyphs, &valid );\n      error = valid.error;\n      if ( error )\n        goto Exit;\n    }\n\n    if ( jstf )\n    {\n      ft_validator_init( &valid, jstf, jstf + len_jstf, FT_VALIDATE_DEFAULT );\n      if ( ft_setjmp( valid.jump_buffer ) == 0 )\n        otv_JSTF_validate( jstf, gsub, gpos, num_glyphs, &valid );\n      error = valid.error;\n      if ( error )\n        goto Exit;\n    }\n\n    if ( math )\n    {\n      ft_validator_init( &valid, math, math + len_math, FT_VALIDATE_DEFAULT );\n      if ( ft_setjmp( valid.jump_buffer ) == 0 )\n        otv_MATH_validate( math, num_glyphs, &valid );\n      error = valid.error;\n      if ( error )\n        goto Exit;\n    }\n\n    *ot_base = (FT_Bytes)base;\n    *ot_gdef = (FT_Bytes)gdef;\n    *ot_gpos = (FT_Bytes)gpos;\n    *ot_gsub = (FT_Bytes)gsub;\n    *ot_jstf = (FT_Bytes)jstf;\n\n  Exit:\n    if ( error )\n    {\n      FT_Memory  memory = FT_FACE_MEMORY( face );\n\n\n      FT_FREE( base );\n      FT_FREE( gdef );\n      FT_FREE( gpos );\n      FT_FREE( gsub );\n      FT_FREE( jstf );\n    }\n\n    {\n      FT_Memory  memory = FT_FACE_MEMORY( face );\n\n\n      FT_FREE( math );                 /* Can't return this as API is frozen */\n    }\n\n    return error;\n  }\n\n\n  static\n  const FT_Service_OTvalidateRec  otvalid_interface =\n  {\n    otv_validate\n  };\n\n\n  static\n  const FT_ServiceDescRec  otvalid_services[] =\n  {\n    { FT_SERVICE_ID_OPENTYPE_VALIDATE, &otvalid_interface },\n    { NULL, NULL }\n  };\n\n\n  static FT_Pointer\n  otvalid_get_service( FT_Module    module,\n                       const char*  service_id )\n  {\n    FT_UNUSED( module );\n\n    return ft_service_list_lookup( otvalid_services, service_id );\n  }\n\n\n  FT_CALLBACK_TABLE_DEF\n  const FT_Module_Class  otv_module_class =\n  {\n    0,\n    sizeof ( FT_ModuleRec ),\n    \"otvalid\",\n    0x10000L,\n    0x20000L,\n\n    0,              /* module-specific interface */\n\n    (FT_Module_Constructor)0,\n    (FT_Module_Destructor) 0,\n    (FT_Module_Requester)  otvalid_get_service\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/otvalid/otvmod.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  otvmod.h                                                               */\n/*                                                                         */\n/*    FreeType's OpenType validation module implementation                 */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2004 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __OTVMOD_H__\n#define __OTVMOD_H__\n\n\n#include <ft2build.h>\n#include FT_MODULE_H\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n\n  FT_EXPORT_VAR( const FT_Module_Class )  otv_module_class;\n\n\nFT_END_HEADER\n\n#endif /* __OTVMOD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/README",
    "content": "                  FreeType font driver for PCF fonts\n\n                       Francesco Zappa Nardelli\n                  <francesco.zappa.nardelli@ens.fr>\n\n\nIntroduction\n************\n\nPCF (Portable Compiled Format) is a binary bitmap font format, largely used\nin X world. This code implements a PCF driver for the FreeType library.\nGlyph images are loaded into memory only on demand, thus leading to a small\nmemory footprint.\n\nInformation on the PCF font format can only be worked out from\n`pcfread.c', and `pcfwrite.c', to be found, for instance, in the XFree86\n(www.xfree86.org) source tree (xc/lib/font/bitmap/).\n\nMany good bitmap fonts in bdf format come with XFree86: they can be\ncompiled into the pcf format using the `bdftopcf' utility.\n\n\nSupported hardware\n******************\n\nThe driver has been tested on linux/x86 and sunos5.5/sparc.  In both\ncases the compiler was gcc.  When back in Paris, I will test it also\non linux/alpha.\n\n\nEncodings\n*********\n\nUse `FT_Get_BDF_Charset_ID' to access the encoding and registry.\n\nThe driver always exports `ft_encoding_none' as face->charmap.encoding.\nFT_Get_Char_Index() behavior is unmodified, that is, it converts the ULong\nvalue given as argument into the corresponding glyph number.\n\n\nKnown problems\n**************\n\n- dealing explicitly with encodings breaks the uniformity of freetype2\n  api.\n\n- except for encodings properties, client applications have no\n  visibility of the PCF_Face object.  This means that applications\n  cannot directly access font tables and are obliged to trust\n  FreeType.\n\n- currently, glyph names and ink_metrics are ignored.\n\nI plan to give full visibility of the PCF_Face object in the next\nrelease of the driver, thus implementing also glyph names and\nink_metrics.\n\n- height is defined as (ascent - descent).  Is this correct?\n\n- if unable to read size information from the font, PCF_Init_Face\n  sets available_size->width and available_size->height to 12.\n\n- too many english grammar errors in the readme file :-(\n\n\nLicense\n*******\n\nCopyright (C) 2000 by Francesco Zappa Nardelli\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\nCredits\n*******\n\nKeith Packard wrote the pcf driver found in XFree86.  His work is at\nthe same time the specification and the sample implementation of the\nPCF format.  Undoubtedly, this driver is inspired from his work.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/pcf.c",
    "content": "/*  pcf.c\n\n    FreeType font driver for pcf fonts\n\n  Copyright 2000-2001, 2003 by\n  Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n\n#include <ft2build.h>\n#include \"pcfutil.c\"\n#include \"pcfread.c\"\n#include \"pcfdrivr.c\"\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/pcf.h",
    "content": "/*  pcf.h\n\n  FreeType font driver for pcf fonts\n\n  Copyright (C) 2000, 2001, 2002, 2003, 2006, 2010 by\n  Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n\n#ifndef __PCF_H__\n#define __PCF_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n#include FT_INTERNAL_STREAM_H\n\n\nFT_BEGIN_HEADER\n\n  typedef struct  PCF_TableRec_\n  {\n    FT_ULong  type;\n    FT_ULong  format;\n    FT_ULong  size;\n    FT_ULong  offset;\n\n  } PCF_TableRec, *PCF_Table;\n\n\n  typedef struct  PCF_TocRec_\n  {\n    FT_ULong   version;\n    FT_ULong   count;\n    PCF_Table  tables;\n\n  } PCF_TocRec, *PCF_Toc;\n\n\n  typedef struct  PCF_ParsePropertyRec_\n  {\n    FT_Long  name;\n    FT_Byte  isString;\n    FT_Long  value;\n\n  } PCF_ParsePropertyRec, *PCF_ParseProperty;\n\n\n  typedef struct  PCF_PropertyRec_\n  {\n    FT_String*  name;\n    FT_Byte     isString;\n\n    union\n    {\n      FT_String*  atom;\n      FT_Long     l;\n      FT_ULong    ul;\n\n    } value;\n\n  } PCF_PropertyRec, *PCF_Property;\n\n\n  typedef struct  PCF_Compressed_MetricRec_\n  {\n    FT_Byte  leftSideBearing;\n    FT_Byte  rightSideBearing;\n    FT_Byte  characterWidth;\n    FT_Byte  ascent;\n    FT_Byte  descent;\n\n  } PCF_Compressed_MetricRec, *PCF_Compressed_Metric;\n\n\n  typedef struct  PCF_MetricRec_\n  {\n    FT_Short  leftSideBearing;\n    FT_Short  rightSideBearing;\n    FT_Short  characterWidth;\n    FT_Short  ascent;\n    FT_Short  descent;\n    FT_Short  attributes;\n    FT_ULong  bits;\n\n  } PCF_MetricRec, *PCF_Metric;\n\n\n  typedef struct  PCF_AccelRec_\n  {\n    FT_Byte        noOverlap;\n    FT_Byte        constantMetrics;\n    FT_Byte        terminalFont;\n    FT_Byte        constantWidth;\n    FT_Byte        inkInside;\n    FT_Byte        inkMetrics;\n    FT_Byte        drawDirection;\n    FT_Long        fontAscent;\n    FT_Long        fontDescent;\n    FT_Long        maxOverlap;\n    PCF_MetricRec  minbounds;\n    PCF_MetricRec  maxbounds;\n    PCF_MetricRec  ink_minbounds;\n    PCF_MetricRec  ink_maxbounds;\n\n  } PCF_AccelRec, *PCF_Accel;\n\n\n  typedef struct  PCF_EncodingRec_\n  {\n    FT_Long    enc;\n    FT_UShort  glyph;\n\n  } PCF_EncodingRec, *PCF_Encoding;\n\n\n  typedef struct  PCF_FaceRec_\n  {\n    FT_FaceRec     root;\n\n    FT_StreamRec   comp_stream;\n    FT_Stream      comp_source;\n\n    char*          charset_encoding;\n    char*          charset_registry;\n\n    PCF_TocRec     toc;\n    PCF_AccelRec   accel;\n\n    int            nprops;\n    PCF_Property   properties;\n\n    FT_Long        nmetrics;\n    PCF_Metric     metrics;\n    FT_Long        nencodings;\n    PCF_Encoding   encodings;\n\n    FT_Short       defaultChar;\n\n    FT_ULong       bitmapsFormat;\n\n    FT_CharMap     charmap_handle;\n    FT_CharMapRec  charmap;  /* a single charmap per face */\n\n  } PCF_FaceRec, *PCF_Face;\n\n\n  /* macros for pcf font format */\n\n#define LSBFirst  0\n#define MSBFirst  1\n\n#define PCF_FILE_VERSION        ( ( 'p' << 24 ) | \\\n                                  ( 'c' << 16 ) | \\\n                                  ( 'f' <<  8 ) | 1 )\n#define PCF_FORMAT_MASK         0xFFFFFF00UL\n\n#define PCF_DEFAULT_FORMAT      0x00000000UL\n#define PCF_INKBOUNDS           0x00000200UL\n#define PCF_ACCEL_W_INKBOUNDS   0x00000100UL\n#define PCF_COMPRESSED_METRICS  0x00000100UL\n\n#define PCF_FORMAT_MATCH( a, b ) \\\n          ( ( (a) & PCF_FORMAT_MASK ) == ( (b) & PCF_FORMAT_MASK ) )\n\n#define PCF_GLYPH_PAD_MASK  ( 3 << 0 )\n#define PCF_BYTE_MASK       ( 1 << 2 )\n#define PCF_BIT_MASK        ( 1 << 3 )\n#define PCF_SCAN_UNIT_MASK  ( 3 << 4 )\n\n#define PCF_BYTE_ORDER( f ) \\\n          ( ( (f) & PCF_BYTE_MASK ) ? MSBFirst : LSBFirst )\n#define PCF_BIT_ORDER( f ) \\\n          ( ( (f) & PCF_BIT_MASK ) ? MSBFirst : LSBFirst )\n#define PCF_GLYPH_PAD_INDEX( f ) \\\n          ( (f) & PCF_GLYPH_PAD_MASK )\n#define PCF_GLYPH_PAD( f ) \\\n          ( 1 << PCF_GLYPH_PAD_INDEX( f ) )\n#define PCF_SCAN_UNIT_INDEX( f ) \\\n          ( ( (f) & PCF_SCAN_UNIT_MASK ) >> 4 )\n#define PCF_SCAN_UNIT( f ) \\\n          ( 1 << PCF_SCAN_UNIT_INDEX( f ) )\n#define PCF_FORMAT_BITS( f )             \\\n          ( (f) & ( PCF_GLYPH_PAD_MASK | \\\n                    PCF_BYTE_MASK      | \\\n                    PCF_BIT_MASK       | \\\n                    PCF_SCAN_UNIT_MASK ) )\n\n#define PCF_SIZE_TO_INDEX( s )  ( (s) == 4 ? 2 : (s) == 2 ? 1 : 0 )\n#define PCF_INDEX_TO_SIZE( b )  ( 1 << b )\n\n#define PCF_FORMAT( bit, byte, glyph, scan )          \\\n          ( ( PCF_SIZE_TO_INDEX( scan )      << 4 ) | \\\n            ( ( (bit)  == MSBFirst ? 1 : 0 ) << 3 ) | \\\n            ( ( (byte) == MSBFirst ? 1 : 0 ) << 2 ) | \\\n            ( PCF_SIZE_TO_INDEX( glyph )     << 0 ) )\n\n#define PCF_PROPERTIES        ( 1 << 0 )\n#define PCF_ACCELERATORS      ( 1 << 1 )\n#define PCF_METRICS           ( 1 << 2 )\n#define PCF_BITMAPS           ( 1 << 3 )\n#define PCF_INK_METRICS       ( 1 << 4 )\n#define PCF_BDF_ENCODINGS     ( 1 << 5 )\n#define PCF_SWIDTHS           ( 1 << 6 )\n#define PCF_GLYPH_NAMES       ( 1 << 7 )\n#define PCF_BDF_ACCELERATORS  ( 1 << 8 )\n\n#define GLYPHPADOPTIONS  4 /* I'm not sure about this */\n\n  FT_LOCAL( FT_Error )\n  pcf_load_font( FT_Stream,\n                 PCF_Face );\n\nFT_END_HEADER\n\n#endif /* __PCF_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/pcfdrivr.c",
    "content": "/*  pcfdrivr.c\n\n    FreeType font driver for pcf files\n\n    Copyright (C) 2000-2004, 2006-2011, 2013, 2014 by\n    Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n\n#include <ft2build.h>\n\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_GZIP_H\n#include FT_LZW_H\n#include FT_BZIP2_H\n#include FT_ERRORS_H\n#include FT_BDF_H\n#include FT_TRUETYPE_IDS_H\n\n#include \"pcf.h\"\n#include \"pcfdrivr.h\"\n#include \"pcfread.h\"\n\n#include \"pcferror.h\"\n#include \"pcfutil.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_pcfread\n\n#include FT_SERVICE_BDF_H\n#include FT_SERVICE_XFREE86_NAME_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_pcfdriver\n\n\n  typedef struct  PCF_CMapRec_\n  {\n    FT_CMapRec    root;\n    FT_UInt       num_encodings;\n    PCF_Encoding  encodings;\n\n  } PCF_CMapRec, *PCF_CMap;\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  pcf_cmap_init( FT_CMap     pcfcmap,   /* PCF_CMap */\n                 FT_Pointer  init_data )\n  {\n    PCF_CMap  cmap = (PCF_CMap)pcfcmap;\n    PCF_Face  face = (PCF_Face)FT_CMAP_FACE( pcfcmap );\n\n    FT_UNUSED( init_data );\n\n\n    cmap->num_encodings = (FT_UInt)face->nencodings;\n    cmap->encodings     = face->encodings;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  pcf_cmap_done( FT_CMap  pcfcmap )         /* PCF_CMap */\n  {\n    PCF_CMap  cmap = (PCF_CMap)pcfcmap;\n\n\n    cmap->encodings     = NULL;\n    cmap->num_encodings = 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  pcf_cmap_char_index( FT_CMap    pcfcmap,  /* PCF_CMap */\n                       FT_UInt32  charcode )\n  {\n    PCF_CMap      cmap      = (PCF_CMap)pcfcmap;\n    PCF_Encoding  encodings = cmap->encodings;\n    FT_UInt       min, max, mid;\n    FT_UInt       result    = 0;\n\n\n    min = 0;\n    max = cmap->num_encodings;\n\n    while ( min < max )\n    {\n      FT_ULong  code;\n\n\n      mid  = ( min + max ) >> 1;\n      code = encodings[mid].enc;\n\n      if ( charcode == code )\n      {\n        result = encodings[mid].glyph + 1;\n        break;\n      }\n\n      if ( charcode < code )\n        max = mid;\n      else\n        min = mid + 1;\n    }\n\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  pcf_cmap_char_next( FT_CMap    pcfcmap,   /* PCF_CMap */\n                      FT_UInt32  *acharcode )\n  {\n    PCF_CMap      cmap      = (PCF_CMap)pcfcmap;\n    PCF_Encoding  encodings = cmap->encodings;\n    FT_UInt       min, max, mid;\n    FT_ULong      charcode  = *acharcode + 1;\n    FT_UInt       result    = 0;\n\n\n    min = 0;\n    max = cmap->num_encodings;\n\n    while ( min < max )\n    {\n      FT_ULong  code;\n\n\n      mid  = ( min + max ) >> 1;\n      code = encodings[mid].enc;\n\n      if ( charcode == code )\n      {\n        result = encodings[mid].glyph + 1;\n        goto Exit;\n      }\n\n      if ( charcode < code )\n        max = mid;\n      else\n        min = mid + 1;\n    }\n\n    charcode = 0;\n    if ( min < cmap->num_encodings )\n    {\n      charcode = encodings[min].enc;\n      result   = encodings[min].glyph + 1;\n    }\n\n  Exit:\n    if ( charcode > 0xFFFFFFFFUL )\n    {\n      FT_TRACE1(( \"pcf_cmap_char_next: charcode 0x%x > 32bit API\" ));\n      *acharcode = 0;\n      /* XXX: result should be changed to indicate an overflow error */\n    }\n    else\n      *acharcode = (FT_UInt32)charcode;\n    return result;\n  }\n\n\n  static\n  const FT_CMap_ClassRec  pcf_cmap_class =\n  {\n    sizeof ( PCF_CMapRec ),\n    pcf_cmap_init,\n    pcf_cmap_done,\n    pcf_cmap_char_index,\n    pcf_cmap_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  };\n\n\n  FT_CALLBACK_DEF( void )\n  PCF_Face_Done( FT_Face  pcfface )         /* PCF_Face */\n  {\n    PCF_Face   face = (PCF_Face)pcfface;\n    FT_Memory  memory;\n\n\n    if ( !face )\n      return;\n\n    memory = FT_FACE_MEMORY( face );\n\n    FT_FREE( face->encodings );\n    FT_FREE( face->metrics );\n\n    /* free properties */\n    if ( face->properties )\n    {\n      FT_Int  i;\n\n\n      for ( i = 0; i < face->nprops; i++ )\n      {\n        PCF_Property  prop = &face->properties[i];\n\n\n        if ( prop )\n        {\n          FT_FREE( prop->name );\n          if ( prop->isString )\n            FT_FREE( prop->value.atom );\n        }\n      }\n\n      FT_FREE( face->properties );\n    }\n\n    FT_FREE( face->toc.tables );\n    FT_FREE( pcfface->family_name );\n    FT_FREE( pcfface->style_name );\n    FT_FREE( pcfface->available_sizes );\n    FT_FREE( face->charset_encoding );\n    FT_FREE( face->charset_registry );\n\n    /* close compressed stream if any */\n    if ( pcfface->stream == &face->comp_stream )\n    {\n      FT_Stream_Close( &face->comp_stream );\n      pcfface->stream = face->comp_source;\n    }\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  PCF_Face_Init( FT_Stream      stream,\n                 FT_Face        pcfface,        /* PCF_Face */\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params )\n  {\n    PCF_Face  face  = (PCF_Face)pcfface;\n    FT_Error  error;\n\n    FT_UNUSED( num_params );\n    FT_UNUSED( params );\n\n\n    FT_TRACE2(( \"PCF driver\\n\" ));\n\n    error = pcf_load_font( stream, face );\n    if ( error )\n    {\n      PCF_Face_Done( pcfface );\n\n#if defined( FT_CONFIG_OPTION_USE_ZLIB )  || \\\n    defined( FT_CONFIG_OPTION_USE_LZW )   || \\\n    defined( FT_CONFIG_OPTION_USE_BZIP2 )\n\n#ifdef FT_CONFIG_OPTION_USE_ZLIB\n      {\n        FT_Error  error2;\n\n\n        /* this didn't work, try gzip support! */\n        error2 = FT_Stream_OpenGzip( &face->comp_stream, stream );\n        if ( FT_ERR_EQ( error2, Unimplemented_Feature ) )\n          goto Fail;\n\n        error = error2;\n      }\n#endif /* FT_CONFIG_OPTION_USE_ZLIB */\n\n#ifdef FT_CONFIG_OPTION_USE_LZW\n      if ( error )\n      {\n        FT_Error  error3;\n\n\n        /* this didn't work, try LZW support! */\n        error3 = FT_Stream_OpenLZW( &face->comp_stream, stream );\n        if ( FT_ERR_EQ( error3, Unimplemented_Feature ) )\n          goto Fail;\n\n        error = error3;\n      }\n#endif /* FT_CONFIG_OPTION_USE_LZW */\n\n#ifdef FT_CONFIG_OPTION_USE_BZIP2\n      if ( error )\n      {\n        FT_Error  error4;\n\n\n        /* this didn't work, try Bzip2 support! */\n        error4 = FT_Stream_OpenBzip2( &face->comp_stream, stream );\n        if ( FT_ERR_EQ( error4, Unimplemented_Feature ) )\n          goto Fail;\n\n        error = error4;\n      }\n#endif /* FT_CONFIG_OPTION_USE_BZIP2 */\n\n      if ( error )\n        goto Fail;\n\n      face->comp_source = stream;\n      pcfface->stream   = &face->comp_stream;\n\n      stream = pcfface->stream;\n\n      error = pcf_load_font( stream, face );\n      if ( error )\n        goto Fail;\n\n#else /* !(FT_CONFIG_OPTION_USE_ZLIB ||\n           FT_CONFIG_OPTION_USE_LZW ||\n           FT_CONFIG_OPTION_USE_BZIP2) */\n\n      goto Fail;\n\n#endif\n    }\n\n    /* PCF could not have multiple face in single font file.\n     * XXX: non-zero face_index is already invalid argument, but\n     *      Type1, Type42 driver has a convention to return\n     *      an invalid argument error when the font could be\n     *      opened by the specified driver.\n     */\n    if ( face_index > 0 ) {\n      FT_ERROR(( \"PCF_Face_Init: invalid face index\\n\" ));\n      PCF_Face_Done( pcfface );\n      return FT_THROW( Invalid_Argument );\n    }\n\n    /* set up charmap */\n    {\n      FT_String  *charset_registry = face->charset_registry;\n      FT_String  *charset_encoding = face->charset_encoding;\n      FT_Bool     unicode_charmap  = 0;\n\n\n      if ( charset_registry && charset_encoding )\n      {\n        char*  s = charset_registry;\n\n\n        /* Uh, oh, compare first letters manually to avoid dependency\n           on locales. */\n        if ( ( s[0] == 'i' || s[0] == 'I' ) &&\n             ( s[1] == 's' || s[1] == 'S' ) &&\n             ( s[2] == 'o' || s[2] == 'O' ) )\n        {\n          s += 3;\n          if ( !ft_strcmp( s, \"10646\" )                      ||\n               ( !ft_strcmp( s, \"8859\" ) &&\n                 !ft_strcmp( face->charset_encoding, \"1\" ) ) )\n          unicode_charmap = 1;\n        }\n      }\n\n      {\n        FT_CharMapRec  charmap;\n\n\n        charmap.face        = FT_FACE( face );\n        charmap.encoding    = FT_ENCODING_NONE;\n        /* initial platform/encoding should indicate unset status? */\n        charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;\n        charmap.encoding_id = TT_APPLE_ID_DEFAULT;\n\n        if ( unicode_charmap )\n        {\n          charmap.encoding    = FT_ENCODING_UNICODE;\n          charmap.platform_id = TT_PLATFORM_MICROSOFT;\n          charmap.encoding_id = TT_MS_ID_UNICODE_CS;\n        }\n\n        error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );\n\n#if 0\n        /* Select default charmap */\n        if ( pcfface->num_charmaps )\n          pcfface->charmap = pcfface->charmaps[0];\n#endif\n      }\n    }\n\n  Exit:\n    return error;\n\n  Fail:\n    FT_TRACE2(( \"  not a PCF file\\n\" ));\n    PCF_Face_Done( pcfface );\n    error = FT_THROW( Unknown_File_Format );  /* error */\n    goto Exit;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  PCF_Size_Select( FT_Size   size,\n                   FT_ULong  strike_index )\n  {\n    PCF_Accel  accel = &( (PCF_Face)size->face )->accel;\n\n\n    FT_Select_Metrics( size->face, strike_index );\n\n    size->metrics.ascender    =  accel->fontAscent << 6;\n    size->metrics.descender   = -accel->fontDescent << 6;\n    size->metrics.max_advance =  accel->maxbounds.characterWidth << 6;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  PCF_Size_Request( FT_Size          size,\n                    FT_Size_Request  req )\n  {\n    PCF_Face         face  = (PCF_Face)size->face;\n    FT_Bitmap_Size*  bsize = size->face->available_sizes;\n    FT_Error         error = FT_ERR( Invalid_Pixel_Size );\n    FT_Long          height;\n\n\n    height = FT_REQUEST_HEIGHT( req );\n    height = ( height + 32 ) >> 6;\n\n    switch ( req->type )\n    {\n    case FT_SIZE_REQUEST_TYPE_NOMINAL:\n      if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) )\n        error = FT_Err_Ok;\n      break;\n\n    case FT_SIZE_REQUEST_TYPE_REAL_DIM:\n      if ( height == ( face->accel.fontAscent +\n                       face->accel.fontDescent ) )\n        error = FT_Err_Ok;\n      break;\n\n    default:\n      error = FT_THROW( Unimplemented_Feature );\n      break;\n    }\n\n    if ( error )\n      return error;\n    else\n      return PCF_Size_Select( size, 0 );\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  PCF_Glyph_Load( FT_GlyphSlot  slot,\n                  FT_Size       size,\n                  FT_UInt       glyph_index,\n                  FT_Int32      load_flags )\n  {\n    PCF_Face    face   = (PCF_Face)FT_SIZE_FACE( size );\n    FT_Stream   stream;\n    FT_Error    error  = FT_Err_Ok;\n    FT_Bitmap*  bitmap = &slot->bitmap;\n    PCF_Metric  metric;\n    FT_Offset   bytes;\n\n    FT_UNUSED( load_flags );\n\n\n    FT_TRACE1(( \"PCF_Glyph_Load: glyph index %d\\n\", glyph_index ));\n\n    if ( !face )\n    {\n      error = FT_THROW( Invalid_Face_Handle );\n      goto Exit;\n    }\n\n    if ( glyph_index >= (FT_UInt)face->root.num_glyphs )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    stream = face->root.stream;\n\n    if ( glyph_index > 0 )\n      glyph_index--;\n\n    metric = face->metrics + glyph_index;\n\n    bitmap->rows       = metric->ascent + metric->descent;\n    bitmap->width      = metric->rightSideBearing - metric->leftSideBearing;\n    bitmap->num_grays  = 1;\n    bitmap->pixel_mode = FT_PIXEL_MODE_MONO;\n\n    FT_TRACE6(( \"BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\\n\",\n                  PCF_BIT_ORDER( face->bitmapsFormat ),\n                  PCF_BYTE_ORDER( face->bitmapsFormat ),\n                  PCF_GLYPH_PAD( face->bitmapsFormat ) ));\n\n    switch ( PCF_GLYPH_PAD( face->bitmapsFormat ) )\n    {\n    case 1:\n      bitmap->pitch = ( bitmap->width + 7 ) >> 3;\n      break;\n\n    case 2:\n      bitmap->pitch = ( ( bitmap->width + 15 ) >> 4 ) << 1;\n      break;\n\n    case 4:\n      bitmap->pitch = ( ( bitmap->width + 31 ) >> 5 ) << 2;\n      break;\n\n    case 8:\n      bitmap->pitch = ( ( bitmap->width + 63 ) >> 6 ) << 3;\n      break;\n\n    default:\n      return FT_THROW( Invalid_File_Format );\n    }\n\n    /* XXX: to do: are there cases that need repadding the bitmap? */\n    bytes = bitmap->pitch * bitmap->rows;\n\n    error = ft_glyphslot_alloc_bitmap( slot, (FT_ULong)bytes );\n    if ( error )\n      goto Exit;\n\n    if ( FT_STREAM_SEEK( metric->bits )          ||\n         FT_STREAM_READ( bitmap->buffer, bytes ) )\n      goto Exit;\n\n    if ( PCF_BIT_ORDER( face->bitmapsFormat ) != MSBFirst )\n      BitOrderInvert( bitmap->buffer, bytes );\n\n    if ( ( PCF_BYTE_ORDER( face->bitmapsFormat ) !=\n           PCF_BIT_ORDER( face->bitmapsFormat )  ) )\n    {\n      switch ( PCF_SCAN_UNIT( face->bitmapsFormat ) )\n      {\n      case 1:\n        break;\n\n      case 2:\n        TwoByteSwap( bitmap->buffer, bytes );\n        break;\n\n      case 4:\n        FourByteSwap( bitmap->buffer, bytes );\n        break;\n      }\n    }\n\n    slot->format      = FT_GLYPH_FORMAT_BITMAP;\n    slot->bitmap_left = metric->leftSideBearing;\n    slot->bitmap_top  = metric->ascent;\n\n    slot->metrics.horiAdvance  = metric->characterWidth << 6;\n    slot->metrics.horiBearingX = metric->leftSideBearing << 6;\n    slot->metrics.horiBearingY = metric->ascent << 6;\n    slot->metrics.width        = ( metric->rightSideBearing -\n                                   metric->leftSideBearing ) << 6;\n    slot->metrics.height       = bitmap->rows << 6;\n\n    ft_synthesize_vertical_metrics( &slot->metrics,\n                                    ( face->accel.fontAscent +\n                                      face->accel.fontDescent ) << 6 );\n\n  Exit:\n    return error;\n  }\n\n\n /*\n  *\n  *  BDF SERVICE\n  *\n  */\n\n  static FT_Error\n  pcf_get_bdf_property( PCF_Face          face,\n                        const char*       prop_name,\n                        BDF_PropertyRec  *aproperty )\n  {\n    PCF_Property  prop;\n\n\n    prop = pcf_find_property( face, prop_name );\n    if ( prop != NULL )\n    {\n      if ( prop->isString )\n      {\n        aproperty->type   = BDF_PROPERTY_TYPE_ATOM;\n        aproperty->u.atom = prop->value.atom;\n      }\n      else\n      {\n        if ( prop->value.l > 0x7FFFFFFFL || prop->value.l < ( -1 - 0x7FFFFFFFL ) )\n        {\n          FT_TRACE1(( \"pcf_get_bdf_property: \" ));\n          FT_TRACE1(( \"too large integer 0x%x is truncated\\n\" ));\n        }\n        /* Apparently, the PCF driver loads all properties as signed integers!\n         * This really doesn't seem to be a problem, because this is\n         * sufficient for any meaningful values.\n         */\n        aproperty->type      = BDF_PROPERTY_TYPE_INTEGER;\n        aproperty->u.integer = (FT_Int32)prop->value.l;\n      }\n      return 0;\n    }\n\n    return FT_THROW( Invalid_Argument );\n  }\n\n\n  static FT_Error\n  pcf_get_charset_id( PCF_Face      face,\n                      const char*  *acharset_encoding,\n                      const char*  *acharset_registry )\n  {\n    *acharset_encoding = face->charset_encoding;\n    *acharset_registry = face->charset_registry;\n\n    return 0;\n  }\n\n\n  static const FT_Service_BDFRec  pcf_service_bdf =\n  {\n    (FT_BDF_GetCharsetIdFunc)pcf_get_charset_id,\n    (FT_BDF_GetPropertyFunc) pcf_get_bdf_property\n  };\n\n\n /*\n  *\n  *  SERVICE LIST\n  *\n  */\n\n  static const FT_ServiceDescRec  pcf_services[] =\n  {\n    { FT_SERVICE_ID_BDF,       &pcf_service_bdf },\n    { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_PCF },\n    { NULL, NULL }\n  };\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  pcf_driver_requester( FT_Module    module,\n                        const char*  name )\n  {\n    FT_UNUSED( module );\n\n    return ft_service_list_lookup( pcf_services, name );\n  }\n\n\n  FT_CALLBACK_TABLE_DEF\n  const FT_Driver_ClassRec  pcf_driver_class =\n  {\n    {\n      FT_MODULE_FONT_DRIVER        |\n      FT_MODULE_DRIVER_NO_OUTLINES,\n      sizeof ( FT_DriverRec ),\n\n      \"pcf\",\n      0x10000L,\n      0x20000L,\n\n      0,\n\n      0,                    /* FT_Module_Constructor */\n      0,                    /* FT_Module_Destructor  */\n      pcf_driver_requester\n    },\n\n    sizeof ( PCF_FaceRec ),\n    sizeof ( FT_SizeRec ),\n    sizeof ( FT_GlyphSlotRec ),\n\n    PCF_Face_Init,\n    PCF_Face_Done,\n    0,                      /* FT_Size_InitFunc */\n    0,                      /* FT_Size_DoneFunc */\n    0,                      /* FT_Slot_InitFunc */\n    0,                      /* FT_Slot_DoneFunc */\n\n    PCF_Glyph_Load,\n\n    0,                      /* FT_Face_GetKerningFunc  */\n    0,                      /* FT_Face_AttachFunc      */\n    0,                      /* FT_Face_GetAdvancesFunc */\n\n    PCF_Size_Request,\n    PCF_Size_Select\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/pcfdrivr.h",
    "content": "/*  pcfdrivr.h\n\n    FreeType font driver for pcf fonts\n\n  Copyright 2000-2001, 2002 by\n  Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n\n#ifndef __PCFDRIVR_H__\n#define __PCFDRIVR_H__\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n  FT_EXPORT_VAR( const FT_Driver_ClassRec )  pcf_driver_class;\n\nFT_END_HEADER\n\n\n#endif /* __PCFDRIVR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/pcferror.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pcferror.h                                                             */\n/*                                                                         */\n/*    PCF error codes (specification only).                                */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the PCF error enumeration constants.      */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __PCFERROR_H__\n#define __PCFERROR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  PCF_Err_\n#define FT_ERR_BASE    FT_Mod_Err_PCF\n\n#include FT_ERRORS_H\n\n#endif /* __PCFERROR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/pcfread.c",
    "content": "/*  pcfread.c\n\n    FreeType font driver for pcf fonts\n\n  Copyright 2000-2010, 2012-2014 by\n  Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n\n#include <ft2build.h>\n\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_OBJECTS_H\n\n#include \"pcf.h\"\n#include \"pcfread.h\"\n\n#include \"pcferror.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_pcfread\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n  static const char* const  tableNames[] =\n  {\n    \"prop\", \"accl\", \"mtrcs\", \"bmps\", \"imtrcs\",\n    \"enc\", \"swidth\", \"names\", \"accel\"\n  };\n#endif\n\n\n  static\n  const FT_Frame_Field  pcf_toc_header[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PCF_TocRec\n\n    FT_FRAME_START( 8 ),\n      FT_FRAME_ULONG_LE( version ),\n      FT_FRAME_ULONG_LE( count ),\n    FT_FRAME_END\n  };\n\n\n  static\n  const FT_Frame_Field  pcf_table_header[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PCF_TableRec\n\n    FT_FRAME_START( 16  ),\n      FT_FRAME_ULONG_LE( type ),\n      FT_FRAME_ULONG_LE( format ),\n      FT_FRAME_ULONG_LE( size ),   /* rounded up to a multiple of 4 */\n      FT_FRAME_ULONG_LE( offset ),\n    FT_FRAME_END\n  };\n\n\n  static FT_Error\n  pcf_read_TOC( FT_Stream  stream,\n                PCF_Face   face )\n  {\n    FT_Error   error;\n    PCF_Toc    toc = &face->toc;\n    PCF_Table  tables;\n\n    FT_Memory  memory = FT_FACE( face )->memory;\n    FT_UInt    n;\n\n    FT_ULong   size;\n\n\n    if ( FT_STREAM_SEEK( 0 )                          ||\n         FT_STREAM_READ_FIELDS( pcf_toc_header, toc ) )\n      return FT_THROW( Cannot_Open_Resource );\n\n    if ( toc->version != PCF_FILE_VERSION                 ||\n         toc->count   >  FT_ARRAY_MAX( face->toc.tables ) ||\n         toc->count   == 0                                )\n      return FT_THROW( Invalid_File_Format );\n\n    if ( FT_NEW_ARRAY( face->toc.tables, toc->count ) )\n      return FT_THROW( Out_Of_Memory );\n\n    tables = face->toc.tables;\n    for ( n = 0; n < toc->count; n++ )\n    {\n      if ( FT_STREAM_READ_FIELDS( pcf_table_header, tables ) )\n        goto Exit;\n      tables++;\n    }\n\n    /* Sort tables and check for overlaps.  Because they are almost      */\n    /* always ordered already, an in-place bubble sort with simultaneous */\n    /* boundary checking seems appropriate.                              */\n    tables = face->toc.tables;\n\n    for ( n = 0; n < toc->count - 1; n++ )\n    {\n      FT_UInt  i, have_change;\n\n\n      have_change = 0;\n\n      for ( i = 0; i < toc->count - 1 - n; i++ )\n      {\n        PCF_TableRec  tmp;\n\n\n        if ( tables[i].offset > tables[i + 1].offset )\n        {\n          tmp           = tables[i];\n          tables[i]     = tables[i + 1];\n          tables[i + 1] = tmp;\n\n          have_change = 1;\n        }\n\n        if ( ( tables[i].size   > tables[i + 1].offset )                  ||\n             ( tables[i].offset > tables[i + 1].offset - tables[i].size ) )\n        {\n          error = FT_THROW( Invalid_Offset );\n          goto Exit;\n        }\n      }\n\n      if ( !have_change )\n        break;\n    }\n\n    /*\n     *  We now check whether the `size' and `offset' values are reasonable:\n     *  `offset' + `size' must not exceed the stream size.\n     *\n     *  Note, however, that X11's `pcfWriteFont' routine (used by the\n     *  `bdftopcf' program to create PDF font files) has two special\n     *  features.\n     *\n     *  - It always assigns the accelerator table a size of 100 bytes in the\n     *    TOC, regardless of its real size, which can vary between 34 and 72\n     *    bytes.\n     *\n     *  - Due to the way the routine is designed, it ships out the last font\n     *    table with its real size, ignoring the TOC's size value.  Since\n     *    the TOC size values are always rounded up to a multiple of 4, the\n     *    difference can be up to three bytes for all tables except the\n     *    accelerator table, for which the difference can be as large as 66\n     *    bytes.\n     *\n     */\n\n    tables = face->toc.tables;\n    size   = stream->size;\n\n    for ( n = 0; n < toc->count - 1; n++ )\n    {\n      /* we need two checks to avoid overflow */\n      if ( ( tables->size   > size                ) ||\n           ( tables->offset > size - tables->size ) )\n      {\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n      tables++;\n    }\n\n    /* only check `tables->offset' for last table element ... */\n    if ( ( tables->offset > size ) )\n    {\n      error = FT_THROW( Invalid_Table );\n      goto Exit;\n    }\n    /* ... and adjust `tables->size' to the real value if necessary */\n    if ( tables->size > size - tables->offset )\n      tables->size = size - tables->offset;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n    {\n      FT_UInt      i, j;\n      const char*  name = \"?\";\n\n\n      FT_TRACE4(( \"pcf_read_TOC:\\n\" ));\n\n      FT_TRACE4(( \"  number of tables: %ld\\n\", face->toc.count ));\n\n      tables = face->toc.tables;\n      for ( i = 0; i < toc->count; i++ )\n      {\n        for ( j = 0; j < sizeof ( tableNames ) / sizeof ( tableNames[0] );\n              j++ )\n          if ( tables[i].type == (FT_UInt)( 1 << j ) )\n            name = tableNames[j];\n\n        FT_TRACE4(( \"  %d: type=%s, format=0x%X, \"\n                    \"size=%ld (0x%lX), offset=%ld (0x%lX)\\n\",\n                    i, name,\n                    tables[i].format,\n                    tables[i].size, tables[i].size,\n                    tables[i].offset, tables[i].offset ));\n      }\n    }\n\n#endif\n\n    return FT_Err_Ok;\n\n  Exit:\n    FT_FREE( face->toc.tables );\n    return error;\n  }\n\n\n#define PCF_METRIC_SIZE  12\n\n  static\n  const FT_Frame_Field  pcf_metric_header[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PCF_MetricRec\n\n    FT_FRAME_START( PCF_METRIC_SIZE ),\n      FT_FRAME_SHORT_LE( leftSideBearing ),\n      FT_FRAME_SHORT_LE( rightSideBearing ),\n      FT_FRAME_SHORT_LE( characterWidth ),\n      FT_FRAME_SHORT_LE( ascent ),\n      FT_FRAME_SHORT_LE( descent ),\n      FT_FRAME_SHORT_LE( attributes ),\n    FT_FRAME_END\n  };\n\n\n  static\n  const FT_Frame_Field  pcf_metric_msb_header[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PCF_MetricRec\n\n    FT_FRAME_START( PCF_METRIC_SIZE ),\n      FT_FRAME_SHORT( leftSideBearing ),\n      FT_FRAME_SHORT( rightSideBearing ),\n      FT_FRAME_SHORT( characterWidth ),\n      FT_FRAME_SHORT( ascent ),\n      FT_FRAME_SHORT( descent ),\n      FT_FRAME_SHORT( attributes ),\n    FT_FRAME_END\n  };\n\n\n#define PCF_COMPRESSED_METRIC_SIZE  5\n\n  static\n  const FT_Frame_Field  pcf_compressed_metric_header[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PCF_Compressed_MetricRec\n\n    FT_FRAME_START( PCF_COMPRESSED_METRIC_SIZE ),\n      FT_FRAME_BYTE( leftSideBearing ),\n      FT_FRAME_BYTE( rightSideBearing ),\n      FT_FRAME_BYTE( characterWidth ),\n      FT_FRAME_BYTE( ascent ),\n      FT_FRAME_BYTE( descent ),\n    FT_FRAME_END\n  };\n\n\n  static FT_Error\n  pcf_get_metric( FT_Stream   stream,\n                  FT_ULong    format,\n                  PCF_Metric  metric )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )\n    {\n      const FT_Frame_Field*  fields;\n\n\n      /* parsing normal metrics */\n      fields = PCF_BYTE_ORDER( format ) == MSBFirst\n               ? pcf_metric_msb_header\n               : pcf_metric_header;\n\n      /* the following sets `error' but doesn't return in case of failure */\n      (void)FT_STREAM_READ_FIELDS( fields, metric );\n    }\n    else\n    {\n      PCF_Compressed_MetricRec  compr;\n\n\n      /* parsing compressed metrics */\n      if ( FT_STREAM_READ_FIELDS( pcf_compressed_metric_header, &compr ) )\n        goto Exit;\n\n      metric->leftSideBearing  = (FT_Short)( compr.leftSideBearing  - 0x80 );\n      metric->rightSideBearing = (FT_Short)( compr.rightSideBearing - 0x80 );\n      metric->characterWidth   = (FT_Short)( compr.characterWidth   - 0x80 );\n      metric->ascent           = (FT_Short)( compr.ascent           - 0x80 );\n      metric->descent          = (FT_Short)( compr.descent          - 0x80 );\n      metric->attributes       = 0;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  pcf_seek_to_table_type( FT_Stream  stream,\n                          PCF_Table  tables,\n                          FT_ULong   ntables, /* same as PCF_Toc->count */\n                          FT_ULong   type,\n                          FT_ULong  *aformat,\n                          FT_ULong  *asize )\n  {\n    FT_Error  error = FT_ERR( Invalid_File_Format );\n    FT_ULong  i;\n\n\n    for ( i = 0; i < ntables; i++ )\n      if ( tables[i].type == type )\n      {\n        if ( stream->pos > tables[i].offset )\n        {\n          error = FT_THROW( Invalid_Stream_Skip );\n          goto Fail;\n        }\n\n        if ( FT_STREAM_SKIP( tables[i].offset - stream->pos ) )\n        {\n          error = FT_THROW( Invalid_Stream_Skip );\n          goto Fail;\n        }\n\n        *asize   = tables[i].size;\n        *aformat = tables[i].format;\n\n        return FT_Err_Ok;\n      }\n\n  Fail:\n    *asize = 0;\n    return error;\n  }\n\n\n  static FT_Bool\n  pcf_has_table_type( PCF_Table  tables,\n                      FT_ULong   ntables, /* same as PCF_Toc->count */\n                      FT_ULong   type )\n  {\n    FT_ULong  i;\n\n\n    for ( i = 0; i < ntables; i++ )\n      if ( tables[i].type == type )\n        return TRUE;\n\n    return FALSE;\n  }\n\n\n#define PCF_PROPERTY_SIZE  9\n\n  static\n  const FT_Frame_Field  pcf_property_header[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PCF_ParsePropertyRec\n\n    FT_FRAME_START( PCF_PROPERTY_SIZE ),\n      FT_FRAME_LONG_LE( name ),\n      FT_FRAME_BYTE   ( isString ),\n      FT_FRAME_LONG_LE( value ),\n    FT_FRAME_END\n  };\n\n\n  static\n  const FT_Frame_Field  pcf_property_msb_header[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PCF_ParsePropertyRec\n\n    FT_FRAME_START( PCF_PROPERTY_SIZE ),\n      FT_FRAME_LONG( name ),\n      FT_FRAME_BYTE( isString ),\n      FT_FRAME_LONG( value ),\n    FT_FRAME_END\n  };\n\n\n  FT_LOCAL_DEF( PCF_Property )\n  pcf_find_property( PCF_Face          face,\n                     const FT_String*  prop )\n  {\n    PCF_Property  properties = face->properties;\n    FT_Bool       found      = 0;\n    int           i;\n\n\n    for ( i = 0 ; i < face->nprops && !found; i++ )\n    {\n      if ( !ft_strcmp( properties[i].name, prop ) )\n        found = 1;\n    }\n\n    if ( found )\n      return properties + i - 1;\n    else\n      return NULL;\n  }\n\n\n  static FT_Error\n  pcf_get_properties( FT_Stream  stream,\n                      PCF_Face   face )\n  {\n    PCF_ParseProperty  props      = 0;\n    PCF_Property       properties = NULL;\n    FT_ULong           nprops, i;\n    FT_ULong           format, size;\n    FT_Error           error;\n    FT_Memory          memory     = FT_FACE( face )->memory;\n    FT_ULong           string_size;\n    FT_String*         strings    = 0;\n\n\n    error = pcf_seek_to_table_type( stream,\n                                    face->toc.tables,\n                                    face->toc.count,\n                                    PCF_PROPERTIES,\n                                    &format,\n                                    &size );\n    if ( error )\n      goto Bail;\n\n    if ( FT_READ_ULONG_LE( format ) )\n      goto Bail;\n\n    FT_TRACE4(( \"pcf_get_properties:\\n\" ));\n\n    FT_TRACE4(( \"  format = %ld\\n\", format ));\n\n    if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )\n      goto Bail;\n\n    if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n      (void)FT_READ_ULONG( nprops );\n    else\n      (void)FT_READ_ULONG_LE( nprops );\n    if ( error )\n      goto Bail;\n\n    FT_TRACE4(( \"  nprop = %d (truncate %d props)\\n\",\n                (int)nprops, nprops - (int)nprops ));\n\n    nprops = (int)nprops;\n\n    /* rough estimate */\n    if ( nprops > size / PCF_PROPERTY_SIZE )\n    {\n      error = FT_THROW( Invalid_Table );\n      goto Bail;\n    }\n\n    face->nprops = (int)nprops;\n\n    if ( FT_NEW_ARRAY( props, nprops ) )\n      goto Bail;\n\n    for ( i = 0; i < nprops; i++ )\n    {\n      if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n      {\n        if ( FT_STREAM_READ_FIELDS( pcf_property_msb_header, props + i ) )\n          goto Bail;\n      }\n      else\n      {\n        if ( FT_STREAM_READ_FIELDS( pcf_property_header, props + i ) )\n          goto Bail;\n      }\n    }\n\n    /* pad the property array                                            */\n    /*                                                                   */\n    /* clever here - nprops is the same as the number of odd-units read, */\n    /* as only isStringProp are odd length   (Keith Packard)             */\n    /*                                                                   */\n    if ( nprops & 3 )\n    {\n      i = 4 - ( nprops & 3 );\n      if ( FT_STREAM_SKIP( i ) )\n      {\n        error = FT_THROW( Invalid_Stream_Skip );\n        goto Bail;\n      }\n    }\n\n    if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n      (void)FT_READ_ULONG( string_size );\n    else\n      (void)FT_READ_ULONG_LE( string_size );\n    if ( error )\n      goto Bail;\n\n    FT_TRACE4(( \"  string_size = %ld\\n\", string_size ));\n\n    /* rough estimate */\n    if ( string_size > size - nprops * PCF_PROPERTY_SIZE )\n    {\n      error = FT_THROW( Invalid_Table );\n      goto Bail;\n    }\n\n    /* allocate one more byte so that we have a final null byte */\n    if ( FT_NEW_ARRAY( strings, string_size + 1 ) )\n      goto Bail;\n\n    error = FT_Stream_Read( stream, (FT_Byte*)strings, string_size );\n    if ( error )\n      goto Bail;\n\n    if ( FT_NEW_ARRAY( properties, nprops ) )\n      goto Bail;\n\n    face->properties = properties;\n\n    for ( i = 0; i < nprops; i++ )\n    {\n      FT_Long  name_offset = props[i].name;\n\n\n      if ( ( name_offset < 0 )                     ||\n           ( (FT_ULong)name_offset > string_size ) )\n      {\n        error = FT_THROW( Invalid_Offset );\n        goto Bail;\n      }\n\n      if ( FT_STRDUP( properties[i].name, strings + name_offset ) )\n        goto Bail;\n\n      FT_TRACE4(( \"  %s:\", properties[i].name ));\n\n      properties[i].isString = props[i].isString;\n\n      if ( props[i].isString )\n      {\n        FT_Long  value_offset = props[i].value;\n\n\n        if ( ( value_offset < 0 )                     ||\n             ( (FT_ULong)value_offset > string_size ) )\n        {\n          error = FT_THROW( Invalid_Offset );\n          goto Bail;\n        }\n\n        if ( FT_STRDUP( properties[i].value.atom, strings + value_offset ) )\n          goto Bail;\n\n        FT_TRACE4(( \" `%s'\\n\", properties[i].value.atom ));\n      }\n      else\n      {\n        properties[i].value.l = props[i].value;\n\n        FT_TRACE4(( \" %d\\n\", properties[i].value.l ));\n      }\n    }\n\n    error = FT_Err_Ok;\n\n  Bail:\n    FT_FREE( props );\n    FT_FREE( strings );\n\n    return error;\n  }\n\n\n  static FT_Error\n  pcf_get_metrics( FT_Stream  stream,\n                   PCF_Face   face )\n  {\n    FT_Error    error;\n    FT_Memory   memory  = FT_FACE( face )->memory;\n    FT_ULong    format, size;\n    PCF_Metric  metrics = 0;\n    FT_ULong    nmetrics, i;\n\n\n    error = pcf_seek_to_table_type( stream,\n                                    face->toc.tables,\n                                    face->toc.count,\n                                    PCF_METRICS,\n                                    &format,\n                                    &size );\n    if ( error )\n      return error;\n\n    if ( FT_READ_ULONG_LE( format ) )\n      goto Bail;\n\n    if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT )     &&\n         !PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) )\n      return FT_THROW( Invalid_File_Format );\n\n    if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )\n    {\n      if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n        (void)FT_READ_ULONG( nmetrics );\n      else\n        (void)FT_READ_ULONG_LE( nmetrics );\n    }\n    else\n    {\n      if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n        (void)FT_READ_USHORT( nmetrics );\n      else\n        (void)FT_READ_USHORT_LE( nmetrics );\n    }\n    if ( error )\n      return FT_THROW( Invalid_File_Format );\n\n    face->nmetrics = nmetrics;\n\n    if ( !nmetrics )\n      return FT_THROW( Invalid_Table );\n\n    FT_TRACE4(( \"pcf_get_metrics:\\n\" ));\n\n    FT_TRACE4(( \"  number of metrics: %d\\n\", nmetrics ));\n\n    /* rough estimate */\n    if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )\n    {\n      if ( nmetrics > size / PCF_METRIC_SIZE )\n        return FT_THROW( Invalid_Table );\n    }\n    else\n    {\n      if ( nmetrics > size / PCF_COMPRESSED_METRIC_SIZE )\n        return FT_THROW( Invalid_Table );\n    }\n\n    if ( FT_NEW_ARRAY( face->metrics, nmetrics ) )\n      return FT_THROW( Out_Of_Memory );\n\n    metrics = face->metrics;\n    for ( i = 0; i < nmetrics; i++, metrics++ )\n    {\n      error = pcf_get_metric( stream, format, metrics );\n\n      metrics->bits = 0;\n\n      FT_TRACE5(( \"  idx %d: width=%d, \"\n                  \"lsb=%d, rsb=%d, ascent=%d, descent=%d, swidth=%d\\n\",\n                  i,\n                  metrics->characterWidth,\n                  metrics->leftSideBearing,\n                  metrics->rightSideBearing,\n                  metrics->ascent,\n                  metrics->descent,\n                  metrics->attributes ));\n\n      if ( error )\n        break;\n\n      /* sanity checks -- those values are used in `PCF_Glyph_Load' to     */\n      /* compute a glyph's bitmap dimensions, thus setting them to zero in */\n      /* case of an error disables this particular glyph only              */\n      if ( metrics->rightSideBearing < metrics->leftSideBearing ||\n           metrics->ascent + metrics->descent < 0               )\n      {\n        metrics->characterWidth   = 0;\n        metrics->leftSideBearing  = 0;\n        metrics->rightSideBearing = 0;\n        metrics->ascent           = 0;\n        metrics->descent          = 0;\n\n        FT_TRACE0(( \"pcf_get_metrics:\"\n                    \" invalid metrics for glyph %d\\n\", i ));\n      }\n    }\n\n    if ( error )\n      FT_FREE( face->metrics );\n\n  Bail:\n    return error;\n  }\n\n\n  static FT_Error\n  pcf_get_bitmaps( FT_Stream  stream,\n                   PCF_Face   face )\n  {\n    FT_Error   error;\n    FT_Memory  memory  = FT_FACE( face )->memory;\n    FT_Long*   offsets = NULL;\n    FT_Long    bitmapSizes[GLYPHPADOPTIONS];\n    FT_ULong   format, size;\n    FT_ULong   nbitmaps, i, sizebitmaps = 0;\n\n\n    error = pcf_seek_to_table_type( stream,\n                                    face->toc.tables,\n                                    face->toc.count,\n                                    PCF_BITMAPS,\n                                    &format,\n                                    &size );\n    if ( error )\n      return error;\n\n    error = FT_Stream_EnterFrame( stream, 8 );\n    if ( error )\n      return error;\n\n    format = FT_GET_ULONG_LE();\n    if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n      nbitmaps  = FT_GET_ULONG();\n    else\n      nbitmaps  = FT_GET_ULONG_LE();\n\n    FT_Stream_ExitFrame( stream );\n\n    if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )\n      return FT_THROW( Invalid_File_Format );\n\n    FT_TRACE4(( \"pcf_get_bitmaps:\\n\" ));\n\n    FT_TRACE4(( \"  number of bitmaps: %d\\n\", nbitmaps ));\n\n    /* XXX: PCF_Face->nmetrics is signed FT_Long, see pcf.h */\n    if ( face->nmetrics < 0 || nbitmaps != (FT_ULong)face->nmetrics )\n      return FT_THROW( Invalid_File_Format );\n\n    if ( FT_NEW_ARRAY( offsets, nbitmaps ) )\n      return error;\n\n    for ( i = 0; i < nbitmaps; i++ )\n    {\n      if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n        (void)FT_READ_LONG( offsets[i] );\n      else\n        (void)FT_READ_LONG_LE( offsets[i] );\n\n      FT_TRACE5(( \"  bitmap %d: offset %ld (0x%lX)\\n\",\n                  i, offsets[i], offsets[i] ));\n    }\n    if ( error )\n      goto Bail;\n\n    for ( i = 0; i < GLYPHPADOPTIONS; i++ )\n    {\n      if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n        (void)FT_READ_LONG( bitmapSizes[i] );\n      else\n        (void)FT_READ_LONG_LE( bitmapSizes[i] );\n      if ( error )\n        goto Bail;\n\n      sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX( format )];\n\n      FT_TRACE4(( \"  padding %d implies a size of %ld\\n\", i, bitmapSizes[i] ));\n    }\n\n    FT_TRACE4(( \"  %d bitmaps, padding index %ld\\n\",\n                nbitmaps,\n                PCF_GLYPH_PAD_INDEX( format ) ));\n    FT_TRACE4(( \"  bitmap size = %d\\n\", sizebitmaps ));\n\n    FT_UNUSED( sizebitmaps );       /* only used for debugging */\n\n    for ( i = 0; i < nbitmaps; i++ )\n    {\n      /* rough estimate */\n      if ( ( offsets[i] < 0 )              ||\n           ( (FT_ULong)offsets[i] > size ) )\n      {\n        FT_TRACE0(( \"pcf_get_bitmaps:\"\n                    \" invalid offset to bitmap data of glyph %d\\n\", i ));\n      }\n      else\n        face->metrics[i].bits = stream->pos + offsets[i];\n    }\n\n    face->bitmapsFormat = format;\n\n  Bail:\n    FT_FREE( offsets );\n    return error;\n  }\n\n\n  static FT_Error\n  pcf_get_encodings( FT_Stream  stream,\n                     PCF_Face   face )\n  {\n    FT_Error      error;\n    FT_Memory     memory = FT_FACE( face )->memory;\n    FT_ULong      format, size;\n    int           firstCol, lastCol;\n    int           firstRow, lastRow;\n    int           nencoding, encodingOffset;\n    int           i, j, k;\n    PCF_Encoding  encoding = NULL;\n\n\n    error = pcf_seek_to_table_type( stream,\n                                    face->toc.tables,\n                                    face->toc.count,\n                                    PCF_BDF_ENCODINGS,\n                                    &format,\n                                    &size );\n    if ( error )\n      return error;\n\n    error = FT_Stream_EnterFrame( stream, 14 );\n    if ( error )\n      return error;\n\n    format = FT_GET_ULONG_LE();\n\n    if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n    {\n      firstCol          = FT_GET_SHORT();\n      lastCol           = FT_GET_SHORT();\n      firstRow          = FT_GET_SHORT();\n      lastRow           = FT_GET_SHORT();\n      face->defaultChar = FT_GET_SHORT();\n    }\n    else\n    {\n      firstCol          = FT_GET_SHORT_LE();\n      lastCol           = FT_GET_SHORT_LE();\n      firstRow          = FT_GET_SHORT_LE();\n      lastRow           = FT_GET_SHORT_LE();\n      face->defaultChar = FT_GET_SHORT_LE();\n    }\n\n    FT_Stream_ExitFrame( stream );\n\n    if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )\n      return FT_THROW( Invalid_File_Format );\n\n    /* sanity checks */\n    if ( firstCol < 0       ||\n         firstCol > lastCol ||\n         lastCol  > 0xFF    ||\n         firstRow < 0       ||\n         firstRow > lastRow ||\n         lastRow  > 0xFF    )\n      return FT_THROW( Invalid_Table );\n\n    FT_TRACE4(( \"pdf_get_encodings:\\n\" ));\n\n    FT_TRACE4(( \"  firstCol %d, lastCol %d, firstRow %d, lastRow %d\\n\",\n                firstCol, lastCol, firstRow, lastRow ));\n\n    nencoding = ( lastCol - firstCol + 1 ) * ( lastRow - firstRow + 1 );\n\n    if ( FT_NEW_ARRAY( encoding, nencoding ) )\n      return FT_THROW( Out_Of_Memory );\n\n    error = FT_Stream_EnterFrame( stream, 2 * nencoding );\n    if ( error )\n      goto Bail;\n\n    k = 0;\n    for ( i = firstRow; i <= lastRow; i++ )\n    {\n      for ( j = firstCol; j <= lastCol; j++ )\n      {\n        if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n          encodingOffset = FT_GET_SHORT();\n        else\n          encodingOffset = FT_GET_SHORT_LE();\n\n        if ( encodingOffset != -1 )\n        {\n          encoding[k].enc   = i * 256 + j;\n          encoding[k].glyph = (FT_Short)encodingOffset;\n\n          FT_TRACE5(( \"  code %d (0x%04X): idx %d\\n\",\n                      encoding[k].enc, encoding[k].enc, encoding[k].glyph ));\n\n          k++;\n        }\n      }\n    }\n    FT_Stream_ExitFrame( stream );\n\n    if ( FT_RENEW_ARRAY( encoding, nencoding, k ) )\n      goto Bail;\n\n    face->nencodings = k;\n    face->encodings  = encoding;\n\n    return error;\n\n  Bail:\n    FT_FREE( encoding );\n    return error;\n  }\n\n\n  static\n  const FT_Frame_Field  pcf_accel_header[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PCF_AccelRec\n\n    FT_FRAME_START( 20 ),\n      FT_FRAME_BYTE      ( noOverlap ),\n      FT_FRAME_BYTE      ( constantMetrics ),\n      FT_FRAME_BYTE      ( terminalFont ),\n      FT_FRAME_BYTE      ( constantWidth ),\n      FT_FRAME_BYTE      ( inkInside ),\n      FT_FRAME_BYTE      ( inkMetrics ),\n      FT_FRAME_BYTE      ( drawDirection ),\n      FT_FRAME_SKIP_BYTES( 1 ),\n      FT_FRAME_LONG_LE   ( fontAscent ),\n      FT_FRAME_LONG_LE   ( fontDescent ),\n      FT_FRAME_LONG_LE   ( maxOverlap ),\n    FT_FRAME_END\n  };\n\n\n  static\n  const FT_Frame_Field  pcf_accel_msb_header[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PCF_AccelRec\n\n    FT_FRAME_START( 20 ),\n      FT_FRAME_BYTE      ( noOverlap ),\n      FT_FRAME_BYTE      ( constantMetrics ),\n      FT_FRAME_BYTE      ( terminalFont ),\n      FT_FRAME_BYTE      ( constantWidth ),\n      FT_FRAME_BYTE      ( inkInside ),\n      FT_FRAME_BYTE      ( inkMetrics ),\n      FT_FRAME_BYTE      ( drawDirection ),\n      FT_FRAME_SKIP_BYTES( 1 ),\n      FT_FRAME_LONG      ( fontAscent ),\n      FT_FRAME_LONG      ( fontDescent ),\n      FT_FRAME_LONG      ( maxOverlap ),\n    FT_FRAME_END\n  };\n\n\n  static FT_Error\n  pcf_get_accel( FT_Stream  stream,\n                 PCF_Face   face,\n                 FT_ULong   type )\n  {\n    FT_ULong   format, size;\n    FT_Error   error;\n    PCF_Accel  accel = &face->accel;\n\n\n    error = pcf_seek_to_table_type( stream,\n                                    face->toc.tables,\n                                    face->toc.count,\n                                    type,\n                                    &format,\n                                    &size );\n    if ( error )\n      goto Bail;\n\n    if ( FT_READ_ULONG_LE( format ) )\n      goto Bail;\n\n    if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT )    &&\n         !PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) )\n      goto Bail;\n\n    if ( PCF_BYTE_ORDER( format ) == MSBFirst )\n    {\n      if ( FT_STREAM_READ_FIELDS( pcf_accel_msb_header, accel ) )\n        goto Bail;\n    }\n    else\n    {\n      if ( FT_STREAM_READ_FIELDS( pcf_accel_header, accel ) )\n        goto Bail;\n    }\n\n    error = pcf_get_metric( stream,\n                            format & ( ~PCF_FORMAT_MASK ),\n                            &(accel->minbounds) );\n    if ( error )\n      goto Bail;\n\n    error = pcf_get_metric( stream,\n                            format & ( ~PCF_FORMAT_MASK ),\n                            &(accel->maxbounds) );\n    if ( error )\n      goto Bail;\n\n    if ( PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) )\n    {\n      error = pcf_get_metric( stream,\n                              format & ( ~PCF_FORMAT_MASK ),\n                              &(accel->ink_minbounds) );\n      if ( error )\n        goto Bail;\n\n      error = pcf_get_metric( stream,\n                              format & ( ~PCF_FORMAT_MASK ),\n                              &(accel->ink_maxbounds) );\n      if ( error )\n        goto Bail;\n    }\n    else\n    {\n      accel->ink_minbounds = accel->minbounds; /* I'm not sure about this */\n      accel->ink_maxbounds = accel->maxbounds;\n    }\n\n  Bail:\n    return error;\n  }\n\n\n  static FT_Error\n  pcf_interpret_style( PCF_Face  pcf )\n  {\n    FT_Error   error  = FT_Err_Ok;\n    FT_Face    face   = FT_FACE( pcf );\n    FT_Memory  memory = face->memory;\n\n    PCF_Property  prop;\n\n    size_t  nn, len;\n    char*   strings[4] = { NULL, NULL, NULL, NULL };\n    size_t  lengths[4];\n\n\n    face->style_flags = 0;\n\n    prop = pcf_find_property( pcf, \"SLANT\" );\n    if ( prop && prop->isString                                       &&\n         ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' ||\n           *(prop->value.atom) == 'I' || *(prop->value.atom) == 'i' ) )\n    {\n      face->style_flags |= FT_STYLE_FLAG_ITALIC;\n      strings[2] = ( *(prop->value.atom) == 'O' ||\n                     *(prop->value.atom) == 'o' ) ? (char *)\"Oblique\"\n                                                  : (char *)\"Italic\";\n    }\n\n    prop = pcf_find_property( pcf, \"WEIGHT_NAME\" );\n    if ( prop && prop->isString                                       &&\n         ( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) )\n    {\n      face->style_flags |= FT_STYLE_FLAG_BOLD;\n      strings[1] = (char*)\"Bold\";\n    }\n\n    prop = pcf_find_property( pcf, \"SETWIDTH_NAME\" );\n    if ( prop && prop->isString                                        &&\n         *(prop->value.atom)                                           &&\n         !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )\n      strings[3] = (char*)( prop->value.atom );\n\n    prop = pcf_find_property( pcf, \"ADD_STYLE_NAME\" );\n    if ( prop && prop->isString                                        &&\n         *(prop->value.atom)                                           &&\n         !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )\n      strings[0] = (char*)( prop->value.atom );\n\n    for ( len = 0, nn = 0; nn < 4; nn++ )\n    {\n      lengths[nn] = 0;\n      if ( strings[nn] )\n      {\n        lengths[nn] = ft_strlen( strings[nn] );\n        len        += lengths[nn] + 1;\n      }\n    }\n\n    if ( len == 0 )\n    {\n      strings[0] = (char*)\"Regular\";\n      lengths[0] = ft_strlen( strings[0] );\n      len        = lengths[0] + 1;\n    }\n\n    {\n      char*  s;\n\n\n      if ( FT_ALLOC( face->style_name, len ) )\n        return error;\n\n      s = face->style_name;\n\n      for ( nn = 0; nn < 4; nn++ )\n      {\n        char*  src = strings[nn];\n\n\n        len = lengths[nn];\n\n        if ( src == NULL )\n          continue;\n\n        /* separate elements with a space */\n        if ( s != face->style_name )\n          *s++ = ' ';\n\n        ft_memcpy( s, src, len );\n\n        /* need to convert spaces to dashes for */\n        /* add_style_name and setwidth_name     */\n        if ( nn == 0 || nn == 3 )\n        {\n          size_t  mm;\n\n\n          for ( mm = 0; mm < len; mm++ )\n            if ( s[mm] == ' ' )\n              s[mm] = '-';\n        }\n\n        s += len;\n      }\n      *s = 0;\n    }\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pcf_load_font( FT_Stream  stream,\n                 PCF_Face   face )\n  {\n    FT_Error   error;\n    FT_Memory  memory = FT_FACE( face )->memory;\n    FT_Bool    hasBDFAccelerators;\n\n\n    error = pcf_read_TOC( stream, face );\n    if ( error )\n      goto Exit;\n\n    error = pcf_get_properties( stream, face );\n    if ( error )\n      goto Exit;\n\n    /* Use the old accelerators if no BDF accelerators are in the file. */\n    hasBDFAccelerators = pcf_has_table_type( face->toc.tables,\n                                             face->toc.count,\n                                             PCF_BDF_ACCELERATORS );\n    if ( !hasBDFAccelerators )\n    {\n      error = pcf_get_accel( stream, face, PCF_ACCELERATORS );\n      if ( error )\n        goto Exit;\n    }\n\n    /* metrics */\n    error = pcf_get_metrics( stream, face );\n    if ( error )\n      goto Exit;\n\n    /* bitmaps */\n    error = pcf_get_bitmaps( stream, face );\n    if ( error )\n      goto Exit;\n\n    /* encodings */\n    error = pcf_get_encodings( stream, face );\n    if ( error )\n      goto Exit;\n\n    /* BDF style accelerators (i.e. bounds based on encoded glyphs) */\n    if ( hasBDFAccelerators )\n    {\n      error = pcf_get_accel( stream, face, PCF_BDF_ACCELERATORS );\n      if ( error )\n        goto Exit;\n    }\n\n    /* XXX: TO DO: inkmetrics and glyph_names are missing */\n\n    /* now construct the face object */\n    {\n      FT_Face       root = FT_FACE( face );\n      PCF_Property  prop;\n\n\n      root->num_faces  = 1;\n      root->face_index = 0;\n\n      root->face_flags |= FT_FACE_FLAG_FIXED_SIZES |\n                          FT_FACE_FLAG_HORIZONTAL  |\n                          FT_FACE_FLAG_FAST_GLYPHS;\n\n      if ( face->accel.constantWidth )\n        root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;\n\n      if ( ( error = pcf_interpret_style( face ) ) != 0 )\n         goto Exit;\n\n      prop = pcf_find_property( face, \"FAMILY_NAME\" );\n      if ( prop && prop->isString )\n      {\n        if ( FT_STRDUP( root->family_name, prop->value.atom ) )\n          goto Exit;\n      }\n      else\n        root->family_name = NULL;\n\n      /*\n       * Note: We shift all glyph indices by +1 since we must\n       * respect the convention that glyph 0 always corresponds\n       * to the `missing glyph'.\n       *\n       * This implies bumping the number of `available' glyphs by 1.\n       */\n      root->num_glyphs = face->nmetrics + 1;\n\n      root->num_fixed_sizes = 1;\n      if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )\n        goto Exit;\n\n      {\n        FT_Bitmap_Size*  bsize = root->available_sizes;\n        FT_Short         resolution_x = 0, resolution_y = 0;\n\n\n        FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );\n\n#if 0\n        bsize->height = face->accel.maxbounds.ascent << 6;\n#endif\n        bsize->height = (FT_Short)( face->accel.fontAscent +\n                                    face->accel.fontDescent );\n\n        prop = pcf_find_property( face, \"AVERAGE_WIDTH\" );\n        if ( prop )\n          bsize->width = (FT_Short)( ( prop->value.l + 5 ) / 10 );\n        else\n          bsize->width = (FT_Short)( bsize->height * 2/3 );\n\n        prop = pcf_find_property( face, \"POINT_SIZE\" );\n        if ( prop )\n          /* convert from 722.7 decipoints to 72 points per inch */\n          bsize->size =\n            (FT_Pos)( ( prop->value.l * 64 * 7200 + 36135L ) / 72270L );\n\n        prop = pcf_find_property( face, \"PIXEL_SIZE\" );\n        if ( prop )\n          bsize->y_ppem = (FT_Short)prop->value.l << 6;\n\n        prop = pcf_find_property( face, \"RESOLUTION_X\" );\n        if ( prop )\n          resolution_x = (FT_Short)prop->value.l;\n\n        prop = pcf_find_property( face, \"RESOLUTION_Y\" );\n        if ( prop )\n          resolution_y = (FT_Short)prop->value.l;\n\n        if ( bsize->y_ppem == 0 )\n        {\n          bsize->y_ppem = bsize->size;\n          if ( resolution_y )\n            bsize->y_ppem = bsize->y_ppem * resolution_y / 72;\n        }\n        if ( resolution_x && resolution_y )\n          bsize->x_ppem = bsize->y_ppem * resolution_x / resolution_y;\n        else\n          bsize->x_ppem = bsize->y_ppem;\n      }\n\n      /* set up charset */\n      {\n        PCF_Property  charset_registry = 0, charset_encoding = 0;\n\n\n        charset_registry = pcf_find_property( face, \"CHARSET_REGISTRY\" );\n        charset_encoding = pcf_find_property( face, \"CHARSET_ENCODING\" );\n\n        if ( charset_registry && charset_registry->isString &&\n             charset_encoding && charset_encoding->isString )\n        {\n          if ( FT_STRDUP( face->charset_encoding,\n                          charset_encoding->value.atom ) ||\n               FT_STRDUP( face->charset_registry,\n                          charset_registry->value.atom ) )\n            goto Exit;\n        }\n      }\n    }\n\n  Exit:\n    if ( error )\n    {\n      /* This is done to respect the behaviour of the original */\n      /* PCF font driver.                                      */\n      error = FT_THROW( Invalid_File_Format );\n    }\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/pcfread.h",
    "content": "/*  pcfread.h\n\n    FreeType font driver for pcf fonts\n\n  Copyright 2003 by\n  Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n\n#ifndef __PCFREAD_H__\n#define __PCFREAD_H__\n\n\n#include <ft2build.h>\n\nFT_BEGIN_HEADER\n\n  FT_LOCAL( PCF_Property )\n  pcf_find_property( PCF_Face          face,\n                     const FT_String*  prop );\n\nFT_END_HEADER\n\n#endif /* __PCFREAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/pcfutil.c",
    "content": "/*\n\nCopyright 1990, 1994, 1998  The Open Group\n\nPermission to use, copy, modify, distribute, and sell this software and its\ndocumentation for any purpose is hereby granted without fee, provided that\nthe above copyright notice appear in all copies and that both that\ncopyright notice and this permission notice appear in supporting\ndocumentation.\n\nThe above copyright notice and this permission notice shall be included in\nall copies 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\nOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The Open Group shall not be\nused in advertising or otherwise to promote the sale, use or other dealings\nin this Software without prior written authorization from The Open Group.\n\n*/\n/* $XFree86: xc/lib/font/util/utilbitmap.c,v 1.3 1999/08/22 08:58:58 dawes Exp $ */\n\n/*\n * Author:  Keith Packard, MIT X Consortium\n */\n\n/* Modified for use with FreeType */\n\n\n#include <ft2build.h>\n#include \"pcfutil.h\"\n\n\n  /*\n   *  Invert bit order within each BYTE of an array.\n   */\n\n  FT_LOCAL_DEF( void )\n  BitOrderInvert( unsigned char*  buf,\n                  size_t          nbytes )\n  {\n    for ( ; nbytes > 0; nbytes--, buf++ )\n    {\n      unsigned int  val = *buf;\n\n\n      val = ( ( val >> 1 ) & 0x55 ) | ( ( val << 1 ) & 0xAA );\n      val = ( ( val >> 2 ) & 0x33 ) | ( ( val << 2 ) & 0xCC );\n      val = ( ( val >> 4 ) & 0x0F ) | ( ( val << 4 ) & 0xF0 );\n\n      *buf = (unsigned char)val;\n    }\n  }\n\n\n  /*\n   *  Invert byte order within each 16-bits of an array.\n   */\n\n  FT_LOCAL_DEF( void )\n  TwoByteSwap( unsigned char*  buf,\n               size_t          nbytes )\n  {\n    for ( ; nbytes >= 2; nbytes -= 2, buf += 2 )\n    {\n      unsigned char  c;\n\n\n      c      = buf[0];\n      buf[0] = buf[1];\n      buf[1] = c;\n    }\n  }\n\n  /*\n   *  Invert byte order within each 32-bits of an array.\n   */\n\n  FT_LOCAL_DEF( void )\n  FourByteSwap( unsigned char*  buf,\n                size_t          nbytes )\n  {\n    for ( ; nbytes >= 4; nbytes -= 4, buf += 4 )\n    {\n      unsigned char  c;\n\n\n      c      = buf[0];\n      buf[0] = buf[3];\n      buf[3] = c;\n\n      c      = buf[1];\n      buf[1] = buf[2];\n      buf[2] = c;\n    }\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pcf/pcfutil.h",
    "content": "/*  pcfutil.h\n\n    FreeType font driver for pcf fonts\n\n  Copyright 2000, 2001, 2004 by\n  Francesco Zappa Nardelli\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\nall copies 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\nTHE SOFTWARE.\n*/\n\n\n#ifndef __PCFUTIL_H__\n#define __PCFUTIL_H__\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n\n\nFT_BEGIN_HEADER\n\n  FT_LOCAL( void )\n  BitOrderInvert( unsigned char*  buf,\n                  size_t          nbytes );\n\n  FT_LOCAL( void )\n  TwoByteSwap( unsigned char*  buf,\n               size_t          nbytes );\n\n  FT_LOCAL( void )\n  FourByteSwap( unsigned char*  buf,\n                size_t          nbytes );\n\nFT_END_HEADER\n\n#endif /* __PCFUTIL_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfr.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfr.c                                                                  */\n/*                                                                         */\n/*    FreeType PFR driver component.                                       */\n/*                                                                         */\n/*  Copyright 2002 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n\n#include \"pfrload.c\"\n#include \"pfrgload.c\"\n#include \"pfrcmap.c\"\n#include \"pfrobjs.c\"\n#include \"pfrdrivr.c\"\n#include \"pfrsbit.c\"\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrcmap.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrcmap.c                                                              */\n/*                                                                         */\n/*    FreeType PFR cmap handling (body).                                   */\n/*                                                                         */\n/*  Copyright 2002, 2007, 2009, 2013 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include \"pfrcmap.h\"\n#include \"pfrobjs.h\"\n\n#include \"pfrerror.h\"\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  pfr_cmap_init( PFR_CMap    cmap,\n                 FT_Pointer  pointer )\n  {\n    FT_Error  error = FT_Err_Ok;\n    PFR_Face  face  = (PFR_Face)FT_CMAP_FACE( cmap );\n\n    FT_UNUSED( pointer );\n\n\n    cmap->num_chars = face->phy_font.num_chars;\n    cmap->chars     = face->phy_font.chars;\n\n    /* just for safety, check that the character entries are correctly */\n    /* sorted in increasing character code order                       */\n    {\n      FT_UInt  n;\n\n\n      for ( n = 1; n < cmap->num_chars; n++ )\n      {\n        if ( cmap->chars[n - 1].char_code >= cmap->chars[n].char_code )\n        {\n          error = FT_THROW( Invalid_Table );\n          goto Exit;\n        }\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  pfr_cmap_done( PFR_CMap  cmap )\n  {\n    cmap->chars     = NULL;\n    cmap->num_chars = 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  pfr_cmap_char_index( PFR_CMap   cmap,\n                       FT_UInt32  char_code )\n  {\n    FT_UInt  min = 0;\n    FT_UInt  max = cmap->num_chars;\n\n\n    while ( min < max )\n    {\n      PFR_Char  gchar;\n      FT_UInt   mid;\n\n\n      mid   = min + ( max - min ) / 2;\n      gchar = cmap->chars + mid;\n\n      if ( gchar->char_code == char_code )\n        return mid + 1;\n\n      if ( gchar->char_code < char_code )\n        min = mid + 1;\n      else\n        max = mid;\n    }\n    return 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  pfr_cmap_char_next( PFR_CMap    cmap,\n                      FT_UInt32  *pchar_code )\n  {\n    FT_UInt    result    = 0;\n    FT_UInt32  char_code = *pchar_code + 1;\n\n\n  Restart:\n    {\n      FT_UInt   min = 0;\n      FT_UInt   max = cmap->num_chars;\n      FT_UInt   mid;\n      PFR_Char  gchar;\n\n\n      while ( min < max )\n      {\n        mid   = min + ( ( max - min ) >> 1 );\n        gchar = cmap->chars + mid;\n\n        if ( gchar->char_code == char_code )\n        {\n          result = mid;\n          if ( result != 0 )\n          {\n            result++;\n            goto Exit;\n          }\n\n          char_code++;\n          goto Restart;\n        }\n\n        if ( gchar->char_code < char_code )\n          min = mid+1;\n        else\n          max = mid;\n      }\n\n      /* we didn't find it, but we have a pair just above it */\n      char_code = 0;\n\n      if ( min < cmap->num_chars )\n      {\n        gchar  = cmap->chars + min;\n        result = min;\n        if ( result != 0 )\n        {\n          result++;\n          char_code = gchar->char_code;\n        }\n      }\n    }\n\n  Exit:\n    *pchar_code = char_code;\n    return result;\n  }\n\n\n  FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec\n  pfr_cmap_class_rec =\n  {\n    sizeof ( PFR_CMapRec ),\n\n    (FT_CMap_InitFunc)     pfr_cmap_init,\n    (FT_CMap_DoneFunc)     pfr_cmap_done,\n    (FT_CMap_CharIndexFunc)pfr_cmap_char_index,\n    (FT_CMap_CharNextFunc) pfr_cmap_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrcmap.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrcmap.h                                                              */\n/*                                                                         */\n/*    FreeType PFR cmap handling (specification).                          */\n/*                                                                         */\n/*  Copyright 2002 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PFRCMAP_H__\n#define __PFRCMAP_H__\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include \"pfrtypes.h\"\n\n\nFT_BEGIN_HEADER\n\n  typedef struct  PFR_CMapRec_\n  {\n    FT_CMapRec  cmap;\n    FT_UInt     num_chars;\n    PFR_Char    chars;\n\n  } PFR_CMapRec, *PFR_CMap;\n\n\n  FT_CALLBACK_TABLE const FT_CMap_ClassRec  pfr_cmap_class_rec;\n\nFT_END_HEADER\n\n\n#endif /* __PFRCMAP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrdrivr.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrdrivr.c                                                             */\n/*                                                                         */\n/*    FreeType PFR driver interface (body).                                */\n/*                                                                         */\n/*  Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013, 2014 by             */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_SERVICE_PFR_H\n#include FT_SERVICE_XFREE86_NAME_H\n#include \"pfrdrivr.h\"\n#include \"pfrobjs.h\"\n\n#include \"pfrerror.h\"\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  pfr_get_kerning( FT_Face     pfrface,     /* PFR_Face */\n                   FT_UInt     left,\n                   FT_UInt     right,\n                   FT_Vector  *avector )\n  {\n    PFR_Face     face = (PFR_Face)pfrface;\n    PFR_PhyFont  phys = &face->phy_font;\n\n\n    (void)pfr_face_get_kerning( pfrface, left, right, avector );\n\n    /* convert from metrics to outline units when necessary */\n    if ( phys->outline_resolution != phys->metrics_resolution )\n    {\n      if ( avector->x != 0 )\n        avector->x = FT_MulDiv( avector->x, phys->outline_resolution,\n                                            phys->metrics_resolution );\n\n      if ( avector->y != 0 )\n        avector->y = FT_MulDiv( avector->x, phys->outline_resolution,\n                                            phys->metrics_resolution );\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n /*\n  *  PFR METRICS SERVICE\n  *\n  */\n\n  FT_CALLBACK_DEF( FT_Error )\n  pfr_get_advance( FT_Face   pfrface,       /* PFR_Face */\n                   FT_UInt   gindex,\n                   FT_Pos   *anadvance )\n  {\n    PFR_Face  face  = (PFR_Face)pfrface;\n    FT_Error  error = FT_ERR( Invalid_Argument );\n\n\n    *anadvance = 0;\n\n    if ( !gindex )\n      goto Exit;\n\n    gindex--;\n\n    if ( face )\n    {\n      PFR_PhyFont  phys = &face->phy_font;\n\n\n      if ( gindex < phys->num_chars )\n      {\n        *anadvance = phys->chars[gindex].advance;\n        error      = FT_Err_Ok;\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  pfr_get_metrics( FT_Face    pfrface,      /* PFR_Face */\n                   FT_UInt   *anoutline_resolution,\n                   FT_UInt   *ametrics_resolution,\n                   FT_Fixed  *ametrics_x_scale,\n                   FT_Fixed  *ametrics_y_scale )\n  {\n    PFR_Face     face = (PFR_Face)pfrface;\n    PFR_PhyFont  phys = &face->phy_font;\n    FT_Fixed     x_scale, y_scale;\n    FT_Size      size = face->root.size;\n\n\n    if ( anoutline_resolution )\n      *anoutline_resolution = phys->outline_resolution;\n\n    if ( ametrics_resolution )\n      *ametrics_resolution = phys->metrics_resolution;\n\n    x_scale = 0x10000L;\n    y_scale = 0x10000L;\n\n    if ( size )\n    {\n      x_scale = FT_DivFix( size->metrics.x_ppem << 6,\n                           phys->metrics_resolution );\n\n      y_scale = FT_DivFix( size->metrics.y_ppem << 6,\n                           phys->metrics_resolution );\n    }\n\n    if ( ametrics_x_scale )\n      *ametrics_x_scale = x_scale;\n\n    if ( ametrics_y_scale )\n      *ametrics_y_scale = y_scale;\n\n    return FT_Err_Ok;\n  }\n\n\n  static\n  const FT_Service_PfrMetricsRec  pfr_metrics_service_rec =\n  {\n    pfr_get_metrics,\n    pfr_face_get_kerning,\n    pfr_get_advance\n  };\n\n\n /*\n  *  SERVICE LIST\n  *\n  */\n\n  static const FT_ServiceDescRec  pfr_services[] =\n  {\n    { FT_SERVICE_ID_PFR_METRICS, &pfr_metrics_service_rec },\n    { FT_SERVICE_ID_XF86_NAME,   FT_XF86_FORMAT_PFR },\n    { NULL, NULL }\n  };\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  pfr_get_service( FT_Module         module,\n                   const FT_String*  service_id )\n  {\n    FT_UNUSED( module );\n\n    return ft_service_list_lookup( pfr_services, service_id );\n  }\n\n\n  FT_CALLBACK_TABLE_DEF\n  const FT_Driver_ClassRec  pfr_driver_class =\n  {\n    {\n      FT_MODULE_FONT_DRIVER     |\n      FT_MODULE_DRIVER_SCALABLE,\n\n      sizeof ( FT_DriverRec ),\n\n      \"pfr\",\n      0x10000L,\n      0x20000L,\n\n      NULL,\n\n      0,                /* FT_Module_Constructor */\n      0,                /* FT_Module_Destructor  */\n      pfr_get_service\n    },\n\n    sizeof ( PFR_FaceRec ),\n    sizeof ( PFR_SizeRec ),\n    sizeof ( PFR_SlotRec ),\n\n    pfr_face_init,\n    pfr_face_done,\n    0,                  /* FT_Size_InitFunc */\n    0,                  /* FT_Size_DoneFunc */\n    pfr_slot_init,\n    pfr_slot_done,\n\n    pfr_slot_load,\n\n    pfr_get_kerning,\n    0,                  /* FT_Face_AttachFunc      */\n    0,                  /* FT_Face_GetAdvancesFunc */\n    0,                  /* FT_Size_RequestFunc     */\n    0,                  /* FT_Size_SelectFunc      */\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrdrivr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrdrivr.h                                                             */\n/*                                                                         */\n/*    High-level Type PFR driver interface (specification).                */\n/*                                                                         */\n/*  Copyright 2002 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PFRDRIVR_H__\n#define __PFRDRIVR_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n\n  FT_EXPORT_VAR( const FT_Driver_ClassRec )  pfr_driver_class;\n\n\nFT_END_HEADER\n\n\n#endif /* __PFRDRIVR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrerror.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrerror.h                                                             */\n/*                                                                         */\n/*    PFR error codes (specification only).                                */\n/*                                                                         */\n/*  Copyright 2002, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the PFR error enumeration constants.      */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __PFRERROR_H__\n#define __PFRERROR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  PFR_Err_\n#define FT_ERR_BASE    FT_Mod_Err_PFR\n\n#include FT_ERRORS_H\n\n#endif /* __PFRERROR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrgload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrgload.c                                                             */\n/*                                                                         */\n/*    FreeType PFR glyph loader (body).                                    */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2005, 2007, 2010, 2013 by                        */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"pfrgload.h\"\n#include \"pfrsbit.h\"\n#include \"pfrload.h\"            /* for macro definitions */\n#include FT_INTERNAL_DEBUG_H\n\n#include \"pfrerror.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_pfr\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      PFR GLYPH BUILDER                        *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_LOCAL_DEF( void )\n  pfr_glyph_init( PFR_Glyph       glyph,\n                  FT_GlyphLoader  loader )\n  {\n    FT_ZERO( glyph );\n\n    glyph->loader     = loader;\n    glyph->path_begun = 0;\n\n    FT_GlyphLoader_Rewind( loader );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  pfr_glyph_done( PFR_Glyph  glyph )\n  {\n    FT_Memory  memory = glyph->loader->memory;\n\n\n    FT_FREE( glyph->x_control );\n    glyph->y_control = NULL;\n\n    glyph->max_xy_control = 0;\n#if 0\n    glyph->num_x_control  = 0;\n    glyph->num_y_control  = 0;\n#endif\n\n    FT_FREE( glyph->subs );\n\n    glyph->max_subs = 0;\n    glyph->num_subs = 0;\n\n    glyph->loader     = NULL;\n    glyph->path_begun = 0;\n  }\n\n\n  /* close current contour, if any */\n  static void\n  pfr_glyph_close_contour( PFR_Glyph  glyph )\n  {\n    FT_GlyphLoader  loader  = glyph->loader;\n    FT_Outline*     outline = &loader->current.outline;\n    FT_Int          last, first;\n\n\n    if ( !glyph->path_begun )\n      return;\n\n    /* compute first and last point indices in current glyph outline */\n    last  = outline->n_points - 1;\n    first = 0;\n    if ( outline->n_contours > 0 )\n      first = outline->contours[outline->n_contours - 1];\n\n    /* if the last point falls on the same location than the first one */\n    /* we need to delete it                                            */\n    if ( last > first )\n    {\n      FT_Vector*  p1 = outline->points + first;\n      FT_Vector*  p2 = outline->points + last;\n\n\n      if ( p1->x == p2->x && p1->y == p2->y )\n      {\n        outline->n_points--;\n        last--;\n      }\n    }\n\n    /* don't add empty contours */\n    if ( last >= first )\n      outline->contours[outline->n_contours++] = (short)last;\n\n    glyph->path_begun = 0;\n  }\n\n\n  /* reset glyph to start the loading of a new glyph */\n  static void\n  pfr_glyph_start( PFR_Glyph  glyph )\n  {\n    glyph->path_begun = 0;\n  }\n\n\n  static FT_Error\n  pfr_glyph_line_to( PFR_Glyph   glyph,\n                     FT_Vector*  to )\n  {\n    FT_GlyphLoader  loader  = glyph->loader;\n    FT_Outline*     outline = &loader->current.outline;\n    FT_Error        error;\n\n\n    /* check that we have begun a new path */\n    if ( !glyph->path_begun )\n    {\n      error = FT_THROW( Invalid_Table );\n      FT_ERROR(( \"pfr_glyph_line_to: invalid glyph data\\n\" ));\n      goto Exit;\n    }\n\n    error = FT_GLYPHLOADER_CHECK_POINTS( loader, 1, 0 );\n    if ( !error )\n    {\n      FT_UInt  n = outline->n_points;\n\n\n      outline->points[n] = *to;\n      outline->tags  [n] = FT_CURVE_TAG_ON;\n\n      outline->n_points++;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  pfr_glyph_curve_to( PFR_Glyph   glyph,\n                      FT_Vector*  control1,\n                      FT_Vector*  control2,\n                      FT_Vector*  to )\n  {\n    FT_GlyphLoader  loader  = glyph->loader;\n    FT_Outline*     outline = &loader->current.outline;\n    FT_Error        error;\n\n\n    /* check that we have begun a new path */\n    if ( !glyph->path_begun )\n    {\n      error = FT_THROW( Invalid_Table );\n      FT_ERROR(( \"pfr_glyph_line_to: invalid glyph data\\n\" ));\n      goto Exit;\n    }\n\n    error = FT_GLYPHLOADER_CHECK_POINTS( loader, 3, 0 );\n    if ( !error )\n    {\n      FT_Vector*  vec = outline->points         + outline->n_points;\n      FT_Byte*    tag = (FT_Byte*)outline->tags + outline->n_points;\n\n\n      vec[0] = *control1;\n      vec[1] = *control2;\n      vec[2] = *to;\n      tag[0] = FT_CURVE_TAG_CUBIC;\n      tag[1] = FT_CURVE_TAG_CUBIC;\n      tag[2] = FT_CURVE_TAG_ON;\n\n      outline->n_points = (FT_Short)( outline->n_points + 3 );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  pfr_glyph_move_to( PFR_Glyph   glyph,\n                     FT_Vector*  to )\n  {\n    FT_GlyphLoader  loader  = glyph->loader;\n    FT_Error        error;\n\n\n    /* close current contour if any */\n    pfr_glyph_close_contour( glyph );\n\n    /* indicate that a new contour has started */\n    glyph->path_begun = 1;\n\n    /* check that there is space for a new contour and a new point */\n    error = FT_GLYPHLOADER_CHECK_POINTS( loader, 1, 1 );\n    if ( !error )\n      /* add new start point */\n      error = pfr_glyph_line_to( glyph, to );\n\n    return error;\n  }\n\n\n  static void\n  pfr_glyph_end( PFR_Glyph  glyph )\n  {\n    /* close current contour if any */\n    pfr_glyph_close_contour( glyph );\n\n    /* merge the current glyph into the stack */\n    FT_GlyphLoader_Add( glyph->loader );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      PFR GLYPH LOADER                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* load a simple glyph */\n  static FT_Error\n  pfr_glyph_load_simple( PFR_Glyph  glyph,\n                         FT_Byte*   p,\n                         FT_Byte*   limit )\n  {\n    FT_Error   error  = FT_Err_Ok;\n    FT_Memory  memory = glyph->loader->memory;\n    FT_UInt    flags, x_count, y_count, i, count, mask;\n    FT_Int     x;\n\n\n    PFR_CHECK( 1 );\n    flags = PFR_NEXT_BYTE( p );\n\n    /* test for composite glyphs */\n    if ( flags & PFR_GLYPH_IS_COMPOUND )\n      goto Failure;\n\n    x_count = 0;\n    y_count = 0;\n\n    if ( flags & PFR_GLYPH_1BYTE_XYCOUNT )\n    {\n      PFR_CHECK( 1 );\n      count   = PFR_NEXT_BYTE( p );\n      x_count = count & 15;\n      y_count = count >> 4;\n    }\n    else\n    {\n      if ( flags & PFR_GLYPH_XCOUNT )\n      {\n        PFR_CHECK( 1 );\n        x_count = PFR_NEXT_BYTE( p );\n      }\n\n      if ( flags & PFR_GLYPH_YCOUNT )\n      {\n        PFR_CHECK( 1 );\n        y_count = PFR_NEXT_BYTE( p );\n      }\n    }\n\n    count = x_count + y_count;\n\n    /* re-allocate array when necessary */\n    if ( count > glyph->max_xy_control )\n    {\n      FT_UInt  new_max = FT_PAD_CEIL( count, 8 );\n\n\n      if ( FT_RENEW_ARRAY( glyph->x_control,\n                           glyph->max_xy_control,\n                           new_max ) )\n        goto Exit;\n\n      glyph->max_xy_control = new_max;\n    }\n\n    glyph->y_control = glyph->x_control + x_count;\n\n    mask  = 0;\n    x     = 0;\n\n    for ( i = 0; i < count; i++ )\n    {\n      if ( ( i & 7 ) == 0 )\n      {\n        PFR_CHECK( 1 );\n        mask = PFR_NEXT_BYTE( p );\n      }\n\n      if ( mask & 1 )\n      {\n        PFR_CHECK( 2 );\n        x = PFR_NEXT_SHORT( p );\n      }\n      else\n      {\n        PFR_CHECK( 1 );\n        x += PFR_NEXT_BYTE( p );\n      }\n\n      glyph->x_control[i] = x;\n\n      mask >>= 1;\n    }\n\n    /* XXX: for now we ignore the secondary stroke and edge definitions */\n    /*      since we don't want to support native PFR hinting           */\n    /*                                                                  */\n    if ( flags & PFR_GLYPH_EXTRA_ITEMS )\n    {\n      error = pfr_extra_items_skip( &p, limit );\n      if ( error )\n        goto Exit;\n    }\n\n    pfr_glyph_start( glyph );\n\n    /* now load a simple glyph */\n    {\n      FT_Vector   pos[4];\n      FT_Vector*  cur;\n\n\n      pos[0].x = pos[0].y = 0;\n      pos[3]   = pos[0];\n\n      for (;;)\n      {\n        FT_UInt  format, format_low, args_format = 0, args_count, n;\n\n\n        /***************************************************************/\n        /*  read instruction                                           */\n        /*                                                             */\n        PFR_CHECK( 1 );\n        format     = PFR_NEXT_BYTE( p );\n        format_low = format & 15;\n\n        switch ( format >> 4 )\n        {\n        case 0:                             /* end glyph */\n          FT_TRACE6(( \"- end glyph\" ));\n          args_count = 0;\n          break;\n\n        case 1:                             /* general line operation */\n          FT_TRACE6(( \"- general line\" ));\n          goto Line1;\n\n        case 4:                             /* move to inside contour  */\n          FT_TRACE6(( \"- move to inside\" ));\n          goto Line1;\n\n        case 5:                             /* move to outside contour */\n          FT_TRACE6(( \"- move to outside\" ));\n        Line1:\n          args_format = format_low;\n          args_count  = 1;\n          break;\n\n        case 2:                             /* horizontal line to */\n          FT_TRACE6(( \"- horizontal line to cx.%d\", format_low ));\n          if ( format_low >= x_count )\n            goto Failure;\n          pos[0].x   = glyph->x_control[format_low];\n          pos[0].y   = pos[3].y;\n          pos[3]     = pos[0];\n          args_count = 0;\n          break;\n\n        case 3:                             /* vertical line to */\n          FT_TRACE6(( \"- vertical line to cy.%d\", format_low ));\n          if ( format_low >= y_count )\n            goto Failure;\n          pos[0].x   = pos[3].x;\n          pos[0].y   = glyph->y_control[format_low];\n          pos[3]     = pos[0];\n          args_count = 0;\n          break;\n\n        case 6:                             /* horizontal to vertical curve */\n          FT_TRACE6(( \"- hv curve \" ));\n          args_format = 0xB8E;\n          args_count  = 3;\n          break;\n\n        case 7:                             /* vertical to horizontal curve */\n          FT_TRACE6(( \"- vh curve\" ));\n          args_format = 0xE2B;\n          args_count  = 3;\n          break;\n\n        default:                            /* general curve to */\n          FT_TRACE6(( \"- general curve\" ));\n          args_count  = 4;\n          args_format = format_low;\n        }\n\n        /***********************************************************/\n        /*  now read arguments                                     */\n        /*                                                         */\n        cur = pos;\n        for ( n = 0; n < args_count; n++ )\n        {\n          FT_UInt  idx;\n          FT_Int   delta;\n\n\n          /* read the X argument */\n          switch ( args_format & 3 )\n          {\n          case 0:                           /* 8-bit index */\n            PFR_CHECK( 1 );\n            idx  = PFR_NEXT_BYTE( p );\n            if ( idx >= x_count )\n              goto Failure;\n            cur->x = glyph->x_control[idx];\n            FT_TRACE7(( \" cx#%d\", idx ));\n            break;\n\n          case 1:                           /* 16-bit value */\n            PFR_CHECK( 2 );\n            cur->x = PFR_NEXT_SHORT( p );\n            FT_TRACE7(( \" x.%d\", cur->x ));\n            break;\n\n          case 2:                           /* 8-bit delta */\n            PFR_CHECK( 1 );\n            delta  = PFR_NEXT_INT8( p );\n            cur->x = pos[3].x + delta;\n            FT_TRACE7(( \" dx.%d\", delta ));\n            break;\n\n          default:\n            FT_TRACE7(( \" |\" ));\n            cur->x = pos[3].x;\n          }\n\n          /* read the Y argument */\n          switch ( ( args_format >> 2 ) & 3 )\n          {\n          case 0:                           /* 8-bit index */\n            PFR_CHECK( 1 );\n            idx  = PFR_NEXT_BYTE( p );\n            if ( idx >= y_count )\n              goto Failure;\n            cur->y = glyph->y_control[idx];\n            FT_TRACE7(( \" cy#%d\", idx ));\n            break;\n\n          case 1:                           /* 16-bit absolute value */\n            PFR_CHECK( 2 );\n            cur->y = PFR_NEXT_SHORT( p );\n            FT_TRACE7(( \" y.%d\", cur->y ));\n            break;\n\n          case 2:                           /* 8-bit delta */\n            PFR_CHECK( 1 );\n            delta  = PFR_NEXT_INT8( p );\n            cur->y = pos[3].y + delta;\n            FT_TRACE7(( \" dy.%d\", delta ));\n            break;\n\n          default:\n            FT_TRACE7(( \" -\" ));\n            cur->y = pos[3].y;\n          }\n\n          /* read the additional format flag for the general curve */\n          if ( n == 0 && args_count == 4 )\n          {\n            PFR_CHECK( 1 );\n            args_format = PFR_NEXT_BYTE( p );\n            args_count--;\n          }\n          else\n            args_format >>= 4;\n\n          /* save the previous point */\n          pos[3] = cur[0];\n          cur++;\n        }\n\n        FT_TRACE7(( \"\\n\" ));\n\n        /***********************************************************/\n        /*  finally, execute instruction                           */\n        /*                                                         */\n        switch ( format >> 4 )\n        {\n        case 0:                             /* end glyph => EXIT */\n          pfr_glyph_end( glyph );\n          goto Exit;\n\n        case 1:                             /* line operations */\n        case 2:\n        case 3:\n          error = pfr_glyph_line_to( glyph, pos );\n          goto Test_Error;\n\n        case 4:                             /* move to inside contour  */\n        case 5:                             /* move to outside contour */\n          error = pfr_glyph_move_to( glyph, pos );\n          goto Test_Error;\n\n        default:                            /* curve operations */\n          error = pfr_glyph_curve_to( glyph, pos, pos + 1, pos + 2 );\n\n        Test_Error:  /* test error condition */\n          if ( error )\n            goto Exit;\n        }\n      } /* for (;;) */\n    }\n\n  Exit:\n    return error;\n\n  Failure:\n  Too_Short:\n    error = FT_THROW( Invalid_Table );\n    FT_ERROR(( \"pfr_glyph_load_simple: invalid glyph data\\n\" ));\n    goto Exit;\n  }\n\n\n  /* load a composite/compound glyph */\n  static FT_Error\n  pfr_glyph_load_compound( PFR_Glyph  glyph,\n                           FT_Byte*   p,\n                           FT_Byte*   limit )\n  {\n    FT_Error        error  = FT_Err_Ok;\n    FT_GlyphLoader  loader = glyph->loader;\n    FT_Memory       memory = loader->memory;\n    PFR_SubGlyph    subglyph;\n    FT_UInt         flags, i, count, org_count;\n    FT_Int          x_pos, y_pos;\n\n\n    PFR_CHECK( 1 );\n    flags = PFR_NEXT_BYTE( p );\n\n    /* test for composite glyphs */\n    if ( !( flags & PFR_GLYPH_IS_COMPOUND ) )\n      goto Failure;\n\n    count = flags & 0x3F;\n\n    /* ignore extra items when present */\n    /*                                 */\n    if ( flags & PFR_GLYPH_EXTRA_ITEMS )\n    {\n      error = pfr_extra_items_skip( &p, limit );\n      if (error) goto Exit;\n    }\n\n    /* we can't rely on the FT_GlyphLoader to load sub-glyphs, because   */\n    /* the PFR format is dumb, using direct file offsets to point to the */\n    /* sub-glyphs (instead of glyph indices).  Sigh.                     */\n    /*                                                                   */\n    /* For now, we load the list of sub-glyphs into a different array    */\n    /* but this will prevent us from using the auto-hinter at its best   */\n    /* quality.                                                          */\n    /*                                                                   */\n    org_count = glyph->num_subs;\n\n    if ( org_count + count > glyph->max_subs )\n    {\n      FT_UInt  new_max = ( org_count + count + 3 ) & (FT_UInt)-4;\n\n\n      /* we arbitrarily limit the number of subglyphs */\n      /* to avoid endless recursion                   */\n      if ( new_max > 64 )\n      {\n        error = FT_THROW( Invalid_Table );\n        FT_ERROR(( \"pfr_glyph_load_compound:\"\n                   \" too many compound glyphs components\\n\" ));\n        goto Exit;\n      }\n\n      if ( FT_RENEW_ARRAY( glyph->subs, glyph->max_subs, new_max ) )\n        goto Exit;\n\n      glyph->max_subs = new_max;\n    }\n\n    subglyph = glyph->subs + org_count;\n\n    for ( i = 0; i < count; i++, subglyph++ )\n    {\n      FT_UInt  format;\n\n\n      x_pos = 0;\n      y_pos = 0;\n\n      PFR_CHECK( 1 );\n      format = PFR_NEXT_BYTE( p );\n\n      /* read scale when available */\n      subglyph->x_scale = 0x10000L;\n      if ( format & PFR_SUBGLYPH_XSCALE )\n      {\n        PFR_CHECK( 2 );\n        subglyph->x_scale = PFR_NEXT_SHORT( p ) << 4;\n      }\n\n      subglyph->y_scale = 0x10000L;\n      if ( format & PFR_SUBGLYPH_YSCALE )\n      {\n        PFR_CHECK( 2 );\n        subglyph->y_scale = PFR_NEXT_SHORT( p ) << 4;\n      }\n\n      /* read offset */\n      switch ( format & 3 )\n      {\n      case 1:\n        PFR_CHECK( 2 );\n        x_pos = PFR_NEXT_SHORT( p );\n        break;\n\n      case 2:\n        PFR_CHECK( 1 );\n        x_pos += PFR_NEXT_INT8( p );\n        break;\n\n      default:\n        ;\n      }\n\n      switch ( ( format >> 2 ) & 3 )\n      {\n      case 1:\n        PFR_CHECK( 2 );\n        y_pos = PFR_NEXT_SHORT( p );\n        break;\n\n      case 2:\n        PFR_CHECK( 1 );\n        y_pos += PFR_NEXT_INT8( p );\n        break;\n\n      default:\n        ;\n      }\n\n      subglyph->x_delta = x_pos;\n      subglyph->y_delta = y_pos;\n\n      /* read glyph position and size now */\n      if ( format & PFR_SUBGLYPH_2BYTE_SIZE )\n      {\n        PFR_CHECK( 2 );\n        subglyph->gps_size = PFR_NEXT_USHORT( p );\n      }\n      else\n      {\n        PFR_CHECK( 1 );\n        subglyph->gps_size = PFR_NEXT_BYTE( p );\n      }\n\n      if ( format & PFR_SUBGLYPH_3BYTE_OFFSET )\n      {\n        PFR_CHECK( 3 );\n        subglyph->gps_offset = PFR_NEXT_LONG( p );\n      }\n      else\n      {\n        PFR_CHECK( 2 );\n        subglyph->gps_offset = PFR_NEXT_USHORT( p );\n      }\n\n      glyph->num_subs++;\n    }\n\n  Exit:\n    return error;\n\n  Failure:\n  Too_Short:\n    error = FT_THROW( Invalid_Table );\n    FT_ERROR(( \"pfr_glyph_load_compound: invalid glyph data\\n\" ));\n    goto Exit;\n  }\n\n\n  static FT_Error\n  pfr_glyph_load_rec( PFR_Glyph  glyph,\n                      FT_Stream  stream,\n                      FT_ULong   gps_offset,\n                      FT_ULong   offset,\n                      FT_ULong   size )\n  {\n    FT_Error  error;\n    FT_Byte*  p;\n    FT_Byte*  limit;\n\n\n    if ( FT_STREAM_SEEK( gps_offset + offset ) ||\n         FT_FRAME_ENTER( size )                )\n      goto Exit;\n\n    p     = (FT_Byte*)stream->cursor;\n    limit = p + size;\n\n    if ( size > 0 && *p & PFR_GLYPH_IS_COMPOUND )\n    {\n      FT_Int          n, old_count, count;\n      FT_GlyphLoader  loader = glyph->loader;\n      FT_Outline*     base   = &loader->base.outline;\n\n\n      old_count = glyph->num_subs;\n\n      /* this is a compound glyph - load it */\n      error = pfr_glyph_load_compound( glyph, p, limit );\n\n      FT_FRAME_EXIT();\n\n      if ( error )\n        goto Exit;\n\n      count = glyph->num_subs - old_count;\n\n      FT_TRACE4(( \"compound glyph with %d elements (offset %lu):\\n\",\n                  count, offset ));\n\n      /* now, load each individual glyph */\n      for ( n = 0; n < count; n++ )\n      {\n        FT_Int        i, old_points, num_points;\n        PFR_SubGlyph  subglyph;\n\n\n        FT_TRACE4(( \"  subglyph %d:\\n\", n ));\n\n        subglyph   = glyph->subs + old_count + n;\n        old_points = base->n_points;\n\n        error = pfr_glyph_load_rec( glyph, stream, gps_offset,\n                                    subglyph->gps_offset,\n                                    subglyph->gps_size );\n        if ( error )\n          break;\n\n        /* note that `glyph->subs' might have been re-allocated */\n        subglyph   = glyph->subs + old_count + n;\n        num_points = base->n_points - old_points;\n\n        /* translate and eventually scale the new glyph points */\n        if ( subglyph->x_scale != 0x10000L || subglyph->y_scale != 0x10000L )\n        {\n          FT_Vector*  vec = base->points + old_points;\n\n\n          for ( i = 0; i < num_points; i++, vec++ )\n          {\n            vec->x = FT_MulFix( vec->x, subglyph->x_scale ) +\n                       subglyph->x_delta;\n            vec->y = FT_MulFix( vec->y, subglyph->y_scale ) +\n                       subglyph->y_delta;\n          }\n        }\n        else\n        {\n          FT_Vector*  vec = loader->base.outline.points + old_points;\n\n\n          for ( i = 0; i < num_points; i++, vec++ )\n          {\n            vec->x += subglyph->x_delta;\n            vec->y += subglyph->y_delta;\n          }\n        }\n\n        /* proceed to next sub-glyph */\n      }\n\n      FT_TRACE4(( \"end compound glyph with %d elements\\n\", count ));\n    }\n    else\n    {\n      FT_TRACE4(( \"simple glyph (offset %lu)\\n\", offset ));\n\n      /* load a simple glyph */\n      error = pfr_glyph_load_simple( glyph, p, limit );\n\n      FT_FRAME_EXIT();\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_glyph_load( PFR_Glyph  glyph,\n                  FT_Stream  stream,\n                  FT_ULong   gps_offset,\n                  FT_ULong   offset,\n                  FT_ULong   size )\n  {\n    /* initialize glyph loader */\n    FT_GlyphLoader_Rewind( glyph->loader );\n\n    glyph->num_subs = 0;\n\n    /* load the glyph, recursively when needed */\n    return pfr_glyph_load_rec( glyph, stream, gps_offset, offset, size );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrgload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrgload.h                                                             */\n/*                                                                         */\n/*    FreeType PFR glyph loader (specification).                           */\n/*                                                                         */\n/*  Copyright 2002 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PFRGLOAD_H__\n#define __PFRGLOAD_H__\n\n#include \"pfrtypes.h\"\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( void )\n  pfr_glyph_init( PFR_Glyph       glyph,\n                  FT_GlyphLoader  loader );\n\n  FT_LOCAL( void )\n  pfr_glyph_done( PFR_Glyph  glyph );\n\n\n  FT_LOCAL( FT_Error )\n  pfr_glyph_load( PFR_Glyph  glyph,\n                  FT_Stream  stream,\n                  FT_ULong   gps_offset,\n                  FT_ULong   offset,\n                  FT_ULong   size );\n\n\nFT_END_HEADER\n\n\n#endif /* __PFRGLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrload.c                                                              */\n/*                                                                         */\n/*    FreeType PFR loader (body).                                          */\n/*                                                                         */\n/*  Copyright 2002-2005, 2007, 2009, 2010, 2013, 2014 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"pfrload.h\"\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n\n#include \"pfrerror.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_pfr\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          EXTRA ITEMS                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_extra_items_skip( FT_Byte*  *pp,\n                        FT_Byte*   limit )\n  {\n    return pfr_extra_items_parse( pp, limit, NULL, NULL );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_extra_items_parse( FT_Byte*       *pp,\n                         FT_Byte*        limit,\n                         PFR_ExtraItem   item_list,\n                         FT_Pointer      item_data )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_Byte*  p     = *pp;\n    FT_UInt   num_items, item_type, item_size;\n\n\n    PFR_CHECK( 1 );\n    num_items = PFR_NEXT_BYTE( p );\n\n    for ( ; num_items > 0; num_items-- )\n    {\n      PFR_CHECK( 2 );\n      item_size = PFR_NEXT_BYTE( p );\n      item_type = PFR_NEXT_BYTE( p );\n\n      PFR_CHECK( item_size );\n\n      if ( item_list )\n      {\n        PFR_ExtraItem  extra = item_list;\n\n\n        for ( extra = item_list; extra->parser != NULL; extra++ )\n        {\n          if ( extra->type == item_type )\n          {\n            error = extra->parser( p, p + item_size, item_data );\n            if ( error ) goto Exit;\n\n            break;\n          }\n        }\n      }\n\n      p += item_size;\n    }\n\n  Exit:\n    *pp = p;\n    return error;\n\n  Too_Short:\n    FT_ERROR(( \"pfr_extra_items_parse: invalid extra items table\\n\" ));\n    error = FT_THROW( Invalid_Table );\n    goto Exit;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          PFR HEADER                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n   static const FT_Frame_Field  pfr_header_fields[] =\n   {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PFR_HeaderRec\n\n     FT_FRAME_START( 58 ),\n       FT_FRAME_ULONG ( signature ),\n       FT_FRAME_USHORT( version ),\n       FT_FRAME_USHORT( signature2 ),\n       FT_FRAME_USHORT( header_size ),\n\n       FT_FRAME_USHORT( log_dir_size ),\n       FT_FRAME_USHORT( log_dir_offset ),\n\n       FT_FRAME_USHORT( log_font_max_size ),\n       FT_FRAME_UOFF3 ( log_font_section_size ),\n       FT_FRAME_UOFF3 ( log_font_section_offset ),\n\n       FT_FRAME_USHORT( phy_font_max_size ),\n       FT_FRAME_UOFF3 ( phy_font_section_size ),\n       FT_FRAME_UOFF3 ( phy_font_section_offset ),\n\n       FT_FRAME_USHORT( gps_max_size ),\n       FT_FRAME_UOFF3 ( gps_section_size ),\n       FT_FRAME_UOFF3 ( gps_section_offset ),\n\n       FT_FRAME_BYTE  ( max_blue_values ),\n       FT_FRAME_BYTE  ( max_x_orus ),\n       FT_FRAME_BYTE  ( max_y_orus ),\n\n       FT_FRAME_BYTE  ( phy_font_max_size_high ),\n       FT_FRAME_BYTE  ( color_flags ),\n\n       FT_FRAME_UOFF3 ( bct_max_size ),\n       FT_FRAME_UOFF3 ( bct_set_max_size ),\n       FT_FRAME_UOFF3 ( phy_bct_set_max_size ),\n\n       FT_FRAME_USHORT( num_phy_fonts ),\n       FT_FRAME_BYTE  ( max_vert_stem_snap ),\n       FT_FRAME_BYTE  ( max_horz_stem_snap ),\n       FT_FRAME_USHORT( max_chars ),\n     FT_FRAME_END\n   };\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_header_load( PFR_Header  header,\n                   FT_Stream   stream )\n  {\n    FT_Error  error;\n\n\n    /* read header directly */\n    if ( !FT_STREAM_SEEK( 0 )                                &&\n         !FT_STREAM_READ_FIELDS( pfr_header_fields, header ) )\n    {\n      /* make a few adjustments to the header */\n      header->phy_font_max_size +=\n        (FT_UInt32)header->phy_font_max_size_high << 16;\n    }\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  pfr_header_check( PFR_Header  header )\n  {\n    FT_Bool  result = 1;\n\n\n    /* check signature and header size */\n    if ( header->signature  != 0x50465230L ||   /* \"PFR0\" */\n         header->version     > 4           ||\n         header->header_size < 58          ||\n         header->signature2 != 0x0D0A      )    /* CR/LF  */\n    {\n      result = 0;\n    }\n    return  result;\n  }\n\n\n  /***********************************************************************/\n  /***********************************************************************/\n  /*****                                                             *****/\n  /*****                    PFR LOGICAL FONTS                        *****/\n  /*****                                                             *****/\n  /***********************************************************************/\n  /***********************************************************************/\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_log_font_count( FT_Stream  stream,\n                      FT_UInt32  section_offset,\n                      FT_UInt   *acount )\n  {\n    FT_Error  error;\n    FT_UInt   count;\n    FT_UInt   result = 0;\n\n\n    if ( FT_STREAM_SEEK( section_offset ) || FT_READ_USHORT( count ) )\n      goto Exit;\n\n    result = count;\n\n  Exit:\n    *acount = result;\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_log_font_load( PFR_LogFont  log_font,\n                     FT_Stream    stream,\n                     FT_UInt      idx,\n                     FT_UInt32    section_offset,\n                     FT_Bool      size_increment )\n  {\n    FT_UInt    num_log_fonts;\n    FT_UInt    flags;\n    FT_UInt32  offset;\n    FT_UInt32  size;\n    FT_Error   error;\n\n\n    if ( FT_STREAM_SEEK( section_offset ) ||\n         FT_READ_USHORT( num_log_fonts )  )\n      goto Exit;\n\n    if ( idx >= num_log_fonts )\n      return FT_THROW( Invalid_Argument );\n\n    if ( FT_STREAM_SKIP( idx * 5 ) ||\n         FT_READ_USHORT( size )    ||\n         FT_READ_UOFF3 ( offset )  )\n      goto Exit;\n\n    /* save logical font size and offset */\n    log_font->size   = size;\n    log_font->offset = offset;\n\n    /* now, check the rest of the table before loading it */\n    {\n      FT_Byte*  p;\n      FT_Byte*  limit;\n      FT_UInt   local;\n\n\n      if ( FT_STREAM_SEEK( offset ) || FT_FRAME_ENTER( size ) )\n        goto Exit;\n\n      p     = stream->cursor;\n      limit = p + size;\n\n      PFR_CHECK(13);\n\n      log_font->matrix[0] = PFR_NEXT_LONG( p );\n      log_font->matrix[1] = PFR_NEXT_LONG( p );\n      log_font->matrix[2] = PFR_NEXT_LONG( p );\n      log_font->matrix[3] = PFR_NEXT_LONG( p );\n\n      flags = PFR_NEXT_BYTE( p );\n\n      local = 0;\n      if ( flags & PFR_LOG_STROKE )\n      {\n        local++;\n        if ( flags & PFR_LOG_2BYTE_STROKE )\n          local++;\n\n        if ( (flags & PFR_LINE_JOIN_MASK) == PFR_LINE_JOIN_MITER )\n          local += 3;\n      }\n      if ( flags & PFR_LOG_BOLD )\n      {\n        local++;\n        if ( flags & PFR_LOG_2BYTE_BOLD )\n          local++;\n      }\n\n      PFR_CHECK( local );\n\n      if ( flags & PFR_LOG_STROKE )\n      {\n        log_font->stroke_thickness = ( flags & PFR_LOG_2BYTE_STROKE )\n                                     ? PFR_NEXT_SHORT( p )\n                                     : PFR_NEXT_BYTE( p );\n\n        if ( ( flags & PFR_LINE_JOIN_MASK ) == PFR_LINE_JOIN_MITER )\n          log_font->miter_limit = PFR_NEXT_LONG( p );\n      }\n\n      if ( flags & PFR_LOG_BOLD )\n      {\n        log_font->bold_thickness = ( flags & PFR_LOG_2BYTE_BOLD )\n                                   ? PFR_NEXT_SHORT( p )\n                                   : PFR_NEXT_BYTE( p );\n      }\n\n      if ( flags & PFR_LOG_EXTRA_ITEMS )\n      {\n        error = pfr_extra_items_skip( &p, limit );\n        if (error) goto Fail;\n      }\n\n      PFR_CHECK(5);\n      log_font->phys_size   = PFR_NEXT_USHORT( p );\n      log_font->phys_offset = PFR_NEXT_ULONG( p );\n      if ( size_increment )\n      {\n        PFR_CHECK( 1 );\n        log_font->phys_size += (FT_UInt32)PFR_NEXT_BYTE( p ) << 16;\n      }\n    }\n\n  Fail:\n    FT_FRAME_EXIT();\n\n  Exit:\n    return error;\n\n  Too_Short:\n    FT_ERROR(( \"pfr_log_font_load: invalid logical font table\\n\" ));\n    error = FT_THROW( Invalid_Table );\n    goto Fail;\n  }\n\n\n  /***********************************************************************/\n  /***********************************************************************/\n  /*****                                                             *****/\n  /*****                    PFR PHYSICAL FONTS                       *****/\n  /*****                                                             *****/\n  /***********************************************************************/\n  /***********************************************************************/\n\n\n  /* load bitmap strikes lists */\n  FT_CALLBACK_DEF( FT_Error )\n  pfr_extra_item_load_bitmap_info( FT_Byte*     p,\n                                   FT_Byte*     limit,\n                                   PFR_PhyFont  phy_font )\n  {\n    FT_Memory   memory = phy_font->memory;\n    PFR_Strike  strike;\n    FT_UInt     flags0;\n    FT_UInt     n, count, size1;\n    FT_Error    error = FT_Err_Ok;\n\n\n    PFR_CHECK( 5 );\n\n    p += 3;  /* skip bctSize */\n    flags0 = PFR_NEXT_BYTE( p );\n    count  = PFR_NEXT_BYTE( p );\n\n    /* re-allocate when needed */\n    if ( phy_font->num_strikes + count > phy_font->max_strikes )\n    {\n      FT_UInt  new_max = FT_PAD_CEIL( phy_font->num_strikes + count, 4 );\n\n\n      if ( FT_RENEW_ARRAY( phy_font->strikes,\n                           phy_font->num_strikes,\n                           new_max ) )\n        goto Exit;\n\n      phy_font->max_strikes = new_max;\n    }\n\n    size1 = 1 + 1 + 1 + 2 + 2 + 1;\n    if ( flags0 & PFR_STRIKE_2BYTE_XPPM )\n      size1++;\n\n    if ( flags0 & PFR_STRIKE_2BYTE_YPPM )\n      size1++;\n\n    if ( flags0 & PFR_STRIKE_3BYTE_SIZE )\n      size1++;\n\n    if ( flags0 & PFR_STRIKE_3BYTE_OFFSET )\n      size1++;\n\n    if ( flags0 & PFR_STRIKE_2BYTE_COUNT )\n      size1++;\n\n    strike = phy_font->strikes + phy_font->num_strikes;\n\n    PFR_CHECK( count * size1 );\n\n    for ( n = 0; n < count; n++, strike++ )\n    {\n      strike->x_ppm       = ( flags0 & PFR_STRIKE_2BYTE_XPPM )\n                            ? PFR_NEXT_USHORT( p )\n                            : PFR_NEXT_BYTE( p );\n\n      strike->y_ppm       = ( flags0 & PFR_STRIKE_2BYTE_YPPM )\n                            ? PFR_NEXT_USHORT( p )\n                            : PFR_NEXT_BYTE( p );\n\n      strike->flags       = PFR_NEXT_BYTE( p );\n\n      strike->bct_size    = ( flags0 & PFR_STRIKE_3BYTE_SIZE )\n                            ? PFR_NEXT_ULONG( p )\n                            : PFR_NEXT_USHORT( p );\n\n      strike->bct_offset  = ( flags0 & PFR_STRIKE_3BYTE_OFFSET )\n                            ? PFR_NEXT_ULONG( p )\n                            : PFR_NEXT_USHORT( p );\n\n      strike->num_bitmaps = ( flags0 & PFR_STRIKE_2BYTE_COUNT )\n                            ? PFR_NEXT_USHORT( p )\n                            : PFR_NEXT_BYTE( p );\n    }\n\n    phy_font->num_strikes += count;\n\n  Exit:\n    return error;\n\n  Too_Short:\n    error = FT_THROW( Invalid_Table );\n    FT_ERROR(( \"pfr_extra_item_load_bitmap_info:\"\n               \" invalid bitmap info table\\n\" ));\n    goto Exit;\n  }\n\n\n  /* Load font ID.  This is a so-called \"unique\" name that is rather\n   * long and descriptive (like \"Tiresias ScreenFont v7.51\").\n   *\n   * Note that a PFR font's family name is contained in an *undocumented*\n   * string of the \"auxiliary data\" portion of a physical font record.  This\n   * may also contain the \"real\" style name!\n   *\n   * If no family name is present, the font ID is used instead for the\n   * family.\n   */\n  FT_CALLBACK_DEF( FT_Error )\n  pfr_extra_item_load_font_id( FT_Byte*     p,\n                               FT_Byte*     limit,\n                               PFR_PhyFont  phy_font )\n  {\n    FT_Error    error  = FT_Err_Ok;\n    FT_Memory   memory = phy_font->memory;\n    FT_PtrDist  len    = limit - p;\n\n\n    if ( phy_font->font_id != NULL )\n      goto Exit;\n\n    if ( FT_ALLOC( phy_font->font_id, len + 1 ) )\n      goto Exit;\n\n    /* copy font ID name, and terminate it for safety */\n    FT_MEM_COPY( phy_font->font_id, p, len );\n    phy_font->font_id[len] = 0;\n\n  Exit:\n    return error;\n  }\n\n\n  /* load stem snap tables */\n  FT_CALLBACK_DEF( FT_Error )\n  pfr_extra_item_load_stem_snaps( FT_Byte*     p,\n                                  FT_Byte*     limit,\n                                  PFR_PhyFont  phy_font )\n  {\n    FT_UInt    count, num_vert, num_horz;\n    FT_Int*    snaps  = NULL;\n    FT_Error   error  = FT_Err_Ok;\n    FT_Memory  memory = phy_font->memory;\n\n\n    if ( phy_font->vertical.stem_snaps != NULL )\n      goto Exit;\n\n    PFR_CHECK( 1 );\n    count = PFR_NEXT_BYTE( p );\n\n    num_vert = count & 15;\n    num_horz = count >> 4;\n    count    = num_vert + num_horz;\n\n    PFR_CHECK( count * 2 );\n\n    if ( FT_NEW_ARRAY( snaps, count ) )\n      goto Exit;\n\n    phy_font->vertical.stem_snaps = snaps;\n    phy_font->horizontal.stem_snaps = snaps + num_vert;\n\n    for ( ; count > 0; count--, snaps++ )\n      *snaps = FT_NEXT_SHORT( p );\n\n  Exit:\n    return error;\n\n  Too_Short:\n    error = FT_THROW( Invalid_Table );\n    FT_ERROR(( \"pfr_exta_item_load_stem_snaps:\"\n               \" invalid stem snaps table\\n\" ));\n    goto Exit;\n  }\n\n\n\n  /* load kerning pair data */\n  FT_CALLBACK_DEF( FT_Error )\n  pfr_extra_item_load_kerning_pairs( FT_Byte*     p,\n                                     FT_Byte*     limit,\n                                     PFR_PhyFont  phy_font )\n  {\n    PFR_KernItem  item   = NULL;\n    FT_Error      error  = FT_Err_Ok;\n    FT_Memory     memory = phy_font->memory;\n\n\n    FT_TRACE2(( \"pfr_extra_item_load_kerning_pairs()\\n\" ));\n\n    if ( FT_NEW( item ) )\n      goto Exit;\n\n    PFR_CHECK( 4 );\n\n    item->pair_count = PFR_NEXT_BYTE( p );\n    item->base_adj   = PFR_NEXT_SHORT( p );\n    item->flags      = PFR_NEXT_BYTE( p );\n    item->offset     = phy_font->offset + ( p - phy_font->cursor );\n\n#ifndef PFR_CONFIG_NO_CHECKS\n    item->pair_size = 3;\n\n    if ( item->flags & PFR_KERN_2BYTE_CHAR )\n      item->pair_size += 2;\n\n    if ( item->flags & PFR_KERN_2BYTE_ADJ )\n      item->pair_size += 1;\n\n    PFR_CHECK( item->pair_count * item->pair_size );\n#endif\n\n    /* load first and last pairs into the item to speed up */\n    /* lookup later...                                     */\n    if ( item->pair_count > 0 )\n    {\n      FT_UInt   char1, char2;\n      FT_Byte*  q;\n\n\n      if ( item->flags & PFR_KERN_2BYTE_CHAR )\n      {\n        q     = p;\n        char1 = PFR_NEXT_USHORT( q );\n        char2 = PFR_NEXT_USHORT( q );\n\n        item->pair1 = PFR_KERN_INDEX( char1, char2 );\n\n        q = p + item->pair_size * ( item->pair_count - 1 );\n        char1 = PFR_NEXT_USHORT( q );\n        char2 = PFR_NEXT_USHORT( q );\n\n        item->pair2 = PFR_KERN_INDEX( char1, char2 );\n      }\n      else\n      {\n        q     = p;\n        char1 = PFR_NEXT_BYTE( q );\n        char2 = PFR_NEXT_BYTE( q );\n\n        item->pair1 = PFR_KERN_INDEX( char1, char2 );\n\n        q = p + item->pair_size * ( item->pair_count - 1 );\n        char1 = PFR_NEXT_BYTE( q );\n        char2 = PFR_NEXT_BYTE( q );\n\n        item->pair2 = PFR_KERN_INDEX( char1, char2 );\n      }\n\n      /* add new item to the current list */\n      item->next                 = NULL;\n      *phy_font->kern_items_tail = item;\n      phy_font->kern_items_tail  = &item->next;\n      phy_font->num_kern_pairs  += item->pair_count;\n    }\n    else\n    {\n      /* empty item! */\n      FT_FREE( item );\n    }\n\n  Exit:\n    return error;\n\n  Too_Short:\n    FT_FREE( item );\n\n    error = FT_THROW( Invalid_Table );\n    FT_ERROR(( \"pfr_extra_item_load_kerning_pairs:\"\n               \" invalid kerning pairs table\\n\" ));\n    goto Exit;\n  }\n\n\n\n  static const PFR_ExtraItemRec  pfr_phy_font_extra_items[] =\n  {\n    { 1, (PFR_ExtraItem_ParseFunc)pfr_extra_item_load_bitmap_info },\n    { 2, (PFR_ExtraItem_ParseFunc)pfr_extra_item_load_font_id },\n    { 3, (PFR_ExtraItem_ParseFunc)pfr_extra_item_load_stem_snaps },\n    { 4, (PFR_ExtraItem_ParseFunc)pfr_extra_item_load_kerning_pairs },\n    { 0, NULL }\n  };\n\n\n  /* Loads a name from the auxiliary data.  Since this extracts undocumented\n   * strings from the font file, we need to be careful here.\n   */\n  static FT_Error\n  pfr_aux_name_load( FT_Byte*     p,\n                     FT_UInt      len,\n                     FT_Memory    memory,\n                     FT_String*  *astring )\n  {\n    FT_Error    error  = FT_Err_Ok;\n    FT_String*  result = NULL;\n    FT_UInt     n, ok;\n\n\n    if ( len > 0 && p[len - 1] == 0 )\n      len--;\n\n    /* check that each character is ASCII for making sure not to\n       load garbage\n     */\n    ok = ( len > 0 );\n    for ( n = 0; n < len; n++ )\n      if ( p[n] < 32 || p[n] > 127 )\n      {\n        ok = 0;\n        break;\n      }\n\n    if ( ok )\n    {\n      if ( FT_ALLOC( result, len + 1 ) )\n        goto Exit;\n\n      FT_MEM_COPY( result, p, len );\n      result[len] = 0;\n    }\n  Exit:\n    *astring = result;\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  pfr_phy_font_done( PFR_PhyFont  phy_font,\n                     FT_Memory    memory )\n  {\n    FT_FREE( phy_font->font_id );\n    FT_FREE( phy_font->family_name );\n    FT_FREE( phy_font->style_name );\n\n    FT_FREE( phy_font->vertical.stem_snaps );\n    phy_font->vertical.num_stem_snaps = 0;\n\n    phy_font->horizontal.stem_snaps     = NULL;\n    phy_font->horizontal.num_stem_snaps = 0;\n\n    FT_FREE( phy_font->strikes );\n    phy_font->num_strikes = 0;\n    phy_font->max_strikes = 0;\n\n    FT_FREE( phy_font->chars );\n    phy_font->num_chars    = 0;\n    phy_font->chars_offset = 0;\n\n    FT_FREE( phy_font->blue_values );\n    phy_font->num_blue_values = 0;\n\n    {\n      PFR_KernItem  item, next;\n\n\n      item = phy_font->kern_items;\n      while ( item )\n      {\n        next = item->next;\n        FT_FREE( item );\n        item = next;\n      }\n      phy_font->kern_items      = NULL;\n      phy_font->kern_items_tail = NULL;\n    }\n\n    phy_font->num_kern_pairs = 0;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_phy_font_load( PFR_PhyFont  phy_font,\n                     FT_Stream    stream,\n                     FT_UInt32    offset,\n                     FT_UInt32    size )\n  {\n    FT_Error   error;\n    FT_Memory  memory = stream->memory;\n    FT_UInt    flags;\n    FT_ULong   num_aux;\n    FT_Byte*   p;\n    FT_Byte*   limit;\n\n\n    phy_font->memory = memory;\n    phy_font->offset = offset;\n\n    phy_font->kern_items      = NULL;\n    phy_font->kern_items_tail = &phy_font->kern_items;\n\n    if ( FT_STREAM_SEEK( offset ) || FT_FRAME_ENTER( size ) )\n      goto Exit;\n\n    phy_font->cursor = stream->cursor;\n\n    p     = stream->cursor;\n    limit = p + size;\n\n    PFR_CHECK( 15 );\n    phy_font->font_ref_number    = PFR_NEXT_USHORT( p );\n    phy_font->outline_resolution = PFR_NEXT_USHORT( p );\n    phy_font->metrics_resolution = PFR_NEXT_USHORT( p );\n    phy_font->bbox.xMin          = PFR_NEXT_SHORT( p );\n    phy_font->bbox.yMin          = PFR_NEXT_SHORT( p );\n    phy_font->bbox.xMax          = PFR_NEXT_SHORT( p );\n    phy_font->bbox.yMax          = PFR_NEXT_SHORT( p );\n    phy_font->flags      = flags = PFR_NEXT_BYTE( p );\n\n    /* get the standard advance for non-proportional fonts */\n    if ( !(flags & PFR_PHY_PROPORTIONAL) )\n    {\n      PFR_CHECK( 2 );\n      phy_font->standard_advance = PFR_NEXT_SHORT( p );\n    }\n\n    /* load the extra items when present */\n    if ( flags & PFR_PHY_EXTRA_ITEMS )\n    {\n      error =  pfr_extra_items_parse( &p, limit,\n                                      pfr_phy_font_extra_items, phy_font );\n\n      if ( error )\n        goto Fail;\n    }\n\n    /* In certain fonts, the auxiliary bytes contain interesting  */\n    /* information. These are not in the specification but can be */\n    /* guessed by looking at the content of a few PFR0 fonts.     */\n    PFR_CHECK( 3 );\n    num_aux = PFR_NEXT_ULONG( p );\n\n    if ( num_aux > 0 )\n    {\n      FT_Byte*  q = p;\n      FT_Byte*  q2;\n\n\n      PFR_CHECK( num_aux );\n      p += num_aux;\n\n      while ( num_aux > 0 )\n      {\n        FT_UInt  length, type;\n\n\n        if ( q + 4 > p )\n          break;\n\n        length = PFR_NEXT_USHORT( q );\n        if ( length < 4 || length > num_aux )\n          break;\n\n        q2   = q + length - 2;\n        type = PFR_NEXT_USHORT( q );\n\n        switch ( type )\n        {\n        case 1:\n          /* this seems to correspond to the font's family name,\n           * padded to 16-bits with one zero when necessary\n           */\n          error = pfr_aux_name_load( q, length - 4U, memory,\n                                     &phy_font->family_name );\n          if ( error )\n            goto Exit;\n          break;\n\n        case 2:\n          if ( q + 32 > q2 )\n            break;\n\n          q += 10;\n          phy_font->ascent  = PFR_NEXT_SHORT( q );\n          phy_font->descent = PFR_NEXT_SHORT( q );\n          phy_font->leading = PFR_NEXT_SHORT( q );\n          break;\n\n        case 3:\n          /* this seems to correspond to the font's style name,\n           * padded to 16-bits with one zero when necessary\n           */\n          error = pfr_aux_name_load( q, length - 4U, memory,\n                                     &phy_font->style_name );\n          if ( error )\n            goto Exit;\n          break;\n\n        default:\n          ;\n        }\n\n        q        = q2;\n        num_aux -= length;\n      }\n    }\n\n    /* read the blue values */\n    {\n      FT_UInt  n, count;\n\n\n      PFR_CHECK( 1 );\n      phy_font->num_blue_values = count = PFR_NEXT_BYTE( p );\n\n      PFR_CHECK( count * 2 );\n\n      if ( FT_NEW_ARRAY( phy_font->blue_values, count ) )\n        goto Fail;\n\n      for ( n = 0; n < count; n++ )\n        phy_font->blue_values[n] = PFR_NEXT_SHORT( p );\n    }\n\n    PFR_CHECK( 8 );\n    phy_font->blue_fuzz  = PFR_NEXT_BYTE( p );\n    phy_font->blue_scale = PFR_NEXT_BYTE( p );\n\n    phy_font->vertical.standard   = PFR_NEXT_USHORT( p );\n    phy_font->horizontal.standard = PFR_NEXT_USHORT( p );\n\n    /* read the character descriptors */\n    {\n      FT_UInt  n, count, Size;\n\n\n      phy_font->num_chars    = count = PFR_NEXT_USHORT( p );\n      phy_font->chars_offset = offset + ( p - stream->cursor );\n\n      if ( FT_NEW_ARRAY( phy_font->chars, count ) )\n        goto Fail;\n\n      Size = 1 + 1 + 2;\n      if ( flags & PFR_PHY_2BYTE_CHARCODE )\n        Size += 1;\n\n      if ( flags & PFR_PHY_PROPORTIONAL )\n        Size += 2;\n\n      if ( flags & PFR_PHY_ASCII_CODE )\n        Size += 1;\n\n      if ( flags & PFR_PHY_2BYTE_GPS_SIZE )\n        Size += 1;\n\n      if ( flags & PFR_PHY_3BYTE_GPS_OFFSET )\n        Size += 1;\n\n      PFR_CHECK( count * Size );\n\n      for ( n = 0; n < count; n++ )\n      {\n        PFR_Char  cur = &phy_font->chars[n];\n\n\n        cur->char_code = ( flags & PFR_PHY_2BYTE_CHARCODE )\n                         ? PFR_NEXT_USHORT( p )\n                         : PFR_NEXT_BYTE( p );\n\n        cur->advance   = ( flags & PFR_PHY_PROPORTIONAL )\n                         ? PFR_NEXT_SHORT( p )\n                         : (FT_Int) phy_font->standard_advance;\n\n#if 0\n        cur->ascii     = ( flags & PFR_PHY_ASCII_CODE )\n                         ? PFR_NEXT_BYTE( p )\n                         : 0;\n#else\n        if ( flags & PFR_PHY_ASCII_CODE )\n          p += 1;\n#endif\n        cur->gps_size  = ( flags & PFR_PHY_2BYTE_GPS_SIZE )\n                         ? PFR_NEXT_USHORT( p )\n                         : PFR_NEXT_BYTE( p );\n\n        cur->gps_offset = ( flags & PFR_PHY_3BYTE_GPS_OFFSET )\n                          ? PFR_NEXT_ULONG( p )\n                          : PFR_NEXT_USHORT( p );\n      }\n    }\n\n    /* that's it! */\n\n  Fail:\n    FT_FRAME_EXIT();\n\n    /* save position of bitmap info */\n    phy_font->bct_offset = FT_STREAM_POS();\n    phy_font->cursor     = NULL;\n\n  Exit:\n    return error;\n\n  Too_Short:\n    error = FT_THROW( Invalid_Table );\n    FT_ERROR(( \"pfr_phy_font_load: invalid physical font table\\n\" ));\n    goto Fail;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrload.h                                                              */\n/*                                                                         */\n/*    FreeType PFR loader (specification).                                 */\n/*                                                                         */\n/*  Copyright 2002 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PFRLOAD_H__\n#define __PFRLOAD_H__\n\n#include \"pfrobjs.h\"\n#include FT_INTERNAL_STREAM_H\n\n\nFT_BEGIN_HEADER\n\n#ifdef PFR_CONFIG_NO_CHECKS\n#define PFR_CHECK( x )  do { } while ( 0 )\n#else\n#define PFR_CHECK( x )  do                       \\\n                        {                        \\\n                          if ( p + (x) > limit ) \\\n                            goto Too_Short;      \\\n                        } while ( 0 )\n#endif\n\n#define PFR_NEXT_BYTE( p )    FT_NEXT_BYTE( p )\n#define PFR_NEXT_INT8( p )    FT_NEXT_CHAR( p )\n#define PFR_NEXT_SHORT( p )   FT_NEXT_SHORT( p )\n#define PFR_NEXT_USHORT( p )  FT_NEXT_USHORT( p )\n#define PFR_NEXT_LONG( p )    FT_NEXT_OFF3( p )\n#define PFR_NEXT_ULONG( p )   FT_NEXT_UOFF3( p )\n\n\n /* handling extra items */\n\n  typedef FT_Error\n  (*PFR_ExtraItem_ParseFunc)( FT_Byte*    p,\n                              FT_Byte*    limit,\n                              FT_Pointer  data );\n\n  typedef struct  PFR_ExtraItemRec_\n  {\n    FT_UInt                  type;\n    PFR_ExtraItem_ParseFunc  parser;\n\n  } PFR_ExtraItemRec;\n\n  typedef const struct PFR_ExtraItemRec_*  PFR_ExtraItem;\n\n\n  FT_LOCAL( FT_Error )\n  pfr_extra_items_skip( FT_Byte*  *pp,\n                        FT_Byte*  limit );\n\n  FT_LOCAL( FT_Error )\n  pfr_extra_items_parse( FT_Byte*      *pp,\n                         FT_Byte*       limit,\n                         PFR_ExtraItem  item_list,\n                         FT_Pointer     item_data );\n\n\n  /* load a PFR header */\n  FT_LOCAL( FT_Error )\n  pfr_header_load( PFR_Header  header,\n                   FT_Stream   stream );\n\n  /* check a PFR header */\n  FT_LOCAL( FT_Bool )\n  pfr_header_check( PFR_Header  header );\n\n\n  /* return number of logical fonts in this file */\n  FT_LOCAL( FT_Error )\n  pfr_log_font_count( FT_Stream   stream,\n                      FT_UInt32   log_section_offset,\n                      FT_UInt    *acount );\n\n  /* load a pfr logical font entry */\n  FT_LOCAL( FT_Error )\n  pfr_log_font_load( PFR_LogFont  log_font,\n                     FT_Stream    stream,\n                     FT_UInt      face_index,\n                     FT_UInt32    section_offset,\n                     FT_Bool      size_increment );\n\n\n  /* load a physical font entry */\n  FT_LOCAL( FT_Error )\n  pfr_phy_font_load( PFR_PhyFont  phy_font,\n                     FT_Stream    stream,\n                     FT_UInt32    offset,\n                     FT_UInt32    size );\n\n  /* finalize a physical font */\n  FT_LOCAL( void )\n  pfr_phy_font_done( PFR_PhyFont  phy_font,\n                     FT_Memory    memory );\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __PFRLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrobjs.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrobjs.c                                                              */\n/*                                                                         */\n/*    FreeType PFR object methods (body).                                  */\n/*                                                                         */\n/*  Copyright 2002-2008, 2010-2011, 2013, 2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"pfrobjs.h\"\n#include \"pfrload.h\"\n#include \"pfrgload.h\"\n#include \"pfrcmap.h\"\n#include \"pfrsbit.h\"\n#include FT_OUTLINE_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_CALC_H\n#include FT_TRUETYPE_IDS_H\n\n#include \"pfrerror.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_pfr\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     FACE OBJECT METHODS                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  pfr_face_done( FT_Face  pfrface )     /* PFR_Face */\n  {\n    PFR_Face   face = (PFR_Face)pfrface;\n    FT_Memory  memory;\n\n\n    if ( !face )\n      return;\n\n    memory = pfrface->driver->root.memory;\n\n    /* we don't want dangling pointers */\n    pfrface->family_name = NULL;\n    pfrface->style_name  = NULL;\n\n    /* finalize the physical font record */\n    pfr_phy_font_done( &face->phy_font, FT_FACE_MEMORY( face ) );\n\n    /* no need to finalize the logical font or the header */\n    FT_FREE( pfrface->available_sizes );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_face_init( FT_Stream      stream,\n                 FT_Face        pfrface,\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params )\n  {\n    PFR_Face  face = (PFR_Face)pfrface;\n    FT_Error  error;\n\n    FT_UNUSED( num_params );\n    FT_UNUSED( params );\n\n\n    FT_TRACE2(( \"PFR driver\\n\" ));\n\n    /* load the header and check it */\n    error = pfr_header_load( &face->header, stream );\n    if ( error )\n      goto Exit;\n\n    if ( !pfr_header_check( &face->header ) )\n    {\n      FT_TRACE2(( \"  not a PFR font\\n\" ));\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n\n    /* check face index */\n    {\n      FT_UInt  num_faces;\n\n\n      error = pfr_log_font_count( stream,\n                                  face->header.log_dir_offset,\n                                  &num_faces );\n      if ( error )\n        goto Exit;\n\n      pfrface->num_faces = num_faces;\n    }\n\n    if ( face_index < 0 )\n      goto Exit;\n\n    if ( face_index >= pfrface->num_faces )\n    {\n      FT_ERROR(( \"pfr_face_init: invalid face index\\n\" ));\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* load the face */\n    error = pfr_log_font_load(\n               &face->log_font, stream, face_index,\n               face->header.log_dir_offset,\n               FT_BOOL( face->header.phy_font_max_size_high != 0 ) );\n    if ( error )\n      goto Exit;\n\n    /* now load the physical font descriptor */\n    error = pfr_phy_font_load( &face->phy_font, stream,\n                               face->log_font.phys_offset,\n                               face->log_font.phys_size );\n    if ( error )\n      goto Exit;\n\n    /* now set up all root face fields */\n    {\n      PFR_PhyFont  phy_font = &face->phy_font;\n\n\n      pfrface->face_index = face_index;\n      pfrface->num_glyphs = phy_font->num_chars + 1;\n\n      pfrface->face_flags |= FT_FACE_FLAG_SCALABLE;\n\n      /* if all characters point to the same gps_offset 0, we */\n      /* assume that the font only contains bitmaps           */\n      {\n        FT_UInt  nn;\n\n\n        for ( nn = 0; nn < phy_font->num_chars; nn++ )\n          if ( phy_font->chars[nn].gps_offset != 0 )\n            break;\n\n        if ( nn == phy_font->num_chars )\n        {\n          if ( phy_font->num_strikes > 0 )\n            pfrface->face_flags = 0;        /* not scalable */\n          else\n          {\n            FT_ERROR(( \"pfr_face_init: font doesn't contain glyphs\\n\" ));\n            error = FT_THROW( Invalid_File_Format );\n            goto Exit;\n          }\n        }\n      }\n\n      if ( (phy_font->flags & PFR_PHY_PROPORTIONAL) == 0 )\n        pfrface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;\n\n      if ( phy_font->flags & PFR_PHY_VERTICAL )\n        pfrface->face_flags |= FT_FACE_FLAG_VERTICAL;\n      else\n        pfrface->face_flags |= FT_FACE_FLAG_HORIZONTAL;\n\n      if ( phy_font->num_strikes > 0 )\n        pfrface->face_flags |= FT_FACE_FLAG_FIXED_SIZES;\n\n      if ( phy_font->num_kern_pairs > 0 )\n        pfrface->face_flags |= FT_FACE_FLAG_KERNING;\n\n      /* If no family name was found in the \"undocumented\" auxiliary\n       * data, use the font ID instead.  This sucks but is better than\n       * nothing.\n       */\n      pfrface->family_name = phy_font->family_name;\n      if ( pfrface->family_name == NULL )\n        pfrface->family_name = phy_font->font_id;\n\n      /* note that the style name can be NULL in certain PFR fonts,\n       * probably meaning \"Regular\"\n       */\n      pfrface->style_name = phy_font->style_name;\n\n      pfrface->num_fixed_sizes = 0;\n      pfrface->available_sizes = 0;\n\n      pfrface->bbox         = phy_font->bbox;\n      pfrface->units_per_EM = (FT_UShort)phy_font->outline_resolution;\n      pfrface->ascender     = (FT_Short) phy_font->bbox.yMax;\n      pfrface->descender    = (FT_Short) phy_font->bbox.yMin;\n\n      pfrface->height = (FT_Short)( ( pfrface->units_per_EM * 12 ) / 10 );\n      if ( pfrface->height < pfrface->ascender - pfrface->descender )\n        pfrface->height = (FT_Short)(pfrface->ascender - pfrface->descender);\n\n      if ( phy_font->num_strikes > 0 )\n      {\n        FT_UInt          n, count = phy_font->num_strikes;\n        FT_Bitmap_Size*  size;\n        PFR_Strike       strike;\n        FT_Memory        memory = pfrface->stream->memory;\n\n\n        if ( FT_NEW_ARRAY( pfrface->available_sizes, count ) )\n          goto Exit;\n\n        size   = pfrface->available_sizes;\n        strike = phy_font->strikes;\n        for ( n = 0; n < count; n++, size++, strike++ )\n        {\n          size->height = (FT_UShort)strike->y_ppm;\n          size->width  = (FT_UShort)strike->x_ppm;\n          size->size   = strike->y_ppm << 6;\n          size->x_ppem = strike->x_ppm << 6;\n          size->y_ppem = strike->y_ppm << 6;\n        }\n        pfrface->num_fixed_sizes = count;\n      }\n\n      /* now compute maximum advance width */\n      if ( ( phy_font->flags & PFR_PHY_PROPORTIONAL ) == 0 )\n        pfrface->max_advance_width = (FT_Short)phy_font->standard_advance;\n      else\n      {\n        FT_Int    max = 0;\n        FT_UInt   count = phy_font->num_chars;\n        PFR_Char  gchar = phy_font->chars;\n\n\n        for ( ; count > 0; count--, gchar++ )\n        {\n          if ( max < gchar->advance )\n            max = gchar->advance;\n        }\n\n        pfrface->max_advance_width = (FT_Short)max;\n      }\n\n      pfrface->max_advance_height = pfrface->height;\n\n      pfrface->underline_position  = (FT_Short)( -pfrface->units_per_EM / 10 );\n      pfrface->underline_thickness = (FT_Short)(  pfrface->units_per_EM / 30 );\n\n      /* create charmap */\n      {\n        FT_CharMapRec  charmap;\n\n\n        charmap.face        = pfrface;\n        charmap.platform_id = TT_PLATFORM_MICROSOFT;\n        charmap.encoding_id = TT_MS_ID_UNICODE_CS;\n        charmap.encoding    = FT_ENCODING_UNICODE;\n\n        error = FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );\n\n#if 0\n        /* Select default charmap */\n        if ( pfrface->num_charmaps )\n          pfrface->charmap = pfrface->charmaps[0];\n#endif\n      }\n\n      /* check whether we've loaded any kerning pairs */\n      if ( phy_font->num_kern_pairs )\n        pfrface->face_flags |= FT_FACE_FLAG_KERNING;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    SLOT OBJECT METHOD                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_slot_init( FT_GlyphSlot  pfrslot )        /* PFR_Slot */\n  {\n    PFR_Slot        slot   = (PFR_Slot)pfrslot;\n    FT_GlyphLoader  loader = pfrslot->internal->loader;\n\n\n    pfr_glyph_init( &slot->glyph, loader );\n\n    return 0;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  pfr_slot_done( FT_GlyphSlot  pfrslot )        /* PFR_Slot */\n  {\n    PFR_Slot  slot = (PFR_Slot)pfrslot;\n\n\n    pfr_glyph_done( &slot->glyph );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_slot_load( FT_GlyphSlot  pfrslot,         /* PFR_Slot */\n                 FT_Size       pfrsize,         /* PFR_Size */\n                 FT_UInt       gindex,\n                 FT_Int32      load_flags )\n  {\n    PFR_Slot     slot    = (PFR_Slot)pfrslot;\n    PFR_Size     size    = (PFR_Size)pfrsize;\n    FT_Error     error;\n    PFR_Face     face    = (PFR_Face)pfrslot->face;\n    PFR_Char     gchar;\n    FT_Outline*  outline = &pfrslot->outline;\n    FT_ULong     gps_offset;\n\n\n    FT_TRACE1(( \"pfr_slot_load: glyph index %d\\n\", gindex ));\n\n    if ( gindex > 0 )\n      gindex--;\n\n    if ( !face || gindex >= face->phy_font.num_chars )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* try to load an embedded bitmap */\n    if ( ( load_flags & ( FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP ) ) == 0 )\n    {\n      error = pfr_slot_load_bitmap( slot, size, gindex );\n      if ( error == 0 )\n        goto Exit;\n    }\n\n    if ( load_flags & FT_LOAD_SBITS_ONLY )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    gchar               = face->phy_font.chars + gindex;\n    pfrslot->format     = FT_GLYPH_FORMAT_OUTLINE;\n    outline->n_points   = 0;\n    outline->n_contours = 0;\n    gps_offset          = face->header.gps_section_offset;\n\n    /* load the glyph outline (FT_LOAD_NO_RECURSE isn't supported) */\n    error = pfr_glyph_load( &slot->glyph, face->root.stream,\n                            gps_offset, gchar->gps_offset, gchar->gps_size );\n\n    if ( !error )\n    {\n      FT_BBox            cbox;\n      FT_Glyph_Metrics*  metrics = &pfrslot->metrics;\n      FT_Pos             advance;\n      FT_Int             em_metrics, em_outline;\n      FT_Bool            scaling;\n\n\n      scaling = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 );\n\n      /* copy outline data */\n      *outline = slot->glyph.loader->base.outline;\n\n      outline->flags &= ~FT_OUTLINE_OWNER;\n      outline->flags |= FT_OUTLINE_REVERSE_FILL;\n\n      if ( size && pfrsize->metrics.y_ppem < 24 )\n        outline->flags |= FT_OUTLINE_HIGH_PRECISION;\n\n      /* compute the advance vector */\n      metrics->horiAdvance = 0;\n      metrics->vertAdvance = 0;\n\n      advance    = gchar->advance;\n      em_metrics = face->phy_font.metrics_resolution;\n      em_outline = face->phy_font.outline_resolution;\n\n      if ( em_metrics != em_outline )\n        advance = FT_MulDiv( advance, em_outline, em_metrics );\n\n      if ( face->phy_font.flags & PFR_PHY_VERTICAL )\n        metrics->vertAdvance = advance;\n      else\n        metrics->horiAdvance = advance;\n\n      pfrslot->linearHoriAdvance = metrics->horiAdvance;\n      pfrslot->linearVertAdvance = metrics->vertAdvance;\n\n      /* make-up vertical metrics(?) */\n      metrics->vertBearingX = 0;\n      metrics->vertBearingY = 0;\n\n#if 0 /* some fonts seem to be broken here! */\n\n      /* Apply the font matrix, if any.                 */\n      /* TODO: Test existing fonts with unusual matrix  */\n      /* whether we have to adjust Units per EM.        */\n      {\n        FT_Matrix font_matrix;\n\n\n        font_matrix.xx = face->log_font.matrix[0] << 8;\n        font_matrix.yx = face->log_font.matrix[1] << 8;\n        font_matrix.xy = face->log_font.matrix[2] << 8;\n        font_matrix.yy = face->log_font.matrix[3] << 8;\n\n        FT_Outline_Transform( outline, &font_matrix );\n      }\n#endif\n\n      /* scale when needed */\n      if ( scaling )\n      {\n        FT_Int      n;\n        FT_Fixed    x_scale = pfrsize->metrics.x_scale;\n        FT_Fixed    y_scale = pfrsize->metrics.y_scale;\n        FT_Vector*  vec     = outline->points;\n\n\n        /* scale outline points */\n        for ( n = 0; n < outline->n_points; n++, vec++ )\n        {\n          vec->x = FT_MulFix( vec->x, x_scale );\n          vec->y = FT_MulFix( vec->y, y_scale );\n        }\n\n        /* scale the advance */\n        metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale );\n        metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, y_scale );\n      }\n\n      /* compute the rest of the metrics */\n      FT_Outline_Get_CBox( outline, &cbox );\n\n      metrics->width        = cbox.xMax - cbox.xMin;\n      metrics->height       = cbox.yMax - cbox.yMin;\n      metrics->horiBearingX = cbox.xMin;\n      metrics->horiBearingY = cbox.yMax - metrics->height;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      KERNING METHOD                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( FT_Error )\n  pfr_face_get_kerning( FT_Face     pfrface,        /* PFR_Face */\n                        FT_UInt     glyph1,\n                        FT_UInt     glyph2,\n                        FT_Vector*  kerning )\n  {\n    PFR_Face     face     = (PFR_Face)pfrface;\n    FT_Error     error    = FT_Err_Ok;\n    PFR_PhyFont  phy_font = &face->phy_font;\n    FT_UInt32    code1, code2, pair;\n\n\n    kerning->x = 0;\n    kerning->y = 0;\n\n    if ( glyph1 > 0 )\n      glyph1--;\n\n    if ( glyph2 > 0 )\n      glyph2--;\n\n    /* convert glyph indices to character codes */\n    if ( glyph1 > phy_font->num_chars ||\n         glyph2 > phy_font->num_chars )\n      goto Exit;\n\n    code1 = phy_font->chars[glyph1].char_code;\n    code2 = phy_font->chars[glyph2].char_code;\n    pair  = PFR_KERN_INDEX( code1, code2 );\n\n    /* now search the list of kerning items */\n    {\n      PFR_KernItem  item   = phy_font->kern_items;\n      FT_Stream     stream = pfrface->stream;\n\n\n      for ( ; item; item = item->next )\n      {\n        if ( pair >= item->pair1 && pair <= item->pair2 )\n          goto FoundPair;\n      }\n      goto Exit;\n\n    FoundPair: /* we found an item, now parse it and find the value if any */\n      if ( FT_STREAM_SEEK( item->offset )                       ||\n           FT_FRAME_ENTER( item->pair_count * item->pair_size ) )\n        goto Exit;\n\n      {\n        FT_UInt    count       = item->pair_count;\n        FT_UInt    size        = item->pair_size;\n        FT_UInt    power       = 1 << FT_MSB( count );\n        FT_UInt    probe       = power * size;\n        FT_UInt    extra       = count - power;\n        FT_Byte*   base        = stream->cursor;\n        FT_Bool    twobytes    = FT_BOOL( item->flags & 1 );\n        FT_Bool    twobyte_adj = FT_BOOL( item->flags & 2 );\n        FT_Byte*   p;\n        FT_UInt32  cpair;\n\n\n        if ( extra > 0 )\n        {\n          p = base + extra * size;\n\n          if ( twobytes )\n            cpair = FT_NEXT_ULONG( p );\n          else\n            cpair = PFR_NEXT_KPAIR( p );\n\n          if ( cpair == pair )\n            goto Found;\n\n          if ( cpair < pair )\n          {\n            if ( twobyte_adj )\n              p += 2;\n            else\n              p++;\n            base = p;\n          }\n        }\n\n        while ( probe > size )\n        {\n          probe >>= 1;\n          p       = base + probe;\n\n          if ( twobytes )\n            cpair = FT_NEXT_ULONG( p );\n          else\n            cpair = PFR_NEXT_KPAIR( p );\n\n          if ( cpair == pair )\n            goto Found;\n\n          if ( cpair < pair )\n            base += probe;\n        }\n\n        p = base;\n\n        if ( twobytes )\n          cpair = FT_NEXT_ULONG( p );\n        else\n          cpair = PFR_NEXT_KPAIR( p );\n\n        if ( cpair == pair )\n        {\n          FT_Int  value;\n\n\n        Found:\n          if ( twobyte_adj )\n            value = FT_PEEK_SHORT( p );\n          else\n            value = p[0];\n\n          kerning->x = item->base_adj + value;\n        }\n      }\n\n      FT_FRAME_EXIT();\n    }\n\n  Exit:\n    return error;\n  }\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrobjs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrobjs.h                                                              */\n/*                                                                         */\n/*    FreeType PFR object methods (specification).                         */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2004 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PFROBJS_H__\n#define __PFROBJS_H__\n\n#include \"pfrtypes.h\"\n\n\nFT_BEGIN_HEADER\n\n  typedef struct PFR_FaceRec_*  PFR_Face;\n\n  typedef struct PFR_SizeRec_*  PFR_Size;\n\n  typedef struct PFR_SlotRec_*  PFR_Slot;\n\n\n  typedef struct  PFR_FaceRec_\n  {\n    FT_FaceRec      root;\n    PFR_HeaderRec   header;\n    PFR_LogFontRec  log_font;\n    PFR_PhyFontRec  phy_font;\n\n  } PFR_FaceRec;\n\n\n  typedef struct  PFR_SizeRec_\n  {\n    FT_SizeRec  root;\n\n  } PFR_SizeRec;\n\n\n  typedef struct  PFR_SlotRec_\n  {\n    FT_GlyphSlotRec  root;\n    PFR_GlyphRec     glyph;\n\n  } PFR_SlotRec;\n\n\n  FT_LOCAL( FT_Error )\n  pfr_face_init( FT_Stream      stream,\n                 FT_Face        face,           /* PFR_Face */\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params );\n\n  FT_LOCAL( void )\n  pfr_face_done( FT_Face  face );               /* PFR_Face */\n\n\n  FT_LOCAL( FT_Error )\n  pfr_face_get_kerning( FT_Face     face,       /* PFR_Face */\n                        FT_UInt     glyph1,\n                        FT_UInt     glyph2,\n                        FT_Vector*  kerning );\n\n\n  FT_LOCAL( FT_Error )\n  pfr_slot_init( FT_GlyphSlot  slot );          /* PFR_Slot */\n\n  FT_LOCAL( void )\n  pfr_slot_done( FT_GlyphSlot  slot );          /* PFR_Slot */\n\n\n  FT_LOCAL( FT_Error )\n  pfr_slot_load( FT_GlyphSlot  slot,            /* PFR_Slot */\n                 FT_Size       size,            /* PFR_Size */\n                 FT_UInt       gindex,\n                 FT_Int32      load_flags );\n\n\nFT_END_HEADER\n\n#endif /* __PFROBJS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrsbit.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrsbit.c                                                              */\n/*                                                                         */\n/*    FreeType PFR bitmap loader (body).                                   */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2006, 2009, 2010, 2013 by                        */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"pfrsbit.h\"\n#include \"pfrload.h\"\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n\n#include \"pfrerror.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_pfr\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      PFR BIT WRITER                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct  PFR_BitWriter_\n  {\n    FT_Byte*  line;      /* current line start                    */\n    FT_Int    pitch;     /* line size in bytes                    */\n    FT_Int    width;     /* width in pixels/bits                  */\n    FT_Int    rows;      /* number of remaining rows to scan      */\n    FT_Int    total;     /* total number of bits to draw          */\n\n  } PFR_BitWriterRec, *PFR_BitWriter;\n\n\n  static void\n  pfr_bitwriter_init( PFR_BitWriter  writer,\n                      FT_Bitmap*     target,\n                      FT_Bool        decreasing )\n  {\n    writer->line   = target->buffer;\n    writer->pitch  = target->pitch;\n    writer->width  = target->width;\n    writer->rows   = target->rows;\n    writer->total  = writer->width * writer->rows;\n\n    if ( !decreasing )\n    {\n      writer->line += writer->pitch * ( target->rows - 1 );\n      writer->pitch = -writer->pitch;\n    }\n  }\n\n\n  static void\n  pfr_bitwriter_decode_bytes( PFR_BitWriter  writer,\n                              FT_Byte*       p,\n                              FT_Byte*       limit )\n  {\n    FT_Int    n, reload;\n    FT_Int    left = writer->width;\n    FT_Byte*  cur  = writer->line;\n    FT_UInt   mask = 0x80;\n    FT_UInt   val  = 0;\n    FT_UInt   c    = 0;\n\n\n    n = (FT_Int)( limit - p ) * 8;\n    if ( n > writer->total )\n      n = writer->total;\n\n    reload = n & 7;\n\n    for ( ; n > 0; n-- )\n    {\n      if ( ( n & 7 ) == reload )\n        val = *p++;\n\n      if ( val & 0x80 )\n        c |= mask;\n\n      val  <<= 1;\n      mask >>= 1;\n\n      if ( --left <= 0 )\n      {\n        cur[0] = (FT_Byte)c;\n        left   = writer->width;\n        mask   = 0x80;\n\n        writer->line += writer->pitch;\n        cur           = writer->line;\n        c             = 0;\n      }\n      else if ( mask == 0 )\n      {\n        cur[0] = (FT_Byte)c;\n        mask   = 0x80;\n        c      = 0;\n        cur ++;\n      }\n    }\n\n    if ( mask != 0x80 )\n      cur[0] = (FT_Byte)c;\n  }\n\n\n  static void\n  pfr_bitwriter_decode_rle1( PFR_BitWriter  writer,\n                             FT_Byte*       p,\n                             FT_Byte*       limit )\n  {\n    FT_Int    n, phase, count, counts[2], reload;\n    FT_Int    left = writer->width;\n    FT_Byte*  cur  = writer->line;\n    FT_UInt   mask = 0x80;\n    FT_UInt   c    = 0;\n\n\n    n = writer->total;\n\n    phase     = 1;\n    counts[0] = 0;\n    counts[1] = 0;\n    count     = 0;\n    reload    = 1;\n\n    for ( ; n > 0; n-- )\n    {\n      if ( reload )\n      {\n        do\n        {\n          if ( phase )\n          {\n            FT_Int  v;\n\n\n            if ( p >= limit )\n              break;\n\n            v         = *p++;\n            counts[0] = v >> 4;\n            counts[1] = v & 15;\n            phase     = 0;\n            count     = counts[0];\n          }\n          else\n          {\n            phase = 1;\n            count = counts[1];\n          }\n\n        } while ( count == 0 );\n      }\n\n      if ( phase )\n        c |= mask;\n\n      mask >>= 1;\n\n      if ( --left <= 0 )\n      {\n        cur[0] = (FT_Byte) c;\n        left   = writer->width;\n        mask   = 0x80;\n\n        writer->line += writer->pitch;\n        cur           = writer->line;\n        c             = 0;\n      }\n      else if ( mask == 0 )\n      {\n        cur[0] = (FT_Byte)c;\n        mask   = 0x80;\n        c      = 0;\n        cur ++;\n      }\n\n      reload = ( --count <= 0 );\n    }\n\n    if ( mask != 0x80 )\n      cur[0] = (FT_Byte) c;\n  }\n\n\n  static void\n  pfr_bitwriter_decode_rle2( PFR_BitWriter  writer,\n                             FT_Byte*       p,\n                             FT_Byte*       limit )\n  {\n    FT_Int    n, phase, count, reload;\n    FT_Int    left = writer->width;\n    FT_Byte*  cur  = writer->line;\n    FT_UInt   mask = 0x80;\n    FT_UInt   c    = 0;\n\n\n    n = writer->total;\n\n    phase  = 1;\n    count  = 0;\n    reload = 1;\n\n    for ( ; n > 0; n-- )\n    {\n      if ( reload )\n      {\n        do\n        {\n          if ( p >= limit )\n            break;\n\n          count = *p++;\n          phase = phase ^ 1;\n\n        } while ( count == 0 );\n      }\n\n      if ( phase )\n        c |= mask;\n\n      mask >>= 1;\n\n      if ( --left <= 0 )\n      {\n        cur[0] = (FT_Byte) c;\n        c      = 0;\n        mask   = 0x80;\n        left   = writer->width;\n\n        writer->line += writer->pitch;\n        cur           = writer->line;\n      }\n      else if ( mask == 0 )\n      {\n        cur[0] = (FT_Byte)c;\n        c      = 0;\n        mask   = 0x80;\n        cur ++;\n      }\n\n      reload = ( --count <= 0 );\n    }\n\n    if ( mask != 0x80 )\n      cur[0] = (FT_Byte) c;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  BITMAP DATA DECODING                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  pfr_lookup_bitmap_data( FT_Byte*   base,\n                          FT_Byte*   limit,\n                          FT_UInt    count,\n                          FT_UInt    flags,\n                          FT_UInt    char_code,\n                          FT_ULong*  found_offset,\n                          FT_ULong*  found_size )\n  {\n    FT_UInt   left, right, char_len;\n    FT_Bool   two = FT_BOOL( flags & 1 );\n    FT_Byte*  buff;\n\n\n    char_len = 4;\n    if ( two )       char_len += 1;\n    if ( flags & 2 ) char_len += 1;\n    if ( flags & 4 ) char_len += 1;\n\n    left  = 0;\n    right = count;\n\n    while ( left < right )\n    {\n      FT_UInt  middle, code;\n\n\n      middle = ( left + right ) >> 1;\n      buff   = base + middle * char_len;\n\n      /* check that we are not outside of the table -- */\n      /* this is possible with broken fonts...         */\n      if ( buff + char_len > limit )\n        goto Fail;\n\n      if ( two )\n        code = PFR_NEXT_USHORT( buff );\n      else\n        code = PFR_NEXT_BYTE( buff );\n\n      if ( code == char_code )\n        goto Found_It;\n\n      if ( code < char_code )\n        left = middle;\n      else\n        right = middle;\n    }\n\n  Fail:\n    /* Not found */\n    *found_size   = 0;\n    *found_offset = 0;\n    return;\n\n  Found_It:\n    if ( flags & 2 )\n      *found_size = PFR_NEXT_USHORT( buff );\n    else\n      *found_size = PFR_NEXT_BYTE( buff );\n\n    if ( flags & 4 )\n      *found_offset = PFR_NEXT_ULONG( buff );\n    else\n      *found_offset = PFR_NEXT_USHORT( buff );\n  }\n\n\n  /* load bitmap metrics.  \"*padvance\" must be set to the default value */\n  /* before calling this function...                                    */\n  /*                                                                    */\n  static FT_Error\n  pfr_load_bitmap_metrics( FT_Byte**  pdata,\n                           FT_Byte*   limit,\n                           FT_Long    scaled_advance,\n                           FT_Long   *axpos,\n                           FT_Long   *aypos,\n                           FT_UInt   *axsize,\n                           FT_UInt   *aysize,\n                           FT_Long   *aadvance,\n                           FT_UInt   *aformat )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_Byte   flags;\n    FT_Char   b;\n    FT_Byte*  p = *pdata;\n    FT_Long   xpos, ypos, advance;\n    FT_UInt   xsize, ysize;\n\n\n    PFR_CHECK( 1 );\n    flags = PFR_NEXT_BYTE( p );\n\n    xpos    = 0;\n    ypos    = 0;\n    xsize   = 0;\n    ysize   = 0;\n    advance = 0;\n\n    switch ( flags & 3 )\n    {\n    case 0:\n      PFR_CHECK( 1 );\n      b    = PFR_NEXT_INT8( p );\n      xpos = b >> 4;\n      ypos = ( (FT_Char)( b << 4 ) ) >> 4;\n      break;\n\n    case 1:\n      PFR_CHECK( 2 );\n      xpos = PFR_NEXT_INT8( p );\n      ypos = PFR_NEXT_INT8( p );\n      break;\n\n    case 2:\n      PFR_CHECK( 4 );\n      xpos = PFR_NEXT_SHORT( p );\n      ypos = PFR_NEXT_SHORT( p );\n      break;\n\n    case 3:\n      PFR_CHECK( 6 );\n      xpos = PFR_NEXT_LONG( p );\n      ypos = PFR_NEXT_LONG( p );\n      break;\n\n    default:\n      ;\n    }\n\n    flags >>= 2;\n    switch ( flags & 3 )\n    {\n    case 0:\n      /* blank image */\n      xsize = 0;\n      ysize = 0;\n      break;\n\n    case 1:\n      PFR_CHECK( 1 );\n      b     = PFR_NEXT_BYTE( p );\n      xsize = ( b >> 4 ) & 0xF;\n      ysize = b & 0xF;\n      break;\n\n    case 2:\n      PFR_CHECK( 2 );\n      xsize = PFR_NEXT_BYTE( p );\n      ysize = PFR_NEXT_BYTE( p );\n      break;\n\n    case 3:\n      PFR_CHECK( 4 );\n      xsize = PFR_NEXT_USHORT( p );\n      ysize = PFR_NEXT_USHORT( p );\n      break;\n\n    default:\n      ;\n    }\n\n    flags >>= 2;\n    switch ( flags & 3 )\n    {\n    case 0:\n      advance = scaled_advance;\n      break;\n\n    case 1:\n      PFR_CHECK( 1 );\n      advance = PFR_NEXT_INT8( p ) << 8;\n      break;\n\n    case 2:\n      PFR_CHECK( 2 );\n      advance = PFR_NEXT_SHORT( p );\n      break;\n\n    case 3:\n      PFR_CHECK( 3 );\n      advance = PFR_NEXT_LONG( p );\n      break;\n\n    default:\n      ;\n    }\n\n    *axpos    = xpos;\n    *aypos    = ypos;\n    *axsize   = xsize;\n    *aysize   = ysize;\n    *aadvance = advance;\n    *aformat  = flags >> 2;\n    *pdata    = p;\n\n  Exit:\n    return error;\n\n  Too_Short:\n    error = FT_THROW( Invalid_Table );\n    FT_ERROR(( \"pfr_load_bitmap_metrics: invalid glyph data\\n\" ));\n    goto Exit;\n  }\n\n\n  static FT_Error\n  pfr_load_bitmap_bits( FT_Byte*    p,\n                        FT_Byte*    limit,\n                        FT_UInt     format,\n                        FT_Bool     decreasing,\n                        FT_Bitmap*  target )\n  {\n    FT_Error          error = FT_Err_Ok;\n    PFR_BitWriterRec  writer;\n\n\n    if ( target->rows > 0 && target->width > 0 )\n    {\n      pfr_bitwriter_init( &writer, target, decreasing );\n\n      switch ( format )\n      {\n      case 0: /* packed bits */\n        pfr_bitwriter_decode_bytes( &writer, p, limit );\n        break;\n\n      case 1: /* RLE1 */\n        pfr_bitwriter_decode_rle1( &writer, p, limit );\n        break;\n\n      case 2: /* RLE2 */\n        pfr_bitwriter_decode_rle2( &writer, p, limit );\n        break;\n\n      default:\n        FT_ERROR(( \"pfr_read_bitmap_data: invalid image type\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n      }\n    }\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     BITMAP LOADING                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( FT_Error )\n  pfr_slot_load_bitmap( PFR_Slot  glyph,\n                        PFR_Size  size,\n                        FT_UInt   glyph_index )\n  {\n    FT_Error     error;\n    PFR_Face     face   = (PFR_Face) glyph->root.face;\n    FT_Stream    stream = face->root.stream;\n    PFR_PhyFont  phys   = &face->phy_font;\n    FT_ULong     gps_offset;\n    FT_ULong     gps_size;\n    PFR_Char     character;\n    PFR_Strike   strike;\n\n\n    character = &phys->chars[glyph_index];\n\n    /* Look-up a bitmap strike corresponding to the current */\n    /* character dimensions                                 */\n    {\n      FT_UInt  n;\n\n\n      strike = phys->strikes;\n      for ( n = 0; n < phys->num_strikes; n++ )\n      {\n        if ( strike->x_ppm == (FT_UInt)size->root.metrics.x_ppem &&\n             strike->y_ppm == (FT_UInt)size->root.metrics.y_ppem )\n        {\n          goto Found_Strike;\n        }\n\n        strike++;\n      }\n\n      /* couldn't find it */\n      return FT_THROW( Invalid_Argument );\n    }\n\n  Found_Strike:\n\n    /* Now lookup the glyph's position within the file */\n    {\n      FT_UInt  char_len;\n\n\n      char_len = 4;\n      if ( strike->flags & 1 ) char_len += 1;\n      if ( strike->flags & 2 ) char_len += 1;\n      if ( strike->flags & 4 ) char_len += 1;\n\n      /* Access data directly in the frame to speed lookups */\n      if ( FT_STREAM_SEEK( phys->bct_offset + strike->bct_offset ) ||\n           FT_FRAME_ENTER( char_len * strike->num_bitmaps )        )\n        goto Exit;\n\n      pfr_lookup_bitmap_data( stream->cursor,\n                              stream->limit,\n                              strike->num_bitmaps,\n                              strike->flags,\n                              character->char_code,\n                              &gps_offset,\n                              &gps_size );\n\n      FT_FRAME_EXIT();\n\n      if ( gps_size == 0 )\n      {\n        /* Could not find a bitmap program string for this glyph */\n        error = FT_THROW( Invalid_Argument );\n        goto Exit;\n      }\n    }\n\n    /* get the bitmap metrics */\n    {\n      FT_Long   xpos = 0, ypos = 0, advance = 0;\n      FT_UInt   xsize = 0, ysize = 0, format = 0;\n      FT_Byte*  p;\n\n\n      /* compute linear advance */\n      advance = character->advance;\n      if ( phys->metrics_resolution != phys->outline_resolution )\n        advance = FT_MulDiv( advance,\n                             phys->outline_resolution,\n                             phys->metrics_resolution );\n\n      glyph->root.linearHoriAdvance = advance;\n\n      /* compute default advance, i.e., scaled advance.  This can be */\n      /* overridden in the bitmap header of certain glyphs.          */\n      advance = FT_MulDiv( (FT_Fixed)size->root.metrics.x_ppem << 8,\n                           character->advance,\n                           phys->metrics_resolution );\n\n      if ( FT_STREAM_SEEK( face->header.gps_section_offset + gps_offset ) ||\n           FT_FRAME_ENTER( gps_size )                                     )\n        goto Exit;\n\n      p     = stream->cursor;\n      error = pfr_load_bitmap_metrics( &p, stream->limit,\n                                       advance,\n                                       &xpos, &ypos,\n                                       &xsize, &ysize,\n                                       &advance, &format );\n\n      /*\n       * XXX: on 16bit system, we return an error for huge bitmap\n       *      which causes a size truncation, because truncated\n       *      size properties makes bitmap glyph broken.\n       */\n      if ( xpos > FT_INT_MAX  || xpos < FT_INT_MIN         ||\n           ysize > FT_INT_MAX || ypos + ysize > FT_INT_MAX ||\n           ypos + (FT_Long)ysize < FT_INT_MIN )\n      {\n        FT_TRACE1(( \"pfr_slot_load_bitmap:\" ));\n        FT_TRACE1(( \"huge bitmap glyph %dx%d over FT_GlyphSlot\\n\",\n                     xpos, ypos ));\n        error = FT_THROW( Invalid_Pixel_Size );\n      }\n\n      if ( !error )\n      {\n        glyph->root.format = FT_GLYPH_FORMAT_BITMAP;\n\n        /* Set up glyph bitmap and metrics */\n\n        /* XXX: needs casts to fit FT_Bitmap.{width|rows|pitch} */\n        glyph->root.bitmap.width      = (FT_Int)xsize;\n        glyph->root.bitmap.rows       = (FT_Int)ysize;\n        glyph->root.bitmap.pitch      = (FT_Int)( xsize + 7 ) >> 3;\n        glyph->root.bitmap.pixel_mode = FT_PIXEL_MODE_MONO;\n\n        /* XXX: needs casts to fit FT_Glyph_Metrics.{width|height} */\n        glyph->root.metrics.width        = (FT_Pos)xsize << 6;\n        glyph->root.metrics.height       = (FT_Pos)ysize << 6;\n        glyph->root.metrics.horiBearingX = xpos << 6;\n        glyph->root.metrics.horiBearingY = ypos << 6;\n        glyph->root.metrics.horiAdvance  = FT_PIX_ROUND( ( advance >> 2 ) );\n        glyph->root.metrics.vertBearingX = - glyph->root.metrics.width >> 1;\n        glyph->root.metrics.vertBearingY = 0;\n        glyph->root.metrics.vertAdvance  = size->root.metrics.height;\n\n        /* XXX: needs casts fit FT_GlyphSlotRec.bitmap_{left|top} */\n        glyph->root.bitmap_left = (FT_Int)xpos;\n        glyph->root.bitmap_top  = (FT_Int)(ypos + ysize);\n\n        /* Allocate and read bitmap data */\n        {\n          FT_ULong  len = glyph->root.bitmap.pitch * ysize;\n\n\n          error = ft_glyphslot_alloc_bitmap( &glyph->root, len );\n          if ( !error )\n          {\n            error = pfr_load_bitmap_bits(\n                      p,\n                      stream->limit,\n                      format,\n                      FT_BOOL(face->header.color_flags & 2),\n                      &glyph->root.bitmap );\n          }\n        }\n      }\n\n      FT_FRAME_EXIT();\n    }\n\n  Exit:\n    return error;\n  }\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrsbit.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrsbit.h                                                              */\n/*                                                                         */\n/*    FreeType PFR bitmap loader (specification).                          */\n/*                                                                         */\n/*  Copyright 2002 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PFRSBIT_H__\n#define __PFRSBIT_H__\n\n#include \"pfrobjs.h\"\n\nFT_BEGIN_HEADER\n\n  FT_LOCAL( FT_Error )\n  pfr_slot_load_bitmap( PFR_Slot  glyph,\n                        PFR_Size  size,\n                        FT_UInt   glyph_index );\n\nFT_END_HEADER\n\n#endif /* __PFR_SBIT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pfr/pfrtypes.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pfrtypes.h                                                             */\n/*                                                                         */\n/*    FreeType PFR data structures (specification only).                   */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2005, 2007 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PFRTYPES_H__\n#define __PFRTYPES_H__\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n\nFT_BEGIN_HEADER\n\n  /************************************************************************/\n\n  /* the PFR Header structure */\n  typedef struct  PFR_HeaderRec_\n  {\n    FT_UInt32  signature;\n    FT_UInt    version;\n    FT_UInt    signature2;\n    FT_UInt    header_size;\n\n    FT_UInt    log_dir_size;\n    FT_UInt    log_dir_offset;\n\n    FT_UInt    log_font_max_size;\n    FT_UInt32  log_font_section_size;\n    FT_UInt32  log_font_section_offset;\n\n    FT_UInt32  phy_font_max_size;\n    FT_UInt32  phy_font_section_size;\n    FT_UInt32  phy_font_section_offset;\n\n    FT_UInt    gps_max_size;\n    FT_UInt32  gps_section_size;\n    FT_UInt32  gps_section_offset;\n\n    FT_UInt    max_blue_values;\n    FT_UInt    max_x_orus;\n    FT_UInt    max_y_orus;\n\n    FT_UInt    phy_font_max_size_high;\n    FT_UInt    color_flags;\n\n    FT_UInt32  bct_max_size;\n    FT_UInt32  bct_set_max_size;\n    FT_UInt32  phy_bct_set_max_size;\n\n    FT_UInt    num_phy_fonts;\n    FT_UInt    max_vert_stem_snap;\n    FT_UInt    max_horz_stem_snap;\n    FT_UInt    max_chars;\n\n  } PFR_HeaderRec, *PFR_Header;\n\n\n  /* used in `color_flags' field of the PFR_Header */\n  typedef enum  PFR_HeaderFlags_\n  {\n    PFR_FLAG_BLACK_PIXEL   = 1,\n    PFR_FLAG_INVERT_BITMAP = 2\n\n  } PFR_HeaderFlags;\n\n\n  /************************************************************************/\n\n  typedef struct  PFR_LogFontRec_\n  {\n    FT_UInt32  size;\n    FT_UInt32  offset;\n\n    FT_Int32   matrix[4];\n    FT_UInt    stroke_flags;\n    FT_Int     stroke_thickness;\n    FT_Int     bold_thickness;\n    FT_Int32   miter_limit;\n\n    FT_UInt32  phys_size;\n    FT_UInt32  phys_offset;\n\n  } PFR_LogFontRec, *PFR_LogFont;\n\n\n  typedef enum  PFR_LogFlags_\n  {\n    PFR_LOG_EXTRA_ITEMS  = 0x40,\n    PFR_LOG_2BYTE_BOLD   = 0x20,\n    PFR_LOG_BOLD         = 0x10,\n    PFR_LOG_2BYTE_STROKE = 8,\n    PFR_LOG_STROKE       = 4,\n    PFR_LINE_JOIN_MASK   = 3\n\n  } PFR_LogFlags;\n\n\n  typedef enum  PFR_LineJoinFlags_\n  {\n    PFR_LINE_JOIN_MITER = 0,\n    PFR_LINE_JOIN_ROUND = 1,\n    PFR_LINE_JOIN_BEVEL = 2\n\n  } PFR_LineJoinFlags;\n\n\n  /************************************************************************/\n\n  typedef enum  PFR_BitmapFlags_\n  {\n    PFR_BITMAP_3BYTE_OFFSET   = 4,\n    PFR_BITMAP_2BYTE_SIZE     = 2,\n    PFR_BITMAP_2BYTE_CHARCODE = 1\n\n  } PFR_BitmapFlags;\n\n\n  typedef struct  PFR_BitmapCharRec_\n  {\n    FT_UInt    char_code;\n    FT_UInt    gps_size;\n    FT_UInt32  gps_offset;\n\n  } PFR_BitmapCharRec, *PFR_BitmapChar;\n\n\n  typedef enum  PFR_StrikeFlags_\n  {\n    PFR_STRIKE_2BYTE_COUNT  = 0x10,\n    PFR_STRIKE_3BYTE_OFFSET = 0x08,\n    PFR_STRIKE_3BYTE_SIZE   = 0x04,\n    PFR_STRIKE_2BYTE_YPPM   = 0x02,\n    PFR_STRIKE_2BYTE_XPPM   = 0x01\n\n  } PFR_StrikeFlags;\n\n\n  typedef struct  PFR_StrikeRec_\n  {\n    FT_UInt         x_ppm;\n    FT_UInt         y_ppm;\n    FT_UInt         flags;\n\n    FT_UInt32       gps_size;\n    FT_UInt32       gps_offset;\n\n    FT_UInt32       bct_size;\n    FT_UInt32       bct_offset;\n\n    /* optional */\n    FT_UInt         num_bitmaps;\n    PFR_BitmapChar  bitmaps;\n\n  } PFR_StrikeRec, *PFR_Strike;\n\n\n  /************************************************************************/\n\n  typedef struct  PFR_CharRec_\n  {\n    FT_UInt    char_code;\n    FT_Int     advance;\n    FT_UInt    gps_size;\n    FT_UInt32  gps_offset;\n\n  } PFR_CharRec, *PFR_Char;\n\n\n  /************************************************************************/\n\n  typedef struct  PFR_DimensionRec_\n  {\n    FT_UInt  standard;\n    FT_UInt  num_stem_snaps;\n    FT_Int*  stem_snaps;\n\n  } PFR_DimensionRec, *PFR_Dimension;\n\n  /************************************************************************/\n\n  typedef struct PFR_KernItemRec_*  PFR_KernItem;\n\n  typedef struct  PFR_KernItemRec_\n  {\n    PFR_KernItem  next;\n    FT_Byte       pair_count;\n    FT_Byte       flags;\n    FT_Short      base_adj;\n    FT_UInt       pair_size;\n    FT_Offset     offset;\n    FT_UInt32     pair1;\n    FT_UInt32     pair2;\n\n  } PFR_KernItemRec;\n\n\n#define PFR_KERN_INDEX( g1, g2 )                          \\\n          ( ( (FT_UInt32)(g1) << 16 ) | (FT_UInt16)(g2) )\n\n#define PFR_KERN_PAIR_INDEX( pair )                        \\\n          PFR_KERN_INDEX( (pair)->glyph1, (pair)->glyph2 )\n\n#define PFR_NEXT_KPAIR( p )  ( p += 2,                              \\\n                               ( (FT_UInt32)p[-2] << 16 ) | p[-1] )\n\n\n  /************************************************************************/\n\n  typedef struct  PFR_PhyFontRec_\n  {\n    FT_Memory          memory;\n    FT_UInt32          offset;\n\n    FT_UInt            font_ref_number;\n    FT_UInt            outline_resolution;\n    FT_UInt            metrics_resolution;\n    FT_BBox            bbox;\n    FT_UInt            flags;\n    FT_UInt            standard_advance;\n\n    FT_Int             ascent;   /* optional, bbox.yMax if not present */\n    FT_Int             descent;  /* optional, bbox.yMin if not present */\n    FT_Int             leading;  /* optional, 0 if not present         */\n\n    PFR_DimensionRec   horizontal;\n    PFR_DimensionRec   vertical;\n\n    FT_String*         font_id;\n    FT_String*         family_name;\n    FT_String*         style_name;\n\n    FT_UInt            num_strikes;\n    FT_UInt            max_strikes;\n    PFR_StrikeRec*     strikes;\n\n    FT_UInt            num_blue_values;\n    FT_Int            *blue_values;\n    FT_UInt            blue_fuzz;\n    FT_UInt            blue_scale;\n\n    FT_UInt            num_chars;\n    FT_Offset          chars_offset;\n    PFR_Char           chars;\n\n    FT_UInt            num_kern_pairs;\n    PFR_KernItem       kern_items;\n    PFR_KernItem*      kern_items_tail;\n\n    /* not part of the spec, but used during load */\n    FT_Long            bct_offset;\n    FT_Byte*           cursor;\n\n  } PFR_PhyFontRec, *PFR_PhyFont;\n\n\n  typedef enum  PFR_PhyFlags_\n  {\n    PFR_PHY_EXTRA_ITEMS      = 0x80,\n    PFR_PHY_3BYTE_GPS_OFFSET = 0x20,\n    PFR_PHY_2BYTE_GPS_SIZE   = 0x10,\n    PFR_PHY_ASCII_CODE       = 0x08,\n    PFR_PHY_PROPORTIONAL     = 0x04,\n    PFR_PHY_2BYTE_CHARCODE   = 0x02,\n    PFR_PHY_VERTICAL         = 0x01\n\n  } PFR_PhyFlags;\n\n\n  typedef enum PFR_KernFlags_\n  {\n    PFR_KERN_2BYTE_CHAR  = 0x01,\n    PFR_KERN_2BYTE_ADJ   = 0x02\n\n  } PFR_KernFlags;\n\n\n  /************************************************************************/\n\n  typedef enum  PFR_GlyphFlags_\n  {\n    PFR_GLYPH_IS_COMPOUND   = 0x80,\n    PFR_GLYPH_EXTRA_ITEMS   = 0x08,\n    PFR_GLYPH_1BYTE_XYCOUNT = 0x04,\n    PFR_GLYPH_XCOUNT        = 0x02,\n    PFR_GLYPH_YCOUNT        = 0x01\n\n  } PFR_GlyphFlags;\n\n\n  /* controlled coordinate */\n  typedef struct  PFR_CoordRec_\n  {\n    FT_UInt  org;\n    FT_UInt  cur;\n\n  } PFR_CoordRec, *PFR_Coord;\n\n\n  typedef struct  PFR_SubGlyphRec_\n  {\n    FT_Fixed   x_scale;\n    FT_Fixed   y_scale;\n    FT_Int     x_delta;\n    FT_Int     y_delta;\n    FT_UInt32  gps_offset;\n    FT_UInt    gps_size;\n\n  } PFR_SubGlyphRec, *PFR_SubGlyph;\n\n\n  typedef enum  PFR_SubgGlyphFlags_\n  {\n    PFR_SUBGLYPH_3BYTE_OFFSET = 0x80,\n    PFR_SUBGLYPH_2BYTE_SIZE   = 0x40,\n    PFR_SUBGLYPH_YSCALE       = 0x20,\n    PFR_SUBGLYPH_XSCALE       = 0x10\n\n  } PFR_SubGlyphFlags;\n\n\n  typedef struct  PFR_GlyphRec_\n  {\n    FT_Byte           format;\n\n#if 0\n    FT_UInt           num_x_control;\n    FT_UInt           num_y_control;\n#endif\n    FT_UInt           max_xy_control;\n    FT_Pos*           x_control;\n    FT_Pos*           y_control;\n\n\n    FT_UInt           num_subs;\n    FT_UInt           max_subs;\n    PFR_SubGlyphRec*  subs;\n\n    FT_GlyphLoader    loader;\n    FT_Bool           path_begun;\n\n  } PFR_GlyphRec, *PFR_Glyph;\n\n\nFT_END_HEADER\n\n#endif /* __PFRTYPES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/afmparse.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afmparse.c                                                             */\n/*                                                                         */\n/*    AFM parser (body).                                                   */\n/*                                                                         */\n/*  Copyright 2006-2010, 2012, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\n#include \"afmparse.h\"\n#include \"psconv.h\"\n\n#include \"psauxerr.h\"\n\n\n/***************************************************************************/\n/*                                                                         */\n/*    AFM_Stream                                                           */\n/*                                                                         */\n/* The use of AFM_Stream is largely inspired by parseAFM.[ch] from t1lib.  */\n/*                                                                         */\n/*                                                                         */\n\n  enum\n  {\n    AFM_STREAM_STATUS_NORMAL,\n    AFM_STREAM_STATUS_EOC,\n    AFM_STREAM_STATUS_EOL,\n    AFM_STREAM_STATUS_EOF\n  };\n\n\n  typedef struct  AFM_StreamRec_\n  {\n    FT_Byte*  cursor;\n    FT_Byte*  base;\n    FT_Byte*  limit;\n\n    FT_Int    status;\n\n  } AFM_StreamRec;\n\n\n#ifndef EOF\n#define EOF -1\n#endif\n\n\n  /* this works because empty lines are ignored */\n#define AFM_IS_NEWLINE( ch )  ( (ch) == '\\r' || (ch) == '\\n' )\n\n#define AFM_IS_EOF( ch )      ( (ch) == EOF  || (ch) == '\\x1a' )\n#define AFM_IS_SPACE( ch )    ( (ch) == ' '  || (ch) == '\\t' )\n\n  /* column separator; there is no `column' in the spec actually */\n#define AFM_IS_SEP( ch )      ( (ch) == ';' )\n\n#define AFM_GETC()                                                       \\\n          ( ( (stream)->cursor < (stream)->limit ) ? *(stream)->cursor++ \\\n                                                   : EOF )\n\n#define AFM_STREAM_KEY_BEGIN( stream )    \\\n          (char*)( (stream)->cursor - 1 )\n\n#define AFM_STREAM_KEY_LEN( stream, key )       \\\n          ( (char*)(stream)->cursor - key - 1 )\n\n#define AFM_STATUS_EOC( stream ) \\\n          ( (stream)->status >= AFM_STREAM_STATUS_EOC )\n\n#define AFM_STATUS_EOL( stream ) \\\n          ( (stream)->status >= AFM_STREAM_STATUS_EOL )\n\n#define AFM_STATUS_EOF( stream ) \\\n          ( (stream)->status >= AFM_STREAM_STATUS_EOF )\n\n\n  static int\n  afm_stream_skip_spaces( AFM_Stream  stream )\n  {\n    int  ch = 0;  /* make stupid compiler happy */\n\n\n    if ( AFM_STATUS_EOC( stream ) )\n      return ';';\n\n    while ( 1 )\n    {\n      ch = AFM_GETC();\n      if ( !AFM_IS_SPACE( ch ) )\n        break;\n    }\n\n    if ( AFM_IS_NEWLINE( ch ) )\n      stream->status = AFM_STREAM_STATUS_EOL;\n    else if ( AFM_IS_SEP( ch ) )\n      stream->status = AFM_STREAM_STATUS_EOC;\n    else if ( AFM_IS_EOF( ch ) )\n      stream->status = AFM_STREAM_STATUS_EOF;\n\n    return ch;\n  }\n\n\n  /* read a key or value in current column */\n  static char*\n  afm_stream_read_one( AFM_Stream  stream )\n  {\n    char*  str;\n\n\n    afm_stream_skip_spaces( stream );\n    if ( AFM_STATUS_EOC( stream ) )\n      return NULL;\n\n    str = AFM_STREAM_KEY_BEGIN( stream );\n\n    while ( 1 )\n    {\n      int  ch = AFM_GETC();\n\n\n      if ( AFM_IS_SPACE( ch ) )\n        break;\n      else if ( AFM_IS_NEWLINE( ch ) )\n      {\n        stream->status = AFM_STREAM_STATUS_EOL;\n        break;\n      }\n      else if ( AFM_IS_SEP( ch ) )\n      {\n        stream->status = AFM_STREAM_STATUS_EOC;\n        break;\n      }\n      else if ( AFM_IS_EOF( ch ) )\n      {\n        stream->status = AFM_STREAM_STATUS_EOF;\n        break;\n      }\n    }\n\n    return str;\n  }\n\n\n  /* read a string (i.e., read to EOL) */\n  static char*\n  afm_stream_read_string( AFM_Stream  stream )\n  {\n    char*  str;\n\n\n    afm_stream_skip_spaces( stream );\n    if ( AFM_STATUS_EOL( stream ) )\n      return NULL;\n\n    str = AFM_STREAM_KEY_BEGIN( stream );\n\n    /* scan to eol */\n    while ( 1 )\n    {\n      int  ch = AFM_GETC();\n\n\n      if ( AFM_IS_NEWLINE( ch ) )\n      {\n        stream->status = AFM_STREAM_STATUS_EOL;\n        break;\n      }\n      else if ( AFM_IS_EOF( ch ) )\n      {\n        stream->status = AFM_STREAM_STATUS_EOF;\n        break;\n      }\n    }\n\n    return str;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*    AFM_Parser                                                         */\n  /*                                                                       */\n  /*                                                                       */\n\n  /* all keys defined in Ch. 7-10 of 5004.AFM_Spec.pdf */\n  typedef enum  AFM_Token_\n  {\n    AFM_TOKEN_ASCENDER,\n    AFM_TOKEN_AXISLABEL,\n    AFM_TOKEN_AXISTYPE,\n    AFM_TOKEN_B,\n    AFM_TOKEN_BLENDAXISTYPES,\n    AFM_TOKEN_BLENDDESIGNMAP,\n    AFM_TOKEN_BLENDDESIGNPOSITIONS,\n    AFM_TOKEN_C,\n    AFM_TOKEN_CC,\n    AFM_TOKEN_CH,\n    AFM_TOKEN_CAPHEIGHT,\n    AFM_TOKEN_CHARWIDTH,\n    AFM_TOKEN_CHARACTERSET,\n    AFM_TOKEN_CHARACTERS,\n    AFM_TOKEN_DESCENDER,\n    AFM_TOKEN_ENCODINGSCHEME,\n    AFM_TOKEN_ENDAXIS,\n    AFM_TOKEN_ENDCHARMETRICS,\n    AFM_TOKEN_ENDCOMPOSITES,\n    AFM_TOKEN_ENDDIRECTION,\n    AFM_TOKEN_ENDFONTMETRICS,\n    AFM_TOKEN_ENDKERNDATA,\n    AFM_TOKEN_ENDKERNPAIRS,\n    AFM_TOKEN_ENDTRACKKERN,\n    AFM_TOKEN_ESCCHAR,\n    AFM_TOKEN_FAMILYNAME,\n    AFM_TOKEN_FONTBBOX,\n    AFM_TOKEN_FONTNAME,\n    AFM_TOKEN_FULLNAME,\n    AFM_TOKEN_ISBASEFONT,\n    AFM_TOKEN_ISCIDFONT,\n    AFM_TOKEN_ISFIXEDPITCH,\n    AFM_TOKEN_ISFIXEDV,\n    AFM_TOKEN_ITALICANGLE,\n    AFM_TOKEN_KP,\n    AFM_TOKEN_KPH,\n    AFM_TOKEN_KPX,\n    AFM_TOKEN_KPY,\n    AFM_TOKEN_L,\n    AFM_TOKEN_MAPPINGSCHEME,\n    AFM_TOKEN_METRICSSETS,\n    AFM_TOKEN_N,\n    AFM_TOKEN_NOTICE,\n    AFM_TOKEN_PCC,\n    AFM_TOKEN_STARTAXIS,\n    AFM_TOKEN_STARTCHARMETRICS,\n    AFM_TOKEN_STARTCOMPOSITES,\n    AFM_TOKEN_STARTDIRECTION,\n    AFM_TOKEN_STARTFONTMETRICS,\n    AFM_TOKEN_STARTKERNDATA,\n    AFM_TOKEN_STARTKERNPAIRS,\n    AFM_TOKEN_STARTKERNPAIRS0,\n    AFM_TOKEN_STARTKERNPAIRS1,\n    AFM_TOKEN_STARTTRACKKERN,\n    AFM_TOKEN_STDHW,\n    AFM_TOKEN_STDVW,\n    AFM_TOKEN_TRACKKERN,\n    AFM_TOKEN_UNDERLINEPOSITION,\n    AFM_TOKEN_UNDERLINETHICKNESS,\n    AFM_TOKEN_VV,\n    AFM_TOKEN_VVECTOR,\n    AFM_TOKEN_VERSION,\n    AFM_TOKEN_W,\n    AFM_TOKEN_W0,\n    AFM_TOKEN_W0X,\n    AFM_TOKEN_W0Y,\n    AFM_TOKEN_W1,\n    AFM_TOKEN_W1X,\n    AFM_TOKEN_W1Y,\n    AFM_TOKEN_WX,\n    AFM_TOKEN_WY,\n    AFM_TOKEN_WEIGHT,\n    AFM_TOKEN_WEIGHTVECTOR,\n    AFM_TOKEN_XHEIGHT,\n    N_AFM_TOKENS,\n    AFM_TOKEN_UNKNOWN\n\n  } AFM_Token;\n\n\n  static const char*  const afm_key_table[N_AFM_TOKENS] =\n  {\n    \"Ascender\",\n    \"AxisLabel\",\n    \"AxisType\",\n    \"B\",\n    \"BlendAxisTypes\",\n    \"BlendDesignMap\",\n    \"BlendDesignPositions\",\n    \"C\",\n    \"CC\",\n    \"CH\",\n    \"CapHeight\",\n    \"CharWidth\",\n    \"CharacterSet\",\n    \"Characters\",\n    \"Descender\",\n    \"EncodingScheme\",\n    \"EndAxis\",\n    \"EndCharMetrics\",\n    \"EndComposites\",\n    \"EndDirection\",\n    \"EndFontMetrics\",\n    \"EndKernData\",\n    \"EndKernPairs\",\n    \"EndTrackKern\",\n    \"EscChar\",\n    \"FamilyName\",\n    \"FontBBox\",\n    \"FontName\",\n    \"FullName\",\n    \"IsBaseFont\",\n    \"IsCIDFont\",\n    \"IsFixedPitch\",\n    \"IsFixedV\",\n    \"ItalicAngle\",\n    \"KP\",\n    \"KPH\",\n    \"KPX\",\n    \"KPY\",\n    \"L\",\n    \"MappingScheme\",\n    \"MetricsSets\",\n    \"N\",\n    \"Notice\",\n    \"PCC\",\n    \"StartAxis\",\n    \"StartCharMetrics\",\n    \"StartComposites\",\n    \"StartDirection\",\n    \"StartFontMetrics\",\n    \"StartKernData\",\n    \"StartKernPairs\",\n    \"StartKernPairs0\",\n    \"StartKernPairs1\",\n    \"StartTrackKern\",\n    \"StdHW\",\n    \"StdVW\",\n    \"TrackKern\",\n    \"UnderlinePosition\",\n    \"UnderlineThickness\",\n    \"VV\",\n    \"VVector\",\n    \"Version\",\n    \"W\",\n    \"W0\",\n    \"W0X\",\n    \"W0Y\",\n    \"W1\",\n    \"W1X\",\n    \"W1Y\",\n    \"WX\",\n    \"WY\",\n    \"Weight\",\n    \"WeightVector\",\n    \"XHeight\"\n  };\n\n\n  /*\n   * `afm_parser_read_vals' and `afm_parser_next_key' provide\n   * high-level operations to an AFM_Stream.  The rest of the\n   * parser functions should use them without accessing the\n   * AFM_Stream directly.\n   */\n\n  FT_LOCAL_DEF( FT_Int )\n  afm_parser_read_vals( AFM_Parser  parser,\n                        AFM_Value   vals,\n                        FT_UInt     n )\n  {\n    AFM_Stream  stream = parser->stream;\n    char*       str;\n    FT_UInt     i;\n\n\n    if ( n > AFM_MAX_ARGUMENTS )\n      return 0;\n\n    for ( i = 0; i < n; i++ )\n    {\n      FT_Offset  len;\n      AFM_Value  val = vals + i;\n\n\n      if ( val->type == AFM_VALUE_TYPE_STRING )\n        str = afm_stream_read_string( stream );\n      else\n        str = afm_stream_read_one( stream );\n\n      if ( !str )\n        break;\n\n      len = AFM_STREAM_KEY_LEN( stream, str );\n\n      switch ( val->type )\n      {\n      case AFM_VALUE_TYPE_STRING:\n      case AFM_VALUE_TYPE_NAME:\n        {\n          FT_Memory  memory = parser->memory;\n          FT_Error   error;\n\n\n          if ( !FT_QALLOC( val->u.s, len + 1 ) )\n          {\n            ft_memcpy( val->u.s, str, len );\n            val->u.s[len] = '\\0';\n          }\n        }\n        break;\n\n      case AFM_VALUE_TYPE_FIXED:\n        val->u.f = PS_Conv_ToFixed( (FT_Byte**)(void*)&str,\n                                    (FT_Byte*)str + len, 0 );\n        break;\n\n      case AFM_VALUE_TYPE_INTEGER:\n        val->u.i = PS_Conv_ToInt( (FT_Byte**)(void*)&str,\n                                  (FT_Byte*)str + len );\n        break;\n\n      case AFM_VALUE_TYPE_BOOL:\n        val->u.b = FT_BOOL( len == 4                      &&\n                            !ft_strncmp( str, \"true\", 4 ) );\n        break;\n\n      case AFM_VALUE_TYPE_INDEX:\n        if ( parser->get_index )\n          val->u.i = parser->get_index( str, len, parser->user_data );\n        else\n          val->u.i = 0;\n        break;\n      }\n    }\n\n    return i;\n  }\n\n\n  FT_LOCAL_DEF( char* )\n  afm_parser_next_key( AFM_Parser  parser,\n                       FT_Bool     line,\n                       FT_Offset*  len )\n  {\n    AFM_Stream  stream = parser->stream;\n    char*       key    = 0;  /* make stupid compiler happy */\n\n\n    if ( line )\n    {\n      while ( 1 )\n      {\n        /* skip current line */\n        if ( !AFM_STATUS_EOL( stream ) )\n          afm_stream_read_string( stream );\n\n        stream->status = AFM_STREAM_STATUS_NORMAL;\n        key = afm_stream_read_one( stream );\n\n        /* skip empty line */\n        if ( !key                      &&\n             !AFM_STATUS_EOF( stream ) &&\n             AFM_STATUS_EOL( stream )  )\n          continue;\n\n        break;\n      }\n    }\n    else\n    {\n      while ( 1 )\n      {\n        /* skip current column */\n        while ( !AFM_STATUS_EOC( stream ) )\n          afm_stream_read_one( stream );\n\n        stream->status = AFM_STREAM_STATUS_NORMAL;\n        key = afm_stream_read_one( stream );\n\n        /* skip empty column */\n        if ( !key                      &&\n             !AFM_STATUS_EOF( stream ) &&\n             AFM_STATUS_EOC( stream )  )\n          continue;\n\n        break;\n      }\n    }\n\n    if ( len )\n      *len = ( key ) ? (FT_Offset)AFM_STREAM_KEY_LEN( stream, key )\n                     : 0;\n\n    return key;\n  }\n\n\n  static AFM_Token\n  afm_tokenize( const char*  key,\n                FT_Offset    len )\n  {\n    int  n;\n\n\n    for ( n = 0; n < N_AFM_TOKENS; n++ )\n    {\n      if ( *( afm_key_table[n] ) == *key )\n      {\n        for ( ; n < N_AFM_TOKENS; n++ )\n        {\n          if ( *( afm_key_table[n] ) != *key )\n            return AFM_TOKEN_UNKNOWN;\n\n          if ( ft_strncmp( afm_key_table[n], key, len ) == 0 )\n            return (AFM_Token) n;\n        }\n      }\n    }\n\n    return AFM_TOKEN_UNKNOWN;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  afm_parser_init( AFM_Parser  parser,\n                   FT_Memory   memory,\n                   FT_Byte*    base,\n                   FT_Byte*    limit )\n  {\n    AFM_Stream  stream = NULL;\n    FT_Error    error;\n\n\n    if ( FT_NEW( stream ) )\n      return error;\n\n    stream->cursor = stream->base = base;\n    stream->limit  = limit;\n\n    /* don't skip the first line during the first call */\n    stream->status = AFM_STREAM_STATUS_EOL;\n\n    parser->memory    = memory;\n    parser->stream    = stream;\n    parser->FontInfo  = NULL;\n    parser->get_index = NULL;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_LOCAL( void )\n  afm_parser_done( AFM_Parser  parser )\n  {\n    FT_Memory  memory = parser->memory;\n\n\n    FT_FREE( parser->stream );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  afm_parser_read_int( AFM_Parser  parser,\n                       FT_Int*     aint )\n  {\n    AFM_ValueRec  val;\n\n\n    val.type = AFM_VALUE_TYPE_INTEGER;\n\n    if ( afm_parser_read_vals( parser, &val, 1 ) == 1 )\n    {\n      *aint = val.u.i;\n\n      return FT_Err_Ok;\n    }\n    else\n      return FT_THROW( Syntax_Error );\n  }\n\n\n  static FT_Error\n  afm_parse_track_kern( AFM_Parser  parser )\n  {\n    AFM_FontInfo   fi = parser->FontInfo;\n    AFM_TrackKern  tk;\n    char*          key;\n    FT_Offset      len;\n    int            n = -1;\n\n\n    if ( afm_parser_read_int( parser, &fi->NumTrackKern ) )\n        goto Fail;\n\n    if ( fi->NumTrackKern )\n    {\n      FT_Memory  memory = parser->memory;\n      FT_Error   error;\n\n\n      if ( FT_QNEW_ARRAY( fi->TrackKerns, fi->NumTrackKern ) )\n        return error;\n    }\n\n    while ( ( key = afm_parser_next_key( parser, 1, &len ) ) != 0 )\n    {\n      AFM_ValueRec  shared_vals[5];\n\n\n      switch ( afm_tokenize( key, len ) )\n      {\n      case AFM_TOKEN_TRACKKERN:\n        n++;\n\n        if ( n >= fi->NumTrackKern )\n          goto Fail;\n\n        tk = fi->TrackKerns + n;\n\n        shared_vals[0].type = AFM_VALUE_TYPE_INTEGER;\n        shared_vals[1].type = AFM_VALUE_TYPE_FIXED;\n        shared_vals[2].type = AFM_VALUE_TYPE_FIXED;\n        shared_vals[3].type = AFM_VALUE_TYPE_FIXED;\n        shared_vals[4].type = AFM_VALUE_TYPE_FIXED;\n        if ( afm_parser_read_vals( parser, shared_vals, 5 ) != 5 )\n          goto Fail;\n\n        tk->degree     = shared_vals[0].u.i;\n        tk->min_ptsize = shared_vals[1].u.f;\n        tk->min_kern   = shared_vals[2].u.f;\n        tk->max_ptsize = shared_vals[3].u.f;\n        tk->max_kern   = shared_vals[4].u.f;\n\n        break;\n\n      case AFM_TOKEN_ENDTRACKKERN:\n      case AFM_TOKEN_ENDKERNDATA:\n      case AFM_TOKEN_ENDFONTMETRICS:\n        fi->NumTrackKern = n + 1;\n        return FT_Err_Ok;\n\n      case AFM_TOKEN_UNKNOWN:\n        break;\n\n      default:\n        goto Fail;\n      }\n    }\n\n  Fail:\n    return FT_THROW( Syntax_Error );\n  }\n\n\n#undef  KERN_INDEX\n#define KERN_INDEX( g1, g2 )  ( ( (FT_ULong)g1 << 16 ) | g2 )\n\n\n  /* compare two kerning pairs */\n  FT_CALLBACK_DEF( int )\n  afm_compare_kern_pairs( const void*  a,\n                          const void*  b )\n  {\n    AFM_KernPair  kp1 = (AFM_KernPair)a;\n    AFM_KernPair  kp2 = (AFM_KernPair)b;\n\n    FT_ULong  index1 = KERN_INDEX( kp1->index1, kp1->index2 );\n    FT_ULong  index2 = KERN_INDEX( kp2->index1, kp2->index2 );\n\n\n    if ( index1 > index2 )\n      return 1;\n    else if ( index1 < index2 )\n      return -1;\n    else\n      return 0;\n  }\n\n\n  static FT_Error\n  afm_parse_kern_pairs( AFM_Parser  parser )\n  {\n    AFM_FontInfo  fi = parser->FontInfo;\n    AFM_KernPair  kp;\n    char*         key;\n    FT_Offset     len;\n    int           n = -1;\n\n\n    if ( afm_parser_read_int( parser, &fi->NumKernPair ) )\n      goto Fail;\n\n    if ( fi->NumKernPair )\n    {\n      FT_Memory  memory = parser->memory;\n      FT_Error   error;\n\n\n      if ( FT_QNEW_ARRAY( fi->KernPairs, fi->NumKernPair ) )\n        return error;\n    }\n\n    while ( ( key = afm_parser_next_key( parser, 1, &len ) ) != 0 )\n    {\n      AFM_Token  token = afm_tokenize( key, len );\n\n\n      switch ( token )\n      {\n      case AFM_TOKEN_KP:\n      case AFM_TOKEN_KPX:\n      case AFM_TOKEN_KPY:\n        {\n          FT_Int        r;\n          AFM_ValueRec  shared_vals[4];\n\n\n          n++;\n\n          if ( n >= fi->NumKernPair )\n            goto Fail;\n\n          kp = fi->KernPairs + n;\n\n          shared_vals[0].type = AFM_VALUE_TYPE_INDEX;\n          shared_vals[1].type = AFM_VALUE_TYPE_INDEX;\n          shared_vals[2].type = AFM_VALUE_TYPE_INTEGER;\n          shared_vals[3].type = AFM_VALUE_TYPE_INTEGER;\n          r = afm_parser_read_vals( parser, shared_vals, 4 );\n          if ( r < 3 )\n            goto Fail;\n\n          kp->index1 = shared_vals[0].u.i;\n          kp->index2 = shared_vals[1].u.i;\n          if ( token == AFM_TOKEN_KPY )\n          {\n            kp->x = 0;\n            kp->y = shared_vals[2].u.i;\n          }\n          else\n          {\n            kp->x = shared_vals[2].u.i;\n            kp->y = ( token == AFM_TOKEN_KP && r == 4 )\n                      ? shared_vals[3].u.i : 0;\n          }\n        }\n        break;\n\n      case AFM_TOKEN_ENDKERNPAIRS:\n      case AFM_TOKEN_ENDKERNDATA:\n      case AFM_TOKEN_ENDFONTMETRICS:\n        fi->NumKernPair = n + 1;\n        ft_qsort( fi->KernPairs, fi->NumKernPair,\n                  sizeof ( AFM_KernPairRec ),\n                  afm_compare_kern_pairs );\n        return FT_Err_Ok;\n\n      case AFM_TOKEN_UNKNOWN:\n        break;\n\n      default:\n        goto Fail;\n      }\n    }\n\n  Fail:\n    return FT_THROW( Syntax_Error );\n  }\n\n\n  static FT_Error\n  afm_parse_kern_data( AFM_Parser  parser )\n  {\n    FT_Error   error;\n    char*      key;\n    FT_Offset  len;\n\n\n    while ( ( key = afm_parser_next_key( parser, 1, &len ) ) != 0 )\n    {\n      switch ( afm_tokenize( key, len ) )\n      {\n      case AFM_TOKEN_STARTTRACKKERN:\n        error = afm_parse_track_kern( parser );\n        if ( error )\n          return error;\n        break;\n\n      case AFM_TOKEN_STARTKERNPAIRS:\n      case AFM_TOKEN_STARTKERNPAIRS0:\n        error = afm_parse_kern_pairs( parser );\n        if ( error )\n          return error;\n        break;\n\n      case AFM_TOKEN_ENDKERNDATA:\n      case AFM_TOKEN_ENDFONTMETRICS:\n        return FT_Err_Ok;\n\n      case AFM_TOKEN_UNKNOWN:\n        break;\n\n      default:\n        goto Fail;\n      }\n    }\n\n  Fail:\n    return FT_THROW( Syntax_Error );\n  }\n\n\n  static FT_Error\n  afm_parser_skip_section( AFM_Parser  parser,\n                           FT_UInt     n,\n                           AFM_Token   end_section )\n  {\n    char*      key;\n    FT_Offset  len;\n\n\n    while ( n-- > 0 )\n    {\n      key = afm_parser_next_key( parser, 1, NULL );\n      if ( !key )\n        goto Fail;\n    }\n\n    while ( ( key = afm_parser_next_key( parser, 1, &len ) ) != 0 )\n    {\n      AFM_Token  token = afm_tokenize( key, len );\n\n\n      if ( token == end_section || token == AFM_TOKEN_ENDFONTMETRICS )\n        return FT_Err_Ok;\n    }\n\n  Fail:\n    return FT_THROW( Syntax_Error );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  afm_parser_parse( AFM_Parser  parser )\n  {\n    FT_Memory     memory = parser->memory;\n    AFM_FontInfo  fi     = parser->FontInfo;\n    FT_Error      error  = FT_ERR( Syntax_Error );\n    char*         key;\n    FT_Offset     len;\n    FT_Int        metrics_sets = 0;\n\n\n    if ( !fi )\n      return FT_THROW( Invalid_Argument );\n\n    key = afm_parser_next_key( parser, 1, &len );\n    if ( !key || len != 16                              ||\n         ft_strncmp( key, \"StartFontMetrics\", 16 ) != 0 )\n      return FT_THROW( Unknown_File_Format );\n\n    while ( ( key = afm_parser_next_key( parser, 1, &len ) ) != 0 )\n    {\n      AFM_ValueRec  shared_vals[4];\n\n\n      switch ( afm_tokenize( key, len ) )\n      {\n      case AFM_TOKEN_METRICSSETS:\n        if ( afm_parser_read_int( parser, &metrics_sets ) )\n          goto Fail;\n\n        if ( metrics_sets != 0 && metrics_sets != 2 )\n        {\n          error = FT_THROW( Unimplemented_Feature );\n\n          goto Fail;\n        }\n        break;\n\n      case AFM_TOKEN_ISCIDFONT:\n        shared_vals[0].type = AFM_VALUE_TYPE_BOOL;\n        if ( afm_parser_read_vals( parser, shared_vals, 1 ) != 1 )\n          goto Fail;\n\n        fi->IsCIDFont = shared_vals[0].u.b;\n        break;\n\n      case AFM_TOKEN_FONTBBOX:\n        shared_vals[0].type = AFM_VALUE_TYPE_FIXED;\n        shared_vals[1].type = AFM_VALUE_TYPE_FIXED;\n        shared_vals[2].type = AFM_VALUE_TYPE_FIXED;\n        shared_vals[3].type = AFM_VALUE_TYPE_FIXED;\n        if ( afm_parser_read_vals( parser, shared_vals, 4 ) != 4 )\n          goto Fail;\n\n        fi->FontBBox.xMin = shared_vals[0].u.f;\n        fi->FontBBox.yMin = shared_vals[1].u.f;\n        fi->FontBBox.xMax = shared_vals[2].u.f;\n        fi->FontBBox.yMax = shared_vals[3].u.f;\n        break;\n\n      case AFM_TOKEN_ASCENDER:\n        shared_vals[0].type = AFM_VALUE_TYPE_FIXED;\n        if ( afm_parser_read_vals( parser, shared_vals, 1 ) != 1 )\n          goto Fail;\n\n        fi->Ascender = shared_vals[0].u.f;\n        break;\n\n      case AFM_TOKEN_DESCENDER:\n        shared_vals[0].type = AFM_VALUE_TYPE_FIXED;\n        if ( afm_parser_read_vals( parser, shared_vals, 1 ) != 1 )\n          goto Fail;\n\n        fi->Descender = shared_vals[0].u.f;\n        break;\n\n      case AFM_TOKEN_STARTCHARMETRICS:\n        {\n          FT_Int  n = 0;\n\n\n          if ( afm_parser_read_int( parser, &n ) )\n            goto Fail;\n\n          error = afm_parser_skip_section( parser, n,\n                                           AFM_TOKEN_ENDCHARMETRICS );\n          if ( error )\n            return error;\n        }\n        break;\n\n      case AFM_TOKEN_STARTKERNDATA:\n        error = afm_parse_kern_data( parser );\n        if ( error )\n          goto Fail;\n        /* fall through since we only support kern data */\n\n      case AFM_TOKEN_ENDFONTMETRICS:\n        return FT_Err_Ok;\n\n      default:\n        break;\n      }\n    }\n\n  Fail:\n    FT_FREE( fi->TrackKerns );\n    fi->NumTrackKern = 0;\n\n    FT_FREE( fi->KernPairs );\n    fi->NumKernPair = 0;\n\n    fi->IsCIDFont = 0;\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/afmparse.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  afmparse.h                                                             */\n/*                                                                         */\n/*    AFM parser (specification).                                          */\n/*                                                                         */\n/*  Copyright 2006 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __AFMPARSE_H__\n#define __AFMPARSE_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error )\n  afm_parser_init( AFM_Parser  parser,\n                   FT_Memory   memory,\n                   FT_Byte*    base,\n                   FT_Byte*    limit );\n\n\n  FT_LOCAL( void )\n  afm_parser_done( AFM_Parser  parser );\n\n\n  FT_LOCAL( FT_Error )\n  afm_parser_parse( AFM_Parser  parser );\n\n\n  enum  AFM_ValueType_\n  {\n    AFM_VALUE_TYPE_STRING,\n    AFM_VALUE_TYPE_NAME,\n    AFM_VALUE_TYPE_FIXED,   /* real number */\n    AFM_VALUE_TYPE_INTEGER,\n    AFM_VALUE_TYPE_BOOL,\n    AFM_VALUE_TYPE_INDEX    /* glyph index */\n  };\n\n\n  typedef struct  AFM_ValueRec_\n  {\n    enum AFM_ValueType_  type;\n    union\n    {\n      char*     s;\n      FT_Fixed  f;\n      FT_Int    i;\n      FT_Bool   b;\n\n    } u;\n\n  } AFM_ValueRec, *AFM_Value;\n\n#define  AFM_MAX_ARGUMENTS  5\n\n  FT_LOCAL( FT_Int )\n  afm_parser_read_vals( AFM_Parser  parser,\n                        AFM_Value   vals,\n                        FT_UInt     n );\n\n  /* read the next key from the next line or column */\n  FT_LOCAL( char* )\n  afm_parser_next_key( AFM_Parser  parser,\n                       FT_Bool     line,\n                       FT_Offset*  len );\n\nFT_END_HEADER\n\n#endif /* __AFMPARSE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/psaux.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psaux.c                                                                */\n/*                                                                         */\n/*    FreeType auxiliary PostScript driver component (body only).          */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2006 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"psobjs.c\"\n#include \"psauxmod.c\"\n#include \"t1decode.c\"\n#include \"t1cmap.c\"\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n#include \"afmparse.c\"\n#endif\n\n#include \"psconv.c\"\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/psauxerr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psauxerr.h                                                             */\n/*                                                                         */\n/*    PS auxiliary module error codes (specification only).                */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the PS auxiliary module error enumeration */\n  /* constants.                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __PSAUXERR_H__\n#define __PSAUXERR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  PSaux_Err_\n#define FT_ERR_BASE    FT_Mod_Err_PSaux\n\n#include FT_ERRORS_H\n\n#endif /* __PSAUXERR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/psauxmod.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psauxmod.c                                                             */\n/*                                                                         */\n/*    FreeType auxiliary PostScript module implementation (body).          */\n/*                                                                         */\n/*  Copyright 2000-2001, 2002, 2003, 2006 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include \"psauxmod.h\"\n#include \"psobjs.h\"\n#include \"t1decode.h\"\n#include \"t1cmap.h\"\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n#include \"afmparse.h\"\n#endif\n\n\n  FT_CALLBACK_TABLE_DEF\n  const PS_Table_FuncsRec  ps_table_funcs =\n  {\n    ps_table_new,\n    ps_table_done,\n    ps_table_add,\n    ps_table_release\n  };\n\n\n  FT_CALLBACK_TABLE_DEF\n  const PS_Parser_FuncsRec  ps_parser_funcs =\n  {\n    ps_parser_init,\n    ps_parser_done,\n    ps_parser_skip_spaces,\n    ps_parser_skip_PS_token,\n    ps_parser_to_int,\n    ps_parser_to_fixed,\n    ps_parser_to_bytes,\n    ps_parser_to_coord_array,\n    ps_parser_to_fixed_array,\n    ps_parser_to_token,\n    ps_parser_to_token_array,\n    ps_parser_load_field,\n    ps_parser_load_field_table\n  };\n\n\n  FT_CALLBACK_TABLE_DEF\n  const T1_Builder_FuncsRec  t1_builder_funcs =\n  {\n    t1_builder_init,\n    t1_builder_done,\n    t1_builder_check_points,\n    t1_builder_add_point,\n    t1_builder_add_point1,\n    t1_builder_add_contour,\n    t1_builder_start_point,\n    t1_builder_close_contour\n  };\n\n\n  FT_CALLBACK_TABLE_DEF\n  const T1_Decoder_FuncsRec  t1_decoder_funcs =\n  {\n    t1_decoder_init,\n    t1_decoder_done,\n    t1_decoder_parse_charstrings\n  };\n\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n  FT_CALLBACK_TABLE_DEF\n  const AFM_Parser_FuncsRec  afm_parser_funcs =\n  {\n    afm_parser_init,\n    afm_parser_done,\n    afm_parser_parse\n  };\n#endif\n\n\n  FT_CALLBACK_TABLE_DEF\n  const T1_CMap_ClassesRec  t1_cmap_classes =\n  {\n    &t1_cmap_standard_class_rec,\n    &t1_cmap_expert_class_rec,\n    &t1_cmap_custom_class_rec,\n    &t1_cmap_unicode_class_rec\n  };\n\n\n  static\n  const PSAux_Interface  psaux_interface =\n  {\n    &ps_table_funcs,\n    &ps_parser_funcs,\n    &t1_builder_funcs,\n    &t1_decoder_funcs,\n    t1_decrypt,\n\n    (const T1_CMap_ClassesRec*) &t1_cmap_classes,\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n    &afm_parser_funcs,\n#else\n    0,\n#endif\n  };\n\n\n  FT_CALLBACK_TABLE_DEF\n  const FT_Module_Class  psaux_module_class =\n  {\n    0,\n    sizeof ( FT_ModuleRec ),\n    \"psaux\",\n    0x20000L,\n    0x20000L,\n\n    &psaux_interface,  /* module-specific interface */\n\n    (FT_Module_Constructor)0,\n    (FT_Module_Destructor) 0,\n    (FT_Module_Requester)  0\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/psauxmod.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psauxmod.h                                                             */\n/*                                                                         */\n/*    FreeType auxiliary PostScript module implementation (specification). */\n/*                                                                         */\n/*  Copyright 2000-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSAUXMOD_H__\n#define __PSAUXMOD_H__\n\n\n#include <ft2build.h>\n#include FT_MODULE_H\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n\n  FT_EXPORT_VAR( const FT_Module_Class )  psaux_driver_class;\n\n\nFT_END_HEADER\n\n#endif /* __PSAUXMOD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/psconv.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psconv.c                                                               */\n/*                                                                         */\n/*    Some convenience conversions (body).                                 */\n/*                                                                         */\n/*  Copyright 2006, 2008, 2009, 2012-2013 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n#include FT_INTERNAL_DEBUG_H\n\n#include \"psconv.h\"\n#include \"psauxerr.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_psconv\n\n\n  /* The following array is used by various functions to quickly convert */\n  /* digits (both decimal and non-decimal) into numbers.                 */\n\n#if 'A' == 65\n  /* ASCII */\n\n  static const FT_Char  ft_char_table[128] =\n  {\n    /* 0x00 */\n    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n     0,  1,  2,  3,  4,  5,  6,  7,  8,  9, -1, -1, -1, -1, -1, -1,\n    -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n    25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,\n    -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n    25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,\n  };\n\n  /* no character >= 0x80 can represent a valid number */\n#define OP  >=\n\n#endif /* 'A' == 65 */\n\n#if 'A' == 193\n  /* EBCDIC */\n\n  static const FT_Char  ft_char_table[128] =\n  {\n    /* 0x80 */\n    -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, -1,\n    -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1,\n    -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1,\n    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n    -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, -1,\n    -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1,\n    -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1,\n     0,  1,  2,  3,  4,  5,  6,  7,  8,  9, -1, -1, -1, -1, -1, -1,\n  };\n\n  /* no character < 0x80 can represent a valid number */\n#define OP  <\n\n#endif /* 'A' == 193 */\n\n\n  FT_LOCAL_DEF( FT_Long )\n  PS_Conv_Strtol( FT_Byte**  cursor,\n                  FT_Byte*   limit,\n                  FT_Long    base )\n  {\n    FT_Byte*  p = *cursor;\n\n    FT_Long   num           = 0;\n    FT_Bool   sign          = 0;\n    FT_Bool   have_overflow = 0;\n\n    FT_Long   num_limit;\n    FT_Char   c_limit;\n\n\n    if ( p >= limit )\n      goto Bad;\n\n    if ( base < 2 || base > 36 )\n    {\n      FT_TRACE4(( \"!!!INVALID BASE:!!!\" ));\n      return 0;\n    }\n\n    if ( *p == '-' || *p == '+' )\n    {\n      sign = FT_BOOL( *p == '-' );\n\n      p++;\n      if ( p == limit )\n        goto Bad;\n    }\n\n    num_limit = 0x7FFFFFFFL / base;\n    c_limit   = (FT_Char)( 0x7FFFFFFFL % base );\n\n    for ( ; p < limit; p++ )\n    {\n      FT_Char  c;\n\n\n      if ( IS_PS_SPACE( *p ) || *p OP 0x80 )\n        break;\n\n      c = ft_char_table[*p & 0x7F];\n\n      if ( c < 0 || c >= base )\n        break;\n\n      if ( num > num_limit || ( num == num_limit && c > c_limit ) )\n        have_overflow = 1;\n      else\n        num = num * base + c;\n    }\n\n    *cursor = p;\n\n    if ( have_overflow )\n    {\n      num = 0x7FFFFFFFL;\n      FT_TRACE4(( \"!!!OVERFLOW:!!!\" ));\n    }\n\n    if ( sign )\n      num = -num;\n\n    return num;\n\n  Bad:\n    FT_TRACE4(( \"!!!END OF DATA:!!!\" ));\n    return 0;\n  }\n\n\n  FT_LOCAL_DEF( FT_Long )\n  PS_Conv_ToInt( FT_Byte**  cursor,\n                 FT_Byte*   limit )\n\n  {\n    FT_Byte*  p = *cursor;\n    FT_Byte*  curp;\n\n    FT_Long   num;\n\n\n    curp = p;\n    num  = PS_Conv_Strtol( &p, limit, 10 );\n\n    if ( p == curp )\n      return 0;\n\n    if ( p < limit && *p == '#' )\n    {\n      p++;\n\n      curp = p;\n      num  = PS_Conv_Strtol( &p, limit, num );\n\n      if ( p == curp )\n        return 0;\n    }\n\n    *cursor = p;\n\n    return num;\n  }\n\n\n  FT_LOCAL_DEF( FT_Fixed )\n  PS_Conv_ToFixed( FT_Byte**  cursor,\n                   FT_Byte*   limit,\n                   FT_Long    power_ten )\n  {\n    FT_Byte*  p = *cursor;\n    FT_Byte*  curp;\n\n    FT_Fixed  integral = 0;\n    FT_Long   decimal  = 0;\n    FT_Long   divider  = 1;\n\n    FT_Bool   sign           = 0;\n    FT_Bool   have_overflow  = 0;\n    FT_Bool   have_underflow = 0;\n\n\n    if ( p >= limit )\n      goto Bad;\n\n    if ( *p == '-' || *p == '+' )\n    {\n      sign = FT_BOOL( *p == '-' );\n\n      p++;\n      if ( p == limit )\n        goto Bad;\n    }\n\n    /* read the integer part */\n    if ( *p != '.' )\n    {\n      curp     = p;\n      integral = PS_Conv_ToInt( &p, limit );\n\n      if ( p == curp )\n        return 0;\n\n      if ( integral > 0x7FFF )\n        have_overflow = 1;\n      else\n        integral = (FT_Fixed)( (FT_UInt32)integral << 16 );\n    }\n\n    /* read the decimal part */\n    if ( p < limit && *p == '.' )\n    {\n      p++;\n\n      for ( ; p < limit; p++ )\n      {\n        FT_Char  c;\n\n\n        if ( IS_PS_SPACE( *p ) || *p OP 0x80 )\n          break;\n\n        c = ft_char_table[*p & 0x7F];\n\n        if ( c < 0 || c >= 10 )\n          break;\n\n        /* only add digit if we don't overflow */\n        if ( divider < 0xCCCCCCCL && decimal < 0xCCCCCCCL )\n        {\n          decimal = decimal * 10 + c;\n\n          if ( !integral && power_ten > 0 )\n            power_ten--;\n          else\n            divider *= 10;\n        }\n      }\n    }\n\n    /* read exponent, if any */\n    if ( p + 1 < limit && ( *p == 'e' || *p == 'E' ) )\n    {\n      FT_Long  exponent;\n\n\n      p++;\n\n      curp     = p;\n      exponent = PS_Conv_ToInt( &p, limit );\n\n      if ( curp == p )\n        return 0;\n\n      /* arbitrarily limit exponent */\n      if ( exponent > 1000 )\n        have_overflow = 1;\n      else if ( exponent < -1000 )\n        have_underflow = 1;\n      else\n        power_ten += exponent;\n    }\n\n    *cursor = p;\n\n    if ( !integral && !decimal )\n      return 0;\n\n    if ( have_overflow )\n      goto Overflow;\n    if ( have_underflow )\n      goto Underflow;\n\n    while ( power_ten > 0 )\n    {\n      if ( integral >= 0xCCCCCCCL )\n        goto Overflow;\n      integral *= 10;\n\n      if ( decimal >= 0xCCCCCCCL )\n      {\n        if ( divider == 1 )\n          goto Overflow;\n        divider /= 10;\n      }\n      else\n        decimal *= 10;\n\n      power_ten--;\n    }\n\n    while ( power_ten < 0 )\n    {\n      integral /= 10;\n      if ( divider < 0xCCCCCCCL )\n        divider *= 10;\n      else\n        decimal /= 10;\n\n      if ( !integral && !decimal )\n        goto Underflow;\n\n      power_ten++;\n    }\n\n    if ( decimal )\n    {\n      decimal = FT_DivFix( decimal, divider );\n      /* it's not necessary to check this addition for overflow */\n      /* due to the structure of the real number representation */\n      integral += decimal;\n    }\n\n  Exit:\n    if ( sign )\n      integral = -integral;\n\n    return integral;\n\n  Bad:\n    FT_TRACE4(( \"!!!END OF DATA:!!!\" ));\n    return 0;\n\n  Overflow:\n    integral = 0x7FFFFFFFL;\n    FT_TRACE4(( \"!!!OVERFLOW:!!!\" ));\n    goto Exit;\n\n  Underflow:\n    FT_TRACE4(( \"!!!UNDERFLOW:!!!\" ));\n    return 0;\n  }\n\n\n#if 0\n  FT_LOCAL_DEF( FT_UInt )\n  PS_Conv_StringDecode( FT_Byte**  cursor,\n                        FT_Byte*   limit,\n                        FT_Byte*   buffer,\n                        FT_Offset  n )\n  {\n    FT_Byte*  p;\n    FT_UInt   r = 0;\n\n\n    for ( p = *cursor; r < n && p < limit; p++ )\n    {\n      FT_Byte  b;\n\n\n      if ( *p != '\\\\' )\n      {\n        buffer[r++] = *p;\n\n        continue;\n      }\n\n      p++;\n\n      switch ( *p )\n      {\n      case 'n':\n        b = '\\n';\n        break;\n      case 'r':\n        b = '\\r';\n        break;\n      case 't':\n        b = '\\t';\n        break;\n      case 'b':\n        b = '\\b';\n        break;\n      case 'f':\n        b = '\\f';\n        break;\n      case '\\r':\n        p++;\n        if ( *p != '\\n' )\n        {\n          b = *p;\n\n          break;\n        }\n        /* no break */\n      case '\\n':\n        continue;\n        break;\n      default:\n        if ( IS_PS_DIGIT( *p ) )\n        {\n          b = *p - '0';\n\n          p++;\n\n          if ( IS_PS_DIGIT( *p ) )\n          {\n            b = b * 8 + *p - '0';\n\n            p++;\n\n            if ( IS_PS_DIGIT( *p ) )\n              b = b * 8 + *p - '0';\n            else\n            {\n              buffer[r++] = b;\n              b = *p;\n            }\n          }\n          else\n          {\n            buffer[r++] = b;\n            b = *p;\n          }\n        }\n        else\n          b = *p;\n        break;\n      }\n\n      buffer[r++] = b;\n    }\n\n    *cursor = p;\n\n    return r;\n  }\n#endif /* 0 */\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  PS_Conv_ASCIIHexDecode( FT_Byte**  cursor,\n                          FT_Byte*   limit,\n                          FT_Byte*   buffer,\n                          FT_Offset  n )\n  {\n    FT_Byte*  p;\n    FT_UInt   r   = 0;\n    FT_UInt   w   = 0;\n    FT_UInt   pad = 0x01;\n\n\n    n *= 2;\n\n#if 1\n\n    p = *cursor;\n\n    if ( p >= limit )\n      return 0;\n\n    if ( n > (FT_UInt)( limit - p ) )\n      n = (FT_UInt)( limit - p );\n\n    /* we try to process two nibbles at a time to be as fast as possible */\n    for ( ; r < n; r++ )\n    {\n      FT_UInt  c = p[r];\n\n\n      if ( IS_PS_SPACE( c ) )\n        continue;\n\n      if ( c OP 0x80 )\n        break;\n\n      c = ft_char_table[c & 0x7F];\n      if ( (unsigned)c >= 16 )\n        break;\n\n      pad = ( pad << 4 ) | c;\n      if ( pad & 0x100 )\n      {\n        buffer[w++] = (FT_Byte)pad;\n        pad         = 0x01;\n      }\n    }\n\n    if ( pad != 0x01 )\n      buffer[w++] = (FT_Byte)( pad << 4 );\n\n    *cursor = p + r;\n\n    return w;\n\n#else /* 0 */\n\n    for ( r = 0; r < n; r++ )\n    {\n      FT_Char  c;\n\n\n      if ( IS_PS_SPACE( *p ) )\n        continue;\n\n      if ( *p OP 0x80 )\n        break;\n\n      c = ft_char_table[*p & 0x7F];\n\n      if ( (unsigned)c >= 16 )\n        break;\n\n      if ( r & 1 )\n      {\n        *buffer = (FT_Byte)(*buffer + c);\n        buffer++;\n      }\n      else\n        *buffer = (FT_Byte)(c << 4);\n\n      r++;\n    }\n\n    *cursor = p;\n\n    return ( r + 1 ) / 2;\n\n#endif /* 0 */\n\n  }\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  PS_Conv_EexecDecode( FT_Byte**   cursor,\n                       FT_Byte*    limit,\n                       FT_Byte*    buffer,\n                       FT_Offset   n,\n                       FT_UShort*  seed )\n  {\n    FT_Byte*  p;\n    FT_UInt   r;\n    FT_UInt   s = *seed;\n\n\n#if 1\n\n    p = *cursor;\n\n    if ( p >= limit )\n      return 0;\n\n    if ( n > (FT_UInt)(limit - p) )\n      n = (FT_UInt)(limit - p);\n\n    for ( r = 0; r < n; r++ )\n    {\n      FT_UInt  val = p[r];\n      FT_UInt  b   = ( val ^ ( s >> 8 ) );\n\n\n      s         = ( (val + s)*52845U + 22719 ) & 0xFFFFU;\n      buffer[r] = (FT_Byte) b;\n    }\n\n    *cursor = p + n;\n    *seed   = (FT_UShort)s;\n\n#else /* 0 */\n\n    for ( r = 0, p = *cursor; r < n && p < limit; r++, p++ )\n    {\n      FT_Byte  b = (FT_Byte)( *p ^ ( s >> 8 ) );\n\n\n      s = (FT_UShort)( ( *p + s ) * 52845U + 22719 );\n      *buffer++ = b;\n    }\n    *cursor = p;\n    *seed   = s;\n\n#endif /* 0 */\n\n    return r;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/psconv.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psconv.h                                                               */\n/*                                                                         */\n/*    Some convenience conversions (specification).                        */\n/*                                                                         */\n/*  Copyright 2006, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSCONV_H__\n#define __PSCONV_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Long )\n  PS_Conv_Strtol( FT_Byte**  cursor,\n                  FT_Byte*   limit,\n                  FT_Long    base );\n\n\n  FT_LOCAL( FT_Long )\n  PS_Conv_ToInt( FT_Byte**  cursor,\n                 FT_Byte*   limit );\n\n  FT_LOCAL( FT_Fixed )\n  PS_Conv_ToFixed( FT_Byte**  cursor,\n                   FT_Byte*   limit,\n                   FT_Long    power_ten );\n\n#if 0\n  FT_LOCAL( FT_UInt )\n  PS_Conv_StringDecode( FT_Byte**  cursor,\n                        FT_Byte*   limit,\n                        FT_Byte*   buffer,\n                        FT_Offset  n );\n#endif\n\n  FT_LOCAL( FT_UInt )\n  PS_Conv_ASCIIHexDecode( FT_Byte**  cursor,\n                          FT_Byte*   limit,\n                          FT_Byte*   buffer,\n                          FT_Offset  n );\n\n  FT_LOCAL( FT_UInt )\n  PS_Conv_EexecDecode( FT_Byte**   cursor,\n                       FT_Byte*    limit,\n                       FT_Byte*    buffer,\n                       FT_Offset   n,\n                       FT_UShort*  seed );\n\n\nFT_END_HEADER\n\n#endif /* __PSCONV_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/psobjs.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psobjs.c                                                               */\n/*                                                                         */\n/*    Auxiliary functions for PostScript fonts (body).                     */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_CALC_H\n\n#include \"psobjs.h\"\n#include \"psconv.h\"\n\n#include \"psauxerr.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_psobjs\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                             PS_TABLE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ps_table_new                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initializes a PS_Table.                                            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    table  :: The address of the target table.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    count  :: The table size = the maximum number of elements.         */\n  /*                                                                       */\n  /*    memory :: The memory object to use for all subsequent              */\n  /*              reallocations.                                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  ps_table_new( PS_Table   table,\n                FT_Int     count,\n                FT_Memory  memory )\n  {\n    FT_Error  error;\n\n\n    table->memory = memory;\n    if ( FT_NEW_ARRAY( table->elements, count ) ||\n         FT_NEW_ARRAY( table->lengths,  count ) )\n      goto Exit;\n\n    table->max_elems = count;\n    table->init      = 0xDEADBEEFUL;\n    table->num_elems = 0;\n    table->block     = 0;\n    table->capacity  = 0;\n    table->cursor    = 0;\n\n    *(PS_Table_FuncsRec*)&table->funcs = ps_table_funcs;\n\n  Exit:\n    if ( error )\n      FT_FREE( table->elements );\n\n    return error;\n  }\n\n\n  static void\n  shift_elements( PS_Table  table,\n                  FT_Byte*  old_base )\n  {\n    FT_PtrDist  delta  = table->block - old_base;\n    FT_Byte**   offset = table->elements;\n    FT_Byte**   limit  = offset + table->max_elems;\n\n\n    for ( ; offset < limit; offset++ )\n    {\n      if ( offset[0] )\n        offset[0] += delta;\n    }\n  }\n\n\n  static FT_Error\n  reallocate_t1_table( PS_Table   table,\n                       FT_Offset  new_size )\n  {\n    FT_Memory  memory   = table->memory;\n    FT_Byte*   old_base = table->block;\n    FT_Error   error;\n\n\n    /* allocate new base block */\n    if ( FT_ALLOC( table->block, new_size ) )\n    {\n      table->block = old_base;\n      return error;\n    }\n\n    /* copy elements and shift offsets */\n    if ( old_base )\n    {\n      FT_MEM_COPY( table->block, old_base, table->capacity );\n      shift_elements( table, old_base );\n      FT_FREE( old_base );\n    }\n\n    table->capacity = new_size;\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ps_table_add                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Adds an object to a PS_Table, possibly growing its memory block.   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    table  :: The target table.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    idx    :: The index of the object in the table.                    */\n  /*                                                                       */\n  /*    object :: The address of the object to copy in memory.             */\n  /*                                                                       */\n  /*    length :: The length in bytes of the source object.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.  An error is returned if a  */\n  /*    reallocation fails.                                                */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  ps_table_add( PS_Table    table,\n                FT_Int      idx,\n                void*       object,\n                FT_PtrDist  length )\n  {\n    if ( idx < 0 || idx >= table->max_elems )\n    {\n      FT_ERROR(( \"ps_table_add: invalid index\\n\" ));\n      return FT_THROW( Invalid_Argument );\n    }\n\n    if ( length < 0 )\n    {\n      FT_ERROR(( \"ps_table_add: invalid length\\n\" ));\n      return FT_THROW( Invalid_Argument );\n    }\n\n    /* grow the base block if needed */\n    if ( table->cursor + length > table->capacity )\n    {\n      FT_Error    error;\n      FT_Offset   new_size = table->capacity;\n      FT_PtrDist  in_offset;\n\n\n      in_offset = (FT_Byte*)object - table->block;\n      if ( in_offset < 0 || (FT_Offset)in_offset >= table->capacity )\n        in_offset = -1;\n\n      while ( new_size < table->cursor + length )\n      {\n        /* increase size by 25% and round up to the nearest multiple\n           of 1024 */\n        new_size += ( new_size >> 2 ) + 1;\n        new_size  = FT_PAD_CEIL( new_size, 1024 );\n      }\n\n      error = reallocate_t1_table( table, new_size );\n      if ( error )\n        return error;\n\n      if ( in_offset >= 0 )\n        object = table->block + in_offset;\n    }\n\n    /* add the object to the base block and adjust offset */\n    table->elements[idx] = table->block + table->cursor;\n    table->lengths [idx] = length;\n    FT_MEM_COPY( table->block + table->cursor, object, length );\n\n    table->cursor += length;\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ps_table_done                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finalizes a PS_TableRec (i.e., reallocate it to its current        */\n  /*    cursor).                                                           */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    table :: The target table.                                         */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function does NOT release the heap's memory block.  It is up  */\n  /*    to the caller to clean it, or reference it in its own structures.  */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  ps_table_done( PS_Table  table )\n  {\n    FT_Memory  memory = table->memory;\n    FT_Error   error;\n    FT_Byte*   old_base = table->block;\n\n\n    /* should never fail, because rec.cursor <= rec.size */\n    if ( !old_base )\n      return;\n\n    if ( FT_ALLOC( table->block, table->cursor ) )\n      return;\n    FT_MEM_COPY( table->block, old_base, table->cursor );\n    shift_elements( table, old_base );\n\n    table->capacity = table->cursor;\n    FT_FREE( old_base );\n\n    FT_UNUSED( error );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  ps_table_release( PS_Table  table )\n  {\n    FT_Memory  memory = table->memory;\n\n\n    if ( (FT_ULong)table->init == 0xDEADBEEFUL )\n    {\n      FT_FREE( table->block );\n      FT_FREE( table->elements );\n      FT_FREE( table->lengths );\n      table->init = 0;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                            T1 PARSER                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* first character must be already part of the comment */\n\n  static void\n  skip_comment( FT_Byte*  *acur,\n                FT_Byte*   limit )\n  {\n    FT_Byte*  cur = *acur;\n\n\n    while ( cur < limit )\n    {\n      if ( IS_PS_NEWLINE( *cur ) )\n        break;\n      cur++;\n    }\n\n    *acur = cur;\n  }\n\n\n  static void\n  skip_spaces( FT_Byte*  *acur,\n               FT_Byte*   limit )\n  {\n    FT_Byte*  cur = *acur;\n\n\n    while ( cur < limit )\n    {\n      if ( !IS_PS_SPACE( *cur ) )\n      {\n        if ( *cur == '%' )\n          /* According to the PLRM, a comment is equal to a space. */\n          skip_comment( &cur, limit );\n        else\n          break;\n      }\n      cur++;\n    }\n\n    *acur = cur;\n  }\n\n\n#define IS_OCTAL_DIGIT( c ) ( '0' <= (c) && (c) <= '7' )\n\n\n  /* first character must be `(';                               */\n  /* *acur is positioned at the character after the closing `)' */\n\n  static FT_Error\n  skip_literal_string( FT_Byte*  *acur,\n                       FT_Byte*   limit )\n  {\n    FT_Byte*      cur   = *acur;\n    FT_Int        embed = 0;\n    FT_Error      error = FT_ERR( Invalid_File_Format );\n    unsigned int  i;\n\n\n    while ( cur < limit )\n    {\n      FT_Byte  c = *cur;\n\n\n      ++cur;\n\n      if ( c == '\\\\' )\n      {\n        /* Red Book 3rd ed., section `Literal Text Strings', p. 29:     */\n        /* A backslash can introduce three different types              */\n        /* of escape sequences:                                         */\n        /*   - a special escaped char like \\r, \\n, etc.                 */\n        /*   - a one-, two-, or three-digit octal number                */\n        /*   - none of the above in which case the backslash is ignored */\n\n        if ( cur == limit )\n          /* error (or to be ignored?) */\n          break;\n\n        switch ( *cur )\n        {\n          /* skip `special' escape */\n        case 'n':\n        case 'r':\n        case 't':\n        case 'b':\n        case 'f':\n        case '\\\\':\n        case '(':\n        case ')':\n          ++cur;\n          break;\n\n        default:\n          /* skip octal escape or ignore backslash */\n          for ( i = 0; i < 3 && cur < limit; ++i )\n          {\n            if ( !IS_OCTAL_DIGIT( *cur ) )\n              break;\n\n            ++cur;\n          }\n        }\n      }\n      else if ( c == '(' )\n        embed++;\n      else if ( c == ')' )\n      {\n        embed--;\n        if ( embed == 0 )\n        {\n          error = FT_Err_Ok;\n          break;\n        }\n      }\n    }\n\n    *acur = cur;\n\n    return error;\n  }\n\n\n  /* first character must be `<' */\n\n  static FT_Error\n  skip_string( FT_Byte*  *acur,\n               FT_Byte*   limit )\n  {\n    FT_Byte*  cur = *acur;\n    FT_Error  err =  FT_Err_Ok;\n\n\n    while ( ++cur < limit )\n    {\n      /* All whitespace characters are ignored. */\n      skip_spaces( &cur, limit );\n      if ( cur >= limit )\n        break;\n\n      if ( !IS_PS_XDIGIT( *cur ) )\n        break;\n    }\n\n    if ( cur < limit && *cur != '>' )\n    {\n      FT_ERROR(( \"skip_string: missing closing delimiter `>'\\n\" ));\n      err = FT_THROW( Invalid_File_Format );\n    }\n    else\n      cur++;\n\n    *acur = cur;\n    return err;\n  }\n\n\n  /* first character must be the opening brace that */\n  /* starts the procedure                           */\n\n  /* NB: [ and ] need not match:                    */\n  /* `/foo {[} def' is a valid PostScript fragment, */\n  /* even within a Type1 font                       */\n\n  static FT_Error\n  skip_procedure( FT_Byte*  *acur,\n                  FT_Byte*   limit )\n  {\n    FT_Byte*  cur;\n    FT_Int    embed = 0;\n    FT_Error  error = FT_Err_Ok;\n\n\n    FT_ASSERT( **acur == '{' );\n\n    for ( cur = *acur; cur < limit && error == FT_Err_Ok; ++cur )\n    {\n      switch ( *cur )\n      {\n      case '{':\n        ++embed;\n        break;\n\n      case '}':\n        --embed;\n        if ( embed == 0 )\n        {\n          ++cur;\n          goto end;\n        }\n        break;\n\n      case '(':\n        error = skip_literal_string( &cur, limit );\n        break;\n\n      case '<':\n        error = skip_string( &cur, limit );\n        break;\n\n      case '%':\n        skip_comment( &cur, limit );\n        break;\n      }\n    }\n\n  end:\n    if ( embed != 0 )\n      error = FT_THROW( Invalid_File_Format );\n\n    *acur = cur;\n\n    return error;\n  }\n\n\n  /***********************************************************************/\n  /*                                                                     */\n  /* All exported parsing routines handle leading whitespace and stop at */\n  /* the first character which isn't part of the just handled token.     */\n  /*                                                                     */\n  /***********************************************************************/\n\n\n  FT_LOCAL_DEF( void )\n  ps_parser_skip_PS_token( PS_Parser  parser )\n  {\n    /* Note: PostScript allows any non-delimiting, non-whitespace        */\n    /*       character in a name (PS Ref Manual, 3rd ed, p31).           */\n    /*       PostScript delimiters are (, ), <, >, [, ], {, }, /, and %. */\n\n    FT_Byte*  cur   = parser->cursor;\n    FT_Byte*  limit = parser->limit;\n    FT_Error  error = FT_Err_Ok;\n\n\n    skip_spaces( &cur, limit );             /* this also skips comments */\n    if ( cur >= limit )\n      goto Exit;\n\n    /* self-delimiting, single-character tokens */\n    if ( *cur == '[' || *cur == ']' )\n    {\n      cur++;\n      goto Exit;\n    }\n\n    /* skip balanced expressions (procedures and strings) */\n\n    if ( *cur == '{' )                              /* {...} */\n    {\n      error = skip_procedure( &cur, limit );\n      goto Exit;\n    }\n\n    if ( *cur == '(' )                              /* (...) */\n    {\n      error = skip_literal_string( &cur, limit );\n      goto Exit;\n    }\n\n    if ( *cur == '<' )                              /* <...> */\n    {\n      if ( cur + 1 < limit && *(cur + 1) == '<' )   /* << */\n      {\n        cur++;\n        cur++;\n      }\n      else\n        error = skip_string( &cur, limit );\n\n      goto Exit;\n    }\n\n    if ( *cur == '>' )\n    {\n      cur++;\n      if ( cur >= limit || *cur != '>' )             /* >> */\n      {\n        FT_ERROR(( \"ps_parser_skip_PS_token:\"\n                   \" unexpected closing delimiter `>'\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n      cur++;\n      goto Exit;\n    }\n\n    if ( *cur == '/' )\n      cur++;\n\n    /* anything else */\n    while ( cur < limit )\n    {\n      /* *cur might be invalid (e.g., ')' or '}'), but this   */\n      /* is handled by the test `cur == parser->cursor' below */\n      if ( IS_PS_DELIM( *cur ) )\n        break;\n\n      cur++;\n    }\n\n  Exit:\n    if ( cur < limit && cur == parser->cursor )\n    {\n      FT_ERROR(( \"ps_parser_skip_PS_token:\"\n                 \" current token is `%c' which is self-delimiting\\n\"\n                 \"                        \"\n                 \" but invalid at this point\\n\",\n                 *cur ));\n\n      error = FT_THROW( Invalid_File_Format );\n    }\n\n    parser->error  = error;\n    parser->cursor = cur;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  ps_parser_skip_spaces( PS_Parser  parser )\n  {\n    skip_spaces( &parser->cursor, parser->limit );\n  }\n\n\n  /* `token' here means either something between balanced delimiters */\n  /* or the next token; the delimiters are not removed.              */\n\n  FT_LOCAL_DEF( void )\n  ps_parser_to_token( PS_Parser  parser,\n                      T1_Token   token )\n  {\n    FT_Byte*  cur;\n    FT_Byte*  limit;\n    FT_Int    embed;\n\n\n    token->type  = T1_TOKEN_TYPE_NONE;\n    token->start = 0;\n    token->limit = 0;\n\n    /* first of all, skip leading whitespace */\n    ps_parser_skip_spaces( parser );\n\n    cur   = parser->cursor;\n    limit = parser->limit;\n\n    if ( cur >= limit )\n      return;\n\n    switch ( *cur )\n    {\n      /************* check for literal string *****************/\n    case '(':\n      token->type  = T1_TOKEN_TYPE_STRING;\n      token->start = cur;\n\n      if ( skip_literal_string( &cur, limit ) == FT_Err_Ok )\n        token->limit = cur;\n      break;\n\n      /************* check for programs/array *****************/\n    case '{':\n      token->type  = T1_TOKEN_TYPE_ARRAY;\n      token->start = cur;\n\n      if ( skip_procedure( &cur, limit ) == FT_Err_Ok )\n        token->limit = cur;\n      break;\n\n      /************* check for table/array ********************/\n      /* XXX: in theory we should also look for \"<<\"          */\n      /*      since this is semantically equivalent to \"[\";   */\n      /*      in practice it doesn't matter (?)               */\n    case '[':\n      token->type  = T1_TOKEN_TYPE_ARRAY;\n      embed        = 1;\n      token->start = cur++;\n\n      /* we need this to catch `[ ]' */\n      parser->cursor = cur;\n      ps_parser_skip_spaces( parser );\n      cur = parser->cursor;\n\n      while ( cur < limit && !parser->error )\n      {\n        /* XXX: this is wrong because it does not      */\n        /*      skip comments, procedures, and strings */\n        if ( *cur == '[' )\n          embed++;\n        else if ( *cur == ']' )\n        {\n          embed--;\n          if ( embed <= 0 )\n          {\n            token->limit = ++cur;\n            break;\n          }\n        }\n\n        parser->cursor = cur;\n        ps_parser_skip_PS_token( parser );\n        /* we need this to catch `[XXX ]' */\n        ps_parser_skip_spaces  ( parser );\n        cur = parser->cursor;\n      }\n      break;\n\n      /* ************ otherwise, it is any token **************/\n    default:\n      token->start = cur;\n      token->type  = ( *cur == '/' ? T1_TOKEN_TYPE_KEY : T1_TOKEN_TYPE_ANY );\n      ps_parser_skip_PS_token( parser );\n      cur = parser->cursor;\n      if ( !parser->error )\n        token->limit = cur;\n    }\n\n    if ( !token->limit )\n    {\n      token->start = 0;\n      token->type  = T1_TOKEN_TYPE_NONE;\n    }\n\n    parser->cursor = cur;\n  }\n\n\n  /* NB: `tokens' can be NULL if we only want to count */\n  /* the number of array elements                      */\n\n  FT_LOCAL_DEF( void )\n  ps_parser_to_token_array( PS_Parser  parser,\n                            T1_Token   tokens,\n                            FT_UInt    max_tokens,\n                            FT_Int*    pnum_tokens )\n  {\n    T1_TokenRec  master;\n\n\n    *pnum_tokens = -1;\n\n    /* this also handles leading whitespace */\n    ps_parser_to_token( parser, &master );\n\n    if ( master.type == T1_TOKEN_TYPE_ARRAY )\n    {\n      FT_Byte*  old_cursor = parser->cursor;\n      FT_Byte*  old_limit  = parser->limit;\n      T1_Token  cur        = tokens;\n      T1_Token  limit      = cur + max_tokens;\n\n\n      /* don't include outermost delimiters */\n      parser->cursor = master.start + 1;\n      parser->limit  = master.limit - 1;\n\n      while ( parser->cursor < parser->limit )\n      {\n        T1_TokenRec  token;\n\n\n        ps_parser_to_token( parser, &token );\n        if ( !token.type )\n          break;\n\n        if ( tokens != NULL && cur < limit )\n          *cur = token;\n\n        cur++;\n      }\n\n      *pnum_tokens = (FT_Int)( cur - tokens );\n\n      parser->cursor = old_cursor;\n      parser->limit  = old_limit;\n    }\n  }\n\n\n  /* first character must be a delimiter or a part of a number */\n  /* NB: `coords' can be NULL if we just want to skip the      */\n  /*     array; in this case we ignore `max_coords'            */\n\n  static FT_Int\n  ps_tocoordarray( FT_Byte*  *acur,\n                   FT_Byte*   limit,\n                   FT_Int     max_coords,\n                   FT_Short*  coords )\n  {\n    FT_Byte*  cur   = *acur;\n    FT_Int    count = 0;\n    FT_Byte   c, ender;\n\n\n    if ( cur >= limit )\n      goto Exit;\n\n    /* check for the beginning of an array; otherwise, only one number */\n    /* will be read                                                    */\n    c     = *cur;\n    ender = 0;\n\n    if ( c == '[' )\n      ender = ']';\n    else if ( c == '{' )\n      ender = '}';\n\n    if ( ender )\n      cur++;\n\n    /* now, read the coordinates */\n    while ( cur < limit )\n    {\n      FT_Short  dummy;\n      FT_Byte*  old_cur;\n\n\n      /* skip whitespace in front of data */\n      skip_spaces( &cur, limit );\n      if ( cur >= limit )\n        goto Exit;\n\n      if ( *cur == ender )\n      {\n        cur++;\n        break;\n      }\n\n      old_cur = cur;\n\n      if ( coords != NULL && count >= max_coords )\n        break;\n\n      /* call PS_Conv_ToFixed() even if coords == NULL */\n      /* to properly parse number at `cur'             */\n      *( coords != NULL ? &coords[count] : &dummy ) =\n        (FT_Short)( PS_Conv_ToFixed( &cur, limit, 0 ) >> 16 );\n\n      if ( old_cur == cur )\n      {\n        count = -1;\n        goto Exit;\n      }\n      else\n        count++;\n\n      if ( !ender )\n        break;\n    }\n\n  Exit:\n    *acur = cur;\n    return count;\n  }\n\n\n  /* first character must be a delimiter or a part of a number */\n  /* NB: `values' can be NULL if we just want to skip the      */\n  /*     array; in this case we ignore `max_values'            */\n  /*                                                           */\n  /* return number of successfully parsed values               */\n\n  static FT_Int\n  ps_tofixedarray( FT_Byte*  *acur,\n                   FT_Byte*   limit,\n                   FT_Int     max_values,\n                   FT_Fixed*  values,\n                   FT_Int     power_ten )\n  {\n    FT_Byte*  cur   = *acur;\n    FT_Int    count = 0;\n    FT_Byte   c, ender;\n\n\n    if ( cur >= limit )\n      goto Exit;\n\n    /* Check for the beginning of an array.  Otherwise, only one number */\n    /* will be read.                                                    */\n    c     = *cur;\n    ender = 0;\n\n    if ( c == '[' )\n      ender = ']';\n    else if ( c == '{' )\n      ender = '}';\n\n    if ( ender )\n      cur++;\n\n    /* now, read the values */\n    while ( cur < limit )\n    {\n      FT_Fixed  dummy;\n      FT_Byte*  old_cur;\n\n\n      /* skip whitespace in front of data */\n      skip_spaces( &cur, limit );\n      if ( cur >= limit )\n        goto Exit;\n\n      if ( *cur == ender )\n      {\n        cur++;\n        break;\n      }\n\n      old_cur = cur;\n\n      if ( values != NULL && count >= max_values )\n        break;\n\n      /* call PS_Conv_ToFixed() even if coords == NULL */\n      /* to properly parse number at `cur'             */\n      *( values != NULL ? &values[count] : &dummy ) =\n        PS_Conv_ToFixed( &cur, limit, power_ten );\n\n      if ( old_cur == cur )\n      {\n        count = -1;\n        goto Exit;\n      }\n      else\n        count++;\n\n      if ( !ender )\n        break;\n    }\n\n  Exit:\n    *acur = cur;\n    return count;\n  }\n\n\n#if 0\n\n  static FT_String*\n  ps_tostring( FT_Byte**  cursor,\n               FT_Byte*   limit,\n               FT_Memory  memory )\n  {\n    FT_Byte*    cur = *cursor;\n    FT_PtrDist  len = 0;\n    FT_Int      count;\n    FT_String*  result;\n    FT_Error    error;\n\n\n    /* XXX: some stupid fonts have a `Notice' or `Copyright' string     */\n    /*      that simply doesn't begin with an opening parenthesis, even */\n    /*      though they have a closing one!  E.g. \"amuncial.pfb\"        */\n    /*                                                                  */\n    /*      We must deal with these ill-fated cases there.  Note that   */\n    /*      these fonts didn't work with the old Type 1 driver as the   */\n    /*      notice/copyright was not recognized as a valid string token */\n    /*      and made the old token parser commit errors.                */\n\n    while ( cur < limit && ( *cur == ' ' || *cur == '\\t' ) )\n      cur++;\n    if ( cur + 1 >= limit )\n      return 0;\n\n    if ( *cur == '(' )\n      cur++;  /* skip the opening parenthesis, if there is one */\n\n    *cursor = cur;\n    count   = 0;\n\n    /* then, count its length */\n    for ( ; cur < limit; cur++ )\n    {\n      if ( *cur == '(' )\n        count++;\n\n      else if ( *cur == ')' )\n      {\n        count--;\n        if ( count < 0 )\n          break;\n      }\n    }\n\n    len = cur - *cursor;\n    if ( cur >= limit || FT_ALLOC( result, len + 1 ) )\n      return 0;\n\n    /* now copy the string */\n    FT_MEM_COPY( result, *cursor, len );\n    result[len] = '\\0';\n    *cursor = cur;\n    return result;\n  }\n\n#endif /* 0 */\n\n\n  static int\n  ps_tobool( FT_Byte*  *acur,\n             FT_Byte*   limit )\n  {\n    FT_Byte*  cur    = *acur;\n    FT_Bool   result = 0;\n\n\n    /* return 1 if we find `true', 0 otherwise */\n    if ( cur + 3 < limit &&\n         cur[0] == 't'   &&\n         cur[1] == 'r'   &&\n         cur[2] == 'u'   &&\n         cur[3] == 'e'   )\n    {\n      result = 1;\n      cur   += 5;\n    }\n    else if ( cur + 4 < limit &&\n              cur[0] == 'f'   &&\n              cur[1] == 'a'   &&\n              cur[2] == 'l'   &&\n              cur[3] == 's'   &&\n              cur[4] == 'e'   )\n    {\n      result = 0;\n      cur   += 6;\n    }\n\n    *acur = cur;\n    return result;\n  }\n\n\n  /* load a simple field (i.e. non-table) into the current list of objects */\n\n  FT_LOCAL_DEF( FT_Error )\n  ps_parser_load_field( PS_Parser       parser,\n                        const T1_Field  field,\n                        void**          objects,\n                        FT_UInt         max_objects,\n                        FT_ULong*       pflags )\n  {\n    T1_TokenRec   token;\n    FT_Byte*      cur;\n    FT_Byte*      limit;\n    FT_UInt       count;\n    FT_UInt       idx;\n    FT_Error      error;\n    T1_FieldType  type;\n\n\n    /* this also skips leading whitespace */\n    ps_parser_to_token( parser, &token );\n    if ( !token.type )\n      goto Fail;\n\n    count = 1;\n    idx   = 0;\n    cur   = token.start;\n    limit = token.limit;\n\n    type = field->type;\n\n    /* we must detect arrays in /FontBBox */\n    if ( type == T1_FIELD_TYPE_BBOX )\n    {\n      T1_TokenRec  token2;\n      FT_Byte*     old_cur   = parser->cursor;\n      FT_Byte*     old_limit = parser->limit;\n\n\n      /* don't include delimiters */\n      parser->cursor = token.start + 1;\n      parser->limit  = token.limit - 1;\n\n      ps_parser_to_token( parser, &token2 );\n      parser->cursor = old_cur;\n      parser->limit  = old_limit;\n\n      if ( token2.type == T1_TOKEN_TYPE_ARRAY )\n      {\n        type = T1_FIELD_TYPE_MM_BBOX;\n        goto FieldArray;\n      }\n    }\n    else if ( token.type == T1_TOKEN_TYPE_ARRAY )\n    {\n      count = max_objects;\n\n    FieldArray:\n      /* if this is an array and we have no blend, an error occurs */\n      if ( max_objects == 0 )\n        goto Fail;\n\n      idx = 1;\n\n      /* don't include delimiters */\n      cur++;\n      limit--;\n    }\n\n    for ( ; count > 0; count--, idx++ )\n    {\n      FT_Byte*    q = (FT_Byte*)objects[idx] + field->offset;\n      FT_Long     val;\n      FT_String*  string;\n\n\n      skip_spaces( &cur, limit );\n\n      switch ( type )\n      {\n      case T1_FIELD_TYPE_BOOL:\n        val = ps_tobool( &cur, limit );\n        goto Store_Integer;\n\n      case T1_FIELD_TYPE_FIXED:\n        val = PS_Conv_ToFixed( &cur, limit, 0 );\n        goto Store_Integer;\n\n      case T1_FIELD_TYPE_FIXED_1000:\n        val = PS_Conv_ToFixed( &cur, limit, 3 );\n        goto Store_Integer;\n\n      case T1_FIELD_TYPE_INTEGER:\n        val = PS_Conv_ToInt( &cur, limit );\n        /* fall through */\n\n      Store_Integer:\n        switch ( field->size )\n        {\n        case (8 / FT_CHAR_BIT):\n          *(FT_Byte*)q = (FT_Byte)val;\n          break;\n\n        case (16 / FT_CHAR_BIT):\n          *(FT_UShort*)q = (FT_UShort)val;\n          break;\n\n        case (32 / FT_CHAR_BIT):\n          *(FT_UInt32*)q = (FT_UInt32)val;\n          break;\n\n        default:                /* for 64-bit systems */\n          *(FT_Long*)q = val;\n        }\n        break;\n\n      case T1_FIELD_TYPE_STRING:\n      case T1_FIELD_TYPE_KEY:\n        {\n          FT_Memory  memory = parser->memory;\n          FT_UInt    len    = (FT_UInt)( limit - cur );\n\n\n          if ( cur >= limit )\n            break;\n\n          /* we allow both a string or a name   */\n          /* for cases like /FontName (foo) def */\n          if ( token.type == T1_TOKEN_TYPE_KEY )\n          {\n            /* don't include leading `/' */\n            len--;\n            cur++;\n          }\n          else if ( token.type == T1_TOKEN_TYPE_STRING )\n          {\n            /* don't include delimiting parentheses    */\n            /* XXX we don't handle <<...>> here        */\n            /* XXX should we convert octal escapes?    */\n            /*     if so, what encoding should we use? */\n            cur++;\n            len -= 2;\n          }\n          else\n          {\n            FT_ERROR(( \"ps_parser_load_field:\"\n                       \" expected a name or string\\n\"\n                       \"                     \"\n                       \" but found token of type %d instead\\n\",\n                       token.type ));\n            error = FT_THROW( Invalid_File_Format );\n            goto Exit;\n          }\n\n          /* for this to work (FT_String**)q must have been */\n          /* initialized to NULL                            */\n          if ( *(FT_String**)q != NULL )\n          {\n            FT_TRACE0(( \"ps_parser_load_field: overwriting field %s\\n\",\n                        field->ident ));\n            FT_FREE( *(FT_String**)q );\n            *(FT_String**)q = NULL;\n          }\n\n          if ( FT_ALLOC( string, len + 1 ) )\n            goto Exit;\n\n          FT_MEM_COPY( string, cur, len );\n          string[len] = 0;\n\n          *(FT_String**)q = string;\n        }\n        break;\n\n      case T1_FIELD_TYPE_BBOX:\n        {\n          FT_Fixed  temp[4];\n          FT_BBox*  bbox = (FT_BBox*)q;\n          FT_Int    result;\n\n\n          result = ps_tofixedarray( &cur, limit, 4, temp, 0 );\n\n          if ( result < 4 )\n          {\n            FT_ERROR(( \"ps_parser_load_field:\"\n                       \" expected four integers in bounding box\\n\" ));\n            error = FT_THROW( Invalid_File_Format );\n            goto Exit;\n          }\n\n          bbox->xMin = FT_RoundFix( temp[0] );\n          bbox->yMin = FT_RoundFix( temp[1] );\n          bbox->xMax = FT_RoundFix( temp[2] );\n          bbox->yMax = FT_RoundFix( temp[3] );\n        }\n        break;\n\n      case T1_FIELD_TYPE_MM_BBOX:\n        {\n          FT_Memory  memory = parser->memory;\n          FT_Fixed*  temp;\n          FT_Int     result;\n          FT_UInt    i;\n\n\n          if ( FT_NEW_ARRAY( temp, max_objects * 4 ) )\n            goto Exit;\n\n          for ( i = 0; i < 4; i++ )\n          {\n            result = ps_tofixedarray( &cur, limit, max_objects,\n                                      temp + i * max_objects, 0 );\n            if ( result < 0 || (FT_UInt)result < max_objects )\n            {\n              FT_ERROR(( \"ps_parser_load_field:\"\n                         \" expected %d integers in the %s subarray\\n\"\n                         \"                     \"\n                         \" of /FontBBox in the /Blend dictionary\\n\",\n                         max_objects,\n                         i == 0 ? \"first\"\n                                : ( i == 1 ? \"second\"\n                                           : ( i == 2 ? \"third\"\n                                                      : \"fourth\" ) ) ));\n              error = FT_THROW( Invalid_File_Format );\n              goto Exit;\n            }\n\n            skip_spaces( &cur, limit );\n          }\n\n          for ( i = 0; i < max_objects; i++ )\n          {\n            FT_BBox*  bbox = (FT_BBox*)objects[i];\n\n\n            bbox->xMin = FT_RoundFix( temp[i                  ] );\n            bbox->yMin = FT_RoundFix( temp[i +     max_objects] );\n            bbox->xMax = FT_RoundFix( temp[i + 2 * max_objects] );\n            bbox->yMax = FT_RoundFix( temp[i + 3 * max_objects] );\n          }\n\n          FT_FREE( temp );\n        }\n        break;\n\n      default:\n        /* an error occurred */\n        goto Fail;\n      }\n    }\n\n#if 0  /* obsolete -- keep for reference */\n    if ( pflags )\n      *pflags |= 1L << field->flag_bit;\n#else\n    FT_UNUSED( pflags );\n#endif\n\n    error = FT_Err_Ok;\n\n  Exit:\n    return error;\n\n  Fail:\n    error = FT_THROW( Invalid_File_Format );\n    goto Exit;\n  }\n\n\n#define T1_MAX_TABLE_ELEMENTS  32\n\n\n  FT_LOCAL_DEF( FT_Error )\n  ps_parser_load_field_table( PS_Parser       parser,\n                              const T1_Field  field,\n                              void**          objects,\n                              FT_UInt         max_objects,\n                              FT_ULong*       pflags )\n  {\n    T1_TokenRec  elements[T1_MAX_TABLE_ELEMENTS];\n    T1_Token     token;\n    FT_Int       num_elements;\n    FT_Error     error = FT_Err_Ok;\n    FT_Byte*     old_cursor;\n    FT_Byte*     old_limit;\n    T1_FieldRec  fieldrec = *(T1_Field)field;\n\n\n    fieldrec.type = T1_FIELD_TYPE_INTEGER;\n    if ( field->type == T1_FIELD_TYPE_FIXED_ARRAY ||\n         field->type == T1_FIELD_TYPE_BBOX        )\n      fieldrec.type = T1_FIELD_TYPE_FIXED;\n\n    ps_parser_to_token_array( parser, elements,\n                              T1_MAX_TABLE_ELEMENTS, &num_elements );\n    if ( num_elements < 0 )\n    {\n      error = FT_ERR( Ignore );\n      goto Exit;\n    }\n    if ( (FT_UInt)num_elements > field->array_max )\n      num_elements = field->array_max;\n\n    old_cursor = parser->cursor;\n    old_limit  = parser->limit;\n\n    /* we store the elements count if necessary;           */\n    /* we further assume that `count_offset' can't be zero */\n    if ( field->type != T1_FIELD_TYPE_BBOX && field->count_offset != 0 )\n      *(FT_Byte*)( (FT_Byte*)objects[0] + field->count_offset ) =\n        (FT_Byte)num_elements;\n\n    /* we now load each element, adjusting the field.offset on each one */\n    token = elements;\n    for ( ; num_elements > 0; num_elements--, token++ )\n    {\n      parser->cursor = token->start;\n      parser->limit  = token->limit;\n\n      error = ps_parser_load_field( parser,\n                                    &fieldrec,\n                                    objects,\n                                    max_objects,\n                                    0 );\n      if ( error )\n        break;\n\n      fieldrec.offset += fieldrec.size;\n    }\n\n#if 0  /* obsolete -- keep for reference */\n    if ( pflags )\n      *pflags |= 1L << field->flag_bit;\n#else\n    FT_UNUSED( pflags );\n#endif\n\n    parser->cursor = old_cursor;\n    parser->limit  = old_limit;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Long )\n  ps_parser_to_int( PS_Parser  parser )\n  {\n    ps_parser_skip_spaces( parser );\n    return PS_Conv_ToInt( &parser->cursor, parser->limit );\n  }\n\n\n  /* first character must be `<' if `delimiters' is non-zero */\n\n  FT_LOCAL_DEF( FT_Error )\n  ps_parser_to_bytes( PS_Parser  parser,\n                      FT_Byte*   bytes,\n                      FT_Offset  max_bytes,\n                      FT_Long*   pnum_bytes,\n                      FT_Bool    delimiters )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_Byte*  cur;\n\n\n    ps_parser_skip_spaces( parser );\n    cur = parser->cursor;\n\n    if ( cur >= parser->limit )\n      goto Exit;\n\n    if ( delimiters )\n    {\n      if ( *cur != '<' )\n      {\n        FT_ERROR(( \"ps_parser_to_bytes: Missing starting delimiter `<'\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      cur++;\n    }\n\n    *pnum_bytes = PS_Conv_ASCIIHexDecode( &cur,\n                                          parser->limit,\n                                          bytes,\n                                          max_bytes );\n\n    if ( delimiters )\n    {\n      if ( cur < parser->limit && *cur != '>' )\n      {\n        FT_ERROR(( \"ps_parser_to_bytes: Missing closing delimiter `>'\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      cur++;\n    }\n\n    parser->cursor = cur;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Fixed )\n  ps_parser_to_fixed( PS_Parser  parser,\n                      FT_Int     power_ten )\n  {\n    ps_parser_skip_spaces( parser );\n    return PS_Conv_ToFixed( &parser->cursor, parser->limit, power_ten );\n  }\n\n\n  FT_LOCAL_DEF( FT_Int )\n  ps_parser_to_coord_array( PS_Parser  parser,\n                            FT_Int     max_coords,\n                            FT_Short*  coords )\n  {\n    ps_parser_skip_spaces( parser );\n    return ps_tocoordarray( &parser->cursor, parser->limit,\n                            max_coords, coords );\n  }\n\n\n  FT_LOCAL_DEF( FT_Int )\n  ps_parser_to_fixed_array( PS_Parser  parser,\n                            FT_Int     max_values,\n                            FT_Fixed*  values,\n                            FT_Int     power_ten )\n  {\n    ps_parser_skip_spaces( parser );\n    return ps_tofixedarray( &parser->cursor, parser->limit,\n                            max_values, values, power_ten );\n  }\n\n\n#if 0\n\n  FT_LOCAL_DEF( FT_String* )\n  T1_ToString( PS_Parser  parser )\n  {\n    return ps_tostring( &parser->cursor, parser->limit, parser->memory );\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  T1_ToBool( PS_Parser  parser )\n  {\n    return ps_tobool( &parser->cursor, parser->limit );\n  }\n\n#endif /* 0 */\n\n\n  FT_LOCAL_DEF( void )\n  ps_parser_init( PS_Parser  parser,\n                  FT_Byte*   base,\n                  FT_Byte*   limit,\n                  FT_Memory  memory )\n  {\n    parser->error  = FT_Err_Ok;\n    parser->base   = base;\n    parser->limit  = limit;\n    parser->cursor = base;\n    parser->memory = memory;\n    parser->funcs  = ps_parser_funcs;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  ps_parser_done( PS_Parser  parser )\n  {\n    FT_UNUSED( parser );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                            T1 BUILDER                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    t1_builder_init                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initializes a given glyph builder.                                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    builder :: A pointer to the glyph builder to initialize.           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face    :: The current face object.                                */\n  /*                                                                       */\n  /*    size    :: The current size object.                                */\n  /*                                                                       */\n  /*    glyph   :: The current glyph object.                               */\n  /*                                                                       */\n  /*    hinting :: Whether hinting should be applied.                      */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  t1_builder_init( T1_Builder    builder,\n                   FT_Face       face,\n                   FT_Size       size,\n                   FT_GlyphSlot  glyph,\n                   FT_Bool       hinting )\n  {\n    builder->parse_state = T1_Parse_Start;\n    builder->load_points = 1;\n\n    builder->face   = face;\n    builder->glyph  = glyph;\n    builder->memory = face->memory;\n\n    if ( glyph )\n    {\n      FT_GlyphLoader  loader = glyph->internal->loader;\n\n\n      builder->loader  = loader;\n      builder->base    = &loader->base.outline;\n      builder->current = &loader->current.outline;\n      FT_GlyphLoader_Rewind( loader );\n\n      builder->hints_globals = size->internal;\n      builder->hints_funcs   = 0;\n\n      if ( hinting )\n        builder->hints_funcs = glyph->internal->glyph_hints;\n    }\n\n    builder->pos_x = 0;\n    builder->pos_y = 0;\n\n    builder->left_bearing.x = 0;\n    builder->left_bearing.y = 0;\n    builder->advance.x      = 0;\n    builder->advance.y      = 0;\n\n    builder->funcs = t1_builder_funcs;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    t1_builder_done                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finalizes a given glyph builder.  Its contents can still be used   */\n  /*    after the call, but the function saves important information       */\n  /*    within the corresponding glyph slot.                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    builder :: A pointer to the glyph builder to finalize.             */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  t1_builder_done( T1_Builder  builder )\n  {\n    FT_GlyphSlot  glyph = builder->glyph;\n\n\n    if ( glyph )\n      glyph->outline = *builder->base;\n  }\n\n\n  /* check that there is enough space for `count' more points */\n  FT_LOCAL_DEF( FT_Error )\n  t1_builder_check_points( T1_Builder  builder,\n                           FT_Int      count )\n  {\n    return FT_GLYPHLOADER_CHECK_POINTS( builder->loader, count, 0 );\n  }\n\n\n  /* add a new point, do not check space */\n  FT_LOCAL_DEF( void )\n  t1_builder_add_point( T1_Builder  builder,\n                        FT_Pos      x,\n                        FT_Pos      y,\n                        FT_Byte     flag )\n  {\n    FT_Outline*  outline = builder->current;\n\n\n    if ( builder->load_points )\n    {\n      FT_Vector*  point   = outline->points + outline->n_points;\n      FT_Byte*    control = (FT_Byte*)outline->tags + outline->n_points;\n\n\n      point->x = FIXED_TO_INT( x );\n      point->y = FIXED_TO_INT( y );\n      *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );\n    }\n    outline->n_points++;\n  }\n\n\n  /* check space for a new on-curve point, then add it */\n  FT_LOCAL_DEF( FT_Error )\n  t1_builder_add_point1( T1_Builder  builder,\n                         FT_Pos      x,\n                         FT_Pos      y )\n  {\n    FT_Error  error;\n\n\n    error = t1_builder_check_points( builder, 1 );\n    if ( !error )\n      t1_builder_add_point( builder, x, y, 1 );\n\n    return error;\n  }\n\n\n  /* check space for a new contour, then add it */\n  FT_LOCAL_DEF( FT_Error )\n  t1_builder_add_contour( T1_Builder  builder )\n  {\n    FT_Outline*  outline = builder->current;\n    FT_Error     error;\n\n\n    /* this might happen in invalid fonts */\n    if ( !outline )\n    {\n      FT_ERROR(( \"t1_builder_add_contour: no outline to add points to\\n\" ));\n      return FT_THROW( Invalid_File_Format );\n    }\n\n    if ( !builder->load_points )\n    {\n      outline->n_contours++;\n      return FT_Err_Ok;\n    }\n\n    error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 );\n    if ( !error )\n    {\n      if ( outline->n_contours > 0 )\n        outline->contours[outline->n_contours - 1] =\n          (short)( outline->n_points - 1 );\n\n      outline->n_contours++;\n    }\n\n    return error;\n  }\n\n\n  /* if a path was begun, add its first on-curve point */\n  FT_LOCAL_DEF( FT_Error )\n  t1_builder_start_point( T1_Builder  builder,\n                          FT_Pos      x,\n                          FT_Pos      y )\n  {\n    FT_Error  error = FT_ERR( Invalid_File_Format );\n\n\n    /* test whether we are building a new contour */\n\n    if ( builder->parse_state == T1_Parse_Have_Path )\n      error = FT_Err_Ok;\n    else\n    {\n      builder->parse_state = T1_Parse_Have_Path;\n      error = t1_builder_add_contour( builder );\n      if ( !error )\n        error = t1_builder_add_point1( builder, x, y );\n    }\n\n    return error;\n  }\n\n\n  /* close the current contour */\n  FT_LOCAL_DEF( void )\n  t1_builder_close_contour( T1_Builder  builder )\n  {\n    FT_Outline*  outline = builder->current;\n    FT_Int       first;\n\n\n    if ( !outline )\n      return;\n\n    first = outline->n_contours <= 1\n            ? 0 : outline->contours[outline->n_contours - 2] + 1;\n\n    /* We must not include the last point in the path if it */\n    /* is located on the first point.                       */\n    if ( outline->n_points > 1 )\n    {\n      FT_Vector*  p1      = outline->points + first;\n      FT_Vector*  p2      = outline->points + outline->n_points - 1;\n      FT_Byte*    control = (FT_Byte*)outline->tags + outline->n_points - 1;\n\n\n      /* `delete' last point only if it coincides with the first */\n      /* point and it is not a control point (which can happen). */\n      if ( p1->x == p2->x && p1->y == p2->y )\n        if ( *control == FT_CURVE_TAG_ON )\n          outline->n_points--;\n    }\n\n    if ( outline->n_contours > 0 )\n    {\n      /* Don't add contours only consisting of one point, i.e.,  */\n      /* check whether the first and the last point is the same. */\n      if ( first == outline->n_points - 1 )\n      {\n        outline->n_contours--;\n        outline->n_points--;\n      }\n      else\n        outline->contours[outline->n_contours - 1] =\n          (short)( outline->n_points - 1 );\n    }\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                            OTHER                              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  t1_decrypt( FT_Byte*   buffer,\n              FT_Offset  length,\n              FT_UShort  seed )\n  {\n    PS_Conv_EexecDecode( &buffer,\n                         buffer + length,\n                         buffer,\n                         length,\n                         &seed );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/psobjs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psobjs.h                                                               */\n/*                                                                         */\n/*    Auxiliary functions for PostScript fonts (specification).            */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSOBJS_H__\n#define __PSOBJS_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                             T1_TABLE                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_CALLBACK_TABLE\n  const PS_Table_FuncsRec    ps_table_funcs;\n\n  FT_CALLBACK_TABLE\n  const PS_Parser_FuncsRec   ps_parser_funcs;\n\n  FT_CALLBACK_TABLE\n  const T1_Builder_FuncsRec  t1_builder_funcs;\n\n\n  FT_LOCAL( FT_Error )\n  ps_table_new( PS_Table   table,\n                FT_Int     count,\n                FT_Memory  memory );\n\n  FT_LOCAL( FT_Error )\n  ps_table_add( PS_Table    table,\n                FT_Int      idx,\n                void*       object,\n                FT_PtrDist  length );\n\n  FT_LOCAL( void )\n  ps_table_done( PS_Table  table );\n\n\n  FT_LOCAL( void )\n  ps_table_release( PS_Table  table );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                            T1 PARSER                          *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_LOCAL( void )\n  ps_parser_skip_spaces( PS_Parser  parser );\n\n  FT_LOCAL( void )\n  ps_parser_skip_PS_token( PS_Parser  parser );\n\n  FT_LOCAL( void )\n  ps_parser_to_token( PS_Parser  parser,\n                      T1_Token   token );\n\n  FT_LOCAL( void )\n  ps_parser_to_token_array( PS_Parser  parser,\n                            T1_Token   tokens,\n                            FT_UInt    max_tokens,\n                            FT_Int*    pnum_tokens );\n\n  FT_LOCAL( FT_Error )\n  ps_parser_load_field( PS_Parser       parser,\n                        const T1_Field  field,\n                        void**          objects,\n                        FT_UInt         max_objects,\n                        FT_ULong*       pflags );\n\n  FT_LOCAL( FT_Error )\n  ps_parser_load_field_table( PS_Parser       parser,\n                              const T1_Field  field,\n                              void**          objects,\n                              FT_UInt         max_objects,\n                              FT_ULong*       pflags );\n\n  FT_LOCAL( FT_Long )\n  ps_parser_to_int( PS_Parser  parser );\n\n\n  FT_LOCAL( FT_Error )\n  ps_parser_to_bytes( PS_Parser  parser,\n                      FT_Byte*   bytes,\n                      FT_Offset  max_bytes,\n                      FT_Long*   pnum_bytes,\n                      FT_Bool    delimiters );\n\n\n  FT_LOCAL( FT_Fixed )\n  ps_parser_to_fixed( PS_Parser  parser,\n                      FT_Int     power_ten );\n\n\n  FT_LOCAL( FT_Int )\n  ps_parser_to_coord_array( PS_Parser  parser,\n                            FT_Int     max_coords,\n                            FT_Short*  coords );\n\n  FT_LOCAL( FT_Int )\n  ps_parser_to_fixed_array( PS_Parser  parser,\n                            FT_Int     max_values,\n                            FT_Fixed*  values,\n                            FT_Int     power_ten );\n\n\n  FT_LOCAL( void )\n  ps_parser_init( PS_Parser  parser,\n                  FT_Byte*   base,\n                  FT_Byte*   limit,\n                  FT_Memory  memory );\n\n  FT_LOCAL( void )\n  ps_parser_done( PS_Parser  parser );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                            T1 BUILDER                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  t1_builder_init( T1_Builder    builder,\n                   FT_Face       face,\n                   FT_Size       size,\n                   FT_GlyphSlot  glyph,\n                   FT_Bool       hinting );\n\n  FT_LOCAL( void )\n  t1_builder_done( T1_Builder  builder );\n\n  FT_LOCAL( FT_Error )\n  t1_builder_check_points( T1_Builder  builder,\n                           FT_Int      count );\n\n  FT_LOCAL( void )\n  t1_builder_add_point( T1_Builder  builder,\n                        FT_Pos      x,\n                        FT_Pos      y,\n                        FT_Byte     flag );\n\n  FT_LOCAL( FT_Error )\n  t1_builder_add_point1( T1_Builder  builder,\n                         FT_Pos      x,\n                         FT_Pos      y );\n\n  FT_LOCAL( FT_Error )\n  t1_builder_add_contour( T1_Builder  builder );\n\n\n  FT_LOCAL( FT_Error )\n  t1_builder_start_point( T1_Builder  builder,\n                          FT_Pos      x,\n                          FT_Pos      y );\n\n\n  FT_LOCAL( void )\n  t1_builder_close_contour( T1_Builder  builder );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                            OTHER                              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_LOCAL( void )\n  t1_decrypt( FT_Byte*   buffer,\n              FT_Offset  length,\n              FT_UShort  seed );\n\n\nFT_END_HEADER\n\n#endif /* __PSOBJS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/t1cmap.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1cmap.c                                                               */\n/*                                                                         */\n/*    Type 1 character map support (body).                                 */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2006, 2007, 2012 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"t1cmap.h\"\n\n#include FT_INTERNAL_DEBUG_H\n\n#include \"psauxerr.h\"\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****          TYPE1 STANDARD (AND EXPERT) ENCODING CMAPS           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  t1_cmap_std_init( T1_CMapStd  cmap,\n                    FT_Int      is_expert )\n  {\n    T1_Face             face    = (T1_Face)FT_CMAP_FACE( cmap );\n    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)face->psnames;\n\n\n    cmap->num_glyphs    = face->type1.num_glyphs;\n    cmap->glyph_names   = (const char* const*)face->type1.glyph_names;\n    cmap->sid_to_string = psnames->adobe_std_strings;\n    cmap->code_to_sid   = is_expert ? psnames->adobe_expert_encoding\n                                    : psnames->adobe_std_encoding;\n\n    FT_ASSERT( cmap->code_to_sid != NULL );\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  t1_cmap_std_done( T1_CMapStd  cmap )\n  {\n    cmap->num_glyphs    = 0;\n    cmap->glyph_names   = NULL;\n    cmap->sid_to_string = NULL;\n    cmap->code_to_sid   = NULL;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  t1_cmap_std_char_index( T1_CMapStd  cmap,\n                          FT_UInt32   char_code )\n  {\n    FT_UInt  result = 0;\n\n\n    if ( char_code < 256 )\n    {\n      FT_UInt      code, n;\n      const char*  glyph_name;\n\n\n      /* convert character code to Adobe SID string */\n      code       = cmap->code_to_sid[char_code];\n      glyph_name = cmap->sid_to_string( code );\n\n      /* look for the corresponding glyph name */\n      for ( n = 0; n < cmap->num_glyphs; n++ )\n      {\n        const char* gname = cmap->glyph_names[n];\n\n\n        if ( gname && gname[0] == glyph_name[0]  &&\n             ft_strcmp( gname, glyph_name ) == 0 )\n        {\n          result = n;\n          break;\n        }\n      }\n    }\n\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  t1_cmap_std_char_next( T1_CMapStd   cmap,\n                         FT_UInt32   *pchar_code )\n  {\n    FT_UInt    result    = 0;\n    FT_UInt32  char_code = *pchar_code + 1;\n\n\n    while ( char_code < 256 )\n    {\n      result = t1_cmap_std_char_index( cmap, char_code );\n      if ( result != 0 )\n        goto Exit;\n\n      char_code++;\n    }\n    char_code = 0;\n\n  Exit:\n    *pchar_code = char_code;\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  t1_cmap_standard_init( T1_CMapStd  cmap,\n                         FT_Pointer  pointer )\n  {\n    FT_UNUSED( pointer );\n\n\n    t1_cmap_std_init( cmap, 0 );\n    return 0;\n  }\n\n\n  FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec\n  t1_cmap_standard_class_rec =\n  {\n    sizeof ( T1_CMapStdRec ),\n\n    (FT_CMap_InitFunc)     t1_cmap_standard_init,\n    (FT_CMap_DoneFunc)     t1_cmap_std_done,\n    (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,\n    (FT_CMap_CharNextFunc) t1_cmap_std_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  };\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  t1_cmap_expert_init( T1_CMapStd  cmap,\n                       FT_Pointer  pointer )\n  {\n    FT_UNUSED( pointer );\n\n\n    t1_cmap_std_init( cmap, 1 );\n    return 0;\n  }\n\n  FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec\n  t1_cmap_expert_class_rec =\n  {\n    sizeof ( T1_CMapStdRec ),\n\n    (FT_CMap_InitFunc)     t1_cmap_expert_init,\n    (FT_CMap_DoneFunc)     t1_cmap_std_done,\n    (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,\n    (FT_CMap_CharNextFunc) t1_cmap_std_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  };\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    TYPE1 CUSTOM ENCODING CMAP                 *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  t1_cmap_custom_init( T1_CMapCustom  cmap,\n                       FT_Pointer     pointer )\n  {\n    T1_Face      face     = (T1_Face)FT_CMAP_FACE( cmap );\n    T1_Encoding  encoding = &face->type1.encoding;\n\n    FT_UNUSED( pointer );\n\n\n    cmap->first   = encoding->code_first;\n    cmap->count   = (FT_UInt)( encoding->code_last - cmap->first );\n    cmap->indices = encoding->char_index;\n\n    FT_ASSERT( cmap->indices != NULL );\n    FT_ASSERT( encoding->code_first <= encoding->code_last );\n\n    return 0;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  t1_cmap_custom_done( T1_CMapCustom  cmap )\n  {\n    cmap->indices = NULL;\n    cmap->first   = 0;\n    cmap->count   = 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  t1_cmap_custom_char_index( T1_CMapCustom  cmap,\n                             FT_UInt32      char_code )\n  {\n    FT_UInt    result = 0;\n\n\n    if ( ( char_code >= cmap->first )                  &&\n         ( char_code < ( cmap->first + cmap->count ) ) )\n      result = cmap->indices[char_code];\n\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  t1_cmap_custom_char_next( T1_CMapCustom  cmap,\n                            FT_UInt32     *pchar_code )\n  {\n    FT_UInt    result = 0;\n    FT_UInt32  char_code = *pchar_code;\n\n\n    ++char_code;\n\n    if ( char_code < cmap->first )\n      char_code = cmap->first;\n\n    for ( ; char_code < ( cmap->first + cmap->count ); char_code++ )\n    {\n      result = cmap->indices[char_code];\n      if ( result != 0 )\n        goto Exit;\n    }\n\n    char_code = 0;\n\n  Exit:\n    *pchar_code = char_code;\n    return result;\n  }\n\n\n  FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec\n  t1_cmap_custom_class_rec =\n  {\n    sizeof ( T1_CMapCustomRec ),\n\n    (FT_CMap_InitFunc)     t1_cmap_custom_init,\n    (FT_CMap_DoneFunc)     t1_cmap_custom_done,\n    (FT_CMap_CharIndexFunc)t1_cmap_custom_char_index,\n    (FT_CMap_CharNextFunc) t1_cmap_custom_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  };\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****            TYPE1 SYNTHETIC UNICODE ENCODING CMAP              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_CALLBACK_DEF( const char * )\n  psaux_get_glyph_name( T1_Face  face,\n                        FT_UInt  idx )\n  {\n    return face->type1.glyph_names[idx];\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  t1_cmap_unicode_init( PS_Unicodes  unicodes,\n                        FT_Pointer   pointer )\n  {\n    T1_Face             face    = (T1_Face)FT_CMAP_FACE( unicodes );\n    FT_Memory           memory  = FT_FACE_MEMORY( face );\n    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)face->psnames;\n\n    FT_UNUSED( pointer );\n\n\n    return psnames->unicodes_init( memory,\n                                   unicodes,\n                                   face->type1.num_glyphs,\n                                   (PS_GetGlyphNameFunc)&psaux_get_glyph_name,\n                                   (PS_FreeGlyphNameFunc)NULL,\n                                   (FT_Pointer)face );\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  t1_cmap_unicode_done( PS_Unicodes  unicodes )\n  {\n    FT_Face    face   = FT_CMAP_FACE( unicodes );\n    FT_Memory  memory = FT_FACE_MEMORY( face );\n\n\n    FT_FREE( unicodes->maps );\n    unicodes->num_maps = 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  t1_cmap_unicode_char_index( PS_Unicodes  unicodes,\n                              FT_UInt32    char_code )\n  {\n    T1_Face             face    = (T1_Face)FT_CMAP_FACE( unicodes );\n    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)face->psnames;\n\n\n    return psnames->unicodes_char_index( unicodes, char_code );\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  t1_cmap_unicode_char_next( PS_Unicodes  unicodes,\n                             FT_UInt32   *pchar_code )\n  {\n    T1_Face             face    = (T1_Face)FT_CMAP_FACE( unicodes );\n    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)face->psnames;\n\n\n    return psnames->unicodes_char_next( unicodes, pchar_code );\n  }\n\n\n  FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec\n  t1_cmap_unicode_class_rec =\n  {\n    sizeof ( PS_UnicodesRec ),\n\n    (FT_CMap_InitFunc)     t1_cmap_unicode_init,\n    (FT_CMap_DoneFunc)     t1_cmap_unicode_done,\n    (FT_CMap_CharIndexFunc)t1_cmap_unicode_char_index,\n    (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/t1cmap.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1cmap.h                                                               */\n/*                                                                         */\n/*    Type 1 character map support (specification).                        */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2006 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1CMAP_H__\n#define __T1CMAP_H__\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****          TYPE1 STANDARD (AND EXPERT) ENCODING CMAPS           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* standard (and expert) encoding cmaps */\n  typedef struct T1_CMapStdRec_*  T1_CMapStd;\n\n  typedef struct  T1_CMapStdRec_\n  {\n    FT_CMapRec                cmap;\n\n    const FT_UShort*          code_to_sid;\n    PS_Adobe_Std_StringsFunc  sid_to_string;\n\n    FT_UInt                   num_glyphs;\n    const char* const*        glyph_names;\n\n  } T1_CMapStdRec;\n\n\n  FT_CALLBACK_TABLE const FT_CMap_ClassRec\n  t1_cmap_standard_class_rec;\n\n  FT_CALLBACK_TABLE const FT_CMap_ClassRec\n  t1_cmap_expert_class_rec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  TYPE1 CUSTOM ENCODING CMAP                   *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef struct T1_CMapCustomRec_*  T1_CMapCustom;\n\n  typedef struct  T1_CMapCustomRec_\n  {\n    FT_CMapRec  cmap;\n    FT_UInt     first;\n    FT_UInt     count;\n    FT_UShort*  indices;\n\n  } T1_CMapCustomRec;\n\n\n  FT_CALLBACK_TABLE const FT_CMap_ClassRec\n  t1_cmap_custom_class_rec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****             TYPE1 SYNTHETIC UNICODE ENCODING CMAP             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* unicode (synthetic) cmaps */\n\n  FT_CALLBACK_TABLE const FT_CMap_ClassRec\n  t1_cmap_unicode_class_rec;\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __T1CMAP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/t1decode.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1decode.c                                                             */\n/*                                                                         */\n/*    PostScript Type 1 decoding routines (body).                          */\n/*                                                                         */\n/*  Copyright 2000-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n#include FT_OUTLINE_H\n\n#include \"t1decode.h\"\n#include \"psobjs.h\"\n\n#include \"psauxerr.h\"\n\n/* ensure proper sign extension */\n#define Fix2Int( f )  ( (FT_Int)(FT_Short)( (f) >> 16 ) )\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t1decode\n\n\n  typedef enum  T1_Operator_\n  {\n    op_none = 0,\n    op_endchar,\n    op_hsbw,\n    op_seac,\n    op_sbw,\n    op_closepath,\n    op_hlineto,\n    op_hmoveto,\n    op_hvcurveto,\n    op_rlineto,\n    op_rmoveto,\n    op_rrcurveto,\n    op_vhcurveto,\n    op_vlineto,\n    op_vmoveto,\n    op_dotsection,\n    op_hstem,\n    op_hstem3,\n    op_vstem,\n    op_vstem3,\n    op_div,\n    op_callothersubr,\n    op_callsubr,\n    op_pop,\n    op_return,\n    op_setcurrentpoint,\n    op_unknown15,\n\n    op_max    /* never remove this one */\n\n  } T1_Operator;\n\n\n  static\n  const FT_Int  t1_args_count[op_max] =\n  {\n    0, /* none */\n    0, /* endchar */\n    2, /* hsbw */\n    5, /* seac */\n    4, /* sbw */\n    0, /* closepath */\n    1, /* hlineto */\n    1, /* hmoveto */\n    4, /* hvcurveto */\n    2, /* rlineto */\n    2, /* rmoveto */\n    6, /* rrcurveto */\n    4, /* vhcurveto */\n    1, /* vlineto */\n    1, /* vmoveto */\n    0, /* dotsection */\n    2, /* hstem */\n    6, /* hstem3 */\n    2, /* vstem */\n    6, /* vstem3 */\n    2, /* div */\n   -1, /* callothersubr */\n    1, /* callsubr */\n    0, /* pop */\n    0, /* return */\n    2, /* setcurrentpoint */\n    2  /* opcode 15 (undocumented and obsolete) */\n  };\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    t1_lookup_glyph_by_stdcharcode                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Looks up a given glyph by its StandardEncoding charcode.  Used to  */\n  /*    implement the SEAC Type 1 operator.                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face     :: The current face object.                               */\n  /*                                                                       */\n  /*    charcode :: The character code to look for.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A glyph index in the font face.  Returns -1 if the corresponding   */\n  /*    glyph wasn't found.                                                */\n  /*                                                                       */\n  static FT_Int\n  t1_lookup_glyph_by_stdcharcode( T1_Decoder  decoder,\n                                  FT_Int      charcode )\n  {\n    FT_UInt             n;\n    const FT_String*    glyph_name;\n    FT_Service_PsCMaps  psnames = decoder->psnames;\n\n\n    /* check range of standard char code */\n    if ( charcode < 0 || charcode > 255 )\n      return -1;\n\n    glyph_name = psnames->adobe_std_strings(\n                   psnames->adobe_std_encoding[charcode]);\n\n    for ( n = 0; n < decoder->num_glyphs; n++ )\n    {\n      FT_String*  name = (FT_String*)decoder->glyph_names[n];\n\n\n      if ( name                               &&\n           name[0] == glyph_name[0]           &&\n           ft_strcmp( name, glyph_name ) == 0 )\n        return n;\n    }\n\n    return -1;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    t1operator_seac                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Implements the `seac' Type 1 operator for a Type 1 decoder.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    decoder :: The current CID decoder.                                */\n  /*                                                                       */\n  /*    asb     :: The accent's side bearing.                              */\n  /*                                                                       */\n  /*    adx     :: The horizontal offset of the accent.                    */\n  /*                                                                       */\n  /*    ady     :: The vertical offset of the accent.                      */\n  /*                                                                       */\n  /*    bchar   :: The base character's StandardEncoding charcode.         */\n  /*                                                                       */\n  /*    achar   :: The accent character's StandardEncoding charcode.       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  static FT_Error\n  t1operator_seac( T1_Decoder  decoder,\n                   FT_Pos      asb,\n                   FT_Pos      adx,\n                   FT_Pos      ady,\n                   FT_Int      bchar,\n                   FT_Int      achar )\n  {\n    FT_Error     error;\n    FT_Int       bchar_index, achar_index;\n#if 0\n    FT_Int       n_base_points;\n    FT_Outline*  base = decoder->builder.base;\n#endif\n    FT_Vector    left_bearing, advance;\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    T1_Face      face  = (T1_Face)decoder->builder.face;\n#endif\n\n\n    if ( decoder->seac )\n    {\n      FT_ERROR(( \"t1operator_seac: invalid nested seac\\n\" ));\n      return FT_THROW( Syntax_Error );\n    }\n\n    if ( decoder->builder.metrics_only )\n    {\n      FT_ERROR(( \"t1operator_seac: unexpected seac\\n\" ));\n      return FT_THROW( Syntax_Error );\n    }\n\n    /* seac weirdness */\n    adx += decoder->builder.left_bearing.x;\n\n    /* `glyph_names' is set to 0 for CID fonts which do not */\n    /* include an encoding.  How can we deal with these?    */\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    if ( decoder->glyph_names == 0                   &&\n         !face->root.internal->incremental_interface )\n#else\n    if ( decoder->glyph_names == 0 )\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n    {\n      FT_ERROR(( \"t1operator_seac:\"\n                 \" glyph names table not available in this font\\n\" ));\n      return FT_THROW( Syntax_Error );\n    }\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    if ( face->root.internal->incremental_interface )\n    {\n      /* the caller must handle the font encoding also */\n      bchar_index = bchar;\n      achar_index = achar;\n    }\n    else\n#endif\n    {\n      bchar_index = t1_lookup_glyph_by_stdcharcode( decoder, bchar );\n      achar_index = t1_lookup_glyph_by_stdcharcode( decoder, achar );\n    }\n\n    if ( bchar_index < 0 || achar_index < 0 )\n    {\n      FT_ERROR(( \"t1operator_seac:\"\n                 \" invalid seac character code arguments\\n\" ));\n      return FT_THROW( Syntax_Error );\n    }\n\n    /* if we are trying to load a composite glyph, do not load the */\n    /* accent character and return the array of subglyphs.         */\n    if ( decoder->builder.no_recurse )\n    {\n      FT_GlyphSlot    glyph  = (FT_GlyphSlot)decoder->builder.glyph;\n      FT_GlyphLoader  loader = glyph->internal->loader;\n      FT_SubGlyph     subg;\n\n\n      /* reallocate subglyph array if necessary */\n      error = FT_GlyphLoader_CheckSubGlyphs( loader, 2 );\n      if ( error )\n        goto Exit;\n\n      subg = loader->current.subglyphs;\n\n      /* subglyph 0 = base character */\n      subg->index = bchar_index;\n      subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES |\n                    FT_SUBGLYPH_FLAG_USE_MY_METRICS;\n      subg->arg1  = 0;\n      subg->arg2  = 0;\n      subg++;\n\n      /* subglyph 1 = accent character */\n      subg->index = achar_index;\n      subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;\n      subg->arg1  = (FT_Int)FIXED_TO_INT( adx - asb );\n      subg->arg2  = (FT_Int)FIXED_TO_INT( ady );\n\n      /* set up remaining glyph fields */\n      glyph->num_subglyphs = 2;\n      glyph->subglyphs     = loader->base.subglyphs;\n      glyph->format        = FT_GLYPH_FORMAT_COMPOSITE;\n\n      loader->current.num_subglyphs = 2;\n      goto Exit;\n    }\n\n    /* First load `bchar' in builder */\n    /* now load the unscaled outline */\n\n    FT_GlyphLoader_Prepare( decoder->builder.loader );  /* prepare loader */\n\n    /* the seac operator must not be nested */\n    decoder->seac = TRUE;\n    error = t1_decoder_parse_glyph( decoder, bchar_index );\n    decoder->seac = FALSE;\n    if ( error )\n      goto Exit;\n\n    /* save the left bearing and width of the base character */\n    /* as they will be erased by the next load.              */\n\n    left_bearing = decoder->builder.left_bearing;\n    advance      = decoder->builder.advance;\n\n    decoder->builder.left_bearing.x = 0;\n    decoder->builder.left_bearing.y = 0;\n\n    decoder->builder.pos_x = adx - asb;\n    decoder->builder.pos_y = ady;\n\n    /* Now load `achar' on top of */\n    /* the base outline           */\n\n    /* the seac operator must not be nested */\n    decoder->seac = TRUE;\n    error = t1_decoder_parse_glyph( decoder, achar_index );\n    decoder->seac = FALSE;\n    if ( error )\n      goto Exit;\n\n    /* restore the left side bearing and   */\n    /* advance width of the base character */\n\n    decoder->builder.left_bearing = left_bearing;\n    decoder->builder.advance      = advance;\n\n    decoder->builder.pos_x = 0;\n    decoder->builder.pos_y = 0;\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    t1_decoder_parse_charstrings                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Parses a given Type 1 charstrings program.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    decoder         :: The current Type 1 decoder.                     */\n  /*                                                                       */\n  /*    charstring_base :: The base address of the charstring stream.      */\n  /*                                                                       */\n  /*    charstring_len  :: The length in bytes of the charstring stream.   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  t1_decoder_parse_charstrings( T1_Decoder  decoder,\n                                FT_Byte*    charstring_base,\n                                FT_UInt     charstring_len )\n  {\n    FT_Error         error;\n    T1_Decoder_Zone  zone;\n    FT_Byte*         ip;\n    FT_Byte*         limit;\n    T1_Builder       builder = &decoder->builder;\n    FT_Pos           x, y, orig_x, orig_y;\n    FT_Int           known_othersubr_result_cnt   = 0;\n    FT_Int           unknown_othersubr_result_cnt = 0;\n    FT_Bool          large_int;\n    FT_Fixed         seed;\n\n    T1_Hints_Funcs   hinter;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    FT_Bool          bol = TRUE;\n#endif\n\n\n    /* compute random seed from stack address of parameter */\n    seed = (FT_Fixed)( ( (FT_PtrDist)(char*)&seed              ^\n                         (FT_PtrDist)(char*)&decoder           ^\n                         (FT_PtrDist)(char*)&charstring_base ) &\n                         FT_ULONG_MAX ) ;\n    seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;\n    if ( seed == 0 )\n      seed = 0x7384;\n\n    /* First of all, initialize the decoder */\n    decoder->top  = decoder->stack;\n    decoder->zone = decoder->zones;\n    zone          = decoder->zones;\n\n    builder->parse_state = T1_Parse_Start;\n\n    hinter = (T1_Hints_Funcs)builder->hints_funcs;\n\n    /* a font that reads BuildCharArray without setting */\n    /* its values first is buggy, but ...               */\n    FT_ASSERT( ( decoder->len_buildchar == 0 ) ==\n               ( decoder->buildchar == NULL )  );\n\n    if ( decoder->buildchar && decoder->len_buildchar > 0 )\n      ft_memset( &decoder->buildchar[0],\n                 0,\n                 sizeof ( decoder->buildchar[0] ) * decoder->len_buildchar );\n\n    FT_TRACE4(( \"\\n\"\n                \"Start charstring\\n\" ));\n\n    zone->base           = charstring_base;\n    limit = zone->limit  = charstring_base + charstring_len;\n    ip    = zone->cursor = zone->base;\n\n    error = FT_Err_Ok;\n\n    x = orig_x = builder->pos_x;\n    y = orig_y = builder->pos_y;\n\n    /* begin hints recording session, if any */\n    if ( hinter )\n      hinter->open( hinter->hints );\n\n    large_int = FALSE;\n\n    /* now, execute loop */\n    while ( ip < limit )\n    {\n      FT_Long*     top   = decoder->top;\n      T1_Operator  op    = op_none;\n      FT_Int32     value = 0;\n\n\n      FT_ASSERT( known_othersubr_result_cnt == 0   ||\n                 unknown_othersubr_result_cnt == 0 );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n      if ( bol )\n      {\n        FT_TRACE5(( \" (%d)\", decoder->top - decoder->stack ));\n        bol = FALSE;\n      }\n#endif\n\n      /*********************************************************************/\n      /*                                                                   */\n      /* Decode operator or operand                                        */\n      /*                                                                   */\n      /*                                                                   */\n\n      /* first of all, decompress operator or value */\n      switch ( *ip++ )\n      {\n      case 1:\n        op = op_hstem;\n        break;\n\n      case 3:\n        op = op_vstem;\n        break;\n      case 4:\n        op = op_vmoveto;\n        break;\n      case 5:\n        op = op_rlineto;\n        break;\n      case 6:\n        op = op_hlineto;\n        break;\n      case 7:\n        op = op_vlineto;\n        break;\n      case 8:\n        op = op_rrcurveto;\n        break;\n      case 9:\n        op = op_closepath;\n        break;\n      case 10:\n        op = op_callsubr;\n        break;\n      case 11:\n        op = op_return;\n        break;\n\n      case 13:\n        op = op_hsbw;\n        break;\n      case 14:\n        op = op_endchar;\n        break;\n\n      case 15:          /* undocumented, obsolete operator */\n        op = op_unknown15;\n        break;\n\n      case 21:\n        op = op_rmoveto;\n        break;\n      case 22:\n        op = op_hmoveto;\n        break;\n\n      case 30:\n        op = op_vhcurveto;\n        break;\n      case 31:\n        op = op_hvcurveto;\n        break;\n\n      case 12:\n        if ( ip > limit )\n        {\n          FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                     \" invalid escape (12+EOF)\\n\" ));\n          goto Syntax_Error;\n        }\n\n        switch ( *ip++ )\n        {\n        case 0:\n          op = op_dotsection;\n          break;\n        case 1:\n          op = op_vstem3;\n          break;\n        case 2:\n          op = op_hstem3;\n          break;\n        case 6:\n          op = op_seac;\n          break;\n        case 7:\n          op = op_sbw;\n          break;\n        case 12:\n          op = op_div;\n          break;\n        case 16:\n          op = op_callothersubr;\n          break;\n        case 17:\n          op = op_pop;\n          break;\n        case 33:\n          op = op_setcurrentpoint;\n          break;\n\n        default:\n          FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                     \" invalid escape (12+%d)\\n\",\n                     ip[-1] ));\n          goto Syntax_Error;\n        }\n        break;\n\n      case 255:    /* four bytes integer */\n        if ( ip + 4 > limit )\n        {\n          FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                     \" unexpected EOF in integer\\n\" ));\n          goto Syntax_Error;\n        }\n\n        value = (FT_Int32)( ( (FT_UInt32)ip[0] << 24 ) |\n                            ( (FT_UInt32)ip[1] << 16 ) |\n                            ( (FT_UInt32)ip[2] << 8  ) |\n                              (FT_UInt32)ip[3]         );\n        ip += 4;\n\n        /* According to the specification, values > 32000 or < -32000 must */\n        /* be followed by a `div' operator to make the result be in the    */\n        /* range [-32000;32000].  We expect that the second argument of    */\n        /* `div' is not a large number.  Additionally, we don't handle     */\n        /* stuff like `<large1> <large2> <num> div <num> div' or           */\n        /* <large1> <large2> <num> div div'.  This is probably not allowed */\n        /* anyway.                                                         */\n        if ( value > 32000 || value < -32000 )\n        {\n          if ( large_int )\n          {\n            FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                       \" no `div' after large integer\\n\" ));\n          }\n          else\n            large_int = TRUE;\n        }\n        else\n        {\n          if ( !large_int )\n            value = (FT_Int32)( (FT_UInt32)value << 16 );\n        }\n\n        break;\n\n      default:\n        if ( ip[-1] >= 32 )\n        {\n          if ( ip[-1] < 247 )\n            value = (FT_Int32)ip[-1] - 139;\n          else\n          {\n            if ( ++ip > limit )\n            {\n              FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                         \" unexpected EOF in integer\\n\" ));\n              goto Syntax_Error;\n            }\n\n            if ( ip[-2] < 251 )\n              value =    ( ( ip[-2] - 247 ) * 256 ) + ip[-1] + 108;\n            else\n              value = -( ( ( ip[-2] - 251 ) * 256 ) + ip[-1] + 108 );\n          }\n\n          if ( !large_int )\n            value = (FT_Int32)( (FT_UInt32)value << 16 );\n        }\n        else\n        {\n          FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                     \" invalid byte (%d)\\n\", ip[-1] ));\n          goto Syntax_Error;\n        }\n      }\n\n      if ( unknown_othersubr_result_cnt > 0 )\n      {\n        switch ( op )\n        {\n        case op_callsubr:\n        case op_return:\n        case op_none:\n        case op_pop:\n          break;\n\n        default:\n          /* all operands have been transferred by previous pops */\n          unknown_othersubr_result_cnt = 0;\n          break;\n        }\n      }\n\n      if ( large_int && !( op == op_none || op == op_div ) )\n      {\n        FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                   \" no `div' after large integer\\n\" ));\n\n        large_int = FALSE;\n      }\n\n      /*********************************************************************/\n      /*                                                                   */\n      /*  Push value on stack, or process operator                         */\n      /*                                                                   */\n      /*                                                                   */\n      if ( op == op_none )\n      {\n        if ( top - decoder->stack >= T1_MAX_CHARSTRINGS_OPERANDS )\n        {\n          FT_ERROR(( \"t1_decoder_parse_charstrings: stack overflow\\n\" ));\n          goto Syntax_Error;\n        }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        if ( large_int )\n          FT_TRACE4(( \" %ld\", value ));\n        else\n          FT_TRACE4(( \" %ld\", Fix2Int( value ) ));\n#endif\n\n        *top++       = value;\n        decoder->top = top;\n      }\n      else if ( op == op_callothersubr )  /* callothersubr */\n      {\n        FT_Int  subr_no;\n        FT_Int  arg_cnt;\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        FT_TRACE4(( \" callothersubr\\n\" ));\n        bol = TRUE;\n#endif\n\n        if ( top - decoder->stack < 2 )\n          goto Stack_Underflow;\n\n        top -= 2;\n\n        subr_no = Fix2Int( top[1] );\n        arg_cnt = Fix2Int( top[0] );\n\n        /***********************************************************/\n        /*                                                         */\n        /* remove all operands to callothersubr from the stack     */\n        /*                                                         */\n        /* for handled othersubrs, where we know the number of     */\n        /* arguments, we increase the stack by the value of        */\n        /* known_othersubr_result_cnt                              */\n        /*                                                         */\n        /* for unhandled othersubrs the following pops adjust the  */\n        /* stack pointer as necessary                              */\n\n        if ( arg_cnt > top - decoder->stack )\n          goto Stack_Underflow;\n\n        top -= arg_cnt;\n\n        known_othersubr_result_cnt   = 0;\n        unknown_othersubr_result_cnt = 0;\n\n        /* XXX TODO: The checks to `arg_count == <whatever>'       */\n        /* might not be correct; an othersubr expects a certain    */\n        /* number of operands on the PostScript stack (as opposed  */\n        /* to the T1 stack) but it doesn't have to put them there  */\n        /* by itself; previous othersubrs might have left the      */\n        /* operands there if they were not followed by an          */\n        /* appropriate number of pops                              */\n        /*                                                         */\n        /* On the other hand, Adobe Reader 7.0.8 for Linux doesn't */\n        /* accept a font that contains charstrings like            */\n        /*                                                         */\n        /*     100 200 2 20 callothersubr                          */\n        /*     300 1 20 callothersubr pop                          */\n        /*                                                         */\n        /* Perhaps this is the reason why BuildCharArray exists.   */\n\n        switch ( subr_no )\n        {\n        case 0:                     /* end flex feature */\n          if ( arg_cnt != 3 )\n            goto Unexpected_OtherSubr;\n\n          if ( decoder->flex_state       == 0 ||\n               decoder->num_flex_vectors != 7 )\n          {\n            FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                       \" unexpected flex end\\n\" ));\n            goto Syntax_Error;\n          }\n\n          /* the two `results' are popped by the following setcurrentpoint */\n          top[0] = x;\n          top[1] = y;\n          known_othersubr_result_cnt = 2;\n          break;\n\n        case 1:                     /* start flex feature */\n          if ( arg_cnt != 0 )\n            goto Unexpected_OtherSubr;\n\n          decoder->flex_state        = 1;\n          decoder->num_flex_vectors  = 0;\n          if ( ( error = t1_builder_start_point( builder, x, y ) )\n                 != FT_Err_Ok                                   ||\n               ( error = t1_builder_check_points( builder, 6 ) )\n                 != FT_Err_Ok                                   )\n            goto Fail;\n          break;\n\n        case 2:                     /* add flex vectors */\n          {\n            FT_Int  idx;\n\n\n            if ( arg_cnt != 0 )\n              goto Unexpected_OtherSubr;\n\n            if ( decoder->flex_state == 0 )\n            {\n              FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                         \" missing flex start\\n\" ));\n              goto Syntax_Error;\n            }\n\n            /* note that we should not add a point for index 0; */\n            /* this will move our current position to the flex  */\n            /* point without adding any point to the outline    */\n            idx = decoder->num_flex_vectors++;\n            if ( idx > 0 && idx < 7 )\n              t1_builder_add_point( builder,\n                                    x,\n                                    y,\n                                    (FT_Byte)( idx == 3 || idx == 6 ) );\n          }\n          break;\n\n        case 3:                     /* change hints */\n          if ( arg_cnt != 1 )\n            goto Unexpected_OtherSubr;\n\n          known_othersubr_result_cnt = 1;\n\n          if ( hinter )\n            hinter->reset( hinter->hints, builder->current->n_points );\n          break;\n\n        case 12:\n        case 13:\n          /* counter control hints, clear stack */\n          top = decoder->stack;\n          break;\n\n        case 14:\n        case 15:\n        case 16:\n        case 17:\n        case 18:                    /* multiple masters */\n          {\n            PS_Blend  blend = decoder->blend;\n            FT_UInt   num_points, nn, mm;\n            FT_Long*  delta;\n            FT_Long*  values;\n\n\n            if ( !blend )\n            {\n              FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                         \" unexpected multiple masters operator\\n\" ));\n              goto Syntax_Error;\n            }\n\n            num_points = (FT_UInt)subr_no - 13 + ( subr_no == 18 );\n            if ( arg_cnt != (FT_Int)( num_points * blend->num_designs ) )\n            {\n              FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                         \" incorrect number of multiple masters arguments\\n\" ));\n              goto Syntax_Error;\n            }\n\n            /* We want to compute                                    */\n            /*                                                       */\n            /*   a0*w0 + a1*w1 + ... + ak*wk                         */\n            /*                                                       */\n            /* but we only have a0, a1-a0, a2-a0, ..., ak-a0.        */\n            /*                                                       */\n            /* However, given that w0 + w1 + ... + wk == 1, we can   */\n            /* rewrite it easily as                                  */\n            /*                                                       */\n            /*   a0 + (a1-a0)*w1 + (a2-a0)*w2 + ... + (ak-a0)*wk     */\n            /*                                                       */\n            /* where k == num_designs-1.                             */\n            /*                                                       */\n            /* I guess that's why it's written in this `compact'     */\n            /* form.                                                 */\n            /*                                                       */\n            delta  = top + num_points;\n            values = top;\n            for ( nn = 0; nn < num_points; nn++ )\n            {\n              FT_Long  tmp = values[0];\n\n\n              for ( mm = 1; mm < blend->num_designs; mm++ )\n                tmp += FT_MulFix( *delta++, blend->weight_vector[mm] );\n\n              *values++ = tmp;\n            }\n\n            known_othersubr_result_cnt = num_points;\n            break;\n          }\n\n        case 19:\n          /* <idx> 1 19 callothersubr                             */\n          /* => replace elements starting from index cvi( <idx> ) */\n          /*    of BuildCharArray with WeightVector               */\n          {\n            FT_Int    idx;\n            PS_Blend  blend = decoder->blend;\n\n\n            if ( arg_cnt != 1 || blend == NULL )\n              goto Unexpected_OtherSubr;\n\n            idx = Fix2Int( top[0] );\n\n            if ( idx < 0                                           ||\n                 idx + blend->num_designs > decoder->len_buildchar )\n              goto Unexpected_OtherSubr;\n\n            ft_memcpy( &decoder->buildchar[idx],\n                       blend->weight_vector,\n                       blend->num_designs *\n                         sizeof ( blend->weight_vector[0] ) );\n          }\n          break;\n\n        case 20:\n          /* <arg1> <arg2> 2 20 callothersubr pop   */\n          /* ==> push <arg1> + <arg2> onto T1 stack */\n          if ( arg_cnt != 2 )\n            goto Unexpected_OtherSubr;\n\n          top[0] += top[1]; /* XXX (over|under)flow */\n\n          known_othersubr_result_cnt = 1;\n          break;\n\n        case 21:\n          /* <arg1> <arg2> 2 21 callothersubr pop   */\n          /* ==> push <arg1> - <arg2> onto T1 stack */\n          if ( arg_cnt != 2 )\n            goto Unexpected_OtherSubr;\n\n          top[0] -= top[1]; /* XXX (over|under)flow */\n\n          known_othersubr_result_cnt = 1;\n          break;\n\n        case 22:\n          /* <arg1> <arg2> 2 22 callothersubr pop   */\n          /* ==> push <arg1> * <arg2> onto T1 stack */\n          if ( arg_cnt != 2 )\n            goto Unexpected_OtherSubr;\n\n          top[0] = FT_MulFix( top[0], top[1] );\n\n          known_othersubr_result_cnt = 1;\n          break;\n\n        case 23:\n          /* <arg1> <arg2> 2 23 callothersubr pop   */\n          /* ==> push <arg1> / <arg2> onto T1 stack */\n          if ( arg_cnt != 2 || top[1] == 0 )\n            goto Unexpected_OtherSubr;\n\n          top[0] = FT_DivFix( top[0], top[1] );\n\n          known_othersubr_result_cnt = 1;\n          break;\n\n        case 24:\n          /* <val> <idx> 2 24 callothersubr               */\n          /* ==> set BuildCharArray[cvi( <idx> )] = <val> */\n          {\n            FT_Int    idx;\n            PS_Blend  blend = decoder->blend;\n\n\n            if ( arg_cnt != 2 || blend == NULL )\n              goto Unexpected_OtherSubr;\n\n            idx = Fix2Int( top[1] );\n\n            if ( idx < 0 || (FT_UInt) idx >= decoder->len_buildchar )\n              goto Unexpected_OtherSubr;\n\n            decoder->buildchar[idx] = top[0];\n          }\n          break;\n\n        case 25:\n          /* <idx> 1 25 callothersubr pop        */\n          /* ==> push BuildCharArray[cvi( idx )] */\n          /*     onto T1 stack                   */\n          {\n            FT_Int    idx;\n            PS_Blend  blend = decoder->blend;\n\n\n            if ( arg_cnt != 1 || blend == NULL )\n              goto Unexpected_OtherSubr;\n\n            idx = Fix2Int( top[0] );\n\n            if ( idx < 0 || (FT_UInt) idx >= decoder->len_buildchar )\n              goto Unexpected_OtherSubr;\n\n            top[0] = decoder->buildchar[idx];\n          }\n\n          known_othersubr_result_cnt = 1;\n          break;\n\n#if 0\n        case 26:\n          /* <val> mark <idx> ==> set BuildCharArray[cvi( <idx> )] = <val>, */\n          /*                      leave mark on T1 stack                    */\n          /* <val> <idx>      ==> set BuildCharArray[cvi( <idx> )] = <val>  */\n          XXX which routine has left its mark on the (PostScript) stack?;\n          break;\n#endif\n\n        case 27:\n          /* <res1> <res2> <val1> <val2> 4 27 callothersubr pop */\n          /* ==> push <res1> onto T1 stack if <val1> <= <val2>, */\n          /*     otherwise push <res2>                          */\n          if ( arg_cnt != 4 )\n            goto Unexpected_OtherSubr;\n\n          if ( top[2] > top[3] )\n            top[0] = top[1];\n\n          known_othersubr_result_cnt = 1;\n          break;\n\n        case 28:\n          /* 0 28 callothersubr pop                               */\n          /* => push random value from interval [0, 1) onto stack */\n          if ( arg_cnt != 0 )\n            goto Unexpected_OtherSubr;\n\n          {\n            FT_Fixed  Rand;\n\n\n            Rand = seed;\n            if ( Rand >= 0x8000L )\n              Rand++;\n\n            top[0] = Rand;\n\n            seed = FT_MulFix( seed, 0x10000L - seed );\n            if ( seed == 0 )\n              seed += 0x2873;\n          }\n\n          known_othersubr_result_cnt = 1;\n          break;\n\n        default:\n          if ( arg_cnt >= 0 && subr_no >= 0 )\n          {\n            FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                       \" unknown othersubr [%d %d], wish me luck\\n\",\n                       arg_cnt, subr_no ));\n            unknown_othersubr_result_cnt = arg_cnt;\n            break;\n          }\n          /* fall through */\n\n        Unexpected_OtherSubr:\n          FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                     \" invalid othersubr [%d %d]\\n\", arg_cnt, subr_no ));\n          goto Syntax_Error;\n        }\n\n        top += known_othersubr_result_cnt;\n\n        decoder->top = top;\n      }\n      else  /* general operator */\n      {\n        FT_Int  num_args = t1_args_count[op];\n\n\n        FT_ASSERT( num_args >= 0 );\n\n        if ( top - decoder->stack < num_args )\n          goto Stack_Underflow;\n\n        /* XXX Operators usually take their operands from the        */\n        /*     bottom of the stack, i.e., the operands are           */\n        /*     decoder->stack[0], ..., decoder->stack[num_args - 1]; */\n        /*     only div, callsubr, and callothersubr are different.  */\n        /*     In practice it doesn't matter (?).                    */\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n        switch ( op )\n        {\n        case op_callsubr:\n        case op_div:\n        case op_callothersubr:\n        case op_pop:\n        case op_return:\n          break;\n\n        default:\n          if ( top - decoder->stack != num_args )\n            FT_TRACE0(( \"t1_decoder_parse_charstrings:\"\n                        \" too much operands on the stack\"\n                        \" (seen %d, expected %d)\\n\",\n                        top - decoder->stack, num_args ));\n            break;\n        }\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n        top -= num_args;\n\n        switch ( op )\n        {\n        case op_endchar:\n          FT_TRACE4(( \" endchar\\n\" ));\n\n          t1_builder_close_contour( builder );\n\n          /* close hints recording session */\n          if ( hinter )\n          {\n            if ( hinter->close( hinter->hints, builder->current->n_points ) )\n              goto Syntax_Error;\n\n            /* apply hints to the loaded glyph outline now */\n            error = hinter->apply( hinter->hints,\n                                   builder->current,\n                                   (PSH_Globals)builder->hints_globals,\n                                   decoder->hint_mode );\n            if ( error )\n              goto Fail;\n          }\n\n          /* add current outline to the glyph slot */\n          FT_GlyphLoader_Add( builder->loader );\n\n          /* the compiler should optimize away this empty loop but ... */\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n          if ( decoder->len_buildchar > 0 )\n          {\n            FT_UInt  i;\n\n\n            FT_TRACE4(( \"BuildCharArray = [ \" ));\n\n            for ( i = 0; i < decoder->len_buildchar; ++i )\n              FT_TRACE4(( \"%d \", decoder->buildchar[i] ));\n\n            FT_TRACE4(( \"]\\n\" ));\n          }\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n          FT_TRACE4(( \"\\n\" ));\n\n          /* return now! */\n          return FT_Err_Ok;\n\n        case op_hsbw:\n          FT_TRACE4(( \" hsbw\" ));\n\n          builder->parse_state = T1_Parse_Have_Width;\n\n          builder->left_bearing.x += top[0];\n          builder->advance.x       = top[1];\n          builder->advance.y       = 0;\n\n          orig_x = x = builder->pos_x + top[0];\n          orig_y = y = builder->pos_y;\n\n          FT_UNUSED( orig_y );\n\n          /* the `metrics_only' indicates that we only want to compute */\n          /* the glyph's metrics (lsb + advance width), not load the   */\n          /* rest of it; so exit immediately                           */\n          if ( builder->metrics_only )\n            return FT_Err_Ok;\n\n          break;\n\n        case op_seac:\n          return t1operator_seac( decoder,\n                                  top[0],\n                                  top[1],\n                                  top[2],\n                                  Fix2Int( top[3] ),\n                                  Fix2Int( top[4] ) );\n\n        case op_sbw:\n          FT_TRACE4(( \" sbw\" ));\n\n          builder->parse_state = T1_Parse_Have_Width;\n\n          builder->left_bearing.x += top[0];\n          builder->left_bearing.y += top[1];\n          builder->advance.x       = top[2];\n          builder->advance.y       = top[3];\n\n          x = builder->pos_x + top[0];\n          y = builder->pos_y + top[1];\n\n          /* the `metrics_only' indicates that we only want to compute */\n          /* the glyph's metrics (lsb + advance width), not load the   */\n          /* rest of it; so exit immediately                           */\n          if ( builder->metrics_only )\n            return FT_Err_Ok;\n\n          break;\n\n        case op_closepath:\n          FT_TRACE4(( \" closepath\" ));\n\n          /* if there is no path, `closepath' is a no-op */\n          if ( builder->parse_state == T1_Parse_Have_Path   ||\n               builder->parse_state == T1_Parse_Have_Moveto )\n            t1_builder_close_contour( builder );\n\n          builder->parse_state = T1_Parse_Have_Width;\n          break;\n\n        case op_hlineto:\n          FT_TRACE4(( \" hlineto\" ));\n\n          if ( ( error = t1_builder_start_point( builder, x, y ) )\n                 != FT_Err_Ok )\n            goto Fail;\n\n          x += top[0];\n          goto Add_Line;\n\n        case op_hmoveto:\n          FT_TRACE4(( \" hmoveto\" ));\n\n          x += top[0];\n          if ( !decoder->flex_state )\n          {\n            if ( builder->parse_state == T1_Parse_Start )\n              goto Syntax_Error;\n            builder->parse_state = T1_Parse_Have_Moveto;\n          }\n          break;\n\n        case op_hvcurveto:\n          FT_TRACE4(( \" hvcurveto\" ));\n\n          if ( ( error = t1_builder_start_point( builder, x, y ) )\n                 != FT_Err_Ok                                   ||\n               ( error = t1_builder_check_points( builder, 3 ) )\n                 != FT_Err_Ok                                   )\n            goto Fail;\n\n          x += top[0];\n          t1_builder_add_point( builder, x, y, 0 );\n          x += top[1];\n          y += top[2];\n          t1_builder_add_point( builder, x, y, 0 );\n          y += top[3];\n          t1_builder_add_point( builder, x, y, 1 );\n          break;\n\n        case op_rlineto:\n          FT_TRACE4(( \" rlineto\" ));\n\n          if ( ( error = t1_builder_start_point( builder, x, y ) )\n                 != FT_Err_Ok )\n            goto Fail;\n\n          x += top[0];\n          y += top[1];\n\n        Add_Line:\n          if ( ( error = t1_builder_add_point1( builder, x, y ) )\n                 != FT_Err_Ok )\n            goto Fail;\n          break;\n\n        case op_rmoveto:\n          FT_TRACE4(( \" rmoveto\" ));\n\n          x += top[0];\n          y += top[1];\n          if ( !decoder->flex_state )\n          {\n            if ( builder->parse_state == T1_Parse_Start )\n              goto Syntax_Error;\n            builder->parse_state = T1_Parse_Have_Moveto;\n          }\n          break;\n\n        case op_rrcurveto:\n          FT_TRACE4(( \" rrcurveto\" ));\n\n          if ( ( error = t1_builder_start_point( builder, x, y ) )\n                 != FT_Err_Ok                                   ||\n               ( error = t1_builder_check_points( builder, 3 ) )\n                 != FT_Err_Ok                                   )\n            goto Fail;\n\n          x += top[0];\n          y += top[1];\n          t1_builder_add_point( builder, x, y, 0 );\n\n          x += top[2];\n          y += top[3];\n          t1_builder_add_point( builder, x, y, 0 );\n\n          x += top[4];\n          y += top[5];\n          t1_builder_add_point( builder, x, y, 1 );\n          break;\n\n        case op_vhcurveto:\n          FT_TRACE4(( \" vhcurveto\" ));\n\n          if ( ( error = t1_builder_start_point( builder, x, y ) )\n                 != FT_Err_Ok                                   ||\n               ( error = t1_builder_check_points( builder, 3 ) )\n                 != FT_Err_Ok                                   )\n            goto Fail;\n\n          y += top[0];\n          t1_builder_add_point( builder, x, y, 0 );\n          x += top[1];\n          y += top[2];\n          t1_builder_add_point( builder, x, y, 0 );\n          x += top[3];\n          t1_builder_add_point( builder, x, y, 1 );\n          break;\n\n        case op_vlineto:\n          FT_TRACE4(( \" vlineto\" ));\n\n          if ( ( error = t1_builder_start_point( builder, x, y ) )\n                 != FT_Err_Ok )\n            goto Fail;\n\n          y += top[0];\n          goto Add_Line;\n\n        case op_vmoveto:\n          FT_TRACE4(( \" vmoveto\" ));\n\n          y += top[0];\n          if ( !decoder->flex_state )\n          {\n            if ( builder->parse_state == T1_Parse_Start )\n              goto Syntax_Error;\n            builder->parse_state = T1_Parse_Have_Moveto;\n          }\n          break;\n\n        case op_div:\n          FT_TRACE4(( \" div\" ));\n\n          /* if `large_int' is set, we divide unscaled numbers; */\n          /* otherwise, we divide numbers in 16.16 format --    */\n          /* in both cases, it is the same operation            */\n          *top = FT_DivFix( top[0], top[1] );\n          ++top;\n\n          large_int = FALSE;\n          break;\n\n        case op_callsubr:\n          {\n            FT_Int  idx;\n\n\n            FT_TRACE4(( \" callsubr\" ));\n\n            idx = Fix2Int( top[0] );\n            if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs )\n            {\n              FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                         \" invalid subrs index\\n\" ));\n              goto Syntax_Error;\n            }\n\n            if ( zone - decoder->zones >= T1_MAX_SUBRS_CALLS )\n            {\n              FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                         \" too many nested subrs\\n\" ));\n              goto Syntax_Error;\n            }\n\n            zone->cursor = ip;  /* save current instruction pointer */\n\n            zone++;\n\n            /* The Type 1 driver stores subroutines without the seed bytes. */\n            /* The CID driver stores subroutines with seed bytes.  This     */\n            /* case is taken care of when decoder->subrs_len == 0.          */\n            zone->base = decoder->subrs[idx];\n\n            if ( decoder->subrs_len )\n              zone->limit = zone->base + decoder->subrs_len[idx];\n            else\n            {\n              /* We are using subroutines from a CID font.  We must adjust */\n              /* for the seed bytes.                                       */\n              zone->base  += ( decoder->lenIV >= 0 ? decoder->lenIV : 0 );\n              zone->limit  = decoder->subrs[idx + 1];\n            }\n\n            zone->cursor = zone->base;\n\n            if ( !zone->base )\n            {\n              FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                         \" invoking empty subrs\\n\" ));\n              goto Syntax_Error;\n            }\n\n            decoder->zone = zone;\n            ip            = zone->base;\n            limit         = zone->limit;\n            break;\n          }\n\n        case op_pop:\n          FT_TRACE4(( \" pop\" ));\n\n          if ( known_othersubr_result_cnt > 0 )\n          {\n            known_othersubr_result_cnt--;\n            /* ignore, we pushed the operands ourselves */\n            break;\n          }\n\n          if ( unknown_othersubr_result_cnt == 0 )\n          {\n            FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                       \" no more operands for othersubr\\n\" ));\n            goto Syntax_Error;\n          }\n\n          unknown_othersubr_result_cnt--;\n          top++;   /* `push' the operand to callothersubr onto the stack */\n          break;\n\n        case op_return:\n          FT_TRACE4(( \" return\" ));\n\n          if ( zone <= decoder->zones )\n          {\n            FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                       \" unexpected return\\n\" ));\n            goto Syntax_Error;\n          }\n\n          zone--;\n          ip            = zone->cursor;\n          limit         = zone->limit;\n          decoder->zone = zone;\n          break;\n\n        case op_dotsection:\n          FT_TRACE4(( \" dotsection\" ));\n\n          break;\n\n        case op_hstem:\n          FT_TRACE4(( \" hstem\" ));\n\n          /* record horizontal hint */\n          if ( hinter )\n          {\n            /* top[0] += builder->left_bearing.y; */\n            hinter->stem( hinter->hints, 1, top );\n          }\n          break;\n\n        case op_hstem3:\n          FT_TRACE4(( \" hstem3\" ));\n\n          /* record horizontal counter-controlled hints */\n          if ( hinter )\n            hinter->stem3( hinter->hints, 1, top );\n          break;\n\n        case op_vstem:\n          FT_TRACE4(( \" vstem\" ));\n\n          /* record vertical hint */\n          if ( hinter )\n          {\n            top[0] += orig_x;\n            hinter->stem( hinter->hints, 0, top );\n          }\n          break;\n\n        case op_vstem3:\n          FT_TRACE4(( \" vstem3\" ));\n\n          /* record vertical counter-controlled hints */\n          if ( hinter )\n          {\n            FT_Pos  dx = orig_x;\n\n\n            top[0] += dx;\n            top[2] += dx;\n            top[4] += dx;\n            hinter->stem3( hinter->hints, 0, top );\n          }\n          break;\n\n        case op_setcurrentpoint:\n          FT_TRACE4(( \" setcurrentpoint\" ));\n\n          /* From the T1 specification, section 6.4:                */\n          /*                                                        */\n          /*   The setcurrentpoint command is used only in          */\n          /*   conjunction with results from OtherSubrs procedures. */\n\n          /* known_othersubr_result_cnt != 0 is already handled     */\n          /* above.                                                 */\n\n          /* Note, however, that both Ghostscript and Adobe         */\n          /* Distiller handle this situation by silently ignoring   */\n          /* the inappropriate `setcurrentpoint' instruction.  So   */\n          /* we do the same.                                        */\n#if 0\n\n          if ( decoder->flex_state != 1 )\n          {\n            FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                       \" unexpected `setcurrentpoint'\\n\" ));\n            goto Syntax_Error;\n          }\n          else\n            ...\n#endif\n\n          x = top[0];\n          y = top[1];\n          decoder->flex_state = 0;\n          break;\n\n        case op_unknown15:\n          FT_TRACE4(( \" opcode_15\" ));\n          /* nothing to do except to pop the two arguments */\n          break;\n\n        default:\n          FT_ERROR(( \"t1_decoder_parse_charstrings:\"\n                     \" unhandled opcode %d\\n\", op ));\n          goto Syntax_Error;\n        }\n\n        /* XXX Operators usually clear the operand stack;  */\n        /*     only div, callsubr, callothersubr, pop, and */\n        /*     return are different.                       */\n        /*     In practice it doesn't matter (?).          */\n\n        decoder->top = top;\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n        FT_TRACE4(( \"\\n\" ));\n        bol = TRUE;\n#endif\n\n      } /* general operator processing */\n\n    } /* while ip < limit */\n\n    FT_TRACE4(( \"..end..\\n\\n\" ));\n\n  Fail:\n    return error;\n\n  Syntax_Error:\n    return FT_THROW( Syntax_Error );\n\n  Stack_Underflow:\n    return FT_THROW( Stack_Underflow );\n  }\n\n\n  /* parse a single Type 1 glyph */\n  FT_LOCAL_DEF( FT_Error )\n  t1_decoder_parse_glyph( T1_Decoder  decoder,\n                          FT_UInt     glyph )\n  {\n    return decoder->parse_callback( decoder, glyph );\n  }\n\n\n  /* initialize T1 decoder */\n  FT_LOCAL_DEF( FT_Error )\n  t1_decoder_init( T1_Decoder           decoder,\n                   FT_Face              face,\n                   FT_Size              size,\n                   FT_GlyphSlot         slot,\n                   FT_Byte**            glyph_names,\n                   PS_Blend             blend,\n                   FT_Bool              hinting,\n                   FT_Render_Mode       hint_mode,\n                   T1_Decoder_Callback  parse_callback )\n  {\n    FT_MEM_ZERO( decoder, sizeof ( *decoder ) );\n\n    /* retrieve PSNames interface from list of current modules */\n    {\n      FT_Service_PsCMaps  psnames = 0;\n\n\n      FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );\n      if ( !psnames )\n      {\n        FT_ERROR(( \"t1_decoder_init:\"\n                   \" the `psnames' module is not available\\n\" ));\n        return FT_THROW( Unimplemented_Feature );\n      }\n\n      decoder->psnames = psnames;\n    }\n\n    t1_builder_init( &decoder->builder, face, size, slot, hinting );\n\n    /* decoder->buildchar and decoder->len_buildchar have to be  */\n    /* initialized by the caller since we cannot know the length */\n    /* of the BuildCharArray                                     */\n\n    decoder->num_glyphs     = (FT_UInt)face->num_glyphs;\n    decoder->glyph_names    = glyph_names;\n    decoder->hint_mode      = hint_mode;\n    decoder->blend          = blend;\n    decoder->parse_callback = parse_callback;\n\n    decoder->funcs          = t1_decoder_funcs;\n\n    return FT_Err_Ok;\n  }\n\n\n  /* finalize T1 decoder */\n  FT_LOCAL_DEF( void )\n  t1_decoder_done( T1_Decoder  decoder )\n  {\n    t1_builder_done( &decoder->builder );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psaux/t1decode.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1decode.h                                                             */\n/*                                                                         */\n/*    PostScript Type 1 decoding routines (specification).                 */\n/*                                                                         */\n/*  Copyright 2000-2001, 2002, 2003 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1DECODE_H__\n#define __T1DECODE_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_CALLBACK_TABLE\n  const T1_Decoder_FuncsRec  t1_decoder_funcs;\n\n\n  FT_LOCAL( FT_Error )\n  t1_decoder_parse_glyph( T1_Decoder  decoder,\n                          FT_UInt     glyph_index );\n\n  FT_LOCAL( FT_Error )\n  t1_decoder_parse_charstrings( T1_Decoder  decoder,\n                                FT_Byte*    base,\n                                FT_UInt     len );\n\n  FT_LOCAL( FT_Error )\n  t1_decoder_init( T1_Decoder           decoder,\n                   FT_Face              face,\n                   FT_Size              size,\n                   FT_GlyphSlot         slot,\n                   FT_Byte**            glyph_names,\n                   PS_Blend             blend,\n                   FT_Bool              hinting,\n                   FT_Render_Mode       hint_mode,\n                   T1_Decoder_Callback  parse_glyph );\n\n  FT_LOCAL( void )\n  t1_decoder_done( T1_Decoder  decoder );\n\n\nFT_END_HEADER\n\n#endif /* __T1DECODE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshalgo.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshalgo.c                                                              */\n/*                                                                         */\n/*    PostScript hinting algorithm (body).                                 */\n/*                                                                         */\n/*  Copyright 2001-2010, 2012-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used        */\n/*  modified and distributed under the terms of the FreeType project       */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_CALC_H\n#include \"pshalgo.h\"\n\n#include \"pshnterr.h\"\n\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_pshalgo2\n\n\n#ifdef DEBUG_HINTER\n  PSH_Hint_Table  ps_debug_hint_table = 0;\n  PSH_HintFunc    ps_debug_hint_func  = 0;\n  PSH_Glyph       ps_debug_glyph      = 0;\n#endif\n\n\n#define  COMPUTE_INFLEXS  /* compute inflection points to optimize `S' */\n                          /* and similar glyphs                        */\n#define  STRONGER         /* slightly increase the contrast of smooth  */\n                          /* hinting                                   */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                  BASIC HINTS RECORDINGS                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* return true if two stem hints overlap */\n  static FT_Int\n  psh_hint_overlap( PSH_Hint  hint1,\n                    PSH_Hint  hint2 )\n  {\n    return hint1->org_pos + hint1->org_len >= hint2->org_pos &&\n           hint2->org_pos + hint2->org_len >= hint1->org_pos;\n  }\n\n\n  /* destroy hints table */\n  static void\n  psh_hint_table_done( PSH_Hint_Table  table,\n                       FT_Memory       memory )\n  {\n    FT_FREE( table->zones );\n    table->num_zones = 0;\n    table->zone      = 0;\n\n    FT_FREE( table->sort );\n    FT_FREE( table->hints );\n    table->num_hints   = 0;\n    table->max_hints   = 0;\n    table->sort_global = 0;\n  }\n\n\n  /* deactivate all hints in a table */\n  static void\n  psh_hint_table_deactivate( PSH_Hint_Table  table )\n  {\n    FT_UInt   count = table->max_hints;\n    PSH_Hint  hint  = table->hints;\n\n\n    for ( ; count > 0; count--, hint++ )\n    {\n      psh_hint_deactivate( hint );\n      hint->order = -1;\n    }\n  }\n\n\n  /* internal function to record a new hint */\n  static void\n  psh_hint_table_record( PSH_Hint_Table  table,\n                         FT_UInt         idx )\n  {\n    PSH_Hint  hint = table->hints + idx;\n\n\n    if ( idx >= table->max_hints )\n    {\n      FT_TRACE0(( \"psh_hint_table_record: invalid hint index %d\\n\", idx ));\n      return;\n    }\n\n    /* ignore active hints */\n    if ( psh_hint_is_active( hint ) )\n      return;\n\n    psh_hint_activate( hint );\n\n    /* now scan the current active hint set to check */\n    /* whether `hint' overlaps with another hint     */\n    {\n      PSH_Hint*  sorted = table->sort_global;\n      FT_UInt    count  = table->num_hints;\n      PSH_Hint   hint2;\n\n\n      hint->parent = 0;\n      for ( ; count > 0; count--, sorted++ )\n      {\n        hint2 = sorted[0];\n\n        if ( psh_hint_overlap( hint, hint2 ) )\n        {\n          hint->parent = hint2;\n          break;\n        }\n      }\n    }\n\n    if ( table->num_hints < table->max_hints )\n      table->sort_global[table->num_hints++] = hint;\n    else\n      FT_TRACE0(( \"psh_hint_table_record: too many sorted hints!  BUG!\\n\" ));\n  }\n\n\n  static void\n  psh_hint_table_record_mask( PSH_Hint_Table  table,\n                              PS_Mask         hint_mask )\n  {\n    FT_Int    mask = 0, val = 0;\n    FT_Byte*  cursor = hint_mask->bytes;\n    FT_UInt   idx, limit;\n\n\n    limit = hint_mask->num_bits;\n\n    for ( idx = 0; idx < limit; idx++ )\n    {\n      if ( mask == 0 )\n      {\n        val  = *cursor++;\n        mask = 0x80;\n      }\n\n      if ( val & mask )\n        psh_hint_table_record( table, idx );\n\n      mask >>= 1;\n    }\n  }\n\n\n  /* create hints table */\n  static FT_Error\n  psh_hint_table_init( PSH_Hint_Table  table,\n                       PS_Hint_Table   hints,\n                       PS_Mask_Table   hint_masks,\n                       PS_Mask_Table   counter_masks,\n                       FT_Memory       memory )\n  {\n    FT_UInt   count;\n    FT_Error  error;\n\n    FT_UNUSED( counter_masks );\n\n\n    count = hints->num_hints;\n\n    /* allocate our tables */\n    if ( FT_NEW_ARRAY( table->sort,  2 * count     ) ||\n         FT_NEW_ARRAY( table->hints,     count     ) ||\n         FT_NEW_ARRAY( table->zones, 2 * count + 1 ) )\n      goto Exit;\n\n    table->max_hints   = count;\n    table->sort_global = table->sort + count;\n    table->num_hints   = 0;\n    table->num_zones   = 0;\n    table->zone        = 0;\n\n    /* initialize the `table->hints' array */\n    {\n      PSH_Hint  write = table->hints;\n      PS_Hint   read  = hints->hints;\n\n\n      for ( ; count > 0; count--, write++, read++ )\n      {\n        write->org_pos = read->pos;\n        write->org_len = read->len;\n        write->flags   = read->flags;\n      }\n    }\n\n    /* we now need to determine the initial `parent' stems; first  */\n    /* activate the hints that are given by the initial hint masks */\n    if ( hint_masks )\n    {\n      PS_Mask  mask = hint_masks->masks;\n\n\n      count             = hint_masks->num_masks;\n      table->hint_masks = hint_masks;\n\n      for ( ; count > 0; count--, mask++ )\n        psh_hint_table_record_mask( table, mask );\n    }\n\n    /* finally, do a linear parse in case some hints were left alone */\n    if ( table->num_hints != table->max_hints )\n    {\n      FT_UInt  idx;\n\n\n      FT_TRACE0(( \"psh_hint_table_init: missing/incorrect hint masks\\n\" ));\n\n      count = table->max_hints;\n      for ( idx = 0; idx < count; idx++ )\n        psh_hint_table_record( table, idx );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  psh_hint_table_activate_mask( PSH_Hint_Table  table,\n                                PS_Mask         hint_mask )\n  {\n    FT_Int    mask = 0, val = 0;\n    FT_Byte*  cursor = hint_mask->bytes;\n    FT_UInt   idx, limit, count;\n\n\n    limit = hint_mask->num_bits;\n    count = 0;\n\n    psh_hint_table_deactivate( table );\n\n    for ( idx = 0; idx < limit; idx++ )\n    {\n      if ( mask == 0 )\n      {\n        val  = *cursor++;\n        mask = 0x80;\n      }\n\n      if ( val & mask )\n      {\n        PSH_Hint  hint = &table->hints[idx];\n\n\n        if ( !psh_hint_is_active( hint ) )\n        {\n          FT_UInt     count2;\n\n#if 0\n          PSH_Hint*  sort = table->sort;\n          PSH_Hint   hint2;\n\n\n          for ( count2 = count; count2 > 0; count2--, sort++ )\n          {\n            hint2 = sort[0];\n            if ( psh_hint_overlap( hint, hint2 ) )\n              FT_TRACE0(( \"psh_hint_table_activate_mask:\"\n                          \" found overlapping hints\\n\" ))\n          }\n#else\n          count2 = 0;\n#endif\n\n          if ( count2 == 0 )\n          {\n            psh_hint_activate( hint );\n            if ( count < table->max_hints )\n              table->sort[count++] = hint;\n            else\n              FT_TRACE0(( \"psh_hint_tableactivate_mask:\"\n                          \" too many active hints\\n\" ));\n          }\n        }\n      }\n\n      mask >>= 1;\n    }\n    table->num_hints = count;\n\n    /* now, sort the hints; they are guaranteed to not overlap */\n    /* so we can compare their \"org_pos\" field directly        */\n    {\n      FT_Int     i1, i2;\n      PSH_Hint   hint1, hint2;\n      PSH_Hint*  sort = table->sort;\n\n\n      /* a simple bubble sort will do, since in 99% of cases, the hints */\n      /* will be already sorted -- and the sort will be linear          */\n      for ( i1 = 1; i1 < (FT_Int)count; i1++ )\n      {\n        hint1 = sort[i1];\n        for ( i2 = i1 - 1; i2 >= 0; i2-- )\n        {\n          hint2 = sort[i2];\n\n          if ( hint2->org_pos < hint1->org_pos )\n            break;\n\n          sort[i2 + 1] = hint2;\n          sort[i2]     = hint1;\n        }\n      }\n    }\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****               HINTS GRID-FITTING AND OPTIMIZATION             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#if 1\n  static FT_Pos\n  psh_dimension_quantize_len( PSH_Dimension  dim,\n                              FT_Pos         len,\n                              FT_Bool        do_snapping )\n  {\n    if ( len <= 64 )\n      len = 64;\n    else\n    {\n      FT_Pos  delta = len - dim->stdw.widths[0].cur;\n\n\n      if ( delta < 0 )\n        delta = -delta;\n\n      if ( delta < 40 )\n      {\n        len = dim->stdw.widths[0].cur;\n        if ( len < 48 )\n          len = 48;\n      }\n\n      if ( len < 3 * 64 )\n      {\n        delta = ( len & 63 );\n        len  &= -64;\n\n        if ( delta < 10 )\n          len += delta;\n\n        else if ( delta < 32 )\n          len += 10;\n\n        else if ( delta < 54 )\n          len += 54;\n\n        else\n          len += delta;\n      }\n      else\n        len = FT_PIX_ROUND( len );\n    }\n\n    if ( do_snapping )\n      len = FT_PIX_ROUND( len );\n\n    return  len;\n  }\n#endif /* 0 */\n\n\n#ifdef DEBUG_HINTER\n\n  static void\n  ps_simple_scale( PSH_Hint_Table  table,\n                   FT_Fixed        scale,\n                   FT_Fixed        delta,\n                   FT_Int          dimension )\n  {\n    FT_UInt  count;\n\n\n    for ( count = 0; count < table->max_hints; count++ )\n    {\n      PSH_Hint  hint = table->hints + count;\n\n\n      hint->cur_pos = FT_MulFix( hint->org_pos, scale ) + delta;\n      hint->cur_len = FT_MulFix( hint->org_len, scale );\n\n      if ( ps_debug_hint_func )\n        ps_debug_hint_func( hint, dimension );\n    }\n  }\n\n#endif /* DEBUG_HINTER */\n\n\n  static FT_Fixed\n  psh_hint_snap_stem_side_delta( FT_Fixed  pos,\n                                 FT_Fixed  len )\n  {\n    FT_Fixed  delta1 = FT_PIX_ROUND( pos ) - pos;\n    FT_Fixed  delta2 = FT_PIX_ROUND( pos + len ) - pos - len;\n\n\n    if ( FT_ABS( delta1 ) <= FT_ABS( delta2 ) )\n      return delta1;\n    else\n      return delta2;\n  }\n\n\n  static void\n  psh_hint_align( PSH_Hint     hint,\n                  PSH_Globals  globals,\n                  FT_Int       dimension,\n                  PSH_Glyph    glyph )\n  {\n    PSH_Dimension  dim   = &globals->dimension[dimension];\n    FT_Fixed       scale = dim->scale_mult;\n    FT_Fixed       delta = dim->scale_delta;\n\n\n    if ( !psh_hint_is_fitted( hint ) )\n    {\n      FT_Pos  pos = FT_MulFix( hint->org_pos, scale ) + delta;\n      FT_Pos  len = FT_MulFix( hint->org_len, scale );\n\n      FT_Int            do_snapping;\n      FT_Pos            fit_len;\n      PSH_AlignmentRec  align;\n\n\n      /* ignore stem alignments when requested through the hint flags */\n      if ( ( dimension == 0 && !glyph->do_horz_hints ) ||\n           ( dimension == 1 && !glyph->do_vert_hints ) )\n      {\n        hint->cur_pos = pos;\n        hint->cur_len = len;\n\n        psh_hint_set_fitted( hint );\n        return;\n      }\n\n      /* perform stem snapping when requested - this is necessary\n       * for monochrome and LCD hinting modes only\n       */\n      do_snapping = ( dimension == 0 && glyph->do_horz_snapping ) ||\n                    ( dimension == 1 && glyph->do_vert_snapping );\n\n      hint->cur_len = fit_len = len;\n\n      /* check blue zones for horizontal stems */\n      align.align     = PSH_BLUE_ALIGN_NONE;\n      align.align_bot = align.align_top = 0;\n\n      if ( dimension == 1 )\n        psh_blues_snap_stem( &globals->blues,\n                             hint->org_pos + hint->org_len,\n                             hint->org_pos,\n                             &align );\n\n      switch ( align.align )\n      {\n      case PSH_BLUE_ALIGN_TOP:\n        /* the top of the stem is aligned against a blue zone */\n        hint->cur_pos = align.align_top - fit_len;\n        break;\n\n      case PSH_BLUE_ALIGN_BOT:\n        /* the bottom of the stem is aligned against a blue zone */\n        hint->cur_pos = align.align_bot;\n        break;\n\n      case PSH_BLUE_ALIGN_TOP | PSH_BLUE_ALIGN_BOT:\n        /* both edges of the stem are aligned against blue zones */\n        hint->cur_pos = align.align_bot;\n        hint->cur_len = align.align_top - align.align_bot;\n        break;\n\n      default:\n        {\n          PSH_Hint  parent = hint->parent;\n\n\n          if ( parent )\n          {\n            FT_Pos  par_org_center, par_cur_center;\n            FT_Pos  cur_org_center, cur_delta;\n\n\n            /* ensure that parent is already fitted */\n            if ( !psh_hint_is_fitted( parent ) )\n              psh_hint_align( parent, globals, dimension, glyph );\n\n            /* keep original relation between hints, this is, use the */\n            /* scaled distance between the centers of the hints to    */\n            /* compute the new position                               */\n            par_org_center = parent->org_pos + ( parent->org_len >> 1 );\n            par_cur_center = parent->cur_pos + ( parent->cur_len >> 1 );\n            cur_org_center = hint->org_pos   + ( hint->org_len   >> 1 );\n\n            cur_delta = FT_MulFix( cur_org_center - par_org_center, scale );\n            pos       = par_cur_center + cur_delta - ( len >> 1 );\n          }\n\n          hint->cur_pos = pos;\n          hint->cur_len = fit_len;\n\n          /* Stem adjustment tries to snap stem widths to standard\n           * ones.  This is important to prevent unpleasant rounding\n           * artefacts.\n           */\n          if ( glyph->do_stem_adjust )\n          {\n            if ( len <= 64 )\n            {\n              /* the stem is less than one pixel; we will center it\n               * around the nearest pixel center\n               */\n              if ( len >= 32 )\n              {\n                /* This is a special case where we also widen the stem\n                 * and align it to the pixel grid.\n                 *\n                 *   stem_center          = pos + (len/2)\n                 *   nearest_pixel_center = FT_ROUND(stem_center-32)+32\n                 *   new_pos              = nearest_pixel_center-32\n                 *                        = FT_ROUND(stem_center-32)\n                 *                        = FT_FLOOR(stem_center-32+32)\n                 *                        = FT_FLOOR(stem_center)\n                 *   new_len              = 64\n                 */\n                pos = FT_PIX_FLOOR( pos + ( len >> 1 ) );\n                len = 64;\n              }\n              else if ( len > 0 )\n              {\n                /* This is a very small stem; we simply align it to the\n                 * pixel grid, trying to find the minimum displacement.\n                 *\n                 * left               = pos\n                 * right              = pos + len\n                 * left_nearest_edge  = ROUND(pos)\n                 * right_nearest_edge = ROUND(right)\n                 *\n                 * if ( ABS(left_nearest_edge - left) <=\n                 *      ABS(right_nearest_edge - right) )\n                 *    new_pos = left\n                 * else\n                 *    new_pos = right\n                 */\n                FT_Pos  left_nearest  = FT_PIX_ROUND( pos );\n                FT_Pos  right_nearest = FT_PIX_ROUND( pos + len );\n                FT_Pos  left_disp     = left_nearest - pos;\n                FT_Pos  right_disp    = right_nearest - ( pos + len );\n\n\n                if ( left_disp < 0 )\n                  left_disp = -left_disp;\n                if ( right_disp < 0 )\n                  right_disp = -right_disp;\n                if ( left_disp <= right_disp )\n                  pos = left_nearest;\n                else\n                  pos = right_nearest;\n              }\n              else\n              {\n                /* this is a ghost stem; we simply round it */\n                pos = FT_PIX_ROUND( pos );\n              }\n            }\n            else\n            {\n              len = psh_dimension_quantize_len( dim, len, 0 );\n            }\n          }\n\n          /* now that we have a good hinted stem width, try to position */\n          /* the stem along a pixel grid integer coordinate             */\n          hint->cur_pos = pos + psh_hint_snap_stem_side_delta( pos, len );\n          hint->cur_len = len;\n        }\n      }\n\n      if ( do_snapping )\n      {\n        pos = hint->cur_pos;\n        len = hint->cur_len;\n\n        if ( len < 64 )\n          len = 64;\n        else\n          len = FT_PIX_ROUND( len );\n\n        switch ( align.align )\n        {\n          case PSH_BLUE_ALIGN_TOP:\n            hint->cur_pos = align.align_top - len;\n            hint->cur_len = len;\n            break;\n\n          case PSH_BLUE_ALIGN_BOT:\n            hint->cur_len = len;\n            break;\n\n          case PSH_BLUE_ALIGN_BOT | PSH_BLUE_ALIGN_TOP:\n            /* don't touch */\n            break;\n\n\n          default:\n            hint->cur_len = len;\n            if ( len & 64 )\n              pos = FT_PIX_FLOOR( pos + ( len >> 1 ) ) + 32;\n            else\n              pos = FT_PIX_ROUND( pos + ( len >> 1 ) );\n\n            hint->cur_pos = pos - ( len >> 1 );\n            hint->cur_len = len;\n        }\n      }\n\n      psh_hint_set_fitted( hint );\n\n#ifdef DEBUG_HINTER\n      if ( ps_debug_hint_func )\n        ps_debug_hint_func( hint, dimension );\n#endif\n    }\n  }\n\n\n#if 0  /* not used for now, experimental */\n\n /*\n  *  A variant to perform \"light\" hinting (i.e. FT_RENDER_MODE_LIGHT)\n  *  of stems\n  */\n  static void\n  psh_hint_align_light( PSH_Hint     hint,\n                        PSH_Globals  globals,\n                        FT_Int       dimension,\n                        PSH_Glyph    glyph )\n  {\n    PSH_Dimension  dim   = &globals->dimension[dimension];\n    FT_Fixed       scale = dim->scale_mult;\n    FT_Fixed       delta = dim->scale_delta;\n\n\n    if ( !psh_hint_is_fitted( hint ) )\n    {\n      FT_Pos  pos = FT_MulFix( hint->org_pos, scale ) + delta;\n      FT_Pos  len = FT_MulFix( hint->org_len, scale );\n\n      FT_Pos  fit_len;\n\n      PSH_AlignmentRec  align;\n\n\n      /* ignore stem alignments when requested through the hint flags */\n      if ( ( dimension == 0 && !glyph->do_horz_hints ) ||\n           ( dimension == 1 && !glyph->do_vert_hints ) )\n      {\n        hint->cur_pos = pos;\n        hint->cur_len = len;\n\n        psh_hint_set_fitted( hint );\n        return;\n      }\n\n      fit_len = len;\n\n      hint->cur_len = fit_len;\n\n      /* check blue zones for horizontal stems */\n      align.align = PSH_BLUE_ALIGN_NONE;\n      align.align_bot = align.align_top = 0;\n\n      if ( dimension == 1 )\n        psh_blues_snap_stem( &globals->blues,\n                             hint->org_pos + hint->org_len,\n                             hint->org_pos,\n                             &align );\n\n      switch ( align.align )\n      {\n      case PSH_BLUE_ALIGN_TOP:\n        /* the top of the stem is aligned against a blue zone */\n        hint->cur_pos = align.align_top - fit_len;\n        break;\n\n      case PSH_BLUE_ALIGN_BOT:\n        /* the bottom of the stem is aligned against a blue zone */\n        hint->cur_pos = align.align_bot;\n        break;\n\n      case PSH_BLUE_ALIGN_TOP | PSH_BLUE_ALIGN_BOT:\n        /* both edges of the stem are aligned against blue zones */\n        hint->cur_pos = align.align_bot;\n        hint->cur_len = align.align_top - align.align_bot;\n        break;\n\n      default:\n        {\n          PSH_Hint  parent = hint->parent;\n\n\n          if ( parent )\n          {\n            FT_Pos  par_org_center, par_cur_center;\n            FT_Pos  cur_org_center, cur_delta;\n\n\n            /* ensure that parent is already fitted */\n            if ( !psh_hint_is_fitted( parent ) )\n              psh_hint_align_light( parent, globals, dimension, glyph );\n\n            par_org_center = parent->org_pos + ( parent->org_len / 2 );\n            par_cur_center = parent->cur_pos + ( parent->cur_len / 2 );\n            cur_org_center = hint->org_pos   + ( hint->org_len   / 2 );\n\n            cur_delta = FT_MulFix( cur_org_center - par_org_center, scale );\n            pos       = par_cur_center + cur_delta - ( len >> 1 );\n          }\n\n          /* Stems less than one pixel wide are easy -- we want to\n           * make them as dark as possible, so they must fall within\n           * one pixel.  If the stem is split between two pixels\n           * then snap the edge that is nearer to the pixel boundary\n           * to the pixel boundary.\n           */\n          if ( len <= 64 )\n          {\n            if ( ( pos + len + 63 ) / 64  != pos / 64 + 1 )\n              pos += psh_hint_snap_stem_side_delta ( pos, len );\n          }\n\n          /* Position stems other to minimize the amount of mid-grays.\n           * There are, in general, two positions that do this,\n           * illustrated as A) and B) below.\n           *\n           *   +                   +                   +                   +\n           *\n           * A)             |--------------------------------|\n           * B)   |--------------------------------|\n           * C)       |--------------------------------|\n           *\n           * Position A) (split the excess stem equally) should be better\n           * for stems of width N + f where f < 0.5.\n           *\n           * Position B) (split the deficiency equally) should be better\n           * for stems of width N + f where f > 0.5.\n           *\n           * It turns out though that minimizing the total number of lit\n           * pixels is also important, so position C), with one edge\n           * aligned with a pixel boundary is actually preferable\n           * to A).  There are also more possibile positions for C) than\n           * for A) or B), so it involves less distortion of the overall\n           * character shape.\n           */\n          else /* len > 64 */\n          {\n            FT_Fixed  frac_len = len & 63;\n            FT_Fixed  center = pos + ( len >> 1 );\n            FT_Fixed  delta_a, delta_b;\n\n\n            if ( ( len / 64 ) & 1 )\n            {\n              delta_a = FT_PIX_FLOOR( center ) + 32 - center;\n              delta_b = FT_PIX_ROUND( center ) - center;\n            }\n            else\n            {\n              delta_a = FT_PIX_ROUND( center ) - center;\n              delta_b = FT_PIX_FLOOR( center ) + 32 - center;\n            }\n\n            /* We choose between B) and C) above based on the amount\n             * of fractinal stem width; for small amounts, choose\n             * C) always, for large amounts, B) always, and inbetween,\n             * pick whichever one involves less stem movement.\n             */\n            if ( frac_len < 32 )\n            {\n              pos += psh_hint_snap_stem_side_delta ( pos, len );\n            }\n            else if ( frac_len < 48 )\n            {\n              FT_Fixed  side_delta = psh_hint_snap_stem_side_delta ( pos,\n                                                                     len );\n\n              if ( FT_ABS( side_delta ) < FT_ABS( delta_b ) )\n                pos += side_delta;\n              else\n                pos += delta_b;\n            }\n            else\n            {\n              pos += delta_b;\n            }\n          }\n\n          hint->cur_pos = pos;\n        }\n      }  /* switch */\n\n      psh_hint_set_fitted( hint );\n\n#ifdef DEBUG_HINTER\n      if ( ps_debug_hint_func )\n        ps_debug_hint_func( hint, dimension );\n#endif\n    }\n  }\n\n#endif /* 0 */\n\n\n  static void\n  psh_hint_table_align_hints( PSH_Hint_Table  table,\n                              PSH_Globals     globals,\n                              FT_Int          dimension,\n                              PSH_Glyph       glyph )\n  {\n    PSH_Hint       hint;\n    FT_UInt        count;\n\n#ifdef DEBUG_HINTER\n\n    PSH_Dimension  dim   = &globals->dimension[dimension];\n    FT_Fixed       scale = dim->scale_mult;\n    FT_Fixed       delta = dim->scale_delta;\n\n\n    if ( ps_debug_no_vert_hints && dimension == 0 )\n    {\n      ps_simple_scale( table, scale, delta, dimension );\n      return;\n    }\n\n    if ( ps_debug_no_horz_hints && dimension == 1 )\n    {\n      ps_simple_scale( table, scale, delta, dimension );\n      return;\n    }\n\n#endif /* DEBUG_HINTER*/\n\n    hint  = table->hints;\n    count = table->max_hints;\n\n    for ( ; count > 0; count--, hint++ )\n      psh_hint_align( hint, globals, dimension, glyph );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                POINTS INTERPOLATION ROUTINES                  *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#define PSH_ZONE_MIN  -3200000L\n#define PSH_ZONE_MAX  +3200000L\n\n#define xxDEBUG_ZONES\n\n\n#ifdef DEBUG_ZONES\n\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n  static void\n  psh_print_zone( PSH_Zone  zone )\n  {\n    printf( \"zone [scale,delta,min,max] = [%.3f,%.3f,%d,%d]\\n\",\n             zone->scale / 65536.0,\n             zone->delta / 64.0,\n             zone->min,\n             zone->max );\n  }\n\n#else\n\n#define psh_print_zone( x )  do { } while ( 0 )\n\n#endif /* DEBUG_ZONES */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    HINTER GLYPH MANAGEMENT                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#if 1\n\n#define  psh_corner_is_flat      ft_corner_is_flat\n#define  psh_corner_orientation  ft_corner_orientation\n\n#else\n\n  FT_LOCAL_DEF( FT_Int )\n  psh_corner_is_flat( FT_Pos  x_in,\n                      FT_Pos  y_in,\n                      FT_Pos  x_out,\n                      FT_Pos  y_out )\n  {\n    FT_Pos  ax = x_in;\n    FT_Pos  ay = y_in;\n\n    FT_Pos  d_in, d_out, d_corner;\n\n\n    if ( ax < 0 )\n      ax = -ax;\n    if ( ay < 0 )\n      ay = -ay;\n    d_in = ax + ay;\n\n    ax = x_out;\n    if ( ax < 0 )\n      ax = -ax;\n    ay = y_out;\n    if ( ay < 0 )\n      ay = -ay;\n    d_out = ax + ay;\n\n    ax = x_out + x_in;\n    if ( ax < 0 )\n      ax = -ax;\n    ay = y_out + y_in;\n    if ( ay < 0 )\n      ay = -ay;\n    d_corner = ax + ay;\n\n    return ( d_in + d_out - d_corner ) < ( d_corner >> 4 );\n  }\n\n  static FT_Int\n  psh_corner_orientation( FT_Pos  in_x,\n                          FT_Pos  in_y,\n                          FT_Pos  out_x,\n                          FT_Pos  out_y )\n  {\n    FT_Int  result;\n\n\n    /* deal with the trivial cases quickly */\n    if ( in_y == 0 )\n    {\n      if ( in_x >= 0 )\n        result = out_y;\n      else\n        result = -out_y;\n    }\n    else if ( in_x == 0 )\n    {\n      if ( in_y >= 0 )\n        result = -out_x;\n      else\n        result = out_x;\n    }\n    else if ( out_y == 0 )\n    {\n      if ( out_x >= 0 )\n        result = in_y;\n      else\n        result = -in_y;\n    }\n    else if ( out_x == 0 )\n    {\n      if ( out_y >= 0 )\n        result = -in_x;\n      else\n        result =  in_x;\n    }\n    else /* general case */\n    {\n      long long  delta = (long long)in_x * out_y - (long long)in_y * out_x;\n\n      if ( delta == 0 )\n        result = 0;\n      else\n        result = 1 - 2 * ( delta < 0 );\n    }\n\n    return result;\n  }\n\n#endif /* !1 */\n\n\n#ifdef COMPUTE_INFLEXS\n\n  /* compute all inflex points in a given glyph */\n  static void\n  psh_glyph_compute_inflections( PSH_Glyph  glyph )\n  {\n    FT_UInt  n;\n\n\n    for ( n = 0; n < glyph->num_contours; n++ )\n    {\n      PSH_Point  first, start, end, before, after;\n      FT_Pos     in_x, in_y, out_x, out_y;\n      FT_Int     orient_prev, orient_cur;\n      FT_Int     finished = 0;\n\n\n      /* we need at least 4 points to create an inflection point */\n      if ( glyph->contours[n].count < 4 )\n        continue;\n\n      /* compute first segment in contour */\n      first = glyph->contours[n].start;\n\n      start = end = first;\n      do\n      {\n        end = end->next;\n        if ( end == first )\n          goto Skip;\n\n        in_x = end->org_u - start->org_u;\n        in_y = end->org_v - start->org_v;\n\n      } while ( in_x == 0 && in_y == 0 );\n\n      /* extend the segment start whenever possible */\n      before = start;\n      do\n      {\n        do\n        {\n          start  = before;\n          before = before->prev;\n          if ( before == first )\n            goto Skip;\n\n          out_x = start->org_u - before->org_u;\n          out_y = start->org_v - before->org_v;\n\n        } while ( out_x == 0 && out_y == 0 );\n\n        orient_prev = psh_corner_orientation( in_x, in_y, out_x, out_y );\n\n      } while ( orient_prev == 0 );\n\n      first = start;\n      in_x  = out_x;\n      in_y  = out_y;\n\n      /* now, process all segments in the contour */\n      do\n      {\n        /* first, extend current segment's end whenever possible */\n        after = end;\n        do\n        {\n          do\n          {\n            end   = after;\n            after = after->next;\n            if ( after == first )\n              finished = 1;\n\n            out_x = after->org_u - end->org_u;\n            out_y = after->org_v - end->org_v;\n\n          } while ( out_x == 0 && out_y == 0 );\n\n          orient_cur = psh_corner_orientation( in_x, in_y, out_x, out_y );\n\n        } while ( orient_cur == 0 );\n\n        if ( ( orient_cur ^ orient_prev ) < 0 )\n        {\n          do\n          {\n            psh_point_set_inflex( start );\n            start = start->next;\n          }\n          while ( start != end );\n\n          psh_point_set_inflex( start );\n        }\n\n        start       = end;\n        end         = after;\n        orient_prev = orient_cur;\n        in_x        = out_x;\n        in_y        = out_y;\n\n      } while ( !finished );\n\n    Skip:\n      ;\n    }\n  }\n\n#endif /* COMPUTE_INFLEXS */\n\n\n  static void\n  psh_glyph_done( PSH_Glyph  glyph )\n  {\n    FT_Memory  memory = glyph->memory;\n\n\n    psh_hint_table_done( &glyph->hint_tables[1], memory );\n    psh_hint_table_done( &glyph->hint_tables[0], memory );\n\n    FT_FREE( glyph->points );\n    FT_FREE( glyph->contours );\n\n    glyph->num_points   = 0;\n    glyph->num_contours = 0;\n\n    glyph->memory = 0;\n  }\n\n\n  static int\n  psh_compute_dir( FT_Pos  dx,\n                   FT_Pos  dy )\n  {\n    FT_Pos  ax, ay;\n    int     result = PSH_DIR_NONE;\n\n\n    ax = FT_ABS( dx );\n    ay = FT_ABS( dy );\n\n    if ( ay * 12 < ax )\n    {\n      /* |dy| <<< |dx|  means a near-horizontal segment */\n      result = ( dx >= 0 ) ? PSH_DIR_RIGHT : PSH_DIR_LEFT;\n    }\n    else if ( ax * 12 < ay )\n    {\n      /* |dx| <<< |dy|  means a near-vertical segment */\n      result = ( dy >= 0 ) ? PSH_DIR_UP : PSH_DIR_DOWN;\n    }\n\n    return result;\n  }\n\n\n  /* load outline point coordinates into hinter glyph */\n  static void\n  psh_glyph_load_points( PSH_Glyph  glyph,\n                         FT_Int     dimension )\n  {\n    FT_Vector*  vec   = glyph->outline->points;\n    PSH_Point   point = glyph->points;\n    FT_UInt     count = glyph->num_points;\n\n\n    for ( ; count > 0; count--, point++, vec++ )\n    {\n      point->flags2 = 0;\n      point->hint   = NULL;\n      if ( dimension == 0 )\n      {\n        point->org_u = vec->x;\n        point->org_v = vec->y;\n      }\n      else\n      {\n        point->org_u = vec->y;\n        point->org_v = vec->x;\n      }\n\n#ifdef DEBUG_HINTER\n      point->org_x = vec->x;\n      point->org_y = vec->y;\n#endif\n\n    }\n  }\n\n\n  /* save hinted point coordinates back to outline */\n  static void\n  psh_glyph_save_points( PSH_Glyph  glyph,\n                         FT_Int     dimension )\n  {\n    FT_UInt     n;\n    PSH_Point   point = glyph->points;\n    FT_Vector*  vec   = glyph->outline->points;\n    char*       tags  = glyph->outline->tags;\n\n\n    for ( n = 0; n < glyph->num_points; n++ )\n    {\n      if ( dimension == 0 )\n        vec[n].x = point->cur_u;\n      else\n        vec[n].y = point->cur_u;\n\n      if ( psh_point_is_strong( point ) )\n        tags[n] |= (char)( ( dimension == 0 ) ? 32 : 64 );\n\n#ifdef DEBUG_HINTER\n\n      if ( dimension == 0 )\n      {\n        point->cur_x   = point->cur_u;\n        point->flags_x = point->flags2 | point->flags;\n      }\n      else\n      {\n        point->cur_y   = point->cur_u;\n        point->flags_y = point->flags2 | point->flags;\n      }\n\n#endif\n\n      point++;\n    }\n  }\n\n\n  static FT_Error\n  psh_glyph_init( PSH_Glyph    glyph,\n                  FT_Outline*  outline,\n                  PS_Hints     ps_hints,\n                  PSH_Globals  globals )\n  {\n    FT_Error   error;\n    FT_Memory  memory;\n\n\n    /* clear all fields */\n    FT_MEM_ZERO( glyph, sizeof ( *glyph ) );\n\n    memory = glyph->memory = globals->memory;\n\n    /* allocate and setup points + contours arrays */\n    if ( FT_NEW_ARRAY( glyph->points,   outline->n_points   ) ||\n         FT_NEW_ARRAY( glyph->contours, outline->n_contours ) )\n      goto Exit;\n\n    glyph->num_points   = outline->n_points;\n    glyph->num_contours = outline->n_contours;\n\n    {\n      FT_UInt      first = 0, next, n;\n      PSH_Point    points  = glyph->points;\n      PSH_Contour  contour = glyph->contours;\n\n\n      for ( n = 0; n < glyph->num_contours; n++ )\n      {\n        FT_Int     count;\n        PSH_Point  point;\n\n\n        next  = outline->contours[n] + 1;\n        count = next - first;\n\n        contour->start = points + first;\n        contour->count = (FT_UInt)count;\n\n        if ( count > 0 )\n        {\n          point = points + first;\n\n          point->prev    = points + next - 1;\n          point->contour = contour;\n\n          for ( ; count > 1; count-- )\n          {\n            point[0].next = point + 1;\n            point[1].prev = point;\n            point++;\n            point->contour = contour;\n          }\n          point->next = points + first;\n        }\n\n        contour++;\n        first = next;\n      }\n    }\n\n    {\n      PSH_Point   points = glyph->points;\n      PSH_Point   point  = points;\n      FT_Vector*  vec    = outline->points;\n      FT_UInt     n;\n\n\n      for ( n = 0; n < glyph->num_points; n++, point++ )\n      {\n        FT_Int  n_prev = (FT_Int)( point->prev - points );\n        FT_Int  n_next = (FT_Int)( point->next - points );\n        FT_Pos  dxi, dyi, dxo, dyo;\n\n\n        if ( !( outline->tags[n] & FT_CURVE_TAG_ON ) )\n          point->flags = PSH_POINT_OFF;\n\n        dxi = vec[n].x - vec[n_prev].x;\n        dyi = vec[n].y - vec[n_prev].y;\n\n        point->dir_in = (FT_Char)psh_compute_dir( dxi, dyi );\n\n        dxo = vec[n_next].x - vec[n].x;\n        dyo = vec[n_next].y - vec[n].y;\n\n        point->dir_out = (FT_Char)psh_compute_dir( dxo, dyo );\n\n        /* detect smooth points */\n        if ( point->flags & PSH_POINT_OFF )\n          point->flags |= PSH_POINT_SMOOTH;\n\n        else if ( point->dir_in == point->dir_out )\n        {\n          if ( point->dir_out != PSH_DIR_NONE           ||\n               psh_corner_is_flat( dxi, dyi, dxo, dyo ) )\n            point->flags |= PSH_POINT_SMOOTH;\n        }\n      }\n    }\n\n    glyph->outline = outline;\n    glyph->globals = globals;\n\n#ifdef COMPUTE_INFLEXS\n    psh_glyph_load_points( glyph, 0 );\n    psh_glyph_compute_inflections( glyph );\n#endif /* COMPUTE_INFLEXS */\n\n    /* now deal with hints tables */\n    error = psh_hint_table_init( &glyph->hint_tables [0],\n                                 &ps_hints->dimension[0].hints,\n                                 &ps_hints->dimension[0].masks,\n                                 &ps_hints->dimension[0].counters,\n                                 memory );\n    if ( error )\n      goto Exit;\n\n    error = psh_hint_table_init( &glyph->hint_tables [1],\n                                 &ps_hints->dimension[1].hints,\n                                 &ps_hints->dimension[1].masks,\n                                 &ps_hints->dimension[1].counters,\n                                 memory );\n    if ( error )\n      goto Exit;\n\n  Exit:\n    return error;\n  }\n\n\n  /* compute all extrema in a glyph for a given dimension */\n  static void\n  psh_glyph_compute_extrema( PSH_Glyph  glyph )\n  {\n    FT_UInt  n;\n\n\n    /* first of all, compute all local extrema */\n    for ( n = 0; n < glyph->num_contours; n++ )\n    {\n      PSH_Point  first = glyph->contours[n].start;\n      PSH_Point  point, before, after;\n\n\n      if ( glyph->contours[n].count == 0 )\n        continue;\n\n      point  = first;\n      before = point;\n\n      do\n      {\n        before = before->prev;\n        if ( before == first )\n          goto Skip;\n\n      } while ( before->org_u == point->org_u );\n\n      first = point = before->next;\n\n      for (;;)\n      {\n        after = point;\n        do\n        {\n          after = after->next;\n          if ( after == first )\n            goto Next;\n\n        } while ( after->org_u == point->org_u );\n\n        if ( before->org_u < point->org_u )\n        {\n          if ( after->org_u < point->org_u )\n          {\n            /* local maximum */\n            goto Extremum;\n          }\n        }\n        else /* before->org_u > point->org_u */\n        {\n          if ( after->org_u > point->org_u )\n          {\n            /* local minimum */\n          Extremum:\n            do\n            {\n              psh_point_set_extremum( point );\n              point = point->next;\n\n            } while ( point != after );\n          }\n        }\n\n        before = after->prev;\n        point  = after;\n\n      } /* for  */\n\n    Next:\n      ;\n    }\n\n    /* for each extremum, determine its direction along the */\n    /* orthogonal axis                                      */\n    for ( n = 0; n < glyph->num_points; n++ )\n    {\n      PSH_Point  point, before, after;\n\n\n      point  = &glyph->points[n];\n      before = point;\n      after  = point;\n\n      if ( psh_point_is_extremum( point ) )\n      {\n        do\n        {\n          before = before->prev;\n          if ( before == point )\n            goto Skip;\n\n        } while ( before->org_v == point->org_v );\n\n        do\n        {\n          after = after->next;\n          if ( after == point )\n            goto Skip;\n\n        } while ( after->org_v == point->org_v );\n      }\n\n      if ( before->org_v < point->org_v &&\n           after->org_v  > point->org_v )\n      {\n        psh_point_set_positive( point );\n      }\n      else if ( before->org_v > point->org_v &&\n                after->org_v  < point->org_v )\n      {\n        psh_point_set_negative( point );\n      }\n\n    Skip:\n      ;\n    }\n  }\n\n\n  /* major_dir is the direction for points on the bottom/left of the stem; */\n  /* Points on the top/right of the stem will have a direction of          */\n  /* -major_dir.                                                           */\n\n  static void\n  psh_hint_table_find_strong_points( PSH_Hint_Table  table,\n                                     PSH_Point       point,\n                                     FT_UInt         count,\n                                     FT_Int          threshold,\n                                     FT_Int          major_dir )\n  {\n    PSH_Hint*  sort      = table->sort;\n    FT_UInt    num_hints = table->num_hints;\n\n\n    for ( ; count > 0; count--, point++ )\n    {\n      FT_Int  point_dir = 0;\n      FT_Pos  org_u     = point->org_u;\n\n\n      if ( psh_point_is_strong( point ) )\n        continue;\n\n      if ( PSH_DIR_COMPARE( point->dir_in, major_dir ) )\n        point_dir = point->dir_in;\n\n      else if ( PSH_DIR_COMPARE( point->dir_out, major_dir ) )\n        point_dir = point->dir_out;\n\n      if ( point_dir )\n      {\n        if ( point_dir == major_dir )\n        {\n          FT_UInt  nn;\n\n\n          for ( nn = 0; nn < num_hints; nn++ )\n          {\n            PSH_Hint  hint = sort[nn];\n            FT_Pos    d    = org_u - hint->org_pos;\n\n\n            if ( d < threshold && -d < threshold )\n            {\n              psh_point_set_strong( point );\n              point->flags2 |= PSH_POINT_EDGE_MIN;\n              point->hint    = hint;\n              break;\n            }\n          }\n        }\n        else if ( point_dir == -major_dir )\n        {\n          FT_UInt  nn;\n\n\n          for ( nn = 0; nn < num_hints; nn++ )\n          {\n            PSH_Hint  hint = sort[nn];\n            FT_Pos    d    = org_u - hint->org_pos - hint->org_len;\n\n\n            if ( d < threshold && -d < threshold )\n            {\n              psh_point_set_strong( point );\n              point->flags2 |= PSH_POINT_EDGE_MAX;\n              point->hint    = hint;\n              break;\n            }\n          }\n        }\n      }\n\n#if 1\n      else if ( psh_point_is_extremum( point ) )\n      {\n        /* treat extrema as special cases for stem edge alignment */\n        FT_UInt  nn, min_flag, max_flag;\n\n\n        if ( major_dir == PSH_DIR_HORIZONTAL )\n        {\n          min_flag = PSH_POINT_POSITIVE;\n          max_flag = PSH_POINT_NEGATIVE;\n        }\n        else\n        {\n          min_flag = PSH_POINT_NEGATIVE;\n          max_flag = PSH_POINT_POSITIVE;\n        }\n\n        if ( point->flags2 & min_flag )\n        {\n          for ( nn = 0; nn < num_hints; nn++ )\n          {\n            PSH_Hint  hint = sort[nn];\n            FT_Pos    d    = org_u - hint->org_pos;\n\n\n            if ( d < threshold && -d < threshold )\n            {\n              point->flags2 |= PSH_POINT_EDGE_MIN;\n              point->hint    = hint;\n              psh_point_set_strong( point );\n              break;\n            }\n          }\n        }\n        else if ( point->flags2 & max_flag )\n        {\n          for ( nn = 0; nn < num_hints; nn++ )\n          {\n            PSH_Hint  hint = sort[nn];\n            FT_Pos    d    = org_u - hint->org_pos - hint->org_len;\n\n\n            if ( d < threshold && -d < threshold )\n            {\n              point->flags2 |= PSH_POINT_EDGE_MAX;\n              point->hint    = hint;\n              psh_point_set_strong( point );\n              break;\n            }\n          }\n        }\n\n        if ( point->hint == NULL )\n        {\n          for ( nn = 0; nn < num_hints; nn++ )\n          {\n            PSH_Hint  hint = sort[nn];\n\n\n            if ( org_u >= hint->org_pos                 &&\n                org_u <= hint->org_pos + hint->org_len )\n            {\n              point->hint = hint;\n              break;\n            }\n          }\n        }\n      }\n\n#endif /* 1 */\n    }\n  }\n\n\n  /* the accepted shift for strong points in fractional pixels */\n#define PSH_STRONG_THRESHOLD  32\n\n  /* the maximum shift value in font units */\n#define PSH_STRONG_THRESHOLD_MAXIMUM  30\n\n\n  /* find strong points in a glyph */\n  static void\n  psh_glyph_find_strong_points( PSH_Glyph  glyph,\n                                FT_Int     dimension )\n  {\n    /* a point is `strong' if it is located on a stem edge and       */\n    /* has an `in' or `out' tangent parallel to the hint's direction */\n\n    PSH_Hint_Table  table     = &glyph->hint_tables[dimension];\n    PS_Mask         mask      = table->hint_masks->masks;\n    FT_UInt         num_masks = table->hint_masks->num_masks;\n    FT_UInt         first     = 0;\n    FT_Int          major_dir = dimension == 0 ? PSH_DIR_VERTICAL\n                                               : PSH_DIR_HORIZONTAL;\n    PSH_Dimension   dim       = &glyph->globals->dimension[dimension];\n    FT_Fixed        scale     = dim->scale_mult;\n    FT_Int          threshold;\n\n\n    threshold = (FT_Int)FT_DivFix( PSH_STRONG_THRESHOLD, scale );\n    if ( threshold > PSH_STRONG_THRESHOLD_MAXIMUM )\n      threshold = PSH_STRONG_THRESHOLD_MAXIMUM;\n\n    /* process secondary hints to `selected' points */\n    if ( num_masks > 1 && glyph->num_points > 0 )\n    {\n      /* the `endchar' op can reduce the number of points */\n      first = mask->end_point > glyph->num_points\n                ? glyph->num_points\n                : mask->end_point;\n      mask++;\n      for ( ; num_masks > 1; num_masks--, mask++ )\n      {\n        FT_UInt  next;\n        FT_Int   count;\n\n\n        next  = mask->end_point > glyph->num_points\n                  ? glyph->num_points\n                  : mask->end_point;\n        count = next - first;\n        if ( count > 0 )\n        {\n          PSH_Point  point = glyph->points + first;\n\n\n          psh_hint_table_activate_mask( table, mask );\n\n          psh_hint_table_find_strong_points( table, point, count,\n                                             threshold, major_dir );\n        }\n        first = next;\n      }\n    }\n\n    /* process primary hints for all points */\n    if ( num_masks == 1 )\n    {\n      FT_UInt    count = glyph->num_points;\n      PSH_Point  point = glyph->points;\n\n\n      psh_hint_table_activate_mask( table, table->hint_masks->masks );\n\n      psh_hint_table_find_strong_points( table, point, count,\n                                         threshold, major_dir );\n    }\n\n    /* now, certain points may have been attached to a hint and */\n    /* not marked as strong; update their flags then            */\n    {\n      FT_UInt    count = glyph->num_points;\n      PSH_Point  point = glyph->points;\n\n\n      for ( ; count > 0; count--, point++ )\n        if ( point->hint && !psh_point_is_strong( point ) )\n          psh_point_set_strong( point );\n    }\n  }\n\n\n  /* find points in a glyph which are in a blue zone and have `in' or */\n  /* `out' tangents parallel to the horizontal axis                   */\n  static void\n  psh_glyph_find_blue_points( PSH_Blues  blues,\n                              PSH_Glyph  glyph )\n  {\n    PSH_Blue_Table  table;\n    PSH_Blue_Zone   zone;\n    FT_UInt         glyph_count = glyph->num_points;\n    FT_UInt         blue_count;\n    PSH_Point       point = glyph->points;\n\n\n    for ( ; glyph_count > 0; glyph_count--, point++ )\n    {\n      FT_Pos  y;\n\n\n      /* check tangents */\n      if ( !PSH_DIR_COMPARE( point->dir_in,  PSH_DIR_HORIZONTAL ) &&\n           !PSH_DIR_COMPARE( point->dir_out, PSH_DIR_HORIZONTAL ) )\n        continue;\n\n      /* skip strong points */\n      if ( psh_point_is_strong( point ) )\n        continue;\n\n      y = point->org_u;\n\n      /* look up top zones */\n      table      = &blues->normal_top;\n      blue_count = table->count;\n      zone       = table->zones;\n\n      for ( ; blue_count > 0; blue_count--, zone++ )\n      {\n        FT_Pos  delta = y - zone->org_bottom;\n\n\n        if ( delta < -blues->blue_fuzz )\n          break;\n\n        if ( y <= zone->org_top + blues->blue_fuzz )\n          if ( blues->no_overshoots || delta <= blues->blue_threshold )\n          {\n            point->cur_u = zone->cur_bottom;\n            psh_point_set_strong( point );\n            psh_point_set_fitted( point );\n          }\n      }\n\n      /* look up bottom zones */\n      table      = &blues->normal_bottom;\n      blue_count = table->count;\n      zone       = table->zones + blue_count - 1;\n\n      for ( ; blue_count > 0; blue_count--, zone-- )\n      {\n        FT_Pos  delta = zone->org_top - y;\n\n\n        if ( delta < -blues->blue_fuzz )\n          break;\n\n        if ( y >= zone->org_bottom - blues->blue_fuzz )\n          if ( blues->no_overshoots || delta < blues->blue_threshold )\n          {\n            point->cur_u = zone->cur_top;\n            psh_point_set_strong( point );\n            psh_point_set_fitted( point );\n          }\n      }\n    }\n  }\n\n\n  /* interpolate strong points with the help of hinted coordinates */\n  static void\n  psh_glyph_interpolate_strong_points( PSH_Glyph  glyph,\n                                       FT_Int     dimension )\n  {\n    PSH_Dimension  dim   = &glyph->globals->dimension[dimension];\n    FT_Fixed       scale = dim->scale_mult;\n\n    FT_UInt        count = glyph->num_points;\n    PSH_Point      point = glyph->points;\n\n\n    for ( ; count > 0; count--, point++ )\n    {\n      PSH_Hint  hint = point->hint;\n\n\n      if ( hint )\n      {\n        FT_Pos  delta;\n\n\n        if ( psh_point_is_edge_min( point ) )\n          point->cur_u = hint->cur_pos;\n\n        else if ( psh_point_is_edge_max( point ) )\n          point->cur_u = hint->cur_pos + hint->cur_len;\n\n        else\n        {\n          delta = point->org_u - hint->org_pos;\n\n          if ( delta <= 0 )\n            point->cur_u = hint->cur_pos + FT_MulFix( delta, scale );\n\n          else if ( delta >= hint->org_len )\n            point->cur_u = hint->cur_pos + hint->cur_len +\n                             FT_MulFix( delta - hint->org_len, scale );\n\n          else /* hint->org_len > 0 */\n            point->cur_u = hint->cur_pos +\n                             FT_MulDiv( delta, hint->cur_len,\n                                        hint->org_len );\n        }\n        psh_point_set_fitted( point );\n      }\n    }\n  }\n\n\n#define  PSH_MAX_STRONG_INTERNAL  16\n\n  static void\n  psh_glyph_interpolate_normal_points( PSH_Glyph  glyph,\n                                       FT_Int     dimension )\n  {\n\n#if 1\n    /* first technique: a point is strong if it is a local extremum */\n\n    PSH_Dimension  dim    = &glyph->globals->dimension[dimension];\n    FT_Fixed       scale  = dim->scale_mult;\n    FT_Memory      memory = glyph->memory;\n\n    PSH_Point*     strongs     = NULL;\n    PSH_Point      strongs_0[PSH_MAX_STRONG_INTERNAL];\n    FT_UInt        num_strongs = 0;\n\n    PSH_Point      points = glyph->points;\n    PSH_Point      points_end = points + glyph->num_points;\n    PSH_Point      point;\n\n\n    /* first count the number of strong points */\n    for ( point = points; point < points_end; point++ )\n    {\n      if ( psh_point_is_strong( point ) )\n        num_strongs++;\n    }\n\n    if ( num_strongs == 0 )  /* nothing to do here */\n      return;\n\n    /* allocate an array to store a list of points, */\n    /* stored in increasing org_u order             */\n    if ( num_strongs <= PSH_MAX_STRONG_INTERNAL )\n      strongs = strongs_0;\n    else\n    {\n      FT_Error  error;\n\n\n      if ( FT_NEW_ARRAY( strongs, num_strongs ) )\n        return;\n    }\n\n    num_strongs = 0;\n    for ( point = points; point < points_end; point++ )\n    {\n      PSH_Point*  insert;\n\n\n      if ( !psh_point_is_strong( point ) )\n        continue;\n\n      for ( insert = strongs + num_strongs; insert > strongs; insert-- )\n      {\n        if ( insert[-1]->org_u <= point->org_u )\n          break;\n\n        insert[0] = insert[-1];\n      }\n      insert[0] = point;\n      num_strongs++;\n    }\n\n    /* now try to interpolate all normal points */\n    for ( point = points; point < points_end; point++ )\n    {\n      if ( psh_point_is_strong( point ) )\n        continue;\n\n      /* sometimes, some local extrema are smooth points */\n      if ( psh_point_is_smooth( point ) )\n      {\n        if ( point->dir_in == PSH_DIR_NONE   ||\n             point->dir_in != point->dir_out )\n          continue;\n\n        if ( !psh_point_is_extremum( point ) &&\n             !psh_point_is_inflex( point )   )\n          continue;\n\n        point->flags &= ~PSH_POINT_SMOOTH;\n      }\n\n      /* find best enclosing point coordinates then interpolate */\n      {\n        PSH_Point   before, after;\n        FT_UInt     nn;\n\n\n        for ( nn = 0; nn < num_strongs; nn++ )\n          if ( strongs[nn]->org_u > point->org_u )\n            break;\n\n        if ( nn == 0 )  /* point before the first strong point */\n        {\n          after = strongs[0];\n\n          point->cur_u = after->cur_u +\n                           FT_MulFix( point->org_u - after->org_u,\n                                      scale );\n        }\n        else\n        {\n          before = strongs[nn - 1];\n\n          for ( nn = num_strongs; nn > 0; nn-- )\n            if ( strongs[nn - 1]->org_u < point->org_u )\n              break;\n\n          if ( nn == num_strongs )  /* point is after last strong point */\n          {\n            before = strongs[nn - 1];\n\n            point->cur_u = before->cur_u +\n                             FT_MulFix( point->org_u - before->org_u,\n                                        scale );\n          }\n          else\n          {\n            FT_Pos  u;\n\n\n            after = strongs[nn];\n\n            /* now interpolate point between before and after */\n            u = point->org_u;\n\n            if ( u == before->org_u )\n              point->cur_u = before->cur_u;\n\n            else if ( u == after->org_u )\n              point->cur_u = after->cur_u;\n\n            else\n              point->cur_u = before->cur_u +\n                               FT_MulDiv( u - before->org_u,\n                                          after->cur_u - before->cur_u,\n                                          after->org_u - before->org_u );\n          }\n        }\n        psh_point_set_fitted( point );\n      }\n    }\n\n    if ( strongs != strongs_0 )\n      FT_FREE( strongs );\n\n#endif /* 1 */\n\n  }\n\n\n  /* interpolate other points */\n  static void\n  psh_glyph_interpolate_other_points( PSH_Glyph  glyph,\n                                      FT_Int     dimension )\n  {\n    PSH_Dimension  dim          = &glyph->globals->dimension[dimension];\n    FT_Fixed       scale        = dim->scale_mult;\n    FT_Fixed       delta        = dim->scale_delta;\n    PSH_Contour    contour      = glyph->contours;\n    FT_UInt        num_contours = glyph->num_contours;\n\n\n    for ( ; num_contours > 0; num_contours--, contour++ )\n    {\n      PSH_Point  start = contour->start;\n      PSH_Point  first, next, point;\n      FT_UInt    fit_count;\n\n\n      /* count the number of strong points in this contour */\n      next      = start + contour->count;\n      fit_count = 0;\n      first     = 0;\n\n      for ( point = start; point < next; point++ )\n        if ( psh_point_is_fitted( point ) )\n        {\n          if ( !first )\n            first = point;\n\n          fit_count++;\n        }\n\n      /* if there are less than 2 fitted points in the contour, we */\n      /* simply scale and eventually translate the contour points  */\n      if ( fit_count < 2 )\n      {\n        if ( fit_count == 1 )\n          delta = first->cur_u - FT_MulFix( first->org_u, scale );\n\n        for ( point = start; point < next; point++ )\n          if ( point != first )\n            point->cur_u = FT_MulFix( point->org_u, scale ) + delta;\n\n        goto Next_Contour;\n      }\n\n      /* there are more than 2 strong points in this contour; we */\n      /* need to interpolate weak points between them            */\n      start = first;\n      do\n      {\n        /* skip consecutive fitted points */\n        for (;;)\n        {\n          next = first->next;\n          if ( next == start )\n            goto Next_Contour;\n\n          if ( !psh_point_is_fitted( next ) )\n            break;\n\n          first = next;\n        }\n\n        /* find next fitted point after unfitted one */\n        for (;;)\n        {\n          next = next->next;\n          if ( psh_point_is_fitted( next ) )\n            break;\n        }\n\n        /* now interpolate between them */\n        {\n          FT_Pos    org_a, org_ab, cur_a, cur_ab;\n          FT_Pos    org_c, org_ac, cur_c;\n          FT_Fixed  scale_ab;\n\n\n          if ( first->org_u <= next->org_u )\n          {\n            org_a  = first->org_u;\n            cur_a  = first->cur_u;\n            org_ab = next->org_u - org_a;\n            cur_ab = next->cur_u - cur_a;\n          }\n          else\n          {\n            org_a  = next->org_u;\n            cur_a  = next->cur_u;\n            org_ab = first->org_u - org_a;\n            cur_ab = first->cur_u - cur_a;\n          }\n\n          scale_ab = 0x10000L;\n          if ( org_ab > 0 )\n            scale_ab = FT_DivFix( cur_ab, org_ab );\n\n          point = first->next;\n          do\n          {\n            org_c  = point->org_u;\n            org_ac = org_c - org_a;\n\n            if ( org_ac <= 0 )\n            {\n              /* on the left of the interpolation zone */\n              cur_c = cur_a + FT_MulFix( org_ac, scale );\n            }\n            else if ( org_ac >= org_ab )\n            {\n              /* on the right on the interpolation zone */\n              cur_c = cur_a + cur_ab + FT_MulFix( org_ac - org_ab, scale );\n            }\n            else\n            {\n              /* within the interpolation zone */\n              cur_c = cur_a + FT_MulFix( org_ac, scale_ab );\n            }\n\n            point->cur_u = cur_c;\n\n            point = point->next;\n\n          } while ( point != next );\n        }\n\n        /* keep going until all points in the contours have been processed */\n        first = next;\n\n      } while ( first != start );\n\n    Next_Contour:\n      ;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     HIGH-LEVEL INTERFACE                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  FT_Error\n  ps_hints_apply( PS_Hints        ps_hints,\n                  FT_Outline*     outline,\n                  PSH_Globals     globals,\n                  FT_Render_Mode  hint_mode )\n  {\n    PSH_GlyphRec  glyphrec;\n    PSH_Glyph     glyph = &glyphrec;\n    FT_Error      error;\n#ifdef DEBUG_HINTER\n    FT_Memory     memory;\n#endif\n    FT_Int        dimension;\n\n\n    /* something to do? */\n    if ( outline->n_points == 0 || outline->n_contours == 0 )\n      return FT_Err_Ok;\n\n#ifdef DEBUG_HINTER\n\n    memory = globals->memory;\n\n    if ( ps_debug_glyph )\n    {\n      psh_glyph_done( ps_debug_glyph );\n      FT_FREE( ps_debug_glyph );\n    }\n\n    if ( FT_NEW( glyph ) )\n      return error;\n\n    ps_debug_glyph = glyph;\n\n#endif /* DEBUG_HINTER */\n\n    error = psh_glyph_init( glyph, outline, ps_hints, globals );\n    if ( error )\n      goto Exit;\n\n    /* try to optimize the y_scale so that the top of non-capital letters\n     * is aligned on a pixel boundary whenever possible\n     */\n    {\n      PSH_Dimension  dim_x = &glyph->globals->dimension[0];\n      PSH_Dimension  dim_y = &glyph->globals->dimension[1];\n\n      FT_Fixed  x_scale = dim_x->scale_mult;\n      FT_Fixed  y_scale = dim_y->scale_mult;\n\n      FT_Fixed  old_x_scale = x_scale;\n      FT_Fixed  old_y_scale = y_scale;\n\n      FT_Fixed  scaled;\n      FT_Fixed  fitted;\n\n      FT_Bool  rescale = FALSE;\n\n\n      scaled = FT_MulFix( globals->blues.normal_top.zones->org_ref, y_scale );\n      fitted = FT_PIX_ROUND( scaled );\n\n      if ( fitted != 0 && scaled != fitted )\n      {\n        rescale = TRUE;\n\n        y_scale = FT_MulDiv( y_scale, fitted, scaled );\n\n        if ( fitted < scaled )\n          x_scale -= x_scale / 50;\n\n        psh_globals_set_scale( glyph->globals, x_scale, y_scale, 0, 0 );\n      }\n\n      glyph->do_horz_hints = 1;\n      glyph->do_vert_hints = 1;\n\n      glyph->do_horz_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_MONO ||\n                                         hint_mode == FT_RENDER_MODE_LCD  );\n\n      glyph->do_vert_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_MONO  ||\n                                         hint_mode == FT_RENDER_MODE_LCD_V );\n\n      glyph->do_stem_adjust   = FT_BOOL( hint_mode != FT_RENDER_MODE_LIGHT );\n\n      for ( dimension = 0; dimension < 2; dimension++ )\n      {\n        /* load outline coordinates into glyph */\n        psh_glyph_load_points( glyph, dimension );\n\n        /* compute local extrema */\n        psh_glyph_compute_extrema( glyph );\n\n        /* compute aligned stem/hints positions */\n        psh_hint_table_align_hints( &glyph->hint_tables[dimension],\n                                    glyph->globals,\n                                    dimension,\n                                    glyph );\n\n        /* find strong points, align them, then interpolate others */\n        psh_glyph_find_strong_points( glyph, dimension );\n        if ( dimension == 1 )\n          psh_glyph_find_blue_points( &globals->blues, glyph );\n        psh_glyph_interpolate_strong_points( glyph, dimension );\n        psh_glyph_interpolate_normal_points( glyph, dimension );\n        psh_glyph_interpolate_other_points( glyph, dimension );\n\n        /* save hinted coordinates back to outline */\n        psh_glyph_save_points( glyph, dimension );\n\n        if ( rescale )\n          psh_globals_set_scale( glyph->globals,\n                                 old_x_scale, old_y_scale, 0, 0 );\n      }\n    }\n\n  Exit:\n\n#ifndef DEBUG_HINTER\n    psh_glyph_done( glyph );\n#endif\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshalgo.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshalgo.h                                                              */\n/*                                                                         */\n/*    PostScript hinting algorithm (specification).                        */\n/*                                                                         */\n/*  Copyright 2001-2003, 2008, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSHALGO_H__\n#define __PSHALGO_H__\n\n\n#include \"pshrec.h\"\n#include \"pshglob.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /* handle to Hint structure */\n  typedef struct PSH_HintRec_*  PSH_Hint;\n\n  /* hint bit-flags */\n  typedef enum  PSH_Hint_Flags_\n  {\n    PSH_HINT_GHOST  = PS_HINT_FLAG_GHOST,\n    PSH_HINT_BOTTOM = PS_HINT_FLAG_BOTTOM,\n    PSH_HINT_ACTIVE = 4,\n    PSH_HINT_FITTED = 8\n\n  } PSH_Hint_Flags;\n\n\n#define psh_hint_is_active( x )  ( ( (x)->flags & PSH_HINT_ACTIVE ) != 0 )\n#define psh_hint_is_ghost( x )   ( ( (x)->flags & PSH_HINT_GHOST  ) != 0 )\n#define psh_hint_is_fitted( x )  ( ( (x)->flags & PSH_HINT_FITTED ) != 0 )\n\n#define psh_hint_activate( x )    (x)->flags |=  PSH_HINT_ACTIVE\n#define psh_hint_deactivate( x )  (x)->flags &= ~PSH_HINT_ACTIVE\n#define psh_hint_set_fitted( x )  (x)->flags |=  PSH_HINT_FITTED\n\n  /* hint structure */\n  typedef struct  PSH_HintRec_\n  {\n    FT_Int    org_pos;\n    FT_Int    org_len;\n    FT_Pos    cur_pos;\n    FT_Pos    cur_len;\n    FT_UInt   flags;\n    PSH_Hint  parent;\n    FT_Int    order;\n\n  } PSH_HintRec;\n\n\n  /* this is an interpolation zone used for strong points;  */\n  /* weak points are interpolated according to their strong */\n  /* neighbours                                             */\n  typedef struct  PSH_ZoneRec_\n  {\n    FT_Fixed  scale;\n    FT_Fixed  delta;\n    FT_Pos    min;\n    FT_Pos    max;\n\n  } PSH_ZoneRec, *PSH_Zone;\n\n\n  typedef struct  PSH_Hint_TableRec_\n  {\n    FT_UInt        max_hints;\n    FT_UInt        num_hints;\n    PSH_Hint       hints;\n    PSH_Hint*      sort;\n    PSH_Hint*      sort_global;\n    FT_UInt        num_zones;\n    PSH_ZoneRec*   zones;\n    PSH_Zone       zone;\n    PS_Mask_Table  hint_masks;\n    PS_Mask_Table  counter_masks;\n\n  } PSH_Hint_TableRec, *PSH_Hint_Table;\n\n\n  typedef struct PSH_PointRec_*    PSH_Point;\n  typedef struct PSH_ContourRec_*  PSH_Contour;\n\n  enum\n  {\n    PSH_DIR_NONE  =  4,\n    PSH_DIR_UP    = -1,\n    PSH_DIR_DOWN  =  1,\n    PSH_DIR_LEFT  = -2,\n    PSH_DIR_RIGHT =  2\n  };\n\n#define PSH_DIR_HORIZONTAL  2\n#define PSH_DIR_VERTICAL    1\n\n#define PSH_DIR_COMPARE( d1, d2 )   ( (d1) == (d2) || (d1) == -(d2) )\n#define PSH_DIR_IS_HORIZONTAL( d )  PSH_DIR_COMPARE( d, PSH_DIR_HORIZONTAL )\n#define PSH_DIR_IS_VERTICAL( d )    PSH_DIR_COMPARE( d, PSH_DIR_VERTICAL )\n\n\n /* the following bit-flags are computed once by the glyph */\n /* analyzer, for both dimensions                          */\n  enum\n  {\n    PSH_POINT_OFF    = 1,   /* point is off the curve */\n    PSH_POINT_SMOOTH = 2,   /* point is smooth        */\n    PSH_POINT_INFLEX = 4    /* point is inflection    */\n  };\n\n#define psh_point_is_smooth( p )  ( (p)->flags & PSH_POINT_SMOOTH )\n#define psh_point_is_off( p )     ( (p)->flags & PSH_POINT_OFF    )\n#define psh_point_is_inflex( p )  ( (p)->flags & PSH_POINT_INFLEX )\n\n#define psh_point_set_smooth( p )  (p)->flags |= PSH_POINT_SMOOTH\n#define psh_point_set_off( p )     (p)->flags |= PSH_POINT_OFF\n#define psh_point_set_inflex( p )  (p)->flags |= PSH_POINT_INFLEX\n\n  /* the following bit-flags are re-computed for each dimension */\n  enum\n  {\n    PSH_POINT_STRONG   = 16,   /* point is strong                           */\n    PSH_POINT_FITTED   = 32,   /* point is already fitted                   */\n    PSH_POINT_EXTREMUM = 64,   /* point is local extremum                   */\n    PSH_POINT_POSITIVE = 128,  /* extremum has positive contour flow        */\n    PSH_POINT_NEGATIVE = 256,  /* extremum has negative contour flow        */\n    PSH_POINT_EDGE_MIN = 512,  /* point is aligned to left/bottom stem edge */\n    PSH_POINT_EDGE_MAX = 1024  /* point is aligned to top/right stem edge   */\n  };\n\n#define psh_point_is_strong( p )    ( (p)->flags2 & PSH_POINT_STRONG )\n#define psh_point_is_fitted( p )    ( (p)->flags2 & PSH_POINT_FITTED )\n#define psh_point_is_extremum( p )  ( (p)->flags2 & PSH_POINT_EXTREMUM )\n#define psh_point_is_positive( p )  ( (p)->flags2 & PSH_POINT_POSITIVE )\n#define psh_point_is_negative( p )  ( (p)->flags2 & PSH_POINT_NEGATIVE )\n#define psh_point_is_edge_min( p )  ( (p)->flags2 & PSH_POINT_EDGE_MIN )\n#define psh_point_is_edge_max( p )  ( (p)->flags2 & PSH_POINT_EDGE_MAX )\n\n#define psh_point_set_strong( p )    (p)->flags2 |= PSH_POINT_STRONG\n#define psh_point_set_fitted( p )    (p)->flags2 |= PSH_POINT_FITTED\n#define psh_point_set_extremum( p )  (p)->flags2 |= PSH_POINT_EXTREMUM\n#define psh_point_set_positive( p )  (p)->flags2 |= PSH_POINT_POSITIVE\n#define psh_point_set_negative( p )  (p)->flags2 |= PSH_POINT_NEGATIVE\n#define psh_point_set_edge_min( p )  (p)->flags2 |= PSH_POINT_EDGE_MIN\n#define psh_point_set_edge_max( p )  (p)->flags2 |= PSH_POINT_EDGE_MAX\n\n\n  typedef struct  PSH_PointRec_\n  {\n    PSH_Point    prev;\n    PSH_Point    next;\n    PSH_Contour  contour;\n    FT_UInt      flags;\n    FT_UInt      flags2;\n    FT_Char      dir_in;\n    FT_Char      dir_out;\n    PSH_Hint     hint;\n    FT_Pos       org_u;\n    FT_Pos       org_v;\n    FT_Pos       cur_u;\n#ifdef DEBUG_HINTER\n    FT_Pos       org_x;\n    FT_Pos       cur_x;\n    FT_Pos       org_y;\n    FT_Pos       cur_y;\n    FT_UInt      flags_x;\n    FT_UInt      flags_y;\n#endif\n\n  } PSH_PointRec;\n\n\n  typedef struct  PSH_ContourRec_\n  {\n    PSH_Point  start;\n    FT_UInt    count;\n\n  } PSH_ContourRec;\n\n\n  typedef struct  PSH_GlyphRec_\n  {\n    FT_UInt            num_points;\n    FT_UInt            num_contours;\n\n    PSH_Point          points;\n    PSH_Contour        contours;\n\n    FT_Memory          memory;\n    FT_Outline*        outline;\n    PSH_Globals        globals;\n    PSH_Hint_TableRec  hint_tables[2];\n\n    FT_Bool            vertical;\n    FT_Int             major_dir;\n    FT_Int             minor_dir;\n\n    FT_Bool            do_horz_hints;\n    FT_Bool            do_vert_hints;\n    FT_Bool            do_horz_snapping;\n    FT_Bool            do_vert_snapping;\n    FT_Bool            do_stem_adjust;\n\n  } PSH_GlyphRec, *PSH_Glyph;\n\n\n#ifdef DEBUG_HINTER\n  extern PSH_Hint_Table  ps_debug_hint_table;\n\n  typedef void\n  (*PSH_HintFunc)( PSH_Hint  hint,\n                   FT_Bool   vertical );\n\n  extern PSH_HintFunc    ps_debug_hint_func;\n\n  extern PSH_Glyph       ps_debug_glyph;\n#endif\n\n\n  extern FT_Error\n  ps_hints_apply( PS_Hints        ps_hints,\n                  FT_Outline*     outline,\n                  PSH_Globals     globals,\n                  FT_Render_Mode  hint_mode );\n\n\nFT_END_HEADER\n\n\n#endif /* __PSHALGO_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshglob.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshglob.c                                                              */\n/*                                                                         */\n/*    PostScript hinter global hinting management (body).                  */\n/*    Inspired by the new auto-hinter module.                              */\n/*                                                                         */\n/*  Copyright 2001-2004, 2006, 2010, 2012-2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used        */\n/*  modified and distributed under the terms of the FreeType project       */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"pshglob.h\"\n\n#ifdef DEBUG_HINTER\n  PSH_Globals  ps_debug_globals = 0;\n#endif\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       STANDARD WIDTHS                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* scale the widths/heights table */\n  static void\n  psh_globals_scale_widths( PSH_Globals  globals,\n                            FT_UInt      direction )\n  {\n    PSH_Dimension  dim   = &globals->dimension[direction];\n    PSH_Widths     stdw  = &dim->stdw;\n    FT_UInt        count = stdw->count;\n    PSH_Width      width = stdw->widths;\n    PSH_Width      stand = width;               /* standard width/height */\n    FT_Fixed       scale = dim->scale_mult;\n\n\n    if ( count > 0 )\n    {\n      width->cur = FT_MulFix( width->org, scale );\n      width->fit = FT_PIX_ROUND( width->cur );\n\n      width++;\n      count--;\n\n      for ( ; count > 0; count--, width++ )\n      {\n        FT_Pos  w, dist;\n\n\n        w    = FT_MulFix( width->org, scale );\n        dist = w - stand->cur;\n\n        if ( dist < 0 )\n          dist = -dist;\n\n        if ( dist < 128 )\n          w = stand->cur;\n\n        width->cur = w;\n        width->fit = FT_PIX_ROUND( w );\n      }\n    }\n  }\n\n\n#if 0\n\n  /* org_width is is font units, result in device pixels, 26.6 format */\n  FT_LOCAL_DEF( FT_Pos )\n  psh_dimension_snap_width( PSH_Dimension  dimension,\n                            FT_Int         org_width )\n  {\n    FT_UInt  n;\n    FT_Pos   width     = FT_MulFix( org_width, dimension->scale_mult );\n    FT_Pos   best      = 64 + 32 + 2;\n    FT_Pos   reference = width;\n\n\n    for ( n = 0; n < dimension->stdw.count; n++ )\n    {\n      FT_Pos  w;\n      FT_Pos  dist;\n\n\n      w = dimension->stdw.widths[n].cur;\n      dist = width - w;\n      if ( dist < 0 )\n        dist = -dist;\n      if ( dist < best )\n      {\n        best      = dist;\n        reference = w;\n      }\n    }\n\n    if ( width >= reference )\n    {\n      width -= 0x21;\n      if ( width < reference )\n        width = reference;\n    }\n    else\n    {\n      width += 0x21;\n      if ( width > reference )\n        width = reference;\n    }\n\n    return width;\n  }\n\n#endif /* 0 */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       BLUE ZONES                              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  psh_blues_set_zones_0( PSH_Blues       target,\n                         FT_Bool         is_others,\n                         FT_UInt         read_count,\n                         FT_Short*       read,\n                         PSH_Blue_Table  top_table,\n                         PSH_Blue_Table  bot_table )\n  {\n    FT_UInt  count_top = top_table->count;\n    FT_UInt  count_bot = bot_table->count;\n    FT_Bool  first     = 1;\n\n    FT_UNUSED( target );\n\n\n    for ( ; read_count > 1; read_count -= 2 )\n    {\n      FT_Int         reference, delta;\n      FT_UInt        count;\n      PSH_Blue_Zone  zones, zone;\n      FT_Bool        top;\n\n\n      /* read blue zone entry, and select target top/bottom zone */\n      top = 0;\n      if ( first || is_others )\n      {\n        reference = read[1];\n        delta     = read[0] - reference;\n\n        zones = bot_table->zones;\n        count = count_bot;\n        first = 0;\n      }\n      else\n      {\n        reference = read[0];\n        delta     = read[1] - reference;\n\n        zones = top_table->zones;\n        count = count_top;\n        top   = 1;\n      }\n\n      /* insert into sorted table */\n      zone = zones;\n      for ( ; count > 0; count--, zone++ )\n      {\n        if ( reference < zone->org_ref )\n          break;\n\n        if ( reference == zone->org_ref )\n        {\n          FT_Int  delta0 = zone->org_delta;\n\n\n          /* we have two zones on the same reference position -- */\n          /* only keep the largest one                           */\n          if ( delta < 0 )\n          {\n            if ( delta < delta0 )\n              zone->org_delta = delta;\n          }\n          else\n          {\n            if ( delta > delta0 )\n              zone->org_delta = delta;\n          }\n          goto Skip;\n        }\n      }\n\n      for ( ; count > 0; count-- )\n        zone[count] = zone[count-1];\n\n      zone->org_ref   = reference;\n      zone->org_delta = delta;\n\n      if ( top )\n        count_top++;\n      else\n        count_bot++;\n\n    Skip:\n      read += 2;\n    }\n\n    top_table->count = count_top;\n    bot_table->count = count_bot;\n  }\n\n\n  /* Re-read blue zones from the original fonts and store them into out */\n  /* private structure.  This function re-orders, sanitizes and         */\n  /* fuzz-expands the zones as well.                                    */\n  static void\n  psh_blues_set_zones( PSH_Blues  target,\n                       FT_UInt    count,\n                       FT_Short*  blues,\n                       FT_UInt    count_others,\n                       FT_Short*  other_blues,\n                       FT_Int     fuzz,\n                       FT_Int     family )\n  {\n    PSH_Blue_Table  top_table, bot_table;\n    FT_Int          count_top, count_bot;\n\n\n    if ( family )\n    {\n      top_table = &target->family_top;\n      bot_table = &target->family_bottom;\n    }\n    else\n    {\n      top_table = &target->normal_top;\n      bot_table = &target->normal_bottom;\n    }\n\n    /* read the input blue zones, and build two sorted tables  */\n    /* (one for the top zones, the other for the bottom zones) */\n    top_table->count = 0;\n    bot_table->count = 0;\n\n    /* first, the blues */\n    psh_blues_set_zones_0( target, 0,\n                           count, blues, top_table, bot_table );\n    psh_blues_set_zones_0( target, 1,\n                           count_others, other_blues, top_table, bot_table );\n\n    count_top = top_table->count;\n    count_bot = bot_table->count;\n\n    /* sanitize top table */\n    if ( count_top > 0 )\n    {\n      PSH_Blue_Zone  zone = top_table->zones;\n\n\n      for ( count = count_top; count > 0; count--, zone++ )\n      {\n        FT_Int  delta;\n\n\n        if ( count > 1 )\n        {\n          delta = zone[1].org_ref - zone[0].org_ref;\n          if ( zone->org_delta > delta )\n            zone->org_delta = delta;\n        }\n\n        zone->org_bottom = zone->org_ref;\n        zone->org_top    = zone->org_delta + zone->org_ref;\n      }\n    }\n\n    /* sanitize bottom table */\n    if ( count_bot > 0 )\n    {\n      PSH_Blue_Zone  zone = bot_table->zones;\n\n\n      for ( count = count_bot; count > 0; count--, zone++ )\n      {\n        FT_Int  delta;\n\n\n        if ( count > 1 )\n        {\n          delta = zone[0].org_ref - zone[1].org_ref;\n          if ( zone->org_delta < delta )\n            zone->org_delta = delta;\n        }\n\n        zone->org_top    = zone->org_ref;\n        zone->org_bottom = zone->org_delta + zone->org_ref;\n      }\n    }\n\n    /* expand top and bottom tables with blue fuzz */\n    {\n      FT_Int         dim, top, bot, delta;\n      PSH_Blue_Zone  zone;\n\n\n      zone  = top_table->zones;\n      count = count_top;\n\n      for ( dim = 1; dim >= 0; dim-- )\n      {\n        if ( count > 0 )\n        {\n          /* expand the bottom of the lowest zone normally */\n          zone->org_bottom -= fuzz;\n\n          /* expand the top and bottom of intermediate zones;    */\n          /* checking that the interval is smaller than the fuzz */\n          top = zone->org_top;\n\n          for ( count--; count > 0; count-- )\n          {\n            bot   = zone[1].org_bottom;\n            delta = bot - top;\n\n            if ( delta < 2 * fuzz )\n              zone[0].org_top = zone[1].org_bottom = top + delta / 2;\n            else\n            {\n              zone[0].org_top    = top + fuzz;\n              zone[1].org_bottom = bot - fuzz;\n            }\n\n            zone++;\n            top = zone->org_top;\n          }\n\n          /* expand the top of the highest zone normally */\n          zone->org_top = top + fuzz;\n        }\n        zone  = bot_table->zones;\n        count = count_bot;\n      }\n    }\n  }\n\n\n  /* reset the blues table when the device transform changes */\n  static void\n  psh_blues_scale_zones( PSH_Blues  blues,\n                         FT_Fixed   scale,\n                         FT_Pos     delta )\n  {\n    FT_UInt         count;\n    FT_UInt         num;\n    PSH_Blue_Table  table = 0;\n\n    /*                                                        */\n    /* Determine whether we need to suppress overshoots or    */\n    /* not.  We simply need to compare the vertical scale     */\n    /* parameter to the raw bluescale value.  Here is why:    */\n    /*                                                        */\n    /*   We need to suppress overshoots for all pointsizes.   */\n    /*   At 300dpi that satisfies:                            */\n    /*                                                        */\n    /*      pointsize < 240*bluescale + 0.49                  */\n    /*                                                        */\n    /*   This corresponds to:                                 */\n    /*                                                        */\n    /*      pixelsize < 1000*bluescale + 49/24                */\n    /*                                                        */\n    /*      scale*EM_Size < 1000*bluescale + 49/24            */\n    /*                                                        */\n    /*   However, for normal Type 1 fonts, EM_Size is 1000!   */\n    /*   We thus only check:                                  */\n    /*                                                        */\n    /*      scale < bluescale + 49/24000                      */\n    /*                                                        */\n    /*   which we shorten to                                  */\n    /*                                                        */\n    /*      \"scale < bluescale\"                               */\n    /*                                                        */\n    /* Note that `blue_scale' is stored 1000 times its real   */\n    /* value, and that `scale' converts from font units to    */\n    /* fractional pixels.                                     */\n    /*                                                        */\n\n    /* 1000 / 64 = 125 / 8 */\n    if ( scale >= 0x20C49BAL )\n      blues->no_overshoots = FT_BOOL( scale < blues->blue_scale * 8 / 125 );\n    else\n      blues->no_overshoots = FT_BOOL( scale * 125 < blues->blue_scale * 8 );\n\n    /*                                                        */\n    /*  The blue threshold is the font units distance under   */\n    /*  which overshoots are suppressed due to the BlueShift  */\n    /*  even if the scale is greater than BlueScale.          */\n    /*                                                        */\n    /*  It is the smallest distance such that                 */\n    /*                                                        */\n    /*    dist <= BlueShift && dist*scale <= 0.5 pixels       */\n    /*                                                        */\n    {\n      FT_Int  threshold = blues->blue_shift;\n\n\n      while ( threshold > 0 && FT_MulFix( threshold, scale ) > 32 )\n        threshold--;\n\n      blues->blue_threshold = threshold;\n    }\n\n    for ( num = 0; num < 4; num++ )\n    {\n      PSH_Blue_Zone  zone;\n\n\n      switch ( num )\n      {\n      case 0:\n        table = &blues->normal_top;\n        break;\n      case 1:\n        table = &blues->normal_bottom;\n        break;\n      case 2:\n        table = &blues->family_top;\n        break;\n      default:\n        table = &blues->family_bottom;\n        break;\n      }\n\n      zone  = table->zones;\n      count = table->count;\n      for ( ; count > 0; count--, zone++ )\n      {\n        zone->cur_top    = FT_MulFix( zone->org_top,    scale ) + delta;\n        zone->cur_bottom = FT_MulFix( zone->org_bottom, scale ) + delta;\n        zone->cur_ref    = FT_MulFix( zone->org_ref,    scale ) + delta;\n        zone->cur_delta  = FT_MulFix( zone->org_delta,  scale );\n\n        /* round scaled reference position */\n        zone->cur_ref = FT_PIX_ROUND( zone->cur_ref );\n\n#if 0\n        if ( zone->cur_ref > zone->cur_top )\n          zone->cur_ref -= 64;\n        else if ( zone->cur_ref < zone->cur_bottom )\n          zone->cur_ref += 64;\n#endif\n      }\n    }\n\n    /* process the families now */\n\n    for ( num = 0; num < 2; num++ )\n    {\n      PSH_Blue_Zone   zone1, zone2;\n      FT_UInt         count1, count2;\n      PSH_Blue_Table  normal, family;\n\n\n      switch ( num )\n      {\n      case 0:\n        normal = &blues->normal_top;\n        family = &blues->family_top;\n        break;\n\n      default:\n        normal = &blues->normal_bottom;\n        family = &blues->family_bottom;\n      }\n\n      zone1  = normal->zones;\n      count1 = normal->count;\n\n      for ( ; count1 > 0; count1--, zone1++ )\n      {\n        /* try to find a family zone whose reference position is less */\n        /* than 1 pixel far from the current zone                     */\n        zone2  = family->zones;\n        count2 = family->count;\n\n        for ( ; count2 > 0; count2--, zone2++ )\n        {\n          FT_Pos  Delta;\n\n\n          Delta = zone1->org_ref - zone2->org_ref;\n          if ( Delta < 0 )\n            Delta = -Delta;\n\n          if ( FT_MulFix( Delta, scale ) < 64 )\n          {\n            zone1->cur_top    = zone2->cur_top;\n            zone1->cur_bottom = zone2->cur_bottom;\n            zone1->cur_ref    = zone2->cur_ref;\n            zone1->cur_delta  = zone2->cur_delta;\n            break;\n          }\n        }\n      }\n    }\n  }\n\n\n  /* calculate the maximum height of given blue zones */\n  static FT_Short\n  psh_calc_max_height( FT_UInt          num,\n                       const FT_Short*  values,\n                       FT_Short         cur_max )\n  {\n    FT_UInt  count;\n\n\n    for ( count = 0; count < num; count += 2 )\n    {\n      FT_Short  cur_height = values[count + 1] - values[count];\n\n\n      if ( cur_height > cur_max )\n        cur_max = cur_height;\n    }\n\n    return cur_max;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  psh_blues_snap_stem( PSH_Blues      blues,\n                       FT_Int         stem_top,\n                       FT_Int         stem_bot,\n                       PSH_Alignment  alignment )\n  {\n    PSH_Blue_Table  table;\n    FT_UInt         count;\n    FT_Pos          delta;\n    PSH_Blue_Zone   zone;\n    FT_Int          no_shoots;\n\n\n    alignment->align = PSH_BLUE_ALIGN_NONE;\n\n    no_shoots = blues->no_overshoots;\n\n    /* look up stem top in top zones table */\n    table = &blues->normal_top;\n    count = table->count;\n    zone  = table->zones;\n\n    for ( ; count > 0; count--, zone++ )\n    {\n      delta = stem_top - zone->org_bottom;\n      if ( delta < -blues->blue_fuzz )\n        break;\n\n      if ( stem_top <= zone->org_top + blues->blue_fuzz )\n      {\n        if ( no_shoots || delta <= blues->blue_threshold )\n        {\n          alignment->align    |= PSH_BLUE_ALIGN_TOP;\n          alignment->align_top = zone->cur_ref;\n        }\n        break;\n      }\n    }\n\n    /* look up stem bottom in bottom zones table */\n    table = &blues->normal_bottom;\n    count = table->count;\n    zone  = table->zones + count-1;\n\n    for ( ; count > 0; count--, zone-- )\n    {\n      delta = zone->org_top - stem_bot;\n      if ( delta < -blues->blue_fuzz )\n        break;\n\n      if ( stem_bot >= zone->org_bottom - blues->blue_fuzz )\n      {\n        if ( no_shoots || delta < blues->blue_threshold )\n        {\n          alignment->align    |= PSH_BLUE_ALIGN_BOT;\n          alignment->align_bot = zone->cur_ref;\n        }\n        break;\n      }\n    }\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                        GLOBAL HINTS                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  psh_globals_destroy( PSH_Globals  globals )\n  {\n    if ( globals )\n    {\n      FT_Memory  memory;\n\n\n      memory = globals->memory;\n      globals->dimension[0].stdw.count = 0;\n      globals->dimension[1].stdw.count = 0;\n\n      globals->blues.normal_top.count    = 0;\n      globals->blues.normal_bottom.count = 0;\n      globals->blues.family_top.count    = 0;\n      globals->blues.family_bottom.count = 0;\n\n      FT_FREE( globals );\n\n#ifdef DEBUG_HINTER\n      ps_debug_globals = 0;\n#endif\n    }\n  }\n\n\n  static FT_Error\n  psh_globals_new( FT_Memory     memory,\n                   T1_Private*   priv,\n                   PSH_Globals  *aglobals )\n  {\n    PSH_Globals  globals = NULL;\n    FT_Error     error;\n\n\n    if ( !FT_NEW( globals ) )\n    {\n      FT_UInt    count;\n      FT_Short*  read;\n\n\n      globals->memory = memory;\n\n      /* copy standard widths */\n      {\n        PSH_Dimension  dim   = &globals->dimension[1];\n        PSH_Width      write = dim->stdw.widths;\n\n\n        write->org = priv->standard_width[0];\n        write++;\n\n        read = priv->snap_widths;\n        for ( count = priv->num_snap_widths; count > 0; count-- )\n        {\n          write->org = *read;\n          write++;\n          read++;\n        }\n\n        dim->stdw.count = priv->num_snap_widths + 1;\n      }\n\n      /* copy standard heights */\n      {\n        PSH_Dimension  dim = &globals->dimension[0];\n        PSH_Width      write = dim->stdw.widths;\n\n\n        write->org = priv->standard_height[0];\n        write++;\n        read = priv->snap_heights;\n        for ( count = priv->num_snap_heights; count > 0; count-- )\n        {\n          write->org = *read;\n          write++;\n          read++;\n        }\n\n        dim->stdw.count = priv->num_snap_heights + 1;\n      }\n\n      /* copy blue zones */\n      psh_blues_set_zones( &globals->blues, priv->num_blue_values,\n                           priv->blue_values, priv->num_other_blues,\n                           priv->other_blues, priv->blue_fuzz, 0 );\n\n      psh_blues_set_zones( &globals->blues, priv->num_family_blues,\n                           priv->family_blues, priv->num_family_other_blues,\n                           priv->family_other_blues, priv->blue_fuzz, 1 );\n\n      /* limit the BlueScale value to `1 / max_of_blue_zone_heights' */\n      {\n        FT_Fixed  max_scale;\n        FT_Short  max_height = 1;\n\n\n        max_height = psh_calc_max_height( priv->num_blue_values,\n                                          priv->blue_values,\n                                          max_height );\n        max_height = psh_calc_max_height( priv->num_other_blues,\n                                          priv->other_blues,\n                                          max_height );\n        max_height = psh_calc_max_height( priv->num_family_blues,\n                                          priv->family_blues,\n                                          max_height );\n        max_height = psh_calc_max_height( priv->num_family_other_blues,\n                                          priv->family_other_blues,\n                                          max_height );\n\n        /* BlueScale is scaled 1000 times */\n        max_scale = FT_DivFix( 1000, max_height );\n        globals->blues.blue_scale = priv->blue_scale < max_scale\n                                      ? priv->blue_scale\n                                      : max_scale;\n      }\n\n      globals->blues.blue_shift = priv->blue_shift;\n      globals->blues.blue_fuzz  = priv->blue_fuzz;\n\n      globals->dimension[0].scale_mult  = 0;\n      globals->dimension[0].scale_delta = 0;\n      globals->dimension[1].scale_mult  = 0;\n      globals->dimension[1].scale_delta = 0;\n\n#ifdef DEBUG_HINTER\n      ps_debug_globals = globals;\n#endif\n    }\n\n    *aglobals = globals;\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  psh_globals_set_scale( PSH_Globals  globals,\n                         FT_Fixed     x_scale,\n                         FT_Fixed     y_scale,\n                         FT_Fixed     x_delta,\n                         FT_Fixed     y_delta )\n  {\n    PSH_Dimension  dim;\n\n\n    dim = &globals->dimension[0];\n    if ( x_scale != dim->scale_mult  ||\n         x_delta != dim->scale_delta )\n    {\n      dim->scale_mult  = x_scale;\n      dim->scale_delta = x_delta;\n\n      psh_globals_scale_widths( globals, 0 );\n    }\n\n    dim = &globals->dimension[1];\n    if ( y_scale != dim->scale_mult  ||\n         y_delta != dim->scale_delta )\n    {\n      dim->scale_mult  = y_scale;\n      dim->scale_delta = y_delta;\n\n      psh_globals_scale_widths( globals, 1 );\n      psh_blues_scale_zones( &globals->blues, y_scale, y_delta );\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  psh_globals_funcs_init( PSH_Globals_FuncsRec*  funcs )\n  {\n    funcs->create    = psh_globals_new;\n    funcs->set_scale = psh_globals_set_scale;\n    funcs->destroy   = psh_globals_destroy;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshglob.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshglob.h                                                              */\n/*                                                                         */\n/*    PostScript hinter global hinting management.                         */\n/*                                                                         */\n/*  Copyright 2001, 2002, 2003, 2014 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSHGLOB_H__\n#define __PSHGLOB_H__\n\n\n#include FT_FREETYPE_H\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    GLOBAL HINTS INTERNALS                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* @constant:                                                            */\n  /*    PS_GLOBALS_MAX_BLUE_ZONES                                          */\n  /*                                                                       */\n  /* @description:                                                         */\n  /*    The maximum number of blue zones in a font global hints structure. */\n  /*    See @PS_Globals_BluesRec.                                          */\n  /*                                                                       */\n#define PS_GLOBALS_MAX_BLUE_ZONES  16\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* @constant:                                                            */\n  /*    PS_GLOBALS_MAX_STD_WIDTHS                                          */\n  /*                                                                       */\n  /* @description:                                                         */\n  /*    The maximum number of standard and snap widths in either the       */\n  /*    horizontal or vertical direction.  See @PS_Globals_WidthsRec.      */\n  /*                                                                       */\n#define PS_GLOBALS_MAX_STD_WIDTHS  16\n\n\n  /* standard and snap width */\n  typedef struct  PSH_WidthRec_\n  {\n    FT_Int  org;\n    FT_Pos  cur;\n    FT_Pos  fit;\n\n  } PSH_WidthRec, *PSH_Width;\n\n\n  /* standard and snap widths table */\n  typedef struct  PSH_WidthsRec_\n  {\n    FT_UInt       count;\n    PSH_WidthRec  widths[PS_GLOBALS_MAX_STD_WIDTHS];\n\n  } PSH_WidthsRec, *PSH_Widths;\n\n\n  typedef struct  PSH_DimensionRec_\n  {\n    PSH_WidthsRec  stdw;\n    FT_Fixed       scale_mult;\n    FT_Fixed       scale_delta;\n\n  } PSH_DimensionRec, *PSH_Dimension;\n\n\n  /* blue zone descriptor */\n  typedef struct  PSH_Blue_ZoneRec_\n  {\n    FT_Int  org_ref;\n    FT_Int  org_delta;\n    FT_Int  org_top;\n    FT_Int  org_bottom;\n\n    FT_Pos  cur_ref;\n    FT_Pos  cur_delta;\n    FT_Pos  cur_bottom;\n    FT_Pos  cur_top;\n\n  } PSH_Blue_ZoneRec, *PSH_Blue_Zone;\n\n\n  typedef struct  PSH_Blue_TableRec_\n  {\n    FT_UInt           count;\n    PSH_Blue_ZoneRec  zones[PS_GLOBALS_MAX_BLUE_ZONES];\n\n  } PSH_Blue_TableRec, *PSH_Blue_Table;\n\n\n  /* blue zones table */\n  typedef struct  PSH_BluesRec_\n  {\n    PSH_Blue_TableRec  normal_top;\n    PSH_Blue_TableRec  normal_bottom;\n    PSH_Blue_TableRec  family_top;\n    PSH_Blue_TableRec  family_bottom;\n\n    FT_Fixed           blue_scale;\n    FT_Int             blue_shift;\n    FT_Int             blue_threshold;\n    FT_Int             blue_fuzz;\n    FT_Bool            no_overshoots;\n\n  } PSH_BluesRec, *PSH_Blues;\n\n\n  /* font globals.                                         */\n  /* dimension 0 => X coordinates + vertical hints/stems   */\n  /* dimension 1 => Y coordinates + horizontal hints/stems */\n  typedef struct  PSH_GlobalsRec_\n  {\n    FT_Memory         memory;\n    PSH_DimensionRec  dimension[2];\n    PSH_BluesRec      blues;\n\n  } PSH_GlobalsRec;\n\n\n#define PSH_BLUE_ALIGN_NONE  0\n#define PSH_BLUE_ALIGN_TOP   1\n#define PSH_BLUE_ALIGN_BOT   2\n\n\n  typedef struct  PSH_AlignmentRec_\n  {\n    int     align;\n    FT_Pos  align_top;\n    FT_Pos  align_bot;\n\n  } PSH_AlignmentRec, *PSH_Alignment;\n\n\n  FT_LOCAL( void )\n  psh_globals_funcs_init( PSH_Globals_FuncsRec*  funcs );\n\n\n#if 0\n  /* snap a stem width to fitter coordinates.  `org_width' is in font */\n  /* units.  The result is in device pixels (26.6 format).            */\n  FT_LOCAL( FT_Pos )\n  psh_dimension_snap_width( PSH_Dimension  dimension,\n                            FT_Int         org_width );\n#endif\n\n  FT_LOCAL( void )\n  psh_globals_set_scale( PSH_Globals  globals,\n                         FT_Fixed     x_scale,\n                         FT_Fixed     y_scale,\n                         FT_Fixed     x_delta,\n                         FT_Fixed     y_delta );\n\n  /* snap a stem to one or two blue zones */\n  FT_LOCAL( void )\n  psh_blues_snap_stem( PSH_Blues      blues,\n                       FT_Int         stem_top,\n                       FT_Int         stem_bot,\n                       PSH_Alignment  alignment );\n  /* */\n\n#ifdef DEBUG_HINTER\n  extern PSH_Globals  ps_debug_globals;\n#endif\n\n\nFT_END_HEADER\n\n\n#endif /* __PSHGLOB_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshinter.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshinter.c                                                             */\n/*                                                                         */\n/*    FreeType PostScript Hinting module                                   */\n/*                                                                         */\n/*  Copyright 2001, 2003 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"pshpic.c\"\n#include \"pshrec.c\"\n#include \"pshglob.c\"\n#include \"pshalgo.c\"\n#include \"pshmod.c\"\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshmod.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshmod.c                                                               */\n/*                                                                         */\n/*    FreeType PostScript hinter module implementation (body).             */\n/*                                                                         */\n/*  Copyright 2001, 2002, 2007, 2009, 2012 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include \"pshrec.h\"\n#include \"pshalgo.h\"\n#include \"pshpic.h\"\n\n\n  /* the Postscript Hinter module structure */\n  typedef struct  PS_Hinter_Module_Rec_\n  {\n    FT_ModuleRec          root;\n    PS_HintsRec           ps_hints;\n\n    PSH_Globals_FuncsRec  globals_funcs;\n    T1_Hints_FuncsRec     t1_funcs;\n    T2_Hints_FuncsRec     t2_funcs;\n\n  } PS_Hinter_ModuleRec, *PS_Hinter_Module;\n\n\n  /* finalize module */\n  FT_CALLBACK_DEF( void )\n  ps_hinter_done( PS_Hinter_Module  module )\n  {\n    module->t1_funcs.hints = NULL;\n    module->t2_funcs.hints = NULL;\n\n    ps_hints_done( &module->ps_hints );\n  }\n\n\n  /* initialize module, create hints recorder and the interface */\n  FT_CALLBACK_DEF( FT_Error )\n  ps_hinter_init( PS_Hinter_Module  module )\n  {\n    FT_Memory  memory = module->root.memory;\n    void*      ph     = &module->ps_hints;\n\n\n    ps_hints_init( &module->ps_hints, memory );\n\n    psh_globals_funcs_init( &module->globals_funcs );\n\n    t1_hints_funcs_init( &module->t1_funcs );\n    module->t1_funcs.hints = (T1_Hints)ph;\n\n    t2_hints_funcs_init( &module->t2_funcs );\n    module->t2_funcs.hints = (T2_Hints)ph;\n\n    return 0;\n  }\n\n\n  /* returns global hints interface */\n  FT_CALLBACK_DEF( PSH_Globals_Funcs )\n  pshinter_get_globals_funcs( FT_Module  module )\n  {\n    return &((PS_Hinter_Module)module)->globals_funcs;\n  }\n\n\n  /* return Type 1 hints interface */\n  FT_CALLBACK_DEF( T1_Hints_Funcs )\n  pshinter_get_t1_funcs( FT_Module  module )\n  {\n    return &((PS_Hinter_Module)module)->t1_funcs;\n  }\n\n\n  /* return Type 2 hints interface */\n  FT_CALLBACK_DEF( T2_Hints_Funcs )\n  pshinter_get_t2_funcs( FT_Module  module )\n  {\n    return &((PS_Hinter_Module)module)->t2_funcs;\n  }\n\n\n  FT_DEFINE_PSHINTER_INTERFACE(\n    pshinter_interface,\n    pshinter_get_globals_funcs,\n    pshinter_get_t1_funcs,\n    pshinter_get_t2_funcs )\n\n\n  FT_DEFINE_MODULE(\n    pshinter_module_class,\n\n    0,\n    sizeof ( PS_Hinter_ModuleRec ),\n    \"pshinter\",\n    0x10000L,\n    0x20000L,\n\n    &PSHINTER_INTERFACE_GET,              /* module-specific interface */\n\n    (FT_Module_Constructor)ps_hinter_init,\n    (FT_Module_Destructor) ps_hinter_done,\n    (FT_Module_Requester)  NULL )   /* no additional interface for now */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshmod.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshmod.h                                                               */\n/*                                                                         */\n/*    PostScript hinter module interface (specification).                  */\n/*                                                                         */\n/*  Copyright 2001 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSHMOD_H__\n#define __PSHMOD_H__\n\n\n#include <ft2build.h>\n#include FT_MODULE_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_DECLARE_MODULE( pshinter_module_class )\n\n\nFT_END_HEADER\n\n\n#endif /* __PSHMOD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshnterr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshnterr.h                                                             */\n/*                                                                         */\n/*    PS Hinter error codes (specification only).                          */\n/*                                                                         */\n/*  Copyright 2003, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the PSHinter error enumeration constants. */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __PSHNTERR_H__\n#define __PSHNTERR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  PSH_Err_\n#define FT_ERR_BASE    FT_Mod_Err_PShinter\n\n#include FT_ERRORS_H\n\n#endif /* __PSHNTERR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshpic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshpic.c                                                               */\n/*                                                                         */\n/*    The FreeType position independent code services for pshinter module. */\n/*                                                                         */\n/*  Copyright 2009, 2010, 2012, 2013 by                                    */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"pshpic.h\"\n#include \"pshnterr.h\"\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* forward declaration of PIC init functions from pshmod.c */\n  void\n  FT_Init_Class_pshinter_interface( FT_Library           library,\n                                    PSHinter_Interface*  clazz );\n\n  void\n  pshinter_module_class_pic_free( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Memory          memory        = library->memory;\n\n\n    if ( pic_container->pshinter )\n    {\n      FT_FREE( pic_container->pshinter );\n      pic_container->pshinter = NULL;\n    }\n  }\n\n\n  FT_Error\n  pshinter_module_class_pic_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Error           error         = FT_Err_Ok;\n    PSHinterPIC*       container     = NULL;\n    FT_Memory          memory        = library->memory;\n\n\n    /* allocate pointer, clear and set global container pointer */\n    if ( FT_ALLOC( container, sizeof ( *container ) ) )\n      return error;\n    FT_MEM_SET( container, 0, sizeof ( *container ) );\n    pic_container->pshinter = container;\n\n    /* add call to initialization function when you add new scripts */\n    FT_Init_Class_pshinter_interface(\n      library, &container->pshinter_interface );\n\n    if ( error )\n      pshinter_module_class_pic_free( library );\n\n    return error;\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshpic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshpic.h                                                               */\n/*                                                                         */\n/*    The FreeType position independent code services for pshinter module. */\n/*                                                                         */\n/*  Copyright 2009, 2012, 2013 by                                          */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSHPIC_H__\n#define __PSHPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#include FT_INTERNAL_PIC_H\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define PSHINTER_INTERFACE_GET  pshinter_interface\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n\n  typedef struct  PSHinterPIC_\n  {\n    PSHinter_Interface  pshinter_interface;\n\n  } PSHinterPIC;\n\n\n#define GET_PIC( lib )  ( (PSHinterPIC*)( (lib)->pic_container.pshinter ) )\n\n#define PSHINTER_INTERFACE_GET  ( GET_PIC( library )->pshinter_interface )\n\n  /* see pshpic.c for the implementation */\n  void\n  pshinter_module_class_pic_free( FT_Library  library );\n\n  FT_Error\n  pshinter_module_class_pic_init( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __PSHPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshrec.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshrec.c                                                               */\n/*                                                                         */\n/*    FreeType PostScript hints recorder (body).                           */\n/*                                                                         */\n/*  Copyright 2001-2004, 2007, 2009, 2013, 2014 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_CALC_H\n\n#include \"pshrec.h\"\n#include \"pshalgo.h\"\n\n#include \"pshnterr.h\"\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_pshrec\n\n#ifdef DEBUG_HINTER\n  PS_Hints  ps_debug_hints         = 0;\n  int       ps_debug_no_horz_hints = 0;\n  int       ps_debug_no_vert_hints = 0;\n#endif\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      PS_HINT MANAGEMENT                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* destroy hints table */\n  static void\n  ps_hint_table_done( PS_Hint_Table  table,\n                      FT_Memory      memory )\n  {\n    FT_FREE( table->hints );\n    table->num_hints = 0;\n    table->max_hints = 0;\n  }\n\n\n  /* ensure that a table can contain \"count\" elements */\n  static FT_Error\n  ps_hint_table_ensure( PS_Hint_Table  table,\n                        FT_UInt        count,\n                        FT_Memory      memory )\n  {\n    FT_UInt   old_max = table->max_hints;\n    FT_UInt   new_max = count;\n    FT_Error  error   = FT_Err_Ok;\n\n\n    if ( new_max > old_max )\n    {\n      /* try to grow the table */\n      new_max = FT_PAD_CEIL( new_max, 8 );\n      if ( !FT_RENEW_ARRAY( table->hints, old_max, new_max ) )\n        table->max_hints = new_max;\n    }\n    return error;\n  }\n\n\n  static FT_Error\n  ps_hint_table_alloc( PS_Hint_Table  table,\n                       FT_Memory      memory,\n                       PS_Hint       *ahint )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_UInt   count;\n    PS_Hint   hint = 0;\n\n\n    count = table->num_hints;\n    count++;\n\n    if ( count >= table->max_hints )\n    {\n      error = ps_hint_table_ensure( table, count, memory );\n      if ( error )\n        goto Exit;\n    }\n\n    hint        = table->hints + count - 1;\n    hint->pos   = 0;\n    hint->len   = 0;\n    hint->flags = 0;\n\n    table->num_hints = count;\n\n  Exit:\n    *ahint = hint;\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      PS_MASK MANAGEMENT                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* destroy mask */\n  static void\n  ps_mask_done( PS_Mask    mask,\n                FT_Memory  memory )\n  {\n    FT_FREE( mask->bytes );\n    mask->num_bits  = 0;\n    mask->max_bits  = 0;\n    mask->end_point = 0;\n  }\n\n\n  /* ensure that a mask can contain \"count\" bits */\n  static FT_Error\n  ps_mask_ensure( PS_Mask    mask,\n                  FT_UInt    count,\n                  FT_Memory  memory )\n  {\n    FT_UInt   old_max = ( mask->max_bits + 7 ) >> 3;\n    FT_UInt   new_max = ( count          + 7 ) >> 3;\n    FT_Error  error   = FT_Err_Ok;\n\n\n    if ( new_max > old_max )\n    {\n      new_max = FT_PAD_CEIL( new_max, 8 );\n      if ( !FT_RENEW_ARRAY( mask->bytes, old_max, new_max ) )\n        mask->max_bits = new_max * 8;\n    }\n    return error;\n  }\n\n\n  /* test a bit value in a given mask */\n  static FT_Int\n  ps_mask_test_bit( PS_Mask  mask,\n                    FT_Int   idx )\n  {\n    if ( (FT_UInt)idx >= mask->num_bits )\n      return 0;\n\n    return mask->bytes[idx >> 3] & ( 0x80 >> ( idx & 7 ) );\n  }\n\n\n  /* clear a given bit */\n  static void\n  ps_mask_clear_bit( PS_Mask  mask,\n                     FT_Int   idx )\n  {\n    FT_Byte*  p;\n\n\n    if ( (FT_UInt)idx >= mask->num_bits )\n      return;\n\n    p    = mask->bytes + ( idx >> 3 );\n    p[0] = (FT_Byte)( p[0] & ~( 0x80 >> ( idx & 7 ) ) );\n  }\n\n\n  /* set a given bit, possibly grow the mask */\n  static FT_Error\n  ps_mask_set_bit( PS_Mask    mask,\n                   FT_Int     idx,\n                   FT_Memory  memory )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_Byte*  p;\n\n\n    if ( idx < 0 )\n      goto Exit;\n\n    if ( (FT_UInt)idx >= mask->num_bits )\n    {\n      error = ps_mask_ensure( mask, idx + 1, memory );\n      if ( error )\n        goto Exit;\n\n      mask->num_bits = idx + 1;\n    }\n\n    p    = mask->bytes + ( idx >> 3 );\n    p[0] = (FT_Byte)( p[0] | ( 0x80 >> ( idx & 7 ) ) );\n\n  Exit:\n    return error;\n  }\n\n\n  /* destroy mask table */\n  static void\n  ps_mask_table_done( PS_Mask_Table  table,\n                      FT_Memory      memory )\n  {\n    FT_UInt  count = table->max_masks;\n    PS_Mask  mask  = table->masks;\n\n\n    for ( ; count > 0; count--, mask++ )\n      ps_mask_done( mask, memory );\n\n    FT_FREE( table->masks );\n    table->num_masks = 0;\n    table->max_masks = 0;\n  }\n\n\n  /* ensure that a mask table can contain \"count\" masks */\n  static FT_Error\n  ps_mask_table_ensure( PS_Mask_Table  table,\n                        FT_UInt        count,\n                        FT_Memory      memory )\n  {\n    FT_UInt   old_max = table->max_masks;\n    FT_UInt   new_max = count;\n    FT_Error  error   = FT_Err_Ok;\n\n\n    if ( new_max > old_max )\n    {\n      new_max = FT_PAD_CEIL( new_max, 8 );\n      if ( !FT_RENEW_ARRAY( table->masks, old_max, new_max ) )\n        table->max_masks = new_max;\n    }\n    return error;\n  }\n\n\n  /* allocate a new mask in a table */\n  static FT_Error\n  ps_mask_table_alloc( PS_Mask_Table  table,\n                       FT_Memory      memory,\n                       PS_Mask       *amask )\n  {\n    FT_UInt   count;\n    FT_Error  error = FT_Err_Ok;\n    PS_Mask   mask  = 0;\n\n\n    count = table->num_masks;\n    count++;\n\n    if ( count > table->max_masks )\n    {\n      error = ps_mask_table_ensure( table, count, memory );\n      if ( error )\n        goto Exit;\n    }\n\n    mask             = table->masks + count - 1;\n    mask->num_bits   = 0;\n    mask->end_point  = 0;\n    table->num_masks = count;\n\n  Exit:\n    *amask = mask;\n    return error;\n  }\n\n\n  /* return last hint mask in a table, create one if the table is empty */\n  static FT_Error\n  ps_mask_table_last( PS_Mask_Table  table,\n                      FT_Memory      memory,\n                      PS_Mask       *amask )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_UInt   count;\n    PS_Mask   mask;\n\n\n    count = table->num_masks;\n    if ( count == 0 )\n    {\n      error = ps_mask_table_alloc( table, memory, &mask );\n      if ( error )\n        goto Exit;\n    }\n    else\n      mask = table->masks + count - 1;\n\n  Exit:\n    *amask = mask;\n    return error;\n  }\n\n\n  /* set a new mask to a given bit range */\n  static FT_Error\n  ps_mask_table_set_bits( PS_Mask_Table   table,\n                          const FT_Byte*  source,\n                          FT_UInt         bit_pos,\n                          FT_UInt         bit_count,\n                          FT_Memory       memory )\n  {\n    FT_Error  error;\n    PS_Mask   mask;\n\n\n    error = ps_mask_table_last( table, memory, &mask );\n    if ( error )\n      goto Exit;\n\n    error = ps_mask_ensure( mask, bit_count, memory );\n    if ( error )\n      goto Exit;\n\n    mask->num_bits = bit_count;\n\n    /* now, copy bits */\n    {\n      FT_Byte*  read  = (FT_Byte*)source + ( bit_pos >> 3 );\n      FT_Int    rmask = 0x80 >> ( bit_pos & 7 );\n      FT_Byte*  write = mask->bytes;\n      FT_Int    wmask = 0x80;\n      FT_Int    val;\n\n\n      for ( ; bit_count > 0; bit_count-- )\n      {\n        val = write[0] & ~wmask;\n\n        if ( read[0] & rmask )\n          val |= wmask;\n\n        write[0] = (FT_Byte)val;\n\n        rmask >>= 1;\n        if ( rmask == 0 )\n        {\n          read++;\n          rmask = 0x80;\n        }\n\n        wmask >>= 1;\n        if ( wmask == 0 )\n        {\n          write++;\n          wmask = 0x80;\n        }\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* test whether two masks in a table intersect */\n  static FT_Int\n  ps_mask_table_test_intersect( PS_Mask_Table  table,\n                                FT_Int         index1,\n                                FT_Int         index2 )\n  {\n    PS_Mask   mask1  = table->masks + index1;\n    PS_Mask   mask2  = table->masks + index2;\n    FT_Byte*  p1     = mask1->bytes;\n    FT_Byte*  p2     = mask2->bytes;\n    FT_UInt   count1 = mask1->num_bits;\n    FT_UInt   count2 = mask2->num_bits;\n    FT_UInt   count;\n\n\n    count = FT_MIN( count1, count2 );\n    for ( ; count >= 8; count -= 8 )\n    {\n      if ( p1[0] & p2[0] )\n        return 1;\n\n      p1++;\n      p2++;\n    }\n\n    if ( count == 0 )\n      return 0;\n\n    return ( p1[0] & p2[0] ) & ~( 0xFF >> count );\n  }\n\n\n  /* merge two masks, used by ps_mask_table_merge_all */\n  static FT_Error\n  ps_mask_table_merge( PS_Mask_Table  table,\n                       FT_Int         index1,\n                       FT_Int         index2,\n                       FT_Memory      memory )\n  {\n    FT_UInt   temp;\n    FT_Error  error = FT_Err_Ok;\n\n\n    /* swap index1 and index2 so that index1 < index2 */\n    if ( index1 > index2 )\n    {\n      temp   = index1;\n      index1 = index2;\n      index2 = temp;\n    }\n\n    if ( index1 < index2 && index1 >= 0 && index2 < (FT_Int)table->num_masks )\n    {\n      /* we need to merge the bitsets of index1 and index2 with a */\n      /* simple union                                             */\n      PS_Mask  mask1  = table->masks + index1;\n      PS_Mask  mask2  = table->masks + index2;\n      FT_UInt  count1 = mask1->num_bits;\n      FT_UInt  count2 = mask2->num_bits;\n      FT_Int   delta;\n\n\n      if ( count2 > 0 )\n      {\n        FT_UInt   pos;\n        FT_Byte*  read;\n        FT_Byte*  write;\n\n\n        /* if \"count2\" is greater than \"count1\", we need to grow the */\n        /* first bitset, and clear the highest bits                  */\n        if ( count2 > count1 )\n        {\n          error = ps_mask_ensure( mask1, count2, memory );\n          if ( error )\n            goto Exit;\n\n          for ( pos = count1; pos < count2; pos++ )\n            ps_mask_clear_bit( mask1, pos );\n        }\n\n        /* merge (unite) the bitsets */\n        read  = mask2->bytes;\n        write = mask1->bytes;\n        pos   = (FT_UInt)( ( count2 + 7 ) >> 3 );\n\n        for ( ; pos > 0; pos-- )\n        {\n          write[0] = (FT_Byte)( write[0] | read[0] );\n          write++;\n          read++;\n        }\n      }\n\n      /* Now, remove \"mask2\" from the list.  We need to keep the masks */\n      /* sorted in order of importance, so move table elements.        */\n      mask2->num_bits  = 0;\n      mask2->end_point = 0;\n\n      delta = table->num_masks - 1 - index2; /* number of masks to move */\n      if ( delta > 0 )\n      {\n        /* move to end of table for reuse */\n        PS_MaskRec  dummy = *mask2;\n\n\n        ft_memmove( mask2, mask2 + 1, delta * sizeof ( PS_MaskRec ) );\n\n        mask2[delta] = dummy;\n      }\n\n      table->num_masks--;\n    }\n    else\n      FT_TRACE0(( \"ps_mask_table_merge: ignoring invalid indices (%d,%d)\\n\",\n                  index1, index2 ));\n\n  Exit:\n    return error;\n  }\n\n\n  /* Try to merge all masks in a given table.  This is used to merge */\n  /* all counter masks into independent counter \"paths\".             */\n  /*                                                                 */\n  static FT_Error\n  ps_mask_table_merge_all( PS_Mask_Table  table,\n                           FT_Memory      memory )\n  {\n    FT_Int    index1, index2;\n    FT_Error  error = FT_Err_Ok;\n\n\n    for ( index1 = table->num_masks - 1; index1 > 0; index1-- )\n    {\n      for ( index2 = index1 - 1; index2 >= 0; index2-- )\n      {\n        if ( ps_mask_table_test_intersect( table, index1, index2 ) )\n        {\n          error = ps_mask_table_merge( table, index2, index1, memory );\n          if ( error )\n            goto Exit;\n\n          break;\n        }\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    PS_DIMENSION MANAGEMENT                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* finalize a given dimension */\n  static void\n  ps_dimension_done( PS_Dimension  dimension,\n                     FT_Memory     memory )\n  {\n    ps_mask_table_done( &dimension->counters, memory );\n    ps_mask_table_done( &dimension->masks,    memory );\n    ps_hint_table_done( &dimension->hints,    memory );\n  }\n\n\n  /* initialize a given dimension */\n  static void\n  ps_dimension_init( PS_Dimension  dimension )\n  {\n    dimension->hints.num_hints    = 0;\n    dimension->masks.num_masks    = 0;\n    dimension->counters.num_masks = 0;\n  }\n\n\n#if 0\n\n  /* set a bit at a given index in the current hint mask */\n  static FT_Error\n  ps_dimension_set_mask_bit( PS_Dimension  dim,\n                             FT_UInt       idx,\n                             FT_Memory     memory )\n  {\n    PS_Mask   mask;\n    FT_Error  error = FT_Err_Ok;\n\n\n    /* get last hint mask */\n    error = ps_mask_table_last( &dim->masks, memory, &mask );\n    if ( error )\n      goto Exit;\n\n    error = ps_mask_set_bit( mask, idx, memory );\n\n  Exit:\n    return error;\n  }\n\n#endif\n\n  /* set the end point in a mask, called from \"End\" & \"Reset\" methods */\n  static void\n  ps_dimension_end_mask( PS_Dimension  dim,\n                         FT_UInt       end_point )\n  {\n    FT_UInt  count = dim->masks.num_masks;\n\n\n    if ( count > 0 )\n    {\n      PS_Mask  mask = dim->masks.masks + count - 1;\n\n\n      mask->end_point = end_point;\n    }\n  }\n\n\n  /* set the end point in the current mask, then create a new empty one */\n  /* (called by \"Reset\" method)                                         */\n  static FT_Error\n  ps_dimension_reset_mask( PS_Dimension  dim,\n                           FT_UInt       end_point,\n                           FT_Memory     memory )\n  {\n    PS_Mask  mask;\n\n\n    /* end current mask */\n    ps_dimension_end_mask( dim, end_point );\n\n    /* allocate new one */\n    return ps_mask_table_alloc( &dim->masks, memory, &mask );\n  }\n\n\n  /* set a new mask, called from the \"T2Stem\" method */\n  static FT_Error\n  ps_dimension_set_mask_bits( PS_Dimension    dim,\n                              const FT_Byte*  source,\n                              FT_UInt         source_pos,\n                              FT_UInt         source_bits,\n                              FT_UInt         end_point,\n                              FT_Memory       memory )\n  {\n    FT_Error  error;\n\n\n    /* reset current mask, if any */\n    error = ps_dimension_reset_mask( dim, end_point, memory );\n    if ( error )\n      goto Exit;\n\n    /* set bits in new mask */\n    error = ps_mask_table_set_bits( &dim->masks, source,\n                                    source_pos, source_bits, memory );\n\n  Exit:\n    return error;\n  }\n\n\n  /* add a new single stem (called from \"T1Stem\" method) */\n  static FT_Error\n  ps_dimension_add_t1stem( PS_Dimension  dim,\n                           FT_Int        pos,\n                           FT_Int        len,\n                           FT_Memory     memory,\n                           FT_Int       *aindex )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_UInt   flags = 0;\n\n\n    /* detect ghost stem */\n    if ( len < 0 )\n    {\n      flags |= PS_HINT_FLAG_GHOST;\n      if ( len == -21 )\n      {\n        flags |= PS_HINT_FLAG_BOTTOM;\n        pos   += len;\n      }\n      len = 0;\n    }\n\n    if ( aindex )\n      *aindex = -1;\n\n    /* now, lookup stem in the current hints table */\n    {\n      PS_Mask  mask;\n      FT_UInt  idx;\n      FT_UInt  max   = dim->hints.num_hints;\n      PS_Hint  hint  = dim->hints.hints;\n\n\n      for ( idx = 0; idx < max; idx++, hint++ )\n      {\n        if ( hint->pos == pos && hint->len == len )\n          break;\n      }\n\n      /* we need to create a new hint in the table */\n      if ( idx >= max )\n      {\n        error = ps_hint_table_alloc( &dim->hints, memory, &hint );\n        if ( error )\n          goto Exit;\n\n        hint->pos   = pos;\n        hint->len   = len;\n        hint->flags = flags;\n      }\n\n      /* now, store the hint in the current mask */\n      error = ps_mask_table_last( &dim->masks, memory, &mask );\n      if ( error )\n        goto Exit;\n\n      error = ps_mask_set_bit( mask, idx, memory );\n      if ( error )\n        goto Exit;\n\n      if ( aindex )\n        *aindex = (FT_Int)idx;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /* add a \"hstem3/vstem3\" counter to our dimension table */\n  static FT_Error\n  ps_dimension_add_counter( PS_Dimension  dim,\n                            FT_Int        hint1,\n                            FT_Int        hint2,\n                            FT_Int        hint3,\n                            FT_Memory     memory )\n  {\n    FT_Error  error   = FT_Err_Ok;\n    FT_UInt   count   = dim->counters.num_masks;\n    PS_Mask   counter = dim->counters.masks;\n\n\n    /* try to find an existing counter mask that already uses */\n    /* one of these stems here                                */\n    for ( ; count > 0; count--, counter++ )\n    {\n      if ( ps_mask_test_bit( counter, hint1 ) ||\n           ps_mask_test_bit( counter, hint2 ) ||\n           ps_mask_test_bit( counter, hint3 ) )\n        break;\n    }\n\n    /* create a new counter when needed */\n    if ( count == 0 )\n    {\n      error = ps_mask_table_alloc( &dim->counters, memory, &counter );\n      if ( error )\n        goto Exit;\n    }\n\n    /* now, set the bits for our hints in the counter mask */\n    error = ps_mask_set_bit( counter, hint1, memory );\n    if ( error )\n      goto Exit;\n\n    error = ps_mask_set_bit( counter, hint2, memory );\n    if ( error )\n      goto Exit;\n\n    error = ps_mask_set_bit( counter, hint3, memory );\n    if ( error )\n      goto Exit;\n\n  Exit:\n    return error;\n  }\n\n\n  /* end of recording session for a given dimension */\n  static FT_Error\n  ps_dimension_end( PS_Dimension  dim,\n                    FT_UInt       end_point,\n                    FT_Memory     memory )\n  {\n    /* end hint mask table */\n    ps_dimension_end_mask( dim, end_point );\n\n    /* merge all counter masks into independent \"paths\" */\n    return ps_mask_table_merge_all( &dim->counters, memory );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    PS_RECORDER MANAGEMENT                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* destroy hints */\n  FT_LOCAL( void )\n  ps_hints_done( PS_Hints  hints )\n  {\n    FT_Memory  memory = hints->memory;\n\n\n    ps_dimension_done( &hints->dimension[0], memory );\n    ps_dimension_done( &hints->dimension[1], memory );\n\n    hints->error  = FT_Err_Ok;\n    hints->memory = 0;\n  }\n\n\n  FT_LOCAL( void )\n  ps_hints_init( PS_Hints   hints,\n                 FT_Memory  memory )\n  {\n    FT_MEM_ZERO( hints, sizeof ( *hints ) );\n    hints->memory = memory;\n  }\n\n\n  /* initialize a hints for a new session */\n  static void\n  ps_hints_open( PS_Hints      hints,\n                 PS_Hint_Type  hint_type )\n  {\n    switch ( hint_type )\n    {\n    case PS_HINT_TYPE_1:\n    case PS_HINT_TYPE_2:\n      hints->error     = FT_Err_Ok;\n      hints->hint_type = hint_type;\n\n      ps_dimension_init( &hints->dimension[0] );\n      ps_dimension_init( &hints->dimension[1] );\n      break;\n\n    default:\n      hints->error     = FT_THROW( Invalid_Argument );\n      hints->hint_type = hint_type;\n\n      FT_TRACE0(( \"ps_hints_open: invalid charstring type\\n\" ));\n      break;\n    }\n  }\n\n\n  /* add one or more stems to the current hints table */\n  static void\n  ps_hints_stem( PS_Hints  hints,\n                 FT_Int    dimension,\n                 FT_UInt   count,\n                 FT_Long*  stems )\n  {\n    if ( !hints->error )\n    {\n      /* limit \"dimension\" to 0..1 */\n      if ( dimension < 0 || dimension > 1 )\n      {\n        FT_TRACE0(( \"ps_hints_stem: invalid dimension (%d) used\\n\",\n                    dimension ));\n        dimension = ( dimension != 0 );\n      }\n\n      /* record the stems in the current hints/masks table */\n      switch ( hints->hint_type )\n      {\n      case PS_HINT_TYPE_1:  /* Type 1 \"hstem\" or \"vstem\" operator */\n      case PS_HINT_TYPE_2:  /* Type 2 \"hstem\" or \"vstem\" operator */\n        {\n          PS_Dimension  dim = &hints->dimension[dimension];\n\n\n          for ( ; count > 0; count--, stems += 2 )\n          {\n            FT_Error   error;\n            FT_Memory  memory = hints->memory;\n\n\n            error = ps_dimension_add_t1stem(\n                      dim, (FT_Int)stems[0], (FT_Int)stems[1],\n                      memory, NULL );\n            if ( error )\n            {\n              FT_ERROR(( \"ps_hints_stem: could not add stem\"\n                         \" (%d,%d) to hints table\\n\", stems[0], stems[1] ));\n\n              hints->error = error;\n              return;\n            }\n          }\n          break;\n        }\n\n      default:\n        FT_TRACE0(( \"ps_hints_stem: called with invalid hint type (%d)\\n\",\n                    hints->hint_type ));\n        break;\n      }\n    }\n  }\n\n\n  /* add one Type1 counter stem to the current hints table */\n  static void\n  ps_hints_t1stem3( PS_Hints   hints,\n                    FT_Int     dimension,\n                    FT_Fixed*  stems )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( !hints->error )\n    {\n      PS_Dimension  dim;\n      FT_Memory     memory = hints->memory;\n      FT_Int        count;\n      FT_Int        idx[3];\n\n\n      /* limit \"dimension\" to 0..1 */\n      if ( dimension < 0 || dimension > 1 )\n      {\n        FT_TRACE0(( \"ps_hints_t1stem3: invalid dimension (%d) used\\n\",\n                    dimension ));\n        dimension = ( dimension != 0 );\n      }\n\n      dim = &hints->dimension[dimension];\n\n      /* there must be 6 elements in the 'stem' array */\n      if ( hints->hint_type == PS_HINT_TYPE_1 )\n      {\n        /* add the three stems to our hints/masks table */\n        for ( count = 0; count < 3; count++, stems += 2 )\n        {\n          error = ps_dimension_add_t1stem( dim,\n                                           (FT_Int)FIXED_TO_INT( stems[0] ),\n                                           (FT_Int)FIXED_TO_INT( stems[1] ),\n                                           memory, &idx[count] );\n          if ( error )\n            goto Fail;\n        }\n\n        /* now, add the hints to the counters table */\n        error = ps_dimension_add_counter( dim, idx[0], idx[1], idx[2],\n                                          memory );\n        if ( error )\n          goto Fail;\n      }\n      else\n      {\n        FT_ERROR(( \"ps_hints_t1stem3: called with invalid hint type\\n\" ));\n        error = FT_THROW( Invalid_Argument );\n        goto Fail;\n      }\n    }\n\n    return;\n\n  Fail:\n    FT_ERROR(( \"ps_hints_t1stem3: could not add counter stems to table\\n\" ));\n    hints->error = error;\n  }\n\n\n  /* reset hints (only with Type 1 hints) */\n  static void\n  ps_hints_t1reset( PS_Hints  hints,\n                    FT_UInt   end_point )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( !hints->error )\n    {\n      FT_Memory  memory = hints->memory;\n\n\n      if ( hints->hint_type == PS_HINT_TYPE_1 )\n      {\n        error = ps_dimension_reset_mask( &hints->dimension[0],\n                                         end_point, memory );\n        if ( error )\n          goto Fail;\n\n        error = ps_dimension_reset_mask( &hints->dimension[1],\n                                         end_point, memory );\n        if ( error )\n          goto Fail;\n      }\n      else\n      {\n        /* invalid hint type */\n        error = FT_THROW( Invalid_Argument );\n        goto Fail;\n      }\n    }\n    return;\n\n  Fail:\n    hints->error = error;\n  }\n\n\n  /* Type2 \"hintmask\" operator, add a new hintmask to each direction */\n  static void\n  ps_hints_t2mask( PS_Hints        hints,\n                   FT_UInt         end_point,\n                   FT_UInt         bit_count,\n                   const FT_Byte*  bytes )\n  {\n    FT_Error  error;\n\n\n    if ( !hints->error )\n    {\n      PS_Dimension  dim    = hints->dimension;\n      FT_Memory     memory = hints->memory;\n      FT_UInt       count1 = dim[0].hints.num_hints;\n      FT_UInt       count2 = dim[1].hints.num_hints;\n\n\n      /* check bit count; must be equal to current total hint count */\n      if ( bit_count !=  count1 + count2 )\n      {\n        FT_TRACE0(( \"ps_hints_t2mask:\"\n                    \" called with invalid bitcount %d (instead of %d)\\n\",\n                   bit_count, count1 + count2 ));\n\n        /* simply ignore the operator */\n        return;\n      }\n\n      /* set-up new horizontal and vertical hint mask now */\n      error = ps_dimension_set_mask_bits( &dim[0], bytes, count2, count1,\n                                          end_point, memory );\n      if ( error )\n        goto Fail;\n\n      error = ps_dimension_set_mask_bits( &dim[1], bytes, 0, count2,\n                                          end_point, memory );\n      if ( error )\n        goto Fail;\n    }\n    return;\n\n  Fail:\n    hints->error = error;\n  }\n\n\n  static void\n  ps_hints_t2counter( PS_Hints        hints,\n                      FT_UInt         bit_count,\n                      const FT_Byte*  bytes )\n  {\n    FT_Error  error;\n\n\n    if ( !hints->error )\n    {\n      PS_Dimension  dim    = hints->dimension;\n      FT_Memory     memory = hints->memory;\n      FT_UInt       count1 = dim[0].hints.num_hints;\n      FT_UInt       count2 = dim[1].hints.num_hints;\n\n\n      /* check bit count, must be equal to current total hint count */\n      if ( bit_count !=  count1 + count2 )\n      {\n        FT_TRACE0(( \"ps_hints_t2counter:\"\n                    \" called with invalid bitcount %d (instead of %d)\\n\",\n                   bit_count, count1 + count2 ));\n\n        /* simply ignore the operator */\n        return;\n      }\n\n      /* set-up new horizontal and vertical hint mask now */\n      error = ps_dimension_set_mask_bits( &dim[0], bytes, 0, count1,\n                                          0, memory );\n      if ( error )\n        goto Fail;\n\n      error = ps_dimension_set_mask_bits( &dim[1], bytes, count1, count2,\n                                          0, memory );\n      if ( error )\n        goto Fail;\n    }\n    return;\n\n  Fail:\n    hints->error = error;\n  }\n\n\n  /* end recording session */\n  static FT_Error\n  ps_hints_close( PS_Hints  hints,\n                  FT_UInt   end_point )\n  {\n    FT_Error  error;\n\n\n    error = hints->error;\n    if ( !error )\n    {\n      FT_Memory     memory = hints->memory;\n      PS_Dimension  dim    = hints->dimension;\n\n\n      error = ps_dimension_end( &dim[0], end_point, memory );\n      if ( !error )\n      {\n        error = ps_dimension_end( &dim[1], end_point, memory );\n      }\n    }\n\n#ifdef DEBUG_HINTER\n    if ( !error )\n      ps_debug_hints = hints;\n#endif\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                TYPE 1 HINTS RECORDING INTERFACE               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  t1_hints_open( T1_Hints  hints )\n  {\n    ps_hints_open( (PS_Hints)hints, PS_HINT_TYPE_1 );\n  }\n\n  static void\n  t1_hints_stem( T1_Hints   hints,\n                 FT_Int     dimension,\n                 FT_Fixed*  coords )\n  {\n    FT_Pos  stems[2];\n\n\n    stems[0] = FIXED_TO_INT( coords[0] );\n    stems[1] = FIXED_TO_INT( coords[1] );\n\n    ps_hints_stem( (PS_Hints)hints, dimension, 1, stems );\n  }\n\n\n  FT_LOCAL_DEF( void )\n  t1_hints_funcs_init( T1_Hints_FuncsRec*  funcs )\n  {\n    FT_MEM_ZERO( (char*)funcs, sizeof ( *funcs ) );\n\n    funcs->open  = (T1_Hints_OpenFunc)    t1_hints_open;\n    funcs->close = (T1_Hints_CloseFunc)   ps_hints_close;\n    funcs->stem  = (T1_Hints_SetStemFunc) t1_hints_stem;\n    funcs->stem3 = (T1_Hints_SetStem3Func)ps_hints_t1stem3;\n    funcs->reset = (T1_Hints_ResetFunc)   ps_hints_t1reset;\n    funcs->apply = (T1_Hints_ApplyFunc)   ps_hints_apply;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                TYPE 2 HINTS RECORDING INTERFACE               *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static void\n  t2_hints_open( T2_Hints  hints )\n  {\n    ps_hints_open( (PS_Hints)hints, PS_HINT_TYPE_2 );\n  }\n\n\n  static void\n  t2_hints_stems( T2_Hints   hints,\n                  FT_Int     dimension,\n                  FT_Int     count,\n                  FT_Fixed*  coords )\n  {\n    FT_Pos  stems[32], y, n;\n    FT_Int  total = count;\n\n\n    y = 0;\n    while ( total > 0 )\n    {\n      /* determine number of stems to write */\n      count = total;\n      if ( count > 16 )\n        count = 16;\n\n      /* compute integer stem positions in font units */\n      for ( n = 0; n < count * 2; n++ )\n      {\n        y       += coords[n];\n        stems[n] = FIXED_TO_INT( y );\n      }\n\n      /* compute lengths */\n      for ( n = 0; n < count * 2; n += 2 )\n        stems[n + 1] = stems[n + 1] - stems[n];\n\n      /* add them to the current dimension */\n      ps_hints_stem( (PS_Hints)hints, dimension, count, stems );\n\n      total -= count;\n    }\n  }\n\n\n  FT_LOCAL_DEF( void )\n  t2_hints_funcs_init( T2_Hints_FuncsRec*  funcs )\n  {\n    FT_MEM_ZERO( funcs, sizeof ( *funcs ) );\n\n    funcs->open    = (T2_Hints_OpenFunc)   t2_hints_open;\n    funcs->close   = (T2_Hints_CloseFunc)  ps_hints_close;\n    funcs->stems   = (T2_Hints_StemsFunc)  t2_hints_stems;\n    funcs->hintmask= (T2_Hints_MaskFunc)   ps_hints_t2mask;\n    funcs->counter = (T2_Hints_CounterFunc)ps_hints_t2counter;\n    funcs->apply   = (T2_Hints_ApplyFunc)  ps_hints_apply;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/pshinter/pshrec.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pshrec.h                                                               */\n/*                                                                         */\n/*    Postscript (Type1/Type2) hints recorder (specification).             */\n/*                                                                         */\n/*  Copyright 2001, 2002, 2003, 2006, 2008, 2014 by                        */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /**************************************************************************/\n  /*                                                                        */\n  /*  The functions defined here are called from the Type 1, CID and CFF    */\n  /*  font drivers to record the hints of a given character/glyph.          */\n  /*                                                                        */\n  /*  The hints are recorded in a unified format, and are later processed   */\n  /*  by the `optimizer' and `fitter' to adjust the outlines to the pixel   */\n  /*  grid.                                                                 */\n  /*                                                                        */\n  /**************************************************************************/\n\n\n#ifndef __PSHREC_H__\n#define __PSHREC_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n#include \"pshglob.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                 GLYPH HINTS RECORDER INTERNALS                *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* handle to hint record */\n  typedef struct PS_HintRec_*  PS_Hint;\n\n  /* hint types */\n  typedef enum  PS_Hint_Type_\n  {\n    PS_HINT_TYPE_1 = 1,\n    PS_HINT_TYPE_2 = 2\n\n  } PS_Hint_Type;\n\n\n  /* hint flags */\n  typedef enum  PS_Hint_Flags_\n  {\n    PS_HINT_FLAG_GHOST  = 1,\n    PS_HINT_FLAG_BOTTOM = 2\n\n  } PS_Hint_Flags;\n\n\n  /* hint descriptor */\n  typedef struct  PS_HintRec_\n  {\n    FT_Int   pos;\n    FT_Int   len;\n    FT_UInt  flags;\n\n  } PS_HintRec;\n\n\n#define ps_hint_is_active( x )  ( (x)->flags & PS_HINT_FLAG_ACTIVE )\n#define ps_hint_is_ghost( x )   ( (x)->flags & PS_HINT_FLAG_GHOST  )\n#define ps_hint_is_bottom( x )  ( (x)->flags & PS_HINT_FLAG_BOTTOM )\n\n\n  /* hints table descriptor */\n  typedef struct  PS_Hint_TableRec_\n  {\n    FT_UInt  num_hints;\n    FT_UInt  max_hints;\n    PS_Hint  hints;\n\n  } PS_Hint_TableRec, *PS_Hint_Table;\n\n\n  /* hint and counter mask descriptor */\n  typedef struct  PS_MaskRec_\n  {\n    FT_UInt   num_bits;\n    FT_UInt   max_bits;\n    FT_Byte*  bytes;\n    FT_UInt   end_point;\n\n  } PS_MaskRec, *PS_Mask;\n\n\n  /* masks and counters table descriptor */\n  typedef struct  PS_Mask_TableRec_\n  {\n    FT_UInt  num_masks;\n    FT_UInt  max_masks;\n    PS_Mask  masks;\n\n  } PS_Mask_TableRec, *PS_Mask_Table;\n\n\n /* dimension-specific hints descriptor */\n  typedef struct  PS_DimensionRec_\n  {\n    PS_Hint_TableRec  hints;\n    PS_Mask_TableRec  masks;\n    PS_Mask_TableRec  counters;\n\n  } PS_DimensionRec, *PS_Dimension;\n\n\n  /* glyph hints descriptor                                */\n  /* dimension 0 => X coordinates + vertical hints/stems   */\n  /* dimension 1 => Y coordinates + horizontal hints/stems */\n  typedef struct  PS_HintsRec_\n  {\n    FT_Memory        memory;\n    FT_Error         error;\n    FT_UInt32        magic;\n    PS_Hint_Type     hint_type;\n    PS_DimensionRec  dimension[2];\n\n  } PS_HintsRec, *PS_Hints;\n\n  /* */\n\n  /* initialize hints recorder */\n  FT_LOCAL( void )\n  ps_hints_init( PS_Hints   hints,\n                 FT_Memory  memory );\n\n  /* finalize hints recorder */\n  FT_LOCAL( void )\n  ps_hints_done( PS_Hints  hints );\n\n  /* initialize Type1 hints recorder interface */\n  FT_LOCAL( void )\n  t1_hints_funcs_init( T1_Hints_FuncsRec*  funcs );\n\n  /* initialize Type2 hints recorder interface */\n  FT_LOCAL( void )\n  t2_hints_funcs_init( T2_Hints_FuncsRec*  funcs );\n\n\n#ifdef DEBUG_HINTER\n  extern PS_Hints  ps_debug_hints;\n  extern  int      ps_debug_no_horz_hints;\n  extern  int      ps_debug_no_vert_hints;\n#endif\n\n /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __PS_HINTER_RECORD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psnames/psmodule.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psmodule.c                                                             */\n/*                                                                         */\n/*    PSNames module implementation (body).                                */\n/*                                                                         */\n/*  Copyright 1996-2003, 2005-2008, 2012-2014 by                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n\n#include \"psmodule.h\"\n#include \"pstables.h\"\n\n#include \"psnamerr.h\"\n#include \"pspic.h\"\n\n\n#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST\n\n\n#define VARIANT_BIT         0x80000000UL\n#define BASE_GLYPH( code )  ( (FT_UInt32)( (code) & ~VARIANT_BIT ) )\n\n\n  /* Return the Unicode value corresponding to a given glyph.  Note that */\n  /* we do deal with glyph variants by detecting a non-initial dot in    */\n  /* the name, as in `A.swash' or `e.final'; in this case, the           */\n  /* VARIANT_BIT is set in the return value.                             */\n  /*                                                                     */\n  static FT_UInt32\n  ps_unicode_value( const char*  glyph_name )\n  {\n    /* If the name begins with `uni', then the glyph name may be a */\n    /* hard-coded unicode character code.                          */\n    if ( glyph_name[0] == 'u' &&\n         glyph_name[1] == 'n' &&\n         glyph_name[2] == 'i' )\n    {\n      /* determine whether the next four characters following are */\n      /* hexadecimal.                                             */\n\n      /* XXX: Add code to deal with ligatures, i.e. glyph names like */\n      /*      `uniXXXXYYYYZZZZ'...                                   */\n\n      FT_Int       count;\n      FT_UInt32    value = 0;\n      const char*  p     = glyph_name + 3;\n\n\n      for ( count = 4; count > 0; count--, p++ )\n      {\n        char          c = *p;\n        unsigned int  d;\n\n\n        d = (unsigned char)c - '0';\n        if ( d >= 10 )\n        {\n          d = (unsigned char)c - 'A';\n          if ( d >= 6 )\n            d = 16;\n          else\n            d += 10;\n        }\n\n        /* Exit if a non-uppercase hexadecimal character was found   */\n        /* -- this also catches character codes below `0' since such */\n        /* negative numbers cast to `unsigned int' are far too big.  */\n        if ( d >= 16 )\n          break;\n\n        value = ( value << 4 ) + d;\n      }\n\n      /* there must be exactly four hex digits */\n      if ( count == 0 )\n      {\n        if ( *p == '\\0' )\n          return value;\n        if ( *p == '.' )\n          return (FT_UInt32)( value | VARIANT_BIT );\n      }\n    }\n\n    /* If the name begins with `u', followed by four to six uppercase */\n    /* hexadecimal digits, it is a hard-coded unicode character code. */\n    if ( glyph_name[0] == 'u' )\n    {\n      FT_Int       count;\n      FT_UInt32    value = 0;\n      const char*  p     = glyph_name + 1;\n\n\n      for ( count = 6; count > 0; count--, p++ )\n      {\n        char          c = *p;\n        unsigned int  d;\n\n\n        d = (unsigned char)c - '0';\n        if ( d >= 10 )\n        {\n          d = (unsigned char)c - 'A';\n          if ( d >= 6 )\n            d = 16;\n          else\n            d += 10;\n        }\n\n        if ( d >= 16 )\n          break;\n\n        value = ( value << 4 ) + d;\n      }\n\n      if ( count <= 2 )\n      {\n        if ( *p == '\\0' )\n          return value;\n        if ( *p == '.' )\n          return (FT_UInt32)( value | VARIANT_BIT );\n      }\n    }\n\n    /* Look for a non-initial dot in the glyph name in order to */\n    /* find variants like `A.swash', `e.final', etc.            */\n    {\n      const char*  p   = glyph_name;\n      const char*  dot = NULL;\n\n\n      for ( ; *p; p++ )\n      {\n        if ( *p == '.' && p > glyph_name )\n        {\n          dot = p;\n          break;\n        }\n      }\n\n      /* now look up the glyph in the Adobe Glyph List */\n      if ( !dot )\n        return (FT_UInt32)ft_get_adobe_glyph_index( glyph_name, p );\n      else\n        return (FT_UInt32)( ft_get_adobe_glyph_index( glyph_name, dot ) |\n                            VARIANT_BIT );\n    }\n  }\n\n\n  /* ft_qsort callback to sort the unicode map */\n  FT_CALLBACK_DEF( int )\n  compare_uni_maps( const void*  a,\n                    const void*  b )\n  {\n    PS_UniMap*  map1 = (PS_UniMap*)a;\n    PS_UniMap*  map2 = (PS_UniMap*)b;\n    FT_UInt32   unicode1 = BASE_GLYPH( map1->unicode );\n    FT_UInt32   unicode2 = BASE_GLYPH( map2->unicode );\n\n\n    /* sort base glyphs before glyph variants */\n    if ( unicode1 == unicode2 )\n    {\n      if ( map1->unicode > map2->unicode )\n        return 1;\n      else if ( map1->unicode < map2->unicode )\n        return -1;\n      else\n        return 0;\n    }\n    else\n    {\n      if ( unicode1 > unicode2 )\n        return 1;\n      else if ( unicode1 < unicode2 )\n        return -1;\n      else\n        return 0;\n    }\n  }\n\n\n  /* support for extra glyphs not handled (well) in AGL; */\n  /* we add extra mappings for them if necessary         */\n\n#define EXTRA_GLYPH_LIST_SIZE  10\n\n  static const FT_UInt32  ft_extra_glyph_unicodes[EXTRA_GLYPH_LIST_SIZE] =\n  {\n    /* WGL 4 */\n    0x0394,\n    0x03A9,\n    0x2215,\n    0x00AD,\n    0x02C9,\n    0x03BC,\n    0x2219,\n    0x00A0,\n    /* Romanian */\n    0x021A,\n    0x021B\n  };\n\n  static const char  ft_extra_glyph_names[] =\n  {\n    'D','e','l','t','a',0,\n    'O','m','e','g','a',0,\n    'f','r','a','c','t','i','o','n',0,\n    'h','y','p','h','e','n',0,\n    'm','a','c','r','o','n',0,\n    'm','u',0,\n    'p','e','r','i','o','d','c','e','n','t','e','r','e','d',0,\n    's','p','a','c','e',0,\n    'T','c','o','m','m','a','a','c','c','e','n','t',0,\n    't','c','o','m','m','a','a','c','c','e','n','t',0\n  };\n\n  static const FT_Int\n  ft_extra_glyph_name_offsets[EXTRA_GLYPH_LIST_SIZE] =\n  {\n     0,\n     6,\n    12,\n    21,\n    28,\n    35,\n    38,\n    53,\n    59,\n    72\n  };\n\n\n  static void\n  ps_check_extra_glyph_name( const char*  gname,\n                             FT_UInt      glyph,\n                             FT_UInt*     extra_glyphs,\n                             FT_UInt     *states )\n  {\n    FT_UInt  n;\n\n\n    for ( n = 0; n < EXTRA_GLYPH_LIST_SIZE; n++ )\n    {\n      if ( ft_strcmp( ft_extra_glyph_names +\n                        ft_extra_glyph_name_offsets[n], gname ) == 0 )\n      {\n        if ( states[n] == 0 )\n        {\n          /* mark this extra glyph as a candidate for the cmap */\n          states[n]     = 1;\n          extra_glyphs[n] = glyph;\n        }\n\n        return;\n      }\n    }\n  }\n\n\n  static void\n  ps_check_extra_glyph_unicode( FT_UInt32  uni_char,\n                                FT_UInt   *states )\n  {\n    FT_UInt  n;\n\n\n    for ( n = 0; n < EXTRA_GLYPH_LIST_SIZE; n++ )\n    {\n      if ( uni_char == ft_extra_glyph_unicodes[n] )\n      {\n        /* disable this extra glyph from being added to the cmap */\n        states[n] = 2;\n\n        return;\n      }\n    }\n  }\n\n\n  /* Build a table that maps Unicode values to glyph indices. */\n  static FT_Error\n  ps_unicodes_init( FT_Memory             memory,\n                    PS_Unicodes           table,\n                    FT_UInt               num_glyphs,\n                    PS_GetGlyphNameFunc   get_glyph_name,\n                    PS_FreeGlyphNameFunc  free_glyph_name,\n                    FT_Pointer            glyph_data )\n  {\n    FT_Error  error;\n\n    FT_UInt  extra_glyph_list_states[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };\n    FT_UInt  extra_glyphs[EXTRA_GLYPH_LIST_SIZE];\n\n\n    /* we first allocate the table */\n    table->num_maps = 0;\n    table->maps     = 0;\n\n    if ( !FT_NEW_ARRAY( table->maps, num_glyphs + EXTRA_GLYPH_LIST_SIZE ) )\n    {\n      FT_UInt     n;\n      FT_UInt     count;\n      PS_UniMap*  map;\n      FT_UInt32   uni_char;\n\n\n      map = table->maps;\n\n      for ( n = 0; n < num_glyphs; n++ )\n      {\n        const char*  gname = get_glyph_name( glyph_data, n );\n\n\n        if ( gname )\n        {\n          ps_check_extra_glyph_name( gname, n,\n                                     extra_glyphs, extra_glyph_list_states );\n          uni_char = ps_unicode_value( gname );\n\n          if ( BASE_GLYPH( uni_char ) != 0 )\n          {\n            ps_check_extra_glyph_unicode( uni_char,\n                                          extra_glyph_list_states );\n            map->unicode     = uni_char;\n            map->glyph_index = n;\n            map++;\n          }\n\n          if ( free_glyph_name )\n            free_glyph_name( glyph_data, gname );\n        }\n      }\n\n      for ( n = 0; n < EXTRA_GLYPH_LIST_SIZE; n++ )\n      {\n        if ( extra_glyph_list_states[n] == 1 )\n        {\n          /* This glyph name has an additional representation. */\n          /* Add it to the cmap.                               */\n\n          map->unicode     = ft_extra_glyph_unicodes[n];\n          map->glyph_index = extra_glyphs[n];\n          map++;\n        }\n      }\n\n      /* now compress the table a bit */\n      count = (FT_UInt)( map - table->maps );\n\n      if ( count == 0 )\n      {\n        /* No unicode chars here! */\n        FT_FREE( table->maps );\n        if ( !error )\n          error = FT_THROW( No_Unicode_Glyph_Name );\n      }\n      else\n      {\n        /* Reallocate if the number of used entries is much smaller. */\n        if ( count < num_glyphs / 2 )\n        {\n          (void)FT_RENEW_ARRAY( table->maps, num_glyphs, count );\n          error = FT_Err_Ok;\n        }\n\n        /* Sort the table in increasing order of unicode values, */\n        /* taking care of glyph variants.                        */\n        ft_qsort( table->maps, count, sizeof ( PS_UniMap ),\n                  compare_uni_maps );\n      }\n\n      table->num_maps = count;\n    }\n\n    return error;\n  }\n\n\n  static FT_UInt\n  ps_unicodes_char_index( PS_Unicodes  table,\n                          FT_UInt32    unicode )\n  {\n    PS_UniMap  *min, *max, *mid, *result = NULL;\n\n\n    /* Perform a binary search on the table. */\n\n    min = table->maps;\n    max = min + table->num_maps - 1;\n\n    while ( min <= max )\n    {\n      FT_UInt32  base_glyph;\n\n\n      mid = min + ( ( max - min ) >> 1 );\n\n      if ( mid->unicode == unicode )\n      {\n        result = mid;\n        break;\n      }\n\n      base_glyph = BASE_GLYPH( mid->unicode );\n\n      if ( base_glyph == unicode )\n        result = mid; /* remember match but continue search for base glyph */\n\n      if ( min == max )\n        break;\n\n      if ( base_glyph < unicode )\n        min = mid + 1;\n      else\n        max = mid - 1;\n    }\n\n    if ( result )\n      return result->glyph_index;\n    else\n      return 0;\n  }\n\n\n  static FT_UInt32\n  ps_unicodes_char_next( PS_Unicodes  table,\n                         FT_UInt32   *unicode )\n  {\n    FT_UInt    result    = 0;\n    FT_UInt32  char_code = *unicode + 1;\n\n\n    {\n      FT_UInt     min = 0;\n      FT_UInt     max = table->num_maps;\n      FT_UInt     mid;\n      PS_UniMap*  map;\n      FT_UInt32   base_glyph;\n\n\n      while ( min < max )\n      {\n        mid = min + ( ( max - min ) >> 1 );\n        map = table->maps + mid;\n\n        if ( map->unicode == char_code )\n        {\n          result = map->glyph_index;\n          goto Exit;\n        }\n\n        base_glyph = BASE_GLYPH( map->unicode );\n\n        if ( base_glyph == char_code )\n          result = map->glyph_index;\n\n        if ( base_glyph < char_code )\n          min = mid + 1;\n        else\n          max = mid;\n      }\n\n      if ( result )\n        goto Exit;               /* we have a variant glyph */\n\n      /* we didn't find it; check whether we have a map just above it */\n      char_code = 0;\n\n      if ( min < table->num_maps )\n      {\n        map       = table->maps + min;\n        result    = map->glyph_index;\n        char_code = BASE_GLYPH( map->unicode );\n      }\n    }\n\n  Exit:\n    *unicode = char_code;\n    return result;\n  }\n\n\n#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */\n\n\n  static const char*\n  ps_get_macintosh_name( FT_UInt  name_index )\n  {\n    if ( name_index >= FT_NUM_MAC_NAMES )\n      name_index = 0;\n\n    return ft_standard_glyph_names + ft_mac_names[name_index];\n  }\n\n\n  static const char*\n  ps_get_standard_strings( FT_UInt  sid )\n  {\n    if ( sid >= FT_NUM_SID_NAMES )\n      return 0;\n\n    return ft_standard_glyph_names + ft_sid_names[sid];\n  }\n\n\n#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST\n\n  FT_DEFINE_SERVICE_PSCMAPSREC(\n    pscmaps_interface,\n    (PS_Unicode_ValueFunc)     ps_unicode_value,\n    (PS_Unicodes_InitFunc)     ps_unicodes_init,\n    (PS_Unicodes_CharIndexFunc)ps_unicodes_char_index,\n    (PS_Unicodes_CharNextFunc) ps_unicodes_char_next,\n\n    (PS_Macintosh_NameFunc)    ps_get_macintosh_name,\n    (PS_Adobe_Std_StringsFunc) ps_get_standard_strings,\n\n    t1_standard_encoding,\n    t1_expert_encoding )\n\n#else\n\n  FT_DEFINE_SERVICE_PSCMAPSREC(\n    pscmaps_interface,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n\n    (PS_Macintosh_NameFunc)    ps_get_macintosh_name,\n    (PS_Adobe_Std_StringsFunc) ps_get_standard_strings,\n\n    t1_standard_encoding,\n    t1_expert_encoding )\n\n#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */\n\n\n  FT_DEFINE_SERVICEDESCREC1(\n    pscmaps_services,\n    FT_SERVICE_ID_POSTSCRIPT_CMAPS, &PSCMAPS_INTERFACE_GET )\n\n\n  static FT_Pointer\n  psnames_get_service( FT_Module    module,\n                       const char*  service_id )\n  {\n    /* PSCMAPS_SERVICES_GET dereferences `library' in PIC mode */\n#ifdef FT_CONFIG_OPTION_PIC\n    FT_Library  library;\n\n\n    if ( !module )\n      return NULL;\n    library = module->library;\n    if ( !library )\n      return NULL;\n#else\n    FT_UNUSED( module );\n#endif\n\n    return ft_service_list_lookup( PSCMAPS_SERVICES_GET, service_id );\n  }\n\n#endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */\n\n\n#ifndef FT_CONFIG_OPTION_POSTSCRIPT_NAMES\n#define PUT_PS_NAMES_SERVICE( a )  NULL\n#else\n#define PUT_PS_NAMES_SERVICE( a )  a\n#endif\n\n  FT_DEFINE_MODULE(\n    psnames_module_class,\n\n    0,  /* this is not a font driver, nor a renderer */\n    sizeof ( FT_ModuleRec ),\n\n    \"psnames\",  /* driver name                         */\n    0x10000L,   /* driver version                      */\n    0x20000L,   /* driver requires FreeType 2 or above */\n\n    PUT_PS_NAMES_SERVICE(\n      (void*)&PSCMAPS_INTERFACE_GET ),   /* module specific interface */\n    (FT_Module_Constructor)NULL,\n    (FT_Module_Destructor) NULL,\n    (FT_Module_Requester)  PUT_PS_NAMES_SERVICE( psnames_get_service ) )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psnames/psmodule.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psmodule.h                                                             */\n/*                                                                         */\n/*    High-level PSNames module interface (specification).                 */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSMODULE_H__\n#define __PSMODULE_H__\n\n\n#include <ft2build.h>\n#include FT_MODULE_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_DECLARE_MODULE( psnames_module_class )\n\n\nFT_END_HEADER\n\n#endif /* __PSMODULE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psnames/psnamerr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psnamerr.h                                                             */\n/*                                                                         */\n/*    PS names module error codes (specification only).                    */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the PS names module error enumeration     */\n  /* constants.                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __PSNAMERR_H__\n#define __PSNAMERR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  PSnames_Err_\n#define FT_ERR_BASE    FT_Mod_Err_PSnames\n\n#include FT_ERRORS_H\n\n#endif /* __PSNAMERR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psnames/psnames.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  psnames.c                                                              */\n/*                                                                         */\n/*    FreeType PSNames module component (body only).                       */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"pspic.c\"\n#include \"psmodule.c\"\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psnames/pspic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pspic.c                                                                */\n/*                                                                         */\n/*    The FreeType position independent code services for psnames module.  */\n/*                                                                         */\n/*  Copyright 2009, 2010, 2012, 2013 by                                    */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"pspic.h\"\n#include \"psnamerr.h\"\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* forward declaration of PIC init functions from psmodule.c */\n  FT_Error\n  FT_Create_Class_pscmaps_services( FT_Library           library,\n                                    FT_ServiceDescRec**  output_class );\n  void\n  FT_Destroy_Class_pscmaps_services( FT_Library          library,\n                                     FT_ServiceDescRec*  clazz );\n\n  void\n  FT_Init_Class_pscmaps_interface( FT_Library              library,\n                                   FT_Service_PsCMapsRec*  clazz );\n\n\n  void\n  psnames_module_class_pic_free( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Memory          memory        = library->memory;\n\n\n    if ( pic_container->psnames )\n    {\n      PSModulePIC*  container = (PSModulePIC*)pic_container->psnames;\n\n\n      if ( container->pscmaps_services )\n        FT_Destroy_Class_pscmaps_services( library,\n                                           container->pscmaps_services );\n      container->pscmaps_services = NULL;\n      FT_FREE( container );\n      pic_container->psnames = NULL;\n    }\n  }\n\n\n  FT_Error\n  psnames_module_class_pic_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Error           error         = FT_Err_Ok;\n    PSModulePIC*       container     = NULL;\n    FT_Memory          memory        = library->memory;\n\n\n    /* allocate pointer, clear and set global container pointer */\n    if ( FT_ALLOC( container, sizeof ( *container ) ) )\n      return error;\n    FT_MEM_SET( container, 0, sizeof ( *container ) );\n    pic_container->psnames = container;\n\n    /* initialize pointer table -                       */\n    /* this is how the module usually expects this data */\n    error = FT_Create_Class_pscmaps_services(\n              library, &container->pscmaps_services );\n    if ( error )\n      goto Exit;\n    FT_Init_Class_pscmaps_interface( library,\n                                     &container->pscmaps_interface );\n\n  Exit:\n    if ( error )\n      psnames_module_class_pic_free( library );\n    return error;\n  }\n\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psnames/pspic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pspic.h                                                                */\n/*                                                                         */\n/*    The FreeType position independent code services for psnames module.  */\n/*                                                                         */\n/*  Copyright 2009, 2012 by                                                */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PSPIC_H__\n#define __PSPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#include FT_INTERNAL_PIC_H\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define PSCMAPS_SERVICES_GET   pscmaps_services\n#define PSCMAPS_INTERFACE_GET  pscmaps_interface\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n\n  typedef struct  PSModulePIC_\n  {\n    FT_ServiceDescRec*     pscmaps_services;\n    FT_Service_PsCMapsRec  pscmaps_interface;\n\n  } PSModulePIC;\n\n\n#define GET_PIC( lib )                                     \\\n          ( (PSModulePIC*)((lib)->pic_container.psnames) )\n#define PSCMAPS_SERVICES_GET   ( GET_PIC( library )->pscmaps_services )\n#define PSCMAPS_INTERFACE_GET  ( GET_PIC( library )->pscmaps_interface )\n\n\n  /* see pspic.c for the implementation */\n  void\n  psnames_module_class_pic_free( FT_Library  library );\n\n  FT_Error\n  psnames_module_class_pic_init( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __PSPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/psnames/pstables.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pstables.h                                                             */\n/*                                                                         */\n/*    PostScript glyph names.                                              */\n/*                                                                         */\n/*  Copyright 2005, 2008, 2011 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /* This file has been generated automatically -- do not edit! */\n\n\n  static const char  ft_standard_glyph_names[3696] =\n  {\n    '.','n','u','l','l', 0,\n    'n','o','n','m','a','r','k','i','n','g','r','e','t','u','r','n', 0,\n    'n','o','t','e','q','u','a','l', 0,\n    'i','n','f','i','n','i','t','y', 0,\n    'l','e','s','s','e','q','u','a','l', 0,\n    'g','r','e','a','t','e','r','e','q','u','a','l', 0,\n    'p','a','r','t','i','a','l','d','i','f','f', 0,\n    's','u','m','m','a','t','i','o','n', 0,\n    'p','r','o','d','u','c','t', 0,\n    'p','i', 0,\n    'i','n','t','e','g','r','a','l', 0,\n    'O','m','e','g','a', 0,\n    'r','a','d','i','c','a','l', 0,\n    'a','p','p','r','o','x','e','q','u','a','l', 0,\n    'D','e','l','t','a', 0,\n    'n','o','n','b','r','e','a','k','i','n','g','s','p','a','c','e', 0,\n    'l','o','z','e','n','g','e', 0,\n    'a','p','p','l','e', 0,\n    'f','r','a','n','c', 0,\n    'G','b','r','e','v','e', 0,\n    'g','b','r','e','v','e', 0,\n    'I','d','o','t','a','c','c','e','n','t', 0,\n    'S','c','e','d','i','l','l','a', 0,\n    's','c','e','d','i','l','l','a', 0,\n    'C','a','c','u','t','e', 0,\n    'c','a','c','u','t','e', 0,\n    'C','c','a','r','o','n', 0,\n    'c','c','a','r','o','n', 0,\n    'd','c','r','o','a','t', 0,\n    '.','n','o','t','d','e','f', 0,\n    's','p','a','c','e', 0,\n    'e','x','c','l','a','m', 0,\n    'q','u','o','t','e','d','b','l', 0,\n    'n','u','m','b','e','r','s','i','g','n', 0,\n    'd','o','l','l','a','r', 0,\n    'p','e','r','c','e','n','t', 0,\n    'a','m','p','e','r','s','a','n','d', 0,\n    'q','u','o','t','e','r','i','g','h','t', 0,\n    'p','a','r','e','n','l','e','f','t', 0,\n    'p','a','r','e','n','r','i','g','h','t', 0,\n    'a','s','t','e','r','i','s','k', 0,\n    'p','l','u','s', 0,\n    'c','o','m','m','a', 0,\n    'h','y','p','h','e','n', 0,\n    'p','e','r','i','o','d', 0,\n    's','l','a','s','h', 0,\n    'z','e','r','o', 0,\n    'o','n','e', 0,\n    't','w','o', 0,\n    't','h','r','e','e', 0,\n    'f','o','u','r', 0,\n    'f','i','v','e', 0,\n    's','i','x', 0,\n    's','e','v','e','n', 0,\n    'e','i','g','h','t', 0,\n    'n','i','n','e', 0,\n    'c','o','l','o','n', 0,\n    's','e','m','i','c','o','l','o','n', 0,\n    'l','e','s','s', 0,\n    'e','q','u','a','l', 0,\n    'g','r','e','a','t','e','r', 0,\n    'q','u','e','s','t','i','o','n', 0,\n    'a','t', 0,\n    'A', 0,\n    'B', 0,\n    'C', 0,\n    'D', 0,\n    'E', 0,\n    'F', 0,\n    'G', 0,\n    'H', 0,\n    'I', 0,\n    'J', 0,\n    'K', 0,\n    'L', 0,\n    'M', 0,\n    'N', 0,\n    'O', 0,\n    'P', 0,\n    'Q', 0,\n    'R', 0,\n    'S', 0,\n    'T', 0,\n    'U', 0,\n    'V', 0,\n    'W', 0,\n    'X', 0,\n    'Y', 0,\n    'Z', 0,\n    'b','r','a','c','k','e','t','l','e','f','t', 0,\n    'b','a','c','k','s','l','a','s','h', 0,\n    'b','r','a','c','k','e','t','r','i','g','h','t', 0,\n    'a','s','c','i','i','c','i','r','c','u','m', 0,\n    'u','n','d','e','r','s','c','o','r','e', 0,\n    'q','u','o','t','e','l','e','f','t', 0,\n    'a', 0,\n    'b', 0,\n    'c', 0,\n    'd', 0,\n    'e', 0,\n    'f', 0,\n    'g', 0,\n    'h', 0,\n    'i', 0,\n    'j', 0,\n    'k', 0,\n    'l', 0,\n    'm', 0,\n    'n', 0,\n    'o', 0,\n    'p', 0,\n    'q', 0,\n    'r', 0,\n    's', 0,\n    't', 0,\n    'u', 0,\n    'v', 0,\n    'w', 0,\n    'x', 0,\n    'y', 0,\n    'z', 0,\n    'b','r','a','c','e','l','e','f','t', 0,\n    'b','a','r', 0,\n    'b','r','a','c','e','r','i','g','h','t', 0,\n    'a','s','c','i','i','t','i','l','d','e', 0,\n    'e','x','c','l','a','m','d','o','w','n', 0,\n    'c','e','n','t', 0,\n    's','t','e','r','l','i','n','g', 0,\n    'f','r','a','c','t','i','o','n', 0,\n    'y','e','n', 0,\n    'f','l','o','r','i','n', 0,\n    's','e','c','t','i','o','n', 0,\n    'c','u','r','r','e','n','c','y', 0,\n    'q','u','o','t','e','s','i','n','g','l','e', 0,\n    'q','u','o','t','e','d','b','l','l','e','f','t', 0,\n    'g','u','i','l','l','e','m','o','t','l','e','f','t', 0,\n    'g','u','i','l','s','i','n','g','l','l','e','f','t', 0,\n    'g','u','i','l','s','i','n','g','l','r','i','g','h','t', 0,\n    'f','i', 0,\n    'f','l', 0,\n    'e','n','d','a','s','h', 0,\n    'd','a','g','g','e','r', 0,\n    'd','a','g','g','e','r','d','b','l', 0,\n    'p','e','r','i','o','d','c','e','n','t','e','r','e','d', 0,\n    'p','a','r','a','g','r','a','p','h', 0,\n    'b','u','l','l','e','t', 0,\n    'q','u','o','t','e','s','i','n','g','l','b','a','s','e', 0,\n    'q','u','o','t','e','d','b','l','b','a','s','e', 0,\n    'q','u','o','t','e','d','b','l','r','i','g','h','t', 0,\n    'g','u','i','l','l','e','m','o','t','r','i','g','h','t', 0,\n    'e','l','l','i','p','s','i','s', 0,\n    'p','e','r','t','h','o','u','s','a','n','d', 0,\n    'q','u','e','s','t','i','o','n','d','o','w','n', 0,\n    'g','r','a','v','e', 0,\n    'a','c','u','t','e', 0,\n    'c','i','r','c','u','m','f','l','e','x', 0,\n    't','i','l','d','e', 0,\n    'm','a','c','r','o','n', 0,\n    'b','r','e','v','e', 0,\n    'd','o','t','a','c','c','e','n','t', 0,\n    'd','i','e','r','e','s','i','s', 0,\n    'r','i','n','g', 0,\n    'c','e','d','i','l','l','a', 0,\n    'h','u','n','g','a','r','u','m','l','a','u','t', 0,\n    'o','g','o','n','e','k', 0,\n    'c','a','r','o','n', 0,\n    'e','m','d','a','s','h', 0,\n    'A','E', 0,\n    'o','r','d','f','e','m','i','n','i','n','e', 0,\n    'L','s','l','a','s','h', 0,\n    'O','s','l','a','s','h', 0,\n    'O','E', 0,\n    'o','r','d','m','a','s','c','u','l','i','n','e', 0,\n    'a','e', 0,\n    'd','o','t','l','e','s','s','i', 0,\n    'l','s','l','a','s','h', 0,\n    'o','s','l','a','s','h', 0,\n    'o','e', 0,\n    'g','e','r','m','a','n','d','b','l','s', 0,\n    'o','n','e','s','u','p','e','r','i','o','r', 0,\n    'l','o','g','i','c','a','l','n','o','t', 0,\n    'm','u', 0,\n    't','r','a','d','e','m','a','r','k', 0,\n    'E','t','h', 0,\n    'o','n','e','h','a','l','f', 0,\n    'p','l','u','s','m','i','n','u','s', 0,\n    'T','h','o','r','n', 0,\n    'o','n','e','q','u','a','r','t','e','r', 0,\n    'd','i','v','i','d','e', 0,\n    'b','r','o','k','e','n','b','a','r', 0,\n    'd','e','g','r','e','e', 0,\n    't','h','o','r','n', 0,\n    't','h','r','e','e','q','u','a','r','t','e','r','s', 0,\n    't','w','o','s','u','p','e','r','i','o','r', 0,\n    'r','e','g','i','s','t','e','r','e','d', 0,\n    'm','i','n','u','s', 0,\n    'e','t','h', 0,\n    'm','u','l','t','i','p','l','y', 0,\n    't','h','r','e','e','s','u','p','e','r','i','o','r', 0,\n    'c','o','p','y','r','i','g','h','t', 0,\n    'A','a','c','u','t','e', 0,\n    'A','c','i','r','c','u','m','f','l','e','x', 0,\n    'A','d','i','e','r','e','s','i','s', 0,\n    'A','g','r','a','v','e', 0,\n    'A','r','i','n','g', 0,\n    'A','t','i','l','d','e', 0,\n    'C','c','e','d','i','l','l','a', 0,\n    'E','a','c','u','t','e', 0,\n    'E','c','i','r','c','u','m','f','l','e','x', 0,\n    'E','d','i','e','r','e','s','i','s', 0,\n    'E','g','r','a','v','e', 0,\n    'I','a','c','u','t','e', 0,\n    'I','c','i','r','c','u','m','f','l','e','x', 0,\n    'I','d','i','e','r','e','s','i','s', 0,\n    'I','g','r','a','v','e', 0,\n    'N','t','i','l','d','e', 0,\n    'O','a','c','u','t','e', 0,\n    'O','c','i','r','c','u','m','f','l','e','x', 0,\n    'O','d','i','e','r','e','s','i','s', 0,\n    'O','g','r','a','v','e', 0,\n    'O','t','i','l','d','e', 0,\n    'S','c','a','r','o','n', 0,\n    'U','a','c','u','t','e', 0,\n    'U','c','i','r','c','u','m','f','l','e','x', 0,\n    'U','d','i','e','r','e','s','i','s', 0,\n    'U','g','r','a','v','e', 0,\n    'Y','a','c','u','t','e', 0,\n    'Y','d','i','e','r','e','s','i','s', 0,\n    'Z','c','a','r','o','n', 0,\n    'a','a','c','u','t','e', 0,\n    'a','c','i','r','c','u','m','f','l','e','x', 0,\n    'a','d','i','e','r','e','s','i','s', 0,\n    'a','g','r','a','v','e', 0,\n    'a','r','i','n','g', 0,\n    'a','t','i','l','d','e', 0,\n    'c','c','e','d','i','l','l','a', 0,\n    'e','a','c','u','t','e', 0,\n    'e','c','i','r','c','u','m','f','l','e','x', 0,\n    'e','d','i','e','r','e','s','i','s', 0,\n    'e','g','r','a','v','e', 0,\n    'i','a','c','u','t','e', 0,\n    'i','c','i','r','c','u','m','f','l','e','x', 0,\n    'i','d','i','e','r','e','s','i','s', 0,\n    'i','g','r','a','v','e', 0,\n    'n','t','i','l','d','e', 0,\n    'o','a','c','u','t','e', 0,\n    'o','c','i','r','c','u','m','f','l','e','x', 0,\n    'o','d','i','e','r','e','s','i','s', 0,\n    'o','g','r','a','v','e', 0,\n    'o','t','i','l','d','e', 0,\n    's','c','a','r','o','n', 0,\n    'u','a','c','u','t','e', 0,\n    'u','c','i','r','c','u','m','f','l','e','x', 0,\n    'u','d','i','e','r','e','s','i','s', 0,\n    'u','g','r','a','v','e', 0,\n    'y','a','c','u','t','e', 0,\n    'y','d','i','e','r','e','s','i','s', 0,\n    'z','c','a','r','o','n', 0,\n    'e','x','c','l','a','m','s','m','a','l','l', 0,\n    'H','u','n','g','a','r','u','m','l','a','u','t','s','m','a','l','l', 0,\n    'd','o','l','l','a','r','o','l','d','s','t','y','l','e', 0,\n    'd','o','l','l','a','r','s','u','p','e','r','i','o','r', 0,\n    'a','m','p','e','r','s','a','n','d','s','m','a','l','l', 0,\n    'A','c','u','t','e','s','m','a','l','l', 0,\n    'p','a','r','e','n','l','e','f','t','s','u','p','e','r','i','o','r', 0,\n    'p','a','r','e','n','r','i','g','h','t','s','u','p','e','r','i','o','r', 0,\n    't','w','o','d','o','t','e','n','l','e','a','d','e','r', 0,\n    'o','n','e','d','o','t','e','n','l','e','a','d','e','r', 0,\n    'z','e','r','o','o','l','d','s','t','y','l','e', 0,\n    'o','n','e','o','l','d','s','t','y','l','e', 0,\n    't','w','o','o','l','d','s','t','y','l','e', 0,\n    't','h','r','e','e','o','l','d','s','t','y','l','e', 0,\n    'f','o','u','r','o','l','d','s','t','y','l','e', 0,\n    'f','i','v','e','o','l','d','s','t','y','l','e', 0,\n    's','i','x','o','l','d','s','t','y','l','e', 0,\n    's','e','v','e','n','o','l','d','s','t','y','l','e', 0,\n    'e','i','g','h','t','o','l','d','s','t','y','l','e', 0,\n    'n','i','n','e','o','l','d','s','t','y','l','e', 0,\n    'c','o','m','m','a','s','u','p','e','r','i','o','r', 0,\n    't','h','r','e','e','q','u','a','r','t','e','r','s','e','m','d','a','s','h', 0,\n    'p','e','r','i','o','d','s','u','p','e','r','i','o','r', 0,\n    'q','u','e','s','t','i','o','n','s','m','a','l','l', 0,\n    'a','s','u','p','e','r','i','o','r', 0,\n    'b','s','u','p','e','r','i','o','r', 0,\n    'c','e','n','t','s','u','p','e','r','i','o','r', 0,\n    'd','s','u','p','e','r','i','o','r', 0,\n    'e','s','u','p','e','r','i','o','r', 0,\n    'i','s','u','p','e','r','i','o','r', 0,\n    'l','s','u','p','e','r','i','o','r', 0,\n    'm','s','u','p','e','r','i','o','r', 0,\n    'n','s','u','p','e','r','i','o','r', 0,\n    'o','s','u','p','e','r','i','o','r', 0,\n    'r','s','u','p','e','r','i','o','r', 0,\n    's','s','u','p','e','r','i','o','r', 0,\n    't','s','u','p','e','r','i','o','r', 0,\n    'f','f', 0,\n    'f','f','i', 0,\n    'f','f','l', 0,\n    'p','a','r','e','n','l','e','f','t','i','n','f','e','r','i','o','r', 0,\n    'p','a','r','e','n','r','i','g','h','t','i','n','f','e','r','i','o','r', 0,\n    'C','i','r','c','u','m','f','l','e','x','s','m','a','l','l', 0,\n    'h','y','p','h','e','n','s','u','p','e','r','i','o','r', 0,\n    'G','r','a','v','e','s','m','a','l','l', 0,\n    'A','s','m','a','l','l', 0,\n    'B','s','m','a','l','l', 0,\n    'C','s','m','a','l','l', 0,\n    'D','s','m','a','l','l', 0,\n    'E','s','m','a','l','l', 0,\n    'F','s','m','a','l','l', 0,\n    'G','s','m','a','l','l', 0,\n    'H','s','m','a','l','l', 0,\n    'I','s','m','a','l','l', 0,\n    'J','s','m','a','l','l', 0,\n    'K','s','m','a','l','l', 0,\n    'L','s','m','a','l','l', 0,\n    'M','s','m','a','l','l', 0,\n    'N','s','m','a','l','l', 0,\n    'O','s','m','a','l','l', 0,\n    'P','s','m','a','l','l', 0,\n    'Q','s','m','a','l','l', 0,\n    'R','s','m','a','l','l', 0,\n    'S','s','m','a','l','l', 0,\n    'T','s','m','a','l','l', 0,\n    'U','s','m','a','l','l', 0,\n    'V','s','m','a','l','l', 0,\n    'W','s','m','a','l','l', 0,\n    'X','s','m','a','l','l', 0,\n    'Y','s','m','a','l','l', 0,\n    'Z','s','m','a','l','l', 0,\n    'c','o','l','o','n','m','o','n','e','t','a','r','y', 0,\n    'o','n','e','f','i','t','t','e','d', 0,\n    'r','u','p','i','a','h', 0,\n    'T','i','l','d','e','s','m','a','l','l', 0,\n    'e','x','c','l','a','m','d','o','w','n','s','m','a','l','l', 0,\n    'c','e','n','t','o','l','d','s','t','y','l','e', 0,\n    'L','s','l','a','s','h','s','m','a','l','l', 0,\n    'S','c','a','r','o','n','s','m','a','l','l', 0,\n    'Z','c','a','r','o','n','s','m','a','l','l', 0,\n    'D','i','e','r','e','s','i','s','s','m','a','l','l', 0,\n    'B','r','e','v','e','s','m','a','l','l', 0,\n    'C','a','r','o','n','s','m','a','l','l', 0,\n    'D','o','t','a','c','c','e','n','t','s','m','a','l','l', 0,\n    'M','a','c','r','o','n','s','m','a','l','l', 0,\n    'f','i','g','u','r','e','d','a','s','h', 0,\n    'h','y','p','h','e','n','i','n','f','e','r','i','o','r', 0,\n    'O','g','o','n','e','k','s','m','a','l','l', 0,\n    'R','i','n','g','s','m','a','l','l', 0,\n    'C','e','d','i','l','l','a','s','m','a','l','l', 0,\n    'q','u','e','s','t','i','o','n','d','o','w','n','s','m','a','l','l', 0,\n    'o','n','e','e','i','g','h','t','h', 0,\n    't','h','r','e','e','e','i','g','h','t','h','s', 0,\n    'f','i','v','e','e','i','g','h','t','h','s', 0,\n    's','e','v','e','n','e','i','g','h','t','h','s', 0,\n    'o','n','e','t','h','i','r','d', 0,\n    't','w','o','t','h','i','r','d','s', 0,\n    'z','e','r','o','s','u','p','e','r','i','o','r', 0,\n    'f','o','u','r','s','u','p','e','r','i','o','r', 0,\n    'f','i','v','e','s','u','p','e','r','i','o','r', 0,\n    's','i','x','s','u','p','e','r','i','o','r', 0,\n    's','e','v','e','n','s','u','p','e','r','i','o','r', 0,\n    'e','i','g','h','t','s','u','p','e','r','i','o','r', 0,\n    'n','i','n','e','s','u','p','e','r','i','o','r', 0,\n    'z','e','r','o','i','n','f','e','r','i','o','r', 0,\n    'o','n','e','i','n','f','e','r','i','o','r', 0,\n    't','w','o','i','n','f','e','r','i','o','r', 0,\n    't','h','r','e','e','i','n','f','e','r','i','o','r', 0,\n    'f','o','u','r','i','n','f','e','r','i','o','r', 0,\n    'f','i','v','e','i','n','f','e','r','i','o','r', 0,\n    's','i','x','i','n','f','e','r','i','o','r', 0,\n    's','e','v','e','n','i','n','f','e','r','i','o','r', 0,\n    'e','i','g','h','t','i','n','f','e','r','i','o','r', 0,\n    'n','i','n','e','i','n','f','e','r','i','o','r', 0,\n    'c','e','n','t','i','n','f','e','r','i','o','r', 0,\n    'd','o','l','l','a','r','i','n','f','e','r','i','o','r', 0,\n    'p','e','r','i','o','d','i','n','f','e','r','i','o','r', 0,\n    'c','o','m','m','a','i','n','f','e','r','i','o','r', 0,\n    'A','g','r','a','v','e','s','m','a','l','l', 0,\n    'A','a','c','u','t','e','s','m','a','l','l', 0,\n    'A','c','i','r','c','u','m','f','l','e','x','s','m','a','l','l', 0,\n    'A','t','i','l','d','e','s','m','a','l','l', 0,\n    'A','d','i','e','r','e','s','i','s','s','m','a','l','l', 0,\n    'A','r','i','n','g','s','m','a','l','l', 0,\n    'A','E','s','m','a','l','l', 0,\n    'C','c','e','d','i','l','l','a','s','m','a','l','l', 0,\n    'E','g','r','a','v','e','s','m','a','l','l', 0,\n    'E','a','c','u','t','e','s','m','a','l','l', 0,\n    'E','c','i','r','c','u','m','f','l','e','x','s','m','a','l','l', 0,\n    'E','d','i','e','r','e','s','i','s','s','m','a','l','l', 0,\n    'I','g','r','a','v','e','s','m','a','l','l', 0,\n    'I','a','c','u','t','e','s','m','a','l','l', 0,\n    'I','c','i','r','c','u','m','f','l','e','x','s','m','a','l','l', 0,\n    'I','d','i','e','r','e','s','i','s','s','m','a','l','l', 0,\n    'E','t','h','s','m','a','l','l', 0,\n    'N','t','i','l','d','e','s','m','a','l','l', 0,\n    'O','g','r','a','v','e','s','m','a','l','l', 0,\n    'O','a','c','u','t','e','s','m','a','l','l', 0,\n    'O','c','i','r','c','u','m','f','l','e','x','s','m','a','l','l', 0,\n    'O','t','i','l','d','e','s','m','a','l','l', 0,\n    'O','d','i','e','r','e','s','i','s','s','m','a','l','l', 0,\n    'O','E','s','m','a','l','l', 0,\n    'O','s','l','a','s','h','s','m','a','l','l', 0,\n    'U','g','r','a','v','e','s','m','a','l','l', 0,\n    'U','a','c','u','t','e','s','m','a','l','l', 0,\n    'U','c','i','r','c','u','m','f','l','e','x','s','m','a','l','l', 0,\n    'U','d','i','e','r','e','s','i','s','s','m','a','l','l', 0,\n    'Y','a','c','u','t','e','s','m','a','l','l', 0,\n    'T','h','o','r','n','s','m','a','l','l', 0,\n    'Y','d','i','e','r','e','s','i','s','s','m','a','l','l', 0,\n    '0','0','1','.','0','0','0', 0,\n    '0','0','1','.','0','0','1', 0,\n    '0','0','1','.','0','0','2', 0,\n    '0','0','1','.','0','0','3', 0,\n    'B','l','a','c','k', 0,\n    'B','o','l','d', 0,\n    'B','o','o','k', 0,\n    'L','i','g','h','t', 0,\n    'M','e','d','i','u','m', 0,\n    'R','e','g','u','l','a','r', 0,\n    'R','o','m','a','n', 0,\n    'S','e','m','i','b','o','l','d', 0,\n  };\n\n\n#define FT_NUM_MAC_NAMES  258\n\n  /* Values are offsets into the `ft_standard_glyph_names' table */\n\n  static const short  ft_mac_names[FT_NUM_MAC_NAMES] =\n  {\n     253,   0,   6, 261, 267, 274, 283, 294, 301, 309, 758, 330, 340, 351,\n     360, 365, 371, 378, 385, 391, 396, 400, 404, 410, 415, 420, 424, 430,\n     436, 441, 447, 457, 462, 468, 476, 485, 488, 490, 492, 494, 496, 498,\n     500, 502, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526,\n     528, 530, 532, 534, 536, 538, 540, 552, 562, 575, 587, 979, 608, 610,\n     612, 614, 616, 618, 620, 622, 624, 626, 628, 630, 632, 634, 636, 638,\n     640, 642, 644, 646, 648, 650, 652, 654, 656, 658, 660, 670, 674, 685,\n    1375,1392,1405,1414,1486,1512,1562,1603,1632,1610,1622,1645,1639,1652,\n    1661,1690,1668,1680,1697,1726,1704,1716,1733,1740,1769,1747,1759,1776,\n    1790,1819,1797,1809, 839,1263, 707, 712, 741, 881, 871,1160,1302,1346,\n    1197, 985,1031,  23,1086,1108,  32,1219,  41,  51, 730,1194,  64,  76,\n      86,  94,  97,1089,1118, 106,1131,1150, 966, 696,1183, 112, 734, 120,\n     132, 783, 930, 945, 138,1385,1398,1529,1115,1157, 832,1079, 770, 916,\n     598, 319,1246, 155,1833,1586, 721, 749, 797, 811, 826, 829, 846, 856,\n     888, 903, 954,1363,1421,1356,1433,1443,1450,1457,1469,1479,1493,1500,\n     163,1522,1543,1550,1572,1134, 991,1002,1008,1015,1021,1040,1045,1053,\n    1066,1073,1101,1143,1536,1783,1596,1843,1253,1207,1319,1579,1826,1229,\n    1270,1313,1323,1171,1290,1332,1211,1235,1276, 169, 175, 182, 189, 200,\n     209, 218, 225, 232, 239, 246\n  };\n\n\n#define FT_NUM_SID_NAMES  391\n\n  /* Values are offsets into the `ft_standard_glyph_names' table */\n\n  static const short  ft_sid_names[FT_NUM_SID_NAMES] =\n  {\n     253, 261, 267, 274, 283, 294, 301, 309, 319, 330, 340, 351, 360, 365,\n     371, 378, 385, 391, 396, 400, 404, 410, 415, 420, 424, 430, 436, 441,\n     447, 457, 462, 468, 476, 485, 488, 490, 492, 494, 496, 498, 500, 502,\n     504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526, 528, 530,\n     532, 534, 536, 538, 540, 552, 562, 575, 587, 598, 608, 610, 612, 614,\n     616, 618, 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 642,\n     644, 646, 648, 650, 652, 654, 656, 658, 660, 670, 674, 685, 696, 707,\n     712, 721, 730, 734, 741, 749, 758, 770, 783, 797, 811, 826, 829, 832,\n     839, 846, 856, 871, 881, 888, 903, 916, 930, 945, 954, 966, 979, 985,\n     991,1002,1008,1015,1021,1031,1040,1045,1053,1066,1073,1079,1086,1089,\n    1101,1108,1115,1118,1131,1134,1143,1150,1157,1160,1171,1183,1194,1197,\n    1207,1211,1219,1229,1235,1246,1253,1263,1270,1276,1290,1302,1313,1319,\n    1323,1332,1346,1356,1363,1375,1385,1392,1398,1405,1414,1421,1433,1443,\n    1450,1457,1469,1479,1486,1493,1500,1512,1522,1529,1536,1543,1550,1562,\n    1572,1579,1586,1596,1603,1610,1622,1632,1639,1645,1652,1661,1668,1680,\n    1690,1697,1704,1716,1726,1733,1740,1747,1759,1769,1776,1783,1790,1797,\n    1809,1819,1826,1833,1843,1850,1862,1880,1895,1910,1925,1936,1954,1973,\n    1988,2003,2016,2028,2040,2054,2067,2080,2092,2106,2120,2133,2147,2167,\n    2182,2196,2206,2216,2229,2239,2249,2259,2269,2279,2289,2299,2309,2319,\n    2329,2332,2336,2340,2358,2377,2393,2408,2419,2426,2433,2440,2447,2454,\n    2461,2468,2475,2482,2489,2496,2503,2510,2517,2524,2531,2538,2545,2552,\n    2559,2566,2573,2580,2587,2594,2601,2615,2625,2632,2643,2659,2672,2684,\n    2696,2708,2722,2733,2744,2759,2771,2782,2797,2809,2819,2832,2850,2860,\n    2873,2885,2898,2907,2917,2930,2943,2956,2968,2982,2996,3009,3022,3034,\n    3046,3060,3073,3086,3098,3112,3126,3139,3152,3167,3182,3196,3208,3220,\n    3237,3249,3264,3275,3283,3297,3309,3321,3338,3353,3365,3377,3394,3409,\n    3418,3430,3442,3454,3471,3483,3498,3506,3518,3530,3542,3559,3574,3586,\n    3597,3612,3620,3628,3636,3644,3650,3655,3660,3666,3673,3681,3687\n  };\n\n\n  /* the following are indices into the SID name table */\n  static const unsigned short  t1_standard_encoding[256] =\n  {\n      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n      1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,\n     17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,\n     33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,\n     49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,\n     65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,\n     81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,  0,\n      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n      0, 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,\n      0,111,112,113,114,  0,115,116,117,118,119,120,121,122,  0,123,\n      0,124,125,126,127,128,129,130,131,  0,132,133,  0,134,135,136,\n    137,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n      0,138,  0,139,  0,  0,  0,  0,140,141,142,143,  0,  0,  0,  0,\n      0,144,  0,  0,  0,145,  0,  0,146,147,148,149,  0,  0,  0,  0\n  };\n\n\n  /* the following are indices into the SID name table */\n  static const unsigned short  t1_expert_encoding[256] =\n  {\n      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n      1,229,230,  0,231,232,233,234,235,236,237,238, 13, 14, 15, 99,\n    239,240,241,242,243,244,245,246,247,248, 27, 28,249,250,251,252,\n      0,253,254,255,256,257,  0,  0,  0,258,  0,  0,259,260,261,262,\n      0,  0,263,264,265,  0,266,109,110,267,268,269,  0,270,271,272,\n    273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,\n    289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,  0,\n      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n      0,304,305,306,  0,  0,307,308,309,310,311,  0,312,  0,  0,313,\n      0,  0,314,315,  0,  0,316,317,318,  0,  0,  0,158,155,163,319,\n    320,321,322,323,324,325,  0,  0,326,150,164,169,327,328,329,330,\n    331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,\n    347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,\n    363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378\n  };\n\n\n  /*\n   *  This table is a compressed version of the Adobe Glyph List (AGL),\n   *  optimized for efficient searching.  It has been generated by the\n   *  `glnames.py' python script located in the `src/tools' directory.\n   *\n   *  The lookup function to get the Unicode value for a given string\n   *  is defined below the table.\n   */\n\n#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST\n\n  static const unsigned char  ft_adobe_glyph_list[55997L] =\n  {\n      0, 52,  0,106,  2,167,  3, 63,  4,220,  6,125,  9,143, 10, 23,\n     11,137, 12,199, 14,246, 15, 87, 16,233, 17,219, 18,104, 19, 88,\n     22,110, 23, 32, 23, 71, 24, 77, 27,156, 29, 73, 31,247, 32,107,\n     32,222, 33, 55, 34,154, 35,218, 58, 10, 64,122, 72,188, 80,109,\n     88,104, 93, 61, 98,168,106, 91,114,111,115,237,122,180,127,255,\n    135,164,143,132,149,213,158,108,161,115,168,175,183,147,197,199,\n    202, 25,204,166,208,209,209, 81,215, 26, 65,143,  0, 65,  0,140,\n      0,175,  0,193,  1, 15,  1,147,  1,233,  1,251,  2,  7,  2, 40,\n      2, 57,  2, 82,  2, 91,  2,128,  2,136,  2,154, 69,131,  0,198,\n      0,150,  0,158,  0,167,225,227,245,244,101,128,  1,252,237,225,\n    227,242,239,110,128,  1,226,243,237,225,236,108,128,247,230,225,\n    227,245,244,101,129,  0,193,  0,185,243,237,225,236,108,128,247,\n    225,226,242,229,246,101,134,  1,  2,  0,213,  0,221,  0,232,  0,\n    243,  0,251,  1,  7,225,227,245,244,101,128, 30,174,227,249,242,\n    233,236,236,233, 99,128,  4,208,228,239,244,226,229,236,239,119,\n    128, 30,182,231,242,225,246,101,128, 30,176,232,239,239,235,225,\n    226,239,246,101,128, 30,178,244,233,236,228,101,128, 30,180, 99,\n      4,  1, 25,  1, 32,  1,121,  1,137,225,242,239,110,128,  1,205,\n    233,242, 99,  2,  1, 40,  1, 45,236,101,128, 36,182,245,237,230,\n    236,229,120,134,  0,194,  1, 66,  1, 74,  1, 85,  1, 93,  1,105,\n      1,113,225,227,245,244,101,128, 30,164,228,239,244,226,229,236,\n    239,119,128, 30,172,231,242,225,246,101,128, 30,166,232,239,239,\n    235,225,226,239,246,101,128, 30,168,243,237,225,236,108,128,247,\n    226,244,233,236,228,101,128, 30,170,245,244,101,129,246,201,  1,\n    129,243,237,225,236,108,128,247,180,249,242,233,236,236,233, 99,\n    128,  4, 16,100,  3,  1,155,  1,165,  1,209,226,236,231,242,225,\n    246,101,128,  2,  0,233,229,242,229,243,233,115,131,  0,196,  1,\n    181,  1,192,  1,201,227,249,242,233,236,236,233, 99,128,  4,210,\n    237,225,227,242,239,110,128,  1,222,243,237,225,236,108,128,247,\n    228,239,116,  2,  1,216,  1,224,226,229,236,239,119,128, 30,160,\n    237,225,227,242,239,110,128,  1,224,231,242,225,246,101,129,  0,\n    192,  1,243,243,237,225,236,108,128,247,224,232,239,239,235,225,\n    226,239,246,101,128, 30,162,105,  2,  2, 13,  2, 25,229,227,249,\n    242,233,236,236,233, 99,128,  4,212,238,246,229,242,244,229,228,\n    226,242,229,246,101,128,  2,  2,236,240,232, 97,129,  3,145,  2,\n     49,244,239,238,239,115,128,  3,134,109,  2,  2, 63,  2, 71,225,\n    227,242,239,110,128,  1,  0,239,238,239,243,240,225,227,101,128,\n    255, 33,239,231,239,238,229,107,128,  1,  4,242,233,238,103,131,\n      0,197,  2,104,  2,112,  2,120,225,227,245,244,101,128,  1,250,\n    226,229,236,239,119,128, 30,  0,243,237,225,236,108,128,247,229,\n    243,237,225,236,108,128,247, 97,244,233,236,228,101,129,  0,195,\n      2,146,243,237,225,236,108,128,247,227,249,226,225,242,237,229,\n    238,233,225,110,128,  5, 49, 66,137,  0, 66,  2,189,  2,198,  2,\n    223,  3,  3,  3, 10,  3, 22,  3, 34,  3, 46,  3, 54,227,233,242,\n    227,236,101,128, 36,183,228,239,116,  2,  2,206,  2,215,225,227,\n    227,229,238,116,128, 30,  2,226,229,236,239,119,128, 30,  4,101,\n      3,  2,231,  2,242,  2,254,227,249,242,233,236,236,233, 99,128,\n      4, 17,238,225,242,237,229,238,233,225,110,128,  5, 50,244, 97,\n    128,  3,146,232,239,239,107,128,  1,129,236,233,238,229,226,229,\n    236,239,119,128, 30,  6,237,239,238,239,243,240,225,227,101,128,\n    255, 34,242,229,246,229,243,237,225,236,108,128,246,244,243,237,\n    225,236,108,128,247, 98,244,239,240,226,225,114,128,  1,130, 67,\n    137,  0, 67,  3, 85,  3,127,  3,193,  3,210,  3,224,  4,171,  4,\n    188,  4,200,  4,212, 97,  3,  3, 93,  3,104,  3,111,225,242,237,\n    229,238,233,225,110,128,  5, 62,227,245,244,101,128,  1,  6,242,\n    239,110,129,246,202,  3,119,243,237,225,236,108,128,246,245, 99,\n      3,  3,135,  3,142,  3,171,225,242,239,110,128,  1, 12,229,228,\n    233,236,236, 97,130,  0,199,  3,155,  3,163,225,227,245,244,101,\n    128, 30,  8,243,237,225,236,108,128,247,231,233,242, 99,  2,  3,\n    179,  3,184,236,101,128, 36,184,245,237,230,236,229,120,128,  1,\n      8,228,239,116,129,  1, 10,  3,201,225,227,227,229,238,116,128,\n      1, 10,229,228,233,236,236,225,243,237,225,236,108,128,247,184,\n    104,  4,  3,234,  3,246,  4,161,  4,165,225,225,242,237,229,238,\n    233,225,110,128,  5, 73,101,  6,  4,  4,  4, 24,  4, 35,  4,103,\n      4,115,  4,136,225,226,235,232,225,243,233,225,238,227,249,242,\n    233,236,236,233, 99,128,  4,188,227,249,242,233,236,236,233, 99,\n    128,  4, 39,100,  2,  4, 41,  4, 85,229,243,227,229,238,228,229,\n    114,  2,  4, 54,  4, 74,225,226,235,232,225,243,233,225,238,227,\n    249,242,233,236,236,233, 99,128,  4,190,227,249,242,233,236,236,\n    233, 99,128,  4,182,233,229,242,229,243,233,243,227,249,242,233,\n    236,236,233, 99,128,  4,244,232,225,242,237,229,238,233,225,110,\n    128,  5, 67,235,232,225,235,225,243,243,233,225,238,227,249,242,\n    233,236,236,233, 99,128,  4,203,246,229,242,244,233,227,225,236,\n    243,244,242,239,235,229,227,249,242,233,236,236,233, 99,128,  4,\n    184,105,128,  3,167,239,239,107,128,  1,135,233,242,227,245,237,\n    230,236,229,248,243,237,225,236,108,128,246,246,237,239,238,239,\n    243,240,225,227,101,128,255, 35,239,225,242,237,229,238,233,225,\n    110,128,  5, 81,243,237,225,236,108,128,247, 99, 68,142,  0, 68,\n      4,252,  5, 10,  5, 36,  5, 96,  5,121,  5,166,  5,173,  5,231,\n      5,244,  6,  0,  6, 12,  6, 28,  6, 48,  6, 57, 90,129,  1,241,\n      5,  2,227,225,242,239,110,128,  1,196, 97,  2,  5, 16,  5, 27,\n    225,242,237,229,238,233,225,110,128,  5, 52,230,242,233,227,225,\n    110,128,  1,137, 99,  4,  5, 46,  5, 53,  5, 62,  5, 89,225,242,\n    239,110,128,  1, 14,229,228,233,236,236, 97,128, 30, 16,233,242,\n     99,  2,  5, 70,  5, 75,236,101,128, 36,185,245,237,230,236,229,\n    248,226,229,236,239,119,128, 30, 18,242,239,225,116,128,  1, 16,\n    228,239,116,  2,  5,104,  5,113,225,227,227,229,238,116,128, 30,\n     10,226,229,236,239,119,128, 30, 12,101,  3,  5,129,  5,140,  5,\n    150,227,249,242,233,236,236,233, 99,128,  4, 20,233,227,239,240,\n    244,233, 99,128,  3,238,236,244, 97,129, 34,  6,  5,158,231,242,\n    229,229,107,128,  3,148,232,239,239,107,128,  1,138,105,  2,  5,\n    179,  5,218,229,242,229,243,233,115,131,246,203,  5,194,  5,202,\n      5,210,193,227,245,244,101,128,246,204,199,242,225,246,101,128,\n    246,205,243,237,225,236,108,128,247,168,231,225,237,237,225,231,\n    242,229,229,107,128,  3,220,234,229,227,249,242,233,236,236,233,\n     99,128,  4,  2,236,233,238,229,226,229,236,239,119,128, 30, 14,\n    237,239,238,239,243,240,225,227,101,128,255, 36,239,244,225,227,\n    227,229,238,244,243,237,225,236,108,128,246,247,115,  2,  6, 34,\n      6, 41,236,225,243,104,128,  1, 16,237,225,236,108,128,247,100,\n    244,239,240,226,225,114,128,  1,139,122,131,  1,242,  6, 67,  6,\n     75,  6,112,227,225,242,239,110,128,  1,197,101,  2,  6, 81,  6,\n    101,225,226,235,232,225,243,233,225,238,227,249,242,233,236,236,\n    233, 99,128,  4,224,227,249,242,233,236,236,233, 99,128,  4,  5,\n    232,229,227,249,242,233,236,236,233, 99,128,  4, 15, 69,146,  0,\n     69,  6,165,  6,183,  6,191,  7, 89,  7,153,  7,165,  7,183,  7,\n    211,  8,  7,  8, 36,  8, 94,  8,169,  8,189,  8,208,  8,248,  9,\n     44,  9,109,  9,115,225,227,245,244,101,129,  0,201,  6,175,243,\n    237,225,236,108,128,247,233,226,242,229,246,101,128,  1, 20, 99,\n      5,  6,203,  6,210,  6,224,  6,236,  7, 79,225,242,239,110,128,\n      1, 26,229,228,233,236,236,225,226,242,229,246,101,128, 30, 28,\n    232,225,242,237,229,238,233,225,110,128,  5, 53,233,242, 99,  2,\n      6,244,  6,249,236,101,128, 36,186,245,237,230,236,229,120,135,\n      0,202,  7, 16,  7, 24,  7, 32,  7, 43,  7, 51,  7, 63,  7, 71,\n    225,227,245,244,101,128, 30,190,226,229,236,239,119,128, 30, 24,\n    228,239,244,226,229,236,239,119,128, 30,198,231,242,225,246,101,\n    128, 30,192,232,239,239,235,225,226,239,246,101,128, 30,194,243,\n    237,225,236,108,128,247,234,244,233,236,228,101,128, 30,196,249,\n    242,233,236,236,233, 99,128,  4,  4,100,  3,  7, 97,  7,107,  7,\n    127,226,236,231,242,225,246,101,128,  2,  4,233,229,242,229,243,\n    233,115,129,  0,203,  7,119,243,237,225,236,108,128,247,235,239,\n    116,130,  1, 22,  7,136,  7,145,225,227,227,229,238,116,128,  1,\n     22,226,229,236,239,119,128, 30,184,230,227,249,242,233,236,236,\n    233, 99,128,  4, 36,231,242,225,246,101,129,  0,200,  7,175,243,\n    237,225,236,108,128,247,232,104,  2,  7,189,  7,200,225,242,237,\n    229,238,233,225,110,128,  5, 55,239,239,235,225,226,239,246,101,\n    128, 30,186,105,  3,  7,219,  7,230,  7,245,231,232,244,242,239,\n    237,225,110,128, 33,103,238,246,229,242,244,229,228,226,242,229,\n    246,101,128,  2,  6,239,244,233,230,233,229,228,227,249,242,233,\n    236,236,233, 99,128,  4,100,108,  2,  8, 13,  8, 24,227,249,242,\n    233,236,236,233, 99,128,  4, 27,229,246,229,238,242,239,237,225,\n    110,128, 33,106,109,  3,  8, 44,  8, 72,  8, 83,225,227,242,239,\n    110,130,  1, 18,  8, 56,  8, 64,225,227,245,244,101,128, 30, 22,\n    231,242,225,246,101,128, 30, 20,227,249,242,233,236,236,233, 99,\n    128,  4, 28,239,238,239,243,240,225,227,101,128,255, 37,110,  4,\n      8,104,  8,115,  8,135,  8,154,227,249,242,233,236,236,233, 99,\n    128,  4, 29,228,229,243,227,229,238,228,229,242,227,249,242,233,\n    236,236,233, 99,128,  4,162,103,129,  1, 74,  8,141,232,229,227,\n    249,242,233,236,236,233, 99,128,  4,164,232,239,239,235,227,249,\n    242,233,236,236,233, 99,128,  4,199,111,  2,  8,175,  8,183,231,\n    239,238,229,107,128,  1, 24,240,229,110,128,  1,144,240,243,233,\n    236,239,110,129,  3,149,  8,200,244,239,238,239,115,128,  3,136,\n    114,  2,  8,214,  8,225,227,249,242,233,236,236,233, 99,128,  4,\n     32,229,246,229,242,243,229,100,129,  1,142,  8,237,227,249,242,\n    233,236,236,233, 99,128,  4, 45,115,  4,  9,  2,  9, 13,  9, 33,\n      9, 37,227,249,242,233,236,236,233, 99,128,  4, 33,228,229,243,\n    227,229,238,228,229,242,227,249,242,233,236,236,233, 99,128,  4,\n    170,104,128,  1,169,237,225,236,108,128,247,101,116,  3,  9, 52,\n      9, 78,  9, 92, 97,130,  3,151,  9, 60,  9, 70,242,237,229,238,\n    233,225,110,128,  5, 56,244,239,238,239,115,128,  3,137,104,129,\n      0,208,  9, 84,243,237,225,236,108,128,247,240,233,236,228,101,\n    129, 30,188,  9,101,226,229,236,239,119,128, 30, 26,245,242,111,\n    128, 32,172,250,104,130,  1,183,  9,124,  9,132,227,225,242,239,\n    110,128,  1,238,242,229,246,229,242,243,229,100,128,  1,184, 70,\n    136,  0, 70,  9,163,  9,172,  9,184,  9,212,  9,219,  9,248, 10,\n      4, 10, 15,227,233,242,227,236,101,128, 36,187,228,239,244,225,\n    227,227,229,238,116,128, 30, 30,101,  2,  9,190,  9,202,232,225,\n    242,237,229,238,233,225,110,128,  5, 86,233,227,239,240,244,233,\n     99,128,  3,228,232,239,239,107,128,  1,145,105,  2,  9,225,  9,\n    238,244,225,227,249,242,233,236,236,233, 99,128,  4,114,246,229,\n    242,239,237,225,110,128, 33,100,237,239,238,239,243,240,225,227,\n    101,128,255, 38,239,245,242,242,239,237,225,110,128, 33, 99,243,\n    237,225,236,108,128,247,102, 71,140,  0, 71, 10, 51, 10, 61, 10,\n    107, 10,115, 10,176, 10,193, 10,205, 11, 39, 11, 52, 11, 65, 11,\n     90, 11,107,194,243,241,245,225,242,101,128, 51,135, 97,  3, 10,\n     69, 10, 76, 10, 94,227,245,244,101,128,  1,244,237,237, 97,129,\n      3,147, 10, 84,225,230,242,233,227,225,110,128,  1,148,238,231,\n    233,225,227,239,240,244,233, 99,128,  3,234,226,242,229,246,101,\n    128,  1, 30, 99,  4, 10,125, 10,132, 10,141, 10,163,225,242,239,\n    110,128,  1,230,229,228,233,236,236, 97,128,  1, 34,233,242, 99,\n      2, 10,149, 10,154,236,101,128, 36,188,245,237,230,236,229,120,\n    128,  1, 28,239,237,237,225,225,227,227,229,238,116,128,  1, 34,\n    228,239,116,129,  1, 32, 10,184,225,227,227,229,238,116,128,  1,\n     32,229,227,249,242,233,236,236,233, 99,128,  4, 19,104,  3, 10,\n    213, 10,226, 11, 33,225,228,225,242,237,229,238,233,225,110,128,\n      5, 66,101,  3, 10,234, 10,255, 11, 16,237,233,228,228,236,229,\n    232,239,239,235,227,249,242,233,236,236,233, 99,128,  4,148,243,\n    244,242,239,235,229,227,249,242,233,236,236,233, 99,128,  4,146,\n    245,240,244,245,242,238,227,249,242,233,236,236,233, 99,128,  4,\n    144,239,239,107,128,  1,147,233,237,225,242,237,229,238,233,225,\n    110,128,  5, 51,234,229,227,249,242,233,236,236,233, 99,128,  4,\n      3,109,  2, 11, 71, 11, 79,225,227,242,239,110,128, 30, 32,239,\n    238,239,243,240,225,227,101,128,255, 39,242,225,246,101,129,246,\n    206, 11, 99,243,237,225,236,108,128,247, 96,115,  2, 11,113, 11,\n    129,237,225,236,108,129,247,103, 11,122,232,239,239,107,128,  2,\n    155,244,242,239,235,101,128,  1,228, 72,140,  0, 72, 11,165, 11,\n    190, 11,198, 11,208, 12, 17, 12, 40, 12, 77, 12,117, 12,129, 12,\n    157, 12,165, 12,189,177,184, 53,  3, 11,175, 11,180, 11,185,179,\n     51,128, 37,207,180, 51,128, 37,170,181, 49,128, 37,171,178,178,\n    176,183, 51,128, 37,161,208,243,241,245,225,242,101,128, 51,203,\n     97,  3, 11,216, 11,236, 12,  0,225,226,235,232,225,243,233,225,\n    238,227,249,242,233,236,236,233, 99,128,  4,168,228,229,243,227,\n    229,238,228,229,242,227,249,242,233,236,236,233, 99,128,  4,178,\n    242,228,243,233,231,238,227,249,242,233,236,236,233, 99,128,  4,\n     42, 98,  2, 12, 23, 12, 28,225,114,128,  1, 38,242,229,246,229,\n    226,229,236,239,119,128, 30, 42, 99,  2, 12, 46, 12, 55,229,228,\n    233,236,236, 97,128, 30, 40,233,242, 99,  2, 12, 63, 12, 68,236,\n    101,128, 36,189,245,237,230,236,229,120,128,  1, 36,100,  2, 12,\n     83, 12, 93,233,229,242,229,243,233,115,128, 30, 38,239,116,  2,\n     12,100, 12,109,225,227,227,229,238,116,128, 30, 34,226,229,236,\n    239,119,128, 30, 36,237,239,238,239,243,240,225,227,101,128,255,\n     40,111,  2, 12,135, 12,146,225,242,237,229,238,233,225,110,128,\n      5, 64,242,233,227,239,240,244,233, 99,128,  3,232,243,237,225,\n    236,108,128,247,104,245,238,231,225,242,245,237,236,225,245,116,\n    129,246,207, 12,181,243,237,225,236,108,128,246,248,250,243,241,\n    245,225,242,101,128, 51,144, 73,146,  0, 73, 12,239, 12,251, 12,\n    255, 13, 11, 13, 29, 13, 37, 13, 94, 13,181, 13,214, 13,224, 13,\n    242, 13,254, 14, 48, 14, 86, 14, 99, 14,166, 14,187, 14,205,193,\n    227,249,242,233,236,236,233, 99,128,  4, 47, 74,128,  1, 50,213,\n    227,249,242,233,236,236,233, 99,128,  4, 46,225,227,245,244,101,\n    129,  0,205, 13, 21,243,237,225,236,108,128,247,237,226,242,229,\n    246,101,128,  1, 44, 99,  3, 13, 45, 13, 52, 13, 84,225,242,239,\n    110,128,  1,207,233,242, 99,  2, 13, 60, 13, 65,236,101,128, 36,\n    190,245,237,230,236,229,120,129,  0,206, 13, 76,243,237,225,236,\n    108,128,247,238,249,242,233,236,236,233, 99,128,  4,  6,100,  3,\n     13,102, 13,112, 13,155,226,236,231,242,225,246,101,128,  2,  8,\n    233,229,242,229,243,233,115,131,  0,207, 13,128, 13,136, 13,147,\n    225,227,245,244,101,128, 30, 46,227,249,242,233,236,236,233, 99,\n    128,  4,228,243,237,225,236,108,128,247,239,239,116,130,  1, 48,\n     13,164, 13,173,225,227,227,229,238,116,128,  1, 48,226,229,236,\n    239,119,128, 30,202,101,  2, 13,187, 13,203,226,242,229,246,229,\n    227,249,242,233,236,236,233, 99,128,  4,214,227,249,242,233,236,\n    236,233, 99,128,  4, 21,230,242,225,235,244,245,114,128, 33, 17,\n    231,242,225,246,101,129,  0,204, 13,234,243,237,225,236,108,128,\n    247,236,232,239,239,235,225,226,239,246,101,128, 30,200,105,  3,\n     14,  6, 14, 17, 14, 32,227,249,242,233,236,236,233, 99,128,  4,\n     24,238,246,229,242,244,229,228,226,242,229,246,101,128,  2, 10,\n    243,232,239,242,244,227,249,242,233,236,236,233, 99,128,  4, 25,\n    109,  2, 14, 54, 14, 75,225,227,242,239,110,129,  1, 42, 14, 64,\n    227,249,242,233,236,236,233, 99,128,  4,226,239,238,239,243,240,\n    225,227,101,128,255, 41,238,233,225,242,237,229,238,233,225,110,\n    128,  5, 59,111,  3, 14,107, 14,118, 14,126,227,249,242,233,236,\n    236,233, 99,128,  4,  1,231,239,238,229,107,128,  1, 46,244, 97,\n    131,  3,153, 14,137, 14,147, 14,158,225,230,242,233,227,225,110,\n    128,  1,150,228,233,229,242,229,243,233,115,128,  3,170,244,239,\n    238,239,115,128,  3,138,115,  2, 14,172, 14,179,237,225,236,108,\n    128,247,105,244,242,239,235,101,128,  1,151,244,233,236,228,101,\n    129,  1, 40, 14,197,226,229,236,239,119,128, 30, 44,250,232,233,\n    244,243, 97,  2, 14,216, 14,227,227,249,242,233,236,236,233, 99,\n    128,  4,116,228,226,236,231,242,225,246,229,227,249,242,233,236,\n    236,233, 99,128,  4,118, 74,134,  0, 74, 15,  6, 15, 18, 15, 41,\n     15, 53, 15, 67, 15, 79,225,225,242,237,229,238,233,225,110,128,\n      5, 65,227,233,242, 99,  2, 15, 27, 15, 32,236,101,128, 36,191,\n    245,237,230,236,229,120,128,  1, 52,229,227,249,242,233,236,236,\n    233, 99,128,  4,  8,232,229,232,225,242,237,229,238,233,225,110,\n    128,  5, 75,237,239,238,239,243,240,225,227,101,128,255, 42,243,\n    237,225,236,108,128,247,106, 75,140,  0, 75, 15,115, 15,125, 15,\n    135, 16, 18, 16, 65, 16, 76, 16,106, 16,143, 16,156, 16,168, 16,\n    180, 16,208,194,243,241,245,225,242,101,128, 51,133,203,243,241,\n    245,225,242,101,128, 51,205, 97,  7, 15,151, 15,169, 15,191, 15,\n    211, 15,226, 15,232, 15,249,226,225,243,232,235,233,242,227,249,\n    242,233,236,236,233, 99,128,  4,160, 99,  2, 15,175, 15,181,245,\n    244,101,128, 30, 48,249,242,233,236,236,233, 99,128,  4, 26,228,\n    229,243,227,229,238,228,229,242,227,249,242,233,236,236,233, 99,\n    128,  4,154,232,239,239,235,227,249,242,233,236,236,233, 99,128,\n      4,195,240,240, 97,128,  3,154,243,244,242,239,235,229,227,249,\n    242,233,236,236,233, 99,128,  4,158,246,229,242,244,233,227,225,\n    236,243,244,242,239,235,229,227,249,242,233,236,236,233, 99,128,\n      4,156, 99,  4, 16, 28, 16, 35, 16, 44, 16, 52,225,242,239,110,\n    128,  1,232,229,228,233,236,236, 97,128,  1, 54,233,242,227,236,\n    101,128, 36,192,239,237,237,225,225,227,227,229,238,116,128,  1,\n     54,228,239,244,226,229,236,239,119,128, 30, 50,101,  2, 16, 82,\n     16, 94,232,225,242,237,229,238,233,225,110,128,  5, 84,238,225,\n    242,237,229,238,233,225,110,128,  5, 63,104,  3, 16,114, 16,126,\n     16,137,225,227,249,242,233,236,236,233, 99,128,  4, 37,229,233,\n    227,239,240,244,233, 99,128,  3,230,239,239,107,128,  1,152,234,\n    229,227,249,242,233,236,236,233, 99,128,  4, 12,236,233,238,229,\n    226,229,236,239,119,128, 30, 52,237,239,238,239,243,240,225,227,\n    101,128,255, 43,239,240,240, 97,  2, 16,189, 16,200,227,249,242,\n    233,236,236,233, 99,128,  4,128,231,242,229,229,107,128,  3,222,\n    115,  2, 16,214, 16,226,233,227,249,242,233,236,236,233, 99,128,\n      4,110,237,225,236,108,128,247,107, 76,138,  0, 76, 17,  1, 17,\n      5, 17,  9, 17, 29, 17, 95, 17,133, 17,147, 17,165, 17,177, 17,\n    189, 74,128,  1,199, 76,128,246,191, 97,  2, 17, 15, 17, 22,227,\n    245,244,101,128,  1, 57,237,226,228, 97,128,  3,155, 99,  4, 17,\n     39, 17, 46, 17, 55, 17, 82,225,242,239,110,128,  1, 61,229,228,\n    233,236,236, 97,128,  1, 59,233,242, 99,  2, 17, 63, 17, 68,236,\n    101,128, 36,193,245,237,230,236,229,248,226,229,236,239,119,128,\n     30, 60,239,237,237,225,225,227,227,229,238,116,128,  1, 59,228,\n    239,116,130,  1, 63, 17,105, 17,114,225,227,227,229,238,116,128,\n      1, 63,226,229,236,239,119,129, 30, 54, 17,124,237,225,227,242,\n    239,110,128, 30, 56,233,247,238,225,242,237,229,238,233,225,110,\n    128,  5, 60,106,129,  1,200, 17,153,229,227,249,242,233,236,236,\n    233, 99,128,  4,  9,236,233,238,229,226,229,236,239,119,128, 30,\n     58,237,239,238,239,243,240,225,227,101,128,255, 44,115,  2, 17,\n    195, 17,212,236,225,243,104,129,  1, 65, 17,204,243,237,225,236,\n    108,128,246,249,237,225,236,108,128,247,108, 77,137,  0, 77, 17,\n    241, 17,251, 18, 24, 18, 33, 18, 58, 18, 71, 18, 83, 18, 91, 18,\n    100,194,243,241,245,225,242,101,128, 51,134,225, 99,  2, 18,  2,\n     18, 18,242,239,110,129,246,208, 18, 10,243,237,225,236,108,128,\n    247,175,245,244,101,128, 30, 62,227,233,242,227,236,101,128, 36,\n    194,228,239,116,  2, 18, 41, 18, 50,225,227,227,229,238,116,128,\n     30, 64,226,229,236,239,119,128, 30, 66,229,238,225,242,237,229,\n    238,233,225,110,128,  5, 68,237,239,238,239,243,240,225,227,101,\n    128,255, 45,243,237,225,236,108,128,247,109,244,245,242,238,229,\n    100,128,  1,156,117,128,  3,156, 78,141,  0, 78, 18,134, 18,138,\n     18,146, 18,212, 18,237, 18,248, 19,  3, 19, 21, 19, 33, 19, 45,\n     19, 58, 19, 66, 19, 84, 74,128,  1,202,225,227,245,244,101,128,\n      1, 67, 99,  4, 18,156, 18,163, 18,172, 18,199,225,242,239,110,\n    128,  1, 71,229,228,233,236,236, 97,128,  1, 69,233,242, 99,  2,\n     18,180, 18,185,236,101,128, 36,195,245,237,230,236,229,248,226,\n    229,236,239,119,128, 30, 74,239,237,237,225,225,227,227,229,238,\n    116,128,  1, 69,228,239,116,  2, 18,220, 18,229,225,227,227,229,\n    238,116,128, 30, 68,226,229,236,239,119,128, 30, 70,232,239,239,\n    235,236,229,230,116,128,  1,157,233,238,229,242,239,237,225,110,\n    128, 33,104,106,129,  1,203, 19,  9,229,227,249,242,233,236,236,\n    233, 99,128,  4, 10,236,233,238,229,226,229,236,239,119,128, 30,\n     72,237,239,238,239,243,240,225,227,101,128,255, 46,239,247,225,\n    242,237,229,238,233,225,110,128,  5, 70,243,237,225,236,108,128,\n    247,110,244,233,236,228,101,129,  0,209, 19, 76,243,237,225,236,\n    108,128,247,241,117,128,  3,157, 79,141,  0, 79, 19,118, 19,132,\n     19,150, 19,203, 20, 78, 20,152, 20,187, 21, 48, 21, 69, 21,213,\n     21,223, 21,254, 22, 53, 69,129,  1, 82, 19,124,243,237,225,236,\n    108,128,246,250,225,227,245,244,101,129,  0,211, 19,142,243,237,\n    225,236,108,128,247,243, 98,  2, 19,156, 19,196,225,242,242,229,\n    100,  2, 19,166, 19,177,227,249,242,233,236,236,233, 99,128,  4,\n    232,228,233,229,242,229,243,233,243,227,249,242,233,236,236,233,\n     99,128,  4,234,242,229,246,101,128,  1, 78, 99,  4, 19,213, 19,\n    220, 19,235, 20, 68,225,242,239,110,128,  1,209,229,238,244,229,\n    242,229,228,244,233,236,228,101,128,  1,159,233,242, 99,  2, 19,\n    243, 19,248,236,101,128, 36,196,245,237,230,236,229,120,134,  0,\n    212, 20, 13, 20, 21, 20, 32, 20, 40, 20, 52, 20, 60,225,227,245,\n    244,101,128, 30,208,228,239,244,226,229,236,239,119,128, 30,216,\n    231,242,225,246,101,128, 30,210,232,239,239,235,225,226,239,246,\n    101,128, 30,212,243,237,225,236,108,128,247,244,244,233,236,228,\n    101,128, 30,214,249,242,233,236,236,233, 99,128,  4, 30,100,  3,\n     20, 86, 20,109, 20,142,226,108,  2, 20, 93, 20,101,225,227,245,\n    244,101,128,  1, 80,231,242,225,246,101,128,  2, 12,233,229,242,\n    229,243,233,115,130,  0,214, 20,123, 20,134,227,249,242,233,236,\n    236,233, 99,128,  4,230,243,237,225,236,108,128,247,246,239,244,\n    226,229,236,239,119,128, 30,204,103,  2, 20,158, 20,170,239,238,\n    229,235,243,237,225,236,108,128,246,251,242,225,246,101,129,  0,\n    210, 20,179,243,237,225,236,108,128,247,242,104,  4, 20,197, 20,\n    208, 20,212, 21, 34,225,242,237,229,238,233,225,110,128,  5, 85,\n    109,128, 33, 38,111,  2, 20,218, 20,228,239,235,225,226,239,246,\n    101,128, 30,206,242,110,133,  1,160, 20,243, 20,251, 21,  6, 21,\n     14, 21, 26,225,227,245,244,101,128, 30,218,228,239,244,226,229,\n    236,239,119,128, 30,226,231,242,225,246,101,128, 30,220,232,239,\n    239,235,225,226,239,246,101,128, 30,222,244,233,236,228,101,128,\n     30,224,245,238,231,225,242,245,237,236,225,245,116,128,  1, 80,\n    105,129,  1,162, 21, 54,238,246,229,242,244,229,228,226,242,229,\n    246,101,128,  2, 14,109,  4, 21, 79, 21,107, 21,184, 21,202,225,\n    227,242,239,110,130,  1, 76, 21, 91, 21, 99,225,227,245,244,101,\n    128, 30, 82,231,242,225,246,101,128, 30, 80,229,231, 97,132, 33,\n     38, 21,121, 21,132, 21,140, 21,156,227,249,242,233,236,236,233,\n     99,128,  4, 96,231,242,229,229,107,128,  3,169,242,239,245,238,\n    228,227,249,242,233,236,236,233, 99,128,  4,122,116,  2, 21,162,\n     21,177,233,244,236,239,227,249,242,233,236,236,233, 99,128,  4,\n    124,239,238,239,115,128,  3,143,233,227,242,239,110,129,  3,159,\n     21,194,244,239,238,239,115,128,  3,140,239,238,239,243,240,225,\n    227,101,128,255, 47,238,229,242,239,237,225,110,128, 33, 96,111,\n      2, 21,229, 21,248,231,239,238,229,107,129,  1,234, 21,239,237,\n    225,227,242,239,110,128,  1,236,240,229,110,128,  1,134,115,  3,\n     22,  6, 22, 33, 22, 40,236,225,243,104,130,  0,216, 22, 17, 22,\n     25,225,227,245,244,101,128,  1,254,243,237,225,236,108,128,247,\n    248,237,225,236,108,128,247,111,244,242,239,235,229,225,227,245,\n    244,101,128,  1,254,116,  2, 22, 59, 22, 70,227,249,242,233,236,\n    236,233, 99,128,  4,126,233,236,228,101,131,  0,213, 22, 83, 22,\n     91, 22,102,225,227,245,244,101,128, 30, 76,228,233,229,242,229,\n    243,233,115,128, 30, 78,243,237,225,236,108,128,247,245, 80,136,\n      0, 80, 22,130, 22,138, 22,147, 22,159, 22,211, 22,227, 22,246,\n     23,  2,225,227,245,244,101,128, 30, 84,227,233,242,227,236,101,\n    128, 36,197,228,239,244,225,227,227,229,238,116,128, 30, 86,101,\n      3, 22,167, 22,178, 22,190,227,249,242,233,236,236,233, 99,128,\n      4, 31,232,225,242,237,229,238,233,225,110,128,  5, 74,237,233,\n    228,228,236,229,232,239,239,235,227,249,242,233,236,236,233, 99,\n    128,  4,166,104,  2, 22,217, 22,221,105,128,  3,166,239,239,107,\n    128,  1,164,105,129,  3,160, 22,233,247,242,225,242,237,229,238,\n    233,225,110,128,  5, 83,237,239,238,239,243,240,225,227,101,128,\n    255, 48,115,  2, 23,  8, 23, 25,105,129,  3,168, 23, 14,227,249,\n    242,233,236,236,233, 99,128,  4,112,237,225,236,108,128,247,112,\n     81,131,  0, 81, 23, 42, 23, 51, 23, 63,227,233,242,227,236,101,\n    128, 36,198,237,239,238,239,243,240,225,227,101,128,255, 49,243,\n    237,225,236,108,128,247,113, 82,138,  0, 82, 23, 95, 23,119, 23,\n    166, 23,217, 23,230, 23,240, 23,245, 24, 19, 24, 31, 24, 43, 97,\n      2, 23,101, 23,112,225,242,237,229,238,233,225,110,128,  5, 76,\n    227,245,244,101,128,  1, 84, 99,  4, 23,129, 23,136, 23,145, 23,\n    153,225,242,239,110,128,  1, 88,229,228,233,236,236, 97,128,  1,\n     86,233,242,227,236,101,128, 36,199,239,237,237,225,225,227,227,\n    229,238,116,128,  1, 86,100,  2, 23,172, 23,182,226,236,231,242,\n    225,246,101,128,  2, 16,239,116,  2, 23,189, 23,198,225,227,227,\n    229,238,116,128, 30, 88,226,229,236,239,119,129, 30, 90, 23,208,\n    237,225,227,242,239,110,128, 30, 92,229,232,225,242,237,229,238,\n    233,225,110,128,  5, 80,230,242,225,235,244,245,114,128, 33, 28,\n    232,111,128,  3,161,233,110,  2, 23,252, 24,  5,231,243,237,225,\n    236,108,128,246,252,246,229,242,244,229,228,226,242,229,246,101,\n    128,  2, 18,236,233,238,229,226,229,236,239,119,128, 30, 94,237,\n    239,238,239,243,240,225,227,101,128,255, 50,243,237,225,236,108,\n    129,247,114, 24, 53,233,238,246,229,242,244,229,100,129,  2,129,\n     24, 66,243,245,240,229,242,233,239,114,128,  2,182, 83,139,  0,\n     83, 24,103, 26, 17, 26, 55, 26,182, 26,221, 26,250, 27, 84, 27,\n    105, 27,117, 27,135, 27,143, 70,  6, 24,117, 24,209, 24,241, 25,\n     77, 25,119, 25,221, 48,  9, 24,137, 24,145, 24,153, 24,161, 24,\n    169, 24,177, 24,185, 24,193, 24,201,177,176,176,176, 48,128, 37,\n     12,178,176,176,176, 48,128, 37, 20,179,176,176,176, 48,128, 37,\n     16,180,176,176,176, 48,128, 37, 24,181,176,176,176, 48,128, 37,\n     60,182,176,176,176, 48,128, 37, 44,183,176,176,176, 48,128, 37,\n     52,184,176,176,176, 48,128, 37, 28,185,176,176,176, 48,128, 37,\n     36, 49,  3, 24,217, 24,225, 24,233,176,176,176,176, 48,128, 37,\n      0,177,176,176,176, 48,128, 37,  2,185,176,176,176, 48,128, 37,\n     97, 50,  9, 25,  5, 25, 13, 25, 21, 25, 29, 25, 37, 25, 45, 25,\n     53, 25, 61, 25, 69,176,176,176,176, 48,128, 37, 98,177,176,176,\n    176, 48,128, 37, 86,178,176,176,176, 48,128, 37, 85,179,176,176,\n    176, 48,128, 37, 99,180,176,176,176, 48,128, 37, 81,181,176,176,\n    176, 48,128, 37, 87,182,176,176,176, 48,128, 37, 93,183,176,176,\n    176, 48,128, 37, 92,184,176,176,176, 48,128, 37, 91, 51,  4, 25,\n     87, 25, 95, 25,103, 25,111,182,176,176,176, 48,128, 37, 94,183,\n    176,176,176, 48,128, 37, 95,184,176,176,176, 48,128, 37, 90,185,\n    176,176,176, 48,128, 37, 84, 52, 10, 25,141, 25,149, 25,157, 25,\n    165, 25,173, 25,181, 25,189, 25,197, 25,205, 25,213,176,176,176,\n    176, 48,128, 37,105,177,176,176,176, 48,128, 37,102,178,176,176,\n    176, 48,128, 37, 96,179,176,176,176, 48,128, 37, 80,180,176,176,\n    176, 48,128, 37,108,181,176,176,176, 48,128, 37,103,182,176,176,\n    176, 48,128, 37,104,183,176,176,176, 48,128, 37,100,184,176,176,\n    176, 48,128, 37,101,185,176,176,176, 48,128, 37, 89, 53,  5, 25,\n    233, 25,241, 25,249, 26,  1, 26,  9,176,176,176,176, 48,128, 37,\n     88,177,176,176,176, 48,128, 37, 82,178,176,176,176, 48,128, 37,\n     83,179,176,176,176, 48,128, 37,107,180,176,176,176, 48,128, 37,\n    106, 97,  2, 26, 23, 26, 44,227,245,244,101,129,  1, 90, 26, 32,\n    228,239,244,225,227,227,229,238,116,128, 30,100,237,240,233,231,\n    242,229,229,107,128,  3,224, 99,  5, 26, 67, 26, 98, 26,107, 26,\n    147, 26,169,225,242,239,110,130,  1, 96, 26, 78, 26, 90,228,239,\n    244,225,227,227,229,238,116,128, 30,102,243,237,225,236,108,128,\n    246,253,229,228,233,236,236, 97,128,  1, 94,232,247, 97,130,  1,\n    143, 26,117, 26,128,227,249,242,233,236,236,233, 99,128,  4,216,\n    228,233,229,242,229,243,233,243,227,249,242,233,236,236,233, 99,\n    128,  4,218,233,242, 99,  2, 26,155, 26,160,236,101,128, 36,200,\n    245,237,230,236,229,120,128,  1, 92,239,237,237,225,225,227,227,\n    229,238,116,128,  2, 24,228,239,116,  2, 26,190, 26,199,225,227,\n    227,229,238,116,128, 30, 96,226,229,236,239,119,129, 30, 98, 26,\n    209,228,239,244,225,227,227,229,238,116,128, 30,104,101,  2, 26,\n    227, 26,239,232,225,242,237,229,238,233,225,110,128,  5, 77,246,\n    229,238,242,239,237,225,110,128, 33,102,104,  5, 27,  6, 27, 34,\n     27, 48, 27, 59, 27, 72, 97,  2, 27, 12, 27, 23,225,242,237,229,\n    238,233,225,110,128,  5, 71,227,249,242,233,236,236,233, 99,128,\n      4, 40,227,232,225,227,249,242,233,236,236,233, 99,128,  4, 41,\n    229,233,227,239,240,244,233, 99,128,  3,226,232,225,227,249,242,\n    233,236,236,233, 99,128,  4,186,233,237,225,227,239,240,244,233,\n     99,128,  3,236,105,  2, 27, 90, 27, 96,231,237, 97,128,  3,163,\n    248,242,239,237,225,110,128, 33,101,237,239,238,239,243,240,225,\n    227,101,128,255, 51,239,230,244,243,233,231,238,227,249,242,233,\n    236,236,233, 99,128,  4, 44,243,237,225,236,108,128,247,115,244,\n    233,231,237,225,231,242,229,229,107,128,  3,218, 84,141,  0, 84,\n     27,186, 27,191, 27,197, 28,  7, 28, 32, 28, 96, 28,147, 28,177,\n     28,189, 28,201, 28,246, 29,  6, 29, 46,225,117,128,  3,164,226,\n    225,114,128,  1,102, 99,  4, 27,207, 27,214, 27,223, 27,250,225,\n    242,239,110,128,  1,100,229,228,233,236,236, 97,128,  1, 98,233,\n    242, 99,  2, 27,231, 27,236,236,101,128, 36,201,245,237,230,236,\n    229,248,226,229,236,239,119,128, 30,112,239,237,237,225,225,227,\n    227,229,238,116,128,  1, 98,228,239,116,  2, 28, 15, 28, 24,225,\n    227,227,229,238,116,128, 30,106,226,229,236,239,119,128, 30,108,\n    101,  4, 28, 42, 28, 53, 28, 73, 28, 82,227,249,242,233,236,236,\n    233, 99,128,  4, 34,228,229,243,227,229,238,228,229,242,227,249,\n    242,233,236,236,233, 99,128,  4,172,238,242,239,237,225,110,128,\n     33,105,244,243,229,227,249,242,233,236,236,233, 99,128,  4,180,\n    104,  3, 28,104, 28,110, 28,136,229,244, 97,128,  3,152,111,  2,\n     28,116, 28,121,239,107,128,  1,172,242,110,129,  0,222, 28,128,\n    243,237,225,236,108,128,247,254,242,229,229,242,239,237,225,110,\n    128, 33, 98,105,  2, 28,153, 28,164,236,228,229,243,237,225,236,\n    108,128,246,254,247,238,225,242,237,229,238,233,225,110,128,  5,\n     79,236,233,238,229,226,229,236,239,119,128, 30,110,237,239,238,\n    239,243,240,225,227,101,128,255, 52,111,  2, 28,207, 28,218,225,\n    242,237,229,238,233,225,110,128,  5, 57,238,101,  3, 28,227, 28,\n    234, 28,240,230,233,246,101,128,  1,188,243,233,120,128,  1,132,\n    244,247,111,128,  1,167,242,229,244,242,239,230,236,229,248,232,\n    239,239,107,128,  1,174,115,  3, 29, 14, 29, 26, 29, 39,229,227,\n    249,242,233,236,236,233, 99,128,  4, 38,232,229,227,249,242,233,\n    236,236,233, 99,128,  4, 11,237,225,236,108,128,247,116,119,  2,\n     29, 52, 29, 64,229,236,246,229,242,239,237,225,110,128, 33,107,\n    239,242,239,237,225,110,128, 33, 97, 85,142,  0, 85, 29,105, 29,\n    123, 29,131, 29,198, 30, 69, 30, 87, 30,198, 30,214, 30,226, 31,\n     21, 31, 30, 31,142, 31,149, 31,219,225,227,245,244,101,129,  0,\n    218, 29,115,243,237,225,236,108,128,247,250,226,242,229,246,101,\n    128,  1,108, 99,  3, 29,139, 29,146, 29,188,225,242,239,110,128,\n      1,211,233,242, 99,  2, 29,154, 29,159,236,101,128, 36,202,245,\n    237,230,236,229,120,130,  0,219, 29,172, 29,180,226,229,236,239,\n    119,128, 30,118,243,237,225,236,108,128,247,251,249,242,233,236,\n    236,233, 99,128,  4, 35,100,  3, 29,206, 29,229, 30, 59,226,108,\n      2, 29,213, 29,221,225,227,245,244,101,128,  1,112,231,242,225,\n    246,101,128,  2, 20,233,229,242,229,243,233,115,134,  0,220, 29,\n    251, 30,  3, 30, 11, 30, 34, 30, 42, 30, 51,225,227,245,244,101,\n    128,  1,215,226,229,236,239,119,128, 30,114, 99,  2, 30, 17, 30,\n     24,225,242,239,110,128,  1,217,249,242,233,236,236,233, 99,128,\n      4,240,231,242,225,246,101,128,  1,219,237,225,227,242,239,110,\n    128,  1,213,243,237,225,236,108,128,247,252,239,244,226,229,236,\n    239,119,128, 30,228,231,242,225,246,101,129,  0,217, 30, 79,243,\n    237,225,236,108,128,247,249,104,  2, 30, 93, 30,171,111,  2, 30,\n     99, 30,109,239,235,225,226,239,246,101,128, 30,230,242,110,133,\n      1,175, 30,124, 30,132, 30,143, 30,151, 30,163,225,227,245,244,\n    101,128, 30,232,228,239,244,226,229,236,239,119,128, 30,240,231,\n    242,225,246,101,128, 30,234,232,239,239,235,225,226,239,246,101,\n    128, 30,236,244,233,236,228,101,128, 30,238,245,238,231,225,242,\n    245,237,236,225,245,116,129,  1,112, 30,187,227,249,242,233,236,\n    236,233, 99,128,  4,242,233,238,246,229,242,244,229,228,226,242,\n    229,246,101,128,  2, 22,235,227,249,242,233,236,236,233, 99,128,\n      4,120,109,  2, 30,232, 31, 10,225,227,242,239,110,130,  1,106,\n     30,244, 30,255,227,249,242,233,236,236,233, 99,128,  4,238,228,\n    233,229,242,229,243,233,115,128, 30,122,239,238,239,243,240,225,\n    227,101,128,255, 53,239,231,239,238,229,107,128,  1,114,240,243,\n    233,236,239,110,133,  3,165, 31, 49, 31, 53, 31, 90, 31,121, 31,\n    134, 49,128,  3,210, 97,  2, 31, 59, 31, 81,227,245,244,229,232,\n    239,239,235,243,249,237,226,239,236,231,242,229,229,107,128,  3,\n    211,230,242,233,227,225,110,128,  1,177,228,233,229,242,229,243,\n    233,115,129,  3,171, 31,103,232,239,239,235,243,249,237,226,239,\n    236,231,242,229,229,107,128,  3,212,232,239,239,235,243,249,237,\n    226,239,108,128,  3,210,244,239,238,239,115,128,  3,142,242,233,\n    238,103,128,  1,110,115,  3, 31,157, 31,172, 31,179,232,239,242,\n    244,227,249,242,233,236,236,233, 99,128,  4, 14,237,225,236,108,\n    128,247,117,244,242,225,233,231,232,116,  2, 31,191, 31,202,227,\n    249,242,233,236,236,233, 99,128,  4,174,243,244,242,239,235,229,\n    227,249,242,233,236,236,233, 99,128,  4,176,244,233,236,228,101,\n    130,  1,104, 31,231, 31,239,225,227,245,244,101,128, 30,120,226,\n    229,236,239,119,128, 30,116, 86,136,  0, 86, 32, 11, 32, 20, 32,\n     31, 32, 60, 32, 67, 32, 79, 32, 91, 32, 99,227,233,242,227,236,\n    101,128, 36,203,228,239,244,226,229,236,239,119,128, 30,126,101,\n      2, 32, 37, 32, 48,227,249,242,233,236,236,233, 99,128,  4, 18,\n    247,225,242,237,229,238,233,225,110,128,  5, 78,232,239,239,107,\n    128,  1,178,237,239,238,239,243,240,225,227,101,128,255, 54,239,\n    225,242,237,229,238,233,225,110,128,  5, 72,243,237,225,236,108,\n    128,247,118,244,233,236,228,101,128, 30,124, 87,134,  0, 87, 32,\n    123, 32,131, 32,154, 32,194, 32,202, 32,214,225,227,245,244,101,\n    128, 30,130,227,233,242, 99,  2, 32,140, 32,145,236,101,128, 36,\n    204,245,237,230,236,229,120,128,  1,116,100,  2, 32,160, 32,170,\n    233,229,242,229,243,233,115,128, 30,132,239,116,  2, 32,177, 32,\n    186,225,227,227,229,238,116,128, 30,134,226,229,236,239,119,128,\n     30,136,231,242,225,246,101,128, 30,128,237,239,238,239,243,240,\n    225,227,101,128,255, 55,243,237,225,236,108,128,247,119, 88,134,\n      0, 88, 32,238, 32,247, 33, 18, 33, 31, 33, 35, 33, 47,227,233,\n    242,227,236,101,128, 36,205,100,  2, 32,253, 33,  7,233,229,242,\n    229,243,233,115,128, 30,140,239,244,225,227,227,229,238,116,128,\n     30,138,229,232,225,242,237,229,238,233,225,110,128,  5, 61,105,\n    128,  3,158,237,239,238,239,243,240,225,227,101,128,255, 56,243,\n    237,225,236,108,128,247,120, 89,139,  0, 89, 33, 81, 33,116, 33,\n    139, 33,189, 33,228, 33,236, 33,253, 34, 40, 34, 52, 34, 60, 34,\n     68, 97,  2, 33, 87, 33,104,227,245,244,101,129,  0,221, 33, 96,\n    243,237,225,236,108,128,247,253,244,227,249,242,233,236,236,233,\n     99,128,  4, 98,227,233,242, 99,  2, 33,125, 33,130,236,101,128,\n     36,206,245,237,230,236,229,120,128,  1,118,100,  2, 33,145, 33,\n    165,233,229,242,229,243,233,115,129,  1,120, 33,157,243,237,225,\n    236,108,128,247,255,239,116,  2, 33,172, 33,181,225,227,227,229,\n    238,116,128, 30,142,226,229,236,239,119,128, 30,244,229,114,  2,\n     33,196, 33,208,233,227,249,242,233,236,236,233, 99,128,  4, 43,\n    245,228,233,229,242,229,243,233,243,227,249,242,233,236,236,233,\n     99,128,  4,248,231,242,225,246,101,128, 30,242,232,239,239,107,\n    129,  1,179, 33,245,225,226,239,246,101,128, 30,246,105,  3, 34,\n      5, 34, 16, 34, 27,225,242,237,229,238,233,225,110,128,  5, 69,\n    227,249,242,233,236,236,233, 99,128,  4,  7,247,238,225,242,237,\n    229,238,233,225,110,128,  5, 82,237,239,238,239,243,240,225,227,\n    101,128,255, 57,243,237,225,236,108,128,247,121,244,233,236,228,\n    101,128, 30,248,245,115,  2, 34, 75, 34,113,226,233,103,  2, 34,\n     83, 34, 94,227,249,242,233,236,236,233, 99,128,  4,106,233,239,\n    244,233,230,233,229,228,227,249,242,233,236,236,233, 99,128,  4,\n    108,236,233,244,244,236,101,  2, 34,124, 34,135,227,249,242,233,\n    236,236,233, 99,128,  4,102,233,239,244,233,230,233,229,228,227,\n    249,242,233,236,236,233, 99,128,  4,104, 90,136,  0, 90, 34,174,\n     34,198, 34,243, 35, 14, 35, 81, 35,173, 35,185, 35,197, 97,  2,\n     34,180, 34,191,225,242,237,229,238,233,225,110,128,  5, 54,227,\n    245,244,101,128,  1,121, 99,  2, 34,204, 34,221,225,242,239,110,\n    129,  1,125, 34,213,243,237,225,236,108,128,246,255,233,242, 99,\n      2, 34,229, 34,234,236,101,128, 36,207,245,237,230,236,229,120,\n    128, 30,144,228,239,116,130,  1,123, 34,253, 35,  6,225,227,227,\n    229,238,116,128,  1,123,226,229,236,239,119,128, 30,146,101,  3,\n     35, 22, 35, 33, 35, 76,227,249,242,233,236,236,233, 99,128,  4,\n     23,100,  2, 35, 39, 35, 58,229,243,227,229,238,228,229,242,227,\n    249,242,233,236,236,233, 99,128,  4,152,233,229,242,229,243,233,\n    243,227,249,242,233,236,236,233, 99,128,  4,222,244, 97,128,  3,\n    150,232,101,  4, 35, 92, 35,103, 35,119, 35,130,225,242,237,229,\n    238,233,225,110,128,  5, 58,226,242,229,246,229,227,249,242,233,\n    236,236,233, 99,128,  4,193,227,249,242,233,236,236,233, 99,128,\n      4, 22,100,  2, 35,136, 35,155,229,243,227,229,238,228,229,242,\n    227,249,242,233,236,236,233, 99,128,  4,150,233,229,242,229,243,\n    233,243,227,249,242,233,236,236,233, 99,128,  4,220,236,233,238,\n    229,226,229,236,239,119,128, 30,148,237,239,238,239,243,240,225,\n    227,101,128,255, 58,115,  2, 35,203, 35,210,237,225,236,108,128,\n    247,122,244,242,239,235,101,128,  1,181, 97,158,  0, 97, 36, 26,\n     38,154, 39,  4, 39, 68, 39,132, 39,196, 40,  4, 40, 68, 40,126,\n     40,190, 41, 70, 41,217, 42,137, 42,237, 43, 17, 49,192, 49,229,\n     50,  0, 50,225, 51,  7, 52, 96, 52,168, 53,123, 53,132, 54,  5,\n     56, 13, 57,  3, 57, 50, 57,201, 57,215, 49,138, 39,  1, 36, 50,\n     36,114, 36,154, 36,218, 37, 26, 37, 90, 37,154, 37,218, 38, 26,\n     38, 90, 48,138, 39, 33, 36, 74, 36, 78, 36, 82, 36, 86, 36, 90,\n     36, 94, 36, 98, 36,102, 36,106, 36,110, 48,128, 39, 94, 49,128,\n     39, 97, 50,128, 39, 98, 51,128, 39, 99, 52,128, 39,100, 53,128,\n     39, 16, 54,128, 39,101, 55,128, 39,102, 56,128, 39,103, 57,128,\n     38, 96, 49,134, 38, 27, 36,130, 36,134, 36,138, 36,142, 36,146,\n     36,150, 48,128, 38,101, 49,128, 38,102, 50,128, 38, 99, 55,128,\n     39,  9, 56,128, 39,  8, 57,128, 39,  7, 50,138, 38, 30, 36,178,\n     36,182, 36,186, 36,190, 36,194, 36,198, 36,202, 36,206, 36,210,\n     36,214, 48,128, 36, 96, 49,128, 36, 97, 50,128, 36, 98, 51,128,\n     36, 99, 52,128, 36,100, 53,128, 36,101, 54,128, 36,102, 55,128,\n     36,103, 56,128, 36,104, 57,128, 36,105, 51,138, 39, 12, 36,242,\n     36,246, 36,250, 36,254, 37,  2, 37,  6, 37, 10, 37, 14, 37, 18,\n     37, 22, 48,128, 39,118, 49,128, 39,119, 50,128, 39,120, 51,128,\n     39,121, 52,128, 39,122, 53,128, 39,123, 54,128, 39,124, 55,128,\n     39,125, 56,128, 39,126, 57,128, 39,127, 52,138, 39, 13, 37, 50,\n     37, 54, 37, 58, 37, 62, 37, 66, 37, 70, 37, 74, 37, 78, 37, 82,\n     37, 86, 48,128, 39,128, 49,128, 39,129, 50,128, 39,130, 51,128,\n     39,131, 52,128, 39,132, 53,128, 39,133, 54,128, 39,134, 55,128,\n     39,135, 56,128, 39,136, 57,128, 39,137, 53,138, 39, 14, 37,114,\n     37,118, 37,122, 37,126, 37,130, 37,134, 37,138, 37,142, 37,146,\n     37,150, 48,128, 39,138, 49,128, 39,139, 50,128, 39,140, 51,128,\n     39,141, 52,128, 39,142, 53,128, 39,143, 54,128, 39,144, 55,128,\n     39,145, 56,128, 39,146, 57,128, 39,147, 54,138, 39, 15, 37,178,\n     37,182, 37,186, 37,190, 37,194, 37,198, 37,202, 37,206, 37,210,\n     37,214, 48,128, 39,148, 49,128, 33,146, 50,128, 39,163, 51,128,\n     33,148, 52,128, 33,149, 53,128, 39,153, 54,128, 39,155, 55,128,\n     39,156, 56,128, 39,157, 57,128, 39,158, 55,138, 39, 17, 37,242,\n     37,246, 37,250, 37,254, 38,  2, 38,  6, 38, 10, 38, 14, 38, 18,\n     38, 22, 48,128, 39,159, 49,128, 39,160, 50,128, 39,161, 51,128,\n     39,162, 52,128, 39,164, 53,128, 39,165, 54,128, 39,166, 55,128,\n     39,167, 56,128, 39,168, 57,128, 39,169, 56,138, 39, 18, 38, 50,\n     38, 54, 38, 58, 38, 62, 38, 66, 38, 70, 38, 74, 38, 78, 38, 82,\n     38, 86, 48,128, 39,171, 49,128, 39,173, 50,128, 39,175, 51,128,\n     39,178, 52,128, 39,179, 53,128, 39,181, 54,128, 39,184, 55,128,\n     39,186, 56,128, 39,187, 57,128, 39,188, 57,138, 39, 19, 38,114,\n     38,118, 38,122, 38,126, 38,130, 38,134, 38,138, 38,142, 38,146,\n     38,150, 48,128, 39,189, 49,128, 39,190, 50,128, 39,154, 51,128,\n     39,170, 52,128, 39,182, 53,128, 39,185, 54,128, 39,152, 55,128,\n     39,180, 56,128, 39,183, 57,128, 39,172, 50,138, 39,  2, 38,178,\n     38,224, 38,228, 38,232, 38,236, 38,240, 38,244, 38,248, 38,252,\n     39,  0, 48,135, 39, 20, 38,196, 38,200, 38,204, 38,208, 38,212,\n     38,216, 38,220, 48,128, 39,174, 49,128, 39,177, 50,128, 39,  3,\n     51,128, 39, 80, 52,128, 39, 82, 53,128, 39,110, 54,128, 39,112,\n     49,128, 39, 21, 50,128, 39, 22, 51,128, 39, 23, 52,128, 39, 24,\n     53,128, 39, 25, 54,128, 39, 26, 55,128, 39, 27, 56,128, 39, 28,\n     57,128, 39, 34, 51,138, 39,  4, 39, 28, 39, 32, 39, 36, 39, 40,\n     39, 44, 39, 48, 39, 52, 39, 56, 39, 60, 39, 64, 48,128, 39, 35,\n     49,128, 39, 36, 50,128, 39, 37, 51,128, 39, 38, 52,128, 39, 39,\n     53,128, 38,  5, 54,128, 39, 41, 55,128, 39, 42, 56,128, 39, 43,\n     57,128, 39, 44, 52,138, 38, 14, 39, 92, 39, 96, 39,100, 39,104,\n     39,108, 39,112, 39,116, 39,120, 39,124, 39,128, 48,128, 39, 45,\n     49,128, 39, 46, 50,128, 39, 47, 51,128, 39, 48, 52,128, 39, 49,\n     53,128, 39, 50, 54,128, 39, 51, 55,128, 39, 52, 56,128, 39, 53,\n     57,128, 39, 54, 53,138, 39,  6, 39,156, 39,160, 39,164, 39,168,\n     39,172, 39,176, 39,180, 39,184, 39,188, 39,192, 48,128, 39, 55,\n     49,128, 39, 56, 50,128, 39, 57, 51,128, 39, 58, 52,128, 39, 59,\n     53,128, 39, 60, 54,128, 39, 61, 55,128, 39, 62, 56,128, 39, 63,\n     57,128, 39, 64, 54,138, 39, 29, 39,220, 39,224, 39,228, 39,232,\n     39,236, 39,240, 39,244, 39,248, 39,252, 40,  0, 48,128, 39, 65,\n     49,128, 39, 66, 50,128, 39, 67, 51,128, 39, 68, 52,128, 39, 69,\n     53,128, 39, 70, 54,128, 39, 71, 55,128, 39, 72, 56,128, 39, 73,\n     57,128, 39, 74, 55,138, 39, 30, 40, 28, 40, 32, 40, 36, 40, 40,\n     40, 44, 40, 48, 40, 52, 40, 56, 40, 60, 40, 64, 48,128, 39, 75,\n     49,128, 37,207, 50,128, 39, 77, 51,128, 37,160, 52,128, 39, 79,\n     53,128, 39, 81, 54,128, 37,178, 55,128, 37,188, 56,128, 37,198,\n     57,128, 39, 86, 56,137, 39, 31, 40, 90, 40, 94, 40, 98, 40,102,\n     40,106, 40,110, 40,114, 40,118, 40,122, 49,128, 37,215, 50,128,\n     39, 88, 51,128, 39, 89, 52,128, 39, 90, 53,128, 39,111, 54,128,\n     39,113, 55,128, 39,114, 56,128, 39,115, 57,128, 39,104, 57,138,\n     39, 32, 40,150, 40,154, 40,158, 40,162, 40,166, 40,170, 40,174,\n     40,178, 40,182, 40,186, 48,128, 39,105, 49,128, 39,108, 50,128,\n     39,109, 51,128, 39,106, 52,128, 39,107, 53,128, 39,116, 54,128,\n     39,117, 55,128, 39, 91, 56,128, 39, 92, 57,128, 39, 93, 97,  7,\n     40,206, 40,216, 40,223, 40,230, 40,255, 41, 15, 41, 26,226,229,\n    238,231,225,236,105,128,  9,134,227,245,244,101,128,  0,225,228,\n    229,246, 97,128,  9,  6,231,117,  2, 40,237, 40,246,234,225,242,\n    225,244,105,128, 10,134,242,237,245,235,232,105,128, 10,  6,237,\n    225,244,242,225,231,245,242,237,245,235,232,105,128, 10, 62,242,\n    245,243,241,245,225,242,101,128, 51,  3,246,239,247,229,236,243,\n    233,231,110,  3, 41, 42, 41, 52, 41, 59,226,229,238,231,225,236,\n    105,128,  9,190,228,229,246, 97,128,  9, 62,231,245,234,225,242,\n    225,244,105,128, 10,190, 98,  4, 41, 80, 41,121, 41,130, 41,140,\n    226,242,229,246,233,225,244,233,239,110,  2, 41, 95, 41,110,237,\n    225,242,235,225,242,237,229,238,233,225,110,128,  5, 95,243,233,\n    231,238,228,229,246, 97,128,  9,112,229,238,231,225,236,105,128,\n      9,133,239,240,239,237,239,230,111,128, 49, 26,242,229,246,101,\n    134,  1,  3, 41,159, 41,167, 41,178, 41,189, 41,197, 41,209,225,\n    227,245,244,101,128, 30,175,227,249,242,233,236,236,233, 99,128,\n      4,209,228,239,244,226,229,236,239,119,128, 30,183,231,242,225,\n    246,101,128, 30,177,232,239,239,235,225,226,239,246,101,128, 30,\n    179,244,233,236,228,101,128, 30,181, 99,  4, 41,227, 41,234, 42,\n     57, 42,127,225,242,239,110,128,  1,206,233,242, 99,  2, 41,242,\n     41,247,236,101,128, 36,208,245,237,230,236,229,120,133,  0,226,\n     42, 10, 42, 18, 42, 29, 42, 37, 42, 49,225,227,245,244,101,128,\n     30,165,228,239,244,226,229,236,239,119,128, 30,173,231,242,225,\n    246,101,128, 30,167,232,239,239,235,225,226,239,246,101,128, 30,\n    169,244,233,236,228,101,128, 30,171,245,244,101,133,  0,180, 42,\n     73, 42, 84, 42,101, 42,108, 42,117,226,229,236,239,247,227,237,\n     98,128,  3, 23, 99,  2, 42, 90, 42, 95,237, 98,128,  3,  1,239,\n    237, 98,128,  3,  1,228,229,246, 97,128,  9, 84,236,239,247,237,\n    239,100,128,  2,207,244,239,238,229,227,237, 98,128,  3, 65,249,\n    242,233,236,236,233, 99,128,  4, 48,100,  5, 42,149, 42,159, 42,\n    173, 42,179, 42,213,226,236,231,242,225,246,101,128,  2,  1,228,\n    225,235,231,245,242,237,245,235,232,105,128, 10,113,229,246, 97,\n    128,  9,  5,233,229,242,229,243,233,115,130,  0,228, 42,193, 42,\n    204,227,249,242,233,236,236,233, 99,128,  4,211,237,225,227,242,\n    239,110,128,  1,223,239,116,  2, 42,220, 42,228,226,229,236,239,\n    119,128, 30,161,237,225,227,242,239,110,128,  1,225,101,131,  0,\n    230, 42,247, 42,255, 43,  8,225,227,245,244,101,128,  1,253,235,\n    239,242,229,225,110,128, 49, 80,237,225,227,242,239,110,128,  1,\n    227,230,233,105,  6, 43, 33, 43, 53, 45,246, 45,252, 46, 11, 49,\n    111, 48,  2, 43, 39, 43, 46,176,178,176, 56,128, 32, 21,184,185,\n    180, 49,128, 32,164,177, 48,  3, 43, 62, 45, 86, 45,221, 48,  9,\n     43, 82, 43,102, 43,164, 43,226, 44, 32, 44, 94, 44,156, 44,218,\n     45, 24, 49,  3, 43, 90, 43, 94, 43, 98, 55,128,  4, 16, 56,128,\n      4, 17, 57,128,  4, 18, 50, 10, 43,124, 43,128, 43,132, 43,136,\n     43,140, 43,144, 43,148, 43,152, 43,156, 43,160, 48,128,  4, 19,\n     49,128,  4, 20, 50,128,  4, 21, 51,128,  4,  1, 52,128,  4, 22,\n     53,128,  4, 23, 54,128,  4, 24, 55,128,  4, 25, 56,128,  4, 26,\n     57,128,  4, 27, 51, 10, 43,186, 43,190, 43,194, 43,198, 43,202,\n     43,206, 43,210, 43,214, 43,218, 43,222, 48,128,  4, 28, 49,128,\n      4, 29, 50,128,  4, 30, 51,128,  4, 31, 52,128,  4, 32, 53,128,\n      4, 33, 54,128,  4, 34, 55,128,  4, 35, 56,128,  4, 36, 57,128,\n      4, 37, 52, 10, 43,248, 43,252, 44,  0, 44,  4, 44,  8, 44, 12,\n     44, 16, 44, 20, 44, 24, 44, 28, 48,128,  4, 38, 49,128,  4, 39,\n     50,128,  4, 40, 51,128,  4, 41, 52,128,  4, 42, 53,128,  4, 43,\n     54,128,  4, 44, 55,128,  4, 45, 56,128,  4, 46, 57,128,  4, 47,\n     53, 10, 44, 54, 44, 58, 44, 62, 44, 66, 44, 70, 44, 74, 44, 78,\n     44, 82, 44, 86, 44, 90, 48,128,  4,144, 49,128,  4,  2, 50,128,\n      4,  3, 51,128,  4,  4, 52,128,  4,  5, 53,128,  4,  6, 54,128,\n      4,  7, 55,128,  4,  8, 56,128,  4,  9, 57,128,  4, 10, 54, 10,\n     44,116, 44,120, 44,124, 44,128, 44,132, 44,136, 44,140, 44,144,\n     44,148, 44,152, 48,128,  4, 11, 49,128,  4, 12, 50,128,  4, 14,\n     51,128,246,196, 52,128,246,197, 53,128,  4, 48, 54,128,  4, 49,\n     55,128,  4, 50, 56,128,  4, 51, 57,128,  4, 52, 55, 10, 44,178,\n     44,182, 44,186, 44,190, 44,194, 44,198, 44,202, 44,206, 44,210,\n     44,214, 48,128,  4, 53, 49,128,  4, 81, 50,128,  4, 54, 51,128,\n      4, 55, 52,128,  4, 56, 53,128,  4, 57, 54,128,  4, 58, 55,128,\n      4, 59, 56,128,  4, 60, 57,128,  4, 61, 56, 10, 44,240, 44,244,\n     44,248, 44,252, 45,  0, 45,  4, 45,  8, 45, 12, 45, 16, 45, 20,\n     48,128,  4, 62, 49,128,  4, 63, 50,128,  4, 64, 51,128,  4, 65,\n     52,128,  4, 66, 53,128,  4, 67, 54,128,  4, 68, 55,128,  4, 69,\n     56,128,  4, 70, 57,128,  4, 71, 57, 10, 45, 46, 45, 50, 45, 54,\n     45, 58, 45, 62, 45, 66, 45, 70, 45, 74, 45, 78, 45, 82, 48,128,\n      4, 72, 49,128,  4, 73, 50,128,  4, 74, 51,128,  4, 75, 52,128,\n      4, 76, 53,128,  4, 77, 54,128,  4, 78, 55,128,  4, 79, 56,128,\n      4,145, 57,128,  4, 82, 49,  4, 45, 96, 45,158, 45,163, 45,189,\n     48, 10, 45,118, 45,122, 45,126, 45,130, 45,134, 45,138, 45,142,\n     45,146, 45,150, 45,154, 48,128,  4, 83, 49,128,  4, 84, 50,128,\n      4, 85, 51,128,  4, 86, 52,128,  4, 87, 53,128,  4, 88, 54,128,\n      4, 89, 55,128,  4, 90, 56,128,  4, 91, 57,128,  4, 92,177, 48,\n    128,  4, 94, 52,  4, 45,173, 45,177, 45,181, 45,185, 53,128,  4,\n     15, 54,128,  4, 98, 55,128,  4,114, 56,128,  4,116, 57,  5, 45,\n    201, 45,205, 45,209, 45,213, 45,217, 50,128,246,198, 51,128,  4,\n     95, 52,128,  4, 99, 53,128,  4,115, 54,128,  4,117, 56,  2, 45,\n    227, 45,241, 51,  2, 45,233, 45,237, 49,128,246,199, 50,128,246,\n    200,180, 54,128,  4,217,178,185, 57,128, 32, 14,179, 48,  2, 46,\n      3, 46,  7, 48,128, 32, 15, 49,128, 32, 13,181, 55,  7, 46, 28,\n     46, 98, 47,163, 47,240, 48,197, 49, 34, 49,105, 51,  2, 46, 34,\n     46, 48, 56,  2, 46, 40, 46, 44, 49,128,  6,106, 56,128,  6, 12,\n     57,  8, 46, 66, 46, 70, 46, 74, 46, 78, 46, 82, 46, 86, 46, 90,\n     46, 94, 50,128,  6, 96, 51,128,  6, 97, 52,128,  6, 98, 53,128,\n      6, 99, 54,128,  6,100, 55,128,  6,101, 56,128,  6,102, 57,128,\n      6,103, 52,  7, 46,114, 46,146, 46,208, 47, 14, 47, 46, 47,102,\n     47,158, 48,  5, 46,126, 46,130, 46,134, 46,138, 46,142, 48,128,\n      6,104, 49,128,  6,105, 51,128,  6, 27, 55,128,  6, 31, 57,128,\n      6, 33, 49, 10, 46,168, 46,172, 46,176, 46,180, 46,184, 46,188,\n     46,192, 46,196, 46,200, 46,204, 48,128,  6, 34, 49,128,  6, 35,\n     50,128,  6, 36, 51,128,  6, 37, 52,128,  6, 38, 53,128,  6, 39,\n     54,128,  6, 40, 55,128,  6, 41, 56,128,  6, 42, 57,128,  6, 43,\n     50, 10, 46,230, 46,234, 46,238, 46,242, 46,246, 46,250, 46,254,\n     47,  2, 47,  6, 47, 10, 48,128,  6, 44, 49,128,  6, 45, 50,128,\n      6, 46, 51,128,  6, 47, 52,128,  6, 48, 53,128,  6, 49, 54,128,\n      6, 50, 55,128,  6, 51, 56,128,  6, 52, 57,128,  6, 53, 51,  5,\n     47, 26, 47, 30, 47, 34, 47, 38, 47, 42, 48,128,  6, 54, 49,128,\n      6, 55, 50,128,  6, 56, 51,128,  6, 57, 52,128,  6, 58, 52,  9,\n     47, 66, 47, 70, 47, 74, 47, 78, 47, 82, 47, 86, 47, 90, 47, 94,\n     47, 98, 48,128,  6, 64, 49,128,  6, 65, 50,128,  6, 66, 51,128,\n      6, 67, 52,128,  6, 68, 53,128,  6, 69, 54,128,  6, 70, 56,128,\n      6, 72, 57,128,  6, 73, 53,  9, 47,122, 47,126, 47,130, 47,134,\n     47,138, 47,142, 47,146, 47,150, 47,154, 48,128,  6, 74, 49,128,\n      6, 75, 50,128,  6, 76, 51,128,  6, 77, 52,128,  6, 78, 53,128,\n      6, 79, 54,128,  6, 80, 55,128,  6, 81, 56,128,  6, 82,183, 48,\n    128,  6, 71, 53,  3, 47,171, 47,203, 47,235, 48,  5, 47,183, 47,\n    187, 47,191, 47,195, 47,199, 53,128,  6,164, 54,128,  6,126, 55,\n    128,  6,134, 56,128,  6,152, 57,128,  6,175, 49,  5, 47,215, 47,\n    219, 47,223, 47,227, 47,231, 49,128,  6,121, 50,128,  6,136, 51,\n    128,  6,145, 52,128,  6,186, 57,128,  6,210,179, 52,128,  6,213,\n     54,  7, 48,  0, 48,  5, 48, 10, 48, 15, 48, 53, 48,115, 48,177,\n    179, 54,128, 32,170,180, 53,128,  5,190,181, 56,128,  5,195, 54,\n      6, 48, 29, 48, 33, 48, 37, 48, 41, 48, 45, 48, 49, 52,128,  5,\n    208, 53,128,  5,209, 54,128,  5,210, 55,128,  5,211, 56,128,  5,\n    212, 57,128,  5,213, 55, 10, 48, 75, 48, 79, 48, 83, 48, 87, 48,\n     91, 48, 95, 48, 99, 48,103, 48,107, 48,111, 48,128,  5,214, 49,\n    128,  5,215, 50,128,  5,216, 51,128,  5,217, 52,128,  5,218, 53,\n    128,  5,219, 54,128,  5,220, 55,128,  5,221, 56,128,  5,222, 57,\n    128,  5,223, 56, 10, 48,137, 48,141, 48,145, 48,149, 48,153, 48,\n    157, 48,161, 48,165, 48,169, 48,173, 48,128,  5,224, 49,128,  5,\n    225, 50,128,  5,226, 51,128,  5,227, 52,128,  5,228, 53,128,  5,\n    229, 54,128,  5,230, 55,128,  5,231, 56,128,  5,232, 57,128,  5,\n    233, 57,  3, 48,185, 48,189, 48,193, 48,128,  5,234, 52,128,251,\n     42, 53,128,251, 43, 55,  4, 48,207, 48,221, 48,241, 48,246, 48,\n      2, 48,213, 48,217, 48,128,251, 75, 53,128,251, 31, 49,  3, 48,\n    229, 48,233, 48,237, 54,128,  5,240, 55,128,  5,241, 56,128,  5,\n    242,178, 51,128,251, 53, 57,  7, 49,  6, 49, 10, 49, 14, 49, 18,\n     49, 22, 49, 26, 49, 30, 51,128,  5,180, 52,128,  5,181, 53,128,\n      5,182, 54,128,  5,187, 55,128,  5,184, 56,128,  5,183, 57,128,\n      5,176, 56,  3, 49, 42, 49, 86, 49, 91, 48,  7, 49, 58, 49, 62,\n     49, 66, 49, 70, 49, 74, 49, 78, 49, 82, 48,128,  5,178, 49,128,\n      5,177, 50,128,  5,179, 51,128,  5,194, 52,128,  5,193, 54,128,\n      5,185, 55,128,  5,188,179, 57,128,  5,189, 52,  2, 49, 97, 49,\n    101, 49,128,  5,191, 50,128,  5,192,185,178, 57,128,  2,188, 54,\n      3, 49,119, 49,178, 49,185, 49,  4, 49,129, 49,145, 49,151, 49,\n    172, 50,  2, 49,135, 49,140,180, 56,128, 33,  5,184, 57,128, 33,\n     19,179,181, 50,128, 33, 22,181, 55,  3, 49,160, 49,164, 49,168,\n     51,128, 32, 44, 52,128, 32, 45, 53,128, 32, 46,182,182, 52,128,\n     32, 12,179,177,182, 55,128,  6,109,180,185,179, 55,128,  2,189,\n    103,  2, 49,198, 49,205,242,225,246,101,128,  0,224,117,  2, 49,\n    211, 49,220,234,225,242,225,244,105,128, 10,133,242,237,245,235,\n    232,105,128, 10,  5,104,  2, 49,235, 49,245,233,242,225,231,225,\n    238, 97,128, 48, 66,239,239,235,225,226,239,246,101,128, 30,163,\n    105,  7, 50, 16, 50, 41, 50, 48, 50, 60, 50, 85, 50,101, 50,181,\n     98,  2, 50, 22, 50, 31,229,238,231,225,236,105,128,  9,144,239,\n    240,239,237,239,230,111,128, 49, 30,228,229,246, 97,128,  9, 16,\n    229,227,249,242,233,236,236,233, 99,128,  4,213,231,117,  2, 50,\n     67, 50, 76,234,225,242,225,244,105,128, 10,144,242,237,245,235,\n    232,105,128, 10, 16,237,225,244,242,225,231,245,242,237,245,235,\n    232,105,128, 10, 72,110,  5, 50,113, 50,122, 50,136, 50,152, 50,\n    167,225,242,225,226,233, 99,128,  6, 57,230,233,238,225,236,225,\n    242,225,226,233, 99,128,254,202,233,238,233,244,233,225,236,225,\n    242,225,226,233, 99,128,254,203,237,229,228,233,225,236,225,242,\n    225,226,233, 99,128,254,204,246,229,242,244,229,228,226,242,229,\n    246,101,128,  2,  3,246,239,247,229,236,243,233,231,110,  3, 50,\n    197, 50,207, 50,214,226,229,238,231,225,236,105,128,  9,200,228,\n    229,246, 97,128,  9, 72,231,245,234,225,242,225,244,105,128, 10,\n    200,107,  2, 50,231, 50,255,225,244,225,235,225,238, 97,129, 48,\n    162, 50,243,232,225,236,230,247,233,228,244,104,128,255,113,239,\n    242,229,225,110,128, 49, 79,108,  3, 51, 15, 52, 71, 52, 80,101,\n      2, 51, 21, 52, 66,102,136,  5,208, 51, 41, 51, 50, 51, 65, 51,\n     79, 51,168, 51,182, 52, 37, 52, 51,225,242,225,226,233, 99,128,\n      6, 39,228,225,231,229,243,232,232,229,226,242,229,119,128,251,\n     48,230,233,238,225,236,225,242,225,226,233, 99,128,254,142,104,\n      2, 51, 85, 51,160,225,237,250, 97,  2, 51, 94, 51,127,225,226,\n    239,246,101,  2, 51,104, 51,113,225,242,225,226,233, 99,128,  6,\n     35,230,233,238,225,236,225,242,225,226,233, 99,128,254,132,226,\n    229,236,239,119,  2, 51,137, 51,146,225,242,225,226,233, 99,128,\n      6, 37,230,233,238,225,236,225,242,225,226,233, 99,128,254,136,\n    229,226,242,229,119,128,  5,208,236,225,237,229,228,232,229,226,\n    242,229,119,128,251, 79,237, 97,  2, 51,189, 51,225,228,228,225,\n    225,226,239,246,101,  2, 51,202, 51,211,225,242,225,226,233, 99,\n    128,  6, 34,230,233,238,225,236,225,242,225,226,233, 99,128,254,\n    130,235,243,245,242, 97,  4, 51,239, 51,248, 52,  6, 52, 22,225,\n    242,225,226,233, 99,128,  6, 73,230,233,238,225,236,225,242,225,\n    226,233, 99,128,254,240,233,238,233,244,233,225,236,225,242,225,\n    226,233, 99,128,254,243,237,229,228,233,225,236,225,242,225,226,\n    233, 99,128,254,244,240,225,244,225,232,232,229,226,242,229,119,\n    128,251, 46,241,225,237,225,244,243,232,229,226,242,229,119,128,\n    251, 47,240,104,128, 33, 53,236,229,241,245,225,108,128, 34, 76,\n    240,232, 97,129,  3,177, 52, 88,244,239,238,239,115,128,  3,172,\n    109,  4, 52,106, 52,114, 52,125, 52,159,225,227,242,239,110,128,\n      1,  1,239,238,239,243,240,225,227,101,128,255, 65,240,229,242,\n    243,225,238,100,130,  0, 38, 52,139, 52,151,237,239,238,239,243,\n    240,225,227,101,128,255,  6,243,237,225,236,108,128,247, 38,243,\n    241,245,225,242,101,128, 51,194,110,  4, 52,178, 52,189, 53, 55,\n     53, 65,226,239,240,239,237,239,230,111,128, 49, 34,103,  4, 52,\n    199, 52,210, 52,224, 53, 47,226,239,240,239,237,239,230,111,128,\n     49, 36,235,232,225,238,235,232,245,244,232,225,105,128, 14, 90,\n    236,101,131, 34, 32, 52,235, 53, 32, 53, 39,226,242,225,227,235,\n    229,116,  2, 52,247, 53, 11,236,229,230,116,129, 48,  8, 53,  0,\n    246,229,242,244,233,227,225,108,128,254, 63,242,233,231,232,116,\n    129, 48,  9, 53, 21,246,229,242,244,233,227,225,108,128,254, 64,\n    236,229,230,116,128, 35, 41,242,233,231,232,116,128, 35, 42,243,\n    244,242,239,109,128, 33, 43,239,244,229,236,229,233, 97,128,  3,\n    135,117,  2, 53, 71, 53, 83,228,225,244,244,225,228,229,246, 97,\n    128,  9, 82,243,246,225,242, 97,  3, 53, 95, 53,105, 53,112,226,\n    229,238,231,225,236,105,128,  9,130,228,229,246, 97,128,  9,  2,\n    231,245,234,225,242,225,244,105,128, 10,130,239,231,239,238,229,\n    107,128,  1,  5,112,  3, 53,140, 53,164, 53,194, 97,  2, 53,146,\n     53,158,225,244,239,243,241,245,225,242,101,128, 51,  0,242,229,\n    110,128, 36,156,239,243,244,242,239,240,232,101,  2, 53,177, 53,\n    188,225,242,237,229,238,233,225,110,128,  5, 90,237,239,100,128,\n      2,188,112,  2, 53,200, 53,205,236,101,128,248,255,242,111,  2,\n     53,212, 53,220,225,227,232,229,115,128, 34, 80,120,  2, 53,226,\n     53,246,229,241,245,225,108,129, 34, 72, 53,236,239,242,233,237,\n    225,231,101,128, 34, 82,233,237,225,244,229,236,249,229,241,245,\n    225,108,128, 34, 69,114,  4, 54, 15, 54, 42, 54, 46, 54, 91,225,\n    229, 97,  2, 54, 23, 54, 33,229,235,239,242,229,225,110,128, 49,\n    142,235,239,242,229,225,110,128, 49,141, 99,128, 35, 18,105,  2,\n     54, 52, 54, 66,231,232,244,232,225,236,230,242,233,238,103,128,\n     30,154,238,103,130,  0,229, 54, 75, 54, 83,225,227,245,244,101,\n    128,  1,251,226,229,236,239,119,128, 30,  1,242,239,119,  8, 54,\n    111, 54,118, 54,247, 55, 57, 55,107, 55,162, 55,185, 56,  4,226,\n    239,244,104,128, 33,148,100,  3, 54,126, 54,165, 54,212,225,243,\n    104,  4, 54,138, 54,145, 54,152, 54,160,228,239,247,110,128, 33,\n    227,236,229,230,116,128, 33,224,242,233,231,232,116,128, 33,226,\n    245,112,128, 33,225,226,108,  5, 54,178, 54,185, 54,192, 54,199,\n     54,207,226,239,244,104,128, 33,212,228,239,247,110,128, 33,211,\n    236,229,230,116,128, 33,208,242,233,231,232,116,128, 33,210,245,\n    112,128, 33,209,239,247,110,131, 33,147, 54,224, 54,231, 54,239,\n    236,229,230,116,128, 33,153,242,233,231,232,116,128, 33,152,247,\n    232,233,244,101,128, 33,233,104,  2, 54,253, 55, 48,229,225,100,\n      4, 55,  9, 55, 19, 55, 29, 55, 40,228,239,247,238,237,239,100,\n    128,  2,197,236,229,230,244,237,239,100,128,  2,194,242,233,231,\n    232,244,237,239,100,128,  2,195,245,240,237,239,100,128,  2,196,\n    239,242,233,250,229,120,128,248,231,236,229,230,116,131, 33,144,\n     55, 70, 55, 87, 55, 99,228,226,108,129, 33,208, 55, 78,243,244,\n    242,239,235,101,128, 33,205,239,246,229,242,242,233,231,232,116,\n    128, 33,198,247,232,233,244,101,128, 33,230,242,233,231,232,116,\n    132, 33,146, 55,123, 55,135, 55,143, 55,154,228,226,236,243,244,\n    242,239,235,101,128, 33,207,232,229,225,246,121,128, 39,158,239,\n    246,229,242,236,229,230,116,128, 33,196,247,232,233,244,101,128,\n     33,232,244,225, 98,  2, 55,170, 55,177,236,229,230,116,128, 33,\n    228,242,233,231,232,116,128, 33,229,245,112,132, 33,145, 55,198,\n     55,226, 55,244, 55,252,100,  2, 55,204, 55,216,110,129, 33,149,\n     55,210,226,243,101,128, 33,168,239,247,238,226,225,243,101,128,\n     33,168,236,229,230,116,129, 33,150, 55,235,239,230,228,239,247,\n    110,128, 33,197,242,233,231,232,116,128, 33,151,247,232,233,244,\n    101,128, 33,231,246,229,242,244,229,120,128,248,230,115,  5, 56,\n     25, 56,101, 56,146, 56,229, 56,239, 99,  2, 56, 31, 56, 83,233,\n    105,  2, 56, 38, 56, 61,227,233,242,227,245,109,129,  0, 94, 56,\n     49,237,239,238,239,243,240,225,227,101,128,255, 62,244,233,236,\n    228,101,129,  0,126, 56, 71,237,239,238,239,243,240,225,227,101,\n    128,255, 94,242,233,240,116,129,  2, 81, 56, 92,244,245,242,238,\n    229,100,128,  2, 82,237,225,236,108,  2, 56,110, 56,121,232,233,\n    242,225,231,225,238, 97,128, 48, 65,235,225,244,225,235,225,238,\n     97,129, 48,161, 56,134,232,225,236,230,247,233,228,244,104,128,\n    255,103,244,229,242,233,115,  2, 56,156, 56,225,107,131,  0, 42,\n     56,166, 56,194, 56,217, 97,  2, 56,172, 56,186,236,244,239,238,\n    229,225,242,225,226,233, 99,128,  6,109,242,225,226,233, 99,128,\n      6,109,109,  2, 56,200, 56,206,225,244,104,128, 34, 23,239,238,\n    239,243,240,225,227,101,128,255, 10,243,237,225,236,108,128,254,\n     97,109,128, 32, 66,245,240,229,242,233,239,114,128,246,233,249,\n    237,240,244,239,244,233,227,225,236,236,249,229,241,245,225,108,\n    128, 34, 67,116,132,  0, 64, 57, 15, 57, 22, 57, 34, 57, 42,233,\n    236,228,101,128,  0,227,237,239,238,239,243,240,225,227,101,128,\n    255, 32,243,237,225,236,108,128,254,107,245,242,238,229,100,128,\n      2, 80,117,  6, 57, 64, 57, 89, 57, 96, 57,121, 57,141, 57,157,\n     98,  2, 57, 70, 57, 79,229,238,231,225,236,105,128,  9,148,239,\n    240,239,237,239,230,111,128, 49, 32,228,229,246, 97,128,  9, 20,\n    231,117,  2, 57,103, 57,112,234,225,242,225,244,105,128, 10,148,\n    242,237,245,235,232,105,128, 10, 20,236,229,238,231,244,232,237,\n    225,242,235,226,229,238,231,225,236,105,128,  9,215,237,225,244,\n    242,225,231,245,242,237,245,235,232,105,128, 10, 76,246,239,247,\n    229,236,243,233,231,110,  3, 57,173, 57,183, 57,190,226,229,238,\n    231,225,236,105,128,  9,204,228,229,246, 97,128,  9, 76,231,245,\n    234,225,242,225,244,105,128, 10,204,246,225,231,242,225,232,225,\n    228,229,246, 97,128,  9, 61,121,  2, 57,221, 57,233,226,225,242,\n    237,229,238,233,225,110,128,  5, 97,233,110,130,  5,226, 57,242,\n     58,  1,225,236,244,239,238,229,232,229,226,242,229,119,128,251,\n     32,232,229,226,242,229,119,128,  5,226, 98,144,  0, 98, 58, 46,\n     58,181, 58,192, 58,201, 58,226, 60, 11, 60, 73, 60,146, 62, 72,\n     62, 84, 62,127, 62,135, 62,145, 64, 15, 64, 39, 64, 48, 97,  7,\n     58, 62, 58, 72, 58, 96, 58,103, 58,128, 58,152, 58,163,226,229,\n    238,231,225,236,105,128,  9,172,227,235,243,236,225,243,104,129,\n      0, 92, 58, 84,237,239,238,239,243,240,225,227,101,128,255, 60,\n    228,229,246, 97,128,  9, 44,231,117,  2, 58,110, 58,119,234,225,\n    242,225,244,105,128, 10,172,242,237,245,235,232,105,128, 10, 44,\n    104,  2, 58,134, 58,144,233,242,225,231,225,238, 97,128, 48,112,\n    244,244,232,225,105,128, 14, 63,235,225,244,225,235,225,238, 97,\n    128, 48,208,114,129,  0,124, 58,169,237,239,238,239,243,240,225,\n    227,101,128,255, 92,226,239,240,239,237,239,230,111,128, 49,  5,\n    227,233,242,227,236,101,128, 36,209,228,239,116,  2, 58,209, 58,\n    218,225,227,227,229,238,116,128, 30,  3,226,229,236,239,119,128,\n     30,  5,101,  6, 58,240, 59,  5, 59, 28, 59,170, 59,181, 59,193,\n    225,237,229,228,243,233,248,244,229,229,238,244,232,238,239,244,\n    229,115,128, 38,108, 99,  2, 59, 11, 59, 18,225,245,243,101,128,\n     34, 53,249,242,233,236,236,233, 99,128,  4, 49,104,  5, 59, 40,\n     59, 49, 59, 63, 59, 93, 59,152,225,242,225,226,233, 99,128,  6,\n     40,230,233,238,225,236,225,242,225,226,233, 99,128,254,144,105,\n      2, 59, 69, 59, 84,238,233,244,233,225,236,225,242,225,226,233,\n     99,128,254,145,242,225,231,225,238, 97,128, 48,121,237,101,  2,\n     59,100, 59,113,228,233,225,236,225,242,225,226,233, 99,128,254,\n    146,229,237,105,  2, 59,121, 59,136,238,233,244,233,225,236,225,\n    242,225,226,233, 99,128,252,159,243,239,236,225,244,229,228,225,\n    242,225,226,233, 99,128,252,  8,238,239,239,238,230,233,238,225,\n    236,225,242,225,226,233, 99,128,252,109,235,225,244,225,235,225,\n    238, 97,128, 48,217,238,225,242,237,229,238,233,225,110,128,  5,\n     98,116,132,  5,209, 59,205, 59,225, 59,245, 59,254, 97,129,  3,\n    178, 59,211,243,249,237,226,239,236,231,242,229,229,107,128,  3,\n    208,228,225,231,229,243,104,129,251, 49, 59,236,232,229,226,242,\n    229,119,128,251, 49,232,229,226,242,229,119,128,  5,209,242,225,\n    230,229,232,229,226,242,229,119,128,251, 76,104,  2, 60, 17, 60,\n     67, 97,  3, 60, 25, 60, 35, 60, 42,226,229,238,231,225,236,105,\n    128,  9,173,228,229,246, 97,128,  9, 45,231,117,  2, 60, 49, 60,\n     58,234,225,242,225,244,105,128, 10,173,242,237,245,235,232,105,\n    128, 10, 45,239,239,107,128,  2, 83,105,  5, 60, 85, 60, 96, 60,\n    107, 60,121, 60,135,232,233,242,225,231,225,238, 97,128, 48,115,\n    235,225,244,225,235,225,238, 97,128, 48,211,236,225,226,233,225,\n    236,227,236,233,227,107,128,  2,152,238,228,233,231,245,242,237,\n    245,235,232,105,128, 10,  2,242,245,243,241,245,225,242,101,128,\n     51, 49,108,  3, 60,154, 62, 55, 62, 66, 97,  2, 60,160, 62, 50,\n    227,107,  6, 60,175, 60,184, 60,221, 61,114, 61,169, 61,221,227,\n    233,242,227,236,101,128, 37,207,100,  2, 60,190, 60,199,233,225,\n    237,239,238,100,128, 37,198,239,247,238,240,239,233,238,244,233,\n    238,231,244,242,233,225,238,231,236,101,128, 37,188,108,  2, 60,\n    227, 61, 74,101,  2, 60,233, 61, 13,230,244,240,239,233,238,244,\n    233,238,103,  2, 60,248, 61,  2,240,239,233,238,244,229,114,128,\n     37,196,244,242,233,225,238,231,236,101,128, 37,192,238,244,233,\n    227,245,236,225,242,226,242,225,227,235,229,116,  2, 61, 33, 61,\n     53,236,229,230,116,129, 48, 16, 61, 42,246,229,242,244,233,227,\n    225,108,128,254, 59,242,233,231,232,116,129, 48, 17, 61, 63,246,\n    229,242,244,233,227,225,108,128,254, 60,239,247,229,114,  2, 61,\n     83, 61, 98,236,229,230,244,244,242,233,225,238,231,236,101,128,\n     37,227,242,233,231,232,244,244,242,233,225,238,231,236,101,128,\n     37,226,114,  2, 61,120, 61,131,229,227,244,225,238,231,236,101,\n    128, 37,172,233,231,232,244,240,239,233,238,244,233,238,103,  2,\n     61,148, 61,158,240,239,233,238,244,229,114,128, 37,186,244,242,\n    233,225,238,231,236,101,128, 37,182,115,  3, 61,177, 61,207, 61,\n    215,109,  2, 61,183, 61,195,225,236,236,243,241,245,225,242,101,\n    128, 37,170,233,236,233,238,231,230,225,227,101,128, 38, 59,241,\n    245,225,242,101,128, 37,160,244,225,114,128, 38,  5,245,240,112,\n      2, 61,229, 62, 11,229,114,  2, 61,236, 61,251,236,229,230,244,\n    244,242,233,225,238,231,236,101,128, 37,228,242,233,231,232,244,\n    244,242,233,225,238,231,236,101,128, 37,229,239,233,238,244,233,\n    238,103,  2, 62, 23, 62, 39,243,237,225,236,236,244,242,233,225,\n    238,231,236,101,128, 37,180,244,242,233,225,238,231,236,101,128,\n     37,178,238,107,128, 36, 35,233,238,229,226,229,236,239,119,128,\n     30,  7,239,227,107,128, 37,136,237,239,238,239,243,240,225,227,\n    101,128,255, 66,111,  3, 62, 92, 62,105, 62,116,226,225,233,237,\n    225,233,244,232,225,105,128, 14, 26,232,233,242,225,231,225,238,\n     97,128, 48,124,235,225,244,225,235,225,238, 97,128, 48,220,240,\n    225,242,229,110,128, 36,157,241,243,241,245,225,242,101,128, 51,\n    195,114,  4, 62,155, 63,149, 63,222, 64,  5,225, 99,  2, 62,162,\n     63, 56,101,  3, 62,170, 62,175, 62,243,229,120,128,248,244,236,\n    229,230,116,133,  0,123, 62,192, 62,197, 62,219, 62,227, 62,232,\n    226,116,128,248,243,109,  2, 62,203, 62,208,233,100,128,248,242,\n    239,238,239,243,240,225,227,101,128,255, 91,243,237,225,236,108,\n    128,254, 91,244,112,128,248,241,246,229,242,244,233,227,225,108,\n    128,254, 55,242,233,231,232,116,133,  0,125, 63,  5, 63, 10, 63,\n     32, 63, 40, 63, 45,226,116,128,248,254,109,  2, 63, 16, 63, 21,\n    233,100,128,248,253,239,238,239,243,240,225,227,101,128,255, 93,\n    243,237,225,236,108,128,254, 92,244,112,128,248,252,246,229,242,\n    244,233,227,225,108,128,254, 56,235,229,116,  2, 63, 64, 63,106,\n    236,229,230,116,132,  0, 91, 63, 79, 63, 84, 63, 89, 63,101,226,\n    116,128,248,240,229,120,128,248,239,237,239,238,239,243,240,225,\n    227,101,128,255, 59,244,112,128,248,238,242,233,231,232,116,132,\n      0, 93, 63,122, 63,127, 63,132, 63,144,226,116,128,248,251,229,\n    120,128,248,250,237,239,238,239,243,240,225,227,101,128,255, 61,\n    244,112,128,248,249,229,246,101,131,  2,216, 63,161, 63,172, 63,\n    178,226,229,236,239,247,227,237, 98,128,  3, 46,227,237, 98,128,\n      3,  6,233,238,246,229,242,244,229,100,  3, 63,193, 63,204, 63,\n    210,226,229,236,239,247,227,237, 98,128,  3, 47,227,237, 98,128,\n      3, 17,228,239,245,226,236,229,227,237, 98,128,  3, 97,233,228,\n    231,101,  2, 63,231, 63,242,226,229,236,239,247,227,237, 98,128,\n      3, 42,233,238,246,229,242,244,229,228,226,229,236,239,247,227,\n    237, 98,128,  3, 58,239,235,229,238,226,225,114,128,  0,166,115,\n      2, 64, 21, 64, 29,244,242,239,235,101,128,  1,128,245,240,229,\n    242,233,239,114,128,246,234,244,239,240,226,225,114,128,  1,131,\n    117,  3, 64, 56, 64, 67, 64, 78,232,233,242,225,231,225,238, 97,\n    128, 48,118,235,225,244,225,235,225,238, 97,128, 48,214,236,108,\n      2, 64, 85, 64,115,229,116,130, 32, 34, 64, 94, 64,104,233,238,\n    246,229,242,243,101,128, 37,216,239,240,229,242,225,244,239,114,\n    128, 34, 25,243,229,249,101,128, 37,206, 99,143,  0, 99, 64,156,\n     65,105, 65,116, 65,180, 65,211, 66, 48, 67,215, 68,199, 69, 43,\n     69, 92, 72, 84, 72, 92, 72,102, 72,114, 72,147, 97,  9, 64,176,\n     64,187, 64,197, 64,204, 64,211, 64,236, 64,246, 65, 42, 65, 51,\n    225,242,237,229,238,233,225,110,128,  5,110,226,229,238,231,225,\n    236,105,128,  9,154,227,245,244,101,128,  1,  7,228,229,246, 97,\n    128,  9, 26,231,117,  2, 64,218, 64,227,234,225,242,225,244,105,\n    128, 10,154,242,237,245,235,232,105,128, 10, 26,236,243,241,245,\n    225,242,101,128, 51,136,238,228,242,225,226,233,238,228,117,  4,\n     65,  8, 65, 18, 65, 24, 65, 31,226,229,238,231,225,236,105,128,\n      9,129,227,237, 98,128,  3, 16,228,229,246, 97,128,  9,  1,231,\n    245,234,225,242,225,244,105,128, 10,129,240,243,236,239,227,107,\n    128, 33,234,114,  3, 65, 59, 65, 65, 65, 91,229,239,102,128, 33,\n      5,239,110,130,  2,199, 65, 74, 65, 85,226,229,236,239,247,227,\n    237, 98,128,  3, 44,227,237, 98,128,  3, 12,242,233,225,231,229,\n    242,229,244,245,242,110,128, 33,181,226,239,240,239,237,239,230,\n    111,128, 49, 24, 99,  4, 65,126, 65,133, 65,152, 65,174,225,242,\n    239,110,128,  1, 13,229,228,233,236,236, 97,129,  0,231, 65,144,\n    225,227,245,244,101,128, 30,  9,233,242, 99,  2, 65,160, 65,165,\n    236,101,128, 36,210,245,237,230,236,229,120,128,  1,  9,245,242,\n    108,128,  2, 85,100,  2, 65,186, 65,202,239,116,129,  1, 11, 65,\n    193,225,227,227,229,238,116,128,  1, 11,243,241,245,225,242,101,\n    128, 51,197,101,  2, 65,217, 65,233,228,233,236,236, 97,129,  0,\n    184, 65,227,227,237, 98,128,  3, 39,238,116,132,  0,162, 65,246,\n     66, 14, 66, 26, 66, 37,105,  2, 65,252, 66,  4,231,242,225,228,\n    101,128, 33,  3,238,230,229,242,233,239,114,128,246,223,237,239,\n    238,239,243,240,225,227,101,128,255,224,239,236,228,243,244,249,\n    236,101,128,247,162,243,245,240,229,242,233,239,114,128,246,224,\n    104,  5, 66, 60, 66,123, 66,134, 67, 62, 67,154, 97,  4, 66, 70,\n     66, 81, 66, 91, 66, 98,225,242,237,229,238,233,225,110,128,  5,\n    121,226,229,238,231,225,236,105,128,  9,155,228,229,246, 97,128,\n      9, 27,231,117,  2, 66,105, 66,114,234,225,242,225,244,105,128,\n     10,155,242,237,245,235,232,105,128, 10, 27,226,239,240,239,237,\n    239,230,111,128, 49, 20,101,  6, 66,148, 66,168, 66,192, 67,  4,\n     67, 16, 67, 37,225,226,235,232,225,243,233,225,238,227,249,242,\n    233,236,236,233, 99,128,  4,189, 99,  2, 66,174, 66,182,235,237,\n    225,242,107,128, 39, 19,249,242,233,236,236,233, 99,128,  4, 71,\n    100,  2, 66,198, 66,242,229,243,227,229,238,228,229,114,  2, 66,\n    211, 66,231,225,226,235,232,225,243,233,225,238,227,249,242,233,\n    236,236,233, 99,128,  4,191,227,249,242,233,236,236,233, 99,128,\n      4,183,233,229,242,229,243,233,243,227,249,242,233,236,236,233,\n     99,128,  4,245,232,225,242,237,229,238,233,225,110,128,  5,115,\n    235,232,225,235,225,243,243,233,225,238,227,249,242,233,236,236,\n    233, 99,128,  4,204,246,229,242,244,233,227,225,236,243,244,242,\n    239,235,229,227,249,242,233,236,236,233, 99,128,  4,185,105,129,\n      3,199, 67, 68,229,245,227,104,  4, 67, 81, 67,116, 67,131, 67,\n    140, 97,  2, 67, 87, 67,102,227,233,242,227,236,229,235,239,242,\n    229,225,110,128, 50,119,240,225,242,229,238,235,239,242,229,225,\n    110,128, 50, 23,227,233,242,227,236,229,235,239,242,229,225,110,\n    128, 50,105,235,239,242,229,225,110,128, 49, 74,240,225,242,229,\n    238,235,239,242,229,225,110,128, 50,  9,111,  2, 67,160, 67,210,\n    227,104,  3, 67,169, 67,191, 67,201,225,110,  2, 67,176, 67,184,\n    231,244,232,225,105,128, 14, 10,244,232,225,105,128, 14,  8,233,\n    238,231,244,232,225,105,128, 14,  9,239,229,244,232,225,105,128,\n     14, 12,239,107,128,  1,136,105,  2, 67,221, 68, 67,229,245, 99,\n      5, 67,235, 68, 14, 68, 29, 68, 38, 68, 52, 97,  2, 67,241, 68,\n      0,227,233,242,227,236,229,235,239,242,229,225,110,128, 50,118,\n    240,225,242,229,238,235,239,242,229,225,110,128, 50, 22,227,233,\n    242,227,236,229,235,239,242,229,225,110,128, 50,104,235,239,242,\n    229,225,110,128, 49, 72,240,225,242,229,238,235,239,242,229,225,\n    110,128, 50,  8,245,240,225,242,229,238,235,239,242,229,225,110,\n    128, 50, 28,242, 99,  2, 68, 74, 68,169,236,101,132, 37,203, 68,\n     87, 68, 98, 68,103, 68,127,237,245,236,244,233,240,236,121,128,\n     34,151,239,116,128, 34,153,112,  2, 68,109, 68,115,236,245,115,\n    128, 34,149,239,243,244,225,236,237,225,242,107,128, 48, 54,247,\n    233,244,104,  2, 68,136, 68,152,236,229,230,244,232,225,236,230,\n    226,236,225,227,107,128, 37,208,242,233,231,232,244,232,225,236,\n    230,226,236,225,227,107,128, 37,209,245,237,230,236,229,120,130,\n      2,198, 68,182, 68,193,226,229,236,239,247,227,237, 98,128,  3,\n     45,227,237, 98,128,  3,  2,108,  3, 68,207, 68,213, 69, 11,229,\n    225,114,128, 35, 39,233,227,107,  4, 68,225, 68,236, 68,245, 68,\n    255,225,236,246,229,239,236,225,114,128,  1,194,228,229,238,244,\n    225,108,128,  1,192,236,225,244,229,242,225,108,128,  1,193,242,\n    229,244,242,239,230,236,229,120,128,  1,195,245, 98,129, 38, 99,\n     69, 18,243,245,233,116,  2, 69, 27, 69, 35,226,236,225,227,107,\n    128, 38, 99,247,232,233,244,101,128, 38,103,109,  3, 69, 51, 69,\n     65, 69, 76,227,245,226,229,228,243,241,245,225,242,101,128, 51,\n    164,239,238,239,243,240,225,227,101,128,255, 67,243,241,245,225,\n    242,229,228,243,241,245,225,242,101,128, 51,160,111,  8, 69,110,\n     69,121, 69,208, 70,150, 71,179, 71,210, 72, 61, 72, 70,225,242,\n    237,229,238,233,225,110,128,  5,129,236,239,110,131,  0, 58, 69,\n    133, 69,158, 69,177,237,239,110,  2, 69,141, 69,149,229,244,225,\n    242,121,128, 32,161,239,243,240,225,227,101,128,255, 26,115,  2,\n     69,164, 69,170,233,231,110,128, 32,161,237,225,236,108,128,254,\n     85,244,242,233,225,238,231,245,236,225,114,  2, 69,192, 69,202,\n    232,225,236,230,237,239,100,128,  2,209,237,239,100,128,  2,208,\n    109,  2, 69,214, 70,143,237, 97,134,  0, 44, 69,231, 70, 39, 70,\n     50, 70, 62, 70, 92, 70,115, 97,  3, 69,239, 70,  9, 70, 17,226,\n    239,246,101,  2, 69,248, 69,254,227,237, 98,128,  3, 19,242,233,\n    231,232,244,227,237, 98,128,  3, 21,227,227,229,238,116,128,246,\n    195,114,  2, 70, 23, 70, 30,225,226,233, 99,128,  6, 12,237,229,\n    238,233,225,110,128,  5, 93,233,238,230,229,242,233,239,114,128,\n    246,225,237,239,238,239,243,240,225,227,101,128,255, 12,242,229,\n    246,229,242,243,229,100,  2, 70, 75, 70, 86,225,226,239,246,229,\n    227,237, 98,128,  3, 20,237,239,100,128,  2,189,115,  2, 70, 98,\n     70,105,237,225,236,108,128,254, 80,245,240,229,242,233,239,114,\n    128,246,226,244,245,242,238,229,100,  2, 70,126, 70,137,225,226,\n    239,246,229,227,237, 98,128,  3, 18,237,239,100,128,  2,187,240,\n    225,243,115,128, 38, 60,110,  2, 70,156, 70,165,231,242,245,229,\n    238,116,128, 34, 69,116,  2, 70,171, 70,185,239,245,242,233,238,\n    244,229,231,242,225,108,128, 34, 46,242,239,108,142, 35,  3, 70,\n    219, 70,225, 70,240, 70,255, 71, 43, 71, 88, 71,102, 71,107, 71,\n    112, 71,117, 71,123, 71,128, 71,169, 71,174,193,195, 75,128,  0,\n      6, 66,  2, 70,231, 70,236,197, 76,128,  0,  7, 83,128,  0,  8,\n     67,  2, 70,246, 70,251,193, 78,128,  0, 24, 82,128,  0, 13, 68,\n      3, 71,  7, 71, 33, 71, 38, 67,  4, 71, 17, 71, 21, 71, 25, 71,\n     29, 49,128,  0, 17, 50,128,  0, 18, 51,128,  0, 19, 52,128,  0,\n     20,197, 76,128,  0,127,204, 69,128,  0, 16, 69,  5, 71, 55, 71,\n     59, 71, 64, 71, 69, 71, 74, 77,128,  0, 25,206, 81,128,  0,  5,\n    207, 84,128,  0,  4,211, 67,128,  0, 27, 84,  2, 71, 80, 71, 84,\n     66,128,  0, 23, 88,128,  0,  3, 70,  2, 71, 94, 71, 98, 70,128,\n      0, 12, 83,128,  0, 28,199, 83,128,  0, 29,200, 84,128,  0,  9,\n    204, 70,128,  0, 10,206,193, 75,128,  0, 21,210, 83,128,  0, 30,\n     83,  5, 71,140, 71,144, 71,154, 71,159, 71,164, 73,128,  0, 15,\n     79,129,  0, 14, 71,150, 84,128,  0,  2,212, 88,128,  0,  1,213,\n     66,128,  0, 26,217, 78,128,  0, 22,213, 83,128,  0, 31,214, 84,\n    128,  0, 11,240,249,242,233,231,232,116,129,  0,169, 71,191,115,\n      2, 71,197, 71,203,225,238,115,128,248,233,229,242,233,102,128,\n    246,217,114,  2, 71,216, 72, 44,238,229,242,226,242,225,227,235,\n    229,116,  2, 71,231, 72,  9,236,229,230,116,130, 48, 12, 71,242,\n     71,254,232,225,236,230,247,233,228,244,104,128,255, 98,246,229,\n    242,244,233,227,225,108,128,254, 65,242,233,231,232,116,130, 48,\n     13, 72, 21, 72, 33,232,225,236,230,247,233,228,244,104,128,255,\n     99,246,229,242,244,233,227,225,108,128,254, 66,240,239,242,225,\n    244,233,239,238,243,241,245,225,242,101,128, 51,127,243,241,245,\n    225,242,101,128, 51,199,246,229,242,235,231,243,241,245,225,242,\n    101,128, 51,198,240,225,242,229,110,128, 36,158,242,245,250,229,\n    233,242,111,128, 32,162,243,244,242,229,244,227,232,229,100,128,\n      2,151,245,114,  2, 72,121, 72,139,236,121,  2, 72,128, 72,134,\n    225,238,100,128, 34,207,239,114,128, 34,206,242,229,238,227,121,\n    128,  0,164,249,114,  4, 72,158, 72,166, 72,173, 72,181,194,242,\n    229,246,101,128,246,209,198,236,229,120,128,246,210,226,242,229,\n    246,101,128,246,212,230,236,229,120,128,246,213,100,146,  0,100,\n     72,228, 74,110, 75,134, 75,194, 76,114, 77, 68, 77,130, 78, 59,\n     78, 72, 78, 81, 78,107, 78,132, 78,141, 79,208, 79,216, 79,227,\n     79,247, 80, 19, 97, 11, 72,252, 73,  7, 73, 17, 73, 89, 73,152,\n     73,163, 73,174, 73,243, 74, 49, 74, 55, 74, 85,225,242,237,229,\n    238,233,225,110,128,  5,100,226,229,238,231,225,236,105,128,  9,\n    166,100,  5, 73, 29, 73, 38, 73, 44, 73, 58, 73, 74,225,242,225,\n    226,233, 99,128,  6, 54,229,246, 97,128,  9, 38,230,233,238,225,\n    236,225,242,225,226,233, 99,128,254,190,233,238,233,244,233,225,\n    236,225,242,225,226,233, 99,128,254,191,237,229,228,233,225,236,\n    225,242,225,226,233, 99,128,254,192,103,  3, 73, 97, 73,114, 73,\n    128,229,243,104,129,  5,188, 73,105,232,229,226,242,229,119,128,\n      5,188,231,229,114,129, 32, 32, 73,122,228,226,108,128, 32, 33,\n    117,  2, 73,134, 73,143,234,225,242,225,244,105,128, 10,166,242,\n    237,245,235,232,105,128, 10, 38,232,233,242,225,231,225,238, 97,\n    128, 48, 96,235,225,244,225,235,225,238, 97,128, 48,192,108,  3,\n     73,182, 73,191, 73,229,225,242,225,226,233, 99,128,  6, 47,229,\n    116,130,  5,211, 73,200, 73,220,228,225,231,229,243,104,129,251,\n     51, 73,211,232,229,226,242,229,119,128,251, 51,232,229,226,242,\n    229,119,128,  5,211,230,233,238,225,236,225,242,225,226,233, 99,\n    128,254,170,237,237, 97,  3, 73,253, 74,  6, 74, 18,225,242,225,\n    226,233, 99,128,  6, 79,236,239,247,225,242,225,226,233, 99,128,\n      6, 79,244,225,238, 97,  2, 74, 27, 74, 41,236,244,239,238,229,\n    225,242,225,226,233, 99,128,  6, 76,242,225,226,233, 99,128,  6,\n     76,238,228, 97,128,  9,100,242,231, 97,  2, 74, 63, 74, 72,232,\n    229,226,242,229,119,128,  5,167,236,229,230,244,232,229,226,242,\n    229,119,128,  5,167,243,233,225,240,238,229,245,237,225,244,225,\n    227,249,242,233,236,236,233,227,227,237, 98,128,  4,133, 98,  3,\n     74,118, 75,115, 75,125,108,  9, 74,138, 74,146, 75,  3, 75, 11,\n     75, 27, 75, 38, 75, 56, 75, 70, 75, 81,199,242,225,246,101,128,\n    246,211, 97,  2, 74,152, 74,209,238,231,236,229,226,242,225,227,\n    235,229,116,  2, 74,168, 74,188,236,229,230,116,129, 48, 10, 74,\n    177,246,229,242,244,233,227,225,108,128,254, 61,242,233,231,232,\n    116,129, 48, 11, 74,198,246,229,242,244,233,227,225,108,128,254,\n     62,114,  2, 74,215, 74,236,227,232,233,238,246,229,242,244,229,\n    228,226,229,236,239,247,227,237, 98,128,  3, 43,242,239,119,  2,\n     74,244, 74,251,236,229,230,116,128, 33,212,242,233,231,232,116,\n    128, 33,210,228,225,238,228, 97,128,  9,101,231,242,225,246,101,\n    129,246,214, 75, 21,227,237, 98,128,  3, 15,233,238,244,229,231,\n    242,225,108,128, 34, 44,236,239,247,236,233,238,101,129, 32, 23,\n     75, 50,227,237, 98,128,  3, 51,239,246,229,242,236,233,238,229,\n    227,237, 98,128,  3, 63,240,242,233,237,229,237,239,100,128,  2,\n    186,246,229,242,244,233,227,225,108,  2, 75, 94, 75,100,226,225,\n    114,128, 32, 22,236,233,238,229,225,226,239,246,229,227,237, 98,\n    128,  3, 14,239,240,239,237,239,230,111,128, 49,  9,243,241,245,\n    225,242,101,128, 51,200, 99,  4, 75,144, 75,151, 75,160, 75,187,\n    225,242,239,110,128,  1, 15,229,228,233,236,236, 97,128, 30, 17,\n    233,242, 99,  2, 75,168, 75,173,236,101,128, 36,211,245,237,230,\n    236,229,248,226,229,236,239,119,128, 30, 19,242,239,225,116,128,\n      1, 17,100,  4, 75,204, 76, 29, 76, 39, 76, 90, 97,  4, 75,214,\n     75,224, 75,231, 76,  0,226,229,238,231,225,236,105,128,  9,161,\n    228,229,246, 97,128,  9, 33,231,117,  2, 75,238, 75,247,234,225,\n    242,225,244,105,128, 10,161,242,237,245,235,232,105,128, 10, 33,\n    108,  2, 76,  6, 76, 15,225,242,225,226,233, 99,128,  6,136,230,\n    233,238,225,236,225,242,225,226,233, 99,128,251,137,228,232,225,\n    228,229,246, 97,128,  9, 92,232, 97,  3, 76, 48, 76, 58, 76, 65,\n    226,229,238,231,225,236,105,128,  9,162,228,229,246, 97,128,  9,\n     34,231,117,  2, 76, 72, 76, 81,234,225,242,225,244,105,128, 10,\n    162,242,237,245,235,232,105,128, 10, 34,239,116,  2, 76, 97, 76,\n    106,225,227,227,229,238,116,128, 30, 11,226,229,236,239,119,128,\n     30, 13,101,  8, 76,132, 76,185, 76,192, 76,217, 76,227, 76,238,\n     77, 27, 77, 63, 99,  2, 76,138, 76,175,233,237,225,236,243,229,\n    240,225,242,225,244,239,114,  2, 76,156, 76,165,225,242,225,226,\n    233, 99,128,  6,107,240,229,242,243,233,225,110,128,  6,107,249,\n    242,233,236,236,233, 99,128,  4, 52,231,242,229,101,128,  0,176,\n    232,105,  2, 76,199, 76,208,232,229,226,242,229,119,128,  5,173,\n    242,225,231,225,238, 97,128, 48,103,233,227,239,240,244,233, 99,\n    128,  3,239,235,225,244,225,235,225,238, 97,128, 48,199,108,  2,\n     76,244, 77, 11,229,244,101,  2, 76,252, 77,  3,236,229,230,116,\n    128, 35, 43,242,233,231,232,116,128, 35, 38,244, 97,129,  3,180,\n     77, 18,244,245,242,238,229,100,128,  1,141,238,239,237,233,238,\n    225,244,239,242,237,233,238,245,243,239,238,229,238,245,237,229,\n    242,225,244,239,242,226,229,238,231,225,236,105,128,  9,248,250,\n    104,128,  2,164,104,  2, 77, 74, 77,124, 97,  3, 77, 82, 77, 92,\n     77, 99,226,229,238,231,225,236,105,128,  9,167,228,229,246, 97,\n    128,  9, 39,231,117,  2, 77,106, 77,115,234,225,242,225,244,105,\n    128, 10,167,242,237,245,235,232,105,128, 10, 39,239,239,107,128,\n      2, 87,105,  6, 77,144, 77,193, 77,253, 78,  8, 78, 19, 78, 29,\n     97,  2, 77,150, 77,172,236,249,244,233,235,225,244,239,238,239,\n    115,129,  3,133, 77,166,227,237, 98,128,  3, 68,237,239,238,100,\n    129, 38,102, 77,181,243,245,233,244,247,232,233,244,101,128, 38,\n     98,229,242,229,243,233,115,133,  0,168, 77,212, 77,220, 77,231,\n     77,237, 77,245,225,227,245,244,101,128,246,215,226,229,236,239,\n    247,227,237, 98,128,  3, 36,227,237, 98,128,  3,  8,231,242,225,\n    246,101,128,246,216,244,239,238,239,115,128,  3,133,232,233,242,\n    225,231,225,238, 97,128, 48, 98,235,225,244,225,235,225,238, 97,\n    128, 48,194,244,244,239,237,225,242,107,128, 48,  3,246,105,  2,\n     78, 36, 78, 47,228,101,129,  0,247, 78, 43,115,128, 34, 35,243,\n    233,239,238,243,236,225,243,104,128, 34, 21,234,229,227,249,242,\n    233,236,236,233, 99,128,  4, 82,235,243,232,225,228,101,128, 37,\n    147,108,  2, 78, 87, 78, 98,233,238,229,226,229,236,239,119,128,\n     30, 15,243,241,245,225,242,101,128, 51,151,109,  2, 78,113, 78,\n    121,225,227,242,239,110,128,  1, 17,239,238,239,243,240,225,227,\n    101,128,255, 68,238,226,236,239,227,107,128, 37,132,111, 10, 78,\n    163, 78,175, 78,185, 78,196, 78,207, 79, 23, 79, 28, 79, 39, 79,\n    154, 79,180,227,232,225,228,225,244,232,225,105,128, 14, 14,228,\n    229,235,244,232,225,105,128, 14, 20,232,233,242,225,231,225,238,\n     97,128, 48,105,235,225,244,225,235,225,238, 97,128, 48,201,236,\n    236,225,114,132,  0, 36, 78,222, 78,233, 78,245, 79,  0,233,238,\n    230,229,242,233,239,114,128,246,227,237,239,238,239,243,240,225,\n    227,101,128,255,  4,239,236,228,243,244,249,236,101,128,247, 36,\n    115,  2, 79,  6, 79, 13,237,225,236,108,128,254,105,245,240,229,\n    242,233,239,114,128,246,228,238,103,128, 32,171,242,245,243,241,\n    245,225,242,101,128, 51, 38,116,  6, 79, 53, 79, 70, 79, 92, 79,\n    103, 79,135, 79,142,225,227,227,229,238,116,129,  2,217, 79, 64,\n    227,237, 98,128,  3,  7,226,229,236,239,247, 99,  2, 79, 81, 79,\n     86,237, 98,128,  3, 35,239,237, 98,128,  3, 35,235,225,244,225,\n    235,225,238, 97,128, 48,251,236,229,243,115,  2, 79,112, 79,116,\n    105,128,  1, 49,106,129,246,190, 79,122,243,244,242,239,235,229,\n    232,239,239,107,128,  2,132,237,225,244,104,128, 34,197,244,229,\n    228,227,233,242,227,236,101,128, 37,204,245,226,236,229,249,239,\n    228,240,225,244,225,104,129,251, 31, 79,171,232,229,226,242,229,\n    119,128,251, 31,247,238,244,225,227,107,  2, 79,191, 79,202,226,\n    229,236,239,247,227,237, 98,128,  3, 30,237,239,100,128,  2,213,\n    240,225,242,229,110,128, 36,159,243,245,240,229,242,233,239,114,\n    128,246,235,116,  2, 79,233, 79,239,225,233,108,128,  2, 86,239,\n    240,226,225,114,128,  1,140,117,  2, 79,253, 80,  8,232,233,242,\n    225,231,225,238, 97,128, 48,101,235,225,244,225,235,225,238, 97,\n    128, 48,197,122,132,  1,243, 80, 31, 80, 40, 80, 59, 80, 96,225,\n    236,244,239,238,101,128,  2,163, 99,  2, 80, 46, 80, 53,225,242,\n    239,110,128,  1,198,245,242,108,128,  2,165,101,  2, 80, 65, 80,\n     85,225,226,235,232,225,243,233,225,238,227,249,242,233,236,236,\n    233, 99,128,  4,225,227,249,242,233,236,236,233, 99,128,  4, 85,\n    232,229,227,249,242,233,236,236,233, 99,128,  4, 95,101,151,  0,\n    101, 80,159, 80,178, 80,212, 81,186, 81,248, 82, 25, 82, 37, 82,\n     60, 82,113, 83,225, 84, 27, 84,129, 84,245, 85,124, 85,199, 85,\n    230, 86, 36, 86, 89, 87, 24, 87,157, 87,177, 87,221, 88, 56, 97,\n      2, 80,165, 80,172,227,245,244,101,128,  0,233,242,244,104,128,\n     38, 65, 98,  3, 80,186, 80,195, 80,205,229,238,231,225,236,105,\n    128,  9,143,239,240,239,237,239,230,111,128, 49, 28,242,229,246,\n    101,128,  1, 21, 99,  5, 80,224, 81, 41, 81, 55, 81, 87, 81,176,\n     97,  2, 80,230, 81, 35,238,228,242, 97,  3, 80,241, 80,248, 81,\n      3,228,229,246, 97,128,  9, 13,231,245,234,225,242,225,244,105,\n    128, 10,141,246,239,247,229,236,243,233,231,110,  2, 81, 17, 81,\n     24,228,229,246, 97,128,  9, 69,231,245,234,225,242,225,244,105,\n    128, 10,197,242,239,110,128,  1, 27,229,228,233,236,236,225,226,\n    242,229,246,101,128, 30, 29,104,  2, 81, 61, 81, 72,225,242,237,\n    229,238,233,225,110,128,  5,101,249,233,247,238,225,242,237,229,\n    238,233,225,110,128,  5,135,233,242, 99,  2, 81, 95, 81,100,236,\n    101,128, 36,212,245,237,230,236,229,120,134,  0,234, 81,121, 81,\n    129, 81,137, 81,148, 81,156, 81,168,225,227,245,244,101,128, 30,\n    191,226,229,236,239,119,128, 30, 25,228,239,244,226,229,236,239,\n    119,128, 30,199,231,242,225,246,101,128, 30,193,232,239,239,235,\n    225,226,239,246,101,128, 30,195,244,233,236,228,101,128, 30,197,\n    249,242,233,236,236,233, 99,128,  4, 84,100,  4, 81,196, 81,206,\n     81,212, 81,222,226,236,231,242,225,246,101,128,  2,  5,229,246,\n     97,128,  9, 15,233,229,242,229,243,233,115,128,  0,235,239,116,\n    130,  1, 23, 81,231, 81,240,225,227,227,229,238,116,128,  1, 23,\n    226,229,236,239,119,128, 30,185,101,  2, 81,254, 82,  9,231,245,\n    242,237,245,235,232,105,128, 10, 15,237,225,244,242,225,231,245,\n    242,237,245,235,232,105,128, 10, 71,230,227,249,242,233,236,236,\n    233, 99,128,  4, 68,103,  2, 82, 43, 82, 50,242,225,246,101,128,\n      0,232,245,234,225,242,225,244,105,128, 10,143,104,  4, 82, 70,\n     82, 81, 82, 92, 82,102,225,242,237,229,238,233,225,110,128,  5,\n    103,226,239,240,239,237,239,230,111,128, 49, 29,233,242,225,231,\n    225,238, 97,128, 48, 72,239,239,235,225,226,239,246,101,128, 30,\n    187,105,  4, 82,123, 82,134, 83,192, 83,207,226,239,240,239,237,\n    239,230,111,128, 49, 31,231,232,116,142,  0, 56, 82,168, 82,177,\n     82,187, 82,217, 82,224, 83,  6, 83, 31, 83, 76, 83,110, 83,122,\n     83,133, 83,166, 83,174, 83,185,225,242,225,226,233, 99,128,  6,\n    104,226,229,238,231,225,236,105,128,  9,238,227,233,242,227,236,\n    101,129, 36,103, 82,198,233,238,246,229,242,243,229,243,225,238,\n    243,243,229,242,233,102,128, 39,145,228,229,246, 97,128,  9,110,\n    229,229,110,  2, 82,232, 82,241,227,233,242,227,236,101,128, 36,\n    113,112,  2, 82,247, 82,254,225,242,229,110,128, 36,133,229,242,\n    233,239,100,128, 36,153,231,117,  2, 83, 13, 83, 22,234,225,242,\n    225,244,105,128, 10,238,242,237,245,235,232,105,128, 10,110,104,\n      2, 83, 37, 83, 63, 97,  2, 83, 43, 83, 54,227,235,225,242,225,\n    226,233, 99,128,  6,104,238,231,250,232,239,117,128, 48, 40,238,\n    239,244,229,226,229,225,237,229,100,128, 38,107,105,  2, 83, 82,\n     83,100,228,229,239,231,242,225,240,232,233,227,240,225,242,229,\n    110,128, 50, 39,238,230,229,242,233,239,114,128, 32,136,237,239,\n    238,239,243,240,225,227,101,128,255, 24,239,236,228,243,244,249,\n    236,101,128,247, 56,112,  2, 83,139, 83,146,225,242,229,110,128,\n     36,123,229,114,  2, 83,153, 83,159,233,239,100,128, 36,143,243,\n    233,225,110,128,  6,248,242,239,237,225,110,128, 33,119,243,245,\n    240,229,242,233,239,114,128, 32,120,244,232,225,105,128, 14, 88,\n    238,246,229,242,244,229,228,226,242,229,246,101,128,  2,  7,239,\n    244,233,230,233,229,228,227,249,242,233,236,236,233, 99,128,  4,\n    101,107,  2, 83,231, 83,255,225,244,225,235,225,238, 97,129, 48,\n    168, 83,243,232,225,236,230,247,233,228,244,104,128,255,116,111,\n      2, 84,  5, 84, 20,238,235,225,242,231,245,242,237,245,235,232,\n    105,128, 10,116,242,229,225,110,128, 49, 84,108,  3, 84, 35, 84,\n     46, 84,107,227,249,242,233,236,236,233, 99,128,  4, 59,101,  2,\n     84, 52, 84, 59,237,229,238,116,128, 34,  8,246,229,110,  3, 84,\n     69, 84, 78, 84, 99,227,233,242,227,236,101,128, 36,106,112,  2,\n     84, 84, 84, 91,225,242,229,110,128, 36,126,229,242,233,239,100,\n    128, 36,146,242,239,237,225,110,128, 33,122,236,233,240,243,233,\n    115,129, 32, 38, 84,118,246,229,242,244,233,227,225,108,128, 34,\n    238,109,  5, 84,141, 84,169, 84,180, 84,200, 84,211,225,227,242,\n    239,110,130,  1, 19, 84,153, 84,161,225,227,245,244,101,128, 30,\n     23,231,242,225,246,101,128, 30, 21,227,249,242,233,236,236,233,\n     99,128,  4, 60,228,225,243,104,129, 32, 20, 84,189,246,229,242,\n    244,233,227,225,108,128,254, 49,239,238,239,243,240,225,227,101,\n    128,255, 69,112,  2, 84,217, 84,237,232,225,243,233,243,237,225,\n    242,235,225,242,237,229,238,233,225,110,128,  5, 91,244,249,243,\n    229,116,128, 34,  5,110,  6, 85,  3, 85, 14, 85, 25, 85, 69, 85,\n    101, 85,116,226,239,240,239,237,239,230,111,128, 49, 35,227,249,\n    242,233,236,236,233, 99,128,  4, 61,100,  2, 85, 31, 85, 50,225,\n    243,104,129, 32, 19, 85, 39,246,229,242,244,233,227,225,108,128,\n    254, 50,229,243,227,229,238,228,229,242,227,249,242,233,236,236,\n    233, 99,128,  4,163,103,130,  1, 75, 85, 77, 85, 88,226,239,240,\n    239,237,239,230,111,128, 49, 37,232,229,227,249,242,233,236,236,\n    233, 99,128,  4,165,232,239,239,235,227,249,242,233,236,236,233,\n     99,128,  4,200,243,240,225,227,101,128, 32,  2,111,  3, 85,132,\n     85,140, 85,149,231,239,238,229,107,128,  1, 25,235,239,242,229,\n    225,110,128, 49, 83,240,229,110,130,  2, 91, 85,159, 85,168,227,\n    236,239,243,229,100,128,  2,154,242,229,246,229,242,243,229,100,\n    130,  2, 92, 85,183, 85,192,227,236,239,243,229,100,128,  2, 94,\n    232,239,239,107,128,  2, 93,112,  2, 85,205, 85,212,225,242,229,\n    110,128, 36,160,243,233,236,239,110,129,  3,181, 85,222,244,239,\n    238,239,115,128,  3,173,241,117,  2, 85,237, 86, 25,225,108,130,\n      0, 61, 85,246, 86,  2,237,239,238,239,243,240,225,227,101,128,\n    255, 29,115,  2, 86,  8, 86, 15,237,225,236,108,128,254,102,245,\n    240,229,242,233,239,114,128, 32,124,233,246,225,236,229,238,227,\n    101,128, 34, 97,114,  3, 86, 44, 86, 55, 86, 66,226,239,240,239,\n    237,239,230,111,128, 49, 38,227,249,242,233,236,236,233, 99,128,\n      4, 64,229,246,229,242,243,229,100,129,  2, 88, 86, 78,227,249,\n    242,233,236,236,233, 99,128,  4, 77,115,  6, 86,103, 86,114, 86,\n    134, 86,215, 87,  4, 87, 14,227,249,242,233,236,236,233, 99,128,\n      4, 65,228,229,243,227,229,238,228,229,242,227,249,242,233,236,\n    236,233, 99,128,  4,171,104,132,  2,131, 86,146, 86,153, 86,184,\n     86,199,227,245,242,108,128,  2,134,239,242,116,  2, 86,161, 86,\n    168,228,229,246, 97,128,  9, 14,246,239,247,229,236,243,233,231,\n    238,228,229,246, 97,128,  9, 70,242,229,246,229,242,243,229,228,\n    236,239,239,112,128,  1,170,243,241,245,225,244,242,229,246,229,\n    242,243,229,100,128,  2,133,237,225,236,108,  2, 86,224, 86,235,\n    232,233,242,225,231,225,238, 97,128, 48, 71,235,225,244,225,235,\n    225,238, 97,129, 48,167, 86,248,232,225,236,230,247,233,228,244,\n    104,128,255,106,244,233,237,225,244,229,100,128, 33, 46,245,240,\n    229,242,233,239,114,128,246,236,116,  5, 87, 36, 87, 62, 87, 66,\n     87, 83, 87,149, 97,130,  3,183, 87, 44, 87, 54,242,237,229,238,\n    233,225,110,128,  5,104,244,239,238,239,115,128,  3,174,104,128,\n      0,240,233,236,228,101,129, 30,189, 87, 75,226,229,236,239,119,\n    128, 30, 27,238,225,232,244, 97,  3, 87, 95, 87,127, 87,136,230,\n    239,245,235,104,  2, 87,105, 87,114,232,229,226,242,229,119,128,\n      5,145,236,229,230,244,232,229,226,242,229,119,128,  5,145,232,\n    229,226,242,229,119,128,  5,145,236,229,230,244,232,229,226,242,\n    229,119,128,  5,145,245,242,238,229,100,128,  1,221,117,  2, 87,\n    163, 87,172,235,239,242,229,225,110,128, 49, 97,242,111,128, 32,\n    172,246,239,247,229,236,243,233,231,110,  3, 87,193, 87,203, 87,\n    210,226,229,238,231,225,236,105,128,  9,199,228,229,246, 97,128,\n      9, 71,231,245,234,225,242,225,244,105,128, 10,199,120,  2, 87,\n    227, 88, 44,227,236,225,109,132,  0, 33, 87,242, 87,253, 88, 24,\n     88, 36,225,242,237,229,238,233,225,110,128,  5, 92,100,  2, 88,\n      3, 88,  8,226,108,128, 32, 60,239,247,110,129,  0,161, 88, 16,\n    243,237,225,236,108,128,247,161,237,239,238,239,243,240,225,227,\n    101,128,255,  1,243,237,225,236,108,128,247, 33,233,243,244,229,\n    238,244,233,225,108,128, 34,  3,250,104,131,  2,146, 88, 67, 88,\n     86, 88, 97, 99,  2, 88, 73, 88, 80,225,242,239,110,128,  1,239,\n    245,242,108,128,  2,147,242,229,246,229,242,243,229,100,128,  1,\n    185,244,225,233,108,128,  1,186,102,140,  0,102, 88,132, 88,214,\n     88,225, 88,234, 88,246, 89, 93, 89,109, 91,117, 91,130, 91,156,\n     93, 33, 93, 41, 97,  4, 88,142, 88,149, 88,160, 88,171,228,229,\n    246, 97,128,  9, 94,231,245,242,237,245,235,232,105,128, 10, 94,\n    232,242,229,238,232,229,233,116,128, 33,  9,244,232, 97,  3, 88,\n    181, 88,190, 88,202,225,242,225,226,233, 99,128,  6, 78,236,239,\n    247,225,242,225,226,233, 99,128,  6, 78,244,225,238,225,242,225,\n    226,233, 99,128,  6, 75,226,239,240,239,237,239,230,111,128, 49,\n      8,227,233,242,227,236,101,128, 36,213,228,239,244,225,227,227,\n    229,238,116,128, 30, 31,101,  3, 88,254, 89, 76, 89, 86,104,  4,\n     89,  8, 89, 31, 89, 45, 89, 61,225,114,  2, 89, 15, 89, 22,225,\n    226,233, 99,128,  6, 65,237,229,238,233,225,110,128,  5,134,230,\n    233,238,225,236,225,242,225,226,233, 99,128,254,210,233,238,233,\n    244,233,225,236,225,242,225,226,233, 99,128,254,211,237,229,228,\n    233,225,236,225,242,225,226,233, 99,128,254,212,233,227,239,240,\n    244,233, 99,128,  3,229,237,225,236,101,128, 38, 64,102,130,251,\n      0, 89,101, 89,105,105,128,251,  3,108,128,251,  4,105,136,251,\n      1, 89,129, 89,169, 89,180, 89,202, 90, 68, 90, 85, 90, 93, 90,\n    106,230,244,229,229,110,  2, 89,139, 89,148,227,233,242,227,236,\n    101,128, 36,110,112,  2, 89,154, 89,161,225,242,229,110,128, 36,\n    130,229,242,233,239,100,128, 36,150,231,245,242,229,228,225,243,\n    104,128, 32, 18,236,236,229,100,  2, 89,189, 89,195,226,239,120,\n    128, 37,160,242,229,227,116,128, 37,172,238,225,108,  5, 89,216,\n     89,255, 90, 16, 90, 33, 90, 49,235,225,102,130,  5,218, 89,226,\n     89,246,228,225,231,229,243,104,129,251, 58, 89,237,232,229,226,\n    242,229,119,128,251, 58,232,229,226,242,229,119,128,  5,218,237,\n    229,109,129,  5,221, 90,  7,232,229,226,242,229,119,128,  5,221,\n    238,245,110,129,  5,223, 90, 24,232,229,226,242,229,119,128,  5,\n    223,240,101,129,  5,227, 90, 40,232,229,226,242,229,119,128,  5,\n    227,244,243,225,228,105,129,  5,229, 90, 59,232,229,226,242,229,\n    119,128,  5,229,242,243,244,244,239,238,229,227,232,233,238,229,\n    243,101,128,  2,201,243,232,229,249,101,128, 37,201,244,225,227,\n    249,242,233,236,236,233, 99,128,  4,115,246,101,142,  0, 53, 90,\n    139, 90,148, 90,158, 90,188, 90,195, 90,205, 90,230, 91,  1, 91,\n     35, 91, 47, 91, 58, 91, 91, 91, 99, 91,110,225,242,225,226,233,\n     99,128,  6,101,226,229,238,231,225,236,105,128,  9,235,227,233,\n    242,227,236,101,129, 36,100, 90,169,233,238,246,229,242,243,229,\n    243,225,238,243,243,229,242,233,102,128, 39,142,228,229,246, 97,\n    128,  9,107,229,233,231,232,244,232,115,128, 33, 93,231,117,  2,\n     90,212, 90,221,234,225,242,225,244,105,128, 10,235,242,237,245,\n    235,232,105,128, 10,107,232, 97,  2, 90,237, 90,248,227,235,225,\n    242,225,226,233, 99,128,  6,101,238,231,250,232,239,117,128, 48,\n     37,105,  2, 91,  7, 91, 25,228,229,239,231,242,225,240,232,233,\n    227,240,225,242,229,110,128, 50, 36,238,230,229,242,233,239,114,\n    128, 32,133,237,239,238,239,243,240,225,227,101,128,255, 21,239,\n    236,228,243,244,249,236,101,128,247, 53,112,  2, 91, 64, 91, 71,\n    225,242,229,110,128, 36,120,229,114,  2, 91, 78, 91, 84,233,239,\n    100,128, 36,140,243,233,225,110,128,  6,245,242,239,237,225,110,\n    128, 33,116,243,245,240,229,242,233,239,114,128, 32,117,244,232,\n    225,105,128, 14, 85,108,129,251,  2, 91,123,239,242,233,110,128,\n      1,146,109,  2, 91,136, 91,147,239,238,239,243,240,225,227,101,\n    128,255, 70,243,241,245,225,242,101,128, 51,153,111,  4, 91,166,\n     91,188, 91,200, 91,207,230, 97,  2, 91,173, 91,181,238,244,232,\n    225,105,128, 14, 31,244,232,225,105,128, 14, 29,238,231,237,225,\n    238,244,232,225,105,128, 14, 79,242,225,236,108,128, 34,  0,245,\n    114,142,  0, 52, 91,240, 91,249, 92,  3, 92, 33, 92, 40, 92, 65,\n     92, 92, 92,126, 92,138, 92,157, 92,168, 92,201, 92,209, 92,220,\n    225,242,225,226,233, 99,128,  6,100,226,229,238,231,225,236,105,\n    128,  9,234,227,233,242,227,236,101,129, 36, 99, 92, 14,233,238,\n    246,229,242,243,229,243,225,238,243,243,229,242,233,102,128, 39,\n    141,228,229,246, 97,128,  9,106,231,117,  2, 92, 47, 92, 56,234,\n    225,242,225,244,105,128, 10,234,242,237,245,235,232,105,128, 10,\n    106,232, 97,  2, 92, 72, 92, 83,227,235,225,242,225,226,233, 99,\n    128,  6,100,238,231,250,232,239,117,128, 48, 36,105,  2, 92, 98,\n     92,116,228,229,239,231,242,225,240,232,233,227,240,225,242,229,\n    110,128, 50, 35,238,230,229,242,233,239,114,128, 32,132,237,239,\n    238,239,243,240,225,227,101,128,255, 20,238,245,237,229,242,225,\n    244,239,242,226,229,238,231,225,236,105,128,  9,247,239,236,228,\n    243,244,249,236,101,128,247, 52,112,  2, 92,174, 92,181,225,242,\n    229,110,128, 36,119,229,114,  2, 92,188, 92,194,233,239,100,128,\n     36,139,243,233,225,110,128,  6,244,242,239,237,225,110,128, 33,\n    115,243,245,240,229,242,233,239,114,128, 32,116,116,  2, 92,226,\n     93,  8,229,229,110,  2, 92,234, 92,243,227,233,242,227,236,101,\n    128, 36,109,112,  2, 92,249, 93,  0,225,242,229,110,128, 36,129,\n    229,242,233,239,100,128, 36,149,104,  2, 93, 14, 93, 19,225,105,\n    128, 14, 84,244,239,238,229,227,232,233,238,229,243,101,128,  2,\n    203,240,225,242,229,110,128, 36,161,242, 97,  2, 93, 48, 93, 56,\n    227,244,233,239,110,128, 32, 68,238, 99,128, 32,163,103,144,  0,\n    103, 93, 97, 94, 43, 94, 66, 94,127, 94,144, 95, 65, 96, 58, 96,\n    143, 96,156, 97, 14, 97, 39, 97, 67, 97, 89, 98, 34, 98, 56, 98,\n    158, 97,  9, 93,117, 93,127, 93,134, 93,141, 93,205, 93,230, 93,\n    241, 93,252, 94, 30,226,229,238,231,225,236,105,128,  9,151,227,\n    245,244,101,128,  1,245,228,229,246, 97,128,  9, 23,102,  4, 93,\n    151, 93,160, 93,174, 93,190,225,242,225,226,233, 99,128,  6,175,\n    230,233,238,225,236,225,242,225,226,233, 99,128,251,147,233,238,\n    233,244,233,225,236,225,242,225,226,233, 99,128,251,148,237,229,\n    228,233,225,236,225,242,225,226,233, 99,128,251,149,231,117,  2,\n     93,212, 93,221,234,225,242,225,244,105,128, 10,151,242,237,245,\n    235,232,105,128, 10, 23,232,233,242,225,231,225,238, 97,128, 48,\n     76,235,225,244,225,235,225,238, 97,128, 48,172,237,237, 97,130,\n      3,179, 94,  6, 94, 19,236,225,244,233,238,243,237,225,236,108,\n    128,  2, 99,243,245,240,229,242,233,239,114,128,  2,224,238,231,\n    233,225,227,239,240,244,233, 99,128,  3,235, 98,  2, 94, 49, 94,\n     59,239,240,239,237,239,230,111,128, 49, 13,242,229,246,101,128,\n      1, 31, 99,  4, 94, 76, 94, 83, 94, 92, 94,114,225,242,239,110,\n    128,  1,231,229,228,233,236,236, 97,128,  1, 35,233,242, 99,  2,\n     94,100, 94,105,236,101,128, 36,214,245,237,230,236,229,120,128,\n      1, 29,239,237,237,225,225,227,227,229,238,116,128,  1, 35,228,\n    239,116,129,  1, 33, 94,135,225,227,227,229,238,116,128,  1, 33,\n    101,  6, 94,158, 94,169, 94,180, 94,191, 94,210, 95, 56,227,249,\n    242,233,236,236,233, 99,128,  4, 51,232,233,242,225,231,225,238,\n     97,128, 48, 82,235,225,244,225,235,225,238, 97,128, 48,178,239,\n    237,229,244,242,233,227,225,236,236,249,229,241,245,225,108,128,\n     34, 81,114,  3, 94,218, 95, 11, 95, 21,229,243,104,  3, 94,228,\n     94,243, 94,252,225,227,227,229,238,244,232,229,226,242,229,119,\n    128,  5,156,232,229,226,242,229,119,128,  5,243,237,245,241,228,\n    225,237,232,229,226,242,229,119,128,  5,157,237,225,238,228,226,\n    236,115,128,  0,223,243,232,225,249,233,109,  2, 95, 32, 95, 47,\n    225,227,227,229,238,244,232,229,226,242,229,119,128,  5,158,232,\n    229,226,242,229,119,128,  5,244,244,225,237,225,242,107,128, 48,\n     19,104,  5, 95, 77, 95,210, 96, 17, 96, 42, 96, 48, 97,  4, 95,\n     87, 95, 97, 95,120, 95,145,226,229,238,231,225,236,105,128,  9,\n    152,100,  2, 95,103, 95,114,225,242,237,229,238,233,225,110,128,\n      5,114,229,246, 97,128,  9, 24,231,117,  2, 95,127, 95,136,234,\n    225,242,225,244,105,128, 10,152,242,237,245,235,232,105,128, 10,\n     24,233,110,  4, 95,156, 95,165, 95,179, 95,195,225,242,225,226,\n    233, 99,128,  6, 58,230,233,238,225,236,225,242,225,226,233, 99,\n    128,254,206,233,238,233,244,233,225,236,225,242,225,226,233, 99,\n    128,254,207,237,229,228,233,225,236,225,242,225,226,233, 99,128,\n    254,208,101,  3, 95,218, 95,239, 96,  0,237,233,228,228,236,229,\n    232,239,239,235,227,249,242,233,236,236,233, 99,128,  4,149,243,\n    244,242,239,235,229,227,249,242,233,236,236,233, 99,128,  4,147,\n    245,240,244,245,242,238,227,249,242,233,236,236,233, 99,128,  4,\n    145,232, 97,  2, 96, 24, 96, 31,228,229,246, 97,128,  9, 90,231,\n    245,242,237,245,235,232,105,128, 10, 90,239,239,107,128,  2, 96,\n    250,243,241,245,225,242,101,128, 51,147,105,  3, 96, 66, 96, 77,\n     96, 88,232,233,242,225,231,225,238, 97,128, 48, 78,235,225,244,\n    225,235,225,238, 97,128, 48,174,109,  2, 96, 94, 96,105,225,242,\n    237,229,238,233,225,110,128,  5, 99,229,108,130,  5,210, 96,114,\n     96,134,228,225,231,229,243,104,129,251, 50, 96,125,232,229,226,\n    242,229,119,128,251, 50,232,229,226,242,229,119,128,  5,210,234,\n    229,227,249,242,233,236,236,233, 99,128,  4, 83,236,239,244,244,\n    225,108,  2, 96,167, 96,184,233,238,246,229,242,244,229,228,243,\n    244,242,239,235,101,128,  1,190,243,244,239,112,132,  2,148, 96,\n    199, 96,210, 96,216, 96,248,233,238,246,229,242,244,229,100,128,\n      2,150,237,239,100,128,  2,192,242,229,246,229,242,243,229,100,\n    130,  2,149, 96,231, 96,237,237,239,100,128,  2,193,243,245,240,\n    229,242,233,239,114,128,  2,228,243,244,242,239,235,101,129,  2,\n    161, 97,  3,242,229,246,229,242,243,229,100,128,  2,162,109,  2,\n     97, 20, 97, 28,225,227,242,239,110,128, 30, 33,239,238,239,243,\n    240,225,227,101,128,255, 71,111,  2, 97, 45, 97, 56,232,233,242,\n    225,231,225,238, 97,128, 48, 84,235,225,244,225,235,225,238, 97,\n    128, 48,180,240, 97,  2, 97, 74, 97, 80,242,229,110,128, 36,162,\n    243,241,245,225,242,101,128, 51,172,114,  2, 97, 95, 97,192, 97,\n      2, 97,101, 97,109,228,233,229,238,116,128, 34,  7,246,101,134,\n      0, 96, 97,126, 97,137, 97,154, 97,161, 97,170, 97,182,226,229,\n    236,239,247,227,237, 98,128,  3, 22, 99,  2, 97,143, 97,148,237,\n     98,128,  3,  0,239,237, 98,128,  3,  0,228,229,246, 97,128,  9,\n     83,236,239,247,237,239,100,128,  2,206,237,239,238,239,243,240,\n    225,227,101,128,255, 64,244,239,238,229,227,237, 98,128,  3, 64,\n    229,225,244,229,114,132,  0, 62, 97,208, 97,227, 97,239, 98, 26,\n    229,241,245,225,108,129, 34,101, 97,218,239,242,236,229,243,115,\n    128, 34,219,237,239,238,239,243,240,225,227,101,128,255, 30,111,\n      2, 97,245, 98, 15,114,  2, 97,251, 98,  8,229,241,245,233,246,\n    225,236,229,238,116,128, 34,115,236,229,243,115,128, 34,119,246,\n    229,242,229,241,245,225,108,128, 34,103,243,237,225,236,108,128,\n    254,101,115,  2, 98, 40, 98, 48,227,242,233,240,116,128,  2, 97,\n    244,242,239,235,101,128,  1,229,117,  4, 98, 66, 98, 77, 98,134,\n     98,145,232,233,242,225,231,225,238, 97,128, 48, 80,233,108,  2,\n     98, 84, 98,109,236,229,237,239,116,  2, 98, 94, 98,101,236,229,\n    230,116,128,  0,171,242,233,231,232,116,128,  0,187,243,233,238,\n    231,108,  2, 98,119, 98,126,236,229,230,116,128, 32, 57,242,233,\n    231,232,116,128, 32, 58,235,225,244,225,235,225,238, 97,128, 48,\n    176,242,225,237,245,243,241,245,225,242,101,128, 51, 24,249,243,\n    241,245,225,242,101,128, 51,201,104,144,  0,104, 98,204,101, 90,\n    101,125,101,162,101,202,103, 90,103,110,104, 75,104, 87,104, 99,\n    105,167,105,175,105,186,105,195,106, 19,106, 23, 97, 13, 98,232,\n     99, 15, 99, 25, 99, 55, 99, 80, 99,158, 99,170, 99,195, 99,210,\n     99,239, 99,252,100, 54,100, 63, 97,  2, 98,238, 99,  1,226,235,\n    232,225,243,233,225,238,227,249,242,233,236,236,233, 99,128,  4,\n    169,236,244,239,238,229,225,242,225,226,233, 99,128,  6,193,226,\n    229,238,231,225,236,105,128,  9,185,228,101,  2, 99, 32, 99, 50,\n    243,227,229,238,228,229,242,227,249,242,233,236,236,233, 99,128,\n      4,179,246, 97,128,  9, 57,231,117,  2, 99, 62, 99, 71,234,225,\n    242,225,244,105,128, 10,185,242,237,245,235,232,105,128, 10, 57,\n    104,  4, 99, 90, 99, 99, 99,113, 99,143,225,242,225,226,233, 99,\n    128,  6, 45,230,233,238,225,236,225,242,225,226,233, 99,128,254,\n    162,105,  2, 99,119, 99,134,238,233,244,233,225,236,225,242,225,\n    226,233, 99,128,254,163,242,225,231,225,238, 97,128, 48,111,237,\n    229,228,233,225,236,225,242,225,226,233, 99,128,254,164,233,244,\n    245,243,241,245,225,242,101,128, 51, 42,235,225,244,225,235,225,\n    238, 97,129, 48,207, 99,183,232,225,236,230,247,233,228,244,104,\n    128,255,138,236,225,238,244,231,245,242,237,245,235,232,105,128,\n     10, 77,237,250, 97,  2, 99,218, 99,227,225,242,225,226,233, 99,\n    128,  6, 33,236,239,247,225,242,225,226,233, 99,128,  6, 33,238,\n    231,245,236,230,233,236,236,229,114,128, 49,100,114,  2,100,  2,\n    100, 18,228,243,233,231,238,227,249,242,233,236,236,233, 99,128,\n      4, 74,240,239,239,110,  2,100, 27,100, 40,236,229,230,244,226,\n    225,242,226,245,112,128, 33,188,242,233,231,232,244,226,225,242,\n    226,245,112,128, 33,192,243,241,245,225,242,101,128, 51,202,244,\n    225,102,  3,100, 73,100,165,101,  0,240,225,244,225,104,134,  5,\n    178,100, 93,100, 98,100,112,100,121,100,136,100,152,177, 54,128,\n      5,178, 50,  2,100,104,100,108, 51,128,  5,178,102,128,  5,178,\n    232,229,226,242,229,119,128,  5,178,238,225,242,242,239,247,232,\n    229,226,242,229,119,128,  5,178,241,245,225,242,244,229,242,232,\n    229,226,242,229,119,128,  5,178,247,233,228,229,232,229,226,242,\n    229,119,128,  5,178,241,225,237,225,244,115,135,  5,179,100,188,\n    100,193,100,198,100,203,100,212,100,227,100,243,177, 98,128,  5,\n    179,178, 56,128,  5,179,179, 52,128,  5,179,232,229,226,242,229,\n    119,128,  5,179,238,225,242,242,239,247,232,229,226,242,229,119,\n    128,  5,179,241,245,225,242,244,229,242,232,229,226,242,229,119,\n    128,  5,179,247,233,228,229,232,229,226,242,229,119,128,  5,179,\n    243,229,231,239,108,135,  5,177,101, 22,101, 27,101, 32,101, 37,\n    101, 46,101, 61,101, 77,177, 55,128,  5,177,178, 52,128,  5,177,\n    179, 48,128,  5,177,232,229,226,242,229,119,128,  5,177,238,225,\n    242,242,239,247,232,229,226,242,229,119,128,  5,177,241,245,225,\n    242,244,229,242,232,229,226,242,229,119,128,  5,177,247,233,228,\n    229,232,229,226,242,229,119,128,  5,177, 98,  3,101, 98,101,103,\n    101,113,225,114,128,  1, 39,239,240,239,237,239,230,111,128, 49,\n     15,242,229,246,229,226,229,236,239,119,128, 30, 43, 99,  2,101,\n    131,101,140,229,228,233,236,236, 97,128, 30, 41,233,242, 99,  2,\n    101,148,101,153,236,101,128, 36,215,245,237,230,236,229,120,128,\n      1, 37,100,  2,101,168,101,178,233,229,242,229,243,233,115,128,\n     30, 39,239,116,  2,101,185,101,194,225,227,227,229,238,116,128,\n     30, 35,226,229,236,239,119,128, 30, 37,101,136,  5,212,101,222,\n    101,255,102, 19,102,248,103,  8,103, 53,103, 62,103, 75,225,242,\n    116,129, 38,101,101,230,243,245,233,116,  2,101,239,101,247,226,\n    236,225,227,107,128, 38,101,247,232,233,244,101,128, 38, 97,228,\n    225,231,229,243,104,129,251, 52,102, 10,232,229,226,242,229,119,\n    128,251, 52,104,  6,102, 33,102, 61,102, 69,102,119,102,165,102,\n    214, 97,  2,102, 39,102, 53,236,244,239,238,229,225,242,225,226,\n    233, 99,128,  6,193,242,225,226,233, 99,128,  6, 71,229,226,242,\n    229,119,128,  5,212,230,233,238,225,236, 97,  2,102, 80,102,111,\n    236,116,  2,102, 87,102, 99,239,238,229,225,242,225,226,233, 99,\n    128,251,167,244,247,239,225,242,225,226,233, 99,128,254,234,242,\n    225,226,233, 99,128,254,234,232,225,237,250,225,225,226,239,246,\n    101,  2,102,134,102,148,230,233,238,225,236,225,242,225,226,233,\n     99,128,251,165,233,243,239,236,225,244,229,228,225,242,225,226,\n    233, 99,128,251,164,105,  2,102,171,102,205,238,233,244,233,225,\n    236, 97,  2,102,183,102,197,236,244,239,238,229,225,242,225,226,\n    233, 99,128,251,168,242,225,226,233, 99,128,254,235,242,225,231,\n    225,238, 97,128, 48,120,237,229,228,233,225,236, 97,  2,102,226,\n    102,240,236,244,239,238,229,225,242,225,226,233, 99,128,251,169,\n    242,225,226,233, 99,128,254,236,233,243,229,233,229,242,225,243,\n    241,245,225,242,101,128, 51,123,107,  2,103, 14,103, 38,225,244,\n    225,235,225,238, 97,129, 48,216,103, 26,232,225,236,230,247,233,\n    228,244,104,128,255,141,245,244,225,225,242,245,243,241,245,225,\n    242,101,128, 51, 54,238,231,232,239,239,107,128,  2,103,242,245,\n    244,245,243,241,245,225,242,101,128, 51, 57,116,129,  5,215,103,\n     81,232,229,226,242,229,119,128,  5,215,232,239,239,107,129,  2,\n    102,103, 99,243,245,240,229,242,233,239,114,128,  2,177,105,  4,\n    103,120,103,205,103,216,103,241,229,245,104,  4,103,132,103,167,\n    103,182,103,191, 97,  2,103,138,103,153,227,233,242,227,236,229,\n    235,239,242,229,225,110,128, 50,123,240,225,242,229,238,235,239,\n    242,229,225,110,128, 50, 27,227,233,242,227,236,229,235,239,242,\n    229,225,110,128, 50,109,235,239,242,229,225,110,128, 49, 78,240,\n    225,242,229,238,235,239,242,229,225,110,128, 50, 13,232,233,242,\n    225,231,225,238, 97,128, 48,114,235,225,244,225,235,225,238, 97,\n    129, 48,210,103,229,232,225,236,230,247,233,228,244,104,128,255,\n    139,242,233,113,134,  5,180,104,  3,104,  8,104, 22,104, 31,104,\n     46,104, 62,177, 52,128,  5,180, 50,  2,104, 14,104, 18, 49,128,\n      5,180,100,128,  5,180,232,229,226,242,229,119,128,  5,180,238,\n    225,242,242,239,247,232,229,226,242,229,119,128,  5,180,241,245,\n    225,242,244,229,242,232,229,226,242,229,119,128,  5,180,247,233,\n    228,229,232,229,226,242,229,119,128,  5,180,236,233,238,229,226,\n    229,236,239,119,128, 30,150,237,239,238,239,243,240,225,227,101,\n    128,255, 72,111,  9,104,119,104,130,104,154,104,179,105, 11,105,\n     24,105,110,105,150,105,161,225,242,237,229,238,233,225,110,128,\n      5,112,232,105,  2,104,137,104,145,240,244,232,225,105,128, 14,\n     43,242,225,231,225,238, 97,128, 48,123,235,225,244,225,235,225,\n    238, 97,129, 48,219,104,167,232,225,236,230,247,233,228,244,104,\n    128,255,142,236,225,109,135,  5,185,104,199,104,204,104,209,104,\n    214,104,223,104,238,104,254,177, 57,128,  5,185,178, 54,128,  5,\n    185,179, 50,128,  5,185,232,229,226,242,229,119,128,  5,185,238,\n    225,242,242,239,247,232,229,226,242,229,119,128,  5,185,241,245,\n    225,242,244,229,242,232,229,226,242,229,119,128,  5,185,247,233,\n    228,229,232,229,226,242,229,119,128,  5,185,238,239,235,232,245,\n    235,244,232,225,105,128, 14, 46,111,  2,105, 30,105,100,107,  4,\n    105, 40,105, 52,105, 58,105, 80,225,226,239,246,229,227,239,237,\n     98,128,  3,  9,227,237, 98,128,  3,  9,240,225,236,225,244,225,\n    236,233,250,229,228,226,229,236,239,247,227,237, 98,128,  3, 33,\n    242,229,244,242,239,230,236,229,248,226,229,236,239,247,227,237,\n     98,128,  3, 34,238,243,241,245,225,242,101,128, 51, 66,114,  2,\n    105,116,105,143,105,  2,105,122,105,131,227,239,240,244,233, 99,\n    128,  3,233,250,239,238,244,225,236,226,225,114,128, 32, 21,238,\n    227,237, 98,128,  3, 27,244,243,240,242,233,238,231,115,128, 38,\n    104,245,243,101,128, 35,  2,240,225,242,229,110,128, 36,163,243,\n    245,240,229,242,233,239,114,128,  2,176,244,245,242,238,229,100,\n    128,  2,101,117,  4,105,205,105,216,105,229,105,254,232,233,242,\n    225,231,225,238, 97,128, 48,117,233,233,244,239,243,241,245,225,\n    242,101,128, 51, 51,235,225,244,225,235,225,238, 97,129, 48,213,\n    105,242,232,225,236,230,247,233,228,244,104,128,255,140,238,231,\n    225,242,245,237,236,225,245,116,129,  2,221,106, 13,227,237, 98,\n    128,  3, 11,118,128,  1,149,249,240,232,229,110,132,  0, 45,106,\n     39,106, 50,106, 62,106, 85,233,238,230,229,242,233,239,114,128,\n    246,229,237,239,238,239,243,240,225,227,101,128,255, 13,115,  2,\n    106, 68,106, 75,237,225,236,108,128,254, 99,245,240,229,242,233,\n    239,114,128,246,230,244,247,111,128, 32, 16,105,149,  0,105,106,\n    137,106,160,106,194,106,241,110,123,110,243,111, 24,111, 51,111,\n    213,111,217,111,255,112, 21,112,105,113, 14,113, 89,113, 97,113,\n    110,113,197,113,254,114, 26,114, 70,225, 99,  2,106,144,106,150,\n    245,244,101,128,  0,237,249,242,233,236,236,233, 99,128,  4, 79,\n     98,  3,106,168,106,177,106,187,229,238,231,225,236,105,128,  9,\n    135,239,240,239,237,239,230,111,128, 49, 39,242,229,246,101,128,\n      1, 45, 99,  3,106,202,106,209,106,231,225,242,239,110,128,  1,\n    208,233,242, 99,  2,106,217,106,222,236,101,128, 36,216,245,237,\n    230,236,229,120,128,  0,238,249,242,233,236,236,233, 99,128,  4,\n     86,100,  4,106,251,107,  5,110, 80,110,113,226,236,231,242,225,\n    246,101,128,  2,  9,101,  2,107, 11,110, 75,239,231,242,225,240,\n    104,  7,107, 32,107, 46,107, 59,109,244,110, 19,110, 32,110, 44,\n    229,225,242,244,232,227,233,242,227,236,101,128, 50,143,230,233,\n    242,229,227,233,242,227,236,101,128, 50,139,233, 99, 14,107, 90,\n    107,106,107,205,108,  3,108, 69,108, 98,108,114,108,171,108,220,\n    108,232,109,  3,109, 70,109,208,109,237,225,236,236,233,225,238,\n    227,229,240,225,242,229,110,128, 50, 63, 99,  4,107,116,107,127,\n    107,141,107,148,225,236,236,240,225,242,229,110,128, 50, 58,229,\n    238,244,242,229,227,233,242,227,236,101,128, 50,165,236,239,243,\n    101,128, 48,  6,111,  3,107,156,107,171,107,191,237,237, 97,129,\n     48,  1,107,164,236,229,230,116,128,255,100,238,231,242,225,244,\n    245,236,225,244,233,239,238,240,225,242,229,110,128, 50, 55,242,\n    242,229,227,244,227,233,242,227,236,101,128, 50,163,101,  3,107,\n    213,107,225,107,242,225,242,244,232,240,225,242,229,110,128, 50,\n     47,238,244,229,242,240,242,233,243,229,240,225,242,229,110,128,\n     50, 61,248,227,229,236,236,229,238,244,227,233,242,227,236,101,\n    128, 50,157,102,  2,108,  9,108, 24,229,243,244,233,246,225,236,\n    240,225,242,229,110,128, 50, 64,105,  2,108, 30,108, 59,238,225,\n    238,227,233,225,108,  2,108, 42,108, 51,227,233,242,227,236,101,\n    128, 50,150,240,225,242,229,110,128, 50, 54,242,229,240,225,242,\n    229,110,128, 50, 43,104,  2,108, 75,108, 86,225,246,229,240,225,\n    242,229,110,128, 50, 50,233,231,232,227,233,242,227,236,101,128,\n     50,164,233,244,229,242,225,244,233,239,238,237,225,242,107,128,\n     48,  5,108,  3,108,122,108,148,108,160,225,226,239,114,  2,108,\n    131,108,140,227,233,242,227,236,101,128, 50,152,240,225,242,229,\n    110,128, 50, 56,229,230,244,227,233,242,227,236,101,128, 50,167,\n    239,247,227,233,242,227,236,101,128, 50,166,109,  2,108,177,108,\n    209,101,  2,108,183,108,198,228,233,227,233,238,229,227,233,242,\n    227,236,101,128, 50,169,244,225,236,240,225,242,229,110,128, 50,\n     46,239,239,238,240,225,242,229,110,128, 50, 42,238,225,237,229,\n    240,225,242,229,110,128, 50, 52,112,  2,108,238,108,246,229,242,\n    233,239,100,128, 48,  2,242,233,238,244,227,233,242,227,236,101,\n    128, 50,158,114,  2,109,  9,109, 57,101,  3,109, 17,109, 28,109,\n     43,225,227,232,240,225,242,229,110,128, 50, 67,240,242,229,243,\n    229,238,244,240,225,242,229,110,128, 50, 57,243,239,245,242,227,\n    229,240,225,242,229,110,128, 50, 62,233,231,232,244,227,233,242,\n    227,236,101,128, 50,168,115,  5,109, 82,109,111,109,125,109,150,\n    109,178,101,  2,109, 88,109,101,227,242,229,244,227,233,242,227,\n    236,101,128, 50,153,236,230,240,225,242,229,110,128, 50, 66,239,\n    227,233,229,244,249,240,225,242,229,110,128, 50, 51,112,  2,109,\n    131,109,137,225,227,101,128, 48,  0,229,227,233,225,236,240,225,\n    242,229,110,128, 50, 53,116,  2,109,156,109,167,239,227,235,240,\n    225,242,229,110,128, 50, 49,245,228,249,240,225,242,229,110,128,\n     50, 59,117,  2,109,184,109,193,238,240,225,242,229,110,128, 50,\n     48,240,229,242,246,233,243,229,240,225,242,229,110,128, 50, 60,\n    119,  2,109,214,109,226,225,244,229,242,240,225,242,229,110,128,\n     50, 44,239,239,228,240,225,242,229,110,128, 50, 45,250,229,242,\n    111,128, 48,  7,109,  2,109,250,110,  7,229,244,225,236,227,233,\n    242,227,236,101,128, 50,142,239,239,238,227,233,242,227,236,101,\n    128, 50,138,238,225,237,229,227,233,242,227,236,101,128, 50,148,\n    243,245,238,227,233,242,227,236,101,128, 50,144,119,  2,110, 50,\n    110, 63,225,244,229,242,227,233,242,227,236,101,128, 50,140,239,\n    239,228,227,233,242,227,236,101,128, 50,141,246, 97,128,  9,  7,\n    233,229,242,229,243,233,115,130,  0,239,110, 94,110,102,225,227,\n    245,244,101,128, 30, 47,227,249,242,233,236,236,233, 99,128,  4,\n    229,239,244,226,229,236,239,119,128, 30,203,101,  3,110,131,110,\n    147,110,158,226,242,229,246,229,227,249,242,233,236,236,233, 99,\n    128,  4,215,227,249,242,233,236,236,233, 99,128,  4, 53,245,238,\n    103,  4,110,170,110,205,110,220,110,229, 97,  2,110,176,110,191,\n    227,233,242,227,236,229,235,239,242,229,225,110,128, 50,117,240,\n    225,242,229,238,235,239,242,229,225,110,128, 50, 21,227,233,242,\n    227,236,229,235,239,242,229,225,110,128, 50,103,235,239,242,229,\n    225,110,128, 49, 71,240,225,242,229,238,235,239,242,229,225,110,\n    128, 50,  7,103,  2,110,249,111,  0,242,225,246,101,128,  0,236,\n    117,  2,111,  6,111, 15,234,225,242,225,244,105,128, 10,135,242,\n    237,245,235,232,105,128, 10,  7,104,  2,111, 30,111, 40,233,242,\n    225,231,225,238, 97,128, 48, 68,239,239,235,225,226,239,246,101,\n    128, 30,201,105,  8,111, 69,111, 79,111, 90,111, 97,111,122,111,\n    138,111,153,111,169,226,229,238,231,225,236,105,128,  9,136,227,\n    249,242,233,236,236,233, 99,128,  4, 56,228,229,246, 97,128,  9,\n      8,231,117,  2,111,104,111,113,234,225,242,225,244,105,128, 10,\n    136,242,237,245,235,232,105,128, 10,  8,237,225,244,242,225,231,\n    245,242,237,245,235,232,105,128, 10, 64,238,246,229,242,244,229,\n    228,226,242,229,246,101,128,  2, 11,243,232,239,242,244,227,249,\n    242,233,236,236,233, 99,128,  4, 57,246,239,247,229,236,243,233,\n    231,110,  3,111,185,111,195,111,202,226,229,238,231,225,236,105,\n    128,  9,192,228,229,246, 97,128,  9, 64,231,245,234,225,242,225,\n    244,105,128, 10,192,106,128,  1, 51,107,  2,111,223,111,247,225,\n    244,225,235,225,238, 97,129, 48,164,111,235,232,225,236,230,247,\n    233,228,244,104,128,255,114,239,242,229,225,110,128, 49, 99,108,\n      2,112,  5,112, 10,228,101,128,  2,220,245,249,232,229,226,242,\n    229,119,128,  5,172,109,  2,112, 27,112, 94, 97,  3,112, 35,112,\n     55,112, 80,227,242,239,110,129,  1, 43,112, 44,227,249,242,233,\n    236,236,233, 99,128,  4,227,231,229,239,242,225,240,240,242,239,\n    248,233,237,225,244,229,236,249,229,241,245,225,108,128, 34, 83,\n    244,242,225,231,245,242,237,245,235,232,105,128, 10, 63,239,238,\n    239,243,240,225,227,101,128,255, 73,110,  5,112,117,112,127,112,\n    136,112,148,112,232,227,242,229,237,229,238,116,128, 34,  6,230,\n    233,238,233,244,121,128, 34, 30,233,225,242,237,229,238,233,225,\n    110,128,  5,107,116,  2,112,154,112,222,101,  2,112,160,112,211,\n    231,242,225,108,131, 34, 43,112,173,112,191,112,196, 98,  2,112,\n    179,112,187,239,244,244,239,109,128, 35, 33,116,128, 35, 33,229,\n    120,128,248,245,116,  2,112,202,112,207,239,112,128, 35, 32,112,\n    128, 35, 32,242,243,229,227,244,233,239,110,128, 34, 41,233,243,\n    241,245,225,242,101,128, 51,  5,118,  3,112,240,112,249,113,  2,\n    226,245,236,236,229,116,128, 37,216,227,233,242,227,236,101,128,\n     37,217,243,237,233,236,229,230,225,227,101,128, 38, 59,111,  3,\n    113, 22,113, 33,113, 41,227,249,242,233,236,236,233, 99,128,  4,\n     81,231,239,238,229,107,128,  1, 47,244, 97,131,  3,185,113, 52,\n    113, 73,113, 81,228,233,229,242,229,243,233,115,129,  3,202,113,\n     65,244,239,238,239,115,128,  3,144,236,225,244,233,110,128,  2,\n    105,244,239,238,239,115,128,  3,175,240,225,242,229,110,128, 36,\n    164,242,233,231,245,242,237,245,235,232,105,128, 10,114,115,  4,\n    113,120,113,165,113,179,113,187,237,225,236,108,  2,113,129,113,\n    140,232,233,242,225,231,225,238, 97,128, 48, 67,235,225,244,225,\n    235,225,238, 97,129, 48,163,113,153,232,225,236,230,247,233,228,\n    244,104,128,255,104,243,232,225,242,226,229,238,231,225,236,105,\n    128,  9,250,244,242,239,235,101,128,  2,104,245,240,229,242,233,\n    239,114,128,246,237,116,  2,113,203,113,237,229,242,225,244,233,\n    239,110,  2,113,215,113,226,232,233,242,225,231,225,238, 97,128,\n     48,157,235,225,244,225,235,225,238, 97,128, 48,253,233,236,228,\n    101,129,  1, 41,113,246,226,229,236,239,119,128, 30, 45,117,  2,\n    114,  4,114, 15,226,239,240,239,237,239,230,111,128, 49, 41,227,\n    249,242,233,236,236,233, 99,128,  4, 78,246,239,247,229,236,243,\n    233,231,110,  3,114, 42,114, 52,114, 59,226,229,238,231,225,236,\n    105,128,  9,191,228,229,246, 97,128,  9, 63,231,245,234,225,242,\n    225,244,105,128, 10,191,250,232,233,244,243, 97,  2,114, 81,114,\n     92,227,249,242,233,236,236,233, 99,128,  4,117,228,226,236,231,\n    242,225,246,229,227,249,242,233,236,236,233, 99,128,  4,119,106,\n    138,  0,106,114,135,114,198,114,209,115,  3,115, 19,115,132,115,\n    201,115,206,115,218,115,226, 97,  4,114,145,114,156,114,166,114,\n    173,225,242,237,229,238,233,225,110,128,  5,113,226,229,238,231,\n    225,236,105,128,  9,156,228,229,246, 97,128,  9, 28,231,117,  2,\n    114,180,114,189,234,225,242,225,244,105,128, 10,156,242,237,245,\n    235,232,105,128, 10, 28,226,239,240,239,237,239,230,111,128, 49,\n     16, 99,  3,114,217,114,224,114,246,225,242,239,110,128,  1,240,\n    233,242, 99,  2,114,232,114,237,236,101,128, 36,217,245,237,230,\n    236,229,120,128,  1, 53,242,239,243,243,229,228,244,225,233,108,\n    128,  2,157,228,239,244,236,229,243,243,243,244,242,239,235,101,\n    128,  2, 95,101,  3,115, 27,115, 38,115,103,227,249,242,233,236,\n    236,233, 99,128,  4, 88,229,109,  4,115, 49,115, 58,115, 72,115,\n     88,225,242,225,226,233, 99,128,  6, 44,230,233,238,225,236,225,\n    242,225,226,233, 99,128,254,158,233,238,233,244,233,225,236,225,\n    242,225,226,233, 99,128,254,159,237,229,228,233,225,236,225,242,\n    225,226,233, 99,128,254,160,104,  2,115,109,115,118,225,242,225,\n    226,233, 99,128,  6,152,230,233,238,225,236,225,242,225,226,233,\n     99,128,251,139,104,  2,115,138,115,188, 97,  3,115,146,115,156,\n    115,163,226,229,238,231,225,236,105,128,  9,157,228,229,246, 97,\n    128,  9, 29,231,117,  2,115,170,115,179,234,225,242,225,244,105,\n    128, 10,157,242,237,245,235,232,105,128, 10, 29,229,232,225,242,\n    237,229,238,233,225,110,128,  5,123,233,115,128, 48,  4,237,239,\n    238,239,243,240,225,227,101,128,255, 74,240,225,242,229,110,128,\n     36,165,243,245,240,229,242,233,239,114,128,  2,178,107,146,  0,\n    107,116, 21,118,110,118,121,118,183,118,194,119, 28,119, 42,120,\n    150,121, 90,121,103,121,129,121,178,122, 60,122, 82,122, 95,122,\n    118,122,160,122,170, 97, 12,116, 47,116, 79,116,101,116,131,116,\n    245,117, 14,117, 44,117, 69,117,175,117,189,118, 56,118, 85, 98,\n      2,116, 53,116, 70,225,243,232,235,233,242,227,249,242,233,236,\n    236,233, 99,128,  4,161,229,238,231,225,236,105,128,  9,149, 99,\n      2,116, 85,116, 91,245,244,101,128, 30, 49,249,242,233,236,236,\n    233, 99,128,  4, 58,228,101,  2,116,108,116,126,243,227,229,238,\n    228,229,242,227,249,242,233,236,236,233, 99,128,  4,155,246, 97,\n    128,  9, 21,102,135,  5,219,116,149,116,158,116,178,116,192,116,\n    201,116,217,116,232,225,242,225,226,233, 99,128,  6, 67,228,225,\n    231,229,243,104,129,251, 59,116,169,232,229,226,242,229,119,128,\n    251, 59,230,233,238,225,236,225,242,225,226,233, 99,128,254,218,\n    232,229,226,242,229,119,128,  5,219,233,238,233,244,233,225,236,\n    225,242,225,226,233, 99,128,254,219,237,229,228,233,225,236,225,\n    242,225,226,233, 99,128,254,220,242,225,230,229,232,229,226,242,\n    229,119,128,251, 77,231,117,  2,116,252,117,  5,234,225,242,225,\n    244,105,128, 10,149,242,237,245,235,232,105,128, 10, 21,104,  2,\n    117, 20,117, 30,233,242,225,231,225,238, 97,128, 48, 75,239,239,\n    235,227,249,242,233,236,236,233, 99,128,  4,196,235,225,244,225,\n    235,225,238, 97,129, 48,171,117, 57,232,225,236,230,247,233,228,\n    244,104,128,255,118,112,  2,117, 75,117, 96,240, 97,129,  3,186,\n    117, 82,243,249,237,226,239,236,231,242,229,229,107,128,  3,240,\n    249,229,239,245,110,  3,117,108,117,122,117,156,237,233,229,245,\n    237,235,239,242,229,225,110,128, 49,113,112,  2,117,128,117,143,\n    232,233,229,245,240,232,235,239,242,229,225,110,128, 49,132,233,\n    229,245,240,235,239,242,229,225,110,128, 49,120,243,243,225,238,\n    231,240,233,229,245,240,235,239,242,229,225,110,128, 49,121,242,\n    239,242,233,233,243,241,245,225,242,101,128, 51, 13,115,  5,117,\n    201,117,245,118,  4,118, 12,118, 40,232,233,228,225,225,245,244,\n    111,  2,117,214,117,223,225,242,225,226,233, 99,128,  6, 64,238,\n    239,243,233,228,229,226,229,225,242,233,238,231,225,242,225,226,\n    233, 99,128,  6, 64,237,225,236,236,235,225,244,225,235,225,238,\n     97,128, 48,245,241,245,225,242,101,128, 51,132,242, 97,  2,118,\n     19,118, 28,225,242,225,226,233, 99,128,  6, 80,244,225,238,225,\n    242,225,226,233, 99,128,  6, 77,244,242,239,235,229,227,249,242,\n    233,236,236,233, 99,128,  4,159,244,225,232,233,242,225,240,242,\n    239,236,239,238,231,237,225,242,235,232,225,236,230,247,233,228,\n    244,104,128,255,112,246,229,242,244,233,227,225,236,243,244,242,\n    239,235,229,227,249,242,233,236,236,233, 99,128,  4,157,226,239,\n    240,239,237,239,230,111,128, 49, 14, 99,  4,118,131,118,153,118,\n    162,118,170, 97,  2,118,137,118,147,236,243,241,245,225,242,101,\n    128, 51,137,242,239,110,128,  1,233,229,228,233,236,236, 97,128,\n      1, 55,233,242,227,236,101,128, 36,218,239,237,237,225,225,227,\n    227,229,238,116,128,  1, 55,228,239,244,226,229,236,239,119,128,\n     30, 51,101,  4,118,204,118,231,119,  0,119, 12,104,  2,118,210,\n    118,221,225,242,237,229,238,233,225,110,128,  5,132,233,242,225,\n    231,225,238, 97,128, 48, 81,235,225,244,225,235,225,238, 97,129,\n     48,177,118,244,232,225,236,230,247,233,228,244,104,128,255,121,\n    238,225,242,237,229,238,233,225,110,128,  5,111,243,237,225,236,\n    236,235,225,244,225,235,225,238, 97,128, 48,246,231,242,229,229,\n    238,236,225,238,228,233, 99,128,  1, 56,104,  6,119, 56,119,185,\n    119,196,119,221,120, 52,120,140, 97,  5,119, 68,119, 78,119, 89,\n    119, 96,119,121,226,229,238,231,225,236,105,128,  9,150,227,249,\n    242,233,236,236,233, 99,128,  4, 69,228,229,246, 97,128,  9, 22,\n    231,117,  2,119,103,119,112,234,225,242,225,244,105,128, 10,150,\n    242,237,245,235,232,105,128, 10, 22,104,  4,119,131,119,140,119,\n    154,119,170,225,242,225,226,233, 99,128,  6, 46,230,233,238,225,\n    236,225,242,225,226,233, 99,128,254,166,233,238,233,244,233,225,\n    236,225,242,225,226,233, 99,128,254,167,237,229,228,233,225,236,\n    225,242,225,226,233, 99,128,254,168,229,233,227,239,240,244,233,\n     99,128,  3,231,232, 97,  2,119,203,119,210,228,229,246, 97,128,\n      9, 89,231,245,242,237,245,235,232,105,128, 10, 89,233,229,245,\n    235,104,  4,119,235,120, 14,120, 29,120, 38, 97,  2,119,241,120,\n      0,227,233,242,227,236,229,235,239,242,229,225,110,128, 50,120,\n    240,225,242,229,238,235,239,242,229,225,110,128, 50, 24,227,233,\n    242,227,236,229,235,239,242,229,225,110,128, 50,106,235,239,242,\n    229,225,110,128, 49, 75,240,225,242,229,238,235,239,242,229,225,\n    110,128, 50, 10,111,  4,120, 62,120,111,120,121,120,126,235,104,\n      4,120, 73,120, 82,120, 91,120,101,225,233,244,232,225,105,128,\n     14,  2,239,238,244,232,225,105,128, 14,  5,245,225,244,244,232,\n    225,105,128, 14,  3,247,225,233,244,232,225,105,128, 14,  4,237,\n    245,244,244,232,225,105,128, 14, 91,239,107,128,  1,153,242,225,\n    235,232,225,238,231,244,232,225,105,128, 14,  6,250,243,241,245,\n    225,242,101,128, 51,145,105,  4,120,160,120,171,120,196,120,245,\n    232,233,242,225,231,225,238, 97,128, 48, 77,235,225,244,225,235,\n    225,238, 97,129, 48,173,120,184,232,225,236,230,247,233,228,244,\n    104,128,255,119,242,111,  3,120,205,120,220,120,236,231,245,242,\n    225,237,245,243,241,245,225,242,101,128, 51, 21,237,229,229,244,\n    239,242,245,243,241,245,225,242,101,128, 51, 22,243,241,245,225,\n    242,101,128, 51, 20,249,229,239,107,  5,121,  4,121, 39,121, 54,\n    121, 63,121, 77, 97,  2,121, 10,121, 25,227,233,242,227,236,229,\n    235,239,242,229,225,110,128, 50,110,240,225,242,229,238,235,239,\n    242,229,225,110,128, 50, 14,227,233,242,227,236,229,235,239,242,\n    229,225,110,128, 50, 96,235,239,242,229,225,110,128, 49, 49,240,\n    225,242,229,238,235,239,242,229,225,110,128, 50,  0,243,233,239,\n    243,235,239,242,229,225,110,128, 49, 51,234,229,227,249,242,233,\n    236,236,233, 99,128,  4, 92,108,  2,121,109,121,120,233,238,229,\n    226,229,236,239,119,128, 30, 53,243,241,245,225,242,101,128, 51,\n    152,109,  3,121,137,121,151,121,162,227,245,226,229,228,243,241,\n    245,225,242,101,128, 51,166,239,238,239,243,240,225,227,101,128,\n    255, 75,243,241,245,225,242,229,228,243,241,245,225,242,101,128,\n     51,162,111,  5,121,190,121,216,121,254,122, 10,122, 24,104,  2,\n    121,196,121,206,233,242,225,231,225,238, 97,128, 48, 83,237,243,\n    241,245,225,242,101,128, 51,192,235, 97,  2,121,223,121,231,233,\n    244,232,225,105,128, 14,  1,244,225,235,225,238, 97,129, 48,179,\n    121,242,232,225,236,230,247,233,228,244,104,128,255,122,239,240,\n    239,243,241,245,225,242,101,128, 51, 30,240,240,225,227,249,242,\n    233,236,236,233, 99,128,  4,129,114,  2,122, 30,122, 50,229,225,\n    238,243,244,225,238,228,225,242,228,243,249,237,226,239,108,128,\n     50,127,239,238,233,243,227,237, 98,128,  3, 67,240, 97,  2,122,\n     67,122, 73,242,229,110,128, 36,166,243,241,245,225,242,101,128,\n     51,170,243,233,227,249,242,233,236,236,233, 99,128,  4,111,116,\n      2,122,101,122,110,243,241,245,225,242,101,128, 51,207,245,242,\n    238,229,100,128,  2,158,117,  2,122,124,122,135,232,233,242,225,\n    231,225,238, 97,128, 48, 79,235,225,244,225,235,225,238, 97,129,\n     48,175,122,148,232,225,236,230,247,233,228,244,104,128,255,120,\n    246,243,241,245,225,242,101,128, 51,184,247,243,241,245,225,242,\n    101,128, 51,190,108,146,  0,108,122,220,124,247,125, 20,125, 86,\n    125,124,126, 20,126, 29,126, 45,126, 69,126, 87,126,205,126,246,\n    127,125,127,133,127,166,127,175,127,183,127,245, 97,  7,122,236,\n    122,246,122,253,123,  4,123, 29,123, 45,124,235,226,229,238,231,\n    225,236,105,128,  9,178,227,245,244,101,128,  1, 58,228,229,246,\n     97,128,  9, 50,231,117,  2,123, 11,123, 20,234,225,242,225,244,\n    105,128, 10,178,242,237,245,235,232,105,128, 10, 50,235,235,232,\n    225,238,231,249,225,239,244,232,225,105,128, 14, 69,109, 10,123,\n     67,124,  6,124, 23,124, 61,124, 75,124, 94,124,110,124,130,124,\n    150,124,173, 97,  2,123, 73,123,254,236,229,102,  4,123, 85,123,\n     99,123,191,123,208,230,233,238,225,236,225,242,225,226,233, 99,\n    128,254,252,232,225,237,250, 97,  2,123,109,123,150,225,226,239,\n    246,101,  2,123,119,123,133,230,233,238,225,236,225,242,225,226,\n    233, 99,128,254,248,233,243,239,236,225,244,229,228,225,242,225,\n    226,233, 99,128,254,247,226,229,236,239,119,  2,123,160,123,174,\n    230,233,238,225,236,225,242,225,226,233, 99,128,254,250,233,243,\n    239,236,225,244,229,228,225,242,225,226,233, 99,128,254,249,233,\n    243,239,236,225,244,229,228,225,242,225,226,233, 99,128,254,251,\n    237,225,228,228,225,225,226,239,246,101,  2,123,223,123,237,230,\n    233,238,225,236,225,242,225,226,233, 99,128,254,246,233,243,239,\n    236,225,244,229,228,225,242,225,226,233, 99,128,254,245,242,225,\n    226,233, 99,128,  6, 68,226,228, 97,129,  3,187,124, 14,243,244,\n    242,239,235,101,128,  1,155,229,100,130,  5,220,124, 32,124, 52,\n    228,225,231,229,243,104,129,251, 60,124, 43,232,229,226,242,229,\n    119,128,251, 60,232,229,226,242,229,119,128,  5,220,230,233,238,\n    225,236,225,242,225,226,233, 99,128,254,222,232,225,232,233,238,\n    233,244,233,225,236,225,242,225,226,233, 99,128,252,202,233,238,\n    233,244,233,225,236,225,242,225,226,233, 99,128,254,223,234,229,\n    229,237,233,238,233,244,233,225,236,225,242,225,226,233, 99,128,\n    252,201,235,232,225,232,233,238,233,244,233,225,236,225,242,225,\n    226,233, 99,128,252,203,236,225,237,232,229,232,233,243,239,236,\n    225,244,229,228,225,242,225,226,233, 99,128,253,242,237,101,  2,\n    124,180,124,193,228,233,225,236,225,242,225,226,233, 99,128,254,\n    224,229,109,  2,124,200,124,219,232,225,232,233,238,233,244,233,\n    225,236,225,242,225,226,233, 99,128,253,136,233,238,233,244,233,\n    225,236,225,242,225,226,233, 99,128,252,204,242,231,229,227,233,\n    242,227,236,101,128, 37,239, 98,  3,124,255,125,  4,125, 10,225,\n    114,128,  1,154,229,236,116,128,  2,108,239,240,239,237,239,230,\n    111,128, 49, 12, 99,  4,125, 30,125, 37,125, 46,125, 73,225,242,\n    239,110,128,  1, 62,229,228,233,236,236, 97,128,  1, 60,233,242,\n     99,  2,125, 54,125, 59,236,101,128, 36,219,245,237,230,236,229,\n    248,226,229,236,239,119,128, 30, 61,239,237,237,225,225,227,227,\n    229,238,116,128,  1, 60,228,239,116,130,  1, 64,125, 96,125,105,\n    225,227,227,229,238,116,128,  1, 64,226,229,236,239,119,129, 30,\n     55,125,115,237,225,227,242,239,110,128, 30, 57,101,  3,125,132,\n    125,170,126, 15,230,116,  2,125,139,125,155,225,238,231,236,229,\n    225,226,239,246,229,227,237, 98,128,  3, 26,244,225,227,235,226,\n    229,236,239,247,227,237, 98,128,  3, 24,243,115,132,  0, 60,125,\n    183,125,205,125,217,126,  7,229,241,245,225,108,129, 34,100,125,\n    193,239,242,231,242,229,225,244,229,114,128, 34,218,237,239,238,\n    239,243,240,225,227,101,128,255, 28,111,  2,125,223,125,252,114,\n      2,125,229,125,242,229,241,245,233,246,225,236,229,238,116,128,\n     34,114,231,242,229,225,244,229,114,128, 34,118,246,229,242,229,\n    241,245,225,108,128, 34,102,243,237,225,236,108,128,254,100,250,\n    104,128,  2,110,230,226,236,239,227,107,128, 37,140,232,239,239,\n    235,242,229,244,242,239,230,236,229,120,128,  2,109,105,  2,126,\n     51,126, 56,242, 97,128, 32,164,247,238,225,242,237,229,238,233,\n    225,110,128,  5,108,106,129,  1,201,126, 75,229,227,249,242,233,\n    236,236,233, 99,128,  4, 89,108,132,246,192,126, 99,126,123,126,\n    134,126,143, 97,  2,126,105,126,112,228,229,246, 97,128,  9, 51,\n    231,245,234,225,242,225,244,105,128, 10,179,233,238,229,226,229,\n    236,239,119,128, 30, 59,236,225,228,229,246, 97,128,  9, 52,246,\n    239,227,225,236,233, 99,  3,126,157,126,167,126,174,226,229,238,\n    231,225,236,105,128,  9,225,228,229,246, 97,128,  9, 97,246,239,\n    247,229,236,243,233,231,110,  2,126,188,126,198,226,229,238,231,\n    225,236,105,128,  9,227,228,229,246, 97,128,  9, 99,109,  3,126,\n    213,126,226,126,237,233,228,228,236,229,244,233,236,228,101,128,\n      2,107,239,238,239,243,240,225,227,101,128,255, 76,243,241,245,\n    225,242,101,128, 51,208,111,  6,127,  4,127, 16,127, 58,127, 69,\n    127, 75,127,117,227,232,245,236,225,244,232,225,105,128, 14, 44,\n    231,233,227,225,108,  3,127, 28,127, 34,127, 53,225,238,100,128,\n     34, 39,238,239,116,129,  0,172,127, 42,242,229,246,229,242,243,\n    229,100,128, 35, 16,239,114,128, 34, 40,236,233,238,231,244,232,\n    225,105,128, 14, 37,238,231,115,128,  1,127,247,236,233,238,101,\n      2,127, 85,127,108, 99,  2,127, 91,127,103,229,238,244,229,242,\n    236,233,238,101,128,254, 78,237, 98,128,  3, 50,228,225,243,232,\n    229,100,128,254, 77,250,229,238,231,101,128, 37,202,240,225,242,\n    229,110,128, 36,167,115,  3,127,141,127,148,127,156,236,225,243,\n    104,128,  1, 66,241,245,225,242,101,128, 33, 19,245,240,229,242,\n    233,239,114,128,246,238,244,243,232,225,228,101,128, 37,145,245,\n    244,232,225,105,128, 14, 38,246,239,227,225,236,233, 99,  3,127,\n    197,127,207,127,214,226,229,238,231,225,236,105,128,  9,140,228,\n    229,246, 97,128,  9, 12,246,239,247,229,236,243,233,231,110,  2,\n    127,228,127,238,226,229,238,231,225,236,105,128,  9,226,228,229,\n    246, 97,128,  9, 98,248,243,241,245,225,242,101,128, 51,211,109,\n    144,  0,109,128, 35,130,144,130,169,130,196,130,221,132, 18,132,\n     40,133, 95,133,125,133,174,134, 25,134, 47,134, 72,134, 81,135,\n    108,135,136, 97, 12,128, 61,128, 71,128,135,128,142,128,167,128,\n    215,130, 51,130, 76,130, 81,130, 95,130,107,130,112,226,229,238,\n    231,225,236,105,128,  9,174, 99,  2,128, 77,128,129,242,239,110,\n    132,  0,175,128, 91,128,102,128,108,128,117,226,229,236,239,247,\n    227,237, 98,128,  3, 49,227,237, 98,128,  3,  4,236,239,247,237,\n    239,100,128,  2,205,237,239,238,239,243,240,225,227,101,128,255,\n    227,245,244,101,128, 30, 63,228,229,246, 97,128,  9, 46,231,117,\n      2,128,149,128,158,234,225,242,225,244,105,128, 10,174,242,237,\n    245,235,232,105,128, 10, 46,104,  2,128,173,128,205,225,240,225,\n    235,104,  2,128,183,128,192,232,229,226,242,229,119,128,  5,164,\n    236,229,230,244,232,229,226,242,229,119,128,  5,164,233,242,225,\n    231,225,238, 97,128, 48,126,105,  5,128,227,129, 40,129,103,129,\n    133,130, 39,227,232,225,244,244,225,247, 97,  3,128,242,129, 17,\n    129, 24,236,239,119,  2,128,250,129,  5,236,229,230,244,244,232,\n    225,105,128,248,149,242,233,231,232,244,244,232,225,105,128,248,\n    148,244,232,225,105,128, 14, 75,245,240,240,229,242,236,229,230,\n    244,244,232,225,105,128,248,147,229,107,  3,129, 49,129, 80,129,\n     87,236,239,119,  2,129, 57,129, 68,236,229,230,244,244,232,225,\n    105,128,248,140,242,233,231,232,244,244,232,225,105,128,248,139,\n    244,232,225,105,128, 14, 72,245,240,240,229,242,236,229,230,244,\n    244,232,225,105,128,248,138,232,225,238,225,235,225,116,  2,129,\n    115,129,126,236,229,230,244,244,232,225,105,128,248,132,244,232,\n    225,105,128, 14, 49,116,  3,129,141,129,169,129,232,225,233,235,\n    232,117,  2,129,151,129,162,236,229,230,244,244,232,225,105,128,\n    248,137,244,232,225,105,128, 14, 71,232,111,  3,129,178,129,209,\n    129,216,236,239,119,  2,129,186,129,197,236,229,230,244,244,232,\n    225,105,128,248,143,242,233,231,232,244,244,232,225,105,128,248,\n    142,244,232,225,105,128, 14, 73,245,240,240,229,242,236,229,230,\n    244,244,232,225,105,128,248,141,242,105,  3,129,241,130, 16,130,\n     23,236,239,119,  2,129,249,130,  4,236,229,230,244,244,232,225,\n    105,128,248,146,242,233,231,232,244,244,232,225,105,128,248,145,\n    244,232,225,105,128, 14, 74,245,240,240,229,242,236,229,230,244,\n    244,232,225,105,128,248,144,249,225,237,239,235,244,232,225,105,\n    128, 14, 70,235,225,244,225,235,225,238, 97,129, 48,222,130, 64,\n    232,225,236,230,247,233,228,244,104,128,255,143,236,101,128, 38,\n     66,238,243,249,239,238,243,241,245,225,242,101,128, 51, 71,241,\n    225,230,232,229,226,242,229,119,128,  5,190,242,115,128, 38, 66,\n    115,  2,130,118,130,136,239,242,225,227,233,242,227,236,229,232,\n    229,226,242,229,119,128,  5,175,241,245,225,242,101,128, 51,131,\n     98,  2,130,150,130,160,239,240,239,237,239,230,111,128, 49,  7,\n    243,241,245,225,242,101,128, 51,212, 99,  2,130,175,130,183,233,\n    242,227,236,101,128, 36,220,245,226,229,228,243,241,245,225,242,\n    101,128, 51,165,228,239,116,  2,130,204,130,213,225,227,227,229,\n    238,116,128, 30, 65,226,229,236,239,119,128, 30, 67,101,  7,130,\n    237,131,108,131,119,131,134,131,159,131,196,131,208,101,  2,130,\n    243,131, 95,109,  4,130,253,131,  6,131, 20,131, 36,225,242,225,\n    226,233, 99,128,  6, 69,230,233,238,225,236,225,242,225,226,233,\n     99,128,254,226,233,238,233,244,233,225,236,225,242,225,226,233,\n     99,128,254,227,237,101,  2,131, 43,131, 56,228,233,225,236,225,\n    242,225,226,233, 99,128,254,228,229,237,105,  2,131, 64,131, 79,\n    238,233,244,233,225,236,225,242,225,226,233, 99,128,252,209,243,\n    239,236,225,244,229,228,225,242,225,226,233, 99,128,252, 72,244,\n    239,242,245,243,241,245,225,242,101,128, 51, 77,232,233,242,225,\n    231,225,238, 97,128, 48,129,233,250,233,229,242,225,243,241,245,\n    225,242,101,128, 51,126,235,225,244,225,235,225,238, 97,129, 48,\n    225,131,147,232,225,236,230,247,233,228,244,104,128,255,146,109,\n    130,  5,222,131,167,131,187,228,225,231,229,243,104,129,251, 62,\n    131,178,232,229,226,242,229,119,128,251, 62,232,229,226,242,229,\n    119,128,  5,222,238,225,242,237,229,238,233,225,110,128,  5,116,\n    242,235,232, 97,  3,131,219,131,228,132,  5,232,229,226,242,229,\n    119,128,  5,165,235,229,230,245,236, 97,  2,131,239,131,248,232,\n    229,226,242,229,119,128,  5,166,236,229,230,244,232,229,226,242,\n    229,119,128,  5,166,236,229,230,244,232,229,226,242,229,119,128,\n      5,165,104,  2,132, 24,132, 30,239,239,107,128,  2,113,250,243,\n    241,245,225,242,101,128, 51,146,105,  6,132, 54,132, 91,132,228,\n    132,239,133,  8,133, 65,228,100,  2,132, 61,132, 86,236,229,228,\n    239,244,235,225,244,225,235,225,238,225,232,225,236,230,247,233,\n    228,244,104,128,255,101,239,116,128,  0,183,229,245,109,  5,132,\n    105,132,140,132,155,132,164,132,215, 97,  2,132,111,132,126,227,\n    233,242,227,236,229,235,239,242,229,225,110,128, 50,114,240,225,\n    242,229,238,235,239,242,229,225,110,128, 50, 18,227,233,242,227,\n    236,229,235,239,242,229,225,110,128, 50,100,235,239,242,229,225,\n    110,128, 49, 65,112,  2,132,170,132,202, 97,  2,132,176,132,190,\n    238,243,233,239,243,235,239,242,229,225,110,128, 49,112,242,229,\n    238,235,239,242,229,225,110,128, 50,  4,233,229,245,240,235,239,\n    242,229,225,110,128, 49,110,243,233,239,243,235,239,242,229,225,\n    110,128, 49,111,232,233,242,225,231,225,238, 97,128, 48,127,235,\n    225,244,225,235,225,238, 97,129, 48,223,132,252,232,225,236,230,\n    247,233,228,244,104,128,255,144,238,117,  2,133, 15,133, 60,115,\n    132, 34, 18,133, 27,133, 38,133, 47,133, 53,226,229,236,239,247,\n    227,237, 98,128,  3, 32,227,233,242,227,236,101,128, 34,150,237,\n    239,100,128,  2,215,240,236,245,115,128, 34, 19,244,101,128, 32,\n     50,242,105,  2,133, 72,133, 86,226,225,225,242,245,243,241,245,\n    225,242,101,128, 51, 74,243,241,245,225,242,101,128, 51, 73,108,\n      2,133,101,133,116,239,238,231,236,229,231,244,245,242,238,229,\n    100,128,  2,112,243,241,245,225,242,101,128, 51,150,109,  3,133,\n    133,133,147,133,158,227,245,226,229,228,243,241,245,225,242,101,\n    128, 51,163,239,238,239,243,240,225,227,101,128,255, 77,243,241,\n    245,225,242,229,228,243,241,245,225,242,101,128, 51,159,111,  5,\n    133,186,133,212,133,237,133,247,134,  0,104,  2,133,192,133,202,\n    233,242,225,231,225,238, 97,128, 48,130,237,243,241,245,225,242,\n    101,128, 51,193,235,225,244,225,235,225,238, 97,129, 48,226,133,\n    225,232,225,236,230,247,233,228,244,104,128,255,147,236,243,241,\n    245,225,242,101,128, 51,214,237,225,244,232,225,105,128, 14, 33,\n    246,229,242,243,243,241,245,225,242,101,129, 51,167,134, 15,228,\n    243,241,245,225,242,101,128, 51,168,240, 97,  2,134, 32,134, 38,\n    242,229,110,128, 36,168,243,241,245,225,242,101,128, 51,171,115,\n      2,134, 53,134, 62,243,241,245,225,242,101,128, 51,179,245,240,\n    229,242,233,239,114,128,246,239,244,245,242,238,229,100,128,  2,\n    111,117,141,  0,181,134,111,134,115,134,125,134,149,134,159,134,\n    181,134,192,134,217,134,240,134,250,135, 24,135, 88,135, 98, 49,\n    128,  0,181,225,243,241,245,225,242,101,128, 51,130,227,104,  2,\n    134,132,134,142,231,242,229,225,244,229,114,128, 34,107,236,229,\n    243,115,128, 34,106,230,243,241,245,225,242,101,128, 51,140,103,\n      2,134,165,134,172,242,229,229,107,128,  3,188,243,241,245,225,\n    242,101,128, 51,141,232,233,242,225,231,225,238, 97,128, 48,128,\n    235,225,244,225,235,225,238, 97,129, 48,224,134,205,232,225,236,\n    230,247,233,228,244,104,128,255,145,108,  2,134,223,134,232,243,\n    241,245,225,242,101,128, 51,149,244,233,240,236,121,128,  0,215,\n    237,243,241,245,225,242,101,128, 51,155,238,225,104,  2,135,  2,\n    135, 11,232,229,226,242,229,119,128,  5,163,236,229,230,244,232,\n    229,226,242,229,119,128,  5,163,115,  2,135, 30,135, 79,233, 99,\n      3,135, 39,135, 56,135, 67,225,236,238,239,244,101,129, 38,106,\n    135, 50,228,226,108,128, 38,107,230,236,225,244,243,233,231,110,\n    128, 38,109,243,232,225,242,240,243,233,231,110,128, 38,111,243,\n    241,245,225,242,101,128, 51,178,246,243,241,245,225,242,101,128,\n     51,182,247,243,241,245,225,242,101,128, 51,188,118,  2,135,114,\n    135,127,237,229,231,225,243,241,245,225,242,101,128, 51,185,243,\n    241,245,225,242,101,128, 51,183,119,  2,135,142,135,155,237,229,\n    231,225,243,241,245,225,242,101,128, 51,191,243,241,245,225,242,\n    101,128, 51,189,110,150,  0,110,135,212,136, 90,136,114,136,180,\n    136,205,137,  7,137, 17,137, 84,137,127,139,161,139,179,139,204,\n    139,235,140,  5,140, 70,142, 52,142, 60,142, 85,142, 93,143, 61,\n    143, 71,143, 81, 97,  8,135,230,135,250,136,  1,136,  8,136, 33,\n    136, 44,136, 69,136, 81, 98,  2,135,236,135,245,229,238,231,225,\n    236,105,128,  9,168,236, 97,128, 34,  7,227,245,244,101,128,  1,\n     68,228,229,246, 97,128,  9, 40,231,117,  2,136, 15,136, 24,234,\n    225,242,225,244,105,128, 10,168,242,237,245,235,232,105,128, 10,\n     40,232,233,242,225,231,225,238, 97,128, 48,106,235,225,244,225,\n    235,225,238, 97,129, 48,202,136, 57,232,225,236,230,247,233,228,\n    244,104,128,255,133,240,239,243,244,242,239,240,232,101,128,  1,\n     73,243,241,245,225,242,101,128, 51,129, 98,  2,136, 96,136,106,\n    239,240,239,237,239,230,111,128, 49, 11,243,240,225,227,101,128,\n      0,160, 99,  4,136,124,136,131,136,140,136,167,225,242,239,110,\n    128,  1, 72,229,228,233,236,236, 97,128,  1, 70,233,242, 99,  2,\n    136,148,136,153,236,101,128, 36,221,245,237,230,236,229,248,226,\n    229,236,239,119,128, 30, 75,239,237,237,225,225,227,227,229,238,\n    116,128,  1, 70,228,239,116,  2,136,188,136,197,225,227,227,229,\n    238,116,128, 30, 69,226,229,236,239,119,128, 30, 71,101,  3,136,\n    213,136,224,136,249,232,233,242,225,231,225,238, 97,128, 48,109,\n    235,225,244,225,235,225,238, 97,129, 48,205,136,237,232,225,236,\n    230,247,233,228,244,104,128,255,136,247,243,232,229,241,229,236,\n    243,233,231,110,128, 32,170,230,243,241,245,225,242,101,128, 51,\n    139,103,  2,137, 23,137, 73, 97,  3,137, 31,137, 41,137, 48,226,\n    229,238,231,225,236,105,128,  9,153,228,229,246, 97,128,  9, 25,\n    231,117,  2,137, 55,137, 64,234,225,242,225,244,105,128, 10,153,\n    242,237,245,235,232,105,128, 10, 25,239,238,231,245,244,232,225,\n    105,128, 14,  7,104,  2,137, 90,137,100,233,242,225,231,225,238,\n     97,128, 48,147,239,239,107,  2,137,108,137,115,236,229,230,116,\n    128,  2,114,242,229,244,242,239,230,236,229,120,128,  2,115,105,\n      4,137,137,138, 50,138, 61,138,119,229,245,110,  7,137,155,137,\n    190,137,222,137,236,137,245,138, 22,138, 35, 97,  2,137,161,137,\n    176,227,233,242,227,236,229,235,239,242,229,225,110,128, 50,111,\n    240,225,242,229,238,235,239,242,229,225,110,128, 50, 15,227,105,\n      2,137,197,137,209,229,245,227,235,239,242,229,225,110,128, 49,\n     53,242,227,236,229,235,239,242,229,225,110,128, 50, 97,232,233,\n    229,245,232,235,239,242,229,225,110,128, 49, 54,235,239,242,229,\n    225,110,128, 49, 52,240, 97,  2,137,252,138, 10,238,243,233,239,\n    243,235,239,242,229,225,110,128, 49,104,242,229,238,235,239,242,\n    229,225,110,128, 50,  1,243,233,239,243,235,239,242,229,225,110,\n    128, 49,103,244,233,235,229,245,244,235,239,242,229,225,110,128,\n     49,102,232,233,242,225,231,225,238, 97,128, 48,107,107,  2,138,\n     67,138, 91,225,244,225,235,225,238, 97,129, 48,203,138, 79,232,\n    225,236,230,247,233,228,244,104,128,255,134,232,225,232,233,116,\n      2,138,101,138,112,236,229,230,244,244,232,225,105,128,248,153,\n    244,232,225,105,128, 14, 77,238,101,141,  0, 57,138,150,138,159,\n    138,169,138,199,138,206,138,231,139,  2,139, 36,139, 48,139, 59,\n    139, 92,139,100,139,111,225,242,225,226,233, 99,128,  6,105,226,\n    229,238,231,225,236,105,128,  9,239,227,233,242,227,236,101,129,\n     36,104,138,180,233,238,246,229,242,243,229,243,225,238,243,243,\n    229,242,233,102,128, 39,146,228,229,246, 97,128,  9,111,231,117,\n      2,138,213,138,222,234,225,242,225,244,105,128, 10,239,242,237,\n    245,235,232,105,128, 10,111,232, 97,  2,138,238,138,249,227,235,\n    225,242,225,226,233, 99,128,  6,105,238,231,250,232,239,117,128,\n     48, 41,105,  2,139,  8,139, 26,228,229,239,231,242,225,240,232,\n    233,227,240,225,242,229,110,128, 50, 40,238,230,229,242,233,239,\n    114,128, 32,137,237,239,238,239,243,240,225,227,101,128,255, 25,\n    239,236,228,243,244,249,236,101,128,247, 57,112,  2,139, 65,139,\n     72,225,242,229,110,128, 36,124,229,114,  2,139, 79,139, 85,233,\n    239,100,128, 36,144,243,233,225,110,128,  6,249,242,239,237,225,\n    110,128, 33,120,243,245,240,229,242,233,239,114,128, 32,121,116,\n      2,139,117,139,155,229,229,110,  2,139,125,139,134,227,233,242,\n    227,236,101,128, 36,114,112,  2,139,140,139,147,225,242,229,110,\n    128, 36,134,229,242,233,239,100,128, 36,154,232,225,105,128, 14,\n     89,106,129,  1,204,139,167,229,227,249,242,233,236,236,233, 99,\n    128,  4, 90,235,225,244,225,235,225,238, 97,129, 48,243,139,192,\n    232,225,236,230,247,233,228,244,104,128,255,157,108,  2,139,210,\n    139,224,229,231,242,233,231,232,244,236,239,238,103,128,  1,158,\n    233,238,229,226,229,236,239,119,128, 30, 73,109,  2,139,241,139,\n    252,239,238,239,243,240,225,227,101,128,255, 78,243,241,245,225,\n    242,101,128, 51,154,110,  2,140, 11,140, 61, 97,  3,140, 19,140,\n     29,140, 36,226,229,238,231,225,236,105,128,  9,163,228,229,246,\n     97,128,  9, 35,231,117,  2,140, 43,140, 52,234,225,242,225,244,\n    105,128, 10,163,242,237,245,235,232,105,128, 10, 35,238,225,228,\n    229,246, 97,128,  9, 41,111,  6,140, 84,140, 95,140,120,140,161,\n    141,113,142, 40,232,233,242,225,231,225,238, 97,128, 48,110,235,\n    225,244,225,235,225,238, 97,129, 48,206,140,108,232,225,236,230,\n    247,233,228,244,104,128,255,137,110,  3,140,128,140,144,140,153,\n    226,242,229,225,235,233,238,231,243,240,225,227,101,128,  0,160,\n    229,238,244,232,225,105,128, 14, 19,245,244,232,225,105,128, 14,\n     25,239,110,  7,140,178,140,187,140,201,140,235,140,251,141, 36,\n    141, 95,225,242,225,226,233, 99,128,  6, 70,230,233,238,225,236,\n    225,242,225,226,233, 99,128,254,230,231,232,245,238,238, 97,  2,\n    140,212,140,221,225,242,225,226,233, 99,128,  6,186,230,233,238,\n    225,236,225,242,225,226,233, 99,128,251,159,233,238,233,244,233,\n    225,236,225,242,225,226,233, 99,128,254,231,234,229,229,237,105,\n      2,141,  5,141, 20,238,233,244,233,225,236,225,242,225,226,233,\n     99,128,252,210,243,239,236,225,244,229,228,225,242,225,226,233,\n     99,128,252, 75,237,101,  2,141, 43,141, 56,228,233,225,236,225,\n    242,225,226,233, 99,128,254,232,229,237,105,  2,141, 64,141, 79,\n    238,233,244,233,225,236,225,242,225,226,233, 99,128,252,213,243,\n    239,236,225,244,229,228,225,242,225,226,233, 99,128,252, 78,238,\n    239,239,238,230,233,238,225,236,225,242,225,226,233, 99,128,252,\n    141,116,  7,141,129,141,140,141,169,141,204,141,216,141,236,142,\n      6,227,239,238,244,225,233,238,115,128, 34, 12,101,  2,141,146,\n    141,162,236,229,237,229,238,116,129, 34,  9,141,157,239,102,128,\n     34,  9,241,245,225,108,128, 34, 96,231,242,229,225,244,229,114,\n    129, 34,111,141,181,238,239,114,  2,141,189,141,197,229,241,245,\n    225,108,128, 34,113,236,229,243,115,128, 34,121,233,228,229,238,\n    244,233,227,225,108,128, 34, 98,236,229,243,115,129, 34,110,141,\n    225,238,239,242,229,241,245,225,108,128, 34,112,112,  2,141,242,\n    141,252,225,242,225,236,236,229,108,128, 34, 38,242,229,227,229,\n    228,229,115,128, 34,128,243,117,  3,142, 15,142, 22,142, 31,226,\n    243,229,116,128, 34,132,227,227,229,229,228,115,128, 34,129,240,\n    229,242,243,229,116,128, 34,133,247,225,242,237,229,238,233,225,\n    110,128,  5,118,240,225,242,229,110,128, 36,169,115,  2,142, 66,\n    142, 75,243,241,245,225,242,101,128, 51,177,245,240,229,242,233,\n    239,114,128, 32,127,244,233,236,228,101,128,  0,241,117,132,  3,\n    189,142,105,142,116,142,197,143, 24,232,233,242,225,231,225,238,\n     97,128, 48,108,107,  2,142,122,142,146,225,244,225,235,225,238,\n     97,129, 48,204,142,134,232,225,236,230,247,233,228,244,104,128,\n    255,135,244, 97,  3,142,155,142,165,142,172,226,229,238,231,225,\n    236,105,128,  9,188,228,229,246, 97,128,  9, 60,231,117,  2,142,\n    179,142,188,234,225,242,225,244,105,128, 10,188,242,237,245,235,\n    232,105,128, 10, 60,109,  2,142,203,142,237,226,229,242,243,233,\n    231,110,130,  0, 35,142,217,142,229,237,239,238,239,243,240,225,\n    227,101,128,255,  3,243,237,225,236,108,128,254, 95,229,114,  2,\n    142,244,143, 20,225,236,243,233,231,110,  2,142,255,143,  7,231,\n    242,229,229,107,128,  3,116,236,239,247,229,242,231,242,229,229,\n    107,128,  3,117,111,128, 33, 22,110,130,  5,224,143, 32,143, 52,\n    228,225,231,229,243,104,129,251, 64,143, 43,232,229,226,242,229,\n    119,128,251, 64,232,229,226,242,229,119,128,  5,224,246,243,241,\n    245,225,242,101,128, 51,181,247,243,241,245,225,242,101,128, 51,\n    187,249, 97,  3,143, 90,143,100,143,107,226,229,238,231,225,236,\n    105,128,  9,158,228,229,246, 97,128,  9, 30,231,117,  2,143,114,\n    143,123,234,225,242,225,244,105,128, 10,158,242,237,245,235,232,\n    105,128, 10, 30,111,147,  0,111,143,174,143,196,144, 18,144,188,\n    145,  4,145, 19,145, 59,145,182,145,203,145,241,145,252,146,174,\n    148,  8,148, 72,148,105,148,151,149, 24,149, 71,149, 83, 97,  2,\n    143,180,143,187,227,245,244,101,128,  0,243,238,231,244,232,225,\n    105,128, 14, 45, 98,  4,143,206,143,248,144,  1,144, 11,225,242,\n    242,229,100,130,  2,117,143,218,143,229,227,249,242,233,236,236,\n    233, 99,128,  4,233,228,233,229,242,229,243,233,243,227,249,242,\n    233,236,236,233, 99,128,  4,235,229,238,231,225,236,105,128,  9,\n    147,239,240,239,237,239,230,111,128, 49, 27,242,229,246,101,128,\n      1, 79, 99,  3,144, 26,144, 99,144,178, 97,  2,144, 32,144, 93,\n    238,228,242, 97,  3,144, 43,144, 50,144, 61,228,229,246, 97,128,\n      9, 17,231,245,234,225,242,225,244,105,128, 10,145,246,239,247,\n    229,236,243,233,231,110,  2,144, 75,144, 82,228,229,246, 97,128,\n      9, 73,231,245,234,225,242,225,244,105,128, 10,201,242,239,110,\n    128,  1,210,233,242, 99,  2,144,107,144,112,236,101,128, 36,222,\n    245,237,230,236,229,120,133,  0,244,144,131,144,139,144,150,144,\n    158,144,170,225,227,245,244,101,128, 30,209,228,239,244,226,229,\n    236,239,119,128, 30,217,231,242,225,246,101,128, 30,211,232,239,\n    239,235,225,226,239,246,101,128, 30,213,244,233,236,228,101,128,\n     30,215,249,242,233,236,236,233, 99,128,  4, 62,100,  4,144,198,\n    144,221,144,227,144,250,226,108,  2,144,205,144,213,225,227,245,\n    244,101,128,  1, 81,231,242,225,246,101,128,  2, 13,229,246, 97,\n    128,  9, 19,233,229,242,229,243,233,115,129,  0,246,144,239,227,\n    249,242,233,236,236,233, 99,128,  4,231,239,244,226,229,236,239,\n    119,128, 30,205,101,129,  1, 83,145, 10,235,239,242,229,225,110,\n    128, 49, 90,103,  3,145, 27,145, 42,145, 49,239,238,229,107,129,\n      2,219,145, 36,227,237, 98,128,  3, 40,242,225,246,101,128,  0,\n    242,245,234,225,242,225,244,105,128, 10,147,104,  4,145, 69,145,\n     80,145, 90,145,168,225,242,237,229,238,233,225,110,128,  5,133,\n    233,242,225,231,225,238, 97,128, 48, 74,111,  2,145, 96,145,106,\n    239,235,225,226,239,246,101,128, 30,207,242,110,133,  1,161,145,\n    121,145,129,145,140,145,148,145,160,225,227,245,244,101,128, 30,\n    219,228,239,244,226,229,236,239,119,128, 30,227,231,242,225,246,\n    101,128, 30,221,232,239,239,235,225,226,239,246,101,128, 30,223,\n    244,233,236,228,101,128, 30,225,245,238,231,225,242,245,237,236,\n    225,245,116,128,  1, 81,105,129,  1,163,145,188,238,246,229,242,\n    244,229,228,226,242,229,246,101,128,  2, 15,107,  2,145,209,145,\n    233,225,244,225,235,225,238, 97,129, 48,170,145,221,232,225,236,\n    230,247,233,228,244,104,128,255,117,239,242,229,225,110,128, 49,\n     87,236,229,232,229,226,242,229,119,128,  5,171,109,  6,146, 10,\n    146, 38,146, 45,146,134,146,145,146,163,225,227,242,239,110,130,\n      1, 77,146, 22,146, 30,225,227,245,244,101,128, 30, 83,231,242,\n    225,246,101,128, 30, 81,228,229,246, 97,128,  9, 80,229,231, 97,\n    133,  3,201,146, 61,146, 65,146, 76,146, 90,146,106, 49,128,  3,\n    214,227,249,242,233,236,236,233, 99,128,  4, 97,236,225,244,233,\n    238,227,236,239,243,229,100,128,  2,119,242,239,245,238,228,227,\n    249,242,233,236,236,233, 99,128,  4,123,116,  2,146,112,146,127,\n    233,244,236,239,227,249,242,233,236,236,233, 99,128,  4,125,239,\n    238,239,115,128,  3,206,231,245,234,225,242,225,244,105,128, 10,\n    208,233,227,242,239,110,129,  3,191,146,155,244,239,238,239,115,\n    128,  3,204,239,238,239,243,240,225,227,101,128,255, 79,238,101,\n    145,  0, 49,146,213,146,222,146,232,147,  6,147, 31,147, 40,147,\n     49,147, 74,147,108,147,142,147,154,147,173,147,184,147,217,147,\n    227,147,235,147,246,225,242,225,226,233, 99,128,  6, 97,226,229,\n    238,231,225,236,105,128,  9,231,227,233,242,227,236,101,129, 36,\n     96,146,243,233,238,246,229,242,243,229,243,225,238,243,243,229,\n    242,233,102,128, 39,138,100,  2,147, 12,147, 18,229,246, 97,128,\n      9,103,239,244,229,238,236,229,225,228,229,114,128, 32, 36,229,\n    233,231,232,244,104,128, 33, 91,230,233,244,244,229,100,128,246,\n    220,231,117,  2,147, 56,147, 65,234,225,242,225,244,105,128, 10,\n    231,242,237,245,235,232,105,128, 10,103,232, 97,  3,147, 83,147,\n     94,147, 99,227,235,225,242,225,226,233, 99,128,  6, 97,236,102,\n    128,  0,189,238,231,250,232,239,117,128, 48, 33,105,  2,147,114,\n    147,132,228,229,239,231,242,225,240,232,233,227,240,225,242,229,\n    110,128, 50, 32,238,230,229,242,233,239,114,128, 32,129,237,239,\n    238,239,243,240,225,227,101,128,255, 17,238,245,237,229,242,225,\n    244,239,242,226,229,238,231,225,236,105,128,  9,244,239,236,228,\n    243,244,249,236,101,128,247, 49,112,  2,147,190,147,197,225,242,\n    229,110,128, 36,116,229,114,  2,147,204,147,210,233,239,100,128,\n     36,136,243,233,225,110,128,  6,241,241,245,225,242,244,229,114,\n    128,  0,188,242,239,237,225,110,128, 33,112,243,245,240,229,242,\n    233,239,114,128,  0,185,244,104,  2,147,253,148,  2,225,105,128,\n     14, 81,233,242,100,128, 33, 83,111,  3,148, 16,148, 50,148, 66,\n    103,  2,148, 22,148, 40,239,238,229,107,129,  1,235,148, 31,237,\n    225,227,242,239,110,128,  1,237,245,242,237,245,235,232,105,128,\n     10, 19,237,225,244,242,225,231,245,242,237,245,235,232,105,128,\n     10, 75,240,229,110,128,  2, 84,112,  3,148, 80,148, 87,148, 98,\n    225,242,229,110,128, 36,170,229,238,226,245,236,236,229,116,128,\n     37,230,244,233,239,110,128, 35, 37,114,  2,148,111,148,140,100,\n      2,148,117,148,128,230,229,237,233,238,233,238,101,128,  0,170,\n    237,225,243,227,245,236,233,238,101,128,  0,186,244,232,239,231,\n    239,238,225,108,128, 34, 31,115,  5,148,163,148,195,148,212,149,\n      1,149, 14,232,239,242,116,  2,148,172,148,179,228,229,246, 97,\n    128,  9, 18,246,239,247,229,236,243,233,231,238,228,229,246, 97,\n    128,  9, 74,236,225,243,104,129,  0,248,148,204,225,227,245,244,\n    101,128,  1,255,237,225,236,108,  2,148,221,148,232,232,233,242,\n    225,231,225,238, 97,128, 48, 73,235,225,244,225,235,225,238, 97,\n    129, 48,169,148,245,232,225,236,230,247,233,228,244,104,128,255,\n    107,244,242,239,235,229,225,227,245,244,101,128,  1,255,245,240,\n    229,242,233,239,114,128,246,240,116,  2,149, 30,149, 41,227,249,\n    242,233,236,236,233, 99,128,  4,127,233,236,228,101,130,  0,245,\n    149, 52,149, 60,225,227,245,244,101,128, 30, 77,228,233,229,242,\n    229,243,233,115,128, 30, 79,245,226,239,240,239,237,239,230,111,\n    128, 49, 33,118,  2,149, 89,149,170,229,114,  2,149, 96,149,162,\n    236,233,238,101,131, 32, 62,149,109,149,132,149,155, 99,  2,149,\n    115,149,127,229,238,244,229,242,236,233,238,101,128,254, 74,237,\n     98,128,  3,  5,100,  2,149,138,149,146,225,243,232,229,100,128,\n    254, 73,226,236,247,225,246,121,128,254, 76,247,225,246,121,128,\n    254, 75,243,227,239,242,101,128,  0,175,239,247,229,236,243,233,\n    231,110,  3,149,185,149,195,149,202,226,229,238,231,225,236,105,\n    128,  9,203,228,229,246, 97,128,  9, 75,231,245,234,225,242,225,\n    244,105,128, 10,203,112,145,  0,112,149,251,152,123,152,134,152,\n    143,152,155,154, 80,154, 90,155, 82,156,101,156,191,156,217,157,\n     92,157,100,158,  2,158, 60,158, 88,158, 98, 97, 14,150, 25,150,\n     57,150, 67,150, 74,150, 81,150,129,150,140,150,154,150,165,150,\n    212,150,226,151,238,152, 21,152,111, 97,  2,150, 31,150, 43,237,\n    240,243,243,241,245,225,242,101,128, 51,128,243,229,238,244,239,\n    243,241,245,225,242,101,128, 51, 43,226,229,238,231,225,236,105,\n    128,  9,170,227,245,244,101,128, 30, 85,228,229,246, 97,128,  9,\n     42,103,  2,150, 87,150,105,101,  2,150, 93,150,100,228,239,247,\n    110,128, 33,223,245,112,128, 33,222,117,  2,150,111,150,120,234,\n    225,242,225,244,105,128, 10,170,242,237,245,235,232,105,128, 10,\n     42,232,233,242,225,231,225,238, 97,128, 48,113,233,249,225,238,\n    238,239,233,244,232,225,105,128, 14, 47,235,225,244,225,235,225,\n    238, 97,128, 48,209,108,  2,150,171,150,196,225,244,225,236,233,\n    250,225,244,233,239,238,227,249,242,233,236,236,233,227,227,237,\n     98,128,  4,132,239,227,232,235,225,227,249,242,233,236,236,233,\n     99,128,  4,192,238,243,233,239,243,235,239,242,229,225,110,128,\n     49,127,114,  3,150,234,150,255,151,227, 97,  2,150,240,150,248,\n    231,242,225,240,104,128,  0,182,236,236,229,108,128, 34, 37,229,\n    110,  2,151,  6,151,116,236,229,230,116,136,  0, 40,151, 29,151,\n     44,151, 49,151, 54,151, 65,151, 77,151,100,151,105,225,236,244,\n    239,238,229,225,242,225,226,233, 99,128,253, 62,226,116,128,248,\n    237,229,120,128,248,236,233,238,230,229,242,233,239,114,128, 32,\n    141,237,239,238,239,243,240,225,227,101,128,255,  8,115,  2,151,\n     83,151, 90,237,225,236,108,128,254, 89,245,240,229,242,233,239,\n    114,128, 32,125,244,112,128,248,235,246,229,242,244,233,227,225,\n    108,128,254, 53,242,233,231,232,116,136,  0, 41,151,140,151,155,\n    151,160,151,165,151,176,151,188,151,211,151,216,225,236,244,239,\n    238,229,225,242,225,226,233, 99,128,253, 63,226,116,128,248,248,\n    229,120,128,248,247,233,238,230,229,242,233,239,114,128, 32,142,\n    237,239,238,239,243,240,225,227,101,128,255,  9,115,  2,151,194,\n    151,201,237,225,236,108,128,254, 90,245,240,229,242,233,239,114,\n    128, 32,126,244,112,128,248,246,246,229,242,244,233,227,225,108,\n    128,254, 54,244,233,225,236,228,233,230,102,128, 34,  2,115,  3,\n    151,246,152,  1,152, 13,229,241,232,229,226,242,229,119,128,  5,\n    192,232,244,225,232,229,226,242,229,119,128,  5,153,241,245,225,\n    242,101,128, 51,169,244,225,104,134,  5,183,152, 39,152, 53,152,\n     58,152, 67,152, 82,152, 98, 49,  2,152, 45,152, 49, 49,128,  5,\n    183,100,128,  5,183,178, 97,128,  5,183,232,229,226,242,229,119,\n    128,  5,183,238,225,242,242,239,247,232,229,226,242,229,119,128,\n      5,183,241,245,225,242,244,229,242,232,229,226,242,229,119,128,\n      5,183,247,233,228,229,232,229,226,242,229,119,128,  5,183,250,\n    229,242,232,229,226,242,229,119,128,  5,161,226,239,240,239,237,\n    239,230,111,128, 49,  6,227,233,242,227,236,101,128, 36,223,228,\n    239,244,225,227,227,229,238,116,128, 30, 87,101,137,  5,228,152,\n    177,152,188,152,208,152,220,152,240,153, 86,153, 97,153,118,154,\n     73,227,249,242,233,236,236,233, 99,128,  4, 63,228,225,231,229,\n    243,104,129,251, 68,152,199,232,229,226,242,229,119,128,251, 68,\n    229,250,233,243,241,245,225,242,101,128, 51, 59,230,233,238,225,\n    236,228,225,231,229,243,232,232,229,226,242,229,119,128,251, 67,\n    104,  5,152,252,153, 19,153, 27,153, 41,153, 71,225,114,  2,153,\n      3,153, 10,225,226,233, 99,128,  6,126,237,229,238,233,225,110,\n    128,  5,122,229,226,242,229,119,128,  5,228,230,233,238,225,236,\n    225,242,225,226,233, 99,128,251, 87,105,  2,153, 47,153, 62,238,\n    233,244,233,225,236,225,242,225,226,233, 99,128,251, 88,242,225,\n    231,225,238, 97,128, 48,122,237,229,228,233,225,236,225,242,225,\n    226,233, 99,128,251, 89,235,225,244,225,235,225,238, 97,128, 48,\n    218,237,233,228,228,236,229,232,239,239,235,227,249,242,233,236,\n    236,233, 99,128,  4,167,114,  5,153,130,153,142,153,184,154, 49,\n    154, 62,225,230,229,232,229,226,242,229,119,128,251, 78,227,229,\n    238,116,131,  0, 37,153,155,153,164,153,176,225,242,225,226,233,\n     99,128,  6,106,237,239,238,239,243,240,225,227,101,128,255,  5,\n    243,237,225,236,108,128,254,106,105,  2,153,190,154, 31,239,100,\n    134,  0, 46,153,207,153,218,153,229,153,241,153,252,154,  8,225,\n    242,237,229,238,233,225,110,128,  5,137,227,229,238,244,229,242,\n    229,100,128,  0,183,232,225,236,230,247,233,228,244,104,128,255,\n     97,233,238,230,229,242,233,239,114,128,246,231,237,239,238,239,\n    243,240,225,227,101,128,255, 14,115,  2,154, 14,154, 21,237,225,\n    236,108,128,254, 82,245,240,229,242,233,239,114,128,246,232,243,\n    240,239,237,229,238,233,231,242,229,229,235,227,237, 98,128,  3,\n     66,240,229,238,228,233,227,245,236,225,114,128, 34,165,244,232,\n    239,245,243,225,238,100,128, 32, 48,243,229,244, 97,128, 32,167,\n    230,243,241,245,225,242,101,128, 51,138,104,  3,154, 98,154,148,\n    155, 29, 97,  3,154,106,154,116,154,123,226,229,238,231,225,236,\n    105,128,  9,171,228,229,246, 97,128,  9, 43,231,117,  2,154,130,\n    154,139,234,225,242,225,244,105,128, 10,171,242,237,245,235,232,\n    105,128, 10, 43,105,133,  3,198,154,162,154,166,154,252,155,  4,\n    155, 15, 49,128,  3,213,229,245,240,104,  4,154,179,154,214,154,\n    229,154,238, 97,  2,154,185,154,200,227,233,242,227,236,229,235,\n    239,242,229,225,110,128, 50,122,240,225,242,229,238,235,239,242,\n    229,225,110,128, 50, 26,227,233,242,227,236,229,235,239,242,229,\n    225,110,128, 50,108,235,239,242,229,225,110,128, 49, 77,240,225,\n    242,229,238,235,239,242,229,225,110,128, 50, 12,236,225,244,233,\n    110,128,  2,120,238,244,232,245,244,232,225,105,128, 14, 58,243,\n    249,237,226,239,236,231,242,229,229,107,128,  3,213,111,  3,155,\n     37,155, 42,155, 68,239,107,128,  1,165,240,104,  2,155, 49,155,\n     58,225,238,244,232,225,105,128, 14, 30,245,238,231,244,232,225,\n    105,128, 14, 28,243,225,237,240,232,225,239,244,232,225,105,128,\n     14, 32,105,133,  3,192,155, 96,156, 52,156, 63,156, 74,156, 88,\n    229,245,112,  6,155,112,155,147,155,179,155,207,155,221,156, 17,\n     97,  2,155,118,155,133,227,233,242,227,236,229,235,239,242,229,\n    225,110,128, 50,115,240,225,242,229,238,235,239,242,229,225,110,\n    128, 50, 19,227,105,  2,155,154,155,166,229,245,227,235,239,242,\n    229,225,110,128, 49,118,242,227,236,229,235,239,242,229,225,110,\n    128, 50,101,107,  2,155,185,155,199,233,249,229,239,235,235,239,\n    242,229,225,110,128, 49,114,239,242,229,225,110,128, 49, 66,240,\n    225,242,229,238,235,239,242,229,225,110,128, 50,  5,243,233,239,\n    115,  2,155,230,156,  2,107,  2,155,236,155,250,233,249,229,239,\n    235,235,239,242,229,225,110,128, 49,116,239,242,229,225,110,128,\n     49, 68,244,233,235,229,245,244,235,239,242,229,225,110,128, 49,\n    117,116,  2,156, 23,156, 38,232,233,229,245,244,232,235,239,242,\n    229,225,110,128, 49,119,233,235,229,245,244,235,239,242,229,225,\n    110,128, 49,115,232,233,242,225,231,225,238, 97,128, 48,116,235,\n    225,244,225,235,225,238, 97,128, 48,212,243,249,237,226,239,236,\n    231,242,229,229,107,128,  3,214,247,242,225,242,237,229,238,233,\n    225,110,128,  5,131,236,245,115,132,  0, 43,156,115,156,126,156,\n    135,156,168,226,229,236,239,247,227,237, 98,128,  3, 31,227,233,\n    242,227,236,101,128, 34,149,109,  2,156,141,156,148,233,238,245,\n    115,128,  0,177,111,  2,156,154,156,158,100,128,  2,214,238,239,\n    243,240,225,227,101,128,255, 11,115,  2,156,174,156,181,237,225,\n    236,108,128,254, 98,245,240,229,242,233,239,114,128, 32,122,109,\n      2,156,197,156,208,239,238,239,243,240,225,227,101,128,255, 80,\n    243,241,245,225,242,101,128, 51,216,111,  5,156,229,156,240,157,\n     51,157, 62,157, 72,232,233,242,225,231,225,238, 97,128, 48,125,\n    233,238,244,233,238,231,233,238,228,229,120,  4,157,  4,157, 16,\n    157, 28,157, 41,228,239,247,238,247,232,233,244,101,128, 38, 31,\n    236,229,230,244,247,232,233,244,101,128, 38, 28,242,233,231,232,\n    244,247,232,233,244,101,128, 38, 30,245,240,247,232,233,244,101,\n    128, 38, 29,235,225,244,225,235,225,238, 97,128, 48,221,240,236,\n    225,244,232,225,105,128, 14, 27,243,244,225,236,237,225,242,107,\n    129, 48, 18,157, 85,230,225,227,101,128, 48, 32,240,225,242,229,\n    110,128, 36,171,114,  3,157,108,157,134,157,159,101,  2,157,114,\n    157,122,227,229,228,229,115,128, 34,122,243,227,242,233,240,244,\n    233,239,110,128, 33, 30,233,237,101,  2,157,142,157,148,237,239,\n    100,128,  2,185,242,229,246,229,242,243,229,100,128, 32, 53,111,\n      4,157,169,157,176,157,186,157,199,228,245,227,116,128, 34, 15,\n    234,229,227,244,233,246,101,128, 35,  5,236,239,238,231,229,228,\n    235,225,238, 97,128, 48,252,112,  2,157,205,157,242,101,  2,157,\n    211,157,218,236,236,239,114,128, 35, 24,242,243,117,  2,157,226,\n    157,233,226,243,229,116,128, 34,130,240,229,242,243,229,116,128,\n     34,131,239,242,244,233,239,110,129, 34, 55,157,253,225,108,128,\n     34, 29,115,  2,158,  8,158, 51,105,130,  3,200,158, 16,158, 27,\n    227,249,242,233,236,236,233, 99,128,  4,113,236,233,240,238,229,\n    245,237,225,244,225,227,249,242,233,236,236,233,227,227,237, 98,\n    128,  4,134,243,241,245,225,242,101,128, 51,176,117,  2,158, 66,\n    158, 77,232,233,242,225,231,225,238, 97,128, 48,119,235,225,244,\n    225,235,225,238, 97,128, 48,215,246,243,241,245,225,242,101,128,\n     51,180,247,243,241,245,225,242,101,128, 51,186,113,136,  0,113,\n    158,128,159,177,159,188,159,197,159,204,159,216,159,254,160,  6,\n     97,  4,158,138,158,161,158,225,159,160,100,  2,158,144,158,150,\n    229,246, 97,128,  9, 88,237,225,232,229,226,242,229,119,128,  5,\n    168,102,  4,158,171,158,180,158,194,158,210,225,242,225,226,233,\n     99,128,  6, 66,230,233,238,225,236,225,242,225,226,233, 99,128,\n    254,214,233,238,233,244,233,225,236,225,242,225,226,233, 99,128,\n    254,215,237,229,228,233,225,236,225,242,225,226,233, 99,128,254,\n    216,237,225,244,115,136,  5,184,158,248,159, 12,159, 26,159, 31,\n    159, 36,159, 45,159, 60,159,147, 49,  3,159,  0,159,  4,159,  8,\n     48,128,  5,184, 97,128,  5,184, 99,128,  5,184, 50,  2,159, 18,\n    159, 22, 55,128,  5,184, 57,128,  5,184,179, 51,128,  5,184,228,\n    101,128,  5,184,232,229,226,242,229,119,128,  5,184,238,225,242,\n    242,239,247,232,229,226,242,229,119,128,  5,184,113,  2,159, 66,\n    159,132,225,244,225,110,  4,159, 79,159, 88,159,103,159,119,232,\n    229,226,242,229,119,128,  5,184,238,225,242,242,239,247,232,229,\n    226,242,229,119,128,  5,184,241,245,225,242,244,229,242,232,229,\n    226,242,229,119,128,  5,184,247,233,228,229,232,229,226,242,229,\n    119,128,  5,184,245,225,242,244,229,242,232,229,226,242,229,119,\n    128,  5,184,247,233,228,229,232,229,226,242,229,119,128,  5,184,\n    242,238,229,249,240,225,242,225,232,229,226,242,229,119,128,  5,\n    159,226,239,240,239,237,239,230,111,128, 49, 17,227,233,242,227,\n    236,101,128, 36,224,232,239,239,107,128,  2,160,237,239,238,239,\n    243,240,225,227,101,128,255, 81,239,102,130,  5,231,159,225,159,\n    245,228,225,231,229,243,104,129,251, 71,159,236,232,229,226,242,\n    229,119,128,251, 71,232,229,226,242,229,119,128,  5,231,240,225,\n    242,229,110,128, 36,172,117,  4,160, 16,160, 28,160,117,160,204,\n    225,242,244,229,242,238,239,244,101,128, 38,105,226,245,244,115,\n    135,  5,187,160, 49,160, 54,160, 59,160, 64,160, 73,160, 88,160,\n    104,177, 56,128,  5,187,178, 53,128,  5,187,179, 49,128,  5,187,\n    232,229,226,242,229,119,128,  5,187,238,225,242,242,239,247,232,\n    229,226,242,229,119,128,  5,187,241,245,225,242,244,229,242,232,\n    229,226,242,229,119,128,  5,187,247,233,228,229,232,229,226,242,\n    229,119,128,  5,187,229,243,244,233,239,110,133,  0, 63,160,136,\n    160,159,160,176,160,184,160,196,225,114,  2,160,143,160,150,225,\n    226,233, 99,128,  6, 31,237,229,238,233,225,110,128,  5, 94,228,\n    239,247,110,129,  0,191,160,168,243,237,225,236,108,128,247,191,\n    231,242,229,229,107,128,  3,126,237,239,238,239,243,240,225,227,\n    101,128,255, 31,243,237,225,236,108,128,247, 63,239,244,101,  4,\n    160,216,161, 31,161, 51,161, 80,228,226,108,133,  0, 34,160,232,\n    160,239,160,246,161,  2,161, 23,226,225,243,101,128, 32, 30,236,\n    229,230,116,128, 32, 28,237,239,238,239,243,240,225,227,101,128,\n    255,  2,240,242,233,237,101,129, 48, 30,161, 12,242,229,246,229,\n    242,243,229,100,128, 48, 29,242,233,231,232,116,128, 32, 29,236,\n    229,230,116,129, 32, 24,161, 40,242,229,246,229,242,243,229,100,\n    128, 32, 27,114,  2,161, 57,161, 67,229,246,229,242,243,229,100,\n    128, 32, 27,233,231,232,116,129, 32, 25,161, 76,110,128,  1, 73,\n    243,233,238,231,108,  2,161, 90,161, 97,226,225,243,101,128, 32,\n     26,101,129,  0, 39,161,103,237,239,238,239,243,240,225,227,101,\n    128,255,  7,114,145,  0,114,161,153,162,157,162,168,162,215,163,\n     10,164, 27,164, 51,164,146,166,180,166,217,166,229,167, 27,167,\n     35,167,197,167,208,167,243,168, 87, 97, 11,161,177,161,188,161,\n    198,161,205,162, 14,162, 30,162, 55,162, 66,162, 91,162,114,162,\n    151,225,242,237,229,238,233,225,110,128,  5,124,226,229,238,231,\n    225,236,105,128,  9,176,227,245,244,101,128,  1, 85,100,  4,161,\n    215,161,221,161,235,162,  5,229,246, 97,128,  9, 48,233,227,225,\n    108,129, 34, 26,161,230,229,120,128,248,229,239,246,229,242,243,\n    243,241,245,225,242,101,129, 51,174,161,251,228,243,241,245,225,\n    242,101,128, 51,175,243,241,245,225,242,101,128, 51,173,230,101,\n    129,  5,191,162, 21,232,229,226,242,229,119,128,  5,191,231,117,\n      2,162, 37,162, 46,234,225,242,225,244,105,128, 10,176,242,237,\n    245,235,232,105,128, 10, 48,232,233,242,225,231,225,238, 97,128,\n     48,137,235,225,244,225,235,225,238, 97,129, 48,233,162, 79,232,\n    225,236,230,247,233,228,244,104,128,255,151,236,239,247,229,242,\n    228,233,225,231,239,238,225,236,226,229,238,231,225,236,105,128,\n      9,241,109,  2,162,120,162,143,233,228,228,236,229,228,233,225,\n    231,239,238,225,236,226,229,238,231,225,236,105,128,  9,240,243,\n    232,239,242,110,128,  2,100,244,233,111,128, 34, 54,226,239,240,\n    239,237,239,230,111,128, 49, 22, 99,  4,162,178,162,185,162,194,\n    162,202,225,242,239,110,128,  1, 89,229,228,233,236,236, 97,128,\n      1, 87,233,242,227,236,101,128, 36,225,239,237,237,225,225,227,\n    227,229,238,116,128,  1, 87,100,  2,162,221,162,231,226,236,231,\n    242,225,246,101,128,  2, 17,239,116,  2,162,238,162,247,225,227,\n    227,229,238,116,128, 30, 89,226,229,236,239,119,129, 30, 91,163,\n      1,237,225,227,242,239,110,128, 30, 93,101,  6,163, 24,163, 69,\n    163,104,163,159,163,184,163,217,102,  2,163, 30,163, 43,229,242,\n    229,238,227,229,237,225,242,107,128, 32, 59,236,229,248,243,117,\n      2,163, 53,163, 60,226,243,229,116,128, 34,134,240,229,242,243,\n    229,116,128, 34,135,231,233,243,244,229,114,  2,163, 80,163, 85,\n    229,100,128,  0,174,115,  2,163, 91,163, 97,225,238,115,128,248,\n    232,229,242,233,102,128,246,218,104,  3,163,112,163,135,163,149,\n    225,114,  2,163,119,163,126,225,226,233, 99,128,  6, 49,237,229,\n    238,233,225,110,128,  5,128,230,233,238,225,236,225,242,225,226,\n    233, 99,128,254,174,233,242,225,231,225,238, 97,128, 48,140,235,\n    225,244,225,235,225,238, 97,129, 48,236,163,172,232,225,236,230,\n    247,233,228,244,104,128,255,154,243,104,130,  5,232,163,193,163,\n    208,228,225,231,229,243,232,232,229,226,242,229,119,128,251, 72,\n    232,229,226,242,229,119,128,  5,232,118,  3,163,225,163,238,164,\n     14,229,242,243,229,228,244,233,236,228,101,128, 34, 61,233, 97,\n      2,163,245,163,254,232,229,226,242,229,119,128,  5,151,237,245,\n    231,242,225,243,232,232,229,226,242,229,119,128,  5,151,236,239,\n    231,233,227,225,236,238,239,116,128, 35, 16,230,233,243,232,232,\n    239,239,107,129,  2,126,164, 40,242,229,246,229,242,243,229,100,\n    128,  2,127,104,  2,164, 57,164, 80, 97,  2,164, 63,164, 73,226,\n    229,238,231,225,236,105,128,  9,221,228,229,246, 97,128,  9, 93,\n    111,131,  3,193,164, 90,164,119,164,133,239,107,129,  2,125,164,\n     97,244,245,242,238,229,100,129,  2,123,164,108,243,245,240,229,\n    242,233,239,114,128,  2,181,243,249,237,226,239,236,231,242,229,\n    229,107,128,  3,241,244,233,227,232,239,239,235,237,239,100,128,\n      2,222,105,  6,164,160,165,204,165,250,166,  5,166, 30,166,166,\n    229,245,108,  9,164,182,164,217,164,232,164,246,165, 36,165, 50,\n    165,136,165,149,165,184, 97,  2,164,188,164,203,227,233,242,227,\n    236,229,235,239,242,229,225,110,128, 50,113,240,225,242,229,238,\n    235,239,242,229,225,110,128, 50, 17,227,233,242,227,236,229,235,\n    239,242,229,225,110,128, 50, 99,232,233,229,245,232,235,239,242,\n    229,225,110,128, 49, 64,107,  2,164,252,165, 28,233,249,229,239,\n    107,  2,165,  6,165, 15,235,239,242,229,225,110,128, 49, 58,243,\n    233,239,243,235,239,242,229,225,110,128, 49,105,239,242,229,225,\n    110,128, 49, 57,237,233,229,245,237,235,239,242,229,225,110,128,\n     49, 59,112,  3,165, 58,165, 90,165,105, 97,  2,165, 64,165, 78,\n    238,243,233,239,243,235,239,242,229,225,110,128, 49,108,242,229,\n    238,235,239,242,229,225,110,128, 50,  3,232,233,229,245,240,232,\n    235,239,242,229,225,110,128, 49, 63,233,229,245,112,  2,165,114,\n    165,123,235,239,242,229,225,110,128, 49, 60,243,233,239,243,235,\n    239,242,229,225,110,128, 49,107,243,233,239,243,235,239,242,229,\n    225,110,128, 49, 61,116,  2,165,155,165,170,232,233,229,245,244,\n    232,235,239,242,229,225,110,128, 49, 62,233,235,229,245,244,235,\n    239,242,229,225,110,128, 49,106,249,229,239,242,233,238,232,233,\n    229,245,232,235,239,242,229,225,110,128, 49,109,231,232,116,  2,\n    165,212,165,220,225,238,231,236,101,128, 34, 31,116,  2,165,226,\n    165,240,225,227,235,226,229,236,239,247,227,237, 98,128,  3, 25,\n    242,233,225,238,231,236,101,128, 34,191,232,233,242,225,231,225,\n    238, 97,128, 48,138,235,225,244,225,235,225,238, 97,129, 48,234,\n    166, 18,232,225,236,230,247,233,228,244,104,128,255,152,110,  2,\n    166, 36,166,152,103,131,  2,218,166, 46,166, 57,166, 63,226,229,\n    236,239,247,227,237, 98,128,  3, 37,227,237, 98,128,  3, 10,232,\n    225,236,102,  2,166, 72,166,118,236,229,230,116,131,  2,191,166,\n     85,166, 96,166,107,225,242,237,229,238,233,225,110,128,  5, 89,\n    226,229,236,239,247,227,237, 98,128,  3, 28,227,229,238,244,229,\n    242,229,100,128,  2,211,242,233,231,232,116,130,  2,190,166,130,\n    166,141,226,229,236,239,247,227,237, 98,128,  3, 57,227,229,238,\n    244,229,242,229,100,128,  2,210,246,229,242,244,229,228,226,242,\n    229,246,101,128,  2, 19,244,244,239,242,245,243,241,245,225,242,\n    101,128, 51, 81,108,  2,166,186,166,197,233,238,229,226,229,236,\n    239,119,128, 30, 95,239,238,231,236,229,103,129,  2,124,166,208,\n    244,245,242,238,229,100,128,  2,122,237,239,238,239,243,240,225,\n    227,101,128,255, 82,111,  3,166,237,166,248,167, 17,232,233,242,\n    225,231,225,238, 97,128, 48,141,235,225,244,225,235,225,238, 97,\n    129, 48,237,167,  5,232,225,236,230,247,233,228,244,104,128,255,\n    155,242,245,225,244,232,225,105,128, 14, 35,240,225,242,229,110,\n    128, 36,173,114,  3,167, 43,167, 79,167,109, 97,  3,167, 51,167,\n     61,167, 68,226,229,238,231,225,236,105,128,  9,220,228,229,246,\n     97,128,  9, 49,231,245,242,237,245,235,232,105,128, 10, 92,229,\n    104,  2,167, 86,167, 95,225,242,225,226,233, 99,128,  6,145,230,\n    233,238,225,236,225,242,225,226,233, 99,128,251,141,246,239,227,\n    225,236,233, 99,  4,167,125,167,135,167,142,167,153,226,229,238,\n    231,225,236,105,128,  9,224,228,229,246, 97,128,  9, 96,231,245,\n    234,225,242,225,244,105,128, 10,224,246,239,247,229,236,243,233,\n    231,110,  3,167,169,167,179,167,186,226,229,238,231,225,236,105,\n    128,  9,196,228,229,246, 97,128,  9, 68,231,245,234,225,242,225,\n    244,105,128, 10,196,243,245,240,229,242,233,239,114,128,246,241,\n    116,  2,167,214,167,222,226,236,239,227,107,128, 37,144,245,242,\n    238,229,100,129,  2,121,167,232,243,245,240,229,242,233,239,114,\n    128,  2,180,117,  4,167,253,168,  8,168, 33,168, 80,232,233,242,\n    225,231,225,238, 97,128, 48,139,235,225,244,225,235,225,238, 97,\n    129, 48,235,168, 21,232,225,236,230,247,233,228,244,104,128,255,\n    153,112,  2,168, 39,168, 74,229,101,  2,168, 46,168, 60,237,225,\n    242,235,226,229,238,231,225,236,105,128,  9,242,243,233,231,238,\n    226,229,238,231,225,236,105,128,  9,243,233,225,104,128,246,221,\n    244,232,225,105,128, 14, 36,246,239,227,225,236,233, 99,  4,168,\n    103,168,113,168,120,168,131,226,229,238,231,225,236,105,128,  9,\n    139,228,229,246, 97,128,  9, 11,231,245,234,225,242,225,244,105,\n    128, 10,139,246,239,247,229,236,243,233,231,110,  3,168,147,168,\n    157,168,164,226,229,238,231,225,236,105,128,  9,195,228,229,246,\n     97,128,  9, 67,231,245,234,225,242,225,244,105,128, 10,195,115,\n    147,  0,115,168,217,170,187,170,198,171, 68,171,107,174, 49,174,\n     60,176,203,179, 85,179,131,179,158,180, 93,180,160,181,193,181,\n    203,182,133,182,206,183,120,183,130, 97,  9,168,237,168,247,169,\n     12,169, 84,169,109,169,120,169,145,169,177,169,217,226,229,238,\n    231,225,236,105,128,  9,184,227,245,244,101,129,  1, 91,169,  0,\n    228,239,244,225,227,227,229,238,116,128, 30,101,100,  5,169, 24,\n    169, 33,169, 39,169, 53,169, 69,225,242,225,226,233, 99,128,  6,\n     53,229,246, 97,128,  9, 56,230,233,238,225,236,225,242,225,226,\n    233, 99,128,254,186,233,238,233,244,233,225,236,225,242,225,226,\n    233, 99,128,254,187,237,229,228,233,225,236,225,242,225,226,233,\n     99,128,254,188,231,117,  2,169, 91,169,100,234,225,242,225,244,\n    105,128, 10,184,242,237,245,235,232,105,128, 10, 56,232,233,242,\n    225,231,225,238, 97,128, 48, 85,235,225,244,225,235,225,238, 97,\n    129, 48,181,169,133,232,225,236,230,247,233,228,244,104,128,255,\n    123,236,236,225,236,236,225,232,239,245,225,236,225,249,232,229,\n    247,225,243,225,236,236,225,237,225,242,225,226,233, 99,128,253,\n    250,237,229,235,104,130,  5,225,169,188,169,208,228,225,231,229,\n    243,104,129,251, 65,169,199,232,229,226,242,229,119,128,251, 65,\n    232,229,226,242,229,119,128,  5,225,242, 97,  5,169,230,170, 48,\n    170, 56,170,106,170,114, 97,  5,169,242,169,250,170,  2,170, 33,\n    170, 41,225,244,232,225,105,128, 14, 50,229,244,232,225,105,128,\n     14, 65,233,237,225,233,109,  2,170, 12,170, 23,225,236,225,233,\n    244,232,225,105,128, 14, 68,245,225,238,244,232,225,105,128, 14,\n     67,237,244,232,225,105,128, 14, 51,244,232,225,105,128, 14, 48,\n    229,244,232,225,105,128, 14, 64,105,  3,170, 64,170, 88,170, 99,\n    105,  2,170, 70,170, 81,236,229,230,244,244,232,225,105,128,248,\n    134,244,232,225,105,128, 14, 53,236,229,230,244,244,232,225,105,\n    128,248,133,244,232,225,105,128, 14, 52,239,244,232,225,105,128,\n     14, 66,117,  3,170,122,170,172,170,179,101,  3,170,130,170,154,\n    170,165,101,  2,170,136,170,147,236,229,230,244,244,232,225,105,\n    128,248,136,244,232,225,105,128, 14, 55,236,229,230,244,244,232,\n    225,105,128,248,135,244,232,225,105,128, 14, 54,244,232,225,105,\n    128, 14, 56,245,244,232,225,105,128, 14, 57,226,239,240,239,237,\n    239,230,111,128, 49, 25, 99,  5,170,210,170,231,170,240,171, 33,\n    171, 55,225,242,239,110,129,  1, 97,170,219,228,239,244,225,227,\n    227,229,238,116,128, 30,103,229,228,233,236,236, 97,128,  1, 95,\n    232,247, 97,131,  2, 89,170,252,171,  7,171, 26,227,249,242,233,\n    236,236,233, 99,128,  4,217,228,233,229,242,229,243,233,243,227,\n    249,242,233,236,236,233, 99,128,  4,219,232,239,239,107,128,  2,\n     90,233,242, 99,  2,171, 41,171, 46,236,101,128, 36,226,245,237,\n    230,236,229,120,128,  1, 93,239,237,237,225,225,227,227,229,238,\n    116,128,  2, 25,228,239,116,  2,171, 76,171, 85,225,227,227,229,\n    238,116,128, 30, 97,226,229,236,239,119,129, 30, 99,171, 95,228,\n    239,244,225,227,227,229,238,116,128, 30,105,101,  9,171,127,171,\n    143,171,178,171,243,172, 90,172,117,172,142,172,223,172,250,225,\n    231,245,236,236,226,229,236,239,247,227,237, 98,128,  3, 60, 99,\n      2,171,149,171,171,239,238,100,129, 32, 51,171,157,244,239,238,\n    229,227,232,233,238,229,243,101,128,  2,202,244,233,239,110,128,\n      0,167,229,110,  4,171,189,171,198,171,212,171,228,225,242,225,\n    226,233, 99,128,  6, 51,230,233,238,225,236,225,242,225,226,233,\n     99,128,254,178,233,238,233,244,233,225,236,225,242,225,226,233,\n     99,128,254,179,237,229,228,233,225,236,225,242,225,226,233, 99,\n    128,254,180,231,239,108,135,  5,182,172,  7,172, 21,172, 26,172,\n     35,172, 50,172, 66,172, 77, 49,  2,172, 13,172, 17, 51,128,  5,\n    182,102,128,  5,182,178, 99,128,  5,182,232,229,226,242,229,119,\n    128,  5,182,238,225,242,242,239,247,232,229,226,242,229,119,128,\n      5,182,241,245,225,242,244,229,242,232,229,226,242,229,119,128,\n      5,182,244,225,232,229,226,242,229,119,128,  5,146,247,233,228,\n    229,232,229,226,242,229,119,128,  5,182,104,  2,172, 96,172,107,\n    225,242,237,229,238,233,225,110,128,  5,125,233,242,225,231,225,\n    238, 97,128, 48, 91,235,225,244,225,235,225,238, 97,129, 48,187,\n    172,130,232,225,236,230,247,233,228,244,104,128,255,126,237,105,\n      2,172,149,172,192,227,239,236,239,110,131,  0, 59,172,163,172,\n    172,172,184,225,242,225,226,233, 99,128,  6, 27,237,239,238,239,\n    243,240,225,227,101,128,255, 27,243,237,225,236,108,128,254, 84,\n    246,239,233,227,229,228,237,225,242,235,235,225,238, 97,129, 48,\n    156,172,211,232,225,236,230,247,233,228,244,104,128,255,159,238,\n    116,  2,172,230,172,240,233,243,241,245,225,242,101,128, 51, 34,\n    239,243,241,245,225,242,101,128, 51, 35,246,229,110,142,  0, 55,\n    173, 28,173, 37,173, 47,173, 77,173, 84,173, 94,173,119,173,146,\n    173,180,173,192,173,203,173,236,173,244,173,255,225,242,225,226,\n    233, 99,128,  6,103,226,229,238,231,225,236,105,128,  9,237,227,\n    233,242,227,236,101,129, 36,102,173, 58,233,238,246,229,242,243,\n    229,243,225,238,243,243,229,242,233,102,128, 39,144,228,229,246,\n     97,128,  9,109,229,233,231,232,244,232,115,128, 33, 94,231,117,\n      2,173,101,173,110,234,225,242,225,244,105,128, 10,237,242,237,\n    245,235,232,105,128, 10,109,232, 97,  2,173,126,173,137,227,235,\n    225,242,225,226,233, 99,128,  6,103,238,231,250,232,239,117,128,\n     48, 39,105,  2,173,152,173,170,228,229,239,231,242,225,240,232,\n    233,227,240,225,242,229,110,128, 50, 38,238,230,229,242,233,239,\n    114,128, 32,135,237,239,238,239,243,240,225,227,101,128,255, 23,\n    239,236,228,243,244,249,236,101,128,247, 55,112,  2,173,209,173,\n    216,225,242,229,110,128, 36,122,229,114,  2,173,223,173,229,233,\n    239,100,128, 36,142,243,233,225,110,128,  6,247,242,239,237,225,\n    110,128, 33,118,243,245,240,229,242,233,239,114,128, 32,119,116,\n      2,174,  5,174, 43,229,229,110,  2,174, 13,174, 22,227,233,242,\n    227,236,101,128, 36,112,112,  2,174, 28,174, 35,225,242,229,110,\n    128, 36,132,229,242,233,239,100,128, 36,152,232,225,105,128, 14,\n     87,230,244,232,249,240,232,229,110,128,  0,173,104,  7,174, 76,\n    175, 50,175, 61,175, 75,176, 20,176, 33,176,197, 97,  6,174, 90,\n    174,101,174,111,174,122,175,  9,175, 34,225,242,237,229,238,233,\n    225,110,128,  5,119,226,229,238,231,225,236,105,128,  9,182,227,\n    249,242,233,236,236,233, 99,128,  4, 72,100,  2,174,128,174,224,\n    228, 97,  4,174,139,174,148,174,179,174,193,225,242,225,226,233,\n     99,128,  6, 81,228,225,237,237, 97,  2,174,158,174,167,225,242,\n    225,226,233, 99,128,252, 97,244,225,238,225,242,225,226,233, 99,\n    128,252, 94,230,225,244,232,225,225,242,225,226,233, 99,128,252,\n     96,235,225,243,242, 97,  2,174,203,174,212,225,242,225,226,233,\n     99,128,252, 98,244,225,238,225,242,225,226,233, 99,128,252, 95,\n    101,132, 37,146,174,236,174,243,174,251,175,  4,228,225,242,107,\n    128, 37,147,236,233,231,232,116,128, 37,145,237,229,228,233,245,\n    109,128, 37,146,246, 97,128,  9, 54,231,117,  2,175, 16,175, 25,\n    234,225,242,225,244,105,128, 10,182,242,237,245,235,232,105,128,\n     10, 54,236,243,232,229,236,229,244,232,229,226,242,229,119,128,\n      5,147,226,239,240,239,237,239,230,111,128, 49, 21,227,232,225,\n    227,249,242,233,236,236,233, 99,128,  4, 73,101,  4,175, 85,175,\n    150,175,160,175,177,229,110,  4,175, 96,175,105,175,119,175,135,\n    225,242,225,226,233, 99,128,  6, 52,230,233,238,225,236,225,242,\n    225,226,233, 99,128,254,182,233,238,233,244,233,225,236,225,242,\n    225,226,233, 99,128,254,183,237,229,228,233,225,236,225,242,225,\n    226,233, 99,128,254,184,233,227,239,240,244,233, 99,128,  3,227,\n    241,229,108,129, 32,170,175,168,232,229,226,242,229,119,128, 32,\n    170,246, 97,134,  5,176,175,194,175,209,175,223,175,232,175,247,\n    176,  7, 49,  2,175,200,175,205,177, 53,128,  5,176, 53,128,  5,\n    176, 50,  2,175,215,175,219, 50,128,  5,176,101,128,  5,176,232,\n    229,226,242,229,119,128,  5,176,238,225,242,242,239,247,232,229,\n    226,242,229,119,128,  5,176,241,245,225,242,244,229,242,232,229,\n    226,242,229,119,128,  5,176,247,233,228,229,232,229,226,242,229,\n    119,128,  5,176,232,225,227,249,242,233,236,236,233, 99,128,  4,\n    187,105,  2,176, 39,176, 50,237,225,227,239,240,244,233, 99,128,\n      3,237,110,131,  5,233,176, 60,176,143,176,152,100,  2,176, 66,\n    176,132,225,231,229,243,104,130,251, 73,176, 78,176, 87,232,229,\n    226,242,229,119,128,251, 73,115,  2,176, 93,176,113,232,233,238,\n    228,239,116,129,251, 44,176,104,232,229,226,242,229,119,128,251,\n     44,233,238,228,239,116,129,251, 45,176,123,232,229,226,242,229,\n    119,128,251, 45,239,244,232,229,226,242,229,119,128,  5,193,232,\n    229,226,242,229,119,128,  5,233,115,  2,176,158,176,178,232,233,\n    238,228,239,116,129,251, 42,176,169,232,229,226,242,229,119,128,\n    251, 42,233,238,228,239,116,129,251, 43,176,188,232,229,226,242,\n    229,119,128,251, 43,239,239,107,128,  2,130,105,  8,176,221,177,\n      9,177, 20,177, 45,177, 75,177, 83,177, 96,178, 11,231,237, 97,\n    131,  3,195,176,233,176,237,176,245, 49,128,  3,194,230,233,238,\n    225,108,128,  3,194,236,245,238,225,244,229,243,249,237,226,239,\n    236,231,242,229,229,107,128,  3,242,232,233,242,225,231,225,238,\n     97,128, 48, 87,235,225,244,225,235,225,238, 97,129, 48,183,177,\n     33,232,225,236,230,247,233,228,244,104,128,255,124,236,245,113,\n      2,177, 53,177, 62,232,229,226,242,229,119,128,  5,189,236,229,\n    230,244,232,229,226,242,229,119,128,  5,189,237,233,236,225,114,\n    128, 34, 60,238,228,239,244,232,229,226,242,229,119,128,  5,194,\n    239,115,  6,177,111,177,146,177,178,177,206,177,220,177,252, 97,\n      2,177,117,177,132,227,233,242,227,236,229,235,239,242,229,225,\n    110,128, 50,116,240,225,242,229,238,235,239,242,229,225,110,128,\n     50, 20,227,105,  2,177,153,177,165,229,245,227,235,239,242,229,\n    225,110,128, 49,126,242,227,236,229,235,239,242,229,225,110,128,\n     50,102,107,  2,177,184,177,198,233,249,229,239,235,235,239,242,\n    229,225,110,128, 49,122,239,242,229,225,110,128, 49, 69,238,233,\n    229,245,238,235,239,242,229,225,110,128, 49,123,112,  2,177,226,\n    177,239,225,242,229,238,235,239,242,229,225,110,128, 50,  6,233,\n    229,245,240,235,239,242,229,225,110,128, 49,125,244,233,235,229,\n    245,244,235,239,242,229,225,110,128, 49,124,120,141,  0, 54,178,\n     41,178, 50,178, 60,178, 90,178, 97,178,122,178,149,178,183,178,\n    195,178,206,178,239,178,247,179,  2,225,242,225,226,233, 99,128,\n      6,102,226,229,238,231,225,236,105,128,  9,236,227,233,242,227,\n    236,101,129, 36,101,178, 71,233,238,246,229,242,243,229,243,225,\n    238,243,243,229,242,233,102,128, 39,143,228,229,246, 97,128,  9,\n    108,231,117,  2,178,104,178,113,234,225,242,225,244,105,128, 10,\n    236,242,237,245,235,232,105,128, 10,108,232, 97,  2,178,129,178,\n    140,227,235,225,242,225,226,233, 99,128,  6,102,238,231,250,232,\n    239,117,128, 48, 38,105,  2,178,155,178,173,228,229,239,231,242,\n    225,240,232,233,227,240,225,242,229,110,128, 50, 37,238,230,229,\n    242,233,239,114,128, 32,134,237,239,238,239,243,240,225,227,101,\n    128,255, 22,239,236,228,243,244,249,236,101,128,247, 54,112,  2,\n    178,212,178,219,225,242,229,110,128, 36,121,229,114,  2,178,226,\n    178,232,233,239,100,128, 36,141,243,233,225,110,128,  6,246,242,\n    239,237,225,110,128, 33,117,243,245,240,229,242,233,239,114,128,\n     32,118,116,  2,179,  8,179, 79,229,229,110,  2,179, 16,179, 58,\n     99,  2,179, 22,179, 30,233,242,227,236,101,128, 36,111,245,242,\n    242,229,238,227,249,228,229,238,239,237,233,238,225,244,239,242,\n    226,229,238,231,225,236,105,128,  9,249,112,  2,179, 64,179, 71,\n    225,242,229,110,128, 36,131,229,242,233,239,100,128, 36,151,232,\n    225,105,128, 14, 86,108,  2,179, 91,179,111,225,243,104,129,  0,\n     47,179, 99,237,239,238,239,243,240,225,227,101,128,255, 15,239,\n    238,103,129,  1,127,179,119,228,239,244,225,227,227,229,238,116,\n    128, 30,155,109,  2,179,137,179,147,233,236,229,230,225,227,101,\n    128, 38, 58,239,238,239,243,240,225,227,101,128,255, 83,111,  6,\n    179,172,179,222,179,233,180,  2,180, 47,180, 58,102,  2,179,178,\n    179,192,240,225,243,245,241,232,229,226,242,229,119,128,  5,195,\n    116,  2,179,198,179,207,232,249,240,232,229,110,128,  0,173,243,\n    233,231,238,227,249,242,233,236,236,233, 99,128,  4, 76,232,233,\n    242,225,231,225,238, 97,128, 48, 93,235,225,244,225,235,225,238,\n     97,129, 48,189,179,246,232,225,236,230,247,233,228,244,104,128,\n    255,127,236,233,228,245,115,  2,180, 12,180, 29,236,239,238,231,\n    239,246,229,242,236,225,249,227,237, 98,128,  3, 56,243,232,239,\n    242,244,239,246,229,242,236,225,249,227,237, 98,128,  3, 55,242,\n    245,243,233,244,232,225,105,128, 14, 41,115,  3,180, 66,180, 76,\n    180, 84,225,236,225,244,232,225,105,128, 14, 40,239,244,232,225,\n    105,128, 14, 11,245,225,244,232,225,105,128, 14, 42,240, 97,  3,\n    180,102,180,122,180,154,227,101,129,  0, 32,180,109,232,225,227,\n    235,225,242,225,226,233, 99,128,  0, 32,228,101,129, 38, 96,180,\n    129,243,245,233,116,  2,180,138,180,146,226,236,225,227,107,128,\n     38, 96,247,232,233,244,101,128, 38,100,242,229,110,128, 36,174,\n    241,245,225,242,101, 11,180,188,180,199,180,213,180,238,180,255,\n    181, 25,181, 40,181, 73,181,100,181,156,181,171,226,229,236,239,\n    247,227,237, 98,128,  3, 59, 99,  2,180,205,180,209, 99,128, 51,\n    196,109,128, 51,157,228,233,225,231,239,238,225,236,227,242,239,\n    243,243,232,225,244,227,232,230,233,236,108,128, 37,169,232,239,\n    242,233,250,239,238,244,225,236,230,233,236,108,128, 37,164,107,\n      2,181,  5,181,  9,103,128, 51,143,109,129, 51,158,181, 15,227,\n    225,240,233,244,225,108,128, 51,206,108,  2,181, 31,181, 35,110,\n    128, 51,209,239,103,128, 51,210,109,  4,181, 50,181, 54,181, 59,\n    181, 63,103,128, 51,142,233,108,128, 51,213,109,128, 51,156,243,\n    241,245,225,242,229,100,128, 51,161,239,242,244,232,239,231,239,\n    238,225,236,227,242,239,243,243,232,225,244,227,232,230,233,236,\n    108,128, 37,166,245,240,240,229,114,  2,181,110,181,133,236,229,\n    230,244,244,239,236,239,247,229,242,242,233,231,232,244,230,233,\n    236,108,128, 37,167,242,233,231,232,244,244,239,236,239,247,229,\n    242,236,229,230,244,230,233,236,108,128, 37,168,246,229,242,244,\n    233,227,225,236,230,233,236,108,128, 37,165,247,232,233,244,229,\n    247,233,244,232,243,237,225,236,236,226,236,225,227,107,128, 37,\n    163,242,243,241,245,225,242,101,128, 51,219,115,  2,181,209,182,\n    123, 97,  4,181,219,181,229,181,236,181,247,226,229,238,231,225,\n    236,105,128,  9,183,228,229,246, 97,128,  9, 55,231,245,234,225,\n    242,225,244,105,128, 10,183,238,103,  8,182, 10,182, 24,182, 38,\n    182, 52,182, 67,182, 81,182, 95,182,108,227,233,229,245,227,235,\n    239,242,229,225,110,128, 49, 73,232,233,229,245,232,235,239,242,\n    229,225,110,128, 49,133,233,229,245,238,231,235,239,242,229,225,\n    110,128, 49,128,235,233,249,229,239,235,235,239,242,229,225,110,\n    128, 49, 50,238,233,229,245,238,235,239,242,229,225,110,128, 49,\n    101,240,233,229,245,240,235,239,242,229,225,110,128, 49, 67,243,\n    233,239,243,235,239,242,229,225,110,128, 49, 70,244,233,235,229,\n    245,244,235,239,242,229,225,110,128, 49, 56,245,240,229,242,233,\n    239,114,128,246,242,116,  2,182,139,182,162,229,242,236,233,238,\n    103,129,  0,163,182,150,237,239,238,239,243,240,225,227,101,128,\n    255,225,242,239,235,101,  2,182,171,182,188,236,239,238,231,239,\n    246,229,242,236,225,249,227,237, 98,128,  3, 54,243,232,239,242,\n    244,239,246,229,242,236,225,249,227,237, 98,128,  3, 53,117,  7,\n    182,222,182,254,183, 20,183, 31,183, 72,183, 82,183, 86,226,243,\n    229,116,130, 34,130,182,233,182,244,238,239,244,229,241,245,225,\n    108,128, 34,138,239,242,229,241,245,225,108,128, 34,134, 99,  2,\n    183,  4,183, 12,227,229,229,228,115,128, 34,123,232,244,232,225,\n    116,128, 34, 11,232,233,242,225,231,225,238, 97,128, 48, 89,107,\n      2,183, 37,183, 61,225,244,225,235,225,238, 97,129, 48,185,183,\n     49,232,225,236,230,247,233,228,244,104,128,255,125,245,238,225,\n    242,225,226,233, 99,128,  6, 82,237,237,225,244,233,239,110,128,\n     34, 17,110,128, 38, 60,240,229,242,243,229,116,130, 34,131,183,\n     99,183,110,238,239,244,229,241,245,225,108,128, 34,139,239,242,\n    229,241,245,225,108,128, 34,135,246,243,241,245,225,242,101,128,\n     51,220,249,239,245,247,225,229,242,225,243,241,245,225,242,101,\n    128, 51,124,116,144,  0,116,183,183,184,192,184,213,185,100,185,\n    140,187,188,191, 70,192,145,192,157,192,169,193,202,193,227,194,\n     57,194,237,195,165,195,255, 97, 10,183,205,183,215,183,236,183,\n    243,184, 12,184, 90,184,107,184,132,184,146,184,150,226,229,238,\n    231,225,236,105,128,  9,164,227,107,  2,183,222,183,229,228,239,\n    247,110,128, 34,164,236,229,230,116,128, 34,163,228,229,246, 97,\n    128,  9, 36,231,117,  2,183,250,184,  3,234,225,242,225,244,105,\n    128, 10,164,242,237,245,235,232,105,128, 10, 36,104,  4,184, 22,\n    184, 31,184, 45,184, 75,225,242,225,226,233, 99,128,  6, 55,230,\n    233,238,225,236,225,242,225,226,233, 99,128,254,194,105,  2,184,\n     51,184, 66,238,233,244,233,225,236,225,242,225,226,233, 99,128,\n    254,195,242,225,231,225,238, 97,128, 48, 95,237,229,228,233,225,\n    236,225,242,225,226,233, 99,128,254,196,233,243,249,239,245,229,\n    242,225,243,241,245,225,242,101,128, 51,125,235,225,244,225,235,\n    225,238, 97,129, 48,191,184,120,232,225,236,230,247,233,228,244,\n    104,128,255,128,244,247,229,229,236,225,242,225,226,233, 99,128,\n      6, 64,117,128,  3,196,118,130,  5,234,184,158,184,183,228,225,\n    231,229,115,129,251, 74,184,168,104,129,251, 74,184,174,232,229,\n    226,242,229,119,128,251, 74,232,229,226,242,229,119,128,  5,234,\n     98,  2,184,198,184,203,225,114,128,  1,103,239,240,239,237,239,\n    230,111,128, 49, 10, 99,  6,184,227,184,234,184,241,184,250,185,\n     60,185, 87,225,242,239,110,128,  1,101,227,245,242,108,128,  2,\n    168,229,228,233,236,236, 97,128,  1, 99,232,229,104,  4,185,  6,\n    185, 15,185, 29,185, 45,225,242,225,226,233, 99,128,  6,134,230,\n    233,238,225,236,225,242,225,226,233, 99,128,251,123,233,238,233,\n    244,233,225,236,225,242,225,226,233, 99,128,251,124,237,229,228,\n    233,225,236,225,242,225,226,233, 99,128,251,125,233,242, 99,  2,\n    185, 68,185, 73,236,101,128, 36,227,245,237,230,236,229,248,226,\n    229,236,239,119,128, 30,113,239,237,237,225,225,227,227,229,238,\n    116,128,  1, 99,100,  2,185,106,185,116,233,229,242,229,243,233,\n    115,128, 30,151,239,116,  2,185,123,185,132,225,227,227,229,238,\n    116,128, 30,107,226,229,236,239,119,128, 30,109,101,  9,185,160,\n    185,171,185,191,186,201,186,226,187, 34,187,101,187,106,187,158,\n    227,249,242,233,236,236,233, 99,128,  4, 66,228,229,243,227,229,\n    238,228,229,242,227,249,242,233,236,236,233, 99,128,  4,173,104,\n      7,185,207,185,216,185,230,186, 14,186, 44,186, 85,186,183,225,\n    242,225,226,233, 99,128,  6, 42,230,233,238,225,236,225,242,225,\n    226,233, 99,128,254,150,232,225,232,105,  2,185,239,185,254,238,\n    233,244,233,225,236,225,242,225,226,233, 99,128,252,162,243,239,\n    236,225,244,229,228,225,242,225,226,233, 99,128,252, 12,105,  2,\n    186, 20,186, 35,238,233,244,233,225,236,225,242,225,226,233, 99,\n    128,254,151,242,225,231,225,238, 97,128, 48,102,234,229,229,237,\n    105,  2,186, 54,186, 69,238,233,244,233,225,236,225,242,225,226,\n    233, 99,128,252,161,243,239,236,225,244,229,228,225,242,225,226,\n    233, 99,128,252, 11,109,  2,186, 91,186,125,225,242,226,245,244,\n     97,  2,186,102,186,111,225,242,225,226,233, 99,128,  6, 41,230,\n    233,238,225,236,225,242,225,226,233, 99,128,254,148,101,  2,186,\n    131,186,144,228,233,225,236,225,242,225,226,233, 99,128,254,152,\n    229,237,105,  2,186,152,186,167,238,233,244,233,225,236,225,242,\n    225,226,233, 99,128,252,164,243,239,236,225,244,229,228,225,242,\n    225,226,233, 99,128,252, 14,238,239,239,238,230,233,238,225,236,\n    225,242,225,226,233, 99,128,252,115,235,225,244,225,235,225,238,\n     97,129, 48,198,186,214,232,225,236,230,247,233,228,244,104,128,\n    255,131,108,  2,186,232,186,251,229,240,232,239,238,101,129, 33,\n     33,186,243,226,236,225,227,107,128, 38, 14,233,243,232, 97,  2,\n    187,  4,187, 19,231,229,228,239,236,225,232,229,226,242,229,119,\n    128,  5,160,241,229,244,225,238,225,232,229,226,242,229,119,128,\n      5,169,110,  4,187, 44,187, 53,187, 72,187, 93,227,233,242,227,\n    236,101,128, 36,105,233,228,229,239,231,242,225,240,232,233,227,\n    240,225,242,229,110,128, 50, 41,112,  2,187, 78,187, 85,225,242,\n    229,110,128, 36,125,229,242,233,239,100,128, 36,145,242,239,237,\n    225,110,128, 33,121,243,104,128,  2,167,116,131,  5,216,187,116,\n    187,136,187,145,228,225,231,229,243,104,129,251, 56,187,127,232,\n    229,226,242,229,119,128,251, 56,232,229,226,242,229,119,128,  5,\n    216,243,229,227,249,242,233,236,236,233, 99,128,  4,181,246,233,\n    114,  2,187,166,187,175,232,229,226,242,229,119,128,  5,155,236,\n    229,230,244,232,229,226,242,229,119,128,  5,155,104,  6,187,202,\n    188, 98,188,220,189, 96,190,  3,191, 60, 97,  5,187,214,187,224,\n    187,231,188,  0,188, 29,226,229,238,231,225,236,105,128,  9,165,\n    228,229,246, 97,128,  9, 37,231,117,  2,187,238,187,247,234,225,\n    242,225,244,105,128, 10,165,242,237,245,235,232,105,128, 10, 37,\n    108,  2,188,  6,188, 15,225,242,225,226,233, 99,128,  6, 48,230,\n    233,238,225,236,225,242,225,226,233, 99,128,254,172,238,244,232,\n    225,235,232,225,116,  3,188, 44,188, 75,188, 82,236,239,119,  2,\n    188, 52,188, 63,236,229,230,244,244,232,225,105,128,248,152,242,\n    233,231,232,244,244,232,225,105,128,248,151,244,232,225,105,128,\n     14, 76,245,240,240,229,242,236,229,230,244,244,232,225,105,128,\n    248,150,101,  3,188,106,188,170,188,193,104,  4,188,116,188,125,\n    188,139,188,155,225,242,225,226,233, 99,128,  6, 43,230,233,238,\n    225,236,225,242,225,226,233, 99,128,254,154,233,238,233,244,233,\n    225,236,225,242,225,226,233, 99,128,254,155,237,229,228,233,225,\n    236,225,242,225,226,233, 99,128,254,156,242,101,  2,188,177,188,\n    186,229,248,233,243,244,115,128, 34,  3,230,239,242,101,128, 34,\n     52,244, 97,130,  3,184,188,202,188,206, 49,128,  3,209,243,249,\n    237,226,239,236,231,242,229,229,107,128,  3,209,105,  2,188,226,\n    189, 56,229,245,244,104,  4,188,239,189, 18,189, 33,189, 42, 97,\n      2,188,245,189,  4,227,233,242,227,236,229,235,239,242,229,225,\n    110,128, 50,121,240,225,242,229,238,235,239,242,229,225,110,128,\n     50, 25,227,233,242,227,236,229,235,239,242,229,225,110,128, 50,\n    107,235,239,242,229,225,110,128, 49, 76,240,225,242,229,238,235,\n    239,242,229,225,110,128, 50, 11,242,244,229,229,110,  2,189, 66,\n    189, 75,227,233,242,227,236,101,128, 36,108,112,  2,189, 81,189,\n     88,225,242,229,110,128, 36,128,229,242,233,239,100,128, 36,148,\n    111,  6,189,110,189,127,189,132,189,146,189,151,189,204,238,225,\n    238,231,237,239,238,244,232,239,244,232,225,105,128, 14, 17,239,\n    107,128,  1,173,240,232,245,244,232,225,239,244,232,225,105,128,\n     14, 18,242,110,128,  0,254,244,104,  3,189,160,189,184,189,194,\n     97,  2,189,166,189,176,232,225,238,244,232,225,105,128, 14, 23,\n    238,244,232,225,105,128, 14, 16,239,238,231,244,232,225,105,128,\n     14, 24,245,238,231,244,232,225,105,128, 14, 22,245,243,225,238,\n    100,  2,189,214,189,225,227,249,242,233,236,236,233, 99,128,  4,\n    130,243,243,229,240,225,242,225,244,239,114,  2,189,240,189,249,\n    225,242,225,226,233, 99,128,  6,108,240,229,242,243,233,225,110,\n    128,  6,108,242,229,101,144,  0, 51,190, 41,190, 50,190, 60,190,\n     90,190, 97,190,107,190,132,190,159,190,193,190,205,190,224,190,\n    235,191, 12,191, 34,191, 42,191, 53,225,242,225,226,233, 99,128,\n      6, 99,226,229,238,231,225,236,105,128,  9,233,227,233,242,227,\n    236,101,129, 36, 98,190, 71,233,238,246,229,242,243,229,243,225,\n    238,243,243,229,242,233,102,128, 39,140,228,229,246, 97,128,  9,\n    105,229,233,231,232,244,232,115,128, 33, 92,231,117,  2,190,114,\n    190,123,234,225,242,225,244,105,128, 10,233,242,237,245,235,232,\n    105,128, 10,105,232, 97,  2,190,139,190,150,227,235,225,242,225,\n    226,233, 99,128,  6, 99,238,231,250,232,239,117,128, 48, 35,105,\n      2,190,165,190,183,228,229,239,231,242,225,240,232,233,227,240,\n    225,242,229,110,128, 50, 34,238,230,229,242,233,239,114,128, 32,\n    131,237,239,238,239,243,240,225,227,101,128,255, 19,238,245,237,\n    229,242,225,244,239,242,226,229,238,231,225,236,105,128,  9,246,\n    239,236,228,243,244,249,236,101,128,247, 51,112,  2,190,241,190,\n    248,225,242,229,110,128, 36,118,229,114,  2,190,255,191,  5,233,\n    239,100,128, 36,138,243,233,225,110,128,  6,243,241,245,225,242,\n    244,229,242,115,129,  0,190,191, 25,229,237,228,225,243,104,128,\n    246,222,242,239,237,225,110,128, 33,114,243,245,240,229,242,233,\n    239,114,128,  0,179,244,232,225,105,128, 14, 83,250,243,241,245,\n    225,242,101,128, 51,148,105,  7,191, 86,191, 97,191,212,192, 54,\n    192, 66,192,115,192,132,232,233,242,225,231,225,238, 97,128, 48,\n     97,107,  2,191,103,191,127,225,244,225,235,225,238, 97,129, 48,\n    193,191,115,232,225,236,230,247,233,228,244,104,128,255,129,229,\n    245,116,  4,191,139,191,174,191,189,191,198, 97,  2,191,145,191,\n    160,227,233,242,227,236,229,235,239,242,229,225,110,128, 50,112,\n    240,225,242,229,238,235,239,242,229,225,110,128, 50, 16,227,233,\n    242,227,236,229,235,239,242,229,225,110,128, 50, 98,235,239,242,\n    229,225,110,128, 49, 55,240,225,242,229,238,235,239,242,229,225,\n    110,128, 50,  2,236,228,101,133,  2,220,191,228,191,239,192,  0,\n    192, 12,192, 40,226,229,236,239,247,227,237, 98,128,  3, 48, 99,\n      2,191,245,191,250,237, 98,128,  3,  3,239,237, 98,128,  3,  3,\n    228,239,245,226,236,229,227,237, 98,128,  3, 96,111,  2,192, 18,\n    192, 28,240,229,242,225,244,239,114,128, 34, 60,246,229,242,236,\n    225,249,227,237, 98,128,  3, 52,246,229,242,244,233,227,225,236,\n    227,237, 98,128,  3, 62,237,229,243,227,233,242,227,236,101,128,\n     34,151,112,  2,192, 72,192,102,229,232, 97,  2,192, 80,192, 89,\n    232,229,226,242,229,119,128,  5,150,236,229,230,244,232,229,226,\n    242,229,119,128,  5,150,240,233,231,245,242,237,245,235,232,105,\n    128, 10,112,244,236,239,227,249,242,233,236,236,233,227,227,237,\n     98,128,  4,131,247,238,225,242,237,229,238,233,225,110,128,  5,\n    127,236,233,238,229,226,229,236,239,119,128, 30,111,237,239,238,\n    239,243,240,225,227,101,128,255, 84,111,  7,192,185,192,196,192,\n    207,192,232,193, 96,193,108,193,192,225,242,237,229,238,233,225,\n    110,128,  5,105,232,233,242,225,231,225,238, 97,128, 48,104,235,\n    225,244,225,235,225,238, 97,129, 48,200,192,220,232,225,236,230,\n    247,233,228,244,104,128,255,132,110,  3,192,240,193, 82,193, 87,\n    101,  4,192,250,193, 63,193, 70,193, 76,226,225,114,  4,193,  6,\n    193, 35,193, 45,193, 54,229,248,244,242, 97,  2,193, 16,193, 26,\n    232,233,231,232,237,239,100,128,  2,229,236,239,247,237,239,100,\n    128,  2,233,232,233,231,232,237,239,100,128,  2,230,236,239,247,\n    237,239,100,128,  2,232,237,233,228,237,239,100,128,  2,231,230,\n    233,246,101,128,  1,189,243,233,120,128,  1,133,244,247,111,128,\n      1,168,239,115,128,  3,132,243,241,245,225,242,101,128, 51, 39,\n    240,225,244,225,235,244,232,225,105,128, 14, 15,242,244,239,233,\n    243,229,243,232,229,236,236,226,242,225,227,235,229,116,  2,193,\n    131,193,161,236,229,230,116,130, 48, 20,193,142,193,150,243,237,\n    225,236,108,128,254, 93,246,229,242,244,233,227,225,108,128,254,\n     57,242,233,231,232,116,130, 48, 21,193,173,193,181,243,237,225,\n    236,108,128,254, 94,246,229,242,244,233,227,225,108,128,254, 58,\n    244,225,239,244,232,225,105,128, 14, 21,240, 97,  2,193,209,193,\n    221,236,225,244,225,236,232,239,239,107,128,  1,171,242,229,110,\n    128, 36,175,114,  3,193,235,194, 10,194, 25,225,228,229,237,225,\n    242,107,129, 33, 34,193,247,115,  2,193,253,194,  3,225,238,115,\n    128,248,234,229,242,233,102,128,246,219,229,244,242,239,230,236,\n    229,248,232,239,239,107,128,  2,136,233,225,103,  4,194, 37,194,\n     42,194, 47,194, 52,228,110,128, 37,188,236,102,128, 37,196,242,\n    116,128, 37,186,245,112,128, 37,178,115,132,  2,166,194, 69,194,\n    108,194,214,194,227,225,228,105,130,  5,230,194, 79,194, 99,228,\n    225,231,229,243,104,129,251, 70,194, 90,232,229,226,242,229,119,\n    128,251, 70,232,229,226,242,229,119,128,  5,230,101,  2,194,114,\n    194,125,227,249,242,233,236,236,233, 99,128,  4, 70,242,101,134,\n      5,181,194,142,194,156,194,161,194,170,194,185,194,201, 49,  2,\n    194,148,194,152, 50,128,  5,181,101,128,  5,181,178, 98,128,  5,\n    181,232,229,226,242,229,119,128,  5,181,238,225,242,242,239,247,\n    232,229,226,242,229,119,128,  5,181,241,245,225,242,244,229,242,\n    232,229,226,242,229,119,128,  5,181,247,233,228,229,232,229,226,\n    242,229,119,128,  5,181,232,229,227,249,242,233,236,236,233, 99,\n    128,  4, 91,245,240,229,242,233,239,114,128,246,243,116,  4,194,\n    247,195, 41,195,106,195,157, 97,  3,194,255,195,  9,195, 16,226,\n    229,238,231,225,236,105,128,  9,159,228,229,246, 97,128,  9, 31,\n    231,117,  2,195, 23,195, 32,234,225,242,225,244,105,128, 10,159,\n    242,237,245,235,232,105,128, 10, 31,229,104,  4,195, 52,195, 61,\n    195, 75,195, 91,225,242,225,226,233, 99,128,  6,121,230,233,238,\n    225,236,225,242,225,226,233, 99,128,251,103,233,238,233,244,233,\n    225,236,225,242,225,226,233, 99,128,251,104,237,229,228,233,225,\n    236,225,242,225,226,233, 99,128,251,105,232, 97,  3,195,115,195,\n    125,195,132,226,229,238,231,225,236,105,128,  9,160,228,229,246,\n     97,128,  9, 32,231,117,  2,195,139,195,148,234,225,242,225,244,\n    105,128, 10,160,242,237,245,235,232,105,128, 10, 32,245,242,238,\n    229,100,128,  2,135,117,  3,195,173,195,184,195,209,232,233,242,\n    225,231,225,238, 97,128, 48,100,235,225,244,225,235,225,238, 97,\n    129, 48,196,195,197,232,225,236,230,247,233,228,244,104,128,255,\n    130,243,237,225,236,108,  2,195,219,195,230,232,233,242,225,231,\n    225,238, 97,128, 48, 99,235,225,244,225,235,225,238, 97,129, 48,\n    195,195,243,232,225,236,230,247,233,228,244,104,128,255,111,119,\n      2,196,  5,196,110,101,  2,196, 11,196, 59,236,246,101,  3,196,\n     21,196, 30,196, 51,227,233,242,227,236,101,128, 36,107,112,  2,\n    196, 36,196, 43,225,242,229,110,128, 36,127,229,242,233,239,100,\n    128, 36,147,242,239,237,225,110,128, 33,123,238,244,121,  3,196,\n     69,196, 78,196, 89,227,233,242,227,236,101,128, 36,115,232,225,\n    238,231,250,232,239,117,128, 83, 68,112,  2,196, 95,196,102,225,\n    242,229,110,128, 36,135,229,242,233,239,100,128, 36,155,111,142,\n      0, 50,196,142,196,151,196,161,196,191,196,243,197, 12,197, 39,\n    197, 73,197, 85,197,104,197,115,197,148,197,156,197,180,225,242,\n    225,226,233, 99,128,  6, 98,226,229,238,231,225,236,105,128,  9,\n    232,227,233,242,227,236,101,129, 36, 97,196,172,233,238,246,229,\n    242,243,229,243,225,238,243,243,229,242,233,102,128, 39,139,100,\n      2,196,197,196,203,229,246, 97,128,  9,104,239,116,  2,196,210,\n    196,221,229,238,236,229,225,228,229,114,128, 32, 37,236,229,225,\n    228,229,114,129, 32, 37,196,232,246,229,242,244,233,227,225,108,\n    128,254, 48,231,117,  2,196,250,197,  3,234,225,242,225,244,105,\n    128, 10,232,242,237,245,235,232,105,128, 10,104,232, 97,  2,197,\n     19,197, 30,227,235,225,242,225,226,233, 99,128,  6, 98,238,231,\n    250,232,239,117,128, 48, 34,105,  2,197, 45,197, 63,228,229,239,\n    231,242,225,240,232,233,227,240,225,242,229,110,128, 50, 33,238,\n    230,229,242,233,239,114,128, 32,130,237,239,238,239,243,240,225,\n    227,101,128,255, 18,238,245,237,229,242,225,244,239,242,226,229,\n    238,231,225,236,105,128,  9,245,239,236,228,243,244,249,236,101,\n    128,247, 50,112,  2,197,121,197,128,225,242,229,110,128, 36,117,\n    229,114,  2,197,135,197,141,233,239,100,128, 36,137,243,233,225,\n    110,128,  6,242,242,239,237,225,110,128, 33,113,115,  2,197,162,\n    197,170,244,242,239,235,101,128,  1,187,245,240,229,242,233,239,\n    114,128,  0,178,244,104,  2,197,187,197,192,225,105,128, 14, 82,\n    233,242,228,115,128, 33, 84,117,145,  0,117,197,237,197,245,198,\n     30,198, 87,198,225,199,  6,199,129,199,145,199,196,200, 10,200,\n     91,200,100,200,219,200,243,201, 95,201,123,201,237,225,227,245,\n    244,101,128,  0,250, 98,  4,197,255,198,  4,198, 13,198, 23,225,\n    114,128,  2,137,229,238,231,225,236,105,128,  9,137,239,240,239,\n    237,239,230,111,128, 49, 40,242,229,246,101,128,  1,109, 99,  3,\n    198, 38,198, 45,198, 77,225,242,239,110,128,  1,212,233,242, 99,\n      2,198, 53,198, 58,236,101,128, 36,228,245,237,230,236,229,120,\n    129,  0,251,198, 69,226,229,236,239,119,128, 30,119,249,242,233,\n    236,236,233, 99,128,  4, 67,100,  5,198, 99,198,110,198,133,198,\n    139,198,215,225,244,244,225,228,229,246, 97,128,  9, 81,226,108,\n      2,198,117,198,125,225,227,245,244,101,128,  1,113,231,242,225,\n    246,101,128,  2, 21,229,246, 97,128,  9,  9,233,229,242,229,243,\n    233,115,133,  0,252,198,159,198,167,198,175,198,198,198,206,225,\n    227,245,244,101,128,  1,216,226,229,236,239,119,128, 30,115, 99,\n      2,198,181,198,188,225,242,239,110,128,  1,218,249,242,233,236,\n    236,233, 99,128,  4,241,231,242,225,246,101,128,  1,220,237,225,\n    227,242,239,110,128,  1,214,239,244,226,229,236,239,119,128, 30,\n    229,103,  2,198,231,198,238,242,225,246,101,128,  0,249,117,  2,\n    198,244,198,253,234,225,242,225,244,105,128, 10,137,242,237,245,\n    235,232,105,128, 10,  9,104,  3,199, 14,199, 24,199,102,233,242,\n    225,231,225,238, 97,128, 48, 70,111,  2,199, 30,199, 40,239,235,\n    225,226,239,246,101,128, 30,231,242,110,133,  1,176,199, 55,199,\n     63,199, 74,199, 82,199, 94,225,227,245,244,101,128, 30,233,228,\n    239,244,226,229,236,239,119,128, 30,241,231,242,225,246,101,128,\n     30,235,232,239,239,235,225,226,239,246,101,128, 30,237,244,233,\n    236,228,101,128, 30,239,245,238,231,225,242,245,237,236,225,245,\n    116,129,  1,113,199,118,227,249,242,233,236,236,233, 99,128,  4,\n    243,233,238,246,229,242,244,229,228,226,242,229,246,101,128,  2,\n     23,107,  3,199,153,199,177,199,188,225,244,225,235,225,238, 97,\n    129, 48,166,199,165,232,225,236,230,247,233,228,244,104,128,255,\n    115,227,249,242,233,236,236,233, 99,128,  4,121,239,242,229,225,\n    110,128, 49, 92,109,  2,199,202,199,255, 97,  2,199,208,199,241,\n    227,242,239,110,130,  1,107,199,219,199,230,227,249,242,233,236,\n    236,233, 99,128,  4,239,228,233,229,242,229,243,233,115,128, 30,\n    123,244,242,225,231,245,242,237,245,235,232,105,128, 10, 65,239,\n    238,239,243,240,225,227,101,128,255, 85,110,  2,200, 16,200, 71,\n    228,229,242,243,227,239,242,101,132,  0, 95,200, 35,200, 41,200,\n     53,200, 64,228,226,108,128, 32, 23,237,239,238,239,243,240,225,\n    227,101,128,255, 63,246,229,242,244,233,227,225,108,128,254, 51,\n    247,225,246,121,128,254, 79,105,  2,200, 77,200, 82,239,110,128,\n     34, 42,246,229,242,243,225,108,128, 34,  0,239,231,239,238,229,\n    107,128,  1,115,112,  5,200,112,200,119,200,127,200,142,200,193,\n    225,242,229,110,128, 36,176,226,236,239,227,107,128, 37,128,240,\n    229,242,228,239,244,232,229,226,242,229,119,128,  5,196,243,233,\n    236,239,110,131,  3,197,200,156,200,177,200,185,228,233,229,242,\n    229,243,233,115,129,  3,203,200,169,244,239,238,239,115,128,  3,\n    176,236,225,244,233,110,128,  2,138,244,239,238,239,115,128,  3,\n    205,244,225,227,107,  2,200,202,200,213,226,229,236,239,247,227,\n    237, 98,128,  3, 29,237,239,100,128,  2,212,114,  2,200,225,200,\n    237,225,231,245,242,237,245,235,232,105,128, 10,115,233,238,103,\n    128,  1,111,115,  3,200,251,201, 10,201, 55,232,239,242,244,227,\n    249,242,233,236,236,233, 99,128,  4, 94,237,225,236,108,  2,201,\n     19,201, 30,232,233,242,225,231,225,238, 97,128, 48, 69,235,225,\n    244,225,235,225,238, 97,129, 48,165,201, 43,232,225,236,230,247,\n    233,228,244,104,128,255,105,244,242,225,233,231,232,116,  2,201,\n     67,201, 78,227,249,242,233,236,236,233, 99,128,  4,175,243,244,\n    242,239,235,229,227,249,242,233,236,236,233, 99,128,  4,177,244,\n    233,236,228,101,130,  1,105,201,107,201,115,225,227,245,244,101,\n    128, 30,121,226,229,236,239,119,128, 30,117,117,  5,201,135,201,\n    145,201,152,201,177,201,193,226,229,238,231,225,236,105,128,  9,\n    138,228,229,246, 97,128,  9, 10,231,117,  2,201,159,201,168,234,\n    225,242,225,244,105,128, 10,138,242,237,245,235,232,105,128, 10,\n     10,237,225,244,242,225,231,245,242,237,245,235,232,105,128, 10,\n     66,246,239,247,229,236,243,233,231,110,  3,201,209,201,219,201,\n    226,226,229,238,231,225,236,105,128,  9,194,228,229,246, 97,128,\n      9, 66,231,245,234,225,242,225,244,105,128, 10,194,246,239,247,\n    229,236,243,233,231,110,  3,201,253,202,  7,202, 14,226,229,238,\n    231,225,236,105,128,  9,193,228,229,246, 97,128,  9, 65,231,245,\n    234,225,242,225,244,105,128, 10,193,118,139,  0,118,202, 51,202,\n    199,202,208,202,219,203,148,203,155,203,253,204,  9,204,109,204,\n    117,204,138, 97,  4,202, 61,202, 68,202, 93,202,104,228,229,246,\n     97,128,  9, 53,231,117,  2,202, 75,202, 84,234,225,242,225,244,\n    105,128, 10,181,242,237,245,235,232,105,128, 10, 53,235,225,244,\n    225,235,225,238, 97,128, 48,247,118,132,  5,213,202,116,202,143,\n    202,175,202,187,228,225,231,229,243,104,130,251, 53,202,129,202,\n    134,182, 53,128,251, 53,232,229,226,242,229,119,128,251, 53,104,\n      2,202,149,202,157,229,226,242,229,119,128,  5,213,239,236,225,\n    109,129,251, 75,202,166,232,229,226,242,229,119,128,251, 75,246,\n    225,246,232,229,226,242,229,119,128,  5,240,249,239,228,232,229,\n    226,242,229,119,128,  5,241,227,233,242,227,236,101,128, 36,229,\n    228,239,244,226,229,236,239,119,128, 30,127,101,  6,202,233,202,\n    244,203, 52,203, 63,203, 69,203,136,227,249,242,233,236,236,233,\n     99,128,  4, 50,104,  4,202,254,203,  7,203, 21,203, 37,225,242,\n    225,226,233, 99,128,  6,164,230,233,238,225,236,225,242,225,226,\n    233, 99,128,251,107,233,238,233,244,233,225,236,225,242,225,226,\n    233, 99,128,251,108,237,229,228,233,225,236,225,242,225,226,233,\n     99,128,251,109,235,225,244,225,235,225,238, 97,128, 48,249,238,\n    245,115,128, 38, 64,242,244,233,227,225,108,  2,203, 80,203, 86,\n    226,225,114,128,  0,124,236,233,238,101,  4,203, 99,203,110,203,\n    121,203,130,225,226,239,246,229,227,237, 98,128,  3, 13,226,229,\n    236,239,247,227,237, 98,128,  3, 41,236,239,247,237,239,100,128,\n      2,204,237,239,100,128,  2,200,247,225,242,237,229,238,233,225,\n    110,128,  5,126,232,239,239,107,128,  2,139,105,  3,203,163,203,\n    174,203,213,235,225,244,225,235,225,238, 97,128, 48,248,242,225,\n    237, 97,  3,203,185,203,195,203,202,226,229,238,231,225,236,105,\n    128,  9,205,228,229,246, 97,128,  9, 77,231,245,234,225,242,225,\n    244,105,128, 10,205,243,225,242,231, 97,  3,203,225,203,235,203,\n    242,226,229,238,231,225,236,105,128,  9,131,228,229,246, 97,128,\n      9,  3,231,245,234,225,242,225,244,105,128, 10,131,237,239,238,\n    239,243,240,225,227,101,128,255, 86,111,  3,204, 17,204, 28,204,\n     98,225,242,237,229,238,233,225,110,128,  5,120,233,227,229,100,\n      2,204, 37,204, 73,233,244,229,242,225,244,233,239,110,  2,204,\n     51,204, 62,232,233,242,225,231,225,238, 97,128, 48,158,235,225,\n    244,225,235,225,238, 97,128, 48,254,237,225,242,235,235,225,238,\n     97,129, 48,155,204, 86,232,225,236,230,247,233,228,244,104,128,\n    255,158,235,225,244,225,235,225,238, 97,128, 48,250,240,225,242,\n    229,110,128, 36,177,116,  2,204,123,204,130,233,236,228,101,128,\n     30,125,245,242,238,229,100,128,  2,140,117,  2,204,144,204,155,\n    232,233,242,225,231,225,238, 97,128, 48,148,235,225,244,225,235,\n    225,238, 97,128, 48,244,119,143,  0,119,204,200,205,177,205,187,\n    205,210,205,250,206, 61,206, 69,208, 40,208, 81,208, 93,208,168,\n    208,176,208,183,208,194,208,203, 97,  8,204,218,204,225,204,235,\n    204,246,205, 28,205, 60,205, 72,205,108,227,245,244,101,128, 30,\n    131,229,235,239,242,229,225,110,128, 49, 89,232,233,242,225,231,\n    225,238, 97,128, 48,143,107,  2,204,252,205, 20,225,244,225,235,\n    225,238, 97,129, 48,239,205,  8,232,225,236,230,247,233,228,244,\n    104,128,255,156,239,242,229,225,110,128, 49, 88,243,237,225,236,\n    108,  2,205, 38,205, 49,232,233,242,225,231,225,238, 97,128, 48,\n    142,235,225,244,225,235,225,238, 97,128, 48,238,244,244,239,243,\n    241,245,225,242,101,128, 51, 87,118,  2,205, 78,205, 86,229,228,\n    225,243,104,128, 48, 28,249,245,238,228,229,242,243,227,239,242,\n    229,246,229,242,244,233,227,225,108,128,254, 52,119,  3,205,116,\n    205,125,205,139,225,242,225,226,233, 99,128,  6, 72,230,233,238,\n    225,236,225,242,225,226,233, 99,128,254,238,232,225,237,250,225,\n    225,226,239,246,101,  2,205,154,205,163,225,242,225,226,233, 99,\n    128,  6, 36,230,233,238,225,236,225,242,225,226,233, 99,128,254,\n    134,226,243,241,245,225,242,101,128, 51,221,227,233,242, 99,  2,\n    205,196,205,201,236,101,128, 36,230,245,237,230,236,229,120,128,\n      1,117,100,  2,205,216,205,226,233,229,242,229,243,233,115,128,\n     30,133,239,116,  2,205,233,205,242,225,227,227,229,238,116,128,\n     30,135,226,229,236,239,119,128, 30,137,101,  4,206,  4,206, 15,\n    206, 27,206, 51,232,233,242,225,231,225,238, 97,128, 48,145,233,\n    229,242,243,244,242,225,243,115,128, 33, 24,107,  2,206, 33,206,\n     43,225,244,225,235,225,238, 97,128, 48,241,239,242,229,225,110,\n    128, 49, 94,239,235,239,242,229,225,110,128, 49, 93,231,242,225,\n    246,101,128, 30,129,232,233,244,101,  8,206, 90,206, 99,206,183,\n    207, 17,207,101,207,146,207,198,207,254,226,245,236,236,229,116,\n    128, 37,230, 99,  2,206,105,206,125,233,242,227,236,101,129, 37,\n    203,206,115,233,238,246,229,242,243,101,128, 37,217,239,242,238,\n    229,242,226,242,225,227,235,229,116,  2,206,142,206,162,236,229,\n    230,116,129, 48, 14,206,151,246,229,242,244,233,227,225,108,128,\n    254, 67,242,233,231,232,116,129, 48, 15,206,172,246,229,242,244,\n    233,227,225,108,128,254, 68,100,  2,206,189,206,230,233,225,237,\n    239,238,100,129, 37,199,206,200,227,239,238,244,225,233,238,233,\n    238,231,226,236,225,227,235,243,237,225,236,236,228,233,225,237,\n    239,238,100,128, 37,200,239,247,238,240,239,233,238,244,233,238,\n    103,  2,206,246,207,  6,243,237,225,236,236,244,242,233,225,238,\n    231,236,101,128, 37,191,244,242,233,225,238,231,236,101,128, 37,\n    189,236,101,  2,207, 24,207, 66,230,244,240,239,233,238,244,233,\n    238,103,  2,207, 39,207, 55,243,237,225,236,236,244,242,233,225,\n    238,231,236,101,128, 37,195,244,242,233,225,238,231,236,101,128,\n     37,193,238,244,233,227,245,236,225,242,226,242,225,227,235,229,\n    116,  2,207, 86,207, 93,236,229,230,116,128, 48, 22,242,233,231,\n    232,116,128, 48, 23,242,233,231,232,244,240,239,233,238,244,233,\n    238,103,  2,207,119,207,135,243,237,225,236,236,244,242,233,225,\n    238,231,236,101,128, 37,185,244,242,233,225,238,231,236,101,128,\n     37,183,115,  3,207,154,207,184,207,192,109,  2,207,160,207,172,\n    225,236,236,243,241,245,225,242,101,128, 37,171,233,236,233,238,\n    231,230,225,227,101,128, 38, 58,241,245,225,242,101,128, 37,161,\n    244,225,114,128, 38,  6,116,  2,207,204,207,215,229,236,229,240,\n    232,239,238,101,128, 38, 15,239,242,244,239,233,243,229,243,232,\n    229,236,236,226,242,225,227,235,229,116,  2,207,239,207,246,236,\n    229,230,116,128, 48, 24,242,233,231,232,116,128, 48, 25,245,240,\n    240,239,233,238,244,233,238,103,  2,208, 13,208, 29,243,237,225,\n    236,236,244,242,233,225,238,231,236,101,128, 37,181,244,242,233,\n    225,238,231,236,101,128, 37,179,105,  2,208, 46,208, 57,232,233,\n    242,225,231,225,238, 97,128, 48,144,107,  2,208, 63,208, 73,225,\n    244,225,235,225,238, 97,128, 48,240,239,242,229,225,110,128, 49,\n     95,237,239,238,239,243,240,225,227,101,128,255, 87,111,  4,208,\n    103,208,114,208,139,208,157,232,233,242,225,231,225,238, 97,128,\n     48,146,235,225,244,225,235,225,238, 97,129, 48,242,208,127,232,\n    225,236,230,247,233,228,244,104,128,255,102,110,129, 32,169,208,\n    145,237,239,238,239,243,240,225,227,101,128,255,230,247,225,229,\n    238,244,232,225,105,128, 14, 39,240,225,242,229,110,128, 36,178,\n    242,233,238,103,128, 30,152,243,245,240,229,242,233,239,114,128,\n      2,183,244,245,242,238,229,100,128,  2,141,249,238,110,128,  1,\n    191,120,137,  0,120,208,231,208,242,208,253,209,  6,209, 33,209,\n     46,209, 50,209, 62,209, 70,225,226,239,246,229,227,237, 98,128,\n      3, 61,226,239,240,239,237,239,230,111,128, 49, 18,227,233,242,\n    227,236,101,128, 36,231,100,  2,209, 12,209, 22,233,229,242,229,\n    243,233,115,128, 30,141,239,244,225,227,227,229,238,116,128, 30,\n    139,229,232,225,242,237,229,238,233,225,110,128,  5,109,105,128,\n      3,190,237,239,238,239,243,240,225,227,101,128,255, 88,240,225,\n    242,229,110,128, 36,179,243,245,240,229,242,233,239,114,128,  2,\n    227,121,143,  0,121,209,115,210, 74,210, 97,210,137,212,103,212,\n    111,212,128,212,192,212,204,213,201,213,241,213,253,214,  8,214,\n     29,215,  2, 97, 11,209,139,209,151,209,161,209,168,209,175,209,\n    185,209,210,209,221,210,  3,210, 16,210, 62,225,228,239,243,241,\n    245,225,242,101,128, 51, 78,226,229,238,231,225,236,105,128,  9,\n    175,227,245,244,101,128,  0,253,228,229,246, 97,128,  9, 47,229,\n    235,239,242,229,225,110,128, 49, 82,231,117,  2,209,192,209,201,\n    234,225,242,225,244,105,128, 10,175,242,237,245,235,232,105,128,\n     10, 47,232,233,242,225,231,225,238, 97,128, 48,132,107,  2,209,\n    227,209,251,225,244,225,235,225,238, 97,129, 48,228,209,239,232,\n    225,236,230,247,233,228,244,104,128,255,148,239,242,229,225,110,\n    128, 49, 81,237,225,235,235,225,238,244,232,225,105,128, 14, 78,\n    243,237,225,236,108,  2,210, 26,210, 37,232,233,242,225,231,225,\n    238, 97,128, 48,131,235,225,244,225,235,225,238, 97,129, 48,227,\n    210, 50,232,225,236,230,247,233,228,244,104,128,255,108,244,227,\n    249,242,233,236,236,233, 99,128,  4, 99,227,233,242, 99,  2,210,\n     83,210, 88,236,101,128, 36,232,245,237,230,236,229,120,128,  1,\n    119,100,  2,210,103,210,113,233,229,242,229,243,233,115,128,  0,\n    255,239,116,  2,210,120,210,129,225,227,227,229,238,116,128, 30,\n    143,226,229,236,239,119,128, 30,245,101,  7,210,153,211,161,211,\n    170,211,188,211,220,212, 40,212, 91,104,  8,210,171,210,180,210,\n    214,210,228,211, 45,211, 61,211,120,211,138,225,242,225,226,233,\n     99,128,  6, 74,226,225,242,242,229,101,  2,210,191,210,200,225,\n    242,225,226,233, 99,128,  6,210,230,233,238,225,236,225,242,225,\n    226,233, 99,128,251,175,230,233,238,225,236,225,242,225,226,233,\n     99,128,254,242,232,225,237,250,225,225,226,239,246,101,  4,210,\n    247,211,  0,211, 14,211, 30,225,242,225,226,233, 99,128,  6, 38,\n    230,233,238,225,236,225,242,225,226,233, 99,128,254,138,233,238,\n    233,244,233,225,236,225,242,225,226,233, 99,128,254,139,237,229,\n    228,233,225,236,225,242,225,226,233, 99,128,254,140,233,238,233,\n    244,233,225,236,225,242,225,226,233, 99,128,254,243,237,101,  2,\n    211, 68,211, 81,228,233,225,236,225,242,225,226,233, 99,128,254,\n    244,229,237,105,  2,211, 89,211,104,238,233,244,233,225,236,225,\n    242,225,226,233, 99,128,252,221,243,239,236,225,244,229,228,225,\n    242,225,226,233, 99,128,252, 88,238,239,239,238,230,233,238,225,\n    236,225,242,225,226,233, 99,128,252,148,244,232,242,229,229,228,\n    239,244,243,226,229,236,239,247,225,242,225,226,233, 99,128,  6,\n    209,235,239,242,229,225,110,128, 49, 86,110,129,  0,165,211,176,\n    237,239,238,239,243,240,225,227,101,128,255,229,111,  2,211,194,\n    211,203,235,239,242,229,225,110,128, 49, 85,242,233,238,232,233,\n    229,245,232,235,239,242,229,225,110,128, 49,134,114,  3,211,228,\n    212,  8,212, 20,225,232,226,229,238,249,239,237,111,  2,211,242,\n    211,251,232,229,226,242,229,119,128,  5,170,236,229,230,244,232,\n    229,226,242,229,119,128,  5,170,233,227,249,242,233,236,236,233,\n     99,128,  4, 75,245,228,233,229,242,229,243,233,243,227,249,242,\n    233,236,236,233, 99,128,  4,249,243,233,229,245,238,103,  3,212,\n     53,212, 62,212, 78,235,239,242,229,225,110,128, 49,129,240,225,\n    238,243,233,239,243,235,239,242,229,225,110,128, 49,131,243,233,\n    239,243,235,239,242,229,225,110,128, 49,130,244,233,246,232,229,\n    226,242,229,119,128,  5,154,231,242,225,246,101,128, 30,243,232,\n    239,239,107,129,  1,180,212,120,225,226,239,246,101,128, 30,247,\n    105,  5,212,140,212,151,212,162,212,171,212,179,225,242,237,229,\n    238,233,225,110,128,  5,117,227,249,242,233,236,236,233, 99,128,\n      4, 87,235,239,242,229,225,110,128, 49, 98,238,249,225,238,103,\n    128, 38, 47,247,238,225,242,237,229,238,233,225,110,128,  5,130,\n    237,239,238,239,243,240,225,227,101,128,255, 89,111,  7,212,220,\n    213, 34,213, 45,213, 55,213, 93,213,139,213,148,100,131,  5,217,\n    212,230,212,250,213,  3,228,225,231,229,243,104,129,251, 57,212,\n    241,232,229,226,242,229,119,128,251, 57,232,229,226,242,229,119,\n    128,  5,217,249,239,100,  2,213, 11,213, 20,232,229,226,242,229,\n    119,128,  5,242,240,225,244,225,232,232,229,226,242,229,119,128,\n    251, 31,232,233,242,225,231,225,238, 97,128, 48,136,233,235,239,\n    242,229,225,110,128, 49,137,107,  2,213, 61,213, 85,225,244,225,\n    235,225,238, 97,129, 48,232,213, 73,232,225,236,230,247,233,228,\n    244,104,128,255,150,239,242,229,225,110,128, 49, 91,243,237,225,\n    236,108,  2,213,103,213,114,232,233,242,225,231,225,238, 97,128,\n     48,135,235,225,244,225,235,225,238, 97,129, 48,231,213,127,232,\n    225,236,230,247,233,228,244,104,128,255,110,244,231,242,229,229,\n    107,128,  3,243,121,  2,213,154,213,191, 97,  2,213,160,213,170,\n    229,235,239,242,229,225,110,128, 49,136,107,  2,213,176,213,184,\n    239,242,229,225,110,128, 49,135,244,232,225,105,128, 14, 34,233,\n    238,231,244,232,225,105,128, 14, 13,112,  2,213,207,213,214,225,\n    242,229,110,128, 36,180,239,231,229,231,242,225,237,237,229,238,\n    105,129,  3,122,213,230,231,242,229,229,235,227,237, 98,128,  3,\n     69,114,129,  1,166,213,247,233,238,103,128, 30,153,243,245,240,\n    229,242,233,239,114,128,  2,184,116,  2,214, 14,214, 21,233,236,\n    228,101,128, 30,249,245,242,238,229,100,128,  2,142,117,  5,214,\n     41,214, 52,214, 62,214,100,214,232,232,233,242,225,231,225,238,\n     97,128, 48,134,233,235,239,242,229,225,110,128, 49,140,107,  2,\n    214, 68,214, 92,225,244,225,235,225,238, 97,129, 48,230,214, 80,\n    232,225,236,230,247,233,228,244,104,128,255,149,239,242,229,225,\n    110,128, 49, 96,115,  3,214,108,214,146,214,187,226,233,103,  2,\n    214,116,214,127,227,249,242,233,236,236,233, 99,128,  4,107,233,\n    239,244,233,230,233,229,228,227,249,242,233,236,236,233, 99,128,\n      4,109,236,233,244,244,236,101,  2,214,157,214,168,227,249,242,\n    233,236,236,233, 99,128,  4,103,233,239,244,233,230,233,229,228,\n    227,249,242,233,236,236,233, 99,128,  4,105,237,225,236,108,  2,\n    214,196,214,207,232,233,242,225,231,225,238, 97,128, 48,133,235,\n    225,244,225,235,225,238, 97,129, 48,229,214,220,232,225,236,230,\n    247,233,228,244,104,128,255,109,249,101,  2,214,239,214,248,235,\n    239,242,229,225,110,128, 49,139,239,235,239,242,229,225,110,128,\n     49,138,249, 97,  2,215,  9,215, 19,226,229,238,231,225,236,105,\n    128,  9,223,228,229,246, 97,128,  9, 95,122,142,  0,122,215, 58,\n    216, 66,216, 77,216,120,216,147,217,182,218, 34,218, 76,218, 88,\n    218,100,218,128,218,136,218,152,218,161, 97, 10,215, 80,215, 91,\n    215, 98,215,105,215,116,215,194,215,224,215,235,216, 15,216, 27,\n    225,242,237,229,238,233,225,110,128,  5,102,227,245,244,101,128,\n      1,122,228,229,246, 97,128,  9, 91,231,245,242,237,245,235,232,\n    105,128, 10, 91,104,  4,215,126,215,135,215,149,215,179,225,242,\n    225,226,233, 99,128,  6, 56,230,233,238,225,236,225,242,225,226,\n    233, 99,128,254,198,105,  2,215,155,215,170,238,233,244,233,225,\n    236,225,242,225,226,233, 99,128,254,199,242,225,231,225,238, 97,\n    128, 48, 86,237,229,228,233,225,236,225,242,225,226,233, 99,128,\n    254,200,233,110,  2,215,201,215,210,225,242,225,226,233, 99,128,\n      6, 50,230,233,238,225,236,225,242,225,226,233, 99,128,254,176,\n    235,225,244,225,235,225,238, 97,128, 48,182,241,229,102,  2,215,\n    243,216,  1,231,225,228,239,236,232,229,226,242,229,119,128,  5,\n    149,241,225,244,225,238,232,229,226,242,229,119,128,  5,148,242,\n    241,225,232,229,226,242,229,119,128,  5,152,249,233,110,130,  5,\n    214,216, 37,216, 57,228,225,231,229,243,104,129,251, 54,216, 48,\n    232,229,226,242,229,119,128,251, 54,232,229,226,242,229,119,128,\n      5,214,226,239,240,239,237,239,230,111,128, 49, 23, 99,  3,216,\n     85,216, 92,216,114,225,242,239,110,128,  1,126,233,242, 99,  2,\n    216,100,216,105,236,101,128, 36,233,245,237,230,236,229,120,128,\n     30,145,245,242,108,128,  2,145,228,239,116,130,  1,124,216,130,\n    216,139,225,227,227,229,238,116,128,  1,124,226,229,236,239,119,\n    128, 30,147,101,  6,216,161,216,172,216,215,216,226,216,237,217,\n    177,227,249,242,233,236,236,233, 99,128,  4, 55,100,  2,216,178,\n    216,197,229,243,227,229,238,228,229,242,227,249,242,233,236,236,\n    233, 99,128,  4,153,233,229,242,229,243,233,243,227,249,242,233,\n    236,236,233, 99,128,  4,223,232,233,242,225,231,225,238, 97,128,\n     48, 92,235,225,244,225,235,225,238, 97,128, 48,188,242,111,140,\n      0, 48,217, 10,217, 19,217, 29,217, 36,217, 61,217, 74,217, 85,\n    217, 97,217,108,217,118,217,129,217,136,225,242,225,226,233, 99,\n    128,  6, 96,226,229,238,231,225,236,105,128,  9,230,228,229,246,\n     97,128,  9,102,231,117,  2,217, 43,217, 52,234,225,242,225,244,\n    105,128, 10,230,242,237,245,235,232,105,128, 10,102,232,225,227,\n    235,225,242,225,226,233, 99,128,  6, 96,233,238,230,229,242,233,\n    239,114,128, 32,128,237,239,238,239,243,240,225,227,101,128,255,\n     16,239,236,228,243,244,249,236,101,128,247, 48,240,229,242,243,\n    233,225,110,128,  6,240,243,245,240,229,242,233,239,114,128, 32,\n    112,244,232,225,105,128, 14, 80,247,233,228,244,104,  3,217,148,\n    217,157,217,169,234,239,233,238,229,114,128,254,255,238,239,238,\n    234,239,233,238,229,114,128, 32, 12,243,240,225,227,101,128, 32,\n     11,244, 97,128,  3,182,104,  2,217,188,217,199,226,239,240,239,\n    237,239,230,111,128, 49, 19,101,  4,217,209,217,220,217,236,217,\n    247,225,242,237,229,238,233,225,110,128,  5,106,226,242,229,246,\n    229,227,249,242,233,236,236,233, 99,128,  4,194,227,249,242,233,\n    236,236,233, 99,128,  4, 54,100,  2,217,253,218, 16,229,243,227,\n    229,238,228,229,242,227,249,242,233,236,236,233, 99,128,  4,151,\n    233,229,242,229,243,233,243,227,249,242,233,236,236,233, 99,128,\n      4,221,105,  3,218, 42,218, 53,218, 64,232,233,242,225,231,225,\n    238, 97,128, 48, 88,235,225,244,225,235,225,238, 97,128, 48,184,\n    238,239,242,232,229,226,242,229,119,128,  5,174,236,233,238,229,\n    226,229,236,239,119,128, 30,149,237,239,238,239,243,240,225,227,\n    101,128,255, 90,111,  2,218,106,218,117,232,233,242,225,231,225,\n    238, 97,128, 48, 94,235,225,244,225,235,225,238, 97,128, 48,190,\n    240,225,242,229,110,128, 36,181,242,229,244,242,239,230,236,229,\n    248,232,239,239,107,128,  2,144,243,244,242,239,235,101,128,  1,\n    182,117,  2,218,167,218,178,232,233,242,225,231,225,238, 97,128,\n     48, 90,235,225,244,225,235,225,238, 97,128, 48,186\n  };\n\n\n  /*\n   *  This function searches the compressed table efficiently.\n   */\n  static unsigned long\n  ft_get_adobe_glyph_index( const char*  name,\n                            const char*  limit )\n  {\n    int                   c = 0;\n    int                   count, min, max;\n    const unsigned char*  p = ft_adobe_glyph_list;\n\n\n    if ( name == 0 || name >= limit )\n      goto NotFound;\n\n    c     = *name++;\n    count = p[1];\n    p    += 2;\n\n    min = 0;\n    max = count;\n\n    while ( min < max )\n    {\n      int                   mid = ( min + max ) >> 1;\n      const unsigned char*  q   = p + mid * 2;\n      int                   c2;\n\n\n      q = ft_adobe_glyph_list + ( ( (int)q[0] << 8 ) | q[1] );\n\n      c2 = q[0] & 127;\n      if ( c2 == c )\n      {\n        p = q;\n        goto Found;\n      }\n      if ( c2 < c )\n        min = mid + 1;\n      else\n        max = mid;\n    }\n    goto NotFound;\n\n  Found:\n    for (;;)\n    {\n      /* assert (*p & 127) == c */\n\n      if ( name >= limit )\n      {\n        if ( (p[0] & 128) == 0 &&\n             (p[1] & 128) != 0 )\n          return (unsigned long)( ( (int)p[2] << 8 ) | p[3] );\n\n        goto NotFound;\n      }\n      c = *name++;\n      if ( p[0] & 128 )\n      {\n        p++;\n        if ( c != (p[0] & 127) )\n          goto NotFound;\n\n        continue;\n      }\n\n      p++;\n      count = p[0] & 127;\n      if ( p[0] & 128 )\n        p += 2;\n\n      p++;\n\n      for ( ; count > 0; count--, p += 2 )\n      {\n        int                   offset = ( (int)p[0] << 8 ) | p[1];\n        const unsigned char*  q      = ft_adobe_glyph_list + offset;\n\n        if ( c == ( q[0] & 127 ) )\n        {\n          p = q;\n          goto NextIter;\n        }\n      }\n      goto NotFound;\n\n    NextIter:\n      ;\n    }\n\n  NotFound:\n    return 0;\n  }\n\n#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/raster/ftmisc.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmisc.h                                                               */\n/*                                                                         */\n/*    Miscellaneous macros for stand-alone rasterizer (specification       */\n/*    only).                                                               */\n/*                                                                         */\n/*  Copyright 2005, 2009, 2010 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used        */\n/*  modified and distributed under the terms of the FreeType project       */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /***************************************************/\n  /*                                                 */\n  /* This file is *not* portable!  You have to adapt */\n  /* its definitions to your platform.               */\n  /*                                                 */\n  /***************************************************/\n\n#ifndef __FTMISC_H__\n#define __FTMISC_H__\n\n\n  /* memset */\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n#define FT_BEGIN_HEADER\n#define FT_END_HEADER\n\n#define FT_LOCAL_DEF( x )   static x\n\n\n  /* from include/freetype2/fttypes.h */\n\n  typedef unsigned char  FT_Byte;\n  typedef signed int     FT_Int;\n  typedef unsigned int   FT_UInt;\n  typedef signed long    FT_Long;\n  typedef unsigned long  FT_ULong;\n  typedef signed long    FT_F26Dot6;\n  typedef int            FT_Error;\n\n#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \\\n          ( ( (FT_ULong)_x1 << 24 ) |     \\\n            ( (FT_ULong)_x2 << 16 ) |     \\\n            ( (FT_ULong)_x3 <<  8 ) |     \\\n              (FT_ULong)_x4         )\n\n\n  /* from include/freetype2/ftsystem.h */\n\n  typedef struct FT_MemoryRec_*  FT_Memory;\n\n  typedef void* (*FT_Alloc_Func)( FT_Memory  memory,\n                                  long       size );\n\n  typedef void (*FT_Free_Func)( FT_Memory  memory,\n                                void*      block );\n\n  typedef void* (*FT_Realloc_Func)( FT_Memory  memory,\n                                    long       cur_size,\n                                    long       new_size,\n                                    void*      block );\n\n  typedef struct FT_MemoryRec_\n  {\n    void*            user;\n\n    FT_Alloc_Func    alloc;\n    FT_Free_Func     free;\n    FT_Realloc_Func  realloc;\n\n  } FT_MemoryRec;\n\n\n  /* from src/ftcalc.c */\n\n#if ( defined _WIN32 || defined _WIN64 )\n\n  typedef __int64  FT_Int64;\n\n#else\n\n#include \"inttypes.h\"\n\n  typedef int64_t  FT_Int64;\n\n#endif\n\n\n  static FT_Long\n  FT_MulDiv( FT_Long  a,\n             FT_Long  b,\n             FT_Long  c )\n  {\n    FT_Int   s;\n    FT_Long  d;\n\n\n    s = 1;\n    if ( a < 0 ) { a = -a; s = -1; }\n    if ( b < 0 ) { b = -b; s = -s; }\n    if ( c < 0 ) { c = -c; s = -s; }\n\n    d = (FT_Long)( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c\n                         : 0x7FFFFFFFL );\n\n    return ( s > 0 ) ? d : -d;\n  }\n\n\n  static FT_Long\n  FT_MulDiv_No_Round( FT_Long  a,\n                      FT_Long  b,\n                      FT_Long  c )\n  {\n    FT_Int   s;\n    FT_Long  d;\n\n\n    s = 1;\n    if ( a < 0 ) { a = -a; s = -1; }\n    if ( b < 0 ) { b = -b; s = -s; }\n    if ( c < 0 ) { c = -c; s = -s; }\n\n    d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c\n                         : 0x7FFFFFFFL );\n\n    return ( s > 0 ) ? d : -d;\n  }\n\n#endif /* __FTMISC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/raster/ftraster.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftraster.c                                                             */\n/*                                                                         */\n/*    The FreeType glyph rasterizer (body).                                */\n/*                                                                         */\n/*  Copyright 1996-2003, 2005, 2007-2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file can be compiled without the rest of the FreeType engine, by */\n  /* defining the _STANDALONE_ macro when compiling it.  You also need to  */\n  /* put the files `ftimage.h' and `ftmisc.h' into the $(incdir)           */\n  /* directory.  Typically, you should do something like                   */\n  /*                                                                       */\n  /* - copy `src/raster/ftraster.c' (this file) to your current directory  */\n  /*                                                                       */\n  /* - copy `include/ftimage.h' and `src/raster/ftmisc.h' to your current  */\n  /*   directory                                                           */\n  /*                                                                       */\n  /* - compile `ftraster' with the _STANDALONE_ macro defined, as in       */\n  /*                                                                       */\n  /*     cc -c -D_STANDALONE_ ftraster.c                                   */\n  /*                                                                       */\n  /* The renderer can be initialized with a call to                        */\n  /* `ft_standard_raster.raster_new'; a bitmap can be generated            */\n  /* with a call to `ft_standard_raster.raster_render'.                    */\n  /*                                                                       */\n  /* See the comments and documentation in the file `ftimage.h' for more   */\n  /* details on how the raster works.                                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This is a rewrite of the FreeType 1.x scan-line converter             */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifdef _STANDALONE_\n\n#define FT_CONFIG_STANDARD_LIBRARY_H  <stdlib.h>\n\n#include <string.h>           /* for memset */\n\n#include \"ftmisc.h\"\n#include \"ftimage.h\"\n\n#else /* !_STANDALONE_ */\n\n#include <ft2build.h>\n#include \"ftraster.h\"\n#include FT_INTERNAL_CALC_H   /* for FT_MulDiv and FT_MulDiv_No_Round */\n\n#include \"rastpic.h\"\n\n#endif /* !_STANDALONE_ */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* A simple technical note on how the raster works                       */\n  /* -----------------------------------------------                       */\n  /*                                                                       */\n  /*   Converting an outline into a bitmap is achieved in several steps:   */\n  /*                                                                       */\n  /*   1 - Decomposing the outline into successive `profiles'.  Each       */\n  /*       profile is simply an array of scanline intersections on a given */\n  /*       dimension.  A profile's main attributes are                     */\n  /*                                                                       */\n  /*       o its scanline position boundaries, i.e. `Ymin' and `Ymax'      */\n  /*                                                                       */\n  /*       o an array of intersection coordinates for each scanline        */\n  /*         between `Ymin' and `Ymax'                                     */\n  /*                                                                       */\n  /*       o a direction, indicating whether it was built going `up' or    */\n  /*         `down', as this is very important for filling rules           */\n  /*                                                                       */\n  /*       o its drop-out mode                                             */\n  /*                                                                       */\n  /*   2 - Sweeping the target map's scanlines in order to compute segment */\n  /*       `spans' which are then filled.  Additionally, this pass         */\n  /*       performs drop-out control.                                      */\n  /*                                                                       */\n  /*   The outline data is parsed during step 1 only.  The profiles are    */\n  /*   built from the bottom of the render pool, used as a stack.  The     */\n  /*   following graphics shows the profile list under construction:       */\n  /*                                                                       */\n  /*     __________________________________________________________ _ _    */\n  /*    |         |                 |         |                 |          */\n  /*    | profile | coordinates for | profile | coordinates for |-->       */\n  /*    |    1    |  profile 1      |    2    |  profile 2      |-->       */\n  /*    |_________|_________________|_________|_________________|__ _ _    */\n  /*                                                                       */\n  /*    ^                                                       ^          */\n  /*    |                                                       |          */\n  /* start of render pool                                      top         */\n  /*                                                                       */\n  /*   The top of the profile stack is kept in the `top' variable.         */\n  /*                                                                       */\n  /*   As you can see, a profile record is pushed on top of the render     */\n  /*   pool, which is then followed by its coordinates/intersections.  If  */\n  /*   a change of direction is detected in the outline, a new profile is  */\n  /*   generated until the end of the outline.                             */\n  /*                                                                       */\n  /*   Note that when all profiles have been generated, the function       */\n  /*   Finalize_Profile_Table() is used to record, for each profile, its   */\n  /*   bottom-most scanline as well as the scanline above its upmost       */\n  /*   boundary.  These positions are called `y-turns' because they (sort  */\n  /*   of) correspond to local extrema.  They are stored in a sorted list  */\n  /*   built from the top of the render pool as a downwards stack:         */\n  /*                                                                       */\n  /*      _ _ _______________________________________                      */\n  /*                            |                    |                     */\n  /*                         <--| sorted list of     |                     */\n  /*                         <--|  extrema scanlines |                     */\n  /*      _ _ __________________|____________________|                     */\n  /*                                                                       */\n  /*                            ^                    ^                     */\n  /*                            |                    |                     */\n  /*                         maxBuff           sizeBuff = end of pool      */\n  /*                                                                       */\n  /*   This list is later used during the sweep phase in order to          */\n  /*   optimize performance (see technical note on the sweep below).       */\n  /*                                                                       */\n  /*   Of course, the raster detects whether the two stacks collide and    */\n  /*   handles the situation properly.                                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /**                                                                     **/\n  /**  CONFIGURATION MACROS                                               **/\n  /**                                                                     **/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /* define DEBUG_RASTER if you want to compile a debugging version */\n/* #define DEBUG_RASTER */\n\n  /* define FT_RASTER_OPTION_ANTI_ALIASING if you want to support */\n  /* 5-levels anti-aliasing                                       */\n/* #define FT_RASTER_OPTION_ANTI_ALIASING */\n\n  /* The size of the two-lines intermediate bitmap used */\n  /* for anti-aliasing, in bytes.                       */\n#define RASTER_GRAY_LINES  2048\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /**                                                                     **/\n  /**  OTHER MACROS (do not change)                                       **/\n  /**                                                                     **/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_raster\n\n\n#ifdef _STANDALONE_\n\n  /* Auxiliary macros for token concatenation. */\n#define FT_ERR_XCAT( x, y )  x ## y\n#define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )\n\n  /* This macro is used to indicate that a function parameter is unused. */\n  /* Its purpose is simply to reduce compiler warnings.  Note also that  */\n  /* simply defining it as `(void)x' doesn't avoid warnings with certain */\n  /* ANSI compilers (e.g. LCC).                                          */\n#define FT_UNUSED( x )  (x) = (x)\n\n  /* Disable the tracing mechanism for simplicity -- developers can      */\n  /* activate it easily by redefining these macros.                      */\n#ifndef FT_ERROR\n#define FT_ERROR( x )  do { } while ( 0 )     /* nothing */\n#endif\n\n#ifndef FT_TRACE\n#define FT_TRACE( x )   do { } while ( 0 )    /* nothing */\n#define FT_TRACE1( x )  do { } while ( 0 )    /* nothing */\n#define FT_TRACE6( x )  do { } while ( 0 )    /* nothing */\n#endif\n\n#ifndef FT_THROW\n#define FT_THROW( e )  FT_ERR_CAT( Raster_Err_, e )\n#endif\n\n#define Raster_Err_None          0\n#define Raster_Err_Not_Ini      -1\n#define Raster_Err_Overflow     -2\n#define Raster_Err_Neg_Height   -3\n#define Raster_Err_Invalid      -4\n#define Raster_Err_Unsupported  -5\n\n#define ft_memset  memset\n\n#define FT_DEFINE_RASTER_FUNCS( class_, glyph_format_, raster_new_, \\\n                                raster_reset_, raster_set_mode_,    \\\n                                raster_render_, raster_done_ )      \\\n          const FT_Raster_Funcs class_ =                            \\\n          {                                                         \\\n            glyph_format_,                                          \\\n            raster_new_,                                            \\\n            raster_reset_,                                          \\\n            raster_set_mode_,                                       \\\n            raster_render_,                                         \\\n            raster_done_                                            \\\n         };\n\n#else /* !_STANDALONE_ */\n\n\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H       /* for FT_TRACE, FT_ERROR, and FT_THROW */\n\n#include \"rasterrs.h\"\n\n#define Raster_Err_None         FT_Err_Ok\n#define Raster_Err_Not_Ini      Raster_Err_Raster_Uninitialized\n#define Raster_Err_Overflow     Raster_Err_Raster_Overflow\n#define Raster_Err_Neg_Height   Raster_Err_Raster_Negative_Height\n#define Raster_Err_Invalid      Raster_Err_Invalid_Outline\n#define Raster_Err_Unsupported  Raster_Err_Cannot_Render_Glyph\n\n\n#endif /* !_STANDALONE_ */\n\n\n#ifndef FT_MEM_SET\n#define FT_MEM_SET( d, s, c )  ft_memset( d, s, c )\n#endif\n\n#ifndef FT_MEM_ZERO\n#define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )\n#endif\n\n  /* FMulDiv means `Fast MulDiv'; it is used in case where `b' is       */\n  /* typically a small value and the result of a*b is known to fit into */\n  /* 32 bits.                                                           */\n#define FMulDiv( a, b, c )  ( (a) * (b) / (c) )\n\n  /* On the other hand, SMulDiv means `Slow MulDiv', and is used typically */\n  /* for clipping computations.  It simply uses the FT_MulDiv() function   */\n  /* defined in `ftcalc.h'.                                                */\n#define SMulDiv           FT_MulDiv\n#define SMulDiv_No_Round  FT_MulDiv_No_Round\n\n  /* The rasterizer is a very general purpose component; please leave */\n  /* the following redefinitions there (you never know your target    */\n  /* environment).                                                    */\n\n#ifndef TRUE\n#define TRUE   1\n#endif\n\n#ifndef FALSE\n#define FALSE  0\n#endif\n\n#ifndef NULL\n#define NULL  (void*)0\n#endif\n\n#ifndef SUCCESS\n#define SUCCESS  0\n#endif\n\n#ifndef FAILURE\n#define FAILURE  1\n#endif\n\n\n#define MaxBezier  32   /* The maximum number of stacked Bezier curves. */\n                        /* Setting this constant to more than 32 is a   */\n                        /* pure waste of space.                         */\n\n#define Pixel_Bits  6   /* fractional bits of *input* coordinates */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /**                                                                     **/\n  /**  SIMPLE TYPE DECLARATIONS                                           **/\n  /**                                                                     **/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  typedef int             Int;\n  typedef unsigned int    UInt;\n  typedef short           Short;\n  typedef unsigned short  UShort, *PUShort;\n  typedef long            Long, *PLong;\n  typedef unsigned long   ULong;\n\n  typedef unsigned char   Byte, *PByte;\n  typedef char            Bool;\n\n\n  typedef union  Alignment_\n  {\n    long    l;\n    void*   p;\n    void  (*f)(void);\n\n  } Alignment, *PAlignment;\n\n\n  typedef struct  TPoint_\n  {\n    Long  x;\n    Long  y;\n\n  } TPoint;\n\n\n  /* values for the `flags' bit field */\n#define Flow_Up           0x8\n#define Overshoot_Top     0x10\n#define Overshoot_Bottom  0x20\n\n\n  /* States of each line, arc, and profile */\n  typedef enum  TStates_\n  {\n    Unknown_State,\n    Ascending_State,\n    Descending_State,\n    Flat_State\n\n  } TStates;\n\n\n  typedef struct TProfile_  TProfile;\n  typedef TProfile*         PProfile;\n\n  struct  TProfile_\n  {\n    FT_F26Dot6  X;           /* current coordinate during sweep          */\n    PProfile    link;        /* link to next profile (various purposes)  */\n    PLong       offset;      /* start of profile's data in render pool   */\n    unsigned    flags;       /* Bit 0-2: drop-out mode                   */\n                             /* Bit 3: profile orientation (up/down)     */\n                             /* Bit 4: is top profile?                   */\n                             /* Bit 5: is bottom profile?                */\n    long        height;      /* profile's height in scanlines            */\n    long        start;       /* profile's starting scanline              */\n\n    unsigned    countL;      /* number of lines to step before this      */\n                             /* profile becomes drawable                 */\n\n    PProfile    next;        /* next profile in same contour, used       */\n                             /* during drop-out control                  */\n  };\n\n  typedef PProfile   TProfileList;\n  typedef PProfile*  PProfileList;\n\n\n  /* Simple record used to implement a stack of bands, required */\n  /* by the sub-banding mechanism                               */\n  typedef struct  black_TBand_\n  {\n    Short  y_min;   /* band's minimum */\n    Short  y_max;   /* band's maximum */\n\n  } black_TBand;\n\n\n#define AlignProfileSize \\\n  ( ( sizeof ( TProfile ) + sizeof ( Alignment ) - 1 ) / sizeof ( long ) )\n\n\n#undef RAS_ARG\n#undef RAS_ARGS\n#undef RAS_VAR\n#undef RAS_VARS\n\n#ifdef FT_STATIC_RASTER\n\n\n#define RAS_ARGS       /* void */\n#define RAS_ARG        /* void */\n\n#define RAS_VARS       /* void */\n#define RAS_VAR        /* void */\n\n#define FT_UNUSED_RASTER  do { } while ( 0 )\n\n\n#else /* !FT_STATIC_RASTER */\n\n\n#define RAS_ARGS       black_PWorker  worker,\n#define RAS_ARG        black_PWorker  worker\n\n#define RAS_VARS       worker,\n#define RAS_VAR        worker\n\n#define FT_UNUSED_RASTER  FT_UNUSED( worker )\n\n\n#endif /* !FT_STATIC_RASTER */\n\n\n  typedef struct black_TWorker_  black_TWorker, *black_PWorker;\n\n\n  /* prototypes used for sweep function dispatch */\n  typedef void\n  Function_Sweep_Init( RAS_ARGS Short*  min,\n                                Short*  max );\n\n  typedef void\n  Function_Sweep_Span( RAS_ARGS Short       y,\n                                FT_F26Dot6  x1,\n                                FT_F26Dot6  x2,\n                                PProfile    left,\n                                PProfile    right );\n\n  typedef void\n  Function_Sweep_Step( RAS_ARG );\n\n\n  /* NOTE: These operations are only valid on 2's complement processors */\n#undef FLOOR\n#undef CEILING\n#undef TRUNC\n#undef SCALED\n\n#define FLOOR( x )    ( (x) & -ras.precision )\n#define CEILING( x )  ( ( (x) + ras.precision - 1 ) & -ras.precision )\n#define TRUNC( x )    ( (Long)(x) >> ras.precision_bits )\n#define FRAC( x )     ( (x) & ( ras.precision - 1 ) )\n#define SCALED( x )   ( ( (ULong)(x) << ras.scale_shift ) - ras.precision_half )\n\n#define IS_BOTTOM_OVERSHOOT( x ) \\\n          (Bool)( CEILING( x ) - x >= ras.precision_half )\n#define IS_TOP_OVERSHOOT( x )    \\\n          (Bool)( x - FLOOR( x ) >= ras.precision_half )\n\n  /* The most used variables are positioned at the top of the structure. */\n  /* Thus, their offset can be coded with less opcodes, resulting in a   */\n  /* smaller executable.                                                 */\n\n  struct  black_TWorker_\n  {\n    Int         precision_bits;     /* precision related variables         */\n    Int         precision;\n    Int         precision_half;\n    Int         precision_shift;\n    Int         precision_step;\n    Int         precision_jitter;\n\n    Int         scale_shift;        /* == precision_shift   for bitmaps    */\n                                    /* == precision_shift+1 for pixmaps    */\n\n    PLong       buff;               /* The profiles buffer                 */\n    PLong       sizeBuff;           /* Render pool size                    */\n    PLong       maxBuff;            /* Profiles buffer size                */\n    PLong       top;                /* Current cursor in buffer            */\n\n    FT_Error    error;\n\n    Int         numTurns;           /* number of Y-turns in outline        */\n\n    TPoint*     arc;                /* current Bezier arc pointer          */\n\n    UShort      bWidth;             /* target bitmap width                 */\n    PByte       bTarget;            /* target bitmap buffer                */\n    PByte       gTarget;            /* target pixmap buffer                */\n\n    Long        lastX, lastY;\n    Long        minY, maxY;\n\n    UShort      num_Profs;          /* current number of profiles          */\n\n    Bool        fresh;              /* signals a fresh new profile which   */\n                                    /* `start' field must be completed     */\n    Bool        joint;              /* signals that the last arc ended     */\n                                    /* exactly on a scanline.  Allows      */\n                                    /* removal of doublets                 */\n    PProfile    cProfile;           /* current profile                     */\n    PProfile    fProfile;           /* head of linked list of profiles     */\n    PProfile    gProfile;           /* contour's first profile in case     */\n                                    /* of impact                           */\n\n    TStates     state;              /* rendering state                     */\n\n    FT_Bitmap   target;             /* description of target bit/pixmap    */\n    FT_Outline  outline;\n\n    Long        traceOfs;           /* current offset in target bitmap     */\n    Long        traceG;             /* current offset in target pixmap     */\n\n    Short       traceIncr;          /* sweep's increment in target bitmap  */\n\n    Short       gray_min_x;         /* current min x during gray rendering */\n    Short       gray_max_x;         /* current max x during gray rendering */\n\n    /* dispatch variables */\n\n    Function_Sweep_Init*  Proc_Sweep_Init;\n    Function_Sweep_Span*  Proc_Sweep_Span;\n    Function_Sweep_Span*  Proc_Sweep_Drop;\n    Function_Sweep_Step*  Proc_Sweep_Step;\n\n    Byte        dropOutControl;     /* current drop_out control method     */\n\n    Bool        second_pass;        /* indicates whether a horizontal pass */\n                                    /* should be performed to control      */\n                                    /* drop-out accurately when calling    */\n                                    /* Render_Glyph.  Note that there is   */\n                                    /* no horizontal pass during gray      */\n                                    /* rendering.                          */\n\n    TPoint      arcs[3 * MaxBezier + 1]; /* The Bezier stack               */\n\n    black_TBand  band_stack[16];    /* band stack used for sub-banding     */\n    Int          band_top;          /* band stack top                      */\n\n#ifdef FT_RASTER_OPTION_ANTI_ALIASING\n\n    Byte*       grays;\n\n    Byte        gray_lines[RASTER_GRAY_LINES];\n                                /* Intermediate table used to render the   */\n                                /* graylevels pixmaps.                     */\n                                /* gray_lines is a buffer holding two      */\n                                /* monochrome scanlines                    */\n\n    Short       gray_width;     /* width in bytes of one monochrome        */\n                                /* intermediate scanline of gray_lines.    */\n                                /* Each gray pixel takes 2 bits long there */\n\n                       /* The gray_lines must hold 2 lines, thus with size */\n                       /* in bytes of at least `gray_width*2'.             */\n\n#endif /* FT_RASTER_ANTI_ALIASING */\n\n  };\n\n\n  typedef struct  black_TRaster_\n  {\n    char*          buffer;\n    long           buffer_size;\n    void*          memory;\n    black_PWorker  worker;\n    Byte           grays[5];\n    Short          gray_width;\n\n  } black_TRaster, *black_PRaster;\n\n#ifdef FT_STATIC_RASTER\n\n  static black_TWorker  cur_ras;\n#define ras  cur_ras\n\n#else /* !FT_STATIC_RASTER */\n\n#define ras  (*worker)\n\n#endif /* !FT_STATIC_RASTER */\n\n\n#ifdef FT_RASTER_OPTION_ANTI_ALIASING\n\n  /* A lookup table used to quickly count set bits in four gray 2x2 */\n  /* cells.  The values of the table have been produced with the    */\n  /* following code:                                                */\n  /*                                                                */\n  /*   for ( i = 0; i < 256; i++ )                                  */\n  /*   {                                                            */\n  /*     l = 0;                                                     */\n  /*     j = i;                                                     */\n  /*                                                                */\n  /*     for ( c = 0; c < 4; c++ )                                  */\n  /*     {                                                          */\n  /*       l <<= 4;                                                 */\n  /*                                                                */\n  /*       if ( j & 0x80 ) l++;                                     */\n  /*       if ( j & 0x40 ) l++;                                     */\n  /*                                                                */\n  /*       j = ( j << 2 ) & 0xFF;                                   */\n  /*     }                                                          */\n  /*     printf( \"0x%04X\", l );                                     */\n  /*   }                                                            */\n  /*                                                                */\n\n  static const short  count_table[256] =\n  {\n    0x0000, 0x0001, 0x0001, 0x0002, 0x0010, 0x0011, 0x0011, 0x0012,\n    0x0010, 0x0011, 0x0011, 0x0012, 0x0020, 0x0021, 0x0021, 0x0022,\n    0x0100, 0x0101, 0x0101, 0x0102, 0x0110, 0x0111, 0x0111, 0x0112,\n    0x0110, 0x0111, 0x0111, 0x0112, 0x0120, 0x0121, 0x0121, 0x0122,\n    0x0100, 0x0101, 0x0101, 0x0102, 0x0110, 0x0111, 0x0111, 0x0112,\n    0x0110, 0x0111, 0x0111, 0x0112, 0x0120, 0x0121, 0x0121, 0x0122,\n    0x0200, 0x0201, 0x0201, 0x0202, 0x0210, 0x0211, 0x0211, 0x0212,\n    0x0210, 0x0211, 0x0211, 0x0212, 0x0220, 0x0221, 0x0221, 0x0222,\n    0x1000, 0x1001, 0x1001, 0x1002, 0x1010, 0x1011, 0x1011, 0x1012,\n    0x1010, 0x1011, 0x1011, 0x1012, 0x1020, 0x1021, 0x1021, 0x1022,\n    0x1100, 0x1101, 0x1101, 0x1102, 0x1110, 0x1111, 0x1111, 0x1112,\n    0x1110, 0x1111, 0x1111, 0x1112, 0x1120, 0x1121, 0x1121, 0x1122,\n    0x1100, 0x1101, 0x1101, 0x1102, 0x1110, 0x1111, 0x1111, 0x1112,\n    0x1110, 0x1111, 0x1111, 0x1112, 0x1120, 0x1121, 0x1121, 0x1122,\n    0x1200, 0x1201, 0x1201, 0x1202, 0x1210, 0x1211, 0x1211, 0x1212,\n    0x1210, 0x1211, 0x1211, 0x1212, 0x1220, 0x1221, 0x1221, 0x1222,\n    0x1000, 0x1001, 0x1001, 0x1002, 0x1010, 0x1011, 0x1011, 0x1012,\n    0x1010, 0x1011, 0x1011, 0x1012, 0x1020, 0x1021, 0x1021, 0x1022,\n    0x1100, 0x1101, 0x1101, 0x1102, 0x1110, 0x1111, 0x1111, 0x1112,\n    0x1110, 0x1111, 0x1111, 0x1112, 0x1120, 0x1121, 0x1121, 0x1122,\n    0x1100, 0x1101, 0x1101, 0x1102, 0x1110, 0x1111, 0x1111, 0x1112,\n    0x1110, 0x1111, 0x1111, 0x1112, 0x1120, 0x1121, 0x1121, 0x1122,\n    0x1200, 0x1201, 0x1201, 0x1202, 0x1210, 0x1211, 0x1211, 0x1212,\n    0x1210, 0x1211, 0x1211, 0x1212, 0x1220, 0x1221, 0x1221, 0x1222,\n    0x2000, 0x2001, 0x2001, 0x2002, 0x2010, 0x2011, 0x2011, 0x2012,\n    0x2010, 0x2011, 0x2011, 0x2012, 0x2020, 0x2021, 0x2021, 0x2022,\n    0x2100, 0x2101, 0x2101, 0x2102, 0x2110, 0x2111, 0x2111, 0x2112,\n    0x2110, 0x2111, 0x2111, 0x2112, 0x2120, 0x2121, 0x2121, 0x2122,\n    0x2100, 0x2101, 0x2101, 0x2102, 0x2110, 0x2111, 0x2111, 0x2112,\n    0x2110, 0x2111, 0x2111, 0x2112, 0x2120, 0x2121, 0x2121, 0x2122,\n    0x2200, 0x2201, 0x2201, 0x2202, 0x2210, 0x2211, 0x2211, 0x2212,\n    0x2210, 0x2211, 0x2211, 0x2212, 0x2220, 0x2221, 0x2221, 0x2222\n  };\n\n#endif /* FT_RASTER_OPTION_ANTI_ALIASING */\n\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /**                                                                     **/\n  /**  PROFILES COMPUTATION                                               **/\n  /**                                                                     **/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Set_High_Precision                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Set precision variables according to param flag.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    High :: Set to True for high precision (typically for ppem < 24),  */\n  /*            false otherwise.                                           */\n  /*                                                                       */\n  static void\n  Set_High_Precision( RAS_ARGS Int  High )\n  {\n    /*\n     * `precision_step' is used in `Bezier_Up' to decide when to split a\n     * given y-monotonous Bezier arc that crosses a scanline before\n     * approximating it as a straight segment.  The default value of 32 (for\n     * low accuracy) corresponds to\n     *\n     *   32 / 64 == 0.5 pixels ,\n     *\n     * while for the high accuracy case we have\n     *\n     *   256/ (1 << 12) = 0.0625 pixels .\n     *\n     * `precision_jitter' is an epsilon threshold used in\n     * `Vertical_Sweep_Span' to deal with small imperfections in the Bezier\n     * decomposition (after all, we are working with approximations only);\n     * it avoids switching on additional pixels which would cause artifacts\n     * otherwise.\n     *\n     * The value of `precision_jitter' has been determined heuristically.\n     *\n     */\n\n    if ( High )\n    {\n      ras.precision_bits   = 12;\n      ras.precision_step   = 256;\n      ras.precision_jitter = 30;\n    }\n    else\n    {\n      ras.precision_bits   = 6;\n      ras.precision_step   = 32;\n      ras.precision_jitter = 2;\n    }\n\n    FT_TRACE6(( \"Set_High_Precision(%s)\\n\", High ? \"true\" : \"false\" ));\n\n    ras.precision       = 1 << ras.precision_bits;\n    ras.precision_half  = ras.precision / 2;\n    ras.precision_shift = ras.precision_bits - Pixel_Bits;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    New_Profile                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new profile in the render pool.                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    aState    :: The state/orientation of the new profile.             */\n  /*                                                                       */\n  /*    overshoot :: Whether the profile's unrounded start position        */\n  /*                 differs by at least a half pixel.                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*   SUCCESS on success.  FAILURE in case of overflow or of incoherent   */\n  /*   profile.                                                            */\n  /*                                                                       */\n  static Bool\n  New_Profile( RAS_ARGS TStates  aState,\n                        Bool     overshoot )\n  {\n    if ( !ras.fProfile )\n    {\n      ras.cProfile  = (PProfile)ras.top;\n      ras.fProfile  = ras.cProfile;\n      ras.top      += AlignProfileSize;\n    }\n\n    if ( ras.top >= ras.maxBuff )\n    {\n      ras.error = FT_THROW( Overflow );\n      return FAILURE;\n    }\n\n    ras.cProfile->flags  = 0;\n    ras.cProfile->start  = 0;\n    ras.cProfile->height = 0;\n    ras.cProfile->offset = ras.top;\n    ras.cProfile->link   = (PProfile)0;\n    ras.cProfile->next   = (PProfile)0;\n    ras.cProfile->flags  = ras.dropOutControl;\n\n    switch ( aState )\n    {\n    case Ascending_State:\n      ras.cProfile->flags |= Flow_Up;\n      if ( overshoot )\n        ras.cProfile->flags |= Overshoot_Bottom;\n\n      FT_TRACE6(( \"New ascending profile = %p\\n\", ras.cProfile ));\n      break;\n\n    case Descending_State:\n      if ( overshoot )\n        ras.cProfile->flags |= Overshoot_Top;\n      FT_TRACE6(( \"New descending profile = %p\\n\", ras.cProfile ));\n      break;\n\n    default:\n      FT_ERROR(( \"New_Profile: invalid profile direction\\n\" ));\n      ras.error = FT_THROW( Invalid );\n      return FAILURE;\n    }\n\n    if ( !ras.gProfile )\n      ras.gProfile = ras.cProfile;\n\n    ras.state = aState;\n    ras.fresh = TRUE;\n    ras.joint = FALSE;\n\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    End_Profile                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finalize the current profile.                                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    overshoot :: Whether the profile's unrounded end position differs  */\n  /*                 by at least a half pixel.                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS on success.  FAILURE in case of overflow or incoherency.   */\n  /*                                                                       */\n  static Bool\n  End_Profile( RAS_ARGS Bool  overshoot )\n  {\n    Long  h;\n\n\n    h = (Long)( ras.top - ras.cProfile->offset );\n\n    if ( h < 0 )\n    {\n      FT_ERROR(( \"End_Profile: negative height encountered\\n\" ));\n      ras.error = FT_THROW( Neg_Height );\n      return FAILURE;\n    }\n\n    if ( h > 0 )\n    {\n      PProfile  oldProfile;\n\n\n      FT_TRACE6(( \"Ending profile %p, start = %ld, height = %ld\\n\",\n                  ras.cProfile, ras.cProfile->start, h ));\n\n      ras.cProfile->height = h;\n      if ( overshoot )\n      {\n        if ( ras.cProfile->flags & Flow_Up )\n          ras.cProfile->flags |= Overshoot_Top;\n        else\n          ras.cProfile->flags |= Overshoot_Bottom;\n      }\n\n      oldProfile   = ras.cProfile;\n      ras.cProfile = (PProfile)ras.top;\n\n      ras.top += AlignProfileSize;\n\n      ras.cProfile->height = 0;\n      ras.cProfile->offset = ras.top;\n\n      oldProfile->next = ras.cProfile;\n      ras.num_Profs++;\n    }\n\n    if ( ras.top >= ras.maxBuff )\n    {\n      FT_TRACE1(( \"overflow in End_Profile\\n\" ));\n      ras.error = FT_THROW( Overflow );\n      return FAILURE;\n    }\n\n    ras.joint = FALSE;\n\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Insert_Y_Turn                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Insert a salient into the sorted list placed on top of the render  */\n  /*    pool.                                                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    New y scanline position.                                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS on success.  FAILURE in case of overflow.                  */\n  /*                                                                       */\n  static Bool\n  Insert_Y_Turn( RAS_ARGS Int  y )\n  {\n    PLong  y_turns;\n    Int    n;\n\n\n    n       = ras.numTurns - 1;\n    y_turns = ras.sizeBuff - ras.numTurns;\n\n    /* look for first y value that is <= */\n    while ( n >= 0 && y < y_turns[n] )\n      n--;\n\n    /* if it is <, simply insert it, ignore if == */\n    if ( n >= 0 && y > y_turns[n] )\n      while ( n >= 0 )\n      {\n        Int  y2 = (Int)y_turns[n];\n\n\n        y_turns[n] = y;\n        y = y2;\n        n--;\n      }\n\n    if ( n < 0 )\n    {\n      ras.maxBuff--;\n      if ( ras.maxBuff <= ras.top )\n      {\n        ras.error = FT_THROW( Overflow );\n        return FAILURE;\n      }\n      ras.numTurns++;\n      ras.sizeBuff[-ras.numTurns] = y;\n    }\n\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Finalize_Profile_Table                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Adjust all links in the profiles list.                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS on success.  FAILURE in case of overflow.                  */\n  /*                                                                       */\n  static Bool\n  Finalize_Profile_Table( RAS_ARG )\n  {\n    UShort    n;\n    PProfile  p;\n\n\n    n = ras.num_Profs;\n    p = ras.fProfile;\n\n    if ( n > 1 && p )\n    {\n      while ( n > 0 )\n      {\n        Int  bottom, top;\n\n\n        if ( n > 1 )\n          p->link = (PProfile)( p->offset + p->height );\n        else\n          p->link = NULL;\n\n        if ( p->flags & Flow_Up )\n        {\n          bottom = (Int)p->start;\n          top    = (Int)( p->start + p->height - 1 );\n        }\n        else\n        {\n          bottom     = (Int)( p->start - p->height + 1 );\n          top        = (Int)p->start;\n          p->start   = bottom;\n          p->offset += p->height - 1;\n        }\n\n        if ( Insert_Y_Turn( RAS_VARS bottom )  ||\n             Insert_Y_Turn( RAS_VARS top + 1 ) )\n          return FAILURE;\n\n        p = p->link;\n        n--;\n      }\n    }\n    else\n      ras.fProfile = NULL;\n\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Split_Conic                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Subdivide one conic Bezier into two joint sub-arcs in the Bezier   */\n  /*    stack.                                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    None (subdivided Bezier is taken from the top of the stack).       */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This routine is the `beef' of this component.  It is  _the_ inner  */\n  /*    loop that should be optimized to hell to get the best performance. */\n  /*                                                                       */\n  static void\n  Split_Conic( TPoint*  base )\n  {\n    Long  a, b;\n\n\n    base[4].x = base[2].x;\n    b = base[1].x;\n    a = base[3].x = ( base[2].x + b ) / 2;\n    b = base[1].x = ( base[0].x + b ) / 2;\n    base[2].x = ( a + b ) / 2;\n\n    base[4].y = base[2].y;\n    b = base[1].y;\n    a = base[3].y = ( base[2].y + b ) / 2;\n    b = base[1].y = ( base[0].y + b ) / 2;\n    base[2].y = ( a + b ) / 2;\n\n    /* hand optimized.  gcc doesn't seem to be too good at common      */\n    /* expression substitution and instruction scheduling ;-)          */\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Split_Cubic                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Subdivide a third-order Bezier arc into two joint sub-arcs in the  */\n  /*    Bezier stack.                                                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This routine is the `beef' of the component.  It is one of _the_   */\n  /*    inner loops that should be optimized like hell to get the best     */\n  /*    performance.                                                       */\n  /*                                                                       */\n  static void\n  Split_Cubic( TPoint*  base )\n  {\n    Long  a, b, c, d;\n\n\n    base[6].x = base[3].x;\n    c = base[1].x;\n    d = base[2].x;\n    base[1].x = a = ( base[0].x + c + 1 ) >> 1;\n    base[5].x = b = ( base[3].x + d + 1 ) >> 1;\n    c = ( c + d + 1 ) >> 1;\n    base[2].x = a = ( a + c + 1 ) >> 1;\n    base[4].x = b = ( b + c + 1 ) >> 1;\n    base[3].x = ( a + b + 1 ) >> 1;\n\n    base[6].y = base[3].y;\n    c = base[1].y;\n    d = base[2].y;\n    base[1].y = a = ( base[0].y + c + 1 ) >> 1;\n    base[5].y = b = ( base[3].y + d + 1 ) >> 1;\n    c = ( c + d + 1 ) >> 1;\n    base[2].y = a = ( a + c + 1 ) >> 1;\n    base[4].y = b = ( b + c + 1 ) >> 1;\n    base[3].y = ( a + b + 1 ) >> 1;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Line_Up                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Compute the x-coordinates of an ascending line segment and store   */\n  /*    them in the render pool.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    x1   :: The x-coordinate of the segment's start point.             */\n  /*                                                                       */\n  /*    y1   :: The y-coordinate of the segment's start point.             */\n  /*                                                                       */\n  /*    x2   :: The x-coordinate of the segment's end point.               */\n  /*                                                                       */\n  /*    y2   :: The y-coordinate of the segment's end point.               */\n  /*                                                                       */\n  /*    miny :: A lower vertical clipping bound value.                     */\n  /*                                                                       */\n  /*    maxy :: An upper vertical clipping bound value.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS on success, FAILURE on render pool overflow.               */\n  /*                                                                       */\n  static Bool\n  Line_Up( RAS_ARGS Long  x1,\n                    Long  y1,\n                    Long  x2,\n                    Long  y2,\n                    Long  miny,\n                    Long  maxy )\n  {\n    Long   Dx, Dy;\n    Int    e1, e2, f1, f2, size;     /* XXX: is `Short' sufficient? */\n    Long   Ix, Rx, Ax;\n\n    PLong  top;\n\n\n    Dx = x2 - x1;\n    Dy = y2 - y1;\n\n    if ( Dy <= 0 || y2 < miny || y1 > maxy )\n      return SUCCESS;\n\n    if ( y1 < miny )\n    {\n      /* Take care: miny-y1 can be a very large value; we use     */\n      /*            a slow MulDiv function to avoid clipping bugs */\n      x1 += SMulDiv( Dx, miny - y1, Dy );\n      e1  = (Int)TRUNC( miny );\n      f1  = 0;\n    }\n    else\n    {\n      e1 = (Int)TRUNC( y1 );\n      f1 = (Int)FRAC( y1 );\n    }\n\n    if ( y2 > maxy )\n    {\n      /* x2 += FMulDiv( Dx, maxy - y2, Dy );  UNNECESSARY */\n      e2  = (Int)TRUNC( maxy );\n      f2  = 0;\n    }\n    else\n    {\n      e2 = (Int)TRUNC( y2 );\n      f2 = (Int)FRAC( y2 );\n    }\n\n    if ( f1 > 0 )\n    {\n      if ( e1 == e2 )\n        return SUCCESS;\n      else\n      {\n        x1 += SMulDiv( Dx, ras.precision - f1, Dy );\n        e1 += 1;\n      }\n    }\n    else\n      if ( ras.joint )\n      {\n        ras.top--;\n        ras.joint = FALSE;\n      }\n\n    ras.joint = (char)( f2 == 0 );\n\n    if ( ras.fresh )\n    {\n      ras.cProfile->start = e1;\n      ras.fresh           = FALSE;\n    }\n\n    size = e2 - e1 + 1;\n    if ( ras.top + size >= ras.maxBuff )\n    {\n      ras.error = FT_THROW( Overflow );\n      return FAILURE;\n    }\n\n    if ( Dx > 0 )\n    {\n      Ix = SMulDiv_No_Round( ras.precision, Dx, Dy );\n      Rx = ( ras.precision * Dx ) % Dy;\n      Dx = 1;\n    }\n    else\n    {\n      Ix = -SMulDiv_No_Round( ras.precision, -Dx, Dy );\n      Rx = ( ras.precision * -Dx ) % Dy;\n      Dx = -1;\n    }\n\n    Ax  = -Dy;\n    top = ras.top;\n\n    while ( size > 0 )\n    {\n      *top++ = x1;\n\n      x1 += Ix;\n      Ax += Rx;\n      if ( Ax >= 0 )\n      {\n        Ax -= Dy;\n        x1 += Dx;\n      }\n      size--;\n    }\n\n    ras.top = top;\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Line_Down                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Compute the x-coordinates of an descending line segment and store  */\n  /*    them in the render pool.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    x1   :: The x-coordinate of the segment's start point.             */\n  /*                                                                       */\n  /*    y1   :: The y-coordinate of the segment's start point.             */\n  /*                                                                       */\n  /*    x2   :: The x-coordinate of the segment's end point.               */\n  /*                                                                       */\n  /*    y2   :: The y-coordinate of the segment's end point.               */\n  /*                                                                       */\n  /*    miny :: A lower vertical clipping bound value.                     */\n  /*                                                                       */\n  /*    maxy :: An upper vertical clipping bound value.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS on success, FAILURE on render pool overflow.               */\n  /*                                                                       */\n  static Bool\n  Line_Down( RAS_ARGS Long  x1,\n                      Long  y1,\n                      Long  x2,\n                      Long  y2,\n                      Long  miny,\n                      Long  maxy )\n  {\n    Bool  result, fresh;\n\n\n    fresh  = ras.fresh;\n\n    result = Line_Up( RAS_VARS x1, -y1, x2, -y2, -maxy, -miny );\n\n    if ( fresh && !ras.fresh )\n      ras.cProfile->start = -ras.cProfile->start;\n\n    return result;\n  }\n\n\n  /* A function type describing the functions used to split Bezier arcs */\n  typedef void  (*TSplitter)( TPoint*  base );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Bezier_Up                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Compute the x-coordinates of an ascending Bezier arc and store     */\n  /*    them in the render pool.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    degree   :: The degree of the Bezier arc (either 2 or 3).          */\n  /*                                                                       */\n  /*    splitter :: The function to split Bezier arcs.                     */\n  /*                                                                       */\n  /*    miny     :: A lower vertical clipping bound value.                 */\n  /*                                                                       */\n  /*    maxy     :: An upper vertical clipping bound value.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS on success, FAILURE on render pool overflow.               */\n  /*                                                                       */\n  static Bool\n  Bezier_Up( RAS_ARGS Int        degree,\n                      TSplitter  splitter,\n                      Long       miny,\n                      Long       maxy )\n  {\n    Long   y1, y2, e, e2, e0;\n    Short  f1;\n\n    TPoint*  arc;\n    TPoint*  start_arc;\n\n    PLong top;\n\n\n    arc = ras.arc;\n    y1  = arc[degree].y;\n    y2  = arc[0].y;\n    top = ras.top;\n\n    if ( y2 < miny || y1 > maxy )\n      goto Fin;\n\n    e2 = FLOOR( y2 );\n\n    if ( e2 > maxy )\n      e2 = maxy;\n\n    e0 = miny;\n\n    if ( y1 < miny )\n      e = miny;\n    else\n    {\n      e  = CEILING( y1 );\n      f1 = (Short)( FRAC( y1 ) );\n      e0 = e;\n\n      if ( f1 == 0 )\n      {\n        if ( ras.joint )\n        {\n          top--;\n          ras.joint = FALSE;\n        }\n\n        *top++ = arc[degree].x;\n\n        e += ras.precision;\n      }\n    }\n\n    if ( ras.fresh )\n    {\n      ras.cProfile->start = TRUNC( e0 );\n      ras.fresh = FALSE;\n    }\n\n    if ( e2 < e )\n      goto Fin;\n\n    if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff )\n    {\n      ras.top   = top;\n      ras.error = FT_THROW( Overflow );\n      return FAILURE;\n    }\n\n    start_arc = arc;\n\n    while ( arc >= start_arc && e <= e2 )\n    {\n      ras.joint = FALSE;\n\n      y2 = arc[0].y;\n\n      if ( y2 > e )\n      {\n        y1 = arc[degree].y;\n        if ( y2 - y1 >= ras.precision_step )\n        {\n          splitter( arc );\n          arc += degree;\n        }\n        else\n        {\n          *top++ = arc[degree].x + FMulDiv( arc[0].x - arc[degree].x,\n                                            e - y1, y2 - y1 );\n          arc -= degree;\n          e   += ras.precision;\n        }\n      }\n      else\n      {\n        if ( y2 == e )\n        {\n          ras.joint  = TRUE;\n          *top++     = arc[0].x;\n\n          e += ras.precision;\n        }\n        arc -= degree;\n      }\n    }\n\n  Fin:\n    ras.top  = top;\n    ras.arc -= degree;\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Bezier_Down                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Compute the x-coordinates of an descending Bezier arc and store    */\n  /*    them in the render pool.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    degree   :: The degree of the Bezier arc (either 2 or 3).          */\n  /*                                                                       */\n  /*    splitter :: The function to split Bezier arcs.                     */\n  /*                                                                       */\n  /*    miny     :: A lower vertical clipping bound value.                 */\n  /*                                                                       */\n  /*    maxy     :: An upper vertical clipping bound value.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS on success, FAILURE on render pool overflow.               */\n  /*                                                                       */\n  static Bool\n  Bezier_Down( RAS_ARGS Int        degree,\n                        TSplitter  splitter,\n                        Long       miny,\n                        Long       maxy )\n  {\n    TPoint*  arc = ras.arc;\n    Bool     result, fresh;\n\n\n    arc[0].y = -arc[0].y;\n    arc[1].y = -arc[1].y;\n    arc[2].y = -arc[2].y;\n    if ( degree > 2 )\n      arc[3].y = -arc[3].y;\n\n    fresh = ras.fresh;\n\n    result = Bezier_Up( RAS_VARS degree, splitter, -maxy, -miny );\n\n    if ( fresh && !ras.fresh )\n      ras.cProfile->start = -ras.cProfile->start;\n\n    arc[0].y = -arc[0].y;\n    return result;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Line_To                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Inject a new line segment and adjust the Profiles list.            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*   x :: The x-coordinate of the segment's end point (its start point   */\n  /*        is stored in `lastX').                                         */\n  /*                                                                       */\n  /*   y :: The y-coordinate of the segment's end point (its start point   */\n  /*        is stored in `lastY').                                         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*   SUCCESS on success, FAILURE on render pool overflow or incorrect    */\n  /*   profile.                                                            */\n  /*                                                                       */\n  static Bool\n  Line_To( RAS_ARGS Long  x,\n                    Long  y )\n  {\n    /* First, detect a change of direction */\n\n    switch ( ras.state )\n    {\n    case Unknown_State:\n      if ( y > ras.lastY )\n      {\n        if ( New_Profile( RAS_VARS Ascending_State,\n                                   IS_BOTTOM_OVERSHOOT( ras.lastY ) ) )\n          return FAILURE;\n      }\n      else\n      {\n        if ( y < ras.lastY )\n          if ( New_Profile( RAS_VARS Descending_State,\n                                     IS_TOP_OVERSHOOT( ras.lastY ) ) )\n            return FAILURE;\n      }\n      break;\n\n    case Ascending_State:\n      if ( y < ras.lastY )\n      {\n        if ( End_Profile( RAS_VARS IS_TOP_OVERSHOOT( ras.lastY ) ) ||\n             New_Profile( RAS_VARS Descending_State,\n                                   IS_TOP_OVERSHOOT( ras.lastY ) ) )\n          return FAILURE;\n      }\n      break;\n\n    case Descending_State:\n      if ( y > ras.lastY )\n      {\n        if ( End_Profile( RAS_VARS IS_BOTTOM_OVERSHOOT( ras.lastY ) ) ||\n             New_Profile( RAS_VARS Ascending_State,\n                                   IS_BOTTOM_OVERSHOOT( ras.lastY ) ) )\n          return FAILURE;\n      }\n      break;\n\n    default:\n      ;\n    }\n\n    /* Then compute the lines */\n\n    switch ( ras.state )\n    {\n    case Ascending_State:\n      if ( Line_Up( RAS_VARS ras.lastX, ras.lastY,\n                             x, y, ras.minY, ras.maxY ) )\n        return FAILURE;\n      break;\n\n    case Descending_State:\n      if ( Line_Down( RAS_VARS ras.lastX, ras.lastY,\n                               x, y, ras.minY, ras.maxY ) )\n        return FAILURE;\n      break;\n\n    default:\n      ;\n    }\n\n    ras.lastX = x;\n    ras.lastY = y;\n\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Conic_To                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Inject a new conic arc and adjust the profile list.                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*   cx :: The x-coordinate of the arc's new control point.              */\n  /*                                                                       */\n  /*   cy :: The y-coordinate of the arc's new control point.              */\n  /*                                                                       */\n  /*   x  :: The x-coordinate of the arc's end point (its start point is   */\n  /*         stored in `lastX').                                           */\n  /*                                                                       */\n  /*   y  :: The y-coordinate of the arc's end point (its start point is   */\n  /*         stored in `lastY').                                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*   SUCCESS on success, FAILURE on render pool overflow or incorrect    */\n  /*   profile.                                                            */\n  /*                                                                       */\n  static Bool\n  Conic_To( RAS_ARGS Long  cx,\n                     Long  cy,\n                     Long  x,\n                     Long  y )\n  {\n    Long     y1, y2, y3, x3, ymin, ymax;\n    TStates  state_bez;\n\n\n    ras.arc      = ras.arcs;\n    ras.arc[2].x = ras.lastX;\n    ras.arc[2].y = ras.lastY;\n    ras.arc[1].x = cx;\n    ras.arc[1].y = cy;\n    ras.arc[0].x = x;\n    ras.arc[0].y = y;\n\n    do\n    {\n      y1 = ras.arc[2].y;\n      y2 = ras.arc[1].y;\n      y3 = ras.arc[0].y;\n      x3 = ras.arc[0].x;\n\n      /* first, categorize the Bezier arc */\n\n      if ( y1 <= y3 )\n      {\n        ymin = y1;\n        ymax = y3;\n      }\n      else\n      {\n        ymin = y3;\n        ymax = y1;\n      }\n\n      if ( y2 < ymin || y2 > ymax )\n      {\n        /* this arc has no given direction, split it! */\n        Split_Conic( ras.arc );\n        ras.arc += 2;\n      }\n      else if ( y1 == y3 )\n      {\n        /* this arc is flat, ignore it and pop it from the Bezier stack */\n        ras.arc -= 2;\n      }\n      else\n      {\n        /* the arc is y-monotonous, either ascending or descending */\n        /* detect a change of direction                            */\n        state_bez = y1 < y3 ? Ascending_State : Descending_State;\n        if ( ras.state != state_bez )\n        {\n          Bool  o = state_bez == Ascending_State ? IS_BOTTOM_OVERSHOOT( y1 )\n                                                 : IS_TOP_OVERSHOOT( y1 );\n\n\n          /* finalize current profile if any */\n          if ( ras.state != Unknown_State &&\n               End_Profile( RAS_VARS o )  )\n            goto Fail;\n\n          /* create a new profile */\n          if ( New_Profile( RAS_VARS state_bez, o ) )\n            goto Fail;\n        }\n\n        /* now call the appropriate routine */\n        if ( state_bez == Ascending_State )\n        {\n          if ( Bezier_Up( RAS_VARS 2, Split_Conic, ras.minY, ras.maxY ) )\n            goto Fail;\n        }\n        else\n          if ( Bezier_Down( RAS_VARS 2, Split_Conic, ras.minY, ras.maxY ) )\n            goto Fail;\n      }\n\n    } while ( ras.arc >= ras.arcs );\n\n    ras.lastX = x3;\n    ras.lastY = y3;\n\n    return SUCCESS;\n\n  Fail:\n    return FAILURE;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Cubic_To                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Inject a new cubic arc and adjust the profile list.                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*   cx1 :: The x-coordinate of the arc's first new control point.       */\n  /*                                                                       */\n  /*   cy1 :: The y-coordinate of the arc's first new control point.       */\n  /*                                                                       */\n  /*   cx2 :: The x-coordinate of the arc's second new control point.      */\n  /*                                                                       */\n  /*   cy2 :: The y-coordinate of the arc's second new control point.      */\n  /*                                                                       */\n  /*   x   :: The x-coordinate of the arc's end point (its start point is  */\n  /*          stored in `lastX').                                          */\n  /*                                                                       */\n  /*   y   :: The y-coordinate of the arc's end point (its start point is  */\n  /*          stored in `lastY').                                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*   SUCCESS on success, FAILURE on render pool overflow or incorrect    */\n  /*   profile.                                                            */\n  /*                                                                       */\n  static Bool\n  Cubic_To( RAS_ARGS Long  cx1,\n                     Long  cy1,\n                     Long  cx2,\n                     Long  cy2,\n                     Long  x,\n                     Long  y )\n  {\n    Long     y1, y2, y3, y4, x4, ymin1, ymax1, ymin2, ymax2;\n    TStates  state_bez;\n\n\n    ras.arc      = ras.arcs;\n    ras.arc[3].x = ras.lastX;\n    ras.arc[3].y = ras.lastY;\n    ras.arc[2].x = cx1;\n    ras.arc[2].y = cy1;\n    ras.arc[1].x = cx2;\n    ras.arc[1].y = cy2;\n    ras.arc[0].x = x;\n    ras.arc[0].y = y;\n\n    do\n    {\n      y1 = ras.arc[3].y;\n      y2 = ras.arc[2].y;\n      y3 = ras.arc[1].y;\n      y4 = ras.arc[0].y;\n      x4 = ras.arc[0].x;\n\n      /* first, categorize the Bezier arc */\n\n      if ( y1 <= y4 )\n      {\n        ymin1 = y1;\n        ymax1 = y4;\n      }\n      else\n      {\n        ymin1 = y4;\n        ymax1 = y1;\n      }\n\n      if ( y2 <= y3 )\n      {\n        ymin2 = y2;\n        ymax2 = y3;\n      }\n      else\n      {\n        ymin2 = y3;\n        ymax2 = y2;\n      }\n\n      if ( ymin2 < ymin1 || ymax2 > ymax1 )\n      {\n        /* this arc has no given direction, split it! */\n        Split_Cubic( ras.arc );\n        ras.arc += 3;\n      }\n      else if ( y1 == y4 )\n      {\n        /* this arc is flat, ignore it and pop it from the Bezier stack */\n        ras.arc -= 3;\n      }\n      else\n      {\n        state_bez = ( y1 <= y4 ) ? Ascending_State : Descending_State;\n\n        /* detect a change of direction */\n        if ( ras.state != state_bez )\n        {\n          Bool  o = state_bez == Ascending_State ? IS_BOTTOM_OVERSHOOT( y1 )\n                                                 : IS_TOP_OVERSHOOT( y1 );\n\n\n          /* finalize current profile if any */\n          if ( ras.state != Unknown_State &&\n               End_Profile( RAS_VARS o )  )\n            goto Fail;\n\n          if ( New_Profile( RAS_VARS state_bez, o ) )\n            goto Fail;\n        }\n\n        /* compute intersections */\n        if ( state_bez == Ascending_State )\n        {\n          if ( Bezier_Up( RAS_VARS 3, Split_Cubic, ras.minY, ras.maxY ) )\n            goto Fail;\n        }\n        else\n          if ( Bezier_Down( RAS_VARS 3, Split_Cubic, ras.minY, ras.maxY ) )\n            goto Fail;\n      }\n\n    } while ( ras.arc >= ras.arcs );\n\n    ras.lastX = x4;\n    ras.lastY = y4;\n\n    return SUCCESS;\n\n  Fail:\n    return FAILURE;\n  }\n\n\n#undef  SWAP_\n#define SWAP_( x, y )  do                \\\n                       {                 \\\n                         Long  swap = x; \\\n                                         \\\n                                         \\\n                         x = y;          \\\n                         y = swap;       \\\n                       } while ( 0 )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Decompose_Curve                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Scan the outline arrays in order to emit individual segments and   */\n  /*    Beziers by calling Line_To() and Bezier_To().  It handles all      */\n  /*    weird cases, like when the first point is off the curve, or when   */\n  /*    there are simply no `on' points in the contour!                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    first   :: The index of the first point in the contour.            */\n  /*                                                                       */\n  /*    last    :: The index of the last point in the contour.             */\n  /*                                                                       */\n  /*    flipped :: If set, flip the direction of the curve.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS on success, FAILURE on error.                              */\n  /*                                                                       */\n  static Bool\n  Decompose_Curve( RAS_ARGS UShort  first,\n                            UShort  last,\n                            int     flipped )\n  {\n    FT_Vector   v_last;\n    FT_Vector   v_control;\n    FT_Vector   v_start;\n\n    FT_Vector*  points;\n    FT_Vector*  point;\n    FT_Vector*  limit;\n    char*       tags;\n\n    unsigned    tag;       /* current point's state           */\n\n\n    points = ras.outline.points;\n    limit  = points + last;\n\n    v_start.x = SCALED( points[first].x );\n    v_start.y = SCALED( points[first].y );\n    v_last.x  = SCALED( points[last].x );\n    v_last.y  = SCALED( points[last].y );\n\n    if ( flipped )\n    {\n      SWAP_( v_start.x, v_start.y );\n      SWAP_( v_last.x, v_last.y );\n    }\n\n    v_control = v_start;\n\n    point = points + first;\n    tags  = ras.outline.tags + first;\n\n    /* set scan mode if necessary */\n    if ( tags[0] & FT_CURVE_TAG_HAS_SCANMODE )\n      ras.dropOutControl = (Byte)tags[0] >> 5;\n\n    tag = FT_CURVE_TAG( tags[0] );\n\n    /* A contour cannot start with a cubic control point! */\n    if ( tag == FT_CURVE_TAG_CUBIC )\n      goto Invalid_Outline;\n\n    /* check first point to determine origin */\n    if ( tag == FT_CURVE_TAG_CONIC )\n    {\n      /* first point is conic control.  Yes, this happens. */\n      if ( FT_CURVE_TAG( ras.outline.tags[last] ) == FT_CURVE_TAG_ON )\n      {\n        /* start at last point if it is on the curve */\n        v_start = v_last;\n        limit--;\n      }\n      else\n      {\n        /* if both first and last points are conic,         */\n        /* start at their middle and record its position    */\n        /* for closure                                      */\n        v_start.x = ( v_start.x + v_last.x ) / 2;\n        v_start.y = ( v_start.y + v_last.y ) / 2;\n\n     /* v_last = v_start; */\n      }\n      point--;\n      tags--;\n    }\n\n    ras.lastX = v_start.x;\n    ras.lastY = v_start.y;\n\n    while ( point < limit )\n    {\n      point++;\n      tags++;\n\n      tag = FT_CURVE_TAG( tags[0] );\n\n      switch ( tag )\n      {\n      case FT_CURVE_TAG_ON:  /* emit a single line_to */\n        {\n          Long  x, y;\n\n\n          x = SCALED( point->x );\n          y = SCALED( point->y );\n          if ( flipped )\n            SWAP_( x, y );\n\n          if ( Line_To( RAS_VARS x, y ) )\n            goto Fail;\n          continue;\n        }\n\n      case FT_CURVE_TAG_CONIC:  /* consume conic arcs */\n        v_control.x = SCALED( point[0].x );\n        v_control.y = SCALED( point[0].y );\n\n        if ( flipped )\n          SWAP_( v_control.x, v_control.y );\n\n      Do_Conic:\n        if ( point < limit )\n        {\n          FT_Vector  v_middle;\n          Long       x, y;\n\n\n          point++;\n          tags++;\n          tag = FT_CURVE_TAG( tags[0] );\n\n          x = SCALED( point[0].x );\n          y = SCALED( point[0].y );\n\n          if ( flipped )\n            SWAP_( x, y );\n\n          if ( tag == FT_CURVE_TAG_ON )\n          {\n            if ( Conic_To( RAS_VARS v_control.x, v_control.y, x, y ) )\n              goto Fail;\n            continue;\n          }\n\n          if ( tag != FT_CURVE_TAG_CONIC )\n            goto Invalid_Outline;\n\n          v_middle.x = ( v_control.x + x ) / 2;\n          v_middle.y = ( v_control.y + y ) / 2;\n\n          if ( Conic_To( RAS_VARS v_control.x, v_control.y,\n                                  v_middle.x,  v_middle.y ) )\n            goto Fail;\n\n          v_control.x = x;\n          v_control.y = y;\n\n          goto Do_Conic;\n        }\n\n        if ( Conic_To( RAS_VARS v_control.x, v_control.y,\n                                v_start.x,   v_start.y ) )\n          goto Fail;\n\n        goto Close;\n\n      default:  /* FT_CURVE_TAG_CUBIC */\n        {\n          Long  x1, y1, x2, y2, x3, y3;\n\n\n          if ( point + 1 > limit                             ||\n               FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )\n            goto Invalid_Outline;\n\n          point += 2;\n          tags  += 2;\n\n          x1 = SCALED( point[-2].x );\n          y1 = SCALED( point[-2].y );\n          x2 = SCALED( point[-1].x );\n          y2 = SCALED( point[-1].y );\n\n          if ( flipped )\n          {\n            SWAP_( x1, y1 );\n            SWAP_( x2, y2 );\n          }\n\n          if ( point <= limit )\n          {\n            x3 = SCALED( point[0].x );\n            y3 = SCALED( point[0].y );\n\n            if ( flipped )\n              SWAP_( x3, y3 );\n\n            if ( Cubic_To( RAS_VARS x1, y1, x2, y2, x3, y3 ) )\n              goto Fail;\n            continue;\n          }\n\n          if ( Cubic_To( RAS_VARS x1, y1, x2, y2, v_start.x, v_start.y ) )\n            goto Fail;\n          goto Close;\n        }\n      }\n    }\n\n    /* close the contour with a line segment */\n    if ( Line_To( RAS_VARS v_start.x, v_start.y ) )\n      goto Fail;\n\n  Close:\n    return SUCCESS;\n\n  Invalid_Outline:\n    ras.error = FT_THROW( Invalid );\n\n  Fail:\n    return FAILURE;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Convert_Glyph                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Convert a glyph into a series of segments and arcs and make a      */\n  /*    profiles list with them.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    flipped :: If set, flip the direction of curve.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS on success, FAILURE if any error was encountered during    */\n  /*    rendering.                                                         */\n  /*                                                                       */\n  static Bool\n  Convert_Glyph( RAS_ARGS int  flipped )\n  {\n    int       i;\n    unsigned  start;\n\n\n    ras.fProfile = NULL;\n    ras.joint    = FALSE;\n    ras.fresh    = FALSE;\n\n    ras.maxBuff  = ras.sizeBuff - AlignProfileSize;\n\n    ras.numTurns = 0;\n\n    ras.cProfile         = (PProfile)ras.top;\n    ras.cProfile->offset = ras.top;\n    ras.num_Profs        = 0;\n\n    start = 0;\n\n    for ( i = 0; i < ras.outline.n_contours; i++ )\n    {\n      PProfile  lastProfile;\n      Bool      o;\n\n\n      ras.state    = Unknown_State;\n      ras.gProfile = NULL;\n\n      if ( Decompose_Curve( RAS_VARS (unsigned short)start,\n                                     ras.outline.contours[i],\n                                     flipped ) )\n        return FAILURE;\n\n      start = ras.outline.contours[i] + 1;\n\n      /* we must now check whether the extreme arcs join or not */\n      if ( FRAC( ras.lastY ) == 0 &&\n           ras.lastY >= ras.minY  &&\n           ras.lastY <= ras.maxY  )\n        if ( ras.gProfile                        &&\n             ( ras.gProfile->flags & Flow_Up ) ==\n               ( ras.cProfile->flags & Flow_Up ) )\n          ras.top--;\n        /* Note that ras.gProfile can be nil if the contour was too small */\n        /* to be drawn.                                                   */\n\n      lastProfile = ras.cProfile;\n      if ( ras.cProfile->flags & Flow_Up )\n        o = IS_TOP_OVERSHOOT( ras.lastY );\n      else\n        o = IS_BOTTOM_OVERSHOOT( ras.lastY );\n      if ( End_Profile( RAS_VARS o ) )\n        return FAILURE;\n\n      /* close the `next profile in contour' linked list */\n      if ( ras.gProfile )\n        lastProfile->next = ras.gProfile;\n    }\n\n    if ( Finalize_Profile_Table( RAS_VAR ) )\n      return FAILURE;\n\n    return (Bool)( ras.top < ras.maxBuff ? SUCCESS : FAILURE );\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /**                                                                     **/\n  /**  SCAN-LINE SWEEPS AND DRAWING                                       **/\n  /**                                                                     **/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  Init_Linked                                                          */\n  /*                                                                       */\n  /*    Initializes an empty linked list.                                  */\n  /*                                                                       */\n  static void\n  Init_Linked( TProfileList*  l )\n  {\n    *l = NULL;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  InsNew                                                               */\n  /*                                                                       */\n  /*    Inserts a new profile in a linked list.                            */\n  /*                                                                       */\n  static void\n  InsNew( PProfileList  list,\n          PProfile      profile )\n  {\n    PProfile  *old, current;\n    Long       x;\n\n\n    old     = list;\n    current = *old;\n    x       = profile->X;\n\n    while ( current )\n    {\n      if ( x < current->X )\n        break;\n      old     = &current->link;\n      current = *old;\n    }\n\n    profile->link = current;\n    *old          = profile;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  DelOld                                                               */\n  /*                                                                       */\n  /*    Removes an old profile from a linked list.                         */\n  /*                                                                       */\n  static void\n  DelOld( PProfileList  list,\n          PProfile      profile )\n  {\n    PProfile  *old, current;\n\n\n    old     = list;\n    current = *old;\n\n    while ( current )\n    {\n      if ( current == profile )\n      {\n        *old = current->link;\n        return;\n      }\n\n      old     = &current->link;\n      current = *old;\n    }\n\n    /* we should never get there, unless the profile was not part of */\n    /* the list.                                                     */\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  Sort                                                                 */\n  /*                                                                       */\n  /*    Sorts a trace list.  In 95%, the list is already sorted.  We need  */\n  /*    an algorithm which is fast in this case.  Bubble sort is enough    */\n  /*    and simple.                                                        */\n  /*                                                                       */\n  static void\n  Sort( PProfileList  list )\n  {\n    PProfile  *old, current, next;\n\n\n    /* First, set the new X coordinate of each profile */\n    current = *list;\n    while ( current )\n    {\n      current->X       = *current->offset;\n      current->offset += current->flags & Flow_Up ? 1 : -1;\n      current->height--;\n      current = current->link;\n    }\n\n    /* Then sort them */\n    old     = list;\n    current = *old;\n\n    if ( !current )\n      return;\n\n    next = current->link;\n\n    while ( next )\n    {\n      if ( current->X <= next->X )\n      {\n        old     = &current->link;\n        current = *old;\n\n        if ( !current )\n          return;\n      }\n      else\n      {\n        *old          = next;\n        current->link = next->link;\n        next->link    = current;\n\n        old     = list;\n        current = *old;\n      }\n\n      next = current->link;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  Vertical Sweep Procedure Set                                         */\n  /*                                                                       */\n  /*  These four routines are used during the vertical black/white sweep   */\n  /*  phase by the generic Draw_Sweep() function.                          */\n  /*                                                                       */\n  /*************************************************************************/\n\n  static void\n  Vertical_Sweep_Init( RAS_ARGS Short*  min,\n                                Short*  max )\n  {\n    Long  pitch = ras.target.pitch;\n\n    FT_UNUSED( max );\n\n\n    ras.traceIncr = (Short)-pitch;\n    ras.traceOfs  = -*min * pitch;\n    if ( pitch > 0 )\n      ras.traceOfs += ( ras.target.rows - 1 ) * pitch;\n\n    ras.gray_min_x = 0;\n    ras.gray_max_x = 0;\n  }\n\n\n  static void\n  Vertical_Sweep_Span( RAS_ARGS Short       y,\n                                FT_F26Dot6  x1,\n                                FT_F26Dot6  x2,\n                                PProfile    left,\n                                PProfile    right )\n  {\n    Long   e1, e2;\n    Byte*  target;\n\n    Int  dropOutControl = left->flags & 7;\n\n    FT_UNUSED( y );\n    FT_UNUSED( left );\n    FT_UNUSED( right );\n\n\n    /* Drop-out control */\n\n    e1 = TRUNC( CEILING( x1 ) );\n\n    if ( dropOutControl != 2                             &&\n         x2 - x1 - ras.precision <= ras.precision_jitter )\n      e2 = e1;\n    else\n      e2 = TRUNC( FLOOR( x2 ) );\n\n    if ( e2 >= 0 && e1 < ras.bWidth )\n    {\n      int   c1, c2;\n      Byte  f1, f2;\n\n\n      if ( e1 < 0 )\n        e1 = 0;\n      if ( e2 >= ras.bWidth )\n        e2 = ras.bWidth - 1;\n\n      c1 = (Short)( e1 >> 3 );\n      c2 = (Short)( e2 >> 3 );\n\n      f1 = (Byte)  ( 0xFF >> ( e1 & 7 ) );\n      f2 = (Byte) ~( 0x7F >> ( e2 & 7 ) );\n\n      if ( ras.gray_min_x > c1 )\n        ras.gray_min_x = (short)c1;\n      if ( ras.gray_max_x < c2 )\n        ras.gray_max_x = (short)c2;\n\n      target = ras.bTarget + ras.traceOfs + c1;\n      c2 -= c1;\n\n      if ( c2 > 0 )\n      {\n        target[0] |= f1;\n\n        /* memset() is slower than the following code on many platforms. */\n        /* This is due to the fact that, in the vast majority of cases,  */\n        /* the span length in bytes is relatively small.                 */\n        c2--;\n        while ( c2 > 0 )\n        {\n          *(++target) = 0xFF;\n          c2--;\n        }\n        target[1] |= f2;\n      }\n      else\n        *target |= ( f1 & f2 );\n    }\n  }\n\n\n  static void\n  Vertical_Sweep_Drop( RAS_ARGS Short       y,\n                                FT_F26Dot6  x1,\n                                FT_F26Dot6  x2,\n                                PProfile    left,\n                                PProfile    right )\n  {\n    Long   e1, e2, pxl;\n    Short  c1, f1;\n\n\n    /* Drop-out control */\n\n    /*   e2            x2                    x1           e1   */\n    /*                                                         */\n    /*                 ^                     |                 */\n    /*                 |                     |                 */\n    /*   +-------------+---------------------+------------+    */\n    /*                 |                     |                 */\n    /*                 |                     v                 */\n    /*                                                         */\n    /* pixel         contour              contour       pixel  */\n    /* center                                           center */\n\n    /* drop-out mode    scan conversion rules (as defined in OpenType) */\n    /* --------------------------------------------------------------- */\n    /*  0                1, 2, 3                                       */\n    /*  1                1, 2, 4                                       */\n    /*  2                1, 2                                          */\n    /*  3                same as mode 2                                */\n    /*  4                1, 2, 5                                       */\n    /*  5                1, 2, 6                                       */\n    /*  6, 7             same as mode 2                                */\n\n    e1  = CEILING( x1 );\n    e2  = FLOOR  ( x2 );\n    pxl = e1;\n\n    if ( e1 > e2 )\n    {\n      Int  dropOutControl = left->flags & 7;\n\n\n      if ( e1 == e2 + ras.precision )\n      {\n        switch ( dropOutControl )\n        {\n        case 0: /* simple drop-outs including stubs */\n          pxl = e2;\n          break;\n\n        case 4: /* smart drop-outs including stubs */\n          pxl = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );\n          break;\n\n        case 1: /* simple drop-outs excluding stubs */\n        case 5: /* smart drop-outs excluding stubs  */\n\n          /* Drop-out Control Rules #4 and #6 */\n\n          /* The specification neither provides an exact definition */\n          /* of a `stub' nor gives exact rules to exclude them.     */\n          /*                                                        */\n          /* Here the constraints we use to recognize a stub.       */\n          /*                                                        */\n          /*  upper stub:                                           */\n          /*                                                        */\n          /*   - P_Left and P_Right are in the same contour         */\n          /*   - P_Right is the successor of P_Left in that contour */\n          /*   - y is the top of P_Left and P_Right                 */\n          /*                                                        */\n          /*  lower stub:                                           */\n          /*                                                        */\n          /*   - P_Left and P_Right are in the same contour         */\n          /*   - P_Left is the successor of P_Right in that contour */\n          /*   - y is the bottom of P_Left                          */\n          /*                                                        */\n          /* We draw a stub if the following constraints are met.   */\n          /*                                                        */\n          /*   - for an upper or lower stub, there is top or bottom */\n          /*     overshoot, respectively                            */\n          /*   - the covered interval is greater or equal to a half */\n          /*     pixel                                              */\n\n          /* upper stub test */\n          if ( left->next == right                &&\n               left->height <= 0                  &&\n               !( left->flags & Overshoot_Top   &&\n                  x2 - x1 >= ras.precision_half ) )\n            return;\n\n          /* lower stub test */\n          if ( right->next == left                 &&\n               left->start == y                    &&\n               !( left->flags & Overshoot_Bottom &&\n                  x2 - x1 >= ras.precision_half  ) )\n            return;\n\n          if ( dropOutControl == 1 )\n            pxl = e2;\n          else\n            pxl = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );\n          break;\n\n        default: /* modes 2, 3, 6, 7 */\n          return;  /* no drop-out control */\n        }\n\n        /* undocumented but confirmed: If the drop-out would result in a  */\n        /* pixel outside of the bounding box, use the pixel inside of the */\n        /* bounding box instead                                           */\n        if ( pxl < 0 )\n          pxl = e1;\n        else if ( TRUNC( pxl ) >= ras.bWidth )\n          pxl = e2;\n\n        /* check that the other pixel isn't set */\n        e1 = pxl == e1 ? e2 : e1;\n\n        e1 = TRUNC( e1 );\n\n        c1 = (Short)( e1 >> 3 );\n        f1 = (Short)( e1 &  7 );\n\n        if ( e1 >= 0 && e1 < ras.bWidth                      &&\n             ras.bTarget[ras.traceOfs + c1] & ( 0x80 >> f1 ) )\n          return;\n      }\n      else\n        return;\n    }\n\n    e1 = TRUNC( pxl );\n\n    if ( e1 >= 0 && e1 < ras.bWidth )\n    {\n      c1 = (Short)( e1 >> 3 );\n      f1 = (Short)( e1 & 7 );\n\n      if ( ras.gray_min_x > c1 )\n        ras.gray_min_x = c1;\n      if ( ras.gray_max_x < c1 )\n        ras.gray_max_x = c1;\n\n      ras.bTarget[ras.traceOfs + c1] |= (char)( 0x80 >> f1 );\n    }\n  }\n\n\n  static void\n  Vertical_Sweep_Step( RAS_ARG )\n  {\n    ras.traceOfs += ras.traceIncr;\n  }\n\n\n  /***********************************************************************/\n  /*                                                                     */\n  /*  Horizontal Sweep Procedure Set                                     */\n  /*                                                                     */\n  /*  These four routines are used during the horizontal black/white     */\n  /*  sweep phase by the generic Draw_Sweep() function.                  */\n  /*                                                                     */\n  /***********************************************************************/\n\n  static void\n  Horizontal_Sweep_Init( RAS_ARGS Short*  min,\n                                  Short*  max )\n  {\n    /* nothing, really */\n    FT_UNUSED_RASTER;\n    FT_UNUSED( min );\n    FT_UNUSED( max );\n  }\n\n\n  static void\n  Horizontal_Sweep_Span( RAS_ARGS Short       y,\n                                  FT_F26Dot6  x1,\n                                  FT_F26Dot6  x2,\n                                  PProfile    left,\n                                  PProfile    right )\n  {\n    FT_UNUSED( left );\n    FT_UNUSED( right );\n\n\n    if ( x2 - x1 < ras.precision )\n    {\n      Long  e1, e2;\n\n\n      e1 = CEILING( x1 );\n      e2 = FLOOR  ( x2 );\n\n      if ( e1 == e2 )\n      {\n        Byte   f1;\n        PByte  bits;\n\n\n        bits = ras.bTarget + ( y >> 3 );\n        f1   = (Byte)( 0x80 >> ( y & 7 ) );\n\n        e1 = TRUNC( e1 );\n\n        if ( e1 >= 0 && (ULong)e1 < ras.target.rows )\n        {\n          PByte  p;\n\n\n          p = bits - e1 * ras.target.pitch;\n          if ( ras.target.pitch > 0 )\n            p += ( ras.target.rows - 1 ) * ras.target.pitch;\n\n          p[0] |= f1;\n        }\n      }\n    }\n  }\n\n\n  static void\n  Horizontal_Sweep_Drop( RAS_ARGS Short       y,\n                                  FT_F26Dot6  x1,\n                                  FT_F26Dot6  x2,\n                                  PProfile    left,\n                                  PProfile    right )\n  {\n    Long   e1, e2, pxl;\n    PByte  bits;\n    Byte   f1;\n\n\n    /* During the horizontal sweep, we only take care of drop-outs */\n\n    /* e1     +       <-- pixel center */\n    /*        |                        */\n    /* x1  ---+-->    <-- contour      */\n    /*        |                        */\n    /*        |                        */\n    /* x2  <--+---    <-- contour      */\n    /*        |                        */\n    /*        |                        */\n    /* e2     +       <-- pixel center */\n\n    e1  = CEILING( x1 );\n    e2  = FLOOR  ( x2 );\n    pxl = e1;\n\n    if ( e1 > e2 )\n    {\n      Int  dropOutControl = left->flags & 7;\n\n\n      if ( e1 == e2 + ras.precision )\n      {\n        switch ( dropOutControl )\n        {\n        case 0: /* simple drop-outs including stubs */\n          pxl = e2;\n          break;\n\n        case 4: /* smart drop-outs including stubs */\n          pxl = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );\n          break;\n\n        case 1: /* simple drop-outs excluding stubs */\n        case 5: /* smart drop-outs excluding stubs  */\n          /* see Vertical_Sweep_Drop for details */\n\n          /* rightmost stub test */\n          if ( left->next == right                &&\n               left->height <= 0                  &&\n               !( left->flags & Overshoot_Top   &&\n                  x2 - x1 >= ras.precision_half ) )\n            return;\n\n          /* leftmost stub test */\n          if ( right->next == left                 &&\n               left->start == y                    &&\n               !( left->flags & Overshoot_Bottom &&\n                  x2 - x1 >= ras.precision_half  ) )\n            return;\n\n          if ( dropOutControl == 1 )\n            pxl = e2;\n          else\n            pxl = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );\n          break;\n\n        default: /* modes 2, 3, 6, 7 */\n          return;  /* no drop-out control */\n        }\n\n        /* undocumented but confirmed: If the drop-out would result in a  */\n        /* pixel outside of the bounding box, use the pixel inside of the */\n        /* bounding box instead                                           */\n        if ( pxl < 0 )\n          pxl = e1;\n        else if ( (ULong)( TRUNC( pxl ) ) >= ras.target.rows )\n          pxl = e2;\n\n        /* check that the other pixel isn't set */\n        e1 = pxl == e1 ? e2 : e1;\n\n        e1 = TRUNC( e1 );\n\n        bits = ras.bTarget + ( y >> 3 );\n        f1   = (Byte)( 0x80 >> ( y & 7 ) );\n\n        bits -= e1 * ras.target.pitch;\n        if ( ras.target.pitch > 0 )\n          bits += ( ras.target.rows - 1 ) * ras.target.pitch;\n\n        if ( e1 >= 0                     &&\n             (ULong)e1 < ras.target.rows &&\n             *bits & f1                  )\n          return;\n      }\n      else\n        return;\n    }\n\n    bits = ras.bTarget + ( y >> 3 );\n    f1   = (Byte)( 0x80 >> ( y & 7 ) );\n\n    e1 = TRUNC( pxl );\n\n    if ( e1 >= 0 && (ULong)e1 < ras.target.rows )\n    {\n      bits -= e1 * ras.target.pitch;\n      if ( ras.target.pitch > 0 )\n        bits += ( ras.target.rows - 1 ) * ras.target.pitch;\n\n      bits[0] |= f1;\n    }\n  }\n\n\n  static void\n  Horizontal_Sweep_Step( RAS_ARG )\n  {\n    /* Nothing, really */\n    FT_UNUSED_RASTER;\n  }\n\n\n#ifdef FT_RASTER_OPTION_ANTI_ALIASING\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  Vertical Gray Sweep Procedure Set                                    */\n  /*                                                                       */\n  /*  These two routines are used during the vertical gray-levels sweep    */\n  /*  phase by the generic Draw_Sweep() function.                          */\n  /*                                                                       */\n  /*  NOTES                                                                */\n  /*                                                                       */\n  /*  - The target pixmap's width *must* be a multiple of 4.               */\n  /*                                                                       */\n  /*  - You have to use the function Vertical_Sweep_Span() for the gray    */\n  /*    span call.                                                         */\n  /*                                                                       */\n  /*************************************************************************/\n\n  static void\n  Vertical_Gray_Sweep_Init( RAS_ARGS Short*  min,\n                                     Short*  max )\n  {\n    Long  pitch, byte_len;\n\n\n    *min = *min & -2;\n    *max = ( *max + 3 ) & -2;\n\n    ras.traceOfs  = 0;\n    pitch         = ras.target.pitch;\n    byte_len      = -pitch;\n    ras.traceIncr = (Short)byte_len;\n    ras.traceG    = ( *min / 2 ) * byte_len;\n\n    if ( pitch > 0 )\n    {\n      ras.traceG += ( ras.target.rows - 1 ) * pitch;\n      byte_len    = -byte_len;\n    }\n\n    ras.gray_min_x =  (Short)byte_len;\n    ras.gray_max_x = -(Short)byte_len;\n  }\n\n\n  static void\n  Vertical_Gray_Sweep_Step( RAS_ARG )\n  {\n    short*  count = (short*)count_table;\n    Byte*   grays;\n\n\n    ras.traceOfs += ras.gray_width;\n\n    if ( ras.traceOfs > ras.gray_width )\n    {\n      PByte  pix;\n\n\n      pix   = ras.gTarget + ras.traceG + ras.gray_min_x * 4;\n      grays = ras.grays;\n\n      if ( ras.gray_max_x >= 0 )\n      {\n        Long  last_pixel = ras.target.width - 1;\n        Int   last_cell  = last_pixel >> 2;\n        Int   last_bit   = last_pixel & 3;\n        Bool  over       = 0;\n\n        Int    c1, c2;\n        PByte  bit, bit2;\n\n\n        if ( ras.gray_max_x >= last_cell && last_bit != 3 )\n        {\n          ras.gray_max_x = last_cell - 1;\n          over = 1;\n        }\n\n        if ( ras.gray_min_x < 0 )\n          ras.gray_min_x = 0;\n\n        bit  = ras.bTarget + ras.gray_min_x;\n        bit2 = bit + ras.gray_width;\n\n        c1 = ras.gray_max_x - ras.gray_min_x;\n\n        while ( c1 >= 0 )\n        {\n          c2 = count[*bit] + count[*bit2];\n\n          if ( c2 )\n          {\n            pix[0] = grays[(c2 >> 12) & 0x000F];\n            pix[1] = grays[(c2 >> 8 ) & 0x000F];\n            pix[2] = grays[(c2 >> 4 ) & 0x000F];\n            pix[3] = grays[ c2        & 0x000F];\n\n            *bit  = 0;\n            *bit2 = 0;\n          }\n\n          bit++;\n          bit2++;\n          pix += 4;\n          c1--;\n        }\n\n        if ( over )\n        {\n          c2 = count[*bit] + count[*bit2];\n          if ( c2 )\n          {\n            switch ( last_bit )\n            {\n            case 2:\n              pix[2] = grays[(c2 >> 4 ) & 0x000F];\n            case 1:\n              pix[1] = grays[(c2 >> 8 ) & 0x000F];\n            default:\n              pix[0] = grays[(c2 >> 12) & 0x000F];\n            }\n\n            *bit  = 0;\n            *bit2 = 0;\n          }\n        }\n      }\n\n      ras.traceOfs = 0;\n      ras.traceG  += ras.traceIncr;\n\n      ras.gray_min_x =  32000;\n      ras.gray_max_x = -32000;\n    }\n  }\n\n\n  static void\n  Horizontal_Gray_Sweep_Span( RAS_ARGS Short       y,\n                                       FT_F26Dot6  x1,\n                                       FT_F26Dot6  x2,\n                                       PProfile    left,\n                                       PProfile    right )\n  {\n    /* nothing, really */\n    FT_UNUSED_RASTER;\n    FT_UNUSED( y );\n    FT_UNUSED( x1 );\n    FT_UNUSED( x2 );\n    FT_UNUSED( left );\n    FT_UNUSED( right );\n  }\n\n\n  static void\n  Horizontal_Gray_Sweep_Drop( RAS_ARGS Short       y,\n                                       FT_F26Dot6  x1,\n                                       FT_F26Dot6  x2,\n                                       PProfile    left,\n                                       PProfile    right )\n  {\n    Long   e1, e2;\n    PByte  pixel;\n\n\n    /* During the horizontal sweep, we only take care of drop-outs */\n\n    e1 = CEILING( x1 );\n    e2 = FLOOR  ( x2 );\n\n    if ( e1 > e2 )\n    {\n      Int  dropOutControl = left->flags & 7;\n\n\n      if ( e1 == e2 + ras.precision )\n      {\n        switch ( dropOutControl )\n        {\n        case 0: /* simple drop-outs including stubs */\n          e1 = e2;\n          break;\n\n        case 4: /* smart drop-outs including stubs */\n          e1 = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );\n          break;\n\n        case 1: /* simple drop-outs excluding stubs */\n        case 5: /* smart drop-outs excluding stubs  */\n          /* see Vertical_Sweep_Drop for details */\n\n          /* rightmost stub test */\n          if ( left->next == right && left->height <= 0 )\n            return;\n\n          /* leftmost stub test */\n          if ( right->next == left && left->start == y )\n            return;\n\n          if ( dropOutControl == 1 )\n            e1 = e2;\n          else\n            e1 = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );\n\n          break;\n\n        default: /* modes 2, 3, 6, 7 */\n          return;  /* no drop-out control */\n        }\n      }\n      else\n        return;\n    }\n\n    if ( e1 >= 0 )\n    {\n      Byte  color;\n\n\n      if ( x2 - x1 >= ras.precision_half )\n        color = ras.grays[2];\n      else\n        color = ras.grays[1];\n\n      e1 = TRUNC( e1 ) / 2;\n      if ( e1 < ras.target.rows )\n      {\n        pixel = ras.gTarget - e1 * ras.target.pitch + y / 2;\n        if ( ras.target.pitch > 0 )\n          pixel += ( ras.target.rows - 1 ) * ras.target.pitch;\n\n        if ( pixel[0] == ras.grays[0] )\n          pixel[0] = color;\n      }\n    }\n  }\n\n\n#endif /* FT_RASTER_OPTION_ANTI_ALIASING */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  Generic Sweep Drawing routine                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n  static Bool\n  Draw_Sweep( RAS_ARG )\n  {\n    Short         y, y_change, y_height;\n\n    PProfile      P, Q, P_Left, P_Right;\n\n    Short         min_Y, max_Y, top, bottom, dropouts;\n\n    Long          x1, x2, xs, e1, e2;\n\n    TProfileList  waiting;\n    TProfileList  draw_left, draw_right;\n\n\n    /* initialize empty linked lists */\n\n    Init_Linked( &waiting );\n\n    Init_Linked( &draw_left  );\n    Init_Linked( &draw_right );\n\n    /* first, compute min and max Y */\n\n    P     = ras.fProfile;\n    max_Y = (Short)TRUNC( ras.minY );\n    min_Y = (Short)TRUNC( ras.maxY );\n\n    while ( P )\n    {\n      Q = P->link;\n\n      bottom = (Short)P->start;\n      top    = (Short)( P->start + P->height - 1 );\n\n      if ( min_Y > bottom )\n        min_Y = bottom;\n      if ( max_Y < top )\n        max_Y = top;\n\n      P->X = 0;\n      InsNew( &waiting, P );\n\n      P = Q;\n    }\n\n    /* check the Y-turns */\n    if ( ras.numTurns == 0 )\n    {\n      ras.error = FT_THROW( Invalid );\n      return FAILURE;\n    }\n\n    /* now initialize the sweep */\n\n    ras.Proc_Sweep_Init( RAS_VARS &min_Y, &max_Y );\n\n    /* then compute the distance of each profile from min_Y */\n\n    P = waiting;\n\n    while ( P )\n    {\n      P->countL = (UShort)( P->start - min_Y );\n      P = P->link;\n    }\n\n    /* let's go */\n\n    y        = min_Y;\n    y_height = 0;\n\n    if ( ras.numTurns > 0                     &&\n         ras.sizeBuff[-ras.numTurns] == min_Y )\n      ras.numTurns--;\n\n    while ( ras.numTurns > 0 )\n    {\n      /* check waiting list for new activations */\n\n      P = waiting;\n\n      while ( P )\n      {\n        Q = P->link;\n        P->countL -= y_height;\n        if ( P->countL == 0 )\n        {\n          DelOld( &waiting, P );\n\n          if ( P->flags & Flow_Up )\n            InsNew( &draw_left,  P );\n          else\n            InsNew( &draw_right, P );\n        }\n\n        P = Q;\n      }\n\n      /* sort the drawing lists */\n\n      Sort( &draw_left );\n      Sort( &draw_right );\n\n      y_change = (Short)ras.sizeBuff[-ras.numTurns--];\n      y_height = (Short)( y_change - y );\n\n      while ( y < y_change )\n      {\n        /* let's trace */\n\n        dropouts = 0;\n\n        P_Left  = draw_left;\n        P_Right = draw_right;\n\n        while ( P_Left )\n        {\n          x1 = P_Left ->X;\n          x2 = P_Right->X;\n\n          if ( x1 > x2 )\n          {\n            xs = x1;\n            x1 = x2;\n            x2 = xs;\n          }\n\n          e1 = FLOOR( x1 );\n          e2 = CEILING( x2 );\n\n          if ( x2 - x1 <= ras.precision &&\n               e1 != x1 && e2 != x2     )\n          {\n            if ( e1 > e2 || e2 == e1 + ras.precision )\n            {\n              Int  dropOutControl = P_Left->flags & 7;\n\n\n              if ( dropOutControl != 2 )\n              {\n                /* a drop-out was detected */\n\n                P_Left ->X = x1;\n                P_Right->X = x2;\n\n                /* mark profile for drop-out processing */\n                P_Left->countL = 1;\n                dropouts++;\n              }\n\n              goto Skip_To_Next;\n            }\n          }\n\n          ras.Proc_Sweep_Span( RAS_VARS y, x1, x2, P_Left, P_Right );\n\n        Skip_To_Next:\n\n          P_Left  = P_Left->link;\n          P_Right = P_Right->link;\n        }\n\n        /* handle drop-outs _after_ the span drawing --       */\n        /* drop-out processing has been moved out of the loop */\n        /* for performance tuning                             */\n        if ( dropouts > 0 )\n          goto Scan_DropOuts;\n\n      Next_Line:\n\n        ras.Proc_Sweep_Step( RAS_VAR );\n\n        y++;\n\n        if ( y < y_change )\n        {\n          Sort( &draw_left  );\n          Sort( &draw_right );\n        }\n      }\n\n      /* now finalize the profiles that need it */\n\n      P = draw_left;\n      while ( P )\n      {\n        Q = P->link;\n        if ( P->height == 0 )\n          DelOld( &draw_left, P );\n        P = Q;\n      }\n\n      P = draw_right;\n      while ( P )\n      {\n        Q = P->link;\n        if ( P->height == 0 )\n          DelOld( &draw_right, P );\n        P = Q;\n      }\n    }\n\n    /* for gray-scaling, flush the bitmap scanline cache */\n    while ( y <= max_Y )\n    {\n      ras.Proc_Sweep_Step( RAS_VAR );\n      y++;\n    }\n\n    return SUCCESS;\n\n  Scan_DropOuts:\n\n    P_Left  = draw_left;\n    P_Right = draw_right;\n\n    while ( P_Left )\n    {\n      if ( P_Left->countL )\n      {\n        P_Left->countL = 0;\n#if 0\n        dropouts--;  /* -- this is useful when debugging only */\n#endif\n        ras.Proc_Sweep_Drop( RAS_VARS y,\n                                      P_Left->X,\n                                      P_Right->X,\n                                      P_Left,\n                                      P_Right );\n      }\n\n      P_Left  = P_Left->link;\n      P_Right = P_Right->link;\n    }\n\n    goto Next_Line;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Render_Single_Pass                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Perform one sweep with sub-banding.                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    flipped :: If set, flip the direction of the outline.              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Renderer error code.                                               */\n  /*                                                                       */\n  static int\n  Render_Single_Pass( RAS_ARGS Bool  flipped )\n  {\n    Short  i, j, k;\n\n\n    while ( ras.band_top >= 0 )\n    {\n      ras.maxY = (Long)ras.band_stack[ras.band_top].y_max * ras.precision;\n      ras.minY = (Long)ras.band_stack[ras.band_top].y_min * ras.precision;\n\n      ras.top = ras.buff;\n\n      ras.error = Raster_Err_None;\n\n      if ( Convert_Glyph( RAS_VARS flipped ) )\n      {\n        if ( ras.error != Raster_Err_Overflow )\n          return FAILURE;\n\n        ras.error = Raster_Err_None;\n\n        /* sub-banding */\n\n#ifdef DEBUG_RASTER\n        ClearBand( RAS_VARS TRUNC( ras.minY ), TRUNC( ras.maxY ) );\n#endif\n\n        i = ras.band_stack[ras.band_top].y_min;\n        j = ras.band_stack[ras.band_top].y_max;\n\n        k = (Short)( ( i + j ) / 2 );\n\n        if ( ras.band_top >= 7 || k < i )\n        {\n          ras.band_top = 0;\n          ras.error    = FT_THROW( Invalid );\n\n          return ras.error;\n        }\n\n        ras.band_stack[ras.band_top + 1].y_min = k;\n        ras.band_stack[ras.band_top + 1].y_max = j;\n\n        ras.band_stack[ras.band_top].y_max = (Short)( k - 1 );\n\n        ras.band_top++;\n      }\n      else\n      {\n        if ( ras.fProfile )\n          if ( Draw_Sweep( RAS_VAR ) )\n             return ras.error;\n        ras.band_top--;\n      }\n    }\n\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Render_Glyph                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Render a glyph in a bitmap.  Sub-banding if needed.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  Render_Glyph( RAS_ARG )\n  {\n    FT_Error  error;\n\n\n    Set_High_Precision( RAS_VARS ras.outline.flags &\n                                 FT_OUTLINE_HIGH_PRECISION );\n    ras.scale_shift = ras.precision_shift;\n\n    if ( ras.outline.flags & FT_OUTLINE_IGNORE_DROPOUTS )\n      ras.dropOutControl = 2;\n    else\n    {\n      if ( ras.outline.flags & FT_OUTLINE_SMART_DROPOUTS )\n        ras.dropOutControl = 4;\n      else\n        ras.dropOutControl = 0;\n\n      if ( !( ras.outline.flags & FT_OUTLINE_INCLUDE_STUBS ) )\n        ras.dropOutControl += 1;\n    }\n\n    ras.second_pass = (FT_Byte)( !( ras.outline.flags &\n                                    FT_OUTLINE_SINGLE_PASS ) );\n\n    /* Vertical Sweep */\n    ras.Proc_Sweep_Init = Vertical_Sweep_Init;\n    ras.Proc_Sweep_Span = Vertical_Sweep_Span;\n    ras.Proc_Sweep_Drop = Vertical_Sweep_Drop;\n    ras.Proc_Sweep_Step = Vertical_Sweep_Step;\n\n    ras.band_top            = 0;\n    ras.band_stack[0].y_min = 0;\n    ras.band_stack[0].y_max = (short)( ras.target.rows - 1 );\n\n    ras.bWidth  = (unsigned short)ras.target.width;\n    ras.bTarget = (Byte*)ras.target.buffer;\n\n    if ( ( error = Render_Single_Pass( RAS_VARS 0 ) ) != 0 )\n      return error;\n\n    /* Horizontal Sweep */\n    if ( ras.second_pass && ras.dropOutControl != 2 )\n    {\n      ras.Proc_Sweep_Init = Horizontal_Sweep_Init;\n      ras.Proc_Sweep_Span = Horizontal_Sweep_Span;\n      ras.Proc_Sweep_Drop = Horizontal_Sweep_Drop;\n      ras.Proc_Sweep_Step = Horizontal_Sweep_Step;\n\n      ras.band_top            = 0;\n      ras.band_stack[0].y_min = 0;\n      ras.band_stack[0].y_max = (short)( ras.target.width - 1 );\n\n      if ( ( error = Render_Single_Pass( RAS_VARS 1 ) ) != 0 )\n        return error;\n    }\n\n    return Raster_Err_None;\n  }\n\n\n#ifdef FT_RASTER_OPTION_ANTI_ALIASING\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Render_Gray_Glyph                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Render a glyph with grayscaling.  Sub-banding if needed.           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  Render_Gray_Glyph( RAS_ARG )\n  {\n    Long      pixel_width;\n    FT_Error  error;\n\n\n    Set_High_Precision( RAS_VARS ras.outline.flags &\n                                 FT_OUTLINE_HIGH_PRECISION );\n    ras.scale_shift = ras.precision_shift + 1;\n\n    if ( ras.outline.flags & FT_OUTLINE_IGNORE_DROPOUTS )\n      ras.dropOutControl = 2;\n    else\n    {\n      if ( ras.outline.flags & FT_OUTLINE_SMART_DROPOUTS )\n        ras.dropOutControl = 4;\n      else\n        ras.dropOutControl = 0;\n\n      if ( !( ras.outline.flags & FT_OUTLINE_INCLUDE_STUBS ) )\n        ras.dropOutControl += 1;\n    }\n\n    ras.second_pass = !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS );\n\n    /* Vertical Sweep */\n\n    ras.band_top            = 0;\n    ras.band_stack[0].y_min = 0;\n    ras.band_stack[0].y_max = 2 * ras.target.rows - 1;\n\n    ras.bWidth  = ras.gray_width;\n    pixel_width = 2 * ( ( ras.target.width + 3 ) >> 2 );\n\n    if ( ras.bWidth > pixel_width )\n      ras.bWidth = pixel_width;\n\n    ras.bWidth  = ras.bWidth * 8;\n    ras.bTarget = (Byte*)ras.gray_lines;\n    ras.gTarget = (Byte*)ras.target.buffer;\n\n    ras.Proc_Sweep_Init = Vertical_Gray_Sweep_Init;\n    ras.Proc_Sweep_Span = Vertical_Sweep_Span;\n    ras.Proc_Sweep_Drop = Vertical_Sweep_Drop;\n    ras.Proc_Sweep_Step = Vertical_Gray_Sweep_Step;\n\n    error = Render_Single_Pass( RAS_VARS 0 );\n    if ( error )\n      return error;\n\n    /* Horizontal Sweep */\n    if ( ras.second_pass && ras.dropOutControl != 2 )\n    {\n      ras.Proc_Sweep_Init = Horizontal_Sweep_Init;\n      ras.Proc_Sweep_Span = Horizontal_Gray_Sweep_Span;\n      ras.Proc_Sweep_Drop = Horizontal_Gray_Sweep_Drop;\n      ras.Proc_Sweep_Step = Horizontal_Sweep_Step;\n\n      ras.band_top            = 0;\n      ras.band_stack[0].y_min = 0;\n      ras.band_stack[0].y_max = ras.target.width * 2 - 1;\n\n      error = Render_Single_Pass( RAS_VARS 1 );\n      if ( error )\n        return error;\n    }\n\n    return Raster_Err_None;\n  }\n\n#else /* !FT_RASTER_OPTION_ANTI_ALIASING */\n\n  FT_LOCAL_DEF( FT_Error )\n  Render_Gray_Glyph( RAS_ARG )\n  {\n    FT_UNUSED_RASTER;\n\n    return FT_THROW( Unsupported );\n  }\n\n#endif /* !FT_RASTER_OPTION_ANTI_ALIASING */\n\n\n  static void\n  ft_black_init( black_PRaster  raster )\n  {\n#ifdef FT_RASTER_OPTION_ANTI_ALIASING\n    FT_UInt  n;\n\n\n    /* set default 5-levels gray palette */\n    for ( n = 0; n < 5; n++ )\n      raster->grays[n] = n * 255 / 4;\n\n    raster->gray_width = RASTER_GRAY_LINES / 2;\n#else\n    FT_UNUSED( raster );\n#endif\n  }\n\n\n  /**** RASTER OBJECT CREATION: In standalone mode, we simply use *****/\n  /****                         a static object.                  *****/\n\n\n#ifdef _STANDALONE_\n\n\n  static int\n  ft_black_new( void*       memory,\n                FT_Raster  *araster )\n  {\n     static black_TRaster  the_raster;\n     FT_UNUSED( memory );\n\n\n     *araster = (FT_Raster)&the_raster;\n     FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );\n     ft_black_init( &the_raster );\n\n     return 0;\n  }\n\n\n  static void\n  ft_black_done( FT_Raster  raster )\n  {\n    /* nothing */\n    FT_UNUSED( raster );\n  }\n\n\n#else /* !_STANDALONE_ */\n\n\n  static int\n  ft_black_new( FT_Memory       memory,\n                black_PRaster  *araster )\n  {\n    FT_Error       error;\n    black_PRaster  raster = NULL;\n\n\n    *araster = 0;\n    if ( !FT_NEW( raster ) )\n    {\n      raster->memory = memory;\n      ft_black_init( raster );\n\n      *araster = raster;\n    }\n\n    return error;\n  }\n\n\n  static void\n  ft_black_done( black_PRaster  raster )\n  {\n    FT_Memory  memory = (FT_Memory)raster->memory;\n\n\n    FT_FREE( raster );\n  }\n\n\n#endif /* !_STANDALONE_ */\n\n\n  static void\n  ft_black_reset( black_PRaster  raster,\n                  char*          pool_base,\n                  long           pool_size )\n  {\n    if ( raster )\n    {\n      if ( pool_base && pool_size >= (long)sizeof ( black_TWorker ) + 2048 )\n      {\n        black_PWorker  worker = (black_PWorker)pool_base;\n\n\n        raster->buffer      = pool_base + ( ( sizeof ( *worker ) + 7 ) & ~7 );\n        raster->buffer_size = (long)( pool_base + pool_size -\n                                        (char*)raster->buffer );\n        raster->worker      = worker;\n      }\n      else\n      {\n        raster->buffer      = NULL;\n        raster->buffer_size = 0;\n        raster->worker      = NULL;\n      }\n    }\n  }\n\n\n  static int\n  ft_black_set_mode( black_PRaster  raster,\n                     unsigned long  mode,\n                     const char*    palette )\n  {\n#ifdef FT_RASTER_OPTION_ANTI_ALIASING\n\n    if ( mode == FT_MAKE_TAG( 'p', 'a', 'l', '5' ) )\n    {\n      /* set 5-levels gray palette */\n      raster->grays[0] = palette[0];\n      raster->grays[1] = palette[1];\n      raster->grays[2] = palette[2];\n      raster->grays[3] = palette[3];\n      raster->grays[4] = palette[4];\n    }\n\n#else\n\n    FT_UNUSED( raster );\n    FT_UNUSED( mode );\n    FT_UNUSED( palette );\n\n#endif\n\n    return 0;\n  }\n\n\n  static int\n  ft_black_render( black_PRaster            raster,\n                   const FT_Raster_Params*  params )\n  {\n    const FT_Outline*  outline    = (const FT_Outline*)params->source;\n    const FT_Bitmap*   target_map = params->target;\n    black_PWorker      worker;\n\n\n    if ( !raster || !raster->buffer || !raster->buffer_size )\n      return FT_THROW( Not_Ini );\n\n    if ( !outline )\n      return FT_THROW( Invalid );\n\n    /* return immediately if the outline is empty */\n    if ( outline->n_points == 0 || outline->n_contours <= 0 )\n      return Raster_Err_None;\n\n    if ( !outline->contours || !outline->points )\n      return FT_THROW( Invalid );\n\n    if ( outline->n_points !=\n           outline->contours[outline->n_contours - 1] + 1 )\n      return FT_THROW( Invalid );\n\n    worker = raster->worker;\n\n    /* this version of the raster does not support direct rendering, sorry */\n    if ( params->flags & FT_RASTER_FLAG_DIRECT )\n      return FT_THROW( Unsupported );\n\n    if ( !target_map )\n      return FT_THROW( Invalid );\n\n    /* nothing to do */\n    if ( !target_map->width || !target_map->rows )\n      return Raster_Err_None;\n\n    if ( !target_map->buffer )\n      return FT_THROW( Invalid );\n\n    ras.outline = *outline;\n    ras.target  = *target_map;\n\n    worker->buff       = (PLong) raster->buffer;\n    worker->sizeBuff   = worker->buff +\n                           raster->buffer_size / sizeof ( Long );\n#ifdef FT_RASTER_OPTION_ANTI_ALIASING\n    worker->grays      = raster->grays;\n    worker->gray_width = raster->gray_width;\n\n    FT_MEM_ZERO( worker->gray_lines, worker->gray_width * 2 );\n#endif\n\n    return ( params->flags & FT_RASTER_FLAG_AA )\n           ? Render_Gray_Glyph( RAS_VAR )\n           : Render_Glyph( RAS_VAR );\n  }\n\n\n  FT_DEFINE_RASTER_FUNCS( ft_standard_raster,\n    FT_GLYPH_FORMAT_OUTLINE,\n    (FT_Raster_New_Func)     ft_black_new,\n    (FT_Raster_Reset_Func)   ft_black_reset,\n    (FT_Raster_Set_Mode_Func)ft_black_set_mode,\n    (FT_Raster_Render_Func)  ft_black_render,\n    (FT_Raster_Done_Func)    ft_black_done\n  )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/raster/ftraster.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftraster.h                                                             */\n/*                                                                         */\n/*    The FreeType glyph rasterizer (specification).                       */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used        */\n/*  modified and distributed under the terms of the FreeType project       */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTRASTER_H__\n#define __FTRASTER_H__\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_IMAGE_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Uncomment the following line if you are using ftraster.c as a         */\n  /* standalone module, fully independent of FreeType.                     */\n  /*                                                                       */\n/* #define _STANDALONE_ */\n\n  FT_EXPORT_VAR( const FT_Raster_Funcs )  ft_standard_raster;\n\n\nFT_END_HEADER\n\n#endif /* __FTRASTER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/raster/ftrend1.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftrend1.c                                                              */\n/*                                                                         */\n/*    The FreeType glyph rasterizer interface (body).                      */\n/*                                                                         */\n/*  Copyright 1996-2003, 2005, 2006, 2011, 2013 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_OUTLINE_H\n#include \"ftrend1.h\"\n#include \"ftraster.h\"\n#include \"rastpic.h\"\n\n#include \"rasterrs.h\"\n\n\n  /* initialize renderer -- init its raster */\n  static FT_Error\n  ft_raster1_init( FT_Renderer  render )\n  {\n    FT_Library  library = FT_MODULE_LIBRARY( render );\n\n\n    render->clazz->raster_class->raster_reset( render->raster,\n                                               library->raster_pool,\n                                               library->raster_pool_size );\n\n    return FT_Err_Ok;\n  }\n\n\n  /* set render-specific mode */\n  static FT_Error\n  ft_raster1_set_mode( FT_Renderer  render,\n                       FT_ULong     mode_tag,\n                       FT_Pointer   data )\n  {\n    /* we simply pass it to the raster */\n    return render->clazz->raster_class->raster_set_mode( render->raster,\n                                                         mode_tag,\n                                                         data );\n  }\n\n\n  /* transform a given glyph image */\n  static FT_Error\n  ft_raster1_transform( FT_Renderer       render,\n                        FT_GlyphSlot      slot,\n                        const FT_Matrix*  matrix,\n                        const FT_Vector*  delta )\n  {\n    FT_Error error = FT_Err_Ok;\n\n\n    if ( slot->format != render->glyph_format )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    if ( matrix )\n      FT_Outline_Transform( &slot->outline, matrix );\n\n    if ( delta )\n      FT_Outline_Translate( &slot->outline, delta->x, delta->y );\n\n  Exit:\n    return error;\n  }\n\n\n  /* return the glyph's control box */\n  static void\n  ft_raster1_get_cbox( FT_Renderer   render,\n                       FT_GlyphSlot  slot,\n                       FT_BBox*      cbox )\n  {\n    FT_MEM_ZERO( cbox, sizeof ( *cbox ) );\n\n    if ( slot->format == render->glyph_format )\n      FT_Outline_Get_CBox( &slot->outline, cbox );\n  }\n\n\n  /* convert a slot's glyph image into a bitmap */\n  static FT_Error\n  ft_raster1_render( FT_Renderer       render,\n                     FT_GlyphSlot      slot,\n                     FT_Render_Mode    mode,\n                     const FT_Vector*  origin )\n  {\n    FT_Error     error;\n    FT_Outline*  outline;\n    FT_BBox      cbox;\n    FT_UInt      width, height, pitch;\n    FT_Bitmap*   bitmap;\n    FT_Memory    memory;\n\n    FT_Raster_Params  params;\n\n\n    /* check glyph image format */\n    if ( slot->format != render->glyph_format )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* check rendering mode */\n#ifndef FT_CONFIG_OPTION_PIC\n    if ( mode != FT_RENDER_MODE_MONO )\n    {\n      /* raster1 is only capable of producing monochrome bitmaps */\n      if ( render->clazz == &ft_raster1_renderer_class )\n        return FT_THROW( Cannot_Render_Glyph );\n    }\n    else\n    {\n      /* raster5 is only capable of producing 5-gray-levels bitmaps */\n      if ( render->clazz == &ft_raster5_renderer_class )\n        return FT_THROW( Cannot_Render_Glyph );\n    }\n#else /* FT_CONFIG_OPTION_PIC */\n    /* When PIC is enabled, we cannot get to the class object      */\n    /* so instead we check the final character in the class name   */\n    /* (\"raster5\" or \"raster1\"). Yes this is a hack.               */\n    /* The \"correct\" thing to do is have different render function */\n    /* for each of the classes.                                    */\n    if ( mode != FT_RENDER_MODE_MONO )\n    {\n      /* raster1 is only capable of producing monochrome bitmaps */\n      if ( render->clazz->root.module_name[6] == '1' )\n        return FT_THROW( Cannot_Render_Glyph );\n    }\n    else\n    {\n      /* raster5 is only capable of producing 5-gray-levels bitmaps */\n      if ( render->clazz->root.module_name[6] == '5' )\n        return FT_THROW( Cannot_Render_Glyph );\n    }\n#endif /* FT_CONFIG_OPTION_PIC */\n\n    outline = &slot->outline;\n\n    /* translate the outline to the new origin if needed */\n    if ( origin )\n      FT_Outline_Translate( outline, origin->x, origin->y );\n\n    /* compute the control box, and grid fit it */\n    FT_Outline_Get_CBox( outline, &cbox );\n\n    /* undocumented but confirmed: bbox values get rounded */\n#if 1\n    cbox.xMin = FT_PIX_ROUND( cbox.xMin );\n    cbox.yMin = FT_PIX_ROUND( cbox.yMin );\n    cbox.xMax = FT_PIX_ROUND( cbox.xMax );\n    cbox.yMax = FT_PIX_ROUND( cbox.yMax );\n#else\n    cbox.xMin = FT_PIX_FLOOR( cbox.xMin );\n    cbox.yMin = FT_PIX_FLOOR( cbox.yMin );\n    cbox.xMax = FT_PIX_CEIL( cbox.xMax );\n    cbox.yMax = FT_PIX_CEIL( cbox.yMax );\n#endif\n\n    width  = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );\n    height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );\n\n    if ( width > FT_USHORT_MAX || height > FT_USHORT_MAX )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    bitmap = &slot->bitmap;\n    memory = render->root.memory;\n\n    /* release old bitmap buffer */\n    if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )\n    {\n      FT_FREE( bitmap->buffer );\n      slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;\n    }\n\n    /* allocate new one, depends on pixel format */\n    if ( !( mode & FT_RENDER_MODE_MONO ) )\n    {\n      /* we pad to 32 bits, only for backwards compatibility with FT 1.x */\n      pitch              = FT_PAD_CEIL( width, 4 );\n      bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;\n      bitmap->num_grays  = 256;\n    }\n    else\n    {\n      pitch              = ( ( width + 15 ) >> 4 ) << 1;\n      bitmap->pixel_mode = FT_PIXEL_MODE_MONO;\n    }\n\n    bitmap->width = width;\n    bitmap->rows  = height;\n    bitmap->pitch = pitch;\n\n    if ( FT_ALLOC_MULT( bitmap->buffer, pitch, height ) )\n      goto Exit;\n\n    slot->internal->flags |= FT_GLYPH_OWN_BITMAP;\n\n    /* translate outline to render it into the bitmap */\n    FT_Outline_Translate( outline, -cbox.xMin, -cbox.yMin );\n\n    /* set up parameters */\n    params.target = bitmap;\n    params.source = outline;\n    params.flags  = 0;\n\n    if ( bitmap->pixel_mode == FT_PIXEL_MODE_GRAY )\n      params.flags |= FT_RASTER_FLAG_AA;\n\n    /* render outline into the bitmap */\n    error = render->raster_render( render->raster, &params );\n\n    FT_Outline_Translate( outline, cbox.xMin, cbox.yMin );\n\n    if ( error )\n      goto Exit;\n\n    slot->format      = FT_GLYPH_FORMAT_BITMAP;\n    slot->bitmap_left = (FT_Int)( cbox.xMin >> 6 );\n    slot->bitmap_top  = (FT_Int)( cbox.yMax >> 6 );\n\n  Exit:\n    return error;\n  }\n\n\n  FT_DEFINE_RENDERER( ft_raster1_renderer_class,\n\n      FT_MODULE_RENDERER,\n      sizeof ( FT_RendererRec ),\n\n      \"raster1\",\n      0x10000L,\n      0x20000L,\n\n      0,    /* module specific interface */\n\n      (FT_Module_Constructor)ft_raster1_init,\n      (FT_Module_Destructor) 0,\n      (FT_Module_Requester)  0\n    ,\n\n    FT_GLYPH_FORMAT_OUTLINE,\n\n    (FT_Renderer_RenderFunc)   ft_raster1_render,\n    (FT_Renderer_TransformFunc)ft_raster1_transform,\n    (FT_Renderer_GetCBoxFunc)  ft_raster1_get_cbox,\n    (FT_Renderer_SetModeFunc)  ft_raster1_set_mode,\n\n    (FT_Raster_Funcs*)    &FT_STANDARD_RASTER_GET\n  )\n\n\n  /* This renderer is _NOT_ part of the default modules; you will need */\n  /* to register it by hand in your application.  It should only be    */\n  /* used for backwards-compatibility with FT 1.x anyway.              */\n  /*                                                                   */\n  FT_DEFINE_RENDERER( ft_raster5_renderer_class,\n\n      FT_MODULE_RENDERER,\n      sizeof ( FT_RendererRec ),\n\n      \"raster5\",\n      0x10000L,\n      0x20000L,\n\n      0,    /* module specific interface */\n\n      (FT_Module_Constructor)ft_raster1_init,\n      (FT_Module_Destructor) 0,\n      (FT_Module_Requester)  0\n    ,\n\n    FT_GLYPH_FORMAT_OUTLINE,\n\n    (FT_Renderer_RenderFunc)   ft_raster1_render,\n    (FT_Renderer_TransformFunc)ft_raster1_transform,\n    (FT_Renderer_GetCBoxFunc)  ft_raster1_get_cbox,\n    (FT_Renderer_SetModeFunc)  ft_raster1_set_mode,\n\n    (FT_Raster_Funcs*)    &FT_STANDARD_RASTER_GET\n  )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/raster/ftrend1.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftrend1.h                                                              */\n/*                                                                         */\n/*    The FreeType glyph rasterizer interface (specification).             */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTREND1_H__\n#define __FTREND1_H__\n\n\n#include <ft2build.h>\n#include FT_RENDER_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_DECLARE_RENDERER( ft_raster1_renderer_class )\n\n  /* this renderer is _NOT_ part of the default modules, you'll need */\n  /* to register it by hand in your application.  It should only be  */\n  /* used for backwards-compatibility with FT 1.x anyway.            */\n  /*                                                                 */\n  FT_DECLARE_RENDERER( ft_raster5_renderer_class )\n\n\nFT_END_HEADER\n\n#endif /* __FTREND1_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/raster/raster.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  raster.c                                                               */\n/*                                                                         */\n/*    FreeType monochrome rasterer module component (body only).           */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"rastpic.c\"\n#include \"ftraster.c\"\n#include \"ftrend1.c\"\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/raster/rasterrs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  rasterrs.h                                                             */\n/*                                                                         */\n/*    monochrome renderer error codes (specification only).                */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the monochrome renderer error enumeration */\n  /* constants.                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __RASTERRS_H__\n#define __RASTERRS_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  Raster_Err_\n#define FT_ERR_BASE    FT_Mod_Err_Raster\n\n#include FT_ERRORS_H\n\n#endif /* __RASTERRS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/raster/rastpic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  rastpic.c                                                              */\n/*                                                                         */\n/*    The FreeType position independent code services for raster module.   */\n/*                                                                         */\n/*  Copyright 2009, 2010, 2012, 2013 by                                    */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"rastpic.h\"\n#include \"rasterrs.h\"\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* forward declaration of PIC init functions from ftraster.c */\n  void\n  FT_Init_Class_ft_standard_raster( FT_Raster_Funcs*  funcs );\n\n\n  void\n  ft_raster1_renderer_class_pic_free( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Memory          memory        = library->memory;\n\n\n    if ( pic_container->raster )\n    {\n      RasterPIC*  container = (RasterPIC*)pic_container->raster;\n\n\n      if ( --container->ref_count )\n        return;\n      FT_FREE( container );\n      pic_container->raster = NULL;\n    }\n  }\n\n\n  FT_Error\n  ft_raster1_renderer_class_pic_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Error           error         = FT_Err_Ok;\n    RasterPIC*         container     = NULL;\n    FT_Memory          memory        = library->memory;\n\n\n    /* since this function also serves raster5 renderer, */\n    /* it implements reference counting                  */\n    if ( pic_container->raster )\n    {\n      ((RasterPIC*)pic_container->raster)->ref_count++;\n      return error;\n    }\n\n    /* allocate pointer, clear and set global container pointer */\n    if ( FT_ALLOC( container, sizeof ( *container ) ) )\n      return error;\n    FT_MEM_SET( container, 0, sizeof ( *container ) );\n    pic_container->raster = container;\n\n    container->ref_count = 1;\n\n    /* initialize pointer table -                       */\n    /* this is how the module usually expects this data */\n    FT_Init_Class_ft_standard_raster( &container->ft_standard_raster );\n\n    return error;\n  }\n\n\n  /* re-route these init and free functions to the above functions */\n  FT_Error\n  ft_raster5_renderer_class_pic_init( FT_Library  library )\n  {\n    return ft_raster1_renderer_class_pic_init( library );\n  }\n\n\n  void\n  ft_raster5_renderer_class_pic_free( FT_Library  library )\n  {\n    ft_raster1_renderer_class_pic_free( library );\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/raster/rastpic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  rastpic.h                                                              */\n/*                                                                         */\n/*    The FreeType position independent code services for raster module.   */\n/*                                                                         */\n/*  Copyright 2009 by                                                      */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __RASTPIC_H__\n#define __RASTPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#include FT_INTERNAL_PIC_H\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_STANDARD_RASTER_GET  ft_standard_raster\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n  typedef struct  RasterPIC_\n  {\n    int              ref_count;\n    FT_Raster_Funcs  ft_standard_raster;\n\n  } RasterPIC;\n\n\n#define GET_PIC( lib )                                    \\\n          ( (RasterPIC*)( (lib)->pic_container.raster ) )\n#define FT_STANDARD_RASTER_GET  ( GET_PIC( library )->ft_standard_raster )\n\n\n  /* see rastpic.c for the implementation */\n  void\n  ft_raster1_renderer_class_pic_free( FT_Library  library );\n\n  void\n  ft_raster5_renderer_class_pic_free( FT_Library  library );\n\n  FT_Error\n  ft_raster1_renderer_class_pic_init( FT_Library  library );\n\n  FT_Error\n  ft_raster5_renderer_class_pic_init( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __RASTPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/pngshim.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pngshim.c                                                              */\n/*                                                                         */\n/*    PNG Bitmap glyph support.                                            */\n/*                                                                         */\n/*  Copyright 2013, 2014 by Google, Inc.                                   */\n/*  Written by Stuart Gill and Behdad Esfahbod.                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n\n#ifdef FT_CONFIG_OPTION_USE_PNG\n\n  /* We always include <stjmp.h>, so make libpng shut up! */\n#define PNG_SKIP_SETJMP_CHECK 1\n#include <png.h>\n#include \"pngshim.h\"\n\n#include \"sferrors.h\"\n\n\n  /* This code is freely based on cairo-png.c.  There's so many ways */\n  /* to call libpng, and the way cairo does it is defacto standard.  */\n\n  static int\n  multiply_alpha( int  alpha,\n                  int  color )\n  {\n    int  temp = ( alpha * color ) + 0x80;\n\n\n    return ( temp + ( temp >> 8 ) ) >> 8;\n  }\n\n\n  /* Premultiplies data and converts RGBA bytes => native endian. */\n  static void\n  premultiply_data( png_structp    png,\n                    png_row_infop  row_info,\n                    png_bytep      data )\n  {\n    unsigned int  i;\n\n    FT_UNUSED( png );\n\n\n    for ( i = 0; i < row_info->rowbytes; i += 4 )\n    {\n      unsigned char*  base  = &data[i];\n      unsigned int    alpha = base[3];\n\n\n      if ( alpha == 0 )\n        base[0] = base[1] = base[2] = base[3] = 0;\n\n      else\n      {\n        unsigned int  red   = base[0];\n        unsigned int  green = base[1];\n        unsigned int  blue  = base[2];\n\n\n        if ( alpha != 0xFF )\n        {\n          red   = multiply_alpha( alpha, red   );\n          green = multiply_alpha( alpha, green );\n          blue  = multiply_alpha( alpha, blue  );\n        }\n\n        base[0] = blue;\n        base[1] = green;\n        base[2] = red;\n        base[3] = alpha;\n      }\n    }\n  }\n\n\n  /* Converts RGBx bytes to BGRA. */\n  static void\n  convert_bytes_to_data( png_structp    png,\n                         png_row_infop  row_info,\n                         png_bytep      data )\n  {\n    unsigned int  i;\n\n    FT_UNUSED( png );\n\n\n    for ( i = 0; i < row_info->rowbytes; i += 4 )\n    {\n      unsigned char*  base  = &data[i];\n      unsigned int    red   = base[0];\n      unsigned int    green = base[1];\n      unsigned int    blue  = base[2];\n\n\n      base[0] = blue;\n      base[1] = green;\n      base[2] = red;\n      base[3] = 0xFF;\n    }\n  }\n\n\n  /* Use error callback to avoid png writing to stderr. */\n  static void\n  error_callback( png_structp      png,\n                  png_const_charp  error_msg )\n  {\n    FT_Error*  error = (FT_Error*)png_get_error_ptr( png );\n\n    FT_UNUSED( error_msg );\n\n\n    *error = FT_THROW( Out_Of_Memory );\n#ifdef PNG_SETJMP_SUPPORTED\n    ft_longjmp( png_jmpbuf( png ), 1 );\n#endif\n    /* if we get here, then we have no choice but to abort ... */\n  }\n\n\n  /* Use warning callback to avoid png writing to stderr. */\n  static void\n  warning_callback( png_structp      png,\n                    png_const_charp  error_msg )\n  {\n    FT_UNUSED( png );\n    FT_UNUSED( error_msg );\n\n    /* Just ignore warnings. */\n  }\n\n\n  static void\n  read_data_from_FT_Stream( png_structp  png,\n                            png_bytep    data,\n                            png_size_t   length )\n  {\n    FT_Error   error;\n    png_voidp  p      = png_get_io_ptr( png );\n    FT_Stream  stream = (FT_Stream)p;\n\n\n    if ( FT_FRAME_ENTER( length ) )\n    {\n      FT_Error*  e = (FT_Error*)png_get_error_ptr( png );\n\n\n      *e = FT_THROW( Invalid_Stream_Read );\n      png_error( png, NULL );\n\n      return;\n    }\n\n    memcpy( data, stream->cursor, length );\n\n    FT_FRAME_EXIT();\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  Load_SBit_Png( FT_GlyphSlot     slot,\n                 FT_Int           x_offset,\n                 FT_Int           y_offset,\n                 FT_Int           pix_bits,\n                 TT_SBit_Metrics  metrics,\n                 FT_Memory        memory,\n                 FT_Byte*         data,\n                 FT_UInt          png_len,\n                 FT_Bool          populate_map_and_metrics )\n  {\n    FT_Bitmap    *map   = &slot->bitmap;\n    FT_Error      error = FT_Err_Ok;\n    FT_StreamRec  stream;\n\n    png_structp  png;\n    png_infop    info;\n    png_uint_32  imgWidth, imgHeight;\n\n    int         bitdepth, color_type, interlace;\n    FT_Int      i;\n    png_byte*  *rows = NULL; /* pacify compiler */\n\n\n    if ( x_offset < 0 ||\n         y_offset < 0 )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    if ( !populate_map_and_metrics                            &&\n         ( (FT_UInt)x_offset + metrics->width  > map->width ||\n           (FT_UInt)y_offset + metrics->height > map->rows  ||\n           pix_bits != 32                                   ||\n           map->pixel_mode != FT_PIXEL_MODE_BGRA            ) )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    FT_Stream_OpenMemory( &stream, data, png_len );\n\n    png = png_create_read_struct( PNG_LIBPNG_VER_STRING,\n                                  &error,\n                                  error_callback,\n                                  warning_callback );\n    if ( !png )\n    {\n      error = FT_THROW( Out_Of_Memory );\n      goto Exit;\n    }\n\n    info = png_create_info_struct( png );\n    if ( !info )\n    {\n      error = FT_THROW( Out_Of_Memory );\n      png_destroy_read_struct( &png, NULL, NULL );\n      goto Exit;\n    }\n\n    if ( ft_setjmp( png_jmpbuf( png ) ) )\n    {\n      error = FT_THROW( Invalid_File_Format );\n      goto DestroyExit;\n    }\n\n    png_set_read_fn( png, &stream, read_data_from_FT_Stream );\n\n    png_read_info( png, info );\n    png_get_IHDR( png, info,\n                  &imgWidth, &imgHeight,\n                  &bitdepth, &color_type, &interlace,\n                  NULL, NULL );\n\n    if ( error                                        ||\n         ( !populate_map_and_metrics                &&\n           ( (FT_Int)imgWidth  != metrics->width  ||\n             (FT_Int)imgHeight != metrics->height ) ) )\n      goto DestroyExit;\n\n    if ( populate_map_and_metrics )\n    {\n      FT_Long  size;\n\n\n      metrics->width  = (FT_Int)imgWidth;\n      metrics->height = (FT_Int)imgHeight;\n\n      map->width      = metrics->width;\n      map->rows       = metrics->height;\n      map->pixel_mode = FT_PIXEL_MODE_BGRA;\n      map->pitch      = map->width * 4;\n      map->num_grays  = 256;\n\n      /* reject too large bitmaps similarly to the rasterizer */\n      if ( map->rows > 0x7FFF || map->width > 0x7FFF )\n      {\n        error = FT_THROW( Array_Too_Large );\n        goto DestroyExit;\n      }\n\n      /* this doesn't overflow: 0x7FFF * 0x7FFF * 4 < 2^32 */\n      size = map->rows * map->pitch;\n\n      error = ft_glyphslot_alloc_bitmap( slot, size );\n      if ( error )\n        goto DestroyExit;\n    }\n\n    /* convert palette/gray image to rgb */\n    if ( color_type == PNG_COLOR_TYPE_PALETTE )\n      png_set_palette_to_rgb( png );\n\n    /* expand gray bit depth if needed */\n    if ( color_type == PNG_COLOR_TYPE_GRAY )\n    {\n#if PNG_LIBPNG_VER >= 10209\n      png_set_expand_gray_1_2_4_to_8( png );\n#else\n      png_set_gray_1_2_4_to_8( png );\n#endif\n    }\n\n    /* transform transparency to alpha */\n    if ( png_get_valid(png, info, PNG_INFO_tRNS ) )\n      png_set_tRNS_to_alpha( png );\n\n    if ( bitdepth == 16 )\n      png_set_strip_16( png );\n\n    if ( bitdepth < 8 )\n      png_set_packing( png );\n\n    /* convert grayscale to RGB */\n    if ( color_type == PNG_COLOR_TYPE_GRAY       ||\n         color_type == PNG_COLOR_TYPE_GRAY_ALPHA )\n      png_set_gray_to_rgb( png );\n\n    if ( interlace != PNG_INTERLACE_NONE )\n      png_set_interlace_handling( png );\n\n    png_set_filler( png, 0xFF, PNG_FILLER_AFTER );\n\n    /* recheck header after setting EXPAND options */\n    png_read_update_info(png, info );\n    png_get_IHDR( png, info,\n                  &imgWidth, &imgHeight,\n                  &bitdepth, &color_type, &interlace,\n                  NULL, NULL );\n\n    if ( bitdepth != 8                              ||\n        !( color_type == PNG_COLOR_TYPE_RGB       ||\n           color_type == PNG_COLOR_TYPE_RGB_ALPHA ) )\n    {\n      error = FT_THROW( Invalid_File_Format );\n      goto DestroyExit;\n    }\n\n    switch ( color_type )\n    {\n    default:\n      /* Shouldn't happen, but fall through. */\n\n    case PNG_COLOR_TYPE_RGB_ALPHA:\n      png_set_read_user_transform_fn( png, premultiply_data );\n      break;\n\n    case PNG_COLOR_TYPE_RGB:\n      /* Humm, this smells.  Carry on though. */\n      png_set_read_user_transform_fn( png, convert_bytes_to_data );\n      break;\n    }\n\n    if ( FT_NEW_ARRAY( rows, imgHeight ) )\n    {\n      error = FT_THROW( Out_Of_Memory );\n      goto DestroyExit;\n    }\n\n    for ( i = 0; i < (FT_Int)imgHeight; i++ )\n      rows[i] = map->buffer + ( y_offset + i ) * map->pitch + x_offset * 4;\n\n    png_read_image( png, rows );\n\n    FT_FREE( rows );\n\n    png_read_end( png, info );\n\n  DestroyExit:\n    png_destroy_read_struct( &png, &info, NULL );\n    FT_Stream_Close( &stream );\n\n  Exit:\n    return error;\n  }\n\n#endif /* FT_CONFIG_OPTION_USE_PNG */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/pngshim.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  pngshim.h                                                              */\n/*                                                                         */\n/*    PNG Bitmap glyph support.                                            */\n/*                                                                         */\n/*  Copyright 2013 by Google, Inc.                                         */\n/*  Written by Stuart Gill and Behdad Esfahbod.                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __PNGSHIM_H__\n#define __PNGSHIM_H__\n\n\n#include <ft2build.h>\n#include \"ttload.h\"\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_USE_PNG\n\n  FT_LOCAL( FT_Error )\n  Load_SBit_Png( FT_GlyphSlot     slot,\n                 FT_Int           x_offset,\n                 FT_Int           y_offset,\n                 FT_Int           pix_bits,\n                 TT_SBit_Metrics  metrics,\n                 FT_Memory        memory,\n                 FT_Byte*         data,\n                 FT_UInt          png_len,\n                 FT_Bool          populate_map_and_metrics );\n\n#endif\n\nFT_END_HEADER\n\n#endif /* __PNGSHIM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/sfdriver.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  sfdriver.c                                                             */\n/*                                                                         */\n/*    High-level SFNT driver interface (body).                             */\n/*                                                                         */\n/*  Copyright 1996-2007, 2009-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_SFNT_H\n#include FT_INTERNAL_OBJECTS_H\n\n#include \"sfdriver.h\"\n#include \"ttload.h\"\n#include \"sfobjs.h\"\n#include \"sfntpic.h\"\n\n#include \"sferrors.h\"\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n#include \"ttsbit.h\"\n#endif\n\n#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n#include \"ttpost.h\"\n#endif\n\n#ifdef TT_CONFIG_OPTION_BDF\n#include \"ttbdf.h\"\n#include FT_SERVICE_BDF_H\n#endif\n\n#include \"ttcmap.h\"\n#include \"ttkern.h\"\n#include \"ttmtx.h\"\n\n#include FT_SERVICE_GLYPH_DICT_H\n#include FT_SERVICE_POSTSCRIPT_NAME_H\n#include FT_SERVICE_SFNT_H\n#include FT_SERVICE_TT_CMAP_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_sfdriver\n\n\n  /*\n   *  SFNT TABLE SERVICE\n   *\n   */\n\n  static void*\n  get_sfnt_table( TT_Face      face,\n                  FT_Sfnt_Tag  tag )\n  {\n    void*  table;\n\n\n    switch ( tag )\n    {\n    case FT_SFNT_HEAD:\n      table = &face->header;\n      break;\n\n    case FT_SFNT_HHEA:\n      table = &face->horizontal;\n      break;\n\n    case FT_SFNT_VHEA:\n      table = face->vertical_info ? &face->vertical : NULL;\n      break;\n\n    case FT_SFNT_OS2:\n      table = face->os2.version == 0xFFFFU ? NULL : &face->os2;\n      break;\n\n    case FT_SFNT_POST:\n      table = &face->postscript;\n      break;\n\n    case FT_SFNT_MAXP:\n      table = &face->max_profile;\n      break;\n\n    case FT_SFNT_PCLT:\n      table = face->pclt.Version ? &face->pclt : NULL;\n      break;\n\n    default:\n      table = NULL;\n    }\n\n    return table;\n  }\n\n\n  static FT_Error\n  sfnt_table_info( TT_Face    face,\n                   FT_UInt    idx,\n                   FT_ULong  *tag,\n                   FT_ULong  *offset,\n                   FT_ULong  *length )\n  {\n    if ( !offset || !length )\n      return FT_THROW( Invalid_Argument );\n\n    if ( !tag )\n      *length = face->num_tables;\n    else\n    {\n      if ( idx >= face->num_tables )\n        return FT_THROW( Table_Missing );\n\n      *tag    = face->dir_tables[idx].Tag;\n      *offset = face->dir_tables[idx].Offset;\n      *length = face->dir_tables[idx].Length;\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_SERVICE_SFNT_TABLEREC(\n    sfnt_service_sfnt_table,\n    (FT_SFNT_TableLoadFunc)tt_face_load_any,\n    (FT_SFNT_TableGetFunc) get_sfnt_table,\n    (FT_SFNT_TableInfoFunc)sfnt_table_info )\n\n\n#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n  /*\n   *  GLYPH DICT SERVICE\n   *\n   */\n\n  static FT_Error\n  sfnt_get_glyph_name( TT_Face     face,\n                       FT_UInt     glyph_index,\n                       FT_Pointer  buffer,\n                       FT_UInt     buffer_max )\n  {\n    FT_String*  gname;\n    FT_Error    error;\n\n\n    error = tt_face_get_ps_name( face, glyph_index, &gname );\n    if ( !error )\n      FT_STRCPYN( buffer, gname, buffer_max );\n\n    return error;\n  }\n\n\n  static FT_UInt\n  sfnt_get_name_index( TT_Face     face,\n                       FT_String*  glyph_name )\n  {\n    FT_Face  root = &face->root;\n\n    FT_UInt  i, max_gid = FT_UINT_MAX;\n\n\n    if ( root->num_glyphs < 0 )\n      return 0;\n    else if ( (FT_ULong)root->num_glyphs < FT_UINT_MAX )\n      max_gid = (FT_UInt)root->num_glyphs;\n    else\n      FT_TRACE0(( \"Ignore glyph names for invalid GID 0x%08x - 0x%08x\\n\",\n                  FT_UINT_MAX, root->num_glyphs ));\n\n    for ( i = 0; i < max_gid; i++ )\n    {\n      FT_String*  gname;\n      FT_Error    error = tt_face_get_ps_name( face, i, &gname );\n\n\n      if ( error )\n        continue;\n\n      if ( !ft_strcmp( glyph_name, gname ) )\n        return i;\n    }\n\n    return 0;\n  }\n\n\n  FT_DEFINE_SERVICE_GLYPHDICTREC(\n    sfnt_service_glyph_dict,\n    (FT_GlyphDict_GetNameFunc)  sfnt_get_glyph_name,\n    (FT_GlyphDict_NameIndexFunc)sfnt_get_name_index )\n\n\n#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */\n\n\n  /*\n   *  POSTSCRIPT NAME SERVICE\n   *\n   */\n\n  static const char*\n  sfnt_get_ps_name( TT_Face  face )\n  {\n    FT_Int       n, found_win, found_apple;\n    const char*  result = NULL;\n\n\n    /* shouldn't happen, but just in case to avoid memory leaks */\n    if ( face->postscript_name )\n      return face->postscript_name;\n\n    /* scan the name table to see whether we have a Postscript name here, */\n    /* either in Macintosh or Windows platform encodings                  */\n    found_win   = -1;\n    found_apple = -1;\n\n    for ( n = 0; n < face->num_names; n++ )\n    {\n      TT_NameEntryRec*  name = face->name_table.names + n;\n\n\n      if ( name->nameID == 6 && name->stringLength > 0 )\n      {\n        if ( name->platformID == 3     &&\n             name->encodingID == 1     &&\n             name->languageID == 0x409 )\n          found_win = n;\n\n        if ( name->platformID == 1 &&\n             name->encodingID == 0 &&\n             name->languageID == 0 )\n          found_apple = n;\n      }\n    }\n\n    if ( found_win != -1 )\n    {\n      FT_Memory         memory = face->root.memory;\n      TT_NameEntryRec*  name   = face->name_table.names + found_win;\n      FT_UInt           len    = name->stringLength / 2;\n      FT_Error          error  = FT_Err_Ok;\n\n      FT_UNUSED( error );\n\n\n      if ( !FT_ALLOC( result, name->stringLength + 1 ) )\n      {\n        FT_Stream   stream = face->name_table.stream;\n        FT_String*  r      = (FT_String*)result;\n        FT_Byte*    p;\n\n\n        if ( FT_STREAM_SEEK( name->stringOffset ) ||\n             FT_FRAME_ENTER( name->stringLength ) )\n        {\n          FT_FREE( result );\n          name->stringLength = 0;\n          name->stringOffset = 0;\n          FT_FREE( name->string );\n\n          goto Exit;\n        }\n\n        p = (FT_Byte*)stream->cursor;\n\n        for ( ; len > 0; len--, p += 2 )\n        {\n          if ( p[0] == 0 && p[1] >= 32 && p[1] < 128 )\n            *r++ = p[1];\n        }\n        *r = '\\0';\n\n        FT_FRAME_EXIT();\n      }\n      goto Exit;\n    }\n\n    if ( found_apple != -1 )\n    {\n      FT_Memory         memory = face->root.memory;\n      TT_NameEntryRec*  name   = face->name_table.names + found_apple;\n      FT_UInt           len    = name->stringLength;\n      FT_Error          error  = FT_Err_Ok;\n\n      FT_UNUSED( error );\n\n\n      if ( !FT_ALLOC( result, len + 1 ) )\n      {\n        FT_Stream  stream = face->name_table.stream;\n\n\n        if ( FT_STREAM_SEEK( name->stringOffset ) ||\n             FT_STREAM_READ( result, len )        )\n        {\n          name->stringOffset = 0;\n          name->stringLength = 0;\n          FT_FREE( name->string );\n          FT_FREE( result );\n          goto Exit;\n        }\n        ((char*)result)[len] = '\\0';\n      }\n    }\n\n  Exit:\n    face->postscript_name = result;\n    return result;\n  }\n\n\n  FT_DEFINE_SERVICE_PSFONTNAMEREC(\n    sfnt_service_ps_name,\n    (FT_PsName_GetFunc)sfnt_get_ps_name )\n\n\n  /*\n   *  TT CMAP INFO\n   */\n  FT_DEFINE_SERVICE_TTCMAPSREC(\n    tt_service_get_cmap_info,\n    (TT_CMap_Info_GetFunc)tt_get_cmap_info )\n\n\n#ifdef TT_CONFIG_OPTION_BDF\n\n  static FT_Error\n  sfnt_get_charset_id( TT_Face       face,\n                       const char*  *acharset_encoding,\n                       const char*  *acharset_registry )\n  {\n    BDF_PropertyRec  encoding, registry;\n    FT_Error         error;\n\n\n    /* XXX: I don't know whether this is correct, since\n     *      tt_face_find_bdf_prop only returns something correct if we have\n     *      previously selected a size that is listed in the BDF table.\n     *      Should we change the BDF table format to include single offsets\n     *      for `CHARSET_REGISTRY' and `CHARSET_ENCODING'?\n     */\n    error = tt_face_find_bdf_prop( face, \"CHARSET_REGISTRY\", &registry );\n    if ( !error )\n    {\n      error = tt_face_find_bdf_prop( face, \"CHARSET_ENCODING\", &encoding );\n      if ( !error )\n      {\n        if ( registry.type == BDF_PROPERTY_TYPE_ATOM &&\n             encoding.type == BDF_PROPERTY_TYPE_ATOM )\n        {\n          *acharset_encoding = encoding.u.atom;\n          *acharset_registry = registry.u.atom;\n        }\n        else\n          error = FT_THROW( Invalid_Argument );\n      }\n    }\n\n    return error;\n  }\n\n\n  FT_DEFINE_SERVICE_BDFRec(\n    sfnt_service_bdf,\n    (FT_BDF_GetCharsetIdFunc)sfnt_get_charset_id,\n    (FT_BDF_GetPropertyFunc) tt_face_find_bdf_prop )\n\n\n#endif /* TT_CONFIG_OPTION_BDF */\n\n\n  /*\n   *  SERVICE LIST\n   */\n\n#if defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES && defined TT_CONFIG_OPTION_BDF\n  FT_DEFINE_SERVICEDESCREC5(\n    sfnt_services,\n    FT_SERVICE_ID_SFNT_TABLE,           &SFNT_SERVICE_SFNT_TABLE_GET,\n    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,\n    FT_SERVICE_ID_GLYPH_DICT,           &SFNT_SERVICE_GLYPH_DICT_GET,\n    FT_SERVICE_ID_BDF,                  &SFNT_SERVICE_BDF_GET,\n    FT_SERVICE_ID_TT_CMAP,              &TT_SERVICE_CMAP_INFO_GET )\n#elif defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n  FT_DEFINE_SERVICEDESCREC4(\n    sfnt_services,\n    FT_SERVICE_ID_SFNT_TABLE,           &SFNT_SERVICE_SFNT_TABLE_GET,\n    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,\n    FT_SERVICE_ID_GLYPH_DICT,           &SFNT_SERVICE_GLYPH_DICT_GET,\n    FT_SERVICE_ID_TT_CMAP,              &TT_SERVICE_CMAP_INFO_GET )\n#elif defined TT_CONFIG_OPTION_BDF\n  FT_DEFINE_SERVICEDESCREC4(\n    sfnt_services,\n    FT_SERVICE_ID_SFNT_TABLE,           &SFNT_SERVICE_SFNT_TABLE_GET,\n    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,\n    FT_SERVICE_ID_BDF,                  &SFNT_SERVICE_BDF_GET,\n    FT_SERVICE_ID_TT_CMAP,              &TT_SERVICE_CMAP_INFO_GET )\n#else\n  FT_DEFINE_SERVICEDESCREC3(\n    sfnt_services,\n    FT_SERVICE_ID_SFNT_TABLE,           &SFNT_SERVICE_SFNT_TABLE_GET,\n    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,\n    FT_SERVICE_ID_TT_CMAP,              &TT_SERVICE_CMAP_INFO_GET )\n#endif\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  sfnt_get_interface( FT_Module    module,\n                      const char*  module_interface )\n  {\n    /* SFNT_SERVICES_GET dereferences `library' in PIC mode */\n#ifdef FT_CONFIG_OPTION_PIC\n    FT_Library  library;\n\n\n    if ( !module )\n      return NULL;\n    library = module->library;\n    if ( !library )\n      return NULL;\n#else\n    FT_UNUSED( module );\n#endif\n\n    return ft_service_list_lookup( SFNT_SERVICES_GET, module_interface );\n  }\n\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n#define PUT_EMBEDDED_BITMAPS( a )  a\n#else\n#define PUT_EMBEDDED_BITMAPS( a )  NULL\n#endif\n\n#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n#define PUT_PS_NAMES( a )  a\n#else\n#define PUT_PS_NAMES( a )  NULL\n#endif\n\n  FT_DEFINE_SFNT_INTERFACE(\n    sfnt_interface,\n    tt_face_goto_table,\n\n    sfnt_init_face,\n    sfnt_load_face,\n    sfnt_done_face,\n    sfnt_get_interface,\n\n    tt_face_load_any,\n\n    tt_face_load_head,\n    tt_face_load_hhea,\n    tt_face_load_cmap,\n    tt_face_load_maxp,\n    tt_face_load_os2,\n    tt_face_load_post,\n\n    tt_face_load_name,\n    tt_face_free_name,\n\n    tt_face_load_kern,\n    tt_face_load_gasp,\n    tt_face_load_pclt,\n\n    /* see `ttload.h' */\n    PUT_EMBEDDED_BITMAPS( tt_face_load_bhed ),\n\n    PUT_EMBEDDED_BITMAPS( tt_face_load_sbit_image ),\n\n    /* see `ttpost.h' */\n    PUT_PS_NAMES( tt_face_get_ps_name   ),\n    PUT_PS_NAMES( tt_face_free_ps_names ),\n\n    /* since version 2.1.8 */\n    tt_face_get_kerning,\n\n    /* since version 2.2 */\n    tt_face_load_font_dir,\n    tt_face_load_hmtx,\n\n    /* see `ttsbit.h' and `sfnt.h' */\n    PUT_EMBEDDED_BITMAPS( tt_face_load_sbit ),\n    PUT_EMBEDDED_BITMAPS( tt_face_free_sbit ),\n\n    PUT_EMBEDDED_BITMAPS( tt_face_set_sbit_strike     ),\n    PUT_EMBEDDED_BITMAPS( tt_face_load_strike_metrics ),\n\n    tt_face_get_metrics\n  )\n\n\n  FT_DEFINE_MODULE(\n    sfnt_module_class,\n\n    0,  /* not a font driver or renderer */\n    sizeof ( FT_ModuleRec ),\n\n    \"sfnt\",     /* driver name                            */\n    0x10000L,   /* driver version 1.0                     */\n    0x20000L,   /* driver requires FreeType 2.0 or higher */\n\n    (const void*)&SFNT_INTERFACE_GET,  /* module specific interface */\n\n    (FT_Module_Constructor)0,\n    (FT_Module_Destructor) 0,\n    (FT_Module_Requester)  sfnt_get_interface )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/sfdriver.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  sfdriver.h                                                             */\n/*                                                                         */\n/*    High-level SFNT driver interface (specification).                    */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SFDRIVER_H__\n#define __SFDRIVER_H__\n\n\n#include <ft2build.h>\n#include FT_MODULE_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_DECLARE_MODULE( sfnt_module_class )\n\n\nFT_END_HEADER\n\n#endif /* __SFDRIVER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/sferrors.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  sferrors.h                                                             */\n/*                                                                         */\n/*    SFNT error codes (specification only).                               */\n/*                                                                         */\n/*  Copyright 2001, 2004, 2012, 2013 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the SFNT error enumeration constants.     */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __SFERRORS_H__\n#define __SFERRORS_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  SFNT_Err_\n#define FT_ERR_BASE    FT_Mod_Err_SFNT\n\n#include FT_ERRORS_H\n\n#endif /* __SFERRORS_H__ */\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/sfnt.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  sfnt.c                                                                 */\n/*                                                                         */\n/*    Single object library component.                                     */\n/*                                                                         */\n/*  Copyright 1996-2006, 2013 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"sfntpic.c\"\n#include \"ttload.c\"\n#include \"ttmtx.c\"\n#include \"ttcmap.c\"\n#include \"ttkern.c\"\n#include \"sfobjs.c\"\n#include \"sfdriver.c\"\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n#include \"pngshim.c\"\n#include \"ttsbit.c\"\n#endif\n\n#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n#include \"ttpost.c\"\n#endif\n\n#ifdef TT_CONFIG_OPTION_BDF\n#include \"ttbdf.c\"\n#endif\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/sfntpic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  sfntpic.c                                                              */\n/*                                                                         */\n/*    The FreeType position independent code services for sfnt module.     */\n/*                                                                         */\n/*  Copyright 2009, 2010, 2012, 2013 by                                    */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"sfntpic.h\"\n#include \"sferrors.h\"\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* forward declaration of PIC init functions from sfdriver.c */\n  FT_Error\n  FT_Create_Class_sfnt_services( FT_Library           library,\n                                 FT_ServiceDescRec**  output_class );\n  void\n  FT_Destroy_Class_sfnt_services( FT_Library          library,\n                                  FT_ServiceDescRec*  clazz );\n  void\n  FT_Init_Class_sfnt_service_bdf( FT_Service_BDFRec*  clazz );\n  void\n  FT_Init_Class_sfnt_interface( FT_Library       library,\n                                SFNT_Interface*  clazz );\n  void\n  FT_Init_Class_sfnt_service_glyph_dict(\n    FT_Library                library,\n    FT_Service_GlyphDictRec*  clazz );\n  void\n  FT_Init_Class_sfnt_service_ps_name(\n    FT_Library                 library,\n    FT_Service_PsFontNameRec*  clazz );\n  void\n  FT_Init_Class_tt_service_get_cmap_info(\n    FT_Library              library,\n    FT_Service_TTCMapsRec*  clazz );\n  void\n  FT_Init_Class_sfnt_service_sfnt_table(\n    FT_Service_SFNT_TableRec*  clazz );\n\n\n  /* forward declaration of PIC init functions from ttcmap.c */\n  FT_Error\n  FT_Create_Class_tt_cmap_classes( FT_Library       library,\n                                   TT_CMap_Class**  output_class );\n  void\n  FT_Destroy_Class_tt_cmap_classes( FT_Library      library,\n                                    TT_CMap_Class*  clazz );\n\n\n  void\n  sfnt_module_class_pic_free( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Memory          memory        = library->memory;\n\n\n    if ( pic_container->sfnt )\n    {\n      sfntModulePIC*  container = (sfntModulePIC*)pic_container->sfnt;\n\n\n      if ( container->sfnt_services )\n        FT_Destroy_Class_sfnt_services( library,\n                                        container->sfnt_services );\n      container->sfnt_services = NULL;\n\n      if ( container->tt_cmap_classes )\n        FT_Destroy_Class_tt_cmap_classes( library,\n                                          container->tt_cmap_classes );\n      container->tt_cmap_classes = NULL;\n\n      FT_FREE( container );\n      pic_container->sfnt = NULL;\n    }\n  }\n\n\n  FT_Error\n  sfnt_module_class_pic_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Error           error         = FT_Err_Ok;\n    sfntModulePIC*     container     = NULL;\n    FT_Memory          memory        = library->memory;\n\n\n    /* allocate pointer, clear and set global container pointer */\n    if ( FT_ALLOC( container, sizeof ( *container ) ) )\n      return error;\n    FT_MEM_SET( container, 0, sizeof ( *container ) );\n    pic_container->sfnt = container;\n\n    /* initialize pointer table -                       */\n    /* this is how the module usually expects this data */\n    error = FT_Create_Class_sfnt_services( library,\n                                           &container->sfnt_services );\n    if ( error )\n      goto Exit;\n\n    error = FT_Create_Class_tt_cmap_classes( library,\n                                             &container->tt_cmap_classes );\n    if ( error )\n      goto Exit;\n\n    FT_Init_Class_sfnt_service_glyph_dict(\n      library, &container->sfnt_service_glyph_dict );\n    FT_Init_Class_sfnt_service_ps_name(\n      library, &container->sfnt_service_ps_name );\n    FT_Init_Class_tt_service_get_cmap_info(\n      library, &container->tt_service_get_cmap_info );\n    FT_Init_Class_sfnt_service_sfnt_table(\n      &container->sfnt_service_sfnt_table );\n#ifdef TT_CONFIG_OPTION_BDF\n    FT_Init_Class_sfnt_service_bdf( &container->sfnt_service_bdf );\n#endif\n    FT_Init_Class_sfnt_interface( library, &container->sfnt_interface );\n\n  Exit:\n    if ( error )\n      sfnt_module_class_pic_free( library );\n    return error;\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/sfntpic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  sfntpic.h                                                              */\n/*                                                                         */\n/*    The FreeType position independent code services for sfnt module.     */\n/*                                                                         */\n/*  Copyright 2009, 2012 by                                                */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SFNTPIC_H__\n#define __SFNTPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#include FT_INTERNAL_PIC_H\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define SFNT_SERVICES_GET            sfnt_services\n#define SFNT_SERVICE_GLYPH_DICT_GET  sfnt_service_glyph_dict\n#define SFNT_SERVICE_PS_NAME_GET     sfnt_service_ps_name\n#define TT_SERVICE_CMAP_INFO_GET     tt_service_get_cmap_info\n#define SFNT_SERVICES_GET            sfnt_services\n#define TT_CMAP_CLASSES_GET          tt_cmap_classes\n#define SFNT_SERVICE_SFNT_TABLE_GET  sfnt_service_sfnt_table\n#define SFNT_SERVICE_BDF_GET         sfnt_service_bdf\n#define SFNT_INTERFACE_GET           sfnt_interface\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n  /* some include files required for members of sfntModulePIC */\n#include FT_SERVICE_GLYPH_DICT_H\n#include FT_SERVICE_POSTSCRIPT_NAME_H\n#include FT_SERVICE_SFNT_H\n#include FT_SERVICE_TT_CMAP_H\n\n#ifdef TT_CONFIG_OPTION_BDF\n#include \"ttbdf.h\"\n#include FT_SERVICE_BDF_H\n#endif\n\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_SFNT_H\n#include \"ttcmap.h\"\n\n\n  typedef struct  sfntModulePIC_\n  {\n    FT_ServiceDescRec*        sfnt_services;\n    FT_Service_GlyphDictRec   sfnt_service_glyph_dict;\n    FT_Service_PsFontNameRec  sfnt_service_ps_name;\n    FT_Service_TTCMapsRec     tt_service_get_cmap_info;\n    TT_CMap_Class*            tt_cmap_classes;\n    FT_Service_SFNT_TableRec  sfnt_service_sfnt_table;\n#ifdef TT_CONFIG_OPTION_BDF\n    FT_Service_BDFRec         sfnt_service_bdf;\n#endif\n    SFNT_Interface            sfnt_interface;\n\n  } sfntModulePIC;\n\n\n#define GET_PIC( lib )                                      \\\n          ( (sfntModulePIC*)( (lib)->pic_container.sfnt ) )\n\n#define SFNT_SERVICES_GET                       \\\n          ( GET_PIC( library )->sfnt_services )\n#define SFNT_SERVICE_GLYPH_DICT_GET                       \\\n          ( GET_PIC( library )->sfnt_service_glyph_dict )\n#define SFNT_SERVICE_PS_NAME_GET                       \\\n          ( GET_PIC( library )->sfnt_service_ps_name )\n#define TT_SERVICE_CMAP_INFO_GET                           \\\n          ( GET_PIC( library )->tt_service_get_cmap_info )\n#define SFNT_SERVICES_GET                       \\\n          ( GET_PIC( library )->sfnt_services )\n#define TT_CMAP_CLASSES_GET                       \\\n          ( GET_PIC( library )->tt_cmap_classes )\n#define SFNT_SERVICE_SFNT_TABLE_GET                       \\\n          ( GET_PIC( library )->sfnt_service_sfnt_table )\n#define SFNT_SERVICE_BDF_GET                       \\\n          ( GET_PIC( library )->sfnt_service_bdf )\n#define SFNT_INTERFACE_GET                       \\\n          ( GET_PIC( library )->sfnt_interface )\n\n\n  /* see sfntpic.c for the implementation */\n  void\n  sfnt_module_class_pic_free( FT_Library  library );\n\n  FT_Error\n  sfnt_module_class_pic_init( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __SFNTPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/sfobjs.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  sfobjs.c                                                               */\n/*                                                                         */\n/*    SFNT object management (base).                                       */\n/*                                                                         */\n/*  Copyright 1996-2008, 2010-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include \"sfobjs.h\"\n#include \"ttload.h\"\n#include \"ttcmap.h\"\n#include \"ttkern.h\"\n#include FT_INTERNAL_SFNT_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_TRUETYPE_IDS_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n#include FT_SFNT_NAMES_H\n#include FT_GZIP_H\n#include \"sferrors.h\"\n\n#ifdef TT_CONFIG_OPTION_BDF\n#include \"ttbdf.h\"\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_sfobjs\n\n\n\n  /* convert a UTF-16 name entry to ASCII */\n  static FT_String*\n  tt_name_entry_ascii_from_utf16( TT_NameEntry  entry,\n                                  FT_Memory     memory )\n  {\n    FT_String*  string = NULL;\n    FT_UInt     len, code, n;\n    FT_Byte*    read   = (FT_Byte*)entry->string;\n    FT_Error    error;\n\n\n    len = (FT_UInt)entry->stringLength / 2;\n\n    if ( FT_NEW_ARRAY( string, len + 1 ) )\n      return NULL;\n\n    for ( n = 0; n < len; n++ )\n    {\n      code = FT_NEXT_USHORT( read );\n\n      if ( code == 0 )\n        break;\n\n      if ( code < 32 || code > 127 )\n        code = '?';\n\n      string[n] = (char)code;\n    }\n\n    string[n] = 0;\n\n    return string;\n  }\n\n\n  /* convert an Apple Roman or symbol name entry to ASCII */\n  static FT_String*\n  tt_name_entry_ascii_from_other( TT_NameEntry  entry,\n                                  FT_Memory     memory )\n  {\n    FT_String*  string = NULL;\n    FT_UInt     len, code, n;\n    FT_Byte*    read   = (FT_Byte*)entry->string;\n    FT_Error    error;\n\n\n    len = (FT_UInt)entry->stringLength;\n\n    if ( FT_NEW_ARRAY( string, len + 1 ) )\n      return NULL;\n\n    for ( n = 0; n < len; n++ )\n    {\n      code = *read++;\n\n      if ( code == 0 )\n        break;\n\n      if ( code < 32 || code > 127 )\n        code = '?';\n\n      string[n] = (char)code;\n    }\n\n    string[n] = 0;\n\n    return string;\n  }\n\n\n  typedef FT_String*  (*TT_NameEntry_ConvertFunc)( TT_NameEntry  entry,\n                                                   FT_Memory     memory );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_get_name                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Returns a given ENGLISH name record in ASCII.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the source face object.                      */\n  /*                                                                       */\n  /*    nameid :: The name id of the name record to return.                */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    name   :: The address of a string pointer.  NULL if no name is     */\n  /*              present.                                                 */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  static FT_Error\n  tt_face_get_name( TT_Face      face,\n                    FT_UShort    nameid,\n                    FT_String**  name )\n  {\n    FT_Memory         memory = face->root.memory;\n    FT_Error          error  = FT_Err_Ok;\n    FT_String*        result = NULL;\n    FT_UShort         n;\n    TT_NameEntryRec*  rec;\n    FT_Int            found_apple         = -1;\n    FT_Int            found_apple_roman   = -1;\n    FT_Int            found_apple_english = -1;\n    FT_Int            found_win           = -1;\n    FT_Int            found_unicode       = -1;\n\n    FT_Bool           is_english = 0;\n\n    TT_NameEntry_ConvertFunc  convert;\n\n\n    FT_ASSERT( name );\n\n    rec = face->name_table.names;\n    for ( n = 0; n < face->num_names; n++, rec++ )\n    {\n      /* According to the OpenType 1.3 specification, only Microsoft or  */\n      /* Apple platform IDs might be used in the `name' table.  The      */\n      /* `Unicode' platform is reserved for the `cmap' table, and the    */\n      /* `ISO' one is deprecated.                                        */\n      /*                                                                 */\n      /* However, the Apple TrueType specification doesn't say the same  */\n      /* thing and goes to suggest that all Unicode `name' table entries */\n      /* should be coded in UTF-16 (in big-endian format I suppose).     */\n      /*                                                                 */\n      if ( rec->nameID == nameid && rec->stringLength > 0 )\n      {\n        switch ( rec->platformID )\n        {\n        case TT_PLATFORM_APPLE_UNICODE:\n        case TT_PLATFORM_ISO:\n          /* there is `languageID' to check there.  We should use this */\n          /* field only as a last solution when nothing else is        */\n          /* available.                                                */\n          /*                                                           */\n          found_unicode = n;\n          break;\n\n        case TT_PLATFORM_MACINTOSH:\n          /* This is a bit special because some fonts will use either    */\n          /* an English language id, or a Roman encoding id, to indicate */\n          /* the English version of its font name.                       */\n          /*                                                             */\n          if ( rec->languageID == TT_MAC_LANGID_ENGLISH )\n            found_apple_english = n;\n          else if ( rec->encodingID == TT_MAC_ID_ROMAN )\n            found_apple_roman = n;\n          break;\n\n        case TT_PLATFORM_MICROSOFT:\n          /* we only take a non-English name when there is nothing */\n          /* else available in the font                            */\n          /*                                                       */\n          if ( found_win == -1 || ( rec->languageID & 0x3FF ) == 0x009 )\n          {\n            switch ( rec->encodingID )\n            {\n            case TT_MS_ID_SYMBOL_CS:\n            case TT_MS_ID_UNICODE_CS:\n            case TT_MS_ID_UCS_4:\n              is_english = FT_BOOL( ( rec->languageID & 0x3FF ) == 0x009 );\n              found_win  = n;\n              break;\n\n            default:\n              ;\n            }\n          }\n          break;\n\n        default:\n          ;\n        }\n      }\n    }\n\n    found_apple = found_apple_roman;\n    if ( found_apple_english >= 0 )\n      found_apple = found_apple_english;\n\n    /* some fonts contain invalid Unicode or Macintosh formatted entries; */\n    /* we will thus favor names encoded in Windows formats if available   */\n    /* (provided it is an English name)                                   */\n    /*                                                                    */\n    convert = NULL;\n    if ( found_win >= 0 && !( found_apple >= 0 && !is_english ) )\n    {\n      rec = face->name_table.names + found_win;\n      switch ( rec->encodingID )\n      {\n        /* all Unicode strings are encoded using UTF-16BE */\n      case TT_MS_ID_UNICODE_CS:\n      case TT_MS_ID_SYMBOL_CS:\n        convert = tt_name_entry_ascii_from_utf16;\n        break;\n\n      case TT_MS_ID_UCS_4:\n        /* Apparently, if this value is found in a name table entry, it is */\n        /* documented as `full Unicode repertoire'.  Experience with the   */\n        /* MsGothic font shipped with Windows Vista shows that this really */\n        /* means UTF-16 encoded names (UCS-4 values are only used within   */\n        /* charmaps).                                                      */\n        convert = tt_name_entry_ascii_from_utf16;\n        break;\n\n      default:\n        ;\n      }\n    }\n    else if ( found_apple >= 0 )\n    {\n      rec     = face->name_table.names + found_apple;\n      convert = tt_name_entry_ascii_from_other;\n    }\n    else if ( found_unicode >= 0 )\n    {\n      rec     = face->name_table.names + found_unicode;\n      convert = tt_name_entry_ascii_from_utf16;\n    }\n\n    if ( rec && convert )\n    {\n      if ( rec->string == NULL )\n      {\n        FT_Stream  stream = face->name_table.stream;\n\n\n        if ( FT_QNEW_ARRAY ( rec->string, rec->stringLength ) ||\n             FT_STREAM_SEEK( rec->stringOffset )              ||\n             FT_STREAM_READ( rec->string, rec->stringLength ) )\n        {\n          FT_FREE( rec->string );\n          rec->stringLength = 0;\n          result            = NULL;\n          goto Exit;\n        }\n      }\n\n      result = convert( rec, memory );\n    }\n\n  Exit:\n    *name = result;\n    return error;\n  }\n\n\n  static FT_Encoding\n  sfnt_find_encoding( int  platform_id,\n                      int  encoding_id )\n  {\n    typedef struct  TEncoding_\n    {\n      int          platform_id;\n      int          encoding_id;\n      FT_Encoding  encoding;\n\n    } TEncoding;\n\n    static\n    const TEncoding  tt_encodings[] =\n    {\n      { TT_PLATFORM_ISO,           -1,                  FT_ENCODING_UNICODE },\n\n      { TT_PLATFORM_APPLE_UNICODE, -1,                  FT_ENCODING_UNICODE },\n\n      { TT_PLATFORM_MACINTOSH,     TT_MAC_ID_ROMAN,     FT_ENCODING_APPLE_ROMAN },\n\n      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_SYMBOL_CS,  FT_ENCODING_MS_SYMBOL },\n      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_UCS_4,      FT_ENCODING_UNICODE },\n      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE },\n      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_SJIS,       FT_ENCODING_SJIS },\n      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_GB2312,     FT_ENCODING_GB2312 },\n      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_BIG_5,      FT_ENCODING_BIG5 },\n      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_WANSUNG,    FT_ENCODING_WANSUNG },\n      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_JOHAB,      FT_ENCODING_JOHAB }\n    };\n\n    const TEncoding  *cur, *limit;\n\n\n    cur   = tt_encodings;\n    limit = cur + sizeof ( tt_encodings ) / sizeof ( tt_encodings[0] );\n\n    for ( ; cur < limit; cur++ )\n    {\n      if ( cur->platform_id == platform_id )\n      {\n        if ( cur->encoding_id == encoding_id ||\n             cur->encoding_id == -1          )\n          return cur->encoding;\n      }\n    }\n\n    return FT_ENCODING_NONE;\n  }\n\n\n#define WRITE_USHORT( p, v )                \\\n          do                                \\\n          {                                 \\\n            *(p)++ = (FT_Byte)( (v) >> 8 ); \\\n            *(p)++ = (FT_Byte)( (v) >> 0 ); \\\n                                            \\\n          } while ( 0 )\n\n#define WRITE_ULONG( p, v )                  \\\n          do                                 \\\n          {                                  \\\n            *(p)++ = (FT_Byte)( (v) >> 24 ); \\\n            *(p)++ = (FT_Byte)( (v) >> 16 ); \\\n            *(p)++ = (FT_Byte)( (v) >>  8 ); \\\n            *(p)++ = (FT_Byte)( (v) >>  0 ); \\\n                                             \\\n          } while ( 0 )\n\n\n  static void\n  sfnt_stream_close( FT_Stream  stream )\n  {\n    FT_Memory  memory = stream->memory;\n\n\n    FT_FREE( stream->base );\n\n    stream->size  = 0;\n    stream->base  = 0;\n    stream->close = 0;\n  }\n\n\n  FT_CALLBACK_DEF( int )\n  compare_offsets( const void*  a,\n                   const void*  b )\n  {\n    WOFF_Table  table1 = *(WOFF_Table*)a;\n    WOFF_Table  table2 = *(WOFF_Table*)b;\n\n    FT_ULong  offset1 = table1->Offset;\n    FT_ULong  offset2 = table2->Offset;\n\n\n    if ( offset1 > offset2 )\n      return 1;\n    else if ( offset1 < offset2 )\n      return -1;\n    else\n      return 0;\n  }\n\n\n  /* Replace `face->root.stream' with a stream containing the extracted */\n  /* SFNT of a WOFF font.                                               */\n\n  static FT_Error\n  woff_open_font( FT_Stream  stream,\n                  TT_Face    face )\n  {\n    FT_Memory       memory = stream->memory;\n    FT_Error        error  = FT_Err_Ok;\n\n    WOFF_HeaderRec  woff;\n    WOFF_Table      tables  = NULL;\n    WOFF_Table*     indices = NULL;\n\n    FT_ULong        woff_offset;\n\n    FT_Byte*        sfnt        = NULL;\n    FT_Stream       sfnt_stream = NULL;\n\n    FT_Byte*        sfnt_header;\n    FT_ULong        sfnt_offset;\n\n    FT_Int          nn;\n    FT_ULong        old_tag = 0;\n\n    static const FT_Frame_Field  woff_header_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  WOFF_HeaderRec\n\n      FT_FRAME_START( 44 ),\n        FT_FRAME_ULONG ( signature ),\n        FT_FRAME_ULONG ( flavor ),\n        FT_FRAME_ULONG ( length ),\n        FT_FRAME_USHORT( num_tables ),\n        FT_FRAME_USHORT( reserved ),\n        FT_FRAME_ULONG ( totalSfntSize ),\n        FT_FRAME_USHORT( majorVersion ),\n        FT_FRAME_USHORT( minorVersion ),\n        FT_FRAME_ULONG ( metaOffset ),\n        FT_FRAME_ULONG ( metaLength ),\n        FT_FRAME_ULONG ( metaOrigLength ),\n        FT_FRAME_ULONG ( privOffset ),\n        FT_FRAME_ULONG ( privLength ),\n      FT_FRAME_END\n    };\n\n\n    FT_ASSERT( stream == face->root.stream );\n    FT_ASSERT( FT_STREAM_POS() == 0 );\n\n    if ( FT_STREAM_READ_FIELDS( woff_header_fields, &woff ) )\n      return error;\n\n    /* Make sure we don't recurse back here or hit TTC code. */\n    if ( woff.flavor == TTAG_wOFF || woff.flavor == TTAG_ttcf )\n      return FT_THROW( Invalid_Table );\n\n    /* Miscellaneous checks. */\n    if ( woff.length != stream->size                              ||\n         woff.num_tables == 0                                     ||\n         44 + woff.num_tables * 20UL >= woff.length               ||\n         12 + woff.num_tables * 16UL >= woff.totalSfntSize        ||\n         ( woff.totalSfntSize & 3 ) != 0                          ||\n         ( woff.metaOffset == 0 && ( woff.metaLength != 0     ||\n                                     woff.metaOrigLength != 0 ) ) ||\n         ( woff.metaLength != 0 && woff.metaOrigLength == 0 )     ||\n         ( woff.privOffset == 0 && woff.privLength != 0 )         )\n      return FT_THROW( Invalid_Table );\n\n    if ( FT_ALLOC( sfnt, woff.totalSfntSize ) ||\n         FT_NEW( sfnt_stream )                )\n      goto Exit;\n\n    sfnt_header = sfnt;\n\n    /* Write sfnt header. */\n    {\n      FT_UInt  searchRange, entrySelector, rangeShift, x;\n\n\n      x             = woff.num_tables;\n      entrySelector = 0;\n      while ( x )\n      {\n        x            >>= 1;\n        entrySelector += 1;\n      }\n      entrySelector--;\n\n      searchRange = ( 1 << entrySelector ) * 16;\n      rangeShift  = woff.num_tables * 16 - searchRange;\n\n      WRITE_ULONG ( sfnt_header, woff.flavor );\n      WRITE_USHORT( sfnt_header, woff.num_tables );\n      WRITE_USHORT( sfnt_header, searchRange );\n      WRITE_USHORT( sfnt_header, entrySelector );\n      WRITE_USHORT( sfnt_header, rangeShift );\n    }\n\n    /* While the entries in the sfnt header must be sorted by the */\n    /* tag value, the tables themselves are not.  We thus have to */\n    /* sort them by offset and check that they don't overlap.     */\n\n    if ( FT_NEW_ARRAY( tables, woff.num_tables )  ||\n         FT_NEW_ARRAY( indices, woff.num_tables ) )\n      goto Exit;\n\n    FT_TRACE2(( \"\\n\"\n                \"  tag    offset    compLen  origLen  checksum\\n\"\n                \"  -------------------------------------------\\n\" ));\n\n    if ( FT_FRAME_ENTER( 20L * woff.num_tables ) )\n      goto Exit;\n\n    for ( nn = 0; nn < woff.num_tables; nn++ )\n    {\n      WOFF_Table  table = tables + nn;\n\n      table->Tag        = FT_GET_TAG4();\n      table->Offset     = FT_GET_ULONG();\n      table->CompLength = FT_GET_ULONG();\n      table->OrigLength = FT_GET_ULONG();\n      table->CheckSum   = FT_GET_ULONG();\n\n      FT_TRACE2(( \"  %c%c%c%c  %08lx  %08lx  %08lx  %08lx\\n\",\n                  (FT_Char)( table->Tag >> 24 ),\n                  (FT_Char)( table->Tag >> 16 ),\n                  (FT_Char)( table->Tag >> 8  ),\n                  (FT_Char)( table->Tag       ),\n                  table->Offset,\n                  table->CompLength,\n                  table->OrigLength,\n                  table->CheckSum ));\n\n      if ( table->Tag <= old_tag )\n      {\n        FT_FRAME_EXIT();\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n\n      old_tag     = table->Tag;\n      indices[nn] = table;\n    }\n\n    FT_FRAME_EXIT();\n\n    /* Sort by offset. */\n\n    ft_qsort( indices,\n              woff.num_tables,\n              sizeof ( WOFF_Table ),\n              compare_offsets );\n\n    /* Check offsets and lengths. */\n\n    woff_offset = 44 + woff.num_tables * 20L;\n    sfnt_offset = 12 + woff.num_tables * 16L;\n\n    for ( nn = 0; nn < woff.num_tables; nn++ )\n    {\n      WOFF_Table  table = indices[nn];\n\n\n      if ( table->Offset != woff_offset                         ||\n           table->CompLength > woff.length                      ||\n           table->Offset > woff.length - table->CompLength      ||\n           table->OrigLength > woff.totalSfntSize               ||\n           sfnt_offset > woff.totalSfntSize - table->OrigLength ||\n           table->CompLength > table->OrigLength                )\n      {\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n\n      table->OrigOffset = sfnt_offset;\n\n      /* The offsets must be multiples of 4. */\n      woff_offset += ( table->CompLength + 3 ) & ~3;\n      sfnt_offset += ( table->OrigLength + 3 ) & ~3;\n    }\n\n    /*\n     * Final checks!\n     *\n     * We don't decode and check the metadata block.\n     * We don't check table checksums either.\n     * But other than those, I think we implement all\n     * `MUST' checks from the spec.\n     */\n\n    if ( woff.metaOffset )\n    {\n      if ( woff.metaOffset != woff_offset                  ||\n           woff.metaOffset + woff.metaLength > woff.length )\n      {\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n\n      /* We have padding only ... */\n      woff_offset += woff.metaLength;\n    }\n\n    if ( woff.privOffset )\n    {\n      /* ... if it isn't the last block. */\n      woff_offset = ( woff_offset + 3 ) & ~3;\n\n      if ( woff.privOffset != woff_offset                  ||\n           woff.privOffset + woff.privLength > woff.length )\n      {\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n\n      /* No padding for the last block. */\n      woff_offset += woff.privLength;\n    }\n\n    if ( sfnt_offset != woff.totalSfntSize ||\n         woff_offset != woff.length        )\n    {\n      error = FT_THROW( Invalid_Table );\n      goto Exit;\n    }\n\n    /* Write the tables. */\n\n    for ( nn = 0; nn < woff.num_tables; nn++ )\n    {\n      WOFF_Table  table = tables + nn;\n\n\n      /* Write SFNT table entry. */\n      WRITE_ULONG( sfnt_header, table->Tag );\n      WRITE_ULONG( sfnt_header, table->CheckSum );\n      WRITE_ULONG( sfnt_header, table->OrigOffset );\n      WRITE_ULONG( sfnt_header, table->OrigLength );\n\n      /* Write table data. */\n      if ( FT_STREAM_SEEK( table->Offset )     ||\n           FT_FRAME_ENTER( table->CompLength ) )\n        goto Exit;\n\n      if ( table->CompLength == table->OrigLength )\n      {\n        /* Uncompressed data; just copy. */\n        ft_memcpy( sfnt + table->OrigOffset,\n                   stream->cursor,\n                   table->OrigLength );\n      }\n      else\n      {\n#ifdef FT_CONFIG_OPTION_USE_ZLIB\n\n        /* Uncompress with zlib. */\n        FT_ULong  output_len = table->OrigLength;\n\n\n        error = FT_Gzip_Uncompress( memory,\n                                    sfnt + table->OrigOffset, &output_len,\n                                    stream->cursor, table->CompLength );\n        if ( error )\n          goto Exit;\n        if ( output_len != table->OrigLength )\n        {\n          error = FT_THROW( Invalid_Table );\n          goto Exit;\n        }\n\n#else /* !FT_CONFIG_OPTION_USE_ZLIB */\n\n        error = FT_THROW( Unimplemented_Feature );\n        goto Exit;\n\n#endif /* !FT_CONFIG_OPTION_USE_ZLIB */\n      }\n\n      FT_FRAME_EXIT();\n\n      /* We don't check whether the padding bytes in the WOFF file are     */\n      /* actually '\\0'.  For the output, however, we do set them properly. */\n      sfnt_offset = table->OrigOffset + table->OrigLength;\n      while ( sfnt_offset & 3 )\n      {\n        sfnt[sfnt_offset] = '\\0';\n        sfnt_offset++;\n      }\n    }\n\n    /* Ok!  Finally ready.  Swap out stream and return. */\n    FT_Stream_OpenMemory( sfnt_stream, sfnt, woff.totalSfntSize );\n    sfnt_stream->memory = stream->memory;\n    sfnt_stream->close  = sfnt_stream_close;\n\n    FT_Stream_Free(\n      face->root.stream,\n      ( face->root.face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 );\n\n    face->root.stream = sfnt_stream;\n\n    face->root.face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM;\n\n  Exit:\n    FT_FREE( tables );\n    FT_FREE( indices );\n\n    if ( error )\n    {\n      FT_FREE( sfnt );\n      FT_Stream_Close( sfnt_stream );\n      FT_FREE( sfnt_stream );\n    }\n\n    return error;\n  }\n\n\n#undef WRITE_USHORT\n#undef WRITE_ULONG\n\n\n  /* Fill in face->ttc_header.  If the font is not a TTC, it is */\n  /* synthesized into a TTC with one offset table.              */\n  static FT_Error\n  sfnt_open_font( FT_Stream  stream,\n                  TT_Face    face )\n  {\n    FT_Memory  memory = stream->memory;\n    FT_Error   error;\n    FT_ULong   tag, offset;\n\n    static const FT_Frame_Field  ttc_header_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TTC_HeaderRec\n\n      FT_FRAME_START( 8 ),\n        FT_FRAME_LONG( version ),\n        FT_FRAME_LONG( count   ),  /* this is ULong in the specs */\n      FT_FRAME_END\n    };\n\n\n    face->ttc_header.tag     = 0;\n    face->ttc_header.version = 0;\n    face->ttc_header.count   = 0;\n\n  retry:\n    offset = FT_STREAM_POS();\n\n    if ( FT_READ_ULONG( tag ) )\n      return error;\n\n    if ( tag == TTAG_wOFF )\n    {\n      FT_TRACE2(( \"sfnt_open_font: file is a WOFF; synthesizing SFNT\\n\" ));\n\n      if ( FT_STREAM_SEEK( offset ) )\n        return error;\n\n      error = woff_open_font( stream, face );\n      if ( error )\n        return error;\n\n      /* Swap out stream and retry! */\n      stream = face->root.stream;\n      goto retry;\n    }\n\n    if ( tag != 0x00010000UL &&\n         tag != TTAG_ttcf    &&\n         tag != TTAG_OTTO    &&\n         tag != TTAG_true    &&\n         tag != TTAG_typ1    &&\n         tag != 0x00020000UL )\n    {\n      FT_TRACE2(( \"  not a font using the SFNT container format\\n\" ));\n      return FT_THROW( Unknown_File_Format );\n    }\n\n    face->ttc_header.tag = TTAG_ttcf;\n\n    if ( tag == TTAG_ttcf )\n    {\n      FT_Int  n;\n\n\n      FT_TRACE3(( \"sfnt_open_font: file is a collection\\n\" ));\n\n      if ( FT_STREAM_READ_FIELDS( ttc_header_fields, &face->ttc_header ) )\n        return error;\n\n      if ( face->ttc_header.count == 0 )\n        return FT_THROW( Invalid_Table );\n\n      /* a rough size estimate: let's conservatively assume that there   */\n      /* is just a single table info in each subfont header (12 + 16*1 = */\n      /* 28 bytes), thus we have (at least) `12 + 4*count' bytes for the */\n      /* size of the TTC header plus `28*count' bytes for all subfont    */\n      /* headers                                                         */\n      if ( (FT_ULong)face->ttc_header.count > stream->size / ( 28 + 4 ) )\n        return FT_THROW( Array_Too_Large );\n\n      /* now read the offsets of each font in the file */\n      if ( FT_NEW_ARRAY( face->ttc_header.offsets, face->ttc_header.count ) )\n        return error;\n\n      if ( FT_FRAME_ENTER( face->ttc_header.count * 4L ) )\n        return error;\n\n      for ( n = 0; n < face->ttc_header.count; n++ )\n        face->ttc_header.offsets[n] = FT_GET_ULONG();\n\n      FT_FRAME_EXIT();\n    }\n    else\n    {\n      FT_TRACE3(( \"sfnt_open_font: synthesize TTC\\n\" ));\n\n      face->ttc_header.version = 1 << 16;\n      face->ttc_header.count   = 1;\n\n      if ( FT_NEW( face->ttc_header.offsets ) )\n        return error;\n\n      face->ttc_header.offsets[0] = offset;\n    }\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  sfnt_init_face( FT_Stream      stream,\n                  TT_Face        face,\n                  FT_Int         face_index,\n                  FT_Int         num_params,\n                  FT_Parameter*  params )\n  {\n    FT_Error        error;\n    FT_Library      library = face->root.driver->root.library;\n    SFNT_Service    sfnt;\n\n\n    /* for now, parameters are unused */\n    FT_UNUSED( num_params );\n    FT_UNUSED( params );\n\n\n    sfnt = (SFNT_Service)face->sfnt;\n    if ( !sfnt )\n    {\n      sfnt = (SFNT_Service)FT_Get_Module_Interface( library, \"sfnt\" );\n      if ( !sfnt )\n      {\n        FT_ERROR(( \"sfnt_init_face: cannot access `sfnt' module\\n\" ));\n        return FT_THROW( Missing_Module );\n      }\n\n      face->sfnt       = sfnt;\n      face->goto_table = sfnt->goto_table;\n    }\n\n    FT_FACE_FIND_GLOBAL_SERVICE( face, face->psnames, POSTSCRIPT_CMAPS );\n\n    FT_TRACE2(( \"SFNT driver\\n\" ));\n\n    error = sfnt_open_font( stream, face );\n    if ( error )\n      return error;\n\n    /* Stream may have changed in sfnt_open_font. */\n    stream = face->root.stream;\n\n    FT_TRACE2(( \"sfnt_init_face: %08p, %ld\\n\", face, face_index ));\n\n    if ( face_index < 0 )\n      face_index = 0;\n\n    if ( face_index >= face->ttc_header.count )\n      return FT_THROW( Invalid_Argument );\n\n    if ( FT_STREAM_SEEK( face->ttc_header.offsets[face_index] ) )\n      return error;\n\n    /* check that we have a valid TrueType file */\n    error = sfnt->load_font_dir( face, stream );\n    if ( error )\n      return error;\n\n    face->root.num_faces  = face->ttc_header.count;\n    face->root.face_index = face_index;\n\n    return error;\n  }\n\n\n#define LOAD_( x )                                          \\\n  do                                                        \\\n  {                                                         \\\n    FT_TRACE2(( \"`\" #x \"' \" ));                             \\\n    FT_TRACE3(( \"-->\\n\" ));                                 \\\n                                                            \\\n    error = sfnt->load_ ## x( face, stream );               \\\n                                                            \\\n    FT_TRACE2(( \"%s\\n\", ( !error )                          \\\n                        ? \"loaded\"                          \\\n                        : FT_ERR_EQ( error, Table_Missing ) \\\n                          ? \"missing\"                       \\\n                          : \"failed to load\" ));            \\\n    FT_TRACE3(( \"\\n\" ));                                    \\\n  } while ( 0 )\n\n#define LOADM_( x, vertical )                               \\\n  do                                                        \\\n  {                                                         \\\n    FT_TRACE2(( \"`%s\" #x \"' \",                              \\\n                vertical ? \"vertical \" : \"\" ));             \\\n    FT_TRACE3(( \"-->\\n\" ));                                 \\\n                                                            \\\n    error = sfnt->load_ ## x( face, stream, vertical );     \\\n                                                            \\\n    FT_TRACE2(( \"%s\\n\", ( !error )                          \\\n                        ? \"loaded\"                          \\\n                        : FT_ERR_EQ( error, Table_Missing ) \\\n                          ? \"missing\"                       \\\n                          : \"failed to load\" ));            \\\n    FT_TRACE3(( \"\\n\" ));                                    \\\n  } while ( 0 )\n\n#define GET_NAME( id, field )                                   \\\n  do                                                            \\\n  {                                                             \\\n    error = tt_face_get_name( face, TT_NAME_ID_ ## id, field ); \\\n    if ( error )                                                \\\n      goto Exit;                                                \\\n  } while ( 0 )\n\n\n  FT_LOCAL_DEF( FT_Error )\n  sfnt_load_face( FT_Stream      stream,\n                  TT_Face        face,\n                  FT_Int         face_index,\n                  FT_Int         num_params,\n                  FT_Parameter*  params )\n  {\n    FT_Error      error;\n#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n    FT_Error      psnames_error;\n#endif\n    FT_Bool       has_outline;\n    FT_Bool       is_apple_sbit;\n    FT_Bool       is_apple_sbix;\n    FT_Bool       ignore_preferred_family    = FALSE;\n    FT_Bool       ignore_preferred_subfamily = FALSE;\n\n    SFNT_Service  sfnt = (SFNT_Service)face->sfnt;\n\n    FT_UNUSED( face_index );\n\n\n    /* Check parameters */\n\n    {\n      FT_Int  i;\n\n\n      for ( i = 0; i < num_params; i++ )\n      {\n        if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY )\n          ignore_preferred_family = TRUE;\n        else if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY )\n          ignore_preferred_subfamily = TRUE;\n      }\n    }\n\n    /* Load tables */\n\n    /* We now support two SFNT-based bitmapped font formats.  They */\n    /* are recognized easily as they do not include a `glyf'       */\n    /* table.                                                      */\n    /*                                                             */\n    /* The first format comes from Apple, and uses a table named   */\n    /* `bhed' instead of `head' to store the font header (using    */\n    /* the same format).  It also doesn't include horizontal and   */\n    /* vertical metrics tables (i.e. `hhea' and `vhea' tables are  */\n    /* missing).                                                   */\n    /*                                                             */\n    /* The other format comes from Microsoft, and is used with     */\n    /* WinCE/PocketPC.  It looks like a standard TTF, except that  */\n    /* it doesn't contain outlines.                                */\n    /*                                                             */\n\n    FT_TRACE2(( \"sfnt_load_face: %08p\\n\\n\", face ));\n\n    /* do we have outlines in there? */\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    has_outline = FT_BOOL( face->root.internal->incremental_interface != 0 ||\n                           tt_face_lookup_table( face, TTAG_glyf )    != 0 ||\n                           tt_face_lookup_table( face, TTAG_CFF )     != 0 );\n#else\n    has_outline = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) != 0 ||\n                           tt_face_lookup_table( face, TTAG_CFF )  != 0 );\n#endif\n\n    is_apple_sbit = 0;\n    is_apple_sbix = !face->goto_table( face, TTAG_sbix, stream, 0 );\n\n    /* Apple 'sbix' color bitmaps are rendered scaled and then the 'glyf'\n     * outline rendered on top.  We don't support that yet, so just ignore\n     * the 'glyf' outline and advertise it as a bitmap-only font. */\n    if ( is_apple_sbix )\n      has_outline = FALSE;\n\n    /* if this font doesn't contain outlines, we try to load */\n    /* a `bhed' table                                        */\n    if ( !has_outline && sfnt->load_bhed )\n    {\n      LOAD_( bhed );\n      is_apple_sbit = FT_BOOL( !error );\n    }\n\n    /* load the font header (`head' table) if this isn't an Apple */\n    /* sbit font file                                             */\n    if ( !is_apple_sbit || is_apple_sbix )\n    {\n      LOAD_( head );\n      if ( error )\n        goto Exit;\n    }\n\n    if ( face->header.Units_Per_EM == 0 )\n    {\n      error = FT_THROW( Invalid_Table );\n\n      goto Exit;\n    }\n\n    /* the following tables are often not present in embedded TrueType */\n    /* fonts within PDF documents, so don't check for them.            */\n    LOAD_( maxp );\n    LOAD_( cmap );\n\n    /* the following tables are optional in PCL fonts -- */\n    /* don't check for errors                            */\n    LOAD_( name );\n    LOAD_( post );\n\n#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n    psnames_error = error;\n#endif\n\n    /* do not load the metrics headers and tables if this is an Apple */\n    /* sbit font file                                                 */\n    if ( !is_apple_sbit )\n    {\n      /* load the `hhea' and `hmtx' tables */\n      LOADM_( hhea, 0 );\n      if ( !error )\n      {\n        LOADM_( hmtx, 0 );\n        if ( FT_ERR_EQ( error, Table_Missing ) )\n        {\n          error = FT_THROW( Hmtx_Table_Missing );\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n          /* If this is an incrementally loaded font and there are */\n          /* overriding metrics, tolerate a missing `hmtx' table.  */\n          if ( face->root.internal->incremental_interface          &&\n               face->root.internal->incremental_interface->funcs->\n                 get_glyph_metrics                                 )\n          {\n            face->horizontal.number_Of_HMetrics = 0;\n            error                               = FT_Err_Ok;\n          }\n#endif\n        }\n      }\n      else if ( FT_ERR_EQ( error, Table_Missing ) )\n      {\n        /* No `hhea' table necessary for SFNT Mac fonts. */\n        if ( face->format_tag == TTAG_true )\n        {\n          FT_TRACE2(( \"This is an SFNT Mac font.\\n\" ));\n\n          has_outline = 0;\n          error       = FT_Err_Ok;\n        }\n        else\n        {\n          error = FT_THROW( Horiz_Header_Missing );\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n          /* If this is an incrementally loaded font and there are */\n          /* overriding metrics, tolerate a missing `hhea' table.  */\n          if ( face->root.internal->incremental_interface          &&\n               face->root.internal->incremental_interface->funcs->\n                 get_glyph_metrics                                 )\n          {\n            face->horizontal.number_Of_HMetrics = 0;\n            error                               = FT_Err_Ok;\n          }\n#endif\n\n        }\n      }\n\n      if ( error )\n        goto Exit;\n\n      /* try to load the `vhea' and `vmtx' tables */\n      LOADM_( hhea, 1 );\n      if ( !error )\n      {\n        LOADM_( hmtx, 1 );\n        if ( !error )\n          face->vertical_info = 1;\n      }\n\n      if ( error && FT_ERR_NEQ( error, Table_Missing ) )\n        goto Exit;\n\n      LOAD_( os2 );\n      if ( error )\n      {\n        /* we treat the table as missing if there are any errors */\n        face->os2.version = 0xFFFFU;\n      }\n    }\n\n    /* the optional tables */\n\n    /* embedded bitmap support */\n    if ( sfnt->load_eblc )\n    {\n      LOAD_( eblc );\n      if ( error )\n      {\n        /* a font which contains neither bitmaps nor outlines is */\n        /* still valid (although rather useless in most cases);  */\n        /* however, you can find such stripped fonts in PDFs     */\n        if ( FT_ERR_EQ( error, Table_Missing ) )\n          error = FT_Err_Ok;\n        else\n          goto Exit;\n      }\n    }\n\n    LOAD_( pclt );\n    if ( error )\n    {\n      if ( FT_ERR_NEQ( error, Table_Missing ) )\n        goto Exit;\n\n      face->pclt.Version = 0;\n    }\n\n    /* consider the kerning and gasp tables as optional */\n    LOAD_( gasp );\n    LOAD_( kern );\n\n    face->root.num_glyphs = face->max_profile.numGlyphs;\n\n    /* Bit 8 of the `fsSelection' field in the `OS/2' table denotes  */\n    /* a WWS-only font face.  `WWS' stands for `weight', width', and */\n    /* `slope', a term used by Microsoft's Windows Presentation      */\n    /* Foundation (WPF).  This flag has been introduced in version   */\n    /* 1.5 of the OpenType specification (May 2008).                 */\n\n    face->root.family_name = NULL;\n    face->root.style_name  = NULL;\n    if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 256 )\n    {\n      if ( !ignore_preferred_family )\n        GET_NAME( PREFERRED_FAMILY, &face->root.family_name );\n      if ( !face->root.family_name )\n        GET_NAME( FONT_FAMILY, &face->root.family_name );\n\n      if ( !ignore_preferred_subfamily )\n        GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );\n      if ( !face->root.style_name )\n        GET_NAME( FONT_SUBFAMILY, &face->root.style_name );\n    }\n    else\n    {\n      GET_NAME( WWS_FAMILY, &face->root.family_name );\n      if ( !face->root.family_name && !ignore_preferred_family )\n        GET_NAME( PREFERRED_FAMILY, &face->root.family_name );\n      if ( !face->root.family_name )\n        GET_NAME( FONT_FAMILY, &face->root.family_name );\n\n      GET_NAME( WWS_SUBFAMILY, &face->root.style_name );\n      if ( !face->root.style_name && !ignore_preferred_subfamily )\n        GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );\n      if ( !face->root.style_name )\n        GET_NAME( FONT_SUBFAMILY, &face->root.style_name );\n    }\n\n    /* now set up root fields */\n    {\n      FT_Face  root  = &face->root;\n      FT_Long  flags = root->face_flags;\n\n\n      /*********************************************************************/\n      /*                                                                   */\n      /* Compute face flags.                                               */\n      /*                                                                   */\n      if ( face->sbit_table_type == TT_SBIT_TABLE_TYPE_CBLC ||\n           face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX )\n        flags |= FT_FACE_FLAG_COLOR;      /* color glyphs */\n\n      if ( has_outline == TRUE )\n        flags |= FT_FACE_FLAG_SCALABLE;   /* scalable outlines */\n\n      /* The sfnt driver only supports bitmap fonts natively, thus we */\n      /* don't set FT_FACE_FLAG_HINTER.                               */\n      flags |= FT_FACE_FLAG_SFNT       |  /* SFNT file format  */\n               FT_FACE_FLAG_HORIZONTAL;   /* horizontal data   */\n\n#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n      if ( !psnames_error                             &&\n           face->postscript.FormatType != 0x00030000L )\n        flags |= FT_FACE_FLAG_GLYPH_NAMES;\n#endif\n\n      /* fixed width font? */\n      if ( face->postscript.isFixedPitch )\n        flags |= FT_FACE_FLAG_FIXED_WIDTH;\n\n      /* vertical information? */\n      if ( face->vertical_info )\n        flags |= FT_FACE_FLAG_VERTICAL;\n\n      /* kerning available ? */\n      if ( TT_FACE_HAS_KERNING( face ) )\n        flags |= FT_FACE_FLAG_KERNING;\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n      /* Don't bother to load the tables unless somebody asks for them. */\n      /* No need to do work which will (probably) not be used.          */\n      if ( tt_face_lookup_table( face, TTAG_glyf ) != 0 &&\n           tt_face_lookup_table( face, TTAG_fvar ) != 0 &&\n           tt_face_lookup_table( face, TTAG_gvar ) != 0 )\n        flags |= FT_FACE_FLAG_MULTIPLE_MASTERS;\n#endif\n\n      root->face_flags = flags;\n\n      /*********************************************************************/\n      /*                                                                   */\n      /* Compute style flags.                                              */\n      /*                                                                   */\n\n      flags = 0;\n      if ( has_outline == TRUE && face->os2.version != 0xFFFFU )\n      {\n        /* We have an OS/2 table; use the `fsSelection' field.  Bit 9 */\n        /* indicates an oblique font face.  This flag has been        */\n        /* introduced in version 1.5 of the OpenType specification.   */\n\n        if ( face->os2.fsSelection & 512 )       /* bit 9 */\n          flags |= FT_STYLE_FLAG_ITALIC;\n        else if ( face->os2.fsSelection & 1 )    /* bit 0 */\n          flags |= FT_STYLE_FLAG_ITALIC;\n\n        if ( face->os2.fsSelection & 32 )        /* bit 5 */\n          flags |= FT_STYLE_FLAG_BOLD;\n      }\n      else\n      {\n        /* this is an old Mac font, use the header field */\n\n        if ( face->header.Mac_Style & 1 )\n          flags |= FT_STYLE_FLAG_BOLD;\n\n        if ( face->header.Mac_Style & 2 )\n          flags |= FT_STYLE_FLAG_ITALIC;\n      }\n\n      root->style_flags = flags;\n\n      /*********************************************************************/\n      /*                                                                   */\n      /* Polish the charmaps.                                              */\n      /*                                                                   */\n      /*   Try to set the charmap encoding according to the platform &     */\n      /*   encoding ID of each charmap.                                    */\n      /*                                                                   */\n\n      tt_face_build_cmaps( face );  /* ignore errors */\n\n\n      /* set the encoding fields */\n      {\n        FT_Int  m;\n\n\n        for ( m = 0; m < root->num_charmaps; m++ )\n        {\n          FT_CharMap  charmap = root->charmaps[m];\n\n\n          charmap->encoding = sfnt_find_encoding( charmap->platform_id,\n                                                  charmap->encoding_id );\n\n#if 0\n          if ( root->charmap     == NULL &&\n               charmap->encoding == FT_ENCODING_UNICODE )\n          {\n            /* set 'root->charmap' to the first Unicode encoding we find */\n            root->charmap = charmap;\n          }\n#endif\n        }\n      }\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n      /*\n       *  Now allocate the root array of FT_Bitmap_Size records and\n       *  populate them.  Unfortunately, it isn't possible to indicate bit\n       *  depths in the FT_Bitmap_Size record.  This is a design error.\n       */\n      {\n        FT_UInt  i, count;\n\n\n        count = face->sbit_num_strikes;\n\n        if ( count > 0 )\n        {\n          FT_Memory        memory   = face->root.stream->memory;\n          FT_UShort        em_size  = face->header.Units_Per_EM;\n          FT_Short         avgwidth = face->os2.xAvgCharWidth;\n          FT_Size_Metrics  metrics;\n\n\n          if ( em_size == 0 || face->os2.version == 0xFFFFU )\n          {\n            avgwidth = 1;\n            em_size = 1;\n          }\n\n          if ( FT_NEW_ARRAY( root->available_sizes, count ) )\n            goto Exit;\n\n          for ( i = 0; i < count; i++ )\n          {\n            FT_Bitmap_Size*  bsize = root->available_sizes + i;\n\n\n            error = sfnt->load_strike_metrics( face, i, &metrics );\n            if ( error )\n              goto Exit;\n\n            bsize->height = (FT_Short)( metrics.height >> 6 );\n            bsize->width = (FT_Short)(\n                ( avgwidth * metrics.x_ppem + em_size / 2 ) / em_size );\n\n            bsize->x_ppem = metrics.x_ppem << 6;\n            bsize->y_ppem = metrics.y_ppem << 6;\n\n            /* assume 72dpi */\n            bsize->size   = metrics.y_ppem << 6;\n          }\n\n          root->face_flags     |= FT_FACE_FLAG_FIXED_SIZES;\n          root->num_fixed_sizes = (FT_Int)count;\n        }\n      }\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n      /* a font with no bitmaps and no outlines is scalable; */\n      /* it has only empty glyphs then                       */\n      if ( !FT_HAS_FIXED_SIZES( root ) && !FT_IS_SCALABLE( root ) )\n        root->face_flags |= FT_FACE_FLAG_SCALABLE;\n\n\n      /*********************************************************************/\n      /*                                                                   */\n      /*  Set up metrics.                                                  */\n      /*                                                                   */\n      if ( FT_IS_SCALABLE( root ) )\n      {\n        /* XXX What about if outline header is missing */\n        /*     (e.g. sfnt wrapped bitmap)?             */\n        root->bbox.xMin    = face->header.xMin;\n        root->bbox.yMin    = face->header.yMin;\n        root->bbox.xMax    = face->header.xMax;\n        root->bbox.yMax    = face->header.yMax;\n        root->units_per_EM = face->header.Units_Per_EM;\n\n\n        /* XXX: Computing the ascender/descender/height is very different */\n        /*      from what the specification tells you.  Apparently, we    */\n        /*      must be careful because                                   */\n        /*                                                                */\n        /*      - not all fonts have an OS/2 table; in this case, we take */\n        /*        the values in the horizontal header.  However, these    */\n        /*        values very often are not reliable.                     */\n        /*                                                                */\n        /*      - otherwise, the correct typographic values are in the    */\n        /*        sTypoAscender, sTypoDescender & sTypoLineGap fields.    */\n        /*                                                                */\n        /*        However, certain fonts have these fields set to 0.      */\n        /*        Rather, they have usWinAscent & usWinDescent correctly  */\n        /*        set (but with different values).                        */\n        /*                                                                */\n        /*      As an example, Arial Narrow is implemented through four   */\n        /*      files ARIALN.TTF, ARIALNI.TTF, ARIALNB.TTF & ARIALNBI.TTF */\n        /*                                                                */\n        /*      Strangely, all fonts have the same values in their        */\n        /*      sTypoXXX fields, except ARIALNB which sets them to 0.     */\n        /*                                                                */\n        /*      On the other hand, they all have different                */\n        /*      usWinAscent/Descent values -- as a conclusion, the OS/2   */\n        /*      table cannot be used to compute the text height reliably! */\n        /*                                                                */\n\n        /* The ascender and descender are taken from the `hhea' table. */\n        /* If zero, they are taken from the `OS/2' table.              */\n\n        root->ascender  = face->horizontal.Ascender;\n        root->descender = face->horizontal.Descender;\n\n        root->height = (FT_Short)( root->ascender - root->descender +\n                                   face->horizontal.Line_Gap );\n\n        if ( !( root->ascender || root->descender ) )\n        {\n          if ( face->os2.version != 0xFFFFU )\n          {\n            if ( face->os2.sTypoAscender || face->os2.sTypoDescender )\n            {\n              root->ascender  = face->os2.sTypoAscender;\n              root->descender = face->os2.sTypoDescender;\n\n              root->height = (FT_Short)( root->ascender - root->descender +\n                                         face->os2.sTypoLineGap );\n            }\n            else\n            {\n              root->ascender  =  (FT_Short)face->os2.usWinAscent;\n              root->descender = -(FT_Short)face->os2.usWinDescent;\n\n              root->height = (FT_UShort)( root->ascender - root->descender );\n            }\n          }\n        }\n\n        root->max_advance_width  = face->horizontal.advance_Width_Max;\n        root->max_advance_height = (FT_Short)( face->vertical_info\n                                     ? face->vertical.advance_Height_Max\n                                     : root->height );\n\n        /* See http://www.microsoft.com/OpenType/OTSpec/post.htm -- */\n        /* Adjust underline position from top edge to centre of     */\n        /* stroke to convert TrueType meaning to FreeType meaning.  */\n        root->underline_position  = face->postscript.underlinePosition -\n                                    face->postscript.underlineThickness / 2;\n        root->underline_thickness = face->postscript.underlineThickness;\n      }\n\n    }\n\n  Exit:\n    FT_TRACE2(( \"sfnt_load_face: done\\n\" ));\n\n    return error;\n  }\n\n\n#undef LOAD_\n#undef LOADM_\n#undef GET_NAME\n\n\n  FT_LOCAL_DEF( void )\n  sfnt_done_face( TT_Face  face )\n  {\n    FT_Memory     memory;\n    SFNT_Service  sfnt;\n\n\n    if ( !face )\n      return;\n\n    memory = face->root.memory;\n    sfnt   = (SFNT_Service)face->sfnt;\n\n    if ( sfnt )\n    {\n      /* destroy the postscript names table if it is loaded */\n      if ( sfnt->free_psnames )\n        sfnt->free_psnames( face );\n\n      /* destroy the embedded bitmaps table if it is loaded */\n      if ( sfnt->free_eblc )\n        sfnt->free_eblc( face );\n    }\n\n#ifdef TT_CONFIG_OPTION_BDF\n    /* freeing the embedded BDF properties */\n    tt_face_free_bdf_props( face );\n#endif\n\n    /* freeing the kerning table */\n    tt_face_done_kern( face );\n\n    /* freeing the collection table */\n    FT_FREE( face->ttc_header.offsets );\n    face->ttc_header.count = 0;\n\n    /* freeing table directory */\n    FT_FREE( face->dir_tables );\n    face->num_tables = 0;\n\n    {\n      FT_Stream  stream = FT_FACE_STREAM( face );\n\n\n      /* simply release the 'cmap' table frame */\n      FT_FRAME_RELEASE( face->cmap_table );\n      face->cmap_size = 0;\n    }\n\n    /* freeing the horizontal metrics */\n    {\n      FT_Stream  stream = FT_FACE_STREAM( face );\n\n\n      FT_FRAME_RELEASE( face->horz_metrics );\n      FT_FRAME_RELEASE( face->vert_metrics );\n      face->horz_metrics_size = 0;\n      face->vert_metrics_size = 0;\n    }\n\n    /* freeing the vertical ones, if any */\n    if ( face->vertical_info )\n    {\n      FT_FREE( face->vertical.long_metrics  );\n      FT_FREE( face->vertical.short_metrics );\n      face->vertical_info = 0;\n    }\n\n    /* freeing the gasp table */\n    FT_FREE( face->gasp.gaspRanges );\n    face->gasp.numRanges = 0;\n\n    /* freeing the name table */\n    if ( sfnt )\n      sfnt->free_name( face );\n\n    /* freeing family and style name */\n    FT_FREE( face->root.family_name );\n    FT_FREE( face->root.style_name );\n\n    /* freeing sbit size table */\n    FT_FREE( face->root.available_sizes );\n    face->root.num_fixed_sizes = 0;\n\n    FT_FREE( face->postscript_name );\n\n    face->sfnt = 0;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/sfobjs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  sfobjs.h                                                               */\n/*                                                                         */\n/*    SFNT object management (specification).                              */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __SFOBJS_H__\n#define __SFOBJS_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_SFNT_H\n#include FT_INTERNAL_OBJECTS_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error )\n  sfnt_init_face( FT_Stream      stream,\n                  TT_Face        face,\n                  FT_Int         face_index,\n                  FT_Int         num_params,\n                  FT_Parameter*  params );\n\n  FT_LOCAL( FT_Error )\n  sfnt_load_face( FT_Stream      stream,\n                  TT_Face        face,\n                  FT_Int         face_index,\n                  FT_Int         num_params,\n                  FT_Parameter*  params );\n\n  FT_LOCAL( void )\n  sfnt_done_face( TT_Face  face );\n\n\nFT_END_HEADER\n\n#endif /* __SFDRIVER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttbdf.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttbdf.c                                                                */\n/*                                                                         */\n/*    TrueType and OpenType embedded BDF properties (body).                */\n/*                                                                         */\n/*  Copyright 2005, 2006, 2010, 2013 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n#include \"ttbdf.h\"\n\n#include \"sferrors.h\"\n\n\n#ifdef TT_CONFIG_OPTION_BDF\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttbdf\n\n\n  FT_LOCAL_DEF( void )\n  tt_face_free_bdf_props( TT_Face  face )\n  {\n    TT_BDF  bdf = &face->bdf;\n\n\n    if ( bdf->loaded )\n    {\n      FT_Stream  stream = FT_FACE(face)->stream;\n\n\n      if ( bdf->table != NULL )\n        FT_FRAME_RELEASE( bdf->table );\n\n      bdf->table_end    = NULL;\n      bdf->strings      = NULL;\n      bdf->strings_size = 0;\n    }\n  }\n\n\n  static FT_Error\n  tt_face_load_bdf_props( TT_Face    face,\n                          FT_Stream  stream )\n  {\n    TT_BDF    bdf = &face->bdf;\n    FT_ULong  length;\n    FT_Error  error;\n\n\n    FT_ZERO( bdf );\n\n    error = tt_face_goto_table( face, TTAG_BDF, stream, &length );\n    if ( error                                  ||\n         length < 8                             ||\n         FT_FRAME_EXTRACT( length, bdf->table ) )\n    {\n      error = FT_THROW( Invalid_Table );\n      goto Exit;\n    }\n\n    bdf->table_end = bdf->table + length;\n\n    {\n      FT_Byte*   p           = bdf->table;\n      FT_UInt    version     = FT_NEXT_USHORT( p );\n      FT_UInt    num_strikes = FT_NEXT_USHORT( p );\n      FT_ULong   strings     = FT_NEXT_ULONG ( p );\n      FT_UInt    count;\n      FT_Byte*   strike;\n\n\n      if ( version != 0x0001                 ||\n           strings < 8                       ||\n           ( strings - 8 ) / 4 < num_strikes ||\n           strings + 1 > length              )\n      {\n        goto BadTable;\n      }\n\n      bdf->num_strikes  = num_strikes;\n      bdf->strings      = bdf->table + strings;\n      bdf->strings_size = length - strings;\n\n      count  = bdf->num_strikes;\n      p      = bdf->table + 8;\n      strike = p + count * 4;\n\n\n      for ( ; count > 0; count-- )\n      {\n        FT_UInt  num_items = FT_PEEK_USHORT( p + 2 );\n\n        /*\n         *  We don't need to check the value sets themselves, since this\n         *  is done later.\n         */\n        strike += 10 * num_items;\n\n        p += 4;\n      }\n\n      if ( strike > bdf->strings )\n        goto BadTable;\n    }\n\n    bdf->loaded = 1;\n\n  Exit:\n    return error;\n\n  BadTable:\n    FT_FRAME_RELEASE( bdf->table );\n    FT_ZERO( bdf );\n    error = FT_THROW( Invalid_Table );\n    goto Exit;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_find_bdf_prop( TT_Face           face,\n                         const char*       property_name,\n                         BDF_PropertyRec  *aprop )\n  {\n    TT_BDF     bdf   = &face->bdf;\n    FT_Size    size  = FT_FACE(face)->size;\n    FT_Error   error = FT_Err_Ok;\n    FT_Byte*   p;\n    FT_UInt    count;\n    FT_Byte*   strike;\n    FT_Offset  property_len;\n\n\n    aprop->type = BDF_PROPERTY_TYPE_NONE;\n\n    if ( bdf->loaded == 0 )\n    {\n      error = tt_face_load_bdf_props( face, FT_FACE( face )->stream );\n      if ( error )\n        goto Exit;\n    }\n\n    count  = bdf->num_strikes;\n    p      = bdf->table + 8;\n    strike = p + 4 * count;\n\n    error = FT_ERR( Invalid_Argument );\n\n    if ( size == NULL || property_name == NULL )\n      goto Exit;\n\n    property_len = ft_strlen( property_name );\n    if ( property_len == 0 )\n      goto Exit;\n\n    for ( ; count > 0; count-- )\n    {\n      FT_UInt  _ppem  = FT_NEXT_USHORT( p );\n      FT_UInt  _count = FT_NEXT_USHORT( p );\n\n      if ( _ppem == size->metrics.y_ppem )\n      {\n        count = _count;\n        goto FoundStrike;\n      }\n\n      strike += 10 * _count;\n    }\n    goto Exit;\n\n  FoundStrike:\n    p = strike;\n    for ( ; count > 0; count-- )\n    {\n      FT_UInt  type = FT_PEEK_USHORT( p + 4 );\n\n      if ( ( type & 0x10 ) != 0 )\n      {\n        FT_UInt32  name_offset = FT_PEEK_ULONG( p     );\n        FT_UInt32  value       = FT_PEEK_ULONG( p + 6 );\n\n        /* be a bit paranoid for invalid entries here */\n        if ( name_offset < bdf->strings_size                    &&\n             property_len < bdf->strings_size - name_offset     &&\n             ft_strncmp( property_name,\n                         (const char*)bdf->strings + name_offset,\n                         bdf->strings_size - name_offset ) == 0 )\n        {\n          switch ( type & 0x0F )\n          {\n          case 0x00:  /* string */\n          case 0x01:  /* atoms */\n            /* check that the content is really 0-terminated */\n            if ( value < bdf->strings_size &&\n                 ft_memchr( bdf->strings + value, 0, bdf->strings_size ) )\n            {\n              aprop->type   = BDF_PROPERTY_TYPE_ATOM;\n              aprop->u.atom = (const char*)bdf->strings + value;\n              error         = FT_Err_Ok;\n              goto Exit;\n            }\n            break;\n\n          case 0x02:\n            aprop->type      = BDF_PROPERTY_TYPE_INTEGER;\n            aprop->u.integer = (FT_Int32)value;\n            error            = FT_Err_Ok;\n            goto Exit;\n\n          case 0x03:\n            aprop->type       = BDF_PROPERTY_TYPE_CARDINAL;\n            aprop->u.cardinal = value;\n            error             = FT_Err_Ok;\n            goto Exit;\n\n          default:\n            ;\n          }\n        }\n      }\n      p += 10;\n    }\n\n  Exit:\n    return error;\n  }\n\n#endif /* TT_CONFIG_OPTION_BDF */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttbdf.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttbdf.h                                                                */\n/*                                                                         */\n/*    TrueType and OpenType embedded BDF properties (specification).       */\n/*                                                                         */\n/*  Copyright 2005 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTBDF_H__\n#define __TTBDF_H__\n\n\n#include <ft2build.h>\n#include \"ttload.h\"\n#include FT_BDF_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( void )\n  tt_face_free_bdf_props( TT_Face  face );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_find_bdf_prop( TT_Face           face,\n                         const char*       property_name,\n                         BDF_PropertyRec  *aprop );\n\n\nFT_END_HEADER\n\n#endif /* __TTBDF_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttcmap.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttcmap.c                                                               */\n/*                                                                         */\n/*    TrueType character mapping table (cmap) support (body).              */\n/*                                                                         */\n/*  Copyright 2002-2010, 2012-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n\n#include \"sferrors.h\"           /* must come before FT_INTERNAL_VALIDATE_H */\n\n#include FT_INTERNAL_VALIDATE_H\n#include FT_INTERNAL_STREAM_H\n#include \"ttload.h\"\n#include \"ttcmap.h\"\n#include \"sfntpic.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttcmap\n\n\n#define TT_PEEK_SHORT   FT_PEEK_SHORT\n#define TT_PEEK_USHORT  FT_PEEK_USHORT\n#define TT_PEEK_UINT24  FT_PEEK_UOFF3\n#define TT_PEEK_LONG    FT_PEEK_LONG\n#define TT_PEEK_ULONG   FT_PEEK_ULONG\n\n#define TT_NEXT_SHORT   FT_NEXT_SHORT\n#define TT_NEXT_USHORT  FT_NEXT_USHORT\n#define TT_NEXT_UINT24  FT_NEXT_UOFF3\n#define TT_NEXT_LONG    FT_NEXT_LONG\n#define TT_NEXT_ULONG   FT_NEXT_ULONG\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap_init( TT_CMap   cmap,\n                FT_Byte*  table )\n  {\n    cmap->data = table;\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                           FORMAT 0                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TABLE OVERVIEW                                                        */\n  /* --------------                                                        */\n  /*                                                                       */\n  /*   NAME        OFFSET         TYPE          DESCRIPTION                */\n  /*                                                                       */\n  /*   format      0              USHORT        must be 0                  */\n  /*   length      2              USHORT        table length in bytes      */\n  /*   language    4              USHORT        Mac language code          */\n  /*   glyph_ids   6              BYTE[256]     array of glyph indices     */\n  /*               262                                                     */\n  /*                                                                       */\n\n#ifdef TT_CONFIG_CMAP_FORMAT_0\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap0_validate( FT_Byte*      table,\n                     FT_Validator  valid )\n  {\n    FT_Byte*  p;\n    FT_UInt   length;\n\n\n    if ( table + 2 + 2 > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    p      = table + 2;           /* skip format */\n    length = TT_NEXT_USHORT( p );\n\n    if ( table + length > valid->limit || length < 262 )\n      FT_INVALID_TOO_SHORT;\n\n    /* check glyph indices whenever necessary */\n    if ( valid->level >= FT_VALIDATE_TIGHT )\n    {\n      FT_UInt  n, idx;\n\n\n      p = table + 6;\n      for ( n = 0; n < 256; n++ )\n      {\n        idx = *p++;\n        if ( idx >= TT_VALID_GLYPH_COUNT( valid ) )\n          FT_INVALID_GLYPH_ID;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap0_char_index( TT_CMap    cmap,\n                       FT_UInt32  char_code )\n  {\n    FT_Byte*  table = cmap->data;\n\n\n    return char_code < 256 ? table[6 + char_code] : 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  tt_cmap0_char_next( TT_CMap     cmap,\n                      FT_UInt32  *pchar_code )\n  {\n    FT_Byte*   table    = cmap->data;\n    FT_UInt32  charcode = *pchar_code;\n    FT_UInt32  result   = 0;\n    FT_UInt    gindex   = 0;\n\n\n    table += 6;  /* go to glyph IDs */\n    while ( ++charcode < 256 )\n    {\n      gindex = table[charcode];\n      if ( gindex != 0 )\n      {\n        result = charcode;\n        break;\n      }\n    }\n\n    *pchar_code = result;\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap0_get_info( TT_CMap       cmap,\n                     TT_CMapInfo  *cmap_info )\n  {\n    FT_Byte*  p = cmap->data + 4;\n\n\n    cmap_info->format   = 0;\n    cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_TT_CMAP(\n    tt_cmap0_class_rec,\n    sizeof ( TT_CMapRec ),\n\n    (FT_CMap_InitFunc)     tt_cmap_init,\n    (FT_CMap_DoneFunc)     NULL,\n    (FT_CMap_CharIndexFunc)tt_cmap0_char_index,\n    (FT_CMap_CharNextFunc) tt_cmap0_char_next,\n\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n\n    0,\n    (TT_CMap_ValidateFunc)tt_cmap0_validate,\n    (TT_CMap_Info_GetFunc)tt_cmap0_get_info )\n\n#endif /* TT_CONFIG_CMAP_FORMAT_0 */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          FORMAT 2                             *****/\n  /*****                                                               *****/\n  /***** This is used for certain CJK encodings that encode text in a  *****/\n  /***** mixed 8/16 bits encoding along the following lines:           *****/\n  /*****                                                               *****/\n  /***** * Certain byte values correspond to an 8-bit character code   *****/\n  /*****   (typically in the range 0..127 for ASCII compatibility).    *****/\n  /*****                                                               *****/\n  /***** * Certain byte values signal the first byte of a 2-byte       *****/\n  /*****   character code (but these values are also valid as the      *****/\n  /*****   second byte of a 2-byte character).                         *****/\n  /*****                                                               *****/\n  /***** The following charmap lookup and iteration functions all      *****/\n  /***** assume that the value \"charcode\" correspond to following:     *****/\n  /*****                                                               *****/\n  /*****   - For one byte characters, \"charcode\" is simply the         *****/\n  /*****     character code.                                           *****/\n  /*****                                                               *****/\n  /*****   - For two byte characters, \"charcode\" is the 2-byte         *****/\n  /*****     character code in big endian format.  More exactly:       *****/\n  /*****                                                               *****/\n  /*****       (charcode >> 8)    is the first byte value              *****/\n  /*****       (charcode & 0xFF)  is the second byte value             *****/\n  /*****                                                               *****/\n  /***** Note that not all values of \"charcode\" are valid according    *****/\n  /***** to these rules, and the function moderately check the         *****/\n  /***** arguments.                                                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TABLE OVERVIEW                                                        */\n  /* --------------                                                        */\n  /*                                                                       */\n  /*   NAME        OFFSET         TYPE            DESCRIPTION              */\n  /*                                                                       */\n  /*   format      0              USHORT          must be 2                */\n  /*   length      2              USHORT          table length in bytes    */\n  /*   language    4              USHORT          Mac language code        */\n  /*   keys        6              USHORT[256]     sub-header keys          */\n  /*   subs        518            SUBHEAD[NSUBS]  sub-headers array        */\n  /*   glyph_ids   518+NSUB*8     USHORT[]        glyph ID array           */\n  /*                                                                       */\n  /* The `keys' table is used to map charcode high-bytes to sub-headers.   */\n  /* The value of `NSUBS' is the number of sub-headers defined in the      */\n  /* table and is computed by finding the maximum of the `keys' table.     */\n  /*                                                                       */\n  /* Note that for any n, `keys[n]' is a byte offset within the `subs'     */\n  /* table, i.e., it is the corresponding sub-header index multiplied      */\n  /* by 8.                                                                 */\n  /*                                                                       */\n  /* Each sub-header has the following format:                             */\n  /*                                                                       */\n  /*   NAME        OFFSET      TYPE            DESCRIPTION                 */\n  /*                                                                       */\n  /*   first       0           USHORT          first valid low-byte        */\n  /*   count       2           USHORT          number of valid low-bytes   */\n  /*   delta       4           SHORT           see below                   */\n  /*   offset      6           USHORT          see below                   */\n  /*                                                                       */\n  /* A sub-header defines, for each high-byte, the range of valid          */\n  /* low-bytes within the charmap.  Note that the range defined by `first' */\n  /* and `count' must be completely included in the interval [0..255]      */\n  /* according to the specification.                                       */\n  /*                                                                       */\n  /* If a character code is contained within a given sub-header, then      */\n  /* mapping it to a glyph index is done as follows:                       */\n  /*                                                                       */\n  /* * The value of `offset' is read.  This is a _byte_ distance from the  */\n  /*   location of the `offset' field itself into a slice of the           */\n  /*   `glyph_ids' table.  Let's call it `slice' (it is a USHORT[] too).   */\n  /*                                                                       */\n  /* * The value `slice[char.lo - first]' is read.  If it is 0, there is   */\n  /*   no glyph for the charcode.  Otherwise, the value of `delta' is      */\n  /*   added to it (modulo 65536) to form a new glyph index.               */\n  /*                                                                       */\n  /* It is up to the validation routine to check that all offsets fall     */\n  /* within the glyph IDs table (and not within the `subs' table itself or */\n  /* outside of the CMap).                                                 */\n  /*                                                                       */\n\n#ifdef TT_CONFIG_CMAP_FORMAT_2\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap2_validate( FT_Byte*      table,\n                     FT_Validator  valid )\n  {\n    FT_Byte*  p;\n    FT_UInt   length;\n\n    FT_UInt   n, max_subs;\n    FT_Byte*  keys;        /* keys table     */\n    FT_Byte*  subs;        /* sub-headers    */\n    FT_Byte*  glyph_ids;   /* glyph ID array */\n\n\n    if ( table + 2 + 2 > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    p      = table + 2;           /* skip format */\n    length = TT_NEXT_USHORT( p );\n\n    if ( table + length > valid->limit || length < 6 + 512 )\n      FT_INVALID_TOO_SHORT;\n\n    keys = table + 6;\n\n    /* parse keys to compute sub-headers count */\n    p        = keys;\n    max_subs = 0;\n    for ( n = 0; n < 256; n++ )\n    {\n      FT_UInt  idx = TT_NEXT_USHORT( p );\n\n\n      /* value must be multiple of 8 */\n      if ( valid->level >= FT_VALIDATE_PARANOID && ( idx & 7 ) != 0 )\n        FT_INVALID_DATA;\n\n      idx >>= 3;\n\n      if ( idx > max_subs )\n        max_subs = idx;\n    }\n\n    FT_ASSERT( p == table + 518 );\n\n    subs      = p;\n    glyph_ids = subs + (max_subs + 1) * 8;\n    if ( glyph_ids > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    /* parse sub-headers */\n    for ( n = 0; n <= max_subs; n++ )\n    {\n      FT_UInt  first_code, code_count, offset;\n      FT_Int   delta;\n\n\n      first_code = TT_NEXT_USHORT( p );\n      code_count = TT_NEXT_USHORT( p );\n      delta      = TT_NEXT_SHORT( p );\n      offset     = TT_NEXT_USHORT( p );\n\n      /* many Dynalab fonts have empty sub-headers */\n      if ( code_count == 0 )\n        continue;\n\n      /* check range within 0..255 */\n      if ( valid->level >= FT_VALIDATE_PARANOID )\n      {\n        if ( first_code >= 256 || first_code + code_count > 256 )\n          FT_INVALID_DATA;\n      }\n\n      /* check offset */\n      if ( offset != 0 )\n      {\n        FT_Byte*  ids;\n\n\n        ids = p - 2 + offset;\n        if ( ids < glyph_ids || ids + code_count*2 > table + length )\n          FT_INVALID_OFFSET;\n\n        /* check glyph IDs */\n        if ( valid->level >= FT_VALIDATE_TIGHT )\n        {\n          FT_Byte*  limit = p + code_count * 2;\n          FT_UInt   idx;\n\n\n          for ( ; p < limit; )\n          {\n            idx = TT_NEXT_USHORT( p );\n            if ( idx != 0 )\n            {\n              idx = ( idx + delta ) & 0xFFFFU;\n              if ( idx >= TT_VALID_GLYPH_COUNT( valid ) )\n                FT_INVALID_GLYPH_ID;\n            }\n          }\n        }\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  /* return sub header corresponding to a given character code */\n  /* NULL on invalid charcode                                  */\n  static FT_Byte*\n  tt_cmap2_get_subheader( FT_Byte*   table,\n                          FT_UInt32  char_code )\n  {\n    FT_Byte*  result = NULL;\n\n\n    if ( char_code < 0x10000UL )\n    {\n      FT_UInt   char_lo = (FT_UInt)( char_code & 0xFF );\n      FT_UInt   char_hi = (FT_UInt)( char_code >> 8 );\n      FT_Byte*  p       = table + 6;    /* keys table */\n      FT_Byte*  subs    = table + 518;  /* subheaders table */\n      FT_Byte*  sub;\n\n\n      if ( char_hi == 0 )\n      {\n        /* an 8-bit character code -- we use subHeader 0 in this case */\n        /* to test whether the character code is in the charmap       */\n        /*                                                            */\n        sub = subs;  /* jump to first sub-header */\n\n        /* check that the sub-header for this byte is 0, which */\n        /* indicates that it is really a valid one-byte value  */\n        /* Otherwise, return 0                                 */\n        /*                                                     */\n        p += char_lo * 2;\n        if ( TT_PEEK_USHORT( p ) != 0 )\n          goto Exit;\n      }\n      else\n      {\n        /* a 16-bit character code */\n\n        /* jump to key entry  */\n        p  += char_hi * 2;\n        /* jump to sub-header */\n        sub = subs + ( FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 8 ) );\n\n        /* check that the high byte isn't a valid one-byte value */\n        if ( sub == subs )\n          goto Exit;\n      }\n      result = sub;\n    }\n  Exit:\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap2_char_index( TT_CMap    cmap,\n                       FT_UInt32  char_code )\n  {\n    FT_Byte*  table   = cmap->data;\n    FT_UInt   result  = 0;\n    FT_Byte*  subheader;\n\n\n    subheader = tt_cmap2_get_subheader( table, char_code );\n    if ( subheader )\n    {\n      FT_Byte*  p   = subheader;\n      FT_UInt   idx = (FT_UInt)(char_code & 0xFF);\n      FT_UInt   start, count;\n      FT_Int    delta;\n      FT_UInt   offset;\n\n\n      start  = TT_NEXT_USHORT( p );\n      count  = TT_NEXT_USHORT( p );\n      delta  = TT_NEXT_SHORT ( p );\n      offset = TT_PEEK_USHORT( p );\n\n      idx -= start;\n      if ( idx < count && offset != 0 )\n      {\n        p  += offset + 2 * idx;\n        idx = TT_PEEK_USHORT( p );\n\n        if ( idx != 0 )\n          result = (FT_UInt)( idx + delta ) & 0xFFFFU;\n      }\n    }\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  tt_cmap2_char_next( TT_CMap     cmap,\n                      FT_UInt32  *pcharcode )\n  {\n    FT_Byte*   table    = cmap->data;\n    FT_UInt    gindex   = 0;\n    FT_UInt32  result   = 0;\n    FT_UInt32  charcode = *pcharcode + 1;\n    FT_Byte*   subheader;\n\n\n    while ( charcode < 0x10000UL )\n    {\n      subheader = tt_cmap2_get_subheader( table, charcode );\n      if ( subheader )\n      {\n        FT_Byte*  p       = subheader;\n        FT_UInt   start   = TT_NEXT_USHORT( p );\n        FT_UInt   count   = TT_NEXT_USHORT( p );\n        FT_Int    delta   = TT_NEXT_SHORT ( p );\n        FT_UInt   offset  = TT_PEEK_USHORT( p );\n        FT_UInt   char_lo = (FT_UInt)( charcode & 0xFF );\n        FT_UInt   pos, idx;\n\n\n        if ( offset == 0 )\n          goto Next_SubHeader;\n\n        if ( char_lo < start )\n        {\n          char_lo = start;\n          pos     = 0;\n        }\n        else\n          pos = (FT_UInt)( char_lo - start );\n\n        p       += offset + pos * 2;\n        charcode = FT_PAD_FLOOR( charcode, 256 ) + char_lo;\n\n        for ( ; pos < count; pos++, charcode++ )\n        {\n          idx = TT_NEXT_USHORT( p );\n\n          if ( idx != 0 )\n          {\n            gindex = ( idx + delta ) & 0xFFFFU;\n            if ( gindex != 0 )\n            {\n              result = charcode;\n              goto Exit;\n            }\n          }\n        }\n      }\n\n      /* jump to next sub-header, i.e. higher byte value */\n    Next_SubHeader:\n      charcode = FT_PAD_FLOOR( charcode, 256 ) + 256;\n    }\n\n  Exit:\n    *pcharcode = result;\n\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap2_get_info( TT_CMap       cmap,\n                     TT_CMapInfo  *cmap_info )\n  {\n    FT_Byte*  p = cmap->data + 4;\n\n\n    cmap_info->format   = 2;\n    cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_TT_CMAP(\n    tt_cmap2_class_rec,\n    sizeof ( TT_CMapRec ),\n\n    (FT_CMap_InitFunc)     tt_cmap_init,\n    (FT_CMap_DoneFunc)     NULL,\n    (FT_CMap_CharIndexFunc)tt_cmap2_char_index,\n    (FT_CMap_CharNextFunc) tt_cmap2_char_next,\n\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n\n    2,\n    (TT_CMap_ValidateFunc)tt_cmap2_validate,\n    (TT_CMap_Info_GetFunc)tt_cmap2_get_info )\n\n#endif /* TT_CONFIG_CMAP_FORMAT_2 */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                           FORMAT 4                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TABLE OVERVIEW                                                        */\n  /* --------------                                                        */\n  /*                                                                       */\n  /*   NAME          OFFSET         TYPE              DESCRIPTION          */\n  /*                                                                       */\n  /*   format        0              USHORT            must be 4            */\n  /*   length        2              USHORT            table length         */\n  /*                                                  in bytes             */\n  /*   language      4              USHORT            Mac language code    */\n  /*                                                                       */\n  /*   segCountX2    6              USHORT            2*NUM_SEGS           */\n  /*   searchRange   8              USHORT            2*(1 << LOG_SEGS)    */\n  /*   entrySelector 10             USHORT            LOG_SEGS             */\n  /*   rangeShift    12             USHORT            segCountX2 -         */\n  /*                                                    searchRange        */\n  /*                                                                       */\n  /*   endCount      14             USHORT[NUM_SEGS]  end charcode for     */\n  /*                                                  each segment; last   */\n  /*                                                  is 0xFFFF            */\n  /*                                                                       */\n  /*   pad           14+NUM_SEGS*2  USHORT            padding              */\n  /*                                                                       */\n  /*   startCount    16+NUM_SEGS*2  USHORT[NUM_SEGS]  first charcode for   */\n  /*                                                  each segment         */\n  /*                                                                       */\n  /*   idDelta       16+NUM_SEGS*4  SHORT[NUM_SEGS]   delta for each       */\n  /*                                                  segment              */\n  /*   idOffset      16+NUM_SEGS*6  SHORT[NUM_SEGS]   range offset for     */\n  /*                                                  each segment; can be */\n  /*                                                  zero                 */\n  /*                                                                       */\n  /*   glyphIds      16+NUM_SEGS*8  USHORT[]          array of glyph ID    */\n  /*                                                  ranges               */\n  /*                                                                       */\n  /* Character codes are modelled by a series of ordered (increasing)      */\n  /* intervals called segments.  Each segment has start and end codes,     */\n  /* provided by the `startCount' and `endCount' arrays.  Segments must    */\n  /* not overlap, and the last segment should always contain the value     */\n  /* 0xFFFF for `endCount'.                                                */\n  /*                                                                       */\n  /* The fields `searchRange', `entrySelector' and `rangeShift' are better */\n  /* ignored (they are traces of over-engineering in the TrueType          */\n  /* specification).                                                       */\n  /*                                                                       */\n  /* Each segment also has a signed `delta', as well as an optional offset */\n  /* within the `glyphIds' table.                                          */\n  /*                                                                       */\n  /* If a segment's idOffset is 0, the glyph index corresponding to any    */\n  /* charcode within the segment is obtained by adding the value of        */\n  /* `idDelta' directly to the charcode, modulo 65536.                     */\n  /*                                                                       */\n  /* Otherwise, a glyph index is taken from the glyph IDs sub-array for    */\n  /* the segment, and the value of `idDelta' is added to it.               */\n  /*                                                                       */\n  /*                                                                       */\n  /* Finally, note that a lot of fonts contain an invalid last segment,    */\n  /* where `start' and `end' are correctly set to 0xFFFF but both `delta'  */\n  /* and `offset' are incorrect (e.g., `opens___.ttf' which comes with     */\n  /* OpenOffice.org).  We need special code to deal with them correctly.   */\n  /*                                                                       */\n\n#ifdef TT_CONFIG_CMAP_FORMAT_4\n\n  typedef struct  TT_CMap4Rec_\n  {\n    TT_CMapRec  cmap;\n    FT_UInt32   cur_charcode;   /* current charcode */\n    FT_UInt     cur_gindex;     /* current glyph index */\n\n    FT_UInt     num_ranges;\n    FT_UInt     cur_range;\n    FT_UInt     cur_start;\n    FT_UInt     cur_end;\n    FT_Int      cur_delta;\n    FT_Byte*    cur_values;\n\n  } TT_CMap4Rec, *TT_CMap4;\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap4_init( TT_CMap4  cmap,\n                 FT_Byte*  table )\n  {\n    FT_Byte*  p;\n\n\n    cmap->cmap.data    = table;\n\n    p                  = table + 6;\n    cmap->num_ranges   = FT_PEEK_USHORT( p ) >> 1;\n    cmap->cur_charcode = (FT_UInt32)0xFFFFFFFFUL;\n    cmap->cur_gindex   = 0;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Int\n  tt_cmap4_set_range( TT_CMap4  cmap,\n                      FT_UInt   range_index )\n  {\n    FT_Byte*  table = cmap->cmap.data;\n    FT_Byte*  p;\n    FT_UInt   num_ranges = cmap->num_ranges;\n\n\n    while ( range_index < num_ranges )\n    {\n      FT_UInt  offset;\n\n\n      p             = table + 14 + range_index * 2;\n      cmap->cur_end = FT_PEEK_USHORT( p );\n\n      p              += 2 + num_ranges * 2;\n      cmap->cur_start = FT_PEEK_USHORT( p );\n\n      p              += num_ranges * 2;\n      cmap->cur_delta = FT_PEEK_SHORT( p );\n\n      p     += num_ranges * 2;\n      offset = FT_PEEK_USHORT( p );\n\n      /* some fonts have an incorrect last segment; */\n      /* we have to catch it                        */\n      if ( range_index     >= num_ranges - 1 &&\n           cmap->cur_start == 0xFFFFU        &&\n           cmap->cur_end   == 0xFFFFU        )\n      {\n        TT_Face   face  = (TT_Face)cmap->cmap.cmap.charmap.face;\n        FT_Byte*  limit = face->cmap_table + face->cmap_size;\n\n\n        if ( offset && p + offset + 2 > limit )\n        {\n          cmap->cur_delta = 1;\n          offset          = 0;\n        }\n      }\n\n      if ( offset != 0xFFFFU )\n      {\n        cmap->cur_values = offset ? p + offset : NULL;\n        cmap->cur_range  = range_index;\n        return 0;\n      }\n\n      /* we skip empty segments */\n      range_index++;\n    }\n\n    return -1;\n  }\n\n\n  /* search the index of the charcode next to cmap->cur_charcode; */\n  /* caller should call tt_cmap4_set_range with proper range      */\n  /* before calling this function                                 */\n  /*                                                              */\n  static void\n  tt_cmap4_next( TT_CMap4  cmap )\n  {\n    FT_UInt  charcode;\n\n\n    if ( cmap->cur_charcode >= 0xFFFFUL )\n      goto Fail;\n\n    charcode = (FT_UInt)cmap->cur_charcode + 1;\n\n    if ( charcode < cmap->cur_start )\n      charcode = cmap->cur_start;\n\n    for ( ;; )\n    {\n      FT_Byte*  values = cmap->cur_values;\n      FT_UInt   end    = cmap->cur_end;\n      FT_Int    delta  = cmap->cur_delta;\n\n\n      if ( charcode <= end )\n      {\n        if ( values )\n        {\n          FT_Byte*  p = values + 2 * ( charcode - cmap->cur_start );\n\n\n          do\n          {\n            FT_UInt  gindex = FT_NEXT_USHORT( p );\n\n\n            if ( gindex != 0 )\n            {\n              gindex = (FT_UInt)( ( gindex + delta ) & 0xFFFFU );\n              if ( gindex != 0 )\n              {\n                cmap->cur_charcode = charcode;\n                cmap->cur_gindex   = gindex;\n                return;\n              }\n            }\n          } while ( ++charcode <= end );\n        }\n        else\n        {\n          do\n          {\n            FT_UInt  gindex = (FT_UInt)( ( charcode + delta ) & 0xFFFFU );\n\n\n            if ( gindex != 0 )\n            {\n              cmap->cur_charcode = charcode;\n              cmap->cur_gindex   = gindex;\n              return;\n            }\n          } while ( ++charcode <= end );\n        }\n      }\n\n      /* we need to find another range */\n      if ( tt_cmap4_set_range( cmap, cmap->cur_range + 1 ) < 0 )\n        break;\n\n      if ( charcode < cmap->cur_start )\n        charcode = cmap->cur_start;\n    }\n\n  Fail:\n    cmap->cur_charcode = (FT_UInt32)0xFFFFFFFFUL;\n    cmap->cur_gindex   = 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap4_validate( FT_Byte*      table,\n                     FT_Validator  valid )\n  {\n    FT_Byte*  p;\n    FT_UInt   length;\n\n    FT_Byte   *ends, *starts, *offsets, *deltas, *glyph_ids;\n    FT_UInt   num_segs;\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( table + 2 + 2 > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    p      = table + 2;           /* skip format */\n    length = TT_NEXT_USHORT( p );\n\n    /* in certain fonts, the `length' field is invalid and goes */\n    /* out of bound.  We try to correct this here...            */\n    if ( table + length > valid->limit )\n    {\n      if ( valid->level >= FT_VALIDATE_TIGHT )\n        FT_INVALID_TOO_SHORT;\n\n      length = (FT_UInt)( valid->limit - table );\n    }\n\n    if ( length < 16 )\n      FT_INVALID_TOO_SHORT;\n\n    p        = table + 6;\n    num_segs = TT_NEXT_USHORT( p );   /* read segCountX2 */\n\n    if ( valid->level >= FT_VALIDATE_PARANOID )\n    {\n      /* check that we have an even value here */\n      if ( num_segs & 1 )\n        FT_INVALID_DATA;\n    }\n\n    num_segs /= 2;\n\n    if ( length < 16 + num_segs * 2 * 4 )\n      FT_INVALID_TOO_SHORT;\n\n    /* check the search parameters - even though we never use them */\n    /*                                                             */\n    if ( valid->level >= FT_VALIDATE_PARANOID )\n    {\n      /* check the values of `searchRange', `entrySelector', `rangeShift' */\n      FT_UInt  search_range   = TT_NEXT_USHORT( p );\n      FT_UInt  entry_selector = TT_NEXT_USHORT( p );\n      FT_UInt  range_shift    = TT_NEXT_USHORT( p );\n\n\n      if ( ( search_range | range_shift ) & 1 )  /* must be even values */\n        FT_INVALID_DATA;\n\n      search_range /= 2;\n      range_shift  /= 2;\n\n      /* `search range' is the greatest power of 2 that is <= num_segs */\n\n      if ( search_range                > num_segs                 ||\n           search_range * 2            < num_segs                 ||\n           search_range + range_shift != num_segs                 ||\n           search_range               != ( 1U << entry_selector ) )\n        FT_INVALID_DATA;\n    }\n\n    ends      = table   + 14;\n    starts    = table   + 16 + num_segs * 2;\n    deltas    = starts  + num_segs * 2;\n    offsets   = deltas  + num_segs * 2;\n    glyph_ids = offsets + num_segs * 2;\n\n    /* check last segment; its end count value must be 0xFFFF */\n    if ( valid->level >= FT_VALIDATE_PARANOID )\n    {\n      p = ends + ( num_segs - 1 ) * 2;\n      if ( TT_PEEK_USHORT( p ) != 0xFFFFU )\n        FT_INVALID_DATA;\n    }\n\n    {\n      FT_UInt   start, end, offset, n;\n      FT_UInt   last_start = 0, last_end = 0;\n      FT_Int    delta;\n      FT_Byte*  p_start   = starts;\n      FT_Byte*  p_end     = ends;\n      FT_Byte*  p_delta   = deltas;\n      FT_Byte*  p_offset  = offsets;\n\n\n      for ( n = 0; n < num_segs; n++ )\n      {\n        p      = p_offset;\n        start  = TT_NEXT_USHORT( p_start );\n        end    = TT_NEXT_USHORT( p_end );\n        delta  = TT_NEXT_SHORT( p_delta );\n        offset = TT_NEXT_USHORT( p_offset );\n\n        if ( start > end )\n          FT_INVALID_DATA;\n\n        /* this test should be performed at default validation level; */\n        /* unfortunately, some popular Asian fonts have overlapping   */\n        /* ranges in their charmaps                                   */\n        /*                                                            */\n        if ( start <= last_end && n > 0 )\n        {\n          if ( valid->level >= FT_VALIDATE_TIGHT )\n            FT_INVALID_DATA;\n          else\n          {\n            /* allow overlapping segments, provided their start points */\n            /* and end points, respectively, are in ascending order    */\n            /*                                                         */\n            if ( last_start > start || last_end > end )\n              error |= TT_CMAP_FLAG_UNSORTED;\n            else\n              error |= TT_CMAP_FLAG_OVERLAPPING;\n          }\n        }\n\n        if ( offset && offset != 0xFFFFU )\n        {\n          p += offset;  /* start of glyph ID array */\n\n          /* check that we point within the glyph IDs table only */\n          if ( valid->level >= FT_VALIDATE_TIGHT )\n          {\n            if ( p < glyph_ids                                ||\n                 p + ( end - start + 1 ) * 2 > table + length )\n              FT_INVALID_DATA;\n          }\n          /* Some fonts handle the last segment incorrectly.  In */\n          /* theory, 0xFFFF might point to an ordinary glyph --  */\n          /* a cmap 4 is versatile and could be used for any     */\n          /* encoding, not only Unicode.  However, reality shows */\n          /* that far too many fonts are sloppy and incorrectly  */\n          /* set all fields but `start' and `end' for the last   */\n          /* segment if it contains only a single character.     */\n          /*                                                     */\n          /* We thus omit the test here, delaying it to the      */\n          /* routines which actually access the cmap.            */\n          else if ( n != num_segs - 1                       ||\n                    !( start == 0xFFFFU && end == 0xFFFFU ) )\n          {\n            if ( p < glyph_ids                              ||\n                 p + ( end - start + 1 ) * 2 > valid->limit )\n              FT_INVALID_DATA;\n          }\n\n          /* check glyph indices within the segment range */\n          if ( valid->level >= FT_VALIDATE_TIGHT )\n          {\n            FT_UInt  i, idx;\n\n\n            for ( i = start; i < end; i++ )\n            {\n              idx = FT_NEXT_USHORT( p );\n              if ( idx != 0 )\n              {\n                idx = (FT_UInt)( idx + delta ) & 0xFFFFU;\n\n                if ( idx >= TT_VALID_GLYPH_COUNT( valid ) )\n                  FT_INVALID_GLYPH_ID;\n              }\n            }\n          }\n        }\n        else if ( offset == 0xFFFFU )\n        {\n          /* some fonts (erroneously?) use a range offset of 0xFFFF */\n          /* to mean missing glyph in cmap table                    */\n          /*                                                        */\n          if ( valid->level >= FT_VALIDATE_PARANOID    ||\n               n != num_segs - 1                       ||\n               !( start == 0xFFFFU && end == 0xFFFFU ) )\n            FT_INVALID_DATA;\n        }\n\n        last_start = start;\n        last_end   = end;\n      }\n    }\n\n    return error;\n  }\n\n\n  static FT_UInt\n  tt_cmap4_char_map_linear( TT_CMap     cmap,\n                            FT_UInt32*  pcharcode,\n                            FT_Bool     next )\n  {\n    FT_UInt    num_segs2, start, end, offset;\n    FT_Int     delta;\n    FT_UInt    i, num_segs;\n    FT_UInt32  charcode = *pcharcode;\n    FT_UInt    gindex   = 0;\n    FT_Byte*   p;\n\n\n    p = cmap->data + 6;\n    num_segs2 = FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 2 );\n\n    num_segs = num_segs2 >> 1;\n\n    if ( !num_segs )\n      return 0;\n\n    if ( next )\n      charcode++;\n\n    /* linear search */\n    for ( ; charcode <= 0xFFFFU; charcode++ )\n    {\n      FT_Byte*  q;\n\n\n      p = cmap->data + 14;               /* ends table   */\n      q = cmap->data + 16 + num_segs2;   /* starts table */\n\n      for ( i = 0; i < num_segs; i++ )\n      {\n        end   = TT_NEXT_USHORT( p );\n        start = TT_NEXT_USHORT( q );\n\n        if ( charcode >= start && charcode <= end )\n        {\n          p       = q - 2 + num_segs2;\n          delta   = TT_PEEK_SHORT( p );\n          p      += num_segs2;\n          offset  = TT_PEEK_USHORT( p );\n\n          /* some fonts have an incorrect last segment; */\n          /* we have to catch it                        */\n          if ( i >= num_segs - 1                  &&\n               start == 0xFFFFU && end == 0xFFFFU )\n          {\n            TT_Face   face  = (TT_Face)cmap->cmap.charmap.face;\n            FT_Byte*  limit = face->cmap_table + face->cmap_size;\n\n\n            if ( offset && p + offset + 2 > limit )\n            {\n              delta  = 1;\n              offset = 0;\n            }\n          }\n\n          if ( offset == 0xFFFFU )\n            continue;\n\n          if ( offset )\n          {\n            p += offset + ( charcode - start ) * 2;\n            gindex = TT_PEEK_USHORT( p );\n            if ( gindex != 0 )\n              gindex = (FT_UInt)( gindex + delta ) & 0xFFFFU;\n          }\n          else\n            gindex = (FT_UInt)( charcode + delta ) & 0xFFFFU;\n\n          break;\n        }\n      }\n\n      if ( !next || gindex )\n        break;\n    }\n\n    if ( next && gindex )\n      *pcharcode = charcode;\n\n    return gindex;\n  }\n\n\n  static FT_UInt\n  tt_cmap4_char_map_binary( TT_CMap     cmap,\n                            FT_UInt32*  pcharcode,\n                            FT_Bool     next )\n  {\n    FT_UInt   num_segs2, start, end, offset;\n    FT_Int    delta;\n    FT_UInt   max, min, mid, num_segs;\n    FT_UInt   charcode = (FT_UInt)*pcharcode;\n    FT_UInt   gindex   = 0;\n    FT_Byte*  p;\n\n\n    p = cmap->data + 6;\n    num_segs2 = FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 2 );\n\n    if ( !num_segs2 )\n      return 0;\n\n    num_segs = num_segs2 >> 1;\n\n    /* make compiler happy */\n    mid = num_segs;\n    end = 0xFFFFU;\n\n    if ( next )\n      charcode++;\n\n    min = 0;\n    max = num_segs;\n\n    /* binary search */\n    while ( min < max )\n    {\n      mid    = ( min + max ) >> 1;\n      p      = cmap->data + 14 + mid * 2;\n      end    = TT_PEEK_USHORT( p );\n      p     += 2 + num_segs2;\n      start  = TT_PEEK_USHORT( p );\n\n      if ( charcode < start )\n        max = mid;\n      else if ( charcode > end )\n        min = mid + 1;\n      else\n      {\n        p     += num_segs2;\n        delta  = TT_PEEK_SHORT( p );\n        p     += num_segs2;\n        offset = TT_PEEK_USHORT( p );\n\n        /* some fonts have an incorrect last segment; */\n        /* we have to catch it                        */\n        if ( mid >= num_segs - 1                &&\n             start == 0xFFFFU && end == 0xFFFFU )\n        {\n          TT_Face   face  = (TT_Face)cmap->cmap.charmap.face;\n          FT_Byte*  limit = face->cmap_table + face->cmap_size;\n\n\n          if ( offset && p + offset + 2 > limit )\n          {\n            delta  = 1;\n            offset = 0;\n          }\n        }\n\n        /* search the first segment containing `charcode' */\n        if ( cmap->flags & TT_CMAP_FLAG_OVERLAPPING )\n        {\n          FT_UInt  i;\n\n\n          /* call the current segment `max' */\n          max = mid;\n\n          if ( offset == 0xFFFFU )\n            mid = max + 1;\n\n          /* search in segments before the current segment */\n          for ( i = max ; i > 0; i-- )\n          {\n            FT_UInt   prev_end;\n            FT_Byte*  old_p;\n\n\n            old_p    = p;\n            p        = cmap->data + 14 + ( i - 1 ) * 2;\n            prev_end = TT_PEEK_USHORT( p );\n\n            if ( charcode > prev_end )\n            {\n              p = old_p;\n              break;\n            }\n\n            end    = prev_end;\n            p     += 2 + num_segs2;\n            start  = TT_PEEK_USHORT( p );\n            p     += num_segs2;\n            delta  = TT_PEEK_SHORT( p );\n            p     += num_segs2;\n            offset = TT_PEEK_USHORT( p );\n\n            if ( offset != 0xFFFFU )\n              mid = i - 1;\n          }\n\n          /* no luck */\n          if ( mid == max + 1 )\n          {\n            if ( i != max )\n            {\n              p      = cmap->data + 14 + max * 2;\n              end    = TT_PEEK_USHORT( p );\n              p     += 2 + num_segs2;\n              start  = TT_PEEK_USHORT( p );\n              p     += num_segs2;\n              delta  = TT_PEEK_SHORT( p );\n              p     += num_segs2;\n              offset = TT_PEEK_USHORT( p );\n            }\n\n            mid = max;\n\n            /* search in segments after the current segment */\n            for ( i = max + 1; i < num_segs; i++ )\n            {\n              FT_UInt  next_end, next_start;\n\n\n              p          = cmap->data + 14 + i * 2;\n              next_end   = TT_PEEK_USHORT( p );\n              p         += 2 + num_segs2;\n              next_start = TT_PEEK_USHORT( p );\n\n              if ( charcode < next_start )\n                break;\n\n              end    = next_end;\n              start  = next_start;\n              p     += num_segs2;\n              delta  = TT_PEEK_SHORT( p );\n              p     += num_segs2;\n              offset = TT_PEEK_USHORT( p );\n\n              if ( offset != 0xFFFFU )\n                mid = i;\n            }\n            i--;\n\n            /* still no luck */\n            if ( mid == max )\n            {\n              mid = i;\n\n              break;\n            }\n          }\n\n          /* end, start, delta, and offset are for the i'th segment */\n          if ( mid != i )\n          {\n            p      = cmap->data + 14 + mid * 2;\n            end    = TT_PEEK_USHORT( p );\n            p     += 2 + num_segs2;\n            start  = TT_PEEK_USHORT( p );\n            p     += num_segs2;\n            delta  = TT_PEEK_SHORT( p );\n            p     += num_segs2;\n            offset = TT_PEEK_USHORT( p );\n          }\n        }\n        else\n        {\n          if ( offset == 0xFFFFU )\n            break;\n        }\n\n        if ( offset )\n        {\n          p += offset + ( charcode - start ) * 2;\n          gindex = TT_PEEK_USHORT( p );\n          if ( gindex != 0 )\n            gindex = (FT_UInt)( gindex + delta ) & 0xFFFFU;\n        }\n        else\n          gindex = (FT_UInt)( charcode + delta ) & 0xFFFFU;\n\n        break;\n      }\n    }\n\n    if ( next )\n    {\n      TT_CMap4  cmap4 = (TT_CMap4)cmap;\n\n\n      /* if `charcode' is not in any segment, then `mid' is */\n      /* the segment nearest to `charcode'                  */\n      /*                                                    */\n\n      if ( charcode > end )\n      {\n        mid++;\n        if ( mid == num_segs )\n          return 0;\n      }\n\n      if ( tt_cmap4_set_range( cmap4, mid ) )\n      {\n        if ( gindex )\n          *pcharcode = charcode;\n      }\n      else\n      {\n        cmap4->cur_charcode = charcode;\n\n        if ( gindex )\n          cmap4->cur_gindex = gindex;\n        else\n        {\n          cmap4->cur_charcode = charcode;\n          tt_cmap4_next( cmap4 );\n          gindex = cmap4->cur_gindex;\n        }\n\n        if ( gindex )\n          *pcharcode = cmap4->cur_charcode;\n      }\n    }\n\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap4_char_index( TT_CMap    cmap,\n                       FT_UInt32  char_code )\n  {\n    if ( char_code >= 0x10000UL )\n      return 0;\n\n    if ( cmap->flags & TT_CMAP_FLAG_UNSORTED )\n      return tt_cmap4_char_map_linear( cmap, &char_code, 0 );\n    else\n      return tt_cmap4_char_map_binary( cmap, &char_code, 0 );\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  tt_cmap4_char_next( TT_CMap     cmap,\n                      FT_UInt32  *pchar_code )\n  {\n    FT_UInt  gindex;\n\n\n    if ( *pchar_code >= 0xFFFFU )\n      return 0;\n\n    if ( cmap->flags & TT_CMAP_FLAG_UNSORTED )\n      gindex = tt_cmap4_char_map_linear( cmap, pchar_code, 1 );\n    else\n    {\n      TT_CMap4  cmap4 = (TT_CMap4)cmap;\n\n\n      /* no need to search */\n      if ( *pchar_code == cmap4->cur_charcode )\n      {\n        tt_cmap4_next( cmap4 );\n        gindex = cmap4->cur_gindex;\n        if ( gindex )\n          *pchar_code = cmap4->cur_charcode;\n      }\n      else\n        gindex = tt_cmap4_char_map_binary( cmap, pchar_code, 1 );\n    }\n\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap4_get_info( TT_CMap       cmap,\n                     TT_CMapInfo  *cmap_info )\n  {\n    FT_Byte*  p = cmap->data + 4;\n\n\n    cmap_info->format   = 4;\n    cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_TT_CMAP(\n    tt_cmap4_class_rec,\n    sizeof ( TT_CMap4Rec ),\n    (FT_CMap_InitFunc)     tt_cmap4_init,\n    (FT_CMap_DoneFunc)     NULL,\n    (FT_CMap_CharIndexFunc)tt_cmap4_char_index,\n    (FT_CMap_CharNextFunc) tt_cmap4_char_next,\n\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n\n    4,\n    (TT_CMap_ValidateFunc)tt_cmap4_validate,\n    (TT_CMap_Info_GetFunc)tt_cmap4_get_info )\n\n#endif /* TT_CONFIG_CMAP_FORMAT_4 */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          FORMAT 6                             *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TABLE OVERVIEW                                                        */\n  /* --------------                                                        */\n  /*                                                                       */\n  /*   NAME        OFFSET          TYPE             DESCRIPTION            */\n  /*                                                                       */\n  /*   format       0              USHORT           must be 4              */\n  /*   length       2              USHORT           table length in bytes  */\n  /*   language     4              USHORT           Mac language code      */\n  /*                                                                       */\n  /*   first        6              USHORT           first segment code     */\n  /*   count        8              USHORT           segment size in chars  */\n  /*   glyphIds     10             USHORT[count]    glyph IDs              */\n  /*                                                                       */\n  /* A very simplified segment mapping.                                    */\n  /*                                                                       */\n\n#ifdef TT_CONFIG_CMAP_FORMAT_6\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap6_validate( FT_Byte*      table,\n                     FT_Validator  valid )\n  {\n    FT_Byte*  p;\n    FT_UInt   length, count;\n\n\n    if ( table + 10 > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    p      = table + 2;\n    length = TT_NEXT_USHORT( p );\n\n    p      = table + 8;             /* skip language and start index */\n    count  = TT_NEXT_USHORT( p );\n\n    if ( table + length > valid->limit || length < 10 + count * 2 )\n      FT_INVALID_TOO_SHORT;\n\n    /* check glyph indices */\n    if ( valid->level >= FT_VALIDATE_TIGHT )\n    {\n      FT_UInt  gindex;\n\n\n      for ( ; count > 0; count-- )\n      {\n        gindex = TT_NEXT_USHORT( p );\n        if ( gindex >= TT_VALID_GLYPH_COUNT( valid ) )\n          FT_INVALID_GLYPH_ID;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap6_char_index( TT_CMap    cmap,\n                       FT_UInt32  char_code )\n  {\n    FT_Byte*  table  = cmap->data;\n    FT_UInt   result = 0;\n    FT_Byte*  p      = table + 6;\n    FT_UInt   start  = TT_NEXT_USHORT( p );\n    FT_UInt   count  = TT_NEXT_USHORT( p );\n    FT_UInt   idx    = (FT_UInt)( char_code - start );\n\n\n    if ( idx < count )\n    {\n      p += 2 * idx;\n      result = TT_PEEK_USHORT( p );\n    }\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  tt_cmap6_char_next( TT_CMap     cmap,\n                      FT_UInt32  *pchar_code )\n  {\n    FT_Byte*   table     = cmap->data;\n    FT_UInt32  result    = 0;\n    FT_UInt32  char_code = *pchar_code + 1;\n    FT_UInt    gindex    = 0;\n\n    FT_Byte*   p         = table + 6;\n    FT_UInt    start     = TT_NEXT_USHORT( p );\n    FT_UInt    count     = TT_NEXT_USHORT( p );\n    FT_UInt    idx;\n\n\n    if ( char_code >= 0x10000UL )\n      goto Exit;\n\n    if ( char_code < start )\n      char_code = start;\n\n    idx = (FT_UInt)( char_code - start );\n    p  += 2 * idx;\n\n    for ( ; idx < count; idx++ )\n    {\n      gindex = TT_NEXT_USHORT( p );\n      if ( gindex != 0 )\n      {\n        result = char_code;\n        break;\n      }\n      char_code++;\n    }\n\n  Exit:\n    *pchar_code = result;\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap6_get_info( TT_CMap       cmap,\n                     TT_CMapInfo  *cmap_info )\n  {\n    FT_Byte*  p = cmap->data + 4;\n\n\n    cmap_info->format   = 6;\n    cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_TT_CMAP(\n    tt_cmap6_class_rec,\n    sizeof ( TT_CMapRec ),\n\n    (FT_CMap_InitFunc)     tt_cmap_init,\n    (FT_CMap_DoneFunc)     NULL,\n    (FT_CMap_CharIndexFunc)tt_cmap6_char_index,\n    (FT_CMap_CharNextFunc) tt_cmap6_char_next,\n\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n\n    6,\n    (TT_CMap_ValidateFunc)tt_cmap6_validate,\n    (TT_CMap_Info_GetFunc)tt_cmap6_get_info )\n\n#endif /* TT_CONFIG_CMAP_FORMAT_6 */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          FORMAT 8                             *****/\n  /*****                                                               *****/\n  /***** It is hard to completely understand what the OpenType spec    *****/\n  /***** says about this format, but here is my conclusion.            *****/\n  /*****                                                               *****/\n  /***** The purpose of this format is to easily map UTF-16 text to    *****/\n  /***** glyph indices.  Basically, the `char_code' must be in one of  *****/\n  /***** the following formats:                                        *****/\n  /*****                                                               *****/\n  /*****   - A 16-bit value that isn't part of the Unicode Surrogates  *****/\n  /*****     Area (i.e. U+D800-U+DFFF).                                *****/\n  /*****                                                               *****/\n  /*****   - A 32-bit value, made of two surrogate values, i.e.. if    *****/\n  /*****     `char_code = (char_hi << 16) | char_lo', then both        *****/\n  /*****     `char_hi' and `char_lo' must be in the Surrogates Area.   *****/\n  /*****      Area.                                                    *****/\n  /*****                                                               *****/\n  /***** The `is32' table embedded in the charmap indicates whether a  *****/\n  /***** given 16-bit value is in the surrogates area or not.          *****/\n  /*****                                                               *****/\n  /***** So, for any given `char_code', we can assert the following:   *****/\n  /*****                                                               *****/\n  /*****   If `char_hi == 0' then we must have `is32[char_lo] == 0'.   *****/\n  /*****                                                               *****/\n  /*****   If `char_hi != 0' then we must have both                    *****/\n  /*****   `is32[char_hi] != 0' and `is32[char_lo] != 0'.              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TABLE OVERVIEW                                                        */\n  /* --------------                                                        */\n  /*                                                                       */\n  /*   NAME        OFFSET         TYPE        DESCRIPTION                  */\n  /*                                                                       */\n  /*   format      0              USHORT      must be 8                    */\n  /*   reserved    2              USHORT      reserved                     */\n  /*   length      4              ULONG       length in bytes              */\n  /*   language    8              ULONG       Mac language code            */\n  /*   is32        12             BYTE[8192]  32-bitness bitmap            */\n  /*   count       8204           ULONG       number of groups             */\n  /*                                                                       */\n  /* This header is followed by `count' groups of the following format:    */\n  /*                                                                       */\n  /*   start       0              ULONG       first charcode               */\n  /*   end         4              ULONG       last charcode                */\n  /*   startId     8              ULONG       start glyph ID for the group */\n  /*                                                                       */\n\n#ifdef TT_CONFIG_CMAP_FORMAT_8\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap8_validate( FT_Byte*      table,\n                     FT_Validator  valid )\n  {\n    FT_Byte*   p = table + 4;\n    FT_Byte*   is32;\n    FT_UInt32  length;\n    FT_UInt32  num_groups;\n\n\n    if ( table + 16 + 8192 > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    length = TT_NEXT_ULONG( p );\n    if ( length > (FT_UInt32)( valid->limit - table ) || length < 8192 + 16 )\n      FT_INVALID_TOO_SHORT;\n\n    is32       = table + 12;\n    p          = is32  + 8192;          /* skip `is32' array */\n    num_groups = TT_NEXT_ULONG( p );\n\n    /* p + num_groups * 12 > valid->limit ? */\n    if ( num_groups > (FT_UInt32)( valid->limit - p ) / 12 )\n      FT_INVALID_TOO_SHORT;\n\n    /* check groups, they must be in increasing order */\n    {\n      FT_UInt32  n, start, end, start_id, count, last = 0;\n\n\n      for ( n = 0; n < num_groups; n++ )\n      {\n        FT_UInt   hi, lo;\n\n\n        start    = TT_NEXT_ULONG( p );\n        end      = TT_NEXT_ULONG( p );\n        start_id = TT_NEXT_ULONG( p );\n\n        if ( start > end )\n          FT_INVALID_DATA;\n\n        if ( n > 0 && start <= last )\n          FT_INVALID_DATA;\n\n        if ( valid->level >= FT_VALIDATE_TIGHT )\n        {\n          FT_UInt32  d = end - start;\n\n\n          /* start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) ? */\n          if ( d > TT_VALID_GLYPH_COUNT( valid )             ||\n               start_id >= TT_VALID_GLYPH_COUNT( valid ) - d )\n            FT_INVALID_GLYPH_ID;\n\n          count = (FT_UInt32)( end - start + 1 );\n\n          if ( start & ~0xFFFFU )\n          {\n            /* start_hi != 0; check that is32[i] is 1 for each i in */\n            /* the `hi' and `lo' of the range [start..end]          */\n            for ( ; count > 0; count--, start++ )\n            {\n              hi = (FT_UInt)( start >> 16 );\n              lo = (FT_UInt)( start & 0xFFFFU );\n\n              if ( (is32[hi >> 3] & ( 0x80 >> ( hi & 7 ) ) ) == 0 )\n                FT_INVALID_DATA;\n\n              if ( (is32[lo >> 3] & ( 0x80 >> ( lo & 7 ) ) ) == 0 )\n                FT_INVALID_DATA;\n            }\n          }\n          else\n          {\n            /* start_hi == 0; check that is32[i] is 0 for each i in */\n            /* the range [start..end]                               */\n\n            /* end_hi cannot be != 0! */\n            if ( end & ~0xFFFFU )\n              FT_INVALID_DATA;\n\n            for ( ; count > 0; count--, start++ )\n            {\n              lo = (FT_UInt)( start & 0xFFFFU );\n\n              if ( (is32[lo >> 3] & ( 0x80 >> ( lo & 7 ) ) ) != 0 )\n                FT_INVALID_DATA;\n            }\n          }\n        }\n\n        last = end;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap8_char_index( TT_CMap    cmap,\n                       FT_UInt32  char_code )\n  {\n    FT_Byte*   table      = cmap->data;\n    FT_UInt    result     = 0;\n    FT_Byte*   p          = table + 8204;\n    FT_UInt32  num_groups = TT_NEXT_ULONG( p );\n    FT_UInt32  start, end, start_id;\n\n\n    for ( ; num_groups > 0; num_groups-- )\n    {\n      start    = TT_NEXT_ULONG( p );\n      end      = TT_NEXT_ULONG( p );\n      start_id = TT_NEXT_ULONG( p );\n\n      if ( char_code < start )\n        break;\n\n      if ( char_code <= end )\n      {\n        result = (FT_UInt)( start_id + char_code - start );\n        break;\n      }\n    }\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  tt_cmap8_char_next( TT_CMap     cmap,\n                      FT_UInt32  *pchar_code )\n  {\n    FT_UInt32  result     = 0;\n    FT_UInt32  char_code  = *pchar_code + 1;\n    FT_UInt    gindex     = 0;\n    FT_Byte*   table      = cmap->data;\n    FT_Byte*   p          = table + 8204;\n    FT_UInt32  num_groups = TT_NEXT_ULONG( p );\n    FT_UInt32  start, end, start_id;\n\n\n    p = table + 8208;\n\n    for ( ; num_groups > 0; num_groups-- )\n    {\n      start    = TT_NEXT_ULONG( p );\n      end      = TT_NEXT_ULONG( p );\n      start_id = TT_NEXT_ULONG( p );\n\n      if ( char_code < start )\n        char_code = start;\n\n      if ( char_code <= end )\n      {\n        gindex = (FT_UInt)( char_code - start + start_id );\n        if ( gindex != 0 )\n        {\n          result = char_code;\n          goto Exit;\n        }\n      }\n    }\n\n  Exit:\n    *pchar_code = result;\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap8_get_info( TT_CMap       cmap,\n                     TT_CMapInfo  *cmap_info )\n  {\n    FT_Byte*  p = cmap->data + 8;\n\n\n    cmap_info->format   = 8;\n    cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_TT_CMAP(\n    tt_cmap8_class_rec,\n    sizeof ( TT_CMapRec ),\n\n    (FT_CMap_InitFunc)     tt_cmap_init,\n    (FT_CMap_DoneFunc)     NULL,\n    (FT_CMap_CharIndexFunc)tt_cmap8_char_index,\n    (FT_CMap_CharNextFunc) tt_cmap8_char_next,\n\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n\n    8,\n    (TT_CMap_ValidateFunc)tt_cmap8_validate,\n    (TT_CMap_Info_GetFunc)tt_cmap8_get_info )\n\n#endif /* TT_CONFIG_CMAP_FORMAT_8 */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          FORMAT 10                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TABLE OVERVIEW                                                        */\n  /* --------------                                                        */\n  /*                                                                       */\n  /*   NAME      OFFSET  TYPE               DESCRIPTION                    */\n  /*                                                                       */\n  /*   format     0      USHORT             must be 10                     */\n  /*   reserved   2      USHORT             reserved                       */\n  /*   length     4      ULONG              length in bytes                */\n  /*   language   8      ULONG              Mac language code              */\n  /*                                                                       */\n  /*   start     12      ULONG              first char in range            */\n  /*   count     16      ULONG              number of chars in range       */\n  /*   glyphIds  20      USHORT[count]      glyph indices covered          */\n  /*                                                                       */\n\n#ifdef TT_CONFIG_CMAP_FORMAT_10\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap10_validate( FT_Byte*      table,\n                      FT_Validator  valid )\n  {\n    FT_Byte*  p = table + 4;\n    FT_ULong  length, count;\n\n\n    if ( table + 20 > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    length = TT_NEXT_ULONG( p );\n    p      = table + 16;\n    count  = TT_NEXT_ULONG( p );\n\n    if ( length > (FT_ULong)( valid->limit - table ) ||\n         /* length < 20 + count * 2 ? */\n         length < 20                                 ||\n         ( length - 20 ) / 2 < count                 )\n      FT_INVALID_TOO_SHORT;\n\n    /* check glyph indices */\n    if ( valid->level >= FT_VALIDATE_TIGHT )\n    {\n      FT_UInt  gindex;\n\n\n      for ( ; count > 0; count-- )\n      {\n        gindex = TT_NEXT_USHORT( p );\n        if ( gindex >= TT_VALID_GLYPH_COUNT( valid ) )\n          FT_INVALID_GLYPH_ID;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap10_char_index( TT_CMap    cmap,\n                        FT_UInt32  char_code )\n  {\n    FT_Byte*   table  = cmap->data;\n    FT_UInt    result = 0;\n    FT_Byte*   p      = table + 12;\n    FT_UInt32  start  = TT_NEXT_ULONG( p );\n    FT_UInt32  count  = TT_NEXT_ULONG( p );\n    FT_UInt32  idx    = (FT_ULong)( char_code - start );\n\n\n    if ( idx < count )\n    {\n      p     += 2 * idx;\n      result = TT_PEEK_USHORT( p );\n    }\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  tt_cmap10_char_next( TT_CMap     cmap,\n                       FT_UInt32  *pchar_code )\n  {\n    FT_Byte*   table     = cmap->data;\n    FT_UInt32  char_code = *pchar_code + 1;\n    FT_UInt    gindex    = 0;\n    FT_Byte*   p         = table + 12;\n    FT_UInt32  start     = TT_NEXT_ULONG( p );\n    FT_UInt32  count     = TT_NEXT_ULONG( p );\n    FT_UInt32  idx;\n\n\n    if ( char_code < start )\n      char_code = start;\n\n    idx = (FT_UInt32)( char_code - start );\n    p  += 2 * idx;\n\n    for ( ; idx < count; idx++ )\n    {\n      gindex = TT_NEXT_USHORT( p );\n      if ( gindex != 0 )\n        break;\n      char_code++;\n    }\n\n    *pchar_code = char_code;\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap10_get_info( TT_CMap       cmap,\n                      TT_CMapInfo  *cmap_info )\n  {\n    FT_Byte*  p = cmap->data + 8;\n\n\n    cmap_info->format   = 10;\n    cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_TT_CMAP(\n    tt_cmap10_class_rec,\n    sizeof ( TT_CMapRec ),\n\n    (FT_CMap_InitFunc)     tt_cmap_init,\n    (FT_CMap_DoneFunc)     NULL,\n    (FT_CMap_CharIndexFunc)tt_cmap10_char_index,\n    (FT_CMap_CharNextFunc) tt_cmap10_char_next,\n\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n\n    10,\n    (TT_CMap_ValidateFunc)tt_cmap10_validate,\n    (TT_CMap_Info_GetFunc)tt_cmap10_get_info )\n\n#endif /* TT_CONFIG_CMAP_FORMAT_10 */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          FORMAT 12                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TABLE OVERVIEW                                                        */\n  /* --------------                                                        */\n  /*                                                                       */\n  /*   NAME        OFFSET     TYPE       DESCRIPTION                       */\n  /*                                                                       */\n  /*   format      0          USHORT     must be 12                        */\n  /*   reserved    2          USHORT     reserved                          */\n  /*   length      4          ULONG      length in bytes                   */\n  /*   language    8          ULONG      Mac language code                 */\n  /*   count       12         ULONG      number of groups                  */\n  /*               16                                                      */\n  /*                                                                       */\n  /* This header is followed by `count' groups of the following format:    */\n  /*                                                                       */\n  /*   start       0          ULONG      first charcode                    */\n  /*   end         4          ULONG      last charcode                     */\n  /*   startId     8          ULONG      start glyph ID for the group      */\n  /*                                                                       */\n\n#ifdef TT_CONFIG_CMAP_FORMAT_12\n\n  typedef struct  TT_CMap12Rec_\n  {\n    TT_CMapRec  cmap;\n    FT_Bool     valid;\n    FT_ULong    cur_charcode;\n    FT_UInt     cur_gindex;\n    FT_ULong    cur_group;\n    FT_ULong    num_groups;\n\n  } TT_CMap12Rec, *TT_CMap12;\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap12_init( TT_CMap12  cmap,\n                  FT_Byte*   table )\n  {\n    cmap->cmap.data  = table;\n\n    table           += 12;\n    cmap->num_groups = FT_PEEK_ULONG( table );\n\n    cmap->valid      = 0;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap12_validate( FT_Byte*      table,\n                      FT_Validator  valid )\n  {\n    FT_Byte*  p;\n    FT_ULong  length;\n    FT_ULong  num_groups;\n\n\n    if ( table + 16 > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    p      = table + 4;\n    length = TT_NEXT_ULONG( p );\n\n    p          = table + 12;\n    num_groups = TT_NEXT_ULONG( p );\n\n    if ( length > (FT_ULong)( valid->limit - table ) ||\n         /* length < 16 + 12 * num_groups ? */\n         length < 16                                 ||\n         ( length - 16 ) / 12 < num_groups           )\n      FT_INVALID_TOO_SHORT;\n\n    /* check groups, they must be in increasing order */\n    {\n      FT_ULong  n, start, end, start_id, last = 0;\n\n\n      for ( n = 0; n < num_groups; n++ )\n      {\n        start    = TT_NEXT_ULONG( p );\n        end      = TT_NEXT_ULONG( p );\n        start_id = TT_NEXT_ULONG( p );\n\n        if ( start > end )\n          FT_INVALID_DATA;\n\n        if ( n > 0 && start <= last )\n          FT_INVALID_DATA;\n\n        if ( valid->level >= FT_VALIDATE_TIGHT )\n        {\n          FT_UInt32  d = end - start;\n\n\n          /* start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) ? */\n          if ( d > TT_VALID_GLYPH_COUNT( valid )             ||\n               start_id >= TT_VALID_GLYPH_COUNT( valid ) - d )\n            FT_INVALID_GLYPH_ID;\n        }\n\n        last = end;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  /* search the index of the charcode next to cmap->cur_charcode */\n  /* cmap->cur_group should be set up properly by caller         */\n  /*                                                             */\n  static void\n  tt_cmap12_next( TT_CMap12  cmap )\n  {\n    FT_Byte*  p;\n    FT_ULong  start, end, start_id, char_code;\n    FT_ULong  n;\n    FT_UInt   gindex;\n\n\n    if ( cmap->cur_charcode >= 0xFFFFFFFFUL )\n      goto Fail;\n\n    char_code = cmap->cur_charcode + 1;\n\n    for ( n = cmap->cur_group; n < cmap->num_groups; n++ )\n    {\n      p        = cmap->cmap.data + 16 + 12 * n;\n      start    = TT_NEXT_ULONG( p );\n      end      = TT_NEXT_ULONG( p );\n      start_id = TT_PEEK_ULONG( p );\n\n      if ( char_code < start )\n        char_code = start;\n\n      for ( ; char_code <= end; char_code++ )\n      {\n        gindex = (FT_UInt)( start_id + char_code - start );\n\n        if ( gindex )\n        {\n          cmap->cur_charcode = char_code;;\n          cmap->cur_gindex   = gindex;\n          cmap->cur_group    = n;\n\n          return;\n        }\n      }\n    }\n\n  Fail:\n    cmap->valid = 0;\n  }\n\n\n  static FT_UInt\n  tt_cmap12_char_map_binary( TT_CMap     cmap,\n                             FT_UInt32*  pchar_code,\n                             FT_Bool     next )\n  {\n    FT_UInt    gindex     = 0;\n    FT_Byte*   p          = cmap->data + 12;\n    FT_UInt32  num_groups = TT_PEEK_ULONG( p );\n    FT_UInt32  char_code  = *pchar_code;\n    FT_UInt32  start, end, start_id;\n    FT_UInt32  max, min, mid;\n\n\n    if ( !num_groups )\n      return 0;\n\n    /* make compiler happy */\n    mid = num_groups;\n    end = 0xFFFFFFFFUL;\n\n    if ( next )\n      char_code++;\n\n    min = 0;\n    max = num_groups;\n\n    /* binary search */\n    while ( min < max )\n    {\n      mid = ( min + max ) >> 1;\n      p   = cmap->data + 16 + 12 * mid;\n\n      start = TT_NEXT_ULONG( p );\n      end   = TT_NEXT_ULONG( p );\n\n      if ( char_code < start )\n        max = mid;\n      else if ( char_code > end )\n        min = mid + 1;\n      else\n      {\n        start_id = TT_PEEK_ULONG( p );\n        gindex = (FT_UInt)( start_id + char_code - start );\n\n        break;\n      }\n    }\n\n    if ( next )\n    {\n      TT_CMap12  cmap12 = (TT_CMap12)cmap;\n\n\n      /* if `char_code' is not in any group, then `mid' is */\n      /* the group nearest to `char_code'                  */\n      /*                                                   */\n\n      if ( char_code > end )\n      {\n        mid++;\n        if ( mid == num_groups )\n          return 0;\n      }\n\n      cmap12->valid        = 1;\n      cmap12->cur_charcode = char_code;\n      cmap12->cur_group    = mid;\n\n      if ( !gindex )\n      {\n        tt_cmap12_next( cmap12 );\n\n        if ( cmap12->valid )\n          gindex = cmap12->cur_gindex;\n      }\n      else\n        cmap12->cur_gindex = gindex;\n\n      if ( gindex )\n        *pchar_code = cmap12->cur_charcode;\n    }\n\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap12_char_index( TT_CMap    cmap,\n                        FT_UInt32  char_code )\n  {\n    return tt_cmap12_char_map_binary( cmap, &char_code, 0 );\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  tt_cmap12_char_next( TT_CMap     cmap,\n                       FT_UInt32  *pchar_code )\n  {\n    TT_CMap12  cmap12 = (TT_CMap12)cmap;\n    FT_ULong   gindex;\n\n\n    if ( cmap12->cur_charcode >= 0xFFFFFFFFUL )\n      return 0;\n\n    /* no need to search */\n    if ( cmap12->valid && cmap12->cur_charcode == *pchar_code )\n    {\n      tt_cmap12_next( cmap12 );\n      if ( cmap12->valid )\n      {\n        gindex = cmap12->cur_gindex;\n\n        /* XXX: check cur_charcode overflow is expected */\n        if ( gindex )\n          *pchar_code = (FT_UInt32)cmap12->cur_charcode;\n      }\n      else\n        gindex = 0;\n    }\n    else\n      gindex = tt_cmap12_char_map_binary( cmap, pchar_code, 1 );\n\n    /* XXX: check gindex overflow is expected */\n    return (FT_UInt32)gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap12_get_info( TT_CMap       cmap,\n                      TT_CMapInfo  *cmap_info )\n  {\n    FT_Byte*  p = cmap->data + 8;\n\n\n    cmap_info->format   = 12;\n    cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_TT_CMAP(\n    tt_cmap12_class_rec,\n    sizeof ( TT_CMap12Rec ),\n\n    (FT_CMap_InitFunc)     tt_cmap12_init,\n    (FT_CMap_DoneFunc)     NULL,\n    (FT_CMap_CharIndexFunc)tt_cmap12_char_index,\n    (FT_CMap_CharNextFunc) tt_cmap12_char_next,\n\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n\n    12,\n    (TT_CMap_ValidateFunc)tt_cmap12_validate,\n    (TT_CMap_Info_GetFunc)tt_cmap12_get_info )\n\n#endif /* TT_CONFIG_CMAP_FORMAT_12 */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                          FORMAT 13                            *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TABLE OVERVIEW                                                        */\n  /* --------------                                                        */\n  /*                                                                       */\n  /*   NAME        OFFSET     TYPE       DESCRIPTION                       */\n  /*                                                                       */\n  /*   format      0          USHORT     must be 13                        */\n  /*   reserved    2          USHORT     reserved                          */\n  /*   length      4          ULONG      length in bytes                   */\n  /*   language    8          ULONG      Mac language code                 */\n  /*   count       12         ULONG      number of groups                  */\n  /*               16                                                      */\n  /*                                                                       */\n  /* This header is followed by `count' groups of the following format:    */\n  /*                                                                       */\n  /*   start       0          ULONG      first charcode                    */\n  /*   end         4          ULONG      last charcode                     */\n  /*   glyphId     8          ULONG      glyph ID for the whole group      */\n  /*                                                                       */\n\n#ifdef TT_CONFIG_CMAP_FORMAT_13\n\n  typedef struct  TT_CMap13Rec_\n  {\n    TT_CMapRec  cmap;\n    FT_Bool     valid;\n    FT_ULong    cur_charcode;\n    FT_UInt     cur_gindex;\n    FT_ULong    cur_group;\n    FT_ULong    num_groups;\n\n  } TT_CMap13Rec, *TT_CMap13;\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap13_init( TT_CMap13  cmap,\n                  FT_Byte*   table )\n  {\n    cmap->cmap.data  = table;\n\n    table           += 12;\n    cmap->num_groups = FT_PEEK_ULONG( table );\n\n    cmap->valid      = 0;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap13_validate( FT_Byte*      table,\n                      FT_Validator  valid )\n  {\n    FT_Byte*  p;\n    FT_ULong  length;\n    FT_ULong  num_groups;\n\n\n    if ( table + 16 > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    p      = table + 4;\n    length = TT_NEXT_ULONG( p );\n\n    p          = table + 12;\n    num_groups = TT_NEXT_ULONG( p );\n\n    if ( length > (FT_ULong)( valid->limit - table ) ||\n         /* length < 16 + 12 * num_groups ? */\n         length < 16                                 ||\n         ( length - 16 ) / 12 < num_groups           )\n      FT_INVALID_TOO_SHORT;\n\n    /* check groups, they must be in increasing order */\n    {\n      FT_ULong  n, start, end, glyph_id, last = 0;\n\n\n      for ( n = 0; n < num_groups; n++ )\n      {\n        start    = TT_NEXT_ULONG( p );\n        end      = TT_NEXT_ULONG( p );\n        glyph_id = TT_NEXT_ULONG( p );\n\n        if ( start > end )\n          FT_INVALID_DATA;\n\n        if ( n > 0 && start <= last )\n          FT_INVALID_DATA;\n\n        if ( valid->level >= FT_VALIDATE_TIGHT )\n        {\n          if ( glyph_id >= TT_VALID_GLYPH_COUNT( valid ) )\n            FT_INVALID_GLYPH_ID;\n        }\n\n        last = end;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  /* search the index of the charcode next to cmap->cur_charcode */\n  /* cmap->cur_group should be set up properly by caller         */\n  /*                                                             */\n  static void\n  tt_cmap13_next( TT_CMap13  cmap )\n  {\n    FT_Byte*  p;\n    FT_ULong  start, end, glyph_id, char_code;\n    FT_ULong  n;\n    FT_UInt   gindex;\n\n\n    if ( cmap->cur_charcode >= 0xFFFFFFFFUL )\n      goto Fail;\n\n    char_code = cmap->cur_charcode + 1;\n\n    for ( n = cmap->cur_group; n < cmap->num_groups; n++ )\n    {\n      p        = cmap->cmap.data + 16 + 12 * n;\n      start    = TT_NEXT_ULONG( p );\n      end      = TT_NEXT_ULONG( p );\n      glyph_id = TT_PEEK_ULONG( p );\n\n      if ( char_code < start )\n        char_code = start;\n\n      if ( char_code <= end )\n      {\n        gindex = (FT_UInt)glyph_id;\n\n        if ( gindex )\n        {\n          cmap->cur_charcode = char_code;;\n          cmap->cur_gindex   = gindex;\n          cmap->cur_group    = n;\n\n          return;\n        }\n      }\n    }\n\n  Fail:\n    cmap->valid = 0;\n  }\n\n\n  static FT_UInt\n  tt_cmap13_char_map_binary( TT_CMap     cmap,\n                             FT_UInt32*  pchar_code,\n                             FT_Bool     next )\n  {\n    FT_UInt    gindex     = 0;\n    FT_Byte*   p          = cmap->data + 12;\n    FT_UInt32  num_groups = TT_PEEK_ULONG( p );\n    FT_UInt32  char_code  = *pchar_code;\n    FT_UInt32  start, end;\n    FT_UInt32  max, min, mid;\n\n\n    if ( !num_groups )\n      return 0;\n\n    /* make compiler happy */\n    mid = num_groups;\n    end = 0xFFFFFFFFUL;\n\n    if ( next )\n      char_code++;\n\n    min = 0;\n    max = num_groups;\n\n    /* binary search */\n    while ( min < max )\n    {\n      mid = ( min + max ) >> 1;\n      p   = cmap->data + 16 + 12 * mid;\n\n      start = TT_NEXT_ULONG( p );\n      end   = TT_NEXT_ULONG( p );\n\n      if ( char_code < start )\n        max = mid;\n      else if ( char_code > end )\n        min = mid + 1;\n      else\n      {\n        gindex = (FT_UInt)TT_PEEK_ULONG( p );\n\n        break;\n      }\n    }\n\n    if ( next )\n    {\n      TT_CMap13  cmap13 = (TT_CMap13)cmap;\n\n\n      /* if `char_code' is not in any group, then `mid' is */\n      /* the group nearest to `char_code'                  */\n\n      if ( char_code > end )\n      {\n        mid++;\n        if ( mid == num_groups )\n          return 0;\n      }\n\n      cmap13->valid        = 1;\n      cmap13->cur_charcode = char_code;\n      cmap13->cur_group    = mid;\n\n      if ( !gindex )\n      {\n        tt_cmap13_next( cmap13 );\n\n        if ( cmap13->valid )\n          gindex = cmap13->cur_gindex;\n      }\n      else\n        cmap13->cur_gindex = gindex;\n\n      if ( gindex )\n        *pchar_code = cmap13->cur_charcode;\n    }\n\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap13_char_index( TT_CMap    cmap,\n                        FT_UInt32  char_code )\n  {\n    return tt_cmap13_char_map_binary( cmap, &char_code, 0 );\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  tt_cmap13_char_next( TT_CMap     cmap,\n                       FT_UInt32  *pchar_code )\n  {\n    TT_CMap13  cmap13 = (TT_CMap13)cmap;\n    FT_UInt    gindex;\n\n\n    if ( cmap13->cur_charcode >= 0xFFFFFFFFUL )\n      return 0;\n\n    /* no need to search */\n    if ( cmap13->valid && cmap13->cur_charcode == *pchar_code )\n    {\n      tt_cmap13_next( cmap13 );\n      if ( cmap13->valid )\n      {\n        gindex = cmap13->cur_gindex;\n        if ( gindex )\n          *pchar_code = cmap13->cur_charcode;\n      }\n      else\n        gindex = 0;\n    }\n    else\n      gindex = tt_cmap13_char_map_binary( cmap, pchar_code, 1 );\n\n    return gindex;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap13_get_info( TT_CMap       cmap,\n                      TT_CMapInfo  *cmap_info )\n  {\n    FT_Byte*  p = cmap->data + 8;\n\n\n    cmap_info->format   = 13;\n    cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_DEFINE_TT_CMAP(\n    tt_cmap13_class_rec,\n    sizeof ( TT_CMap13Rec ),\n\n    (FT_CMap_InitFunc)     tt_cmap13_init,\n    (FT_CMap_DoneFunc)     NULL,\n    (FT_CMap_CharIndexFunc)tt_cmap13_char_index,\n    (FT_CMap_CharNextFunc) tt_cmap13_char_next,\n\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n\n    13,\n    (TT_CMap_ValidateFunc)tt_cmap13_validate,\n    (TT_CMap_Info_GetFunc)tt_cmap13_get_info )\n\n#endif /* TT_CONFIG_CMAP_FORMAT_13 */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                           FORMAT 14                           *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TABLE OVERVIEW                                                        */\n  /* --------------                                                        */\n  /*                                                                       */\n  /*   NAME         OFFSET  TYPE    DESCRIPTION                            */\n  /*                                                                       */\n  /*   format         0     USHORT  must be 14                             */\n  /*   length         2     ULONG   table length in bytes                  */\n  /*   numSelector    6     ULONG   number of variation sel. records       */\n  /*                                                                       */\n  /* Followed by numSelector records, each of which looks like             */\n  /*                                                                       */\n  /*   varSelector    0     UINT24  Unicode codepoint of sel.              */\n  /*   defaultOff     3     ULONG   offset to a default UVS table          */\n  /*                                describing any variants to be found in */\n  /*                                the normal Unicode subtable.           */\n  /*   nonDefOff      7     ULONG   offset to a non-default UVS table      */\n  /*                                describing any variants not in the     */\n  /*                                standard cmap, with GIDs here          */\n  /* (either offset may be 0 NULL)                                         */\n  /*                                                                       */\n  /* Selectors are sorted by code point.                                   */\n  /*                                                                       */\n  /* A default Unicode Variation Selector (UVS) subtable is just a list of */\n  /* ranges of code points which are to be found in the standard cmap.  No */\n  /* glyph IDs (GIDs) here.                                                */\n  /*                                                                       */\n  /*   numRanges      0     ULONG   number of ranges following             */\n  /*                                                                       */\n  /* A range looks like                                                    */\n  /*                                                                       */\n  /*   uniStart       0     UINT24  code point of the first character in   */\n  /*                                this range                             */\n  /*   additionalCnt  3     UBYTE   count of additional characters in this */\n  /*                                range (zero means a range of a single  */\n  /*                                character)                             */\n  /*                                                                       */\n  /* Ranges are sorted by `uniStart'.                                      */\n  /*                                                                       */\n  /* A non-default Unicode Variation Selector (UVS) subtable is a list of  */\n  /* mappings from codepoint to GID.                                       */\n  /*                                                                       */\n  /*   numMappings    0     ULONG   number of mappings                     */\n  /*                                                                       */\n  /* A range looks like                                                    */\n  /*                                                                       */\n  /*   uniStart       0     UINT24  code point of the first character in   */\n  /*                                this range                             */\n  /*   GID            3     USHORT  and its GID                            */\n  /*                                                                       */\n  /* Ranges are sorted by `uniStart'.                                      */\n\n#ifdef TT_CONFIG_CMAP_FORMAT_14\n\n  typedef struct  TT_CMap14Rec_\n  {\n    TT_CMapRec  cmap;\n    FT_ULong    num_selectors;\n\n    /* This array is used to store the results of various\n     * cmap 14 query functions.  The data is overwritten\n     * on each call to these functions.\n     */\n    FT_UInt32   max_results;\n    FT_UInt32*  results;\n    FT_Memory   memory;\n\n  } TT_CMap14Rec, *TT_CMap14;\n\n\n  FT_CALLBACK_DEF( void )\n  tt_cmap14_done( TT_CMap14  cmap )\n  {\n    FT_Memory  memory = cmap->memory;\n\n\n    cmap->max_results = 0;\n    if ( memory != NULL && cmap->results != NULL )\n      FT_FREE( cmap->results );\n  }\n\n\n  static FT_Error\n  tt_cmap14_ensure( TT_CMap14  cmap,\n                    FT_UInt32  num_results,\n                    FT_Memory  memory )\n  {\n    FT_UInt32  old_max = cmap->max_results;\n    FT_Error   error   = FT_Err_Ok;\n\n\n    if ( num_results > cmap->max_results )\n    {\n       cmap->memory = memory;\n\n       if ( FT_QRENEW_ARRAY( cmap->results, old_max, num_results ) )\n         return error;\n\n       cmap->max_results = num_results;\n    }\n\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap14_init( TT_CMap14  cmap,\n                  FT_Byte*   table )\n  {\n    cmap->cmap.data = table;\n\n    table               += 6;\n    cmap->num_selectors  = FT_PEEK_ULONG( table );\n    cmap->max_results    = 0;\n    cmap->results        = NULL;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap14_validate( FT_Byte*      table,\n                      FT_Validator  valid )\n  {\n    FT_Byte*  p;\n    FT_ULong  length;\n    FT_ULong  num_selectors;\n\n\n    if ( table + 2 + 4 + 4 > valid->limit )\n      FT_INVALID_TOO_SHORT;\n\n    p             = table + 2;\n    length        = TT_NEXT_ULONG( p );\n    num_selectors = TT_NEXT_ULONG( p );\n\n    if ( length > (FT_ULong)( valid->limit - table ) ||\n         /* length < 10 + 11 * num_selectors ? */\n         length < 10                                 ||\n         ( length - 10 ) / 11 < num_selectors        )\n      FT_INVALID_TOO_SHORT;\n\n    /* check selectors, they must be in increasing order */\n    {\n      /* we start lastVarSel at 1 because a variant selector value of 0\n       * isn't valid.\n       */\n      FT_ULong  n, lastVarSel = 1;\n\n\n      for ( n = 0; n < num_selectors; n++ )\n      {\n        FT_ULong  varSel    = TT_NEXT_UINT24( p );\n        FT_ULong  defOff    = TT_NEXT_ULONG( p );\n        FT_ULong  nondefOff = TT_NEXT_ULONG( p );\n\n\n        if ( defOff >= length || nondefOff >= length )\n          FT_INVALID_TOO_SHORT;\n\n        if ( varSel < lastVarSel )\n          FT_INVALID_DATA;\n\n        lastVarSel = varSel + 1;\n\n        /* check the default table (these glyphs should be reached     */\n        /* through the normal Unicode cmap, no GIDs, just check order) */\n        if ( defOff != 0 )\n        {\n          FT_Byte*  defp      = table + defOff;\n          FT_ULong  numRanges = TT_NEXT_ULONG( defp );\n          FT_ULong  i;\n          FT_ULong  lastBase  = 0;\n\n\n          /* defp + numRanges * 4 > valid->limit ? */\n          if ( numRanges > (FT_ULong)( valid->limit - defp ) / 4 )\n            FT_INVALID_TOO_SHORT;\n\n          for ( i = 0; i < numRanges; ++i )\n          {\n            FT_ULong  base = TT_NEXT_UINT24( defp );\n            FT_ULong  cnt  = FT_NEXT_BYTE( defp );\n\n\n            if ( base + cnt >= 0x110000UL )              /* end of Unicode */\n              FT_INVALID_DATA;\n\n            if ( base < lastBase )\n              FT_INVALID_DATA;\n\n            lastBase = base + cnt + 1U;\n          }\n        }\n\n        /* and the non-default table (these glyphs are specified here) */\n        if ( nondefOff != 0 )\n        {\n          FT_Byte*  ndp         = table + nondefOff;\n          FT_ULong  numMappings = TT_NEXT_ULONG( ndp );\n          FT_ULong  i, lastUni  = 0;\n\n\n          /* numMappings * 4 > (FT_ULong)( valid->limit - ndp ) ? */\n          if ( numMappings > ( (FT_ULong)( valid->limit - ndp ) ) / 4 )\n            FT_INVALID_TOO_SHORT;\n\n          for ( i = 0; i < numMappings; ++i )\n          {\n            FT_ULong  uni = TT_NEXT_UINT24( ndp );\n            FT_ULong  gid = TT_NEXT_USHORT( ndp );\n\n\n            if ( uni >= 0x110000UL )                     /* end of Unicode */\n              FT_INVALID_DATA;\n\n            if ( uni < lastUni )\n              FT_INVALID_DATA;\n\n            lastUni = uni + 1U;\n\n            if ( valid->level >= FT_VALIDATE_TIGHT    &&\n                 gid >= TT_VALID_GLYPH_COUNT( valid ) )\n              FT_INVALID_GLYPH_ID;\n          }\n        }\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap14_char_index( TT_CMap    cmap,\n                        FT_UInt32  char_code )\n  {\n    FT_UNUSED( cmap );\n    FT_UNUSED( char_code );\n\n    /* This can't happen */\n    return 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 )\n  tt_cmap14_char_next( TT_CMap     cmap,\n                       FT_UInt32  *pchar_code )\n  {\n    FT_UNUSED( cmap );\n\n    /* This can't happen */\n    *pchar_code = 0;\n    return 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  tt_cmap14_get_info( TT_CMap       cmap,\n                      TT_CMapInfo  *cmap_info )\n  {\n    FT_UNUSED( cmap );\n\n    cmap_info->format   = 14;\n    /* subtable 14 does not define a language field */\n    cmap_info->language = 0xFFFFFFFFUL;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_UInt\n  tt_cmap14_char_map_def_binary( FT_Byte    *base,\n                                 FT_UInt32   char_code )\n  {\n    FT_UInt32  numRanges = TT_PEEK_ULONG( base );\n    FT_UInt32  max, min;\n\n\n    min = 0;\n    max = numRanges;\n\n    base += 4;\n\n    /* binary search */\n    while ( min < max )\n    {\n      FT_UInt32  mid   = ( min + max ) >> 1;\n      FT_Byte*   p     = base + 4 * mid;\n      FT_ULong   start = TT_NEXT_UINT24( p );\n      FT_UInt    cnt   = FT_NEXT_BYTE( p );\n\n\n      if ( char_code < start )\n        max = mid;\n      else if ( char_code > start+cnt )\n        min = mid + 1;\n      else\n        return TRUE;\n    }\n\n    return FALSE;\n  }\n\n\n  static FT_UInt\n  tt_cmap14_char_map_nondef_binary( FT_Byte    *base,\n                                    FT_UInt32   char_code )\n  {\n    FT_UInt32  numMappings = TT_PEEK_ULONG( base );\n    FT_UInt32  max, min;\n\n\n    min = 0;\n    max = numMappings;\n\n    base += 4;\n\n    /* binary search */\n    while ( min < max )\n    {\n      FT_UInt32  mid = ( min + max ) >> 1;\n      FT_Byte*   p   = base + 5 * mid;\n      FT_UInt32  uni = (FT_UInt32)TT_NEXT_UINT24( p );\n\n\n      if ( char_code < uni )\n        max = mid;\n      else if ( char_code > uni )\n        min = mid + 1;\n      else\n        return TT_PEEK_USHORT( p );\n    }\n\n    return 0;\n  }\n\n\n  static FT_Byte*\n  tt_cmap14_find_variant( FT_Byte    *base,\n                          FT_UInt32   variantCode )\n  {\n    FT_UInt32  numVar = TT_PEEK_ULONG( base );\n    FT_UInt32  max, min;\n\n\n    min = 0;\n    max = numVar;\n\n    base += 4;\n\n    /* binary search */\n    while ( min < max )\n    {\n      FT_UInt32  mid    = ( min + max ) >> 1;\n      FT_Byte*   p      = base + 11 * mid;\n      FT_ULong   varSel = TT_NEXT_UINT24( p );\n\n\n      if ( variantCode < varSel )\n        max = mid;\n      else if ( variantCode > varSel )\n        min = mid + 1;\n      else\n        return p;\n    }\n\n    return NULL;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt )\n  tt_cmap14_char_var_index( TT_CMap    cmap,\n                            TT_CMap    ucmap,\n                            FT_UInt32  charcode,\n                            FT_UInt32  variantSelector )\n  {\n    FT_Byte*  p = tt_cmap14_find_variant( cmap->data + 6, variantSelector );\n    FT_ULong  defOff;\n    FT_ULong  nondefOff;\n\n\n    if ( !p )\n      return 0;\n\n    defOff    = TT_NEXT_ULONG( p );\n    nondefOff = TT_PEEK_ULONG( p );\n\n    if ( defOff != 0                                                    &&\n         tt_cmap14_char_map_def_binary( cmap->data + defOff, charcode ) )\n    {\n      /* This is the default variant of this charcode.  GID not stored */\n      /* here; stored in the normal Unicode charmap instead.           */\n      return ucmap->cmap.clazz->char_index( &ucmap->cmap, charcode );\n    }\n\n    if ( nondefOff != 0 )\n      return tt_cmap14_char_map_nondef_binary( cmap->data + nondefOff,\n                                               charcode );\n\n    return 0;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Int )\n  tt_cmap14_char_var_isdefault( TT_CMap    cmap,\n                                FT_UInt32  charcode,\n                                FT_UInt32  variantSelector )\n  {\n    FT_Byte*  p = tt_cmap14_find_variant( cmap->data + 6, variantSelector );\n    FT_ULong  defOff;\n    FT_ULong  nondefOff;\n\n\n    if ( !p )\n      return -1;\n\n    defOff    = TT_NEXT_ULONG( p );\n    nondefOff = TT_NEXT_ULONG( p );\n\n    if ( defOff != 0                                                    &&\n         tt_cmap14_char_map_def_binary( cmap->data + defOff, charcode ) )\n      return 1;\n\n    if ( nondefOff != 0                                            &&\n         tt_cmap14_char_map_nondef_binary( cmap->data + nondefOff,\n                                           charcode ) != 0         )\n      return 0;\n\n    return -1;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32* )\n  tt_cmap14_variants( TT_CMap    cmap,\n                      FT_Memory  memory )\n  {\n    TT_CMap14   cmap14 = (TT_CMap14)cmap;\n    FT_UInt32   count  = cmap14->num_selectors;\n    FT_Byte*    p      = cmap->data + 10;\n    FT_UInt32*  result;\n    FT_UInt32   i;\n\n\n    if ( tt_cmap14_ensure( cmap14, ( count + 1 ), memory ) )\n      return NULL;\n\n    result = cmap14->results;\n    for ( i = 0; i < count; ++i )\n    {\n      result[i] = (FT_UInt32)TT_NEXT_UINT24( p );\n      p        += 8;\n    }\n    result[i] = 0;\n\n    return result;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 * )\n  tt_cmap14_char_variants( TT_CMap    cmap,\n                           FT_Memory  memory,\n                           FT_UInt32  charCode )\n  {\n    TT_CMap14   cmap14 = (TT_CMap14)  cmap;\n    FT_UInt32   count  = cmap14->num_selectors;\n    FT_Byte*    p      = cmap->data + 10;\n    FT_UInt32*  q;\n\n\n    if ( tt_cmap14_ensure( cmap14, ( count + 1 ), memory ) )\n      return NULL;\n\n    for ( q = cmap14->results; count > 0; --count )\n    {\n      FT_UInt32  varSel    = TT_NEXT_UINT24( p );\n      FT_ULong   defOff    = TT_NEXT_ULONG( p );\n      FT_ULong   nondefOff = TT_NEXT_ULONG( p );\n\n\n      if ( ( defOff != 0                                               &&\n             tt_cmap14_char_map_def_binary( cmap->data + defOff,\n                                            charCode )                 ) ||\n           ( nondefOff != 0                                            &&\n             tt_cmap14_char_map_nondef_binary( cmap->data + nondefOff,\n                                               charCode ) != 0         ) )\n      {\n        q[0] = varSel;\n        q++;\n      }\n    }\n    q[0] = 0;\n\n    return cmap14->results;\n  }\n\n\n  static FT_UInt\n  tt_cmap14_def_char_count( FT_Byte  *p )\n  {\n    FT_UInt32  numRanges = (FT_UInt32)TT_NEXT_ULONG( p );\n    FT_UInt    tot       = 0;\n\n\n    p += 3;  /* point to the first `cnt' field */\n    for ( ; numRanges > 0; numRanges-- )\n    {\n      tot += 1 + p[0];\n      p   += 4;\n    }\n\n    return tot;\n  }\n\n\n  static FT_UInt32*\n  tt_cmap14_get_def_chars( TT_CMap    cmap,\n                           FT_Byte*   p,\n                           FT_Memory  memory )\n  {\n    TT_CMap14   cmap14 = (TT_CMap14) cmap;\n    FT_UInt32   numRanges;\n    FT_UInt     cnt;\n    FT_UInt32*  q;\n\n\n    cnt       = tt_cmap14_def_char_count( p );\n    numRanges = (FT_UInt32)TT_NEXT_ULONG( p );\n\n    if ( tt_cmap14_ensure( cmap14, ( cnt + 1 ), memory ) )\n      return NULL;\n\n    for ( q = cmap14->results; numRanges > 0; --numRanges )\n    {\n      FT_UInt32  uni = (FT_UInt32)TT_NEXT_UINT24( p );\n\n\n      cnt = FT_NEXT_BYTE( p ) + 1;\n      do\n      {\n        q[0]  = uni;\n        uni  += 1;\n        q    += 1;\n\n      } while ( --cnt != 0 );\n    }\n    q[0] = 0;\n\n    return cmap14->results;\n  }\n\n\n  static FT_UInt32*\n  tt_cmap14_get_nondef_chars( TT_CMap     cmap,\n                              FT_Byte    *p,\n                              FT_Memory   memory )\n  {\n    TT_CMap14   cmap14 = (TT_CMap14) cmap;\n    FT_UInt32   numMappings;\n    FT_UInt     i;\n    FT_UInt32  *ret;\n\n\n    numMappings = (FT_UInt32)TT_NEXT_ULONG( p );\n\n    if ( tt_cmap14_ensure( cmap14, ( numMappings + 1 ), memory ) )\n      return NULL;\n\n    ret = cmap14->results;\n    for ( i = 0; i < numMappings; ++i )\n    {\n      ret[i] = (FT_UInt32)TT_NEXT_UINT24( p );\n      p += 2;\n    }\n    ret[i] = 0;\n\n    return ret;\n  }\n\n\n  FT_CALLBACK_DEF( FT_UInt32 * )\n  tt_cmap14_variant_chars( TT_CMap    cmap,\n                           FT_Memory  memory,\n                           FT_UInt32  variantSelector )\n  {\n    FT_Byte    *p  = tt_cmap14_find_variant( cmap->data + 6,\n                                             variantSelector );\n    FT_Int      i;\n    FT_ULong    defOff;\n    FT_ULong    nondefOff;\n\n\n    if ( !p )\n      return NULL;\n\n    defOff    = TT_NEXT_ULONG( p );\n    nondefOff = TT_NEXT_ULONG( p );\n\n    if ( defOff == 0 && nondefOff == 0 )\n      return NULL;\n\n    if ( defOff == 0 )\n      return tt_cmap14_get_nondef_chars( cmap, cmap->data + nondefOff,\n                                         memory );\n    else if ( nondefOff == 0 )\n      return tt_cmap14_get_def_chars( cmap, cmap->data + defOff,\n                                      memory );\n    else\n    {\n      /* Both a default and a non-default glyph set?  That's probably not */\n      /* good font design, but the spec allows for it...                  */\n      TT_CMap14  cmap14 = (TT_CMap14) cmap;\n      FT_UInt32  numRanges;\n      FT_UInt32  numMappings;\n      FT_UInt32  duni;\n      FT_UInt32  dcnt;\n      FT_UInt32  nuni;\n      FT_Byte*   dp;\n      FT_UInt    di, ni, k;\n\n      FT_UInt32  *ret;\n\n\n      p  = cmap->data + nondefOff;\n      dp = cmap->data + defOff;\n\n      numMappings = (FT_UInt32)TT_NEXT_ULONG( p );\n      dcnt        = tt_cmap14_def_char_count( dp );\n      numRanges   = (FT_UInt32)TT_NEXT_ULONG( dp );\n\n      if ( numMappings == 0 )\n        return tt_cmap14_get_def_chars( cmap, cmap->data + defOff,\n                                        memory );\n      if ( dcnt == 0 )\n        return tt_cmap14_get_nondef_chars( cmap, cmap->data + nondefOff,\n                                           memory );\n\n      if ( tt_cmap14_ensure( cmap14, ( dcnt + numMappings + 1 ), memory ) )\n        return NULL;\n\n      ret  = cmap14->results;\n      duni = (FT_UInt32)TT_NEXT_UINT24( dp );\n      dcnt = FT_NEXT_BYTE( dp );\n      di   = 1;\n      nuni = (FT_UInt32)TT_NEXT_UINT24( p );\n      p   += 2;\n      ni   = 1;\n      i    = 0;\n\n      for ( ;; )\n      {\n        if ( nuni > duni + dcnt )\n        {\n          for ( k = 0; k <= dcnt; ++k )\n            ret[i++] = duni + k;\n\n          ++di;\n\n          if ( di > numRanges )\n            break;\n\n          duni = (FT_UInt32)TT_NEXT_UINT24( dp );\n          dcnt = FT_NEXT_BYTE( dp );\n        }\n        else\n        {\n          if ( nuni < duni )\n            ret[i++] = nuni;\n          /* If it is within the default range then ignore it -- */\n          /* that should not have happened                       */\n          ++ni;\n          if ( ni > numMappings )\n            break;\n\n          nuni = (FT_UInt32)TT_NEXT_UINT24( p );\n          p += 2;\n        }\n      }\n\n      if ( ni <= numMappings )\n      {\n        /* If we get here then we have run out of all default ranges.   */\n        /* We have read one non-default mapping which we haven't stored */\n        /* and there may be others that need to be read.                */\n        ret[i++] = nuni;\n        while ( ni < numMappings )\n        {\n          ret[i++] = (FT_UInt32)TT_NEXT_UINT24( p );\n          p += 2;\n          ++ni;\n        }\n      }\n      else if ( di <= numRanges )\n      {\n        /* If we get here then we have run out of all non-default     */\n        /* mappings.  We have read one default range which we haven't */\n        /* stored and there may be others that need to be read.       */\n        for ( k = 0; k <= dcnt; ++k )\n          ret[i++] = duni + k;\n\n        while ( di < numRanges )\n        {\n          duni = (FT_UInt32)TT_NEXT_UINT24( dp );\n          dcnt = FT_NEXT_BYTE( dp );\n\n          for ( k = 0; k <= dcnt; ++k )\n            ret[i++] = duni + k;\n          ++di;\n        }\n      }\n\n      ret[i] = 0;\n\n      return ret;\n    }\n  }\n\n\n  FT_DEFINE_TT_CMAP(\n    tt_cmap14_class_rec,\n    sizeof ( TT_CMap14Rec ),\n\n    (FT_CMap_InitFunc)     tt_cmap14_init,\n    (FT_CMap_DoneFunc)     tt_cmap14_done,\n    (FT_CMap_CharIndexFunc)tt_cmap14_char_index,\n    (FT_CMap_CharNextFunc) tt_cmap14_char_next,\n\n    /* Format 14 extension functions */\n    (FT_CMap_CharVarIndexFunc)    tt_cmap14_char_var_index,\n    (FT_CMap_CharVarIsDefaultFunc)tt_cmap14_char_var_isdefault,\n    (FT_CMap_VariantListFunc)     tt_cmap14_variants,\n    (FT_CMap_CharVariantListFunc) tt_cmap14_char_variants,\n    (FT_CMap_VariantCharListFunc) tt_cmap14_variant_chars,\n\n    14,\n    (TT_CMap_ValidateFunc)tt_cmap14_validate,\n    (TT_CMap_Info_GetFunc)tt_cmap14_get_info )\n\n#endif /* TT_CONFIG_CMAP_FORMAT_14 */\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n  static const TT_CMap_Class  tt_cmap_classes[] =\n  {\n#define TTCMAPCITEM( a )  &a,\n#include \"ttcmapc.h\"\n    NULL,\n  };\n\n#else /*FT_CONFIG_OPTION_PIC*/\n\n  void\n  FT_Destroy_Class_tt_cmap_classes( FT_Library      library,\n                                    TT_CMap_Class*  clazz )\n  {\n    FT_Memory  memory = library->memory;\n\n\n    if ( clazz )\n      FT_FREE( clazz );\n  }\n\n\n  FT_Error\n  FT_Create_Class_tt_cmap_classes( FT_Library       library,\n                                   TT_CMap_Class**  output_class )\n  {\n    TT_CMap_Class*     clazz  = NULL;\n    TT_CMap_ClassRec*  recs;\n    FT_Error           error;\n    FT_Memory          memory = library->memory;\n\n    int  i = 0;\n\n\n#define TTCMAPCITEM( a ) i++;\n#include \"ttcmapc.h\"\n\n    /* allocate enough space for both the pointers */\n    /* plus terminator and the class instances     */\n    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * ( i + 1 ) +\n                          sizeof ( TT_CMap_ClassRec ) * i ) )\n      return error;\n\n    /* the location of the class instances follows the array of pointers */\n    recs = (TT_CMap_ClassRec*)( (char*)clazz +\n                                sizeof ( *clazz ) * ( i + 1 ) );\n    i    = 0;\n\n#undef TTCMAPCITEM\n#define  TTCMAPCITEM( a )             \\\n    FT_Init_Class_ ## a( &recs[i] );  \\\n    clazz[i] = &recs[i];              \\\n    i++;\n#include \"ttcmapc.h\"\n\n    clazz[i] = NULL;\n\n    *output_class = clazz;\n    return FT_Err_Ok;\n  }\n\n#endif /*FT_CONFIG_OPTION_PIC*/\n\n\n  /* parse the `cmap' table and build the corresponding TT_CMap objects */\n  /* in the current face                                                */\n  /*                                                                    */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_build_cmaps( TT_Face  face )\n  {\n    FT_Byte*           table = face->cmap_table;\n    FT_Byte*           limit = table + face->cmap_size;\n    FT_UInt volatile   num_cmaps;\n    FT_Byte* volatile  p     = table;\n    FT_Library         library = FT_FACE_LIBRARY( face );\n\n    FT_UNUSED( library );\n\n\n    if ( !p || p + 4 > limit )\n      return FT_THROW( Invalid_Table );\n\n    /* only recognize format 0 */\n    if ( TT_NEXT_USHORT( p ) != 0 )\n    {\n      FT_ERROR(( \"tt_face_build_cmaps:\"\n                 \" unsupported `cmap' table format = %d\\n\",\n                 TT_PEEK_USHORT( p - 2 ) ));\n      return FT_THROW( Invalid_Table );\n    }\n\n    num_cmaps = TT_NEXT_USHORT( p );\n\n    for ( ; num_cmaps > 0 && p + 8 <= limit; num_cmaps-- )\n    {\n      FT_CharMapRec  charmap;\n      FT_UInt32      offset;\n\n\n      charmap.platform_id = TT_NEXT_USHORT( p );\n      charmap.encoding_id = TT_NEXT_USHORT( p );\n      charmap.face        = FT_FACE( face );\n      charmap.encoding    = FT_ENCODING_NONE;  /* will be filled later */\n      offset              = TT_NEXT_ULONG( p );\n\n      if ( offset && offset <= face->cmap_size - 2 )\n      {\n        FT_Byte* volatile              cmap   = table + offset;\n        volatile FT_UInt               format = TT_PEEK_USHORT( cmap );\n        const TT_CMap_Class* volatile  pclazz = TT_CMAP_CLASSES_GET;\n        TT_CMap_Class volatile         clazz;\n\n\n        for ( ; *pclazz; pclazz++ )\n        {\n          clazz = *pclazz;\n          if ( clazz->format == format )\n          {\n            volatile TT_ValidatorRec  valid;\n            volatile FT_Error         error = FT_Err_Ok;\n\n\n            ft_validator_init( FT_VALIDATOR( &valid ), cmap, limit,\n                               FT_VALIDATE_DEFAULT );\n\n            valid.num_glyphs = (FT_UInt)face->max_profile.numGlyphs;\n\n            if ( ft_setjmp( FT_VALIDATOR( &valid )->jump_buffer) == 0 )\n            {\n              /* validate this cmap sub-table */\n              error = clazz->validate( cmap, FT_VALIDATOR( &valid ) );\n            }\n\n            if ( valid.validator.error == 0 )\n            {\n              FT_CMap  ttcmap;\n\n\n              /* It might make sense to store the single variation         */\n              /* selector cmap somewhere special.  But it would have to be */\n              /* in the public FT_FaceRec, and we can't change that.       */\n\n              if ( !FT_CMap_New( (FT_CMap_Class)clazz,\n                                 cmap, &charmap, &ttcmap ) )\n              {\n                /* it is simpler to directly set `flags' than adding */\n                /* a parameter to FT_CMap_New                        */\n                ((TT_CMap)ttcmap)->flags = (FT_Int)error;\n              }\n            }\n            else\n            {\n              FT_TRACE0(( \"tt_face_build_cmaps:\"\n                          \" broken cmap sub-table ignored\\n\" ));\n            }\n            break;\n          }\n        }\n\n        if ( *pclazz == NULL )\n        {\n          FT_TRACE0(( \"tt_face_build_cmaps:\"\n                      \" unsupported cmap sub-table ignored\\n\" ));\n        }\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_LOCAL( FT_Error )\n  tt_get_cmap_info( FT_CharMap    charmap,\n                    TT_CMapInfo  *cmap_info )\n  {\n    FT_CMap        cmap  = (FT_CMap)charmap;\n    TT_CMap_Class  clazz = (TT_CMap_Class)cmap->clazz;\n\n\n    return clazz->get_cmap_info( charmap, cmap_info );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttcmap.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttcmap.h                                                               */\n/*                                                                         */\n/*    TrueType character mapping table (cmap) support (specification).     */\n/*                                                                         */\n/*  Copyright 2002-2005, 2009, 2012 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTCMAP_H__\n#define __TTCMAP_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n#include FT_INTERNAL_VALIDATE_H\n#include FT_SERVICE_TT_CMAP_H\n\nFT_BEGIN_HEADER\n\n\n#define TT_CMAP_FLAG_UNSORTED     1\n#define TT_CMAP_FLAG_OVERLAPPING  2\n\n  typedef struct  TT_CMapRec_\n  {\n    FT_CMapRec  cmap;\n    FT_Byte*    data;           /* pointer to in-memory cmap table */\n    FT_Int      flags;          /* for format 4 only               */\n\n  } TT_CMapRec, *TT_CMap;\n\n  typedef const struct TT_CMap_ClassRec_*  TT_CMap_Class;\n\n\n  typedef FT_Error\n  (*TT_CMap_ValidateFunc)( FT_Byte*      data,\n                           FT_Validator  valid );\n\n  typedef struct  TT_CMap_ClassRec_\n  {\n    FT_CMap_ClassRec      clazz;\n    FT_UInt               format;\n    TT_CMap_ValidateFunc  validate;\n    TT_CMap_Info_GetFunc  get_cmap_info;\n\n  } TT_CMap_ClassRec;\n\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_DEFINE_TT_CMAP( class_,             \\\n                           size_,              \\\n                           init_,              \\\n                           done_,              \\\n                           char_index_,        \\\n                           char_next_,         \\\n                           char_var_index_,    \\\n                           char_var_default_,  \\\n                           variant_list_,      \\\n                           charvariant_list_,  \\\n                           variantchar_list_,  \\\n                           format_,            \\\n                           validate_,          \\\n                           get_cmap_info_ )    \\\n  FT_CALLBACK_TABLE_DEF                        \\\n  const TT_CMap_ClassRec  class_ =             \\\n  {                                            \\\n    { size_,                                   \\\n      init_,                                   \\\n      done_,                                   \\\n      char_index_,                             \\\n      char_next_,                              \\\n      char_var_index_,                         \\\n      char_var_default_,                       \\\n      variant_list_,                           \\\n      charvariant_list_,                       \\\n      variantchar_list_                        \\\n    },                                         \\\n                                               \\\n    format_,                                   \\\n    validate_,                                 \\\n    get_cmap_info_                             \\\n  };\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#define FT_DEFINE_TT_CMAP( class_,                      \\\n                           size_,                       \\\n                           init_,                       \\\n                           done_,                       \\\n                           char_index_,                 \\\n                           char_next_,                  \\\n                           char_var_index_,             \\\n                           char_var_default_,           \\\n                           variant_list_,               \\\n                           charvariant_list_,           \\\n                           variantchar_list_,           \\\n                           format_,                     \\\n                           validate_,                   \\\n                           get_cmap_info_ )             \\\n  void                                                  \\\n  FT_Init_Class_ ## class_( TT_CMap_ClassRec*  clazz )  \\\n  {                                                     \\\n    clazz->clazz.size             = size_;              \\\n    clazz->clazz.init             = init_;              \\\n    clazz->clazz.done             = done_;              \\\n    clazz->clazz.char_index       = char_index_;        \\\n    clazz->clazz.char_next        = char_next_;         \\\n    clazz->clazz.char_var_index   = char_var_index_;    \\\n    clazz->clazz.char_var_default = char_var_default_;  \\\n    clazz->clazz.variant_list     = variant_list_;      \\\n    clazz->clazz.charvariant_list = charvariant_list_;  \\\n    clazz->clazz.variantchar_list = variantchar_list_;  \\\n    clazz->format                 = format_;            \\\n    clazz->validate               = validate_;          \\\n    clazz->get_cmap_info          = get_cmap_info_;     \\\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n  typedef struct  TT_ValidatorRec_\n  {\n    FT_ValidatorRec  validator;\n    FT_UInt          num_glyphs;\n\n  } TT_ValidatorRec, *TT_Validator;\n\n\n#define TT_VALIDATOR( x )          ( (TT_Validator)( x ) )\n#define TT_VALID_GLYPH_COUNT( x )  TT_VALIDATOR( x )->num_glyphs\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_build_cmaps( TT_Face  face );\n\n  /* used in tt-cmaps service */\n  FT_LOCAL( FT_Error )\n  tt_get_cmap_info( FT_CharMap    charmap,\n                    TT_CMapInfo  *cmap_info );\n\n\nFT_END_HEADER\n\n#endif /* __TTCMAP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttcmapc.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttcmapc.h                                                              */\n/*                                                                         */\n/*    TT CMAP classes definitions (specification only).                    */\n/*                                                                         */\n/*  Copyright 2009 by                                                      */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifdef TT_CONFIG_CMAP_FORMAT_0\n  TTCMAPCITEM( tt_cmap0_class_rec )\n#endif\n\n#ifdef TT_CONFIG_CMAP_FORMAT_2\n  TTCMAPCITEM( tt_cmap2_class_rec )\n#endif\n\n#ifdef TT_CONFIG_CMAP_FORMAT_4\n  TTCMAPCITEM( tt_cmap4_class_rec )\n#endif\n\n#ifdef TT_CONFIG_CMAP_FORMAT_6\n  TTCMAPCITEM( tt_cmap6_class_rec )\n#endif\n\n#ifdef TT_CONFIG_CMAP_FORMAT_8\n  TTCMAPCITEM( tt_cmap8_class_rec )\n#endif\n\n#ifdef TT_CONFIG_CMAP_FORMAT_10\n  TTCMAPCITEM( tt_cmap10_class_rec )\n#endif\n\n#ifdef TT_CONFIG_CMAP_FORMAT_12\n  TTCMAPCITEM( tt_cmap12_class_rec )\n#endif\n\n#ifdef TT_CONFIG_CMAP_FORMAT_13\n  TTCMAPCITEM( tt_cmap13_class_rec )\n#endif\n\n#ifdef TT_CONFIG_CMAP_FORMAT_14\n  TTCMAPCITEM( tt_cmap14_class_rec )\n#endif\n\n\n  /* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttkern.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttkern.c                                                               */\n/*                                                                         */\n/*    Load the basic TrueType kerning table.  This doesn't handle          */\n/*    kerning data within the GPOS table at the moment.                    */\n/*                                                                         */\n/*  Copyright 1996-2007, 2009, 2010, 2013 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n#include \"ttkern.h\"\n\n#include \"sferrors.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttkern\n\n\n#undef  TT_KERN_INDEX\n#define TT_KERN_INDEX( g1, g2 )  ( ( (FT_ULong)(g1) << 16 ) | (g2) )\n\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_kern( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    FT_Error   error;\n    FT_ULong   table_size;\n    FT_Byte*   p;\n    FT_Byte*   p_limit;\n    FT_UInt    nn, num_tables;\n    FT_UInt32  avail = 0, ordered = 0;\n\n\n    /* the kern table is optional; exit silently if it is missing */\n    error = face->goto_table( face, TTAG_kern, stream, &table_size );\n    if ( error )\n      goto Exit;\n\n    if ( table_size < 4 )  /* the case of a malformed table */\n    {\n      FT_ERROR(( \"tt_face_load_kern:\"\n                 \" kerning table is too small - ignored\\n\" ));\n      error = FT_THROW( Table_Missing );\n      goto Exit;\n    }\n\n    if ( FT_FRAME_EXTRACT( table_size, face->kern_table ) )\n    {\n      FT_ERROR(( \"tt_face_load_kern:\"\n                 \" could not extract kerning table\\n\" ));\n      goto Exit;\n    }\n\n    face->kern_table_size = table_size;\n\n    p       = face->kern_table;\n    p_limit = p + table_size;\n\n    p         += 2; /* skip version */\n    num_tables = FT_NEXT_USHORT( p );\n\n    if ( num_tables > 32 ) /* we only support up to 32 sub-tables */\n      num_tables = 32;\n\n    for ( nn = 0; nn < num_tables; nn++ )\n    {\n      FT_UInt    num_pairs, length, coverage;\n      FT_Byte*   p_next;\n      FT_UInt32  mask = (FT_UInt32)1UL << nn;\n\n\n      if ( p + 6 > p_limit )\n        break;\n\n      p_next = p;\n\n      p += 2; /* skip version */\n      length   = FT_NEXT_USHORT( p );\n      coverage = FT_NEXT_USHORT( p );\n\n      if ( length <= 6 + 8 )\n        break;\n\n      p_next += length;\n\n      if ( p_next > p_limit )  /* handle broken table */\n        p_next = p_limit;\n\n      /* only use horizontal kerning tables */\n      if ( ( coverage & ~8 ) != 0x0001 ||\n           p + 8 > p_limit             )\n        goto NextTable;\n\n      num_pairs = FT_NEXT_USHORT( p );\n      p        += 6;\n\n      if ( ( p_next - p ) < 6 * (int)num_pairs ) /* handle broken count */\n        num_pairs = (FT_UInt)( ( p_next - p ) / 6 );\n\n      avail |= mask;\n\n      /*\n       *  Now check whether the pairs in this table are ordered.\n       *  We then can use binary search.\n       */\n      if ( num_pairs > 0 )\n      {\n        FT_ULong  count;\n        FT_ULong  old_pair;\n\n\n        old_pair = FT_NEXT_ULONG( p );\n        p       += 2;\n\n        for ( count = num_pairs - 1; count > 0; count-- )\n        {\n          FT_UInt32  cur_pair;\n\n\n          cur_pair = FT_NEXT_ULONG( p );\n          if ( cur_pair <= old_pair )\n            break;\n\n          p += 2;\n          old_pair = cur_pair;\n        }\n\n        if ( count == 0 )\n          ordered |= mask;\n      }\n\n    NextTable:\n      p = p_next;\n    }\n\n    face->num_kern_tables = nn;\n    face->kern_avail_bits = avail;\n    face->kern_order_bits = ordered;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  tt_face_done_kern( TT_Face  face )\n  {\n    FT_Stream  stream = face->root.stream;\n\n\n    FT_FRAME_RELEASE( face->kern_table );\n    face->kern_table_size = 0;\n    face->num_kern_tables = 0;\n    face->kern_avail_bits = 0;\n    face->kern_order_bits = 0;\n  }\n\n\n  FT_LOCAL_DEF( FT_Int )\n  tt_face_get_kerning( TT_Face  face,\n                       FT_UInt  left_glyph,\n                       FT_UInt  right_glyph )\n  {\n    FT_Int    result = 0;\n    FT_UInt   count, mask;\n    FT_Byte*  p       = face->kern_table;\n    FT_Byte*  p_limit = p + face->kern_table_size;\n\n\n    p   += 4;\n    mask = 0x0001;\n\n    for ( count = face->num_kern_tables;\n          count > 0 && p + 6 <= p_limit;\n          count--, mask <<= 1 )\n    {\n      FT_Byte* base     = p;\n      FT_Byte* next;\n      FT_UInt  version  = FT_NEXT_USHORT( p );\n      FT_UInt  length   = FT_NEXT_USHORT( p );\n      FT_UInt  coverage = FT_NEXT_USHORT( p );\n      FT_UInt  num_pairs;\n      FT_Int   value    = 0;\n\n      FT_UNUSED( version );\n\n\n      next = base + length;\n\n      if ( next > p_limit )  /* handle broken table */\n        next = p_limit;\n\n      if ( ( face->kern_avail_bits & mask ) == 0 )\n        goto NextTable;\n\n      if ( p + 8 > next )\n        goto NextTable;\n\n      num_pairs = FT_NEXT_USHORT( p );\n      p        += 6;\n\n      if ( ( next - p ) < 6 * (int)num_pairs )  /* handle broken count  */\n        num_pairs = (FT_UInt)( ( next - p ) / 6 );\n\n      switch ( coverage >> 8 )\n      {\n      case 0:\n        {\n          FT_ULong  key0 = TT_KERN_INDEX( left_glyph, right_glyph );\n\n\n          if ( face->kern_order_bits & mask )   /* binary search */\n          {\n            FT_UInt   min = 0;\n            FT_UInt   max = num_pairs;\n\n\n            while ( min < max )\n            {\n              FT_UInt   mid = ( min + max ) >> 1;\n              FT_Byte*  q   = p + 6 * mid;\n              FT_ULong  key;\n\n\n              key = FT_NEXT_ULONG( q );\n\n              if ( key == key0 )\n              {\n                value = FT_PEEK_SHORT( q );\n                goto Found;\n              }\n              if ( key < key0 )\n                min = mid + 1;\n              else\n                max = mid;\n            }\n          }\n          else /* linear search */\n          {\n            FT_UInt  count2;\n\n\n            for ( count2 = num_pairs; count2 > 0; count2-- )\n            {\n              FT_ULong  key = FT_NEXT_ULONG( p );\n\n\n              if ( key == key0 )\n              {\n                value = FT_PEEK_SHORT( p );\n                goto Found;\n              }\n              p += 2;\n            }\n          }\n        }\n        break;\n\n       /*\n        *  We don't support format 2 because we haven't seen a single font\n        *  using it in real life...\n        */\n\n      default:\n        ;\n      }\n\n      goto NextTable;\n\n    Found:\n      if ( coverage & 8 ) /* override or add */\n        result = value;\n      else\n        result += value;\n\n    NextTable:\n      p = next;\n    }\n\n    return result;\n  }\n\n#undef TT_KERN_INDEX\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttkern.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttkern.h                                                               */\n/*                                                                         */\n/*    Load the basic TrueType kerning table.  This doesn't handle          */\n/*    kerning data within the GPOS table at the moment.                    */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2005, 2007 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTKERN_H__\n#define __TTKERN_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error  )\n  tt_face_load_kern( TT_Face    face,\n                     FT_Stream  stream );\n\n  FT_LOCAL( void )\n  tt_face_done_kern( TT_Face  face );\n\n  FT_LOCAL( FT_Int )\n  tt_face_get_kerning( TT_Face     face,\n                       FT_UInt     left_glyph,\n                       FT_UInt     right_glyph );\n\n#define TT_FACE_HAS_KERNING( face )  ( (face)->kern_avail_bits != 0 )\n\n\nFT_END_HEADER\n\n#endif /* __TTKERN_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttload.c                                                               */\n/*                                                                         */\n/*    Load the basic TrueType tables, i.e., tables that can be either in   */\n/*    TTF or OTF fonts (body).                                             */\n/*                                                                         */\n/*  Copyright 1996-2010, 2012-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n#include \"ttload.h\"\n\n#include \"sferrors.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttload\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_lookup_table                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Looks for a TrueType table by name.                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A face object handle.                                      */\n  /*                                                                       */\n  /*    tag  :: The searched tag.                                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A pointer to the table directory entry.  0 if not found.           */\n  /*                                                                       */\n  FT_LOCAL_DEF( TT_Table  )\n  tt_face_lookup_table( TT_Face   face,\n                        FT_ULong  tag  )\n  {\n    TT_Table  entry;\n    TT_Table  limit;\n#ifdef FT_DEBUG_LEVEL_TRACE\n    FT_Bool   zero_length = FALSE;\n#endif\n\n\n    FT_TRACE4(( \"tt_face_lookup_table: %08p, `%c%c%c%c' -- \",\n                face,\n                (FT_Char)( tag >> 24 ),\n                (FT_Char)( tag >> 16 ),\n                (FT_Char)( tag >> 8  ),\n                (FT_Char)( tag       ) ));\n\n    entry = face->dir_tables;\n    limit = entry + face->num_tables;\n\n    for ( ; entry < limit; entry++ )\n    {\n      /* For compatibility with Windows, we consider    */\n      /* zero-length tables the same as missing tables. */\n      if ( entry->Tag == tag )\n      {\n        if ( entry->Length != 0 )\n        {\n          FT_TRACE4(( \"found table.\\n\" ));\n          return entry;\n        }\n#ifdef FT_DEBUG_LEVEL_TRACE\n        zero_length = TRUE;\n#endif\n      }\n    }\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n    if ( zero_length )\n      FT_TRACE4(( \"ignoring empty table\\n\" ));\n    else\n      FT_TRACE4(( \"could not find table\\n\" ));\n#endif\n\n    return NULL;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_goto_table                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Looks for a TrueType table by name, then seek a stream to it.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A face object handle.                                    */\n  /*                                                                       */\n  /*    tag    :: The searched tag.                                        */\n  /*                                                                       */\n  /*    stream :: The stream to seek when the table is found.              */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    length :: The length of the table if found, undefined otherwise.   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_goto_table( TT_Face    face,\n                      FT_ULong   tag,\n                      FT_Stream  stream,\n                      FT_ULong*  length )\n  {\n    TT_Table  table;\n    FT_Error  error;\n\n\n    table = tt_face_lookup_table( face, tag );\n    if ( table )\n    {\n      if ( length )\n        *length = table->Length;\n\n      if ( FT_STREAM_SEEK( table->Offset ) )\n        goto Exit;\n    }\n    else\n      error = FT_THROW( Table_Missing );\n\n  Exit:\n    return error;\n  }\n\n\n  /* Here, we                                                         */\n  /*                                                                  */\n  /* - check that `num_tables' is valid (and adjust it if necessary)  */\n  /*                                                                  */\n  /* - look for a `head' table, check its size, and parse it to check */\n  /*   whether its `magic' field is correctly set                     */\n  /*                                                                  */\n  /* - errors (except errors returned by stream handling)             */\n  /*                                                                  */\n  /*     SFNT_Err_Unknown_File_Format:                                */\n  /*       no table is defined in directory, it is not sfnt-wrapped   */\n  /*       data                                                       */\n  /*     SFNT_Err_Table_Missing:                                      */\n  /*       table directory is valid, but essential tables             */\n  /*       (head/bhed/SING) are missing                               */\n  /*                                                                  */\n  static FT_Error\n  check_table_dir( SFNT_Header  sfnt,\n                   FT_Stream    stream )\n  {\n    FT_Error   error;\n    FT_UShort  nn, valid_entries = 0;\n    FT_UInt    has_head = 0, has_sing = 0, has_meta = 0;\n    FT_ULong   offset = sfnt->offset + 12;\n\n    static const FT_Frame_Field  table_dir_entry_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TT_TableRec\n\n      FT_FRAME_START( 16 ),\n        FT_FRAME_ULONG( Tag ),\n        FT_FRAME_ULONG( CheckSum ),\n        FT_FRAME_ULONG( Offset ),\n        FT_FRAME_ULONG( Length ),\n      FT_FRAME_END\n    };\n\n\n    if ( FT_STREAM_SEEK( offset ) )\n      goto Exit;\n\n    for ( nn = 0; nn < sfnt->num_tables; nn++ )\n    {\n      TT_TableRec  table;\n\n\n      if ( FT_STREAM_READ_FIELDS( table_dir_entry_fields, &table ) )\n      {\n        nn--;\n        FT_TRACE2(( \"check_table_dir:\"\n                    \" can read only %d table%s in font (instead of %d)\\n\",\n                    nn, nn == 1 ? \"\" : \"s\", sfnt->num_tables ));\n        sfnt->num_tables = nn;\n        break;\n      }\n\n      /* we ignore invalid tables */\n\n      /* table.Offset + table.Length > stream->size ? */\n      if ( table.Length > stream->size                ||\n           table.Offset > stream->size - table.Length )\n      {\n        FT_TRACE2(( \"check_table_dir: table entry %d invalid\\n\", nn ));\n        continue;\n      }\n      else\n        valid_entries++;\n\n      if ( table.Tag == TTAG_head || table.Tag == TTAG_bhed )\n      {\n        FT_UInt32  magic;\n\n\n#ifndef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n        if ( table.Tag == TTAG_head )\n#endif\n          has_head = 1;\n\n        /*\n         * The table length should be 0x36, but certain font tools make it\n         * 0x38, so we will just check that it is greater.\n         *\n         * Note that according to the specification, the table must be\n         * padded to 32-bit lengths, but this doesn't apply to the value of\n         * its `Length' field!\n         *\n         */\n        if ( table.Length < 0x36 )\n        {\n          FT_TRACE2(( \"check_table_dir:\"\n                      \" `head' or `bhed' table too small\\n\" ));\n          error = FT_THROW( Table_Missing );\n          goto Exit;\n        }\n\n        if ( FT_STREAM_SEEK( table.Offset + 12 ) ||\n             FT_READ_ULONG( magic )              )\n          goto Exit;\n\n        if ( magic != 0x5F0F3CF5UL )\n          FT_TRACE2(( \"check_table_dir:\"\n                      \" invalid magic number in `head' or `bhed' table\\n\"));\n\n        if ( FT_STREAM_SEEK( offset + ( nn + 1 ) * 16 ) )\n          goto Exit;\n      }\n      else if ( table.Tag == TTAG_SING )\n        has_sing = 1;\n      else if ( table.Tag == TTAG_META )\n        has_meta = 1;\n    }\n\n    sfnt->num_tables = valid_entries;\n\n    if ( sfnt->num_tables == 0 )\n    {\n      FT_TRACE2(( \"check_table_dir: no tables found\\n\" ));\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n\n    /* if `sing' and `meta' tables are present, there is no `head' table */\n    if ( has_head || ( has_sing && has_meta ) )\n    {\n      error = FT_Err_Ok;\n      goto Exit;\n    }\n    else\n    {\n      FT_TRACE2(( \"check_table_dir:\" ));\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n      FT_TRACE2(( \" neither `head', `bhed', nor `sing' table found\\n\" ));\n#else\n      FT_TRACE2(( \" neither `head' nor `sing' table found\\n\" ));\n#endif\n      error = FT_THROW( Table_Missing );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_font_dir                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads the header of a SFNT font file.                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face       :: A handle to the target face object.                  */\n  /*                                                                       */\n  /*    stream     :: The input stream.                                    */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    sfnt       :: The SFNT header.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The stream cursor must be at the beginning of the font directory.  */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_font_dir( TT_Face    face,\n                         FT_Stream  stream )\n  {\n    SFNT_HeaderRec  sfnt;\n    FT_Error        error;\n    FT_Memory       memory = stream->memory;\n    TT_TableRec*    entry;\n    FT_Int          nn;\n\n    static const FT_Frame_Field  offset_table_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  SFNT_HeaderRec\n\n      FT_FRAME_START( 8 ),\n        FT_FRAME_USHORT( num_tables ),\n        FT_FRAME_USHORT( search_range ),\n        FT_FRAME_USHORT( entry_selector ),\n        FT_FRAME_USHORT( range_shift ),\n      FT_FRAME_END\n    };\n\n\n    FT_TRACE2(( \"tt_face_load_font_dir: %08p\\n\", face ));\n\n    /* read the offset table */\n\n    sfnt.offset = FT_STREAM_POS();\n\n    if ( FT_READ_ULONG( sfnt.format_tag )                    ||\n         FT_STREAM_READ_FIELDS( offset_table_fields, &sfnt ) )\n      goto Exit;\n\n    /* many fonts don't have these fields set correctly */\n#if 0\n    if ( sfnt.search_range != 1 << ( sfnt.entry_selector + 4 )        ||\n         sfnt.search_range + sfnt.range_shift != sfnt.num_tables << 4 )\n      return FT_THROW( Unknown_File_Format );\n#endif\n\n    /* load the table directory */\n\n    FT_TRACE2(( \"-- Number of tables: %10u\\n\",    sfnt.num_tables ));\n    FT_TRACE2(( \"-- Format version:   0x%08lx\\n\", sfnt.format_tag ));\n\n    if ( sfnt.format_tag != TTAG_OTTO )\n    {\n      /* check first */\n      error = check_table_dir( &sfnt, stream );\n      if ( error )\n      {\n        FT_TRACE2(( \"tt_face_load_font_dir:\"\n                    \" invalid table directory for TrueType\\n\" ));\n\n        goto Exit;\n      }\n    }\n\n    face->num_tables = sfnt.num_tables;\n    face->format_tag = sfnt.format_tag;\n\n    if ( FT_QNEW_ARRAY( face->dir_tables, face->num_tables ) )\n      goto Exit;\n\n    if ( FT_STREAM_SEEK( sfnt.offset + 12 )       ||\n         FT_FRAME_ENTER( face->num_tables * 16L ) )\n      goto Exit;\n\n    entry = face->dir_tables;\n\n    FT_TRACE2(( \"\\n\"\n                \"  tag    offset    length   checksum\\n\"\n                \"  ----------------------------------\\n\" ));\n\n    for ( nn = 0; nn < sfnt.num_tables; nn++ )\n    {\n      entry->Tag      = FT_GET_TAG4();\n      entry->CheckSum = FT_GET_ULONG();\n      entry->Offset   = FT_GET_ULONG();\n      entry->Length   = FT_GET_ULONG();\n\n      /* ignore invalid tables */\n\n      /* entry->Offset + entry->Length > stream->size ? */\n      if ( entry->Length > stream->size                 ||\n           entry->Offset > stream->size - entry->Length )\n        continue;\n      else\n      {\n        FT_TRACE2(( \"  %c%c%c%c  %08lx  %08lx  %08lx\\n\",\n                    (FT_Char)( entry->Tag >> 24 ),\n                    (FT_Char)( entry->Tag >> 16 ),\n                    (FT_Char)( entry->Tag >> 8  ),\n                    (FT_Char)( entry->Tag       ),\n                    entry->Offset,\n                    entry->Length,\n                    entry->CheckSum ));\n        entry++;\n      }\n    }\n\n    FT_FRAME_EXIT();\n\n    FT_TRACE2(( \"table directory loaded\\n\\n\" ));\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_any                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads any font table into client memory.                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: The face object to look for.                             */\n  /*                                                                       */\n  /*    tag    :: The tag of table to load.  Use the value 0 if you want   */\n  /*              to access the whole font file, else set this parameter   */\n  /*              to a valid TrueType table tag that you can forge with    */\n  /*              the MAKE_TT_TAG macro.                                   */\n  /*                                                                       */\n  /*    offset :: The starting offset in the table (or the file if         */\n  /*              tag == 0).                                               */\n  /*                                                                       */\n  /*    length :: The address of the decision variable:                    */\n  /*                                                                       */\n  /*                If length == NULL:                                     */\n  /*                  Loads the whole table.  Returns an error if          */\n  /*                  `offset' == 0!                                       */\n  /*                                                                       */\n  /*                If *length == 0:                                       */\n  /*                  Exits immediately; returning the length of the given */\n  /*                  table or of the font file, depending on the value of */\n  /*                  `tag'.                                               */\n  /*                                                                       */\n  /*                If *length != 0:                                       */\n  /*                  Loads the next `length' bytes of table or font,      */\n  /*                  starting at offset `offset' (in table or font too).  */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    buffer :: The address of target buffer.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_any( TT_Face    face,\n                    FT_ULong   tag,\n                    FT_Long    offset,\n                    FT_Byte*   buffer,\n                    FT_ULong*  length )\n  {\n    FT_Error   error;\n    FT_Stream  stream;\n    TT_Table   table;\n    FT_ULong   size;\n\n\n    if ( tag != 0 )\n    {\n      /* look for tag in font directory */\n      table = tt_face_lookup_table( face, tag );\n      if ( !table )\n      {\n        error = FT_THROW( Table_Missing );\n        goto Exit;\n      }\n\n      offset += table->Offset;\n      size    = table->Length;\n    }\n    else\n      /* tag == 0 -- the user wants to access the font file directly */\n      size = face->root.stream->size;\n\n    if ( length && *length == 0 )\n    {\n      *length = size;\n\n      return FT_Err_Ok;\n    }\n\n    if ( length )\n      size = *length;\n\n    stream = face->root.stream;\n    /* the `if' is syntactic sugar for picky compilers */\n    if ( FT_STREAM_READ_AT( offset, buffer, size ) )\n      goto Exit;\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_generic_header                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads the TrueType table `head' or `bhed'.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: The input stream.                                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  static FT_Error\n  tt_face_load_generic_header( TT_Face    face,\n                               FT_Stream  stream,\n                               FT_ULong   tag )\n  {\n    FT_Error    error;\n    TT_Header*  header;\n\n    static const FT_Frame_Field  header_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TT_Header\n\n      FT_FRAME_START( 54 ),\n        FT_FRAME_ULONG ( Table_Version ),\n        FT_FRAME_ULONG ( Font_Revision ),\n        FT_FRAME_LONG  ( CheckSum_Adjust ),\n        FT_FRAME_LONG  ( Magic_Number ),\n        FT_FRAME_USHORT( Flags ),\n        FT_FRAME_USHORT( Units_Per_EM ),\n        FT_FRAME_LONG  ( Created[0] ),\n        FT_FRAME_LONG  ( Created[1] ),\n        FT_FRAME_LONG  ( Modified[0] ),\n        FT_FRAME_LONG  ( Modified[1] ),\n        FT_FRAME_SHORT ( xMin ),\n        FT_FRAME_SHORT ( yMin ),\n        FT_FRAME_SHORT ( xMax ),\n        FT_FRAME_SHORT ( yMax ),\n        FT_FRAME_USHORT( Mac_Style ),\n        FT_FRAME_USHORT( Lowest_Rec_PPEM ),\n        FT_FRAME_SHORT ( Font_Direction ),\n        FT_FRAME_SHORT ( Index_To_Loc_Format ),\n        FT_FRAME_SHORT ( Glyph_Data_Format ),\n      FT_FRAME_END\n    };\n\n\n    error = face->goto_table( face, tag, stream, 0 );\n    if ( error )\n      goto Exit;\n\n    header = &face->header;\n\n    if ( FT_STREAM_READ_FIELDS( header_fields, header ) )\n      goto Exit;\n\n    FT_TRACE3(( \"Units per EM: %4u\\n\", header->Units_Per_EM ));\n    FT_TRACE3(( \"IndexToLoc:   %4d\\n\", header->Index_To_Loc_Format ));\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_head( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    return tt_face_load_generic_header( face, stream, TTAG_head );\n  }\n\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_bhed( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    return tt_face_load_generic_header( face, stream, TTAG_bhed );\n  }\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_max_profile                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads the maximum profile into a face object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: The input stream.                                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_maxp( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    FT_Error        error;\n    TT_MaxProfile*  maxProfile = &face->max_profile;\n\n    static const FT_Frame_Field  maxp_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TT_MaxProfile\n\n      FT_FRAME_START( 6 ),\n        FT_FRAME_LONG  ( version ),\n        FT_FRAME_USHORT( numGlyphs ),\n      FT_FRAME_END\n    };\n\n    static const FT_Frame_Field  maxp_fields_extra[] =\n    {\n      FT_FRAME_START( 26 ),\n        FT_FRAME_USHORT( maxPoints ),\n        FT_FRAME_USHORT( maxContours ),\n        FT_FRAME_USHORT( maxCompositePoints ),\n        FT_FRAME_USHORT( maxCompositeContours ),\n        FT_FRAME_USHORT( maxZones ),\n        FT_FRAME_USHORT( maxTwilightPoints ),\n        FT_FRAME_USHORT( maxStorage ),\n        FT_FRAME_USHORT( maxFunctionDefs ),\n        FT_FRAME_USHORT( maxInstructionDefs ),\n        FT_FRAME_USHORT( maxStackElements ),\n        FT_FRAME_USHORT( maxSizeOfInstructions ),\n        FT_FRAME_USHORT( maxComponentElements ),\n        FT_FRAME_USHORT( maxComponentDepth ),\n      FT_FRAME_END\n    };\n\n\n    error = face->goto_table( face, TTAG_maxp, stream, 0 );\n    if ( error )\n      goto Exit;\n\n    if ( FT_STREAM_READ_FIELDS( maxp_fields, maxProfile ) )\n      goto Exit;\n\n    maxProfile->maxPoints             = 0;\n    maxProfile->maxContours           = 0;\n    maxProfile->maxCompositePoints    = 0;\n    maxProfile->maxCompositeContours  = 0;\n    maxProfile->maxZones              = 0;\n    maxProfile->maxTwilightPoints     = 0;\n    maxProfile->maxStorage            = 0;\n    maxProfile->maxFunctionDefs       = 0;\n    maxProfile->maxInstructionDefs    = 0;\n    maxProfile->maxStackElements      = 0;\n    maxProfile->maxSizeOfInstructions = 0;\n    maxProfile->maxComponentElements  = 0;\n    maxProfile->maxComponentDepth     = 0;\n\n    if ( maxProfile->version >= 0x10000L )\n    {\n      if ( FT_STREAM_READ_FIELDS( maxp_fields_extra, maxProfile ) )\n        goto Exit;\n\n      /* XXX: an adjustment that is necessary to load certain */\n      /*      broken fonts like `Keystrokes MT' :-(           */\n      /*                                                      */\n      /*   We allocate 64 function entries by default when    */\n      /*   the maxFunctionDefs value is smaller.              */\n\n      if ( maxProfile->maxFunctionDefs < 64 )\n        maxProfile->maxFunctionDefs = 64;\n\n      /* we add 4 phantom points later */\n      if ( maxProfile->maxTwilightPoints > ( 0xFFFFU - 4 ) )\n      {\n        FT_TRACE0(( \"tt_face_load_maxp:\"\n                    \" too much twilight points in `maxp' table;\\n\"\n                    \"                  \"\n                    \" some glyphs might be rendered incorrectly\\n\" ));\n\n        maxProfile->maxTwilightPoints = 0xFFFFU - 4;\n      }\n\n      /* we arbitrarily limit recursion to avoid stack exhaustion */\n      if ( maxProfile->maxComponentDepth > 100 )\n      {\n        FT_TRACE0(( \"tt_face_load_maxp:\"\n                    \" abnormally large component depth (%d) set to 100\\n\",\n                    maxProfile->maxComponentDepth ));\n        maxProfile->maxComponentDepth = 100;\n      }\n    }\n\n    FT_TRACE3(( \"numGlyphs: %u\\n\", maxProfile->numGlyphs ));\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_name                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads the name records.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: The input stream.                                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_name( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    FT_Error      error;\n    FT_Memory     memory = stream->memory;\n    FT_ULong      table_pos, table_len;\n    FT_ULong      storage_start, storage_limit;\n    FT_UInt       count;\n    TT_NameTable  table;\n\n    static const FT_Frame_Field  name_table_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TT_NameTableRec\n\n      FT_FRAME_START( 6 ),\n        FT_FRAME_USHORT( format ),\n        FT_FRAME_USHORT( numNameRecords ),\n        FT_FRAME_USHORT( storageOffset ),\n      FT_FRAME_END\n    };\n\n    static const FT_Frame_Field  name_record_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TT_NameEntryRec\n\n      /* no FT_FRAME_START */\n        FT_FRAME_USHORT( platformID ),\n        FT_FRAME_USHORT( encodingID ),\n        FT_FRAME_USHORT( languageID ),\n        FT_FRAME_USHORT( nameID ),\n        FT_FRAME_USHORT( stringLength ),\n        FT_FRAME_USHORT( stringOffset ),\n      FT_FRAME_END\n    };\n\n\n    table         = &face->name_table;\n    table->stream = stream;\n\n    error = face->goto_table( face, TTAG_name, stream, &table_len );\n    if ( error )\n      goto Exit;\n\n    table_pos = FT_STREAM_POS();\n\n\n    if ( FT_STREAM_READ_FIELDS( name_table_fields, table ) )\n      goto Exit;\n\n    /* Some popular Asian fonts have an invalid `storageOffset' value   */\n    /* (it should be at least \"6 + 12*num_names\").  However, the string */\n    /* offsets, computed as \"storageOffset + entry->stringOffset\", are  */\n    /* valid pointers within the name table...                          */\n    /*                                                                  */\n    /* We thus can't check `storageOffset' right now.                   */\n    /*                                                                  */\n    storage_start = table_pos + 6 + 12*table->numNameRecords;\n    storage_limit = table_pos + table_len;\n\n    if ( storage_start > storage_limit )\n    {\n      FT_ERROR(( \"tt_face_load_name: invalid `name' table\\n\" ));\n      error = FT_THROW( Name_Table_Missing );\n      goto Exit;\n    }\n\n    /* Allocate the array of name records. */\n    count                 = table->numNameRecords;\n    table->numNameRecords = 0;\n\n    if ( FT_NEW_ARRAY( table->names, count ) ||\n         FT_FRAME_ENTER( count * 12 )        )\n      goto Exit;\n\n    /* Load the name records and determine how much storage is needed */\n    /* to hold the strings themselves.                                */\n    {\n      TT_NameEntryRec*  entry = table->names;\n\n\n      for ( ; count > 0; count-- )\n      {\n        if ( FT_STREAM_READ_FIELDS( name_record_fields, entry ) )\n          continue;\n\n        /* check that the name is not empty */\n        if ( entry->stringLength == 0 )\n          continue;\n\n        /* check that the name string is within the table */\n        entry->stringOffset += table_pos + table->storageOffset;\n        if ( entry->stringOffset                       < storage_start ||\n             entry->stringOffset + entry->stringLength > storage_limit )\n        {\n          /* invalid entry - ignore it */\n          entry->stringOffset = 0;\n          entry->stringLength = 0;\n          continue;\n        }\n\n        entry++;\n      }\n\n      table->numNameRecords = (FT_UInt)( entry - table->names );\n    }\n\n    FT_FRAME_EXIT();\n\n    /* everything went well, update face->num_names */\n    face->num_names = (FT_UShort) table->numNameRecords;\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_free_names                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Frees the name records.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the target face object.                        */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  tt_face_free_name( TT_Face  face )\n  {\n    FT_Memory     memory = face->root.driver->root.memory;\n    TT_NameTable  table  = &face->name_table;\n    TT_NameEntry  entry  = table->names;\n    FT_UInt       count  = table->numNameRecords;\n\n\n    if ( table->names )\n    {\n      for ( ; count > 0; count--, entry++ )\n      {\n        FT_FREE( entry->string );\n        entry->stringLength = 0;\n      }\n\n      /* free strings table */\n      FT_FREE( table->names );\n    }\n\n    table->numNameRecords = 0;\n    table->format         = 0;\n    table->storageOffset  = 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_cmap                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads the cmap directory in a face object.  The cmaps themselves   */\n  /*    are loaded on demand in the `ttcmap.c' module.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: A handle to the input stream.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_cmap( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    FT_Error  error;\n\n\n    error = face->goto_table( face, TTAG_cmap, stream, &face->cmap_size );\n    if ( error )\n      goto Exit;\n\n    if ( FT_FRAME_EXTRACT( face->cmap_size, face->cmap_table ) )\n      face->cmap_size = 0;\n\n  Exit:\n    return error;\n  }\n\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_os2                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads the OS2 table.                                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: A handle to the input stream.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_os2( TT_Face    face,\n                    FT_Stream  stream )\n  {\n    FT_Error  error;\n    TT_OS2*   os2;\n\n    static const FT_Frame_Field  os2_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TT_OS2\n\n      FT_FRAME_START( 78 ),\n        FT_FRAME_USHORT( version ),\n        FT_FRAME_SHORT ( xAvgCharWidth ),\n        FT_FRAME_USHORT( usWeightClass ),\n        FT_FRAME_USHORT( usWidthClass ),\n        FT_FRAME_SHORT ( fsType ),\n        FT_FRAME_SHORT ( ySubscriptXSize ),\n        FT_FRAME_SHORT ( ySubscriptYSize ),\n        FT_FRAME_SHORT ( ySubscriptXOffset ),\n        FT_FRAME_SHORT ( ySubscriptYOffset ),\n        FT_FRAME_SHORT ( ySuperscriptXSize ),\n        FT_FRAME_SHORT ( ySuperscriptYSize ),\n        FT_FRAME_SHORT ( ySuperscriptXOffset ),\n        FT_FRAME_SHORT ( ySuperscriptYOffset ),\n        FT_FRAME_SHORT ( yStrikeoutSize ),\n        FT_FRAME_SHORT ( yStrikeoutPosition ),\n        FT_FRAME_SHORT ( sFamilyClass ),\n        FT_FRAME_BYTE  ( panose[0] ),\n        FT_FRAME_BYTE  ( panose[1] ),\n        FT_FRAME_BYTE  ( panose[2] ),\n        FT_FRAME_BYTE  ( panose[3] ),\n        FT_FRAME_BYTE  ( panose[4] ),\n        FT_FRAME_BYTE  ( panose[5] ),\n        FT_FRAME_BYTE  ( panose[6] ),\n        FT_FRAME_BYTE  ( panose[7] ),\n        FT_FRAME_BYTE  ( panose[8] ),\n        FT_FRAME_BYTE  ( panose[9] ),\n        FT_FRAME_ULONG ( ulUnicodeRange1 ),\n        FT_FRAME_ULONG ( ulUnicodeRange2 ),\n        FT_FRAME_ULONG ( ulUnicodeRange3 ),\n        FT_FRAME_ULONG ( ulUnicodeRange4 ),\n        FT_FRAME_BYTE  ( achVendID[0] ),\n        FT_FRAME_BYTE  ( achVendID[1] ),\n        FT_FRAME_BYTE  ( achVendID[2] ),\n        FT_FRAME_BYTE  ( achVendID[3] ),\n\n        FT_FRAME_USHORT( fsSelection ),\n        FT_FRAME_USHORT( usFirstCharIndex ),\n        FT_FRAME_USHORT( usLastCharIndex ),\n        FT_FRAME_SHORT ( sTypoAscender ),\n        FT_FRAME_SHORT ( sTypoDescender ),\n        FT_FRAME_SHORT ( sTypoLineGap ),\n        FT_FRAME_USHORT( usWinAscent ),\n        FT_FRAME_USHORT( usWinDescent ),\n      FT_FRAME_END\n    };\n\n    /* `OS/2' version 1 and newer */\n    static const FT_Frame_Field  os2_fields_extra1[] =\n    {\n      FT_FRAME_START( 8 ),\n        FT_FRAME_ULONG( ulCodePageRange1 ),\n        FT_FRAME_ULONG( ulCodePageRange2 ),\n      FT_FRAME_END\n    };\n\n    /* `OS/2' version 2 and newer */\n    static const FT_Frame_Field  os2_fields_extra2[] =\n    {\n      FT_FRAME_START( 10 ),\n        FT_FRAME_SHORT ( sxHeight ),\n        FT_FRAME_SHORT ( sCapHeight ),\n        FT_FRAME_USHORT( usDefaultChar ),\n        FT_FRAME_USHORT( usBreakChar ),\n        FT_FRAME_USHORT( usMaxContext ),\n      FT_FRAME_END\n    };\n\n    /* `OS/2' version 5 and newer */\n    static const FT_Frame_Field  os2_fields_extra5[] =\n    {\n      FT_FRAME_START( 4 ),\n        FT_FRAME_USHORT( usLowerOpticalPointSize ),\n        FT_FRAME_USHORT( usUpperOpticalPointSize ),\n      FT_FRAME_END\n    };\n\n\n    /* We now support old Mac fonts where the OS/2 table doesn't  */\n    /* exist.  Simply put, we set the `version' field to 0xFFFF   */\n    /* and test this value each time we need to access the table. */\n    error = face->goto_table( face, TTAG_OS2, stream, 0 );\n    if ( error )\n      goto Exit;\n\n    os2 = &face->os2;\n\n    if ( FT_STREAM_READ_FIELDS( os2_fields, os2 ) )\n      goto Exit;\n\n    os2->ulCodePageRange1        = 0;\n    os2->ulCodePageRange2        = 0;\n    os2->sxHeight                = 0;\n    os2->sCapHeight              = 0;\n    os2->usDefaultChar           = 0;\n    os2->usBreakChar             = 0;\n    os2->usMaxContext            = 0;\n    os2->usLowerOpticalPointSize = 0;\n    os2->usUpperOpticalPointSize = 0xFFFF;\n\n    if ( os2->version >= 0x0001 )\n    {\n      /* only version 1 tables */\n      if ( FT_STREAM_READ_FIELDS( os2_fields_extra1, os2 ) )\n        goto Exit;\n\n      if ( os2->version >= 0x0002 )\n      {\n        /* only version 2 tables */\n        if ( FT_STREAM_READ_FIELDS( os2_fields_extra2, os2 ) )\n          goto Exit;\n\n        if ( os2->version >= 0x0005 )\n        {\n          /* only version 5 tables */\n          if ( FT_STREAM_READ_FIELDS( os2_fields_extra5, os2 ) )\n            goto Exit;\n        }\n      }\n    }\n\n    FT_TRACE3(( \"sTypoAscender:  %4d\\n\",   os2->sTypoAscender ));\n    FT_TRACE3(( \"sTypoDescender: %4d\\n\",   os2->sTypoDescender ));\n    FT_TRACE3(( \"usWinAscent:    %4u\\n\",   os2->usWinAscent ));\n    FT_TRACE3(( \"usWinDescent:   %4u\\n\",   os2->usWinDescent ));\n    FT_TRACE3(( \"fsSelection:    0x%2x\\n\", os2->fsSelection ));\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_postscript                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads the Postscript table.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: A handle to the input stream.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_post( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    FT_Error        error;\n    TT_Postscript*  post = &face->postscript;\n\n    static const FT_Frame_Field  post_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TT_Postscript\n\n      FT_FRAME_START( 32 ),\n        FT_FRAME_ULONG( FormatType ),\n        FT_FRAME_ULONG( italicAngle ),\n        FT_FRAME_SHORT( underlinePosition ),\n        FT_FRAME_SHORT( underlineThickness ),\n        FT_FRAME_ULONG( isFixedPitch ),\n        FT_FRAME_ULONG( minMemType42 ),\n        FT_FRAME_ULONG( maxMemType42 ),\n        FT_FRAME_ULONG( minMemType1 ),\n        FT_FRAME_ULONG( maxMemType1 ),\n      FT_FRAME_END\n    };\n\n\n    error = face->goto_table( face, TTAG_post, stream, 0 );\n    if ( error )\n      return error;\n\n    if ( FT_STREAM_READ_FIELDS( post_fields, post ) )\n      return error;\n\n    /* we don't load the glyph names, we do that in another */\n    /* module (ttpost).                                     */\n\n    FT_TRACE3(( \"FormatType:   0x%x\\n\", post->FormatType ));\n    FT_TRACE3(( \"isFixedPitch:   %s\\n\", post->isFixedPitch\n                                        ? \"  yes\" : \"   no\" ));\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_pclt                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads the PCL 5 Table.                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: A handle to the input stream.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_pclt( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    static const FT_Frame_Field  pclt_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TT_PCLT\n\n      FT_FRAME_START( 54 ),\n        FT_FRAME_ULONG ( Version ),\n        FT_FRAME_ULONG ( FontNumber ),\n        FT_FRAME_USHORT( Pitch ),\n        FT_FRAME_USHORT( xHeight ),\n        FT_FRAME_USHORT( Style ),\n        FT_FRAME_USHORT( TypeFamily ),\n        FT_FRAME_USHORT( CapHeight ),\n        FT_FRAME_USHORT( SymbolSet ),\n        FT_FRAME_BYTES ( TypeFace, 16 ),\n        FT_FRAME_BYTES ( CharacterComplement, 8 ),\n        FT_FRAME_BYTES ( FileName, 6 ),\n        FT_FRAME_CHAR  ( StrokeWeight ),\n        FT_FRAME_CHAR  ( WidthType ),\n        FT_FRAME_BYTE  ( SerifStyle ),\n        FT_FRAME_BYTE  ( Reserved ),\n      FT_FRAME_END\n    };\n\n    FT_Error  error;\n    TT_PCLT*  pclt = &face->pclt;\n\n\n    /* optional table */\n    error = face->goto_table( face, TTAG_PCLT, stream, 0 );\n    if ( error )\n      goto Exit;\n\n    if ( FT_STREAM_READ_FIELDS( pclt_fields, pclt ) )\n      goto Exit;\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_gasp                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads the `gasp' table into a face object.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: The input stream.                                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_gasp( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    FT_Error   error;\n    FT_Memory  memory = stream->memory;\n\n    FT_UInt        j,num_ranges;\n    TT_GaspRange   gaspranges = NULL;\n\n\n    /* the gasp table is optional */\n    error = face->goto_table( face, TTAG_gasp, stream, 0 );\n    if ( error )\n      goto Exit;\n\n    if ( FT_FRAME_ENTER( 4L ) )\n      goto Exit;\n\n    face->gasp.version   = FT_GET_USHORT();\n    face->gasp.numRanges = FT_GET_USHORT();\n\n    FT_FRAME_EXIT();\n\n    /* only support versions 0 and 1 of the table */\n    if ( face->gasp.version >= 2 )\n    {\n      face->gasp.numRanges = 0;\n      error = FT_THROW( Invalid_Table );\n      goto Exit;\n    }\n\n    num_ranges = face->gasp.numRanges;\n    FT_TRACE3(( \"numRanges: %u\\n\", num_ranges ));\n\n    if ( FT_QNEW_ARRAY( face->gasp.gaspRanges, num_ranges ) ||\n         FT_FRAME_ENTER( num_ranges * 4L )                  )\n      goto Exit;\n\n    gaspranges = face->gasp.gaspRanges;\n\n    for ( j = 0; j < num_ranges; j++ )\n    {\n      gaspranges[j].maxPPEM  = FT_GET_USHORT();\n      gaspranges[j].gaspFlag = FT_GET_USHORT();\n\n      FT_TRACE3(( \"gaspRange %d: rangeMaxPPEM %5d, rangeGaspBehavior 0x%x\\n\",\n                  j,\n                  gaspranges[j].maxPPEM,\n                  gaspranges[j].gaspFlag ));\n    }\n\n    FT_FRAME_EXIT();\n\n  Exit:\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttload.h                                                               */\n/*                                                                         */\n/*    Load the basic TrueType tables, i.e., tables that can be either in   */\n/*    TTF or OTF fonts (specification).                                    */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2005, 2006 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTLOAD_H__\n#define __TTLOAD_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( TT_Table  )\n  tt_face_lookup_table( TT_Face   face,\n                        FT_ULong  tag );\n\n  FT_LOCAL( FT_Error )\n  tt_face_goto_table( TT_Face    face,\n                      FT_ULong   tag,\n                      FT_Stream  stream,\n                      FT_ULong*  length );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_font_dir( TT_Face    face,\n                         FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_any( TT_Face    face,\n                    FT_ULong   tag,\n                    FT_Long    offset,\n                    FT_Byte*   buffer,\n                    FT_ULong*  length );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_head( TT_Face    face,\n                     FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_cmap( TT_Face    face,\n                     FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_maxp( TT_Face    face,\n                     FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_name( TT_Face    face,\n                     FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_os2( TT_Face    face,\n                    FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_post( TT_Face    face,\n                     FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_pclt( TT_Face    face,\n                     FT_Stream  stream );\n\n  FT_LOCAL( void )\n  tt_face_free_name( TT_Face  face );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_gasp( TT_Face    face,\n                     FT_Stream  stream );\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_bhed( TT_Face    face,\n                     FT_Stream  stream );\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n\nFT_END_HEADER\n\n#endif /* __TTLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttmtx.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttmtx.c                                                                */\n/*                                                                         */\n/*    Load the metrics tables common to TTF and OTF fonts (body).          */\n/*                                                                         */\n/*  Copyright 2006-2009, 2011-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n#include \"ttmtx.h\"\n\n#include \"sferrors.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttmtx\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_hmtx                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the `hmtx' or `vmtx' table into a face object.                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face     :: A handle to the target face object.                    */\n  /*                                                                       */\n  /*    stream   :: The input stream.                                      */\n  /*                                                                       */\n  /*    vertical :: A boolean flag.  If set, load `vmtx'.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_hmtx( TT_Face    face,\n                     FT_Stream  stream,\n                     FT_Bool    vertical )\n  {\n    FT_Error   error;\n    FT_ULong   tag, table_size;\n    FT_ULong*  ptable_offset;\n    FT_ULong*  ptable_size;\n\n\n    if ( vertical )\n    {\n      tag           = TTAG_vmtx;\n      ptable_offset = &face->vert_metrics_offset;\n      ptable_size   = &face->vert_metrics_size;\n    }\n    else\n    {\n      tag           = TTAG_hmtx;\n      ptable_offset = &face->horz_metrics_offset;\n      ptable_size   = &face->horz_metrics_size;\n    }\n\n    error = face->goto_table( face, tag, stream, &table_size );\n    if ( error )\n      goto Fail;\n\n    *ptable_size   = table_size;\n    *ptable_offset = FT_STREAM_POS();\n\n  Fail:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_hhea                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the `hhea' or 'vhea' table into a face object.                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face     :: A handle to the target face object.                    */\n  /*                                                                       */\n  /*    stream   :: The input stream.                                      */\n  /*                                                                       */\n  /*    vertical :: A boolean flag.  If set, load `vhea'.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_hhea( TT_Face    face,\n                     FT_Stream  stream,\n                     FT_Bool    vertical )\n  {\n    FT_Error        error;\n    TT_HoriHeader*  header;\n\n    static const FT_Frame_Field  metrics_header_fields[] =\n    {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  TT_HoriHeader\n\n      FT_FRAME_START( 36 ),\n        FT_FRAME_ULONG ( Version ),\n        FT_FRAME_SHORT ( Ascender ),\n        FT_FRAME_SHORT ( Descender ),\n        FT_FRAME_SHORT ( Line_Gap ),\n        FT_FRAME_USHORT( advance_Width_Max ),\n        FT_FRAME_SHORT ( min_Left_Side_Bearing ),\n        FT_FRAME_SHORT ( min_Right_Side_Bearing ),\n        FT_FRAME_SHORT ( xMax_Extent ),\n        FT_FRAME_SHORT ( caret_Slope_Rise ),\n        FT_FRAME_SHORT ( caret_Slope_Run ),\n        FT_FRAME_SHORT ( caret_Offset ),\n        FT_FRAME_SHORT ( Reserved[0] ),\n        FT_FRAME_SHORT ( Reserved[1] ),\n        FT_FRAME_SHORT ( Reserved[2] ),\n        FT_FRAME_SHORT ( Reserved[3] ),\n        FT_FRAME_SHORT ( metric_Data_Format ),\n        FT_FRAME_USHORT( number_Of_HMetrics ),\n      FT_FRAME_END\n    };\n\n\n    if ( vertical )\n    {\n      void  *v = &face->vertical;\n\n\n      error = face->goto_table( face, TTAG_vhea, stream, 0 );\n      if ( error )\n        goto Fail;\n\n      header = (TT_HoriHeader*)v;\n    }\n    else\n    {\n      error = face->goto_table( face, TTAG_hhea, stream, 0 );\n      if ( error )\n        goto Fail;\n\n      header = &face->horizontal;\n    }\n\n    if ( FT_STREAM_READ_FIELDS( metrics_header_fields, header ) )\n      goto Fail;\n\n    FT_TRACE3(( \"Ascender:          %5d\\n\", header->Ascender ));\n    FT_TRACE3(( \"Descender:         %5d\\n\", header->Descender ));\n    FT_TRACE3(( \"number_Of_Metrics: %5u\\n\", header->number_Of_HMetrics ));\n\n    header->long_metrics  = NULL;\n    header->short_metrics = NULL;\n\n  Fail:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_get_metrics                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the horizontal or vertical metrics in font units for a      */\n  /*    given glyph.  The values are the left side bearing (top side       */\n  /*    bearing for vertical metrics) and advance width (advance height    */\n  /*    for vertical metrics).                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face     :: A pointer to the TrueType face structure.              */\n  /*                                                                       */\n  /*    vertical :: If set to TRUE, get vertical metrics.                  */\n  /*                                                                       */\n  /*    gindex   :: The glyph index.                                       */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    abearing :: The bearing, either left side or top side.             */\n  /*                                                                       */\n  /*    aadvance :: The advance width or advance height, depending on      */\n  /*                the `vertical' flag.                                   */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  tt_face_get_metrics( TT_Face     face,\n                       FT_Bool     vertical,\n                       FT_UInt     gindex,\n                       FT_Short   *abearing,\n                       FT_UShort  *aadvance )\n  {\n    FT_Error        error;\n    FT_Stream       stream = face->root.stream;\n    TT_HoriHeader*  header;\n    FT_ULong        table_pos, table_size, table_end;\n    FT_UShort       k;\n\n\n    if ( vertical )\n    {\n      void*  v = &face->vertical;\n\n\n      header     = (TT_HoriHeader*)v;\n      table_pos  = face->vert_metrics_offset;\n      table_size = face->vert_metrics_size;\n    }\n    else\n    {\n      header     = &face->horizontal;\n      table_pos  = face->horz_metrics_offset;\n      table_size = face->horz_metrics_size;\n    }\n\n    table_end = table_pos + table_size;\n\n    k = header->number_Of_HMetrics;\n\n    if ( k > 0 )\n    {\n      if ( gindex < (FT_UInt)k )\n      {\n        table_pos += 4 * gindex;\n        if ( table_pos + 4 > table_end )\n          goto NoData;\n\n        if ( FT_STREAM_SEEK( table_pos ) ||\n             FT_READ_USHORT( *aadvance ) ||\n             FT_READ_SHORT( *abearing )  )\n          goto NoData;\n      }\n      else\n      {\n        table_pos += 4 * ( k - 1 );\n        if ( table_pos + 4 > table_end )\n          goto NoData;\n\n        if ( FT_STREAM_SEEK( table_pos ) ||\n             FT_READ_USHORT( *aadvance ) )\n          goto NoData;\n\n        table_pos += 4 + 2 * ( gindex - k );\n        if ( table_pos + 2 > table_end )\n          *abearing = 0;\n        else\n        {\n          if ( !FT_STREAM_SEEK( table_pos ) )\n            (void)FT_READ_SHORT( *abearing );\n        }\n      }\n    }\n    else\n    {\n    NoData:\n      *abearing = 0;\n      *aadvance = 0;\n    }\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttmtx.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttmtx.h                                                                */\n/*                                                                         */\n/*    Load the metrics tables common to TTF and OTF fonts (specification). */\n/*                                                                         */\n/*  Copyright 2006, 2014 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTMTX_H__\n#define __TTMTX_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_hhea( TT_Face    face,\n                     FT_Stream  stream,\n                     FT_Bool    vertical );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_hmtx( TT_Face    face,\n                     FT_Stream  stream,\n                     FT_Bool    vertical );\n\n\n  FT_LOCAL( void )\n  tt_face_get_metrics( TT_Face     face,\n                       FT_Bool     vertical,\n                       FT_UInt     gindex,\n                       FT_Short*   abearing,\n                       FT_UShort*  aadvance );\n\nFT_END_HEADER\n\n#endif /* __TTMTX_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttpost.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttpost.c                                                               */\n/*                                                                         */\n/*    Postcript name table processing for TrueType and OpenType fonts      */\n/*    (body).                                                              */\n/*                                                                         */\n/*  Copyright 1996-2003, 2006-2010, 2013, 2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The post table is not completely loaded by the core engine.  This     */\n  /* file loads the missing PS glyph names and implements an API to access */\n  /* them.                                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n#include \"ttpost.h\"\n\n#include \"sferrors.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttpost\n\n\n  /* If this configuration macro is defined, we rely on the `PSNames' */\n  /* module to grab the glyph names.                                  */\n\n#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n\n#define MAC_NAME( x )  ( (FT_String*)psnames->macintosh_name( x ) )\n\n\n#else /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */\n\n\n   /* Otherwise, we ignore the `PSNames' module, and provide our own  */\n   /* table of Mac names.  Thus, it is possible to build a version of */\n   /* FreeType without the Type 1 driver & PSNames module.            */\n\n#define MAC_NAME( x )  ( (FT_String*)tt_post_default_names[x] )\n\n  /* the 258 default Mac PS glyph names; see file `tools/glnames.py' */\n\n  static const FT_String* const  tt_post_default_names[258] =\n  {\n    /*   0 */\n    \".notdef\", \".null\", \"nonmarkingreturn\", \"space\", \"exclam\",\n    \"quotedbl\", \"numbersign\", \"dollar\", \"percent\", \"ampersand\",\n    /*  10 */\n    \"quotesingle\", \"parenleft\", \"parenright\", \"asterisk\", \"plus\",\n    \"comma\", \"hyphen\", \"period\", \"slash\", \"zero\",\n    /*  20 */\n    \"one\", \"two\", \"three\", \"four\", \"five\",\n    \"six\", \"seven\", \"eight\", \"nine\", \"colon\",\n    /*  30 */\n    \"semicolon\", \"less\", \"equal\", \"greater\", \"question\",\n    \"at\", \"A\", \"B\", \"C\", \"D\",\n    /*  40 */\n    \"E\", \"F\", \"G\", \"H\", \"I\",\n    \"J\", \"K\", \"L\", \"M\", \"N\",\n    /*  50 */\n    \"O\", \"P\", \"Q\", \"R\", \"S\",\n    \"T\", \"U\", \"V\", \"W\", \"X\",\n    /*  60 */\n    \"Y\", \"Z\", \"bracketleft\", \"backslash\", \"bracketright\",\n    \"asciicircum\", \"underscore\", \"grave\", \"a\", \"b\",\n    /*  70 */\n    \"c\", \"d\", \"e\", \"f\", \"g\",\n    \"h\", \"i\", \"j\", \"k\", \"l\",\n    /*  80 */\n    \"m\", \"n\", \"o\", \"p\", \"q\",\n    \"r\", \"s\", \"t\", \"u\", \"v\",\n    /*  90 */\n    \"w\", \"x\", \"y\", \"z\", \"braceleft\",\n    \"bar\", \"braceright\", \"asciitilde\", \"Adieresis\", \"Aring\",\n    /* 100 */\n    \"Ccedilla\", \"Eacute\", \"Ntilde\", \"Odieresis\", \"Udieresis\",\n    \"aacute\", \"agrave\", \"acircumflex\", \"adieresis\", \"atilde\",\n    /* 110 */\n    \"aring\", \"ccedilla\", \"eacute\", \"egrave\", \"ecircumflex\",\n    \"edieresis\", \"iacute\", \"igrave\", \"icircumflex\", \"idieresis\",\n    /* 120 */\n    \"ntilde\", \"oacute\", \"ograve\", \"ocircumflex\", \"odieresis\",\n    \"otilde\", \"uacute\", \"ugrave\", \"ucircumflex\", \"udieresis\",\n    /* 130 */\n    \"dagger\", \"degree\", \"cent\", \"sterling\", \"section\",\n    \"bullet\", \"paragraph\", \"germandbls\", \"registered\", \"copyright\",\n    /* 140 */\n    \"trademark\", \"acute\", \"dieresis\", \"notequal\", \"AE\",\n    \"Oslash\", \"infinity\", \"plusminus\", \"lessequal\", \"greaterequal\",\n    /* 150 */\n    \"yen\", \"mu\", \"partialdiff\", \"summation\", \"product\",\n    \"pi\", \"integral\", \"ordfeminine\", \"ordmasculine\", \"Omega\",\n    /* 160 */\n    \"ae\", \"oslash\", \"questiondown\", \"exclamdown\", \"logicalnot\",\n    \"radical\", \"florin\", \"approxequal\", \"Delta\", \"guillemotleft\",\n    /* 170 */\n    \"guillemotright\", \"ellipsis\", \"nonbreakingspace\", \"Agrave\", \"Atilde\",\n    \"Otilde\", \"OE\", \"oe\", \"endash\", \"emdash\",\n    /* 180 */\n    \"quotedblleft\", \"quotedblright\", \"quoteleft\", \"quoteright\", \"divide\",\n    \"lozenge\", \"ydieresis\", \"Ydieresis\", \"fraction\", \"currency\",\n    /* 190 */\n    \"guilsinglleft\", \"guilsinglright\", \"fi\", \"fl\", \"daggerdbl\",\n    \"periodcentered\", \"quotesinglbase\", \"quotedblbase\", \"perthousand\", \"Acircumflex\",\n    /* 200 */\n    \"Ecircumflex\", \"Aacute\", \"Edieresis\", \"Egrave\", \"Iacute\",\n    \"Icircumflex\", \"Idieresis\", \"Igrave\", \"Oacute\", \"Ocircumflex\",\n    /* 210 */\n    \"apple\", \"Ograve\", \"Uacute\", \"Ucircumflex\", \"Ugrave\",\n    \"dotlessi\", \"circumflex\", \"tilde\", \"macron\", \"breve\",\n    /* 220 */\n    \"dotaccent\", \"ring\", \"cedilla\", \"hungarumlaut\", \"ogonek\",\n    \"caron\", \"Lslash\", \"lslash\", \"Scaron\", \"scaron\",\n    /* 230 */\n    \"Zcaron\", \"zcaron\", \"brokenbar\", \"Eth\", \"eth\",\n    \"Yacute\", \"yacute\", \"Thorn\", \"thorn\", \"minus\",\n    /* 240 */\n    \"multiply\", \"onesuperior\", \"twosuperior\", \"threesuperior\", \"onehalf\",\n    \"onequarter\", \"threequarters\", \"franc\", \"Gbreve\", \"gbreve\",\n    /* 250 */\n    \"Idotaccent\", \"Scedilla\", \"scedilla\", \"Cacute\", \"cacute\",\n    \"Ccaron\", \"ccaron\", \"dcroat\",\n  };\n\n\n#endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */\n\n\n  static FT_Error\n  load_format_20( TT_Face    face,\n                  FT_Stream  stream,\n                  FT_Long    post_limit )\n  {\n    FT_Memory   memory = stream->memory;\n    FT_Error    error;\n\n    FT_Int      num_glyphs;\n    FT_UShort   num_names;\n\n    FT_UShort*  glyph_indices = 0;\n    FT_Char**   name_strings  = 0;\n\n\n    if ( FT_READ_USHORT( num_glyphs ) )\n      goto Exit;\n\n    /* UNDOCUMENTED!  The number of glyphs in this table can be smaller */\n    /* than the value in the maxp table (cf. cyberbit.ttf).             */\n\n    /* There already exist fonts which have more than 32768 glyph names */\n    /* in this table, so the test for this threshold has been dropped.  */\n\n    if ( num_glyphs > face->max_profile.numGlyphs )\n    {\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    /* load the indices */\n    {\n      FT_Int  n;\n\n\n      if ( FT_NEW_ARRAY ( glyph_indices, num_glyphs ) ||\n           FT_FRAME_ENTER( num_glyphs * 2L )          )\n        goto Fail;\n\n      for ( n = 0; n < num_glyphs; n++ )\n        glyph_indices[n] = FT_GET_USHORT();\n\n      FT_FRAME_EXIT();\n    }\n\n    /* compute number of names stored in table */\n    {\n      FT_Int  n;\n\n\n      num_names = 0;\n\n      for ( n = 0; n < num_glyphs; n++ )\n      {\n        FT_Int  idx;\n\n\n        idx = glyph_indices[n];\n        if ( idx >= 258 )\n        {\n          idx -= 257;\n          if ( idx > num_names )\n            num_names = (FT_UShort)idx;\n        }\n      }\n    }\n\n    /* now load the name strings */\n    {\n      FT_UShort  n;\n\n\n      if ( FT_NEW_ARRAY( name_strings, num_names ) )\n        goto Fail;\n\n      for ( n = 0; n < num_names; n++ )\n      {\n        FT_UInt  len;\n\n\n        if ( FT_STREAM_POS() >= post_limit )\n          break;\n        else\n        {\n          FT_TRACE6(( \"load_format_20: %d byte left in post table\\n\",\n                      post_limit - FT_STREAM_POS() ));\n\n          if ( FT_READ_BYTE( len ) )\n            goto Fail1;\n        }\n\n        if ( (FT_Int)len > post_limit                   ||\n             FT_STREAM_POS() > post_limit - (FT_Int)len )\n        {\n          FT_ERROR(( \"load_format_20:\"\n                     \" exceeding string length (%d),\"\n                     \" truncating at end of post table (%d byte left)\\n\",\n                     len, post_limit - FT_STREAM_POS() ));\n          len = FT_MAX( 0, post_limit - FT_STREAM_POS() );\n        }\n\n        if ( FT_NEW_ARRAY( name_strings[n], len + 1 ) ||\n             FT_STREAM_READ( name_strings[n], len   ) )\n          goto Fail1;\n\n        name_strings[n][len] = '\\0';\n      }\n\n      if ( n < num_names )\n      {\n        FT_ERROR(( \"load_format_20:\"\n                   \" all entries in post table are already parsed,\"\n                   \" using NULL names for gid %d - %d\\n\",\n                    n, num_names - 1 ));\n        for ( ; n < num_names; n++ )\n          if ( FT_NEW_ARRAY( name_strings[n], 1 ) )\n            goto Fail1;\n          else\n            name_strings[n][0] = '\\0';\n      }\n    }\n\n    /* all right, set table fields and exit successfully */\n    {\n      TT_Post_20  table = &face->postscript_names.names.format_20;\n\n\n      table->num_glyphs    = (FT_UShort)num_glyphs;\n      table->num_names     = (FT_UShort)num_names;\n      table->glyph_indices = glyph_indices;\n      table->glyph_names   = name_strings;\n    }\n    return FT_Err_Ok;\n\n  Fail1:\n    {\n      FT_UShort  n;\n\n\n      for ( n = 0; n < num_names; n++ )\n        FT_FREE( name_strings[n] );\n    }\n\n  Fail:\n    FT_FREE( name_strings );\n    FT_FREE( glyph_indices );\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  load_format_25( TT_Face    face,\n                  FT_Stream  stream,\n                  FT_Long    post_limit )\n  {\n    FT_Memory  memory = stream->memory;\n    FT_Error   error;\n\n    FT_Int     num_glyphs;\n    FT_Char*   offset_table = 0;\n\n    FT_UNUSED( post_limit );\n\n\n    /* UNDOCUMENTED!  This value appears only in the Apple TT specs. */\n    if ( FT_READ_USHORT( num_glyphs ) )\n      goto Exit;\n\n    /* check the number of glyphs */\n    if ( num_glyphs > face->max_profile.numGlyphs || num_glyphs > 258 )\n    {\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    if ( FT_NEW_ARRAY( offset_table, num_glyphs )   ||\n         FT_STREAM_READ( offset_table, num_glyphs ) )\n      goto Fail;\n\n    /* now check the offset table */\n    {\n      FT_Int  n;\n\n\n      for ( n = 0; n < num_glyphs; n++ )\n      {\n        FT_Long  idx = (FT_Long)n + offset_table[n];\n\n\n        if ( idx < 0 || idx > num_glyphs )\n        {\n          error = FT_THROW( Invalid_File_Format );\n          goto Fail;\n        }\n      }\n    }\n\n    /* OK, set table fields and exit successfully */\n    {\n      TT_Post_25  table = &face->postscript_names.names.format_25;\n\n\n      table->num_glyphs = (FT_UShort)num_glyphs;\n      table->offsets    = offset_table;\n    }\n\n    return FT_Err_Ok;\n\n  Fail:\n    FT_FREE( offset_table );\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  load_post_names( TT_Face  face )\n  {\n    FT_Stream  stream;\n    FT_Error   error;\n    FT_Fixed   format;\n    FT_ULong   post_len;\n    FT_Long    post_limit;\n\n\n    /* get a stream for the face's resource */\n    stream = face->root.stream;\n\n    /* seek to the beginning of the PS names table */\n    error = face->goto_table( face, TTAG_post, stream, &post_len );\n    if ( error )\n      goto Exit;\n\n    post_limit = FT_STREAM_POS() + post_len;\n\n    format = face->postscript.FormatType;\n\n    /* go to beginning of subtable */\n    if ( FT_STREAM_SKIP( 32 ) )\n      goto Exit;\n\n    /* now read postscript table */\n    if ( format == 0x00020000L )\n      error = load_format_20( face, stream, post_limit );\n    else if ( format == 0x00028000L )\n      error = load_format_25( face, stream, post_limit );\n    else\n      error = FT_THROW( Invalid_File_Format );\n\n    face->postscript_names.loaded = 1;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  tt_face_free_ps_names( TT_Face  face )\n  {\n    FT_Memory      memory = face->root.memory;\n    TT_Post_Names  names  = &face->postscript_names;\n    FT_Fixed       format;\n\n\n    if ( names->loaded )\n    {\n      format = face->postscript.FormatType;\n\n      if ( format == 0x00020000L )\n      {\n        TT_Post_20  table = &names->names.format_20;\n        FT_UShort   n;\n\n\n        FT_FREE( table->glyph_indices );\n        table->num_glyphs = 0;\n\n        for ( n = 0; n < table->num_names; n++ )\n          FT_FREE( table->glyph_names[n] );\n\n        FT_FREE( table->glyph_names );\n        table->num_names = 0;\n      }\n      else if ( format == 0x00028000L )\n      {\n        TT_Post_25  table = &names->names.format_25;\n\n\n        FT_FREE( table->offsets );\n        table->num_glyphs = 0;\n      }\n    }\n    names->loaded = 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_get_ps_name                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Get the PostScript glyph name of a glyph.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the parent face.                             */\n  /*                                                                       */\n  /*    idx    :: The glyph index.                                         */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    PSname :: The address of a string pointer.  Will be NULL in case   */\n  /*              of error, otherwise it is a pointer to the glyph name.   */\n  /*                                                                       */\n  /*              You must not modify the returned string!                 */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_get_ps_name( TT_Face      face,\n                       FT_UInt      idx,\n                       FT_String**  PSname )\n  {\n    FT_Error       error;\n    TT_Post_Names  names;\n    FT_Fixed       format;\n\n#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES\n    FT_Service_PsCMaps  psnames;\n#endif\n\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n    if ( idx >= (FT_UInt)face->max_profile.numGlyphs )\n      return FT_THROW( Invalid_Glyph_Index );\n\n#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES\n    psnames = (FT_Service_PsCMaps)face->psnames;\n    if ( !psnames )\n      return FT_THROW( Unimplemented_Feature );\n#endif\n\n    names = &face->postscript_names;\n\n    /* `.notdef' by default */\n    *PSname = MAC_NAME( 0 );\n\n    format = face->postscript.FormatType;\n\n    if ( format == 0x00010000L )\n    {\n      if ( idx < 258 )                    /* paranoid checking */\n        *PSname = MAC_NAME( idx );\n    }\n    else if ( format == 0x00020000L )\n    {\n      TT_Post_20  table = &names->names.format_20;\n\n\n      if ( !names->loaded )\n      {\n        error = load_post_names( face );\n        if ( error )\n          goto End;\n      }\n\n      if ( idx < (FT_UInt)table->num_glyphs )\n      {\n        FT_UShort  name_index = table->glyph_indices[idx];\n\n\n        if ( name_index < 258 )\n          *PSname = MAC_NAME( name_index );\n        else\n          *PSname = (FT_String*)table->glyph_names[name_index - 258];\n      }\n    }\n    else if ( format == 0x00028000L )\n    {\n      TT_Post_25  table = &names->names.format_25;\n\n\n      if ( !names->loaded )\n      {\n        error = load_post_names( face );\n        if ( error )\n          goto End;\n      }\n\n      if ( idx < (FT_UInt)table->num_glyphs )    /* paranoid checking */\n      {\n        idx    += table->offsets[idx];\n        *PSname = MAC_NAME( idx );\n      }\n    }\n\n    /* nothing to do for format == 0x00030000L */\n\n  End:\n    return FT_Err_Ok;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttpost.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttpost.h                                                               */\n/*                                                                         */\n/*    Postcript name table processing for TrueType and OpenType fonts      */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTPOST_H__\n#define __TTPOST_H__\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_get_ps_name( TT_Face      face,\n                       FT_UInt      idx,\n                       FT_String**  PSname );\n\n  FT_LOCAL( void )\n  tt_face_free_ps_names( TT_Face  face );\n\n\nFT_END_HEADER\n\n#endif /* __TTPOST_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttsbit.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttsbit.c                                                               */\n/*                                                                         */\n/*    TrueType and OpenType embedded bitmap support (body).                */\n/*                                                                         */\n/*  Copyright 2005-2009, 2013, 2014 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  Copyright 2013 by Google, Inc.                                         */\n/*  Google Author(s): Behdad Esfahbod.                                     */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_BITMAP_H\n#include \"ttsbit.h\"\n\n#include \"sferrors.h\"\n\n#include \"ttmtx.h\"\n#include \"pngshim.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttsbit\n\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_sbit( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    FT_Error  error;\n    FT_ULong  table_size;\n\n\n    face->sbit_table       = NULL;\n    face->sbit_table_size  = 0;\n    face->sbit_table_type  = TT_SBIT_TABLE_TYPE_NONE;\n    face->sbit_num_strikes = 0;\n\n    error = face->goto_table( face, TTAG_CBLC, stream, &table_size );\n    if ( !error )\n      face->sbit_table_type = TT_SBIT_TABLE_TYPE_CBLC;\n    else\n    {\n      error = face->goto_table( face, TTAG_EBLC, stream, &table_size );\n      if ( error )\n        error = face->goto_table( face, TTAG_bloc, stream, &table_size );\n      if ( !error )\n        face->sbit_table_type = TT_SBIT_TABLE_TYPE_EBLC;\n    }\n\n    if ( error )\n    {\n      error = face->goto_table( face, TTAG_sbix, stream, &table_size );\n      if ( !error )\n        face->sbit_table_type = TT_SBIT_TABLE_TYPE_SBIX;\n    }\n    if ( error )\n      goto Exit;\n\n    if ( table_size < 8 )\n    {\n      FT_ERROR(( \"tt_face_load_sbit_strikes: table too short\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    switch ( (FT_UInt)face->sbit_table_type )\n    {\n    case TT_SBIT_TABLE_TYPE_EBLC:\n    case TT_SBIT_TABLE_TYPE_CBLC:\n      {\n        FT_Byte*  p;\n        FT_Fixed  version;\n        FT_ULong  num_strikes;\n        FT_UInt   count;\n\n\n        if ( FT_FRAME_EXTRACT( table_size, face->sbit_table ) )\n          goto Exit;\n\n        face->sbit_table_size = table_size;\n\n        p = face->sbit_table;\n\n        version     = FT_NEXT_ULONG( p );\n        num_strikes = FT_NEXT_ULONG( p );\n\n        if ( ( version & 0xFFFF0000UL ) != 0x00020000UL )\n        {\n          error = FT_THROW( Unknown_File_Format );\n          goto Exit;\n        }\n\n        if ( num_strikes >= 0x10000UL )\n        {\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        /*\n         *  Count the number of strikes available in the table.  We are a bit\n         *  paranoid there and don't trust the data.\n         */\n        count = (FT_UInt)num_strikes;\n        if ( 8 + 48UL * count > table_size )\n          count = (FT_UInt)( ( table_size - 8 ) / 48 );\n\n        face->sbit_num_strikes = count;\n      }\n      break;\n\n    case TT_SBIT_TABLE_TYPE_SBIX:\n      {\n        FT_UShort  version;\n        FT_UShort  flags;\n        FT_ULong   num_strikes;\n        FT_UInt    count;\n\n\n        if ( FT_FRAME_ENTER( 8 ) )\n          goto Exit;\n\n        version     = FT_GET_USHORT();\n        flags       = FT_GET_USHORT();\n        num_strikes = FT_GET_ULONG();\n\n        FT_FRAME_EXIT();\n\n        if ( version < 1 )\n        {\n          error = FT_THROW( Unknown_File_Format );\n          goto Exit;\n        }\n\n        /* Bit 0 must always be `1'.                            */\n        /* Bit 1 controls the overlay of bitmaps with outlines. */\n        /* All other bits should be zero.                       */\n        if ( !( flags == 1 || flags == 3 ) ||\n             num_strikes >= 0x10000UL      )\n        {\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        /* we currently don't support bit 1; however, it is better to */\n        /* draw at least something...                                 */\n        if ( flags == 3 )\n          FT_TRACE1(( \"tt_face_load_sbit_strikes:\"\n                      \" sbix overlay not supported yet\\n\"\n                      \"                          \"\n                      \" expect bad rendering results\\n\" ));\n\n        /*\n         *  Count the number of strikes available in the table.  We are a bit\n         *  paranoid there and don't trust the data.\n         */\n        count = (FT_UInt)num_strikes;\n        if ( 8 + 4UL * count > table_size )\n          count = (FT_UInt)( ( table_size - 8 ) / 4 );\n\n        if ( FT_STREAM_SEEK( FT_STREAM_POS() - 8 ) )\n          goto Exit;\n\n        face->sbit_table_size = 8 + count * 4;\n        if ( FT_FRAME_EXTRACT( face->sbit_table_size, face->sbit_table ) )\n          goto Exit;\n\n        face->sbit_num_strikes = count;\n      }\n      break;\n\n    default:\n      error = FT_THROW( Unknown_File_Format );\n      break;\n    }\n\n    if ( !error )\n      FT_TRACE3(( \"sbit_num_strikes: %u\\n\", face->sbit_num_strikes ));\n\n    return FT_Err_Ok;\n\n  Exit:\n    if ( error )\n    {\n      if ( face->sbit_table )\n        FT_FRAME_RELEASE( face->sbit_table );\n      face->sbit_table_size = 0;\n      face->sbit_table_type = TT_SBIT_TABLE_TYPE_NONE;\n    }\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  tt_face_free_sbit( TT_Face  face )\n  {\n    FT_Stream  stream = face->root.stream;\n\n\n    FT_FRAME_RELEASE( face->sbit_table );\n    face->sbit_table_size  = 0;\n    face->sbit_table_type  = TT_SBIT_TABLE_TYPE_NONE;\n    face->sbit_num_strikes = 0;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_set_sbit_strike( TT_Face          face,\n                           FT_Size_Request  req,\n                           FT_ULong*        astrike_index )\n  {\n    return FT_Match_Size( (FT_Face)face, req, 0, astrike_index );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_strike_metrics( TT_Face           face,\n                               FT_ULong          strike_index,\n                               FT_Size_Metrics*  metrics )\n  {\n    if ( strike_index >= (FT_ULong)face->sbit_num_strikes )\n      return FT_THROW( Invalid_Argument );\n\n    switch ( (FT_UInt)face->sbit_table_type )\n    {\n    case TT_SBIT_TABLE_TYPE_EBLC:\n    case TT_SBIT_TABLE_TYPE_CBLC:\n      {\n        FT_Byte*  strike;\n\n\n        strike = face->sbit_table + 8 + strike_index * 48;\n\n        metrics->x_ppem = (FT_UShort)strike[44];\n        metrics->y_ppem = (FT_UShort)strike[45];\n\n        metrics->ascender  = (FT_Char)strike[16] << 6;  /* hori.ascender  */\n        metrics->descender = (FT_Char)strike[17] << 6;  /* hori.descender */\n        metrics->height    = metrics->ascender - metrics->descender;\n\n        /* Is this correct? */\n        metrics->max_advance = ( (FT_Char)strike[22] + /* min_origin_SB  */\n                                          strike[18] + /* max_width      */\n                                 (FT_Char)strike[23]   /* min_advance_SB */\n                                                     ) << 6;\n        return FT_Err_Ok;\n      }\n\n    case TT_SBIT_TABLE_TYPE_SBIX:\n      {\n        FT_Stream       stream = face->root.stream;\n        FT_UInt         offset, upem;\n        FT_UShort       ppem, resolution;\n        TT_HoriHeader  *hori;\n        FT_ULong        table_size;\n\n        FT_Error  error;\n        FT_Byte*  p;\n\n\n        p      = face->sbit_table + 8 + 4 * strike_index;\n        offset = FT_NEXT_ULONG( p );\n\n        error = face->goto_table( face, TTAG_sbix, stream, &table_size );\n        if ( error )\n          return error;\n\n        if ( offset + 4  > table_size )\n          return FT_THROW( Invalid_File_Format );\n\n        if ( FT_STREAM_SEEK( FT_STREAM_POS() + offset ) ||\n             FT_FRAME_ENTER( 4 )                        )\n          return error;\n\n        ppem       = FT_GET_USHORT();\n        resolution = FT_GET_USHORT();\n\n        FT_UNUSED( resolution ); /* What to do with this? */\n\n        FT_FRAME_EXIT();\n\n        upem = face->header.Units_Per_EM;\n        hori = &face->horizontal;\n\n        metrics->x_ppem = ppem;\n        metrics->y_ppem = ppem;\n\n        metrics->ascender    = ppem * hori->Ascender * 64 / upem;\n        metrics->descender   = ppem * hori->Descender * 64 / upem;\n        metrics->height      = ppem * ( hori->Ascender -\n                                        hori->Descender +\n                                        hori->Line_Gap ) * 64 / upem;\n        metrics->max_advance = ppem * hori->advance_Width_Max * 64 / upem;\n\n        return error;\n      }\n\n    default:\n      return FT_THROW( Unknown_File_Format );\n    }\n  }\n\n\n  typedef struct  TT_SBitDecoderRec_\n  {\n    TT_Face          face;\n    FT_Stream        stream;\n    FT_Bitmap*       bitmap;\n    TT_SBit_Metrics  metrics;\n    FT_Bool          metrics_loaded;\n    FT_Bool          bitmap_allocated;\n    FT_Byte          bit_depth;\n\n    FT_ULong         ebdt_start;\n    FT_ULong         ebdt_size;\n\n    FT_ULong         strike_index_array;\n    FT_ULong         strike_index_count;\n    FT_Byte*         eblc_base;\n    FT_Byte*         eblc_limit;\n\n  } TT_SBitDecoderRec, *TT_SBitDecoder;\n\n\n  static FT_Error\n  tt_sbit_decoder_init( TT_SBitDecoder       decoder,\n                        TT_Face              face,\n                        FT_ULong             strike_index,\n                        TT_SBit_MetricsRec*  metrics )\n  {\n    FT_Error   error;\n    FT_Stream  stream = face->root.stream;\n    FT_ULong   ebdt_size;\n\n\n    error = face->goto_table( face, TTAG_CBDT, stream, &ebdt_size );\n    if ( error )\n      error = face->goto_table( face, TTAG_EBDT, stream, &ebdt_size );\n    if ( error )\n      error = face->goto_table( face, TTAG_bdat, stream, &ebdt_size );\n    if ( error )\n      goto Exit;\n\n    decoder->face    = face;\n    decoder->stream  = stream;\n    decoder->bitmap  = &face->root.glyph->bitmap;\n    decoder->metrics = metrics;\n\n    decoder->metrics_loaded   = 0;\n    decoder->bitmap_allocated = 0;\n\n    decoder->ebdt_start = FT_STREAM_POS();\n    decoder->ebdt_size  = ebdt_size;\n\n    decoder->eblc_base  = face->sbit_table;\n    decoder->eblc_limit = face->sbit_table + face->sbit_table_size;\n\n    /* now find the strike corresponding to the index */\n    {\n      FT_Byte*  p;\n\n\n      if ( 8 + 48 * strike_index + 3 * 4 + 34 + 1 > face->sbit_table_size )\n      {\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      p = decoder->eblc_base + 8 + 48 * strike_index;\n\n      decoder->strike_index_array = FT_NEXT_ULONG( p );\n      p                          += 4;\n      decoder->strike_index_count = FT_NEXT_ULONG( p );\n      p                          += 34;\n      decoder->bit_depth          = *p;\n\n      /* decoder->strike_index_array +                               */\n      /*   8 * decoder->strike_index_count > face->sbit_table_size ? */\n      if ( decoder->strike_index_array > face->sbit_table_size           ||\n           decoder->strike_index_count >\n             ( face->sbit_table_size - decoder->strike_index_array ) / 8 )\n        error = FT_THROW( Invalid_File_Format );\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  tt_sbit_decoder_done( TT_SBitDecoder  decoder )\n  {\n    FT_UNUSED( decoder );\n  }\n\n\n  static FT_Error\n  tt_sbit_decoder_alloc_bitmap( TT_SBitDecoder  decoder )\n  {\n    FT_Error    error = FT_Err_Ok;\n    FT_UInt     width, height;\n    FT_Bitmap*  map = decoder->bitmap;\n    FT_Long     size;\n\n\n    if ( !decoder->metrics_loaded )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    width  = decoder->metrics->width;\n    height = decoder->metrics->height;\n\n    map->width = (int)width;\n    map->rows  = (int)height;\n\n    switch ( decoder->bit_depth )\n    {\n    case 1:\n      map->pixel_mode = FT_PIXEL_MODE_MONO;\n      map->pitch      = ( map->width + 7 ) >> 3;\n      map->num_grays  = 2;\n      break;\n\n    case 2:\n      map->pixel_mode = FT_PIXEL_MODE_GRAY2;\n      map->pitch      = ( map->width + 3 ) >> 2;\n      map->num_grays  = 4;\n      break;\n\n    case 4:\n      map->pixel_mode = FT_PIXEL_MODE_GRAY4;\n      map->pitch      = ( map->width + 1 ) >> 1;\n      map->num_grays  = 16;\n      break;\n\n    case 8:\n      map->pixel_mode = FT_PIXEL_MODE_GRAY;\n      map->pitch      = map->width;\n      map->num_grays  = 256;\n      break;\n\n    case 32:\n      map->pixel_mode = FT_PIXEL_MODE_BGRA;\n      map->pitch      = map->width * 4;\n      map->num_grays  = 256;\n      break;\n\n    default:\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    size = map->rows * map->pitch;\n\n    /* check that there is no empty image */\n    if ( size == 0 )\n      goto Exit;     /* exit successfully! */\n\n    error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph, size );\n    if ( error )\n      goto Exit;\n\n    decoder->bitmap_allocated = 1;\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  tt_sbit_decoder_load_metrics( TT_SBitDecoder  decoder,\n                                FT_Byte*       *pp,\n                                FT_Byte*        limit,\n                                FT_Bool         big )\n  {\n    FT_Byte*         p       = *pp;\n    TT_SBit_Metrics  metrics = decoder->metrics;\n\n\n    if ( p + 5 > limit )\n      goto Fail;\n\n    metrics->height       = p[0];\n    metrics->width        = p[1];\n    metrics->horiBearingX = (FT_Char)p[2];\n    metrics->horiBearingY = (FT_Char)p[3];\n    metrics->horiAdvance  = p[4];\n\n    p += 5;\n    if ( big )\n    {\n      if ( p + 3 > limit )\n        goto Fail;\n\n      metrics->vertBearingX = (FT_Char)p[0];\n      metrics->vertBearingY = (FT_Char)p[1];\n      metrics->vertAdvance  = p[2];\n\n      p += 3;\n    }\n    else\n    {\n      /* avoid uninitialized data in case there is no vertical info -- */\n      metrics->vertBearingX = 0;\n      metrics->vertBearingY = 0;\n      metrics->vertAdvance  = 0;\n    }\n\n    decoder->metrics_loaded = 1;\n    *pp = p;\n    return FT_Err_Ok;\n\n  Fail:\n    FT_TRACE1(( \"tt_sbit_decoder_load_metrics: broken table\\n\" ));\n    return FT_THROW( Invalid_Argument );\n  }\n\n\n  /* forward declaration */\n  static FT_Error\n  tt_sbit_decoder_load_image( TT_SBitDecoder  decoder,\n                              FT_UInt         glyph_index,\n                              FT_Int          x_pos,\n                              FT_Int          y_pos );\n\n  typedef FT_Error  (*TT_SBitDecoder_LoadFunc)( TT_SBitDecoder  decoder,\n                                                FT_Byte*        p,\n                                                FT_Byte*        plimit,\n                                                FT_Int          x_pos,\n                                                FT_Int          y_pos );\n\n\n  static FT_Error\n  tt_sbit_decoder_load_byte_aligned( TT_SBitDecoder  decoder,\n                                     FT_Byte*        p,\n                                     FT_Byte*        limit,\n                                     FT_Int          x_pos,\n                                     FT_Int          y_pos )\n  {\n    FT_Error    error = FT_Err_Ok;\n    FT_Byte*    line;\n    FT_Int      bit_height, bit_width, pitch, width, height, line_bits, h;\n    FT_Bitmap*  bitmap;\n\n\n    /* check that we can write the glyph into the bitmap */\n    bitmap     = decoder->bitmap;\n    bit_width  = bitmap->width;\n    bit_height = bitmap->rows;\n    pitch      = bitmap->pitch;\n    line       = bitmap->buffer;\n\n    width  = decoder->metrics->width;\n    height = decoder->metrics->height;\n\n    line_bits = width * decoder->bit_depth;\n\n    if ( x_pos < 0 || x_pos + width > bit_width   ||\n         y_pos < 0 || y_pos + height > bit_height )\n    {\n      FT_TRACE1(( \"tt_sbit_decoder_load_byte_aligned:\"\n                  \" invalid bitmap dimensions\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    if ( p + ( ( line_bits + 7 ) >> 3 ) * height > limit )\n    {\n      FT_TRACE1(( \"tt_sbit_decoder_load_byte_aligned: broken bitmap\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    /* now do the blit */\n    line  += y_pos * pitch + ( x_pos >> 3 );\n    x_pos &= 7;\n\n    if ( x_pos == 0 )  /* the easy one */\n    {\n      for ( h = height; h > 0; h--, line += pitch )\n      {\n        FT_Byte*  pwrite = line;\n        FT_Int    w;\n\n\n        for ( w = line_bits; w >= 8; w -= 8 )\n        {\n          pwrite[0] = (FT_Byte)( pwrite[0] | *p++ );\n          pwrite   += 1;\n        }\n\n        if ( w > 0 )\n          pwrite[0] = (FT_Byte)( pwrite[0] | ( *p++ & ( 0xFF00U >> w ) ) );\n      }\n    }\n    else  /* x_pos > 0 */\n    {\n      for ( h = height; h > 0; h--, line += pitch )\n      {\n        FT_Byte*  pwrite = line;\n        FT_Int    w;\n        FT_UInt   wval = 0;\n\n\n        for ( w = line_bits; w >= 8; w -= 8 )\n        {\n          wval       = (FT_UInt)( wval | *p++ );\n          pwrite[0]  = (FT_Byte)( pwrite[0] | ( wval >> x_pos ) );\n          pwrite    += 1;\n          wval     <<= 8;\n        }\n\n        if ( w > 0 )\n          wval = (FT_UInt)( wval | ( *p++ & ( 0xFF00U >> w ) ) );\n\n        /* all bits read and there are `x_pos + w' bits to be written */\n\n        pwrite[0] = (FT_Byte)( pwrite[0] | ( wval >> x_pos ) );\n\n        if ( x_pos + w > 8 )\n        {\n          pwrite++;\n          wval     <<= 8;\n          pwrite[0]  = (FT_Byte)( pwrite[0] | ( wval >> x_pos ) );\n        }\n      }\n    }\n\n  Exit:\n    if ( !error )\n      FT_TRACE3(( \"tt_sbit_decoder_load_byte_aligned: loaded\\n\" ));\n    return error;\n  }\n\n\n  /*\n   * Load a bit-aligned bitmap (with pointer `p') into a line-aligned bitmap\n   * (with pointer `pwrite').  In the example below, the width is 3 pixel,\n   * and `x_pos' is 1 pixel.\n   *\n   *       p                               p+1\n   *     |                               |                               |\n   *     | 7   6   5   4   3   2   1   0 | 7   6   5   4   3   2   1   0 |...\n   *     |                               |                               |\n   *       +-------+   +-------+   +-------+ ...\n   *           .           .           .\n   *           .           .           .\n   *           v           .           .\n   *       +-------+       .           .\n   * |                               | .\n   * | 7   6   5   4   3   2   1   0 | .\n   * |                               | .\n   *   pwrite              .           .\n   *                       .           .\n   *                       v           .\n   *                   +-------+       .\n   *             |                               |\n   *             | 7   6   5   4   3   2   1   0 |\n   *             |                               |\n   *               pwrite+1            .\n   *                                   .\n   *                                   v\n   *                               +-------+\n   *                         |                               |\n   *                         | 7   6   5   4   3   2   1   0 |\n   *                         |                               |\n   *                           pwrite+2\n   *\n   */\n\n  static FT_Error\n  tt_sbit_decoder_load_bit_aligned( TT_SBitDecoder  decoder,\n                                    FT_Byte*        p,\n                                    FT_Byte*        limit,\n                                    FT_Int          x_pos,\n                                    FT_Int          y_pos )\n  {\n    FT_Error    error = FT_Err_Ok;\n    FT_Byte*    line;\n    FT_Int      bit_height, bit_width, pitch, width, height, line_bits, h, nbits;\n    FT_Bitmap*  bitmap;\n    FT_UShort   rval;\n\n\n    /* check that we can write the glyph into the bitmap */\n    bitmap     = decoder->bitmap;\n    bit_width  = bitmap->width;\n    bit_height = bitmap->rows;\n    pitch      = bitmap->pitch;\n    line       = bitmap->buffer;\n\n    width  = decoder->metrics->width;\n    height = decoder->metrics->height;\n\n    line_bits = width * decoder->bit_depth;\n\n    if ( x_pos < 0 || x_pos + width  > bit_width  ||\n         y_pos < 0 || y_pos + height > bit_height )\n    {\n      FT_TRACE1(( \"tt_sbit_decoder_load_bit_aligned:\"\n                  \" invalid bitmap dimensions\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    if ( p + ( ( line_bits * height + 7 ) >> 3 ) > limit )\n    {\n      FT_TRACE1(( \"tt_sbit_decoder_load_bit_aligned: broken bitmap\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    /* now do the blit */\n\n    /* adjust `line' to point to the first byte of the bitmap */\n    line  += y_pos * pitch + ( x_pos >> 3 );\n    x_pos &= 7;\n\n    /* the higher byte of `rval' is used as a buffer */\n    rval  = 0;\n    nbits = 0;\n\n    for ( h = height; h > 0; h--, line += pitch )\n    {\n      FT_Byte*  pwrite = line;\n      FT_Int    w      = line_bits;\n\n\n      /* handle initial byte (in target bitmap) specially if necessary */\n      if ( x_pos )\n      {\n        w = ( line_bits < 8 - x_pos ) ? line_bits : 8 - x_pos;\n\n        if ( h == height )\n        {\n          rval  = *p++;\n          nbits = x_pos;\n        }\n        else if ( nbits < w )\n        {\n          if ( p < limit )\n            rval |= *p++;\n          nbits += 8 - w;\n        }\n        else\n        {\n          rval  >>= 8;\n          nbits  -= w;\n        }\n\n        *pwrite++ |= ( ( rval >> nbits ) & 0xFF ) &\n                     ( ~( 0xFF << w ) << ( 8 - w - x_pos ) );\n        rval     <<= 8;\n\n        w = line_bits - w;\n      }\n\n      /* handle medial bytes */\n      for ( ; w >= 8; w -= 8 )\n      {\n        rval      |= *p++;\n        *pwrite++ |= ( rval >> nbits ) & 0xFF;\n\n        rval <<= 8;\n      }\n\n      /* handle final byte if necessary */\n      if ( w > 0 )\n      {\n        if ( nbits < w )\n        {\n          if ( p < limit )\n            rval |= *p++;\n          *pwrite |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w );\n          nbits   += 8 - w;\n\n          rval <<= 8;\n        }\n        else\n        {\n          *pwrite |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w );\n          nbits   -= w;\n        }\n      }\n    }\n\n  Exit:\n    if ( !error )\n      FT_TRACE3(( \"tt_sbit_decoder_load_bit_aligned: loaded\\n\" ));\n    return error;\n  }\n\n\n  static FT_Error\n  tt_sbit_decoder_load_compound( TT_SBitDecoder  decoder,\n                                 FT_Byte*        p,\n                                 FT_Byte*        limit,\n                                 FT_Int          x_pos,\n                                 FT_Int          y_pos )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_UInt   num_components, nn;\n\n    FT_Char  horiBearingX = (FT_Char)decoder->metrics->horiBearingX;\n    FT_Char  horiBearingY = (FT_Char)decoder->metrics->horiBearingY;\n    FT_Byte  horiAdvance  = (FT_Byte)decoder->metrics->horiAdvance;\n    FT_Char  vertBearingX = (FT_Char)decoder->metrics->vertBearingX;\n    FT_Char  vertBearingY = (FT_Char)decoder->metrics->vertBearingY;\n    FT_Byte  vertAdvance  = (FT_Byte)decoder->metrics->vertAdvance;\n\n\n    if ( p + 2 > limit )\n      goto Fail;\n\n    num_components = FT_NEXT_USHORT( p );\n    if ( p + 4 * num_components > limit )\n    {\n      FT_TRACE1(( \"tt_sbit_decoder_load_compound: broken table\\n\" ));\n      goto Fail;\n    }\n\n    FT_TRACE3(( \"tt_sbit_decoder_load_compound: loading %d components\\n\",\n                num_components ));\n\n    for ( nn = 0; nn < num_components; nn++ )\n    {\n      FT_UInt  gindex = FT_NEXT_USHORT( p );\n      FT_Byte  dx     = FT_NEXT_BYTE( p );\n      FT_Byte  dy     = FT_NEXT_BYTE( p );\n\n\n      /* NB: a recursive call */\n      error = tt_sbit_decoder_load_image( decoder, gindex,\n                                          x_pos + dx, y_pos + dy );\n      if ( error )\n        break;\n    }\n\n    FT_TRACE3(( \"tt_sbit_decoder_load_compound: done\\n\" ));\n\n    decoder->metrics->horiBearingX = horiBearingX;\n    decoder->metrics->horiBearingY = horiBearingY;\n    decoder->metrics->horiAdvance  = horiAdvance;\n    decoder->metrics->vertBearingX = vertBearingX;\n    decoder->metrics->vertBearingY = vertBearingY;\n    decoder->metrics->vertAdvance  = vertAdvance;\n    decoder->metrics->width        = (FT_Byte)decoder->bitmap->width;\n    decoder->metrics->height       = (FT_Byte)decoder->bitmap->rows;\n\n  Exit:\n    return error;\n\n  Fail:\n    error = FT_THROW( Invalid_File_Format );\n    goto Exit;\n  }\n\n\n#ifdef FT_CONFIG_OPTION_USE_PNG\n\n  static FT_Error\n  tt_sbit_decoder_load_png( TT_SBitDecoder  decoder,\n                            FT_Byte*        p,\n                            FT_Byte*        limit,\n                            FT_Int          x_pos,\n                            FT_Int          y_pos )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_ULong  png_len;\n\n\n    if ( limit - p < 4 )\n    {\n      FT_TRACE1(( \"tt_sbit_decoder_load_png: broken bitmap\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    png_len = FT_NEXT_ULONG( p );\n    if ( (FT_ULong)( limit - p ) < png_len )\n    {\n      FT_TRACE1(( \"tt_sbit_decoder_load_png: broken bitmap\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    error = Load_SBit_Png( decoder->face->root.glyph,\n                           x_pos,\n                           y_pos,\n                           decoder->bit_depth,\n                           decoder->metrics,\n                           decoder->stream->memory,\n                           p,\n                           png_len,\n                           FALSE );\n\n  Exit:\n    if ( !error )\n      FT_TRACE3(( \"tt_sbit_decoder_load_png: loaded\\n\" ));\n    return error;\n  }\n\n#endif /* FT_CONFIG_OPTION_USE_PNG */\n\n\n  static FT_Error\n  tt_sbit_decoder_load_bitmap( TT_SBitDecoder  decoder,\n                               FT_UInt         glyph_format,\n                               FT_ULong        glyph_start,\n                               FT_ULong        glyph_size,\n                               FT_Int          x_pos,\n                               FT_Int          y_pos )\n  {\n    FT_Error   error;\n    FT_Stream  stream = decoder->stream;\n    FT_Byte*   p;\n    FT_Byte*   p_limit;\n    FT_Byte*   data;\n\n\n    /* seek into the EBDT table now */\n    if ( glyph_start + glyph_size > decoder->ebdt_size )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    if ( FT_STREAM_SEEK( decoder->ebdt_start + glyph_start ) ||\n         FT_FRAME_EXTRACT( glyph_size, data )                )\n      goto Exit;\n\n    p       = data;\n    p_limit = p + glyph_size;\n\n    /* read the data, depending on the glyph format */\n    switch ( glyph_format )\n    {\n    case 1:\n    case 2:\n    case 8:\n    case 17:\n      error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 0 );\n      break;\n\n    case 6:\n    case 7:\n    case 9:\n    case 18:\n      error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 );\n      break;\n\n    default:\n      error = FT_Err_Ok;\n    }\n\n    if ( error )\n      goto Fail;\n\n    {\n      TT_SBitDecoder_LoadFunc  loader;\n\n\n      switch ( glyph_format )\n      {\n      case 1:\n      case 6:\n        loader = tt_sbit_decoder_load_byte_aligned;\n        break;\n\n      case 2:\n      case 7:\n        {\n          /* Don't trust `glyph_format'.  For example, Apple's main Korean */\n          /* system font, `AppleMyungJo.ttf' (version 7.0d2e6), uses glyph */\n          /* format 7, but the data is format 6.  We check whether we have */\n          /* an excessive number of bytes in the image: If it is equal to  */\n          /* the value for a byte-aligned glyph, use the other loading     */\n          /* routine.                                                      */\n          /*                                                               */\n          /* Note that for some (width,height) combinations, where the     */\n          /* width is not a multiple of 8, the sizes for bit- and          */\n          /* byte-aligned data are equal, for example (7,7) or (15,6).  We */\n          /* then prefer what `glyph_format' specifies.                    */\n\n          FT_UInt  width  = decoder->metrics->width;\n          FT_UInt  height = decoder->metrics->height;\n\n          FT_UInt  bit_size  = ( width * height + 7 ) >> 3;\n          FT_UInt  byte_size = height * ( ( width + 7 ) >> 3 );\n\n\n          if ( bit_size < byte_size                  &&\n               byte_size == (FT_UInt)( p_limit - p ) )\n            loader = tt_sbit_decoder_load_byte_aligned;\n          else\n            loader = tt_sbit_decoder_load_bit_aligned;\n        }\n        break;\n\n      case 5:\n        loader = tt_sbit_decoder_load_bit_aligned;\n        break;\n\n      case 8:\n        if ( p + 1 > p_limit )\n          goto Fail;\n\n        p += 1;  /* skip padding */\n        /* fall-through */\n\n      case 9:\n        loader = tt_sbit_decoder_load_compound;\n        break;\n\n      case 17: /* small metrics, PNG image data   */\n      case 18: /* big metrics, PNG image data     */\n      case 19: /* metrics in EBLC, PNG image data */\n#ifdef FT_CONFIG_OPTION_USE_PNG\n        loader = tt_sbit_decoder_load_png;\n        break;\n#else\n        error = FT_THROW( Unimplemented_Feature );\n        goto Fail;\n#endif /* FT_CONFIG_OPTION_USE_PNG */\n\n      default:\n        error = FT_THROW( Invalid_Table );\n        goto Fail;\n      }\n\n      if ( !decoder->bitmap_allocated )\n      {\n        error = tt_sbit_decoder_alloc_bitmap( decoder );\n        if ( error )\n          goto Fail;\n      }\n\n      error = loader( decoder, p, p_limit, x_pos, y_pos );\n    }\n\n  Fail:\n    FT_FRAME_RELEASE( data );\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  tt_sbit_decoder_load_image( TT_SBitDecoder  decoder,\n                              FT_UInt         glyph_index,\n                              FT_Int          x_pos,\n                              FT_Int          y_pos )\n  {\n    /*\n     *  First, we find the correct strike range that applies to this\n     *  glyph index.\n     */\n\n    FT_Byte*  p          = decoder->eblc_base + decoder->strike_index_array;\n    FT_Byte*  p_limit    = decoder->eblc_limit;\n    FT_ULong  num_ranges = decoder->strike_index_count;\n    FT_UInt   start, end, index_format, image_format;\n    FT_ULong  image_start = 0, image_end = 0, image_offset;\n\n\n    for ( ; num_ranges > 0; num_ranges-- )\n    {\n      start = FT_NEXT_USHORT( p );\n      end   = FT_NEXT_USHORT( p );\n\n      if ( glyph_index >= start && glyph_index <= end )\n        goto FoundRange;\n\n      p += 4;  /* ignore index offset */\n    }\n    goto NoBitmap;\n\n  FoundRange:\n    image_offset = FT_NEXT_ULONG( p );\n\n    /* overflow check */\n    p = decoder->eblc_base + decoder->strike_index_array;\n    if ( image_offset > (FT_ULong)( p_limit - p ) )\n      goto Failure;\n\n    p += image_offset;\n    if ( p + 8 > p_limit )\n      goto NoBitmap;\n\n    /* now find the glyph's location and extend within the ebdt table */\n    index_format = FT_NEXT_USHORT( p );\n    image_format = FT_NEXT_USHORT( p );\n    image_offset = FT_NEXT_ULONG ( p );\n\n    switch ( index_format )\n    {\n    case 1: /* 4-byte offsets relative to `image_offset' */\n      p += 4 * ( glyph_index - start );\n      if ( p + 8 > p_limit )\n        goto NoBitmap;\n\n      image_start = FT_NEXT_ULONG( p );\n      image_end   = FT_NEXT_ULONG( p );\n\n      if ( image_start == image_end )  /* missing glyph */\n        goto NoBitmap;\n      break;\n\n    case 2: /* big metrics, constant image size */\n      {\n        FT_ULong  image_size;\n\n\n        if ( p + 12 > p_limit )\n          goto NoBitmap;\n\n        image_size = FT_NEXT_ULONG( p );\n\n        if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) )\n          goto NoBitmap;\n\n        image_start = image_size * ( glyph_index - start );\n        image_end   = image_start + image_size;\n      }\n      break;\n\n    case 3: /* 2-byte offsets relative to 'image_offset' */\n      p += 2 * ( glyph_index - start );\n      if ( p + 4 > p_limit )\n        goto NoBitmap;\n\n      image_start = FT_NEXT_USHORT( p );\n      image_end   = FT_NEXT_USHORT( p );\n\n      if ( image_start == image_end )  /* missing glyph */\n        goto NoBitmap;\n      break;\n\n    case 4: /* sparse glyph array with (glyph,offset) pairs */\n      {\n        FT_ULong  mm, num_glyphs;\n\n\n        if ( p + 4 > p_limit )\n          goto NoBitmap;\n\n        num_glyphs = FT_NEXT_ULONG( p );\n\n        /* overflow check for p + ( num_glyphs + 1 ) * 4 */\n        if ( p + 4 > p_limit                                         ||\n             num_glyphs > (FT_ULong)( ( ( p_limit - p ) >> 2 ) - 1 ) )\n          goto NoBitmap;\n\n        for ( mm = 0; mm < num_glyphs; mm++ )\n        {\n          FT_UInt  gindex = FT_NEXT_USHORT( p );\n\n\n          if ( gindex == glyph_index )\n          {\n            image_start = FT_NEXT_USHORT( p );\n            p          += 2;\n            image_end   = FT_PEEK_USHORT( p );\n            break;\n          }\n          p += 2;\n        }\n\n        if ( mm >= num_glyphs )\n          goto NoBitmap;\n      }\n      break;\n\n    case 5: /* constant metrics with sparse glyph codes */\n    case 19:\n      {\n        FT_ULong  image_size, mm, num_glyphs;\n\n\n        if ( p + 16 > p_limit )\n          goto NoBitmap;\n\n        image_size = FT_NEXT_ULONG( p );\n\n        if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) )\n          goto NoBitmap;\n\n        num_glyphs = FT_NEXT_ULONG( p );\n\n        /* overflow check for p + 2 * num_glyphs */\n        if ( num_glyphs > (FT_ULong)( ( p_limit - p ) >> 1 ) )\n          goto NoBitmap;\n\n        for ( mm = 0; mm < num_glyphs; mm++ )\n        {\n          FT_UInt  gindex = FT_NEXT_USHORT( p );\n\n\n          if ( gindex == glyph_index )\n            break;\n        }\n\n        if ( mm >= num_glyphs )\n          goto NoBitmap;\n\n        image_start = image_size * mm;\n        image_end   = image_start + image_size;\n      }\n      break;\n\n    default:\n      goto NoBitmap;\n    }\n\n    if ( image_start > image_end )\n      goto NoBitmap;\n\n    image_end  -= image_start;\n    image_start = image_offset + image_start;\n\n    FT_TRACE3(( \"tt_sbit_decoder_load_image:\"\n                \" found sbit (format %d) for glyph index %d\\n\",\n                image_format, glyph_index ));\n\n    return tt_sbit_decoder_load_bitmap( decoder,\n                                        image_format,\n                                        image_start,\n                                        image_end,\n                                        x_pos,\n                                        y_pos );\n\n  Failure:\n    return FT_THROW( Invalid_Table );\n\n  NoBitmap:\n    FT_TRACE4(( \"tt_sbit_decoder_load_image:\"\n                \" no sbit found for glyph index %d\\n\", glyph_index ));\n\n    return FT_THROW( Invalid_Argument );\n  }\n\n\n  static FT_Error\n  tt_face_load_sbix_image( TT_Face              face,\n                           FT_ULong             strike_index,\n                           FT_UInt              glyph_index,\n                           FT_Stream            stream,\n                           FT_Bitmap           *map,\n                           TT_SBit_MetricsRec  *metrics )\n  {\n    FT_UInt   sbix_pos, strike_offset, glyph_start, glyph_end;\n    FT_ULong  table_size;\n    FT_Int    originOffsetX, originOffsetY;\n    FT_Tag    graphicType;\n    FT_Int    recurse_depth = 0;\n\n    FT_Error  error;\n    FT_Byte*  p;\n\n    FT_UNUSED( map );\n\n\n    metrics->width  = 0;\n    metrics->height = 0;\n\n    p = face->sbit_table + 8 + 4 * strike_index;\n    strike_offset = FT_NEXT_ULONG( p );\n\n    error = face->goto_table( face, TTAG_sbix, stream, &table_size );\n    if ( error )\n      return error;\n    sbix_pos = FT_STREAM_POS();\n\n  retry:\n    if ( glyph_index > (FT_UInt)face->root.num_glyphs )\n      return FT_THROW( Invalid_Argument );\n\n    if ( strike_offset >= table_size                          ||\n         table_size - strike_offset < 4 + glyph_index * 4 + 8 )\n      return FT_THROW( Invalid_File_Format );\n\n    if ( FT_STREAM_SEEK( sbix_pos + strike_offset + 4 + glyph_index * 4 ) ||\n         FT_FRAME_ENTER( 8 )                                              )\n      return error;\n\n    glyph_start = FT_GET_ULONG();\n    glyph_end   = FT_GET_ULONG();\n\n    FT_FRAME_EXIT();\n\n    if ( glyph_start == glyph_end )\n      return FT_THROW( Invalid_Argument );\n    if ( glyph_start > glyph_end                ||\n         glyph_end - glyph_start < 8            ||\n         table_size - strike_offset < glyph_end )\n      return FT_THROW( Invalid_File_Format );\n\n    if ( FT_STREAM_SEEK( sbix_pos + strike_offset + glyph_start ) ||\n         FT_FRAME_ENTER( glyph_end - glyph_start )                )\n      return error;\n\n    originOffsetX = FT_GET_SHORT();\n    originOffsetY = FT_GET_SHORT();\n\n    graphicType = FT_GET_TAG4();\n\n    switch ( graphicType )\n    {\n    case FT_MAKE_TAG( 'd', 'u', 'p', 'e' ):\n      if ( recurse_depth < 4 )\n      {\n        glyph_index = FT_GET_USHORT();\n        FT_FRAME_EXIT();\n        recurse_depth++;\n        goto retry;\n      }\n      error = FT_THROW( Invalid_File_Format );\n      break;\n\n    case FT_MAKE_TAG( 'p', 'n', 'g', ' ' ):\n#ifdef FT_CONFIG_OPTION_USE_PNG\n      error = Load_SBit_Png( face->root.glyph,\n                             0,\n                             0,\n                             32,\n                             metrics,\n                             stream->memory,\n                             stream->cursor,\n                             glyph_end - glyph_start - 8,\n                             TRUE );\n#else\n      error = FT_THROW( Unimplemented_Feature );\n#endif\n      break;\n\n    case FT_MAKE_TAG( 'j', 'p', 'g', ' ' ):\n    case FT_MAKE_TAG( 't', 'i', 'f', 'f' ):\n    case FT_MAKE_TAG( 'r', 'g', 'b', 'l' ): /* used on iOS 7.1 */\n      error = FT_THROW( Unknown_File_Format );\n      break;\n\n    default:\n      error = FT_THROW( Unimplemented_Feature );\n      break;\n    }\n\n    FT_FRAME_EXIT();\n\n    if ( !error )\n    {\n      FT_Short   abearing;\n      FT_UShort  aadvance;\n\n\n      tt_face_get_metrics( face, FALSE, glyph_index, &abearing, &aadvance );\n\n      metrics->horiBearingX = (FT_Short)originOffsetX;\n      metrics->horiBearingY = (FT_Short)( -originOffsetY + metrics->height );\n      metrics->horiAdvance  = (FT_Short)( aadvance *\n                                          face->root.size->metrics.x_ppem /\n                                          face->header.Units_Per_EM );\n    }\n\n    return error;\n  }\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_sbit_image( TT_Face              face,\n                           FT_ULong             strike_index,\n                           FT_UInt              glyph_index,\n                           FT_UInt              load_flags,\n                           FT_Stream            stream,\n                           FT_Bitmap           *map,\n                           TT_SBit_MetricsRec  *metrics )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    switch ( (FT_UInt)face->sbit_table_type )\n    {\n    case TT_SBIT_TABLE_TYPE_EBLC:\n    case TT_SBIT_TABLE_TYPE_CBLC:\n      {\n        TT_SBitDecoderRec  decoder[1];\n\n\n        error = tt_sbit_decoder_init( decoder, face, strike_index, metrics );\n        if ( !error )\n        {\n          error = tt_sbit_decoder_load_image( decoder,\n                                              glyph_index,\n                                              0,\n                                              0 );\n          tt_sbit_decoder_done( decoder );\n        }\n      }\n      break;\n\n    case TT_SBIT_TABLE_TYPE_SBIX:\n      error = tt_face_load_sbix_image( face,\n                                       strike_index,\n                                       glyph_index,\n                                       stream,\n                                       map,\n                                       metrics );\n      break;\n\n    default:\n      error = FT_THROW( Unknown_File_Format );\n      break;\n    }\n\n    /* Flatten color bitmaps if color was not requested. */\n    if ( !error                                &&\n         !( load_flags & FT_LOAD_COLOR )       &&\n         map->pixel_mode == FT_PIXEL_MODE_BGRA )\n    {\n      FT_Bitmap   new_map;\n      FT_Library  library = face->root.glyph->library;\n\n\n      FT_Bitmap_New( &new_map );\n\n      /* Convert to 8bit grayscale. */\n      error = FT_Bitmap_Convert( library, map, &new_map, 1 );\n      if ( error )\n        FT_Bitmap_Done( library, &new_map );\n      else\n      {\n        map->pixel_mode = new_map.pixel_mode;\n        map->pitch      = new_map.pitch;\n        map->num_grays  = new_map.num_grays;\n\n        ft_glyphslot_set_bitmap( face->root.glyph, new_map.buffer );\n        face->root.glyph->internal->flags |= FT_GLYPH_OWN_BITMAP;\n      }\n    }\n\n    return error;\n  }\n\n\n/* EOF */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/sfnt/ttsbit.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttsbit.h                                                               */\n/*                                                                         */\n/*    TrueType and OpenType embedded bitmap support (specification).       */\n/*                                                                         */\n/*  Copyright 1996-2008, 2013 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTSBIT_H__\n#define __TTSBIT_H__\n\n\n#include <ft2build.h>\n#include \"ttload.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_sbit( TT_Face    face,\n                     FT_Stream  stream );\n\n  FT_LOCAL( void )\n  tt_face_free_sbit( TT_Face  face );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_set_sbit_strike( TT_Face          face,\n                           FT_Size_Request  req,\n                           FT_ULong*        astrike_index );\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_strike_metrics( TT_Face           face,\n                               FT_ULong          strike_index,\n                               FT_Size_Metrics*  metrics );\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_sbit_image( TT_Face              face,\n                           FT_ULong             strike_index,\n                           FT_UInt              glyph_index,\n                           FT_UInt              load_flags,\n                           FT_Stream            stream,\n                           FT_Bitmap           *map,\n                           TT_SBit_MetricsRec  *metrics );\n\n\nFT_END_HEADER\n\n#endif /* __TTSBIT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/smooth/ftgrays.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgrays.c                                                              */\n/*                                                                         */\n/*    A new `perfect' anti-aliasing renderer (body).                       */\n/*                                                                         */\n/*  Copyright 2000-2003, 2005-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file can be compiled without the rest of the FreeType engine, by */\n  /* defining the _STANDALONE_ macro when compiling it.  You also need to  */\n  /* put the files `ftgrays.h' and `ftimage.h' into the current            */\n  /* compilation directory.  Typically, you could do something like        */\n  /*                                                                       */\n  /* - copy `src/smooth/ftgrays.c' (this file) to your current directory   */\n  /*                                                                       */\n  /* - copy `include/ftimage.h' and `src/smooth/ftgrays.h' to the same     */\n  /*   directory                                                           */\n  /*                                                                       */\n  /* - compile `ftgrays' with the _STANDALONE_ macro defined, as in        */\n  /*                                                                       */\n  /*     cc -c -D_STANDALONE_ ftgrays.c                                    */\n  /*                                                                       */\n  /* The renderer can be initialized with a call to                        */\n  /* `ft_gray_raster.raster_new'; an anti-aliased bitmap can be generated  */\n  /* with a call to `ft_gray_raster.raster_render'.                        */\n  /*                                                                       */\n  /* See the comments and documentation in the file `ftimage.h' for more   */\n  /* details on how the raster works.                                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This is a new anti-aliasing scan-converter for FreeType 2.  The       */\n  /* algorithm used here is _very_ different from the one in the standard  */\n  /* `ftraster' module.  Actually, `ftgrays' computes the _exact_          */\n  /* coverage of the outline on each pixel cell.                           */\n  /*                                                                       */\n  /* It is based on ideas that I initially found in Raph Levien's          */\n  /* excellent LibArt graphics library (see http://www.levien.com/libart   */\n  /* for more information, though the web pages do not tell anything       */\n  /* about the renderer; you'll have to dive into the source code to       */\n  /* understand how it works).                                             */\n  /*                                                                       */\n  /* Note, however, that this is a _very_ different implementation         */\n  /* compared to Raph's.  Coverage information is stored in a very         */\n  /* different way, and I don't use sorted vector paths.  Also, it doesn't */\n  /* use floating point values.                                            */\n  /*                                                                       */\n  /* This renderer has the following advantages:                           */\n  /*                                                                       */\n  /* - It doesn't need an intermediate bitmap.  Instead, one can supply a  */\n  /*   callback function that will be called by the renderer to draw gray  */\n  /*   spans on any target surface.  You can thus do direct composition on */\n  /*   any kind of bitmap, provided that you give the renderer the right   */\n  /*   callback.                                                           */\n  /*                                                                       */\n  /* - A perfect anti-aliaser, i.e., it computes the _exact_ coverage on   */\n  /*   each pixel cell.                                                    */\n  /*                                                                       */\n  /* - It performs a single pass on the outline (the `standard' FT2        */\n  /*   renderer makes two passes).                                         */\n  /*                                                                       */\n  /* - It can easily be modified to render to _any_ number of gray levels  */\n  /*   cheaply.                                                            */\n  /*                                                                       */\n  /* - For small (< 20) pixel sizes, it is faster than the standard        */\n  /*   renderer.                                                           */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_smooth\n\n\n#ifdef _STANDALONE_\n\n\n  /* Auxiliary macros for token concatenation. */\n#define FT_ERR_XCAT( x, y )  x ## y\n#define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )\n\n#define FT_BEGIN_STMNT  do {\n#define FT_END_STMNT    } while ( 0 )\n\n\n  /* define this to dump debugging information */\n/* #define FT_DEBUG_LEVEL_TRACE */\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n#include <stdio.h>\n#include <stdarg.h>\n#endif\n\n#include <stddef.h>\n#include <string.h>\n#include <setjmp.h>\n#include <limits.h>\n#define FT_UINT_MAX  UINT_MAX\n#define FT_INT_MAX   INT_MAX\n\n#define ft_memset   memset\n\n#define ft_setjmp   setjmp\n#define ft_longjmp  longjmp\n#define ft_jmp_buf  jmp_buf\n\ntypedef ptrdiff_t  FT_PtrDist;\n\n\n#define ErrRaster_Invalid_Mode      -2\n#define ErrRaster_Invalid_Outline   -1\n#define ErrRaster_Invalid_Argument  -3\n#define ErrRaster_Memory_Overflow   -4\n\n#define FT_BEGIN_HEADER\n#define FT_END_HEADER\n\n#include \"ftimage.h\"\n#include \"ftgrays.h\"\n\n\n  /* This macro is used to indicate that a function parameter is unused. */\n  /* Its purpose is simply to reduce compiler warnings.  Note also that  */\n  /* simply defining it as `(void)x' doesn't avoid warnings with certain */\n  /* ANSI compilers (e.g. LCC).                                          */\n#define FT_UNUSED( x )  (x) = (x)\n\n\n  /* we only use level 5 & 7 tracing messages; cf. ftdebug.h */\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n  void\n  FT_Message( const char*  fmt,\n              ... )\n  {\n    va_list  ap;\n\n\n    va_start( ap, fmt );\n    vfprintf( stderr, fmt, ap );\n    va_end( ap );\n  }\n\n\n  /* empty function useful for setting a breakpoint to catch errors */\n  int\n  FT_Throw( int          error,\n            int          line,\n            const char*  file )\n  {\n    FT_UNUSED( error );\n    FT_UNUSED( line );\n    FT_UNUSED( file );\n\n    return 0;\n  }\n\n\n  /* we don't handle tracing levels in stand-alone mode; */\n#ifndef FT_TRACE5\n#define FT_TRACE5( varformat )  FT_Message varformat\n#endif\n#ifndef FT_TRACE7\n#define FT_TRACE7( varformat )  FT_Message varformat\n#endif\n#ifndef FT_ERROR\n#define FT_ERROR( varformat )   FT_Message varformat\n#endif\n\n#define FT_THROW( e )                               \\\n          ( FT_Throw( FT_ERR_CAT( ErrRaster, e ),   \\\n                      __LINE__,                     \\\n                      __FILE__ )                  | \\\n            FT_ERR_CAT( ErrRaster, e )            )\n\n#else /* !FT_DEBUG_LEVEL_TRACE */\n\n#define FT_TRACE5( x )  do { } while ( 0 )     /* nothing */\n#define FT_TRACE7( x )  do { } while ( 0 )     /* nothing */\n#define FT_ERROR( x )   do { } while ( 0 )     /* nothing */\n#define FT_THROW( e )   FT_ERR_CAT( ErrRaster_, e )\n\n\n#endif /* !FT_DEBUG_LEVEL_TRACE */\n\n\n#define FT_DEFINE_OUTLINE_FUNCS( class_,               \\\n                                 move_to_, line_to_,   \\\n                                 conic_to_, cubic_to_, \\\n                                 shift_, delta_ )      \\\n          static const FT_Outline_Funcs class_ =       \\\n          {                                            \\\n            move_to_,                                  \\\n            line_to_,                                  \\\n            conic_to_,                                 \\\n            cubic_to_,                                 \\\n            shift_,                                    \\\n            delta_                                     \\\n         };\n\n#define FT_DEFINE_RASTER_FUNCS( class_, glyph_format_,            \\\n                                raster_new_, raster_reset_,       \\\n                                raster_set_mode_, raster_render_, \\\n                                raster_done_ )                    \\\n          const FT_Raster_Funcs class_ =                          \\\n          {                                                       \\\n            glyph_format_,                                        \\\n            raster_new_,                                          \\\n            raster_reset_,                                        \\\n            raster_set_mode_,                                     \\\n            raster_render_,                                       \\\n            raster_done_                                          \\\n         };\n\n\n#else /* !_STANDALONE_ */\n\n\n#include <ft2build.h>\n#include \"ftgrays.h\"\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_OUTLINE_H\n\n#include \"ftsmerrs.h\"\n\n#include \"ftspic.h\"\n\n#define Smooth_Err_Invalid_Mode     Smooth_Err_Cannot_Render_Glyph\n#define Smooth_Err_Memory_Overflow  Smooth_Err_Out_Of_Memory\n#define ErrRaster_Memory_Overflow   Smooth_Err_Out_Of_Memory\n\n\n#endif /* !_STANDALONE_ */\n\n\n#ifndef FT_MEM_SET\n#define FT_MEM_SET( d, s, c )  ft_memset( d, s, c )\n#endif\n\n#ifndef FT_MEM_ZERO\n#define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )\n#endif\n\n  /* as usual, for the speed hungry :-) */\n\n#undef RAS_ARG\n#undef RAS_ARG_\n#undef RAS_VAR\n#undef RAS_VAR_\n\n#ifndef FT_STATIC_RASTER\n\n#define RAS_ARG   gray_PWorker  worker\n#define RAS_ARG_  gray_PWorker  worker,\n\n#define RAS_VAR   worker\n#define RAS_VAR_  worker,\n\n#else /* FT_STATIC_RASTER */\n\n#define RAS_ARG   /* empty */\n#define RAS_ARG_  /* empty */\n#define RAS_VAR   /* empty */\n#define RAS_VAR_  /* empty */\n\n#endif /* FT_STATIC_RASTER */\n\n\n  /* must be at least 6 bits! */\n#define PIXEL_BITS  8\n\n#undef FLOOR\n#undef CEILING\n#undef TRUNC\n#undef SCALED\n\n#define ONE_PIXEL       ( 1L << PIXEL_BITS )\n#define PIXEL_MASK      ( -1L << PIXEL_BITS )\n#define TRUNC( x )      ( (TCoord)( (x) >> PIXEL_BITS ) )\n#define SUBPIXELS( x )  ( (TPos)(x) << PIXEL_BITS )\n#define FLOOR( x )      ( (x) & -ONE_PIXEL )\n#define CEILING( x )    ( ( (x) + ONE_PIXEL - 1 ) & -ONE_PIXEL )\n#define ROUND( x )      ( ( (x) + ONE_PIXEL / 2 ) & -ONE_PIXEL )\n\n#if PIXEL_BITS >= 6\n#define UPSCALE( x )    ( (x) << ( PIXEL_BITS - 6 ) )\n#define DOWNSCALE( x )  ( (x) >> ( PIXEL_BITS - 6 ) )\n#else\n#define UPSCALE( x )    ( (x) >> ( 6 - PIXEL_BITS ) )\n#define DOWNSCALE( x )  ( (x) << ( 6 - PIXEL_BITS ) )\n#endif\n\n\n  /* Compute `dividend / divisor' and return both its quotient and     */\n  /* remainder, cast to a specific type.  This macro also ensures that */\n  /* the remainder is always positive.                                 */\n#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \\\n  FT_BEGIN_STMNT                                                   \\\n    (quotient)  = (type)( (dividend) / (divisor) );                \\\n    (remainder) = (type)( (dividend) % (divisor) );                \\\n    if ( (remainder) < 0 )                                         \\\n    {                                                              \\\n      (quotient)--;                                                \\\n      (remainder) += (type)(divisor);                              \\\n    }                                                              \\\n  FT_END_STMNT\n\n#ifdef  __arm__\n  /* Work around a bug specific to GCC which make the compiler fail to */\n  /* optimize a division and modulo operation on the same parameters   */\n  /* into a single call to `__aeabi_idivmod'.  See                     */\n  /*                                                                   */\n  /*  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43721                */\n#undef FT_DIV_MOD\n#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \\\n  FT_BEGIN_STMNT                                                   \\\n    (quotient)  = (type)( (dividend) / (divisor) );                \\\n    (remainder) = (type)( (dividend) - (quotient) * (divisor) );   \\\n    if ( (remainder) < 0 )                                         \\\n    {                                                              \\\n      (quotient)--;                                                \\\n      (remainder) += (type)(divisor);                              \\\n    }                                                              \\\n  FT_END_STMNT\n#endif /* __arm__ */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*   TYPE DEFINITIONS                                                    */\n  /*                                                                       */\n\n  /* don't change the following types to FT_Int or FT_Pos, since we might */\n  /* need to define them to \"float\" or \"double\" when experimenting with   */\n  /* new algorithms                                                       */\n\n  typedef long  TCoord;   /* integer scanline/pixel coordinate */\n  typedef long  TPos;     /* sub-pixel coordinate              */\n\n  /* determine the type used to store cell areas.  This normally takes at */\n  /* least PIXEL_BITS*2 + 1 bits.  On 16-bit systems, we need to use      */\n  /* `long' instead of `int', otherwise bad things happen                 */\n\n#if PIXEL_BITS <= 7\n\n  typedef int  TArea;\n\n#else /* PIXEL_BITS >= 8 */\n\n  /* approximately determine the size of integers using an ANSI-C header */\n#if FT_UINT_MAX == 0xFFFFU\n  typedef long  TArea;\n#else\n  typedef int   TArea;\n#endif\n\n#endif /* PIXEL_BITS >= 8 */\n\n\n  /* maximum number of gray spans in a call to the span callback */\n#define FT_MAX_GRAY_SPANS  32\n\n\n  typedef struct TCell_*  PCell;\n\n  typedef struct  TCell_\n  {\n    TPos    x;     /* same with gray_TWorker.ex    */\n    TCoord  cover; /* same with gray_TWorker.cover */\n    TArea   area;\n    PCell   next;\n\n  } TCell;\n\n\n#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */\n  /* We disable the warning `structure was padded due to   */\n  /* __declspec(align())' in order to compile cleanly with */\n  /* the maximum level of warnings.                        */\n#pragma warning( push )\n#pragma warning( disable : 4324 )\n#endif /* _MSC_VER */\n\n  typedef struct  gray_TWorker_\n  {\n    ft_jmp_buf  jump_buffer;\n\n    TCoord  ex, ey;\n    TPos    min_ex, max_ex;\n    TPos    min_ey, max_ey;\n    TPos    count_ex, count_ey;\n\n    TArea   area;\n    TCoord  cover;\n    int     invalid;\n\n    PCell       cells;\n    FT_PtrDist  max_cells;\n    FT_PtrDist  num_cells;\n\n    TCoord  cx, cy;\n    TPos    x,  y;\n\n    TPos    last_ey;\n\n    FT_Vector   bez_stack[32 * 3 + 1];\n    int         lev_stack[32];\n\n    FT_Outline  outline;\n    FT_Bitmap   target;\n    FT_BBox     clip_box;\n\n    FT_Span     gray_spans[FT_MAX_GRAY_SPANS];\n    int         num_gray_spans;\n\n    FT_Raster_Span_Func  render_span;\n    void*                render_span_data;\n    int                  span_y;\n\n    int  band_size;\n    int  band_shoot;\n\n    void*       buffer;\n    long        buffer_size;\n\n    PCell*     ycells;\n    TPos       ycount;\n\n  } gray_TWorker, *gray_PWorker;\n\n#if defined( _MSC_VER )\n#pragma warning( pop )\n#endif\n\n\n#ifndef FT_STATIC_RASTER\n#define ras  (*worker)\n#else\n  static gray_TWorker  ras;\n#endif\n\n\n  typedef struct gray_TRaster_\n  {\n    void*         buffer;\n    long          buffer_size;\n    int           band_size;\n    void*         memory;\n    gray_PWorker  worker;\n\n  } gray_TRaster, *gray_PRaster;\n\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Initialize the cells table.                                           */\n  /*                                                                       */\n  static void\n  gray_init_cells( RAS_ARG_ void*  buffer,\n                   long            byte_size )\n  {\n    ras.buffer      = buffer;\n    ras.buffer_size = byte_size;\n\n    ras.ycells      = (PCell*) buffer;\n    ras.cells       = NULL;\n    ras.max_cells   = 0;\n    ras.num_cells   = 0;\n    ras.area        = 0;\n    ras.cover       = 0;\n    ras.invalid     = 1;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Compute the outline bounding box.                                     */\n  /*                                                                       */\n  static void\n  gray_compute_cbox( RAS_ARG )\n  {\n    FT_Outline*  outline = &ras.outline;\n    FT_Vector*   vec     = outline->points;\n    FT_Vector*   limit   = vec + outline->n_points;\n\n\n    if ( outline->n_points <= 0 )\n    {\n      ras.min_ex = ras.max_ex = 0;\n      ras.min_ey = ras.max_ey = 0;\n      return;\n    }\n\n    ras.min_ex = ras.max_ex = vec->x;\n    ras.min_ey = ras.max_ey = vec->y;\n\n    vec++;\n\n    for ( ; vec < limit; vec++ )\n    {\n      TPos  x = vec->x;\n      TPos  y = vec->y;\n\n\n      if ( x < ras.min_ex ) ras.min_ex = x;\n      if ( x > ras.max_ex ) ras.max_ex = x;\n      if ( y < ras.min_ey ) ras.min_ey = y;\n      if ( y > ras.max_ey ) ras.max_ey = y;\n    }\n\n    /* truncate the bounding box to integer pixels */\n    ras.min_ex = ras.min_ex >> 6;\n    ras.min_ey = ras.min_ey >> 6;\n    ras.max_ex = ( ras.max_ex + 63 ) >> 6;\n    ras.max_ey = ( ras.max_ey + 63 ) >> 6;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Record the current cell in the table.                                 */\n  /*                                                                       */\n  static PCell\n  gray_find_cell( RAS_ARG )\n  {\n    PCell  *pcell, cell;\n    TPos    x = ras.ex;\n\n\n    if ( x > ras.count_ex )\n      x = ras.count_ex;\n\n    pcell = &ras.ycells[ras.ey];\n    for (;;)\n    {\n      cell = *pcell;\n      if ( cell == NULL || cell->x > x )\n        break;\n\n      if ( cell->x == x )\n        goto Exit;\n\n      pcell = &cell->next;\n    }\n\n    if ( ras.num_cells >= ras.max_cells )\n      ft_longjmp( ras.jump_buffer, 1 );\n\n    cell        = ras.cells + ras.num_cells++;\n    cell->x     = x;\n    cell->area  = 0;\n    cell->cover = 0;\n\n    cell->next  = *pcell;\n    *pcell      = cell;\n\n  Exit:\n    return cell;\n  }\n\n\n  static void\n  gray_record_cell( RAS_ARG )\n  {\n    if ( ras.area | ras.cover )\n    {\n      PCell  cell = gray_find_cell( RAS_VAR );\n\n\n      cell->area  += ras.area;\n      cell->cover += ras.cover;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Set the current cell to a new position.                               */\n  /*                                                                       */\n  static void\n  gray_set_cell( RAS_ARG_ TCoord  ex,\n                          TCoord  ey )\n  {\n    /* Move the cell pointer to a new position.  We set the `invalid'      */\n    /* flag to indicate that the cell isn't part of those we're interested */\n    /* in during the render phase.  This means that:                       */\n    /*                                                                     */\n    /* . the new vertical position must be within min_ey..max_ey-1.        */\n    /* . the new horizontal position must be strictly less than max_ex     */\n    /*                                                                     */\n    /* Note that if a cell is to the left of the clipping region, it is    */\n    /* actually set to the (min_ex-1) horizontal position.                 */\n\n    /* All cells that are on the left of the clipping region go to the */\n    /* min_ex - 1 horizontal position.                                 */\n    ey -= ras.min_ey;\n\n    if ( ex > ras.max_ex )\n      ex = ras.max_ex;\n\n    ex -= ras.min_ex;\n    if ( ex < 0 )\n      ex = -1;\n\n    /* are we moving to a different cell ? */\n    if ( ex != ras.ex || ey != ras.ey )\n    {\n      /* record the current one if it is valid */\n      if ( !ras.invalid )\n        gray_record_cell( RAS_VAR );\n\n      ras.area  = 0;\n      ras.cover = 0;\n      ras.ex    = ex;\n      ras.ey    = ey;\n    }\n\n    ras.invalid = ( (unsigned)ey >= (unsigned)ras.count_ey ||\n                              ex >= ras.count_ex           );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Start a new contour at a given cell.                                  */\n  /*                                                                       */\n  static void\n  gray_start_cell( RAS_ARG_ TCoord  ex,\n                            TCoord  ey )\n  {\n    if ( ex > ras.max_ex )\n      ex = (TCoord)( ras.max_ex );\n\n    if ( ex < ras.min_ex )\n      ex = (TCoord)( ras.min_ex - 1 );\n\n    ras.area    = 0;\n    ras.cover   = 0;\n    ras.ex      = ex - ras.min_ex;\n    ras.ey      = ey - ras.min_ey;\n    ras.last_ey = SUBPIXELS( ey );\n    ras.invalid = 0;\n\n    gray_set_cell( RAS_VAR_ ex, ey );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Render a scanline as one or more cells.                               */\n  /*                                                                       */\n  static void\n  gray_render_scanline( RAS_ARG_ TCoord  ey,\n                                 TPos    x1,\n                                 TCoord  y1,\n                                 TPos    x2,\n                                 TCoord  y2 )\n  {\n    TCoord  ex1, ex2, fx1, fx2, delta, mod;\n    long    p, first, dx;\n    int     incr;\n\n\n    dx = x2 - x1;\n\n    ex1 = TRUNC( x1 );\n    ex2 = TRUNC( x2 );\n    fx1 = (TCoord)( x1 - SUBPIXELS( ex1 ) );\n    fx2 = (TCoord)( x2 - SUBPIXELS( ex2 ) );\n\n    /* trivial case.  Happens often */\n    if ( y1 == y2 )\n    {\n      gray_set_cell( RAS_VAR_ ex2, ey );\n      return;\n    }\n\n    /* everything is located in a single cell.  That is easy! */\n    /*                                                        */\n    if ( ex1 == ex2 )\n    {\n      delta      = y2 - y1;\n      ras.area  += (TArea)(( fx1 + fx2 ) * delta);\n      ras.cover += delta;\n      return;\n    }\n\n    /* ok, we'll have to render a run of adjacent cells on the same */\n    /* scanline...                                                  */\n    /*                                                              */\n    p     = ( ONE_PIXEL - fx1 ) * ( y2 - y1 );\n    first = ONE_PIXEL;\n    incr  = 1;\n\n    if ( dx < 0 )\n    {\n      p     = fx1 * ( y2 - y1 );\n      first = 0;\n      incr  = -1;\n      dx    = -dx;\n    }\n\n    FT_DIV_MOD( TCoord, p, dx, delta, mod );\n\n    ras.area  += (TArea)(( fx1 + first ) * delta);\n    ras.cover += delta;\n\n    ex1 += incr;\n    gray_set_cell( RAS_VAR_ ex1, ey );\n    y1  += delta;\n\n    if ( ex1 != ex2 )\n    {\n      TCoord  lift, rem;\n\n\n      p = ONE_PIXEL * ( y2 - y1 + delta );\n      FT_DIV_MOD( TCoord, p, dx, lift, rem );\n\n      mod -= (int)dx;\n\n      while ( ex1 != ex2 )\n      {\n        delta = lift;\n        mod  += rem;\n        if ( mod >= 0 )\n        {\n          mod -= (TCoord)dx;\n          delta++;\n        }\n\n        ras.area  += (TArea)(ONE_PIXEL * delta);\n        ras.cover += delta;\n        y1        += delta;\n        ex1       += incr;\n        gray_set_cell( RAS_VAR_ ex1, ey );\n      }\n    }\n\n    delta      = y2 - y1;\n    ras.area  += (TArea)(( fx2 + ONE_PIXEL - first ) * delta);\n    ras.cover += delta;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Render a given line as a series of scanlines.                         */\n  /*                                                                       */\n  static void\n  gray_render_line( RAS_ARG_ TPos  to_x,\n                             TPos  to_y )\n  {\n    TCoord  ey1, ey2, fy1, fy2, mod;\n    TPos    dx, dy, x, x2;\n    long    p, first;\n    int     delta, rem, lift, incr;\n\n\n    ey1 = TRUNC( ras.last_ey );\n    ey2 = TRUNC( to_y );     /* if (ey2 >= ras.max_ey) ey2 = ras.max_ey-1; */\n    fy1 = (TCoord)( ras.y - ras.last_ey );\n    fy2 = (TCoord)( to_y - SUBPIXELS( ey2 ) );\n\n    dx = to_x - ras.x;\n    dy = to_y - ras.y;\n\n    /* perform vertical clipping */\n    {\n      TCoord  min, max;\n\n\n      min = ey1;\n      max = ey2;\n      if ( ey1 > ey2 )\n      {\n        min = ey2;\n        max = ey1;\n      }\n      if ( min >= ras.max_ey || max < ras.min_ey )\n        goto End;\n    }\n\n    /* everything is on a single scanline */\n    if ( ey1 == ey2 )\n    {\n      gray_render_scanline( RAS_VAR_ ey1, ras.x, fy1, to_x, fy2 );\n      goto End;\n    }\n\n    /* vertical line - avoid calling gray_render_scanline */\n    incr = 1;\n\n    if ( dx == 0 )\n    {\n      TCoord  ex     = TRUNC( ras.x );\n      TCoord  two_fx = (TCoord)( ( ras.x - SUBPIXELS( ex ) ) << 1 );\n      TArea   area;\n\n\n      first = ONE_PIXEL;\n      if ( dy < 0 )\n      {\n        first = 0;\n        incr  = -1;\n      }\n\n      delta      = (int)( first - fy1 );\n      ras.area  += (TArea)two_fx * delta;\n      ras.cover += delta;\n      ey1       += incr;\n\n      gray_set_cell( RAS_VAR_ ex, ey1 );\n\n      delta = (int)( first + first - ONE_PIXEL );\n      area  = (TArea)two_fx * delta;\n      while ( ey1 != ey2 )\n      {\n        ras.area  += area;\n        ras.cover += delta;\n        ey1       += incr;\n\n        gray_set_cell( RAS_VAR_ ex, ey1 );\n      }\n\n      delta      = (int)( fy2 - ONE_PIXEL + first );\n      ras.area  += (TArea)two_fx * delta;\n      ras.cover += delta;\n\n      goto End;\n    }\n\n    /* ok, we have to render several scanlines */\n    p     = ( ONE_PIXEL - fy1 ) * dx;\n    first = ONE_PIXEL;\n    incr  = 1;\n\n    if ( dy < 0 )\n    {\n      p     = fy1 * dx;\n      first = 0;\n      incr  = -1;\n      dy    = -dy;\n    }\n\n    FT_DIV_MOD( int, p, dy, delta, mod );\n\n    x = ras.x + delta;\n    gray_render_scanline( RAS_VAR_ ey1, ras.x, fy1, x, (TCoord)first );\n\n    ey1 += incr;\n    gray_set_cell( RAS_VAR_ TRUNC( x ), ey1 );\n\n    if ( ey1 != ey2 )\n    {\n      p     = ONE_PIXEL * dx;\n      FT_DIV_MOD( int, p, dy, lift, rem );\n      mod -= (int)dy;\n\n      while ( ey1 != ey2 )\n      {\n        delta = lift;\n        mod  += rem;\n        if ( mod >= 0 )\n        {\n          mod -= (int)dy;\n          delta++;\n        }\n\n        x2 = x + delta;\n        gray_render_scanline( RAS_VAR_ ey1, x,\n                                       (TCoord)( ONE_PIXEL - first ), x2,\n                                       (TCoord)first );\n        x = x2;\n\n        ey1 += incr;\n        gray_set_cell( RAS_VAR_ TRUNC( x ), ey1 );\n      }\n    }\n\n    gray_render_scanline( RAS_VAR_ ey1, x,\n                                   (TCoord)( ONE_PIXEL - first ), to_x,\n                                   fy2 );\n\n  End:\n    ras.x       = to_x;\n    ras.y       = to_y;\n    ras.last_ey = SUBPIXELS( ey2 );\n  }\n\n\n  static void\n  gray_split_conic( FT_Vector*  base )\n  {\n    TPos  a, b;\n\n\n    base[4].x = base[2].x;\n    b = base[1].x;\n    a = base[3].x = ( base[2].x + b ) / 2;\n    b = base[1].x = ( base[0].x + b ) / 2;\n    base[2].x = ( a + b ) / 2;\n\n    base[4].y = base[2].y;\n    b = base[1].y;\n    a = base[3].y = ( base[2].y + b ) / 2;\n    b = base[1].y = ( base[0].y + b ) / 2;\n    base[2].y = ( a + b ) / 2;\n  }\n\n\n  static void\n  gray_render_conic( RAS_ARG_ const FT_Vector*  control,\n                              const FT_Vector*  to )\n  {\n    TPos        dx, dy;\n    TPos        min, max, y;\n    int         top, level;\n    int*        levels;\n    FT_Vector*  arc;\n\n\n    levels = ras.lev_stack;\n\n    arc      = ras.bez_stack;\n    arc[0].x = UPSCALE( to->x );\n    arc[0].y = UPSCALE( to->y );\n    arc[1].x = UPSCALE( control->x );\n    arc[1].y = UPSCALE( control->y );\n    arc[2].x = ras.x;\n    arc[2].y = ras.y;\n    top      = 0;\n\n    dx = FT_ABS( arc[2].x + arc[0].x - 2 * arc[1].x );\n    dy = FT_ABS( arc[2].y + arc[0].y - 2 * arc[1].y );\n    if ( dx < dy )\n      dx = dy;\n\n    if ( dx < ONE_PIXEL / 4 )\n      goto Draw;\n\n    /* short-cut the arc that crosses the current band */\n    min = max = arc[0].y;\n\n    y = arc[1].y;\n    if ( y < min ) min = y;\n    if ( y > max ) max = y;\n\n    y = arc[2].y;\n    if ( y < min ) min = y;\n    if ( y > max ) max = y;\n\n    if ( TRUNC( min ) >= ras.max_ey || TRUNC( max ) < ras.min_ey )\n      goto Draw;\n\n    level = 0;\n    do\n    {\n      dx >>= 2;\n      level++;\n    } while ( dx > ONE_PIXEL / 4 );\n\n    levels[0] = level;\n\n    do\n    {\n      level = levels[top];\n      if ( level > 0 )\n      {\n        gray_split_conic( arc );\n        arc += 2;\n        top++;\n        levels[top] = levels[top - 1] = level - 1;\n        continue;\n      }\n\n    Draw:\n      gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );\n      top--;\n      arc -= 2;\n\n    } while ( top >= 0 );\n  }\n\n\n  static void\n  gray_split_cubic( FT_Vector*  base )\n  {\n    TPos  a, b, c, d;\n\n\n    base[6].x = base[3].x;\n    c = base[1].x;\n    d = base[2].x;\n    base[1].x = a = ( base[0].x + c ) / 2;\n    base[5].x = b = ( base[3].x + d ) / 2;\n    c = ( c + d ) / 2;\n    base[2].x = a = ( a + c ) / 2;\n    base[4].x = b = ( b + c ) / 2;\n    base[3].x = ( a + b ) / 2;\n\n    base[6].y = base[3].y;\n    c = base[1].y;\n    d = base[2].y;\n    base[1].y = a = ( base[0].y + c ) / 2;\n    base[5].y = b = ( base[3].y + d ) / 2;\n    c = ( c + d ) / 2;\n    base[2].y = a = ( a + c ) / 2;\n    base[4].y = b = ( b + c ) / 2;\n    base[3].y = ( a + b ) / 2;\n  }\n\n\n  static void\n  gray_render_cubic( RAS_ARG_ const FT_Vector*  control1,\n                              const FT_Vector*  control2,\n                              const FT_Vector*  to )\n  {\n    FT_Vector*  arc;\n    TPos        min, max, y;\n\n\n    arc      = ras.bez_stack;\n    arc[0].x = UPSCALE( to->x );\n    arc[0].y = UPSCALE( to->y );\n    arc[1].x = UPSCALE( control2->x );\n    arc[1].y = UPSCALE( control2->y );\n    arc[2].x = UPSCALE( control1->x );\n    arc[2].y = UPSCALE( control1->y );\n    arc[3].x = ras.x;\n    arc[3].y = ras.y;\n\n    /* Short-cut the arc that crosses the current band. */\n    min = max = arc[0].y;\n\n    y = arc[1].y;\n    if ( y < min )\n      min = y;\n    if ( y > max )\n      max = y;\n\n    y = arc[2].y;\n    if ( y < min )\n      min = y;\n    if ( y > max )\n      max = y;\n\n    y = arc[3].y;\n    if ( y < min )\n      min = y;\n    if ( y > max )\n      max = y;\n\n    if ( TRUNC( min ) >= ras.max_ey || TRUNC( max ) < ras.min_ey )\n      goto Draw;\n\n    for (;;)\n    {\n      /* Decide whether to split or draw. See `Rapid Termination          */\n      /* Evaluation for Recursive Subdivision of Bezier Curves' by Thomas */\n      /* F. Hain, at                                                      */\n      /* http://www.cis.southalabama.edu/~hain/general/Publications/Bezier/Camera-ready%20CISST02%202.pdf */\n\n      {\n        TPos  dx, dy, dx_, dy_;\n        TPos  dx1, dy1, dx2, dy2;\n        TPos  L, s, s_limit;\n\n\n        /* dx and dy are x and y components of the P0-P3 chord vector. */\n        dx = dx_ = arc[3].x - arc[0].x;\n        dy = dy_ = arc[3].y - arc[0].y;\n\n        L = FT_HYPOT( dx_, dy_ );\n\n        /* Avoid possible arithmetic overflow below by splitting. */\n        if ( L > 32767 )\n          goto Split;\n\n        /* Max deviation may be as much as (s/L) * 3/4 (if Hain's v = 1). */\n        s_limit = L * (TPos)( ONE_PIXEL / 6 );\n\n        /* s is L * the perpendicular distance from P1 to the line P0-P3. */\n        dx1 = arc[1].x - arc[0].x;\n        dy1 = arc[1].y - arc[0].y;\n        s = FT_ABS( dy * dx1 - dx * dy1 );\n\n        if ( s > s_limit )\n          goto Split;\n\n        /* s is L * the perpendicular distance from P2 to the line P0-P3. */\n        dx2 = arc[2].x - arc[0].x;\n        dy2 = arc[2].y - arc[0].y;\n        s = FT_ABS( dy * dx2 - dx * dy2 );\n\n        if ( s > s_limit )\n          goto Split;\n\n        /* Split super curvy segments where the off points are so far\n           from the chord that the angles P0-P1-P3 or P0-P2-P3 become\n           acute as detected by appropriate dot products. */\n        if ( dx1 * ( dx1 - dx ) + dy1 * ( dy1 - dy ) > 0 ||\n             dx2 * ( dx2 - dx ) + dy2 * ( dy2 - dy ) > 0 )\n          goto Split;\n\n        /* No reason to split. */\n        goto Draw;\n      }\n\n    Split:\n      gray_split_cubic( arc );\n      arc += 3;\n      continue;\n\n    Draw:\n      gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );\n\n      if ( arc == ras.bez_stack )\n        return;\n\n      arc -= 3;\n    }\n  }\n\n\n  static int\n  gray_move_to( const FT_Vector*  to,\n                gray_PWorker      worker )\n  {\n    TPos  x, y;\n\n\n    /* record current cell, if any */\n    if ( !ras.invalid )\n      gray_record_cell( RAS_VAR );\n\n    /* start to a new position */\n    x = UPSCALE( to->x );\n    y = UPSCALE( to->y );\n\n    gray_start_cell( RAS_VAR_ TRUNC( x ), TRUNC( y ) );\n\n    worker->x = x;\n    worker->y = y;\n    return 0;\n  }\n\n\n  static int\n  gray_line_to( const FT_Vector*  to,\n                gray_PWorker      worker )\n  {\n    gray_render_line( RAS_VAR_ UPSCALE( to->x ), UPSCALE( to->y ) );\n    return 0;\n  }\n\n\n  static int\n  gray_conic_to( const FT_Vector*  control,\n                 const FT_Vector*  to,\n                 gray_PWorker      worker )\n  {\n    gray_render_conic( RAS_VAR_ control, to );\n    return 0;\n  }\n\n\n  static int\n  gray_cubic_to( const FT_Vector*  control1,\n                 const FT_Vector*  control2,\n                 const FT_Vector*  to,\n                 gray_PWorker      worker )\n  {\n    gray_render_cubic( RAS_VAR_ control1, control2, to );\n    return 0;\n  }\n\n\n  static void\n  gray_render_span( int             y,\n                    int             count,\n                    const FT_Span*  spans,\n                    gray_PWorker    worker )\n  {\n    unsigned char*  p;\n    FT_Bitmap*      map = &worker->target;\n\n\n    /* first of all, compute the scanline offset */\n    p = (unsigned char*)map->buffer - y * map->pitch;\n    if ( map->pitch >= 0 )\n      p += (unsigned)( ( map->rows - 1 ) * map->pitch );\n\n    for ( ; count > 0; count--, spans++ )\n    {\n      unsigned char  coverage = spans->coverage;\n\n\n      if ( coverage )\n      {\n        /* For small-spans it is faster to do it by ourselves than\n         * calling `memset'.  This is mainly due to the cost of the\n         * function call.\n         */\n        if ( spans->len >= 8 )\n          FT_MEM_SET( p + spans->x, (unsigned char)coverage, spans->len );\n        else\n        {\n          unsigned char*  q = p + spans->x;\n\n\n          switch ( spans->len )\n          {\n          case 7: *q++ = (unsigned char)coverage;\n          case 6: *q++ = (unsigned char)coverage;\n          case 5: *q++ = (unsigned char)coverage;\n          case 4: *q++ = (unsigned char)coverage;\n          case 3: *q++ = (unsigned char)coverage;\n          case 2: *q++ = (unsigned char)coverage;\n          case 1: *q   = (unsigned char)coverage;\n          default:\n            ;\n          }\n        }\n      }\n    }\n  }\n\n\n  static void\n  gray_hline( RAS_ARG_ TCoord  x,\n                       TCoord  y,\n                       TPos    area,\n                       TCoord  acount )\n  {\n    int  coverage;\n\n\n    /* compute the coverage line's coverage, depending on the    */\n    /* outline fill rule                                         */\n    /*                                                           */\n    /* the coverage percentage is area/(PIXEL_BITS*PIXEL_BITS*2) */\n    /*                                                           */\n    coverage = (int)( area >> ( PIXEL_BITS * 2 + 1 - 8 ) );\n                                                    /* use range 0..256 */\n    if ( coverage < 0 )\n      coverage = -coverage;\n\n    if ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL )\n    {\n      coverage &= 511;\n\n      if ( coverage > 256 )\n        coverage = 512 - coverage;\n      else if ( coverage == 256 )\n        coverage = 255;\n    }\n    else\n    {\n      /* normal non-zero winding rule */\n      if ( coverage >= 256 )\n        coverage = 255;\n    }\n\n    y += (TCoord)ras.min_ey;\n    x += (TCoord)ras.min_ex;\n\n    /* FT_Span.x is a 16-bit short, so limit our coordinates appropriately */\n    if ( x >= 32767 )\n      x = 32767;\n\n    /* FT_Span.y is an integer, so limit our coordinates appropriately */\n    if ( y >= FT_INT_MAX )\n      y = FT_INT_MAX;\n\n    if ( coverage )\n    {\n      FT_Span*  span;\n      int       count;\n\n\n      /* see whether we can add this span to the current list */\n      count = ras.num_gray_spans;\n      span  = ras.gray_spans + count - 1;\n      if ( count > 0                          &&\n           ras.span_y == y                    &&\n           (int)span->x + span->len == (int)x &&\n           span->coverage == coverage         )\n      {\n        span->len = (unsigned short)( span->len + acount );\n        return;\n      }\n\n      if ( ras.span_y != y || count >= FT_MAX_GRAY_SPANS )\n      {\n        if ( ras.render_span && count > 0 )\n          ras.render_span( ras.span_y, count, ras.gray_spans,\n                           ras.render_span_data );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n        if ( count > 0 )\n        {\n          int  n;\n\n\n          FT_TRACE7(( \"y = %3d \", ras.span_y ));\n          span = ras.gray_spans;\n          for ( n = 0; n < count; n++, span++ )\n            FT_TRACE7(( \"[%d..%d]:%02x \",\n                        span->x, span->x + span->len - 1, span->coverage ));\n          FT_TRACE7(( \"\\n\" ));\n        }\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n        ras.num_gray_spans = 0;\n        ras.span_y         = (int)y;\n\n        span  = ras.gray_spans;\n      }\n      else\n        span++;\n\n      /* add a gray span to the current list */\n      span->x        = (short)x;\n      span->len      = (unsigned short)acount;\n      span->coverage = (unsigned char)coverage;\n\n      ras.num_gray_spans++;\n    }\n  }\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n  /* to be called while in the debugger --                                */\n  /* this function causes a compiler warning since it is unused otherwise */\n  static void\n  gray_dump_cells( RAS_ARG )\n  {\n    int  yindex;\n\n\n    for ( yindex = 0; yindex < ras.ycount; yindex++ )\n    {\n      PCell  cell;\n\n\n      printf( \"%3d:\", yindex );\n\n      for ( cell = ras.ycells[yindex]; cell != NULL; cell = cell->next )\n        printf( \" (%3ld, c:%4ld, a:%6d)\", cell->x, cell->cover, cell->area );\n      printf( \"\\n\" );\n    }\n  }\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n\n  static void\n  gray_sweep( RAS_ARG_ const FT_Bitmap*  target )\n  {\n    int  yindex;\n\n    FT_UNUSED( target );\n\n\n    if ( ras.num_cells == 0 )\n      return;\n\n    ras.num_gray_spans = 0;\n\n    FT_TRACE7(( \"gray_sweep: start\\n\" ));\n\n    for ( yindex = 0; yindex < ras.ycount; yindex++ )\n    {\n      PCell   cell  = ras.ycells[yindex];\n      TCoord  cover = 0;\n      TCoord  x     = 0;\n\n\n      for ( ; cell != NULL; cell = cell->next )\n      {\n        TPos  area;\n\n\n        if ( cell->x > x && cover != 0 )\n          gray_hline( RAS_VAR_ x, yindex, cover * ( ONE_PIXEL * 2 ),\n                      cell->x - x );\n\n        cover += cell->cover;\n        area   = cover * ( ONE_PIXEL * 2 ) - cell->area;\n\n        if ( area != 0 && cell->x >= 0 )\n          gray_hline( RAS_VAR_ cell->x, yindex, area, 1 );\n\n        x = cell->x + 1;\n      }\n\n      if ( cover != 0 )\n        gray_hline( RAS_VAR_ x, yindex, cover * ( ONE_PIXEL * 2 ),\n                    ras.count_ex - x );\n    }\n\n    if ( ras.render_span && ras.num_gray_spans > 0 )\n      ras.render_span( ras.span_y, ras.num_gray_spans,\n                       ras.gray_spans, ras.render_span_data );\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n    if ( ras.num_gray_spans > 0 )\n    {\n      FT_Span*  span;\n      int       n;\n\n\n      FT_TRACE7(( \"y = %3d \", ras.span_y ));\n      span = ras.gray_spans;\n      for ( n = 0; n < ras.num_gray_spans; n++, span++ )\n        FT_TRACE7(( \"[%d..%d]:%02x \",\n                    span->x, span->x + span->len - 1, span->coverage ));\n      FT_TRACE7(( \"\\n\" ));\n    }\n\n    FT_TRACE7(( \"gray_sweep: end\\n\" ));\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n  }\n\n\n#ifdef _STANDALONE_\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  The following function should only compile in stand-alone mode,      */\n  /*  i.e., when building this component without the rest of FreeType.     */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Decompose                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Walk over an outline's structure to decompose it into individual   */\n  /*    segments and Bézier arcs.  This function is also able to emit      */\n  /*    `move to' and `close to' operations to indicate the start and end  */\n  /*    of new contours in the outline.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    outline        :: A pointer to the source target.                  */\n  /*                                                                       */\n  /*    func_interface :: A table of `emitters', i.e., function pointers   */\n  /*                      called during decomposition to indicate path     */\n  /*                      operations.                                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    user           :: A typeless pointer which is passed to each       */\n  /*                      emitter during the decomposition.  It can be     */\n  /*                      used to store the state during the               */\n  /*                      decomposition.                                   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0 means success.                                      */\n  /*                                                                       */\n  static int\n  FT_Outline_Decompose( const FT_Outline*        outline,\n                        const FT_Outline_Funcs*  func_interface,\n                        void*                    user )\n  {\n#undef SCALED\n#define SCALED( x )  ( ( (x) << shift ) - delta )\n\n    FT_Vector   v_last;\n    FT_Vector   v_control;\n    FT_Vector   v_start;\n\n    FT_Vector*  point;\n    FT_Vector*  limit;\n    char*       tags;\n\n    int         error;\n\n    int   n;         /* index of contour in outline     */\n    int   first;     /* index of first point in contour */\n    char  tag;       /* current point's state           */\n\n    int   shift;\n    TPos  delta;\n\n\n    if ( !outline )\n      return FT_THROW( Invalid_Outline );\n\n    if ( !func_interface )\n      return FT_THROW( Invalid_Argument );\n\n    shift = func_interface->shift;\n    delta = func_interface->delta;\n    first = 0;\n\n    for ( n = 0; n < outline->n_contours; n++ )\n    {\n      int  last;  /* index of last point in contour */\n\n\n      FT_TRACE5(( \"FT_Outline_Decompose: Outline %d\\n\", n ));\n\n      last  = outline->contours[n];\n      if ( last < 0 )\n        goto Invalid_Outline;\n      limit = outline->points + last;\n\n      v_start   = outline->points[first];\n      v_start.x = SCALED( v_start.x );\n      v_start.y = SCALED( v_start.y );\n\n      v_last   = outline->points[last];\n      v_last.x = SCALED( v_last.x );\n      v_last.y = SCALED( v_last.y );\n\n      v_control = v_start;\n\n      point = outline->points + first;\n      tags  = outline->tags   + first;\n      tag   = FT_CURVE_TAG( tags[0] );\n\n      /* A contour cannot start with a cubic control point! */\n      if ( tag == FT_CURVE_TAG_CUBIC )\n        goto Invalid_Outline;\n\n      /* check first point to determine origin */\n      if ( tag == FT_CURVE_TAG_CONIC )\n      {\n        /* first point is conic control.  Yes, this happens. */\n        if ( FT_CURVE_TAG( outline->tags[last] ) == FT_CURVE_TAG_ON )\n        {\n          /* start at last point if it is on the curve */\n          v_start = v_last;\n          limit--;\n        }\n        else\n        {\n          /* if both first and last points are conic,         */\n          /* start at their middle and record its position    */\n          /* for closure                                      */\n          v_start.x = ( v_start.x + v_last.x ) / 2;\n          v_start.y = ( v_start.y + v_last.y ) / 2;\n\n          v_last = v_start;\n        }\n        point--;\n        tags--;\n      }\n\n      FT_TRACE5(( \"  move to (%.2f, %.2f)\\n\",\n                  v_start.x / 64.0, v_start.y / 64.0 ));\n      error = func_interface->move_to( &v_start, user );\n      if ( error )\n        goto Exit;\n\n      while ( point < limit )\n      {\n        point++;\n        tags++;\n\n        tag = FT_CURVE_TAG( tags[0] );\n        switch ( tag )\n        {\n        case FT_CURVE_TAG_ON:  /* emit a single line_to */\n          {\n            FT_Vector  vec;\n\n\n            vec.x = SCALED( point->x );\n            vec.y = SCALED( point->y );\n\n            FT_TRACE5(( \"  line to (%.2f, %.2f)\\n\",\n                        vec.x / 64.0, vec.y / 64.0 ));\n            error = func_interface->line_to( &vec, user );\n            if ( error )\n              goto Exit;\n            continue;\n          }\n\n        case FT_CURVE_TAG_CONIC:  /* consume conic arcs */\n          v_control.x = SCALED( point->x );\n          v_control.y = SCALED( point->y );\n\n        Do_Conic:\n          if ( point < limit )\n          {\n            FT_Vector  vec;\n            FT_Vector  v_middle;\n\n\n            point++;\n            tags++;\n            tag = FT_CURVE_TAG( tags[0] );\n\n            vec.x = SCALED( point->x );\n            vec.y = SCALED( point->y );\n\n            if ( tag == FT_CURVE_TAG_ON )\n            {\n              FT_TRACE5(( \"  conic to (%.2f, %.2f)\"\n                          \" with control (%.2f, %.2f)\\n\",\n                          vec.x / 64.0, vec.y / 64.0,\n                          v_control.x / 64.0, v_control.y / 64.0 ));\n              error = func_interface->conic_to( &v_control, &vec, user );\n              if ( error )\n                goto Exit;\n              continue;\n            }\n\n            if ( tag != FT_CURVE_TAG_CONIC )\n              goto Invalid_Outline;\n\n            v_middle.x = ( v_control.x + vec.x ) / 2;\n            v_middle.y = ( v_control.y + vec.y ) / 2;\n\n            FT_TRACE5(( \"  conic to (%.2f, %.2f)\"\n                        \" with control (%.2f, %.2f)\\n\",\n                        v_middle.x / 64.0, v_middle.y / 64.0,\n                        v_control.x / 64.0, v_control.y / 64.0 ));\n            error = func_interface->conic_to( &v_control, &v_middle, user );\n            if ( error )\n              goto Exit;\n\n            v_control = vec;\n            goto Do_Conic;\n          }\n\n          FT_TRACE5(( \"  conic to (%.2f, %.2f)\"\n                      \" with control (%.2f, %.2f)\\n\",\n                      v_start.x / 64.0, v_start.y / 64.0,\n                      v_control.x / 64.0, v_control.y / 64.0 ));\n          error = func_interface->conic_to( &v_control, &v_start, user );\n          goto Close;\n\n        default:  /* FT_CURVE_TAG_CUBIC */\n          {\n            FT_Vector  vec1, vec2;\n\n\n            if ( point + 1 > limit                             ||\n                 FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )\n              goto Invalid_Outline;\n\n            point += 2;\n            tags  += 2;\n\n            vec1.x = SCALED( point[-2].x );\n            vec1.y = SCALED( point[-2].y );\n\n            vec2.x = SCALED( point[-1].x );\n            vec2.y = SCALED( point[-1].y );\n\n            if ( point <= limit )\n            {\n              FT_Vector  vec;\n\n\n              vec.x = SCALED( point->x );\n              vec.y = SCALED( point->y );\n\n              FT_TRACE5(( \"  cubic to (%.2f, %.2f)\"\n                          \" with controls (%.2f, %.2f) and (%.2f, %.2f)\\n\",\n                          vec.x / 64.0, vec.y / 64.0,\n                          vec1.x / 64.0, vec1.y / 64.0,\n                          vec2.x / 64.0, vec2.y / 64.0 ));\n              error = func_interface->cubic_to( &vec1, &vec2, &vec, user );\n              if ( error )\n                goto Exit;\n              continue;\n            }\n\n            FT_TRACE5(( \"  cubic to (%.2f, %.2f)\"\n                        \" with controls (%.2f, %.2f) and (%.2f, %.2f)\\n\",\n                        v_start.x / 64.0, v_start.y / 64.0,\n                        vec1.x / 64.0, vec1.y / 64.0,\n                        vec2.x / 64.0, vec2.y / 64.0 ));\n            error = func_interface->cubic_to( &vec1, &vec2, &v_start, user );\n            goto Close;\n          }\n        }\n      }\n\n      /* close the contour with a line segment */\n      FT_TRACE5(( \"  line to (%.2f, %.2f)\\n\",\n                  v_start.x / 64.0, v_start.y / 64.0 ));\n      error = func_interface->line_to( &v_start, user );\n\n   Close:\n      if ( error )\n        goto Exit;\n\n      first = last + 1;\n    }\n\n    FT_TRACE5(( \"FT_Outline_Decompose: Done\\n\", n ));\n    return 0;\n\n  Exit:\n    FT_TRACE5(( \"FT_Outline_Decompose: Error %d\\n\", error ));\n    return error;\n\n  Invalid_Outline:\n    return FT_THROW( Invalid_Outline );\n  }\n\n#endif /* _STANDALONE_ */\n\n\n  typedef struct  gray_TBand_\n  {\n    TPos  min, max;\n\n  } gray_TBand;\n\n    FT_DEFINE_OUTLINE_FUNCS(func_interface,\n      (FT_Outline_MoveTo_Func) gray_move_to,\n      (FT_Outline_LineTo_Func) gray_line_to,\n      (FT_Outline_ConicTo_Func)gray_conic_to,\n      (FT_Outline_CubicTo_Func)gray_cubic_to,\n      0,\n      0\n    )\n\n  static int\n  gray_convert_glyph_inner( RAS_ARG )\n  {\n\n    volatile int  error = 0;\n\n#ifdef FT_CONFIG_OPTION_PIC\n      FT_Outline_Funcs func_interface;\n      Init_Class_func_interface(&func_interface);\n#endif\n\n    if ( ft_setjmp( ras.jump_buffer ) == 0 )\n    {\n      error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras );\n      if ( !ras.invalid )\n        gray_record_cell( RAS_VAR );\n    }\n    else\n      error = FT_THROW( Memory_Overflow );\n\n    return error;\n  }\n\n\n  static int\n  gray_convert_glyph( RAS_ARG )\n  {\n    gray_TBand            bands[40];\n    gray_TBand* volatile  band;\n    int volatile          n, num_bands;\n    TPos volatile         min, max, max_y;\n    FT_BBox*              clip;\n\n\n    /* Set up state in the raster object */\n    gray_compute_cbox( RAS_VAR );\n\n    /* clip to target bitmap, exit if nothing to do */\n    clip = &ras.clip_box;\n\n    if ( ras.max_ex <= clip->xMin || ras.min_ex >= clip->xMax ||\n         ras.max_ey <= clip->yMin || ras.min_ey >= clip->yMax )\n      return 0;\n\n    if ( ras.min_ex < clip->xMin ) ras.min_ex = clip->xMin;\n    if ( ras.min_ey < clip->yMin ) ras.min_ey = clip->yMin;\n\n    if ( ras.max_ex > clip->xMax ) ras.max_ex = clip->xMax;\n    if ( ras.max_ey > clip->yMax ) ras.max_ey = clip->yMax;\n\n    ras.count_ex = ras.max_ex - ras.min_ex;\n    ras.count_ey = ras.max_ey - ras.min_ey;\n\n    /* set up vertical bands */\n    num_bands = (int)( ( ras.max_ey - ras.min_ey ) / ras.band_size );\n    if ( num_bands == 0 )\n      num_bands = 1;\n    if ( num_bands >= 39 )\n      num_bands = 39;\n\n    ras.band_shoot = 0;\n\n    min   = ras.min_ey;\n    max_y = ras.max_ey;\n\n    for ( n = 0; n < num_bands; n++, min = max )\n    {\n      max = min + ras.band_size;\n      if ( n == num_bands - 1 || max > max_y )\n        max = max_y;\n\n      bands[0].min = min;\n      bands[0].max = max;\n      band         = bands;\n\n      while ( band >= bands )\n      {\n        TPos  bottom, top, middle;\n        int   error;\n\n        {\n          PCell  cells_max;\n          int    yindex;\n          long   cell_start, cell_end, cell_mod;\n\n\n          ras.ycells = (PCell*)ras.buffer;\n          ras.ycount = band->max - band->min;\n\n          cell_start = sizeof ( PCell ) * ras.ycount;\n          cell_mod   = cell_start % sizeof ( TCell );\n          if ( cell_mod > 0 )\n            cell_start += sizeof ( TCell ) - cell_mod;\n\n          cell_end  = ras.buffer_size;\n          cell_end -= cell_end % sizeof ( TCell );\n\n          cells_max = (PCell)( (char*)ras.buffer + cell_end );\n          ras.cells = (PCell)( (char*)ras.buffer + cell_start );\n          if ( ras.cells >= cells_max )\n            goto ReduceBands;\n\n          ras.max_cells = cells_max - ras.cells;\n          if ( ras.max_cells < 2 )\n            goto ReduceBands;\n\n          for ( yindex = 0; yindex < ras.ycount; yindex++ )\n            ras.ycells[yindex] = NULL;\n        }\n\n        ras.num_cells = 0;\n        ras.invalid   = 1;\n        ras.min_ey    = band->min;\n        ras.max_ey    = band->max;\n        ras.count_ey  = band->max - band->min;\n\n        error = gray_convert_glyph_inner( RAS_VAR );\n\n        if ( !error )\n        {\n          gray_sweep( RAS_VAR_ &ras.target );\n          band--;\n          continue;\n        }\n        else if ( error != ErrRaster_Memory_Overflow )\n          return 1;\n\n      ReduceBands:\n        /* render pool overflow; we will reduce the render band by half */\n        bottom = band->min;\n        top    = band->max;\n        middle = bottom + ( ( top - bottom ) >> 1 );\n\n        /* This is too complex for a single scanline; there must */\n        /* be some problems.                                     */\n        if ( middle == bottom )\n        {\n#ifdef FT_DEBUG_LEVEL_TRACE\n          FT_TRACE7(( \"gray_convert_glyph: rotten glyph\\n\" ));\n#endif\n          return 1;\n        }\n\n        if ( bottom-top >= ras.band_size )\n          ras.band_shoot++;\n\n        band[1].min = bottom;\n        band[1].max = middle;\n        band[0].min = middle;\n        band[0].max = top;\n        band++;\n      }\n    }\n\n    if ( ras.band_shoot > 8 && ras.band_size > 16 )\n      ras.band_size = ras.band_size / 2;\n\n    return 0;\n  }\n\n\n  static int\n  gray_raster_render( gray_PRaster             raster,\n                      const FT_Raster_Params*  params )\n  {\n    const FT_Outline*  outline    = (const FT_Outline*)params->source;\n    const FT_Bitmap*   target_map = params->target;\n    gray_PWorker       worker;\n\n\n    if ( !raster || !raster->buffer || !raster->buffer_size )\n      return FT_THROW( Invalid_Argument );\n\n    if ( !outline )\n      return FT_THROW( Invalid_Outline );\n\n    /* return immediately if the outline is empty */\n    if ( outline->n_points == 0 || outline->n_contours <= 0 )\n      return 0;\n\n    if ( !outline->contours || !outline->points )\n      return FT_THROW( Invalid_Outline );\n\n    if ( outline->n_points !=\n           outline->contours[outline->n_contours - 1] + 1 )\n      return FT_THROW( Invalid_Outline );\n\n    worker = raster->worker;\n\n    /* if direct mode is not set, we must have a target bitmap */\n    if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) )\n    {\n      if ( !target_map )\n        return FT_THROW( Invalid_Argument );\n\n      /* nothing to do */\n      if ( !target_map->width || !target_map->rows )\n        return 0;\n\n      if ( !target_map->buffer )\n        return FT_THROW( Invalid_Argument );\n    }\n\n    /* this version does not support monochrome rendering */\n    if ( !( params->flags & FT_RASTER_FLAG_AA ) )\n      return FT_THROW( Invalid_Mode );\n\n    /* compute clipping box */\n    if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) )\n    {\n      /* compute clip box from target pixmap */\n      ras.clip_box.xMin = 0;\n      ras.clip_box.yMin = 0;\n      ras.clip_box.xMax = target_map->width;\n      ras.clip_box.yMax = target_map->rows;\n    }\n    else if ( params->flags & FT_RASTER_FLAG_CLIP )\n      ras.clip_box = params->clip_box;\n    else\n    {\n      ras.clip_box.xMin = -32768L;\n      ras.clip_box.yMin = -32768L;\n      ras.clip_box.xMax =  32767L;\n      ras.clip_box.yMax =  32767L;\n    }\n\n    gray_init_cells( RAS_VAR_ raster->buffer, raster->buffer_size );\n\n    ras.outline        = *outline;\n    ras.num_cells      = 0;\n    ras.invalid        = 1;\n    ras.band_size      = raster->band_size;\n    ras.num_gray_spans = 0;\n\n    if ( params->flags & FT_RASTER_FLAG_DIRECT )\n    {\n      ras.render_span      = (FT_Raster_Span_Func)params->gray_spans;\n      ras.render_span_data = params->user;\n    }\n    else\n    {\n      ras.target           = *target_map;\n      ras.render_span      = (FT_Raster_Span_Func)gray_render_span;\n      ras.render_span_data = &ras;\n    }\n\n    return gray_convert_glyph( RAS_VAR );\n  }\n\n\n  /**** RASTER OBJECT CREATION: In stand-alone mode, we simply use *****/\n  /****                         a static object.                   *****/\n\n#ifdef _STANDALONE_\n\n  static int\n  gray_raster_new( void*       memory,\n                   FT_Raster*  araster )\n  {\n    static gray_TRaster  the_raster;\n\n    FT_UNUSED( memory );\n\n\n    *araster = (FT_Raster)&the_raster;\n    FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );\n\n    return 0;\n  }\n\n\n  static void\n  gray_raster_done( FT_Raster  raster )\n  {\n    /* nothing */\n    FT_UNUSED( raster );\n  }\n\n#else /* !_STANDALONE_ */\n\n  static int\n  gray_raster_new( FT_Memory   memory,\n                   FT_Raster*  araster )\n  {\n    FT_Error      error;\n    gray_PRaster  raster = NULL;\n\n\n    *araster = 0;\n    if ( !FT_ALLOC( raster, sizeof ( gray_TRaster ) ) )\n    {\n      raster->memory = memory;\n      *araster       = (FT_Raster)raster;\n    }\n\n    return error;\n  }\n\n\n  static void\n  gray_raster_done( FT_Raster  raster )\n  {\n    FT_Memory  memory = (FT_Memory)((gray_PRaster)raster)->memory;\n\n\n    FT_FREE( raster );\n  }\n\n#endif /* !_STANDALONE_ */\n\n\n  static void\n  gray_raster_reset( FT_Raster  raster,\n                     char*      pool_base,\n                     long       pool_size )\n  {\n    gray_PRaster  rast = (gray_PRaster)raster;\n\n\n    if ( raster )\n    {\n      if ( pool_base && pool_size >= (long)sizeof ( gray_TWorker ) + 2048 )\n      {\n        gray_PWorker  worker = (gray_PWorker)pool_base;\n\n\n        rast->worker      = worker;\n        rast->buffer      = pool_base +\n                              ( ( sizeof ( gray_TWorker ) +\n                                  sizeof ( TCell ) - 1 )  &\n                                ~( sizeof ( TCell ) - 1 ) );\n        rast->buffer_size = (long)( ( pool_base + pool_size ) -\n                                    (char*)rast->buffer ) &\n                                      ~( sizeof ( TCell ) - 1 );\n        rast->band_size   = (int)( rast->buffer_size /\n                                     ( sizeof ( TCell ) * 8 ) );\n      }\n      else\n      {\n        rast->buffer      = NULL;\n        rast->buffer_size = 0;\n        rast->worker      = NULL;\n      }\n    }\n  }\n\n\n  static int\n  gray_raster_set_mode( FT_Raster      raster,\n                        unsigned long  mode,\n                        void*          args )\n  {\n    FT_UNUSED( raster );\n    FT_UNUSED( mode );\n    FT_UNUSED( args );\n\n\n    return 0; /* nothing to do */\n  }\n\n\n  FT_DEFINE_RASTER_FUNCS(ft_grays_raster,\n    FT_GLYPH_FORMAT_OUTLINE,\n\n    (FT_Raster_New_Func)     gray_raster_new,\n    (FT_Raster_Reset_Func)   gray_raster_reset,\n    (FT_Raster_Set_Mode_Func)gray_raster_set_mode,\n    (FT_Raster_Render_Func)  gray_raster_render,\n    (FT_Raster_Done_Func)    gray_raster_done\n  )\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/smooth/ftgrays.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgrays.h                                                              */\n/*                                                                         */\n/*    FreeType smooth renderer declaration                                 */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTGRAYS_H__\n#define __FTGRAYS_H__\n\n#ifdef __cplusplus\n  extern \"C\" {\n#endif\n\n\n#ifdef _STANDALONE_\n#include \"ftimage.h\"\n#else\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H /* for FT_CONFIG_OPTION_PIC */\n#include FT_IMAGE_H\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* To make ftgrays.h independent from configuration files we check       */\n  /* whether FT_EXPORT_VAR has been defined already.                       */\n  /*                                                                       */\n  /* On some systems and compilers (Win32 mostly), an extra keyword is     */\n  /* necessary to compile the library as a DLL.                            */\n  /*                                                                       */\n#ifndef FT_EXPORT_VAR\n#define FT_EXPORT_VAR( x )  extern  x\n#endif\n\n  FT_EXPORT_VAR( const FT_Raster_Funcs )  ft_grays_raster;\n\n\n#ifdef __cplusplus\n  }\n#endif\n\n#endif /* __FTGRAYS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/smooth/ftsmerrs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsmerrs.h                                                             */\n/*                                                                         */\n/*    smooth renderer error codes (specification only).                    */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the smooth renderer error enumeration     */\n  /* constants.                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __FTSMERRS_H__\n#define __FTSMERRS_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  Smooth_Err_\n#define FT_ERR_BASE    FT_Mod_Err_Smooth\n\n#include FT_ERRORS_H\n\n#endif /* __FTSMERRS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/smooth/ftsmooth.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsmooth.c                                                             */\n/*                                                                         */\n/*    Anti-aliasing renderer interface (body).                             */\n/*                                                                         */\n/*  Copyright 2000-2006, 2009-2013 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_OUTLINE_H\n#include \"ftsmooth.h\"\n#include \"ftgrays.h\"\n#include \"ftspic.h\"\n\n#include \"ftsmerrs.h\"\n\n\n  /* initialize renderer -- init its raster */\n  static FT_Error\n  ft_smooth_init( FT_Renderer  render )\n  {\n    FT_Library  library = FT_MODULE_LIBRARY( render );\n\n\n    render->clazz->raster_class->raster_reset( render->raster,\n                                               library->raster_pool,\n                                               library->raster_pool_size );\n\n    return 0;\n  }\n\n\n  /* sets render-specific mode */\n  static FT_Error\n  ft_smooth_set_mode( FT_Renderer  render,\n                      FT_ULong     mode_tag,\n                      FT_Pointer   data )\n  {\n    /* we simply pass it to the raster */\n    return render->clazz->raster_class->raster_set_mode( render->raster,\n                                                         mode_tag,\n                                                         data );\n  }\n\n  /* transform a given glyph image */\n  static FT_Error\n  ft_smooth_transform( FT_Renderer       render,\n                       FT_GlyphSlot      slot,\n                       const FT_Matrix*  matrix,\n                       const FT_Vector*  delta )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( slot->format != render->glyph_format )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    if ( matrix )\n      FT_Outline_Transform( &slot->outline, matrix );\n\n    if ( delta )\n      FT_Outline_Translate( &slot->outline, delta->x, delta->y );\n\n  Exit:\n    return error;\n  }\n\n\n  /* return the glyph's control box */\n  static void\n  ft_smooth_get_cbox( FT_Renderer   render,\n                      FT_GlyphSlot  slot,\n                      FT_BBox*      cbox )\n  {\n    FT_MEM_ZERO( cbox, sizeof ( *cbox ) );\n\n    if ( slot->format == render->glyph_format )\n      FT_Outline_Get_CBox( &slot->outline, cbox );\n  }\n\n\n  /* convert a slot's glyph image into a bitmap */\n  static FT_Error\n  ft_smooth_render_generic( FT_Renderer       render,\n                            FT_GlyphSlot      slot,\n                            FT_Render_Mode    mode,\n                            const FT_Vector*  origin,\n                            FT_Render_Mode    required_mode )\n  {\n    FT_Error     error;\n    FT_Outline*  outline = &slot->outline;\n    FT_Bitmap*   bitmap  = &slot->bitmap;\n    FT_Memory    memory  = render->root.memory;\n    FT_BBox      cbox;\n    FT_Pos       x_shift = 0;\n    FT_Pos       y_shift = 0;\n    FT_Pos       x_left, y_top;\n    FT_Pos       width, height, pitch;\n#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING\n    FT_Pos       height_org, width_org;\n#endif\n    FT_Int       hmul    = mode == FT_RENDER_MODE_LCD;\n    FT_Int       vmul    = mode == FT_RENDER_MODE_LCD_V;\n\n    FT_Raster_Params  params;\n\n    FT_Bool  have_outline_shifted = FALSE;\n    FT_Bool  have_buffer          = FALSE;\n\n\n    /* check glyph image format */\n    if ( slot->format != render->glyph_format )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* check mode */\n    if ( mode != required_mode )\n    {\n      error = FT_THROW( Cannot_Render_Glyph );\n      goto Exit;\n    }\n\n    if ( origin )\n    {\n      x_shift = origin->x;\n      y_shift = origin->y;\n    }\n\n    /* compute the control box, and grid fit it */\n    /* taking into account the origin shift     */\n    FT_Outline_Get_CBox( outline, &cbox );\n\n    cbox.xMin = FT_PIX_FLOOR( cbox.xMin + x_shift );\n    cbox.yMin = FT_PIX_FLOOR( cbox.yMin + y_shift );\n    cbox.xMax = FT_PIX_CEIL( cbox.xMax + x_shift );\n    cbox.yMax = FT_PIX_CEIL( cbox.yMax + y_shift );\n\n    x_shift -= cbox.xMin;\n    y_shift -= cbox.yMin;\n\n    x_left  = cbox.xMin >> 6;\n    y_top   = cbox.yMax >> 6;\n\n    width  = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6;\n    height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6;\n\n#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING\n    width_org  = width;\n    height_org = height;\n#endif\n\n    pitch = width;\n    if ( hmul )\n    {\n      width *= 3;\n      pitch  = FT_PAD_CEIL( width, 4 );\n    }\n\n    if ( vmul )\n      height *= 3;\n\n#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING\n\n    if ( slot->library->lcd_filter_func )\n    {\n      FT_Int  extra = slot->library->lcd_extra;\n\n\n      if ( hmul )\n      {\n        x_shift += 64 * ( extra >> 1 );\n        x_left  -= extra >> 1;\n        width   += 3 * extra;\n        pitch    = FT_PAD_CEIL( width, 4 );\n      }\n\n      if ( vmul )\n      {\n        y_shift += 64 * ( extra >> 1 );\n        y_top   += extra >> 1;\n        height  += 3 * extra;\n      }\n    }\n\n#endif\n\n    /*\n     * XXX: on 16bit system, we return an error for huge bitmap\n     * to prevent an overflow.\n     */\n    if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX ||\n         x_left < FT_INT_MIN || y_top < FT_INT_MIN )\n    {\n      error = FT_THROW( Invalid_Pixel_Size );\n      goto Exit;\n    }\n\n    /* Required check is (pitch * height < FT_ULONG_MAX),        */\n    /* but we care realistic cases only.  Always pitch <= width. */\n    if ( width > 0x7FFF || height > 0x7FFF )\n    {\n      FT_ERROR(( \"ft_smooth_render_generic: glyph too large: %u x %u\\n\",\n                 width, height ));\n      error = FT_THROW( Raster_Overflow );\n      goto Exit;\n    }\n\n    /* release old bitmap buffer */\n    if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )\n    {\n      FT_FREE( bitmap->buffer );\n      slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;\n    }\n\n    /* allocate new one */\n    if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) )\n      goto Exit;\n    else\n      have_buffer = TRUE;\n\n    slot->internal->flags |= FT_GLYPH_OWN_BITMAP;\n\n    slot->format      = FT_GLYPH_FORMAT_BITMAP;\n    slot->bitmap_left = (FT_Int)x_left;\n    slot->bitmap_top  = (FT_Int)y_top;\n\n    bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;\n    bitmap->num_grays  = 256;\n    bitmap->width      = width;\n    bitmap->rows       = height;\n    bitmap->pitch      = pitch;\n\n    /* translate outline to render it into the bitmap */\n    if ( x_shift || y_shift )\n    {\n      FT_Outline_Translate( outline, x_shift, y_shift );\n      have_outline_shifted = TRUE;\n    }\n\n    /* set up parameters */\n    params.target = bitmap;\n    params.source = outline;\n    params.flags  = FT_RASTER_FLAG_AA;\n\n#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING\n\n    /* implode outline if needed */\n    {\n      FT_Vector*  points     = outline->points;\n      FT_Vector*  points_end = points + outline->n_points;\n      FT_Vector*  vec;\n\n\n      if ( hmul )\n        for ( vec = points; vec < points_end; vec++ )\n          vec->x *= 3;\n\n      if ( vmul )\n        for ( vec = points; vec < points_end; vec++ )\n          vec->y *= 3;\n    }\n\n    /* render outline into the bitmap */\n    error = render->raster_render( render->raster, &params );\n\n    /* deflate outline if needed */\n    {\n      FT_Vector*  points     = outline->points;\n      FT_Vector*  points_end = points + outline->n_points;\n      FT_Vector*  vec;\n\n\n      if ( hmul )\n        for ( vec = points; vec < points_end; vec++ )\n          vec->x /= 3;\n\n      if ( vmul )\n        for ( vec = points; vec < points_end; vec++ )\n          vec->y /= 3;\n    }\n\n    if ( error )\n      goto Exit;\n\n    if ( slot->library->lcd_filter_func )\n      slot->library->lcd_filter_func( bitmap, mode, slot->library );\n\n#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */\n\n    /* render outline into bitmap */\n    error = render->raster_render( render->raster, &params );\n    if ( error )\n      goto Exit;\n\n    /* expand it horizontally */\n    if ( hmul )\n    {\n      FT_Byte*  line = bitmap->buffer;\n      FT_UInt   hh;\n\n\n      for ( hh = height_org; hh > 0; hh--, line += pitch )\n      {\n        FT_UInt   xx;\n        FT_Byte*  end = line + width;\n\n\n        for ( xx = width_org; xx > 0; xx-- )\n        {\n          FT_UInt  pixel = line[xx-1];\n\n\n          end[-3] = (FT_Byte)pixel;\n          end[-2] = (FT_Byte)pixel;\n          end[-1] = (FT_Byte)pixel;\n          end    -= 3;\n        }\n      }\n    }\n\n    /* expand it vertically */\n    if ( vmul )\n    {\n      FT_Byte*  read  = bitmap->buffer + ( height - height_org ) * pitch;\n      FT_Byte*  write = bitmap->buffer;\n      FT_UInt   hh;\n\n\n      for ( hh = height_org; hh > 0; hh-- )\n      {\n        ft_memcpy( write, read, pitch );\n        write += pitch;\n\n        ft_memcpy( write, read, pitch );\n        write += pitch;\n\n        ft_memcpy( write, read, pitch );\n        write += pitch;\n        read  += pitch;\n      }\n    }\n\n#endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */\n\n    /* everything is fine; don't deallocate buffer */\n    have_buffer = FALSE;\n\n    error = FT_Err_Ok;\n\n  Exit:\n    if ( have_outline_shifted )\n      FT_Outline_Translate( outline, -x_shift, -y_shift );\n    if ( have_buffer )\n    {\n      FT_FREE( bitmap->buffer );\n      slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;\n    }\n\n    return error;\n  }\n\n\n  /* convert a slot's glyph image into a bitmap */\n  static FT_Error\n  ft_smooth_render( FT_Renderer       render,\n                    FT_GlyphSlot      slot,\n                    FT_Render_Mode    mode,\n                    const FT_Vector*  origin )\n  {\n    if ( mode == FT_RENDER_MODE_LIGHT )\n      mode = FT_RENDER_MODE_NORMAL;\n\n    return ft_smooth_render_generic( render, slot, mode, origin,\n                                     FT_RENDER_MODE_NORMAL );\n  }\n\n\n  /* convert a slot's glyph image into a horizontal LCD bitmap */\n  static FT_Error\n  ft_smooth_render_lcd( FT_Renderer       render,\n                        FT_GlyphSlot      slot,\n                        FT_Render_Mode    mode,\n                        const FT_Vector*  origin )\n  {\n    FT_Error  error;\n\n    error = ft_smooth_render_generic( render, slot, mode, origin,\n                                      FT_RENDER_MODE_LCD );\n    if ( !error )\n      slot->bitmap.pixel_mode = FT_PIXEL_MODE_LCD;\n\n    return error;\n  }\n\n\n  /* convert a slot's glyph image into a vertical LCD bitmap */\n  static FT_Error\n  ft_smooth_render_lcd_v( FT_Renderer       render,\n                          FT_GlyphSlot      slot,\n                          FT_Render_Mode    mode,\n                          const FT_Vector*  origin )\n  {\n    FT_Error  error;\n\n    error = ft_smooth_render_generic( render, slot, mode, origin,\n                                      FT_RENDER_MODE_LCD_V );\n    if ( !error )\n      slot->bitmap.pixel_mode = FT_PIXEL_MODE_LCD_V;\n\n    return error;\n  }\n\n\n  FT_DEFINE_RENDERER( ft_smooth_renderer_class,\n\n      FT_MODULE_RENDERER,\n      sizeof ( FT_RendererRec ),\n\n      \"smooth\",\n      0x10000L,\n      0x20000L,\n\n      0,    /* module specific interface */\n\n      (FT_Module_Constructor)ft_smooth_init,\n      (FT_Module_Destructor) 0,\n      (FT_Module_Requester)  0\n    ,\n\n    FT_GLYPH_FORMAT_OUTLINE,\n\n    (FT_Renderer_RenderFunc)   ft_smooth_render,\n    (FT_Renderer_TransformFunc)ft_smooth_transform,\n    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,\n    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,\n\n    (FT_Raster_Funcs*)    &FT_GRAYS_RASTER_GET\n  )\n\n\n  FT_DEFINE_RENDERER( ft_smooth_lcd_renderer_class,\n\n      FT_MODULE_RENDERER,\n      sizeof ( FT_RendererRec ),\n\n      \"smooth-lcd\",\n      0x10000L,\n      0x20000L,\n\n      0,    /* module specific interface */\n\n      (FT_Module_Constructor)ft_smooth_init,\n      (FT_Module_Destructor) 0,\n      (FT_Module_Requester)  0\n    ,\n\n    FT_GLYPH_FORMAT_OUTLINE,\n\n    (FT_Renderer_RenderFunc)   ft_smooth_render_lcd,\n    (FT_Renderer_TransformFunc)ft_smooth_transform,\n    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,\n    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,\n\n    (FT_Raster_Funcs*)    &FT_GRAYS_RASTER_GET\n  )\n\n  FT_DEFINE_RENDERER( ft_smooth_lcdv_renderer_class,\n\n      FT_MODULE_RENDERER,\n      sizeof ( FT_RendererRec ),\n\n      \"smooth-lcdv\",\n      0x10000L,\n      0x20000L,\n\n      0,    /* module specific interface */\n\n      (FT_Module_Constructor)ft_smooth_init,\n      (FT_Module_Destructor) 0,\n      (FT_Module_Requester)  0\n    ,\n\n    FT_GLYPH_FORMAT_OUTLINE,\n\n    (FT_Renderer_RenderFunc)   ft_smooth_render_lcd_v,\n    (FT_Renderer_TransformFunc)ft_smooth_transform,\n    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,\n    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,\n\n    (FT_Raster_Funcs*)    &FT_GRAYS_RASTER_GET\n  )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/smooth/ftsmooth.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsmooth.h                                                             */\n/*                                                                         */\n/*    Anti-aliasing renderer interface (specification).                    */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTSMOOTH_H__\n#define __FTSMOOTH_H__\n\n\n#include <ft2build.h>\n#include FT_RENDER_H\n\n\nFT_BEGIN_HEADER\n\n\n#ifndef FT_CONFIG_OPTION_NO_STD_RASTER\n  FT_DECLARE_RENDERER( ft_std_renderer_class )\n#endif\n\n#ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER\n  FT_DECLARE_RENDERER( ft_smooth_renderer_class )\n\n  FT_DECLARE_RENDERER( ft_smooth_lcd_renderer_class )\n\n  FT_DECLARE_RENDERER( ft_smooth_lcd_v_renderer_class )\n#endif\n\n\n\nFT_END_HEADER\n\n#endif /* __FTSMOOTH_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/smooth/ftspic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftspic.c                                                               */\n/*                                                                         */\n/*    The FreeType position independent code services for smooth module.   */\n/*                                                                         */\n/*  Copyright 2009, 2010, 2012, 2013 by                                    */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"ftspic.h\"\n#include \"ftsmerrs.h\"\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* forward declaration of PIC init functions from ftgrays.c */\n  void\n  FT_Init_Class_ft_grays_raster( FT_Raster_Funcs*  funcs );\n\n\n  void\n  ft_smooth_renderer_class_pic_free( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Memory          memory        = library->memory;\n\n\n    if ( pic_container->smooth )\n    {\n      SmoothPIC*  container = (SmoothPIC*)pic_container->smooth;\n\n\n      if ( --container->ref_count )\n        return;\n\n      FT_FREE( container );\n      pic_container->smooth = NULL;\n    }\n  }\n\n\n  FT_Error\n  ft_smooth_renderer_class_pic_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Error           error         = FT_Err_Ok;\n    SmoothPIC*         container     = NULL;\n    FT_Memory          memory        = library->memory;\n\n\n    /* since this function also serve smooth_lcd and smooth_lcdv renderers,\n       it implements reference counting */\n    if ( pic_container->smooth )\n    {\n      ((SmoothPIC*)pic_container->smooth)->ref_count++;\n      return error;\n    }\n\n    /* allocate pointer, clear and set global container pointer */\n    if ( FT_ALLOC( container, sizeof ( *container ) ) )\n      return error;\n    FT_MEM_SET( container, 0, sizeof ( *container ) );\n    pic_container->smooth = container;\n\n    container->ref_count = 1;\n\n    /* initialize pointer table -                       */\n    /* this is how the module usually expects this data */\n    FT_Init_Class_ft_grays_raster( &container->ft_grays_raster );\n\n    return error;\n  }\n\n\n  /* re-route these init and free functions to the above functions */\n  FT_Error\n  ft_smooth_lcd_renderer_class_pic_init( FT_Library  library )\n  {\n    return ft_smooth_renderer_class_pic_init( library );\n  }\n\n\n  void\n  ft_smooth_lcd_renderer_class_pic_free( FT_Library  library )\n  {\n    ft_smooth_renderer_class_pic_free( library );\n  }\n\n\n  FT_Error\n  ft_smooth_lcdv_renderer_class_pic_init( FT_Library  library )\n  {\n    return ft_smooth_renderer_class_pic_init( library );\n  }\n\n\n  void\n  ft_smooth_lcdv_renderer_class_pic_free( FT_Library  library )\n  {\n    ft_smooth_renderer_class_pic_free( library );\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/smooth/ftspic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftspic.h                                                               */\n/*                                                                         */\n/*    The FreeType position independent code services for smooth module.   */\n/*                                                                         */\n/*  Copyright 2009 by                                                      */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTSPIC_H__\n#define __FTSPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#include FT_INTERNAL_PIC_H\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define FT_GRAYS_RASTER_GET  ft_grays_raster\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n  typedef struct  SmoothPIC_\n  {\n    int              ref_count;\n    FT_Raster_Funcs  ft_grays_raster;\n\n  } SmoothPIC;\n\n\n#define GET_PIC( lib ) \\\n          ( (SmoothPIC*)( (lib)->pic_container.smooth ) )\n#define FT_GRAYS_RASTER_GET  ( GET_PIC( library )->ft_grays_raster )\n\n\n  /* see ftspic.c for the implementation */\n  void\n  ft_smooth_renderer_class_pic_free( FT_Library  library );\n\n  void\n  ft_smooth_lcd_renderer_class_pic_free( FT_Library  library );\n\n  void\n  ft_smooth_lcdv_renderer_class_pic_free( FT_Library  library );\n\n  FT_Error\n  ft_smooth_renderer_class_pic_init( FT_Library  library );\n\n  FT_Error\n  ft_smooth_lcd_renderer_class_pic_init( FT_Library  library );\n\n  FT_Error\n  ft_smooth_lcdv_renderer_class_pic_init( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FTSPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/smooth/smooth.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  smooth.c                                                               */\n/*                                                                         */\n/*    FreeType anti-aliasing rasterer module component (body only).        */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"ftspic.c\"\n#include \"ftgrays.c\"\n#include \"ftsmooth.c\"\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/truetype.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  truetype.c                                                             */\n/*                                                                         */\n/*    FreeType TrueType driver component (body only).                      */\n/*                                                                         */\n/*  Copyright 1996-2001, 2004, 2006, 2012 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"ttpic.c\"\n#include \"ttdriver.c\"   /* driver interface    */\n#include \"ttpload.c\"    /* tables loader       */\n#include \"ttgload.c\"    /* glyph loader        */\n#include \"ttobjs.c\"     /* object manager      */\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n#include \"ttinterp.c\"\n#include \"ttsubpix.c\"\n#endif\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n#include \"ttgxvar.c\"    /* gx distortable font */\n#endif\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttdriver.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttdriver.c                                                             */\n/*                                                                         */\n/*    TrueType font driver implementation (body).                          */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_SFNT_H\n#include FT_SERVICE_XFREE86_NAME_H\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n#include FT_MULTIPLE_MASTERS_H\n#include FT_SERVICE_MULTIPLE_MASTERS_H\n#endif\n\n#include FT_SERVICE_TRUETYPE_ENGINE_H\n#include FT_SERVICE_TRUETYPE_GLYF_H\n#include FT_SERVICE_PROPERTIES_H\n#include FT_TRUETYPE_DRIVER_H\n\n#include \"ttdriver.h\"\n#include \"ttgload.h\"\n#include \"ttpload.h\"\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n#include \"ttgxvar.h\"\n#endif\n\n#include \"tterrors.h\"\n\n#include \"ttpic.h\"\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttdriver\n\n\n  /*\n   *  PROPERTY SERVICE\n   *\n   */\n  static FT_Error\n  tt_property_set( FT_Module    module,         /* TT_Driver */\n                   const char*  property_name,\n                   const void*  value )\n  {\n    FT_Error   error  = FT_Err_Ok;\n    TT_Driver  driver = (TT_Driver)module;\n\n\n    if ( !ft_strcmp( property_name, \"interpreter-version\" ) )\n    {\n      FT_UInt*  interpreter_version = (FT_UInt*)value;\n\n\n#ifndef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      if ( *interpreter_version != TT_INTERPRETER_VERSION_35 )\n        error = FT_ERR( Unimplemented_Feature );\n      else\n#endif\n        driver->interpreter_version = *interpreter_version;\n\n      return error;\n    }\n\n    FT_TRACE0(( \"tt_property_set: missing property `%s'\\n\",\n                property_name ));\n    return FT_THROW( Missing_Property );\n  }\n\n\n  static FT_Error\n  tt_property_get( FT_Module    module,         /* TT_Driver */\n                   const char*  property_name,\n                   const void*  value )\n  {\n    FT_Error   error  = FT_Err_Ok;\n    TT_Driver  driver = (TT_Driver)module;\n\n    FT_UInt  interpreter_version = driver->interpreter_version;\n\n\n    if ( !ft_strcmp( property_name, \"interpreter-version\" ) )\n    {\n      FT_UInt*  val = (FT_UInt*)value;\n\n\n      *val = interpreter_version;\n\n      return error;\n    }\n\n    FT_TRACE0(( \"tt_property_get: missing property `%s'\\n\",\n                property_name ));\n    return FT_THROW( Missing_Property );\n  }\n\n\n  FT_DEFINE_SERVICE_PROPERTIESREC(\n    tt_service_properties,\n    (FT_Properties_SetFunc)tt_property_set,\n    (FT_Properties_GetFunc)tt_property_get )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                          F A C E S                              ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n#undef  PAIR_TAG\n#define PAIR_TAG( left, right )  ( ( (FT_ULong)left << 16 ) | \\\n                                     (FT_ULong)right        )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_get_kerning                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A driver method used to return the kerning vector between two      */\n  /*    glyphs of the same face.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: A handle to the source face object.                 */\n  /*                                                                       */\n  /*    left_glyph  :: The index of the left glyph in the kern pair.       */\n  /*                                                                       */\n  /*    right_glyph :: The index of the right glyph in the kern pair.      */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    kerning     :: The kerning vector.  This is in font units for      */\n  /*                   scalable formats, and in pixels for fixed-sizes     */\n  /*                   formats.                                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only horizontal layouts (left-to-right & right-to-left) are        */\n  /*    supported by this function.  Other layouts, or more sophisticated  */\n  /*    kernings, are out of scope of this method (the basic driver        */\n  /*    interface is meant to be simple).                                  */\n  /*                                                                       */\n  /*    They can be implemented by format-specific interfaces.             */\n  /*                                                                       */\n  static FT_Error\n  tt_get_kerning( FT_Face     ttface,          /* TT_Face */\n                  FT_UInt     left_glyph,\n                  FT_UInt     right_glyph,\n                  FT_Vector*  kerning )\n  {\n    TT_Face       face = (TT_Face)ttface;\n    SFNT_Service  sfnt = (SFNT_Service)face->sfnt;\n\n\n    kerning->x = 0;\n    kerning->y = 0;\n\n    if ( sfnt )\n      kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph );\n\n    return 0;\n  }\n\n\n#undef PAIR_TAG\n\n\n  static FT_Error\n  tt_get_advances( FT_Face    ttface,\n                   FT_UInt    start,\n                   FT_UInt    count,\n                   FT_Int32   flags,\n                   FT_Fixed  *advances )\n  {\n    FT_UInt  nn;\n    TT_Face  face  = (TT_Face) ttface;\n\n\n    /* XXX: TODO: check for sbits */\n\n    if ( flags & FT_LOAD_VERTICAL_LAYOUT )\n    {\n      for ( nn = 0; nn < count; nn++ )\n      {\n        FT_Short   tsb;\n        FT_UShort  ah;\n\n\n        /* since we don't need `tsb', we use zero for `yMax' parameter */\n        TT_Get_VMetrics( face, start + nn, 0, &tsb, &ah );\n        advances[nn] = ah;\n      }\n    }\n    else\n    {\n      for ( nn = 0; nn < count; nn++ )\n      {\n        FT_Short   lsb;\n        FT_UShort  aw;\n\n\n        TT_Get_HMetrics( face, start + nn, &lsb, &aw );\n        advances[nn] = aw;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                           S I Z E S                             ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n  static FT_Error\n  tt_size_select( FT_Size   size,\n                  FT_ULong  strike_index )\n  {\n    TT_Face   ttface = (TT_Face)size->face;\n    TT_Size   ttsize = (TT_Size)size;\n    FT_Error  error  = FT_Err_Ok;\n\n\n    ttsize->strike_index = strike_index;\n\n    if ( FT_IS_SCALABLE( size->face ) )\n    {\n      /* use the scaled metrics, even when tt_size_reset fails */\n      FT_Select_Metrics( size->face, strike_index );\n\n      tt_size_reset( ttsize ); /* ignore return value */\n    }\n    else\n    {\n      SFNT_Service      sfnt    = (SFNT_Service) ttface->sfnt;\n      FT_Size_Metrics*  metrics = &size->metrics;\n\n\n      error = sfnt->load_strike_metrics( ttface, strike_index, metrics );\n      if ( error )\n        ttsize->strike_index = 0xFFFFFFFFUL;\n    }\n\n    return error;\n  }\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n\n  static FT_Error\n  tt_size_request( FT_Size          size,\n                   FT_Size_Request  req )\n  {\n    TT_Size   ttsize = (TT_Size)size;\n    FT_Error  error  = FT_Err_Ok;\n\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n    if ( FT_HAS_FIXED_SIZES( size->face ) )\n    {\n      TT_Face       ttface = (TT_Face)size->face;\n      SFNT_Service  sfnt   = (SFNT_Service) ttface->sfnt;\n      FT_ULong      strike_index;\n\n\n      error = sfnt->set_sbit_strike( ttface, req, &strike_index );\n\n      if ( error )\n        ttsize->strike_index = 0xFFFFFFFFUL;\n      else\n        return tt_size_select( size, strike_index );\n    }\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n    FT_Request_Metrics( size->face, req );\n\n    if ( FT_IS_SCALABLE( size->face ) )\n    {\n      error = tt_size_reset( ttsize );\n      ttsize->root.metrics = ttsize->metrics;\n    }\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_glyph_load                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A driver method used to load a glyph within a given glyph slot.    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    slot        :: A handle to the target slot object where the glyph  */\n  /*                   will be loaded.                                     */\n  /*                                                                       */\n  /*    size        :: A handle to the source face size at which the glyph */\n  /*                   must be scaled, loaded, etc.                        */\n  /*                                                                       */\n  /*    glyph_index :: The index of the glyph in the font file.            */\n  /*                                                                       */\n  /*    load_flags  :: A flag indicating what to load for this glyph.  The */\n  /*                   FT_LOAD_XXX constants can be used to control the    */\n  /*                   glyph loading process (e.g., whether the outline    */\n  /*                   should be scaled, whether to load bitmaps or not,   */\n  /*                   whether to hint the outline, etc).                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  static FT_Error\n  tt_glyph_load( FT_GlyphSlot  ttslot,      /* TT_GlyphSlot */\n                 FT_Size       ttsize,      /* TT_Size      */\n                 FT_UInt       glyph_index,\n                 FT_Int32      load_flags )\n  {\n    TT_GlyphSlot  slot = (TT_GlyphSlot)ttslot;\n    TT_Size       size = (TT_Size)ttsize;\n    FT_Face       face = ttslot->face;\n    FT_Error      error;\n\n\n    if ( !slot )\n      return FT_THROW( Invalid_Slot_Handle );\n\n    if ( !size )\n      return FT_THROW( Invalid_Size_Handle );\n\n    if ( !face )\n      return FT_THROW( Invalid_Face_Handle );\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    if ( glyph_index >= (FT_UInt)face->num_glyphs &&\n         !face->internal->incremental_interface   )\n#else\n    if ( glyph_index >= (FT_UInt)face->num_glyphs )\n#endif\n      return FT_THROW( Invalid_Argument );\n\n    if ( load_flags & FT_LOAD_NO_HINTING )\n    {\n      /* both FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT   */\n      /* are necessary to disable hinting for tricky fonts */\n\n      if ( FT_IS_TRICKY( face ) )\n        load_flags &= ~FT_LOAD_NO_HINTING;\n\n      if ( load_flags & FT_LOAD_NO_AUTOHINT )\n        load_flags |= FT_LOAD_NO_HINTING;\n    }\n\n    if ( load_flags & ( FT_LOAD_NO_RECURSE | FT_LOAD_NO_SCALE ) )\n    {\n      load_flags |= FT_LOAD_NO_BITMAP | FT_LOAD_NO_SCALE;\n\n      if ( !FT_IS_TRICKY( face ) )\n        load_flags |= FT_LOAD_NO_HINTING;\n    }\n\n    /* now load the glyph outline if necessary */\n    error = TT_Load_Glyph( size, slot, glyph_index, load_flags );\n\n    /* force drop-out mode to 2 - irrelevant now */\n    /* slot->outline.dropout_mode = 2; */\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /****                D R I V E R  I N T E R F A C E                   ****/\n  /****                                                                 ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n  FT_DEFINE_SERVICE_MULTIMASTERSREC(\n    tt_service_gx_multi_masters,\n    (FT_Get_MM_Func)        NULL,\n    (FT_Set_MM_Design_Func) NULL,\n    (FT_Set_MM_Blend_Func)  TT_Set_MM_Blend,\n    (FT_Get_MM_Var_Func)    TT_Get_MM_Var,\n    (FT_Set_Var_Design_Func)TT_Set_Var_Design )\n#endif\n\n  static const FT_Service_TrueTypeEngineRec  tt_service_truetype_engine =\n  {\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED\n#else\n    FT_TRUETYPE_ENGINE_TYPE_PATENTED\n#endif\n\n#else /* !TT_USE_BYTECODE_INTERPRETER */\n\n    FT_TRUETYPE_ENGINE_TYPE_NONE\n\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n  };\n\n  FT_DEFINE_SERVICE_TTGLYFREC(\n    tt_service_truetype_glyf,\n    (TT_Glyf_GetLocationFunc)tt_face_get_location )\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n  FT_DEFINE_SERVICEDESCREC5(\n    tt_services,\n    FT_SERVICE_ID_XF86_NAME,       FT_XF86_FORMAT_TRUETYPE,\n    FT_SERVICE_ID_MULTI_MASTERS,   &TT_SERVICE_GX_MULTI_MASTERS_GET,\n    FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,\n    FT_SERVICE_ID_TT_GLYF,         &TT_SERVICE_TRUETYPE_GLYF_GET,\n    FT_SERVICE_ID_PROPERTIES,      &TT_SERVICE_PROPERTIES_GET )\n#else\n  FT_DEFINE_SERVICEDESCREC4(\n    tt_services,\n    FT_SERVICE_ID_XF86_NAME,       FT_XF86_FORMAT_TRUETYPE,\n    FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,\n    FT_SERVICE_ID_TT_GLYF,         &TT_SERVICE_TRUETYPE_GLYF_GET,\n    FT_SERVICE_ID_PROPERTIES,      &TT_SERVICE_PROPERTIES_GET )\n#endif\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  tt_get_interface( FT_Module    driver,    /* TT_Driver */\n                    const char*  tt_interface )\n  {\n    FT_Library           library;\n    FT_Module_Interface  result;\n    FT_Module            sfntd;\n    SFNT_Service         sfnt;\n\n\n    /* TT_SERVICES_GET dereferences `library' in PIC mode */\n#ifdef FT_CONFIG_OPTION_PIC\n    if ( !driver )\n      return NULL;\n    library = driver->library;\n    if ( !library )\n      return NULL;\n#endif\n\n    result = ft_service_list_lookup( TT_SERVICES_GET, tt_interface );\n    if ( result != NULL )\n      return result;\n\n#ifndef FT_CONFIG_OPTION_PIC\n    if ( !driver )\n      return NULL;\n    library = driver->library;\n    if ( !library )\n      return NULL;\n#endif\n\n    /* only return the default interface from the SFNT module */\n    sfntd = FT_Get_Module( library, \"sfnt\" );\n    if ( sfntd )\n    {\n      sfnt = (SFNT_Service)( sfntd->clazz->module_interface );\n      if ( sfnt )\n        return sfnt->get_interface( driver, tt_interface );\n    }\n\n    return 0;\n  }\n\n\n  /* The FT_DriverInterface structure is defined in ftdriver.h. */\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n#define TT_HINTER_FLAG  FT_MODULE_DRIVER_HAS_HINTER\n#else\n#define TT_HINTER_FLAG  0\n#endif\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n#define TT_SIZE_SELECT  tt_size_select\n#else\n#define TT_SIZE_SELECT  0\n#endif\n\n  FT_DEFINE_DRIVER(\n    tt_driver_class,\n\n      FT_MODULE_FONT_DRIVER     |\n      FT_MODULE_DRIVER_SCALABLE |\n      TT_HINTER_FLAG,\n\n      sizeof ( TT_DriverRec ),\n\n      \"truetype\",      /* driver name                           */\n      0x10000L,        /* driver version == 1.0                 */\n      0x20000L,        /* driver requires FreeType 2.0 or above */\n\n      (void*)0,        /* driver specific interface */\n\n      tt_driver_init,\n      tt_driver_done,\n      tt_get_interface,\n\n    sizeof ( TT_FaceRec ),\n    sizeof ( TT_SizeRec ),\n    sizeof ( FT_GlyphSlotRec ),\n\n    tt_face_init,\n    tt_face_done,\n    tt_size_init,\n    tt_size_done,\n    tt_slot_init,\n    0,                       /* FT_Slot_DoneFunc */\n\n    tt_glyph_load,\n\n    tt_get_kerning,\n    0,                       /* FT_Face_AttachFunc */\n    tt_get_advances,\n\n    tt_size_request,\n    TT_SIZE_SELECT\n  )\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttdriver.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttdriver.h                                                             */\n/*                                                                         */\n/*    High-level TrueType driver interface (specification).                */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTDRIVER_H__\n#define __TTDRIVER_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_DECLARE_DRIVER( tt_driver_class )\n\n\nFT_END_HEADER\n\n#endif /* __TTDRIVER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/tterrors.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  tterrors.h                                                             */\n/*                                                                         */\n/*    TrueType error codes (specification only).                           */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the TrueType error enumeration            */\n  /* constants.                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __TTERRORS_H__\n#define __TTERRORS_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  TT_Err_\n#define FT_ERR_BASE    FT_Mod_Err_TrueType\n\n#include FT_ERRORS_H\n\n#endif /* __TTERRORS_H__ */\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttgload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttgload.c                                                              */\n/*                                                                         */\n/*    TrueType Glyph Loader (body).                                        */\n/*                                                                         */\n/*  Copyright 1996-2014                                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_SFNT_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_OUTLINE_H\n#include FT_TRUETYPE_DRIVER_H\n\n#include \"ttgload.h\"\n#include \"ttpload.h\"\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n#include \"ttgxvar.h\"\n#endif\n\n#include \"tterrors.h\"\n#include \"ttsubpix.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttgload\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Composite glyph flags.                                                */\n  /*                                                                       */\n#define ARGS_ARE_WORDS             0x0001\n#define ARGS_ARE_XY_VALUES         0x0002\n#define ROUND_XY_TO_GRID           0x0004\n#define WE_HAVE_A_SCALE            0x0008\n/* reserved                        0x0010 */\n#define MORE_COMPONENTS            0x0020\n#define WE_HAVE_AN_XY_SCALE        0x0040\n#define WE_HAVE_A_2X2              0x0080\n#define WE_HAVE_INSTR              0x0100\n#define USE_MY_METRICS             0x0200\n#define OVERLAP_COMPOUND           0x0400\n#define SCALED_COMPONENT_OFFSET    0x0800\n#define UNSCALED_COMPONENT_OFFSET  0x1000\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Return the horizontal metrics in font units for a given glyph.        */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  TT_Get_HMetrics( TT_Face     face,\n                   FT_UInt     idx,\n                   FT_Short*   lsb,\n                   FT_UShort*  aw )\n  {\n    ( (SFNT_Service)face->sfnt )->get_metrics( face, 0, idx, lsb, aw );\n\n    FT_TRACE5(( \"  advance width (font units): %d\\n\", *aw ));\n    FT_TRACE5(( \"  left side bearing (font units): %d\\n\", *lsb ));\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Return the vertical metrics in font units for a given glyph.          */\n  /* See macro `TT_LOADER_SET_PP' below for explanations.                  */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  TT_Get_VMetrics( TT_Face     face,\n                   FT_UInt     idx,\n                   FT_Pos      yMax,\n                   FT_Short*   tsb,\n                   FT_UShort*  ah )\n  {\n    if ( face->vertical_info )\n      ( (SFNT_Service)face->sfnt )->get_metrics( face, 1, idx, tsb, ah );\n\n    else if ( face->os2.version != 0xFFFFU )\n    {\n      *tsb = (FT_Short)( face->os2.sTypoAscender - yMax );\n      *ah  = face->os2.sTypoAscender - face->os2.sTypoDescender;\n    }\n\n    else\n    {\n      *tsb = (FT_Short)( face->horizontal.Ascender - yMax );\n      *ah  = face->horizontal.Ascender - face->horizontal.Descender;\n    }\n\n    FT_TRACE5(( \"  advance height (font units): %d\\n\", *ah ));\n    FT_TRACE5(( \"  top side bearing (font units): %d\\n\", *tsb ));\n  }\n\n\n  static FT_Error\n  tt_get_metrics( TT_Loader  loader,\n                  FT_UInt    glyph_index )\n  {\n    TT_Face    face   = (TT_Face)loader->face;\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    TT_Driver  driver = (TT_Driver)FT_FACE_DRIVER( face );\n#endif\n\n    FT_Error   error;\n    FT_Stream  stream = loader->stream;\n\n    FT_Short   left_bearing = 0, top_bearing = 0;\n    FT_UShort  advance_width = 0, advance_height = 0;\n\n    /* we must preserve the stream position          */\n    /* (which gets altered by the metrics functions) */\n    FT_ULong  pos = FT_STREAM_POS();\n\n\n    TT_Get_HMetrics( face, glyph_index,\n                     &left_bearing,\n                     &advance_width );\n    TT_Get_VMetrics( face, glyph_index,\n                     loader->bbox.yMax,\n                     &top_bearing,\n                     &advance_height );\n\n    if ( FT_STREAM_SEEK( pos ) )\n      return error;\n\n    loader->left_bearing = left_bearing;\n    loader->advance      = advance_width;\n    loader->top_bearing  = top_bearing;\n    loader->vadvance     = advance_height;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )\n    {\n      if ( loader->exec )\n        loader->exec->sph_tweak_flags = 0;\n\n      /* this may not be the right place for this, but it works */\n      if ( loader->exec && loader->exec->ignore_x_mode )\n        sph_set_tweaks( loader, glyph_index );\n    }\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    if ( !loader->linear_def )\n    {\n      loader->linear_def = 1;\n      loader->linear     = advance_width;\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n  static void\n  tt_get_metrics_incr_overrides( TT_Loader  loader,\n                                 FT_UInt    glyph_index )\n  {\n    TT_Face  face = (TT_Face)loader->face;\n\n    FT_Short   left_bearing = 0, top_bearing = 0;\n    FT_UShort  advance_width = 0, advance_height = 0;\n\n\n    /* If this is an incrementally loaded font check whether there are */\n    /* overriding metrics for this glyph.                              */\n    if ( face->root.internal->incremental_interface                           &&\n         face->root.internal->incremental_interface->funcs->get_glyph_metrics )\n    {\n      FT_Incremental_MetricsRec  metrics;\n      FT_Error                   error;\n\n\n      metrics.bearing_x = loader->left_bearing;\n      metrics.bearing_y = 0;\n      metrics.advance   = loader->advance;\n      metrics.advance_v = 0;\n\n      error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(\n                face->root.internal->incremental_interface->object,\n                glyph_index, FALSE, &metrics );\n      if ( error )\n        goto Exit;\n\n      left_bearing  = (FT_Short)metrics.bearing_x;\n      advance_width = (FT_UShort)metrics.advance;\n\n#if 0\n\n      /* GWW: Do I do the same for vertical metrics? */\n      metrics.bearing_x = 0;\n      metrics.bearing_y = loader->top_bearing;\n      metrics.advance   = loader->vadvance;\n\n      error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(\n                face->root.internal->incremental_interface->object,\n                glyph_index, TRUE, &metrics );\n      if ( error )\n        goto Exit;\n\n      top_bearing    = (FT_Short)metrics.bearing_y;\n      advance_height = (FT_UShort)metrics.advance;\n\n#endif /* 0 */\n\n      loader->left_bearing = left_bearing;\n      loader->advance      = advance_width;\n      loader->top_bearing  = top_bearing;\n      loader->vadvance     = advance_height;\n\n      if ( !loader->linear_def )\n      {\n        loader->linear_def = 1;\n        loader->linear     = advance_width;\n      }\n    }\n\n  Exit:\n    return;\n  }\n\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Translates an array of coordinates.                                   */\n  /*                                                                       */\n  static void\n  translate_array( FT_UInt     n,\n                   FT_Vector*  coords,\n                   FT_Pos      delta_x,\n                   FT_Pos      delta_y )\n  {\n    FT_UInt  k;\n\n\n    if ( delta_x )\n      for ( k = 0; k < n; k++ )\n        coords[k].x += delta_x;\n\n    if ( delta_y )\n      for ( k = 0; k < n; k++ )\n        coords[k].y += delta_y;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The following functions are used by default with TrueType fonts.      */\n  /* However, they can be replaced by alternatives if we need to support   */\n  /* TrueType-compressed formats (like MicroType) in the future.           */\n  /*                                                                       */\n  /*************************************************************************/\n\n  FT_CALLBACK_DEF( FT_Error )\n  TT_Access_Glyph_Frame( TT_Loader  loader,\n                         FT_UInt    glyph_index,\n                         FT_ULong   offset,\n                         FT_UInt    byte_count )\n  {\n    FT_Error   error;\n    FT_Stream  stream = loader->stream;\n\n    /* for non-debug mode */\n    FT_UNUSED( glyph_index );\n\n\n    FT_TRACE4(( \"Glyph %ld\\n\", glyph_index ));\n\n    /* the following line sets the `error' variable through macros! */\n    if ( FT_STREAM_SEEK( offset ) || FT_FRAME_ENTER( byte_count ) )\n      return error;\n\n    loader->cursor = stream->cursor;\n    loader->limit  = stream->limit;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  TT_Forget_Glyph_Frame( TT_Loader  loader )\n  {\n    FT_Stream  stream = loader->stream;\n\n\n    FT_FRAME_EXIT();\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  TT_Load_Glyph_Header( TT_Loader  loader )\n  {\n    FT_Byte*  p     = loader->cursor;\n    FT_Byte*  limit = loader->limit;\n\n\n    if ( p + 10 > limit )\n      return FT_THROW( Invalid_Outline );\n\n    loader->n_contours = FT_NEXT_SHORT( p );\n\n    loader->bbox.xMin = FT_NEXT_SHORT( p );\n    loader->bbox.yMin = FT_NEXT_SHORT( p );\n    loader->bbox.xMax = FT_NEXT_SHORT( p );\n    loader->bbox.yMax = FT_NEXT_SHORT( p );\n\n    FT_TRACE5(( \"  # of contours: %d\\n\", loader->n_contours ));\n    FT_TRACE5(( \"  xMin: %4d  xMax: %4d\\n\", loader->bbox.xMin,\n                                            loader->bbox.xMax ));\n    FT_TRACE5(( \"  yMin: %4d  yMax: %4d\\n\", loader->bbox.yMin,\n                                            loader->bbox.yMax ));\n    loader->cursor = p;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  TT_Load_Simple_Glyph( TT_Loader  load )\n  {\n    FT_Error        error;\n    FT_Byte*        p          = load->cursor;\n    FT_Byte*        limit      = load->limit;\n    FT_GlyphLoader  gloader    = load->gloader;\n    FT_Int          n_contours = load->n_contours;\n    FT_Outline*     outline;\n    FT_UShort       n_ins;\n    FT_Int          n_points;\n    FT_ULong        tmp;\n\n    FT_Byte         *flag, *flag_limit;\n    FT_Byte         c, count;\n    FT_Vector       *vec, *vec_limit;\n    FT_Pos          x;\n    FT_Short        *cont, *cont_limit, prev_cont;\n    FT_Int          xy_size = 0;\n\n\n    /* check that we can add the contours to the glyph */\n    error = FT_GLYPHLOADER_CHECK_POINTS( gloader, 0, n_contours );\n    if ( error )\n      goto Fail;\n\n    /* reading the contours' endpoints & number of points */\n    cont       = gloader->current.outline.contours;\n    cont_limit = cont + n_contours;\n\n    /* check space for contours array + instructions count */\n    if ( n_contours >= 0xFFF || p + ( n_contours + 1 ) * 2 > limit )\n      goto Invalid_Outline;\n\n    prev_cont = FT_NEXT_SHORT( p );\n\n    if ( n_contours > 0 )\n      cont[0] = prev_cont;\n\n    if ( prev_cont < 0 )\n      goto Invalid_Outline;\n\n    for ( cont++; cont < cont_limit; cont++ )\n    {\n      cont[0] = FT_NEXT_SHORT( p );\n      if ( cont[0] <= prev_cont )\n      {\n        /* unordered contours: this is invalid */\n        goto Invalid_Outline;\n      }\n      prev_cont = cont[0];\n    }\n\n    n_points = 0;\n    if ( n_contours > 0 )\n    {\n      n_points = cont[-1] + 1;\n      if ( n_points < 0 )\n        goto Invalid_Outline;\n    }\n\n    /* note that we will add four phantom points later */\n    error = FT_GLYPHLOADER_CHECK_POINTS( gloader, n_points + 4, 0 );\n    if ( error )\n      goto Fail;\n\n    /* reading the bytecode instructions */\n    load->glyph->control_len  = 0;\n    load->glyph->control_data = 0;\n\n    if ( p + 2 > limit )\n      goto Invalid_Outline;\n\n    n_ins = FT_NEXT_USHORT( p );\n\n    FT_TRACE5(( \"  Instructions size: %u\\n\", n_ins ));\n\n    /* check it */\n    if ( ( limit - p ) < n_ins )\n    {\n      FT_TRACE0(( \"TT_Load_Simple_Glyph: instruction count mismatch\\n\" ));\n      error = FT_THROW( Too_Many_Hints );\n      goto Fail;\n    }\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    if ( IS_HINTED( load->load_flags ) )\n    {\n      /* we don't trust `maxSizeOfInstructions' in the `maxp' table */\n      /* and thus update the bytecode array size by ourselves       */\n\n      tmp   = load->exec->glyphSize;\n      error = Update_Max( load->exec->memory,\n                          &tmp,\n                          sizeof ( FT_Byte ),\n                          (void*)&load->exec->glyphIns,\n                          n_ins );\n\n      load->exec->glyphSize = (FT_UShort)tmp;\n      if ( error )\n        return error;\n\n      load->glyph->control_len  = n_ins;\n      load->glyph->control_data = load->exec->glyphIns;\n\n      FT_MEM_COPY( load->exec->glyphIns, p, (FT_Long)n_ins );\n    }\n\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n    p += n_ins;\n\n    outline = &gloader->current.outline;\n\n    /* reading the point tags */\n    flag       = (FT_Byte*)outline->tags;\n    flag_limit = flag + n_points;\n\n    FT_ASSERT( flag != NULL );\n\n    while ( flag < flag_limit )\n    {\n      if ( p + 1 > limit )\n        goto Invalid_Outline;\n\n      *flag++ = c = FT_NEXT_BYTE( p );\n      if ( c & 8 )\n      {\n        if ( p + 1 > limit )\n          goto Invalid_Outline;\n\n        count = FT_NEXT_BYTE( p );\n        if ( flag + (FT_Int)count > flag_limit )\n          goto Invalid_Outline;\n\n        for ( ; count > 0; count-- )\n          *flag++ = c;\n      }\n    }\n\n    /* reading the X coordinates */\n\n    vec       = outline->points;\n    vec_limit = vec + n_points;\n    flag      = (FT_Byte*)outline->tags;\n    x         = 0;\n\n    if ( p + xy_size > limit )\n      goto Invalid_Outline;\n\n    for ( ; vec < vec_limit; vec++, flag++ )\n    {\n      FT_Pos   y = 0;\n      FT_Byte  f = *flag;\n\n\n      if ( f & 2 )\n      {\n        if ( p + 1 > limit )\n          goto Invalid_Outline;\n\n        y = (FT_Pos)FT_NEXT_BYTE( p );\n        if ( ( f & 16 ) == 0 )\n          y = -y;\n      }\n      else if ( ( f & 16 ) == 0 )\n      {\n        if ( p + 2 > limit )\n          goto Invalid_Outline;\n\n        y = (FT_Pos)FT_NEXT_SHORT( p );\n      }\n\n      x     += y;\n      vec->x = x;\n      /* the cast is for stupid compilers */\n      *flag  = (FT_Byte)( f & ~( 2 | 16 ) );\n    }\n\n    /* reading the Y coordinates */\n\n    vec       = gloader->current.outline.points;\n    vec_limit = vec + n_points;\n    flag      = (FT_Byte*)outline->tags;\n    x         = 0;\n\n    for ( ; vec < vec_limit; vec++, flag++ )\n    {\n      FT_Pos   y = 0;\n      FT_Byte  f = *flag;\n\n\n      if ( f & 4 )\n      {\n        if ( p + 1 > limit )\n          goto Invalid_Outline;\n\n        y = (FT_Pos)FT_NEXT_BYTE( p );\n        if ( ( f & 32 ) == 0 )\n          y = -y;\n      }\n      else if ( ( f & 32 ) == 0 )\n      {\n        if ( p + 2 > limit )\n          goto Invalid_Outline;\n\n        y = (FT_Pos)FT_NEXT_SHORT( p );\n      }\n\n      x     += y;\n      vec->y = x;\n      /* the cast is for stupid compilers */\n      *flag  = (FT_Byte)( f & FT_CURVE_TAG_ON );\n    }\n\n    outline->n_points   = (FT_UShort)n_points;\n    outline->n_contours = (FT_Short) n_contours;\n\n    load->cursor = p;\n\n  Fail:\n    return error;\n\n  Invalid_Outline:\n    error = FT_THROW( Invalid_Outline );\n    goto Fail;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  TT_Load_Composite_Glyph( TT_Loader  loader )\n  {\n    FT_Error        error;\n    FT_Byte*        p       = loader->cursor;\n    FT_Byte*        limit   = loader->limit;\n    FT_GlyphLoader  gloader = loader->gloader;\n    FT_SubGlyph     subglyph;\n    FT_UInt         num_subglyphs;\n\n\n    num_subglyphs = 0;\n\n    do\n    {\n      FT_Fixed  xx, xy, yy, yx;\n      FT_UInt   count;\n\n\n      /* check that we can load a new subglyph */\n      error = FT_GlyphLoader_CheckSubGlyphs( gloader, num_subglyphs + 1 );\n      if ( error )\n        goto Fail;\n\n      /* check space */\n      if ( p + 4 > limit )\n        goto Invalid_Composite;\n\n      subglyph = gloader->current.subglyphs + num_subglyphs;\n\n      subglyph->arg1 = subglyph->arg2 = 0;\n\n      subglyph->flags = FT_NEXT_USHORT( p );\n      subglyph->index = FT_NEXT_USHORT( p );\n\n      /* check space */\n      count = 2;\n      if ( subglyph->flags & ARGS_ARE_WORDS )\n        count += 2;\n      if ( subglyph->flags & WE_HAVE_A_SCALE )\n        count += 2;\n      else if ( subglyph->flags & WE_HAVE_AN_XY_SCALE )\n        count += 4;\n      else if ( subglyph->flags & WE_HAVE_A_2X2 )\n        count += 8;\n\n      if ( p + count > limit )\n        goto Invalid_Composite;\n\n      /* read arguments */\n      if ( subglyph->flags & ARGS_ARE_WORDS )\n      {\n        subglyph->arg1 = FT_NEXT_SHORT( p );\n        subglyph->arg2 = FT_NEXT_SHORT( p );\n      }\n      else\n      {\n        subglyph->arg1 = FT_NEXT_CHAR( p );\n        subglyph->arg2 = FT_NEXT_CHAR( p );\n      }\n\n      /* read transform */\n      xx = yy = 0x10000L;\n      xy = yx = 0;\n\n      if ( subglyph->flags & WE_HAVE_A_SCALE )\n      {\n        xx = (FT_Fixed)FT_NEXT_SHORT( p ) << 2;\n        yy = xx;\n      }\n      else if ( subglyph->flags & WE_HAVE_AN_XY_SCALE )\n      {\n        xx = (FT_Fixed)FT_NEXT_SHORT( p ) << 2;\n        yy = (FT_Fixed)FT_NEXT_SHORT( p ) << 2;\n      }\n      else if ( subglyph->flags & WE_HAVE_A_2X2 )\n      {\n        xx = (FT_Fixed)FT_NEXT_SHORT( p ) << 2;\n        yx = (FT_Fixed)FT_NEXT_SHORT( p ) << 2;\n        xy = (FT_Fixed)FT_NEXT_SHORT( p ) << 2;\n        yy = (FT_Fixed)FT_NEXT_SHORT( p ) << 2;\n      }\n\n      subglyph->transform.xx = xx;\n      subglyph->transform.xy = xy;\n      subglyph->transform.yx = yx;\n      subglyph->transform.yy = yy;\n\n      num_subglyphs++;\n\n    } while ( subglyph->flags & MORE_COMPONENTS );\n\n    gloader->current.num_subglyphs = num_subglyphs;\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    {\n      FT_Stream  stream = loader->stream;\n\n\n      /* we must undo the FT_FRAME_ENTER in order to point */\n      /* to the composite instructions, if we find some.   */\n      /* We will process them later.                       */\n      /*                                                   */\n      loader->ins_pos = (FT_ULong)( FT_STREAM_POS() +\n                                    p - limit );\n    }\n\n#endif\n\n    loader->cursor = p;\n\n  Fail:\n    return error;\n\n  Invalid_Composite:\n    error = FT_THROW( Invalid_Composite );\n    goto Fail;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  TT_Init_Glyph_Loading( TT_Face  face )\n  {\n    face->access_glyph_frame   = TT_Access_Glyph_Frame;\n    face->read_glyph_header    = TT_Load_Glyph_Header;\n    face->read_simple_glyph    = TT_Load_Simple_Glyph;\n    face->read_composite_glyph = TT_Load_Composite_Glyph;\n    face->forget_glyph_frame   = TT_Forget_Glyph_Frame;\n  }\n\n\n  static void\n  tt_prepare_zone( TT_GlyphZone  zone,\n                   FT_GlyphLoad  load,\n                   FT_UInt       start_point,\n                   FT_UInt       start_contour )\n  {\n    zone->n_points    = (FT_UShort)( load->outline.n_points - start_point );\n    zone->n_contours  = (FT_Short) ( load->outline.n_contours -\n                                       start_contour );\n    zone->org         = load->extra_points + start_point;\n    zone->cur         = load->outline.points + start_point;\n    zone->orus        = load->extra_points2 + start_point;\n    zone->tags        = (FT_Byte*)load->outline.tags + start_point;\n    zone->contours    = (FT_UShort*)load->outline.contours + start_contour;\n    zone->first_point = (FT_UShort)start_point;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Hint_Glyph                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Hint the glyph using the zone prepared by the caller.  Note that   */\n  /*    the zone is supposed to include four phantom points.               */\n  /*                                                                       */\n  static FT_Error\n  TT_Hint_Glyph( TT_Loader  loader,\n                 FT_Bool    is_composite )\n  {\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    TT_Face    face   = (TT_Face)loader->face;\n    TT_Driver  driver = (TT_Driver)FT_FACE_DRIVER( face );\n#endif\n\n    TT_GlyphZone  zone = &loader->zone;\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n    FT_UInt       n_ins;\n#else\n    FT_UNUSED( is_composite );\n#endif\n\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n    if ( loader->glyph->control_len > 0xFFFFL )\n    {\n      FT_TRACE1(( \"TT_Hint_Glyph: too long instructions\" ));\n      FT_TRACE1(( \" (0x%lx byte) is truncated\\n\",\n                 loader->glyph->control_len ));\n    }\n    n_ins = (FT_UInt)( loader->glyph->control_len );\n\n    /* save original point position in org */\n    if ( n_ins > 0 )\n      FT_ARRAY_COPY( zone->org, zone->cur, zone->n_points );\n\n    /* Reset graphics state. */\n    loader->exec->GS = ((TT_Size)loader->size)->GS;\n\n    /* XXX: UNDOCUMENTED! Hinting instructions of a composite glyph */\n    /*      completely refer to the (already) hinted subglyphs.     */\n    if ( is_composite )\n    {\n      loader->exec->metrics.x_scale = 1 << 16;\n      loader->exec->metrics.y_scale = 1 << 16;\n\n      FT_ARRAY_COPY( zone->orus, zone->cur, zone->n_points );\n    }\n    else\n    {\n      loader->exec->metrics.x_scale =\n        ((TT_Size)loader->size)->metrics.x_scale;\n      loader->exec->metrics.y_scale =\n        ((TT_Size)loader->size)->metrics.y_scale;\n    }\n#endif\n\n    /* round phantom points */\n    zone->cur[zone->n_points - 4].x =\n      FT_PIX_ROUND( zone->cur[zone->n_points - 4].x );\n    zone->cur[zone->n_points - 3].x =\n      FT_PIX_ROUND( zone->cur[zone->n_points - 3].x );\n    zone->cur[zone->n_points - 2].y =\n      FT_PIX_ROUND( zone->cur[zone->n_points - 2].y );\n    zone->cur[zone->n_points - 1].y =\n      FT_PIX_ROUND( zone->cur[zone->n_points - 1].y );\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    if ( n_ins > 0 )\n    {\n      FT_Bool   debug;\n      FT_Error  error;\n\n      FT_GlyphLoader  gloader         = loader->gloader;\n      FT_Outline      current_outline = gloader->current.outline;\n\n\n      TT_Set_CodeRange( loader->exec, tt_coderange_glyph,\n                        loader->exec->glyphIns, n_ins );\n\n      loader->exec->is_composite = is_composite;\n      loader->exec->pts          = *zone;\n\n      debug = FT_BOOL( !( loader->load_flags & FT_LOAD_NO_SCALE ) &&\n                       ((TT_Size)loader->size)->debug             );\n\n      error = TT_Run_Context( loader->exec, debug );\n      if ( error && loader->exec->pedantic_hinting )\n        return error;\n\n      /* store drop-out mode in bits 5-7; set bit 2 also as a marker */\n      current_outline.tags[0] |=\n        ( loader->exec->GS.scan_type << 5 ) | FT_CURVE_TAG_HAS_SCANMODE;\n    }\n\n#endif\n\n    /* save glyph phantom points */\n    loader->pp1 = zone->cur[zone->n_points - 4];\n    loader->pp2 = zone->cur[zone->n_points - 3];\n    loader->pp3 = zone->cur[zone->n_points - 2];\n    loader->pp4 = zone->cur[zone->n_points - 1];\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )\n    {\n      if ( loader->exec->sph_tweak_flags & SPH_TWEAK_DEEMBOLDEN )\n        FT_Outline_EmboldenXY( &loader->gloader->current.outline, -24, 0 );\n\n      else if ( loader->exec->sph_tweak_flags & SPH_TWEAK_EMBOLDEN )\n        FT_Outline_EmboldenXY( &loader->gloader->current.outline, 24, 0 );\n    }\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Process_Simple_Glyph                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Once a simple glyph has been loaded, it needs to be processed.     */\n  /*    Usually, this means scaling and hinting through bytecode           */\n  /*    interpretation.                                                    */\n  /*                                                                       */\n  static FT_Error\n  TT_Process_Simple_Glyph( TT_Loader  loader )\n  {\n    FT_GlyphLoader  gloader = loader->gloader;\n    FT_Error        error   = FT_Err_Ok;\n    FT_Outline*     outline;\n    FT_Int          n_points;\n\n\n    outline  = &gloader->current.outline;\n    n_points = outline->n_points;\n\n    /* set phantom points */\n\n    outline->points[n_points    ] = loader->pp1;\n    outline->points[n_points + 1] = loader->pp2;\n    outline->points[n_points + 2] = loader->pp3;\n    outline->points[n_points + 3] = loader->pp4;\n\n    outline->tags[n_points    ] = 0;\n    outline->tags[n_points + 1] = 0;\n    outline->tags[n_points + 2] = 0;\n    outline->tags[n_points + 3] = 0;\n\n    n_points += 4;\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n\n    if ( ((TT_Face)loader->face)->doblend )\n    {\n      /* Deltas apply to the unscaled data. */\n      FT_Vector*  deltas;\n      FT_Memory   memory = loader->face->memory;\n      FT_Int      i;\n\n\n      error = TT_Vary_Get_Glyph_Deltas( (TT_Face)(loader->face),\n                                        loader->glyph_index,\n                                        &deltas,\n                                        n_points );\n      if ( error )\n        return error;\n\n      for ( i = 0; i < n_points; ++i )\n      {\n        outline->points[i].x += deltas[i].x;\n        outline->points[i].y += deltas[i].y;\n      }\n\n      FT_FREE( deltas );\n    }\n\n#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */\n\n    if ( IS_HINTED( loader->load_flags ) )\n    {\n      tt_prepare_zone( &loader->zone, &gloader->current, 0, 0 );\n\n      FT_ARRAY_COPY( loader->zone.orus, loader->zone.cur,\n                     loader->zone.n_points + 4 );\n    }\n\n    {\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      TT_Face    face   = (TT_Face)loader->face;\n      TT_Driver  driver = (TT_Driver)FT_FACE_DRIVER( face );\n\n      FT_String*  family         = face->root.family_name;\n      FT_Int      ppem           = loader->size->metrics.x_ppem;\n      FT_String*  style          = face->root.style_name;\n      FT_Int      x_scale_factor = 1000;\n#endif\n\n      FT_Vector*  vec   = outline->points;\n      FT_Vector*  limit = outline->points + n_points;\n\n      FT_Fixed  x_scale = 0; /* pacify compiler */\n      FT_Fixed  y_scale = 0;\n\n      FT_Bool  do_scale = FALSE;\n\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n      if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )\n      {\n        /* scale, but only if enabled and only if TT hinting is being used */\n        if ( IS_HINTED( loader->load_flags ) )\n          x_scale_factor = sph_test_tweak_x_scaling( face,\n                                                     family,\n                                                     ppem,\n                                                     style,\n                                                     loader->glyph_index );\n        /* scale the glyph */\n        if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ||\n             x_scale_factor != 1000                         )\n        {\n          x_scale = FT_MulDiv( ((TT_Size)loader->size)->metrics.x_scale,\n                               x_scale_factor, 1000 );\n          y_scale = ((TT_Size)loader->size)->metrics.y_scale;\n\n          /* compensate for any scaling by de/emboldening; */\n          /* the amount was determined via experimentation */\n          if ( x_scale_factor != 1000 && ppem > 11 )\n            FT_Outline_EmboldenXY( outline,\n                                   FT_MulFix( 1280 * ppem,\n                                              1000 - x_scale_factor ),\n                                   0 );\n          do_scale = TRUE;\n        }\n      }\n      else\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n      {\n        /* scale the glyph */\n        if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )\n        {\n          x_scale = ((TT_Size)loader->size)->metrics.x_scale;\n          y_scale = ((TT_Size)loader->size)->metrics.y_scale;\n\n          do_scale = TRUE;\n        }\n      }\n\n      if ( do_scale )\n      {\n        for ( ; vec < limit; vec++ )\n        {\n          vec->x = FT_MulFix( vec->x, x_scale );\n          vec->y = FT_MulFix( vec->y, y_scale );\n        }\n\n        loader->pp1 = outline->points[n_points - 4];\n        loader->pp2 = outline->points[n_points - 3];\n        loader->pp3 = outline->points[n_points - 2];\n        loader->pp4 = outline->points[n_points - 1];\n      }\n    }\n\n    if ( IS_HINTED( loader->load_flags ) )\n    {\n      loader->zone.n_points += 4;\n\n      error = TT_Hint_Glyph( loader, 0 );\n    }\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Process_Composite_Component                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Once a composite component has been loaded, it needs to be         */\n  /*    processed.  Usually, this means transforming and translating.      */\n  /*                                                                       */\n  static FT_Error\n  TT_Process_Composite_Component( TT_Loader    loader,\n                                  FT_SubGlyph  subglyph,\n                                  FT_UInt      start_point,\n                                  FT_UInt      num_base_points )\n  {\n    FT_GlyphLoader  gloader    = loader->gloader;\n    FT_Vector*      base_vec   = gloader->base.outline.points;\n    FT_UInt         num_points = gloader->base.outline.n_points;\n    FT_Bool         have_scale;\n    FT_Pos          x, y;\n\n\n    have_scale = FT_BOOL( subglyph->flags & ( WE_HAVE_A_SCALE     |\n                                              WE_HAVE_AN_XY_SCALE |\n                                              WE_HAVE_A_2X2       ) );\n\n    /* perform the transform required for this subglyph */\n    if ( have_scale )\n    {\n      FT_UInt  i;\n\n\n      for ( i = num_base_points; i < num_points; i++ )\n        FT_Vector_Transform( base_vec + i, &subglyph->transform );\n    }\n\n    /* get offset */\n    if ( !( subglyph->flags & ARGS_ARE_XY_VALUES ) )\n    {\n      FT_UInt     k = subglyph->arg1;\n      FT_UInt     l = subglyph->arg2;\n      FT_Vector*  p1;\n      FT_Vector*  p2;\n\n\n      /* match l-th point of the newly loaded component to the k-th point */\n      /* of the previously loaded components.                             */\n\n      /* change to the point numbers used by our outline */\n      k += start_point;\n      l += num_base_points;\n      if ( k >= num_base_points ||\n           l >= num_points      )\n        return FT_THROW( Invalid_Composite );\n\n      p1 = gloader->base.outline.points + k;\n      p2 = gloader->base.outline.points + l;\n\n      x = p1->x - p2->x;\n      y = p1->y - p2->y;\n    }\n    else\n    {\n      x = subglyph->arg1;\n      y = subglyph->arg2;\n\n      if ( !x && !y )\n        return FT_Err_Ok;\n\n      /* Use a default value dependent on                                  */\n      /* TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED.  This is useful for old */\n      /* TT fonts which don't set the xxx_COMPONENT_OFFSET bit.            */\n\n      if ( have_scale &&\n#ifdef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED\n           !( subglyph->flags & UNSCALED_COMPONENT_OFFSET ) )\n#else\n            ( subglyph->flags & SCALED_COMPONENT_OFFSET ) )\n#endif\n      {\n\n#if 0\n\n        /*******************************************************************/\n        /*                                                                 */\n        /* This algorithm is what Apple documents.  But it doesn't work.   */\n        /*                                                                 */\n        int  a = subglyph->transform.xx > 0 ?  subglyph->transform.xx\n                                            : -subglyph->transform.xx;\n        int  b = subglyph->transform.yx > 0 ?  subglyph->transform.yx\n                                            : -subglyph->transform.yx;\n        int  c = subglyph->transform.xy > 0 ?  subglyph->transform.xy\n                                            : -subglyph->transform.xy;\n        int  d = subglyph->transform.yy > 0 ? subglyph->transform.yy\n                                            : -subglyph->transform.yy;\n        int  m = a > b ? a : b;\n        int  n = c > d ? c : d;\n\n\n        if ( a - b <= 33 && a - b >= -33 )\n          m *= 2;\n        if ( c - d <= 33 && c - d >= -33 )\n          n *= 2;\n        x = FT_MulFix( x, m );\n        y = FT_MulFix( y, n );\n\n#else /* 1 */\n\n        /*******************************************************************/\n        /*                                                                 */\n        /* This algorithm is a guess and works much better than the above. */\n        /*                                                                 */\n        FT_Fixed  mac_xscale = FT_Hypot( subglyph->transform.xx,\n                                         subglyph->transform.xy );\n        FT_Fixed  mac_yscale = FT_Hypot( subglyph->transform.yy,\n                                         subglyph->transform.yx );\n\n\n        x = FT_MulFix( x, mac_xscale );\n        y = FT_MulFix( y, mac_yscale );\n\n#endif /* 1 */\n\n      }\n\n      if ( !( loader->load_flags & FT_LOAD_NO_SCALE ) )\n      {\n        FT_Fixed  x_scale = ((TT_Size)loader->size)->metrics.x_scale;\n        FT_Fixed  y_scale = ((TT_Size)loader->size)->metrics.y_scale;\n\n\n        x = FT_MulFix( x, x_scale );\n        y = FT_MulFix( y, y_scale );\n\n        if ( subglyph->flags & ROUND_XY_TO_GRID )\n        {\n          x = FT_PIX_ROUND( x );\n          y = FT_PIX_ROUND( y );\n        }\n      }\n    }\n\n    if ( x || y )\n      translate_array( num_points - num_base_points,\n                       base_vec + num_base_points,\n                       x, y );\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Process_Composite_Glyph                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This is slightly different from TT_Process_Simple_Glyph, in that   */\n  /*    its sole purpose is to hint the glyph.  Thus this function is      */\n  /*    only available when bytecode interpreter is enabled.               */\n  /*                                                                       */\n  static FT_Error\n  TT_Process_Composite_Glyph( TT_Loader  loader,\n                              FT_UInt    start_point,\n                              FT_UInt    start_contour )\n  {\n    FT_Error     error;\n    FT_Outline*  outline;\n    FT_UInt      i;\n\n\n    outline = &loader->gloader->base.outline;\n\n    /* make room for phantom points */\n    error = FT_GLYPHLOADER_CHECK_POINTS( loader->gloader,\n                                         outline->n_points + 4,\n                                         0 );\n    if ( error )\n      return error;\n\n    outline->points[outline->n_points    ] = loader->pp1;\n    outline->points[outline->n_points + 1] = loader->pp2;\n    outline->points[outline->n_points + 2] = loader->pp3;\n    outline->points[outline->n_points + 3] = loader->pp4;\n\n    outline->tags[outline->n_points    ] = 0;\n    outline->tags[outline->n_points + 1] = 0;\n    outline->tags[outline->n_points + 2] = 0;\n    outline->tags[outline->n_points + 3] = 0;\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    {\n      FT_Stream  stream = loader->stream;\n      FT_UShort  n_ins, max_ins;\n      FT_ULong   tmp;\n\n\n      /* TT_Load_Composite_Glyph only gives us the offset of instructions */\n      /* so we read them here                                             */\n      if ( FT_STREAM_SEEK( loader->ins_pos ) ||\n           FT_READ_USHORT( n_ins )           )\n        return error;\n\n      FT_TRACE5(( \"  Instructions size = %d\\n\", n_ins ));\n\n      /* check it */\n      max_ins = ((TT_Face)loader->face)->max_profile.maxSizeOfInstructions;\n      if ( n_ins > max_ins )\n      {\n        /* don't trust `maxSizeOfInstructions'; */\n        /* only do a rough safety check         */\n        if ( (FT_Int)n_ins > loader->byte_len )\n        {\n          FT_TRACE1(( \"TT_Process_Composite_Glyph:\"\n                      \" too many instructions (%d) for glyph with length %d\\n\",\n                      n_ins, loader->byte_len ));\n          return FT_THROW( Too_Many_Hints );\n        }\n\n        tmp   = loader->exec->glyphSize;\n        error = Update_Max( loader->exec->memory,\n                            &tmp,\n                            sizeof ( FT_Byte ),\n                            (void*)&loader->exec->glyphIns,\n                            n_ins );\n\n        loader->exec->glyphSize = (FT_UShort)tmp;\n        if ( error )\n          return error;\n      }\n      else if ( n_ins == 0 )\n        return FT_Err_Ok;\n\n      if ( FT_STREAM_READ( loader->exec->glyphIns, n_ins ) )\n        return error;\n\n      loader->glyph->control_data = loader->exec->glyphIns;\n      loader->glyph->control_len  = n_ins;\n    }\n\n#endif\n\n    tt_prepare_zone( &loader->zone, &loader->gloader->base,\n                     start_point, start_contour );\n\n    /* Some points are likely touched during execution of  */\n    /* instructions on components.  So let's untouch them. */\n    for ( i = 0; i < loader->zone.n_points; i++ )\n      loader->zone.tags[i] &= ~FT_CURVE_TAG_TOUCH_BOTH;\n\n    loader->zone.n_points += 4;\n\n    return TT_Hint_Glyph( loader, 1 );\n  }\n\n\n  /*\n   * Calculate the phantom points\n   *\n   * Defining the right side bearing (rsb) as\n   *\n   *   rsb = aw - (lsb + xmax - xmin)\n   *\n   * (with `aw' the advance width, `lsb' the left side bearing, and `xmin'\n   * and `xmax' the glyph's minimum and maximum x value), the OpenType\n   * specification defines the initial position of horizontal phantom points\n   * as\n   *\n   *   pp1 = (round(xmin - lsb), 0)      ,\n   *   pp2 = (round(pp1 + aw), 0)        .\n   *\n   * Note that the rounding to the grid (in the device space) is not\n   * documented currently in the specification.\n   *\n   * However, the specification lacks the precise definition of vertical\n   * phantom points.  Greg Hitchcock provided the following explanation.\n   *\n   * - a `vmtx' table is present\n   *\n   *   For any glyph, the minimum and maximum y values (`ymin' and `ymax')\n   *   are given in the `glyf' table, the top side bearing (tsb) and advance\n   *   height (ah) are given in the `vmtx' table.  The bottom side bearing\n   *   (bsb) is then calculated as\n   *\n   *     bsb = ah - (tsb + ymax - ymin)       ,\n   *\n   *   and the initial position of vertical phantom points is\n   *\n   *     pp3 = (x, round(ymax + tsb))       ,\n   *     pp4 = (x, round(pp3 - ah))         .\n   *\n   *   See below for value `x'.\n   *\n   * - no `vmtx' table in the font\n   *\n   *   If there is an `OS/2' table, we set\n   *\n   *     DefaultAscender = sTypoAscender       ,\n   *     DefaultDescender = sTypoDescender     ,\n   *\n   *   otherwise we use data from the `hhea' table:\n   *\n   *     DefaultAscender = Ascender         ,\n   *     DefaultDescender = Descender       .\n   *\n   *   With these two variables we can now set\n   *\n   *     ah = DefaultAscender - sDefaultDescender    ,\n   *     tsb = DefaultAscender - yMax                ,\n   *\n   *   and proceed as if a `vmtx' table was present.\n   *\n   * Usually we have\n   *\n   *   x = aw / 2      ,                                                (1)\n   *\n   * but there is one compatibility case where it can be set to\n   *\n   *   x = -DefaultDescender -\n   *         ((DefaultAscender - DefaultDescender - aw) / 2)     .      (2)\n   *\n   * and another one with\n   *\n   *   x = 0     .                                                      (3)\n   *\n   * In Windows, the history of those values is quite complicated,\n   * depending on the hinting engine (that is, the graphics framework).\n   *\n   *   framework        from                 to       formula\n   *  ----------------------------------------------------------\n   *    GDI       Windows 98               current      (1)\n   *              (Windows 2000 for NT)\n   *    GDI+      Windows XP               Windows 7    (2)\n   *    GDI+      Windows 8                current      (3)\n   *    DWrite    Windows 7                current      (3)\n   *\n   * For simplicity, FreeType uses (1) for grayscale subpixel hinting and\n   * (3) for everything else.\n   *\n   */\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n#define TT_LOADER_SET_PP( loader )                                          \\\n          do                                                                \\\n          {                                                                 \\\n            FT_Bool  subpixel_  = loader->exec ? loader->exec->subpixel     \\\n                                               : 0;                         \\\n            FT_Bool  grayscale_ = loader->exec ? loader->exec->grayscale    \\\n                                               : 0;                         \\\n            FT_Bool  use_aw_2_  = (FT_Bool)( subpixel_ && grayscale_ );     \\\n                                                                            \\\n                                                                            \\\n            (loader)->pp1.x = (loader)->bbox.xMin - (loader)->left_bearing; \\\n            (loader)->pp1.y = 0;                                            \\\n            (loader)->pp2.x = (loader)->pp1.x + (loader)->advance;          \\\n            (loader)->pp2.y = 0;                                            \\\n                                                                            \\\n            (loader)->pp3.x = use_aw_2_ ? (loader)->advance / 2 : 0;        \\\n            (loader)->pp3.y = (loader)->bbox.yMax + (loader)->top_bearing;  \\\n            (loader)->pp4.x = use_aw_2_ ? (loader)->advance / 2 : 0;        \\\n            (loader)->pp4.y = (loader)->pp3.y - (loader)->vadvance;         \\\n          } while ( 0 )\n\n#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n#define TT_LOADER_SET_PP( loader )                                          \\\n          do                                                                \\\n          {                                                                 \\\n            (loader)->pp1.x = (loader)->bbox.xMin - (loader)->left_bearing; \\\n            (loader)->pp1.y = 0;                                            \\\n            (loader)->pp2.x = (loader)->pp1.x + (loader)->advance;          \\\n            (loader)->pp2.y = 0;                                            \\\n                                                                            \\\n            (loader)->pp3.x = 0;                                            \\\n            (loader)->pp3.y = (loader)->bbox.yMax + (loader)->top_bearing;  \\\n            (loader)->pp4.x = 0;                                            \\\n            (loader)->pp4.y = (loader)->pp3.y - (loader)->vadvance;         \\\n          } while ( 0 )\n\n#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    load_truetype_glyph                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Loads a given truetype glyph.  Handles composites and uses a       */\n  /*    TT_Loader object.                                                  */\n  /*                                                                       */\n  static FT_Error\n  load_truetype_glyph( TT_Loader  loader,\n                       FT_UInt    glyph_index,\n                       FT_UInt    recurse_count,\n                       FT_Bool    header_only )\n  {\n    FT_Error        error        = FT_Err_Ok;\n    FT_Fixed        x_scale, y_scale;\n    FT_ULong        offset;\n    TT_Face         face         = (TT_Face)loader->face;\n    FT_GlyphLoader  gloader      = loader->gloader;\n    FT_Bool         opened_frame = 0;\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n    FT_Vector*      deltas       = NULL;\n#endif\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    FT_StreamRec    inc_stream;\n    FT_Data         glyph_data;\n    FT_Bool         glyph_data_loaded = 0;\n#endif\n\n\n    /* some fonts have an incorrect value of `maxComponentDepth', */\n    /* thus we allow depth 1 to catch the majority of them        */\n    if ( recurse_count > 1                                   &&\n         recurse_count > face->max_profile.maxComponentDepth )\n    {\n      error = FT_THROW( Invalid_Composite );\n      goto Exit;\n    }\n\n    /* check glyph index */\n    if ( glyph_index >= (FT_UInt)face->root.num_glyphs )\n    {\n      error = FT_THROW( Invalid_Glyph_Index );\n      goto Exit;\n    }\n\n    loader->glyph_index = glyph_index;\n\n    if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )\n    {\n      x_scale = ((TT_Size)loader->size)->metrics.x_scale;\n      y_scale = ((TT_Size)loader->size)->metrics.y_scale;\n    }\n    else\n    {\n      x_scale = 0x10000L;\n      y_scale = 0x10000L;\n    }\n\n    /* Set `offset' to the start of the glyph relative to the start of */\n    /* the `glyf' table, and `byte_len' to the length of the glyph in  */\n    /* bytes.                                                          */\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n    /* If we are loading glyph data via the incremental interface, set */\n    /* the loader stream to a memory stream reading the data returned  */\n    /* by the interface.                                               */\n    if ( face->root.internal->incremental_interface )\n    {\n      error = face->root.internal->incremental_interface->funcs->get_glyph_data(\n                face->root.internal->incremental_interface->object,\n                glyph_index, &glyph_data );\n      if ( error )\n        goto Exit;\n\n      glyph_data_loaded = 1;\n      offset            = 0;\n      loader->byte_len  = glyph_data.length;\n\n      FT_MEM_ZERO( &inc_stream, sizeof ( inc_stream ) );\n      FT_Stream_OpenMemory( &inc_stream,\n                            glyph_data.pointer, glyph_data.length );\n\n      loader->stream = &inc_stream;\n    }\n    else\n\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n      offset = tt_face_get_location( face, glyph_index,\n                                     (FT_UInt*)&loader->byte_len );\n\n    if ( loader->byte_len > 0 )\n    {\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n      /* for the incremental interface, `glyf_offset' is always zero */\n      if ( !loader->glyf_offset                        &&\n           !face->root.internal->incremental_interface )\n#else\n      if ( !loader->glyf_offset )\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n      {\n        FT_TRACE2(( \"no `glyf' table but non-zero `loca' entry\\n\" ));\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n\n      error = face->access_glyph_frame( loader, glyph_index,\n                                        loader->glyf_offset + offset,\n                                        loader->byte_len );\n      if ( error )\n        goto Exit;\n\n      opened_frame = 1;\n\n      /* read glyph header first */\n      error = face->read_glyph_header( loader );\n      if ( error )\n        goto Exit;\n\n      /* the metrics must be computed after loading the glyph header */\n      /* since we need the glyph's `yMax' value in case the vertical */\n      /* metrics must be emulated                                    */\n      error = tt_get_metrics( loader, glyph_index );\n      if ( error )\n        goto Exit;\n\n      if ( header_only )\n        goto Exit;\n    }\n\n    if ( loader->byte_len == 0 || loader->n_contours == 0 )\n    {\n      loader->bbox.xMin = 0;\n      loader->bbox.xMax = 0;\n      loader->bbox.yMin = 0;\n      loader->bbox.yMax = 0;\n\n      error = tt_get_metrics( loader, glyph_index );\n      if ( error )\n        goto Exit;\n\n      if ( header_only )\n        goto Exit;\n\n      /* must initialize points before (possibly) overriding */\n      /* glyph metrics from the incremental interface        */\n      TT_LOADER_SET_PP( loader );\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n      tt_get_metrics_incr_overrides( loader, glyph_index );\n#endif\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n\n      if ( ((TT_Face)(loader->face))->doblend )\n      {\n        /* this must be done before scaling */\n        FT_Memory  memory = loader->face->memory;\n\n\n        error = TT_Vary_Get_Glyph_Deltas( (TT_Face)(loader->face),\n                                          glyph_index, &deltas, 4 );\n        if ( error )\n          goto Exit;\n\n        loader->pp1.x += deltas[0].x;\n        loader->pp1.y += deltas[0].y;\n        loader->pp2.x += deltas[1].x;\n        loader->pp2.y += deltas[1].y;\n\n        loader->pp3.x += deltas[2].x;\n        loader->pp3.y += deltas[2].y;\n        loader->pp4.x += deltas[3].x;\n        loader->pp4.y += deltas[3].y;\n\n        FT_FREE( deltas );\n      }\n\n#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */\n\n      /* scale phantom points, if necessary; */\n      /* they get rounded in `TT_Hint_Glyph' */\n      if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )\n      {\n        loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );\n        loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );\n        /* pp1.y and pp2.y are always zero */\n\n        loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale );\n        loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );\n        loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale );\n        loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );\n      }\n\n      error = FT_Err_Ok;\n      goto Exit;\n    }\n\n    /* must initialize phantom points before (possibly) overriding */\n    /* glyph metrics from the incremental interface                */\n    TT_LOADER_SET_PP( loader );\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    tt_get_metrics_incr_overrides( loader, glyph_index );\n#endif\n\n    /***********************************************************************/\n    /***********************************************************************/\n    /***********************************************************************/\n\n    /* if it is a simple glyph, load it */\n\n    if ( loader->n_contours > 0 )\n    {\n      error = face->read_simple_glyph( loader );\n      if ( error )\n        goto Exit;\n\n      /* all data have been read */\n      face->forget_glyph_frame( loader );\n      opened_frame = 0;\n\n      error = TT_Process_Simple_Glyph( loader );\n      if ( error )\n        goto Exit;\n\n      FT_GlyphLoader_Add( gloader );\n    }\n\n    /***********************************************************************/\n    /***********************************************************************/\n    /***********************************************************************/\n\n    /* otherwise, load a composite! */\n    else if ( loader->n_contours == -1 )\n    {\n      FT_UInt   start_point;\n      FT_UInt   start_contour;\n      FT_ULong  ins_pos;  /* position of composite instructions, if any */\n\n\n      start_point   = gloader->base.outline.n_points;\n      start_contour = gloader->base.outline.n_contours;\n\n      /* for each subglyph, read composite header */\n      error = face->read_composite_glyph( loader );\n      if ( error )\n        goto Exit;\n\n      /* store the offset of instructions */\n      ins_pos = loader->ins_pos;\n\n      /* all data we need are read */\n      face->forget_glyph_frame( loader );\n      opened_frame = 0;\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n\n      if ( face->doblend )\n      {\n        FT_Int       i, limit;\n        FT_SubGlyph  subglyph;\n        FT_Memory    memory = face->root.memory;\n\n\n        /* this provides additional offsets */\n        /* for each component's translation */\n\n        if ( ( error = TT_Vary_Get_Glyph_Deltas(\n                         face,\n                         glyph_index,\n                         &deltas,\n                         gloader->current.num_subglyphs + 4 ) ) != 0 )\n          goto Exit;\n\n        subglyph = gloader->current.subglyphs + gloader->base.num_subglyphs;\n        limit    = gloader->current.num_subglyphs;\n\n        for ( i = 0; i < limit; ++i, ++subglyph )\n        {\n          if ( subglyph->flags & ARGS_ARE_XY_VALUES )\n          {\n            /* XXX: overflow check for subglyph->{arg1,arg2}.   */\n            /* deltas[i].{x,y} must be within signed 16-bit,    */\n            /* but the restriction of summed delta is not clear */\n            subglyph->arg1 += (FT_Int16)deltas[i].x;\n            subglyph->arg2 += (FT_Int16)deltas[i].y;\n          }\n        }\n\n        loader->pp1.x += deltas[i + 0].x;\n        loader->pp1.y += deltas[i + 0].y;\n        loader->pp2.x += deltas[i + 1].x;\n        loader->pp2.y += deltas[i + 1].y;\n\n        loader->pp3.x += deltas[i + 2].x;\n        loader->pp3.y += deltas[i + 2].y;\n        loader->pp4.x += deltas[i + 3].x;\n        loader->pp4.y += deltas[i + 3].y;\n\n        FT_FREE( deltas );\n      }\n\n#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */\n\n      /* scale phantom points, if necessary; */\n      /* they get rounded in `TT_Hint_Glyph' */\n      if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )\n      {\n        loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );\n        loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );\n        /* pp1.y and pp2.y are always zero */\n\n        loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale );\n        loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );\n        loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale );\n        loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );\n      }\n\n      /* if the flag FT_LOAD_NO_RECURSE is set, we return the subglyph */\n      /* `as is' in the glyph slot (the client application will be     */\n      /* responsible for interpreting these data)...                   */\n      if ( loader->load_flags & FT_LOAD_NO_RECURSE )\n      {\n        FT_GlyphLoader_Add( gloader );\n        loader->glyph->format = FT_GLYPH_FORMAT_COMPOSITE;\n\n        goto Exit;\n      }\n\n      /*********************************************************************/\n      /*********************************************************************/\n      /*********************************************************************/\n\n      {\n        FT_UInt      n, num_base_points;\n        FT_SubGlyph  subglyph       = 0;\n\n        FT_UInt      num_points     = start_point;\n        FT_UInt      num_subglyphs  = gloader->current.num_subglyphs;\n        FT_UInt      num_base_subgs = gloader->base.num_subglyphs;\n\n        FT_Stream    old_stream     = loader->stream;\n        FT_Int       old_byte_len   = loader->byte_len;\n\n\n        FT_GlyphLoader_Add( gloader );\n\n        /* read each subglyph independently */\n        for ( n = 0; n < num_subglyphs; n++ )\n        {\n          FT_Vector  pp[4];\n\n\n          /* Each time we call load_truetype_glyph in this loop, the   */\n          /* value of `gloader.base.subglyphs' can change due to table */\n          /* reallocations.  We thus need to recompute the subglyph    */\n          /* pointer on each iteration.                                */\n          subglyph = gloader->base.subglyphs + num_base_subgs + n;\n\n          pp[0] = loader->pp1;\n          pp[1] = loader->pp2;\n          pp[2] = loader->pp3;\n          pp[3] = loader->pp4;\n\n          num_base_points = gloader->base.outline.n_points;\n\n          error = load_truetype_glyph( loader, subglyph->index,\n                                       recurse_count + 1, FALSE );\n          if ( error )\n            goto Exit;\n\n          /* restore subglyph pointer */\n          subglyph = gloader->base.subglyphs + num_base_subgs + n;\n\n          /* restore phantom points if necessary */\n          if ( !( subglyph->flags & USE_MY_METRICS ) )\n          {\n            loader->pp1 = pp[0];\n            loader->pp2 = pp[1];\n            loader->pp3 = pp[2];\n            loader->pp4 = pp[3];\n          }\n\n          num_points = gloader->base.outline.n_points;\n\n          if ( num_points == num_base_points )\n            continue;\n\n          /* gloader->base.outline consists of three parts:               */\n          /* 0 -(1)-> start_point -(2)-> num_base_points -(3)-> n_points. */\n          /*                                                              */\n          /* (1): exists from the beginning                               */\n          /* (2): components that have been loaded so far                 */\n          /* (3): the newly loaded component                              */\n          error = TT_Process_Composite_Component( loader,\n                                                  subglyph,\n                                                  start_point,\n                                                  num_base_points );\n          if ( error )\n            goto Exit;\n        }\n\n        loader->stream   = old_stream;\n        loader->byte_len = old_byte_len;\n\n        /* process the glyph */\n        loader->ins_pos = ins_pos;\n        if ( IS_HINTED( loader->load_flags ) &&\n#ifdef TT_USE_BYTECODE_INTERPRETER\n             subglyph->flags & WE_HAVE_INSTR &&\n#endif\n             num_points > start_point )\n        {\n          error = TT_Process_Composite_Glyph( loader,\n                                              start_point,\n                                              start_contour );\n          if ( error )\n            goto Exit;\n        }\n      }\n    }\n    else\n    {\n      /* invalid composite count (negative but not -1) */\n      error = FT_THROW( Invalid_Outline );\n      goto Exit;\n    }\n\n    /***********************************************************************/\n    /***********************************************************************/\n    /***********************************************************************/\n\n  Exit:\n\n    if ( opened_frame )\n      face->forget_glyph_frame( loader );\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n    if ( glyph_data_loaded )\n      face->root.internal->incremental_interface->funcs->free_glyph_data(\n        face->root.internal->incremental_interface->object,\n        &glyph_data );\n\n#endif\n\n    return error;\n  }\n\n\n  static FT_Error\n  compute_glyph_metrics( TT_Loader  loader,\n                         FT_UInt    glyph_index )\n  {\n    TT_Face    face   = (TT_Face)loader->face;\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    TT_Driver  driver = (TT_Driver)FT_FACE_DRIVER( face );\n#endif\n\n    FT_BBox       bbox;\n    FT_Fixed      y_scale;\n    TT_GlyphSlot  glyph = loader->glyph;\n    TT_Size       size  = (TT_Size)loader->size;\n\n\n    y_scale = 0x10000L;\n    if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )\n      y_scale = size->root.metrics.y_scale;\n\n    if ( glyph->format != FT_GLYPH_FORMAT_COMPOSITE )\n      FT_Outline_Get_CBox( &glyph->outline, &bbox );\n    else\n      bbox = loader->bbox;\n\n    /* get the device-independent horizontal advance; it is scaled later */\n    /* by the base layer.                                                */\n    glyph->linearHoriAdvance = loader->linear;\n\n    glyph->metrics.horiBearingX = bbox.xMin;\n    glyph->metrics.horiBearingY = bbox.yMax;\n    glyph->metrics.horiAdvance  = loader->pp2.x - loader->pp1.x;\n\n    /* adjust advance width to the value contained in the hdmx table */\n    if ( !face->postscript.isFixedPitch  &&\n         IS_HINTED( loader->load_flags ) )\n    {\n      FT_Byte*  widthp;\n\n\n      widthp = tt_face_get_device_metrics( face,\n                                           size->root.metrics.x_ppem,\n                                           glyph_index );\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n      if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )\n      {\n        FT_Bool  ignore_x_mode;\n\n\n        ignore_x_mode = FT_BOOL( FT_LOAD_TARGET_MODE( loader->load_flags ) !=\n                                 FT_RENDER_MODE_MONO );\n\n        if ( widthp                                                   &&\n             ( ( ignore_x_mode && loader->exec->compatible_widths ) ||\n                !ignore_x_mode                                      ||\n                SPH_OPTION_BITMAP_WIDTHS                            ) )\n          glyph->metrics.horiAdvance = *widthp << 6;\n      }\n      else\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n      {\n        if ( widthp )\n          glyph->metrics.horiAdvance = *widthp << 6;\n      }\n    }\n\n    /* set glyph dimensions */\n    glyph->metrics.width  = bbox.xMax - bbox.xMin;\n    glyph->metrics.height = bbox.yMax - bbox.yMin;\n\n    /* Now take care of vertical metrics.  In the case where there is */\n    /* no vertical information within the font (relatively common),   */\n    /* create some metrics manually                                   */\n    {\n      FT_Pos  top;      /* scaled vertical top side bearing  */\n      FT_Pos  advance;  /* scaled vertical advance height    */\n\n\n      /* Get the unscaled top bearing and advance height. */\n      if ( face->vertical_info                   &&\n           face->vertical.number_Of_VMetrics > 0 )\n      {\n        top = (FT_Short)FT_DivFix( loader->pp3.y - bbox.yMax,\n                                   y_scale );\n\n        if ( loader->pp3.y <= loader->pp4.y )\n          advance = 0;\n        else\n          advance = (FT_UShort)FT_DivFix( loader->pp3.y - loader->pp4.y,\n                                          y_scale );\n      }\n      else\n      {\n        FT_Pos  height;\n\n\n        /* XXX Compute top side bearing and advance height in  */\n        /*     Get_VMetrics instead of here.                   */\n\n        /* NOTE: The OS/2 values are the only `portable' ones, */\n        /*       which is why we use them, if there is an OS/2 */\n        /*       table in the font.  Otherwise, we use the     */\n        /*       values defined in the horizontal header.      */\n\n        height = (FT_Short)FT_DivFix( bbox.yMax - bbox.yMin,\n                                      y_scale );\n        if ( face->os2.version != 0xFFFFU )\n          advance = (FT_Pos)( face->os2.sTypoAscender -\n                              face->os2.sTypoDescender );\n        else\n          advance = (FT_Pos)( face->horizontal.Ascender -\n                              face->horizontal.Descender );\n\n        top = ( advance - height ) / 2;\n      }\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n      {\n        FT_Incremental_InterfaceRec*  incr;\n        FT_Incremental_MetricsRec     metrics;\n        FT_Error                      error;\n\n\n        incr = face->root.internal->incremental_interface;\n\n        /* If this is an incrementally loaded font see if there are */\n        /* overriding metrics for this glyph.                       */\n        if ( incr && incr->funcs->get_glyph_metrics )\n        {\n          metrics.bearing_x = 0;\n          metrics.bearing_y = top;\n          metrics.advance   = advance;\n\n          error = incr->funcs->get_glyph_metrics( incr->object,\n                                                  glyph_index,\n                                                  TRUE,\n                                                  &metrics );\n          if ( error )\n            return error;\n\n          top     = metrics.bearing_y;\n          advance = metrics.advance;\n        }\n      }\n\n      /* GWW: Do vertical metrics get loaded incrementally too? */\n\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n      glyph->linearVertAdvance = advance;\n\n      /* scale the metrics */\n      if ( !( loader->load_flags & FT_LOAD_NO_SCALE ) )\n      {\n        top     = FT_MulFix( top,     y_scale );\n        advance = FT_MulFix( advance, y_scale );\n      }\n\n      /* XXX: for now, we have no better algorithm for the lsb, but it */\n      /*      should work fine.                                        */\n      /*                                                               */\n      glyph->metrics.vertBearingX = glyph->metrics.horiBearingX -\n                                      glyph->metrics.horiAdvance / 2;\n      glyph->metrics.vertBearingY = top;\n      glyph->metrics.vertAdvance  = advance;\n    }\n\n    return 0;\n  }\n\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n  static FT_Error\n  load_sbit_image( TT_Size       size,\n                   TT_GlyphSlot  glyph,\n                   FT_UInt       glyph_index,\n                   FT_Int32      load_flags )\n  {\n    TT_Face             face;\n    SFNT_Service        sfnt;\n    FT_Stream           stream;\n    FT_Error            error;\n    TT_SBit_MetricsRec  metrics;\n\n\n    face   = (TT_Face)glyph->face;\n    sfnt   = (SFNT_Service)face->sfnt;\n    stream = face->root.stream;\n\n    error = sfnt->load_sbit_image( face,\n                                   size->strike_index,\n                                   glyph_index,\n                                   (FT_Int)load_flags,\n                                   stream,\n                                   &glyph->bitmap,\n                                   &metrics );\n    if ( !error )\n    {\n      glyph->outline.n_points   = 0;\n      glyph->outline.n_contours = 0;\n\n      glyph->metrics.width  = (FT_Pos)metrics.width  << 6;\n      glyph->metrics.height = (FT_Pos)metrics.height << 6;\n\n      glyph->metrics.horiBearingX = (FT_Pos)metrics.horiBearingX << 6;\n      glyph->metrics.horiBearingY = (FT_Pos)metrics.horiBearingY << 6;\n      glyph->metrics.horiAdvance  = (FT_Pos)metrics.horiAdvance  << 6;\n\n      glyph->metrics.vertBearingX = (FT_Pos)metrics.vertBearingX << 6;\n      glyph->metrics.vertBearingY = (FT_Pos)metrics.vertBearingY << 6;\n      glyph->metrics.vertAdvance  = (FT_Pos)metrics.vertAdvance  << 6;\n\n      glyph->format = FT_GLYPH_FORMAT_BITMAP;\n\n      if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )\n      {\n        glyph->bitmap_left = metrics.vertBearingX;\n        glyph->bitmap_top  = metrics.vertBearingY;\n      }\n      else\n      {\n        glyph->bitmap_left = metrics.horiBearingX;\n        glyph->bitmap_top  = metrics.horiBearingY;\n      }\n    }\n\n    return error;\n  }\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n\n  static FT_Error\n  tt_loader_init( TT_Loader     loader,\n                  TT_Size       size,\n                  TT_GlyphSlot  glyph,\n                  FT_Int32      load_flags,\n                  FT_Bool       glyf_table_only )\n  {\n    FT_Error  error;\n\n    TT_Face    face;\n    FT_Stream  stream;\n#ifdef TT_USE_BYTECODE_INTERPRETER\n    FT_Bool    pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );\n#endif\n\n\n    face   = (TT_Face)glyph->face;\n    stream = face->root.stream;\n\n    FT_MEM_ZERO( loader, sizeof ( TT_LoaderRec ) );\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    /* load execution context */\n    if ( IS_HINTED( load_flags ) && !glyf_table_only )\n    {\n      TT_ExecContext  exec;\n      FT_Bool         grayscale;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      TT_Driver  driver = (TT_Driver)FT_FACE_DRIVER( face );\n\n      FT_Bool  subpixel = FALSE;\n\n#if 0\n      /* not used yet */\n      FT_Bool  compatible_widths;\n      FT_Bool  symmetrical_smoothing;\n      FT_Bool  bgr;\n      FT_Bool  subpixel_positioned;\n#endif\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n      FT_Bool  reexecute = FALSE;\n\n\n      if ( size->bytecode_ready < 0 || size->cvt_ready < 0 )\n      {\n        error = tt_size_ready_bytecode( size, pedantic );\n        if ( error )\n          return error;\n      }\n      else if ( size->bytecode_ready )\n        return size->bytecode_ready;\n      else if ( size->cvt_ready )\n        return size->cvt_ready;\n\n      /* query new execution context */\n      exec = size->debug ? size->context\n                         : ( (TT_Driver)FT_FACE_DRIVER( face ) )->context;\n      if ( !exec )\n        return FT_THROW( Could_Not_Find_Context );\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n      if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )\n      {\n        subpixel = FT_BOOL( ( FT_LOAD_TARGET_MODE( load_flags ) !=\n                              FT_RENDER_MODE_MONO               )  &&\n                            SPH_OPTION_SET_SUBPIXEL                );\n\n        if ( subpixel )\n          grayscale = FALSE;\n        else if ( SPH_OPTION_SET_GRAYSCALE )\n        {\n          grayscale = TRUE;\n          subpixel  = FALSE;\n        }\n        else\n          grayscale = FALSE;\n\n        if ( FT_IS_TRICKY( glyph->face ) )\n          subpixel = FALSE;\n\n        exec->ignore_x_mode      = subpixel || grayscale;\n        exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION;\n        if ( exec->sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 )\n          exec->rasterizer_version = TT_INTERPRETER_VERSION_35;\n\n#if 1\n        exec->compatible_widths     = SPH_OPTION_SET_COMPATIBLE_WIDTHS;\n        exec->symmetrical_smoothing = FALSE;\n        exec->bgr                   = FALSE;\n        exec->subpixel_positioned   = TRUE;\n#else /* 0 */\n        exec->compatible_widths =\n          FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=\n                   TT_LOAD_COMPATIBLE_WIDTHS );\n        exec->symmetrical_smoothing =\n          FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=\n                   TT_LOAD_SYMMETRICAL_SMOOTHING );\n        exec->bgr =\n          FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=\n                   TT_LOAD_BGR );\n        exec->subpixel_positioned =\n          FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=\n                   TT_LOAD_SUBPIXEL_POSITIONED );\n#endif /* 0 */\n\n      }\n      else\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n      {\n        grayscale = FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=\n                             FT_RENDER_MODE_MONO );\n      }\n\n      error = TT_Load_Context( exec, face, size );\n      if ( error )\n        return error;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n      if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )\n      {\n        /* a change from mono to subpixel rendering (and vice versa) */\n        /* requires a re-execution of the CVT program                */\n        if ( subpixel != exec->subpixel )\n        {\n          FT_TRACE4(( \"tt_loader_init: subpixel hinting change,\"\n                      \" re-executing `prep' table\\n\" ));\n\n          exec->subpixel = subpixel;\n          reexecute      = TRUE;\n        }\n\n        /* a change from mono to grayscale rendering (and vice versa) */\n        /* requires a re-execution of the CVT program                 */\n        if ( grayscale != exec->grayscale )\n        {\n          FT_TRACE4(( \"tt_loader_init: grayscale hinting change,\"\n                      \" re-executing `prep' table\\n\" ));\n\n          exec->grayscale = grayscale;\n          reexecute       = TRUE;\n        }\n      }\n      else\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n      {\n        /* a change from mono to grayscale rendering (and vice versa) */\n        /* requires a re-execution of the CVT program                 */\n        if ( grayscale != exec->grayscale )\n        {\n          FT_TRACE4(( \"tt_loader_init: grayscale change,\"\n                      \" re-executing `prep' table\\n\" ));\n\n          exec->grayscale = grayscale;\n          reexecute       = TRUE;\n        }\n      }\n\n      if ( reexecute )\n      {\n        FT_UInt  i;\n\n\n        for ( i = 0; i < size->cvt_size; i++ )\n          size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale );\n        error = tt_size_run_prep( size, pedantic );\n        if ( error )\n          return error;\n      }\n\n      /* see whether the cvt program has disabled hinting */\n      if ( exec->GS.instruct_control & 1 )\n        load_flags |= FT_LOAD_NO_HINTING;\n\n      /* load default graphics state -- if needed */\n      if ( exec->GS.instruct_control & 2 )\n        exec->GS = tt_default_graphics_state;\n\n      exec->pedantic_hinting = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );\n      loader->exec = exec;\n      loader->instructions = exec->glyphIns;\n    }\n\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n    /* seek to the beginning of the glyph table -- for Type 42 fonts     */\n    /* the table might be accessed from a Postscript stream or something */\n    /* else...                                                           */\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n    if ( face->root.internal->incremental_interface )\n      loader->glyf_offset = 0;\n    else\n\n#endif\n\n    {\n      error = face->goto_table( face, TTAG_glyf, stream, 0 );\n\n      if ( FT_ERR_EQ( error, Table_Missing ) )\n        loader->glyf_offset = 0;\n      else if ( error )\n      {\n        FT_ERROR(( \"tt_loader_init: could not access glyph table\\n\" ));\n        return error;\n      }\n      else\n        loader->glyf_offset = FT_STREAM_POS();\n    }\n\n    /* get face's glyph loader */\n    if ( !glyf_table_only )\n    {\n      FT_GlyphLoader  gloader = glyph->internal->loader;\n\n\n      FT_GlyphLoader_Rewind( gloader );\n      loader->gloader = gloader;\n    }\n\n    loader->load_flags = load_flags;\n\n    loader->face   = (FT_Face)face;\n    loader->size   = (FT_Size)size;\n    loader->glyph  = (FT_GlyphSlot)glyph;\n    loader->stream = stream;\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Load_Glyph                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to load a single glyph within a given glyph slot,  */\n  /*    for a given size.                                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    glyph       :: A handle to a target slot object where the glyph    */\n  /*                   will be loaded.                                     */\n  /*                                                                       */\n  /*    size        :: A handle to the source face size at which the glyph */\n  /*                   must be scaled/loaded.                              */\n  /*                                                                       */\n  /*    glyph_index :: The index of the glyph in the font file.            */\n  /*                                                                       */\n  /*    load_flags  :: A flag indicating what to load for this glyph.  The */\n  /*                   FT_LOAD_XXX constants can be used to control the    */\n  /*                   glyph loading process (e.g., whether the outline    */\n  /*                   should be scaled, whether to load bitmaps or not,   */\n  /*                   whether to hint the outline, etc).                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  TT_Load_Glyph( TT_Size       size,\n                 TT_GlyphSlot  glyph,\n                 FT_UInt       glyph_index,\n                 FT_Int32      load_flags )\n  {\n    FT_Error      error;\n    TT_LoaderRec  loader;\n\n\n    FT_TRACE1(( \"TT_Load_Glyph: glyph index %d\\n\", glyph_index ));\n\n#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n    /* try to load embedded bitmap if any              */\n    /*                                                 */\n    /* XXX: The convention should be emphasized in     */\n    /*      the documents because it can be confusing. */\n    if ( size->strike_index != 0xFFFFFFFFUL      &&\n         ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )\n    {\n      error = load_sbit_image( size, glyph, glyph_index, load_flags );\n      if ( !error )\n      {\n        if ( FT_IS_SCALABLE( glyph->face ) )\n        {\n          /* for the bbox we need the header only */\n          (void)tt_loader_init( &loader, size, glyph, load_flags, TRUE );\n          (void)load_truetype_glyph( &loader, glyph_index, 0, TRUE );\n          glyph->linearHoriAdvance = loader.linear;\n          glyph->linearVertAdvance = loader.vadvance;\n\n          /* sanity checks: if `xxxAdvance' in the sbit metric */\n          /* structure isn't set, use `linearXXXAdvance'      */\n          if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance )\n            glyph->metrics.horiAdvance =\n              FT_MulFix( glyph->linearHoriAdvance,\n                         size->root.metrics.x_scale );\n          if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance )\n            glyph->metrics.vertAdvance =\n              FT_MulFix( glyph->linearVertAdvance,\n                         size->root.metrics.y_scale );\n        }\n\n        return FT_Err_Ok;\n      }\n    }\n\n#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */\n\n    /* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */\n    if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid )\n      return FT_THROW( Invalid_Size_Handle );\n\n    if ( load_flags & FT_LOAD_SBITS_ONLY )\n      return FT_THROW( Invalid_Argument );\n\n    error = tt_loader_init( &loader, size, glyph, load_flags, FALSE );\n    if ( error )\n      return error;\n\n    glyph->format        = FT_GLYPH_FORMAT_OUTLINE;\n    glyph->num_subglyphs = 0;\n    glyph->outline.flags = 0;\n\n    /* main loading loop */\n    error = load_truetype_glyph( &loader, glyph_index, 0, FALSE );\n    if ( !error )\n    {\n      if ( glyph->format == FT_GLYPH_FORMAT_COMPOSITE )\n      {\n        glyph->num_subglyphs = loader.gloader->base.num_subglyphs;\n        glyph->subglyphs     = loader.gloader->base.subglyphs;\n      }\n      else\n      {\n        glyph->outline        = loader.gloader->base.outline;\n        glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;\n\n        /* Translate array so that (0,0) is the glyph's origin.  Note  */\n        /* that this behaviour is independent on the value of bit 1 of */\n        /* the `flags' field in the `head' table -- at least major     */\n        /* applications like Acroread indicate that.                   */\n        if ( loader.pp1.x )\n          FT_Outline_Translate( &glyph->outline, -loader.pp1.x, 0 );\n      }\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n      if ( IS_HINTED( load_flags ) )\n      {\n        if ( loader.exec->GS.scan_control )\n        {\n          /* convert scan conversion mode to FT_OUTLINE_XXX flags */\n          switch ( loader.exec->GS.scan_type )\n          {\n          case 0: /* simple drop-outs including stubs */\n            glyph->outline.flags |= FT_OUTLINE_INCLUDE_STUBS;\n            break;\n          case 1: /* simple drop-outs excluding stubs */\n            /* nothing; it's the default rendering mode */\n            break;\n          case 4: /* smart drop-outs including stubs */\n            glyph->outline.flags |= FT_OUTLINE_SMART_DROPOUTS |\n                                    FT_OUTLINE_INCLUDE_STUBS;\n            break;\n          case 5: /* smart drop-outs excluding stubs  */\n            glyph->outline.flags |= FT_OUTLINE_SMART_DROPOUTS;\n            break;\n\n          default: /* no drop-out control */\n            glyph->outline.flags |= FT_OUTLINE_IGNORE_DROPOUTS;\n            break;\n          }\n        }\n        else\n          glyph->outline.flags |= FT_OUTLINE_IGNORE_DROPOUTS;\n      }\n\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n      error = compute_glyph_metrics( &loader, glyph_index );\n    }\n\n    /* Set the `high precision' bit flag.                           */\n    /* This is _critical_ to get correct output for monochrome      */\n    /* TrueType glyphs at all sizes using the bytecode interpreter. */\n    /*                                                              */\n    if ( !( load_flags & FT_LOAD_NO_SCALE ) &&\n         size->root.metrics.y_ppem < 24     )\n      glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttgload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttgload.h                                                              */\n/*                                                                         */\n/*    TrueType Glyph Loader (specification).                               */\n/*                                                                         */\n/*  Copyright 1996-2006, 2008, 2011 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTGLOAD_H__\n#define __TTGLOAD_H__\n\n\n#include <ft2build.h>\n#include \"ttobjs.h\"\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n#include \"ttinterp.h\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( void )\n  TT_Init_Glyph_Loading( TT_Face  face );\n\n  FT_LOCAL( void )\n  TT_Get_HMetrics( TT_Face     face,\n                   FT_UInt     idx,\n                   FT_Short*   lsb,\n                   FT_UShort*  aw );\n\n  FT_LOCAL( void )\n  TT_Get_VMetrics( TT_Face     face,\n                   FT_UInt     idx,\n                   FT_Pos      yMax,\n                   FT_Short*   tsb,\n                   FT_UShort*  ah );\n\n  FT_LOCAL( FT_Error )\n  TT_Load_Glyph( TT_Size       size,\n                 TT_GlyphSlot  glyph,\n                 FT_UInt       glyph_index,\n                 FT_Int32      load_flags );\n\n\nFT_END_HEADER\n\n#endif /* __TTGLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttgxvar.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttgxvar.c                                                              */\n/*                                                                         */\n/*    TrueType GX Font Variation loader                                    */\n/*                                                                         */\n/*  Copyright 2004-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, Werner Lemberg, and George Williams.     */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Apple documents the `fvar', `gvar', `cvar', and `avar' tables at      */\n  /*                                                                       */\n  /*   http://developer.apple.com/fonts/TTRefMan/RM06/Chap6[fgca]var.html  */\n  /*                                                                       */\n  /* The documentation for `fvar' is inconsistent.  At one point it says   */\n  /* that `countSizePairs' should be 3, at another point 2.  It should     */\n  /* be 2.                                                                 */\n  /*                                                                       */\n  /* The documentation for `gvar' is not intelligible; `cvar' refers you   */\n  /* to `gvar' and is thus also incomprehensible.                          */\n  /*                                                                       */\n  /* The documentation for `avar' appears correct, but Apple has no fonts  */\n  /* with an `avar' table, so it is hard to test.                          */\n  /*                                                                       */\n  /* Many thanks to John Jenkins (at Apple) in figuring this out.          */\n  /*                                                                       */\n  /*                                                                       */\n  /* Apple's `kern' table has some references to tuple indices, but as     */\n  /* there is no indication where these indices are defined, nor how to    */\n  /* interpolate the kerning values (different tuples have different       */\n  /* classes) this issue is ignored.                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_CONFIG_CONFIG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_SFNT_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_MULTIPLE_MASTERS_H\n\n#include \"ttpload.h\"\n#include \"ttgxvar.h\"\n\n#include \"tterrors.h\"\n\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n\n\n#define FT_Stream_FTell( stream )  \\\n          (FT_ULong)( (stream)->cursor - (stream)->base )\n#define FT_Stream_SeekSet( stream, off ) \\\n          ( (stream)->cursor = (stream)->base + (off) )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttgxvar\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       Internal Routines                       *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro ALL_POINTS is used in `ft_var_readpackedpoints'.  It        */\n  /* indicates that there is a delta for every point without needing to    */\n  /* enumerate all of them.                                                */\n  /*                                                                       */\n\n  /* ensure that value `0' has the same width as a pointer */\n#define ALL_POINTS  (FT_UShort*)~(FT_PtrDist)0\n\n\n#define GX_PT_POINTS_ARE_WORDS      0x80\n#define GX_PT_POINT_RUN_COUNT_MASK  0x7F\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_var_readpackedpoints                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Read a set of points to which the following deltas will apply.     */\n  /*    Points are packed with a run length encoding.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream    :: The data stream.                                      */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    point_cnt :: The number of points read.  A zero value means that   */\n  /*                 all points in the glyph will be affected, without     */\n  /*                 enumerating them individually.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    An array of FT_UShort containing the affected points or the        */\n  /*    special value ALL_POINTS.                                          */\n  /*                                                                       */\n  static FT_UShort*\n  ft_var_readpackedpoints( FT_Stream  stream,\n                           FT_UInt   *point_cnt )\n  {\n    FT_UShort *points = NULL;\n    FT_Int     n;\n    FT_Int     runcnt;\n    FT_Int     i;\n    FT_Int     j;\n    FT_Int     first;\n    FT_Memory  memory = stream->memory;\n    FT_Error   error  = FT_Err_Ok;\n\n    FT_UNUSED( error );\n\n\n    *point_cnt = n = FT_GET_BYTE();\n    if ( n == 0 )\n      return ALL_POINTS;\n\n    if ( n & GX_PT_POINTS_ARE_WORDS )\n      n = FT_GET_BYTE() | ( ( n & GX_PT_POINT_RUN_COUNT_MASK ) << 8 );\n\n    if ( FT_NEW_ARRAY( points, n ) )\n      return NULL;\n\n    i = 0;\n    while ( i < n )\n    {\n      runcnt = FT_GET_BYTE();\n      if ( runcnt & GX_PT_POINTS_ARE_WORDS )\n      {\n        runcnt = runcnt & GX_PT_POINT_RUN_COUNT_MASK;\n        first  = points[i++] = FT_GET_USHORT();\n\n        if ( runcnt < 1 || i + runcnt >= n )\n          goto Exit;\n\n        /* first point not included in runcount */\n        for ( j = 0; j < runcnt; ++j )\n          points[i++] = (FT_UShort)( first += FT_GET_USHORT() );\n      }\n      else\n      {\n        first = points[i++] = FT_GET_BYTE();\n\n        if ( runcnt < 1 || i + runcnt >= n )\n          goto Exit;\n\n        for ( j = 0; j < runcnt; ++j )\n          points[i++] = (FT_UShort)( first += FT_GET_BYTE() );\n      }\n    }\n\n  Exit:\n    return points;\n  }\n\n\n  enum\n  {\n    GX_DT_DELTAS_ARE_ZERO      = 0x80,\n    GX_DT_DELTAS_ARE_WORDS     = 0x40,\n    GX_DT_DELTA_RUN_COUNT_MASK = 0x3F\n  };\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_var_readpackeddeltas                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Read a set of deltas.  These are packed slightly differently than  */\n  /*    points.  In particular there is no overall count.                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream    :: The data stream.                                      */\n  /*                                                                       */\n  /*    delta_cnt :: The number of to be read.                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    An array of FT_Short containing the deltas for the affected        */\n  /*    points.  (This only gets the deltas for one dimension.  It will    */\n  /*    generally be called twice, once for x, once for y.  When used in   */\n  /*    cvt table, it will only be called once.)                           */\n  /*                                                                       */\n  static FT_Short*\n  ft_var_readpackeddeltas( FT_Stream  stream,\n                           FT_Offset  delta_cnt )\n  {\n    FT_Short  *deltas = NULL;\n    FT_UInt    runcnt;\n    FT_Offset  i;\n    FT_UInt    j;\n    FT_Memory  memory = stream->memory;\n    FT_Error   error  = FT_Err_Ok;\n\n    FT_UNUSED( error );\n\n\n    if ( FT_NEW_ARRAY( deltas, delta_cnt ) )\n      return NULL;\n\n    i = 0;\n    while ( i < delta_cnt )\n    {\n      runcnt = FT_GET_BYTE();\n      if ( runcnt & GX_DT_DELTAS_ARE_ZERO )\n      {\n        /* runcnt zeroes get added */\n        for ( j = 0;\n              j <= ( runcnt & GX_DT_DELTA_RUN_COUNT_MASK ) && i < delta_cnt;\n              ++j )\n          deltas[i++] = 0;\n      }\n      else if ( runcnt & GX_DT_DELTAS_ARE_WORDS )\n      {\n        /* runcnt shorts from the stack */\n        for ( j = 0;\n              j <= ( runcnt & GX_DT_DELTA_RUN_COUNT_MASK ) && i < delta_cnt;\n              ++j )\n          deltas[i++] = FT_GET_SHORT();\n      }\n      else\n      {\n        /* runcnt signed bytes from the stack */\n        for ( j = 0;\n              j <= ( runcnt & GX_DT_DELTA_RUN_COUNT_MASK ) && i < delta_cnt;\n              ++j )\n          deltas[i++] = FT_GET_CHAR();\n      }\n\n      if ( j <= ( runcnt & GX_DT_DELTA_RUN_COUNT_MASK ) )\n      {\n        /* Bad format */\n        FT_FREE( deltas );\n        return NULL;\n      }\n    }\n\n    return deltas;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_var_load_avar                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Parse the `avar' table if present.  It need not be, so we return   */\n  /*    nothing.                                                           */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face :: The font face.                                             */\n  /*                                                                       */\n  static void\n  ft_var_load_avar( TT_Face  face )\n  {\n    FT_Stream       stream = FT_FACE_STREAM(face);\n    FT_Memory       memory = stream->memory;\n    GX_Blend        blend  = face->blend;\n    GX_AVarSegment  segment;\n    FT_Error        error = FT_Err_Ok;\n    FT_ULong        version;\n    FT_Long         axisCount;\n    FT_Int          i, j;\n    FT_ULong        table_len;\n\n    FT_UNUSED( error );\n\n\n    blend->avar_checked = TRUE;\n    if ( (error = face->goto_table( face, TTAG_avar, stream, &table_len )) != 0 )\n      return;\n\n    if ( FT_FRAME_ENTER( table_len ) )\n      return;\n\n    version   = FT_GET_LONG();\n    axisCount = FT_GET_LONG();\n\n    if ( version != 0x00010000L                       ||\n         axisCount != (FT_Long)blend->mmvar->num_axis )\n      goto Exit;\n\n    if ( FT_NEW_ARRAY( blend->avar_segment, axisCount ) )\n      goto Exit;\n\n    segment = &blend->avar_segment[0];\n    for ( i = 0; i < axisCount; ++i, ++segment )\n    {\n      segment->pairCount = FT_GET_USHORT();\n      if ( FT_NEW_ARRAY( segment->correspondence, segment->pairCount ) )\n      {\n        /* Failure.  Free everything we have done so far.  We must do */\n        /* it right now since loading the `avar' table is optional.   */\n\n        for ( j = i - 1; j >= 0; --j )\n          FT_FREE( blend->avar_segment[j].correspondence );\n\n        FT_FREE( blend->avar_segment );\n        blend->avar_segment = NULL;\n        goto Exit;\n      }\n\n      for ( j = 0; j < segment->pairCount; ++j )\n      {\n        segment->correspondence[j].fromCoord =\n          FT_GET_SHORT() << 2;    /* convert to Fixed */\n        segment->correspondence[j].toCoord =\n          FT_GET_SHORT()<<2;    /* convert to Fixed */\n      }\n    }\n\n  Exit:\n    FT_FRAME_EXIT();\n  }\n\n\n  typedef struct  GX_GVar_Head_\n  {\n    FT_Long    version;\n    FT_UShort  axisCount;\n    FT_UShort  globalCoordCount;\n    FT_ULong   offsetToCoord;\n    FT_UShort  glyphCount;\n    FT_UShort  flags;\n    FT_ULong   offsetToData;\n\n  } GX_GVar_Head;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_var_load_gvar                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Parses the `gvar' table if present.  If `fvar' is there, `gvar'    */\n  /*    had better be there too.                                           */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face :: The font face.                                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  static FT_Error\n  ft_var_load_gvar( TT_Face  face )\n  {\n    FT_Stream     stream = FT_FACE_STREAM(face);\n    FT_Memory     memory = stream->memory;\n    GX_Blend      blend  = face->blend;\n    FT_Error      error;\n    FT_UInt       i, j;\n    FT_ULong      table_len;\n    FT_ULong      gvar_start;\n    FT_ULong      offsetToData;\n    GX_GVar_Head  gvar_head;\n\n    static const FT_Frame_Field  gvar_fields[] =\n    {\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  GX_GVar_Head\n\n      FT_FRAME_START( 20 ),\n        FT_FRAME_LONG  ( version ),\n        FT_FRAME_USHORT( axisCount ),\n        FT_FRAME_USHORT( globalCoordCount ),\n        FT_FRAME_ULONG ( offsetToCoord ),\n        FT_FRAME_USHORT( glyphCount ),\n        FT_FRAME_USHORT( flags ),\n        FT_FRAME_ULONG ( offsetToData ),\n      FT_FRAME_END\n    };\n\n    if ( (error = face->goto_table( face, TTAG_gvar, stream, &table_len )) != 0 )\n      goto Exit;\n\n    gvar_start = FT_STREAM_POS( );\n    if ( FT_STREAM_READ_FIELDS( gvar_fields, &gvar_head ) )\n      goto Exit;\n\n    blend->tuplecount  = gvar_head.globalCoordCount;\n    blend->gv_glyphcnt = gvar_head.glyphCount;\n    offsetToData       = gvar_start + gvar_head.offsetToData;\n\n    if ( gvar_head.version   != (FT_Long)0x00010000L              ||\n         gvar_head.axisCount != (FT_UShort)blend->mmvar->num_axis )\n    {\n      error = FT_THROW( Invalid_Table );\n      goto Exit;\n    }\n\n    if ( FT_NEW_ARRAY( blend->glyphoffsets, blend->gv_glyphcnt + 1 ) )\n      goto Exit;\n\n    if ( gvar_head.flags & 1 )\n    {\n      /* long offsets (one more offset than glyphs, to mark size of last) */\n      if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 4L ) )\n        goto Exit;\n\n      for ( i = 0; i <= blend->gv_glyphcnt; ++i )\n        blend->glyphoffsets[i] = offsetToData + FT_GET_LONG();\n\n      FT_FRAME_EXIT();\n    }\n    else\n    {\n      /* short offsets (one more offset than glyphs, to mark size of last) */\n      if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 2L ) )\n        goto Exit;\n\n      for ( i = 0; i <= blend->gv_glyphcnt; ++i )\n        blend->glyphoffsets[i] = offsetToData + FT_GET_USHORT() * 2;\n                                              /* XXX: Undocumented: `*2'! */\n\n      FT_FRAME_EXIT();\n    }\n\n    if ( blend->tuplecount != 0 )\n    {\n      if ( FT_NEW_ARRAY( blend->tuplecoords,\n                         gvar_head.axisCount * blend->tuplecount ) )\n        goto Exit;\n\n      if ( FT_STREAM_SEEK( gvar_start + gvar_head.offsetToCoord )       ||\n           FT_FRAME_ENTER( blend->tuplecount * gvar_head.axisCount * 2L )                   )\n        goto Exit;\n\n      for ( i = 0; i < blend->tuplecount; ++i )\n        for ( j = 0 ; j < (FT_UInt)gvar_head.axisCount; ++j )\n          blend->tuplecoords[i * gvar_head.axisCount + j] =\n            FT_GET_SHORT() << 2;                /* convert to FT_Fixed */\n\n      FT_FRAME_EXIT();\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    ft_var_apply_tuple                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Figure out whether a given tuple (design) applies to the current   */\n  /*    blend, and if so, what is the scaling factor.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    blend           :: The current blend of the font.                  */\n  /*                                                                       */\n  /*    tupleIndex      :: A flag saying whether this is an intermediate   */\n  /*                       tuple or not.                                   */\n  /*                                                                       */\n  /*    tuple_coords    :: The coordinates of the tuple in normalized axis */\n  /*                       units.                                          */\n  /*                                                                       */\n  /*    im_start_coords :: The initial coordinates where this tuple starts */\n  /*                       to apply (for intermediate coordinates).        */\n  /*                                                                       */\n  /*    im_end_coords   :: The final coordinates after which this tuple no */\n  /*                       longer applies (for intermediate coordinates).  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    An FT_Fixed value containing the scaling factor.                   */\n  /*                                                                       */\n  static FT_Fixed\n  ft_var_apply_tuple( GX_Blend   blend,\n                      FT_UShort  tupleIndex,\n                      FT_Fixed*  tuple_coords,\n                      FT_Fixed*  im_start_coords,\n                      FT_Fixed*  im_end_coords )\n  {\n    FT_UInt   i;\n    FT_Fixed  apply = 0x10000L;\n\n\n    for ( i = 0; i < blend->num_axis; ++i )\n    {\n      if ( tuple_coords[i] == 0 )\n        /* It's not clear why (for intermediate tuples) we don't need     */\n        /* to check against start/end -- the documentation says we don't. */\n        /* Similarly, it's unclear why we don't need to scale along the   */\n        /* axis.                                                          */\n        continue;\n\n      else if ( blend->normalizedcoords[i] == 0                           ||\n                ( blend->normalizedcoords[i] < 0 && tuple_coords[i] > 0 ) ||\n                ( blend->normalizedcoords[i] > 0 && tuple_coords[i] < 0 ) )\n      {\n        apply = 0;\n        break;\n      }\n\n      else if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) )\n        /* not an intermediate tuple */\n        apply = FT_MulFix( apply,\n                           blend->normalizedcoords[i] > 0\n                             ? blend->normalizedcoords[i]\n                             : -blend->normalizedcoords[i] );\n\n      else if ( blend->normalizedcoords[i] <= im_start_coords[i] ||\n                blend->normalizedcoords[i] >= im_end_coords[i]   )\n      {\n        apply = 0;\n        break;\n      }\n\n      else if ( blend->normalizedcoords[i] < tuple_coords[i] )\n        apply = FT_MulDiv( apply,\n                           blend->normalizedcoords[i] - im_start_coords[i],\n                           tuple_coords[i] - im_start_coords[i] );\n\n      else\n        apply = FT_MulDiv( apply,\n                           im_end_coords[i] - blend->normalizedcoords[i],\n                           im_end_coords[i] - tuple_coords[i] );\n    }\n\n    return apply;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****               MULTIPLE MASTERS SERVICE FUNCTIONS              *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  typedef struct  GX_FVar_Head_\n  {\n    FT_Long    version;\n    FT_UShort  offsetToData;\n    FT_UShort  countSizePairs;\n    FT_UShort  axisCount;\n    FT_UShort  axisSize;\n    FT_UShort  instanceCount;\n    FT_UShort  instanceSize;\n\n  } GX_FVar_Head;\n\n\n  typedef struct  fvar_axis_\n  {\n    FT_ULong   axisTag;\n    FT_ULong   minValue;\n    FT_ULong   defaultValue;\n    FT_ULong   maxValue;\n    FT_UShort  flags;\n    FT_UShort  nameID;\n\n  } GX_FVar_Axis;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Get_MM_Var                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Check that the font's `fvar' table is valid, parse it, and return  */\n  /*    those data.                                                        */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face   :: The font face.                                           */\n  /*              TT_Get_MM_Var initializes the blend structure.           */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    master :: The `fvar' data (must be freed by caller).               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  TT_Get_MM_Var( TT_Face      face,\n                 FT_MM_Var*  *master )\n  {\n    FT_Stream            stream = face->root.stream;\n    FT_Memory            memory = face->root.memory;\n    FT_ULong             table_len;\n    FT_Error             error  = FT_Err_Ok;\n    FT_ULong             fvar_start;\n    FT_Int               i, j;\n    FT_MM_Var*           mmvar = NULL;\n    FT_Fixed*            next_coords;\n    FT_String*           next_name;\n    FT_Var_Axis*         a;\n    FT_Var_Named_Style*  ns;\n    GX_FVar_Head         fvar_head;\n\n    static const FT_Frame_Field  fvar_fields[] =\n    {\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  GX_FVar_Head\n\n      FT_FRAME_START( 16 ),\n        FT_FRAME_LONG  ( version ),\n        FT_FRAME_USHORT( offsetToData ),\n        FT_FRAME_USHORT( countSizePairs ),\n        FT_FRAME_USHORT( axisCount ),\n        FT_FRAME_USHORT( axisSize ),\n        FT_FRAME_USHORT( instanceCount ),\n        FT_FRAME_USHORT( instanceSize ),\n      FT_FRAME_END\n    };\n\n    static const FT_Frame_Field  fvaraxis_fields[] =\n    {\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  GX_FVar_Axis\n\n      FT_FRAME_START( 20 ),\n        FT_FRAME_ULONG ( axisTag ),\n        FT_FRAME_ULONG ( minValue ),\n        FT_FRAME_ULONG ( defaultValue ),\n        FT_FRAME_ULONG ( maxValue ),\n        FT_FRAME_USHORT( flags ),\n        FT_FRAME_USHORT( nameID ),\n      FT_FRAME_END\n    };\n\n\n    if ( face->blend == NULL )\n    {\n      /* both `fvar' and `gvar' must be present */\n      if ( (error = face->goto_table( face, TTAG_gvar,\n                                      stream, &table_len )) != 0 )\n        goto Exit;\n\n      if ( (error = face->goto_table( face, TTAG_fvar,\n                                      stream, &table_len )) != 0 )\n        goto Exit;\n\n      fvar_start = FT_STREAM_POS( );\n\n      if ( FT_STREAM_READ_FIELDS( fvar_fields, &fvar_head ) )\n        goto Exit;\n\n      if ( fvar_head.version != (FT_Long)0x00010000L                      ||\n           fvar_head.countSizePairs != 2                                  ||\n           fvar_head.axisSize != 20                                       ||\n           /* axisCount limit implied by 16-bit instanceSize */\n           fvar_head.axisCount > 0x3FFE                                   ||\n           fvar_head.instanceSize != 4 + 4 * fvar_head.axisCount          ||\n           /* instanceCount limit implied by limited range of name IDs */\n           fvar_head.instanceCount > 0x7EFF                               ||\n           fvar_head.offsetToData + fvar_head.axisCount * 20U +\n             fvar_head.instanceCount * fvar_head.instanceSize > table_len )\n      {\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n\n      if ( FT_NEW( face->blend ) )\n        goto Exit;\n\n      /* cannot overflow 32-bit arithmetic because of limits above */\n      face->blend->mmvar_len =\n        sizeof ( FT_MM_Var ) +\n        fvar_head.axisCount * sizeof ( FT_Var_Axis ) +\n        fvar_head.instanceCount * sizeof ( FT_Var_Named_Style ) +\n        fvar_head.instanceCount * fvar_head.axisCount * sizeof ( FT_Fixed ) +\n        5 * fvar_head.axisCount;\n\n      if ( FT_ALLOC( mmvar, face->blend->mmvar_len ) )\n        goto Exit;\n      face->blend->mmvar = mmvar;\n\n      mmvar->num_axis =\n        fvar_head.axisCount;\n      mmvar->num_designs =\n        ~0U;                   /* meaningless in this context; each glyph */\n                               /* may have a different number of designs  */\n                               /* (or tuples, as called by Apple)         */\n      mmvar->num_namedstyles =\n        fvar_head.instanceCount;\n      mmvar->axis =\n        (FT_Var_Axis*)&(mmvar[1]);\n      mmvar->namedstyle =\n        (FT_Var_Named_Style*)&(mmvar->axis[fvar_head.axisCount]);\n\n      next_coords =\n        (FT_Fixed*)&(mmvar->namedstyle[fvar_head.instanceCount]);\n      for ( i = 0; i < fvar_head.instanceCount; ++i )\n      {\n        mmvar->namedstyle[i].coords  = next_coords;\n        next_coords                 += fvar_head.axisCount;\n      }\n\n      next_name = (FT_String*)next_coords;\n      for ( i = 0; i < fvar_head.axisCount; ++i )\n      {\n        mmvar->axis[i].name  = next_name;\n        next_name           += 5;\n      }\n\n      if ( FT_STREAM_SEEK( fvar_start + fvar_head.offsetToData ) )\n        goto Exit;\n\n      a = mmvar->axis;\n      for ( i = 0; i < fvar_head.axisCount; ++i )\n      {\n        GX_FVar_Axis  axis_rec;\n\n\n        if ( FT_STREAM_READ_FIELDS( fvaraxis_fields, &axis_rec ) )\n          goto Exit;\n        a->tag     = axis_rec.axisTag;\n        a->minimum = axis_rec.minValue;     /* A Fixed */\n        a->def     = axis_rec.defaultValue; /* A Fixed */\n        a->maximum = axis_rec.maxValue;     /* A Fixed */\n        a->strid   = axis_rec.nameID;\n\n        a->name[0] = (FT_String)(   a->tag >> 24 );\n        a->name[1] = (FT_String)( ( a->tag >> 16 ) & 0xFF );\n        a->name[2] = (FT_String)( ( a->tag >>  8 ) & 0xFF );\n        a->name[3] = (FT_String)( ( a->tag       ) & 0xFF );\n        a->name[4] = 0;\n\n        ++a;\n      }\n\n      ns = mmvar->namedstyle;\n      for ( i = 0; i < fvar_head.instanceCount; ++i, ++ns )\n      {\n        if ( FT_FRAME_ENTER( 4L + 4L * fvar_head.axisCount ) )\n          goto Exit;\n\n        ns->strid       =    FT_GET_USHORT();\n        (void) /* flags = */ FT_GET_USHORT();\n\n        for ( j = 0; j < fvar_head.axisCount; ++j )\n          ns->coords[j] = FT_GET_ULONG();     /* A Fixed */\n\n        FT_FRAME_EXIT();\n      }\n    }\n\n    if ( master != NULL )\n    {\n      FT_UInt  n;\n\n\n      if ( FT_ALLOC( mmvar, face->blend->mmvar_len ) )\n        goto Exit;\n      FT_MEM_COPY( mmvar, face->blend->mmvar, face->blend->mmvar_len );\n\n      mmvar->axis =\n        (FT_Var_Axis*)&(mmvar[1]);\n      mmvar->namedstyle =\n        (FT_Var_Named_Style*)&(mmvar->axis[mmvar->num_axis]);\n      next_coords =\n        (FT_Fixed*)&(mmvar->namedstyle[mmvar->num_namedstyles]);\n\n      for ( n = 0; n < mmvar->num_namedstyles; ++n )\n      {\n        mmvar->namedstyle[n].coords  = next_coords;\n        next_coords                 += mmvar->num_axis;\n      }\n\n      a = mmvar->axis;\n      next_name = (FT_String*)next_coords;\n      for ( n = 0; n < mmvar->num_axis; ++n )\n      {\n        a->name = next_name;\n\n        /* standard PostScript names for some standard apple tags */\n        if ( a->tag == TTAG_wght )\n          a->name = (char *)\"Weight\";\n        else if ( a->tag == TTAG_wdth )\n          a->name = (char *)\"Width\";\n        else if ( a->tag == TTAG_opsz )\n          a->name = (char *)\"OpticalSize\";\n        else if ( a->tag == TTAG_slnt )\n          a->name = (char *)\"Slant\";\n\n        next_name += 5;\n        ++a;\n      }\n\n      *master = mmvar;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Set_MM_Blend                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Set the blend (normalized) coordinates for this instance of the    */\n  /*    font.  Check that the `gvar' table is reasonable and does some     */\n  /*    initial preparation.                                               */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: The font.                                            */\n  /*                  Initialize the blend structure with `gvar' data.     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    num_coords :: Must be the axis count of the font.                  */\n  /*                                                                       */\n  /*    coords     :: An array of num_coords, each between [-1,1].         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  TT_Set_MM_Blend( TT_Face    face,\n                   FT_UInt    num_coords,\n                   FT_Fixed*  coords )\n  {\n    FT_Error    error = FT_Err_Ok;\n    GX_Blend    blend;\n    FT_MM_Var*  mmvar;\n    FT_UInt     i;\n    FT_Memory   memory = face->root.memory;\n\n    enum\n    {\n      mcvt_retain,\n      mcvt_modify,\n      mcvt_load\n\n    } manageCvt;\n\n\n    face->doblend = FALSE;\n\n    if ( face->blend == NULL )\n    {\n      if ( (error = TT_Get_MM_Var( face, NULL)) != 0 )\n        goto Exit;\n    }\n\n    blend = face->blend;\n    mmvar = blend->mmvar;\n\n    if ( num_coords != mmvar->num_axis )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    for ( i = 0; i < num_coords; ++i )\n      if ( coords[i] < -0x00010000L || coords[i] > 0x00010000L )\n      {\n        error = FT_THROW( Invalid_Argument );\n        goto Exit;\n      }\n\n    if ( blend->glyphoffsets == NULL )\n      if ( (error = ft_var_load_gvar( face )) != 0 )\n        goto Exit;\n\n    if ( blend->normalizedcoords == NULL )\n    {\n      if ( FT_NEW_ARRAY( blend->normalizedcoords, num_coords ) )\n        goto Exit;\n\n      manageCvt = mcvt_modify;\n\n      /* If we have not set the blend coordinates before this, then the  */\n      /* cvt table will still be what we read from the `cvt ' table and  */\n      /* we don't need to reload it.  We may need to change it though... */\n    }\n    else\n    {\n      manageCvt = mcvt_retain;\n      for ( i = 0; i < num_coords; ++i )\n      {\n        if ( blend->normalizedcoords[i] != coords[i] )\n        {\n          manageCvt = mcvt_load;\n          break;\n        }\n      }\n\n      /* If we don't change the blend coords then we don't need to do  */\n      /* anything to the cvt table.  It will be correct.  Otherwise we */\n      /* no longer have the original cvt (it was modified when we set  */\n      /* the blend last time), so we must reload and then modify it.   */\n    }\n\n    blend->num_axis = num_coords;\n    FT_MEM_COPY( blend->normalizedcoords,\n                 coords,\n                 num_coords * sizeof ( FT_Fixed ) );\n\n    face->doblend = TRUE;\n\n    if ( face->cvt != NULL )\n    {\n      switch ( manageCvt )\n      {\n      case mcvt_load:\n        /* The cvt table has been loaded already; every time we change the */\n        /* blend we may need to reload and remodify the cvt table.         */\n        FT_FREE( face->cvt );\n        face->cvt = NULL;\n\n        error = tt_face_load_cvt( face, face->root.stream );\n        break;\n\n      case mcvt_modify:\n        /* The original cvt table is in memory.  All we need to do is */\n        /* apply the `cvar' table (if any).                           */\n        error = tt_face_vary_cvt( face, face->root.stream );\n        break;\n\n      case mcvt_retain:\n        /* The cvt table is correct for this set of coordinates. */\n        break;\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Set_Var_Design                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Set the coordinates for the instance, measured in the user         */\n  /*    coordinate system.  Parse the `avar' table (if present) to convert */\n  /*    from user to normalized coordinates.                               */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: The font face.                                       */\n  /*                  Initialize the blend struct with `gvar' data.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    num_coords :: This must be the axis count of the font.             */\n  /*                                                                       */\n  /*    coords     :: A coordinate array with `num_coords' elements.       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  TT_Set_Var_Design( TT_Face    face,\n                     FT_UInt    num_coords,\n                     FT_Fixed*  coords )\n  {\n    FT_Error        error      = FT_Err_Ok;\n    FT_Fixed*       normalized = NULL;\n    GX_Blend        blend;\n    FT_MM_Var*      mmvar;\n    FT_UInt         i, j;\n    FT_Var_Axis*    a;\n    GX_AVarSegment  av;\n    FT_Memory       memory = face->root.memory;\n\n\n    if ( face->blend == NULL )\n    {\n      if ( (error = TT_Get_MM_Var( face, NULL )) != 0 )\n        goto Exit;\n    }\n\n    blend = face->blend;\n    mmvar = blend->mmvar;\n\n    if ( num_coords != mmvar->num_axis )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* Axis normalization is a two stage process.  First we normalize */\n    /* based on the [min,def,max] values for the axis to be [-1,0,1]. */\n    /* Then, if there's an `avar' table, we renormalize this range.   */\n\n    if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) )\n      goto Exit;\n\n    a = mmvar->axis;\n    for ( i = 0; i < mmvar->num_axis; ++i, ++a )\n    {\n      if ( coords[i] > a->maximum || coords[i] < a->minimum )\n      {\n        error = FT_THROW( Invalid_Argument );\n        goto Exit;\n      }\n\n      if ( coords[i] < a->def )\n        normalized[i] = -FT_DivFix( coords[i] - a->def, a->minimum - a->def );\n      else if ( a->maximum == a->def )\n        normalized[i] = 0;\n      else\n        normalized[i] = FT_DivFix( coords[i] - a->def, a->maximum - a->def );\n    }\n\n    if ( !blend->avar_checked )\n      ft_var_load_avar( face );\n\n    if ( blend->avar_segment != NULL )\n    {\n      av = blend->avar_segment;\n      for ( i = 0; i < mmvar->num_axis; ++i, ++av )\n      {\n        for ( j = 1; j < (FT_UInt)av->pairCount; ++j )\n          if ( normalized[i] < av->correspondence[j].fromCoord )\n          {\n            normalized[i] =\n              FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord,\n                         av->correspondence[j].toCoord -\n                           av->correspondence[j - 1].toCoord,\n                         av->correspondence[j].fromCoord -\n                           av->correspondence[j - 1].fromCoord ) +\n              av->correspondence[j - 1].toCoord;\n            break;\n          }\n      }\n    }\n\n    error = TT_Set_MM_Blend( face, num_coords, normalized );\n\n  Exit:\n    FT_FREE( normalized );\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                     GX VAR PARSING ROUTINES                   *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_vary_cvt                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Modify the loaded cvt table according to the `cvar' table and the  */\n  /*    font's blend.                                                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream :: A handle to the input stream.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /*    Most errors are ignored.  It is perfectly valid not to have a      */\n  /*    `cvar' table even if there is a `gvar' and `fvar' table.           */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_vary_cvt( TT_Face    face,\n                    FT_Stream  stream )\n  {\n    FT_Error    error;\n    FT_Memory   memory = stream->memory;\n    FT_ULong    table_start;\n    FT_ULong    table_len;\n    FT_UInt     tupleCount;\n    FT_ULong    offsetToData;\n    FT_ULong    here;\n    FT_UInt     i, j;\n    FT_Fixed*   tuple_coords    = NULL;\n    FT_Fixed*   im_start_coords = NULL;\n    FT_Fixed*   im_end_coords   = NULL;\n    GX_Blend    blend           = face->blend;\n    FT_UInt     point_count;\n    FT_UShort*  localpoints;\n    FT_Short*   deltas;\n\n\n    FT_TRACE2(( \"CVAR \" ));\n\n    if ( blend == NULL )\n    {\n      FT_TRACE2(( \"tt_face_vary_cvt: no blend specified\\n\" ));\n\n      error = FT_Err_Ok;\n      goto Exit;\n    }\n\n    if ( face->cvt == NULL )\n    {\n      FT_TRACE2(( \"tt_face_vary_cvt: no `cvt ' table\\n\" ));\n\n      error = FT_Err_Ok;\n      goto Exit;\n    }\n\n    error = face->goto_table( face, TTAG_cvar, stream, &table_len );\n    if ( error )\n    {\n      FT_TRACE2(( \"is missing\\n\" ));\n\n      error = FT_Err_Ok;\n      goto Exit;\n    }\n\n    if ( FT_FRAME_ENTER( table_len ) )\n    {\n      error = FT_Err_Ok;\n      goto Exit;\n    }\n\n    table_start = FT_Stream_FTell( stream );\n    if ( FT_GET_LONG() != 0x00010000L )\n    {\n      FT_TRACE2(( \"bad table version\\n\" ));\n\n      error = FT_Err_Ok;\n      goto FExit;\n    }\n\n    if ( FT_NEW_ARRAY( tuple_coords, blend->num_axis )    ||\n         FT_NEW_ARRAY( im_start_coords, blend->num_axis ) ||\n         FT_NEW_ARRAY( im_end_coords, blend->num_axis )   )\n      goto FExit;\n\n    tupleCount   = FT_GET_USHORT();\n    offsetToData = table_start + FT_GET_USHORT();\n\n    /* The documentation implies there are flags packed into the        */\n    /* tuplecount, but John Jenkins says that shared points don't apply */\n    /* to `cvar', and no other flags are defined.                       */\n\n    for ( i = 0; i < ( tupleCount & 0xFFF ); ++i )\n    {\n      FT_UInt   tupleDataSize;\n      FT_UInt   tupleIndex;\n      FT_Fixed  apply;\n\n\n      tupleDataSize = FT_GET_USHORT();\n      tupleIndex    = FT_GET_USHORT();\n\n      /* There is no provision here for a global tuple coordinate section, */\n      /* so John says.  There are no tuple indices, just embedded tuples.  */\n\n      if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD )\n      {\n        for ( j = 0; j < blend->num_axis; ++j )\n          tuple_coords[j] = FT_GET_SHORT() << 2; /* convert from        */\n                                                 /* short frac to fixed */\n      }\n      else\n      {\n        /* skip this tuple; it makes no sense */\n\n        if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE )\n          for ( j = 0; j < 2 * blend->num_axis; ++j )\n            (void)FT_GET_SHORT();\n\n        offsetToData += tupleDataSize;\n        continue;\n      }\n\n      if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE )\n      {\n        for ( j = 0; j < blend->num_axis; ++j )\n          im_start_coords[j] = FT_GET_SHORT() << 2;\n        for ( j = 0; j < blend->num_axis; ++j )\n          im_end_coords[j] = FT_GET_SHORT() << 2;\n      }\n\n      apply = ft_var_apply_tuple( blend,\n                                  (FT_UShort)tupleIndex,\n                                  tuple_coords,\n                                  im_start_coords,\n                                  im_end_coords );\n      if ( /* tuple isn't active for our blend */\n           apply == 0                                    ||\n           /* global points not allowed,           */\n           /* if they aren't local, makes no sense */\n           !( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS ) )\n      {\n        offsetToData += tupleDataSize;\n        continue;\n      }\n\n      here = FT_Stream_FTell( stream );\n\n      FT_Stream_SeekSet( stream, offsetToData );\n\n      localpoints = ft_var_readpackedpoints( stream, &point_count );\n      deltas      = ft_var_readpackeddeltas( stream,\n                                             point_count == 0 ? face->cvt_size\n                                                              : point_count );\n      if ( localpoints == NULL || deltas == NULL )\n        /* failure, ignore it */;\n\n      else if ( localpoints == ALL_POINTS )\n      {\n        /* this means that there are deltas for every entry in cvt */\n        for ( j = 0; j < face->cvt_size; ++j )\n          face->cvt[j] = (FT_Short)( face->cvt[j] +\n                                     FT_MulFix( deltas[j], apply ) );\n      }\n\n      else\n      {\n        for ( j = 0; j < point_count; ++j )\n        {\n          int  pindex = localpoints[j];\n\n          face->cvt[pindex] = (FT_Short)( face->cvt[pindex] +\n                                          FT_MulFix( deltas[j], apply ) );\n        }\n      }\n\n      if ( localpoints != ALL_POINTS )\n        FT_FREE( localpoints );\n      FT_FREE( deltas );\n\n      offsetToData += tupleDataSize;\n\n      FT_Stream_SeekSet( stream, here );\n    }\n\n  FExit:\n    FT_FRAME_EXIT();\n\n  Exit:\n    FT_FREE( tuple_coords );\n    FT_FREE( im_start_coords );\n    FT_FREE( im_end_coords );\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Vary_Get_Glyph_Deltas                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the appropriate deltas for the current glyph.                 */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: A handle to the target face object.                 */\n  /*                                                                       */\n  /*    glyph_index :: The index of the glyph being modified.              */\n  /*                                                                       */\n  /*    n_points    :: The number of the points in the glyph, including    */\n  /*                   phantom points.                                     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    deltas      :: The array of points to change.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  TT_Vary_Get_Glyph_Deltas( TT_Face      face,\n                            FT_UInt      glyph_index,\n                            FT_Vector*  *deltas,\n                            FT_UInt      n_points )\n  {\n    FT_Stream   stream = face->root.stream;\n    FT_Memory   memory = stream->memory;\n    GX_Blend    blend  = face->blend;\n    FT_Vector*  delta_xy = NULL;\n\n    FT_Error    error;\n    FT_ULong    glyph_start;\n    FT_UInt     tupleCount;\n    FT_ULong    offsetToData;\n    FT_ULong    here;\n    FT_UInt     i, j;\n    FT_Fixed*   tuple_coords    = NULL;\n    FT_Fixed*   im_start_coords = NULL;\n    FT_Fixed*   im_end_coords   = NULL;\n    FT_UInt     point_count, spoint_count = 0;\n    FT_UShort*  sharedpoints = NULL;\n    FT_UShort*  localpoints  = NULL;\n    FT_UShort*  points;\n    FT_Short    *deltas_x, *deltas_y;\n\n\n    if ( !face->doblend || blend == NULL )\n      return FT_THROW( Invalid_Argument );\n\n    /* to be freed by the caller */\n    if ( FT_NEW_ARRAY( delta_xy, n_points ) )\n      goto Exit;\n    *deltas = delta_xy;\n\n    if ( glyph_index >= blend->gv_glyphcnt      ||\n         blend->glyphoffsets[glyph_index] ==\n           blend->glyphoffsets[glyph_index + 1] )\n      return FT_Err_Ok;               /* no variation data for this glyph */\n\n    if ( FT_STREAM_SEEK( blend->glyphoffsets[glyph_index] )   ||\n         FT_FRAME_ENTER( blend->glyphoffsets[glyph_index + 1] -\n                           blend->glyphoffsets[glyph_index] ) )\n      goto Fail1;\n\n    glyph_start = FT_Stream_FTell( stream );\n\n    /* each set of glyph variation data is formatted similarly to `cvar' */\n    /* (except we get shared points and global tuples)                   */\n\n    if ( FT_NEW_ARRAY( tuple_coords, blend->num_axis )    ||\n         FT_NEW_ARRAY( im_start_coords, blend->num_axis ) ||\n         FT_NEW_ARRAY( im_end_coords, blend->num_axis )   )\n      goto Fail2;\n\n    tupleCount   = FT_GET_USHORT();\n    offsetToData = glyph_start + FT_GET_USHORT();\n\n    if ( tupleCount & GX_TC_TUPLES_SHARE_POINT_NUMBERS )\n    {\n      here = FT_Stream_FTell( stream );\n\n      FT_Stream_SeekSet( stream, offsetToData );\n\n      sharedpoints = ft_var_readpackedpoints( stream, &spoint_count );\n      offsetToData = FT_Stream_FTell( stream );\n\n      FT_Stream_SeekSet( stream, here );\n    }\n\n    for ( i = 0; i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK ); ++i )\n    {\n      FT_UInt   tupleDataSize;\n      FT_UInt   tupleIndex;\n      FT_Fixed  apply;\n\n\n      tupleDataSize = FT_GET_USHORT();\n      tupleIndex    = FT_GET_USHORT();\n\n      if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD )\n      {\n        for ( j = 0; j < blend->num_axis; ++j )\n          tuple_coords[j] = FT_GET_SHORT() << 2;  /* convert from        */\n                                                  /* short frac to fixed */\n      }\n      else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount )\n      {\n        error = FT_THROW( Invalid_Table );\n        goto Fail3;\n      }\n      else\n      {\n        FT_MEM_COPY(\n          tuple_coords,\n          &blend->tuplecoords[(tupleIndex & 0xFFF) * blend->num_axis],\n          blend->num_axis * sizeof ( FT_Fixed ) );\n      }\n\n      if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE )\n      {\n        for ( j = 0; j < blend->num_axis; ++j )\n          im_start_coords[j] = FT_GET_SHORT() << 2;\n        for ( j = 0; j < blend->num_axis; ++j )\n          im_end_coords[j] = FT_GET_SHORT() << 2;\n      }\n\n      apply = ft_var_apply_tuple( blend,\n                                  (FT_UShort)tupleIndex,\n                                  tuple_coords,\n                                  im_start_coords,\n                                  im_end_coords );\n\n      if ( apply == 0 )              /* tuple isn't active for our blend */\n      {\n        offsetToData += tupleDataSize;\n        continue;\n      }\n\n      here = FT_Stream_FTell( stream );\n\n      if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS )\n      {\n        FT_Stream_SeekSet( stream, offsetToData );\n\n        localpoints = ft_var_readpackedpoints( stream, &point_count );\n        points      = localpoints;\n      }\n      else\n      {\n        points      = sharedpoints;\n        point_count = spoint_count;\n      }\n\n      deltas_x = ft_var_readpackeddeltas( stream,\n                                          point_count == 0 ? n_points\n                                                           : point_count );\n      deltas_y = ft_var_readpackeddeltas( stream,\n                                          point_count == 0 ? n_points\n                                                           : point_count );\n\n      if ( points == NULL || deltas_y == NULL || deltas_x == NULL )\n        ; /* failure, ignore it */\n\n      else if ( points == ALL_POINTS )\n      {\n        /* this means that there are deltas for every point in the glyph */\n        for ( j = 0; j < n_points; ++j )\n        {\n          delta_xy[j].x += FT_MulFix( deltas_x[j], apply );\n          delta_xy[j].y += FT_MulFix( deltas_y[j], apply );\n        }\n      }\n\n      else\n      {\n        for ( j = 0; j < point_count; ++j )\n        {\n          if ( localpoints[j] >= n_points )\n            continue;\n\n          delta_xy[localpoints[j]].x += FT_MulFix( deltas_x[j], apply );\n          delta_xy[localpoints[j]].y += FT_MulFix( deltas_y[j], apply );\n        }\n      }\n\n      if ( localpoints != ALL_POINTS )\n        FT_FREE( localpoints );\n      FT_FREE( deltas_x );\n      FT_FREE( deltas_y );\n\n      offsetToData += tupleDataSize;\n\n      FT_Stream_SeekSet( stream, here );\n    }\n\n  Fail3:\n    FT_FREE( tuple_coords );\n    FT_FREE( im_start_coords );\n    FT_FREE( im_end_coords );\n\n  Fail2:\n    FT_FRAME_EXIT();\n\n  Fail1:\n    if ( error )\n    {\n      FT_FREE( delta_xy );\n      *deltas = NULL;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_done_blend                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Frees the blend internal data structure.                           */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  tt_done_blend( FT_Memory  memory,\n                 GX_Blend   blend )\n  {\n    if ( blend != NULL )\n    {\n      FT_UInt  i;\n\n\n      FT_FREE( blend->normalizedcoords );\n      FT_FREE( blend->mmvar );\n\n      if ( blend->avar_segment != NULL )\n      {\n        for ( i = 0; i < blend->num_axis; ++i )\n          FT_FREE( blend->avar_segment[i].correspondence );\n        FT_FREE( blend->avar_segment );\n      }\n\n      FT_FREE( blend->tuplecoords );\n      FT_FREE( blend->glyphoffsets );\n      FT_FREE( blend );\n    }\n  }\n\n#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttgxvar.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttgxvar.h                                                              */\n/*                                                                         */\n/*    TrueType GX Font Variation loader (specification)                    */\n/*                                                                         */\n/*  Copyright 2004 by                                                      */\n/*  David Turner, Robert Wilhelm, Werner Lemberg and George Williams.      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTGXVAR_H__\n#define __TTGXVAR_H__\n\n\n#include <ft2build.h>\n#include \"ttobjs.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    GX_AVarCorrespondenceRec                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A data structure representing `shortFracCorrespondence' in `avar'  */\n  /*    table according to the specifications from Apple.                  */\n  /*                                                                       */\n  typedef struct  GX_AVarCorrespondenceRec_\n  {\n    FT_Fixed  fromCoord;\n    FT_Fixed  toCoord;\n\n  } GX_AVarCorrespondenceRec_, *GX_AVarCorrespondence;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    GX_AVarRec                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Data from the segment field of `avar' table.                       */\n  /*    There is one of these for each axis.                               */\n  /*                                                                       */\n  typedef struct  GX_AVarSegmentRec_\n  {\n    FT_UShort              pairCount;\n    GX_AVarCorrespondence  correspondence; /* array with pairCount entries */\n\n  } GX_AVarSegmentRec, *GX_AVarSegment;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    GX_BlendRec                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Data for interpolating a font from a distortable font specified    */\n  /*    by the GX *var tables ([fgca]var).                                 */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_axis         :: The number of axes along which interpolation   */\n  /*                         may happen                                    */\n  /*                                                                       */\n  /*    normalizedcoords :: A normalized value (between [-1,1]) indicating */\n  /*                        the contribution along each axis to the final  */\n  /*                        interpolated font.                             */\n  /*                                                                       */\n  typedef struct  GX_BlendRec_\n  {\n    FT_UInt         num_axis;\n    FT_Fixed*       normalizedcoords;\n\n    FT_MM_Var*      mmvar;\n    FT_Offset       mmvar_len;\n\n    FT_Bool         avar_checked;\n    GX_AVarSegment  avar_segment;\n\n    FT_UInt         tuplecount;      /* shared tuples in `gvar'           */\n    FT_Fixed*       tuplecoords;     /* tuplecoords[tuplecount][num_axis] */\n\n    FT_UInt         gv_glyphcnt;\n    FT_ULong*       glyphoffsets;\n\n  } GX_BlendRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <enum>                                                                */\n  /*    GX_TupleCountFlags                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Flags used within the `TupleCount' field of the `gvar' table.      */\n  /*                                                                       */\n  typedef enum  GX_TupleCountFlags_\n  {\n    GX_TC_TUPLES_SHARE_POINT_NUMBERS = 0x8000,\n    GX_TC_RESERVED_TUPLE_FLAGS       = 0x7000,\n    GX_TC_TUPLE_COUNT_MASK           = 0x0FFF\n\n  } GX_TupleCountFlags;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <enum>                                                                */\n  /*    GX_TupleIndexFlags                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Flags used within the `TupleIndex' field of the `gvar' and `cvar'  */\n  /*    tables.                                                            */\n  /*                                                                       */\n  typedef enum  GX_TupleIndexFlags_\n  {\n    GX_TI_EMBEDDED_TUPLE_COORD  = 0x8000,\n    GX_TI_INTERMEDIATE_TUPLE    = 0x4000,\n    GX_TI_PRIVATE_POINT_NUMBERS = 0x2000,\n    GX_TI_RESERVED_TUPLE_FLAG   = 0x1000,\n    GX_TI_TUPLE_INDEX_MASK      = 0x0FFF\n\n  } GX_TupleIndexFlags;\n\n\n#define TTAG_wght  FT_MAKE_TAG( 'w', 'g', 'h', 't' )\n#define TTAG_wdth  FT_MAKE_TAG( 'w', 'd', 't', 'h' )\n#define TTAG_opsz  FT_MAKE_TAG( 'o', 'p', 's', 'z' )\n#define TTAG_slnt  FT_MAKE_TAG( 's', 'l', 'n', 't' )\n\n\n  FT_LOCAL( FT_Error )\n  TT_Set_MM_Blend( TT_Face    face,\n                   FT_UInt    num_coords,\n                   FT_Fixed*  coords );\n\n  FT_LOCAL( FT_Error )\n  TT_Set_Var_Design( TT_Face    face,\n                     FT_UInt    num_coords,\n                     FT_Fixed*  coords );\n\n  FT_LOCAL( FT_Error )\n  TT_Get_MM_Var( TT_Face      face,\n                 FT_MM_Var*  *master );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_vary_cvt( TT_Face    face,\n                    FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  TT_Vary_Get_Glyph_Deltas( TT_Face      face,\n                            FT_UInt      glyph_index,\n                            FT_Vector*  *deltas,\n                            FT_UInt      n_points );\n\n\n  FT_LOCAL( void )\n  tt_done_blend( FT_Memory  memory,\n                 GX_Blend   blend );\n\n\nFT_END_HEADER\n\n\n#endif /* __TTGXVAR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttinterp.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttinterp.c                                                             */\n/*                                                                         */\n/*    TrueType bytecode interpreter (body).                                */\n/*                                                                         */\n/*  Copyright 1996-2014                                                    */\n/*  by David Turner, Robert Wilhelm, and Werner Lemberg.                   */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n/* Greg Hitchcock from Microsoft has helped a lot in resolving unclear */\n/* issues; many thanks!                                                */\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_CALC_H\n#include FT_TRIGONOMETRY_H\n#include FT_SYSTEM_H\n#include FT_TRUETYPE_DRIVER_H\n\n#include \"ttinterp.h\"\n#include \"tterrors.h\"\n#include \"ttsubpix.h\"\n\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttinterp\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* In order to detect infinite loops in the code, we set up a counter    */\n  /* within the run loop.  A single stroke of interpretation is now        */\n  /* limited to a maximum number of opcodes defined below.                 */\n  /*                                                                       */\n#define MAX_RUNNABLE_OPCODES  1000000L\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* There are two kinds of implementations:                               */\n  /*                                                                       */\n  /* a. static implementation                                              */\n  /*                                                                       */\n  /*    The current execution context is a static variable, which fields   */\n  /*    are accessed directly by the interpreter during execution.  The    */\n  /*    context is named `cur'.                                            */\n  /*                                                                       */\n  /*    This version is non-reentrant, of course.                          */\n  /*                                                                       */\n  /* b. indirect implementation                                            */\n  /*                                                                       */\n  /*    The current execution context is passed to _each_ function as its  */\n  /*    first argument, and each field is thus accessed indirectly.        */\n  /*                                                                       */\n  /*    This version is fully re-entrant.                                  */\n  /*                                                                       */\n  /* The idea is that an indirect implementation may be slower to execute  */\n  /* on low-end processors that are used in some systems (like 386s or     */\n  /* even 486s).                                                           */\n  /*                                                                       */\n  /* As a consequence, the indirect implementation is now the default, as  */\n  /* its performance costs can be considered negligible in our context.    */\n  /* Note, however, that we kept the same source with macros because:      */\n  /*                                                                       */\n  /* - The code is kept very close in design to the Pascal code used for   */\n  /*   development.                                                        */\n  /*                                                                       */\n  /* - It's much more readable that way!                                   */\n  /*                                                                       */\n  /* - It's still open to experimentation and tuning.                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef TT_CONFIG_OPTION_STATIC_INTERPRETER     /* indirect implementation */\n\n#define CUR  (*exc)                             /* see ttobjs.h */\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This macro is used whenever `exec' is unused in a function, to avoid  */\n  /* stupid warnings from pedantic compilers.                              */\n  /*                                                                       */\n#define FT_UNUSED_EXEC  FT_UNUSED( exc )\n\n#else                                           /* static implementation */\n\n#define CUR  cur\n\n#define FT_UNUSED_EXEC  int  __dummy = __dummy\n\n  static\n  TT_ExecContextRec  cur;   /* static exec. context variable */\n\n  /* apparently, we have a _lot_ of direct indexing when accessing  */\n  /* the static `cur', which makes the code bigger (due to all the  */\n  /* four bytes addresses).                                         */\n\n#endif /* TT_CONFIG_OPTION_STATIC_INTERPRETER */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The instruction argument stack.                                       */\n  /*                                                                       */\n#define INS_ARG  EXEC_OP_ FT_Long*  args    /* see ttobjs.h for EXEC_OP_ */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This macro is used whenever `args' is unused in a function, to avoid  */\n  /* stupid warnings from pedantic compilers.                              */\n  /*                                                                       */\n#define FT_UNUSED_ARG  FT_UNUSED_EXEC; FT_UNUSED( args )\n\n\n#define SUBPIXEL_HINTING                                                    \\\n          ( ((TT_Driver)FT_FACE_DRIVER( CUR.face ))->interpreter_version == \\\n            TT_INTERPRETER_VERSION_38 )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The following macros hide the use of EXEC_ARG and EXEC_ARG_ to        */\n  /* increase readability of the code.                                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#define SKIP_Code() \\\n          SkipCode( EXEC_ARG )\n\n#define GET_ShortIns() \\\n          GetShortIns( EXEC_ARG )\n\n#define NORMalize( x, y, v ) \\\n          Normalize( EXEC_ARG_ x, y, v )\n\n#define SET_SuperRound( scale, flags ) \\\n          SetSuperRound( EXEC_ARG_ scale, flags )\n\n#define ROUND_None( d, c ) \\\n          Round_None( EXEC_ARG_ d, c )\n\n#define INS_Goto_CodeRange( range, ip ) \\\n          Ins_Goto_CodeRange( EXEC_ARG_ range, ip )\n\n#define CUR_Func_move( z, p, d ) \\\n          CUR.func_move( EXEC_ARG_ z, p, d )\n\n#define CUR_Func_move_orig( z, p, d ) \\\n          CUR.func_move_orig( EXEC_ARG_ z, p, d )\n\n#define CUR_Func_round( d, c ) \\\n          CUR.func_round( EXEC_ARG_ d, c )\n\n#define CUR_Func_cur_ppem() \\\n          CUR.func_cur_ppem( EXEC_ARG )\n\n#define CUR_Func_read_cvt( index ) \\\n          CUR.func_read_cvt( EXEC_ARG_ index )\n\n#define CUR_Func_write_cvt( index, val ) \\\n          CUR.func_write_cvt( EXEC_ARG_ index, val )\n\n#define CUR_Func_move_cvt( index, val ) \\\n          CUR.func_move_cvt( EXEC_ARG_ index, val )\n\n#define CURRENT_Ratio() \\\n          Current_Ratio( EXEC_ARG )\n\n#define INS_SxVTL( a, b, c, d ) \\\n          Ins_SxVTL( EXEC_ARG_ a, b, c, d )\n\n#define COMPUTE_Funcs() \\\n          Compute_Funcs( EXEC_ARG )\n\n#define COMPUTE_Round( a ) \\\n          Compute_Round( EXEC_ARG_ a )\n\n#define COMPUTE_Point_Displacement( a, b, c, d ) \\\n          Compute_Point_Displacement( EXEC_ARG_ a, b, c, d )\n\n#define MOVE_Zp2_Point( a, b, c, t ) \\\n          Move_Zp2_Point( EXEC_ARG_ a, b, c, t )\n\n\n#define CUR_Func_project( v1, v2 )  \\\n          CUR.func_project( EXEC_ARG_ (v1)->x - (v2)->x, (v1)->y - (v2)->y )\n\n#define CUR_Func_dualproj( v1, v2 )  \\\n          CUR.func_dualproj( EXEC_ARG_ (v1)->x - (v2)->x, (v1)->y - (v2)->y )\n\n#define CUR_fast_project( v ) \\\n          CUR.func_project( EXEC_ARG_ (v)->x, (v)->y )\n\n#define CUR_fast_dualproj( v ) \\\n          CUR.func_dualproj( EXEC_ARG_ (v)->x, (v)->y )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Instruction dispatch function, as used by the interpreter.            */\n  /*                                                                       */\n  typedef void  (*TInstruction_Function)( INS_ARG );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Two simple bounds-checking macros.                                    */\n  /*                                                                       */\n#define BOUNDS( x, n )   ( (FT_UInt)(x)  >= (FT_UInt)(n)  )\n#define BOUNDSL( x, n )  ( (FT_ULong)(x) >= (FT_ULong)(n) )\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This macro computes (a*2^14)/b and complements TT_MulFix14.           */\n  /*                                                                       */\n#define TT_DivFix14( a, b ) \\\n          FT_DivFix( a, (b) << 2 )\n\n\n#undef  SUCCESS\n#define SUCCESS  0\n\n#undef  FAILURE\n#define FAILURE  1\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n#define GUESS_VECTOR( V )                                         \\\n  if ( CUR.face->unpatented_hinting )                             \\\n  {                                                               \\\n    CUR.GS.V.x = (FT_F2Dot14)( CUR.GS.both_x_axis ? 0x4000 : 0 ); \\\n    CUR.GS.V.y = (FT_F2Dot14)( CUR.GS.both_x_axis ? 0 : 0x4000 ); \\\n  }\n#else\n#define GUESS_VECTOR( V )\n#endif\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                        CODERANGE FUNCTIONS                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Goto_CodeRange                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Switches to a new code range (updates the code related elements in */\n  /*    `exec', and `IP').                                                 */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    range :: The new execution code range.                             */\n  /*                                                                       */\n  /*    IP    :: The new IP in the new code range.                         */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    exec  :: The target execution context.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  TT_Goto_CodeRange( TT_ExecContext  exec,\n                     FT_Int          range,\n                     FT_Long         IP )\n  {\n    TT_CodeRange*  coderange;\n\n\n    FT_ASSERT( range >= 1 && range <= 3 );\n\n    coderange = &exec->codeRangeTable[range - 1];\n\n    FT_ASSERT( coderange->base != NULL );\n\n    /* NOTE: Because the last instruction of a program may be a CALL */\n    /*       which will return to the first byte *after* the code    */\n    /*       range, we test for IP <= Size instead of IP < Size.     */\n    /*                                                               */\n    FT_ASSERT( (FT_ULong)IP <= coderange->size );\n\n    exec->code     = coderange->base;\n    exec->codeSize = coderange->size;\n    exec->IP       = IP;\n    exec->curRange = range;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Set_CodeRange                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Sets a code range.                                                 */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    range  :: The code range index.                                    */\n  /*                                                                       */\n  /*    base   :: The new code base.                                       */\n  /*                                                                       */\n  /*    length :: The range size in bytes.                                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    exec   :: The target execution context.                            */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  TT_Set_CodeRange( TT_ExecContext  exec,\n                    FT_Int          range,\n                    void*           base,\n                    FT_Long         length )\n  {\n    FT_ASSERT( range >= 1 && range <= 3 );\n\n    exec->codeRangeTable[range - 1].base = (FT_Byte*)base;\n    exec->codeRangeTable[range - 1].size = length;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Clear_CodeRange                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Clears a code range.                                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    range :: The code range index.                                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    exec  :: The target execution context.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  TT_Clear_CodeRange( TT_ExecContext  exec,\n                      FT_Int          range )\n  {\n    FT_ASSERT( range >= 1 && range <= 3 );\n\n    exec->codeRangeTable[range - 1].base = NULL;\n    exec->codeRangeTable[range - 1].size = 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                   EXECUTION CONTEXT ROUTINES                          */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Done_Context                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroys a given context.                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    exec   :: A handle to the target execution context.                */\n  /*                                                                       */\n  /*    memory :: A handle to the parent memory object.                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only the glyph loader and debugger should call this function.      */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  TT_Done_Context( TT_ExecContext  exec )\n  {\n    FT_Memory  memory = exec->memory;\n\n\n    /* points zone */\n    exec->maxPoints   = 0;\n    exec->maxContours = 0;\n\n    /* free stack */\n    FT_FREE( exec->stack );\n    exec->stackSize = 0;\n\n    /* free call stack */\n    FT_FREE( exec->callStack );\n    exec->callSize = 0;\n    exec->callTop  = 0;\n\n    /* free glyph code range */\n    FT_FREE( exec->glyphIns );\n    exec->glyphSize = 0;\n\n    exec->size = NULL;\n    exec->face = NULL;\n\n    FT_FREE( exec );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Init_Context                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initializes a context object.                                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory :: A handle to the parent memory object.                    */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    exec   :: A handle to the target execution context.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  static FT_Error\n  Init_Context( TT_ExecContext  exec,\n                FT_Memory       memory )\n  {\n    FT_Error  error;\n\n\n    FT_TRACE1(( \"Init_Context: new object at 0x%08p\\n\", exec ));\n\n    exec->memory   = memory;\n    exec->callSize = 32;\n\n    if ( FT_NEW_ARRAY( exec->callStack, exec->callSize ) )\n      goto Fail_Memory;\n\n    /* all values in the context are set to 0 already, but this is */\n    /* here as a remainder                                         */\n    exec->maxPoints   = 0;\n    exec->maxContours = 0;\n\n    exec->stackSize = 0;\n    exec->glyphSize = 0;\n\n    exec->stack     = NULL;\n    exec->glyphIns  = NULL;\n\n    exec->face = NULL;\n    exec->size = NULL;\n\n    return FT_Err_Ok;\n\n  Fail_Memory:\n    FT_ERROR(( \"Init_Context: not enough memory for %p\\n\", exec ));\n    TT_Done_Context( exec );\n\n    return error;\n }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Update_Max                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Checks the size of a buffer and reallocates it if necessary.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory     :: A handle to the parent memory object.                */\n  /*                                                                       */\n  /*    multiplier :: The size in bytes of each element in the buffer.     */\n  /*                                                                       */\n  /*    new_max    :: The new capacity (size) of the buffer.               */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    size       :: The address of the buffer's current size expressed   */\n  /*                  in elements.                                         */\n  /*                                                                       */\n  /*    buff       :: The address of the buffer base pointer.              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  Update_Max( FT_Memory  memory,\n              FT_ULong*  size,\n              FT_Long    multiplier,\n              void*      _pbuff,\n              FT_ULong   new_max )\n  {\n    FT_Error  error;\n    void**    pbuff = (void**)_pbuff;\n\n\n    if ( *size < new_max )\n    {\n      if ( FT_REALLOC( *pbuff, *size * multiplier, new_max * multiplier ) )\n        return error;\n      *size = new_max;\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Load_Context                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Prepare an execution context for glyph hinting.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source face object.                        */\n  /*                                                                       */\n  /*    size :: A handle to the source size object.                        */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    exec :: A handle to the target execution context.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only the glyph loader and debugger should call this function.      */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  TT_Load_Context( TT_ExecContext  exec,\n                   TT_Face         face,\n                   TT_Size         size )\n  {\n    FT_Int          i;\n    FT_ULong        tmp;\n    TT_MaxProfile*  maxp;\n    FT_Error        error;\n\n\n    exec->face = face;\n    maxp       = &face->max_profile;\n    exec->size = size;\n\n    if ( size )\n    {\n      exec->numFDefs   = size->num_function_defs;\n      exec->maxFDefs   = size->max_function_defs;\n      exec->numIDefs   = size->num_instruction_defs;\n      exec->maxIDefs   = size->max_instruction_defs;\n      exec->FDefs      = size->function_defs;\n      exec->IDefs      = size->instruction_defs;\n      exec->tt_metrics = size->ttmetrics;\n      exec->metrics    = size->metrics;\n\n      exec->maxFunc    = size->max_func;\n      exec->maxIns     = size->max_ins;\n\n      for ( i = 0; i < TT_MAX_CODE_RANGES; i++ )\n        exec->codeRangeTable[i] = size->codeRangeTable[i];\n\n      /* set graphics state */\n      exec->GS = size->GS;\n\n      exec->cvtSize = size->cvt_size;\n      exec->cvt     = size->cvt;\n\n      exec->storeSize = size->storage_size;\n      exec->storage   = size->storage;\n\n      exec->twilight  = size->twilight;\n\n      /* In case of multi-threading it can happen that the old size object */\n      /* no longer exists, thus we must clear all glyph zone references.   */\n      ft_memset( &exec->zp0, 0, sizeof ( exec->zp0 ) );\n      exec->zp1 = exec->zp0;\n      exec->zp2 = exec->zp0;\n    }\n\n    /* XXX: We reserve a little more elements on the stack to deal safely */\n    /*      with broken fonts like arialbs, courbs, timesbs, etc.         */\n    tmp = exec->stackSize;\n    error = Update_Max( exec->memory,\n                        &tmp,\n                        sizeof ( FT_F26Dot6 ),\n                        (void*)&exec->stack,\n                        maxp->maxStackElements + 32 );\n    exec->stackSize = (FT_UInt)tmp;\n    if ( error )\n      return error;\n\n    tmp = exec->glyphSize;\n    error = Update_Max( exec->memory,\n                        &tmp,\n                        sizeof ( FT_Byte ),\n                        (void*)&exec->glyphIns,\n                        maxp->maxSizeOfInstructions );\n    exec->glyphSize = (FT_UShort)tmp;\n    if ( error )\n      return error;\n\n    exec->pts.n_points   = 0;\n    exec->pts.n_contours = 0;\n\n    exec->zp1 = exec->pts;\n    exec->zp2 = exec->pts;\n    exec->zp0 = exec->pts;\n\n    exec->instruction_trap = FALSE;\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Save_Context                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Saves the code ranges in a `size' object.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    exec :: A handle to the source execution context.                  */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    size :: A handle to the target size object.                        */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only the glyph loader and debugger should call this function.      */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  TT_Save_Context( TT_ExecContext  exec,\n                   TT_Size         size )\n  {\n    FT_Int  i;\n\n\n    /* XXX: Will probably disappear soon with all the code range */\n    /*      management, which is now rather obsolete.            */\n    /*                                                           */\n    size->num_function_defs    = exec->numFDefs;\n    size->num_instruction_defs = exec->numIDefs;\n\n    size->max_func = exec->maxFunc;\n    size->max_ins  = exec->maxIns;\n\n    for ( i = 0; i < TT_MAX_CODE_RANGES; i++ )\n      size->codeRangeTable[i] = exec->codeRangeTable[i];\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_Run_Context                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Executes one or more instructions in the execution context.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    debug :: A Boolean flag.  If set, the function sets some internal  */\n  /*             variables and returns immediately, otherwise TT_RunIns()  */\n  /*             is called.                                                */\n  /*                                                                       */\n  /*             This is commented out currently.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    exec  :: A handle to the target execution context.                 */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    TrueType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only the glyph loader and debugger should call this function.      */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  TT_Run_Context( TT_ExecContext  exec,\n                  FT_Bool         debug )\n  {\n    TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 );\n\n    exec->zp0 = exec->pts;\n    exec->zp1 = exec->pts;\n    exec->zp2 = exec->pts;\n\n    exec->GS.gep0 = 1;\n    exec->GS.gep1 = 1;\n    exec->GS.gep2 = 1;\n\n    exec->GS.projVector.x = 0x4000;\n    exec->GS.projVector.y = 0x0000;\n\n    exec->GS.freeVector = exec->GS.projVector;\n    exec->GS.dualVector = exec->GS.projVector;\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    exec->GS.both_x_axis = TRUE;\n#endif\n\n    exec->GS.round_state = 1;\n    exec->GS.loop        = 1;\n\n    /* some glyphs leave something on the stack. so we clean it */\n    /* before a new execution.                                  */\n    exec->top     = 0;\n    exec->callTop = 0;\n\n#if 1\n    FT_UNUSED( debug );\n\n    return exec->face->interpreter( exec );\n#else\n    if ( !debug )\n      return TT_RunIns( exec );\n    else\n      return FT_Err_Ok;\n#endif\n  }\n\n\n  /* The default value for `scan_control' is documented as FALSE in the */\n  /* TrueType specification.  This is confusing since it implies a      */\n  /* Boolean value.  However, this is not the case, thus both the       */\n  /* default values of our `scan_type' and `scan_control' fields (which */\n  /* the documentation's `scan_control' variable is split into) are     */\n  /* zero.                                                              */\n\n  const TT_GraphicsState  tt_default_graphics_state =\n  {\n    0, 0, 0,\n    { 0x4000, 0 },\n    { 0x4000, 0 },\n    { 0x4000, 0 },\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    TRUE,\n#endif\n\n    1, 64, 1,\n    TRUE, 68, 0, 0, 9, 3,\n    0, FALSE, 0, 1, 1, 1\n  };\n\n\n  /* documentation is in ttinterp.h */\n\n  FT_EXPORT_DEF( TT_ExecContext )\n  TT_New_Context( TT_Driver  driver )\n  {\n    FT_Memory  memory;\n\n\n    if ( !driver )\n      goto Fail;\n\n    memory = driver->root.root.memory;\n\n    if ( !driver->context )\n    {\n      FT_Error        error;\n      TT_ExecContext  exec;\n\n\n      /* allocate object */\n      if ( FT_NEW( exec ) )\n        goto Fail;\n\n      /* initialize it; in case of error this deallocates `exec' too */\n      error = Init_Context( exec, memory );\n      if ( error )\n        goto Fail;\n\n      /* store it into the driver */\n      driver->context = exec;\n    }\n\n    return driver->context;\n\n  Fail:\n    return NULL;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Before an opcode is executed, the interpreter verifies that there are */\n  /* enough arguments on the stack, with the help of the `Pop_Push_Count'  */\n  /* table.                                                                */\n  /*                                                                       */\n  /* For each opcode, the first column gives the number of arguments that  */\n  /* are popped from the stack; the second one gives the number of those   */\n  /* that are pushed in result.                                            */\n  /*                                                                       */\n  /* Opcodes which have a varying number of parameters in the data stream  */\n  /* (NPUSHB, NPUSHW) are handled specially; they have a negative value in */\n  /* the `opcode_length' table, and the value in `Pop_Push_Count' is set   */\n  /* to zero.                                                              */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#undef  PACK\n#define PACK( x, y )  ( ( x << 4 ) | y )\n\n\n  static\n  const FT_Byte  Pop_Push_Count[256] =\n  {\n    /* opcodes are gathered in groups of 16 */\n    /* please keep the spaces as they are   */\n\n    /*  SVTCA  y  */  PACK( 0, 0 ),\n    /*  SVTCA  x  */  PACK( 0, 0 ),\n    /*  SPvTCA y  */  PACK( 0, 0 ),\n    /*  SPvTCA x  */  PACK( 0, 0 ),\n    /*  SFvTCA y  */  PACK( 0, 0 ),\n    /*  SFvTCA x  */  PACK( 0, 0 ),\n    /*  SPvTL //  */  PACK( 2, 0 ),\n    /*  SPvTL +   */  PACK( 2, 0 ),\n    /*  SFvTL //  */  PACK( 2, 0 ),\n    /*  SFvTL +   */  PACK( 2, 0 ),\n    /*  SPvFS     */  PACK( 2, 0 ),\n    /*  SFvFS     */  PACK( 2, 0 ),\n    /*  GPV       */  PACK( 0, 2 ),\n    /*  GFV       */  PACK( 0, 2 ),\n    /*  SFvTPv    */  PACK( 0, 0 ),\n    /*  ISECT     */  PACK( 5, 0 ),\n\n    /*  SRP0      */  PACK( 1, 0 ),\n    /*  SRP1      */  PACK( 1, 0 ),\n    /*  SRP2      */  PACK( 1, 0 ),\n    /*  SZP0      */  PACK( 1, 0 ),\n    /*  SZP1      */  PACK( 1, 0 ),\n    /*  SZP2      */  PACK( 1, 0 ),\n    /*  SZPS      */  PACK( 1, 0 ),\n    /*  SLOOP     */  PACK( 1, 0 ),\n    /*  RTG       */  PACK( 0, 0 ),\n    /*  RTHG      */  PACK( 0, 0 ),\n    /*  SMD       */  PACK( 1, 0 ),\n    /*  ELSE      */  PACK( 0, 0 ),\n    /*  JMPR      */  PACK( 1, 0 ),\n    /*  SCvTCi    */  PACK( 1, 0 ),\n    /*  SSwCi     */  PACK( 1, 0 ),\n    /*  SSW       */  PACK( 1, 0 ),\n\n    /*  DUP       */  PACK( 1, 2 ),\n    /*  POP       */  PACK( 1, 0 ),\n    /*  CLEAR     */  PACK( 0, 0 ),\n    /*  SWAP      */  PACK( 2, 2 ),\n    /*  DEPTH     */  PACK( 0, 1 ),\n    /*  CINDEX    */  PACK( 1, 1 ),\n    /*  MINDEX    */  PACK( 1, 0 ),\n    /*  AlignPTS  */  PACK( 2, 0 ),\n    /*  INS_$28   */  PACK( 0, 0 ),\n    /*  UTP       */  PACK( 1, 0 ),\n    /*  LOOPCALL  */  PACK( 2, 0 ),\n    /*  CALL      */  PACK( 1, 0 ),\n    /*  FDEF      */  PACK( 1, 0 ),\n    /*  ENDF      */  PACK( 0, 0 ),\n    /*  MDAP[0]   */  PACK( 1, 0 ),\n    /*  MDAP[1]   */  PACK( 1, 0 ),\n\n    /*  IUP[0]    */  PACK( 0, 0 ),\n    /*  IUP[1]    */  PACK( 0, 0 ),\n    /*  SHP[0]    */  PACK( 0, 0 ),\n    /*  SHP[1]    */  PACK( 0, 0 ),\n    /*  SHC[0]    */  PACK( 1, 0 ),\n    /*  SHC[1]    */  PACK( 1, 0 ),\n    /*  SHZ[0]    */  PACK( 1, 0 ),\n    /*  SHZ[1]    */  PACK( 1, 0 ),\n    /*  SHPIX     */  PACK( 1, 0 ),\n    /*  IP        */  PACK( 0, 0 ),\n    /*  MSIRP[0]  */  PACK( 2, 0 ),\n    /*  MSIRP[1]  */  PACK( 2, 0 ),\n    /*  AlignRP   */  PACK( 0, 0 ),\n    /*  RTDG      */  PACK( 0, 0 ),\n    /*  MIAP[0]   */  PACK( 2, 0 ),\n    /*  MIAP[1]   */  PACK( 2, 0 ),\n\n    /*  NPushB    */  PACK( 0, 0 ),\n    /*  NPushW    */  PACK( 0, 0 ),\n    /*  WS        */  PACK( 2, 0 ),\n    /*  RS        */  PACK( 1, 1 ),\n    /*  WCvtP     */  PACK( 2, 0 ),\n    /*  RCvt      */  PACK( 1, 1 ),\n    /*  GC[0]     */  PACK( 1, 1 ),\n    /*  GC[1]     */  PACK( 1, 1 ),\n    /*  SCFS      */  PACK( 2, 0 ),\n    /*  MD[0]     */  PACK( 2, 1 ),\n    /*  MD[1]     */  PACK( 2, 1 ),\n    /*  MPPEM     */  PACK( 0, 1 ),\n    /*  MPS       */  PACK( 0, 1 ),\n    /*  FlipON    */  PACK( 0, 0 ),\n    /*  FlipOFF   */  PACK( 0, 0 ),\n    /*  DEBUG     */  PACK( 1, 0 ),\n\n    /*  LT        */  PACK( 2, 1 ),\n    /*  LTEQ      */  PACK( 2, 1 ),\n    /*  GT        */  PACK( 2, 1 ),\n    /*  GTEQ      */  PACK( 2, 1 ),\n    /*  EQ        */  PACK( 2, 1 ),\n    /*  NEQ       */  PACK( 2, 1 ),\n    /*  ODD       */  PACK( 1, 1 ),\n    /*  EVEN      */  PACK( 1, 1 ),\n    /*  IF        */  PACK( 1, 0 ),\n    /*  EIF       */  PACK( 0, 0 ),\n    /*  AND       */  PACK( 2, 1 ),\n    /*  OR        */  PACK( 2, 1 ),\n    /*  NOT       */  PACK( 1, 1 ),\n    /*  DeltaP1   */  PACK( 1, 0 ),\n    /*  SDB       */  PACK( 1, 0 ),\n    /*  SDS       */  PACK( 1, 0 ),\n\n    /*  ADD       */  PACK( 2, 1 ),\n    /*  SUB       */  PACK( 2, 1 ),\n    /*  DIV       */  PACK( 2, 1 ),\n    /*  MUL       */  PACK( 2, 1 ),\n    /*  ABS       */  PACK( 1, 1 ),\n    /*  NEG       */  PACK( 1, 1 ),\n    /*  FLOOR     */  PACK( 1, 1 ),\n    /*  CEILING   */  PACK( 1, 1 ),\n    /*  ROUND[0]  */  PACK( 1, 1 ),\n    /*  ROUND[1]  */  PACK( 1, 1 ),\n    /*  ROUND[2]  */  PACK( 1, 1 ),\n    /*  ROUND[3]  */  PACK( 1, 1 ),\n    /*  NROUND[0] */  PACK( 1, 1 ),\n    /*  NROUND[1] */  PACK( 1, 1 ),\n    /*  NROUND[2] */  PACK( 1, 1 ),\n    /*  NROUND[3] */  PACK( 1, 1 ),\n\n    /*  WCvtF     */  PACK( 2, 0 ),\n    /*  DeltaP2   */  PACK( 1, 0 ),\n    /*  DeltaP3   */  PACK( 1, 0 ),\n    /*  DeltaCn[0] */ PACK( 1, 0 ),\n    /*  DeltaCn[1] */ PACK( 1, 0 ),\n    /*  DeltaCn[2] */ PACK( 1, 0 ),\n    /*  SROUND    */  PACK( 1, 0 ),\n    /*  S45Round  */  PACK( 1, 0 ),\n    /*  JROT      */  PACK( 2, 0 ),\n    /*  JROF      */  PACK( 2, 0 ),\n    /*  ROFF      */  PACK( 0, 0 ),\n    /*  INS_$7B   */  PACK( 0, 0 ),\n    /*  RUTG      */  PACK( 0, 0 ),\n    /*  RDTG      */  PACK( 0, 0 ),\n    /*  SANGW     */  PACK( 1, 0 ),\n    /*  AA        */  PACK( 1, 0 ),\n\n    /*  FlipPT    */  PACK( 0, 0 ),\n    /*  FlipRgON  */  PACK( 2, 0 ),\n    /*  FlipRgOFF */  PACK( 2, 0 ),\n    /*  INS_$83   */  PACK( 0, 0 ),\n    /*  INS_$84   */  PACK( 0, 0 ),\n    /*  ScanCTRL  */  PACK( 1, 0 ),\n    /*  SDPVTL[0] */  PACK( 2, 0 ),\n    /*  SDPVTL[1] */  PACK( 2, 0 ),\n    /*  GetINFO   */  PACK( 1, 1 ),\n    /*  IDEF      */  PACK( 1, 0 ),\n    /*  ROLL      */  PACK( 3, 3 ),\n    /*  MAX       */  PACK( 2, 1 ),\n    /*  MIN       */  PACK( 2, 1 ),\n    /*  ScanTYPE  */  PACK( 1, 0 ),\n    /*  InstCTRL  */  PACK( 2, 0 ),\n    /*  INS_$8F   */  PACK( 0, 0 ),\n\n    /*  INS_$90  */   PACK( 0, 0 ),\n    /*  INS_$91  */   PACK( 0, 0 ),\n    /*  INS_$92  */   PACK( 0, 0 ),\n    /*  INS_$93  */   PACK( 0, 0 ),\n    /*  INS_$94  */   PACK( 0, 0 ),\n    /*  INS_$95  */   PACK( 0, 0 ),\n    /*  INS_$96  */   PACK( 0, 0 ),\n    /*  INS_$97  */   PACK( 0, 0 ),\n    /*  INS_$98  */   PACK( 0, 0 ),\n    /*  INS_$99  */   PACK( 0, 0 ),\n    /*  INS_$9A  */   PACK( 0, 0 ),\n    /*  INS_$9B  */   PACK( 0, 0 ),\n    /*  INS_$9C  */   PACK( 0, 0 ),\n    /*  INS_$9D  */   PACK( 0, 0 ),\n    /*  INS_$9E  */   PACK( 0, 0 ),\n    /*  INS_$9F  */   PACK( 0, 0 ),\n\n    /*  INS_$A0  */   PACK( 0, 0 ),\n    /*  INS_$A1  */   PACK( 0, 0 ),\n    /*  INS_$A2  */   PACK( 0, 0 ),\n    /*  INS_$A3  */   PACK( 0, 0 ),\n    /*  INS_$A4  */   PACK( 0, 0 ),\n    /*  INS_$A5  */   PACK( 0, 0 ),\n    /*  INS_$A6  */   PACK( 0, 0 ),\n    /*  INS_$A7  */   PACK( 0, 0 ),\n    /*  INS_$A8  */   PACK( 0, 0 ),\n    /*  INS_$A9  */   PACK( 0, 0 ),\n    /*  INS_$AA  */   PACK( 0, 0 ),\n    /*  INS_$AB  */   PACK( 0, 0 ),\n    /*  INS_$AC  */   PACK( 0, 0 ),\n    /*  INS_$AD  */   PACK( 0, 0 ),\n    /*  INS_$AE  */   PACK( 0, 0 ),\n    /*  INS_$AF  */   PACK( 0, 0 ),\n\n    /*  PushB[0]  */  PACK( 0, 1 ),\n    /*  PushB[1]  */  PACK( 0, 2 ),\n    /*  PushB[2]  */  PACK( 0, 3 ),\n    /*  PushB[3]  */  PACK( 0, 4 ),\n    /*  PushB[4]  */  PACK( 0, 5 ),\n    /*  PushB[5]  */  PACK( 0, 6 ),\n    /*  PushB[6]  */  PACK( 0, 7 ),\n    /*  PushB[7]  */  PACK( 0, 8 ),\n    /*  PushW[0]  */  PACK( 0, 1 ),\n    /*  PushW[1]  */  PACK( 0, 2 ),\n    /*  PushW[2]  */  PACK( 0, 3 ),\n    /*  PushW[3]  */  PACK( 0, 4 ),\n    /*  PushW[4]  */  PACK( 0, 5 ),\n    /*  PushW[5]  */  PACK( 0, 6 ),\n    /*  PushW[6]  */  PACK( 0, 7 ),\n    /*  PushW[7]  */  PACK( 0, 8 ),\n\n    /*  MDRP[00]  */  PACK( 1, 0 ),\n    /*  MDRP[01]  */  PACK( 1, 0 ),\n    /*  MDRP[02]  */  PACK( 1, 0 ),\n    /*  MDRP[03]  */  PACK( 1, 0 ),\n    /*  MDRP[04]  */  PACK( 1, 0 ),\n    /*  MDRP[05]  */  PACK( 1, 0 ),\n    /*  MDRP[06]  */  PACK( 1, 0 ),\n    /*  MDRP[07]  */  PACK( 1, 0 ),\n    /*  MDRP[08]  */  PACK( 1, 0 ),\n    /*  MDRP[09]  */  PACK( 1, 0 ),\n    /*  MDRP[10]  */  PACK( 1, 0 ),\n    /*  MDRP[11]  */  PACK( 1, 0 ),\n    /*  MDRP[12]  */  PACK( 1, 0 ),\n    /*  MDRP[13]  */  PACK( 1, 0 ),\n    /*  MDRP[14]  */  PACK( 1, 0 ),\n    /*  MDRP[15]  */  PACK( 1, 0 ),\n\n    /*  MDRP[16]  */  PACK( 1, 0 ),\n    /*  MDRP[17]  */  PACK( 1, 0 ),\n    /*  MDRP[18]  */  PACK( 1, 0 ),\n    /*  MDRP[19]  */  PACK( 1, 0 ),\n    /*  MDRP[20]  */  PACK( 1, 0 ),\n    /*  MDRP[21]  */  PACK( 1, 0 ),\n    /*  MDRP[22]  */  PACK( 1, 0 ),\n    /*  MDRP[23]  */  PACK( 1, 0 ),\n    /*  MDRP[24]  */  PACK( 1, 0 ),\n    /*  MDRP[25]  */  PACK( 1, 0 ),\n    /*  MDRP[26]  */  PACK( 1, 0 ),\n    /*  MDRP[27]  */  PACK( 1, 0 ),\n    /*  MDRP[28]  */  PACK( 1, 0 ),\n    /*  MDRP[29]  */  PACK( 1, 0 ),\n    /*  MDRP[30]  */  PACK( 1, 0 ),\n    /*  MDRP[31]  */  PACK( 1, 0 ),\n\n    /*  MIRP[00]  */  PACK( 2, 0 ),\n    /*  MIRP[01]  */  PACK( 2, 0 ),\n    /*  MIRP[02]  */  PACK( 2, 0 ),\n    /*  MIRP[03]  */  PACK( 2, 0 ),\n    /*  MIRP[04]  */  PACK( 2, 0 ),\n    /*  MIRP[05]  */  PACK( 2, 0 ),\n    /*  MIRP[06]  */  PACK( 2, 0 ),\n    /*  MIRP[07]  */  PACK( 2, 0 ),\n    /*  MIRP[08]  */  PACK( 2, 0 ),\n    /*  MIRP[09]  */  PACK( 2, 0 ),\n    /*  MIRP[10]  */  PACK( 2, 0 ),\n    /*  MIRP[11]  */  PACK( 2, 0 ),\n    /*  MIRP[12]  */  PACK( 2, 0 ),\n    /*  MIRP[13]  */  PACK( 2, 0 ),\n    /*  MIRP[14]  */  PACK( 2, 0 ),\n    /*  MIRP[15]  */  PACK( 2, 0 ),\n\n    /*  MIRP[16]  */  PACK( 2, 0 ),\n    /*  MIRP[17]  */  PACK( 2, 0 ),\n    /*  MIRP[18]  */  PACK( 2, 0 ),\n    /*  MIRP[19]  */  PACK( 2, 0 ),\n    /*  MIRP[20]  */  PACK( 2, 0 ),\n    /*  MIRP[21]  */  PACK( 2, 0 ),\n    /*  MIRP[22]  */  PACK( 2, 0 ),\n    /*  MIRP[23]  */  PACK( 2, 0 ),\n    /*  MIRP[24]  */  PACK( 2, 0 ),\n    /*  MIRP[25]  */  PACK( 2, 0 ),\n    /*  MIRP[26]  */  PACK( 2, 0 ),\n    /*  MIRP[27]  */  PACK( 2, 0 ),\n    /*  MIRP[28]  */  PACK( 2, 0 ),\n    /*  MIRP[29]  */  PACK( 2, 0 ),\n    /*  MIRP[30]  */  PACK( 2, 0 ),\n    /*  MIRP[31]  */  PACK( 2, 0 )\n  };\n\n\n#ifdef FT_DEBUG_LEVEL_TRACE\n\n  static\n  const char*  const opcode_name[256] =\n  {\n    \"SVTCA y\",\n    \"SVTCA x\",\n    \"SPvTCA y\",\n    \"SPvTCA x\",\n    \"SFvTCA y\",\n    \"SFvTCA x\",\n    \"SPvTL ||\",\n    \"SPvTL +\",\n    \"SFvTL ||\",\n    \"SFvTL +\",\n    \"SPvFS\",\n    \"SFvFS\",\n    \"GPV\",\n    \"GFV\",\n    \"SFvTPv\",\n    \"ISECT\",\n\n    \"SRP0\",\n    \"SRP1\",\n    \"SRP2\",\n    \"SZP0\",\n    \"SZP1\",\n    \"SZP2\",\n    \"SZPS\",\n    \"SLOOP\",\n    \"RTG\",\n    \"RTHG\",\n    \"SMD\",\n    \"ELSE\",\n    \"JMPR\",\n    \"SCvTCi\",\n    \"SSwCi\",\n    \"SSW\",\n\n    \"DUP\",\n    \"POP\",\n    \"CLEAR\",\n    \"SWAP\",\n    \"DEPTH\",\n    \"CINDEX\",\n    \"MINDEX\",\n    \"AlignPTS\",\n    \"INS_$28\",\n    \"UTP\",\n    \"LOOPCALL\",\n    \"CALL\",\n    \"FDEF\",\n    \"ENDF\",\n    \"MDAP[0]\",\n    \"MDAP[1]\",\n\n    \"IUP[0]\",\n    \"IUP[1]\",\n    \"SHP[0]\",\n    \"SHP[1]\",\n    \"SHC[0]\",\n    \"SHC[1]\",\n    \"SHZ[0]\",\n    \"SHZ[1]\",\n    \"SHPIX\",\n    \"IP\",\n    \"MSIRP[0]\",\n    \"MSIRP[1]\",\n    \"AlignRP\",\n    \"RTDG\",\n    \"MIAP[0]\",\n    \"MIAP[1]\",\n\n    \"NPushB\",\n    \"NPushW\",\n    \"WS\",\n    \"RS\",\n    \"WCvtP\",\n    \"RCvt\",\n    \"GC[0]\",\n    \"GC[1]\",\n    \"SCFS\",\n    \"MD[0]\",\n    \"MD[1]\",\n    \"MPPEM\",\n    \"MPS\",\n    \"FlipON\",\n    \"FlipOFF\",\n    \"DEBUG\",\n\n    \"LT\",\n    \"LTEQ\",\n    \"GT\",\n    \"GTEQ\",\n    \"EQ\",\n    \"NEQ\",\n    \"ODD\",\n    \"EVEN\",\n    \"IF\",\n    \"EIF\",\n    \"AND\",\n    \"OR\",\n    \"NOT\",\n    \"DeltaP1\",\n    \"SDB\",\n    \"SDS\",\n\n    \"ADD\",\n    \"SUB\",\n    \"DIV\",\n    \"MUL\",\n    \"ABS\",\n    \"NEG\",\n    \"FLOOR\",\n    \"CEILING\",\n    \"ROUND[0]\",\n    \"ROUND[1]\",\n    \"ROUND[2]\",\n    \"ROUND[3]\",\n    \"NROUND[0]\",\n    \"NROUND[1]\",\n    \"NROUND[2]\",\n    \"NROUND[3]\",\n\n    \"WCvtF\",\n    \"DeltaP2\",\n    \"DeltaP3\",\n    \"DeltaCn[0]\",\n    \"DeltaCn[1]\",\n    \"DeltaCn[2]\",\n    \"SROUND\",\n    \"S45Round\",\n    \"JROT\",\n    \"JROF\",\n    \"ROFF\",\n    \"INS_$7B\",\n    \"RUTG\",\n    \"RDTG\",\n    \"SANGW\",\n    \"AA\",\n\n    \"FlipPT\",\n    \"FlipRgON\",\n    \"FlipRgOFF\",\n    \"INS_$83\",\n    \"INS_$84\",\n    \"ScanCTRL\",\n    \"SDVPTL[0]\",\n    \"SDVPTL[1]\",\n    \"GetINFO\",\n    \"IDEF\",\n    \"ROLL\",\n    \"MAX\",\n    \"MIN\",\n    \"ScanTYPE\",\n    \"InstCTRL\",\n    \"INS_$8F\",\n\n    \"INS_$90\",\n    \"INS_$91\",\n    \"INS_$92\",\n    \"INS_$93\",\n    \"INS_$94\",\n    \"INS_$95\",\n    \"INS_$96\",\n    \"INS_$97\",\n    \"INS_$98\",\n    \"INS_$99\",\n    \"INS_$9A\",\n    \"INS_$9B\",\n    \"INS_$9C\",\n    \"INS_$9D\",\n    \"INS_$9E\",\n    \"INS_$9F\",\n\n    \"INS_$A0\",\n    \"INS_$A1\",\n    \"INS_$A2\",\n    \"INS_$A3\",\n    \"INS_$A4\",\n    \"INS_$A5\",\n    \"INS_$A6\",\n    \"INS_$A7\",\n    \"INS_$A8\",\n    \"INS_$A9\",\n    \"INS_$AA\",\n    \"INS_$AB\",\n    \"INS_$AC\",\n    \"INS_$AD\",\n    \"INS_$AE\",\n    \"INS_$AF\",\n\n    \"PushB[0]\",\n    \"PushB[1]\",\n    \"PushB[2]\",\n    \"PushB[3]\",\n    \"PushB[4]\",\n    \"PushB[5]\",\n    \"PushB[6]\",\n    \"PushB[7]\",\n    \"PushW[0]\",\n    \"PushW[1]\",\n    \"PushW[2]\",\n    \"PushW[3]\",\n    \"PushW[4]\",\n    \"PushW[5]\",\n    \"PushW[6]\",\n    \"PushW[7]\",\n\n    \"MDRP[00]\",\n    \"MDRP[01]\",\n    \"MDRP[02]\",\n    \"MDRP[03]\",\n    \"MDRP[04]\",\n    \"MDRP[05]\",\n    \"MDRP[06]\",\n    \"MDRP[07]\",\n    \"MDRP[08]\",\n    \"MDRP[09]\",\n    \"MDRP[10]\",\n    \"MDRP[11]\",\n    \"MDRP[12]\",\n    \"MDRP[13]\",\n    \"MDRP[14]\",\n    \"MDRP[15]\",\n\n    \"MDRP[16]\",\n    \"MDRP[17]\",\n    \"MDRP[18]\",\n    \"MDRP[19]\",\n    \"MDRP[20]\",\n    \"MDRP[21]\",\n    \"MDRP[22]\",\n    \"MDRP[23]\",\n    \"MDRP[24]\",\n    \"MDRP[25]\",\n    \"MDRP[26]\",\n    \"MDRP[27]\",\n    \"MDRP[28]\",\n    \"MDRP[29]\",\n    \"MDRP[30]\",\n    \"MDRP[31]\",\n\n    \"MIRP[00]\",\n    \"MIRP[01]\",\n    \"MIRP[02]\",\n    \"MIRP[03]\",\n    \"MIRP[04]\",\n    \"MIRP[05]\",\n    \"MIRP[06]\",\n    \"MIRP[07]\",\n    \"MIRP[08]\",\n    \"MIRP[09]\",\n    \"MIRP[10]\",\n    \"MIRP[11]\",\n    \"MIRP[12]\",\n    \"MIRP[13]\",\n    \"MIRP[14]\",\n    \"MIRP[15]\",\n\n    \"MIRP[16]\",\n    \"MIRP[17]\",\n    \"MIRP[18]\",\n    \"MIRP[19]\",\n    \"MIRP[20]\",\n    \"MIRP[21]\",\n    \"MIRP[22]\",\n    \"MIRP[23]\",\n    \"MIRP[24]\",\n    \"MIRP[25]\",\n    \"MIRP[26]\",\n    \"MIRP[27]\",\n    \"MIRP[28]\",\n    \"MIRP[29]\",\n    \"MIRP[30]\",\n    \"MIRP[31]\"\n  };\n\n#endif /* FT_DEBUG_LEVEL_TRACE */\n\n\n  static\n  const FT_Char  opcode_length[256] =\n  {\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n\n   -1,-2, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    2, 3, 4, 5,  6, 7, 8, 9,  3, 5, 7, 9, 11,13,15,17,\n\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,\n    1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1\n  };\n\n#undef PACK\n\n\n#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER\n\n#if defined( __arm__ )                                 && \\\n    ( defined( __thumb2__ ) || !defined( __thumb__ ) )\n\n#define TT_MulFix14  TT_MulFix14_arm\n\n  static FT_Int32\n  TT_MulFix14_arm( FT_Int32  a,\n                   FT_Int    b )\n  {\n    FT_Int32  t, t2;\n\n\n#if defined( __CC_ARM ) || defined( __ARMCC__ )\n\n    __asm\n    {\n      smull t2, t,  b,  a           /* (lo=t2,hi=t) = a*b */\n      mov   a,  t,  asr #31         /* a   = (hi >> 31) */\n      add   a,  a,  #0x2000         /* a  += 0x2000 */\n      adds  t2, t2, a               /* t2 += a */\n      adc   t,  t,  #0              /* t  += carry */\n      mov   a,  t2, lsr #14         /* a   = t2 >> 14 */\n      orr   a,  a,  t,  lsl #18     /* a  |= t << 18 */\n    }\n\n#elif defined( __GNUC__ )\n\n    __asm__ __volatile__ (\n      \"smull  %1, %2, %4, %3\\n\\t\"       /* (lo=%1,hi=%2) = a*b */\n      \"mov    %0, %2, asr #31\\n\\t\"      /* %0  = (hi >> 31) */\n#if defined( __clang__ ) && defined( __thumb2__ )\n      \"add.w  %0, %0, #0x2000\\n\\t\"      /* %0 += 0x2000 */\n#else\n      \"add    %0, %0, #0x2000\\n\\t\"      /* %0 += 0x2000 */\n#endif\n      \"adds   %1, %1, %0\\n\\t\"           /* %1 += %0 */\n      \"adc    %2, %2, #0\\n\\t\"           /* %2 += carry */\n      \"mov    %0, %1, lsr #14\\n\\t\"      /* %0  = %1 >> 16 */\n      \"orr    %0, %0, %2, lsl #18\\n\\t\"  /* %0 |= %2 << 16 */\n      : \"=r\"(a), \"=&r\"(t2), \"=&r\"(t)\n      : \"r\"(a), \"r\"(b)\n      : \"cc\" );\n\n#endif\n\n    return a;\n  }\n\n#endif /* __arm__ && ( __thumb2__ || !__thumb__ ) */\n\n#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */\n\n\n#if defined( __GNUC__ )                              && \\\n    ( defined( __i386__ ) || defined( __x86_64__ ) )\n\n#define TT_MulFix14  TT_MulFix14_long_long\n\n  /* Temporarily disable the warning that C90 doesn't support `long long'. */\n#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406\n#pragma GCC diagnostic push\n#endif\n#pragma GCC diagnostic ignored \"-Wlong-long\"\n\n  /* This is declared `noinline' because inlining the function results */\n  /* in slower code.  The `pure' attribute indicates that the result   */\n  /* only depends on the parameters.                                   */\n  static __attribute__(( noinline ))\n         __attribute__(( pure )) FT_Int32\n  TT_MulFix14_long_long( FT_Int32  a,\n                         FT_Int    b )\n  {\n\n    long long  ret = (long long)a * b;\n\n    /* The following line assumes that right shifting of signed values */\n    /* will actually preserve the sign bit.  The exact behaviour is    */\n    /* undefined, but this is true on x86 and x86_64.                  */\n    long long  tmp = ret >> 63;\n\n\n    ret += 0x2000 + tmp;\n\n    return (FT_Int32)( ret >> 14 );\n  }\n\n#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406\n#pragma GCC diagnostic pop\n#endif\n\n#endif /* __GNUC__ && ( __i386__ || __x86_64__ ) */\n\n\n#ifndef TT_MulFix14\n\n  /* Compute (a*b)/2^14 with maximum accuracy and rounding.  */\n  /* This is optimized to be faster than calling FT_MulFix() */\n  /* for platforms where sizeof(int) == 2.                   */\n  static FT_Int32\n  TT_MulFix14( FT_Int32  a,\n               FT_Int    b )\n  {\n    FT_Int32   sign;\n    FT_UInt32  ah, al, mid, lo, hi;\n\n\n    sign = a ^ b;\n\n    if ( a < 0 )\n      a = -a;\n    if ( b < 0 )\n      b = -b;\n\n    ah = (FT_UInt32)( ( a >> 16 ) & 0xFFFFU );\n    al = (FT_UInt32)( a & 0xFFFFU );\n\n    lo    = al * b;\n    mid   = ah * b;\n    hi    = mid >> 16;\n    mid   = ( mid << 16 ) + ( 1 << 13 ); /* rounding */\n    lo   += mid;\n    if ( lo < mid )\n      hi += 1;\n\n    mid = ( lo >> 14 ) | ( hi << 18 );\n\n    return sign >= 0 ? (FT_Int32)mid : -(FT_Int32)mid;\n  }\n\n#endif  /* !TT_MulFix14 */\n\n\n#if defined( __GNUC__ )        && \\\n    ( defined( __i386__ )   ||    \\\n      defined( __x86_64__ ) ||    \\\n      defined( __arm__ )    )\n\n#define TT_DotFix14  TT_DotFix14_long_long\n\n#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406\n#pragma GCC diagnostic push\n#endif\n#pragma GCC diagnostic ignored \"-Wlong-long\"\n\n  static __attribute__(( pure )) FT_Int32\n  TT_DotFix14_long_long( FT_Int32  ax,\n                         FT_Int32  ay,\n                         FT_Int    bx,\n                         FT_Int    by )\n  {\n    /* Temporarily disable the warning that C90 doesn't support */\n    /* `long long'.                                             */\n\n    long long  temp1 = (long long)ax * bx;\n    long long  temp2 = (long long)ay * by;\n\n\n    temp1 += temp2;\n    temp2  = temp1 >> 63;\n    temp1 += 0x2000 + temp2;\n\n    return (FT_Int32)( temp1 >> 14 );\n\n  }\n\n#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406\n#pragma GCC diagnostic pop\n#endif\n\n#endif /* __GNUC__ && (__arm__ || __i386__ || __x86_64__) */\n\n\n#ifndef TT_DotFix14\n\n  /* compute (ax*bx+ay*by)/2^14 with maximum accuracy and rounding */\n  static FT_Int32\n  TT_DotFix14( FT_Int32  ax,\n               FT_Int32  ay,\n               FT_Int    bx,\n               FT_Int    by )\n  {\n    FT_Int32   m, s, hi1, hi2, hi;\n    FT_UInt32  l, lo1, lo2, lo;\n\n\n    /* compute ax*bx as 64-bit value */\n    l = (FT_UInt32)( ( ax & 0xFFFFU ) * bx );\n    m = ( ax >> 16 ) * bx;\n\n    lo1 = l + ( (FT_UInt32)m << 16 );\n    hi1 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo1 < l );\n\n    /* compute ay*by as 64-bit value */\n    l = (FT_UInt32)( ( ay & 0xFFFFU ) * by );\n    m = ( ay >> 16 ) * by;\n\n    lo2 = l + ( (FT_UInt32)m << 16 );\n    hi2 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo2 < l );\n\n    /* add them */\n    lo = lo1 + lo2;\n    hi = hi1 + hi2 + ( lo < lo1 );\n\n    /* divide the result by 2^14 with rounding */\n    s   = hi >> 31;\n    l   = lo + (FT_UInt32)s;\n    hi += s + ( l < lo );\n    lo  = l;\n\n    l   = lo + 0x2000U;\n    hi += ( l < lo );\n\n    return (FT_Int32)( ( (FT_UInt32)hi << 18 ) | ( l >> 14 ) );\n  }\n\n#endif /* TT_DotFix14 */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Current_Ratio                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Returns the current aspect ratio scaling factor depending on the   */\n  /*    projection vector's state and device resolutions.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The aspect ratio in 16.16 format, always <= 1.0 .                  */\n  /*                                                                       */\n  static FT_Long\n  Current_Ratio( EXEC_OP )\n  {\n    if ( !CUR.tt_metrics.ratio )\n    {\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n      if ( CUR.face->unpatented_hinting )\n      {\n        if ( CUR.GS.both_x_axis )\n          CUR.tt_metrics.ratio = CUR.tt_metrics.x_ratio;\n        else\n          CUR.tt_metrics.ratio = CUR.tt_metrics.y_ratio;\n      }\n      else\n#endif\n      {\n        if ( CUR.GS.projVector.y == 0 )\n          CUR.tt_metrics.ratio = CUR.tt_metrics.x_ratio;\n\n        else if ( CUR.GS.projVector.x == 0 )\n          CUR.tt_metrics.ratio = CUR.tt_metrics.y_ratio;\n\n        else\n        {\n          FT_F26Dot6  x, y;\n\n\n          x = TT_MulFix14( CUR.tt_metrics.x_ratio,\n                           CUR.GS.projVector.x );\n          y = TT_MulFix14( CUR.tt_metrics.y_ratio,\n                           CUR.GS.projVector.y );\n          CUR.tt_metrics.ratio = FT_Hypot( x, y );\n        }\n      }\n    }\n    return CUR.tt_metrics.ratio;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Long )\n  Current_Ppem( EXEC_OP )\n  {\n    return CUR.tt_metrics.ppem;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Long )\n  Current_Ppem_Stretched( EXEC_OP )\n  {\n    return FT_MulFix( CUR.tt_metrics.ppem, CURRENT_Ratio() );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Functions related to the control value table (CVT).                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  FT_CALLBACK_DEF( FT_F26Dot6 )\n  Read_CVT( EXEC_OP_ FT_ULong  idx )\n  {\n    return CUR.cvt[idx];\n  }\n\n\n  FT_CALLBACK_DEF( FT_F26Dot6 )\n  Read_CVT_Stretched( EXEC_OP_ FT_ULong  idx )\n  {\n    return FT_MulFix( CUR.cvt[idx], CURRENT_Ratio() );\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  Write_CVT( EXEC_OP_ FT_ULong    idx,\n                      FT_F26Dot6  value )\n  {\n    CUR.cvt[idx] = value;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  Write_CVT_Stretched( EXEC_OP_ FT_ULong    idx,\n                                FT_F26Dot6  value )\n  {\n    CUR.cvt[idx] = FT_DivFix( value, CURRENT_Ratio() );\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  Move_CVT( EXEC_OP_ FT_ULong    idx,\n                     FT_F26Dot6  value )\n  {\n    CUR.cvt[idx] += value;\n  }\n\n\n  FT_CALLBACK_DEF( void )\n  Move_CVT_Stretched( EXEC_OP_ FT_ULong    idx,\n                               FT_F26Dot6  value )\n  {\n    CUR.cvt[idx] += FT_DivFix( value, CURRENT_Ratio() );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    GetShortIns                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Returns a short integer taken from the instruction stream at       */\n  /*    address IP.                                                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Short read at code[IP].                                            */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This one could become a macro.                                     */\n  /*                                                                       */\n  static FT_Short\n  GetShortIns( EXEC_OP )\n  {\n    /* Reading a byte stream so there is no endianess (DaveP) */\n    CUR.IP += 2;\n    return (FT_Short)( ( CUR.code[CUR.IP - 2] << 8 ) +\n                         CUR.code[CUR.IP - 1]      );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Ins_Goto_CodeRange                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Goes to a certain code range in the instruction stream.            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    aRange :: The index of the code range.                             */\n  /*                                                                       */\n  /*    aIP    :: The new IP address in the code range.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    SUCCESS or FAILURE.                                                */\n  /*                                                                       */\n  static FT_Bool\n  Ins_Goto_CodeRange( EXEC_OP_ FT_Int    aRange,\n                               FT_ULong  aIP )\n  {\n    TT_CodeRange*  range;\n\n\n    if ( aRange < 1 || aRange > 3 )\n    {\n      CUR.error = FT_THROW( Bad_Argument );\n      return FAILURE;\n    }\n\n    range = &CUR.codeRangeTable[aRange - 1];\n\n    if ( range->base == NULL )     /* invalid coderange */\n    {\n      CUR.error = FT_THROW( Invalid_CodeRange );\n      return FAILURE;\n    }\n\n    /* NOTE: Because the last instruction of a program may be a CALL */\n    /*       which will return to the first byte *after* the code    */\n    /*       range, we test for aIP <= Size, instead of aIP < Size.  */\n\n    if ( aIP > range->size )\n    {\n      CUR.error = FT_THROW( Code_Overflow );\n      return FAILURE;\n    }\n\n    CUR.code     = range->base;\n    CUR.codeSize = range->size;\n    CUR.IP       = aIP;\n    CUR.curRange = aRange;\n\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Direct_Move                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Moves a point by a given distance along the freedom vector.  The   */\n  /*    point will be `touched'.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    point    :: The index of the point to move.                        */\n  /*                                                                       */\n  /*    distance :: The distance to apply.                                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    zone     :: The affected glyph zone.                               */\n  /*                                                                       */\n  static void\n  Direct_Move( EXEC_OP_ TT_GlyphZone  zone,\n                        FT_UShort     point,\n                        FT_F26Dot6    distance )\n  {\n    FT_F26Dot6  v;\n\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    FT_ASSERT( !CUR.face->unpatented_hinting );\n#endif\n\n    v = CUR.GS.freeVector.x;\n\n    if ( v != 0 )\n    {\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      if ( !SUBPIXEL_HINTING                                     ||\n           ( !CUR.ignore_x_mode                                ||\n             ( CUR.sph_tweak_flags & SPH_TWEAK_ALLOW_X_DMOVE ) ) )\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n        zone->cur[point].x += FT_MulDiv( distance, v, CUR.F_dot_P );\n\n      zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;\n    }\n\n    v = CUR.GS.freeVector.y;\n\n    if ( v != 0 )\n    {\n      zone->cur[point].y += FT_MulDiv( distance, v, CUR.F_dot_P );\n\n      zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Direct_Move_Orig                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Moves the *original* position of a point by a given distance along */\n  /*    the freedom vector.  Obviously, the point will not be `touched'.   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    point    :: The index of the point to move.                        */\n  /*                                                                       */\n  /*    distance :: The distance to apply.                                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    zone     :: The affected glyph zone.                               */\n  /*                                                                       */\n  static void\n  Direct_Move_Orig( EXEC_OP_ TT_GlyphZone  zone,\n                             FT_UShort     point,\n                             FT_F26Dot6    distance )\n  {\n    FT_F26Dot6  v;\n\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    FT_ASSERT( !CUR.face->unpatented_hinting );\n#endif\n\n    v = CUR.GS.freeVector.x;\n\n    if ( v != 0 )\n      zone->org[point].x += FT_MulDiv( distance, v, CUR.F_dot_P );\n\n    v = CUR.GS.freeVector.y;\n\n    if ( v != 0 )\n      zone->org[point].y += FT_MulDiv( distance, v, CUR.F_dot_P );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Special versions of Direct_Move()                                     */\n  /*                                                                       */\n  /*   The following versions are used whenever both vectors are both      */\n  /*   along one of the coordinate unit vectors, i.e. in 90% of the cases. */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  static void\n  Direct_Move_X( EXEC_OP_ TT_GlyphZone  zone,\n                          FT_UShort     point,\n                          FT_F26Dot6    distance )\n  {\n    FT_UNUSED_EXEC;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( !SUBPIXEL_HINTING  ||\n         !CUR.ignore_x_mode )\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n      zone->cur[point].x += distance;\n\n    zone->tags[point]  |= FT_CURVE_TAG_TOUCH_X;\n  }\n\n\n  static void\n  Direct_Move_Y( EXEC_OP_ TT_GlyphZone  zone,\n                          FT_UShort     point,\n                          FT_F26Dot6    distance )\n  {\n    FT_UNUSED_EXEC;\n\n    zone->cur[point].y += distance;\n    zone->tags[point]  |= FT_CURVE_TAG_TOUCH_Y;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Special versions of Direct_Move_Orig()                                */\n  /*                                                                       */\n  /*   The following versions are used whenever both vectors are both      */\n  /*   along one of the coordinate unit vectors, i.e. in 90% of the cases. */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  static void\n  Direct_Move_Orig_X( EXEC_OP_ TT_GlyphZone  zone,\n                               FT_UShort     point,\n                               FT_F26Dot6    distance )\n  {\n    FT_UNUSED_EXEC;\n\n    zone->org[point].x += distance;\n  }\n\n\n  static void\n  Direct_Move_Orig_Y( EXEC_OP_ TT_GlyphZone  zone,\n                               FT_UShort     point,\n                               FT_F26Dot6    distance )\n  {\n    FT_UNUSED_EXEC;\n\n    zone->org[point].y += distance;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Round_None                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Does not round, but adds engine compensation.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    distance     :: The distance (not) to round.                       */\n  /*                                                                       */\n  /*    compensation :: The engine compensation.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The compensated distance.                                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The TrueType specification says very few about the relationship    */\n  /*    between rounding and engine compensation.  However, it seems from  */\n  /*    the description of super round that we should add the compensation */\n  /*    before rounding.                                                   */\n  /*                                                                       */\n  static FT_F26Dot6\n  Round_None( EXEC_OP_ FT_F26Dot6  distance,\n                       FT_F26Dot6  compensation )\n  {\n    FT_F26Dot6  val;\n\n    FT_UNUSED_EXEC;\n\n\n    if ( distance >= 0 )\n    {\n      val = distance + compensation;\n      if ( val < 0 )\n        val = 0;\n    }\n    else\n    {\n      val = distance - compensation;\n      if ( val > 0 )\n        val = 0;\n    }\n    return val;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Round_To_Grid                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Rounds value to grid after adding engine compensation.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    distance     :: The distance to round.                             */\n  /*                                                                       */\n  /*    compensation :: The engine compensation.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Rounded distance.                                                  */\n  /*                                                                       */\n  static FT_F26Dot6\n  Round_To_Grid( EXEC_OP_ FT_F26Dot6  distance,\n                          FT_F26Dot6  compensation )\n  {\n    FT_F26Dot6  val;\n\n    FT_UNUSED_EXEC;\n\n\n    if ( distance >= 0 )\n    {\n      val = FT_PIX_ROUND( distance + compensation );\n      if ( val < 0 )\n        val = 0;\n    }\n    else\n    {\n      val = -FT_PIX_ROUND( compensation - distance );\n      if ( val > 0 )\n        val = 0;\n    }\n\n    return  val;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Round_To_Half_Grid                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Rounds value to half grid after adding engine compensation.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    distance     :: The distance to round.                             */\n  /*                                                                       */\n  /*    compensation :: The engine compensation.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Rounded distance.                                                  */\n  /*                                                                       */\n  static FT_F26Dot6\n  Round_To_Half_Grid( EXEC_OP_ FT_F26Dot6  distance,\n                               FT_F26Dot6  compensation )\n  {\n    FT_F26Dot6  val;\n\n    FT_UNUSED_EXEC;\n\n\n    if ( distance >= 0 )\n    {\n      val = FT_PIX_FLOOR( distance + compensation ) + 32;\n      if ( val < 0 )\n        val = 32;\n    }\n    else\n    {\n      val = -( FT_PIX_FLOOR( compensation - distance ) + 32 );\n      if ( val > 0 )\n        val = -32;\n    }\n\n    return val;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Round_Down_To_Grid                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Rounds value down to grid after adding engine compensation.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    distance     :: The distance to round.                             */\n  /*                                                                       */\n  /*    compensation :: The engine compensation.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Rounded distance.                                                  */\n  /*                                                                       */\n  static FT_F26Dot6\n  Round_Down_To_Grid( EXEC_OP_ FT_F26Dot6  distance,\n                               FT_F26Dot6  compensation )\n  {\n    FT_F26Dot6  val;\n\n    FT_UNUSED_EXEC;\n\n\n    if ( distance >= 0 )\n    {\n      val = FT_PIX_FLOOR( distance + compensation );\n      if ( val < 0 )\n        val = 0;\n    }\n    else\n    {\n      val = -FT_PIX_FLOOR( compensation - distance );\n      if ( val > 0 )\n        val = 0;\n    }\n\n    return val;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Round_Up_To_Grid                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Rounds value up to grid after adding engine compensation.          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    distance     :: The distance to round.                             */\n  /*                                                                       */\n  /*    compensation :: The engine compensation.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Rounded distance.                                                  */\n  /*                                                                       */\n  static FT_F26Dot6\n  Round_Up_To_Grid( EXEC_OP_ FT_F26Dot6  distance,\n                             FT_F26Dot6  compensation )\n  {\n    FT_F26Dot6  val;\n\n    FT_UNUSED_EXEC;\n\n\n    if ( distance >= 0 )\n    {\n      val = FT_PIX_CEIL( distance + compensation );\n      if ( val < 0 )\n        val = 0;\n    }\n    else\n    {\n      val = -FT_PIX_CEIL( compensation - distance );\n      if ( val > 0 )\n        val = 0;\n    }\n\n    return val;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Round_To_Double_Grid                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Rounds value to double grid after adding engine compensation.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    distance     :: The distance to round.                             */\n  /*                                                                       */\n  /*    compensation :: The engine compensation.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Rounded distance.                                                  */\n  /*                                                                       */\n  static FT_F26Dot6\n  Round_To_Double_Grid( EXEC_OP_ FT_F26Dot6  distance,\n                                 FT_F26Dot6  compensation )\n  {\n    FT_F26Dot6 val;\n\n    FT_UNUSED_EXEC;\n\n\n    if ( distance >= 0 )\n    {\n      val = FT_PAD_ROUND( distance + compensation, 32 );\n      if ( val < 0 )\n        val = 0;\n    }\n    else\n    {\n      val = -FT_PAD_ROUND( compensation - distance, 32 );\n      if ( val > 0 )\n        val = 0;\n    }\n\n    return val;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Round_Super                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Super-rounds value to grid after adding engine compensation.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    distance     :: The distance to round.                             */\n  /*                                                                       */\n  /*    compensation :: The engine compensation.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Rounded distance.                                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The TrueType specification says very few about the relationship    */\n  /*    between rounding and engine compensation.  However, it seems from  */\n  /*    the description of super round that we should add the compensation */\n  /*    before rounding.                                                   */\n  /*                                                                       */\n  static FT_F26Dot6\n  Round_Super( EXEC_OP_ FT_F26Dot6  distance,\n                        FT_F26Dot6  compensation )\n  {\n    FT_F26Dot6  val;\n\n\n    if ( distance >= 0 )\n    {\n      val = ( distance - CUR.phase + CUR.threshold + compensation ) &\n              -CUR.period;\n      val += CUR.phase;\n      if ( val < 0 )\n        val = CUR.phase;\n    }\n    else\n    {\n      val = -( ( CUR.threshold - CUR.phase - distance + compensation ) &\n               -CUR.period );\n      val -= CUR.phase;\n      if ( val > 0 )\n        val = -CUR.phase;\n    }\n\n    return val;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Round_Super_45                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Super-rounds value to grid after adding engine compensation.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    distance     :: The distance to round.                             */\n  /*                                                                       */\n  /*    compensation :: The engine compensation.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Rounded distance.                                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    There is a separate function for Round_Super_45() as we may need   */\n  /*    greater precision.                                                 */\n  /*                                                                       */\n  static FT_F26Dot6\n  Round_Super_45( EXEC_OP_ FT_F26Dot6  distance,\n                           FT_F26Dot6  compensation )\n  {\n    FT_F26Dot6  val;\n\n\n    if ( distance >= 0 )\n    {\n      val = ( ( distance - CUR.phase + CUR.threshold + compensation ) /\n                CUR.period ) * CUR.period;\n      val += CUR.phase;\n      if ( val < 0 )\n        val = CUR.phase;\n    }\n    else\n    {\n      val = -( ( ( CUR.threshold - CUR.phase - distance + compensation ) /\n                   CUR.period ) * CUR.period );\n      val -= CUR.phase;\n      if ( val > 0 )\n        val = -CUR.phase;\n    }\n\n    return val;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Compute_Round                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Sets the rounding mode.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    round_mode :: The rounding mode to be used.                        */\n  /*                                                                       */\n  static void\n  Compute_Round( EXEC_OP_ FT_Byte  round_mode )\n  {\n    switch ( round_mode )\n    {\n    case TT_Round_Off:\n      CUR.func_round = (TT_Round_Func)Round_None;\n      break;\n\n    case TT_Round_To_Grid:\n      CUR.func_round = (TT_Round_Func)Round_To_Grid;\n      break;\n\n    case TT_Round_Up_To_Grid:\n      CUR.func_round = (TT_Round_Func)Round_Up_To_Grid;\n      break;\n\n    case TT_Round_Down_To_Grid:\n      CUR.func_round = (TT_Round_Func)Round_Down_To_Grid;\n      break;\n\n    case TT_Round_To_Half_Grid:\n      CUR.func_round = (TT_Round_Func)Round_To_Half_Grid;\n      break;\n\n    case TT_Round_To_Double_Grid:\n      CUR.func_round = (TT_Round_Func)Round_To_Double_Grid;\n      break;\n\n    case TT_Round_Super:\n      CUR.func_round = (TT_Round_Func)Round_Super;\n      break;\n\n    case TT_Round_Super_45:\n      CUR.func_round = (TT_Round_Func)Round_Super_45;\n      break;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    SetSuperRound                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Sets Super Round parameters.                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    GridPeriod :: The grid period.                                     */\n  /*                                                                       */\n  /*    selector   :: The SROUND opcode.                                   */\n  /*                                                                       */\n  static void\n  SetSuperRound( EXEC_OP_ FT_F26Dot6  GridPeriod,\n                          FT_Long     selector )\n  {\n    switch ( (FT_Int)( selector & 0xC0 ) )\n    {\n      case 0:\n        CUR.period = GridPeriod / 2;\n        break;\n\n      case 0x40:\n        CUR.period = GridPeriod;\n        break;\n\n      case 0x80:\n        CUR.period = GridPeriod * 2;\n        break;\n\n      /* This opcode is reserved, but... */\n\n      case 0xC0:\n        CUR.period = GridPeriod;\n        break;\n    }\n\n    switch ( (FT_Int)( selector & 0x30 ) )\n    {\n    case 0:\n      CUR.phase = 0;\n      break;\n\n    case 0x10:\n      CUR.phase = CUR.period / 4;\n      break;\n\n    case 0x20:\n      CUR.phase = CUR.period / 2;\n      break;\n\n    case 0x30:\n      CUR.phase = CUR.period * 3 / 4;\n      break;\n    }\n\n    if ( ( selector & 0x0F ) == 0 )\n      CUR.threshold = CUR.period - 1;\n    else\n      CUR.threshold = ( (FT_Int)( selector & 0x0F ) - 4 ) * CUR.period / 8;\n\n    CUR.period    /= 256;\n    CUR.phase     /= 256;\n    CUR.threshold /= 256;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Project                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Computes the projection of vector given by (v2-v1) along the       */\n  /*    current projection vector.                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    v1 :: First input vector.                                          */\n  /*    v2 :: Second input vector.                                         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The distance in F26dot6 format.                                    */\n  /*                                                                       */\n  static FT_F26Dot6\n  Project( EXEC_OP_ FT_Pos  dx,\n                    FT_Pos  dy )\n  {\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    FT_ASSERT( !CUR.face->unpatented_hinting );\n#endif\n\n    return TT_DotFix14( (FT_UInt32)dx, (FT_UInt32)dy,\n                        CUR.GS.projVector.x,\n                        CUR.GS.projVector.y );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Dual_Project                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Computes the projection of the vector given by (v2-v1) along the   */\n  /*    current dual vector.                                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    v1 :: First input vector.                                          */\n  /*    v2 :: Second input vector.                                         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The distance in F26dot6 format.                                    */\n  /*                                                                       */\n  static FT_F26Dot6\n  Dual_Project( EXEC_OP_ FT_Pos  dx,\n                         FT_Pos  dy )\n  {\n    return TT_DotFix14( (FT_UInt32)dx, (FT_UInt32)dy,\n                        CUR.GS.dualVector.x,\n                        CUR.GS.dualVector.y );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Project_x                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Computes the projection of the vector given by (v2-v1) along the   */\n  /*    horizontal axis.                                                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    v1 :: First input vector.                                          */\n  /*    v2 :: Second input vector.                                         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The distance in F26dot6 format.                                    */\n  /*                                                                       */\n  static FT_F26Dot6\n  Project_x( EXEC_OP_ FT_Pos  dx,\n                      FT_Pos  dy )\n  {\n    FT_UNUSED_EXEC;\n    FT_UNUSED( dy );\n\n    return dx;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Project_y                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Computes the projection of the vector given by (v2-v1) along the   */\n  /*    vertical axis.                                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    v1 :: First input vector.                                          */\n  /*    v2 :: Second input vector.                                         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The distance in F26dot6 format.                                    */\n  /*                                                                       */\n  static FT_F26Dot6\n  Project_y( EXEC_OP_ FT_Pos  dx,\n                      FT_Pos  dy )\n  {\n    FT_UNUSED_EXEC;\n    FT_UNUSED( dx );\n\n    return dy;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Compute_Funcs                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Computes the projection and movement function pointers according   */\n  /*    to the current graphics state.                                     */\n  /*                                                                       */\n  static void\n  Compute_Funcs( EXEC_OP )\n  {\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    if ( CUR.face->unpatented_hinting )\n    {\n      /* If both vectors point rightwards along the x axis, set             */\n      /* `both-x-axis' true, otherwise set it false.  The x values only     */\n      /* need be tested because the vector has been normalised to a unit    */\n      /* vector of length 0x4000 = unity.                                   */\n      CUR.GS.both_x_axis = (FT_Bool)( CUR.GS.projVector.x == 0x4000 &&\n                                      CUR.GS.freeVector.x == 0x4000 );\n\n      /* Throw away projection and freedom vector information */\n      /* because the patents don't allow them to be stored.   */\n      /* The relevant US Patents are 5155805 and 5325479.     */\n      CUR.GS.projVector.x = 0;\n      CUR.GS.projVector.y = 0;\n      CUR.GS.freeVector.x = 0;\n      CUR.GS.freeVector.y = 0;\n\n      if ( CUR.GS.both_x_axis )\n      {\n        CUR.func_project   = Project_x;\n        CUR.func_move      = Direct_Move_X;\n        CUR.func_move_orig = Direct_Move_Orig_X;\n      }\n      else\n      {\n        CUR.func_project   = Project_y;\n        CUR.func_move      = Direct_Move_Y;\n        CUR.func_move_orig = Direct_Move_Orig_Y;\n      }\n\n      if ( CUR.GS.dualVector.x == 0x4000 )\n        CUR.func_dualproj = Project_x;\n      else if ( CUR.GS.dualVector.y == 0x4000 )\n        CUR.func_dualproj = Project_y;\n      else\n        CUR.func_dualproj = Dual_Project;\n\n      /* Force recalculation of cached aspect ratio */\n      CUR.tt_metrics.ratio = 0;\n\n      return;\n    }\n#endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING */\n\n    if ( CUR.GS.freeVector.x == 0x4000 )\n      CUR.F_dot_P = CUR.GS.projVector.x;\n    else if ( CUR.GS.freeVector.y == 0x4000 )\n      CUR.F_dot_P = CUR.GS.projVector.y;\n    else\n      CUR.F_dot_P = ( (FT_Long)CUR.GS.projVector.x * CUR.GS.freeVector.x +\n                      (FT_Long)CUR.GS.projVector.y * CUR.GS.freeVector.y ) >>\n                    14;\n\n    if ( CUR.GS.projVector.x == 0x4000 )\n      CUR.func_project = (TT_Project_Func)Project_x;\n    else if ( CUR.GS.projVector.y == 0x4000 )\n      CUR.func_project = (TT_Project_Func)Project_y;\n    else\n      CUR.func_project = (TT_Project_Func)Project;\n\n    if ( CUR.GS.dualVector.x == 0x4000 )\n      CUR.func_dualproj = (TT_Project_Func)Project_x;\n    else if ( CUR.GS.dualVector.y == 0x4000 )\n      CUR.func_dualproj = (TT_Project_Func)Project_y;\n    else\n      CUR.func_dualproj = (TT_Project_Func)Dual_Project;\n\n    CUR.func_move      = (TT_Move_Func)Direct_Move;\n    CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig;\n\n    if ( CUR.F_dot_P == 0x4000L )\n    {\n      if ( CUR.GS.freeVector.x == 0x4000 )\n      {\n        CUR.func_move      = (TT_Move_Func)Direct_Move_X;\n        CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_X;\n      }\n      else if ( CUR.GS.freeVector.y == 0x4000 )\n      {\n        CUR.func_move      = (TT_Move_Func)Direct_Move_Y;\n        CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y;\n      }\n    }\n\n    /* at small sizes, F_dot_P can become too small, resulting   */\n    /* in overflows and `spikes' in a number of glyphs like `w'. */\n\n    if ( FT_ABS( CUR.F_dot_P ) < 0x400L )\n      CUR.F_dot_P = 0x4000L;\n\n    /* Disable cached aspect ratio */\n    CUR.tt_metrics.ratio = 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Normalize                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Norms a vector.                                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    Vx :: The horizontal input vector coordinate.                      */\n  /*    Vy :: The vertical input vector coordinate.                        */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    R  :: The normed unit vector.                                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Returns FAILURE if a vector parameter is zero.                     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    In case Vx and Vy are both zero, Normalize() returns SUCCESS, and  */\n  /*    R is undefined.                                                    */\n  /*                                                                       */\n  static FT_Bool\n  Normalize( EXEC_OP_ FT_F26Dot6      Vx,\n                      FT_F26Dot6      Vy,\n                      FT_UnitVector*  R )\n  {\n    FT_F26Dot6  W;\n\n    FT_UNUSED_EXEC;\n\n\n    if ( FT_ABS( Vx ) < 0x4000L && FT_ABS( Vy ) < 0x4000L )\n    {\n      if ( Vx == 0 && Vy == 0 )\n      {\n        /* XXX: UNDOCUMENTED! It seems that it is possible to try   */\n        /*      to normalize the vector (0,0).  Return immediately. */\n        return SUCCESS;\n      }\n\n      Vx *= 0x4000;\n      Vy *= 0x4000;\n    }\n\n    W = FT_Hypot( Vx, Vy );\n\n    R->x = (FT_F2Dot14)TT_DivFix14( Vx, W );\n    R->y = (FT_F2Dot14)TT_DivFix14( Vy, W );\n\n    return SUCCESS;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Here we start with the implementation of the various opcodes.         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  static FT_Bool\n  Ins_SxVTL( EXEC_OP_ FT_UShort       aIdx1,\n                      FT_UShort       aIdx2,\n                      FT_Int          aOpc,\n                      FT_UnitVector*  Vec )\n  {\n    FT_Long     A, B, C;\n    FT_Vector*  p1;\n    FT_Vector*  p2;\n\n\n    if ( BOUNDS( aIdx1, CUR.zp2.n_points ) ||\n         BOUNDS( aIdx2, CUR.zp1.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return FAILURE;\n    }\n\n    p1 = CUR.zp1.cur + aIdx2;\n    p2 = CUR.zp2.cur + aIdx1;\n\n    A = p1->x - p2->x;\n    B = p1->y - p2->y;\n\n    /* If p1 == p2, SPVTL and SFVTL behave the same as */\n    /* SPVTCA[X] and SFVTCA[X], respectively.          */\n    /*                                                 */\n    /* Confirmed by Greg Hitchcock.                    */\n\n    if ( A == 0 && B == 0 )\n    {\n      A    = 0x4000;\n      aOpc = 0;\n    }\n\n    if ( ( aOpc & 1 ) != 0 )\n    {\n      C =  B;   /* counter clockwise rotation */\n      B =  A;\n      A = -C;\n    }\n\n    NORMalize( A, B, Vec );\n\n    return SUCCESS;\n  }\n\n\n  /* When not using the big switch statements, the interpreter uses a */\n  /* call table defined later below in this source.  Each opcode must */\n  /* thus have a corresponding function, even trivial ones.           */\n  /*                                                                  */\n  /* They are all defined there.                                      */\n\n#define DO_SVTCA                            \\\n  {                                         \\\n    FT_Short  A, B;                         \\\n                                            \\\n                                            \\\n    A = (FT_Short)( CUR.opcode & 1 ) << 14; \\\n    B = A ^ (FT_Short)0x4000;               \\\n                                            \\\n    CUR.GS.freeVector.x = A;                \\\n    CUR.GS.projVector.x = A;                \\\n    CUR.GS.dualVector.x = A;                \\\n                                            \\\n    CUR.GS.freeVector.y = B;                \\\n    CUR.GS.projVector.y = B;                \\\n    CUR.GS.dualVector.y = B;                \\\n                                            \\\n    COMPUTE_Funcs();                        \\\n  }\n\n\n#define DO_SPVTCA                           \\\n  {                                         \\\n    FT_Short  A, B;                         \\\n                                            \\\n                                            \\\n    A = (FT_Short)( CUR.opcode & 1 ) << 14; \\\n    B = A ^ (FT_Short)0x4000;               \\\n                                            \\\n    CUR.GS.projVector.x = A;                \\\n    CUR.GS.dualVector.x = A;                \\\n                                            \\\n    CUR.GS.projVector.y = B;                \\\n    CUR.GS.dualVector.y = B;                \\\n                                            \\\n    GUESS_VECTOR( freeVector );             \\\n                                            \\\n    COMPUTE_Funcs();                        \\\n  }\n\n\n#define DO_SFVTCA                           \\\n  {                                         \\\n    FT_Short  A, B;                         \\\n                                            \\\n                                            \\\n    A = (FT_Short)( CUR.opcode & 1 ) << 14; \\\n    B = A ^ (FT_Short)0x4000;               \\\n                                            \\\n    CUR.GS.freeVector.x = A;                \\\n    CUR.GS.freeVector.y = B;                \\\n                                            \\\n    GUESS_VECTOR( projVector );             \\\n                                            \\\n    COMPUTE_Funcs();                        \\\n  }\n\n\n#define DO_SPVTL                                      \\\n    if ( INS_SxVTL( (FT_UShort)args[1],               \\\n                    (FT_UShort)args[0],               \\\n                    CUR.opcode,                       \\\n                    &CUR.GS.projVector ) == SUCCESS ) \\\n    {                                                 \\\n      CUR.GS.dualVector = CUR.GS.projVector;          \\\n      GUESS_VECTOR( freeVector );                     \\\n      COMPUTE_Funcs();                                \\\n    }\n\n\n#define DO_SFVTL                                      \\\n    if ( INS_SxVTL( (FT_UShort)args[1],               \\\n                    (FT_UShort)args[0],               \\\n                    CUR.opcode,                       \\\n                    &CUR.GS.freeVector ) == SUCCESS ) \\\n    {                                                 \\\n      GUESS_VECTOR( projVector );                     \\\n      COMPUTE_Funcs();                                \\\n    }\n\n\n#define DO_SFVTPV                          \\\n    GUESS_VECTOR( projVector );            \\\n    CUR.GS.freeVector = CUR.GS.projVector; \\\n    COMPUTE_Funcs();\n\n\n#define DO_SPVFS                                \\\n  {                                             \\\n    FT_Short  S;                                \\\n    FT_Long   X, Y;                             \\\n                                                \\\n                                                \\\n    /* Only use low 16bits, then sign extend */ \\\n    S = (FT_Short)args[1];                      \\\n    Y = (FT_Long)S;                             \\\n    S = (FT_Short)args[0];                      \\\n    X = (FT_Long)S;                             \\\n                                                \\\n    NORMalize( X, Y, &CUR.GS.projVector );      \\\n                                                \\\n    CUR.GS.dualVector = CUR.GS.projVector;      \\\n    GUESS_VECTOR( freeVector );                 \\\n    COMPUTE_Funcs();                            \\\n  }\n\n\n#define DO_SFVFS                                \\\n  {                                             \\\n    FT_Short  S;                                \\\n    FT_Long   X, Y;                             \\\n                                                \\\n                                                \\\n    /* Only use low 16bits, then sign extend */ \\\n    S = (FT_Short)args[1];                      \\\n    Y = (FT_Long)S;                             \\\n    S = (FT_Short)args[0];                      \\\n    X = S;                                      \\\n                                                \\\n    NORMalize( X, Y, &CUR.GS.freeVector );      \\\n    GUESS_VECTOR( projVector );                 \\\n    COMPUTE_Funcs();                            \\\n  }\n\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n#define DO_GPV                                   \\\n    if ( CUR.face->unpatented_hinting )          \\\n    {                                            \\\n      args[0] = CUR.GS.both_x_axis ? 0x4000 : 0; \\\n      args[1] = CUR.GS.both_x_axis ? 0 : 0x4000; \\\n    }                                            \\\n    else                                         \\\n    {                                            \\\n      args[0] = CUR.GS.projVector.x;             \\\n      args[1] = CUR.GS.projVector.y;             \\\n    }\n#else\n#define DO_GPV                                   \\\n    args[0] = CUR.GS.projVector.x;               \\\n    args[1] = CUR.GS.projVector.y;\n#endif\n\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n#define DO_GFV                                   \\\n    if ( CUR.face->unpatented_hinting )          \\\n    {                                            \\\n      args[0] = CUR.GS.both_x_axis ? 0x4000 : 0; \\\n      args[1] = CUR.GS.both_x_axis ? 0 : 0x4000; \\\n    }                                            \\\n    else                                         \\\n    {                                            \\\n      args[0] = CUR.GS.freeVector.x;             \\\n      args[1] = CUR.GS.freeVector.y;             \\\n    }\n#else\n#define DO_GFV                                   \\\n    args[0] = CUR.GS.freeVector.x;               \\\n    args[1] = CUR.GS.freeVector.y;\n#endif\n\n\n#define DO_SRP0                      \\\n    CUR.GS.rp0 = (FT_UShort)args[0];\n\n\n#define DO_SRP1                      \\\n    CUR.GS.rp1 = (FT_UShort)args[0];\n\n\n#define DO_SRP2                      \\\n    CUR.GS.rp2 = (FT_UShort)args[0];\n\n\n#define DO_RTHG                                         \\\n    CUR.GS.round_state = TT_Round_To_Half_Grid;         \\\n    CUR.func_round = (TT_Round_Func)Round_To_Half_Grid;\n\n\n#define DO_RTG                                     \\\n    CUR.GS.round_state = TT_Round_To_Grid;         \\\n    CUR.func_round = (TT_Round_Func)Round_To_Grid;\n\n\n#define DO_RTDG                                           \\\n    CUR.GS.round_state = TT_Round_To_Double_Grid;         \\\n    CUR.func_round = (TT_Round_Func)Round_To_Double_Grid;\n\n\n#define DO_RUTG                                       \\\n    CUR.GS.round_state = TT_Round_Up_To_Grid;         \\\n    CUR.func_round = (TT_Round_Func)Round_Up_To_Grid;\n\n\n#define DO_RDTG                                         \\\n    CUR.GS.round_state = TT_Round_Down_To_Grid;         \\\n    CUR.func_round = (TT_Round_Func)Round_Down_To_Grid;\n\n\n#define DO_ROFF                                 \\\n    CUR.GS.round_state = TT_Round_Off;          \\\n    CUR.func_round = (TT_Round_Func)Round_None;\n\n\n#define DO_SROUND                                \\\n    SET_SuperRound( 0x4000, args[0] );           \\\n    CUR.GS.round_state = TT_Round_Super;         \\\n    CUR.func_round = (TT_Round_Func)Round_Super;\n\n\n#define DO_S45ROUND                                 \\\n    SET_SuperRound( 0x2D41, args[0] );              \\\n    CUR.GS.round_state = TT_Round_Super_45;         \\\n    CUR.func_round = (TT_Round_Func)Round_Super_45;\n\n\n#define DO_SLOOP                            \\\n    if ( args[0] < 0 )                      \\\n      CUR.error = FT_THROW( Bad_Argument ); \\\n    else                                    \\\n      CUR.GS.loop = args[0];\n\n\n#define DO_SMD                         \\\n    CUR.GS.minimum_distance = args[0];\n\n\n#define DO_SCVTCI                                     \\\n    CUR.GS.control_value_cutin = (FT_F26Dot6)args[0];\n\n\n#define DO_SSWCI                                     \\\n    CUR.GS.single_width_cutin = (FT_F26Dot6)args[0];\n\n\n#define DO_SSW                                                     \\\n    CUR.GS.single_width_value = FT_MulFix( args[0],                \\\n                                           CUR.tt_metrics.scale );\n\n\n#define DO_FLIPON            \\\n    CUR.GS.auto_flip = TRUE;\n\n\n#define DO_FLIPOFF            \\\n    CUR.GS.auto_flip = FALSE;\n\n\n#define DO_SDB                              \\\n    CUR.GS.delta_base = (FT_UShort)args[0];\n\n\n#define DO_SDS                                 \\\n    if ( (FT_ULong)args[0] > 6UL )             \\\n      CUR.error = FT_THROW( Bad_Argument );    \\\n    else                                       \\\n      CUR.GS.delta_shift = (FT_UShort)args[0];\n\n\n#define DO_MD  /* nothing */\n\n\n#define DO_MPPEM                   \\\n    args[0] = CUR_Func_cur_ppem();\n\n\n  /* Note: The pointSize should be irrelevant in a given font program; */\n  /*       we thus decide to return only the ppem.                     */\n#if 0\n\n#define DO_MPS                       \\\n    args[0] = CUR.metrics.pointSize;\n\n#else\n\n#define DO_MPS                     \\\n    args[0] = CUR_Func_cur_ppem();\n\n#endif /* 0 */\n\n\n#define DO_DUP         \\\n    args[1] = args[0];\n\n\n#define DO_CLEAR     \\\n    CUR.new_top = 0;\n\n\n#define DO_SWAP        \\\n  {                    \\\n    FT_Long  L;        \\\n                       \\\n                       \\\n    L       = args[0]; \\\n    args[0] = args[1]; \\\n    args[1] = L;       \\\n  }\n\n\n#define DO_DEPTH       \\\n    args[0] = CUR.top;\n\n\n#define DO_CINDEX                                  \\\n  {                                                \\\n    FT_Long  L;                                    \\\n                                                   \\\n                                                   \\\n    L = args[0];                                   \\\n                                                   \\\n    if ( L <= 0 || L > CUR.args )                  \\\n    {                                              \\\n      if ( CUR.pedantic_hinting )                  \\\n        CUR.error = FT_THROW( Invalid_Reference ); \\\n      args[0] = 0;                                 \\\n    }                                              \\\n    else                                           \\\n      args[0] = CUR.stack[CUR.args - L];           \\\n  }\n\n\n#define DO_JROT                                                    \\\n    if ( args[1] != 0 )                                            \\\n    {                                                              \\\n      if ( args[0] == 0 && CUR.args == 0 )                         \\\n        CUR.error = FT_THROW( Bad_Argument );                      \\\n      CUR.IP += args[0];                                           \\\n      if ( CUR.IP < 0                                           || \\\n           ( CUR.callTop > 0                                  &&   \\\n             CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) )  \\\n        CUR.error = FT_THROW( Bad_Argument );                      \\\n      CUR.step_ins = FALSE;                                        \\\n    }\n\n\n#define DO_JMPR                                                  \\\n    if ( args[0] == 0 && CUR.args == 0 )                         \\\n      CUR.error = FT_THROW( Bad_Argument );                      \\\n    CUR.IP += args[0];                                           \\\n    if ( CUR.IP < 0                                           || \\\n         ( CUR.callTop > 0                                  &&   \\\n           CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) )  \\\n      CUR.error = FT_THROW( Bad_Argument );                      \\\n    CUR.step_ins = FALSE;\n\n\n#define DO_JROF                                                    \\\n    if ( args[1] == 0 )                                            \\\n    {                                                              \\\n      if ( args[0] == 0 && CUR.args == 0 )                         \\\n        CUR.error = FT_THROW( Bad_Argument );                      \\\n      CUR.IP += args[0];                                           \\\n      if ( CUR.IP < 0                                           || \\\n           ( CUR.callTop > 0                                  &&   \\\n             CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) )  \\\n        CUR.error = FT_THROW( Bad_Argument );                      \\\n      CUR.step_ins = FALSE;                                        \\\n    }\n\n\n#define DO_LT                        \\\n    args[0] = ( args[0] < args[1] );\n\n\n#define DO_LTEQ                       \\\n    args[0] = ( args[0] <= args[1] );\n\n\n#define DO_GT                        \\\n    args[0] = ( args[0] > args[1] );\n\n\n#define DO_GTEQ                       \\\n    args[0] = ( args[0] >= args[1] );\n\n\n#define DO_EQ                         \\\n    args[0] = ( args[0] == args[1] );\n\n\n#define DO_NEQ                        \\\n    args[0] = ( args[0] != args[1] );\n\n\n#define DO_ODD                                                  \\\n    args[0] = ( ( CUR_Func_round( args[0], 0 ) & 127 ) == 64 );\n\n\n#define DO_EVEN                                                \\\n    args[0] = ( ( CUR_Func_round( args[0], 0 ) & 127 ) == 0 );\n\n\n#define DO_AND                        \\\n    args[0] = ( args[0] && args[1] );\n\n\n#define DO_OR                         \\\n    args[0] = ( args[0] || args[1] );\n\n\n#define DO_NOT          \\\n    args[0] = !args[0];\n\n\n#define DO_ADD          \\\n    args[0] += args[1];\n\n\n#define DO_SUB          \\\n    args[0] -= args[1];\n\n\n#define DO_DIV                                               \\\n    if ( args[1] == 0 )                                      \\\n      CUR.error = FT_THROW( Divide_By_Zero );                \\\n    else                                                     \\\n      args[0] = FT_MulDiv_No_Round( args[0], 64L, args[1] );\n\n\n#define DO_MUL                                    \\\n    args[0] = FT_MulDiv( args[0], args[1], 64L );\n\n\n#define DO_ABS                   \\\n    args[0] = FT_ABS( args[0] );\n\n\n#define DO_NEG          \\\n    args[0] = -args[0];\n\n\n#define DO_FLOOR    \\\n    args[0] = FT_PIX_FLOOR( args[0] );\n\n\n#define DO_CEILING                    \\\n    args[0] = FT_PIX_CEIL( args[0] );\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n#define DO_RS                                             \\\n   {                                                      \\\n     FT_ULong  I = (FT_ULong)args[0];                     \\\n                                                          \\\n                                                          \\\n     if ( BOUNDSL( I, CUR.storeSize ) )                   \\\n     {                                                    \\\n       if ( CUR.pedantic_hinting )                        \\\n         ARRAY_BOUND_ERROR;                               \\\n       else                                               \\\n         args[0] = 0;                                     \\\n     }                                                    \\\n     else                                                 \\\n     {                                                    \\\n       /* subpixel hinting - avoid Typeman Dstroke and */ \\\n       /* IStroke and Vacuform rounds                  */ \\\n                                                          \\\n       if ( SUBPIXEL_HINTING                           && \\\n            CUR.ignore_x_mode                          && \\\n            ( ( I == 24                            &&     \\\n                ( CUR.face->sph_found_func_flags &        \\\n                  ( SPH_FDEF_SPACING_1 |                  \\\n                    SPH_FDEF_SPACING_2 )         ) ) ||   \\\n              ( I == 22                      &&           \\\n                ( CUR.sph_in_func_flags    &              \\\n                  SPH_FDEF_TYPEMAN_STROKES ) )       ||   \\\n              ( I == 8                             &&     \\\n                ( CUR.face->sph_found_func_flags &        \\\n                  SPH_FDEF_VACUFORM_ROUND_1      ) &&     \\\n                  CUR.iup_called                   ) ) )  \\\n         args[0] = 0;                                     \\\n       else                                               \\\n         args[0] = CUR.storage[I];                        \\\n     }                                                    \\\n   }\n\n#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n#define DO_RS                           \\\n   {                                    \\\n     FT_ULong  I = (FT_ULong)args[0];   \\\n                                        \\\n                                        \\\n     if ( BOUNDSL( I, CUR.storeSize ) ) \\\n     {                                  \\\n       if ( CUR.pedantic_hinting )      \\\n       {                                \\\n         ARRAY_BOUND_ERROR;             \\\n       }                                \\\n       else                             \\\n         args[0] = 0;                   \\\n     }                                  \\\n     else                               \\\n       args[0] = CUR.storage[I];        \\\n   }\n\n#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\n#define DO_WS                           \\\n   {                                    \\\n     FT_ULong  I = (FT_ULong)args[0];   \\\n                                        \\\n                                        \\\n     if ( BOUNDSL( I, CUR.storeSize ) ) \\\n     {                                  \\\n       if ( CUR.pedantic_hinting )      \\\n       {                                \\\n         ARRAY_BOUND_ERROR;             \\\n       }                                \\\n     }                                  \\\n     else                               \\\n       CUR.storage[I] = args[1];        \\\n   }\n\n\n#define DO_RCVT                          \\\n   {                                     \\\n     FT_ULong  I = (FT_ULong)args[0];    \\\n                                         \\\n                                         \\\n     if ( BOUNDSL( I, CUR.cvtSize ) )    \\\n     {                                   \\\n       if ( CUR.pedantic_hinting )       \\\n       {                                 \\\n         ARRAY_BOUND_ERROR;              \\\n       }                                 \\\n       else                              \\\n         args[0] = 0;                    \\\n     }                                   \\\n     else                                \\\n       args[0] = CUR_Func_read_cvt( I ); \\\n   }\n\n\n#define DO_WCVTP                         \\\n   {                                     \\\n     FT_ULong  I = (FT_ULong)args[0];    \\\n                                         \\\n                                         \\\n     if ( BOUNDSL( I, CUR.cvtSize ) )    \\\n     {                                   \\\n       if ( CUR.pedantic_hinting )       \\\n       {                                 \\\n         ARRAY_BOUND_ERROR;              \\\n       }                                 \\\n     }                                   \\\n     else                                \\\n       CUR_Func_write_cvt( I, args[1] ); \\\n   }\n\n\n#define DO_WCVTF                                                \\\n   {                                                            \\\n     FT_ULong  I = (FT_ULong)args[0];                           \\\n                                                                \\\n                                                                \\\n     if ( BOUNDSL( I, CUR.cvtSize ) )                           \\\n     {                                                          \\\n       if ( CUR.pedantic_hinting )                              \\\n       {                                                        \\\n         ARRAY_BOUND_ERROR;                                     \\\n       }                                                        \\\n     }                                                          \\\n     else                                                       \\\n       CUR.cvt[I] = FT_MulFix( args[1], CUR.tt_metrics.scale ); \\\n   }\n\n\n#define DO_DEBUG                          \\\n    CUR.error = FT_THROW( Debug_OpCode );\n\n\n#define DO_ROUND                                                   \\\n    args[0] = CUR_Func_round(                                      \\\n                args[0],                                           \\\n                CUR.tt_metrics.compensations[CUR.opcode - 0x68] );\n\n\n#define DO_NROUND                                                            \\\n    args[0] = ROUND_None( args[0],                                           \\\n                          CUR.tt_metrics.compensations[CUR.opcode - 0x6C] );\n\n\n#define DO_MAX               \\\n    if ( args[1] > args[0] ) \\\n      args[0] = args[1];\n\n\n#define DO_MIN               \\\n    if ( args[1] < args[0] ) \\\n      args[0] = args[1];\n\n\n#ifndef TT_CONFIG_OPTION_INTERPRETER_SWITCH\n\n\n#undef  ARRAY_BOUND_ERROR\n#define ARRAY_BOUND_ERROR                        \\\n    {                                            \\\n      CUR.error = FT_THROW( Invalid_Reference ); \\\n      return;                                    \\\n    }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SVTCA[a]:     Set (F and P) Vectors to Coordinate Axis                */\n  /* Opcode range: 0x00-0x01                                               */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_SVTCA( INS_ARG )\n  {\n    DO_SVTCA\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SPVTCA[a]:    Set PVector to Coordinate Axis                          */\n  /* Opcode range: 0x02-0x03                                               */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_SPVTCA( INS_ARG )\n  {\n    DO_SPVTCA\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SFVTCA[a]:    Set FVector to Coordinate Axis                          */\n  /* Opcode range: 0x04-0x05                                               */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_SFVTCA( INS_ARG )\n  {\n    DO_SFVTCA\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SPVTL[a]:     Set PVector To Line                                     */\n  /* Opcode range: 0x06-0x07                                               */\n  /* Stack:        uint32 uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_SPVTL( INS_ARG )\n  {\n    DO_SPVTL\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SFVTL[a]:     Set FVector To Line                                     */\n  /* Opcode range: 0x08-0x09                                               */\n  /* Stack:        uint32 uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_SFVTL( INS_ARG )\n  {\n    DO_SFVTL\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SFVTPV[]:     Set FVector To PVector                                  */\n  /* Opcode range: 0x0E                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_SFVTPV( INS_ARG )\n  {\n    DO_SFVTPV\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SPVFS[]:      Set PVector From Stack                                  */\n  /* Opcode range: 0x0A                                                    */\n  /* Stack:        f2.14 f2.14 -->                                         */\n  /*                                                                       */\n  static void\n  Ins_SPVFS( INS_ARG )\n  {\n    DO_SPVFS\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SFVFS[]:      Set FVector From Stack                                  */\n  /* Opcode range: 0x0B                                                    */\n  /* Stack:        f2.14 f2.14 -->                                         */\n  /*                                                                       */\n  static void\n  Ins_SFVFS( INS_ARG )\n  {\n    DO_SFVFS\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* GPV[]:        Get Projection Vector                                   */\n  /* Opcode range: 0x0C                                                    */\n  /* Stack:        ef2.14 --> ef2.14                                       */\n  /*                                                                       */\n  static void\n  Ins_GPV( INS_ARG )\n  {\n    DO_GPV\n  }\n\n\n  /*************************************************************************/\n  /* GFV[]:        Get Freedom Vector                                      */\n  /* Opcode range: 0x0D                                                    */\n  /* Stack:        ef2.14 --> ef2.14                                       */\n  /*                                                                       */\n  static void\n  Ins_GFV( INS_ARG )\n  {\n    DO_GFV\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SRP0[]:       Set Reference Point 0                                   */\n  /* Opcode range: 0x10                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SRP0( INS_ARG )\n  {\n    DO_SRP0\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SRP1[]:       Set Reference Point 1                                   */\n  /* Opcode range: 0x11                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SRP1( INS_ARG )\n  {\n    DO_SRP1\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SRP2[]:       Set Reference Point 2                                   */\n  /* Opcode range: 0x12                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SRP2( INS_ARG )\n  {\n    DO_SRP2\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* RTHG[]:       Round To Half Grid                                      */\n  /* Opcode range: 0x19                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_RTHG( INS_ARG )\n  {\n    DO_RTHG\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* RTG[]:        Round To Grid                                           */\n  /* Opcode range: 0x18                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_RTG( INS_ARG )\n  {\n    DO_RTG\n  }\n\n\n  /*************************************************************************/\n  /* RTDG[]:       Round To Double Grid                                    */\n  /* Opcode range: 0x3D                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_RTDG( INS_ARG )\n  {\n    DO_RTDG\n  }\n\n\n  /*************************************************************************/\n  /* RUTG[]:       Round Up To Grid                                        */\n  /* Opcode range: 0x7C                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_RUTG( INS_ARG )\n  {\n    DO_RUTG\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* RDTG[]:       Round Down To Grid                                      */\n  /* Opcode range: 0x7D                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_RDTG( INS_ARG )\n  {\n    DO_RDTG\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ROFF[]:       Round OFF                                               */\n  /* Opcode range: 0x7A                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_ROFF( INS_ARG )\n  {\n    DO_ROFF\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SROUND[]:     Super ROUND                                             */\n  /* Opcode range: 0x76                                                    */\n  /* Stack:        Eint8 -->                                               */\n  /*                                                                       */\n  static void\n  Ins_SROUND( INS_ARG )\n  {\n    DO_SROUND\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* S45ROUND[]:   Super ROUND 45 degrees                                  */\n  /* Opcode range: 0x77                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_S45ROUND( INS_ARG )\n  {\n    DO_S45ROUND\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SLOOP[]:      Set LOOP variable                                       */\n  /* Opcode range: 0x17                                                    */\n  /* Stack:        int32? -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SLOOP( INS_ARG )\n  {\n    DO_SLOOP\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SMD[]:        Set Minimum Distance                                    */\n  /* Opcode range: 0x1A                                                    */\n  /* Stack:        f26.6 -->                                               */\n  /*                                                                       */\n  static void\n  Ins_SMD( INS_ARG )\n  {\n    DO_SMD\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SCVTCI[]:     Set Control Value Table Cut In                          */\n  /* Opcode range: 0x1D                                                    */\n  /* Stack:        f26.6 -->                                               */\n  /*                                                                       */\n  static void\n  Ins_SCVTCI( INS_ARG )\n  {\n    DO_SCVTCI\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SSWCI[]:      Set Single Width Cut In                                 */\n  /* Opcode range: 0x1E                                                    */\n  /* Stack:        f26.6 -->                                               */\n  /*                                                                       */\n  static void\n  Ins_SSWCI( INS_ARG )\n  {\n    DO_SSWCI\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SSW[]:        Set Single Width                                        */\n  /* Opcode range: 0x1F                                                    */\n  /* Stack:        int32? -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SSW( INS_ARG )\n  {\n    DO_SSW\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FLIPON[]:     Set auto-FLIP to ON                                     */\n  /* Opcode range: 0x4D                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_FLIPON( INS_ARG )\n  {\n    DO_FLIPON\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FLIPOFF[]:    Set auto-FLIP to OFF                                    */\n  /* Opcode range: 0x4E                                                    */\n  /* Stack: -->                                                            */\n  /*                                                                       */\n  static void\n  Ins_FLIPOFF( INS_ARG )\n  {\n    DO_FLIPOFF\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SANGW[]:      Set ANGle Weight                                        */\n  /* Opcode range: 0x7E                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SANGW( INS_ARG )\n  {\n    /* instruction not supported anymore */\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SDB[]:        Set Delta Base                                          */\n  /* Opcode range: 0x5E                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SDB( INS_ARG )\n  {\n    DO_SDB\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SDS[]:        Set Delta Shift                                         */\n  /* Opcode range: 0x5F                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SDS( INS_ARG )\n  {\n    DO_SDS\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MPPEM[]:      Measure Pixel Per EM                                    */\n  /* Opcode range: 0x4B                                                    */\n  /* Stack:        --> Euint16                                             */\n  /*                                                                       */\n  static void\n  Ins_MPPEM( INS_ARG )\n  {\n    DO_MPPEM\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MPS[]:        Measure Point Size                                      */\n  /* Opcode range: 0x4C                                                    */\n  /* Stack:        --> Euint16                                             */\n  /*                                                                       */\n  static void\n  Ins_MPS( INS_ARG )\n  {\n    DO_MPS\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DUP[]:        DUPlicate the top stack's element                       */\n  /* Opcode range: 0x20                                                    */\n  /* Stack:        StkElt --> StkElt StkElt                                */\n  /*                                                                       */\n  static void\n  Ins_DUP( INS_ARG )\n  {\n    DO_DUP\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* POP[]:        POP the stack's top element                             */\n  /* Opcode range: 0x21                                                    */\n  /* Stack:        StkElt -->                                              */\n  /*                                                                       */\n  static void\n  Ins_POP( INS_ARG )\n  {\n    /* nothing to do */\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* CLEAR[]:      CLEAR the entire stack                                  */\n  /* Opcode range: 0x22                                                    */\n  /* Stack:        StkElt... -->                                           */\n  /*                                                                       */\n  static void\n  Ins_CLEAR( INS_ARG )\n  {\n    DO_CLEAR\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SWAP[]:       SWAP the stack's top two elements                       */\n  /* Opcode range: 0x23                                                    */\n  /* Stack:        2 * StkElt --> 2 * StkElt                               */\n  /*                                                                       */\n  static void\n  Ins_SWAP( INS_ARG )\n  {\n    DO_SWAP\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DEPTH[]:      return the stack DEPTH                                  */\n  /* Opcode range: 0x24                                                    */\n  /* Stack:        --> uint32                                              */\n  /*                                                                       */\n  static void\n  Ins_DEPTH( INS_ARG )\n  {\n    DO_DEPTH\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* CINDEX[]:     Copy INDEXed element                                    */\n  /* Opcode range: 0x25                                                    */\n  /* Stack:        int32 --> StkElt                                        */\n  /*                                                                       */\n  static void\n  Ins_CINDEX( INS_ARG )\n  {\n    DO_CINDEX\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* EIF[]:        End IF                                                  */\n  /* Opcode range: 0x59                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_EIF( INS_ARG )\n  {\n    /* nothing to do */\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* JROT[]:       Jump Relative On True                                   */\n  /* Opcode range: 0x78                                                    */\n  /* Stack:        StkElt int32 -->                                        */\n  /*                                                                       */\n  static void\n  Ins_JROT( INS_ARG )\n  {\n    DO_JROT\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* JMPR[]:       JuMP Relative                                           */\n  /* Opcode range: 0x1C                                                    */\n  /* Stack:        int32 -->                                               */\n  /*                                                                       */\n  static void\n  Ins_JMPR( INS_ARG )\n  {\n    DO_JMPR\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* JROF[]:       Jump Relative On False                                  */\n  /* Opcode range: 0x79                                                    */\n  /* Stack:        StkElt int32 -->                                        */\n  /*                                                                       */\n  static void\n  Ins_JROF( INS_ARG )\n  {\n    DO_JROF\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* LT[]:         Less Than                                               */\n  /* Opcode range: 0x50                                                    */\n  /* Stack:        int32? int32? --> bool                                  */\n  /*                                                                       */\n  static void\n  Ins_LT( INS_ARG )\n  {\n    DO_LT\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* LTEQ[]:       Less Than or EQual                                      */\n  /* Opcode range: 0x51                                                    */\n  /* Stack:        int32? int32? --> bool                                  */\n  /*                                                                       */\n  static void\n  Ins_LTEQ( INS_ARG )\n  {\n    DO_LTEQ\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* GT[]:         Greater Than                                            */\n  /* Opcode range: 0x52                                                    */\n  /* Stack:        int32? int32? --> bool                                  */\n  /*                                                                       */\n  static void\n  Ins_GT( INS_ARG )\n  {\n    DO_GT\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* GTEQ[]:       Greater Than or EQual                                   */\n  /* Opcode range: 0x53                                                    */\n  /* Stack:        int32? int32? --> bool                                  */\n  /*                                                                       */\n  static void\n  Ins_GTEQ( INS_ARG )\n  {\n    DO_GTEQ\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* EQ[]:         EQual                                                   */\n  /* Opcode range: 0x54                                                    */\n  /* Stack:        StkElt StkElt --> bool                                  */\n  /*                                                                       */\n  static void\n  Ins_EQ( INS_ARG )\n  {\n    DO_EQ\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* NEQ[]:        Not EQual                                               */\n  /* Opcode range: 0x55                                                    */\n  /* Stack:        StkElt StkElt --> bool                                  */\n  /*                                                                       */\n  static void\n  Ins_NEQ( INS_ARG )\n  {\n    DO_NEQ\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ODD[]:        Is ODD                                                  */\n  /* Opcode range: 0x56                                                    */\n  /* Stack:        f26.6 --> bool                                          */\n  /*                                                                       */\n  static void\n  Ins_ODD( INS_ARG )\n  {\n    DO_ODD\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* EVEN[]:       Is EVEN                                                 */\n  /* Opcode range: 0x57                                                    */\n  /* Stack:        f26.6 --> bool                                          */\n  /*                                                                       */\n  static void\n  Ins_EVEN( INS_ARG )\n  {\n    DO_EVEN\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* AND[]:        logical AND                                             */\n  /* Opcode range: 0x5A                                                    */\n  /* Stack:        uint32 uint32 --> uint32                                */\n  /*                                                                       */\n  static void\n  Ins_AND( INS_ARG )\n  {\n    DO_AND\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* OR[]:         logical OR                                              */\n  /* Opcode range: 0x5B                                                    */\n  /* Stack:        uint32 uint32 --> uint32                                */\n  /*                                                                       */\n  static void\n  Ins_OR( INS_ARG )\n  {\n    DO_OR\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* NOT[]:        logical NOT                                             */\n  /* Opcode range: 0x5C                                                    */\n  /* Stack:        StkElt --> uint32                                       */\n  /*                                                                       */\n  static void\n  Ins_NOT( INS_ARG )\n  {\n    DO_NOT\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ADD[]:        ADD                                                     */\n  /* Opcode range: 0x60                                                    */\n  /* Stack:        f26.6 f26.6 --> f26.6                                   */\n  /*                                                                       */\n  static void\n  Ins_ADD( INS_ARG )\n  {\n    DO_ADD\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SUB[]:        SUBtract                                                */\n  /* Opcode range: 0x61                                                    */\n  /* Stack:        f26.6 f26.6 --> f26.6                                   */\n  /*                                                                       */\n  static void\n  Ins_SUB( INS_ARG )\n  {\n    DO_SUB\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DIV[]:        DIVide                                                  */\n  /* Opcode range: 0x62                                                    */\n  /* Stack:        f26.6 f26.6 --> f26.6                                   */\n  /*                                                                       */\n  static void\n  Ins_DIV( INS_ARG )\n  {\n    DO_DIV\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MUL[]:        MULtiply                                                */\n  /* Opcode range: 0x63                                                    */\n  /* Stack:        f26.6 f26.6 --> f26.6                                   */\n  /*                                                                       */\n  static void\n  Ins_MUL( INS_ARG )\n  {\n    DO_MUL\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ABS[]:        ABSolute value                                          */\n  /* Opcode range: 0x64                                                    */\n  /* Stack:        f26.6 --> f26.6                                         */\n  /*                                                                       */\n  static void\n  Ins_ABS( INS_ARG )\n  {\n    DO_ABS\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* NEG[]:        NEGate                                                  */\n  /* Opcode range: 0x65                                                    */\n  /* Stack: f26.6 --> f26.6                                                */\n  /*                                                                       */\n  static void\n  Ins_NEG( INS_ARG )\n  {\n    DO_NEG\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FLOOR[]:      FLOOR                                                   */\n  /* Opcode range: 0x66                                                    */\n  /* Stack:        f26.6 --> f26.6                                         */\n  /*                                                                       */\n  static void\n  Ins_FLOOR( INS_ARG )\n  {\n    DO_FLOOR\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* CEILING[]:    CEILING                                                 */\n  /* Opcode range: 0x67                                                    */\n  /* Stack:        f26.6 --> f26.6                                         */\n  /*                                                                       */\n  static void\n  Ins_CEILING( INS_ARG )\n  {\n    DO_CEILING\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* RS[]:         Read Store                                              */\n  /* Opcode range: 0x43                                                    */\n  /* Stack:        uint32 --> uint32                                       */\n  /*                                                                       */\n  static void\n  Ins_RS( INS_ARG )\n  {\n    DO_RS\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* WS[]:         Write Store                                             */\n  /* Opcode range: 0x42                                                    */\n  /* Stack:        uint32 uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_WS( INS_ARG )\n  {\n    DO_WS\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* WCVTP[]:      Write CVT in Pixel units                                */\n  /* Opcode range: 0x44                                                    */\n  /* Stack:        f26.6 uint32 -->                                        */\n  /*                                                                       */\n  static void\n  Ins_WCVTP( INS_ARG )\n  {\n    DO_WCVTP\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* WCVTF[]:      Write CVT in Funits                                     */\n  /* Opcode range: 0x70                                                    */\n  /* Stack:        uint32 uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_WCVTF( INS_ARG )\n  {\n    DO_WCVTF\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* RCVT[]:       Read CVT                                                */\n  /* Opcode range: 0x45                                                    */\n  /* Stack:        uint32 --> f26.6                                        */\n  /*                                                                       */\n  static void\n  Ins_RCVT( INS_ARG )\n  {\n    DO_RCVT\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* AA[]:         Adjust Angle                                            */\n  /* Opcode range: 0x7F                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_AA( INS_ARG )\n  {\n    /* intentionally no longer supported */\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DEBUG[]:      DEBUG.  Unsupported.                                    */\n  /* Opcode range: 0x4F                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  /* Note: The original instruction pops a value from the stack.           */\n  /*                                                                       */\n  static void\n  Ins_DEBUG( INS_ARG )\n  {\n    DO_DEBUG\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ROUND[ab]:    ROUND value                                             */\n  /* Opcode range: 0x68-0x6B                                               */\n  /* Stack:        f26.6 --> f26.6                                         */\n  /*                                                                       */\n  static void\n  Ins_ROUND( INS_ARG )\n  {\n    DO_ROUND\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* NROUND[ab]:   No ROUNDing of value                                    */\n  /* Opcode range: 0x6C-0x6F                                               */\n  /* Stack:        f26.6 --> f26.6                                         */\n  /*                                                                       */\n  static void\n  Ins_NROUND( INS_ARG )\n  {\n    DO_NROUND\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MAX[]:        MAXimum                                                 */\n  /* Opcode range: 0x68                                                    */\n  /* Stack:        int32? int32? --> int32                                 */\n  /*                                                                       */\n  static void\n  Ins_MAX( INS_ARG )\n  {\n    DO_MAX\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MIN[]:        MINimum                                                 */\n  /* Opcode range: 0x69                                                    */\n  /* Stack:        int32? int32? --> int32                                 */\n  /*                                                                       */\n  static void\n  Ins_MIN( INS_ARG )\n  {\n    DO_MIN\n  }\n\n\n#endif  /* !TT_CONFIG_OPTION_INTERPRETER_SWITCH */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The following functions are called as is within the switch statement. */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MINDEX[]:     Move INDEXed element                                    */\n  /* Opcode range: 0x26                                                    */\n  /* Stack:        int32? --> StkElt                                       */\n  /*                                                                       */\n  static void\n  Ins_MINDEX( INS_ARG )\n  {\n    FT_Long  L, K;\n\n\n    L = args[0];\n\n    if ( L <= 0 || L > CUR.args )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n    }\n    else\n    {\n      K = CUR.stack[CUR.args - L];\n\n      FT_ARRAY_MOVE( &CUR.stack[CUR.args - L    ],\n                     &CUR.stack[CUR.args - L + 1],\n                     ( L - 1 ) );\n\n      CUR.stack[CUR.args - 1] = K;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ROLL[]:       ROLL top three elements                                 */\n  /* Opcode range: 0x8A                                                    */\n  /* Stack:        3 * StkElt --> 3 * StkElt                               */\n  /*                                                                       */\n  static void\n  Ins_ROLL( INS_ARG )\n  {\n    FT_Long  A, B, C;\n\n    FT_UNUSED_EXEC;\n\n\n    A = args[2];\n    B = args[1];\n    C = args[0];\n\n    args[2] = C;\n    args[1] = A;\n    args[0] = B;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MANAGING THE FLOW OF CONTROL                                          */\n  /*                                                                       */\n  /*   Instructions appear in the specification's order.                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  static FT_Bool\n  SkipCode( EXEC_OP )\n  {\n    CUR.IP += CUR.length;\n\n    if ( CUR.IP < CUR.codeSize )\n    {\n      CUR.opcode = CUR.code[CUR.IP];\n\n      CUR.length = opcode_length[CUR.opcode];\n      if ( CUR.length < 0 )\n      {\n        if ( CUR.IP + 1 >= CUR.codeSize )\n          goto Fail_Overflow;\n        CUR.length = 2 - CUR.length * CUR.code[CUR.IP + 1];\n      }\n\n      if ( CUR.IP + CUR.length <= CUR.codeSize )\n        return SUCCESS;\n    }\n\n  Fail_Overflow:\n    CUR.error = FT_THROW( Code_Overflow );\n    return FAILURE;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* IF[]:         IF test                                                 */\n  /* Opcode range: 0x58                                                    */\n  /* Stack:        StkElt -->                                              */\n  /*                                                                       */\n  static void\n  Ins_IF( INS_ARG )\n  {\n    FT_Int   nIfs;\n    FT_Bool  Out;\n\n\n    if ( args[0] != 0 )\n      return;\n\n    nIfs = 1;\n    Out = 0;\n\n    do\n    {\n      if ( SKIP_Code() == FAILURE )\n        return;\n\n      switch ( CUR.opcode )\n      {\n      case 0x58:      /* IF */\n        nIfs++;\n        break;\n\n      case 0x1B:      /* ELSE */\n        Out = FT_BOOL( nIfs == 1 );\n        break;\n\n      case 0x59:      /* EIF */\n        nIfs--;\n        Out = FT_BOOL( nIfs == 0 );\n        break;\n      }\n    } while ( Out == 0 );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ELSE[]:       ELSE                                                    */\n  /* Opcode range: 0x1B                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_ELSE( INS_ARG )\n  {\n    FT_Int  nIfs;\n\n    FT_UNUSED_ARG;\n\n\n    nIfs = 1;\n\n    do\n    {\n      if ( SKIP_Code() == FAILURE )\n        return;\n\n      switch ( CUR.opcode )\n      {\n      case 0x58:    /* IF */\n        nIfs++;\n        break;\n\n      case 0x59:    /* EIF */\n        nIfs--;\n        break;\n      }\n    } while ( nIfs != 0 );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DEFINING AND USING FUNCTIONS AND INSTRUCTIONS                         */\n  /*                                                                       */\n  /*   Instructions appear in the specification's order.                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FDEF[]:       Function DEFinition                                     */\n  /* Opcode range: 0x2C                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_FDEF( INS_ARG )\n  {\n    FT_ULong       n;\n    TT_DefRecord*  rec;\n    TT_DefRecord*  limit;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    /* arguments to opcodes are skipped by `SKIP_Code' */\n    FT_Byte    opcode_pattern[9][12] = {\n                 /* #0 inline delta function 1 */\n                 {\n                   0x4B, /* PPEM    */\n                   0x53, /* GTEQ    */\n                   0x23, /* SWAP    */\n                   0x4B, /* PPEM    */\n                   0x51, /* LTEQ    */\n                   0x5A, /* AND     */\n                   0x58, /* IF      */\n                   0x38, /*   SHPIX */\n                   0x1B, /* ELSE    */\n                   0x21, /*   POP   */\n                   0x21, /*   POP   */\n                   0x59  /* EIF     */\n                 },\n                 /* #1 inline delta function 2 */\n                 {\n                   0x4B, /* PPEM    */\n                   0x54, /* EQ      */\n                   0x58, /* IF      */\n                   0x38, /*   SHPIX */\n                   0x1B, /* ELSE    */\n                   0x21, /*   POP   */\n                   0x21, /*   POP   */\n                   0x59  /* EIF     */\n                 },\n                 /* #2 diagonal stroke function */\n                 {\n                   0x20, /* DUP     */\n                   0x20, /* DUP     */\n                   0xB0, /* PUSHB_1 */\n                         /*   1     */\n                   0x60, /* ADD     */\n                   0x46, /* GC_cur  */\n                   0xB0, /* PUSHB_1 */\n                         /*   64    */\n                   0x23, /* SWAP    */\n                   0x42  /* WS      */\n                 },\n                 /* #3 VacuFormRound function */\n                 {\n                   0x45, /* RCVT    */\n                   0x23, /* SWAP    */\n                   0x46, /* GC_cur  */\n                   0x60, /* ADD     */\n                   0x20, /* DUP     */\n                   0xB0  /* PUSHB_1 */\n                         /*   38    */\n                 },\n                 /* #4 TTFautohint bytecode (old) */\n                 {\n                   0x20, /* DUP     */\n                   0x64, /* ABS     */\n                   0xB0, /* PUSHB_1 */\n                         /*   32    */\n                   0x60, /* ADD     */\n                   0x66, /* FLOOR   */\n                   0x23, /* SWAP    */\n                   0xB0  /* PUSHB_1 */\n                 },\n                 /* #5 spacing function 1 */\n                 {\n                   0x01, /* SVTCA_x */\n                   0xB0, /* PUSHB_1 */\n                         /*   24    */\n                   0x43, /* RS      */\n                   0x58  /* IF      */\n                 },\n                 /* #6 spacing function 2 */\n                 {\n                   0x01, /* SVTCA_x */\n                   0x18, /* RTG     */\n                   0xB0, /* PUSHB_1 */\n                         /*   24    */\n                   0x43, /* RS      */\n                   0x58  /* IF      */\n                 },\n                 /* #7 TypeMan Talk DiagEndCtrl function */\n                 {\n                   0x01, /* SVTCA_x */\n                   0x20, /* DUP     */\n                   0xB0, /* PUSHB_1 */\n                         /*   3     */\n                   0x25, /* CINDEX  */\n                 },\n                 /* #8 TypeMan Talk Align */\n                 {\n                   0x06, /* SPVTL   */\n                   0x7D, /* RDTG    */\n                 },\n               };\n    FT_UShort  opcode_patterns   = 9;\n    FT_UShort  opcode_pointer[9] = {  0, 0, 0, 0, 0, 0, 0, 0, 0 };\n    FT_UShort  opcode_size[9]    = { 12, 8, 8, 6, 7, 4, 5, 4, 2 };\n    FT_UShort  i;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\n    /* some font programs are broken enough to redefine functions! */\n    /* We will then parse the current table.                       */\n\n    rec   = CUR.FDefs;\n    limit = rec + CUR.numFDefs;\n    n     = args[0];\n\n    for ( ; rec < limit; rec++ )\n    {\n      if ( rec->opc == n )\n        break;\n    }\n\n    if ( rec == limit )\n    {\n      /* check that there is enough room for new functions */\n      if ( CUR.numFDefs >= CUR.maxFDefs )\n      {\n        CUR.error = FT_THROW( Too_Many_Function_Defs );\n        return;\n      }\n      CUR.numFDefs++;\n    }\n\n    /* Although FDEF takes unsigned 32-bit integer,  */\n    /* func # must be within unsigned 16-bit integer */\n    if ( n > 0xFFFFU )\n    {\n      CUR.error = FT_THROW( Too_Many_Function_Defs );\n      return;\n    }\n\n    rec->range          = CUR.curRange;\n    rec->opc            = (FT_UInt16)n;\n    rec->start          = CUR.IP + 1;\n    rec->active         = TRUE;\n    rec->inline_delta   = FALSE;\n    rec->sph_fdef_flags = 0x0000;\n\n    if ( n > CUR.maxFunc )\n      CUR.maxFunc = (FT_UInt16)n;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    /* We don't know for sure these are typeman functions, */\n    /* however they are only active when RS 22 is called   */\n    if ( n >= 64 && n <= 66 )\n      rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_STROKES;\n#endif\n\n    /* Now skip the whole function definition. */\n    /* We don't allow nested IDEFS & FDEFs.    */\n\n    while ( SKIP_Code() == SUCCESS )\n    {\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n      if ( SUBPIXEL_HINTING )\n      {\n        for ( i = 0; i < opcode_patterns; i++ )\n        {\n          if ( opcode_pointer[i] < opcode_size[i]                 &&\n               CUR.opcode == opcode_pattern[i][opcode_pointer[i]] )\n          {\n            opcode_pointer[i] += 1;\n\n            if ( opcode_pointer[i] == opcode_size[i] )\n            {\n              FT_TRACE7(( \"sph: Function %d, opcode ptrn: %d, %s %s\\n\",\n                          i, n,\n                          CUR.face->root.family_name,\n                          CUR.face->root.style_name ));\n\n              switch ( i )\n              {\n              case 0:\n                rec->sph_fdef_flags            |= SPH_FDEF_INLINE_DELTA_1;\n                CUR.face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_1;\n                break;\n\n              case 1:\n                rec->sph_fdef_flags            |= SPH_FDEF_INLINE_DELTA_2;\n                CUR.face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_2;\n                break;\n\n              case 2:\n                switch ( n )\n                {\n                  /* needs to be implemented still */\n                case 58:\n                  rec->sph_fdef_flags            |= SPH_FDEF_DIAGONAL_STROKE;\n                  CUR.face->sph_found_func_flags |= SPH_FDEF_DIAGONAL_STROKE;\n                }\n                break;\n\n              case 3:\n                switch ( n )\n                {\n                case 0:\n                  rec->sph_fdef_flags            |= SPH_FDEF_VACUFORM_ROUND_1;\n                  CUR.face->sph_found_func_flags |= SPH_FDEF_VACUFORM_ROUND_1;\n                }\n                break;\n\n              case 4:\n                /* probably not necessary to detect anymore */\n                rec->sph_fdef_flags            |= SPH_FDEF_TTFAUTOHINT_1;\n                CUR.face->sph_found_func_flags |= SPH_FDEF_TTFAUTOHINT_1;\n                break;\n\n              case 5:\n                switch ( n )\n                {\n                case 0:\n                case 1:\n                case 2:\n                case 4:\n                case 7:\n                case 8:\n                  rec->sph_fdef_flags            |= SPH_FDEF_SPACING_1;\n                  CUR.face->sph_found_func_flags |= SPH_FDEF_SPACING_1;\n                }\n                break;\n\n              case 6:\n                switch ( n )\n                {\n                case 0:\n                case 1:\n                case 2:\n                case 4:\n                case 7:\n                case 8:\n                  rec->sph_fdef_flags            |= SPH_FDEF_SPACING_2;\n                  CUR.face->sph_found_func_flags |= SPH_FDEF_SPACING_2;\n                }\n                break;\n\n               case 7:\n                 rec->sph_fdef_flags            |= SPH_FDEF_TYPEMAN_DIAGENDCTRL;\n                 CUR.face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL;\n                 break;\n\n               case 8:\n#if 0\n                 rec->sph_fdef_flags            |= SPH_FDEF_TYPEMAN_DIAGENDCTRL;\n                 CUR.face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL;\n#endif\n                 break;\n              }\n              opcode_pointer[i] = 0;\n            }\n          }\n\n          else\n            opcode_pointer[i] = 0;\n        }\n\n        /* Set sph_compatibility_mode only when deltas are detected */\n        CUR.face->sph_compatibility_mode =\n          ( ( CUR.face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_1 ) |\n            ( CUR.face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_2 ) );\n      }\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n      switch ( CUR.opcode )\n      {\n      case 0x89:    /* IDEF */\n      case 0x2C:    /* FDEF */\n        CUR.error = FT_THROW( Nested_DEFS );\n        return;\n\n      case 0x2D:   /* ENDF */\n        rec->end = CUR.IP;\n        return;\n      }\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ENDF[]:       END Function definition                                 */\n  /* Opcode range: 0x2D                                                    */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_ENDF( INS_ARG )\n  {\n    TT_CallRec*  pRec;\n\n    FT_UNUSED_ARG;\n\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    CUR.sph_in_func_flags = 0x0000;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    if ( CUR.callTop <= 0 )     /* We encountered an ENDF without a call */\n    {\n      CUR.error = FT_THROW( ENDF_In_Exec_Stream );\n      return;\n    }\n\n    CUR.callTop--;\n\n    pRec = &CUR.callStack[CUR.callTop];\n\n    pRec->Cur_Count--;\n\n    CUR.step_ins = FALSE;\n\n    if ( pRec->Cur_Count > 0 )\n    {\n      CUR.callTop++;\n      CUR.IP = pRec->Def->start;\n    }\n    else\n      /* Loop through the current function */\n      INS_Goto_CodeRange( pRec->Caller_Range,\n                          pRec->Caller_IP );\n\n    /* Exit the current call frame.                      */\n\n    /* NOTE: If the last instruction of a program is a   */\n    /*       CALL or LOOPCALL, the return address is     */\n    /*       always out of the code range.  This is a    */\n    /*       valid address, and it is why we do not test */\n    /*       the result of Ins_Goto_CodeRange() here!    */\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* CALL[]:       CALL function                                           */\n  /* Opcode range: 0x2B                                                    */\n  /* Stack:        uint32? -->                                             */\n  /*                                                                       */\n  static void\n  Ins_CALL( INS_ARG )\n  {\n    FT_ULong       F;\n    TT_CallRec*    pCrec;\n    TT_DefRecord*  def;\n\n\n    /* first of all, check the index */\n\n    F = args[0];\n    if ( BOUNDSL( F, CUR.maxFunc + 1 ) )\n      goto Fail;\n\n    /* Except for some old Apple fonts, all functions in a TrueType */\n    /* font are defined in increasing order, starting from 0.  This */\n    /* means that we normally have                                  */\n    /*                                                              */\n    /*    CUR.maxFunc+1 == CUR.numFDefs                             */\n    /*    CUR.FDefs[n].opc == n for n in 0..CUR.maxFunc             */\n    /*                                                              */\n    /* If this isn't true, we need to look up the function table.   */\n\n    def = CUR.FDefs + F;\n    if ( CUR.maxFunc + 1 != CUR.numFDefs || def->opc != F )\n    {\n      /* look up the FDefs table */\n      TT_DefRecord*  limit;\n\n\n      def   = CUR.FDefs;\n      limit = def + CUR.numFDefs;\n\n      while ( def < limit && def->opc != F )\n        def++;\n\n      if ( def == limit )\n        goto Fail;\n    }\n\n    /* check that the function is active */\n    if ( !def->active )\n      goto Fail;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING                                              &&\n         CUR.ignore_x_mode                                             &&\n         ( ( CUR.iup_called                                        &&\n             ( CUR.sph_tweak_flags & SPH_TWEAK_NO_CALL_AFTER_IUP ) ) ||\n           ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 )       ) )\n      goto Fail;\n    else\n      CUR.sph_in_func_flags = def->sph_fdef_flags;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    /* check the call stack */\n    if ( CUR.callTop >= CUR.callSize )\n    {\n      CUR.error = FT_THROW( Stack_Overflow );\n      return;\n    }\n\n    pCrec = CUR.callStack + CUR.callTop;\n\n    pCrec->Caller_Range = CUR.curRange;\n    pCrec->Caller_IP    = CUR.IP + 1;\n    pCrec->Cur_Count    = 1;\n    pCrec->Def          = def;\n\n    CUR.callTop++;\n\n    INS_Goto_CodeRange( def->range,\n                        def->start );\n\n    CUR.step_ins = FALSE;\n\n    return;\n\n  Fail:\n    CUR.error = FT_THROW( Invalid_Reference );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* LOOPCALL[]:   LOOP and CALL function                                  */\n  /* Opcode range: 0x2A                                                    */\n  /* Stack:        uint32? Eint16? -->                                     */\n  /*                                                                       */\n  static void\n  Ins_LOOPCALL( INS_ARG )\n  {\n    FT_ULong       F;\n    TT_CallRec*    pCrec;\n    TT_DefRecord*  def;\n\n\n    /* first of all, check the index */\n    F = args[1];\n    if ( BOUNDSL( F, CUR.maxFunc + 1 ) )\n      goto Fail;\n\n    /* Except for some old Apple fonts, all functions in a TrueType */\n    /* font are defined in increasing order, starting from 0.  This */\n    /* means that we normally have                                  */\n    /*                                                              */\n    /*    CUR.maxFunc+1 == CUR.numFDefs                             */\n    /*    CUR.FDefs[n].opc == n for n in 0..CUR.maxFunc             */\n    /*                                                              */\n    /* If this isn't true, we need to look up the function table.   */\n\n    def = CUR.FDefs + F;\n    if ( CUR.maxFunc + 1 != CUR.numFDefs || def->opc != F )\n    {\n      /* look up the FDefs table */\n      TT_DefRecord*  limit;\n\n\n      def   = CUR.FDefs;\n      limit = def + CUR.numFDefs;\n\n      while ( def < limit && def->opc != F )\n        def++;\n\n      if ( def == limit )\n        goto Fail;\n    }\n\n    /* check that the function is active */\n    if ( !def->active )\n      goto Fail;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING                                    &&\n         CUR.ignore_x_mode                                   &&\n         ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) )\n      goto Fail;\n    else\n      CUR.sph_in_func_flags = def->sph_fdef_flags;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    /* check stack */\n    if ( CUR.callTop >= CUR.callSize )\n    {\n      CUR.error = FT_THROW( Stack_Overflow );\n      return;\n    }\n\n    if ( args[0] > 0 )\n    {\n      pCrec = CUR.callStack + CUR.callTop;\n\n      pCrec->Caller_Range = CUR.curRange;\n      pCrec->Caller_IP    = CUR.IP + 1;\n      pCrec->Cur_Count    = (FT_Int)args[0];\n      pCrec->Def          = def;\n\n      CUR.callTop++;\n\n      INS_Goto_CodeRange( def->range, def->start );\n\n      CUR.step_ins = FALSE;\n    }\n\n    return;\n\n  Fail:\n    CUR.error = FT_THROW( Invalid_Reference );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* IDEF[]:       Instruction DEFinition                                  */\n  /* Opcode range: 0x89                                                    */\n  /* Stack:        Eint8 -->                                               */\n  /*                                                                       */\n  static void\n  Ins_IDEF( INS_ARG )\n  {\n    TT_DefRecord*  def;\n    TT_DefRecord*  limit;\n\n\n    /*  First of all, look for the same function in our table */\n\n    def   = CUR.IDefs;\n    limit = def + CUR.numIDefs;\n\n    for ( ; def < limit; def++ )\n      if ( def->opc == (FT_ULong)args[0] )\n        break;\n\n    if ( def == limit )\n    {\n      /* check that there is enough room for a new instruction */\n      if ( CUR.numIDefs >= CUR.maxIDefs )\n      {\n        CUR.error = FT_THROW( Too_Many_Instruction_Defs );\n        return;\n      }\n      CUR.numIDefs++;\n    }\n\n    /* opcode must be unsigned 8-bit integer */\n    if ( 0 > args[0] || args[0] > 0x00FF )\n    {\n      CUR.error = FT_THROW( Too_Many_Instruction_Defs );\n      return;\n    }\n\n    def->opc    = (FT_Byte)args[0];\n    def->start  = CUR.IP + 1;\n    def->range  = CUR.curRange;\n    def->active = TRUE;\n\n    if ( (FT_ULong)args[0] > CUR.maxIns )\n      CUR.maxIns = (FT_Byte)args[0];\n\n    /* Now skip the whole function definition. */\n    /* We don't allow nested IDEFs & FDEFs.    */\n\n    while ( SKIP_Code() == SUCCESS )\n    {\n      switch ( CUR.opcode )\n      {\n      case 0x89:   /* IDEF */\n      case 0x2C:   /* FDEF */\n        CUR.error = FT_THROW( Nested_DEFS );\n        return;\n      case 0x2D:   /* ENDF */\n        return;\n      }\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* PUSHING DATA ONTO THE INTERPRETER STACK                               */\n  /*                                                                       */\n  /*   Instructions appear in the specification's order.                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* NPUSHB[]:     PUSH N Bytes                                            */\n  /* Opcode range: 0x40                                                    */\n  /* Stack:        --> uint32...                                           */\n  /*                                                                       */\n  static void\n  Ins_NPUSHB( INS_ARG )\n  {\n    FT_UShort  L, K;\n\n\n    L = (FT_UShort)CUR.code[CUR.IP + 1];\n\n    if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )\n    {\n      CUR.error = FT_THROW( Stack_Overflow );\n      return;\n    }\n\n    for ( K = 1; K <= L; K++ )\n      args[K - 1] = CUR.code[CUR.IP + K + 1];\n\n    CUR.new_top += L;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* NPUSHW[]:     PUSH N Words                                            */\n  /* Opcode range: 0x41                                                    */\n  /* Stack:        --> int32...                                            */\n  /*                                                                       */\n  static void\n  Ins_NPUSHW( INS_ARG )\n  {\n    FT_UShort  L, K;\n\n\n    L = (FT_UShort)CUR.code[CUR.IP + 1];\n\n    if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )\n    {\n      CUR.error = FT_THROW( Stack_Overflow );\n      return;\n    }\n\n    CUR.IP += 2;\n\n    for ( K = 0; K < L; K++ )\n      args[K] = GET_ShortIns();\n\n    CUR.step_ins = FALSE;\n    CUR.new_top += L;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* PUSHB[abc]:   PUSH Bytes                                              */\n  /* Opcode range: 0xB0-0xB7                                               */\n  /* Stack:        --> uint32...                                           */\n  /*                                                                       */\n  static void\n  Ins_PUSHB( INS_ARG )\n  {\n    FT_UShort  L, K;\n\n\n    L = (FT_UShort)( CUR.opcode - 0xB0 + 1 );\n\n    if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )\n    {\n      CUR.error = FT_THROW( Stack_Overflow );\n      return;\n    }\n\n    for ( K = 1; K <= L; K++ )\n      args[K - 1] = CUR.code[CUR.IP + K];\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* PUSHW[abc]:   PUSH Words                                              */\n  /* Opcode range: 0xB8-0xBF                                               */\n  /* Stack:        --> int32...                                            */\n  /*                                                                       */\n  static void\n  Ins_PUSHW( INS_ARG )\n  {\n    FT_UShort  L, K;\n\n\n    L = (FT_UShort)( CUR.opcode - 0xB8 + 1 );\n\n    if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )\n    {\n      CUR.error = FT_THROW( Stack_Overflow );\n      return;\n    }\n\n    CUR.IP++;\n\n    for ( K = 0; K < L; K++ )\n      args[K] = GET_ShortIns();\n\n    CUR.step_ins = FALSE;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MANAGING THE GRAPHICS STATE                                           */\n  /*                                                                       */\n  /*  Instructions appear in the specs' order.                             */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* GC[a]:        Get Coordinate projected onto                           */\n  /* Opcode range: 0x46-0x47                                               */\n  /* Stack:        uint32 --> f26.6                                        */\n  /*                                                                       */\n  /* XXX: UNDOCUMENTED: Measures from the original glyph must be taken     */\n  /*      along the dual projection vector!                                */\n  /*                                                                       */\n  static void\n  Ins_GC( INS_ARG )\n  {\n    FT_ULong    L;\n    FT_F26Dot6  R;\n\n\n    L = (FT_ULong)args[0];\n\n    if ( BOUNDSL( L, CUR.zp2.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      R = 0;\n    }\n    else\n    {\n      if ( CUR.opcode & 1 )\n        R = CUR_fast_dualproj( &CUR.zp2.org[L] );\n      else\n        R = CUR_fast_project( &CUR.zp2.cur[L] );\n    }\n\n    args[0] = R;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SCFS[]:       Set Coordinate From Stack                               */\n  /* Opcode range: 0x48                                                    */\n  /* Stack:        f26.6 uint32 -->                                        */\n  /*                                                                       */\n  /* Formula:                                                              */\n  /*                                                                       */\n  /*   OA := OA + ( value - OA.p )/( f.p ) * f                             */\n  /*                                                                       */\n  static void\n  Ins_SCFS( INS_ARG )\n  {\n    FT_Long    K;\n    FT_UShort  L;\n\n\n    L = (FT_UShort)args[0];\n\n    if ( BOUNDS( L, CUR.zp2.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    K = CUR_fast_project( &CUR.zp2.cur[L] );\n\n    CUR_Func_move( &CUR.zp2, L, args[1] - K );\n\n    /* UNDOCUMENTED!  The MS rasterizer does that with */\n    /* twilight points (confirmed by Greg Hitchcock)   */\n    if ( CUR.GS.gep2 == 0 )\n      CUR.zp2.org[L] = CUR.zp2.cur[L];\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MD[a]:        Measure Distance                                        */\n  /* Opcode range: 0x49-0x4A                                               */\n  /* Stack:        uint32 uint32 --> f26.6                                 */\n  /*                                                                       */\n  /* XXX: UNDOCUMENTED: Measure taken in the original glyph must be along  */\n  /*                    the dual projection vector.                        */\n  /*                                                                       */\n  /* XXX: UNDOCUMENTED: Flag attributes are inverted!                      */\n  /*                      0 => measure distance in original outline        */\n  /*                      1 => measure distance in grid-fitted outline     */\n  /*                                                                       */\n  /* XXX: UNDOCUMENTED: `zp0 - zp1', and not `zp2 - zp1!                   */\n  /*                                                                       */\n  static void\n  Ins_MD( INS_ARG )\n  {\n    FT_UShort   K, L;\n    FT_F26Dot6  D;\n\n\n    K = (FT_UShort)args[1];\n    L = (FT_UShort)args[0];\n\n    if ( BOUNDS( L, CUR.zp0.n_points ) ||\n         BOUNDS( K, CUR.zp1.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      D = 0;\n    }\n    else\n    {\n      if ( CUR.opcode & 1 )\n        D = CUR_Func_project( CUR.zp0.cur + L, CUR.zp1.cur + K );\n      else\n      {\n        /* XXX: UNDOCUMENTED: twilight zone special case */\n\n        if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )\n        {\n          FT_Vector*  vec1 = CUR.zp0.org + L;\n          FT_Vector*  vec2 = CUR.zp1.org + K;\n\n\n          D = CUR_Func_dualproj( vec1, vec2 );\n        }\n        else\n        {\n          FT_Vector*  vec1 = CUR.zp0.orus + L;\n          FT_Vector*  vec2 = CUR.zp1.orus + K;\n\n\n          if ( CUR.metrics.x_scale == CUR.metrics.y_scale )\n          {\n            /* this should be faster */\n            D = CUR_Func_dualproj( vec1, vec2 );\n            D = FT_MulFix( D, CUR.metrics.x_scale );\n          }\n          else\n          {\n            FT_Vector  vec;\n\n\n            vec.x = FT_MulFix( vec1->x - vec2->x, CUR.metrics.x_scale );\n            vec.y = FT_MulFix( vec1->y - vec2->y, CUR.metrics.y_scale );\n\n            D = CUR_fast_dualproj( &vec );\n          }\n        }\n      }\n    }\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    /* Disable Type 2 Vacuform Rounds - e.g. Arial Narrow */\n    if ( SUBPIXEL_HINTING                       &&\n         CUR.ignore_x_mode && FT_ABS( D ) == 64 )\n      D += 1;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    args[0] = D;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SDPVTL[a]:    Set Dual PVector to Line                                */\n  /* Opcode range: 0x86-0x87                                               */\n  /* Stack:        uint32 uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_SDPVTL( INS_ARG )\n  {\n    FT_Long    A, B, C;\n    FT_UShort  p1, p2;            /* was FT_Int in pas type ERROR */\n    FT_Int     aOpc = CUR.opcode;\n\n\n    p1 = (FT_UShort)args[1];\n    p2 = (FT_UShort)args[0];\n\n    if ( BOUNDS( p2, CUR.zp1.n_points ) ||\n         BOUNDS( p1, CUR.zp2.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    {\n      FT_Vector* v1 = CUR.zp1.org + p2;\n      FT_Vector* v2 = CUR.zp2.org + p1;\n\n\n      A = v1->x - v2->x;\n      B = v1->y - v2->y;\n\n      /* If v1 == v2, SDPVTL behaves the same as */\n      /* SVTCA[X], respectively.                 */\n      /*                                         */\n      /* Confirmed by Greg Hitchcock.            */\n\n      if ( A == 0 && B == 0 )\n      {\n        A    = 0x4000;\n        aOpc = 0;\n      }\n    }\n\n    if ( ( aOpc & 1 ) != 0 )\n    {\n      C =  B;   /* counter clockwise rotation */\n      B =  A;\n      A = -C;\n    }\n\n    NORMalize( A, B, &CUR.GS.dualVector );\n\n    {\n      FT_Vector*  v1 = CUR.zp1.cur + p2;\n      FT_Vector*  v2 = CUR.zp2.cur + p1;\n\n\n      A = v1->x - v2->x;\n      B = v1->y - v2->y;\n\n      if ( A == 0 && B == 0 )\n      {\n        A    = 0x4000;\n        aOpc = 0;\n      }\n    }\n\n    if ( ( aOpc & 1 ) != 0 )\n    {\n      C =  B;   /* counter clockwise rotation */\n      B =  A;\n      A = -C;\n    }\n\n    NORMalize( A, B, &CUR.GS.projVector );\n\n    GUESS_VECTOR( freeVector );\n\n    COMPUTE_Funcs();\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SZP0[]:       Set Zone Pointer 0                                      */\n  /* Opcode range: 0x13                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SZP0( INS_ARG )\n  {\n    switch ( (FT_Int)args[0] )\n    {\n    case 0:\n      CUR.zp0 = CUR.twilight;\n      break;\n\n    case 1:\n      CUR.zp0 = CUR.pts;\n      break;\n\n    default:\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    CUR.GS.gep0 = (FT_UShort)args[0];\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SZP1[]:       Set Zone Pointer 1                                      */\n  /* Opcode range: 0x14                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SZP1( INS_ARG )\n  {\n    switch ( (FT_Int)args[0] )\n    {\n    case 0:\n      CUR.zp1 = CUR.twilight;\n      break;\n\n    case 1:\n      CUR.zp1 = CUR.pts;\n      break;\n\n    default:\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    CUR.GS.gep1 = (FT_UShort)args[0];\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SZP2[]:       Set Zone Pointer 2                                      */\n  /* Opcode range: 0x15                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SZP2( INS_ARG )\n  {\n    switch ( (FT_Int)args[0] )\n    {\n    case 0:\n      CUR.zp2 = CUR.twilight;\n      break;\n\n    case 1:\n      CUR.zp2 = CUR.pts;\n      break;\n\n    default:\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    CUR.GS.gep2 = (FT_UShort)args[0];\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SZPS[]:       Set Zone PointerS                                       */\n  /* Opcode range: 0x16                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SZPS( INS_ARG )\n  {\n    switch ( (FT_Int)args[0] )\n    {\n    case 0:\n      CUR.zp0 = CUR.twilight;\n      break;\n\n    case 1:\n      CUR.zp0 = CUR.pts;\n      break;\n\n    default:\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    CUR.zp1 = CUR.zp0;\n    CUR.zp2 = CUR.zp0;\n\n    CUR.GS.gep0 = (FT_UShort)args[0];\n    CUR.GS.gep1 = (FT_UShort)args[0];\n    CUR.GS.gep2 = (FT_UShort)args[0];\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* INSTCTRL[]:   INSTruction ConTRoL                                     */\n  /* Opcode range: 0x8E                                                    */\n  /* Stack:        int32 int32 -->                                         */\n  /*                                                                       */\n  static void\n  Ins_INSTCTRL( INS_ARG )\n  {\n    FT_Long  K, L;\n\n\n    K = args[1];\n    L = args[0];\n\n    if ( K < 1 || K > 2 )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    if ( L != 0 )\n        L = K;\n\n    CUR.GS.instruct_control = FT_BOOL(\n      ( (FT_Byte)CUR.GS.instruct_control & ~(FT_Byte)K ) | (FT_Byte)L );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SCANCTRL[]:   SCAN ConTRoL                                            */\n  /* Opcode range: 0x85                                                    */\n  /* Stack:        uint32? -->                                             */\n  /*                                                                       */\n  static void\n  Ins_SCANCTRL( INS_ARG )\n  {\n    FT_Int  A;\n\n\n    /* Get Threshold */\n    A = (FT_Int)( args[0] & 0xFF );\n\n    if ( A == 0xFF )\n    {\n      CUR.GS.scan_control = TRUE;\n      return;\n    }\n    else if ( A == 0 )\n    {\n      CUR.GS.scan_control = FALSE;\n      return;\n    }\n\n    if ( ( args[0] & 0x100 ) != 0 && CUR.tt_metrics.ppem <= A )\n      CUR.GS.scan_control = TRUE;\n\n    if ( ( args[0] & 0x200 ) != 0 && CUR.tt_metrics.rotated )\n      CUR.GS.scan_control = TRUE;\n\n    if ( ( args[0] & 0x400 ) != 0 && CUR.tt_metrics.stretched )\n      CUR.GS.scan_control = TRUE;\n\n    if ( ( args[0] & 0x800 ) != 0 && CUR.tt_metrics.ppem > A )\n      CUR.GS.scan_control = FALSE;\n\n    if ( ( args[0] & 0x1000 ) != 0 && CUR.tt_metrics.rotated )\n      CUR.GS.scan_control = FALSE;\n\n    if ( ( args[0] & 0x2000 ) != 0 && CUR.tt_metrics.stretched )\n      CUR.GS.scan_control = FALSE;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SCANTYPE[]:   SCAN TYPE                                               */\n  /* Opcode range: 0x8D                                                    */\n  /* Stack:        uint32? -->                                             */\n  /*                                                                       */\n  static void\n  Ins_SCANTYPE( INS_ARG )\n  {\n    if ( args[0] >= 0 )\n      CUR.GS.scan_type = (FT_Int)args[0];\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MANAGING OUTLINES                                                     */\n  /*                                                                       */\n  /*   Instructions appear in the specification's order.                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FLIPPT[]:     FLIP PoinT                                              */\n  /* Opcode range: 0x80                                                    */\n  /* Stack:        uint32... -->                                           */\n  /*                                                                       */\n  static void\n  Ins_FLIPPT( INS_ARG )\n  {\n    FT_UShort  point;\n\n    FT_UNUSED_ARG;\n\n\n    if ( CUR.top < CUR.GS.loop )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Too_Few_Arguments );\n      goto Fail;\n    }\n\n    while ( CUR.GS.loop > 0 )\n    {\n      CUR.args--;\n\n      point = (FT_UShort)CUR.stack[CUR.args];\n\n      if ( BOUNDS( point, CUR.pts.n_points ) )\n      {\n        if ( CUR.pedantic_hinting )\n        {\n          CUR.error = FT_THROW( Invalid_Reference );\n          return;\n        }\n      }\n      else\n        CUR.pts.tags[point] ^= FT_CURVE_TAG_ON;\n\n      CUR.GS.loop--;\n    }\n\n  Fail:\n    CUR.GS.loop = 1;\n    CUR.new_top = CUR.args;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FLIPRGON[]:   FLIP RanGe ON                                           */\n  /* Opcode range: 0x81                                                    */\n  /* Stack:        uint32 uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_FLIPRGON( INS_ARG )\n  {\n    FT_UShort  I, K, L;\n\n\n    K = (FT_UShort)args[1];\n    L = (FT_UShort)args[0];\n\n    if ( BOUNDS( K, CUR.pts.n_points ) ||\n         BOUNDS( L, CUR.pts.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    for ( I = L; I <= K; I++ )\n      CUR.pts.tags[I] |= FT_CURVE_TAG_ON;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FLIPRGOFF:    FLIP RanGe OFF                                          */\n  /* Opcode range: 0x82                                                    */\n  /* Stack:        uint32 uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_FLIPRGOFF( INS_ARG )\n  {\n    FT_UShort  I, K, L;\n\n\n    K = (FT_UShort)args[1];\n    L = (FT_UShort)args[0];\n\n    if ( BOUNDS( K, CUR.pts.n_points ) ||\n         BOUNDS( L, CUR.pts.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    for ( I = L; I <= K; I++ )\n      CUR.pts.tags[I] &= ~FT_CURVE_TAG_ON;\n  }\n\n\n  static FT_Bool\n  Compute_Point_Displacement( EXEC_OP_ FT_F26Dot6*   x,\n                                       FT_F26Dot6*   y,\n                                       TT_GlyphZone  zone,\n                                       FT_UShort*    refp )\n  {\n    TT_GlyphZoneRec  zp;\n    FT_UShort        p;\n    FT_F26Dot6       d;\n\n\n    if ( CUR.opcode & 1 )\n    {\n      zp = CUR.zp0;\n      p  = CUR.GS.rp1;\n    }\n    else\n    {\n      zp = CUR.zp1;\n      p  = CUR.GS.rp2;\n    }\n\n    if ( BOUNDS( p, zp.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      *refp = 0;\n      return FAILURE;\n    }\n\n    *zone = zp;\n    *refp = p;\n\n    d = CUR_Func_project( zp.cur + p, zp.org + p );\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    if ( CUR.face->unpatented_hinting )\n    {\n      if ( CUR.GS.both_x_axis )\n      {\n        *x = d;\n        *y = 0;\n      }\n      else\n      {\n        *x = 0;\n        *y = d;\n      }\n    }\n    else\n#endif\n    {\n      *x = FT_MulDiv( d, (FT_Long)CUR.GS.freeVector.x, CUR.F_dot_P );\n      *y = FT_MulDiv( d, (FT_Long)CUR.GS.freeVector.y, CUR.F_dot_P );\n    }\n\n    return SUCCESS;\n  }\n\n\n  static void\n  Move_Zp2_Point( EXEC_OP_ FT_UShort   point,\n                           FT_F26Dot6  dx,\n                           FT_F26Dot6  dy,\n                           FT_Bool     touch )\n  {\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    if ( CUR.face->unpatented_hinting )\n    {\n      if ( CUR.GS.both_x_axis )\n      {\n        CUR.zp2.cur[point].x += dx;\n        if ( touch )\n          CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;\n      }\n      else\n      {\n        CUR.zp2.cur[point].y += dy;\n        if ( touch )\n          CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;\n      }\n      return;\n    }\n#endif\n\n    if ( CUR.GS.freeVector.x != 0 )\n    {\n      CUR.zp2.cur[point].x += dx;\n      if ( touch )\n        CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;\n    }\n\n    if ( CUR.GS.freeVector.y != 0 )\n    {\n      CUR.zp2.cur[point].y += dy;\n      if ( touch )\n        CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SHP[a]:       SHift Point by the last point                           */\n  /* Opcode range: 0x32-0x33                                               */\n  /* Stack:        uint32... -->                                           */\n  /*                                                                       */\n  static void\n  Ins_SHP( INS_ARG )\n  {\n    TT_GlyphZoneRec  zp;\n    FT_UShort        refp;\n\n    FT_F26Dot6       dx,\n                     dy;\n    FT_UShort        point;\n\n    FT_UNUSED_ARG;\n\n\n    if ( CUR.top < CUR.GS.loop )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      goto Fail;\n    }\n\n    if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) )\n      return;\n\n    while ( CUR.GS.loop > 0 )\n    {\n      CUR.args--;\n      point = (FT_UShort)CUR.stack[CUR.args];\n\n      if ( BOUNDS( point, CUR.zp2.n_points ) )\n      {\n        if ( CUR.pedantic_hinting )\n        {\n          CUR.error = FT_THROW( Invalid_Reference );\n          return;\n        }\n      }\n      else\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      /* doesn't follow Cleartype spec but produces better result */\n      if ( SUBPIXEL_HINTING  &&\n           CUR.ignore_x_mode )\n        MOVE_Zp2_Point( point, 0, dy, TRUE );\n      else\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n        MOVE_Zp2_Point( point, dx, dy, TRUE );\n\n      CUR.GS.loop--;\n    }\n\n  Fail:\n    CUR.GS.loop = 1;\n    CUR.new_top = CUR.args;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SHC[a]:       SHift Contour                                           */\n  /* Opcode range: 0x34-35                                                 */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  /* UNDOCUMENTED: According to Greg Hitchcock, there is one (virtual)     */\n  /*               contour in the twilight zone, namely contour number     */\n  /*               zero which includes all points of it.                   */\n  /*                                                                       */\n  static void\n  Ins_SHC( INS_ARG )\n  {\n    TT_GlyphZoneRec  zp;\n    FT_UShort        refp;\n    FT_F26Dot6       dx, dy;\n\n    FT_Short         contour, bounds;\n    FT_UShort        start, limit, i;\n\n\n    contour = (FT_UShort)args[0];\n    bounds  = ( CUR.GS.gep2 == 0 ) ? 1 : CUR.zp2.n_contours;\n\n    if ( BOUNDS( contour, bounds ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) )\n      return;\n\n    if ( contour == 0 )\n      start = 0;\n    else\n      start = (FT_UShort)( CUR.zp2.contours[contour - 1] + 1 -\n                           CUR.zp2.first_point );\n\n    /* we use the number of points if in the twilight zone */\n    if ( CUR.GS.gep2 == 0 )\n      limit = CUR.zp2.n_points;\n    else\n      limit = (FT_UShort)( CUR.zp2.contours[contour] -\n                           CUR.zp2.first_point + 1 );\n\n    for ( i = start; i < limit; i++ )\n    {\n      if ( zp.cur != CUR.zp2.cur || refp != i )\n        MOVE_Zp2_Point( i, dx, dy, TRUE );\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SHZ[a]:       SHift Zone                                              */\n  /* Opcode range: 0x36-37                                                 */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_SHZ( INS_ARG )\n  {\n    TT_GlyphZoneRec  zp;\n    FT_UShort        refp;\n    FT_F26Dot6       dx,\n                     dy;\n\n    FT_UShort        limit, i;\n\n\n    if ( BOUNDS( args[0], 2 ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) )\n      return;\n\n    /* XXX: UNDOCUMENTED! SHZ doesn't move the phantom points.     */\n    /*      Twilight zone has no real contours, so use `n_points'. */\n    /*      Normal zone's `n_points' includes phantoms, so must    */\n    /*      use end of last contour.                               */\n    if ( CUR.GS.gep2 == 0 )\n      limit = (FT_UShort)CUR.zp2.n_points;\n    else if ( CUR.GS.gep2 == 1 && CUR.zp2.n_contours > 0 )\n      limit = (FT_UShort)( CUR.zp2.contours[CUR.zp2.n_contours - 1] + 1 );\n    else\n      limit = 0;\n\n    /* XXX: UNDOCUMENTED! SHZ doesn't touch the points */\n    for ( i = 0; i < limit; i++ )\n    {\n      if ( zp.cur != CUR.zp2.cur || refp != i )\n        MOVE_Zp2_Point( i, dx, dy, FALSE );\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* SHPIX[]:      SHift points by a PIXel amount                          */\n  /* Opcode range: 0x38                                                    */\n  /* Stack:        f26.6 uint32... -->                                     */\n  /*                                                                       */\n  static void\n  Ins_SHPIX( INS_ARG )\n  {\n    FT_F26Dot6  dx, dy;\n    FT_UShort   point;\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    FT_Int      B1, B2;\n#endif\n\n\n    if ( CUR.top < CUR.GS.loop + 1 )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      goto Fail;\n    }\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    if ( CUR.face->unpatented_hinting )\n    {\n      if ( CUR.GS.both_x_axis )\n      {\n        dx = (FT_UInt32)args[0];\n        dy = 0;\n      }\n      else\n      {\n        dx = 0;\n        dy = (FT_UInt32)args[0];\n      }\n    }\n    else\n#endif\n    {\n      dx = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.x );\n      dy = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.y );\n    }\n\n    while ( CUR.GS.loop > 0 )\n    {\n      CUR.args--;\n\n      point = (FT_UShort)CUR.stack[CUR.args];\n\n      if ( BOUNDS( point, CUR.zp2.n_points ) )\n      {\n        if ( CUR.pedantic_hinting )\n        {\n          CUR.error = FT_THROW( Invalid_Reference );\n          return;\n        }\n      }\n      else\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      {\n        /*  If not using ignore_x_mode rendering, allow ZP2 move.          */\n        /*  If inline deltas aren't allowed, skip ZP2 move.                */\n        /*  If using ignore_x_mode rendering, allow ZP2 point move if:     */\n        /*   - freedom vector is y and sph_compatibility_mode is off       */\n        /*   - the glyph is composite and the move is in the Y direction   */\n        /*   - the glyph is specifically set to allow SHPIX moves          */\n        /*   - the move is on a previously Y-touched point                 */\n\n        if ( SUBPIXEL_HINTING  &&\n             CUR.ignore_x_mode )\n        {\n          /* save point for later comparison */\n          if ( CUR.GS.freeVector.y != 0 )\n            B1 = CUR.zp2.cur[point].y;\n          else\n            B1 = CUR.zp2.cur[point].x;\n\n          if ( !CUR.face->sph_compatibility_mode &&\n               CUR.GS.freeVector.y != 0          )\n          {\n            MOVE_Zp2_Point( point, dx, dy, TRUE );\n\n            /* save new point */\n            if ( CUR.GS.freeVector.y != 0 )\n            {\n              B2 = CUR.zp2.cur[point].y;\n\n              /* reverse any disallowed moves */\n              if ( ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) &&\n                   ( B1 & 63 ) != 0                                          &&\n                   ( B2 & 63 ) != 0                                          &&\n                    B1 != B2                                                 )\n                MOVE_Zp2_Point( point, -dx, -dy, TRUE );\n            }\n          }\n          else if ( CUR.face->sph_compatibility_mode )\n          {\n            if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES )\n            {\n              dx = FT_PIX_ROUND( B1 + dx ) - B1;\n              dy = FT_PIX_ROUND( B1 + dy ) - B1;\n            }\n\n            /* skip post-iup deltas */\n            if ( CUR.iup_called                                          &&\n                 ( ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_1 ) ||\n                   ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ) )\n              goto Skip;\n\n            if ( !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) &&\n                  ( ( CUR.is_composite && CUR.GS.freeVector.y != 0 ) ||\n                    ( CUR.zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y )   ||\n                    ( CUR.sph_tweak_flags & SPH_TWEAK_DO_SHPIX )     )   )\n              MOVE_Zp2_Point( point, 0, dy, TRUE );\n\n            /* save new point */\n            if ( CUR.GS.freeVector.y != 0 )\n            {\n              B2 = CUR.zp2.cur[point].y;\n\n              /* reverse any disallowed moves */\n              if ( ( B1 & 63 ) == 0 &&\n                   ( B2 & 63 ) != 0 &&\n                   B1 != B2         )\n                MOVE_Zp2_Point( point, 0, -dy, TRUE );\n            }\n          }\n          else if ( CUR.sph_in_func_flags & SPH_FDEF_TYPEMAN_DIAGENDCTRL )\n            MOVE_Zp2_Point( point, dx, dy, TRUE );\n        }\n        else\n          MOVE_Zp2_Point( point, dx, dy, TRUE );\n      }\n\n    Skip:\n\n#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n        MOVE_Zp2_Point( point, dx, dy, TRUE );\n\n#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n      CUR.GS.loop--;\n    }\n\n  Fail:\n    CUR.GS.loop = 1;\n    CUR.new_top = CUR.args;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MSIRP[a]:     Move Stack Indirect Relative Position                   */\n  /* Opcode range: 0x3A-0x3B                                               */\n  /* Stack:        f26.6 uint32 -->                                        */\n  /*                                                                       */\n  static void\n  Ins_MSIRP( INS_ARG )\n  {\n    FT_UShort   point;\n    FT_F26Dot6  distance;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    FT_F26Dot6  control_value_cutin = 0; /* pacify compiler */\n\n\n    if ( SUBPIXEL_HINTING )\n    {\n      control_value_cutin = CUR.GS.control_value_cutin;\n\n      if ( CUR.ignore_x_mode                                 &&\n           CUR.GS.freeVector.x != 0                          &&\n           !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )\n        control_value_cutin = 0;\n    }\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    point = (FT_UShort)args[0];\n\n    if ( BOUNDS( point,      CUR.zp1.n_points ) ||\n         BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    /* UNDOCUMENTED!  The MS rasterizer does that with */\n    /* twilight points (confirmed by Greg Hitchcock)   */\n    if ( CUR.GS.gep1 == 0 )\n    {\n      CUR.zp1.org[point] = CUR.zp0.org[CUR.GS.rp0];\n      CUR_Func_move_orig( &CUR.zp1, point, args[1] );\n      CUR.zp1.cur[point] = CUR.zp1.org[point];\n    }\n\n    distance = CUR_Func_project( CUR.zp1.cur + point,\n                                 CUR.zp0.cur + CUR.GS.rp0 );\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    /* subpixel hinting - make MSIRP respect CVT cut-in; */\n    if ( SUBPIXEL_HINTING                                    &&\n         CUR.ignore_x_mode                                   &&\n         CUR.GS.freeVector.x != 0                            &&\n         FT_ABS( distance - args[1] ) >= control_value_cutin )\n      distance = args[1];\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    CUR_Func_move( &CUR.zp1, point, args[1] - distance );\n\n    CUR.GS.rp1 = CUR.GS.rp0;\n    CUR.GS.rp2 = point;\n\n    if ( ( CUR.opcode & 1 ) != 0 )\n      CUR.GS.rp0 = point;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MDAP[a]:      Move Direct Absolute Point                              */\n  /* Opcode range: 0x2E-0x2F                                               */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_MDAP( INS_ARG )\n  {\n    FT_UShort   point;\n    FT_F26Dot6  cur_dist;\n    FT_F26Dot6  distance;\n\n\n    point = (FT_UShort)args[0];\n\n    if ( BOUNDS( point, CUR.zp0.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    if ( ( CUR.opcode & 1 ) != 0 )\n    {\n      cur_dist = CUR_fast_project( &CUR.zp0.cur[point] );\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      if ( SUBPIXEL_HINTING         &&\n           CUR.ignore_x_mode        &&\n           CUR.GS.freeVector.x != 0 )\n        distance = ROUND_None(\n                     cur_dist,\n                     CUR.tt_metrics.compensations[0] ) - cur_dist;\n      else\n#endif\n        distance = CUR_Func_round(\n                     cur_dist,\n                     CUR.tt_metrics.compensations[0] ) - cur_dist;\n    }\n    else\n      distance = 0;\n\n    CUR_Func_move( &CUR.zp0, point, distance );\n\n    CUR.GS.rp0 = point;\n    CUR.GS.rp1 = point;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MIAP[a]:      Move Indirect Absolute Point                            */\n  /* Opcode range: 0x3E-0x3F                                               */\n  /* Stack:        uint32 uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_MIAP( INS_ARG )\n  {\n    FT_ULong    cvtEntry;\n    FT_UShort   point;\n    FT_F26Dot6  distance;\n    FT_F26Dot6  org_dist;\n    FT_F26Dot6  control_value_cutin;\n\n\n    control_value_cutin = CUR.GS.control_value_cutin;\n    cvtEntry            = (FT_ULong)args[1];\n    point               = (FT_UShort)args[0];\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING                                  &&\n         CUR.ignore_x_mode                                 &&\n         CUR.GS.freeVector.x != 0                          &&\n         CUR.GS.freeVector.y == 0                          &&\n         !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )\n      control_value_cutin = 0;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    if ( BOUNDS( point,     CUR.zp0.n_points ) ||\n         BOUNDSL( cvtEntry, CUR.cvtSize )      )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      goto Fail;\n    }\n\n    /* UNDOCUMENTED!                                                      */\n    /*                                                                    */\n    /* The behaviour of an MIAP instruction is quite different when used  */\n    /* in the twilight zone.                                              */\n    /*                                                                    */\n    /* First, no control value cut-in test is performed as it would fail  */\n    /* anyway.  Second, the original point, i.e. (org_x,org_y) of         */\n    /* zp0.point, is set to the absolute, unrounded distance found in the */\n    /* CVT.                                                               */\n    /*                                                                    */\n    /* This is used in the CVT programs of the Microsoft fonts Arial,     */\n    /* Times, etc., in order to re-adjust some key font heights.  It      */\n    /* allows the use of the IP instruction in the twilight zone, which   */\n    /* otherwise would be invalid according to the specification.         */\n    /*                                                                    */\n    /* We implement it with a special sequence for the twilight zone.     */\n    /* This is a bad hack, but it seems to work.                          */\n    /*                                                                    */\n    /* Confirmed by Greg Hitchcock.                                       */\n\n    distance = CUR_Func_read_cvt( cvtEntry );\n\n    if ( CUR.GS.gep0 == 0 )   /* If in twilight zone */\n    {\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      /* Only adjust if not in sph_compatibility_mode or ignore_x_mode. */\n      /* Determined via experimentation and may be incorrect...         */\n      if ( !SUBPIXEL_HINTING                     ||\n           ( !CUR.ignore_x_mode                ||\n             !CUR.face->sph_compatibility_mode ) )\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n        CUR.zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance,\n                                            CUR.GS.freeVector.x );\n      CUR.zp0.org[point].y = TT_MulFix14( (FT_UInt32)distance,\n                                          CUR.GS.freeVector.y ),\n      CUR.zp0.cur[point]   = CUR.zp0.org[point];\n    }\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING                              &&\n         CUR.ignore_x_mode                             &&\n         ( CUR.sph_tweak_flags & SPH_TWEAK_MIAP_HACK ) &&\n         distance > 0                                  &&\n         CUR.GS.freeVector.y != 0                      )\n      distance = 0;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    org_dist = CUR_fast_project( &CUR.zp0.cur[point] );\n\n    if ( ( CUR.opcode & 1 ) != 0 )   /* rounding and control cut-in flag */\n    {\n      if ( FT_ABS( distance - org_dist ) > control_value_cutin )\n        distance = org_dist;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      if ( SUBPIXEL_HINTING         &&\n           CUR.ignore_x_mode        &&\n           CUR.GS.freeVector.x != 0 )\n        distance = ROUND_None( distance,\n                               CUR.tt_metrics.compensations[0] );\n      else\n#endif\n        distance = CUR_Func_round( distance,\n                                   CUR.tt_metrics.compensations[0] );\n    }\n\n    CUR_Func_move( &CUR.zp0, point, distance - org_dist );\n\n  Fail:\n    CUR.GS.rp0 = point;\n    CUR.GS.rp1 = point;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MDRP[abcde]:  Move Direct Relative Point                              */\n  /* Opcode range: 0xC0-0xDF                                               */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_MDRP( INS_ARG )\n  {\n    FT_UShort   point;\n    FT_F26Dot6  org_dist, distance, minimum_distance;\n\n\n    minimum_distance = CUR.GS.minimum_distance;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING                                  &&\n         CUR.ignore_x_mode                                 &&\n         CUR.GS.freeVector.x != 0                          &&\n         !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )\n      minimum_distance = 0;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    point = (FT_UShort)args[0];\n\n    if ( BOUNDS( point,      CUR.zp1.n_points ) ||\n         BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      goto Fail;\n    }\n\n    /* XXX: Is there some undocumented feature while in the */\n    /*      twilight zone?                                  */\n\n    /* XXX: UNDOCUMENTED: twilight zone special case */\n\n    if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )\n    {\n      FT_Vector*  vec1 = &CUR.zp1.org[point];\n      FT_Vector*  vec2 = &CUR.zp0.org[CUR.GS.rp0];\n\n\n      org_dist = CUR_Func_dualproj( vec1, vec2 );\n    }\n    else\n    {\n      FT_Vector*  vec1 = &CUR.zp1.orus[point];\n      FT_Vector*  vec2 = &CUR.zp0.orus[CUR.GS.rp0];\n\n\n      if ( CUR.metrics.x_scale == CUR.metrics.y_scale )\n      {\n        /* this should be faster */\n        org_dist = CUR_Func_dualproj( vec1, vec2 );\n        org_dist = FT_MulFix( org_dist, CUR.metrics.x_scale );\n      }\n      else\n      {\n        FT_Vector  vec;\n\n\n        vec.x = FT_MulFix( vec1->x - vec2->x, CUR.metrics.x_scale );\n        vec.y = FT_MulFix( vec1->y - vec2->y, CUR.metrics.y_scale );\n\n        org_dist = CUR_fast_dualproj( &vec );\n      }\n    }\n\n    /* single width cut-in test */\n\n    if ( FT_ABS( org_dist - CUR.GS.single_width_value ) <\n         CUR.GS.single_width_cutin )\n    {\n      if ( org_dist >= 0 )\n        org_dist = CUR.GS.single_width_value;\n      else\n        org_dist = -CUR.GS.single_width_value;\n    }\n\n    /* round flag */\n\n    if ( ( CUR.opcode & 4 ) != 0 )\n    {\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      if ( SUBPIXEL_HINTING         &&\n           CUR.ignore_x_mode        &&\n           CUR.GS.freeVector.x != 0 )\n        distance = ROUND_None(\n                     org_dist,\n                     CUR.tt_metrics.compensations[CUR.opcode & 3] );\n      else\n#endif\n      distance = CUR_Func_round(\n                   org_dist,\n                   CUR.tt_metrics.compensations[CUR.opcode & 3] );\n    }\n    else\n      distance = ROUND_None(\n                   org_dist,\n                   CUR.tt_metrics.compensations[CUR.opcode & 3] );\n\n    /* minimum distance flag */\n\n    if ( ( CUR.opcode & 8 ) != 0 )\n    {\n      if ( org_dist >= 0 )\n      {\n        if ( distance < minimum_distance )\n          distance = minimum_distance;\n      }\n      else\n      {\n        if ( distance > -minimum_distance )\n          distance = -minimum_distance;\n      }\n    }\n\n    /* now move the point */\n\n    org_dist = CUR_Func_project( CUR.zp1.cur + point,\n                                 CUR.zp0.cur + CUR.GS.rp0 );\n\n    CUR_Func_move( &CUR.zp1, point, distance - org_dist );\n\n  Fail:\n    CUR.GS.rp1 = CUR.GS.rp0;\n    CUR.GS.rp2 = point;\n\n    if ( ( CUR.opcode & 16 ) != 0 )\n      CUR.GS.rp0 = point;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MIRP[abcde]:  Move Indirect Relative Point                            */\n  /* Opcode range: 0xE0-0xFF                                               */\n  /* Stack:        int32? uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_MIRP( INS_ARG )\n  {\n    FT_UShort   point;\n    FT_ULong    cvtEntry;\n\n    FT_F26Dot6  cvt_dist,\n                distance,\n                cur_dist,\n                org_dist,\n                control_value_cutin,\n                minimum_distance;\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    FT_Int      B1           = 0; /* pacify compiler */\n    FT_Int      B2           = 0;\n    FT_Bool     reverse_move = FALSE;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\n    minimum_distance    = CUR.GS.minimum_distance;\n    control_value_cutin = CUR.GS.control_value_cutin;\n    point               = (FT_UShort)args[0];\n    cvtEntry            = (FT_ULong)( args[1] + 1 );\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING                                  &&\n         CUR.ignore_x_mode                                 &&\n         CUR.GS.freeVector.x != 0                          &&\n         !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )\n      control_value_cutin = minimum_distance = 0;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */\n\n    if ( BOUNDS( point,      CUR.zp1.n_points ) ||\n         BOUNDSL( cvtEntry,  CUR.cvtSize + 1 )  ||\n         BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      goto Fail;\n    }\n\n    if ( !cvtEntry )\n      cvt_dist = 0;\n    else\n      cvt_dist = CUR_Func_read_cvt( cvtEntry - 1 );\n\n    /* single width test */\n\n    if ( FT_ABS( cvt_dist - CUR.GS.single_width_value ) <\n         CUR.GS.single_width_cutin )\n    {\n      if ( cvt_dist >= 0 )\n        cvt_dist =  CUR.GS.single_width_value;\n      else\n        cvt_dist = -CUR.GS.single_width_value;\n    }\n\n    /* UNDOCUMENTED!  The MS rasterizer does that with */\n    /* twilight points (confirmed by Greg Hitchcock)   */\n    if ( CUR.GS.gep1 == 0 )\n    {\n      CUR.zp1.org[point].x = CUR.zp0.org[CUR.GS.rp0].x +\n                             TT_MulFix14( (FT_UInt32)cvt_dist,\n                                          CUR.GS.freeVector.x );\n      CUR.zp1.org[point].y = CUR.zp0.org[CUR.GS.rp0].y +\n                             TT_MulFix14( (FT_UInt32)cvt_dist,\n                                          CUR.GS.freeVector.y );\n      CUR.zp1.cur[point]   = CUR.zp1.org[point];\n    }\n\n    org_dist = CUR_Func_dualproj( &CUR.zp1.org[point],\n                                  &CUR.zp0.org[CUR.GS.rp0] );\n    cur_dist = CUR_Func_project ( &CUR.zp1.cur[point],\n                                  &CUR.zp0.cur[CUR.GS.rp0] );\n\n    /* auto-flip test */\n\n    if ( CUR.GS.auto_flip )\n    {\n      if ( ( org_dist ^ cvt_dist ) < 0 )\n        cvt_dist = -cvt_dist;\n    }\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING                                         &&\n         CUR.ignore_x_mode                                        &&\n         CUR.GS.freeVector.y != 0                                 &&\n         ( CUR.sph_tweak_flags & SPH_TWEAK_TIMES_NEW_ROMAN_HACK ) )\n    {\n      if ( cur_dist < -64 )\n        cvt_dist -= 16;\n      else if ( cur_dist > 64 && cur_dist < 84 )\n        cvt_dist += 32;\n    }\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    /* control value cut-in and round */\n\n    if ( ( CUR.opcode & 4 ) != 0 )\n    {\n      /* XXX: UNDOCUMENTED!  Only perform cut-in test when both points */\n      /*      refer to the same zone.                                  */\n\n      if ( CUR.GS.gep0 == CUR.GS.gep1 )\n      {\n        /* XXX: According to Greg Hitchcock, the following wording is */\n        /*      the right one:                                        */\n        /*                                                            */\n        /*        When the absolute difference between the value in   */\n        /*        the table [CVT] and the measurement directly from   */\n        /*        the outline is _greater_ than the cut_in value, the */\n        /*        outline measurement is used.                        */\n        /*                                                            */\n        /*      This is from `instgly.doc'.  The description in       */\n        /*      `ttinst2.doc', version 1.66, is thus incorrect since  */\n        /*      it implies `>=' instead of `>'.                       */\n\n        if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin )\n          cvt_dist = org_dist;\n      }\n\n      distance = CUR_Func_round(\n                   cvt_dist,\n                   CUR.tt_metrics.compensations[CUR.opcode & 3] );\n    }\n    else\n    {\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n      /* do cvt cut-in always in MIRP for sph */\n      if ( SUBPIXEL_HINTING           &&\n           CUR.ignore_x_mode          &&\n           CUR.GS.gep0 == CUR.GS.gep1 )\n      {\n        if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin )\n          cvt_dist = org_dist;\n      }\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n      distance = ROUND_None(\n                   cvt_dist,\n                   CUR.tt_metrics.compensations[CUR.opcode & 3] );\n    }\n\n    /* minimum distance test */\n\n    if ( ( CUR.opcode & 8 ) != 0 )\n    {\n      if ( org_dist >= 0 )\n      {\n        if ( distance < minimum_distance )\n          distance = minimum_distance;\n      }\n      else\n      {\n        if ( distance > -minimum_distance )\n          distance = -minimum_distance;\n      }\n    }\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING )\n    {\n      B1 = CUR.zp1.cur[point].y;\n\n      /* Round moves if necessary */\n      if ( CUR.ignore_x_mode                                          &&\n           CUR.GS.freeVector.y != 0                                   &&\n           ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) )\n        distance = FT_PIX_ROUND( B1 + distance - cur_dist ) - B1 + cur_dist;\n\n      if ( CUR.ignore_x_mode                                      &&\n           CUR.GS.freeVector.y != 0                               &&\n           ( CUR.opcode & 16 ) == 0                               &&\n           ( CUR.opcode & 8 ) == 0                                &&\n           ( CUR.sph_tweak_flags & SPH_TWEAK_COURIER_NEW_2_HACK ) )\n        distance += 64;\n    }\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    CUR_Func_move( &CUR.zp1, point, distance - cur_dist );\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING )\n    {\n      B2 = CUR.zp1.cur[point].y;\n\n      /* Reverse move if necessary */\n      if ( CUR.ignore_x_mode )\n      {\n        if ( CUR.face->sph_compatibility_mode                          &&\n             CUR.GS.freeVector.y != 0                                  &&\n             ( B1 & 63 ) == 0                                          &&\n             ( B2 & 63 ) != 0                                          )\n          reverse_move = TRUE;\n\n        if ( ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) &&\n             CUR.GS.freeVector.y != 0                                  &&\n             ( B2 & 63 ) != 0                                          &&\n             ( B1 & 63 ) != 0                                          )\n          reverse_move = TRUE;\n      }\n\n      if ( reverse_move )\n        CUR_Func_move( &CUR.zp1, point, -( distance - cur_dist ) );\n    }\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n  Fail:\n    CUR.GS.rp1 = CUR.GS.rp0;\n\n    if ( ( CUR.opcode & 16 ) != 0 )\n      CUR.GS.rp0 = point;\n\n    CUR.GS.rp2 = point;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ALIGNRP[]:    ALIGN Relative Point                                    */\n  /* Opcode range: 0x3C                                                    */\n  /* Stack:        uint32 uint32... -->                                    */\n  /*                                                                       */\n  static void\n  Ins_ALIGNRP( INS_ARG )\n  {\n    FT_UShort   point;\n    FT_F26Dot6  distance;\n\n    FT_UNUSED_ARG;\n\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING                                         &&\n         CUR.ignore_x_mode                                        &&\n         CUR.iup_called                                           &&\n         ( CUR.sph_tweak_flags & SPH_TWEAK_NO_ALIGNRP_AFTER_IUP ) )\n    {\n      CUR.error = FT_THROW( Invalid_Reference );\n      goto Fail;\n    }\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    if ( CUR.top < CUR.GS.loop ||\n         BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      goto Fail;\n    }\n\n    while ( CUR.GS.loop > 0 )\n    {\n      CUR.args--;\n\n      point = (FT_UShort)CUR.stack[CUR.args];\n\n      if ( BOUNDS( point, CUR.zp1.n_points ) )\n      {\n        if ( CUR.pedantic_hinting )\n        {\n          CUR.error = FT_THROW( Invalid_Reference );\n          return;\n        }\n      }\n      else\n      {\n        distance = CUR_Func_project( CUR.zp1.cur + point,\n                                     CUR.zp0.cur + CUR.GS.rp0 );\n\n        CUR_Func_move( &CUR.zp1, point, -distance );\n      }\n\n      CUR.GS.loop--;\n    }\n\n  Fail:\n    CUR.GS.loop = 1;\n    CUR.new_top = CUR.args;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ISECT[]:      moves point to InterSECTion                             */\n  /* Opcode range: 0x0F                                                    */\n  /* Stack:        5 * uint32 -->                                          */\n  /*                                                                       */\n  static void\n  Ins_ISECT( INS_ARG )\n  {\n    FT_UShort   point,\n                a0, a1,\n                b0, b1;\n\n    FT_F26Dot6  discriminant, dotproduct;\n\n    FT_F26Dot6  dx,  dy,\n                dax, day,\n                dbx, dby;\n\n    FT_F26Dot6  val;\n\n    FT_Vector   R;\n\n\n    point = (FT_UShort)args[0];\n\n    a0 = (FT_UShort)args[1];\n    a1 = (FT_UShort)args[2];\n    b0 = (FT_UShort)args[3];\n    b1 = (FT_UShort)args[4];\n\n    if ( BOUNDS( b0, CUR.zp0.n_points )  ||\n         BOUNDS( b1, CUR.zp0.n_points )  ||\n         BOUNDS( a0, CUR.zp1.n_points )  ||\n         BOUNDS( a1, CUR.zp1.n_points )  ||\n         BOUNDS( point, CUR.zp2.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    /* Cramer's rule */\n\n    dbx = CUR.zp0.cur[b1].x - CUR.zp0.cur[b0].x;\n    dby = CUR.zp0.cur[b1].y - CUR.zp0.cur[b0].y;\n\n    dax = CUR.zp1.cur[a1].x - CUR.zp1.cur[a0].x;\n    day = CUR.zp1.cur[a1].y - CUR.zp1.cur[a0].y;\n\n    dx = CUR.zp0.cur[b0].x - CUR.zp1.cur[a0].x;\n    dy = CUR.zp0.cur[b0].y - CUR.zp1.cur[a0].y;\n\n    CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_BOTH;\n\n    discriminant = FT_MulDiv( dax, -dby, 0x40 ) +\n                   FT_MulDiv( day, dbx, 0x40 );\n    dotproduct   = FT_MulDiv( dax, dbx, 0x40 ) +\n                   FT_MulDiv( day, dby, 0x40 );\n\n    /* The discriminant above is actually a cross product of vectors     */\n    /* da and db. Together with the dot product, they can be used as     */\n    /* surrogates for sine and cosine of the angle between the vectors.  */\n    /* Indeed,                                                           */\n    /*       dotproduct   = |da||db|cos(angle)                           */\n    /*       discriminant = |da||db|sin(angle)     .                     */\n    /* We use these equations to reject grazing intersections by         */\n    /* thresholding abs(tan(angle)) at 1/19, corresponding to 3 degrees. */\n    if ( 19 * FT_ABS( discriminant ) > FT_ABS( dotproduct ) )\n    {\n      val = FT_MulDiv( dx, -dby, 0x40 ) + FT_MulDiv( dy, dbx, 0x40 );\n\n      R.x = FT_MulDiv( val, dax, discriminant );\n      R.y = FT_MulDiv( val, day, discriminant );\n\n      CUR.zp2.cur[point].x = CUR.zp1.cur[a0].x + R.x;\n      CUR.zp2.cur[point].y = CUR.zp1.cur[a0].y + R.y;\n    }\n    else\n    {\n      /* else, take the middle of the middles of A and B */\n\n      CUR.zp2.cur[point].x = ( CUR.zp1.cur[a0].x +\n                               CUR.zp1.cur[a1].x +\n                               CUR.zp0.cur[b0].x +\n                               CUR.zp0.cur[b1].x ) / 4;\n      CUR.zp2.cur[point].y = ( CUR.zp1.cur[a0].y +\n                               CUR.zp1.cur[a1].y +\n                               CUR.zp0.cur[b0].y +\n                               CUR.zp0.cur[b1].y ) / 4;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ALIGNPTS[]:   ALIGN PoinTS                                            */\n  /* Opcode range: 0x27                                                    */\n  /* Stack:        uint32 uint32 -->                                       */\n  /*                                                                       */\n  static void\n  Ins_ALIGNPTS( INS_ARG )\n  {\n    FT_UShort   p1, p2;\n    FT_F26Dot6  distance;\n\n\n    p1 = (FT_UShort)args[0];\n    p2 = (FT_UShort)args[1];\n\n    if ( BOUNDS( p1, CUR.zp1.n_points ) ||\n         BOUNDS( p2, CUR.zp0.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    distance = CUR_Func_project( CUR.zp0.cur + p2,\n                                 CUR.zp1.cur + p1 ) / 2;\n\n    CUR_Func_move( &CUR.zp1, p1, distance );\n    CUR_Func_move( &CUR.zp0, p2, -distance );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* IP[]:         Interpolate Point                                       */\n  /* Opcode range: 0x39                                                    */\n  /* Stack:        uint32... -->                                           */\n  /*                                                                       */\n\n  /* SOMETIMES, DUMBER CODE IS BETTER CODE */\n\n  static void\n  Ins_IP( INS_ARG )\n  {\n    FT_F26Dot6  old_range, cur_range;\n    FT_Vector*  orus_base;\n    FT_Vector*  cur_base;\n    FT_Int      twilight;\n\n    FT_UNUSED_ARG;\n\n\n    if ( CUR.top < CUR.GS.loop )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      goto Fail;\n    }\n\n    /*\n     * We need to deal in a special way with the twilight zone.\n     * Otherwise, by definition, the value of CUR.twilight.orus[n] is (0,0),\n     * for every n.\n     */\n    twilight = CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0;\n\n    if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      goto Fail;\n    }\n\n    if ( twilight )\n      orus_base = &CUR.zp0.org[CUR.GS.rp1];\n    else\n      orus_base = &CUR.zp0.orus[CUR.GS.rp1];\n\n    cur_base = &CUR.zp0.cur[CUR.GS.rp1];\n\n    /* XXX: There are some glyphs in some braindead but popular */\n    /*      fonts out there (e.g. [aeu]grave in monotype.ttf)   */\n    /*      calling IP[] with bad values of rp[12].             */\n    /*      Do something sane when this odd thing happens.      */\n    if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) ||\n         BOUNDS( CUR.GS.rp2, CUR.zp1.n_points ) )\n    {\n      old_range = 0;\n      cur_range = 0;\n    }\n    else\n    {\n      if ( twilight )\n        old_range = CUR_Func_dualproj( &CUR.zp1.org[CUR.GS.rp2],\n                                       orus_base );\n      else if ( CUR.metrics.x_scale == CUR.metrics.y_scale )\n        old_range = CUR_Func_dualproj( &CUR.zp1.orus[CUR.GS.rp2],\n                                       orus_base );\n      else\n      {\n        FT_Vector  vec;\n\n\n        vec.x = FT_MulFix( CUR.zp1.orus[CUR.GS.rp2].x - orus_base->x,\n                           CUR.metrics.x_scale );\n        vec.y = FT_MulFix( CUR.zp1.orus[CUR.GS.rp2].y - orus_base->y,\n                           CUR.metrics.y_scale );\n\n        old_range = CUR_fast_dualproj( &vec );\n      }\n\n      cur_range = CUR_Func_project ( &CUR.zp1.cur[CUR.GS.rp2], cur_base );\n    }\n\n    for ( ; CUR.GS.loop > 0; --CUR.GS.loop )\n    {\n      FT_UInt     point = (FT_UInt)CUR.stack[--CUR.args];\n      FT_F26Dot6  org_dist, cur_dist, new_dist;\n\n\n      /* check point bounds */\n      if ( BOUNDS( point, CUR.zp2.n_points ) )\n      {\n        if ( CUR.pedantic_hinting )\n        {\n          CUR.error = FT_THROW( Invalid_Reference );\n          return;\n        }\n        continue;\n      }\n\n      if ( twilight )\n        org_dist = CUR_Func_dualproj( &CUR.zp2.org[point], orus_base );\n      else if ( CUR.metrics.x_scale == CUR.metrics.y_scale )\n        org_dist = CUR_Func_dualproj( &CUR.zp2.orus[point], orus_base );\n      else\n      {\n        FT_Vector  vec;\n\n\n        vec.x = FT_MulFix( CUR.zp2.orus[point].x - orus_base->x,\n                           CUR.metrics.x_scale );\n        vec.y = FT_MulFix( CUR.zp2.orus[point].y - orus_base->y,\n                           CUR.metrics.y_scale );\n\n        org_dist = CUR_fast_dualproj( &vec );\n      }\n\n      cur_dist = CUR_Func_project( &CUR.zp2.cur[point], cur_base );\n\n      if ( org_dist )\n      {\n        if ( old_range )\n          new_dist = FT_MulDiv( org_dist, cur_range, old_range );\n        else\n        {\n          /* This is the same as what MS does for the invalid case:  */\n          /*                                                         */\n          /*   delta = (Original_Pt - Original_RP1) -                */\n          /*           (Current_Pt - Current_RP1)         ;          */\n          /*                                                         */\n          /* In FreeType speak:                                      */\n          /*                                                         */\n          /*   delta = org_dist - cur_dist          .                */\n          /*                                                         */\n          /* We move `point' by `new_dist - cur_dist' after leaving  */\n          /* this block, thus we have                                */\n          /*                                                         */\n          /*   new_dist - cur_dist = delta                   ,       */\n          /*   new_dist - cur_dist = org_dist - cur_dist     ,       */\n          /*              new_dist = org_dist                .       */\n\n          new_dist = org_dist;\n        }\n      }\n      else\n        new_dist = 0;\n\n      CUR_Func_move( &CUR.zp2, (FT_UShort)point, new_dist - cur_dist );\n    }\n\n  Fail:\n    CUR.GS.loop = 1;\n    CUR.new_top = CUR.args;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* UTP[a]:       UnTouch Point                                           */\n  /* Opcode range: 0x29                                                    */\n  /* Stack:        uint32 -->                                              */\n  /*                                                                       */\n  static void\n  Ins_UTP( INS_ARG )\n  {\n    FT_UShort  point;\n    FT_Byte    mask;\n\n\n    point = (FT_UShort)args[0];\n\n    if ( BOUNDS( point, CUR.zp0.n_points ) )\n    {\n      if ( CUR.pedantic_hinting )\n        CUR.error = FT_THROW( Invalid_Reference );\n      return;\n    }\n\n    mask = 0xFF;\n\n    if ( CUR.GS.freeVector.x != 0 )\n      mask &= ~FT_CURVE_TAG_TOUCH_X;\n\n    if ( CUR.GS.freeVector.y != 0 )\n      mask &= ~FT_CURVE_TAG_TOUCH_Y;\n\n    CUR.zp0.tags[point] &= mask;\n  }\n\n\n  /* Local variables for Ins_IUP: */\n  typedef struct  IUP_WorkerRec_\n  {\n    FT_Vector*  orgs;   /* original and current coordinate */\n    FT_Vector*  curs;   /* arrays                          */\n    FT_Vector*  orus;\n    FT_UInt     max_points;\n\n  } IUP_WorkerRec, *IUP_Worker;\n\n\n  static void\n  _iup_worker_shift( IUP_Worker  worker,\n                     FT_UInt     p1,\n                     FT_UInt     p2,\n                     FT_UInt     p )\n  {\n    FT_UInt     i;\n    FT_F26Dot6  dx;\n\n\n    dx = worker->curs[p].x - worker->orgs[p].x;\n    if ( dx != 0 )\n    {\n      for ( i = p1; i < p; i++ )\n        worker->curs[i].x += dx;\n\n      for ( i = p + 1; i <= p2; i++ )\n        worker->curs[i].x += dx;\n    }\n  }\n\n\n  static void\n  _iup_worker_interpolate( IUP_Worker  worker,\n                           FT_UInt     p1,\n                           FT_UInt     p2,\n                           FT_UInt     ref1,\n                           FT_UInt     ref2 )\n  {\n    FT_UInt     i;\n    FT_F26Dot6  orus1, orus2, org1, org2, delta1, delta2;\n\n\n    if ( p1 > p2 )\n      return;\n\n    if ( BOUNDS( ref1, worker->max_points ) ||\n         BOUNDS( ref2, worker->max_points ) )\n      return;\n\n    orus1 = worker->orus[ref1].x;\n    orus2 = worker->orus[ref2].x;\n\n    if ( orus1 > orus2 )\n    {\n      FT_F26Dot6  tmp_o;\n      FT_UInt     tmp_r;\n\n\n      tmp_o = orus1;\n      orus1 = orus2;\n      orus2 = tmp_o;\n\n      tmp_r = ref1;\n      ref1  = ref2;\n      ref2  = tmp_r;\n    }\n\n    org1   = worker->orgs[ref1].x;\n    org2   = worker->orgs[ref2].x;\n    delta1 = worker->curs[ref1].x - org1;\n    delta2 = worker->curs[ref2].x - org2;\n\n    if ( orus1 == orus2 )\n    {\n      /* simple shift of untouched points */\n      for ( i = p1; i <= p2; i++ )\n      {\n        FT_F26Dot6  x = worker->orgs[i].x;\n\n\n        if ( x <= org1 )\n          x += delta1;\n        else\n          x += delta2;\n\n        worker->curs[i].x = x;\n      }\n    }\n    else\n    {\n      FT_Fixed  scale       = 0;\n      FT_Bool   scale_valid = 0;\n\n\n      /* interpolation */\n      for ( i = p1; i <= p2; i++ )\n      {\n        FT_F26Dot6  x = worker->orgs[i].x;\n\n\n        if ( x <= org1 )\n          x += delta1;\n\n        else if ( x >= org2 )\n          x += delta2;\n\n        else\n        {\n          if ( !scale_valid )\n          {\n            scale_valid = 1;\n            scale       = FT_DivFix( org2 + delta2 - ( org1 + delta1 ),\n                                     orus2 - orus1 );\n          }\n\n          x = ( org1 + delta1 ) +\n              FT_MulFix( worker->orus[i].x - orus1, scale );\n        }\n        worker->curs[i].x = x;\n      }\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* IUP[a]:       Interpolate Untouched Points                            */\n  /* Opcode range: 0x30-0x31                                               */\n  /* Stack:        -->                                                     */\n  /*                                                                       */\n  static void\n  Ins_IUP( INS_ARG )\n  {\n    IUP_WorkerRec  V;\n    FT_Byte        mask;\n\n    FT_UInt   first_point;   /* first point of contour        */\n    FT_UInt   end_point;     /* end point (last+1) of contour */\n\n    FT_UInt   first_touched; /* first touched point in contour   */\n    FT_UInt   cur_touched;   /* current touched point in contour */\n\n    FT_UInt   point;         /* current point   */\n    FT_Short  contour;       /* current contour */\n\n    FT_UNUSED_ARG;\n\n\n    /* ignore empty outlines */\n    if ( CUR.pts.n_contours == 0 )\n      return;\n\n    if ( CUR.opcode & 1 )\n    {\n      mask   = FT_CURVE_TAG_TOUCH_X;\n      V.orgs = CUR.pts.org;\n      V.curs = CUR.pts.cur;\n      V.orus = CUR.pts.orus;\n    }\n    else\n    {\n      mask   = FT_CURVE_TAG_TOUCH_Y;\n      V.orgs = (FT_Vector*)( (FT_Pos*)CUR.pts.org + 1 );\n      V.curs = (FT_Vector*)( (FT_Pos*)CUR.pts.cur + 1 );\n      V.orus = (FT_Vector*)( (FT_Pos*)CUR.pts.orus + 1 );\n    }\n    V.max_points = CUR.pts.n_points;\n\n    contour = 0;\n    point   = 0;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    if ( SUBPIXEL_HINTING  &&\n         CUR.ignore_x_mode )\n    {\n      CUR.iup_called = TRUE;\n      if ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_IUP )\n        return;\n    }\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    do\n    {\n      end_point   = CUR.pts.contours[contour] - CUR.pts.first_point;\n      first_point = point;\n\n      if ( BOUNDS ( end_point, CUR.pts.n_points ) )\n        end_point = CUR.pts.n_points - 1;\n\n      while ( point <= end_point && ( CUR.pts.tags[point] & mask ) == 0 )\n        point++;\n\n      if ( point <= end_point )\n      {\n        first_touched = point;\n        cur_touched   = point;\n\n        point++;\n\n        while ( point <= end_point )\n        {\n          if ( ( CUR.pts.tags[point] & mask ) != 0 )\n          {\n            _iup_worker_interpolate( &V,\n                                     cur_touched + 1,\n                                     point - 1,\n                                     cur_touched,\n                                     point );\n            cur_touched = point;\n          }\n\n          point++;\n        }\n\n        if ( cur_touched == first_touched )\n          _iup_worker_shift( &V, first_point, end_point, cur_touched );\n        else\n        {\n          _iup_worker_interpolate( &V,\n                                   (FT_UShort)( cur_touched + 1 ),\n                                   end_point,\n                                   cur_touched,\n                                   first_touched );\n\n          if ( first_touched > 0 )\n            _iup_worker_interpolate( &V,\n                                     first_point,\n                                     first_touched - 1,\n                                     cur_touched,\n                                     first_touched );\n        }\n      }\n      contour++;\n    } while ( contour < CUR.pts.n_contours );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DELTAPn[]:    DELTA exceptions P1, P2, P3                             */\n  /* Opcode range: 0x5D,0x71,0x72                                          */\n  /* Stack:        uint32 (2 * uint32)... -->                              */\n  /*                                                                       */\n  static void\n  Ins_DELTAP( INS_ARG )\n  {\n    FT_ULong   nump, k;\n    FT_UShort  A;\n    FT_ULong   C, P;\n    FT_Long    B;\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    FT_UShort  B1, B2;\n\n\n    if ( SUBPIXEL_HINTING                                        &&\n         CUR.ignore_x_mode                                       &&\n         CUR.iup_called                                          &&\n         ( CUR.sph_tweak_flags & SPH_TWEAK_NO_DELTAP_AFTER_IUP ) )\n      goto Fail;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    /* Delta hinting is covered by US Patent 5159668. */\n    if ( CUR.face->unpatented_hinting )\n    {\n      FT_Long  n = args[0] * 2;\n\n\n      if ( CUR.args < n )\n      {\n        if ( CUR.pedantic_hinting )\n          CUR.error = FT_THROW( Too_Few_Arguments );\n        n = CUR.args;\n      }\n\n      CUR.args -= n;\n      CUR.new_top = CUR.args;\n      return;\n    }\n#endif\n\n    P = (FT_ULong)CUR_Func_cur_ppem();\n    nump = (FT_ULong)args[0];   /* some points theoretically may occur more\n                                   than once, thus UShort isn't enough */\n\n    for ( k = 1; k <= nump; k++ )\n    {\n      if ( CUR.args < 2 )\n      {\n        if ( CUR.pedantic_hinting )\n          CUR.error = FT_THROW( Too_Few_Arguments );\n        CUR.args = 0;\n        goto Fail;\n      }\n\n      CUR.args -= 2;\n\n      A = (FT_UShort)CUR.stack[CUR.args + 1];\n      B = CUR.stack[CUR.args];\n\n      /* XXX: Because some popular fonts contain some invalid DeltaP */\n      /*      instructions, we simply ignore them when the stacked   */\n      /*      point reference is off limit, rather than returning an */\n      /*      error.  As a delta instruction doesn't change a glyph  */\n      /*      in great ways, this shouldn't be a problem.            */\n\n      if ( !BOUNDS( A, CUR.zp0.n_points ) )\n      {\n        C = ( (FT_ULong)B & 0xF0 ) >> 4;\n\n        switch ( CUR.opcode )\n        {\n        case 0x5D:\n          break;\n\n        case 0x71:\n          C += 16;\n          break;\n\n        case 0x72:\n          C += 32;\n          break;\n        }\n\n        C += CUR.GS.delta_base;\n\n        if ( P == C )\n        {\n          B = ( (FT_ULong)B & 0xF ) - 8;\n          if ( B >= 0 )\n            B++;\n          B *= 1L << ( 6 - CUR.GS.delta_shift );\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n          if ( SUBPIXEL_HINTING )\n          {\n            /*\n             *  Allow delta move if\n             *\n             *  - not using ignore_x_mode rendering,\n             *  - glyph is specifically set to allow it, or\n             *  - glyph is composite and freedom vector is not in subpixel\n             *    direction.\n             */\n            if ( !CUR.ignore_x_mode                                   ||\n                 ( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_DO_DELTAP ) ||\n                 ( CUR.is_composite && CUR.GS.freeVector.y != 0 )     )\n              CUR_Func_move( &CUR.zp0, A, B );\n\n            /* Otherwise, apply subpixel hinting and compatibility mode */\n            /* rules, always skipping deltas in subpixel direction.     */\n            else if ( CUR.ignore_x_mode && CUR.GS.freeVector.y != 0 )\n            {\n              /* save the y value of the point now; compare after move */\n              B1 = (FT_UShort)CUR.zp0.cur[A].y;\n\n              /* Standard subpixel hinting: Allow y move for y-touched */\n              /* points.  This messes up DejaVu ...                    */\n              if ( !CUR.face->sph_compatibility_mode          &&\n                   ( CUR.zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) )\n                CUR_Func_move( &CUR.zp0, A, B );\n\n              /* compatibility mode */\n              else if ( CUR.face->sph_compatibility_mode                      &&\n                        !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) )\n              {\n                if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES )\n                  B = FT_PIX_ROUND( B1 + B ) - B1;\n\n                /* Allow delta move if using sph_compatibility_mode,   */\n                /* IUP has not been called, and point is touched on Y. */\n                if ( !CUR.iup_called                            &&\n                     ( CUR.zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) )\n                  CUR_Func_move( &CUR.zp0, A, B );\n              }\n\n              B2 = (FT_UShort)CUR.zp0.cur[A].y;\n\n              /* Reverse this move if it results in a disallowed move */\n              if ( CUR.GS.freeVector.y != 0                           &&\n                   ( ( CUR.face->sph_compatibility_mode           &&\n                       ( B1 & 63 ) == 0                           &&\n                       ( B2 & 63 ) != 0                           ) ||\n                     ( ( CUR.sph_tweak_flags                    &\n                         SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP ) &&\n                       ( B1 & 63 ) != 0                           &&\n                       ( B2 & 63 ) != 0                           ) ) )\n                CUR_Func_move( &CUR.zp0, A, -B );\n            }\n          }\n          else\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n            CUR_Func_move( &CUR.zp0, A, B );\n        }\n      }\n      else\n        if ( CUR.pedantic_hinting )\n          CUR.error = FT_THROW( Invalid_Reference );\n    }\n\n  Fail:\n    CUR.new_top = CUR.args;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DELTACn[]:    DELTA exceptions C1, C2, C3                             */\n  /* Opcode range: 0x73,0x74,0x75                                          */\n  /* Stack:        uint32 (2 * uint32)... -->                              */\n  /*                                                                       */\n  static void\n  Ins_DELTAC( INS_ARG )\n  {\n    FT_ULong  nump, k;\n    FT_ULong  A, C, P;\n    FT_Long   B;\n\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    /* Delta hinting is covered by US Patent 5159668. */\n    if ( CUR.face->unpatented_hinting )\n    {\n      FT_Long  n = args[0] * 2;\n\n\n      if ( CUR.args < n )\n      {\n        if ( CUR.pedantic_hinting )\n          CUR.error = FT_THROW( Too_Few_Arguments );\n        n = CUR.args;\n      }\n\n      CUR.args -= n;\n      CUR.new_top = CUR.args;\n      return;\n    }\n#endif\n\n    P    = (FT_ULong)CUR_Func_cur_ppem();\n    nump = (FT_ULong)args[0];\n\n    for ( k = 1; k <= nump; k++ )\n    {\n      if ( CUR.args < 2 )\n      {\n        if ( CUR.pedantic_hinting )\n          CUR.error = FT_THROW( Too_Few_Arguments );\n        CUR.args = 0;\n        goto Fail;\n      }\n\n      CUR.args -= 2;\n\n      A = (FT_ULong)CUR.stack[CUR.args + 1];\n      B = CUR.stack[CUR.args];\n\n      if ( BOUNDSL( A, CUR.cvtSize ) )\n      {\n        if ( CUR.pedantic_hinting )\n        {\n          CUR.error = FT_THROW( Invalid_Reference );\n          return;\n        }\n      }\n      else\n      {\n        C = ( (FT_ULong)B & 0xF0 ) >> 4;\n\n        switch ( CUR.opcode )\n        {\n        case 0x73:\n          break;\n\n        case 0x74:\n          C += 16;\n          break;\n\n        case 0x75:\n          C += 32;\n          break;\n        }\n\n        C += CUR.GS.delta_base;\n\n        if ( P == C )\n        {\n          B = ( (FT_ULong)B & 0xF ) - 8;\n          if ( B >= 0 )\n            B++;\n          B *= 1L << ( 6 - CUR.GS.delta_shift );\n\n          CUR_Func_move_cvt( A, B );\n        }\n      }\n    }\n\n  Fail:\n    CUR.new_top = CUR.args;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* MISC. INSTRUCTIONS                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* GETINFO[]:    GET INFOrmation                                         */\n  /* Opcode range: 0x88                                                    */\n  /* Stack:        uint32 --> uint32                                       */\n  /*                                                                       */\n  static void\n  Ins_GETINFO( INS_ARG )\n  {\n    FT_Long  K;\n\n\n    K = 0;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    /********************************/\n    /* RASTERIZER VERSION           */\n    /* Selector Bit:  0             */\n    /* Return Bit(s): 0-7           */\n    /*                              */\n    if ( SUBPIXEL_HINTING     &&\n         ( args[0] & 1 ) != 0 &&\n         CUR.ignore_x_mode    )\n    {\n      K = CUR.rasterizer_version;\n      FT_TRACE7(( \"Setting rasterizer version %d\\n\",\n                  CUR.rasterizer_version ));\n    }\n    else\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n      if ( ( args[0] & 1 ) != 0 )\n        K = TT_INTERPRETER_VERSION_35;\n\n    /********************************/\n    /* GLYPH ROTATED                */\n    /* Selector Bit:  1             */\n    /* Return Bit(s): 8             */\n    /*                              */\n    if ( ( args[0] & 2 ) != 0 && CUR.tt_metrics.rotated )\n      K |= 0x80;\n\n    /********************************/\n    /* GLYPH STRETCHED              */\n    /* Selector Bit:  2             */\n    /* Return Bit(s): 9             */\n    /*                              */\n    if ( ( args[0] & 4 ) != 0 && CUR.tt_metrics.stretched )\n      K |= 1 << 8;\n\n    /********************************/\n    /* HINTING FOR GRAYSCALE        */\n    /* Selector Bit:  5             */\n    /* Return Bit(s): 12            */\n    /*                              */\n    if ( ( args[0] & 32 ) != 0 && CUR.grayscale )\n      K |= 1 << 12;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n    if ( SUBPIXEL_HINTING                                    &&\n         CUR.ignore_x_mode                                   &&\n         CUR.rasterizer_version >= TT_INTERPRETER_VERSION_35 )\n    {\n\n      if ( CUR.rasterizer_version >= 37 )\n      {\n        /********************************/\n        /* HINTING FOR SUBPIXEL         */\n        /* Selector Bit:  6             */\n        /* Return Bit(s): 13            */\n        /*                              */\n        if ( ( args[0] & 64 ) != 0 && CUR.subpixel )\n          K |= 1 << 13;\n\n        /********************************/\n        /* COMPATIBLE WIDTHS ENABLED    */\n        /* Selector Bit:  7             */\n        /* Return Bit(s): 14            */\n        /*                              */\n        /* Functionality still needs to be added */\n        if ( ( args[0] & 128 ) != 0 && CUR.compatible_widths )\n          K |= 1 << 14;\n\n        /********************************/\n        /* SYMMETRICAL SMOOTHING        */\n        /* Selector Bit:  8             */\n        /* Return Bit(s): 15            */\n        /*                              */\n        /* Functionality still needs to be added */\n        if ( ( args[0] & 256 ) != 0 && CUR.symmetrical_smoothing )\n          K |= 1 << 15;\n\n        /********************************/\n        /* HINTING FOR BGR?             */\n        /* Selector Bit:  9             */\n        /* Return Bit(s): 16            */\n        /*                              */\n        /* Functionality still needs to be added */\n        if ( ( args[0] & 512 ) != 0 && CUR.bgr )\n          K |= 1 << 16;\n\n        if ( CUR.rasterizer_version >= 38 )\n        {\n          /********************************/\n          /* SUBPIXEL POSITIONED?         */\n          /* Selector Bit:  10            */\n          /* Return Bit(s): 17            */\n          /*                              */\n          /* Functionality still needs to be added */\n          if ( ( args[0] & 1024 ) != 0 && CUR.subpixel_positioned )\n            K |= 1 << 17;\n        }\n      }\n    }\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    args[0] = K;\n  }\n\n\n  static void\n  Ins_UNKNOWN( INS_ARG )\n  {\n    TT_DefRecord*  def   = CUR.IDefs;\n    TT_DefRecord*  limit = def + CUR.numIDefs;\n\n    FT_UNUSED_ARG;\n\n\n    for ( ; def < limit; def++ )\n    {\n      if ( (FT_Byte)def->opc == CUR.opcode && def->active )\n      {\n        TT_CallRec*  call;\n\n\n        if ( CUR.callTop >= CUR.callSize )\n        {\n          CUR.error = FT_THROW( Stack_Overflow );\n          return;\n        }\n\n        call = CUR.callStack + CUR.callTop++;\n\n        call->Caller_Range = CUR.curRange;\n        call->Caller_IP    = CUR.IP + 1;\n        call->Cur_Count    = 1;\n        call->Def          = def;\n\n        INS_Goto_CodeRange( def->range, def->start );\n\n        CUR.step_ins = FALSE;\n        return;\n      }\n    }\n\n    CUR.error = FT_THROW( Invalid_Opcode );\n  }\n\n\n#ifndef TT_CONFIG_OPTION_INTERPRETER_SWITCH\n\n\n  static\n  TInstruction_Function  Instruct_Dispatch[256] =\n  {\n    /* Opcodes are gathered in groups of 16. */\n    /* Please keep the spaces as they are.   */\n\n    /*  SVTCA  y  */  Ins_SVTCA,\n    /*  SVTCA  x  */  Ins_SVTCA,\n    /*  SPvTCA y  */  Ins_SPVTCA,\n    /*  SPvTCA x  */  Ins_SPVTCA,\n    /*  SFvTCA y  */  Ins_SFVTCA,\n    /*  SFvTCA x  */  Ins_SFVTCA,\n    /*  SPvTL //  */  Ins_SPVTL,\n    /*  SPvTL +   */  Ins_SPVTL,\n    /*  SFvTL //  */  Ins_SFVTL,\n    /*  SFvTL +   */  Ins_SFVTL,\n    /*  SPvFS     */  Ins_SPVFS,\n    /*  SFvFS     */  Ins_SFVFS,\n    /*  GPV       */  Ins_GPV,\n    /*  GFV       */  Ins_GFV,\n    /*  SFvTPv    */  Ins_SFVTPV,\n    /*  ISECT     */  Ins_ISECT,\n\n    /*  SRP0      */  Ins_SRP0,\n    /*  SRP1      */  Ins_SRP1,\n    /*  SRP2      */  Ins_SRP2,\n    /*  SZP0      */  Ins_SZP0,\n    /*  SZP1      */  Ins_SZP1,\n    /*  SZP2      */  Ins_SZP2,\n    /*  SZPS      */  Ins_SZPS,\n    /*  SLOOP     */  Ins_SLOOP,\n    /*  RTG       */  Ins_RTG,\n    /*  RTHG      */  Ins_RTHG,\n    /*  SMD       */  Ins_SMD,\n    /*  ELSE      */  Ins_ELSE,\n    /*  JMPR      */  Ins_JMPR,\n    /*  SCvTCi    */  Ins_SCVTCI,\n    /*  SSwCi     */  Ins_SSWCI,\n    /*  SSW       */  Ins_SSW,\n\n    /*  DUP       */  Ins_DUP,\n    /*  POP       */  Ins_POP,\n    /*  CLEAR     */  Ins_CLEAR,\n    /*  SWAP      */  Ins_SWAP,\n    /*  DEPTH     */  Ins_DEPTH,\n    /*  CINDEX    */  Ins_CINDEX,\n    /*  MINDEX    */  Ins_MINDEX,\n    /*  AlignPTS  */  Ins_ALIGNPTS,\n    /*  INS_0x28  */  Ins_UNKNOWN,\n    /*  UTP       */  Ins_UTP,\n    /*  LOOPCALL  */  Ins_LOOPCALL,\n    /*  CALL      */  Ins_CALL,\n    /*  FDEF      */  Ins_FDEF,\n    /*  ENDF      */  Ins_ENDF,\n    /*  MDAP[0]   */  Ins_MDAP,\n    /*  MDAP[1]   */  Ins_MDAP,\n\n    /*  IUP[0]    */  Ins_IUP,\n    /*  IUP[1]    */  Ins_IUP,\n    /*  SHP[0]    */  Ins_SHP,\n    /*  SHP[1]    */  Ins_SHP,\n    /*  SHC[0]    */  Ins_SHC,\n    /*  SHC[1]    */  Ins_SHC,\n    /*  SHZ[0]    */  Ins_SHZ,\n    /*  SHZ[1]    */  Ins_SHZ,\n    /*  SHPIX     */  Ins_SHPIX,\n    /*  IP        */  Ins_IP,\n    /*  MSIRP[0]  */  Ins_MSIRP,\n    /*  MSIRP[1]  */  Ins_MSIRP,\n    /*  AlignRP   */  Ins_ALIGNRP,\n    /*  RTDG      */  Ins_RTDG,\n    /*  MIAP[0]   */  Ins_MIAP,\n    /*  MIAP[1]   */  Ins_MIAP,\n\n    /*  NPushB    */  Ins_NPUSHB,\n    /*  NPushW    */  Ins_NPUSHW,\n    /*  WS        */  Ins_WS,\n    /*  RS        */  Ins_RS,\n    /*  WCvtP     */  Ins_WCVTP,\n    /*  RCvt      */  Ins_RCVT,\n    /*  GC[0]     */  Ins_GC,\n    /*  GC[1]     */  Ins_GC,\n    /*  SCFS      */  Ins_SCFS,\n    /*  MD[0]     */  Ins_MD,\n    /*  MD[1]     */  Ins_MD,\n    /*  MPPEM     */  Ins_MPPEM,\n    /*  MPS       */  Ins_MPS,\n    /*  FlipON    */  Ins_FLIPON,\n    /*  FlipOFF   */  Ins_FLIPOFF,\n    /*  DEBUG     */  Ins_DEBUG,\n\n    /*  LT        */  Ins_LT,\n    /*  LTEQ      */  Ins_LTEQ,\n    /*  GT        */  Ins_GT,\n    /*  GTEQ      */  Ins_GTEQ,\n    /*  EQ        */  Ins_EQ,\n    /*  NEQ       */  Ins_NEQ,\n    /*  ODD       */  Ins_ODD,\n    /*  EVEN      */  Ins_EVEN,\n    /*  IF        */  Ins_IF,\n    /*  EIF       */  Ins_EIF,\n    /*  AND       */  Ins_AND,\n    /*  OR        */  Ins_OR,\n    /*  NOT       */  Ins_NOT,\n    /*  DeltaP1   */  Ins_DELTAP,\n    /*  SDB       */  Ins_SDB,\n    /*  SDS       */  Ins_SDS,\n\n    /*  ADD       */  Ins_ADD,\n    /*  SUB       */  Ins_SUB,\n    /*  DIV       */  Ins_DIV,\n    /*  MUL       */  Ins_MUL,\n    /*  ABS       */  Ins_ABS,\n    /*  NEG       */  Ins_NEG,\n    /*  FLOOR     */  Ins_FLOOR,\n    /*  CEILING   */  Ins_CEILING,\n    /*  ROUND[0]  */  Ins_ROUND,\n    /*  ROUND[1]  */  Ins_ROUND,\n    /*  ROUND[2]  */  Ins_ROUND,\n    /*  ROUND[3]  */  Ins_ROUND,\n    /*  NROUND[0] */  Ins_NROUND,\n    /*  NROUND[1] */  Ins_NROUND,\n    /*  NROUND[2] */  Ins_NROUND,\n    /*  NROUND[3] */  Ins_NROUND,\n\n    /*  WCvtF     */  Ins_WCVTF,\n    /*  DeltaP2   */  Ins_DELTAP,\n    /*  DeltaP3   */  Ins_DELTAP,\n    /*  DeltaCn[0] */ Ins_DELTAC,\n    /*  DeltaCn[1] */ Ins_DELTAC,\n    /*  DeltaCn[2] */ Ins_DELTAC,\n    /*  SROUND    */  Ins_SROUND,\n    /*  S45Round  */  Ins_S45ROUND,\n    /*  JROT      */  Ins_JROT,\n    /*  JROF      */  Ins_JROF,\n    /*  ROFF      */  Ins_ROFF,\n    /*  INS_0x7B  */  Ins_UNKNOWN,\n    /*  RUTG      */  Ins_RUTG,\n    /*  RDTG      */  Ins_RDTG,\n    /*  SANGW     */  Ins_SANGW,\n    /*  AA        */  Ins_AA,\n\n    /*  FlipPT    */  Ins_FLIPPT,\n    /*  FlipRgON  */  Ins_FLIPRGON,\n    /*  FlipRgOFF */  Ins_FLIPRGOFF,\n    /*  INS_0x83  */  Ins_UNKNOWN,\n    /*  INS_0x84  */  Ins_UNKNOWN,\n    /*  ScanCTRL  */  Ins_SCANCTRL,\n    /*  SDPVTL[0] */  Ins_SDPVTL,\n    /*  SDPVTL[1] */  Ins_SDPVTL,\n    /*  GetINFO   */  Ins_GETINFO,\n    /*  IDEF      */  Ins_IDEF,\n    /*  ROLL      */  Ins_ROLL,\n    /*  MAX       */  Ins_MAX,\n    /*  MIN       */  Ins_MIN,\n    /*  ScanTYPE  */  Ins_SCANTYPE,\n    /*  InstCTRL  */  Ins_INSTCTRL,\n    /*  INS_0x8F  */  Ins_UNKNOWN,\n\n    /*  INS_0x90  */   Ins_UNKNOWN,\n    /*  INS_0x91  */   Ins_UNKNOWN,\n    /*  INS_0x92  */   Ins_UNKNOWN,\n    /*  INS_0x93  */   Ins_UNKNOWN,\n    /*  INS_0x94  */   Ins_UNKNOWN,\n    /*  INS_0x95  */   Ins_UNKNOWN,\n    /*  INS_0x96  */   Ins_UNKNOWN,\n    /*  INS_0x97  */   Ins_UNKNOWN,\n    /*  INS_0x98  */   Ins_UNKNOWN,\n    /*  INS_0x99  */   Ins_UNKNOWN,\n    /*  INS_0x9A  */   Ins_UNKNOWN,\n    /*  INS_0x9B  */   Ins_UNKNOWN,\n    /*  INS_0x9C  */   Ins_UNKNOWN,\n    /*  INS_0x9D  */   Ins_UNKNOWN,\n    /*  INS_0x9E  */   Ins_UNKNOWN,\n    /*  INS_0x9F  */   Ins_UNKNOWN,\n\n    /*  INS_0xA0  */   Ins_UNKNOWN,\n    /*  INS_0xA1  */   Ins_UNKNOWN,\n    /*  INS_0xA2  */   Ins_UNKNOWN,\n    /*  INS_0xA3  */   Ins_UNKNOWN,\n    /*  INS_0xA4  */   Ins_UNKNOWN,\n    /*  INS_0xA5  */   Ins_UNKNOWN,\n    /*  INS_0xA6  */   Ins_UNKNOWN,\n    /*  INS_0xA7  */   Ins_UNKNOWN,\n    /*  INS_0xA8  */   Ins_UNKNOWN,\n    /*  INS_0xA9  */   Ins_UNKNOWN,\n    /*  INS_0xAA  */   Ins_UNKNOWN,\n    /*  INS_0xAB  */   Ins_UNKNOWN,\n    /*  INS_0xAC  */   Ins_UNKNOWN,\n    /*  INS_0xAD  */   Ins_UNKNOWN,\n    /*  INS_0xAE  */   Ins_UNKNOWN,\n    /*  INS_0xAF  */   Ins_UNKNOWN,\n\n    /*  PushB[0]  */  Ins_PUSHB,\n    /*  PushB[1]  */  Ins_PUSHB,\n    /*  PushB[2]  */  Ins_PUSHB,\n    /*  PushB[3]  */  Ins_PUSHB,\n    /*  PushB[4]  */  Ins_PUSHB,\n    /*  PushB[5]  */  Ins_PUSHB,\n    /*  PushB[6]  */  Ins_PUSHB,\n    /*  PushB[7]  */  Ins_PUSHB,\n    /*  PushW[0]  */  Ins_PUSHW,\n    /*  PushW[1]  */  Ins_PUSHW,\n    /*  PushW[2]  */  Ins_PUSHW,\n    /*  PushW[3]  */  Ins_PUSHW,\n    /*  PushW[4]  */  Ins_PUSHW,\n    /*  PushW[5]  */  Ins_PUSHW,\n    /*  PushW[6]  */  Ins_PUSHW,\n    /*  PushW[7]  */  Ins_PUSHW,\n\n    /*  MDRP[00]  */  Ins_MDRP,\n    /*  MDRP[01]  */  Ins_MDRP,\n    /*  MDRP[02]  */  Ins_MDRP,\n    /*  MDRP[03]  */  Ins_MDRP,\n    /*  MDRP[04]  */  Ins_MDRP,\n    /*  MDRP[05]  */  Ins_MDRP,\n    /*  MDRP[06]  */  Ins_MDRP,\n    /*  MDRP[07]  */  Ins_MDRP,\n    /*  MDRP[08]  */  Ins_MDRP,\n    /*  MDRP[09]  */  Ins_MDRP,\n    /*  MDRP[10]  */  Ins_MDRP,\n    /*  MDRP[11]  */  Ins_MDRP,\n    /*  MDRP[12]  */  Ins_MDRP,\n    /*  MDRP[13]  */  Ins_MDRP,\n    /*  MDRP[14]  */  Ins_MDRP,\n    /*  MDRP[15]  */  Ins_MDRP,\n\n    /*  MDRP[16]  */  Ins_MDRP,\n    /*  MDRP[17]  */  Ins_MDRP,\n    /*  MDRP[18]  */  Ins_MDRP,\n    /*  MDRP[19]  */  Ins_MDRP,\n    /*  MDRP[20]  */  Ins_MDRP,\n    /*  MDRP[21]  */  Ins_MDRP,\n    /*  MDRP[22]  */  Ins_MDRP,\n    /*  MDRP[23]  */  Ins_MDRP,\n    /*  MDRP[24]  */  Ins_MDRP,\n    /*  MDRP[25]  */  Ins_MDRP,\n    /*  MDRP[26]  */  Ins_MDRP,\n    /*  MDRP[27]  */  Ins_MDRP,\n    /*  MDRP[28]  */  Ins_MDRP,\n    /*  MDRP[29]  */  Ins_MDRP,\n    /*  MDRP[30]  */  Ins_MDRP,\n    /*  MDRP[31]  */  Ins_MDRP,\n\n    /*  MIRP[00]  */  Ins_MIRP,\n    /*  MIRP[01]  */  Ins_MIRP,\n    /*  MIRP[02]  */  Ins_MIRP,\n    /*  MIRP[03]  */  Ins_MIRP,\n    /*  MIRP[04]  */  Ins_MIRP,\n    /*  MIRP[05]  */  Ins_MIRP,\n    /*  MIRP[06]  */  Ins_MIRP,\n    /*  MIRP[07]  */  Ins_MIRP,\n    /*  MIRP[08]  */  Ins_MIRP,\n    /*  MIRP[09]  */  Ins_MIRP,\n    /*  MIRP[10]  */  Ins_MIRP,\n    /*  MIRP[11]  */  Ins_MIRP,\n    /*  MIRP[12]  */  Ins_MIRP,\n    /*  MIRP[13]  */  Ins_MIRP,\n    /*  MIRP[14]  */  Ins_MIRP,\n    /*  MIRP[15]  */  Ins_MIRP,\n\n    /*  MIRP[16]  */  Ins_MIRP,\n    /*  MIRP[17]  */  Ins_MIRP,\n    /*  MIRP[18]  */  Ins_MIRP,\n    /*  MIRP[19]  */  Ins_MIRP,\n    /*  MIRP[20]  */  Ins_MIRP,\n    /*  MIRP[21]  */  Ins_MIRP,\n    /*  MIRP[22]  */  Ins_MIRP,\n    /*  MIRP[23]  */  Ins_MIRP,\n    /*  MIRP[24]  */  Ins_MIRP,\n    /*  MIRP[25]  */  Ins_MIRP,\n    /*  MIRP[26]  */  Ins_MIRP,\n    /*  MIRP[27]  */  Ins_MIRP,\n    /*  MIRP[28]  */  Ins_MIRP,\n    /*  MIRP[29]  */  Ins_MIRP,\n    /*  MIRP[30]  */  Ins_MIRP,\n    /*  MIRP[31]  */  Ins_MIRP\n  };\n\n\n#endif /* !TT_CONFIG_OPTION_INTERPRETER_SWITCH */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* RUN                                                                   */\n  /*                                                                       */\n  /*  This function executes a run of opcodes.  It will exit in the        */\n  /*  following cases:                                                     */\n  /*                                                                       */\n  /*  - Errors (in which case it returns FALSE).                           */\n  /*                                                                       */\n  /*  - Reaching the end of the main code range (returns TRUE).            */\n  /*    Reaching the end of a code range within a function call is an      */\n  /*    error.                                                             */\n  /*                                                                       */\n  /*  - After executing one single opcode, if the flag `Instruction_Trap'  */\n  /*    is set to TRUE (returns TRUE).                                     */\n  /*                                                                       */\n  /*  On exit with TRUE, test IP < CodeSize to know whether it comes from  */\n  /*  an instruction trap or a normal termination.                         */\n  /*                                                                       */\n  /*                                                                       */\n  /*  Note: The documented DEBUG opcode pops a value from the stack.  This */\n  /*        behaviour is unsupported; here a DEBUG opcode is always an     */\n  /*        error.                                                         */\n  /*                                                                       */\n  /*                                                                       */\n  /* THIS IS THE INTERPRETER'S MAIN LOOP.                                  */\n  /*                                                                       */\n  /*  Instructions appear in the specification's order.                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* documentation is in ttinterp.h */\n\n  FT_EXPORT_DEF( FT_Error )\n  TT_RunIns( TT_ExecContext  exc )\n  {\n    FT_Long    ins_counter = 0;  /* executed instructions counter */\n    FT_UShort  i;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    FT_Byte    opcode_pattern[1][2] = {\n                  /* #8 TypeMan Talk Align */\n                  {\n                    0x06, /* SPVTL   */\n                    0x7D, /* RDTG    */\n                  },\n                };\n    FT_UShort  opcode_patterns   = 1;\n    FT_UShort  opcode_pointer[1] = { 0 };\n    FT_UShort  opcode_size[1]    = { 1 };\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\n#ifdef TT_CONFIG_OPTION_STATIC_RASTER\n    if ( !exc )\n      return FT_THROW( Invalid_Argument );\n\n    cur = *exc;\n#endif\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    CUR.iup_called = FALSE;\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n    /* set PPEM and CVT functions */\n    CUR.tt_metrics.ratio = 0;\n    if ( CUR.metrics.x_ppem != CUR.metrics.y_ppem )\n    {\n      /* non-square pixels, use the stretched routines */\n      CUR.func_cur_ppem  = Current_Ppem_Stretched;\n      CUR.func_read_cvt  = Read_CVT_Stretched;\n      CUR.func_write_cvt = Write_CVT_Stretched;\n      CUR.func_move_cvt  = Move_CVT_Stretched;\n    }\n    else\n    {\n      /* square pixels, use normal routines */\n      CUR.func_cur_ppem  = Current_Ppem;\n      CUR.func_read_cvt  = Read_CVT;\n      CUR.func_write_cvt = Write_CVT;\n      CUR.func_move_cvt  = Move_CVT;\n    }\n\n    COMPUTE_Funcs();\n    COMPUTE_Round( (FT_Byte)exc->GS.round_state );\n\n    do\n    {\n      CUR.opcode = CUR.code[CUR.IP];\n\n      FT_TRACE7(( \"  \" ));\n      FT_TRACE7(( opcode_name[CUR.opcode] ));\n      FT_TRACE7(( \"\\n\" ));\n\n      if ( ( CUR.length = opcode_length[CUR.opcode] ) < 0 )\n      {\n        if ( CUR.IP + 1 >= CUR.codeSize )\n          goto LErrorCodeOverflow_;\n\n        CUR.length = 2 - CUR.length * CUR.code[CUR.IP + 1];\n      }\n\n      if ( CUR.IP + CUR.length > CUR.codeSize )\n        goto LErrorCodeOverflow_;\n\n      /* First, let's check for empty stack and overflow */\n      CUR.args = CUR.top - ( Pop_Push_Count[CUR.opcode] >> 4 );\n\n      /* `args' is the top of the stack once arguments have been popped. */\n      /* One can also interpret it as the index of the last argument.    */\n      if ( CUR.args < 0 )\n      {\n        if ( CUR.pedantic_hinting )\n        {\n          CUR.error = FT_THROW( Too_Few_Arguments );\n          goto LErrorLabel_;\n        }\n\n        /* push zeroes onto the stack */\n        for ( i = 0; i < Pop_Push_Count[CUR.opcode] >> 4; i++ )\n          CUR.stack[i] = 0;\n        CUR.args = 0;\n      }\n\n      CUR.new_top = CUR.args + ( Pop_Push_Count[CUR.opcode] & 15 );\n\n      /* `new_top' is the new top of the stack, after the instruction's */\n      /* execution.  `top' will be set to `new_top' after the `switch'  */\n      /* statement.                                                     */\n      if ( CUR.new_top > CUR.stackSize )\n      {\n        CUR.error = FT_THROW( Stack_Overflow );\n        goto LErrorLabel_;\n      }\n\n      CUR.step_ins = TRUE;\n      CUR.error    = FT_Err_Ok;\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n      if ( SUBPIXEL_HINTING )\n      {\n        for ( i = 0; i < opcode_patterns; i++ )\n        {\n          if ( opcode_pointer[i] < opcode_size[i]                 &&\n               CUR.opcode == opcode_pattern[i][opcode_pointer[i]] )\n          {\n            opcode_pointer[i] += 1;\n\n            if ( opcode_pointer[i] == opcode_size[i] )\n            {\n              FT_TRACE7(( \"sph: opcode ptrn: %d, %s %s\\n\",\n                          i,\n                          CUR.face->root.family_name,\n                          CUR.face->root.style_name ));\n\n              switch ( i )\n              {\n              case 0:\n                break;\n              }\n              opcode_pointer[i] = 0;\n            }\n          }\n          else\n            opcode_pointer[i] = 0;\n        }\n      }\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n#ifdef TT_CONFIG_OPTION_INTERPRETER_SWITCH\n\n      {\n        FT_Long*  args   = CUR.stack + CUR.args;\n        FT_Byte   opcode = CUR.opcode;\n\n\n#undef  ARRAY_BOUND_ERROR\n#define ARRAY_BOUND_ERROR  goto Set_Invalid_Ref\n\n\n        switch ( opcode )\n        {\n        case 0x00:  /* SVTCA y  */\n        case 0x01:  /* SVTCA x  */\n        case 0x02:  /* SPvTCA y */\n        case 0x03:  /* SPvTCA x */\n        case 0x04:  /* SFvTCA y */\n        case 0x05:  /* SFvTCA x */\n          {\n            FT_Short  AA, BB;\n\n\n            AA = (FT_Short)( ( opcode & 1 ) << 14 );\n            BB = (FT_Short)( AA ^ 0x4000 );\n\n            if ( opcode < 4 )\n            {\n              CUR.GS.projVector.x = AA;\n              CUR.GS.projVector.y = BB;\n\n              CUR.GS.dualVector.x = AA;\n              CUR.GS.dualVector.y = BB;\n            }\n            else\n            {\n              GUESS_VECTOR( projVector );\n            }\n\n            if ( ( opcode & 2 ) == 0 )\n            {\n              CUR.GS.freeVector.x = AA;\n              CUR.GS.freeVector.y = BB;\n            }\n            else\n            {\n              GUESS_VECTOR( freeVector );\n            }\n\n            COMPUTE_Funcs();\n          }\n          break;\n\n        case 0x06:  /* SPvTL // */\n        case 0x07:  /* SPvTL +  */\n          DO_SPVTL\n          break;\n\n        case 0x08:  /* SFvTL // */\n        case 0x09:  /* SFvTL +  */\n          DO_SFVTL\n          break;\n\n        case 0x0A:  /* SPvFS */\n          DO_SPVFS\n          break;\n\n        case 0x0B:  /* SFvFS */\n          DO_SFVFS\n          break;\n\n        case 0x0C:  /* GPV */\n          DO_GPV\n          break;\n\n        case 0x0D:  /* GFV */\n          DO_GFV\n          break;\n\n        case 0x0E:  /* SFvTPv */\n          DO_SFVTPV\n          break;\n\n        case 0x0F:  /* ISECT  */\n          Ins_ISECT( EXEC_ARG_ args );\n          break;\n\n        case 0x10:  /* SRP0 */\n          DO_SRP0\n          break;\n\n        case 0x11:  /* SRP1 */\n          DO_SRP1\n          break;\n\n        case 0x12:  /* SRP2 */\n          DO_SRP2\n          break;\n\n        case 0x13:  /* SZP0 */\n          Ins_SZP0( EXEC_ARG_ args );\n          break;\n\n        case 0x14:  /* SZP1 */\n          Ins_SZP1( EXEC_ARG_ args );\n          break;\n\n        case 0x15:  /* SZP2 */\n          Ins_SZP2( EXEC_ARG_ args );\n          break;\n\n        case 0x16:  /* SZPS */\n          Ins_SZPS( EXEC_ARG_ args );\n          break;\n\n        case 0x17:  /* SLOOP */\n          DO_SLOOP\n          break;\n\n        case 0x18:  /* RTG */\n          DO_RTG\n          break;\n\n        case 0x19:  /* RTHG */\n          DO_RTHG\n          break;\n\n        case 0x1A:  /* SMD */\n          DO_SMD\n          break;\n\n        case 0x1B:  /* ELSE */\n          Ins_ELSE( EXEC_ARG_ args );\n          break;\n\n        case 0x1C:  /* JMPR */\n          DO_JMPR\n          break;\n\n        case 0x1D:  /* SCVTCI */\n          DO_SCVTCI\n          break;\n\n        case 0x1E:  /* SSWCI */\n          DO_SSWCI\n          break;\n\n        case 0x1F:  /* SSW */\n          DO_SSW\n          break;\n\n        case 0x20:  /* DUP */\n          DO_DUP\n          break;\n\n        case 0x21:  /* POP */\n          /* nothing :-) */\n          break;\n\n        case 0x22:  /* CLEAR */\n          DO_CLEAR\n          break;\n\n        case 0x23:  /* SWAP */\n          DO_SWAP\n          break;\n\n        case 0x24:  /* DEPTH */\n          DO_DEPTH\n          break;\n\n        case 0x25:  /* CINDEX */\n          DO_CINDEX\n          break;\n\n        case 0x26:  /* MINDEX */\n          Ins_MINDEX( EXEC_ARG_ args );\n          break;\n\n        case 0x27:  /* ALIGNPTS */\n          Ins_ALIGNPTS( EXEC_ARG_ args );\n          break;\n\n        case 0x28:  /* ???? */\n          Ins_UNKNOWN( EXEC_ARG_ args );\n          break;\n\n        case 0x29:  /* UTP */\n          Ins_UTP( EXEC_ARG_ args );\n          break;\n\n        case 0x2A:  /* LOOPCALL */\n          Ins_LOOPCALL( EXEC_ARG_ args );\n          break;\n\n        case 0x2B:  /* CALL */\n          Ins_CALL( EXEC_ARG_ args );\n          break;\n\n        case 0x2C:  /* FDEF */\n          Ins_FDEF( EXEC_ARG_ args );\n          break;\n\n        case 0x2D:  /* ENDF */\n          Ins_ENDF( EXEC_ARG_ args );\n          break;\n\n        case 0x2E:  /* MDAP */\n        case 0x2F:  /* MDAP */\n          Ins_MDAP( EXEC_ARG_ args );\n          break;\n\n        case 0x30:  /* IUP */\n        case 0x31:  /* IUP */\n          Ins_IUP( EXEC_ARG_ args );\n          break;\n\n        case 0x32:  /* SHP */\n        case 0x33:  /* SHP */\n          Ins_SHP( EXEC_ARG_ args );\n          break;\n\n        case 0x34:  /* SHC */\n        case 0x35:  /* SHC */\n          Ins_SHC( EXEC_ARG_ args );\n          break;\n\n        case 0x36:  /* SHZ */\n        case 0x37:  /* SHZ */\n          Ins_SHZ( EXEC_ARG_ args );\n          break;\n\n        case 0x38:  /* SHPIX */\n          Ins_SHPIX( EXEC_ARG_ args );\n          break;\n\n        case 0x39:  /* IP    */\n          Ins_IP( EXEC_ARG_ args );\n          break;\n\n        case 0x3A:  /* MSIRP */\n        case 0x3B:  /* MSIRP */\n          Ins_MSIRP( EXEC_ARG_ args );\n          break;\n\n        case 0x3C:  /* AlignRP */\n          Ins_ALIGNRP( EXEC_ARG_ args );\n          break;\n\n        case 0x3D:  /* RTDG */\n          DO_RTDG\n          break;\n\n        case 0x3E:  /* MIAP */\n        case 0x3F:  /* MIAP */\n          Ins_MIAP( EXEC_ARG_ args );\n          break;\n\n        case 0x40:  /* NPUSHB */\n          Ins_NPUSHB( EXEC_ARG_ args );\n          break;\n\n        case 0x41:  /* NPUSHW */\n          Ins_NPUSHW( EXEC_ARG_ args );\n          break;\n\n        case 0x42:  /* WS */\n          DO_WS\n          break;\n\n      Set_Invalid_Ref:\n            CUR.error = FT_THROW( Invalid_Reference );\n          break;\n\n        case 0x43:  /* RS */\n          DO_RS\n          break;\n\n        case 0x44:  /* WCVTP */\n          DO_WCVTP\n          break;\n\n        case 0x45:  /* RCVT */\n          DO_RCVT\n          break;\n\n        case 0x46:  /* GC */\n        case 0x47:  /* GC */\n          Ins_GC( EXEC_ARG_ args );\n          break;\n\n        case 0x48:  /* SCFS */\n          Ins_SCFS( EXEC_ARG_ args );\n          break;\n\n        case 0x49:  /* MD */\n        case 0x4A:  /* MD */\n          Ins_MD( EXEC_ARG_ args );\n          break;\n\n        case 0x4B:  /* MPPEM */\n          DO_MPPEM\n          break;\n\n        case 0x4C:  /* MPS */\n          DO_MPS\n          break;\n\n        case 0x4D:  /* FLIPON */\n          DO_FLIPON\n          break;\n\n        case 0x4E:  /* FLIPOFF */\n          DO_FLIPOFF\n          break;\n\n        case 0x4F:  /* DEBUG */\n          DO_DEBUG\n          break;\n\n        case 0x50:  /* LT */\n          DO_LT\n          break;\n\n        case 0x51:  /* LTEQ */\n          DO_LTEQ\n          break;\n\n        case 0x52:  /* GT */\n          DO_GT\n          break;\n\n        case 0x53:  /* GTEQ */\n          DO_GTEQ\n          break;\n\n        case 0x54:  /* EQ */\n          DO_EQ\n          break;\n\n        case 0x55:  /* NEQ */\n          DO_NEQ\n          break;\n\n        case 0x56:  /* ODD */\n          DO_ODD\n          break;\n\n        case 0x57:  /* EVEN */\n          DO_EVEN\n          break;\n\n        case 0x58:  /* IF */\n          Ins_IF( EXEC_ARG_ args );\n          break;\n\n        case 0x59:  /* EIF */\n          /* do nothing */\n          break;\n\n        case 0x5A:  /* AND */\n          DO_AND\n          break;\n\n        case 0x5B:  /* OR */\n          DO_OR\n          break;\n\n        case 0x5C:  /* NOT */\n          DO_NOT\n          break;\n\n        case 0x5D:  /* DELTAP1 */\n          Ins_DELTAP( EXEC_ARG_ args );\n          break;\n\n        case 0x5E:  /* SDB */\n          DO_SDB\n          break;\n\n        case 0x5F:  /* SDS */\n          DO_SDS\n          break;\n\n        case 0x60:  /* ADD */\n          DO_ADD\n          break;\n\n        case 0x61:  /* SUB */\n          DO_SUB\n          break;\n\n        case 0x62:  /* DIV */\n          DO_DIV\n          break;\n\n        case 0x63:  /* MUL */\n          DO_MUL\n          break;\n\n        case 0x64:  /* ABS */\n          DO_ABS\n          break;\n\n        case 0x65:  /* NEG */\n          DO_NEG\n          break;\n\n        case 0x66:  /* FLOOR */\n          DO_FLOOR\n          break;\n\n        case 0x67:  /* CEILING */\n          DO_CEILING\n          break;\n\n        case 0x68:  /* ROUND */\n        case 0x69:  /* ROUND */\n        case 0x6A:  /* ROUND */\n        case 0x6B:  /* ROUND */\n          DO_ROUND\n          break;\n\n        case 0x6C:  /* NROUND */\n        case 0x6D:  /* NROUND */\n        case 0x6E:  /* NRRUND */\n        case 0x6F:  /* NROUND */\n          DO_NROUND\n          break;\n\n        case 0x70:  /* WCVTF */\n          DO_WCVTF\n          break;\n\n        case 0x71:  /* DELTAP2 */\n        case 0x72:  /* DELTAP3 */\n          Ins_DELTAP( EXEC_ARG_ args );\n          break;\n\n        case 0x73:  /* DELTAC0 */\n        case 0x74:  /* DELTAC1 */\n        case 0x75:  /* DELTAC2 */\n          Ins_DELTAC( EXEC_ARG_ args );\n          break;\n\n        case 0x76:  /* SROUND */\n          DO_SROUND\n          break;\n\n        case 0x77:  /* S45Round */\n          DO_S45ROUND\n          break;\n\n        case 0x78:  /* JROT */\n          DO_JROT\n          break;\n\n        case 0x79:  /* JROF */\n          DO_JROF\n          break;\n\n        case 0x7A:  /* ROFF */\n          DO_ROFF\n          break;\n\n        case 0x7B:  /* ???? */\n          Ins_UNKNOWN( EXEC_ARG_ args );\n          break;\n\n        case 0x7C:  /* RUTG */\n          DO_RUTG\n          break;\n\n        case 0x7D:  /* RDTG */\n          DO_RDTG\n          break;\n\n        case 0x7E:  /* SANGW */\n        case 0x7F:  /* AA    */\n          /* nothing - obsolete */\n          break;\n\n        case 0x80:  /* FLIPPT */\n          Ins_FLIPPT( EXEC_ARG_ args );\n          break;\n\n        case 0x81:  /* FLIPRGON */\n          Ins_FLIPRGON( EXEC_ARG_ args );\n          break;\n\n        case 0x82:  /* FLIPRGOFF */\n          Ins_FLIPRGOFF( EXEC_ARG_ args );\n          break;\n\n        case 0x83:  /* UNKNOWN */\n        case 0x84:  /* UNKNOWN */\n          Ins_UNKNOWN( EXEC_ARG_ args );\n          break;\n\n        case 0x85:  /* SCANCTRL */\n          Ins_SCANCTRL( EXEC_ARG_ args );\n          break;\n\n        case 0x86:  /* SDPVTL */\n        case 0x87:  /* SDPVTL */\n          Ins_SDPVTL( EXEC_ARG_ args );\n          break;\n\n        case 0x88:  /* GETINFO */\n          Ins_GETINFO( EXEC_ARG_ args );\n          break;\n\n        case 0x89:  /* IDEF */\n          Ins_IDEF( EXEC_ARG_ args );\n          break;\n\n        case 0x8A:  /* ROLL */\n          Ins_ROLL( EXEC_ARG_ args );\n          break;\n\n        case 0x8B:  /* MAX */\n          DO_MAX\n          break;\n\n        case 0x8C:  /* MIN */\n          DO_MIN\n          break;\n\n        case 0x8D:  /* SCANTYPE */\n          Ins_SCANTYPE( EXEC_ARG_ args );\n          break;\n\n        case 0x8E:  /* INSTCTRL */\n          Ins_INSTCTRL( EXEC_ARG_ args );\n          break;\n\n        case 0x8F:\n          Ins_UNKNOWN( EXEC_ARG_ args );\n          break;\n\n        default:\n          if ( opcode >= 0xE0 )\n            Ins_MIRP( EXEC_ARG_ args );\n          else if ( opcode >= 0xC0 )\n            Ins_MDRP( EXEC_ARG_ args );\n          else if ( opcode >= 0xB8 )\n            Ins_PUSHW( EXEC_ARG_ args );\n          else if ( opcode >= 0xB0 )\n            Ins_PUSHB( EXEC_ARG_ args );\n          else\n            Ins_UNKNOWN( EXEC_ARG_ args );\n        }\n\n      }\n\n#else\n\n      Instruct_Dispatch[CUR.opcode]( EXEC_ARG_ &CUR.stack[CUR.args] );\n\n#endif /* TT_CONFIG_OPTION_INTERPRETER_SWITCH */\n\n      if ( CUR.error )\n      {\n        switch ( CUR.error )\n        {\n          /* looking for redefined instructions */\n        case FT_ERR( Invalid_Opcode ):\n          {\n            TT_DefRecord*  def   = CUR.IDefs;\n            TT_DefRecord*  limit = def + CUR.numIDefs;\n\n\n            for ( ; def < limit; def++ )\n            {\n              if ( def->active && CUR.opcode == (FT_Byte)def->opc )\n              {\n                TT_CallRec*  callrec;\n\n\n                if ( CUR.callTop >= CUR.callSize )\n                {\n                  CUR.error = FT_THROW( Invalid_Reference );\n                  goto LErrorLabel_;\n                }\n\n                callrec = &CUR.callStack[CUR.callTop];\n\n                callrec->Caller_Range = CUR.curRange;\n                callrec->Caller_IP    = CUR.IP + 1;\n                callrec->Cur_Count    = 1;\n                callrec->Def          = def;\n\n                if ( INS_Goto_CodeRange( def->range, def->start ) == FAILURE )\n                  goto LErrorLabel_;\n\n                goto LSuiteLabel_;\n              }\n            }\n          }\n\n          CUR.error = FT_THROW( Invalid_Opcode );\n          goto LErrorLabel_;\n\n#if 0\n          break;   /* Unreachable code warning suppression.             */\n                   /* Leave to remind in case a later change the editor */\n                   /* to consider break;                                */\n#endif\n\n        default:\n          goto LErrorLabel_;\n\n#if 0\n        break;\n#endif\n        }\n      }\n\n      CUR.top = CUR.new_top;\n\n      if ( CUR.step_ins )\n        CUR.IP += CUR.length;\n\n      /* increment instruction counter and check if we didn't */\n      /* run this program for too long (e.g. infinite loops). */\n      if ( ++ins_counter > MAX_RUNNABLE_OPCODES )\n        return FT_THROW( Execution_Too_Long );\n\n    LSuiteLabel_:\n      if ( CUR.IP >= CUR.codeSize )\n      {\n        if ( CUR.callTop > 0 )\n        {\n          CUR.error = FT_THROW( Code_Overflow );\n          goto LErrorLabel_;\n        }\n        else\n          goto LNo_Error_;\n      }\n    } while ( !CUR.instruction_trap );\n\n  LNo_Error_:\n\n#ifdef TT_CONFIG_OPTION_STATIC_RASTER\n    *exc = cur;\n#endif\n\n    return FT_Err_Ok;\n\n  LErrorCodeOverflow_:\n    CUR.error = FT_THROW( Code_Overflow );\n\n  LErrorLabel_:\n\n#ifdef TT_CONFIG_OPTION_STATIC_RASTER\n    *exc = cur;\n#endif\n\n    /* If any errors have occurred, function tables may be broken. */\n    /* Force a re-execution of `prep' and `fpgm' tables if no      */\n    /* bytecode debugger is run.                                   */\n    if ( CUR.error                          &&\n         !CUR.instruction_trap              &&\n         CUR.curRange == tt_coderange_glyph )\n    {\n      FT_TRACE1(( \"  The interpreter returned error 0x%x\\n\", CUR.error ));\n      exc->size->bytecode_ready = -1;\n      exc->size->cvt_ready      = -1;\n    }\n\n    return CUR.error;\n  }\n\n\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttinterp.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttinterp.h                                                             */\n/*                                                                         */\n/*    TrueType bytecode interpreter (specification).                       */\n/*                                                                         */\n/*  Copyright 1996-2007, 2010, 2012-2014 by                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTINTERP_H__\n#define __TTINTERP_H__\n\n#include <ft2build.h>\n#include \"ttobjs.h\"\n\n\nFT_BEGIN_HEADER\n\n\n#ifndef TT_CONFIG_OPTION_STATIC_INTERPRETER /* indirect implementation */\n\n#define EXEC_OP_   TT_ExecContext  exc,\n#define EXEC_OP    TT_ExecContext  exc\n#define EXEC_ARG_  exc,\n#define EXEC_ARG   exc\n\n#else                                       /* static implementation */\n\n#define EXEC_OP_   /* void */\n#define EXEC_OP    /* void */\n#define EXEC_ARG_  /* void */\n#define EXEC_ARG   /* void */\n\n#endif /* TT_CONFIG_OPTION_STATIC_INTERPRETER */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Rounding mode constants.                                              */\n  /*                                                                       */\n#define TT_Round_Off             5\n#define TT_Round_To_Half_Grid    0\n#define TT_Round_To_Grid         1\n#define TT_Round_To_Double_Grid  2\n#define TT_Round_Up_To_Grid      4\n#define TT_Round_Down_To_Grid    3\n#define TT_Round_Super           6\n#define TT_Round_Super_45        7\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Function types used by the interpreter, depending on various modes    */\n  /* (e.g. the rounding mode, whether to render a vertical or horizontal   */\n  /* line etc).                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /* Rounding function */\n  typedef FT_F26Dot6\n  (*TT_Round_Func)( EXEC_OP_ FT_F26Dot6  distance,\n                             FT_F26Dot6  compensation );\n\n  /* Point displacement along the freedom vector routine */\n  typedef void\n  (*TT_Move_Func)( EXEC_OP_ TT_GlyphZone  zone,\n                            FT_UShort     point,\n                            FT_F26Dot6    distance );\n\n  /* Distance projection along one of the projection vectors */\n  typedef FT_F26Dot6\n  (*TT_Project_Func)( EXEC_OP_ FT_Pos   dx,\n                               FT_Pos   dy );\n\n  /* getting current ppem.  Take care of non-square pixels if necessary */\n  typedef FT_Long\n  (*TT_Cur_Ppem_Func)( EXEC_OP );\n\n  /* reading a cvt value.  Take care of non-square pixels if necessary */\n  typedef FT_F26Dot6\n  (*TT_Get_CVT_Func)( EXEC_OP_ FT_ULong  idx );\n\n  /* setting or moving a cvt value.  Take care of non-square pixels  */\n  /* if necessary                                                    */\n  typedef void\n  (*TT_Set_CVT_Func)( EXEC_OP_ FT_ULong    idx,\n                               FT_F26Dot6  value );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This structure defines a call record, used to manage function calls.  */\n  /*                                                                       */\n  typedef struct  TT_CallRec_\n  {\n    FT_Int   Caller_Range;\n    FT_Long  Caller_IP;\n    FT_Long  Cur_Count;\n\n    TT_DefRecord  *Def; /* either FDEF or IDEF */\n\n  } TT_CallRec, *TT_CallStack;\n\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* These structures define rules used to tweak subpixel hinting for      */\n  /* various fonts.  \"\", 0, \"\", NULL value indicates to match any value.   */\n  /*                                                                       */\n\n#define SPH_MAX_NAME_SIZE      32\n#define SPH_MAX_CLASS_MEMBERS  100\n\n  typedef struct  SPH_TweakRule_\n  {\n    const char      family[SPH_MAX_NAME_SIZE];\n    const FT_UInt   ppem;\n    const char      style[SPH_MAX_NAME_SIZE];\n    const FT_ULong  glyph;\n\n  } SPH_TweakRule;\n\n\n  typedef struct  SPH_ScaleRule_\n  {\n    const char      family[SPH_MAX_NAME_SIZE];\n    const FT_UInt   ppem;\n    const char      style[SPH_MAX_NAME_SIZE];\n    const FT_ULong  glyph;\n    const FT_ULong  scale;\n\n  } SPH_ScaleRule;\n\n\n  typedef struct  SPH_Font_Class_\n  {\n    const char  name[SPH_MAX_NAME_SIZE];\n    const char  member[SPH_MAX_CLASS_MEMBERS][SPH_MAX_NAME_SIZE];\n\n  } SPH_Font_Class;\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The main structure for the interpreter which collects all necessary   */\n  /* variables and states.                                                 */\n  /*                                                                       */\n  typedef struct  TT_ExecContextRec_\n  {\n    TT_Face            face;\n    TT_Size            size;\n    FT_Memory          memory;\n\n    /* instructions state */\n\n    FT_Error           error;      /* last execution error */\n\n    FT_Long            top;        /* top of exec. stack   */\n\n    FT_UInt            stackSize;  /* size of exec. stack  */\n    FT_Long*           stack;      /* current exec. stack  */\n\n    FT_Long            args;\n    FT_UInt            new_top;    /* new top after exec.  */\n\n    TT_GlyphZoneRec    zp0,        /* zone records */\n                       zp1,\n                       zp2,\n                       pts,\n                       twilight;\n\n    FT_Size_Metrics    metrics;\n    TT_Size_Metrics    tt_metrics; /* size metrics */\n\n    TT_GraphicsState   GS;         /* current graphics state */\n\n    FT_Int             curRange;  /* current code range number   */\n    FT_Byte*           code;      /* current code range          */\n    FT_Long            IP;        /* current instruction pointer */\n    FT_Long            codeSize;  /* size of current range       */\n\n    FT_Byte            opcode;    /* current opcode              */\n    FT_Int             length;    /* length of current opcode    */\n\n    FT_Bool            step_ins;  /* true if the interpreter must */\n                                  /* increment IP after ins. exec */\n    FT_ULong           cvtSize;\n    FT_Long*           cvt;\n\n    FT_UInt            glyphSize; /* glyph instructions buffer size */\n    FT_Byte*           glyphIns;  /* glyph instructions buffer */\n\n    FT_UInt            numFDefs;  /* number of function defs         */\n    FT_UInt            maxFDefs;  /* maximum number of function defs */\n    TT_DefArray        FDefs;     /* table of FDefs entries          */\n\n    FT_UInt            numIDefs;  /* number of instruction defs */\n    FT_UInt            maxIDefs;  /* maximum number of ins defs */\n    TT_DefArray        IDefs;     /* table of IDefs entries     */\n\n    FT_UInt            maxFunc;   /* maximum function index     */\n    FT_UInt            maxIns;    /* maximum instruction index  */\n\n    FT_Int             callTop,    /* top of call stack during execution */\n                       callSize;   /* size of call stack */\n    TT_CallStack       callStack;  /* call stack */\n\n    FT_UShort          maxPoints;    /* capacity of this context's `pts' */\n    FT_Short           maxContours;  /* record, expressed in points and  */\n                                     /* contours.                        */\n\n    TT_CodeRangeTable  codeRangeTable;  /* table of valid code ranges */\n                                        /* useful for the debugger   */\n\n    FT_UShort          storeSize;  /* size of current storage */\n    FT_Long*           storage;    /* storage area            */\n\n    FT_F26Dot6         period;     /* values used for the */\n    FT_F26Dot6         phase;      /* `SuperRounding'     */\n    FT_F26Dot6         threshold;\n\n    FT_Bool            instruction_trap; /* If `True', the interpreter will */\n                                         /* exit after each instruction     */\n\n    TT_GraphicsState   default_GS;       /* graphics state resulting from   */\n                                         /* the prep program                */\n    FT_Bool            is_composite;     /* true if the glyph is composite  */\n    FT_Bool            pedantic_hinting; /* true if pedantic interpretation */\n\n    /* latest interpreter additions */\n\n    FT_Long            F_dot_P;    /* dot product of freedom and projection */\n                                   /* vectors                               */\n    TT_Round_Func      func_round; /* current rounding function             */\n\n    TT_Project_Func    func_project,   /* current projection function */\n                       func_dualproj,  /* current dual proj. function */\n                       func_freeProj;  /* current freedom proj. func  */\n\n    TT_Move_Func       func_move;      /* current point move function */\n    TT_Move_Func       func_move_orig; /* move original position function */\n\n    TT_Cur_Ppem_Func   func_cur_ppem;  /* get current proj. ppem value  */\n\n    TT_Get_CVT_Func    func_read_cvt;  /* read a cvt entry              */\n    TT_Set_CVT_Func    func_write_cvt; /* write a cvt entry (in pixels) */\n    TT_Set_CVT_Func    func_move_cvt;  /* incr a cvt entry (in pixels)  */\n\n    FT_Bool            grayscale;      /* are we hinting for grayscale? */\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    TT_Round_Func      func_round_sphn;   /* subpixel rounding function */\n\n    FT_Bool            subpixel;          /* Using subpixel hinting?       */\n    FT_Bool            ignore_x_mode;     /* Standard rendering mode for   */\n                                          /* subpixel hinting.  On if gray */\n                                          /* or subpixel hinting is on.    */\n\n    /* The following 4 aren't fully implemented but here for MS rasterizer */\n    /* compatibility.                                                      */\n    FT_Bool            compatible_widths;     /* compatible widths?        */\n    FT_Bool            symmetrical_smoothing; /* symmetrical_smoothing?    */\n    FT_Bool            bgr;                   /* bgr instead of rgb?       */\n    FT_Bool            subpixel_positioned;   /* subpixel positioned       */\n                                              /* (DirectWrite ClearType)?  */\n\n    FT_Int             rasterizer_version;    /* MS rasterizer version     */\n\n    FT_Bool            iup_called;            /* IUP called for glyph?     */\n\n    FT_ULong           sph_tweak_flags;       /* flags to control          */\n                                              /* hint tweaks               */\n\n    FT_ULong           sph_in_func_flags;     /* flags to indicate if in   */\n                                              /* special functions         */\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n  } TT_ExecContextRec;\n\n\n  extern const TT_GraphicsState  tt_default_graphics_state;\n\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n  FT_LOCAL( void )\n  TT_Goto_CodeRange( TT_ExecContext  exec,\n                     FT_Int          range,\n                     FT_Long         IP );\n\n  FT_LOCAL( void )\n  TT_Set_CodeRange( TT_ExecContext  exec,\n                    FT_Int          range,\n                    void*           base,\n                    FT_Long         length );\n\n  FT_LOCAL( void )\n  TT_Clear_CodeRange( TT_ExecContext  exec,\n                      FT_Int          range );\n\n\n  FT_LOCAL( FT_Error )\n  Update_Max( FT_Memory  memory,\n              FT_ULong*  size,\n              FT_Long    multiplier,\n              void*      _pbuff,\n              FT_ULong   new_max );\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_New_Context                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Queries the face context for a given font.  Note that there is     */\n  /*    now a _single_ execution context in the TrueType driver which is   */\n  /*    shared among faces.                                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source face object.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A handle to the execution context.  Initialized for `face'.        */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only the glyph loader and debugger should call this function.      */\n  /*                                                                       */\n  FT_EXPORT( TT_ExecContext )\n  TT_New_Context( TT_Driver  driver );\n\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n  FT_LOCAL( void )\n  TT_Done_Context( TT_ExecContext  exec );\n\n  FT_LOCAL( FT_Error )\n  TT_Load_Context( TT_ExecContext  exec,\n                   TT_Face         face,\n                   TT_Size         size );\n\n  FT_LOCAL( void )\n  TT_Save_Context( TT_ExecContext  exec,\n                   TT_Size         ins );\n\n  FT_LOCAL( FT_Error )\n  TT_Run_Context( TT_ExecContext  exec,\n                  FT_Bool         debug );\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    TT_RunIns                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Executes one or more instruction in the execution context.  This   */\n  /*    is the main function of the TrueType opcode interpreter.           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    exec :: A handle to the target execution context.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only the object manager and debugger should call this function.    */\n  /*                                                                       */\n  /*    This function is publicly exported because it is directly          */\n  /*    invoked by the TrueType debugger.                                  */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  TT_RunIns( TT_ExecContext  exec );\n\n\nFT_END_HEADER\n\n#endif /* __TTINTERP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttobjs.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttobjs.c                                                               */\n/*                                                                         */\n/*    Objects manager (body).                                              */\n/*                                                                         */\n/*  Copyright 1996-2013                                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_INTERNAL_SFNT_H\n#include FT_TRUETYPE_DRIVER_H\n\n#include \"ttgload.h\"\n#include \"ttpload.h\"\n\n#include \"tterrors.h\"\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n#include \"ttinterp.h\"\n#endif\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n#include FT_TRUETYPE_UNPATENTED_H\n#endif\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n#include \"ttgxvar.h\"\n#endif\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttobjs\n\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                       GLYPH ZONE FUNCTIONS                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_glyphzone_done                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Deallocate a glyph zone.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    zone :: A pointer to the target glyph zone.                        */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  tt_glyphzone_done( TT_GlyphZone  zone )\n  {\n    FT_Memory  memory = zone->memory;\n\n\n    if ( memory )\n    {\n      FT_FREE( zone->contours );\n      FT_FREE( zone->tags );\n      FT_FREE( zone->cur );\n      FT_FREE( zone->org );\n      FT_FREE( zone->orus );\n\n      zone->max_points   = zone->n_points   = 0;\n      zone->max_contours = zone->n_contours = 0;\n      zone->memory       = NULL;\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_glyphzone_new                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Allocate a new glyph zone.                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory      :: A handle to the current memory object.              */\n  /*                                                                       */\n  /*    maxPoints   :: The capacity of glyph zone in points.               */\n  /*                                                                       */\n  /*    maxContours :: The capacity of glyph zone in contours.             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    zone        :: A pointer to the target glyph zone record.          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_glyphzone_new( FT_Memory     memory,\n                    FT_UShort     maxPoints,\n                    FT_Short      maxContours,\n                    TT_GlyphZone  zone )\n  {\n    FT_Error  error;\n\n\n    FT_MEM_ZERO( zone, sizeof ( *zone ) );\n    zone->memory = memory;\n\n    if ( FT_NEW_ARRAY( zone->org,      maxPoints   ) ||\n         FT_NEW_ARRAY( zone->cur,      maxPoints   ) ||\n         FT_NEW_ARRAY( zone->orus,     maxPoints   ) ||\n         FT_NEW_ARRAY( zone->tags,     maxPoints   ) ||\n         FT_NEW_ARRAY( zone->contours, maxContours ) )\n    {\n      tt_glyphzone_done( zone );\n    }\n    else\n    {\n      zone->max_points   = maxPoints;\n      zone->max_contours = maxContours;\n    }\n\n    return error;\n  }\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n\n  /* Compare the face with a list of well-known `tricky' fonts. */\n  /* This list shall be expanded as we find more of them.       */\n\n  static FT_Bool\n  tt_check_trickyness_family( FT_String*  name )\n  {\n\n#define TRICK_NAMES_MAX_CHARACTERS  19\n#define TRICK_NAMES_COUNT            9\n\n    static const char trick_names[TRICK_NAMES_COUNT]\n                                 [TRICK_NAMES_MAX_CHARACTERS + 1] =\n    {\n      \"DFKaiSho-SB\",        /* dfkaisb.ttf */\n      \"DFKaiShu\",\n      \"DFKai-SB\",           /* kaiu.ttf */\n      \"HuaTianKaiTi?\",      /* htkt2.ttf */\n      \"HuaTianSongTi?\",     /* htst3.ttf */\n      \"Ming(for ISO10646)\", /* hkscsiic.ttf & iicore.ttf */\n      \"MingLiU\",            /* mingliu.ttf & mingliu.ttc */\n      \"PMingLiU\",           /* mingliu.ttc */\n      \"MingLi43\",           /* mingli.ttf */\n    };\n\n    int  nn;\n\n\n    for ( nn = 0; nn < TRICK_NAMES_COUNT; nn++ )\n      if ( ft_strstr( name, trick_names[nn] ) )\n        return TRUE;\n\n    return FALSE;\n  }\n\n\n  /* XXX: This function should be in the `sfnt' module. */\n\n  /* Some PDF generators clear the checksums in the TrueType header table. */\n  /* For example, Quartz ContextPDF clears all entries, or Bullzip PDF     */\n  /* Printer clears the entries for subsetted subtables.  We thus have to  */\n  /* recalculate the checksums  where necessary.                           */\n\n  static FT_UInt32\n  tt_synth_sfnt_checksum( FT_Stream  stream,\n                          FT_ULong   length )\n  {\n    FT_Error   error;\n    FT_UInt32  checksum = 0;\n    int        i;\n\n\n    if ( FT_FRAME_ENTER( length ) )\n      return 0;\n\n    for ( ; length > 3; length -= 4 )\n      checksum += (FT_UInt32)FT_GET_ULONG();\n\n    for ( i = 3; length > 0; length --, i-- )\n      checksum += (FT_UInt32)( FT_GET_BYTE() << ( i * 8 ) );\n\n    FT_FRAME_EXIT();\n\n    return checksum;\n  }\n\n\n  /* XXX: This function should be in the `sfnt' module. */\n\n  static FT_ULong\n  tt_get_sfnt_checksum( TT_Face    face,\n                        FT_UShort  i )\n  {\n#if 0 /* if we believe the written value, use following part. */\n    if ( face->dir_tables[i].CheckSum )\n      return face->dir_tables[i].CheckSum;\n#endif\n\n    if ( !face->goto_table )\n      return 0;\n\n    if ( face->goto_table( face,\n                           face->dir_tables[i].Tag,\n                           face->root.stream,\n                           NULL ) )\n      return 0;\n\n    return (FT_ULong)tt_synth_sfnt_checksum( face->root.stream,\n                                             face->dir_tables[i].Length );\n  }\n\n\n  typedef struct tt_sfnt_id_rec_\n  {\n    FT_ULong  CheckSum;\n    FT_ULong  Length;\n\n  } tt_sfnt_id_rec;\n\n\n  static FT_Bool\n  tt_check_trickyness_sfnt_ids( TT_Face  face )\n  {\n#define TRICK_SFNT_IDS_PER_FACE   3\n#define TRICK_SFNT_IDS_NUM_FACES  17\n\n    static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES]\n                                       [TRICK_SFNT_IDS_PER_FACE] = {\n\n#define TRICK_SFNT_ID_cvt   0\n#define TRICK_SFNT_ID_fpgm  1\n#define TRICK_SFNT_ID_prep  2\n\n      { /* MingLiU 1995 */\n        { 0x05BCF058UL, 0x000002E4UL }, /* cvt  */\n        { 0x28233BF1UL, 0x000087C4UL }, /* fpgm */\n        { 0xA344A1EAUL, 0x000001E1UL }  /* prep */\n      },\n      { /* MingLiU 1996- */\n        { 0x05BCF058UL, 0x000002E4UL }, /* cvt  */\n        { 0x28233BF1UL, 0x000087C4UL }, /* fpgm */\n        { 0xA344A1EBUL, 0x000001E1UL }  /* prep */\n      },\n      { /* DFKaiShu */\n        { 0x11E5EAD4UL, 0x00000350UL }, /* cvt  */\n        { 0x5A30CA3BUL, 0x00009063UL }, /* fpgm */\n        { 0x13A42602UL, 0x0000007EUL }  /* prep */\n      },\n      { /* HuaTianKaiTi */\n        { 0xFFFBFFFCUL, 0x00000008UL }, /* cvt  */\n        { 0x9C9E48B8UL, 0x0000BEA2UL }, /* fpgm */\n        { 0x70020112UL, 0x00000008UL }  /* prep */\n      },\n      { /* HuaTianSongTi */\n        { 0xFFFBFFFCUL, 0x00000008UL }, /* cvt  */\n        { 0x0A5A0483UL, 0x00017C39UL }, /* fpgm */\n        { 0x70020112UL, 0x00000008UL }  /* prep */\n      },\n      { /* NEC fadpop7.ttf */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x40C92555UL, 0x000000E5UL }, /* fpgm */\n        { 0xA39B58E3UL, 0x0000117CUL }  /* prep */\n      },\n      { /* NEC fadrei5.ttf */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x33C41652UL, 0x000000E5UL }, /* fpgm */\n        { 0x26D6C52AUL, 0x00000F6AUL }  /* prep */\n      },\n      { /* NEC fangot7.ttf */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x6DB1651DUL, 0x0000019DUL }, /* fpgm */\n        { 0x6C6E4B03UL, 0x00002492UL }  /* prep */\n      },\n      { /* NEC fangyo5.ttf */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x40C92555UL, 0x000000E5UL }, /* fpgm */\n        { 0xDE51FAD0UL, 0x0000117CUL }  /* prep */\n      },\n      { /* NEC fankyo5.ttf */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x85E47664UL, 0x000000E5UL }, /* fpgm */\n        { 0xA6C62831UL, 0x00001CAAUL }  /* prep */\n      },\n      { /* NEC fanrgo5.ttf */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x2D891CFDUL, 0x0000019DUL }, /* fpgm */\n        { 0xA0604633UL, 0x00001DE8UL }  /* prep */\n      },\n      { /* NEC fangot5.ttc */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x40AA774CUL, 0x000001CBUL }, /* fpgm */\n        { 0x9B5CAA96UL, 0x00001F9AUL }  /* prep */\n      },\n      { /* NEC fanmin3.ttc */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x0D3DE9CBUL, 0x00000141UL }, /* fpgm */\n        { 0xD4127766UL, 0x00002280UL }  /* prep */\n      },\n      { /* NEC FA-Gothic, 1996 */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x4A692698UL, 0x000001F0UL }, /* fpgm */\n        { 0x340D4346UL, 0x00001FCAUL }  /* prep */\n      },\n      { /* NEC FA-Minchou, 1996 */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0xCD34C604UL, 0x00000166UL }, /* fpgm */\n        { 0x6CF31046UL, 0x000022B0UL }  /* prep */\n      },\n      { /* NEC FA-RoundGothicB, 1996 */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0x5DA75315UL, 0x0000019DUL }, /* fpgm */\n        { 0x40745A5FUL, 0x000022E0UL }  /* prep */\n      },\n      { /* NEC FA-RoundGothicM, 1996 */\n        { 0x00000000UL, 0x00000000UL }, /* cvt  */\n        { 0xF055FC48UL, 0x000001C2UL }, /* fpgm */\n        { 0x3900DED3UL, 0x00001E18UL }  /* prep */\n      }\n    };\n\n    FT_ULong   checksum;\n    int        num_matched_ids[TRICK_SFNT_IDS_NUM_FACES];\n    FT_Bool    has_cvt, has_fpgm, has_prep;\n    FT_UShort  i;\n    int        j, k;\n\n\n    FT_MEM_SET( num_matched_ids, 0,\n                sizeof ( int ) * TRICK_SFNT_IDS_NUM_FACES );\n    has_cvt  = FALSE;\n    has_fpgm = FALSE;\n    has_prep = FALSE;\n\n    for ( i = 0; i < face->num_tables; i++ )\n    {\n      checksum = 0;\n\n      switch( face->dir_tables[i].Tag )\n      {\n      case TTAG_cvt:\n        k = TRICK_SFNT_ID_cvt;\n        has_cvt  = TRUE;\n        break;\n\n      case TTAG_fpgm:\n        k = TRICK_SFNT_ID_fpgm;\n        has_fpgm = TRUE;\n        break;\n\n      case TTAG_prep:\n        k = TRICK_SFNT_ID_prep;\n        has_prep = TRUE;\n        break;\n\n      default:\n        continue;\n      }\n\n      for ( j = 0; j < TRICK_SFNT_IDS_NUM_FACES; j++ )\n        if ( face->dir_tables[i].Length == sfnt_id[j][k].Length )\n        {\n          if ( !checksum )\n            checksum = tt_get_sfnt_checksum( face, i );\n\n          if ( sfnt_id[j][k].CheckSum == checksum )\n            num_matched_ids[j]++;\n\n          if ( num_matched_ids[j] == TRICK_SFNT_IDS_PER_FACE )\n            return TRUE;\n        }\n    }\n\n    for ( j = 0; j < TRICK_SFNT_IDS_NUM_FACES; j++ )\n    {\n      if ( !has_cvt  && !sfnt_id[j][TRICK_SFNT_ID_cvt].Length )\n        num_matched_ids[j] ++;\n      if ( !has_fpgm && !sfnt_id[j][TRICK_SFNT_ID_fpgm].Length )\n        num_matched_ids[j] ++;\n      if ( !has_prep && !sfnt_id[j][TRICK_SFNT_ID_prep].Length )\n        num_matched_ids[j] ++;\n      if ( num_matched_ids[j] == TRICK_SFNT_IDS_PER_FACE )\n        return TRUE;\n    }\n\n    return FALSE;\n  }\n\n\n  static FT_Bool\n  tt_check_trickyness( FT_Face  face )\n  {\n    if ( !face )\n      return FALSE;\n\n    /* For first, check the face name for quick check. */\n    if ( face->family_name                               &&\n         tt_check_trickyness_family( face->family_name ) )\n      return TRUE;\n\n    /* Type42 fonts may lack `name' tables, we thus try to identify */\n    /* tricky fonts by checking the checksums of Type42-persistent  */\n    /* sfnt tables (`cvt', `fpgm', and `prep').                     */\n    if ( tt_check_trickyness_sfnt_ids( (TT_Face)face ) )\n      return TRUE;\n\n    return FALSE;\n  }\n\n\n  /* Check whether `.notdef' is the only glyph in the `loca' table. */\n  static FT_Bool\n  tt_check_single_notdef( FT_Face  ttface )\n  {\n    FT_Bool   result = FALSE;\n\n    TT_Face   face = (TT_Face)ttface;\n    FT_UInt   asize;\n    FT_ULong  i;\n    FT_ULong  glyph_index = 0;\n    FT_UInt   count       = 0;\n\n\n    for( i = 0; i < face->num_locations; i++ )\n    {\n      tt_face_get_location( face, i, &asize );\n      if ( asize > 0 )\n      {\n        count += 1;\n        if ( count > 1 )\n          break;\n        glyph_index = i;\n      }\n    }\n\n    /* Only have a single outline. */\n    if ( count == 1 )\n    {\n      if ( glyph_index == 0 )\n        result = TRUE;\n      else\n      {\n        /* FIXME: Need to test glyphname == .notdef ? */\n        FT_Error error;\n        char buf[8];\n\n\n        error = FT_Get_Glyph_Name( ttface, glyph_index, buf, 8 );\n        if ( !error                                            &&\n             buf[0] == '.' && !ft_strncmp( buf, \".notdef\", 8 ) )\n          result = TRUE;\n      }\n    }\n\n    return result;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_init                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initialize a given TrueType face object.                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream     :: The source font stream.                              */\n  /*                                                                       */\n  /*    face_index :: The index of the font face in the resource.          */\n  /*                                                                       */\n  /*    num_params :: Number of additional generic parameters.  Ignored.   */\n  /*                                                                       */\n  /*    params     :: Additional generic parameters.  Ignored.             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: The newly built face object.                         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_init( FT_Stream      stream,\n                FT_Face        ttface,      /* TT_Face */\n                FT_Int         face_index,\n                FT_Int         num_params,\n                FT_Parameter*  params )\n  {\n    FT_Error      error;\n    FT_Library    library;\n    SFNT_Service  sfnt;\n    TT_Face       face = (TT_Face)ttface;\n\n\n    FT_TRACE2(( \"TTF driver\\n\" ));\n\n    library = ttface->driver->root.library;\n\n    sfnt = (SFNT_Service)FT_Get_Module_Interface( library, \"sfnt\" );\n    if ( !sfnt )\n    {\n      FT_ERROR(( \"tt_face_init: cannot access `sfnt' module\\n\" ));\n      error = FT_THROW( Missing_Module );\n      goto Exit;\n    }\n\n    /* create input stream from resource */\n    if ( FT_STREAM_SEEK( 0 ) )\n      goto Exit;\n\n    /* check that we have a valid TrueType file */\n    error = sfnt->init_face( stream, face, face_index, num_params, params );\n\n    /* Stream may have changed. */\n    stream = face->root.stream;\n\n    if ( error )\n      goto Exit;\n\n    /* We must also be able to accept Mac/GX fonts, as well as OT ones. */\n    /* The 0x00020000 tag is completely undocumented; some fonts from   */\n    /* Arphic made for Chinese Windows 3.1 have this.                   */\n    if ( face->format_tag != 0x00010000L &&    /* MS fonts  */\n         face->format_tag != 0x00020000L &&    /* CJK fonts for Win 3.1 */\n         face->format_tag != TTAG_true   )     /* Mac fonts */\n    {\n      FT_TRACE2(( \"  not a TTF font\\n\" ));\n      goto Bad_Format;\n    }\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n    ttface->face_flags |= FT_FACE_FLAG_HINTER;\n#endif\n\n    /* If we are performing a simple font format check, exit immediately. */\n    if ( face_index < 0 )\n      return FT_Err_Ok;\n\n    /* Load font directory */\n    error = sfnt->load_face( stream, face, face_index, num_params, params );\n    if ( error )\n      goto Exit;\n\n    if ( tt_check_trickyness( ttface ) )\n      ttface->face_flags |= FT_FACE_FLAG_TRICKY;\n\n    error = tt_face_load_hdmx( face, stream );\n    if ( error )\n      goto Exit;\n\n    if ( FT_IS_SCALABLE( ttface ) )\n    {\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n      if ( !ttface->internal->incremental_interface )\n        error = tt_face_load_loca( face, stream );\n      if ( !error )\n        error = tt_face_load_cvt( face, stream );\n      if ( !error )\n        error = tt_face_load_fpgm( face, stream );\n      if ( !error )\n        error = tt_face_load_prep( face, stream );\n\n      /* Check the scalable flag based on `loca'. */\n      if ( !ttface->internal->incremental_interface &&\n           ttface->num_fixed_sizes                  &&\n           face->glyph_locations                    &&\n           tt_check_single_notdef( ttface )         )\n      {\n        FT_TRACE5(( \"tt_face_init:\"\n                    \" Only the `.notdef' glyph has an outline.\\n\"\n                    \"             \"\n                    \" Resetting scalable flag to FALSE.\\n\" ));\n\n        ttface->face_flags &= ~FT_FACE_FLAG_SCALABLE;\n      }\n\n#else\n\n      if ( !error )\n        error = tt_face_load_loca( face, stream );\n      if ( !error )\n        error = tt_face_load_cvt( face, stream );\n      if ( !error )\n        error = tt_face_load_fpgm( face, stream );\n      if ( !error )\n        error = tt_face_load_prep( face, stream );\n\n      /* Check the scalable flag based on `loca'. */\n      if ( ttface->num_fixed_sizes          &&\n           face->glyph_locations            &&\n           tt_check_single_notdef( ttface ) )\n      {\n        FT_TRACE5(( \"tt_face_init:\"\n                    \" Only the `.notdef' glyph has an outline.\\n\"\n                    \"             \"\n                    \" Resetting scalable flag to FALSE.\\n\" ));\n\n        ttface->face_flags &= ~FT_FACE_FLAG_SCALABLE;\n      }\n\n#endif\n\n    }\n\n#if defined( TT_CONFIG_OPTION_UNPATENTED_HINTING    ) && \\\n    !defined( TT_CONFIG_OPTION_BYTECODE_INTERPRETER )\n\n    {\n      FT_Bool  unpatented_hinting;\n      int      i;\n\n\n      /* Determine whether unpatented hinting is to be used for this face. */\n      unpatented_hinting = FT_BOOL\n        ( library->debug_hooks[FT_DEBUG_HOOK_UNPATENTED_HINTING] != NULL );\n\n      for ( i = 0; i < num_params && !face->unpatented_hinting; i++ )\n        if ( params[i].tag == FT_PARAM_TAG_UNPATENTED_HINTING )\n          unpatented_hinting = TRUE;\n\n      if ( !unpatented_hinting )\n        ttface->internal->ignore_unpatented_hinter = TRUE;\n    }\n\n#endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING &&\n          !TT_CONFIG_OPTION_BYTECODE_INTERPRETER */\n\n    /* initialize standard glyph loading routines */\n    TT_Init_Glyph_Loading( face );\n\n  Exit:\n    return error;\n\n  Bad_Format:\n    error = FT_THROW( Unknown_File_Format );\n    goto Exit;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_done                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finalize a given face object.                                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A pointer to the face object to destroy.                   */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  tt_face_done( FT_Face  ttface )           /* TT_Face */\n  {\n    TT_Face       face = (TT_Face)ttface;\n    FT_Memory     memory;\n    FT_Stream     stream;\n    SFNT_Service  sfnt;\n\n\n    if ( !face )\n      return;\n\n    memory = ttface->memory;\n    stream = ttface->stream;\n    sfnt   = (SFNT_Service)face->sfnt;\n\n    /* for `extended TrueType formats' (i.e. compressed versions) */\n    if ( face->extra.finalizer )\n      face->extra.finalizer( face->extra.data );\n\n    if ( sfnt )\n      sfnt->done_face( face );\n\n    /* freeing the locations table */\n    tt_face_done_loca( face );\n\n    tt_face_free_hdmx( face );\n\n    /* freeing the CVT */\n    FT_FREE( face->cvt );\n    face->cvt_size = 0;\n\n    /* freeing the programs */\n    FT_FRAME_RELEASE( face->font_program );\n    FT_FRAME_RELEASE( face->cvt_program );\n    face->font_program_size = 0;\n    face->cvt_program_size  = 0;\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n    tt_done_blend( memory, face->blend );\n    face->blend = NULL;\n#endif\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                           SIZE  FUNCTIONS                             */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_size_run_fpgm                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Run the font program.                                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    size     :: A handle to the size object.                           */\n  /*                                                                       */\n  /*    pedantic :: Set if bytecode execution should be pedantic.          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_size_run_fpgm( TT_Size  size,\n                    FT_Bool  pedantic )\n  {\n    TT_Face         face = (TT_Face)size->root.face;\n    TT_ExecContext  exec;\n    FT_Error        error;\n\n\n    /* debugging instances have their own context */\n    if ( size->debug )\n      exec = size->context;\n    else\n      exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context;\n\n    if ( !exec )\n      return FT_THROW( Could_Not_Find_Context );\n\n    error = TT_Load_Context( exec, face, size );\n    if ( error )\n      return error;\n\n    exec->callTop = 0;\n    exec->top     = 0;\n\n    exec->period    = 64;\n    exec->phase     = 0;\n    exec->threshold = 0;\n\n    exec->instruction_trap = FALSE;\n    exec->F_dot_P          = 0x4000L;\n\n    exec->pedantic_hinting = pedantic;\n\n    {\n      FT_Size_Metrics*  metrics    = &exec->metrics;\n      TT_Size_Metrics*  tt_metrics = &exec->tt_metrics;\n\n\n      metrics->x_ppem   = 0;\n      metrics->y_ppem   = 0;\n      metrics->x_scale  = 0;\n      metrics->y_scale  = 0;\n\n      tt_metrics->ppem  = 0;\n      tt_metrics->scale = 0;\n      tt_metrics->ratio = 0x10000L;\n    }\n\n    /* allow font program execution */\n    TT_Set_CodeRange( exec,\n                      tt_coderange_font,\n                      face->font_program,\n                      face->font_program_size );\n\n    /* disable CVT and glyph programs coderange */\n    TT_Clear_CodeRange( exec, tt_coderange_cvt );\n    TT_Clear_CodeRange( exec, tt_coderange_glyph );\n\n    if ( face->font_program_size > 0 )\n    {\n      TT_Goto_CodeRange( exec, tt_coderange_font, 0 );\n\n      FT_TRACE4(( \"Executing `fpgm' table.\\n\" ));\n      error = face->interpreter( exec );\n    }\n    else\n      error = FT_Err_Ok;\n\n    size->bytecode_ready = error;\n\n    if ( !error )\n      TT_Save_Context( exec, size );\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_size_run_prep                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Run the control value program.                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    size     :: A handle to the size object.                           */\n  /*                                                                       */\n  /*    pedantic :: Set if bytecode execution should be pedantic.          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_size_run_prep( TT_Size  size,\n                    FT_Bool  pedantic )\n  {\n    TT_Face         face = (TT_Face)size->root.face;\n    TT_ExecContext  exec;\n    FT_Error        error;\n\n\n    /* debugging instances have their own context */\n    if ( size->debug )\n      exec = size->context;\n    else\n      exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context;\n\n    if ( !exec )\n      return FT_THROW( Could_Not_Find_Context );\n\n    error = TT_Load_Context( exec, face, size );\n    if ( error )\n      return error;\n\n    exec->callTop = 0;\n    exec->top     = 0;\n\n    exec->instruction_trap = FALSE;\n\n    exec->pedantic_hinting = pedantic;\n\n    TT_Set_CodeRange( exec,\n                      tt_coderange_cvt,\n                      face->cvt_program,\n                      face->cvt_program_size );\n\n    TT_Clear_CodeRange( exec, tt_coderange_glyph );\n\n    if ( face->cvt_program_size > 0 )\n    {\n      TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );\n\n      if ( !size->debug )\n      {\n        FT_TRACE4(( \"Executing `prep' table.\\n\" ));\n\n        error = face->interpreter( exec );\n      }\n    }\n    else\n      error = FT_Err_Ok;\n\n    size->cvt_ready = error;\n\n    /* UNDOCUMENTED!  The MS rasterizer doesn't allow the following */\n    /* graphics state variables to be modified by the CVT program.  */\n\n    exec->GS.dualVector.x = 0x4000;\n    exec->GS.dualVector.y = 0;\n    exec->GS.projVector.x = 0x4000;\n    exec->GS.projVector.y = 0x0;\n    exec->GS.freeVector.x = 0x4000;\n    exec->GS.freeVector.y = 0x0;\n\n    exec->GS.rp0 = 0;\n    exec->GS.rp1 = 0;\n    exec->GS.rp2 = 0;\n\n    exec->GS.gep0 = 1;\n    exec->GS.gep1 = 1;\n    exec->GS.gep2 = 1;\n\n    exec->GS.loop = 1;\n\n    /* save as default graphics state */\n    size->GS = exec->GS;\n\n    TT_Save_Context( exec, size );\n\n    return error;\n  }\n\n\n  static void\n  tt_size_done_bytecode( FT_Size  ftsize )\n  {\n    TT_Size    size   = (TT_Size)ftsize;\n    TT_Face    face   = (TT_Face)ftsize->face;\n    FT_Memory  memory = face->root.memory;\n\n\n    if ( size->debug )\n    {\n      /* the debug context must be deleted by the debugger itself */\n      size->context = NULL;\n      size->debug   = FALSE;\n    }\n\n    FT_FREE( size->cvt );\n    size->cvt_size = 0;\n\n    /* free storage area */\n    FT_FREE( size->storage );\n    size->storage_size = 0;\n\n    /* twilight zone */\n    tt_glyphzone_done( &size->twilight );\n\n    FT_FREE( size->function_defs );\n    FT_FREE( size->instruction_defs );\n\n    size->num_function_defs    = 0;\n    size->max_function_defs    = 0;\n    size->num_instruction_defs = 0;\n    size->max_instruction_defs = 0;\n\n    size->max_func = 0;\n    size->max_ins  = 0;\n\n    size->bytecode_ready = -1;\n    size->cvt_ready      = -1;\n  }\n\n\n  /* Initialize bytecode-related fields in the size object.       */\n  /* We do this only if bytecode interpretation is really needed. */\n  static FT_Error\n  tt_size_init_bytecode( FT_Size  ftsize,\n                         FT_Bool  pedantic )\n  {\n    FT_Error   error;\n    TT_Size    size = (TT_Size)ftsize;\n    TT_Face    face = (TT_Face)ftsize->face;\n    FT_Memory  memory = face->root.memory;\n\n    FT_UShort       n_twilight;\n    TT_MaxProfile*  maxp = &face->max_profile;\n\n\n    size->bytecode_ready = -1;\n    size->cvt_ready      = -1;\n\n    size->max_function_defs    = maxp->maxFunctionDefs;\n    size->max_instruction_defs = maxp->maxInstructionDefs;\n\n    size->num_function_defs    = 0;\n    size->num_instruction_defs = 0;\n\n    size->max_func = 0;\n    size->max_ins  = 0;\n\n    size->cvt_size     = face->cvt_size;\n    size->storage_size = maxp->maxStorage;\n\n    /* Set default metrics */\n    {\n      TT_Size_Metrics*  metrics = &size->ttmetrics;\n\n\n      metrics->rotated   = FALSE;\n      metrics->stretched = FALSE;\n\n      /* set default engine compensation */\n      metrics->compensations[0] = 0;   /* gray     */\n      metrics->compensations[1] = 0;   /* black    */\n      metrics->compensations[2] = 0;   /* white    */\n      metrics->compensations[3] = 0;   /* reserved */\n    }\n\n    /* allocate function defs, instruction defs, cvt, and storage area */\n    if ( FT_NEW_ARRAY( size->function_defs,    size->max_function_defs    ) ||\n         FT_NEW_ARRAY( size->instruction_defs, size->max_instruction_defs ) ||\n         FT_NEW_ARRAY( size->cvt,              size->cvt_size             ) ||\n         FT_NEW_ARRAY( size->storage,          size->storage_size         ) )\n      goto Exit;\n\n    /* reserve twilight zone */\n    n_twilight = maxp->maxTwilightPoints;\n\n    /* there are 4 phantom points (do we need this?) */\n    n_twilight += 4;\n\n    error = tt_glyphzone_new( memory, n_twilight, 0, &size->twilight );\n    if ( error )\n      goto Exit;\n\n    size->twilight.n_points = n_twilight;\n\n    size->GS = tt_default_graphics_state;\n\n    /* set `face->interpreter' according to the debug hook present */\n    {\n      FT_Library  library = face->root.driver->root.library;\n\n\n      face->interpreter = (TT_Interpreter)\n                            library->debug_hooks[FT_DEBUG_HOOK_TRUETYPE];\n      if ( !face->interpreter )\n        face->interpreter = (TT_Interpreter)TT_RunIns;\n    }\n\n    /* Fine, now run the font program! */\n    error = tt_size_run_fpgm( size, pedantic );\n\n  Exit:\n    if ( error )\n      tt_size_done_bytecode( ftsize );\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_size_ready_bytecode( TT_Size  size,\n                          FT_Bool  pedantic )\n  {\n    FT_Error  error = FT_Err_Ok;\n\n\n    if ( size->bytecode_ready < 0 )\n      error = tt_size_init_bytecode( (FT_Size)size, pedantic );\n\n    if ( error || size->bytecode_ready )\n      goto Exit;\n\n    /* rescale CVT when needed */\n    if ( size->cvt_ready < 0 )\n    {\n      FT_UInt  i;\n      TT_Face  face = (TT_Face)size->root.face;\n\n\n      /* Scale the cvt values to the new ppem.          */\n      /* We use by default the y ppem to scale the CVT. */\n      for ( i = 0; i < size->cvt_size; i++ )\n        size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale );\n\n      /* all twilight points are originally zero */\n      for ( i = 0; i < (FT_UInt)size->twilight.n_points; i++ )\n      {\n        size->twilight.org[i].x = 0;\n        size->twilight.org[i].y = 0;\n        size->twilight.cur[i].x = 0;\n        size->twilight.cur[i].y = 0;\n      }\n\n      /* clear storage area */\n      for ( i = 0; i < (FT_UInt)size->storage_size; i++ )\n        size->storage[i] = 0;\n\n      size->GS = tt_default_graphics_state;\n\n      error = tt_size_run_prep( size, pedantic );\n    }\n\n  Exit:\n    return error;\n  }\n\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_size_init                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initialize a new TrueType size object.                             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    size :: A handle to the size object.                               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_size_init( FT_Size  ttsize )           /* TT_Size */\n  {\n    TT_Size   size  = (TT_Size)ttsize;\n    FT_Error  error = FT_Err_Ok;\n\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n    size->bytecode_ready = -1;\n    size->cvt_ready      = -1;\n#endif\n\n    size->ttmetrics.valid = FALSE;\n    size->strike_index    = 0xFFFFFFFFUL;\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_size_done                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The TrueType size object finalizer.                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    size :: A handle to the target size object.                        */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  tt_size_done( FT_Size  ttsize )           /* TT_Size */\n  {\n    TT_Size  size = (TT_Size)ttsize;\n\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n    tt_size_done_bytecode( ttsize );\n#endif\n\n    size->ttmetrics.valid = FALSE;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_size_reset                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Reset a TrueType size when resolutions and character dimensions    */\n  /*    have been changed.                                                 */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    size :: A handle to the target size object.                        */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_size_reset( TT_Size  size )\n  {\n    TT_Face           face;\n    FT_Error          error = FT_Err_Ok;\n    FT_Size_Metrics*  metrics;\n\n\n    size->ttmetrics.valid = FALSE;\n\n    face = (TT_Face)size->root.face;\n\n    metrics = &size->metrics;\n\n    /* copy the result from base layer */\n    *metrics = size->root.metrics;\n\n    if ( metrics->x_ppem < 1 || metrics->y_ppem < 1 )\n      return FT_THROW( Invalid_PPem );\n\n    /* This bit flag, if set, indicates that the ppems must be       */\n    /* rounded to integers.  Nearly all TrueType fonts have this bit */\n    /* set, as hinting won't work really well otherwise.             */\n    /*                                                               */\n    if ( face->header.Flags & 8 )\n    {\n      metrics->x_scale = FT_DivFix( metrics->x_ppem << 6,\n                                    face->root.units_per_EM );\n      metrics->y_scale = FT_DivFix( metrics->y_ppem << 6,\n                                    face->root.units_per_EM );\n\n      metrics->ascender =\n        FT_PIX_ROUND( FT_MulFix( face->root.ascender, metrics->y_scale ) );\n      metrics->descender =\n        FT_PIX_ROUND( FT_MulFix( face->root.descender, metrics->y_scale ) );\n      metrics->height =\n        FT_PIX_ROUND( FT_MulFix( face->root.height, metrics->y_scale ) );\n      metrics->max_advance =\n        FT_PIX_ROUND( FT_MulFix( face->root.max_advance_width,\n                                 metrics->x_scale ) );\n    }\n\n    /* compute new transformation */\n    if ( metrics->x_ppem >= metrics->y_ppem )\n    {\n      size->ttmetrics.scale   = metrics->x_scale;\n      size->ttmetrics.ppem    = metrics->x_ppem;\n      size->ttmetrics.x_ratio = 0x10000L;\n      size->ttmetrics.y_ratio = FT_DivFix( metrics->y_ppem,\n                                           metrics->x_ppem );\n    }\n    else\n    {\n      size->ttmetrics.scale   = metrics->y_scale;\n      size->ttmetrics.ppem    = metrics->y_ppem;\n      size->ttmetrics.x_ratio = FT_DivFix( metrics->x_ppem,\n                                           metrics->y_ppem );\n      size->ttmetrics.y_ratio = 0x10000L;\n    }\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n    size->cvt_ready = -1;\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n    if ( !error )\n      size->ttmetrics.valid = TRUE;\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_driver_init                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initialize a given TrueType driver object.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    driver :: A handle to the target driver object.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_driver_init( FT_Module  ttdriver )     /* TT_Driver */\n  {\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    TT_Driver  driver = (TT_Driver)ttdriver;\n\n\n    if ( !TT_New_Context( driver ) )\n      return FT_THROW( Could_Not_Find_Context );\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n    driver->interpreter_version = TT_INTERPRETER_VERSION_38;\n#else\n    driver->interpreter_version = TT_INTERPRETER_VERSION_35;\n#endif\n\n#else /* !TT_USE_BYTECODE_INTERPRETER */\n\n    FT_UNUSED( ttdriver );\n\n#endif /* !TT_USE_BYTECODE_INTERPRETER */\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_driver_done                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finalize a given TrueType driver.                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    driver :: A handle to the target TrueType driver.                  */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  tt_driver_done( FT_Module  ttdriver )     /* TT_Driver */\n  {\n#ifdef TT_USE_BYTECODE_INTERPRETER\n    TT_Driver  driver = (TT_Driver)ttdriver;\n\n\n    /* destroy the execution context */\n    if ( driver->context )\n    {\n      TT_Done_Context( driver->context );\n      driver->context = NULL;\n    }\n#else\n    FT_UNUSED( ttdriver );\n#endif\n\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_slot_init                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initialize a new slot object.                                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    slot :: A handle to the slot object.                               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_slot_init( FT_GlyphSlot  slot )\n  {\n    return FT_GlyphLoader_CreateExtra( slot->internal->loader );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttobjs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttobjs.h                                                               */\n/*                                                                         */\n/*    Objects manager (specification).                                     */\n/*                                                                         */\n/*  Copyright 1996-2009, 2011-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTOBJS_H__\n#define __TTOBJS_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    TT_Driver                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a TrueType driver object.                              */\n  /*                                                                       */\n  typedef struct TT_DriverRec_*  TT_Driver;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    TT_Instance                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a TrueType size object.                                */\n  /*                                                                       */\n  typedef struct TT_SizeRec_*  TT_Size;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    TT_GlyphSlot                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a TrueType glyph slot object.                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This is a direct typedef of FT_GlyphSlot, as there is nothing      */\n  /*    specific about the TrueType glyph slot.                            */\n  /*                                                                       */\n  typedef FT_GlyphSlot  TT_GlyphSlot;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_GraphicsState                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The TrueType graphics state used during bytecode interpretation.   */\n  /*                                                                       */\n  typedef struct  TT_GraphicsState_\n  {\n    FT_UShort      rp0;\n    FT_UShort      rp1;\n    FT_UShort      rp2;\n\n    FT_UnitVector  dualVector;\n    FT_UnitVector  projVector;\n    FT_UnitVector  freeVector;\n\n#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING\n    FT_Bool        both_x_axis;\n#endif\n\n    FT_Long        loop;\n    FT_F26Dot6     minimum_distance;\n    FT_Int         round_state;\n\n    FT_Bool        auto_flip;\n    FT_F26Dot6     control_value_cutin;\n    FT_F26Dot6     single_width_cutin;\n    FT_F26Dot6     single_width_value;\n    FT_UShort      delta_base;\n    FT_UShort      delta_shift;\n\n    FT_Byte        instruct_control;\n    /* According to Greg Hitchcock from Microsoft, the `scan_control'     */\n    /* variable as documented in the TrueType specification is a 32-bit   */\n    /* integer; the high-word part holds the SCANTYPE value, the low-word */\n    /* part the SCANCTRL value.  We separate it into two fields.          */\n    FT_Bool        scan_control;\n    FT_Int         scan_type;\n\n    FT_UShort      gep0;\n    FT_UShort      gep1;\n    FT_UShort      gep2;\n\n  } TT_GraphicsState;\n\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n  FT_LOCAL( void )\n  tt_glyphzone_done( TT_GlyphZone  zone );\n\n  FT_LOCAL( FT_Error )\n  tt_glyphzone_new( FT_Memory     memory,\n                    FT_UShort     maxPoints,\n                    FT_Short      maxContours,\n                    TT_GlyphZone  zone );\n\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  EXECUTION SUBTABLES                                                  */\n  /*                                                                       */\n  /*  These sub-tables relate to instruction execution.                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#define TT_MAX_CODE_RANGES  3\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* There can only be 3 active code ranges at once:                       */\n  /*   - the Font Program                                                  */\n  /*   - the CVT Program                                                   */\n  /*   - a glyph's instructions set                                        */\n  /*                                                                       */\n  typedef enum  TT_CodeRange_Tag_\n  {\n    tt_coderange_none = 0,\n    tt_coderange_font,\n    tt_coderange_cvt,\n    tt_coderange_glyph\n\n  } TT_CodeRange_Tag;\n\n\n  typedef struct  TT_CodeRange_\n  {\n    FT_Byte*  base;\n    FT_ULong  size;\n\n  } TT_CodeRange;\n\n  typedef TT_CodeRange  TT_CodeRangeTable[TT_MAX_CODE_RANGES];\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Defines a function/instruction definition record.                     */\n  /*                                                                       */\n  typedef struct  TT_DefRecord_\n  {\n    FT_Int    range;          /* in which code range is it located?     */\n    FT_Long   start;          /* where does it start?                   */\n    FT_Long   end;            /* where does it end?                     */\n    FT_UInt   opc;            /* function #, or instruction code        */\n    FT_Bool   active;         /* is it active?                          */\n    FT_Bool   inline_delta;   /* is function that defines inline delta? */\n    FT_ULong  sph_fdef_flags; /* flags to identify special functions    */\n\n  } TT_DefRecord, *TT_DefArray;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Subglyph transformation record.                                       */\n  /*                                                                       */\n  typedef struct  TT_Transform_\n  {\n    FT_Fixed    xx, xy;     /* transformation matrix coefficients */\n    FT_Fixed    yx, yy;\n    FT_F26Dot6  ox, oy;     /* offsets                            */\n\n  } TT_Transform;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* A note regarding non-squared pixels:                                  */\n  /*                                                                       */\n  /* (This text will probably go into some docs at some time; for now, it  */\n  /* is kept here to explain some definitions in the TT_Size_Metrics       */\n  /* record).                                                              */\n  /*                                                                       */\n  /* The CVT is a one-dimensional array containing values that control     */\n  /* certain important characteristics in a font, like the height of all   */\n  /* capitals, all lowercase letter, default spacing or stem width/height. */\n  /*                                                                       */\n  /* These values are found in FUnits in the font file, and must be scaled */\n  /* to pixel coordinates before being used by the CVT and glyph programs. */\n  /* Unfortunately, when using distinct x and y resolutions (or distinct x */\n  /* and y pointsizes), there are two possible scalings.                   */\n  /*                                                                       */\n  /* A first try was to implement a `lazy' scheme where all values were    */\n  /* scaled when first used.  However, while some values are always used   */\n  /* in the same direction, some others are used under many different      */\n  /* circumstances and orientations.                                       */\n  /*                                                                       */\n  /* I have found a simpler way to do the same, and it even seems to work  */\n  /* in most of the cases:                                                 */\n  /*                                                                       */\n  /* - All CVT values are scaled to the maximum ppem size.                 */\n  /*                                                                       */\n  /* - When performing a read or write in the CVT, a ratio factor is used  */\n  /*   to perform adequate scaling.  Example:                              */\n  /*                                                                       */\n  /*     x_ppem = 14                                                       */\n  /*     y_ppem = 10                                                       */\n  /*                                                                       */\n  /*   We choose ppem = x_ppem = 14 as the CVT scaling size.  All cvt      */\n  /*   entries are scaled to it.                                           */\n  /*                                                                       */\n  /*     x_ratio = 1.0                                                     */\n  /*     y_ratio = y_ppem/ppem (< 1.0)                                     */\n  /*                                                                       */\n  /*   We compute the current ratio like:                                  */\n  /*                                                                       */\n  /*   - If projVector is horizontal,                                      */\n  /*       ratio = x_ratio = 1.0                                           */\n  /*                                                                       */\n  /*   - if projVector is vertical,                                        */\n  /*       ratio = y_ratio                                                 */\n  /*                                                                       */\n  /*   - else,                                                             */\n  /*       ratio = sqrt( (proj.x * x_ratio) ^ 2 + (proj.y * y_ratio) ^ 2 ) */\n  /*                                                                       */\n  /*   Reading a cvt value returns                                         */\n  /*     ratio * cvt[index]                                                */\n  /*                                                                       */\n  /*   Writing a cvt value in pixels:                                      */\n  /*     cvt[index] / ratio                                                */\n  /*                                                                       */\n  /*   The current ppem is simply                                          */\n  /*     ratio * ppem                                                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Metrics used by the TrueType size and context objects.                */\n  /*                                                                       */\n  typedef struct  TT_Size_Metrics_\n  {\n    /* for non-square pixels */\n    FT_Long     x_ratio;\n    FT_Long     y_ratio;\n\n    FT_UShort   ppem;               /* maximum ppem size              */\n    FT_Long     ratio;              /* current ratio                  */\n    FT_Fixed    scale;\n\n    FT_F26Dot6  compensations[4];   /* device-specific compensations  */\n\n    FT_Bool     valid;\n\n    FT_Bool     rotated;            /* `is the glyph rotated?'-flag   */\n    FT_Bool     stretched;          /* `is the glyph stretched?'-flag */\n\n  } TT_Size_Metrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TrueType size class.                                                  */\n  /*                                                                       */\n  typedef struct  TT_SizeRec_\n  {\n    FT_SizeRec         root;\n\n    /* we have our own copy of metrics so that we can modify */\n    /* it without affecting auto-hinting (when used)         */\n    FT_Size_Metrics    metrics;\n\n    TT_Size_Metrics    ttmetrics;\n\n    FT_ULong           strike_index;      /* 0xFFFFFFFF to indicate invalid */\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    FT_UInt            num_function_defs; /* number of function definitions */\n    FT_UInt            max_function_defs;\n    TT_DefArray        function_defs;     /* table of function definitions  */\n\n    FT_UInt            num_instruction_defs;  /* number of ins. definitions */\n    FT_UInt            max_instruction_defs;\n    TT_DefArray        instruction_defs;      /* table of ins. definitions  */\n\n    FT_UInt            max_func;\n    FT_UInt            max_ins;\n\n    TT_CodeRangeTable  codeRangeTable;\n\n    TT_GraphicsState   GS;\n\n    FT_ULong           cvt_size;      /* the scaled control value table */\n    FT_Long*           cvt;\n\n    FT_UShort          storage_size; /* The storage area is now part of */\n    FT_Long*           storage;      /* the instance                    */\n\n    TT_GlyphZoneRec    twilight;     /* The instance's twilight zone    */\n\n    /* debugging variables */\n\n    /* When using the debugger, we must keep the */\n    /* execution context tied to the instance    */\n    /* object rather than asking it on demand.   */\n\n    FT_Bool            debug;\n    TT_ExecContext     context;\n\n    /* if negative, `fpgm' (resp. `prep'), wasn't executed yet; */\n    /* otherwise it is the returned error code                  */\n    FT_Error           bytecode_ready;\n    FT_Error           cvt_ready;\n\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n  } TT_SizeRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TrueType driver class.                                                */\n  /*                                                                       */\n  typedef struct  TT_DriverRec_\n  {\n    FT_DriverRec  root;\n\n    TT_ExecContext   context;  /* execution context        */\n    TT_GlyphZoneRec  zone;     /* glyph loader points zone */\n\n    FT_UInt  interpreter_version;\n\n  } TT_DriverRec;\n\n\n  /* Note: All of the functions below (except tt_size_reset()) are used    */\n  /* as function pointers in a FT_Driver_ClassRec.  Therefore their        */\n  /* parameters are of types FT_Face, FT_Size, etc., rather than TT_Face,  */\n  /* TT_Size, etc., so that the compiler can confirm that the types and    */\n  /* number of parameters are correct.  In all cases the FT_xxx types are  */\n  /* cast to their TT_xxx counterparts inside the functions since FreeType */\n  /* will always use the TT driver to create them.                         */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Face functions                                                        */\n  /*                                                                       */\n  FT_LOCAL( FT_Error )\n  tt_face_init( FT_Stream      stream,\n                FT_Face        ttface,      /* TT_Face */\n                FT_Int         face_index,\n                FT_Int         num_params,\n                FT_Parameter*  params );\n\n  FT_LOCAL( void )\n  tt_face_done( FT_Face  ttface );          /* TT_Face */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Size functions                                                        */\n  /*                                                                       */\n  FT_LOCAL( FT_Error )\n  tt_size_init( FT_Size  ttsize );          /* TT_Size */\n\n  FT_LOCAL( void )\n  tt_size_done( FT_Size  ttsize );          /* TT_Size */\n\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n  FT_LOCAL( FT_Error )\n  tt_size_run_fpgm( TT_Size  size,\n                    FT_Bool  pedantic );\n\n  FT_LOCAL( FT_Error )\n  tt_size_run_prep( TT_Size  size,\n                    FT_Bool  pedantic );\n\n  FT_LOCAL( FT_Error )\n  tt_size_ready_bytecode( TT_Size  size,\n                          FT_Bool  pedantic );\n\n#endif /* TT_USE_BYTECODE_INTERPRETER */\n\n  FT_LOCAL( FT_Error )\n  tt_size_reset( TT_Size  size );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Driver functions                                                      */\n  /*                                                                       */\n  FT_LOCAL( FT_Error )\n  tt_driver_init( FT_Module  ttdriver );    /* TT_Driver */\n\n  FT_LOCAL( void )\n  tt_driver_done( FT_Module  ttdriver );    /* TT_Driver */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Slot functions                                                        */\n  /*                                                                       */\n  FT_LOCAL( FT_Error )\n  tt_slot_init( FT_GlyphSlot  slot );\n\n\n  /* auxiliary */\n#define IS_HINTED( flags )  ( ( flags & FT_LOAD_NO_HINTING ) == 0 )\n\n\nFT_END_HEADER\n\n#endif /* __TTOBJS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttpic.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttpic.c                                                                */\n/*                                                                         */\n/*    The FreeType position independent code services for truetype module. */\n/*                                                                         */\n/*  Copyright 2009, 2010, 2012, 2013 by                                    */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include \"ttpic.h\"\n#include \"tterrors.h\"\n\n\n#ifdef FT_CONFIG_OPTION_PIC\n\n  /* forward declaration of PIC init functions from ttdriver.c */\n  FT_Error\n  FT_Create_Class_tt_services( FT_Library           library,\n                               FT_ServiceDescRec**  output_class );\n  void\n  FT_Destroy_Class_tt_services( FT_Library          library,\n                                FT_ServiceDescRec*  clazz );\n  void\n  FT_Init_Class_tt_service_gx_multi_masters(\n    FT_Service_MultiMastersRec*  sv_mm );\n  void\n  FT_Init_Class_tt_service_truetype_glyf(\n    FT_Service_TTGlyfRec*  sv_ttglyf );\n\n\n  void\n  tt_driver_class_pic_free( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Memory          memory        = library->memory;\n\n\n    if ( pic_container->truetype )\n    {\n      TTModulePIC*  container = (TTModulePIC*)pic_container->truetype;\n\n\n      if ( container->tt_services )\n        FT_Destroy_Class_tt_services( library, container->tt_services );\n      container->tt_services = NULL;\n      FT_FREE( container );\n      pic_container->truetype = NULL;\n    }\n  }\n\n\n  FT_Error\n  tt_driver_class_pic_init( FT_Library  library )\n  {\n    FT_PIC_Container*  pic_container = &library->pic_container;\n    FT_Error           error         = FT_Err_Ok;\n    TTModulePIC*       container     = NULL;\n    FT_Memory          memory        = library->memory;\n\n\n    /* allocate pointer, clear and set global container pointer */\n    if ( FT_ALLOC( container, sizeof ( *container ) ) )\n      return error;\n    FT_MEM_SET( container, 0, sizeof ( *container ) );\n    pic_container->truetype = container;\n\n    /* initialize pointer table - this is how the module usually */\n    /* expects this data                                         */\n    error = FT_Create_Class_tt_services( library,\n                                         &container->tt_services );\n    if ( error )\n      goto Exit;\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n    FT_Init_Class_tt_service_gx_multi_masters(\n      &container->tt_service_gx_multi_masters );\n#endif\n    FT_Init_Class_tt_service_truetype_glyf(\n      &container->tt_service_truetype_glyf );\n\n  Exit:\n    if ( error )\n      tt_driver_class_pic_free( library );\n    return error;\n  }\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttpic.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttpic.h                                                                */\n/*                                                                         */\n/*    The FreeType position independent code services for truetype module. */\n/*                                                                         */\n/*  Copyright 2009, 2012, 2013 by                                          */\n/*  Oran Agra and Mickey Gabel.                                            */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTPIC_H__\n#define __TTPIC_H__\n\n\nFT_BEGIN_HEADER\n\n#ifndef FT_CONFIG_OPTION_PIC\n\n#define TT_SERVICES_GET                  tt_services\n#define TT_SERVICE_GX_MULTI_MASTERS_GET  tt_service_gx_multi_masters\n#define TT_SERVICE_TRUETYPE_GLYF_GET     tt_service_truetype_glyf\n#define TT_SERVICE_PROPERTIES_GET        tt_service_properties\n\n#else /* FT_CONFIG_OPTION_PIC */\n\n#include FT_MULTIPLE_MASTERS_H\n#include FT_SERVICE_MULTIPLE_MASTERS_H\n#include FT_SERVICE_TRUETYPE_GLYF_H\n#include FT_SERVICE_PROPERTIES_H\n\n\n  typedef struct  TTModulePIC_\n  {\n    FT_ServiceDescRec*          tt_services;\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n    FT_Service_MultiMastersRec  tt_service_gx_multi_masters;\n#endif\n    FT_Service_TTGlyfRec        tt_service_truetype_glyf;\n    FT_Service_PropertiesRec    tt_service_properties;\n\n  } TTModulePIC;\n\n\n#define GET_PIC( lib )                                      \\\n          ( (TTModulePIC*)((lib)->pic_container.truetype) )\n#define TT_SERVICES_GET                       \\\n          ( GET_PIC( library )->tt_services )\n#define TT_SERVICE_GX_MULTI_MASTERS_GET                       \\\n          ( GET_PIC( library )->tt_service_gx_multi_masters )\n#define TT_SERVICE_TRUETYPE_GLYF_GET                       \\\n          ( GET_PIC( library )->tt_service_truetype_glyf )\n#define TT_SERVICE_PROPERTIES_GET                       \\\n          ( GET_PIC( library )->tt_service_properties )\n\n\n  /* see ttpic.c for the implementation */\n  void\n  tt_driver_class_pic_free( FT_Library  library );\n\n  FT_Error\n  tt_driver_class_pic_init( FT_Library  library );\n\n#endif /* FT_CONFIG_OPTION_PIC */\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __TTPIC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttpload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttpload.c                                                              */\n/*                                                                         */\n/*    TrueType-specific tables loader (body).                              */\n/*                                                                         */\n/*  Copyright 1996-2002, 2004-2013 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_TAGS_H\n\n#include \"ttpload.h\"\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n#include \"ttgxvar.h\"\n#endif\n\n#include \"tterrors.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_ttpload\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_loca                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the locations table.                                          */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream :: The input stream.                                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_loca( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    FT_Error  error;\n    FT_ULong  table_len;\n    FT_Int    shift;\n\n\n    /* we need the size of the `glyf' table for malformed `loca' tables */\n    error = face->goto_table( face, TTAG_glyf, stream, &face->glyf_len );\n\n    /* it is possible that a font doesn't have a glyf table at all */\n    /* or its size is zero                                         */\n    if ( FT_ERR_EQ( error, Table_Missing ) )\n      face->glyf_len = 0;\n    else if ( error )\n      goto Exit;\n\n    FT_TRACE2(( \"Locations \" ));\n    error = face->goto_table( face, TTAG_loca, stream, &table_len );\n    if ( error )\n    {\n      error = FT_THROW( Locations_Missing );\n      goto Exit;\n    }\n\n    if ( face->header.Index_To_Loc_Format != 0 )\n    {\n      shift = 2;\n\n      if ( table_len >= 0x40000L )\n      {\n        FT_TRACE2(( \"table too large\\n\" ));\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n      face->num_locations = table_len >> shift;\n    }\n    else\n    {\n      shift = 1;\n\n      if ( table_len >= 0x20000L )\n      {\n        FT_TRACE2(( \"table too large\\n\" ));\n        error = FT_THROW( Invalid_Table );\n        goto Exit;\n      }\n      face->num_locations = table_len >> shift;\n    }\n\n    if ( face->num_locations != (FT_ULong)face->root.num_glyphs + 1 )\n    {\n      FT_TRACE2(( \"glyph count mismatch!  loca: %d, maxp: %d\\n\",\n                  face->num_locations - 1, face->root.num_glyphs ));\n\n      /* we only handle the case where `maxp' gives a larger value */\n      if ( face->num_locations <= (FT_ULong)face->root.num_glyphs )\n      {\n        FT_Long   new_loca_len =\n                    ( (FT_Long)( face->root.num_glyphs ) + 1 ) << shift;\n\n        TT_Table  entry = face->dir_tables;\n        TT_Table  limit = entry + face->num_tables;\n\n        FT_Long   pos  = FT_Stream_Pos( stream );\n        FT_Long   dist = 0x7FFFFFFFL;\n\n\n        /* compute the distance to next table in font file */\n        for ( ; entry < limit; entry++ )\n        {\n          FT_Long  diff = entry->Offset - pos;\n\n\n          if ( diff > 0 && diff < dist )\n            dist = diff;\n        }\n\n        if ( entry == limit )\n        {\n          /* `loca' is the last table */\n          dist = stream->size - pos;\n        }\n\n        if ( new_loca_len <= dist )\n        {\n          face->num_locations = face->root.num_glyphs + 1;\n          table_len           = new_loca_len;\n\n          FT_TRACE2(( \"adjusting num_locations to %d\\n\",\n                      face->num_locations ));\n        }\n      }\n    }\n\n    /*\n     * Extract the frame.  We don't need to decompress it since\n     * we are able to parse it directly.\n     */\n    if ( FT_FRAME_EXTRACT( table_len, face->glyph_locations ) )\n      goto Exit;\n\n    FT_TRACE2(( \"loaded\\n\" ));\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_ULong )\n  tt_face_get_location( TT_Face   face,\n                        FT_UInt   gindex,\n                        FT_UInt  *asize )\n  {\n    FT_ULong  pos1, pos2;\n    FT_Byte*  p;\n    FT_Byte*  p_limit;\n\n\n    pos1 = pos2 = 0;\n\n    if ( gindex < face->num_locations )\n    {\n      if ( face->header.Index_To_Loc_Format != 0 )\n      {\n        p       = face->glyph_locations + gindex * 4;\n        p_limit = face->glyph_locations + face->num_locations * 4;\n\n        pos1 = FT_NEXT_ULONG( p );\n        pos2 = pos1;\n\n        if ( p + 4 <= p_limit )\n          pos2 = FT_NEXT_ULONG( p );\n      }\n      else\n      {\n        p       = face->glyph_locations + gindex * 2;\n        p_limit = face->glyph_locations + face->num_locations * 2;\n\n        pos1 = FT_NEXT_USHORT( p );\n        pos2 = pos1;\n\n        if ( p + 2 <= p_limit )\n          pos2 = FT_NEXT_USHORT( p );\n\n        pos1 <<= 1;\n        pos2 <<= 1;\n      }\n    }\n\n    /* Check broken location data */\n    if ( pos1 > face->glyf_len )\n    {\n      FT_TRACE1(( \"tt_face_get_location:\"\n                  \" too large offset=0x%08lx found for gid=0x%04lx,\"\n                  \" exceeding the end of glyf table (0x%08lx)\\n\",\n                  pos1, gindex, face->glyf_len ));\n      *asize = 0;\n      return 0;\n    }\n\n    if ( pos2 > face->glyf_len )\n    {\n      FT_TRACE1(( \"tt_face_get_location:\"\n                  \" too large offset=0x%08lx found for gid=0x%04lx,\"\n                  \" truncate at the end of glyf table (0x%08lx)\\n\",\n                  pos2, gindex + 1, face->glyf_len ));\n      pos2 = face->glyf_len;\n    }\n\n    /* The `loca' table must be ordered; it refers to the length of */\n    /* an entry as the difference between the current and the next  */\n    /* position.  However, there do exist (malformed) fonts which   */\n    /* don't obey this rule, so we are only able to provide an      */\n    /* upper bound for the size.                                    */\n    /*                                                              */\n    /* We get (intentionally) a wrong, non-zero result in case the  */\n    /* `glyf' table is missing.                                     */\n    if ( pos2 >= pos1 )\n      *asize = (FT_UInt)( pos2 - pos1 );\n    else\n      *asize = (FT_UInt)( face->glyf_len - pos1 );\n\n    return pos1;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  tt_face_done_loca( TT_Face  face )\n  {\n    FT_Stream  stream = face->root.stream;\n\n\n    FT_FRAME_RELEASE( face->glyph_locations );\n    face->num_locations = 0;\n  }\n\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_cvt                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the control value table into a face object.                   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream :: A handle to the input stream.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_cvt( TT_Face    face,\n                    FT_Stream  stream )\n  {\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    FT_Error   error;\n    FT_Memory  memory = stream->memory;\n    FT_ULong   table_len;\n\n\n    FT_TRACE2(( \"CVT \" ));\n\n    error = face->goto_table( face, TTAG_cvt, stream, &table_len );\n    if ( error )\n    {\n      FT_TRACE2(( \"is missing\\n\" ));\n\n      face->cvt_size = 0;\n      face->cvt      = NULL;\n      error          = FT_Err_Ok;\n\n      goto Exit;\n    }\n\n    face->cvt_size = table_len / 2;\n\n    if ( FT_NEW_ARRAY( face->cvt, face->cvt_size ) )\n      goto Exit;\n\n    if ( FT_FRAME_ENTER( face->cvt_size * 2L ) )\n      goto Exit;\n\n    {\n      FT_Short*  cur   = face->cvt;\n      FT_Short*  limit = cur + face->cvt_size;\n\n\n      for ( ; cur < limit; cur++ )\n        *cur = FT_GET_SHORT();\n    }\n\n    FT_FRAME_EXIT();\n    FT_TRACE2(( \"loaded\\n\" ));\n\n#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT\n    if ( face->doblend )\n      error = tt_face_vary_cvt( face, stream );\n#endif\n\n  Exit:\n    return error;\n\n#else /* !TT_USE_BYTECODE_INTERPRETER */\n\n    FT_UNUSED( face   );\n    FT_UNUSED( stream );\n\n    return FT_Err_Ok;\n\n#endif\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_fpgm                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the font program.                                             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream :: A handle to the input stream.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_fpgm( TT_Face    face,\n                     FT_Stream  stream )\n  {\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    FT_Error  error;\n    FT_ULong  table_len;\n\n\n    FT_TRACE2(( \"Font program \" ));\n\n    /* The font program is optional */\n    error = face->goto_table( face, TTAG_fpgm, stream, &table_len );\n    if ( error )\n    {\n      face->font_program      = NULL;\n      face->font_program_size = 0;\n      error                   = FT_Err_Ok;\n\n      FT_TRACE2(( \"is missing\\n\" ));\n    }\n    else\n    {\n      face->font_program_size = table_len;\n      if ( FT_FRAME_EXTRACT( table_len, face->font_program ) )\n        goto Exit;\n\n      FT_TRACE2(( \"loaded, %12d bytes\\n\", face->font_program_size ));\n    }\n\n  Exit:\n    return error;\n\n#else /* !TT_USE_BYTECODE_INTERPRETER */\n\n    FT_UNUSED( face   );\n    FT_UNUSED( stream );\n\n    return FT_Err_Ok;\n\n#endif\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_prep                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the cvt program.                                              */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream :: A handle to the input stream.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_prep( TT_Face    face,\n                     FT_Stream  stream )\n  {\n#ifdef TT_USE_BYTECODE_INTERPRETER\n\n    FT_Error  error;\n    FT_ULong  table_len;\n\n\n    FT_TRACE2(( \"Prep program \" ));\n\n    error = face->goto_table( face, TTAG_prep, stream, &table_len );\n    if ( error )\n    {\n      face->cvt_program      = NULL;\n      face->cvt_program_size = 0;\n      error                  = FT_Err_Ok;\n\n      FT_TRACE2(( \"is missing\\n\" ));\n    }\n    else\n    {\n      face->cvt_program_size = table_len;\n      if ( FT_FRAME_EXTRACT( table_len, face->cvt_program ) )\n        goto Exit;\n\n      FT_TRACE2(( \"loaded, %12d bytes\\n\", face->cvt_program_size ));\n    }\n\n  Exit:\n    return error;\n\n#else /* !TT_USE_BYTECODE_INTERPRETER */\n\n    FT_UNUSED( face   );\n    FT_UNUSED( stream );\n\n    return FT_Err_Ok;\n\n#endif\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    tt_face_load_hdmx                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Load the `hdmx' table into the face object.                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face   :: A handle to the target face object.                      */\n  /*                                                                       */\n  /*    stream :: A handle to the input stream.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n\n  FT_LOCAL_DEF( FT_Error )\n  tt_face_load_hdmx( TT_Face    face,\n                     FT_Stream  stream )\n  {\n    FT_Error   error;\n    FT_Memory  memory = stream->memory;\n    FT_UInt    version, nn, num_records;\n    FT_ULong   table_size, record_size;\n    FT_Byte*   p;\n    FT_Byte*   limit;\n\n\n    /* this table is optional */\n    error = face->goto_table( face, TTAG_hdmx, stream, &table_size );\n    if ( error || table_size < 8 )\n      return FT_Err_Ok;\n\n    if ( FT_FRAME_EXTRACT( table_size, face->hdmx_table ) )\n      goto Exit;\n\n    p     = face->hdmx_table;\n    limit = p + table_size;\n\n    version     = FT_NEXT_USHORT( p );\n    num_records = FT_NEXT_USHORT( p );\n    record_size = FT_NEXT_ULONG( p );\n\n    /* The maximum number of bytes in an hdmx device record is the */\n    /* maximum number of glyphs + 2; this is 0xFFFF + 2, thus      */\n    /* explaining why `record_size' is a long (which we read as    */\n    /* unsigned long for convenience).  In practice, two bytes are */\n    /* sufficient to hold the size value.                          */\n    /*                                                             */\n    /* There are at least two fonts, HANNOM-A and HANNOM-B version */\n    /* 2.0 (2005), which get this wrong: The upper two bytes of    */\n    /* the size value are set to 0xFF instead of 0x00.  We catch   */\n    /* and fix this.                                               */\n\n    if ( record_size >= 0xFFFF0000UL )\n      record_size &= 0xFFFFU;\n\n    /* The limit for `num_records' is a heuristic value. */\n    if ( version != 0           ||\n         num_records > 255      ||\n         record_size > 0x10001L ||\n         record_size < 4        )\n    {\n      error = FT_THROW( Invalid_File_Format );\n      goto Fail;\n    }\n\n    if ( FT_NEW_ARRAY( face->hdmx_record_sizes, num_records ) )\n      goto Fail;\n\n    for ( nn = 0; nn < num_records; nn++ )\n    {\n      if ( p + record_size > limit )\n        break;\n\n      face->hdmx_record_sizes[nn] = p[0];\n      p                          += record_size;\n    }\n\n    face->hdmx_record_count = nn;\n    face->hdmx_table_size   = table_size;\n    face->hdmx_record_size  = record_size;\n\n  Exit:\n    return error;\n\n  Fail:\n    FT_FRAME_RELEASE( face->hdmx_table );\n    face->hdmx_table_size = 0;\n    goto Exit;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  tt_face_free_hdmx( TT_Face  face )\n  {\n    FT_Stream  stream = face->root.stream;\n    FT_Memory  memory = stream->memory;\n\n\n    FT_FREE( face->hdmx_record_sizes );\n    FT_FRAME_RELEASE( face->hdmx_table );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Return the advance width table for a given pixel size if it is found  */\n  /* in the font's `hdmx' table (if any).                                  */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Byte* )\n  tt_face_get_device_metrics( TT_Face  face,\n                              FT_UInt  ppem,\n                              FT_UInt  gindex )\n  {\n    FT_UInt   nn;\n    FT_Byte*  result      = NULL;\n    FT_ULong  record_size = face->hdmx_record_size;\n    FT_Byte*  record      = face->hdmx_table + 8;\n\n\n    for ( nn = 0; nn < face->hdmx_record_count; nn++ )\n      if ( face->hdmx_record_sizes[nn] == ppem )\n      {\n        gindex += 2;\n        if ( gindex < record_size )\n          result = record + nn * record_size + gindex;\n        break;\n      }\n\n    return result;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttpload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttpload.h                                                              */\n/*                                                                         */\n/*    TrueType-specific tables loader (specification).                     */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2005, 2006 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTPLOAD_H__\n#define __TTPLOAD_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_TRUETYPE_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_loca( TT_Face    face,\n                     FT_Stream  stream );\n\n  FT_LOCAL( FT_ULong )\n  tt_face_get_location( TT_Face   face,\n                        FT_UInt   gindex,\n                        FT_UInt  *asize );\n\n  FT_LOCAL( void )\n  tt_face_done_loca( TT_Face  face );\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_cvt( TT_Face    face,\n                    FT_Stream  stream );\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_fpgm( TT_Face    face,\n                     FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_prep( TT_Face    face,\n                     FT_Stream  stream );\n\n\n  FT_LOCAL( FT_Error )\n  tt_face_load_hdmx( TT_Face    face,\n                     FT_Stream  stream );\n\n\n  FT_LOCAL( void )\n  tt_face_free_hdmx( TT_Face  face );\n\n\n  FT_LOCAL( FT_Byte* )\n  tt_face_get_device_metrics( TT_Face    face,\n                              FT_UInt    ppem,\n                              FT_UInt    gindex );\n\nFT_END_HEADER\n\n#endif /* __TTPLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttsubpix.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttsubpix.c                                                             */\n/*                                                                         */\n/*    TrueType Subpixel Hinting.                                           */\n/*                                                                         */\n/*  Copyright 2010-2013 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_SFNT_H\n#include FT_TRUETYPE_TAGS_H\n#include FT_OUTLINE_H\n#include FT_TRUETYPE_DRIVER_H\n\n#include \"ttsubpix.h\"\n\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* These rules affect how the TT Interpreter does hinting, with the      */\n  /* goal of doing subpixel hinting by (in general) ignoring x moves.      */\n  /* Some of these rules are fixes that go above and beyond the            */\n  /* stated techniques in the MS whitepaper on Cleartype, due to           */\n  /* artifacts in many glyphs.  So, these rules make some glyphs render    */\n  /* better than they do in the MS rasterizer.                             */\n  /*                                                                       */\n  /* \"\" string or 0 int/char indicates to apply to all glyphs.             */\n  /* \"-\" used as dummy placeholders, but any non-matching string works.    */\n  /*                                                                       */\n  /* Some of this could arguably be implemented in fontconfig, however:    */\n  /*                                                                       */\n  /*  - Fontconfig can't set things on a glyph-by-glyph basis.             */\n  /*  - The tweaks that happen here are very low-level, from an average    */\n  /*    user's point of view and are best implemented in the hinter.       */\n  /*                                                                       */\n  /* The goal is to make the subpixel hinting techniques as generalized    */\n  /* as possible across all fonts to prevent the need for extra rules such */\n  /* as these.                                                             */\n  /*                                                                       */\n  /* The rule structure is designed so that entirely new rules can easily  */\n  /* be added when a new compatibility feature is discovered.              */\n  /*                                                                       */\n  /* The rule structures could also use some enhancement to handle ranges. */\n  /*                                                                       */\n  /*     ****************** WORK IN PROGRESS *******************           */\n  /*                                                                       */\n\n  /* These are `classes' of fonts that can be grouped together and used in */\n  /* rules below.  A blank entry \"\" is required at the end of these!       */\n#define FAMILY_CLASS_RULES_SIZE  7\n\n  static const SPH_Font_Class FAMILY_CLASS_Rules\n                              [FAMILY_CLASS_RULES_SIZE] =\n  {\n    { \"MS Legacy Fonts\",\n      { \"Aharoni\",\n        \"Andale Mono\",\n        \"Andalus\",\n        \"Angsana New\",\n        \"AngsanaUPC\",\n        \"Arabic Transparent\",\n        \"Arial Black\",\n        \"Arial Narrow\",\n        \"Arial Unicode MS\",\n        \"Arial\",\n        \"Batang\",\n        \"Browallia New\",\n        \"BrowalliaUPC\",\n        \"Comic Sans MS\",\n        \"Cordia New\",\n        \"CordiaUPC\",\n        \"Courier New\",\n        \"DFKai-SB\",\n        \"David Transparent\",\n        \"David\",\n        \"DilleniaUPC\",\n        \"Estrangelo Edessa\",\n        \"EucrosiaUPC\",\n        \"FangSong_GB2312\",\n        \"Fixed Miriam Transparent\",\n        \"FrankRuehl\",\n        \"Franklin Gothic Medium\",\n        \"FreesiaUPC\",\n        \"Garamond\",\n        \"Gautami\",\n        \"Georgia\",\n        \"Gulim\",\n        \"Impact\",\n        \"IrisUPC\",\n        \"JasmineUPC\",\n        \"KaiTi_GB2312\",\n        \"KodchiangUPC\",\n        \"Latha\",\n        \"Levenim MT\",\n        \"LilyUPC\",\n        \"Lucida Console\",\n        \"Lucida Sans Unicode\",\n        \"MS Gothic\",\n        \"MS Mincho\",\n        \"MV Boli\",\n        \"Mangal\",\n        \"Marlett\",\n        \"Microsoft Sans Serif\",\n        \"Mingliu\",\n        \"Miriam Fixed\",\n        \"Miriam Transparent\",\n        \"Miriam\",\n        \"Narkisim\",\n        \"Palatino Linotype\",\n        \"Raavi\",\n        \"Rod Transparent\",\n        \"Rod\",\n        \"Shruti\",\n        \"SimHei\",\n        \"Simplified Arabic Fixed\",\n        \"Simplified Arabic\",\n        \"Simsun\",\n        \"Sylfaen\",\n        \"Symbol\",\n        \"Tahoma\",\n        \"Times New Roman\",\n        \"Traditional Arabic\",\n        \"Trebuchet MS\",\n        \"Tunga\",\n        \"Verdana\",\n        \"Webdings\",\n        \"Wingdings\",\n        \"\",\n      },\n    },\n    { \"Core MS Legacy Fonts\",\n      { \"Arial Black\",\n        \"Arial Narrow\",\n        \"Arial Unicode MS\",\n        \"Arial\",\n        \"Comic Sans MS\",\n        \"Courier New\",\n        \"Garamond\",\n        \"Georgia\",\n        \"Impact\",\n        \"Lucida Console\",\n        \"Lucida Sans Unicode\",\n        \"Microsoft Sans Serif\",\n        \"Palatino Linotype\",\n        \"Tahoma\",\n        \"Times New Roman\",\n        \"Trebuchet MS\",\n        \"Verdana\",\n        \"\",\n      },\n    },\n    { \"Apple Legacy Fonts\",\n      { \"Geneva\",\n        \"Times\",\n        \"Monaco\",\n        \"Century\",\n        \"Chalkboard\",\n        \"Lobster\",\n        \"Century Gothic\",\n        \"Optima\",\n        \"Lucida Grande\",\n        \"Gill Sans\",\n        \"Baskerville\",\n        \"Helvetica\",\n        \"Helvetica Neue\",\n        \"\",\n      },\n    },\n    { \"Legacy Sans Fonts\",\n      { \"Andale Mono\",\n        \"Arial Unicode MS\",\n        \"Arial\",\n        \"Century Gothic\",\n        \"Comic Sans MS\",\n        \"Franklin Gothic Medium\",\n        \"Geneva\",\n        \"Lucida Console\",\n        \"Lucida Grande\",\n        \"Lucida Sans Unicode\",\n        \"Lucida Sans Typewriter\",\n        \"Microsoft Sans Serif\",\n        \"Monaco\",\n        \"Tahoma\",\n        \"Trebuchet MS\",\n        \"Verdana\",\n        \"\",\n      },\n    },\n\n    { \"Misc Legacy Fonts\",\n      { \"Dark Courier\", \"\", }, },\n    { \"Verdana Clones\",\n      { \"DejaVu Sans\",\n        \"Bitstream Vera Sans\", \"\", }, },\n    { \"Verdana and Clones\",\n      { \"DejaVu Sans\",\n        \"Bitstream Vera Sans\",\n        \"Verdana\", \"\", }, },\n  };\n\n\n  /* Define this to force natural (i.e. not bitmap-compatible) widths.     */\n  /* The default leans strongly towards natural widths except for a few    */\n  /* legacy fonts where a selective combination produces nicer results.    */\n/* #define FORCE_NATURAL_WIDTHS   */\n\n\n  /* Define `classes' of styles that can be grouped together and used in   */\n  /* rules below.  A blank entry \"\" is required at the end of these!       */\n#define STYLE_CLASS_RULES_SIZE  5\n\n  const SPH_Font_Class STYLE_CLASS_Rules\n                       [STYLE_CLASS_RULES_SIZE] =\n  {\n    { \"Regular Class\",\n      { \"Regular\",\n        \"Book\",\n        \"Medium\",\n        \"Roman\",\n        \"Normal\",\n        \"\",\n      },\n    },\n    { \"Regular/Italic Class\",\n      { \"Regular\",\n        \"Book\",\n        \"Medium\",\n        \"Italic\",\n        \"Oblique\",\n        \"Roman\",\n        \"Normal\",\n        \"\",\n      },\n    },\n    { \"Bold/BoldItalic Class\",\n      { \"Bold\",\n        \"Bold Italic\",\n        \"Black\",\n        \"\",\n      },\n    },\n    { \"Bold/Italic/BoldItalic Class\",\n      { \"Bold\",\n        \"Bold Italic\",\n        \"Black\",\n        \"Italic\",\n        \"Oblique\",\n        \"\",\n      },\n    },\n    { \"Regular/Bold Class\",\n      { \"Regular\",\n        \"Book\",\n        \"Medium\",\n        \"Normal\",\n        \"Roman\",\n        \"Bold\",\n        \"Black\",\n        \"\",\n      },\n    },\n  };\n\n\n  /* Force special legacy fixes for fonts.                                 */\n#define COMPATIBILITY_MODE_RULES_SIZE  1\n\n  const SPH_TweakRule  COMPATIBILITY_MODE_Rules\n                       [COMPATIBILITY_MODE_RULES_SIZE] =\n  {\n    { \"Verdana Clones\", 0, \"\", 0 },\n  };\n\n\n  /* Don't do subpixel (ignore_x_mode) hinting; do normal hinting.         */\n#define PIXEL_HINTING_RULES_SIZE  2\n\n  const SPH_TweakRule  PIXEL_HINTING_Rules\n                       [PIXEL_HINTING_RULES_SIZE] =\n  {\n    /* these characters are almost always safe */\n    { \"Courier New\", 12, \"Italic\", 'z' },\n    { \"Courier New\", 11, \"Italic\", 'z' },\n  };\n\n\n  /* Subpixel hinting ignores SHPIX rules on X.  Force SHPIX for these.    */\n#define DO_SHPIX_RULES_SIZE  1\n\n  const SPH_TweakRule  DO_SHPIX_Rules\n                       [DO_SHPIX_RULES_SIZE] =\n  {\n    { \"-\", 0, \"\", 0 },\n  };\n\n\n  /* Skip Y moves that start with a point that is not on a Y pixel         */\n  /* boundary and don't move that point to a Y pixel boundary.             */\n#define SKIP_NONPIXEL_Y_MOVES_RULES_SIZE  4\n\n  const SPH_TweakRule  SKIP_NONPIXEL_Y_MOVES_Rules\n                       [SKIP_NONPIXEL_Y_MOVES_RULES_SIZE] =\n  {\n    /* fix vwxyz thinness*/\n    { \"Consolas\", 0, \"\", 0 },\n    /* Fix thin middle stems */\n    { \"Core MS Legacy Fonts\", 0, \"Regular\", 0 },\n    /* Cyrillic small letter I */\n    { \"Legacy Sans Fonts\", 0, \"\", 0 },\n    /* Fix artifacts with some Regular & Bold */\n    { \"Verdana Clones\", 0, \"\", 0 },\n  };\n\n\n#define SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE  1\n\n  const SPH_TweakRule  SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions\n                       [SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =\n  {\n    /* Fixes < and > */\n    { \"Courier New\", 0, \"Regular\", 0 },\n  };\n\n\n  /* Skip Y moves that start with a point that is not on a Y pixel         */\n  /* boundary and don't move that point to a Y pixel boundary.             */\n#define SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE  2\n\n  const SPH_TweakRule  SKIP_NONPIXEL_Y_MOVES_DELTAP_Rules\n                       [SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE] =\n  {\n    /* Maintain thickness of diagonal in 'N' */\n    { \"Times New Roman\", 0, \"Regular/Bold Class\", 'N' },\n    { \"Georgia\", 0, \"Regular/Bold Class\", 'N' },\n  };\n\n\n  /* Skip Y moves that move a point off a Y pixel boundary.                */\n#define SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE  1\n\n  const SPH_TweakRule  SKIP_OFFPIXEL_Y_MOVES_Rules\n                       [SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE] =\n  {\n    { \"-\", 0, \"\", 0 },\n  };\n\n\n#define SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE  1\n\n  const SPH_TweakRule  SKIP_OFFPIXEL_Y_MOVES_Rules_Exceptions\n                       [SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =\n  {\n    { \"-\", 0, \"\", 0 },\n  };\n\n\n  /* Round moves that don't move a point to a Y pixel boundary.            */\n#define ROUND_NONPIXEL_Y_MOVES_RULES_SIZE  2\n\n  const SPH_TweakRule  ROUND_NONPIXEL_Y_MOVES_Rules\n                       [ROUND_NONPIXEL_Y_MOVES_RULES_SIZE] =\n  {\n    /* Droid font instructions don't snap Y to pixels */\n    { \"Droid Sans\", 0, \"Regular/Italic Class\", 0 },\n    { \"Droid Sans Mono\", 0, \"\", 0 },\n  };\n\n\n#define ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE  1\n\n  const SPH_TweakRule  ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions\n                       [ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =\n  {\n    { \"-\", 0, \"\", 0 },\n  };\n\n\n  /* Allow a Direct_Move along X freedom vector if matched.                */\n#define ALLOW_X_DMOVE_RULES_SIZE  1\n\n  const SPH_TweakRule  ALLOW_X_DMOVE_Rules\n                       [ALLOW_X_DMOVE_RULES_SIZE] =\n  {\n    /* Fixes vanishing diagonal in 4 */\n    { \"Verdana\", 0, \"Regular\", '4' },\n  };\n\n\n  /* Return MS rasterizer version 35 if matched.                           */\n#define RASTERIZER_35_RULES_SIZE  8\n\n  const SPH_TweakRule  RASTERIZER_35_Rules\n                       [RASTERIZER_35_RULES_SIZE] =\n  {\n    /* This seems to be the only way to make these look good */\n    { \"Times New Roman\", 0, \"Regular\", 'i' },\n    { \"Times New Roman\", 0, \"Regular\", 'j' },\n    { \"Times New Roman\", 0, \"Regular\", 'm' },\n    { \"Times New Roman\", 0, \"Regular\", 'r' },\n    { \"Times New Roman\", 0, \"Regular\", 'a' },\n    { \"Times New Roman\", 0, \"Regular\", 'n' },\n    { \"Times New Roman\", 0, \"Regular\", 'p' },\n    { \"Times\", 0, \"\", 0 },\n  };\n\n\n  /* Don't round to the subpixel grid.  Round to pixel grid.               */\n#define NORMAL_ROUND_RULES_SIZE  1\n\n  const SPH_TweakRule  NORMAL_ROUND_Rules\n                       [NORMAL_ROUND_RULES_SIZE] =\n  {\n    /* Fix serif thickness for certain ppems */\n    /* Can probably be generalized somehow   */\n    { \"Courier New\", 0, \"\", 0 },\n  };\n\n\n  /* Skip IUP instructions if matched.                                     */\n#define SKIP_IUP_RULES_SIZE  1\n\n  const SPH_TweakRule  SKIP_IUP_Rules\n                       [SKIP_IUP_RULES_SIZE] =\n  {\n    { \"Arial\", 13, \"Regular\", 'a' },\n  };\n\n\n  /* Skip MIAP Twilight hack if matched.                                   */\n#define MIAP_HACK_RULES_SIZE  1\n\n  const SPH_TweakRule  MIAP_HACK_Rules\n                       [MIAP_HACK_RULES_SIZE] =\n  {\n    { \"Geneva\", 12, \"\", 0 },\n  };\n\n\n  /* Skip DELTAP instructions if matched.                                  */\n#define ALWAYS_SKIP_DELTAP_RULES_SIZE  23\n\n  const SPH_TweakRule  ALWAYS_SKIP_DELTAP_Rules\n                       [ALWAYS_SKIP_DELTAP_RULES_SIZE] =\n  {\n    { \"Georgia\", 0, \"Regular\", 'k' },\n    /* fix various problems with e in different versions */\n    { \"Trebuchet MS\", 14, \"Regular\", 'e' },\n    { \"Trebuchet MS\", 13, \"Regular\", 'e' },\n    { \"Trebuchet MS\", 15, \"Regular\", 'e' },\n    { \"Trebuchet MS\", 0, \"Italic\", 'v' },\n    { \"Trebuchet MS\", 0, \"Italic\", 'w' },\n    { \"Trebuchet MS\", 0, \"Regular\", 'Y' },\n    { \"Arial\", 11, \"Regular\", 's' },\n    /* prevent problems with '3' and others */\n    { \"Verdana\", 10, \"Regular\", 0 },\n    { \"Verdana\", 9, \"Regular\", 0 },\n    /* Cyrillic small letter short I */\n    { \"Legacy Sans Fonts\", 0, \"\", 0x438 },\n    { \"Legacy Sans Fonts\", 0, \"\", 0x439 },\n    { \"Arial\", 10, \"Regular\", '6' },\n    { \"Arial\", 0, \"Bold/BoldItalic Class\", 'a' },\n    /* Make horizontal stems consistent with the rest */\n    { \"Arial\", 24, \"Bold\", 'a' },\n    { \"Arial\", 25, \"Bold\", 'a' },\n    { \"Arial\", 24, \"Bold\", 's' },\n    { \"Arial\", 25, \"Bold\", 's' },\n    { \"Arial\", 34, \"Bold\", 's' },\n    { \"Arial\", 35, \"Bold\", 's' },\n    { \"Arial\", 36, \"Bold\", 's' },\n    { \"Arial\", 25, \"Regular\", 's' },\n    { \"Arial\", 26, \"Regular\", 's' },\n  };\n\n\n  /* Always do DELTAP instructions if matched.                             */\n#define ALWAYS_DO_DELTAP_RULES_SIZE  1\n\n  const SPH_TweakRule  ALWAYS_DO_DELTAP_Rules\n                       [ALWAYS_DO_DELTAP_RULES_SIZE] =\n  {\n    { \"-\", 0, \"\", 0 },\n  };\n\n\n  /* Don't allow ALIGNRP after IUP.                                        */\n#define NO_ALIGNRP_AFTER_IUP_RULES_SIZE  1\n\n  static const SPH_TweakRule  NO_ALIGNRP_AFTER_IUP_Rules\n                              [NO_ALIGNRP_AFTER_IUP_RULES_SIZE] =\n  {\n    /* Prevent creation of dents in outline */\n    { \"-\", 0, \"\", 0 },\n  };\n\n\n  /* Don't allow DELTAP after IUP.                                         */\n#define NO_DELTAP_AFTER_IUP_RULES_SIZE  1\n\n  static const SPH_TweakRule  NO_DELTAP_AFTER_IUP_Rules\n                              [NO_DELTAP_AFTER_IUP_RULES_SIZE] =\n  {\n    { \"-\", 0, \"\", 0 },\n  };\n\n\n  /* Don't allow CALL after IUP.                                           */\n#define NO_CALL_AFTER_IUP_RULES_SIZE  1\n\n  static const SPH_TweakRule  NO_CALL_AFTER_IUP_Rules\n                              [NO_CALL_AFTER_IUP_RULES_SIZE] =\n  {\n    /* Prevent creation of dents in outline */\n    { \"-\", 0, \"\", 0 },\n  };\n\n\n  /* De-embolden these glyphs slightly.                                    */\n#define DEEMBOLDEN_RULES_SIZE  9\n\n  static const SPH_TweakRule  DEEMBOLDEN_Rules\n                              [DEEMBOLDEN_RULES_SIZE] =\n  {\n    { \"Courier New\", 0, \"Bold\", 'A' },\n    { \"Courier New\", 0, \"Bold\", 'W' },\n    { \"Courier New\", 0, \"Bold\", 'w' },\n    { \"Courier New\", 0, \"Bold\", 'M' },\n    { \"Courier New\", 0, \"Bold\", 'X' },\n    { \"Courier New\", 0, \"Bold\", 'K' },\n    { \"Courier New\", 0, \"Bold\", 'x' },\n    { \"Courier New\", 0, \"Bold\", 'z' },\n    { \"Courier New\", 0, \"Bold\", 'v' },\n  };\n\n\n  /* Embolden these glyphs slightly.                                       */\n#define EMBOLDEN_RULES_SIZE  2\n\n  static const SPH_TweakRule  EMBOLDEN_Rules\n                              [EMBOLDEN_RULES_SIZE] =\n  {\n    { \"Courier New\", 0, \"Regular\", 0 },\n    { \"Courier New\", 0, \"Italic\", 0 },\n  };\n\n\n  /* This is a CVT hack that makes thick horizontal stems on 2, 5, 7       */\n  /* similar to Windows XP.                                                */\n#define TIMES_NEW_ROMAN_HACK_RULES_SIZE  12\n\n  static const SPH_TweakRule  TIMES_NEW_ROMAN_HACK_Rules\n                              [TIMES_NEW_ROMAN_HACK_RULES_SIZE] =\n  {\n    { \"Times New Roman\", 16, \"Italic\", '2' },\n    { \"Times New Roman\", 16, \"Italic\", '5' },\n    { \"Times New Roman\", 16, \"Italic\", '7' },\n    { \"Times New Roman\", 16, \"Regular\", '2' },\n    { \"Times New Roman\", 16, \"Regular\", '5' },\n    { \"Times New Roman\", 16, \"Regular\", '7' },\n    { \"Times New Roman\", 17, \"Italic\", '2' },\n    { \"Times New Roman\", 17, \"Italic\", '5' },\n    { \"Times New Roman\", 17, \"Italic\", '7' },\n    { \"Times New Roman\", 17, \"Regular\", '2' },\n    { \"Times New Roman\", 17, \"Regular\", '5' },\n    { \"Times New Roman\", 17, \"Regular\", '7' },\n  };\n\n\n  /* This fudges distance on 2 to get rid of the vanishing stem issue.     */\n  /* A real solution to this is certainly welcome.                         */\n#define COURIER_NEW_2_HACK_RULES_SIZE  15\n\n  static const SPH_TweakRule  COURIER_NEW_2_HACK_Rules\n                              [COURIER_NEW_2_HACK_RULES_SIZE] =\n  {\n    { \"Courier New\", 10, \"Regular\", '2' },\n    { \"Courier New\", 11, \"Regular\", '2' },\n    { \"Courier New\", 12, \"Regular\", '2' },\n    { \"Courier New\", 13, \"Regular\", '2' },\n    { \"Courier New\", 14, \"Regular\", '2' },\n    { \"Courier New\", 15, \"Regular\", '2' },\n    { \"Courier New\", 16, \"Regular\", '2' },\n    { \"Courier New\", 17, \"Regular\", '2' },\n    { \"Courier New\", 18, \"Regular\", '2' },\n    { \"Courier New\", 19, \"Regular\", '2' },\n    { \"Courier New\", 20, \"Regular\", '2' },\n    { \"Courier New\", 21, \"Regular\", '2' },\n    { \"Courier New\", 22, \"Regular\", '2' },\n    { \"Courier New\", 23, \"Regular\", '2' },\n    { \"Courier New\", 24, \"Regular\", '2' },\n  };\n\n\n#ifndef FORCE_NATURAL_WIDTHS\n\n  /* Use compatible widths with these glyphs.  Compatible widths is always */\n  /* on when doing B/W TrueType instructing, but is used selectively here, */\n  /* typically on glyphs with 3 or more vertical stems.                    */\n#define COMPATIBLE_WIDTHS_RULES_SIZE  38\n\n  static const SPH_TweakRule  COMPATIBLE_WIDTHS_Rules\n                              [COMPATIBLE_WIDTHS_RULES_SIZE] =\n  {\n    { \"Arial Unicode MS\", 12, \"Regular Class\", 'm' },\n    { \"Arial Unicode MS\", 14, \"Regular Class\", 'm' },\n    /* Cyrillic small letter sha */\n    { \"Arial\", 10, \"Regular Class\", 0x448 },\n    { \"Arial\", 11, \"Regular Class\", 'm' },\n    { \"Arial\", 12, \"Regular Class\", 'm' },\n    /* Cyrillic small letter sha */\n    { \"Arial\", 12, \"Regular Class\", 0x448 },\n    { \"Arial\", 13, \"Regular Class\", 0x448 },\n    { \"Arial\", 14, \"Regular Class\", 'm' },\n    /* Cyrillic small letter sha */\n    { \"Arial\", 14, \"Regular Class\", 0x448 },\n    { \"Arial\", 15, \"Regular Class\", 0x448 },\n    { \"Arial\", 17, \"Regular Class\", 'm' },\n    { \"DejaVu Sans\", 15, \"Regular Class\", 0 },\n    { \"Microsoft Sans Serif\", 11, \"Regular Class\", 0 },\n    { \"Microsoft Sans Serif\", 12, \"Regular Class\", 0 },\n    { \"Segoe UI\", 11, \"Regular Class\", 0 },\n    { \"Monaco\", 0, \"Regular Class\", 0 },\n    { \"Segoe UI\", 12, \"Regular Class\", 'm' },\n    { \"Segoe UI\", 14, \"Regular Class\", 'm' },\n    { \"Tahoma\", 11, \"Regular Class\", 0 },\n    { \"Times New Roman\", 16, \"Regular Class\", 'c' },\n    { \"Times New Roman\", 16, \"Regular Class\", 'm' },\n    { \"Times New Roman\", 16, \"Regular Class\", 'o' },\n    { \"Times New Roman\", 16, \"Regular Class\", 'w' },\n    { \"Trebuchet MS\", 11, \"Regular Class\", 0 },\n    { \"Trebuchet MS\", 12, \"Regular Class\", 0 },\n    { \"Trebuchet MS\", 14, \"Regular Class\", 0 },\n    { \"Trebuchet MS\", 15, \"Regular Class\", 0 },\n    { \"Ubuntu\", 12, \"Regular Class\", 'm' },\n    /* Cyrillic small letter sha */\n    { \"Verdana\", 10, \"Regular Class\", 0x448 },\n    { \"Verdana\", 11, \"Regular Class\", 0x448 },\n    { \"Verdana and Clones\", 12, \"Regular Class\", 'i' },\n    { \"Verdana and Clones\", 12, \"Regular Class\", 'j' },\n    { \"Verdana and Clones\", 12, \"Regular Class\", 'l' },\n    { \"Verdana and Clones\", 12, \"Regular Class\", 'm' },\n    { \"Verdana and Clones\", 13, \"Regular Class\", 'i' },\n    { \"Verdana and Clones\", 13, \"Regular Class\", 'j' },\n    { \"Verdana and Clones\", 13, \"Regular Class\", 'l' },\n    { \"Verdana and Clones\", 14, \"Regular Class\", 'm' },\n  };\n\n\n  /* Scaling slightly in the x-direction prior to hinting results in       */\n  /* more visually pleasing glyphs in certain cases.                       */\n  /* This sometimes needs to be coordinated with compatible width rules.   */\n  /* A value of 1000 corresponds to a scaled value of 1.0.                 */\n\n#define X_SCALING_RULES_SIZE  50\n\n  static const SPH_ScaleRule  X_SCALING_Rules[X_SCALING_RULES_SIZE] =\n  {\n    { \"DejaVu Sans\", 12, \"Regular Class\", 'm', 950 },\n    { \"Verdana and Clones\", 12, \"Regular Class\", 'a', 1100 },\n    { \"Verdana and Clones\", 13, \"Regular Class\", 'a', 1050 },\n    { \"Arial\", 11, \"Regular Class\", 'm', 975 },\n    { \"Arial\", 12, \"Regular Class\", 'm', 1050 },\n    /* Cyrillic small letter el */\n    { \"Arial\", 13, \"Regular Class\", 0x43B, 950 },\n    { \"Arial\", 13, \"Regular Class\", 'o', 950 },\n    { \"Arial\", 13, \"Regular Class\", 'e', 950 },\n    { \"Arial\", 14, \"Regular Class\", 'm', 950 },\n    /* Cyrillic small letter el */\n    { \"Arial\", 15, \"Regular Class\", 0x43B, 925 },\n    { \"Bitstream Vera Sans\", 10, \"Regular/Italic Class\", 0, 1100 },\n    { \"Bitstream Vera Sans\", 12, \"Regular/Italic Class\", 0, 1050 },\n    { \"Bitstream Vera Sans\", 16, \"Regular Class\", 0, 1050 },\n    { \"Bitstream Vera Sans\", 9, \"Regular/Italic Class\", 0, 1050 },\n    { \"DejaVu Sans\", 12, \"Regular Class\", 'l', 975 },\n    { \"DejaVu Sans\", 12, \"Regular Class\", 'i', 975 },\n    { \"DejaVu Sans\", 12, \"Regular Class\", 'j', 975 },\n    { \"DejaVu Sans\", 13, \"Regular Class\", 'l', 950 },\n    { \"DejaVu Sans\", 13, \"Regular Class\", 'i', 950 },\n    { \"DejaVu Sans\", 13, \"Regular Class\", 'j', 950 },\n    { \"DejaVu Sans\", 10, \"Regular/Italic Class\", 0, 1100 },\n    { \"DejaVu Sans\", 12, \"Regular/Italic Class\", 0, 1050 },\n    { \"Georgia\", 10, \"\", 0, 1050 },\n    { \"Georgia\", 11, \"\", 0, 1100 },\n    { \"Georgia\", 12, \"\", 0, 1025 },\n    { \"Georgia\", 13, \"\", 0, 1050 },\n    { \"Georgia\", 16, \"\", 0, 1050 },\n    { \"Georgia\", 17, \"\", 0, 1030 },\n    { \"Liberation Sans\", 12, \"Regular Class\", 'm', 1100 },\n    { \"Lucida Grande\", 11, \"Regular Class\", 'm', 1100 },\n    { \"Microsoft Sans Serif\", 11, \"Regular Class\", 'm', 950 },\n    { \"Microsoft Sans Serif\", 12, \"Regular Class\", 'm', 1050 },\n    { \"Segoe UI\", 12, \"Regular Class\", 'H', 1050 },\n    { \"Segoe UI\", 12, \"Regular Class\", 'm', 1050 },\n    { \"Segoe UI\", 14, \"Regular Class\", 'm', 1050 },\n    { \"Tahoma\", 11, \"Regular Class\", 'i', 975 },\n    { \"Tahoma\", 11, \"Regular Class\", 'l', 975 },\n    { \"Tahoma\", 11, \"Regular Class\", 'j', 900 },\n    { \"Tahoma\", 11, \"Regular Class\", 'm', 918 },\n    { \"Verdana\", 10, \"Regular/Italic Class\", 0, 1100 },\n    { \"Verdana\", 12, \"Regular Class\", 'm', 975 },\n    { \"Verdana\", 12, \"Regular/Italic Class\", 0, 1050 },\n    { \"Verdana\", 13, \"Regular/Italic Class\", 'i', 950 },\n    { \"Verdana\", 13, \"Regular/Italic Class\", 'j', 950 },\n    { \"Verdana\", 13, \"Regular/Italic Class\", 'l', 950 },\n    { \"Verdana\", 16, \"Regular Class\", 0, 1050 },\n    { \"Verdana\", 9, \"Regular/Italic Class\", 0, 1050 },\n    { \"Times New Roman\", 16, \"Regular Class\", 'm', 918 },\n    { \"Trebuchet MS\", 11, \"Regular Class\", 'm', 800 },\n    { \"Trebuchet MS\", 12, \"Regular Class\", 'm', 800 },\n  };\n\n#else\n\n#define COMPATIBLE_WIDTHS_RULES_SIZE  1\n\n  static const SPH_TweakRule  COMPATIBLE_WIDTHS_Rules\n                              [COMPATIBLE_WIDTHS_RULES_SIZE] =\n  {\n    { \"-\", 0, \"\", 0 },\n  };\n\n\n#define X_SCALING_RULES_SIZE  1\n\n  static const SPH_ScaleRule  X_SCALING_Rules\n                              [X_SCALING_RULES_SIZE] =\n  {\n    { \"-\", 0, \"\", 0, 1000 },\n  };\n\n#endif /* FORCE_NATURAL_WIDTHS */\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  is_member_of_family_class( const FT_String*  detected_font_name,\n                             const FT_String*  rule_font_name )\n  {\n    FT_UInt  i, j;\n\n\n    /* Does font name match rule family? */\n    if ( strcmp( detected_font_name, rule_font_name ) == 0 )\n      return TRUE;\n\n    /* Is font name a wildcard \"\"? */\n    if ( strcmp( rule_font_name, \"\" ) == 0 )\n      return TRUE;\n\n    /* Is font name contained in a class list? */\n    for ( i = 0; i < FAMILY_CLASS_RULES_SIZE; i++ )\n    {\n      if ( strcmp( FAMILY_CLASS_Rules[i].name, rule_font_name ) == 0 )\n      {\n        for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ )\n        {\n          if ( strcmp( FAMILY_CLASS_Rules[i].member[j], \"\" ) == 0 )\n            continue;\n          if ( strcmp( FAMILY_CLASS_Rules[i].member[j],\n                       detected_font_name ) == 0 )\n            return TRUE;\n        }\n      }\n    }\n\n    return FALSE;\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  is_member_of_style_class( const FT_String*  detected_font_style,\n                            const FT_String*  rule_font_style )\n  {\n    FT_UInt  i, j;\n\n\n    /* Does font style match rule style? */\n    if ( strcmp( detected_font_style, rule_font_style ) == 0 )\n      return TRUE;\n\n    /* Is font style a wildcard \"\"? */\n    if ( strcmp( rule_font_style, \"\" ) == 0 )\n      return TRUE;\n\n    /* Is font style contained in a class list? */\n    for ( i = 0; i < STYLE_CLASS_RULES_SIZE; i++ )\n    {\n      if ( strcmp( STYLE_CLASS_Rules[i].name, rule_font_style ) == 0 )\n      {\n        for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ )\n        {\n          if ( strcmp( STYLE_CLASS_Rules[i].member[j], \"\" ) == 0 )\n            continue;\n          if ( strcmp( STYLE_CLASS_Rules[i].member[j],\n                       detected_font_style ) == 0 )\n            return TRUE;\n        }\n      }\n    }\n\n    return FALSE;\n  }\n\n\n  FT_LOCAL_DEF( FT_Bool )\n  sph_test_tweak( TT_Face               face,\n                  const FT_String*      family,\n                  FT_UInt               ppem,\n                  const FT_String*      style,\n                  FT_UInt               glyph_index,\n                  const SPH_TweakRule*  rule,\n                  FT_UInt               num_rules )\n  {\n    FT_UInt  i;\n\n\n    /* rule checks may be able to be optimized further */\n    for ( i = 0; i < num_rules; i++ )\n    {\n      if ( family                                                   &&\n           ( is_member_of_family_class ( family, rule[i].family ) ) )\n        if ( rule[i].ppem == 0    ||\n             rule[i].ppem == ppem )\n          if ( style                                             &&\n               is_member_of_style_class ( style, rule[i].style ) )\n            if ( rule[i].glyph == 0                                ||\n                 FT_Get_Char_Index( (FT_Face)face,\n                                    rule[i].glyph ) == glyph_index )\n        return TRUE;\n    }\n\n    return FALSE;\n  }\n\n\n  static FT_UInt\n  scale_test_tweak( TT_Face               face,\n                    const FT_String*      family,\n                    FT_UInt               ppem,\n                    const FT_String*      style,\n                    FT_UInt               glyph_index,\n                    const SPH_ScaleRule*  rule,\n                    FT_UInt               num_rules )\n  {\n    FT_UInt  i;\n\n\n    /* rule checks may be able to be optimized further */\n    for ( i = 0; i < num_rules; i++ )\n    {\n      if ( family                                                   &&\n           ( is_member_of_family_class ( family, rule[i].family ) ) )\n        if ( rule[i].ppem == 0    ||\n             rule[i].ppem == ppem )\n          if ( style                                            &&\n               is_member_of_style_class( style, rule[i].style ) )\n            if ( rule[i].glyph == 0                                ||\n                 FT_Get_Char_Index( (FT_Face)face,\n                                    rule[i].glyph ) == glyph_index )\n        return rule[i].scale;\n    }\n\n    return 1000;\n  }\n\n\n  FT_LOCAL_DEF( FT_UInt )\n  sph_test_tweak_x_scaling( TT_Face           face,\n                            const FT_String*  family,\n                            FT_UInt           ppem,\n                            const FT_String*  style,\n                            FT_UInt           glyph_index )\n  {\n    return scale_test_tweak( face, family, ppem, style, glyph_index,\n                             X_SCALING_Rules, X_SCALING_RULES_SIZE );\n  }\n\n\n#define TWEAK_RULES( x )                                       \\\n  if ( sph_test_tweak( face, family, ppem, style, glyph_index, \\\n                       x##_Rules, x##_RULES_SIZE ) )           \\\n    loader->exec->sph_tweak_flags |= SPH_TWEAK_##x;\n\n#define TWEAK_RULES_EXCEPTIONS( x )                                        \\\n  if ( sph_test_tweak( face, family, ppem, style, glyph_index,             \\\n                       x##_Rules_Exceptions, x##_RULES_EXCEPTIONS_SIZE ) ) \\\n    loader->exec->sph_tweak_flags &= ~SPH_TWEAK_##x;\n\n\n  FT_LOCAL_DEF( void )\n  sph_set_tweaks( TT_Loader  loader,\n                  FT_UInt    glyph_index )\n  {\n    TT_Face     face   = (TT_Face)loader->face;\n    FT_String*  family = face->root.family_name;\n    int         ppem   = loader->size->metrics.x_ppem;\n    FT_String*  style  = face->root.style_name;\n\n\n    /* don't apply rules if style isn't set */\n    if ( !face->root.style_name )\n      return;\n\n#ifdef SPH_DEBUG_MORE_VERBOSE\n    printf( \"%s,%d,%s,%c=%d \",\n            family, ppem, style, glyph_index, glyph_index );\n#endif\n\n    TWEAK_RULES( PIXEL_HINTING );\n\n    if ( loader->exec->sph_tweak_flags & SPH_TWEAK_PIXEL_HINTING )\n    {\n      loader->exec->ignore_x_mode = FALSE;\n      return;\n    }\n\n    TWEAK_RULES( ALLOW_X_DMOVE );\n    TWEAK_RULES( ALWAYS_DO_DELTAP );\n    TWEAK_RULES( ALWAYS_SKIP_DELTAP );\n    TWEAK_RULES( DEEMBOLDEN );\n    TWEAK_RULES( DO_SHPIX );\n    TWEAK_RULES( EMBOLDEN );\n    TWEAK_RULES( MIAP_HACK );\n    TWEAK_RULES( NORMAL_ROUND );\n    TWEAK_RULES( NO_ALIGNRP_AFTER_IUP );\n    TWEAK_RULES( NO_CALL_AFTER_IUP );\n    TWEAK_RULES( NO_DELTAP_AFTER_IUP );\n    TWEAK_RULES( RASTERIZER_35 );\n    TWEAK_RULES( SKIP_IUP );\n\n    TWEAK_RULES( SKIP_OFFPIXEL_Y_MOVES );\n    TWEAK_RULES_EXCEPTIONS( SKIP_OFFPIXEL_Y_MOVES );\n\n    TWEAK_RULES( SKIP_NONPIXEL_Y_MOVES_DELTAP );\n\n    TWEAK_RULES( SKIP_NONPIXEL_Y_MOVES );\n    TWEAK_RULES_EXCEPTIONS( SKIP_NONPIXEL_Y_MOVES );\n\n    TWEAK_RULES( ROUND_NONPIXEL_Y_MOVES );\n    TWEAK_RULES_EXCEPTIONS( ROUND_NONPIXEL_Y_MOVES );\n\n    if ( loader->exec->sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 )\n    {\n      if ( loader->exec->rasterizer_version != TT_INTERPRETER_VERSION_35 )\n      {\n        loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35;\n        loader->exec->size->cvt_ready    = -1;\n\n        tt_size_ready_bytecode(\n          loader->exec->size,\n          FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) );\n      }\n      else\n        loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35;\n    }\n    else\n    {\n      if ( loader->exec->rasterizer_version  !=\n           SPH_OPTION_SET_RASTERIZER_VERSION )\n      {\n        loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION;\n        loader->exec->size->cvt_ready    = -1;\n\n        tt_size_ready_bytecode(\n          loader->exec->size,\n          FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) );\n      }\n      else\n        loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION;\n    }\n\n    if ( IS_HINTED( loader->load_flags ) )\n    {\n      TWEAK_RULES( TIMES_NEW_ROMAN_HACK );\n      TWEAK_RULES( COURIER_NEW_2_HACK );\n    }\n\n    if ( sph_test_tweak( face, family, ppem, style, glyph_index,\n           COMPATIBILITY_MODE_Rules, COMPATIBILITY_MODE_RULES_SIZE ) )\n      loader->exec->face->sph_compatibility_mode = TRUE;\n\n\n    if ( IS_HINTED( loader->load_flags ) )\n    {\n      if ( sph_test_tweak( face, family, ppem, style, glyph_index,\n             COMPATIBLE_WIDTHS_Rules, COMPATIBLE_WIDTHS_RULES_SIZE ) )\n        loader->exec->compatible_widths |= TRUE;\n    }\n  }\n\n#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n  /* ANSI C doesn't like empty source files */\n  typedef int  _tt_subpix_dummy;\n\n#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/truetype/ttsubpix.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttsubpix.h                                                             */\n/*                                                                         */\n/*    TrueType Subpixel Hinting.                                           */\n/*                                                                         */\n/*  Copyright 2010-2013 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTSUBPIX_H__\n#define __TTSUBPIX_H__\n\n#include <ft2build.h>\n#include \"ttobjs.h\"\n#include \"ttinterp.h\"\n\n\nFT_BEGIN_HEADER\n\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ID flags to identify special functions at FDEF and runtime.           */\n  /*                                                                       */\n  /*                                                                       */\n#define SPH_FDEF_INLINE_DELTA_1       0x0000001\n#define SPH_FDEF_INLINE_DELTA_2       0x0000002\n#define SPH_FDEF_DIAGONAL_STROKE      0x0000004\n#define SPH_FDEF_VACUFORM_ROUND_1     0x0000008\n#define SPH_FDEF_TTFAUTOHINT_1        0x0000010\n#define SPH_FDEF_SPACING_1            0x0000020\n#define SPH_FDEF_SPACING_2            0x0000040\n#define SPH_FDEF_TYPEMAN_STROKES      0x0000080\n#define SPH_FDEF_TYPEMAN_DIAGENDCTRL  0x0000100\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Tweak flags that are set for each glyph by the below rules.           */\n  /*                                                                       */\n  /*                                                                       */\n#define SPH_TWEAK_ALLOW_X_DMOVE                   0x0000001\n#define SPH_TWEAK_ALWAYS_DO_DELTAP                0x0000002\n#define SPH_TWEAK_ALWAYS_SKIP_DELTAP              0x0000004\n#define SPH_TWEAK_COURIER_NEW_2_HACK              0x0000008\n#define SPH_TWEAK_DEEMBOLDEN                      0x0000010\n#define SPH_TWEAK_DO_SHPIX                        0x0000020\n#define SPH_TWEAK_EMBOLDEN                        0x0000040\n#define SPH_TWEAK_MIAP_HACK                       0x0000080\n#define SPH_TWEAK_NORMAL_ROUND                    0x0000100\n#define SPH_TWEAK_NO_ALIGNRP_AFTER_IUP            0x0000200\n#define SPH_TWEAK_NO_CALL_AFTER_IUP               0x0000400\n#define SPH_TWEAK_NO_DELTAP_AFTER_IUP             0x0000800\n#define SPH_TWEAK_PIXEL_HINTING                   0x0001000\n#define SPH_TWEAK_RASTERIZER_35                   0x0002000\n#define SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES          0x0004000\n#define SPH_TWEAK_SKIP_IUP                        0x0008000\n#define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES           0x0010000\n#define SPH_TWEAK_SKIP_OFFPIXEL_Y_MOVES           0x0020000\n#define SPH_TWEAK_TIMES_NEW_ROMAN_HACK            0x0040000\n#define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP    0x0080000\n\n\n  FT_LOCAL( FT_Bool )\n  sph_test_tweak( TT_Face               face,\n                  const FT_String*      family,\n                  FT_UInt               ppem,\n                  const FT_String*      style,\n                  FT_UInt               glyph_index,\n                  const SPH_TweakRule*  rule,\n                  FT_UInt               num_rules );\n\n  FT_LOCAL( FT_UInt )\n  sph_test_tweak_x_scaling( TT_Face           face,\n                            const FT_String*  family,\n                            FT_UInt           ppem,\n                            const FT_String*  style,\n                            FT_UInt           glyph_index );\n\n  FT_LOCAL( void )\n  sph_set_tweaks( TT_Loader  loader,\n                  FT_UInt    glyph_index );\n\n\n  /* These macros are defined absent a method for setting them */\n#define SPH_OPTION_BITMAP_WIDTHS           FALSE\n#define SPH_OPTION_SET_SUBPIXEL            TRUE\n#define SPH_OPTION_SET_GRAYSCALE           FALSE\n#define SPH_OPTION_SET_COMPATIBLE_WIDTHS   FALSE\n#define SPH_OPTION_SET_RASTERIZER_VERSION  38\n\n#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */\n\n\nFT_END_HEADER\n\n#endif /* __TTSUBPIX_H__ */\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1afm.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1afm.c                                                                */\n/*                                                                         */\n/*    AFM support for Type 1 fonts (body).                                 */\n/*                                                                         */\n/*  Copyright 1996-2011, 2013 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include \"t1afm.h\"\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n#include \"t1errors.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t1afm\n\n\n  FT_LOCAL_DEF( void )\n  T1_Done_Metrics( FT_Memory     memory,\n                   AFM_FontInfo  fi )\n  {\n    FT_FREE( fi->KernPairs );\n    fi->NumKernPair = 0;\n\n    FT_FREE( fi->TrackKerns );\n    fi->NumTrackKern = 0;\n\n    FT_FREE( fi );\n  }\n\n\n  /* read a glyph name and return the equivalent glyph index */\n  static FT_Int\n  t1_get_index( const char*  name,\n                FT_Offset    len,\n                void*        user_data )\n  {\n    T1_Font  type1 = (T1_Font)user_data;\n    FT_Int   n;\n\n\n    /* PS string/name length must be < 16-bit */\n    if ( len > 0xFFFFU )\n      return 0;\n\n    for ( n = 0; n < type1->num_glyphs; n++ )\n    {\n      char*  gname = (char*)type1->glyph_names[n];\n\n\n      if ( gname && gname[0] == name[0]        &&\n           ft_strlen( gname ) == len           &&\n           ft_strncmp( gname, name, len ) == 0 )\n        return n;\n    }\n\n    return 0;\n  }\n\n\n#undef  KERN_INDEX\n#define KERN_INDEX( g1, g2 )  ( ( (FT_ULong)(g1) << 16 ) | (g2) )\n\n\n  /* compare two kerning pairs */\n  FT_CALLBACK_DEF( int )\n  compare_kern_pairs( const void*  a,\n                      const void*  b )\n  {\n    AFM_KernPair  pair1 = (AFM_KernPair)a;\n    AFM_KernPair  pair2 = (AFM_KernPair)b;\n\n    FT_ULong  index1 = KERN_INDEX( pair1->index1, pair1->index2 );\n    FT_ULong  index2 = KERN_INDEX( pair2->index1, pair2->index2 );\n\n\n    if ( index1 > index2 )\n      return 1;\n    else if ( index1 < index2 )\n      return -1;\n    else\n      return 0;\n  }\n\n\n  /* parse a PFM file -- for now, only read the kerning pairs */\n  static FT_Error\n  T1_Read_PFM( FT_Face       t1_face,\n               FT_Stream     stream,\n               AFM_FontInfo  fi )\n  {\n    FT_Error      error  = FT_Err_Ok;\n    FT_Memory     memory = stream->memory;\n    FT_Byte*      start;\n    FT_Byte*      limit;\n    FT_Byte*      p;\n    AFM_KernPair  kp;\n    FT_Int        width_table_length;\n    FT_CharMap    oldcharmap;\n    FT_CharMap    charmap;\n    FT_Int        n;\n\n\n    start = (FT_Byte*)stream->cursor;\n    limit = (FT_Byte*)stream->limit;\n\n    /* Figure out how long the width table is.          */\n    /* This info is a little-endian short at offset 99. */\n    p = start + 99;\n    if ( p + 2 > limit )\n    {\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n    width_table_length = FT_PEEK_USHORT_LE( p );\n\n    p += 18 + width_table_length;\n    if ( p + 0x12 > limit || FT_PEEK_USHORT_LE( p ) < 0x12 )\n      /* extension table is probably optional */\n      goto Exit;\n\n    /* Kerning offset is 14 bytes from start of extensions table. */\n    p += 14;\n    p = start + FT_PEEK_ULONG_LE( p );\n\n    if ( p == start )\n      /* zero offset means no table */\n      goto Exit;\n\n    if ( p + 2 > limit )\n    {\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n\n    fi->NumKernPair = FT_PEEK_USHORT_LE( p );\n    p += 2;\n    if ( p + 4 * fi->NumKernPair > limit )\n    {\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n\n    /* Actually, kerning pairs are simply optional! */\n    if ( fi->NumKernPair == 0 )\n      goto Exit;\n\n    /* allocate the pairs */\n    if ( FT_QNEW_ARRAY( fi->KernPairs, fi->NumKernPair ) )\n      goto Exit;\n\n    /* now, read each kern pair */\n    kp             = fi->KernPairs;\n    limit          = p + 4 * fi->NumKernPair;\n\n    /* PFM kerning data are stored by encoding rather than glyph index, */\n    /* so find the PostScript charmap of this font and install it       */\n    /* temporarily.  If we find no PostScript charmap, then just use    */\n    /* the default and hope it is the right one.                        */\n    oldcharmap = t1_face->charmap;\n    charmap    = NULL;\n\n    for ( n = 0; n < t1_face->num_charmaps; n++ )\n    {\n      charmap = t1_face->charmaps[n];\n      /* check against PostScript pseudo platform */\n      if ( charmap->platform_id == 7 )\n      {\n        error = FT_Set_Charmap( t1_face, charmap );\n        if ( error )\n          goto Exit;\n        break;\n      }\n    }\n\n    /* Kerning info is stored as:             */\n    /*                                        */\n    /*   encoding of first glyph (1 byte)     */\n    /*   encoding of second glyph (1 byte)    */\n    /*   offset (little-endian short)         */\n    for ( ; p < limit ; p += 4 )\n    {\n      kp->index1 = FT_Get_Char_Index( t1_face, p[0] );\n      kp->index2 = FT_Get_Char_Index( t1_face, p[1] );\n\n      kp->x = (FT_Int)FT_PEEK_SHORT_LE(p + 2);\n      kp->y = 0;\n\n      kp++;\n    }\n\n    if ( oldcharmap != NULL )\n      error = FT_Set_Charmap( t1_face, oldcharmap );\n    if ( error )\n      goto Exit;\n\n    /* now, sort the kern pairs according to their glyph indices */\n    ft_qsort( fi->KernPairs, fi->NumKernPair, sizeof ( AFM_KernPairRec ),\n              compare_kern_pairs );\n\n  Exit:\n    if ( error )\n    {\n      FT_FREE( fi->KernPairs );\n      fi->NumKernPair = 0;\n    }\n\n    return error;\n  }\n\n\n  /* parse a metrics file -- either AFM or PFM depending on what */\n  /* it turns out to be                                          */\n  FT_LOCAL_DEF( FT_Error )\n  T1_Read_Metrics( FT_Face    t1_face,\n                   FT_Stream  stream )\n  {\n    PSAux_Service  psaux;\n    FT_Memory      memory  = stream->memory;\n    AFM_ParserRec  parser;\n    AFM_FontInfo   fi      = NULL;\n    FT_Error       error   = FT_ERR( Unknown_File_Format );\n    T1_Font        t1_font = &( (T1_Face)t1_face )->type1;\n\n\n    if ( FT_NEW( fi )                   ||\n         FT_FRAME_ENTER( stream->size ) )\n      goto Exit;\n\n    fi->FontBBox  = t1_font->font_bbox;\n    fi->Ascender  = t1_font->font_bbox.yMax;\n    fi->Descender = t1_font->font_bbox.yMin;\n\n    psaux = (PSAux_Service)( (T1_Face)t1_face )->psaux;\n    if ( psaux->afm_parser_funcs )\n    {\n      error = psaux->afm_parser_funcs->init( &parser,\n                                             stream->memory,\n                                             stream->cursor,\n                                             stream->limit );\n\n      if ( !error )\n      {\n        parser.FontInfo  = fi;\n        parser.get_index = t1_get_index;\n        parser.user_data = t1_font;\n\n        error = psaux->afm_parser_funcs->parse( &parser );\n        psaux->afm_parser_funcs->done( &parser );\n      }\n    }\n\n    if ( FT_ERR_EQ( error, Unknown_File_Format ) )\n    {\n      FT_Byte*  start = stream->cursor;\n\n\n      /* MS Windows allows versions up to 0x3FF without complaining */\n      if ( stream->size > 6                              &&\n           start[1] < 4                                  &&\n           FT_PEEK_ULONG_LE( start + 2 ) == stream->size )\n        error = T1_Read_PFM( t1_face, stream, fi );\n    }\n\n    if ( !error )\n    {\n      t1_font->font_bbox = fi->FontBBox;\n\n      t1_face->bbox.xMin =   fi->FontBBox.xMin            >> 16;\n      t1_face->bbox.yMin =   fi->FontBBox.yMin            >> 16;\n      /* no `U' suffix here to 0xFFFF! */\n      t1_face->bbox.xMax = ( fi->FontBBox.xMax + 0xFFFF ) >> 16;\n      t1_face->bbox.yMax = ( fi->FontBBox.yMax + 0xFFFF ) >> 16;\n\n      /* no `U' suffix here to 0x8000! */\n      t1_face->ascender  = (FT_Short)( ( fi->Ascender  + 0x8000 ) >> 16 );\n      t1_face->descender = (FT_Short)( ( fi->Descender + 0x8000 ) >> 16 );\n\n      if ( fi->NumKernPair )\n      {\n        t1_face->face_flags |= FT_FACE_FLAG_KERNING;\n        ( (T1_Face)t1_face )->afm_data = fi;\n        fi = NULL;\n      }\n    }\n\n    FT_FRAME_EXIT();\n\n  Exit:\n    if ( fi != NULL )\n      T1_Done_Metrics( memory, fi );\n\n    return error;\n  }\n\n\n  /* find the kerning for a given glyph pair */\n  FT_LOCAL_DEF( void )\n  T1_Get_Kerning( AFM_FontInfo  fi,\n                  FT_UInt       glyph1,\n                  FT_UInt       glyph2,\n                  FT_Vector*    kerning )\n  {\n    AFM_KernPair  min, mid, max;\n    FT_ULong      idx = KERN_INDEX( glyph1, glyph2 );\n\n\n    /* simple binary search */\n    min = fi->KernPairs;\n    max = min + fi->NumKernPair - 1;\n\n    while ( min <= max )\n    {\n      FT_ULong  midi;\n\n\n      mid  = min + ( max - min ) / 2;\n      midi = KERN_INDEX( mid->index1, mid->index2 );\n\n      if ( midi == idx )\n      {\n        kerning->x = mid->x;\n        kerning->y = mid->y;\n\n        return;\n      }\n\n      if ( midi < idx )\n        min = mid + 1;\n      else\n        max = mid - 1;\n    }\n\n    kerning->x = 0;\n    kerning->y = 0;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Get_Track_Kerning( FT_Face    face,\n                        FT_Fixed   ptsize,\n                        FT_Int     degree,\n                        FT_Fixed*  kerning )\n  {\n    AFM_FontInfo  fi = (AFM_FontInfo)( (T1_Face)face )->afm_data;\n    FT_Int        i;\n\n\n    if ( !fi )\n      return FT_THROW( Invalid_Argument );\n\n    for ( i = 0; i < fi->NumTrackKern; i++ )\n    {\n      AFM_TrackKern  tk = fi->TrackKerns + i;\n\n\n      if ( tk->degree != degree )\n        continue;\n\n      if ( ptsize < tk->min_ptsize )\n        *kerning = tk->min_kern;\n      else if ( ptsize > tk->max_ptsize )\n        *kerning = tk->max_kern;\n      else\n      {\n        *kerning = FT_MulDiv( ptsize - tk->min_ptsize,\n                              tk->max_kern - tk->min_kern,\n                              tk->max_ptsize - tk->min_ptsize ) +\n                   tk->min_kern;\n      }\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1afm.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1afm.h                                                                */\n/*                                                                         */\n/*    AFM support for Type 1 fonts (specification).                        */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2006 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1AFM_H__\n#define __T1AFM_H__\n\n#include <ft2build.h>\n#include \"t1objs.h\"\n#include FT_INTERNAL_TYPE1_TYPES_H\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error )\n  T1_Read_Metrics( FT_Face    face,\n                   FT_Stream  stream );\n\n  FT_LOCAL( void )\n  T1_Done_Metrics( FT_Memory     memory,\n                   AFM_FontInfo  fi );\n\n  FT_LOCAL( void )\n  T1_Get_Kerning( AFM_FontInfo  fi,\n                  FT_UInt       glyph1,\n                  FT_UInt       glyph2,\n                  FT_Vector*    kerning );\n\n  FT_LOCAL( FT_Error )\n  T1_Get_Track_Kerning( FT_Face    face,\n                        FT_Fixed   ptsize,\n                        FT_Int     degree,\n                        FT_Fixed*  kerning );\n\nFT_END_HEADER\n\n#endif /* __T1AFM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1driver.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1driver.c                                                             */\n/*                                                                         */\n/*    Type 1 driver interface (body).                                      */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013, 2014 by             */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include \"t1driver.h\"\n#include \"t1gload.h\"\n#include \"t1load.h\"\n\n#include \"t1errors.h\"\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n#include \"t1afm.h\"\n#endif\n\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n\n#include FT_SERVICE_MULTIPLE_MASTERS_H\n#include FT_SERVICE_GLYPH_DICT_H\n#include FT_SERVICE_XFREE86_NAME_H\n#include FT_SERVICE_POSTSCRIPT_NAME_H\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n#include FT_SERVICE_POSTSCRIPT_INFO_H\n#include FT_SERVICE_KERNING_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t1driver\n\n /*\n  *  GLYPH DICT SERVICE\n  *\n  */\n\n  static FT_Error\n  t1_get_glyph_name( T1_Face     face,\n                     FT_UInt     glyph_index,\n                     FT_Pointer  buffer,\n                     FT_UInt     buffer_max )\n  {\n    FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_UInt\n  t1_get_name_index( T1_Face     face,\n                     FT_String*  glyph_name )\n  {\n    FT_Int  i;\n\n\n    for ( i = 0; i < face->type1.num_glyphs; i++ )\n    {\n      FT_String*  gname = face->type1.glyph_names[i];\n\n\n      if ( !ft_strcmp( glyph_name, gname ) )\n        return (FT_UInt)i;\n    }\n\n    return 0;\n  }\n\n\n  static const FT_Service_GlyphDictRec  t1_service_glyph_dict =\n  {\n    (FT_GlyphDict_GetNameFunc)  t1_get_glyph_name,\n    (FT_GlyphDict_NameIndexFunc)t1_get_name_index\n  };\n\n\n  /*\n   *  POSTSCRIPT NAME SERVICE\n   *\n   */\n\n  static const char*\n  t1_get_ps_name( T1_Face  face )\n  {\n    return (const char*) face->type1.font_name;\n  }\n\n\n  static const FT_Service_PsFontNameRec  t1_service_ps_name =\n  {\n    (FT_PsName_GetFunc)t1_get_ps_name\n  };\n\n\n  /*\n   *  MULTIPLE MASTERS SERVICE\n   *\n   */\n\n#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT\n  static const FT_Service_MultiMastersRec  t1_service_multi_masters =\n  {\n    (FT_Get_MM_Func)        T1_Get_Multi_Master,\n    (FT_Set_MM_Design_Func) T1_Set_MM_Design,\n    (FT_Set_MM_Blend_Func)  T1_Set_MM_Blend,\n    (FT_Get_MM_Var_Func)    T1_Get_MM_Var,\n    (FT_Set_Var_Design_Func)T1_Set_Var_Design\n  };\n#endif\n\n\n  /*\n   *  POSTSCRIPT INFO SERVICE\n   *\n   */\n\n  static FT_Error\n  t1_ps_get_font_info( FT_Face          face,\n                       PS_FontInfoRec*  afont_info )\n  {\n    *afont_info = ((T1_Face)face)->type1.font_info;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  t1_ps_get_font_extra( FT_Face           face,\n                        PS_FontExtraRec*  afont_extra )\n  {\n    *afont_extra = ((T1_Face)face)->type1.font_extra;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Int\n  t1_ps_has_glyph_names( FT_Face  face )\n  {\n    FT_UNUSED( face );\n\n    return 1;\n  }\n\n\n  static FT_Error\n  t1_ps_get_font_private( FT_Face         face,\n                          PS_PrivateRec*  afont_private )\n  {\n    *afont_private = ((T1_Face)face)->type1.private_dict;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Long\n  t1_ps_get_font_value( FT_Face       face,\n                        PS_Dict_Keys  key,\n                        FT_UInt       idx,\n                        void         *value,\n                        FT_Long       value_len )\n  {\n    FT_Long  retval = -1;\n    T1_Face  t1face = (T1_Face)face;\n    T1_Font  type1  = &t1face->type1;\n\n\n    switch ( key )\n    {\n    case PS_DICT_FONT_TYPE:\n      retval = sizeof ( type1->font_type );\n      if ( value && value_len >= retval )\n        *((FT_Byte *)value) = type1->font_type;\n      break;\n\n    case PS_DICT_FONT_MATRIX:\n      if ( idx < sizeof ( type1->font_matrix ) /\n                   sizeof ( type1->font_matrix.xx ) )\n      {\n        FT_Fixed  val = 0;\n\n\n        retval = sizeof ( val );\n        if ( value && value_len >= retval )\n        {\n          switch ( idx )\n          {\n          case 0:\n            val = type1->font_matrix.xx;\n            break;\n          case 1:\n            val = type1->font_matrix.xy;\n            break;\n          case 2:\n            val = type1->font_matrix.yx;\n            break;\n          case 3:\n            val = type1->font_matrix.yy;\n            break;\n          }\n          *((FT_Fixed *)value) = val;\n        }\n      }\n      break;\n\n    case PS_DICT_FONT_BBOX:\n      if ( idx < sizeof ( type1->font_bbox ) /\n                   sizeof ( type1->font_bbox.xMin ) )\n      {\n        FT_Fixed val = 0;\n\n\n        retval = sizeof ( val );\n        if ( value && value_len >= retval )\n        {\n          switch ( idx )\n          {\n          case 0:\n            val = type1->font_bbox.xMin;\n            break;\n          case 1:\n            val = type1->font_bbox.yMin;\n            break;\n          case 2:\n            val = type1->font_bbox.xMax;\n            break;\n          case 3:\n            val = type1->font_bbox.yMax;\n            break;\n          }\n          *((FT_Fixed *)value) = val;\n        }\n      }\n      break;\n\n    case PS_DICT_PAINT_TYPE:\n      retval = sizeof ( type1->paint_type );\n      if ( value && value_len >= retval )\n        *((FT_Byte *)value) = type1->paint_type;\n      break;\n\n    case PS_DICT_FONT_NAME:\n      retval = (FT_Long)( ft_strlen( type1->font_name ) + 1 );\n      if ( value && value_len >= retval )\n        ft_memcpy( value, (void *)( type1->font_name ), retval );\n      break;\n\n    case PS_DICT_UNIQUE_ID:\n      retval = sizeof ( type1->private_dict.unique_id );\n      if ( value && value_len >= retval )\n        *((FT_Int *)value) = type1->private_dict.unique_id;\n      break;\n\n    case PS_DICT_NUM_CHAR_STRINGS:\n      retval = sizeof ( type1->num_glyphs );\n      if ( value && value_len >= retval )\n        *((FT_Int *)value) = type1->num_glyphs;\n      break;\n\n    case PS_DICT_CHAR_STRING_KEY:\n      if ( idx < (FT_UInt)type1->num_glyphs )\n      {\n        retval = (FT_Long)( ft_strlen( type1->glyph_names[idx] ) + 1 );\n        if ( value && value_len >= retval )\n        {\n          ft_memcpy( value, (void *)( type1->glyph_names[idx] ), retval );\n          ((FT_Char *)value)[retval - 1] = (FT_Char)'\\0';\n        }\n      }\n      break;\n\n    case PS_DICT_CHAR_STRING:\n      if ( idx < (FT_UInt)type1->num_glyphs )\n      {\n        retval = (FT_Long)( type1->charstrings_len[idx] + 1 );\n        if ( value && value_len >= retval )\n        {\n          ft_memcpy( value, (void *)( type1->charstrings[idx] ),\n                     retval - 1 );\n          ((FT_Char *)value)[retval - 1] = (FT_Char)'\\0';\n        }\n      }\n      break;\n\n    case PS_DICT_ENCODING_TYPE:\n      retval = sizeof ( type1->encoding_type );\n      if ( value && value_len >= retval )\n        *((T1_EncodingType *)value) = type1->encoding_type;\n      break;\n\n    case PS_DICT_ENCODING_ENTRY:\n      if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY &&\n           idx < (FT_UInt)type1->encoding.num_chars       )\n      {\n        retval = (FT_Long)( ft_strlen( type1->encoding.char_name[idx] ) + 1 );\n        if ( value && value_len >= retval )\n        {\n          ft_memcpy( value, (void *)( type1->encoding.char_name[idx] ),\n                     retval - 1 );\n          ((FT_Char *)value)[retval - 1] = (FT_Char)'\\0';\n        }\n      }\n      break;\n\n    case PS_DICT_NUM_SUBRS:\n      retval = sizeof ( type1->num_subrs );\n      if ( value && value_len >= retval )\n        *((FT_Int *)value) = type1->num_subrs;\n      break;\n\n    case PS_DICT_SUBR:\n      if ( idx < (FT_UInt)type1->num_subrs )\n      {\n        retval = (FT_Long)( type1->subrs_len[idx] + 1 );\n        if ( value && value_len >= retval )\n        {\n          ft_memcpy( value, (void *)( type1->subrs[idx] ), retval - 1 );\n          ((FT_Char *)value)[retval - 1] = (FT_Char)'\\0';\n        }\n      }\n      break;\n\n    case PS_DICT_STD_HW:\n      retval = sizeof ( type1->private_dict.standard_width[0] );\n      if ( value && value_len >= retval )\n        *((FT_UShort *)value) = type1->private_dict.standard_width[0];\n      break;\n\n    case PS_DICT_STD_VW:\n      retval = sizeof ( type1->private_dict.standard_height[0] );\n      if ( value && value_len >= retval )\n        *((FT_UShort *)value) = type1->private_dict.standard_height[0];\n      break;\n\n    case PS_DICT_NUM_BLUE_VALUES:\n      retval = sizeof ( type1->private_dict.num_blue_values );\n      if ( value && value_len >= retval )\n        *((FT_Byte *)value) = type1->private_dict.num_blue_values;\n      break;\n\n    case PS_DICT_BLUE_VALUE:\n      if ( idx < type1->private_dict.num_blue_values )\n      {\n        retval = sizeof ( type1->private_dict.blue_values[idx] );\n        if ( value && value_len >= retval )\n          *((FT_Short *)value) = type1->private_dict.blue_values[idx];\n      }\n      break;\n\n    case PS_DICT_BLUE_SCALE:\n      retval = sizeof ( type1->private_dict.blue_scale );\n      if ( value && value_len >= retval )\n        *((FT_Fixed *)value) = type1->private_dict.blue_scale;\n      break;\n\n    case PS_DICT_BLUE_FUZZ:\n      retval = sizeof ( type1->private_dict.blue_fuzz );\n      if ( value && value_len >= retval )\n        *((FT_Int *)value) = type1->private_dict.blue_fuzz;\n      break;\n\n    case PS_DICT_BLUE_SHIFT:\n      retval = sizeof ( type1->private_dict.blue_shift );\n      if ( value && value_len >= retval )\n        *((FT_Int *)value) = type1->private_dict.blue_shift;\n      break;\n\n    case PS_DICT_NUM_OTHER_BLUES:\n      retval = sizeof ( type1->private_dict.num_other_blues );\n      if ( value && value_len >= retval )\n        *((FT_Byte *)value) = type1->private_dict.num_other_blues;\n      break;\n\n    case PS_DICT_OTHER_BLUE:\n      if ( idx < type1->private_dict.num_other_blues )\n      {\n        retval = sizeof ( type1->private_dict.other_blues[idx] );\n        if ( value && value_len >= retval )\n          *((FT_Short *)value) = type1->private_dict.other_blues[idx];\n      }\n      break;\n\n    case PS_DICT_NUM_FAMILY_BLUES:\n      retval = sizeof ( type1->private_dict.num_family_blues );\n      if ( value && value_len >= retval )\n        *((FT_Byte *)value) = type1->private_dict.num_family_blues;\n      break;\n\n    case PS_DICT_FAMILY_BLUE:\n      if ( idx < type1->private_dict.num_family_blues )\n      {\n        retval = sizeof ( type1->private_dict.family_blues[idx] );\n        if ( value && value_len >= retval )\n          *((FT_Short *)value) = type1->private_dict.family_blues[idx];\n      }\n      break;\n\n    case PS_DICT_NUM_FAMILY_OTHER_BLUES:\n      retval = sizeof ( type1->private_dict.num_family_other_blues );\n      if ( value && value_len >= retval )\n        *((FT_Byte *)value) = type1->private_dict.num_family_other_blues;\n      break;\n\n    case PS_DICT_FAMILY_OTHER_BLUE:\n      if ( idx < type1->private_dict.num_family_other_blues )\n      {\n        retval = sizeof ( type1->private_dict.family_other_blues[idx] );\n        if ( value && value_len >= retval )\n          *((FT_Short *)value) = type1->private_dict.family_other_blues[idx];\n      }\n      break;\n\n    case PS_DICT_NUM_STEM_SNAP_H:\n      retval = sizeof ( type1->private_dict.num_snap_widths );\n      if ( value && value_len >= retval )\n        *((FT_Byte *)value) = type1->private_dict.num_snap_widths;\n      break;\n\n    case PS_DICT_STEM_SNAP_H:\n      if ( idx < type1->private_dict.num_snap_widths )\n      {\n        retval = sizeof ( type1->private_dict.snap_widths[idx] );\n        if ( value && value_len >= retval )\n          *((FT_Short *)value) = type1->private_dict.snap_widths[idx];\n      }\n      break;\n\n    case PS_DICT_NUM_STEM_SNAP_V:\n      retval = sizeof ( type1->private_dict.num_snap_heights );\n      if ( value && value_len >= retval )\n        *((FT_Byte *)value) = type1->private_dict.num_snap_heights;\n      break;\n\n    case PS_DICT_STEM_SNAP_V:\n      if ( idx < type1->private_dict.num_snap_heights )\n      {\n        retval = sizeof ( type1->private_dict.snap_heights[idx] );\n        if ( value && value_len >= retval )\n          *((FT_Short *)value) = type1->private_dict.snap_heights[idx];\n      }\n      break;\n\n    case PS_DICT_RND_STEM_UP:\n      retval = sizeof ( type1->private_dict.round_stem_up );\n      if ( value && value_len >= retval )\n        *((FT_Bool *)value) = type1->private_dict.round_stem_up;\n      break;\n\n    case PS_DICT_FORCE_BOLD:\n      retval = sizeof ( type1->private_dict.force_bold );\n      if ( value && value_len >= retval )\n        *((FT_Bool *)value) = type1->private_dict.force_bold;\n      break;\n\n    case PS_DICT_MIN_FEATURE:\n      if ( idx < sizeof ( type1->private_dict.min_feature ) /\n                   sizeof ( type1->private_dict.min_feature[0] ) )\n      {\n        retval = sizeof ( type1->private_dict.min_feature[idx] );\n        if ( value && value_len >= retval )\n          *((FT_Short *)value) = type1->private_dict.min_feature[idx];\n      }\n      break;\n\n    case PS_DICT_LEN_IV:\n      retval = sizeof ( type1->private_dict.lenIV );\n      if ( value && value_len >= retval )\n        *((FT_Int *)value) = type1->private_dict.lenIV;\n      break;\n\n    case PS_DICT_PASSWORD:\n      retval = sizeof ( type1->private_dict.password );\n      if ( value && value_len >= retval )\n        *((FT_Long *)value) = type1->private_dict.password;\n      break;\n\n    case PS_DICT_LANGUAGE_GROUP:\n      retval = sizeof ( type1->private_dict.language_group );\n      if ( value && value_len >= retval )\n        *((FT_Long *)value) = type1->private_dict.language_group;\n      break;\n\n    case PS_DICT_IS_FIXED_PITCH:\n      retval = sizeof ( type1->font_info.is_fixed_pitch );\n      if ( value && value_len >= retval )\n        *((FT_Bool *)value) = type1->font_info.is_fixed_pitch;\n      break;\n\n    case PS_DICT_UNDERLINE_POSITION:\n      retval = sizeof ( type1->font_info.underline_position );\n      if ( value && value_len >= retval )\n        *((FT_Short *)value) = type1->font_info.underline_position;\n      break;\n\n    case PS_DICT_UNDERLINE_THICKNESS:\n      retval = sizeof ( type1->font_info.underline_thickness );\n      if ( value && value_len >= retval )\n        *((FT_UShort *)value) = type1->font_info.underline_thickness;\n      break;\n\n    case PS_DICT_FS_TYPE:\n      retval = sizeof ( type1->font_extra.fs_type );\n      if ( value && value_len >= retval )\n        *((FT_UShort *)value) = type1->font_extra.fs_type;\n      break;\n\n    case PS_DICT_VERSION:\n      retval = (FT_Long)( ft_strlen( type1->font_info.version ) + 1 );\n      if ( value && value_len >= retval )\n        ft_memcpy( value, (void *)( type1->font_info.version ), retval );\n      break;\n\n    case PS_DICT_NOTICE:\n      retval = (FT_Long)( ft_strlen( type1->font_info.notice ) + 1 );\n      if ( value && value_len >= retval )\n        ft_memcpy( value, (void *)( type1->font_info.notice ), retval );\n      break;\n\n    case PS_DICT_FULL_NAME:\n      retval = (FT_Long)( ft_strlen( type1->font_info.full_name ) + 1 );\n      if ( value && value_len >= retval )\n        ft_memcpy( value, (void *)( type1->font_info.full_name ), retval );\n      break;\n\n    case PS_DICT_FAMILY_NAME:\n      retval = (FT_Long)( ft_strlen( type1->font_info.family_name ) + 1 );\n      if ( value && value_len >= retval )\n        ft_memcpy( value, (void *)( type1->font_info.family_name ), retval );\n      break;\n\n    case PS_DICT_WEIGHT:\n      retval = (FT_Long)( ft_strlen( type1->font_info.weight ) + 1 );\n      if ( value && value_len >= retval )\n        ft_memcpy( value, (void *)( type1->font_info.weight ), retval );\n      break;\n\n    case PS_DICT_ITALIC_ANGLE:\n      retval = sizeof ( type1->font_info.italic_angle );\n      if ( value && value_len >= retval )\n        *((FT_Long *)value) = type1->font_info.italic_angle;\n      break;\n    }\n\n    return retval;\n  }\n\n\n  static const FT_Service_PsInfoRec  t1_service_ps_info =\n  {\n    (PS_GetFontInfoFunc)   t1_ps_get_font_info,\n    (PS_GetFontExtraFunc)  t1_ps_get_font_extra,\n    (PS_HasGlyphNamesFunc) t1_ps_has_glyph_names,\n    (PS_GetFontPrivateFunc)t1_ps_get_font_private,\n    (PS_GetFontValueFunc)  t1_ps_get_font_value,\n  };\n\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n  static const FT_Service_KerningRec  t1_service_kerning =\n  {\n    T1_Get_Track_Kerning,\n  };\n#endif\n\n\n  /*\n   *  SERVICE LIST\n   *\n   */\n\n  static const FT_ServiceDescRec  t1_services[] =\n  {\n    { FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &t1_service_ps_name },\n    { FT_SERVICE_ID_GLYPH_DICT,           &t1_service_glyph_dict },\n    { FT_SERVICE_ID_XF86_NAME,            FT_XF86_FORMAT_TYPE_1 },\n    { FT_SERVICE_ID_POSTSCRIPT_INFO,      &t1_service_ps_info },\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n    { FT_SERVICE_ID_KERNING,              &t1_service_kerning },\n#endif\n\n#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT\n    { FT_SERVICE_ID_MULTI_MASTERS,        &t1_service_multi_masters },\n#endif\n    { NULL, NULL }\n  };\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  Get_Interface( FT_Module         module,\n                 const FT_String*  t1_interface )\n  {\n    FT_UNUSED( module );\n\n    return ft_service_list_lookup( t1_services, t1_interface );\n  }\n\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    Get_Kerning                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A driver method used to return the kerning vector between two      */\n  /*    glyphs of the same face.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: A handle to the source face object.                 */\n  /*                                                                       */\n  /*    left_glyph  :: The index of the left glyph in the kern pair.       */\n  /*                                                                       */\n  /*    right_glyph :: The index of the right glyph in the kern pair.      */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    kerning     :: The kerning vector.  This is in font units for      */\n  /*                   scalable formats, and in pixels for fixed-sizes     */\n  /*                   formats.                                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only horizontal layouts (left-to-right & right-to-left) are        */\n  /*    supported by this function.  Other layouts, or more sophisticated  */\n  /*    kernings are out of scope of this method (the basic driver         */\n  /*    interface is meant to be simple).                                  */\n  /*                                                                       */\n  /*    They can be implemented by format-specific interfaces.             */\n  /*                                                                       */\n  static FT_Error\n  Get_Kerning( FT_Face     t1face,        /* T1_Face */\n               FT_UInt     left_glyph,\n               FT_UInt     right_glyph,\n               FT_Vector*  kerning )\n  {\n    T1_Face  face = (T1_Face)t1face;\n\n\n    kerning->x = 0;\n    kerning->y = 0;\n\n    if ( face->afm_data )\n      T1_Get_Kerning( (AFM_FontInfo)face->afm_data,\n                      left_glyph,\n                      right_glyph,\n                      kerning );\n\n    return FT_Err_Ok;\n  }\n\n\n#endif /* T1_CONFIG_OPTION_NO_AFM */\n\n\n  FT_CALLBACK_TABLE_DEF\n  const FT_Driver_ClassRec  t1_driver_class =\n  {\n    {\n      FT_MODULE_FONT_DRIVER       |\n      FT_MODULE_DRIVER_SCALABLE   |\n      FT_MODULE_DRIVER_HAS_HINTER,\n\n      sizeof ( FT_DriverRec ),\n\n      \"type1\",\n      0x10000L,\n      0x20000L,\n\n      0,   /* format interface */\n\n      T1_Driver_Init,\n      T1_Driver_Done,\n      Get_Interface,\n    },\n\n    sizeof ( T1_FaceRec ),\n    sizeof ( T1_SizeRec ),\n    sizeof ( T1_GlyphSlotRec ),\n\n    T1_Face_Init,\n    T1_Face_Done,\n    T1_Size_Init,\n    T1_Size_Done,\n    T1_GlyphSlot_Init,\n    T1_GlyphSlot_Done,\n\n    T1_Load_Glyph,\n\n#ifdef T1_CONFIG_OPTION_NO_AFM\n    0,                     /* FT_Face_GetKerningFunc */\n    0,                     /* FT_Face_AttachFunc     */\n#else\n    Get_Kerning,\n    T1_Read_Metrics,\n#endif\n    T1_Get_Advances,\n    T1_Size_Request,\n    0                      /* FT_Size_SelectFunc     */\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1driver.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1driver.h                                                             */\n/*                                                                         */\n/*    High-level Type 1 driver interface (specification).                  */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002 by                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1DRIVER_H__\n#define __T1DRIVER_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n\n  FT_EXPORT_VAR( const FT_Driver_ClassRec )  t1_driver_class;\n\n\nFT_END_HEADER\n\n#endif /* __T1DRIVER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1errors.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1errors.h                                                             */\n/*                                                                         */\n/*    Type 1 error codes (specification only).                             */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the Type 1 error enumeration constants.   */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __T1ERRORS_H__\n#define __T1ERRORS_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  T1_Err_\n#define FT_ERR_BASE    FT_Mod_Err_Type1\n\n#include FT_ERRORS_H\n\n#endif /* __T1ERRORS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1gload.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1gload.c                                                              */\n/*                                                                         */\n/*    Type 1 Glyph Loader (body).                                          */\n/*                                                                         */\n/*  Copyright 1996-2006, 2008-2010, 2013, 2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include \"t1gload.h\"\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_OUTLINE_H\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\n#include \"t1errors.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t1gload\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /**********                                                      *********/\n  /**********            COMPUTE THE MAXIMUM ADVANCE WIDTH         *********/\n  /**********                                                      *********/\n  /**********    The following code is in charge of computing      *********/\n  /**********    the maximum advance width of the font.  It        *********/\n  /**********    quickly processes each glyph charstring to        *********/\n  /**********    extract the value from either a `sbw' or `seac'   *********/\n  /**********    operator.                                         *********/\n  /**********                                                      *********/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Parse_Glyph_And_Get_Char_String( T1_Decoder  decoder,\n                                      FT_UInt     glyph_index,\n                                      FT_Data*    char_string )\n  {\n    T1_Face   face  = (T1_Face)decoder->builder.face;\n    T1_Font   type1 = &face->type1;\n    FT_Error  error = FT_Err_Ok;\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    FT_Incremental_InterfaceRec *inc =\n                      face->root.internal->incremental_interface;\n#endif\n\n\n    decoder->font_matrix = type1->font_matrix;\n    decoder->font_offset = type1->font_offset;\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n    /* For incremental fonts get the character data using the */\n    /* callback function.                                     */\n    if ( inc )\n      error = inc->funcs->get_glyph_data( inc->object,\n                                          glyph_index, char_string );\n    else\n\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n    /* For ordinary fonts get the character data stored in the face record. */\n    {\n      char_string->pointer = type1->charstrings[glyph_index];\n      char_string->length  = (FT_Int)type1->charstrings_len[glyph_index];\n    }\n\n    if ( !error )\n      error = decoder->funcs.parse_charstrings(\n                decoder, (FT_Byte*)char_string->pointer,\n                char_string->length );\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n    /* Incremental fonts can optionally override the metrics. */\n    if ( !error && inc && inc->funcs->get_glyph_metrics )\n    {\n      FT_Incremental_MetricsRec  metrics;\n\n\n      metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x );\n      metrics.bearing_y = 0;\n      metrics.advance   = FIXED_TO_INT( decoder->builder.advance.x );\n      metrics.advance_v = FIXED_TO_INT( decoder->builder.advance.y );\n\n      error = inc->funcs->get_glyph_metrics( inc->object,\n                                             glyph_index, FALSE, &metrics );\n\n      decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x );\n      decoder->builder.advance.x      = INT_TO_FIXED( metrics.advance );\n      decoder->builder.advance.y      = INT_TO_FIXED( metrics.advance_v );\n    }\n\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n    return error;\n  }\n\n\n  FT_CALLBACK_DEF( FT_Error )\n  T1_Parse_Glyph( T1_Decoder  decoder,\n                  FT_UInt     glyph_index )\n  {\n    FT_Data   glyph_data;\n    FT_Error  error = T1_Parse_Glyph_And_Get_Char_String(\n                        decoder, glyph_index, &glyph_data );\n\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n\n    if ( !error )\n    {\n      T1_Face  face = (T1_Face)decoder->builder.face;\n\n\n      if ( face->root.internal->incremental_interface )\n        face->root.internal->incremental_interface->funcs->free_glyph_data(\n          face->root.internal->incremental_interface->object,\n          &glyph_data );\n    }\n\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Compute_Max_Advance( T1_Face  face,\n                          FT_Pos*  max_advance )\n  {\n    FT_Error       error;\n    T1_DecoderRec  decoder;\n    FT_Int         glyph_index;\n    T1_Font        type1 = &face->type1;\n    PSAux_Service  psaux = (PSAux_Service)face->psaux;\n\n\n    FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );\n\n    *max_advance = 0;\n\n    /* initialize load decoder */\n    error = psaux->t1_decoder_funcs->init( &decoder,\n                                           (FT_Face)face,\n                                           0, /* size       */\n                                           0, /* glyph slot */\n                                           (FT_Byte**)type1->glyph_names,\n                                           face->blend,\n                                           0,\n                                           FT_RENDER_MODE_NORMAL,\n                                           T1_Parse_Glyph );\n    if ( error )\n      return error;\n\n    decoder.builder.metrics_only = 1;\n    decoder.builder.load_points  = 0;\n\n    decoder.num_subrs     = type1->num_subrs;\n    decoder.subrs         = type1->subrs;\n    decoder.subrs_len     = type1->subrs_len;\n\n    decoder.buildchar     = face->buildchar;\n    decoder.len_buildchar = face->len_buildchar;\n\n    *max_advance = 0;\n\n    /* for each glyph, parse the glyph charstring and extract */\n    /* the advance width                                      */\n    for ( glyph_index = 0; glyph_index < type1->num_glyphs; glyph_index++ )\n    {\n      /* now get load the unscaled outline */\n      (void)T1_Parse_Glyph( &decoder, glyph_index );\n      if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance )\n        *max_advance = decoder.builder.advance.x;\n\n      /* ignore the error if one occurred - skip to next glyph */\n    }\n\n    psaux->t1_decoder_funcs->done( &decoder );\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Get_Advances( FT_Face    t1face,        /* T1_Face */\n                   FT_UInt    first,\n                   FT_UInt    count,\n                   FT_Int32   load_flags,\n                   FT_Fixed*  advances )\n  {\n    T1_Face        face  = (T1_Face)t1face;\n    T1_DecoderRec  decoder;\n    T1_Font        type1 = &face->type1;\n    PSAux_Service  psaux = (PSAux_Service)face->psaux;\n    FT_UInt        nn;\n    FT_Error       error;\n\n\n    if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )\n    {\n      for ( nn = 0; nn < count; nn++ )\n        advances[nn] = 0;\n\n      return FT_Err_Ok;\n    }\n\n    error = psaux->t1_decoder_funcs->init( &decoder,\n                                           (FT_Face)face,\n                                           0, /* size       */\n                                           0, /* glyph slot */\n                                           (FT_Byte**)type1->glyph_names,\n                                           face->blend,\n                                           0,\n                                           FT_RENDER_MODE_NORMAL,\n                                           T1_Parse_Glyph );\n    if ( error )\n      return error;\n\n    decoder.builder.metrics_only = 1;\n    decoder.builder.load_points  = 0;\n\n    decoder.num_subrs = type1->num_subrs;\n    decoder.subrs     = type1->subrs;\n    decoder.subrs_len = type1->subrs_len;\n\n    decoder.buildchar     = face->buildchar;\n    decoder.len_buildchar = face->len_buildchar;\n\n    for ( nn = 0; nn < count; nn++ )\n    {\n      error = T1_Parse_Glyph( &decoder, first + nn );\n      if ( !error )\n        advances[nn] = FIXED_TO_INT( decoder.builder.advance.x );\n      else\n        advances[nn] = 0;\n    }\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Load_Glyph( FT_GlyphSlot  t1glyph,          /* T1_GlyphSlot */\n                 FT_Size       t1size,           /* T1_Size      */\n                 FT_UInt       glyph_index,\n                 FT_Int32      load_flags )\n  {\n    T1_GlyphSlot            glyph = (T1_GlyphSlot)t1glyph;\n    FT_Error                error;\n    T1_DecoderRec           decoder;\n    T1_Face                 face = (T1_Face)t1glyph->face;\n    FT_Bool                 hinting;\n    T1_Font                 type1         = &face->type1;\n    PSAux_Service           psaux         = (PSAux_Service)face->psaux;\n    const T1_Decoder_Funcs  decoder_funcs = psaux->t1_decoder_funcs;\n\n    FT_Matrix               font_matrix;\n    FT_Vector               font_offset;\n    FT_Data                 glyph_data;\n    FT_Bool                 must_finish_decoder = FALSE;\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    FT_Bool                 glyph_data_loaded = 0;\n#endif\n\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    if ( glyph_index >= (FT_UInt)face->root.num_glyphs &&\n         !face->root.internal->incremental_interface   )\n#else\n    if ( glyph_index >= (FT_UInt)face->root.num_glyphs )\n#endif /* FT_CONFIG_OPTION_INCREMENTAL */\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    FT_TRACE1(( \"T1_Load_Glyph: glyph index %d\\n\", glyph_index ));\n\n    FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );\n\n    if ( load_flags & FT_LOAD_NO_RECURSE )\n      load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;\n\n    if ( t1size )\n    {\n      glyph->x_scale = t1size->metrics.x_scale;\n      glyph->y_scale = t1size->metrics.y_scale;\n    }\n    else\n    {\n      glyph->x_scale = 0x10000L;\n      glyph->y_scale = 0x10000L;\n    }\n\n    t1glyph->outline.n_points   = 0;\n    t1glyph->outline.n_contours = 0;\n\n    hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE   ) == 0 &&\n                       ( load_flags & FT_LOAD_NO_HINTING ) == 0 );\n\n    t1glyph->format = FT_GLYPH_FORMAT_OUTLINE;\n\n    error = decoder_funcs->init( &decoder,\n                                 t1glyph->face,\n                                 t1size,\n                                 t1glyph,\n                                 (FT_Byte**)type1->glyph_names,\n                                 face->blend,\n                                 FT_BOOL( hinting ),\n                                 FT_LOAD_TARGET_MODE( load_flags ),\n                                 T1_Parse_Glyph );\n    if ( error )\n      goto Exit;\n\n    must_finish_decoder = TRUE;\n\n    decoder.builder.no_recurse = FT_BOOL(\n                                   ( load_flags & FT_LOAD_NO_RECURSE ) != 0 );\n\n    decoder.num_subrs     = type1->num_subrs;\n    decoder.subrs         = type1->subrs;\n    decoder.subrs_len     = type1->subrs_len;\n\n    decoder.buildchar     = face->buildchar;\n    decoder.len_buildchar = face->len_buildchar;\n\n    /* now load the unscaled outline */\n    error = T1_Parse_Glyph_And_Get_Char_String( &decoder, glyph_index,\n                                                &glyph_data );\n    if ( error )\n      goto Exit;\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    glyph_data_loaded = 1;\n#endif\n\n    font_matrix = decoder.font_matrix;\n    font_offset = decoder.font_offset;\n\n    /* save new glyph tables */\n    decoder_funcs->done( &decoder );\n\n    must_finish_decoder = FALSE;\n\n    /* now, set the metrics -- this is rather simple, as   */\n    /* the left side bearing is the xMin, and the top side */\n    /* bearing the yMax                                    */\n    if ( !error )\n    {\n      t1glyph->outline.flags &= FT_OUTLINE_OWNER;\n      t1glyph->outline.flags |= FT_OUTLINE_REVERSE_FILL;\n\n      /* for composite glyphs, return only left side bearing and */\n      /* advance width                                           */\n      if ( load_flags & FT_LOAD_NO_RECURSE )\n      {\n        FT_Slot_Internal  internal = t1glyph->internal;\n\n\n        t1glyph->metrics.horiBearingX =\n          FIXED_TO_INT( decoder.builder.left_bearing.x );\n        t1glyph->metrics.horiAdvance  =\n          FIXED_TO_INT( decoder.builder.advance.x );\n\n        internal->glyph_matrix      = font_matrix;\n        internal->glyph_delta       = font_offset;\n        internal->glyph_transformed = 1;\n      }\n      else\n      {\n        FT_BBox            cbox;\n        FT_Glyph_Metrics*  metrics = &t1glyph->metrics;\n        FT_Vector          advance;\n\n\n        /* copy the _unscaled_ advance width */\n        metrics->horiAdvance =\n          FIXED_TO_INT( decoder.builder.advance.x );\n        t1glyph->linearHoriAdvance =\n          FIXED_TO_INT( decoder.builder.advance.x );\n        t1glyph->internal->glyph_transformed = 0;\n\n        if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )\n        {\n          /* make up vertical ones */\n          metrics->vertAdvance = ( face->type1.font_bbox.yMax -\n                                   face->type1.font_bbox.yMin ) >> 16;\n          t1glyph->linearVertAdvance = metrics->vertAdvance;\n        }\n        else\n        {\n          metrics->vertAdvance =\n            FIXED_TO_INT( decoder.builder.advance.y );\n          t1glyph->linearVertAdvance =\n            FIXED_TO_INT( decoder.builder.advance.y );\n        }\n\n        t1glyph->format = FT_GLYPH_FORMAT_OUTLINE;\n\n        if ( t1size && t1size->metrics.y_ppem < 24 )\n          t1glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;\n\n#if 1\n        /* apply the font matrix, if any */\n        if ( font_matrix.xx != 0x10000L || font_matrix.yy != font_matrix.xx ||\n             font_matrix.xy != 0        || font_matrix.yx != 0              )\n          FT_Outline_Transform( &t1glyph->outline, &font_matrix );\n\n        if ( font_offset.x || font_offset.y )\n          FT_Outline_Translate( &t1glyph->outline,\n                                font_offset.x,\n                                font_offset.y );\n\n        advance.x = metrics->horiAdvance;\n        advance.y = 0;\n        FT_Vector_Transform( &advance, &font_matrix );\n        metrics->horiAdvance = advance.x + font_offset.x;\n        advance.x = 0;\n        advance.y = metrics->vertAdvance;\n        FT_Vector_Transform( &advance, &font_matrix );\n        metrics->vertAdvance = advance.y + font_offset.y;\n#endif\n\n        if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )\n        {\n          /* scale the outline and the metrics */\n          FT_Int       n;\n          FT_Outline*  cur = decoder.builder.base;\n          FT_Vector*   vec = cur->points;\n          FT_Fixed     x_scale = glyph->x_scale;\n          FT_Fixed     y_scale = glyph->y_scale;\n\n\n          /* First of all, scale the points, if we are not hinting */\n          if ( !hinting || ! decoder.builder.hints_funcs )\n            for ( n = cur->n_points; n > 0; n--, vec++ )\n            {\n              vec->x = FT_MulFix( vec->x, x_scale );\n              vec->y = FT_MulFix( vec->y, y_scale );\n            }\n\n          /* Then scale the metrics */\n          metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale );\n          metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, y_scale );\n        }\n\n        /* compute the other metrics */\n        FT_Outline_Get_CBox( &t1glyph->outline, &cbox );\n\n        metrics->width  = cbox.xMax - cbox.xMin;\n        metrics->height = cbox.yMax - cbox.yMin;\n\n        metrics->horiBearingX = cbox.xMin;\n        metrics->horiBearingY = cbox.yMax;\n\n        if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )\n        {\n          /* make up vertical ones */\n          ft_synthesize_vertical_metrics( metrics,\n                                          metrics->vertAdvance );\n        }\n      }\n\n      /* Set control data to the glyph charstrings.  Note that this is */\n      /* _not_ zero-terminated.                                        */\n      t1glyph->control_data = (FT_Byte*)glyph_data.pointer;\n      t1glyph->control_len  = glyph_data.length;\n    }\n\n\n  Exit:\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n    if ( glyph_data_loaded && face->root.internal->incremental_interface )\n    {\n      face->root.internal->incremental_interface->funcs->free_glyph_data(\n        face->root.internal->incremental_interface->object,\n        &glyph_data );\n\n      /* Set the control data to null - it is no longer available if   */\n      /* loaded incrementally.                                         */\n      t1glyph->control_data = 0;\n      t1glyph->control_len  = 0;\n    }\n#endif\n\n    if ( must_finish_decoder )\n      decoder_funcs->done( &decoder );\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1gload.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1gload.h                                                              */\n/*                                                                         */\n/*    Type 1 Glyph Loader (specification).                                 */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2008, 2011 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1GLOAD_H__\n#define __T1GLOAD_H__\n\n\n#include <ft2build.h>\n#include \"t1objs.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  FT_LOCAL( FT_Error )\n  T1_Compute_Max_Advance( T1_Face  face,\n                          FT_Pos*  max_advance );\n\n  FT_LOCAL( FT_Error )\n  T1_Get_Advances( FT_Face    face,\n                   FT_UInt    first,\n                   FT_UInt    count,\n                   FT_Int32   load_flags,\n                   FT_Fixed*  advances );\n\n  FT_LOCAL( FT_Error )\n  T1_Load_Glyph( FT_GlyphSlot  glyph,\n                 FT_Size       size,\n                 FT_UInt       glyph_index,\n                 FT_Int32      load_flags );\n\n\nFT_END_HEADER\n\n#endif /* __T1GLOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1load.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1load.c                                                               */\n/*                                                                         */\n/*    Type 1 font loader (body).                                           */\n/*                                                                         */\n/*  Copyright 1996-2014 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This is the new and improved Type 1 data loader for FreeType 2.  The  */\n  /* old loader has several problems: it is slow, complex, difficult to    */\n  /* maintain, and contains incredible hacks to make it accept some        */\n  /* ill-formed Type 1 fonts without hiccup-ing.  Moreover, about 5% of    */\n  /* the Type 1 fonts on my machine still aren't loaded correctly by it.   */\n  /*                                                                       */\n  /* This version is much simpler, much faster and also easier to read and */\n  /* maintain by a great order of magnitude.  The idea behind it is to     */\n  /* _not_ try to read the Type 1 token stream with a state machine (i.e.  */\n  /* a Postscript-like interpreter) but rather to perform simple pattern   */\n  /* matching.                                                             */\n  /*                                                                       */\n  /* Indeed, nearly all data definitions follow a simple pattern like      */\n  /*                                                                       */\n  /*  ... /Field <data> ...                                                */\n  /*                                                                       */\n  /* where <data> can be a number, a boolean, a string, or an array of     */\n  /* numbers.  There are a few exceptions, namely the encoding, font name, */\n  /* charstrings, and subrs; they are handled with a special pattern       */\n  /* matching routine.                                                     */\n  /*                                                                       */\n  /* All other common cases are handled very simply.  The matching rules   */\n  /* are defined in the file `t1tokens.h' through the use of several       */\n  /* macros calls PARSE_XXX.  This file is included twice here; the first  */\n  /* time to generate parsing callback functions, the second time to       */\n  /* generate a table of keywords (with pointers to the associated         */\n  /* callback functions).                                                  */\n  /*                                                                       */\n  /* The function `parse_dict' simply scans *linearly* a given dictionary  */\n  /* (either the top-level or private one) and calls the appropriate       */\n  /* callback when it encounters an immediate keyword.                     */\n  /*                                                                       */\n  /* This is by far the fastest way one can find to parse and read all     */\n  /* data.                                                                 */\n  /*                                                                       */\n  /* This led to tremendous code size reduction.  Note that later, the     */\n  /* glyph loader will also be _greatly_ simplified, and the automatic     */\n  /* hinter will replace the clumsy `t1hinter'.                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_CONFIG_CONFIG_H\n#include FT_MULTIPLE_MASTERS_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n#include FT_INTERNAL_CALC_H\n\n#include \"t1load.h\"\n#include \"t1errors.h\"\n\n\n#ifdef FT_CONFIG_OPTION_INCREMENTAL\n#define IS_INCREMENTAL  (FT_Bool)( face->root.internal->incremental_interface != 0 )\n#else\n#define IS_INCREMENTAL  0\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t1load\n\n\n#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    MULTIPLE MASTERS SUPPORT                   *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static FT_Error\n  t1_allocate_blend( T1_Face  face,\n                     FT_UInt  num_designs,\n                     FT_UInt  num_axis )\n  {\n    PS_Blend   blend;\n    FT_Memory  memory = face->root.memory;\n    FT_Error   error  = FT_Err_Ok;\n\n\n    blend = face->blend;\n    if ( !blend )\n    {\n      if ( FT_NEW( blend ) )\n        goto Exit;\n\n      blend->num_default_design_vector = 0;\n\n      face->blend = blend;\n    }\n\n    /* allocate design data if needed */\n    if ( num_designs > 0 )\n    {\n      if ( blend->num_designs == 0 )\n      {\n        FT_UInt  nn;\n\n\n        /* allocate the blend `private' and `font_info' dictionaries */\n        if ( FT_NEW_ARRAY( blend->font_infos[1], num_designs     ) ||\n             FT_NEW_ARRAY( blend->privates  [1], num_designs     ) ||\n             FT_NEW_ARRAY( blend->bboxes    [1], num_designs     ) ||\n             FT_NEW_ARRAY( blend->weight_vector, num_designs * 2 ) )\n          goto Exit;\n\n        blend->default_weight_vector = blend->weight_vector + num_designs;\n\n        blend->font_infos[0] = &face->type1.font_info;\n        blend->privates  [0] = &face->type1.private_dict;\n        blend->bboxes    [0] = &face->type1.font_bbox;\n\n        for ( nn = 2; nn <= num_designs; nn++ )\n        {\n          blend->font_infos[nn] = blend->font_infos[nn - 1] + 1;\n          blend->privates  [nn] = blend->privates  [nn - 1] + 1;\n          blend->bboxes    [nn] = blend->bboxes    [nn - 1] + 1;\n        }\n\n        blend->num_designs = num_designs;\n      }\n      else if ( blend->num_designs != num_designs )\n        goto Fail;\n    }\n\n    /* allocate axis data if needed */\n    if ( num_axis > 0 )\n    {\n      if ( blend->num_axis != 0 && blend->num_axis != num_axis )\n        goto Fail;\n\n      blend->num_axis = num_axis;\n    }\n\n    /* allocate the blend design pos table if needed */\n    num_designs = blend->num_designs;\n    num_axis    = blend->num_axis;\n    if ( num_designs && num_axis && blend->design_pos[0] == 0 )\n    {\n      FT_UInt  n;\n\n\n      if ( FT_NEW_ARRAY( blend->design_pos[0], num_designs * num_axis ) )\n        goto Exit;\n\n      for ( n = 1; n < num_designs; n++ )\n        blend->design_pos[n] = blend->design_pos[0] + num_axis * n;\n    }\n\n  Exit:\n    return error;\n\n  Fail:\n    error = FT_THROW( Invalid_File_Format );\n    goto Exit;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Get_Multi_Master( T1_Face           face,\n                       FT_Multi_Master*  master )\n  {\n    PS_Blend  blend = face->blend;\n    FT_UInt   n;\n    FT_Error  error;\n\n\n    error = FT_THROW( Invalid_Argument );\n\n    if ( blend )\n    {\n      master->num_axis    = blend->num_axis;\n      master->num_designs = blend->num_designs;\n\n      for ( n = 0; n < blend->num_axis; n++ )\n      {\n        FT_MM_Axis*   axis = master->axis + n;\n        PS_DesignMap  map = blend->design_map + n;\n\n\n        axis->name    = blend->axis_names[n];\n        axis->minimum = map->design_points[0];\n        axis->maximum = map->design_points[map->num_points - 1];\n      }\n\n      error = FT_Err_Ok;\n    }\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Given a normalized (blend) coordinate, figure out the design          */\n  /* coordinate appropriate for that value.                                */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Fixed )\n  mm_axis_unmap( PS_DesignMap  axismap,\n                 FT_Fixed      ncv )\n  {\n    int  j;\n\n\n    if ( ncv <= axismap->blend_points[0] )\n      return INT_TO_FIXED( axismap->design_points[0] );\n\n    for ( j = 1; j < axismap->num_points; ++j )\n    {\n      if ( ncv <= axismap->blend_points[j] )\n        return INT_TO_FIXED( axismap->design_points[j - 1] ) +\n               ( axismap->design_points[j] - axismap->design_points[j - 1] ) *\n               FT_DivFix( ncv - axismap->blend_points[j - 1],\n                          axismap->blend_points[j] -\n                            axismap->blend_points[j - 1] );\n    }\n\n    return INT_TO_FIXED( axismap->design_points[axismap->num_points - 1] );\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Given a vector of weights, one for each design, figure out the        */\n  /* normalized axis coordinates which gave rise to those weights.         */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  mm_weights_unmap( FT_Fixed*  weights,\n                    FT_Fixed*  axiscoords,\n                    FT_UInt    axis_count )\n  {\n    FT_ASSERT( axis_count <= T1_MAX_MM_AXIS );\n\n    if ( axis_count == 1 )\n      axiscoords[0] = weights[1];\n\n    else if ( axis_count == 2 )\n    {\n      axiscoords[0] = weights[3] + weights[1];\n      axiscoords[1] = weights[3] + weights[2];\n    }\n\n    else if ( axis_count == 3 )\n    {\n      axiscoords[0] = weights[7] + weights[5] + weights[3] + weights[1];\n      axiscoords[1] = weights[7] + weights[6] + weights[3] + weights[2];\n      axiscoords[2] = weights[7] + weights[6] + weights[5] + weights[4];\n    }\n\n    else\n    {\n      axiscoords[0] = weights[15] + weights[13] + weights[11] + weights[9] +\n                        weights[7] + weights[5] + weights[3] + weights[1];\n      axiscoords[1] = weights[15] + weights[14] + weights[11] + weights[10] +\n                        weights[7] + weights[6] + weights[3] + weights[2];\n      axiscoords[2] = weights[15] + weights[14] + weights[13] + weights[12] +\n                        weights[7] + weights[6] + weights[5] + weights[4];\n      axiscoords[3] = weights[15] + weights[14] + weights[13] + weights[12] +\n                        weights[11] + weights[10] + weights[9] + weights[8];\n    }\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Just a wrapper around T1_Get_Multi_Master to support the different    */\n  /*  arguments needed by the GX var distortable fonts.                    */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  T1_Get_MM_Var( T1_Face      face,\n                 FT_MM_Var*  *master )\n  {\n    FT_Memory        memory = face->root.memory;\n    FT_MM_Var       *mmvar = NULL;\n    FT_Multi_Master  mmaster;\n    FT_Error         error;\n    FT_UInt          i;\n    FT_Fixed         axiscoords[T1_MAX_MM_AXIS];\n    PS_Blend         blend = face->blend;\n\n\n    error = T1_Get_Multi_Master( face, &mmaster );\n    if ( error )\n      goto Exit;\n    if ( FT_ALLOC( mmvar,\n                   sizeof ( FT_MM_Var ) +\n                     mmaster.num_axis * sizeof ( FT_Var_Axis ) ) )\n      goto Exit;\n\n    mmvar->num_axis        = mmaster.num_axis;\n    mmvar->num_designs     = mmaster.num_designs;\n    mmvar->num_namedstyles = ~0U;                        /* Does not apply */\n    mmvar->axis            = (FT_Var_Axis*)&mmvar[1];\n                                      /* Point to axes after MM_Var struct */\n    mmvar->namedstyle      = NULL;\n\n    for ( i = 0 ; i < mmaster.num_axis; ++i )\n    {\n      mmvar->axis[i].name    = mmaster.axis[i].name;\n      mmvar->axis[i].minimum = INT_TO_FIXED( mmaster.axis[i].minimum);\n      mmvar->axis[i].maximum = INT_TO_FIXED( mmaster.axis[i].maximum);\n      mmvar->axis[i].def     = ( mmvar->axis[i].minimum +\n                                   mmvar->axis[i].maximum ) / 2;\n                            /* Does not apply.  But this value is in range */\n      mmvar->axis[i].strid   = ~0U;                      /* Does not apply */\n      mmvar->axis[i].tag     = ~0U;                      /* Does not apply */\n\n      if ( ft_strcmp( mmvar->axis[i].name, \"Weight\" ) == 0 )\n        mmvar->axis[i].tag = FT_MAKE_TAG( 'w', 'g', 'h', 't' );\n      else if ( ft_strcmp( mmvar->axis[i].name, \"Width\" ) == 0 )\n        mmvar->axis[i].tag = FT_MAKE_TAG( 'w', 'd', 't', 'h' );\n      else if ( ft_strcmp( mmvar->axis[i].name, \"OpticalSize\" ) == 0 )\n        mmvar->axis[i].tag = FT_MAKE_TAG( 'o', 'p', 's', 'z' );\n    }\n\n    if ( blend->num_designs == ( 1U << blend->num_axis ) )\n    {\n      mm_weights_unmap( blend->default_weight_vector,\n                        axiscoords,\n                        blend->num_axis );\n\n      for ( i = 0; i < mmaster.num_axis; ++i )\n        mmvar->axis[i].def = mm_axis_unmap( &blend->design_map[i],\n                                            axiscoords[i] );\n    }\n\n    *master = mmvar;\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Set_MM_Blend( T1_Face    face,\n                   FT_UInt    num_coords,\n                   FT_Fixed*  coords )\n  {\n    PS_Blend  blend = face->blend;\n    FT_Error  error;\n    FT_UInt   n, m;\n\n\n    error = FT_ERR( Invalid_Argument );\n\n    if ( blend && blend->num_axis == num_coords )\n    {\n      /* recompute the weight vector from the blend coordinates */\n      for ( n = 0; n < blend->num_designs; n++ )\n      {\n        FT_Fixed  result = 0x10000L;  /* 1.0 fixed */\n\n\n        for ( m = 0; m < blend->num_axis; m++ )\n        {\n          FT_Fixed  factor;\n\n\n          /* get current blend axis position */\n          factor = coords[m];\n          if ( factor < 0 )\n            factor = 0;\n          if ( factor > 0x10000L )\n            factor = 0x10000L;\n\n          if ( ( n & ( 1 << m ) ) == 0 )\n            factor = 0x10000L - factor;\n\n          result = FT_MulFix( result, factor );\n        }\n        blend->weight_vector[n] = result;\n      }\n\n      error = FT_Err_Ok;\n    }\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Set_MM_Design( T1_Face   face,\n                    FT_UInt   num_coords,\n                    FT_Long*  coords )\n  {\n    PS_Blend  blend = face->blend;\n    FT_Error  error;\n    FT_UInt   n, p;\n\n\n    error = FT_ERR( Invalid_Argument );\n    if ( blend && blend->num_axis == num_coords )\n    {\n      /* compute the blend coordinates through the blend design map */\n      FT_Fixed  final_blends[T1_MAX_MM_DESIGNS];\n\n\n      for ( n = 0; n < blend->num_axis; n++ )\n      {\n        FT_Long       design  = coords[n];\n        FT_Fixed      the_blend;\n        PS_DesignMap  map     = blend->design_map + n;\n        FT_Long*      designs = map->design_points;\n        FT_Fixed*     blends  = map->blend_points;\n        FT_Int        before  = -1, after = -1;\n\n\n        for ( p = 0; p < (FT_UInt)map->num_points; p++ )\n        {\n          FT_Long  p_design = designs[p];\n\n\n          /* exact match? */\n          if ( design == p_design )\n          {\n            the_blend = blends[p];\n            goto Found;\n          }\n\n          if ( design < p_design )\n          {\n            after = p;\n            break;\n          }\n\n          before = p;\n        }\n\n        /* now interpolate if necessary */\n        if ( before < 0 )\n          the_blend = blends[0];\n\n        else if ( after < 0 )\n          the_blend = blends[map->num_points - 1];\n\n        else\n          the_blend = FT_MulDiv( design         - designs[before],\n                                 blends [after] - blends [before],\n                                 designs[after] - designs[before] );\n\n      Found:\n        final_blends[n] = the_blend;\n      }\n\n      error = T1_Set_MM_Blend( face, num_coords, final_blends );\n    }\n\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Just a wrapper around T1_Set_MM_Design to support the different       */\n  /* arguments needed by the GX var distortable fonts.                     */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  T1_Set_Var_Design( T1_Face    face,\n                     FT_UInt    num_coords,\n                     FT_Fixed*  coords )\n  {\n     FT_Long   lcoords[4];          /* maximum axis count is 4 */\n     FT_UInt   i;\n     FT_Error  error;\n\n\n     error = FT_ERR( Invalid_Argument );\n     if ( num_coords <= 4 && num_coords > 0 )\n     {\n       for ( i = 0; i < num_coords; ++i )\n         lcoords[i] = FIXED_TO_INT( coords[i] );\n       error = T1_Set_MM_Design( face, num_coords, lcoords );\n     }\n\n     return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  T1_Done_Blend( T1_Face  face )\n  {\n    FT_Memory  memory = face->root.memory;\n    PS_Blend   blend  = face->blend;\n\n\n    if ( blend )\n    {\n      FT_UInt  num_designs = blend->num_designs;\n      FT_UInt  num_axis    = blend->num_axis;\n      FT_UInt  n;\n\n\n      /* release design pos table */\n      FT_FREE( blend->design_pos[0] );\n      for ( n = 1; n < num_designs; n++ )\n        blend->design_pos[n] = NULL;\n\n      /* release blend `private' and `font info' dictionaries */\n      FT_FREE( blend->privates[1] );\n      FT_FREE( blend->font_infos[1] );\n      FT_FREE( blend->bboxes[1] );\n\n      for ( n = 0; n < num_designs; n++ )\n      {\n        blend->privates  [n] = NULL;\n        blend->font_infos[n] = NULL;\n        blend->bboxes    [n] = NULL;\n      }\n\n      /* release weight vectors */\n      FT_FREE( blend->weight_vector );\n      blend->default_weight_vector = NULL;\n\n      /* release axis names */\n      for ( n = 0; n < num_axis; n++ )\n        FT_FREE( blend->axis_names[n] );\n\n      /* release design map */\n      for ( n = 0; n < num_axis; n++ )\n      {\n        PS_DesignMap  dmap = blend->design_map + n;\n\n\n        FT_FREE( dmap->design_points );\n        dmap->num_points = 0;\n      }\n\n      FT_FREE( face->blend );\n    }\n  }\n\n\n  static void\n  parse_blend_axis_types( T1_Face    face,\n                          T1_Loader  loader )\n  {\n    T1_TokenRec  axis_tokens[T1_MAX_MM_AXIS];\n    FT_Int       n, num_axis;\n    FT_Error     error = FT_Err_Ok;\n    PS_Blend     blend;\n    FT_Memory    memory;\n\n\n    /* take an array of objects */\n    T1_ToTokenArray( &loader->parser, axis_tokens,\n                     T1_MAX_MM_AXIS, &num_axis );\n    if ( num_axis < 0 )\n    {\n      error = FT_ERR( Ignore );\n      goto Exit;\n    }\n    if ( num_axis == 0 || num_axis > T1_MAX_MM_AXIS )\n    {\n      FT_ERROR(( \"parse_blend_axis_types: incorrect number of axes: %d\\n\",\n                 num_axis ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    /* allocate blend if necessary */\n    error = t1_allocate_blend( face, 0, (FT_UInt)num_axis );\n    if ( error )\n      goto Exit;\n\n    blend  = face->blend;\n    memory = face->root.memory;\n\n    /* each token is an immediate containing the name of the axis */\n    for ( n = 0; n < num_axis; n++ )\n    {\n      T1_Token    token = axis_tokens + n;\n      FT_Byte*    name;\n      FT_PtrDist  len;\n\n\n      /* skip first slash, if any */\n      if ( token->start[0] == '/' )\n        token->start++;\n\n      len = token->limit - token->start;\n      if ( len == 0 )\n      {\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      if ( FT_ALLOC( blend->axis_names[n], (FT_Long)( len + 1 ) ) )\n        goto Exit;\n\n      name = (FT_Byte*)blend->axis_names[n];\n      FT_MEM_COPY( name, token->start, len );\n      name[len] = '\\0';\n    }\n\n  Exit:\n    loader->parser.root.error = error;\n  }\n\n\n  static void\n  parse_blend_design_positions( T1_Face    face,\n                                T1_Loader  loader )\n  {\n    T1_TokenRec  design_tokens[T1_MAX_MM_DESIGNS];\n    FT_Int       num_designs;\n    FT_Int       num_axis;\n    T1_Parser    parser = &loader->parser;\n\n    FT_Error     error = FT_Err_Ok;\n    PS_Blend     blend;\n\n\n    /* get the array of design tokens -- compute number of designs */\n    T1_ToTokenArray( parser, design_tokens,\n                     T1_MAX_MM_DESIGNS, &num_designs );\n    if ( num_designs < 0 )\n    {\n      error = FT_ERR( Ignore );\n      goto Exit;\n    }\n    if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS )\n    {\n      FT_ERROR(( \"parse_blend_design_positions:\"\n                 \" incorrect number of designs: %d\\n\",\n                 num_designs ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    {\n      FT_Byte*  old_cursor = parser->root.cursor;\n      FT_Byte*  old_limit  = parser->root.limit;\n      FT_Int    n;\n\n\n      blend    = face->blend;\n      num_axis = 0;  /* make compiler happy */\n\n      for ( n = 0; n < num_designs; n++ )\n      {\n        T1_TokenRec  axis_tokens[T1_MAX_MM_AXIS];\n        T1_Token     token;\n        FT_Int       axis, n_axis;\n\n\n        /* read axis/coordinates tokens */\n        token = design_tokens + n;\n        parser->root.cursor = token->start;\n        parser->root.limit  = token->limit;\n        T1_ToTokenArray( parser, axis_tokens, T1_MAX_MM_AXIS, &n_axis );\n\n        if ( n == 0 )\n        {\n          if ( n_axis <= 0 || n_axis > T1_MAX_MM_AXIS )\n          {\n            FT_ERROR(( \"parse_blend_design_positions:\"\n                       \" invalid number of axes: %d\\n\",\n                       n_axis ));\n            error = FT_THROW( Invalid_File_Format );\n            goto Exit;\n          }\n\n          num_axis = n_axis;\n          error = t1_allocate_blend( face, num_designs, num_axis );\n          if ( error )\n            goto Exit;\n          blend = face->blend;\n        }\n        else if ( n_axis != num_axis )\n        {\n          FT_ERROR(( \"parse_blend_design_positions: incorrect table\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        /* now read each axis token into the design position */\n        for ( axis = 0; axis < n_axis; axis++ )\n        {\n          T1_Token  token2 = axis_tokens + axis;\n\n\n          parser->root.cursor = token2->start;\n          parser->root.limit  = token2->limit;\n          blend->design_pos[n][axis] = T1_ToFixed( parser, 0 );\n        }\n      }\n\n      loader->parser.root.cursor = old_cursor;\n      loader->parser.root.limit  = old_limit;\n    }\n\n  Exit:\n    loader->parser.root.error = error;\n  }\n\n\n  static void\n  parse_blend_design_map( T1_Face    face,\n                          T1_Loader  loader )\n  {\n    FT_Error     error  = FT_Err_Ok;\n    T1_Parser    parser = &loader->parser;\n    PS_Blend     blend;\n    T1_TokenRec  axis_tokens[T1_MAX_MM_AXIS];\n    FT_Int       n, num_axis;\n    FT_Byte*     old_cursor;\n    FT_Byte*     old_limit;\n    FT_Memory    memory = face->root.memory;\n\n\n    T1_ToTokenArray( parser, axis_tokens,\n                     T1_MAX_MM_AXIS, &num_axis );\n    if ( num_axis < 0 )\n    {\n      error = FT_ERR( Ignore );\n      goto Exit;\n    }\n    if ( num_axis == 0 || num_axis > T1_MAX_MM_AXIS )\n    {\n      FT_ERROR(( \"parse_blend_design_map: incorrect number of axes: %d\\n\",\n                 num_axis ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    old_cursor = parser->root.cursor;\n    old_limit  = parser->root.limit;\n\n    error = t1_allocate_blend( face, 0, num_axis );\n    if ( error )\n      goto Exit;\n    blend = face->blend;\n\n    /* now read each axis design map */\n    for ( n = 0; n < num_axis; n++ )\n    {\n      PS_DesignMap  map = blend->design_map + n;\n      T1_Token      axis_token;\n      T1_TokenRec   point_tokens[T1_MAX_MM_MAP_POINTS];\n      FT_Int        p, num_points;\n\n\n      axis_token = axis_tokens + n;\n\n      parser->root.cursor = axis_token->start;\n      parser->root.limit  = axis_token->limit;\n      T1_ToTokenArray( parser, point_tokens,\n                       T1_MAX_MM_MAP_POINTS, &num_points );\n\n      if ( num_points <= 0 || num_points > T1_MAX_MM_MAP_POINTS )\n      {\n        FT_ERROR(( \"parse_blend_design_map: incorrect table\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      /* allocate design map data */\n      if ( FT_NEW_ARRAY( map->design_points, num_points * 2 ) )\n        goto Exit;\n      map->blend_points = map->design_points + num_points;\n      map->num_points   = (FT_Byte)num_points;\n\n      for ( p = 0; p < num_points; p++ )\n      {\n        T1_Token  point_token;\n\n\n        point_token = point_tokens + p;\n\n        /* don't include delimiting brackets */\n        parser->root.cursor = point_token->start + 1;\n        parser->root.limit  = point_token->limit - 1;\n\n        map->design_points[p] = T1_ToInt( parser );\n        map->blend_points [p] = T1_ToFixed( parser, 0 );\n      }\n    }\n\n    parser->root.cursor = old_cursor;\n    parser->root.limit  = old_limit;\n\n  Exit:\n    parser->root.error = error;\n  }\n\n\n  static void\n  parse_weight_vector( T1_Face    face,\n                       T1_Loader  loader )\n  {\n    T1_TokenRec  design_tokens[T1_MAX_MM_DESIGNS];\n    FT_Int       num_designs;\n    FT_Error     error  = FT_Err_Ok;\n    T1_Parser    parser = &loader->parser;\n    PS_Blend     blend  = face->blend;\n    T1_Token     token;\n    FT_Int       n;\n    FT_Byte*     old_cursor;\n    FT_Byte*     old_limit;\n\n\n    T1_ToTokenArray( parser, design_tokens,\n                     T1_MAX_MM_DESIGNS, &num_designs );\n    if ( num_designs < 0 )\n    {\n      error = FT_ERR( Ignore );\n      goto Exit;\n    }\n    if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS )\n    {\n      FT_ERROR(( \"parse_weight_vector:\"\n                 \" incorrect number of designs: %d\\n\",\n                 num_designs ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    if ( !blend || !blend->num_designs )\n    {\n      error = t1_allocate_blend( face, num_designs, 0 );\n      if ( error )\n        goto Exit;\n      blend = face->blend;\n    }\n    else if ( blend->num_designs != (FT_UInt)num_designs )\n    {\n      FT_ERROR(( \"parse_weight_vector:\"\n                 \" /BlendDesignPosition and /WeightVector have\\n\"\n                 \"                    \"\n                 \" different number of elements\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    old_cursor = parser->root.cursor;\n    old_limit  = parser->root.limit;\n\n    for ( n = 0; n < num_designs; n++ )\n    {\n      token = design_tokens + n;\n      parser->root.cursor = token->start;\n      parser->root.limit  = token->limit;\n\n      blend->default_weight_vector[n] =\n      blend->weight_vector[n]         = T1_ToFixed( parser, 0 );\n    }\n\n    parser->root.cursor = old_cursor;\n    parser->root.limit  = old_limit;\n\n  Exit:\n    parser->root.error = error;\n  }\n\n\n  /* e.g., /BuildCharArray [0 0 0 0 0 0 0 0] def           */\n  /* we're only interested in the number of array elements */\n  static void\n  parse_buildchar( T1_Face    face,\n                   T1_Loader  loader )\n  {\n    face->len_buildchar = T1_ToFixedArray( &loader->parser, 0, NULL, 0 );\n\n    return;\n  }\n\n\n#endif /* !T1_CONFIG_OPTION_NO_MM_SUPPORT */\n\n\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      TYPE 1 SYMBOL PARSING                    *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  static FT_Error\n  t1_load_keyword( T1_Face         face,\n                   T1_Loader       loader,\n                   const T1_Field  field )\n  {\n    FT_Error  error;\n    void*     dummy_object;\n    void**    objects;\n    FT_UInt   max_objects;\n    PS_Blend  blend = face->blend;\n\n\n    if ( blend && blend->num_designs == 0 )\n      blend = NULL;\n\n    /* if the keyword has a dedicated callback, call it */\n    if ( field->type == T1_FIELD_TYPE_CALLBACK )\n    {\n      field->reader( (FT_Face)face, loader );\n      error = loader->parser.root.error;\n      goto Exit;\n    }\n\n    /* now, the keyword is either a simple field, or a table of fields; */\n    /* we are now going to take care of it                              */\n    switch ( field->location )\n    {\n    case T1_FIELD_LOCATION_FONT_INFO:\n      dummy_object = &face->type1.font_info;\n      objects      = &dummy_object;\n      max_objects  = 0;\n\n      if ( blend )\n      {\n        objects     = (void**)blend->font_infos;\n        max_objects = blend->num_designs;\n      }\n      break;\n\n    case T1_FIELD_LOCATION_FONT_EXTRA:\n      dummy_object = &face->type1.font_extra;\n      objects      = &dummy_object;\n      max_objects  = 0;\n      break;\n\n    case T1_FIELD_LOCATION_PRIVATE:\n      dummy_object = &face->type1.private_dict;\n      objects      = &dummy_object;\n      max_objects  = 0;\n\n      if ( blend )\n      {\n        objects     = (void**)blend->privates;\n        max_objects = blend->num_designs;\n      }\n      break;\n\n    case T1_FIELD_LOCATION_BBOX:\n      dummy_object = &face->type1.font_bbox;\n      objects      = &dummy_object;\n      max_objects  = 0;\n\n      if ( blend )\n      {\n        objects     = (void**)blend->bboxes;\n        max_objects = blend->num_designs;\n      }\n      break;\n\n    case T1_FIELD_LOCATION_LOADER:\n      dummy_object = loader;\n      objects      = &dummy_object;\n      max_objects  = 0;\n      break;\n\n    case T1_FIELD_LOCATION_FACE:\n      dummy_object = face;\n      objects      = &dummy_object;\n      max_objects  = 0;\n      break;\n\n#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT\n    case T1_FIELD_LOCATION_BLEND:\n      dummy_object = face->blend;\n      objects      = &dummy_object;\n      max_objects  = 0;\n      break;\n#endif\n\n    default:\n      dummy_object = &face->type1;\n      objects      = &dummy_object;\n      max_objects  = 0;\n    }\n\n    if ( *objects )\n    {\n      if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY ||\n           field->type == T1_FIELD_TYPE_FIXED_ARRAY   )\n        error = T1_Load_Field_Table( &loader->parser, field,\n                                     objects, max_objects, 0 );\n      else\n        error = T1_Load_Field( &loader->parser, field,\n                               objects, max_objects, 0 );\n    }\n    else\n    {\n      FT_TRACE1(( \"t1_load_keyword: ignoring keyword `%s'\"\n                  \" which is not valid at this point\\n\"\n                  \"                 (probably due to missing keywords)\\n\",\n                 field->ident ));\n      error = FT_Err_Ok;\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  static void\n  parse_private( T1_Face    face,\n                 T1_Loader  loader )\n  {\n    FT_UNUSED( face );\n\n    loader->keywords_encountered |= T1_PRIVATE;\n  }\n\n\n  static int\n  read_binary_data( T1_Parser  parser,\n                    FT_Long*   size,\n                    FT_Byte**  base,\n                    FT_Bool    incremental )\n  {\n    FT_Byte*  cur;\n    FT_Byte*  limit = parser->root.limit;\n\n\n    /* the binary data has one of the following formats */\n    /*                                                  */\n    /*   `size' [white*] RD white ....... ND            */\n    /*   `size' [white*] -| white ....... |-            */\n    /*                                                  */\n\n    T1_Skip_Spaces( parser );\n\n    cur = parser->root.cursor;\n\n    if ( cur < limit && ft_isdigit( *cur ) )\n    {\n      FT_Long  s = T1_ToInt( parser );\n\n\n      T1_Skip_PS_Token( parser );   /* `RD' or `-|' or something else */\n\n      /* there is only one whitespace char after the */\n      /* `RD' or `-|' token                          */\n      *base = parser->root.cursor + 1;\n\n      if ( s >= 0 && s < limit - *base )\n      {\n        parser->root.cursor += s + 1;\n        *size = s;\n        return !parser->root.error;\n      }\n    }\n\n    if( !incremental )\n    {\n      FT_ERROR(( \"read_binary_data: invalid size field\\n\" ));\n      parser->root.error = FT_THROW( Invalid_File_Format );\n    }\n\n    return 0;\n  }\n\n\n  /* We now define the routines to handle the `/Encoding', `/Subrs', */\n  /* and `/CharStrings' dictionaries.                                */\n\n  static void\n  t1_parse_font_matrix( T1_Face    face,\n                        T1_Loader  loader )\n  {\n    T1_Parser   parser = &loader->parser;\n    FT_Matrix*  matrix = &face->type1.font_matrix;\n    FT_Vector*  offset = &face->type1.font_offset;\n    FT_Face     root   = (FT_Face)&face->root;\n    FT_Fixed    temp[6];\n    FT_Fixed    temp_scale;\n    FT_Int      result;\n\n\n    result = T1_ToFixedArray( parser, 6, temp, 3 );\n\n    if ( result < 6 )\n    {\n      parser->root.error = FT_THROW( Invalid_File_Format );\n      return;\n    }\n\n    temp_scale = FT_ABS( temp[3] );\n\n    if ( temp_scale == 0 )\n    {\n      FT_ERROR(( \"t1_parse_font_matrix: invalid font matrix\\n\" ));\n      parser->root.error = FT_THROW( Invalid_File_Format );\n      return;\n    }\n\n    /* Set Units per EM based on FontMatrix values.  We set the value to */\n    /* 1000 / temp_scale, because temp_scale was already multiplied by   */\n    /* 1000 (in t1_tofixed, from psobjs.c).                              */\n\n    root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );\n\n    /* we need to scale the values by 1.0/temp_scale */\n    if ( temp_scale != 0x10000L )\n    {\n      temp[0] = FT_DivFix( temp[0], temp_scale );\n      temp[1] = FT_DivFix( temp[1], temp_scale );\n      temp[2] = FT_DivFix( temp[2], temp_scale );\n      temp[4] = FT_DivFix( temp[4], temp_scale );\n      temp[5] = FT_DivFix( temp[5], temp_scale );\n      temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L;\n    }\n\n    matrix->xx = temp[0];\n    matrix->yx = temp[1];\n    matrix->xy = temp[2];\n    matrix->yy = temp[3];\n\n    /* note that the offsets must be expressed in integer font units */\n    offset->x = temp[4] >> 16;\n    offset->y = temp[5] >> 16;\n  }\n\n\n  static void\n  parse_encoding( T1_Face    face,\n                  T1_Loader  loader )\n  {\n    T1_Parser  parser = &loader->parser;\n    FT_Byte*   cur;\n    FT_Byte*   limit  = parser->root.limit;\n\n    PSAux_Service  psaux = (PSAux_Service)face->psaux;\n\n\n    T1_Skip_Spaces( parser );\n    cur = parser->root.cursor;\n    if ( cur >= limit )\n    {\n      FT_ERROR(( \"parse_encoding: out of bounds\\n\" ));\n      parser->root.error = FT_THROW( Invalid_File_Format );\n      return;\n    }\n\n    /* if we have a number or `[', the encoding is an array, */\n    /* and we must load it now                               */\n    if ( ft_isdigit( *cur ) || *cur == '[' )\n    {\n      T1_Encoding  encode          = &face->type1.encoding;\n      FT_Int       count, n;\n      PS_Table     char_table      = &loader->encoding_table;\n      FT_Memory    memory          = parser->root.memory;\n      FT_Error     error;\n      FT_Bool      only_immediates = 0;\n\n\n      /* read the number of entries in the encoding; should be 256 */\n      if ( *cur == '[' )\n      {\n        count           = 256;\n        only_immediates = 1;\n        parser->root.cursor++;\n      }\n      else\n        count = (FT_Int)T1_ToInt( parser );\n\n      T1_Skip_Spaces( parser );\n      if ( parser->root.cursor >= limit )\n        return;\n\n      /* we use a T1_Table to store our charnames */\n      loader->num_chars = encode->num_chars = count;\n      if ( FT_NEW_ARRAY( encode->char_index, count )     ||\n           FT_NEW_ARRAY( encode->char_name,  count )     ||\n           FT_SET_ERROR( psaux->ps_table_funcs->init(\n                           char_table, count, memory ) ) )\n      {\n        parser->root.error = error;\n        return;\n      }\n\n      /* We need to `zero' out encoding_table.elements */\n      for ( n = 0; n < count; n++ )\n      {\n        char*  notdef = (char *)\".notdef\";\n\n\n        (void)T1_Add_Table( char_table, n, notdef, 8 );\n      }\n\n      /* Now we need to read records of the form                */\n      /*                                                        */\n      /*   ... charcode /charname ...                           */\n      /*                                                        */\n      /* for each entry in our table.                           */\n      /*                                                        */\n      /* We simply look for a number followed by an immediate   */\n      /* name.  Note that this ignores correctly the sequence   */\n      /* that is often seen in type1 fonts:                     */\n      /*                                                        */\n      /*   0 1 255 { 1 index exch /.notdef put } for dup        */\n      /*                                                        */\n      /* used to clean the encoding array before anything else. */\n      /*                                                        */\n      /* Alternatively, if the array is directly given as       */\n      /*                                                        */\n      /*   /Encoding [ ... ]                                    */\n      /*                                                        */\n      /* we only read immediates.                               */\n\n      n = 0;\n      T1_Skip_Spaces( parser );\n\n      while ( parser->root.cursor < limit )\n      {\n        cur = parser->root.cursor;\n\n        /* we stop when we encounter a `def' or `]' */\n        if ( *cur == 'd' && cur + 3 < limit )\n        {\n          if ( cur[1] == 'e'         &&\n               cur[2] == 'f'         &&\n               IS_PS_DELIM( cur[3] ) )\n          {\n            FT_TRACE6(( \"encoding end\\n\" ));\n            cur += 3;\n            break;\n          }\n        }\n        if ( *cur == ']' )\n        {\n          FT_TRACE6(( \"encoding end\\n\" ));\n          cur++;\n          break;\n        }\n\n        /* check whether we've found an entry */\n        if ( ft_isdigit( *cur ) || only_immediates )\n        {\n          FT_Int  charcode;\n\n\n          if ( only_immediates )\n            charcode = n;\n          else\n          {\n            charcode = (FT_Int)T1_ToInt( parser );\n            T1_Skip_Spaces( parser );\n\n            /* protect against invalid charcode */\n            if ( cur == parser->root.cursor )\n            {\n              parser->root.error = FT_THROW( Unknown_File_Format );\n              return;\n            }\n          }\n\n          cur = parser->root.cursor;\n\n          if ( cur + 2 < limit && *cur == '/' && n < count )\n          {\n            FT_PtrDist  len;\n\n\n            cur++;\n\n            parser->root.cursor = cur;\n            T1_Skip_PS_Token( parser );\n            if ( parser->root.cursor >= limit )\n              return;\n            if ( parser->root.error )\n              return;\n\n            len = parser->root.cursor - cur;\n\n            parser->root.error = T1_Add_Table( char_table, charcode,\n                                               cur, len + 1 );\n            if ( parser->root.error )\n              return;\n            char_table->elements[charcode][len] = '\\0';\n\n            n++;\n          }\n          else if ( only_immediates )\n          {\n            /* Since the current position is not updated for           */\n            /* immediates-only mode we would get an infinite loop if   */\n            /* we don't do anything here.                              */\n            /*                                                         */\n            /* This encoding array is not valid according to the type1 */\n            /* specification (it might be an encoding for a CID type1  */\n            /* font, however), so we conclude that this font is NOT a  */\n            /* type1 font.                                             */\n            parser->root.error = FT_THROW( Unknown_File_Format );\n            return;\n          }\n        }\n        else\n        {\n          T1_Skip_PS_Token( parser );\n          if ( parser->root.error )\n            return;\n        }\n\n        T1_Skip_Spaces( parser );\n      }\n\n      face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY;\n      parser->root.cursor       = cur;\n    }\n\n    /* Otherwise, we should have either `StandardEncoding', */\n    /* `ExpertEncoding', or `ISOLatin1Encoding'             */\n    else\n    {\n      if ( cur + 17 < limit                                            &&\n           ft_strncmp( (const char*)cur, \"StandardEncoding\", 16 ) == 0 )\n        face->type1.encoding_type = T1_ENCODING_TYPE_STANDARD;\n\n      else if ( cur + 15 < limit                                          &&\n                ft_strncmp( (const char*)cur, \"ExpertEncoding\", 14 ) == 0 )\n        face->type1.encoding_type = T1_ENCODING_TYPE_EXPERT;\n\n      else if ( cur + 18 < limit                                             &&\n                ft_strncmp( (const char*)cur, \"ISOLatin1Encoding\", 17 ) == 0 )\n        face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1;\n\n      else\n        parser->root.error = FT_ERR( Ignore );\n    }\n  }\n\n\n  static void\n  parse_subrs( T1_Face    face,\n               T1_Loader  loader )\n  {\n    T1_Parser  parser = &loader->parser;\n    PS_Table   table  = &loader->subrs;\n    FT_Memory  memory = parser->root.memory;\n    FT_Error   error;\n    FT_Int     num_subrs;\n\n    PSAux_Service  psaux = (PSAux_Service)face->psaux;\n\n\n    T1_Skip_Spaces( parser );\n\n    /* test for empty array */\n    if ( parser->root.cursor < parser->root.limit &&\n         *parser->root.cursor == '['              )\n    {\n      T1_Skip_PS_Token( parser );\n      T1_Skip_Spaces  ( parser );\n      if ( parser->root.cursor >= parser->root.limit ||\n           *parser->root.cursor != ']'               )\n        parser->root.error = FT_THROW( Invalid_File_Format );\n      return;\n    }\n\n    num_subrs = (FT_Int)T1_ToInt( parser );\n\n    /* position the parser right before the `dup' of the first subr */\n    T1_Skip_PS_Token( parser );         /* `array' */\n    if ( parser->root.error )\n      return;\n    T1_Skip_Spaces( parser );\n\n    /* initialize subrs array -- with synthetic fonts it is possible */\n    /* we get here twice                                             */\n    if ( !loader->num_subrs )\n    {\n      error = psaux->ps_table_funcs->init( table, num_subrs, memory );\n      if ( error )\n        goto Fail;\n    }\n\n    /* the format is simple:   */\n    /*                         */\n    /*   `index' + binary data */\n    /*                         */\n    for (;;)\n    {\n      FT_Long   idx, size;\n      FT_Byte*  base;\n\n\n      /* If we are out of data, or if the next token isn't `dup', */\n      /* we are done.                                             */\n      if ( parser->root.cursor + 4 >= parser->root.limit          ||\n          ft_strncmp( (char*)parser->root.cursor, \"dup\", 3 ) != 0 )\n        break;\n\n      T1_Skip_PS_Token( parser );       /* `dup' */\n\n      idx = T1_ToInt( parser );\n\n      if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) )\n        return;\n\n      /* The binary string is followed by one token, e.g. `NP' */\n      /* (bound to `noaccess put') or by two separate tokens:  */\n      /* `noaccess' & `put'.  We position the parser right     */\n      /* before the next `dup', if any.                        */\n      T1_Skip_PS_Token( parser );   /* `NP' or `|' or `noaccess' */\n      if ( parser->root.error )\n        return;\n      T1_Skip_Spaces  ( parser );\n\n      if ( parser->root.cursor + 4 < parser->root.limit            &&\n           ft_strncmp( (char*)parser->root.cursor, \"put\", 3 ) == 0 )\n      {\n        T1_Skip_PS_Token( parser ); /* skip `put' */\n        T1_Skip_Spaces  ( parser );\n      }\n\n      /* with synthetic fonts it is possible we get here twice */\n      if ( loader->num_subrs )\n        continue;\n\n      /* some fonts use a value of -1 for lenIV to indicate that */\n      /* the charstrings are unencoded                           */\n      /*                                                         */\n      /* thanks to Tom Kacvinsky for pointing this out           */\n      /*                                                         */\n      if ( face->type1.private_dict.lenIV >= 0 )\n      {\n        FT_Byte*  temp;\n\n\n        /* some fonts define empty subr records -- this is not totally */\n        /* compliant to the specification (which says they should at   */\n        /* least contain a `return'), but we support them anyway       */\n        if ( size < face->type1.private_dict.lenIV )\n        {\n          error = FT_THROW( Invalid_File_Format );\n          goto Fail;\n        }\n\n        /* t1_decrypt() shouldn't write to base -- make temporary copy */\n        if ( FT_ALLOC( temp, size ) )\n          goto Fail;\n        FT_MEM_COPY( temp, base, size );\n        psaux->t1_decrypt( temp, size, 4330 );\n        size -= face->type1.private_dict.lenIV;\n        error = T1_Add_Table( table, (FT_Int)idx,\n                              temp + face->type1.private_dict.lenIV, size );\n        FT_FREE( temp );\n      }\n      else\n        error = T1_Add_Table( table, (FT_Int)idx, base, size );\n      if ( error )\n        goto Fail;\n    }\n\n    if ( !loader->num_subrs )\n      loader->num_subrs = num_subrs;\n\n    return;\n\n  Fail:\n    parser->root.error = error;\n  }\n\n\n#define TABLE_EXTEND  5\n\n\n  static void\n  parse_charstrings( T1_Face    face,\n                     T1_Loader  loader )\n  {\n    T1_Parser      parser       = &loader->parser;\n    PS_Table       code_table   = &loader->charstrings;\n    PS_Table       name_table   = &loader->glyph_names;\n    PS_Table       swap_table   = &loader->swap_table;\n    FT_Memory      memory       = parser->root.memory;\n    FT_Error       error;\n\n    PSAux_Service  psaux        = (PSAux_Service)face->psaux;\n\n    FT_Byte*       cur;\n    FT_Byte*       limit        = parser->root.limit;\n    FT_Int         n, num_glyphs;\n    FT_UInt        notdef_index = 0;\n    FT_Byte        notdef_found = 0;\n\n\n    num_glyphs = (FT_Int)T1_ToInt( parser );\n    if ( num_glyphs < 0 )\n    {\n      error = FT_THROW( Invalid_File_Format );\n      goto Fail;\n    }\n\n    /* some fonts like Optima-Oblique not only define the /CharStrings */\n    /* array but access it also                                        */\n    if ( num_glyphs == 0 || parser->root.error )\n      return;\n\n    /* initialize tables, leaving space for addition of .notdef, */\n    /* if necessary, and a few other glyphs to handle buggy      */\n    /* fonts which have more glyphs than specified.              */\n\n    /* for some non-standard fonts like `Optima' which provides  */\n    /* different outlines depending on the resolution it is      */\n    /* possible to get here twice                                */\n    if ( !loader->num_glyphs )\n    {\n      error = psaux->ps_table_funcs->init(\n                code_table, num_glyphs + 1 + TABLE_EXTEND, memory );\n      if ( error )\n        goto Fail;\n\n      error = psaux->ps_table_funcs->init(\n                name_table, num_glyphs + 1 + TABLE_EXTEND, memory );\n      if ( error )\n        goto Fail;\n\n      /* Initialize table for swapping index notdef_index and */\n      /* index 0 names and codes (if necessary).              */\n\n      error = psaux->ps_table_funcs->init( swap_table, 4, memory );\n      if ( error )\n        goto Fail;\n    }\n\n    n = 0;\n\n    for (;;)\n    {\n      FT_Long   size;\n      FT_Byte*  base;\n\n\n      /* the format is simple:        */\n      /*   `/glyphname' + binary data */\n\n      T1_Skip_Spaces( parser );\n\n      cur = parser->root.cursor;\n      if ( cur >= limit )\n        break;\n\n      /* we stop when we find a `def' or `end' keyword */\n      if ( cur + 3 < limit && IS_PS_DELIM( cur[3] ) )\n      {\n        if ( cur[0] == 'd' &&\n             cur[1] == 'e' &&\n             cur[2] == 'f' )\n        {\n          /* There are fonts which have this: */\n          /*                                  */\n          /*   /CharStrings 118 dict def      */\n          /*   Private begin                  */\n          /*   CharStrings begin              */\n          /*   ...                            */\n          /*                                  */\n          /* To catch this we ignore `def' if */\n          /* no charstring has actually been  */\n          /* seen.                            */\n          if ( n )\n            break;\n        }\n\n        if ( cur[0] == 'e' &&\n             cur[1] == 'n' &&\n             cur[2] == 'd' )\n          break;\n      }\n\n      T1_Skip_PS_Token( parser );\n      if ( parser->root.cursor >= limit )\n      {\n        error = FT_THROW( Invalid_File_Format );\n        goto Fail;\n      }\n      if ( parser->root.error )\n        return;\n\n      if ( *cur == '/' )\n      {\n        FT_PtrDist  len;\n\n\n        if ( cur + 2 >= limit )\n        {\n          error = FT_THROW( Invalid_File_Format );\n          goto Fail;\n        }\n\n        cur++;                              /* skip `/' */\n        len = parser->root.cursor - cur;\n\n        if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) )\n          return;\n\n        /* for some non-standard fonts like `Optima' which provides */\n        /* different outlines depending on the resolution it is     */\n        /* possible to get here twice                               */\n        if ( loader->num_glyphs )\n          continue;\n\n        error = T1_Add_Table( name_table, n, cur, len + 1 );\n        if ( error )\n          goto Fail;\n\n        /* add a trailing zero to the name table */\n        name_table->elements[n][len] = '\\0';\n\n        /* record index of /.notdef */\n        if ( *cur == '.'                                              &&\n             ft_strcmp( \".notdef\",\n                        (const char*)(name_table->elements[n]) ) == 0 )\n        {\n          notdef_index = n;\n          notdef_found = 1;\n        }\n\n        if ( face->type1.private_dict.lenIV >= 0 &&\n             n < num_glyphs + TABLE_EXTEND       )\n        {\n          FT_Byte*  temp;\n\n\n          if ( size <= face->type1.private_dict.lenIV )\n          {\n            error = FT_THROW( Invalid_File_Format );\n            goto Fail;\n          }\n\n          /* t1_decrypt() shouldn't write to base -- make temporary copy */\n          if ( FT_ALLOC( temp, size ) )\n            goto Fail;\n          FT_MEM_COPY( temp, base, size );\n          psaux->t1_decrypt( temp, size, 4330 );\n          size -= face->type1.private_dict.lenIV;\n          error = T1_Add_Table( code_table, n,\n                                temp + face->type1.private_dict.lenIV, size );\n          FT_FREE( temp );\n        }\n        else\n          error = T1_Add_Table( code_table, n, base, size );\n        if ( error )\n          goto Fail;\n\n        n++;\n      }\n    }\n\n    loader->num_glyphs = n;\n\n    /* if /.notdef is found but does not occupy index 0, do our magic. */\n    if ( notdef_found                                                 &&\n         ft_strcmp( \".notdef\", (const char*)name_table->elements[0] ) )\n    {\n      /* Swap glyph in index 0 with /.notdef glyph.  First, add index 0  */\n      /* name and code entries to swap_table.  Then place notdef_index   */\n      /* name and code entries into swap_table.  Then swap name and code */\n      /* entries at indices notdef_index and 0 using values stored in    */\n      /* swap_table.                                                     */\n\n      /* Index 0 name */\n      error = T1_Add_Table( swap_table, 0,\n                            name_table->elements[0],\n                            name_table->lengths [0] );\n      if ( error )\n        goto Fail;\n\n      /* Index 0 code */\n      error = T1_Add_Table( swap_table, 1,\n                            code_table->elements[0],\n                            code_table->lengths [0] );\n      if ( error )\n        goto Fail;\n\n      /* Index notdef_index name */\n      error = T1_Add_Table( swap_table, 2,\n                            name_table->elements[notdef_index],\n                            name_table->lengths [notdef_index] );\n      if ( error )\n        goto Fail;\n\n      /* Index notdef_index code */\n      error = T1_Add_Table( swap_table, 3,\n                            code_table->elements[notdef_index],\n                            code_table->lengths [notdef_index] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( name_table, notdef_index,\n                            swap_table->elements[0],\n                            swap_table->lengths [0] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( code_table, notdef_index,\n                            swap_table->elements[1],\n                            swap_table->lengths [1] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( name_table, 0,\n                            swap_table->elements[2],\n                            swap_table->lengths [2] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( code_table, 0,\n                            swap_table->elements[3],\n                            swap_table->lengths [3] );\n      if ( error )\n        goto Fail;\n\n    }\n    else if ( !notdef_found )\n    {\n      /* notdef_index is already 0, or /.notdef is undefined in   */\n      /* charstrings dictionary.  Worry about /.notdef undefined. */\n      /* We take index 0 and add it to the end of the table(s)    */\n      /* and add our own /.notdef glyph to index 0.               */\n\n      /* 0 333 hsbw endchar */\n      FT_Byte  notdef_glyph[] = { 0x8B, 0xF7, 0xE1, 0x0D, 0x0E };\n      char*    notdef_name    = (char *)\".notdef\";\n\n\n      error = T1_Add_Table( swap_table, 0,\n                            name_table->elements[0],\n                            name_table->lengths [0] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( swap_table, 1,\n                            code_table->elements[0],\n                            code_table->lengths [0] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( name_table, 0, notdef_name, 8 );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( code_table, 0, notdef_glyph, 5 );\n\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( name_table, n,\n                            swap_table->elements[0],\n                            swap_table->lengths [0] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( code_table, n,\n                            swap_table->elements[1],\n                            swap_table->lengths [1] );\n      if ( error )\n        goto Fail;\n\n      /* we added a glyph. */\n      loader->num_glyphs += 1;\n    }\n\n    return;\n\n  Fail:\n    parser->root.error = error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define the token field static variables.  This is a set of            */\n  /* T1_FieldRec variables.                                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  static\n  const T1_FieldRec  t1_keywords[] =\n  {\n\n#include \"t1tokens.h\"\n\n    /* now add the special functions... */\n    T1_FIELD_CALLBACK( \"FontMatrix\",           t1_parse_font_matrix,\n                       T1_FIELD_DICT_FONTDICT )\n    T1_FIELD_CALLBACK( \"Encoding\",             parse_encoding,\n                       T1_FIELD_DICT_FONTDICT )\n    T1_FIELD_CALLBACK( \"Subrs\",                parse_subrs,\n                       T1_FIELD_DICT_PRIVATE )\n    T1_FIELD_CALLBACK( \"CharStrings\",          parse_charstrings,\n                       T1_FIELD_DICT_PRIVATE )\n    T1_FIELD_CALLBACK( \"Private\",              parse_private,\n                       T1_FIELD_DICT_FONTDICT )\n\n#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT\n    T1_FIELD_CALLBACK( \"BlendDesignPositions\", parse_blend_design_positions,\n                       T1_FIELD_DICT_FONTDICT )\n    T1_FIELD_CALLBACK( \"BlendDesignMap\",       parse_blend_design_map,\n                       T1_FIELD_DICT_FONTDICT )\n    T1_FIELD_CALLBACK( \"BlendAxisTypes\",       parse_blend_axis_types,\n                       T1_FIELD_DICT_FONTDICT )\n    T1_FIELD_CALLBACK( \"WeightVector\",         parse_weight_vector,\n                       T1_FIELD_DICT_FONTDICT )\n    T1_FIELD_CALLBACK( \"BuildCharArray\",       parse_buildchar,\n                       T1_FIELD_DICT_PRIVATE )\n#endif\n\n    { 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0, 0 }\n  };\n\n\n#define T1_FIELD_COUNT                                           \\\n          ( sizeof ( t1_keywords ) / sizeof ( t1_keywords[0] ) )\n\n\n  static FT_Error\n  parse_dict( T1_Face    face,\n              T1_Loader  loader,\n              FT_Byte*   base,\n              FT_Long    size )\n  {\n    T1_Parser  parser = &loader->parser;\n    FT_Byte   *limit, *start_binary = NULL;\n    FT_Bool    have_integer = 0;\n\n\n    parser->root.cursor = base;\n    parser->root.limit  = base + size;\n    parser->root.error  = FT_Err_Ok;\n\n    limit = parser->root.limit;\n\n    T1_Skip_Spaces( parser );\n\n    while ( parser->root.cursor < limit )\n    {\n      FT_Byte*  cur;\n\n\n      cur = parser->root.cursor;\n\n      /* look for `eexec' */\n      if ( IS_PS_TOKEN( cur, limit, \"eexec\" ) )\n        break;\n\n      /* look for `closefile' which ends the eexec section */\n      else if ( IS_PS_TOKEN( cur, limit, \"closefile\" ) )\n        break;\n\n      /* in a synthetic font the base font starts after a           */\n      /* `FontDictionary' token that is placed after a Private dict */\n      else if ( IS_PS_TOKEN( cur, limit, \"FontDirectory\" ) )\n      {\n        if ( loader->keywords_encountered & T1_PRIVATE )\n          loader->keywords_encountered |=\n            T1_FONTDIR_AFTER_PRIVATE;\n        parser->root.cursor += 13;\n      }\n\n      /* check whether we have an integer */\n      else if ( ft_isdigit( *cur ) )\n      {\n        start_binary = cur;\n        T1_Skip_PS_Token( parser );\n        if ( parser->root.error )\n          goto Exit;\n        have_integer = 1;\n      }\n\n      /* in valid Type 1 fonts we don't see `RD' or `-|' directly */\n      /* since those tokens are handled by parse_subrs and        */\n      /* parse_charstrings                                        */\n      else if ( *cur == 'R' && cur + 6 < limit && *(cur + 1) == 'D' &&\n                have_integer )\n      {\n        FT_Long   s;\n        FT_Byte*  b;\n\n\n        parser->root.cursor = start_binary;\n        if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) )\n          return FT_THROW( Invalid_File_Format );\n        have_integer = 0;\n      }\n\n      else if ( *cur == '-' && cur + 6 < limit && *(cur + 1) == '|' &&\n                have_integer )\n      {\n        FT_Long   s;\n        FT_Byte*  b;\n\n\n        parser->root.cursor = start_binary;\n        if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) )\n          return FT_THROW( Invalid_File_Format );\n        have_integer = 0;\n      }\n\n      /* look for immediates */\n      else if ( *cur == '/' && cur + 2 < limit )\n      {\n        FT_PtrDist  len;\n\n\n        cur++;\n\n        parser->root.cursor = cur;\n        T1_Skip_PS_Token( parser );\n        if ( parser->root.error )\n          goto Exit;\n\n        len = parser->root.cursor - cur;\n\n        if ( len > 0 && len < 22 && parser->root.cursor < limit )\n        {\n          /* now compare the immediate name to the keyword table */\n          T1_Field  keyword = (T1_Field)t1_keywords;\n\n\n          for (;;)\n          {\n            FT_Byte*  name;\n\n\n            name = (FT_Byte*)keyword->ident;\n            if ( !name )\n              break;\n\n            if ( cur[0] == name[0]                                  &&\n                 len == (FT_PtrDist)ft_strlen( (const char *)name ) &&\n                 ft_memcmp( cur, name, len ) == 0                   )\n            {\n              /* We found it -- run the parsing callback!     */\n              /* We record every instance of every field      */\n              /* (until we reach the base font of a           */\n              /* synthetic font) to deal adequately with      */\n              /* multiple master fonts; this is also          */\n              /* necessary because later PostScript           */\n              /* definitions override earlier ones.           */\n\n              /* Once we encounter `FontDirectory' after      */\n              /* `/Private', we know that this is a synthetic */\n              /* font; except for `/CharStrings' we are not   */\n              /* interested in anything that follows this     */\n              /* `FontDirectory'.                             */\n\n              /* MM fonts have more than one /Private token at */\n              /* the top level; let's hope that all the junk   */\n              /* that follows the first /Private token is not  */\n              /* interesting to us.                            */\n\n              /* According to Adobe Tech Note #5175 (CID-Keyed */\n              /* Font Installation for ATM Software) a `begin' */\n              /* must be followed by exactly one `end', and    */\n              /* `begin' -- `end' pairs must be accurately     */\n              /* paired.  We could use this to distinguish     */\n              /* between the global Private and the Private    */\n              /* dict that is a member of the Blend dict.      */\n\n              const FT_UInt dict =\n                ( loader->keywords_encountered & T1_PRIVATE )\n                    ? T1_FIELD_DICT_PRIVATE\n                    : T1_FIELD_DICT_FONTDICT;\n\n              if ( !( dict & keyword->dict ) )\n              {\n                FT_TRACE1(( \"parse_dict: found `%s' but ignoring it\"\n                            \" since it is in the wrong dictionary\\n\",\n                            keyword->ident ));\n                break;\n              }\n\n              if ( !( loader->keywords_encountered &\n                      T1_FONTDIR_AFTER_PRIVATE     )                  ||\n                   ft_strcmp( (const char*)name, \"CharStrings\" ) == 0 )\n              {\n                parser->root.error = t1_load_keyword( face,\n                                                      loader,\n                                                      keyword );\n                if ( parser->root.error != FT_Err_Ok )\n                {\n                  if ( FT_ERR_EQ( parser->root.error, Ignore ) )\n                    parser->root.error = FT_Err_Ok;\n                  else\n                    return parser->root.error;\n                }\n              }\n              break;\n            }\n\n            keyword++;\n          }\n        }\n\n        have_integer = 0;\n      }\n      else\n      {\n        T1_Skip_PS_Token( parser );\n        if ( parser->root.error )\n          goto Exit;\n        have_integer = 0;\n      }\n\n      T1_Skip_Spaces( parser );\n    }\n\n  Exit:\n    return parser->root.error;\n  }\n\n\n  static void\n  t1_init_loader( T1_Loader  loader,\n                  T1_Face    face )\n  {\n    FT_UNUSED( face );\n\n    FT_MEM_ZERO( loader, sizeof ( *loader ) );\n    loader->num_glyphs = 0;\n    loader->num_chars  = 0;\n\n    /* initialize the tables -- simply set their `init' field to 0 */\n    loader->encoding_table.init  = 0;\n    loader->charstrings.init     = 0;\n    loader->glyph_names.init     = 0;\n    loader->subrs.init           = 0;\n    loader->swap_table.init      = 0;\n    loader->fontdata             = 0;\n    loader->keywords_encountered = 0;\n  }\n\n\n  static void\n  t1_done_loader( T1_Loader  loader )\n  {\n    T1_Parser  parser = &loader->parser;\n\n\n    /* finalize tables */\n    T1_Release_Table( &loader->encoding_table );\n    T1_Release_Table( &loader->charstrings );\n    T1_Release_Table( &loader->glyph_names );\n    T1_Release_Table( &loader->swap_table );\n    T1_Release_Table( &loader->subrs );\n\n    /* finalize parser */\n    T1_Finalize_Parser( parser );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Open_Face( T1_Face  face )\n  {\n    T1_LoaderRec   loader;\n    T1_Parser      parser;\n    T1_Font        type1 = &face->type1;\n    PS_Private     priv  = &type1->private_dict;\n    FT_Error       error;\n\n    PSAux_Service  psaux = (PSAux_Service)face->psaux;\n\n\n    t1_init_loader( &loader, face );\n\n    /* default values */\n    face->ndv_idx          = -1;\n    face->cdv_idx          = -1;\n    face->len_buildchar    = 0;\n\n    priv->blue_shift       = 7;\n    priv->blue_fuzz        = 1;\n    priv->lenIV            = 4;\n    priv->expansion_factor = (FT_Fixed)( 0.06 * 0x10000L );\n    priv->blue_scale       = (FT_Fixed)( 0.039625 * 0x10000L * 1000 );\n\n    parser = &loader.parser;\n    error  = T1_New_Parser( parser,\n                            face->root.stream,\n                            face->root.memory,\n                            psaux );\n    if ( error )\n      goto Exit;\n\n    error = parse_dict( face, &loader,\n                        parser->base_dict, parser->base_len );\n    if ( error )\n      goto Exit;\n\n    error = T1_Get_Private_Dict( parser, psaux );\n    if ( error )\n      goto Exit;\n\n    error = parse_dict( face, &loader,\n                        parser->private_dict, parser->private_len );\n    if ( error )\n      goto Exit;\n\n    /* ensure even-ness of `num_blue_values' */\n    priv->num_blue_values &= ~1;\n\n#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT\n\n    if ( face->blend                                                     &&\n         face->blend->num_default_design_vector != 0                     &&\n         face->blend->num_default_design_vector != face->blend->num_axis )\n    {\n      /* we don't use it currently so just warn, reset, and ignore */\n      FT_ERROR(( \"T1_Open_Face(): /DesignVector contains %u entries \"\n                 \"while there are %u axes.\\n\",\n                 face->blend->num_default_design_vector,\n                 face->blend->num_axis ));\n\n      face->blend->num_default_design_vector = 0;\n    }\n\n    /* the following can happen for MM instances; we then treat the */\n    /* font as a normal PS font                                     */\n    if ( face->blend                                             &&\n         ( !face->blend->num_designs || !face->blend->num_axis ) )\n      T1_Done_Blend( face );\n\n    /* another safety check */\n    if ( face->blend )\n    {\n      FT_UInt  i;\n\n\n      for ( i = 0; i < face->blend->num_axis; i++ )\n        if ( !face->blend->design_map[i].num_points )\n        {\n          T1_Done_Blend( face );\n          break;\n        }\n    }\n\n    if ( face->blend )\n    {\n      if ( face->len_buildchar > 0 )\n      {\n        FT_Memory  memory = face->root.memory;\n\n\n        if ( FT_NEW_ARRAY( face->buildchar, face->len_buildchar ) )\n        {\n          FT_ERROR(( \"T1_Open_Face: cannot allocate BuildCharArray\\n\" ));\n          face->len_buildchar = 0;\n          goto Exit;\n        }\n      }\n    }\n    else\n      face->len_buildchar = 0;\n\n#endif /* !T1_CONFIG_OPTION_NO_MM_SUPPORT */\n\n    /* now, propagate the subrs, charstrings, and glyphnames tables */\n    /* to the Type1 data                                            */\n    type1->num_glyphs = loader.num_glyphs;\n\n    if ( loader.subrs.init )\n    {\n      loader.subrs.init  = 0;\n      type1->num_subrs   = loader.num_subrs;\n      type1->subrs_block = loader.subrs.block;\n      type1->subrs       = loader.subrs.elements;\n      type1->subrs_len   = loader.subrs.lengths;\n    }\n\n    if ( !IS_INCREMENTAL )\n      if ( !loader.charstrings.init )\n      {\n        FT_ERROR(( \"T1_Open_Face: no `/CharStrings' array in face\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n      }\n\n    loader.charstrings.init  = 0;\n    type1->charstrings_block = loader.charstrings.block;\n    type1->charstrings       = loader.charstrings.elements;\n    type1->charstrings_len   = loader.charstrings.lengths;\n\n    /* we copy the glyph names `block' and `elements' fields; */\n    /* the `lengths' field must be released later             */\n    type1->glyph_names_block    = loader.glyph_names.block;\n    type1->glyph_names          = (FT_String**)loader.glyph_names.elements;\n    loader.glyph_names.block    = 0;\n    loader.glyph_names.elements = 0;\n\n    /* we must now build type1.encoding when we have a custom array */\n    if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY )\n    {\n      FT_Int    charcode, idx, min_char, max_char;\n      FT_Byte*  glyph_name;\n\n\n      /* OK, we do the following: for each element in the encoding  */\n      /* table, look up the index of the glyph having the same name */\n      /* the index is then stored in type1.encoding.char_index, and */\n      /* the name to type1.encoding.char_name                       */\n\n      min_char = 0;\n      max_char = 0;\n\n      charcode = 0;\n      for ( ; charcode < loader.encoding_table.max_elems; charcode++ )\n      {\n        FT_Byte*  char_name;\n\n\n        type1->encoding.char_index[charcode] = 0;\n        type1->encoding.char_name [charcode] = (char *)\".notdef\";\n\n        char_name = loader.encoding_table.elements[charcode];\n        if ( char_name )\n          for ( idx = 0; idx < type1->num_glyphs; idx++ )\n          {\n            glyph_name = (FT_Byte*)type1->glyph_names[idx];\n            if ( ft_strcmp( (const char*)char_name,\n                            (const char*)glyph_name ) == 0 )\n            {\n              type1->encoding.char_index[charcode] = (FT_UShort)idx;\n              type1->encoding.char_name [charcode] = (char*)glyph_name;\n\n              /* Change min/max encoded char only if glyph name is */\n              /* not /.notdef                                      */\n              if ( ft_strcmp( (const char*)\".notdef\",\n                              (const char*)glyph_name ) != 0 )\n              {\n                if ( charcode < min_char )\n                  min_char = charcode;\n                if ( charcode >= max_char )\n                  max_char = charcode + 1;\n              }\n              break;\n            }\n          }\n      }\n\n      type1->encoding.code_first = min_char;\n      type1->encoding.code_last  = max_char;\n      type1->encoding.num_chars  = loader.num_chars;\n    }\n\n  Exit:\n    t1_done_loader( &loader );\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1load.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1load.h                                                               */\n/*                                                                         */\n/*    Type 1 font loader (specification).                                  */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2004, 2006, 2007 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1LOAD_H__\n#define __T1LOAD_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n#include FT_MULTIPLE_MASTERS_H\n\n#include \"t1parse.h\"\n\n\nFT_BEGIN_HEADER\n\n\n  typedef struct  T1_Loader_\n  {\n    T1_ParserRec  parser;          /* parser used to read the stream */\n\n    FT_Int        num_chars;       /* number of characters in encoding */\n    PS_TableRec   encoding_table;  /* PS_Table used to store the       */\n                                   /* encoding character names         */\n\n    FT_Int        num_glyphs;\n    PS_TableRec   glyph_names;\n    PS_TableRec   charstrings;\n    PS_TableRec   swap_table;      /* For moving .notdef glyph to index 0. */\n\n    FT_Int        num_subrs;\n    PS_TableRec   subrs;\n    FT_Bool       fontdata;\n\n    FT_UInt       keywords_encountered; /* T1_LOADER_ENCOUNTERED_XXX */\n\n  } T1_LoaderRec, *T1_Loader;\n\n\n  /* treatment of some keywords differs depending on whether */\n  /* they precede or follow certain other keywords           */\n\n#define T1_PRIVATE                ( 1 << 0 )\n#define T1_FONTDIR_AFTER_PRIVATE  ( 1 << 1 )\n\n\n  FT_LOCAL( FT_Error )\n  T1_Open_Face( T1_Face  face );\n\n#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT\n\n  FT_LOCAL( FT_Error )\n  T1_Get_Multi_Master( T1_Face           face,\n                       FT_Multi_Master*  master );\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Get_MM_Var( T1_Face      face,\n                 FT_MM_Var*  *master );\n\n  FT_LOCAL( FT_Error )\n  T1_Set_MM_Blend( T1_Face    face,\n                   FT_UInt    num_coords,\n                   FT_Fixed*  coords );\n\n  FT_LOCAL( FT_Error )\n  T1_Set_MM_Design( T1_Face   face,\n                    FT_UInt   num_coords,\n                    FT_Long*  coords );\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Set_Var_Design( T1_Face    face,\n                     FT_UInt    num_coords,\n                     FT_Fixed*  coords );\n\n  FT_LOCAL( void )\n  T1_Done_Blend( T1_Face  face );\n\n#endif /* !T1_CONFIG_OPTION_NO_MM_SUPPORT */\n\n\nFT_END_HEADER\n\n#endif /* __T1LOAD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1objs.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1objs.c                                                               */\n/*                                                                         */\n/*    Type 1 objects manager (body).                                       */\n/*                                                                         */\n/*  Copyright 1996-2009, 2011, 2013 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_CALC_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_TRUETYPE_IDS_H\n\n#include \"t1gload.h\"\n#include \"t1load.h\"\n\n#include \"t1errors.h\"\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n#include \"t1afm.h\"\n#endif\n\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t1objs\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                            SIZE FUNCTIONS                             */\n  /*                                                                       */\n  /*  note that we store the global hints in the size's \"internal\" root    */\n  /*  field                                                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  static PSH_Globals_Funcs\n  T1_Size_Get_Globals_Funcs( T1_Size  size )\n  {\n    T1_Face           face     = (T1_Face)size->root.face;\n    PSHinter_Service  pshinter = (PSHinter_Service)face->pshinter;\n    FT_Module         module;\n\n\n    module = FT_Get_Module( size->root.face->driver->root.library,\n                            \"pshinter\" );\n    return ( module && pshinter && pshinter->get_globals_funcs )\n           ? pshinter->get_globals_funcs( module )\n           : 0 ;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  T1_Size_Done( FT_Size  t1size )          /* T1_Size */\n  {\n    T1_Size  size = (T1_Size)t1size;\n\n\n    if ( size->root.internal )\n    {\n      PSH_Globals_Funcs  funcs;\n\n\n      funcs = T1_Size_Get_Globals_Funcs( size );\n      if ( funcs )\n        funcs->destroy( (PSH_Globals)size->root.internal );\n\n      size->root.internal = 0;\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Size_Init( FT_Size  t1size )      /* T1_Size */\n  {\n    T1_Size            size  = (T1_Size)t1size;\n    FT_Error           error = FT_Err_Ok;\n    PSH_Globals_Funcs  funcs = T1_Size_Get_Globals_Funcs( size );\n\n\n    if ( funcs )\n    {\n      PSH_Globals  globals;\n      T1_Face      face = (T1_Face)size->root.face;\n\n\n      error = funcs->create( size->root.face->memory,\n                             &face->type1.private_dict, &globals );\n      if ( !error )\n        size->root.internal = (FT_Size_Internal)(void*)globals;\n    }\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Size_Request( FT_Size          t1size,     /* T1_Size */\n                   FT_Size_Request  req )\n  {\n    T1_Size            size  = (T1_Size)t1size;\n    PSH_Globals_Funcs  funcs = T1_Size_Get_Globals_Funcs( size );\n\n\n    FT_Request_Metrics( size->root.face, req );\n\n    if ( funcs )\n      funcs->set_scale( (PSH_Globals)size->root.internal,\n                        size->root.metrics.x_scale,\n                        size->root.metrics.y_scale,\n                        0, 0 );\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                            SLOT  FUNCTIONS                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n  FT_LOCAL_DEF( void )\n  T1_GlyphSlot_Done( FT_GlyphSlot  slot )\n  {\n    slot->internal->glyph_hints = 0;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_GlyphSlot_Init( FT_GlyphSlot  slot )\n  {\n    T1_Face           face;\n    PSHinter_Service  pshinter;\n\n\n    face     = (T1_Face)slot->face;\n    pshinter = (PSHinter_Service)face->pshinter;\n\n    if ( pshinter )\n    {\n      FT_Module  module;\n\n\n      module = FT_Get_Module( slot->face->driver->root.library,\n                              \"pshinter\" );\n      if ( module )\n      {\n        T1_Hints_Funcs  funcs;\n\n\n        funcs = pshinter->get_t1_funcs( module );\n        slot->internal->glyph_hints = (void*)funcs;\n      }\n    }\n\n    return 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                            FACE  FUNCTIONS                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    T1_Face_Done                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The face object destructor.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A typeless pointer to the face object to destroy.          */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  T1_Face_Done( FT_Face  t1face )         /* T1_Face */\n  {\n    T1_Face    face = (T1_Face)t1face;\n    FT_Memory  memory;\n    T1_Font    type1;\n\n\n    if ( !face )\n      return;\n\n    memory = face->root.memory;\n    type1  = &face->type1;\n\n#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT\n    /* release multiple masters information */\n    FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );\n\n    if ( face->buildchar )\n    {\n      FT_FREE( face->buildchar );\n\n      face->buildchar     = NULL;\n      face->len_buildchar = 0;\n    }\n\n    T1_Done_Blend( face );\n    face->blend = 0;\n#endif\n\n    /* release font info strings */\n    {\n      PS_FontInfo  info = &type1->font_info;\n\n\n      FT_FREE( info->version );\n      FT_FREE( info->notice );\n      FT_FREE( info->full_name );\n      FT_FREE( info->family_name );\n      FT_FREE( info->weight );\n    }\n\n    /* release top dictionary */\n    FT_FREE( type1->charstrings_len );\n    FT_FREE( type1->charstrings );\n    FT_FREE( type1->glyph_names );\n\n    FT_FREE( type1->subrs );\n    FT_FREE( type1->subrs_len );\n\n    FT_FREE( type1->subrs_block );\n    FT_FREE( type1->charstrings_block );\n    FT_FREE( type1->glyph_names_block );\n\n    FT_FREE( type1->encoding.char_index );\n    FT_FREE( type1->encoding.char_name );\n    FT_FREE( type1->font_name );\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n    /* release afm data if present */\n    if ( face->afm_data )\n      T1_Done_Metrics( memory, (AFM_FontInfo)face->afm_data );\n#endif\n\n    /* release unicode map, if any */\n#if 0\n    FT_FREE( face->unicode_map_rec.maps );\n    face->unicode_map_rec.num_maps = 0;\n    face->unicode_map              = NULL;\n#endif\n\n    face->root.family_name = NULL;\n    face->root.style_name  = NULL;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    T1_Face_Init                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The face object constructor.                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    stream     ::  input stream where to load font data.               */\n  /*                                                                       */\n  /*    face_index :: The index of the font face in the resource.          */\n  /*                                                                       */\n  /*    num_params :: Number of additional generic parameters.  Ignored.   */\n  /*                                                                       */\n  /*    params     :: Additional generic parameters.  Ignored.             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: The face record to build.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  T1_Face_Init( FT_Stream      stream,\n                FT_Face        t1face,          /* T1_Face */\n                FT_Int         face_index,\n                FT_Int         num_params,\n                FT_Parameter*  params )\n  {\n    T1_Face             face = (T1_Face)t1face;\n    FT_Error            error;\n    FT_Service_PsCMaps  psnames;\n    PSAux_Service       psaux;\n    T1_Font             type1 = &face->type1;\n    PS_FontInfo         info = &type1->font_info;\n\n    FT_UNUSED( num_params );\n    FT_UNUSED( params );\n    FT_UNUSED( stream );\n\n\n    face->root.num_faces = 1;\n\n    FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );\n    face->psnames = psnames;\n\n    face->psaux = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),\n                                           \"psaux\" );\n    psaux = (PSAux_Service)face->psaux;\n    if ( !psaux )\n    {\n      FT_ERROR(( \"T1_Face_Init: cannot access `psaux' module\\n\" ));\n      error = FT_THROW( Missing_Module );\n      goto Exit;\n    }\n\n    face->pshinter = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),\n                                              \"pshinter\" );\n\n    FT_TRACE2(( \"Type 1 driver\\n\" ));\n\n    /* open the tokenizer; this will also check the font format */\n    error = T1_Open_Face( face );\n    if ( error )\n      goto Exit;\n\n    /* if we just wanted to check the format, leave successfully now */\n    if ( face_index < 0 )\n      goto Exit;\n\n    /* check the face index */\n    if ( face_index > 0 )\n    {\n      FT_ERROR(( \"T1_Face_Init: invalid face index\\n\" ));\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* now load the font program into the face object */\n\n    /* initialize the face object fields */\n\n    /* set up root face fields */\n    {\n      FT_Face  root = (FT_Face)&face->root;\n\n\n      root->num_glyphs = type1->num_glyphs;\n      root->face_index = 0;\n\n      root->face_flags |= FT_FACE_FLAG_SCALABLE    |\n                          FT_FACE_FLAG_HORIZONTAL  |\n                          FT_FACE_FLAG_GLYPH_NAMES |\n                          FT_FACE_FLAG_HINTER;\n\n      if ( info->is_fixed_pitch )\n        root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;\n\n      if ( face->blend )\n        root->face_flags |= FT_FACE_FLAG_MULTIPLE_MASTERS;\n\n      /* XXX: TODO -- add kerning with .afm support */\n\n\n      /* The following code to extract the family and the style is very   */\n      /* simplistic and might get some things wrong.  For a full-featured */\n      /* algorithm you might have a look at the whitepaper given at       */\n      /*                                                                  */\n      /*   http://blogs.msdn.com/text/archive/2007/04/23/wpf-font-selection-model.aspx */\n\n      /* get style name -- be careful, some broken fonts only */\n      /* have a `/FontName' dictionary entry!                 */\n      root->family_name = info->family_name;\n      root->style_name  = NULL;\n\n      if ( root->family_name )\n      {\n        char*  full   = info->full_name;\n        char*  family = root->family_name;\n\n\n        if ( full )\n        {\n          FT_Bool  the_same = TRUE;\n\n\n          while ( *full )\n          {\n            if ( *full == *family )\n            {\n              family++;\n              full++;\n            }\n            else\n            {\n              if ( *full == ' ' || *full == '-' )\n                full++;\n              else if ( *family == ' ' || *family == '-' )\n                family++;\n              else\n              {\n                the_same = FALSE;\n\n                if ( !*family )\n                  root->style_name = full;\n                break;\n              }\n            }\n          }\n\n          if ( the_same )\n            root->style_name = (char *)\"Regular\";\n        }\n      }\n      else\n      {\n        /* do we have a `/FontName'? */\n        if ( type1->font_name )\n          root->family_name = type1->font_name;\n      }\n\n      if ( !root->style_name )\n      {\n        if ( info->weight )\n          root->style_name = info->weight;\n        else\n          /* assume `Regular' style because we don't know better */\n          root->style_name = (char *)\"Regular\";\n      }\n\n      /* compute style flags */\n      root->style_flags = 0;\n      if ( info->italic_angle )\n        root->style_flags |= FT_STYLE_FLAG_ITALIC;\n      if ( info->weight )\n      {\n        if ( !ft_strcmp( info->weight, \"Bold\"  ) ||\n             !ft_strcmp( info->weight, \"Black\" ) )\n          root->style_flags |= FT_STYLE_FLAG_BOLD;\n      }\n\n      /* no embedded bitmap support */\n      root->num_fixed_sizes = 0;\n      root->available_sizes = 0;\n\n      root->bbox.xMin =   type1->font_bbox.xMin            >> 16;\n      root->bbox.yMin =   type1->font_bbox.yMin            >> 16;\n      /* no `U' suffix here to 0xFFFF! */\n      root->bbox.xMax = ( type1->font_bbox.xMax + 0xFFFF ) >> 16;\n      root->bbox.yMax = ( type1->font_bbox.yMax + 0xFFFF ) >> 16;\n\n      /* Set units_per_EM if we didn't set it in t1_parse_font_matrix. */\n      if ( !root->units_per_EM )\n        root->units_per_EM = 1000;\n\n      root->ascender  = (FT_Short)( root->bbox.yMax );\n      root->descender = (FT_Short)( root->bbox.yMin );\n\n      root->height = (FT_Short)( ( root->units_per_EM * 12 ) / 10 );\n      if ( root->height < root->ascender - root->descender )\n        root->height = (FT_Short)( root->ascender - root->descender );\n\n      /* now compute the maximum advance width */\n      root->max_advance_width =\n        (FT_Short)( root->bbox.xMax );\n      {\n        FT_Pos  max_advance;\n\n\n        error = T1_Compute_Max_Advance( face, &max_advance );\n\n        /* in case of error, keep the standard width */\n        if ( !error )\n          root->max_advance_width = (FT_Short)FIXED_TO_INT( max_advance );\n        else\n          error = FT_Err_Ok;   /* clear error */\n      }\n\n      root->max_advance_height = root->height;\n\n      root->underline_position  = (FT_Short)info->underline_position;\n      root->underline_thickness = (FT_Short)info->underline_thickness;\n    }\n\n    {\n      FT_Face  root = &face->root;\n\n\n      if ( psnames )\n      {\n        FT_CharMapRec    charmap;\n        T1_CMap_Classes  cmap_classes = psaux->t1_cmap_classes;\n        FT_CMap_Class    clazz;\n\n\n        charmap.face = root;\n\n        /* first of all, try to synthesize a Unicode charmap */\n        charmap.platform_id = TT_PLATFORM_MICROSOFT;\n        charmap.encoding_id = TT_MS_ID_UNICODE_CS;\n        charmap.encoding    = FT_ENCODING_UNICODE;\n\n        error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );\n        if ( error                                      &&\n             FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )\n          goto Exit;\n        error = FT_Err_Ok;\n\n        /* now, generate an Adobe Standard encoding when appropriate */\n        charmap.platform_id = TT_PLATFORM_ADOBE;\n        clazz               = NULL;\n\n        switch ( type1->encoding_type )\n        {\n        case T1_ENCODING_TYPE_STANDARD:\n          charmap.encoding    = FT_ENCODING_ADOBE_STANDARD;\n          charmap.encoding_id = TT_ADOBE_ID_STANDARD;\n          clazz               = cmap_classes->standard;\n          break;\n\n        case T1_ENCODING_TYPE_EXPERT:\n          charmap.encoding    = FT_ENCODING_ADOBE_EXPERT;\n          charmap.encoding_id = TT_ADOBE_ID_EXPERT;\n          clazz               = cmap_classes->expert;\n          break;\n\n        case T1_ENCODING_TYPE_ARRAY:\n          charmap.encoding    = FT_ENCODING_ADOBE_CUSTOM;\n          charmap.encoding_id = TT_ADOBE_ID_CUSTOM;\n          clazz               = cmap_classes->custom;\n          break;\n\n        case T1_ENCODING_TYPE_ISOLATIN1:\n          charmap.encoding    = FT_ENCODING_ADOBE_LATIN_1;\n          charmap.encoding_id = TT_ADOBE_ID_LATIN_1;\n          clazz               = cmap_classes->unicode;\n          break;\n\n        default:\n          ;\n        }\n\n        if ( clazz )\n          error = FT_CMap_New( clazz, NULL, &charmap, NULL );\n\n#if 0\n        /* Select default charmap */\n        if (root->num_charmaps)\n          root->charmap = root->charmaps[0];\n#endif\n      }\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    T1_Driver_Init                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initializes a given Type 1 driver object.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    driver :: A handle to the target driver object.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  T1_Driver_Init( FT_Module  driver )\n  {\n    FT_UNUSED( driver );\n\n    return FT_Err_Ok;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    T1_Driver_Done                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Finalizes a given Type 1 driver.                                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    driver :: A handle to the target Type 1 driver.                    */\n  /*                                                                       */\n  FT_LOCAL_DEF( void )\n  T1_Driver_Done( FT_Module  driver )\n  {\n    FT_UNUSED( driver );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1objs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1objs.h                                                               */\n/*                                                                         */\n/*    Type 1 objects manager (specification).                              */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2006, 2011 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1OBJS_H__\n#define __T1OBJS_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_OBJECTS_H\n#include FT_CONFIG_CONFIG_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /* The following structures must be defined by the hinter */\n  typedef struct T1_Size_Hints_   T1_Size_Hints;\n  typedef struct T1_Glyph_Hints_  T1_Glyph_Hints;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    T1_Size                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a Type 1 size object.                                  */\n  /*                                                                       */\n  typedef struct T1_SizeRec_*  T1_Size;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    T1_GlyphSlot                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a Type 1 glyph slot object.                            */\n  /*                                                                       */\n  typedef struct T1_GlyphSlotRec_*  T1_GlyphSlot;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    T1_CharMap                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a Type 1 character mapping object.                     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The Type 1 format doesn't use a charmap but an encoding table.     */\n  /*    The driver is responsible for making up charmap objects            */\n  /*    corresponding to these tables.                                     */\n  /*                                                                       */\n  typedef struct T1_CharMapRec_*   T1_CharMap;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                  HERE BEGINS THE TYPE1 SPECIFIC STUFF                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    T1_SizeRec                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Type 1 size record.                                                */\n  /*                                                                       */\n  typedef struct  T1_SizeRec_\n  {\n    FT_SizeRec  root;\n\n  } T1_SizeRec;\n\n\n  FT_LOCAL( void )\n  T1_Size_Done( FT_Size  size );\n\n  FT_LOCAL( FT_Error )\n  T1_Size_Request( FT_Size          size,\n                   FT_Size_Request  req );\n\n  FT_LOCAL( FT_Error )\n  T1_Size_Init( FT_Size  size );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    T1_GlyphSlotRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Type 1 glyph slot record.                                          */\n  /*                                                                       */\n  typedef struct  T1_GlyphSlotRec_\n  {\n    FT_GlyphSlotRec  root;\n\n    FT_Bool          hint;\n    FT_Bool          scaled;\n\n    FT_Int           max_points;\n    FT_Int           max_contours;\n\n    FT_Fixed         x_scale;\n    FT_Fixed         y_scale;\n\n  } T1_GlyphSlotRec;\n\n\n  FT_LOCAL( FT_Error )\n  T1_Face_Init( FT_Stream      stream,\n                FT_Face        face,\n                FT_Int         face_index,\n                FT_Int         num_params,\n                FT_Parameter*  params );\n\n  FT_LOCAL( void )\n  T1_Face_Done( FT_Face  face );\n\n  FT_LOCAL( FT_Error )\n  T1_GlyphSlot_Init( FT_GlyphSlot  slot );\n\n  FT_LOCAL( void )\n  T1_GlyphSlot_Done( FT_GlyphSlot  slot );\n\n  FT_LOCAL( FT_Error )\n  T1_Driver_Init( FT_Module  driver );\n\n  FT_LOCAL( void )\n  T1_Driver_Done( FT_Module  driver );\n\n\nFT_END_HEADER\n\n#endif /* __T1OBJS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1parse.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1parse.c                                                              */\n/*                                                                         */\n/*    Type 1 parser (body).                                                */\n/*                                                                         */\n/*  Copyright 1996-2005, 2008, 2009, 2012-2014 by                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The Type 1 parser is in charge of the following:                      */\n  /*                                                                       */\n  /*  - provide an implementation of a growing sequence of objects called  */\n  /*    a `T1_Table' (used to build various tables needed by the loader).  */\n  /*                                                                       */\n  /*  - opening .pfb and .pfa files to extract their top-level and private */\n  /*    dictionaries.                                                      */\n  /*                                                                       */\n  /*  - read numbers, arrays & strings from any dictionary.                */\n  /*                                                                       */\n  /* See `t1load.c' to see how data is loaded from the font file.          */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\n#include \"t1parse.h\"\n\n#include \"t1errors.h\"\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t1parse\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                   INPUT STREAM PARSER                         *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* see Adobe Technical Note 5040.Download_Fonts.pdf */\n\n  static FT_Error\n  read_pfb_tag( FT_Stream   stream,\n                FT_UShort  *atag,\n                FT_ULong   *asize )\n  {\n    FT_Error   error;\n    FT_UShort  tag;\n    FT_ULong   size;\n\n\n    *atag  = 0;\n    *asize = 0;\n\n    if ( !FT_READ_USHORT( tag ) )\n    {\n      if ( tag == 0x8001U || tag == 0x8002U )\n      {\n        if ( !FT_READ_ULONG_LE( size ) )\n          *asize = size;\n      }\n\n      *atag = tag;\n    }\n\n    return error;\n  }\n\n\n  static FT_Error\n  check_type1_format( FT_Stream    stream,\n                      const char*  header_string,\n                      size_t       header_length )\n  {\n    FT_Error   error;\n    FT_UShort  tag;\n    FT_ULong   dummy;\n\n\n    if ( FT_STREAM_SEEK( 0 ) )\n      goto Exit;\n\n    error = read_pfb_tag( stream, &tag, &dummy );\n    if ( error )\n      goto Exit;\n\n    /* We assume that the first segment in a PFB is always encoded as   */\n    /* text.  This might be wrong (and the specification doesn't insist */\n    /* on that), but we have never seen a counterexample.               */\n    if ( tag != 0x8001U && FT_STREAM_SEEK( 0 ) )\n      goto Exit;\n\n    if ( !FT_FRAME_ENTER( header_length ) )\n    {\n      error = FT_Err_Ok;\n\n      if ( ft_memcmp( stream->cursor, header_string, header_length ) != 0 )\n        error = FT_THROW( Unknown_File_Format );\n\n      FT_FRAME_EXIT();\n    }\n\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_New_Parser( T1_Parser      parser,\n                 FT_Stream      stream,\n                 FT_Memory      memory,\n                 PSAux_Service  psaux )\n  {\n    FT_Error   error;\n    FT_UShort  tag;\n    FT_ULong   size;\n\n\n    psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory );\n\n    parser->stream       = stream;\n    parser->base_len     = 0;\n    parser->base_dict    = 0;\n    parser->private_len  = 0;\n    parser->private_dict = 0;\n    parser->in_pfb       = 0;\n    parser->in_memory    = 0;\n    parser->single_block = 0;\n\n    /* check the header format */\n    error = check_type1_format( stream, \"%!PS-AdobeFont\", 14 );\n    if ( error )\n    {\n      if ( FT_ERR_NEQ( error, Unknown_File_Format ) )\n        goto Exit;\n\n      error = check_type1_format( stream, \"%!FontType\", 10 );\n      if ( error )\n      {\n        FT_TRACE2(( \"  not a Type 1 font\\n\" ));\n        goto Exit;\n      }\n    }\n\n    /******************************************************************/\n    /*                                                                */\n    /* Here a short summary of what is going on:                      */\n    /*                                                                */\n    /*   When creating a new Type 1 parser, we try to locate and load */\n    /*   the base dictionary if this is possible (i.e., for PFB       */\n    /*   files).  Otherwise, we load the whole font into memory.      */\n    /*                                                                */\n    /*   When `loading' the base dictionary, we only setup pointers   */\n    /*   in the case of a memory-based stream.  Otherwise, we         */\n    /*   allocate and load the base dictionary in it.                 */\n    /*                                                                */\n    /*   parser->in_pfb is set if we are in a binary (`.pfb') font.   */\n    /*   parser->in_memory is set if we have a memory stream.         */\n    /*                                                                */\n\n    /* try to compute the size of the base dictionary;     */\n    /* look for a Postscript binary file tag, i.e., 0x8001 */\n    if ( FT_STREAM_SEEK( 0L ) )\n      goto Exit;\n\n    error = read_pfb_tag( stream, &tag, &size );\n    if ( error )\n      goto Exit;\n\n    if ( tag != 0x8001U )\n    {\n      /* assume that this is a PFA file for now; an error will */\n      /* be produced later when more things are checked        */\n      if ( FT_STREAM_SEEK( 0L ) )\n        goto Exit;\n      size = stream->size;\n    }\n    else\n      parser->in_pfb = 1;\n\n    /* now, try to load `size' bytes of the `base' dictionary we */\n    /* found previously                                          */\n\n    /* if it is a memory-based resource, set up pointers */\n    if ( !stream->read )\n    {\n      parser->base_dict = (FT_Byte*)stream->base + stream->pos;\n      parser->base_len  = size;\n      parser->in_memory = 1;\n\n      /* check that the `size' field is valid */\n      if ( FT_STREAM_SKIP( size ) )\n        goto Exit;\n    }\n    else\n    {\n      /* read segment in memory -- this is clumsy, but so does the format */\n      if ( FT_ALLOC( parser->base_dict, size )       ||\n           FT_STREAM_READ( parser->base_dict, size ) )\n        goto Exit;\n      parser->base_len = size;\n    }\n\n    parser->root.base   = parser->base_dict;\n    parser->root.cursor = parser->base_dict;\n    parser->root.limit  = parser->root.cursor + parser->base_len;\n\n  Exit:\n    if ( error && !parser->in_memory )\n      FT_FREE( parser->base_dict );\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  T1_Finalize_Parser( T1_Parser  parser )\n  {\n    FT_Memory  memory = parser->root.memory;\n\n\n    /* always free the private dictionary */\n    FT_FREE( parser->private_dict );\n\n    /* free the base dictionary only when we have a disk stream */\n    if ( !parser->in_memory )\n      FT_FREE( parser->base_dict );\n\n    parser->root.funcs.done( &parser->root );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T1_Get_Private_Dict( T1_Parser      parser,\n                       PSAux_Service  psaux )\n  {\n    FT_Stream  stream = parser->stream;\n    FT_Memory  memory = parser->root.memory;\n    FT_Error   error  = FT_Err_Ok;\n    FT_ULong   size;\n\n\n    if ( parser->in_pfb )\n    {\n      /* in the case of the PFB format, the private dictionary can be  */\n      /* made of several segments.  We thus first read the number of   */\n      /* segments to compute the total size of the private dictionary  */\n      /* then re-read them into memory.                                */\n      FT_Long    start_pos = FT_STREAM_POS();\n      FT_UShort  tag;\n\n\n      parser->private_len = 0;\n      for (;;)\n      {\n        error = read_pfb_tag( stream, &tag, &size );\n        if ( error )\n          goto Fail;\n\n        if ( tag != 0x8002U )\n          break;\n\n        parser->private_len += size;\n\n        if ( FT_STREAM_SKIP( size ) )\n          goto Fail;\n      }\n\n      /* Check that we have a private dictionary there */\n      /* and allocate private dictionary buffer        */\n      if ( parser->private_len == 0 )\n      {\n        FT_ERROR(( \"T1_Get_Private_Dict:\"\n                   \" invalid private dictionary section\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Fail;\n      }\n\n      if ( FT_STREAM_SEEK( start_pos )                           ||\n           FT_ALLOC( parser->private_dict, parser->private_len ) )\n        goto Fail;\n\n      parser->private_len = 0;\n      for (;;)\n      {\n        error = read_pfb_tag( stream, &tag, &size );\n        if ( error || tag != 0x8002U )\n        {\n          error = FT_Err_Ok;\n          break;\n        }\n\n        if ( FT_STREAM_READ( parser->private_dict + parser->private_len,\n                             size ) )\n          goto Fail;\n\n        parser->private_len += size;\n      }\n    }\n    else\n    {\n      /* We have already `loaded' the whole PFA font file into memory; */\n      /* if this is a memory resource, allocate a new block to hold    */\n      /* the private dict.  Otherwise, simply overwrite into the base  */\n      /* dictionary block in the heap.                                 */\n\n      /* first of all, look at the `eexec' keyword */\n      FT_Byte*    cur   = parser->base_dict;\n      FT_Byte*    limit = cur + parser->base_len;\n      FT_Byte     c;\n      FT_Pointer  pos_lf;\n      FT_Bool     test_cr;\n\n\n    Again:\n      for (;;)\n      {\n        c = cur[0];\n        if ( c == 'e' && cur + 9 < limit )  /* 9 = 5 letters for `eexec' + */\n                                            /* whitespace + 4 chars        */\n        {\n          if ( cur[1] == 'e' &&\n               cur[2] == 'x' &&\n               cur[3] == 'e' &&\n               cur[4] == 'c' )\n            break;\n        }\n        cur++;\n        if ( cur >= limit )\n        {\n          FT_ERROR(( \"T1_Get_Private_Dict:\"\n                     \" could not find `eexec' keyword\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n      }\n\n      /* check whether `eexec' was real -- it could be in a comment */\n      /* or string (as e.g. in u003043t.gsf from ghostscript)       */\n\n      parser->root.cursor = parser->base_dict;\n      /* set limit to `eexec' + whitespace + 4 characters */\n      parser->root.limit  = cur + 10;\n\n      cur   = parser->root.cursor;\n      limit = parser->root.limit;\n\n      while ( cur < limit )\n      {\n        if ( *cur == 'e' && ft_strncmp( (char*)cur, \"eexec\", 5 ) == 0 )\n          goto Found;\n\n        T1_Skip_PS_Token( parser );\n        if ( parser->root.error )\n          break;\n        T1_Skip_Spaces  ( parser );\n        cur = parser->root.cursor;\n      }\n\n      /* we haven't found the correct `eexec'; go back and continue */\n      /* searching                                                  */\n\n      cur   = limit;\n      limit = parser->base_dict + parser->base_len;\n      goto Again;\n\n      /* now determine where to write the _encrypted_ binary private  */\n      /* dictionary.  We overwrite the base dictionary for disk-based */\n      /* resources and allocate a new block otherwise                 */\n\n    Found:\n      parser->root.limit = parser->base_dict + parser->base_len;\n\n      T1_Skip_PS_Token( parser );\n      cur   = parser->root.cursor;\n      limit = parser->root.limit;\n\n      /* According to the Type 1 spec, the first cipher byte must not be */\n      /* an ASCII whitespace character code (blank, tab, carriage return */\n      /* or line feed).  We have seen Type 1 fonts with two line feed    */\n      /* characters...  So skip now all whitespace character codes.      */\n      /*                                                                 */\n      /* On the other hand, Adobe's Type 1 parser handles fonts just     */\n      /* fine that are violating this limitation, so we add a heuristic  */\n      /* test to stop at \\r only if it is not used for EOL.              */\n\n      pos_lf  = ft_memchr( cur, '\\n', limit - cur );\n      test_cr = FT_BOOL( !pos_lf                                      ||\n                         pos_lf > ft_memchr( cur, '\\r', limit - cur ) );\n\n      while ( cur < limit                    &&\n              ( *cur == ' '                ||\n                *cur == '\\t'               ||\n                (test_cr && *cur == '\\r' ) ||\n                *cur == '\\n'               ) )\n        ++cur;\n      if ( cur >= limit )\n      {\n        FT_ERROR(( \"T1_Get_Private_Dict:\"\n                   \" `eexec' not properly terminated\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      size = (FT_ULong)( parser->base_len - ( cur - parser->base_dict ) );\n\n      if ( parser->in_memory )\n      {\n        /* note that we allocate one more byte to put a terminating `0' */\n        if ( FT_ALLOC( parser->private_dict, size + 1 ) )\n          goto Fail;\n        parser->private_len = size;\n      }\n      else\n      {\n        parser->single_block = 1;\n        parser->private_dict = parser->base_dict;\n        parser->private_len  = size;\n        parser->base_dict    = 0;\n        parser->base_len     = 0;\n      }\n\n      /* now determine whether the private dictionary is encoded in binary */\n      /* or hexadecimal ASCII format -- decode it accordingly              */\n\n      /* we need to access the next 4 bytes (after the final whitespace */\n      /* following the `eexec' keyword); if they all are hexadecimal    */\n      /* digits, then we have a case of ASCII storage                   */\n\n      if ( cur + 3 < limit                                &&\n           ft_isxdigit( cur[0] ) && ft_isxdigit( cur[1] ) &&\n           ft_isxdigit( cur[2] ) && ft_isxdigit( cur[3] ) )\n      {\n        /* ASCII hexadecimal encoding */\n        FT_Long  len;\n\n\n        parser->root.cursor = cur;\n        (void)psaux->ps_parser_funcs->to_bytes( &parser->root,\n                                                parser->private_dict,\n                                                parser->private_len,\n                                                &len,\n                                                0 );\n        parser->private_len = len;\n\n        /* put a safeguard */\n        parser->private_dict[len] = '\\0';\n      }\n      else\n        /* binary encoding -- copy the private dict */\n        FT_MEM_MOVE( parser->private_dict, cur, size );\n    }\n\n    /* we now decrypt the encoded binary private dictionary */\n    psaux->t1_decrypt( parser->private_dict, parser->private_len, 55665U );\n\n    if ( parser->private_len < 4 )\n    {\n      FT_ERROR(( \"T1_Get_Private_Dict:\"\n                 \" invalid private dictionary section\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Fail;\n    }\n\n    /* replace the four random bytes at the beginning with whitespace */\n    parser->private_dict[0] = ' ';\n    parser->private_dict[1] = ' ';\n    parser->private_dict[2] = ' ';\n    parser->private_dict[3] = ' ';\n\n    parser->root.base   = parser->private_dict;\n    parser->root.cursor = parser->private_dict;\n    parser->root.limit  = parser->root.cursor + parser->private_len;\n\n  Fail:\n  Exit:\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1parse.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1parse.h                                                              */\n/*                                                                         */\n/*    Type 1 parser (specification).                                       */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2008 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1PARSE_H__\n#define __T1PARSE_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_TYPE1_TYPES_H\n#include FT_INTERNAL_STREAM_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    T1_ParserRec                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A PS_ParserRec is an object used to parse a Type 1 fonts very      */\n  /*    quickly.                                                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root         :: The root parser.                                   */\n  /*                                                                       */\n  /*    stream       :: The current input stream.                          */\n  /*                                                                       */\n  /*    base_dict    :: A pointer to the top-level dictionary.             */\n  /*                                                                       */\n  /*    base_len     :: The length in bytes of the top dictionary.         */\n  /*                                                                       */\n  /*    private_dict :: A pointer to the private dictionary.               */\n  /*                                                                       */\n  /*    private_len  :: The length in bytes of the private dictionary.     */\n  /*                                                                       */\n  /*    in_pfb       :: A boolean.  Indicates that we are handling a PFB   */\n  /*                    file.                                              */\n  /*                                                                       */\n  /*    in_memory    :: A boolean.  Indicates a memory-based stream.       */\n  /*                                                                       */\n  /*    single_block :: A boolean.  Indicates that the private dictionary  */\n  /*                    is stored in lieu of the base dictionary.          */\n  /*                                                                       */\n  typedef struct  T1_ParserRec_\n  {\n    PS_ParserRec  root;\n    FT_Stream     stream;\n\n    FT_Byte*      base_dict;\n    FT_ULong      base_len;\n\n    FT_Byte*      private_dict;\n    FT_ULong      private_len;\n\n    FT_Bool       in_pfb;\n    FT_Bool       in_memory;\n    FT_Bool       single_block;\n\n  } T1_ParserRec, *T1_Parser;\n\n\n#define T1_Add_Table( p, i, o, l )  (p)->funcs.add( (p), i, o, l )\n#define T1_Done_Table( p )          \\\n          do                        \\\n          {                         \\\n            if ( (p)->funcs.done )  \\\n              (p)->funcs.done( p ); \\\n          } while ( 0 )\n#define T1_Release_Table( p )          \\\n          do                           \\\n          {                            \\\n            if ( (p)->funcs.release )  \\\n              (p)->funcs.release( p ); \\\n          } while ( 0 )\n\n\n#define T1_Skip_Spaces( p )    (p)->root.funcs.skip_spaces( &(p)->root )\n#define T1_Skip_PS_Token( p )  (p)->root.funcs.skip_PS_token( &(p)->root )\n\n#define T1_ToInt( p )       (p)->root.funcs.to_int( &(p)->root )\n#define T1_ToFixed( p, t )  (p)->root.funcs.to_fixed( &(p)->root, t )\n\n#define T1_ToCoordArray( p, m, c )                           \\\n          (p)->root.funcs.to_coord_array( &(p)->root, m, c )\n#define T1_ToFixedArray( p, m, f, t )                           \\\n          (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )\n#define T1_ToToken( p, t )                          \\\n          (p)->root.funcs.to_token( &(p)->root, t )\n#define T1_ToTokenArray( p, t, m, c )                           \\\n          (p)->root.funcs.to_token_array( &(p)->root, t, m, c )\n\n#define T1_Load_Field( p, f, o, m, pf )                         \\\n          (p)->root.funcs.load_field( &(p)->root, f, o, m, pf )\n\n#define T1_Load_Field_Table( p, f, o, m, pf )                         \\\n          (p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf )\n\n\n  FT_LOCAL( FT_Error )\n  T1_New_Parser( T1_Parser      parser,\n                 FT_Stream      stream,\n                 FT_Memory      memory,\n                 PSAux_Service  psaux );\n\n  FT_LOCAL( FT_Error )\n  T1_Get_Private_Dict( T1_Parser      parser,\n                       PSAux_Service  psaux );\n\n  FT_LOCAL( void )\n  T1_Finalize_Parser( T1_Parser  parser );\n\n\nFT_END_HEADER\n\n#endif /* __T1PARSE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/t1tokens.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1tokens.h                                                             */\n/*                                                                         */\n/*    Type 1 tokenizer (specification).                                    */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by             */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PS_FontInfoRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FONT_INFO\n\n  T1_FIELD_STRING( \"version\",            version,\n                   T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_STRING( \"Notice\",             notice,\n                   T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_STRING( \"FullName\",           full_name,\n                   T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_STRING( \"FamilyName\",         family_name,\n                   T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_STRING( \"Weight\",             weight,\n                   T1_FIELD_DICT_FONTDICT )\n\n  /* we use pointers to detect modifications made by synthetic fonts */\n  T1_FIELD_NUM   ( \"ItalicAngle\",        italic_angle,\n                   T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_BOOL  ( \"isFixedPitch\",       is_fixed_pitch,\n                   T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_NUM   ( \"UnderlinePosition\",  underline_position,\n                   T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_NUM   ( \"UnderlineThickness\", underline_thickness,\n                   T1_FIELD_DICT_FONTDICT )\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PS_FontExtraRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FONT_EXTRA\n\n  T1_FIELD_NUM   ( \"FSType\", fs_type,\n                   T1_FIELD_DICT_FONTDICT )\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PS_PrivateRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_PRIVATE\n\n  T1_FIELD_NUM       ( \"UniqueID\",         unique_id,\n                       T1_FIELD_DICT_FONTDICT | T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM       ( \"lenIV\",            lenIV,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM       ( \"LanguageGroup\",    language_group,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM       ( \"password\",         password,\n                       T1_FIELD_DICT_PRIVATE )\n\n  T1_FIELD_FIXED_1000( \"BlueScale\",        blue_scale,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM       ( \"BlueShift\",        blue_shift,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM       ( \"BlueFuzz\",         blue_fuzz,\n                       T1_FIELD_DICT_PRIVATE )\n\n  T1_FIELD_NUM_TABLE ( \"BlueValues\",       blue_values,        14,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM_TABLE ( \"OtherBlues\",       other_blues,        10,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM_TABLE ( \"FamilyBlues\",      family_blues,       14,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM_TABLE ( \"FamilyOtherBlues\", family_other_blues, 10,\n                       T1_FIELD_DICT_PRIVATE )\n\n  T1_FIELD_NUM_TABLE2( \"StdHW\",            standard_width,      1,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM_TABLE2( \"StdVW\",            standard_height,     1,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM_TABLE2( \"MinFeature\",       min_feature,         2,\n                       T1_FIELD_DICT_PRIVATE )\n\n  T1_FIELD_NUM_TABLE ( \"StemSnapH\",        snap_widths,        12,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM_TABLE ( \"StemSnapV\",        snap_heights,       12,\n                       T1_FIELD_DICT_PRIVATE )\n\n  T1_FIELD_FIXED     ( \"ExpansionFactor\",  expansion_factor,\n                       T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_BOOL      ( \"ForceBold\",        force_bold,\n                       T1_FIELD_DICT_PRIVATE )\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  T1_FontRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FONT_DICT\n\n  T1_FIELD_KEY  ( \"FontName\",    font_name,    T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_NUM  ( \"PaintType\",   paint_type,   T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_NUM  ( \"FontType\",    font_type,    T1_FIELD_DICT_FONTDICT )\n  T1_FIELD_FIXED( \"StrokeWidth\", stroke_width, T1_FIELD_DICT_FONTDICT )\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  FT_BBox\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_BBOX\n\n  T1_FIELD_BBOX( \"FontBBox\", xMin, T1_FIELD_DICT_FONTDICT )\n\n\n#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  T1_FaceRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FACE\n\n  T1_FIELD_NUM( \"NDV\", ndv_idx, T1_FIELD_DICT_PRIVATE )\n  T1_FIELD_NUM( \"CDV\", cdv_idx, T1_FIELD_DICT_PRIVATE )\n\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PS_BlendRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_BLEND\n\n  T1_FIELD_NUM_TABLE( \"DesignVector\", default_design_vector,\n                      T1_MAX_MM_DESIGNS, T1_FIELD_DICT_FONTDICT )\n\n\n#endif /* T1_CONFIG_OPTION_NO_MM_SUPPORT */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type1/type1.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  type1.c                                                                */\n/*                                                                         */\n/*    FreeType Type 1 driver component (body only).                        */\n/*                                                                         */\n/*  Copyright 1996-2001 by                                                 */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"t1parse.c\"\n#include \"t1load.c\"\n#include \"t1objs.c\"\n#include \"t1driver.c\"\n#include \"t1gload.c\"\n\n#ifndef T1_CONFIG_OPTION_NO_AFM\n#include \"t1afm.c\"\n#endif\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type42/t42drivr.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t42drivr.c                                                             */\n/*                                                                         */\n/*    High-level Type 42 driver interface (body).                          */\n/*                                                                         */\n/*  Copyright 2002-2004, 2006, 2007, 2009, 2011, 2013 by                   */\n/*  Roberto Alameda.                                                       */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This driver implements Type42 fonts as described in the               */\n  /* Technical Note #5012 from Adobe, with these limitations:              */\n  /*                                                                       */\n  /* 1) CID Fonts are not currently supported.                             */\n  /* 2) Incremental fonts making use of the GlyphDirectory keyword         */\n  /*    will be loaded, but the rendering will be using the TrueType       */\n  /*    tables.                                                            */\n  /* 3) As for Type1 fonts, CDevProc is not supported.                     */\n  /* 4) The Metrics dictionary is not supported.                           */\n  /* 5) AFM metrics are not supported.                                     */\n  /*                                                                       */\n  /* In other words, this driver supports Type42 fonts derived from        */\n  /* TrueType fonts in a non-CID manner, as done by usual conversion       */\n  /* programs.                                                             */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#include \"t42drivr.h\"\n#include \"t42objs.h\"\n#include \"t42error.h\"\n#include FT_INTERNAL_DEBUG_H\n\n#include FT_SERVICE_XFREE86_NAME_H\n#include FT_SERVICE_GLYPH_DICT_H\n#include FT_SERVICE_POSTSCRIPT_NAME_H\n#include FT_SERVICE_POSTSCRIPT_INFO_H\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t42\n\n\n  /*\n   *\n   *  GLYPH DICT SERVICE\n   *\n   */\n\n  static FT_Error\n  t42_get_glyph_name( T42_Face    face,\n                      FT_UInt     glyph_index,\n                      FT_Pointer  buffer,\n                      FT_UInt     buffer_max )\n  {\n    FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_UInt\n  t42_get_name_index( T42_Face    face,\n                      FT_String*  glyph_name )\n  {\n    FT_Int  i;\n\n\n    for ( i = 0; i < face->type1.num_glyphs; i++ )\n    {\n      FT_String*  gname = face->type1.glyph_names[i];\n\n\n      if ( glyph_name[0] == gname[0] && !ft_strcmp( glyph_name, gname ) )\n        return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] );\n    }\n\n    return 0;\n  }\n\n\n  static const FT_Service_GlyphDictRec  t42_service_glyph_dict =\n  {\n    (FT_GlyphDict_GetNameFunc)  t42_get_glyph_name,\n    (FT_GlyphDict_NameIndexFunc)t42_get_name_index\n  };\n\n\n  /*\n   *\n   *  POSTSCRIPT NAME SERVICE\n   *\n   */\n\n  static const char*\n  t42_get_ps_font_name( T42_Face  face )\n  {\n    return (const char*)face->type1.font_name;\n  }\n\n\n  static const FT_Service_PsFontNameRec  t42_service_ps_font_name =\n  {\n    (FT_PsName_GetFunc)t42_get_ps_font_name\n  };\n\n\n  /*\n   *\n   *  POSTSCRIPT INFO SERVICE\n   *\n   */\n\n  static FT_Error\n  t42_ps_get_font_info( FT_Face          face,\n                        PS_FontInfoRec*  afont_info )\n  {\n    *afont_info = ((T42_Face)face)->type1.font_info;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  t42_ps_get_font_extra( FT_Face           face,\n                         PS_FontExtraRec*  afont_extra )\n  {\n    *afont_extra = ((T42_Face)face)->type1.font_extra;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Int\n  t42_ps_has_glyph_names( FT_Face  face )\n  {\n    FT_UNUSED( face );\n\n    return 1;\n  }\n\n\n  static FT_Error\n  t42_ps_get_font_private( FT_Face         face,\n                           PS_PrivateRec*  afont_private )\n  {\n    *afont_private = ((T42_Face)face)->type1.private_dict;\n\n    return FT_Err_Ok;\n  }\n\n\n  static const FT_Service_PsInfoRec  t42_service_ps_info =\n  {\n    (PS_GetFontInfoFunc)   t42_ps_get_font_info,\n    (PS_GetFontExtraFunc)  t42_ps_get_font_extra,\n    (PS_HasGlyphNamesFunc) t42_ps_has_glyph_names,\n    (PS_GetFontPrivateFunc)t42_ps_get_font_private,\n    (PS_GetFontValueFunc)  NULL             /* not implemented */\n  };\n\n\n  /*\n   *\n   *  SERVICE LIST\n   *\n   */\n\n  static const FT_ServiceDescRec  t42_services[] =\n  {\n    { FT_SERVICE_ID_GLYPH_DICT,           &t42_service_glyph_dict },\n    { FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &t42_service_ps_font_name },\n    { FT_SERVICE_ID_POSTSCRIPT_INFO,      &t42_service_ps_info },\n    { FT_SERVICE_ID_XF86_NAME,            FT_XF86_FORMAT_TYPE_42 },\n    { NULL, NULL }\n  };\n\n\n  FT_CALLBACK_DEF( FT_Module_Interface )\n  T42_Get_Interface( FT_Module         module,\n                     const FT_String*  t42_interface )\n  {\n    FT_UNUSED( module );\n\n    return ft_service_list_lookup( t42_services, t42_interface );\n  }\n\n\n  const FT_Driver_ClassRec  t42_driver_class =\n  {\n    {\n      FT_MODULE_FONT_DRIVER       |\n      FT_MODULE_DRIVER_SCALABLE   |\n#ifdef TT_USE_BYTECODE_INTERPRETER\n      FT_MODULE_DRIVER_HAS_HINTER,\n#else\n      0,\n#endif\n\n      sizeof ( T42_DriverRec ),\n\n      \"type42\",\n      0x10000L,\n      0x20000L,\n\n      0,    /* format interface */\n\n      T42_Driver_Init,\n      T42_Driver_Done,\n      T42_Get_Interface,\n    },\n\n    sizeof ( T42_FaceRec ),\n    sizeof ( T42_SizeRec ),\n    sizeof ( T42_GlyphSlotRec ),\n\n    T42_Face_Init,\n    T42_Face_Done,\n    T42_Size_Init,\n    T42_Size_Done,\n    T42_GlyphSlot_Init,\n    T42_GlyphSlot_Done,\n\n    T42_GlyphSlot_Load,\n\n    0,                 /* FT_Face_GetKerningFunc  */\n    0,                 /* FT_Face_AttachFunc      */\n\n    0,                 /* FT_Face_GetAdvancesFunc */\n    T42_Size_Request,\n    T42_Size_Select\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type42/t42drivr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t42drivr.h                                                             */\n/*                                                                         */\n/*    High-level Type 42 driver interface (specification).                 */\n/*                                                                         */\n/*  Copyright 2002 by Roberto Alameda.                                     */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T42DRIVR_H__\n#define __T42DRIVR_H__\n\n\n#include <ft2build.h>\n#include FT_INTERNAL_DRIVER_H\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n\n  FT_EXPORT_VAR( const FT_Driver_ClassRec )  t42_driver_class;\n\n\nFT_END_HEADER\n\n\n#endif /* __T42DRIVR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type42/t42error.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t42error.h                                                             */\n/*                                                                         */\n/*    Type 42 error codes (specification only).                            */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2012 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the Type 42 error enumeration constants.  */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __T42ERROR_H__\n#define __T42ERROR_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  T42_Err_\n#define FT_ERR_BASE    FT_Mod_Err_Type42\n\n#include FT_ERRORS_H\n\n#endif /* __T42ERROR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type42/t42objs.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t42objs.c                                                              */\n/*                                                                         */\n/*    Type 42 objects manager (body).                                      */\n/*                                                                         */\n/*  Copyright 2002-2009, 2011, 2013                                        */\n/*  by Roberto Alameda.                                                    */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"t42objs.h\"\n#include \"t42parse.h\"\n#include \"t42error.h\"\n#include FT_INTERNAL_DEBUG_H\n#include FT_LIST_H\n#include FT_TRUETYPE_IDS_H\n\n\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t42\n\n\n  static FT_Error\n  T42_Open_Face( T42_Face  face )\n  {\n    T42_LoaderRec  loader;\n    T42_Parser     parser;\n    T1_Font        type1 = &face->type1;\n    FT_Memory      memory = face->root.memory;\n    FT_Error       error;\n\n    PSAux_Service  psaux  = (PSAux_Service)face->psaux;\n\n\n    t42_loader_init( &loader, face );\n\n    parser = &loader.parser;\n\n    if ( FT_ALLOC( face->ttf_data, 12 ) )\n      goto Exit;\n\n    /* while parsing the font we always update `face->ttf_size' so that */\n    /* even in case of buggy data (which might lead to premature end of */\n    /* scanning without causing an error) the call to `FT_Open_Face' in */\n    /* `T42_Face_Init' passes the correct size                          */\n    face->ttf_size = 12;\n\n    error = t42_parser_init( parser,\n                             face->root.stream,\n                             memory,\n                             psaux);\n    if ( error )\n      goto Exit;\n\n    error = t42_parse_dict( face, &loader,\n                            parser->base_dict, parser->base_len );\n    if ( error )\n      goto Exit;\n\n    if ( type1->font_type != 42 )\n    {\n      FT_ERROR(( \"T42_Open_Face: cannot handle FontType %d\\n\",\n                 type1->font_type ));\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n\n    /* now, propagate the charstrings and glyphnames tables */\n    /* to the Type1 data                                    */\n    type1->num_glyphs = loader.num_glyphs;\n\n    if ( !loader.charstrings.init )\n    {\n      FT_ERROR(( \"T42_Open_Face: no charstrings array in face\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n    }\n\n    loader.charstrings.init  = 0;\n    type1->charstrings_block = loader.charstrings.block;\n    type1->charstrings       = loader.charstrings.elements;\n    type1->charstrings_len   = loader.charstrings.lengths;\n\n    /* we copy the glyph names `block' and `elements' fields; */\n    /* the `lengths' field must be released later             */\n    type1->glyph_names_block    = loader.glyph_names.block;\n    type1->glyph_names          = (FT_String**)loader.glyph_names.elements;\n    loader.glyph_names.block    = 0;\n    loader.glyph_names.elements = 0;\n\n    /* we must now build type1.encoding when we have a custom array */\n    if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY )\n    {\n      FT_Int    charcode, idx, min_char, max_char;\n      FT_Byte*  glyph_name;\n\n\n      /* OK, we do the following: for each element in the encoding   */\n      /* table, look up the index of the glyph having the same name  */\n      /* as defined in the CharStrings array.                        */\n      /* The index is then stored in type1.encoding.char_index, and  */\n      /* the name in type1.encoding.char_name                        */\n\n      min_char = 0;\n      max_char = 0;\n\n      charcode = 0;\n      for ( ; charcode < loader.encoding_table.max_elems; charcode++ )\n      {\n        FT_Byte*  char_name;\n\n\n        type1->encoding.char_index[charcode] = 0;\n        type1->encoding.char_name [charcode] = (char *)\".notdef\";\n\n        char_name = loader.encoding_table.elements[charcode];\n        if ( char_name )\n          for ( idx = 0; idx < type1->num_glyphs; idx++ )\n          {\n            glyph_name = (FT_Byte*)type1->glyph_names[idx];\n            if ( ft_strcmp( (const char*)char_name,\n                            (const char*)glyph_name ) == 0 )\n            {\n              type1->encoding.char_index[charcode] = (FT_UShort)idx;\n              type1->encoding.char_name [charcode] = (char*)glyph_name;\n\n              /* Change min/max encoded char only if glyph name is */\n              /* not /.notdef                                      */\n              if ( ft_strcmp( (const char*)\".notdef\",\n                              (const char*)glyph_name ) != 0 )\n              {\n                if ( charcode < min_char )\n                  min_char = charcode;\n                if ( charcode >= max_char )\n                  max_char = charcode + 1;\n              }\n              break;\n            }\n          }\n      }\n\n      type1->encoding.code_first = min_char;\n      type1->encoding.code_last  = max_char;\n      type1->encoding.num_chars  = loader.num_chars;\n    }\n\n  Exit:\n    t42_loader_done( &loader );\n    return error;\n  }\n\n\n  /***************** Driver Functions *************/\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T42_Face_Init( FT_Stream      stream,\n                 FT_Face        t42face,       /* T42_Face */\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params )\n  {\n    T42_Face            face  = (T42_Face)t42face;\n    FT_Error            error;\n    FT_Service_PsCMaps  psnames;\n    PSAux_Service       psaux;\n    FT_Face             root  = (FT_Face)&face->root;\n    T1_Font             type1 = &face->type1;\n    PS_FontInfo         info  = &type1->font_info;\n\n    FT_UNUSED( num_params );\n    FT_UNUSED( params );\n    FT_UNUSED( stream );\n\n\n    face->ttf_face       = NULL;\n    face->root.num_faces = 1;\n\n    FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );\n    face->psnames = psnames;\n\n    face->psaux = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),\n                                           \"psaux\" );\n    psaux = (PSAux_Service)face->psaux;\n    if ( !psaux )\n    {\n      FT_ERROR(( \"T42_Face_Init: cannot access `psaux' module\\n\" ));\n      error = FT_THROW( Missing_Module );\n      goto Exit;\n    }\n\n    FT_TRACE2(( \"Type 42 driver\\n\" ));\n\n    /* open the tokenizer, this will also check the font format */\n    error = T42_Open_Face( face );\n    if ( error )\n      goto Exit;\n\n    /* if we just wanted to check the format, leave successfully now */\n    if ( face_index < 0 )\n      goto Exit;\n\n    /* check the face index */\n    if ( face_index > 0 )\n    {\n      FT_ERROR(( \"T42_Face_Init: invalid face index\\n\" ));\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    /* Now load the font program into the face object */\n\n    /* Init the face object fields */\n    /* Now set up root face fields */\n\n    root->num_glyphs   = type1->num_glyphs;\n    root->num_charmaps = 0;\n    root->face_index   = 0;\n\n    root->face_flags |= FT_FACE_FLAG_SCALABLE    |\n                        FT_FACE_FLAG_HORIZONTAL  |\n                        FT_FACE_FLAG_GLYPH_NAMES;\n\n    if ( info->is_fixed_pitch )\n      root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;\n\n    /* We only set this flag if we have the patented bytecode interpreter. */\n    /* There are no known `tricky' Type42 fonts that could be loaded with  */\n    /* the unpatented interpreter.                                         */\n#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER\n    root->face_flags |= FT_FACE_FLAG_HINTER;\n#endif\n\n    /* XXX: TODO -- add kerning with .afm support */\n\n    /* get style name -- be careful, some broken fonts only */\n    /* have a `/FontName' dictionary entry!                 */\n    root->family_name = info->family_name;\n    /* assume \"Regular\" style if we don't know better */\n    root->style_name = (char *)\"Regular\";\n    if ( root->family_name )\n    {\n      char*  full   = info->full_name;\n      char*  family = root->family_name;\n\n\n      if ( full )\n      {\n        while ( *full )\n        {\n          if ( *full == *family )\n          {\n            family++;\n            full++;\n          }\n          else\n          {\n            if ( *full == ' ' || *full == '-' )\n              full++;\n            else if ( *family == ' ' || *family == '-' )\n              family++;\n            else\n            {\n              if ( !*family )\n                root->style_name = full;\n              break;\n            }\n          }\n        }\n      }\n    }\n    else\n    {\n      /* do we have a `/FontName'? */\n      if ( type1->font_name )\n        root->family_name = type1->font_name;\n    }\n\n    /* no embedded bitmap support */\n    root->num_fixed_sizes = 0;\n    root->available_sizes = 0;\n\n    /* Load the TTF font embedded in the T42 font */\n    {\n      FT_Open_Args  args;\n\n\n      args.flags       = FT_OPEN_MEMORY | FT_OPEN_DRIVER;\n      args.driver      = FT_Get_Module( FT_FACE_LIBRARY( face ),\n                                        \"truetype\" );\n      args.memory_base = face->ttf_data;\n      args.memory_size = face->ttf_size;\n\n      if ( num_params )\n      {\n        args.flags     |= FT_OPEN_PARAMS;\n        args.num_params = num_params;\n        args.params     = params;\n      }\n\n      error = FT_Open_Face( FT_FACE_LIBRARY( face ),\n                            &args, 0, &face->ttf_face );\n    }\n\n    if ( error )\n      goto Exit;\n\n    FT_Done_Size( face->ttf_face->size );\n\n    /* Ignore info in FontInfo dictionary and use the info from the  */\n    /* loaded TTF font.  The PostScript interpreter also ignores it. */\n    root->bbox         = face->ttf_face->bbox;\n    root->units_per_EM = face->ttf_face->units_per_EM;\n\n    root->ascender  = face->ttf_face->ascender;\n    root->descender = face->ttf_face->descender;\n    root->height    = face->ttf_face->height;\n\n    root->max_advance_width  = face->ttf_face->max_advance_width;\n    root->max_advance_height = face->ttf_face->max_advance_height;\n\n    root->underline_position  = (FT_Short)info->underline_position;\n    root->underline_thickness = (FT_Short)info->underline_thickness;\n\n    /* compute style flags */\n    root->style_flags = 0;\n    if ( info->italic_angle )\n      root->style_flags |= FT_STYLE_FLAG_ITALIC;\n\n    if ( face->ttf_face->style_flags & FT_STYLE_FLAG_BOLD )\n      root->style_flags |= FT_STYLE_FLAG_BOLD;\n\n    if ( face->ttf_face->face_flags & FT_FACE_FLAG_VERTICAL )\n      root->face_flags |= FT_FACE_FLAG_VERTICAL;\n\n    {\n      if ( psnames )\n      {\n        FT_CharMapRec    charmap;\n        T1_CMap_Classes  cmap_classes = psaux->t1_cmap_classes;\n        FT_CMap_Class    clazz;\n\n\n        charmap.face = root;\n\n        /* first of all, try to synthesize a Unicode charmap */\n        charmap.platform_id = TT_PLATFORM_MICROSOFT;\n        charmap.encoding_id = TT_MS_ID_UNICODE_CS;\n        charmap.encoding    = FT_ENCODING_UNICODE;\n\n        error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );\n        if ( error                                      &&\n             FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )\n          goto Exit;\n        error = FT_Err_Ok;\n\n        /* now, generate an Adobe Standard encoding when appropriate */\n        charmap.platform_id = TT_PLATFORM_ADOBE;\n        clazz               = NULL;\n\n        switch ( type1->encoding_type )\n        {\n        case T1_ENCODING_TYPE_STANDARD:\n          charmap.encoding    = FT_ENCODING_ADOBE_STANDARD;\n          charmap.encoding_id = TT_ADOBE_ID_STANDARD;\n          clazz               = cmap_classes->standard;\n          break;\n\n        case T1_ENCODING_TYPE_EXPERT:\n          charmap.encoding    = FT_ENCODING_ADOBE_EXPERT;\n          charmap.encoding_id = TT_ADOBE_ID_EXPERT;\n          clazz               = cmap_classes->expert;\n          break;\n\n        case T1_ENCODING_TYPE_ARRAY:\n          charmap.encoding    = FT_ENCODING_ADOBE_CUSTOM;\n          charmap.encoding_id = TT_ADOBE_ID_CUSTOM;\n          clazz               = cmap_classes->custom;\n          break;\n\n        case T1_ENCODING_TYPE_ISOLATIN1:\n          charmap.encoding    = FT_ENCODING_ADOBE_LATIN_1;\n          charmap.encoding_id = TT_ADOBE_ID_LATIN_1;\n          clazz               = cmap_classes->unicode;\n          break;\n\n        default:\n          ;\n        }\n\n        if ( clazz )\n          error = FT_CMap_New( clazz, NULL, &charmap, NULL );\n\n#if 0\n        /* Select default charmap */\n        if ( root->num_charmaps )\n          root->charmap = root->charmaps[0];\n#endif\n      }\n    }\n  Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  T42_Face_Done( FT_Face  t42face )\n  {\n    T42_Face     face = (T42_Face)t42face;\n    T1_Font      type1;\n    PS_FontInfo  info;\n    FT_Memory    memory;\n\n\n    if ( !face )\n      return;\n\n    type1  = &face->type1;\n    info   = &type1->font_info;\n    memory = face->root.memory;\n\n    /* delete internal ttf face prior to freeing face->ttf_data */\n    if ( face->ttf_face )\n      FT_Done_Face( face->ttf_face );\n\n    /* release font info strings */\n    FT_FREE( info->version );\n    FT_FREE( info->notice );\n    FT_FREE( info->full_name );\n    FT_FREE( info->family_name );\n    FT_FREE( info->weight );\n\n    /* release top dictionary */\n    FT_FREE( type1->charstrings_len );\n    FT_FREE( type1->charstrings );\n    FT_FREE( type1->glyph_names );\n\n    FT_FREE( type1->charstrings_block );\n    FT_FREE( type1->glyph_names_block );\n\n    FT_FREE( type1->encoding.char_index );\n    FT_FREE( type1->encoding.char_name );\n    FT_FREE( type1->font_name );\n\n    FT_FREE( face->ttf_data );\n\n#if 0\n    /* release afm data if present */\n    if ( face->afm_data )\n      T1_Done_AFM( memory, (T1_AFM*)face->afm_data );\n#endif\n\n    /* release unicode map, if any */\n    FT_FREE( face->unicode_map.maps );\n    face->unicode_map.num_maps = 0;\n\n    face->root.family_name = 0;\n    face->root.style_name  = 0;\n  }\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    T42_Driver_Init                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initializes a given Type 42 driver object.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    driver :: A handle to the target driver object.                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  FT_LOCAL_DEF( FT_Error )\n  T42_Driver_Init( FT_Module  module )        /* T42_Driver */\n  {\n    T42_Driver  driver = (T42_Driver)module;\n    FT_Module   ttmodule;\n\n\n    ttmodule = FT_Get_Module( module->library, \"truetype\" );\n    if ( !ttmodule )\n    {\n      FT_ERROR(( \"T42_Driver_Init: cannot access `truetype' module\\n\" ));\n      return FT_THROW( Missing_Module );\n    }\n\n    driver->ttclazz = (FT_Driver_Class)ttmodule->clazz;\n\n    return FT_Err_Ok;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  T42_Driver_Done( FT_Module  module )\n  {\n    FT_UNUSED( module );\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T42_Size_Init( FT_Size  size )         /* T42_Size */\n  {\n    T42_Size  t42size = (T42_Size)size;\n    FT_Face   face    = size->face;\n    T42_Face  t42face = (T42_Face)face;\n    FT_Size   ttsize;\n    FT_Error  error;\n\n\n    error = FT_New_Size( t42face->ttf_face, &ttsize );\n    t42size->ttsize = ttsize;\n\n    FT_Activate_Size( ttsize );\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T42_Size_Request( FT_Size          t42size,      /* T42_Size */\n                    FT_Size_Request  req )\n  {\n    T42_Size  size = (T42_Size)t42size;\n    T42_Face  face = (T42_Face)t42size->face;\n    FT_Error  error;\n\n\n    FT_Activate_Size( size->ttsize );\n\n    error = FT_Request_Size( face->ttf_face, req );\n    if ( !error )\n      t42size->metrics = face->ttf_face->size->metrics;\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T42_Size_Select( FT_Size   t42size,         /* T42_Size */\n                   FT_ULong  strike_index )\n  {\n    T42_Size  size = (T42_Size)t42size;\n    T42_Face  face = (T42_Face)t42size->face;\n    FT_Error  error;\n\n\n    FT_Activate_Size( size->ttsize );\n\n    error = FT_Select_Size( face->ttf_face, (FT_Int)strike_index );\n    if ( !error )\n      t42size->metrics = face->ttf_face->size->metrics;\n\n    return error;\n\n  }\n\n\n  FT_LOCAL_DEF( void )\n  T42_Size_Done( FT_Size  t42size )             /* T42_Size */\n  {\n    T42_Size     size    = (T42_Size)t42size;\n    FT_Face      face    = t42size->face;\n    T42_Face     t42face = (T42_Face)face;\n    FT_ListNode  node;\n\n\n    node = FT_List_Find( &t42face->ttf_face->sizes_list, size->ttsize );\n    if ( node )\n    {\n      FT_Done_Size( size->ttsize );\n      size->ttsize = NULL;\n    }\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T42_GlyphSlot_Init( FT_GlyphSlot  t42slot )        /* T42_GlyphSlot */\n  {\n    T42_GlyphSlot  slot    = (T42_GlyphSlot)t42slot;\n    FT_Face        face    = t42slot->face;\n    T42_Face       t42face = (T42_Face)face;\n    FT_GlyphSlot   ttslot;\n    FT_Error       error   = FT_Err_Ok;\n\n\n    if ( face->glyph == NULL )\n    {\n      /* First glyph slot for this face */\n      slot->ttslot = t42face->ttf_face->glyph;\n    }\n    else\n    {\n      error = FT_New_GlyphSlot( t42face->ttf_face, &ttslot );\n      slot->ttslot = ttslot;\n    }\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  T42_GlyphSlot_Done( FT_GlyphSlot  t42slot )       /* T42_GlyphSlot */\n  {\n    T42_GlyphSlot  slot = (T42_GlyphSlot)t42slot;\n\n\n    FT_Done_GlyphSlot( slot->ttslot );\n  }\n\n\n  static void\n  t42_glyphslot_clear( FT_GlyphSlot  slot )\n  {\n    /* free bitmap if needed */\n    ft_glyphslot_free_bitmap( slot );\n\n    /* clear all public fields in the glyph slot */\n    FT_ZERO( &slot->metrics );\n    FT_ZERO( &slot->outline );\n    FT_ZERO( &slot->bitmap );\n\n    slot->bitmap_left   = 0;\n    slot->bitmap_top    = 0;\n    slot->num_subglyphs = 0;\n    slot->subglyphs     = 0;\n    slot->control_data  = 0;\n    slot->control_len   = 0;\n    slot->other         = 0;\n    slot->format        = FT_GLYPH_FORMAT_NONE;\n\n    slot->linearHoriAdvance = 0;\n    slot->linearVertAdvance = 0;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  T42_GlyphSlot_Load( FT_GlyphSlot  glyph,\n                      FT_Size       size,\n                      FT_UInt       glyph_index,\n                      FT_Int32      load_flags )\n  {\n    FT_Error         error;\n    T42_GlyphSlot    t42slot = (T42_GlyphSlot)glyph;\n    T42_Size         t42size = (T42_Size)size;\n    FT_Driver_Class  ttclazz = ((T42_Driver)glyph->face->driver)->ttclazz;\n\n\n    FT_TRACE1(( \"T42_GlyphSlot_Load: glyph index %d\\n\", glyph_index ));\n\n    t42_glyphslot_clear( t42slot->ttslot );\n    error = ttclazz->load_glyph( t42slot->ttslot,\n                                 t42size->ttsize,\n                                 glyph_index,\n                                 load_flags | FT_LOAD_NO_BITMAP );\n\n    if ( !error )\n    {\n      glyph->metrics = t42slot->ttslot->metrics;\n\n      glyph->linearHoriAdvance = t42slot->ttslot->linearHoriAdvance;\n      glyph->linearVertAdvance = t42slot->ttslot->linearVertAdvance;\n\n      glyph->format  = t42slot->ttslot->format;\n      glyph->outline = t42slot->ttslot->outline;\n\n      glyph->bitmap      = t42slot->ttslot->bitmap;\n      glyph->bitmap_left = t42slot->ttslot->bitmap_left;\n      glyph->bitmap_top  = t42slot->ttslot->bitmap_top;\n\n      glyph->num_subglyphs = t42slot->ttslot->num_subglyphs;\n      glyph->subglyphs     = t42slot->ttslot->subglyphs;\n\n      glyph->control_data  = t42slot->ttslot->control_data;\n      glyph->control_len   = t42slot->ttslot->control_len;\n    }\n\n    return error;\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type42/t42objs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t42objs.h                                                              */\n/*                                                                         */\n/*    Type 42 objects manager (specification).                             */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2006, 2007, 2011 by Roberto Alameda.             */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T42OBJS_H__\n#define __T42OBJS_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_TYPE1_TABLES_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n#include \"t42types.h\"\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_DRIVER_H\n#include FT_SERVICE_POSTSCRIPT_CMAPS_H\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n\n\nFT_BEGIN_HEADER\n\n\n  /* Type42 size */\n  typedef struct  T42_SizeRec_\n  {\n    FT_SizeRec  root;\n    FT_Size     ttsize;\n\n  } T42_SizeRec, *T42_Size;\n\n\n  /* Type42 slot */\n  typedef struct  T42_GlyphSlotRec_\n  {\n    FT_GlyphSlotRec  root;\n    FT_GlyphSlot     ttslot;\n\n  } T42_GlyphSlotRec, *T42_GlyphSlot;\n\n\n  /* Type 42 driver */\n  typedef struct  T42_DriverRec_\n  {\n    FT_DriverRec     root;\n    FT_Driver_Class  ttclazz;\n    void*            extension_component;\n\n  } T42_DriverRec, *T42_Driver;\n\n\n  /* */\n\n\n  FT_LOCAL( FT_Error )\n  T42_Face_Init( FT_Stream      stream,\n                 FT_Face        face,\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params );\n\n\n  FT_LOCAL( void )\n  T42_Face_Done( FT_Face  face );\n\n\n  FT_LOCAL( FT_Error )\n  T42_Size_Init( FT_Size  size );\n\n\n  FT_LOCAL( FT_Error )\n  T42_Size_Request( FT_Size          size,\n                    FT_Size_Request  req );\n\n\n  FT_LOCAL( FT_Error )\n  T42_Size_Select( FT_Size   size,\n                   FT_ULong  strike_index );\n\n\n  FT_LOCAL( void )\n  T42_Size_Done( FT_Size  size );\n\n\n  FT_LOCAL( FT_Error )\n  T42_GlyphSlot_Init( FT_GlyphSlot  slot );\n\n\n  FT_LOCAL( FT_Error )\n  T42_GlyphSlot_Load( FT_GlyphSlot  glyph,\n                      FT_Size       size,\n                      FT_UInt       glyph_index,\n                      FT_Int32      load_flags );\n\n  FT_LOCAL( void )\n  T42_GlyphSlot_Done( FT_GlyphSlot  slot );\n\n\n  FT_LOCAL( FT_Error )\n  T42_Driver_Init( FT_Module  module );\n\n  FT_LOCAL( void )\n  T42_Driver_Done( FT_Module  module );\n\n /* */\n\nFT_END_HEADER\n\n\n#endif /* __T42OBJS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type42/t42parse.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t42parse.c                                                             */\n/*                                                                         */\n/*    Type 42 font parser (body).                                          */\n/*                                                                         */\n/*  Copyright 2002-2014 by                                                 */\n/*  Roberto Alameda.                                                       */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include \"t42parse.h\"\n#include \"t42error.h\"\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_t42\n\n\n  static void\n  t42_parse_font_matrix( T42_Face    face,\n                         T42_Loader  loader );\n  static void\n  t42_parse_encoding( T42_Face    face,\n                      T42_Loader  loader );\n\n  static void\n  t42_parse_charstrings( T42_Face    face,\n                         T42_Loader  loader );\n\n  static void\n  t42_parse_sfnts( T42_Face    face,\n                   T42_Loader  loader );\n\n\n  /* as Type42 fonts have no Private dict,         */\n  /* we set the last argument of T1_FIELD_XXX to 0 */\n  static const\n  T1_FieldRec  t42_keywords[] =\n  {\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  T1_FontInfo\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FONT_INFO\n\n    T1_FIELD_STRING( \"version\",            version,             0 )\n    T1_FIELD_STRING( \"Notice\",             notice,              0 )\n    T1_FIELD_STRING( \"FullName\",           full_name,           0 )\n    T1_FIELD_STRING( \"FamilyName\",         family_name,         0 )\n    T1_FIELD_STRING( \"Weight\",             weight,              0 )\n    T1_FIELD_NUM   ( \"ItalicAngle\",        italic_angle,        0 )\n    T1_FIELD_BOOL  ( \"isFixedPitch\",       is_fixed_pitch,      0 )\n    T1_FIELD_NUM   ( \"UnderlinePosition\",  underline_position,  0 )\n    T1_FIELD_NUM   ( \"UnderlineThickness\", underline_thickness, 0 )\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  PS_FontExtraRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FONT_EXTRA\n\n    T1_FIELD_NUM   ( \"FSType\",             fs_type,             0 )\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  T1_FontRec\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_FONT_DICT\n\n    T1_FIELD_KEY  ( \"FontName\",    font_name,    0 )\n    T1_FIELD_NUM  ( \"PaintType\",   paint_type,   0 )\n    T1_FIELD_NUM  ( \"FontType\",    font_type,    0 )\n    T1_FIELD_FIXED( \"StrokeWidth\", stroke_width, 0 )\n\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  FT_BBox\n#undef  T1CODE\n#define T1CODE        T1_FIELD_LOCATION_BBOX\n\n    T1_FIELD_BBOX(\"FontBBox\", xMin, 0 )\n\n    T1_FIELD_CALLBACK( \"FontMatrix\",  t42_parse_font_matrix, 0 )\n    T1_FIELD_CALLBACK( \"Encoding\",    t42_parse_encoding,    0 )\n    T1_FIELD_CALLBACK( \"CharStrings\", t42_parse_charstrings, 0 )\n    T1_FIELD_CALLBACK( \"sfnts\",       t42_parse_sfnts,       0 )\n\n    { 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0, 0 }\n  };\n\n\n#define T1_Add_Table( p, i, o, l )  (p)->funcs.add( (p), i, o, l )\n#define T1_Done_Table( p )          \\\n          do                        \\\n          {                         \\\n            if ( (p)->funcs.done )  \\\n              (p)->funcs.done( p ); \\\n          } while ( 0 )\n#define T1_Release_Table( p )          \\\n          do                           \\\n          {                            \\\n            if ( (p)->funcs.release )  \\\n              (p)->funcs.release( p ); \\\n          } while ( 0 )\n\n#define T1_Skip_Spaces( p )    (p)->root.funcs.skip_spaces( &(p)->root )\n#define T1_Skip_PS_Token( p )  (p)->root.funcs.skip_PS_token( &(p)->root )\n\n#define T1_ToInt( p )                          \\\n          (p)->root.funcs.to_int( &(p)->root )\n#define T1_ToBytes( p, b, m, n, d )                          \\\n          (p)->root.funcs.to_bytes( &(p)->root, b, m, n, d )\n\n#define T1_ToFixedArray( p, m, f, t )                           \\\n          (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )\n#define T1_ToToken( p, t )                          \\\n          (p)->root.funcs.to_token( &(p)->root, t )\n\n#define T1_Load_Field( p, f, o, m, pf )                         \\\n          (p)->root.funcs.load_field( &(p)->root, f, o, m, pf )\n#define T1_Load_Field_Table( p, f, o, m, pf )                         \\\n          (p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf )\n\n\n  /********************* Parsing Functions ******************/\n\n  FT_LOCAL_DEF( FT_Error )\n  t42_parser_init( T42_Parser     parser,\n                   FT_Stream      stream,\n                   FT_Memory      memory,\n                   PSAux_Service  psaux )\n  {\n    FT_Error  error = FT_Err_Ok;\n    FT_Long   size;\n\n\n    psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory );\n\n    parser->stream    = stream;\n    parser->base_len  = 0;\n    parser->base_dict = 0;\n    parser->in_memory = 0;\n\n    /*******************************************************************/\n    /*                                                                 */\n    /* Here a short summary of what is going on:                       */\n    /*                                                                 */\n    /*   When creating a new Type 42 parser, we try to locate and load */\n    /*   the base dictionary, loading the whole font into memory.      */\n    /*                                                                 */\n    /*   When `loading' the base dictionary, we only set up pointers   */\n    /*   in the case of a memory-based stream.  Otherwise, we allocate */\n    /*   and load the base dictionary in it.                           */\n    /*                                                                 */\n    /*   parser->in_memory is set if we have a memory stream.          */\n    /*                                                                 */\n\n    if ( FT_STREAM_SEEK( 0L ) ||\n         FT_FRAME_ENTER( 17 ) )\n      goto Exit;\n\n    if ( ft_memcmp( stream->cursor, \"%!PS-TrueTypeFont\", 17 ) != 0 )\n    {\n      FT_TRACE2(( \"  not a Type42 font\\n\" ));\n      error = FT_THROW( Unknown_File_Format );\n    }\n\n    FT_FRAME_EXIT();\n\n    if ( error || FT_STREAM_SEEK( 0 ) )\n      goto Exit;\n\n    size = stream->size;\n\n    /* now, try to load `size' bytes of the `base' dictionary we */\n    /* found previously                                          */\n\n    /* if it is a memory-based resource, set up pointers */\n    if ( !stream->read )\n    {\n      parser->base_dict = (FT_Byte*)stream->base + stream->pos;\n      parser->base_len  = size;\n      parser->in_memory = 1;\n\n      /* check that the `size' field is valid */\n      if ( FT_STREAM_SKIP( size ) )\n        goto Exit;\n    }\n    else\n    {\n      /* read segment in memory */\n      if ( FT_ALLOC( parser->base_dict, size )       ||\n           FT_STREAM_READ( parser->base_dict, size ) )\n        goto Exit;\n\n      parser->base_len = size;\n    }\n\n    parser->root.base   = parser->base_dict;\n    parser->root.cursor = parser->base_dict;\n    parser->root.limit  = parser->root.cursor + parser->base_len;\n\n  Exit:\n    if ( error && !parser->in_memory )\n      FT_FREE( parser->base_dict );\n\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  t42_parser_done( T42_Parser  parser )\n  {\n    FT_Memory  memory = parser->root.memory;\n\n\n    /* free the base dictionary only when we have a disk stream */\n    if ( !parser->in_memory )\n      FT_FREE( parser->base_dict );\n\n    parser->root.funcs.done( &parser->root );\n  }\n\n\n  static int\n  t42_is_space( FT_Byte  c )\n  {\n    return ( c == ' '  || c == '\\t'              ||\n             c == '\\r' || c == '\\n' || c == '\\f' ||\n             c == '\\0'                           );\n  }\n\n\n  static void\n  t42_parse_font_matrix( T42_Face    face,\n                         T42_Loader  loader )\n  {\n    T42_Parser  parser = &loader->parser;\n    FT_Matrix*  matrix = &face->type1.font_matrix;\n    FT_Vector*  offset = &face->type1.font_offset;\n    FT_Face     root   = (FT_Face)&face->root;\n    FT_Fixed    temp[6];\n    FT_Fixed    temp_scale;\n    FT_Int      result;\n\n\n    result = T1_ToFixedArray( parser, 6, temp, 3 );\n\n    if ( result < 6 )\n    {\n      parser->root.error = FT_THROW( Invalid_File_Format );\n      return;\n    }\n\n    temp_scale = FT_ABS( temp[3] );\n\n    if ( temp_scale == 0 )\n    {\n      FT_ERROR(( \"t1_parse_font_matrix: invalid font matrix\\n\" ));\n      parser->root.error = FT_THROW( Invalid_File_Format );\n      return;\n    }\n\n    /* Set Units per EM based on FontMatrix values.  We set the value to */\n    /* 1000 / temp_scale, because temp_scale was already multiplied by   */\n    /* 1000 (in t1_tofixed, from psobjs.c).                              */\n\n    root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );\n\n    /* we need to scale the values by 1.0/temp_scale */\n    if ( temp_scale != 0x10000L )\n    {\n      temp[0] = FT_DivFix( temp[0], temp_scale );\n      temp[1] = FT_DivFix( temp[1], temp_scale );\n      temp[2] = FT_DivFix( temp[2], temp_scale );\n      temp[4] = FT_DivFix( temp[4], temp_scale );\n      temp[5] = FT_DivFix( temp[5], temp_scale );\n      temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L;\n    }\n\n    matrix->xx = temp[0];\n    matrix->yx = temp[1];\n    matrix->xy = temp[2];\n    matrix->yy = temp[3];\n\n    /* note that the offsets must be expressed in integer font units */\n    offset->x = temp[4] >> 16;\n    offset->y = temp[5] >> 16;\n  }\n\n\n  static void\n  t42_parse_encoding( T42_Face    face,\n                      T42_Loader  loader )\n  {\n    T42_Parser  parser = &loader->parser;\n    FT_Byte*    cur;\n    FT_Byte*    limit  = parser->root.limit;\n\n    PSAux_Service  psaux  = (PSAux_Service)face->psaux;\n\n\n    T1_Skip_Spaces( parser );\n    cur = parser->root.cursor;\n    if ( cur >= limit )\n    {\n      FT_ERROR(( \"t42_parse_encoding: out of bounds\\n\" ));\n      parser->root.error = FT_THROW( Invalid_File_Format );\n      return;\n    }\n\n    /* if we have a number or `[', the encoding is an array, */\n    /* and we must load it now                               */\n    if ( ft_isdigit( *cur ) || *cur == '[' )\n    {\n      T1_Encoding  encode          = &face->type1.encoding;\n      FT_Int       count, n;\n      PS_Table     char_table      = &loader->encoding_table;\n      FT_Memory    memory          = parser->root.memory;\n      FT_Error     error;\n      FT_Bool      only_immediates = 0;\n\n\n      /* read the number of entries in the encoding; should be 256 */\n      if ( *cur == '[' )\n      {\n        count           = 256;\n        only_immediates = 1;\n        parser->root.cursor++;\n      }\n      else\n        count = (FT_Int)T1_ToInt( parser );\n\n      T1_Skip_Spaces( parser );\n      if ( parser->root.cursor >= limit )\n        return;\n\n      /* we use a T1_Table to store our charnames */\n      loader->num_chars = encode->num_chars = count;\n      if ( FT_NEW_ARRAY( encode->char_index, count )     ||\n           FT_NEW_ARRAY( encode->char_name,  count )     ||\n           FT_SET_ERROR( psaux->ps_table_funcs->init(\n                           char_table, count, memory ) ) )\n      {\n        parser->root.error = error;\n        return;\n      }\n\n      /* We need to `zero' out encoding_table.elements */\n      for ( n = 0; n < count; n++ )\n      {\n        char*  notdef = (char *)\".notdef\";\n\n\n        (void)T1_Add_Table( char_table, n, notdef, 8 );\n      }\n\n      /* Now we need to read records of the form                */\n      /*                                                        */\n      /*   ... charcode /charname ...                           */\n      /*                                                        */\n      /* for each entry in our table.                           */\n      /*                                                        */\n      /* We simply look for a number followed by an immediate   */\n      /* name.  Note that this ignores correctly the sequence   */\n      /* that is often seen in type42 fonts:                    */\n      /*                                                        */\n      /*   0 1 255 { 1 index exch /.notdef put } for dup        */\n      /*                                                        */\n      /* used to clean the encoding array before anything else. */\n      /*                                                        */\n      /* Alternatively, if the array is directly given as       */\n      /*                                                        */\n      /*   /Encoding [ ... ]                                    */\n      /*                                                        */\n      /* we only read immediates.                               */\n\n      n = 0;\n      T1_Skip_Spaces( parser );\n\n      while ( parser->root.cursor < limit )\n      {\n        cur = parser->root.cursor;\n\n        /* we stop when we encounter `def' or `]' */\n        if ( *cur == 'd' && cur + 3 < limit )\n        {\n          if ( cur[1] == 'e'          &&\n               cur[2] == 'f'          &&\n               t42_is_space( cur[3] ) )\n          {\n            FT_TRACE6(( \"encoding end\\n\" ));\n            cur += 3;\n            break;\n          }\n        }\n        if ( *cur == ']' )\n        {\n          FT_TRACE6(( \"encoding end\\n\" ));\n          cur++;\n          break;\n        }\n\n        /* check whether we have found an entry */\n        if ( ft_isdigit( *cur ) || only_immediates )\n        {\n          FT_Int  charcode;\n\n\n          if ( only_immediates )\n            charcode = n;\n          else\n          {\n            charcode = (FT_Int)T1_ToInt( parser );\n            T1_Skip_Spaces( parser );\n          }\n\n          cur = parser->root.cursor;\n\n          if ( cur + 2 < limit && *cur == '/' && n < count )\n          {\n            FT_PtrDist  len;\n\n\n            cur++;\n\n            parser->root.cursor = cur;\n            T1_Skip_PS_Token( parser );\n            if ( parser->root.cursor >= limit )\n              return;\n            if ( parser->root.error )\n              return;\n\n            len = parser->root.cursor - cur;\n\n            parser->root.error = T1_Add_Table( char_table, charcode,\n                                               cur, len + 1 );\n            if ( parser->root.error )\n              return;\n            char_table->elements[charcode][len] = '\\0';\n\n            n++;\n          }\n          else if ( only_immediates )\n          {\n            /* Since the current position is not updated for           */\n            /* immediates-only mode we would get an infinite loop if   */\n            /* we don't do anything here.                              */\n            /*                                                         */\n            /* This encoding array is not valid according to the type1 */\n            /* specification (it might be an encoding for a CID type1  */\n            /* font, however), so we conclude that this font is NOT a  */\n            /* type1 font.                                             */\n            parser->root.error = FT_THROW( Unknown_File_Format );\n            return;\n          }\n        }\n        else\n        {\n          T1_Skip_PS_Token( parser );\n          if ( parser->root.error )\n            return;\n        }\n\n        T1_Skip_Spaces( parser );\n      }\n\n      face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY;\n      parser->root.cursor       = cur;\n    }\n\n    /* Otherwise, we should have either `StandardEncoding', */\n    /* `ExpertEncoding', or `ISOLatin1Encoding'             */\n    else\n    {\n      if ( cur + 17 < limit                                            &&\n           ft_strncmp( (const char*)cur, \"StandardEncoding\", 16 ) == 0 )\n        face->type1.encoding_type = T1_ENCODING_TYPE_STANDARD;\n\n      else if ( cur + 15 < limit                                          &&\n                ft_strncmp( (const char*)cur, \"ExpertEncoding\", 14 ) == 0 )\n        face->type1.encoding_type = T1_ENCODING_TYPE_EXPERT;\n\n      else if ( cur + 18 < limit                                             &&\n                ft_strncmp( (const char*)cur, \"ISOLatin1Encoding\", 17 ) == 0 )\n        face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1;\n\n      else\n        parser->root.error = FT_THROW( Ignore );\n    }\n  }\n\n\n  typedef enum  T42_Load_Status_\n  {\n    BEFORE_START,\n    BEFORE_TABLE_DIR,\n    OTHER_TABLES\n\n  } T42_Load_Status;\n\n\n  static void\n  t42_parse_sfnts( T42_Face    face,\n                   T42_Loader  loader )\n  {\n    T42_Parser  parser = &loader->parser;\n    FT_Memory   memory = parser->root.memory;\n    FT_Byte*    cur;\n    FT_Byte*    limit  = parser->root.limit;\n    FT_Error    error;\n    FT_Int      num_tables = 0;\n    FT_ULong    count;\n\n    FT_Long     n, string_size, old_string_size, real_size;\n    FT_Byte*    string_buf = NULL;\n    FT_Bool     allocated  = 0;\n\n    T42_Load_Status  status;\n\n\n    /* The format is                                */\n    /*                                              */\n    /*   /sfnts [ <hexstring> <hexstring> ... ] def */\n    /*                                              */\n    /* or                                           */\n    /*                                              */\n    /*   /sfnts [                                   */\n    /*      <num_bin_bytes> RD <binary data>        */\n    /*      <num_bin_bytes> RD <binary data>        */\n    /*      ...                                     */\n    /*   ] def                                      */\n    /*                                              */\n    /* with exactly one space after the `RD' token. */\n\n    T1_Skip_Spaces( parser );\n\n    if ( parser->root.cursor >= limit || *parser->root.cursor++ != '[' )\n    {\n      FT_ERROR(( \"t42_parse_sfnts: can't find begin of sfnts vector\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Fail;\n    }\n\n    T1_Skip_Spaces( parser );\n    status          = BEFORE_START;\n    string_size     = 0;\n    old_string_size = 0;\n    count           = 0;\n\n    while ( parser->root.cursor < limit )\n    {\n      cur = parser->root.cursor;\n\n      if ( *cur == ']' )\n      {\n        parser->root.cursor++;\n        goto Exit;\n      }\n\n      else if ( *cur == '<' )\n      {\n        T1_Skip_PS_Token( parser );\n        if ( parser->root.error )\n          goto Exit;\n\n        /* don't include delimiters */\n        string_size = (FT_Long)( ( parser->root.cursor - cur - 2 + 1 ) / 2 );\n        if ( !string_size )\n        {\n          FT_ERROR(( \"t42_parse_sfnts: invalid data in sfnts array\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Fail;\n        }\n        if ( FT_REALLOC( string_buf, old_string_size, string_size ) )\n          goto Fail;\n\n        allocated = 1;\n\n        parser->root.cursor = cur;\n        (void)T1_ToBytes( parser, string_buf, string_size, &real_size, 1 );\n        old_string_size = string_size;\n        string_size = real_size;\n      }\n\n      else if ( ft_isdigit( *cur ) )\n      {\n        if ( allocated )\n        {\n          FT_ERROR(( \"t42_parse_sfnts: \"\n                     \"can't handle mixed binary and hex strings\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Fail;\n        }\n\n        string_size = T1_ToInt( parser );\n        if ( string_size < 0 )\n        {\n          FT_ERROR(( \"t42_parse_sfnts: invalid string size\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Fail;\n        }\n\n        T1_Skip_PS_Token( parser );             /* `RD' */\n        if ( parser->root.error )\n          return;\n\n        string_buf = parser->root.cursor + 1;   /* one space after `RD' */\n\n        if ( limit - parser->root.cursor < string_size )\n        {\n          FT_ERROR(( \"t42_parse_sfnts: too much binary data\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Fail;\n        }\n        else\n          parser->root.cursor += string_size + 1;\n      }\n\n      if ( !string_buf )\n      {\n        FT_ERROR(( \"t42_parse_sfnts: invalid data in sfnts array\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Fail;\n      }\n\n      /* A string can have a trailing zero (odd) byte for padding. */\n      /* Ignore it.                                                */\n      if ( ( string_size & 1 ) && string_buf[string_size - 1] == 0 )\n        string_size--;\n\n      if ( !string_size )\n      {\n        FT_ERROR(( \"t42_parse_sfnts: invalid string\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Fail;\n      }\n\n      for ( n = 0; n < string_size; n++ )\n      {\n        switch ( status )\n        {\n        case BEFORE_START:\n          /* load offset table, 12 bytes */\n          if ( count < 12 )\n          {\n            face->ttf_data[count++] = string_buf[n];\n            continue;\n          }\n          else\n          {\n            num_tables     = 16 * face->ttf_data[4] + face->ttf_data[5];\n            status         = BEFORE_TABLE_DIR;\n            face->ttf_size = 12 + 16 * num_tables;\n\n            if ( (FT_ULong)( limit - parser->root.cursor ) < face->ttf_size )\n            {\n              FT_ERROR(( \"t42_parse_sfnts: invalid data in sfnts array\\n\" ));\n              error = FT_THROW( Invalid_File_Format );\n              goto Fail;\n            }\n\n            if ( FT_REALLOC( face->ttf_data, 12, face->ttf_size ) )\n              goto Fail;\n          }\n          /* fall through */\n\n        case BEFORE_TABLE_DIR:\n          /* the offset table is read; read the table directory */\n          if ( count < face->ttf_size )\n          {\n            face->ttf_data[count++] = string_buf[n];\n            continue;\n          }\n          else\n          {\n            int       i;\n            FT_ULong  len;\n\n\n            for ( i = 0; i < num_tables; i++ )\n            {\n              FT_Byte*  p = face->ttf_data + 12 + 16 * i + 12;\n\n\n              len = FT_PEEK_ULONG( p );\n\n              /* Pad to a 4-byte boundary length */\n              face->ttf_size += ( len + 3 ) & ~3;\n            }\n\n            status = OTHER_TABLES;\n\n            /* there are no more than 256 tables, so no size check here */\n            if ( FT_REALLOC( face->ttf_data, 12 + 16 * num_tables,\n                             face->ttf_size + 1 ) )\n              goto Fail;\n          }\n          /* fall through */\n\n        case OTHER_TABLES:\n          /* all other tables are just copied */\n          if ( count >= face->ttf_size )\n          {\n            FT_ERROR(( \"t42_parse_sfnts: too much binary data\\n\" ));\n            error = FT_THROW( Invalid_File_Format );\n            goto Fail;\n          }\n          face->ttf_data[count++] = string_buf[n];\n        }\n      }\n\n      T1_Skip_Spaces( parser );\n    }\n\n    /* if control reaches this point, the format was not valid */\n    error = FT_THROW( Invalid_File_Format );\n\n  Fail:\n    parser->root.error = error;\n\n  Exit:\n    if ( allocated )\n      FT_FREE( string_buf );\n  }\n\n\n  static void\n  t42_parse_charstrings( T42_Face    face,\n                         T42_Loader  loader )\n  {\n    T42_Parser     parser       = &loader->parser;\n    PS_Table       code_table   = &loader->charstrings;\n    PS_Table       name_table   = &loader->glyph_names;\n    PS_Table       swap_table   = &loader->swap_table;\n    FT_Memory      memory       = parser->root.memory;\n    FT_Error       error;\n\n    PSAux_Service  psaux        = (PSAux_Service)face->psaux;\n\n    FT_Byte*       cur;\n    FT_Byte*       limit        = parser->root.limit;\n    FT_UInt        n;\n    FT_UInt        notdef_index = 0;\n    FT_Byte        notdef_found = 0;\n\n\n    T1_Skip_Spaces( parser );\n\n    if ( parser->root.cursor >= limit )\n    {\n      FT_ERROR(( \"t42_parse_charstrings: out of bounds\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Fail;\n    }\n\n    if ( ft_isdigit( *parser->root.cursor ) )\n    {\n      loader->num_glyphs = (FT_UInt)T1_ToInt( parser );\n      if ( parser->root.error )\n        return;\n    }\n    else if ( *parser->root.cursor == '<' )\n    {\n      /* We have `<< ... >>'.  Count the number of `/' in the dictionary */\n      /* to get its size.                                                */\n      FT_UInt  count = 0;\n\n\n      T1_Skip_PS_Token( parser );\n      if ( parser->root.error )\n        return;\n      T1_Skip_Spaces( parser );\n      cur = parser->root.cursor;\n\n      while ( parser->root.cursor < limit )\n      {\n        if ( *parser->root.cursor == '/' )\n          count++;\n        else if ( *parser->root.cursor == '>' )\n        {\n          loader->num_glyphs  = count;\n          parser->root.cursor = cur;        /* rewind */\n          break;\n        }\n        T1_Skip_PS_Token( parser );\n        if ( parser->root.error )\n          return;\n        T1_Skip_Spaces( parser );\n      }\n    }\n    else\n    {\n      FT_ERROR(( \"t42_parse_charstrings: invalid token\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Fail;\n    }\n\n    if ( parser->root.cursor >= limit )\n    {\n      FT_ERROR(( \"t42_parse_charstrings: out of bounds\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Fail;\n    }\n\n    /* initialize tables */\n\n    error = psaux->ps_table_funcs->init( code_table,\n                                         loader->num_glyphs,\n                                         memory );\n    if ( error )\n      goto Fail;\n\n    error = psaux->ps_table_funcs->init( name_table,\n                                         loader->num_glyphs,\n                                         memory );\n    if ( error )\n      goto Fail;\n\n    /* Initialize table for swapping index notdef_index and */\n    /* index 0 names and codes (if necessary).              */\n\n    error = psaux->ps_table_funcs->init( swap_table, 4, memory );\n    if ( error )\n      goto Fail;\n\n    n = 0;\n\n    for (;;)\n    {\n      /* The format is simple:                   */\n      /*   `/glyphname' + index [+ def]          */\n\n      T1_Skip_Spaces( parser );\n\n      cur = parser->root.cursor;\n      if ( cur >= limit )\n        break;\n\n      /* We stop when we find an `end' keyword or '>' */\n      if ( *cur   == 'e'          &&\n           cur + 3 < limit        &&\n           cur[1] == 'n'          &&\n           cur[2] == 'd'          &&\n           t42_is_space( cur[3] ) )\n        break;\n      if ( *cur == '>' )\n        break;\n\n      T1_Skip_PS_Token( parser );\n      if ( parser->root.cursor >= limit )\n      {\n        FT_ERROR(( \"t42_parse_charstrings: out of bounds\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Fail;\n      }\n      if ( parser->root.error )\n        return;\n\n      if ( *cur == '/' )\n      {\n        FT_PtrDist  len;\n\n\n        if ( cur + 2 >= limit )\n        {\n          FT_ERROR(( \"t42_parse_charstrings: out of bounds\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Fail;\n        }\n\n        cur++;                              /* skip `/' */\n        len = parser->root.cursor - cur;\n\n        error = T1_Add_Table( name_table, n, cur, len + 1 );\n        if ( error )\n          goto Fail;\n\n        /* add a trailing zero to the name table */\n        name_table->elements[n][len] = '\\0';\n\n        /* record index of /.notdef */\n        if ( *cur == '.'                                              &&\n             ft_strcmp( \".notdef\",\n                        (const char*)(name_table->elements[n]) ) == 0 )\n        {\n          notdef_index = n;\n          notdef_found = 1;\n        }\n\n        T1_Skip_Spaces( parser );\n\n        cur = parser->root.cursor;\n\n        (void)T1_ToInt( parser );\n        if ( parser->root.cursor >= limit )\n        {\n          FT_ERROR(( \"t42_parse_charstrings: out of bounds\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Fail;\n        }\n\n        len = parser->root.cursor - cur;\n\n        error = T1_Add_Table( code_table, n, cur, len + 1 );\n        if ( error )\n          goto Fail;\n\n        code_table->elements[n][len] = '\\0';\n\n        n++;\n        if ( n >= loader->num_glyphs )\n          break;\n      }\n    }\n\n    loader->num_glyphs = n;\n\n    if ( !notdef_found )\n    {\n      FT_ERROR(( \"t42_parse_charstrings: no /.notdef glyph\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Fail;\n    }\n\n    /* if /.notdef does not occupy index 0, do our magic. */\n    if ( ft_strcmp( (const char*)\".notdef\",\n                    (const char*)name_table->elements[0] ) )\n    {\n      /* Swap glyph in index 0 with /.notdef glyph.  First, add index 0  */\n      /* name and code entries to swap_table.  Then place notdef_index   */\n      /* name and code entries into swap_table.  Then swap name and code */\n      /* entries at indices notdef_index and 0 using values stored in    */\n      /* swap_table.                                                     */\n\n      /* Index 0 name */\n      error = T1_Add_Table( swap_table, 0,\n                            name_table->elements[0],\n                            name_table->lengths [0] );\n      if ( error )\n        goto Fail;\n\n      /* Index 0 code */\n      error = T1_Add_Table( swap_table, 1,\n                            code_table->elements[0],\n                            code_table->lengths [0] );\n      if ( error )\n        goto Fail;\n\n      /* Index notdef_index name */\n      error = T1_Add_Table( swap_table, 2,\n                            name_table->elements[notdef_index],\n                            name_table->lengths [notdef_index] );\n      if ( error )\n        goto Fail;\n\n      /* Index notdef_index code */\n      error = T1_Add_Table( swap_table, 3,\n                            code_table->elements[notdef_index],\n                            code_table->lengths [notdef_index] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( name_table, notdef_index,\n                            swap_table->elements[0],\n                            swap_table->lengths [0] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( code_table, notdef_index,\n                            swap_table->elements[1],\n                            swap_table->lengths [1] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( name_table, 0,\n                            swap_table->elements[2],\n                            swap_table->lengths [2] );\n      if ( error )\n        goto Fail;\n\n      error = T1_Add_Table( code_table, 0,\n                            swap_table->elements[3],\n                            swap_table->lengths [3] );\n      if ( error )\n        goto Fail;\n\n    }\n\n    return;\n\n  Fail:\n    parser->root.error = error;\n  }\n\n\n  static FT_Error\n  t42_load_keyword( T42_Face    face,\n                    T42_Loader  loader,\n                    T1_Field    field )\n  {\n    FT_Error  error;\n    void*     dummy_object;\n    void**    objects;\n    FT_UInt   max_objects = 0;\n\n\n    /* if the keyword has a dedicated callback, call it */\n    if ( field->type == T1_FIELD_TYPE_CALLBACK )\n    {\n      field->reader( (FT_Face)face, loader );\n      error = loader->parser.root.error;\n      goto Exit;\n    }\n\n    /* now the keyword is either a simple field or a table of fields; */\n    /* we are now going to take care of it                            */\n\n    switch ( field->location )\n    {\n    case T1_FIELD_LOCATION_FONT_INFO:\n      dummy_object = &face->type1.font_info;\n      break;\n\n    case T1_FIELD_LOCATION_FONT_EXTRA:\n      dummy_object = &face->type1.font_extra;\n      break;\n\n    case T1_FIELD_LOCATION_BBOX:\n      dummy_object = &face->type1.font_bbox;\n      break;\n\n    default:\n      dummy_object = &face->type1;\n    }\n\n    objects = &dummy_object;\n\n    if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY ||\n         field->type == T1_FIELD_TYPE_FIXED_ARRAY   )\n      error = T1_Load_Field_Table( &loader->parser, field,\n                                   objects, max_objects, 0 );\n    else\n      error = T1_Load_Field( &loader->parser, field,\n                             objects, max_objects, 0 );\n\n   Exit:\n    return error;\n  }\n\n\n  FT_LOCAL_DEF( FT_Error )\n  t42_parse_dict( T42_Face    face,\n                  T42_Loader  loader,\n                  FT_Byte*    base,\n                  FT_Long     size )\n  {\n    T42_Parser  parser     = &loader->parser;\n    FT_Byte*    limit;\n    FT_Int      n_keywords = (FT_Int)( sizeof ( t42_keywords ) /\n                                         sizeof ( t42_keywords[0] ) );\n\n\n    parser->root.cursor = base;\n    parser->root.limit  = base + size;\n    parser->root.error  = FT_Err_Ok;\n\n    limit = parser->root.limit;\n\n    T1_Skip_Spaces( parser );\n\n    while ( parser->root.cursor < limit )\n    {\n      FT_Byte*  cur;\n\n\n      cur = parser->root.cursor;\n\n      /* look for `FontDirectory' which causes problems for some fonts */\n      if ( *cur == 'F' && cur + 25 < limit                    &&\n           ft_strncmp( (char*)cur, \"FontDirectory\", 13 ) == 0 )\n      {\n        FT_Byte*  cur2;\n\n\n        /* skip the `FontDirectory' keyword */\n        T1_Skip_PS_Token( parser );\n        T1_Skip_Spaces  ( parser );\n        cur = cur2 = parser->root.cursor;\n\n        /* look up the `known' keyword */\n        while ( cur < limit )\n        {\n          if ( *cur == 'k' && cur + 5 < limit             &&\n                ft_strncmp( (char*)cur, \"known\", 5 ) == 0 )\n            break;\n\n          T1_Skip_PS_Token( parser );\n          if ( parser->root.error )\n            goto Exit;\n          T1_Skip_Spaces  ( parser );\n          cur = parser->root.cursor;\n        }\n\n        if ( cur < limit )\n        {\n          T1_TokenRec  token;\n\n\n          /* skip the `known' keyword and the token following it */\n          T1_Skip_PS_Token( parser );\n          T1_ToToken( parser, &token );\n\n          /* if the last token was an array, skip it! */\n          if ( token.type == T1_TOKEN_TYPE_ARRAY )\n            cur2 = parser->root.cursor;\n        }\n        parser->root.cursor = cur2;\n      }\n\n      /* look for immediates */\n      else if ( *cur == '/' && cur + 2 < limit )\n      {\n        FT_PtrDist  len;\n\n\n        cur++;\n\n        parser->root.cursor = cur;\n        T1_Skip_PS_Token( parser );\n        if ( parser->root.error )\n          goto Exit;\n\n        len = parser->root.cursor - cur;\n\n        if ( len > 0 && len < 22 && parser->root.cursor < limit )\n        {\n          int  i;\n\n\n          /* now compare the immediate name to the keyword table */\n\n          /* loop through all known keywords */\n          for ( i = 0; i < n_keywords; i++ )\n          {\n            T1_Field  keyword = (T1_Field)&t42_keywords[i];\n            FT_Byte   *name   = (FT_Byte*)keyword->ident;\n\n\n            if ( !name )\n              continue;\n\n            if ( cur[0] == name[0]                                  &&\n                 len == (FT_PtrDist)ft_strlen( (const char *)name ) &&\n                 ft_memcmp( cur, name, len ) == 0                   )\n            {\n              /* we found it -- run the parsing callback! */\n              parser->root.error = t42_load_keyword( face,\n                                                     loader,\n                                                     keyword );\n              if ( parser->root.error )\n                return parser->root.error;\n              break;\n            }\n          }\n        }\n      }\n      else\n      {\n        T1_Skip_PS_Token( parser );\n        if ( parser->root.error )\n          goto Exit;\n      }\n\n      T1_Skip_Spaces( parser );\n    }\n\n  Exit:\n    return parser->root.error;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  t42_loader_init( T42_Loader  loader,\n                   T42_Face    face )\n  {\n    FT_UNUSED( face );\n\n    FT_MEM_ZERO( loader, sizeof ( *loader ) );\n    loader->num_glyphs = 0;\n    loader->num_chars  = 0;\n\n    /* initialize the tables -- simply set their `init' field to 0 */\n    loader->encoding_table.init = 0;\n    loader->charstrings.init    = 0;\n    loader->glyph_names.init    = 0;\n  }\n\n\n  FT_LOCAL_DEF( void )\n  t42_loader_done( T42_Loader  loader )\n  {\n    T42_Parser  parser = &loader->parser;\n\n\n    /* finalize tables */\n    T1_Release_Table( &loader->encoding_table );\n    T1_Release_Table( &loader->charstrings );\n    T1_Release_Table( &loader->glyph_names );\n    T1_Release_Table( &loader->swap_table );\n\n    /* finalize parser */\n    t42_parser_done( parser );\n  }\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type42/t42parse.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t42parse.h                                                             */\n/*                                                                         */\n/*    Type 42 font parser (specification).                                 */\n/*                                                                         */\n/*  Copyright 2002, 2003 by Roberto Alameda.                               */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T42PARSE_H__\n#define __T42PARSE_H__\n\n\n#include \"t42objs.h\"\n#include FT_INTERNAL_POSTSCRIPT_AUX_H\n\n\nFT_BEGIN_HEADER\n\n  typedef struct  T42_ParserRec_\n  {\n    PS_ParserRec  root;\n    FT_Stream     stream;\n\n    FT_Byte*      base_dict;\n    FT_Long       base_len;\n\n    FT_Bool       in_memory;\n\n  } T42_ParserRec, *T42_Parser;\n\n\n  typedef struct  T42_Loader_\n  {\n    T42_ParserRec  parser;          /* parser used to read the stream */\n\n    FT_UInt        num_chars;       /* number of characters in encoding */\n    PS_TableRec    encoding_table;  /* PS_Table used to store the       */\n                                    /* encoding character names         */\n\n    FT_UInt        num_glyphs;\n    PS_TableRec    glyph_names;\n    PS_TableRec    charstrings;\n    PS_TableRec    swap_table;      /* For moving .notdef glyph to index 0. */\n\n  } T42_LoaderRec, *T42_Loader;\n\n\n  FT_LOCAL( FT_Error )\n  t42_parser_init( T42_Parser     parser,\n                   FT_Stream      stream,\n                   FT_Memory      memory,\n                   PSAux_Service  psaux );\n\n  FT_LOCAL( void )\n  t42_parser_done( T42_Parser  parser );\n\n\n  FT_LOCAL( FT_Error )\n  t42_parse_dict( T42_Face    face,\n                  T42_Loader  loader,\n                  FT_Byte*    base,\n                  FT_Long     size );\n\n\n  FT_LOCAL( void )\n  t42_loader_init( T42_Loader  loader,\n                   T42_Face    face );\n\n  FT_LOCAL( void )\n  t42_loader_done( T42_Loader  loader );\n\n\n /* */\n\nFT_END_HEADER\n\n\n#endif /* __T42PARSE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type42/t42types.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t42types.h                                                             */\n/*                                                                         */\n/*    Type 42 font data types (specification only).                        */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2006, 2008 by Roberto Alameda.                   */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T42TYPES_H__\n#define __T42TYPES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_TYPE1_TABLES_H\n#include FT_INTERNAL_TYPE1_TYPES_H\n#include FT_INTERNAL_POSTSCRIPT_HINTS_H\n\n\nFT_BEGIN_HEADER\n\n\n  typedef struct  T42_FaceRec_\n  {\n    FT_FaceRec      root;\n    T1_FontRec      type1;\n    const void*     psnames;\n    const void*     psaux;\n#if 0\n    const void*     afm_data;\n#endif\n    FT_Byte*        ttf_data;\n    FT_ULong        ttf_size;\n    FT_Face         ttf_face;\n    FT_CharMapRec   charmaprecs[2];\n    FT_CharMap      charmaps[2];\n    PS_UnicodesRec  unicode_map;\n\n  } T42_FaceRec, *T42_Face;\n\n\nFT_END_HEADER\n\n#endif /* __T42TYPES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/type42/type42.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  type42.c                                                               */\n/*                                                                         */\n/*    FreeType Type 42 driver component.                                   */\n/*                                                                         */\n/*  Copyright 2002 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#define FT_MAKE_OPTION_SINGLE_OBJECT\n\n#include <ft2build.h>\n#include \"t42objs.c\"\n#include \"t42parse.c\"\n#include \"t42drivr.c\"\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/winfonts/fnterrs.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fnterrs.h                                                              */\n/*                                                                         */\n/*    Win FNT/FON error codes (specification only).                        */\n/*                                                                         */\n/*  Copyright 2001, 2012 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the Windows FNT/FON error enumeration     */\n  /* constants.                                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n#ifndef __FNTERRS_H__\n#define __FNTERRS_H__\n\n#include FT_MODULE_ERRORS_H\n\n#undef __FTERRORS_H__\n\n#undef  FT_ERR_PREFIX\n#define FT_ERR_PREFIX  FNT_Err_\n#define FT_ERR_BASE    FT_Mod_Err_Winfonts\n\n#include FT_ERRORS_H\n\n#endif /* __FNTERRS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/winfonts/winfnt.c",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  winfnt.c                                                               */\n/*                                                                         */\n/*    FreeType font driver for Windows FNT/FON files                       */\n/*                                                                         */\n/*  Copyright 1996-2004, 2006-2014 by                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*  Copyright 2003 Huw D M Davies for Codeweavers                          */\n/*  Copyright 2007 Dmitry Timoshkov for Codeweavers                        */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#include <ft2build.h>\n#include FT_WINFONTS_H\n#include FT_INTERNAL_DEBUG_H\n#include FT_INTERNAL_STREAM_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_TRUETYPE_IDS_H\n\n#include \"winfnt.h\"\n#include \"fnterrs.h\"\n#include FT_SERVICE_WINFNT_H\n#include FT_SERVICE_XFREE86_NAME_H\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */\n  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */\n  /* messages during execution.                                            */\n  /*                                                                       */\n#undef  FT_COMPONENT\n#define FT_COMPONENT  trace_winfnt\n\n\n  static const FT_Frame_Field  winmz_header_fields[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  WinMZ_HeaderRec\n\n    FT_FRAME_START( 64 ),\n      FT_FRAME_USHORT_LE ( magic ),\n      FT_FRAME_SKIP_BYTES( 29 * 2 ),\n      FT_FRAME_ULONG_LE  ( lfanew ),\n    FT_FRAME_END\n  };\n\n  static const FT_Frame_Field  winne_header_fields[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  WinNE_HeaderRec\n\n    FT_FRAME_START( 40 ),\n      FT_FRAME_USHORT_LE ( magic ),\n      FT_FRAME_SKIP_BYTES( 34 ),\n      FT_FRAME_USHORT_LE ( resource_tab_offset ),\n      FT_FRAME_USHORT_LE ( rname_tab_offset ),\n    FT_FRAME_END\n  };\n\n  static const FT_Frame_Field  winpe32_header_fields[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  WinPE32_HeaderRec\n\n    FT_FRAME_START( 248 ),\n      FT_FRAME_ULONG_LE  ( magic ),   /* PE00 */\n      FT_FRAME_USHORT_LE ( machine ), /* 0x014C - i386 */\n      FT_FRAME_USHORT_LE ( number_of_sections ),\n      FT_FRAME_SKIP_BYTES( 12 ),\n      FT_FRAME_USHORT_LE ( size_of_optional_header ),\n      FT_FRAME_SKIP_BYTES( 2 ),\n      FT_FRAME_USHORT_LE ( magic32 ), /* 0x10B */\n      FT_FRAME_SKIP_BYTES( 110 ),\n      FT_FRAME_ULONG_LE  ( rsrc_virtual_address ),\n      FT_FRAME_ULONG_LE  ( rsrc_size ),\n      FT_FRAME_SKIP_BYTES( 104 ),\n    FT_FRAME_END\n  };\n\n  static const FT_Frame_Field  winpe32_section_fields[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  WinPE32_SectionRec\n\n    FT_FRAME_START( 40 ),\n      FT_FRAME_BYTES     ( name, 8 ),\n      FT_FRAME_SKIP_BYTES( 4 ),\n      FT_FRAME_ULONG_LE  ( virtual_address ),\n      FT_FRAME_ULONG_LE  ( size_of_raw_data ),\n      FT_FRAME_ULONG_LE  ( pointer_to_raw_data ),\n      FT_FRAME_SKIP_BYTES( 16 ),\n    FT_FRAME_END\n  };\n\n  static const FT_Frame_Field  winpe_rsrc_dir_fields[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  WinPE_RsrcDirRec\n\n    FT_FRAME_START( 16 ),\n      FT_FRAME_ULONG_LE ( characteristics ),\n      FT_FRAME_ULONG_LE ( time_date_stamp ),\n      FT_FRAME_USHORT_LE( major_version ),\n      FT_FRAME_USHORT_LE( minor_version ),\n      FT_FRAME_USHORT_LE( number_of_named_entries ),\n      FT_FRAME_USHORT_LE( number_of_id_entries ),\n    FT_FRAME_END\n  };\n\n  static const FT_Frame_Field  winpe_rsrc_dir_entry_fields[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  WinPE_RsrcDirEntryRec\n\n    FT_FRAME_START( 8 ),\n      FT_FRAME_ULONG_LE( name ),\n      FT_FRAME_ULONG_LE( offset ),\n    FT_FRAME_END\n  };\n\n  static const FT_Frame_Field  winpe_rsrc_data_entry_fields[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  WinPE_RsrcDataEntryRec\n\n    FT_FRAME_START( 16 ),\n      FT_FRAME_ULONG_LE( offset_to_data ),\n      FT_FRAME_ULONG_LE( size ),\n      FT_FRAME_ULONG_LE( code_page ),\n      FT_FRAME_ULONG_LE( reserved ),\n    FT_FRAME_END\n  };\n\n  static const FT_Frame_Field  winfnt_header_fields[] =\n  {\n#undef  FT_STRUCTURE\n#define FT_STRUCTURE  FT_WinFNT_HeaderRec\n\n    FT_FRAME_START( 148 ),\n      FT_FRAME_USHORT_LE( version ),\n      FT_FRAME_ULONG_LE ( file_size ),\n      FT_FRAME_BYTES    ( copyright, 60 ),\n      FT_FRAME_USHORT_LE( file_type ),\n      FT_FRAME_USHORT_LE( nominal_point_size ),\n      FT_FRAME_USHORT_LE( vertical_resolution ),\n      FT_FRAME_USHORT_LE( horizontal_resolution ),\n      FT_FRAME_USHORT_LE( ascent ),\n      FT_FRAME_USHORT_LE( internal_leading ),\n      FT_FRAME_USHORT_LE( external_leading ),\n      FT_FRAME_BYTE     ( italic ),\n      FT_FRAME_BYTE     ( underline ),\n      FT_FRAME_BYTE     ( strike_out ),\n      FT_FRAME_USHORT_LE( weight ),\n      FT_FRAME_BYTE     ( charset ),\n      FT_FRAME_USHORT_LE( pixel_width ),\n      FT_FRAME_USHORT_LE( pixel_height ),\n      FT_FRAME_BYTE     ( pitch_and_family ),\n      FT_FRAME_USHORT_LE( avg_width ),\n      FT_FRAME_USHORT_LE( max_width ),\n      FT_FRAME_BYTE     ( first_char ),\n      FT_FRAME_BYTE     ( last_char ),\n      FT_FRAME_BYTE     ( default_char ),\n      FT_FRAME_BYTE     ( break_char ),\n      FT_FRAME_USHORT_LE( bytes_per_row ),\n      FT_FRAME_ULONG_LE ( device_offset ),\n      FT_FRAME_ULONG_LE ( face_name_offset ),\n      FT_FRAME_ULONG_LE ( bits_pointer ),\n      FT_FRAME_ULONG_LE ( bits_offset ),\n      FT_FRAME_BYTE     ( reserved ),\n      FT_FRAME_ULONG_LE ( flags ),\n      FT_FRAME_USHORT_LE( A_space ),\n      FT_FRAME_USHORT_LE( B_space ),\n      FT_FRAME_USHORT_LE( C_space ),\n      FT_FRAME_ULONG_LE ( color_table_offset ),\n      FT_FRAME_BYTES    ( reserved1, 16 ),\n    FT_FRAME_END\n  };\n\n\n  static void\n  fnt_font_done( FNT_Face face )\n  {\n    FT_Memory  memory = FT_FACE( face )->memory;\n    FT_Stream  stream = FT_FACE( face )->stream;\n    FNT_Font   font   = face->font;\n\n\n    if ( !font )\n      return;\n\n    if ( font->fnt_frame )\n      FT_FRAME_RELEASE( font->fnt_frame );\n    FT_FREE( font->family_name );\n\n    FT_FREE( font );\n    face->font = 0;\n  }\n\n\n  static FT_Error\n  fnt_font_load( FNT_Font   font,\n                 FT_Stream  stream )\n  {\n    FT_Error          error;\n    FT_WinFNT_Header  header = &font->header;\n    FT_Bool           new_format;\n    FT_UInt           size;\n\n\n    /* first of all, read the FNT header */\n    if ( FT_STREAM_SEEK( font->offset )                        ||\n         FT_STREAM_READ_FIELDS( winfnt_header_fields, header ) )\n      goto Exit;\n\n    /* check header */\n    if ( header->version != 0x200 &&\n         header->version != 0x300 )\n    {\n      FT_TRACE2(( \"  not a Windows FNT file\\n\" ));\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n\n    new_format = FT_BOOL( font->header.version == 0x300 );\n    size       = new_format ? 148 : 118;\n\n    if ( header->file_size < size )\n    {\n      FT_TRACE2(( \"  not a Windows FNT file\\n\" ));\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n\n    /* Version 2 doesn't have these fields */\n    if ( header->version == 0x200 )\n    {\n      header->flags   = 0;\n      header->A_space = 0;\n      header->B_space = 0;\n      header->C_space = 0;\n\n      header->color_table_offset = 0;\n    }\n\n    if ( header->file_type & 1 )\n    {\n      FT_TRACE2(( \"[can't handle vector FNT fonts]\\n\" ));\n      error = FT_THROW( Unknown_File_Format );\n      goto Exit;\n    }\n\n    /* this is a FNT file/table; extract its frame */\n    if ( FT_STREAM_SEEK( font->offset )                         ||\n         FT_FRAME_EXTRACT( header->file_size, font->fnt_frame ) )\n      goto Exit;\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  fnt_face_get_dll_font( FNT_Face  face,\n                         FT_Int    face_index )\n  {\n    FT_Error         error;\n    FT_Stream        stream = FT_FACE( face )->stream;\n    FT_Memory        memory = FT_FACE( face )->memory;\n    WinMZ_HeaderRec  mz_header;\n\n\n    face->font = 0;\n\n    /* does it begin with an MZ header? */\n    if ( FT_STREAM_SEEK( 0 )                                      ||\n         FT_STREAM_READ_FIELDS( winmz_header_fields, &mz_header ) )\n      goto Exit;\n\n    error = FT_ERR( Unknown_File_Format );\n    if ( mz_header.magic == WINFNT_MZ_MAGIC )\n    {\n      /* yes, now look for an NE header in the file */\n      WinNE_HeaderRec  ne_header;\n\n\n      FT_TRACE2(( \"MZ signature found\\n\" ));\n\n      if ( FT_STREAM_SEEK( mz_header.lfanew )                       ||\n           FT_STREAM_READ_FIELDS( winne_header_fields, &ne_header ) )\n        goto Exit;\n\n      error = FT_ERR( Unknown_File_Format );\n      if ( ne_header.magic == WINFNT_NE_MAGIC )\n      {\n        /* good, now look into the resource table for each FNT resource */\n        FT_ULong   res_offset  = mz_header.lfanew +\n                                   ne_header.resource_tab_offset;\n        FT_UShort  size_shift;\n        FT_UShort  font_count  = 0;\n        FT_ULong   font_offset = 0;\n\n\n        FT_TRACE2(( \"NE signature found\\n\" ));\n\n        if ( FT_STREAM_SEEK( res_offset )                    ||\n             FT_FRAME_ENTER( ne_header.rname_tab_offset -\n                             ne_header.resource_tab_offset ) )\n          goto Exit;\n\n        size_shift = FT_GET_USHORT_LE();\n\n        for (;;)\n        {\n          FT_UShort  type_id, count;\n\n\n          type_id = FT_GET_USHORT_LE();\n          if ( !type_id )\n            break;\n\n          count = FT_GET_USHORT_LE();\n\n          if ( type_id == 0x8008U )\n          {\n            font_count  = count;\n            font_offset = (FT_ULong)( FT_STREAM_POS() + 4 +\n                                      ( stream->cursor - stream->limit ) );\n            break;\n          }\n\n          stream->cursor += 4 + count * 12;\n        }\n\n        FT_FRAME_EXIT();\n\n        if ( !font_count || !font_offset )\n        {\n          FT_TRACE2(( \"this file doesn't contain any FNT resources\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        /* loading `winfnt_header_fields' needs at least 118 bytes;    */\n        /* use this as a rough measure to check the expected font size */\n        if ( font_count * 118UL > stream->size )\n        {\n          FT_TRACE2(( \"invalid number of faces\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        face->root.num_faces = font_count;\n\n        if ( face_index >= font_count )\n        {\n          error = FT_THROW( Invalid_Argument );\n          goto Exit;\n        }\n        else if ( face_index < 0 )\n          goto Exit;\n\n        if ( FT_NEW( face->font ) )\n          goto Exit;\n\n        if ( FT_STREAM_SEEK( font_offset + face_index * 12 ) ||\n             FT_FRAME_ENTER( 12 )                            )\n          goto Fail;\n\n        face->font->offset   = (FT_ULong)FT_GET_USHORT_LE() << size_shift;\n        face->font->fnt_size = (FT_ULong)FT_GET_USHORT_LE() << size_shift;\n\n        stream->cursor += 8;\n\n        FT_FRAME_EXIT();\n\n        error = fnt_font_load( face->font, stream );\n      }\n      else if ( ne_header.magic == WINFNT_PE_MAGIC )\n      {\n        WinPE32_HeaderRec       pe32_header;\n        WinPE32_SectionRec      pe32_section;\n        WinPE_RsrcDirRec        root_dir, name_dir, lang_dir;\n        WinPE_RsrcDirEntryRec   dir_entry1, dir_entry2, dir_entry3;\n        WinPE_RsrcDataEntryRec  data_entry;\n\n        FT_Long    root_dir_offset, name_dir_offset, lang_dir_offset;\n        FT_UShort  i, j, k;\n\n\n        FT_TRACE2(( \"PE signature found\\n\" ));\n\n        if ( FT_STREAM_SEEK( mz_header.lfanew )                           ||\n             FT_STREAM_READ_FIELDS( winpe32_header_fields, &pe32_header ) )\n          goto Exit;\n\n        FT_TRACE2(( \"magic %04lx, machine %02x, number_of_sections %u, \"\n                    \"size_of_optional_header %02x\\n\"\n                    \"magic32 %02x, rsrc_virtual_address %04lx, \"\n                    \"rsrc_size %04lx\\n\",\n                    pe32_header.magic, pe32_header.machine,\n                    pe32_header.number_of_sections,\n                    pe32_header.size_of_optional_header,\n                    pe32_header.magic32, pe32_header.rsrc_virtual_address,\n                    pe32_header.rsrc_size ));\n\n        if ( pe32_header.magic != WINFNT_PE_MAGIC /* check full signature */ ||\n             pe32_header.machine != 0x014C /* i386 */                        ||\n             pe32_header.size_of_optional_header != 0xE0 /* FIXME */         ||\n             pe32_header.magic32 != 0x10B                                    )\n        {\n          FT_TRACE2(( \"this file has an invalid PE header\\n\" ));\n          error = FT_THROW( Invalid_File_Format );\n          goto Exit;\n        }\n\n        face->root.num_faces = 0;\n\n        for ( i = 0; i < pe32_header.number_of_sections; i++ )\n        {\n          if ( FT_STREAM_READ_FIELDS( winpe32_section_fields,\n                                      &pe32_section ) )\n            goto Exit;\n\n          FT_TRACE2(( \"name %.8s, va %04lx, size %04lx, offset %04lx\\n\",\n                      pe32_section.name, pe32_section.virtual_address,\n                      pe32_section.size_of_raw_data,\n                      pe32_section.pointer_to_raw_data ));\n\n          if ( pe32_header.rsrc_virtual_address ==\n                 pe32_section.virtual_address )\n            goto Found_rsrc_section;\n        }\n\n        FT_TRACE2(( \"this file doesn't contain any resources\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n\n      Found_rsrc_section:\n        FT_TRACE2(( \"found resources section %.8s\\n\", pe32_section.name ));\n\n        if ( FT_STREAM_SEEK( pe32_section.pointer_to_raw_data )        ||\n             FT_STREAM_READ_FIELDS( winpe_rsrc_dir_fields, &root_dir ) )\n          goto Exit;\n\n        root_dir_offset = pe32_section.pointer_to_raw_data;\n\n        for ( i = 0; i < root_dir.number_of_named_entries +\n                           root_dir.number_of_id_entries; i++ )\n        {\n          if ( FT_STREAM_SEEK( root_dir_offset + 16 + i * 8 )      ||\n               FT_STREAM_READ_FIELDS( winpe_rsrc_dir_entry_fields,\n                                      &dir_entry1 )                )\n            goto Exit;\n\n          if ( !(dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ )\n          {\n            error = FT_THROW( Invalid_File_Format );\n            goto Exit;\n          }\n\n          dir_entry1.offset &= ~0x80000000UL;\n\n          name_dir_offset = pe32_section.pointer_to_raw_data +\n                            dir_entry1.offset;\n\n          if ( FT_STREAM_SEEK( pe32_section.pointer_to_raw_data +\n                               dir_entry1.offset )                       ||\n               FT_STREAM_READ_FIELDS( winpe_rsrc_dir_fields, &name_dir ) )\n            goto Exit;\n\n          for ( j = 0; j < name_dir.number_of_named_entries +\n                             name_dir.number_of_id_entries; j++ )\n          {\n            if ( FT_STREAM_SEEK( name_dir_offset + 16 + j * 8 )      ||\n                 FT_STREAM_READ_FIELDS( winpe_rsrc_dir_entry_fields,\n                                        &dir_entry2 )                )\n              goto Exit;\n\n            if ( !(dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ )\n            {\n              error = FT_THROW( Invalid_File_Format );\n              goto Exit;\n            }\n\n            dir_entry2.offset &= ~0x80000000UL;\n\n            lang_dir_offset = pe32_section.pointer_to_raw_data +\n                                dir_entry2.offset;\n\n            if ( FT_STREAM_SEEK( pe32_section.pointer_to_raw_data +\n                                   dir_entry2.offset )                     ||\n                 FT_STREAM_READ_FIELDS( winpe_rsrc_dir_fields, &lang_dir ) )\n              goto Exit;\n\n            for ( k = 0; k < lang_dir.number_of_named_entries +\n                               lang_dir.number_of_id_entries; k++ )\n            {\n              if ( FT_STREAM_SEEK( lang_dir_offset + 16 + k * 8 )      ||\n                   FT_STREAM_READ_FIELDS( winpe_rsrc_dir_entry_fields,\n                                          &dir_entry3 )                )\n                goto Exit;\n\n              if ( dir_entry2.offset & 0x80000000UL /* DataIsDirectory */ )\n              {\n                error = FT_THROW( Invalid_File_Format );\n                goto Exit;\n              }\n\n              if ( dir_entry1.name == 8 /* RT_FONT */ )\n              {\n                if ( FT_STREAM_SEEK( root_dir_offset + dir_entry3.offset ) ||\n                     FT_STREAM_READ_FIELDS( winpe_rsrc_data_entry_fields,\n                                            &data_entry )                  )\n                  goto Exit;\n\n                FT_TRACE2(( \"found font #%lu, offset %04lx, \"\n                            \"size %04lx, cp %lu\\n\",\n                            dir_entry2.name,\n                            pe32_section.pointer_to_raw_data +\n                              data_entry.offset_to_data -\n                              pe32_section.virtual_address,\n                            data_entry.size, data_entry.code_page ));\n\n                if ( face_index == face->root.num_faces )\n                {\n                  if ( FT_NEW( face->font ) )\n                    goto Exit;\n\n                  face->font->offset   = pe32_section.pointer_to_raw_data +\n                                           data_entry.offset_to_data -\n                                           pe32_section.virtual_address;\n                  face->font->fnt_size = data_entry.size;\n\n                  error = fnt_font_load( face->font, stream );\n                  if ( error )\n                  {\n                    FT_TRACE2(( \"font #%lu load error %d\\n\",\n                                dir_entry2.name, error ));\n                    goto Fail;\n                  }\n                  else\n                    FT_TRACE2(( \"font #%lu successfully loaded\\n\",\n                                dir_entry2.name ));\n                }\n\n                face->root.num_faces++;\n              }\n            }\n          }\n        }\n      }\n\n      if ( !face->root.num_faces )\n      {\n        FT_TRACE2(( \"this file doesn't contain any RT_FONT resources\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      if ( face_index >= face->root.num_faces )\n      {\n        error = FT_THROW( Invalid_Argument );\n        goto Exit;\n      }\n    }\n\n  Fail:\n    if ( error )\n      fnt_font_done( face );\n\n  Exit:\n    return error;\n  }\n\n\n  typedef struct  FNT_CMapRec_\n  {\n    FT_CMapRec  cmap;\n    FT_UInt32   first;\n    FT_UInt32   count;\n\n  } FNT_CMapRec, *FNT_CMap;\n\n\n  static FT_Error\n  fnt_cmap_init( FNT_CMap    cmap,\n                 FT_Pointer  pointer )\n  {\n    FNT_Face  face = (FNT_Face)FT_CMAP_FACE( cmap );\n    FNT_Font  font = face->font;\n\n    FT_UNUSED( pointer );\n\n\n    cmap->first = (FT_UInt32)  font->header.first_char;\n    cmap->count = (FT_UInt32)( font->header.last_char - cmap->first + 1 );\n\n    return 0;\n  }\n\n\n  static FT_UInt\n  fnt_cmap_char_index( FNT_CMap   cmap,\n                       FT_UInt32  char_code )\n  {\n    FT_UInt  gindex = 0;\n\n\n    char_code -= cmap->first;\n    if ( char_code < cmap->count )\n      /* we artificially increase the glyph index; */\n      /* FNT_Load_Glyph reverts to the right one   */\n      gindex = (FT_UInt)( char_code + 1 );\n    return gindex;\n  }\n\n\n  static FT_UInt32\n  fnt_cmap_char_next( FNT_CMap    cmap,\n                      FT_UInt32  *pchar_code )\n  {\n    FT_UInt    gindex = 0;\n    FT_UInt32  result = 0;\n    FT_UInt32  char_code = *pchar_code + 1;\n\n\n    if ( char_code <= cmap->first )\n    {\n      result = cmap->first;\n      gindex = 1;\n    }\n    else\n    {\n      char_code -= cmap->first;\n      if ( char_code < cmap->count )\n      {\n        result = cmap->first + char_code;\n        gindex = (FT_UInt)( char_code + 1 );\n      }\n    }\n\n    *pchar_code = result;\n    return gindex;\n  }\n\n\n  static const FT_CMap_ClassRec  fnt_cmap_class_rec =\n  {\n    sizeof ( FNT_CMapRec ),\n\n    (FT_CMap_InitFunc)     fnt_cmap_init,\n    (FT_CMap_DoneFunc)     NULL,\n    (FT_CMap_CharIndexFunc)fnt_cmap_char_index,\n    (FT_CMap_CharNextFunc) fnt_cmap_char_next,\n\n    NULL, NULL, NULL, NULL, NULL\n  };\n\n  static FT_CMap_Class const  fnt_cmap_class = &fnt_cmap_class_rec;\n\n\n  static void\n  FNT_Face_Done( FT_Face  fntface )       /* FNT_Face */\n  {\n    FNT_Face   face = (FNT_Face)fntface;\n    FT_Memory  memory;\n\n\n    if ( !face )\n      return;\n\n    memory = FT_FACE_MEMORY( face );\n\n    fnt_font_done( face );\n\n    FT_FREE( fntface->available_sizes );\n    fntface->num_fixed_sizes = 0;\n  }\n\n\n  static FT_Error\n  FNT_Face_Init( FT_Stream      stream,\n                 FT_Face        fntface,        /* FNT_Face */\n                 FT_Int         face_index,\n                 FT_Int         num_params,\n                 FT_Parameter*  params )\n  {\n    FNT_Face   face   = (FNT_Face)fntface;\n    FT_Error   error;\n    FT_Memory  memory = FT_FACE_MEMORY( face );\n\n    FT_UNUSED( num_params );\n    FT_UNUSED( params );\n\n\n    FT_TRACE2(( \"Windows FNT driver\\n\" ));\n\n    /* try to load font from a DLL */\n    error = fnt_face_get_dll_font( face, face_index );\n    if ( !error && face_index < 0 )\n      goto Exit;\n\n    if ( FT_ERR_EQ( error, Unknown_File_Format ) )\n    {\n      /* this didn't work; try to load a single FNT font */\n      FNT_Font  font;\n\n      if ( FT_NEW( face->font ) )\n        goto Exit;\n\n      fntface->num_faces = 1;\n\n      font           = face->font;\n      font->offset   = 0;\n      font->fnt_size = stream->size;\n\n      error = fnt_font_load( font, stream );\n\n      if ( !error )\n      {\n        if ( face_index > 0 )\n          error = FT_THROW( Invalid_Argument );\n        else if ( face_index < 0 )\n          goto Exit;\n      }\n    }\n\n    if ( error )\n      goto Fail;\n\n    /* we now need to fill the root FT_Face fields */\n    /* with relevant information                   */\n    {\n      FT_Face     root = FT_FACE( face );\n      FNT_Font    font = face->font;\n      FT_PtrDist  family_size;\n\n\n      root->face_index = face_index;\n\n      root->face_flags |= FT_FACE_FLAG_FIXED_SIZES |\n                          FT_FACE_FLAG_HORIZONTAL;\n\n      if ( font->header.avg_width == font->header.max_width )\n        root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;\n\n      if ( font->header.italic )\n        root->style_flags |= FT_STYLE_FLAG_ITALIC;\n\n      if ( font->header.weight >= 800 )\n        root->style_flags |= FT_STYLE_FLAG_BOLD;\n\n      /* set up the `fixed_sizes' array */\n      if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )\n        goto Fail;\n\n      root->num_fixed_sizes = 1;\n\n      {\n        FT_Bitmap_Size*  bsize = root->available_sizes;\n        FT_UShort        x_res, y_res;\n\n\n        bsize->width  = font->header.avg_width;\n        bsize->height = (FT_Short)(\n          font->header.pixel_height + font->header.external_leading );\n        bsize->size   = font->header.nominal_point_size << 6;\n\n        x_res = font->header.horizontal_resolution;\n        if ( !x_res )\n          x_res = 72;\n\n        y_res = font->header.vertical_resolution;\n        if ( !y_res )\n          y_res = 72;\n\n        bsize->y_ppem = FT_MulDiv( bsize->size, y_res, 72 );\n        bsize->y_ppem = FT_PIX_ROUND( bsize->y_ppem );\n\n        /*\n         * this reads:\n         *\n         * the nominal height is larger than the bbox's height\n         *\n         * => nominal_point_size contains incorrect value;\n         *    use pixel_height as the nominal height\n         */\n        if ( bsize->y_ppem > ( font->header.pixel_height << 6 ) )\n        {\n          FT_TRACE2(( \"use pixel_height as the nominal height\\n\" ));\n\n          bsize->y_ppem = font->header.pixel_height << 6;\n          bsize->size   = FT_MulDiv( bsize->y_ppem, 72, y_res );\n        }\n\n        bsize->x_ppem = FT_MulDiv( bsize->size, x_res, 72 );\n        bsize->x_ppem = FT_PIX_ROUND( bsize->x_ppem );\n      }\n\n      {\n        FT_CharMapRec  charmap;\n\n\n        charmap.encoding    = FT_ENCODING_NONE;\n        /* initial platform/encoding should indicate unset status? */\n        charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;\n        charmap.encoding_id = TT_APPLE_ID_DEFAULT;\n        charmap.face        = root;\n\n        if ( font->header.charset == FT_WinFNT_ID_MAC )\n        {\n          charmap.encoding    = FT_ENCODING_APPLE_ROMAN;\n          charmap.platform_id = TT_PLATFORM_MACINTOSH;\n/*        charmap.encoding_id = TT_MAC_ID_ROMAN; */\n        }\n\n        error = FT_CMap_New( fnt_cmap_class,\n                             NULL,\n                             &charmap,\n                             NULL );\n        if ( error )\n          goto Fail;\n\n        /* Select default charmap */\n        if ( root->num_charmaps )\n          root->charmap = root->charmaps[0];\n      }\n\n      /* set up remaining flags */\n\n      if ( font->header.last_char < font->header.first_char )\n      {\n        FT_TRACE2(( \"invalid number of glyphs\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Fail;\n      }\n\n      /* reserve one slot for the .notdef glyph at index 0 */\n      root->num_glyphs = font->header.last_char -\n                         font->header.first_char + 1 + 1;\n\n      if ( font->header.face_name_offset >= font->header.file_size )\n      {\n        FT_TRACE2(( \"invalid family name offset\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Fail;\n      }\n      family_size = font->header.file_size - font->header.face_name_offset;\n      /* Some broken fonts don't delimit the face name with a final */\n      /* NULL byte -- the frame is erroneously one byte too small.  */\n      /* We thus allocate one more byte, setting it explicitly to   */\n      /* zero.                                                      */\n      if ( FT_ALLOC( font->family_name, family_size + 1 ) )\n        goto Fail;\n\n      FT_MEM_COPY( font->family_name,\n                   font->fnt_frame + font->header.face_name_offset,\n                   family_size );\n\n      font->family_name[family_size] = '\\0';\n\n      if ( FT_REALLOC( font->family_name,\n                       family_size,\n                       ft_strlen( font->family_name ) + 1 ) )\n        goto Fail;\n\n      root->family_name = font->family_name;\n      root->style_name  = (char *)\"Regular\";\n\n      if ( root->style_flags & FT_STYLE_FLAG_BOLD )\n      {\n        if ( root->style_flags & FT_STYLE_FLAG_ITALIC )\n          root->style_name = (char *)\"Bold Italic\";\n        else\n          root->style_name = (char *)\"Bold\";\n      }\n      else if ( root->style_flags & FT_STYLE_FLAG_ITALIC )\n        root->style_name = (char *)\"Italic\";\n    }\n    goto Exit;\n\n  Fail:\n    FNT_Face_Done( fntface );\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  FNT_Size_Select( FT_Size   size,\n                   FT_ULong  strike_index )\n  {\n    FNT_Face          face   = (FNT_Face)size->face;\n    FT_WinFNT_Header  header = &face->font->header;\n\n    FT_UNUSED( strike_index );\n\n\n    FT_Select_Metrics( size->face, 0 );\n\n    size->metrics.ascender    = header->ascent * 64;\n    size->metrics.descender   = -( header->pixel_height -\n                                   header->ascent ) * 64;\n    size->metrics.max_advance = header->max_width * 64;\n\n    return FT_Err_Ok;\n  }\n\n\n  static FT_Error\n  FNT_Size_Request( FT_Size          size,\n                    FT_Size_Request  req )\n  {\n    FNT_Face          face    = (FNT_Face)size->face;\n    FT_WinFNT_Header  header  = &face->font->header;\n    FT_Bitmap_Size*   bsize   = size->face->available_sizes;\n    FT_Error          error   = FT_ERR( Invalid_Pixel_Size );\n    FT_Long           height;\n\n\n    height = FT_REQUEST_HEIGHT( req );\n    height = ( height + 32 ) >> 6;\n\n    switch ( req->type )\n    {\n    case FT_SIZE_REQUEST_TYPE_NOMINAL:\n      if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) )\n        error = FT_Err_Ok;\n      break;\n\n    case FT_SIZE_REQUEST_TYPE_REAL_DIM:\n      if ( height == header->pixel_height )\n        error = FT_Err_Ok;\n      break;\n\n    default:\n      error = FT_THROW( Unimplemented_Feature );\n      break;\n    }\n\n    if ( error )\n      return error;\n    else\n      return FNT_Size_Select( size, 0 );\n  }\n\n\n  static FT_Error\n  FNT_Load_Glyph( FT_GlyphSlot  slot,\n                  FT_Size       size,\n                  FT_UInt       glyph_index,\n                  FT_Int32      load_flags )\n  {\n    FNT_Face    face   = (FNT_Face)FT_SIZE_FACE( size );\n    FNT_Font    font;\n    FT_Error    error  = FT_Err_Ok;\n    FT_Byte*    p;\n    FT_Int      len;\n    FT_Bitmap*  bitmap = &slot->bitmap;\n    FT_ULong    offset;\n    FT_Bool     new_format;\n\n    FT_UNUSED( load_flags );\n\n\n    if ( !face )\n    {\n      error = FT_THROW( Invalid_Face_Handle );\n      goto Exit;\n    }\n\n    font = face->font;\n\n    if ( !font                                                   ||\n         glyph_index >= (FT_UInt)( FT_FACE( face )->num_glyphs ) )\n    {\n      error = FT_THROW( Invalid_Argument );\n      goto Exit;\n    }\n\n    FT_TRACE1(( \"FNT_Load_Glyph: glyph index %d\\n\", glyph_index ));\n\n    if ( glyph_index > 0 )\n      glyph_index--;                           /* revert to real index */\n    else\n      glyph_index = font->header.default_char; /* the `.notdef' glyph  */\n\n    new_format = FT_BOOL( font->header.version == 0x300 );\n    len        = new_format ? 6 : 4;\n\n    /* get glyph width and offset */\n    offset = ( new_format ? 148 : 118 ) + len * glyph_index;\n\n    if ( offset >= font->header.file_size - 2 - ( new_format ? 4 : 2 ) )\n    {\n      FT_TRACE2(( \"invalid FNT offset\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    p = font->fnt_frame + offset;\n\n    bitmap->width = FT_NEXT_SHORT_LE( p );\n\n    /* jump to glyph entry */\n    if ( new_format )\n      offset = FT_NEXT_ULONG_LE( p );\n    else\n      offset = FT_NEXT_USHORT_LE( p );\n\n    if ( offset >= font->header.file_size )\n    {\n      FT_TRACE2(( \"invalid FNT offset\\n\" ));\n      error = FT_THROW( Invalid_File_Format );\n      goto Exit;\n    }\n\n    /* jump to glyph data */\n    p = font->fnt_frame + /* font->header.bits_offset */ + offset;\n\n    /* allocate and build bitmap */\n    {\n      FT_Memory  memory = FT_FACE_MEMORY( slot->face );\n      FT_Int     pitch  = ( bitmap->width + 7 ) >> 3;\n      FT_Byte*   column;\n      FT_Byte*   write;\n\n\n      bitmap->pitch      = pitch;\n      bitmap->rows       = font->header.pixel_height;\n      bitmap->pixel_mode = FT_PIXEL_MODE_MONO;\n\n      if ( offset + pitch * bitmap->rows > font->header.file_size )\n      {\n        FT_TRACE2(( \"invalid bitmap width\\n\" ));\n        error = FT_THROW( Invalid_File_Format );\n        goto Exit;\n      }\n\n      /* note: since glyphs are stored in columns and not in rows we */\n      /*       can't use ft_glyphslot_set_bitmap                     */\n      if ( FT_ALLOC_MULT( bitmap->buffer, pitch, bitmap->rows ) )\n        goto Exit;\n\n      column = (FT_Byte*)bitmap->buffer;\n\n      for ( ; pitch > 0; pitch--, column++ )\n      {\n        FT_Byte*  limit = p + bitmap->rows;\n\n\n        for ( write = column; p < limit; p++, write += bitmap->pitch )\n          *write = *p;\n      }\n    }\n\n    slot->internal->flags = FT_GLYPH_OWN_BITMAP;\n    slot->bitmap_left     = 0;\n    slot->bitmap_top      = font->header.ascent;\n    slot->format          = FT_GLYPH_FORMAT_BITMAP;\n\n    /* now set up metrics */\n    slot->metrics.width        = bitmap->width << 6;\n    slot->metrics.height       = bitmap->rows << 6;\n    slot->metrics.horiAdvance  = bitmap->width << 6;\n    slot->metrics.horiBearingX = 0;\n    slot->metrics.horiBearingY = slot->bitmap_top << 6;\n\n    ft_synthesize_vertical_metrics( &slot->metrics,\n                                    bitmap->rows << 6 );\n\n  Exit:\n    return error;\n  }\n\n\n  static FT_Error\n  winfnt_get_header( FT_Face               face,\n                     FT_WinFNT_HeaderRec  *aheader )\n  {\n    FNT_Font  font = ((FNT_Face)face)->font;\n\n\n    *aheader = font->header;\n\n    return 0;\n  }\n\n\n  static const FT_Service_WinFntRec  winfnt_service_rec =\n  {\n    winfnt_get_header\n  };\n\n /*\n  *  SERVICE LIST\n  *\n  */\n\n  static const FT_ServiceDescRec  winfnt_services[] =\n  {\n    { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_WINFNT },\n    { FT_SERVICE_ID_WINFNT,    &winfnt_service_rec },\n    { NULL, NULL }\n  };\n\n\n  static FT_Module_Interface\n  winfnt_get_service( FT_Module         module,\n                      const FT_String*  service_id )\n  {\n    FT_UNUSED( module );\n\n    return ft_service_list_lookup( winfnt_services, service_id );\n  }\n\n\n\n\n  FT_CALLBACK_TABLE_DEF\n  const FT_Driver_ClassRec  winfnt_driver_class =\n  {\n    {\n      FT_MODULE_FONT_DRIVER        |\n      FT_MODULE_DRIVER_NO_OUTLINES,\n      sizeof ( FT_DriverRec ),\n\n      \"winfonts\",\n      0x10000L,\n      0x20000L,\n\n      0,\n\n      0,                  /* FT_Module_Constructor */\n      0,                  /* FT_Module_Destructor  */\n      winfnt_get_service\n    },\n\n    sizeof ( FNT_FaceRec ),\n    sizeof ( FT_SizeRec ),\n    sizeof ( FT_GlyphSlotRec ),\n\n    FNT_Face_Init,\n    FNT_Face_Done,\n    0,                    /* FT_Size_InitFunc */\n    0,                    /* FT_Size_DoneFunc */\n    0,                    /* FT_Slot_InitFunc */\n    0,                    /* FT_Slot_DoneFunc */\n\n    FNT_Load_Glyph,\n\n    0,                    /* FT_Face_GetKerningFunc  */\n    0,                    /* FT_Face_AttachFunc      */\n    0,                    /* FT_Face_GetAdvancesFunc */\n\n    FNT_Size_Request,\n    FNT_Size_Select\n  };\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/FreeType/src/winfonts/winfnt.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  winfnt.h                                                               */\n/*                                                                         */\n/*    FreeType font driver for Windows FNT/FON files                       */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2007 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*  Copyright 2007 Dmitry Timoshkov for Codeweavers                        */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __WINFNT_H__\n#define __WINFNT_H__\n\n\n#include <ft2build.h>\n#include FT_WINFONTS_H\n#include FT_INTERNAL_DRIVER_H\n\n\nFT_BEGIN_HEADER\n\n#ifdef FT_CONFIG_OPTION_PIC\n#error \"this module does not support PIC yet\"\n#endif\n\n  typedef struct  WinMZ_HeaderRec_\n  {\n    FT_UShort  magic;\n    /* skipped content */\n    FT_UShort  lfanew;\n\n  } WinMZ_HeaderRec;\n\n\n  typedef struct  WinNE_HeaderRec_\n  {\n    FT_UShort  magic;\n    /* skipped content */\n    FT_UShort  resource_tab_offset;\n    FT_UShort  rname_tab_offset;\n\n  } WinNE_HeaderRec;\n\n\n  typedef struct  WinPE32_HeaderRec_\n  {\n    FT_ULong   magic;\n    FT_UShort  machine;\n    FT_UShort  number_of_sections;\n    /* skipped content */\n    FT_UShort  size_of_optional_header;\n    /* skipped content */\n    FT_UShort  magic32;\n    /* skipped content */\n    FT_ULong   rsrc_virtual_address;\n    FT_ULong   rsrc_size;\n    /* skipped content */\n\n  } WinPE32_HeaderRec;\n\n\n  typedef struct  WinPE32_SectionRec_\n  {\n    FT_Byte   name[8];\n    /* skipped content */\n    FT_ULong  virtual_address;\n    FT_ULong  size_of_raw_data;\n    FT_ULong  pointer_to_raw_data;\n    /* skipped content */\n\n  } WinPE32_SectionRec;\n\n\n  typedef struct  WinPE_RsrcDirRec_\n  {\n    FT_ULong   characteristics;\n    FT_ULong   time_date_stamp;\n    FT_UShort  major_version;\n    FT_UShort  minor_version;\n    FT_UShort  number_of_named_entries;\n    FT_UShort  number_of_id_entries;\n\n  } WinPE_RsrcDirRec;\n\n\n  typedef struct  WinPE_RsrcDirEntryRec_\n  {\n    FT_ULong  name;\n    FT_ULong  offset;\n\n  } WinPE_RsrcDirEntryRec;\n\n\n  typedef struct  WinPE_RsrcDataEntryRec_\n  {\n    FT_ULong  offset_to_data;\n    FT_ULong  size;\n    FT_ULong  code_page;\n    FT_ULong  reserved;\n\n  } WinPE_RsrcDataEntryRec;\n\n\n  typedef struct  WinNameInfoRec_\n  {\n    FT_UShort  offset;\n    FT_UShort  length;\n    FT_UShort  flags;\n    FT_UShort  id;\n    FT_UShort  handle;\n    FT_UShort  usage;\n\n  } WinNameInfoRec;\n\n\n  typedef struct  WinResourceInfoRec_\n  {\n    FT_UShort  type_id;\n    FT_UShort  count;\n\n  } WinResourceInfoRec;\n\n\n#define WINFNT_MZ_MAGIC  0x5A4D\n#define WINFNT_NE_MAGIC  0x454E\n#define WINFNT_PE_MAGIC  0x4550\n\n\n  typedef struct  FNT_FontRec_\n  {\n    FT_ULong             offset;\n\n    FT_WinFNT_HeaderRec  header;\n\n    FT_Byte*             fnt_frame;\n    FT_ULong             fnt_size;\n    FT_String*           family_name;\n\n  } FNT_FontRec, *FNT_Font;\n\n\n  typedef struct  FNT_FaceRec_\n  {\n    FT_FaceRec     root;\n    FNT_Font       font;\n\n    FT_CharMap     charmap_handle;\n    FT_CharMapRec  charmap;  /* a single charmap per face */\n\n  } FNT_FaceRec, *FNT_Face;\n\n\n  FT_EXPORT_VAR( const FT_Driver_ClassRec )  winfnt_driver_class;\n\n\nFT_END_HEADER\n\n\n#endif /* __WINFNT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/OpenGL/glext.h",
    "content": "#ifndef __glext_h_\n#define __glext_h_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n** Copyright (c) 2007-2012 The Khronos Group Inc.\n** \n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n** \n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n** \n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n\n/* Header file version number, required by OpenGL ABI for Linux */\n/* glext.h last updated $Date: 2013-02-07 01:42:49 -0800 (Thu, 07 Feb 2013) $ */\n/* Current version at http://www.opengl.org/registry/ */\n#define GL_GLEXT_VERSION 86\n/* Function declaration macros - to move into glplatform.h */\n\n#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)\n#define WIN32_LEAN_AND_MEAN 1\n#include <windows.h>\n#endif\n\n#ifndef APIENTRY\n#define APIENTRY\n#endif\n#ifndef APIENTRYP\n#define APIENTRYP APIENTRY *\n#endif\n#ifndef GLAPI\n#define GLAPI extern\n#endif\n\n/*************************************************************/\n\n#ifndef GL_VERSION_1_2\n#define GL_UNSIGNED_BYTE_3_3_2            0x8032\n#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033\n#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034\n#define GL_UNSIGNED_INT_8_8_8_8           0x8035\n#define GL_UNSIGNED_INT_10_10_10_2        0x8036\n#define GL_TEXTURE_BINDING_3D             0x806A\n#define GL_PACK_SKIP_IMAGES               0x806B\n#define GL_PACK_IMAGE_HEIGHT              0x806C\n#define GL_UNPACK_SKIP_IMAGES             0x806D\n#define GL_UNPACK_IMAGE_HEIGHT            0x806E\n#define GL_TEXTURE_3D                     0x806F\n#define GL_PROXY_TEXTURE_3D               0x8070\n#define GL_TEXTURE_DEPTH                  0x8071\n#define GL_TEXTURE_WRAP_R                 0x8072\n#define GL_MAX_3D_TEXTURE_SIZE            0x8073\n#define GL_UNSIGNED_BYTE_2_3_3_REV        0x8362\n#define GL_UNSIGNED_SHORT_5_6_5           0x8363\n#define GL_UNSIGNED_SHORT_5_6_5_REV       0x8364\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV     0x8365\n#define GL_UNSIGNED_SHORT_1_5_5_5_REV     0x8366\n#define GL_UNSIGNED_INT_8_8_8_8_REV       0x8367\n#define GL_UNSIGNED_INT_2_10_10_10_REV    0x8368\n#define GL_BGR                            0x80E0\n#define GL_BGRA                           0x80E1\n#define GL_MAX_ELEMENTS_VERTICES          0x80E8\n#define GL_MAX_ELEMENTS_INDICES           0x80E9\n#define GL_CLAMP_TO_EDGE                  0x812F\n#define GL_TEXTURE_MIN_LOD                0x813A\n#define GL_TEXTURE_MAX_LOD                0x813B\n#define GL_TEXTURE_BASE_LEVEL             0x813C\n#define GL_TEXTURE_MAX_LEVEL              0x813D\n#define GL_SMOOTH_POINT_SIZE_RANGE        0x0B12\n#define GL_SMOOTH_POINT_SIZE_GRANULARITY  0x0B13\n#define GL_SMOOTH_LINE_WIDTH_RANGE        0x0B22\n#define GL_SMOOTH_LINE_WIDTH_GRANULARITY  0x0B23\n#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E\n#define GL_RESCALE_NORMAL                 0x803A\n#define GL_LIGHT_MODEL_COLOR_CONTROL      0x81F8\n#define GL_SINGLE_COLOR                   0x81F9\n#define GL_SEPARATE_SPECULAR_COLOR        0x81FA\n#define GL_ALIASED_POINT_SIZE_RANGE       0x846D\n#endif\n\n#ifndef GL_ARB_imaging\n#define GL_CONSTANT_COLOR                 0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002\n#define GL_CONSTANT_ALPHA                 0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004\n#define GL_BLEND_COLOR                    0x8005\n#define GL_FUNC_ADD                       0x8006\n#define GL_MIN                            0x8007\n#define GL_MAX                            0x8008\n#define GL_BLEND_EQUATION                 0x8009\n#define GL_FUNC_SUBTRACT                  0x800A\n#define GL_FUNC_REVERSE_SUBTRACT          0x800B\n#define GL_CONVOLUTION_1D                 0x8010\n#define GL_CONVOLUTION_2D                 0x8011\n#define GL_SEPARABLE_2D                   0x8012\n#define GL_CONVOLUTION_BORDER_MODE        0x8013\n#define GL_CONVOLUTION_FILTER_SCALE       0x8014\n#define GL_CONVOLUTION_FILTER_BIAS        0x8015\n#define GL_REDUCE                         0x8016\n#define GL_CONVOLUTION_FORMAT             0x8017\n#define GL_CONVOLUTION_WIDTH              0x8018\n#define GL_CONVOLUTION_HEIGHT             0x8019\n#define GL_MAX_CONVOLUTION_WIDTH          0x801A\n#define GL_MAX_CONVOLUTION_HEIGHT         0x801B\n#define GL_POST_CONVOLUTION_RED_SCALE     0x801C\n#define GL_POST_CONVOLUTION_GREEN_SCALE   0x801D\n#define GL_POST_CONVOLUTION_BLUE_SCALE    0x801E\n#define GL_POST_CONVOLUTION_ALPHA_SCALE   0x801F\n#define GL_POST_CONVOLUTION_RED_BIAS      0x8020\n#define GL_POST_CONVOLUTION_GREEN_BIAS    0x8021\n#define GL_POST_CONVOLUTION_BLUE_BIAS     0x8022\n#define GL_POST_CONVOLUTION_ALPHA_BIAS    0x8023\n#define GL_HISTOGRAM                      0x8024\n#define GL_PROXY_HISTOGRAM                0x8025\n#define GL_HISTOGRAM_WIDTH                0x8026\n#define GL_HISTOGRAM_FORMAT               0x8027\n#define GL_HISTOGRAM_RED_SIZE             0x8028\n#define GL_HISTOGRAM_GREEN_SIZE           0x8029\n#define GL_HISTOGRAM_BLUE_SIZE            0x802A\n#define GL_HISTOGRAM_ALPHA_SIZE           0x802B\n#define GL_HISTOGRAM_LUMINANCE_SIZE       0x802C\n#define GL_HISTOGRAM_SINK                 0x802D\n#define GL_MINMAX                         0x802E\n#define GL_MINMAX_FORMAT                  0x802F\n#define GL_MINMAX_SINK                    0x8030\n#define GL_TABLE_TOO_LARGE                0x8031\n#define GL_COLOR_MATRIX                   0x80B1\n#define GL_COLOR_MATRIX_STACK_DEPTH       0x80B2\n#define GL_MAX_COLOR_MATRIX_STACK_DEPTH   0x80B3\n#define GL_POST_COLOR_MATRIX_RED_SCALE    0x80B4\n#define GL_POST_COLOR_MATRIX_GREEN_SCALE  0x80B5\n#define GL_POST_COLOR_MATRIX_BLUE_SCALE   0x80B6\n#define GL_POST_COLOR_MATRIX_ALPHA_SCALE  0x80B7\n#define GL_POST_COLOR_MATRIX_RED_BIAS     0x80B8\n#define GL_POST_COLOR_MATRIX_GREEN_BIAS   0x80B9\n#define GL_POST_COLOR_MATRIX_BLUE_BIAS    0x80BA\n#define GL_POST_COLOR_MATRIX_ALPHA_BIAS   0x80BB\n#define GL_COLOR_TABLE                    0x80D0\n#define GL_POST_CONVOLUTION_COLOR_TABLE   0x80D1\n#define GL_POST_COLOR_MATRIX_COLOR_TABLE  0x80D2\n#define GL_PROXY_COLOR_TABLE              0x80D3\n#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4\n#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5\n#define GL_COLOR_TABLE_SCALE              0x80D6\n#define GL_COLOR_TABLE_BIAS               0x80D7\n#define GL_COLOR_TABLE_FORMAT             0x80D8\n#define GL_COLOR_TABLE_WIDTH              0x80D9\n#define GL_COLOR_TABLE_RED_SIZE           0x80DA\n#define GL_COLOR_TABLE_GREEN_SIZE         0x80DB\n#define GL_COLOR_TABLE_BLUE_SIZE          0x80DC\n#define GL_COLOR_TABLE_ALPHA_SIZE         0x80DD\n#define GL_COLOR_TABLE_LUMINANCE_SIZE     0x80DE\n#define GL_COLOR_TABLE_INTENSITY_SIZE     0x80DF\n#define GL_CONSTANT_BORDER                0x8151\n#define GL_REPLICATE_BORDER               0x8153\n#define GL_CONVOLUTION_BORDER_COLOR       0x8154\n#endif\n\n#ifndef GL_VERSION_1_3\n#define GL_TEXTURE0                       0x84C0\n#define GL_TEXTURE1                       0x84C1\n#define GL_TEXTURE2                       0x84C2\n#define GL_TEXTURE3                       0x84C3\n#define GL_TEXTURE4                       0x84C4\n#define GL_TEXTURE5                       0x84C5\n#define GL_TEXTURE6                       0x84C6\n#define GL_TEXTURE7                       0x84C7\n#define GL_TEXTURE8                       0x84C8\n#define GL_TEXTURE9                       0x84C9\n#define GL_TEXTURE10                      0x84CA\n#define GL_TEXTURE11                      0x84CB\n#define GL_TEXTURE12                      0x84CC\n#define GL_TEXTURE13                      0x84CD\n#define GL_TEXTURE14                      0x84CE\n#define GL_TEXTURE15                      0x84CF\n#define GL_TEXTURE16                      0x84D0\n#define GL_TEXTURE17                      0x84D1\n#define GL_TEXTURE18                      0x84D2\n#define GL_TEXTURE19                      0x84D3\n#define GL_TEXTURE20                      0x84D4\n#define GL_TEXTURE21                      0x84D5\n#define GL_TEXTURE22                      0x84D6\n#define GL_TEXTURE23                      0x84D7\n#define GL_TEXTURE24                      0x84D8\n#define GL_TEXTURE25                      0x84D9\n#define GL_TEXTURE26                      0x84DA\n#define GL_TEXTURE27                      0x84DB\n#define GL_TEXTURE28                      0x84DC\n#define GL_TEXTURE29                      0x84DD\n#define GL_TEXTURE30                      0x84DE\n#define GL_TEXTURE31                      0x84DF\n#define GL_ACTIVE_TEXTURE                 0x84E0\n#define GL_MULTISAMPLE                    0x809D\n#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE            0x809F\n#define GL_SAMPLE_COVERAGE                0x80A0\n#define GL_SAMPLE_BUFFERS                 0x80A8\n#define GL_SAMPLES                        0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE          0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT         0x80AB\n#define GL_TEXTURE_CUBE_MAP               0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP         0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C\n#define GL_COMPRESSED_RGB                 0x84ED\n#define GL_COMPRESSED_RGBA                0x84EE\n#define GL_TEXTURE_COMPRESSION_HINT       0x84EF\n#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE  0x86A0\n#define GL_TEXTURE_COMPRESSED             0x86A1\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3\n#define GL_CLAMP_TO_BORDER                0x812D\n#define GL_CLIENT_ACTIVE_TEXTURE          0x84E1\n#define GL_MAX_TEXTURE_UNITS              0x84E2\n#define GL_TRANSPOSE_MODELVIEW_MATRIX     0x84E3\n#define GL_TRANSPOSE_PROJECTION_MATRIX    0x84E4\n#define GL_TRANSPOSE_TEXTURE_MATRIX       0x84E5\n#define GL_TRANSPOSE_COLOR_MATRIX         0x84E6\n#define GL_MULTISAMPLE_BIT                0x20000000\n#define GL_NORMAL_MAP                     0x8511\n#define GL_REFLECTION_MAP                 0x8512\n#define GL_COMPRESSED_ALPHA               0x84E9\n#define GL_COMPRESSED_LUMINANCE           0x84EA\n#define GL_COMPRESSED_LUMINANCE_ALPHA     0x84EB\n#define GL_COMPRESSED_INTENSITY           0x84EC\n#define GL_COMBINE                        0x8570\n#define GL_COMBINE_RGB                    0x8571\n#define GL_COMBINE_ALPHA                  0x8572\n#define GL_SOURCE0_RGB                    0x8580\n#define GL_SOURCE1_RGB                    0x8581\n#define GL_SOURCE2_RGB                    0x8582\n#define GL_SOURCE0_ALPHA                  0x8588\n#define GL_SOURCE1_ALPHA                  0x8589\n#define GL_SOURCE2_ALPHA                  0x858A\n#define GL_OPERAND0_RGB                   0x8590\n#define GL_OPERAND1_RGB                   0x8591\n#define GL_OPERAND2_RGB                   0x8592\n#define GL_OPERAND0_ALPHA                 0x8598\n#define GL_OPERAND1_ALPHA                 0x8599\n#define GL_OPERAND2_ALPHA                 0x859A\n#define GL_RGB_SCALE                      0x8573\n#define GL_ADD_SIGNED                     0x8574\n#define GL_INTERPOLATE                    0x8575\n#define GL_SUBTRACT                       0x84E7\n#define GL_CONSTANT                       0x8576\n#define GL_PRIMARY_COLOR                  0x8577\n#define GL_PREVIOUS                       0x8578\n#define GL_DOT3_RGB                       0x86AE\n#define GL_DOT3_RGBA                      0x86AF\n#endif\n\n#ifndef GL_VERSION_1_4\n#define GL_BLEND_DST_RGB                  0x80C8\n#define GL_BLEND_SRC_RGB                  0x80C9\n#define GL_BLEND_DST_ALPHA                0x80CA\n#define GL_BLEND_SRC_ALPHA                0x80CB\n#define GL_POINT_FADE_THRESHOLD_SIZE      0x8128\n#define GL_DEPTH_COMPONENT16              0x81A5\n#define GL_DEPTH_COMPONENT24              0x81A6\n#define GL_DEPTH_COMPONENT32              0x81A7\n#define GL_MIRRORED_REPEAT                0x8370\n#define GL_MAX_TEXTURE_LOD_BIAS           0x84FD\n#define GL_TEXTURE_LOD_BIAS               0x8501\n#define GL_INCR_WRAP                      0x8507\n#define GL_DECR_WRAP                      0x8508\n#define GL_TEXTURE_DEPTH_SIZE             0x884A\n#define GL_TEXTURE_COMPARE_MODE           0x884C\n#define GL_TEXTURE_COMPARE_FUNC           0x884D\n#define GL_POINT_SIZE_MIN                 0x8126\n#define GL_POINT_SIZE_MAX                 0x8127\n#define GL_POINT_DISTANCE_ATTENUATION     0x8129\n#define GL_GENERATE_MIPMAP                0x8191\n#define GL_GENERATE_MIPMAP_HINT           0x8192\n#define GL_FOG_COORDINATE_SOURCE          0x8450\n#define GL_FOG_COORDINATE                 0x8451\n#define GL_FRAGMENT_DEPTH                 0x8452\n#define GL_CURRENT_FOG_COORDINATE         0x8453\n#define GL_FOG_COORDINATE_ARRAY_TYPE      0x8454\n#define GL_FOG_COORDINATE_ARRAY_STRIDE    0x8455\n#define GL_FOG_COORDINATE_ARRAY_POINTER   0x8456\n#define GL_FOG_COORDINATE_ARRAY           0x8457\n#define GL_COLOR_SUM                      0x8458\n#define GL_CURRENT_SECONDARY_COLOR        0x8459\n#define GL_SECONDARY_COLOR_ARRAY_SIZE     0x845A\n#define GL_SECONDARY_COLOR_ARRAY_TYPE     0x845B\n#define GL_SECONDARY_COLOR_ARRAY_STRIDE   0x845C\n#define GL_SECONDARY_COLOR_ARRAY_POINTER  0x845D\n#define GL_SECONDARY_COLOR_ARRAY          0x845E\n#define GL_TEXTURE_FILTER_CONTROL         0x8500\n#define GL_DEPTH_TEXTURE_MODE             0x884B\n#define GL_COMPARE_R_TO_TEXTURE           0x884E\n#endif\n\n#ifndef GL_VERSION_1_5\n#define GL_BUFFER_SIZE                    0x8764\n#define GL_BUFFER_USAGE                   0x8765\n#define GL_QUERY_COUNTER_BITS             0x8864\n#define GL_CURRENT_QUERY                  0x8865\n#define GL_QUERY_RESULT                   0x8866\n#define GL_QUERY_RESULT_AVAILABLE         0x8867\n#define GL_ARRAY_BUFFER                   0x8892\n#define GL_ELEMENT_ARRAY_BUFFER           0x8893\n#define GL_ARRAY_BUFFER_BINDING           0x8894\n#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895\n#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F\n#define GL_READ_ONLY                      0x88B8\n#define GL_WRITE_ONLY                     0x88B9\n#define GL_READ_WRITE                     0x88BA\n#define GL_BUFFER_ACCESS                  0x88BB\n#define GL_BUFFER_MAPPED                  0x88BC\n#define GL_BUFFER_MAP_POINTER             0x88BD\n#define GL_STREAM_DRAW                    0x88E0\n#define GL_STREAM_READ                    0x88E1\n#define GL_STREAM_COPY                    0x88E2\n#define GL_STATIC_DRAW                    0x88E4\n#define GL_STATIC_READ                    0x88E5\n#define GL_STATIC_COPY                    0x88E6\n#define GL_DYNAMIC_DRAW                   0x88E8\n#define GL_DYNAMIC_READ                   0x88E9\n#define GL_DYNAMIC_COPY                   0x88EA\n#define GL_SAMPLES_PASSED                 0x8914\n#define GL_SRC1_ALPHA                     0x8589\n#define GL_VERTEX_ARRAY_BUFFER_BINDING    0x8896\n#define GL_NORMAL_ARRAY_BUFFER_BINDING    0x8897\n#define GL_COLOR_ARRAY_BUFFER_BINDING     0x8898\n#define GL_INDEX_ARRAY_BUFFER_BINDING     0x8899\n#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A\n#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B\n#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C\n#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D\n#define GL_WEIGHT_ARRAY_BUFFER_BINDING    0x889E\n#define GL_FOG_COORD_SRC                  0x8450\n#define GL_FOG_COORD                      0x8451\n#define GL_CURRENT_FOG_COORD              0x8453\n#define GL_FOG_COORD_ARRAY_TYPE           0x8454\n#define GL_FOG_COORD_ARRAY_STRIDE         0x8455\n#define GL_FOG_COORD_ARRAY_POINTER        0x8456\n#define GL_FOG_COORD_ARRAY                0x8457\n#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D\n#define GL_SRC0_RGB                       0x8580\n#define GL_SRC1_RGB                       0x8581\n#define GL_SRC2_RGB                       0x8582\n#define GL_SRC0_ALPHA                     0x8588\n#define GL_SRC2_ALPHA                     0x858A\n#endif\n\n#ifndef GL_VERSION_2_0\n#define GL_BLEND_EQUATION_RGB             0x8009\n#define GL_VERTEX_ATTRIB_ARRAY_ENABLED    0x8622\n#define GL_VERTEX_ATTRIB_ARRAY_SIZE       0x8623\n#define GL_VERTEX_ATTRIB_ARRAY_STRIDE     0x8624\n#define GL_VERTEX_ATTRIB_ARRAY_TYPE       0x8625\n#define GL_CURRENT_VERTEX_ATTRIB          0x8626\n#define GL_VERTEX_PROGRAM_POINT_SIZE      0x8642\n#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645\n#define GL_STENCIL_BACK_FUNC              0x8800\n#define GL_STENCIL_BACK_FAIL              0x8801\n#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802\n#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803\n#define GL_MAX_DRAW_BUFFERS               0x8824\n#define GL_DRAW_BUFFER0                   0x8825\n#define GL_DRAW_BUFFER1                   0x8826\n#define GL_DRAW_BUFFER2                   0x8827\n#define GL_DRAW_BUFFER3                   0x8828\n#define GL_DRAW_BUFFER4                   0x8829\n#define GL_DRAW_BUFFER5                   0x882A\n#define GL_DRAW_BUFFER6                   0x882B\n#define GL_DRAW_BUFFER7                   0x882C\n#define GL_DRAW_BUFFER8                   0x882D\n#define GL_DRAW_BUFFER9                   0x882E\n#define GL_DRAW_BUFFER10                  0x882F\n#define GL_DRAW_BUFFER11                  0x8830\n#define GL_DRAW_BUFFER12                  0x8831\n#define GL_DRAW_BUFFER13                  0x8832\n#define GL_DRAW_BUFFER14                  0x8833\n#define GL_DRAW_BUFFER15                  0x8834\n#define GL_BLEND_EQUATION_ALPHA           0x883D\n#define GL_MAX_VERTEX_ATTRIBS             0x8869\n#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A\n#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872\n#define GL_FRAGMENT_SHADER                0x8B30\n#define GL_VERTEX_SHADER                  0x8B31\n#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49\n#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A\n#define GL_MAX_VARYING_FLOATS             0x8B4B\n#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C\n#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D\n#define GL_SHADER_TYPE                    0x8B4F\n#define GL_FLOAT_VEC2                     0x8B50\n#define GL_FLOAT_VEC3                     0x8B51\n#define GL_FLOAT_VEC4                     0x8B52\n#define GL_INT_VEC2                       0x8B53\n#define GL_INT_VEC3                       0x8B54\n#define GL_INT_VEC4                       0x8B55\n#define GL_BOOL                           0x8B56\n#define GL_BOOL_VEC2                      0x8B57\n#define GL_BOOL_VEC3                      0x8B58\n#define GL_BOOL_VEC4                      0x8B59\n#define GL_FLOAT_MAT2                     0x8B5A\n#define GL_FLOAT_MAT3                     0x8B5B\n#define GL_FLOAT_MAT4                     0x8B5C\n#define GL_SAMPLER_1D                     0x8B5D\n#define GL_SAMPLER_2D                     0x8B5E\n#define GL_SAMPLER_3D                     0x8B5F\n#define GL_SAMPLER_CUBE                   0x8B60\n#define GL_SAMPLER_1D_SHADOW              0x8B61\n#define GL_SAMPLER_2D_SHADOW              0x8B62\n#define GL_DELETE_STATUS                  0x8B80\n#define GL_COMPILE_STATUS                 0x8B81\n#define GL_LINK_STATUS                    0x8B82\n#define GL_VALIDATE_STATUS                0x8B83\n#define GL_INFO_LOG_LENGTH                0x8B84\n#define GL_ATTACHED_SHADERS               0x8B85\n#define GL_ACTIVE_UNIFORMS                0x8B86\n#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87\n#define GL_SHADER_SOURCE_LENGTH           0x8B88\n#define GL_ACTIVE_ATTRIBUTES              0x8B89\n#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A\n#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B\n#define GL_SHADING_LANGUAGE_VERSION       0x8B8C\n#define GL_CURRENT_PROGRAM                0x8B8D\n#define GL_POINT_SPRITE_COORD_ORIGIN      0x8CA0\n#define GL_LOWER_LEFT                     0x8CA1\n#define GL_UPPER_LEFT                     0x8CA2\n#define GL_STENCIL_BACK_REF               0x8CA3\n#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4\n#define GL_STENCIL_BACK_WRITEMASK         0x8CA5\n#define GL_VERTEX_PROGRAM_TWO_SIDE        0x8643\n#define GL_POINT_SPRITE                   0x8861\n#define GL_COORD_REPLACE                  0x8862\n#define GL_MAX_TEXTURE_COORDS             0x8871\n#endif\n\n#ifndef GL_VERSION_2_1\n#define GL_PIXEL_PACK_BUFFER              0x88EB\n#define GL_PIXEL_UNPACK_BUFFER            0x88EC\n#define GL_PIXEL_PACK_BUFFER_BINDING      0x88ED\n#define GL_PIXEL_UNPACK_BUFFER_BINDING    0x88EF\n#define GL_FLOAT_MAT2x3                   0x8B65\n#define GL_FLOAT_MAT2x4                   0x8B66\n#define GL_FLOAT_MAT3x2                   0x8B67\n#define GL_FLOAT_MAT3x4                   0x8B68\n#define GL_FLOAT_MAT4x2                   0x8B69\n#define GL_FLOAT_MAT4x3                   0x8B6A\n#define GL_SRGB                           0x8C40\n#define GL_SRGB8                          0x8C41\n#define GL_SRGB_ALPHA                     0x8C42\n#define GL_SRGB8_ALPHA8                   0x8C43\n#define GL_COMPRESSED_SRGB                0x8C48\n#define GL_COMPRESSED_SRGB_ALPHA          0x8C49\n#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F\n#define GL_SLUMINANCE_ALPHA               0x8C44\n#define GL_SLUMINANCE8_ALPHA8             0x8C45\n#define GL_SLUMINANCE                     0x8C46\n#define GL_SLUMINANCE8                    0x8C47\n#define GL_COMPRESSED_SLUMINANCE          0x8C4A\n#define GL_COMPRESSED_SLUMINANCE_ALPHA    0x8C4B\n#endif\n\n#ifndef GL_VERSION_3_0\n#define GL_COMPARE_REF_TO_TEXTURE         0x884E\n#define GL_CLIP_DISTANCE0                 0x3000\n#define GL_CLIP_DISTANCE1                 0x3001\n#define GL_CLIP_DISTANCE2                 0x3002\n#define GL_CLIP_DISTANCE3                 0x3003\n#define GL_CLIP_DISTANCE4                 0x3004\n#define GL_CLIP_DISTANCE5                 0x3005\n#define GL_CLIP_DISTANCE6                 0x3006\n#define GL_CLIP_DISTANCE7                 0x3007\n#define GL_MAX_CLIP_DISTANCES             0x0D32\n#define GL_MAJOR_VERSION                  0x821B\n#define GL_MINOR_VERSION                  0x821C\n#define GL_NUM_EXTENSIONS                 0x821D\n#define GL_CONTEXT_FLAGS                  0x821E\n#define GL_COMPRESSED_RED                 0x8225\n#define GL_COMPRESSED_RG                  0x8226\n#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001\n#define GL_RGBA32F                        0x8814\n#define GL_RGB32F                         0x8815\n#define GL_RGBA16F                        0x881A\n#define GL_RGB16F                         0x881B\n#define GL_VERTEX_ATTRIB_ARRAY_INTEGER    0x88FD\n#define GL_MAX_ARRAY_TEXTURE_LAYERS       0x88FF\n#define GL_MIN_PROGRAM_TEXEL_OFFSET       0x8904\n#define GL_MAX_PROGRAM_TEXEL_OFFSET       0x8905\n#define GL_CLAMP_READ_COLOR               0x891C\n#define GL_FIXED_ONLY                     0x891D\n#define GL_MAX_VARYING_COMPONENTS         0x8B4B\n#define GL_TEXTURE_1D_ARRAY               0x8C18\n#define GL_PROXY_TEXTURE_1D_ARRAY         0x8C19\n#define GL_TEXTURE_2D_ARRAY               0x8C1A\n#define GL_PROXY_TEXTURE_2D_ARRAY         0x8C1B\n#define GL_TEXTURE_BINDING_1D_ARRAY       0x8C1C\n#define GL_TEXTURE_BINDING_2D_ARRAY       0x8C1D\n#define GL_R11F_G11F_B10F                 0x8C3A\n#define GL_UNSIGNED_INT_10F_11F_11F_REV   0x8C3B\n#define GL_RGB9_E5                        0x8C3D\n#define GL_UNSIGNED_INT_5_9_9_9_REV       0x8C3E\n#define GL_TEXTURE_SHARED_SIZE            0x8C3F\n#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80\n#define GL_TRANSFORM_FEEDBACK_VARYINGS    0x8C83\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85\n#define GL_PRIMITIVES_GENERATED           0x8C87\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88\n#define GL_RASTERIZER_DISCARD             0x8C89\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B\n#define GL_INTERLEAVED_ATTRIBS            0x8C8C\n#define GL_SEPARATE_ATTRIBS               0x8C8D\n#define GL_TRANSFORM_FEEDBACK_BUFFER      0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F\n#define GL_RGBA32UI                       0x8D70\n#define GL_RGB32UI                        0x8D71\n#define GL_RGBA16UI                       0x8D76\n#define GL_RGB16UI                        0x8D77\n#define GL_RGBA8UI                        0x8D7C\n#define GL_RGB8UI                         0x8D7D\n#define GL_RGBA32I                        0x8D82\n#define GL_RGB32I                         0x8D83\n#define GL_RGBA16I                        0x8D88\n#define GL_RGB16I                         0x8D89\n#define GL_RGBA8I                         0x8D8E\n#define GL_RGB8I                          0x8D8F\n#define GL_RED_INTEGER                    0x8D94\n#define GL_GREEN_INTEGER                  0x8D95\n#define GL_BLUE_INTEGER                   0x8D96\n#define GL_RGB_INTEGER                    0x8D98\n#define GL_RGBA_INTEGER                   0x8D99\n#define GL_BGR_INTEGER                    0x8D9A\n#define GL_BGRA_INTEGER                   0x8D9B\n#define GL_SAMPLER_1D_ARRAY               0x8DC0\n#define GL_SAMPLER_2D_ARRAY               0x8DC1\n#define GL_SAMPLER_1D_ARRAY_SHADOW        0x8DC3\n#define GL_SAMPLER_2D_ARRAY_SHADOW        0x8DC4\n#define GL_SAMPLER_CUBE_SHADOW            0x8DC5\n#define GL_UNSIGNED_INT_VEC2              0x8DC6\n#define GL_UNSIGNED_INT_VEC3              0x8DC7\n#define GL_UNSIGNED_INT_VEC4              0x8DC8\n#define GL_INT_SAMPLER_1D                 0x8DC9\n#define GL_INT_SAMPLER_2D                 0x8DCA\n#define GL_INT_SAMPLER_3D                 0x8DCB\n#define GL_INT_SAMPLER_CUBE               0x8DCC\n#define GL_INT_SAMPLER_1D_ARRAY           0x8DCE\n#define GL_INT_SAMPLER_2D_ARRAY           0x8DCF\n#define GL_UNSIGNED_INT_SAMPLER_1D        0x8DD1\n#define GL_UNSIGNED_INT_SAMPLER_2D        0x8DD2\n#define GL_UNSIGNED_INT_SAMPLER_3D        0x8DD3\n#define GL_UNSIGNED_INT_SAMPLER_CUBE      0x8DD4\n#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY  0x8DD6\n#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY  0x8DD7\n#define GL_QUERY_WAIT                     0x8E13\n#define GL_QUERY_NO_WAIT                  0x8E14\n#define GL_QUERY_BY_REGION_WAIT           0x8E15\n#define GL_QUERY_BY_REGION_NO_WAIT        0x8E16\n#define GL_BUFFER_ACCESS_FLAGS            0x911F\n#define GL_BUFFER_MAP_LENGTH              0x9120\n#define GL_BUFFER_MAP_OFFSET              0x9121\n/* Reuse tokens from ARB_depth_buffer_float */\n/* reuse GL_DEPTH_COMPONENT32F */\n/* reuse GL_DEPTH32F_STENCIL8 */\n/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */\n/* Reuse tokens from ARB_framebuffer_object */\n/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */\n/* reuse GL_FRAMEBUFFER_DEFAULT */\n/* reuse GL_FRAMEBUFFER_UNDEFINED */\n/* reuse GL_DEPTH_STENCIL_ATTACHMENT */\n/* reuse GL_INDEX */\n/* reuse GL_MAX_RENDERBUFFER_SIZE */\n/* reuse GL_DEPTH_STENCIL */\n/* reuse GL_UNSIGNED_INT_24_8 */\n/* reuse GL_DEPTH24_STENCIL8 */\n/* reuse GL_TEXTURE_STENCIL_SIZE */\n/* reuse GL_TEXTURE_RED_TYPE */\n/* reuse GL_TEXTURE_GREEN_TYPE */\n/* reuse GL_TEXTURE_BLUE_TYPE */\n/* reuse GL_TEXTURE_ALPHA_TYPE */\n/* reuse GL_TEXTURE_DEPTH_TYPE */\n/* reuse GL_UNSIGNED_NORMALIZED */\n/* reuse GL_FRAMEBUFFER_BINDING */\n/* reuse GL_DRAW_FRAMEBUFFER_BINDING */\n/* reuse GL_RENDERBUFFER_BINDING */\n/* reuse GL_READ_FRAMEBUFFER */\n/* reuse GL_DRAW_FRAMEBUFFER */\n/* reuse GL_READ_FRAMEBUFFER_BINDING */\n/* reuse GL_RENDERBUFFER_SAMPLES */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */\n/* reuse GL_FRAMEBUFFER_COMPLETE */\n/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */\n/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */\n/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */\n/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */\n/* reuse GL_FRAMEBUFFER_UNSUPPORTED */\n/* reuse GL_MAX_COLOR_ATTACHMENTS */\n/* reuse GL_COLOR_ATTACHMENT0 */\n/* reuse GL_COLOR_ATTACHMENT1 */\n/* reuse GL_COLOR_ATTACHMENT2 */\n/* reuse GL_COLOR_ATTACHMENT3 */\n/* reuse GL_COLOR_ATTACHMENT4 */\n/* reuse GL_COLOR_ATTACHMENT5 */\n/* reuse GL_COLOR_ATTACHMENT6 */\n/* reuse GL_COLOR_ATTACHMENT7 */\n/* reuse GL_COLOR_ATTACHMENT8 */\n/* reuse GL_COLOR_ATTACHMENT9 */\n/* reuse GL_COLOR_ATTACHMENT10 */\n/* reuse GL_COLOR_ATTACHMENT11 */\n/* reuse GL_COLOR_ATTACHMENT12 */\n/* reuse GL_COLOR_ATTACHMENT13 */\n/* reuse GL_COLOR_ATTACHMENT14 */\n/* reuse GL_COLOR_ATTACHMENT15 */\n/* reuse GL_DEPTH_ATTACHMENT */\n/* reuse GL_STENCIL_ATTACHMENT */\n/* reuse GL_FRAMEBUFFER */\n/* reuse GL_RENDERBUFFER */\n/* reuse GL_RENDERBUFFER_WIDTH */\n/* reuse GL_RENDERBUFFER_HEIGHT */\n/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */\n/* reuse GL_STENCIL_INDEX1 */\n/* reuse GL_STENCIL_INDEX4 */\n/* reuse GL_STENCIL_INDEX8 */\n/* reuse GL_STENCIL_INDEX16 */\n/* reuse GL_RENDERBUFFER_RED_SIZE */\n/* reuse GL_RENDERBUFFER_GREEN_SIZE */\n/* reuse GL_RENDERBUFFER_BLUE_SIZE */\n/* reuse GL_RENDERBUFFER_ALPHA_SIZE */\n/* reuse GL_RENDERBUFFER_DEPTH_SIZE */\n/* reuse GL_RENDERBUFFER_STENCIL_SIZE */\n/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */\n/* reuse GL_MAX_SAMPLES */\n/* Reuse tokens from ARB_framebuffer_sRGB */\n/* reuse GL_FRAMEBUFFER_SRGB */\n/* Reuse tokens from ARB_half_float_vertex */\n/* reuse GL_HALF_FLOAT */\n/* Reuse tokens from ARB_map_buffer_range */\n/* reuse GL_MAP_READ_BIT */\n/* reuse GL_MAP_WRITE_BIT */\n/* reuse GL_MAP_INVALIDATE_RANGE_BIT */\n/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */\n/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */\n/* reuse GL_MAP_UNSYNCHRONIZED_BIT */\n/* Reuse tokens from ARB_texture_compression_rgtc */\n/* reuse GL_COMPRESSED_RED_RGTC1 */\n/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */\n/* reuse GL_COMPRESSED_RG_RGTC2 */\n/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */\n/* Reuse tokens from ARB_texture_rg */\n/* reuse GL_RG */\n/* reuse GL_RG_INTEGER */\n/* reuse GL_R8 */\n/* reuse GL_R16 */\n/* reuse GL_RG8 */\n/* reuse GL_RG16 */\n/* reuse GL_R16F */\n/* reuse GL_R32F */\n/* reuse GL_RG16F */\n/* reuse GL_RG32F */\n/* reuse GL_R8I */\n/* reuse GL_R8UI */\n/* reuse GL_R16I */\n/* reuse GL_R16UI */\n/* reuse GL_R32I */\n/* reuse GL_R32UI */\n/* reuse GL_RG8I */\n/* reuse GL_RG8UI */\n/* reuse GL_RG16I */\n/* reuse GL_RG16UI */\n/* reuse GL_RG32I */\n/* reuse GL_RG32UI */\n/* Reuse tokens from ARB_vertex_array_object */\n/* reuse GL_VERTEX_ARRAY_BINDING */\n#define GL_CLAMP_VERTEX_COLOR             0x891A\n#define GL_CLAMP_FRAGMENT_COLOR           0x891B\n#define GL_ALPHA_INTEGER                  0x8D97\n/* Reuse tokens from ARB_framebuffer_object */\n/* reuse GL_TEXTURE_LUMINANCE_TYPE */\n/* reuse GL_TEXTURE_INTENSITY_TYPE */\n#endif\n\n#ifndef GL_VERSION_3_1\n#define GL_SAMPLER_2D_RECT                0x8B63\n#define GL_SAMPLER_2D_RECT_SHADOW         0x8B64\n#define GL_SAMPLER_BUFFER                 0x8DC2\n#define GL_INT_SAMPLER_2D_RECT            0x8DCD\n#define GL_INT_SAMPLER_BUFFER             0x8DD0\n#define GL_UNSIGNED_INT_SAMPLER_2D_RECT   0x8DD5\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER    0x8DD8\n#define GL_TEXTURE_BUFFER                 0x8C2A\n#define GL_MAX_TEXTURE_BUFFER_SIZE        0x8C2B\n#define GL_TEXTURE_BINDING_BUFFER         0x8C2C\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D\n#define GL_TEXTURE_RECTANGLE              0x84F5\n#define GL_TEXTURE_BINDING_RECTANGLE      0x84F6\n#define GL_PROXY_TEXTURE_RECTANGLE        0x84F7\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE     0x84F8\n#define GL_RED_SNORM                      0x8F90\n#define GL_RG_SNORM                       0x8F91\n#define GL_RGB_SNORM                      0x8F92\n#define GL_RGBA_SNORM                     0x8F93\n#define GL_R8_SNORM                       0x8F94\n#define GL_RG8_SNORM                      0x8F95\n#define GL_RGB8_SNORM                     0x8F96\n#define GL_RGBA8_SNORM                    0x8F97\n#define GL_R16_SNORM                      0x8F98\n#define GL_RG16_SNORM                     0x8F99\n#define GL_RGB16_SNORM                    0x8F9A\n#define GL_RGBA16_SNORM                   0x8F9B\n#define GL_SIGNED_NORMALIZED              0x8F9C\n#define GL_PRIMITIVE_RESTART              0x8F9D\n#define GL_PRIMITIVE_RESTART_INDEX        0x8F9E\n/* Reuse tokens from ARB_copy_buffer */\n/* reuse GL_COPY_READ_BUFFER */\n/* reuse GL_COPY_WRITE_BUFFER */\n/* Reuse tokens from ARB_draw_instanced (none) */\n/* Reuse tokens from ARB_uniform_buffer_object */\n/* reuse GL_UNIFORM_BUFFER */\n/* reuse GL_UNIFORM_BUFFER_BINDING */\n/* reuse GL_UNIFORM_BUFFER_START */\n/* reuse GL_UNIFORM_BUFFER_SIZE */\n/* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */\n/* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */\n/* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */\n/* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */\n/* reuse GL_MAX_UNIFORM_BLOCK_SIZE */\n/* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */\n/* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */\n/* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */\n/* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */\n/* reuse GL_ACTIVE_UNIFORM_BLOCKS */\n/* reuse GL_UNIFORM_TYPE */\n/* reuse GL_UNIFORM_SIZE */\n/* reuse GL_UNIFORM_NAME_LENGTH */\n/* reuse GL_UNIFORM_BLOCK_INDEX */\n/* reuse GL_UNIFORM_OFFSET */\n/* reuse GL_UNIFORM_ARRAY_STRIDE */\n/* reuse GL_UNIFORM_MATRIX_STRIDE */\n/* reuse GL_UNIFORM_IS_ROW_MAJOR */\n/* reuse GL_UNIFORM_BLOCK_BINDING */\n/* reuse GL_UNIFORM_BLOCK_DATA_SIZE */\n/* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */\n/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */\n/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */\n/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */\n/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */\n/* reuse GL_INVALID_INDEX */\n#endif\n\n#ifndef GL_VERSION_3_2\n#define GL_CONTEXT_CORE_PROFILE_BIT       0x00000001\n#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002\n#define GL_LINES_ADJACENCY                0x000A\n#define GL_LINE_STRIP_ADJACENCY           0x000B\n#define GL_TRIANGLES_ADJACENCY            0x000C\n#define GL_TRIANGLE_STRIP_ADJACENCY       0x000D\n#define GL_PROGRAM_POINT_SIZE             0x8642\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8\n#define GL_GEOMETRY_SHADER                0x8DD9\n#define GL_GEOMETRY_VERTICES_OUT          0x8916\n#define GL_GEOMETRY_INPUT_TYPE            0x8917\n#define GL_GEOMETRY_OUTPUT_TYPE           0x8918\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES   0x8DE0\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1\n#define GL_MAX_VERTEX_OUTPUT_COMPONENTS   0x9122\n#define GL_MAX_GEOMETRY_INPUT_COMPONENTS  0x9123\n#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124\n#define GL_MAX_FRAGMENT_INPUT_COMPONENTS  0x9125\n#define GL_CONTEXT_PROFILE_MASK           0x9126\n/* reuse GL_MAX_VARYING_COMPONENTS */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */\n/* Reuse tokens from ARB_depth_clamp */\n/* reuse GL_DEPTH_CLAMP */\n/* Reuse tokens from ARB_draw_elements_base_vertex (none) */\n/* Reuse tokens from ARB_fragment_coord_conventions (none) */\n/* Reuse tokens from ARB_provoking_vertex */\n/* reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */\n/* reuse GL_FIRST_VERTEX_CONVENTION */\n/* reuse GL_LAST_VERTEX_CONVENTION */\n/* reuse GL_PROVOKING_VERTEX */\n/* Reuse tokens from ARB_seamless_cube_map */\n/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */\n/* Reuse tokens from ARB_sync */\n/* reuse GL_MAX_SERVER_WAIT_TIMEOUT */\n/* reuse GL_OBJECT_TYPE */\n/* reuse GL_SYNC_CONDITION */\n/* reuse GL_SYNC_STATUS */\n/* reuse GL_SYNC_FLAGS */\n/* reuse GL_SYNC_FENCE */\n/* reuse GL_SYNC_GPU_COMMANDS_COMPLETE */\n/* reuse GL_UNSIGNALED */\n/* reuse GL_SIGNALED */\n/* reuse GL_ALREADY_SIGNALED */\n/* reuse GL_TIMEOUT_EXPIRED */\n/* reuse GL_CONDITION_SATISFIED */\n/* reuse GL_WAIT_FAILED */\n/* reuse GL_TIMEOUT_IGNORED */\n/* reuse GL_SYNC_FLUSH_COMMANDS_BIT */\n/* reuse GL_TIMEOUT_IGNORED */\n/* Reuse tokens from ARB_texture_multisample */\n/* reuse GL_SAMPLE_POSITION */\n/* reuse GL_SAMPLE_MASK */\n/* reuse GL_SAMPLE_MASK_VALUE */\n/* reuse GL_MAX_SAMPLE_MASK_WORDS */\n/* reuse GL_TEXTURE_2D_MULTISAMPLE */\n/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE */\n/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE */\n/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_TEXTURE_SAMPLES */\n/* reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS */\n/* reuse GL_SAMPLER_2D_MULTISAMPLE */\n/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE */\n/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE */\n/* reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_MAX_COLOR_TEXTURE_SAMPLES */\n/* reuse GL_MAX_DEPTH_TEXTURE_SAMPLES */\n/* reuse GL_MAX_INTEGER_SAMPLES */\n/* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */\n#endif\n\n#ifndef GL_VERSION_3_3\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR    0x88FE\n/* Reuse tokens from ARB_blend_func_extended */\n/* reuse GL_SRC1_COLOR */\n/* reuse GL_ONE_MINUS_SRC1_COLOR */\n/* reuse GL_ONE_MINUS_SRC1_ALPHA */\n/* reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS */\n/* Reuse tokens from ARB_explicit_attrib_location (none) */\n/* Reuse tokens from ARB_occlusion_query2 */\n/* reuse GL_ANY_SAMPLES_PASSED */\n/* Reuse tokens from ARB_sampler_objects */\n/* reuse GL_SAMPLER_BINDING */\n/* Reuse tokens from ARB_shader_bit_encoding (none) */\n/* Reuse tokens from ARB_texture_rgb10_a2ui */\n/* reuse GL_RGB10_A2UI */\n/* Reuse tokens from ARB_texture_swizzle */\n/* reuse GL_TEXTURE_SWIZZLE_R */\n/* reuse GL_TEXTURE_SWIZZLE_G */\n/* reuse GL_TEXTURE_SWIZZLE_B */\n/* reuse GL_TEXTURE_SWIZZLE_A */\n/* reuse GL_TEXTURE_SWIZZLE_RGBA */\n/* Reuse tokens from ARB_timer_query */\n/* reuse GL_TIME_ELAPSED */\n/* reuse GL_TIMESTAMP */\n/* Reuse tokens from ARB_vertex_type_2_10_10_10_rev */\n/* reuse GL_INT_2_10_10_10_REV */\n#endif\n\n#ifndef GL_VERSION_4_0\n#define GL_SAMPLE_SHADING                 0x8C36\n#define GL_MIN_SAMPLE_SHADING_VALUE       0x8C37\n#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F\n#define GL_TEXTURE_CUBE_MAP_ARRAY         0x9009\n#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A\n#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY   0x900B\n#define GL_SAMPLER_CUBE_MAP_ARRAY         0x900C\n#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW  0x900D\n#define GL_INT_SAMPLER_CUBE_MAP_ARRAY     0x900E\n#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F\n/* Reuse tokens from ARB_texture_query_lod (none) */\n/* Reuse tokens from ARB_draw_buffers_blend (none) */\n/* Reuse tokens from ARB_draw_indirect */\n/* reuse GL_DRAW_INDIRECT_BUFFER */\n/* reuse GL_DRAW_INDIRECT_BUFFER_BINDING */\n/* Reuse tokens from ARB_gpu_shader5 */\n/* reuse GL_GEOMETRY_SHADER_INVOCATIONS */\n/* reuse GL_MAX_GEOMETRY_SHADER_INVOCATIONS */\n/* reuse GL_MIN_FRAGMENT_INTERPOLATION_OFFSET */\n/* reuse GL_MAX_FRAGMENT_INTERPOLATION_OFFSET */\n/* reuse GL_FRAGMENT_INTERPOLATION_OFFSET_BITS */\n/* reuse GL_MAX_VERTEX_STREAMS */\n/* Reuse tokens from ARB_gpu_shader_fp64 */\n/* reuse GL_DOUBLE_VEC2 */\n/* reuse GL_DOUBLE_VEC3 */\n/* reuse GL_DOUBLE_VEC4 */\n/* reuse GL_DOUBLE_MAT2 */\n/* reuse GL_DOUBLE_MAT3 */\n/* reuse GL_DOUBLE_MAT4 */\n/* reuse GL_DOUBLE_MAT2x3 */\n/* reuse GL_DOUBLE_MAT2x4 */\n/* reuse GL_DOUBLE_MAT3x2 */\n/* reuse GL_DOUBLE_MAT3x4 */\n/* reuse GL_DOUBLE_MAT4x2 */\n/* reuse GL_DOUBLE_MAT4x3 */\n/* Reuse tokens from ARB_shader_subroutine */\n/* reuse GL_ACTIVE_SUBROUTINES */\n/* reuse GL_ACTIVE_SUBROUTINE_UNIFORMS */\n/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS */\n/* reuse GL_ACTIVE_SUBROUTINE_MAX_LENGTH */\n/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH */\n/* reuse GL_MAX_SUBROUTINES */\n/* reuse GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS */\n/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */\n/* reuse GL_COMPATIBLE_SUBROUTINES */\n/* Reuse tokens from ARB_tessellation_shader */\n/* reuse GL_PATCHES */\n/* reuse GL_PATCH_VERTICES */\n/* reuse GL_PATCH_DEFAULT_INNER_LEVEL */\n/* reuse GL_PATCH_DEFAULT_OUTER_LEVEL */\n/* reuse GL_TESS_CONTROL_OUTPUT_VERTICES */\n/* reuse GL_TESS_GEN_MODE */\n/* reuse GL_TESS_GEN_SPACING */\n/* reuse GL_TESS_GEN_VERTEX_ORDER */\n/* reuse GL_TESS_GEN_POINT_MODE */\n/* reuse GL_ISOLINES */\n/* reuse GL_FRACTIONAL_ODD */\n/* reuse GL_FRACTIONAL_EVEN */\n/* reuse GL_MAX_PATCH_VERTICES */\n/* reuse GL_MAX_TESS_GEN_LEVEL */\n/* reuse GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS */\n/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS */\n/* reuse GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS */\n/* reuse GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS */\n/* reuse GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS */\n/* reuse GL_MAX_TESS_PATCH_COMPONENTS */\n/* reuse GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS */\n/* reuse GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS */\n/* reuse GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS */\n/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS */\n/* reuse GL_MAX_TESS_CONTROL_INPUT_COMPONENTS */\n/* reuse GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS */\n/* reuse GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS */\n/* reuse GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS */\n/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER */\n/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER */\n/* reuse GL_TESS_EVALUATION_SHADER */\n/* reuse GL_TESS_CONTROL_SHADER */\n/* Reuse tokens from ARB_texture_buffer_object_rgb32 (none) */\n/* Reuse tokens from ARB_transform_feedback2 */\n/* reuse GL_TRANSFORM_FEEDBACK */\n/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */\n/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */\n/* reuse GL_TRANSFORM_FEEDBACK_BINDING */\n/* Reuse tokens from ARB_transform_feedback3 */\n/* reuse GL_MAX_TRANSFORM_FEEDBACK_BUFFERS */\n/* reuse GL_MAX_VERTEX_STREAMS */\n#endif\n\n#ifndef GL_VERSION_4_1\n/* Reuse tokens from ARB_ES2_compatibility */\n/* reuse GL_FIXED */\n/* reuse GL_IMPLEMENTATION_COLOR_READ_TYPE */\n/* reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT */\n/* reuse GL_LOW_FLOAT */\n/* reuse GL_MEDIUM_FLOAT */\n/* reuse GL_HIGH_FLOAT */\n/* reuse GL_LOW_INT */\n/* reuse GL_MEDIUM_INT */\n/* reuse GL_HIGH_INT */\n/* reuse GL_SHADER_COMPILER */\n/* reuse GL_SHADER_BINARY_FORMATS */\n/* reuse GL_NUM_SHADER_BINARY_FORMATS */\n/* reuse GL_MAX_VERTEX_UNIFORM_VECTORS */\n/* reuse GL_MAX_VARYING_VECTORS */\n/* reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS */\n/* reuse GL_RGB565 */\n/* Reuse tokens from ARB_get_program_binary */\n/* reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT */\n/* reuse GL_PROGRAM_BINARY_LENGTH */\n/* reuse GL_NUM_PROGRAM_BINARY_FORMATS */\n/* reuse GL_PROGRAM_BINARY_FORMATS */\n/* Reuse tokens from ARB_separate_shader_objects */\n/* reuse GL_VERTEX_SHADER_BIT */\n/* reuse GL_FRAGMENT_SHADER_BIT */\n/* reuse GL_GEOMETRY_SHADER_BIT */\n/* reuse GL_TESS_CONTROL_SHADER_BIT */\n/* reuse GL_TESS_EVALUATION_SHADER_BIT */\n/* reuse GL_ALL_SHADER_BITS */\n/* reuse GL_PROGRAM_SEPARABLE */\n/* reuse GL_ACTIVE_PROGRAM */\n/* reuse GL_PROGRAM_PIPELINE_BINDING */\n/* Reuse tokens from ARB_shader_precision (none) */\n/* Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already */\n/* Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already */\n/* reuse GL_MAX_VIEWPORTS */\n/* reuse GL_VIEWPORT_SUBPIXEL_BITS */\n/* reuse GL_VIEWPORT_BOUNDS_RANGE */\n/* reuse GL_LAYER_PROVOKING_VERTEX */\n/* reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX */\n/* reuse GL_UNDEFINED_VERTEX */\n#endif\n\n#ifndef GL_VERSION_4_2\n/* Reuse tokens from ARB_base_instance (none) */\n/* Reuse tokens from ARB_shading_language_420pack (none) */\n/* Reuse tokens from ARB_transform_feedback_instanced (none) */\n/* Reuse tokens from ARB_compressed_texture_pixel_storage */\n/* reuse GL_UNPACK_COMPRESSED_BLOCK_WIDTH */\n/* reuse GL_UNPACK_COMPRESSED_BLOCK_HEIGHT */\n/* reuse GL_UNPACK_COMPRESSED_BLOCK_DEPTH */\n/* reuse GL_UNPACK_COMPRESSED_BLOCK_SIZE */\n/* reuse GL_PACK_COMPRESSED_BLOCK_WIDTH */\n/* reuse GL_PACK_COMPRESSED_BLOCK_HEIGHT */\n/* reuse GL_PACK_COMPRESSED_BLOCK_DEPTH */\n/* reuse GL_PACK_COMPRESSED_BLOCK_SIZE */\n/* Reuse tokens from ARB_conservative_depth (none) */\n/* Reuse tokens from ARB_internalformat_query */\n/* reuse GL_NUM_SAMPLE_COUNTS */\n/* Reuse tokens from ARB_map_buffer_alignment */\n/* reuse GL_MIN_MAP_BUFFER_ALIGNMENT */\n/* Reuse tokens from ARB_shader_atomic_counters */\n/* reuse GL_ATOMIC_COUNTER_BUFFER */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_BINDING */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_START */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_SIZE */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER */\n/* reuse GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS */\n/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS */\n/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS */\n/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS */\n/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS */\n/* reuse GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS */\n/* reuse GL_MAX_VERTEX_ATOMIC_COUNTERS */\n/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS */\n/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS */\n/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTERS */\n/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTERS */\n/* reuse GL_MAX_COMBINED_ATOMIC_COUNTERS */\n/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE */\n/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS */\n/* reuse GL_ACTIVE_ATOMIC_COUNTER_BUFFERS */\n/* reuse GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX */\n/* reuse GL_UNSIGNED_INT_ATOMIC_COUNTER */\n/* Reuse tokens from ARB_shader_image_load_store */\n/* reuse GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT */\n/* reuse GL_ELEMENT_ARRAY_BARRIER_BIT */\n/* reuse GL_UNIFORM_BARRIER_BIT */\n/* reuse GL_TEXTURE_FETCH_BARRIER_BIT */\n/* reuse GL_SHADER_IMAGE_ACCESS_BARRIER_BIT */\n/* reuse GL_COMMAND_BARRIER_BIT */\n/* reuse GL_PIXEL_BUFFER_BARRIER_BIT */\n/* reuse GL_TEXTURE_UPDATE_BARRIER_BIT */\n/* reuse GL_BUFFER_UPDATE_BARRIER_BIT */\n/* reuse GL_FRAMEBUFFER_BARRIER_BIT */\n/* reuse GL_TRANSFORM_FEEDBACK_BARRIER_BIT */\n/* reuse GL_ATOMIC_COUNTER_BARRIER_BIT */\n/* reuse GL_ALL_BARRIER_BITS */\n/* reuse GL_MAX_IMAGE_UNITS */\n/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */\n/* reuse GL_IMAGE_BINDING_NAME */\n/* reuse GL_IMAGE_BINDING_LEVEL */\n/* reuse GL_IMAGE_BINDING_LAYERED */\n/* reuse GL_IMAGE_BINDING_LAYER */\n/* reuse GL_IMAGE_BINDING_ACCESS */\n/* reuse GL_IMAGE_1D */\n/* reuse GL_IMAGE_2D */\n/* reuse GL_IMAGE_3D */\n/* reuse GL_IMAGE_2D_RECT */\n/* reuse GL_IMAGE_CUBE */\n/* reuse GL_IMAGE_BUFFER */\n/* reuse GL_IMAGE_1D_ARRAY */\n/* reuse GL_IMAGE_2D_ARRAY */\n/* reuse GL_IMAGE_CUBE_MAP_ARRAY */\n/* reuse GL_IMAGE_2D_MULTISAMPLE */\n/* reuse GL_IMAGE_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_INT_IMAGE_1D */\n/* reuse GL_INT_IMAGE_2D */\n/* reuse GL_INT_IMAGE_3D */\n/* reuse GL_INT_IMAGE_2D_RECT */\n/* reuse GL_INT_IMAGE_CUBE */\n/* reuse GL_INT_IMAGE_BUFFER */\n/* reuse GL_INT_IMAGE_1D_ARRAY */\n/* reuse GL_INT_IMAGE_2D_ARRAY */\n/* reuse GL_INT_IMAGE_CUBE_MAP_ARRAY */\n/* reuse GL_INT_IMAGE_2D_MULTISAMPLE */\n/* reuse GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_UNSIGNED_INT_IMAGE_1D */\n/* reuse GL_UNSIGNED_INT_IMAGE_2D */\n/* reuse GL_UNSIGNED_INT_IMAGE_3D */\n/* reuse GL_UNSIGNED_INT_IMAGE_2D_RECT */\n/* reuse GL_UNSIGNED_INT_IMAGE_CUBE */\n/* reuse GL_UNSIGNED_INT_IMAGE_BUFFER */\n/* reuse GL_UNSIGNED_INT_IMAGE_1D_ARRAY */\n/* reuse GL_UNSIGNED_INT_IMAGE_2D_ARRAY */\n/* reuse GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY */\n/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE */\n/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_MAX_IMAGE_SAMPLES */\n/* reuse GL_IMAGE_BINDING_FORMAT */\n/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */\n/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE */\n/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS */\n/* reuse GL_MAX_VERTEX_IMAGE_UNIFORMS */\n/* reuse GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS */\n/* reuse GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS */\n/* reuse GL_MAX_GEOMETRY_IMAGE_UNIFORMS */\n/* reuse GL_MAX_FRAGMENT_IMAGE_UNIFORMS */\n/* reuse GL_MAX_COMBINED_IMAGE_UNIFORMS */\n/* Reuse tokens from ARB_shading_language_packing (none) */\n/* Reuse tokens from ARB_texture_storage */\n/* reuse GL_TEXTURE_IMMUTABLE_FORMAT */\n#endif\n\n#ifndef GL_VERSION_4_3\n#define GL_NUM_SHADING_LANGUAGE_VERSIONS  0x82E9\n#define GL_VERTEX_ATTRIB_ARRAY_LONG       0x874E\n/* Reuse tokens from ARB_arrays_of_arrays (none, GLSL only) */\n/* Reuse tokens from ARB_fragment_layer_viewport (none, GLSL only) */\n/* Reuse tokens from ARB_shader_image_size (none, GLSL only) */\n/* Reuse tokens from ARB_ES3_compatibility */\n/* reuse GL_COMPRESSED_RGB8_ETC2 */\n/* reuse GL_COMPRESSED_SRGB8_ETC2 */\n/* reuse GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 */\n/* reuse GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 */\n/* reuse GL_COMPRESSED_RGBA8_ETC2_EAC */\n/* reuse GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC */\n/* reuse GL_COMPRESSED_R11_EAC */\n/* reuse GL_COMPRESSED_SIGNED_R11_EAC */\n/* reuse GL_COMPRESSED_RG11_EAC */\n/* reuse GL_COMPRESSED_SIGNED_RG11_EAC */\n/* reuse GL_PRIMITIVE_RESTART_FIXED_INDEX */\n/* reuse GL_ANY_SAMPLES_PASSED_CONSERVATIVE */\n/* reuse GL_MAX_ELEMENT_INDEX */\n/* Reuse tokens from ARB_clear_buffer_object (none) */\n/* Reuse tokens from ARB_compute_shader */\n/* reuse GL_COMPUTE_SHADER */\n/* reuse GL_MAX_COMPUTE_UNIFORM_BLOCKS */\n/* reuse GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS */\n/* reuse GL_MAX_COMPUTE_IMAGE_UNIFORMS */\n/* reuse GL_MAX_COMPUTE_SHARED_MEMORY_SIZE */\n/* reuse GL_MAX_COMPUTE_UNIFORM_COMPONENTS */\n/* reuse GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS */\n/* reuse GL_MAX_COMPUTE_ATOMIC_COUNTERS */\n/* reuse GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS */\n/* reuse GL_MAX_COMPUTE_LOCAL_INVOCATIONS */\n/* reuse GL_MAX_COMPUTE_WORK_GROUP_COUNT */\n/* reuse GL_MAX_COMPUTE_WORK_GROUP_SIZE */\n/* reuse GL_COMPUTE_LOCAL_WORK_SIZE */\n/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER */\n/* reuse GL_DISPATCH_INDIRECT_BUFFER */\n/* reuse GL_DISPATCH_INDIRECT_BUFFER_BINDING */\n/* Reuse tokens from ARB_copy_image (none) */\n/* Reuse tokens from KHR_debug */\n/* reuse GL_DEBUG_OUTPUT_SYNCHRONOUS */\n/* reuse GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH */\n/* reuse GL_DEBUG_CALLBACK_FUNCTION */\n/* reuse GL_DEBUG_CALLBACK_USER_PARAM */\n/* reuse GL_DEBUG_SOURCE_API */\n/* reuse GL_DEBUG_SOURCE_WINDOW_SYSTEM */\n/* reuse GL_DEBUG_SOURCE_SHADER_COMPILER */\n/* reuse GL_DEBUG_SOURCE_THIRD_PARTY */\n/* reuse GL_DEBUG_SOURCE_APPLICATION */\n/* reuse GL_DEBUG_SOURCE_OTHER */\n/* reuse GL_DEBUG_TYPE_ERROR */\n/* reuse GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR */\n/* reuse GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR */\n/* reuse GL_DEBUG_TYPE_PORTABILITY */\n/* reuse GL_DEBUG_TYPE_PERFORMANCE */\n/* reuse GL_DEBUG_TYPE_OTHER */\n/* reuse GL_MAX_DEBUG_MESSAGE_LENGTH */\n/* reuse GL_MAX_DEBUG_LOGGED_MESSAGES */\n/* reuse GL_DEBUG_LOGGED_MESSAGES */\n/* reuse GL_DEBUG_SEVERITY_HIGH */\n/* reuse GL_DEBUG_SEVERITY_MEDIUM */\n/* reuse GL_DEBUG_SEVERITY_LOW */\n/* reuse GL_DEBUG_TYPE_MARKER */\n/* reuse GL_DEBUG_TYPE_PUSH_GROUP */\n/* reuse GL_DEBUG_TYPE_POP_GROUP */\n/* reuse GL_DEBUG_SEVERITY_NOTIFICATION */\n/* reuse GL_MAX_DEBUG_GROUP_STACK_DEPTH */\n/* reuse GL_DEBUG_GROUP_STACK_DEPTH */\n/* reuse GL_BUFFER */\n/* reuse GL_SHADER */\n/* reuse GL_PROGRAM */\n/* reuse GL_QUERY */\n/* reuse GL_PROGRAM_PIPELINE */\n/* reuse GL_SAMPLER */\n/* reuse GL_DISPLAY_LIST */\n/* reuse GL_MAX_LABEL_LENGTH */\n/* reuse GL_DEBUG_OUTPUT */\n/* reuse GL_CONTEXT_FLAG_DEBUG_BIT */\n/* reuse GL_STACK_UNDERFLOW */\n/* reuse GL_STACK_OVERFLOW */\n/* Reuse tokens from ARB_explicit_uniform_location */\n/* reuse GL_MAX_UNIFORM_LOCATIONS */\n/* Reuse tokens from ARB_framebuffer_no_attachments */\n/* reuse GL_FRAMEBUFFER_DEFAULT_WIDTH */\n/* reuse GL_FRAMEBUFFER_DEFAULT_HEIGHT */\n/* reuse GL_FRAMEBUFFER_DEFAULT_LAYERS */\n/* reuse GL_FRAMEBUFFER_DEFAULT_SAMPLES */\n/* reuse GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS */\n/* reuse GL_MAX_FRAMEBUFFER_WIDTH */\n/* reuse GL_MAX_FRAMEBUFFER_HEIGHT */\n/* reuse GL_MAX_FRAMEBUFFER_LAYERS */\n/* reuse GL_MAX_FRAMEBUFFER_SAMPLES */\n/* Reuse tokens from ARB_internalformat_query2 */\n/* reuse GL_INTERNALFORMAT_SUPPORTED */\n/* reuse GL_INTERNALFORMAT_PREFERRED */\n/* reuse GL_INTERNALFORMAT_RED_SIZE */\n/* reuse GL_INTERNALFORMAT_GREEN_SIZE */\n/* reuse GL_INTERNALFORMAT_BLUE_SIZE */\n/* reuse GL_INTERNALFORMAT_ALPHA_SIZE */\n/* reuse GL_INTERNALFORMAT_DEPTH_SIZE */\n/* reuse GL_INTERNALFORMAT_STENCIL_SIZE */\n/* reuse GL_INTERNALFORMAT_SHARED_SIZE */\n/* reuse GL_INTERNALFORMAT_RED_TYPE */\n/* reuse GL_INTERNALFORMAT_GREEN_TYPE */\n/* reuse GL_INTERNALFORMAT_BLUE_TYPE */\n/* reuse GL_INTERNALFORMAT_ALPHA_TYPE */\n/* reuse GL_INTERNALFORMAT_DEPTH_TYPE */\n/* reuse GL_INTERNALFORMAT_STENCIL_TYPE */\n/* reuse GL_MAX_WIDTH */\n/* reuse GL_MAX_HEIGHT */\n/* reuse GL_MAX_DEPTH */\n/* reuse GL_MAX_LAYERS */\n/* reuse GL_MAX_COMBINED_DIMENSIONS */\n/* reuse GL_COLOR_COMPONENTS */\n/* reuse GL_DEPTH_COMPONENTS */\n/* reuse GL_STENCIL_COMPONENTS */\n/* reuse GL_COLOR_RENDERABLE */\n/* reuse GL_DEPTH_RENDERABLE */\n/* reuse GL_STENCIL_RENDERABLE */\n/* reuse GL_FRAMEBUFFER_RENDERABLE */\n/* reuse GL_FRAMEBUFFER_RENDERABLE_LAYERED */\n/* reuse GL_FRAMEBUFFER_BLEND */\n/* reuse GL_READ_PIXELS */\n/* reuse GL_READ_PIXELS_FORMAT */\n/* reuse GL_READ_PIXELS_TYPE */\n/* reuse GL_TEXTURE_IMAGE_FORMAT */\n/* reuse GL_TEXTURE_IMAGE_TYPE */\n/* reuse GL_GET_TEXTURE_IMAGE_FORMAT */\n/* reuse GL_GET_TEXTURE_IMAGE_TYPE */\n/* reuse GL_MIPMAP */\n/* reuse GL_MANUAL_GENERATE_MIPMAP */\n/* reuse GL_AUTO_GENERATE_MIPMAP */\n/* reuse GL_COLOR_ENCODING */\n/* reuse GL_SRGB_READ */\n/* reuse GL_SRGB_WRITE */\n/* reuse GL_FILTER */\n/* reuse GL_VERTEX_TEXTURE */\n/* reuse GL_TESS_CONTROL_TEXTURE */\n/* reuse GL_TESS_EVALUATION_TEXTURE */\n/* reuse GL_GEOMETRY_TEXTURE */\n/* reuse GL_FRAGMENT_TEXTURE */\n/* reuse GL_COMPUTE_TEXTURE */\n/* reuse GL_TEXTURE_SHADOW */\n/* reuse GL_TEXTURE_GATHER */\n/* reuse GL_TEXTURE_GATHER_SHADOW */\n/* reuse GL_SHADER_IMAGE_LOAD */\n/* reuse GL_SHADER_IMAGE_STORE */\n/* reuse GL_SHADER_IMAGE_ATOMIC */\n/* reuse GL_IMAGE_TEXEL_SIZE */\n/* reuse GL_IMAGE_COMPATIBILITY_CLASS */\n/* reuse GL_IMAGE_PIXEL_FORMAT */\n/* reuse GL_IMAGE_PIXEL_TYPE */\n/* reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST */\n/* reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST */\n/* reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE */\n/* reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE */\n/* reuse GL_TEXTURE_COMPRESSED_BLOCK_WIDTH */\n/* reuse GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT */\n/* reuse GL_TEXTURE_COMPRESSED_BLOCK_SIZE */\n/* reuse GL_CLEAR_BUFFER */\n/* reuse GL_TEXTURE_VIEW */\n/* reuse GL_VIEW_COMPATIBILITY_CLASS */\n/* reuse GL_FULL_SUPPORT */\n/* reuse GL_CAVEAT_SUPPORT */\n/* reuse GL_IMAGE_CLASS_4_X_32 */\n/* reuse GL_IMAGE_CLASS_2_X_32 */\n/* reuse GL_IMAGE_CLASS_1_X_32 */\n/* reuse GL_IMAGE_CLASS_4_X_16 */\n/* reuse GL_IMAGE_CLASS_2_X_16 */\n/* reuse GL_IMAGE_CLASS_1_X_16 */\n/* reuse GL_IMAGE_CLASS_4_X_8 */\n/* reuse GL_IMAGE_CLASS_2_X_8 */\n/* reuse GL_IMAGE_CLASS_1_X_8 */\n/* reuse GL_IMAGE_CLASS_11_11_10 */\n/* reuse GL_IMAGE_CLASS_10_10_10_2 */\n/* reuse GL_VIEW_CLASS_128_BITS */\n/* reuse GL_VIEW_CLASS_96_BITS */\n/* reuse GL_VIEW_CLASS_64_BITS */\n/* reuse GL_VIEW_CLASS_48_BITS */\n/* reuse GL_VIEW_CLASS_32_BITS */\n/* reuse GL_VIEW_CLASS_24_BITS */\n/* reuse GL_VIEW_CLASS_16_BITS */\n/* reuse GL_VIEW_CLASS_8_BITS */\n/* reuse GL_VIEW_CLASS_S3TC_DXT1_RGB */\n/* reuse GL_VIEW_CLASS_S3TC_DXT1_RGBA */\n/* reuse GL_VIEW_CLASS_S3TC_DXT3_RGBA */\n/* reuse GL_VIEW_CLASS_S3TC_DXT5_RGBA */\n/* reuse GL_VIEW_CLASS_RGTC1_RED */\n/* reuse GL_VIEW_CLASS_RGTC2_RG */\n/* reuse GL_VIEW_CLASS_BPTC_UNORM */\n/* reuse GL_VIEW_CLASS_BPTC_FLOAT */\n/* Reuse tokens from ARB_invalidate_subdata (none) */\n/* Reuse tokens from ARB_multi_draw_indirect (none) */\n/* Reuse tokens from ARB_program_interface_query */\n/* reuse GL_UNIFORM */\n/* reuse GL_UNIFORM_BLOCK */\n/* reuse GL_PROGRAM_INPUT */\n/* reuse GL_PROGRAM_OUTPUT */\n/* reuse GL_BUFFER_VARIABLE */\n/* reuse GL_SHADER_STORAGE_BLOCK */\n/* reuse GL_VERTEX_SUBROUTINE */\n/* reuse GL_TESS_CONTROL_SUBROUTINE */\n/* reuse GL_TESS_EVALUATION_SUBROUTINE */\n/* reuse GL_GEOMETRY_SUBROUTINE */\n/* reuse GL_FRAGMENT_SUBROUTINE */\n/* reuse GL_COMPUTE_SUBROUTINE */\n/* reuse GL_VERTEX_SUBROUTINE_UNIFORM */\n/* reuse GL_TESS_CONTROL_SUBROUTINE_UNIFORM */\n/* reuse GL_TESS_EVALUATION_SUBROUTINE_UNIFORM */\n/* reuse GL_GEOMETRY_SUBROUTINE_UNIFORM */\n/* reuse GL_FRAGMENT_SUBROUTINE_UNIFORM */\n/* reuse GL_COMPUTE_SUBROUTINE_UNIFORM */\n/* reuse GL_TRANSFORM_FEEDBACK_VARYING */\n/* reuse GL_ACTIVE_RESOURCES */\n/* reuse GL_MAX_NAME_LENGTH */\n/* reuse GL_MAX_NUM_ACTIVE_VARIABLES */\n/* reuse GL_MAX_NUM_COMPATIBLE_SUBROUTINES */\n/* reuse GL_NAME_LENGTH */\n/* reuse GL_TYPE */\n/* reuse GL_ARRAY_SIZE */\n/* reuse GL_OFFSET */\n/* reuse GL_BLOCK_INDEX */\n/* reuse GL_ARRAY_STRIDE */\n/* reuse GL_MATRIX_STRIDE */\n/* reuse GL_IS_ROW_MAJOR */\n/* reuse GL_ATOMIC_COUNTER_BUFFER_INDEX */\n/* reuse GL_BUFFER_BINDING */\n/* reuse GL_BUFFER_DATA_SIZE */\n/* reuse GL_NUM_ACTIVE_VARIABLES */\n/* reuse GL_ACTIVE_VARIABLES */\n/* reuse GL_REFERENCED_BY_VERTEX_SHADER */\n/* reuse GL_REFERENCED_BY_TESS_CONTROL_SHADER */\n/* reuse GL_REFERENCED_BY_TESS_EVALUATION_SHADER */\n/* reuse GL_REFERENCED_BY_GEOMETRY_SHADER */\n/* reuse GL_REFERENCED_BY_FRAGMENT_SHADER */\n/* reuse GL_REFERENCED_BY_COMPUTE_SHADER */\n/* reuse GL_TOP_LEVEL_ARRAY_SIZE */\n/* reuse GL_TOP_LEVEL_ARRAY_STRIDE */\n/* reuse GL_LOCATION */\n/* reuse GL_LOCATION_INDEX */\n/* reuse GL_IS_PER_PATCH */\n/* Reuse tokens from ARB_robust_buffer_access_behavior (none) */\n/* Reuse tokens from ARB_shader_storage_buffer_object */\n/* reuse GL_SHADER_STORAGE_BUFFER */\n/* reuse GL_SHADER_STORAGE_BUFFER_BINDING */\n/* reuse GL_SHADER_STORAGE_BUFFER_START */\n/* reuse GL_SHADER_STORAGE_BUFFER_SIZE */\n/* reuse GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS */\n/* reuse GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS */\n/* reuse GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS */\n/* reuse GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS */\n/* reuse GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS */\n/* reuse GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS */\n/* reuse GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS */\n/* reuse GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS */\n/* reuse GL_MAX_SHADER_STORAGE_BLOCK_SIZE */\n/* reuse GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT */\n/* reuse GL_SHADER_STORAGE_BARRIER_BIT */\n/* reuse GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES */\n/* Reuse tokens from ARB_stencil_texturing */\n/* reuse GL_DEPTH_STENCIL_TEXTURE_MODE */\n/* Reuse tokens from ARB_texture_buffer_range */\n/* reuse GL_TEXTURE_BUFFER_OFFSET */\n/* reuse GL_TEXTURE_BUFFER_SIZE */\n/* reuse GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT */\n/* Reuse tokens from ARB_texture_query_levels (none) */\n/* Reuse tokens from ARB_texture_storage_multisample (none) */\n/* Reuse tokens from ARB_texture_view */\n/* reuse GL_TEXTURE_VIEW_MIN_LEVEL */\n/* reuse GL_TEXTURE_VIEW_NUM_LEVELS */\n/* reuse GL_TEXTURE_VIEW_MIN_LAYER */\n/* reuse GL_TEXTURE_VIEW_NUM_LAYERS */\n/* reuse GL_TEXTURE_IMMUTABLE_LEVELS */\n/* Reuse tokens from ARB_vertex_attrib_binding */\n/* reuse GL_VERTEX_ATTRIB_BINDING */\n/* reuse GL_VERTEX_ATTRIB_RELATIVE_OFFSET */\n/* reuse GL_VERTEX_BINDING_DIVISOR */\n/* reuse GL_VERTEX_BINDING_OFFSET */\n/* reuse GL_VERTEX_BINDING_STRIDE */\n/* reuse GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET */\n/* reuse GL_MAX_VERTEX_ATTRIB_BINDINGS */\n#endif\n\n#ifndef GL_ARB_multitexture\n#define GL_TEXTURE0_ARB                   0x84C0\n#define GL_TEXTURE1_ARB                   0x84C1\n#define GL_TEXTURE2_ARB                   0x84C2\n#define GL_TEXTURE3_ARB                   0x84C3\n#define GL_TEXTURE4_ARB                   0x84C4\n#define GL_TEXTURE5_ARB                   0x84C5\n#define GL_TEXTURE6_ARB                   0x84C6\n#define GL_TEXTURE7_ARB                   0x84C7\n#define GL_TEXTURE8_ARB                   0x84C8\n#define GL_TEXTURE9_ARB                   0x84C9\n#define GL_TEXTURE10_ARB                  0x84CA\n#define GL_TEXTURE11_ARB                  0x84CB\n#define GL_TEXTURE12_ARB                  0x84CC\n#define GL_TEXTURE13_ARB                  0x84CD\n#define GL_TEXTURE14_ARB                  0x84CE\n#define GL_TEXTURE15_ARB                  0x84CF\n#define GL_TEXTURE16_ARB                  0x84D0\n#define GL_TEXTURE17_ARB                  0x84D1\n#define GL_TEXTURE18_ARB                  0x84D2\n#define GL_TEXTURE19_ARB                  0x84D3\n#define GL_TEXTURE20_ARB                  0x84D4\n#define GL_TEXTURE21_ARB                  0x84D5\n#define GL_TEXTURE22_ARB                  0x84D6\n#define GL_TEXTURE23_ARB                  0x84D7\n#define GL_TEXTURE24_ARB                  0x84D8\n#define GL_TEXTURE25_ARB                  0x84D9\n#define GL_TEXTURE26_ARB                  0x84DA\n#define GL_TEXTURE27_ARB                  0x84DB\n#define GL_TEXTURE28_ARB                  0x84DC\n#define GL_TEXTURE29_ARB                  0x84DD\n#define GL_TEXTURE30_ARB                  0x84DE\n#define GL_TEXTURE31_ARB                  0x84DF\n#define GL_ACTIVE_TEXTURE_ARB             0x84E0\n#define GL_CLIENT_ACTIVE_TEXTURE_ARB      0x84E1\n#define GL_MAX_TEXTURE_UNITS_ARB          0x84E2\n#endif\n\n#ifndef GL_ARB_transpose_matrix\n#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3\n#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4\n#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB   0x84E5\n#define GL_TRANSPOSE_COLOR_MATRIX_ARB     0x84E6\n#endif\n\n#ifndef GL_ARB_multisample\n#define GL_MULTISAMPLE_ARB                0x809D\n#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB   0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE_ARB        0x809F\n#define GL_SAMPLE_COVERAGE_ARB            0x80A0\n#define GL_SAMPLE_BUFFERS_ARB             0x80A8\n#define GL_SAMPLES_ARB                    0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE_ARB      0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT_ARB     0x80AB\n#define GL_MULTISAMPLE_BIT_ARB            0x20000000\n#endif\n\n#ifndef GL_ARB_texture_env_add\n#endif\n\n#ifndef GL_ARB_texture_cube_map\n#define GL_NORMAL_MAP_ARB                 0x8511\n#define GL_REFLECTION_MAP_ARB             0x8512\n#define GL_TEXTURE_CUBE_MAP_ARB           0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP_ARB   0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP_ARB     0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB  0x851C\n#endif\n\n#ifndef GL_ARB_texture_compression\n#define GL_COMPRESSED_ALPHA_ARB           0x84E9\n#define GL_COMPRESSED_LUMINANCE_ARB       0x84EA\n#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB\n#define GL_COMPRESSED_INTENSITY_ARB       0x84EC\n#define GL_COMPRESSED_RGB_ARB             0x84ED\n#define GL_COMPRESSED_RGBA_ARB            0x84EE\n#define GL_TEXTURE_COMPRESSION_HINT_ARB   0x84EF\n#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0\n#define GL_TEXTURE_COMPRESSED_ARB         0x86A1\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3\n#endif\n\n#ifndef GL_ARB_texture_border_clamp\n#define GL_CLAMP_TO_BORDER_ARB            0x812D\n#endif\n\n#ifndef GL_ARB_point_parameters\n#define GL_POINT_SIZE_MIN_ARB             0x8126\n#define GL_POINT_SIZE_MAX_ARB             0x8127\n#define GL_POINT_FADE_THRESHOLD_SIZE_ARB  0x8128\n#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129\n#endif\n\n#ifndef GL_ARB_vertex_blend\n#define GL_MAX_VERTEX_UNITS_ARB           0x86A4\n#define GL_ACTIVE_VERTEX_UNITS_ARB        0x86A5\n#define GL_WEIGHT_SUM_UNITY_ARB           0x86A6\n#define GL_VERTEX_BLEND_ARB               0x86A7\n#define GL_CURRENT_WEIGHT_ARB             0x86A8\n#define GL_WEIGHT_ARRAY_TYPE_ARB          0x86A9\n#define GL_WEIGHT_ARRAY_STRIDE_ARB        0x86AA\n#define GL_WEIGHT_ARRAY_SIZE_ARB          0x86AB\n#define GL_WEIGHT_ARRAY_POINTER_ARB       0x86AC\n#define GL_WEIGHT_ARRAY_ARB               0x86AD\n#define GL_MODELVIEW0_ARB                 0x1700\n#define GL_MODELVIEW1_ARB                 0x850A\n#define GL_MODELVIEW2_ARB                 0x8722\n#define GL_MODELVIEW3_ARB                 0x8723\n#define GL_MODELVIEW4_ARB                 0x8724\n#define GL_MODELVIEW5_ARB                 0x8725\n#define GL_MODELVIEW6_ARB                 0x8726\n#define GL_MODELVIEW7_ARB                 0x8727\n#define GL_MODELVIEW8_ARB                 0x8728\n#define GL_MODELVIEW9_ARB                 0x8729\n#define GL_MODELVIEW10_ARB                0x872A\n#define GL_MODELVIEW11_ARB                0x872B\n#define GL_MODELVIEW12_ARB                0x872C\n#define GL_MODELVIEW13_ARB                0x872D\n#define GL_MODELVIEW14_ARB                0x872E\n#define GL_MODELVIEW15_ARB                0x872F\n#define GL_MODELVIEW16_ARB                0x8730\n#define GL_MODELVIEW17_ARB                0x8731\n#define GL_MODELVIEW18_ARB                0x8732\n#define GL_MODELVIEW19_ARB                0x8733\n#define GL_MODELVIEW20_ARB                0x8734\n#define GL_MODELVIEW21_ARB                0x8735\n#define GL_MODELVIEW22_ARB                0x8736\n#define GL_MODELVIEW23_ARB                0x8737\n#define GL_MODELVIEW24_ARB                0x8738\n#define GL_MODELVIEW25_ARB                0x8739\n#define GL_MODELVIEW26_ARB                0x873A\n#define GL_MODELVIEW27_ARB                0x873B\n#define GL_MODELVIEW28_ARB                0x873C\n#define GL_MODELVIEW29_ARB                0x873D\n#define GL_MODELVIEW30_ARB                0x873E\n#define GL_MODELVIEW31_ARB                0x873F\n#endif\n\n#ifndef GL_ARB_matrix_palette\n#define GL_MATRIX_PALETTE_ARB             0x8840\n#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841\n#define GL_MAX_PALETTE_MATRICES_ARB       0x8842\n#define GL_CURRENT_PALETTE_MATRIX_ARB     0x8843\n#define GL_MATRIX_INDEX_ARRAY_ARB         0x8844\n#define GL_CURRENT_MATRIX_INDEX_ARB       0x8845\n#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB    0x8846\n#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB    0x8847\n#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB  0x8848\n#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849\n#endif\n\n#ifndef GL_ARB_texture_env_combine\n#define GL_COMBINE_ARB                    0x8570\n#define GL_COMBINE_RGB_ARB                0x8571\n#define GL_COMBINE_ALPHA_ARB              0x8572\n#define GL_SOURCE0_RGB_ARB                0x8580\n#define GL_SOURCE1_RGB_ARB                0x8581\n#define GL_SOURCE2_RGB_ARB                0x8582\n#define GL_SOURCE0_ALPHA_ARB              0x8588\n#define GL_SOURCE1_ALPHA_ARB              0x8589\n#define GL_SOURCE2_ALPHA_ARB              0x858A\n#define GL_OPERAND0_RGB_ARB               0x8590\n#define GL_OPERAND1_RGB_ARB               0x8591\n#define GL_OPERAND2_RGB_ARB               0x8592\n#define GL_OPERAND0_ALPHA_ARB             0x8598\n#define GL_OPERAND1_ALPHA_ARB             0x8599\n#define GL_OPERAND2_ALPHA_ARB             0x859A\n#define GL_RGB_SCALE_ARB                  0x8573\n#define GL_ADD_SIGNED_ARB                 0x8574\n#define GL_INTERPOLATE_ARB                0x8575\n#define GL_SUBTRACT_ARB                   0x84E7\n#define GL_CONSTANT_ARB                   0x8576\n#define GL_PRIMARY_COLOR_ARB              0x8577\n#define GL_PREVIOUS_ARB                   0x8578\n#endif\n\n#ifndef GL_ARB_texture_env_crossbar\n#endif\n\n#ifndef GL_ARB_texture_env_dot3\n#define GL_DOT3_RGB_ARB                   0x86AE\n#define GL_DOT3_RGBA_ARB                  0x86AF\n#endif\n\n#ifndef GL_ARB_texture_mirrored_repeat\n#define GL_MIRRORED_REPEAT_ARB            0x8370\n#endif\n\n#ifndef GL_ARB_depth_texture\n#define GL_DEPTH_COMPONENT16_ARB          0x81A5\n#define GL_DEPTH_COMPONENT24_ARB          0x81A6\n#define GL_DEPTH_COMPONENT32_ARB          0x81A7\n#define GL_TEXTURE_DEPTH_SIZE_ARB         0x884A\n#define GL_DEPTH_TEXTURE_MODE_ARB         0x884B\n#endif\n\n#ifndef GL_ARB_shadow\n#define GL_TEXTURE_COMPARE_MODE_ARB       0x884C\n#define GL_TEXTURE_COMPARE_FUNC_ARB       0x884D\n#define GL_COMPARE_R_TO_TEXTURE_ARB       0x884E\n#endif\n\n#ifndef GL_ARB_shadow_ambient\n#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF\n#endif\n\n#ifndef GL_ARB_window_pos\n#endif\n\n#ifndef GL_ARB_vertex_program\n#define GL_COLOR_SUM_ARB                  0x8458\n#define GL_VERTEX_PROGRAM_ARB             0x8620\n#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622\n#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB   0x8623\n#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624\n#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB   0x8625\n#define GL_CURRENT_VERTEX_ATTRIB_ARB      0x8626\n#define GL_PROGRAM_LENGTH_ARB             0x8627\n#define GL_PROGRAM_STRING_ARB             0x8628\n#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E\n#define GL_MAX_PROGRAM_MATRICES_ARB       0x862F\n#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640\n#define GL_CURRENT_MATRIX_ARB             0x8641\n#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB  0x8642\n#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB    0x8643\n#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645\n#define GL_PROGRAM_ERROR_POSITION_ARB     0x864B\n#define GL_PROGRAM_BINDING_ARB            0x8677\n#define GL_MAX_VERTEX_ATTRIBS_ARB         0x8869\n#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A\n#define GL_PROGRAM_ERROR_STRING_ARB       0x8874\n#define GL_PROGRAM_FORMAT_ASCII_ARB       0x8875\n#define GL_PROGRAM_FORMAT_ARB             0x8876\n#define GL_PROGRAM_INSTRUCTIONS_ARB       0x88A0\n#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB   0x88A1\n#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2\n#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3\n#define GL_PROGRAM_TEMPORARIES_ARB        0x88A4\n#define GL_MAX_PROGRAM_TEMPORARIES_ARB    0x88A5\n#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6\n#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7\n#define GL_PROGRAM_PARAMETERS_ARB         0x88A8\n#define GL_MAX_PROGRAM_PARAMETERS_ARB     0x88A9\n#define GL_PROGRAM_NATIVE_PARAMETERS_ARB  0x88AA\n#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB\n#define GL_PROGRAM_ATTRIBS_ARB            0x88AC\n#define GL_MAX_PROGRAM_ATTRIBS_ARB        0x88AD\n#define GL_PROGRAM_NATIVE_ATTRIBS_ARB     0x88AE\n#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF\n#define GL_PROGRAM_ADDRESS_REGISTERS_ARB  0x88B0\n#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1\n#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2\n#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3\n#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4\n#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5\n#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6\n#define GL_TRANSPOSE_CURRENT_MATRIX_ARB   0x88B7\n#define GL_MATRIX0_ARB                    0x88C0\n#define GL_MATRIX1_ARB                    0x88C1\n#define GL_MATRIX2_ARB                    0x88C2\n#define GL_MATRIX3_ARB                    0x88C3\n#define GL_MATRIX4_ARB                    0x88C4\n#define GL_MATRIX5_ARB                    0x88C5\n#define GL_MATRIX6_ARB                    0x88C6\n#define GL_MATRIX7_ARB                    0x88C7\n#define GL_MATRIX8_ARB                    0x88C8\n#define GL_MATRIX9_ARB                    0x88C9\n#define GL_MATRIX10_ARB                   0x88CA\n#define GL_MATRIX11_ARB                   0x88CB\n#define GL_MATRIX12_ARB                   0x88CC\n#define GL_MATRIX13_ARB                   0x88CD\n#define GL_MATRIX14_ARB                   0x88CE\n#define GL_MATRIX15_ARB                   0x88CF\n#define GL_MATRIX16_ARB                   0x88D0\n#define GL_MATRIX17_ARB                   0x88D1\n#define GL_MATRIX18_ARB                   0x88D2\n#define GL_MATRIX19_ARB                   0x88D3\n#define GL_MATRIX20_ARB                   0x88D4\n#define GL_MATRIX21_ARB                   0x88D5\n#define GL_MATRIX22_ARB                   0x88D6\n#define GL_MATRIX23_ARB                   0x88D7\n#define GL_MATRIX24_ARB                   0x88D8\n#define GL_MATRIX25_ARB                   0x88D9\n#define GL_MATRIX26_ARB                   0x88DA\n#define GL_MATRIX27_ARB                   0x88DB\n#define GL_MATRIX28_ARB                   0x88DC\n#define GL_MATRIX29_ARB                   0x88DD\n#define GL_MATRIX30_ARB                   0x88DE\n#define GL_MATRIX31_ARB                   0x88DF\n#endif\n\n#ifndef GL_ARB_fragment_program\n#define GL_FRAGMENT_PROGRAM_ARB           0x8804\n#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB   0x8805\n#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB   0x8806\n#define GL_PROGRAM_TEX_INDIRECTIONS_ARB   0x8807\n#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808\n#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809\n#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A\n#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B\n#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C\n#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D\n#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E\n#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F\n#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810\n#define GL_MAX_TEXTURE_COORDS_ARB         0x8871\n#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB    0x8872\n#endif\n\n#ifndef GL_ARB_vertex_buffer_object\n#define GL_BUFFER_SIZE_ARB                0x8764\n#define GL_BUFFER_USAGE_ARB               0x8765\n#define GL_ARRAY_BUFFER_ARB               0x8892\n#define GL_ELEMENT_ARRAY_BUFFER_ARB       0x8893\n#define GL_ARRAY_BUFFER_BINDING_ARB       0x8894\n#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895\n#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896\n#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897\n#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898\n#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899\n#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A\n#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B\n#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C\n#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D\n#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E\n#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F\n#define GL_READ_ONLY_ARB                  0x88B8\n#define GL_WRITE_ONLY_ARB                 0x88B9\n#define GL_READ_WRITE_ARB                 0x88BA\n#define GL_BUFFER_ACCESS_ARB              0x88BB\n#define GL_BUFFER_MAPPED_ARB              0x88BC\n#define GL_BUFFER_MAP_POINTER_ARB         0x88BD\n#define GL_STREAM_DRAW_ARB                0x88E0\n#define GL_STREAM_READ_ARB                0x88E1\n#define GL_STREAM_COPY_ARB                0x88E2\n#define GL_STATIC_DRAW_ARB                0x88E4\n#define GL_STATIC_READ_ARB                0x88E5\n#define GL_STATIC_COPY_ARB                0x88E6\n#define GL_DYNAMIC_DRAW_ARB               0x88E8\n#define GL_DYNAMIC_READ_ARB               0x88E9\n#define GL_DYNAMIC_COPY_ARB               0x88EA\n#endif\n\n#ifndef GL_ARB_occlusion_query\n#define GL_QUERY_COUNTER_BITS_ARB         0x8864\n#define GL_CURRENT_QUERY_ARB              0x8865\n#define GL_QUERY_RESULT_ARB               0x8866\n#define GL_QUERY_RESULT_AVAILABLE_ARB     0x8867\n#define GL_SAMPLES_PASSED_ARB             0x8914\n#endif\n\n#ifndef GL_ARB_shader_objects\n#define GL_PROGRAM_OBJECT_ARB             0x8B40\n#define GL_SHADER_OBJECT_ARB              0x8B48\n#define GL_OBJECT_TYPE_ARB                0x8B4E\n#define GL_OBJECT_SUBTYPE_ARB             0x8B4F\n#define GL_FLOAT_VEC2_ARB                 0x8B50\n#define GL_FLOAT_VEC3_ARB                 0x8B51\n#define GL_FLOAT_VEC4_ARB                 0x8B52\n#define GL_INT_VEC2_ARB                   0x8B53\n#define GL_INT_VEC3_ARB                   0x8B54\n#define GL_INT_VEC4_ARB                   0x8B55\n#define GL_BOOL_ARB                       0x8B56\n#define GL_BOOL_VEC2_ARB                  0x8B57\n#define GL_BOOL_VEC3_ARB                  0x8B58\n#define GL_BOOL_VEC4_ARB                  0x8B59\n#define GL_FLOAT_MAT2_ARB                 0x8B5A\n#define GL_FLOAT_MAT3_ARB                 0x8B5B\n#define GL_FLOAT_MAT4_ARB                 0x8B5C\n#define GL_SAMPLER_1D_ARB                 0x8B5D\n#define GL_SAMPLER_2D_ARB                 0x8B5E\n#define GL_SAMPLER_3D_ARB                 0x8B5F\n#define GL_SAMPLER_CUBE_ARB               0x8B60\n#define GL_SAMPLER_1D_SHADOW_ARB          0x8B61\n#define GL_SAMPLER_2D_SHADOW_ARB          0x8B62\n#define GL_SAMPLER_2D_RECT_ARB            0x8B63\n#define GL_SAMPLER_2D_RECT_SHADOW_ARB     0x8B64\n#define GL_OBJECT_DELETE_STATUS_ARB       0x8B80\n#define GL_OBJECT_COMPILE_STATUS_ARB      0x8B81\n#define GL_OBJECT_LINK_STATUS_ARB         0x8B82\n#define GL_OBJECT_VALIDATE_STATUS_ARB     0x8B83\n#define GL_OBJECT_INFO_LOG_LENGTH_ARB     0x8B84\n#define GL_OBJECT_ATTACHED_OBJECTS_ARB    0x8B85\n#define GL_OBJECT_ACTIVE_UNIFORMS_ARB     0x8B86\n#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87\n#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88\n#endif\n\n#ifndef GL_ARB_vertex_shader\n#define GL_VERTEX_SHADER_ARB              0x8B31\n#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A\n#define GL_MAX_VARYING_FLOATS_ARB         0x8B4B\n#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C\n#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D\n#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB   0x8B89\n#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A\n#endif\n\n#ifndef GL_ARB_fragment_shader\n#define GL_FRAGMENT_SHADER_ARB            0x8B30\n#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49\n#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B\n#endif\n\n#ifndef GL_ARB_shading_language_100\n#define GL_SHADING_LANGUAGE_VERSION_ARB   0x8B8C\n#endif\n\n#ifndef GL_ARB_texture_non_power_of_two\n#endif\n\n#ifndef GL_ARB_point_sprite\n#define GL_POINT_SPRITE_ARB               0x8861\n#define GL_COORD_REPLACE_ARB              0x8862\n#endif\n\n#ifndef GL_ARB_fragment_program_shadow\n#endif\n\n#ifndef GL_ARB_draw_buffers\n#define GL_MAX_DRAW_BUFFERS_ARB           0x8824\n#define GL_DRAW_BUFFER0_ARB               0x8825\n#define GL_DRAW_BUFFER1_ARB               0x8826\n#define GL_DRAW_BUFFER2_ARB               0x8827\n#define GL_DRAW_BUFFER3_ARB               0x8828\n#define GL_DRAW_BUFFER4_ARB               0x8829\n#define GL_DRAW_BUFFER5_ARB               0x882A\n#define GL_DRAW_BUFFER6_ARB               0x882B\n#define GL_DRAW_BUFFER7_ARB               0x882C\n#define GL_DRAW_BUFFER8_ARB               0x882D\n#define GL_DRAW_BUFFER9_ARB               0x882E\n#define GL_DRAW_BUFFER10_ARB              0x882F\n#define GL_DRAW_BUFFER11_ARB              0x8830\n#define GL_DRAW_BUFFER12_ARB              0x8831\n#define GL_DRAW_BUFFER13_ARB              0x8832\n#define GL_DRAW_BUFFER14_ARB              0x8833\n#define GL_DRAW_BUFFER15_ARB              0x8834\n#endif\n\n#ifndef GL_ARB_texture_rectangle\n#define GL_TEXTURE_RECTANGLE_ARB          0x84F5\n#define GL_TEXTURE_BINDING_RECTANGLE_ARB  0x84F6\n#define GL_PROXY_TEXTURE_RECTANGLE_ARB    0x84F7\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8\n#endif\n\n#ifndef GL_ARB_color_buffer_float\n#define GL_RGBA_FLOAT_MODE_ARB            0x8820\n#define GL_CLAMP_VERTEX_COLOR_ARB         0x891A\n#define GL_CLAMP_FRAGMENT_COLOR_ARB       0x891B\n#define GL_CLAMP_READ_COLOR_ARB           0x891C\n#define GL_FIXED_ONLY_ARB                 0x891D\n#endif\n\n#ifndef GL_ARB_half_float_pixel\n#define GL_HALF_FLOAT_ARB                 0x140B\n#endif\n\n#ifndef GL_ARB_texture_float\n#define GL_TEXTURE_RED_TYPE_ARB           0x8C10\n#define GL_TEXTURE_GREEN_TYPE_ARB         0x8C11\n#define GL_TEXTURE_BLUE_TYPE_ARB          0x8C12\n#define GL_TEXTURE_ALPHA_TYPE_ARB         0x8C13\n#define GL_TEXTURE_LUMINANCE_TYPE_ARB     0x8C14\n#define GL_TEXTURE_INTENSITY_TYPE_ARB     0x8C15\n#define GL_TEXTURE_DEPTH_TYPE_ARB         0x8C16\n#define GL_UNSIGNED_NORMALIZED_ARB        0x8C17\n#define GL_RGBA32F_ARB                    0x8814\n#define GL_RGB32F_ARB                     0x8815\n#define GL_ALPHA32F_ARB                   0x8816\n#define GL_INTENSITY32F_ARB               0x8817\n#define GL_LUMINANCE32F_ARB               0x8818\n#define GL_LUMINANCE_ALPHA32F_ARB         0x8819\n#define GL_RGBA16F_ARB                    0x881A\n#define GL_RGB16F_ARB                     0x881B\n#define GL_ALPHA16F_ARB                   0x881C\n#define GL_INTENSITY16F_ARB               0x881D\n#define GL_LUMINANCE16F_ARB               0x881E\n#define GL_LUMINANCE_ALPHA16F_ARB         0x881F\n#endif\n\n#ifndef GL_ARB_pixel_buffer_object\n#define GL_PIXEL_PACK_BUFFER_ARB          0x88EB\n#define GL_PIXEL_UNPACK_BUFFER_ARB        0x88EC\n#define GL_PIXEL_PACK_BUFFER_BINDING_ARB  0x88ED\n#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF\n#endif\n\n#ifndef GL_ARB_depth_buffer_float\n#define GL_DEPTH_COMPONENT32F             0x8CAC\n#define GL_DEPTH32F_STENCIL8              0x8CAD\n#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD\n#endif\n\n#ifndef GL_ARB_draw_instanced\n#endif\n\n#ifndef GL_ARB_framebuffer_object\n#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506\n#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210\n#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211\n#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212\n#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213\n#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214\n#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215\n#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216\n#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217\n#define GL_FRAMEBUFFER_DEFAULT            0x8218\n#define GL_FRAMEBUFFER_UNDEFINED          0x8219\n#define GL_DEPTH_STENCIL_ATTACHMENT       0x821A\n#define GL_MAX_RENDERBUFFER_SIZE          0x84E8\n#define GL_DEPTH_STENCIL                  0x84F9\n#define GL_UNSIGNED_INT_24_8              0x84FA\n#define GL_DEPTH24_STENCIL8               0x88F0\n#define GL_TEXTURE_STENCIL_SIZE           0x88F1\n#define GL_TEXTURE_RED_TYPE               0x8C10\n#define GL_TEXTURE_GREEN_TYPE             0x8C11\n#define GL_TEXTURE_BLUE_TYPE              0x8C12\n#define GL_TEXTURE_ALPHA_TYPE             0x8C13\n#define GL_TEXTURE_DEPTH_TYPE             0x8C16\n#define GL_UNSIGNED_NORMALIZED            0x8C17\n#define GL_FRAMEBUFFER_BINDING            0x8CA6\n#define GL_DRAW_FRAMEBUFFER_BINDING       GL_FRAMEBUFFER_BINDING\n#define GL_RENDERBUFFER_BINDING           0x8CA7\n#define GL_READ_FRAMEBUFFER               0x8CA8\n#define GL_DRAW_FRAMEBUFFER               0x8CA9\n#define GL_READ_FRAMEBUFFER_BINDING       0x8CAA\n#define GL_RENDERBUFFER_SAMPLES           0x8CAB\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4\n#define GL_FRAMEBUFFER_COMPLETE           0x8CD5\n#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6\n#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7\n#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB\n#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC\n#define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD\n#define GL_MAX_COLOR_ATTACHMENTS          0x8CDF\n#define GL_COLOR_ATTACHMENT0              0x8CE0\n#define GL_COLOR_ATTACHMENT1              0x8CE1\n#define GL_COLOR_ATTACHMENT2              0x8CE2\n#define GL_COLOR_ATTACHMENT3              0x8CE3\n#define GL_COLOR_ATTACHMENT4              0x8CE4\n#define GL_COLOR_ATTACHMENT5              0x8CE5\n#define GL_COLOR_ATTACHMENT6              0x8CE6\n#define GL_COLOR_ATTACHMENT7              0x8CE7\n#define GL_COLOR_ATTACHMENT8              0x8CE8\n#define GL_COLOR_ATTACHMENT9              0x8CE9\n#define GL_COLOR_ATTACHMENT10             0x8CEA\n#define GL_COLOR_ATTACHMENT11             0x8CEB\n#define GL_COLOR_ATTACHMENT12             0x8CEC\n#define GL_COLOR_ATTACHMENT13             0x8CED\n#define GL_COLOR_ATTACHMENT14             0x8CEE\n#define GL_COLOR_ATTACHMENT15             0x8CEF\n#define GL_DEPTH_ATTACHMENT               0x8D00\n#define GL_STENCIL_ATTACHMENT             0x8D20\n#define GL_FRAMEBUFFER                    0x8D40\n#define GL_RENDERBUFFER                   0x8D41\n#define GL_RENDERBUFFER_WIDTH             0x8D42\n#define GL_RENDERBUFFER_HEIGHT            0x8D43\n#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44\n#define GL_STENCIL_INDEX1                 0x8D46\n#define GL_STENCIL_INDEX4                 0x8D47\n#define GL_STENCIL_INDEX8                 0x8D48\n#define GL_STENCIL_INDEX16                0x8D49\n#define GL_RENDERBUFFER_RED_SIZE          0x8D50\n#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51\n#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52\n#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53\n#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54\n#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56\n#define GL_MAX_SAMPLES                    0x8D57\n#define GL_INDEX                          0x8222\n#define GL_TEXTURE_LUMINANCE_TYPE         0x8C14\n#define GL_TEXTURE_INTENSITY_TYPE         0x8C15\n#endif\n\n#ifndef GL_ARB_framebuffer_sRGB\n#define GL_FRAMEBUFFER_SRGB               0x8DB9\n#endif\n\n#ifndef GL_ARB_geometry_shader4\n#define GL_LINES_ADJACENCY_ARB            0x000A\n#define GL_LINE_STRIP_ADJACENCY_ARB       0x000B\n#define GL_TRIANGLES_ADJACENCY_ARB        0x000C\n#define GL_TRIANGLE_STRIP_ADJACENCY_ARB   0x000D\n#define GL_PROGRAM_POINT_SIZE_ARB         0x8642\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9\n#define GL_GEOMETRY_SHADER_ARB            0x8DD9\n#define GL_GEOMETRY_VERTICES_OUT_ARB      0x8DDA\n#define GL_GEOMETRY_INPUT_TYPE_ARB        0x8DDB\n#define GL_GEOMETRY_OUTPUT_TYPE_ARB       0x8DDC\n#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD\n#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1\n/* reuse GL_MAX_VARYING_COMPONENTS */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */\n#endif\n\n#ifndef GL_ARB_half_float_vertex\n#define GL_HALF_FLOAT                     0x140B\n#endif\n\n#ifndef GL_ARB_instanced_arrays\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE\n#endif\n\n#ifndef GL_ARB_map_buffer_range\n#define GL_MAP_READ_BIT                   0x0001\n#define GL_MAP_WRITE_BIT                  0x0002\n#define GL_MAP_INVALIDATE_RANGE_BIT       0x0004\n#define GL_MAP_INVALIDATE_BUFFER_BIT      0x0008\n#define GL_MAP_FLUSH_EXPLICIT_BIT         0x0010\n#define GL_MAP_UNSYNCHRONIZED_BIT         0x0020\n#endif\n\n#ifndef GL_ARB_texture_buffer_object\n#define GL_TEXTURE_BUFFER_ARB             0x8C2A\n#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB    0x8C2B\n#define GL_TEXTURE_BINDING_BUFFER_ARB     0x8C2C\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D\n#define GL_TEXTURE_BUFFER_FORMAT_ARB      0x8C2E\n#endif\n\n#ifndef GL_ARB_texture_compression_rgtc\n#define GL_COMPRESSED_RED_RGTC1           0x8DBB\n#define GL_COMPRESSED_SIGNED_RED_RGTC1    0x8DBC\n#define GL_COMPRESSED_RG_RGTC2            0x8DBD\n#define GL_COMPRESSED_SIGNED_RG_RGTC2     0x8DBE\n#endif\n\n#ifndef GL_ARB_texture_rg\n#define GL_RG                             0x8227\n#define GL_RG_INTEGER                     0x8228\n#define GL_R8                             0x8229\n#define GL_R16                            0x822A\n#define GL_RG8                            0x822B\n#define GL_RG16                           0x822C\n#define GL_R16F                           0x822D\n#define GL_R32F                           0x822E\n#define GL_RG16F                          0x822F\n#define GL_RG32F                          0x8230\n#define GL_R8I                            0x8231\n#define GL_R8UI                           0x8232\n#define GL_R16I                           0x8233\n#define GL_R16UI                          0x8234\n#define GL_R32I                           0x8235\n#define GL_R32UI                          0x8236\n#define GL_RG8I                           0x8237\n#define GL_RG8UI                          0x8238\n#define GL_RG16I                          0x8239\n#define GL_RG16UI                         0x823A\n#define GL_RG32I                          0x823B\n#define GL_RG32UI                         0x823C\n#endif\n\n#ifndef GL_ARB_vertex_array_object\n#define GL_VERTEX_ARRAY_BINDING           0x85B5\n#endif\n\n#ifndef GL_ARB_uniform_buffer_object\n#define GL_UNIFORM_BUFFER                 0x8A11\n#define GL_UNIFORM_BUFFER_BINDING         0x8A28\n#define GL_UNIFORM_BUFFER_START           0x8A29\n#define GL_UNIFORM_BUFFER_SIZE            0x8A2A\n#define GL_MAX_VERTEX_UNIFORM_BLOCKS      0x8A2B\n#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS    0x8A2C\n#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS    0x8A2D\n#define GL_MAX_COMBINED_UNIFORM_BLOCKS    0x8A2E\n#define GL_MAX_UNIFORM_BUFFER_BINDINGS    0x8A2F\n#define GL_MAX_UNIFORM_BLOCK_SIZE         0x8A30\n#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31\n#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32\n#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33\n#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34\n#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35\n#define GL_ACTIVE_UNIFORM_BLOCKS          0x8A36\n#define GL_UNIFORM_TYPE                   0x8A37\n#define GL_UNIFORM_SIZE                   0x8A38\n#define GL_UNIFORM_NAME_LENGTH            0x8A39\n#define GL_UNIFORM_BLOCK_INDEX            0x8A3A\n#define GL_UNIFORM_OFFSET                 0x8A3B\n#define GL_UNIFORM_ARRAY_STRIDE           0x8A3C\n#define GL_UNIFORM_MATRIX_STRIDE          0x8A3D\n#define GL_UNIFORM_IS_ROW_MAJOR           0x8A3E\n#define GL_UNIFORM_BLOCK_BINDING          0x8A3F\n#define GL_UNIFORM_BLOCK_DATA_SIZE        0x8A40\n#define GL_UNIFORM_BLOCK_NAME_LENGTH      0x8A41\n#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS  0x8A42\n#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46\n#define GL_INVALID_INDEX                  0xFFFFFFFFu\n#endif\n\n#ifndef GL_ARB_compatibility\n/* ARB_compatibility just defines tokens from core 3.0 */\n#endif\n\n#ifndef GL_ARB_copy_buffer\n#define GL_COPY_READ_BUFFER_BINDING       0x8F36\n#define GL_COPY_READ_BUFFER               GL_COPY_READ_BUFFER_BINDING\n#define GL_COPY_WRITE_BUFFER_BINDING      0x8F37\n#define GL_COPY_WRITE_BUFFER              GL_COPY_WRITE_BUFFER_BINDING\n#endif\n\n#ifndef GL_ARB_shader_texture_lod\n#endif\n\n#ifndef GL_ARB_depth_clamp\n#define GL_DEPTH_CLAMP                    0x864F\n#endif\n\n#ifndef GL_ARB_draw_elements_base_vertex\n#endif\n\n#ifndef GL_ARB_fragment_coord_conventions\n#endif\n\n#ifndef GL_ARB_provoking_vertex\n#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C\n#define GL_FIRST_VERTEX_CONVENTION        0x8E4D\n#define GL_LAST_VERTEX_CONVENTION         0x8E4E\n#define GL_PROVOKING_VERTEX               0x8E4F\n#endif\n\n#ifndef GL_ARB_seamless_cube_map\n#define GL_TEXTURE_CUBE_MAP_SEAMLESS      0x884F\n#endif\n\n#ifndef GL_ARB_sync\n#define GL_MAX_SERVER_WAIT_TIMEOUT        0x9111\n#define GL_OBJECT_TYPE                    0x9112\n#define GL_SYNC_CONDITION                 0x9113\n#define GL_SYNC_STATUS                    0x9114\n#define GL_SYNC_FLAGS                     0x9115\n#define GL_SYNC_FENCE                     0x9116\n#define GL_SYNC_GPU_COMMANDS_COMPLETE     0x9117\n#define GL_UNSIGNALED                     0x9118\n#define GL_SIGNALED                       0x9119\n#define GL_ALREADY_SIGNALED               0x911A\n#define GL_TIMEOUT_EXPIRED                0x911B\n#define GL_CONDITION_SATISFIED            0x911C\n#define GL_WAIT_FAILED                    0x911D\n#define GL_SYNC_FLUSH_COMMANDS_BIT        0x00000001\n#define GL_TIMEOUT_IGNORED                0xFFFFFFFFFFFFFFFFull\n#endif\n\n#ifndef GL_ARB_texture_multisample\n#define GL_SAMPLE_POSITION                0x8E50\n#define GL_SAMPLE_MASK                    0x8E51\n#define GL_SAMPLE_MASK_VALUE              0x8E52\n#define GL_MAX_SAMPLE_MASK_WORDS          0x8E59\n#define GL_TEXTURE_2D_MULTISAMPLE         0x9100\n#define GL_PROXY_TEXTURE_2D_MULTISAMPLE   0x9101\n#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY   0x9102\n#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103\n#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104\n#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105\n#define GL_TEXTURE_SAMPLES                0x9106\n#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107\n#define GL_SAMPLER_2D_MULTISAMPLE         0x9108\n#define GL_INT_SAMPLER_2D_MULTISAMPLE     0x9109\n#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A\n#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY   0x910B\n#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C\n#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D\n#define GL_MAX_COLOR_TEXTURE_SAMPLES      0x910E\n#define GL_MAX_DEPTH_TEXTURE_SAMPLES      0x910F\n#define GL_MAX_INTEGER_SAMPLES            0x9110\n#endif\n\n#ifndef GL_ARB_vertex_array_bgra\n/* reuse GL_BGRA */\n#endif\n\n#ifndef GL_ARB_draw_buffers_blend\n#endif\n\n#ifndef GL_ARB_sample_shading\n#define GL_SAMPLE_SHADING_ARB             0x8C36\n#define GL_MIN_SAMPLE_SHADING_VALUE_ARB   0x8C37\n#endif\n\n#ifndef GL_ARB_texture_cube_map_array\n#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB     0x9009\n#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A\n#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B\n#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB     0x900C\n#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D\n#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E\n#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F\n#endif\n\n#ifndef GL_ARB_texture_gather\n#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F\n#endif\n\n#ifndef GL_ARB_texture_query_lod\n#endif\n\n#ifndef GL_ARB_shading_language_include\n#define GL_SHADER_INCLUDE_ARB             0x8DAE\n#define GL_NAMED_STRING_LENGTH_ARB        0x8DE9\n#define GL_NAMED_STRING_TYPE_ARB          0x8DEA\n#endif\n\n#ifndef GL_ARB_texture_compression_bptc\n#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C\n#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D\n#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E\n#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F\n#endif\n\n#ifndef GL_ARB_blend_func_extended\n#define GL_SRC1_COLOR                     0x88F9\n/* reuse GL_SRC1_ALPHA */\n#define GL_ONE_MINUS_SRC1_COLOR           0x88FA\n#define GL_ONE_MINUS_SRC1_ALPHA           0x88FB\n#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS   0x88FC\n#endif\n\n#ifndef GL_ARB_explicit_attrib_location\n#endif\n\n#ifndef GL_ARB_occlusion_query2\n#define GL_ANY_SAMPLES_PASSED             0x8C2F\n#endif\n\n#ifndef GL_ARB_sampler_objects\n#define GL_SAMPLER_BINDING                0x8919\n#endif\n\n#ifndef GL_ARB_shader_bit_encoding\n#endif\n\n#ifndef GL_ARB_texture_rgb10_a2ui\n#define GL_RGB10_A2UI                     0x906F\n#endif\n\n#ifndef GL_ARB_texture_swizzle\n#define GL_TEXTURE_SWIZZLE_R              0x8E42\n#define GL_TEXTURE_SWIZZLE_G              0x8E43\n#define GL_TEXTURE_SWIZZLE_B              0x8E44\n#define GL_TEXTURE_SWIZZLE_A              0x8E45\n#define GL_TEXTURE_SWIZZLE_RGBA           0x8E46\n#endif\n\n#ifndef GL_ARB_timer_query\n#define GL_TIME_ELAPSED                   0x88BF\n#define GL_TIMESTAMP                      0x8E28\n#endif\n\n#ifndef GL_ARB_vertex_type_2_10_10_10_rev\n/* reuse GL_UNSIGNED_INT_2_10_10_10_REV */\n#define GL_INT_2_10_10_10_REV             0x8D9F\n#endif\n\n#ifndef GL_ARB_draw_indirect\n#define GL_DRAW_INDIRECT_BUFFER           0x8F3F\n#define GL_DRAW_INDIRECT_BUFFER_BINDING   0x8F43\n#endif\n\n#ifndef GL_ARB_gpu_shader5\n#define GL_GEOMETRY_SHADER_INVOCATIONS    0x887F\n#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A\n#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B\n#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C\n#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D\n/* reuse GL_MAX_VERTEX_STREAMS */\n#endif\n\n#ifndef GL_ARB_gpu_shader_fp64\n/* reuse GL_DOUBLE */\n#define GL_DOUBLE_VEC2                    0x8FFC\n#define GL_DOUBLE_VEC3                    0x8FFD\n#define GL_DOUBLE_VEC4                    0x8FFE\n#define GL_DOUBLE_MAT2                    0x8F46\n#define GL_DOUBLE_MAT3                    0x8F47\n#define GL_DOUBLE_MAT4                    0x8F48\n#define GL_DOUBLE_MAT2x3                  0x8F49\n#define GL_DOUBLE_MAT2x4                  0x8F4A\n#define GL_DOUBLE_MAT3x2                  0x8F4B\n#define GL_DOUBLE_MAT3x4                  0x8F4C\n#define GL_DOUBLE_MAT4x2                  0x8F4D\n#define GL_DOUBLE_MAT4x3                  0x8F4E\n#endif\n\n#ifndef GL_ARB_shader_subroutine\n#define GL_ACTIVE_SUBROUTINES             0x8DE5\n#define GL_ACTIVE_SUBROUTINE_UNIFORMS     0x8DE6\n#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47\n#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH   0x8E48\n#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49\n#define GL_MAX_SUBROUTINES                0x8DE7\n#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8\n#define GL_NUM_COMPATIBLE_SUBROUTINES     0x8E4A\n#define GL_COMPATIBLE_SUBROUTINES         0x8E4B\n/* reuse GL_UNIFORM_SIZE */\n/* reuse GL_UNIFORM_NAME_LENGTH */\n#endif\n\n#ifndef GL_ARB_tessellation_shader\n#define GL_PATCHES                        0x000E\n#define GL_PATCH_VERTICES                 0x8E72\n#define GL_PATCH_DEFAULT_INNER_LEVEL      0x8E73\n#define GL_PATCH_DEFAULT_OUTER_LEVEL      0x8E74\n#define GL_TESS_CONTROL_OUTPUT_VERTICES   0x8E75\n#define GL_TESS_GEN_MODE                  0x8E76\n#define GL_TESS_GEN_SPACING               0x8E77\n#define GL_TESS_GEN_VERTEX_ORDER          0x8E78\n#define GL_TESS_GEN_POINT_MODE            0x8E79\n/* reuse GL_TRIANGLES */\n/* reuse GL_QUADS */\n#define GL_ISOLINES                       0x8E7A\n/* reuse GL_EQUAL */\n#define GL_FRACTIONAL_ODD                 0x8E7B\n#define GL_FRACTIONAL_EVEN                0x8E7C\n/* reuse GL_CCW */\n/* reuse GL_CW */\n#define GL_MAX_PATCH_VERTICES             0x8E7D\n#define GL_MAX_TESS_GEN_LEVEL             0x8E7E\n#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F\n#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80\n#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81\n#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82\n#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83\n#define GL_MAX_TESS_PATCH_COMPONENTS      0x8E84\n#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85\n#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86\n#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89\n#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A\n#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C\n#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D\n#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E\n#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1\n#define GL_TESS_EVALUATION_SHADER         0x8E87\n#define GL_TESS_CONTROL_SHADER            0x8E88\n#endif\n\n#ifndef GL_ARB_texture_buffer_object_rgb32\n/* reuse GL_RGB32F */\n/* reuse GL_RGB32UI */\n/* reuse GL_RGB32I */\n#endif\n\n#ifndef GL_ARB_transform_feedback2\n#define GL_TRANSFORM_FEEDBACK             0x8E22\n#define GL_TRANSFORM_FEEDBACK_PAUSED      0x8E23\n#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED GL_TRANSFORM_FEEDBACK_PAUSED\n#define GL_TRANSFORM_FEEDBACK_ACTIVE      0x8E24\n#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE GL_TRANSFORM_FEEDBACK_ACTIVE\n#define GL_TRANSFORM_FEEDBACK_BINDING     0x8E25\n#endif\n\n#ifndef GL_ARB_transform_feedback3\n#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70\n#define GL_MAX_VERTEX_STREAMS             0x8E71\n#endif\n\n#ifndef GL_ARB_ES2_compatibility\n#define GL_FIXED                          0x140C\n#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A\n#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B\n#define GL_LOW_FLOAT                      0x8DF0\n#define GL_MEDIUM_FLOAT                   0x8DF1\n#define GL_HIGH_FLOAT                     0x8DF2\n#define GL_LOW_INT                        0x8DF3\n#define GL_MEDIUM_INT                     0x8DF4\n#define GL_HIGH_INT                       0x8DF5\n#define GL_SHADER_COMPILER                0x8DFA\n#define GL_SHADER_BINARY_FORMATS          0x8DF8\n#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9\n#define GL_MAX_VERTEX_UNIFORM_VECTORS     0x8DFB\n#define GL_MAX_VARYING_VECTORS            0x8DFC\n#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD\n#define GL_RGB565                         0x8D62\n#endif\n\n#ifndef GL_ARB_get_program_binary\n#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257\n#define GL_PROGRAM_BINARY_LENGTH          0x8741\n#define GL_NUM_PROGRAM_BINARY_FORMATS     0x87FE\n#define GL_PROGRAM_BINARY_FORMATS         0x87FF\n#endif\n\n#ifndef GL_ARB_separate_shader_objects\n#define GL_VERTEX_SHADER_BIT              0x00000001\n#define GL_FRAGMENT_SHADER_BIT            0x00000002\n#define GL_GEOMETRY_SHADER_BIT            0x00000004\n#define GL_TESS_CONTROL_SHADER_BIT        0x00000008\n#define GL_TESS_EVALUATION_SHADER_BIT     0x00000010\n#define GL_ALL_SHADER_BITS                0xFFFFFFFF\n#define GL_PROGRAM_SEPARABLE              0x8258\n#define GL_ACTIVE_PROGRAM                 0x8259\n#define GL_PROGRAM_PIPELINE_BINDING       0x825A\n#endif\n\n#ifndef GL_ARB_shader_precision\n#endif\n\n#ifndef GL_ARB_vertex_attrib_64bit\n/* reuse GL_RGB32I */\n/* reuse GL_DOUBLE_VEC2 */\n/* reuse GL_DOUBLE_VEC3 */\n/* reuse GL_DOUBLE_VEC4 */\n/* reuse GL_DOUBLE_MAT2 */\n/* reuse GL_DOUBLE_MAT3 */\n/* reuse GL_DOUBLE_MAT4 */\n/* reuse GL_DOUBLE_MAT2x3 */\n/* reuse GL_DOUBLE_MAT2x4 */\n/* reuse GL_DOUBLE_MAT3x2 */\n/* reuse GL_DOUBLE_MAT3x4 */\n/* reuse GL_DOUBLE_MAT4x2 */\n/* reuse GL_DOUBLE_MAT4x3 */\n#endif\n\n#ifndef GL_ARB_viewport_array\n/* reuse GL_SCISSOR_BOX */\n/* reuse GL_VIEWPORT */\n/* reuse GL_DEPTH_RANGE */\n/* reuse GL_SCISSOR_TEST */\n#define GL_MAX_VIEWPORTS                  0x825B\n#define GL_VIEWPORT_SUBPIXEL_BITS         0x825C\n#define GL_VIEWPORT_BOUNDS_RANGE          0x825D\n#define GL_LAYER_PROVOKING_VERTEX         0x825E\n#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F\n#define GL_UNDEFINED_VERTEX               0x8260\n/* reuse GL_FIRST_VERTEX_CONVENTION */\n/* reuse GL_LAST_VERTEX_CONVENTION */\n/* reuse GL_PROVOKING_VERTEX */\n#endif\n\n#ifndef GL_ARB_cl_event\n#define GL_SYNC_CL_EVENT_ARB              0x8240\n#define GL_SYNC_CL_EVENT_COMPLETE_ARB     0x8241\n#endif\n\n#ifndef GL_ARB_debug_output\n#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB   0x8242\n#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243\n#define GL_DEBUG_CALLBACK_FUNCTION_ARB    0x8244\n#define GL_DEBUG_CALLBACK_USER_PARAM_ARB  0x8245\n#define GL_DEBUG_SOURCE_API_ARB           0x8246\n#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247\n#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248\n#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB   0x8249\n#define GL_DEBUG_SOURCE_APPLICATION_ARB   0x824A\n#define GL_DEBUG_SOURCE_OTHER_ARB         0x824B\n#define GL_DEBUG_TYPE_ERROR_ARB           0x824C\n#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D\n#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E\n#define GL_DEBUG_TYPE_PORTABILITY_ARB     0x824F\n#define GL_DEBUG_TYPE_PERFORMANCE_ARB     0x8250\n#define GL_DEBUG_TYPE_OTHER_ARB           0x8251\n#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB   0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB  0x9144\n#define GL_DEBUG_LOGGED_MESSAGES_ARB      0x9145\n#define GL_DEBUG_SEVERITY_HIGH_ARB        0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM_ARB      0x9147\n#define GL_DEBUG_SEVERITY_LOW_ARB         0x9148\n#endif\n\n#ifndef GL_ARB_robustness\n/* reuse GL_NO_ERROR */\n#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004\n#define GL_LOSE_CONTEXT_ON_RESET_ARB      0x8252\n#define GL_GUILTY_CONTEXT_RESET_ARB       0x8253\n#define GL_INNOCENT_CONTEXT_RESET_ARB     0x8254\n#define GL_UNKNOWN_CONTEXT_RESET_ARB      0x8255\n#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256\n#define GL_NO_RESET_NOTIFICATION_ARB      0x8261\n#endif\n\n#ifndef GL_ARB_shader_stencil_export\n#endif\n\n#ifndef GL_ARB_base_instance\n#endif\n\n#ifndef GL_ARB_shading_language_420pack\n#endif\n\n#ifndef GL_ARB_transform_feedback_instanced\n#endif\n\n#ifndef GL_ARB_compressed_texture_pixel_storage\n#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH  0x9127\n#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128\n#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH  0x9129\n#define GL_UNPACK_COMPRESSED_BLOCK_SIZE   0x912A\n#define GL_PACK_COMPRESSED_BLOCK_WIDTH    0x912B\n#define GL_PACK_COMPRESSED_BLOCK_HEIGHT   0x912C\n#define GL_PACK_COMPRESSED_BLOCK_DEPTH    0x912D\n#define GL_PACK_COMPRESSED_BLOCK_SIZE     0x912E\n#endif\n\n#ifndef GL_ARB_conservative_depth\n#endif\n\n#ifndef GL_ARB_internalformat_query\n#define GL_NUM_SAMPLE_COUNTS              0x9380\n#endif\n\n#ifndef GL_ARB_map_buffer_alignment\n#define GL_MIN_MAP_BUFFER_ALIGNMENT       0x90BC\n#endif\n\n#ifndef GL_ARB_shader_atomic_counters\n#define GL_ATOMIC_COUNTER_BUFFER          0x92C0\n#define GL_ATOMIC_COUNTER_BUFFER_BINDING  0x92C1\n#define GL_ATOMIC_COUNTER_BUFFER_START    0x92C2\n#define GL_ATOMIC_COUNTER_BUFFER_SIZE     0x92C3\n#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4\n#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5\n#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB\n#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC\n#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD\n#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE\n#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF\n#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0\n#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1\n#define GL_MAX_VERTEX_ATOMIC_COUNTERS     0x92D2\n#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3\n#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4\n#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS   0x92D5\n#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS   0x92D6\n#define GL_MAX_COMBINED_ATOMIC_COUNTERS   0x92D7\n#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8\n#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC\n#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS  0x92D9\n#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA\n#define GL_UNSIGNED_INT_ATOMIC_COUNTER    0x92DB\n#endif\n\n#ifndef GL_ARB_shader_image_load_store\n#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001\n#define GL_ELEMENT_ARRAY_BARRIER_BIT      0x00000002\n#define GL_UNIFORM_BARRIER_BIT            0x00000004\n#define GL_TEXTURE_FETCH_BARRIER_BIT      0x00000008\n#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020\n#define GL_COMMAND_BARRIER_BIT            0x00000040\n#define GL_PIXEL_BUFFER_BARRIER_BIT       0x00000080\n#define GL_TEXTURE_UPDATE_BARRIER_BIT     0x00000100\n#define GL_BUFFER_UPDATE_BARRIER_BIT      0x00000200\n#define GL_FRAMEBUFFER_BARRIER_BIT        0x00000400\n#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800\n#define GL_ATOMIC_COUNTER_BARRIER_BIT     0x00001000\n#define GL_ALL_BARRIER_BITS               0xFFFFFFFF\n#define GL_MAX_IMAGE_UNITS                0x8F38\n#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39\n#define GL_IMAGE_BINDING_NAME             0x8F3A\n#define GL_IMAGE_BINDING_LEVEL            0x8F3B\n#define GL_IMAGE_BINDING_LAYERED          0x8F3C\n#define GL_IMAGE_BINDING_LAYER            0x8F3D\n#define GL_IMAGE_BINDING_ACCESS           0x8F3E\n#define GL_IMAGE_1D                       0x904C\n#define GL_IMAGE_2D                       0x904D\n#define GL_IMAGE_3D                       0x904E\n#define GL_IMAGE_2D_RECT                  0x904F\n#define GL_IMAGE_CUBE                     0x9050\n#define GL_IMAGE_BUFFER                   0x9051\n#define GL_IMAGE_1D_ARRAY                 0x9052\n#define GL_IMAGE_2D_ARRAY                 0x9053\n#define GL_IMAGE_CUBE_MAP_ARRAY           0x9054\n#define GL_IMAGE_2D_MULTISAMPLE           0x9055\n#define GL_IMAGE_2D_MULTISAMPLE_ARRAY     0x9056\n#define GL_INT_IMAGE_1D                   0x9057\n#define GL_INT_IMAGE_2D                   0x9058\n#define GL_INT_IMAGE_3D                   0x9059\n#define GL_INT_IMAGE_2D_RECT              0x905A\n#define GL_INT_IMAGE_CUBE                 0x905B\n#define GL_INT_IMAGE_BUFFER               0x905C\n#define GL_INT_IMAGE_1D_ARRAY             0x905D\n#define GL_INT_IMAGE_2D_ARRAY             0x905E\n#define GL_INT_IMAGE_CUBE_MAP_ARRAY       0x905F\n#define GL_INT_IMAGE_2D_MULTISAMPLE       0x9060\n#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061\n#define GL_UNSIGNED_INT_IMAGE_1D          0x9062\n#define GL_UNSIGNED_INT_IMAGE_2D          0x9063\n#define GL_UNSIGNED_INT_IMAGE_3D          0x9064\n#define GL_UNSIGNED_INT_IMAGE_2D_RECT     0x9065\n#define GL_UNSIGNED_INT_IMAGE_CUBE        0x9066\n#define GL_UNSIGNED_INT_IMAGE_BUFFER      0x9067\n#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY    0x9068\n#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY    0x9069\n#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C\n#define GL_MAX_IMAGE_SAMPLES              0x906D\n#define GL_IMAGE_BINDING_FORMAT           0x906E\n#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7\n#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8\n#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9\n#define GL_MAX_VERTEX_IMAGE_UNIFORMS      0x90CA\n#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB\n#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC\n#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS    0x90CD\n#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS    0x90CE\n#define GL_MAX_COMBINED_IMAGE_UNIFORMS    0x90CF\n#endif\n\n#ifndef GL_ARB_shading_language_packing\n#endif\n\n#ifndef GL_ARB_texture_storage\n#define GL_TEXTURE_IMMUTABLE_FORMAT       0x912F\n#endif\n\n#ifndef GL_KHR_texture_compression_astc_ldr\n#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR   0x93B0\n#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR   0x93B1\n#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR   0x93B2\n#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR   0x93B3\n#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR   0x93B4\n#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR   0x93B5\n#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR   0x93B6\n#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR   0x93B7\n#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR  0x93B8\n#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR  0x93B9\n#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR  0x93BA\n#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB\n#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC\n#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD\n#endif\n\n#ifndef GL_KHR_debug\n#define GL_DEBUG_OUTPUT_SYNCHRONOUS       0x8242\n#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243\n#define GL_DEBUG_CALLBACK_FUNCTION        0x8244\n#define GL_DEBUG_CALLBACK_USER_PARAM      0x8245\n#define GL_DEBUG_SOURCE_API               0x8246\n#define GL_DEBUG_SOURCE_WINDOW_SYSTEM     0x8247\n#define GL_DEBUG_SOURCE_SHADER_COMPILER   0x8248\n#define GL_DEBUG_SOURCE_THIRD_PARTY       0x8249\n#define GL_DEBUG_SOURCE_APPLICATION       0x824A\n#define GL_DEBUG_SOURCE_OTHER             0x824B\n#define GL_DEBUG_TYPE_ERROR               0x824C\n#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D\n#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR  0x824E\n#define GL_DEBUG_TYPE_PORTABILITY         0x824F\n#define GL_DEBUG_TYPE_PERFORMANCE         0x8250\n#define GL_DEBUG_TYPE_OTHER               0x8251\n#define GL_DEBUG_TYPE_MARKER              0x8268\n#define GL_DEBUG_TYPE_PUSH_GROUP          0x8269\n#define GL_DEBUG_TYPE_POP_GROUP           0x826A\n#define GL_DEBUG_SEVERITY_NOTIFICATION    0x826B\n#define GL_MAX_DEBUG_GROUP_STACK_DEPTH    0x826C\n#define GL_DEBUG_GROUP_STACK_DEPTH        0x826D\n#define GL_BUFFER                         0x82E0\n#define GL_SHADER                         0x82E1\n#define GL_PROGRAM                        0x82E2\n#define GL_QUERY                          0x82E3\n#define GL_PROGRAM_PIPELINE               0x82E4\n#define GL_SAMPLER                        0x82E6\n#define GL_DISPLAY_LIST                   0x82E7\n/* DISPLAY_LIST used in compatibility profile only */\n#define GL_MAX_LABEL_LENGTH               0x82E8\n#define GL_MAX_DEBUG_MESSAGE_LENGTH       0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES      0x9144\n#define GL_DEBUG_LOGGED_MESSAGES          0x9145\n#define GL_DEBUG_SEVERITY_HIGH            0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM          0x9147\n#define GL_DEBUG_SEVERITY_LOW             0x9148\n#define GL_DEBUG_OUTPUT                   0x92E0\n#define GL_CONTEXT_FLAG_DEBUG_BIT         0x00000002\n/* reuse GL_STACK_UNDERFLOW */\n/* reuse GL_STACK_OVERFLOW */\n#endif\n\n#ifndef GL_ARB_arrays_of_arrays\n#endif\n\n#ifndef GL_ARB_clear_buffer_object\n#endif\n\n#ifndef GL_ARB_compute_shader\n#define GL_COMPUTE_SHADER                 0x91B9\n#define GL_MAX_COMPUTE_UNIFORM_BLOCKS     0x91BB\n#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC\n#define GL_MAX_COMPUTE_IMAGE_UNIFORMS     0x91BD\n#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262\n#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263\n#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264\n#define GL_MAX_COMPUTE_ATOMIC_COUNTERS    0x8265\n#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266\n#define GL_MAX_COMPUTE_LOCAL_INVOCATIONS  0x90EB\n#define GL_MAX_COMPUTE_WORK_GROUP_COUNT   0x91BE\n#define GL_MAX_COMPUTE_WORK_GROUP_SIZE    0x91BF\n#define GL_COMPUTE_LOCAL_WORK_SIZE        0x8267\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED\n#define GL_DISPATCH_INDIRECT_BUFFER       0x90EE\n#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF\n#define GL_COMPUTE_SHADER_BIT             0x00000020\n#endif\n\n#ifndef GL_ARB_copy_image\n#endif\n\n#ifndef GL_ARB_texture_view\n#define GL_TEXTURE_VIEW_MIN_LEVEL         0x82DB\n#define GL_TEXTURE_VIEW_NUM_LEVELS        0x82DC\n#define GL_TEXTURE_VIEW_MIN_LAYER         0x82DD\n#define GL_TEXTURE_VIEW_NUM_LAYERS        0x82DE\n#define GL_TEXTURE_IMMUTABLE_LEVELS       0x82DF\n#endif\n\n#ifndef GL_ARB_vertex_attrib_binding\n#define GL_VERTEX_ATTRIB_BINDING          0x82D4\n#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET  0x82D5\n#define GL_VERTEX_BINDING_DIVISOR         0x82D6\n#define GL_VERTEX_BINDING_OFFSET          0x82D7\n#define GL_VERTEX_BINDING_STRIDE          0x82D8\n#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9\n#define GL_MAX_VERTEX_ATTRIB_BINDINGS     0x82DA\n#endif\n\n#ifndef GL_ARB_robustness_isolation\n#endif\n\n#ifndef GL_ARB_ES3_compatibility\n#define GL_COMPRESSED_RGB8_ETC2           0x9274\n#define GL_COMPRESSED_SRGB8_ETC2          0x9275\n#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276\n#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277\n#define GL_COMPRESSED_RGBA8_ETC2_EAC      0x9278\n#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279\n#define GL_COMPRESSED_R11_EAC             0x9270\n#define GL_COMPRESSED_SIGNED_R11_EAC      0x9271\n#define GL_COMPRESSED_RG11_EAC            0x9272\n#define GL_COMPRESSED_SIGNED_RG11_EAC     0x9273\n#define GL_PRIMITIVE_RESTART_FIXED_INDEX  0x8D69\n#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A\n#define GL_MAX_ELEMENT_INDEX              0x8D6B\n#endif\n\n#ifndef GL_ARB_explicit_uniform_location\n#define GL_MAX_UNIFORM_LOCATIONS          0x826E\n#endif\n\n#ifndef GL_ARB_fragment_layer_viewport\n#endif\n\n#ifndef GL_ARB_framebuffer_no_attachments\n#define GL_FRAMEBUFFER_DEFAULT_WIDTH      0x9310\n#define GL_FRAMEBUFFER_DEFAULT_HEIGHT     0x9311\n#define GL_FRAMEBUFFER_DEFAULT_LAYERS     0x9312\n#define GL_FRAMEBUFFER_DEFAULT_SAMPLES    0x9313\n#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314\n#define GL_MAX_FRAMEBUFFER_WIDTH          0x9315\n#define GL_MAX_FRAMEBUFFER_HEIGHT         0x9316\n#define GL_MAX_FRAMEBUFFER_LAYERS         0x9317\n#define GL_MAX_FRAMEBUFFER_SAMPLES        0x9318\n#endif\n\n#ifndef GL_ARB_internalformat_query2\n/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */\n/* reuse GL_NUM_SAMPLE_COUNTS */\n/* reuse GL_RENDERBUFFER */\n/* reuse GL_SAMPLES */\n/* reuse GL_TEXTURE_1D */\n/* reuse GL_TEXTURE_1D_ARRAY */\n/* reuse GL_TEXTURE_2D */\n/* reuse GL_TEXTURE_2D_ARRAY */\n/* reuse GL_TEXTURE_3D */\n/* reuse GL_TEXTURE_CUBE_MAP */\n/* reuse GL_TEXTURE_CUBE_MAP_ARRAY */\n/* reuse GL_TEXTURE_RECTANGLE */\n/* reuse GL_TEXTURE_BUFFER */\n/* reuse GL_TEXTURE_2D_MULTISAMPLE */\n/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */\n/* reuse GL_TEXTURE_COMPRESSED */\n#define GL_INTERNALFORMAT_SUPPORTED       0x826F\n#define GL_INTERNALFORMAT_PREFERRED       0x8270\n#define GL_INTERNALFORMAT_RED_SIZE        0x8271\n#define GL_INTERNALFORMAT_GREEN_SIZE      0x8272\n#define GL_INTERNALFORMAT_BLUE_SIZE       0x8273\n#define GL_INTERNALFORMAT_ALPHA_SIZE      0x8274\n#define GL_INTERNALFORMAT_DEPTH_SIZE      0x8275\n#define GL_INTERNALFORMAT_STENCIL_SIZE    0x8276\n#define GL_INTERNALFORMAT_SHARED_SIZE     0x8277\n#define GL_INTERNALFORMAT_RED_TYPE        0x8278\n#define GL_INTERNALFORMAT_GREEN_TYPE      0x8279\n#define GL_INTERNALFORMAT_BLUE_TYPE       0x827A\n#define GL_INTERNALFORMAT_ALPHA_TYPE      0x827B\n#define GL_INTERNALFORMAT_DEPTH_TYPE      0x827C\n#define GL_INTERNALFORMAT_STENCIL_TYPE    0x827D\n#define GL_MAX_WIDTH                      0x827E\n#define GL_MAX_HEIGHT                     0x827F\n#define GL_MAX_DEPTH                      0x8280\n#define GL_MAX_LAYERS                     0x8281\n#define GL_MAX_COMBINED_DIMENSIONS        0x8282\n#define GL_COLOR_COMPONENTS               0x8283\n#define GL_DEPTH_COMPONENTS               0x8284\n#define GL_STENCIL_COMPONENTS             0x8285\n#define GL_COLOR_RENDERABLE               0x8286\n#define GL_DEPTH_RENDERABLE               0x8287\n#define GL_STENCIL_RENDERABLE             0x8288\n#define GL_FRAMEBUFFER_RENDERABLE         0x8289\n#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A\n#define GL_FRAMEBUFFER_BLEND              0x828B\n#define GL_READ_PIXELS                    0x828C\n#define GL_READ_PIXELS_FORMAT             0x828D\n#define GL_READ_PIXELS_TYPE               0x828E\n#define GL_TEXTURE_IMAGE_FORMAT           0x828F\n#define GL_TEXTURE_IMAGE_TYPE             0x8290\n#define GL_GET_TEXTURE_IMAGE_FORMAT       0x8291\n#define GL_GET_TEXTURE_IMAGE_TYPE         0x8292\n#define GL_MIPMAP                         0x8293\n#define GL_MANUAL_GENERATE_MIPMAP         0x8294\n#define GL_AUTO_GENERATE_MIPMAP           0x8295\n#define GL_COLOR_ENCODING                 0x8296\n#define GL_SRGB_READ                      0x8297\n#define GL_SRGB_WRITE                     0x8298\n#define GL_SRGB_DECODE_ARB                0x8299\n#define GL_FILTER                         0x829A\n#define GL_VERTEX_TEXTURE                 0x829B\n#define GL_TESS_CONTROL_TEXTURE           0x829C\n#define GL_TESS_EVALUATION_TEXTURE        0x829D\n#define GL_GEOMETRY_TEXTURE               0x829E\n#define GL_FRAGMENT_TEXTURE               0x829F\n#define GL_COMPUTE_TEXTURE                0x82A0\n#define GL_TEXTURE_SHADOW                 0x82A1\n#define GL_TEXTURE_GATHER                 0x82A2\n#define GL_TEXTURE_GATHER_SHADOW          0x82A3\n#define GL_SHADER_IMAGE_LOAD              0x82A4\n#define GL_SHADER_IMAGE_STORE             0x82A5\n#define GL_SHADER_IMAGE_ATOMIC            0x82A6\n#define GL_IMAGE_TEXEL_SIZE               0x82A7\n#define GL_IMAGE_COMPATIBILITY_CLASS      0x82A8\n#define GL_IMAGE_PIXEL_FORMAT             0x82A9\n#define GL_IMAGE_PIXEL_TYPE               0x82AA\n#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC\n#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD\n#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE\n#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF\n#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1\n#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2\n#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE  0x82B3\n#define GL_CLEAR_BUFFER                   0x82B4\n#define GL_TEXTURE_VIEW                   0x82B5\n#define GL_VIEW_COMPATIBILITY_CLASS       0x82B6\n#define GL_FULL_SUPPORT                   0x82B7\n#define GL_CAVEAT_SUPPORT                 0x82B8\n#define GL_IMAGE_CLASS_4_X_32             0x82B9\n#define GL_IMAGE_CLASS_2_X_32             0x82BA\n#define GL_IMAGE_CLASS_1_X_32             0x82BB\n#define GL_IMAGE_CLASS_4_X_16             0x82BC\n#define GL_IMAGE_CLASS_2_X_16             0x82BD\n#define GL_IMAGE_CLASS_1_X_16             0x82BE\n#define GL_IMAGE_CLASS_4_X_8              0x82BF\n#define GL_IMAGE_CLASS_2_X_8              0x82C0\n#define GL_IMAGE_CLASS_1_X_8              0x82C1\n#define GL_IMAGE_CLASS_11_11_10           0x82C2\n#define GL_IMAGE_CLASS_10_10_10_2         0x82C3\n#define GL_VIEW_CLASS_128_BITS            0x82C4\n#define GL_VIEW_CLASS_96_BITS             0x82C5\n#define GL_VIEW_CLASS_64_BITS             0x82C6\n#define GL_VIEW_CLASS_48_BITS             0x82C7\n#define GL_VIEW_CLASS_32_BITS             0x82C8\n#define GL_VIEW_CLASS_24_BITS             0x82C9\n#define GL_VIEW_CLASS_16_BITS             0x82CA\n#define GL_VIEW_CLASS_8_BITS              0x82CB\n#define GL_VIEW_CLASS_S3TC_DXT1_RGB       0x82CC\n#define GL_VIEW_CLASS_S3TC_DXT1_RGBA      0x82CD\n#define GL_VIEW_CLASS_S3TC_DXT3_RGBA      0x82CE\n#define GL_VIEW_CLASS_S3TC_DXT5_RGBA      0x82CF\n#define GL_VIEW_CLASS_RGTC1_RED           0x82D0\n#define GL_VIEW_CLASS_RGTC2_RG            0x82D1\n#define GL_VIEW_CLASS_BPTC_UNORM          0x82D2\n#define GL_VIEW_CLASS_BPTC_FLOAT          0x82D3\n#endif\n\n#ifndef GL_ARB_invalidate_subdata\n#endif\n\n#ifndef GL_ARB_multi_draw_indirect\n#endif\n\n#ifndef GL_ARB_program_interface_query\n#define GL_UNIFORM                        0x92E1\n#define GL_UNIFORM_BLOCK                  0x92E2\n#define GL_PROGRAM_INPUT                  0x92E3\n#define GL_PROGRAM_OUTPUT                 0x92E4\n#define GL_BUFFER_VARIABLE                0x92E5\n#define GL_SHADER_STORAGE_BLOCK           0x92E6\n/* reuse GL_ATOMIC_COUNTER_BUFFER */\n#define GL_VERTEX_SUBROUTINE              0x92E8\n#define GL_TESS_CONTROL_SUBROUTINE        0x92E9\n#define GL_TESS_EVALUATION_SUBROUTINE     0x92EA\n#define GL_GEOMETRY_SUBROUTINE            0x92EB\n#define GL_FRAGMENT_SUBROUTINE            0x92EC\n#define GL_COMPUTE_SUBROUTINE             0x92ED\n#define GL_VERTEX_SUBROUTINE_UNIFORM      0x92EE\n#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF\n#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0\n#define GL_GEOMETRY_SUBROUTINE_UNIFORM    0x92F1\n#define GL_FRAGMENT_SUBROUTINE_UNIFORM    0x92F2\n#define GL_COMPUTE_SUBROUTINE_UNIFORM     0x92F3\n#define GL_TRANSFORM_FEEDBACK_VARYING     0x92F4\n#define GL_ACTIVE_RESOURCES               0x92F5\n#define GL_MAX_NAME_LENGTH                0x92F6\n#define GL_MAX_NUM_ACTIVE_VARIABLES       0x92F7\n#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8\n#define GL_NAME_LENGTH                    0x92F9\n#define GL_TYPE                           0x92FA\n#define GL_ARRAY_SIZE                     0x92FB\n#define GL_OFFSET                         0x92FC\n#define GL_BLOCK_INDEX                    0x92FD\n#define GL_ARRAY_STRIDE                   0x92FE\n#define GL_MATRIX_STRIDE                  0x92FF\n#define GL_IS_ROW_MAJOR                   0x9300\n#define GL_ATOMIC_COUNTER_BUFFER_INDEX    0x9301\n#define GL_BUFFER_BINDING                 0x9302\n#define GL_BUFFER_DATA_SIZE               0x9303\n#define GL_NUM_ACTIVE_VARIABLES           0x9304\n#define GL_ACTIVE_VARIABLES               0x9305\n#define GL_REFERENCED_BY_VERTEX_SHADER    0x9306\n#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307\n#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308\n#define GL_REFERENCED_BY_GEOMETRY_SHADER  0x9309\n#define GL_REFERENCED_BY_FRAGMENT_SHADER  0x930A\n#define GL_REFERENCED_BY_COMPUTE_SHADER   0x930B\n#define GL_TOP_LEVEL_ARRAY_SIZE           0x930C\n#define GL_TOP_LEVEL_ARRAY_STRIDE         0x930D\n#define GL_LOCATION                       0x930E\n#define GL_LOCATION_INDEX                 0x930F\n#define GL_IS_PER_PATCH                   0x92E7\n/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */\n/* reuse GL_COMPATIBLE_SUBROUTINES */\n#endif\n\n#ifndef GL_ARB_robust_buffer_access_behavior\n#endif\n\n#ifndef GL_ARB_shader_image_size\n#endif\n\n#ifndef GL_ARB_shader_storage_buffer_object\n#define GL_SHADER_STORAGE_BUFFER          0x90D2\n#define GL_SHADER_STORAGE_BUFFER_BINDING  0x90D3\n#define GL_SHADER_STORAGE_BUFFER_START    0x90D4\n#define GL_SHADER_STORAGE_BUFFER_SIZE     0x90D5\n#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6\n#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7\n#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8\n#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9\n#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA\n#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB\n#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC\n#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD\n#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE  0x90DE\n#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF\n#define GL_SHADER_STORAGE_BARRIER_BIT     0x2000\n#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS\n/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */\n#endif\n\n#ifndef GL_ARB_stencil_texturing\n#define GL_DEPTH_STENCIL_TEXTURE_MODE     0x90EA\n#endif\n\n#ifndef GL_ARB_texture_buffer_range\n#define GL_TEXTURE_BUFFER_OFFSET          0x919D\n#define GL_TEXTURE_BUFFER_SIZE            0x919E\n#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F\n#endif\n\n#ifndef GL_ARB_texture_query_levels\n#endif\n\n#ifndef GL_ARB_texture_storage_multisample\n#endif\n\n#ifndef GL_EXT_abgr\n#define GL_ABGR_EXT                       0x8000\n#endif\n\n#ifndef GL_EXT_blend_color\n#define GL_CONSTANT_COLOR_EXT             0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR_EXT   0x8002\n#define GL_CONSTANT_ALPHA_EXT             0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT   0x8004\n#define GL_BLEND_COLOR_EXT                0x8005\n#endif\n\n#ifndef GL_EXT_polygon_offset\n#define GL_POLYGON_OFFSET_EXT             0x8037\n#define GL_POLYGON_OFFSET_FACTOR_EXT      0x8038\n#define GL_POLYGON_OFFSET_BIAS_EXT        0x8039\n#endif\n\n#ifndef GL_EXT_texture\n#define GL_ALPHA4_EXT                     0x803B\n#define GL_ALPHA8_EXT                     0x803C\n#define GL_ALPHA12_EXT                    0x803D\n#define GL_ALPHA16_EXT                    0x803E\n#define GL_LUMINANCE4_EXT                 0x803F\n#define GL_LUMINANCE8_EXT                 0x8040\n#define GL_LUMINANCE12_EXT                0x8041\n#define GL_LUMINANCE16_EXT                0x8042\n#define GL_LUMINANCE4_ALPHA4_EXT          0x8043\n#define GL_LUMINANCE6_ALPHA2_EXT          0x8044\n#define GL_LUMINANCE8_ALPHA8_EXT          0x8045\n#define GL_LUMINANCE12_ALPHA4_EXT         0x8046\n#define GL_LUMINANCE12_ALPHA12_EXT        0x8047\n#define GL_LUMINANCE16_ALPHA16_EXT        0x8048\n#define GL_INTENSITY_EXT                  0x8049\n#define GL_INTENSITY4_EXT                 0x804A\n#define GL_INTENSITY8_EXT                 0x804B\n#define GL_INTENSITY12_EXT                0x804C\n#define GL_INTENSITY16_EXT                0x804D\n#define GL_RGB2_EXT                       0x804E\n#define GL_RGB4_EXT                       0x804F\n#define GL_RGB5_EXT                       0x8050\n#define GL_RGB8_EXT                       0x8051\n#define GL_RGB10_EXT                      0x8052\n#define GL_RGB12_EXT                      0x8053\n#define GL_RGB16_EXT                      0x8054\n#define GL_RGBA2_EXT                      0x8055\n#define GL_RGBA4_EXT                      0x8056\n#define GL_RGB5_A1_EXT                    0x8057\n#define GL_RGBA8_EXT                      0x8058\n#define GL_RGB10_A2_EXT                   0x8059\n#define GL_RGBA12_EXT                     0x805A\n#define GL_RGBA16_EXT                     0x805B\n#define GL_TEXTURE_RED_SIZE_EXT           0x805C\n#define GL_TEXTURE_GREEN_SIZE_EXT         0x805D\n#define GL_TEXTURE_BLUE_SIZE_EXT          0x805E\n#define GL_TEXTURE_ALPHA_SIZE_EXT         0x805F\n#define GL_TEXTURE_LUMINANCE_SIZE_EXT     0x8060\n#define GL_TEXTURE_INTENSITY_SIZE_EXT     0x8061\n#define GL_REPLACE_EXT                    0x8062\n#define GL_PROXY_TEXTURE_1D_EXT           0x8063\n#define GL_PROXY_TEXTURE_2D_EXT           0x8064\n#define GL_TEXTURE_TOO_LARGE_EXT          0x8065\n#endif\n\n#ifndef GL_EXT_texture3D\n#define GL_PACK_SKIP_IMAGES_EXT           0x806B\n#define GL_PACK_IMAGE_HEIGHT_EXT          0x806C\n#define GL_UNPACK_SKIP_IMAGES_EXT         0x806D\n#define GL_UNPACK_IMAGE_HEIGHT_EXT        0x806E\n#define GL_TEXTURE_3D_EXT                 0x806F\n#define GL_PROXY_TEXTURE_3D_EXT           0x8070\n#define GL_TEXTURE_DEPTH_EXT              0x8071\n#define GL_TEXTURE_WRAP_R_EXT             0x8072\n#define GL_MAX_3D_TEXTURE_SIZE_EXT        0x8073\n#endif\n\n#ifndef GL_SGIS_texture_filter4\n#define GL_FILTER4_SGIS                   0x8146\n#define GL_TEXTURE_FILTER4_SIZE_SGIS      0x8147\n#endif\n\n#ifndef GL_EXT_subtexture\n#endif\n\n#ifndef GL_EXT_copy_texture\n#endif\n\n#ifndef GL_EXT_histogram\n#define GL_HISTOGRAM_EXT                  0x8024\n#define GL_PROXY_HISTOGRAM_EXT            0x8025\n#define GL_HISTOGRAM_WIDTH_EXT            0x8026\n#define GL_HISTOGRAM_FORMAT_EXT           0x8027\n#define GL_HISTOGRAM_RED_SIZE_EXT         0x8028\n#define GL_HISTOGRAM_GREEN_SIZE_EXT       0x8029\n#define GL_HISTOGRAM_BLUE_SIZE_EXT        0x802A\n#define GL_HISTOGRAM_ALPHA_SIZE_EXT       0x802B\n#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT   0x802C\n#define GL_HISTOGRAM_SINK_EXT             0x802D\n#define GL_MINMAX_EXT                     0x802E\n#define GL_MINMAX_FORMAT_EXT              0x802F\n#define GL_MINMAX_SINK_EXT                0x8030\n#define GL_TABLE_TOO_LARGE_EXT            0x8031\n#endif\n\n#ifndef GL_EXT_convolution\n#define GL_CONVOLUTION_1D_EXT             0x8010\n#define GL_CONVOLUTION_2D_EXT             0x8011\n#define GL_SEPARABLE_2D_EXT               0x8012\n#define GL_CONVOLUTION_BORDER_MODE_EXT    0x8013\n#define GL_CONVOLUTION_FILTER_SCALE_EXT   0x8014\n#define GL_CONVOLUTION_FILTER_BIAS_EXT    0x8015\n#define GL_REDUCE_EXT                     0x8016\n#define GL_CONVOLUTION_FORMAT_EXT         0x8017\n#define GL_CONVOLUTION_WIDTH_EXT          0x8018\n#define GL_CONVOLUTION_HEIGHT_EXT         0x8019\n#define GL_MAX_CONVOLUTION_WIDTH_EXT      0x801A\n#define GL_MAX_CONVOLUTION_HEIGHT_EXT     0x801B\n#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C\n#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D\n#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E\n#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F\n#define GL_POST_CONVOLUTION_RED_BIAS_EXT  0x8020\n#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021\n#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022\n#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023\n#endif\n\n#ifndef GL_SGI_color_matrix\n#define GL_COLOR_MATRIX_SGI               0x80B1\n#define GL_COLOR_MATRIX_STACK_DEPTH_SGI   0x80B2\n#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3\n#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4\n#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5\n#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6\n#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7\n#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8\n#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9\n#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA\n#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB\n#endif\n\n#ifndef GL_SGI_color_table\n#define GL_COLOR_TABLE_SGI                0x80D0\n#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1\n#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2\n#define GL_PROXY_COLOR_TABLE_SGI          0x80D3\n#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4\n#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5\n#define GL_COLOR_TABLE_SCALE_SGI          0x80D6\n#define GL_COLOR_TABLE_BIAS_SGI           0x80D7\n#define GL_COLOR_TABLE_FORMAT_SGI         0x80D8\n#define GL_COLOR_TABLE_WIDTH_SGI          0x80D9\n#define GL_COLOR_TABLE_RED_SIZE_SGI       0x80DA\n#define GL_COLOR_TABLE_GREEN_SIZE_SGI     0x80DB\n#define GL_COLOR_TABLE_BLUE_SIZE_SGI      0x80DC\n#define GL_COLOR_TABLE_ALPHA_SIZE_SGI     0x80DD\n#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE\n#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF\n#endif\n\n#ifndef GL_SGIS_pixel_texture\n#define GL_PIXEL_TEXTURE_SGIS             0x8353\n#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354\n#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355\n#define GL_PIXEL_GROUP_COLOR_SGIS         0x8356\n#endif\n\n#ifndef GL_SGIX_pixel_texture\n#define GL_PIXEL_TEX_GEN_SGIX             0x8139\n#define GL_PIXEL_TEX_GEN_MODE_SGIX        0x832B\n#endif\n\n#ifndef GL_SGIS_texture4D\n#define GL_PACK_SKIP_VOLUMES_SGIS         0x8130\n#define GL_PACK_IMAGE_DEPTH_SGIS          0x8131\n#define GL_UNPACK_SKIP_VOLUMES_SGIS       0x8132\n#define GL_UNPACK_IMAGE_DEPTH_SGIS        0x8133\n#define GL_TEXTURE_4D_SGIS                0x8134\n#define GL_PROXY_TEXTURE_4D_SGIS          0x8135\n#define GL_TEXTURE_4DSIZE_SGIS            0x8136\n#define GL_TEXTURE_WRAP_Q_SGIS            0x8137\n#define GL_MAX_4D_TEXTURE_SIZE_SGIS       0x8138\n#define GL_TEXTURE_4D_BINDING_SGIS        0x814F\n#endif\n\n#ifndef GL_SGI_texture_color_table\n#define GL_TEXTURE_COLOR_TABLE_SGI        0x80BC\n#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI  0x80BD\n#endif\n\n#ifndef GL_EXT_cmyka\n#define GL_CMYK_EXT                       0x800C\n#define GL_CMYKA_EXT                      0x800D\n#define GL_PACK_CMYK_HINT_EXT             0x800E\n#define GL_UNPACK_CMYK_HINT_EXT           0x800F\n#endif\n\n#ifndef GL_EXT_texture_object\n#define GL_TEXTURE_PRIORITY_EXT           0x8066\n#define GL_TEXTURE_RESIDENT_EXT           0x8067\n#define GL_TEXTURE_1D_BINDING_EXT         0x8068\n#define GL_TEXTURE_2D_BINDING_EXT         0x8069\n#define GL_TEXTURE_3D_BINDING_EXT         0x806A\n#endif\n\n#ifndef GL_SGIS_detail_texture\n#define GL_DETAIL_TEXTURE_2D_SGIS         0x8095\n#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096\n#define GL_LINEAR_DETAIL_SGIS             0x8097\n#define GL_LINEAR_DETAIL_ALPHA_SGIS       0x8098\n#define GL_LINEAR_DETAIL_COLOR_SGIS       0x8099\n#define GL_DETAIL_TEXTURE_LEVEL_SGIS      0x809A\n#define GL_DETAIL_TEXTURE_MODE_SGIS       0x809B\n#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C\n#endif\n\n#ifndef GL_SGIS_sharpen_texture\n#define GL_LINEAR_SHARPEN_SGIS            0x80AD\n#define GL_LINEAR_SHARPEN_ALPHA_SGIS      0x80AE\n#define GL_LINEAR_SHARPEN_COLOR_SGIS      0x80AF\n#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0\n#endif\n\n#ifndef GL_EXT_packed_pixels\n#define GL_UNSIGNED_BYTE_3_3_2_EXT        0x8032\n#define GL_UNSIGNED_SHORT_4_4_4_4_EXT     0x8033\n#define GL_UNSIGNED_SHORT_5_5_5_1_EXT     0x8034\n#define GL_UNSIGNED_INT_8_8_8_8_EXT       0x8035\n#define GL_UNSIGNED_INT_10_10_10_2_EXT    0x8036\n#endif\n\n#ifndef GL_SGIS_texture_lod\n#define GL_TEXTURE_MIN_LOD_SGIS           0x813A\n#define GL_TEXTURE_MAX_LOD_SGIS           0x813B\n#define GL_TEXTURE_BASE_LEVEL_SGIS        0x813C\n#define GL_TEXTURE_MAX_LEVEL_SGIS         0x813D\n#endif\n\n#ifndef GL_SGIS_multisample\n#define GL_MULTISAMPLE_SGIS               0x809D\n#define GL_SAMPLE_ALPHA_TO_MASK_SGIS      0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE_SGIS       0x809F\n#define GL_SAMPLE_MASK_SGIS               0x80A0\n#define GL_1PASS_SGIS                     0x80A1\n#define GL_2PASS_0_SGIS                   0x80A2\n#define GL_2PASS_1_SGIS                   0x80A3\n#define GL_4PASS_0_SGIS                   0x80A4\n#define GL_4PASS_1_SGIS                   0x80A5\n#define GL_4PASS_2_SGIS                   0x80A6\n#define GL_4PASS_3_SGIS                   0x80A7\n#define GL_SAMPLE_BUFFERS_SGIS            0x80A8\n#define GL_SAMPLES_SGIS                   0x80A9\n#define GL_SAMPLE_MASK_VALUE_SGIS         0x80AA\n#define GL_SAMPLE_MASK_INVERT_SGIS        0x80AB\n#define GL_SAMPLE_PATTERN_SGIS            0x80AC\n#endif\n\n#ifndef GL_EXT_rescale_normal\n#define GL_RESCALE_NORMAL_EXT             0x803A\n#endif\n\n#ifndef GL_EXT_vertex_array\n#define GL_VERTEX_ARRAY_EXT               0x8074\n#define GL_NORMAL_ARRAY_EXT               0x8075\n#define GL_COLOR_ARRAY_EXT                0x8076\n#define GL_INDEX_ARRAY_EXT                0x8077\n#define GL_TEXTURE_COORD_ARRAY_EXT        0x8078\n#define GL_EDGE_FLAG_ARRAY_EXT            0x8079\n#define GL_VERTEX_ARRAY_SIZE_EXT          0x807A\n#define GL_VERTEX_ARRAY_TYPE_EXT          0x807B\n#define GL_VERTEX_ARRAY_STRIDE_EXT        0x807C\n#define GL_VERTEX_ARRAY_COUNT_EXT         0x807D\n#define GL_NORMAL_ARRAY_TYPE_EXT          0x807E\n#define GL_NORMAL_ARRAY_STRIDE_EXT        0x807F\n#define GL_NORMAL_ARRAY_COUNT_EXT         0x8080\n#define GL_COLOR_ARRAY_SIZE_EXT           0x8081\n#define GL_COLOR_ARRAY_TYPE_EXT           0x8082\n#define GL_COLOR_ARRAY_STRIDE_EXT         0x8083\n#define GL_COLOR_ARRAY_COUNT_EXT          0x8084\n#define GL_INDEX_ARRAY_TYPE_EXT           0x8085\n#define GL_INDEX_ARRAY_STRIDE_EXT         0x8086\n#define GL_INDEX_ARRAY_COUNT_EXT          0x8087\n#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT   0x8088\n#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT   0x8089\n#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A\n#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT  0x808B\n#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT     0x808C\n#define GL_EDGE_FLAG_ARRAY_COUNT_EXT      0x808D\n#define GL_VERTEX_ARRAY_POINTER_EXT       0x808E\n#define GL_NORMAL_ARRAY_POINTER_EXT       0x808F\n#define GL_COLOR_ARRAY_POINTER_EXT        0x8090\n#define GL_INDEX_ARRAY_POINTER_EXT        0x8091\n#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092\n#define GL_EDGE_FLAG_ARRAY_POINTER_EXT    0x8093\n#endif\n\n#ifndef GL_EXT_misc_attribute\n#endif\n\n#ifndef GL_SGIS_generate_mipmap\n#define GL_GENERATE_MIPMAP_SGIS           0x8191\n#define GL_GENERATE_MIPMAP_HINT_SGIS      0x8192\n#endif\n\n#ifndef GL_SGIX_clipmap\n#define GL_LINEAR_CLIPMAP_LINEAR_SGIX     0x8170\n#define GL_TEXTURE_CLIPMAP_CENTER_SGIX    0x8171\n#define GL_TEXTURE_CLIPMAP_FRAME_SGIX     0x8172\n#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX    0x8173\n#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174\n#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175\n#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX     0x8176\n#define GL_MAX_CLIPMAP_DEPTH_SGIX         0x8177\n#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178\n#define GL_NEAREST_CLIPMAP_NEAREST_SGIX   0x844D\n#define GL_NEAREST_CLIPMAP_LINEAR_SGIX    0x844E\n#define GL_LINEAR_CLIPMAP_NEAREST_SGIX    0x844F\n#endif\n\n#ifndef GL_SGIX_shadow\n#define GL_TEXTURE_COMPARE_SGIX           0x819A\n#define GL_TEXTURE_COMPARE_OPERATOR_SGIX  0x819B\n#define GL_TEXTURE_LEQUAL_R_SGIX          0x819C\n#define GL_TEXTURE_GEQUAL_R_SGIX          0x819D\n#endif\n\n#ifndef GL_SGIS_texture_edge_clamp\n#define GL_CLAMP_TO_EDGE_SGIS             0x812F\n#endif\n\n#ifndef GL_SGIS_texture_border_clamp\n#define GL_CLAMP_TO_BORDER_SGIS           0x812D\n#endif\n\n#ifndef GL_EXT_blend_minmax\n#define GL_FUNC_ADD_EXT                   0x8006\n#define GL_MIN_EXT                        0x8007\n#define GL_MAX_EXT                        0x8008\n#define GL_BLEND_EQUATION_EXT             0x8009\n#endif\n\n#ifndef GL_EXT_blend_subtract\n#define GL_FUNC_SUBTRACT_EXT              0x800A\n#define GL_FUNC_REVERSE_SUBTRACT_EXT      0x800B\n#endif\n\n#ifndef GL_EXT_blend_logic_op\n#endif\n\n#ifndef GL_SGIX_interlace\n#define GL_INTERLACE_SGIX                 0x8094\n#endif\n\n#ifndef GL_SGIX_pixel_tiles\n#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E\n#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F\n#define GL_PIXEL_TILE_WIDTH_SGIX          0x8140\n#define GL_PIXEL_TILE_HEIGHT_SGIX         0x8141\n#define GL_PIXEL_TILE_GRID_WIDTH_SGIX     0x8142\n#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX    0x8143\n#define GL_PIXEL_TILE_GRID_DEPTH_SGIX     0x8144\n#define GL_PIXEL_TILE_CACHE_SIZE_SGIX     0x8145\n#endif\n\n#ifndef GL_SGIS_texture_select\n#define GL_DUAL_ALPHA4_SGIS               0x8110\n#define GL_DUAL_ALPHA8_SGIS               0x8111\n#define GL_DUAL_ALPHA12_SGIS              0x8112\n#define GL_DUAL_ALPHA16_SGIS              0x8113\n#define GL_DUAL_LUMINANCE4_SGIS           0x8114\n#define GL_DUAL_LUMINANCE8_SGIS           0x8115\n#define GL_DUAL_LUMINANCE12_SGIS          0x8116\n#define GL_DUAL_LUMINANCE16_SGIS          0x8117\n#define GL_DUAL_INTENSITY4_SGIS           0x8118\n#define GL_DUAL_INTENSITY8_SGIS           0x8119\n#define GL_DUAL_INTENSITY12_SGIS          0x811A\n#define GL_DUAL_INTENSITY16_SGIS          0x811B\n#define GL_DUAL_LUMINANCE_ALPHA4_SGIS     0x811C\n#define GL_DUAL_LUMINANCE_ALPHA8_SGIS     0x811D\n#define GL_QUAD_ALPHA4_SGIS               0x811E\n#define GL_QUAD_ALPHA8_SGIS               0x811F\n#define GL_QUAD_LUMINANCE4_SGIS           0x8120\n#define GL_QUAD_LUMINANCE8_SGIS           0x8121\n#define GL_QUAD_INTENSITY4_SGIS           0x8122\n#define GL_QUAD_INTENSITY8_SGIS           0x8123\n#define GL_DUAL_TEXTURE_SELECT_SGIS       0x8124\n#define GL_QUAD_TEXTURE_SELECT_SGIS       0x8125\n#endif\n\n#ifndef GL_SGIX_sprite\n#define GL_SPRITE_SGIX                    0x8148\n#define GL_SPRITE_MODE_SGIX               0x8149\n#define GL_SPRITE_AXIS_SGIX               0x814A\n#define GL_SPRITE_TRANSLATION_SGIX        0x814B\n#define GL_SPRITE_AXIAL_SGIX              0x814C\n#define GL_SPRITE_OBJECT_ALIGNED_SGIX     0x814D\n#define GL_SPRITE_EYE_ALIGNED_SGIX        0x814E\n#endif\n\n#ifndef GL_SGIX_texture_multi_buffer\n#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E\n#endif\n\n#ifndef GL_EXT_point_parameters\n#define GL_POINT_SIZE_MIN_EXT             0x8126\n#define GL_POINT_SIZE_MAX_EXT             0x8127\n#define GL_POINT_FADE_THRESHOLD_SIZE_EXT  0x8128\n#define GL_DISTANCE_ATTENUATION_EXT       0x8129\n#endif\n\n#ifndef GL_SGIS_point_parameters\n#define GL_POINT_SIZE_MIN_SGIS            0x8126\n#define GL_POINT_SIZE_MAX_SGIS            0x8127\n#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128\n#define GL_DISTANCE_ATTENUATION_SGIS      0x8129\n#endif\n\n#ifndef GL_SGIX_instruments\n#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180\n#define GL_INSTRUMENT_MEASUREMENTS_SGIX   0x8181\n#endif\n\n#ifndef GL_SGIX_texture_scale_bias\n#define GL_POST_TEXTURE_FILTER_BIAS_SGIX  0x8179\n#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A\n#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B\n#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C\n#endif\n\n#ifndef GL_SGIX_framezoom\n#define GL_FRAMEZOOM_SGIX                 0x818B\n#define GL_FRAMEZOOM_FACTOR_SGIX          0x818C\n#define GL_MAX_FRAMEZOOM_FACTOR_SGIX      0x818D\n#endif\n\n#ifndef GL_SGIX_tag_sample_buffer\n#endif\n\n#ifndef GL_FfdMaskSGIX\n#define GL_TEXTURE_DEFORMATION_BIT_SGIX   0x00000001\n#define GL_GEOMETRY_DEFORMATION_BIT_SGIX  0x00000002\n#endif\n\n#ifndef GL_SGIX_polynomial_ffd\n#define GL_GEOMETRY_DEFORMATION_SGIX      0x8194\n#define GL_TEXTURE_DEFORMATION_SGIX       0x8195\n#define GL_DEFORMATIONS_MASK_SGIX         0x8196\n#define GL_MAX_DEFORMATION_ORDER_SGIX     0x8197\n#endif\n\n#ifndef GL_SGIX_reference_plane\n#define GL_REFERENCE_PLANE_SGIX           0x817D\n#define GL_REFERENCE_PLANE_EQUATION_SGIX  0x817E\n#endif\n\n#ifndef GL_SGIX_flush_raster\n#endif\n\n#ifndef GL_SGIX_depth_texture\n#define GL_DEPTH_COMPONENT16_SGIX         0x81A5\n#define GL_DEPTH_COMPONENT24_SGIX         0x81A6\n#define GL_DEPTH_COMPONENT32_SGIX         0x81A7\n#endif\n\n#ifndef GL_SGIS_fog_function\n#define GL_FOG_FUNC_SGIS                  0x812A\n#define GL_FOG_FUNC_POINTS_SGIS           0x812B\n#define GL_MAX_FOG_FUNC_POINTS_SGIS       0x812C\n#endif\n\n#ifndef GL_SGIX_fog_offset\n#define GL_FOG_OFFSET_SGIX                0x8198\n#define GL_FOG_OFFSET_VALUE_SGIX          0x8199\n#endif\n\n#ifndef GL_HP_image_transform\n#define GL_IMAGE_SCALE_X_HP               0x8155\n#define GL_IMAGE_SCALE_Y_HP               0x8156\n#define GL_IMAGE_TRANSLATE_X_HP           0x8157\n#define GL_IMAGE_TRANSLATE_Y_HP           0x8158\n#define GL_IMAGE_ROTATE_ANGLE_HP          0x8159\n#define GL_IMAGE_ROTATE_ORIGIN_X_HP       0x815A\n#define GL_IMAGE_ROTATE_ORIGIN_Y_HP       0x815B\n#define GL_IMAGE_MAG_FILTER_HP            0x815C\n#define GL_IMAGE_MIN_FILTER_HP            0x815D\n#define GL_IMAGE_CUBIC_WEIGHT_HP          0x815E\n#define GL_CUBIC_HP                       0x815F\n#define GL_AVERAGE_HP                     0x8160\n#define GL_IMAGE_TRANSFORM_2D_HP          0x8161\n#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162\n#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163\n#endif\n\n#ifndef GL_HP_convolution_border_modes\n#define GL_IGNORE_BORDER_HP               0x8150\n#define GL_CONSTANT_BORDER_HP             0x8151\n#define GL_REPLICATE_BORDER_HP            0x8153\n#define GL_CONVOLUTION_BORDER_COLOR_HP    0x8154\n#endif\n\n#ifndef GL_INGR_palette_buffer\n#endif\n\n#ifndef GL_SGIX_texture_add_env\n#define GL_TEXTURE_ENV_BIAS_SGIX          0x80BE\n#endif\n\n#ifndef GL_EXT_color_subtable\n#endif\n\n#ifndef GL_PGI_vertex_hints\n#define GL_VERTEX_DATA_HINT_PGI           0x1A22A\n#define GL_VERTEX_CONSISTENT_HINT_PGI     0x1A22B\n#define GL_MATERIAL_SIDE_HINT_PGI         0x1A22C\n#define GL_MAX_VERTEX_HINT_PGI            0x1A22D\n#define GL_COLOR3_BIT_PGI                 0x00010000\n#define GL_COLOR4_BIT_PGI                 0x00020000\n#define GL_EDGEFLAG_BIT_PGI               0x00040000\n#define GL_INDEX_BIT_PGI                  0x00080000\n#define GL_MAT_AMBIENT_BIT_PGI            0x00100000\n#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000\n#define GL_MAT_DIFFUSE_BIT_PGI            0x00400000\n#define GL_MAT_EMISSION_BIT_PGI           0x00800000\n#define GL_MAT_COLOR_INDEXES_BIT_PGI      0x01000000\n#define GL_MAT_SHININESS_BIT_PGI          0x02000000\n#define GL_MAT_SPECULAR_BIT_PGI           0x04000000\n#define GL_NORMAL_BIT_PGI                 0x08000000\n#define GL_TEXCOORD1_BIT_PGI              0x10000000\n#define GL_TEXCOORD2_BIT_PGI              0x20000000\n#define GL_TEXCOORD3_BIT_PGI              0x40000000\n#define GL_TEXCOORD4_BIT_PGI              0x80000000\n#define GL_VERTEX23_BIT_PGI               0x00000004\n#define GL_VERTEX4_BIT_PGI                0x00000008\n#endif\n\n#ifndef GL_PGI_misc_hints\n#define GL_PREFER_DOUBLEBUFFER_HINT_PGI   0x1A1F8\n#define GL_CONSERVE_MEMORY_HINT_PGI       0x1A1FD\n#define GL_RECLAIM_MEMORY_HINT_PGI        0x1A1FE\n#define GL_NATIVE_GRAPHICS_HANDLE_PGI     0x1A202\n#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203\n#define GL_NATIVE_GRAPHICS_END_HINT_PGI   0x1A204\n#define GL_ALWAYS_FAST_HINT_PGI           0x1A20C\n#define GL_ALWAYS_SOFT_HINT_PGI           0x1A20D\n#define GL_ALLOW_DRAW_OBJ_HINT_PGI        0x1A20E\n#define GL_ALLOW_DRAW_WIN_HINT_PGI        0x1A20F\n#define GL_ALLOW_DRAW_FRG_HINT_PGI        0x1A210\n#define GL_ALLOW_DRAW_MEM_HINT_PGI        0x1A211\n#define GL_STRICT_DEPTHFUNC_HINT_PGI      0x1A216\n#define GL_STRICT_LIGHTING_HINT_PGI       0x1A217\n#define GL_STRICT_SCISSOR_HINT_PGI        0x1A218\n#define GL_FULL_STIPPLE_HINT_PGI          0x1A219\n#define GL_CLIP_NEAR_HINT_PGI             0x1A220\n#define GL_CLIP_FAR_HINT_PGI              0x1A221\n#define GL_WIDE_LINE_HINT_PGI             0x1A222\n#define GL_BACK_NORMALS_HINT_PGI          0x1A223\n#endif\n\n#ifndef GL_EXT_paletted_texture\n#define GL_COLOR_INDEX1_EXT               0x80E2\n#define GL_COLOR_INDEX2_EXT               0x80E3\n#define GL_COLOR_INDEX4_EXT               0x80E4\n#define GL_COLOR_INDEX8_EXT               0x80E5\n#define GL_COLOR_INDEX12_EXT              0x80E6\n#define GL_COLOR_INDEX16_EXT              0x80E7\n#define GL_TEXTURE_INDEX_SIZE_EXT         0x80ED\n#endif\n\n#ifndef GL_EXT_clip_volume_hint\n#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT  0x80F0\n#endif\n\n#ifndef GL_SGIX_list_priority\n#define GL_LIST_PRIORITY_SGIX             0x8182\n#endif\n\n#ifndef GL_SGIX_ir_instrument1\n#define GL_IR_INSTRUMENT1_SGIX            0x817F\n#endif\n\n#ifndef GL_SGIX_calligraphic_fragment\n#define GL_CALLIGRAPHIC_FRAGMENT_SGIX     0x8183\n#endif\n\n#ifndef GL_SGIX_texture_lod_bias\n#define GL_TEXTURE_LOD_BIAS_S_SGIX        0x818E\n#define GL_TEXTURE_LOD_BIAS_T_SGIX        0x818F\n#define GL_TEXTURE_LOD_BIAS_R_SGIX        0x8190\n#endif\n\n#ifndef GL_SGIX_shadow_ambient\n#define GL_SHADOW_AMBIENT_SGIX            0x80BF\n#endif\n\n#ifndef GL_EXT_index_texture\n#endif\n\n#ifndef GL_EXT_index_material\n#define GL_INDEX_MATERIAL_EXT             0x81B8\n#define GL_INDEX_MATERIAL_PARAMETER_EXT   0x81B9\n#define GL_INDEX_MATERIAL_FACE_EXT        0x81BA\n#endif\n\n#ifndef GL_EXT_index_func\n#define GL_INDEX_TEST_EXT                 0x81B5\n#define GL_INDEX_TEST_FUNC_EXT            0x81B6\n#define GL_INDEX_TEST_REF_EXT             0x81B7\n#endif\n\n#ifndef GL_EXT_index_array_formats\n#define GL_IUI_V2F_EXT                    0x81AD\n#define GL_IUI_V3F_EXT                    0x81AE\n#define GL_IUI_N3F_V2F_EXT                0x81AF\n#define GL_IUI_N3F_V3F_EXT                0x81B0\n#define GL_T2F_IUI_V2F_EXT                0x81B1\n#define GL_T2F_IUI_V3F_EXT                0x81B2\n#define GL_T2F_IUI_N3F_V2F_EXT            0x81B3\n#define GL_T2F_IUI_N3F_V3F_EXT            0x81B4\n#endif\n\n#ifndef GL_EXT_compiled_vertex_array\n#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT   0x81A8\n#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT   0x81A9\n#endif\n\n#ifndef GL_EXT_cull_vertex\n#define GL_CULL_VERTEX_EXT                0x81AA\n#define GL_CULL_VERTEX_EYE_POSITION_EXT   0x81AB\n#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC\n#endif\n\n#ifndef GL_SGIX_ycrcb\n#define GL_YCRCB_422_SGIX                 0x81BB\n#define GL_YCRCB_444_SGIX                 0x81BC\n#endif\n\n#ifndef GL_SGIX_fragment_lighting\n#define GL_FRAGMENT_LIGHTING_SGIX         0x8400\n#define GL_FRAGMENT_COLOR_MATERIAL_SGIX   0x8401\n#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402\n#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403\n#define GL_MAX_FRAGMENT_LIGHTS_SGIX       0x8404\n#define GL_MAX_ACTIVE_LIGHTS_SGIX         0x8405\n#define GL_CURRENT_RASTER_NORMAL_SGIX     0x8406\n#define GL_LIGHT_ENV_MODE_SGIX            0x8407\n#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408\n#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409\n#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A\n#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B\n#define GL_FRAGMENT_LIGHT0_SGIX           0x840C\n#define GL_FRAGMENT_LIGHT1_SGIX           0x840D\n#define GL_FRAGMENT_LIGHT2_SGIX           0x840E\n#define GL_FRAGMENT_LIGHT3_SGIX           0x840F\n#define GL_FRAGMENT_LIGHT4_SGIX           0x8410\n#define GL_FRAGMENT_LIGHT5_SGIX           0x8411\n#define GL_FRAGMENT_LIGHT6_SGIX           0x8412\n#define GL_FRAGMENT_LIGHT7_SGIX           0x8413\n#endif\n\n#ifndef GL_IBM_rasterpos_clip\n#define GL_RASTER_POSITION_UNCLIPPED_IBM  0x19262\n#endif\n\n#ifndef GL_HP_texture_lighting\n#define GL_TEXTURE_LIGHTING_MODE_HP       0x8167\n#define GL_TEXTURE_POST_SPECULAR_HP       0x8168\n#define GL_TEXTURE_PRE_SPECULAR_HP        0x8169\n#endif\n\n#ifndef GL_EXT_draw_range_elements\n#define GL_MAX_ELEMENTS_VERTICES_EXT      0x80E8\n#define GL_MAX_ELEMENTS_INDICES_EXT       0x80E9\n#endif\n\n#ifndef GL_WIN_phong_shading\n#define GL_PHONG_WIN                      0x80EA\n#define GL_PHONG_HINT_WIN                 0x80EB\n#endif\n\n#ifndef GL_WIN_specular_fog\n#define GL_FOG_SPECULAR_TEXTURE_WIN       0x80EC\n#endif\n\n#ifndef GL_EXT_light_texture\n#define GL_FRAGMENT_MATERIAL_EXT          0x8349\n#define GL_FRAGMENT_NORMAL_EXT            0x834A\n#define GL_FRAGMENT_COLOR_EXT             0x834C\n#define GL_ATTENUATION_EXT                0x834D\n#define GL_SHADOW_ATTENUATION_EXT         0x834E\n#define GL_TEXTURE_APPLICATION_MODE_EXT   0x834F\n#define GL_TEXTURE_LIGHT_EXT              0x8350\n#define GL_TEXTURE_MATERIAL_FACE_EXT      0x8351\n#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352\n/* reuse GL_FRAGMENT_DEPTH_EXT */\n#endif\n\n#ifndef GL_SGIX_blend_alpha_minmax\n#define GL_ALPHA_MIN_SGIX                 0x8320\n#define GL_ALPHA_MAX_SGIX                 0x8321\n#endif\n\n#ifndef GL_SGIX_impact_pixel_texture\n#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX   0x8184\n#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX     0x8185\n#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX     0x8186\n#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187\n#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188\n#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX    0x8189\n#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX    0x818A\n#endif\n\n#ifndef GL_EXT_bgra\n#define GL_BGR_EXT                        0x80E0\n#define GL_BGRA_EXT                       0x80E1\n#endif\n\n#ifndef GL_SGIX_async\n#define GL_ASYNC_MARKER_SGIX              0x8329\n#endif\n\n#ifndef GL_SGIX_async_pixel\n#define GL_ASYNC_TEX_IMAGE_SGIX           0x835C\n#define GL_ASYNC_DRAW_PIXELS_SGIX         0x835D\n#define GL_ASYNC_READ_PIXELS_SGIX         0x835E\n#define GL_MAX_ASYNC_TEX_IMAGE_SGIX       0x835F\n#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX     0x8360\n#define GL_MAX_ASYNC_READ_PIXELS_SGIX     0x8361\n#endif\n\n#ifndef GL_SGIX_async_histogram\n#define GL_ASYNC_HISTOGRAM_SGIX           0x832C\n#define GL_MAX_ASYNC_HISTOGRAM_SGIX       0x832D\n#endif\n\n#ifndef GL_INTEL_texture_scissor\n#endif\n\n#ifndef GL_INTEL_parallel_arrays\n#define GL_PARALLEL_ARRAYS_INTEL          0x83F4\n#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5\n#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6\n#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7\n#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8\n#endif\n\n#ifndef GL_HP_occlusion_test\n#define GL_OCCLUSION_TEST_HP              0x8165\n#define GL_OCCLUSION_TEST_RESULT_HP       0x8166\n#endif\n\n#ifndef GL_EXT_pixel_transform\n#define GL_PIXEL_TRANSFORM_2D_EXT         0x8330\n#define GL_PIXEL_MAG_FILTER_EXT           0x8331\n#define GL_PIXEL_MIN_FILTER_EXT           0x8332\n#define GL_PIXEL_CUBIC_WEIGHT_EXT         0x8333\n#define GL_CUBIC_EXT                      0x8334\n#define GL_AVERAGE_EXT                    0x8335\n#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336\n#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337\n#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT  0x8338\n#endif\n\n#ifndef GL_EXT_pixel_transform_color_table\n#endif\n\n#ifndef GL_EXT_shared_texture_palette\n#define GL_SHARED_TEXTURE_PALETTE_EXT     0x81FB\n#endif\n\n#ifndef GL_EXT_separate_specular_color\n#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT  0x81F8\n#define GL_SINGLE_COLOR_EXT               0x81F9\n#define GL_SEPARATE_SPECULAR_COLOR_EXT    0x81FA\n#endif\n\n#ifndef GL_EXT_secondary_color\n#define GL_COLOR_SUM_EXT                  0x8458\n#define GL_CURRENT_SECONDARY_COLOR_EXT    0x8459\n#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A\n#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B\n#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C\n#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D\n#define GL_SECONDARY_COLOR_ARRAY_EXT      0x845E\n#endif\n\n#ifndef GL_EXT_texture_perturb_normal\n#define GL_PERTURB_EXT                    0x85AE\n#define GL_TEXTURE_NORMAL_EXT             0x85AF\n#endif\n\n#ifndef GL_EXT_multi_draw_arrays\n#endif\n\n#ifndef GL_EXT_fog_coord\n#define GL_FOG_COORDINATE_SOURCE_EXT      0x8450\n#define GL_FOG_COORDINATE_EXT             0x8451\n#define GL_FRAGMENT_DEPTH_EXT             0x8452\n#define GL_CURRENT_FOG_COORDINATE_EXT     0x8453\n#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT  0x8454\n#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455\n#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456\n#define GL_FOG_COORDINATE_ARRAY_EXT       0x8457\n#endif\n\n#ifndef GL_REND_screen_coordinates\n#define GL_SCREEN_COORDINATES_REND        0x8490\n#define GL_INVERTED_SCREEN_W_REND         0x8491\n#endif\n\n#ifndef GL_EXT_coordinate_frame\n#define GL_TANGENT_ARRAY_EXT              0x8439\n#define GL_BINORMAL_ARRAY_EXT             0x843A\n#define GL_CURRENT_TANGENT_EXT            0x843B\n#define GL_CURRENT_BINORMAL_EXT           0x843C\n#define GL_TANGENT_ARRAY_TYPE_EXT         0x843E\n#define GL_TANGENT_ARRAY_STRIDE_EXT       0x843F\n#define GL_BINORMAL_ARRAY_TYPE_EXT        0x8440\n#define GL_BINORMAL_ARRAY_STRIDE_EXT      0x8441\n#define GL_TANGENT_ARRAY_POINTER_EXT      0x8442\n#define GL_BINORMAL_ARRAY_POINTER_EXT     0x8443\n#define GL_MAP1_TANGENT_EXT               0x8444\n#define GL_MAP2_TANGENT_EXT               0x8445\n#define GL_MAP1_BINORMAL_EXT              0x8446\n#define GL_MAP2_BINORMAL_EXT              0x8447\n#endif\n\n#ifndef GL_EXT_texture_env_combine\n#define GL_COMBINE_EXT                    0x8570\n#define GL_COMBINE_RGB_EXT                0x8571\n#define GL_COMBINE_ALPHA_EXT              0x8572\n#define GL_RGB_SCALE_EXT                  0x8573\n#define GL_ADD_SIGNED_EXT                 0x8574\n#define GL_INTERPOLATE_EXT                0x8575\n#define GL_CONSTANT_EXT                   0x8576\n#define GL_PRIMARY_COLOR_EXT              0x8577\n#define GL_PREVIOUS_EXT                   0x8578\n#define GL_SOURCE0_RGB_EXT                0x8580\n#define GL_SOURCE1_RGB_EXT                0x8581\n#define GL_SOURCE2_RGB_EXT                0x8582\n#define GL_SOURCE0_ALPHA_EXT              0x8588\n#define GL_SOURCE1_ALPHA_EXT              0x8589\n#define GL_SOURCE2_ALPHA_EXT              0x858A\n#define GL_OPERAND0_RGB_EXT               0x8590\n#define GL_OPERAND1_RGB_EXT               0x8591\n#define GL_OPERAND2_RGB_EXT               0x8592\n#define GL_OPERAND0_ALPHA_EXT             0x8598\n#define GL_OPERAND1_ALPHA_EXT             0x8599\n#define GL_OPERAND2_ALPHA_EXT             0x859A\n#endif\n\n#ifndef GL_APPLE_specular_vector\n#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0\n#endif\n\n#ifndef GL_APPLE_transform_hint\n#define GL_TRANSFORM_HINT_APPLE           0x85B1\n#endif\n\n#ifndef GL_SGIX_fog_scale\n#define GL_FOG_SCALE_SGIX                 0x81FC\n#define GL_FOG_SCALE_VALUE_SGIX           0x81FD\n#endif\n\n#ifndef GL_SUNX_constant_data\n#define GL_UNPACK_CONSTANT_DATA_SUNX      0x81D5\n#define GL_TEXTURE_CONSTANT_DATA_SUNX     0x81D6\n#endif\n\n#ifndef GL_SUN_global_alpha\n#define GL_GLOBAL_ALPHA_SUN               0x81D9\n#define GL_GLOBAL_ALPHA_FACTOR_SUN        0x81DA\n#endif\n\n#ifndef GL_SUN_triangle_list\n#define GL_RESTART_SUN                    0x0001\n#define GL_REPLACE_MIDDLE_SUN             0x0002\n#define GL_REPLACE_OLDEST_SUN             0x0003\n#define GL_TRIANGLE_LIST_SUN              0x81D7\n#define GL_REPLACEMENT_CODE_SUN           0x81D8\n#define GL_REPLACEMENT_CODE_ARRAY_SUN     0x85C0\n#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1\n#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2\n#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3\n#define GL_R1UI_V3F_SUN                   0x85C4\n#define GL_R1UI_C4UB_V3F_SUN              0x85C5\n#define GL_R1UI_C3F_V3F_SUN               0x85C6\n#define GL_R1UI_N3F_V3F_SUN               0x85C7\n#define GL_R1UI_C4F_N3F_V3F_SUN           0x85C8\n#define GL_R1UI_T2F_V3F_SUN               0x85C9\n#define GL_R1UI_T2F_N3F_V3F_SUN           0x85CA\n#define GL_R1UI_T2F_C4F_N3F_V3F_SUN       0x85CB\n#endif\n\n#ifndef GL_SUN_vertex\n#endif\n\n#ifndef GL_EXT_blend_func_separate\n#define GL_BLEND_DST_RGB_EXT              0x80C8\n#define GL_BLEND_SRC_RGB_EXT              0x80C9\n#define GL_BLEND_DST_ALPHA_EXT            0x80CA\n#define GL_BLEND_SRC_ALPHA_EXT            0x80CB\n#endif\n\n#ifndef GL_INGR_color_clamp\n#define GL_RED_MIN_CLAMP_INGR             0x8560\n#define GL_GREEN_MIN_CLAMP_INGR           0x8561\n#define GL_BLUE_MIN_CLAMP_INGR            0x8562\n#define GL_ALPHA_MIN_CLAMP_INGR           0x8563\n#define GL_RED_MAX_CLAMP_INGR             0x8564\n#define GL_GREEN_MAX_CLAMP_INGR           0x8565\n#define GL_BLUE_MAX_CLAMP_INGR            0x8566\n#define GL_ALPHA_MAX_CLAMP_INGR           0x8567\n#endif\n\n#ifndef GL_INGR_interlace_read\n#define GL_INTERLACE_READ_INGR            0x8568\n#endif\n\n#ifndef GL_EXT_stencil_wrap\n#define GL_INCR_WRAP_EXT                  0x8507\n#define GL_DECR_WRAP_EXT                  0x8508\n#endif\n\n#ifndef GL_EXT_422_pixels\n#define GL_422_EXT                        0x80CC\n#define GL_422_REV_EXT                    0x80CD\n#define GL_422_AVERAGE_EXT                0x80CE\n#define GL_422_REV_AVERAGE_EXT            0x80CF\n#endif\n\n#ifndef GL_NV_texgen_reflection\n#define GL_NORMAL_MAP_NV                  0x8511\n#define GL_REFLECTION_MAP_NV              0x8512\n#endif\n\n#ifndef GL_EXT_texture_cube_map\n#define GL_NORMAL_MAP_EXT                 0x8511\n#define GL_REFLECTION_MAP_EXT             0x8512\n#define GL_TEXTURE_CUBE_MAP_EXT           0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP_EXT   0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP_EXT     0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT  0x851C\n#endif\n\n#ifndef GL_SUN_convolution_border_modes\n#define GL_WRAP_BORDER_SUN                0x81D4\n#endif\n\n#ifndef GL_EXT_texture_env_add\n#endif\n\n#ifndef GL_EXT_texture_lod_bias\n#define GL_MAX_TEXTURE_LOD_BIAS_EXT       0x84FD\n#define GL_TEXTURE_FILTER_CONTROL_EXT     0x8500\n#define GL_TEXTURE_LOD_BIAS_EXT           0x8501\n#endif\n\n#ifndef GL_EXT_texture_filter_anisotropic\n#define GL_TEXTURE_MAX_ANISOTROPY_EXT     0x84FE\n#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF\n#endif\n\n#ifndef GL_EXT_vertex_weighting\n#define GL_MODELVIEW0_STACK_DEPTH_EXT     GL_MODELVIEW_STACK_DEPTH\n#define GL_MODELVIEW1_STACK_DEPTH_EXT     0x8502\n#define GL_MODELVIEW0_MATRIX_EXT          GL_MODELVIEW_MATRIX\n#define GL_MODELVIEW1_MATRIX_EXT          0x8506\n#define GL_VERTEX_WEIGHTING_EXT           0x8509\n#define GL_MODELVIEW0_EXT                 GL_MODELVIEW\n#define GL_MODELVIEW1_EXT                 0x850A\n#define GL_CURRENT_VERTEX_WEIGHT_EXT      0x850B\n#define GL_VERTEX_WEIGHT_ARRAY_EXT        0x850C\n#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT   0x850D\n#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT   0x850E\n#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F\n#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510\n#endif\n\n#ifndef GL_NV_light_max_exponent\n#define GL_MAX_SHININESS_NV               0x8504\n#define GL_MAX_SPOT_EXPONENT_NV           0x8505\n#endif\n\n#ifndef GL_NV_vertex_array_range\n#define GL_VERTEX_ARRAY_RANGE_NV          0x851D\n#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV   0x851E\n#define GL_VERTEX_ARRAY_RANGE_VALID_NV    0x851F\n#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520\n#define GL_VERTEX_ARRAY_RANGE_POINTER_NV  0x8521\n#endif\n\n#ifndef GL_NV_register_combiners\n#define GL_REGISTER_COMBINERS_NV          0x8522\n#define GL_VARIABLE_A_NV                  0x8523\n#define GL_VARIABLE_B_NV                  0x8524\n#define GL_VARIABLE_C_NV                  0x8525\n#define GL_VARIABLE_D_NV                  0x8526\n#define GL_VARIABLE_E_NV                  0x8527\n#define GL_VARIABLE_F_NV                  0x8528\n#define GL_VARIABLE_G_NV                  0x8529\n#define GL_CONSTANT_COLOR0_NV             0x852A\n#define GL_CONSTANT_COLOR1_NV             0x852B\n#define GL_PRIMARY_COLOR_NV               0x852C\n#define GL_SECONDARY_COLOR_NV             0x852D\n#define GL_SPARE0_NV                      0x852E\n#define GL_SPARE1_NV                      0x852F\n#define GL_DISCARD_NV                     0x8530\n#define GL_E_TIMES_F_NV                   0x8531\n#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532\n#define GL_UNSIGNED_IDENTITY_NV           0x8536\n#define GL_UNSIGNED_INVERT_NV             0x8537\n#define GL_EXPAND_NORMAL_NV               0x8538\n#define GL_EXPAND_NEGATE_NV               0x8539\n#define GL_HALF_BIAS_NORMAL_NV            0x853A\n#define GL_HALF_BIAS_NEGATE_NV            0x853B\n#define GL_SIGNED_IDENTITY_NV             0x853C\n#define GL_SIGNED_NEGATE_NV               0x853D\n#define GL_SCALE_BY_TWO_NV                0x853E\n#define GL_SCALE_BY_FOUR_NV               0x853F\n#define GL_SCALE_BY_ONE_HALF_NV           0x8540\n#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV   0x8541\n#define GL_COMBINER_INPUT_NV              0x8542\n#define GL_COMBINER_MAPPING_NV            0x8543\n#define GL_COMBINER_COMPONENT_USAGE_NV    0x8544\n#define GL_COMBINER_AB_DOT_PRODUCT_NV     0x8545\n#define GL_COMBINER_CD_DOT_PRODUCT_NV     0x8546\n#define GL_COMBINER_MUX_SUM_NV            0x8547\n#define GL_COMBINER_SCALE_NV              0x8548\n#define GL_COMBINER_BIAS_NV               0x8549\n#define GL_COMBINER_AB_OUTPUT_NV          0x854A\n#define GL_COMBINER_CD_OUTPUT_NV          0x854B\n#define GL_COMBINER_SUM_OUTPUT_NV         0x854C\n#define GL_MAX_GENERAL_COMBINERS_NV       0x854D\n#define GL_NUM_GENERAL_COMBINERS_NV       0x854E\n#define GL_COLOR_SUM_CLAMP_NV             0x854F\n#define GL_COMBINER0_NV                   0x8550\n#define GL_COMBINER1_NV                   0x8551\n#define GL_COMBINER2_NV                   0x8552\n#define GL_COMBINER3_NV                   0x8553\n#define GL_COMBINER4_NV                   0x8554\n#define GL_COMBINER5_NV                   0x8555\n#define GL_COMBINER6_NV                   0x8556\n#define GL_COMBINER7_NV                   0x8557\n/* reuse GL_TEXTURE0_ARB */\n/* reuse GL_TEXTURE1_ARB */\n/* reuse GL_ZERO */\n/* reuse GL_NONE */\n/* reuse GL_FOG */\n#endif\n\n#ifndef GL_NV_fog_distance\n#define GL_FOG_DISTANCE_MODE_NV           0x855A\n#define GL_EYE_RADIAL_NV                  0x855B\n#define GL_EYE_PLANE_ABSOLUTE_NV          0x855C\n/* reuse GL_EYE_PLANE */\n#endif\n\n#ifndef GL_NV_texgen_emboss\n#define GL_EMBOSS_LIGHT_NV                0x855D\n#define GL_EMBOSS_CONSTANT_NV             0x855E\n#define GL_EMBOSS_MAP_NV                  0x855F\n#endif\n\n#ifndef GL_NV_blend_square\n#endif\n\n#ifndef GL_NV_texture_env_combine4\n#define GL_COMBINE4_NV                    0x8503\n#define GL_SOURCE3_RGB_NV                 0x8583\n#define GL_SOURCE3_ALPHA_NV               0x858B\n#define GL_OPERAND3_RGB_NV                0x8593\n#define GL_OPERAND3_ALPHA_NV              0x859B\n#endif\n\n#ifndef GL_MESA_resize_buffers\n#endif\n\n#ifndef GL_MESA_window_pos\n#endif\n\n#ifndef GL_EXT_texture_compression_s3tc\n#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT   0x83F0\n#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT  0x83F1\n#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT  0x83F2\n#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT  0x83F3\n#endif\n\n#ifndef GL_IBM_cull_vertex\n#define GL_CULL_VERTEX_IBM                103050\n#endif\n\n#ifndef GL_IBM_multimode_draw_arrays\n#endif\n\n#ifndef GL_IBM_vertex_array_lists\n#define GL_VERTEX_ARRAY_LIST_IBM          103070\n#define GL_NORMAL_ARRAY_LIST_IBM          103071\n#define GL_COLOR_ARRAY_LIST_IBM           103072\n#define GL_INDEX_ARRAY_LIST_IBM           103073\n#define GL_TEXTURE_COORD_ARRAY_LIST_IBM   103074\n#define GL_EDGE_FLAG_ARRAY_LIST_IBM       103075\n#define GL_FOG_COORDINATE_ARRAY_LIST_IBM  103076\n#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077\n#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM   103080\n#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM   103081\n#define GL_COLOR_ARRAY_LIST_STRIDE_IBM    103082\n#define GL_INDEX_ARRAY_LIST_STRIDE_IBM    103083\n#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084\n#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085\n#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086\n#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087\n#endif\n\n#ifndef GL_SGIX_subsample\n#define GL_PACK_SUBSAMPLE_RATE_SGIX       0x85A0\n#define GL_UNPACK_SUBSAMPLE_RATE_SGIX     0x85A1\n#define GL_PIXEL_SUBSAMPLE_4444_SGIX      0x85A2\n#define GL_PIXEL_SUBSAMPLE_2424_SGIX      0x85A3\n#define GL_PIXEL_SUBSAMPLE_4242_SGIX      0x85A4\n#endif\n\n#ifndef GL_SGIX_ycrcb_subsample\n#endif\n\n#ifndef GL_SGIX_ycrcba\n#define GL_YCRCB_SGIX                     0x8318\n#define GL_YCRCBA_SGIX                    0x8319\n#endif\n\n#ifndef GL_SGI_depth_pass_instrument\n#define GL_DEPTH_PASS_INSTRUMENT_SGIX     0x8310\n#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311\n#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312\n#endif\n\n#ifndef GL_3DFX_texture_compression_FXT1\n#define GL_COMPRESSED_RGB_FXT1_3DFX       0x86B0\n#define GL_COMPRESSED_RGBA_FXT1_3DFX      0x86B1\n#endif\n\n#ifndef GL_3DFX_multisample\n#define GL_MULTISAMPLE_3DFX               0x86B2\n#define GL_SAMPLE_BUFFERS_3DFX            0x86B3\n#define GL_SAMPLES_3DFX                   0x86B4\n#define GL_MULTISAMPLE_BIT_3DFX           0x20000000\n#endif\n\n#ifndef GL_3DFX_tbuffer\n#endif\n\n#ifndef GL_EXT_multisample\n#define GL_MULTISAMPLE_EXT                0x809D\n#define GL_SAMPLE_ALPHA_TO_MASK_EXT       0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE_EXT        0x809F\n#define GL_SAMPLE_MASK_EXT                0x80A0\n#define GL_1PASS_EXT                      0x80A1\n#define GL_2PASS_0_EXT                    0x80A2\n#define GL_2PASS_1_EXT                    0x80A3\n#define GL_4PASS_0_EXT                    0x80A4\n#define GL_4PASS_1_EXT                    0x80A5\n#define GL_4PASS_2_EXT                    0x80A6\n#define GL_4PASS_3_EXT                    0x80A7\n#define GL_SAMPLE_BUFFERS_EXT             0x80A8\n#define GL_SAMPLES_EXT                    0x80A9\n#define GL_SAMPLE_MASK_VALUE_EXT          0x80AA\n#define GL_SAMPLE_MASK_INVERT_EXT         0x80AB\n#define GL_SAMPLE_PATTERN_EXT             0x80AC\n#define GL_MULTISAMPLE_BIT_EXT            0x20000000\n#endif\n\n#ifndef GL_SGIX_vertex_preclip\n#define GL_VERTEX_PRECLIP_SGIX            0x83EE\n#define GL_VERTEX_PRECLIP_HINT_SGIX       0x83EF\n#endif\n\n#ifndef GL_SGIX_convolution_accuracy\n#define GL_CONVOLUTION_HINT_SGIX          0x8316\n#endif\n\n#ifndef GL_SGIX_resample\n#define GL_PACK_RESAMPLE_SGIX             0x842C\n#define GL_UNPACK_RESAMPLE_SGIX           0x842D\n#define GL_RESAMPLE_REPLICATE_SGIX        0x842E\n#define GL_RESAMPLE_ZERO_FILL_SGIX        0x842F\n#define GL_RESAMPLE_DECIMATE_SGIX         0x8430\n#endif\n\n#ifndef GL_SGIS_point_line_texgen\n#define GL_EYE_DISTANCE_TO_POINT_SGIS     0x81F0\n#define GL_OBJECT_DISTANCE_TO_POINT_SGIS  0x81F1\n#define GL_EYE_DISTANCE_TO_LINE_SGIS      0x81F2\n#define GL_OBJECT_DISTANCE_TO_LINE_SGIS   0x81F3\n#define GL_EYE_POINT_SGIS                 0x81F4\n#define GL_OBJECT_POINT_SGIS              0x81F5\n#define GL_EYE_LINE_SGIS                  0x81F6\n#define GL_OBJECT_LINE_SGIS               0x81F7\n#endif\n\n#ifndef GL_SGIS_texture_color_mask\n#define GL_TEXTURE_COLOR_WRITEMASK_SGIS   0x81EF\n#endif\n\n#ifndef GL_EXT_texture_env_dot3\n#define GL_DOT3_RGB_EXT                   0x8740\n#define GL_DOT3_RGBA_EXT                  0x8741\n#endif\n\n#ifndef GL_ATI_texture_mirror_once\n#define GL_MIRROR_CLAMP_ATI               0x8742\n#define GL_MIRROR_CLAMP_TO_EDGE_ATI       0x8743\n#endif\n\n#ifndef GL_NV_fence\n#define GL_ALL_COMPLETED_NV               0x84F2\n#define GL_FENCE_STATUS_NV                0x84F3\n#define GL_FENCE_CONDITION_NV             0x84F4\n#endif\n\n#ifndef GL_IBM_texture_mirrored_repeat\n#define GL_MIRRORED_REPEAT_IBM            0x8370\n#endif\n\n#ifndef GL_NV_evaluators\n#define GL_EVAL_2D_NV                     0x86C0\n#define GL_EVAL_TRIANGULAR_2D_NV          0x86C1\n#define GL_MAP_TESSELLATION_NV            0x86C2\n#define GL_MAP_ATTRIB_U_ORDER_NV          0x86C3\n#define GL_MAP_ATTRIB_V_ORDER_NV          0x86C4\n#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5\n#define GL_EVAL_VERTEX_ATTRIB0_NV         0x86C6\n#define GL_EVAL_VERTEX_ATTRIB1_NV         0x86C7\n#define GL_EVAL_VERTEX_ATTRIB2_NV         0x86C8\n#define GL_EVAL_VERTEX_ATTRIB3_NV         0x86C9\n#define GL_EVAL_VERTEX_ATTRIB4_NV         0x86CA\n#define GL_EVAL_VERTEX_ATTRIB5_NV         0x86CB\n#define GL_EVAL_VERTEX_ATTRIB6_NV         0x86CC\n#define GL_EVAL_VERTEX_ATTRIB7_NV         0x86CD\n#define GL_EVAL_VERTEX_ATTRIB8_NV         0x86CE\n#define GL_EVAL_VERTEX_ATTRIB9_NV         0x86CF\n#define GL_EVAL_VERTEX_ATTRIB10_NV        0x86D0\n#define GL_EVAL_VERTEX_ATTRIB11_NV        0x86D1\n#define GL_EVAL_VERTEX_ATTRIB12_NV        0x86D2\n#define GL_EVAL_VERTEX_ATTRIB13_NV        0x86D3\n#define GL_EVAL_VERTEX_ATTRIB14_NV        0x86D4\n#define GL_EVAL_VERTEX_ATTRIB15_NV        0x86D5\n#define GL_MAX_MAP_TESSELLATION_NV        0x86D6\n#define GL_MAX_RATIONAL_EVAL_ORDER_NV     0x86D7\n#endif\n\n#ifndef GL_NV_packed_depth_stencil\n#define GL_DEPTH_STENCIL_NV               0x84F9\n#define GL_UNSIGNED_INT_24_8_NV           0x84FA\n#endif\n\n#ifndef GL_NV_register_combiners2\n#define GL_PER_STAGE_CONSTANTS_NV         0x8535\n#endif\n\n#ifndef GL_NV_texture_compression_vtc\n#endif\n\n#ifndef GL_NV_texture_rectangle\n#define GL_TEXTURE_RECTANGLE_NV           0x84F5\n#define GL_TEXTURE_BINDING_RECTANGLE_NV   0x84F6\n#define GL_PROXY_TEXTURE_RECTANGLE_NV     0x84F7\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV  0x84F8\n#endif\n\n#ifndef GL_NV_texture_shader\n#define GL_OFFSET_TEXTURE_RECTANGLE_NV    0x864C\n#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D\n#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E\n#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9\n#define GL_UNSIGNED_INT_S8_S8_8_8_NV      0x86DA\n#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV  0x86DB\n#define GL_DSDT_MAG_INTENSITY_NV          0x86DC\n#define GL_SHADER_CONSISTENT_NV           0x86DD\n#define GL_TEXTURE_SHADER_NV              0x86DE\n#define GL_SHADER_OPERATION_NV            0x86DF\n#define GL_CULL_MODES_NV                  0x86E0\n#define GL_OFFSET_TEXTURE_MATRIX_NV       0x86E1\n#define GL_OFFSET_TEXTURE_SCALE_NV        0x86E2\n#define GL_OFFSET_TEXTURE_BIAS_NV         0x86E3\n#define GL_OFFSET_TEXTURE_2D_MATRIX_NV    GL_OFFSET_TEXTURE_MATRIX_NV\n#define GL_OFFSET_TEXTURE_2D_SCALE_NV     GL_OFFSET_TEXTURE_SCALE_NV\n#define GL_OFFSET_TEXTURE_2D_BIAS_NV      GL_OFFSET_TEXTURE_BIAS_NV\n#define GL_PREVIOUS_TEXTURE_INPUT_NV      0x86E4\n#define GL_CONST_EYE_NV                   0x86E5\n#define GL_PASS_THROUGH_NV                0x86E6\n#define GL_CULL_FRAGMENT_NV               0x86E7\n#define GL_OFFSET_TEXTURE_2D_NV           0x86E8\n#define GL_DEPENDENT_AR_TEXTURE_2D_NV     0x86E9\n#define GL_DEPENDENT_GB_TEXTURE_2D_NV     0x86EA\n#define GL_DOT_PRODUCT_NV                 0x86EC\n#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV   0x86ED\n#define GL_DOT_PRODUCT_TEXTURE_2D_NV      0x86EE\n#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0\n#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1\n#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2\n#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3\n#define GL_HILO_NV                        0x86F4\n#define GL_DSDT_NV                        0x86F5\n#define GL_DSDT_MAG_NV                    0x86F6\n#define GL_DSDT_MAG_VIB_NV                0x86F7\n#define GL_HILO16_NV                      0x86F8\n#define GL_SIGNED_HILO_NV                 0x86F9\n#define GL_SIGNED_HILO16_NV               0x86FA\n#define GL_SIGNED_RGBA_NV                 0x86FB\n#define GL_SIGNED_RGBA8_NV                0x86FC\n#define GL_SIGNED_RGB_NV                  0x86FE\n#define GL_SIGNED_RGB8_NV                 0x86FF\n#define GL_SIGNED_LUMINANCE_NV            0x8701\n#define GL_SIGNED_LUMINANCE8_NV           0x8702\n#define GL_SIGNED_LUMINANCE_ALPHA_NV      0x8703\n#define GL_SIGNED_LUMINANCE8_ALPHA8_NV    0x8704\n#define GL_SIGNED_ALPHA_NV                0x8705\n#define GL_SIGNED_ALPHA8_NV               0x8706\n#define GL_SIGNED_INTENSITY_NV            0x8707\n#define GL_SIGNED_INTENSITY8_NV           0x8708\n#define GL_DSDT8_NV                       0x8709\n#define GL_DSDT8_MAG8_NV                  0x870A\n#define GL_DSDT8_MAG8_INTENSITY8_NV       0x870B\n#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV   0x870C\n#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D\n#define GL_HI_SCALE_NV                    0x870E\n#define GL_LO_SCALE_NV                    0x870F\n#define GL_DS_SCALE_NV                    0x8710\n#define GL_DT_SCALE_NV                    0x8711\n#define GL_MAGNITUDE_SCALE_NV             0x8712\n#define GL_VIBRANCE_SCALE_NV              0x8713\n#define GL_HI_BIAS_NV                     0x8714\n#define GL_LO_BIAS_NV                     0x8715\n#define GL_DS_BIAS_NV                     0x8716\n#define GL_DT_BIAS_NV                     0x8717\n#define GL_MAGNITUDE_BIAS_NV              0x8718\n#define GL_VIBRANCE_BIAS_NV               0x8719\n#define GL_TEXTURE_BORDER_VALUES_NV       0x871A\n#define GL_TEXTURE_HI_SIZE_NV             0x871B\n#define GL_TEXTURE_LO_SIZE_NV             0x871C\n#define GL_TEXTURE_DS_SIZE_NV             0x871D\n#define GL_TEXTURE_DT_SIZE_NV             0x871E\n#define GL_TEXTURE_MAG_SIZE_NV            0x871F\n#endif\n\n#ifndef GL_NV_texture_shader2\n#define GL_DOT_PRODUCT_TEXTURE_3D_NV      0x86EF\n#endif\n\n#ifndef GL_NV_vertex_array_range2\n#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533\n#endif\n\n#ifndef GL_NV_vertex_program\n#define GL_VERTEX_PROGRAM_NV              0x8620\n#define GL_VERTEX_STATE_PROGRAM_NV        0x8621\n#define GL_ATTRIB_ARRAY_SIZE_NV           0x8623\n#define GL_ATTRIB_ARRAY_STRIDE_NV         0x8624\n#define GL_ATTRIB_ARRAY_TYPE_NV           0x8625\n#define GL_CURRENT_ATTRIB_NV              0x8626\n#define GL_PROGRAM_LENGTH_NV              0x8627\n#define GL_PROGRAM_STRING_NV              0x8628\n#define GL_MODELVIEW_PROJECTION_NV        0x8629\n#define GL_IDENTITY_NV                    0x862A\n#define GL_INVERSE_NV                     0x862B\n#define GL_TRANSPOSE_NV                   0x862C\n#define GL_INVERSE_TRANSPOSE_NV           0x862D\n#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E\n#define GL_MAX_TRACK_MATRICES_NV          0x862F\n#define GL_MATRIX0_NV                     0x8630\n#define GL_MATRIX1_NV                     0x8631\n#define GL_MATRIX2_NV                     0x8632\n#define GL_MATRIX3_NV                     0x8633\n#define GL_MATRIX4_NV                     0x8634\n#define GL_MATRIX5_NV                     0x8635\n#define GL_MATRIX6_NV                     0x8636\n#define GL_MATRIX7_NV                     0x8637\n#define GL_CURRENT_MATRIX_STACK_DEPTH_NV  0x8640\n#define GL_CURRENT_MATRIX_NV              0x8641\n#define GL_VERTEX_PROGRAM_POINT_SIZE_NV   0x8642\n#define GL_VERTEX_PROGRAM_TWO_SIDE_NV     0x8643\n#define GL_PROGRAM_PARAMETER_NV           0x8644\n#define GL_ATTRIB_ARRAY_POINTER_NV        0x8645\n#define GL_PROGRAM_TARGET_NV              0x8646\n#define GL_PROGRAM_RESIDENT_NV            0x8647\n#define GL_TRACK_MATRIX_NV                0x8648\n#define GL_TRACK_MATRIX_TRANSFORM_NV      0x8649\n#define GL_VERTEX_PROGRAM_BINDING_NV      0x864A\n#define GL_PROGRAM_ERROR_POSITION_NV      0x864B\n#define GL_VERTEX_ATTRIB_ARRAY0_NV        0x8650\n#define GL_VERTEX_ATTRIB_ARRAY1_NV        0x8651\n#define GL_VERTEX_ATTRIB_ARRAY2_NV        0x8652\n#define GL_VERTEX_ATTRIB_ARRAY3_NV        0x8653\n#define GL_VERTEX_ATTRIB_ARRAY4_NV        0x8654\n#define GL_VERTEX_ATTRIB_ARRAY5_NV        0x8655\n#define GL_VERTEX_ATTRIB_ARRAY6_NV        0x8656\n#define GL_VERTEX_ATTRIB_ARRAY7_NV        0x8657\n#define GL_VERTEX_ATTRIB_ARRAY8_NV        0x8658\n#define GL_VERTEX_ATTRIB_ARRAY9_NV        0x8659\n#define GL_VERTEX_ATTRIB_ARRAY10_NV       0x865A\n#define GL_VERTEX_ATTRIB_ARRAY11_NV       0x865B\n#define GL_VERTEX_ATTRIB_ARRAY12_NV       0x865C\n#define GL_VERTEX_ATTRIB_ARRAY13_NV       0x865D\n#define GL_VERTEX_ATTRIB_ARRAY14_NV       0x865E\n#define GL_VERTEX_ATTRIB_ARRAY15_NV       0x865F\n#define GL_MAP1_VERTEX_ATTRIB0_4_NV       0x8660\n#define GL_MAP1_VERTEX_ATTRIB1_4_NV       0x8661\n#define GL_MAP1_VERTEX_ATTRIB2_4_NV       0x8662\n#define GL_MAP1_VERTEX_ATTRIB3_4_NV       0x8663\n#define GL_MAP1_VERTEX_ATTRIB4_4_NV       0x8664\n#define GL_MAP1_VERTEX_ATTRIB5_4_NV       0x8665\n#define GL_MAP1_VERTEX_ATTRIB6_4_NV       0x8666\n#define GL_MAP1_VERTEX_ATTRIB7_4_NV       0x8667\n#define GL_MAP1_VERTEX_ATTRIB8_4_NV       0x8668\n#define GL_MAP1_VERTEX_ATTRIB9_4_NV       0x8669\n#define GL_MAP1_VERTEX_ATTRIB10_4_NV      0x866A\n#define GL_MAP1_VERTEX_ATTRIB11_4_NV      0x866B\n#define GL_MAP1_VERTEX_ATTRIB12_4_NV      0x866C\n#define GL_MAP1_VERTEX_ATTRIB13_4_NV      0x866D\n#define GL_MAP1_VERTEX_ATTRIB14_4_NV      0x866E\n#define GL_MAP1_VERTEX_ATTRIB15_4_NV      0x866F\n#define GL_MAP2_VERTEX_ATTRIB0_4_NV       0x8670\n#define GL_MAP2_VERTEX_ATTRIB1_4_NV       0x8671\n#define GL_MAP2_VERTEX_ATTRIB2_4_NV       0x8672\n#define GL_MAP2_VERTEX_ATTRIB3_4_NV       0x8673\n#define GL_MAP2_VERTEX_ATTRIB4_4_NV       0x8674\n#define GL_MAP2_VERTEX_ATTRIB5_4_NV       0x8675\n#define GL_MAP2_VERTEX_ATTRIB6_4_NV       0x8676\n#define GL_MAP2_VERTEX_ATTRIB7_4_NV       0x8677\n#define GL_MAP2_VERTEX_ATTRIB8_4_NV       0x8678\n#define GL_MAP2_VERTEX_ATTRIB9_4_NV       0x8679\n#define GL_MAP2_VERTEX_ATTRIB10_4_NV      0x867A\n#define GL_MAP2_VERTEX_ATTRIB11_4_NV      0x867B\n#define GL_MAP2_VERTEX_ATTRIB12_4_NV      0x867C\n#define GL_MAP2_VERTEX_ATTRIB13_4_NV      0x867D\n#define GL_MAP2_VERTEX_ATTRIB14_4_NV      0x867E\n#define GL_MAP2_VERTEX_ATTRIB15_4_NV      0x867F\n#endif\n\n#ifndef GL_SGIX_texture_coordinate_clamp\n#define GL_TEXTURE_MAX_CLAMP_S_SGIX       0x8369\n#define GL_TEXTURE_MAX_CLAMP_T_SGIX       0x836A\n#define GL_TEXTURE_MAX_CLAMP_R_SGIX       0x836B\n#endif\n\n#ifndef GL_SGIX_scalebias_hint\n#define GL_SCALEBIAS_HINT_SGIX            0x8322\n#endif\n\n#ifndef GL_OML_interlace\n#define GL_INTERLACE_OML                  0x8980\n#define GL_INTERLACE_READ_OML             0x8981\n#endif\n\n#ifndef GL_OML_subsample\n#define GL_FORMAT_SUBSAMPLE_24_24_OML     0x8982\n#define GL_FORMAT_SUBSAMPLE_244_244_OML   0x8983\n#endif\n\n#ifndef GL_OML_resample\n#define GL_PACK_RESAMPLE_OML              0x8984\n#define GL_UNPACK_RESAMPLE_OML            0x8985\n#define GL_RESAMPLE_REPLICATE_OML         0x8986\n#define GL_RESAMPLE_ZERO_FILL_OML         0x8987\n#define GL_RESAMPLE_AVERAGE_OML           0x8988\n#define GL_RESAMPLE_DECIMATE_OML          0x8989\n#endif\n\n#ifndef GL_NV_copy_depth_to_color\n#define GL_DEPTH_STENCIL_TO_RGBA_NV       0x886E\n#define GL_DEPTH_STENCIL_TO_BGRA_NV       0x886F\n#endif\n\n#ifndef GL_ATI_envmap_bumpmap\n#define GL_BUMP_ROT_MATRIX_ATI            0x8775\n#define GL_BUMP_ROT_MATRIX_SIZE_ATI       0x8776\n#define GL_BUMP_NUM_TEX_UNITS_ATI         0x8777\n#define GL_BUMP_TEX_UNITS_ATI             0x8778\n#define GL_DUDV_ATI                       0x8779\n#define GL_DU8DV8_ATI                     0x877A\n#define GL_BUMP_ENVMAP_ATI                0x877B\n#define GL_BUMP_TARGET_ATI                0x877C\n#endif\n\n#ifndef GL_ATI_fragment_shader\n#define GL_FRAGMENT_SHADER_ATI            0x8920\n#define GL_REG_0_ATI                      0x8921\n#define GL_REG_1_ATI                      0x8922\n#define GL_REG_2_ATI                      0x8923\n#define GL_REG_3_ATI                      0x8924\n#define GL_REG_4_ATI                      0x8925\n#define GL_REG_5_ATI                      0x8926\n#define GL_REG_6_ATI                      0x8927\n#define GL_REG_7_ATI                      0x8928\n#define GL_REG_8_ATI                      0x8929\n#define GL_REG_9_ATI                      0x892A\n#define GL_REG_10_ATI                     0x892B\n#define GL_REG_11_ATI                     0x892C\n#define GL_REG_12_ATI                     0x892D\n#define GL_REG_13_ATI                     0x892E\n#define GL_REG_14_ATI                     0x892F\n#define GL_REG_15_ATI                     0x8930\n#define GL_REG_16_ATI                     0x8931\n#define GL_REG_17_ATI                     0x8932\n#define GL_REG_18_ATI                     0x8933\n#define GL_REG_19_ATI                     0x8934\n#define GL_REG_20_ATI                     0x8935\n#define GL_REG_21_ATI                     0x8936\n#define GL_REG_22_ATI                     0x8937\n#define GL_REG_23_ATI                     0x8938\n#define GL_REG_24_ATI                     0x8939\n#define GL_REG_25_ATI                     0x893A\n#define GL_REG_26_ATI                     0x893B\n#define GL_REG_27_ATI                     0x893C\n#define GL_REG_28_ATI                     0x893D\n#define GL_REG_29_ATI                     0x893E\n#define GL_REG_30_ATI                     0x893F\n#define GL_REG_31_ATI                     0x8940\n#define GL_CON_0_ATI                      0x8941\n#define GL_CON_1_ATI                      0x8942\n#define GL_CON_2_ATI                      0x8943\n#define GL_CON_3_ATI                      0x8944\n#define GL_CON_4_ATI                      0x8945\n#define GL_CON_5_ATI                      0x8946\n#define GL_CON_6_ATI                      0x8947\n#define GL_CON_7_ATI                      0x8948\n#define GL_CON_8_ATI                      0x8949\n#define GL_CON_9_ATI                      0x894A\n#define GL_CON_10_ATI                     0x894B\n#define GL_CON_11_ATI                     0x894C\n#define GL_CON_12_ATI                     0x894D\n#define GL_CON_13_ATI                     0x894E\n#define GL_CON_14_ATI                     0x894F\n#define GL_CON_15_ATI                     0x8950\n#define GL_CON_16_ATI                     0x8951\n#define GL_CON_17_ATI                     0x8952\n#define GL_CON_18_ATI                     0x8953\n#define GL_CON_19_ATI                     0x8954\n#define GL_CON_20_ATI                     0x8955\n#define GL_CON_21_ATI                     0x8956\n#define GL_CON_22_ATI                     0x8957\n#define GL_CON_23_ATI                     0x8958\n#define GL_CON_24_ATI                     0x8959\n#define GL_CON_25_ATI                     0x895A\n#define GL_CON_26_ATI                     0x895B\n#define GL_CON_27_ATI                     0x895C\n#define GL_CON_28_ATI                     0x895D\n#define GL_CON_29_ATI                     0x895E\n#define GL_CON_30_ATI                     0x895F\n#define GL_CON_31_ATI                     0x8960\n#define GL_MOV_ATI                        0x8961\n#define GL_ADD_ATI                        0x8963\n#define GL_MUL_ATI                        0x8964\n#define GL_SUB_ATI                        0x8965\n#define GL_DOT3_ATI                       0x8966\n#define GL_DOT4_ATI                       0x8967\n#define GL_MAD_ATI                        0x8968\n#define GL_LERP_ATI                       0x8969\n#define GL_CND_ATI                        0x896A\n#define GL_CND0_ATI                       0x896B\n#define GL_DOT2_ADD_ATI                   0x896C\n#define GL_SECONDARY_INTERPOLATOR_ATI     0x896D\n#define GL_NUM_FRAGMENT_REGISTERS_ATI     0x896E\n#define GL_NUM_FRAGMENT_CONSTANTS_ATI     0x896F\n#define GL_NUM_PASSES_ATI                 0x8970\n#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI  0x8971\n#define GL_NUM_INSTRUCTIONS_TOTAL_ATI     0x8972\n#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973\n#define GL_NUM_LOOPBACK_COMPONENTS_ATI    0x8974\n#define GL_COLOR_ALPHA_PAIRING_ATI        0x8975\n#define GL_SWIZZLE_STR_ATI                0x8976\n#define GL_SWIZZLE_STQ_ATI                0x8977\n#define GL_SWIZZLE_STR_DR_ATI             0x8978\n#define GL_SWIZZLE_STQ_DQ_ATI             0x8979\n#define GL_SWIZZLE_STRQ_ATI               0x897A\n#define GL_SWIZZLE_STRQ_DQ_ATI            0x897B\n#define GL_RED_BIT_ATI                    0x00000001\n#define GL_GREEN_BIT_ATI                  0x00000002\n#define GL_BLUE_BIT_ATI                   0x00000004\n#define GL_2X_BIT_ATI                     0x00000001\n#define GL_4X_BIT_ATI                     0x00000002\n#define GL_8X_BIT_ATI                     0x00000004\n#define GL_HALF_BIT_ATI                   0x00000008\n#define GL_QUARTER_BIT_ATI                0x00000010\n#define GL_EIGHTH_BIT_ATI                 0x00000020\n#define GL_SATURATE_BIT_ATI               0x00000040\n#define GL_COMP_BIT_ATI                   0x00000002\n#define GL_NEGATE_BIT_ATI                 0x00000004\n#define GL_BIAS_BIT_ATI                   0x00000008\n#endif\n\n#ifndef GL_ATI_pn_triangles\n#define GL_PN_TRIANGLES_ATI               0x87F0\n#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1\n#define GL_PN_TRIANGLES_POINT_MODE_ATI    0x87F2\n#define GL_PN_TRIANGLES_NORMAL_MODE_ATI   0x87F3\n#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4\n#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5\n#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6\n#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7\n#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8\n#endif\n\n#ifndef GL_ATI_vertex_array_object\n#define GL_STATIC_ATI                     0x8760\n#define GL_DYNAMIC_ATI                    0x8761\n#define GL_PRESERVE_ATI                   0x8762\n#define GL_DISCARD_ATI                    0x8763\n#define GL_OBJECT_BUFFER_SIZE_ATI         0x8764\n#define GL_OBJECT_BUFFER_USAGE_ATI        0x8765\n#define GL_ARRAY_OBJECT_BUFFER_ATI        0x8766\n#define GL_ARRAY_OBJECT_OFFSET_ATI        0x8767\n#endif\n\n#ifndef GL_EXT_vertex_shader\n#define GL_VERTEX_SHADER_EXT              0x8780\n#define GL_VERTEX_SHADER_BINDING_EXT      0x8781\n#define GL_OP_INDEX_EXT                   0x8782\n#define GL_OP_NEGATE_EXT                  0x8783\n#define GL_OP_DOT3_EXT                    0x8784\n#define GL_OP_DOT4_EXT                    0x8785\n#define GL_OP_MUL_EXT                     0x8786\n#define GL_OP_ADD_EXT                     0x8787\n#define GL_OP_MADD_EXT                    0x8788\n#define GL_OP_FRAC_EXT                    0x8789\n#define GL_OP_MAX_EXT                     0x878A\n#define GL_OP_MIN_EXT                     0x878B\n#define GL_OP_SET_GE_EXT                  0x878C\n#define GL_OP_SET_LT_EXT                  0x878D\n#define GL_OP_CLAMP_EXT                   0x878E\n#define GL_OP_FLOOR_EXT                   0x878F\n#define GL_OP_ROUND_EXT                   0x8790\n#define GL_OP_EXP_BASE_2_EXT              0x8791\n#define GL_OP_LOG_BASE_2_EXT              0x8792\n#define GL_OP_POWER_EXT                   0x8793\n#define GL_OP_RECIP_EXT                   0x8794\n#define GL_OP_RECIP_SQRT_EXT              0x8795\n#define GL_OP_SUB_EXT                     0x8796\n#define GL_OP_CROSS_PRODUCT_EXT           0x8797\n#define GL_OP_MULTIPLY_MATRIX_EXT         0x8798\n#define GL_OP_MOV_EXT                     0x8799\n#define GL_OUTPUT_VERTEX_EXT              0x879A\n#define GL_OUTPUT_COLOR0_EXT              0x879B\n#define GL_OUTPUT_COLOR1_EXT              0x879C\n#define GL_OUTPUT_TEXTURE_COORD0_EXT      0x879D\n#define GL_OUTPUT_TEXTURE_COORD1_EXT      0x879E\n#define GL_OUTPUT_TEXTURE_COORD2_EXT      0x879F\n#define GL_OUTPUT_TEXTURE_COORD3_EXT      0x87A0\n#define GL_OUTPUT_TEXTURE_COORD4_EXT      0x87A1\n#define GL_OUTPUT_TEXTURE_COORD5_EXT      0x87A2\n#define GL_OUTPUT_TEXTURE_COORD6_EXT      0x87A3\n#define GL_OUTPUT_TEXTURE_COORD7_EXT      0x87A4\n#define GL_OUTPUT_TEXTURE_COORD8_EXT      0x87A5\n#define GL_OUTPUT_TEXTURE_COORD9_EXT      0x87A6\n#define GL_OUTPUT_TEXTURE_COORD10_EXT     0x87A7\n#define GL_OUTPUT_TEXTURE_COORD11_EXT     0x87A8\n#define GL_OUTPUT_TEXTURE_COORD12_EXT     0x87A9\n#define GL_OUTPUT_TEXTURE_COORD13_EXT     0x87AA\n#define GL_OUTPUT_TEXTURE_COORD14_EXT     0x87AB\n#define GL_OUTPUT_TEXTURE_COORD15_EXT     0x87AC\n#define GL_OUTPUT_TEXTURE_COORD16_EXT     0x87AD\n#define GL_OUTPUT_TEXTURE_COORD17_EXT     0x87AE\n#define GL_OUTPUT_TEXTURE_COORD18_EXT     0x87AF\n#define GL_OUTPUT_TEXTURE_COORD19_EXT     0x87B0\n#define GL_OUTPUT_TEXTURE_COORD20_EXT     0x87B1\n#define GL_OUTPUT_TEXTURE_COORD21_EXT     0x87B2\n#define GL_OUTPUT_TEXTURE_COORD22_EXT     0x87B3\n#define GL_OUTPUT_TEXTURE_COORD23_EXT     0x87B4\n#define GL_OUTPUT_TEXTURE_COORD24_EXT     0x87B5\n#define GL_OUTPUT_TEXTURE_COORD25_EXT     0x87B6\n#define GL_OUTPUT_TEXTURE_COORD26_EXT     0x87B7\n#define GL_OUTPUT_TEXTURE_COORD27_EXT     0x87B8\n#define GL_OUTPUT_TEXTURE_COORD28_EXT     0x87B9\n#define GL_OUTPUT_TEXTURE_COORD29_EXT     0x87BA\n#define GL_OUTPUT_TEXTURE_COORD30_EXT     0x87BB\n#define GL_OUTPUT_TEXTURE_COORD31_EXT     0x87BC\n#define GL_OUTPUT_FOG_EXT                 0x87BD\n#define GL_SCALAR_EXT                     0x87BE\n#define GL_VECTOR_EXT                     0x87BF\n#define GL_MATRIX_EXT                     0x87C0\n#define GL_VARIANT_EXT                    0x87C1\n#define GL_INVARIANT_EXT                  0x87C2\n#define GL_LOCAL_CONSTANT_EXT             0x87C3\n#define GL_LOCAL_EXT                      0x87C4\n#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5\n#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6\n#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7\n#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8\n#define GL_MAX_VERTEX_SHADER_LOCALS_EXT   0x87C9\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE\n#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF\n#define GL_VERTEX_SHADER_VARIANTS_EXT     0x87D0\n#define GL_VERTEX_SHADER_INVARIANTS_EXT   0x87D1\n#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2\n#define GL_VERTEX_SHADER_LOCALS_EXT       0x87D3\n#define GL_VERTEX_SHADER_OPTIMIZED_EXT    0x87D4\n#define GL_X_EXT                          0x87D5\n#define GL_Y_EXT                          0x87D6\n#define GL_Z_EXT                          0x87D7\n#define GL_W_EXT                          0x87D8\n#define GL_NEGATIVE_X_EXT                 0x87D9\n#define GL_NEGATIVE_Y_EXT                 0x87DA\n#define GL_NEGATIVE_Z_EXT                 0x87DB\n#define GL_NEGATIVE_W_EXT                 0x87DC\n#define GL_ZERO_EXT                       0x87DD\n#define GL_ONE_EXT                        0x87DE\n#define GL_NEGATIVE_ONE_EXT               0x87DF\n#define GL_NORMALIZED_RANGE_EXT           0x87E0\n#define GL_FULL_RANGE_EXT                 0x87E1\n#define GL_CURRENT_VERTEX_EXT             0x87E2\n#define GL_MVP_MATRIX_EXT                 0x87E3\n#define GL_VARIANT_VALUE_EXT              0x87E4\n#define GL_VARIANT_DATATYPE_EXT           0x87E5\n#define GL_VARIANT_ARRAY_STRIDE_EXT       0x87E6\n#define GL_VARIANT_ARRAY_TYPE_EXT         0x87E7\n#define GL_VARIANT_ARRAY_EXT              0x87E8\n#define GL_VARIANT_ARRAY_POINTER_EXT      0x87E9\n#define GL_INVARIANT_VALUE_EXT            0x87EA\n#define GL_INVARIANT_DATATYPE_EXT         0x87EB\n#define GL_LOCAL_CONSTANT_VALUE_EXT       0x87EC\n#define GL_LOCAL_CONSTANT_DATATYPE_EXT    0x87ED\n#endif\n\n#ifndef GL_ATI_vertex_streams\n#define GL_MAX_VERTEX_STREAMS_ATI         0x876B\n#define GL_VERTEX_STREAM0_ATI             0x876C\n#define GL_VERTEX_STREAM1_ATI             0x876D\n#define GL_VERTEX_STREAM2_ATI             0x876E\n#define GL_VERTEX_STREAM3_ATI             0x876F\n#define GL_VERTEX_STREAM4_ATI             0x8770\n#define GL_VERTEX_STREAM5_ATI             0x8771\n#define GL_VERTEX_STREAM6_ATI             0x8772\n#define GL_VERTEX_STREAM7_ATI             0x8773\n#define GL_VERTEX_SOURCE_ATI              0x8774\n#endif\n\n#ifndef GL_ATI_element_array\n#define GL_ELEMENT_ARRAY_ATI              0x8768\n#define GL_ELEMENT_ARRAY_TYPE_ATI         0x8769\n#define GL_ELEMENT_ARRAY_POINTER_ATI      0x876A\n#endif\n\n#ifndef GL_SUN_mesh_array\n#define GL_QUAD_MESH_SUN                  0x8614\n#define GL_TRIANGLE_MESH_SUN              0x8615\n#endif\n\n#ifndef GL_SUN_slice_accum\n#define GL_SLICE_ACCUM_SUN                0x85CC\n#endif\n\n#ifndef GL_NV_multisample_filter_hint\n#define GL_MULTISAMPLE_FILTER_HINT_NV     0x8534\n#endif\n\n#ifndef GL_NV_depth_clamp\n#define GL_DEPTH_CLAMP_NV                 0x864F\n#endif\n\n#ifndef GL_NV_occlusion_query\n#define GL_PIXEL_COUNTER_BITS_NV          0x8864\n#define GL_CURRENT_OCCLUSION_QUERY_ID_NV  0x8865\n#define GL_PIXEL_COUNT_NV                 0x8866\n#define GL_PIXEL_COUNT_AVAILABLE_NV       0x8867\n#endif\n\n#ifndef GL_NV_point_sprite\n#define GL_POINT_SPRITE_NV                0x8861\n#define GL_COORD_REPLACE_NV               0x8862\n#define GL_POINT_SPRITE_R_MODE_NV         0x8863\n#endif\n\n#ifndef GL_NV_texture_shader3\n#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850\n#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851\n#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852\n#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853\n#define GL_OFFSET_HILO_TEXTURE_2D_NV      0x8854\n#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855\n#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856\n#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857\n#define GL_DEPENDENT_HILO_TEXTURE_2D_NV   0x8858\n#define GL_DEPENDENT_RGB_TEXTURE_3D_NV    0x8859\n#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A\n#define GL_DOT_PRODUCT_PASS_THROUGH_NV    0x885B\n#define GL_DOT_PRODUCT_TEXTURE_1D_NV      0x885C\n#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D\n#define GL_HILO8_NV                       0x885E\n#define GL_SIGNED_HILO8_NV                0x885F\n#define GL_FORCE_BLUE_TO_ONE_NV           0x8860\n#endif\n\n#ifndef GL_NV_vertex_program1_1\n#endif\n\n#ifndef GL_EXT_shadow_funcs\n#endif\n\n#ifndef GL_EXT_stencil_two_side\n#define GL_STENCIL_TEST_TWO_SIDE_EXT      0x8910\n#define GL_ACTIVE_STENCIL_FACE_EXT        0x8911\n#endif\n\n#ifndef GL_ATI_text_fragment_shader\n#define GL_TEXT_FRAGMENT_SHADER_ATI       0x8200\n#endif\n\n#ifndef GL_APPLE_client_storage\n#define GL_UNPACK_CLIENT_STORAGE_APPLE    0x85B2\n#endif\n\n#ifndef GL_APPLE_element_array\n#define GL_ELEMENT_ARRAY_APPLE            0x8A0C\n#define GL_ELEMENT_ARRAY_TYPE_APPLE       0x8A0D\n#define GL_ELEMENT_ARRAY_POINTER_APPLE    0x8A0E\n#endif\n\n#ifndef GL_APPLE_fence\n#define GL_DRAW_PIXELS_APPLE              0x8A0A\n#define GL_FENCE_APPLE                    0x8A0B\n#endif\n\n#ifndef GL_APPLE_vertex_array_object\n#define GL_VERTEX_ARRAY_BINDING_APPLE     0x85B5\n#endif\n\n#ifndef GL_APPLE_vertex_array_range\n#define GL_VERTEX_ARRAY_RANGE_APPLE       0x851D\n#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E\n#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F\n#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521\n#define GL_STORAGE_CLIENT_APPLE           0x85B4\n#define GL_STORAGE_CACHED_APPLE           0x85BE\n#define GL_STORAGE_SHARED_APPLE           0x85BF\n#endif\n\n#ifndef GL_APPLE_ycbcr_422\n#define GL_YCBCR_422_APPLE                0x85B9\n#define GL_UNSIGNED_SHORT_8_8_APPLE       0x85BA\n#define GL_UNSIGNED_SHORT_8_8_REV_APPLE   0x85BB\n#endif\n\n#ifndef GL_S3_s3tc\n#define GL_RGB_S3TC                       0x83A0\n#define GL_RGB4_S3TC                      0x83A1\n#define GL_RGBA_S3TC                      0x83A2\n#define GL_RGBA4_S3TC                     0x83A3\n#define GL_RGBA_DXT5_S3TC                 0x83A4\n#define GL_RGBA4_DXT5_S3TC                0x83A5\n#endif\n\n#ifndef GL_ATI_draw_buffers\n#define GL_MAX_DRAW_BUFFERS_ATI           0x8824\n#define GL_DRAW_BUFFER0_ATI               0x8825\n#define GL_DRAW_BUFFER1_ATI               0x8826\n#define GL_DRAW_BUFFER2_ATI               0x8827\n#define GL_DRAW_BUFFER3_ATI               0x8828\n#define GL_DRAW_BUFFER4_ATI               0x8829\n#define GL_DRAW_BUFFER5_ATI               0x882A\n#define GL_DRAW_BUFFER6_ATI               0x882B\n#define GL_DRAW_BUFFER7_ATI               0x882C\n#define GL_DRAW_BUFFER8_ATI               0x882D\n#define GL_DRAW_BUFFER9_ATI               0x882E\n#define GL_DRAW_BUFFER10_ATI              0x882F\n#define GL_DRAW_BUFFER11_ATI              0x8830\n#define GL_DRAW_BUFFER12_ATI              0x8831\n#define GL_DRAW_BUFFER13_ATI              0x8832\n#define GL_DRAW_BUFFER14_ATI              0x8833\n#define GL_DRAW_BUFFER15_ATI              0x8834\n#endif\n\n#ifndef GL_ATI_pixel_format_float\n#define GL_RGBA_FLOAT_MODE_ATI            0x8820\n#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835\n#endif\n\n#ifndef GL_ATI_texture_env_combine3\n#define GL_MODULATE_ADD_ATI               0x8744\n#define GL_MODULATE_SIGNED_ADD_ATI        0x8745\n#define GL_MODULATE_SUBTRACT_ATI          0x8746\n#endif\n\n#ifndef GL_ATI_texture_float\n#define GL_RGBA_FLOAT32_ATI               0x8814\n#define GL_RGB_FLOAT32_ATI                0x8815\n#define GL_ALPHA_FLOAT32_ATI              0x8816\n#define GL_INTENSITY_FLOAT32_ATI          0x8817\n#define GL_LUMINANCE_FLOAT32_ATI          0x8818\n#define GL_LUMINANCE_ALPHA_FLOAT32_ATI    0x8819\n#define GL_RGBA_FLOAT16_ATI               0x881A\n#define GL_RGB_FLOAT16_ATI                0x881B\n#define GL_ALPHA_FLOAT16_ATI              0x881C\n#define GL_INTENSITY_FLOAT16_ATI          0x881D\n#define GL_LUMINANCE_FLOAT16_ATI          0x881E\n#define GL_LUMINANCE_ALPHA_FLOAT16_ATI    0x881F\n#endif\n\n#ifndef GL_NV_float_buffer\n#define GL_FLOAT_R_NV                     0x8880\n#define GL_FLOAT_RG_NV                    0x8881\n#define GL_FLOAT_RGB_NV                   0x8882\n#define GL_FLOAT_RGBA_NV                  0x8883\n#define GL_FLOAT_R16_NV                   0x8884\n#define GL_FLOAT_R32_NV                   0x8885\n#define GL_FLOAT_RG16_NV                  0x8886\n#define GL_FLOAT_RG32_NV                  0x8887\n#define GL_FLOAT_RGB16_NV                 0x8888\n#define GL_FLOAT_RGB32_NV                 0x8889\n#define GL_FLOAT_RGBA16_NV                0x888A\n#define GL_FLOAT_RGBA32_NV                0x888B\n#define GL_TEXTURE_FLOAT_COMPONENTS_NV    0x888C\n#define GL_FLOAT_CLEAR_COLOR_VALUE_NV     0x888D\n#define GL_FLOAT_RGBA_MODE_NV             0x888E\n#endif\n\n#ifndef GL_NV_fragment_program\n#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868\n#define GL_FRAGMENT_PROGRAM_NV            0x8870\n#define GL_MAX_TEXTURE_COORDS_NV          0x8871\n#define GL_MAX_TEXTURE_IMAGE_UNITS_NV     0x8872\n#define GL_FRAGMENT_PROGRAM_BINDING_NV    0x8873\n#define GL_PROGRAM_ERROR_STRING_NV        0x8874\n#endif\n\n#ifndef GL_NV_half_float\n#define GL_HALF_FLOAT_NV                  0x140B\n#endif\n\n#ifndef GL_NV_pixel_data_range\n#define GL_WRITE_PIXEL_DATA_RANGE_NV      0x8878\n#define GL_READ_PIXEL_DATA_RANGE_NV       0x8879\n#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A\n#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B\n#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C\n#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D\n#endif\n\n#ifndef GL_NV_primitive_restart\n#define GL_PRIMITIVE_RESTART_NV           0x8558\n#define GL_PRIMITIVE_RESTART_INDEX_NV     0x8559\n#endif\n\n#ifndef GL_NV_texture_expand_normal\n#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F\n#endif\n\n#ifndef GL_NV_vertex_program2\n#endif\n\n#ifndef GL_ATI_map_object_buffer\n#endif\n\n#ifndef GL_ATI_separate_stencil\n#define GL_STENCIL_BACK_FUNC_ATI          0x8800\n#define GL_STENCIL_BACK_FAIL_ATI          0x8801\n#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802\n#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803\n#endif\n\n#ifndef GL_ATI_vertex_attrib_array_object\n#endif\n\n#ifndef GL_OES_byte_coordinates\n#endif\n\n#ifndef GL_OES_fixed_point\n#define GL_FIXED_OES                      0x140C\n#endif\n\n#ifndef GL_OES_single_precision\n#endif\n\n#ifndef GL_OES_compressed_paletted_texture\n#define GL_PALETTE4_RGB8_OES              0x8B90\n#define GL_PALETTE4_RGBA8_OES             0x8B91\n#define GL_PALETTE4_R5_G6_B5_OES          0x8B92\n#define GL_PALETTE4_RGBA4_OES             0x8B93\n#define GL_PALETTE4_RGB5_A1_OES           0x8B94\n#define GL_PALETTE8_RGB8_OES              0x8B95\n#define GL_PALETTE8_RGBA8_OES             0x8B96\n#define GL_PALETTE8_R5_G6_B5_OES          0x8B97\n#define GL_PALETTE8_RGBA4_OES             0x8B98\n#define GL_PALETTE8_RGB5_A1_OES           0x8B99\n#endif\n\n#ifndef GL_OES_read_format\n#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A\n#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B\n#endif\n\n#ifndef GL_OES_query_matrix\n#endif\n\n#ifndef GL_EXT_depth_bounds_test\n#define GL_DEPTH_BOUNDS_TEST_EXT          0x8890\n#define GL_DEPTH_BOUNDS_EXT               0x8891\n#endif\n\n#ifndef GL_EXT_texture_mirror_clamp\n#define GL_MIRROR_CLAMP_EXT               0x8742\n#define GL_MIRROR_CLAMP_TO_EDGE_EXT       0x8743\n#define GL_MIRROR_CLAMP_TO_BORDER_EXT     0x8912\n#endif\n\n#ifndef GL_EXT_blend_equation_separate\n#define GL_BLEND_EQUATION_RGB_EXT         0x8009\n#define GL_BLEND_EQUATION_ALPHA_EXT       0x883D\n#endif\n\n#ifndef GL_MESA_pack_invert\n#define GL_PACK_INVERT_MESA               0x8758\n#endif\n\n#ifndef GL_MESA_ycbcr_texture\n#define GL_UNSIGNED_SHORT_8_8_MESA        0x85BA\n#define GL_UNSIGNED_SHORT_8_8_REV_MESA    0x85BB\n#define GL_YCBCR_MESA                     0x8757\n#endif\n\n#ifndef GL_EXT_pixel_buffer_object\n#define GL_PIXEL_PACK_BUFFER_EXT          0x88EB\n#define GL_PIXEL_UNPACK_BUFFER_EXT        0x88EC\n#define GL_PIXEL_PACK_BUFFER_BINDING_EXT  0x88ED\n#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF\n#endif\n\n#ifndef GL_NV_fragment_program_option\n#endif\n\n#ifndef GL_NV_fragment_program2\n#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4\n#define GL_MAX_PROGRAM_CALL_DEPTH_NV      0x88F5\n#define GL_MAX_PROGRAM_IF_DEPTH_NV        0x88F6\n#define GL_MAX_PROGRAM_LOOP_DEPTH_NV      0x88F7\n#define GL_MAX_PROGRAM_LOOP_COUNT_NV      0x88F8\n#endif\n\n#ifndef GL_NV_vertex_program2_option\n/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */\n/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */\n#endif\n\n#ifndef GL_NV_vertex_program3\n/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */\n#endif\n\n#ifndef GL_EXT_framebuffer_object\n#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506\n#define GL_MAX_RENDERBUFFER_SIZE_EXT      0x84E8\n#define GL_FRAMEBUFFER_BINDING_EXT        0x8CA6\n#define GL_RENDERBUFFER_BINDING_EXT       0x8CA7\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4\n#define GL_FRAMEBUFFER_COMPLETE_EXT       0x8CD5\n#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6\n#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7\n#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9\n#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA\n#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB\n#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC\n#define GL_FRAMEBUFFER_UNSUPPORTED_EXT    0x8CDD\n#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF\n#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0\n#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1\n#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2\n#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3\n#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4\n#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5\n#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6\n#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7\n#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8\n#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9\n#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA\n#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB\n#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC\n#define GL_COLOR_ATTACHMENT13_EXT         0x8CED\n#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE\n#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF\n#define GL_DEPTH_ATTACHMENT_EXT           0x8D00\n#define GL_STENCIL_ATTACHMENT_EXT         0x8D20\n#define GL_FRAMEBUFFER_EXT                0x8D40\n#define GL_RENDERBUFFER_EXT               0x8D41\n#define GL_RENDERBUFFER_WIDTH_EXT         0x8D42\n#define GL_RENDERBUFFER_HEIGHT_EXT        0x8D43\n#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44\n#define GL_STENCIL_INDEX1_EXT             0x8D46\n#define GL_STENCIL_INDEX4_EXT             0x8D47\n#define GL_STENCIL_INDEX8_EXT             0x8D48\n#define GL_STENCIL_INDEX16_EXT            0x8D49\n#define GL_RENDERBUFFER_RED_SIZE_EXT      0x8D50\n#define GL_RENDERBUFFER_GREEN_SIZE_EXT    0x8D51\n#define GL_RENDERBUFFER_BLUE_SIZE_EXT     0x8D52\n#define GL_RENDERBUFFER_ALPHA_SIZE_EXT    0x8D53\n#define GL_RENDERBUFFER_DEPTH_SIZE_EXT    0x8D54\n#define GL_RENDERBUFFER_STENCIL_SIZE_EXT  0x8D55\n#endif\n\n#ifndef GL_GREMEDY_string_marker\n#endif\n\n#ifndef GL_EXT_packed_depth_stencil\n#define GL_DEPTH_STENCIL_EXT              0x84F9\n#define GL_UNSIGNED_INT_24_8_EXT          0x84FA\n#define GL_DEPTH24_STENCIL8_EXT           0x88F0\n#define GL_TEXTURE_STENCIL_SIZE_EXT       0x88F1\n#endif\n\n#ifndef GL_EXT_stencil_clear_tag\n#define GL_STENCIL_TAG_BITS_EXT           0x88F2\n#define GL_STENCIL_CLEAR_TAG_VALUE_EXT    0x88F3\n#endif\n\n#ifndef GL_EXT_texture_sRGB\n#define GL_SRGB_EXT                       0x8C40\n#define GL_SRGB8_EXT                      0x8C41\n#define GL_SRGB_ALPHA_EXT                 0x8C42\n#define GL_SRGB8_ALPHA8_EXT               0x8C43\n#define GL_SLUMINANCE_ALPHA_EXT           0x8C44\n#define GL_SLUMINANCE8_ALPHA8_EXT         0x8C45\n#define GL_SLUMINANCE_EXT                 0x8C46\n#define GL_SLUMINANCE8_EXT                0x8C47\n#define GL_COMPRESSED_SRGB_EXT            0x8C48\n#define GL_COMPRESSED_SRGB_ALPHA_EXT      0x8C49\n#define GL_COMPRESSED_SLUMINANCE_EXT      0x8C4A\n#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B\n#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT  0x8C4C\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F\n#endif\n\n#ifndef GL_EXT_framebuffer_blit\n#define GL_READ_FRAMEBUFFER_EXT           0x8CA8\n#define GL_DRAW_FRAMEBUFFER_EXT           0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING_EXT   GL_FRAMEBUFFER_BINDING_EXT\n#define GL_READ_FRAMEBUFFER_BINDING_EXT   0x8CAA\n#endif\n\n#ifndef GL_EXT_framebuffer_multisample\n#define GL_RENDERBUFFER_SAMPLES_EXT       0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56\n#define GL_MAX_SAMPLES_EXT                0x8D57\n#endif\n\n#ifndef GL_MESAX_texture_stack\n#define GL_TEXTURE_1D_STACK_MESAX         0x8759\n#define GL_TEXTURE_2D_STACK_MESAX         0x875A\n#define GL_PROXY_TEXTURE_1D_STACK_MESAX   0x875B\n#define GL_PROXY_TEXTURE_2D_STACK_MESAX   0x875C\n#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D\n#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E\n#endif\n\n#ifndef GL_EXT_timer_query\n#define GL_TIME_ELAPSED_EXT               0x88BF\n#endif\n\n#ifndef GL_EXT_gpu_program_parameters\n#endif\n\n#ifndef GL_APPLE_flush_buffer_range\n#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12\n#define GL_BUFFER_FLUSHING_UNMAP_APPLE    0x8A13\n#endif\n\n#ifndef GL_NV_gpu_program4\n#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV    0x8904\n#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV    0x8905\n#define GL_PROGRAM_ATTRIB_COMPONENTS_NV   0x8906\n#define GL_PROGRAM_RESULT_COMPONENTS_NV   0x8907\n#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908\n#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909\n#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5\n#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6\n#endif\n\n#ifndef GL_NV_geometry_program4\n#define GL_LINES_ADJACENCY_EXT            0x000A\n#define GL_LINE_STRIP_ADJACENCY_EXT       0x000B\n#define GL_TRIANGLES_ADJACENCY_EXT        0x000C\n#define GL_TRIANGLE_STRIP_ADJACENCY_EXT   0x000D\n#define GL_GEOMETRY_PROGRAM_NV            0x8C26\n#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27\n#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28\n#define GL_GEOMETRY_VERTICES_OUT_EXT      0x8DDA\n#define GL_GEOMETRY_INPUT_TYPE_EXT        0x8DDB\n#define GL_GEOMETRY_OUTPUT_TYPE_EXT       0x8DDC\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4\n#define GL_PROGRAM_POINT_SIZE_EXT         0x8642\n#endif\n\n#ifndef GL_EXT_geometry_shader4\n#define GL_GEOMETRY_SHADER_EXT            0x8DD9\n/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */\n/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */\n/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */\n/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */\n#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD\n#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE\n#define GL_MAX_VARYING_COMPONENTS_EXT     0x8B4B\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1\n/* reuse GL_LINES_ADJACENCY_EXT */\n/* reuse GL_LINE_STRIP_ADJACENCY_EXT */\n/* reuse GL_TRIANGLES_ADJACENCY_EXT */\n/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */\n/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */\n/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */\n/* reuse GL_PROGRAM_POINT_SIZE_EXT */\n#endif\n\n#ifndef GL_NV_vertex_program4\n#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD\n#endif\n\n#ifndef GL_EXT_gpu_shader4\n#define GL_SAMPLER_1D_ARRAY_EXT           0x8DC0\n#define GL_SAMPLER_2D_ARRAY_EXT           0x8DC1\n#define GL_SAMPLER_BUFFER_EXT             0x8DC2\n#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT    0x8DC3\n#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT    0x8DC4\n#define GL_SAMPLER_CUBE_SHADOW_EXT        0x8DC5\n#define GL_UNSIGNED_INT_VEC2_EXT          0x8DC6\n#define GL_UNSIGNED_INT_VEC3_EXT          0x8DC7\n#define GL_UNSIGNED_INT_VEC4_EXT          0x8DC8\n#define GL_INT_SAMPLER_1D_EXT             0x8DC9\n#define GL_INT_SAMPLER_2D_EXT             0x8DCA\n#define GL_INT_SAMPLER_3D_EXT             0x8DCB\n#define GL_INT_SAMPLER_CUBE_EXT           0x8DCC\n#define GL_INT_SAMPLER_2D_RECT_EXT        0x8DCD\n#define GL_INT_SAMPLER_1D_ARRAY_EXT       0x8DCE\n#define GL_INT_SAMPLER_2D_ARRAY_EXT       0x8DCF\n#define GL_INT_SAMPLER_BUFFER_EXT         0x8DD0\n#define GL_UNSIGNED_INT_SAMPLER_1D_EXT    0x8DD1\n#define GL_UNSIGNED_INT_SAMPLER_2D_EXT    0x8DD2\n#define GL_UNSIGNED_INT_SAMPLER_3D_EXT    0x8DD3\n#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT  0x8DD4\n#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5\n#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6\n#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8\n#endif\n\n#ifndef GL_EXT_draw_instanced\n#endif\n\n#ifndef GL_EXT_packed_float\n#define GL_R11F_G11F_B10F_EXT             0x8C3A\n#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B\n#define GL_RGBA_SIGNED_COMPONENTS_EXT     0x8C3C\n#endif\n\n#ifndef GL_EXT_texture_array\n#define GL_TEXTURE_1D_ARRAY_EXT           0x8C18\n#define GL_PROXY_TEXTURE_1D_ARRAY_EXT     0x8C19\n#define GL_TEXTURE_2D_ARRAY_EXT           0x8C1A\n#define GL_PROXY_TEXTURE_2D_ARRAY_EXT     0x8C1B\n#define GL_TEXTURE_BINDING_1D_ARRAY_EXT   0x8C1C\n#define GL_TEXTURE_BINDING_2D_ARRAY_EXT   0x8C1D\n#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT   0x88FF\n#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E\n/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */\n#endif\n\n#ifndef GL_EXT_texture_buffer_object\n#define GL_TEXTURE_BUFFER_EXT             0x8C2A\n#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT    0x8C2B\n#define GL_TEXTURE_BINDING_BUFFER_EXT     0x8C2C\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D\n#define GL_TEXTURE_BUFFER_FORMAT_EXT      0x8C2E\n#endif\n\n#ifndef GL_EXT_texture_compression_latc\n#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70\n#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71\n#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72\n#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73\n#endif\n\n#ifndef GL_EXT_texture_compression_rgtc\n#define GL_COMPRESSED_RED_RGTC1_EXT       0x8DBB\n#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC\n#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD\n#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE\n#endif\n\n#ifndef GL_EXT_texture_shared_exponent\n#define GL_RGB9_E5_EXT                    0x8C3D\n#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT   0x8C3E\n#define GL_TEXTURE_SHARED_SIZE_EXT        0x8C3F\n#endif\n\n#ifndef GL_NV_depth_buffer_float\n#define GL_DEPTH_COMPONENT32F_NV          0x8DAB\n#define GL_DEPTH32F_STENCIL8_NV           0x8DAC\n#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD\n#define GL_DEPTH_BUFFER_FLOAT_MODE_NV     0x8DAF\n#endif\n\n#ifndef GL_NV_fragment_program4\n#endif\n\n#ifndef GL_NV_framebuffer_multisample_coverage\n#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB\n#define GL_RENDERBUFFER_COLOR_SAMPLES_NV  0x8E10\n#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11\n#define GL_MULTISAMPLE_COVERAGE_MODES_NV  0x8E12\n#endif\n\n#ifndef GL_EXT_framebuffer_sRGB\n#define GL_FRAMEBUFFER_SRGB_EXT           0x8DB9\n#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT   0x8DBA\n#endif\n\n#ifndef GL_NV_geometry_shader4\n#endif\n\n#ifndef GL_NV_parameter_buffer_object\n#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0\n#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1\n#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2\n#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3\n#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4\n#endif\n\n#ifndef GL_EXT_draw_buffers2\n#endif\n\n#ifndef GL_NV_transform_feedback\n#define GL_BACK_PRIMARY_COLOR_NV          0x8C77\n#define GL_BACK_SECONDARY_COLOR_NV        0x8C78\n#define GL_TEXTURE_COORD_NV               0x8C79\n#define GL_CLIP_DISTANCE_NV               0x8C7A\n#define GL_VERTEX_ID_NV                   0x8C7B\n#define GL_PRIMITIVE_ID_NV                0x8C7C\n#define GL_GENERIC_ATTRIB_NV              0x8C7D\n#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV  0x8C7E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80\n#define GL_ACTIVE_VARYINGS_NV             0x8C81\n#define GL_ACTIVE_VARYING_MAX_LENGTH_NV   0x8C82\n#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85\n#define GL_TRANSFORM_FEEDBACK_RECORD_NV   0x8C86\n#define GL_PRIMITIVES_GENERATED_NV        0x8C87\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88\n#define GL_RASTERIZER_DISCARD_NV          0x8C89\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B\n#define GL_INTERLEAVED_ATTRIBS_NV         0x8C8C\n#define GL_SEPARATE_ATTRIBS_NV            0x8C8D\n#define GL_TRANSFORM_FEEDBACK_BUFFER_NV   0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F\n#define GL_LAYER_NV                       0x8DAA\n#define GL_NEXT_BUFFER_NV                 -2\n#define GL_SKIP_COMPONENTS4_NV            -3\n#define GL_SKIP_COMPONENTS3_NV            -4\n#define GL_SKIP_COMPONENTS2_NV            -5\n#define GL_SKIP_COMPONENTS1_NV            -6\n#endif\n\n#ifndef GL_EXT_bindable_uniform\n#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2\n#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3\n#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4\n#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT  0x8DED\n#define GL_UNIFORM_BUFFER_EXT             0x8DEE\n#define GL_UNIFORM_BUFFER_BINDING_EXT     0x8DEF\n#endif\n\n#ifndef GL_EXT_texture_integer\n#define GL_RGBA32UI_EXT                   0x8D70\n#define GL_RGB32UI_EXT                    0x8D71\n#define GL_ALPHA32UI_EXT                  0x8D72\n#define GL_INTENSITY32UI_EXT              0x8D73\n#define GL_LUMINANCE32UI_EXT              0x8D74\n#define GL_LUMINANCE_ALPHA32UI_EXT        0x8D75\n#define GL_RGBA16UI_EXT                   0x8D76\n#define GL_RGB16UI_EXT                    0x8D77\n#define GL_ALPHA16UI_EXT                  0x8D78\n#define GL_INTENSITY16UI_EXT              0x8D79\n#define GL_LUMINANCE16UI_EXT              0x8D7A\n#define GL_LUMINANCE_ALPHA16UI_EXT        0x8D7B\n#define GL_RGBA8UI_EXT                    0x8D7C\n#define GL_RGB8UI_EXT                     0x8D7D\n#define GL_ALPHA8UI_EXT                   0x8D7E\n#define GL_INTENSITY8UI_EXT               0x8D7F\n#define GL_LUMINANCE8UI_EXT               0x8D80\n#define GL_LUMINANCE_ALPHA8UI_EXT         0x8D81\n#define GL_RGBA32I_EXT                    0x8D82\n#define GL_RGB32I_EXT                     0x8D83\n#define GL_ALPHA32I_EXT                   0x8D84\n#define GL_INTENSITY32I_EXT               0x8D85\n#define GL_LUMINANCE32I_EXT               0x8D86\n#define GL_LUMINANCE_ALPHA32I_EXT         0x8D87\n#define GL_RGBA16I_EXT                    0x8D88\n#define GL_RGB16I_EXT                     0x8D89\n#define GL_ALPHA16I_EXT                   0x8D8A\n#define GL_INTENSITY16I_EXT               0x8D8B\n#define GL_LUMINANCE16I_EXT               0x8D8C\n#define GL_LUMINANCE_ALPHA16I_EXT         0x8D8D\n#define GL_RGBA8I_EXT                     0x8D8E\n#define GL_RGB8I_EXT                      0x8D8F\n#define GL_ALPHA8I_EXT                    0x8D90\n#define GL_INTENSITY8I_EXT                0x8D91\n#define GL_LUMINANCE8I_EXT                0x8D92\n#define GL_LUMINANCE_ALPHA8I_EXT          0x8D93\n#define GL_RED_INTEGER_EXT                0x8D94\n#define GL_GREEN_INTEGER_EXT              0x8D95\n#define GL_BLUE_INTEGER_EXT               0x8D96\n#define GL_ALPHA_INTEGER_EXT              0x8D97\n#define GL_RGB_INTEGER_EXT                0x8D98\n#define GL_RGBA_INTEGER_EXT               0x8D99\n#define GL_BGR_INTEGER_EXT                0x8D9A\n#define GL_BGRA_INTEGER_EXT               0x8D9B\n#define GL_LUMINANCE_INTEGER_EXT          0x8D9C\n#define GL_LUMINANCE_ALPHA_INTEGER_EXT    0x8D9D\n#define GL_RGBA_INTEGER_MODE_EXT          0x8D9E\n#endif\n\n#ifndef GL_GREMEDY_frame_terminator\n#endif\n\n#ifndef GL_NV_conditional_render\n#define GL_QUERY_WAIT_NV                  0x8E13\n#define GL_QUERY_NO_WAIT_NV               0x8E14\n#define GL_QUERY_BY_REGION_WAIT_NV        0x8E15\n#define GL_QUERY_BY_REGION_NO_WAIT_NV     0x8E16\n#endif\n\n#ifndef GL_NV_present_video\n#define GL_FRAME_NV                       0x8E26\n#define GL_FIELDS_NV                      0x8E27\n#define GL_CURRENT_TIME_NV                0x8E28\n#define GL_NUM_FILL_STREAMS_NV            0x8E29\n#define GL_PRESENT_TIME_NV                0x8E2A\n#define GL_PRESENT_DURATION_NV            0x8E2B\n#endif\n\n#ifndef GL_EXT_transform_feedback\n#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT  0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F\n#define GL_INTERLEAVED_ATTRIBS_EXT        0x8C8C\n#define GL_SEPARATE_ATTRIBS_EXT           0x8C8D\n#define GL_PRIMITIVES_GENERATED_EXT       0x8C87\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88\n#define GL_RASTERIZER_DISCARD_EXT         0x8C89\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80\n#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F\n#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76\n#endif\n\n#ifndef GL_EXT_direct_state_access\n#define GL_PROGRAM_MATRIX_EXT             0x8E2D\n#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT   0x8E2E\n#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F\n#endif\n\n#ifndef GL_EXT_vertex_array_bgra\n/* reuse GL_BGRA */\n#endif\n\n#ifndef GL_EXT_texture_swizzle\n#define GL_TEXTURE_SWIZZLE_R_EXT          0x8E42\n#define GL_TEXTURE_SWIZZLE_G_EXT          0x8E43\n#define GL_TEXTURE_SWIZZLE_B_EXT          0x8E44\n#define GL_TEXTURE_SWIZZLE_A_EXT          0x8E45\n#define GL_TEXTURE_SWIZZLE_RGBA_EXT       0x8E46\n#endif\n\n#ifndef GL_NV_explicit_multisample\n#define GL_SAMPLE_POSITION_NV             0x8E50\n#define GL_SAMPLE_MASK_NV                 0x8E51\n#define GL_SAMPLE_MASK_VALUE_NV           0x8E52\n#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53\n#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54\n#define GL_TEXTURE_RENDERBUFFER_NV        0x8E55\n#define GL_SAMPLER_RENDERBUFFER_NV        0x8E56\n#define GL_INT_SAMPLER_RENDERBUFFER_NV    0x8E57\n#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58\n#define GL_MAX_SAMPLE_MASK_WORDS_NV       0x8E59\n#endif\n\n#ifndef GL_NV_transform_feedback2\n#define GL_TRANSFORM_FEEDBACK_NV          0x8E22\n#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23\n#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24\n#define GL_TRANSFORM_FEEDBACK_BINDING_NV  0x8E25\n#endif\n\n#ifndef GL_ATI_meminfo\n#define GL_VBO_FREE_MEMORY_ATI            0x87FB\n#define GL_TEXTURE_FREE_MEMORY_ATI        0x87FC\n#define GL_RENDERBUFFER_FREE_MEMORY_ATI   0x87FD\n#endif\n\n#ifndef GL_AMD_performance_monitor\n#define GL_COUNTER_TYPE_AMD               0x8BC0\n#define GL_COUNTER_RANGE_AMD              0x8BC1\n#define GL_UNSIGNED_INT64_AMD             0x8BC2\n#define GL_PERCENTAGE_AMD                 0x8BC3\n#define GL_PERFMON_RESULT_AVAILABLE_AMD   0x8BC4\n#define GL_PERFMON_RESULT_SIZE_AMD        0x8BC5\n#define GL_PERFMON_RESULT_AMD             0x8BC6\n#endif\n\n#ifndef GL_AMD_texture_texture4\n#endif\n\n#ifndef GL_AMD_vertex_shader_tesselator\n#define GL_SAMPLER_BUFFER_AMD             0x9001\n#define GL_INT_SAMPLER_BUFFER_AMD         0x9002\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003\n#define GL_TESSELLATION_MODE_AMD          0x9004\n#define GL_TESSELLATION_FACTOR_AMD        0x9005\n#define GL_DISCRETE_AMD                   0x9006\n#define GL_CONTINUOUS_AMD                 0x9007\n#endif\n\n#ifndef GL_EXT_provoking_vertex\n#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C\n#define GL_FIRST_VERTEX_CONVENTION_EXT    0x8E4D\n#define GL_LAST_VERTEX_CONVENTION_EXT     0x8E4E\n#define GL_PROVOKING_VERTEX_EXT           0x8E4F\n#endif\n\n#ifndef GL_EXT_texture_snorm\n#define GL_ALPHA_SNORM                    0x9010\n#define GL_LUMINANCE_SNORM                0x9011\n#define GL_LUMINANCE_ALPHA_SNORM          0x9012\n#define GL_INTENSITY_SNORM                0x9013\n#define GL_ALPHA8_SNORM                   0x9014\n#define GL_LUMINANCE8_SNORM               0x9015\n#define GL_LUMINANCE8_ALPHA8_SNORM        0x9016\n#define GL_INTENSITY8_SNORM               0x9017\n#define GL_ALPHA16_SNORM                  0x9018\n#define GL_LUMINANCE16_SNORM              0x9019\n#define GL_LUMINANCE16_ALPHA16_SNORM      0x901A\n#define GL_INTENSITY16_SNORM              0x901B\n/* reuse GL_RED_SNORM */\n/* reuse GL_RG_SNORM */\n/* reuse GL_RGB_SNORM */\n/* reuse GL_RGBA_SNORM */\n/* reuse GL_R8_SNORM */\n/* reuse GL_RG8_SNORM */\n/* reuse GL_RGB8_SNORM */\n/* reuse GL_RGBA8_SNORM */\n/* reuse GL_R16_SNORM */\n/* reuse GL_RG16_SNORM */\n/* reuse GL_RGB16_SNORM */\n/* reuse GL_RGBA16_SNORM */\n/* reuse GL_SIGNED_NORMALIZED */\n#endif\n\n#ifndef GL_AMD_draw_buffers_blend\n#endif\n\n#ifndef GL_APPLE_texture_range\n#define GL_TEXTURE_RANGE_LENGTH_APPLE     0x85B7\n#define GL_TEXTURE_RANGE_POINTER_APPLE    0x85B8\n#define GL_TEXTURE_STORAGE_HINT_APPLE     0x85BC\n#define GL_STORAGE_PRIVATE_APPLE          0x85BD\n/* reuse GL_STORAGE_CACHED_APPLE */\n/* reuse GL_STORAGE_SHARED_APPLE */\n#endif\n\n#ifndef GL_APPLE_float_pixels\n#define GL_HALF_APPLE                     0x140B\n#define GL_RGBA_FLOAT32_APPLE             0x8814\n#define GL_RGB_FLOAT32_APPLE              0x8815\n#define GL_ALPHA_FLOAT32_APPLE            0x8816\n#define GL_INTENSITY_FLOAT32_APPLE        0x8817\n#define GL_LUMINANCE_FLOAT32_APPLE        0x8818\n#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE  0x8819\n#define GL_RGBA_FLOAT16_APPLE             0x881A\n#define GL_RGB_FLOAT16_APPLE              0x881B\n#define GL_ALPHA_FLOAT16_APPLE            0x881C\n#define GL_INTENSITY_FLOAT16_APPLE        0x881D\n#define GL_LUMINANCE_FLOAT16_APPLE        0x881E\n#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE  0x881F\n#define GL_COLOR_FLOAT_APPLE              0x8A0F\n#endif\n\n#ifndef GL_APPLE_vertex_program_evaluators\n#define GL_VERTEX_ATTRIB_MAP1_APPLE       0x8A00\n#define GL_VERTEX_ATTRIB_MAP2_APPLE       0x8A01\n#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE  0x8A02\n#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03\n#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04\n#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05\n#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE  0x8A06\n#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07\n#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08\n#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09\n#endif\n\n#ifndef GL_APPLE_aux_depth_stencil\n#define GL_AUX_DEPTH_STENCIL_APPLE        0x8A14\n#endif\n\n#ifndef GL_APPLE_object_purgeable\n#define GL_BUFFER_OBJECT_APPLE            0x85B3\n#define GL_RELEASED_APPLE                 0x8A19\n#define GL_VOLATILE_APPLE                 0x8A1A\n#define GL_RETAINED_APPLE                 0x8A1B\n#define GL_UNDEFINED_APPLE                0x8A1C\n#define GL_PURGEABLE_APPLE                0x8A1D\n#endif\n\n#ifndef GL_APPLE_row_bytes\n#define GL_PACK_ROW_BYTES_APPLE           0x8A15\n#define GL_UNPACK_ROW_BYTES_APPLE         0x8A16\n#endif\n\n#ifndef GL_APPLE_rgb_422\n#define GL_RGB_422_APPLE                  0x8A1F\n/* reuse GL_UNSIGNED_SHORT_8_8_APPLE */\n/* reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE */\n#endif\n\n#ifndef GL_NV_video_capture\n#define GL_VIDEO_BUFFER_NV                0x9020\n#define GL_VIDEO_BUFFER_BINDING_NV        0x9021\n#define GL_FIELD_UPPER_NV                 0x9022\n#define GL_FIELD_LOWER_NV                 0x9023\n#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV   0x9024\n#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025\n#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026\n#define GL_LAST_VIDEO_CAPTURE_STATUS_NV   0x9027\n#define GL_VIDEO_BUFFER_PITCH_NV          0x9028\n#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029\n#define GL_VIDEO_COLOR_CONVERSION_MAX_NV  0x902A\n#define GL_VIDEO_COLOR_CONVERSION_MIN_NV  0x902B\n#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C\n#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D\n#define GL_PARTIAL_SUCCESS_NV             0x902E\n#define GL_SUCCESS_NV                     0x902F\n#define GL_FAILURE_NV                     0x9030\n#define GL_YCBYCR8_422_NV                 0x9031\n#define GL_YCBAYCR8A_4224_NV              0x9032\n#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV  0x9033\n#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034\n#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV  0x9035\n#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036\n#define GL_Z4Y12Z4CB12Z4CR12_444_NV       0x9037\n#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV   0x9038\n#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV  0x9039\n#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A\n#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B\n#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C\n#endif\n\n#ifndef GL_NV_copy_image\n#endif\n\n#ifndef GL_EXT_separate_shader_objects\n#define GL_ACTIVE_PROGRAM_EXT             0x8B8D\n#endif\n\n#ifndef GL_NV_parameter_buffer_object2\n#endif\n\n#ifndef GL_NV_shader_buffer_load\n#define GL_BUFFER_GPU_ADDRESS_NV          0x8F1D\n#define GL_GPU_ADDRESS_NV                 0x8F34\n#define GL_MAX_SHADER_BUFFER_ADDRESS_NV   0x8F35\n#endif\n\n#ifndef GL_NV_vertex_buffer_unified_memory\n#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E\n#define GL_ELEMENT_ARRAY_UNIFIED_NV       0x8F1F\n#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20\n#define GL_VERTEX_ARRAY_ADDRESS_NV        0x8F21\n#define GL_NORMAL_ARRAY_ADDRESS_NV        0x8F22\n#define GL_COLOR_ARRAY_ADDRESS_NV         0x8F23\n#define GL_INDEX_ARRAY_ADDRESS_NV         0x8F24\n#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25\n#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV     0x8F26\n#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27\n#define GL_FOG_COORD_ARRAY_ADDRESS_NV     0x8F28\n#define GL_ELEMENT_ARRAY_ADDRESS_NV       0x8F29\n#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV  0x8F2A\n#define GL_VERTEX_ARRAY_LENGTH_NV         0x8F2B\n#define GL_NORMAL_ARRAY_LENGTH_NV         0x8F2C\n#define GL_COLOR_ARRAY_LENGTH_NV          0x8F2D\n#define GL_INDEX_ARRAY_LENGTH_NV          0x8F2E\n#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV  0x8F2F\n#define GL_EDGE_FLAG_ARRAY_LENGTH_NV      0x8F30\n#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31\n#define GL_FOG_COORD_ARRAY_LENGTH_NV      0x8F32\n#define GL_ELEMENT_ARRAY_LENGTH_NV        0x8F33\n#define GL_DRAW_INDIRECT_UNIFIED_NV       0x8F40\n#define GL_DRAW_INDIRECT_ADDRESS_NV       0x8F41\n#define GL_DRAW_INDIRECT_LENGTH_NV        0x8F42\n#endif\n\n#ifndef GL_NV_texture_barrier\n#endif\n\n#ifndef GL_AMD_shader_stencil_export\n#endif\n\n#ifndef GL_AMD_seamless_cubemap_per_texture\n/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */\n#endif\n\n#ifndef GL_AMD_conservative_depth\n#endif\n\n#ifndef GL_EXT_shader_image_load_store\n#define GL_MAX_IMAGE_UNITS_EXT            0x8F38\n#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39\n#define GL_IMAGE_BINDING_NAME_EXT         0x8F3A\n#define GL_IMAGE_BINDING_LEVEL_EXT        0x8F3B\n#define GL_IMAGE_BINDING_LAYERED_EXT      0x8F3C\n#define GL_IMAGE_BINDING_LAYER_EXT        0x8F3D\n#define GL_IMAGE_BINDING_ACCESS_EXT       0x8F3E\n#define GL_IMAGE_1D_EXT                   0x904C\n#define GL_IMAGE_2D_EXT                   0x904D\n#define GL_IMAGE_3D_EXT                   0x904E\n#define GL_IMAGE_2D_RECT_EXT              0x904F\n#define GL_IMAGE_CUBE_EXT                 0x9050\n#define GL_IMAGE_BUFFER_EXT               0x9051\n#define GL_IMAGE_1D_ARRAY_EXT             0x9052\n#define GL_IMAGE_2D_ARRAY_EXT             0x9053\n#define GL_IMAGE_CUBE_MAP_ARRAY_EXT       0x9054\n#define GL_IMAGE_2D_MULTISAMPLE_EXT       0x9055\n#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056\n#define GL_INT_IMAGE_1D_EXT               0x9057\n#define GL_INT_IMAGE_2D_EXT               0x9058\n#define GL_INT_IMAGE_3D_EXT               0x9059\n#define GL_INT_IMAGE_2D_RECT_EXT          0x905A\n#define GL_INT_IMAGE_CUBE_EXT             0x905B\n#define GL_INT_IMAGE_BUFFER_EXT           0x905C\n#define GL_INT_IMAGE_1D_ARRAY_EXT         0x905D\n#define GL_INT_IMAGE_2D_ARRAY_EXT         0x905E\n#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT   0x905F\n#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT   0x9060\n#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061\n#define GL_UNSIGNED_INT_IMAGE_1D_EXT      0x9062\n#define GL_UNSIGNED_INT_IMAGE_2D_EXT      0x9063\n#define GL_UNSIGNED_INT_IMAGE_3D_EXT      0x9064\n#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065\n#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT    0x9066\n#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT  0x9067\n#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068\n#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069\n#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C\n#define GL_MAX_IMAGE_SAMPLES_EXT          0x906D\n#define GL_IMAGE_BINDING_FORMAT_EXT       0x906E\n#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001\n#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT  0x00000002\n#define GL_UNIFORM_BARRIER_BIT_EXT        0x00000004\n#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT  0x00000008\n#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020\n#define GL_COMMAND_BARRIER_BIT_EXT        0x00000040\n#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT   0x00000080\n#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100\n#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT  0x00000200\n#define GL_FRAMEBUFFER_BARRIER_BIT_EXT    0x00000400\n#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800\n#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000\n#define GL_ALL_BARRIER_BITS_EXT           0xFFFFFFFF\n#endif\n\n#ifndef GL_EXT_vertex_attrib_64bit\n/* reuse GL_DOUBLE */\n#define GL_DOUBLE_VEC2_EXT                0x8FFC\n#define GL_DOUBLE_VEC3_EXT                0x8FFD\n#define GL_DOUBLE_VEC4_EXT                0x8FFE\n#define GL_DOUBLE_MAT2_EXT                0x8F46\n#define GL_DOUBLE_MAT3_EXT                0x8F47\n#define GL_DOUBLE_MAT4_EXT                0x8F48\n#define GL_DOUBLE_MAT2x3_EXT              0x8F49\n#define GL_DOUBLE_MAT2x4_EXT              0x8F4A\n#define GL_DOUBLE_MAT3x2_EXT              0x8F4B\n#define GL_DOUBLE_MAT3x4_EXT              0x8F4C\n#define GL_DOUBLE_MAT4x2_EXT              0x8F4D\n#define GL_DOUBLE_MAT4x3_EXT              0x8F4E\n#endif\n\n#ifndef GL_NV_gpu_program5\n#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A\n#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B\n#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C\n#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D\n#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F\n#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44\n#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV  0x8F45\n#endif\n\n#ifndef GL_NV_gpu_shader5\n#define GL_INT64_NV                       0x140E\n#define GL_UNSIGNED_INT64_NV              0x140F\n#define GL_INT8_NV                        0x8FE0\n#define GL_INT8_VEC2_NV                   0x8FE1\n#define GL_INT8_VEC3_NV                   0x8FE2\n#define GL_INT8_VEC4_NV                   0x8FE3\n#define GL_INT16_NV                       0x8FE4\n#define GL_INT16_VEC2_NV                  0x8FE5\n#define GL_INT16_VEC3_NV                  0x8FE6\n#define GL_INT16_VEC4_NV                  0x8FE7\n#define GL_INT64_VEC2_NV                  0x8FE9\n#define GL_INT64_VEC3_NV                  0x8FEA\n#define GL_INT64_VEC4_NV                  0x8FEB\n#define GL_UNSIGNED_INT8_NV               0x8FEC\n#define GL_UNSIGNED_INT8_VEC2_NV          0x8FED\n#define GL_UNSIGNED_INT8_VEC3_NV          0x8FEE\n#define GL_UNSIGNED_INT8_VEC4_NV          0x8FEF\n#define GL_UNSIGNED_INT16_NV              0x8FF0\n#define GL_UNSIGNED_INT16_VEC2_NV         0x8FF1\n#define GL_UNSIGNED_INT16_VEC3_NV         0x8FF2\n#define GL_UNSIGNED_INT16_VEC4_NV         0x8FF3\n#define GL_UNSIGNED_INT64_VEC2_NV         0x8FF5\n#define GL_UNSIGNED_INT64_VEC3_NV         0x8FF6\n#define GL_UNSIGNED_INT64_VEC4_NV         0x8FF7\n#define GL_FLOAT16_NV                     0x8FF8\n#define GL_FLOAT16_VEC2_NV                0x8FF9\n#define GL_FLOAT16_VEC3_NV                0x8FFA\n#define GL_FLOAT16_VEC4_NV                0x8FFB\n/* reuse GL_PATCHES */\n#endif\n\n#ifndef GL_NV_shader_buffer_store\n#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010\n/* reuse GL_READ_WRITE */\n/* reuse GL_WRITE_ONLY */\n#endif\n\n#ifndef GL_NV_tessellation_program5\n#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV   0x86D8\n#define GL_TESS_CONTROL_PROGRAM_NV        0x891E\n#define GL_TESS_EVALUATION_PROGRAM_NV     0x891F\n#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74\n#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75\n#endif\n\n#ifndef GL_NV_vertex_attrib_integer_64bit\n/* reuse GL_INT64_NV */\n/* reuse GL_UNSIGNED_INT64_NV */\n#endif\n\n#ifndef GL_NV_multisample_coverage\n#define GL_COVERAGE_SAMPLES_NV            0x80A9\n#define GL_COLOR_SAMPLES_NV               0x8E20\n#endif\n\n#ifndef GL_AMD_name_gen_delete\n#define GL_DATA_BUFFER_AMD                0x9151\n#define GL_PERFORMANCE_MONITOR_AMD        0x9152\n#define GL_QUERY_OBJECT_AMD               0x9153\n#define GL_VERTEX_ARRAY_OBJECT_AMD        0x9154\n#define GL_SAMPLER_OBJECT_AMD             0x9155\n#endif\n\n#ifndef GL_AMD_debug_output\n#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD   0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD  0x9144\n#define GL_DEBUG_LOGGED_MESSAGES_AMD      0x9145\n#define GL_DEBUG_SEVERITY_HIGH_AMD        0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM_AMD      0x9147\n#define GL_DEBUG_SEVERITY_LOW_AMD         0x9148\n#define GL_DEBUG_CATEGORY_API_ERROR_AMD   0x9149\n#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A\n#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B\n#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C\n#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D\n#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E\n#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F\n#define GL_DEBUG_CATEGORY_OTHER_AMD       0x9150\n#endif\n\n#ifndef GL_NV_vdpau_interop\n#define GL_SURFACE_STATE_NV               0x86EB\n#define GL_SURFACE_REGISTERED_NV          0x86FD\n#define GL_SURFACE_MAPPED_NV              0x8700\n#define GL_WRITE_DISCARD_NV               0x88BE\n#endif\n\n#ifndef GL_AMD_transform_feedback3_lines_triangles\n#endif\n\n#ifndef GL_AMD_depth_clamp_separate\n#define GL_DEPTH_CLAMP_NEAR_AMD           0x901E\n#define GL_DEPTH_CLAMP_FAR_AMD            0x901F\n#endif\n\n#ifndef GL_EXT_texture_sRGB_decode\n#define GL_TEXTURE_SRGB_DECODE_EXT        0x8A48\n#define GL_DECODE_EXT                     0x8A49\n#define GL_SKIP_DECODE_EXT                0x8A4A\n#endif\n\n#ifndef GL_NV_texture_multisample\n#define GL_TEXTURE_COVERAGE_SAMPLES_NV    0x9045\n#define GL_TEXTURE_COLOR_SAMPLES_NV       0x9046\n#endif\n\n#ifndef GL_AMD_blend_minmax_factor\n#define GL_FACTOR_MIN_AMD                 0x901C\n#define GL_FACTOR_MAX_AMD                 0x901D\n#endif\n\n#ifndef GL_AMD_sample_positions\n#define GL_SUBSAMPLE_DISTANCE_AMD         0x883F\n#endif\n\n#ifndef GL_EXT_x11_sync_object\n#define GL_SYNC_X11_FENCE_EXT             0x90E1\n#endif\n\n#ifndef GL_AMD_multi_draw_indirect\n#endif\n\n#ifndef GL_EXT_framebuffer_multisample_blit_scaled\n#define GL_SCALED_RESOLVE_FASTEST_EXT     0x90BA\n#define GL_SCALED_RESOLVE_NICEST_EXT      0x90BB\n#endif\n\n#ifndef GL_NV_path_rendering\n#define GL_PATH_FORMAT_SVG_NV             0x9070\n#define GL_PATH_FORMAT_PS_NV              0x9071\n#define GL_STANDARD_FONT_NAME_NV          0x9072\n#define GL_SYSTEM_FONT_NAME_NV            0x9073\n#define GL_FILE_NAME_NV                   0x9074\n#define GL_PATH_STROKE_WIDTH_NV           0x9075\n#define GL_PATH_END_CAPS_NV               0x9076\n#define GL_PATH_INITIAL_END_CAP_NV        0x9077\n#define GL_PATH_TERMINAL_END_CAP_NV       0x9078\n#define GL_PATH_JOIN_STYLE_NV             0x9079\n#define GL_PATH_MITER_LIMIT_NV            0x907A\n#define GL_PATH_DASH_CAPS_NV              0x907B\n#define GL_PATH_INITIAL_DASH_CAP_NV       0x907C\n#define GL_PATH_TERMINAL_DASH_CAP_NV      0x907D\n#define GL_PATH_DASH_OFFSET_NV            0x907E\n#define GL_PATH_CLIENT_LENGTH_NV          0x907F\n#define GL_PATH_FILL_MODE_NV              0x9080\n#define GL_PATH_FILL_MASK_NV              0x9081\n#define GL_PATH_FILL_COVER_MODE_NV        0x9082\n#define GL_PATH_STROKE_COVER_MODE_NV      0x9083\n#define GL_PATH_STROKE_MASK_NV            0x9084\n#define GL_COUNT_UP_NV                    0x9088\n#define GL_COUNT_DOWN_NV                  0x9089\n#define GL_PATH_OBJECT_BOUNDING_BOX_NV    0x908A\n#define GL_CONVEX_HULL_NV                 0x908B\n#define GL_BOUNDING_BOX_NV                0x908D\n#define GL_TRANSLATE_X_NV                 0x908E\n#define GL_TRANSLATE_Y_NV                 0x908F\n#define GL_TRANSLATE_2D_NV                0x9090\n#define GL_TRANSLATE_3D_NV                0x9091\n#define GL_AFFINE_2D_NV                   0x9092\n#define GL_AFFINE_3D_NV                   0x9094\n#define GL_TRANSPOSE_AFFINE_2D_NV         0x9096\n#define GL_TRANSPOSE_AFFINE_3D_NV         0x9098\n#define GL_UTF8_NV                        0x909A\n#define GL_UTF16_NV                       0x909B\n#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C\n#define GL_PATH_COMMAND_COUNT_NV          0x909D\n#define GL_PATH_COORD_COUNT_NV            0x909E\n#define GL_PATH_DASH_ARRAY_COUNT_NV       0x909F\n#define GL_PATH_COMPUTED_LENGTH_NV        0x90A0\n#define GL_PATH_FILL_BOUNDING_BOX_NV      0x90A1\n#define GL_PATH_STROKE_BOUNDING_BOX_NV    0x90A2\n#define GL_SQUARE_NV                      0x90A3\n#define GL_ROUND_NV                       0x90A4\n#define GL_TRIANGULAR_NV                  0x90A5\n#define GL_BEVEL_NV                       0x90A6\n#define GL_MITER_REVERT_NV                0x90A7\n#define GL_MITER_TRUNCATE_NV              0x90A8\n#define GL_SKIP_MISSING_GLYPH_NV          0x90A9\n#define GL_USE_MISSING_GLYPH_NV           0x90AA\n#define GL_PATH_ERROR_POSITION_NV         0x90AB\n#define GL_PATH_FOG_GEN_MODE_NV           0x90AC\n#define GL_ACCUM_ADJACENT_PAIRS_NV        0x90AD\n#define GL_ADJACENT_PAIRS_NV              0x90AE\n#define GL_FIRST_TO_REST_NV               0x90AF\n#define GL_PATH_GEN_MODE_NV               0x90B0\n#define GL_PATH_GEN_COEFF_NV              0x90B1\n#define GL_PATH_GEN_COLOR_FORMAT_NV       0x90B2\n#define GL_PATH_GEN_COMPONENTS_NV         0x90B3\n#define GL_PATH_STENCIL_FUNC_NV           0x90B7\n#define GL_PATH_STENCIL_REF_NV            0x90B8\n#define GL_PATH_STENCIL_VALUE_MASK_NV     0x90B9\n#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD\n#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE\n#define GL_PATH_COVER_DEPTH_FUNC_NV       0x90BF\n#define GL_PATH_DASH_OFFSET_RESET_NV      0x90B4\n#define GL_MOVE_TO_RESETS_NV              0x90B5\n#define GL_MOVE_TO_CONTINUES_NV           0x90B6\n#define GL_CLOSE_PATH_NV                  0x00\n#define GL_MOVE_TO_NV                     0x02\n#define GL_RELATIVE_MOVE_TO_NV            0x03\n#define GL_LINE_TO_NV                     0x04\n#define GL_RELATIVE_LINE_TO_NV            0x05\n#define GL_HORIZONTAL_LINE_TO_NV          0x06\n#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07\n#define GL_VERTICAL_LINE_TO_NV            0x08\n#define GL_RELATIVE_VERTICAL_LINE_TO_NV   0x09\n#define GL_QUADRATIC_CURVE_TO_NV          0x0A\n#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B\n#define GL_CUBIC_CURVE_TO_NV              0x0C\n#define GL_RELATIVE_CUBIC_CURVE_TO_NV     0x0D\n#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV   0x0E\n#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F\n#define GL_SMOOTH_CUBIC_CURVE_TO_NV       0x10\n#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11\n#define GL_SMALL_CCW_ARC_TO_NV            0x12\n#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV   0x13\n#define GL_SMALL_CW_ARC_TO_NV             0x14\n#define GL_RELATIVE_SMALL_CW_ARC_TO_NV    0x15\n#define GL_LARGE_CCW_ARC_TO_NV            0x16\n#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV   0x17\n#define GL_LARGE_CW_ARC_TO_NV             0x18\n#define GL_RELATIVE_LARGE_CW_ARC_TO_NV    0x19\n#define GL_RESTART_PATH_NV                0xF0\n#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV    0xF2\n#define GL_DUP_LAST_CUBIC_CURVE_TO_NV     0xF4\n#define GL_RECT_NV                        0xF6\n#define GL_CIRCULAR_CCW_ARC_TO_NV         0xF8\n#define GL_CIRCULAR_CW_ARC_TO_NV          0xFA\n#define GL_CIRCULAR_TANGENT_ARC_TO_NV     0xFC\n#define GL_ARC_TO_NV                      0xFE\n#define GL_RELATIVE_ARC_TO_NV             0xFF\n#define GL_BOLD_BIT_NV                    0x01\n#define GL_ITALIC_BIT_NV                  0x02\n#define GL_GLYPH_WIDTH_BIT_NV             0x01\n#define GL_GLYPH_HEIGHT_BIT_NV            0x02\n#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04\n#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08\n#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10\n#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20\n#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40\n#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80\n#define GL_GLYPH_HAS_KERNING_BIT_NV       0x100\n#define GL_FONT_X_MIN_BOUNDS_BIT_NV       0x00010000\n#define GL_FONT_Y_MIN_BOUNDS_BIT_NV       0x00020000\n#define GL_FONT_X_MAX_BOUNDS_BIT_NV       0x00040000\n#define GL_FONT_Y_MAX_BOUNDS_BIT_NV       0x00080000\n#define GL_FONT_UNITS_PER_EM_BIT_NV       0x00100000\n#define GL_FONT_ASCENDER_BIT_NV           0x00200000\n#define GL_FONT_DESCENDER_BIT_NV          0x00400000\n#define GL_FONT_HEIGHT_BIT_NV             0x00800000\n#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV  0x01000000\n#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000\n#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000\n#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000\n#define GL_FONT_HAS_KERNING_BIT_NV        0x10000000\n/* reuse GL_PRIMARY_COLOR */\n/* reuse GL_PRIMARY_COLOR_NV */\n/* reuse GL_SECONDARY_COLOR_NV */\n#endif\n\n#ifndef GL_AMD_pinned_memory\n#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160\n#endif\n\n#ifndef GL_AMD_stencil_operation_extended\n#define GL_SET_AMD                        0x874A\n#define GL_REPLACE_VALUE_AMD              0x874B\n#define GL_STENCIL_OP_VALUE_AMD           0x874C\n#define GL_STENCIL_BACK_OP_VALUE_AMD      0x874D\n#endif\n\n#ifndef GL_AMD_vertex_shader_viewport_index\n#endif\n\n#ifndef GL_AMD_vertex_shader_layer\n#endif\n\n#ifndef GL_NV_bindless_texture\n#endif\n\n#ifndef GL_NV_shader_atomic_float\n#endif\n\n#ifndef GL_AMD_query_buffer_object\n#define GL_QUERY_BUFFER_AMD               0x9192\n#define GL_QUERY_BUFFER_BINDING_AMD       0x9193\n#define GL_QUERY_RESULT_NO_WAIT_AMD       0x9194\n#endif\n\n#ifndef GL_NV_compute_program5\n#define GL_COMPUTE_PROGRAM_NV             0x90FB\n#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC\n#endif\n\n#ifndef GL_NV_shader_storage_buffer_object\n#endif\n\n#ifndef GL_NV_shader_atomic_counters\n#endif\n\n#ifndef GL_NV_deep_texture3D\n#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0\n#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV   0x90D1\n#endif\n\n#ifndef GL_NVX_conditional_render\n#endif\n\n#ifndef GL_AMD_sparse_texture\n#define GL_VIRTUAL_PAGE_SIZE_X_AMD        0x9195\n#define GL_VIRTUAL_PAGE_SIZE_Y_AMD        0x9196\n#define GL_VIRTUAL_PAGE_SIZE_Z_AMD        0x9197\n#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD    0x9198\n#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199\n#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A\n#define GL_MIN_SPARSE_LEVEL_AMD           0x919B\n#define GL_MIN_LOD_WARNING_AMD            0x919C\n#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001\n#endif\n\n#ifndef GL_AMD_shader_trinary_minmax\n#endif\n\n#ifndef GL_INTEL_map_texture\n#define GL_TEXTURE_MEMORY_LAYOUT_INTEL    0x83FF\n#define GL_LAYOUT_DEFAULT_INTEL           0\n#define GL_LAYOUT_LINEAR_INTEL            1\n#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2\n#endif\n\n#ifndef GL_NV_draw_texture\n#endif\n\n\n/*************************************************************/\n\n#include <stddef.h>\n#ifndef GL_VERSION_2_0\n/* GL type for program/shader text */\ntypedef char GLchar;\n#endif\n\n#ifndef GL_VERSION_1_5\n/* GL types for handling large vertex buffer objects */\ntypedef ptrdiff_t GLintptr;\ntypedef ptrdiff_t GLsizeiptr;\n#endif\n\n#ifndef GL_ARB_vertex_buffer_object\n/* GL types for handling large vertex buffer objects */\ntypedef ptrdiff_t GLintptrARB;\ntypedef ptrdiff_t GLsizeiptrARB;\n#endif\n\n#ifndef GL_ARB_shader_objects\n/* GL types for program/shader text and shader object handles */\ntypedef char GLcharARB;\ntypedef unsigned int GLhandleARB;\n#endif\n\n/* GL type for \"half\" precision (s10e5) float data in host memory */\n#ifndef GL_ARB_half_float_pixel\ntypedef unsigned short GLhalfARB;\n#endif\n\n#ifndef GL_NV_half_float\ntypedef unsigned short GLhalfNV;\n#endif\n\n#ifndef GLEXT_64_TYPES_DEFINED\n/* This code block is duplicated in glxext.h, so must be protected */\n#define GLEXT_64_TYPES_DEFINED\n/* Define int32_t, int64_t, and uint64_t types for UST/MSC */\n/* (as used in the GL_EXT_timer_query extension). */\n#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n#include <inttypes.h>\n#elif defined(__sun__) || defined(__digital__)\n#include <inttypes.h>\n#if defined(__STDC__)\n#if defined(__arch64__) || defined(_LP64)\ntypedef long int int64_t;\ntypedef unsigned long int uint64_t;\n#else\ntypedef long long int int64_t;\ntypedef unsigned long long int uint64_t;\n#endif /* __arch64__ */\n#endif /* __STDC__ */\n#elif defined( __VMS ) || defined(__sgi)\n#include <inttypes.h>\n#elif defined(__SCO__) || defined(__USLC__)\n#include <stdint.h>\n#elif defined(__UNIXOS2__) || defined(__SOL64__)\ntypedef long int int32_t;\ntypedef long long int int64_t;\ntypedef unsigned long long int uint64_t;\n#elif defined(_WIN32) && defined(__GNUC__)\n#include <stdint.h>\n#elif defined(_WIN32)\ntypedef __int32 int32_t;\ntypedef __int64 int64_t;\ntypedef unsigned __int64 uint64_t;\n#else\n/* Fallback if nothing above works */\n#include <inttypes.h>\n#endif\n#endif\n\n#ifndef GL_EXT_timer_query\ntypedef int64_t GLint64EXT;\ntypedef uint64_t GLuint64EXT;\n#endif\n\n#ifndef GL_ARB_sync\ntypedef int64_t GLint64;\ntypedef uint64_t GLuint64;\ntypedef struct __GLsync *GLsync;\n#endif\n\n#ifndef GL_ARB_cl_event\n/* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */\nstruct _cl_context;\nstruct _cl_event;\n#endif\n\n#ifndef GL_ARB_debug_output\ntypedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);\n#endif\n\n#ifndef GL_AMD_debug_output\ntypedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);\n#endif\n\n#ifndef GL_KHR_debug\ntypedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);\n#endif\n\n#ifndef GL_NV_vdpau_interop\ntypedef GLintptr GLvdpauSurfaceNV;\n#endif\n\n#ifndef GL_OES_fixed_point\n/* GLint must be 32 bits, a relatively safe assumption on modern CPUs */\ntypedef GLint GLfixed;\n#endif\n\n#ifndef GL_VERSION_1_2\n#define GL_VERSION_1_2 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\nGLAPI void APIENTRY glBlendEquation (GLenum mode);\nGLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);\nGLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);\nGLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table);\nGLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);\nGLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);\nGLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);\nGLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);\nGLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);\nGLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image);\nGLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);\nGLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);\nGLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);\nGLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);\nGLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glResetHistogram (GLenum target);\nGLAPI void APIENTRY glResetMinmax (GLenum target);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);\ntypedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);\n#endif\n\n#ifndef GL_VERSION_1_3\n#define GL_VERSION_1_3 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glActiveTexture (GLenum texture);\nGLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);\nGLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, GLvoid *img);\nGLAPI void APIENTRY glClientActiveTexture (GLenum texture);\nGLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);\nGLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);\nGLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);\nGLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);\nGLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);\nGLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);\nGLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);\nGLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);\nGLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);\nGLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);\nGLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);\nGLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);\nGLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\nGLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\nGLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);\nGLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\nGLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);\nGLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);\nGLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);\nGLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);\n#endif\n\n#ifndef GL_VERSION_1_4\n#define GL_VERSION_1_4 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\nGLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);\nGLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount);\nGLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);\nGLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glFogCoordf (GLfloat coord);\nGLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);\nGLAPI void APIENTRY glFogCoordd (GLdouble coord);\nGLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);\nGLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);\nGLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);\nGLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);\nGLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);\nGLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);\nGLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);\nGLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);\nGLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);\nGLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);\nGLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);\nGLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);\nGLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);\nGLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);\nGLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);\nGLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);\nGLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);\nGLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);\nGLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);\nGLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);\nGLAPI void APIENTRY glWindowPos2iv (const GLint *v);\nGLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);\nGLAPI void APIENTRY glWindowPos2sv (const GLshort *v);\nGLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glWindowPos3iv (const GLint *v);\nGLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glWindowPos3sv (const GLshort *v);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);\n#endif\n\n#ifndef GL_VERSION_1_5\n#define GL_VERSION_1_5 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);\nGLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);\nGLAPI GLboolean APIENTRY glIsQuery (GLuint id);\nGLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);\nGLAPI void APIENTRY glEndQuery (GLenum target);\nGLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);\nGLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);\nGLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);\nGLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);\nGLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);\nGLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);\nGLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);\nGLAPI GLvoid* APIENTRY glMapBuffer (GLenum target, GLenum access);\nGLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);\nGLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);\ntypedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);\ntypedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);\ntypedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);\ntypedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);\ntypedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);\ntypedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);\ntypedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);\n#endif\n\n#ifndef GL_VERSION_2_0\n#define GL_VERSION_2_0 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);\nGLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);\nGLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\nGLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);\nGLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);\nGLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);\nGLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);\nGLAPI void APIENTRY glCompileShader (GLuint shader);\nGLAPI GLuint APIENTRY glCreateProgram (void);\nGLAPI GLuint APIENTRY glCreateShader (GLenum type);\nGLAPI void APIENTRY glDeleteProgram (GLuint program);\nGLAPI void APIENTRY glDeleteShader (GLuint shader);\nGLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);\nGLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);\nGLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);\nGLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);\nGLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\nGLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\nGLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);\nGLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);\nGLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer);\nGLAPI GLboolean APIENTRY glIsProgram (GLuint program);\nGLAPI GLboolean APIENTRY glIsShader (GLuint shader);\nGLAPI void APIENTRY glLinkProgram (GLuint program);\nGLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);\nGLAPI void APIENTRY glUseProgram (GLuint program);\nGLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);\nGLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glUniform1i (GLint location, GLint v0);\nGLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glValidateProgram (GLuint program);\nGLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);\nGLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);\nGLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\nGLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);\ntypedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);\ntypedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\ntypedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);\ntypedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);\ntypedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);\ntypedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);\ntypedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);\ntypedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);\ntypedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);\ntypedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);\ntypedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\ntypedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\ntypedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);\ntypedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);\ntypedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);\ntypedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);\ntypedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);\n#endif\n\n#ifndef GL_VERSION_2_1\n#define GL_VERSION_2_1 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\n#endif\n\n#ifndef GL_VERSION_3_0\n#define GL_VERSION_3_0 1\n/* OpenGL 3.0 also reuses entry points from these extensions: */\n/* ARB_framebuffer_object */\n/* ARB_map_buffer_range */\n/* ARB_vertex_array_object */\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\nGLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);\nGLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);\nGLAPI void APIENTRY glEnablei (GLenum target, GLuint index);\nGLAPI void APIENTRY glDisablei (GLenum target, GLuint index);\nGLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);\nGLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);\nGLAPI void APIENTRY glEndTransformFeedback (void);\nGLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);\nGLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);\nGLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);\nGLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);\nGLAPI void APIENTRY glEndConditionalRender (void);\nGLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);\nGLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);\nGLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);\nGLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);\nGLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);\nGLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);\nGLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);\nGLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);\nGLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);\nGLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);\nGLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);\nGLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);\nGLAPI const GLubyte * APIENTRY glGetStringi (GLenum name, GLuint index);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\ntypedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);\ntypedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);\ntypedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);\ntypedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);\ntypedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);\ntypedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);\ntypedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);\ntypedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);\ntypedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);\n#endif\n\n#ifndef GL_VERSION_3_1\n#define GL_VERSION_3_1 1\n/* OpenGL 3.1 also reuses entry points from these extensions: */\n/* ARB_copy_buffer */\n/* ARB_uniform_buffer_object */\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);\nGLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount);\nGLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);\nGLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount);\ntypedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);\ntypedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);\n#endif\n\n#ifndef GL_VERSION_3_2\n#define GL_VERSION_3_2 1\n/* OpenGL 3.2 also reuses entry points from these extensions: */\n/* ARB_draw_elements_base_vertex */\n/* ARB_provoking_vertex */\n/* ARB_sync */\n/* ARB_texture_multisample */\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);\nGLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);\nGLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\n#endif\n\n#ifndef GL_VERSION_3_3\n#define GL_VERSION_3_3 1\n/* OpenGL 3.3 also reuses entry points from these extensions: */\n/* ARB_blend_func_extended */\n/* ARB_sampler_objects */\n/* ARB_explicit_attrib_location, but it has none */\n/* ARB_occlusion_query2 (no entry points) */\n/* ARB_shader_bit_encoding (no entry points) */\n/* ARB_texture_rgb10_a2ui (no entry points) */\n/* ARB_texture_swizzle (no entry points) */\n/* ARB_timer_query */\n/* ARB_vertex_type_2_10_10_10_rev */\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);\n#endif\n\n#ifndef GL_VERSION_4_0\n#define GL_VERSION_4_0 1\n/* OpenGL 4.0 also reuses entry points from these extensions: */\n/* ARB_texture_query_lod (no entry points) */\n/* ARB_draw_indirect */\n/* ARB_gpu_shader5 (no entry points) */\n/* ARB_gpu_shader_fp64 */\n/* ARB_shader_subroutine */\n/* ARB_tessellation_shader */\n/* ARB_texture_buffer_object_rgb32 (no entry points) */\n/* ARB_texture_cube_map_array (no entry points) */\n/* ARB_texture_gather (no entry points) */\n/* ARB_transform_feedback2 */\n/* ARB_transform_feedback3 */\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMinSampleShading (GLfloat value);\nGLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);\nGLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\nGLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);\nGLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\ntypedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\n#endif\n\n#ifndef GL_VERSION_4_1\n#define GL_VERSION_4_1 1\n/* OpenGL 4.1 reuses entry points from these extensions: */\n/* ARB_ES2_compatibility */\n/* ARB_get_program_binary */\n/* ARB_separate_shader_objects */\n/* ARB_shader_precision (no entry points) */\n/* ARB_vertex_attrib_64bit */\n/* ARB_viewport_array */\n#endif\n\n#ifndef GL_VERSION_4_2\n#define GL_VERSION_4_2 1\n/* OpenGL 4.2 reuses entry points from these extensions: */\n/* ARB_base_instance */\n/* ARB_shading_language_420pack (no entry points) */\n/* ARB_transform_feedback_instanced */\n/* ARB_compressed_texture_pixel_storage (no entry points) */\n/* ARB_conservative_depth (no entry points) */\n/* ARB_internalformat_query */\n/* ARB_map_buffer_alignment (no entry points) */\n/* ARB_shader_atomic_counters */\n/* ARB_shader_image_load_store */\n/* ARB_shading_language_packing (no entry points) */\n/* ARB_texture_storage */\n#endif\n\n#ifndef GL_VERSION_4_3\n#define GL_VERSION_4_3 1\n/* OpenGL 4.3 reuses entry points from these extensions: */\n/* ARB_arrays_of_arrays (no entry points, GLSL only) */\n/* ARB_fragment_layer_viewport (no entry points, GLSL only) */\n/* ARB_shader_image_size (no entry points, GLSL only) */\n/* ARB_ES3_compatibility (no entry points) */\n/* ARB_clear_buffer_object */\n/* ARB_compute_shader */\n/* ARB_copy_image */\n/* KHR_debug (includes ARB_debug_output commands promoted to KHR without suffixes) */\n/* ARB_explicit_uniform_location (no entry points) */\n/* ARB_framebuffer_no_attachments */\n/* ARB_internalformat_query2 */\n/* ARB_invalidate_subdata */\n/* ARB_multi_draw_indirect */\n/* ARB_program_interface_query */\n/* ARB_robust_buffer_access_behavior (no entry points) */\n/* ARB_shader_storage_buffer_object */\n/* ARB_stencil_texturing (no entry points) */\n/* ARB_texture_buffer_range */\n/* ARB_texture_query_levels (no entry points) */\n/* ARB_texture_storage_multisample */\n/* ARB_texture_view */\n/* ARB_vertex_attrib_binding */\n#endif\n\n#ifndef GL_ARB_multitexture\n#define GL_ARB_multitexture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glActiveTextureARB (GLenum texture);\nGLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);\nGLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);\nGLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);\nGLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);\nGLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);\nGLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);\nGLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);\nGLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);\nGLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);\nGLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);\nGLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);\nGLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);\nGLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);\nGLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\nGLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\nGLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);\nGLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\nGLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);\n#endif\n\n#ifndef GL_ARB_transpose_matrix\n#define GL_ARB_transpose_matrix 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);\nGLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);\nGLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);\nGLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);\n#endif\n\n#ifndef GL_ARB_multisample\n#define GL_ARB_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert);\n#endif\n\n#ifndef GL_ARB_texture_env_add\n#define GL_ARB_texture_env_add 1\n#endif\n\n#ifndef GL_ARB_texture_cube_map\n#define GL_ARB_texture_cube_map 1\n#endif\n\n#ifndef GL_ARB_texture_compression\n#define GL_ARB_texture_compression 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);\nGLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);\n#endif\n\n#ifndef GL_ARB_texture_border_clamp\n#define GL_ARB_texture_border_clamp 1\n#endif\n\n#ifndef GL_ARB_point_parameters\n#define GL_ARB_point_parameters 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);\n#endif\n\n#ifndef GL_ARB_vertex_blend\n#define GL_ARB_vertex_blend 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);\nGLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);\nGLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);\nGLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);\nGLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);\nGLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);\nGLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);\nGLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);\nGLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glVertexBlendARB (GLint count);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);\n#endif\n\n#ifndef GL_ARB_matrix_palette\n#define GL_ARB_matrix_palette 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);\nGLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);\nGLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);\nGLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);\nGLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif\n\n#ifndef GL_ARB_texture_env_combine\n#define GL_ARB_texture_env_combine 1\n#endif\n\n#ifndef GL_ARB_texture_env_crossbar\n#define GL_ARB_texture_env_crossbar 1\n#endif\n\n#ifndef GL_ARB_texture_env_dot3\n#define GL_ARB_texture_env_dot3 1\n#endif\n\n#ifndef GL_ARB_texture_mirrored_repeat\n#define GL_ARB_texture_mirrored_repeat 1\n#endif\n\n#ifndef GL_ARB_depth_texture\n#define GL_ARB_depth_texture 1\n#endif\n\n#ifndef GL_ARB_shadow\n#define GL_ARB_shadow 1\n#endif\n\n#ifndef GL_ARB_shadow_ambient\n#define GL_ARB_shadow_ambient 1\n#endif\n\n#ifndef GL_ARB_window_pos\n#define GL_ARB_window_pos 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);\nGLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);\nGLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);\nGLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);\nGLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);\nGLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);\nGLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);\nGLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);\n#endif\n\n#ifndef GL_ARB_vertex_program\n#define GL_ARB_vertex_program 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);\nGLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);\nGLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\nGLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);\nGLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);\nGLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string);\nGLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);\nGLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);\nGLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);\nGLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);\nGLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);\nGLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);\nGLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);\nGLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string);\nGLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer);\nGLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);\ntypedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);\ntypedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);\n#endif\n\n#ifndef GL_ARB_fragment_program\n#define GL_ARB_fragment_program 1\n/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */\n#endif\n\n#ifndef GL_ARB_vertex_buffer_object\n#define GL_ARB_vertex_buffer_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);\nGLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);\nGLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);\nGLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);\nGLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);\nGLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);\nGLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);\nGLAPI GLvoid* APIENTRY glMapBufferARB (GLenum target, GLenum access);\nGLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);\nGLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);\ntypedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);\ntypedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);\ntypedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);\ntypedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);\ntypedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);\ntypedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);\n#endif\n\n#ifndef GL_ARB_occlusion_query\n#define GL_ARB_occlusion_query 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);\nGLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);\nGLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);\nGLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);\nGLAPI void APIENTRY glEndQueryARB (GLenum target);\nGLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);\ntypedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);\n#endif\n\n#ifndef GL_ARB_shader_objects\n#define GL_ARB_shader_objects 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);\nGLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);\nGLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);\nGLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);\nGLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);\nGLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);\nGLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);\nGLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);\nGLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);\nGLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);\nGLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);\nGLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);\nGLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);\nGLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);\nGLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);\nGLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);\nGLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\nGLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);\nGLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);\nGLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);\ntypedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);\ntypedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);\ntypedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);\ntypedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);\ntypedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);\ntypedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);\ntypedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);\ntypedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);\ntypedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);\ntypedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);\ntypedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);\ntypedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);\ntypedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\ntypedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);\n#endif\n\n#ifndef GL_ARB_vertex_shader\n#define GL_ARB_vertex_shader 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);\nGLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\nGLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\ntypedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);\n#endif\n\n#ifndef GL_ARB_fragment_shader\n#define GL_ARB_fragment_shader 1\n#endif\n\n#ifndef GL_ARB_shading_language_100\n#define GL_ARB_shading_language_100 1\n#endif\n\n#ifndef GL_ARB_texture_non_power_of_two\n#define GL_ARB_texture_non_power_of_two 1\n#endif\n\n#ifndef GL_ARB_point_sprite\n#define GL_ARB_point_sprite 1\n#endif\n\n#ifndef GL_ARB_fragment_program_shadow\n#define GL_ARB_fragment_program_shadow 1\n#endif\n\n#ifndef GL_ARB_draw_buffers\n#define GL_ARB_draw_buffers 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);\n#endif\n\n#ifndef GL_ARB_texture_rectangle\n#define GL_ARB_texture_rectangle 1\n#endif\n\n#ifndef GL_ARB_color_buffer_float\n#define GL_ARB_color_buffer_float 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);\n#endif\n\n#ifndef GL_ARB_half_float_pixel\n#define GL_ARB_half_float_pixel 1\n#endif\n\n#ifndef GL_ARB_texture_float\n#define GL_ARB_texture_float 1\n#endif\n\n#ifndef GL_ARB_pixel_buffer_object\n#define GL_ARB_pixel_buffer_object 1\n#endif\n\n#ifndef GL_ARB_depth_buffer_float\n#define GL_ARB_depth_buffer_float 1\n#endif\n\n#ifndef GL_ARB_draw_instanced\n#define GL_ARB_draw_instanced 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\nGLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);\n#endif\n\n#ifndef GL_ARB_framebuffer_object\n#define GL_ARB_framebuffer_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);\nGLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);\nGLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);\nGLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);\nGLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);\nGLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);\nGLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);\nGLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);\nGLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\nGLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGenerateMipmap (GLenum target);\nGLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\nGLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);\ntypedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);\ntypedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\n#endif\n\n#ifndef GL_ARB_framebuffer_sRGB\n#define GL_ARB_framebuffer_sRGB 1\n#endif\n\n#ifndef GL_ARB_geometry_shader4\n#define GL_ARB_geometry_shader4 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);\nGLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#endif\n\n#ifndef GL_ARB_half_float_vertex\n#define GL_ARB_half_float_vertex 1\n#endif\n\n#ifndef GL_ARB_instanced_arrays\n#define GL_ARB_instanced_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);\n#endif\n\n#ifndef GL_ARB_map_buffer_range\n#define GL_ARB_map_buffer_range 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLvoid* APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\nGLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\ntypedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);\n#endif\n\n#ifndef GL_ARB_texture_buffer_object\n#define GL_ARB_texture_buffer_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);\n#endif\n\n#ifndef GL_ARB_texture_compression_rgtc\n#define GL_ARB_texture_compression_rgtc 1\n#endif\n\n#ifndef GL_ARB_texture_rg\n#define GL_ARB_texture_rg 1\n#endif\n\n#ifndef GL_ARB_vertex_array_object\n#define GL_ARB_vertex_array_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindVertexArray (GLuint array);\nGLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);\nGLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);\nGLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);\ntypedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);\ntypedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);\ntypedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);\n#endif\n\n#ifndef GL_ARB_uniform_buffer_object\n#define GL_ARB_uniform_buffer_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices);\nGLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);\nGLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);\nGLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);\nGLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);\ntypedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);\ntypedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);\n#endif\n\n#ifndef GL_ARB_compatibility\n#define GL_ARB_compatibility 1\n#endif\n\n#ifndef GL_ARB_copy_buffer\n#define GL_ARB_copy_buffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\n#endif\n\n#ifndef GL_ARB_shader_texture_lod\n#define GL_ARB_shader_texture_lod 1\n#endif\n\n#ifndef GL_ARB_depth_clamp\n#define GL_ARB_depth_clamp 1\n#endif\n\n#ifndef GL_ARB_draw_elements_base_vertex\n#define GL_ARB_draw_elements_base_vertex 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);\nGLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);\nGLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex);\nGLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex);\n#endif\n\n#ifndef GL_ARB_fragment_coord_conventions\n#define GL_ARB_fragment_coord_conventions 1\n#endif\n\n#ifndef GL_ARB_provoking_vertex\n#define GL_ARB_provoking_vertex 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProvokingVertex (GLenum mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);\n#endif\n\n#ifndef GL_ARB_seamless_cube_map\n#define GL_ARB_seamless_cube_map 1\n#endif\n\n#ifndef GL_ARB_sync\n#define GL_ARB_sync 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);\nGLAPI GLboolean APIENTRY glIsSync (GLsync sync);\nGLAPI void APIENTRY glDeleteSync (GLsync sync);\nGLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *params);\nGLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);\ntypedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);\ntypedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);\ntypedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params);\ntypedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\n#endif\n\n#ifndef GL_ARB_texture_multisample\n#define GL_ARB_texture_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);\nGLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);\ntypedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask);\n#endif\n\n#ifndef GL_ARB_vertex_array_bgra\n#define GL_ARB_vertex_array_bgra 1\n#endif\n\n#ifndef GL_ARB_draw_buffers_blend\n#define GL_ARB_draw_buffers_blend 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);\nGLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\nGLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);\nGLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\ntypedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\n#endif\n\n#ifndef GL_ARB_sample_shading\n#define GL_ARB_sample_shading 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);\n#endif\n\n#ifndef GL_ARB_texture_cube_map_array\n#define GL_ARB_texture_cube_map_array 1\n#endif\n\n#ifndef GL_ARB_texture_gather\n#define GL_ARB_texture_gather 1\n#endif\n\n#ifndef GL_ARB_texture_query_lod\n#define GL_ARB_texture_query_lod 1\n#endif\n\n#ifndef GL_ARB_shading_language_include\n#define GL_ARB_shading_language_include 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);\nGLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);\nGLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length);\nGLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);\nGLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);\nGLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);\ntypedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);\ntypedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length);\ntypedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);\ntypedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);\n#endif\n\n#ifndef GL_ARB_texture_compression_bptc\n#define GL_ARB_texture_compression_bptc 1\n#endif\n\n#ifndef GL_ARB_blend_func_extended\n#define GL_ARB_blend_func_extended 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);\nGLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);\n#endif\n\n#ifndef GL_ARB_explicit_attrib_location\n#define GL_ARB_explicit_attrib_location 1\n#endif\n\n#ifndef GL_ARB_occlusion_query2\n#define GL_ARB_occlusion_query2 1\n#endif\n\n#ifndef GL_ARB_sampler_objects\n#define GL_ARB_sampler_objects 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);\nGLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);\nGLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);\nGLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);\nGLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);\nGLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);\nGLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);\nGLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);\nGLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);\nGLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);\ntypedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);\ntypedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);\ntypedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);\n#endif\n\n#ifndef GL_ARB_shader_bit_encoding\n#define GL_ARB_shader_bit_encoding 1\n#endif\n\n#ifndef GL_ARB_texture_rgb10_a2ui\n#define GL_ARB_texture_rgb10_a2ui 1\n#endif\n\n#ifndef GL_ARB_texture_swizzle\n#define GL_ARB_texture_swizzle 1\n#endif\n\n#ifndef GL_ARB_timer_query\n#define GL_ARB_timer_query 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);\nGLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);\nGLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);\n#endif\n\n#ifndef GL_ARB_vertex_type_2_10_10_10_rev\n#define GL_ARB_vertex_type_2_10_10_10_rev 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);\nGLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);\nGLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);\nGLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);\nGLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);\nGLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);\nGLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);\nGLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);\nGLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);\nGLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);\nGLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);\nGLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);\nGLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);\ntypedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);\ntypedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);\ntypedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);\ntypedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\n#endif\n\n#ifndef GL_ARB_draw_indirect\n#define GL_ARB_draw_indirect 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const GLvoid *indirect);\nGLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect);\n#endif\n\n#ifndef GL_ARB_gpu_shader5\n#define GL_ARB_gpu_shader5 1\n#endif\n\n#ifndef GL_ARB_gpu_shader_fp64\n#define GL_ARB_gpu_shader_fp64 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);\nGLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);\ntypedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);\n#endif\n\n#ifndef GL_ARB_shader_subroutine\n#define GL_ARB_shader_subroutine 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);\nGLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);\nGLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);\nGLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\nGLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\nGLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);\nGLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);\nGLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);\ntypedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);\ntypedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\ntypedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);\ntypedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);\n#endif\n\n#ifndef GL_ARB_tessellation_shader\n#define GL_ARB_tessellation_shader 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);\nGLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);\n#endif\n\n#ifndef GL_ARB_texture_buffer_object_rgb32\n#define GL_ARB_texture_buffer_object_rgb32 1\n#endif\n\n#ifndef GL_ARB_transform_feedback2\n#define GL_ARB_transform_feedback2 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);\nGLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);\nGLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);\nGLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);\nGLAPI void APIENTRY glPauseTransformFeedback (void);\nGLAPI void APIENTRY glResumeTransformFeedback (void);\nGLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);\ntypedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);\ntypedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);\n#endif\n\n#ifndef GL_ARB_transform_feedback3\n#define GL_ARB_transform_feedback3 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);\nGLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);\nGLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);\nGLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);\ntypedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);\ntypedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);\n#endif\n\n#ifndef GL_ARB_ES2_compatibility\n#define GL_ARB_ES2_compatibility 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glReleaseShaderCompiler (void);\nGLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);\nGLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);\nGLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);\nGLAPI void APIENTRY glClearDepthf (GLfloat d);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);\ntypedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);\ntypedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);\n#endif\n\n#ifndef GL_ARB_get_program_binary\n#define GL_ARB_get_program_binary 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);\nGLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);\nGLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);\ntypedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);\n#endif\n\n#ifndef GL_ARB_separate_shader_objects\n#define GL_ARB_separate_shader_objects 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);\nGLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);\nGLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* const *strings);\nGLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);\nGLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);\nGLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);\nGLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);\nGLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);\nGLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);\nGLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);\nGLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);\nGLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);\nGLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);\nGLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);\nGLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);\nGLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);\nGLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);\ntypedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);\ntypedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* const *strings);\ntypedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);\ntypedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\n#endif\n\n#ifndef GL_ARB_vertex_attrib_64bit\n#define GL_ARB_vertex_attrib_64bit 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);\n#endif\n\n#ifndef GL_ARB_viewport_array\n#define GL_ARB_viewport_array 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);\nGLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);\nGLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);\nGLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);\nGLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);\ntypedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);\ntypedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);\ntypedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);\n#endif\n\n#ifndef GL_ARB_cl_event\n#define GL_ARB_cl_event 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags);\n#endif\n\n#ifndef GL_ARB_debug_output\n#define GL_ARB_debug_output 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\nGLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam);\nGLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam);\ntypedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\n#endif\n\n#ifndef GL_ARB_robustness\n#define GL_ARB_robustness 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);\nGLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);\nGLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);\nGLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);\nGLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);\nGLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);\nGLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);\nGLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);\nGLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table);\nGLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image);\nGLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span);\nGLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);\nGLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);\nGLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img);\nGLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);\nGLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img);\nGLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\nGLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);\nGLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);\nGLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);\ntypedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);\ntypedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);\ntypedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);\ntypedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);\ntypedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);\ntypedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);\ntypedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);\ntypedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table);\ntypedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image);\ntypedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span);\ntypedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);\ntypedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);\ntypedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img);\ntypedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);\ntypedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);\n#endif\n\n#ifndef GL_ARB_shader_stencil_export\n#define GL_ARB_shader_stencil_export 1\n#endif\n\n#ifndef GL_ARB_base_instance\n#define GL_ARB_base_instance 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);\nGLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);\nGLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);\n#endif\n\n#ifndef GL_ARB_shading_language_420pack\n#define GL_ARB_shading_language_420pack 1\n#endif\n\n#ifndef GL_ARB_transform_feedback_instanced\n#define GL_ARB_transform_feedback_instanced 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);\nGLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);\n#endif\n\n#ifndef GL_ARB_compressed_texture_pixel_storage\n#define GL_ARB_compressed_texture_pixel_storage 1\n#endif\n\n#ifndef GL_ARB_conservative_depth\n#define GL_ARB_conservative_depth 1\n#endif\n\n#ifndef GL_ARB_internalformat_query\n#define GL_ARB_internalformat_query 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);\n#endif\n\n#ifndef GL_ARB_map_buffer_alignment\n#define GL_ARB_map_buffer_alignment 1\n#endif\n\n#ifndef GL_ARB_shader_atomic_counters\n#define GL_ARB_shader_atomic_counters 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);\n#endif\n\n#ifndef GL_ARB_shader_image_load_store\n#define GL_ARB_shader_image_load_store 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);\nGLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);\ntypedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);\n#endif\n\n#ifndef GL_ARB_shading_language_packing\n#define GL_ARB_shading_language_packing 1\n#endif\n\n#ifndef GL_ARB_texture_storage\n#define GL_ARB_texture_storage 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\nGLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\n#endif\n\n#ifndef GL_KHR_texture_compression_astc_ldr\n#define GL_KHR_texture_compression_astc_ldr 1\n#endif\n\n#ifndef GL_KHR_debug\n#define GL_KHR_debug 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\nGLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);\nGLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\nGLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);\nGLAPI void APIENTRY glPopDebugGroup (void);\nGLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\nGLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\nGLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);\nGLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);\ntypedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\ntypedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);\ntypedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);\ntypedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\ntypedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\ntypedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);\ntypedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif\n\n#ifndef GL_ARB_arrays_of_arrays\n#define GL_ARB_arrays_of_arrays 1\n#endif\n\n#ifndef GL_ARB_clear_buffer_object\n#define GL_ARB_clear_buffer_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data);\n#endif\n\n#ifndef GL_ARB_compute_shader\n#define GL_ARB_compute_shader 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);\nGLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);\ntypedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);\n#endif\n\n#ifndef GL_ARB_copy_image\n#define GL_ARB_copy_image 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);\n#endif\n\n#ifndef GL_ARB_texture_view\n#define GL_ARB_texture_view 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);\n#endif\n\n#ifndef GL_ARB_vertex_attrib_binding\n#define GL_ARB_vertex_attrib_binding 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\nGLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);\nGLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);\nGLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\nGLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);\nGLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);\ntypedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);\n#endif\n\n#ifndef GL_ARB_robustness_isolation\n#define GL_ARB_robustness_isolation 1\n#endif\n\n#ifndef GL_ARB_ES3_compatibility\n#define GL_ARB_ES3_compatibility 1\n#endif\n\n#ifndef GL_ARB_explicit_uniform_location\n#define GL_ARB_explicit_uniform_location 1\n#endif\n\n#ifndef GL_ARB_fragment_layer_viewport\n#define GL_ARB_fragment_layer_viewport 1\n#endif\n\n#ifndef GL_ARB_framebuffer_no_attachments\n#define GL_ARB_framebuffer_no_attachments 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);\nGLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);\n#endif\n\n#ifndef GL_ARB_internalformat_query2\n#define GL_ARB_internalformat_query2 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);\n#endif\n\n#ifndef GL_ARB_invalidate_subdata\n#define GL_ARB_invalidate_subdata 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);\nGLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);\nGLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);\nGLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);\nGLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);\nGLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);\ntypedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);\n#endif\n\n#ifndef GL_ARB_multi_draw_indirect\n#define GL_ARB_multi_draw_indirect 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);\nGLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);\n#endif\n\n#ifndef GL_ARB_program_interface_query\n#define GL_ARB_program_interface_query 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);\nGLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);\nGLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);\nGLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);\nGLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);\nGLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);\ntypedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);\ntypedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);\n#endif\n\n#ifndef GL_ARB_robust_buffer_access_behavior\n#define GL_ARB_robust_buffer_access_behavior 1\n#endif\n\n#ifndef GL_ARB_shader_image_size\n#define GL_ARB_shader_image_size 1\n#endif\n\n#ifndef GL_ARB_shader_storage_buffer_object\n#define GL_ARB_shader_storage_buffer_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);\n#endif\n\n#ifndef GL_ARB_stencil_texturing\n#define GL_ARB_stencil_texturing 1\n#endif\n\n#ifndef GL_ARB_texture_buffer_range\n#define GL_ARB_texture_buffer_range 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\n#endif\n\n#ifndef GL_ARB_texture_query_levels\n#define GL_ARB_texture_query_levels 1\n#endif\n\n#ifndef GL_ARB_texture_storage_multisample\n#define GL_ARB_texture_storage_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\n#endif\n\n#ifndef GL_EXT_abgr\n#define GL_EXT_abgr 1\n#endif\n\n#ifndef GL_EXT_blend_color\n#define GL_EXT_blend_color 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\n#endif\n\n#ifndef GL_EXT_polygon_offset\n#define GL_EXT_polygon_offset 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);\n#endif\n\n#ifndef GL_EXT_texture\n#define GL_EXT_texture 1\n#endif\n\n#ifndef GL_EXT_texture3D\n#define GL_EXT_texture3D 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);\n#endif\n\n#ifndef GL_SGIS_texture_filter4\n#define GL_SGIS_texture_filter4 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);\nGLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);\ntypedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);\n#endif\n\n#ifndef GL_EXT_subtexture\n#define GL_EXT_subtexture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);\n#endif\n\n#ifndef GL_EXT_copy_texture\n#define GL_EXT_copy_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\nGLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#endif\n\n#ifndef GL_EXT_histogram\n#define GL_EXT_histogram 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);\nGLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);\nGLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glResetHistogramEXT (GLenum target);\nGLAPI void APIENTRY glResetMinmaxEXT (GLenum target);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);\n#endif\n\n#ifndef GL_EXT_convolution\n#define GL_EXT_convolution 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);\nGLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);\nGLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);\nGLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);\nGLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image);\nGLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);\nGLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);\ntypedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);\n#endif\n\n#ifndef GL_SGI_color_matrix\n#define GL_SGI_color_matrix 1\n#endif\n\n#ifndef GL_SGI_color_table\n#define GL_SGI_color_table 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);\nGLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table);\nGLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);\n#endif\n\n#ifndef GL_SGIX_pixel_texture\n#define GL_SGIX_pixel_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);\n#endif\n\n#ifndef GL_SGIS_pixel_texture\n#define GL_SGIS_pixel_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);\nGLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);\n#endif\n\n#ifndef GL_SGIS_texture4D\n#define GL_SGIS_texture4D 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels);\n#endif\n\n#ifndef GL_SGI_texture_color_table\n#define GL_SGI_texture_color_table 1\n#endif\n\n#ifndef GL_EXT_cmyka\n#define GL_EXT_cmyka 1\n#endif\n\n#ifndef GL_EXT_texture_object\n#define GL_EXT_texture_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);\nGLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);\nGLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);\nGLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);\nGLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);\nGLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);\ntypedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);\ntypedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);\ntypedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);\ntypedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);\ntypedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);\n#endif\n\n#ifndef GL_SGIS_detail_texture\n#define GL_SGIS_detail_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);\nGLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);\n#endif\n\n#ifndef GL_SGIS_sharpen_texture\n#define GL_SGIS_sharpen_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);\nGLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);\n#endif\n\n#ifndef GL_EXT_packed_pixels\n#define GL_EXT_packed_pixels 1\n#endif\n\n#ifndef GL_SGIS_texture_lod\n#define GL_SGIS_texture_lod 1\n#endif\n\n#ifndef GL_SGIS_multisample\n#define GL_SGIS_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);\nGLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);\n#endif\n\n#ifndef GL_EXT_rescale_normal\n#define GL_EXT_rescale_normal 1\n#endif\n\n#ifndef GL_EXT_vertex_array\n#define GL_EXT_vertex_array 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glArrayElementEXT (GLint i);\nGLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\nGLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);\nGLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);\nGLAPI void APIENTRY glGetPointervEXT (GLenum pname, GLvoid* *params);\nGLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\nGLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\nGLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\nGLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);\ntypedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);\ntypedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);\ntypedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);\n#endif\n\n#ifndef GL_EXT_misc_attribute\n#define GL_EXT_misc_attribute 1\n#endif\n\n#ifndef GL_SGIS_generate_mipmap\n#define GL_SGIS_generate_mipmap 1\n#endif\n\n#ifndef GL_SGIX_clipmap\n#define GL_SGIX_clipmap 1\n#endif\n\n#ifndef GL_SGIX_shadow\n#define GL_SGIX_shadow 1\n#endif\n\n#ifndef GL_SGIS_texture_edge_clamp\n#define GL_SGIS_texture_edge_clamp 1\n#endif\n\n#ifndef GL_SGIS_texture_border_clamp\n#define GL_SGIS_texture_border_clamp 1\n#endif\n\n#ifndef GL_EXT_blend_minmax\n#define GL_EXT_blend_minmax 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationEXT (GLenum mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);\n#endif\n\n#ifndef GL_EXT_blend_subtract\n#define GL_EXT_blend_subtract 1\n#endif\n\n#ifndef GL_EXT_blend_logic_op\n#define GL_EXT_blend_logic_op 1\n#endif\n\n#ifndef GL_SGIX_interlace\n#define GL_SGIX_interlace 1\n#endif\n\n#ifndef GL_SGIX_pixel_tiles\n#define GL_SGIX_pixel_tiles 1\n#endif\n\n#ifndef GL_SGIX_texture_select\n#define GL_SGIX_texture_select 1\n#endif\n\n#ifndef GL_SGIX_sprite\n#define GL_SGIX_sprite 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);\nGLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);\n#endif\n\n#ifndef GL_SGIX_texture_multi_buffer\n#define GL_SGIX_texture_multi_buffer 1\n#endif\n\n#ifndef GL_EXT_point_parameters\n#define GL_EXT_point_parameters 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);\n#endif\n\n#ifndef GL_SGIS_point_parameters\n#define GL_SGIS_point_parameters 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);\n#endif\n\n#ifndef GL_SGIX_instruments\n#define GL_SGIX_instruments 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLint APIENTRY glGetInstrumentsSGIX (void);\nGLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);\nGLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);\nGLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);\nGLAPI void APIENTRY glStartInstrumentsSGIX (void);\nGLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);\ntypedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);\ntypedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);\ntypedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);\ntypedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);\ntypedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);\n#endif\n\n#ifndef GL_SGIX_texture_scale_bias\n#define GL_SGIX_texture_scale_bias 1\n#endif\n\n#ifndef GL_SGIX_framezoom\n#define GL_SGIX_framezoom 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFrameZoomSGIX (GLint factor);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);\n#endif\n\n#ifndef GL_SGIX_tag_sample_buffer\n#define GL_SGIX_tag_sample_buffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTagSampleBufferSGIX (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);\n#endif\n\n#ifndef GL_SGIX_polynomial_ffd\n#define GL_SGIX_polynomial_ffd 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);\nGLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);\nGLAPI void APIENTRY glDeformSGIX (GLbitfield mask);\nGLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);\ntypedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);\ntypedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);\n#endif\n\n#ifndef GL_SGIX_reference_plane\n#define GL_SGIX_reference_plane 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);\n#endif\n\n#ifndef GL_SGIX_flush_raster\n#define GL_SGIX_flush_raster 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFlushRasterSGIX (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);\n#endif\n\n#ifndef GL_SGIX_depth_texture\n#define GL_SGIX_depth_texture 1\n#endif\n\n#ifndef GL_SGIS_fog_function\n#define GL_SGIS_fog_function 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);\nGLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);\n#endif\n\n#ifndef GL_SGIX_fog_offset\n#define GL_SGIX_fog_offset 1\n#endif\n\n#ifndef GL_HP_image_transform\n#define GL_HP_image_transform 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);\n#endif\n\n#ifndef GL_HP_convolution_border_modes\n#define GL_HP_convolution_border_modes 1\n#endif\n\n#ifndef GL_SGIX_texture_add_env\n#define GL_SGIX_texture_add_env 1\n#endif\n\n#ifndef GL_EXT_color_subtable\n#define GL_EXT_color_subtable 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);\nGLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\n#endif\n\n#ifndef GL_PGI_vertex_hints\n#define GL_PGI_vertex_hints 1\n#endif\n\n#ifndef GL_PGI_misc_hints\n#define GL_PGI_misc_hints 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);\n#endif\n\n#ifndef GL_EXT_paletted_texture\n#define GL_EXT_paletted_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);\nGLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data);\nGLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\n#endif\n\n#ifndef GL_EXT_clip_volume_hint\n#define GL_EXT_clip_volume_hint 1\n#endif\n\n#ifndef GL_SGIX_list_priority\n#define GL_SGIX_list_priority 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);\nGLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);\nGLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);\n#endif\n\n#ifndef GL_SGIX_ir_instrument1\n#define GL_SGIX_ir_instrument1 1\n#endif\n\n#ifndef GL_SGIX_calligraphic_fragment\n#define GL_SGIX_calligraphic_fragment 1\n#endif\n\n#ifndef GL_SGIX_texture_lod_bias\n#define GL_SGIX_texture_lod_bias 1\n#endif\n\n#ifndef GL_SGIX_shadow_ambient\n#define GL_SGIX_shadow_ambient 1\n#endif\n\n#ifndef GL_EXT_index_texture\n#define GL_EXT_index_texture 1\n#endif\n\n#ifndef GL_EXT_index_material\n#define GL_EXT_index_material 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);\n#endif\n\n#ifndef GL_EXT_index_func\n#define GL_EXT_index_func 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);\n#endif\n\n#ifndef GL_EXT_index_array_formats\n#define GL_EXT_index_array_formats 1\n#endif\n\n#ifndef GL_EXT_compiled_vertex_array\n#define GL_EXT_compiled_vertex_array 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);\nGLAPI void APIENTRY glUnlockArraysEXT (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);\n#endif\n\n#ifndef GL_EXT_cull_vertex\n#define GL_EXT_cull_vertex 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);\n#endif\n\n#ifndef GL_SGIX_ycrcb\n#define GL_SGIX_ycrcb 1\n#endif\n\n#ifndef GL_SGIX_fragment_lighting\n#define GL_SGIX_fragment_lighting 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);\nGLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);\nGLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);\nGLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);\nGLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);\nGLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);\n#endif\n\n#ifndef GL_IBM_rasterpos_clip\n#define GL_IBM_rasterpos_clip 1\n#endif\n\n#ifndef GL_HP_texture_lighting\n#define GL_HP_texture_lighting 1\n#endif\n\n#ifndef GL_EXT_draw_range_elements\n#define GL_EXT_draw_range_elements 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);\n#endif\n\n#ifndef GL_WIN_phong_shading\n#define GL_WIN_phong_shading 1\n#endif\n\n#ifndef GL_WIN_specular_fog\n#define GL_WIN_specular_fog 1\n#endif\n\n#ifndef GL_EXT_light_texture\n#define GL_EXT_light_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glApplyTextureEXT (GLenum mode);\nGLAPI void APIENTRY glTextureLightEXT (GLenum pname);\nGLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);\ntypedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);\n#endif\n\n#ifndef GL_SGIX_blend_alpha_minmax\n#define GL_SGIX_blend_alpha_minmax 1\n#endif\n\n#ifndef GL_EXT_bgra\n#define GL_EXT_bgra 1\n#endif\n\n#ifndef GL_SGIX_async\n#define GL_SGIX_async 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);\nGLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);\nGLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);\nGLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);\nGLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);\nGLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);\ntypedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);\ntypedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);\ntypedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);\ntypedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);\ntypedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);\n#endif\n\n#ifndef GL_SGIX_async_pixel\n#define GL_SGIX_async_pixel 1\n#endif\n\n#ifndef GL_SGIX_async_histogram\n#define GL_SGIX_async_histogram 1\n#endif\n\n#ifndef GL_INTEL_parallel_arrays\n#define GL_INTEL_parallel_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer);\nGLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const GLvoid* *pointer);\nGLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer);\nGLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);\ntypedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);\ntypedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);\ntypedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);\n#endif\n\n#ifndef GL_HP_occlusion_test\n#define GL_HP_occlusion_test 1\n#endif\n\n#ifndef GL_EXT_pixel_transform\n#define GL_EXT_pixel_transform 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\n#endif\n\n#ifndef GL_EXT_pixel_transform_color_table\n#define GL_EXT_pixel_transform_color_table 1\n#endif\n\n#ifndef GL_EXT_shared_texture_palette\n#define GL_EXT_shared_texture_palette 1\n#endif\n\n#ifndef GL_EXT_separate_specular_color\n#define GL_EXT_separate_specular_color 1\n#endif\n\n#ifndef GL_EXT_secondary_color\n#define GL_EXT_secondary_color 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);\nGLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);\nGLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);\nGLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);\nGLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);\nGLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);\nGLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);\nGLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);\nGLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);\nGLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);\nGLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);\nGLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);\nGLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);\nGLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);\nGLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);\nGLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);\nGLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif\n\n#ifndef GL_EXT_texture_perturb_normal\n#define GL_EXT_texture_perturb_normal 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureNormalEXT (GLenum mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);\n#endif\n\n#ifndef GL_EXT_multi_draw_arrays\n#define GL_EXT_multi_draw_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\nGLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);\n#endif\n\n#ifndef GL_EXT_fog_coord\n#define GL_EXT_fog_coord 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);\nGLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);\nGLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);\nGLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);\nGLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif\n\n#ifndef GL_REND_screen_coordinates\n#define GL_REND_screen_coordinates 1\n#endif\n\n#ifndef GL_EXT_coordinate_frame\n#define GL_EXT_coordinate_frame 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);\nGLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);\nGLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);\nGLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);\nGLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);\nGLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);\nGLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);\nGLAPI void APIENTRY glTangent3ivEXT (const GLint *v);\nGLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);\nGLAPI void APIENTRY glTangent3svEXT (const GLshort *v);\nGLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);\nGLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);\nGLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);\nGLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);\nGLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);\nGLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);\nGLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);\nGLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);\nGLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);\nGLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);\nGLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);\ntypedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);\ntypedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);\ntypedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);\ntypedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);\ntypedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif\n\n#ifndef GL_EXT_texture_env_combine\n#define GL_EXT_texture_env_combine 1\n#endif\n\n#ifndef GL_APPLE_specular_vector\n#define GL_APPLE_specular_vector 1\n#endif\n\n#ifndef GL_APPLE_transform_hint\n#define GL_APPLE_transform_hint 1\n#endif\n\n#ifndef GL_SGIX_fog_scale\n#define GL_SGIX_fog_scale 1\n#endif\n\n#ifndef GL_SUNX_constant_data\n#define GL_SUNX_constant_data 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFinishTextureSUNX (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);\n#endif\n\n#ifndef GL_SUN_global_alpha\n#define GL_SUN_global_alpha 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);\nGLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);\nGLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);\nGLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);\nGLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);\nGLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);\nGLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);\nGLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);\n#endif\n\n#ifndef GL_SUN_triangle_list\n#define GL_SUN_triangle_list 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);\nGLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);\nGLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);\nGLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);\nGLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);\nGLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);\nGLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);\n#endif\n\n#ifndef GL_SUN_vertex\n#define GL_SUN_vertex 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);\nGLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\n#endif\n\n#ifndef GL_EXT_blend_func_separate\n#define GL_EXT_blend_func_separate 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#endif\n\n#ifndef GL_INGR_blend_func_separate\n#define GL_INGR_blend_func_separate 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#endif\n\n#ifndef GL_INGR_color_clamp\n#define GL_INGR_color_clamp 1\n#endif\n\n#ifndef GL_INGR_interlace_read\n#define GL_INGR_interlace_read 1\n#endif\n\n#ifndef GL_EXT_stencil_wrap\n#define GL_EXT_stencil_wrap 1\n#endif\n\n#ifndef GL_EXT_422_pixels\n#define GL_EXT_422_pixels 1\n#endif\n\n#ifndef GL_NV_texgen_reflection\n#define GL_NV_texgen_reflection 1\n#endif\n\n#ifndef GL_SUN_convolution_border_modes\n#define GL_SUN_convolution_border_modes 1\n#endif\n\n#ifndef GL_EXT_texture_env_add\n#define GL_EXT_texture_env_add 1\n#endif\n\n#ifndef GL_EXT_texture_lod_bias\n#define GL_EXT_texture_lod_bias 1\n#endif\n\n#ifndef GL_EXT_texture_filter_anisotropic\n#define GL_EXT_texture_filter_anisotropic 1\n#endif\n\n#ifndef GL_EXT_vertex_weighting\n#define GL_EXT_vertex_weighting 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);\nGLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);\nGLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\n#endif\n\n#ifndef GL_NV_light_max_exponent\n#define GL_NV_light_max_exponent 1\n#endif\n\n#ifndef GL_NV_vertex_array_range\n#define GL_NV_vertex_array_range 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFlushVertexArrayRangeNV (void);\nGLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);\n#endif\n\n#ifndef GL_NV_register_combiners\n#define GL_NV_register_combiners 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);\nGLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\nGLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);\nGLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\nGLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\ntypedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);\ntypedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\ntypedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);\n#endif\n\n#ifndef GL_NV_fog_distance\n#define GL_NV_fog_distance 1\n#endif\n\n#ifndef GL_NV_texgen_emboss\n#define GL_NV_texgen_emboss 1\n#endif\n\n#ifndef GL_NV_blend_square\n#define GL_NV_blend_square 1\n#endif\n\n#ifndef GL_NV_texture_env_combine4\n#define GL_NV_texture_env_combine4 1\n#endif\n\n#ifndef GL_MESA_resize_buffers\n#define GL_MESA_resize_buffers 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glResizeBuffersMESA (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);\n#endif\n\n#ifndef GL_MESA_window_pos\n#define GL_MESA_window_pos 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);\nGLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);\nGLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);\nGLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);\nGLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);\nGLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);\nGLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);\nGLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);\nGLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);\nGLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);\n#endif\n\n#ifndef GL_IBM_cull_vertex\n#define GL_IBM_cull_vertex 1\n#endif\n\n#ifndef GL_IBM_multimode_draw_arrays\n#define GL_IBM_multimode_draw_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);\nGLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);\ntypedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);\n#endif\n\n#ifndef GL_IBM_vertex_array_lists\n#define GL_IBM_vertex_array_lists 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\nGLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\nGLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride);\nGLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\nGLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\nGLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\nGLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\nGLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);\n#endif\n\n#ifndef GL_SGIX_subsample\n#define GL_SGIX_subsample 1\n#endif\n\n#ifndef GL_SGIX_ycrcba\n#define GL_SGIX_ycrcba 1\n#endif\n\n#ifndef GL_SGIX_ycrcb_subsample\n#define GL_SGIX_ycrcb_subsample 1\n#endif\n\n#ifndef GL_SGIX_depth_pass_instrument\n#define GL_SGIX_depth_pass_instrument 1\n#endif\n\n#ifndef GL_3DFX_texture_compression_FXT1\n#define GL_3DFX_texture_compression_FXT1 1\n#endif\n\n#ifndef GL_3DFX_multisample\n#define GL_3DFX_multisample 1\n#endif\n\n#ifndef GL_3DFX_tbuffer\n#define GL_3DFX_tbuffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);\n#endif\n\n#ifndef GL_EXT_multisample\n#define GL_EXT_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);\nGLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);\n#endif\n\n#ifndef GL_SGIX_vertex_preclip\n#define GL_SGIX_vertex_preclip 1\n#endif\n\n#ifndef GL_SGIX_convolution_accuracy\n#define GL_SGIX_convolution_accuracy 1\n#endif\n\n#ifndef GL_SGIX_resample\n#define GL_SGIX_resample 1\n#endif\n\n#ifndef GL_SGIS_point_line_texgen\n#define GL_SGIS_point_line_texgen 1\n#endif\n\n#ifndef GL_SGIS_texture_color_mask\n#define GL_SGIS_texture_color_mask 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\n#endif\n\n#ifndef GL_SGIX_igloo_interface\n#define GL_SGIX_igloo_interface 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const GLvoid *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);\n#endif\n\n#ifndef GL_EXT_texture_env_dot3\n#define GL_EXT_texture_env_dot3 1\n#endif\n\n#ifndef GL_ATI_texture_mirror_once\n#define GL_ATI_texture_mirror_once 1\n#endif\n\n#ifndef GL_NV_fence\n#define GL_NV_fence 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);\nGLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);\nGLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);\nGLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);\nGLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);\nGLAPI void APIENTRY glFinishFenceNV (GLuint fence);\nGLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);\ntypedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);\ntypedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);\ntypedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);\ntypedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);\n#endif\n\n#ifndef GL_NV_evaluators\n#define GL_NV_evaluators 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);\nGLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);\nGLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);\ntypedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);\ntypedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);\n#endif\n\n#ifndef GL_NV_packed_depth_stencil\n#define GL_NV_packed_depth_stencil 1\n#endif\n\n#ifndef GL_NV_register_combiners2\n#define GL_NV_register_combiners2 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);\n#endif\n\n#ifndef GL_NV_texture_compression_vtc\n#define GL_NV_texture_compression_vtc 1\n#endif\n\n#ifndef GL_NV_texture_rectangle\n#define GL_NV_texture_rectangle 1\n#endif\n\n#ifndef GL_NV_texture_shader\n#define GL_NV_texture_shader 1\n#endif\n\n#ifndef GL_NV_texture_shader2\n#define GL_NV_texture_shader2 1\n#endif\n\n#ifndef GL_NV_vertex_array_range2\n#define GL_NV_vertex_array_range2 1\n#endif\n\n#ifndef GL_NV_vertex_program\n#define GL_NV_vertex_program 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);\nGLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);\nGLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);\nGLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);\nGLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);\nGLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);\nGLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer);\nGLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);\nGLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);\nGLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);\nGLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);\nGLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);\nGLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);\nGLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\nGLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);\ntypedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);\ntypedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);\ntypedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);\ntypedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);\n#endif\n\n#ifndef GL_SGIX_texture_coordinate_clamp\n#define GL_SGIX_texture_coordinate_clamp 1\n#endif\n\n#ifndef GL_SGIX_scalebias_hint\n#define GL_SGIX_scalebias_hint 1\n#endif\n\n#ifndef GL_OML_interlace\n#define GL_OML_interlace 1\n#endif\n\n#ifndef GL_OML_subsample\n#define GL_OML_subsample 1\n#endif\n\n#ifndef GL_OML_resample\n#define GL_OML_resample 1\n#endif\n\n#ifndef GL_NV_copy_depth_to_color\n#define GL_NV_copy_depth_to_color 1\n#endif\n\n#ifndef GL_ATI_envmap_bumpmap\n#define GL_ATI_envmap_bumpmap 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);\nGLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);\nGLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);\nGLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);\ntypedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);\ntypedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);\ntypedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);\n#endif\n\n#ifndef GL_ATI_fragment_shader\n#define GL_ATI_fragment_shader 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);\nGLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);\nGLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);\nGLAPI void APIENTRY glBeginFragmentShaderATI (void);\nGLAPI void APIENTRY glEndFragmentShaderATI (void);\nGLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);\nGLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);\nGLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\nGLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\nGLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);\nGLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\nGLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\nGLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);\nGLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);\ntypedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);\ntypedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);\ntypedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);\ntypedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);\ntypedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\ntypedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\ntypedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);\ntypedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\ntypedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\ntypedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);\ntypedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);\n#endif\n\n#ifndef GL_ATI_pn_triangles\n#define GL_ATI_pn_triangles 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);\nGLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);\n#endif\n\n#ifndef GL_ATI_vertex_array_object\n#define GL_ATI_vertex_array_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage);\nGLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);\nGLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);\nGLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);\nGLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\nGLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);\nGLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\nGLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);\ntypedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);\ntypedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\ntypedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\ntypedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);\n#endif\n\n#ifndef GL_EXT_vertex_shader\n#define GL_EXT_vertex_shader 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginVertexShaderEXT (void);\nGLAPI void APIENTRY glEndVertexShaderEXT (void);\nGLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);\nGLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);\nGLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);\nGLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);\nGLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);\nGLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);\nGLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\nGLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\nGLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);\nGLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);\nGLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);\nGLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr);\nGLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr);\nGLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);\nGLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);\nGLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);\nGLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);\nGLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);\nGLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);\nGLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);\nGLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);\nGLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);\nGLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);\nGLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);\nGLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);\nGLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);\nGLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);\nGLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);\nGLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);\nGLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);\nGLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);\nGLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);\nGLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);\nGLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data);\nGLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);\nGLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);\nGLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);\nGLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);\nGLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);\nGLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);\ntypedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);\ntypedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);\ntypedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);\ntypedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);\ntypedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);\ntypedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);\ntypedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\ntypedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\ntypedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);\ntypedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);\ntypedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);\ntypedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);\ntypedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);\ntypedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);\ntypedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);\ntypedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);\ntypedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);\ntypedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);\ntypedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);\ntypedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);\ntypedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);\ntypedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);\ntypedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);\ntypedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);\ntypedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);\ntypedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);\ntypedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);\ntypedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);\ntypedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);\ntypedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);\n#endif\n\n#ifndef GL_ATI_vertex_streams\n#define GL_ATI_vertex_streams 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);\nGLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);\nGLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);\nGLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);\nGLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);\nGLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);\nGLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);\nGLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);\nGLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);\nGLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);\nGLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);\nGLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);\nGLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);\nGLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);\ntypedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);\n#endif\n\n#ifndef GL_ATI_element_array\n#define GL_ATI_element_array 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glElementPointerATI (GLenum type, const GLvoid *pointer);\nGLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);\nGLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);\n#endif\n\n#ifndef GL_SUN_mesh_array\n#define GL_SUN_mesh_array 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);\n#endif\n\n#ifndef GL_SUN_slice_accum\n#define GL_SUN_slice_accum 1\n#endif\n\n#ifndef GL_NV_multisample_filter_hint\n#define GL_NV_multisample_filter_hint 1\n#endif\n\n#ifndef GL_NV_depth_clamp\n#define GL_NV_depth_clamp 1\n#endif\n\n#ifndef GL_NV_occlusion_query\n#define GL_NV_occlusion_query 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);\nGLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);\nGLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);\nGLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);\nGLAPI void APIENTRY glEndOcclusionQueryNV (void);\nGLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);\ntypedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);\ntypedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);\n#endif\n\n#ifndef GL_NV_point_sprite\n#define GL_NV_point_sprite 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);\nGLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);\n#endif\n\n#ifndef GL_NV_texture_shader3\n#define GL_NV_texture_shader3 1\n#endif\n\n#ifndef GL_NV_vertex_program1_1\n#define GL_NV_vertex_program1_1 1\n#endif\n\n#ifndef GL_EXT_shadow_funcs\n#define GL_EXT_shadow_funcs 1\n#endif\n\n#ifndef GL_EXT_stencil_two_side\n#define GL_EXT_stencil_two_side 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);\n#endif\n\n#ifndef GL_ATI_text_fragment_shader\n#define GL_ATI_text_fragment_shader 1\n#endif\n\n#ifndef GL_APPLE_client_storage\n#define GL_APPLE_client_storage 1\n#endif\n\n#ifndef GL_APPLE_element_array\n#define GL_APPLE_element_array 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const GLvoid *pointer);\nGLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);\nGLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);\nGLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\nGLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);\n#endif\n\n#ifndef GL_APPLE_fence\n#define GL_APPLE_fence 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);\nGLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);\nGLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);\nGLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);\nGLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);\nGLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);\nGLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);\nGLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);\ntypedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);\ntypedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);\ntypedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);\ntypedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);\n#endif\n\n#ifndef GL_APPLE_vertex_array_object\n#define GL_APPLE_vertex_array_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);\nGLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);\nGLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);\nGLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);\ntypedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);\ntypedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);\ntypedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);\n#endif\n\n#ifndef GL_APPLE_vertex_array_range\n#define GL_APPLE_vertex_array_range 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer);\nGLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer);\nGLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);\n#endif\n\n#ifndef GL_APPLE_ycbcr_422\n#define GL_APPLE_ycbcr_422 1\n#endif\n\n#ifndef GL_S3_s3tc\n#define GL_S3_s3tc 1\n#endif\n\n#ifndef GL_ATI_draw_buffers\n#define GL_ATI_draw_buffers 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);\n#endif\n\n#ifndef GL_ATI_pixel_format_float\n#define GL_ATI_pixel_format_float 1\n/* This is really a WGL extension, but defines some associated GL enums.\n * ATI does not export \"GL_ATI_pixel_format_float\" in the GL_EXTENSIONS string.\n */\n#endif\n\n#ifndef GL_ATI_texture_env_combine3\n#define GL_ATI_texture_env_combine3 1\n#endif\n\n#ifndef GL_ATI_texture_float\n#define GL_ATI_texture_float 1\n#endif\n\n#ifndef GL_NV_float_buffer\n#define GL_NV_float_buffer 1\n#endif\n\n#ifndef GL_NV_fragment_program\n#define GL_NV_fragment_program 1\n/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);\nGLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);\nGLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);\nGLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);\n#endif\n\n#ifndef GL_NV_half_float\n#define GL_NV_half_float 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);\nGLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);\nGLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\nGLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);\nGLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\nGLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);\nGLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);\nGLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);\nGLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);\nGLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\nGLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);\nGLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);\nGLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);\nGLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\nGLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);\nGLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);\nGLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\nGLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);\nGLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);\nGLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);\nGLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);\nGLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);\nGLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\nGLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);\ntypedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);\ntypedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\ntypedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);\ntypedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\ntypedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);\ntypedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);\ntypedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);\ntypedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);\ntypedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\ntypedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);\ntypedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\n#endif\n\n#ifndef GL_NV_pixel_data_range\n#define GL_NV_pixel_data_range 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const GLvoid *pointer);\nGLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);\n#endif\n\n#ifndef GL_NV_primitive_restart\n#define GL_NV_primitive_restart 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPrimitiveRestartNV (void);\nGLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);\ntypedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);\n#endif\n\n#ifndef GL_NV_texture_expand_normal\n#define GL_NV_texture_expand_normal 1\n#endif\n\n#ifndef GL_NV_vertex_program2\n#define GL_NV_vertex_program2 1\n#endif\n\n#ifndef GL_ATI_map_object_buffer\n#define GL_ATI_map_object_buffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint buffer);\nGLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);\n#endif\n\n#ifndef GL_ATI_separate_stencil\n#define GL_ATI_separate_stencil 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\nGLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\ntypedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);\n#endif\n\n#ifndef GL_ATI_vertex_attrib_array_object\n#define GL_ATI_vertex_attrib_array_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);\nGLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);\n#endif\n\n#ifndef GL_OES_byte_coordinates\n#define GL_OES_byte_coordinates 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s);\nGLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t);\nGLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r);\nGLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);\nGLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord1bOES (GLbyte s);\nGLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t);\nGLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r);\nGLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q);\nGLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glVertex2bOES (GLbyte x);\nGLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y);\nGLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z);\nGLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s);\ntypedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t);\ntypedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r);\ntypedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q);\ntypedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x);\ntypedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y);\ntypedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z);\ntypedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords);\n#endif\n\n#ifndef GL_OES_fixed_point\n#define GL_OES_fixed_point 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value);\nGLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);\nGLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);\nGLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glClearDepthxOES (GLfixed depth);\nGLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);\nGLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue);\nGLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glColor3xvOES (const GLfixed *components);\nGLAPI void APIENTRY glColor4xvOES (const GLfixed *components);\nGLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);\nGLAPI void APIENTRY glEvalCoord1xOES (GLfixed u);\nGLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v);\nGLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer);\nGLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);\nGLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\nGLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);\nGLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v);\nGLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values);\nGLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glIndexxOES (GLfixed component);\nGLAPI void APIENTRY glIndexxvOES (const GLfixed *component);\nGLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);\nGLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glLineWidthxOES (GLfixed width);\nGLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);\nGLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);\nGLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2);\nGLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);\nGLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);\nGLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s);\nGLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t);\nGLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r);\nGLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);\nGLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);\nGLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\nGLAPI void APIENTRY glPassThroughxOES (GLfixed token);\nGLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values);\nGLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor);\nGLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glPointSizexOES (GLfixed size);\nGLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);\nGLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities);\nGLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y);\nGLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w);\nGLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);\nGLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2);\nGLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glSampleCoverageOES (GLfixed value, GLboolean invert);\nGLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glTexCoord1xOES (GLfixed s);\nGLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t);\nGLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r);\nGLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q);\nGLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glVertex2xOES (GLfixed x);\nGLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y);\nGLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value);\ntypedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);\ntypedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);\ntypedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);\ntypedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);\ntypedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue);\ntypedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components);\ntypedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);\ntypedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u);\ntypedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v);\ntypedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer);\ntypedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);\ntypedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\ntypedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v);\ntypedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values);\ntypedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component);\ntypedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component);\ntypedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);\ntypedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);\ntypedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);\ntypedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);\ntypedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2);\ntypedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);\ntypedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);\ntypedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);\ntypedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\ntypedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token);\ntypedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values);\ntypedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);\ntypedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);\ntypedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities);\ntypedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y);\ntypedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w);\ntypedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);\ntypedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2);\ntypedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEOESPROC) (GLfixed value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s);\ntypedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t);\ntypedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r);\ntypedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q);\ntypedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x);\ntypedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y);\ntypedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords);\n#endif\n\n#ifndef GL_OES_single_precision\n#define GL_OES_single_precision 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);\nGLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\nGLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\nGLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);\nGLAPI void APIENTRY glClearDepthfOES (GLclampd depth);\nGLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);\ntypedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\ntypedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\ntypedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampd depth);\ntypedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);\n#endif\n\n#ifndef GL_OES_compressed_paletted_texture\n#define GL_OES_compressed_paletted_texture 1\n#endif\n\n#ifndef GL_OES_read_format\n#define GL_OES_read_format 1\n#endif\n\n#ifndef GL_OES_query_matrix\n#define GL_OES_query_matrix 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLbitfield APIENTRY glQueryMatrixxOES (const GLfixed *mantissa, const GLint *exponent);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (const GLfixed *mantissa, const GLint *exponent);\n#endif\n\n#ifndef GL_EXT_depth_bounds_test\n#define GL_EXT_depth_bounds_test 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);\n#endif\n\n#ifndef GL_EXT_texture_mirror_clamp\n#define GL_EXT_texture_mirror_clamp 1\n#endif\n\n#ifndef GL_EXT_blend_equation_separate\n#define GL_EXT_blend_equation_separate 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);\n#endif\n\n#ifndef GL_MESA_pack_invert\n#define GL_MESA_pack_invert 1\n#endif\n\n#ifndef GL_MESA_ycbcr_texture\n#define GL_MESA_ycbcr_texture 1\n#endif\n\n#ifndef GL_EXT_pixel_buffer_object\n#define GL_EXT_pixel_buffer_object 1\n#endif\n\n#ifndef GL_NV_fragment_program_option\n#define GL_NV_fragment_program_option 1\n#endif\n\n#ifndef GL_NV_fragment_program2\n#define GL_NV_fragment_program2 1\n#endif\n\n#ifndef GL_NV_vertex_program2_option\n#define GL_NV_vertex_program2_option 1\n#endif\n\n#ifndef GL_NV_vertex_program3\n#define GL_NV_vertex_program3 1\n#endif\n\n#ifndef GL_EXT_framebuffer_object\n#define GL_EXT_framebuffer_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);\nGLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);\nGLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);\nGLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);\nGLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);\nGLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);\nGLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);\nGLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);\nGLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\nGLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);\ntypedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);\ntypedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);\n#endif\n\n#ifndef GL_GREMEDY_string_marker\n#define GL_GREMEDY_string_marker 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const GLvoid *string);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);\n#endif\n\n#ifndef GL_EXT_packed_depth_stencil\n#define GL_EXT_packed_depth_stencil 1\n#endif\n\n#ifndef GL_EXT_stencil_clear_tag\n#define GL_EXT_stencil_clear_tag 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);\n#endif\n\n#ifndef GL_EXT_texture_sRGB\n#define GL_EXT_texture_sRGB 1\n#endif\n\n#ifndef GL_EXT_framebuffer_blit\n#define GL_EXT_framebuffer_blit 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\n\n#ifndef GL_EXT_framebuffer_multisample\n#define GL_EXT_framebuffer_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n\n#ifndef GL_MESAX_texture_stack\n#define GL_MESAX_texture_stack 1\n#endif\n\n#ifndef GL_EXT_timer_query\n#define GL_EXT_timer_query 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params);\nGLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);\n#endif\n\n#ifndef GL_EXT_gpu_program_parameters\n#define GL_EXT_gpu_program_parameters 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\nGLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\n#endif\n\n#ifndef GL_APPLE_flush_buffer_range\n#define GL_APPLE_flush_buffer_range 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);\n#endif\n\n#ifndef GL_NV_gpu_program4\n#define GL_NV_gpu_program4 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);\nGLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);\nGLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);\nGLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);\nGLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);\nGLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);\nGLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);\nGLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);\n#endif\n\n#ifndef GL_NV_geometry_program4\n#define GL_NV_geometry_program4 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);\nGLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#endif\n\n#ifndef GL_EXT_geometry_shader4\n#define GL_EXT_geometry_shader4 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);\n#endif\n\n#ifndef GL_NV_vertex_program4\n#define GL_NV_vertex_program4 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);\nGLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);\nGLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);\nGLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);\nGLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);\nGLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);\n#endif\n\n#ifndef GL_EXT_gpu_shader4\n#define GL_EXT_gpu_shader4 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);\nGLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);\nGLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);\nGLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);\ntypedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\n#endif\n\n#ifndef GL_EXT_draw_instanced\n#define GL_EXT_draw_instanced 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);\nGLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);\n#endif\n\n#ifndef GL_EXT_packed_float\n#define GL_EXT_packed_float 1\n#endif\n\n#ifndef GL_EXT_texture_array\n#define GL_EXT_texture_array 1\n#endif\n\n#ifndef GL_EXT_texture_buffer_object\n#define GL_EXT_texture_buffer_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);\n#endif\n\n#ifndef GL_EXT_texture_compression_latc\n#define GL_EXT_texture_compression_latc 1\n#endif\n\n#ifndef GL_EXT_texture_compression_rgtc\n#define GL_EXT_texture_compression_rgtc 1\n#endif\n\n#ifndef GL_EXT_texture_shared_exponent\n#define GL_EXT_texture_shared_exponent 1\n#endif\n\n#ifndef GL_NV_depth_buffer_float\n#define GL_NV_depth_buffer_float 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);\nGLAPI void APIENTRY glClearDepthdNV (GLdouble depth);\nGLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);\ntypedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);\n#endif\n\n#ifndef GL_NV_fragment_program4\n#define GL_NV_fragment_program4 1\n#endif\n\n#ifndef GL_NV_framebuffer_multisample_coverage\n#define GL_NV_framebuffer_multisample_coverage 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n\n#ifndef GL_EXT_framebuffer_sRGB\n#define GL_EXT_framebuffer_sRGB 1\n#endif\n\n#ifndef GL_NV_geometry_shader4\n#define GL_NV_geometry_shader4 1\n#endif\n\n#ifndef GL_NV_parameter_buffer_object\n#define GL_NV_parameter_buffer_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);\nGLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);\n#endif\n\n#ifndef GL_EXT_draw_buffers2\n#define GL_EXT_draw_buffers2 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\nGLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);\nGLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);\nGLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);\nGLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);\nGLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\ntypedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);\ntypedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);\ntypedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);\n#endif\n\n#ifndef GL_NV_transform_feedback\n#define GL_NV_transform_feedback 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);\nGLAPI void APIENTRY glEndTransformFeedbackNV (void);\nGLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode);\nGLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\nGLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);\nGLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);\nGLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);\nGLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);\nGLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);\ntypedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\ntypedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);\n#endif\n\n#ifndef GL_EXT_bindable_uniform\n#define GL_EXT_bindable_uniform 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);\nGLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);\nGLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);\ntypedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);\ntypedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);\n#endif\n\n#ifndef GL_EXT_texture_integer\n#define GL_EXT_texture_integer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);\nGLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);\ntypedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);\n#endif\n\n#ifndef GL_GREMEDY_frame_terminator\n#define GL_GREMEDY_frame_terminator 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFrameTerminatorGREMEDY (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);\n#endif\n\n#ifndef GL_NV_conditional_render\n#define GL_NV_conditional_render 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);\nGLAPI void APIENTRY glEndConditionalRenderNV (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);\ntypedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);\n#endif\n\n#ifndef GL_NV_present_video\n#define GL_NV_present_video 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);\nGLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);\nGLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);\nGLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);\ntypedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);\ntypedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);\n#endif\n\n#ifndef GL_EXT_transform_feedback\n#define GL_EXT_transform_feedback 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);\nGLAPI void APIENTRY glEndTransformFeedbackEXT (void);\nGLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\nGLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);\nGLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);\nGLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);\ntypedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);\ntypedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\ntypedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\n#endif\n\n#ifndef GL_EXT_direct_state_access\n#define GL_EXT_direct_state_access 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);\nGLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);\nGLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);\nGLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\nGLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\nGLAPI void APIENTRY glMatrixPopEXT (GLenum mode);\nGLAPI void APIENTRY glMatrixPushEXT (GLenum mode);\nGLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\nGLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);\nGLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);\nGLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\nGLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);\nGLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);\nGLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);\nGLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);\nGLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);\nGLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);\nGLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);\nGLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);\nGLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);\nGLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data);\nGLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img);\nGLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);\nGLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img);\nGLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string);\nGLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);\nGLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string);\nGLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);\nGLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);\nGLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);\nGLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);\nGLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);\nGLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);\nGLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage);\nGLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data);\nGLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);\nGLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);\nGLAPI GLvoid* APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);\nGLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);\nGLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\nGLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params);\nGLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data);\nGLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);\nGLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);\nGLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);\nGLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);\nGLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\nGLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);\nGLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);\nGLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);\nGLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);\nGLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);\nGLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);\nGLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);\nGLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);\ntypedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);\ntypedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\ntypedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\ntypedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);\ntypedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);\ntypedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);\ntypedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage);\ntypedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data);\ntypedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);\ntypedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);\ntypedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);\ntypedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data);\ntypedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);\ntypedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);\ntypedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);\ntypedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);\ntypedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);\ntypedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\n#endif\n\n#ifndef GL_EXT_vertex_array_bgra\n#define GL_EXT_vertex_array_bgra 1\n#endif\n\n#ifndef GL_EXT_texture_swizzle\n#define GL_EXT_texture_swizzle 1\n#endif\n\n#ifndef GL_NV_explicit_multisample\n#define GL_NV_explicit_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);\nGLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);\nGLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);\ntypedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);\ntypedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);\n#endif\n\n#ifndef GL_NV_transform_feedback2\n#define GL_NV_transform_feedback2 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);\nGLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);\nGLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);\nGLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);\nGLAPI void APIENTRY glPauseTransformFeedbackNV (void);\nGLAPI void APIENTRY glResumeTransformFeedbackNV (void);\nGLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);\ntypedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);\ntypedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);\n#endif\n\n#ifndef GL_ATI_meminfo\n#define GL_ATI_meminfo 1\n#endif\n\n#ifndef GL_AMD_performance_monitor\n#define GL_AMD_performance_monitor 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\nGLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\nGLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\nGLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\nGLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);\nGLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);\nGLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);\nGLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);\nGLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);\ntypedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);\ntypedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#endif\n\n#ifndef GL_AMD_texture_texture4\n#define GL_AMD_texture_texture4 1\n#endif\n\n#ifndef GL_AMD_vertex_shader_tesselator\n#define GL_AMD_vertex_shader_tesselator 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);\nGLAPI void APIENTRY glTessellationModeAMD (GLenum mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);\ntypedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);\n#endif\n\n#ifndef GL_EXT_provoking_vertex\n#define GL_EXT_provoking_vertex 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);\n#endif\n\n#ifndef GL_EXT_texture_snorm\n#define GL_EXT_texture_snorm 1\n#endif\n\n#ifndef GL_AMD_draw_buffers_blend\n#define GL_AMD_draw_buffers_blend 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);\nGLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\nGLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);\nGLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\n#endif\n\n#ifndef GL_APPLE_texture_range\n#define GL_APPLE_texture_range 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer);\nGLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params);\n#endif\n\n#ifndef GL_APPLE_float_pixels\n#define GL_APPLE_float_pixels 1\n#endif\n\n#ifndef GL_APPLE_vertex_program_evaluators\n#define GL_APPLE_vertex_program_evaluators 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);\nGLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);\nGLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);\nGLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);\nGLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);\nGLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);\nGLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);\ntypedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);\n#endif\n\n#ifndef GL_APPLE_aux_depth_stencil\n#define GL_APPLE_aux_depth_stencil 1\n#endif\n\n#ifndef GL_APPLE_object_purgeable\n#define GL_APPLE_object_purgeable 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);\nGLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);\nGLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);\ntypedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);\ntypedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);\n#endif\n\n#ifndef GL_APPLE_row_bytes\n#define GL_APPLE_row_bytes 1\n#endif\n\n#ifndef GL_APPLE_rgb_422\n#define GL_APPLE_rgb_422 1\n#endif\n\n#ifndef GL_NV_video_capture\n#define GL_NV_video_capture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);\nGLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);\nGLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);\nGLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);\nGLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);\nGLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);\nGLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);\ntypedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);\ntypedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);\ntypedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);\ntypedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);\ntypedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);\n#endif\n\n#ifndef GL_NV_copy_image\n#define GL_NV_copy_image 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);\n#endif\n\n#ifndef GL_EXT_separate_shader_objects\n#define GL_EXT_separate_shader_objects 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);\nGLAPI void APIENTRY glActiveProgramEXT (GLuint program);\nGLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);\ntypedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);\ntypedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);\n#endif\n\n#ifndef GL_NV_parameter_buffer_object2\n#define GL_NV_parameter_buffer_object2 1\n#endif\n\n#ifndef GL_NV_shader_buffer_load\n#define GL_NV_shader_buffer_load 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);\nGLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);\nGLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);\nGLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);\nGLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);\nGLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);\nGLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);\nGLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);\nGLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);\nGLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);\nGLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);\nGLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);\nGLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);\ntypedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);\ntypedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);\ntypedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);\ntypedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#endif\n\n#ifndef GL_NV_vertex_buffer_unified_memory\n#define GL_NV_vertex_buffer_unified_memory 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);\nGLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);\nGLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);\nGLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);\nGLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);\nGLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);\nGLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);\n#endif\n\n#ifndef GL_NV_texture_barrier\n#define GL_NV_texture_barrier 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureBarrierNV (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);\n#endif\n\n#ifndef GL_AMD_shader_stencil_export\n#define GL_AMD_shader_stencil_export 1\n#endif\n\n#ifndef GL_AMD_seamless_cubemap_per_texture\n#define GL_AMD_seamless_cubemap_per_texture 1\n#endif\n\n#ifndef GL_AMD_conservative_depth\n#define GL_AMD_conservative_depth 1\n#endif\n\n#ifndef GL_EXT_shader_image_load_store\n#define GL_EXT_shader_image_load_store 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);\nGLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);\ntypedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);\n#endif\n\n#ifndef GL_EXT_vertex_attrib_64bit\n#define GL_EXT_vertex_attrib_64bit 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\nGLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\n#endif\n\n#ifndef GL_NV_gpu_program5\n#define GL_NV_gpu_program5 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);\n#endif\n\n#ifndef GL_NV_gpu_shader5\n#define GL_NV_gpu_shader5 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);\nGLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);\nGLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\nGLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\nGLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);\nGLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);\nGLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\nGLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\nGLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);\nGLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);\nGLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);\nGLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\nGLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\nGLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);\nGLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);\nGLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\nGLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\nGLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);\ntypedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);\ntypedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\ntypedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\ntypedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);\ntypedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\ntypedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\ntypedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#endif\n\n#ifndef GL_NV_shader_buffer_store\n#define GL_NV_shader_buffer_store 1\n#endif\n\n#ifndef GL_NV_tessellation_program5\n#define GL_NV_tessellation_program5 1\n#endif\n\n#ifndef GL_NV_vertex_attrib_integer_64bit\n#define GL_NV_vertex_attrib_integer_64bit 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);\nGLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);\nGLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);\nGLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\nGLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);\nGLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);\nGLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\nGLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\nGLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);\nGLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);\nGLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);\n#endif\n\n#ifndef GL_NV_multisample_coverage\n#define GL_NV_multisample_coverage 1\n#endif\n\n#ifndef GL_AMD_name_gen_delete\n#define GL_AMD_name_gen_delete 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);\nGLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);\nGLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);\ntypedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);\ntypedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);\n#endif\n\n#ifndef GL_AMD_debug_output\n#define GL_AMD_debug_output 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);\nGLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam);\nGLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam);\ntypedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);\n#endif\n\n#ifndef GL_NV_vdpau_interop\n#define GL_NV_vdpau_interop 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress);\nGLAPI void APIENTRY glVDPAUFiniNV (void);\nGLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\nGLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\nGLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);\nGLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);\nGLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\nGLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);\nGLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);\nGLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress);\ntypedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);\ntypedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\ntypedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\ntypedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);\ntypedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);\ntypedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\ntypedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);\ntypedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);\ntypedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);\n#endif\n\n#ifndef GL_AMD_transform_feedback3_lines_triangles\n#define GL_AMD_transform_feedback3_lines_triangles 1\n#endif\n\n#ifndef GL_AMD_depth_clamp_separate\n#define GL_AMD_depth_clamp_separate 1\n#endif\n\n#ifndef GL_EXT_texture_sRGB_decode\n#define GL_EXT_texture_sRGB_decode 1\n#endif\n\n#ifndef GL_NV_texture_multisample\n#define GL_NV_texture_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\n#endif\n\n#ifndef GL_AMD_blend_minmax_factor\n#define GL_AMD_blend_minmax_factor 1\n#endif\n\n#ifndef GL_AMD_sample_positions\n#define GL_AMD_sample_positions 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);\n#endif\n\n#ifndef GL_EXT_x11_sync_object\n#define GL_EXT_x11_sync_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);\n#endif\n\n#ifndef GL_AMD_multi_draw_indirect\n#define GL_AMD_multi_draw_indirect 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride);\nGLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride);\n#endif\n\n#ifndef GL_EXT_framebuffer_multisample_blit_scaled\n#define GL_EXT_framebuffer_multisample_blit_scaled 1\n#endif\n\n#ifndef GL_NV_path_rendering\n#define GL_NV_path_rendering 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);\nGLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);\nGLAPI GLboolean APIENTRY glIsPathNV (GLuint path);\nGLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords);\nGLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid *coords);\nGLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords);\nGLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const GLvoid *coords);\nGLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const GLvoid *pathString);\nGLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\nGLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\nGLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);\nGLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);\nGLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);\nGLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);\nGLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);\nGLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);\nGLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);\nGLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);\nGLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);\nGLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);\nGLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);\nGLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);\nGLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);\nGLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);\nGLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);\nGLAPI void APIENTRY glPathFogGenNV (GLenum genMode);\nGLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);\nGLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);\nGLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);\nGLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);\nGLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);\nGLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);\nGLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);\nGLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);\nGLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);\nGLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);\nGLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);\nGLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);\nGLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);\nGLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);\nGLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);\nGLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);\nGLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);\nGLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);\ntypedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);\ntypedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path);\ntypedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords);\ntypedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid *coords);\ntypedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords);\ntypedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const GLvoid *coords);\ntypedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const GLvoid *pathString);\ntypedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\ntypedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\ntypedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);\ntypedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);\ntypedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);\ntypedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);\ntypedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);\ntypedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);\ntypedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);\ntypedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);\ntypedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);\ntypedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);\ntypedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);\ntypedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);\ntypedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);\ntypedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);\ntypedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);\ntypedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);\ntypedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);\ntypedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);\ntypedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);\ntypedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);\ntypedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);\ntypedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);\ntypedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);\ntypedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);\ntypedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);\ntypedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);\ntypedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);\ntypedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);\ntypedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);\ntypedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);\ntypedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);\n#endif\n\n#ifndef GL_AMD_pinned_memory\n#define GL_AMD_pinned_memory 1\n#endif\n\n#ifndef GL_AMD_stencil_operation_extended\n#define GL_AMD_stencil_operation_extended 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);\n#endif\n\n#ifndef GL_AMD_vertex_shader_viewport_index\n#define GL_AMD_vertex_shader_viewport_index 1\n#endif\n\n#ifndef GL_AMD_vertex_shader_layer\n#define GL_AMD_vertex_shader_layer 1\n#endif\n\n#ifndef GL_NV_bindless_texture\n#define GL_NV_bindless_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture);\nGLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);\nGLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);\nGLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);\nGLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\nGLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);\nGLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);\nGLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);\nGLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);\nGLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);\nGLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\nGLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);\nGLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);\ntypedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\ntypedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);\ntypedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);\n#endif\n\n#ifndef GL_NV_shader_atomic_float\n#define GL_NV_shader_atomic_float 1\n#endif\n\n#ifndef GL_AMD_query_buffer_object\n#define GL_AMD_query_buffer_object 1\n#endif\n\n#ifndef GL_NV_compute_program5\n#define GL_NV_compute_program5 1\n#endif\n\n#ifndef GL_NV_shader_storage_buffer_object\n#define GL_NV_shader_storage_buffer_object 1\n#endif\n\n#ifndef GL_NV_shader_atomic_counters\n#define GL_NV_shader_atomic_counters 1\n#endif\n\n#ifndef GL_NV_deep_texture3D\n#define GL_NV_deep_texture3D 1\n#endif\n\n#ifndef GL_NVX_conditional_render\n#define GL_NVX_conditional_render 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id);\nGLAPI void APIENTRY glEndConditionalRenderNVX (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void);\n#endif\n\n#ifndef GL_AMD_sparse_texture\n#define GL_AMD_sparse_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\nGLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\n#endif\n\n#ifndef GL_AMD_shader_trinary_minmax\n#define GL_AMD_shader_trinary_minmax 1\n#endif\n\n#ifndef GL_INTEL_map_texture\n#define GL_INTEL_map_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSyncTextureINTEL (GLuint texture);\nGLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level);\nGLAPI GLvoid* APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, const GLint *stride, const GLenum *layout);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);\ntypedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);\ntypedef GLvoid* (APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, const GLint *stride, const GLenum *layout);\n#endif\n\n#ifndef GL_NV_draw_texture\n#define GL_NV_draw_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);\n#endif\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/OpenGL/wglext.h",
    "content": "#ifndef __wglext_h_\n#define __wglext_h_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n** License Applicability. Except to the extent portions of this file are\n** made subject to an alternative license as permitted in the SGI Free\n** Software License B, Version 1.1 (the \"License\"), the contents of this\n** file are subject only to the provisions of the License. You may not use\n** this file except in compliance with the License. You may obtain a copy\n** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600\n** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:\n** \n** http://oss.sgi.com/projects/FreeB\n** \n** Note that, as provided in the License, the Software is distributed on an\n** \"AS IS\" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS\n** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND\n** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A\n** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.\n** \n** Original Code. The Original Code is: OpenGL Sample Implementation,\n** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,\n** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.\n** Copyright in any portions created by third parties is as indicated\n** elsewhere herein. All Rights Reserved.\n** \n** Additional Notice Provisions: This software was created using the\n** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has\n** not been independently verified as being compliant with the OpenGL(R)\n** version 1.2.1 Specification.\n*/\n\n#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)\n#define WIN32_LEAN_AND_MEAN 1\n#include <windows.h>\n#endif\n\n#ifndef APIENTRY\n#define APIENTRY\n#endif\n#ifndef APIENTRYP\n#define APIENTRYP APIENTRY *\n#endif\n#ifndef GLAPI\n#define GLAPI extern\n#endif\n\n\n/*************************************************************/\n\n/* Header file version number */\n/* wglext.h last updated 2005/01/07 */\n/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */\n#define WGL_WGLEXT_VERSION 6\n\n#ifndef WGL_ARB_buffer_region\n#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001\n#define WGL_BACK_COLOR_BUFFER_BIT_ARB  0x00000002\n#define WGL_DEPTH_BUFFER_BIT_ARB       0x00000004\n#define WGL_STENCIL_BUFFER_BIT_ARB     0x00000008\n#endif\n\n#ifndef WGL_ARB_multisample\n#define WGL_SAMPLE_BUFFERS_ARB         0x2041\n#define WGL_SAMPLES_ARB                0x2042\n#endif\n\n#ifndef WGL_ARB_extensions_string\n#endif\n\n#ifndef WGL_ARB_pixel_format\n#define WGL_NUMBER_PIXEL_FORMATS_ARB   0x2000\n#define WGL_DRAW_TO_WINDOW_ARB         0x2001\n#define WGL_DRAW_TO_BITMAP_ARB         0x2002\n#define WGL_ACCELERATION_ARB           0x2003\n#define WGL_NEED_PALETTE_ARB           0x2004\n#define WGL_NEED_SYSTEM_PALETTE_ARB    0x2005\n#define WGL_SWAP_LAYER_BUFFERS_ARB     0x2006\n#define WGL_SWAP_METHOD_ARB            0x2007\n#define WGL_NUMBER_OVERLAYS_ARB        0x2008\n#define WGL_NUMBER_UNDERLAYS_ARB       0x2009\n#define WGL_TRANSPARENT_ARB            0x200A\n#define WGL_TRANSPARENT_RED_VALUE_ARB  0x2037\n#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038\n#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039\n#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A\n#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B\n#define WGL_SHARE_DEPTH_ARB            0x200C\n#define WGL_SHARE_STENCIL_ARB          0x200D\n#define WGL_SHARE_ACCUM_ARB            0x200E\n#define WGL_SUPPORT_GDI_ARB            0x200F\n#define WGL_SUPPORT_OPENGL_ARB         0x2010\n#define WGL_DOUBLE_BUFFER_ARB          0x2011\n#define WGL_STEREO_ARB                 0x2012\n#define WGL_PIXEL_TYPE_ARB             0x2013\n#define WGL_COLOR_BITS_ARB             0x2014\n#define WGL_RED_BITS_ARB               0x2015\n#define WGL_RED_SHIFT_ARB              0x2016\n#define WGL_GREEN_BITS_ARB             0x2017\n#define WGL_GREEN_SHIFT_ARB            0x2018\n#define WGL_BLUE_BITS_ARB              0x2019\n#define WGL_BLUE_SHIFT_ARB             0x201A\n#define WGL_ALPHA_BITS_ARB             0x201B\n#define WGL_ALPHA_SHIFT_ARB            0x201C\n#define WGL_ACCUM_BITS_ARB             0x201D\n#define WGL_ACCUM_RED_BITS_ARB         0x201E\n#define WGL_ACCUM_GREEN_BITS_ARB       0x201F\n#define WGL_ACCUM_BLUE_BITS_ARB        0x2020\n#define WGL_ACCUM_ALPHA_BITS_ARB       0x2021\n#define WGL_DEPTH_BITS_ARB             0x2022\n#define WGL_STENCIL_BITS_ARB           0x2023\n#define WGL_AUX_BUFFERS_ARB            0x2024\n#define WGL_NO_ACCELERATION_ARB        0x2025\n#define WGL_GENERIC_ACCELERATION_ARB   0x2026\n#define WGL_FULL_ACCELERATION_ARB      0x2027\n#define WGL_SWAP_EXCHANGE_ARB          0x2028\n#define WGL_SWAP_COPY_ARB              0x2029\n#define WGL_SWAP_UNDEFINED_ARB         0x202A\n#define WGL_TYPE_RGBA_ARB              0x202B\n#define WGL_TYPE_COLORINDEX_ARB        0x202C\n#endif\n\n#ifndef WGL_ARB_make_current_read\n#define ERROR_INVALID_PIXEL_TYPE_ARB   0x2043\n#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054\n#endif\n\n#ifndef WGL_ARB_pbuffer\n#define WGL_DRAW_TO_PBUFFER_ARB        0x202D\n#define WGL_MAX_PBUFFER_PIXELS_ARB     0x202E\n#define WGL_MAX_PBUFFER_WIDTH_ARB      0x202F\n#define WGL_MAX_PBUFFER_HEIGHT_ARB     0x2030\n#define WGL_PBUFFER_LARGEST_ARB        0x2033\n#define WGL_PBUFFER_WIDTH_ARB          0x2034\n#define WGL_PBUFFER_HEIGHT_ARB         0x2035\n#define WGL_PBUFFER_LOST_ARB           0x2036\n#endif\n\n#ifndef WGL_ARB_render_texture\n#define WGL_BIND_TO_TEXTURE_RGB_ARB    0x2070\n#define WGL_BIND_TO_TEXTURE_RGBA_ARB   0x2071\n#define WGL_TEXTURE_FORMAT_ARB         0x2072\n#define WGL_TEXTURE_TARGET_ARB         0x2073\n#define WGL_MIPMAP_TEXTURE_ARB         0x2074\n#define WGL_TEXTURE_RGB_ARB            0x2075\n#define WGL_TEXTURE_RGBA_ARB           0x2076\n#define WGL_NO_TEXTURE_ARB             0x2077\n#define WGL_TEXTURE_CUBE_MAP_ARB       0x2078\n#define WGL_TEXTURE_1D_ARB             0x2079\n#define WGL_TEXTURE_2D_ARB             0x207A\n#define WGL_MIPMAP_LEVEL_ARB           0x207B\n#define WGL_CUBE_MAP_FACE_ARB          0x207C\n#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D\n#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E\n#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F\n#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080\n#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081\n#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082\n#define WGL_FRONT_LEFT_ARB             0x2083\n#define WGL_FRONT_RIGHT_ARB            0x2084\n#define WGL_BACK_LEFT_ARB              0x2085\n#define WGL_BACK_RIGHT_ARB             0x2086\n#define WGL_AUX0_ARB                   0x2087\n#define WGL_AUX1_ARB                   0x2088\n#define WGL_AUX2_ARB                   0x2089\n#define WGL_AUX3_ARB                   0x208A\n#define WGL_AUX4_ARB                   0x208B\n#define WGL_AUX5_ARB                   0x208C\n#define WGL_AUX6_ARB                   0x208D\n#define WGL_AUX7_ARB                   0x208E\n#define WGL_AUX8_ARB                   0x208F\n#define WGL_AUX9_ARB                   0x2090\n#endif\n\n#ifndef WGL_ARB_pixel_format_float\n#define WGL_TYPE_RGBA_FLOAT_ARB        0x21A0\n#endif\n\n#ifndef WGL_EXT_make_current_read\n#define ERROR_INVALID_PIXEL_TYPE_EXT   0x2043\n#endif\n\n#ifndef WGL_EXT_pixel_format\n#define WGL_NUMBER_PIXEL_FORMATS_EXT   0x2000\n#define WGL_DRAW_TO_WINDOW_EXT         0x2001\n#define WGL_DRAW_TO_BITMAP_EXT         0x2002\n#define WGL_ACCELERATION_EXT           0x2003\n#define WGL_NEED_PALETTE_EXT           0x2004\n#define WGL_NEED_SYSTEM_PALETTE_EXT    0x2005\n#define WGL_SWAP_LAYER_BUFFERS_EXT     0x2006\n#define WGL_SWAP_METHOD_EXT            0x2007\n#define WGL_NUMBER_OVERLAYS_EXT        0x2008\n#define WGL_NUMBER_UNDERLAYS_EXT       0x2009\n#define WGL_TRANSPARENT_EXT            0x200A\n#define WGL_TRANSPARENT_VALUE_EXT      0x200B\n#define WGL_SHARE_DEPTH_EXT            0x200C\n#define WGL_SHARE_STENCIL_EXT          0x200D\n#define WGL_SHARE_ACCUM_EXT            0x200E\n#define WGL_SUPPORT_GDI_EXT            0x200F\n#define WGL_SUPPORT_OPENGL_EXT         0x2010\n#define WGL_DOUBLE_BUFFER_EXT          0x2011\n#define WGL_STEREO_EXT                 0x2012\n#define WGL_PIXEL_TYPE_EXT             0x2013\n#define WGL_COLOR_BITS_EXT             0x2014\n#define WGL_RED_BITS_EXT               0x2015\n#define WGL_RED_SHIFT_EXT              0x2016\n#define WGL_GREEN_BITS_EXT             0x2017\n#define WGL_GREEN_SHIFT_EXT            0x2018\n#define WGL_BLUE_BITS_EXT              0x2019\n#define WGL_BLUE_SHIFT_EXT             0x201A\n#define WGL_ALPHA_BITS_EXT             0x201B\n#define WGL_ALPHA_SHIFT_EXT            0x201C\n#define WGL_ACCUM_BITS_EXT             0x201D\n#define WGL_ACCUM_RED_BITS_EXT         0x201E\n#define WGL_ACCUM_GREEN_BITS_EXT       0x201F\n#define WGL_ACCUM_BLUE_BITS_EXT        0x2020\n#define WGL_ACCUM_ALPHA_BITS_EXT       0x2021\n#define WGL_DEPTH_BITS_EXT             0x2022\n#define WGL_STENCIL_BITS_EXT           0x2023\n#define WGL_AUX_BUFFERS_EXT            0x2024\n#define WGL_NO_ACCELERATION_EXT        0x2025\n#define WGL_GENERIC_ACCELERATION_EXT   0x2026\n#define WGL_FULL_ACCELERATION_EXT      0x2027\n#define WGL_SWAP_EXCHANGE_EXT          0x2028\n#define WGL_SWAP_COPY_EXT              0x2029\n#define WGL_SWAP_UNDEFINED_EXT         0x202A\n#define WGL_TYPE_RGBA_EXT              0x202B\n#define WGL_TYPE_COLORINDEX_EXT        0x202C\n#endif\n\n#ifndef WGL_EXT_pbuffer\n#define WGL_DRAW_TO_PBUFFER_EXT        0x202D\n#define WGL_MAX_PBUFFER_PIXELS_EXT     0x202E\n#define WGL_MAX_PBUFFER_WIDTH_EXT      0x202F\n#define WGL_MAX_PBUFFER_HEIGHT_EXT     0x2030\n#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT  0x2031\n#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032\n#define WGL_PBUFFER_LARGEST_EXT        0x2033\n#define WGL_PBUFFER_WIDTH_EXT          0x2034\n#define WGL_PBUFFER_HEIGHT_EXT         0x2035\n#endif\n\n#ifndef WGL_EXT_depth_float\n#define WGL_DEPTH_FLOAT_EXT            0x2040\n#endif\n\n#ifndef WGL_3DFX_multisample\n#define WGL_SAMPLE_BUFFERS_3DFX        0x2060\n#define WGL_SAMPLES_3DFX               0x2061\n#endif\n\n#ifndef WGL_EXT_multisample\n#define WGL_SAMPLE_BUFFERS_EXT         0x2041\n#define WGL_SAMPLES_EXT                0x2042\n#endif\n\n#ifndef WGL_I3D_digital_video_control\n#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050\n#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051\n#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052\n#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053\n#endif\n\n#ifndef WGL_I3D_gamma\n#define WGL_GAMMA_TABLE_SIZE_I3D       0x204E\n#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D  0x204F\n#endif\n\n#ifndef WGL_I3D_genlock\n#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044\n#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045\n#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046\n#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047\n#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048\n#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049\n#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A\n#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B\n#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C\n#endif\n\n#ifndef WGL_I3D_image_buffer\n#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001\n#define WGL_IMAGE_BUFFER_LOCK_I3D      0x00000002\n#endif\n\n#ifndef WGL_I3D_swap_frame_lock\n#endif\n\n#ifndef WGL_NV_render_depth_texture\n#define WGL_BIND_TO_TEXTURE_DEPTH_NV   0x20A3\n#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4\n#define WGL_DEPTH_TEXTURE_FORMAT_NV    0x20A5\n#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6\n#define WGL_DEPTH_COMPONENT_NV         0x20A7\n#endif\n\n#ifndef WGL_NV_render_texture_rectangle\n#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0\n#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1\n#define WGL_TEXTURE_RECTANGLE_NV       0x20A2\n#endif\n\n#ifndef WGL_ATI_pixel_format_float\n#define WGL_TYPE_RGBA_FLOAT_ATI        0x21A0\n#define WGL_RGBA_FLOAT_MODE_ATI        0x8820\n#define WGL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835\n#endif\n\n#ifndef WGL_NV_float_buffer\n#define WGL_FLOAT_COMPONENTS_NV        0x20B0\n#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1\n#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2\n#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3\n#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4\n#define WGL_TEXTURE_FLOAT_R_NV         0x20B5\n#define WGL_TEXTURE_FLOAT_RG_NV        0x20B6\n#define WGL_TEXTURE_FLOAT_RGB_NV       0x20B7\n#define WGL_TEXTURE_FLOAT_RGBA_NV      0x20B8\n#endif\n\n#ifndef WGL_NV_swap_group\n#endif\n\n#ifndef WGL_NV_gpu_affinity \n#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0\n#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1\n#endif\n\n\n/*************************************************************/\n\n#ifndef WGL_ARB_pbuffer\nDECLARE_HANDLE(HPBUFFERARB);\n#endif\n#ifndef WGL_EXT_pbuffer\nDECLARE_HANDLE(HPBUFFEREXT);\n#endif\n\n#ifndef WGL_NV_gpu_affinity\nDECLARE_HANDLE(HGPUNV);\ntypedef struct _GPU_DEVICE {\n    DWORD  cb;\n    CHAR   DeviceName[32];\n    CHAR   DeviceString[128];\n    DWORD  Flags;\n    RECT   rcVirtualScreen;\n} GPU_DEVICE, *PGPU_DEVICE;\n#endif\n\n#ifndef WGL_ARB_buffer_region\n#define WGL_ARB_buffer_region 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern HANDLE WINAPI wglCreateBufferRegionARB (HDC, int, UINT);\nextern VOID WINAPI wglDeleteBufferRegionARB (HANDLE);\nextern BOOL WINAPI wglSaveBufferRegionARB (HANDLE, int, int, int, int);\nextern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE, int, int, int, int, int, int);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);\ntypedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);\ntypedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);\ntypedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);\n#endif\n\n#ifndef WGL_ARB_multisample\n#define WGL_ARB_multisample 1\n#endif\n\n#ifndef WGL_ARB_extensions_string\n#define WGL_ARB_extensions_string 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern const char * WINAPI wglGetExtensionsStringARB (HDC);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);\n#endif\n\n#ifndef WGL_ARB_pixel_format\n#define WGL_ARB_pixel_format 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC, int, int, UINT, const int *, int *);\nextern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC, int, int, UINT, const int *, FLOAT *);\nextern BOOL WINAPI wglChoosePixelFormatARB (HDC, const int *, const FLOAT *, UINT, int *, UINT *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);\ntypedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);\ntypedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);\n#endif\n\n#ifndef WGL_ARB_make_current_read\n#define WGL_ARB_make_current_read 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglMakeContextCurrentARB (HDC, HDC, HGLRC);\nextern HDC WINAPI wglGetCurrentReadDCARB (void);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);\ntypedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);\n#endif\n\n#ifndef WGL_ARB_pbuffer\n#define WGL_ARB_pbuffer 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC, int, int, int, const int *);\nextern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB);\nextern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB, HDC);\nextern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB);\nextern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB, int, int *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);\ntypedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);\ntypedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);\ntypedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);\ntypedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);\n#endif\n\n#ifndef WGL_ARB_render_texture\n#define WGL_ARB_render_texture 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB, int);\nextern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB, int);\nextern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB, const int *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);\ntypedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);\ntypedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);\n#endif\n\n#ifndef WGL_ARB_create_context\n#define WGL_ARB_create_context 1\n#define WGL_CONTEXT_MAJOR_VERSION_ARB   0x2091\n#define WGL_CONTEXT_MINOR_VERSION_ARB   0x2092\n#define WGL_CONTEXT_LAYER_PLANE_ARB     0x2093\n#define WGL_CONTEXT_FLAGS_ARB           0x2094\n#define WGL_CONTEXT_PROFILE_MASK_ARB    0x9126\n#define WGL_CONTEXT_DEBUG_BIT_ARB       0x0001\n#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002\n#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB       0x00000001\n#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern HGLRC WINAPI wglCreateContextAttribsARB (HDC, HGLRC, const int *);\n#endif\ntypedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *piAttribList);\n#endif\n\n#ifndef WGL_ARB_pixel_format_float\n#define WGL_ARB_pixel_format_float 1\n#endif\n\n#ifndef WGL_EXT_display_color_table\n#define WGL_EXT_display_color_table 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort);\nextern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *, GLuint);\nextern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort);\nextern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);\ntypedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);\ntypedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);\ntypedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);\n#endif\n\n#ifndef WGL_EXT_extensions_string\n#define WGL_EXT_extensions_string 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern const char * WINAPI wglGetExtensionsStringEXT (void);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);\n#endif\n\n#ifndef WGL_EXT_make_current_read\n#define WGL_EXT_make_current_read 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglMakeContextCurrentEXT (HDC, HDC, HGLRC);\nextern HDC WINAPI wglGetCurrentReadDCEXT (void);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);\ntypedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);\n#endif\n\n#ifndef WGL_EXT_pbuffer\n#define WGL_EXT_pbuffer 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC, int, int, int, const int *);\nextern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT);\nextern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT, HDC);\nextern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT);\nextern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT, int, int *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);\ntypedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);\ntypedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);\ntypedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);\ntypedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);\n#endif\n\n#ifndef WGL_EXT_pixel_format\n#define WGL_EXT_pixel_format 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC, int, int, UINT, int *, int *);\nextern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC, int, int, UINT, int *, FLOAT *);\nextern BOOL WINAPI wglChoosePixelFormatEXT (HDC, const int *, const FLOAT *, UINT, int *, UINT *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);\ntypedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);\ntypedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);\n#endif\n\n#ifndef WGL_EXT_swap_control\n#define WGL_EXT_swap_control 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglSwapIntervalEXT (int);\nextern int WINAPI wglGetSwapIntervalEXT (void);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);\ntypedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);\n#endif\n\n#ifndef WGL_EXT_depth_float\n#define WGL_EXT_depth_float 1\n#endif\n\n#ifndef WGL_NV_vertex_array_range\n#define WGL_NV_vertex_array_range 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern void* WINAPI wglAllocateMemoryNV (GLsizei, GLfloat, GLfloat, GLfloat);\nextern void WINAPI wglFreeMemoryNV (void *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);\ntypedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);\n#endif\n\n#ifndef WGL_3DFX_multisample\n#define WGL_3DFX_multisample 1\n#endif\n\n#ifndef WGL_EXT_multisample\n#define WGL_EXT_multisample 1\n#endif\n\n#ifndef WGL_OML_sync_control\n#define WGL_OML_sync_control 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglGetSyncValuesOML (HDC, INT64 *, INT64 *, INT64 *);\nextern BOOL WINAPI wglGetMscRateOML (HDC, INT32 *, INT32 *);\nextern INT64 WINAPI wglSwapBuffersMscOML (HDC, INT64, INT64, INT64);\nextern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC, int, INT64, INT64, INT64);\nextern BOOL WINAPI wglWaitForMscOML (HDC, INT64, INT64, INT64, INT64 *, INT64 *, INT64 *);\nextern BOOL WINAPI wglWaitForSbcOML (HDC, INT64, INT64 *, INT64 *, INT64 *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);\ntypedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);\ntypedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);\ntypedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);\ntypedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);\ntypedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);\n#endif\n\n#ifndef WGL_I3D_digital_video_control\n#define WGL_I3D_digital_video_control 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC, int, int *);\nextern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC, int, const int *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);\ntypedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);\n#endif\n\n#ifndef WGL_I3D_gamma\n#define WGL_I3D_gamma 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglGetGammaTableParametersI3D (HDC, int, int *);\nextern BOOL WINAPI wglSetGammaTableParametersI3D (HDC, int, const int *);\nextern BOOL WINAPI wglGetGammaTableI3D (HDC, int, USHORT *, USHORT *, USHORT *);\nextern BOOL WINAPI wglSetGammaTableI3D (HDC, int, const USHORT *, const USHORT *, const USHORT *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);\ntypedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);\ntypedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);\ntypedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);\n#endif\n\n#ifndef WGL_I3D_genlock\n#define WGL_I3D_genlock 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglEnableGenlockI3D (HDC);\nextern BOOL WINAPI wglDisableGenlockI3D (HDC);\nextern BOOL WINAPI wglIsEnabledGenlockI3D (HDC, BOOL *);\nextern BOOL WINAPI wglGenlockSourceI3D (HDC, UINT);\nextern BOOL WINAPI wglGetGenlockSourceI3D (HDC, UINT *);\nextern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC, UINT);\nextern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC, UINT *);\nextern BOOL WINAPI wglGenlockSampleRateI3D (HDC, UINT);\nextern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC, UINT *);\nextern BOOL WINAPI wglGenlockSourceDelayI3D (HDC, UINT);\nextern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC, UINT *);\nextern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC, UINT *, UINT *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);\ntypedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);\ntypedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);\ntypedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);\ntypedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);\ntypedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);\ntypedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);\ntypedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);\ntypedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);\ntypedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);\ntypedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);\ntypedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);\n#endif\n\n#ifndef WGL_I3D_image_buffer\n#define WGL_I3D_image_buffer 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern LPVOID WINAPI wglCreateImageBufferI3D (HDC, DWORD, UINT);\nextern BOOL WINAPI wglDestroyImageBufferI3D (HDC, LPVOID);\nextern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC, const HANDLE *, const LPVOID *, const DWORD *, UINT);\nextern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC, const LPVOID *, UINT);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);\ntypedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);\ntypedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);\ntypedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);\n#endif\n\n#ifndef WGL_I3D_swap_frame_lock\n#define WGL_I3D_swap_frame_lock 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglEnableFrameLockI3D (void);\nextern BOOL WINAPI wglDisableFrameLockI3D (void);\nextern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *);\nextern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);\ntypedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);\ntypedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);\ntypedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);\n#endif\n\n#ifndef WGL_I3D_swap_frame_usage\n#define WGL_I3D_swap_frame_usage 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglGetFrameUsageI3D (float *);\nextern BOOL WINAPI wglBeginFrameTrackingI3D (void);\nextern BOOL WINAPI wglEndFrameTrackingI3D (void);\nextern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *, DWORD *, float *);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);\ntypedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);\ntypedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);\ntypedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);\n#endif\n\n#ifndef WGL_ATI_pixel_format_float\n#define WGL_ATI_pixel_format_float 1\n#endif\n\n#ifndef WGL_NV_render_depth_texture\n#define WGL_NV_render_depth_texture 1\n#endif\n\n#ifndef WGL_NV_render_texture_rectangle\n#define WGL_NV_render_texture_rectangle 1\n#endif\n\n#ifndef WGL_NV_float_buffer\n#define WGL_NV_float_buffer 1\n#endif\n\n#ifndef WGL_NV_swap_group\n#define WGL_NV_swap_group 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglJoinSwapGroupNV(HDC hDC, GLuint group);\nextern BOOL WINAPI wglBindSwapBarrierNV(GLuint group, GLuint barrier);\nextern BOOL WINAPI wglQuerySwapGroupNV(HDC hDC, GLuint *group, GLuint *barrier);\nextern BOOL WINAPI wglQueryMaxSwapGroupsNV(HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);\nextern BOOL WINAPI wglQueryFrameCountNV(HDC hDC, GLuint *count);\nextern BOOL WINAPI wglResetFrameCountNV(HDC hDC);\n#endif /* WGL_WGLEXT_PROTOTYPES */\ntypedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);\ntypedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);\ntypedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);\ntypedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);\ntypedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);\ntypedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);\n#endif\n\n#ifndef WGL_NV_gpu_affinity\n#define WGL_NV_gpu_affinity 1\n#ifdef WGL_WGLEXT_PROTOTYPES\nextern BOOL WINAPI wglEnumGpusNV (UINT iIndex, HGPUNV *hGpu);\nextern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);\nextern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *pGpuList);\nextern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);\nextern BOOL WINAPI wglDeleteDCNV (HDC hAffinityDC);\n#else\ntypedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iIndex, HGPUNV *hGpu);\ntypedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);\ntypedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *pGpuList);\ntypedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);\ntypedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hAffinityDC);\n#endif\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.10)\nproject(spine-cpp)\n\ninclude(${CMAKE_CURRENT_LIST_DIR}/flags.cmake)\n\ninclude_directories(include)\nfile(GLOB INCLUDES \"spine-cpp/include/**/*.h\")\nfile(GLOB SOURCES \"spine-cpp/src/**/*.cpp\")\n\nadd_library(spine-cpp STATIC ${SOURCES} ${INCLUDES})\ntarget_include_directories(spine-cpp PUBLIC spine-cpp/include)\n\n# Install target\ninstall(TARGETS spine-cpp EXPORT spine-cpp_TARGETS DESTINATION dist/lib)\ninstall(FILES ${INCLUDES} DESTINATION dist/include)\n\n# Export target\nexport(\n\tEXPORT spine-cpp_TARGETS\n\tFILE ${CMAKE_CURRENT_BINARY_DIR}/spine-cppTargets.cmake\n\tNAMESPACE \"Spine::\")"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/LICENSE",
    "content": "Spine Runtimes License Agreement\nLast updated May 1, 2019. Replaces all prior versions.\n\nCopyright (c) 2013-2019, Esoteric Software LLC\n\nIntegration of the Spine Runtimes into software or otherwise creating\nderivative works of the Spine Runtimes is permitted under the terms and\nconditions of Section 2 of the Spine Editor License Agreement:\nhttp://esotericsoftware.com/spine-editor-license\n\nOtherwise, it is permitted to integrate the Spine Runtimes into software\nor otherwise create derivative works of the Spine Runtimes (collectively,\n\"Products\"), provided that each user of the Products must obtain their own\nSpine Editor license and redistribution of the Products in any form must\ninclude this license and copyright notice.\n\nTHIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY EXPRESS\nOR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN\nNO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\nBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS\nINTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\nEVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/README.md",
    "content": "# spine-cpp\n\nThe spine-cpp runtime provides basic functionality to load and manipulate [spine](http://esotericsoftware.com) skeletal animation data using C++. It does not perform rendering but can be extended to enable spine animations for other projects that utilize C++.\n\n## Licensing\n\nYou are welcome to evaluate the Spine Runtimes and the examples we provide in this repository free of charge.\n\nYou can integrate the Spine Runtimes into your software free of charge, but users of your software must have their own [Spine license](https://esotericsoftware.com/spine-purchase). Please make your users aware of this requirement! This option is often chosen by those making development tools, such as an SDK, game toolkit, or software library.\n\nIn order to distribute your software containing the Spine Runtimes to others that don't have a Spine license, you need a [Spine license](https://esotericsoftware.com/spine-purchase) at the time of integration. Then you can distribute your software containing the Spine Runtimes however you like, provided others don't modify it or use it to create new software. If others want to do that, they'll need their own Spine license.\n\nFor the official legal terms governing the Spine Runtimes, please read the [Spine Runtimes License Agreement](http://esotericsoftware.com/spine-runtimes-license) and Section 2 of the [Spine Editor License Agreement](http://esotericsoftware.com/spine-editor-license#s2).\n\n## Spine version\n\nspine-cpp works with data exported from spine 4.2.xx.\n\nspine-cpp supports all spine features.\n\n## Setup\n\n1. Download the spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it as a zip via the download button above.\n2. Copy the contents of the `spine-cpp/spine-cpp/src` and `spine-cpp/spine-cpp/include` directories into your project. Be sure your header search is configured to find the contents of the `spine-cpp/spine-cpp/include` directory. Note that the includes use `spine/Xxx.h`, so the `spine` directory cannot be omitted when copying the files.\n\n## Usage\n\n### [Please see the spine-cpp guide for full documentation](http://esotericsoftware.com/spine-cpp)\n\n## Extension\n\nExtending spine-cpp requires implementing both the `SpineExtension` class and the TextureLoader class:\n\n```\n#include <spine/Extension.h>\nvoid spine::SpineExtension *spine::getDefaultExtension() {\n  return new spine::DefaultExtension();\n}\n\nclass MyTextureLoader : public spine::TextureLoader\n{\n  virtual void load(spine::AtlasPage& page, const spine::String& path) {\n    void* texture = ... load the texture based on path ...\n    page->setRendererObject(texture); // use the texture later in your rendering code\n  }\n\n  virtual void unload(void* texture) { // TODO }\n};\n```\n\n## Runtimes extending spine-cpp\n\n- [spine-sfml](../spine-sfml/cpp)\n- [spine-cocos2dx](../spine-cocos2dx)\n- [spine-ue](../spine-ue)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/flags.cmake",
    "content": "option(SPINE_SANITIZE \"Build with sanitization\" OFF)\noption(SPINE_SET_COMPILER_FLAGS \"Set compiler flags\" ON)\n\nif (NOT SPINE_SET_COMPILER_FLAGS)\n    return()\nendif()\n\nif(MSVC)\n    message(\"MSCV detected\")\n    set (CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS\")\n    set (CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS\")\nelse()\n    set (CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wno-unused-parameter -std=c99\")\n    set (CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -pedantic -Wno-unused-parameter -std=c++11 -fno-exceptions\")\n    if (${SPINE_SANITIZE})\n        set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -fsanitize=address -fsanitize=undefined\")\n        set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=undefined\")\n    endif()\nendif()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Animation.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Animation_h\n#define Spine_Animation_h\n\n#include <spine/Vector.h>\n#include <spine/HashMap.h>\n#include <spine/MixBlend.h>\n#include <spine/MixDirection.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/Property.h>\n\nnamespace spine {\n\tclass Timeline;\n\n\tclass Skeleton;\n\n\tclass Event;\n\n\tclass AnimationState;\n\n\tclass SP_API Animation : public SpineObject {\n\t\tfriend class AnimationState;\n\n\t\tfriend class TrackEntry;\n\n\t\tfriend class AnimationStateData;\n\n\t\tfriend class AttachmentTimeline;\n\n\t\tfriend class RGBATimeline;\n\n\t\tfriend class RGBTimeline;\n\n\t\tfriend class AlphaTimeline;\n\n\t\tfriend class RGBA2Timeline;\n\n\t\tfriend class RGB2Timeline;\n\n\t\tfriend class DeformTimeline;\n\n\t\tfriend class DrawOrderTimeline;\n\n\t\tfriend class EventTimeline;\n\n\t\tfriend class IkConstraintTimeline;\n\n\t\tfriend class PathConstraintMixTimeline;\n\n\t\tfriend class PathConstraintPositionTimeline;\n\n\t\tfriend class PathConstraintSpacingTimeline;\n\n\t\tfriend class RotateTimeline;\n\n\t\tfriend class ScaleTimeline;\n\n\t\tfriend class ShearTimeline;\n\n\t\tfriend class TransformConstraintTimeline;\n\n\t\tfriend class TranslateTimeline;\n\n\t\tfriend class TranslateXTimeline;\n\n\t\tfriend class TranslateYTimeline;\n\n\t\tfriend class TwoColorTimeline;\n\n\tpublic:\n\t\tAnimation(const String &name, Vector<Timeline *> &timelines, float duration);\n\n\t\t~Animation();\n\n\t\t/// Applies all the animation's timelines to the specified skeleton.\n\t\t/// See also Timeline::apply(Skeleton&, float, float, Vector, float, MixPose, MixDirection)\n\t\tvoid apply(Skeleton &skeleton, float lastTime, float time, bool loop, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t   MixBlend blend, MixDirection direction);\n\n\t\tconst String &getName();\n\n\t\tVector<Timeline *> &getTimelines();\n\n\t\tbool hasTimeline(Vector<PropertyId> &ids);\n\n\t\tfloat getDuration();\n\n\t\tvoid setDuration(float inValue);\n\n\t\t/// @param target After the first and before the last entry.\n\t\tstatic int search(Vector<float> &values, float target);\n\n\t\tstatic int search(Vector<float> &values, float target, int step);\n\tprivate:\n\t\tVector<Timeline *> _timelines;\n\t\tHashMap<PropertyId, bool> _timelineIds;\n\t\tfloat _duration;\n\t\tString _name;\n\t};\n}\n\n#endif /* Spine_Animation_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/AnimationState.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_AnimationState_h\n#define Spine_AnimationState_h\n\n#include <spine/Vector.h>\n#include <spine/Pool.h>\n#include <spine/Property.h>\n#include <spine/MixBlend.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/HasRendererObject.h>\n#include \"Slot.h\"\n\n#ifdef SPINE_USE_STD_FUNCTION\n#include <functional>\n#endif\n\nnamespace spine {\n\tenum EventType {\n\t\tEventType_Start = 0,\n\t\tEventType_Interrupt,\n\t\tEventType_End,\n\t\tEventType_Complete,\n\t\tEventType_Dispose,\n\t\tEventType_Event\n\t};\n\n\tclass AnimationState;\n\n\tclass TrackEntry;\n\n\tclass Animation;\n\n\tclass Event;\n\n\tclass AnimationStateData;\n\n\tclass Skeleton;\n\n\tclass RotateTimeline;\n\n\tclass AttachmentTimeline;\n\n#ifdef SPINE_USE_STD_FUNCTION\n\ttypedef std::function<void (AnimationState* state, EventType type, TrackEntry* entry, Event* event)> AnimationStateListener;\n#else\n\n\ttypedef void (*AnimationStateListener)(AnimationState *state, EventType type, TrackEntry *entry, Event *event);\n\n#endif\n\n\t/// Abstract class to inherit from to create a callback object\n\tclass SP_API AnimationStateListenerObject {\n\tpublic:\n\t\tAnimationStateListenerObject() {};\n\n\t\tvirtual ~AnimationStateListenerObject() {};\n\tpublic:\n\t\t/// The callback function to be called\n\t\tvirtual void callback(AnimationState *state, EventType type, TrackEntry *entry, Event *event) = 0;\n\t};\n\n\t/// State for the playback of an animation\n\tclass SP_API TrackEntry : public SpineObject, public HasRendererObject {\n\t\tfriend class EventQueue;\n\n\t\tfriend class AnimationState;\n\n\tpublic:\n\t\tTrackEntry();\n\n\t\tvirtual ~TrackEntry();\n\n\t\t/// The index of the track where this entry is either current or queued.\n\t\tint getTrackIndex();\n\n\t\t/// The animation to apply for this track entry.\n\t\tAnimation *getAnimation();\n\n\t\tTrackEntry *getPrevious();\n\n\t\t/// If true, the animation will repeat. If false, it will not, instead its last frame is applied if played beyond its duration.\n\t\tbool getLoop();\n\n\t\tvoid setLoop(bool inValue);\n\n\t\t/// If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead\n\t\t/// of being mixed out.\n\t\t///\n\t\t/// When mixing between animations that key the same property, if a lower track also keys that property then the value will\n\t\t/// briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%\n\t\t/// while the second animation mixes from 0% to 100%. Setting holdPrevious to true applies the first animation\n\t\t/// at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which\n\t\t/// keys the property, only when a higher track also keys the property.\n\t\t///\n\t\t/// Snapping will occur if holdPrevious is true and this animation does not key all the same properties as the\n\t\t/// previous animation.\n\t\tbool getHoldPrevious();\n\n\t\tvoid setHoldPrevious(bool inValue);\n\n\t\tbool getReverse();\n\n\t\tvoid setReverse(bool inValue);\n\n\t\tbool getShortestRotation();\n\n\t\tvoid setShortestRotation(bool inValue);\n\n\t\t/// Seconds to postpone playing the animation. When a track entry is the current track entry, delay postpones incrementing\n\t\t/// the track time. When a track entry is queued, delay is the time from the start of the previous animation to when the\n\t\t/// track entry will become the current track entry.\n\t\tfloat getDelay();\n\n\t\tvoid setDelay(float inValue);\n\n\t\t/// Current time in seconds this track entry has been the current track entry. The track time determines\n\t\t/// TrackEntry.AnimationTime. The track time can be set to start the animation at a time other than 0, without affecting looping.\n\t\tfloat getTrackTime();\n\n\t\tvoid setTrackTime(float inValue);\n\n\t\t/// The track time in seconds when this animation will be removed from the track. Defaults to the animation duration for\n\t\t/// non-looping animations and to int.MaxValue for looping animations. If the track end time is reached and no\n\t\t/// other animations are queued for playback, and mixing from any previous animations is complete, properties keyed by the animation,\n\t\t/// are set to the setup pose and the track is cleared.\n\t\t///\n\t\t/// It may be desired to use AnimationState.addEmptyAnimation(int, float, float) to mix the properties back to the\n\t\t/// setup pose over time, rather than have it happen instantly.\n\t\tfloat getTrackEnd();\n\n\t\tvoid setTrackEnd(float inValue);\n\n\t\t/// Seconds when this animation starts, both initially and after looping. Defaults to 0.\n\t\t///\n\t\t/// When changing the animation start time, it often makes sense to set TrackEntry.AnimationLast to the same value to\n\t\t/// prevent timeline keys before the start time from triggering.\n\t\tfloat getAnimationStart();\n\n\t\tvoid setAnimationStart(float inValue);\n\n\t\t/// Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will\n\t\t/// loop back to TrackEntry.AnimationStart at this time. Defaults to the animation duration.\n\t\tfloat getAnimationEnd();\n\n\t\tvoid setAnimationEnd(float inValue);\n\n\t\t/// The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this\n\t\t/// animation is applied, event timelines will fire all events between the animation last time (exclusive) and animation time\n\t\t/// (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation is applied.\n\t\tfloat getAnimationLast();\n\n\t\tvoid setAnimationLast(float inValue);\n\n\t\t/// Uses TrackEntry.TrackTime to compute the animation time between TrackEntry.AnimationStart. and\n\t\t/// TrackEntry.AnimationEnd. When the track time is 0, the animation time is equal to the animation start time.\n\t\tfloat getAnimationTime();\n\n\t\t/// Multiplier for the delta time when the animation state is updated, causing time for this animation to play slower or\n\t\t/// faster. Defaults to 1.\n\t\tfloat getTimeScale();\n\n\t\tvoid setTimeScale(float inValue);\n\n\t\t/// Values less than 1 mix this animation with the last skeleton pose. Defaults to 1, which overwrites the last skeleton pose with\n\t\t/// this animation.\n\t\t///\n\t\t/// Typically track 0 is used to completely pose the skeleton, then alpha can be used on higher tracks. It doesn't make sense\n\t\t/// to use alpha on track 0 if the skeleton pose is from the last frame render.\n\t\tfloat getAlpha();\n\n\t\tvoid setAlpha(float inValue);\n\n\t\t///\n\t\t/// When the mix percentage (mix time / mix duration) is less than the event threshold, event timelines for the animation\n\t\t/// being mixed out will be applied. Defaults to 0, so event timelines are not applied for an animation being mixed out.\n\t\tfloat getEventThreshold();\n\n\t\tvoid setEventThreshold(float inValue);\n\n\t\t/// When the mix percentage (mix time / mix duration) is less than the attachment threshold, attachment timelines for the\n\t\t/// animation being mixed out will be applied. Defaults to 0, so attachment timelines are not applied for an animation being\n\t\t/// mixed out.\n\t\tfloat getMixAttachmentThreshold();\n\n\t\tvoid setMixAttachmentThreshold(float inValue);\n\n        /// When getAlpha() is greater than alphaAttachmentThreshold, attachment timelines are applied.\n\t    /// Defaults to 0, so attachment timelines are always applied. */\n        float getAlphaAttachmentThreshold();\n\n        void setAlphaAttachmentThreshold(float inValue);\n\n\t\t/// When the mix percentage (mix time / mix duration) is less than the draw order threshold, draw order timelines for the\n\t\t/// animation being mixed out will be applied. Defaults to 0, so draw order timelines are not applied for an animation being\n\t\t/// mixed out.\n\t\tfloat getMixDrawOrderThreshold();\n\n\t\tvoid setMixDrawOrderThreshold(float inValue);\n\n\t\t/// The animation queued to start after this animation, or NULL.\n\t\tTrackEntry *getNext();\n\n\t\t/// Returns true if at least one loop has been completed.\n\t\tbool isComplete();\n\n\t\t/// Seconds from 0 to the mix duration when mixing from the previous animation to this animation. May be slightly more than\n\t\t/// TrackEntry.MixDuration when the mix is complete.\n\t\tfloat getMixTime();\n\n\t\tvoid setMixTime(float inValue);\n\n\t\t/// Seconds for mixing from the previous animation to this animation. Defaults to the value provided by\n\t\t/// AnimationStateData based on the animation before this animation (if any).\n\t\t///\n\t\t/// The mix duration can be set manually rather than use the value from AnimationStateData.GetMix.\n\t\t/// In that case, the mixDuration must be set before AnimationState.update(float) is next called.\n\t\t///\n\t\t/// When using AnimationState::addAnimation(int, Animation, bool, float) with a delay\n\t\t/// less than or equal to 0, note the Delay is set using the mix duration from the AnimationStateData\n\t\tfloat getMixDuration();\n\n\t\tvoid setMixDuration(float inValue);\n\n        void setMixDuration(float mixDuration, float delay);\n\n\t\tMixBlend getMixBlend();\n\n\t\tvoid setMixBlend(MixBlend blend);\n\n\t\t/// The track entry for the previous animation when mixing from the previous animation to this animation, or NULL if no\n\t\t/// mixing is currently occuring. When mixing from multiple animations, MixingFrom makes up a double linked list with MixingTo.\n\t\tTrackEntry *getMixingFrom();\n\n\t\t/// The track entry for the next animation when mixing from this animation, or NULL if no mixing is currently occuring.\n\t\t/// When mixing from multiple animations, MixingTo makes up a double linked list with MixingFrom.\n\t\tTrackEntry *getMixingTo();\n\n\t\t/// Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the\n\t\t/// long way around when using alpha and starting animations on other tracks.\n\t\t///\n\t\t/// Mixing involves finding a rotation between two others, which has two possible solutions: the short way or the long way around.\n\t\t/// The two rotations likely change over time, so which direction is the short or long way also changes.\n\t\t/// If the short way was always chosen, bones would flip to the other side when that direction became the long way.\n\t\t/// TrackEntry chooses the short way the first time it is applied and remembers that direction.\n\t\tvoid resetRotationDirections();\n\n\t\tfloat getTrackComplete();\n\n\t\tvoid setListener(AnimationStateListener listener);\n\n\t\tvoid setListener(AnimationStateListenerObject *listener);\n\n        /// Returns true if this track entry has been applied at least once.\n        ///\n        /// See AnimationState::apply(Skeleton).\n        bool wasApplied();\n\n        /// Returns true if there is a getNext() track entry that is ready to become the current track entry during the\n        /// next AnimationState::update(float)}\n        bool isNextReady () {\n            return _next != NULL && _nextTrackLast - _next->_delay >= 0;\n        }\n\n\tprivate:\n\t\tAnimation *_animation;\n\t\tTrackEntry *_previous;\n\t\tTrackEntry *_next;\n\t\tTrackEntry *_mixingFrom;\n\t\tTrackEntry *_mixingTo;\n\t\tint _trackIndex;\n\n\t\tbool _loop, _holdPrevious, _reverse, _shortestRotation;\n\t\tfloat _eventThreshold, _mixAttachmentThreshold, _alphaAttachmentThreshold, _mixDrawOrderThreshold;\n\t\tfloat _animationStart, _animationEnd, _animationLast, _nextAnimationLast;\n\t\tfloat _delay, _trackTime, _trackLast, _nextTrackLast, _trackEnd, _timeScale;\n\t\tfloat _alpha, _mixTime, _mixDuration, _interruptAlpha, _totalAlpha;\n\t\tMixBlend _mixBlend;\n\t\tVector<int> _timelineMode;\n\t\tVector<TrackEntry *> _timelineHoldMix;\n\t\tVector<float> _timelinesRotation;\n\t\tAnimationStateListener _listener;\n\t\tAnimationStateListenerObject *_listenerObject;\n\n\t\tvoid reset();\n\t};\n\n\tclass SP_API EventQueueEntry : public SpineObject {\n\t\tfriend class EventQueue;\n\n\tpublic:\n\t\tEventType _type;\n\t\tTrackEntry *_entry;\n\t\tEvent *_event;\n\n\t\tEventQueueEntry(EventType eventType, TrackEntry *trackEntry, Event *event = NULL);\n\t};\n\n\tclass SP_API EventQueue : public SpineObject {\n\t\tfriend class AnimationState;\n\n\tprivate:\n\t\tVector<EventQueueEntry> _eventQueueEntries;\n\t\tAnimationState &_state;\n\t\tbool _drainDisabled;\n\n\t\tstatic EventQueue *newEventQueue(AnimationState &state);\n\n\t\tstatic EventQueueEntry newEventQueueEntry(EventType eventType, TrackEntry *entry, Event *event = NULL);\n\n\t\tEventQueue(AnimationState &state);\n\n\t\t~EventQueue();\n\n\t\tvoid start(TrackEntry *entry);\n\n\t\tvoid interrupt(TrackEntry *entry);\n\n\t\tvoid end(TrackEntry *entry);\n\n\t\tvoid dispose(TrackEntry *entry);\n\n\t\tvoid complete(TrackEntry *entry);\n\n\t\tvoid event(TrackEntry *entry, Event *event);\n\n\t\t/// Raises all events in the queue and drains the queue.\n\t\tvoid drain();\n\t};\n\n\tclass SP_API AnimationState : public SpineObject, public HasRendererObject {\n\t\tfriend class TrackEntry;\n\n\t\tfriend class EventQueue;\n\n\tpublic:\n\t\texplicit AnimationState(AnimationStateData *data);\n\n\t\t~AnimationState();\n\n\t\t/// Increments the track entry times, setting queued animations as current if needed\n\t\t/// @param delta delta time\n\t\tvoid update(float delta);\n\n\t\t/// Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the\n\t\t/// animation state can be applied to multiple skeletons to pose them identically.\n\t\tbool apply(Skeleton &skeleton);\n\n\t\t/// Removes all animations from all tracks, leaving skeletons in their previous pose.\n\t\t/// It may be desired to use AnimationState.setEmptyAnimations(float) to mix the skeletons back to the setup pose,\n\t\t/// rather than leaving them in their previous pose.\n\t\tvoid clearTracks();\n\n\t\t/// Removes all animations from the tracks, leaving skeletons in their previous pose.\n\t\t/// It may be desired to use AnimationState.setEmptyAnimations(float) to mix the skeletons back to the setup pose,\n\t\t/// rather than leaving them in their previous pose.\n\t\tvoid clearTrack(size_t trackIndex);\n\n\t\t/// Sets an animation by name. setAnimation(int, Animation, bool)\n\t\tTrackEntry *setAnimation(size_t trackIndex, const String &animationName, bool loop);\n\n\t\t/// Sets the current animation for a track, discarding any queued animations.\n\t\t/// @param loop If true, the animation will repeat.\n\t\t/// If false, it will not, instead its last frame is applied if played beyond its duration.\n\t\t/// In either case TrackEntry.TrackEnd determines when the track is cleared.\n\t\t/// @return\n\t\t/// A track entry to allow further customization of animation playback. References to the track entry must not be kept\n\t\t/// after AnimationState.Dispose.\n\t\tTrackEntry *setAnimation(size_t trackIndex, Animation *animation, bool loop);\n\n\t\t/// Queues an animation by name.\n\t\t/// addAnimation(int, Animation, bool, float)\n\t\tTrackEntry *addAnimation(size_t trackIndex, const String &animationName, bool loop, float delay);\n\n\t\t/// Adds an animation to be played delay seconds after the current or last queued animation\n\t\t/// for a track. If the track is empty, it is equivalent to calling setAnimation.\n\t\t/// @param delay\n\t\t/// Seconds to begin this animation after the start of the previous animation. May be &lt;= 0 to use the animation\n\t\t/// duration of the previous track minus any mix duration plus the negative delay.\n\t\t///\n\t\t/// @return A track entry to allow further customization of animation playback. References to the track entry must not be kept\n\t\t/// after AnimationState.Dispose\n\t\tTrackEntry *addAnimation(size_t trackIndex, Animation *animation, bool loop, float delay);\n\n\t\t/// Sets an empty animation for a track, discarding any queued animations, and mixes to it over the specified mix duration.\n\t\tTrackEntry *setEmptyAnimation(size_t trackIndex, float mixDuration);\n\n\t\t/// Adds an empty animation to be played after the current or last queued animation for a track, and mixes to it over the\n\t\t/// specified mix duration.\n\t\t/// @return\n\t\t/// A track entry to allow further customization of animation playback. References to the track entry must not be kept after AnimationState.Dispose.\n\t\t///\n\t\t/// @param trackIndex Track number.\n\t\t/// @param mixDuration Mix duration.\n\t\t/// @param delay Seconds to begin this animation after the start of the previous animation. May be &lt;= 0 to use the animation\n\t\t/// duration of the previous track minus any mix duration plus the negative delay.\n\t\tTrackEntry *addEmptyAnimation(size_t trackIndex, float mixDuration, float delay);\n\n\t\t/// Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration.\n\t\tvoid setEmptyAnimations(float mixDuration);\n\n\t\t/// @return The track entry for the animation currently playing on the track, or NULL if no animation is currently playing.\n\t\tTrackEntry *getCurrent(size_t trackIndex);\n\n\t\tAnimationStateData *getData();\n\n\t\t/// A list of tracks that have animations, which may contain NULLs.\n\t\tVector<TrackEntry *> &getTracks();\n\n\t\tfloat getTimeScale();\n\n\t\tvoid setTimeScale(float inValue);\n\n\t\tvoid setListener(AnimationStateListener listener);\n\n\t\tvoid setListener(AnimationStateListenerObject *listener);\n\n\t\tvoid disableQueue();\n\n\t\tvoid enableQueue();\n\n\t\tvoid setManualTrackEntryDisposal(bool inValue);\n\n        bool getManualTrackEntryDisposal();\n\n\t\tvoid disposeTrackEntry(TrackEntry *entry);\n\n\tprivate:\n\t\tstatic const int Subsequent = 0;\n\t\tstatic const int First = 1;\n\t\tstatic const int HoldSubsequent = 2;\n\t\tstatic const int HoldFirst = 3;\n\t\tstatic const int HoldMix = 4;\n\n\t\tstatic const int Setup = 1;\n\t\tstatic const int Current = 2;\n\n\t\tAnimationStateData *_data;\n\n\t\tPool<TrackEntry> _trackEntryPool;\n\t\tVector<TrackEntry *> _tracks;\n\t\tVector<Event *> _events;\n\t\tEventQueue *_queue;\n\n\t\tHashMap<PropertyId, bool> _propertyIDs;\n\t\tbool _animationsChanged;\n\n\t\tAnimationStateListener _listener;\n\t\tAnimationStateListenerObject *_listenerObject;\n\n\t\tint _unkeyedState;\n\n\t\tfloat _timeScale;\n\n\t\tbool _manualTrackEntryDisposal;\n\n\t\tstatic Animation *getEmptyAnimation();\n\n\t\tstatic void\n\t\tapplyRotateTimeline(RotateTimeline *rotateTimeline, Skeleton &skeleton, float time, float alpha, MixBlend pose,\n\t\t\t\t\t\t\tVector<float> &timelinesRotation, size_t i, bool firstFrame);\n\n\t\tvoid applyAttachmentTimeline(AttachmentTimeline *attachmentTimeline, Skeleton &skeleton, float animationTime,\n\t\t\t\t\t\t\t\t\t MixBlend pose, bool firstFrame);\n\n\t\t/// Returns true when all mixing from entries are complete.\n\t\tbool updateMixingFrom(TrackEntry *to, float delta);\n\n\t\tfloat applyMixingFrom(TrackEntry *to, Skeleton &skeleton, MixBlend currentPose);\n\n\t\tvoid queueEvents(TrackEntry *entry, float animationTime);\n\n\t\t/// Sets the active TrackEntry for a given track number.\n\t\tvoid setCurrent(size_t index, TrackEntry *current, bool interrupt);\n\n\t\t/// Removes the next entry and all entries after it for the specified entry. */\n\t\tvoid clearNext(TrackEntry *entry);\n\n\t\tTrackEntry *expandToIndex(size_t index);\n\n\t\t/// Object-pooling version of new TrackEntry. Obtain an unused TrackEntry from the pool and clear/initialize its values.\n\t\t/// @param last May be NULL.\n\t\tTrackEntry *newTrackEntry(size_t trackIndex, Animation *animation, bool loop, TrackEntry *last);\n\n\t\tvoid animationsChanged();\n\n\t\tvoid computeHold(TrackEntry *entry);\n\n\t\tvoid setAttachment(Skeleton &skeleton, spine::Slot &slot, const String &attachmentName, bool attachments);\n\t};\n}\n\n#endif /* Spine_AnimationState_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/AnimationStateData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_AnimationStateData_h\n#define Spine_AnimationStateData_h\n\n#include <spine/HashMap.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n\n#include <assert.h>\n\nnamespace spine {\n\tclass SkeletonData;\n\n\tclass Animation;\n\n\t/// Stores mix (crossfade) durations to be applied when AnimationState animations are changed.\n\tclass SP_API AnimationStateData : public SpineObject {\n\t\tfriend class AnimationState;\n\n\tpublic:\n\t\texplicit AnimationStateData(SkeletonData *skeletonData);\n\n\t\t/// The SkeletonData to look up animations when they are specified by name.\n\t\tSkeletonData *getSkeletonData();\n\n\t\t/// The mix duration to use when no mix duration has been specifically defined between two animations.\n\t\tfloat getDefaultMix();\n\n\t\tvoid setDefaultMix(float inValue);\n\n\t\t/// Sets a mix duration by animation names.\n\t\tvoid setMix(const String &fromName, const String &toName, float duration);\n\n\t\t/// Sets a mix duration when changing from the specified animation to the other.\n\t\t/// See TrackEntry.MixDuration.\n\t\tvoid setMix(Animation *from, Animation *to, float duration);\n\n\t\t/// The mix duration to use when changing from the specified animation to the other,\n\t\t/// or the DefaultMix if no mix duration has been set.\n\t\tfloat getMix(Animation *from, Animation *to);\n\n\t\t/// Removes all mixes and sets the default mix to 0.\n\t\tvoid clear();\n\n\tprivate:\n\t\tclass AnimationPair : public SpineObject {\n\t\tpublic:\n\t\t\tAnimation *_a1;\n\t\t\tAnimation *_a2;\n\n\t\t\texplicit AnimationPair(Animation *a1 = NULL, Animation *a2 = NULL);\n\n\t\t\tbool operator==(const AnimationPair &other) const;\n\t\t};\n\n\t\tSkeletonData *_skeletonData;\n\t\tfloat _defaultMix;\n\t\tHashMap<AnimationPair, float> _animationToMixTime;\n\t};\n}\n\n#endif /* Spine_AnimationStateData_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Atlas.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Atlas_h\n#define Spine_Atlas_h\n\n#include <spine/Vector.h>\n#include <spine/Extension.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/HasRendererObject.h>\n#include \"TextureRegion.h\"\n\nnamespace spine {\n\tenum Format {\n\t\tFormat_Alpha,\n\t\tFormat_Intensity,\n\t\tFormat_LuminanceAlpha,\n\t\tFormat_RGB565,\n\t\tFormat_RGBA4444,\n\t\tFormat_RGB888,\n\t\tFormat_RGBA8888\n\t};\n\n\t// Our TextureFilter collides with UE4's TextureFilter in unity builds. We rename\n\t// TextureFilter to SpineTextureFilter in UE4.\n#ifdef SPINE_UE4\n\t#define TEXTURE_FILTER_ENUM SpineTextureFilter\n#else\n\t#define TEXTURE_FILTER_ENUM TextureFilter\n#endif\n\n\tenum TEXTURE_FILTER_ENUM {\n\t\tTextureFilter_Unknown,\n\t\tTextureFilter_Nearest,\n\t\tTextureFilter_Linear,\n\t\tTextureFilter_MipMap,\n\t\tTextureFilter_MipMapNearestNearest,\n\t\tTextureFilter_MipMapLinearNearest,\n\t\tTextureFilter_MipMapNearestLinear,\n\t\tTextureFilter_MipMapLinearLinear\n\t};\n\n\tenum TextureWrap {\n\t\tTextureWrap_MirroredRepeat,\n\t\tTextureWrap_ClampToEdge,\n\t\tTextureWrap_Repeat\n\t};\n\n\tclass SP_API AtlasPage : public SpineObject {\n\tpublic:\n\t\tString name;\n\t\tString texturePath;\n\t\tFormat format;\n\t\tTEXTURE_FILTER_ENUM minFilter;\n\t\tTEXTURE_FILTER_ENUM magFilter;\n\t\tTextureWrap uWrap;\n\t\tTextureWrap vWrap;\n\t\tint width, height;\n\t\tbool pma;\n        int index;\n        void *texture;\n\n\t\texplicit AtlasPage(const String &inName) : name(inName), format(Format_RGBA8888),\n\t\t\t\t\t\t\t\t\t\t\t\t   minFilter(TextureFilter_Nearest),\n\t\t\t\t\t\t\t\t\t\t\t\t   magFilter(TextureFilter_Nearest), uWrap(TextureWrap_ClampToEdge),\n\t\t\t\t\t\t\t\t\t\t\t\t   vWrap(TextureWrap_ClampToEdge), width(0), height(0), pma(false), index(0), texture(NULL) {\n\t\t}\n\t};\n\n\tclass SP_API AtlasRegion : public TextureRegion {\n\tpublic:\n\t\tAtlasPage *page;\n\t\tString name;\n\t\tint index;\n\t\tint x, y;\n\t\tVector<int> splits;\n\t\tVector<int> pads;\n\t\tVector <String> names;\n\t\tVector<float> values;\n\t};\n\n\tclass TextureLoader;\n\n\tclass SP_API Atlas : public SpineObject {\n\tpublic:\n\t\tAtlas(const String &path, TextureLoader *textureLoader, bool createTexture = true);\n\n\t\tAtlas(const char *data, int length, const char *dir, TextureLoader *textureLoader, bool createTexture = true);\n\n\t\t~Atlas();\n\n\t\tvoid flipV();\n\n\t\t/// Returns the first region found with the specified name. This method uses String comparison to find the region, so the result\n\t\t/// should be cached rather than calling this method multiple times.\n\t\t/// @return The region, or NULL.\n\t\tAtlasRegion *findRegion(const String &name);\n\n\t\tVector<AtlasPage *> &getPages();\n\n\t\tVector<AtlasRegion *> &getRegions();\n\n\tprivate:\n\t\tVector<AtlasPage *> _pages;\n\t\tVector<AtlasRegion *> _regions;\n\t\tTextureLoader *_textureLoader;\n\n\t\tvoid load(const char *begin, int length, const char *dir, bool createTexture);\n\t};\n}\n\n#endif /* Spine_Atlas_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/AtlasAttachmentLoader.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_AtlasAttachmentLoader_h\n#define Spine_AtlasAttachmentLoader_h\n\n#include <spine/AttachmentLoader.h>\n#include <spine/Vector.h>\n#include <spine/SpineString.h>\n\n\nnamespace spine {\n\tclass Atlas;\n\n\tclass AtlasRegion;\n\n\t/// An AttachmentLoader that configures attachments using texture regions from an Atlas.\n\t/// See http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data about Loading Skeleton Data in the Spine Runtimes Guide.\n\tclass SP_API AtlasAttachmentLoader : public AttachmentLoader {\n\tpublic:\n\tRTTI_DECL\n\n\t\texplicit AtlasAttachmentLoader(Atlas *atlas);\n\n\t\tvirtual RegionAttachment *newRegionAttachment(Skin &skin, const String &name, const String &path, Sequence *sequence);\n\n\t\tvirtual MeshAttachment *newMeshAttachment(Skin &skin, const String &name, const String &path, Sequence *sequence);\n\n\t\tvirtual BoundingBoxAttachment *newBoundingBoxAttachment(Skin &skin, const String &name);\n\n\t\tvirtual PathAttachment *newPathAttachment(Skin &skin, const String &name);\n\n\t\tvirtual PointAttachment *newPointAttachment(Skin &skin, const String &name);\n\n\t\tvirtual ClippingAttachment *newClippingAttachment(Skin &skin, const String &name);\n\n\t\tvirtual void configureAttachment(Attachment *attachment);\n\n\t\tAtlasRegion *findRegion(const String &name);\n\n\tprivate:\n\t\tAtlas *_atlas;\n\t};\n}\n\n#endif /* Spine_AtlasAttachmentLoader_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Attachment.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Attachment_h\n#define Spine_Attachment_h\n\n#include <spine/RTTI.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n\tclass SP_API Attachment : public SpineObject {\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit Attachment(const String &name);\n\n\t\tvirtual ~Attachment();\n\n\t\tconst String &getName() const;\n\n\t\tvirtual Attachment *copy() = 0;\n\n\t\tint getRefCount();\n\n\t\tvoid reference();\n\n\t\tvoid dereference();\n\n\tprivate:\n\t\tconst String _name;\n\t\tint _refCount;\n\t};\n}\n\n#endif /* Spine_Attachment_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/AttachmentLoader.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_AttachmentLoader_h\n#define Spine_AttachmentLoader_h\n\n#include <spine/RTTI.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n\tclass Skin;\n\n\tclass Attachment;\n\n\tclass RegionAttachment;\n\n\tclass MeshAttachment;\n\n\tclass BoundingBoxAttachment;\n\n\tclass PathAttachment;\n\n\tclass PointAttachment;\n\n\tclass ClippingAttachment;\n\n\tclass Sequence;\n\n\tclass SP_API AttachmentLoader : public SpineObject {\n\tpublic:\n\tRTTI_DECL\n\n\t\tAttachmentLoader();\n\n\t\tvirtual ~AttachmentLoader();\n\n\t\t/// @return May be NULL to not load any attachment.\n\t\tvirtual RegionAttachment *newRegionAttachment(Skin &skin, const String &name, const String &path, Sequence *sequence) = 0;\n\n\t\t/// @return May be NULL to not load any attachment.\n\t\tvirtual MeshAttachment *newMeshAttachment(Skin &skin, const String &name, const String &path, Sequence *sequence) = 0;\n\n\t\t/// @return May be NULL to not load any attachment.\n\t\tvirtual BoundingBoxAttachment *newBoundingBoxAttachment(Skin &skin, const String &name) = 0;\n\n\t\t/// @return May be NULL to not load any attachment\n\t\tvirtual PathAttachment *newPathAttachment(Skin &skin, const String &name) = 0;\n\n\t\tvirtual PointAttachment *newPointAttachment(Skin &skin, const String &name) = 0;\n\n\t\tvirtual ClippingAttachment *newClippingAttachment(Skin &skin, const String &name) = 0;\n\n\t\tvirtual void configureAttachment(Attachment *attachment) = 0;\n\t};\n}\n\n#endif /* Spine_AttachmentLoader_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/AttachmentTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_AttachmentTimeline_h\n#define Spine_AttachmentTimeline_h\n\n#include <spine/Timeline.h>\n#include <spine/SpineObject.h>\n#include <spine/Vector.h>\n#include <spine/MixBlend.h>\n#include <spine/MixDirection.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n\n\tclass Skeleton;\n\n\tclass Slot;\n\n\tclass Event;\n\n\tclass SP_API AttachmentTimeline : public Timeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit AttachmentTimeline(size_t frameCount, int slotIndex);\n\n\t\tvirtual ~AttachmentTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time and value of the specified keyframe.\n\t\tvoid setFrame(int frame, float time, const String &attachmentName);\n\n\t\tVector<String> &getAttachmentNames();\n\n\t\tint getSlotIndex() { return _slotIndex; }\n\n\t\tvoid setSlotIndex(int inValue) { _slotIndex = inValue; }\n\n\tprotected:\n\t\tint _slotIndex;\n\n\t\tVector<String> _attachmentNames;\n\n\t\tvoid setAttachment(Skeleton &skeleton, Slot &slot, String *attachmentName);\n\t};\n}\n\n#endif /* Spine_AttachmentTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/AttachmentType.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_AttachmentType_h\n#define Spine_AttachmentType_h\n\nnamespace spine {\n\tenum AttachmentType {\n\t\tAttachmentType_Region,\n\t\tAttachmentType_Boundingbox,\n\t\tAttachmentType_Mesh,\n\t\tAttachmentType_Linkedmesh,\n\t\tAttachmentType_Path,\n\t\tAttachmentType_Point,\n\t\tAttachmentType_Clipping\n\t};\n}\n\n#endif /* Spine_AttachmentType_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/BlendMode.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_BlendMode_h\n#define Spine_BlendMode_h\n\nnamespace spine {\n\tenum BlendMode {\n\t\tBlendMode_Normal = 0,\n\t\tBlendMode_Additive,\n\t\tBlendMode_Multiply,\n\t\tBlendMode_Screen\n\t};\n}\n\n#endif /* Spine_BlendMode_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/BlockAllocator.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n#ifndef Spine_BlockAllocator_h\n#define Spine_BlockAllocator_h\n\n#include <cstdint>\n#include <spine/SpineObject.h>\n#include <spine/Extension.h>\n#include <spine/MathUtil.h>\n#include <spine/Vector.h>\n\nnamespace spine {\n    struct Block {\n        int size;\n        int allocated;\n        uint8_t *memory;\n\n        int free() {\n            return size - allocated;\n        }\n\n        bool canFit(int numBytes) {\n            return free() >= numBytes;\n        }\n\n        uint8_t *allocate(int numBytes) {\n            uint8_t *ptr = memory + allocated;\n            allocated += numBytes;\n            return ptr;\n        }\n    };\n\n    class BlockAllocator : public SpineObject {\n        int initialBlockSize;\n        Vector <Block> blocks;\n\n    public:\n        BlockAllocator(int initialBlockSize) : initialBlockSize(initialBlockSize) {\n            blocks.add(newBlock(initialBlockSize));\n        }\n\n        ~BlockAllocator() {\n            for (int i = 0, n = (int) blocks.size(); i < n; i++) {\n                SpineExtension::free(blocks[i].memory, __FILE__, __LINE__);\n            }\n        }\n\n        template<typename T>\n        T *allocate(size_t num) {\n            return (T *) _allocate((int) (sizeof(T) * num));\n        }\n\n        void compress() {\n            if (blocks.size() == 1) return;\n            int totalSize = 0;\n            for (int i = 0, n = (int)blocks.size(); i < n; i++) {\n                totalSize += blocks[i].size;\n                SpineExtension::free(blocks[i].memory, __FILE__, __LINE__);\n            }\n            blocks.clear();\n            blocks.add(newBlock(totalSize));\n        }\n\n    private:\n        void *_allocate(int numBytes) {\n            // 16-byte align allocations\n            int alignedNumBytes = numBytes + (numBytes % 16 != 0 ? 16 - (numBytes % 16) : 0);\n            Block *block = &blocks[blocks.size() - 1];\n            if (!block->canFit(alignedNumBytes)) {\n                blocks.add(newBlock(MathUtil::max(initialBlockSize, alignedNumBytes)));\n                block = &blocks[blocks.size() - 1];\n            }\n            return block->allocate(alignedNumBytes);\n        }\n\n        Block newBlock(int numBytes) {\n            Block block = {MathUtil::max(initialBlockSize, numBytes), 0, nullptr};\n            block.memory = SpineExtension::alloc<uint8_t>(block.size, __FILE__, __LINE__);\n            return block;\n        }\n    };\n}\n\n#endif"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Bone.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Bone_h\n#define Spine_Bone_h\n\n#include <spine/Updatable.h>\n#include <spine/SpineObject.h>\n#include <spine/Vector.h>\n#include <spine/Inherit.h>\n\nnamespace spine {\n\tclass BoneData;\n\n\tclass Skeleton;\n\n/// Stores a bone's current pose.\n///\n/// A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a\n/// local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a\n/// constraint or application code modifies the world transform after it was computed from the local transform.\n\tclass SP_API Bone : public Updatable {\n\t\tfriend class AnimationState;\n\n\t\tfriend class RotateTimeline;\n\n\t\tfriend class IkConstraint;\n\n\t\tfriend class TransformConstraint;\n\n\t\tfriend class VertexAttachment;\n\n\t\tfriend class PathConstraint;\n\n        friend class PhysicsConstraint;\n\n\t\tfriend class Skeleton;\n\n\t\tfriend class RegionAttachment;\n\n\t\tfriend class PointAttachment;\n\n\t\tfriend class AttachmentTimeline;\n\n\t\tfriend class RGBATimeline;\n\n\t\tfriend class RGBTimeline;\n\n\t\tfriend class AlphaTimeline;\n\n\t\tfriend class RGBA2Timeline;\n\n\t\tfriend class RGB2Timeline;\n\n\t\tfriend class ScaleTimeline;\n\n\t\tfriend class ScaleXTimeline;\n\n\t\tfriend class ScaleYTimeline;\n\n\t\tfriend class ShearTimeline;\n\n\t\tfriend class ShearXTimeline;\n\n\t\tfriend class ShearYTimeline;\n\n\t\tfriend class TranslateTimeline;\n\n\t\tfriend class TranslateXTimeline;\n\n\t\tfriend class TranslateYTimeline;\n\n        friend class InheritTimeline;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\tstatic void setYDown(bool inValue);\n\n\t\tstatic bool isYDown();\n\n\t\t/// @param parent May be NULL.\n\t\tBone(BoneData &data, Skeleton &skeleton, Bone *parent = NULL);\n\n\t\t/// Same as updateWorldTransform. This method exists for Bone to implement Spine::Updatable.\n\t\tvirtual void update(Physics physics);\n\n\t\t/// Computes the world transform using the parent bone and this bone's local transform.\n\t\tvoid updateWorldTransform();\n\n\t\t/// Computes the world transform using the parent bone and the specified local transform.\n\t\tvoid\n\t\tupdateWorldTransform(float x, float y, float rotation, float scaleX, float scaleY, float shearX, float shearY);\n\n        /// Computes the individual applied transform values from the world transform. This can be useful to perform processing using\n\t\t/// the applied transform after the world transform has been modified directly (eg, by a constraint)..\n\t\t///\n\t\t/// Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation.\n\t\tvoid updateAppliedTransform();\n\n\t\tvoid setToSetupPose();\n\n\t\tvoid worldToLocal(float worldX, float worldY, float &outLocalX, float &outLocalY);\n\n        void worldToParent(float worldX, float worldY, float &outParentX, float &outParentY);\n\n\t\tvoid localToWorld(float localX, float localY, float &outWorldX, float &outWorldY);\n\n        void parentToWorld(float worldX, float worldY, float &outX, float &outY);\n\n\t\tfloat worldToLocalRotation(float worldRotation);\n\n\t\tfloat localToWorldRotation(float localRotation);\n\n\t\t/// Rotates the world transform the specified amount and sets isAppliedValid to false.\n\t\t/// @param degrees Degrees.\n\t\tvoid rotateWorld(float degrees);\n\n\t\tfloat getWorldToLocalRotationX();\n\n\t\tfloat getWorldToLocalRotationY();\n\n\t\tBoneData &getData();\n\n\t\tSkeleton &getSkeleton();\n\n\t\tBone *getParent();\n\n\t\tVector<Bone *> &getChildren();\n\n\t\t/// The local X translation.\n\t\tfloat getX();\n\n\t\tvoid setX(float inValue);\n\n\t\t/// The local Y translation.\n\t\tfloat getY();\n\n\t\tvoid setY(float inValue);\n\n\t\t/// The local rotation.\n\t\tfloat getRotation();\n\n\t\tvoid setRotation(float inValue);\n\n\t\t/// The local scaleX.\n\t\tfloat getScaleX();\n\n\t\tvoid setScaleX(float inValue);\n\n\t\t/// The local scaleY.\n\t\tfloat getScaleY();\n\n\t\tvoid setScaleY(float inValue);\n\n\t\t/// The local shearX.\n\t\tfloat getShearX();\n\n\t\tvoid setShearX(float inValue);\n\n\t\t/// The local shearY.\n\t\tfloat getShearY();\n\n\t\tvoid setShearY(float inValue);\n\n\t\t/// The rotation, as calculated by any constraints.\n\t\tfloat getAppliedRotation();\n\n\t\tvoid setAppliedRotation(float inValue);\n\n\t\t/// The applied local x translation.\n\t\tfloat getAX();\n\n\t\tvoid setAX(float inValue);\n\n\t\t/// The applied local y translation.\n\t\tfloat getAY();\n\n\t\tvoid setAY(float inValue);\n\n\t\t/// The applied local scaleX.\n\t\tfloat getAScaleX();\n\n\t\tvoid setAScaleX(float inValue);\n\n\t\t/// The applied local scaleY.\n\t\tfloat getAScaleY();\n\n\t\tvoid setAScaleY(float inValue);\n\n\t\t/// The applied local shearX.\n\t\tfloat getAShearX();\n\n\t\tvoid setAShearX(float inValue);\n\n\t\t/// The applied local shearY.\n\t\tfloat getAShearY();\n\n\t\tvoid setAShearY(float inValue);\n\n\t\tfloat getA();\n\n\t\tvoid setA(float inValue);\n\n\t\tfloat getB();\n\n\t\tvoid setB(float inValue);\n\n\t\tfloat getC();\n\n\t\tvoid setC(float inValue);\n\n\t\tfloat getD();\n\n\t\tvoid setD(float inValue);\n\n\t\tfloat getWorldX();\n\n\t\tvoid setWorldX(float inValue);\n\n\t\tfloat getWorldY();\n\n\t\tvoid setWorldY(float inValue);\n\n\t\tfloat getWorldRotationX();\n\n\t\tfloat getWorldRotationY();\n\n\t\t/// Returns the magnitide (always positive) of the world scale X.\n\t\tfloat getWorldScaleX();\n\n\t\t/// Returns the magnitide (always positive) of the world scale Y.\n\t\tfloat getWorldScaleY();\n\n\t\tbool isActive();\n\n\t\tvoid setActive(bool inValue);\n\n        Inherit getInherit() { return _inherit; }\n\n        void setInherit(Inherit inValue) { _inherit = inValue; }\n\n\tprivate:\n\t\tstatic bool yDown;\n\n\t\tBoneData &_data;\n\t\tSkeleton &_skeleton;\n\t\tBone *_parent;\n\t\tVector<Bone *> _children;\n\t\tfloat _x, _y, _rotation, _scaleX, _scaleY, _shearX, _shearY;\n\t\tfloat _ax, _ay, _arotation, _ascaleX, _ascaleY, _ashearX, _ashearY;\n\t\tfloat _a, _b, _worldX;\n\t\tfloat _c, _d, _worldY;\n\t\tbool _sorted;\n\t\tbool _active;\n        Inherit _inherit;\n\t};\n}\n\n#endif /* Spine_Bone_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/BoneData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_BoneData_h\n#define Spine_BoneData_h\n\n#include <spine/Inherit.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/Color.h>\n\nnamespace spine {\n\tclass SP_API BoneData : public SpineObject {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class AnimationState;\n\n\t\tfriend class RotateTimeline;\n\n\t\tfriend class ScaleTimeline;\n\n\t\tfriend class ScaleXTimeline;\n\n\t\tfriend class ScaleYTimeline;\n\n\t\tfriend class ShearTimeline;\n\n\t\tfriend class ShearXTimeline;\n\n\t\tfriend class ShearYTimeline;\n\n\t\tfriend class TranslateTimeline;\n\n\t\tfriend class TranslateXTimeline;\n\n\t\tfriend class TranslateYTimeline;\n\n\tpublic:\n\t\tBoneData(int index, const String &name, BoneData *parent = NULL);\n\n\t\t/// The index of the bone in Skeleton.Bones\n\t\tint getIndex();\n\n\t\t/// The name of the bone, which is unique within the skeleton.\n\t\tconst String &getName();\n\n\t\t/// May be NULL.\n\t\tBoneData *getParent();\n\n\t\tfloat getLength();\n\n\t\tvoid setLength(float inValue);\n\n\t\t/// Local X translation.\n\t\tfloat getX();\n\n\t\tvoid setX(float inValue);\n\n\t\t/// Local Y translation.\n\t\tfloat getY();\n\n\t\tvoid setY(float inValue);\n\n\t\t/// Local rotation.\n\t\tfloat getRotation();\n\n\t\tvoid setRotation(float inValue);\n\n\t\t/// Local scaleX.\n\t\tfloat getScaleX();\n\n\t\tvoid setScaleX(float inValue);\n\n\t\t/// Local scaleY.\n\t\tfloat getScaleY();\n\n\t\tvoid setScaleY(float inValue);\n\n\t\t/// Local shearX.\n\t\tfloat getShearX();\n\n\t\tvoid setShearX(float inValue);\n\n\t\t/// Local shearY.\n\t\tfloat getShearY();\n\n\t\tvoid setShearY(float inValue);\n\n\t\t/// The transform mode for how parent world transforms affect this bone.\n\t\tInherit getInherit();\n\n\t\tvoid setInherit(Inherit inValue);\n\n\t\tbool isSkinRequired();\n\n\t\tvoid setSkinRequired(bool inValue);\n\n\t\tColor &getColor();\n\n        const String &getIcon();\n\n        void setIcon(const String &icon);\n\n        bool isVisible();\n\n        void setVisible(bool inValue);\n\n\tprivate:\n\t\tconst int _index;\n\t\tconst String _name;\n\t\tBoneData *_parent;\n\t\tfloat _length;\n\t\tfloat _x, _y, _rotation, _scaleX, _scaleY, _shearX, _shearY;\n\t\tInherit _inherit;\n\t\tbool _skinRequired;\n\t\tColor _color;\n        String _icon;\n        bool _visible;\n\t};\n}\n\n#endif /* Spine_BoneData_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/BoundingBoxAttachment.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_BoundingBoxAttachment_h\n#define Spine_BoundingBoxAttachment_h\n\n#include <spine/VertexAttachment.h>\n#include <spine/Color.h>\n#include <spine/SpineObject.h>\n\nnamespace spine {\n\t/// Attachment that has a polygon for bounds checking.\n\tclass SP_API BoundingBoxAttachment : public VertexAttachment {\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit BoundingBoxAttachment(const String &name);\n\n\t\tColor &getColor();\n\n\t\tvirtual Attachment *copy();\n\n\tprivate:\n\t\tColor _color;\n\t};\n}\n\n#endif /* Spine_BoundingBoxAttachment_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/ClippingAttachment.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_ClippingAttachment_h\n#define Spine_ClippingAttachment_h\n\n#include <spine/VertexAttachment.h>\n#include <spine/Color.h>\n\nnamespace spine {\n\tclass SlotData;\n\n\tclass SP_API ClippingAttachment : public VertexAttachment {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class SkeletonClipping;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit ClippingAttachment(const String &name);\n\n\t\tSlotData *getEndSlot();\n\n\t\tvoid setEndSlot(SlotData *inValue);\n\n\t\tColor &getColor();\n\n\t\tvirtual Attachment *copy();\n\n\tprivate:\n\t\tSlotData *_endSlot;\n\t\tColor _color;\n\t};\n}\n\n#endif /* Spine_ClippingAttachment_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Color.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef SPINE_COLOR_H\n#define SPINE_COLOR_H\n\n#include <spine/MathUtil.h>\n\nnamespace spine {\n\tclass SP_API Color : public SpineObject {\n\tpublic:\n\t\tColor() : r(0), g(0), b(0), a(0) {\n\t\t}\n\n\t\tColor(float r, float g, float b, float a) : r(r), g(g), b(b), a(a) {\n\t\t\tclamp();\n\t\t}\n\n\t\tinline Color &set(float _r, float _g, float _b, float _a) {\n\t\t\tthis->r = _r;\n\t\t\tthis->g = _g;\n\t\t\tthis->b = _b;\n\t\t\tthis->a = _a;\n\t\t\tclamp();\n\t\t\treturn *this;\n\t\t}\n\n\t\tinline Color &set(float _r, float _g, float _b) {\n\t\t\tthis->r = _r;\n\t\t\tthis->g = _g;\n\t\t\tthis->b = _b;\n\t\t\tclamp();\n\t\t\treturn *this;\n\t\t}\n\n\t\tinline Color &set(const Color &other) {\n\t\t\tr = other.r;\n\t\t\tg = other.g;\n\t\t\tb = other.b;\n\t\t\ta = other.a;\n\t\t\tclamp();\n\t\t\treturn *this;\n\t\t}\n\n\t\tinline Color &add(float _r, float _g, float _b, float _a) {\n\t\t\tthis->r += _r;\n\t\t\tthis->g += _g;\n\t\t\tthis->b += _b;\n\t\t\tthis->a += _a;\n\t\t\tclamp();\n\t\t\treturn *this;\n\t\t}\n\n\t\tinline Color &add(float _r, float _g, float _b) {\n\t\t\tthis->r += _r;\n\t\t\tthis->g += _g;\n\t\t\tthis->b += _b;\n\t\t\tclamp();\n\t\t\treturn *this;\n\t\t}\n\n\t\tinline Color &add(const Color &other) {\n\t\t\tr += other.r;\n\t\t\tg += other.g;\n\t\t\tb += other.b;\n\t\t\ta += other.a;\n\t\t\tclamp();\n\t\t\treturn *this;\n\t\t}\n\n\t\tinline Color &clamp() {\n\t\t\tr = MathUtil::clamp(this->r, 0, 1);\n\t\t\tg = MathUtil::clamp(this->g, 0, 1);\n\t\t\tb = MathUtil::clamp(this->b, 0, 1);\n\t\t\ta = MathUtil::clamp(this->a, 0, 1);\n\t\t\treturn *this;\n\t\t}\n\n\t\tfloat r, g, b, a;\n\t};\n}\n\n\n#endif //SPINE_COLOR_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/ColorTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_ColorTimeline_h\n#define Spine_ColorTimeline_h\n\n#include <spine/CurveTimeline.h>\n\nnamespace spine {\n\tclass SP_API RGBATimeline : public CurveTimeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit RGBATimeline(size_t frameCount, size_t bezierCount, int slotIndex);\n\n\t\tvirtual ~RGBATimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time and value of the specified keyframe.\n\t\tvoid setFrame(int frame, float time, float r, float g, float b, float a);\n\n\t\tint getSlotIndex() { return _slotIndex; };\n\n\t\tvoid setSlotIndex(int inValue) { _slotIndex = inValue; }\n\n\tprotected:\n\t\tint _slotIndex;\n\n\t\tstatic const int ENTRIES = 5;\n\t\tstatic const int R = 1;\n\t\tstatic const int G = 2;\n\t\tstatic const int B = 3;\n\t\tstatic const int A = 4;\n\t};\n\n\tclass SP_API RGBTimeline : public CurveTimeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit RGBTimeline(size_t frameCount, size_t bezierCount, int slotIndex);\n\n\t\tvirtual ~RGBTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time and value of the specified keyframe.\n\t\tvoid setFrame(int frame, float time, float r, float g, float b);\n\n\t\tint getSlotIndex() { return _slotIndex; };\n\n\t\tvoid setSlotIndex(int inValue) { _slotIndex = inValue; }\n\n\tprotected:\n\t\tint _slotIndex;\n\n\t\tstatic const int ENTRIES = 4;\n\t\tstatic const int R = 1;\n\t\tstatic const int G = 2;\n\t\tstatic const int B = 3;\n\t};\n\n\tclass SP_API AlphaTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit AlphaTimeline(size_t frameCount, size_t bezierCount, int slotIndex);\n\n\t\tvirtual ~AlphaTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getSlotIndex() { return _slotIndex; };\n\n\t\tvoid setSlotIndex(int inValue) { _slotIndex = inValue; }\n\n\tprotected:\n\t\tint _slotIndex;\n\t};\n\n\tclass SP_API RGBA2Timeline : public CurveTimeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit RGBA2Timeline(size_t frameCount, size_t bezierCount, int slotIndex);\n\n\t\tvirtual ~RGBA2Timeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time and value of the specified keyframe.\n\t\tvoid setFrame(int frame, float time, float r, float g, float b, float a, float r2, float g2, float b2);\n\n\t\tint getSlotIndex() { return _slotIndex; };\n\n\t\tvoid setSlotIndex(int inValue) { _slotIndex = inValue; }\n\n\tprotected:\n\t\tint _slotIndex;\n\n\t\tstatic const int ENTRIES = 8;\n\t\tstatic const int R = 1;\n\t\tstatic const int G = 2;\n\t\tstatic const int B = 3;\n\t\tstatic const int A = 4;\n\t\tstatic const int R2 = 5;\n\t\tstatic const int G2 = 6;\n\t\tstatic const int B2 = 7;\n\t};\n\n\tclass SP_API RGB2Timeline : public CurveTimeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit RGB2Timeline(size_t frameCount, size_t bezierCount, int slotIndex);\n\n\t\tvirtual ~RGB2Timeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time and value of the specified keyframe.\n\t\tvoid setFrame(int frame, float time, float r, float g, float b, float r2, float g2, float b2);\n\n\t\tint getSlotIndex() { return _slotIndex; };\n\n\t\tvoid setSlotIndex(int inValue) { _slotIndex = inValue; }\n\n\tprotected:\n\t\tint _slotIndex;\n\n\t\tstatic const int ENTRIES = 7;\n\t\tstatic const int R = 1;\n\t\tstatic const int G = 2;\n\t\tstatic const int B = 3;\n\t\tstatic const int R2 = 4;\n\t\tstatic const int G2 = 5;\n\t\tstatic const int B2 = 6;\n\t};\n}\n\n#endif /* Spine_ColorTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/ConstraintData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Constraint_h\n#define Spine_Constraint_h\n\n#include <spine/Updatable.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n\t/// The interface for all constraints.\n\tclass SP_API ConstraintData : public SpineObject {\n\n        friend class SkeletonBinary;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\tConstraintData(const String &name);\n\n\t\tvirtual ~ConstraintData();\n\n\t\t/// The IK constraint's name, which is unique within the skeleton.\n\t\tconst String &getName();\n\n\t\t/// The ordinal for the order a skeleton's constraints will be applied.\n\t\tsize_t getOrder();\n\n\t\tvoid setOrder(size_t inValue);\n\n\t\t/// Whether the constraint is only active for a specific skin.\n\t\tbool isSkinRequired();\n\n\t\tvoid setSkinRequired(bool inValue);\n\n\tprivate:\n\t\tconst String _name;\n\t\tsize_t _order;\n\t\tbool _skinRequired;\n\t};\n}\n\n#endif /* Spine_Constraint_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/ContainerUtil.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_ContainerUtil_h\n#define Spine_ContainerUtil_h\n\n#include <spine/Extension.h>\n#include <spine/Vector.h>\n#include <spine/HashMap.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n\n#include <assert.h>\n\nnamespace spine {\n\tclass SP_API ContainerUtil : public SpineObject {\n\tpublic:\n\t\t/// Finds an item by comparing each item's name.\n\t\t/// It is more efficient to cache the results of this method than to call it multiple times.\n\t\t/// @return May be NULL.\n\t\ttemplate<typename T>\n\t\tstatic T *findWithName(Vector<T *> &items, const String &name) {\n\t\t\tassert(name.length() > 0);\n\n\t\t\tfor (size_t i = 0; i < items.size(); ++i) {\n\t\t\t\tT *item = items[i];\n\t\t\t\tif (item->getName() == name) {\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn NULL;\n\t\t}\n\n\t\t/// @return -1 if the item was not found.\n\t\ttemplate<typename T>\n\t\tstatic int findIndexWithName(Vector<T *> &items, const String &name) {\n\t\t\tassert(name.length() > 0);\n\n\t\t\tfor (size_t i = 0, len = items.size(); i < len; ++i) {\n\t\t\t\tT *item = items[i];\n\t\t\t\tif (item->getName() == name) {\n\t\t\t\t\treturn static_cast<int>(i);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn -1;\n\t\t}\n\n\t\t/// Finds an item by comparing each item's name.\n\t\t/// It is more efficient to cache the results of this method than to call it multiple times.\n\t\t/// @return May be NULL.\n\t\ttemplate<typename T>\n\t\tstatic T *findWithDataName(Vector<T *> &items, const String &name) {\n\t\t\tassert(name.length() > 0);\n\n\t\t\tfor (size_t i = 0; i < items.size(); ++i) {\n\t\t\t\tT *item = items[i];\n\t\t\t\tif (item->getData().getName() == name) {\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn NULL;\n\t\t}\n\n\t\t/// @return -1 if the item was not found.\n\t\ttemplate<typename T>\n\t\tstatic int findIndexWithDataName(Vector<T *> &items, const String &name) {\n\t\t\tassert(name.length() > 0);\n\n\t\t\tfor (size_t i = 0, len = items.size(); i < len; ++i) {\n\t\t\t\tT *item = items[i];\n\t\t\t\tif (item->getData().getName() == name) {\n\t\t\t\t\treturn static_cast<int>(i);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn -1;\n\t\t}\n\n\t\ttemplate<typename T>\n\t\tstatic void cleanUpVectorOfPointers(Vector<T *> &items) {\n\t\t\tfor (int i = (int) items.size() - 1; i >= 0; i--) {\n\t\t\t\tT *item = items[i];\n\n\t\t\t\tdelete item;\n\n\t\t\t\titems.removeAt(i);\n\t\t\t}\n\t\t}\n\n\tprivate:\n\t\t// ctor, copy ctor, and assignment should be private in a Singleton\n\t\tContainerUtil();\n\n\t\tContainerUtil(const ContainerUtil &);\n\n\t\tContainerUtil &operator=(const ContainerUtil &);\n\t};\n}\n\n#endif /* Spine_ContainerUtil_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/CurveTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_CurveTimeline_h\n#define Spine_CurveTimeline_h\n\n#include <spine/Timeline.h>\n#include <spine/Vector.h>\n\nnamespace spine {\n\t/// Base class for frames that use an interpolation bezier curve.\n\tclass SP_API CurveTimeline : public Timeline {\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit CurveTimeline(size_t frameCount, size_t frameEntries, size_t bezierCount);\n\n\t\tvirtual ~CurveTimeline();\n\n\t\tvoid setLinear(size_t frame);\n\n\t\tvoid setStepped(size_t frame);\n\n\t\tvirtual void\n\t\tsetBezier(size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2,\n\t\t\t\t  float cy2, float time2, float value2);\n\n\t\tfloat getBezierValue(float time, size_t frame, size_t valueOffset, size_t i);\n\n\t\tVector<float> &getCurves();\n\n\tprotected:\n\t\tstatic const int LINEAR = 0;\n\t\tstatic const int STEPPED = 1;\n\t\tstatic const int BEZIER = 2;\n\t\tstatic const int BEZIER_SIZE = 18;\n\n\t\tVector<float> _curves; // type, x, y, ...\n\t};\n\n\tclass SP_API CurveTimeline1 : public CurveTimeline {\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit CurveTimeline1(size_t frameCount, size_t bezierCount);\n\n\t\tvirtual ~CurveTimeline1();\n\n\t\tvoid setFrame(size_t frame, float time, float value);\n\n\t\tfloat getCurveValue(float time);\n\n        float getRelativeValue(float time, float alpha, MixBlend blend, float current, float setup);\n\n        float getAbsoluteValue(float time, float alpha, MixBlend blend, float current, float setup);\n\n        float getAbsoluteValue (float time, float alpha, MixBlend blend, float current, float setup, float value);\n\n        float getScaleValue (float time, float alpha, MixBlend blend, MixDirection direction, float current, float setup);\n\n\tprotected:\n\t\tstatic const int ENTRIES = 2;\n\t\tstatic const int VALUE = 1;\n\t};\n\n\tclass SP_API CurveTimeline2 : public CurveTimeline {\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit CurveTimeline2(size_t frameCount, size_t bezierCount);\n\n\t\tvirtual ~CurveTimeline2();\n\n\t\tvoid setFrame(size_t frame, float time, float value1, float value2);\n\n\t\tfloat getCurveValue(float time);\n\n\tprotected:\n\t\tstatic const int ENTRIES = 3;\n\t\tstatic const int VALUE1 = 1;\n\t\tstatic const int VALUE2 = 2;\n\t};\n}\n\n#endif /* Spine_CurveTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Debug.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef SPINE_LOG_H\n#define SPINE_LOG_H\n\n#include <spine/Extension.h>\n#include <spine/Vector.h>\n\n#include <map>\n\nnamespace spine {\n\n\tclass SP_API DebugExtension : public SpineExtension {\n\t\tstruct Allocation {\n\t\t\tvoid *address;\n\t\t\tsize_t size;\n\t\t\tconst char *fileName;\n\t\t\tint line;\n\n\t\t\tAllocation() : address(NULL), size(0), fileName(NULL), line(0) {\n\t\t\t}\n\n\t\t\tAllocation(void *a, size_t s, const char *f, int l) : address(a), size(s), fileName(f), line(l) {\n\t\t\t}\n\t\t};\n\n\tpublic:\n\t\tDebugExtension(SpineExtension *extension) : _extension(extension), _allocations(0), _reallocations(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t_frees(0) {\n\t\t}\n\n\t\tvoid reportLeaks() {\n\t\t\tfor (std::map<void *, Allocation>::iterator it = _allocated.begin(); it != _allocated.end(); it++) {\n\t\t\t\tprintf(\"\\\"%s:%i (%zu bytes at %p)\\n\", it->second.fileName, it->second.line, it->second.size,\n\t\t\t\t\t   it->second.address);\n\t\t\t}\n\t\t\tprintf(\"allocations: %zu, reallocations: %zu, frees: %zu\\n\", _allocations, _reallocations, _frees);\n\t\t\tif (_allocated.empty()) printf(\"No leaks detected\\n\");\n\t\t}\n\n\t\tvoid clearAllocations() {\n\t\t\t_allocated.clear();\n\t\t\t_usedMemory = 0;\n\t\t}\n\n\t\tvirtual void *_alloc(size_t size, const char *file, int line) {\n\t\t\tvoid *result = _extension->_alloc(size, file, line);\n\t\t\t_allocated[result] = Allocation(result, size, file, line);\n\t\t\t_allocations++;\n\t\t\t_usedMemory += size;\n\t\t\treturn result;\n\t\t}\n\n\t\tvirtual void *_calloc(size_t size, const char *file, int line) {\n\t\t\tvoid *result = _extension->_calloc(size, file, line);\n\t\t\t_allocated[result] = Allocation(result, size, file, line);\n\t\t\t_allocations++;\n\t\t\t_usedMemory += size;\n\t\t\treturn result;\n\t\t}\n\n\t\tvirtual void *_realloc(void *ptr, size_t size, const char *file, int line) {\n\t\t\tif (_allocated.count(ptr)) _usedMemory -= _allocated[ptr].size;\n\t\t\t_allocated.erase(ptr);\n\t\t\tvoid *result = _extension->_realloc(ptr, size, file, line);\n\t\t\t_reallocations++;\n\t\t\t_allocated[result] = Allocation(result, size, file, line);\n\t\t\t_usedMemory += size;\n\t\t\treturn result;\n\t\t}\n\n\t\tvirtual void _free(void *mem, const char *file, int line) {\n\t\t\tif (_allocated.count(mem)) {\n\t\t\t\t_extension->_free(mem, file, line);\n\t\t\t\t_frees++;\n\t\t\t\t_usedMemory -= _allocated[mem].size;\n\t\t\t\t_allocated.erase(mem);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tprintf(\"%s:%i (address %p): Double free or not allocated through SpineExtension\\n\", file, line, mem);\n\t\t\t_extension->_free(mem, file, line);\n\t\t}\n\n\t\tvirtual char *_readFile(const String &path, int *length) {\n            auto data = _extension->_readFile(path, length);\n\n            if (_allocated.count(data) == 0) {\n                _allocated[data] = Allocation(data, sizeof(char) * (*length), nullptr, 0);\n                _allocations++;\n                _usedMemory += sizeof(char) * (*length);\n            }\n\n            return data;\n\t\t}\n\n\t\tsize_t getUsedMemory() {\n\t\t\treturn _usedMemory;\n\t\t}\n\n\tprivate:\n\t\tSpineExtension *_extension;\n\t\tstd::map<void *, Allocation> _allocated;\n\t\tsize_t _allocations;\n\t\tsize_t _reallocations;\n\t\tsize_t _frees;\n\t\tsize_t _usedMemory;\n\t};\n}\n\n\n#endif //SPINE_LOG_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/DeformTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_DeformTimeline_h\n#define Spine_DeformTimeline_h\n\n#include <spine/CurveTimeline.h>\n\nnamespace spine {\n\tclass VertexAttachment;\n\n\tclass SP_API DeformTimeline : public CurveTimeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit DeformTimeline(size_t frameCount, size_t bezierCount, int slotIndex, VertexAttachment *attachment);\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time and value of the specified keyframe.\n\t\tvoid setFrame(int frameIndex, float time, Vector<float> &vertices);\n\n\t\tVector <Vector<float>> &getVertices();\n\n\t\tVertexAttachment *getAttachment();\n\n\t\tvoid setAttachment(VertexAttachment *inValue);\n\n\t\tvirtual void\n\t\tsetBezier(size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2,\n\t\t\t\t  float cy2, float time2, float value2);\n\n\t\tfloat getCurvePercent(float time, int frame);\n\n\t\tint getSlotIndex() { return _slotIndex; }\n\n\t\tvoid setSlotIndex(int inValue) { _slotIndex = inValue; }\n\n\tprotected:\n\t\tint _slotIndex;\n\n\t\tVector <Vector<float>> _vertices;\n\n\t\tVertexAttachment *_attachment;\n\t};\n}\n\n#endif /* Spine_DeformTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/DrawOrderTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_DrawOrderTimeline_h\n#define Spine_DrawOrderTimeline_h\n\n#include <spine/Timeline.h>\n\nnamespace spine {\n\tclass SP_API DrawOrderTimeline : public Timeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit DrawOrderTimeline(size_t frameCount);\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time and value of the specified keyframe.\n\t\t/// @param drawOrder May be NULL to use bind pose draw order\n\t\tvoid setFrame(size_t frame, float time, Vector<int> &drawOrder);\n\n\t\tVector <Vector<int>> &getDrawOrders();\n\n\tprivate:\n\t\tVector <Vector<int>> _drawOrders;\n\t};\n}\n\n#endif /* Spine_DrawOrderTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Event.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Event_h\n#define Spine_Event_h\n\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n\tclass EventData;\n\n/// Stores the current pose values for an Event.\n\tclass SP_API Event : public SpineObject {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class AnimationState;\n\n\tpublic:\n\t\tEvent(float time, const EventData &data);\n\n\t\tconst EventData &getData();\n\n\t\t/// The animation time this event was keyed.\n\t\tfloat getTime();\n\n\t\tint getIntValue();\n\n\t\tvoid setIntValue(int inValue);\n\n\t\tfloat getFloatValue();\n\n\t\tvoid setFloatValue(float inValue);\n\n\t\tconst String &getStringValue();\n\n\t\tvoid setStringValue(const String &inValue);\n\n\t\tfloat getVolume();\n\n\t\tvoid setVolume(float inValue);\n\n\t\tfloat getBalance();\n\n\t\tvoid setBalance(float inValue);\n\n\tprivate:\n\t\tconst EventData &_data;\n\t\tconst float _time;\n\t\tint _intValue;\n\t\tfloat _floatValue;\n\t\tString _stringValue;\n\t\tfloat _volume;\n\t\tfloat _balance;\n\t};\n}\n\n#endif /* Spine_Event_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/EventData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_EventData_h\n#define Spine_EventData_h\n\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n/// Stores the setup pose values for an Event.\n\tclass SP_API EventData : public SpineObject {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class Event;\n\n\tpublic:\n\t\texplicit EventData(const String &name);\n\n\t\t/// The name of the event, which is unique within the skeleton.\n\t\tconst String &getName() const;\n\n\t\tint getIntValue() const;\n\n\t\tvoid setIntValue(int inValue);\n\n\t\tfloat getFloatValue() const;\n\n\t\tvoid setFloatValue(float inValue);\n\n\t\tconst String &getStringValue() const;\n\n\t\tvoid setStringValue(const String &inValue);\n\n\t\tconst String &getAudioPath() const;\n\n\t\tvoid setAudioPath(const String &inValue);\n\n\t\tfloat getVolume() const;\n\n\t\tvoid setVolume(float inValue);\n\n\t\tfloat getBalance() const;\n\n\t\tvoid setBalance(float inValue);\n\n\tprivate:\n\t\tconst String _name;\n\t\tint _intValue;\n\t\tfloat _floatValue;\n\t\tString _stringValue;\n\t\tString _audioPath;\n\t\tfloat _volume;\n\t\tfloat _balance;\n\t};\n}\n\n#endif /* Spine_EventData_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/EventTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_EventTimeline_h\n#define Spine_EventTimeline_h\n\n#include <spine/Timeline.h>\n\nnamespace spine {\n\tclass SP_API EventTimeline : public Timeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit EventTimeline(size_t frameCount);\n\n\t\t~EventTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time and value of the specified keyframe.\n\t\tvoid setFrame(size_t frame, Event *event);\n\n\t\tVector<Event *> &getEvents();\n\n\tprivate:\n\t\tVector<Event *> _events;\n\t};\n}\n\n#endif /* Spine_EventTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Extension.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Extension_h\n#define Spine_Extension_h\n\n\n#include <stdlib.h>\n#include <spine/dll.h>\n\n#define SP_UNUSED(x) (void)(x)\n\nnamespace spine {\n\tclass String;\n\n\tclass SP_API SpineExtension {\n\tpublic:\n\t\ttemplate<typename T>\n\t\tstatic T *alloc(size_t num, const char *file, int line) {\n\t\t\treturn (T *) getInstance()->_alloc(sizeof(T) * num, file, line);\n\t\t}\n\n\t\ttemplate<typename T>\n\t\tstatic T *calloc(size_t num, const char *file, int line) {\n\t\t\treturn (T *) getInstance()->_calloc(sizeof(T) * num, file, line);\n\t\t}\n\n\t\ttemplate<typename T>\n\t\tstatic T *realloc(T *ptr, size_t num, const char *file, int line) {\n\t\t\treturn (T *) getInstance()->_realloc(ptr, sizeof(T) * num, file, line);\n\t\t}\n\n\t\ttemplate<typename T>\n\t\tstatic void free(T *ptr, const char *file, int line) {\n\t\t\tgetInstance()->_free((void *) ptr, file, line);\n\t\t}\n\n\t\ttemplate<typename T>\n\t\tstatic void beforeFree(T *ptr) {\n\t\t\tgetInstance()->_beforeFree((void *) ptr);\n\t\t}\n\n\t\tstatic char *readFile(const String &path, int *length) {\n\t\t\treturn getInstance()->_readFile(path, length);\n\t\t}\n\n\t\tstatic void setInstance(SpineExtension *inSpineExtension);\n\n\t\tstatic SpineExtension *getInstance();\n\n\t\tvirtual ~SpineExtension();\n\n\t\t/// Implement this function to use your own memory allocator\n\t\tvirtual void *_alloc(size_t size, const char *file, int line) = 0;\n\n\t\tvirtual void *_calloc(size_t size, const char *file, int line) = 0;\n\n\t\tvirtual void *_realloc(void *ptr, size_t size, const char *file, int line) = 0;\n\n\t\t/// If you provide a spineAllocFunc, you should also provide a spineFreeFunc\n\t\tvirtual void _free(void *mem, const char *file, int line) = 0;\n\n\t\tvirtual char *_readFile(const String &path, int *length) = 0;\n\n\t\tvirtual void _beforeFree(void *ptr) { SP_UNUSED(ptr); }\n\n\tprotected:\n\t\tSpineExtension();\n\n\tprivate:\n\t\tstatic SpineExtension *_instance;\n\t};\n\n\tclass SP_API DefaultSpineExtension : public SpineExtension {\n\tpublic:\n\t\tDefaultSpineExtension();\n\n\t\tvirtual ~DefaultSpineExtension();\n\n\tprotected:\n\t\tvirtual void *_alloc(size_t size, const char *file, int line) override;\n\n\t\tvirtual void *_calloc(size_t size, const char *file, int line) override;\n\n\t\tvirtual void *_realloc(void *ptr, size_t size, const char *file, int line) override;\n\n\t\tvirtual void _free(void *mem, const char *file, int line) override;\n\n\t\tvirtual char *_readFile(const String &path, int *length) override;\n\t};\n\n// This function is to be implemented by engine specific runtimes to provide\n// the default extension for that engine. It is called the first time\n// SpineExtension::getInstance() is called, when no instance has been set\n// yet.\n\textern SpineExtension *getDefaultExtension();\n}\n\n#endif /* Spine_Extension_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/HasRendererObject.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_HasRendererObject_h\n#define Spine_HasRendererObject_h\n\n#include <spine/dll.h>\n\nnamespace spine {\n\n\ttypedef void (*DisposeRendererObject)(void *rendererObject);\n\n\tclass SP_API HasRendererObject {\n\tpublic:\n\t\texplicit HasRendererObject() : _rendererObject(0), _dispose(0) {};\n\n\t\tvirtual ~HasRendererObject() {\n\t\t\tif (_dispose && _rendererObject)\n\t\t\t\t_dispose(_rendererObject);\n\t\t}\n\n\t\tvoid *getRendererObject() { return _rendererObject; }\n\n\t\tvoid setRendererObject(void *rendererObject, DisposeRendererObject dispose = 0) {\n\t\t\tif (_dispose && _rendererObject && _rendererObject != rendererObject)\n\t\t\t\t_dispose(_rendererObject);\n\n\t\t\t_rendererObject = rendererObject;\n\t\t\t_dispose = dispose;\n\t\t}\n\n\tprivate:\n\t\tvoid *_rendererObject;\n\t\tDisposeRendererObject _dispose;\n\t};\n\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/HashMap.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_HashMap_h\n#define Spine_HashMap_h\n\n#include <spine/Vector.h>\n#include <spine/SpineObject.h>\n\n// Required for new with line number and file name in MSVC\n#ifdef _MSC_VER\n#pragma warning(disable:4291)\n\n#pragma warning(disable:4251)\n\n#endif\n\nnamespace spine {\n\ttemplate<typename K, typename V>\n\tclass SP_API HashMap : public SpineObject {\n\tprivate:\n\t\tclass Entry;\n\n\tpublic:\n\t\tclass SP_API Pair {\n\t\tpublic:\n\t\t\texplicit Pair(K &k, V &v) : key(k), value(v) {}\n\n\t\t\tK &key;\n\t\t\tV &value;\n\t\t};\n\n\t\tclass SP_API Entries {\n\t\tpublic:\n\t\t\tfriend class HashMap;\n\n\t\t\texplicit Entries(Entry *entry) : _entry(NULL), _hasChecked(false) {\n\t\t\t\t_start.next = entry;\n\t\t\t\t_entry = &_start;\n\t\t\t}\n\n\t\t\tPair next() {\n\t\t\t\tassert(_entry);\n\t\t\t\tassert(_hasChecked);\n\t\t\t\t_entry = _entry->next;\n\t\t\t\tPair pair(_entry->_key, _entry->_value);\n\t\t\t\t_hasChecked = false;\n\t\t\t\treturn pair;\n\t\t\t}\n\n\t\t\tbool hasNext() {\n\t\t\t\t_hasChecked = true;\n\t\t\t\treturn _entry->next;\n\t\t\t}\n\n\t\tprivate:\n\t\t\tbool _hasChecked;\n\t\t\tEntry _start;\n\t\t\tEntry *_entry;\n\t\t};\n\n\t\tHashMap() :\n\t\t\t\t_head(NULL),\n\t\t\t\t_size(0) {\n\t\t}\n\n\t\t~HashMap() {\n\t\t\tclear();\n\t\t}\n\n\t\tvoid clear() {\n\t\t\tfor (Entry *entry = _head; entry != NULL;) {\n\t\t\t\tEntry *next = entry->next;\n\t\t\t\tdelete entry;\n\t\t\t\tentry = next;\n\t\t\t}\n\t\t\t_head = NULL;\n\t\t\t_size = 0;\n\t\t}\n\n\t\tsize_t size() {\n\t\t\treturn _size;\n\t\t}\n\n\t\tvoid put(const K &key, const V &value) {\n\t\t\tEntry *entry = find(key);\n\t\t\tif (entry) {\n\t\t\t\tentry->_key = key;\n\t\t\t\tentry->_value = value;\n\t\t\t} else {\n\t\t\t\tentry = new(__FILE__, __LINE__) Entry();\n\t\t\t\tentry->_key = key;\n\t\t\t\tentry->_value = value;\n\n\t\t\t\tEntry *oldHead = _head;\n\n\t\t\t\tif (oldHead) {\n\t\t\t\t\t_head = entry;\n\t\t\t\t\toldHead->prev = entry;\n\t\t\t\t\tentry->next = oldHead;\n\t\t\t\t} else {\n\t\t\t\t\t_head = entry;\n\t\t\t\t}\n\t\t\t\t_size++;\n\t\t\t}\n\t\t}\n\n\t\tbool addAll(Vector <K> &keys, const V &value) {\n\t\t\tsize_t oldSize = _size;\n\t\t\tfor (size_t i = 0; i < keys.size(); i++) {\n\t\t\t\tput(keys[i], value);\n\t\t\t}\n\t\t\treturn _size != oldSize;\n\t\t}\n\n\t\tbool containsKey(const K &key) {\n\t\t\treturn find(key) != NULL;\n\t\t}\n\n\t\tbool remove(const K &key) {\n\t\t\tEntry *entry = find(key);\n\t\t\tif (!entry) return false;\n\n\t\t\tEntry *prev = entry->prev;\n\t\t\tEntry *next = entry->next;\n\n\t\t\tif (prev) prev->next = next;\n\t\t\telse _head = next;\n\t\t\tif (next) next->prev = entry->prev;\n\n\t\t\tdelete entry;\n\t\t\t_size--;\n\n\t\t\treturn true;\n\t\t}\n\n\t\tV operator[](const K &key) {\n\t\t\tEntry *entry = find(key);\n\t\t\tif (entry) return entry->_value;\n\t\t\telse {\n\t\t\t\tassert(false);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\n\t\tEntries getEntries() const {\n\t\t\treturn Entries(_head);\n\t\t}\n\n\tprivate:\n\t\tEntry *find(const K &key) {\n\t\t\tfor (Entry *entry = _head; entry != NULL; entry = entry->next) {\n\t\t\t\tif (entry->_key == key)\n\t\t\t\t\treturn entry;\n\t\t\t}\n\t\t\treturn NULL;\n\t\t}\n\n\t\tclass SP_API Entry : public SpineObject {\n\t\tpublic:\n\t\t\tK _key;\n\t\t\tV _value;\n\t\t\tEntry *next;\n\t\t\tEntry *prev;\n\n\t\t\tEntry() : next(NULL), prev(NULL) {}\n\t\t};\n\n\t\tEntry *_head;\n\t\tsize_t _size;\n\t};\n}\n\n#endif /* Spine_HashMap_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/IkConstraint.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_IkConstraint_h\n#define Spine_IkConstraint_h\n\n#include <spine/ConstraintData.h>\n\n#include <spine/Vector.h>\n\nnamespace spine {\n\tclass IkConstraintData;\n\n\tclass Skeleton;\n\n\tclass Bone;\n\n\tclass SP_API IkConstraint : public Updatable {\n\t\tfriend class Skeleton;\n\n\t\tfriend class IkConstraintTimeline;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\t/// Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified\n\t\t/// in the world coordinate system.\n\t\tstatic void\n\t\tapply(Bone &bone, float targetX, float targetY, bool compress, bool stretch, bool uniform, float alpha);\n\n\t\t/// Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as\n\t\t/// possible. The target is specified in the world coordinate system.\n\t\t/// @param child A direct descendant of the parent bone.\n\t\tstatic void\n\t\tapply(Bone &parent, Bone &child, float targetX, float targetY, int bendDir, bool stretch, bool uniform,\n\t\t\t  float softness,\n\t\t\t  float alpha);\n\n\t\tIkConstraint(IkConstraintData &data, Skeleton &skeleton);\n\n\t\tvirtual void update(Physics physics);\n\n\t\tvirtual int getOrder();\n\n\t\tIkConstraintData &getData();\n\n\t\tVector<Bone *> &getBones();\n\n\t\tBone *getTarget();\n\n\t\tvoid setTarget(Bone *inValue);\n\n\t\tint getBendDirection();\n\n\t\tvoid setBendDirection(int inValue);\n\n\t\tbool getCompress();\n\n\t\tvoid setCompress(bool inValue);\n\n\t\tbool getStretch();\n\n\t\tvoid setStretch(bool inValue);\n\n\t\tfloat getMix();\n\n\t\tvoid setMix(float inValue);\n\n\t\tfloat getSoftness();\n\n\t\tvoid setSoftness(float inValue);\n\n\t\tbool isActive();\n\n\t\tvoid setActive(bool inValue);\n\n        void setToSetupPose();\n\n\tprivate:\n\t\tIkConstraintData &_data;\n\t\tVector<Bone *> _bones;\n\t\tint _bendDirection;\n\t\tbool _compress;\n\t\tbool _stretch;\n\t\tfloat _mix;\n\t\tfloat _softness;\n\t\tBone *_target;\n\t\tbool _active;\n\t};\n}\n\n#endif /* Spine_IkConstraint_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/IkConstraintData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_IkConstraintData_h\n#define Spine_IkConstraintData_h\n\n#include <spine/Vector.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/ConstraintData.h>\n\nnamespace spine {\n\tclass BoneData;\n\n\tclass SP_API IkConstraintData : public ConstraintData {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class IkConstraint;\n\n\t\tfriend class Skeleton;\n\n\t\tfriend class IkConstraintTimeline;\n\n\tpublic:\n\t\tRTTI_DECL\n\n\t\texplicit IkConstraintData(const String &name);\n\n\t\t/// The bones that are constrained by this IK Constraint.\n\t\tVector<BoneData *> &getBones();\n\n\t\t/// The bone that is the IK target.\n\t\tBoneData *getTarget();\n\n\t\tvoid setTarget(BoneData *inValue);\n\n\t\t/// Controls the bend direction of the IK bones, either 1 or -1.\n\t\tint getBendDirection();\n\n\t\tvoid setBendDirection(int inValue);\n\n\t\tbool getCompress();\n\n\t\tvoid setCompress(bool inValue);\n\n\t\tbool getStretch();\n\n\t\tvoid setStretch(bool inValue);\n\n\t\tbool getUniform();\n\n\t\tvoid setUniform(bool inValue);\n\n\t\tfloat getMix();\n\n\t\tvoid setMix(float inValue);\n\n\t\tfloat getSoftness();\n\n\t\tvoid setSoftness(float inValue);\n\n\tprivate:\n\t\tVector<BoneData *> _bones;\n\t\tBoneData *_target;\n\t\tint _bendDirection;\n\t\tbool _compress;\n\t\tbool _stretch;\n\t\tbool _uniform;\n\t\tfloat _mix;\n\t\tfloat _softness;\n\t};\n}\n\n#endif /* Spine_IkConstraintData_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/IkConstraintTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_IkConstraintTimeline_h\n#define Spine_IkConstraintTimeline_h\n\n#include <spine/CurveTimeline.h>\n\nnamespace spine {\n\n\tclass SP_API IkConstraintTimeline : public CurveTimeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit IkConstraintTimeline(size_t frameCount, size_t bezierCount, int ikConstraintIndex);\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time, mix and bend direction of the specified keyframe.\n\t\tvoid setFrame(int frame, float time, float mix, float softness, int bendDirection, bool compress, bool stretch);\n\n\t\tint getIkConstraintIndex() { return _constraintIndex; }\n\n\t\tvoid setIkConstraintIndex(int inValue) { _constraintIndex = inValue; }\n\n\tprivate:\n\t\tint _constraintIndex;\n\n\t\tstatic const int ENTRIES = 6;\n\t\tstatic const int MIX = 1;\n\t\tstatic const int SOFTNESS = 2;\n\t\tstatic const int BEND_DIRECTION = 3;\n\t\tstatic const int COMPRESS = 4;\n\t\tstatic const int STRETCH = 5;\n\t};\n}\n\n#endif /* Spine_IkConstraintTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Inherit.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_TransformMode_h\n#define Spine_TransformMode_h\n\nnamespace spine {\n\tenum Inherit {\n\t\tInherit_Normal = 0,\n\t\tInherit_OnlyTranslation,\n\t\tInherit_NoRotationOrReflection,\n\t\tInherit_NoScale,\n\t\tInherit_NoScaleOrReflection\n\t};\n}\n\n#endif /* Spine_TransformMode_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/InheritTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_InheritTimeline_h\n#define Spine_InheritTimeline_h\n\n#include <spine/Timeline.h>\n\n#include <spine/Animation.h>\n#include <spine/Property.h>\n#include <spine/Inherit.h>\n\nnamespace spine {\n\n\tclass SP_API InheritTimeline : public Timeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit InheritTimeline(size_t frameCount, int boneIndex);\n\n\t\tvirtual ~InheritTimeline();\n\n        void setFrame(int frame, float time, Inherit inherit);\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\n        static const int ENTRIES = 2;\n        static const int INHERIT = 1;\n\t};\n}\n\n#endif /* Spine_InheritTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Json.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Json_h\n#define Spine_Json_h\n\n#include <spine/SpineObject.h>\n\n#ifndef SPINE_JSON_HAVE_PREV\n/* spine doesn't use the \"prev\" link in the Json sibling lists. */\n#define SPINE_JSON_HAVE_PREV 0\n#endif\n\nnamespace spine {\n\tclass SP_API Json : public SpineObject {\n\t\tfriend class SkeletonJson;\n\n\tpublic:\n\t\t/* Json Types: */\n\t\tstatic const int JSON_FALSE;\n\t\tstatic const int JSON_TRUE;\n\t\tstatic const int JSON_NULL;\n\t\tstatic const int JSON_NUMBER;\n\t\tstatic const int JSON_STRING;\n\t\tstatic const int JSON_ARRAY;\n\t\tstatic const int JSON_OBJECT;\n\n\t\t/* Get item \"string\" from object. Case insensitive. */\n\t\tstatic Json *getItem(Json *object, const char *string);\n\n\t\tstatic Json *getItem(Json *object, int childIndex);\n\n\t\tstatic const char *getString(Json *object, const char *name, const char *defaultValue);\n\n\t\tstatic float getFloat(Json *object, const char *name, float defaultValue);\n\n\t\tstatic int getInt(Json *object, const char *name, int defaultValue);\n\n\t\tstatic bool getBoolean(Json *object, const char *name, bool defaultValue);\n\n\t\t/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when Json_create() returns 0. 0 when Json_create() succeeds. */\n\t\tstatic const char *getError();\n\n\t\t/* Supply a block of JSON, and this returns a Json object you can interrogate. Call Json_dispose when finished. */\n\t\texplicit Json(const char *value);\n\n\t\t~Json();\n\n\n\tprivate:\n\t\tstatic const char *_error;\n\n\t\tJson *_next;\n#if SPINE_JSON_HAVE_PREV\n\t\tJson* _prev; /* next/prev allow you to walk array/object chains. Alternatively, use getSize/getItem */\n#endif\n\t\tJson *_child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */\n\n\t\tint _type; /* The type of the item, as above. */\n\t\tint _size; /* The number of children. */\n\n\t\tconst char *_valueString; /* The item's string, if type==JSON_STRING */\n\t\tint _valueInt; /* The item's number, if type==JSON_NUMBER */\n\t\tfloat _valueFloat; /* The item's number, if type==JSON_NUMBER */\n\n\t\tconst char *_name; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */\n\n\t\t/* Utility to jump whitespace and cr/lf */\n\t\tstatic const char *skip(const char *inValue);\n\n\t\t/* Parser core - when encountering text, process appropriately. */\n\t\tstatic const char *parseValue(Json *item, const char *value);\n\n\t\t/* Parse the input text into an unescaped cstring, and populate item. */\n\t\tstatic const char *parseString(Json *item, const char *str);\n\n\t\t/* Parse the input text to generate a number, and populate the result into item. */\n\t\tstatic const char *parseNumber(Json *item, const char *num);\n\n\t\t/* Build an array from input text. */\n\t\tstatic const char *parseArray(Json *item, const char *value);\n\n\t\t/* Build an object from the text. */\n\t\tstatic const char *parseObject(Json *item, const char *value);\n\n\t\tstatic int json_strcasecmp(const char *s1, const char *s2);\n\t};\n}\n\n#endif /* Spine_Json_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/LinkedMesh.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_LinkedMesh_h\n#define Spine_LinkedMesh_h\n\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n\tclass MeshAttachment;\n\n\tclass SP_API LinkedMesh : public SpineObject {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tpublic:\n\t\tLinkedMesh(MeshAttachment *mesh, const int skinIndex, size_t slotIndex, const String &parent,\n\t\t\t\t   bool inheritTimeline);\n\n        LinkedMesh(MeshAttachment *mesh, const String &skin, size_t slotIndex, const String &parent,\n                   bool inheritTimeline);\n\n\tprivate:\n\t\tMeshAttachment *_mesh;\n\t\tint _skinIndex;\n        String _skin;\n\t\tsize_t _slotIndex;\n\t\tString _parent;\n\t\tbool _inheritTimeline;\n\t};\n}\n\n#endif /* Spine_LinkedMesh_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Log.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef SPINE_DEBUG_LOG_H\n#define SPINE_DEBUG_LOG_H\n\n#include <spine/spine.h>\n\nnamespace spine {\n\tSP_API void spDebug_printSkeletonData(SkeletonData *skeletonData);\n\n\tSP_API void spDebug_printAnimation(Animation *animation);\n\n\tSP_API void spDebug_printTimeline(Timeline *timeline);\n\n\tSP_API void spDebug_printBoneDatas(Vector<BoneData *> &boneDatas);\n\n\tSP_API void spDebug_printBoneData(BoneData *boneData);\n\n\tSP_API void spDebug_printSkeleton(Skeleton *skeleton);\n\n\tSP_API void spDebug_printBones(Vector<Bone *> &bones);\n\n\tSP_API void spDebug_printBone(Bone *bone);\n\n\tSP_API void spDebug_printFloats(float *values, int numFloats);\n\n\tSP_API void spDebug_printFloats(Vector<float> &values);\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/MathUtil.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_MathUtil_h\n#define Spine_MathUtil_h\n\n#include <spine/SpineObject.h>\n\n#include <string.h>\n// Needed for older MSVC versions\n#undef min\n#undef max\n\nnamespace spine {\n\n\tclass SP_API MathUtil : public SpineObject {\n\tprivate:\n\t\tMathUtil();\n\n\tpublic:\n\t\tstatic const float Pi;\n\t\tstatic const float Pi_2;\n        static const float InvPi_2;\n\t\tstatic const float Deg_Rad;\n\t\tstatic const float Rad_Deg;\n\n\t\ttemplate<typename T>\n\t\tstatic inline T min(T a, T b) { return a < b ? a : b; }\n\n\t\ttemplate<typename T>\n\t\tstatic inline T max(T a, T b) { return a > b ? a : b; }\n\n\t\tstatic float sign(float val);\n\n\t\tstatic float clamp(float x, float lower, float upper);\n\n\t\tstatic float abs(float v);\n\n\t\t/// Returns the sine in radians from a lookup table.\n\t\tstatic float sin(float radians);\n\n\t\t/// Returns the cosine in radians from a lookup table.\n\t\tstatic float cos(float radians);\n\n\t\t/// Returns the sine in radians from a lookup table.\n\t\tstatic float sinDeg(float degrees);\n\n\t\t/// Returns the cosine in radians from a lookup table.\n\t\tstatic float cosDeg(float degrees);\n\n\t\t/// Returns atan2 in radians, faster but less accurate than Math.Atan2. Average error of 0.00231 radians (0.1323\n\t\t/// degrees), largest error of 0.00488 radians (0.2796 degrees).\n\t\tstatic float atan2(float y, float x);\n\n        static float atan2Deg(float x, float y);\n\n\t\tstatic float acos(float v);\n\n\t\tstatic float sqrt(float v);\n\n\t\tstatic float fmod(float a, float b);\n\n\t\tstatic bool isNan(float v);\n\n        static float quietNan();\n\n\t\tstatic float random();\n\n\t\tstatic float randomTriangular(float min, float max);\n\n\t\tstatic float randomTriangular(float min, float max, float mode);\n\n\t\tstatic float pow(float a, float b);\n\n        static float ceil(float v);\n\t};\n\n\tstruct SP_API Interpolation {\n\t\tvirtual float apply(float a) = 0;\n\n\t\tvirtual float interpolate(float start, float end, float a) {\n\t\t\treturn start + (end - start) * apply(a);\n\t\t}\n\n\t\tvirtual ~Interpolation() {};\n\t};\n\n\tstruct SP_API PowInterpolation : public Interpolation {\n\t\tPowInterpolation(int power) : power(power) {\n\t\t}\n\n\t\tfloat apply(float a) {\n\t\t\tif (a <= 0.5f) return MathUtil::pow(a * 2.0f, (float) power) / 2.0f;\n\t\t\treturn MathUtil::pow((a - 1.0f) * 2.0f, (float) power) / (power % 2 == 0 ? -2.0f : 2.0f) + 1.0f;\n\t\t}\n\n\t\tint power;\n\t};\n\n\tstruct SP_API PowOutInterpolation : public Interpolation {\n\t\tPowOutInterpolation(int power) : power(power) {\n\t\t}\n\n\t\tfloat apply(float a) {\n\t\t\treturn MathUtil::pow(a - 1, (float) power) * (power % 2 == 0 ? -1.0f : 1.0f) + 1.0f;\n\t\t}\n\n\t\tint power;\n\t};\n\n}\n\n#endif /* Spine_MathUtil_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/MeshAttachment.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_MeshAttachment_h\n#define Spine_MeshAttachment_h\n\n#include <spine/VertexAttachment.h>\n#include <spine/TextureRegion.h>\n#include <spine/Sequence.h>\n#include <spine/Vector.h>\n#include <spine/Color.h>\n#include <spine/HasRendererObject.h>\n\nnamespace spine {\n\t/// Attachment that displays a texture region using a mesh.\n\tclass SP_API MeshAttachment : public VertexAttachment {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class AtlasAttachmentLoader;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit MeshAttachment(const String &name);\n\n\t\tvirtual ~MeshAttachment();\n\n\t\tusing VertexAttachment::computeWorldVertices;\n\n\t\tvirtual void computeWorldVertices(Slot &slot, size_t start, size_t count, float *worldVertices, size_t offset,\n\t\tsize_t stride = 2);\n\n\t\tvoid updateRegion();\n\n\t\tint getHullLength();\n\n\t\tvoid setHullLength(int inValue);\n\n\t\tVector<float> &getRegionUVs();\n\n\t\t/// The UV pair for each vertex, normalized within the entire texture. See also MeshAttachment::updateRegion\n\t\tVector<float> &getUVs();\n\n\t\tVector<unsigned short> &getTriangles();\n\n\t\tColor &getColor();\n\n\t\tconst String &getPath();\n\n\t\tvoid setPath(const String &inValue);\n\n\t\tTextureRegion *getRegion();\n\n\t\tvoid setRegion(TextureRegion *region);\n\n\t\tSequence *getSequence();\n\n\t\tvoid setSequence(Sequence *sequence);\n\n\t\tMeshAttachment *getParentMesh();\n\n\t\tvoid setParentMesh(MeshAttachment *inValue);\n\n\t\t// Nonessential.\n\t\tVector<unsigned short> &getEdges();\n\n\t\tfloat getWidth();\n\n\t\tvoid setWidth(float inValue);\n\n\t\tfloat getHeight();\n\n\t\tvoid setHeight(float inValue);\n\n\t\tvirtual Attachment *copy();\n\n\t\tMeshAttachment *newLinkedMesh();\n\n\tprivate:\n\t\tMeshAttachment *_parentMesh;\n\t\tVector<float> _uvs;\n\t\tVector<float> _regionUVs;\n\t\tVector<unsigned short> _triangles;\n\t\tVector<unsigned short> _edges;\n\t\tString _path;\n\t\tColor _color;\n\t\tint _hullLength;\n\t\tint _width, _height;\n\t\tTextureRegion *_region;\n\t\tSequence *_sequence;\n\t};\n}\n\n#endif /* Spine_MeshAttachment_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/MixBlend.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_MixPose_h\n#define Spine_MixPose_h\n\nnamespace spine {\n\n/// Controls how a timeline is mixed with the setup or current pose.\n/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, Blend, MixDirection)\n\tenum MixBlend {\n\t\tMixBlend_Setup = 0,\n\t\tMixBlend_First,\n\t\tMixBlend_Replace,\n\t\tMixBlend_Add\n\t};\n}\n\n#endif /* Spine_MixPose_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/MixDirection.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_MixDirection_h\n#define Spine_MixDirection_h\n\nnamespace spine {\n\n/// Indicates whether a timeline's alpha is mixing out over time toward 0 (the setup or current pose) or mixing in toward 1 (the timeline's pose).\n/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, MixPose, MixDirection)\n\tenum MixDirection {\n\t\tMixDirection_In = 0,\n\t\tMixDirection_Out\n\t};\n\n}\n\n#endif /* Spine_MixDirection_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PathAttachment.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PathAttachment_h\n#define Spine_PathAttachment_h\n\n#include <spine/VertexAttachment.h>\n#include <spine/Color.h>\n\nnamespace spine {\n\tclass SP_API PathAttachment : public VertexAttachment {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit PathAttachment(const String &name);\n\n\t\t/// The length in the setup pose from the start of the path to the end of each curve.\n\t\tVector<float> &getLengths();\n\n\t\tbool isClosed();\n\n\t\tvoid setClosed(bool inValue);\n\n\t\tbool isConstantSpeed();\n\n\t\tvoid setConstantSpeed(bool inValue);\n\n\t\tColor &getColor();\n\n\t\tvirtual Attachment *copy();\n\n\tprivate:\n\t\tVector<float> _lengths;\n\t\tbool _closed;\n\t\tbool _constantSpeed;\n\t\tColor _color;\n\t};\n}\n\n#endif /* Spine_PathAttachment_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PathConstraint.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PathConstraint_h\n#define Spine_PathConstraint_h\n\n#include <spine/ConstraintData.h>\n\n#include <spine/Vector.h>\n\nnamespace spine {\n\tclass PathConstraintData;\n\n\tclass Skeleton;\n\n\tclass PathAttachment;\n\n\tclass Bone;\n\n\tclass Slot;\n\n\tclass SP_API PathConstraint : public Updatable {\n\t\tfriend class Skeleton;\n\n\t\tfriend class PathConstraintMixTimeline;\n\n\t\tfriend class PathConstraintPositionTimeline;\n\n\t\tfriend class PathConstraintSpacingTimeline;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\tPathConstraint(PathConstraintData &data, Skeleton &skeleton);\n\n\t\tvirtual void update(Physics physics);\n\n\t\tvirtual int getOrder();\n\n        PathConstraintData &getData();\n\n        Vector<Bone *> &getBones();\n\n        Slot *getTarget();\n\n        void setTarget(Slot *inValue);\n\n\t\tfloat getPosition();\n\n\t\tvoid setPosition(float inValue);\n\n\t\tfloat getSpacing();\n\n\t\tvoid setSpacing(float inValue);\n\n\t\tfloat getMixRotate();\n\n\t\tvoid setMixRotate(float inValue);\n\n\t\tfloat getMixX();\n\n\t\tvoid setMixX(float inValue);\n\n\t\tfloat getMixY();\n\n\t\tvoid setMixY(float inValue);\n\n\t\tbool isActive();\n\n\t\tvoid setActive(bool inValue);\n\n        void setToSetupPose();\n\n\tprivate:\n\t\tstatic const float EPSILON;\n\t\tstatic const int NONE;\n\t\tstatic const int BEFORE;\n\t\tstatic const int AFTER;\n\n\t\tPathConstraintData &_data;\n\t\tVector<Bone *> _bones;\n\t\tSlot *_target;\n\t\tfloat _position, _spacing;\n\t\tfloat _mixRotate, _mixX, _mixY;\n\n\t\tVector<float> _spaces;\n\t\tVector<float> _positions;\n\t\tVector<float> _world;\n\t\tVector<float> _curves;\n\t\tVector<float> _lengths;\n\t\tVector<float> _segments;\n\n\t\tbool _active;\n\n\t\tVector<float> &computeWorldPositions(PathAttachment &path, int spacesCount, bool tangents);\n\n\t\tstatic void addBeforePosition(float p, Vector<float> &temp, int i, Vector<float> &output, int o);\n\n\t\tstatic void addAfterPosition(float p, Vector<float> &temp, int i, Vector<float> &output, int o);\n\n\t\tstatic void\n\t\taddCurvePosition(float p, float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2, float y2,\n\t\t\t\t\t\t Vector<float> &output, int o, bool tangents);\n\t};\n}\n\n#endif /* Spine_PathConstraint_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PathConstraintData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PathConstraintData_h\n#define Spine_PathConstraintData_h\n\n#include <spine/PositionMode.h>\n#include <spine/SpacingMode.h>\n#include <spine/RotateMode.h>\n#include <spine/Vector.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/ConstraintData.h>\n\nnamespace spine {\n\tclass BoneData;\n\n\tclass SlotData;\n\n\tclass SP_API PathConstraintData : public ConstraintData {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class PathConstraint;\n\n\t\tfriend class Skeleton;\n\n\t\tfriend class PathConstraintMixTimeline;\n\n\t\tfriend class PathConstraintPositionTimeline;\n\n\t\tfriend class PathConstraintSpacingTimeline;\n\tpublic:\n\t\tRTTI_DECL\n\n\t\texplicit PathConstraintData(const String &name);\n\n\t\tVector<BoneData *> &getBones();\n\n\t\tSlotData *getTarget();\n\n\t\tvoid setTarget(SlotData *inValue);\n\n\t\tPositionMode getPositionMode();\n\n\t\tvoid setPositionMode(PositionMode inValue);\n\n\t\tSpacingMode getSpacingMode();\n\n\t\tvoid setSpacingMode(SpacingMode inValue);\n\n\t\tRotateMode getRotateMode();\n\n\t\tvoid setRotateMode(RotateMode inValue);\n\n\t\tfloat getOffsetRotation();\n\n\t\tvoid setOffsetRotation(float inValue);\n\n\t\tfloat getPosition();\n\n\t\tvoid setPosition(float inValue);\n\n\t\tfloat getSpacing();\n\n\t\tvoid setSpacing(float inValue);\n\n\t\tfloat getMixRotate();\n\n\t\tvoid setMixRotate(float inValue);\n\n\t\tfloat getMixX();\n\n\t\tvoid setMixX(float inValue);\n\n\t\tfloat getMixY();\n\n\t\tvoid setMixY(float inValue);\n\n\tprivate:\n\t\tVector<BoneData *> _bones;\n\t\tSlotData *_target;\n\t\tPositionMode _positionMode;\n\t\tSpacingMode _spacingMode;\n\t\tRotateMode _rotateMode;\n\t\tfloat _offsetRotation;\n\t\tfloat _position, _spacing;\n\t\tfloat _mixRotate, _mixX, _mixY;\n\t};\n}\n\n#endif /* Spine_PathConstraintData_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PathConstraintMixTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PathConstraintMixTimeline_h\n#define Spine_PathConstraintMixTimeline_h\n\n#include <spine/CurveTimeline.h>\n\nnamespace spine {\n\n\tclass SP_API PathConstraintMixTimeline : public CurveTimeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit PathConstraintMixTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex);\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\t/// Sets the time and mixes of the specified keyframe.\n\t\tvoid setFrame(int frameIndex, float time, float mixRotate, float mixX, float mixY);\n\n\t\tint getPathConstraintIndex() { return _constraintIndex; }\n\n\t\tvoid setPathConstraintIndex(int inValue) { _constraintIndex = inValue; }\n\n\tprivate:\n\t\tint _constraintIndex;\n\n\t\tstatic const int ENTRIES = 4;\n\t\tstatic const int ROTATE = 1;\n\t\tstatic const int X = 2;\n\t\tstatic const int Y = 2;\n\t};\n}\n\n#endif /* Spine_PathConstraintMixTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PathConstraintPositionTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PathConstraintPositionTimeline_h\n#define Spine_PathConstraintPositionTimeline_h\n\n#include <spine/CurveTimeline.h>\n\nnamespace spine {\n\n\tclass SP_API PathConstraintPositionTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\tstatic const int ENTRIES;\n\n\t\texplicit PathConstraintPositionTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex);\n\n\t\tvirtual ~PathConstraintPositionTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getPathConstraintIndex() { return _constraintIndex; }\n\n\t\tvoid setPathConstraintIndex(int inValue) { _constraintIndex = inValue; }\n\n\tprotected:\n\t\tint _constraintIndex;\n\t};\n}\n\n#endif /* Spine_PathConstraintPositionTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PathConstraintSpacingTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PathConstraintSpacingTimeline_h\n#define Spine_PathConstraintSpacingTimeline_h\n\n#include <spine/PathConstraintPositionTimeline.h>\n\nnamespace spine {\n\tclass SP_API PathConstraintSpacingTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit PathConstraintSpacingTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex);\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getPathConstraintIndex() { return _pathConstraintIndex; }\n\n\t\tvoid setPathConstraintIndex(int inValue) { _pathConstraintIndex = inValue; }\n\n\tprotected:\n\t\tint _pathConstraintIndex;\n\t};\n}\n\n#endif /* Spine_PathConstraintSpacingTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Physics.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n#ifndef Spine_Physics_h\n#define Spine_Physics_h\n\n/** Determines how physics and other non-deterministic updates are applied. */\nnamespace spine {\n    enum Physics {\n        /** Physics are not updated or applied. */\n        Physics_None,\n\n        /** Physics are reset to the current pose. */\n        Physics_Reset,\n\n        /** Physics are updated and the pose from physics is applied. */\n        Physics_Update,\n\n        /** Physics are not updated but the pose from physics is applied. */\n        Physics_Pose\n    };\n}\n\n#endif"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PhysicsConstraint.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PhysicsConstraint_h\n#define Spine_PhysicsConstraint_h\n\n#include <spine/ConstraintData.h>\n\n#include <spine/Vector.h>\n\nnamespace spine {\n\tclass PhysicsConstraintData;\n\n\tclass Skeleton;\n\n\tclass Bone;\n\n    class SP_API PhysicsConstraint : public Updatable {\n\n        friend class Skeleton;\n\n        friend class PhysicsConstraintTimeline;\n\n        friend class PhysicsConstraintInertiaTimeline;\n\n        friend class PhysicsConstraintStrengthTimeline;\n\n        friend class PhysicsConstraintDampingTimeline;\n\n        friend class PhysicsConstraintMassTimeline;\n\n        friend class PhysicsConstraintWindTimeline;\n\n        friend class PhysicsConstraintGravityTimeline;\n\n        friend class PhysicsConstraintMixTimeline;\n\n        friend class PhysicsConstraintResetTimeline;\n\n    RTTI_DECL\n\n    public:\n        PhysicsConstraint(PhysicsConstraintData& data, Skeleton& skeleton);\n\n        PhysicsConstraintData &getData();\n\n        void setBone(Bone* bone);\n        Bone* getBone();\n\n        void setInertia(float value);\n        float getInertia();\n\n        void setStrength(float value);\n        float getStrength();\n\n        void setDamping(float value);\n        float getDamping();\n\n        void setMassInverse(float value);\n        float getMassInverse();\n\n        void setWind(float value);\n        float getWind();\n\n        void setGravity(float value);\n        float getGravity();\n\n        void setMix(float value);\n        float getMix();\n\n        void setReset(bool value);\n        bool getReset();\n\n        void setUx(float value);\n        float getUx();\n\n        void setUy(float value);\n        float getUy();\n\n        void setCx(float value);\n        float getCx();\n\n        void setCy(float value);\n        float getCy();\n\n        void setTx(float value);\n        float getTx();\n\n        void setTy(float value);\n        float getTy();\n\n        void setXOffset(float value);\n        float getXOffset();\n\n        void setXVelocity(float value);\n        float getXVelocity();\n\n        void setYOffset(float value);\n        float getYOffset();\n\n        void setYVelocity(float value);\n        float getYVelocity();\n\n        void setRotateOffset(float value);\n        float getRotateOffset();\n\n        void setRotateVelocity(float value);\n        float getRotateVelocity();\n\n        void setScaleOffset(float value);\n        float getScaleOffset();\n\n        void setScaleVelocity(float value);\n        float getScaleVelocity();\n\n        void setActive(bool value);\n        bool isActive();\n\n        void setRemaining(float value);\n        float getRemaining();\n\n        void setLastTime(float value);\n        float getLastTime();\n\n        void reset();\n\n        void setToSetupPose();\n\n        virtual void update(Physics physics);\n\n        void translate(float x, float y);\n\n        void rotate(float x, float y, float degrees);\n\n    private:\n        PhysicsConstraintData& _data;\n        Bone* _bone;\n\n        float _inertia;\n        float _strength;\n        float _damping;\n        float _massInverse;\n        float _wind;\n        float _gravity;\n        float _mix;\n\n        bool _reset;\n        float _ux;\n        float _uy;\n        float _cx;\n        float _cy;\n        float _tx;\n        float _ty;\n        float _xOffset;\n        float _xVelocity;\n        float _yOffset;\n        float _yVelocity;\n        float _rotateOffset;\n        float _rotateVelocity;\n        float _scaleOffset;\n        float _scaleVelocity;\n\n        bool _active;\n\n        Skeleton& _skeleton;\n        float _remaining;\n        float _lastTime;\n    };\n}\n\n#endif /* Spine_PhysicsConstraint_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PhysicsConstraintData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PhysicsConstraintData_h\n#define Spine_PhysicsConstraintData_h\n\n#include <spine/Vector.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/ConstraintData.h>\n\nnamespace spine {\n\tclass BoneData;\n\n\tclass SP_API PhysicsConstraintData : public ConstraintData {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class Skeleton;\n\n        friend class PhysicsConstraint;\n\n\tpublic:\n\t\tRTTI_DECL\n\n\t\texplicit PhysicsConstraintData(const String &name);\n\n        void setBone(BoneData* bone);\n\n        BoneData* getBone() const;\n\n        void setX(float x);\n\n        float getX() const;\n\n        void setY(float y);\n\n        float getY() const;\n\n        void setRotate(float rotate);\n\n        float getRotate() const;\n\n        void setScaleX(float scaleX);\n\n        float getScaleX() const;\n\n        void setShearX(float shearX);\n\n        float getShearX() const;\n\n        void setLimit(float limit);\n\n        float getLimit() const;\n\n        void setStep(float step);\n\n        float getStep() const;\n\n        void setInertia(float inertia);\n\n        float getInertia() const;\n\n        void setStrength(float strength);\n\n        float getStrength() const;\n\n        void setDamping(float damping);\n\n        float getDamping() const;\n\n        void setMassInverse(float massInverse);\n\n        float getMassInverse() const;\n\n        void setWind(float wind);\n\n        float getWind() const;\n\n        void setGravity(float gravity);\n\n        float getGravity() const;\n\n        void setMix(float mix);\n\n        float getMix() const;\n\n        void setInertiaGlobal(bool inertiaGlobal);\n\n        bool isInertiaGlobal() const;\n\n        void setStrengthGlobal(bool strengthGlobal);\n\n        bool isStrengthGlobal() const;\n\n        void setDampingGlobal(bool dampingGlobal);\n\n        bool isDampingGlobal() const;\n\n        void setMassGlobal(bool massGlobal);\n\n        bool isMassGlobal() const;\n\n        void setWindGlobal(bool windGlobal);\n\n        bool isWindGlobal() const;\n\n        void setGravityGlobal(bool gravityGlobal);\n\n        bool isGravityGlobal() const;\n\n        void setMixGlobal(bool mixGlobal);\n\n        bool isMixGlobal() const;\n\n\tprivate:\n\t\tBoneData *_bone;\n        float _x, _y, _rotate, _scaleX, _shearX, _limit;\n        float _step, _inertia, _strength, _damping, _massInverse, _wind, _gravity, _mix;\n        bool _inertiaGlobal, _strengthGlobal, _dampingGlobal, _massGlobal, _windGlobal, _gravityGlobal, _mixGlobal;\n\t};\n}\n\n#endif /* Spine_PhysicsConstraintData_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PhysicsConstraintTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PhysicsConstraintTimeline_h\n#define Spine_PhysicsConstraintTimeline_h\n\n#include <spine/CurveTimeline.h>\n#include <spine/PhysicsConstraint.h>\n#include <spine/PhysicsConstraintData.h>\n\nnamespace spine {\n\n\tclass SP_API PhysicsConstraintTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit PhysicsConstraintTimeline(size_t frameCount, size_t bezierCount, int physicsConstraintIndex, Property property);\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getPhysicsConstraintIndex() { return _constraintIndex; }\n\n\t\tvoid setPhysicsConstraintIndex(int inValue) { _constraintIndex = inValue; }\n\n    protected:\n        virtual float setup(PhysicsConstraint *constraint) = 0;\n        virtual float get(PhysicsConstraint *constraint) = 0;\n        virtual void set(PhysicsConstraint *constraint, float value) = 0;\n        virtual bool global(PhysicsConstraintData &constraintData) = 0;\n\n\tprivate:\n\t\tint _constraintIndex;\n\t};\n\n    class SP_API PhysicsConstraintInertiaTimeline : public PhysicsConstraintTimeline {\n        friend class SkeletonBinary;\n\n        friend class SkeletonJson;\n\n    RTTI_DECL\n\n    public:\n        explicit PhysicsConstraintInertiaTimeline(size_t frameCount, size_t bezierCount, int physicsConstraintIndex): PhysicsConstraintTimeline(frameCount, bezierCount, physicsConstraintIndex, Property_PhysicsConstraintInertia) {};\n\n    protected:\n        float setup(PhysicsConstraint *constraint) {\n            return constraint->_data.getInertia();\n        }\n\n        float get(PhysicsConstraint *constraint) {\n            return constraint->_inertia;\n        }\n\n        void set(PhysicsConstraint *constraint, float value) {\n            constraint->_inertia = value;\n        }\n\n        bool global(PhysicsConstraintData &constraintData) {\n            return constraintData.isInertiaGlobal();\n        }\n    };\n\n    class SP_API PhysicsConstraintStrengthTimeline : public PhysicsConstraintTimeline {\n        friend class SkeletonBinary;\n\n        friend class SkeletonJson;\n\n    RTTI_DECL\n\n    public:\n        explicit PhysicsConstraintStrengthTimeline(size_t frameCount, size_t bezierCount, int physicsConstraintIndex): PhysicsConstraintTimeline(frameCount, bezierCount, physicsConstraintIndex, Property_PhysicsConstraintStrength) {};\n\n    protected:\n        float setup(PhysicsConstraint *constraint) {\n            return constraint->_data.getStrength();\n        }\n\n        float get(PhysicsConstraint *constraint) {\n            return constraint->_strength;\n        }\n\n        void set(PhysicsConstraint *constraint, float value) {\n            constraint->_strength = value;\n        }\n\n        bool global(PhysicsConstraintData &constraintData) {\n            return constraintData.isStrengthGlobal();\n        }\n    };\n\n    class SP_API PhysicsConstraintDampingTimeline : public PhysicsConstraintTimeline {\n        friend class SkeletonBinary;\n\n        friend class SkeletonJson;\n\n    RTTI_DECL\n\n    public:\n        explicit PhysicsConstraintDampingTimeline(size_t frameCount, size_t bezierCount, int physicsConstraintIndex): PhysicsConstraintTimeline(frameCount, bezierCount, physicsConstraintIndex, Property_PhysicsConstraintDamping) {};\n\n    protected:\n        float setup(PhysicsConstraint *constraint) {\n            return constraint->_data.getDamping();\n        }\n\n        float get(PhysicsConstraint *constraint) {\n            return constraint->_damping;\n        }\n\n        void set(PhysicsConstraint *constraint, float value) {\n            constraint->_damping = value;\n        }\n\n        bool global(PhysicsConstraintData &constraintData) {\n            return constraintData.isDampingGlobal();\n        }\n    };\n\n    class SP_API PhysicsConstraintMassTimeline : public PhysicsConstraintTimeline {\n        friend class SkeletonBinary;\n\n        friend class SkeletonJson;\n\n    RTTI_DECL\n\n    public:\n        explicit PhysicsConstraintMassTimeline(size_t frameCount, size_t bezierCount, int physicsConstraintIndex): PhysicsConstraintTimeline(frameCount, bezierCount, physicsConstraintIndex, Property_PhysicsConstraintMass) {};\n\n    protected:\n        float setup(PhysicsConstraint *constraint) {\n            return 1 / constraint->_data.getMassInverse();\n        }\n\n        float get(PhysicsConstraint *constraint) {\n            return 1 / constraint->_massInverse;\n        }\n\n        void set(PhysicsConstraint *constraint, float value) {\n            constraint->_massInverse = 1 / value;\n        }\n\n        bool global(PhysicsConstraintData &constraintData) {\n            return constraintData.isMassGlobal();\n        }\n    };\n\n    class SP_API PhysicsConstraintWindTimeline : public PhysicsConstraintTimeline {\n        friend class SkeletonBinary;\n\n        friend class SkeletonJson;\n\n    RTTI_DECL\n\n    public:\n        explicit PhysicsConstraintWindTimeline(size_t frameCount, size_t bezierCount, int physicsConstraintIndex): PhysicsConstraintTimeline(frameCount, bezierCount, physicsConstraintIndex, Property_PhysicsConstraintWind) {};\n\n    protected:\n        float setup(PhysicsConstraint *constraint) {\n            return constraint->_data.getWind();\n        }\n\n        float get(PhysicsConstraint *constraint) {\n            return constraint->_wind;\n        }\n\n        void set(PhysicsConstraint *constraint, float value) {\n            constraint->_wind = value;\n        }\n\n        bool global(PhysicsConstraintData &constraintData) {\n            return constraintData.isWindGlobal();\n        }\n    };\n\n    class SP_API PhysicsConstraintGravityTimeline : public PhysicsConstraintTimeline {\n        friend class SkeletonBinary;\n\n        friend class SkeletonJson;\n\n    RTTI_DECL\n\n    public:\n        explicit PhysicsConstraintGravityTimeline(size_t frameCount, size_t bezierCount, int physicsConstraintIndex): PhysicsConstraintTimeline(frameCount, bezierCount, physicsConstraintIndex, Property_PhysicsConstraintGravity) {};\n\n    protected:\n        float setup(PhysicsConstraint *constraint) {\n            return constraint->_data.getGravity();\n        }\n\n        float get(PhysicsConstraint *constraint) {\n            return constraint->_gravity;\n        }\n\n        void set(PhysicsConstraint *constraint, float value) {\n            constraint->_gravity = value;\n        }\n\n        bool global(PhysicsConstraintData &constraintData) {\n            return constraintData.isGravityGlobal();\n        }\n    };\n\n    class SP_API PhysicsConstraintMixTimeline : public PhysicsConstraintTimeline {\n        friend class SkeletonBinary;\n\n        friend class SkeletonJson;\n\n    RTTI_DECL\n\n    public:\n        explicit PhysicsConstraintMixTimeline(size_t frameCount, size_t bezierCount, int physicsConstraintIndex): PhysicsConstraintTimeline(frameCount, bezierCount, physicsConstraintIndex, Property_PhysicsConstraintMix) {};\n\n    protected:\n        float setup(PhysicsConstraint *constraint) {\n            return constraint->_data.getMix();\n        }\n\n        float get(PhysicsConstraint *constraint) {\n            return constraint->_mix;\n        }\n\n        void set(PhysicsConstraint *constraint, float value) {\n            constraint->_mix = value;\n        }\n\n        bool global(PhysicsConstraintData &constraintData) {\n            return constraintData.isMixGlobal();\n        }\n    };\n\n    class SP_API PhysicsConstraintResetTimeline : public Timeline {\n        friend class SkeletonBinary;\n\n        friend class SkeletonJson;\n\n    RTTI_DECL\n\n    public:\n        explicit PhysicsConstraintResetTimeline(size_t frameCount, int physicsConstraintIndex): Timeline(frameCount, 1), _constraintIndex(physicsConstraintIndex) {\n            PropertyId ids[] = {((PropertyId)Property_PhysicsConstraintReset) << 32};\n            setPropertyIds(ids, 1);\n        }\n\n        virtual void\n        apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n              MixDirection direction);\n\n        void setFrame(int frame, float time) {\n            _frames[frame] = time;\n        }\n    private:\n        int _constraintIndex;\n    };\n}\n\n#endif /* Spine_PhysicsConstraintTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PointAttachment.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PointAttachment_h\n#define Spine_PointAttachment_h\n\n#include <spine/Attachment.h>\n#include <spine/Color.h>\n\nnamespace spine {\n\tclass Bone;\n\n\t/// An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be\n\t/// used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a\n\t/// skin.\n\t///\n\t/// See http://esotericsoftware.com/spine-point-attachments for Point Attachments in the Spine User Guide.\n\t///\n\tclass SP_API PointAttachment : public Attachment {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit PointAttachment(const String &name);\n\n\t\tvoid computeWorldPosition(Bone &bone, float &ox, float &oy);\n\n\t\tfloat computeWorldRotation(Bone &bone);\n\n\t\tfloat getX();\n\n\t\tvoid setX(float inValue);\n\n\t\tfloat getY();\n\n\t\tvoid setY(float inValue);\n\n\t\tfloat getRotation();\n\n\t\tvoid setRotation(float inValue);\n\n\t\tColor &getColor();\n\n\t\tvirtual Attachment *copy();\n\n\tprivate:\n\t\tfloat _x, _y, _rotation;\n\t\tColor _color;\n\t};\n}\n\n#endif /* Spine_PointAttachment_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Pool.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Pool_h\n#define Spine_Pool_h\n\n#include <spine/Extension.h>\n#include <spine/Vector.h>\n#include <spine/ContainerUtil.h>\n#include <spine/SpineObject.h>\n\nnamespace spine {\n\ttemplate<typename T>\n\tclass SP_API Pool : public SpineObject {\n\tpublic:\n\t\tPool() {\n\t\t}\n\n\t\t~Pool() {\n\t\t\tContainerUtil::cleanUpVectorOfPointers(_objects);\n\t\t}\n\n\t\tT *obtain() {\n\t\t\tif (_objects.size() > 0) {\n\t\t\t\tT **object = &_objects[_objects.size() - 1];\n\t\t\t\tT *ret = *object;\n\t\t\t\t_objects.removeAt(_objects.size() - 1);\n\n\t\t\t\treturn ret;\n\t\t\t} else {\n\t\t\t\tT *ret = new(__FILE__, __LINE__) T();\n\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t}\n\n\t\tvoid free(T *object) {\n\t\t\tif (!_objects.contains(object)) {\n\t\t\t\t_objects.add(object);\n\t\t\t}\n\t\t}\n\n\tprivate:\n\t\tVector<T *> _objects;\n\t};\n}\n\n#endif /* Spine_Pool_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/PositionMode.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_PositionMode_h\n#define Spine_PositionMode_h\n\nnamespace spine {\n\tenum PositionMode {\n\t\tPositionMode_Fixed = 0,\n\t\tPositionMode_Percent\n\t};\n}\n\n#endif /* Spine_PositionMode_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Property.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Property_h\n#define Spine_Property_h\n\nnamespace spine {\n\ttypedef long long PropertyId;\n\tenum Property {\n\t\tProperty_Rotate = 1 << 0,\n\t\tProperty_X = 1 << 1,\n\t\tProperty_Y = 1 << 2,\n\t\tProperty_ScaleX = 1 << 3,\n\t\tProperty_ScaleY = 1 << 4,\n\t\tProperty_ShearX = 1 << 5,\n\t\tProperty_ShearY = 1 << 6,\n        Property_Inherit = 1 << 7,\n\t\tProperty_Rgb = 1 << 8,\n\t\tProperty_Alpha = 1 << 9,\n\t\tProperty_Rgb2 = 1 << 10,\n\t\tProperty_Attachment = 1 << 11,\n\t\tProperty_Deform = 1 << 12,\n\t\tProperty_Event = 1 << 13,\n\t\tProperty_DrawOrder = 1 << 14,\n\t\tProperty_IkConstraint = 1 << 15,\n\t\tProperty_TransformConstraint = 1 << 16,\n\t\tProperty_PathConstraintPosition = 1 << 17,\n\t\tProperty_PathConstraintSpacing = 1 << 18,\n\t\tProperty_PathConstraintMix = 1 << 19,\n        Property_PhysicsConstraintInertia = 1 << 20,\n        Property_PhysicsConstraintStrength = 1 << 21,\n        Property_PhysicsConstraintDamping = 1 << 22,\n        Property_PhysicsConstraintMass = 1 << 23,\n        Property_PhysicsConstraintWind = 1 << 24,\n        Property_PhysicsConstraintGravity = 1 << 25,\n        Property_PhysicsConstraintMix = 1 << 26,\n        Property_PhysicsConstraintReset = 1 << 27,\n\t\tProperty_Sequence = 1 << 28\n\t};\n}\n\n#endif /* Spine_Property_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/RTTI.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_RTTI_h\n#define Spine_RTTI_h\n\n#include <spine/dll.h>\n\nnamespace spine {\n\tclass SP_API RTTI {\n\tpublic:\n\t\texplicit RTTI(const char *className);\n\n\t\tRTTI(const char *className, const RTTI &baseRTTI);\n\n\t\tconst char *getClassName() const;\n\n\t\tbool isExactly(const RTTI &rtti) const;\n\n\t\tbool instanceOf(const RTTI &rtti) const;\n\n\tprivate:\n\t\t// Prevent copying\n\t\tRTTI(const RTTI &obj);\n\n\t\tRTTI &operator=(const RTTI &obj);\n\n\t\tconst char *_className;\n\t\tconst RTTI *_pBaseRTTI;\n\t};\n}\n\n#define RTTI_DECL \\\npublic: \\\nstatic const spine::RTTI rtti; \\\nvirtual const spine::RTTI& getRTTI() const;\n\n#define RTTI_IMPL_NOPARENT(name) \\\nconst spine::RTTI name::rtti(#name); \\\nconst spine::RTTI& name::getRTTI() const { return rtti; }\n\n#define RTTI_IMPL(name, parent) \\\nconst spine::RTTI name::rtti(#name, parent::rtti); \\\nconst spine::RTTI& name::getRTTI() const { return rtti; }\n\n#endif /* Spine_RTTI_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/RegionAttachment.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_RegionAttachment_h\n#define Spine_RegionAttachment_h\n\n#include <spine/Attachment.h>\n#include <spine/Vector.h>\n#include <spine/Color.h>\n#include <spine/Sequence.h>\n#include <spine/TextureRegion.h>\n\n#include <spine/HasRendererObject.h>\n\n#define NUM_UVS 8\n\nnamespace spine {\n\tclass Bone;\n\n\t/// Attachment that displays a texture region.\n\tclass SP_API RegionAttachment : public Attachment {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class AtlasAttachmentLoader;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit RegionAttachment(const String &name);\n\n\t\tvirtual ~RegionAttachment();\n\n\t\tvoid updateRegion();\n\n\t\t/// Transforms the attachment's four vertices to world coordinates.\n\t\t/// @param slot The parent slot.\n\t\t/// @param worldVertices The output world vertices. Must have a length greater than or equal to offset + 8.\n\t\t/// @param offset The worldVertices index to begin writing values.\n\t\t/// @param stride The number of worldVertices entries between the value pairs written.\n\t\tvoid computeWorldVertices(Slot &slot, float *worldVertices, size_t offset, size_t stride = 2);\n\n\t\tvoid computeWorldVertices(Slot &slot, Vector<float> &worldVertices, size_t offset, size_t stride = 2);\n\n\t\tfloat getX();\n\n\t\tvoid setX(float inValue);\n\n\t\tfloat getY();\n\n\t\tvoid setY(float inValue);\n\n\t\tfloat getRotation();\n\n\t\tvoid setRotation(float inValue);\n\n\t\tfloat getScaleX();\n\n\t\tvoid setScaleX(float inValue);\n\n\t\tfloat getScaleY();\n\n\t\tvoid setScaleY(float inValue);\n\n\t\tfloat getWidth();\n\n\t\tvoid setWidth(float inValue);\n\n\t\tfloat getHeight();\n\n\t\tvoid setHeight(float inValue);\n\n\t\tColor &getColor();\n\n\t\tconst String &getPath();\n\n\t\tvoid setPath(const String &inValue);\n\n\t\tTextureRegion *getRegion();\n\n\t\tvoid setRegion(TextureRegion *region);\n\n\t\tSequence *getSequence();\n\n\t\tvoid setSequence(Sequence *sequence);\n\n\t\tVector<float> &getOffset();\n\n\t\tVector<float> &getUVs();\n\n\t\tvirtual Attachment *copy();\n\n\tprivate:\n\t\tstatic const int BLX;\n\t\tstatic const int BLY;\n\t\tstatic const int ULX;\n\t\tstatic const int ULY;\n\t\tstatic const int URX;\n\t\tstatic const int URY;\n\t\tstatic const int BRX;\n\t\tstatic const int BRY;\n\n\t\tfloat _x, _y, _rotation, _scaleX, _scaleY, _width, _height;\n\t\tVector<float> _vertexOffset;\n\t\tVector<float> _uvs;\n\t\tString _path;\n\t\tColor _color;\n\t\tTextureRegion *_region;\n\t\tSequence *_sequence;\n\t};\n}\n\n#endif /* Spine_RegionAttachment_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/RotateMode.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_RotateMode_h\n#define Spine_RotateMode_h\n\nnamespace spine {\n\tenum RotateMode {\n\t\tRotateMode_Tangent = 0,\n\t\tRotateMode_Chain,\n\t\tRotateMode_ChainScale\n\t};\n}\n\n#endif /* Spine_RotateMode_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/RotateTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_RotateTimeline_h\n#define Spine_RotateTimeline_h\n\n#include <spine/CurveTimeline.h>\n\nnamespace spine {\n\tclass SP_API RotateTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class AnimationState;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit RotateTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n}\n\n#endif /* Spine_RotateTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/ScaleTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_ScaleTimeline_h\n#define Spine_ScaleTimeline_h\n\n#include <spine/TranslateTimeline.h>\n\nnamespace spine {\n\tclass SP_API ScaleTimeline : public CurveTimeline2 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit ScaleTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual ~ScaleTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n\n\tclass SP_API ScaleXTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit ScaleXTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual ~ScaleXTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n\n\tclass SP_API ScaleYTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit ScaleYTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual ~ScaleYTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n}\n\n#endif /* Spine_ScaleTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Sequence.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Sequence_h\n#define Spine_Sequence_h\n\n#include <spine/Vector.h>\n#include <spine/SpineString.h>\n#include <spine/TextureRegion.h>\n\nnamespace spine {\n\tclass Slot;\n\n\tclass Attachment;\n\n\tclass SkeletonBinary;\n\tclass SkeletonJson;\n\n\tclass SP_API Sequence : public SpineObject {\n\t\tfriend class SkeletonBinary;\n\t\tfriend class SkeletonJson;\n\tpublic:\n\t\tSequence(int count);\n\n\t\t~Sequence();\n\n\t\tSequence *copy();\n\n\t\tvoid apply(Slot *slot, Attachment *attachment);\n\n\t\tString getPath(const String &basePath, int index);\n\n\t\tint getId() { return _id; }\n\n\t\tvoid setId(int id) { _id = id; }\n\n\t\tint getStart() { return _start; }\n\n\t\tvoid setStart(int start) { _start = start; }\n\n\t\tint getDigits() { return _digits; }\n\n\t\tvoid setDigits(int digits) { _digits = digits; }\n\n\t\tint getSetupIndex() { return _setupIndex; }\n\n\t\tvoid setSetupIndex(int setupIndex) { _setupIndex = setupIndex; }\n\n\t\tVector<TextureRegion *> &getRegions() { return _regions; }\n\n\tprivate:\n\t\tint _id;\n\t\tVector<TextureRegion *> _regions;\n\t\tint _start;\n\t\tint _digits;\n\t\tint _setupIndex;\n\n\t\tint getNextID();\n\t};\n\n\tenum SequenceMode {\n\t\thold = 0,\n\t\tonce = 1,\n\t\tloop = 2,\n\t\tpingpong = 3,\n\t\tonceReverse = 4,\n\t\tloopReverse = 5,\n\t\tpingpongReverse = 6\n\t};\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SequenceTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_SequenceTimeline_h\n#define Spine_SequenceTimeline_h\n\n#include <spine/Timeline.h>\n#include <spine/Sequence.h>\n\nnamespace spine {\n\tclass Attachment;\n\n\tclass SP_API SequenceTimeline : public Timeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit SequenceTimeline(size_t frameCount, int slotIndex, spine::Attachment *attachment);\n\n\t\tvirtual ~SequenceTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tvoid setFrame(int frame, float time, SequenceMode mode, int index, float delay);\n\n\t\tint getSlotIndex() { return _slotIndex; };\n\n\t\tvoid setSlotIndex(int inValue) { _slotIndex = inValue; }\n\n\t\tAttachment *getAttachment() { return _attachment; }\n\n\tprotected:\n\t\tint _slotIndex;\n\t\tAttachment *_attachment;\n\n\t\tstatic const int ENTRIES = 3;\n\t\tstatic const int MODE = 1;\n\t\tstatic const int DELAY = 2;\n\t};\n}\n\n#endif /* Spine_SequenceTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/ShearTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_ShearTimeline_h\n#define Spine_ShearTimeline_h\n\n#include <spine/TranslateTimeline.h>\n\nnamespace spine {\n\tclass SP_API ShearTimeline : public CurveTimeline2 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit ShearTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual ~ShearTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n\n\tclass SP_API ShearXTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit ShearXTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual ~ShearXTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n\n\tclass SP_API ShearYTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit ShearYTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual ~ShearYTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n}\n\n#endif /* Spine_ShearTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Skeleton.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Skeleton_h\n#define Spine_Skeleton_h\n\n#include <spine/Vector.h>\n#include <spine/MathUtil.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/Color.h>\n#include <spine/Physics.h>\n\nnamespace spine {\n\tclass SkeletonData;\n\n\tclass Bone;\n\n\tclass Updatable;\n\n\tclass Slot;\n\n\tclass IkConstraint;\n\n\tclass PathConstraint;\n\n    class PhysicsConstraint;\n\n\tclass TransformConstraint;\n\n\tclass Skin;\n\n\tclass Attachment;\n\n    class SkeletonClipping;\n\n\tclass SP_API Skeleton : public SpineObject {\n\t\tfriend class AnimationState;\n\n\t\tfriend class SkeletonBounds;\n\n\t\tfriend class SkeletonClipping;\n\n\t\tfriend class AttachmentTimeline;\n\n\t\tfriend class RGBATimeline;\n\n\t\tfriend class RGBTimeline;\n\n\t\tfriend class AlphaTimeline;\n\n\t\tfriend class RGBA2Timeline;\n\n\t\tfriend class RGB2Timeline;\n\n\t\tfriend class DeformTimeline;\n\n\t\tfriend class DrawOrderTimeline;\n\n\t\tfriend class EventTimeline;\n\n\t\tfriend class IkConstraintTimeline;\n\n\t\tfriend class PathConstraintMixTimeline;\n\n\t\tfriend class PathConstraintPositionTimeline;\n\n\t\tfriend class PathConstraintSpacingTimeline;\n\n\t\tfriend class ScaleTimeline;\n\n\t\tfriend class ScaleXTimeline;\n\n\t\tfriend class ScaleYTimeline;\n\n\t\tfriend class ShearTimeline;\n\n\t\tfriend class ShearXTimeline;\n\n\t\tfriend class ShearYTimeline;\n\n\t\tfriend class TransformConstraintTimeline;\n\n\t\tfriend class RotateTimeline;\n\n\t\tfriend class TranslateTimeline;\n\n\t\tfriend class TranslateXTimeline;\n\n\t\tfriend class TranslateYTimeline;\n\n\t\tfriend class TwoColorTimeline;\n\n\tpublic:\n\t\texplicit Skeleton(SkeletonData *skeletonData);\n\n\t\t~Skeleton();\n\n\t\t/// Caches information about bones and constraints. Must be called if bones, constraints or weighted path attachments are added\n\t\t/// or removed.\n\t\tvoid updateCache();\n\n\t\tvoid printUpdateCache();\n\n        /// Updates the world transform for each bone and applies all constraints.\n        ///\n        /// See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine\n        /// Runtimes Guide.\n\t\tvoid updateWorldTransform(Physics physics);\n\n\t\tvoid updateWorldTransform(Physics physics, Bone *parent);\n\n\t\t/// Sets the bones, constraints, and slots to their setup pose values.\n\t\tvoid setToSetupPose();\n\n\t\t/// Sets the bones and constraints to their setup pose values.\n\t\tvoid setBonesToSetupPose();\n\n\t\tvoid setSlotsToSetupPose();\n\n\t\t/// @return May be NULL.\n\t\tBone *findBone(const String &boneName);\n\n\t\t/// @return May be NULL.\n\t\tSlot *findSlot(const String &slotName);\n\n\t\t/// Sets a skin by name (see setSkin).\n\t\tvoid setSkin(const String &skinName);\n\n\t\t/// Attachments from the new skin are attached if the corresponding attachment from the old skin was attached.\n\t\t/// If there was no old skin, each slot's setup mode attachment is attached from the new skin.\n\t\t/// After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling\n\t\t/// See Skeleton::setSlotsToSetupPose()\n\t\t/// Also, often AnimationState::apply(Skeleton&) is called before the next time the\n\t\t/// skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin.\n\t\t/// @param newSkin May be NULL.\n\t\tvoid setSkin(Skin *newSkin);\n\n\t\t/// @return May be NULL.\n\t\tAttachment *getAttachment(const String &slotName, const String &attachmentName);\n\n\t\t/// @return May be NULL.\n\t\tAttachment *getAttachment(int slotIndex, const String &attachmentName);\n\n\t\t/// @param attachmentName May be empty.\n\t\tvoid setAttachment(const String &slotName, const String &attachmentName);\n\n\t\t/// @return May be NULL.\n\t\tIkConstraint *findIkConstraint(const String &constraintName);\n\n\t\t/// @return May be NULL.\n\t\tTransformConstraint *findTransformConstraint(const String &constraintName);\n\n\t\t/// @return May be NULL.\n\t\tPathConstraint *findPathConstraint(const String &constraintName);\n\n        /// @return May be NULL.\n        PhysicsConstraint *findPhysicsConstraint(const String &constraintName);\n\n\t\t/// Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n\t\t/// @param outX The horizontal distance between the skeleton origin and the left side of the AABB.\n\t\t/// @param outY The vertical distance between the skeleton origin and the bottom side of the AABB.\n\t\t/// @param outWidth The width of the AABB\n\t\t/// @param outHeight The height of the AABB.\n\t\t/// @param outVertexBuffer Reference to hold a Vector of floats. This method will assign it with new floats as needed.\n\t\t// @param clipping Pointer to a SkeletonClipping instance or NULL. If a clipper is given, clipping attachments will be taken into account.\n        void getBounds(float &outX, float &outY, float &outWidth, float &outHeight, Vector<float> &outVertexBuffer);\n\t\tvoid getBounds(float &outX, float &outY, float &outWidth, float &outHeight, Vector<float> &outVertexBuffer, SkeletonClipping *clipper);\n\n\t\tBone *getRootBone();\n\n\t\tSkeletonData *getData();\n\n\t\tVector<Bone *> &getBones();\n\n\t\tVector<Updatable *> &getUpdateCacheList();\n\n\t\tVector<Slot *> &getSlots();\n\n\t\tVector<Slot *> &getDrawOrder();\n\n\t\tVector<IkConstraint *> &getIkConstraints();\n\n\t\tVector<PathConstraint *> &getPathConstraints();\n\n\t\tVector<TransformConstraint *> &getTransformConstraints();\n\n        Vector<PhysicsConstraint *> &getPhysicsConstraints();\n\n\t\tSkin *getSkin();\n\n\t\tColor &getColor();\n\n\t\tvoid setPosition(float x, float y);\n\n\t\tfloat getX();\n\n\t\tvoid setX(float inValue);\n\n\t\tfloat getY();\n\n\t\tvoid setY(float inValue);\n\n\t\tfloat getScaleX();\n\n\t\tvoid setScaleX(float inValue);\n\n\t\tfloat getScaleY();\n\n\t\tvoid setScaleY(float inValue);\n\n        float getTime();\n\n        void setTime(float time);\n\n        void update(float delta);\n\n        /// Rotates the physics constraint so next {@link #update(Physics)} forces are applied as if the bone rotated around the\n\t    /// specified point in world space.\n        void physicsTranslate(float x, float y);\n\n        /// Calls {@link PhysicsConstraint#rotate(float, float, float)} for each physics constraint. */\n        void physicsRotate(float x, float y, float degrees);\n\n\tprivate:\n\t\tSkeletonData *_data;\n\t\tVector<Bone *> _bones;\n\t\tVector<Slot *> _slots;\n\t\tVector<Slot *> _drawOrder;\n\t\tVector<IkConstraint *> _ikConstraints;\n\t\tVector<TransformConstraint *> _transformConstraints;\n\t\tVector<PathConstraint *> _pathConstraints;\n        Vector<PhysicsConstraint *> _physicsConstraints;\n\t\tVector<Updatable *> _updateCache;\n\t\tSkin *_skin;\n\t\tColor _color;\n\t\tfloat _scaleX, _scaleY;\n\t\tfloat _x, _y;\n        float _time;\n\n\t\tvoid sortIkConstraint(IkConstraint *constraint);\n\n\t\tvoid sortPathConstraint(PathConstraint *constraint);\n\n        void sortPhysicsConstraint(PhysicsConstraint *constraint);\n\n\t\tvoid sortTransformConstraint(TransformConstraint *constraint);\n\n\t\tvoid sortPathConstraintAttachment(Skin *skin, size_t slotIndex, Bone &slotBone);\n\n\t\tvoid sortPathConstraintAttachment(Attachment *attachment, Bone &slotBone);\n\n\t\tvoid sortBone(Bone *bone);\n\n\t\tstatic void sortReset(Vector<Bone *> &bones);\n\t};\n}\n\n#endif /* Spine_Skeleton_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SkeletonBinary.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_SkeletonBinary_h\n#define Spine_SkeletonBinary_h\n\n#include <spine/Inherit.h>\n#include <spine/Vector.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/Color.h>\n\nnamespace spine {\n\tclass SkeletonData;\n\n\tclass Atlas;\n\n\tclass AttachmentLoader;\n\n\tclass LinkedMesh;\n\n\tclass Skin;\n\n\tclass Attachment;\n\n\tclass VertexAttachment;\n\n\tclass Animation;\n\n\tclass Timeline;\n\n\tclass CurveTimeline;\n\n\tclass CurveTimeline1;\n\n\tclass CurveTimeline2;\n\n\tclass Sequence;\n\n\tclass SP_API SkeletonBinary : public SpineObject {\n\tpublic:\n\t\tstatic const int BONE_ROTATE = 0;\n\t\tstatic const int BONE_TRANSLATE = 1;\n\t\tstatic const int BONE_TRANSLATEX = 2;\n\t\tstatic const int BONE_TRANSLATEY = 3;\n\t\tstatic const int BONE_SCALE = 4;\n\t\tstatic const int BONE_SCALEX = 5;\n\t\tstatic const int BONE_SCALEY = 6;\n\t\tstatic const int BONE_SHEAR = 7;\n\t\tstatic const int BONE_SHEARX = 8;\n\t\tstatic const int BONE_SHEARY = 9;\n        static const int BONE_INHERIT = 10;\n\n\t\tstatic const int SLOT_ATTACHMENT = 0;\n\t\tstatic const int SLOT_RGBA = 1;\n\t\tstatic const int SLOT_RGB = 2;\n\t\tstatic const int SLOT_RGBA2 = 3;\n\t\tstatic const int SLOT_RGB2 = 4;\n\t\tstatic const int SLOT_ALPHA = 5;\n\n\t\tstatic const int ATTACHMENT_DEFORM = 0;\n\t\tstatic const int ATTACHMENT_SEQUENCE = 1;\n\n\t\tstatic const int PATH_POSITION = 0;\n\t\tstatic const int PATH_SPACING = 1;\n\t\tstatic const int PATH_MIX = 2;\n\n        static const int PHYSICS_INERTIA = 0;\n        static const int PHYSICS_STRENGTH = 1;\n        static const int PHYSICS_DAMPING = 2;\n        static const int PHYSICS_MASS = 4;\n        static const int PHYSICS_WIND = 5;\n        static const int PHYSICS_GRAVITY = 6;\n        static const int PHYSICS_MIX = 7;\n        static const int PHYSICS_RESET = 8;\n\n\t\tstatic const int CURVE_LINEAR = 0;\n\t\tstatic const int CURVE_STEPPED = 1;\n\t\tstatic const int CURVE_BEZIER = 2;\n\n\t\texplicit SkeletonBinary(Atlas *atlasArray);\n\n\t\texplicit SkeletonBinary(AttachmentLoader *attachmentLoader, bool ownsLoader = false);\n\n\t\t~SkeletonBinary();\n\n\t\tSkeletonData *readSkeletonData(const unsigned char *binary, int length);\n\n\t\tSkeletonData *readSkeletonDataFile(const String &path);\n\n\t\tvoid setScale(float scale) { _scale = scale; }\n\n\t\tString &getError() { return _error; }\n\n\tprivate:\n\t\tstruct DataInput : public SpineObject {\n\t\t\tconst unsigned char *cursor;\n\t\t\tconst unsigned char *end;\n\t\t};\n\n\t\tAttachmentLoader *_attachmentLoader;\n\t\tVector<LinkedMesh *> _linkedMeshes;\n\t\tString _error;\n\t\tfloat _scale;\n\t\tconst bool _ownsLoader;\n\n\t\tvoid setError(const char *value1, const char *value2);\n\n\t\tchar *readString(DataInput *input);\n\n\t\tchar *readStringRef(DataInput *input, SkeletonData *skeletonData);\n\n\t\tfloat readFloat(DataInput *input);\n\n\t\tunsigned char readByte(DataInput *input);\n\n\t\tsigned char readSByte(DataInput *input);\n\n\t\tbool readBoolean(DataInput *input);\n\n\t\tint readInt(DataInput *input);\n\n\t\tvoid readColor(DataInput *input, Color &color);\n\n\t\tint readVarint(DataInput *input, bool optimizePositive);\n\n\t\tSkin *readSkin(DataInput *input, bool defaultSkin, SkeletonData *skeletonData, bool nonessential);\n\n\t\tSequence *readSequence(DataInput *input);\n\n\t\tAttachment *readAttachment(DataInput *input, Skin *skin, int slotIndex, const String &attachmentName,\n\t\t\t\t\t\t\t\t   SkeletonData *skeletonData, bool nonessential);\n\n\t\tint readVertices(DataInput *input, Vector<float> &vertices, Vector<int> &bones, bool weighted);\n\n\t\tvoid readFloatArray(DataInput *input, int n, float scale, Vector<float> &array);\n\n\t\tvoid readShortArray(DataInput *input, Vector<unsigned short> &array, int n);\n\n\t\tAnimation *readAnimation(const String &name, DataInput *input, SkeletonData *skeletonData);\n\n\t\tvoid\n\t\tsetBezier(DataInput *input, CurveTimeline *timeline, int bezier, int frame, int value, float time1, float time2,\n\t\t\t\t  float value1, float value2, float scale);\n\n\t\tvoid readTimeline(DataInput *input, Vector<Timeline*> &timelines, CurveTimeline1 *timeline, float scale);\n\n\t\tvoid readTimeline2(DataInput *input, Vector<Timeline*> &timelines, CurveTimeline2 *timeline, float scale);\n\t};\n}\n\n#endif /* Spine_SkeletonBinary_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SkeletonBounds.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_SkeletonBounds_h\n#define Spine_SkeletonBounds_h\n\n#include <spine/Vector.h>\n#include <spine/Pool.h>\n#include <spine/SpineObject.h>\n\nnamespace spine {\n\tclass Skeleton;\n\n\tclass BoundingBoxAttachment;\n\n\tclass Polygon;\n\n\t/// Collects each BoundingBoxAttachment that is visible and computes the world vertices for its polygon.\n\t/// The polygon vertices are provided along with convenience methods for doing hit detection.\n\tclass SP_API SkeletonBounds : public SpineObject {\n\tpublic:\n\t\tSkeletonBounds();\n\n\t\t~SkeletonBounds();\n\n\t\t/// Clears any previous polygons, finds all visible bounding box attachments,\n\t\t/// and computes the world vertices for each bounding box's polygon.\n\t\t/// @param skeleton The skeleton.\n\t\t/// @param updateAabb\n\t\t/// If true, the axis aligned bounding box containing all the polygons is computed.\n\t\t/// If false, the SkeletonBounds AABB methods will always return true.\n\t\t///\n\t\tvoid update(Skeleton &skeleton, bool updateAabb);\n\n\t\t/// Returns true if the axis aligned bounding box contains the point.\n\t\tbool aabbcontainsPoint(float x, float y);\n\n\t\t/// Returns true if the axis aligned bounding box intersects the line segment.\n\t\tbool aabbintersectsSegment(float x1, float y1, float x2, float y2);\n\n\t\t/// Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds.\n\t\tbool aabbIntersectsSkeleton(SkeletonBounds &bounds);\n\n\t\t/// Returns true if the polygon contains the point.\n\t\tbool containsPoint(Polygon *polygon, float x, float y);\n\n\t\t/// Returns the first bounding box attachment that contains the point, or NULL. When doing many checks, it is usually more\n\t\t/// efficient to only call this method if {@link #aabbcontainsPoint(float, float)} returns true.\n\t\tBoundingBoxAttachment *containsPoint(float x, float y);\n\n\t\t/// Returns the first bounding box attachment that contains the line segment, or NULL. When doing many checks, it is usually\n\t\t/// more efficient to only call this method if {@link #aabbintersectsSegment(float, float, float, float)} returns true.\n\t\tBoundingBoxAttachment *intersectsSegment(float x1, float y1, float x2, float y2);\n\n\t\t/// Returns true if the polygon contains the line segment.\n\t\tbool intersectsSegment(Polygon *polygon, float x1, float y1, float x2, float y2);\n\n        /// Returns the polygon for the given bounding box attachment or null if no\n        /// polygon can be found for the attachment. Requires a call to update() first.\n\t\tPolygon *getPolygon(BoundingBoxAttachment *attachment);\n\n        /// Returns the bounding box for the given polygon or null. Requires a call to update() first.\n        BoundingBoxAttachment * getBoundingBox(Polygon *polygon);\n\n        /// Returns all polygons or an empty vector. Requires a call to update() first.\n        Vector<Polygon *> &getPolygons();\n\n        /// Returns all bounding boxes. Requires a call to update() first.\n        Vector<BoundingBoxAttachment *> &getBoundingBoxes();\n\n\t\tfloat getWidth();\n\n\t\tfloat getHeight();\n\n\tprivate:\n\t\tPool <Polygon> _polygonPool;\n\t\tVector<BoundingBoxAttachment *> _boundingBoxes;\n\t\tVector<Polygon *> _polygons;\n\t\tfloat _minX, _minY, _maxX, _maxY;\n\n\t\tvoid aabbCompute();\n\t};\n\n\tclass Polygon : public SpineObject {\n\tpublic:\n\t\tVector<float> _vertices;\n\t\tint _count;\n\n\t\tPolygon() : _count(0) {\n\t\t\t_vertices.ensureCapacity(16);\n\t\t}\n\t};\n}\n\n#endif /* Spine_SkeletonBounds_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SkeletonClipping.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_SkeletonClipping_h\n#define Spine_SkeletonClipping_h\n\n#include <spine/Vector.h>\n#include <spine/Triangulator.h>\n\nnamespace spine {\n\tclass Slot;\n\n\tclass ClippingAttachment;\n\n\tclass SP_API SkeletonClipping : public SpineObject {\n\tpublic:\n\t\tSkeletonClipping();\n\n\t\tsize_t clipStart(Slot &slot, ClippingAttachment *clip);\n\n\t\tvoid clipEnd(Slot &slot);\n\n\t\tvoid clipEnd();\n\n        void\n        clipTriangles(float *vertices, unsigned short *triangles, size_t trianglesLength);\n\n\t\tvoid\n\t\tclipTriangles(float *vertices, unsigned short *triangles, size_t trianglesLength, float *uvs, size_t stride);\n\n\t\tvoid\n\t\tclipTriangles(Vector<float> &vertices, Vector<unsigned short> &triangles, Vector<float> &uvs, size_t stride);\n\n\t\tbool isClipping();\n\n\t\tVector<float> &getClippedVertices();\n\n\t\tVector<unsigned short> &getClippedTriangles();\n\n\t\tVector<float> &getClippedUVs();\n\n\tprivate:\n\t\tTriangulator _triangulator;\n\t\tVector<float> _clippingPolygon;\n\t\tVector<float> _clipOutput;\n\t\tVector<float> _clippedVertices;\n\t\tVector<unsigned short> _clippedTriangles;\n\t\tVector<float> _clippedUVs;\n\t\tVector<float> _scratch;\n\t\tClippingAttachment *_clipAttachment;\n\t\tVector<Vector<float> *> *_clippingPolygons;\n\n\t\t/** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping\n\t\t  * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */\n\t\tbool clip(float x1, float y1, float x2, float y2, float x3, float y3, Vector<float> *clippingArea,\n\t\t\t\t  Vector<float> *output);\n\n\t\tstatic void makeClockwise(Vector<float> &polygon);\n\t};\n}\n\n#endif /* Spine_SkeletonClipping_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SkeletonData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_SkeletonData_h\n#define Spine_SkeletonData_h\n\n#include <spine/Vector.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n\tclass BoneData;\n\n\tclass SlotData;\n\n\tclass Skin;\n\n\tclass EventData;\n\n\tclass Animation;\n\n\tclass IkConstraintData;\n\n\tclass TransformConstraintData;\n\n\tclass PathConstraintData;\n\n    class PhysicsConstraintData;\n\n/// Stores the setup pose and all of the stateless data for a skeleton.\n\tclass SP_API SkeletonData : public SpineObject {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class Skeleton;\n\n\tpublic:\n\t\tSkeletonData();\n\n\t\t~SkeletonData();\n\n\t\t/// Finds a bone by comparing each bone's name.\n\t\t/// It is more efficient to cache the results of this method than to call it multiple times.\n\t\t/// @return May be NULL.\n\t\tBoneData *findBone(const String &boneName);\n\n\t\t/// @return May be NULL.\n\t\tSlotData *findSlot(const String &slotName);\n\n\t\t/// @return May be NULL.\n\t\tSkin *findSkin(const String &skinName);\n\n\t\t/// @return May be NULL.\n\t\tspine::EventData *findEvent(const String &eventDataName);\n\n\t\t/// @return May be NULL.\n\t\tAnimation *findAnimation(const String &animationName);\n\n\t\t/// @return May be NULL.\n\t\tIkConstraintData *findIkConstraint(const String &constraintName);\n\n\t\t/// @return May be NULL.\n\t\tTransformConstraintData *findTransformConstraint(const String &constraintName);\n\n\t\t/// @return May be NULL.\n\t\tPathConstraintData *findPathConstraint(const String &constraintName);\n\n        /// @return May be NULL.\n        PhysicsConstraintData *findPhysicsConstraint(const String &constraintName);\n\n\t\tconst String &getName();\n\n\t\tvoid setName(const String &inValue);\n\n\t\t/// The skeleton's bones, sorted parent first. The root bone is always the first bone.\n\t\tVector<BoneData *> &getBones();\n\n\t\tVector<SlotData *> &getSlots();\n\n\t\t/// All skins, including the default skin.\n\t\tVector<Skin *> &getSkins();\n\n\t\t/// The skeleton's default skin.\n\t\t/// By default this skin contains all attachments that were not in a skin in Spine.\n\t\t/// @return May be NULL.\n\t\tSkin *getDefaultSkin();\n\n\t\tvoid setDefaultSkin(Skin *inValue);\n\n\t\tVector<spine::EventData *> &getEvents();\n\n\t\tVector<Animation *> &getAnimations();\n\n\t\tVector<IkConstraintData *> &getIkConstraints();\n\n\t\tVector<TransformConstraintData *> &getTransformConstraints();\n\n\t\tVector<PathConstraintData *> &getPathConstraints();\n\n        Vector<PhysicsConstraintData *> &getPhysicsConstraints();\n\n\t\tfloat getX();\n\n\t\tvoid setX(float inValue);\n\n\t\tfloat getY();\n\n\t\tvoid setY(float inValue);\n\n\t\tfloat getWidth();\n\n\t\tvoid setWidth(float inValue);\n\n\t\tfloat getHeight();\n\n\t\tvoid setHeight(float inValue);\n\n        float getReferenceScale();\n\n        void setReferenceScale(float inValue);\n\n\t\t/// The Spine version used to export this data, or NULL.\n\t\tconst String &getVersion();\n\n\t\tvoid setVersion(const String &inValue);\n\n\t\tconst String &getHash();\n\n\t\tvoid setHash(const String &inValue);\n\n\t\tconst String &getImagesPath();\n\n\t\tvoid setImagesPath(const String &inValue);\n\n\t\tconst String &getAudioPath();\n\n\t\tvoid setAudioPath(const String &inValue);\n\n\t\t/// The dopesheet FPS in Spine. Available only when nonessential data was exported.\n\t\tfloat getFps();\n\n\t\tvoid setFps(float inValue);\n\n\tprivate:\n\t\tString _name;\n\t\tVector<BoneData *> _bones; // Ordered parents first\n\t\tVector<SlotData *> _slots; // Setup pose draw order.\n\t\tVector<Skin *> _skins;\n\t\tSkin *_defaultSkin;\n\t\tVector<EventData *> _events;\n\t\tVector<Animation *> _animations;\n\t\tVector<IkConstraintData *> _ikConstraints;\n\t\tVector<TransformConstraintData *> _transformConstraints;\n\t\tVector<PathConstraintData *> _pathConstraints;\n        Vector<PhysicsConstraintData *> _physicsConstraints;\n\t\tfloat _x, _y, _width, _height;\n        float _referenceScale;\n\t\tString _version;\n\t\tString _hash;\n\t\tVector<char *> _strings;\n\n\t\t// Nonessential.\n\t\tfloat _fps;\n\t\tString _imagesPath;\n\t\tString _audioPath;\n\t};\n}\n\n#endif /* Spine_SkeletonData_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SkeletonJson.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_SkeletonJson_h\n#define Spine_SkeletonJson_h\n\n#include <spine/Vector.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n\tclass Timeline;\n\n\tclass CurveTimeline;\n\n\tclass CurveTimeline1;\n\n\tclass CurveTimeline2;\n\n\tclass VertexAttachment;\n\n\tclass Animation;\n\n\tclass Json;\n\n\tclass SkeletonData;\n\n\tclass Atlas;\n\n\tclass AttachmentLoader;\n\n\tclass LinkedMesh;\n\n\tclass String;\n\n\tclass Sequence;\n\n\tclass SP_API SkeletonJson : public SpineObject {\n\tpublic:\n\t\texplicit SkeletonJson(Atlas *atlas);\n\n\t\texplicit SkeletonJson(AttachmentLoader *attachmentLoader, bool ownsLoader = false);\n\n\t\t~SkeletonJson();\n\n\t\tSkeletonData *readSkeletonDataFile(const String &path);\n\n\t\tSkeletonData *readSkeletonData(const char *json);\n\n\t\tvoid setScale(float scale) { _scale = scale; }\n\n\t\tString &getError() { return _error; }\n\n\tprivate:\n\t\tAttachmentLoader *_attachmentLoader;\n\t\tVector<LinkedMesh *> _linkedMeshes;\n\t\tfloat _scale;\n\t\tconst bool _ownsLoader;\n\t\tString _error;\n\n\t\tstatic Sequence *readSequence(Json *sequence);\n\n\t\tstatic void\n\t\tsetBezier(CurveTimeline *timeline, int frame, int value, int bezier, float time1, float value1, float cx1,\n\t\t\t\t  float cy1,\n\t\t\t\t  float cx2, float cy2, float time2, float value2);\n\n\t\tstatic int\n\t\treadCurve(Json *curve, CurveTimeline *timeline, int bezier, int frame, int value, float time1, float time2,\n\t\t\t\t  float value1, float value2, float scale);\n\n\t\tstatic Timeline *readTimeline(Json *keyMap, CurveTimeline1 *timeline, float defaultValue, float scale);\n\n\t\tstatic Timeline *\n\t\treadTimeline(Json *keyMap, CurveTimeline2 *timeline, const char *name1, const char *name2, float defaultValue,\n\t\t\t\t\t float scale);\n\n\t\tAnimation *readAnimation(Json *root, SkeletonData *skeletonData);\n\n\t\tvoid readVertices(Json *attachmentMap, VertexAttachment *attachment, size_t verticesLength);\n\n\t\tvoid setError(Json *root, const String &value1, const String &value2);\n\n\t\tint findSlotIndex(SkeletonData *skeletonData, const String &slotName, Vector<Timeline *> timelines);\n\t};\n}\n\n#endif /* Spine_SkeletonJson_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SkeletonRenderer.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n#ifndef Spine_SkeletonRenderer_h\n#define Spine_SkeletonRenderer_h\n\n#include <spine/BlockAllocator.h>\n#include <spine/BlendMode.h>\n#include <spine/SkeletonClipping.h>\n\nnamespace spine {\n    class Skeleton;\n\n    struct SP_API RenderCommand {\n        float *positions;\n        float *uvs;\n        uint32_t *colors;\n        uint32_t *darkColors;\n        int32_t numVertices;\n        uint16_t *indices;\n        int32_t numIndices;\n        BlendMode blendMode;\n        void *texture;\n        RenderCommand *next;\n    };\n\n    class SP_API SkeletonRenderer: public SpineObject {\n    public:\n        explicit SkeletonRenderer();\n\n        ~SkeletonRenderer();\n\n        RenderCommand *render(Skeleton &skeleton);\n    private:\n        BlockAllocator _allocator;\n        Vector<float> _worldVertices;\n        Vector<unsigned short> _quadIndices;\n        SkeletonClipping _clipping;\n        Vector<RenderCommand *> _renderCommands;\n    };\n}\n\n#endif"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Skin.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Skin_h\n#define Spine_Skin_h\n\n#include <spine/Vector.h>\n#include <spine/SpineString.h>\n#include <spine/Color.h>\n\nnamespace spine {\n\tclass Attachment;\n\n\tclass Skeleton;\n\n\tclass BoneData;\n\n\tclass ConstraintData;\n\n/// Stores attachments by slot index and attachment name.\n/// See SkeletonData::getDefaultSkin, Skeleton::getSkin, and\n/// http://esotericsoftware.com/spine-runtime-skins in the Spine Runtimes Guide.\n\tclass SP_API Skin : public SpineObject {\n\t\tfriend class Skeleton;\n\n\tpublic:\n\t\tclass SP_API AttachmentMap : public SpineObject {\n\t\t\tfriend class Skin;\n\n\t\tpublic:\n\t\t\tstruct SP_API Entry {\n\t\t\t\tsize_t _slotIndex;\n\t\t\t\tString _name;\n\t\t\t\tAttachment *_attachment;\n\n\t\t\t\tEntry(size_t slotIndex, const String &name, Attachment *attachment) :\n\t\t\t\t\t\t_slotIndex(slotIndex),\n\t\t\t\t\t\t_name(name),\n\t\t\t\t\t\t_attachment(attachment) {\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tclass SP_API Entries {\n\t\t\t\tfriend class AttachmentMap;\n\n\t\t\tpublic:\n\t\t\t\tbool hasNext() {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tif (_slotIndex >= _buckets.size()) return false;\n\t\t\t\t\t\tif (_bucketIndex >= _buckets[_slotIndex].size()) {\n\t\t\t\t\t\t\t_bucketIndex = 0;\n\t\t\t\t\t\t\t++_slotIndex;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tEntry &next() {\n\t\t\t\t\tEntry &result = _buckets[_slotIndex][_bucketIndex];\n\t\t\t\t\t++_bucketIndex;\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\tprotected:\n\t\t\t\tEntries(Vector <Vector<Entry>> &buckets) : _buckets(buckets), _slotIndex(0), _bucketIndex(0) {\n\t\t\t\t}\n\n\t\t\tprivate:\n\t\t\t\tVector <Vector<Entry>> &_buckets;\n\t\t\t\tsize_t _slotIndex;\n\t\t\t\tsize_t _bucketIndex;\n\t\t\t};\n\n\t\t\tvoid put(size_t slotIndex, const String &attachmentName, Attachment *attachment);\n\n\t\t\tAttachment *get(size_t slotIndex, const String &attachmentName);\n\n\t\t\tvoid remove(size_t slotIndex, const String &attachmentName);\n\n\t\t\tEntries getEntries();\n\n\t\tprotected:\n\t\t\tAttachmentMap();\n\n\t\tprivate:\n\n\t\t\tint findInBucket(Vector <Entry> &, const String &attachmentName);\n\n\t\t\tVector <Vector<Entry>> _buckets;\n\t\t};\n\n\t\texplicit Skin(const String &name);\n\n\t\t~Skin();\n\n\t\t/// Adds an attachment to the skin for the specified slot index and name.\n\t\t/// If the name already exists for the slot, the previous value is replaced.\n\t\tvoid setAttachment(size_t slotIndex, const String &name, Attachment *attachment);\n\n\t\t/// Returns the attachment for the specified slot index and name, or NULL.\n\t\tAttachment *getAttachment(size_t slotIndex, const String &name);\n\n\t\t// Removes the attachment from the skin.\n\t\tvoid removeAttachment(size_t slotIndex, const String &name);\n\n\t\t/// Finds the skin keys for a given slot. The results are added to the passed array of names.\n\t\t/// @param slotIndex The target slotIndex. To find the slot index, use SkeletonData::findSlot and SlotData::getIndex.\n\t\t/// @param names Found skin key names will be added to this array.\n\t\tvoid findNamesForSlot(size_t slotIndex, Vector <String> &names);\n\n\t\t/// Finds the attachments for a given slot. The results are added to the passed array of Attachments.\n\t\t/// @param slotIndex The target slotIndex. To find the slot index, use SkeletonData::findSlot and SlotData::getIndex.\n\t\t/// @param attachments Found Attachments will be added to this array.\n\t\tvoid findAttachmentsForSlot(size_t slotIndex, Vector<Attachment *> &attachments);\n\n\t\tconst String &getName();\n\n\t\t/// Adds all attachments, bones, and constraints from the specified skin to this skin.\n\t\tvoid addSkin(Skin *other);\n\n\t\t/// Adds all attachments, bones, and constraints from the specified skin to this skin. Attachments are deep copied.\n\t\tvoid copySkin(Skin *other);\n\n\t\tAttachmentMap::Entries getAttachments();\n\n\t\tVector<BoneData *> &getBones();\n\n\t\tVector<ConstraintData *> &getConstraints();\n\n        Color &getColor() { return _color; }\n\n\tprivate:\n\t\tconst String _name;\n\t\tAttachmentMap _attachments;\n\t\tVector<BoneData *> _bones;\n\t\tVector<ConstraintData *> _constraints;\n        Color _color;\n\n\t\t/// Attach all attachments from this skin if the corresponding attachment from the old skin is currently attached.\n\t\tvoid attachAll(Skeleton &skeleton, Skin &oldSkin);\n\t};\n}\n\n#endif /* Spine_Skin_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Slot.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Slot_h\n#define Spine_Slot_h\n\n#include <spine/Vector.h>\n#include <spine/SpineObject.h>\n#include <spine/Color.h>\n\nnamespace spine {\n\tclass SlotData;\n\n\tclass Bone;\n\n\tclass Skeleton;\n\n\tclass Attachment;\n\n\tclass SP_API Slot : public SpineObject {\n\t\tfriend class VertexAttachment;\n\n\t\tfriend class Skeleton;\n\n\t\tfriend class SkeletonBounds;\n\n\t\tfriend class SkeletonClipping;\n\n\t\tfriend class AttachmentTimeline;\n\n\t\tfriend class RGBATimeline;\n\n\t\tfriend class RGBTimeline;\n\n\t\tfriend class AlphaTimeline;\n\n\t\tfriend class RGBA2Timeline;\n\n\t\tfriend class RGB2Timeline;\n\n\t\tfriend class DeformTimeline;\n\n\t\tfriend class DrawOrderTimeline;\n\n\t\tfriend class EventTimeline;\n\n\t\tfriend class IkConstraintTimeline;\n\n\t\tfriend class PathConstraintMixTimeline;\n\n\t\tfriend class PathConstraintPositionTimeline;\n\n\t\tfriend class PathConstraintSpacingTimeline;\n\n\t\tfriend class ScaleTimeline;\n\n\t\tfriend class ShearTimeline;\n\n\t\tfriend class TransformConstraintTimeline;\n\n\t\tfriend class TranslateTimeline;\n\n\t\tfriend class TwoColorTimeline;\n\n\tpublic:\n\t\tSlot(SlotData &data, Bone &bone);\n\n\t\tvoid setToSetupPose();\n\n\t\tSlotData &getData();\n\n\t\tBone &getBone();\n\n\t\tSkeleton &getSkeleton();\n\n\t\tColor &getColor();\n\n\t\tColor &getDarkColor();\n\n\t\tbool hasDarkColor();\n\n\t\t/// May be NULL.\n\t\tAttachment *getAttachment();\n\n\t\tvoid setAttachment(Attachment *inValue);\n\n\t\tint getAttachmentState();\n\n\t\tvoid setAttachmentState(int state);\n\n\t\tVector<float> &getDeform();\n\n\t\tint getSequenceIndex();\n\n\t\tvoid setSequenceIndex(int index);\n\n\tprivate:\n\t\tSlotData &_data;\n\t\tBone &_bone;\n\t\tSkeleton &_skeleton;\n\t\tColor _color;\n\t\tColor _darkColor;\n\t\tbool _hasDarkColor;\n\t\tAttachment *_attachment;\n\t\tint _attachmentState;\n\t\tint _sequenceIndex;\n\t\tVector<float> _deform;\n\t};\n}\n\n#endif /* Spine_Slot_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SlotData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_SlotData_h\n#define Spine_SlotData_h\n\n#include <spine/BlendMode.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/Color.h>\n\nnamespace spine {\n\tclass BoneData;\n\n\tclass SP_API SlotData : public SpineObject {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class AttachmentTimeline;\n\n\t\tfriend class RGBATimeline;\n\n\t\tfriend class RGBTimeline;\n\n\t\tfriend class AlphaTimeline;\n\n\t\tfriend class RGBA2Timeline;\n\n\t\tfriend class RGB2Timeline;\n\n\t\tfriend class DeformTimeline;\n\n\t\tfriend class DrawOrderTimeline;\n\n\t\tfriend class EventTimeline;\n\n\t\tfriend class IkConstraintTimeline;\n\n\t\tfriend class PathConstraintMixTimeline;\n\n\t\tfriend class PathConstraintPositionTimeline;\n\n\t\tfriend class PathConstraintSpacingTimeline;\n\n\t\tfriend class ScaleTimeline;\n\n\t\tfriend class ShearTimeline;\n\n\t\tfriend class TransformConstraintTimeline;\n\n\t\tfriend class TranslateTimeline;\n\n\t\tfriend class TwoColorTimeline;\n\n\tpublic:\n\t\tSlotData(int index, const String &name, BoneData &boneData);\n\n\t\tint getIndex();\n\n\t\tconst String &getName();\n\n\t\tBoneData &getBoneData();\n\n\t\tColor &getColor();\n\n\t\tColor &getDarkColor();\n\n\t\tbool hasDarkColor();\n\n\t\tvoid setHasDarkColor(bool inValue);\n\n\t\t/// May be empty.\n\t\tconst String &getAttachmentName();\n\n\t\tvoid setAttachmentName(const String &inValue);\n\n\t\tBlendMode getBlendMode();\n\n\t\tvoid setBlendMode(BlendMode inValue);\n\n        bool isVisible();\n\n        void setVisible(bool inValue);\n\n\tprivate:\n\t\tconst int _index;\n\t\tString _name;\n\t\tBoneData &_boneData;\n\t\tColor _color;\n\t\tColor _darkColor;\n\n\t\tbool _hasDarkColor;\n\t\tString _attachmentName;\n\t\tBlendMode _blendMode;\n        bool _visible;\n\t};\n}\n\n#endif /* Spine_SlotData_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SpacingMode.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_SpacingMode_h\n#define Spine_SpacingMode_h\n\nnamespace spine {\n\tenum SpacingMode {\n\t\tSpacingMode_Length = 0,\n\t\tSpacingMode_Fixed,\n\t\tSpacingMode_Percent,\n\t\tSpacingMode_Proportional\n\t};\n}\n\n#endif /* Spine_SpacingMode_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SpineObject.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Object_h\n#define Spine_Object_h\n\n#include <new>\n#include <stddef.h>\n\n#include <spine/dll.h>\n\nnamespace spine {\n\tclass String;\n\n\tclass SP_API SpineObject {\n\tpublic:\n\t\tvoid *operator new(size_t sz);\n\n\t\tvoid *operator new(size_t sz, const char *file, int line);\n\n\t\tvoid *operator new(size_t sz, void *ptr);\n\n\t\tvoid operator delete(void *p, const char *file, int line);\n\n\t\tvoid operator delete(void *p, void *mem);\n\n\t\tvoid operator delete(void *p);\n\n\t\tvirtual ~SpineObject();\n\t};\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/SpineString.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef SPINE_STRING_H\n#define SPINE_STRING_H\n\n#include <spine/SpineObject.h>\n#include <spine/Extension.h>\n\n#include <string.h>\n#include <stdio.h>\n\nnamespace spine {\n\tclass SP_API String : public SpineObject {\n\tpublic:\n\t\tString() : _length(0), _buffer(NULL), _tempowner(true) {\n\t\t}\n\n\t\tString(const char *chars, bool own = false, bool tofree = true) {\n\t\t\t_tempowner = tofree;\n\t\t\tif (!chars) {\n\t\t\t\t_length = 0;\n\t\t\t\t_buffer = NULL;\n\t\t\t} else {\n\t\t\t\t_length = strlen(chars);\n\t\t\t\tif (!own) {\n\t\t\t\t\t_buffer = SpineExtension::calloc<char>(_length + 1, __FILE__, __LINE__);\n\t\t\t\t\tmemcpy((void *) _buffer, chars, _length + 1);\n\t\t\t\t} else {\n\t\t\t\t\t_buffer = (char *) chars;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tString(const String &other) {\n\t\t\t_tempowner = true;\n\t\t\tif (!other._buffer) {\n\t\t\t\t_length = 0;\n\t\t\t\t_buffer = NULL;\n\t\t\t} else {\n\t\t\t\t_length = other._length;\n\t\t\t\t_buffer = SpineExtension::calloc<char>(other._length + 1, __FILE__, __LINE__);\n\t\t\t\tmemcpy((void *) _buffer, other._buffer, other._length + 1);\n\t\t\t}\n\t\t}\n\n\t\tsize_t length() const {\n\t\t\treturn _length;\n\t\t}\n\n\t\tbool isEmpty() const {\n\t\t\treturn _length == 0;\n\t\t}\n\n\t\tconst char *buffer() const {\n\t\t\treturn _buffer;\n\t\t}\n\n\t\tvoid own(const String &other) {\n\t\t\tif (this == &other) return;\n\t\t\tif (_buffer && _tempowner) {\n\t\t\t\tSpineExtension::free(_buffer, __FILE__, __LINE__);\n\t\t\t}\n\t\t\t_length = other._length;\n\t\t\t_buffer = other._buffer;\n\t\t\tother._length = 0;\n\t\t\tother._buffer = NULL;\n\t\t}\n\n\t\tvoid own(const char *chars) {\n\t\t\tif (_buffer == chars) return;\n\t\t\tif (_buffer && _tempowner) {\n\t\t\t\tSpineExtension::free(_buffer, __FILE__, __LINE__);\n\t\t\t}\n\n\t\t\tif (!chars) {\n\t\t\t\t_length = 0;\n\t\t\t\t_buffer = NULL;\n\t\t\t} else {\n\t\t\t\t_length = strlen(chars);\n\t\t\t\t_buffer = (char *) chars;\n\t\t\t}\n\t\t}\n\n\t\tvoid unown() {\n\t\t\t_length = 0;\n\t\t\t_buffer = NULL;\n\t\t}\n\n\t\tString &operator=(const String &other) {\n\t\t\tif (this == &other) return *this;\n\t\t\tif (_buffer && _tempowner) {\n\t\t\t\tSpineExtension::free(_buffer, __FILE__, __LINE__);\n\t\t\t}\n\t\t\tif (!other._buffer) {\n\t\t\t\t_length = 0;\n\t\t\t\t_buffer = NULL;\n\t\t\t} else {\n\t\t\t\t_length = other._length;\n\t\t\t\t_buffer = SpineExtension::calloc<char>(other._length + 1, __FILE__, __LINE__);\n\t\t\t\tmemcpy((void *) _buffer, other._buffer, other._length + 1);\n\t\t\t}\n\t\t\treturn *this;\n\t\t}\n\n\t\tString &operator=(const char *chars) {\n\t\t\tif (_buffer == chars) return *this;\n\t\t\tif (_buffer && _tempowner) {\n\t\t\t\tSpineExtension::free(_buffer, __FILE__, __LINE__);\n\t\t\t}\n\t\t\tif (!chars) {\n\t\t\t\t_length = 0;\n\t\t\t\t_buffer = NULL;\n\t\t\t} else {\n\t\t\t\t_length = strlen(chars);\n\t\t\t\t_buffer = SpineExtension::calloc<char>(_length + 1, __FILE__, __LINE__);\n\t\t\t\tmemcpy((void *) _buffer, chars, _length + 1);\n\t\t\t}\n\t\t\treturn *this;\n\t\t}\n\n\t\tString &append(const char *chars) {\n\t\t\tsize_t len = strlen(chars);\n\t\t\tsize_t thisLen = _length;\n\t\t\t_length = _length + len;\n\t\t\tbool same = chars == _buffer;\n\t\t\t_buffer = SpineExtension::realloc(_buffer, _length + 1, __FILE__, __LINE__);\n\t\t\tmemcpy((void *) (_buffer + thisLen), (void *) (same ? _buffer : chars), len + 1);\n\t\t\treturn *this;\n\t\t}\n\n\t\tString &append(const String &other) {\n\t\t\tsize_t len = other.length();\n\t\t\tsize_t thisLen = _length;\n\t\t\t_length = _length + len;\n\t\t\tbool same = other._buffer == _buffer;\n\t\t\t_buffer = SpineExtension::realloc(_buffer, _length + 1, __FILE__, __LINE__);\n\t\t\tmemcpy((void *) (_buffer + thisLen), (void *) (same ? _buffer : other._buffer), len + 1);\n\t\t\treturn *this;\n\t\t}\n\n\t\tString &append(int other) {\n\t\t\tchar str[100];\n\t\t\tsnprintf(str, 100, \"%i\", other);\n\t\t\tappend(str);\n\t\t\treturn *this;\n\t\t}\n\n\t\tString &append(float other) {\n\t\t\tchar str[100];\n\t\t\tsnprintf(str, 100, \"%f\", other);\n\t\t\tappend(str);\n\t\t\treturn *this;\n\t\t}\n\n\t\tbool startsWith(const String &needle) const {\n\t\t\tif (needle.length() > length()) return false;\n\t\t\tfor (int i = 0; i < (int)needle.length(); i++) {\n\t\t\t\tif (buffer()[i] != needle.buffer()[i]) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n        int lastIndexOf(const char c) const {\n            for (int i = (int)length() - 1; i >= 0; i--) {\n                if (buffer()[i] == c) return i;\n            }\n            return -1;\n        }\n\n        String substring(int startIndex, int length) const {\n            if (startIndex < 0 || startIndex >= (int)_length || length < 0 || startIndex + length > (int)_length) {\n                return String();\n            }\n            char* subStr = SpineExtension::calloc<char>(length + 1, __FILE__, __LINE__);\n            memcpy(subStr, _buffer + startIndex, length);\n            subStr[length] = '\\0';\n            return String(subStr, true, true);\n        }\n\n        String substring(int startIndex) const {\n            if (startIndex < 0 || startIndex >= (int)_length) {\n                return String();\n            }\n            int length = (int)_length - startIndex;\n            char* subStr = SpineExtension::calloc<char>(length + 1, __FILE__, __LINE__);\n            memcpy(subStr, _buffer + startIndex, length);\n            subStr[length] = '\\0';\n            return String(subStr, true, true);\n        }\n\n\t\tfriend bool operator==(const String &a, const String &b) {\n\t\t\tif (a._buffer == b._buffer) return true;\n\t\t\tif (a._length != b._length) return false;\n\t\t\tif (a._buffer && b._buffer) {\n\t\t\t\treturn strcmp(a._buffer, b._buffer) == 0;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfriend bool operator!=(const String &a, const String &b) {\n\t\t\treturn !(a == b);\n\t\t}\n\n\t\t~String() {\n\t\t\tif (_buffer && _tempowner) {\n\t\t\t\tSpineExtension::free(_buffer, __FILE__, __LINE__);\n\t\t\t}\n\t\t}\n\n\tprivate:\n\t\tmutable size_t _length;\n\t\tmutable char *_buffer;\n\t\tmutable bool _tempowner;\n\t};\n}\n\n\n#endif //SPINE_STRING_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/TextureLoader.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_TextureLoader_h\n#define Spine_TextureLoader_h\n\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n\nnamespace spine {\n\tclass AtlasPage;\n\n\tclass SP_API TextureLoader : public SpineObject {\n\tpublic:\n\t\tTextureLoader();\n\n\t\tvirtual ~TextureLoader();\n\n\t\tvirtual void load(AtlasPage &page, const String &path) = 0;\n\n\t\tvirtual void unload(void *texture) = 0;\n\t};\n}\n\n#endif /* Spine_TextureLoader_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/TextureRegion.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_TextureRegion_h\n#define Spine_TextureRegion_h\n\n#include <spine/Vector.h>\n\nnamespace spine {\n\tclass SP_API TextureRegion : public SpineObject {\n\tpublic:\n\t\tvoid *rendererObject;\n\t\tfloat u, v, u2, v2;\n\t\tint degrees;\n\t\tfloat offsetX, offsetY;\n\t\tint width, height;\n\t\tint originalWidth, originalHeight;\n\n\t\tTextureRegion(): rendererObject(NULL), u(0), v(0), u2(0), v2(0), degrees(0), offsetX(0), offsetY(0), width(0), height(0), originalWidth(0), originalHeight(0) {};\n\t\t~TextureRegion() {};\n\t};\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Timeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Timeline_h\n#define Spine_Timeline_h\n\n#include <spine/RTTI.h>\n#include <spine/Vector.h>\n#include <spine/MixBlend.h>\n#include <spine/MixDirection.h>\n#include <spine/SpineObject.h>\n#include <spine/Property.h>\n\nnamespace spine {\n\tclass Skeleton;\n\n\tclass Event;\n\n\tclass SP_API Timeline : public SpineObject {\n\tRTTI_DECL\n\n\tpublic:\n\t\tTimeline(size_t frameCount, size_t frameEntries);\n\n\t\tvirtual ~Timeline();\n\n\t\t/// Sets the value(s) for the specified time.\n\t\t/// @param skeleton The skeleton the timeline is being applied to. This provides access to the bones, slots, and other skeleton components the timeline may change.\n\t\t/// @param lastTime lastTime The time this timeline was last applied. Timelines such as EventTimeline trigger only at specific times rather than every frame. In that case, the timeline triggers everything between lastTime (exclusive) and time (inclusive).\n\t\t/// @param time The time within the animation. Most timelines find the key before and the key after this time so they can interpolate between the keys.\n\t\t/// @param pEvents If any events are fired, they are added to this array. Can be NULL to ignore firing events or if the timeline does not fire events. May be NULL.\n\t\t/// @param alpha alpha 0 applies the current or setup pose value (depending on pose parameter). 1 applies the timeline\n\t\t///\tvalue. Between 0 and 1 applies a value between the current or setup pose and the timeline value. By adjusting alpha over\n\t\t///\ttime, an animation can be mixed in or out. alpha can also be useful to apply animations on top of each other (layered).\n\t\t/// @param blend Controls how mixing is applied when alpha is than 1.\n\t\t/// @param direction Indicates whether the timeline is mixing in or out. Used by timelines which perform instant transitions such as DrawOrderTimeline and AttachmentTimeline.\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction) = 0;\n\n\t\tsize_t getFrameEntries();\n\n\t\tsize_t getFrameCount();\n\n\t\tVector<float> &getFrames();\n\n\t\tfloat getDuration();\n\n\t\tvirtual Vector <PropertyId> &getPropertyIds();\n\n\tprotected:\n\t\tvoid setPropertyIds(PropertyId propertyIds[], size_t propertyIdsCount);\n\n        Vector <PropertyId> _propertyIds;\n\t\tVector<float> _frames;\n\t\tsize_t _frameEntries;\n\t};\n}\n\n#endif /* Spine_Timeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/TransformConstraint.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_TransformConstraint_h\n#define Spine_TransformConstraint_h\n\n#include <spine/ConstraintData.h>\n\n#include <spine/Vector.h>\n\nnamespace spine {\n\tclass TransformConstraintData;\n\n\tclass Skeleton;\n\n\tclass Bone;\n\n\tclass SP_API TransformConstraint : public Updatable {\n\t\tfriend class Skeleton;\n\n\t\tfriend class TransformConstraintTimeline;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\tTransformConstraint(TransformConstraintData &data, Skeleton &skeleton);\n\n\t\tvirtual void update(Physics physics);\n\n\t\tvirtual int getOrder();\n\n\t\tTransformConstraintData &getData();\n\n\t\tVector<Bone *> &getBones();\n\n\t\tBone *getTarget();\n\n\t\tvoid setTarget(Bone *inValue);\n\n\t\tfloat getMixRotate();\n\n\t\tvoid setMixRotate(float inValue);\n\n\t\tfloat getMixX();\n\n\t\tvoid setMixX(float inValue);\n\n\t\tfloat getMixY();\n\n\t\tvoid setMixY(float inValue);\n\n\t\tfloat getMixScaleX();\n\n\t\tvoid setMixScaleX(float inValue);\n\n\t\tfloat getMixScaleY();\n\n\t\tvoid setMixScaleY(float inValue);\n\n\t\tfloat getMixShearY();\n\n\t\tvoid setMixShearY(float inValue);\n\n\t\tbool isActive();\n\n\t\tvoid setActive(bool inValue);\n\n        void setToSetupPose();\n\n\tprivate:\n\t\tTransformConstraintData &_data;\n\t\tVector<Bone *> _bones;\n\t\tBone *_target;\n\t\tfloat _mixRotate, _mixX, _mixY, _mixScaleX, _mixScaleY, _mixShearY;\n\t\tbool _active;\n\n\t\tvoid applyAbsoluteWorld();\n\n\t\tvoid applyRelativeWorld();\n\n\t\tvoid applyAbsoluteLocal();\n\n\t\tvoid applyRelativeLocal();\n\t};\n}\n\n#endif /* Spine_TransformConstraint_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/TransformConstraintData.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_TransformConstraintData_h\n#define Spine_TransformConstraintData_h\n\n#include <spine/Vector.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/ConstraintData.h>\n\nnamespace spine {\n\tclass BoneData;\n\n\tclass SP_API TransformConstraintData : public ConstraintData {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class TransformConstraint;\n\n\t\tfriend class Skeleton;\n\n\t\tfriend class TransformConstraintTimeline;\n\n\tpublic:\n\t\tRTTI_DECL\n\n\t\texplicit TransformConstraintData(const String &name);\n\n\t\tVector<BoneData *> &getBones();\n\n\t\tBoneData *getTarget();\n\n        void setTarget(BoneData *target);\n\n\t\tfloat getMixRotate();\n\n        void setMixRotate(float mixRotate);\n\n\t\tfloat getMixX();\n\n        void setMixX(float mixX);\n\n\t\tfloat getMixY();\n\n        void setMixY(float mixY);\n\n\t\tfloat getMixScaleX();\n\n        void setMixScaleX(float mixScaleX);\n\n\t\tfloat getMixScaleY();\n\n        void setMixScaleY(float mixScaleY);\n\n\t\tfloat getMixShearY();\n\n        void setMixShearY(float mixShearY);\n\n\t\tfloat getOffsetRotation();\n\n        void setOffsetRotation(float offsetRotation);\n\n\t\tfloat getOffsetX();\n\n        void setOffsetX(float offsetX);\n\n\t\tfloat getOffsetY();\n\n        void setOffsetY(float offsetY);\n\n\t\tfloat getOffsetScaleX();\n\n        void setOffsetScaleX(float offsetScaleX);\n\n\t\tfloat getOffsetScaleY();\n\n        void setOffsetScaleY(float offsetScaleY);\n\n\t\tfloat getOffsetShearY();\n\n        void setOffsetShearY(float offsetShearY);\n\n\t\tbool isRelative();\n\n        void setRelative(bool isRelative);\n\n\t\tbool isLocal();\n\n        void setLocal(bool isLocal);\n\n\tprivate:\n\t\tVector<BoneData *> _bones;\n\t\tBoneData *_target;\n\t\tfloat _mixRotate, _mixX, _mixY, _mixScaleX, _mixScaleY, _mixShearY;\n\t\tfloat _offsetRotation, _offsetX, _offsetY, _offsetScaleX, _offsetScaleY, _offsetShearY;\n\t\tbool _relative, _local;\n\t};\n}\n\n#endif /* Spine_TransformConstraintData_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/TransformConstraintTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_TransformConstraintTimeline_h\n#define Spine_TransformConstraintTimeline_h\n\n#include <spine/CurveTimeline.h>\n\nnamespace spine {\n\n\tclass SP_API TransformConstraintTimeline : public CurveTimeline {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit TransformConstraintTimeline(size_t frameCount, size_t bezierCount, int transformConstraintIndex);\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tvoid setFrame(size_t frameIndex, float time, float mixRotate, float mixX, float mixY, float mixScaleX,\n\t\t\t\t\t  float mixScaleY, float mixShearY);\n\n\t\tint getTransformConstraintIndex() { return _constraintIndex; }\n\n\t\tvoid setTransformConstraintIndex(int inValue) { _constraintIndex = inValue; }\n\n\tprivate:\n\t\tint _constraintIndex;\n\n\t\tstatic const int ENTRIES = 7;\n\t\tstatic const int ROTATE = 1;\n\t\tstatic const int X = 2;\n\t\tstatic const int Y = 3;\n\t\tstatic const int SCALEX = 4;\n\t\tstatic const int SCALEY = 5;\n\t\tstatic const int SHEARY = 6;\n\t};\n}\n\n#endif /* Spine_TransformConstraintTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/TranslateTimeline.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_TranslateTimeline_h\n#define Spine_TranslateTimeline_h\n\n#include <spine/CurveTimeline.h>\n\n#include <spine/Animation.h>\n#include <spine/Property.h>\n\nnamespace spine {\n\n\tclass SP_API TranslateTimeline : public CurveTimeline2 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit TranslateTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual ~TranslateTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n\n\tclass SP_API TranslateXTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit TranslateXTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual ~TranslateXTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n\n\tclass SP_API TranslateYTimeline : public CurveTimeline1 {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit TranslateYTimeline(size_t frameCount, size_t bezierCount, int boneIndex);\n\n\t\tvirtual ~TranslateYTimeline();\n\n\t\tvirtual void\n\t\tapply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,\n\t\t\t  MixDirection direction);\n\n\t\tint getBoneIndex() { return _boneIndex; }\n\n\t\tvoid setBoneIndex(int inValue) { _boneIndex = inValue; }\n\n\tprivate:\n\t\tint _boneIndex;\n\t};\n}\n\n#endif /* Spine_TranslateTimeline_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Triangulator.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Triangulator_h\n#define Spine_Triangulator_h\n\n#include <spine/Vector.h>\n#include <spine/Pool.h>\n\nnamespace spine {\n\tclass SP_API Triangulator : public SpineObject {\n\tpublic:\n\t\t~Triangulator();\n\n\t\tVector<int> &triangulate(Vector<float> &vertices);\n\n\t\tVector<Vector < float>* > &\n\t\tdecompose(Vector<float>\n\t\t&vertices,\n\t\tVector<int> &triangles\n\t\t);\n\n\tprivate:\n\t\tVector<Vector < float>* >\n\t\t_convexPolygons;\n\t\tVector<Vector < int>* >\n\t\t_convexPolygonsIndices;\n\n\t\tVector<int> _indices;\n\t\tVector<bool> _isConcaveArray;\n\t\tVector<int> _triangles;\n\n\t\tPool <Vector<float>> _polygonPool;\n\t\tPool <Vector<int>> _polygonIndicesPool;\n\n\t\tstatic bool isConcave(int index, int vertexCount, Vector<float> &vertices, Vector<int> &indices);\n\n\t\tstatic bool positiveArea(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y);\n\n\t\tstatic int winding(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y);\n\t};\n}\n\n#endif /* Spine_Triangulator_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Updatable.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Updatable_h\n#define Spine_Updatable_h\n\n#include <spine/RTTI.h>\n#include <spine/SpineObject.h>\n#include <spine/Physics.h>\n\nnamespace spine {\n\tclass SP_API Updatable : public SpineObject {\n\tRTTI_DECL\n\n\tpublic:\n\t\tUpdatable();\n\n\t\tvirtual ~Updatable();\n\n\t\tvirtual void update(Physics physics) = 0;\n\n\t\tvirtual bool isActive() = 0;\n\n\t\tvirtual void setActive(bool inValue) = 0;\n\t};\n}\n\n#endif /* Spine_Updatable_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Vector.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Vector_h\n#define Spine_Vector_h\n\n#include <spine/Extension.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <assert.h>\n\nnamespace spine {\n\ttemplate<typename T>\n\tclass SP_API Vector : public SpineObject {\n\tpublic:\n\t\tVector() : _size(0), _capacity(0), _buffer(NULL) {\n\t\t}\n\n\t\tVector(const Vector &inVector) : _size(inVector._size), _capacity(inVector._capacity), _buffer(NULL) {\n\t\t\tif (_capacity > 0) {\n\t\t\t\t_buffer = allocate(_capacity);\n\t\t\t\tfor (size_t i = 0; i < _size; ++i) {\n\t\t\t\t\tconstruct(_buffer + i, inVector._buffer[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t~Vector() {\n\t\t\tclear();\n\t\t\tdeallocate(_buffer);\n\t\t}\n\n\t\tinline void clear() {\n\t\t\tfor (size_t i = 0; i < _size; ++i) {\n\t\t\t\tdestroy(_buffer + (_size - 1 - i));\n\t\t\t}\n\n\t\t\t_size = 0;\n\t\t}\n\n\t\tinline size_t getCapacity() const {\n\t\t\treturn _capacity;\n\t\t}\n\n\t\tinline size_t size() const {\n\t\t\treturn _size;\n\t\t}\n\n\t\tinline void setSize(size_t newSize, const T &defaultValue) {\n\t\t\tassert(newSize >= 0);\n\t\t\tsize_t oldSize = _size;\n\t\t\t_size = newSize;\n\t\t\tif (_capacity < newSize) {\n\t\t\t\t_capacity = (int) (_size * 1.75f);\n\t\t\t\tif (_capacity < 8) _capacity = 8;\n\t\t\t\t_buffer = spine::SpineExtension::realloc<T>(_buffer, _capacity, __FILE__, __LINE__);\n\t\t\t}\n\t\t\tif (oldSize < _size) {\n\t\t\t\tfor (size_t i = oldSize; i < _size; i++) {\n\t\t\t\t\tconstruct(_buffer + i, defaultValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinline void ensureCapacity(size_t newCapacity = 0) {\n\t\t\tif (_capacity >= newCapacity) return;\n\t\t\t_capacity = newCapacity;\n\t\t\t_buffer = SpineExtension::realloc<T>(_buffer, newCapacity, __FILE__, __LINE__);\n\t\t}\n\n\t\tinline void add(const T &inValue) {\n\t\t\tif (_size == _capacity) {\n\t\t\t\t// inValue might reference an element in this buffer\n\t\t\t\t// When we reallocate, the reference becomes invalid.\n\t\t\t\t// We thus need to create a defensive copy before\n\t\t\t\t// reallocating.\n\t\t\t\tT valueCopy = inValue;\n\t\t\t\t_capacity = (int) (_size * 1.75f);\n\t\t\t\tif (_capacity < 8) _capacity = 8;\n\t\t\t\t_buffer = spine::SpineExtension::realloc<T>(_buffer, _capacity, __FILE__, __LINE__);\n\t\t\t\tconstruct(_buffer + _size++, valueCopy);\n\t\t\t} else {\n\t\t\t\tconstruct(_buffer + _size++, inValue);\n\t\t\t}\n\t\t}\n\n\t\tinline void addAll(Vector<T> &inValue) {\n\t\t\tensureCapacity(this->size() + inValue.size());\n\t\t\tfor (size_t i = 0; i < inValue.size(); i++) {\n\t\t\t\tadd(inValue[i]);\n\t\t\t}\n\t\t}\n\n\t\tinline void clearAndAddAll(Vector<T> &inValue) {\n\t\t\tthis->clear();\n\t\t\tthis->addAll(inValue);\n\t\t}\n\n\t\tinline void removeAt(size_t inIndex) {\n\t\t\tassert(inIndex < _size);\n\n\t\t\t--_size;\n\n\t\t\tif (inIndex != _size) {\n\t\t\t\tfor (size_t i = inIndex; i < _size; ++i) {\n\t\t\t\t\tT tmp(_buffer[i]);\n\t\t\t\t\t_buffer[i] = _buffer[i + 1];\n\t\t\t\t\t_buffer[i + 1] = tmp;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdestroy(_buffer + _size);\n\t\t}\n\n\t\tinline bool contains(const T &inValue) {\n\t\t\tfor (size_t i = 0; i < _size; ++i) {\n\t\t\t\tif (_buffer[i] == inValue) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tinline int indexOf(const T &inValue) {\n\t\t\tfor (size_t i = 0; i < _size; ++i) {\n\t\t\t\tif (_buffer[i] == inValue) {\n\t\t\t\t\treturn (int) i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn -1;\n\t\t}\n\n\t\tinline T &operator[](size_t inIndex) {\n\t\t\tassert(inIndex < _size);\n\n\t\t\treturn _buffer[inIndex];\n\t\t}\n\n\t\tinline friend bool operator==(Vector<T> &lhs, Vector<T> &rhs) {\n\t\t\tif (lhs.size() != rhs.size()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor (size_t i = 0, n = lhs.size(); i < n; ++i) {\n\t\t\t\tif (lhs[i] != rhs[i]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\tinline friend bool operator!=(Vector<T> &lhs, Vector<T> &rhs) {\n\t\t\treturn !(lhs == rhs);\n\t\t}\n\n\t\tinline T *buffer() {\n\t\t\treturn _buffer;\n\t\t}\n\n\tprivate:\n\t\tsize_t _size;\n\t\tsize_t _capacity;\n\t\tT *_buffer;\n\n\t\tinline T *allocate(size_t n) {\n\t\t\tassert(n > 0);\n\n\t\t\tT *ptr = SpineExtension::calloc<T>(n, __FILE__, __LINE__);\n\n\t\t\tassert(ptr);\n\n\t\t\treturn ptr;\n\t\t}\n\n\t\tinline void deallocate(T *buffer) {\n\t\t\tif (_buffer) {\n\t\t\t\tSpineExtension::free(buffer, __FILE__, __LINE__);\n\t\t\t}\n\t\t}\n\n\t\tinline void construct(T *buffer, const T &val) {\n\t\t\tnew(buffer) T(val);\n\t\t}\n\n\t\tinline void destroy(T *buffer) {\n\t\t\tbuffer->~T();\n\t\t}\n\n\t\t// Vector &operator=(const Vector &inVector) {};\n\t};\n}\n\n#endif /* Spine_Vector_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Version.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef SPINE_VERSION_H_\n#define SPINE_VERSION_H_\n\n#define SPINE_MAJOR_VERSION 4\n#define SPINE_MINOR_VERSION 2\n#define SPINE_VERSION_STRING \"4.2\"\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/VertexAttachment.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_VertexAttachment_h\n#define Spine_VertexAttachment_h\n\n#include <spine/Attachment.h>\n\n#include <spine/Vector.h>\n\nnamespace spine {\n\tclass Slot;\n\n\t/// An attachment with vertices that are transformed by one or more bones and can be deformed by a slot's vertices.\n\tclass SP_API VertexAttachment : public Attachment {\n\t\tfriend class SkeletonBinary;\n\n\t\tfriend class SkeletonJson;\n\n\t\tfriend class DeformTimeline;\n\n\tRTTI_DECL\n\n\tpublic:\n\t\texplicit VertexAttachment(const String &name);\n\n\t\tvirtual ~VertexAttachment();\n\n\t\tvoid computeWorldVertices(Slot &slot, float *worldVertices);\n\n\t\tvoid computeWorldVertices(Slot &slot, Vector<float> &worldVertices);\n\n\t\t/// Transforms local vertices to world coordinates.\n\t\t/// @param start The index of the first Vertices value to transform. Each vertex has 2 values, x and y.\n\t\t/// @param count The number of world vertex values to output. Must be less than or equal to WorldVerticesLength - start.\n\t\t/// @param worldVertices The output world vertices. Must have a length greater than or equal to offset + count.\n\t\t/// @param offset The worldVertices index to begin writing values.\n\t\t/// @param stride The number of worldVertices entries between the value pairs written.\n\t\tvirtual void computeWorldVertices(Slot &slot, size_t start, size_t count, float *worldVertices, size_t offset,\n\t\t\t\t\t\t\t\t  size_t stride = 2);\n\n\t\tvirtual void computeWorldVertices(Slot &slot, size_t start, size_t count, Vector<float> &worldVertices, size_t offset,\n\t\t\t\t\t\t\t\t  size_t stride = 2);\n\n\t\t/// Gets a unique ID for this attachment.\n\t\tint getId();\n\n\t\tVector<int> &getBones();\n\n\t\tVector<float> &getVertices();\n\n\t\tsize_t getWorldVerticesLength();\n\n\t\tvoid setWorldVerticesLength(size_t inValue);\n\n\t\tAttachment * getTimelineAttachment();\n\n\t\tvoid setTimelineAttachment(Attachment *attachment);\n\n\t\tvoid copyTo(VertexAttachment *other);\n\n\tprotected:\n\t\tVector <int> _bones;\n\t\tVector<float> _vertices;\n\t\tsize_t _worldVerticesLength;\n\t\tAttachment *_timelineAttachment;\n\n\tprivate:\n\t\tconst int _id;\n\n\t\tstatic int getNextID();\n\t};\n}\n\n#endif /* Spine_VertexAttachment_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/Vertices.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef Spine_Vertices_h\n#define Spine_Vertices_h\n\n#include <spine/Vector.h>\n\nnamespace spine {\n\tclass SP_API Vertices : public SpineObject {\n\tpublic:\n\t\tVector <int> _bones;\n\t\tVector<float> _vertices;\n\t};\n}\n\n#endif /* Spine_Vertices_h */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/dll.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef SPINE_SHAREDLIB_H\n#define SPINE_SHAREDLIB_H\n\n#ifdef _WIN32\n#define DLLIMPORT __declspec(dllimport)\n#define DLLEXPORT __declspec(dllexport)\n#else\n#ifndef DLLIMPORT\n#define DLLIMPORT\n#endif\n#ifndef DLLEXPORT\n#define DLLEXPORT\n#endif\n#endif\n\n#ifdef SPINEPLUGIN_API\n#define SP_API SPINEPLUGIN_API\n#else\n#define SP_API\n#endif\n\n#endif /* SPINE_SHAREDLIB_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/include/spine/spine.h",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#ifndef SPINE_SPINE_H_\n#define SPINE_SPINE_H_\n\n#include <spine/Animation.h>\n#include <spine/AnimationState.h>\n#include <spine/AnimationStateData.h>\n#include <spine/Atlas.h>\n#include <spine/AtlasAttachmentLoader.h>\n#include <spine/Attachment.h>\n#include <spine/AttachmentLoader.h>\n#include <spine/AttachmentTimeline.h>\n#include <spine/AttachmentType.h>\n#include <spine/BlendMode.h>\n#include <spine/Bone.h>\n#include <spine/BoneData.h>\n#include <spine/BoundingBoxAttachment.h>\n#include <spine/ClippingAttachment.h>\n#include <spine/Color.h>\n#include <spine/ColorTimeline.h>\n#include <spine/ConstraintData.h>\n#include <spine/ContainerUtil.h>\n#include <spine/CurveTimeline.h>\n#include <spine/DeformTimeline.h>\n#include <spine/DrawOrderTimeline.h>\n#include <spine/Event.h>\n#include <spine/EventData.h>\n#include <spine/EventTimeline.h>\n#include <spine/Extension.h>\n#include <spine/HasRendererObject.h>\n#include <spine/HashMap.h>\n#include <spine/IkConstraint.h>\n#include <spine/IkConstraintData.h>\n#include <spine/IkConstraintTimeline.h>\n#include <spine/Inherit.h>\n#include <spine/InheritTimeline.h>\n#include <spine/Json.h>\n#include <spine/LinkedMesh.h>\n#include <spine/MathUtil.h>\n#include <spine/MeshAttachment.h>\n#include <spine/MixBlend.h>\n#include <spine/MixDirection.h>\n#include <spine/PathAttachment.h>\n#include <spine/PathConstraint.h>\n#include <spine/PathConstraintData.h>\n#include <spine/PathConstraintMixTimeline.h>\n#include <spine/PathConstraintPositionTimeline.h>\n#include <spine/PathConstraintSpacingTimeline.h>\n#include <spine/Physics.h>\n#include <spine/PhysicsConstraint.h>\n#include <spine/PhysicsConstraintData.h>\n#include <spine/PointAttachment.h>\n#include <spine/Pool.h>\n#include <spine/PositionMode.h>\n#include <spine/Property.h>\n#include <spine/RTTI.h>\n#include <spine/RegionAttachment.h>\n#include <spine/RotateMode.h>\n#include <spine/RotateTimeline.h>\n#include <spine/ScaleTimeline.h>\n#include <spine/ShearTimeline.h>\n#include <spine/Skeleton.h>\n#include <spine/SkeletonBinary.h>\n#include <spine/SkeletonBounds.h>\n#include <spine/SkeletonClipping.h>\n#include <spine/SkeletonData.h>\n#include <spine/SkeletonJson.h>\n#include <spine/SkeletonRenderer.h>\n#include <spine/Skin.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n#include <spine/SpacingMode.h>\n#include <spine/SpineObject.h>\n#include <spine/SpineString.h>\n#include <spine/TextureLoader.h>\n#include <spine/Timeline.h>\n#include <spine/TransformConstraint.h>\n#include <spine/TransformConstraintData.h>\n#include <spine/TransformConstraintTimeline.h>\n#include <spine/TranslateTimeline.h>\n#include <spine/Triangulator.h>\n#include <spine/Updatable.h>\n#include <spine/Vector.h>\n#include <spine/VertexAttachment.h>\n#include <spine/Vertices.h>\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Animation.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Animation.h>\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n#include <spine/Timeline.h>\n\n#include <spine/ContainerUtil.h>\n\n#include <stdint.h>\n\nusing namespace spine;\n\nAnimation::Animation(const String &name, Vector<Timeline *> &timelines, float duration) : _timelines(timelines),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _timelineIds(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _duration(duration),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _name(name) {\n\tassert(_name.length() > 0);\n\tfor (size_t i = 0; i < timelines.size(); i++) {\n\t\tVector<PropertyId> propertyIds = timelines[i]->getPropertyIds();\n\t\tfor (size_t ii = 0; ii < propertyIds.size(); ii++)\n\t\t\t_timelineIds.put(propertyIds[ii], true);\n\t}\n}\n\nbool Animation::hasTimeline(Vector<PropertyId> &ids) {\n\tfor (size_t i = 0; i < ids.size(); i++) {\n\t\tif (_timelineIds.containsKey(ids[i])) return true;\n\t}\n\treturn false;\n}\n\nAnimation::~Animation() {\n\tContainerUtil::cleanUpVectorOfPointers(_timelines);\n}\n\nvoid Animation::apply(Skeleton &skeleton, float lastTime, float time, bool loop, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t  MixBlend blend, MixDirection direction) {\n\tif (loop && _duration != 0) {\n\t\ttime = MathUtil::fmod(time, _duration);\n\t\tif (lastTime > 0) {\n\t\t\tlastTime = MathUtil::fmod(lastTime, _duration);\n\t\t}\n\t}\n\n\tfor (size_t i = 0, n = _timelines.size(); i < n; ++i) {\n\t\t_timelines[i]->apply(skeleton, lastTime, time, pEvents, alpha, blend, direction);\n\t}\n}\n\nconst String &Animation::getName() {\n\treturn _name;\n}\n\nVector<Timeline *> &Animation::getTimelines() {\n\treturn _timelines;\n}\n\nfloat Animation::getDuration() {\n\treturn _duration;\n}\n\nvoid Animation::setDuration(float inValue) {\n\t_duration = inValue;\n}\n\nint Animation::search(Vector<float> &frames, float target) {\n\tsize_t n = (int) frames.size();\n\tfor (size_t i = 1; i < n; i++) {\n\t\tif (frames[i] > target) return (int) (i - 1);\n\t}\n\treturn (int) (n - 1);\n}\n\nint Animation::search(Vector<float> &frames, float target, int step) {\n\tsize_t n = frames.size();\n\tfor (size_t i = step; i < n; i += step)\n\t\tif (frames[i] > target) return (int) (i - step);\n\treturn (int) (n - step);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/AnimationState.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/AnimationState.h>\n#include <spine/Animation.h>\n#include <spine/AnimationStateData.h>\n#include <spine/AttachmentTimeline.h>\n#include <spine/Bone.h>\n#include <spine/BoneData.h>\n#include <spine/DrawOrderTimeline.h>\n#include <spine/Event.h>\n#include <spine/EventTimeline.h>\n#include <spine/RotateTimeline.h>\n#include <spine/Skeleton.h>\n#include <spine/SkeletonData.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\n#include <float.h>\n\nusing namespace spine;\n\nvoid dummyOnAnimationEventFunc(AnimationState *state, spine::EventType type, TrackEntry *entry, Event *event = NULL) {\n\tSP_UNUSED(state);\n\tSP_UNUSED(type);\n\tSP_UNUSED(entry);\n\tSP_UNUSED(event);\n}\n\nTrackEntry::TrackEntry() : _animation(NULL), _previous(NULL), _next(NULL), _mixingFrom(NULL), _mixingTo(0),\n\t\t\t\t\t\t   _trackIndex(0), _loop(false), _holdPrevious(false), _reverse(false),\n\t\t\t\t\t\t   _shortestRotation(false),\n\t\t\t\t\t\t   _eventThreshold(0), _mixAttachmentThreshold(0), _alphaAttachmentThreshold(0), _mixDrawOrderThreshold(0), _animationStart(0),\n\t\t\t\t\t\t   _animationEnd(0), _animationLast(0), _nextAnimationLast(0), _delay(0), _trackTime(0),\n\t\t\t\t\t\t   _trackLast(0), _nextTrackLast(0), _trackEnd(0), _timeScale(1.0f), _alpha(0), _mixTime(0),\n\t\t\t\t\t\t   _mixDuration(0), _interruptAlpha(0), _totalAlpha(0), _mixBlend(MixBlend_Replace),\n\t\t\t\t\t\t   _listener(dummyOnAnimationEventFunc), _listenerObject(NULL) {\n}\n\nTrackEntry::~TrackEntry() {}\n\nint TrackEntry::getTrackIndex() { return _trackIndex; }\n\nAnimation *TrackEntry::getAnimation() { return _animation; }\n\nTrackEntry *TrackEntry::getPrevious() { return _previous; }\n\nbool TrackEntry::getLoop() { return _loop; }\n\nvoid TrackEntry::setLoop(bool inValue) { _loop = inValue; }\n\nbool TrackEntry::getHoldPrevious() { return _holdPrevious; }\n\nvoid TrackEntry::setHoldPrevious(bool inValue) { _holdPrevious = inValue; }\n\nbool TrackEntry::getReverse() { return _reverse; }\n\nvoid TrackEntry::setReverse(bool inValue) { _reverse = inValue; }\n\nbool TrackEntry::getShortestRotation() { return _shortestRotation; }\n\nvoid TrackEntry::setShortestRotation(bool inValue) { _shortestRotation = inValue; }\n\nfloat TrackEntry::getDelay() { return _delay; }\n\nvoid TrackEntry::setDelay(float inValue) { _delay = inValue; }\n\nfloat TrackEntry::getTrackTime() { return _trackTime; }\n\nvoid TrackEntry::setTrackTime(float inValue) { _trackTime = inValue; }\n\nfloat TrackEntry::getTrackEnd() { return _trackEnd; }\n\nvoid TrackEntry::setTrackEnd(float inValue) { _trackEnd = inValue; }\n\nfloat TrackEntry::getAnimationStart() { return _animationStart; }\n\nvoid TrackEntry::setAnimationStart(float inValue) { _animationStart = inValue; }\n\nfloat TrackEntry::getAnimationEnd() { return _animationEnd; }\n\nvoid TrackEntry::setAnimationEnd(float inValue) { _animationEnd = inValue; }\n\nfloat TrackEntry::getAnimationLast() { return _animationLast; }\n\nvoid TrackEntry::setAnimationLast(float inValue) {\n\t_animationLast = inValue;\n\t_nextAnimationLast = inValue;\n}\n\nfloat TrackEntry::getAnimationTime() {\n\tif (_loop) {\n\t\tfloat duration = _animationEnd - _animationStart;\n\t\tif (duration == 0) return _animationStart;\n\t\treturn MathUtil::fmod(_trackTime, duration) + _animationStart;\n\t}\n\n\treturn MathUtil::min(_trackTime + _animationStart, _animationEnd);\n}\n\nfloat TrackEntry::getTimeScale() { return _timeScale; }\n\nvoid TrackEntry::setTimeScale(float inValue) { _timeScale = inValue; }\n\nfloat TrackEntry::getAlpha() { return _alpha; }\n\nvoid TrackEntry::setAlpha(float inValue) { _alpha = inValue; }\n\nfloat TrackEntry::getEventThreshold() { return _eventThreshold; }\n\nvoid TrackEntry::setEventThreshold(float inValue) { _eventThreshold = inValue; }\n\nfloat TrackEntry::getMixAttachmentThreshold() { return _mixAttachmentThreshold; }\n\nvoid TrackEntry::setMixAttachmentThreshold(float inValue) { _mixAttachmentThreshold = inValue; }\n\nfloat TrackEntry::getAlphaAttachmentThreshold() { return _alphaAttachmentThreshold; }\n\nvoid TrackEntry::setAlphaAttachmentThreshold(float inValue) { _alphaAttachmentThreshold = inValue; }\n\nfloat TrackEntry::getMixDrawOrderThreshold() { return _mixDrawOrderThreshold; }\n\nvoid TrackEntry::setMixDrawOrderThreshold(float inValue) { _mixDrawOrderThreshold = inValue; }\n\nTrackEntry *TrackEntry::getNext() { return _next; }\n\nbool TrackEntry::isComplete() {\n\treturn _trackTime >= _animationEnd - _animationStart;\n}\n\nfloat TrackEntry::getMixTime() { return _mixTime; }\n\nvoid TrackEntry::setMixTime(float inValue) { _mixTime = inValue; }\n\nfloat TrackEntry::getMixDuration() { return _mixDuration; }\n\nvoid TrackEntry::setMixDuration(float inValue) { _mixDuration = inValue; }\n\nvoid TrackEntry::setMixDuration(float mixDuration, float delay) {\n\t_mixDuration = mixDuration;\n\tif (_previous && delay <= 0) delay += _previous->getTrackComplete() - mixDuration;\n\tthis->_delay = delay;\n}\n\nTrackEntry *TrackEntry::getMixingFrom() { return _mixingFrom; }\n\nTrackEntry *TrackEntry::getMixingTo() { return _mixingTo; }\n\nvoid TrackEntry::setMixBlend(MixBlend blend) { _mixBlend = blend; }\n\nMixBlend TrackEntry::getMixBlend() { return _mixBlend; }\n\nvoid TrackEntry::resetRotationDirections() {\n\t_timelinesRotation.clear();\n}\n\nvoid TrackEntry::setListener(AnimationStateListener inValue) {\n\t_listener = inValue;\n\t_listenerObject = NULL;\n}\n\nvoid TrackEntry::setListener(AnimationStateListenerObject *inValue) {\n\t_listener = dummyOnAnimationEventFunc;\n\t_listenerObject = inValue;\n}\n\nvoid TrackEntry::reset() {\n\t_animation = NULL;\n\t_previous = NULL;\n\t_next = NULL;\n\t_mixingFrom = NULL;\n\t_mixingTo = NULL;\n\n\tsetRendererObject(NULL);\n\n\t_timelineMode.clear();\n\t_timelineHoldMix.clear();\n\t_timelinesRotation.clear();\n\n\t_listener = dummyOnAnimationEventFunc;\n\t_listenerObject = NULL;\n}\n\nfloat TrackEntry::getTrackComplete() {\n\tfloat duration = _animationEnd - _animationStart;\n\tif (duration != 0) {\n\t\tif (_loop) return duration * (1 + (int) (_trackTime / duration));// Completion of next loop.\n\t\tif (_trackTime < duration) return duration;                      // Before duration.\n\t}\n\treturn _trackTime;// Next update.\n}\n\nbool TrackEntry::wasApplied() {\n\treturn _nextTrackLast != -1;\n}\n\nEventQueueEntry::EventQueueEntry(EventType eventType, TrackEntry *trackEntry, Event *event) : _type(eventType),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _entry(trackEntry),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _event(event) {\n}\n\nEventQueue *EventQueue::newEventQueue(AnimationState &state) {\n\treturn new (__FILE__, __LINE__) EventQueue(state);\n}\n\nEventQueueEntry EventQueue::newEventQueueEntry(EventType eventType, TrackEntry *entry, Event *event) {\n\treturn EventQueueEntry(eventType, entry, event);\n}\n\nEventQueue::EventQueue(AnimationState &state) : _state(state),\n\t\t\t\t\t\t\t\t\t\t\t\t_drainDisabled(false) {\n}\n\nEventQueue::~EventQueue() {\n}\n\nvoid EventQueue::start(TrackEntry *entry) {\n\t_eventQueueEntries.add(newEventQueueEntry(EventType_Start, entry));\n\t_state._animationsChanged = true;\n}\n\nvoid EventQueue::interrupt(TrackEntry *entry) {\n\t_eventQueueEntries.add(newEventQueueEntry(EventType_Interrupt, entry));\n}\n\nvoid EventQueue::end(TrackEntry *entry) {\n\t_eventQueueEntries.add(newEventQueueEntry(EventType_End, entry));\n\t_state._animationsChanged = true;\n}\n\nvoid EventQueue::dispose(TrackEntry *entry) {\n\t_eventQueueEntries.add(newEventQueueEntry(EventType_Dispose, entry));\n}\n\nvoid EventQueue::complete(TrackEntry *entry) {\n\t_eventQueueEntries.add(newEventQueueEntry(EventType_Complete, entry));\n}\n\nvoid EventQueue::event(TrackEntry *entry, Event *event) {\n\t_eventQueueEntries.add(newEventQueueEntry(EventType_Event, entry, event));\n}\n\n/// Raises all events in the queue and drains the queue.\nvoid EventQueue::drain() {\n\tif (_drainDisabled) {\n\t\treturn;\n\t}\n\n\t_drainDisabled = true;\n\n\tAnimationState &state = _state;\n\n\t// Don't cache _eventQueueEntries.size() so callbacks can queue their own events (eg, call setAnimation in AnimationState_Complete).\n\tfor (size_t i = 0; i < _eventQueueEntries.size(); ++i) {\n\t\tEventQueueEntry queueEntry = _eventQueueEntries[i];\n\t\tTrackEntry *trackEntry = queueEntry._entry;\n\n\t\tswitch (queueEntry._type) {\n\t\t\tcase EventType_Start:\n\t\t\tcase EventType_Interrupt:\n\t\t\tcase EventType_Complete:\n\t\t\t\tif (!trackEntry->_listenerObject) trackEntry->_listener(&state, queueEntry._type, trackEntry, NULL);\n\t\t\t\telse\n\t\t\t\t\ttrackEntry->_listenerObject->callback(&state, queueEntry._type, trackEntry, NULL);\n\t\t\t\tif (!state._listenerObject) state._listener(&state, queueEntry._type, trackEntry, NULL);\n\t\t\t\telse\n\t\t\t\t\tstate._listenerObject->callback(&state, queueEntry._type, trackEntry, NULL);\n\t\t\t\tbreak;\n\t\t\tcase EventType_End:\n\t\t\t\tif (!trackEntry->_listenerObject) trackEntry->_listener(&state, queueEntry._type, trackEntry, NULL);\n\t\t\t\telse\n\t\t\t\t\ttrackEntry->_listenerObject->callback(&state, queueEntry._type, trackEntry, NULL);\n\t\t\t\tif (!state._listenerObject) state._listener(&state, queueEntry._type, trackEntry, NULL);\n\t\t\t\telse\n\t\t\t\t\tstate._listenerObject->callback(&state, queueEntry._type, trackEntry, NULL);\n\t\t\t\t/* Fall through. */\n\t\t\tcase EventType_Dispose:\n\t\t\t\tif (!trackEntry->_listenerObject) trackEntry->_listener(&state, EventType_Dispose, trackEntry, NULL);\n\t\t\t\telse\n\t\t\t\t\ttrackEntry->_listenerObject->callback(&state, EventType_Dispose, trackEntry, NULL);\n\t\t\t\tif (!state._listenerObject) state._listener(&state, EventType_Dispose, trackEntry, NULL);\n\t\t\t\telse\n\t\t\t\t\tstate._listenerObject->callback(&state, EventType_Dispose, trackEntry, NULL);\n\n\t\t\t\tif (!_state.getManualTrackEntryDisposal()) _state.disposeTrackEntry(trackEntry);\n\t\t\t\tbreak;\n\t\t\tcase EventType_Event:\n\t\t\t\tif (!trackEntry->_listenerObject)\n\t\t\t\t\ttrackEntry->_listener(&state, queueEntry._type, trackEntry, queueEntry._event);\n\t\t\t\telse\n\t\t\t\t\ttrackEntry->_listenerObject->callback(&state, queueEntry._type, trackEntry, queueEntry._event);\n\t\t\t\tif (!state._listenerObject) state._listener(&state, queueEntry._type, trackEntry, queueEntry._event);\n\t\t\t\telse\n\t\t\t\t\tstate._listenerObject->callback(&state, queueEntry._type, trackEntry, queueEntry._event);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t_eventQueueEntries.clear();\n\n\t_drainDisabled = false;\n}\n\nAnimationState::AnimationState(AnimationStateData *data) : _data(data),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _queue(EventQueue::newEventQueue(*this)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _animationsChanged(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _listener(dummyOnAnimationEventFunc),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _listenerObject(NULL),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _unkeyedState(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _timeScale(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _manualTrackEntryDisposal(false) {\n}\n\nAnimationState::~AnimationState() {\n\tfor (size_t i = 0; i < _tracks.size(); i++) {\n\t\tTrackEntry *entry = _tracks[i];\n\t\tif (entry) {\n\t\t\tTrackEntry *from = entry->_mixingFrom;\n\t\t\twhile (from) {\n\t\t\t\tTrackEntry *curr = from;\n\t\t\t\tfrom = curr->_mixingFrom;\n\t\t\t\tdelete curr;\n\t\t\t}\n\t\t\tTrackEntry *next = entry->_next;\n\t\t\twhile (next) {\n\t\t\t\tTrackEntry *curr = next;\n\t\t\t\tnext = curr->_next;\n\t\t\t\tdelete curr;\n\t\t\t}\n\t\t\tdelete entry;\n\t\t}\n\t}\n\tdelete _queue;\n}\n\nvoid AnimationState::update(float delta) {\n\tdelta *= _timeScale;\n\tfor (size_t i = 0, n = _tracks.size(); i < n; ++i) {\n\t\tTrackEntry *currentP = _tracks[i];\n\t\tif (currentP == NULL) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tTrackEntry &current = *currentP;\n\n\t\tcurrent._animationLast = current._nextAnimationLast;\n\t\tcurrent._trackLast = current._nextTrackLast;\n\n\t\tfloat currentDelta = delta * current._timeScale;\n\n\t\tif (current._delay > 0) {\n\t\t\tcurrent._delay -= currentDelta;\n\t\t\tif (current._delay > 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcurrentDelta = -current._delay;\n\t\t\tcurrent._delay = 0;\n\t\t}\n\n\t\tTrackEntry *next = current._next;\n\t\tif (next != NULL) {\n\t\t\t// When the next entry's delay is passed, change to the next entry, preserving leftover time.\n\t\t\tfloat nextTime = current._trackLast - next->_delay;\n\t\t\tif (nextTime >= 0) {\n\t\t\t\tnext->_delay = 0;\n\t\t\t\tnext->_trackTime +=\n\t\t\t\t\t\tcurrent._timeScale == 0 ? 0 : (nextTime / current._timeScale + delta) * next->_timeScale;\n\t\t\t\tcurrent._trackTime += currentDelta;\n\t\t\t\tsetCurrent(i, next, true);\n\t\t\t\twhile (next->_mixingFrom != NULL) {\n\t\t\t\t\tnext->_mixTime += delta;\n\t\t\t\t\tnext = next->_mixingFrom;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t} else if (current._trackLast >= current._trackEnd && current._mixingFrom == NULL) {\n\t\t\t// clear the track when there is no next entry, the track end time is reached, and there is no mixingFrom.\n\t\t\t_tracks[i] = NULL;\n\n\t\t\t_queue->end(currentP);\n\t\t\tclearNext(currentP);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (current._mixingFrom != NULL && updateMixingFrom(currentP, delta)) {\n\t\t\t// End mixing from entries once all have completed.\n\t\t\tTrackEntry *from = current._mixingFrom;\n\t\t\tcurrent._mixingFrom = NULL;\n\t\t\tif (from != NULL) from->_mixingTo = NULL;\n\t\t\twhile (from != NULL) {\n\t\t\t\t_queue->end(from);\n\t\t\t\tfrom = from->_mixingFrom;\n\t\t\t}\n\t\t}\n\n\t\tcurrent._trackTime += currentDelta;\n\t}\n\n\t_queue->drain();\n}\n\nbool AnimationState::apply(Skeleton &skeleton) {\n\tif (_animationsChanged) {\n\t\tanimationsChanged();\n\t}\n\n\tbool applied = false;\n\tfor (size_t i = 0, n = _tracks.size(); i < n; ++i) {\n\t\tTrackEntry *currentP = _tracks[i];\n\t\tif (currentP == NULL || currentP->_delay > 0) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tTrackEntry &current = *currentP;\n\n\t\tapplied = true;\n\t\tMixBlend blend = i == 0 ? MixBlend_First : current._mixBlend;\n\n\t\t// apply mixing from entries first.\n\t\tfloat alpha = current._alpha;\n\t\tif (current._mixingFrom != NULL) {\n\t\t\talpha *= applyMixingFrom(currentP, skeleton, blend);\n\t\t} else if (current._trackTime >= current._trackEnd && current._next == NULL) {\n\t\t\talpha = 0;// Set to setup pose the last time the entry will be applied.\n\t\t}\n\t\tbool attachments = alpha >= current._alphaAttachmentThreshold;\n\n\n\t\t// apply current entry.\n\t\tfloat animationLast = current._animationLast, animationTime = current.getAnimationTime();\n\t\tfloat applyTime = animationTime;\n\t\tVector<Event *> *applyEvents = &_events;\n\t\tif (current._reverse) {\n\t\t\tapplyTime = current._animation->getDuration() - applyTime;\n\t\t\tapplyEvents = NULL;\n\t\t}\n\t\tsize_t timelineCount = current._animation->_timelines.size();\n\t\tVector<Timeline *> &timelines = current._animation->_timelines;\n\t\tif ((i == 0 && alpha == 1) || blend == MixBlend_Add) {\n\t\t\tif (i == 0) attachments = true;\n\t\t\tfor (size_t ii = 0; ii < timelineCount; ++ii) {\n\t\t\t\tTimeline *timeline = timelines[ii];\n\t\t\t\tif (timeline->getRTTI().isExactly(AttachmentTimeline::rtti))\n\t\t\t\t\tapplyAttachmentTimeline(static_cast<AttachmentTimeline *>(timeline), skeleton, applyTime, blend,\n\t\t\t\t\t\t\t\t\t\t\tattachments);\n\t\t\t\telse\n\t\t\t\t\ttimeline->apply(skeleton, animationLast, applyTime, applyEvents, alpha, blend, MixDirection_In);\n\t\t\t}\n\t\t} else {\n\t\t\tVector<int> &timelineMode = current._timelineMode;\n\n\t\t\tbool shortestRotation = current._shortestRotation;\n\t\t\tbool firstFrame = !shortestRotation && current._timelinesRotation.size() != timelines.size() << 1;\n\t\t\tif (firstFrame) current._timelinesRotation.setSize(timelines.size() << 1, 0);\n\t\t\tVector<float> &timelinesRotation = current._timelinesRotation;\n\n\t\t\tfor (size_t ii = 0; ii < timelineCount; ++ii) {\n\t\t\t\tTimeline *timeline = timelines[ii];\n\t\t\t\tassert(timeline);\n\n\t\t\t\tMixBlend timelineBlend = timelineMode[ii] == Subsequent ? blend : MixBlend_Setup;\n\n\t\t\t\tif (!shortestRotation && timeline->getRTTI().isExactly(RotateTimeline::rtti))\n\t\t\t\t\tapplyRotateTimeline(static_cast<RotateTimeline *>(timeline), skeleton, applyTime, alpha,\n\t\t\t\t\t\t\t\t\t\ttimelineBlend, timelinesRotation, ii << 1, firstFrame);\n\t\t\t\telse if (timeline->getRTTI().isExactly(AttachmentTimeline::rtti))\n\t\t\t\t\tapplyAttachmentTimeline(static_cast<AttachmentTimeline *>(timeline), skeleton, applyTime,\n\t\t\t\t\t\t\t\t\t\t\tblend, attachments);\n\t\t\t\telse\n\t\t\t\t\ttimeline->apply(skeleton, animationLast, applyTime, applyEvents, alpha, timelineBlend,\n\t\t\t\t\t\t\t\t\tMixDirection_In);\n\t\t\t}\n\t\t}\n\n\t\tqueueEvents(currentP, animationTime);\n\t\t_events.clear();\n\t\tcurrent._nextAnimationLast = animationTime;\n\t\tcurrent._nextTrackLast = current._trackTime;\n\t}\n\n\tint setupState = _unkeyedState + Setup;\n\tVector<Slot *> &slots = skeleton.getSlots();\n\tfor (int i = 0, n = (int) slots.size(); i < n; i++) {\n\t\tSlot *slot = slots[i];\n\t\tif (slot->getAttachmentState() == setupState) {\n\t\t\tconst String &attachmentName = slot->getData().getAttachmentName();\n\t\t\tslot->setAttachment(attachmentName.isEmpty() ? NULL : skeleton.getAttachment(slot->getData().getIndex(), attachmentName));\n\t\t}\n\t}\n\t_unkeyedState += 2;\n\n\t_queue->drain();\n\treturn applied;\n}\n\nvoid AnimationState::clearTracks() {\n\tbool oldDrainDisabled = _queue->_drainDisabled;\n\t_queue->_drainDisabled = true;\n\tfor (size_t i = 0, n = _tracks.size(); i < n; ++i)\n\t\tclearTrack(i);\n\t_tracks.clear();\n\t_queue->_drainDisabled = oldDrainDisabled;\n\t_queue->drain();\n}\n\nvoid AnimationState::clearTrack(size_t trackIndex) {\n\tif (trackIndex >= _tracks.size()) return;\n\n\tTrackEntry *current = _tracks[trackIndex];\n\tif (current == NULL) return;\n\n\t_queue->end(current);\n\n\tclearNext(current);\n\n\tTrackEntry *entry = current;\n\twhile (true) {\n\t\tTrackEntry *from = entry->_mixingFrom;\n\t\tif (from == NULL) break;\n\n\t\t_queue->end(from);\n\t\tentry->_mixingFrom = NULL;\n\t\tentry->_mixingTo = NULL;\n\t\tentry = from;\n\t}\n\n\t_tracks[current->_trackIndex] = NULL;\n\n\t_queue->drain();\n}\n\nTrackEntry *AnimationState::setAnimation(size_t trackIndex, const String &animationName, bool loop) {\n\tAnimation *animation = _data->_skeletonData->findAnimation(animationName);\n\tassert(animation != NULL);\n\treturn setAnimation(trackIndex, animation, loop);\n}\n\nTrackEntry *AnimationState::setAnimation(size_t trackIndex, Animation *animation, bool loop) {\n\tassert(animation != NULL);\n\n\tbool interrupt = true;\n\tTrackEntry *current = expandToIndex(trackIndex);\n\tif (current != NULL) {\n\t\tif (current->_nextTrackLast == -1) {\n\t\t\t// Don't mix from an entry that was never applied.\n\t\t\t_tracks[trackIndex] = current->_mixingFrom;\n\t\t\t_queue->interrupt(current);\n\t\t\t_queue->end(current);\n\t\t\tclearNext(current);\n\t\t\tcurrent = current->_mixingFrom;\n\t\t\tinterrupt = false;\n\t\t} else {\n\t\t\tclearNext(current);\n\t\t}\n\t}\n\n\tTrackEntry *entry = newTrackEntry(trackIndex, animation, loop, current);\n\tsetCurrent(trackIndex, entry, interrupt);\n\t_queue->drain();\n\n\treturn entry;\n}\n\nTrackEntry *AnimationState::addAnimation(size_t trackIndex, const String &animationName, bool loop, float delay) {\n\tAnimation *animation = _data->_skeletonData->findAnimation(animationName);\n\tassert(animation != NULL);\n\treturn addAnimation(trackIndex, animation, loop, delay);\n}\n\nTrackEntry *AnimationState::addAnimation(size_t trackIndex, Animation *animation, bool loop, float delay) {\n\tassert(animation != NULL);\n\n\tTrackEntry *last = expandToIndex(trackIndex);\n\tif (last != NULL) {\n\t\twhile (last->_next != NULL)\n\t\t\tlast = last->_next;\n\t}\n\n\tTrackEntry *entry = newTrackEntry(trackIndex, animation, loop, last);\n\n\tif (last == NULL) {\n\t\tsetCurrent(trackIndex, entry, true);\n\t\t_queue->drain();\n\t} else {\n\t\tlast->_next = entry;\n\t\tentry->_previous = last;\n\t\tif (delay <= 0) delay += last->getTrackComplete() - entry->_mixDuration;\n\t}\n\n\tentry->_delay = delay;\n\treturn entry;\n}\n\nTrackEntry *AnimationState::setEmptyAnimation(size_t trackIndex, float mixDuration) {\n\tTrackEntry *entry = setAnimation(trackIndex, AnimationState::getEmptyAnimation(), false);\n\tentry->_mixDuration = mixDuration;\n\tentry->_trackEnd = mixDuration;\n\treturn entry;\n}\n\nTrackEntry *AnimationState::addEmptyAnimation(size_t trackIndex, float mixDuration, float delay) {\n\tTrackEntry *entry = addAnimation(trackIndex, AnimationState::getEmptyAnimation(), false, delay);\n\tif (delay <= 0) entry->_delay += entry->_mixDuration - mixDuration;\n\tentry->_mixDuration = mixDuration;\n\tentry->_trackEnd = mixDuration;\n\treturn entry;\n}\n\nvoid AnimationState::setEmptyAnimations(float mixDuration) {\n\tbool oldDrainDisabled = _queue->_drainDisabled;\n\t_queue->_drainDisabled = true;\n\tfor (size_t i = 0, n = _tracks.size(); i < n; ++i) {\n\t\tTrackEntry *current = _tracks[i];\n\t\tif (current != NULL) {\n\t\t\tsetEmptyAnimation(i, mixDuration);\n\t\t}\n\t}\n\t_queue->_drainDisabled = oldDrainDisabled;\n\t_queue->drain();\n}\n\nTrackEntry *AnimationState::getCurrent(size_t trackIndex) {\n\treturn trackIndex >= _tracks.size() ? NULL : _tracks[trackIndex];\n}\n\nAnimationStateData *AnimationState::getData() {\n\treturn _data;\n}\n\nVector<TrackEntry *> &AnimationState::getTracks() {\n\treturn _tracks;\n}\n\nfloat AnimationState::getTimeScale() {\n\treturn _timeScale;\n}\n\nvoid AnimationState::setTimeScale(float inValue) {\n\t_timeScale = inValue;\n}\n\nvoid AnimationState::setListener(AnimationStateListener inValue) {\n\t_listener = inValue;\n\t_listenerObject = NULL;\n}\n\nvoid AnimationState::setListener(AnimationStateListenerObject *inValue) {\n\t_listener = dummyOnAnimationEventFunc;\n\t_listenerObject = inValue;\n}\n\nvoid AnimationState::disableQueue() {\n\t_queue->_drainDisabled = true;\n}\n\nvoid AnimationState::enableQueue() {\n\t_queue->_drainDisabled = false;\n}\n\nvoid AnimationState::setManualTrackEntryDisposal(bool inValue) {\n\t_manualTrackEntryDisposal = inValue;\n}\n\nbool AnimationState::getManualTrackEntryDisposal() {\n\treturn _manualTrackEntryDisposal;\n}\n\nvoid AnimationState::disposeTrackEntry(TrackEntry *entry) {\n\tentry->reset();\n\t_trackEntryPool.free(entry);\n}\n\nAnimation *AnimationState::getEmptyAnimation() {\n\tstatic Vector<Timeline *> timelines;\n\tstatic Animation ret(String(\"<empty>\"), timelines, 0);\n\treturn &ret;\n}\n\nvoid AnimationState::applyAttachmentTimeline(AttachmentTimeline *attachmentTimeline, Skeleton &skeleton, float time,\n\t\t\t\t\t\t\t\t\t\t\t MixBlend blend, bool attachments) {\n\tSlot *slot = skeleton.getSlots()[attachmentTimeline->getSlotIndex()];\n\tif (!slot->getBone().isActive()) return;\n\n\tVector<float> &frames = attachmentTimeline->getFrames();\n\tif (time < frames[0]) {\n\t\tif (blend == MixBlend_Setup || blend == MixBlend_First)\n\t\t\tsetAttachment(skeleton, *slot, slot->getData().getAttachmentName(), attachments);\n\t} else {\n\t\tsetAttachment(skeleton, *slot, attachmentTimeline->getAttachmentNames()[Animation::search(frames, time)],\n\t\t\t\t\t  attachments);\n\t}\n\n\t/* If an attachment wasn't set (ie before the first frame or attachments is false), set the setup attachment later.*/\n\tif (slot->getAttachmentState() <= _unkeyedState) slot->setAttachmentState(_unkeyedState + Setup);\n}\n\n\nvoid AnimationState::applyRotateTimeline(RotateTimeline *rotateTimeline, Skeleton &skeleton, float time, float alpha,\n\t\t\t\t\t\t\t\t\t\t MixBlend blend, Vector<float> &timelinesRotation, size_t i, bool firstFrame) {\n\tif (firstFrame) timelinesRotation[i] = 0;\n\n\tif (alpha == 1) {\n\t\trotateTimeline->apply(skeleton, 0, time, NULL, 1, blend, MixDirection_In);\n\t\treturn;\n\t}\n\n\tBone *bone = skeleton._bones[rotateTimeline->_boneIndex];\n\tif (!bone->isActive()) return;\n\tVector<float> &frames = rotateTimeline->_frames;\n\tfloat r1, r2;\n\tif (time < frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tbone->_rotation = bone->_data._rotation;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tr1 = bone->_rotation;\n\t\t\t\tr2 = bone->_data._rotation;\n\t\t}\n\t} else {\n\t\tr1 = blend == MixBlend_Setup ? bone->_data._rotation : bone->_rotation;\n\t\tr2 = bone->_data._rotation + rotateTimeline->getCurveValue(time);\n\t}\n\n\t// Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.\n\tfloat total, diff = r2 - r1;\n\tdiff -= MathUtil::ceil(diff / 360 - 0.5) * 360;\n\tif (diff == 0) {\n\t\ttotal = timelinesRotation[i];\n\t} else {\n\t\tfloat lastTotal, lastDiff;\n\t\tif (firstFrame) {\n\t\t\tlastTotal = 0;\n\t\t\tlastDiff = diff;\n\t\t} else {\n\t\t\tlastTotal = timelinesRotation[i];\n\t\t\tlastDiff = timelinesRotation[i + 1];\n\t\t}\n\t\tfloat loops = lastTotal - MathUtil::fmod(lastTotal, 360.f);\n\t\ttotal = diff + loops;\n\t\tbool current = diff >= 0, dir = lastTotal >= 0;\n\t\tif (MathUtil::abs(lastDiff) <= 90 && MathUtil::sign(lastDiff) != MathUtil::sign(diff)) {\n\t\t\tif (MathUtil::abs(lastTotal - loops) > 180) {\n\t\t\t\ttotal += 360.f * MathUtil::sign(lastTotal);\n\t\t\t\tdir = current;\n\t\t\t} else if (loops != 0)\n\t\t\t\ttotal -= 360.f * MathUtil::sign(lastTotal);\n\t\t\telse\n\t\t\t\tdir = current;\n\t\t}\n\t\tif (dir != current) {\n\t\t\ttotal += 360 * MathUtil::sign(lastTotal);\n\t\t}\n\t\ttimelinesRotation[i] = total;\n\t}\n\ttimelinesRotation[i + 1] = diff;\n\tbone->_rotation = r1 + total * alpha;\n}\n\nbool AnimationState::updateMixingFrom(TrackEntry *to, float delta) {\n\tTrackEntry *from = to->_mixingFrom;\n\tif (from == NULL) {\n\t\treturn true;\n\t}\n\n\tbool finished = updateMixingFrom(from, delta);\n\n\tfrom->_animationLast = from->_nextAnimationLast;\n\tfrom->_trackLast = from->_nextTrackLast;\n\n\tif (to->_nextTrackLast != -1) {                             // The from entry was applied at least once.\n\t\tbool discard = to->_mixTime == 0 && from->_mixTime == 0;// Discard the from entry when neither have advanced yet.\n\t\tif (to->_mixTime >= to->_mixDuration || discard) {\n\t\t\t// Require totalAlpha == 0 to ensure mixing is complete or the transition is a single frame or discarded.\n\t\t\tif (from->_totalAlpha == 0 || to->_mixDuration == 0 || discard) {\n\t\t\t\tto->_mixingFrom = from->_mixingFrom;\n\t\t\t\tif (from->_mixingFrom) from->_mixingFrom->_mixingTo = to;\n\t\t\t\tto->_interruptAlpha = from->_interruptAlpha;\n\t\t\t\t_queue->end(from);\n\t\t\t}\n\t\t\treturn finished;\n\t\t}\n\t}\n\n\tfrom->_trackTime += delta * from->_timeScale;\n\tto->_mixTime += delta;\n\n\treturn false;\n}\n\nfloat AnimationState::applyMixingFrom(TrackEntry *to, Skeleton &skeleton, MixBlend blend) {\n\tTrackEntry *from = to->_mixingFrom;\n\tif (from->_mixingFrom != NULL) applyMixingFrom(from, skeleton, blend);\n\n\tfloat mix;\n\tif (to->_mixDuration == 0) {\n\t\t// Single frame mix to undo mixingFrom changes.\n\t\tmix = 1;\n\t\tif (blend == MixBlend_First) blend = MixBlend_Setup;\n\t} else {\n\t\tmix = to->_mixTime / to->_mixDuration;\n\t\tif (mix > 1) {\n\t\t\tmix = 1;\n\t\t}\n\t\tif (blend != MixBlend_First) blend = from->_mixBlend;\n\t}\n\n\tbool attachments = mix < from->_mixAttachmentThreshold, drawOrder = mix < from->_mixDrawOrderThreshold;\n\tVector<Timeline *> &timelines = from->_animation->_timelines;\n\tsize_t timelineCount = timelines.size();\n\tfloat alphaHold = from->_alpha * to->_interruptAlpha, alphaMix = alphaHold * (1 - mix);\n\tfloat animationLast = from->_animationLast, animationTime = from->getAnimationTime();\n\tfloat applyTime = animationTime;\n\tVector<Event *> *events = NULL;\n\tif (from->_reverse) {\n\t\tapplyTime = from->_animation->_duration - applyTime;\n\t} else {\n\t\tif (mix < from->_eventThreshold) events = &_events;\n\t}\n\n\tif (blend == MixBlend_Add) {\n\t\tfor (size_t i = 0; i < timelineCount; i++)\n\t\t\ttimelines[i]->apply(skeleton, animationLast, applyTime, events, alphaMix, blend, MixDirection_Out);\n\t} else {\n\t\tVector<int> &timelineMode = from->_timelineMode;\n\t\tVector<TrackEntry *> &timelineHoldMix = from->_timelineHoldMix;\n\n\t\tbool shortestRotation = from->_shortestRotation;\n\t\tbool firstFrame = !shortestRotation && from->_timelinesRotation.size() != timelines.size() << 1;\n\t\tif (firstFrame) from->_timelinesRotation.setSize(timelines.size() << 1, 0);\n\n\t\tVector<float> &timelinesRotation = from->_timelinesRotation;\n\n\t\tfrom->_totalAlpha = 0;\n\t\tfor (size_t i = 0; i < timelineCount; i++) {\n\t\t\tTimeline *timeline = timelines[i];\n\t\t\tMixDirection direction = MixDirection_Out;\n\t\t\tMixBlend timelineBlend;\n\t\t\tfloat alpha;\n\t\t\tswitch (timelineMode[i]) {\n\t\t\t\tcase Subsequent:\n\t\t\t\t\tif (!drawOrder && (timeline->getRTTI().isExactly(DrawOrderTimeline::rtti))) continue;\n\t\t\t\t\ttimelineBlend = blend;\n\t\t\t\t\talpha = alphaMix;\n\t\t\t\t\tbreak;\n\t\t\t\tcase First:\n\t\t\t\t\ttimelineBlend = MixBlend_Setup;\n\t\t\t\t\talpha = alphaMix;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoldSubsequent:\n\t\t\t\t\ttimelineBlend = blend;\n\t\t\t\t\talpha = alphaHold;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoldFirst:\n\t\t\t\t\ttimelineBlend = MixBlend_Setup;\n\t\t\t\t\talpha = alphaHold;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\ttimelineBlend = MixBlend_Setup;\n\t\t\t\t\tTrackEntry *holdMix = timelineHoldMix[i];\n\t\t\t\t\talpha = alphaHold * MathUtil::max(0.0f, 1.0f - holdMix->_mixTime / holdMix->_mixDuration);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfrom->_totalAlpha += alpha;\n\t\t\tif (!shortestRotation && (timeline->getRTTI().isExactly(RotateTimeline::rtti))) {\n\t\t\t\tapplyRotateTimeline((RotateTimeline *) timeline, skeleton, applyTime, alpha, timelineBlend,\n\t\t\t\t\t\t\t\t\ttimelinesRotation, i << 1, firstFrame);\n\t\t\t} else if (timeline->getRTTI().isExactly(AttachmentTimeline::rtti)) {\n\t\t\t\tapplyAttachmentTimeline(static_cast<AttachmentTimeline *>(timeline), skeleton, applyTime, timelineBlend,\n\t\t\t\t\t\t\t\t\t\tattachments && alpha >= from->_alphaAttachmentThreshold);\n\t\t\t} else {\n\t\t\t\tif (drawOrder && timeline->getRTTI().isExactly(DrawOrderTimeline::rtti) &&\n\t\t\t\t\ttimelineBlend == MixBlend_Setup)\n\t\t\t\t\tdirection = MixDirection_In;\n\t\t\t\ttimeline->apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (to->_mixDuration > 0) {\n\t\tqueueEvents(from, animationTime);\n\t}\n\n\t_events.clear();\n\tfrom->_nextAnimationLast = animationTime;\n\tfrom->_nextTrackLast = from->_trackTime;\n\n\treturn mix;\n}\n\nvoid AnimationState::setAttachment(Skeleton &skeleton, Slot &slot, const String &attachmentName, bool attachments) {\n\tslot.setAttachment(\n\t\t\tattachmentName.isEmpty() ? NULL : skeleton.getAttachment(slot.getData().getIndex(), attachmentName));\n\tif (attachments) slot.setAttachmentState(_unkeyedState + Current);\n}\n\nvoid AnimationState::queueEvents(TrackEntry *entry, float animationTime) {\n\tfloat animationStart = entry->_animationStart, animationEnd = entry->_animationEnd;\n\tfloat duration = animationEnd - animationStart;\n\tfloat trackLastWrapped = duration != 0 ? MathUtil::fmod(entry->_trackLast, duration) : MathUtil::quietNan();\n\n\t// Queue events before complete.\n\tsize_t i = 0, n = _events.size();\n\tfor (; i < n; ++i) {\n\t\tEvent *e = _events[i];\n\t\tif (e->_time < trackLastWrapped) break;\n\t\tif (e->_time > animationEnd) continue;// Discard events outside animation start/end.\n\t\t_queue->event(entry, e);\n\t}\n\n\t// Queue complete if completed a loop iteration or the animation.\n\tbool complete = false;\n\tif (entry->_loop) {\n\t\tif (duration == 0)\n\t\t\tcomplete = true;\n\t\telse {\n\t\t\tint cycles = (int) (entry->_trackTime / duration);\n\t\t\tcomplete = cycles > 0 && cycles > (int) (entry->_trackLast / duration);\n\t\t}\n\t} else {\n\t\tcomplete = animationTime >= animationEnd && entry->_animationLast < animationEnd;\n\t}\n\tif (complete) _queue->complete(entry);\n\n\t// Queue events after complete.\n\tfor (; i < n; ++i) {\n\t\tEvent *e = _events[i];\n\t\tif (e->_time < animationStart) continue;// Discard events outside animation start/end.\n\t\t_queue->event(entry, e);\n\t}\n}\n\nvoid AnimationState::setCurrent(size_t index, TrackEntry *current, bool interrupt) {\n\tTrackEntry *from = expandToIndex(index);\n\t_tracks[index] = current;\n\tcurrent->_previous = NULL;\n\n\tif (from != NULL) {\n\t\tif (interrupt) _queue->interrupt(from);\n\n\t\tcurrent->_mixingFrom = from;\n\t\tfrom->_mixingTo = current;\n\t\tcurrent->_mixTime = 0;\n\n\t\t// Store interrupted mix percentage.\n\t\tif (from->_mixingFrom != NULL && from->_mixDuration > 0) {\n\t\t\tcurrent->_interruptAlpha *= MathUtil::min(1.0f, from->_mixTime / from->_mixDuration);\n\t\t}\n\n\t\tfrom->_timelinesRotation.clear();// Reset rotation for mixing out, in case entry was mixed in.\n\t}\n\n\t_queue->start(current);// triggers animationsChanged\n}\n\nTrackEntry *AnimationState::expandToIndex(size_t index) {\n\tif (index < _tracks.size()) return _tracks[index];\n\twhile (index >= _tracks.size())\n\t\t_tracks.add(NULL);\n\treturn NULL;\n}\n\nTrackEntry *AnimationState::newTrackEntry(size_t trackIndex, Animation *animation, bool loop, TrackEntry *last) {\n\tTrackEntry *entryP = _trackEntryPool.obtain();// Pooling\n\tTrackEntry &entry = *entryP;\n\n\tentry._trackIndex = (int) trackIndex;\n\tentry._animation = animation;\n\tentry._loop = loop;\n\tentry._holdPrevious = 0;\n\n\tentry._reverse = false;\n\tentry._shortestRotation = false;\n\n\tentry._eventThreshold = 0;\n\tentry._alphaAttachmentThreshold = 0;\n\tentry._mixAttachmentThreshold = 0;\n\tentry._mixDrawOrderThreshold = 0;\n\n\tentry._animationStart = 0;\n\tentry._animationEnd = animation->getDuration();\n\tentry._animationLast = -1;\n\tentry._nextAnimationLast = -1;\n\n\tentry._delay = 0;\n\tentry._trackTime = 0;\n\tentry._trackLast = -1;\n\tentry._nextTrackLast = -1;// nextTrackLast == -1 signifies a TrackEntry that wasn't applied yet.\n\tentry._trackEnd = FLT_MAX;// loop ? float.MaxValue : animation.Duration;\n\tentry._timeScale = 1;\n\n\tentry._alpha = 1;\n\tentry._mixTime = 0;\n\tentry._mixDuration = (last == NULL) ? 0 : _data->getMix(last->_animation, animation);\n\tentry._interruptAlpha = 1;\n\tentry._totalAlpha = 0;\n\tentry._mixBlend = MixBlend_Replace;\n\n\treturn entryP;\n}\n\nvoid AnimationState::clearNext(TrackEntry *entry) {\n\tTrackEntry *next = entry->_next;\n\twhile (next != NULL) {\n\t\t_queue->dispose(next);\n\t\tnext = next->_next;\n\t}\n\tentry->_next = NULL;\n}\n\nvoid AnimationState::animationsChanged() {\n\t_animationsChanged = false;\n\n\t_propertyIDs.clear();\n\n\tfor (size_t i = 0, n = _tracks.size(); i < n; ++i) {\n\t\tTrackEntry *entry = _tracks[i];\n\t\tif (!entry) continue;\n\n\t\twhile (entry->_mixingFrom != NULL)\n\t\t\tentry = entry->_mixingFrom;\n\n\t\tdo {\n\t\t\tif (entry->_mixingTo == NULL || entry->_mixBlend != MixBlend_Add) computeHold(entry);\n\t\t\tentry = entry->_mixingTo;\n\t\t} while (entry != NULL);\n\t}\n}\n\nvoid AnimationState::computeHold(TrackEntry *entry) {\n\tTrackEntry *to = entry->_mixingTo;\n\tVector<Timeline *> &timelines = entry->_animation->_timelines;\n\tsize_t timelinesCount = timelines.size();\n\tVector<int> &timelineMode = entry->_timelineMode;\n\ttimelineMode.setSize(timelinesCount, 0);\n\tVector<TrackEntry *> &timelineHoldMix = entry->_timelineHoldMix;\n\ttimelineHoldMix.setSize(timelinesCount, 0);\n\n\tif (to != NULL && to->_holdPrevious) {\n\t\tfor (size_t i = 0; i < timelinesCount; i++) {\n\t\t\ttimelineMode[i] = _propertyIDs.addAll(timelines[i]->getPropertyIds(), true) ? HoldFirst : HoldSubsequent;\n\t\t}\n\t\treturn;\n\t}\n\n\t// outer:\n\tsize_t i = 0;\ncontinue_outer:\n\tfor (; i < timelinesCount; ++i) {\n\t\tTimeline *timeline = timelines[i];\n\t\tVector<PropertyId> &ids = timeline->getPropertyIds();\n\t\tif (!_propertyIDs.addAll(ids, true)) {\n\t\t\ttimelineMode[i] = Subsequent;\n\t\t} else {\n\t\t\tif (to == NULL || timeline->getRTTI().isExactly(AttachmentTimeline::rtti) ||\n\t\t\t\ttimeline->getRTTI().isExactly(DrawOrderTimeline::rtti) ||\n\t\t\t\ttimeline->getRTTI().isExactly(EventTimeline::rtti) || !to->_animation->hasTimeline(ids)) {\n\t\t\t\ttimelineMode[i] = First;\n\t\t\t} else {\n\t\t\t\tfor (TrackEntry *next = to->_mixingTo; next != NULL; next = next->_mixingTo) {\n\t\t\t\t\tif (next->_animation->hasTimeline(ids)) continue;\n\t\t\t\t\tif (next->_mixDuration > 0) {\n\t\t\t\t\t\ttimelineMode[i] = HoldMix;\n\t\t\t\t\t\ttimelineHoldMix[i] = next;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tgoto continue_outer;// continue outer;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ttimelineMode[i] = HoldFirst;\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/AnimationStateData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/AnimationStateData.h>\n#include <spine/Animation.h>\n#include <spine/SkeletonData.h>\n\nusing namespace spine;\n\nAnimationStateData::AnimationStateData(SkeletonData *skeletonData) : _skeletonData(skeletonData), _defaultMix(0) {\n}\n\nvoid AnimationStateData::setMix(const String &fromName, const String &toName, float duration) {\n\tAnimation *from = _skeletonData->findAnimation(fromName);\n\tAnimation *to = _skeletonData->findAnimation(toName);\n\n\tsetMix(from, to, duration);\n}\n\nvoid AnimationStateData::setMix(Animation *from, Animation *to, float duration) {\n\tassert(from != NULL);\n\tassert(to != NULL);\n\n\tAnimationPair key(from, to);\n\t_animationToMixTime.put(key, duration);\n}\n\nfloat AnimationStateData::getMix(Animation *from, Animation *to) {\n\tassert(from != NULL);\n\tassert(to != NULL);\n\n\tAnimationPair key(from, to);\n\n\tif (_animationToMixTime.containsKey(key)) return _animationToMixTime[key];\n\treturn _defaultMix;\n}\n\nSkeletonData *AnimationStateData::getSkeletonData() {\n\treturn _skeletonData;\n}\n\nfloat AnimationStateData::getDefaultMix() {\n\treturn _defaultMix;\n}\n\nvoid AnimationStateData::setDefaultMix(float inValue) {\n\t_defaultMix = inValue;\n}\n\nvoid AnimationStateData::clear() {\n\t_defaultMix = 0;\n\t_animationToMixTime.clear();\n}\n\nAnimationStateData::AnimationPair::AnimationPair(Animation *a1, Animation *a2) : _a1(a1), _a2(a2) {\n}\n\nbool AnimationStateData::AnimationPair::operator==(const AnimationPair &other) const {\n\treturn _a1->_name == other._a1->_name && _a2->_name == other._a2->_name;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Atlas.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Atlas.h>\n#include <spine/ContainerUtil.h>\n#include <spine/TextureLoader.h>\n\n#include <ctype.h>\n\nusing namespace spine;\n\nAtlas::Atlas(const String &path, TextureLoader *textureLoader, bool createTexture) : _textureLoader(textureLoader) {\n\tint dirLength;\n\tchar *dir;\n\tint length;\n\tconst char *data;\n\n\t/* Get directory from atlas path. */\n\tconst char *lastForwardSlash = strrchr(path.buffer(), '/');\n\tconst char *lastBackwardSlash = strrchr(path.buffer(), '\\\\');\n\tconst char *lastSlash = lastForwardSlash > lastBackwardSlash ? lastForwardSlash : lastBackwardSlash;\n\tif (lastSlash == path) lastSlash++; /* Never drop starting slash. */\n\tdirLength = (int) (lastSlash ? lastSlash - path.buffer() : 0);\n\tdir = SpineExtension::calloc<char>(dirLength + 1, __FILE__, __LINE__);\n\tmemcpy(dir, path.buffer(), dirLength);\n\tdir[dirLength] = '\\0';\n\n\tdata = SpineExtension::readFile(path, &length);\n\tif (data) {\n\t\tload(data, length, dir, createTexture);\n\t}\n\n\tSpineExtension::free(data, __FILE__, __LINE__);\n\tSpineExtension::free(dir, __FILE__, __LINE__);\n}\n\nAtlas::Atlas(const char *data, int length, const char *dir, TextureLoader *textureLoader, bool createTexture)\n\t: _textureLoader(\n\t\t\t  textureLoader) {\n\tload(data, length, dir, createTexture);\n}\n\nAtlas::~Atlas() {\n\tif (_textureLoader) {\n\t\tfor (size_t i = 0, n = _pages.size(); i < n; ++i) {\n\t\t\t_textureLoader->unload(_pages[i]->texture);\n\t\t}\n\t}\n\tContainerUtil::cleanUpVectorOfPointers(_pages);\n\tContainerUtil::cleanUpVectorOfPointers(_regions);\n}\n\nvoid Atlas::flipV() {\n\tfor (size_t i = 0, n = _regions.size(); i < n; ++i) {\n\t\tAtlasRegion *regionP = _regions[i];\n\t\tAtlasRegion &region = *regionP;\n\t\tregion.v = 1 - region.v;\n\t\tregion.v2 = 1 - region.v2;\n\t}\n}\n\nAtlasRegion *Atlas::findRegion(const String &name) {\n\tfor (size_t i = 0, n = _regions.size(); i < n; ++i)\n\t\tif (_regions[i]->name == name) return _regions[i];\n\treturn NULL;\n}\n\nVector<AtlasPage *> &Atlas::getPages() {\n\treturn _pages;\n}\n\nVector<AtlasRegion *> &Atlas::getRegions() {\n\treturn _regions;\n}\n\nstruct SimpleString {\n\tchar *start;\n\tchar *end;\n\tint length;\n\n\tSimpleString trim() {\n\t\twhile (isspace((unsigned char) *start) && start < end)\n\t\t\tstart++;\n\t\tif (start == end) {\n\t\t\tlength = (int) (end - start);\n\t\t\treturn *this;\n\t\t}\n\t\tend--;\n\t\twhile (((unsigned char) *end == '\\r') && end >= start)\n\t\t\tend--;\n\t\tend++;\n\t\tlength = (int) (end - start);\n\t\treturn *this;\n\t}\n\n\tint indexOf(char needle) {\n\t\tchar *c = start;\n\t\twhile (c < end) {\n\t\t\tif (*c == needle) return (int) (c - start);\n\t\t\tc++;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tint indexOf(char needle, int at) {\n\t\tchar *c = start + at;\n\t\twhile (c < end) {\n\t\t\tif (*c == needle) return (int) (c - start);\n\t\t\tc++;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tSimpleString substr(int s, int e) {\n\t\te = s + e;\n\t\tSimpleString result;\n\t\tresult.start = start + s;\n\t\tresult.end = start + e;\n\t\tresult.length = e - s;\n\t\treturn result;\n\t}\n\n\tSimpleString substr(int s) {\n\t\tSimpleString result;\n\t\tresult.start = start + s;\n\t\tresult.end = end;\n\t\tresult.length = (int) (result.end - result.start);\n\t\treturn result;\n\t}\n\n\tbool equals(const char *str) {\n\t\tint otherLen = (int) strlen(str);\n\t\tif (length != otherLen) return false;\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (start[i] != str[i]) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tchar *copy() {\n\t\tchar *string = SpineExtension::calloc<char>(length + 1, __FILE__, __LINE__);\n\t\tmemcpy(string, start, length);\n\t\tstring[length] = '\\0';\n\t\treturn string;\n\t}\n\n\tint toInt() {\n\t\treturn (int) strtol(start, &end, 10);\n\t}\n};\n\nstruct AtlasInput {\n\tconst char *start;\n\tconst char *end;\n\tchar *index;\n\tint length;\n\tSimpleString line;\n\n\tAtlasInput(const char *data, int length) : start(data), end(data + length), index((char *) data), length(length) {}\n\n\tSimpleString *readLine() {\n\t\tif (index >= end) return 0;\n\t\tline.start = index;\n\t\twhile (index < end && *index != '\\n')\n\t\t\tindex++;\n\t\tline.end = index;\n\t\tif (index != end) index++;\n\t\tline = line.trim();\n\t\tline.length = (int) (end - start);\n\t\treturn &line;\n\t}\n\n\tstatic int readEntry(SimpleString entry[5], SimpleString *line) {\n\t\tif (line == NULL) return 0;\n\t\tline->trim();\n\t\tif (line->length == 0) return 0;\n\n\t\tint colon = line->indexOf(':');\n\t\tif (colon == -1) return 0;\n\t\tentry[0] = line->substr(0, colon).trim();\n\t\tfor (int i = 1, lastMatch = colon + 1;; i++) {\n\t\t\tint comma = line->indexOf(',', lastMatch);\n\t\t\tif (comma == -1) {\n\t\t\t\tentry[i] = line->substr(lastMatch).trim();\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tentry[i] = line->substr(lastMatch, comma - lastMatch).trim();\n\t\t\tlastMatch = comma + 1;\n\t\t\tif (i == 4) return 4;\n\t\t}\n\t}\n};\n\nint indexOf(const char **array, int count, SimpleString *str) {\n\tfor (int i = 0; i < count; i++)\n\t\tif (str->equals(array[i])) return i;\n\treturn 0;\n}\n\nvoid Atlas::load(const char *begin, int length, const char *dir, bool createTexture) {\n\tstatic const char *formatNames[] = {\"\", \"Alpha\", \"Intensity\", \"LuminanceAlpha\", \"RGB565\", \"RGBA4444\", \"RGB888\",\n\t\t\t\t\t\t\t\t\t\t\"RGBA8888\"};\n\tstatic const char *textureFilterNames[] = {\"\", \"Nearest\", \"Linear\", \"MipMap\", \"MipMapNearestNearest\",\n\t\t\t\t\t\t\t\t\t\t\t   \"MipMapLinearNearest\",\n\t\t\t\t\t\t\t\t\t\t\t   \"MipMapNearestLinear\", \"MipMapLinearLinear\"};\n\n\tint dirLength = (int) strlen(dir);\n\tint needsSlash = dirLength > 0 && dir[dirLength - 1] != '/' && dir[dirLength - 1] != '\\\\';\n\tAtlasInput reader(begin, length);\n\tSimpleString entry[5];\n\tAtlasPage *page = NULL;\n\n\tSimpleString *line = reader.readLine();\n\twhile (line != NULL && line->length == 0)\n\t\tline = reader.readLine();\n\n\twhile (true) {\n\t\tif (line == NULL || line->length == 0) break;\n\t\tif (reader.readEntry(entry, line) == 0) break;\n\t\tline = reader.readLine();\n\t}\n\n\twhile (true) {\n\t\tif (line == NULL) break;\n\t\tif (line->trim().length == 0) {\n\t\t\tpage = NULL;\n\t\t\tline = reader.readLine();\n\t\t} else if (page == NULL) {\n\t\t\tchar *name = line->copy();\n\t\t\tchar *path = SpineExtension::calloc<char>(dirLength + needsSlash + strlen(name) + 1, __FILE__, __LINE__);\n\t\t\tmemcpy(path, dir, dirLength);\n\t\t\tif (needsSlash) path[dirLength] = '/';\n\t\t\tstrcpy(path + dirLength + needsSlash, name);\n\t\t\tpage = new (__FILE__, __LINE__) AtlasPage(String(name, true));\n\n\t\t\twhile (true) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tif (reader.readEntry(entry, line) == 0) break;\n\t\t\t\tif (entry[0].equals(\"size\")) {\n\t\t\t\t\tpage->width = entry[1].toInt();\n\t\t\t\t\tpage->height = entry[2].toInt();\n\t\t\t\t} else if (entry[0].equals(\"format\")) {\n\t\t\t\t\tpage->format = (Format) indexOf(formatNames, 8, &entry[1]);\n\t\t\t\t} else if (entry[0].equals(\"filter\")) {\n\t\t\t\t\tpage->minFilter = (TEXTURE_FILTER_ENUM) indexOf(textureFilterNames, 8, &entry[1]);\n\t\t\t\t\tpage->magFilter = (TEXTURE_FILTER_ENUM) indexOf(textureFilterNames, 8, &entry[2]);\n\t\t\t\t} else if (entry[0].equals(\"repeat\")) {\n\t\t\t\t\tpage->uWrap = TextureWrap_ClampToEdge;\n\t\t\t\t\tpage->vWrap = TextureWrap_ClampToEdge;\n\t\t\t\t\tif (entry[1].indexOf('x') != -1) page->uWrap = TextureWrap_Repeat;\n\t\t\t\t\tif (entry[1].indexOf('y') != -1) page->vWrap = TextureWrap_Repeat;\n\t\t\t\t} else if (entry[0].equals(\"pma\")) {\n\t\t\t\t\tpage->pma = entry[1].equals(\"true\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpage->index = (int) _pages.size();\n\t\t\tif (createTexture && _textureLoader) _textureLoader->load(*page, String(path));\n\t\t\tpage->texturePath = String(path, true);\n\t\t\t_pages.add(page);\n\t\t} else {\n\t\t\tAtlasRegion *region = new (__FILE__, __LINE__) AtlasRegion();\n\t\t\tregion->page = page;\n\t\t\tregion->rendererObject = page->texture;\n\t\t\tregion->name = String(line->copy(), true);\n\t\t\twhile (true) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tint count = reader.readEntry(entry, line);\n\t\t\t\tif (count == 0) break;\n\t\t\t\tif (entry[0].equals(\"xy\")) {\n\t\t\t\t\tregion->x = entry[1].toInt();\n\t\t\t\t\tregion->y = entry[2].toInt();\n\t\t\t\t} else if (entry[0].equals(\"size\")) {\n\t\t\t\t\tregion->width = entry[1].toInt();\n\t\t\t\t\tregion->height = entry[2].toInt();\n\t\t\t\t} else if (entry[0].equals(\"bounds\")) {\n\t\t\t\t\tregion->x = entry[1].toInt();\n\t\t\t\t\tregion->y = entry[2].toInt();\n\t\t\t\t\tregion->width = entry[3].toInt();\n\t\t\t\t\tregion->height = entry[4].toInt();\n\t\t\t\t} else if (entry[0].equals(\"offset\")) {\n\t\t\t\t\tregion->offsetX = (float)entry[1].toInt();\n\t\t\t\t\tregion->offsetY = (float)entry[2].toInt();\n\t\t\t\t} else if (entry[0].equals(\"orig\")) {\n\t\t\t\t\tregion->originalWidth = entry[1].toInt();\n\t\t\t\t\tregion->originalHeight = entry[2].toInt();\n\t\t\t\t} else if (entry[0].equals(\"offsets\")) {\n\t\t\t\t\tregion->offsetX = (float)entry[1].toInt();\n\t\t\t\t\tregion->offsetY = (float)entry[2].toInt();\n\t\t\t\t\tregion->originalWidth = entry[3].toInt();\n\t\t\t\t\tregion->originalHeight = entry[4].toInt();\n\t\t\t\t} else if (entry[0].equals(\"rotate\")) {\n\t\t\t\t\tif (entry[1].equals(\"true\")) {\n\t\t\t\t\t\tregion->degrees = 90;\n\t\t\t\t\t} else if (!entry[1].equals(\"false\")) {\n\t\t\t\t\t\tregion->degrees = entry[1].toInt();\n\t\t\t\t\t}\n\t\t\t\t} else if (entry[0].equals(\"index\")) {\n\t\t\t\t\tregion->index = entry[1].toInt();\n\t\t\t\t} else {\n\t\t\t\t\tregion->names.add(String(entry[0].copy()));\n\t\t\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\t\t\tregion->values.add((float)entry[i + 1].toInt());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (region->originalWidth == 0 && region->originalHeight == 0) {\n\t\t\t\tregion->originalWidth = region->width;\n\t\t\t\tregion->originalHeight = region->height;\n\t\t\t}\n\n\t\t\tregion->u = (float) region->x / page->width;\n\t\t\tregion->v = (float) region->y / page->height;\n\t\t\tif (region->degrees == 90) {\n\t\t\t\tregion->u2 = (float) (region->x + region->height) / page->width;\n\t\t\t\tregion->v2 = (float) (region->y + region->width) / page->height;\n\t\t\t} else {\n\t\t\t\tregion->u2 = (float) (region->x + region->width) / page->width;\n\t\t\t\tregion->v2 = (float) (region->y + region->height) / page->height;\n\t\t\t}\n\t\t\t_regions.add(region);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/AtlasAttachmentLoader.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/AtlasAttachmentLoader.h>\n#include <spine/BoundingBoxAttachment.h>\n#include <spine/ClippingAttachment.h>\n#include <spine/MeshAttachment.h>\n#include <spine/PathAttachment.h>\n#include <spine/PointAttachment.h>\n#include <spine/RegionAttachment.h>\n#include <spine/Skin.h>\n\n#include <spine/Atlas.h>\n\nnamespace spine {\n\tRTTI_IMPL(AtlasAttachmentLoader, AttachmentLoader)\n\n\tAtlasAttachmentLoader::AtlasAttachmentLoader(Atlas *atlas) : AttachmentLoader(), _atlas(atlas) {\n\t}\n\n\tbool loadSequence(Atlas *atlas, const String &basePath, Sequence *sequence) {\n\t\tVector<TextureRegion *> &regions = sequence->getRegions();\n\t\tfor (int i = 0, n = (int) regions.size(); i < n; i++) {\n\t\t\tString path = sequence->getPath(basePath, i);\n\t\t\tregions[i] = atlas->findRegion(path);\n\t\t\tif (!regions[i]) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tRegionAttachment *AtlasAttachmentLoader::newRegionAttachment(Skin &skin, const String &name, const String &path, Sequence *sequence) {\n\t\tSP_UNUSED(skin);\n\t\tRegionAttachment *attachment = new (__FILE__, __LINE__) RegionAttachment(name);\n\t\tif (sequence) {\n\t\t\tif (!loadSequence(_atlas, path, sequence)) return NULL;\n\t\t} else {\n\t\t\tAtlasRegion *region = findRegion(path);\n\t\t\tif (!region) return NULL;\n\t\t\tattachment->setRegion(region);\n\t\t}\n\t\treturn attachment;\n\t}\n\n\tMeshAttachment *AtlasAttachmentLoader::newMeshAttachment(Skin &skin, const String &name, const String &path, Sequence *sequence) {\n\t\tSP_UNUSED(skin);\n\t\tMeshAttachment *attachment = new (__FILE__, __LINE__) MeshAttachment(name);\n\n\t\tif (sequence) {\n\t\t\tif (!loadSequence(_atlas, path, sequence)) return NULL;\n\t\t} else {\n\t\t\tAtlasRegion *region = findRegion(path);\n\t\t\tif (!region) return NULL;\n\t\t\tattachment->setRegion(region);\n\t\t}\n\t\treturn attachment;\n\t}\n\n\tBoundingBoxAttachment *AtlasAttachmentLoader::newBoundingBoxAttachment(Skin &skin, const String &name) {\n\t\tSP_UNUSED(skin);\n\t\treturn new (__FILE__, __LINE__) BoundingBoxAttachment(name);\n\t}\n\n\tPathAttachment *AtlasAttachmentLoader::newPathAttachment(Skin &skin, const String &name) {\n\t\tSP_UNUSED(skin);\n\t\treturn new (__FILE__, __LINE__) PathAttachment(name);\n\t}\n\n\tPointAttachment *AtlasAttachmentLoader::newPointAttachment(Skin &skin, const String &name) {\n\t\tSP_UNUSED(skin);\n\t\treturn new (__FILE__, __LINE__) PointAttachment(name);\n\t}\n\n\tClippingAttachment *AtlasAttachmentLoader::newClippingAttachment(Skin &skin, const String &name) {\n\t\tSP_UNUSED(skin);\n\t\treturn new (__FILE__, __LINE__) ClippingAttachment(name);\n\t}\n\n\tvoid AtlasAttachmentLoader::configureAttachment(Attachment *attachment) {\n\t\tSP_UNUSED(attachment);\n\t}\n\n\tAtlasRegion *AtlasAttachmentLoader::findRegion(const String &name) {\n\t\treturn _atlas->findRegion(name);\n\t}\n\n}// namespace spine\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Attachment.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Attachment.h>\n\n#include <assert.h>\n\nusing namespace spine;\n\nRTTI_IMPL_NOPARENT(Attachment)\n\nAttachment::Attachment(const String &name) : _name(name), _refCount(0) {\n\tassert(_name.length() > 0);\n}\n\nAttachment::~Attachment() {\n}\n\nconst String &Attachment::getName() const {\n\treturn _name;\n}\n\nint Attachment::getRefCount() {\n\treturn _refCount;\n}\n\nvoid Attachment::reference() {\n\t_refCount++;\n}\n\nvoid Attachment::dereference() {\n\t_refCount--;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/AttachmentLoader.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/AttachmentLoader.h>\n\n#include <spine/BoundingBoxAttachment.h>\n#include <spine/ClippingAttachment.h>\n#include <spine/MeshAttachment.h>\n#include <spine/PathAttachment.h>\n#include <spine/PointAttachment.h>\n#include <spine/RegionAttachment.h>\n#include <spine/Skin.h>\n\nusing namespace spine;\n\nRTTI_IMPL_NOPARENT(AttachmentLoader)\n\nAttachmentLoader::AttachmentLoader() {\n}\n\nAttachmentLoader::~AttachmentLoader() {\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/AttachmentTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/AttachmentTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/Bone.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(AttachmentTimeline, Timeline)\n\nAttachmentTimeline::AttachmentTimeline(size_t frameCount, int slotIndex) : Timeline(frameCount, 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _slotIndex(slotIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_Attachment << 32) | slotIndex};\n\tsetPropertyIds(ids, 1);\n\n\t_attachmentNames.ensureCapacity(frameCount);\n\tfor (size_t i = 0; i < frameCount; ++i) {\n\t\t_attachmentNames.add(String());\n\t}\n}\n\nAttachmentTimeline::~AttachmentTimeline() {}\n\nvoid AttachmentTimeline::setAttachment(Skeleton &skeleton, Slot &slot, String *attachmentName) {\n\tslot.setAttachment(attachmentName == NULL || attachmentName->isEmpty() ? NULL : skeleton.getAttachment(_slotIndex, *attachmentName));\n}\n\nvoid AttachmentTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t\t   MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(alpha);\n\n\tSlot *slot = skeleton._slots[_slotIndex];\n\tif (!slot->_bone._active) return;\n\n\tif (direction == MixDirection_Out) {\n\t\tif (blend == MixBlend_Setup) setAttachment(skeleton, *slot, &slot->_data._attachmentName);\n\t\treturn;\n\t}\n\n\tif (time < _frames[0]) {\n\t\t// Time is before first frame.\n\t\tif (blend == MixBlend_Setup || blend == MixBlend_First) {\n\t\t\tsetAttachment(skeleton, *slot, &slot->_data._attachmentName);\n\t\t}\n\t\treturn;\n\t}\n\n\tif (time < _frames[0]) {\n\t\tif (blend == MixBlend_Setup || blend == MixBlend_First)\n\t\t\tsetAttachment(skeleton, *slot, &slot->_data._attachmentName);\n\t\treturn;\n\t}\n\n\tsetAttachment(skeleton, *slot, &_attachmentNames[Animation::search(_frames, time)]);\n}\n\nvoid AttachmentTimeline::setFrame(int frame, float time, const String &attachmentName) {\n\t_frames[frame] = time;\n\t_attachmentNames[frame] = attachmentName;\n}\n\nVector<String> &AttachmentTimeline::getAttachmentNames() {\n\treturn _attachmentNames;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Bone.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Bone.h>\n\n#include <spine/BoneData.h>\n#include <spine/Skeleton.h>\n\nusing namespace spine;\n\nRTTI_IMPL(Bone, Updatable)\n\nbool Bone::yDown = false;\n\nvoid Bone::setYDown(bool inValue) {\n\tyDown = inValue;\n}\n\nbool Bone::isYDown() {\n\treturn yDown;\n}\n\nBone::Bone(BoneData &data, Skeleton &skeleton, Bone *parent) : Updatable(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _data(data),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _skeleton(skeleton),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _parent(parent),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _x(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _y(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _rotation(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _scaleX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _scaleY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _shearX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _shearY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _ax(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _ay(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _arotation(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _ascaleX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _ascaleY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _ashearX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _ashearY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _a(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _b(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _worldX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _c(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _d(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _worldY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _sorted(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _active(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _inherit(Inherit_Normal) {\n\tsetToSetupPose();\n}\n\nvoid Bone::update(Physics) {\n\tupdateWorldTransform(_ax, _ay, _arotation, _ascaleX, _ascaleY, _ashearX, _ashearY);\n}\n\nvoid Bone::updateWorldTransform() {\n\tupdateWorldTransform(_x, _y, _rotation, _scaleX, _scaleY, _shearX, _shearY);\n}\n\nvoid Bone::updateWorldTransform(float x, float y, float rotation, float scaleX, float scaleY, float shearX, float shearY) {\n\tfloat pa, pb, pc, pd;\n\tBone *parent = _parent;\n\n\t_ax = x;\n\t_ay = y;\n\t_arotation = rotation;\n\t_ascaleX = scaleX;\n\t_ascaleY = scaleY;\n\t_ashearX = shearX;\n\t_ashearY = shearY;\n\n\tif (!parent) { /* Root bone. */\n\t\tSkeleton &skeleton = this->_skeleton;\n\t\tfloat sx = skeleton.getScaleX();\n\t\tfloat sy = skeleton.getScaleY();\n\t\tfloat rx = (rotation + shearX) * MathUtil::Deg_Rad;\n\t\tfloat ry = (rotation + 90 + shearY) * MathUtil::Deg_Rad;\n\t\t_a = MathUtil::cos(rx) * scaleX * sx;\n\t\t_b = MathUtil::cos(ry) * scaleY * sx;\n\t\t_c = MathUtil::sin(rx) * scaleX * sy;\n\t\t_d = MathUtil::sin(ry) * scaleY * sy;\n\t\t_worldX = x * sx + _skeleton.getX();\n\t\t_worldY = y * sy + _skeleton.getY();\n\t\treturn;\n\t}\n\n\tpa = parent->_a;\n\tpb = parent->_b;\n\tpc = parent->_c;\n\tpd = parent->_d;\n\n\t_worldX = pa * x + pb * y + parent->_worldX;\n\t_worldY = pc * x + pd * y + parent->_worldY;\n\n\tswitch (_inherit) {\n\t\tcase Inherit_Normal: {\n\t\t\tfloat rx = (rotation + shearX) * MathUtil::Deg_Rad;\n\t\t\tfloat ry = (rotation + 90 + shearY) * MathUtil::Deg_Rad;\n\t\t\tfloat la = MathUtil::cos(rx) * scaleX;\n\t\t\tfloat lb = MathUtil::cos(ry) * scaleY;\n\t\t\tfloat lc = MathUtil::sin(rx) * scaleX;\n\t\t\tfloat ld = MathUtil::sin(ry) * scaleY;\n\t\t\t_a = pa * la + pb * lc;\n\t\t\t_b = pa * lb + pb * ld;\n\t\t\t_c = pc * la + pd * lc;\n\t\t\t_d = pc * lb + pd * ld;\n\t\t\treturn;\n\t\t}\n\t\tcase Inherit_OnlyTranslation: {\n\t\t\tfloat rx = (rotation + shearX) * MathUtil::Deg_Rad;\n\t\t\tfloat ry = (rotation + 90 + shearY) * MathUtil::Deg_Rad;\n\t\t\t_a = MathUtil::cos(rx) * scaleX;\n\t\t\t_b = MathUtil::cos(ry) * scaleY;\n\t\t\t_c = MathUtil::sin(rx) * scaleX;\n\t\t\t_d = MathUtil::sin(ry) * scaleY;\n\t\t\tbreak;\n\t\t}\n\t\tcase Inherit_NoRotationOrReflection: {\n\t\t\tfloat s = pa * pa + pc * pc;\n\t\t\tfloat prx;\n\t\t\tif (s > 0.0001f) {\n\t\t\t\ts = MathUtil::abs(pa * pd - pb * pc) / s;\n\t\t\t\tpa /= _skeleton.getScaleX();\n\t\t\t\tpc /= _skeleton.getScaleY();\n\t\t\t\tpb = pc * s;\n\t\t\t\tpd = pa * s;\n\t\t\t\tprx = MathUtil::atan2Deg(pc, pa);\n\t\t\t} else {\n\t\t\t\tpa = 0;\n\t\t\t\tpc = 0;\n\t\t\t\tprx = 90 - MathUtil::atan2Deg(pd, pb);\n\t\t\t}\n\t\t\tfloat rx = (rotation + shearX - prx) * MathUtil::Deg_Rad;\n\t\t\tfloat ry = (rotation + shearY - prx + 90) * MathUtil::Deg_Rad;\n\t\t\tfloat la = MathUtil::cos(rx) * scaleX;\n\t\t\tfloat lb = MathUtil::cos(ry) * scaleY;\n\t\t\tfloat lc = MathUtil::sin(rx) * scaleX;\n\t\t\tfloat ld = MathUtil::sin(ry) * scaleY;\n\t\t\t_a = pa * la - pb * lc;\n\t\t\t_b = pa * lb - pb * ld;\n\t\t\t_c = pc * la + pd * lc;\n\t\t\t_d = pc * lb + pd * ld;\n\t\t\tbreak;\n\t\t}\n\t\tcase Inherit_NoScale:\n\t\tcase Inherit_NoScaleOrReflection: {\n\t\t\trotation *= MathUtil::Deg_Rad;\n\t\t\tfloat cosine = MathUtil::cos(rotation);\n\t\t\tfloat sine = MathUtil::sin(rotation);\n\t\t\tfloat za = (pa * cosine + pb * sine) / _skeleton.getScaleX();\n\t\t\tfloat zc = (pc * cosine + pd * sine) / _skeleton.getScaleY();\n\t\t\tfloat s = MathUtil::sqrt(za * za + zc * zc);\n\t\t\tif (s > 0.00001f) s = 1 / s;\n\t\t\tza *= s;\n\t\t\tzc *= s;\n\t\t\ts = MathUtil::sqrt(za * za + zc * zc);\n\t\t\tif (_inherit == Inherit_NoScale &&\n\t\t\t\t(pa * pd - pb * pc < 0) != (_skeleton.getScaleX() < 0 != _skeleton.getScaleY() < 0))\n\t\t\t\ts = -s;\n\t\t\trotation = MathUtil::Pi / 2 + MathUtil::atan2(zc, za);\n\t\t\tfloat zb = MathUtil::cos(rotation) * s;\n\t\t\tfloat zd = MathUtil::sin(rotation) * s;\n\t\t\tshearX *= MathUtil::Deg_Rad;\n\t\t\tshearY = (90 + shearY) * MathUtil::Deg_Rad;\n\t\t\tfloat la = MathUtil::cos(shearX) * scaleX;\n\t\t\tfloat lb = MathUtil::cos(shearY) * scaleY;\n\t\t\tfloat lc = MathUtil::sin(shearX) * scaleX;\n\t\t\tfloat ld = MathUtil::sin(shearY) * scaleY;\n\t\t\t_a = za * la + zb * lc;\n\t\t\t_b = za * lb + zb * ld;\n\t\t\t_c = zc * la + zd * lc;\n\t\t\t_d = zc * lb + zd * ld;\n\t\t}\n\t}\n\t_a *= _skeleton.getScaleX();\n\t_b *= _skeleton.getScaleX();\n\t_c *= _skeleton.getScaleY();\n\t_d *= _skeleton.getScaleY();\n}\n\nvoid Bone::setToSetupPose() {\n\tBoneData &data = _data;\n\t_x = data.getX();\n\t_y = data.getY();\n\t_rotation = data.getRotation();\n\t_scaleX = data.getScaleX();\n\t_scaleY = data.getScaleY();\n\t_shearX = data.getShearX();\n\t_shearY = data.getShearY();\n\t_inherit = data.getInherit();\n}\n\nvoid Bone::worldToLocal(float worldX, float worldY, float &outLocalX, float &outLocalY) {\n\tfloat a = _a;\n\tfloat b = _b;\n\tfloat c = _c;\n\tfloat d = _d;\n\n\tfloat invDet = 1 / (a * d - b * c);\n\tfloat x = worldX - _worldX;\n\tfloat y = worldY - _worldY;\n\n\toutLocalX = (x * d * invDet - y * b * invDet);\n\toutLocalY = (y * a * invDet - x * c * invDet);\n}\n\nvoid Bone::worldToParent(float worldX, float worldY, float &outParentX, float &outParentY) {\n\tif (!_parent) {\n\t\toutParentX = worldX;\n\t\toutParentY = worldY;\n\t} else {\n\t\t_parent->worldToLocal(worldX, worldY, outParentX, outParentY);\n\t}\n}\n\nvoid Bone::localToWorld(float localX, float localY, float &outWorldX, float &outWorldY) {\n\toutWorldX = localX * _a + localY * _b + _worldX;\n\toutWorldY = localX * _c + localY * _d + _worldY;\n}\n\nvoid Bone::parentToWorld(float worldX, float worldY, float &outX, float &outY) {\n\tif (!_parent) {\n\t\toutX = worldX;\n\t\toutY = worldY;\n\t} else {\n\t\t_parent->localToWorld(worldX, worldY, outX, outY);\n\t}\n}\n\nfloat Bone::worldToLocalRotation(float worldRotation) {\n\tworldRotation *= MathUtil::Deg_Rad;\n\tfloat sine = MathUtil::sin(worldRotation), cosine = MathUtil::cos(worldRotation);\n\treturn MathUtil::atan2Deg(_a * sine - _c * cosine, _d * cosine - _b * sine) + _rotation - _shearX;\n}\n\nfloat Bone::localToWorldRotation(float localRotation) {\n\tlocalRotation = (localRotation - _rotation - _shearX) * MathUtil::Deg_Rad;\n\tfloat sine = MathUtil::sin(localRotation), cosine = MathUtil::cos(localRotation);\n\treturn MathUtil::atan2Deg(cosine * _c + sine * _d, cosine * _a + sine * _b);\n}\n\nvoid Bone::rotateWorld(float degrees) {\n\tdegrees *= MathUtil::Deg_Rad;\n\tfloat sine = MathUtil::sin(degrees), cosine = MathUtil::cos(degrees);\n\tfloat ra = _a, rb = _b;\n\t_a = cosine * ra - sine * _c;\n\t_b = cosine * rb - sine * _d;\n\t_c = sine * ra + cosine * _c;\n\t_d = sine * rb + cosine * _d;\n}\n\nfloat Bone::getWorldToLocalRotationX() {\n\tBone *parent = _parent;\n\tif (!parent) {\n\t\treturn _arotation;\n\t}\n\n\tfloat pa = parent->_a;\n\tfloat pb = parent->_b;\n\tfloat pc = parent->_c;\n\tfloat pd = parent->_d;\n\tfloat a = _a;\n\tfloat c = _c;\n\n\treturn MathUtil::atan2(pa * c - pc * a, pd * a - pb * c) * MathUtil::Rad_Deg;\n}\n\nfloat Bone::getWorldToLocalRotationY() {\n\tBone *parent = _parent;\n\tif (!parent) {\n\t\treturn _arotation;\n\t}\n\n\tfloat pa = parent->_a;\n\tfloat pb = parent->_b;\n\tfloat pc = parent->_c;\n\tfloat pd = parent->_d;\n\tfloat b = _b;\n\tfloat d = _d;\n\n\treturn MathUtil::atan2(pa * d - pc * b, pd * b - pb * d) * MathUtil::Rad_Deg;\n}\n\nBoneData &Bone::getData() {\n\treturn _data;\n}\n\nSkeleton &Bone::getSkeleton() {\n\treturn _skeleton;\n}\n\nBone *Bone::getParent() {\n\treturn _parent;\n}\n\nVector<Bone *> &Bone::getChildren() {\n\treturn _children;\n}\n\nfloat Bone::getX() {\n\treturn _x;\n}\n\nvoid Bone::setX(float inValue) {\n\t_x = inValue;\n}\n\nfloat Bone::getY() {\n\treturn _y;\n}\n\nvoid Bone::setY(float inValue) {\n\t_y = inValue;\n}\n\nfloat Bone::getRotation() {\n\treturn _rotation;\n}\n\nvoid Bone::setRotation(float inValue) {\n\t_rotation = inValue;\n}\n\nfloat Bone::getScaleX() {\n\treturn _scaleX;\n}\n\nvoid Bone::setScaleX(float inValue) {\n\t_scaleX = inValue;\n}\n\nfloat Bone::getScaleY() {\n\treturn _scaleY;\n}\n\nvoid Bone::setScaleY(float inValue) {\n\t_scaleY = inValue;\n}\n\nfloat Bone::getShearX() {\n\treturn _shearX;\n}\n\nvoid Bone::setShearX(float inValue) {\n\t_shearX = inValue;\n}\n\nfloat Bone::getShearY() {\n\treturn _shearY;\n}\n\nvoid Bone::setShearY(float inValue) {\n\t_shearY = inValue;\n}\n\nfloat Bone::getAppliedRotation() {\n\treturn _arotation;\n}\n\nvoid Bone::setAppliedRotation(float inValue) {\n\t_arotation = inValue;\n}\n\nfloat Bone::getAX() {\n\treturn _ax;\n}\n\nvoid Bone::setAX(float inValue) {\n\t_ax = inValue;\n}\n\nfloat Bone::getAY() {\n\treturn _ay;\n}\n\nvoid Bone::setAY(float inValue) {\n\t_ay = inValue;\n}\n\nfloat Bone::getAScaleX() {\n\treturn _ascaleX;\n}\n\nvoid Bone::setAScaleX(float inValue) {\n\t_ascaleX = inValue;\n}\n\nfloat Bone::getAScaleY() {\n\treturn _ascaleY;\n}\n\nvoid Bone::setAScaleY(float inValue) {\n\t_ascaleY = inValue;\n}\n\nfloat Bone::getAShearX() {\n\treturn _ashearX;\n}\n\nvoid Bone::setAShearX(float inValue) {\n\t_ashearX = inValue;\n}\n\nfloat Bone::getAShearY() {\n\treturn _ashearY;\n}\n\nvoid Bone::setAShearY(float inValue) {\n\t_ashearY = inValue;\n}\n\nfloat Bone::getA() {\n\treturn _a;\n}\n\nvoid Bone::setA(float inValue) {\n\t_a = inValue;\n}\n\nfloat Bone::getB() {\n\treturn _b;\n}\n\nvoid Bone::setB(float inValue) {\n\t_b = inValue;\n}\n\nfloat Bone::getC() {\n\treturn _c;\n}\n\nvoid Bone::setC(float inValue) {\n\t_c = inValue;\n}\n\nfloat Bone::getD() {\n\treturn _d;\n}\n\nvoid Bone::setD(float inValue) {\n\t_d = inValue;\n}\n\nfloat Bone::getWorldX() {\n\treturn _worldX;\n}\n\nvoid Bone::setWorldX(float inValue) {\n\t_worldX = inValue;\n}\n\nfloat Bone::getWorldY() {\n\treturn _worldY;\n}\n\nvoid Bone::setWorldY(float inValue) {\n\t_worldY = inValue;\n}\n\nfloat Bone::getWorldRotationX() {\n\treturn MathUtil::atan2Deg(_c, _a);\n}\n\nfloat Bone::getWorldRotationY() {\n\treturn MathUtil::atan2Deg(_d, _b);\n}\n\nfloat Bone::getWorldScaleX() {\n\treturn MathUtil::sqrt(_a * _a + _c * _c);\n}\n\nfloat Bone::getWorldScaleY() {\n\treturn MathUtil::sqrt(_b * _b + _d * _d);\n}\n\nvoid Bone::updateAppliedTransform() {\n\tBone *parent = _parent;\n\tif (!parent) {\n\t\t_ax = _worldX - _skeleton.getX();\n\t\t_ay = _worldY - _skeleton.getY();\n\t\t_arotation = MathUtil::atan2Deg(_c, _a);\n\t\t_ascaleX = MathUtil::sqrt(_a * _a + _c * _c);\n\t\t_ascaleY = MathUtil::sqrt(_b * _b + _d * _d);\n\t\t_ashearX = 0;\n\t\t_ashearY = MathUtil::atan2Deg(_a * _b + _c * _d, _a * _d - _b * _c);\n\t}\n\tfloat pa = parent->_a, pb = parent->_b, pc = parent->_c, pd = parent->_d;\n\tfloat pid = 1 / (pa * pd - pb * pc);\n\tfloat ia = pd * pid, ib = pb * pid, ic = pc * pid, id = pa * pid;\n\tfloat dx = _worldX - parent->_worldX, dy = _worldY - parent->_worldY;\n\t_ax = (dx * ia - dy * ib);\n\t_ay = (dy * id - dx * ic);\n\n\tfloat ra, rb, rc, rd;\n\tif (_inherit == Inherit_OnlyTranslation) {\n\t\tra = _a;\n\t\trb = _b;\n\t\trc = _c;\n\t\trd = _d;\n\t} else {\n\t\tswitch (_inherit) {\n\t\t\tcase Inherit_NoRotationOrReflection: {\n\t\t\t\tfloat s = MathUtil::abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n\t\t\t\tfloat sa = pa / _skeleton.getScaleX();\n\t\t\t\tfloat sc = pc / _skeleton.getScaleY();\n\t\t\t\tpb = -sc * s * _skeleton.getScaleX();\n\t\t\t\tpd = sa * s * _skeleton.getScaleY();\n\t\t\t\tpid = 1 / (pa * pd - pb * pc);\n\t\t\t\tia = pd * pid;\n\t\t\t\tib = pb * pid;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Inherit_NoScale:\n\t\t\tcase Inherit_NoScaleOrReflection: {\n\t\t\t\tfloat r = _rotation * MathUtil::Deg_Rad;\n\t\t\t\tfloat cos = MathUtil::cos(r), sin = MathUtil::sin(r);\n\t\t\t\tpa = (pa * cos + pb * sin) / _skeleton.getScaleX();\n\t\t\t\tpc = (pc * cos + pd * sin) / _skeleton.getScaleY();\n\t\t\t\tfloat s = MathUtil::sqrt(pa * pa + pc * pc);\n\t\t\t\tif (s > 0.00001) s = 1 / s;\n\t\t\t\tpa *= s;\n\t\t\t\tpc *= s;\n\t\t\t\ts = MathUtil::sqrt(pa * pa + pc * pc);\n\t\t\t\tif (_inherit == Inherit_NoScale &&\n\t\t\t\t\tpid < 0 != (_skeleton.getScaleX() < 0 != _skeleton.getScaleY() < 0))\n\t\t\t\t\ts = -s;\n\t\t\t\tr = MathUtil::Pi / 2 + MathUtil::atan2(pc, pa);\n\t\t\t\tpb = MathUtil::cos(r) * s;\n\t\t\t\tpd = MathUtil::sin(r) * s;\n\t\t\t\tpid = 1 / (pa * pd - pb * pc);\n\t\t\t\tia = pd * pid;\n\t\t\t\tib = pb * pid;\n\t\t\t\tic = pc * pid;\n\t\t\t\tid = pa * pid;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Inherit_Normal:\n\t\t\tcase Inherit_OnlyTranslation:\n\t\t\t\tbreak;\n\t\t}\n\t\tra = ia * _a - ib * _c;\n\t\trb = ia * _b - ib * _d;\n\t\trc = id * _c - ic * _a;\n\t\trd = id * _d - ic * _b;\n\t}\n\n\t_ashearX = 0;\n\t_ascaleX = MathUtil::sqrt(ra * ra + rc * rc);\n\tif (_ascaleX > 0.0001f) {\n\t\tfloat det = ra * rd - rb * rc;\n\t\t_ascaleY = det / _ascaleX;\n\t\t_ashearY = -MathUtil::atan2Deg(ra * rb + rc * rd, det);\n\t\t_arotation = MathUtil::atan2Deg(rc, ra);\n\t} else {\n\t\t_ascaleX = 0;\n\t\t_ascaleY = MathUtil::sqrt(rb * rb + rd * rd);\n\t\t_ashearY = 0;\n\t\t_arotation = 90 - MathUtil::atan2Deg(rd, rb);\n\t}\n}\n\nbool Bone::isActive() {\n\treturn _active;\n}\n\nvoid Bone::setActive(bool inValue) {\n\t_active = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/BoneData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/BoneData.h>\n\n#include <assert.h>\n\nusing namespace spine;\n\nBoneData::BoneData(int index, const String &name, BoneData *parent) : _index(index),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _name(name),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _parent(parent),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _length(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _x(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _y(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _rotation(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _scaleX(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _scaleY(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _shearX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _shearY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _inherit(Inherit_Normal),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _skinRequired(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _color(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _icon(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _visible(true) {\n\tassert(index >= 0);\n\tassert(_name.length() > 0);\n}\n\nint BoneData::getIndex() {\n\treturn _index;\n}\n\nconst String &BoneData::getName() {\n\treturn _name;\n}\n\nBoneData *BoneData::getParent() {\n\treturn _parent;\n}\n\nfloat BoneData::getLength() {\n\treturn _length;\n}\n\nvoid BoneData::setLength(float inValue) {\n\t_length = inValue;\n}\n\nfloat BoneData::getX() {\n\treturn _x;\n}\n\nvoid BoneData::setX(float inValue) {\n\t_x = inValue;\n}\n\nfloat BoneData::getY() {\n\treturn _y;\n}\n\nvoid BoneData::setY(float inValue) {\n\t_y = inValue;\n}\n\nfloat BoneData::getRotation() {\n\treturn _rotation;\n}\n\nvoid BoneData::setRotation(float inValue) {\n\t_rotation = inValue;\n}\n\nfloat BoneData::getScaleX() {\n\treturn _scaleX;\n}\n\nvoid BoneData::setScaleX(float inValue) {\n\t_scaleX = inValue;\n}\n\nfloat BoneData::getScaleY() {\n\treturn _scaleY;\n}\n\nvoid BoneData::setScaleY(float inValue) {\n\t_scaleY = inValue;\n}\n\nfloat BoneData::getShearX() {\n\treturn _shearX;\n}\n\nvoid BoneData::setShearX(float inValue) {\n\t_shearX = inValue;\n}\n\nfloat BoneData::getShearY() {\n\treturn _shearY;\n}\n\nvoid BoneData::setShearY(float inValue) {\n\t_shearY = inValue;\n}\n\nInherit BoneData::getInherit() {\n\treturn _inherit;\n}\n\nvoid BoneData::setInherit(Inherit inValue) {\n\t_inherit = inValue;\n}\n\nbool BoneData::isSkinRequired() {\n\treturn _skinRequired;\n}\n\nvoid BoneData::setSkinRequired(bool inValue) {\n\t_skinRequired = inValue;\n}\n\nColor &BoneData::getColor() {\n\treturn _color;\n}\n\nconst String &BoneData::getIcon() {\n\treturn _icon;\n}\n\nvoid BoneData::setIcon(const String &icon) {\n\tthis->_icon = icon;\n}\n\nbool BoneData::isVisible() {\n\treturn _visible;\n}\n\nvoid BoneData::setVisible(bool inValue) {\n\tthis->_visible = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/BoundingBoxAttachment.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/BoundingBoxAttachment.h>\n\nusing namespace spine;\n\nRTTI_IMPL(BoundingBoxAttachment, VertexAttachment)\n\nBoundingBoxAttachment::BoundingBoxAttachment(const String &name) : VertexAttachment(name), _color() {\n}\n\nColor &BoundingBoxAttachment::getColor() {\n\treturn _color;\n}\n\nAttachment *BoundingBoxAttachment::copy() {\n\tBoundingBoxAttachment *copy = new (__FILE__, __LINE__) BoundingBoxAttachment(getName());\n\tcopyTo(copy);\n\treturn copy;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/ClippingAttachment.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/ClippingAttachment.h>\n\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(ClippingAttachment, VertexAttachment)\n\nClippingAttachment::ClippingAttachment(const String &name) : VertexAttachment(name), _endSlot(NULL), _color() {\n}\n\nSlotData *ClippingAttachment::getEndSlot() {\n\treturn _endSlot;\n}\n\nvoid ClippingAttachment::setEndSlot(SlotData *inValue) {\n\t_endSlot = inValue;\n}\n\nColor &ClippingAttachment::getColor() {\n\treturn _color;\n}\n\nAttachment *ClippingAttachment::copy() {\n\tClippingAttachment *copy = new (__FILE__, __LINE__) ClippingAttachment(getName());\n\tcopyTo(copy);\n\tcopy->_endSlot = _endSlot;\n\treturn copy;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/ColorTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/ColorTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/Bone.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(RGBATimeline, CurveTimeline)\n\nRGBATimeline::RGBATimeline(size_t frameCount, size_t bezierCount, int slotIndex) : CurveTimeline(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t RGBATimeline::ENTRIES,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _slotIndex(slotIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_Rgb << 32) | slotIndex,\n\t\t\t\t\t\t((PropertyId) Property_Alpha << 32) | slotIndex};\n\tsetPropertyIds(ids, 2);\n}\n\nRGBATimeline::~RGBATimeline() {\n}\n\nvoid RGBATimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tSlot *slot = skeleton._slots[_slotIndex];\n\tif (!slot->_bone._active) return;\n\n\tif (time < _frames[0]) {\n\t\tColor &color = slot->_color, &setup = slot->_data._color;\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tcolor.set(setup);\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tcolor.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,\n\t\t\t\t\t\t  (setup.a - color.a) * alpha);\n\t\t\tdefault: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfloat r = 0, g = 0, b = 0, a = 0;\n\tint i = Animation::search(_frames, time, RGBATimeline::ENTRIES);\n\tint curveType = (int) _curves[i / RGBATimeline::ENTRIES];\n\tswitch (curveType) {\n\t\tcase RGBATimeline::LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\tr = _frames[i + RGBATimeline::R];\n\t\t\tg = _frames[i + RGBATimeline::G];\n\t\t\tb = _frames[i + RGBATimeline::B];\n\t\t\ta = _frames[i + RGBATimeline::A];\n\t\t\tfloat t = (time - before) / (_frames[i + RGBATimeline::ENTRIES] - before);\n\t\t\tr += (_frames[i + RGBATimeline::ENTRIES + RGBATimeline::R] - r) * t;\n\t\t\tg += (_frames[i + RGBATimeline::ENTRIES + RGBATimeline::G] - g) * t;\n\t\t\tb += (_frames[i + RGBATimeline::ENTRIES + RGBATimeline::B] - b) * t;\n\t\t\ta += (_frames[i + RGBATimeline::ENTRIES + RGBATimeline::A] - a) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase RGBATimeline::STEPPED: {\n\t\t\tr = _frames[i + RGBATimeline::R];\n\t\t\tg = _frames[i + RGBATimeline::G];\n\t\t\tb = _frames[i + RGBATimeline::B];\n\t\t\ta = _frames[i + RGBATimeline::A];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tr = getBezierValue(time, i, RGBATimeline::R, curveType - RGBATimeline::BEZIER);\n\t\t\tg = getBezierValue(time, i, RGBATimeline::G,\n\t\t\t\t\t\t\t   curveType + RGBATimeline::BEZIER_SIZE - RGBATimeline::BEZIER);\n\t\t\tb = getBezierValue(time, i, RGBATimeline::B,\n\t\t\t\t\t\t\t   curveType + RGBATimeline::BEZIER_SIZE * 2 - RGBATimeline::BEZIER);\n\t\t\ta = getBezierValue(time, i, RGBATimeline::A,\n\t\t\t\t\t\t\t   curveType + RGBATimeline::BEZIER_SIZE * 3 - RGBATimeline::BEZIER);\n\t\t}\n\t}\n\tColor &color = slot->_color;\n\tif (alpha == 1)\n\t\tcolor.set(r, g, b, a);\n\telse {\n\t\tif (blend == MixBlend_Setup) color.set(slot->_data._color);\n\t\tcolor.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n\t}\n}\n\nvoid RGBATimeline::setFrame(int frame, float time, float r, float g, float b, float a) {\n\tframe *= ENTRIES;\n\t_frames[frame] = time;\n\t_frames[frame + R] = r;\n\t_frames[frame + G] = g;\n\t_frames[frame + B] = b;\n\t_frames[frame + A] = a;\n}\n\nRTTI_IMPL(RGBTimeline, CurveTimeline)\n\nRGBTimeline::RGBTimeline(size_t frameCount, size_t bezierCount, int slotIndex) : CurveTimeline(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   RGBTimeline::ENTRIES,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _slotIndex(slotIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_Rgb << 32) | slotIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nRGBTimeline::~RGBTimeline() {\n}\n\nvoid RGBTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\tMixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tSlot *slot = skeleton._slots[_slotIndex];\n\tif (!slot->_bone._active) return;\n\n\tif (time < _frames[0]) {\n\t\tColor &color = slot->_color, &setup = slot->_data._color;\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tcolor.set(setup);\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tcolor.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,\n\t\t\t\t\t\t  (setup.a - color.a) * alpha);\n\t\t\tdefault: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfloat r = 0, g = 0, b = 0;\n\tint i = Animation::search(_frames, time, RGBTimeline::ENTRIES);\n\tint curveType = (int) _curves[i / RGBTimeline::ENTRIES];\n\tswitch (curveType) {\n\t\tcase RGBTimeline::LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\tr = _frames[i + RGBTimeline::R];\n\t\t\tg = _frames[i + RGBTimeline::G];\n\t\t\tb = _frames[i + RGBTimeline::B];\n\t\t\tfloat t = (time - before) / (_frames[i + RGBTimeline::ENTRIES] - before);\n\t\t\tr += (_frames[i + RGBTimeline::ENTRIES + RGBTimeline::R] - r) * t;\n\t\t\tg += (_frames[i + RGBTimeline::ENTRIES + RGBTimeline::G] - g) * t;\n\t\t\tb += (_frames[i + RGBTimeline::ENTRIES + RGBTimeline::B] - b) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase RGBTimeline::STEPPED: {\n\t\t\tr = _frames[i + RGBTimeline::R];\n\t\t\tg = _frames[i + RGBTimeline::G];\n\t\t\tb = _frames[i + RGBTimeline::B];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tr = getBezierValue(time, i, RGBTimeline::R, curveType - RGBTimeline::BEZIER);\n\t\t\tg = getBezierValue(time, i, RGBTimeline::G,\n\t\t\t\t\t\t\t   curveType + RGBTimeline::BEZIER_SIZE - RGBTimeline::BEZIER);\n\t\t\tb = getBezierValue(time, i, RGBTimeline::B,\n\t\t\t\t\t\t\t   curveType + RGBTimeline::BEZIER_SIZE * 2 - RGBTimeline::BEZIER);\n\t\t}\n\t}\n\tColor &color = slot->_color;\n\tif (alpha == 1)\n\t\tcolor.set(r, g, b);\n\telse {\n\t\tColor &setup = slot->_data._color;\n\t\tif (blend == MixBlend_Setup) color.set(setup.r, setup.g, setup.b);\n\t\tcolor.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha);\n\t}\n}\n\nvoid RGBTimeline::setFrame(int frame, float time, float r, float g, float b) {\n\tframe *= ENTRIES;\n\t_frames[frame] = time;\n\t_frames[frame + R] = r;\n\t_frames[frame + G] = g;\n\t_frames[frame + B] = b;\n}\n\nRTTI_IMPL(AlphaTimeline, CurveTimeline1)\n\nAlphaTimeline::AlphaTimeline(size_t frameCount, size_t bezierCount, int slotIndex) : CurveTimeline1(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _slotIndex(slotIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_Alpha << 32) | slotIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nAlphaTimeline::~AlphaTimeline() {\n}\n\nvoid AlphaTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t  MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tSlot *slot = skeleton._slots[_slotIndex];\n\tif (!slot->_bone._active) return;\n\n\tif (time < _frames[0]) {// Time is before first frame.\n\t\tColor &color = slot->_color, &setup = slot->_data._color;\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tcolor.a = setup.a;\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tcolor.a += (setup.a - color.a) * alpha;\n\t\t\tdefault: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfloat a = getCurveValue(time);\n\tif (alpha == 1)\n\t\tslot->_color.a = a;\n\telse {\n\t\tif (blend == MixBlend_Setup) slot->_color.a = slot->_data._color.a;\n\t\tslot->_color.a += (a - slot->_color.a) * alpha;\n\t}\n}\n\nRTTI_IMPL(RGBA2Timeline, CurveTimeline)\n\nRGBA2Timeline::RGBA2Timeline(size_t frameCount, size_t bezierCount, int slotIndex) : CurveTimeline(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   RGBA2Timeline::ENTRIES,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _slotIndex(slotIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_Rgb << 32) | slotIndex,\n\t\t\t\t\t\t((PropertyId) Property_Alpha << 32) | slotIndex,\n\t\t\t\t\t\t((PropertyId) Property_Rgb2 << 32) | slotIndex};\n\tsetPropertyIds(ids, 3);\n}\n\nRGBA2Timeline::~RGBA2Timeline() {\n}\n\nvoid RGBA2Timeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t  MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tSlot *slot = skeleton._slots[_slotIndex];\n\tif (!slot->_bone._active) return;\n\n\tif (time < _frames[0]) {\n\t\tColor &light = slot->_color, &dark = slot->_darkColor, &setupLight = slot->_data._color, &setupDark = slot->_data._darkColor;\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tlight.set(setupLight);\n\t\t\t\tdark.set(setupDark.r, setupDark.g, setupDark.b);\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tlight.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha,\n\t\t\t\t\t\t  (setupLight.b - light.b) * alpha,\n\t\t\t\t\t\t  (setupLight.a - light.a) * alpha);\n\t\t\t\tdark.r += (setupDark.r - dark.r) * alpha;\n\t\t\t\tdark.g += (setupDark.g - dark.g) * alpha;\n\t\t\t\tdark.b += (setupDark.b - dark.b) * alpha;\n\t\t\tdefault: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfloat r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n\tint i = Animation::search(_frames, time, RGBA2Timeline::ENTRIES);\n\tint curveType = (int) _curves[i / RGBA2Timeline::ENTRIES];\n\tswitch (curveType) {\n\t\tcase RGBA2Timeline::LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\tr = _frames[i + RGBA2Timeline::R];\n\t\t\tg = _frames[i + RGBA2Timeline::G];\n\t\t\tb = _frames[i + RGBA2Timeline::B];\n\t\t\ta = _frames[i + RGBA2Timeline::A];\n\t\t\tr2 = _frames[i + RGBA2Timeline::R2];\n\t\t\tg2 = _frames[i + RGBA2Timeline::G2];\n\t\t\tb2 = _frames[i + RGBA2Timeline::B2];\n\t\t\tfloat t = (time - before) / (_frames[i + RGBA2Timeline::ENTRIES] - before);\n\t\t\tr += (_frames[i + RGBA2Timeline::ENTRIES + RGBA2Timeline::R] - r) * t;\n\t\t\tg += (_frames[i + RGBA2Timeline::ENTRIES + RGBA2Timeline::G] - g) * t;\n\t\t\tb += (_frames[i + RGBA2Timeline::ENTRIES + RGBA2Timeline::B] - b) * t;\n\t\t\ta += (_frames[i + RGBA2Timeline::ENTRIES + RGBA2Timeline::A] - a) * t;\n\t\t\tr2 += (_frames[i + RGBA2Timeline::ENTRIES + RGBA2Timeline::R2] - r2) * t;\n\t\t\tg2 += (_frames[i + RGBA2Timeline::ENTRIES + RGBA2Timeline::G2] - g2) * t;\n\t\t\tb2 += (_frames[i + RGBA2Timeline::ENTRIES + RGBA2Timeline::B2] - b2) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase RGBA2Timeline::STEPPED: {\n\t\t\tr = _frames[i + RGBA2Timeline::R];\n\t\t\tg = _frames[i + RGBA2Timeline::G];\n\t\t\tb = _frames[i + RGBA2Timeline::B];\n\t\t\ta = _frames[i + RGBA2Timeline::A];\n\t\t\tr2 = _frames[i + RGBA2Timeline::R2];\n\t\t\tg2 = _frames[i + RGBA2Timeline::G2];\n\t\t\tb2 = _frames[i + RGBA2Timeline::B2];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tr = getBezierValue(time, i, RGBA2Timeline::R, curveType - RGBA2Timeline::BEZIER);\n\t\t\tg = getBezierValue(time, i, RGBA2Timeline::G,\n\t\t\t\t\t\t\t   curveType + RGBA2Timeline::BEZIER_SIZE - RGBA2Timeline::BEZIER);\n\t\t\tb = getBezierValue(time, i, RGBA2Timeline::B,\n\t\t\t\t\t\t\t   curveType + RGBA2Timeline::BEZIER_SIZE * 2 - RGBA2Timeline::BEZIER);\n\t\t\ta = getBezierValue(time, i, RGBA2Timeline::A,\n\t\t\t\t\t\t\t   curveType + RGBA2Timeline::BEZIER_SIZE * 3 - RGBA2Timeline::BEZIER);\n\t\t\tr2 = getBezierValue(time, i, RGBA2Timeline::R2,\n\t\t\t\t\t\t\t\tcurveType + RGBA2Timeline::BEZIER_SIZE * 4 - RGBA2Timeline::BEZIER);\n\t\t\tg2 = getBezierValue(time, i, RGBA2Timeline::G2,\n\t\t\t\t\t\t\t\tcurveType + RGBA2Timeline::BEZIER_SIZE * 5 - RGBA2Timeline::BEZIER);\n\t\t\tb2 = getBezierValue(time, i, RGBA2Timeline::B2,\n\t\t\t\t\t\t\t\tcurveType + RGBA2Timeline::BEZIER_SIZE * 6 - RGBA2Timeline::BEZIER);\n\t\t}\n\t}\n\tColor &light = slot->_color, &dark = slot->_darkColor;\n\tif (alpha == 1) {\n\t\tlight.set(r, g, b, a);\n\t\tdark.set(r2, g2, b2);\n\t} else {\n\t\tif (blend == MixBlend_Setup) {\n\t\t\tlight.set(slot->_data._color);\n\t\t\tdark.set(slot->_data._darkColor);\n\t\t}\n\t\tlight.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n\t\tdark.r += (r2 - dark.r) * alpha;\n\t\tdark.g += (g2 - dark.g) * alpha;\n\t\tdark.b += (b2 - dark.b) * alpha;\n\t}\n}\n\nvoid RGBA2Timeline::setFrame(int frame, float time, float r, float g, float b, float a, float r2, float g2, float b2) {\n\tframe *= ENTRIES;\n\t_frames[frame] = time;\n\t_frames[frame + R] = r;\n\t_frames[frame + G] = g;\n\t_frames[frame + B] = b;\n\t_frames[frame + A] = a;\n\t_frames[frame + R2] = r2;\n\t_frames[frame + G2] = g2;\n\t_frames[frame + B2] = b2;\n}\n\nRTTI_IMPL(RGB2Timeline, CurveTimeline)\n\nRGB2Timeline::RGB2Timeline(size_t frameCount, size_t bezierCount, int slotIndex) : CurveTimeline(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t RGB2Timeline::ENTRIES,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _slotIndex(slotIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_Rgb << 32) | slotIndex,\n\t\t\t\t\t\t((PropertyId) Property_Rgb2 << 32) | slotIndex};\n\tsetPropertyIds(ids, 2);\n}\n\nRGB2Timeline::~RGB2Timeline() {\n}\n\nvoid RGB2Timeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tSlot *slot = skeleton._slots[_slotIndex];\n\tif (!slot->_bone._active) return;\n\n\tif (time < _frames[0]) {\n\t\tColor &light = slot->_color, &dark = slot->_darkColor, &setupLight = slot->_data._color, &setupDark = slot->_data._darkColor;\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tlight.set(setupLight.r, setupLight.g, setupLight.b);\n\t\t\t\tdark.set(setupDark.r, setupDark.g, setupDark.b);\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tlight.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha,\n\t\t\t\t\t\t  (setupLight.b - light.b) * alpha);\n\t\t\t\tdark.r += (setupDark.r - dark.r) * alpha;\n\t\t\t\tdark.g += (setupDark.g - dark.g) * alpha;\n\t\t\t\tdark.b += (setupDark.b - dark.b) * alpha;\n\t\t\tdefault: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfloat r = 0, g = 0, b = 0, r2 = 0, g2 = 0, b2 = 0;\n\tint i = Animation::search(_frames, time, RGB2Timeline::ENTRIES);\n\tint curveType = (int) _curves[i / RGB2Timeline::ENTRIES];\n\tswitch (curveType) {\n\t\tcase RGB2Timeline::LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\tr = _frames[i + RGB2Timeline::R];\n\t\t\tg = _frames[i + RGB2Timeline::G];\n\t\t\tb = _frames[i + RGB2Timeline::B];\n\t\t\tr2 = _frames[i + RGB2Timeline::R2];\n\t\t\tg2 = _frames[i + RGB2Timeline::G2];\n\t\t\tb2 = _frames[i + RGB2Timeline::B2];\n\t\t\tfloat t = (time - before) / (_frames[i + RGB2Timeline::ENTRIES] - before);\n\t\t\tr += (_frames[i + RGB2Timeline::ENTRIES + RGB2Timeline::R] - r) * t;\n\t\t\tg += (_frames[i + RGB2Timeline::ENTRIES + RGB2Timeline::G] - g) * t;\n\t\t\tb += (_frames[i + RGB2Timeline::ENTRIES + RGB2Timeline::B] - b) * t;\n\t\t\tr2 += (_frames[i + RGB2Timeline::ENTRIES + RGB2Timeline::R2] - r2) * t;\n\t\t\tg2 += (_frames[i + RGB2Timeline::ENTRIES + RGB2Timeline::G2] - g2) * t;\n\t\t\tb2 += (_frames[i + RGB2Timeline::ENTRIES + RGB2Timeline::B2] - b2) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase RGB2Timeline::STEPPED: {\n\t\t\tr = _frames[i + RGB2Timeline::R];\n\t\t\tg = _frames[i + RGB2Timeline::G];\n\t\t\tb = _frames[i + RGB2Timeline::B];\n\t\t\tr2 = _frames[i + RGB2Timeline::R2];\n\t\t\tg2 = _frames[i + RGB2Timeline::G2];\n\t\t\tb2 = _frames[i + RGB2Timeline::B2];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tr = getBezierValue(time, i, RGB2Timeline::R, curveType - RGB2Timeline::BEZIER);\n\t\t\tg = getBezierValue(time, i, RGB2Timeline::G,\n\t\t\t\t\t\t\t   curveType + RGB2Timeline::BEZIER_SIZE - RGB2Timeline::BEZIER);\n\t\t\tb = getBezierValue(time, i, RGB2Timeline::B,\n\t\t\t\t\t\t\t   curveType + RGB2Timeline::BEZIER_SIZE * 2 - RGB2Timeline::BEZIER);\n\t\t\tr2 = getBezierValue(time, i, RGB2Timeline::R2,\n\t\t\t\t\t\t\t\tcurveType + RGB2Timeline::BEZIER_SIZE * 4 - RGB2Timeline::BEZIER);\n\t\t\tg2 = getBezierValue(time, i, RGB2Timeline::G2,\n\t\t\t\t\t\t\t\tcurveType + RGB2Timeline::BEZIER_SIZE * 5 - RGB2Timeline::BEZIER);\n\t\t\tb2 = getBezierValue(time, i, RGB2Timeline::B2,\n\t\t\t\t\t\t\t\tcurveType + RGB2Timeline::BEZIER_SIZE * 6 - RGB2Timeline::BEZIER);\n\t\t}\n\t}\n\tColor &light = slot->_color, &dark = slot->_darkColor;\n\tif (alpha == 1) {\n\t\tlight.set(r, g, b);\n\t\tdark.set(r2, g2, b2);\n\t} else {\n\t\tif (blend == MixBlend_Setup) {\n\t\t\tlight.set(slot->_data._color.r, slot->_data._color.g, slot->_data._color.b);\n\t\t\tdark.set(slot->_data._darkColor);\n\t\t}\n\t\tlight.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha);\n\t\tdark.r += (r2 - dark.r) * alpha;\n\t\tdark.g += (g2 - dark.g) * alpha;\n\t\tdark.b += (b2 - dark.b) * alpha;\n\t}\n}\n\nvoid RGB2Timeline::setFrame(int frame, float time, float r, float g, float b, float r2, float g2, float b2) {\n\tframe *= ENTRIES;\n\t_frames[frame] = time;\n\t_frames[frame + R] = r;\n\t_frames[frame + G] = g;\n\t_frames[frame + B] = b;\n\t_frames[frame + R2] = r2;\n\t_frames[frame + G2] = g2;\n\t_frames[frame + B2] = b2;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/ConstraintData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/ConstraintData.h>\n\nusing namespace spine;\n\nRTTI_IMPL_NOPARENT(ConstraintData)\n\nConstraintData::ConstraintData(const String &name) : _name(name), _order(0), _skinRequired(false) {\n}\n\nConstraintData::~ConstraintData() {\n}\n\nconst String &ConstraintData::getName() {\n\treturn _name;\n}\n\nsize_t ConstraintData::getOrder() {\n\treturn _order;\n}\n\nvoid ConstraintData::setOrder(size_t inValue) {\n\t_order = inValue;\n}\n\nbool ConstraintData::isSkinRequired() {\n\treturn _skinRequired;\n}\n\nvoid ConstraintData::setSkinRequired(bool inValue) {\n\t_skinRequired = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/CurveTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/CurveTimeline.h>\n\n#include <spine/MathUtil.h>\n\nusing namespace spine;\n\nRTTI_IMPL(CurveTimeline, Timeline)\n\nCurveTimeline::CurveTimeline(size_t frameCount, size_t frameEntries, size_t bezierCount) : Timeline(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tframeEntries) {\n\t_curves.setSize(frameCount + bezierCount * BEZIER_SIZE, 0);\n\t_curves[frameCount - 1] = STEPPED;\n}\n\nCurveTimeline::~CurveTimeline() {\n}\n\nvoid CurveTimeline::setLinear(size_t frame) {\n\t_curves[frame] = LINEAR;\n}\n\nvoid CurveTimeline::setStepped(size_t frame) {\n\t_curves[frame] = STEPPED;\n}\n\nvoid CurveTimeline::setBezier(size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1,\n\t\t\t\t\t\t\t  float cx2, float cy2, float time2, float value2) {\n\tsize_t i = getFrameCount() + bezier * BEZIER_SIZE;\n\tif (value == 0) _curves[frame] = BEZIER + i;\n\tfloat tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\n\tfloat dddx = ((cx1 - cx2) * 3 - time1 + time2) * 0.006, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 0.006;\n\tfloat ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n\tfloat dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\n\tfloat x = time1 + dx, y = value1 + dy;\n\tfor (size_t n = i + BEZIER_SIZE; i < n; i += 2) {\n\t\t_curves[i] = x;\n\t\t_curves[i + 1] = y;\n\t\tdx += ddx;\n\t\tdy += ddy;\n\t\tddx += dddx;\n\t\tddy += dddy;\n\t\tx += dx;\n\t\ty += dy;\n\t}\n}\n\nfloat CurveTimeline::getBezierValue(float time, size_t frameIndex, size_t valueOffset, size_t i) {\n\tif (_curves[i] > time) {\n\t\tfloat x = _frames[frameIndex], y = _frames[frameIndex + valueOffset];\n\t\treturn y + (time - x) / (_curves[i] - x) * (_curves[i + 1] - y);\n\t}\n\tsize_t n = i + BEZIER_SIZE;\n\tfor (i += 2; i < n; i += 2) {\n\t\tif (_curves[i] >= time) {\n\t\t\tfloat x = _curves[i - 2], y = _curves[i - 1];\n\t\t\treturn y + (time - x) / (_curves[i] - x) * (_curves[i + 1] - y);\n\t\t}\n\t}\n\tframeIndex += getFrameEntries();\n\tfloat x = _curves[n - 2], y = _curves[n - 1];\n\treturn y + (time - x) / (_frames[frameIndex] - x) * (_frames[frameIndex + valueOffset] - y);\n}\n\nVector<float> &CurveTimeline::getCurves() {\n\treturn _curves;\n}\n\nRTTI_IMPL(CurveTimeline1, CurveTimeline)\n\nCurveTimeline1::CurveTimeline1(size_t frameCount, size_t bezierCount) : CurveTimeline(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  CurveTimeline1::ENTRIES,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bezierCount) {\n}\n\nCurveTimeline1::~CurveTimeline1() {\n}\n\nvoid CurveTimeline1::setFrame(size_t frame, float time, float value) {\n\tframe <<= 1;\n\t_frames[frame] = time;\n\t_frames[frame + CurveTimeline1::VALUE] = value;\n}\n\nfloat CurveTimeline1::getCurveValue(float time) {\n\tint i = (int) _frames.size() - 2;\n\tfor (int ii = 2; ii <= i; ii += 2) {\n\t\tif (_frames[ii] > time) {\n\t\t\ti = ii - 2;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tint curveType = (int) _curves[i >> 1];\n\tswitch (curveType) {\n\t\tcase CurveTimeline::LINEAR: {\n\t\t\tfloat before = _frames[i], value = _frames[i + CurveTimeline1::VALUE];\n\t\t\treturn value + (time - before) / (_frames[i + CurveTimeline1::ENTRIES] - before) *\n\t\t\t\t\t\t\t\t   (_frames[i + CurveTimeline1::ENTRIES + CurveTimeline1::VALUE] - value);\n\t\t}\n\t\tcase CurveTimeline::STEPPED:\n\t\t\treturn _frames[i + CurveTimeline1::VALUE];\n\t}\n\treturn getBezierValue(time, i, CurveTimeline1::VALUE, curveType - CurveTimeline1::BEZIER);\n}\n\nfloat CurveTimeline1::getRelativeValue(float time, float alpha, MixBlend blend, float current, float setup) {\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\treturn setup;\n\t\t\tcase MixBlend_First:\n\t\t\t\treturn current + (setup - current) * alpha;\n\t\t\tdefault:\n\t\t\t\treturn current;\n\t\t}\n\t}\n\tfloat value = getCurveValue(time);\n\tswitch (blend) {\n\t\tcase MixBlend_Setup:\n\t\t\treturn setup + value * alpha;\n\t\tcase MixBlend_First:\n\t\tcase MixBlend_Replace:\n\t\t\tvalue += setup - current;\n\t\t\tbreak;\n\t\tcase MixBlend_Add:\n\t\t\tbreak;\n\t}\n\treturn current + value * alpha;\n}\n\nfloat CurveTimeline1::getAbsoluteValue(float time, float alpha, MixBlend blend, float current, float setup) {\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\treturn setup;\n\t\t\tcase MixBlend_First:\n\t\t\t\treturn current + (setup - current) * alpha;\n\t\t\tdefault:\n\t\t\t\treturn current;\n\t\t}\n\t}\n\tfloat value = getCurveValue(time);\n\tif (blend == MixBlend_Setup) return setup + (value - setup) * alpha;\n\treturn current + (value - current) * alpha;\n}\n\nfloat CurveTimeline1::getAbsoluteValue(float time, float alpha, MixBlend blend, float current, float setup, float value) {\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\treturn setup;\n\t\t\tcase MixBlend_First:\n\t\t\t\treturn current + (setup - current) * alpha;\n\t\t\tdefault:\n\t\t\t\treturn current;\n\t\t}\n\t}\n\tif (blend == MixBlend_Setup) return setup + (value - setup) * alpha;\n\treturn current + (value - current) * alpha;\n}\n\nfloat CurveTimeline1::getScaleValue(float time, float alpha, MixBlend blend, MixDirection direction, float current,\n\t\t\t\t\t\t\t\t\tfloat setup) {\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\treturn setup;\n\t\t\tcase MixBlend_First:\n\t\t\t\treturn current + (setup - current) * alpha;\n\t\t\tdefault:\n\t\t\t\treturn current;\n\t\t}\n\t}\n\tfloat value = getCurveValue(time) * setup;\n\tif (alpha == 1) {\n\t\tif (blend == MixBlend_Add) return current + value - setup;\n\t\treturn value;\n\t}\n\t// Mixing out uses sign of setup or current pose, else use sign of key.\n\tif (direction == MixDirection_Out) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\treturn setup + (MathUtil::abs(value) * MathUtil::sign(setup) - setup) * alpha;\n\t\t\tcase MixBlend_First:\n\t\t\tcase MixBlend_Replace:\n\t\t\t\treturn current + (MathUtil::abs(value) * MathUtil::sign(current) - current) * alpha;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\tfloat s;\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\ts = MathUtil::abs(setup) * MathUtil::sign(value);\n\t\t\t\treturn s + (value - s) * alpha;\n\t\t\tcase MixBlend_First:\n\t\t\tcase MixBlend_Replace:\n\t\t\t\ts = MathUtil::abs(current) * MathUtil::sign(value);\n\t\t\t\treturn s + (value - s) * alpha;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn current + (value - setup) * alpha;\n}\n\n\nRTTI_IMPL(CurveTimeline2, CurveTimeline)\n\nCurveTimeline2::CurveTimeline2(size_t frameCount, size_t bezierCount) : CurveTimeline(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  CurveTimeline2::ENTRIES,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bezierCount) {\n}\n\nCurveTimeline2::~CurveTimeline2() {\n}\n\nvoid CurveTimeline2::setFrame(size_t frame, float time, float value1, float value2) {\n\tframe *= CurveTimeline2::ENTRIES;\n\t_frames[frame] = time;\n\t_frames[frame + CurveTimeline2::VALUE1] = value1;\n\t_frames[frame + CurveTimeline2::VALUE2] = value2;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/DeformTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/DeformTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/VertexAttachment.h>\n\n#include <spine/Animation.h>\n#include <spine/Bone.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(DeformTimeline, CurveTimeline)\n\nDeformTimeline::DeformTimeline(size_t frameCount, size_t bezierCount, int slotIndex, VertexAttachment *attachment)\n\t: CurveTimeline(frameCount, 1, bezierCount), _slotIndex(slotIndex), _attachment(attachment) {\n\tPropertyId ids[] = {((PropertyId) Property_Deform << 32) | ((slotIndex << 16 | attachment->_id) & 0xffffffff)};\n\tsetPropertyIds(ids, 1);\n\n\t_vertices.ensureCapacity(frameCount);\n\tfor (size_t i = 0; i < frameCount; ++i) {\n\t\tVector<float> vec;\n\t\t_vertices.add(vec);\n\t}\n}\n\nvoid DeformTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t   MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tSlot *slotP = skeleton._slots[_slotIndex];\n\tSlot &slot = *slotP;\n\tif (!slot._bone.isActive()) return;\n\n\tAttachment *slotAttachment = slot.getAttachment();\n\tif (slotAttachment == NULL || !slotAttachment->getRTTI().instanceOf(VertexAttachment::rtti)) {\n\t\treturn;\n\t}\n\n\tVertexAttachment *attachment = static_cast<VertexAttachment *>(slotAttachment);\n\tif (attachment->_timelineAttachment != _attachment) {\n\t\treturn;\n\t}\n\n\tVector<float> &deformArray = slot._deform;\n\tif (deformArray.size() == 0) {\n\t\tblend = MixBlend_Setup;\n\t}\n\n\tVector<Vector<float>> &vertices = _vertices;\n\tsize_t vertexCount = vertices[0].size();\n\n\tVector<float> &frames = _frames;\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tdeformArray.clear();\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First: {\n\t\t\t\tif (alpha == 1) {\n\t\t\t\t\tdeformArray.clear();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdeformArray.setSize(vertexCount, 0);\n\t\t\t\tVector<float> &deform = deformArray;\n\t\t\t\tif (attachment->getBones().size() == 0) {\n\t\t\t\t\t// Unweighted vertex positions.\n\t\t\t\t\tVector<float> &setupVertices = attachment->getVertices();\n\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++)\n\t\t\t\t\t\tdeform[i] += (setupVertices[i] - deform[i]) * alpha;\n\t\t\t\t} else {\n\t\t\t\t\t// Weighted deform offsets.\n\t\t\t\t\talpha = 1 - alpha;\n\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++)\n\t\t\t\t\t\tdeform[i] *= alpha;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase MixBlend_Replace:\n\t\t\tcase MixBlend_Add: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tdeformArray.setSize(vertexCount, 0);\n\tVector<float> &deform = deformArray;\n\n\tif (time >= frames[frames.size() - 1]) {// Time is after last frame.\n\t\tVector<float> &lastVertices = vertices[frames.size() - 1];\n\t\tif (alpha == 1) {\n\t\t\tif (blend == MixBlend_Add) {\n\t\t\t\tVertexAttachment *vertexAttachment = static_cast<VertexAttachment *>(slotAttachment);\n\t\t\t\tif (vertexAttachment->getBones().size() == 0) {\n\t\t\t\t\t// Unweighted vertex positions, no alpha.\n\t\t\t\t\tVector<float> &setupVertices = vertexAttachment->getVertices();\n\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++)\n\t\t\t\t\t\tdeform[i] += lastVertices[i] - setupVertices[i];\n\t\t\t\t} else {\n\t\t\t\t\t// Weighted deform offsets, no alpha.\n\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++)\n\t\t\t\t\t\tdeform[i] += lastVertices[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Vertex positions or deform offsets, no alpha.\n\t\t\t\tmemcpy(deform.buffer(), lastVertices.buffer(), vertexCount * sizeof(float));\n\t\t\t}\n\t\t} else {\n\t\t\tswitch (blend) {\n\t\t\t\tcase MixBlend_Setup: {\n\t\t\t\t\tVertexAttachment *vertexAttachment = static_cast<VertexAttachment *>(slotAttachment);\n\t\t\t\t\tif (vertexAttachment->getBones().size() == 0) {\n\t\t\t\t\t\t// Unweighted vertex positions, with alpha.\n\t\t\t\t\t\tVector<float> &setupVertices = vertexAttachment->getVertices();\n\t\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++) {\n\t\t\t\t\t\t\tfloat setup = setupVertices[i];\n\t\t\t\t\t\t\tdeform[i] = setup + (lastVertices[i] - setup) * alpha;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Weighted deform offsets, with alpha.\n\t\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++)\n\t\t\t\t\t\t\tdeform[i] = lastVertices[i] * alpha;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MixBlend_First:\n\t\t\t\tcase MixBlend_Replace:\n\t\t\t\t\t// Vertex positions or deform offsets, with alpha.\n\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++)\n\t\t\t\t\t\tdeform[i] += (lastVertices[i] - deform[i]) * alpha;\n\t\t\t\t\tbreak;\n\t\t\t\tcase MixBlend_Add:\n\t\t\t\t\tVertexAttachment *vertexAttachment = static_cast<VertexAttachment *>(slotAttachment);\n\t\t\t\t\tif (vertexAttachment->getBones().size() == 0) {\n\t\t\t\t\t\t// Unweighted vertex positions, no alpha.\n\t\t\t\t\t\tVector<float> &setupVertices = vertexAttachment->getVertices();\n\t\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++)\n\t\t\t\t\t\t\tdeform[i] += (lastVertices[i] - setupVertices[i]) * alpha;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Weighted deform offsets, alpha.\n\t\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++)\n\t\t\t\t\t\t\tdeform[i] += lastVertices[i] * alpha;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\t// Interpolate between the previous frame and the current frame.\n\tint frame = Animation::search(frames, time);\n\tfloat percent = getCurvePercent(time, frame);\n\tVector<float> &prevVertices = vertices[frame];\n\tVector<float> &nextVertices = vertices[frame + 1];\n\n\tif (alpha == 1) {\n\t\tif (blend == MixBlend_Add) {\n\t\t\tVertexAttachment *vertexAttachment = static_cast<VertexAttachment *>(slotAttachment);\n\t\t\tif (vertexAttachment->getBones().size() == 0) {\n\t\t\t\t// Unweighted vertex positions, no alpha.\n\t\t\t\tVector<float> &setupVertices = vertexAttachment->getVertices();\n\t\t\t\tfor (size_t i = 0; i < vertexCount; i++) {\n\t\t\t\t\tfloat prev = prevVertices[i];\n\t\t\t\t\tdeform[i] += prev + (nextVertices[i] - prev) * percent - setupVertices[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Weighted deform offsets, no alpha.\n\t\t\t\tfor (size_t i = 0; i < vertexCount; i++) {\n\t\t\t\t\tfloat prev = prevVertices[i];\n\t\t\t\t\tdeform[i] += prev + (nextVertices[i] - prev) * percent;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Vertex positions or deform offsets, no alpha.\n\t\t\tfor (size_t i = 0; i < vertexCount; i++) {\n\t\t\t\tfloat prev = prevVertices[i];\n\t\t\t\tdeform[i] = prev + (nextVertices[i] - prev) * percent;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup: {\n\t\t\t\tVertexAttachment *vertexAttachment = static_cast<VertexAttachment *>(slotAttachment);\n\t\t\t\tif (vertexAttachment->getBones().size() == 0) {\n\t\t\t\t\t// Unweighted vertex positions, with alpha.\n\t\t\t\t\tVector<float> &setupVertices = vertexAttachment->getVertices();\n\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++) {\n\t\t\t\t\t\tfloat prev = prevVertices[i], setup = setupVertices[i];\n\t\t\t\t\t\tdeform[i] = setup + (prev + (nextVertices[i] - prev) * percent - setup) * alpha;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Weighted deform offsets, with alpha.\n\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++) {\n\t\t\t\t\t\tfloat prev = prevVertices[i];\n\t\t\t\t\t\tdeform[i] = (prev + (nextVertices[i] - prev) * percent) * alpha;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MixBlend_First:\n\t\t\tcase MixBlend_Replace:\n\t\t\t\t// Vertex positions or deform offsets, with alpha.\n\t\t\t\tfor (size_t i = 0; i < vertexCount; i++) {\n\t\t\t\t\tfloat prev = prevVertices[i];\n\t\t\t\t\tdeform[i] += (prev + (nextVertices[i] - prev) * percent - deform[i]) * alpha;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MixBlend_Add:\n\t\t\t\tVertexAttachment *vertexAttachment = static_cast<VertexAttachment *>(slotAttachment);\n\t\t\t\tif (vertexAttachment->getBones().size() == 0) {\n\t\t\t\t\t// Unweighted vertex positions, with alpha.\n\t\t\t\t\tVector<float> &setupVertices = vertexAttachment->getVertices();\n\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++) {\n\t\t\t\t\t\tfloat prev = prevVertices[i];\n\t\t\t\t\t\tdeform[i] += (prev + (nextVertices[i] - prev) * percent - setupVertices[i]) * alpha;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Weighted deform offsets, with alpha.\n\t\t\t\t\tfor (size_t i = 0; i < vertexCount; i++) {\n\t\t\t\t\t\tfloat prev = prevVertices[i];\n\t\t\t\t\t\tdeform[i] += (prev + (nextVertices[i] - prev) * percent) * alpha;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}\n}\n\nvoid DeformTimeline::setBezier(size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1,\n\t\t\t\t\t\t\t   float cx2, float cy2, float time2, float value2) {\n\tSP_UNUSED(value1);\n\tSP_UNUSED(value2);\n\tsize_t i = getFrameCount() + bezier * DeformTimeline::BEZIER_SIZE;\n\tif (value == 0) _curves[frame] = DeformTimeline::BEZIER + i;\n\tfloat tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\n\tfloat dddx = ((cx1 - cx2) * 3 - time1 + time2) * 0.006, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\n\tfloat ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n\tfloat dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\n\tfloat x = time1 + dx, y = dy;\n\tfor (size_t n = i + DeformTimeline::BEZIER_SIZE; i < n; i += 2) {\n\t\t_curves[i] = x;\n\t\t_curves[i + 1] = y;\n\t\tdx += ddx;\n\t\tdy += ddy;\n\t\tddx += dddx;\n\t\tddy += dddy;\n\t\tx += dx;\n\t\ty += dy;\n\t}\n}\n\nfloat DeformTimeline::getCurvePercent(float time, int frame) {\n\tint i = (int) _curves[frame];\n\tswitch (i) {\n\t\tcase DeformTimeline::LINEAR: {\n\t\t\tfloat x = _frames[frame];\n\t\t\treturn (time - x) / (_frames[frame + getFrameEntries()] - x);\n\t\t}\n\t\tcase DeformTimeline::STEPPED: {\n\t\t\treturn 0;\n\t\t}\n\t\tdefault: {\n\t\t}\n\t}\n\ti -= DeformTimeline::BEZIER;\n\tif (_curves[i] > time) {\n\t\tfloat x = _frames[frame];\n\t\treturn _curves[i + 1] * (time - x) / (_curves[i] - x);\n\t}\n\tint n = i + DeformTimeline::BEZIER_SIZE;\n\tfor (i += 2; i < n; i += 2) {\n\t\tif (_curves[i] >= time) {\n\t\t\tfloat x = _curves[i - 2], y = _curves[i - 1];\n\t\t\treturn y + (time - x) / (_curves[i] - x) * (_curves[i + 1] - y);\n\t\t}\n\t}\n\tfloat x = _curves[n - 2], y = _curves[n - 1];\n\treturn y + (1 - y) * (time - x) / (_frames[frame + getFrameEntries()] - x);\n}\n\nvoid DeformTimeline::setFrame(int frame, float time, Vector<float> &vertices) {\n\t_frames[frame] = time;\n\t_vertices[frame].clear();\n\t_vertices[frame].addAll(vertices);\n}\n\nVector<Vector<float>> &DeformTimeline::getVertices() {\n\treturn _vertices;\n}\n\nVertexAttachment *DeformTimeline::getAttachment() {\n\treturn _attachment;\n}\n\nvoid DeformTimeline::setAttachment(VertexAttachment *inValue) {\n\t_attachment = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/DrawOrderTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/DrawOrderTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(DrawOrderTimeline, Timeline)\n\nDrawOrderTimeline::DrawOrderTimeline(size_t frameCount) : Timeline(frameCount, 1) {\n\tPropertyId ids[] = {((PropertyId) Property_DrawOrder << 32)};\n\tsetPropertyIds(ids, 1);\n\n\t_drawOrders.ensureCapacity(frameCount);\n\tfor (size_t i = 0; i < frameCount; ++i) {\n\t\tVector<int> vec;\n\t\t_drawOrders.add(vec);\n\t}\n}\n\nvoid DrawOrderTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t\t  MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(alpha);\n\n\tVector<Slot *> &drawOrder = skeleton._drawOrder;\n\tVector<Slot *> &slots = skeleton._slots;\n\tif (direction == MixDirection_Out) {\n\t\tif (blend == MixBlend_Setup) {\n\t\t\tdrawOrder.clear();\n\t\t\tdrawOrder.ensureCapacity(slots.size());\n\t\t\tfor (size_t i = 0, n = slots.size(); i < n; ++i)\n\t\t\t\tdrawOrder.add(slots[i]);\n\t\t}\n\t\treturn;\n\t}\n\n\tif (time < _frames[0]) {\n\t\tif (blend == MixBlend_Setup || blend == MixBlend_First) {\n\t\t\tdrawOrder.clear();\n\t\t\tdrawOrder.ensureCapacity(slots.size());\n\t\t\tfor (size_t i = 0, n = slots.size(); i < n; ++i)\n\t\t\t\tdrawOrder.add(slots[i]);\n\t\t}\n\t\treturn;\n\t}\n\n\tVector<int> &drawOrderToSetupIndex = _drawOrders[Animation::search(_frames, time)];\n\tif (drawOrderToSetupIndex.size() == 0) {\n\t\tdrawOrder.clear();\n\t\tfor (size_t i = 0, n = slots.size(); i < n; ++i)\n\t\t\tdrawOrder.add(slots[i]);\n\t} else {\n\t\tfor (size_t i = 0, n = drawOrderToSetupIndex.size(); i < n; ++i)\n\t\t\tdrawOrder[i] = slots[drawOrderToSetupIndex[i]];\n\t}\n}\n\nvoid DrawOrderTimeline::setFrame(size_t frame, float time, Vector<int> &drawOrder) {\n\t_frames[frame] = time;\n\t_drawOrders[frame].clear();\n\t_drawOrders[frame].addAll(drawOrder);\n}\n\nVector<Vector<int>> &DrawOrderTimeline::getDrawOrders() {\n\treturn _drawOrders;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Event.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Event.h>\n\n#include <spine/EventData.h>\n\nspine::Event::Event(float time, const spine::EventData &data) : _data(data),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_time(time),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_intValue(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_floatValue(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_stringValue(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_volume(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_balance(0) {\n}\n\nconst spine::EventData &spine::Event::getData() {\n\treturn _data;\n}\n\nfloat spine::Event::getTime() {\n\treturn _time;\n}\n\nint spine::Event::getIntValue() {\n\treturn _intValue;\n}\n\nvoid spine::Event::setIntValue(int inValue) {\n\t_intValue = inValue;\n}\n\nfloat spine::Event::getFloatValue() {\n\treturn _floatValue;\n}\n\nvoid spine::Event::setFloatValue(float inValue) {\n\t_floatValue = inValue;\n}\n\nconst spine::String &spine::Event::getStringValue() {\n\treturn _stringValue;\n}\n\nvoid spine::Event::setStringValue(const spine::String &inValue) {\n\t_stringValue = inValue;\n}\n\n\nfloat spine::Event::getVolume() {\n\treturn _volume;\n}\n\nvoid spine::Event::setVolume(float inValue) {\n\t_volume = inValue;\n}\n\nfloat spine::Event::getBalance() {\n\treturn _balance;\n}\n\nvoid spine::Event::setBalance(float inValue) {\n\t_balance = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/EventData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/EventData.h>\n\n#include <assert.h>\n\nspine::EventData::EventData(const spine::String &name) : _name(name),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _intValue(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _floatValue(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _stringValue(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _audioPath(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _volume(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _balance(0) {\n\tassert(_name.length() > 0);\n}\n\n/// The name of the event, which is unique within the skeleton.\nconst spine::String &spine::EventData::getName() const {\n\treturn _name;\n}\n\nint spine::EventData::getIntValue() const {\n\treturn _intValue;\n}\n\nvoid spine::EventData::setIntValue(int inValue) {\n\t_intValue = inValue;\n}\n\nfloat spine::EventData::getFloatValue() const {\n\treturn _floatValue;\n}\n\nvoid spine::EventData::setFloatValue(float inValue) {\n\t_floatValue = inValue;\n}\n\nconst spine::String &spine::EventData::getStringValue() const {\n\treturn _stringValue;\n}\n\nvoid spine::EventData::setStringValue(const spine::String &inValue) {\n\tthis->_stringValue = inValue;\n}\n\nconst spine::String &spine::EventData::getAudioPath() const {\n\treturn _audioPath;\n}\n\nvoid spine::EventData::setAudioPath(const spine::String &inValue) {\n\t_audioPath = inValue;\n}\n\n\nfloat spine::EventData::getVolume() const {\n\treturn _volume;\n}\n\nvoid spine::EventData::setVolume(float inValue) {\n\t_volume = inValue;\n}\n\nfloat spine::EventData::getBalance() const {\n\treturn _balance;\n}\n\nvoid spine::EventData::setBalance(float inValue) {\n\t_balance = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/EventTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/EventTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/ContainerUtil.h>\n#include <spine/EventData.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\n#include <float.h>\n\nusing namespace spine;\n\nRTTI_IMPL(EventTimeline, Timeline)\n\nEventTimeline::EventTimeline(size_t frameCount) : Timeline(frameCount, 1) {\n\tPropertyId ids[] = {((PropertyId) Property_Event << 32)};\n\tsetPropertyIds(ids, 1);\n\t_events.setSize(frameCount, NULL);\n}\n\nEventTimeline::~EventTimeline() {\n\tContainerUtil::cleanUpVectorOfPointers(_events);\n}\n\nvoid EventTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t  MixBlend blend, MixDirection direction) {\n\tif (pEvents == NULL) return;\n\n\tVector<Event *> &events = *pEvents;\n\n\tsize_t frameCount = _frames.size();\n\n\tif (lastTime > time) {\n\t\t// Fire events after last time for looped animations.\n\t\tapply(skeleton, lastTime, FLT_MAX, pEvents, alpha, blend, direction);\n\t\tlastTime = -1.0f;\n\t} else if (lastTime >= _frames[frameCount - 1]) {\n\t\t// Last time is after last i.\n\t\treturn;\n\t}\n\n\tif (time < _frames[0]) return;// Time is before first i.\n\n\tint i;\n\tif (lastTime < _frames[0]) {\n\t\ti = 0;\n\t} else {\n\t\ti = Animation::search(_frames, lastTime) + 1;\n\t\tfloat frameTime = _frames[i];\n\t\twhile (i > 0) {\n\t\t\t// Fire multiple events with the same i.\n\t\t\tif (_frames[i - 1] != frameTime) break;\n\t\t\ti--;\n\t\t}\n\t}\n\n\tfor (; (size_t) i < frameCount && time >= _frames[i]; i++)\n\t\tevents.add(_events[i]);\n}\n\nvoid EventTimeline::setFrame(size_t frame, Event *event) {\n\t_frames[frame] = event->getTime();\n\t_events[frame] = event;\n}\n\nVector<Event *> &EventTimeline::getEvents() { return _events; }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Extension.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Extension.h>\n#include <spine/SpineString.h>\n\n#include <assert.h>\n\nusing namespace spine;\n\nSpineExtension *SpineExtension::_instance = NULL;\n\nvoid SpineExtension::setInstance(SpineExtension *inValue) {\n\tassert(inValue);\n\n\t_instance = inValue;\n}\n\nSpineExtension *SpineExtension::getInstance() {\n\tif (!_instance) _instance = spine::getDefaultExtension();\n\tassert(_instance);\n\n\treturn _instance;\n}\n\nSpineExtension::~SpineExtension() {\n}\n\nSpineExtension::SpineExtension() {\n}\n\nDefaultSpineExtension::~DefaultSpineExtension() {\n}\n\nvoid *DefaultSpineExtension::_alloc(size_t size, const char *file, int line) {\n\tSP_UNUSED(file);\n\tSP_UNUSED(line);\n\n\tif (size == 0)\n\t\treturn 0;\n\tvoid *ptr = ::malloc(size);\n\treturn ptr;\n}\n\nvoid *DefaultSpineExtension::_calloc(size_t size, const char *file, int line) {\n\tSP_UNUSED(file);\n\tSP_UNUSED(line);\n\n\tif (size == 0)\n\t\treturn 0;\n\n\tvoid *ptr = ::malloc(size);\n\tif (ptr) {\n\t\tmemset(ptr, 0, size);\n\t}\n\treturn ptr;\n}\n\nvoid *DefaultSpineExtension::_realloc(void *ptr, size_t size, const char *file, int line) {\n\tSP_UNUSED(file);\n\tSP_UNUSED(line);\n\n\tvoid *mem = NULL;\n\tif (size == 0)\n\t\treturn 0;\n\tif (ptr == NULL)\n\t\tmem = ::malloc(size);\n\telse\n\t\tmem = ::realloc(ptr, size);\n\treturn mem;\n}\n\nvoid DefaultSpineExtension::_free(void *mem, const char *file, int line) {\n\tSP_UNUSED(file);\n\tSP_UNUSED(line);\n\n\t::free(mem);\n}\n\nchar *DefaultSpineExtension::_readFile(const String &path, int *length) {\n#ifndef __EMSCRIPTEN__\n\tchar *data;\n\tFILE *file = fopen(path.buffer(), \"rb\");\n\tif (!file) return 0;\n\n\tfseek(file, 0, SEEK_END);\n\t*length = (int) ftell(file);\n\tfseek(file, 0, SEEK_SET);\n\n\tdata = SpineExtension::alloc<char>(*length, __FILE__, __LINE__);\n\tfread(data, 1, *length, file);\n\tfclose(file);\n\n\treturn data;\n#else\n\treturn nullptr;\n#endif\n}\n\nDefaultSpineExtension::DefaultSpineExtension() : SpineExtension() {\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/IkConstraint.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/IkConstraint.h>\n\n#include <spine/Bone.h>\n#include <spine/IkConstraintData.h>\n#include <spine/Skeleton.h>\n\n#include <spine/BoneData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(IkConstraint, Updatable)\n\nvoid IkConstraint::apply(Bone &bone, float targetX, float targetY, bool compress, bool stretch, bool uniform, float alpha) {\n\tBone *p = bone.getParent();\n\tfloat pa = p->_a, pb = p->_b, pc = p->_c, pd = p->_d;\n\tfloat rotationIK = -bone._ashearX - bone._arotation;\n\tfloat tx = 0, ty = 0;\n\n\tswitch (bone._inherit) {\n\t\tcase Inherit_OnlyTranslation:\n\t\t\ttx = (targetX - bone._worldX) * MathUtil::sign(bone.getSkeleton().getScaleX());\n\t\t\tty = (targetY - bone._worldY) * MathUtil::sign(bone.getSkeleton().getScaleY());\n\t\t\tbreak;\n\t\tcase Inherit_NoRotationOrReflection: {\n\t\t\tfloat s = MathUtil::abs(pa * pd - pb * pc) / MathUtil::max(0.0001f, pa * pa + pc * pc);\n\t\t\tfloat sa = pa / bone._skeleton.getScaleX();\n\t\t\tfloat sc = pc / bone._skeleton.getScaleY();\n\t\t\tpb = -sc * s * bone._skeleton.getScaleX();\n\t\t\tpd = sa * s * bone._skeleton.getScaleY();\n\t\t\trotationIK += MathUtil::atan2Deg(sc, sa);\n\t\t}\n\t\tdefault:\n\t\t\tfloat x = targetX - p->_worldX, y = targetY - p->_worldY;\n\t\t\tfloat d = pa * pd - pb * pc;\n\t\t\tif (MathUtil::abs(d) <= 0.0001f) {\n\t\t\t\ttx = 0;\n\t\t\t\tty = 0;\n\t\t\t} else {\n\t\t\t\ttx = (x * pd - y * pb) / d - bone._ax;\n\t\t\t\tty = (y * pa - x * pc) / d - bone._ay;\n\t\t\t}\n\t}\n\trotationIK += MathUtil::atan2Deg(ty, tx);\n\tif (bone._ascaleX < 0) rotationIK += 180;\n\tif (rotationIK > 180) rotationIK -= 360;\n\telse if (rotationIK < -180)\n\t\trotationIK += 360;\n\tfloat sx = bone._ascaleX;\n\tfloat sy = bone._ascaleY;\n\tif (compress || stretch) {\n\t\tswitch (bone._inherit) {\n\t\t\tcase Inherit_NoScale:\n\t\t\tcase Inherit_NoScaleOrReflection:\n\t\t\t\ttx = targetX - bone._worldX;\n\t\t\t\tty = targetY - bone._worldY;\n\t\t\tdefault:;\n\t\t}\n\n\t\tfloat b = bone._data.getLength() * sx;\n\t\tif (b > 0.0001) {\n\t\t\tfloat dd = tx * tx + ty * ty;\n\t\t\tif ((compress && dd < b * b) || (stretch && dd > b * b)) {\n\t\t\t\tfloat s = (MathUtil::sqrt(dd) / b - 1) * alpha + 1;\n\t\t\t\tsx *= s;\n\t\t\t\tif (uniform) sy *= s;\n\t\t\t}\n\t\t}\n\t}\n\tbone.updateWorldTransform(bone._ax, bone._ay, bone._arotation + rotationIK * alpha, sx, sy, bone._ashearX,\n\t\t\t\t\t\t\t  bone._ashearY);\n}\n\nvoid IkConstraint::apply(Bone &parent, Bone &child, float targetX, float targetY, int bendDir, bool stretch, bool uniform,\n\t\t\t\t\t\t float softness,\n\t\t\t\t\t\t float alpha) {\n\tfloat a, b, c, d;\n\tfloat px, py, psx, psy, sx, sy;\n\tfloat cx, cy, csx, cwx, cwy;\n\tint o1, o2, s2, u;\n\tBone *pp = parent.getParent();\n\tfloat tx, ty, dx, dy, dd, l1, l2, a1, a2, r, td, sd, p;\n\tfloat id, x, y;\n\tif (parent._inherit != Inherit_Normal || child._inherit != Inherit_Normal) return;\n\tpx = parent._ax;\n\tpy = parent._ay;\n\tpsx = parent._ascaleX;\n\tpsy = parent._ascaleY;\n\tsx = psx;\n\tsy = psy;\n\tcsx = child._ascaleX;\n\tif (psx < 0) {\n\t\tpsx = -psx;\n\t\to1 = 180;\n\t\ts2 = -1;\n\t} else {\n\t\to1 = 0;\n\t\ts2 = 1;\n\t}\n\tif (psy < 0) {\n\t\tpsy = -psy;\n\t\ts2 = -s2;\n\t}\n\tif (csx < 0) {\n\t\tcsx = -csx;\n\t\to2 = 180;\n\t} else\n\t\to2 = 0;\n\tr = psx - psy;\n\tcx = child._ax;\n\tu = (r < 0 ? -r : r) <= 0.0001f;\n\tif (!u || stretch) {\n\t\tcy = 0;\n\t\tcwx = parent._a * cx + parent._worldX;\n\t\tcwy = parent._c * cx + parent._worldY;\n\t} else {\n\t\tcy = child._ay;\n\t\tcwx = parent._a * cx + parent._b * cy + parent._worldX;\n\t\tcwy = parent._c * cx + parent._d * cy + parent._worldY;\n\t}\n\ta = pp->_a;\n\tb = pp->_b;\n\tc = pp->_c;\n\td = pp->_d;\n\tid = a * d - b * c;\n\tid = MathUtil::abs(id) <= 0.0001f ? 0 : 1 / id;\n\tx = cwx - pp->_worldX;\n\ty = cwy - pp->_worldY;\n\tdx = (x * d - y * b) * id - px;\n\tdy = (y * a - x * c) * id - py;\n\tl1 = MathUtil::sqrt(dx * dx + dy * dy);\n\tl2 = child._data.getLength() * csx;\n\tif (l1 < 0.0001) {\n\t\tapply(parent, targetX, targetY, false, stretch, false, alpha);\n\t\tchild.updateWorldTransform(cx, cy, 0, child._ascaleX, child._ascaleY, child._ashearX, child._ashearY);\n\t\treturn;\n\t}\n\tx = targetX - pp->_worldX;\n\ty = targetY - pp->_worldY;\n\ttx = (x * d - y * b) * id - px;\n\tty = (y * a - x * c) * id - py;\n\tdd = tx * tx + ty * ty;\n\tif (softness != 0) {\n\t\tsoftness *= psx * (csx + 1) * 0.5f;\n\t\ttd = MathUtil::sqrt(dd);\n\t\tsd = td - l1 - l2 * psx + softness;\n\t\tif (sd > 0) {\n\t\t\tp = MathUtil::min(1.0f, sd / (softness * 2)) - 1;\n\t\t\tp = (sd - softness * (1 - p * p)) / td;\n\t\t\ttx -= p * tx;\n\t\t\tty -= p * ty;\n\t\t\tdd = tx * tx + ty * ty;\n\t\t}\n\t}\n\tif (u) {\n\t\tfloat cosine;\n\t\tl2 *= psx;\n\t\tcosine = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n\t\tif (cosine < -1) {\n\t\t\tcosine = -1;\n\t\t\ta2 = MathUtil::Pi * bendDir;\n\t\t} else if (cosine > 1) {\n\t\t\tcosine = 1;\n\t\t\ta2 = 0;\n\t\t\tif (stretch) {\n\t\t\t\ta = (MathUtil::sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n\t\t\t\tsx *= a;\n\t\t\t\tif (uniform) sy *= a;\n\t\t\t}\n\t\t} else\n\t\t\ta2 = MathUtil::acos(cosine) * bendDir;\n\t\ta = l1 + l2 * cosine;\n\t\tb = l2 * MathUtil::sin(a2);\n\t\ta1 = MathUtil::atan2(ty * a - tx * b, tx * a + ty * b);\n\t} else {\n\t\ta = psx * l2;\n\t\tb = psy * l2;\n\t\tfloat aa = a * a, bb = b * b, ll = l1 * l1, ta = MathUtil::atan2(ty, tx);\n\t\tfloat c0 = bb * ll + aa * dd - aa * bb, c1 = -2 * bb * l1, c2 = bb - aa;\n\t\td = c1 * c1 - 4 * c2 * c0;\n\t\tif (d >= 0) {\n\t\t\tfloat q = MathUtil::sqrt(d), r0, r1;\n\t\t\tif (c1 < 0) q = -q;\n\t\t\tq = -(c1 + q) * 0.5f;\n\t\t\tr0 = q / c2;\n\t\t\tr1 = c0 / q;\n\t\t\tr = MathUtil::abs(r0) < MathUtil::abs(r1) ? r0 : r1;\n\t\t\tif (dd - r * r >= 0) {\n\t\t\t\ty = MathUtil::sqrt(dd - r * r) * bendDir;\n\t\t\t\ta1 = ta - MathUtil::atan2(y, r);\n\t\t\t\ta2 = MathUtil::atan2(y / psy, (r - l1) / psx);\n\t\t\t\tgoto break_outer;\n\t\t\t}\n\t\t}\n\t\t{\n\t\t\tfloat minAngle = MathUtil::Pi, minX = l1 - a, minDist = minX * minX, minY = 0;\n\t\t\tfloat maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\n\t\t\tc0 = -a * l1 / (aa - bb);\n\t\t\tif (c0 >= -1 && c0 <= 1) {\n\t\t\t\tc0 = MathUtil::acos(c0);\n\t\t\t\tx = a * MathUtil::cos(c0) + l1;\n\t\t\t\ty = b * MathUtil::sin(c0);\n\t\t\t\td = x * x + y * y;\n\t\t\t\tif (d < minDist) {\n\t\t\t\t\tminAngle = c0;\n\t\t\t\t\tminDist = d;\n\t\t\t\t\tminX = x;\n\t\t\t\t\tminY = y;\n\t\t\t\t}\n\t\t\t\tif (d > maxDist) {\n\t\t\t\t\tmaxAngle = c0;\n\t\t\t\t\tmaxDist = d;\n\t\t\t\t\tmaxX = x;\n\t\t\t\t\tmaxY = y;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dd <= (minDist + maxDist) * 0.5f) {\n\t\t\t\ta1 = ta - MathUtil::atan2(minY * bendDir, minX);\n\t\t\t\ta2 = minAngle * bendDir;\n\t\t\t} else {\n\t\t\t\ta1 = ta - MathUtil::atan2(maxY * bendDir, maxX);\n\t\t\t\ta2 = maxAngle * bendDir;\n\t\t\t}\n\t\t}\n\t}\nbreak_outer : {\n\tfloat os = MathUtil::atan2(cy, cx) * s2;\n\ta1 = (a1 - os) * MathUtil::Rad_Deg + o1 - parent._arotation;\n\tif (a1 > 180) a1 -= 360;\n\telse if (a1 < -180)\n\t\ta1 += 360;\n\tparent.updateWorldTransform(px, py, parent._arotation + a1 * alpha, sx, sy, 0, 0);\n\ta2 = ((a2 + os) * MathUtil::Rad_Deg - child._ashearX) * s2 + o2 - child._arotation;\n\tif (a2 > 180) a2 -= 360;\n\telse if (a2 < -180)\n\t\ta2 += 360;\n\tchild.updateWorldTransform(cx, cy, child._arotation + a2 * alpha, child._ascaleX, child._ascaleY,\n\t\t\t\t\t\t\t   child._ashearX, child._ashearY);\n}\n}\n\nIkConstraint::IkConstraint(IkConstraintData &data, Skeleton &skeleton) : Updatable(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _data(data),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _bendDirection(data.getBendDirection()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _compress(data.getCompress()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _stretch(data.getStretch()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _mix(data.getMix()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _softness(data.getSoftness()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _target(skeleton.findBone(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t data.getTarget()->getName())),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _active(false) {\n\t_bones.ensureCapacity(_data.getBones().size());\n\tfor (size_t i = 0; i < _data.getBones().size(); i++) {\n\t\tBoneData *boneData = _data.getBones()[i];\n\t\t_bones.add(skeleton.findBone(boneData->getName()));\n\t}\n}\n\nvoid IkConstraint::update(Physics) {\n\tif (_mix == 0) return;\n\tswitch (_bones.size()) {\n\t\tcase 1: {\n\t\t\tBone *bone0 = _bones[0];\n\t\t\tapply(*bone0, _target->getWorldX(), _target->getWorldY(), _compress, _stretch, _data._uniform, _mix);\n\t\t} break;\n\t\tcase 2: {\n\t\t\tBone *bone0 = _bones[0];\n\t\t\tBone *bone1 = _bones[1];\n\t\t\tapply(*bone0, *bone1, _target->getWorldX(), _target->getWorldY(), _bendDirection, _stretch, _data._uniform,\n\t\t\t\t  _softness,\n\t\t\t\t  _mix);\n\t\t} break;\n\t}\n}\n\nint IkConstraint::getOrder() {\n\treturn (int) _data.getOrder();\n}\n\nIkConstraintData &IkConstraint::getData() {\n\treturn _data;\n}\n\nVector<Bone *> &IkConstraint::getBones() {\n\treturn _bones;\n}\n\nBone *IkConstraint::getTarget() {\n\treturn _target;\n}\n\nvoid IkConstraint::setTarget(Bone *inValue) {\n\t_target = inValue;\n}\n\nint IkConstraint::getBendDirection() {\n\treturn _bendDirection;\n}\n\nvoid IkConstraint::setBendDirection(int inValue) {\n\t_bendDirection = inValue;\n}\n\nfloat IkConstraint::getMix() {\n\treturn _mix;\n}\n\nvoid IkConstraint::setMix(float inValue) {\n\t_mix = inValue;\n}\n\nbool IkConstraint::getStretch() {\n\treturn _stretch;\n}\n\nvoid IkConstraint::setStretch(bool inValue) {\n\t_stretch = inValue;\n}\n\nbool IkConstraint::getCompress() {\n\treturn _compress;\n}\n\nvoid IkConstraint::setCompress(bool inValue) {\n\t_compress = inValue;\n}\n\nbool IkConstraint::isActive() {\n\treturn _active;\n}\n\nvoid IkConstraint::setActive(bool inValue) {\n\t_active = inValue;\n}\n\nfloat IkConstraint::getSoftness() {\n\treturn _softness;\n}\n\nvoid IkConstraint::setSoftness(float inValue) {\n\t_softness = inValue;\n}\n\nvoid IkConstraint::setToSetupPose() {\n\tIkConstraintData &data = this->_data;\n\tthis->_mix = data._mix;\n\tthis->_softness = data._softness;\n\tthis->_bendDirection = data._bendDirection;\n\tthis->_compress = data._compress;\n\tthis->_stretch = data._stretch;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/IkConstraintData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/IkConstraintData.h>\n\n#include <spine/BoneData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(IkConstraintData, ConstraintData)\n\nIkConstraintData::IkConstraintData(const String &name) : ConstraintData(name),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _target(NULL),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _bendDirection(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _compress(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _stretch(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _uniform(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _mix(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _softness(0) {\n}\n\nVector<BoneData *> &IkConstraintData::getBones() {\n\treturn _bones;\n}\n\nBoneData *IkConstraintData::getTarget() {\n\treturn _target;\n}\n\nvoid IkConstraintData::setTarget(BoneData *inValue) {\n\t_target = inValue;\n}\n\nint IkConstraintData::getBendDirection() {\n\treturn _bendDirection;\n}\n\nvoid IkConstraintData::setBendDirection(int inValue) {\n\t_bendDirection = inValue;\n}\n\nfloat IkConstraintData::getMix() {\n\treturn _mix;\n}\n\nvoid IkConstraintData::setMix(float inValue) {\n\t_mix = inValue;\n}\n\nbool IkConstraintData::getStretch() {\n\treturn _stretch;\n}\n\nvoid IkConstraintData::setStretch(bool inValue) {\n\t_stretch = inValue;\n}\n\nbool IkConstraintData::getCompress() {\n\treturn _compress;\n}\n\nvoid IkConstraintData::setCompress(bool inValue) {\n\t_compress = inValue;\n}\n\n\nbool IkConstraintData::getUniform() {\n\treturn _uniform;\n}\n\nvoid IkConstraintData::setUniform(bool inValue) {\n\t_uniform = inValue;\n}\n\nfloat IkConstraintData::getSoftness() {\n\treturn _softness;\n}\n\nvoid IkConstraintData::setSoftness(float inValue) {\n\t_softness = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/IkConstraintTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/IkConstraintTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/IkConstraint.h>\n#include <spine/IkConstraintData.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(IkConstraintTimeline, CurveTimeline)\n\nIkConstraintTimeline::IkConstraintTimeline(size_t frameCount, size_t bezierCount, int ikConstraintIndex)\n\t: CurveTimeline(frameCount, IkConstraintTimeline::ENTRIES, bezierCount), _constraintIndex(ikConstraintIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_IkConstraint << 32) | ikConstraintIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nvoid IkConstraintTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t\t\t MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\n\tIkConstraint *constraintP = skeleton._ikConstraints[_constraintIndex];\n\tIkConstraint &constraint = *constraintP;\n\tif (!constraint.isActive()) return;\n\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tconstraint._mix = constraint._data._mix;\n\t\t\t\tconstraint._softness = constraint._data._softness;\n\t\t\t\tconstraint._bendDirection = constraint._data._bendDirection;\n\t\t\t\tconstraint._compress = constraint._data._compress;\n\t\t\t\tconstraint._stretch = constraint._data._stretch;\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tconstraint._mix += (constraint._data._mix - constraint._mix) * alpha;\n\t\t\t\tconstraint._softness += (constraint._data._softness - constraint._softness) * alpha;\n\t\t\t\tconstraint._bendDirection = constraint._data._bendDirection;\n\t\t\t\tconstraint._compress = constraint._data._compress;\n\t\t\t\tconstraint._stretch = constraint._data._stretch;\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\t}\n\n\tfloat mix = 0, softness = 0;\n\tint i = Animation::search(_frames, time, IkConstraintTimeline::ENTRIES);\n\tint curveType = (int) _curves[i / IkConstraintTimeline::ENTRIES];\n\tswitch (curveType) {\n\t\tcase IkConstraintTimeline::LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\tmix = _frames[i + IkConstraintTimeline::MIX];\n\t\t\tsoftness = _frames[i + IkConstraintTimeline::SOFTNESS];\n\t\t\tfloat t = (time - before) / (_frames[i + IkConstraintTimeline::ENTRIES] - before);\n\t\t\tmix += (_frames[i + IkConstraintTimeline::ENTRIES + IkConstraintTimeline::MIX] - mix) * t;\n\t\t\tsoftness += (_frames[i + IkConstraintTimeline::ENTRIES + IkConstraintTimeline::SOFTNESS] - softness) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase IkConstraintTimeline::STEPPED: {\n\t\t\tmix = _frames[i + IkConstraintTimeline::MIX];\n\t\t\tsoftness = _frames[i + IkConstraintTimeline::SOFTNESS];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tmix = getBezierValue(time, i, IkConstraintTimeline::MIX, curveType - IkConstraintTimeline::BEZIER);\n\t\t\tsoftness = getBezierValue(time, i, IkConstraintTimeline::SOFTNESS,\n\t\t\t\t\t\t\t\t\t  curveType + IkConstraintTimeline::BEZIER_SIZE -\n\t\t\t\t\t\t\t\t\t\t\t  IkConstraintTimeline::BEZIER);\n\t\t}\n\t}\n\n\tif (blend == MixBlend_Setup) {\n\t\tconstraint._mix = constraint._data._mix + (mix - constraint._data._mix) * alpha;\n\t\tconstraint._softness = constraint._data._softness + (softness - constraint._data._softness) * alpha;\n\n\t\tif (direction == MixDirection_Out) {\n\t\t\tconstraint._bendDirection = constraint._data._bendDirection;\n\t\t\tconstraint._compress = constraint._data._compress;\n\t\t\tconstraint._stretch = constraint._data._stretch;\n\t\t} else {\n\t\t\tconstraint._bendDirection = _frames[i + IkConstraintTimeline::BEND_DIRECTION];\n\t\t\tconstraint._compress = _frames[i + IkConstraintTimeline::COMPRESS] != 0;\n\t\t\tconstraint._stretch = _frames[i + IkConstraintTimeline::STRETCH] != 0;\n\t\t}\n\t} else {\n\t\tconstraint._mix += (mix - constraint._mix) * alpha;\n\t\tconstraint._softness += (softness - constraint._softness) * alpha;\n\t\tif (direction == MixDirection_In) {\n\t\t\tconstraint._bendDirection = _frames[i + IkConstraintTimeline::BEND_DIRECTION];\n\t\t\tconstraint._compress = _frames[i + IkConstraintTimeline::COMPRESS] != 0;\n\t\t\tconstraint._stretch = _frames[i + IkConstraintTimeline::STRETCH] != 0;\n\t\t}\n\t}\n}\n\nvoid IkConstraintTimeline::setFrame(int frame, float time, float mix, float softness, int bendDirection, bool compress,\n\t\t\t\t\t\t\t\t\tbool stretch) {\n\tframe *= ENTRIES;\n\t_frames[frame] = time;\n\t_frames[frame + MIX] = mix;\n\t_frames[frame + SOFTNESS] = softness;\n\t_frames[frame + BEND_DIRECTION] = (float) bendDirection;\n\t_frames[frame + COMPRESS] = compress ? 1 : 0;\n\t_frames[frame + STRETCH] = stretch ? 1 : 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/InheritTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/InheritTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Bone.h>\n#include <spine/BoneData.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(InheritTimeline, Timeline)\n\nInheritTimeline::InheritTimeline(size_t frameCount, int boneIndex) : Timeline(frameCount, ENTRIES),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_Inherit << 32) | boneIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nInheritTimeline::~InheritTimeline() {\n}\n\nvoid InheritTimeline::setFrame(int frame, float time, Inherit inherit) {\n\tframe *= ENTRIES;\n\t_frames[frame] = time;\n\t_frames[frame + INHERIT] = inherit;\n}\n\n\nvoid InheritTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t\tMixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\tSP_UNUSED(alpha);\n\n\tBone *bone = skeleton.getBones()[_boneIndex];\n\tif (!bone->isActive()) return;\n\n\tif (direction == MixDirection_Out) {\n\t\tif (blend == MixBlend_Setup) bone->setInherit(bone->_data.getInherit());\n\t\treturn;\n\t}\n\n\tif (time < _frames[0]) {\n\t\tif (blend == MixBlend_Setup || blend == MixBlend_First) bone->_inherit = bone->_data.getInherit();\n\t\treturn;\n\t}\n\tint idx = Animation::search(_frames, time, ENTRIES) + INHERIT;\n\tbone->_inherit = static_cast<Inherit>(_frames[idx]);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Json.cpp",
    "content": "/*\nCopyright (c) 2009, Dave Gamble\nCopyright (c) 2013, Esoteric Software\n\nPermission is hereby granted, dispose 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\nall copies 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\nTHE SOFTWARE.\n*/\n\n/* Json */\n/* JSON parser in CPP, from json.c in the spine-c runtime */\n\n#ifndef _DEFAULT_SOURCE\n/* Bring strings.h definitions into string.h, where appropriate */\n#define _DEFAULT_SOURCE\n#endif\n\n#ifndef _BSD_SOURCE\n/* Bring strings.h definitions into string.h, where appropriate */\n#define _BSD_SOURCE\n#endif\n\n#include <spine/Json.h>\n#include <spine/Extension.h>\n#include <spine/SpineString.h>\n\n#include <assert.h>\n#include <math.h>\n\nusing namespace spine;\n\nconst int Json::JSON_FALSE = 0;\nconst int Json::JSON_TRUE = 1;\nconst int Json::JSON_NULL = 2;\nconst int Json::JSON_NUMBER = 3;\nconst int Json::JSON_STRING = 4;\nconst int Json::JSON_ARRAY = 5;\nconst int Json::JSON_OBJECT = 6;\n\nconst char *Json::_error = NULL;\n\nJson *Json::getItem(Json *object, const char *string) {\n\tJson *c = object->_child;\n\twhile (c && json_strcasecmp(c->_name, string)) {\n\t\tc = c->_next;\n\t}\n\treturn c;\n}\n\nJson *Json::getItem(Json *object, int childIndex) {\n\tJson *current = object->_child;\n\twhile (current != NULL && childIndex > 0) {\n\t\tchildIndex--;\n\t\tcurrent = current->_next;\n\t}\n\treturn current;\n}\n\nconst char *Json::getString(Json *object, const char *name, const char *defaultValue) {\n\tobject = getItem(object, name);\n\tif (object) {\n\t\treturn object->_valueString;\n\t}\n\n\treturn defaultValue;\n}\n\nfloat Json::getFloat(Json *value, const char *name, float defaultValue) {\n\tvalue = getItem(value, name);\n\treturn value ? value->_valueFloat : defaultValue;\n}\n\nint Json::getInt(Json *value, const char *name, int defaultValue) {\n\tvalue = getItem(value, name);\n\treturn value ? value->_valueInt : defaultValue;\n}\n\nbool Json::getBoolean(spine::Json *value, const char *name, bool defaultValue) {\n\tvalue = getItem(value, name);\n\tif (value) {\n\t\tif (value->_valueString) return strcmp(value->_valueString, \"true\") == 0;\n\t\tif (value->_type == JSON_NULL) return false;\n\t\tif (value->_type == JSON_NUMBER) return value->_valueFloat != 0;\n\t\tif (value->_type == JSON_FALSE) return false;\n\t\tif (value->_type == JSON_TRUE) return true;\n\t\treturn defaultValue;\n\t} else {\n\t\treturn defaultValue;\n\t}\n}\n\nconst char *Json::getError() {\n\treturn _error;\n}\n\nJson::Json(const char *value) : _next(NULL),\n#if SPINE_JSON_HAVE_PREV\n\t\t\t\t\t\t\t\t_prev(NULL),\n#endif\n\t\t\t\t\t\t\t\t_child(NULL),\n\t\t\t\t\t\t\t\t_type(0),\n\t\t\t\t\t\t\t\t_size(0),\n\t\t\t\t\t\t\t\t_valueString(NULL),\n\t\t\t\t\t\t\t\t_valueInt(0),\n\t\t\t\t\t\t\t\t_valueFloat(0),\n\t\t\t\t\t\t\t\t_name(NULL) {\n\tif (value) {\n\t\tvalue = parseValue(this, skip(value));\n\n\t\tassert(value);\n\t}\n}\n\nJson::~Json() {\n\tspine::Json *curr = NULL;\n\tspine::Json *next = _child;\n\tdo {\n\t\tcurr = next;\n\t\tif (curr) {\n\t\t\tnext = curr->_next;\n\t\t}\n\t\tdelete curr;\n\t} while (next);\n\n\tif (_valueString) {\n\t\tSpineExtension::free(_valueString, __FILE__, __LINE__);\n\t}\n\n\tif (_name) {\n\t\tSpineExtension::free(_name, __FILE__, __LINE__);\n\t}\n}\n\nconst char *Json::skip(const char *inValue) {\n\tif (!inValue) {\n\t\t/* must propagate NULL since it's often called in skip(f(...)) form */\n\t\treturn NULL;\n\t}\n\n\twhile (*inValue && (unsigned char) *inValue <= 32) {\n\t\tinValue++;\n\t}\n\n\treturn inValue;\n}\n\nconst char *Json::parseValue(Json *item, const char *value) {\n\t/* Referenced by constructor, parseArray(), and parseObject(). */\n\t/* Always called with the result of skip(). */\n#ifdef SPINE_JSON_DEBUG /* Checked at entry to graph, constructor, and after every parse call. */\n\tif (!value) {\n\t\t/* Fail on null. */\n\t\treturn NULL;\n\t}\n#endif\n\n\tswitch (*value) {\n\t\tcase 'n': {\n\t\t\tif (!strncmp(value + 1, \"ull\", 3)) {\n\t\t\t\titem->_type = JSON_NULL;\n\t\t\t\treturn value + 4;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase 'f': {\n\t\t\tif (!strncmp(value + 1, \"alse\", 4)) {\n\t\t\t\titem->_type = JSON_FALSE;\n\t\t\t\t/* calloc prevents us needing item->_type = JSON_FALSE or valueInt = 0 here */\n\t\t\t\treturn value + 5;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase 't': {\n\t\t\tif (!strncmp(value + 1, \"rue\", 3)) {\n\t\t\t\titem->_type = JSON_TRUE;\n\t\t\t\titem->_valueInt = 1;\n\t\t\t\treturn value + 4;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase '\\\"':\n\t\t\treturn parseString(item, value);\n\t\tcase '[':\n\t\t\treturn parseArray(item, value);\n\t\tcase '{':\n\t\t\treturn parseObject(item, value);\n\t\tcase '-': /* fallthrough */\n\t\tcase '0': /* fallthrough */\n\t\tcase '1': /* fallthrough */\n\t\tcase '2': /* fallthrough */\n\t\tcase '3': /* fallthrough */\n\t\tcase '4': /* fallthrough */\n\t\tcase '5': /* fallthrough */\n\t\tcase '6': /* fallthrough */\n\t\tcase '7': /* fallthrough */\n\t\tcase '8': /* fallthrough */\n\t\tcase '9':\n\t\t\treturn parseNumber(item, value);\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\t_error = value;\n\treturn NULL; /* failure. */\n}\n\nstatic const unsigned char firstByteMark[7] = {0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC};\n\nconst char *Json::parseString(Json *item, const char *str) {\n\tconst char *ptr = str + 1;\n\tchar *ptr2;\n\tchar *out;\n\tint len = 0;\n\tunsigned uc, uc2;\n\tif (*str != '\\\"') {\n\t\t/* TODO: don't need this check when called from parseValue, but do need from parseObject */\n\t\t_error = str;\n\t\treturn 0;\n\t} /* not a string! */\n\n\twhile (*ptr != '\\\"' && *ptr && ++len) {\n\t\tif (*ptr++ == '\\\\') {\n\t\t\tptr++; /* Skip escaped quotes. */\n\t\t}\n\t}\n\n\tout = SpineExtension::alloc<char>(len + 1, __FILE__, __LINE__); /* The length needed for the string, roughly. */\n\tif (!out) {\n\t\treturn 0;\n\t}\n\n\tptr = str + 1;\n\tptr2 = out;\n\twhile (*ptr != '\\\"' && *ptr) {\n\t\tif (*ptr != '\\\\') {\n\t\t\t*ptr2++ = *ptr++;\n\t\t} else {\n\t\t\tptr++;\n\t\t\tswitch (*ptr) {\n\t\t\t\tcase 'b':\n\t\t\t\t\t*ptr2++ = '\\b';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'f':\n\t\t\t\t\t*ptr2++ = '\\f';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'n':\n\t\t\t\t\t*ptr2++ = '\\n';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'r':\n\t\t\t\t\t*ptr2++ = '\\r';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 't':\n\t\t\t\t\t*ptr2++ = '\\t';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'u': {\n\t\t\t\t\t/* transcode utf16 to utf8. */\n\t\t\t\t\tsscanf(ptr + 1, \"%4x\", &uc);\n\t\t\t\t\tptr += 4; /* get the unicode char. */\n\n\t\t\t\t\tif ((uc >= 0xDC00 && uc <= 0xDFFF) || uc == 0) {\n\t\t\t\t\t\tbreak; /* check for invalid.\t*/\n\t\t\t\t\t}\n\n\t\t\t\t\t/* TODO provide an option to ignore surrogates, use unicode replacement character? */\n\t\t\t\t\tif (uc >= 0xD800 && uc <= 0xDBFF) /* UTF16 surrogate pairs.\t*/ {\n\t\t\t\t\t\tif (ptr[1] != '\\\\' || ptr[2] != 'u') {\n\t\t\t\t\t\t\tbreak; /* missing second-half of surrogate.\t*/\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsscanf(ptr + 3, \"%4x\", &uc2);\n\t\t\t\t\t\tptr += 6;\n\t\t\t\t\t\tif (uc2 < 0xDC00 || uc2 > 0xDFFF) {\n\t\t\t\t\t\t\tbreak; /* invalid second-half of surrogate.\t*/\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuc = 0x10000 + (((uc & 0x3FF) << 10) | (uc2 & 0x3FF));\n\t\t\t\t\t}\n\n\t\t\t\t\tlen = 4;\n\t\t\t\t\tif (uc < 0x80) {\n\t\t\t\t\t\tlen = 1;\n\t\t\t\t\t} else if (uc < 0x800) {\n\t\t\t\t\t\tlen = 2;\n\t\t\t\t\t} else if (uc < 0x10000) {\n\t\t\t\t\t\tlen = 3;\n\t\t\t\t\t}\n\t\t\t\t\tptr2 += len;\n\n\t\t\t\t\tswitch (len) {\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t*--ptr2 = ((uc | 0x80) & 0xBF);\n\t\t\t\t\t\t\tuc >>= 6;\n\t\t\t\t\t\t\t/* fallthrough */\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t*--ptr2 = ((uc | 0x80) & 0xBF);\n\t\t\t\t\t\t\tuc >>= 6;\n\t\t\t\t\t\t\t/* fallthrough */\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t*--ptr2 = ((uc | 0x80) & 0xBF);\n\t\t\t\t\t\t\tuc >>= 6;\n\t\t\t\t\t\t\t/* fallthrough */\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t*--ptr2 = (uc | firstByteMark[len]);\n\t\t\t\t\t}\n\t\t\t\t\tptr2 += len;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\t*ptr2++ = *ptr;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tptr++;\n\t\t}\n\t}\n\n\t*ptr2 = 0;\n\n\tif (*ptr == '\\\"') {\n\t\tptr++; /* TODO error handling if not \\\" or \\0 ? */\n\t}\n\n\titem->_valueString = out;\n\titem->_type = JSON_STRING;\n\n\treturn ptr;\n}\n\nconst char *Json::parseNumber(Json *item, const char *num) {\n\tdouble result = 0.0;\n\tint negative = 0;\n\tchar *ptr = (char *) num;\n\n\tif (*ptr == '-') {\n\t\tnegative = -1;\n\t\t++ptr;\n\t}\n\n\twhile (*ptr >= '0' && *ptr <= '9') {\n\t\tresult = result * 10.0 + (*ptr - '0');\n\t\t++ptr;\n\t}\n\n\tif (*ptr == '.') {\n\t\tdouble fraction = 0.0;\n\t\tint n = 0;\n\t\t++ptr;\n\n\t\twhile (*ptr >= '0' && *ptr <= '9') {\n\t\t\tfraction = (fraction * 10.0) + (*ptr - '0');\n\t\t\t++ptr;\n\t\t\t++n;\n\t\t}\n\t\tresult += fraction / pow(10.0, n);\n\t}\n\n\tif (negative) {\n\t\tresult = -result;\n\t}\n\n\tif (*ptr == 'e' || *ptr == 'E') {\n\t\tdouble exponent = 0;\n\t\tint expNegative = 0;\n\t\t++ptr;\n\n\t\tif (*ptr == '-') {\n\t\t\texpNegative = -1;\n\t\t\t++ptr;\n\t\t} else if (*ptr == '+') {\n\t\t\t++ptr;\n\t\t}\n\n\t\twhile (*ptr >= '0' && *ptr <= '9') {\n\t\t\texponent = (exponent * 10.0) + (*ptr - '0');\n\t\t\t++ptr;\n\t\t}\n\n\t\tif (expNegative) {\n\t\t\tresult = result / pow(10, exponent);\n\t\t} else {\n\t\t\tresult = result * pow(10, exponent);\n\t\t}\n\t}\n\n\tif (ptr != num) {\n\t\t/* Parse success, number found. */\n\t\titem->_valueFloat = (float) result;\n\t\titem->_valueInt = (int) result;\n\t\titem->_type = JSON_NUMBER;\n\t\treturn ptr;\n\t} else {\n\t\t/* Parse failure, _error is set. */\n\t\t_error = num;\n\t\treturn NULL;\n\t}\n}\n\nconst char *Json::parseArray(Json *item, const char *value) {\n\tJson *child;\n\n#ifdef SPINE_JSON_DEBUG /* unnecessary, only callsite (parse_value) verifies this */\n\tif (*value != '[') {\n\t\tep = value;\n\t\treturn 0;\n\t} /* not an array! */\n#endif\n\n\titem->_type = JSON_ARRAY;\n\tvalue = skip(value + 1);\n\tif (*value == ']') {\n\t\treturn value + 1; /* empty array. */\n\t}\n\n\titem->_child = child = new (__FILE__, __LINE__) Json(NULL);\n\tif (!item->_child) {\n\t\treturn NULL; /* memory fail */\n\t}\n\n\tvalue = skip(parseValue(child, skip(value))); /* skip any spacing, get the value. */\n\n\tif (!value) {\n\t\treturn NULL;\n\t}\n\n\titem->_size = 1;\n\n\twhile (*value == ',') {\n\t\tJson *new_item = new (__FILE__, __LINE__) Json(NULL);\n\t\tif (!new_item) {\n\t\t\treturn NULL; /* memory fail */\n\t\t}\n\t\tchild->_next = new_item;\n#if SPINE_JSON_HAVE_PREV\n\t\tnew_item->prev = child;\n#endif\n\t\tchild = new_item;\n\t\tvalue = skip(parseValue(child, skip(value + 1)));\n\t\tif (!value) {\n\t\t\treturn NULL; /* parse fail */\n\t\t}\n\t\titem->_size++;\n\t}\n\n\tif (*value == ']') {\n\t\treturn value + 1; /* end of array */\n\t}\n\n\t_error = value;\n\n\treturn NULL; /* malformed. */\n}\n\n/* Build an object from the text. */\nconst char *Json::parseObject(Json *item, const char *value) {\n\tJson *child;\n\n#ifdef SPINE_JSON_DEBUG /* unnecessary, only callsite (parse_value) verifies this */\n\tif (*value != '{') {\n\t\tep = value;\n\t\treturn 0;\n\t} /* not an object! */\n#endif\n\n\titem->_type = JSON_OBJECT;\n\tvalue = skip(value + 1);\n\tif (*value == '}') {\n\t\treturn value + 1; /* empty array. */\n\t}\n\n\titem->_child = child = new (__FILE__, __LINE__) Json(NULL);\n\tif (!item->_child) {\n\t\treturn NULL;\n\t}\n\tvalue = skip(parseString(child, skip(value)));\n\tif (!value) {\n\t\treturn NULL;\n\t}\n\tchild->_name = child->_valueString;\n\tchild->_valueString = 0;\n\tif (*value != ':') {\n\t\t_error = value;\n\t\treturn NULL;\n\t} /* fail! */\n\n\tvalue = skip(parseValue(child, skip(value + 1))); /* skip any spacing, get the value. */\n\tif (!value) {\n\t\treturn NULL;\n\t}\n\n\titem->_size = 1;\n\n\twhile (*value == ',') {\n\t\tJson *new_item = new (__FILE__, __LINE__) Json(NULL);\n\t\tif (!new_item) {\n\t\t\treturn NULL; /* memory fail */\n\t\t}\n\t\tchild->_next = new_item;\n#if SPINE_JSON_HAVE_PREV\n\t\tnew_item->prev = child;\n#endif\n\t\tchild = new_item;\n\t\tvalue = skip(parseString(child, skip(value + 1)));\n\t\tif (!value) {\n\t\t\treturn NULL;\n\t\t}\n\t\tchild->_name = child->_valueString;\n\t\tchild->_valueString = 0;\n\t\tif (*value != ':') {\n\t\t\t_error = value;\n\t\t\treturn NULL;\n\t\t} /* fail! */\n\n\t\tvalue = skip(parseValue(child, skip(value + 1))); /* skip any spacing, get the value. */\n\t\tif (!value) {\n\t\t\treturn NULL;\n\t\t}\n\t\titem->_size++;\n\t}\n\n\tif (*value == '}') {\n\t\treturn value + 1; /* end of array */\n\t}\n\n\t_error = value;\n\n\treturn NULL; /* malformed. */\n}\n\nint Json::json_strcasecmp(const char *s1, const char *s2) {\n\t/* TODO we may be able to elide these NULL checks if we can prove\n\t * the graph and input (only callsite is Json_getItem) should not have NULLs\n\t */\n\tif (s1 && s2) {\n#if defined(_WIN32)\n\t\treturn _stricmp(s1, s2);\n#else\n\t\treturn strcasecmp(s1, s2);\n#endif\n\t} else {\n\t\tif (s1 < s2) {\n\t\t\treturn -1; /* s1 is null, s2 is not */\n\t\t} else if (s1 == s2) {\n\t\t\treturn 0; /* both are null */\n\t\t} else {\n\t\t\treturn 1; /* s2 is nul\ts1 is not */\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/LinkedMesh.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/LinkedMesh.h>\n\n#include <spine/MeshAttachment.h>\n\nusing namespace spine;\n\nLinkedMesh::LinkedMesh(MeshAttachment *mesh, const int skinIndex, size_t slotIndex, const String &parent,\n\t\t\t\t\t   bool inheritTimeline) : _mesh(mesh),\n\t\t\t\t\t\t\t\t\t\t\t   _skinIndex(skinIndex),\n\t\t\t\t\t\t\t\t\t\t\t   _skin(\"\"),\n\t\t\t\t\t\t\t\t\t\t\t   _slotIndex(slotIndex),\n\t\t\t\t\t\t\t\t\t\t\t   _parent(parent),\n\t\t\t\t\t\t\t\t\t\t\t   _inheritTimeline(inheritTimeline) {\n}\n\nLinkedMesh::LinkedMesh(MeshAttachment *mesh, const String &skin, size_t slotIndex, const String &parent,\n\t\t\t\t\t   bool inheritTimeline) : _mesh(mesh),\n\t\t\t\t\t\t\t\t\t\t\t   _skinIndex(-1),\n\t\t\t\t\t\t\t\t\t\t\t   _skin(skin),\n\t\t\t\t\t\t\t\t\t\t\t   _slotIndex(slotIndex),\n\t\t\t\t\t\t\t\t\t\t\t   _parent(parent),\n\t\t\t\t\t\t\t\t\t\t\t   _inheritTimeline(inheritTimeline) {\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Log.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Log.h>\n\n#include <stdio.h>\n\nusing namespace spine;\n\nvoid spine::spDebug_printSkeletonData(SkeletonData *skeletonData) {\n\tint i, n;\n\tspDebug_printBoneDatas(skeletonData->getBones());\n\n\tfor (i = 0, n = (int) skeletonData->getAnimations().size(); i < n; i++) {\n\t\tspDebug_printAnimation(skeletonData->getAnimations()[i]);\n\t}\n}\n\nvoid _spDebug_printTimelineBase(Timeline *timeline) {\n\tprintf(\"   Timeline %s:\\n\", timeline->getRTTI().getClassName());\n\tprintf(\"      frame count: %zu\\n\", timeline->getFrameCount());\n\tprintf(\"      frame entries: %zu\\n\", timeline->getFrameEntries());\n\tprintf(\"      frames: \");\n\tspDebug_printFloats(timeline->getFrames());\n\tprintf(\"\\n\");\n}\n\nvoid _spDebug_printCurveTimeline(CurveTimeline *timeline) {\n\t_spDebug_printTimelineBase(timeline);\n\tprintf(\"      curves: \");\n\tspDebug_printFloats(timeline->getCurves());\n\tprintf(\"\\n\");\n}\n\nvoid spine::spDebug_printTimeline(Timeline *timeline) {\n\tif (timeline->getRTTI().instanceOf(CurveTimeline::rtti))\n\t\t_spDebug_printCurveTimeline(static_cast<CurveTimeline *>(timeline));\n\telse\n\t\t_spDebug_printTimelineBase(timeline);\n}\n\nvoid spine::spDebug_printAnimation(Animation *animation) {\n\tint i, n;\n\tprintf(\"Animation %s: %zu timelines\\n\", animation->getName().buffer(), animation->getTimelines().size());\n\n\tfor (i = 0, n = (int) animation->getTimelines().size(); i < n; i++) {\n\t\tTimeline *timeline = animation->getTimelines()[i];\n\t\tspDebug_printTimeline(timeline);\n\t}\n}\n\nvoid spine::spDebug_printBoneDatas(Vector<BoneData *> &boneDatas) {\n\tint i, n;\n\tfor (i = 0, n = (int) boneDatas.size(); i < n; i++) {\n\t\tspDebug_printBoneData(boneDatas[i]);\n\t}\n}\n\nvoid spine::spDebug_printBoneData(BoneData *boneData) {\n\tprintf(\"Bone data %s: %f, %f, %f, %f, %f, %f %f\\n\", boneData->getName().buffer(), boneData->getRotation(),\n\t\t   boneData->getScaleX(), boneData->getScaleY(), boneData->getX(), boneData->getY(), boneData->getShearX(),\n\t\t   boneData->getShearY());\n}\n\nvoid spine::spDebug_printSkeleton(Skeleton *skeleton) {\n\tspDebug_printBones(skeleton->getBones());\n}\n\nvoid spine::spDebug_printBones(Vector<Bone *> &bones) {\n\tint i, n;\n\tfor (i = 0, n = (int) bones.size(); i < n; i++) {\n\t\tspDebug_printBone(bones[i]);\n\t}\n}\n\nvoid spine::spDebug_printBone(Bone *bone) {\n\tprintf(\"Bone %s: %f, %f, %f, %f, %f, %f\\n\", bone->getData().getName().buffer(), bone->getA(), bone->getB(),\n\t\t   bone->getC(), bone->getD(), bone->getWorldX(), bone->getWorldY());\n}\n\nvoid spine::spDebug_printFloats(float *values, int numFloats) {\n\tint i;\n\tprintf(\"(%i) [\", numFloats);\n\tfor (i = 0; i < numFloats; i++) {\n\t\tprintf(\"%f, \", values[i]);\n\t}\n\tprintf(\"]\");\n}\n\nvoid spine::spDebug_printFloats(Vector<float> &values) {\n\tint i, n;\n\tprintf(\"(%zu) [\", values.size());\n\tfor (i = 0, n = (int) values.size(); i < n; i++) {\n\t\tprintf(\"%f, \", values[i]);\n\t}\n\tprintf(\"]\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/MathUtil.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/MathUtil.h>\n#include <math.h>\n#include <stdlib.h>\n#include <cmath>\n\n// Required for division by 0 in _isNaN on MSVC\n#ifdef _MSC_VER\n#pragma warning(disable : 4723)\n#endif\n\nusing namespace spine;\n\nconst float MathUtil::Pi = 3.1415926535897932385f;\nconst float MathUtil::Pi_2 = 3.1415926535897932385f * 2;\nconst float MathUtil::InvPi_2 = 1 / MathUtil::Pi_2;\nconst float MathUtil::Deg_Rad = (3.1415926535897932385f / 180.0f);\nconst float MathUtil::Rad_Deg = (180.0f / 3.1415926535897932385f);\n\nfloat MathUtil::abs(float v) {\n\treturn ((v) < 0 ? -(v) : (v));\n}\n\nfloat MathUtil::sign(float v) {\n\treturn ((v) < 0 ? -1.0f : (v) > 0 ? 1.0f\n\t\t\t\t\t\t\t\t\t  : 0.0f);\n}\n\nfloat MathUtil::clamp(float x, float min, float max) {\n\treturn ((x) < (min) ? (min) : ((x) > (max) ? (max) : (x)));\n}\n\nfloat MathUtil::fmod(float a, float b) {\n\treturn (float) ::fmod(a, b);\n}\n\n/// Returns atan2 in radians, faster but less accurate than Math.Atan2. Average error of 0.00231 radians (0.1323\n/// degrees), largest error of 0.00488 radians (0.2796 degrees).\nfloat MathUtil::atan2(float y, float x) {\n\treturn (float) ::atan2(y, x);\n}\n\nfloat MathUtil::atan2Deg(float y, float x) {\n\treturn MathUtil::atan2(y, x) * MathUtil::Rad_Deg;\n}\n\n/// Returns the cosine in radians from a lookup table.\nfloat MathUtil::cos(float radians) {\n\treturn (float) ::cos(radians);\n}\n\n/// Returns the sine in radians from a lookup table.\nfloat MathUtil::sin(float radians) {\n\treturn (float) ::sin(radians);\n}\n\nfloat MathUtil::sqrt(float v) {\n\treturn (float) ::sqrt(v);\n}\n\nfloat MathUtil::acos(float v) {\n\treturn (float) ::acos(v);\n}\n\n/// Returns the sine in radians from a lookup table.\nfloat MathUtil::sinDeg(float degrees) {\n\treturn (float) ::sin(degrees * MathUtil::Deg_Rad);\n}\n\n/// Returns the cosine in radians from a lookup table.\nfloat MathUtil::cosDeg(float degrees) {\n\treturn (float) ::cos(degrees * MathUtil::Deg_Rad);\n}\n\nbool MathUtil::isNan(float v) {\n\treturn std::isnan(v);\n}\n\nfloat MathUtil::quietNan() {\n\treturn std::nan(\"\");\n}\n\nfloat MathUtil::random() {\n\treturn ::rand() / (float) RAND_MAX;\n}\n\nfloat MathUtil::randomTriangular(float min, float max) {\n\treturn randomTriangular(min, max, (min + max) * 0.5f);\n}\n\nfloat MathUtil::randomTriangular(float min, float max, float mode) {\n\tfloat u = random();\n\tfloat d = max - min;\n\tif (u <= (mode - min) / d) return min + sqrt(u * d * (mode - min));\n\treturn max - sqrt((1 - u) * d * (max - mode));\n}\n\nfloat MathUtil::pow(float a, float b) {\n\treturn (float) ::pow(a, b);\n}\n\nfloat MathUtil::ceil(float v) {\n\treturn ::ceil(v);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/MeshAttachment.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/MeshAttachment.h>\n\nusing namespace spine;\n\nRTTI_IMPL(MeshAttachment, VertexAttachment)\n\nMeshAttachment::MeshAttachment(const String &name) : VertexAttachment(name),\n\t\t\t\t\t\t\t\t\t\t\t\t\t _parentMesh(NULL),\n\t\t\t\t\t\t\t\t\t\t\t\t\t _path(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t _color(1, 1, 1, 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t _hullLength(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t _width(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t _height(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t _region(NULL),\n\t\t\t\t\t\t\t\t\t\t\t\t\t _sequence(NULL) {}\n\nMeshAttachment::~MeshAttachment() {\n\tif (_sequence) delete _sequence;\n}\n\nvoid MeshAttachment::updateRegion() {\n\tif (_uvs.size() != _regionUVs.size()) {\n\t\t_uvs.setSize(_regionUVs.size(), 0);\n\t}\n\n\tif (_region == nullptr) {\n\t\treturn;\n\t}\n\n\tint i = 0, n = (int) _regionUVs.size();\n\tfloat u = _region->u, v = _region->v;\n\tfloat width = 0, height = 0;\n\tswitch (_region->degrees) {\n\t\tcase 90: {\n\t\t\tfloat textureWidth = _region->height / (_region->u2 - _region->u);\n\t\t\tfloat textureHeight = _region->width / (_region->v2 - _region->v);\n\t\t\tu -= (_region->originalHeight - _region->offsetY - _region->height) / textureWidth;\n\t\t\tv -= (_region->originalWidth - _region->offsetX - _region->width) / textureHeight;\n\t\t\twidth = _region->originalHeight / textureWidth;\n\t\t\theight = _region->originalWidth / textureHeight;\n\t\t\tfor (i = 0; i < n; i += 2) {\n\t\t\t\t_uvs[i] = u + _regionUVs[i + 1] * width;\n\t\t\t\t_uvs[i + 1] = v + (1 - _regionUVs[i]) * height;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tcase 180: {\n\t\t\tfloat textureWidth = _region->width / (_region->u2 - _region->u);\n\t\t\tfloat textureHeight = _region->height / (_region->v2 - _region->v);\n\t\t\tu -= (_region->originalWidth - _region->offsetX - _region->width) / textureWidth;\n\t\t\tv -= _region->offsetY / textureHeight;\n\t\t\twidth = _region->originalWidth / textureWidth;\n\t\t\theight = _region->originalHeight / textureHeight;\n\t\t\tfor (i = 0; i < n; i += 2) {\n\t\t\t\t_uvs[i] = u + (1 - _regionUVs[i]) * width;\n\t\t\t\t_uvs[i + 1] = v + (1 - _regionUVs[i + 1]) * height;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tcase 270: {\n\t\t\tfloat textureHeight = _region->height / (_region->v2 - _region->v);\n\t\t\tfloat textureWidth = _region->width / (_region->u2 - _region->u);\n\t\t\tu -= _region->offsetY / textureWidth;\n\t\t\tv -= _region->offsetX / textureHeight;\n\t\t\twidth = _region->originalHeight / textureWidth;\n\t\t\theight = _region->originalWidth / textureHeight;\n\t\t\tfor (i = 0; i < n; i += 2) {\n\t\t\t\t_uvs[i] = u + (1 - _regionUVs[i + 1]) * width;\n\t\t\t\t_uvs[i + 1] = v + _regionUVs[i] * height;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tdefault: {\n\t\t\tfloat textureWidth = _region->width / (_region->u2 - _region->u);\n\t\t\tfloat textureHeight = _region->height / (_region->v2 - _region->v);\n\t\t\tu -= _region->offsetX / textureWidth;\n\t\t\tv -= (_region->originalHeight - _region->offsetY - _region->height) / textureHeight;\n\t\t\twidth = _region->originalWidth / textureWidth;\n\t\t\theight = _region->originalHeight / textureHeight;\n\t\t\tfor (i = 0; i < n; i += 2) {\n\t\t\t\t_uvs[i] = u + _regionUVs[i] * width;\n\t\t\t\t_uvs[i + 1] = v + _regionUVs[i + 1] * height;\n\t\t\t}\n\t\t}\n\t}\n}\n\nint MeshAttachment::getHullLength() {\n\treturn _hullLength;\n}\n\nvoid MeshAttachment::setHullLength(int inValue) {\n\t_hullLength = inValue;\n}\n\nVector<float> &MeshAttachment::getRegionUVs() {\n\treturn _regionUVs;\n}\n\nVector<float> &MeshAttachment::getUVs() {\n\treturn _uvs;\n}\n\nVector<unsigned short> &MeshAttachment::getTriangles() {\n\treturn _triangles;\n}\n\nconst String &MeshAttachment::getPath() {\n\treturn _path;\n}\n\nvoid MeshAttachment::setPath(const String &inValue) {\n\t_path = inValue;\n}\n\nTextureRegion *MeshAttachment::getRegion() {\n\treturn _region;\n}\n\nvoid MeshAttachment::setRegion(TextureRegion *region) {\n\t_region = region;\n}\n\nSequence *MeshAttachment::getSequence() {\n\treturn _sequence;\n}\n\nvoid MeshAttachment::setSequence(Sequence *sequence) {\n\t_sequence = sequence;\n}\n\nMeshAttachment *MeshAttachment::getParentMesh() {\n\treturn _parentMesh;\n}\n\nvoid MeshAttachment::setParentMesh(MeshAttachment *inValue) {\n\t_parentMesh = inValue;\n\tif (inValue != NULL) {\n\t\t_bones.clearAndAddAll(inValue->_bones);\n\t\t_vertices.clearAndAddAll(inValue->_vertices);\n\t\t_worldVerticesLength = inValue->_worldVerticesLength;\n\t\t_regionUVs.clearAndAddAll(inValue->_regionUVs);\n\t\t_triangles.clearAndAddAll(inValue->_triangles);\n\t\t_hullLength = inValue->_hullLength;\n\t\t_edges.clearAndAddAll(inValue->_edges);\n\t\t_width = inValue->_width;\n\t\t_height = inValue->_height;\n\t}\n}\n\nVector<unsigned short> &MeshAttachment::getEdges() {\n\treturn _edges;\n}\n\nfloat MeshAttachment::getWidth() {\n\treturn _width;\n}\n\nvoid MeshAttachment::setWidth(float inValue) {\n\t_width = inValue;\n}\n\nfloat MeshAttachment::getHeight() {\n\treturn _height;\n}\n\nvoid MeshAttachment::setHeight(float inValue) {\n\t_height = inValue;\n}\n\nspine::Color &MeshAttachment::getColor() {\n\treturn _color;\n}\n\nAttachment *MeshAttachment::copy() {\n\tif (_parentMesh) return newLinkedMesh();\n\n\tMeshAttachment *copy = new (__FILE__, __LINE__) MeshAttachment(getName());\n\tcopy->setRegion(_region);\n\tcopy->setSequence(_sequence != NULL ? _sequence->copy() : NULL);\n\tcopy->_path = _path;\n\tcopy->_color.set(_color);\n\n\tcopyTo(copy);\n\tcopy->_regionUVs.clearAndAddAll(_regionUVs);\n\tcopy->_uvs.clearAndAddAll(_uvs);\n\tcopy->_triangles.clearAndAddAll(_triangles);\n\tcopy->_hullLength = _hullLength;\n\n\t// Nonessential.\n\tcopy->_edges.clearAndAddAll(copy->_edges);\n\tcopy->_width = _width;\n\tcopy->_height = _height;\n\treturn copy;\n}\n\nMeshAttachment *MeshAttachment::newLinkedMesh() {\n\tMeshAttachment *copy = new (__FILE__, __LINE__) MeshAttachment(getName());\n\tcopy->setRegion(_region);\n\tcopy->_path = _path;\n\tcopy->_color.set(_color);\n\tcopy->_timelineAttachment = this->_timelineAttachment;\n\tcopy->setParentMesh(_parentMesh ? _parentMesh : this);\n\tif (copy->_region) copy->updateRegion();\n\treturn copy;\n}\n\nvoid MeshAttachment::computeWorldVertices(Slot &slot, size_t start, size_t count, float *worldVertices, size_t offset,\n\t\t\t\t\t\t\t\t\t\t  size_t stride) {\n\tif (_sequence) _sequence->apply(&slot, this);\n\tVertexAttachment::computeWorldVertices(slot, start, count, worldVertices, offset, stride);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PathAttachment.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PathAttachment.h>\n\nusing namespace spine;\n\nRTTI_IMPL(PathAttachment, VertexAttachment)\n\nPathAttachment::PathAttachment(const String &name) : VertexAttachment(name), _closed(false), _constantSpeed(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t _color() {\n}\n\nVector<float> &PathAttachment::getLengths() {\n\treturn _lengths;\n}\n\nbool PathAttachment::isClosed() {\n\treturn _closed;\n}\n\nvoid PathAttachment::setClosed(bool inValue) {\n\t_closed = inValue;\n}\n\nbool PathAttachment::isConstantSpeed() {\n\treturn _constantSpeed;\n}\n\nvoid PathAttachment::setConstantSpeed(bool inValue) {\n\t_constantSpeed = inValue;\n}\n\nColor &PathAttachment::getColor() {\n\treturn _color;\n}\n\nAttachment *PathAttachment::copy() {\n\tPathAttachment *copy = new (__FILE__, __LINE__) PathAttachment(getName());\n\tcopyTo(copy);\n\tcopy->_lengths.clearAndAddAll(_lengths);\n\tcopy->_closed = _closed;\n\tcopy->_constantSpeed = _constantSpeed;\n\treturn copy;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PathConstraint.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PathConstraint.h>\n\n#include <spine/Bone.h>\n#include <spine/PathAttachment.h>\n#include <spine/PathConstraintData.h>\n#include <spine/Skeleton.h>\n#include <spine/Slot.h>\n\n#include <spine/BoneData.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(PathConstraint, Updatable)\n\nconst float PathConstraint::EPSILON = 0.00001f;\nconst int PathConstraint::NONE = -1;\nconst int PathConstraint::BEFORE = -2;\nconst int PathConstraint::AFTER = -3;\n\nPathConstraint::PathConstraint(PathConstraintData &data, Skeleton &skeleton) : Updatable(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _data(data),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _target(skeleton.findSlot(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   data.getTarget()->getName())),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _position(data.getPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _spacing(data.getSpacing()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _mixRotate(data.getMixRotate()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _mixX(data.getMixX()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _mixY(data.getMixY()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _active(false) {\n\t_bones.ensureCapacity(_data.getBones().size());\n\tfor (size_t i = 0; i < _data.getBones().size(); i++) {\n\t\tBoneData *boneData = _data.getBones()[i];\n\t\t_bones.add(skeleton.findBone(boneData->getName()));\n\t}\n\n\t_segments.setSize(10, 0);\n}\n\nvoid PathConstraint::update(Physics) {\n\tAttachment *baseAttachment = _target->getAttachment();\n\tif (baseAttachment == NULL || !baseAttachment->getRTTI().instanceOf(PathAttachment::rtti)) {\n\t\treturn;\n\t}\n\tPathAttachment *attachment = static_cast<PathAttachment *>(baseAttachment);\n\n\tfloat mixRotate = _mixRotate, mixX = _mixX, mixY = _mixY;\n\tif (mixRotate == 0 && mixX == 0 && mixY == 0) return;\n\n\tPathConstraintData &data = _data;\n\tbool tangents = data._rotateMode == RotateMode_Tangent, scale = data._rotateMode == RotateMode_ChainScale;\n\tsize_t boneCount = _bones.size();\n\tsize_t spacesCount = tangents ? boneCount : boneCount + 1;\n\t_spaces.setSize(spacesCount, 0);\n\tif (scale) _lengths.setSize(boneCount, 0);\n\tfloat spacing = _spacing;\n\n\tswitch (data._spacingMode) {\n\t\tcase SpacingMode_Percent: {\n\t\t\tif (scale) {\n\t\t\t\tfor (size_t i = 0, n = spacesCount - 1; i < n; i++) {\n\t\t\t\t\tBone *boneP = _bones[i];\n\t\t\t\t\tBone &bone = *boneP;\n\t\t\t\t\tfloat setupLength = bone._data.getLength();\n\t\t\t\t\tfloat x = setupLength * bone._a;\n\t\t\t\t\tfloat y = setupLength * bone._c;\n\t\t\t\t\t_lengths[i] = MathUtil::sqrt(x * x + y * y);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (size_t i = 1; i < spacesCount; ++i) {\n\t\t\t\t_spaces[i] = spacing;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase SpacingMode_Proportional: {\n\t\t\tfloat sum = 0;\n\t\t\tfor (size_t i = 0, n = spacesCount - 1; i < n;) {\n\t\t\t\tBone *boneP = _bones[i];\n\t\t\t\tBone &bone = *boneP;\n\t\t\t\tfloat setupLength = bone._data.getLength();\n\t\t\t\tif (setupLength < PathConstraint::EPSILON) {\n\t\t\t\t\tif (scale) _lengths[i] = 0;\n\t\t\t\t\t_spaces[++i] = spacing;\n\t\t\t\t} else {\n\t\t\t\t\tfloat x = setupLength * bone._a, y = setupLength * bone._c;\n\t\t\t\t\tfloat length = MathUtil::sqrt(x * x + y * y);\n\t\t\t\t\tif (scale) _lengths[i] = length;\n\t\t\t\t\t_spaces[++i] = length;\n\t\t\t\t\tsum += length;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sum > 0) {\n\t\t\t\tsum = spacesCount / sum * spacing;\n\t\t\t\tfor (size_t i = 1; i < spacesCount; i++) {\n\t\t\t\t\t_spaces[i] *= sum;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tbool lengthSpacing = data._spacingMode == SpacingMode_Length;\n\t\t\tfor (size_t i = 0, n = spacesCount - 1; i < n;) {\n\t\t\t\tBone *boneP = _bones[i];\n\t\t\t\tBone &bone = *boneP;\n\t\t\t\tfloat setupLength = bone._data.getLength();\n\t\t\t\tif (setupLength < PathConstraint::EPSILON) {\n\t\t\t\t\tif (scale) _lengths[i] = 0;\n\t\t\t\t\t_spaces[++i] = spacing;\n\t\t\t\t} else {\n\t\t\t\t\tfloat x = setupLength * bone._a, y = setupLength * bone._c;\n\t\t\t\t\tfloat length = MathUtil::sqrt(x * x + y * y);\n\t\t\t\t\tif (scale) _lengths[i] = length;\n\t\t\t\t\t_spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tVector<float> &positions = computeWorldPositions(*attachment, (int) spacesCount, tangents);\n\tfloat boneX = positions[0];\n\tfloat boneY = positions[1];\n\tfloat offsetRotation = data.getOffsetRotation();\n\tbool tip;\n\tif (offsetRotation == 0) {\n\t\ttip = data._rotateMode == RotateMode_Chain;\n\t} else {\n\t\ttip = false;\n\t\tBone &p = _target->getBone();\n\t\toffsetRotation *= p.getA() * p.getD() - p.getB() * p.getC() > 0 ? MathUtil::Deg_Rad : -MathUtil::Deg_Rad;\n\t}\n\n\tfor (size_t i = 0, p = 3; i < boneCount; i++, p += 3) {\n\t\tBone *boneP = _bones[i];\n\t\tBone &bone = *boneP;\n\t\tbone._worldX += (boneX - bone._worldX) * mixX;\n\t\tbone._worldY += (boneY - bone._worldY) * mixY;\n\t\tfloat x = positions[p];\n\t\tfloat y = positions[p + 1];\n\t\tfloat dx = x - boneX;\n\t\tfloat dy = y - boneY;\n\t\tif (scale) {\n\t\t\tfloat length = _lengths[i];\n\t\t\tif (length >= PathConstraint::EPSILON) {\n\t\t\t\tfloat s = (MathUtil::sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\n\t\t\t\tbone._a *= s;\n\t\t\t\tbone._c *= s;\n\t\t\t}\n\t\t}\n\n\t\tboneX = x;\n\t\tboneY = y;\n\n\t\tif (mixRotate > 0) {\n\t\t\tfloat a = bone._a, b = bone._b, c = bone._c, d = bone._d, r, cos, sin;\n\t\t\tif (tangents)\n\t\t\t\tr = positions[p - 1];\n\t\t\telse if (_spaces[i + 1] < PathConstraint::EPSILON)\n\t\t\t\tr = positions[p + 2];\n\t\t\telse\n\t\t\t\tr = MathUtil::atan2(dy, dx);\n\n\t\t\tr -= MathUtil::atan2(c, a);\n\n\t\t\tif (tip) {\n\t\t\t\tcos = MathUtil::cos(r);\n\t\t\t\tsin = MathUtil::sin(r);\n\t\t\t\tfloat length = bone._data.getLength();\n\t\t\t\tboneX += (length * (cos * a - sin * c) - dx) * mixRotate;\n\t\t\t\tboneY += (length * (sin * a + cos * c) - dy) * mixRotate;\n\t\t\t} else\n\t\t\t\tr += offsetRotation;\n\n\t\t\tif (r > MathUtil::Pi)\n\t\t\t\tr -= MathUtil::Pi_2;\n\t\t\telse if (r < -MathUtil::Pi)\n\t\t\t\tr += MathUtil::Pi_2;\n\n\t\t\tr *= mixRotate;\n\t\t\tcos = MathUtil::cos(r);\n\t\t\tsin = MathUtil::sin(r);\n\t\t\tbone._a = cos * a - sin * c;\n\t\t\tbone._b = cos * b - sin * d;\n\t\t\tbone._c = sin * a + cos * c;\n\t\t\tbone._d = sin * b + cos * d;\n\t\t}\n\n\t\tbone.updateAppliedTransform();\n\t}\n}\n\nint PathConstraint::getOrder() {\n\treturn (int) _data.getOrder();\n}\n\nfloat PathConstraint::getPosition() {\n\treturn _position;\n}\n\nvoid PathConstraint::setPosition(float inValue) {\n\t_position = inValue;\n}\n\nfloat PathConstraint::getSpacing() {\n\treturn _spacing;\n}\n\nvoid PathConstraint::setSpacing(float inValue) {\n\t_spacing = inValue;\n}\n\nfloat PathConstraint::getMixRotate() {\n\treturn _mixRotate;\n}\n\nvoid PathConstraint::setMixRotate(float inValue) {\n\t_mixRotate = inValue;\n}\n\nfloat PathConstraint::getMixX() {\n\treturn _mixX;\n}\n\nvoid PathConstraint::setMixX(float inValue) {\n\t_mixX = inValue;\n}\n\nfloat PathConstraint::getMixY() {\n\treturn _mixY;\n}\n\nvoid PathConstraint::setMixY(float inValue) {\n\t_mixY = inValue;\n}\n\nVector<Bone *> &PathConstraint::getBones() {\n\treturn _bones;\n}\n\nSlot *PathConstraint::getTarget() {\n\treturn _target;\n}\n\nvoid PathConstraint::setTarget(Slot *inValue) {\n\t_target = inValue;\n}\n\nPathConstraintData &PathConstraint::getData() {\n\treturn _data;\n}\n\nVector<float> &\nPathConstraint::computeWorldPositions(PathAttachment &path, int spacesCount, bool tangents) {\n\tSlot &target = *_target;\n\tfloat position = _position;\n\t_positions.setSize(spacesCount * 3 + 2, 0);\n\tVector<float> &out = _positions;\n\tVector<float> &world = _world;\n\tbool closed = path.isClosed();\n\tint verticesLength = (int) path.getWorldVerticesLength();\n\tint curveCount = verticesLength / 6;\n\tint prevCurve = NONE;\n\n\tfloat pathLength;\n\tif (!path.isConstantSpeed()) {\n\t\tVector<float> &lengths = path.getLengths();\n\t\tcurveCount -= closed ? 1 : 2;\n\t\tpathLength = lengths[curveCount];\n\t\tif (_data._positionMode == PositionMode_Percent) position *= pathLength;\n\n\t\tfloat multiplier = 0;\n\t\tswitch (_data._spacingMode) {\n\t\t\tcase SpacingMode_Percent:\n\t\t\t\tmultiplier = pathLength;\n\t\t\t\tbreak;\n\t\t\tcase SpacingMode_Proportional:\n\t\t\t\tmultiplier = pathLength / spacesCount;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tmultiplier = 1;\n\t\t}\n\n\t\tworld.setSize(8, 0);\n\t\tfor (int i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n\t\t\tfloat space = _spaces[i] * multiplier;\n\t\t\tposition += space;\n\t\t\tfloat p = position;\n\n\t\t\tif (closed) {\n\t\t\t\tp = MathUtil::fmod(p, pathLength);\n\t\t\t\tif (p < 0) p += pathLength;\n\t\t\t\tcurve = 0;\n\t\t\t} else if (p < 0) {\n\t\t\t\tif (prevCurve != BEFORE) {\n\t\t\t\t\tprevCurve = BEFORE;\n\t\t\t\t\tpath.computeWorldVertices(target, 2, 4, world, 0);\n\t\t\t\t}\n\n\t\t\t\taddBeforePosition(p, world, 0, out, o);\n\n\t\t\t\tcontinue;\n\t\t\t} else if (p > pathLength) {\n\t\t\t\tif (prevCurve != AFTER) {\n\t\t\t\t\tprevCurve = AFTER;\n\t\t\t\t\tpath.computeWorldVertices(target, verticesLength - 6, 4, world, 0);\n\t\t\t\t}\n\n\t\t\t\taddAfterPosition(p - pathLength, world, 0, out, o);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Determine curve containing position.\n\t\t\tfor (;; curve++) {\n\t\t\t\tfloat length = lengths[curve];\n\t\t\t\tif (p > length) continue;\n\n\t\t\t\tif (curve == 0)\n\t\t\t\t\tp /= length;\n\t\t\t\telse {\n\t\t\t\t\tfloat prev = lengths[curve - 1];\n\t\t\t\t\tp = (p - prev) / (length - prev);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (curve != prevCurve) {\n\t\t\t\tprevCurve = curve;\n\t\t\t\tif (closed && curve == curveCount) {\n\t\t\t\t\tpath.computeWorldVertices(target, verticesLength - 4, 4, world, 0);\n\t\t\t\t\tpath.computeWorldVertices(target, 0, 4, world, 4);\n\t\t\t\t} else\n\t\t\t\t\tpath.computeWorldVertices(target, curve * 6 + 2, 8, world, 0);\n\t\t\t}\n\n\t\t\taddCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7],\n\t\t\t\t\t\t\t out, o, tangents || (i > 0 && space < EPSILON));\n\t\t}\n\t\treturn out;\n\t}\n\n\t// World vertices.\n\tif (closed) {\n\t\tverticesLength += 2;\n\t\tworld.setSize(verticesLength, 0);\n\t\tpath.computeWorldVertices(target, 2, verticesLength - 4, world, 0);\n\t\tpath.computeWorldVertices(target, 0, 2, world, verticesLength - 4);\n\t\tworld[verticesLength - 2] = world[0];\n\t\tworld[verticesLength - 1] = world[1];\n\t} else {\n\t\tcurveCount--;\n\t\tverticesLength -= 4;\n\t\tworld.setSize(verticesLength, 0);\n\t\tpath.computeWorldVertices(target, 2, verticesLength, world, 0);\n\t}\n\n\t// Curve lengths.\n\t_curves.setSize(curveCount, 0);\n\tpathLength = 0;\n\tfloat x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n\tfloat tmpx, tmpy, dddfx, dddfy, ddfx, ddfy, dfx, dfy;\n\tfor (int i = 0, w = 2; i < curveCount; i++, w += 6) {\n\t\tcx1 = world[w];\n\t\tcy1 = world[w + 1];\n\t\tcx2 = world[w + 2];\n\t\tcy2 = world[w + 3];\n\t\tx2 = world[w + 4];\n\t\ty2 = world[w + 5];\n\t\ttmpx = (x1 - cx1 * 2 + cx2) * 0.1875f;\n\t\ttmpy = (y1 - cy1 * 2 + cy2) * 0.1875f;\n\t\tdddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375f;\n\t\tdddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375f;\n\t\tddfx = tmpx * 2 + dddfx;\n\t\tddfy = tmpy * 2 + dddfy;\n\t\tdfx = (cx1 - x1) * 0.75f + tmpx + dddfx * 0.16666667f;\n\t\tdfy = (cy1 - y1) * 0.75f + tmpy + dddfy * 0.16666667f;\n\t\tpathLength += MathUtil::sqrt(dfx * dfx + dfy * dfy);\n\t\tdfx += ddfx;\n\t\tdfy += ddfy;\n\t\tddfx += dddfx;\n\t\tddfy += dddfy;\n\t\tpathLength += MathUtil::sqrt(dfx * dfx + dfy * dfy);\n\t\tdfx += ddfx;\n\t\tdfy += ddfy;\n\t\tpathLength += MathUtil::sqrt(dfx * dfx + dfy * dfy);\n\t\tdfx += ddfx + dddfx;\n\t\tdfy += ddfy + dddfy;\n\t\tpathLength += MathUtil::sqrt(dfx * dfx + dfy * dfy);\n\t\t_curves[i] = pathLength;\n\t\tx1 = x2;\n\t\ty1 = y2;\n\t}\n\n\tif (_data._positionMode == PositionMode_Percent) position *= pathLength;\n\n\tfloat multiplier = 0;\n\tswitch (_data._spacingMode) {\n\t\tcase SpacingMode_Percent:\n\t\t\tmultiplier = pathLength;\n\t\t\tbreak;\n\t\tcase SpacingMode_Proportional:\n\t\t\tmultiplier = pathLength / spacesCount;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmultiplier = 1;\n\t}\n\n\tfloat curveLength = 0;\n\tfor (int i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n\t\tfloat space = _spaces[i] * multiplier;\n\t\tposition += space;\n\t\tfloat p = position;\n\n\t\tif (closed) {\n\t\t\tp = MathUtil::fmod(p, pathLength);\n\t\t\tif (p < 0) p += pathLength;\n\t\t\tcurve = 0;\n\t\t} else if (p < 0) {\n\t\t\taddBeforePosition(p, world, 0, out, o);\n\t\t\tcontinue;\n\t\t} else if (p > pathLength) {\n\t\t\taddAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Determine curve containing position.\n\t\tfor (;; curve++) {\n\t\t\tfloat length = _curves[curve];\n\t\t\tif (p > length) continue;\n\t\t\tif (curve == 0)\n\t\t\t\tp /= length;\n\t\t\telse {\n\t\t\t\tfloat prev = _curves[curve - 1];\n\t\t\t\tp = (p - prev) / (length - prev);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t// Curve segment lengths.\n\t\tif (curve != prevCurve) {\n\t\t\tprevCurve = curve;\n\t\t\tint ii = curve * 6;\n\t\t\tx1 = world[ii];\n\t\t\ty1 = world[ii + 1];\n\t\t\tcx1 = world[ii + 2];\n\t\t\tcy1 = world[ii + 3];\n\t\t\tcx2 = world[ii + 4];\n\t\t\tcy2 = world[ii + 5];\n\t\t\tx2 = world[ii + 6];\n\t\t\ty2 = world[ii + 7];\n\t\t\ttmpx = (x1 - cx1 * 2 + cx2) * 0.03f;\n\t\t\ttmpy = (y1 - cy1 * 2 + cy2) * 0.03f;\n\t\t\tdddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006f;\n\t\t\tdddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006f;\n\t\t\tddfx = tmpx * 2 + dddfx;\n\t\t\tddfy = tmpy * 2 + dddfy;\n\t\t\tdfx = (cx1 - x1) * 0.3f + tmpx + dddfx * 0.16666667f;\n\t\t\tdfy = (cy1 - y1) * 0.3f + tmpy + dddfy * 0.16666667f;\n\t\t\tcurveLength = MathUtil::sqrt(dfx * dfx + dfy * dfy);\n\t\t\t_segments[0] = curveLength;\n\t\t\tfor (ii = 1; ii < 8; ii++) {\n\t\t\t\tdfx += ddfx;\n\t\t\t\tdfy += ddfy;\n\t\t\t\tddfx += dddfx;\n\t\t\t\tddfy += dddfy;\n\t\t\t\tcurveLength += MathUtil::sqrt(dfx * dfx + dfy * dfy);\n\t\t\t\t_segments[ii] = curveLength;\n\t\t\t}\n\t\t\tdfx += ddfx;\n\t\t\tdfy += ddfy;\n\t\t\tcurveLength += MathUtil::sqrt(dfx * dfx + dfy * dfy);\n\t\t\t_segments[8] = curveLength;\n\t\t\tdfx += ddfx + dddfx;\n\t\t\tdfy += ddfy + dddfy;\n\t\t\tcurveLength += MathUtil::sqrt(dfx * dfx + dfy * dfy);\n\t\t\t_segments[9] = curveLength;\n\t\t\tsegment = 0;\n\t\t}\n\n\t\t// Weight by segment length.\n\t\tp *= curveLength;\n\t\tfor (;; segment++) {\n\t\t\tfloat length = _segments[segment];\n\t\t\tif (p > length) continue;\n\t\t\tif (segment == 0)\n\t\t\t\tp /= length;\n\t\t\telse {\n\t\t\t\tfloat prev = _segments[segment - 1];\n\t\t\t\tp = segment + (p - prev) / (length - prev);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\taddCurvePosition(p * 0.1f, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o,\n\t\t\t\t\t\t tangents || (i > 0 && space < EPSILON));\n\t}\n\n\treturn out;\n}\n\nvoid PathConstraint::addBeforePosition(float p, Vector<float> &temp, int i, Vector<float> &output, int o) {\n\tfloat x1 = temp[i];\n\tfloat y1 = temp[i + 1];\n\tfloat dx = temp[i + 2] - x1;\n\tfloat dy = temp[i + 3] - y1;\n\tfloat r = MathUtil::atan2(dy, dx);\n\toutput[o] = x1 + p * MathUtil::cos(r);\n\toutput[o + 1] = y1 + p * MathUtil::sin(r);\n\toutput[o + 2] = r;\n}\n\nvoid PathConstraint::addAfterPosition(float p, Vector<float> &temp, int i, Vector<float> &output, int o) {\n\tfloat x1 = temp[i + 2];\n\tfloat y1 = temp[i + 3];\n\tfloat dx = x1 - temp[i];\n\tfloat dy = y1 - temp[i + 1];\n\tfloat r = MathUtil::atan2(dy, dx);\n\toutput[o] = x1 + p * MathUtil::cos(r);\n\toutput[o + 1] = y1 + p * MathUtil::sin(r);\n\toutput[o + 2] = r;\n}\n\nvoid PathConstraint::addCurvePosition(float p, float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2,\n\t\t\t\t\t\t\t\t\t  float y2, Vector<float> &output, int o, bool tangents) {\n\tif (p < EPSILON || MathUtil::isNan(p)) {\n\t\toutput[o] = x1;\n\t\toutput[o + 1] = y1;\n\t\toutput[o + 2] = MathUtil::atan2(cy1 - y1, cx1 - x1);\n\t\treturn;\n\t}\n\n\tfloat tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n\tfloat ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n\tfloat x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n\toutput[o] = x;\n\toutput[o + 1] = y;\n\tif (tangents) {\n\t\tif (p < 0.001)\n\t\t\toutput[o + 2] = MathUtil::atan2(cy1 - y1, cx1 - x1);\n\t\telse\n\t\t\toutput[o + 2] = MathUtil::atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt),\n\t\t\t\t\t\t\t\t\t\t\tx - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n\t}\n}\n\nbool PathConstraint::isActive() {\n\treturn _active;\n}\n\nvoid PathConstraint::setActive(bool inValue) {\n\t_active = inValue;\n}\n\nvoid PathConstraint::setToSetupPose() {\n\tPathConstraintData &data = this->_data;\n\tthis->_position = data._position;\n\tthis->_spacing = data._spacing;\n\tthis->_mixRotate = data._mixRotate;\n\tthis->_mixX = data._mixX;\n\tthis->_mixY = data._mixY;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PathConstraintData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PathConstraintData.h>\n\n#include <spine/BoneData.h>\n#include <spine/SlotData.h>\n\n#include <assert.h>\n\nusing namespace spine;\n\nRTTI_IMPL(PathConstraintData, ConstraintData)\n\nPathConstraintData::PathConstraintData(const String &name) : ConstraintData(name),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _target(NULL),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _positionMode(PositionMode_Fixed),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _spacingMode(SpacingMode_Length),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _rotateMode(RotateMode_Tangent),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _offsetRotation(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _position(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _spacing(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _mixRotate(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _mixX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _mixY(0) {\n}\n\nVector<BoneData *> &PathConstraintData::getBones() {\n\treturn _bones;\n}\n\nSlotData *PathConstraintData::getTarget() {\n\treturn _target;\n}\n\nvoid PathConstraintData::setTarget(SlotData *inValue) {\n\t_target = inValue;\n}\n\nPositionMode PathConstraintData::getPositionMode() {\n\treturn _positionMode;\n}\n\nvoid PathConstraintData::setPositionMode(PositionMode inValue) {\n\t_positionMode = inValue;\n}\n\nSpacingMode PathConstraintData::getSpacingMode() {\n\treturn _spacingMode;\n}\n\nvoid PathConstraintData::setSpacingMode(SpacingMode inValue) {\n\t_spacingMode = inValue;\n}\n\nRotateMode PathConstraintData::getRotateMode() {\n\treturn _rotateMode;\n}\n\nvoid PathConstraintData::setRotateMode(RotateMode inValue) {\n\t_rotateMode = inValue;\n}\n\nfloat PathConstraintData::getOffsetRotation() {\n\treturn _offsetRotation;\n}\n\nvoid PathConstraintData::setOffsetRotation(float inValue) {\n\t_offsetRotation = inValue;\n}\n\nfloat PathConstraintData::getPosition() {\n\treturn _position;\n}\n\nvoid PathConstraintData::setPosition(float inValue) {\n\t_position = inValue;\n}\n\nfloat PathConstraintData::getSpacing() {\n\treturn _spacing;\n}\n\nvoid PathConstraintData::setSpacing(float inValue) {\n\t_spacing = inValue;\n}\n\nfloat PathConstraintData::getMixRotate() {\n\treturn _mixRotate;\n}\n\nvoid PathConstraintData::setMixRotate(float inValue) {\n\t_mixRotate = inValue;\n}\n\nfloat PathConstraintData::getMixX() {\n\treturn _mixX;\n}\n\nvoid PathConstraintData::setMixX(float inValue) {\n\t_mixX = inValue;\n}\n\nfloat PathConstraintData::getMixY() {\n\treturn _mixY;\n}\n\nvoid PathConstraintData::setMixY(float inValue) {\n\t_mixY = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PathConstraintMixTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PathConstraintMixTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/PathConstraint.h>\n#include <spine/PathConstraintData.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(PathConstraintMixTimeline, CurveTimeline)\n\nPathConstraintMixTimeline::PathConstraintMixTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex)\n\t: CurveTimeline(frameCount, PathConstraintMixTimeline::ENTRIES, bezierCount),\n\t  _constraintIndex(pathConstraintIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_PathConstraintMix << 32) | pathConstraintIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nvoid PathConstraintMixTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t\t\t\t  MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tPathConstraint *constraintP = skeleton._pathConstraints[_constraintIndex];\n\tPathConstraint &constraint = *constraintP;\n\tif (!constraint.isActive()) return;\n\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tconstraint._mixRotate = constraint._data._mixRotate;\n\t\t\t\tconstraint._mixX = constraint._data._mixX;\n\t\t\t\tconstraint._mixY = constraint._data._mixY;\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tconstraint._mixRotate += (constraint._data._mixRotate - constraint._mixRotate) * alpha;\n\t\t\t\tconstraint._mixX += (constraint._data._mixX - constraint._mixX) * alpha;\n\t\t\t\tconstraint._mixY += (constraint._data._mixY - constraint._mixY) * alpha;\n\t\t\tdefault: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfloat rotate, x, y;\n\tint i = Animation::search(_frames, time, PathConstraintMixTimeline::ENTRIES);\n\tint curveType = (int) _curves[i >> 2];\n\tswitch (curveType) {\n\t\tcase LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\trotate = _frames[i + ROTATE];\n\t\t\tx = _frames[i + X];\n\t\t\ty = _frames[i + Y];\n\t\t\tfloat t = (time - before) / (_frames[i + ENTRIES] - before);\n\t\t\trotate += (_frames[i + ENTRIES + ROTATE] - rotate) * t;\n\t\t\tx += (_frames[i + ENTRIES + X] - x) * t;\n\t\t\ty += (_frames[i + ENTRIES + Y] - y) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase STEPPED: {\n\t\t\trotate = _frames[i + ROTATE];\n\t\t\tx = _frames[i + X];\n\t\t\ty = _frames[i + Y];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\trotate = getBezierValue(time, i, ROTATE, curveType - BEZIER);\n\t\t\tx = getBezierValue(time, i, X, curveType + BEZIER_SIZE - BEZIER);\n\t\t\ty = getBezierValue(time, i, Y, curveType + BEZIER_SIZE * 2 - BEZIER);\n\t\t}\n\t}\n\n\tif (blend == MixBlend_Setup) {\n\t\tPathConstraintData data = constraint._data;\n\t\tconstraint._mixRotate = data._mixRotate + (rotate - data._mixRotate) * alpha;\n\t\tconstraint._mixX = data._mixX + (x - data._mixX) * alpha;\n\t\tconstraint._mixY = data._mixY + (y - data._mixY) * alpha;\n\t} else {\n\t\tconstraint._mixRotate += (rotate - constraint._mixRotate) * alpha;\n\t\tconstraint._mixX += (x - constraint._mixX) * alpha;\n\t\tconstraint._mixY += (y - constraint._mixY) * alpha;\n\t}\n}\n\nvoid PathConstraintMixTimeline::setFrame(int frame, float time, float mixRotate, float mixX, float mixY) {\n\tframe *= ENTRIES;\n\t_frames[frame] = time;\n\t_frames[frame + ROTATE] = mixRotate;\n\t_frames[frame + X] = mixX;\n\t_frames[frame + Y] = mixY;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PathConstraintPositionTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/PathConstraint.h>\n#include <spine/PathConstraintData.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(PathConstraintPositionTimeline, CurveTimeline1)\n\nPathConstraintPositionTimeline::PathConstraintPositionTimeline(size_t frameCount, size_t bezierCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   int pathConstraintIndex) : CurveTimeline1(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _constraintIndex(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  pathConstraintIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_PathConstraintPosition << 32) | pathConstraintIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nPathConstraintPositionTimeline::~PathConstraintPositionTimeline() {\n}\n\nvoid PathConstraintPositionTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents,\n\t\t\t\t\t\t\t\t\t\t   float alpha, MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tPathConstraint *constraint = skeleton._pathConstraints[_constraintIndex];\n\tif (constraint->_active) constraint->_position = getAbsoluteValue(time, alpha, blend, constraint->_position, constraint->_data._position);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PathConstraintSpacingTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/PathConstraint.h>\n#include <spine/PathConstraintData.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(PathConstraintSpacingTimeline, PathConstraintPositionTimeline)\n\nPathConstraintSpacingTimeline::PathConstraintSpacingTimeline(size_t frameCount, size_t bezierCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t int pathConstraintIndex) : CurveTimeline1(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_pathConstraintIndex(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpathConstraintIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_PathConstraintSpacing << 32) | pathConstraintIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nvoid PathConstraintSpacingTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents,\n\t\t\t\t\t\t\t\t\t\t  float alpha, MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tPathConstraint *constraint = skeleton._pathConstraints[_pathConstraintIndex];\n\tif (constraint->_active)\n\t\tconstraint->_spacing = getAbsoluteValue(time, alpha, blend, constraint->_spacing, constraint->_data._spacing);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PhysicsConstraint.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PhysicsConstraint.h>\n#include <spine/PhysicsConstraintData.h>\n\n#include <spine/Bone.h>\n#include <spine/Skeleton.h>\n#include <spine/SkeletonData.h>\n#include <spine/BoneData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(PhysicsConstraint, Updatable)\n\nPhysicsConstraint::PhysicsConstraint(PhysicsConstraintData &data, Skeleton &skeleton)\n\t: _data(data), _skeleton(skeleton) {\n\t_bone = skeleton.getBones()[data.getBone()->getIndex()];\n\t_inertia = data.getInertia();\n\t_strength = data.getStrength();\n\t_damping = data.getDamping();\n\t_massInverse = data.getMassInverse();\n\t_wind = data.getWind();\n\t_gravity = data.getGravity();\n\t_mix = data.getMix();\n\n\t_reset = true;\n\t_ux = 0;\n\t_uy = 0;\n\t_cx = 0;\n\t_cy = 0;\n\t_tx = 0;\n\t_ty = 0;\n\t_xOffset = 0;\n\t_xVelocity = 0;\n\t_yOffset = 0;\n\t_yVelocity = 0;\n\t_rotateOffset = 0;\n\t_rotateVelocity = 0;\n\t_scaleOffset = 0;\n\t_scaleVelocity = 0;\n\t_active = false;\n\t_remaining = 0;\n\t_lastTime = 0;\n}\n\nPhysicsConstraintData &PhysicsConstraint::getData() {\n\treturn _data;\n}\n\nvoid PhysicsConstraint::setBone(Bone *bone) {\n\t_bone = bone;\n}\n\nBone *PhysicsConstraint::getBone() {\n\treturn _bone;\n}\n\nvoid PhysicsConstraint::setInertia(float value) {\n\t_inertia = value;\n}\n\nfloat PhysicsConstraint::getInertia() {\n\treturn _inertia;\n}\n\nvoid PhysicsConstraint::setStrength(float value) {\n\t_strength = value;\n}\n\nfloat PhysicsConstraint::getStrength() {\n\treturn _strength;\n}\n\nvoid PhysicsConstraint::setDamping(float value) {\n\t_damping = value;\n}\n\nfloat PhysicsConstraint::getDamping() {\n\treturn _damping;\n}\n\nvoid PhysicsConstraint::setMassInverse(float value) {\n\t_massInverse = value;\n}\n\nfloat PhysicsConstraint::getMassInverse() {\n\treturn _massInverse;\n}\n\nvoid PhysicsConstraint::setWind(float value) {\n\t_wind = value;\n}\n\nfloat PhysicsConstraint::getWind() {\n\treturn _wind;\n}\n\nvoid PhysicsConstraint::setGravity(float value) {\n\t_gravity = value;\n}\n\nfloat PhysicsConstraint::getGravity() {\n\treturn _gravity;\n}\n\nvoid PhysicsConstraint::setMix(float value) {\n\t_mix = value;\n}\n\nfloat PhysicsConstraint::getMix() {\n\treturn _mix;\n}\n\nvoid PhysicsConstraint::setReset(bool value) {\n\t_reset = value;\n}\n\nbool PhysicsConstraint::getReset() {\n\treturn _reset;\n}\n\nvoid PhysicsConstraint::setUx(float value) {\n\t_ux = value;\n}\n\nfloat PhysicsConstraint::getUx() {\n\treturn _ux;\n}\n\nvoid PhysicsConstraint::setUy(float value) {\n\t_uy = value;\n}\n\nfloat PhysicsConstraint::getUy() {\n\treturn _uy;\n}\n\nvoid PhysicsConstraint::setCx(float value) {\n\t_cx = value;\n}\n\nfloat PhysicsConstraint::getCx() {\n\treturn _cx;\n}\n\nvoid PhysicsConstraint::setCy(float value) {\n\t_cy = value;\n}\n\nfloat PhysicsConstraint::getCy() {\n\treturn _cy;\n}\n\nvoid PhysicsConstraint::setTx(float value) {\n\t_tx = value;\n}\n\nfloat PhysicsConstraint::getTx() {\n\treturn _tx;\n}\n\nvoid PhysicsConstraint::setTy(float value) {\n\t_ty = value;\n}\n\nfloat PhysicsConstraint::getTy() {\n\treturn _ty;\n}\n\nvoid PhysicsConstraint::setXOffset(float value) {\n\t_xOffset = value;\n}\n\nfloat PhysicsConstraint::getXOffset() {\n\treturn _xOffset;\n}\n\nvoid PhysicsConstraint::setXVelocity(float value) {\n\t_xVelocity = value;\n}\n\nfloat PhysicsConstraint::getXVelocity() {\n\treturn _xVelocity;\n}\n\nvoid PhysicsConstraint::setYOffset(float value) {\n\t_yOffset = value;\n}\n\nfloat PhysicsConstraint::getYOffset() {\n\treturn _yOffset;\n}\n\nvoid PhysicsConstraint::setYVelocity(float value) {\n\t_yVelocity = value;\n}\n\nfloat PhysicsConstraint::getYVelocity() {\n\treturn _yVelocity;\n}\n\nvoid PhysicsConstraint::setRotateOffset(float value) {\n\t_rotateOffset = value;\n}\n\nfloat PhysicsConstraint::getRotateOffset() {\n\treturn _rotateOffset;\n}\n\nvoid PhysicsConstraint::setRotateVelocity(float value) {\n\t_rotateVelocity = value;\n}\n\nfloat PhysicsConstraint::getRotateVelocity() {\n\treturn _rotateVelocity;\n}\n\nvoid PhysicsConstraint::setScaleOffset(float value) {\n\t_scaleOffset = value;\n}\n\nfloat PhysicsConstraint::getScaleOffset() {\n\treturn _scaleOffset;\n}\n\nvoid PhysicsConstraint::setScaleVelocity(float value) {\n\t_scaleVelocity = value;\n}\n\nfloat PhysicsConstraint::getScaleVelocity() {\n\treturn _scaleVelocity;\n}\n\nvoid PhysicsConstraint::setActive(bool value) {\n\t_active = value;\n}\n\nbool PhysicsConstraint::isActive() {\n\treturn _active;\n}\n\nvoid PhysicsConstraint::setRemaining(float value) {\n\t_remaining = value;\n}\n\nfloat PhysicsConstraint::getRemaining() {\n\treturn _remaining;\n}\n\nvoid PhysicsConstraint::setLastTime(float value) {\n\t_lastTime = value;\n}\n\nfloat PhysicsConstraint::getLastTime() {\n\treturn _lastTime;\n}\n\nvoid PhysicsConstraint::reset() {\n\t_remaining = 0;\n\t_lastTime = _skeleton.getTime();\n\t_reset = true;\n\t_xOffset = 0;\n\t_xVelocity = 0;\n\t_yOffset = 0;\n\t_yVelocity = 0;\n\t_rotateOffset = 0;\n\t_rotateVelocity = 0;\n\t_scaleOffset = 0;\n\t_scaleVelocity = 0;\n}\n\nvoid PhysicsConstraint::setToSetupPose() {\n\t_inertia = _data.getInertia();\n\t_strength = _data.getStrength();\n\t_damping = _data.getDamping();\n\t_massInverse = _data.getMassInverse();\n\t_wind = _data.getWind();\n\t_gravity = _data.getGravity();\n\t_mix = _data.getMix();\n}\nvoid PhysicsConstraint::update(Physics physics) {\n\tfloat mix = _mix;\n\tif (mix == 0) return;\n\n\tbool x = _data._x > 0;\n\tbool y = _data._y > 0;\n\tbool rotateOrShearX = _data._rotate > 0 || _data._shearX > 0;\n\tbool scaleX = _data._scaleX > 0;\n\n\tBone *bone = _bone;\n\tfloat l = bone->_data.getLength();\n\n\tswitch (physics) {\n\t\tcase Physics::Physics_None:\n\t\t\treturn;\n\t\tcase Physics::Physics_Reset:\n\t\t\treset();\n\t\t\t// Fall through.\n\t\tcase Physics::Physics_Update: {\n\t\t\tfloat delta = MathUtil::max(_skeleton.getTime() - _lastTime, 0.0f);\n\t\t\t_remaining += delta;\n\t\t\t_lastTime = _skeleton.getTime();\n\n\t\t\tfloat bx = bone->_worldX, by = bone->_worldY;\n\t\t\tif (_reset) {\n\t\t\t\t_reset = false;\n\t\t\t\t_ux = bx;\n\t\t\t\t_uy = by;\n\t\t\t} else {\n\t\t\t\tfloat a = _remaining, i = _inertia, t = _data._step, f = _skeleton.getData()->getReferenceScale();\n\t\t\t\tfloat qx = _data._limit * delta, qy = qx * MathUtil::abs(_skeleton.getScaleX());\n\t\t\t\tqx *= MathUtil::abs(_skeleton.getScaleY());\n\t\t\t\tif (x || y) {\n\t\t\t\t\tif (x) {\n\t\t\t\t\t\tfloat u = (_ux - bx) * i;\n\t\t\t\t\t\t_xOffset += u > qx ? qx : u < -qx ? -qx\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  : u;\n\t\t\t\t\t\t_ux = bx;\n\t\t\t\t\t}\n\t\t\t\t\tif (y) {\n\t\t\t\t\t\tfloat u = (_uy - by) * i;\n\t\t\t\t\t\t_yOffset += u > qy ? qy : u < -qy ? -qy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  : u;\n\t\t\t\t\t\t_uy = by;\n\t\t\t\t\t}\n\t\t\t\t\tif (a >= t) {\n\t\t\t\t\t\tfloat d = MathUtil::pow(_damping, 60 * t);\n\t\t\t\t\t\tfloat m = _massInverse * t, e = _strength, w = _wind * f, g = _gravity * f * (Bone::yDown ? -1 : 1);\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif (x) {\n\t\t\t\t\t\t\t\t_xVelocity += (w - _xOffset * e) * m;\n\t\t\t\t\t\t\t\t_xOffset += _xVelocity * t;\n\t\t\t\t\t\t\t\t_xVelocity *= d;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (y) {\n\t\t\t\t\t\t\t\t_yVelocity -= (g + _yOffset * e) * m;\n\t\t\t\t\t\t\t\t_yOffset += _yVelocity * t;\n\t\t\t\t\t\t\t\t_yVelocity *= d;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ta -= t;\n\t\t\t\t\t\t} while (a >= t);\n\t\t\t\t\t}\n\t\t\t\t\tif (x) bone->_worldX += _xOffset * mix * _data._x;\n\t\t\t\t\tif (y) bone->_worldY += _yOffset * mix * _data._y;\n\t\t\t\t}\n\n\t\t\t\tif (rotateOrShearX || scaleX) {\n\t\t\t\t\tfloat ca = MathUtil::atan2(bone->_c, bone->_a), c, s, mr = 0;\n\t\t\t\t\tfloat dx = _cx - bone->_worldX, dy = _cy - bone->_worldY;\n\t\t\t\t\tif (dx > qx)\n\t\t\t\t\t\tdx = qx;\n\t\t\t\t\telse if (dx < -qx)//\n\t\t\t\t\t\tdx = -qx;\n\t\t\t\t\tif (dy > qy)\n\t\t\t\t\t\tdy = qy;\n\t\t\t\t\telse if (dy < -qy)//\n\t\t\t\t\t\tdy = -qy;\n\t\t\t\t\tif (rotateOrShearX) {\n\t\t\t\t\t\tmr = (_data._rotate + _data._shearX) * mix;\n\t\t\t\t\t\tfloat r = MathUtil::atan2(dy + _ty, dx + _tx) - ca - _rotateOffset * mr;\n\t\t\t\t\t\t_rotateOffset += (r - MathUtil::ceil(r * MathUtil::InvPi_2 - 0.5f) * MathUtil::Pi_2) * i;\n\t\t\t\t\t\tr = _rotateOffset * mr + ca;\n\t\t\t\t\t\tc = MathUtil::cos(r);\n\t\t\t\t\t\ts = MathUtil::sin(r);\n\t\t\t\t\t\tif (scaleX) {\n\t\t\t\t\t\t\tr = l * bone->getWorldScaleX();\n\t\t\t\t\t\t\tif (r > 0) _scaleOffset += (dx * c + dy * s) * i / r;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tc = MathUtil::cos(ca);\n\t\t\t\t\t\ts = MathUtil::sin(ca);\n\t\t\t\t\t\tfloat r = l * bone->getWorldScaleX();\n\t\t\t\t\t\tif (r > 0) _scaleOffset += (dx * c + dy * s) * i / r;\n\t\t\t\t\t}\n\t\t\t\t\ta = _remaining;\n\t\t\t\t\tif (a >= t) {\n\t\t\t\t\t\tfloat m = _massInverse * t, e = _strength, w = _wind, g = _gravity * (Bone::yDown ? -1 : 1), h = l / f;\n\t\t\t\t\t\tfloat d = MathUtil::pow(_damping, 60 * t);\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\ta -= t;\n\t\t\t\t\t\t\tif (scaleX) {\n\t\t\t\t\t\t\t\t_scaleVelocity += (w * c - g * s - _scaleOffset * e) * m;\n\t\t\t\t\t\t\t\t_scaleOffset += _scaleVelocity * t;\n\t\t\t\t\t\t\t\t_scaleVelocity *= d;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (rotateOrShearX) {\n\t\t\t\t\t\t\t\t_rotateVelocity -= ((w * s + g * c) * h + _rotateOffset * e) * m;\n\t\t\t\t\t\t\t\t_rotateOffset += _rotateVelocity * t;\n\t\t\t\t\t\t\t\t_rotateVelocity *= d;\n\t\t\t\t\t\t\t\tif (a < t) break;\n\t\t\t\t\t\t\t\tfloat r = _rotateOffset * mr + ca;\n\t\t\t\t\t\t\t\tc = MathUtil::cos(r);\n\t\t\t\t\t\t\t\ts = MathUtil::sin(r);\n\t\t\t\t\t\t\t} else if (a < t)//\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_remaining = a;\n\t\t\t}\n\n\t\t\t_cx = bone->_worldX;\n\t\t\t_cy = bone->_worldY;\n\t\t\tbreak;\n\t\t}\n\t\tcase Physics::Physics_Pose: {\n\t\t\tif (x) bone->_worldX += _xOffset * mix * _data._x;\n\t\t\tif (y) bone->_worldY += _yOffset * mix * _data._y;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (rotateOrShearX) {\n\t\tfloat o = _rotateOffset * mix, s = 0, c = 0, a = 0;\n\t\tif (_data._shearX > 0) {\n\t\t\tfloat r = 0;\n\t\t\tif (_data._rotate > 0) {\n\t\t\t\tr = o * _data._rotate;\n\t\t\t\ts = MathUtil::sin(r);\n\t\t\t\tc = MathUtil::cos(r);\n\t\t\t\ta = bone->_b;\n\t\t\t\tbone->_b = c * a - s * bone->_d;\n\t\t\t\tbone->_d = s * a + c * bone->_d;\n\t\t\t}\n\t\t\tr += o * _data._shearX;\n\t\t\ts = MathUtil::sin(r);\n\t\t\tc = MathUtil::cos(r);\n\t\t\ta = bone->_a;\n\t\t\tbone->_a = c * a - s * bone->_c;\n\t\t\tbone->_c = s * a + c * bone->_c;\n\t\t} else {\n\t\t\to *= _data._rotate;\n\t\t\ts = MathUtil::sin(o);\n\t\t\tc = MathUtil::cos(o);\n\t\t\ta = bone->_a;\n\t\t\tbone->_a = c * a - s * bone->_c;\n\t\t\tbone->_c = s * a + c * bone->_c;\n\t\t\ta = bone->_b;\n\t\t\tbone->_b = c * a - s * bone->_d;\n\t\t\tbone->_d = s * a + c * bone->_d;\n\t\t}\n\t}\n\tif (scaleX) {\n\t\tfloat s = 1 + _scaleOffset * mix * _data._scaleX;\n\t\tbone->_a *= s;\n\t\tbone->_c *= s;\n\t}\n\tif (physics != Physics::Physics_Pose) {\n\t\t_tx = l * bone->_a;\n\t\t_ty = l * bone->_c;\n\t}\n\tbone->updateAppliedTransform();\n}\n\nvoid PhysicsConstraint::rotate(float x, float y, float degrees) {\n\tfloat r = degrees * MathUtil::Deg_Rad, cos = MathUtil::cos(r), sin = MathUtil::sin(r);\n\tfloat dx = _cx - x, dy = _cy - y;\n\ttranslate(dx * cos - dy * sin - dx, dx * sin + dy * cos - dy);\n}\n\nvoid PhysicsConstraint::translate(float x, float y) {\n\t_ux -= x;\n\t_uy -= y;\n\t_cx -= x;\n\t_cy -= y;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PhysicsConstraintData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PhysicsConstraintData.h>\n\n#include <spine/BoneData.h>\n\n#include <assert.h>\n\nusing namespace spine;\n\nRTTI_IMPL(PhysicsConstraintData, ConstraintData)\n\nPhysicsConstraintData::PhysicsConstraintData(const String &name) : ConstraintData(name),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _bone(nullptr),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _x(0), _y(0), _rotate(0), _scaleX(0), _shearX(0), _limit(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _step(0), _inertia(0), _strength(0), _damping(0), _massInverse(0), _wind(0), _gravity(0), _mix(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _inertiaGlobal(false), _strengthGlobal(false), _dampingGlobal(false), _massGlobal(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _windGlobal(false), _gravityGlobal(false), _mixGlobal(false) {\n}\n\n\nvoid PhysicsConstraintData::setBone(BoneData *bone) {\n\t_bone = bone;\n}\n\nBoneData *PhysicsConstraintData::getBone() const {\n\treturn _bone;\n}\n\nvoid PhysicsConstraintData::setX(float x) {\n\t_x = x;\n}\n\nfloat PhysicsConstraintData::getX() const {\n\treturn _x;\n}\n\nvoid PhysicsConstraintData::setY(float y) {\n\t_y = y;\n}\n\nfloat PhysicsConstraintData::getY() const {\n\treturn _y;\n}\n\nvoid PhysicsConstraintData::setRotate(float rotate) {\n\t_rotate = rotate;\n}\n\nfloat PhysicsConstraintData::getRotate() const {\n\treturn _rotate;\n}\n\nvoid PhysicsConstraintData::setScaleX(float scaleX) {\n\t_scaleX = scaleX;\n}\n\nfloat PhysicsConstraintData::getScaleX() const {\n\treturn _scaleX;\n}\n\nvoid PhysicsConstraintData::setShearX(float shearX) {\n\t_shearX = shearX;\n}\n\nfloat PhysicsConstraintData::getShearX() const {\n\treturn _shearX;\n}\n\nvoid PhysicsConstraintData::setLimit(float limit) {\n\t_limit = limit;\n}\n\nfloat PhysicsConstraintData::getLimit() const {\n\treturn _limit;\n}\n\nvoid PhysicsConstraintData::setStep(float step) {\n\t_step = step;\n}\n\nfloat PhysicsConstraintData::getStep() const {\n\treturn _step;\n}\n\nvoid PhysicsConstraintData::setInertia(float inertia) {\n\t_inertia = inertia;\n}\n\nfloat PhysicsConstraintData::getInertia() const {\n\treturn _inertia;\n}\n\nvoid PhysicsConstraintData::setStrength(float strength) {\n\t_strength = strength;\n}\n\nfloat PhysicsConstraintData::getStrength() const {\n\treturn _strength;\n}\n\nvoid PhysicsConstraintData::setDamping(float damping) {\n\t_damping = damping;\n}\n\nfloat PhysicsConstraintData::getDamping() const {\n\treturn _damping;\n}\n\nvoid PhysicsConstraintData::setMassInverse(float massInverse) {\n\t_massInverse = massInverse;\n}\n\nfloat PhysicsConstraintData::getMassInverse() const {\n\treturn _massInverse;\n}\n\nvoid PhysicsConstraintData::setWind(float wind) {\n\t_wind = wind;\n}\n\nfloat PhysicsConstraintData::getWind() const {\n\treturn _wind;\n}\n\nvoid PhysicsConstraintData::setGravity(float gravity) {\n\t_gravity = gravity;\n}\n\nfloat PhysicsConstraintData::getGravity() const {\n\treturn _gravity;\n}\n\nvoid PhysicsConstraintData::setMix(float mix) {\n\t_mix = mix;\n}\n\nfloat PhysicsConstraintData::getMix() const {\n\treturn _mix;\n}\n\nvoid PhysicsConstraintData::setInertiaGlobal(bool inertiaGlobal) {\n\t_inertiaGlobal = inertiaGlobal;\n}\n\nbool PhysicsConstraintData::isInertiaGlobal() const {\n\treturn _inertiaGlobal;\n}\n\nvoid PhysicsConstraintData::setStrengthGlobal(bool strengthGlobal) {\n\t_strengthGlobal = strengthGlobal;\n}\n\nbool PhysicsConstraintData::isStrengthGlobal() const {\n\treturn _strengthGlobal;\n}\n\nvoid PhysicsConstraintData::setDampingGlobal(bool dampingGlobal) {\n\t_dampingGlobal = dampingGlobal;\n}\n\nbool PhysicsConstraintData::isDampingGlobal() const {\n\treturn _dampingGlobal;\n}\n\nvoid PhysicsConstraintData::setMassGlobal(bool massGlobal) {\n\t_massGlobal = massGlobal;\n}\n\nbool PhysicsConstraintData::isMassGlobal() const {\n\treturn _massGlobal;\n}\n\nvoid PhysicsConstraintData::setWindGlobal(bool windGlobal) {\n\t_windGlobal = windGlobal;\n}\n\nbool PhysicsConstraintData::isWindGlobal() const {\n\treturn _windGlobal;\n}\n\nvoid PhysicsConstraintData::setGravityGlobal(bool gravityGlobal) {\n\t_gravityGlobal = gravityGlobal;\n}\n\nbool PhysicsConstraintData::isGravityGlobal() const {\n\treturn _gravityGlobal;\n}\n\nvoid PhysicsConstraintData::setMixGlobal(bool mixGlobal) {\n\t_mixGlobal = mixGlobal;\n}\n\nbool PhysicsConstraintData::isMixGlobal() const {\n\treturn _mixGlobal;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PhysicsConstraintTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PhysicsConstraintTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n#include <spine/PhysicsConstraint.h>\n#include <cfloat>\n\nusing namespace spine;\n\nRTTI_IMPL(PhysicsConstraintTimeline, CurveTimeline)\nRTTI_IMPL(PhysicsConstraintInertiaTimeline, PhysicsConstraintTimeline)\nRTTI_IMPL(PhysicsConstraintStrengthTimeline, PhysicsConstraintTimeline)\nRTTI_IMPL(PhysicsConstraintDampingTimeline, PhysicsConstraintTimeline)\nRTTI_IMPL(PhysicsConstraintMassTimeline, PhysicsConstraintTimeline)\nRTTI_IMPL(PhysicsConstraintWindTimeline, PhysicsConstraintTimeline)\nRTTI_IMPL(PhysicsConstraintGravityTimeline, PhysicsConstraintTimeline)\nRTTI_IMPL(PhysicsConstraintMixTimeline, PhysicsConstraintTimeline)\nRTTI_IMPL(PhysicsConstraintResetTimeline, Timeline)\n\nPhysicsConstraintTimeline::PhysicsConstraintTimeline(size_t frameCount, size_t bezierCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t int constraintIndex, Property property) : CurveTimeline1(frameCount, bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _constraintIndex(constraintIndex) {\n\tPropertyId ids[] = {((PropertyId) property << 32) | constraintIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nvoid PhysicsConstraintTimeline::apply(Skeleton &skeleton, float, float time, Vector<Event *> *,\n\t\t\t\t\t\t\t\t\t  float alpha, MixBlend blend, MixDirection) {\n\tif (_constraintIndex == -1) {\n\t\tfloat value = time >= _frames[0] ? getCurveValue(time) : 0;\n\n\t\tVector<PhysicsConstraint *> &physicsConstraints = skeleton.getPhysicsConstraints();\n\t\tfor (size_t i = 0; i < physicsConstraints.size(); i++) {\n\t\t\tPhysicsConstraint *constraint = physicsConstraints[i];\n\t\t\tif (constraint->_active && global(constraint->_data))\n\t\t\t\tset(constraint, getAbsoluteValue(time, alpha, blend, get(constraint), setup(constraint), value));\n\t\t}\n\t} else {\n\t\tPhysicsConstraint *constraint = skeleton.getPhysicsConstraints()[_constraintIndex];\n\t\tif (constraint->_active) set(constraint, getAbsoluteValue(time, alpha, blend, get(constraint), setup(constraint)));\n\t}\n}\n\nvoid PhysicsConstraintResetTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *, float alpha, MixBlend blend, MixDirection direction) {\n\tPhysicsConstraint *constraint = nullptr;\n\tif (_constraintIndex != -1) {\n\t\tconstraint = skeleton.getPhysicsConstraints()[_constraintIndex];\n\t\tif (!constraint->_active) return;\n\t}\n\n\tif (lastTime > time) {// Apply after lastTime for looped animations.\n\t\tapply(skeleton, lastTime, FLT_MAX, nullptr, alpha, blend, direction);\n\t\tlastTime = -1;\n\t} else if (lastTime >= _frames[_frames.size() - 1])// Last time is after last frame.\n\t\treturn;\n\tif (time < _frames[0]) return;\n\n\tif (lastTime < _frames[0] || time >= _frames[Animation::search(_frames, lastTime) + 1]) {\n\t\tif (constraint != nullptr)\n\t\t\tconstraint->reset();\n\t\telse {\n\t\t\tVector<PhysicsConstraint *> &physicsConstraints = skeleton.getPhysicsConstraints();\n\t\t\tfor (size_t i = 0; i < physicsConstraints.size(); i++) {\n\t\t\t\tif (constraint->_active) constraint->reset();\n\t\t\t}\n\t\t}\n\t}\n}"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/PointAttachment.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/PointAttachment.h>\n\n#include <spine/Bone.h>\n\n#include <spine/MathUtil.h>\n\nusing namespace spine;\n\nRTTI_IMPL(PointAttachment, Attachment)\n\nPointAttachment::PointAttachment(const String &name) : Attachment(name), _x(0), _y(0), _rotation(0), _color() {\n}\n\nvoid PointAttachment::computeWorldPosition(Bone &bone, float &ox, float &oy) {\n\tbone.localToWorld(_x, _y, ox, oy);\n}\n\nfloat PointAttachment::computeWorldRotation(Bone &bone) {\n\tfloat r = _rotation * MathUtil::Deg_Rad, cosine = MathUtil::cos(r), sine = MathUtil::sin(r);\n\tfloat x = cosine * bone._a + sine * bone._b;\n\tfloat y = cosine * bone._c + sine * bone._d;\n\treturn MathUtil::atan2Deg(y, x);\n}\n\nfloat PointAttachment::getX() {\n\treturn _x;\n}\n\nvoid PointAttachment::setX(float inValue) {\n\t_x = inValue;\n}\n\nfloat PointAttachment::getY() {\n\treturn _y;\n}\n\nvoid PointAttachment::setY(float inValue) {\n\t_y = inValue;\n}\n\nfloat PointAttachment::getRotation() {\n\treturn _rotation;\n}\n\nvoid PointAttachment::setRotation(float inValue) {\n\t_rotation = inValue;\n}\n\nColor &PointAttachment::getColor() {\n\treturn _color;\n}\n\nAttachment *PointAttachment::copy() {\n\tPointAttachment *copy = new (__FILE__, __LINE__) PointAttachment(getName());\n\tcopy->_x = _x;\n\tcopy->_y = _y;\n\tcopy->_rotation = _rotation;\n\treturn copy;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/RTTI.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/RTTI.h>\n#include <spine/SpineString.h>\n\nusing namespace spine;\n\nRTTI::RTTI(const char *className) : _className(className), _pBaseRTTI(NULL) {\n}\n\nRTTI::RTTI(const char *className, const RTTI &baseRTTI) : _className(className), _pBaseRTTI(&baseRTTI) {\n}\n\nconst char *RTTI::getClassName() const {\n\treturn _className;\n}\n\nbool RTTI::isExactly(const RTTI &rtti) const {\n\treturn !strcmp(this->_className, rtti._className);\n}\n\nbool RTTI::instanceOf(const RTTI &rtti) const {\n\tconst RTTI *pCompare = this;\n\twhile (pCompare) {\n\t\tif (!strcmp(pCompare->_className, rtti._className)) return true;\n\t\tpCompare = pCompare->_pBaseRTTI;\n\t}\n\treturn false;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/RegionAttachment.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/RegionAttachment.h>\n\n#include <spine/Bone.h>\n#include <spine/Slot.h>\n\n#include <assert.h>\n\nusing namespace spine;\n\nRTTI_IMPL(RegionAttachment, Attachment)\n\nconst int RegionAttachment::BLX = 0;\nconst int RegionAttachment::BLY = 1;\nconst int RegionAttachment::ULX = 2;\nconst int RegionAttachment::ULY = 3;\nconst int RegionAttachment::URX = 4;\nconst int RegionAttachment::URY = 5;\nconst int RegionAttachment::BRX = 6;\nconst int RegionAttachment::BRY = 7;\n\nRegionAttachment::RegionAttachment(const String &name) : Attachment(name),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _x(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _y(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _rotation(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _scaleX(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _scaleY(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _width(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _height(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _path(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _color(1, 1, 1, 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _region(NULL),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _sequence(NULL) {\n\t_vertexOffset.setSize(NUM_UVS, 0);\n\t_uvs.setSize(NUM_UVS, 0);\n}\n\nRegionAttachment::~RegionAttachment() {\n\tif (_sequence) delete _sequence;\n}\n\nvoid RegionAttachment::updateRegion() {\n\tif (_region == NULL) {\n\t\t_uvs[BLX] = 0;\n\t\t_uvs[BLY] = 0;\n\t\t_uvs[ULX] = 0;\n\t\t_uvs[ULY] = 1;\n\t\t_uvs[URX] = 1;\n\t\t_uvs[URY] = 1;\n\t\t_uvs[BRX] = 1;\n\t\t_uvs[BRY] = 0;\n\t\treturn;\n\t}\n\n\tfloat regionScaleX = _width / _region->originalWidth * _scaleX;\n\tfloat regionScaleY = _height / _region->originalHeight * _scaleY;\n\tfloat localX = -_width / 2 * _scaleX + _region->offsetX * regionScaleX;\n\tfloat localY = -_height / 2 * _scaleY + _region->offsetY * regionScaleY;\n\tfloat localX2 = localX + _region->width * regionScaleX;\n\tfloat localY2 = localY + _region->height * regionScaleY;\n\tfloat cos = MathUtil::cosDeg(_rotation);\n\tfloat sin = MathUtil::sinDeg(_rotation);\n\tfloat localXCos = localX * cos + _x;\n\tfloat localXSin = localX * sin;\n\tfloat localYCos = localY * cos + _y;\n\tfloat localYSin = localY * sin;\n\tfloat localX2Cos = localX2 * cos + _x;\n\tfloat localX2Sin = localX2 * sin;\n\tfloat localY2Cos = localY2 * cos + _y;\n\tfloat localY2Sin = localY2 * sin;\n\n\t_vertexOffset[BLX] = localXCos - localYSin;\n\t_vertexOffset[BLY] = localYCos + localXSin;\n\t_vertexOffset[ULX] = localXCos - localY2Sin;\n\t_vertexOffset[ULY] = localY2Cos + localXSin;\n\t_vertexOffset[URX] = localX2Cos - localY2Sin;\n\t_vertexOffset[URY] = localY2Cos + localX2Sin;\n\t_vertexOffset[BRX] = localX2Cos - localYSin;\n\t_vertexOffset[BRY] = localYCos + localX2Sin;\n\n\tif (_region->degrees == 90) {\n\t\t_uvs[URX] = _region->u;\n\t\t_uvs[URY] = _region->v2;\n\t\t_uvs[BRX] = _region->u;\n\t\t_uvs[BRY] = _region->v;\n\t\t_uvs[BLX] = _region->u2;\n\t\t_uvs[BLY] = _region->v;\n\t\t_uvs[ULX] = _region->u2;\n\t\t_uvs[ULY] = _region->v2;\n\t} else {\n\t\t_uvs[ULX] = _region->u;\n\t\t_uvs[ULY] = _region->v2;\n\t\t_uvs[URX] = _region->u;\n\t\t_uvs[URY] = _region->v;\n\t\t_uvs[BRX] = _region->u2;\n\t\t_uvs[BRY] = _region->v;\n\t\t_uvs[BLX] = _region->u2;\n\t\t_uvs[BLY] = _region->v2;\n\t}\n}\n\nvoid RegionAttachment::computeWorldVertices(Slot &slot, Vector<float> &worldVertices, size_t offset, size_t stride) {\n\tassert(worldVertices.size() >= (offset + 8));\n\tcomputeWorldVertices(slot, worldVertices.buffer(), offset, stride);\n}\n\nvoid RegionAttachment::computeWorldVertices(Slot &slot, float *worldVertices, size_t offset, size_t stride) {\n\tif (_sequence) _sequence->apply(&slot, this);\n\n\tBone &bone = slot.getBone();\n\tfloat x = bone.getWorldX(), y = bone.getWorldY();\n\tfloat a = bone.getA(), b = bone.getB(), c = bone.getC(), d = bone.getD();\n\tfloat offsetX, offsetY;\n\n\toffsetX = _vertexOffset[BRX];\n\toffsetY = _vertexOffset[BRY];\n\tworldVertices[offset] = offsetX * a + offsetY * b + x;// br\n\tworldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n\toffset += stride;\n\n\toffsetX = _vertexOffset[BLX];\n\toffsetY = _vertexOffset[BLY];\n\tworldVertices[offset] = offsetX * a + offsetY * b + x;// bl\n\tworldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n\toffset += stride;\n\n\toffsetX = _vertexOffset[ULX];\n\toffsetY = _vertexOffset[ULY];\n\tworldVertices[offset] = offsetX * a + offsetY * b + x;// ul\n\tworldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n\toffset += stride;\n\n\toffsetX = _vertexOffset[URX];\n\toffsetY = _vertexOffset[URY];\n\tworldVertices[offset] = offsetX * a + offsetY * b + x;// ur\n\tworldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n}\n\nfloat RegionAttachment::getX() {\n\treturn _x;\n}\n\nvoid RegionAttachment::setX(float inValue) {\n\t_x = inValue;\n}\n\nfloat RegionAttachment::getY() {\n\treturn _y;\n}\n\nvoid RegionAttachment::setY(float inValue) {\n\t_y = inValue;\n}\n\nfloat RegionAttachment::getRotation() {\n\treturn _rotation;\n}\n\nvoid RegionAttachment::setRotation(float inValue) {\n\t_rotation = inValue;\n}\n\nfloat RegionAttachment::getScaleX() {\n\treturn _scaleX;\n}\n\nvoid RegionAttachment::setScaleX(float inValue) {\n\t_scaleX = inValue;\n}\n\nfloat RegionAttachment::getScaleY() {\n\treturn _scaleY;\n}\n\nvoid RegionAttachment::setScaleY(float inValue) {\n\t_scaleY = inValue;\n}\n\nfloat RegionAttachment::getWidth() {\n\treturn _width;\n}\n\nvoid RegionAttachment::setWidth(float inValue) {\n\t_width = inValue;\n}\n\nfloat RegionAttachment::getHeight() {\n\treturn _height;\n}\n\nvoid RegionAttachment::setHeight(float inValue) {\n\t_height = inValue;\n}\n\nconst String &RegionAttachment::getPath() {\n\treturn _path;\n}\n\nvoid RegionAttachment::setPath(const String &inValue) {\n\t_path = inValue;\n}\n\nTextureRegion *RegionAttachment::getRegion() {\n\treturn _region;\n}\n\nvoid RegionAttachment::setRegion(TextureRegion *region) {\n\t_region = region;\n}\n\nSequence *RegionAttachment::getSequence() {\n\treturn _sequence;\n}\n\nvoid RegionAttachment::setSequence(Sequence *sequence) {\n\t_sequence = sequence;\n}\n\nVector<float> &RegionAttachment::getOffset() {\n\treturn _vertexOffset;\n}\n\nVector<float> &RegionAttachment::getUVs() {\n\treturn _uvs;\n}\n\nspine::Color &RegionAttachment::getColor() {\n\treturn _color;\n}\n\nAttachment *RegionAttachment::copy() {\n\tRegionAttachment *copy = new (__FILE__, __LINE__) RegionAttachment(getName());\n\tcopy->_region = _region;\n\tcopy->_path = _path;\n\tcopy->_x = _x;\n\tcopy->_y = _y;\n\tcopy->_scaleX = _scaleX;\n\tcopy->_scaleY = _scaleY;\n\tcopy->_rotation = _rotation;\n\tcopy->_width = _width;\n\tcopy->_height = _height;\n\tcopy->_uvs.clearAndAddAll(_uvs);\n\tcopy->_vertexOffset.clearAndAddAll(_vertexOffset);\n\tcopy->_color.set(_color);\n\tcopy->_sequence = _sequence != NULL ? _sequence->copy() : NULL;\n\treturn copy;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/RotateTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/RotateTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/Bone.h>\n#include <spine/BoneData.h>\n#include <spine/Property.h>\n\nusing namespace spine;\n\nRTTI_IMPL(RotateTimeline, CurveTimeline1)\n\nRotateTimeline::RotateTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline1(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_Rotate << 32) | boneIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nvoid RotateTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t   MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (bone->isActive()) bone->_rotation = getRelativeValue(time, alpha, blend, bone->_rotation, bone->getData()._rotation);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/ScaleTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/ScaleTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Bone.h>\n#include <spine/BoneData.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(ScaleTimeline, CurveTimeline2)\n\nScaleTimeline::ScaleTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline2(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_ScaleX << 32) | boneIndex,\n\t\t\t\t\t\t((PropertyId) Property_ScaleY << 32) | boneIndex};\n\tsetPropertyIds(ids, 2);\n}\n\nScaleTimeline::~ScaleTimeline() {}\n\nvoid ScaleTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t  MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (!bone->_active) return;\n\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tbone->_scaleX = bone->_data._scaleX;\n\t\t\t\tbone->_scaleY = bone->_data._scaleY;\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tbone->_scaleX += (bone->_data._scaleX - bone->_scaleX) * alpha;\n\t\t\t\tbone->_scaleY += (bone->_data._scaleY - bone->_scaleY) * alpha;\n\t\t\tdefault: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfloat x, y;\n\tint i = Animation::search(_frames, time, CurveTimeline2::ENTRIES);\n\tint curveType = (int) _curves[i / CurveTimeline2::ENTRIES];\n\tswitch (curveType) {\n\t\tcase CurveTimeline::LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\tx = _frames[i + CurveTimeline2::VALUE1];\n\t\t\ty = _frames[i + CurveTimeline2::VALUE2];\n\t\t\tfloat t = (time - before) / (_frames[i + CurveTimeline2::ENTRIES] - before);\n\t\t\tx += (_frames[i + CurveTimeline2::ENTRIES + CurveTimeline2::VALUE1] - x) * t;\n\t\t\ty += (_frames[i + CurveTimeline2::ENTRIES + CurveTimeline2::VALUE2] - y) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase CurveTimeline::STEPPED: {\n\t\t\tx = _frames[i + CurveTimeline2::VALUE1];\n\t\t\ty = _frames[i + CurveTimeline2::VALUE2];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tx = getBezierValue(time, i, CurveTimeline2::VALUE1, curveType - CurveTimeline2::BEZIER);\n\t\t\ty = getBezierValue(time, i, CurveTimeline2::VALUE2,\n\t\t\t\t\t\t\t   curveType + CurveTimeline2::BEZIER_SIZE - CurveTimeline2::BEZIER);\n\t\t}\n\t}\n\tx *= bone->_data._scaleX;\n\ty *= bone->_data._scaleY;\n\n\tif (alpha == 1) {\n\t\tif (blend == MixBlend_Add) {\n\t\t\tbone->_scaleX += x - bone->_data._scaleX;\n\t\t\tbone->_scaleY += y - bone->_data._scaleY;\n\t\t} else {\n\t\t\tbone->_scaleX = x;\n\t\t\tbone->_scaleY = y;\n\t\t}\n\t} else {\n\t\tfloat bx, by;\n\t\tif (direction == MixDirection_Out) {\n\t\t\tswitch (blend) {\n\t\t\t\tcase MixBlend_Setup:\n\t\t\t\t\tbx = bone->_data._scaleX;\n\t\t\t\t\tby = bone->_data._scaleY;\n\t\t\t\t\tbone->_scaleX = bx + (MathUtil::abs(x) * MathUtil::sign(bx) - bx) * alpha;\n\t\t\t\t\tbone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha;\n\t\t\t\t\tbreak;\n\t\t\t\tcase MixBlend_First:\n\t\t\t\tcase MixBlend_Replace:\n\t\t\t\t\tbx = bone->_scaleX;\n\t\t\t\t\tby = bone->_scaleY;\n\t\t\t\t\tbone->_scaleX = bx + (MathUtil::abs(x) * MathUtil::sign(bx) - bx) * alpha;\n\t\t\t\t\tbone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha;\n\t\t\t\t\tbreak;\n\t\t\t\tcase MixBlend_Add:\n\t\t\t\t\tbone->_scaleX += (x - bone->_data._scaleX) * alpha;\n\t\t\t\t\tbone->_scaleY += (y - bone->_data._scaleY) * alpha;\n\t\t\t}\n\t\t} else {\n\t\t\tswitch (blend) {\n\t\t\t\tcase MixBlend_Setup:\n\t\t\t\t\tbx = MathUtil::abs(bone->_data._scaleX) * MathUtil::sign(x);\n\t\t\t\t\tby = MathUtil::abs(bone->_data._scaleY) * MathUtil::sign(y);\n\t\t\t\t\tbone->_scaleX = bx + (x - bx) * alpha;\n\t\t\t\t\tbone->_scaleY = by + (y - by) * alpha;\n\t\t\t\t\tbreak;\n\t\t\t\tcase MixBlend_First:\n\t\t\t\tcase MixBlend_Replace:\n\t\t\t\t\tbx = MathUtil::abs(bone->_scaleX) * MathUtil::sign(x);\n\t\t\t\t\tby = MathUtil::abs(bone->_scaleY) * MathUtil::sign(y);\n\t\t\t\t\tbone->_scaleX = bx + (x - bx) * alpha;\n\t\t\t\t\tbone->_scaleY = by + (y - by) * alpha;\n\t\t\t\t\tbreak;\n\t\t\t\tcase MixBlend_Add:\n\t\t\t\t\tbone->_scaleX += (x - bone->_data._scaleX) * alpha;\n\t\t\t\t\tbone->_scaleY += (y - bone->_data._scaleY) * alpha;\n\t\t\t}\n\t\t}\n\t}\n}\n\nRTTI_IMPL(ScaleXTimeline, CurveTimeline1)\n\nScaleXTimeline::ScaleXTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline1(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_ScaleX << 32) | boneIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nScaleXTimeline::~ScaleXTimeline() {}\n\nvoid ScaleXTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t   MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (bone->_active) bone->_scaleX = getScaleValue(time, alpha, blend, direction, bone->_scaleX, bone->_data._scaleX);\n}\n\nRTTI_IMPL(ScaleYTimeline, CurveTimeline1)\n\nScaleYTimeline::ScaleYTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline1(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_ScaleY << 32) | boneIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nScaleYTimeline::~ScaleYTimeline() {}\n\nvoid ScaleYTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t   MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (bone->_active) bone->_scaleY = getScaleValue(time, alpha, blend, direction, bone->_scaleX, bone->_data._scaleY);\n}"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Sequence.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Sequence.h>\n#include <spine/Slot.h>\n#include <spine/Attachment.h>\n#include <spine/RegionAttachment.h>\n#include <spine/MeshAttachment.h>\n\nusing namespace spine;\n\nSequence::Sequence(int count) : _id(Sequence::getNextID()),\n\t\t\t\t\t\t\t\t_regions(),\n\t\t\t\t\t\t\t\t_start(0),\n\t\t\t\t\t\t\t\t_digits(0),\n\t\t\t\t\t\t\t\t_setupIndex(0) {\n\t_regions.setSize(count, NULL);\n}\n\nSequence::~Sequence() {\n}\n\nSequence *Sequence::copy() {\n\tSequence *copy = new (__FILE__, __LINE__) Sequence((int) _regions.size());\n\tfor (size_t i = 0; i < _regions.size(); i++) {\n\t\tcopy->_regions[i] = _regions[i];\n\t}\n\tcopy->_start = _start;\n\tcopy->_digits = _digits;\n\tcopy->_setupIndex = _setupIndex;\n\treturn copy;\n}\n\nvoid Sequence::apply(Slot *slot, Attachment *attachment) {\n\tint index = slot->getSequenceIndex();\n\tif (index == -1) index = _setupIndex;\n\tif (index >= (int) _regions.size()) index = (int) _regions.size() - 1;\n\tTextureRegion *region = _regions[index];\n\n\tif (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {\n\t\tRegionAttachment *regionAttachment = static_cast<RegionAttachment *>(attachment);\n\t\tif (regionAttachment->getRegion() != region) {\n\t\t\tregionAttachment->setRegion(region);\n\t\t\tregionAttachment->updateRegion();\n\t\t}\n\t}\n\n\tif (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {\n\t\tMeshAttachment *meshAttachment = static_cast<MeshAttachment *>(attachment);\n\t\tif (meshAttachment->getRegion() != region) {\n\t\t\tmeshAttachment->setRegion(region);\n\t\t\tmeshAttachment->updateRegion();\n\t\t}\n\t}\n}\n\nString Sequence::getPath(const String &basePath, int index) {\n\tString result(basePath);\n\tString frame;\n\tframe.append(_start + index);\n\tfor (int i = _digits - (int) frame.length(); i > 0; i--)\n\t\tresult.append(\"0\");\n\tresult.append(frame);\n\treturn result;\n}\n\nint Sequence::getNextID() {\n\tstatic int _nextID = 0;\n\treturn _nextID;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/SequenceTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/SequenceTimeline.h>\n#include <spine/Bone.h>\n#include <spine/RegionAttachment.h>\n#include <spine/MeshAttachment.h>\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n#include <spine/Attachment.h>\n#include <spine/PathConstraintData.h>\n#include <spine/Slot.h>\n#include <spine/Animation.h>\n\nusing namespace spine;\n\nRTTI_IMPL(SequenceTimeline, Timeline)\n\nSequenceTimeline::SequenceTimeline(size_t frameCount, int slotIndex, Attachment *attachment) : Timeline(frameCount, ENTRIES), _slotIndex(slotIndex), _attachment(attachment) {\n\tint sequenceId = 0;\n\tif (attachment->getRTTI().instanceOf(RegionAttachment::rtti)) sequenceId = ((RegionAttachment *) attachment)->getSequence()->getId();\n\tif (attachment->getRTTI().instanceOf(MeshAttachment::rtti)) sequenceId = ((MeshAttachment *) attachment)->getSequence()->getId();\n\tPropertyId ids[] = {((PropertyId) Property_Sequence << 32) | ((slotIndex << 16 | sequenceId) & 0xffffffff)};\n\tsetPropertyIds(ids, 1);\n}\n\nSequenceTimeline::~SequenceTimeline() {\n}\n\nvoid SequenceTimeline::setFrame(int frame, float time, SequenceMode mode, int index, float delay) {\n\tVector<float> &frames = this->_frames;\n\tframe *= ENTRIES;\n\tframes[frame] = time;\n\tframes[frame + MODE] = mode | (index << 4);\n\tframes[frame + DELAY] = delay;\n}\n\nvoid SequenceTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents,\n\t\t\t\t\t\t\t float alpha, MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(alpha);\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tSlot *slot = skeleton.getSlots()[_slotIndex];\n\tif (!slot->getBone().isActive()) return;\n\tAttachment *slotAttachment = slot->getAttachment();\n\tif (slotAttachment != _attachment) {\n\t\tif (slotAttachment == NULL || !slotAttachment->getRTTI().instanceOf(VertexAttachment::rtti) || ((VertexAttachment *) slotAttachment)->getTimelineAttachment() != _attachment) return;\n\t}\n\tSequence *sequence = NULL;\n\tif (_attachment->getRTTI().instanceOf(RegionAttachment::rtti)) sequence = ((RegionAttachment *) _attachment)->getSequence();\n\tif (_attachment->getRTTI().instanceOf(MeshAttachment::rtti)) sequence = ((MeshAttachment *) _attachment)->getSequence();\n\tif (!sequence) return;\n\n\tif (direction == MixDirection_Out) {\n\t\tif (blend == MixBlend_Setup) slot->setSequenceIndex(-1);\n\t\treturn;\n\t}\n\n\tVector<float> &frames = this->_frames;\n\tif (time < frames[0]) {// Time is before first frame.\n\t\tif (blend == MixBlend_Setup || blend == MixBlend_First) slot->setSequenceIndex(-1);\n\t\treturn;\n\t}\n\n\tint i = Animation::search(frames, time, ENTRIES);\n\tfloat before = frames[i];\n\tint modeAndIndex = (int) frames[i + MODE];\n\tfloat delay = frames[i + DELAY];\n\n\tint index = modeAndIndex >> 4, count = (int) sequence->getRegions().size();\n\tint mode = modeAndIndex & 0xf;\n\tif (mode != SequenceMode::hold) {\n\t\tindex += (int) (((time - before) / delay + 0.0001));\n\t\tswitch (mode) {\n\t\t\tcase SequenceMode::once:\n\t\t\t\tindex = MathUtil::min(count - 1, index);\n\t\t\t\tbreak;\n\t\t\tcase SequenceMode::loop:\n\t\t\t\tindex %= count;\n\t\t\t\tbreak;\n\t\t\tcase SequenceMode::pingpong: {\n\t\t\t\tint n = (count << 1) - 2;\n\t\t\t\tindex = n == 0 ? 0 : index % n;\n\t\t\t\tif (index >= count) index = n - index;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SequenceMode::onceReverse:\n\t\t\t\tindex = MathUtil::max(count - 1 - index, 0);\n\t\t\t\tbreak;\n\t\t\tcase SequenceMode::loopReverse:\n\t\t\t\tindex = count - 1 - (index % count);\n\t\t\t\tbreak;\n\t\t\tcase SequenceMode::pingpongReverse: {\n\t\t\t\tint n = (count << 1) - 2;\n\t\t\t\tindex = n == 0 ? 0 : (index + count - 1) % n;\n\t\t\t\tif (index >= count) index = n - index;\n\t\t\t}\n\t\t}\n\t}\n\tslot->setSequenceIndex(index);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/ShearTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/ShearTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Bone.h>\n#include <spine/BoneData.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(ShearTimeline, CurveTimeline2)\n\nShearTimeline::ShearTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline2(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_ShearX << 32) | boneIndex,\n\t\t\t\t\t\t((PropertyId) Property_ShearY << 32) | boneIndex};\n\tsetPropertyIds(ids, 2);\n}\n\nShearTimeline::~ShearTimeline() {\n}\n\nvoid ShearTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t  MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (!bone->_active) return;\n\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tbone->_shearX = bone->_data._shearX;\n\t\t\t\tbone->_shearY = bone->_data._shearY;\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tbone->_shearX += (bone->_data._shearX - bone->_shearX) * alpha;\n\t\t\t\tbone->_shearY += (bone->_data._shearY - bone->_shearY) * alpha;\n\t\t\tdefault: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfloat x, y;\n\tint i = Animation::search(_frames, time, CurveTimeline2::ENTRIES);\n\tint curveType = (int) _curves[i / CurveTimeline2::ENTRIES];\n\tswitch (curveType) {\n\t\tcase CurveTimeline2::LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\tx = _frames[i + CurveTimeline2::VALUE1];\n\t\t\ty = _frames[i + CurveTimeline2::VALUE2];\n\t\t\tfloat t = (time - before) / (_frames[i + CurveTimeline2::ENTRIES] - before);\n\t\t\tx += (_frames[i + CurveTimeline2::ENTRIES + CurveTimeline2::VALUE1] - x) * t;\n\t\t\ty += (_frames[i + CurveTimeline2::ENTRIES + CurveTimeline2::VALUE2] - y) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase CurveTimeline2::STEPPED: {\n\t\t\tx = _frames[i + CurveTimeline2::VALUE1];\n\t\t\ty = _frames[i + CurveTimeline2::VALUE2];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tx = getBezierValue(time, i, CurveTimeline2::VALUE1, curveType - CurveTimeline2::BEZIER);\n\t\t\ty = getBezierValue(time, i, CurveTimeline2::VALUE2,\n\t\t\t\t\t\t\t   curveType + CurveTimeline2::BEZIER_SIZE - CurveTimeline2::BEZIER);\n\t\t}\n\t}\n\n\tswitch (blend) {\n\t\tcase MixBlend_Setup:\n\t\t\tbone->_shearX = bone->_data._shearX + x * alpha;\n\t\t\tbone->_shearY = bone->_data._shearY + y * alpha;\n\t\t\tbreak;\n\t\tcase MixBlend_First:\n\t\tcase MixBlend_Replace:\n\t\t\tbone->_shearX += (bone->_data._shearX + x - bone->_shearX) * alpha;\n\t\t\tbone->_shearY += (bone->_data._shearY + y - bone->_shearY) * alpha;\n\t\t\tbreak;\n\t\tcase MixBlend_Add:\n\t\t\tbone->_shearX += x * alpha;\n\t\t\tbone->_shearY += y * alpha;\n\t}\n}\n\nRTTI_IMPL(ShearXTimeline, CurveTimeline1)\n\nShearXTimeline::ShearXTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline1(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_ShearX << 32) | boneIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nShearXTimeline::~ShearXTimeline() {\n}\n\nvoid ShearXTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t   MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (bone->_active) bone->_shearX = getRelativeValue(time, alpha, blend, bone->_shearX, bone->_data._shearX);\n}\n\nRTTI_IMPL(ShearYTimeline, CurveTimeline1)\n\nShearYTimeline::ShearYTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline1(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_ShearX << 32) | boneIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nShearYTimeline::~ShearYTimeline() {\n}\n\nvoid ShearYTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t   MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (bone->_active) bone->_shearY = getRelativeValue(time, alpha, blend, bone->_shearY, bone->_data._shearY);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Skeleton.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Skeleton.h>\n\n#include <spine/Attachment.h>\n#include <spine/Bone.h>\n#include <spine/IkConstraint.h>\n#include <spine/PathConstraint.h>\n#include <spine/PhysicsConstraint.h>\n#include <spine/SkeletonData.h>\n#include <spine/Skin.h>\n#include <spine/Slot.h>\n#include <spine/TransformConstraint.h>\n\n#include <spine/BoneData.h>\n#include <spine/IkConstraintData.h>\n#include <spine/ClippingAttachment.h>\n#include <spine/MeshAttachment.h>\n#include <spine/PathAttachment.h>\n#include <spine/PathConstraintData.h>\n#include <spine/PhysicsConstraintData.h>\n#include <spine/RegionAttachment.h>\n#include <spine/SlotData.h>\n#include <spine/TransformConstraintData.h>\n#include <spine/SkeletonClipping.h>\n\n#include <spine/ContainerUtil.h>\n\n#include <float.h>\n\nusing namespace spine;\n\nSkeleton::Skeleton(SkeletonData *skeletonData)\n\t: _data(skeletonData), _skin(NULL), _color(1, 1, 1, 1), _scaleX(1),\n\t  _scaleY(1), _x(0), _y(0), _time(0) {\n\t_bones.ensureCapacity(_data->getBones().size());\n\tfor (size_t i = 0; i < _data->getBones().size(); ++i) {\n\t\tBoneData *data = _data->getBones()[i];\n\n\t\tBone *bone;\n\t\tif (data->getParent() == NULL) {\n\t\t\tbone = new (__FILE__, __LINE__) Bone(*data, *this, NULL);\n\t\t} else {\n\t\t\tBone *parent = _bones[data->getParent()->getIndex()];\n\t\t\tbone = new (__FILE__, __LINE__) Bone(*data, *this, parent);\n\t\t\tparent->getChildren().add(bone);\n\t\t}\n\n\t\t_bones.add(bone);\n\t}\n\n\t_slots.ensureCapacity(_data->getSlots().size());\n\t_drawOrder.ensureCapacity(_data->getSlots().size());\n\tfor (size_t i = 0; i < _data->getSlots().size(); ++i) {\n\t\tSlotData *data = _data->getSlots()[i];\n\n\t\tBone *bone = _bones[data->getBoneData().getIndex()];\n\t\tSlot *slot = new (__FILE__, __LINE__) Slot(*data, *bone);\n\n\t\t_slots.add(slot);\n\t\t_drawOrder.add(slot);\n\t}\n\n\t_ikConstraints.ensureCapacity(_data->getIkConstraints().size());\n\tfor (size_t i = 0; i < _data->getIkConstraints().size(); ++i) {\n\t\tIkConstraintData *data = _data->getIkConstraints()[i];\n\n\t\tIkConstraint *constraint =\n\t\t\t\tnew (__FILE__, __LINE__) IkConstraint(*data, *this);\n\n\t\t_ikConstraints.add(constraint);\n\t}\n\n\t_transformConstraints.ensureCapacity(_data->getTransformConstraints().size());\n\tfor (size_t i = 0; i < _data->getTransformConstraints().size(); ++i) {\n\t\tTransformConstraintData *data = _data->getTransformConstraints()[i];\n\n\t\tTransformConstraint *constraint =\n\t\t\t\tnew (__FILE__, __LINE__) TransformConstraint(*data, *this);\n\n\t\t_transformConstraints.add(constraint);\n\t}\n\n\t_pathConstraints.ensureCapacity(_data->getPathConstraints().size());\n\tfor (size_t i = 0; i < _data->getPathConstraints().size(); ++i) {\n\t\tPathConstraintData *data = _data->getPathConstraints()[i];\n\n\t\tPathConstraint *constraint =\n\t\t\t\tnew (__FILE__, __LINE__) PathConstraint(*data, *this);\n\n\t\t_pathConstraints.add(constraint);\n\t}\n\n\t_physicsConstraints.ensureCapacity(_data->getPhysicsConstraints().size());\n\tfor (size_t i = 0; i < _data->getPhysicsConstraints().size(); ++i) {\n\t\tPhysicsConstraintData *data = _data->getPhysicsConstraints()[i];\n\n\t\tPhysicsConstraint *constraint =\n\t\t\t\tnew (__FILE__, __LINE__) PhysicsConstraint(*data, *this);\n\n\t\t_physicsConstraints.add(constraint);\n\t}\n\n\tupdateCache();\n}\n\nSkeleton::~Skeleton() {\n\tContainerUtil::cleanUpVectorOfPointers(_bones);\n\tContainerUtil::cleanUpVectorOfPointers(_slots);\n\tContainerUtil::cleanUpVectorOfPointers(_ikConstraints);\n\tContainerUtil::cleanUpVectorOfPointers(_transformConstraints);\n\tContainerUtil::cleanUpVectorOfPointers(_pathConstraints);\n\tContainerUtil::cleanUpVectorOfPointers(_physicsConstraints);\n}\n\nvoid Skeleton::updateCache() {\n\t_updateCache.clear();\n\n\tfor (size_t i = 0, n = _bones.size(); i < n; ++i) {\n\t\tBone *bone = _bones[i];\n\t\tbone->_sorted = bone->_data.isSkinRequired();\n\t\tbone->_active = !bone->_sorted;\n\t}\n\n\tif (_skin) {\n\t\tVector<BoneData *> &skinBones = _skin->getBones();\n\t\tfor (size_t i = 0, n = skinBones.size(); i < n; i++) {\n\t\t\tBone *bone = _bones[skinBones[i]->getIndex()];\n\t\t\tdo {\n\t\t\t\tbone->_sorted = false;\n\t\t\t\tbone->_active = true;\n\t\t\t\tbone = bone->_parent;\n\t\t\t} while (bone);\n\t\t}\n\t}\n\n\tsize_t ikCount = _ikConstraints.size();\n\tsize_t transformCount = _transformConstraints.size();\n\tsize_t pathCount = _pathConstraints.size();\n\tsize_t physicsCount = _physicsConstraints.size();\n\tsize_t constraintCount = ikCount + transformCount + pathCount + physicsCount;\n\n\tsize_t i = 0;\ncontinue_outer:\n\tfor (; i < constraintCount; ++i) {\n\t\tfor (size_t ii = 0; ii < ikCount; ++ii) {\n\t\t\tIkConstraint *constraint = _ikConstraints[ii];\n\t\t\tif (constraint->getData().getOrder() == i) {\n\t\t\t\tsortIkConstraint(constraint);\n\t\t\t\ti++;\n\t\t\t\tgoto continue_outer;\n\t\t\t}\n\t\t}\n\n\t\tfor (size_t ii = 0; ii < transformCount; ++ii) {\n\t\t\tTransformConstraint *constraint = _transformConstraints[ii];\n\t\t\tif (constraint->getData().getOrder() == i) {\n\t\t\t\tsortTransformConstraint(constraint);\n\t\t\t\ti++;\n\t\t\t\tgoto continue_outer;\n\t\t\t}\n\t\t}\n\n\t\tfor (size_t ii = 0; ii < pathCount; ++ii) {\n\t\t\tPathConstraint *constraint = _pathConstraints[ii];\n\t\t\tif (constraint->getData().getOrder() == i) {\n\t\t\t\tsortPathConstraint(constraint);\n\t\t\t\ti++;\n\t\t\t\tgoto continue_outer;\n\t\t\t}\n\t\t}\n\n\t\tfor (size_t ii = 0; ii < physicsCount; ++ii) {\n\t\t\tPhysicsConstraint *constraint = _physicsConstraints[ii];\n\t\t\tif (constraint->getData().getOrder() == i) {\n\t\t\t\tsortPhysicsConstraint(constraint);\n\t\t\t\ti++;\n\t\t\t\tgoto continue_outer;\n\t\t\t}\n\t\t}\n\t}\n\n\tsize_t n = _bones.size();\n\tfor (i = 0; i < n; ++i) {\n\t\tsortBone(_bones[i]);\n\t}\n}\n\nvoid Skeleton::printUpdateCache() {\n\tfor (size_t i = 0; i < _updateCache.size(); i++) {\n\t\tUpdatable *updatable = _updateCache[i];\n\t\tif (updatable->getRTTI().isExactly(Bone::rtti)) {\n\t\t\tprintf(\"bone %s\\n\", ((Bone *) updatable)->getData().getName().buffer());\n\t\t} else if (updatable->getRTTI().isExactly(TransformConstraint::rtti)) {\n\t\t\tprintf(\"transform constraint %s\\n\",\n\t\t\t\t   ((TransformConstraint *) updatable)->getData().getName().buffer());\n\t\t} else if (updatable->getRTTI().isExactly(IkConstraint::rtti)) {\n\t\t\tprintf(\"ik constraint %s\\n\",\n\t\t\t\t   ((IkConstraint *) updatable)->getData().getName().buffer());\n\t\t} else if (updatable->getRTTI().isExactly(PathConstraint::rtti)) {\n\t\t\tprintf(\"path constraint %s\\n\",\n\t\t\t\t   ((PathConstraint *) updatable)->getData().getName().buffer());\n\t\t} else if (updatable->getRTTI().isExactly(PhysicsConstraint::rtti)) {\n\t\t\tprintf(\"physics constraint %s\\n\",\n\t\t\t\t   ((PhysicsConstraint *) updatable)->getData().getName().buffer());\n\t\t}\n\t}\n}\n\nvoid Skeleton::updateWorldTransform(Physics physics) {\n\tfor (size_t i = 0, n = _bones.size(); i < n; i++) {\n\t\tBone *bone = _bones[i];\n\t\tbone->_ax = bone->_x;\n\t\tbone->_ay = bone->_y;\n\t\tbone->_arotation = bone->_rotation;\n\t\tbone->_ascaleX = bone->_scaleX;\n\t\tbone->_ascaleY = bone->_scaleY;\n\t\tbone->_ashearX = bone->_shearX;\n\t\tbone->_ashearY = bone->_shearY;\n\t}\n\n\tfor (size_t i = 0, n = _updateCache.size(); i < n; ++i) {\n\t\tUpdatable *updatable = _updateCache[i];\n\t\tupdatable->update(physics);\n\t}\n}\n\nvoid Skeleton::updateWorldTransform(Physics physics, Bone *parent) {\n\t// Apply the parent bone transform to the root bone. The root bone always\n\t// inherits scale, rotation and reflection.\n\tBone *rootBone = getRootBone();\n\tfloat pa = parent->_a, pb = parent->_b, pc = parent->_c, pd = parent->_d;\n\trootBone->_worldX = pa * _x + pb * _y + parent->_worldX;\n\trootBone->_worldY = pc * _x + pd * _y + parent->_worldY;\n\n\tfloat rx = (rootBone->_rotation + rootBone->_shearX) * MathUtil::Deg_Rad;\n\tfloat ry = (rootBone->_rotation + 90 + rootBone->_shearY) * MathUtil::Deg_Rad;\n\tfloat la = MathUtil::cos(rx) * rootBone->_scaleX;\n\tfloat lb = MathUtil::cos(ry) * rootBone->_scaleY;\n\tfloat lc = MathUtil::sin(rx) * rootBone->_scaleX;\n\tfloat ld = MathUtil::sin(ry) * rootBone->_scaleY;\n\trootBone->_a = (pa * la + pb * lc) * _scaleX;\n\trootBone->_b = (pa * lb + pb * ld) * _scaleX;\n\trootBone->_c = (pc * la + pd * lc) * _scaleY;\n\trootBone->_d = (pc * lb + pd * ld) * _scaleY;\n\n\t// Update everything except root bone.\n\tBone *rb = getRootBone();\n\tfor (size_t i = 0, n = _updateCache.size(); i < n; i++) {\n\t\tUpdatable *updatable = _updateCache[i];\n\t\tif (updatable != rb)\n\t\t\tupdatable->update(physics);\n\t}\n}\n\nvoid Skeleton::setToSetupPose() {\n\tsetBonesToSetupPose();\n\tsetSlotsToSetupPose();\n}\n\nvoid Skeleton::setBonesToSetupPose() {\n\tfor (size_t i = 0, n = _bones.size(); i < n; ++i) {\n\t\t_bones[i]->setToSetupPose();\n\t}\n\n\tfor (size_t i = 0, n = _ikConstraints.size(); i < n; ++i) {\n\t\t_ikConstraints[i]->setToSetupPose();\n\t}\n\n\tfor (size_t i = 0, n = _transformConstraints.size(); i < n; ++i) {\n\t\t_transformConstraints[i]->setToSetupPose();\n\t}\n\n\tfor (size_t i = 0, n = _pathConstraints.size(); i < n; ++i) {\n\t\t_pathConstraints[i]->setToSetupPose();\n\t}\n\n\tfor (size_t i = 0, n = _physicsConstraints.size(); i < n; ++i) {\n\t\t_physicsConstraints[i]->setToSetupPose();\n\t}\n}\n\nvoid Skeleton::setSlotsToSetupPose() {\n\t_drawOrder.clear();\n\tfor (size_t i = 0, n = _slots.size(); i < n; ++i) {\n\t\t_drawOrder.add(_slots[i]);\n\t}\n\n\tfor (size_t i = 0, n = _slots.size(); i < n; ++i) {\n\t\t_slots[i]->setToSetupPose();\n\t}\n}\n\nBone *Skeleton::findBone(const String &boneName) {\n\treturn ContainerUtil::findWithDataName(_bones, boneName);\n}\n\nSlot *Skeleton::findSlot(const String &slotName) {\n\treturn ContainerUtil::findWithDataName(_slots, slotName);\n}\n\nvoid Skeleton::setSkin(const String &skinName) {\n\tSkin *foundSkin = skinName.isEmpty() ? NULL : _data->findSkin(skinName);\n\tsetSkin(foundSkin);\n}\n\nvoid Skeleton::setSkin(Skin *newSkin) {\n\tif (_skin == newSkin)\n\t\treturn;\n\tif (newSkin != NULL) {\n\t\tif (_skin != NULL) {\n\t\t\tSkeleton &thisRef = *this;\n\t\t\tnewSkin->attachAll(thisRef, *_skin);\n\t\t} else {\n\t\t\tfor (size_t i = 0, n = _slots.size(); i < n; ++i) {\n\t\t\t\tSlot *slotP = _slots[i];\n\t\t\t\tSlot &slot = *slotP;\n\t\t\t\tconst String &name = slot._data.getAttachmentName();\n\t\t\t\tif (name.length() > 0) {\n\t\t\t\t\tAttachment *attachment = newSkin->getAttachment(i, name);\n\t\t\t\t\tif (attachment != NULL) {\n\t\t\t\t\t\tslot.setAttachment(attachment);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t_skin = newSkin;\n\tupdateCache();\n}\n\nAttachment *Skeleton::getAttachment(const String &slotName,\n\t\t\t\t\t\t\t\t\tconst String &attachmentName) {\n\treturn getAttachment(_data->findSlot(slotName)->getIndex(), attachmentName);\n}\n\nAttachment *Skeleton::getAttachment(int slotIndex,\n\t\t\t\t\t\t\t\t\tconst String &attachmentName) {\n\tif (attachmentName.isEmpty())\n\t\treturn NULL;\n\n\tif (_skin != NULL) {\n\t\tAttachment *attachment = _skin->getAttachment(slotIndex, attachmentName);\n\t\tif (attachment != NULL) {\n\t\t\treturn attachment;\n\t\t}\n\t}\n\n\treturn _data->getDefaultSkin() != NULL\n\t\t\t\t   ? _data->getDefaultSkin()->getAttachment(slotIndex, attachmentName)\n\t\t\t\t   : NULL;\n}\n\nvoid Skeleton::setAttachment(const String &slotName,\n\t\t\t\t\t\t\t const String &attachmentName) {\n\tassert(slotName.length() > 0);\n\n\tfor (size_t i = 0, n = _slots.size(); i < n; ++i) {\n\t\tSlot *slot = _slots[i];\n\t\tif (slot->_data.getName() == slotName) {\n\t\t\tAttachment *attachment = NULL;\n\t\t\tif (attachmentName.length() > 0) {\n\t\t\t\tattachment = getAttachment((int) i, attachmentName);\n\n\t\t\t\tassert(attachment != NULL);\n\t\t\t}\n\n\t\t\tslot->setAttachment(attachment);\n\n\t\t\treturn;\n\t\t}\n\t}\n\n\tprintf(\"Slot not found: %s\", slotName.buffer());\n\n\tassert(false);\n}\n\nIkConstraint *Skeleton::findIkConstraint(const String &constraintName) {\n\tassert(constraintName.length() > 0);\n\n\tfor (size_t i = 0, n = _ikConstraints.size(); i < n; ++i) {\n\t\tIkConstraint *ikConstraint = _ikConstraints[i];\n\t\tif (ikConstraint->_data.getName() == constraintName) {\n\t\t\treturn ikConstraint;\n\t\t}\n\t}\n\treturn NULL;\n}\n\nTransformConstraint *\nSkeleton::findTransformConstraint(const String &constraintName) {\n\tassert(constraintName.length() > 0);\n\n\tfor (size_t i = 0, n = _transformConstraints.size(); i < n; ++i) {\n\t\tTransformConstraint *transformConstraint = _transformConstraints[i];\n\t\tif (transformConstraint->_data.getName() == constraintName) {\n\t\t\treturn transformConstraint;\n\t\t}\n\t}\n\n\treturn NULL;\n}\n\nPathConstraint *Skeleton::findPathConstraint(const String &constraintName) {\n\tassert(constraintName.length() > 0);\n\n\tfor (size_t i = 0, n = _pathConstraints.size(); i < n; ++i) {\n\t\tPathConstraint *constraint = _pathConstraints[i];\n\t\tif (constraint->_data.getName() == constraintName) {\n\t\t\treturn constraint;\n\t\t}\n\t}\n\n\treturn NULL;\n}\n\nPhysicsConstraint *\nSkeleton::findPhysicsConstraint(const String &constraintName) {\n\tassert(constraintName.length() > 0);\n\n\tfor (size_t i = 0, n = _physicsConstraints.size(); i < n; ++i) {\n\t\tPhysicsConstraint *constraint = _physicsConstraints[i];\n\t\tif (constraint->_data.getName() == constraintName) {\n\t\t\treturn constraint;\n\t\t}\n\t}\n\n\treturn NULL;\n}\n\nvoid Skeleton::getBounds(float &outX, float &outY, float &outWidth,\n\t\t\t\t\t\t float &outHeight, Vector<float> &outVertexBuffer) {\n\tgetBounds(outX, outY, outWidth, outHeight, outVertexBuffer, NULL);\n}\n\nvoid Skeleton::getBounds(float &outX, float &outY, float &outWidth,\n\t\t\t\t\t\t float &outHeight, Vector<float> &outVertexBuffer, SkeletonClipping *clipper) {\n\tstatic unsigned short quadIndices[] = {0, 1, 2, 2, 3, 0};\n\tfloat minX = FLT_MAX;\n\tfloat minY = FLT_MAX;\n\tfloat maxX = -FLT_MAX;\n\tfloat maxY = -FLT_MAX;\n\n\tfor (size_t i = 0; i < _drawOrder.size(); ++i) {\n\t\tSlot *slot = _drawOrder[i];\n\t\tif (!slot->_bone._active)\n\t\t\tcontinue;\n\t\tsize_t verticesLength = 0;\n\t\tAttachment *attachment = slot->getAttachment();\n\t\tunsigned short *triangles = NULL;\n\t\tsize_t trianglesLength = 0;\n\n\t\tif (attachment != NULL &&\n\t\t\tattachment->getRTTI().instanceOf(RegionAttachment::rtti)) {\n\t\t\tRegionAttachment *regionAttachment =\n\t\t\t\t\tstatic_cast<RegionAttachment *>(attachment);\n\n\t\t\tverticesLength = 8;\n\t\t\tif (outVertexBuffer.size() < 8) {\n\t\t\t\toutVertexBuffer.setSize(8, 0);\n\t\t\t}\n\t\t\tregionAttachment->computeWorldVertices(*slot, outVertexBuffer, 0);\n\t\t\ttriangles = quadIndices;\n\t\t\ttrianglesLength = 6;\n\t\t} else if (attachment != NULL &&\n\t\t\t\t   attachment->getRTTI().instanceOf(MeshAttachment::rtti)) {\n\t\t\tMeshAttachment *mesh = static_cast<MeshAttachment *>(attachment);\n\n\t\t\tverticesLength = mesh->getWorldVerticesLength();\n\t\t\tif (outVertexBuffer.size() < verticesLength) {\n\t\t\t\toutVertexBuffer.setSize(verticesLength, 0);\n\t\t\t}\n\n\t\t\tmesh->computeWorldVertices(*slot, 0, verticesLength,\n\t\t\t\t\t\t\t\t\t   outVertexBuffer.buffer(), 0);\n\t\t\ttriangles = mesh->getTriangles().buffer();\n\t\t\ttrianglesLength = mesh->getTriangles().size();\n\t\t} else if (attachment != NULL &&\n\t\t\t\t   attachment->getRTTI().instanceOf(ClippingAttachment::rtti) && clipper != NULL) {\n\t\t\tclipper->clipStart(*slot, static_cast<ClippingAttachment *>(attachment));\n\t\t}\n\n\t\tif (verticesLength > 0) {\n\t\t\tfloat *vertices = outVertexBuffer.buffer();\n\t\t\tif (clipper != NULL && clipper->isClipping()) {\n\t\t\t\tclipper->clipTriangles(outVertexBuffer.buffer(), triangles, trianglesLength);\n\t\t\t\tvertices = clipper->getClippedVertices().buffer();\n\t\t\t\tverticesLength = clipper->getClippedVertices().size();\n\t\t\t}\n\t\t\tfor (size_t ii = 0; ii < verticesLength; ii += 2) {\n\t\t\t\tfloat vx = vertices[ii];\n\t\t\t\tfloat vy = vertices[ii + 1];\n\n\t\t\t\tminX = MathUtil::min(minX, vx);\n\t\t\t\tminY = MathUtil::min(minY, vy);\n\t\t\t\tmaxX = MathUtil::max(maxX, vx);\n\t\t\t\tmaxY = MathUtil::max(maxY, vy);\n\t\t\t}\n\t\t}\n\t\tif (clipper != NULL) clipper->clipEnd(*slot);\n\t}\n\tif (clipper != NULL) clipper->clipEnd();\n\n\toutX = minX;\n\toutY = minY;\n\toutWidth = maxX - minX;\n\toutHeight = maxY - minY;\n}\n\nBone *Skeleton::getRootBone() { return _bones.size() == 0 ? NULL : _bones[0]; }\n\nSkeletonData *Skeleton::getData() { return _data; }\n\nVector<Bone *> &Skeleton::getBones() { return _bones; }\n\nVector<Updatable *> &Skeleton::getUpdateCacheList() { return _updateCache; }\n\nVector<Slot *> &Skeleton::getSlots() { return _slots; }\n\nVector<Slot *> &Skeleton::getDrawOrder() { return _drawOrder; }\n\nVector<IkConstraint *> &Skeleton::getIkConstraints() { return _ikConstraints; }\n\nVector<PathConstraint *> &Skeleton::getPathConstraints() {\n\treturn _pathConstraints;\n}\n\nVector<TransformConstraint *> &Skeleton::getTransformConstraints() {\n\treturn _transformConstraints;\n}\n\nVector<PhysicsConstraint *> &Skeleton::getPhysicsConstraints() {\n\treturn _physicsConstraints;\n}\n\nSkin *Skeleton::getSkin() { return _skin; }\n\nColor &Skeleton::getColor() { return _color; }\n\nvoid Skeleton::setPosition(float x, float y) {\n\t_x = x;\n\t_y = y;\n}\n\nfloat Skeleton::getX() { return _x; }\n\nvoid Skeleton::setX(float inValue) { _x = inValue; }\n\nfloat Skeleton::getY() { return _y; }\n\nvoid Skeleton::setY(float inValue) { _y = inValue; }\n\nfloat Skeleton::getScaleX() { return _scaleX; }\n\nvoid Skeleton::setScaleX(float inValue) { _scaleX = inValue; }\n\nfloat Skeleton::getScaleY() { return _scaleY * (Bone::isYDown() ? -1 : 1); }\n\nvoid Skeleton::setScaleY(float inValue) { _scaleY = inValue; }\n\nvoid Skeleton::sortIkConstraint(IkConstraint *constraint) {\n\tconstraint->_active =\n\t\t\tconstraint->_target->_active &&\n\t\t\t(!constraint->_data.isSkinRequired() ||\n\t\t\t (_skin && _skin->_constraints.contains(&constraint->_data)));\n\tif (!constraint->_active)\n\t\treturn;\n\n\tBone *target = constraint->getTarget();\n\tsortBone(target);\n\n\tVector<Bone *> &constrained = constraint->getBones();\n\tBone *parent = constrained[0];\n\tsortBone(parent);\n\n\tif (constrained.size() == 1) {\n\t\t_updateCache.add(constraint);\n\t\tsortReset(parent->_children);\n\t} else {\n\t\tBone *child = constrained[constrained.size() - 1];\n\t\tsortBone(child);\n\n\t\t_updateCache.add(constraint);\n\n\t\tsortReset(parent->_children);\n\t\tchild->_sorted = true;\n\t}\n}\n\nvoid Skeleton::sortPathConstraint(PathConstraint *constraint) {\n\tconstraint->_active =\n\t\t\tconstraint->_target->_bone._active &&\n\t\t\t(!constraint->_data.isSkinRequired() ||\n\t\t\t (_skin && _skin->_constraints.contains(&constraint->_data)));\n\tif (!constraint->_active)\n\t\treturn;\n\n\tSlot *slot = constraint->getTarget();\n\tint slotIndex = slot->getData().getIndex();\n\tBone &slotBone = slot->getBone();\n\tif (_skin != NULL)\n\t\tsortPathConstraintAttachment(_skin, slotIndex, slotBone);\n\tif (_data->_defaultSkin != NULL && _data->_defaultSkin != _skin)\n\t\tsortPathConstraintAttachment(_data->_defaultSkin, slotIndex, slotBone);\n\tfor (size_t ii = 0, nn = _data->_skins.size(); ii < nn; ii++)\n\t\tsortPathConstraintAttachment(_data->_skins[ii], slotIndex, slotBone);\n\n\tAttachment *attachment = slot->getAttachment();\n\tif (attachment != NULL &&\n\t\tattachment->getRTTI().instanceOf(PathAttachment::rtti))\n\t\tsortPathConstraintAttachment(attachment, slotBone);\n\n\tVector<Bone *> &constrained = constraint->getBones();\n\tsize_t boneCount = constrained.size();\n\tfor (size_t i = 0; i < boneCount; ++i) {\n\t\tsortBone(constrained[i]);\n\t}\n\n\t_updateCache.add(constraint);\n\n\tfor (size_t i = 0; i < boneCount; i++)\n\t\tsortReset(constrained[i]->getChildren());\n\tfor (size_t i = 0; i < boneCount; i++)\n\t\tconstrained[i]->_sorted = true;\n}\n\nvoid Skeleton::sortTransformConstraint(TransformConstraint *constraint) {\n\tconstraint->_active =\n\t\t\tconstraint->_target->_active &&\n\t\t\t(!constraint->_data.isSkinRequired() ||\n\t\t\t (_skin && _skin->_constraints.contains(&constraint->_data)));\n\tif (!constraint->_active)\n\t\treturn;\n\n\tsortBone(constraint->getTarget());\n\n\tVector<Bone *> &constrained = constraint->getBones();\n\tsize_t boneCount = constrained.size();\n\tif (constraint->_data.isLocal()) {\n\t\tfor (size_t i = 0; i < boneCount; i++) {\n\t\t\tBone *child = constrained[i];\n\t\t\tsortBone(child->getParent());\n\t\t\tsortBone(child);\n\t\t}\n\t} else {\n\t\tfor (size_t i = 0; i < boneCount; ++i) {\n\t\t\tsortBone(constrained[i]);\n\t\t}\n\t}\n\n\t_updateCache.add(constraint);\n\n\tfor (size_t i = 0; i < boneCount; ++i)\n\t\tsortReset(constrained[i]->getChildren());\n\tfor (size_t i = 0; i < boneCount; ++i)\n\t\tconstrained[i]->_sorted = true;\n}\n\nvoid Skeleton::sortPhysicsConstraint(PhysicsConstraint *constraint) {\n\tBone *bone = constraint->getBone();\n\tconstraint->_active =\n\t\t\tbone->_active &&\n\t\t\t(!constraint->_data.isSkinRequired() ||\n\t\t\t (_skin && _skin->_constraints.contains(&constraint->_data)));\n\tif (!constraint->_active)\n\t\treturn;\n\n\tsortBone(bone);\n\t_updateCache.add(constraint);\n\tsortReset(bone->getChildren());\n\tbone->_sorted = true;\n}\n\nvoid Skeleton::sortPathConstraintAttachment(Skin *skin, size_t slotIndex,\n\t\t\t\t\t\t\t\t\t\t\tBone &slotBone) {\n\tSkin::AttachmentMap::Entries attachments = skin->getAttachments();\n\n\twhile (attachments.hasNext()) {\n\t\tSkin::AttachmentMap::Entry entry = attachments.next();\n\t\tif (entry._slotIndex == slotIndex) {\n\t\t\tAttachment *value = entry._attachment;\n\t\t\tsortPathConstraintAttachment(value, slotBone);\n\t\t}\n\t}\n}\n\nvoid Skeleton::sortPathConstraintAttachment(Attachment *attachment,\n\t\t\t\t\t\t\t\t\t\t\tBone &slotBone) {\n\tif (attachment == NULL ||\n\t\t!attachment->getRTTI().instanceOf(PathAttachment::rtti))\n\t\treturn;\n\tVector<int> &pathBones =\n\t\t\tstatic_cast<PathAttachment *>(attachment)->getBones();\n\tif (pathBones.size() == 0)\n\t\tsortBone(&slotBone);\n\telse {\n\t\tfor (size_t i = 0, n = pathBones.size(); i < n;) {\n\t\t\tsize_t nn = pathBones[i++];\n\t\t\tnn += i;\n\t\t\twhile (i < nn) {\n\t\t\t\tsortBone(_bones[pathBones[i++]]);\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid Skeleton::sortBone(Bone *bone) {\n\tif (bone->_sorted)\n\t\treturn;\n\tBone *parent = bone->_parent;\n\tif (parent != NULL)\n\t\tsortBone(parent);\n\tbone->_sorted = true;\n\t_updateCache.add(bone);\n}\n\nvoid Skeleton::sortReset(Vector<Bone *> &bones) {\n\tfor (size_t i = 0, n = bones.size(); i < n; ++i) {\n\t\tBone *bone = bones[i];\n\t\tif (!bone->_active)\n\t\t\tcontinue;\n\t\tif (bone->_sorted)\n\t\t\tsortReset(bone->getChildren());\n\t\tbone->_sorted = false;\n\t}\n}\n\nfloat Skeleton::getTime() { return _time; }\n\nvoid Skeleton::setTime(float time) { _time = time; }\n\nvoid Skeleton::update(float delta) { _time += delta; }\n\nvoid Skeleton::physicsTranslate(float x, float y) {\n\tfor (int i = 0; i < (int) _physicsConstraints.size(); i++) {\n\t\t_physicsConstraints[i]->translate(x, y);\n\t}\n}\n\nvoid Skeleton::physicsRotate(float x, float y, float degrees) {\n\tfor (int i = 0; i < (int) _physicsConstraints.size(); i++) {\n\t\t_physicsConstraints[i]->rotate(x, y, degrees);\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/SkeletonBinary.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/SkeletonBinary.h>\n\n#include <spine/Animation.h>\n#include <spine/Atlas.h>\n#include <spine/AtlasAttachmentLoader.h>\n#include <spine/Attachment.h>\n#include <spine/CurveTimeline.h>\n#include <spine/LinkedMesh.h>\n#include <spine/SkeletonData.h>\n#include <spine/Skin.h>\n#include <spine/VertexAttachment.h>\n\n#include <spine/AttachmentTimeline.h>\n#include <spine/AttachmentType.h>\n#include <spine/BoneData.h>\n#include <spine/BoundingBoxAttachment.h>\n#include <spine/ClippingAttachment.h>\n#include <spine/ColorTimeline.h>\n#include <spine/ContainerUtil.h>\n#include <spine/DeformTimeline.h>\n#include <spine/DrawOrderTimeline.h>\n#include <spine/Event.h>\n#include <spine/EventData.h>\n#include <spine/EventTimeline.h>\n#include <spine/IkConstraintData.h>\n#include <spine/IkConstraintTimeline.h>\n#include <spine/InheritTimeline.h>\n#include <spine/MeshAttachment.h>\n#include <spine/PathAttachment.h>\n#include <spine/PathConstraintData.h>\n#include <spine/PathConstraintMixTimeline.h>\n#include <spine/PathConstraintPositionTimeline.h>\n#include <spine/PathConstraintSpacingTimeline.h>\n#include <spine/PhysicsConstraintData.h>\n#include <spine/PhysicsConstraintTimeline.h>\n#include <spine/PointAttachment.h>\n#include <spine/RegionAttachment.h>\n#include <spine/RotateTimeline.h>\n#include <spine/ScaleTimeline.h>\n#include <spine/ShearTimeline.h>\n#include <spine/SlotData.h>\n#include <spine/TransformConstraintData.h>\n#include <spine/TransformConstraintTimeline.h>\n#include <spine/TranslateTimeline.h>\n#include <spine/SequenceTimeline.h>\n#include <spine/Version.h>\n\nusing namespace spine;\n\nSkeletonBinary::SkeletonBinary(Atlas *atlasArray) : _attachmentLoader(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew (__FILE__, __LINE__) AtlasAttachmentLoader(atlasArray)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t_error(), _scale(1), _ownsLoader(true) {\n}\n\nSkeletonBinary::SkeletonBinary(AttachmentLoader *attachmentLoader, bool ownsLoader) : _attachmentLoader(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  attachmentLoader),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _error(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _scale(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _ownsLoader(ownsLoader) {\n\tassert(_attachmentLoader != NULL);\n}\n\nSkeletonBinary::~SkeletonBinary() {\n\tContainerUtil::cleanUpVectorOfPointers(_linkedMeshes);\n\t_linkedMeshes.clear();\n\n\tif (_ownsLoader) delete _attachmentLoader;\n}\n\nSkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, const int length) {\n\tbool nonessential;\n\tSkeletonData *skeletonData;\n\n\tDataInput *input = new (__FILE__, __LINE__) DataInput();\n\tinput->cursor = binary;\n\tinput->end = binary + length;\n\n\t_linkedMeshes.clear();\n\n\tskeletonData = new (__FILE__, __LINE__) SkeletonData();\n\n\tchar buffer[16] = {0};\n\tint lowHash = readInt(input);\n\tint hightHash = readInt(input);\n\tString hashString;\n\tsnprintf(buffer, 16, \"%x\", hightHash);\n\thashString.append(buffer);\n\tsnprintf(buffer, 16, \"%x\", lowHash);\n\thashString.append(buffer);\n\tskeletonData->_hash = hashString;\n\n\tchar *skeletonDataVersion = readString(input);\n\tskeletonData->_version.own(skeletonDataVersion);\n\n\tif (!skeletonData->_version.startsWith(SPINE_VERSION_STRING)) {\n\t\tchar errorMsg[255];\n\t\tsnprintf(errorMsg, 255, \"Skeleton version %s does not match runtime version %s\", skeletonData->_version.buffer(), SPINE_VERSION_STRING);\n\t\tsetError(errorMsg, \"\");\n\t\tdelete input;\n\t\tdelete skeletonData;\n\t\treturn NULL;\n\t}\n\n\tskeletonData->_x = readFloat(input);\n\tskeletonData->_y = readFloat(input);\n\tskeletonData->_width = readFloat(input);\n\tskeletonData->_height = readFloat(input);\n\tskeletonData->_referenceScale = readFloat(input) * this->_scale;\n\n\tnonessential = readBoolean(input);\n\n\tif (nonessential) {\n\t\tskeletonData->_fps = readFloat(input);\n\t\tskeletonData->_imagesPath.own(readString(input));\n\t\tskeletonData->_audioPath.own(readString(input));\n\t}\n\n\tint numStrings = readVarint(input, true);\n\tfor (int i = 0; i < numStrings; i++)\n\t\tskeletonData->_strings.add(readString(input));\n\n\t/* Bones. */\n\tint numBones = readVarint(input, true);\n\tskeletonData->_bones.setSize(numBones, 0);\n\tfor (int i = 0; i < numBones; ++i) {\n\t\tconst char *name = readString(input);\n\t\tBoneData *parent = i == 0 ? 0 : skeletonData->_bones[readVarint(input, true)];\n\t\tBoneData *data = new (__FILE__, __LINE__) BoneData(i, String(name, true), parent);\n\t\tdata->_rotation = readFloat(input);\n\t\tdata->_x = readFloat(input) * _scale;\n\t\tdata->_y = readFloat(input) * _scale;\n\t\tdata->_scaleX = readFloat(input);\n\t\tdata->_scaleY = readFloat(input);\n\t\tdata->_shearX = readFloat(input);\n\t\tdata->_shearY = readFloat(input);\n\t\tdata->_length = readFloat(input) * _scale;\n\t\tdata->_inherit = static_cast<Inherit>(readVarint(input, true));\n\t\tdata->_skinRequired = readBoolean(input);\n\t\tif (nonessential) {\n\t\t\treadColor(input, data->getColor());\n\t\t\tdata->_icon.own(readString(input));\n\t\t\tdata->_visible = readBoolean(input);\n\t\t}\n\t\tskeletonData->_bones[i] = data;\n\t}\n\n\t/* Slots. */\n\tint slotsCount = readVarint(input, true);\n\tskeletonData->_slots.setSize(slotsCount, 0);\n\tfor (int i = 0; i < slotsCount; ++i) {\n\t\tString slotName = String(readString(input), true);\n\t\tBoneData *boneData = skeletonData->_bones[readVarint(input, true)];\n\t\tSlotData *slotData = new (__FILE__, __LINE__) SlotData(i, slotName, *boneData);\n\n\t\treadColor(input, slotData->getColor());\n\t\tunsigned char a = readByte(input);\n\t\tunsigned char r = readByte(input);\n\t\tunsigned char g = readByte(input);\n\t\tunsigned char b = readByte(input);\n\t\tif (!(r == 0xff && g == 0xff && b == 0xff && a == 0xff)) {\n\t\t\tslotData->getDarkColor().set(r / 255.0f, g / 255.0f, b / 255.0f, 1);\n\t\t\tslotData->setHasDarkColor(true);\n\t\t}\n\t\tslotData->_attachmentName = readStringRef(input, skeletonData);\n\t\tslotData->_blendMode = static_cast<BlendMode>(readVarint(input, true));\n\t\tif (nonessential) {\n\t\t\tslotData->_visible = readBoolean(input);\n\t\t}\n\t\tskeletonData->_slots[i] = slotData;\n\t}\n\n\t/* IK constraints. */\n\tint ikConstraintsCount = readVarint(input, true);\n\tskeletonData->_ikConstraints.setSize(ikConstraintsCount, 0);\n\tfor (int i = 0; i < ikConstraintsCount; ++i) {\n\t\tconst char *name = readString(input);\n\t\tIkConstraintData *data = new (__FILE__, __LINE__) IkConstraintData(String(name, true));\n\t\tdata->setOrder(readVarint(input, true));\n\t\tint bonesCount = readVarint(input, true);\n\t\tdata->_bones.setSize(bonesCount, 0);\n\t\tfor (int ii = 0; ii < bonesCount; ++ii)\n\t\t\tdata->_bones[ii] = skeletonData->_bones[readVarint(input, true)];\n\t\tdata->_target = skeletonData->_bones[readVarint(input, true)];\n\t\tint flags = readByte(input);\n\t\tdata->_skinRequired = (flags & 1) != 0;\n\t\tdata->_bendDirection = (flags & 2) != 0 ? 1 : -1;\n\t\tdata->_compress = (flags & 4) != 0;\n\t\tdata->_stretch = (flags & 8) != 0;\n\t\tdata->_uniform = (flags & 16) != 0;\n\t\tif ((flags & 32) != 0) data->_mix = (flags & 64) != 0 ? readFloat(input) : 1;\n\t\tif ((flags & 128) != 0) data->_softness = readFloat(input) * _scale;\n\n\t\tskeletonData->_ikConstraints[i] = data;\n\t}\n\n\t/* Transform constraints. */\n\tint transformConstraintsCount = readVarint(input, true);\n\tskeletonData->_transformConstraints.setSize(transformConstraintsCount, 0);\n\tfor (int i = 0; i < transformConstraintsCount; ++i) {\n\t\tconst char *name = readString(input);\n\t\tTransformConstraintData *data = new (__FILE__, __LINE__) TransformConstraintData(String(name, true));\n\t\tdata->setOrder(readVarint(input, true));\n\t\tint bonesCount = readVarint(input, true);\n\t\tdata->_bones.setSize(bonesCount, 0);\n\t\tfor (int ii = 0; ii < bonesCount; ++ii)\n\t\t\tdata->_bones[ii] = skeletonData->_bones[readVarint(input, true)];\n\t\tdata->_target = skeletonData->_bones[readVarint(input, true)];\n\t\tint flags = readByte(input);\n\t\tdata->_skinRequired = (flags & 1) != 0;\n\t\tdata->_local = (flags & 2) != 0;\n\t\tdata->_relative = (flags & 4) != 0;\n\t\tif ((flags & 8) != 0) data->_offsetRotation = readFloat(input);\n\t\tif ((flags & 16) != 0) data->_offsetX = readFloat(input) * _scale;\n\t\tif ((flags & 32) != 0) data->_offsetY = readFloat(input) * _scale;\n\t\tif ((flags & 64) != 0) data->_offsetScaleX = readFloat(input);\n\t\tif ((flags & 128) != 0) data->_offsetScaleY = readFloat(input);\n\t\tflags = readByte(input);\n\t\tif ((flags & 1) != 0) data->_offsetShearY = readFloat(input);\n\t\tif ((flags & 2) != 0) data->_mixRotate = readFloat(input);\n\t\tif ((flags & 4) != 0) data->_mixX = readFloat(input);\n\t\tif ((flags & 8) != 0) data->_mixY = readFloat(input);\n\t\tif ((flags & 16) != 0) data->_mixScaleX = readFloat(input);\n\t\tif ((flags & 32) != 0) data->_mixScaleY = readFloat(input);\n\t\tif ((flags & 64) != 0) data->_mixShearY = readFloat(input);\n\n\t\tskeletonData->_transformConstraints[i] = data;\n\t}\n\n\t/* Path constraints */\n\tint pathConstraintsCount = readVarint(input, true);\n\tskeletonData->_pathConstraints.setSize(pathConstraintsCount, 0);\n\tfor (int i = 0; i < pathConstraintsCount; ++i) {\n\t\tconst char *name = readString(input);\n\t\tPathConstraintData *data = new (__FILE__, __LINE__) PathConstraintData(String(name, true));\n\t\tdata->setOrder(readVarint(input, true));\n\t\tdata->setSkinRequired(readBoolean(input));\n\t\tint bonesCount = readVarint(input, true);\n\t\tdata->_bones.setSize(bonesCount, 0);\n\t\tfor (int ii = 0; ii < bonesCount; ++ii)\n\t\t\tdata->_bones[ii] = skeletonData->_bones[readVarint(input, true)];\n\t\tdata->_target = skeletonData->_slots[readVarint(input, true)];\n\t\tint flags = readByte(input);\n\t\tdata->_positionMode = (PositionMode) (flags & 1);\n\t\tdata->_spacingMode = (SpacingMode) ((flags >> 1) & 3);\n\t\tdata->_rotateMode = (RotateMode) ((flags >> 3) & 3);\n\t\tif ((flags & 128) != 0) data->_offsetRotation = readFloat(input);\n\t\tdata->_position = readFloat(input);\n\t\tif (data->_positionMode == PositionMode_Fixed) data->_position *= _scale;\n\t\tdata->_spacing = readFloat(input);\n\t\tif (data->_spacingMode == SpacingMode_Length || data->_spacingMode == SpacingMode_Fixed)\n\t\t\tdata->_spacing *= _scale;\n\t\tdata->_mixRotate = readFloat(input);\n\t\tdata->_mixX = readFloat(input);\n\t\tdata->_mixY = readFloat(input);\n\t\tskeletonData->_pathConstraints[i] = data;\n\t}\n\n\t// Physics constraints.\n\tint physicsConstraintsCount = readVarint(input, true);\n\tskeletonData->_physicsConstraints.setSize(physicsConstraintsCount, 0);\n\tfor (int i = 0; i < physicsConstraintsCount; i++) {\n\t\tconst char *name = readString(input);\n\t\tPhysicsConstraintData *data = new (__FILE__, __LINE__) PhysicsConstraintData(String(name, true));\n\t\tdata->_order = readVarint(input, true);\n\t\tdata->_bone = skeletonData->_bones[readVarint(input, true)];\n\t\tint flags = readByte(input);\n\t\tdata->_skinRequired = (flags & 1) != 0;\n\t\tif ((flags & 2) != 0) data->_x = readFloat(input);\n\t\tif ((flags & 4) != 0) data->_y = readFloat(input);\n\t\tif ((flags & 8) != 0) data->_rotate = readFloat(input);\n\t\tif ((flags & 16) != 0) data->_scaleX = readFloat(input);\n\t\tif ((flags & 32) != 0) data->_shearX = readFloat(input);\n\t\tdata->_limit = ((flags & 64) != 0 ? readFloat(input) : 5000) * _scale;\n\t\tdata->_step = 1.f / readByte(input);\n\t\tdata->_inertia = readFloat(input);\n\t\tdata->_strength = readFloat(input);\n\t\tdata->_damping = readFloat(input);\n\t\tdata->_massInverse = (flags & 128) != 0 ? readFloat(input) : 1;\n\t\tdata->_wind = readFloat(input);\n\t\tdata->_gravity = readFloat(input);\n\t\tflags = readByte(input);\n\t\tif ((flags & 1) != 0) data->_inertiaGlobal = true;\n\t\tif ((flags & 2) != 0) data->_strengthGlobal = true;\n\t\tif ((flags & 4) != 0) data->_dampingGlobal = true;\n\t\tif ((flags & 8) != 0) data->_massGlobal = true;\n\t\tif ((flags & 16) != 0) data->_windGlobal = true;\n\t\tif ((flags & 32) != 0) data->_gravityGlobal = true;\n\t\tif ((flags & 64) != 0) data->_mixGlobal = true;\n\t\tdata->_mix = (flags & 128) != 0 ? readFloat(input) : 1;\n\t\tskeletonData->_physicsConstraints[i] = data;\n\t}\n\n\t/* Default skin. */\n\tSkin *defaultSkin = readSkin(input, true, skeletonData, nonessential);\n\tif (defaultSkin) {\n\t\tskeletonData->_defaultSkin = defaultSkin;\n\t\tskeletonData->_skins.add(defaultSkin);\n\t}\n\n\tif (!this->getError().isEmpty()) {\n\t\tdelete input;\n\t\tdelete skeletonData;\n\t\treturn NULL;\n\t}\n\n\t/* Skins. */\n\tfor (size_t i = 0, n = (size_t) readVarint(input, true); i < n; ++i) {\n\t\tSkin *skin = readSkin(input, false, skeletonData, nonessential);\n\t\tif (skin)\n\t\t\tskeletonData->_skins.add(skin);\n\t\telse {\n\t\t\tdelete input;\n\t\t\tdelete skeletonData;\n\t\t\treturn NULL;\n\t\t}\n\t}\n\n\t/* Linked meshes. */\n\tfor (int i = 0, n = (int) _linkedMeshes.size(); i < n; ++i) {\n\t\tLinkedMesh *linkedMesh = _linkedMeshes[i];\n\t\tSkin *skin = skeletonData->_skins[linkedMesh->_skinIndex];\n\t\tAttachment *parent = skin->getAttachment(linkedMesh->_slotIndex, linkedMesh->_parent);\n\t\tif (parent == NULL) {\n\t\t\tdelete input;\n\t\t\tdelete skeletonData;\n\t\t\tsetError(\"Parent mesh not found: \", linkedMesh->_parent.buffer());\n\t\t\treturn NULL;\n\t\t}\n\t\tlinkedMesh->_mesh->_timelineAttachment = linkedMesh->_inheritTimeline ? static_cast<VertexAttachment *>(parent)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  : linkedMesh->_mesh;\n\t\tlinkedMesh->_mesh->setParentMesh(static_cast<MeshAttachment *>(parent));\n\t\tif (linkedMesh->_mesh->_region) linkedMesh->_mesh->updateRegion();\n\t\t_attachmentLoader->configureAttachment(linkedMesh->_mesh);\n\t}\n\tContainerUtil::cleanUpVectorOfPointers(_linkedMeshes);\n\t_linkedMeshes.clear();\n\n\t/* Events. */\n\tint eventsCount = readVarint(input, true);\n\tskeletonData->_events.setSize(eventsCount, 0);\n\tfor (int i = 0; i < eventsCount; ++i) {\n\t\tconst char *name = readString(input);\n\t\tEventData *eventData = new (__FILE__, __LINE__) EventData(String(name, true));\n\t\teventData->_intValue = readVarint(input, false);\n\t\teventData->_floatValue = readFloat(input);\n\t\teventData->_stringValue.own(readString(input));\n\t\teventData->_audioPath.own(readString(input));\n\t\tif (!eventData->_audioPath.isEmpty()) {\n\t\t\teventData->_volume = readFloat(input);\n\t\t\teventData->_balance = readFloat(input);\n\t\t}\n\t\tskeletonData->_events[i] = eventData;\n\t}\n\n\t/* Animations. */\n\tint animationsCount = readVarint(input, true);\n\tskeletonData->_animations.setSize(animationsCount, 0);\n\tfor (int i = 0; i < animationsCount; ++i) {\n\t\tString name(readString(input), true);\n\t\tAnimation *animation = readAnimation(name, input, skeletonData);\n\t\tif (!animation) {\n\t\t\tdelete input;\n\t\t\tdelete skeletonData;\n\t\t\treturn NULL;\n\t\t}\n\t\tskeletonData->_animations[i] = animation;\n\t}\n\n\tdelete input;\n\treturn skeletonData;\n}\n\nSkeletonData *SkeletonBinary::readSkeletonDataFile(const String &path) {\n\tint length;\n\tSkeletonData *skeletonData;\n\tconst char *binary = SpineExtension::readFile(path.buffer(), &length);\n\tif (length == 0 || !binary) {\n\t\tsetError(\"Unable to read skeleton file: \", path.buffer());\n\t\treturn NULL;\n\t}\n\tskeletonData = readSkeletonData((unsigned char *) binary, length);\n\tSpineExtension::free(binary, __FILE__, __LINE__);\n\treturn skeletonData;\n}\n\nvoid SkeletonBinary::setError(const char *value1, const char *value2) {\n\tchar message[256];\n\tint length;\n\tstrcpy(message, value1);\n\tlength = (int) strlen(value1);\n\tif (value2) strncat(message + length, value2, 255 - length);\n\t_error = String(message);\n}\n\nchar *SkeletonBinary::readString(DataInput *input) {\n\tint length = readVarint(input, true);\n\tchar *string;\n\tif (length == 0) return NULL;\n\tstring = SpineExtension::alloc<char>(length, __FILE__, __LINE__);\n\tmemcpy(string, input->cursor, length - 1);\n\tinput->cursor += length - 1;\n\tstring[length - 1] = '\\0';\n\treturn string;\n}\n\nchar *SkeletonBinary::readStringRef(DataInput *input, SkeletonData *skeletonData) {\n\tint index = readVarint(input, true);\n\treturn index == 0 ? NULL : skeletonData->_strings[index - 1];\n}\n\nfloat SkeletonBinary::readFloat(DataInput *input) {\n\tunion {\n\t\tint intValue;\n\t\tfloat floatValue;\n\t} intToFloat;\n\tintToFloat.intValue = readInt(input);\n\treturn intToFloat.floatValue;\n}\n\nunsigned char SkeletonBinary::readByte(DataInput *input) {\n\treturn *input->cursor++;\n}\n\nsigned char SkeletonBinary::readSByte(DataInput *input) {\n\treturn (signed char) readByte(input);\n}\n\nbool SkeletonBinary::readBoolean(DataInput *input) {\n\treturn readByte(input) != 0;\n}\n\nint SkeletonBinary::readInt(DataInput *input) {\n\tint result = readByte(input);\n\tresult <<= 8;\n\tresult |= readByte(input);\n\tresult <<= 8;\n\tresult |= readByte(input);\n\tresult <<= 8;\n\tresult |= readByte(input);\n\treturn result;\n}\n\nvoid SkeletonBinary::readColor(DataInput *input, Color &color) {\n\tcolor.r = readByte(input) / 255.0f;\n\tcolor.g = readByte(input) / 255.0f;\n\tcolor.b = readByte(input) / 255.0f;\n\tcolor.a = readByte(input) / 255.0f;\n}\n\nint SkeletonBinary::readVarint(DataInput *input, bool optimizePositive) {\n\tunsigned char b = readByte(input);\n\tint value = b & 0x7F;\n\tif (b & 0x80) {\n\t\tb = readByte(input);\n\t\tvalue |= (b & 0x7F) << 7;\n\t\tif (b & 0x80) {\n\t\t\tb = readByte(input);\n\t\t\tvalue |= (b & 0x7F) << 14;\n\t\t\tif (b & 0x80) {\n\t\t\t\tb = readByte(input);\n\t\t\t\tvalue |= (b & 0x7F) << 21;\n\t\t\t\tif (b & 0x80) value |= (readByte(input) & 0x7F) << 28;\n\t\t\t}\n\t\t}\n\t}\n\tif (!optimizePositive) value = (((unsigned int) value >> 1) ^ -(value & 1));\n\treturn value;\n}\n\nSkin *SkeletonBinary::readSkin(DataInput *input, bool defaultSkin, SkeletonData *skeletonData, bool nonessential) {\n\tSkin *skin;\n\tint slotCount = 0;\n\tif (defaultSkin) {\n\t\tslotCount = readVarint(input, true);\n\t\tif (slotCount == 0) return NULL;\n\t\tskin = new (__FILE__, __LINE__) Skin(\"default\");\n\t} else {\n\t\tskin = new (__FILE__, __LINE__) Skin(String(readString(input), true));\n\n\t\tif (nonessential) readColor(input, skin->getColor());\n\n\t\tfor (int i = 0, n = readVarint(input, true); i < n; i++) {\n\t\t\tint boneIndex = readVarint(input, true);\n\t\t\tif (boneIndex >= (int) skeletonData->_bones.size()) return NULL;\n\t\t\tskin->getBones().add(skeletonData->_bones[boneIndex]);\n\t\t}\n\n\t\tfor (int i = 0, n = readVarint(input, true); i < n; i++) {\n\t\t\tint ikIndex = readVarint(input, true);\n\t\t\tif (ikIndex >= (int) skeletonData->_ikConstraints.size()) return NULL;\n\t\t\tskin->getConstraints().add(skeletonData->_ikConstraints[ikIndex]);\n\t\t}\n\n\t\tfor (int i = 0, n = readVarint(input, true); i < n; i++) {\n\t\t\tint transformIndex = readVarint(input, true);\n\t\t\tif (transformIndex >= (int) skeletonData->_transformConstraints.size()) return NULL;\n\t\t\tskin->getConstraints().add(skeletonData->_transformConstraints[transformIndex]);\n\t\t}\n\n\t\tfor (int i = 0, n = readVarint(input, true); i < n; i++) {\n\t\t\tint pathIndex = readVarint(input, true);\n\t\t\tif (pathIndex >= (int) skeletonData->_pathConstraints.size()) return NULL;\n\t\t\tskin->getConstraints().add(skeletonData->_pathConstraints[pathIndex]);\n\t\t}\n\n\t\tfor (int i = 0, n = readVarint(input, true); i < n; i++) {\n\t\t\tint physicsIndex = readVarint(input, true);\n\t\t\tif (physicsIndex >= (int) skeletonData->_physicsConstraints.size()) return NULL;\n\t\t\tskin->getConstraints().add(skeletonData->_physicsConstraints[physicsIndex]);\n\t\t}\n\t\tslotCount = readVarint(input, true);\n\t}\n\n\tfor (int i = 0; i < slotCount; ++i) {\n\t\tint slotIndex = readVarint(input, true);\n\t\tfor (int ii = 0, nn = readVarint(input, true); ii < nn; ++ii) {\n\t\t\tString name(readStringRef(input, skeletonData));\n\t\t\tAttachment *attachment = readAttachment(input, skin, slotIndex, name, skeletonData, nonessential);\n\t\t\tif (attachment)\n\t\t\t\tskin->setAttachment(slotIndex, String(name), attachment);\n\t\t\telse {\n\t\t\t\tdelete skin;\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\t}\n\treturn skin;\n}\n\nSequence *SkeletonBinary::readSequence(DataInput *input) {\n\tSequence *sequence = new (__FILE__, __LINE__) Sequence(readVarint(input, true));\n\tsequence->_start = readVarint(input, true);\n\tsequence->_digits = readVarint(input, true);\n\tsequence->_setupIndex = readVarint(input, true);\n\treturn sequence;\n}\n\nAttachment *SkeletonBinary::readAttachment(DataInput *input, Skin *skin, int slotIndex, const String &attachmentName,\n\t\t\t\t\t\t\t\t\t\t   SkeletonData *skeletonData, bool nonessential) {\n\n\tint flags = readByte(input);\n\tString name = (flags & 8) != 0 ? readStringRef(input, skeletonData) : attachmentName;\n\tAttachmentType type = static_cast<AttachmentType>(flags & 0x7);\n\tswitch (type) {\n\t\tcase AttachmentType_Region: {\n\t\t\tString path = (flags & 16) != 0 ? readStringRef(input, skeletonData) : name;\n\t\t\tColor color(1, 1, 1, 1);\n\t\t\tif ((flags & 32) != 0) readColor(input, color);\n\t\t\tSequence *sequence = (flags & 64) != 0 ? readSequence(input) : nullptr;\n\t\t\tfloat rotation = (flags & 128) != 0 ? readFloat(input) : 0;\n\t\t\tfloat x = readFloat(input) * _scale;\n\t\t\tfloat y = readFloat(input) * _scale;\n\t\t\tfloat scaleX = readFloat(input);\n\t\t\tfloat scaleY = readFloat(input);\n\t\t\tfloat width = readFloat(input) * _scale;\n\t\t\tfloat height = readFloat(input) * _scale;\n\t\t\tRegionAttachment *region = _attachmentLoader->newRegionAttachment(*skin, String(name), String(path), sequence);\n\t\t\tif (!region) {\n\t\t\t\tsetError(\"Error reading attachment: \", name.buffer());\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\tregion->_path = path;\n\t\t\tregion->_rotation = rotation;\n\t\t\tregion->_x = x;\n\t\t\tregion->_y = y;\n\t\t\tregion->_scaleX = scaleX;\n\t\t\tregion->_scaleY = scaleY;\n\t\t\tregion->_width = width;\n\t\t\tregion->_height = height;\n\t\t\tregion->getColor().set(color);\n\t\t\tregion->_sequence = sequence;\n\t\t\tif (sequence == NULL) region->updateRegion();\n\t\t\t_attachmentLoader->configureAttachment(region);\n\t\t\treturn region;\n\t\t}\n\t\tcase AttachmentType_Boundingbox: {\n\t\t\tBoundingBoxAttachment *box = _attachmentLoader->newBoundingBoxAttachment(*skin, String(name));\n\t\t\tif (!box) {\n\t\t\t\tsetError(\"Error reading attachment: \", name.buffer());\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\tint verticesLength = readVertices(input, box->getVertices(), box->getBones(), (flags & 16) != 0);\n\t\t\tbox->setWorldVerticesLength(verticesLength);\n\t\t\tif (nonessential) {\n\t\t\t\treadColor(input, box->getColor());\n\t\t\t}\n\t\t\t_attachmentLoader->configureAttachment(box);\n\t\t\treturn box;\n\t\t}\n\t\tcase AttachmentType_Mesh: {\n\t\t\tVector<float> uvs;\n\t\t\tVector<unsigned short> triangles;\n\t\t\tVector<float> vertices;\n\t\t\tVector<int> bones;\n\t\t\tint hullLength;\n\t\t\tfloat width = 0;\n\t\t\tfloat height = 0;\n\t\t\tVector<unsigned short> edges;\n\n\t\t\tString path = (flags & 16) != 0 ? readStringRef(input, skeletonData) : name;\n\t\t\tColor color(1, 1, 1, 1);\n\t\t\tif ((flags & 32) != 0) readColor(input, color);\n\t\t\tSequence *sequence = (flags & 64) != 0 ? readSequence(input) : nullptr;\n\t\t\thullLength = readVarint(input, true);\n\t\t\tint verticesLength = readVertices(input, vertices, bones, (flags & 128) != 0);\n\t\t\treadFloatArray(input, verticesLength, 1, uvs);\n\t\t\treadShortArray(input, triangles, (verticesLength - hullLength - 2) * 3);\n\n\t\t\tif (nonessential) {\n\t\t\t\treadShortArray(input, edges, readVarint(input, true));\n\t\t\t\twidth = readFloat(input);\n\t\t\t\theight = readFloat(input);\n\t\t\t}\n\n\t\t\tMeshAttachment *mesh = _attachmentLoader->newMeshAttachment(*skin, String(name), String(path), sequence);\n\t\t\tif (!mesh) {\n\t\t\t\tsetError(\"Error reading attachment: \", name.buffer());\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\tmesh->_path = path;\n\t\t\tmesh->_color.set(color);\n\t\t\tmesh->_bones.addAll(bones);\n\t\t\tmesh->_vertices.addAll(vertices);\n\t\t\tmesh->setWorldVerticesLength(verticesLength);\n\t\t\tmesh->_triangles.addAll(triangles);\n\t\t\tmesh->_regionUVs.addAll(uvs);\n\t\t\tif (sequence == NULL) mesh->updateRegion();\n\t\t\tmesh->_hullLength = hullLength;\n\t\t\tmesh->_sequence = sequence;\n\t\t\tif (nonessential) {\n\t\t\t\tmesh->_edges.addAll(edges);\n\t\t\t\tmesh->_width = width;\n\t\t\t\tmesh->_height = height;\n\t\t\t}\n\t\t\t_attachmentLoader->configureAttachment(mesh);\n\t\t\treturn mesh;\n\t\t}\n\t\tcase AttachmentType_Linkedmesh: {\n\t\t\tString path = (flags & 16) != 0 ? readStringRef(input, skeletonData) : name;\n\t\t\tColor color(1, 1, 1, 1);\n\t\t\tif ((flags & 32) != 0) readColor(input, color);\n\t\t\tSequence *sequence = (flags & 64) != 0 ? readSequence(input) : nullptr;\n\t\t\tbool inheritTimelines = (flags & 128) != 0;\n\t\t\tint skinIndex = readVarint(input, true);\n\t\t\tString parent(readStringRef(input, skeletonData));\n\t\t\tfloat width = 0, height = 0;\n\t\t\tif (nonessential) {\n\t\t\t\twidth = readFloat(input) * _scale;\n\t\t\t\theight = readFloat(input) * _scale;\n\t\t\t}\n\n\t\t\tMeshAttachment *mesh = _attachmentLoader->newMeshAttachment(*skin, String(name), String(path), sequence);\n\t\t\tif (!mesh) {\n\t\t\t\tsetError(\"Error reading attachment: \", name.buffer());\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\tmesh->_path = path;\n\t\t\tmesh->_color.set(color);\n\t\t\tmesh->_sequence = sequence;\n\t\t\tif (nonessential) {\n\t\t\t\tmesh->_width = width;\n\t\t\t\tmesh->_height = height;\n\t\t\t}\n\n\t\t\tLinkedMesh *linkedMesh = new (__FILE__, __LINE__) LinkedMesh(mesh, skinIndex, slotIndex,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t String(parent), inheritTimelines);\n\t\t\t_linkedMeshes.add(linkedMesh);\n\t\t\treturn mesh;\n\t\t}\n\t\tcase AttachmentType_Path: {\n\t\t\tPathAttachment *path = _attachmentLoader->newPathAttachment(*skin, String(name));\n\t\t\tif (!path) {\n\t\t\t\tsetError(\"Error reading attachment: \", name.buffer());\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\tpath->_closed = (flags & 16) != 0;\n\t\t\tpath->_constantSpeed = (flags & 32) != 0;\n\t\t\tint verticesLength = readVertices(input, path->getVertices(), path->getBones(), (flags & 64) != 0);\n\t\t\tpath->setWorldVerticesLength(verticesLength);\n\t\t\tint lengthsLength = verticesLength / 6;\n\t\t\tpath->_lengths.setSize(lengthsLength, 0);\n\t\t\tfor (int i = 0; i < lengthsLength; ++i) {\n\t\t\t\tpath->_lengths[i] = readFloat(input) * _scale;\n\t\t\t}\n\t\t\tif (nonessential) {\n\t\t\t\treadColor(input, path->getColor());\n\t\t\t}\n\t\t\t_attachmentLoader->configureAttachment(path);\n\t\t\treturn path;\n\t\t}\n\t\tcase AttachmentType_Point: {\n\t\t\tPointAttachment *point = _attachmentLoader->newPointAttachment(*skin, String(name));\n\t\t\tif (!point) {\n\t\t\t\tsetError(\"Error reading attachment: \", name.buffer());\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\tpoint->_rotation = readFloat(input);\n\t\t\tpoint->_x = readFloat(input) * _scale;\n\t\t\tpoint->_y = readFloat(input) * _scale;\n\n\t\t\tif (nonessential) {\n\t\t\t\treadColor(input, point->getColor());\n\t\t\t}\n\t\t\t_attachmentLoader->configureAttachment(point);\n\t\t\treturn point;\n\t\t}\n\t\tcase AttachmentType_Clipping: {\n\t\t\tint endSlotIndex = readVarint(input, true);\n\t\t\tClippingAttachment *clip = _attachmentLoader->newClippingAttachment(*skin, name);\n\t\t\tif (!clip) {\n\t\t\t\tsetError(\"Error reading attachment: \", name.buffer());\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\tint verticesLength = readVertices(input, clip->getVertices(), clip->getBones(), (flags & 16) != 0);\n\t\t\tclip->setWorldVerticesLength(verticesLength);\n\t\t\tclip->_endSlot = skeletonData->_slots[endSlotIndex];\n\t\t\tif (nonessential) {\n\t\t\t\treadColor(input, clip->getColor());\n\t\t\t}\n\t\t\t_attachmentLoader->configureAttachment(clip);\n\t\t\treturn clip;\n\t\t}\n\t}\n\treturn NULL;\n}\n\nint SkeletonBinary::readVertices(DataInput *input, Vector<float> &vertices, Vector<int> &bones, bool weighted) {\n\tfloat scale = _scale;\n\tint vertexCount = readVarint(input, true);\n\tint verticesLength = vertexCount << 1;\n\tif (!weighted) {\n\t\treadFloatArray(input, verticesLength, scale, vertices);\n\t\treturn verticesLength;\n\t}\n\tvertices.ensureCapacity(verticesLength * 3 * 3);\n\tbones.ensureCapacity(verticesLength * 3);\n\tfor (int i = 0; i < vertexCount; ++i) {\n\t\tint boneCount = readVarint(input, true);\n\t\tbones.add(boneCount);\n\t\tfor (int ii = 0; ii < boneCount; ++ii) {\n\t\t\tbones.add(readVarint(input, true));\n\t\t\tvertices.add(readFloat(input) * scale);\n\t\t\tvertices.add(readFloat(input) * scale);\n\t\t\tvertices.add(readFloat(input));\n\t\t}\n\t}\n\treturn verticesLength;\n}\n\nvoid SkeletonBinary::readFloatArray(DataInput *input, int n, float scale, Vector<float> &array) {\n\tarray.setSize(n, 0);\n\n\tint i;\n\tif (scale == 1) {\n\t\tfor (i = 0; i < n; ++i) {\n\t\t\tarray[i] = readFloat(input);\n\t\t}\n\t} else {\n\t\tfor (i = 0; i < n; ++i) {\n\t\t\tarray[i] = readFloat(input) * scale;\n\t\t}\n\t}\n}\n\nvoid SkeletonBinary::readShortArray(DataInput *input, Vector<unsigned short> &array, int n) {\n\tarray.setSize(n, 0);\n\tfor (int i = 0; i < n; ++i) {\n\t\tarray[i] = (short) readVarint(input, true);\n\t}\n}\n\nvoid SkeletonBinary::setBezier(DataInput *input, CurveTimeline *timeline, int bezier, int frame, int value, float time1,\n\t\t\t\t\t\t\t   float time2,\n\t\t\t\t\t\t\t   float value1, float value2, float scale) {\n\tfloat cx1 = readFloat(input);\n\tfloat cy1 = readFloat(input);\n\tfloat cx2 = readFloat(input);\n\tfloat cy2 = readFloat(input);\n\ttimeline->setBezier(bezier, frame, value, time1, value1, cx1, cy1 * scale, cx2, cy2 * scale, time2, value2);\n}\n\nvoid SkeletonBinary::readTimeline(DataInput *input, Vector<Timeline *> &timelines, CurveTimeline1 *timeline, float scale) {\n\tfloat time = readFloat(input);\n\tfloat value = readFloat(input) * scale;\n\tfor (int frame = 0, bezier = 0, frameLast = (int) timeline->getFrameCount() - 1;; frame++) {\n\t\ttimeline->setFrame(frame, time, value);\n\t\tif (frame == frameLast) break;\n\t\tfloat time2 = readFloat(input);\n\t\tfloat value2 = readFloat(input) * scale;\n\t\tswitch (readSByte(input)) {\n\t\t\tcase CURVE_STEPPED:\n\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\tbreak;\n\t\t\tcase CURVE_BEZIER:\n\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\n\t\t}\n\t\ttime = time2;\n\t\tvalue = value2;\n\t}\n\ttimelines.add(timeline);\n}\n\nvoid SkeletonBinary::readTimeline2(DataInput *input, Vector<Timeline *> &timelines, CurveTimeline2 *timeline, float scale) {\n\tfloat time = readFloat(input);\n\tfloat value1 = readFloat(input) * scale;\n\tfloat value2 = readFloat(input) * scale;\n\tfor (int frame = 0, bezier = 0, frameLast = (int) timeline->getFrameCount() - 1;; frame++) {\n\t\ttimeline->setFrame(frame, time, value1, value2);\n\t\tif (frame == frameLast) break;\n\t\tfloat time2 = readFloat(input);\n\t\tfloat nvalue1 = readFloat(input) * scale;\n\t\tfloat nvalue2 = readFloat(input) * scale;\n\t\tswitch (readSByte(input)) {\n\t\t\tcase CURVE_STEPPED:\n\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\tbreak;\n\t\t\tcase CURVE_BEZIER:\n\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\n\t\t\t\tsetBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\n\t\t}\n\t\ttime = time2;\n\t\tvalue1 = nvalue1;\n\t\tvalue2 = nvalue2;\n\t}\n\ttimelines.add(timeline);\n}\n\nAnimation *SkeletonBinary::readAnimation(const String &name, DataInput *input, SkeletonData *skeletonData) {\n\tVector<Timeline *> timelines;\n\tfloat scale = _scale;\n\tint numTimelines = readVarint(input, true);\n\tSP_UNUSED(numTimelines);\n\t// Slot timelines.\n\tfor (int i = 0, n = readVarint(input, true); i < n; ++i) {\n\t\tint slotIndex = readVarint(input, true);\n\t\tfor (int ii = 0, nn = readVarint(input, true); ii < nn; ++ii) {\n\t\t\tunsigned char timelineType = readByte(input);\n\t\t\tint frameCount = readVarint(input, true);\n\t\t\tint frameLast = frameCount - 1;\n\t\t\tswitch (timelineType) {\n\t\t\t\tcase SLOT_ATTACHMENT: {\n\t\t\t\t\tAttachmentTimeline *timeline = new (__FILE__, __LINE__) AttachmentTimeline(frameCount, slotIndex);\n\t\t\t\t\tfor (int frame = 0; frame < frameCount; ++frame) {\n\t\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\t\tString attachmentName(readStringRef(input, skeletonData));\n\t\t\t\t\t\ttimeline->setFrame(frame, time, attachmentName);\n\t\t\t\t\t}\n\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SLOT_RGBA: {\n\t\t\t\t\tint bezierCount = readVarint(input, true);\n\t\t\t\t\tRGBATimeline *timeline = new (__FILE__, __LINE__) RGBATimeline(frameCount, bezierCount, slotIndex);\n\n\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\tfloat r = readByte(input) / 255.0;\n\t\t\t\t\tfloat g = readByte(input) / 255.0;\n\t\t\t\t\tfloat b = readByte(input) / 255.0;\n\t\t\t\t\tfloat a = readByte(input) / 255.0;\n\n\t\t\t\t\tfor (int frame = 0, bezier = 0;; frame++) {\n\t\t\t\t\t\ttimeline->setFrame(frame, time, r, g, b, a);\n\t\t\t\t\t\tif (frame == frameLast) break;\n\n\t\t\t\t\t\tfloat time2 = readFloat(input);\n\t\t\t\t\t\tfloat r2 = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat g2 = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat b2 = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat a2 = readByte(input) / 255.0;\n\n\t\t\t\t\t\tswitch (readSByte(input)) {\n\t\t\t\t\t\t\tcase CURVE_STEPPED:\n\t\t\t\t\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase CURVE_BEZIER:\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttime = time2;\n\t\t\t\t\t\tr = r2;\n\t\t\t\t\t\tg = g2;\n\t\t\t\t\t\tb = b2;\n\t\t\t\t\t\ta = a2;\n\t\t\t\t\t}\n\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SLOT_RGB: {\n\t\t\t\t\tint bezierCount = readVarint(input, true);\n\t\t\t\t\tRGBTimeline *timeline = new (__FILE__, __LINE__) RGBTimeline(frameCount, bezierCount, slotIndex);\n\n\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\tfloat r = readByte(input) / 255.0;\n\t\t\t\t\tfloat g = readByte(input) / 255.0;\n\t\t\t\t\tfloat b = readByte(input) / 255.0;\n\n\t\t\t\t\tfor (int frame = 0, bezier = 0;; frame++) {\n\t\t\t\t\t\ttimeline->setFrame(frame, time, r, g, b);\n\t\t\t\t\t\tif (frame == frameLast) break;\n\n\t\t\t\t\t\tfloat time2 = readFloat(input);\n\t\t\t\t\t\tfloat r2 = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat g2 = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat b2 = readByte(input) / 255.0;\n\n\t\t\t\t\t\tswitch (readSByte(input)) {\n\t\t\t\t\t\t\tcase CURVE_STEPPED:\n\t\t\t\t\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase CURVE_BEZIER:\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttime = time2;\n\t\t\t\t\t\tr = r2;\n\t\t\t\t\t\tg = g2;\n\t\t\t\t\t\tb = b2;\n\t\t\t\t\t}\n\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SLOT_RGBA2: {\n\t\t\t\t\tint bezierCount = readVarint(input, true);\n\t\t\t\t\tRGBA2Timeline *timeline = new (__FILE__, __LINE__) RGBA2Timeline(frameCount, bezierCount, slotIndex);\n\n\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\tfloat r = readByte(input) / 255.0;\n\t\t\t\t\tfloat g = readByte(input) / 255.0;\n\t\t\t\t\tfloat b = readByte(input) / 255.0;\n\t\t\t\t\tfloat a = readByte(input) / 255.0;\n\t\t\t\t\tfloat r2 = readByte(input) / 255.0;\n\t\t\t\t\tfloat g2 = readByte(input) / 255.0;\n\t\t\t\t\tfloat b2 = readByte(input) / 255.0;\n\n\t\t\t\t\tfor (int frame = 0, bezier = 0;; frame++) {\n\t\t\t\t\t\ttimeline->setFrame(frame, time, r, g, b, a, r2, g2, b2);\n\t\t\t\t\t\tif (frame == frameLast) break;\n\t\t\t\t\t\tfloat time2 = readFloat(input);\n\t\t\t\t\t\tfloat nr = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat ng = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat nb = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat na = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat nr2 = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat ng2 = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat nb2 = readByte(input) / 255.0;\n\n\t\t\t\t\t\tswitch (readSByte(input)) {\n\t\t\t\t\t\t\tcase CURVE_STEPPED:\n\t\t\t\t\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase CURVE_BEZIER:\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttime = time2;\n\t\t\t\t\t\tr = nr;\n\t\t\t\t\t\tg = ng;\n\t\t\t\t\t\tb = nb;\n\t\t\t\t\t\ta = na;\n\t\t\t\t\t\tr2 = nr2;\n\t\t\t\t\t\tg2 = ng2;\n\t\t\t\t\t\tb2 = nb2;\n\t\t\t\t\t}\n\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SLOT_RGB2: {\n\t\t\t\t\tint bezierCount = readVarint(input, true);\n\t\t\t\t\tRGB2Timeline *timeline = new (__FILE__, __LINE__) RGB2Timeline(frameCount, bezierCount, slotIndex);\n\n\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\tfloat r = readByte(input) / 255.0;\n\t\t\t\t\tfloat g = readByte(input) / 255.0;\n\t\t\t\t\tfloat b = readByte(input) / 255.0;\n\t\t\t\t\tfloat r2 = readByte(input) / 255.0;\n\t\t\t\t\tfloat g2 = readByte(input) / 255.0;\n\t\t\t\t\tfloat b2 = readByte(input) / 255.0;\n\n\t\t\t\t\tfor (int frame = 0, bezier = 0;; frame++) {\n\t\t\t\t\t\ttimeline->setFrame(frame, time, r, g, b, r2, g2, b2);\n\t\t\t\t\t\tif (frame == frameLast) break;\n\t\t\t\t\t\tfloat time2 = readFloat(input);\n\t\t\t\t\t\tfloat nr = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat ng = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat nb = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat nr2 = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat ng2 = readByte(input) / 255.0;\n\t\t\t\t\t\tfloat nb2 = readByte(input) / 255.0;\n\n\t\t\t\t\t\tswitch (readSByte(input)) {\n\t\t\t\t\t\t\tcase CURVE_STEPPED:\n\t\t\t\t\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase CURVE_BEZIER:\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttime = time2;\n\t\t\t\t\t\tr = nr;\n\t\t\t\t\t\tg = ng;\n\t\t\t\t\t\tb = nb;\n\t\t\t\t\t\tr2 = nr2;\n\t\t\t\t\t\tg2 = ng2;\n\t\t\t\t\t\tb2 = nb2;\n\t\t\t\t\t}\n\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SLOT_ALPHA: {\n\t\t\t\t\tint bezierCount = readVarint(input, true);\n\t\t\t\t\tAlphaTimeline *timeline = new (__FILE__, __LINE__) AlphaTimeline(frameCount, bezierCount, slotIndex);\n\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\tfloat a = readByte(input) / 255.0;\n\t\t\t\t\tfor (int frame = 0, bezier = 0;; frame++) {\n\t\t\t\t\t\ttimeline->setFrame(frame, time, a);\n\t\t\t\t\t\tif (frame == frameLast) break;\n\t\t\t\t\t\tfloat time2 = readFloat(input);\n\t\t\t\t\t\tfloat a2 = readByte(input) / 255.0;\n\t\t\t\t\t\tswitch (readSByte(input)) {\n\t\t\t\t\t\t\tcase CURVE_STEPPED:\n\t\t\t\t\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase CURVE_BEZIER:\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttime = time2;\n\t\t\t\t\t\ta = a2;\n\t\t\t\t\t}\n\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\t\t\tsetError(\"Invalid timeline type for a slot: \", skeletonData->_slots[slotIndex]->_name.buffer());\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Bone timelines.\n\tfor (int i = 0, n = readVarint(input, true); i < n; ++i) {\n\t\tint boneIndex = readVarint(input, true);\n\t\tfor (int ii = 0, nn = readVarint(input, true); ii < nn; ++ii) {\n\t\t\tunsigned char timelineType = readByte(input);\n\t\t\tint frameCount = readVarint(input, true);\n\t\t\tif (timelineType == BONE_INHERIT) {\n\t\t\t\tInheritTimeline *timeline = new (__FILE__, __LINE__) InheritTimeline(frameCount, boneIndex);\n\t\t\t\tfor (int frame = 0; frame < frameCount; frame++) {\n\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\tInherit inherit = (Inherit) readByte(input);\n\t\t\t\t\ttimeline->setFrame(frame, time, inherit);\n\t\t\t\t}\n\t\t\t\ttimelines.add(timeline);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tint bezierCount = readVarint(input, true);\n\t\t\tswitch (timelineType) {\n\t\t\t\tcase BONE_ROTATE:\n\t\t\t\t\treadTimeline(input, timelines,\n\t\t\t\t\t\t\t\t new (__FILE__, __LINE__) RotateTimeline(frameCount, bezierCount, boneIndex),\n\t\t\t\t\t\t\t\t 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BONE_TRANSLATE:\n\t\t\t\t\treadTimeline2(input, timelines, new (__FILE__, __LINE__) TranslateTimeline(frameCount, bezierCount, boneIndex), scale);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BONE_TRANSLATEX:\n\t\t\t\t\treadTimeline(input, timelines, new (__FILE__, __LINE__) TranslateXTimeline(frameCount, bezierCount, boneIndex), scale);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BONE_TRANSLATEY:\n\t\t\t\t\treadTimeline(input, timelines, new (__FILE__, __LINE__) TranslateYTimeline(frameCount, bezierCount, boneIndex), scale);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BONE_SCALE:\n\t\t\t\t\treadTimeline2(input, timelines,\n\t\t\t\t\t\t\t\t  new (__FILE__, __LINE__) ScaleTimeline(frameCount, bezierCount, boneIndex),\n\t\t\t\t\t\t\t\t  1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BONE_SCALEX:\n\t\t\t\t\treadTimeline(input, timelines,\n\t\t\t\t\t\t\t\t new (__FILE__, __LINE__) ScaleXTimeline(frameCount, bezierCount, boneIndex),\n\t\t\t\t\t\t\t\t 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BONE_SCALEY:\n\t\t\t\t\treadTimeline(input, timelines,\n\t\t\t\t\t\t\t\t new (__FILE__, __LINE__) ScaleYTimeline(frameCount, bezierCount, boneIndex),\n\t\t\t\t\t\t\t\t 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BONE_SHEAR:\n\t\t\t\t\treadTimeline2(input, timelines,\n\t\t\t\t\t\t\t\t  new (__FILE__, __LINE__) ShearTimeline(frameCount, bezierCount, boneIndex),\n\t\t\t\t\t\t\t\t  1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BONE_SHEARX:\n\t\t\t\t\treadTimeline(input, timelines,\n\t\t\t\t\t\t\t\t new (__FILE__, __LINE__) ShearXTimeline(frameCount, bezierCount, boneIndex),\n\t\t\t\t\t\t\t\t 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BONE_SHEARY:\n\t\t\t\t\treadTimeline(input, timelines,\n\t\t\t\t\t\t\t\t new (__FILE__, __LINE__) ShearYTimeline(frameCount, bezierCount, boneIndex),\n\t\t\t\t\t\t\t\t 1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: {\n\t\t\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\t\t\tsetError(\"Invalid timeline type for a bone: \", skeletonData->_bones[boneIndex]->_name.buffer());\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// IK timelines.\n\tfor (int i = 0, n = readVarint(input, true); i < n; ++i) {\n\t\tint index = readVarint(input, true);\n\t\tint frameCount = readVarint(input, true);\n\t\tint frameLast = frameCount - 1;\n\t\tint bezierCount = readVarint(input, true);\n\t\tIkConstraintTimeline *timeline = new (__FILE__, __LINE__) IkConstraintTimeline(frameCount, bezierCount, index);\n\t\tint flags = readByte(input);\n\t\tfloat time = readFloat(input), mix = (flags & 1) != 0 ? ((flags & 2) != 0 ? readFloat(input) : 1) : 0;\n\t\tfloat softness = (flags & 4) != 0 ? readFloat(input) * scale : 0;\n\t\tfor (int frame = 0, bezier = 0;; frame++) {\n\t\t\ttimeline->setFrame(frame, time, mix, softness, (flags & 8) != 0 ? 1 : -1, (flags & 16) != 0, (flags & 32) != 0);\n\t\t\tif (frame == frameLast) break;\n\t\t\tflags = readByte(input);\n\t\t\tfloat time2 = readFloat(input), mix2 = (flags & 1) != 0 ? ((flags & 2) != 0 ? readFloat(input) : 1) : 0;\n\t\t\tfloat softness2 = (flags & 4) != 0 ? readFloat(input) * scale : 0;\n\t\t\tif ((flags & 64) != 0)\n\t\t\t\ttimeline->setStepped(frame);\n\t\t\telse if ((flags & 128) != 0) {\n\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\n\t\t\t\tsetBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\n\t\t\t}\n\t\t\ttime = time2;\n\t\t\tmix = mix2;\n\t\t\tsoftness = softness2;\n\t\t}\n\t\ttimelines.add(timeline);\n\t}\n\n\t// Transform constraint timelines.\n\tfor (int i = 0, n = readVarint(input, true); i < n; ++i) {\n\t\tint index = readVarint(input, true);\n\t\tint frameCount = readVarint(input, true);\n\t\tint frameLast = frameCount - 1;\n\t\tint bezierCount = readVarint(input, true);\n\t\tTransformConstraintTimeline *timeline = new TransformConstraintTimeline(frameCount, bezierCount, index);\n\t\tfloat time = readFloat(input);\n\t\tfloat mixRotate = readFloat(input);\n\t\tfloat mixX = readFloat(input);\n\t\tfloat mixY = readFloat(input);\n\t\tfloat mixScaleX = readFloat(input);\n\t\tfloat mixScaleY = readFloat(input);\n\t\tfloat mixShearY = readFloat(input);\n\t\tfor (int frame = 0, bezier = 0;; frame++) {\n\t\t\ttimeline->setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n\t\t\tif (frame == frameLast) break;\n\t\t\tfloat time2 = readFloat(input);\n\t\t\tfloat mixRotate2 = readFloat(input);\n\t\t\tfloat mixX2 = readFloat(input);\n\t\t\tfloat mixY2 = readFloat(input);\n\t\t\tfloat mixScaleX2 = readFloat(input);\n\t\t\tfloat mixScaleY2 = readFloat(input);\n\t\t\tfloat mixShearY2 = readFloat(input);\n\t\t\tswitch (readSByte(input)) {\n\t\t\t\tcase CURVE_STEPPED:\n\t\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\t\tbreak;\n\t\t\t\tcase CURVE_BEZIER:\n\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n\t\t\t}\n\t\t\ttime = time2;\n\t\t\tmixRotate = mixRotate2;\n\t\t\tmixX = mixX2;\n\t\t\tmixY = mixY2;\n\t\t\tmixScaleX = mixScaleX2;\n\t\t\tmixScaleY = mixScaleY2;\n\t\t\tmixShearY = mixShearY2;\n\t\t}\n\t\ttimelines.add(timeline);\n\t}\n\n\t// Path constraint timelines.\n\tfor (int i = 0, n = readVarint(input, true); i < n; ++i) {\n\t\tint index = readVarint(input, true);\n\t\tPathConstraintData *data = skeletonData->_pathConstraints[index];\n\t\tfor (int ii = 0, nn = readVarint(input, true); ii < nn; ii++) {\n\t\t\tint type = readByte(input);\n\t\t\tint frameCount = readVarint(input, true);\n\t\t\tint bezierCount = readVarint(input, true);\n\t\t\tswitch (type) {\n\t\t\t\tcase PATH_POSITION: {\n\t\t\t\t\treadTimeline(input, timelines, new PathConstraintPositionTimeline(frameCount, bezierCount, index),\n\t\t\t\t\t\t\t\t data->_positionMode == PositionMode_Fixed ? scale : 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_SPACING: {\n\t\t\t\t\treadTimeline(input, timelines,\n\t\t\t\t\t\t\t\t new PathConstraintSpacingTimeline(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   bezierCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   index),\n\t\t\t\t\t\t\t\t data->_spacingMode == SpacingMode_Length ||\n\t\t\t\t\t\t\t\t\t\t\t\t data->_spacingMode == SpacingMode_Fixed\n\t\t\t\t\t\t\t\t\t\t ? scale\n\t\t\t\t\t\t\t\t\t\t : 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_MIX:\n\t\t\t\t\tPathConstraintMixTimeline *timeline = new PathConstraintMixTimeline(frameCount, bezierCount, index);\n\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\tfloat mixRotate = readFloat(input);\n\t\t\t\t\tfloat mixX = readFloat(input);\n\t\t\t\t\tfloat mixY = readFloat(input);\n\t\t\t\t\tfor (int frame = 0, bezier = 0, frameLast = (int) timeline->getFrameCount() - 1;; frame++) {\n\t\t\t\t\t\ttimeline->setFrame(frame, time, mixRotate, mixX, mixY);\n\t\t\t\t\t\tif (frame == frameLast) break;\n\t\t\t\t\t\tfloat time2 = readFloat(input);\n\t\t\t\t\t\tfloat mixRotate2 = readFloat(input);\n\t\t\t\t\t\tfloat mixX2 = readFloat(input);\n\t\t\t\t\t\tfloat mixY2 = readFloat(input);\n\t\t\t\t\t\tswitch (readSByte(input)) {\n\t\t\t\t\t\t\tcase CURVE_STEPPED:\n\t\t\t\t\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase CURVE_BEZIER:\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttime = time2;\n\t\t\t\t\t\tmixRotate = mixRotate2;\n\t\t\t\t\t\tmixX = mixX2;\n\t\t\t\t\t\tmixY = mixY2;\n\t\t\t\t\t}\n\t\t\t\t\ttimelines.add(timeline);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Physics timelines.\n\tfor (int i = 0, n = readVarint(input, true); i < n; i++) {\n\t\tint index = readVarint(input, true) - 1;\n\t\tfor (int ii = 0, nn = readVarint(input, true); ii < nn; ii++) {\n\t\t\tint type = readByte(input);\n\t\t\tint frameCount = readVarint(input, true);\n\t\t\tif (type == PHYSICS_RESET) {\n\t\t\t\tPhysicsConstraintResetTimeline *timeline = new (__FILE__, __LINE__) PhysicsConstraintResetTimeline(frameCount, index);\n\t\t\t\tfor (int frame = 0; frame < frameCount; frame++)\n\t\t\t\t\ttimeline->setFrame(frame, readFloat(input));\n\t\t\t\ttimelines.add(timeline);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tint bezierCount = readVarint(input, true);\n\t\t\tswitch (type) {\n\t\t\t\tcase PHYSICS_INERTIA:\n\t\t\t\t\treadTimeline(input, timelines, new PhysicsConstraintInertiaTimeline(frameCount, bezierCount, index), 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PHYSICS_STRENGTH:\n\t\t\t\t\treadTimeline(input, timelines, new PhysicsConstraintStrengthTimeline(frameCount, bezierCount, index), 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PHYSICS_DAMPING:\n\t\t\t\t\treadTimeline(input, timelines, new PhysicsConstraintDampingTimeline(frameCount, bezierCount, index), 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PHYSICS_MASS:\n\t\t\t\t\treadTimeline(input, timelines, new PhysicsConstraintMassTimeline(frameCount, bezierCount, index), 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PHYSICS_WIND:\n\t\t\t\t\treadTimeline(input, timelines, new PhysicsConstraintWindTimeline(frameCount, bezierCount, index), 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PHYSICS_GRAVITY:\n\t\t\t\t\treadTimeline(input, timelines, new PhysicsConstraintGravityTimeline(frameCount, bezierCount, index), 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PHYSICS_MIX:\n\t\t\t\t\treadTimeline(input, timelines, new PhysicsConstraintMixTimeline(frameCount, bezierCount, index), 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Attachment timelines.\n\tfor (int i = 0, n = readVarint(input, true); i < n; ++i) {\n\t\tSkin *skin = skeletonData->_skins[readVarint(input, true)];\n\t\tfor (int ii = 0, nn = readVarint(input, true); ii < nn; ++ii) {\n\t\t\tint slotIndex = readVarint(input, true);\n\t\t\tfor (int iii = 0, nnn = readVarint(input, true); iii < nnn; iii++) {\n\t\t\t\tconst char *attachmentName = readStringRef(input, skeletonData);\n\t\t\t\tAttachment *baseAttachment = skin->getAttachment(slotIndex, String(attachmentName));\n\t\t\t\tif (!baseAttachment) {\n\t\t\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\t\t\tsetError(\"Attachment not found: \", attachmentName);\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\t\t\t\tunsigned int timelineType = readByte(input);\n\t\t\t\tint frameCount = readVarint(input, true);\n\t\t\t\tint frameLast = frameCount - 1;\n\n\t\t\t\tswitch (timelineType) {\n\t\t\t\t\tcase ATTACHMENT_DEFORM: {\n\t\t\t\t\t\tVertexAttachment *attachment = static_cast<VertexAttachment *>(baseAttachment);\n\t\t\t\t\t\tbool weighted = attachment->_bones.size() > 0;\n\t\t\t\t\t\tVector<float> &vertices = attachment->_vertices;\n\t\t\t\t\t\tint deformLength = weighted ? (int) vertices.size() / 3 * 2 : (int) vertices.size();\n\n\t\t\t\t\t\tint bezierCount = readVarint(input, true);\n\t\t\t\t\t\tDeformTimeline *timeline = new (__FILE__, __LINE__) DeformTimeline(frameCount, bezierCount, slotIndex,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   attachment);\n\n\t\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\t\tfor (int frame = 0, bezier = 0;; ++frame) {\n\t\t\t\t\t\t\tVector<float> deform;\n\t\t\t\t\t\t\tsize_t end = (size_t) readVarint(input, true);\n\t\t\t\t\t\t\tif (end == 0) {\n\t\t\t\t\t\t\t\tif (weighted) {\n\t\t\t\t\t\t\t\t\tdeform.setSize(deformLength, 0);\n\t\t\t\t\t\t\t\t\tfor (int iiii = 0; iiii < deformLength; ++iiii)\n\t\t\t\t\t\t\t\t\t\tdeform[iiii] = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdeform.clearAndAddAll(vertices);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdeform.setSize(deformLength, 0);\n\t\t\t\t\t\t\t\tsize_t start = (size_t) readVarint(input, true);\n\t\t\t\t\t\t\t\tend += start;\n\t\t\t\t\t\t\t\tif (scale == 1) {\n\t\t\t\t\t\t\t\t\tfor (size_t v = start; v < end; ++v)\n\t\t\t\t\t\t\t\t\t\tdeform[v] = readFloat(input);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfor (size_t v = start; v < end; ++v)\n\t\t\t\t\t\t\t\t\t\tdeform[v] = readFloat(input) * scale;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (!weighted) {\n\t\t\t\t\t\t\t\t\tfor (size_t v = 0, vn = deform.size(); v < vn; ++v)\n\t\t\t\t\t\t\t\t\t\tdeform[v] += vertices[v];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\ttimeline->setFrame(frame, time, deform);\n\t\t\t\t\t\t\tif (frame == frameLast) break;\n\t\t\t\t\t\t\tfloat time2 = readFloat(input);\n\t\t\t\t\t\t\tswitch (readSByte(input)) {\n\t\t\t\t\t\t\t\tcase CURVE_STEPPED:\n\t\t\t\t\t\t\t\t\ttimeline->setStepped(frame);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase CURVE_BEZIER:\n\t\t\t\t\t\t\t\t\tsetBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttime = time2;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase ATTACHMENT_SEQUENCE: {\n\t\t\t\t\t\tSequenceTimeline *timeline = new (__FILE__, __LINE__) SequenceTimeline(frameCount, slotIndex, baseAttachment);\n\t\t\t\t\t\tfor (int frame = 0; frame < frameCount; frame++) {\n\t\t\t\t\t\t\tfloat time = readFloat(input);\n\t\t\t\t\t\t\tint modeAndIndex = readInt(input);\n\t\t\t\t\t\t\tfloat delay = readFloat(input);\n\t\t\t\t\t\t\ttimeline->setFrame(frame, time, (spine::SequenceMode)(modeAndIndex & 0xf), modeAndIndex >> 4, delay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Draw order timeline.\n\tsize_t drawOrderCount = (size_t) readVarint(input, true);\n\tif (drawOrderCount > 0) {\n\t\tDrawOrderTimeline *timeline = new (__FILE__, __LINE__) DrawOrderTimeline(drawOrderCount);\n\n\t\tsize_t slotCount = skeletonData->_slots.size();\n\t\tfor (size_t i = 0; i < drawOrderCount; ++i) {\n\t\t\tfloat time = readFloat(input);\n\t\t\tsize_t offsetCount = (size_t) readVarint(input, true);\n\n\t\t\tVector<int> drawOrder;\n\t\t\tdrawOrder.setSize(slotCount, 0);\n\t\t\tfor (int ii = (int) slotCount - 1; ii >= 0; --ii)\n\t\t\t\tdrawOrder[ii] = -1;\n\n\t\t\tVector<int> unchanged;\n\t\t\tunchanged.setSize(slotCount - offsetCount, 0);\n\t\t\tsize_t originalIndex = 0, unchangedIndex = 0;\n\t\t\tfor (size_t ii = 0; ii < offsetCount; ++ii) {\n\t\t\t\tsize_t slotIndex = (size_t) readVarint(input, true);\n\t\t\t\t// Collect unchanged items.\n\t\t\t\twhile (originalIndex != slotIndex)\n\t\t\t\t\tunchanged[unchangedIndex++] = (int) originalIndex++;\n\t\t\t\t// Set changed items.\n\t\t\t\tsize_t index = originalIndex;\n\t\t\t\tdrawOrder[index + (size_t) readVarint(input, true)] = (int) originalIndex++;\n\t\t\t}\n\n\t\t\t// Collect remaining unchanged items.\n\t\t\twhile (originalIndex < slotCount) {\n\t\t\t\tunchanged[unchangedIndex++] = (int) originalIndex++;\n\t\t\t}\n\n\t\t\t// Fill in unchanged items.\n\t\t\tfor (int ii = (int) slotCount - 1; ii >= 0; --ii)\n\t\t\t\tif (drawOrder[ii] == -1) drawOrder[ii] = unchanged[--unchangedIndex];\n\t\t\ttimeline->setFrame(i, time, drawOrder);\n\t\t}\n\t\ttimelines.add(timeline);\n\t}\n\n\t// Event timeline.\n\tint eventCount = readVarint(input, true);\n\tif (eventCount > 0) {\n\t\tEventTimeline *timeline = new (__FILE__, __LINE__) EventTimeline(eventCount);\n\n\t\tfor (int i = 0; i < eventCount; ++i) {\n\t\t\tfloat time = readFloat(input);\n\t\t\tEventData *eventData = skeletonData->_events[readVarint(input, true)];\n\t\t\tEvent *event = new (__FILE__, __LINE__) Event(time, *eventData);\n\n\t\t\tevent->_intValue = readVarint(input, false);\n\t\t\tevent->_floatValue = readFloat(input);\n\t\t\tconst char *event_stringValue = readString(input);\n\t\t\tif (event_stringValue == nullptr) {\n\t\t\t\tevent->_stringValue = eventData->_stringValue;\n\t\t\t} else {\n\t\t\t\tevent->_stringValue = String(event_stringValue);\n\t\t\t\tSpineExtension::free(event_stringValue, __FILE__, __LINE__);\n\t\t\t}\n\n\t\t\tif (!eventData->_audioPath.isEmpty()) {\n\t\t\t\tevent->_volume = readFloat(input);\n\t\t\t\tevent->_balance = readFloat(input);\n\t\t\t}\n\t\t\ttimeline->setFrame(i, event);\n\t\t}\n\t\ttimelines.add(timeline);\n\t}\n\n\tfloat duration = 0;\n\tfor (int i = 0, n = (int) timelines.size(); i < n; i++) {\n\t\tduration = MathUtil::max(duration, (timelines[i])->getDuration());\n\t}\n\treturn new (__FILE__, __LINE__) Animation(String(name), timelines, duration);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/SkeletonBounds.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/SkeletonBounds.h>\n\n#include <spine/Bone.h>\n#include <spine/BoundingBoxAttachment.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Slot.h>\n\n#include <float.h>\n\nusing namespace spine;\n\nSkeletonBounds::SkeletonBounds() : _minX(0), _minY(0), _maxX(0), _maxY(0) {\n}\n\nSkeletonBounds::~SkeletonBounds() {\n\tfor (size_t i = 0, n = _polygons.size(); i < n; i++)\n\t\t_polygonPool.free(_polygons[i]);\n\t_polygons.clear();\n}\n\nvoid SkeletonBounds::update(Skeleton &skeleton, bool updateAabb) {\n\tVector<Slot *> &slots = skeleton.getSlots();\n\tsize_t slotCount = slots.size();\n\n\t_boundingBoxes.clear();\n\tfor (size_t i = 0, n = _polygons.size(); i < n; ++i) {\n\t\t_polygonPool.free(_polygons[i]);\n\t}\n\n\t_polygons.clear();\n\n\tfor (size_t i = 0; i < slotCount; i++) {\n\t\tSlot *slot = slots[i];\n\t\tif (!slot->getBone().isActive()) continue;\n\n\t\tAttachment *attachment = slot->getAttachment();\n\t\tif (attachment == NULL || !attachment->getRTTI().instanceOf(BoundingBoxAttachment::rtti)) continue;\n\t\tBoundingBoxAttachment *boundingBox = static_cast<BoundingBoxAttachment *>(attachment);\n\t\t_boundingBoxes.add(boundingBox);\n\n\t\tspine::Polygon *polygonP = _polygonPool.obtain();\n\t\t_polygons.add(polygonP);\n\n\t\tPolygon &polygon = *polygonP;\n\n\t\tsize_t count = boundingBox->getWorldVerticesLength();\n\t\tpolygon._count = (int) count;\n\t\tif (polygon._vertices.size() < count) {\n\t\t\tpolygon._vertices.setSize(count, 0);\n\t\t}\n\t\tboundingBox->computeWorldVertices(*slot, polygon._vertices);\n\t}\n\n\tif (updateAabb)\n\t\taabbCompute();\n\telse {\n\t\t_minX = FLT_MIN;\n\t\t_minY = FLT_MIN;\n\t\t_maxX = FLT_MAX;\n\t\t_maxY = FLT_MAX;\n\t}\n}\n\nbool SkeletonBounds::aabbcontainsPoint(float x, float y) {\n\treturn x >= _minX && x <= _maxX && y >= _minY && y <= _maxY;\n}\n\nbool SkeletonBounds::aabbintersectsSegment(float x1, float y1, float x2, float y2) {\n\tfloat minX = _minX;\n\tfloat minY = _minY;\n\tfloat maxX = _maxX;\n\tfloat maxY = _maxY;\n\n\tif ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) ||\n\t\t(y1 >= maxY && y2 >= maxY)) {\n\t\treturn false;\n\t}\n\n\tfloat m = (y2 - y1) / (x2 - x1);\n\tfloat y = m * (minX - x1) + y1;\n\tif (y > minY && y < maxY) return true;\n\ty = m * (maxX - x1) + y1;\n\tif (y > minY && y < maxY) return true;\n\tfloat x = (minY - y1) / m + x1;\n\tif (x > minX && x < maxX) return true;\n\tx = (maxY - y1) / m + x1;\n\tif (x > minX && x < maxX) return true;\n\treturn false;\n}\n\nbool SkeletonBounds::aabbIntersectsSkeleton(SkeletonBounds &bounds) {\n\treturn _minX < bounds._maxX && _maxX > bounds._minX && _minY < bounds._maxY && _maxY > bounds._minY;\n}\n\nbool SkeletonBounds::containsPoint(spine::Polygon *polygon, float x, float y) {\n\tVector<float> &vertices = polygon->_vertices;\n\tint nn = polygon->_count;\n\n\tint prevIndex = nn - 2;\n\tbool inside = false;\n\tfor (int ii = 0; ii < nn; ii += 2) {\n\t\tfloat vertexY = vertices[ii + 1];\n\t\tfloat prevY = vertices[prevIndex + 1];\n\t\tif ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\n\t\t\tfloat vertexX = vertices[ii];\n\t\t\tif (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) {\n\t\t\t\tinside = !inside;\n\t\t\t}\n\t\t}\n\t\tprevIndex = ii;\n\t}\n\treturn inside;\n}\n\nBoundingBoxAttachment *SkeletonBounds::containsPoint(float x, float y) {\n\tfor (size_t i = 0, n = _polygons.size(); i < n; ++i)\n\t\tif (containsPoint(_polygons[i], x, y)) return _boundingBoxes[i];\n\treturn NULL;\n}\n\nBoundingBoxAttachment *SkeletonBounds::intersectsSegment(float x1, float y1, float x2, float y2) {\n\tfor (size_t i = 0, n = _polygons.size(); i < n; ++i)\n\t\tif (intersectsSegment(_polygons[i], x1, y1, x2, y2)) return _boundingBoxes[i];\n\treturn NULL;\n}\n\nbool SkeletonBounds::intersectsSegment(spine::Polygon *polygon, float x1, float y1, float x2, float y2) {\n\tVector<float> &vertices = polygon->_vertices;\n\tsize_t nn = polygon->_count;\n\n\tfloat width12 = x1 - x2, height12 = y1 - y2;\n\tfloat det1 = x1 * y2 - y1 * x2;\n\tfloat x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n\tfor (size_t ii = 0; ii < nn; ii += 2) {\n\t\tfloat x4 = vertices[ii], y4 = vertices[ii + 1];\n\t\tfloat det2 = x3 * y4 - y3 * x4;\n\t\tfloat width34 = x3 - x4, height34 = y3 - y4;\n\t\tfloat det3 = width12 * height34 - height12 * width34;\n\t\tfloat x = (det1 * width34 - width12 * det2) / det3;\n\t\tif (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\n\t\t\tfloat y = (det1 * height34 - height12 * det2) / det3;\n\t\t\tif (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tx3 = x4;\n\t\ty3 = y4;\n\t}\n\n\treturn false;\n}\n\nspine::Polygon *SkeletonBounds::getPolygon(BoundingBoxAttachment *attachment) {\n\tint index = _boundingBoxes.indexOf(attachment);\n\treturn index == -1 ? NULL : _polygons[index];\n}\n\nBoundingBoxAttachment *SkeletonBounds::getBoundingBox(Polygon *polygon) {\n\tint index = _polygons.indexOf(polygon);\n\treturn index == -1 ? NULL : _boundingBoxes[index];\n}\n\nVector<spine::Polygon *> &SkeletonBounds::getPolygons() {\n\treturn _polygons;\n}\n\nVector<BoundingBoxAttachment *> &SkeletonBounds::getBoundingBoxes() {\n\treturn _boundingBoxes;\n}\n\nfloat SkeletonBounds::getWidth() {\n\treturn _maxX - _minX;\n}\n\nfloat SkeletonBounds::getHeight() {\n\treturn _maxY - _minY;\n}\n\nvoid SkeletonBounds::aabbCompute() {\n\tfloat minX = FLT_MAX;\n\tfloat minY = FLT_MAX;\n\tfloat maxX = FLT_MIN;\n\tfloat maxY = FLT_MIN;\n\n\tfor (size_t i = 0, n = _polygons.size(); i < n; ++i) {\n\t\tspine::Polygon *polygon = _polygons[i];\n\t\tVector<float> &vertices = polygon->_vertices;\n\t\tfor (int ii = 0, nn = polygon->_count; ii < nn; ii += 2) {\n\t\t\tfloat x = vertices[ii];\n\t\t\tfloat y = vertices[ii + 1];\n\t\t\tminX = MathUtil::min(minX, x);\n\t\t\tminY = MathUtil::min(minY, y);\n\t\t\tmaxX = MathUtil::max(maxX, x);\n\t\t\tmaxY = MathUtil::max(maxY, y);\n\t\t}\n\t}\n\t_minX = minX;\n\t_minY = minY;\n\t_maxX = maxX;\n\t_maxY = maxY;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/SkeletonClipping.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/SkeletonClipping.h>\n\n#include <spine/ClippingAttachment.h>\n#include <spine/Slot.h>\n\nusing namespace spine;\n\nSkeletonClipping::SkeletonClipping() : _clipAttachment(NULL) {\n\t_clipOutput.ensureCapacity(128);\n\t_clippedVertices.ensureCapacity(128);\n\t_clippedTriangles.ensureCapacity(128);\n\t_clippedUVs.ensureCapacity(128);\n}\n\nsize_t SkeletonClipping::clipStart(Slot &slot, ClippingAttachment *clip) {\n\tif (_clipAttachment != NULL) {\n\t\treturn 0;\n\t}\n\n\t_clipAttachment = clip;\n\n\tint n = (int) clip->getWorldVerticesLength();\n\t_clippingPolygon.setSize(n, 0);\n\tclip->computeWorldVertices(slot, 0, n, _clippingPolygon, 0, 2);\n\tmakeClockwise(_clippingPolygon);\n\t_clippingPolygons = &_triangulator.decompose(_clippingPolygon, _triangulator.triangulate(_clippingPolygon));\n\n\tfor (size_t i = 0; i < _clippingPolygons->size(); ++i) {\n\t\tVector<float> *polygonP = (*_clippingPolygons)[i];\n\t\tVector<float> &polygon = *polygonP;\n\t\tmakeClockwise(polygon);\n\t\tpolygon.add(polygon[0]);\n\t\tpolygon.add(polygon[1]);\n\t}\n\n\treturn (*_clippingPolygons).size();\n}\n\nvoid SkeletonClipping::clipEnd(Slot &slot) {\n\tif (_clipAttachment != NULL && _clipAttachment->_endSlot == &slot._data) {\n\t\tclipEnd();\n\t}\n}\n\nvoid SkeletonClipping::clipEnd() {\n\tif (_clipAttachment == NULL) return;\n\n\t_clipAttachment = NULL;\n\t_clippingPolygons = NULL;\n\t_clippedVertices.clear();\n\t_clippedUVs.clear();\n\t_clippedTriangles.clear();\n\t_clippingPolygon.clear();\n}\n\nvoid SkeletonClipping::clipTriangles(float *vertices, unsigned short *triangles,\n\t\t\t\t\t\t\t\t\t size_t trianglesLength) {\n\tVector<float> &clipOutput = _clipOutput;\n\tVector<float> &clippedVertices = _clippedVertices;\n\tVector<unsigned short> &clippedTriangles = _clippedTriangles;\n\tVector<Vector<float> *> &polygons = *_clippingPolygons;\n\tsize_t polygonsCount = (*_clippingPolygons).size();\n\n\tsize_t index = 0;\n\tclippedVertices.clear();\n\t_clippedUVs.clear();\n\tclippedTriangles.clear();\n\n\tint stride = 2;\n\tsize_t i = 0;\ncontinue_outer:\n\tfor (; i < trianglesLength; i += 3) {\n\t\tint vertexOffset = triangles[i] * stride;\n\t\tfloat x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n\n\t\tvertexOffset = triangles[i + 1] * stride;\n\t\tfloat x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n\n\t\tvertexOffset = triangles[i + 2] * stride;\n\t\tfloat x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n\n\t\tfor (size_t p = 0; p < polygonsCount; p++) {\n\t\t\tsize_t s = clippedVertices.size();\n\t\t\tif (clip(x1, y1, x2, y2, x3, y3, &(*polygons[p]), &clipOutput)) {\n\t\t\t\tsize_t clipOutputLength = clipOutput.size();\n\t\t\t\tif (clipOutputLength == 0) continue;\n\n\t\t\t\tsize_t clipOutputCount = clipOutputLength >> 1;\n\t\t\t\tclippedVertices.setSize(s + clipOutputCount * 2, 0);\n\t\t\t\tfor (size_t ii = 0; ii < clipOutputLength; ii += 2) {\n\t\t\t\t\tfloat x = clipOutput[ii], y = clipOutput[ii + 1];\n\t\t\t\t\tclippedVertices[s] = x;\n\t\t\t\t\tclippedVertices[s + 1] = y;\n\t\t\t\t\ts += 2;\n\t\t\t\t}\n\n\t\t\t\ts = clippedTriangles.size();\n\t\t\t\tclippedTriangles.setSize(s + 3 * (clipOutputCount - 2), 0);\n\t\t\t\tclipOutputCount--;\n\t\t\t\tfor (size_t ii = 1; ii < clipOutputCount; ii++) {\n\t\t\t\t\tclippedTriangles[s] = (unsigned short) (index);\n\t\t\t\t\tclippedTriangles[s + 1] = (unsigned short) (index + ii);\n\t\t\t\t\tclippedTriangles[s + 2] = (unsigned short) (index + ii + 1);\n\t\t\t\t\ts += 3;\n\t\t\t\t}\n\t\t\t\tindex += clipOutputCount + 1;\n\t\t\t} else {\n\t\t\t\tclippedVertices.setSize(s + 3 * 2, 0);\n\t\t\t\tclippedVertices[s] = x1;\n\t\t\t\tclippedVertices[s + 1] = y1;\n\t\t\t\tclippedVertices[s + 2] = x2;\n\t\t\t\tclippedVertices[s + 3] = y2;\n\t\t\t\tclippedVertices[s + 4] = x3;\n\t\t\t\tclippedVertices[s + 5] = y3;\n\n\t\t\t\ts = clippedTriangles.size();\n\t\t\t\tclippedTriangles.setSize(s + 3, 0);\n\t\t\t\tclippedTriangles[s] = (unsigned short) index;\n\t\t\t\tclippedTriangles[s + 1] = (unsigned short) (index + 1);\n\t\t\t\tclippedTriangles[s + 2] = (unsigned short) (index + 2);\n\t\t\t\tindex += 3;\n\t\t\t\ti += 3;\n\t\t\t\tgoto continue_outer;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid SkeletonClipping::clipTriangles(Vector<float> &vertices, Vector<unsigned short> &triangles, Vector<float> &uvs,\n\t\t\t\t\t\t\t\t\t size_t stride) {\n\tclipTriangles(vertices.buffer(), triangles.buffer(), triangles.size(), uvs.buffer(), stride);\n}\n\nvoid SkeletonClipping::clipTriangles(float *vertices, unsigned short *triangles,\n\t\t\t\t\t\t\t\t\t size_t trianglesLength, float *uvs, size_t stride) {\n\tVector<float> &clipOutput = _clipOutput;\n\tVector<float> &clippedVertices = _clippedVertices;\n\tVector<unsigned short> &clippedTriangles = _clippedTriangles;\n\tVector<Vector<float> *> &polygons = *_clippingPolygons;\n\tsize_t polygonsCount = (*_clippingPolygons).size();\n\n\tsize_t index = 0;\n\tclippedVertices.clear();\n\t_clippedUVs.clear();\n\tclippedTriangles.clear();\n\n\tsize_t i = 0;\ncontinue_outer:\n\tfor (; i < trianglesLength; i += 3) {\n\t\tint vertexOffset = triangles[i] * (int) stride;\n\t\tfloat x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n\t\tfloat u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n\n\t\tvertexOffset = triangles[i + 1] * (int) stride;\n\t\tfloat x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n\t\tfloat u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n\n\t\tvertexOffset = triangles[i + 2] * (int) stride;\n\t\tfloat x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n\t\tfloat u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n\n\t\tfor (size_t p = 0; p < polygonsCount; p++) {\n\t\t\tsize_t s = clippedVertices.size();\n\t\t\tif (clip(x1, y1, x2, y2, x3, y3, &(*polygons[p]), &clipOutput)) {\n\t\t\t\tsize_t clipOutputLength = clipOutput.size();\n\t\t\t\tif (clipOutputLength == 0) continue;\n\t\t\t\tfloat d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n\t\t\t\tfloat d = 1 / (d0 * d2 + d1 * (y1 - y3));\n\n\t\t\t\tsize_t clipOutputCount = clipOutputLength >> 1;\n\t\t\t\tclippedVertices.setSize(s + clipOutputCount * 2, 0);\n\t\t\t\t_clippedUVs.setSize(s + clipOutputCount * 2, 0);\n\t\t\t\tfor (size_t ii = 0; ii < clipOutputLength; ii += 2) {\n\t\t\t\t\tfloat x = clipOutput[ii], y = clipOutput[ii + 1];\n\t\t\t\t\tclippedVertices[s] = x;\n\t\t\t\t\tclippedVertices[s + 1] = y;\n\t\t\t\t\tfloat c0 = x - x3, c1 = y - y3;\n\t\t\t\t\tfloat a = (d0 * c0 + d1 * c1) * d;\n\t\t\t\t\tfloat b = (d4 * c0 + d2 * c1) * d;\n\t\t\t\t\tfloat c = 1 - a - b;\n\t\t\t\t\t_clippedUVs[s] = u1 * a + u2 * b + u3 * c;\n\t\t\t\t\t_clippedUVs[s + 1] = v1 * a + v2 * b + v3 * c;\n\t\t\t\t\ts += 2;\n\t\t\t\t}\n\n\t\t\t\ts = clippedTriangles.size();\n\t\t\t\tclippedTriangles.setSize(s + 3 * (clipOutputCount - 2), 0);\n\t\t\t\tclipOutputCount--;\n\t\t\t\tfor (size_t ii = 1; ii < clipOutputCount; ii++) {\n\t\t\t\t\tclippedTriangles[s] = (unsigned short) (index);\n\t\t\t\t\tclippedTriangles[s + 1] = (unsigned short) (index + ii);\n\t\t\t\t\tclippedTriangles[s + 2] = (unsigned short) (index + ii + 1);\n\t\t\t\t\ts += 3;\n\t\t\t\t}\n\t\t\t\tindex += clipOutputCount + 1;\n\t\t\t} else {\n\t\t\t\tclippedVertices.setSize(s + 3 * 2, 0);\n\t\t\t\t_clippedUVs.setSize(s + 3 * 2, 0);\n\t\t\t\tclippedVertices[s] = x1;\n\t\t\t\tclippedVertices[s + 1] = y1;\n\t\t\t\tclippedVertices[s + 2] = x2;\n\t\t\t\tclippedVertices[s + 3] = y2;\n\t\t\t\tclippedVertices[s + 4] = x3;\n\t\t\t\tclippedVertices[s + 5] = y3;\n\n\t\t\t\t_clippedUVs[s] = u1;\n\t\t\t\t_clippedUVs[s + 1] = v1;\n\t\t\t\t_clippedUVs[s + 2] = u2;\n\t\t\t\t_clippedUVs[s + 3] = v2;\n\t\t\t\t_clippedUVs[s + 4] = u3;\n\t\t\t\t_clippedUVs[s + 5] = v3;\n\n\t\t\t\ts = clippedTriangles.size();\n\t\t\t\tclippedTriangles.setSize(s + 3, 0);\n\t\t\t\tclippedTriangles[s] = (unsigned short) index;\n\t\t\t\tclippedTriangles[s + 1] = (unsigned short) (index + 1);\n\t\t\t\tclippedTriangles[s + 2] = (unsigned short) (index + 2);\n\t\t\t\tindex += 3;\n\t\t\t\ti += 3;\n\t\t\t\tgoto continue_outer;\n\t\t\t}\n\t\t}\n\t}\n}\n\nbool SkeletonClipping::isClipping() {\n\treturn _clipAttachment != NULL;\n}\n\nVector<float> &SkeletonClipping::getClippedVertices() {\n\treturn _clippedVertices;\n}\n\nVector<unsigned short> &SkeletonClipping::getClippedTriangles() {\n\treturn _clippedTriangles;\n}\n\nVector<float> &SkeletonClipping::getClippedUVs() {\n\treturn _clippedUVs;\n}\n\nbool SkeletonClipping::clip(float x1, float y1, float x2, float y2, float x3, float y3, Vector<float> *clippingArea,\n\t\t\t\t\t\t\tVector<float> *output) {\n\tVector<float> *originalOutput = output;\n\tbool clipped = false;\n\n\t// Avoid copy at the end.\n\tVector<float> *input;\n\tif (clippingArea->size() % 4 >= 2) {\n\t\tinput = output;\n\t\toutput = &_scratch;\n\t} else\n\t\tinput = &_scratch;\n\n\tinput->clear();\n\tinput->add(x1);\n\tinput->add(y1);\n\tinput->add(x2);\n\tinput->add(y2);\n\tinput->add(x3);\n\tinput->add(y3);\n\tinput->add(x1);\n\tinput->add(y1);\n\toutput->clear();\n\n\tsize_t clippingVerticesLast = clippingArea->size() - 4;\n\tVector<float> &clippingVertices = *clippingArea;\n\tfor (size_t i = 0;; i += 2) {\n\t\tfloat edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n\t\tfloat ex = edgeX - clippingVertices[i + 2], ey = edgeY - clippingVertices[i + 3];\n\n\t\tsize_t outputStart = output->size();\n\t\tVector<float> &inputVertices = *input;\n\t\tfor (size_t ii = 0, nn = input->size() - 2; ii < nn;) {\n\t\t\tfloat inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n\t\t\tii += 2;\n\t\t\tfloat inputX2 = inputVertices[ii], inputY2 = inputVertices[ii + 1];\n\t\t\tfloat s2 = ey * (edgeX - inputX2) > ex * (edgeY - inputY2);\n\t\t\tfloat s1 = ey * (edgeX - inputX) - ex * (edgeY - inputY);\n\t\t\tif (s1 > 0) {\n\t\t\t\tif (s2) {// v1 inside, v2 inside\n\t\t\t\t\toutput->add(inputX2);\n\t\t\t\t\toutput->add(inputY2);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// v1 inside, v2 outside\n\t\t\t\tfloat ix = inputX2 - inputX, iy = inputY2 - inputY, t = s1 / (ix * ey - iy * ex);\n\t\t\t\tif (t >= 0 && t <= 1) {\n\t\t\t\t\toutput->add(inputX + ix * t);\n\t\t\t\t\toutput->add(inputY + iy * t);\n\t\t\t\t} else {\n\t\t\t\t\toutput->add(inputX2);\n\t\t\t\t\toutput->add(inputY2);\n\t\t\t\t}\n\t\t\t} else if (s2) {// v1 outside, v2 inside\n\t\t\t\tfloat ix = inputX2 - inputX, iy = inputY2 - inputY, t = s1 / (ix * ey - iy * ex);\n\t\t\t\tif (t >= 0 && t <= 1) {\n\t\t\t\t\toutput->add(inputX + ix * t);\n\t\t\t\t\toutput->add(inputY + iy * t);\n\t\t\t\t\toutput->add(inputX2);\n\t\t\t\t\toutput->add(inputY2);\n\t\t\t\t} else {\n\t\t\t\t\toutput->add(inputX2);\n\t\t\t\t\toutput->add(inputY2);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclipped = true;\n\t\t}\n\n\n\t\tif (outputStart == output->size()) {\n\t\t\t// All edges outside.\n\t\t\toriginalOutput->clear();\n\t\t\treturn true;\n\t\t}\n\n\t\toutput->add((*output)[0]);\n\t\toutput->add((*output)[1]);\n\n\t\tif (i == clippingVerticesLast) {\n\t\t\tbreak;\n\t\t}\n\t\tVector<float> *temp = output;\n\t\toutput = input;\n\t\toutput->clear();\n\t\tinput = temp;\n\t}\n\n\tif (originalOutput != output) {\n\t\toriginalOutput->clear();\n\t\tfor (size_t i = 0, n = output->size() - 2; i < n; ++i)\n\t\t\toriginalOutput->add((*output)[i]);\n\t} else\n\t\toriginalOutput->setSize(originalOutput->size() - 2, 0);\n\n\tif (originalOutput->size() < 6) {\n\t\toriginalOutput->clear();\n\t\treturn false;\n\t}\n\treturn clipped;\n}\n\nvoid SkeletonClipping::makeClockwise(Vector<float> &polygon) {\n\tsize_t verticeslength = polygon.size();\n\n\tfloat area = polygon[verticeslength - 2] * polygon[1] - polygon[0] * polygon[verticeslength - 1];\n\tfloat p1x, p1y, p2x, p2y;\n\n\tfor (size_t i = 0, n = verticeslength - 3; i < n; i += 2) {\n\t\tp1x = polygon[i];\n\t\tp1y = polygon[i + 1];\n\t\tp2x = polygon[i + 2];\n\t\tp2y = polygon[i + 3];\n\t\tarea += p1x * p2y - p2x * p1y;\n\t}\n\n\tif (area < 0) return;\n\n\tfor (size_t i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n\t\tfloat x = polygon[i], y = polygon[i + 1];\n\t\tint other = (int) (lastX - i);\n\t\tpolygon[i] = polygon[other];\n\t\tpolygon[i + 1] = polygon[other + 1];\n\t\tpolygon[other] = x;\n\t\tpolygon[other + 1] = y;\n\t}\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/SkeletonData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/SkeletonData.h>\n\n#include <spine/Animation.h>\n#include <spine/BoneData.h>\n#include <spine/EventData.h>\n#include <spine/IkConstraintData.h>\n#include <spine/PathConstraintData.h>\n#include <spine/PhysicsConstraintData.h>\n#include <spine/Skin.h>\n#include <spine/SlotData.h>\n#include <spine/TransformConstraintData.h>\n\n#include <spine/ContainerUtil.h>\n\nusing namespace spine;\n\nSkeletonData::SkeletonData() : _name(),\n\t\t\t\t\t\t\t   _defaultSkin(NULL),\n\t\t\t\t\t\t\t   _x(0),\n\t\t\t\t\t\t\t   _y(0),\n\t\t\t\t\t\t\t   _width(0),\n\t\t\t\t\t\t\t   _height(0),\n\t\t\t\t\t\t\t   _referenceScale(100),\n\t\t\t\t\t\t\t   _version(),\n\t\t\t\t\t\t\t   _hash(),\n\t\t\t\t\t\t\t   _fps(0),\n\t\t\t\t\t\t\t   _imagesPath() {\n}\n\nSkeletonData::~SkeletonData() {\n\tContainerUtil::cleanUpVectorOfPointers(_bones);\n\tContainerUtil::cleanUpVectorOfPointers(_slots);\n\tContainerUtil::cleanUpVectorOfPointers(_skins);\n\n\t_defaultSkin = NULL;\n\n\tContainerUtil::cleanUpVectorOfPointers(_events);\n\tContainerUtil::cleanUpVectorOfPointers(_animations);\n\tContainerUtil::cleanUpVectorOfPointers(_ikConstraints);\n\tContainerUtil::cleanUpVectorOfPointers(_transformConstraints);\n\tContainerUtil::cleanUpVectorOfPointers(_pathConstraints);\n\tContainerUtil::cleanUpVectorOfPointers(_physicsConstraints);\n\tfor (size_t i = 0; i < _strings.size(); i++) {\n\t\tSpineExtension::free(_strings[i], __FILE__, __LINE__);\n\t}\n}\n\nBoneData *SkeletonData::findBone(const String &boneName) {\n\treturn ContainerUtil::findWithName(_bones, boneName);\n}\n\nSlotData *SkeletonData::findSlot(const String &slotName) {\n\treturn ContainerUtil::findWithName(_slots, slotName);\n}\n\nSkin *SkeletonData::findSkin(const String &skinName) {\n\treturn ContainerUtil::findWithName(_skins, skinName);\n}\n\nspine::EventData *SkeletonData::findEvent(const String &eventDataName) {\n\treturn ContainerUtil::findWithName(_events, eventDataName);\n}\n\nAnimation *SkeletonData::findAnimation(const String &animationName) {\n\treturn ContainerUtil::findWithName(_animations, animationName);\n}\n\nIkConstraintData *SkeletonData::findIkConstraint(const String &constraintName) {\n\treturn ContainerUtil::findWithName(_ikConstraints, constraintName);\n}\n\nTransformConstraintData *SkeletonData::findTransformConstraint(const String &constraintName) {\n\treturn ContainerUtil::findWithName(_transformConstraints, constraintName);\n}\n\nPathConstraintData *SkeletonData::findPathConstraint(const String &constraintName) {\n\treturn ContainerUtil::findWithName(_pathConstraints, constraintName);\n}\n\nPhysicsConstraintData *SkeletonData::findPhysicsConstraint(const String &constraintName) {\n\treturn ContainerUtil::findWithName(_physicsConstraints, constraintName);\n}\n\nconst String &SkeletonData::getName() {\n\treturn _name;\n}\n\nvoid SkeletonData::setName(const String &inValue) {\n\t_name = inValue;\n}\n\nVector<BoneData *> &SkeletonData::getBones() {\n\treturn _bones;\n}\n\nVector<SlotData *> &SkeletonData::getSlots() {\n\treturn _slots;\n}\n\nVector<Skin *> &SkeletonData::getSkins() {\n\treturn _skins;\n}\n\nSkin *SkeletonData::getDefaultSkin() {\n\treturn _defaultSkin;\n}\n\nvoid SkeletonData::setDefaultSkin(Skin *inValue) {\n\t_defaultSkin = inValue;\n}\n\nVector<spine::EventData *> &SkeletonData::getEvents() {\n\treturn _events;\n}\n\nVector<Animation *> &SkeletonData::getAnimations() {\n\treturn _animations;\n}\n\nVector<IkConstraintData *> &SkeletonData::getIkConstraints() {\n\treturn _ikConstraints;\n}\n\nVector<TransformConstraintData *> &SkeletonData::getTransformConstraints() {\n\treturn _transformConstraints;\n}\n\nVector<PathConstraintData *> &SkeletonData::getPathConstraints() {\n\treturn _pathConstraints;\n}\n\nVector<PhysicsConstraintData *> &SkeletonData::getPhysicsConstraints() {\n\treturn _physicsConstraints;\n}\n\nfloat SkeletonData::getX() {\n\treturn _x;\n}\n\nvoid SkeletonData::setX(float inValue) {\n\t_x = inValue;\n}\n\nfloat SkeletonData::getY() {\n\treturn _y;\n}\n\nvoid SkeletonData::setY(float inValue) {\n\t_y = inValue;\n}\n\nfloat SkeletonData::getWidth() {\n\treturn _width;\n}\n\nvoid SkeletonData::setWidth(float inValue) {\n\t_width = inValue;\n}\n\nfloat SkeletonData::getHeight() {\n\treturn _height;\n}\n\nvoid SkeletonData::setHeight(float inValue) {\n\t_height = inValue;\n}\n\nfloat SkeletonData::getReferenceScale() {\n\treturn _referenceScale;\n}\n\nvoid SkeletonData::setReferenceScale(float inValue) {\n\t_referenceScale = inValue;\n}\n\nconst String &SkeletonData::getVersion() {\n\treturn _version;\n}\n\nvoid SkeletonData::setVersion(const String &inValue) {\n\t_version = inValue;\n}\n\nconst String &SkeletonData::getHash() {\n\treturn _hash;\n}\n\nvoid SkeletonData::setHash(const String &inValue) {\n\t_hash = inValue;\n}\n\nconst String &SkeletonData::getImagesPath() {\n\treturn _imagesPath;\n}\n\nvoid SkeletonData::setImagesPath(const String &inValue) {\n\t_imagesPath = inValue;\n}\n\n\nconst String &SkeletonData::getAudioPath() {\n\treturn _audioPath;\n}\n\nvoid SkeletonData::setAudioPath(const String &inValue) {\n\t_audioPath = inValue;\n}\n\nfloat SkeletonData::getFps() {\n\treturn _fps;\n}\n\nvoid SkeletonData::setFps(float inValue) {\n\t_fps = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/SkeletonJson.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/SkeletonJson.h>\n\n#include <spine/Atlas.h>\n#include <spine/AtlasAttachmentLoader.h>\n#include <spine/CurveTimeline.h>\n#include <spine/Json.h>\n#include <spine/LinkedMesh.h>\n#include <spine/SkeletonData.h>\n#include <spine/VertexAttachment.h>\n\n#include <spine/AttachmentTimeline.h>\n#include <spine/AttachmentType.h>\n#include <spine/BoneData.h>\n#include <spine/BoundingBoxAttachment.h>\n#include <spine/ClippingAttachment.h>\n#include <spine/ColorTimeline.h>\n#include <spine/ContainerUtil.h>\n#include <spine/DeformTimeline.h>\n#include <spine/DrawOrderTimeline.h>\n#include <spine/Event.h>\n#include <spine/EventData.h>\n#include <spine/EventTimeline.h>\n#include <spine/IkConstraintData.h>\n#include <spine/IkConstraintTimeline.h>\n#include <spine/InheritTimeline.h>\n#include <spine/MeshAttachment.h>\n#include <spine/PathAttachment.h>\n#include <spine/PathConstraintData.h>\n#include <spine/PathConstraintMixTimeline.h>\n#include <spine/PathConstraintPositionTimeline.h>\n#include <spine/PathConstraintSpacingTimeline.h>\n#include <spine/PhysicsConstraintData.h>\n#include <spine/PhysicsConstraintTimeline.h>\n#include <spine/PointAttachment.h>\n#include <spine/RegionAttachment.h>\n#include <spine/RotateTimeline.h>\n#include <spine/ScaleTimeline.h>\n#include <spine/ShearTimeline.h>\n#include <spine/Skin.h>\n#include <spine/SlotData.h>\n#include <spine/TransformConstraintData.h>\n#include <spine/TransformConstraintTimeline.h>\n#include <spine/TranslateTimeline.h>\n#include <spine/Vertices.h>\n#include <spine/SequenceTimeline.h>\n#include <spine/Version.h>\n\nusing namespace spine;\n\nstatic float toColor(const char *value, size_t index) {\n\tchar digits[3];\n\tchar *error;\n\tint color;\n\n\tif (index >= strlen(value) / 2) return -1;\n\n\tvalue += index * 2;\n\n\tdigits[0] = *value;\n\tdigits[1] = *(value + 1);\n\tdigits[2] = '\\0';\n\tcolor = (int) strtoul(digits, &error, 16);\n\tif (*error != 0) return -1;\n\n\treturn color / (float) 255;\n}\n\nstatic void toColor(Color &color, const char *value, bool hasAlpha) {\n\tcolor.r = toColor(value, 0);\n\tcolor.g = toColor(value, 1);\n\tcolor.b = toColor(value, 2);\n\tif (hasAlpha) color.a = toColor(value, 3);\n}\n\nSkeletonJson::SkeletonJson(Atlas *atlas) : _attachmentLoader(new (__FILE__, __LINE__) AtlasAttachmentLoader(atlas)),\n\t\t\t\t\t\t\t\t\t\t   _scale(1), _ownsLoader(true) {}\n\nSkeletonJson::SkeletonJson(AttachmentLoader *attachmentLoader, bool ownsLoader) : _attachmentLoader(attachmentLoader),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _scale(1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _ownsLoader(ownsLoader) {\n\tassert(_attachmentLoader != NULL);\n}\n\nSkeletonJson::~SkeletonJson() {\n\tContainerUtil::cleanUpVectorOfPointers(_linkedMeshes);\n\n\tif (_ownsLoader) delete _attachmentLoader;\n}\n\nSkeletonData *SkeletonJson::readSkeletonDataFile(const String &path) {\n\tint length;\n\tSkeletonData *skeletonData;\n\tconst char *json = SpineExtension::readFile(path, &length);\n\tif (length == 0 || !json) {\n\t\tsetError(NULL, \"Unable to read skeleton file: \", path);\n\t\treturn NULL;\n\t}\n\n\tskeletonData = readSkeletonData(json);\n\n\tSpineExtension::free(json, __FILE__, __LINE__);\n\n\treturn skeletonData;\n}\n\nSkeletonData *SkeletonJson::readSkeletonData(const char *json) {\n\tint i, ii;\n\tSkeletonData *skeletonData;\n\tJson *root, *skeleton, *bones, *boneMap, *ik, *transform, *path, *physics, *slots, *skins, *animations, *events;\n\n\t_error = \"\";\n\t_linkedMeshes.clear();\n\n\troot = new (__FILE__, __LINE__) Json(json);\n\n\tif (!root) {\n\t\tsetError(NULL, \"Invalid skeleton JSON: \", Json::getError());\n\t\treturn NULL;\n\t}\n\n\tskeletonData = new (__FILE__, __LINE__) SkeletonData();\n\n\tskeleton = Json::getItem(root, \"skeleton\");\n\tif (skeleton) {\n\t\tskeletonData->_hash = Json::getString(skeleton, \"hash\", 0);\n\t\tskeletonData->_version = Json::getString(skeleton, \"spine\", 0);\n\t\tif (!skeletonData->_version.startsWith(SPINE_VERSION_STRING)) {\n\t\t\tchar errorMsg[255];\n\t\t\tsnprintf(errorMsg, 255, \"Skeleton version %s does not match runtime version %s\", skeletonData->_version.buffer(), SPINE_VERSION_STRING);\n\t\t\tdelete skeletonData;\n\t\t\tsetError(NULL, errorMsg, \"\");\n\t\t\treturn NULL;\n\t\t}\n\t\tskeletonData->_x = Json::getFloat(skeleton, \"x\", 0);\n\t\tskeletonData->_y = Json::getFloat(skeleton, \"y\", 0);\n\t\tskeletonData->_width = Json::getFloat(skeleton, \"width\", 0);\n\t\tskeletonData->_height = Json::getFloat(skeleton, \"height\", 0);\n\t\tskeletonData->_referenceScale = Json::getFloat(skeleton, \"referenceScale\", 100) * _scale;\n\t\tskeletonData->_fps = Json::getFloat(skeleton, \"fps\", 30);\n\t\tskeletonData->_audioPath = Json::getString(skeleton, \"audio\", 0);\n\t\tskeletonData->_imagesPath = Json::getString(skeleton, \"images\", 0);\n\t}\n\n\t/* Bones. */\n\tbones = Json::getItem(root, \"bones\");\n\tskeletonData->_bones.setSize(bones->_size, 0);\n\tint bonesCount = 0;\n\tfor (boneMap = bones->_child, i = 0; boneMap; boneMap = boneMap->_next, ++i) {\n\t\tBoneData *data;\n\t\tconst char *inherit;\n\n\t\tBoneData *parent = 0;\n\t\tconst char *parentName = Json::getString(boneMap, \"parent\", 0);\n\t\tif (parentName) {\n\t\t\tparent = skeletonData->findBone(parentName);\n\t\t\tif (!parent) {\n\t\t\t\tdelete skeletonData;\n\t\t\t\tsetError(root, \"Parent bone not found: \", parentName);\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\n\t\tdata = new (__FILE__, __LINE__) BoneData(bonesCount, Json::getString(boneMap, \"name\", 0), parent);\n\n\t\tdata->_length = Json::getFloat(boneMap, \"length\", 0) * _scale;\n\t\tdata->_x = Json::getFloat(boneMap, \"x\", 0) * _scale;\n\t\tdata->_y = Json::getFloat(boneMap, \"y\", 0) * _scale;\n\t\tdata->_rotation = Json::getFloat(boneMap, \"rotation\", 0);\n\t\tdata->_scaleX = Json::getFloat(boneMap, \"scaleX\", 1);\n\t\tdata->_scaleY = Json::getFloat(boneMap, \"scaleY\", 1);\n\t\tdata->_shearX = Json::getFloat(boneMap, \"shearX\", 0);\n\t\tdata->_shearY = Json::getFloat(boneMap, \"shearY\", 0);\n\t\tinherit = Json::getString(boneMap, \"inherit\", \"normal\");\n\t\tdata->_inherit = Inherit_Normal;\n\t\tif (strcmp(inherit, \"normal\") == 0) data->_inherit = Inherit_Normal;\n\t\telse if (strcmp(inherit, \"onlyTranslation\") == 0)\n\t\t\tdata->_inherit = Inherit_OnlyTranslation;\n\t\telse if (strcmp(inherit, \"noRotationOrReflection\") == 0)\n\t\t\tdata->_inherit = Inherit_NoRotationOrReflection;\n\t\telse if (strcmp(inherit, \"noScale\") == 0)\n\t\t\tdata->_inherit = Inherit_NoScale;\n\t\telse if (strcmp(inherit, \"noScaleOrReflection\") == 0)\n\t\t\tdata->_inherit = Inherit_NoScaleOrReflection;\n\t\tdata->_skinRequired = Json::getBoolean(boneMap, \"skin\", false);\n\n\t\tconst char *color = Json::getString(boneMap, \"color\", NULL);\n\t\tif (color) toColor(data->getColor(), color, true);\n\n\t\tdata->_icon = Json::getString(boneMap, \"icon\", \"\");\n\t\tdata->_visible = Json::getBoolean(boneMap, \"visible\", true);\n\n\t\tskeletonData->_bones[i] = data;\n\t\tbonesCount++;\n\t}\n\n\t/* Slots. */\n\tslots = Json::getItem(root, \"slots\");\n\tif (slots) {\n\t\tJson *slotMap;\n\t\tskeletonData->_slots.ensureCapacity(slots->_size);\n\t\tskeletonData->_slots.setSize(slots->_size, 0);\n\t\tfor (slotMap = slots->_child, i = 0; slotMap; slotMap = slotMap->_next, ++i) {\n\t\t\tSlotData *data;\n\t\t\tconst char *color;\n\t\t\tconst char *dark;\n\t\t\tJson *item;\n\n\t\t\tconst char *boneName = Json::getString(slotMap, \"bone\", 0);\n\t\t\tBoneData *boneData = skeletonData->findBone(boneName);\n\t\t\tif (!boneData) {\n\t\t\t\tdelete skeletonData;\n\t\t\t\tsetError(root, \"Slot bone not found: \", boneName);\n\t\t\t\treturn NULL;\n\t\t\t}\n\n\t\t\tString slotName = String(Json::getString(slotMap, \"name\", 0));\n\t\t\tdata = new (__FILE__, __LINE__) SlotData(i, slotName, *boneData);\n\n\t\t\tcolor = Json::getString(slotMap, \"color\", 0);\n\t\t\tif (color) {\n\t\t\t\tColor &c = data->getColor();\n\t\t\t\tc.r = toColor(color, 0);\n\t\t\t\tc.g = toColor(color, 1);\n\t\t\t\tc.b = toColor(color, 2);\n\t\t\t\tc.a = toColor(color, 3);\n\t\t\t}\n\n\t\t\tdark = Json::getString(slotMap, \"dark\", 0);\n\t\t\tif (dark) {\n\t\t\t\tColor &darkColor = data->getDarkColor();\n\t\t\t\tdarkColor.r = toColor(dark, 0);\n\t\t\t\tdarkColor.g = toColor(dark, 1);\n\t\t\t\tdarkColor.b = toColor(dark, 2);\n\t\t\t\tdarkColor.a = 1;\n\t\t\t\tdata->setHasDarkColor(true);\n\t\t\t}\n\n\t\t\titem = Json::getItem(slotMap, \"attachment\");\n\t\t\tif (item) data->setAttachmentName(item->_valueString);\n\n\t\t\titem = Json::getItem(slotMap, \"blend\");\n\t\t\tif (item) {\n\t\t\t\tif (strcmp(item->_valueString, \"additive\") == 0) data->_blendMode = BlendMode_Additive;\n\t\t\t\telse if (strcmp(item->_valueString, \"multiply\") == 0)\n\t\t\t\t\tdata->_blendMode = BlendMode_Multiply;\n\t\t\t\telse if (strcmp(item->_valueString, \"screen\") == 0)\n\t\t\t\t\tdata->_blendMode = BlendMode_Screen;\n\t\t\t}\n\t\t\tdata->_visible = Json::getBoolean(slotMap, \"visible\", true);\n\t\t\tskeletonData->_slots[i] = data;\n\t\t}\n\t}\n\n\t/* IK constraints. */\n\tik = Json::getItem(root, \"ik\");\n\tif (ik) {\n\t\tJson *constraintMap;\n\t\tskeletonData->_ikConstraints.ensureCapacity(ik->_size);\n\t\tskeletonData->_ikConstraints.setSize(ik->_size, 0);\n\t\tfor (constraintMap = ik->_child, i = 0; constraintMap; constraintMap = constraintMap->_next, ++i) {\n\t\t\tconst char *targetName;\n\n\t\t\tIkConstraintData *data = new (__FILE__, __LINE__) IkConstraintData(\n\t\t\t\t\tJson::getString(constraintMap, \"name\", 0));\n\t\t\tdata->setOrder(Json::getInt(constraintMap, \"order\", 0));\n\t\t\tdata->setSkinRequired(Json::getBoolean(constraintMap, \"skin\", false));\n\n\t\t\tboneMap = Json::getItem(constraintMap, \"bones\");\n\t\t\tdata->_bones.ensureCapacity(boneMap->_size);\n\t\t\tdata->_bones.setSize(boneMap->_size, 0);\n\t\t\tfor (boneMap = boneMap->_child, ii = 0; boneMap; boneMap = boneMap->_next, ++ii) {\n\t\t\t\tdata->_bones[ii] = skeletonData->findBone(boneMap->_valueString);\n\t\t\t\tif (!data->_bones[ii]) {\n\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\tsetError(root, \"IK bone not found: \", boneMap->_valueString);\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttargetName = Json::getString(constraintMap, \"target\", 0);\n\t\t\tdata->_target = skeletonData->findBone(targetName);\n\t\t\tif (!data->_target) {\n\t\t\t\tdelete skeletonData;\n\t\t\t\tsetError(root, \"Target bone not found: \", targetName);\n\t\t\t\treturn NULL;\n\t\t\t}\n\n\t\t\tdata->_mix = Json::getFloat(constraintMap, \"mix\", 1);\n\t\t\tdata->_softness = Json::getFloat(constraintMap, \"softness\", 0) * _scale;\n\t\t\tdata->_bendDirection = Json::getInt(constraintMap, \"bendPositive\", 1) ? 1 : -1;\n\t\t\tdata->_compress = Json::getInt(constraintMap, \"compress\", 0) ? true : false;\n\t\t\tdata->_stretch = Json::getInt(constraintMap, \"stretch\", 0) ? true : false;\n\t\t\tdata->_uniform = Json::getInt(constraintMap, \"uniform\", 0) ? true : false;\n\n\t\t\tskeletonData->_ikConstraints[i] = data;\n\t\t}\n\t}\n\n\t/* Transform constraints. */\n\ttransform = Json::getItem(root, \"transform\");\n\tif (transform) {\n\t\tJson *constraintMap;\n\t\tskeletonData->_transformConstraints.ensureCapacity(transform->_size);\n\t\tskeletonData->_transformConstraints.setSize(transform->_size, 0);\n\t\tfor (constraintMap = transform->_child, i = 0; constraintMap; constraintMap = constraintMap->_next, ++i) {\n\t\t\tconst char *name;\n\n\t\t\tTransformConstraintData *data = new (__FILE__, __LINE__) TransformConstraintData(\n\t\t\t\t\tJson::getString(constraintMap, \"name\", 0));\n\t\t\tdata->setOrder(Json::getInt(constraintMap, \"order\", 0));\n\t\t\tdata->setSkinRequired(Json::getBoolean(constraintMap, \"skin\", false));\n\n\t\t\tboneMap = Json::getItem(constraintMap, \"bones\");\n\t\t\tdata->_bones.ensureCapacity(boneMap->_size);\n\t\t\tdata->_bones.setSize(boneMap->_size, 0);\n\t\t\tfor (boneMap = boneMap->_child, ii = 0; boneMap; boneMap = boneMap->_next, ++ii) {\n\t\t\t\tdata->_bones[ii] = skeletonData->findBone(boneMap->_valueString);\n\t\t\t\tif (!data->_bones[ii]) {\n\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\tsetError(root, \"Transform bone not found: \", boneMap->_valueString);\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tname = Json::getString(constraintMap, \"target\", 0);\n\t\t\tdata->_target = skeletonData->findBone(name);\n\t\t\tif (!data->_target) {\n\t\t\t\tdelete skeletonData;\n\t\t\t\tsetError(root, \"Target bone not found: \", name);\n\t\t\t\treturn NULL;\n\t\t\t}\n\n\t\t\tdata->_local = Json::getInt(constraintMap, \"local\", 0) ? true : false;\n\t\t\tdata->_relative = Json::getInt(constraintMap, \"relative\", 0) ? true : false;\n\t\t\tdata->_offsetRotation = Json::getFloat(constraintMap, \"rotation\", 0);\n\t\t\tdata->_offsetX = Json::getFloat(constraintMap, \"x\", 0) * _scale;\n\t\t\tdata->_offsetY = Json::getFloat(constraintMap, \"y\", 0) * _scale;\n\t\t\tdata->_offsetScaleX = Json::getFloat(constraintMap, \"scaleX\", 0);\n\t\t\tdata->_offsetScaleY = Json::getFloat(constraintMap, \"scaleY\", 0);\n\t\t\tdata->_offsetShearY = Json::getFloat(constraintMap, \"shearY\", 0);\n\n\t\t\tdata->_mixRotate = Json::getFloat(constraintMap, \"mixRotate\", 1);\n\t\t\tdata->_mixX = Json::getFloat(constraintMap, \"mixX\", 1);\n\t\t\tdata->_mixY = Json::getFloat(constraintMap, \"mixY\", data->_mixX);\n\t\t\tdata->_mixScaleX = Json::getFloat(constraintMap, \"mixScaleX\", 1);\n\t\t\tdata->_mixScaleY = Json::getFloat(constraintMap, \"mixScaleY\", data->_mixScaleX);\n\t\t\tdata->_mixShearY = Json::getFloat(constraintMap, \"mixShearY\", 1);\n\n\t\t\tskeletonData->_transformConstraints[i] = data;\n\t\t}\n\t}\n\n\t/* Path constraints */\n\tpath = Json::getItem(root, \"path\");\n\tif (path) {\n\t\tJson *constraintMap;\n\t\tskeletonData->_pathConstraints.ensureCapacity(path->_size);\n\t\tskeletonData->_pathConstraints.setSize(path->_size, 0);\n\t\tfor (constraintMap = path->_child, i = 0; constraintMap; constraintMap = constraintMap->_next, ++i) {\n\t\t\tconst char *name;\n\t\t\tconst char *item;\n\n\t\t\tPathConstraintData *data = new (__FILE__, __LINE__) PathConstraintData(\n\t\t\t\t\tJson::getString(constraintMap, \"name\", 0));\n\t\t\tdata->setOrder(Json::getInt(constraintMap, \"order\", 0));\n\t\t\tdata->setSkinRequired(Json::getBoolean(constraintMap, \"skin\", false));\n\n\t\t\tboneMap = Json::getItem(constraintMap, \"bones\");\n\t\t\tdata->_bones.ensureCapacity(boneMap->_size);\n\t\t\tdata->_bones.setSize(boneMap->_size, 0);\n\t\t\tfor (boneMap = boneMap->_child, ii = 0; boneMap; boneMap = boneMap->_next, ++ii) {\n\t\t\t\tdata->_bones[ii] = skeletonData->findBone(boneMap->_valueString);\n\t\t\t\tif (!data->_bones[ii]) {\n\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\tsetError(root, \"Path bone not found: \", boneMap->_valueString);\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tname = Json::getString(constraintMap, \"target\", 0);\n\t\t\tdata->_target = skeletonData->findSlot(name);\n\t\t\tif (!data->_target) {\n\t\t\t\tdelete skeletonData;\n\t\t\t\tsetError(root, \"Target slot not found: \", name);\n\t\t\t\treturn NULL;\n\t\t\t}\n\n\t\t\titem = Json::getString(constraintMap, \"positionMode\", \"percent\");\n\t\t\tif (strcmp(item, \"fixed\") == 0) {\n\t\t\t\tdata->_positionMode = PositionMode_Fixed;\n\t\t\t} else if (strcmp(item, \"percent\") == 0) {\n\t\t\t\tdata->_positionMode = PositionMode_Percent;\n\t\t\t}\n\n\t\t\titem = Json::getString(constraintMap, \"spacingMode\", \"length\");\n\t\t\tif (strcmp(item, \"length\") == 0) data->_spacingMode = SpacingMode_Length;\n\t\t\telse if (strcmp(item, \"fixed\") == 0)\n\t\t\t\tdata->_spacingMode = SpacingMode_Fixed;\n\t\t\telse if (strcmp(item, \"percent\") == 0)\n\t\t\t\tdata->_spacingMode = SpacingMode_Percent;\n\t\t\telse\n\t\t\t\tdata->_spacingMode = SpacingMode_Proportional;\n\n\t\t\titem = Json::getString(constraintMap, \"rotateMode\", \"tangent\");\n\t\t\tif (strcmp(item, \"tangent\") == 0) data->_rotateMode = RotateMode_Tangent;\n\t\t\telse if (strcmp(item, \"chain\") == 0)\n\t\t\t\tdata->_rotateMode = RotateMode_Chain;\n\t\t\telse if (strcmp(item, \"chainScale\") == 0)\n\t\t\t\tdata->_rotateMode = RotateMode_ChainScale;\n\n\t\t\tdata->_offsetRotation = Json::getFloat(constraintMap, \"rotation\", 0);\n\t\t\tdata->_position = Json::getFloat(constraintMap, \"position\", 0);\n\t\t\tif (data->_positionMode == PositionMode_Fixed) data->_position *= _scale;\n\t\t\tdata->_spacing = Json::getFloat(constraintMap, \"spacing\", 0);\n\t\t\tif (data->_spacingMode == SpacingMode_Length || data->_spacingMode == SpacingMode_Fixed)\n\t\t\t\tdata->_spacing *= _scale;\n\t\t\tdata->_mixRotate = Json::getFloat(constraintMap, \"mixRotate\", 1);\n\t\t\tdata->_mixX = Json::getFloat(constraintMap, \"mixX\", 1);\n\t\t\tdata->_mixY = Json::getFloat(constraintMap, \"mixY\", data->_mixX);\n\n\t\t\tskeletonData->_pathConstraints[i] = data;\n\t\t}\n\t}\n\n\t/* Physics constraints */\n\tphysics = Json::getItem(root, \"physics\");\n\tif (physics) {\n\t\tJson *constraintMap;\n\t\tskeletonData->_physicsConstraints.ensureCapacity(physics->_size);\n\t\tskeletonData->_physicsConstraints.setSize(physics->_size, 0);\n\t\tfor (constraintMap = physics->_child, i = 0; constraintMap; constraintMap = constraintMap->_next, ++i) {\n\t\t\tconst char *name;\n\n\t\t\tPhysicsConstraintData *data = new (__FILE__, __LINE__) PhysicsConstraintData(\n\t\t\t\t\tJson::getString(constraintMap, \"name\", 0));\n\t\t\tdata->setOrder(Json::getInt(constraintMap, \"order\", 0));\n\t\t\tdata->setSkinRequired(Json::getBoolean(constraintMap, \"skin\", false));\n\n\t\t\tname = Json::getString(constraintMap, \"bone\", 0);\n\t\t\tdata->_bone = skeletonData->findBone(name);\n\t\t\tif (!data->_bone) {\n\t\t\t\tdelete skeletonData;\n\t\t\t\tsetError(root, \"Physics bone not found: \", name);\n\t\t\t\treturn NULL;\n\t\t\t}\n\n\t\t\tdata->_x = Json::getFloat(constraintMap, \"x\", 0);\n\t\t\tdata->_y = Json::getFloat(constraintMap, \"y\", 0);\n\t\t\tdata->_rotate = Json::getFloat(constraintMap, \"rotate\", 0);\n\t\t\tdata->_scaleX = Json::getFloat(constraintMap, \"scaleX\", 0);\n\t\t\tdata->_shearX = Json::getFloat(constraintMap, \"shearX\", 0);\n\t\t\tdata->_limit = Json::getFloat(constraintMap, \"limit\", 5000) * _scale;\n\t\t\tdata->_step = 1.0f / Json::getInt(constraintMap, \"fps\", 60);\n\t\t\tdata->_inertia = Json::getFloat(constraintMap, \"inertia\", 1);\n\t\t\tdata->_strength = Json::getFloat(constraintMap, \"strength\", 100);\n\t\t\tdata->_damping = Json::getFloat(constraintMap, \"damping\", 1);\n\t\t\tdata->_massInverse = 1.0f / Json::getFloat(constraintMap, \"mass\", 1);\n\t\t\tdata->_wind = Json::getFloat(constraintMap, \"wind\", 0);\n\t\t\tdata->_gravity = Json::getFloat(constraintMap, \"gravity\", 0);\n\t\t\tdata->_mix = Json::getFloat(constraintMap, \"mix\", 1);\n\t\t\tdata->_inertiaGlobal = Json::getBoolean(constraintMap, \"inertiaGlobal\", false);\n\t\t\tdata->_strengthGlobal = Json::getBoolean(constraintMap, \"strengthGlobal\", false);\n\t\t\tdata->_dampingGlobal = Json::getBoolean(constraintMap, \"dampingGlobal\", false);\n\t\t\tdata->_massGlobal = Json::getBoolean(constraintMap, \"massGlobal\", false);\n\t\t\tdata->_windGlobal = Json::getBoolean(constraintMap, \"windGlobal\", false);\n\t\t\tdata->_gravityGlobal = Json::getBoolean(constraintMap, \"gravityGlobal\", false);\n\t\t\tdata->_mixGlobal = Json::getBoolean(constraintMap, \"mixGlobal\", false);\n\n\t\t\tskeletonData->_physicsConstraints[i] = data;\n\t\t}\n\t}\n\n\t/* Skins. */\n\tskins = Json::getItem(root, \"skins\");\n\tif (skins) {\n\t\tJson *skinMap;\n\t\tskeletonData->_skins.ensureCapacity(skins->_size);\n\t\tskeletonData->_skins.setSize(skins->_size, 0);\n\t\tint skinsIndex = 0;\n\t\tfor (skinMap = skins->_child, i = 0; skinMap; skinMap = skinMap->_next, ++i) {\n\t\t\tJson *attachmentsMap;\n\t\t\tJson *curves;\n\n\t\t\tSkin *skin = new (__FILE__, __LINE__) Skin(Json::getString(skinMap, \"name\", \"\"));\n\n\t\t\tJson *item = Json::getItem(skinMap, \"bones\");\n\t\t\tif (item) {\n\t\t\t\tfor (item = item->_child; item; item = item->_next) {\n\t\t\t\t\tBoneData *data = skeletonData->findBone(item->_valueString);\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\t\tsetError(root, String(\"Skin bone not found: \"), item->_valueString);\n\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t}\n\t\t\t\t\tskin->getBones().add(data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titem = Json::getItem(skinMap, \"ik\");\n\t\t\tif (item) {\n\t\t\t\tfor (item = item->_child; item; item = item->_next) {\n\t\t\t\t\tIkConstraintData *data = skeletonData->findIkConstraint(item->_valueString);\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\t\tsetError(root, String(\"Skin IK constraint not found: \"), item->_valueString);\n\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t}\n\t\t\t\t\tskin->getConstraints().add(data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titem = Json::getItem(skinMap, \"transform\");\n\t\t\tif (item) {\n\t\t\t\tfor (item = item->_child; item; item = item->_next) {\n\t\t\t\t\tTransformConstraintData *data = skeletonData->findTransformConstraint(item->_valueString);\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\t\tsetError(root, String(\"Skin transform constraint not found: \"), item->_valueString);\n\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t}\n\t\t\t\t\tskin->getConstraints().add(data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titem = Json::getItem(skinMap, \"path\");\n\t\t\tif (item) {\n\t\t\t\tfor (item = item->_child; item; item = item->_next) {\n\t\t\t\t\tPathConstraintData *data = skeletonData->findPathConstraint(item->_valueString);\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\t\tsetError(root, String(\"Skin path constraint not found: \"), item->_valueString);\n\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t}\n\t\t\t\t\tskin->getConstraints().add(data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titem = Json::getItem(skinMap, \"physics\");\n\t\t\tif (item) {\n\t\t\t\tfor (item = item->_child; item; item = item->_next) {\n\t\t\t\t\tPhysicsConstraintData *data = skeletonData->findPhysicsConstraint(item->_valueString);\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\t\tsetError(root, String(\"Skin physics constraint not found: \"), item->_valueString);\n\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t}\n\t\t\t\t\tskin->getConstraints().add(data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tskeletonData->_skins[skinsIndex++] = skin;\n\t\t\tif (strcmp(Json::getString(skinMap, \"name\", \"\"), \"default\") == 0) {\n\t\t\t\tskeletonData->_defaultSkin = skin;\n\t\t\t}\n\n\t\t\tJson *attachments = Json::getItem(skinMap, \"attachments\");\n\t\t\tif (attachments)\n\t\t\t\tfor (attachmentsMap = attachments->_child;\n\t\t\t\t\t attachmentsMap; attachmentsMap = attachmentsMap->_next) {\n\t\t\t\t\tSlotData *slot = skeletonData->findSlot(attachmentsMap->_name);\n\t\t\t\t\tJson *attachmentMap;\n\n\t\t\t\t\tfor (attachmentMap = attachmentsMap->_child; attachmentMap; attachmentMap = attachmentMap->_next) {\n\t\t\t\t\t\tAttachment *attachment = NULL;\n\t\t\t\t\t\tconst char *skinAttachmentName = attachmentMap->_name;\n\t\t\t\t\t\tconst char *attachmentName = Json::getString(attachmentMap, \"name\", skinAttachmentName);\n\t\t\t\t\t\tconst char *attachmentPath = Json::getString(attachmentMap, \"path\", attachmentName);\n\t\t\t\t\t\tconst char *color;\n\t\t\t\t\t\tJson *entry;\n\n\t\t\t\t\t\tconst char *typeString = Json::getString(attachmentMap, \"type\", \"region\");\n\t\t\t\t\t\tAttachmentType type;\n\t\t\t\t\t\tif (strcmp(typeString, \"region\") == 0) type = AttachmentType_Region;\n\t\t\t\t\t\telse if (strcmp(typeString, \"mesh\") == 0)\n\t\t\t\t\t\t\ttype = AttachmentType_Mesh;\n\t\t\t\t\t\telse if (strcmp(typeString, \"linkedmesh\") == 0)\n\t\t\t\t\t\t\ttype = AttachmentType_Linkedmesh;\n\t\t\t\t\t\telse if (strcmp(typeString, \"boundingbox\") == 0)\n\t\t\t\t\t\t\ttype = AttachmentType_Boundingbox;\n\t\t\t\t\t\telse if (strcmp(typeString, \"path\") == 0)\n\t\t\t\t\t\t\ttype = AttachmentType_Path;\n\t\t\t\t\t\telse if (strcmp(typeString, \"clipping\") == 0)\n\t\t\t\t\t\t\ttype = AttachmentType_Clipping;\n\t\t\t\t\t\telse if (strcmp(typeString, \"point\") == 0)\n\t\t\t\t\t\t\ttype = AttachmentType_Point;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\t\t\tsetError(root, \"Unknown attachment type: \", typeString);\n\t\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (type) {\n\t\t\t\t\t\t\tcase AttachmentType_Region: {\n\t\t\t\t\t\t\t\tSequence *sequence = readSequence(Json::getItem(attachmentMap, \"sequence\"));\n\t\t\t\t\t\t\t\tattachment = _attachmentLoader->newRegionAttachment(*skin, attachmentName, attachmentPath, sequence);\n\t\t\t\t\t\t\t\tif (!attachment) {\n\t\t\t\t\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\t\t\t\t\tsetError(root, \"Error reading attachment: \", skinAttachmentName);\n\t\t\t\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tRegionAttachment *region = static_cast<RegionAttachment *>(attachment);\n\t\t\t\t\t\t\t\tregion->_path = attachmentPath;\n\n\t\t\t\t\t\t\t\tregion->_x = Json::getFloat(attachmentMap, \"x\", 0) * _scale;\n\t\t\t\t\t\t\t\tregion->_y = Json::getFloat(attachmentMap, \"y\", 0) * _scale;\n\t\t\t\t\t\t\t\tregion->_scaleX = Json::getFloat(attachmentMap, \"scaleX\", 1);\n\t\t\t\t\t\t\t\tregion->_scaleY = Json::getFloat(attachmentMap, \"scaleY\", 1);\n\t\t\t\t\t\t\t\tregion->_rotation = Json::getFloat(attachmentMap, \"rotation\", 0);\n\t\t\t\t\t\t\t\tregion->_width = Json::getFloat(attachmentMap, \"width\", 32) * _scale;\n\t\t\t\t\t\t\t\tregion->_height = Json::getFloat(attachmentMap, \"height\", 32) * _scale;\n\t\t\t\t\t\t\t\tregion->_sequence = sequence;\n\n\t\t\t\t\t\t\t\tcolor = Json::getString(attachmentMap, \"color\", 0);\n\t\t\t\t\t\t\t\tif (color) toColor(region->getColor(), color, true);\n\n\t\t\t\t\t\t\t\tif (region->_region != NULL) region->updateRegion();\n\t\t\t\t\t\t\t\t_attachmentLoader->configureAttachment(region);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase AttachmentType_Mesh:\n\t\t\t\t\t\t\tcase AttachmentType_Linkedmesh: {\n\t\t\t\t\t\t\t\tSequence *sequence = readSequence(Json::getItem(attachmentMap, \"sequence\"));\n\t\t\t\t\t\t\t\tattachment = _attachmentLoader->newMeshAttachment(*skin, attachmentName, attachmentPath, sequence);\n\n\t\t\t\t\t\t\t\tif (!attachment) {\n\t\t\t\t\t\t\t\t\tdelete skeletonData;\n\t\t\t\t\t\t\t\t\tsetError(root, \"Error reading attachment: \", skinAttachmentName);\n\t\t\t\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tMeshAttachment *mesh = static_cast<MeshAttachment *>(attachment);\n\t\t\t\t\t\t\t\tmesh->_path = attachmentPath;\n\n\t\t\t\t\t\t\t\tcolor = Json::getString(attachmentMap, \"color\", 0);\n\t\t\t\t\t\t\t\tif (color) toColor(mesh->getColor(), color, true);\n\n\t\t\t\t\t\t\t\tmesh->_width = Json::getFloat(attachmentMap, \"width\", 32) * _scale;\n\t\t\t\t\t\t\t\tmesh->_height = Json::getFloat(attachmentMap, \"height\", 32) * _scale;\n\t\t\t\t\t\t\t\tmesh->_sequence = sequence;\n\n\t\t\t\t\t\t\t\tentry = Json::getItem(attachmentMap, \"parent\");\n\t\t\t\t\t\t\t\tif (!entry) {\n\t\t\t\t\t\t\t\t\tint verticesLength;\n\t\t\t\t\t\t\t\t\tentry = Json::getItem(attachmentMap, \"triangles\");\n\t\t\t\t\t\t\t\t\tmesh->_triangles.ensureCapacity(entry->_size);\n\t\t\t\t\t\t\t\t\tmesh->_triangles.setSize(entry->_size, 0);\n\t\t\t\t\t\t\t\t\tfor (entry = entry->_child, ii = 0; entry; entry = entry->_next, ++ii)\n\t\t\t\t\t\t\t\t\t\tmesh->_triangles[ii] = (unsigned short) entry->_valueInt;\n\n\t\t\t\t\t\t\t\t\tentry = Json::getItem(attachmentMap, \"uvs\");\n\t\t\t\t\t\t\t\t\tverticesLength = entry->_size;\n\t\t\t\t\t\t\t\t\tmesh->_regionUVs.ensureCapacity(verticesLength);\n\t\t\t\t\t\t\t\t\tmesh->_regionUVs.setSize(verticesLength, 0);\n\t\t\t\t\t\t\t\t\tfor (entry = entry->_child, ii = 0; entry; entry = entry->_next, ++ii)\n\t\t\t\t\t\t\t\t\t\tmesh->_regionUVs[ii] = entry->_valueFloat;\n\n\t\t\t\t\t\t\t\t\treadVertices(attachmentMap, mesh, verticesLength);\n\n\t\t\t\t\t\t\t\t\tif (mesh->_region != NULL) mesh->updateRegion();\n\n\t\t\t\t\t\t\t\t\tmesh->_hullLength = Json::getInt(attachmentMap, \"hull\", 0);\n\n\t\t\t\t\t\t\t\t\tentry = Json::getItem(attachmentMap, \"edges\");\n\t\t\t\t\t\t\t\t\tif (entry) {\n\t\t\t\t\t\t\t\t\t\tmesh->_edges.ensureCapacity(entry->_size);\n\t\t\t\t\t\t\t\t\t\tmesh->_edges.setSize(entry->_size, 0);\n\t\t\t\t\t\t\t\t\t\tfor (entry = entry->_child, ii = 0; entry; entry = entry->_next, ++ii)\n\t\t\t\t\t\t\t\t\t\t\tmesh->_edges[ii] = entry->_valueInt;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t_attachmentLoader->configureAttachment(mesh);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbool inheritTimelines = Json::getInt(attachmentMap, \"timelines\", 1) ? true : false;\n\t\t\t\t\t\t\t\t\tLinkedMesh *linkedMesh = new (__FILE__, __LINE__) LinkedMesh(mesh,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t String(Json::getString(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t attachmentMap,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"skin\", 0)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t slot->getIndex(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t String(entry->_valueString),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t inheritTimelines);\n\t\t\t\t\t\t\t\t\t_linkedMeshes.add(linkedMesh);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase AttachmentType_Boundingbox: {\n\t\t\t\t\t\t\t\tattachment = _attachmentLoader->newBoundingBoxAttachment(*skin, attachmentName);\n\n\t\t\t\t\t\t\t\tBoundingBoxAttachment *box = static_cast<BoundingBoxAttachment *>(attachment);\n\n\t\t\t\t\t\t\t\tint vertexCount = Json::getInt(attachmentMap, \"vertexCount\", 0) << 1;\n\t\t\t\t\t\t\t\treadVertices(attachmentMap, box, vertexCount);\n\t\t\t\t\t\t\t\tcolor = Json::getString(attachmentMap, \"color\", NULL);\n\t\t\t\t\t\t\t\tif (color) toColor(box->getColor(), color, true);\n\t\t\t\t\t\t\t\t_attachmentLoader->configureAttachment(attachment);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase AttachmentType_Path: {\n\t\t\t\t\t\t\t\tattachment = _attachmentLoader->newPathAttachment(*skin, attachmentName);\n\n\t\t\t\t\t\t\t\tPathAttachment *pathAttatchment = static_cast<PathAttachment *>(attachment);\n\n\t\t\t\t\t\t\t\tint vertexCount = 0;\n\t\t\t\t\t\t\t\tpathAttatchment->_closed = Json::getInt(attachmentMap, \"closed\", 0) ? true : false;\n\t\t\t\t\t\t\t\tpathAttatchment->_constantSpeed = Json::getInt(attachmentMap, \"constantSpeed\", 1) ? true\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  : false;\n\t\t\t\t\t\t\t\tvertexCount = Json::getInt(attachmentMap, \"vertexCount\", 0);\n\t\t\t\t\t\t\t\treadVertices(attachmentMap, pathAttatchment, vertexCount << 1);\n\n\t\t\t\t\t\t\t\tpathAttatchment->_lengths.ensureCapacity(vertexCount / 3);\n\t\t\t\t\t\t\t\tpathAttatchment->_lengths.setSize(vertexCount / 3, 0);\n\n\t\t\t\t\t\t\t\tcurves = Json::getItem(attachmentMap, \"lengths\");\n\t\t\t\t\t\t\t\tfor (curves = curves->_child, ii = 0; curves; curves = curves->_next, ++ii)\n\t\t\t\t\t\t\t\t\tpathAttatchment->_lengths[ii] = curves->_valueFloat * _scale;\n\t\t\t\t\t\t\t\tcolor = Json::getString(attachmentMap, \"color\", NULL);\n\t\t\t\t\t\t\t\tif (color) toColor(pathAttatchment->getColor(), color, true);\n\t\t\t\t\t\t\t\t_attachmentLoader->configureAttachment(attachment);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase AttachmentType_Point: {\n\t\t\t\t\t\t\t\tattachment = _attachmentLoader->newPointAttachment(*skin, attachmentName);\n\n\t\t\t\t\t\t\t\tPointAttachment *point = static_cast<PointAttachment *>(attachment);\n\n\t\t\t\t\t\t\t\tpoint->_x = Json::getFloat(attachmentMap, \"x\", 0) * _scale;\n\t\t\t\t\t\t\t\tpoint->_y = Json::getFloat(attachmentMap, \"y\", 0) * _scale;\n\t\t\t\t\t\t\t\tpoint->_rotation = Json::getFloat(attachmentMap, \"rotation\", 0);\n\t\t\t\t\t\t\t\tcolor = Json::getString(attachmentMap, \"color\", NULL);\n\t\t\t\t\t\t\t\tif (color) toColor(point->getColor(), color, true);\n\t\t\t\t\t\t\t\t_attachmentLoader->configureAttachment(attachment);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase AttachmentType_Clipping: {\n\t\t\t\t\t\t\t\tattachment = _attachmentLoader->newClippingAttachment(*skin, attachmentName);\n\n\t\t\t\t\t\t\t\tClippingAttachment *clip = static_cast<ClippingAttachment *>(attachment);\n\n\t\t\t\t\t\t\t\tint vertexCount = 0;\n\t\t\t\t\t\t\t\tconst char *end = Json::getString(attachmentMap, \"end\", 0);\n\t\t\t\t\t\t\t\tif (end) clip->_endSlot = skeletonData->findSlot(end);\n\t\t\t\t\t\t\t\tvertexCount = Json::getInt(attachmentMap, \"vertexCount\", 0) << 1;\n\t\t\t\t\t\t\t\treadVertices(attachmentMap, clip, vertexCount);\n\t\t\t\t\t\t\t\tcolor = Json::getString(attachmentMap, \"color\", NULL);\n\t\t\t\t\t\t\t\tif (color) toColor(clip->getColor(), color, true);\n\t\t\t\t\t\t\t\t_attachmentLoader->configureAttachment(attachment);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tskin->setAttachment(slot->getIndex(), skinAttachmentName, attachment);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}\n\n\t/* Linked meshes. */\n\tint n = (int) _linkedMeshes.size();\n\tfor (i = 0; i < n; ++i) {\n\t\tLinkedMesh *linkedMesh = _linkedMeshes[i];\n\t\tSkin *skin = linkedMesh->_skin.length() == 0 ? skeletonData->getDefaultSkin() : skeletonData->findSkin(linkedMesh->_skin);\n\t\tif (skin == NULL) {\n\t\t\tdelete skeletonData;\n\t\t\tsetError(root, \"Skin not found: \", linkedMesh->_skin.buffer());\n\t\t\treturn NULL;\n\t\t}\n\t\tAttachment *parent = skin->getAttachment(linkedMesh->_slotIndex, linkedMesh->_parent);\n\t\tif (parent == NULL) {\n\t\t\tdelete skeletonData;\n\t\t\tsetError(root, \"Parent mesh not found: \", linkedMesh->_parent.buffer());\n\t\t\treturn NULL;\n\t\t}\n\t\tlinkedMesh->_mesh->_timelineAttachment = linkedMesh->_inheritTimeline ? static_cast<VertexAttachment *>(parent)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  : linkedMesh->_mesh;\n\t\tlinkedMesh->_mesh->setParentMesh(static_cast<MeshAttachment *>(parent));\n\t\tif (linkedMesh->_mesh->_region != NULL) linkedMesh->_mesh->updateRegion();\n\t\t_attachmentLoader->configureAttachment(linkedMesh->_mesh);\n\t}\n\tContainerUtil::cleanUpVectorOfPointers(_linkedMeshes);\n\t_linkedMeshes.clear();\n\n\t/* Events. */\n\tevents = Json::getItem(root, \"events\");\n\tif (events) {\n\t\tJson *eventMap;\n\t\tskeletonData->_events.ensureCapacity(events->_size);\n\t\tskeletonData->_events.setSize(events->_size, 0);\n\t\tfor (eventMap = events->_child, i = 0; eventMap; eventMap = eventMap->_next, ++i) {\n\t\t\tEventData *eventData = new (__FILE__, __LINE__) EventData(String(eventMap->_name));\n\n\t\t\teventData->_intValue = Json::getInt(eventMap, \"int\", 0);\n\t\t\teventData->_floatValue = Json::getFloat(eventMap, \"float\", 0);\n\t\t\tconst char *stringValue = Json::getString(eventMap, \"string\", 0);\n\t\t\teventData->_stringValue = stringValue;\n\t\t\tconst char *audioPath = Json::getString(eventMap, \"audio\", 0);\n\t\t\teventData->_audioPath = audioPath;\n\t\t\tif (audioPath) {\n\t\t\t\teventData->_volume = Json::getFloat(eventMap, \"volume\", 1);\n\t\t\t\teventData->_balance = Json::getFloat(eventMap, \"balance\", 0);\n\t\t\t}\n\t\t\tskeletonData->_events[i] = eventData;\n\t\t}\n\t}\n\n\t/* Animations. */\n\tanimations = Json::getItem(root, \"animations\");\n\tif (animations) {\n\t\tJson *animationMap;\n\t\tskeletonData->_animations.ensureCapacity(animations->_size);\n\t\tskeletonData->_animations.setSize(animations->_size, 0);\n\t\tint animationsIndex = 0;\n\t\tfor (animationMap = animations->_child; animationMap; animationMap = animationMap->_next) {\n\t\t\tAnimation *animation = readAnimation(animationMap, skeletonData);\n\t\t\tif (!animation) {\n\t\t\t\tdelete skeletonData;\n\t\t\t\tdelete root;\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\tskeletonData->_animations[animationsIndex++] = animation;\n\t\t}\n\t}\n\n\tdelete root;\n\n\treturn skeletonData;\n}\n\nSequence *SkeletonJson::readSequence(Json *item) {\n\tif (item == NULL) return NULL;\n\tSequence *sequence = new Sequence(Json::getInt(item, \"count\", 0));\n\tsequence->_start = Json::getInt(item, \"start\", 1);\n\tsequence->_digits = Json::getInt(item, \"digits\", 0);\n\tsequence->_setupIndex = Json::getInt(item, \"setupIndex\", 0);\n\treturn sequence;\n}\n\nvoid SkeletonJson::setBezier(CurveTimeline *timeline, int frame, int value, int bezier, float time1, float value1, float cx1,\n\t\t\t\t\t\t\t float cy1,\n\t\t\t\t\t\t\t float cx2, float cy2, float time2, float value2) {\n\ttimeline->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n}\n\nint SkeletonJson::readCurve(Json *curve, CurveTimeline *timeline, int bezier, int frame, int value, float time1,\n\t\t\t\t\t\t\tfloat time2,\n\t\t\t\t\t\t\tfloat value1, float value2, float scale) {\n\tif (curve->_type == Json::JSON_STRING && strcmp(curve->_valueString, \"stepped\") == 0) {\n\t\ttimeline->setStepped(frame);\n\t\treturn bezier;\n\t}\n\tcurve = Json::getItem(curve, value << 2);\n\tfloat cx1 = curve->_valueFloat;\n\tcurve = curve->_next;\n\tfloat cy1 = curve->_valueFloat * scale;\n\tcurve = curve->_next;\n\tfloat cx2 = curve->_valueFloat;\n\tcurve = curve->_next;\n\tfloat cy2 = curve->_valueFloat * scale;\n\tsetBezier(timeline, frame, value, bezier, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n\treturn bezier + 1;\n}\n\nTimeline *SkeletonJson::readTimeline(Json *keyMap, CurveTimeline1 *timeline, float defaultValue, float scale) {\n\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\tfloat value = Json::getFloat(keyMap, \"value\", defaultValue) * scale;\n\tint bezier = 0;\n\tfor (int frame = 0;; frame++) {\n\t\ttimeline->setFrame(frame, time, value);\n\t\tJson *nextMap = keyMap->_next;\n\t\tif (!nextMap) break;\n\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\tfloat value2 = Json::getFloat(nextMap, \"value\", defaultValue) * scale;\n\t\tJson *curve = Json::getItem(keyMap, \"curve\");\n\t\tif (curve != NULL) bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\n\t\ttime = time2;\n\t\tvalue = value2;\n\t\tkeyMap = nextMap;\n\t}\n\t// timeline.shrink(); // BOZO\n\treturn timeline;\n}\n\nTimeline *SkeletonJson::readTimeline(Json *keyMap, CurveTimeline2 *timeline, const char *name1, const char *name2,\n\t\t\t\t\t\t\t\t\t float defaultValue, float scale) {\n\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\tfloat value1 = Json::getFloat(keyMap, name1, defaultValue) * scale;\n\tfloat value2 = Json::getFloat(keyMap, name2, defaultValue) * scale;\n\tint bezier = 0;\n\tfor (int frame = 0;; frame++) {\n\t\ttimeline->setFrame(frame, time, value1, value2);\n\t\tJson *nextMap = keyMap->_next;\n\t\tif (!nextMap) break;\n\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\tfloat nvalue1 = Json::getFloat(nextMap, name1, defaultValue) * scale;\n\t\tfloat nvalue2 = Json::getFloat(nextMap, name2, defaultValue) * scale;\n\t\tJson *curve = Json::getItem(keyMap, \"curve\");\n\t\tif (curve != NULL) {\n\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\n\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\n\t\t}\n\t\ttime = time2;\n\t\tvalue1 = nvalue1;\n\t\tvalue2 = nvalue2;\n\t\tkeyMap = nextMap;\n\t}\n\t// timeline.shrink(); // BOZO\n\treturn timeline;\n}\n\nint SkeletonJson::findSlotIndex(SkeletonData *skeletonData, const String &slotName, Vector<Timeline *> timelines) {\n\tint slotIndex = ContainerUtil::findIndexWithName(skeletonData->getSlots(), slotName);\n\tif (slotIndex == -1) {\n\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\tsetError(NULL, \"Slot not found: \", slotName);\n\t}\n\treturn slotIndex;\n}\n\nAnimation *SkeletonJson::readAnimation(Json *root, SkeletonData *skeletonData) {\n\tVector<Timeline *> timelines;\n\tJson *bones = Json::getItem(root, \"bones\");\n\tJson *slots = Json::getItem(root, \"slots\");\n\tJson *ik = Json::getItem(root, \"ik\");\n\tJson *transform = Json::getItem(root, \"transform\");\n\tJson *paths = Json::getItem(root, \"path\");\n\tJson *physics = Json::getItem(root, \"physics\");\n\tJson *attachments = Json::getItem(root, \"attachments\");\n\tJson *drawOrder = Json::getItem(root, \"drawOrder\");\n\tJson *events = Json::getItem(root, \"events\");\n\tJson *boneMap, *slotMap, *keyMap, *nextMap, *curve;\n\tint frame, bezier;\n\tColor color, color2, newColor, newColor2;\n\n\t/** Slot timelines. */\n\tfor (slotMap = slots ? slots->_child : 0; slotMap; slotMap = slotMap->_next) {\n\t\tint slotIndex = findSlotIndex(skeletonData, slotMap->_name, timelines);\n\t\tif (slotIndex == -1) return NULL;\n\n\t\tfor (Json *timelineMap = slotMap->_child; timelineMap; timelineMap = timelineMap->_next) {\n\t\t\tint frames = timelineMap->_size;\n\t\t\tif (strcmp(timelineMap->_name, \"attachment\") == 0) {\n\t\t\t\tAttachmentTimeline *timeline = new (__FILE__, __LINE__) AttachmentTimeline(frames, slotIndex);\n\t\t\t\tfor (keyMap = timelineMap->_child, frame = 0; keyMap; keyMap = keyMap->_next, ++frame) {\n\t\t\t\t\ttimeline->setFrame(frame, Json::getFloat(keyMap, \"time\", 0),\n\t\t\t\t\t\t\t\t\t   Json::getItem(keyMap, \"name\") ? Json::getItem(keyMap, \"name\")->_valueString : NULL);\n\t\t\t\t}\n\t\t\t\ttimelines.add(timeline);\n\n\t\t\t} else if (strcmp(timelineMap->_name, \"rgba\") == 0) {\n\t\t\t\tRGBATimeline *timeline = new (__FILE__, __LINE__) RGBATimeline(frames, frames << 2, slotIndex);\n\t\t\t\tkeyMap = timelineMap->_child;\n\t\t\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\t\t\ttoColor(color, Json::getString(keyMap, \"color\", 0), true);\n\n\t\t\t\tfor (frame = 0, bezier = 0;; ++frame) {\n\t\t\t\t\ttimeline->setFrame(frame, time, color.r, color.g, color.b, color.a);\n\t\t\t\t\tnextMap = keyMap->_next;\n\t\t\t\t\tif (!nextMap) {\n\t\t\t\t\t\t// timeline.shrink(); // BOZO\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\t\t\t\ttoColor(newColor, Json::getString(nextMap, \"color\", 0), true);\n\t\t\t\t\tcurve = Json::getItem(keyMap, \"curve\");\n\t\t\t\t\tif (curve) {\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n\t\t\t\t\t}\n\t\t\t\t\ttime = time2;\n\t\t\t\t\tcolor = newColor;\n\t\t\t\t\tkeyMap = nextMap;\n\t\t\t\t}\n\t\t\t\ttimelines.add(timeline);\n\t\t\t} else if (strcmp(timelineMap->_name, \"rgb\") == 0) {\n\t\t\t\tRGBTimeline *timeline = new (__FILE__, __LINE__) RGBTimeline(frames, frames * 3, slotIndex);\n\t\t\t\tkeyMap = timelineMap->_child;\n\t\t\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\t\t\ttoColor(color, Json::getString(keyMap, \"color\", 0), false);\n\n\t\t\t\tfor (frame = 0, bezier = 0;; ++frame) {\n\t\t\t\t\ttimeline->setFrame(frame, time, color.r, color.g, color.b);\n\t\t\t\t\tnextMap = keyMap->_next;\n\t\t\t\t\tif (!nextMap) {\n\t\t\t\t\t\t// timeline.shrink(); // BOZO\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\t\t\t\ttoColor(newColor, Json::getString(nextMap, \"color\", 0), false);\n\t\t\t\t\tcurve = Json::getItem(keyMap, \"curve\");\n\t\t\t\t\tif (curve) {\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n\t\t\t\t\t}\n\t\t\t\t\ttime = time2;\n\t\t\t\t\tcolor = newColor;\n\t\t\t\t\tkeyMap = nextMap;\n\t\t\t\t}\n\t\t\t\ttimelines.add(timeline);\n\t\t\t} else if (strcmp(timelineMap->_name, \"alpha\") == 0) {\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child,\n\t\t\t\t\t\t\t\t\t\t   new (__FILE__, __LINE__) AlphaTimeline(frames, frames, slotIndex),\n\t\t\t\t\t\t\t\t\t\t   0, 1));\n\t\t\t} else if (strcmp(timelineMap->_name, \"rgba2\") == 0) {\n\t\t\t\tRGBA2Timeline *timeline = new (__FILE__, __LINE__) RGBA2Timeline(frames, frames * 7, slotIndex);\n\t\t\t\tkeyMap = timelineMap->_child;\n\t\t\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\t\t\ttoColor(color, Json::getString(keyMap, \"light\", 0), true);\n\t\t\t\ttoColor(color2, Json::getString(keyMap, \"dark\", 0), false);\n\n\t\t\t\tfor (frame = 0, bezier = 0;; ++frame) {\n\t\t\t\t\ttimeline->setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n\t\t\t\t\tnextMap = keyMap->_next;\n\t\t\t\t\tif (!nextMap) {\n\t\t\t\t\t\t// timeline.shrink(); // BOZO\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\t\t\t\ttoColor(newColor, Json::getString(nextMap, \"light\", 0), true);\n\t\t\t\t\ttoColor(newColor2, Json::getString(nextMap, \"dark\", 0), false);\n\t\t\t\t\tcurve = Json::getItem(keyMap, \"curve\");\n\t\t\t\t\tif (curve) {\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\n\t\t\t\t\t}\n\t\t\t\t\ttime = time2;\n\t\t\t\t\tcolor = newColor;\n\t\t\t\t\tcolor2 = newColor2;\n\t\t\t\t\tkeyMap = nextMap;\n\t\t\t\t}\n\t\t\t\ttimelines.add(timeline);\n\t\t\t} else if (strcmp(timelineMap->_name, \"rgb2\") == 0) {\n\t\t\t\tRGBA2Timeline *timeline = new (__FILE__, __LINE__) RGBA2Timeline(frames, frames * 6, slotIndex);\n\t\t\t\tkeyMap = timelineMap->_child;\n\t\t\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\t\t\ttoColor(color, Json::getString(keyMap, \"light\", 0), false);\n\t\t\t\ttoColor(color2, Json::getString(keyMap, \"dark\", 0), false);\n\n\t\t\t\tfor (frame = 0, bezier = 0;; ++frame) {\n\t\t\t\t\ttimeline->setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n\t\t\t\t\tnextMap = keyMap->_next;\n\t\t\t\t\tif (!nextMap) {\n\t\t\t\t\t\t// timeline.shrink(); // BOZO\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\t\t\t\ttoColor(newColor, Json::getString(nextMap, \"light\", 0), false);\n\t\t\t\t\ttoColor(newColor2, Json::getString(nextMap, \"dark\", 0), false);\n\t\t\t\t\tcurve = Json::getItem(keyMap, \"curve\");\n\t\t\t\t\tif (curve) {\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\n\t\t\t\t\t}\n\t\t\t\t\ttime = time2;\n\t\t\t\t\tcolor = newColor;\n\t\t\t\t\tcolor2 = newColor2;\n\t\t\t\t\tkeyMap = nextMap;\n\t\t\t\t}\n\t\t\t\ttimelines.add(timeline);\n\t\t\t} else {\n\t\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\t\tsetError(NULL, \"Invalid timeline type for a slot: \", timelineMap->_name);\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Bone timelines. */\n\tfor (boneMap = bones ? bones->_child : 0; boneMap; boneMap = boneMap->_next) {\n\t\tint boneIndex = ContainerUtil::findIndexWithName(skeletonData->_bones, boneMap->_name);\n\t\tif (boneIndex == -1) {\n\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\tsetError(NULL, \"Bone not found: \", boneMap->_name);\n\t\t\treturn NULL;\n\t\t}\n\n\t\tfor (Json *timelineMap = boneMap->_child; timelineMap; timelineMap = timelineMap->_next) {\n\t\t\tint frames = timelineMap->_size;\n\t\t\tif (frames == 0) continue;\n\n\t\t\tif (strcmp(timelineMap->_name, \"rotate\") == 0) {\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child,\n\t\t\t\t\t\t\t\t\t\t   new RotateTimeline(frames, frames, boneIndex), 0,\n\t\t\t\t\t\t\t\t\t\t   1));\n\t\t\t} else if (strcmp(timelineMap->_name, \"translate\") == 0) {\n\t\t\t\tTranslateTimeline *timeline = new TranslateTimeline(frames, frames << 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboneIndex);\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child, timeline, \"x\", \"y\", 0, _scale));\n\t\t\t} else if (strcmp(timelineMap->_name, \"translatex\") == 0) {\n\t\t\t\tTranslateXTimeline *timeline = new TranslateXTimeline(frames, frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  boneIndex);\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child, timeline, 0, _scale));\n\t\t\t} else if (strcmp(timelineMap->_name, \"translatey\") == 0) {\n\t\t\t\tTranslateYTimeline *timeline = new TranslateYTimeline(frames, frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  boneIndex);\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child, timeline, 0, _scale));\n\t\t\t} else if (strcmp(timelineMap->_name, \"scale\") == 0) {\n\t\t\t\tScaleTimeline *timeline = new (__FILE__, __LINE__) ScaleTimeline(frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t frames << 1, boneIndex);\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child, timeline, \"x\", \"y\", 1, 1));\n\t\t\t} else if (strcmp(timelineMap->_name, \"scalex\") == 0) {\n\t\t\t\tScaleXTimeline *timeline = new (__FILE__, __LINE__) ScaleXTimeline(frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   frames, boneIndex);\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child, timeline, 1, 1));\n\t\t\t} else if (strcmp(timelineMap->_name, \"scaley\") == 0) {\n\t\t\t\tScaleYTimeline *timeline = new (__FILE__, __LINE__) ScaleYTimeline(frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   frames, boneIndex);\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child, timeline, 1, 1));\n\t\t\t} else if (strcmp(timelineMap->_name, \"shear\") == 0) {\n\t\t\t\tShearTimeline *timeline = new (__FILE__, __LINE__) ShearTimeline(frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t frames << 1, boneIndex);\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child, timeline, \"x\", \"y\", 0, 1));\n\t\t\t} else if (strcmp(timelineMap->_name, \"shearx\") == 0) {\n\t\t\t\tShearXTimeline *timeline = new (__FILE__, __LINE__) ShearXTimeline(frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   frames, boneIndex);\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child, timeline, 0, 1));\n\t\t\t} else if (strcmp(timelineMap->_name, \"sheary\") == 0) {\n\t\t\t\tShearYTimeline *timeline = new (__FILE__, __LINE__) ShearYTimeline(frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   frames, boneIndex);\n\t\t\t\ttimelines.add(readTimeline(timelineMap->_child, timeline, 0, 1));\n\t\t\t} else if (strcmp(timelineMap->_name, \"inherit\") == 0) {\n\t\t\t\tInheritTimeline *timeline = new (__FILE__, __LINE__) InheritTimeline(frames, boneIndex);\n\t\t\t\tkeyMap = timelineMap->_child;\n\t\t\t\tfor (frame = 0;; frame++) {\n\t\t\t\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\t\t\t\tconst char *value = Json::getString(keyMap, \"inherit\", \"normal\");\n\t\t\t\t\tInherit inherit = Inherit_Normal;\n\t\t\t\t\tif (strcmp(value, \"normal\") == 0) inherit = Inherit_Normal;\n\t\t\t\t\telse if (strcmp(value, \"onlyTranslation\") == 0)\n\t\t\t\t\t\tinherit = Inherit_OnlyTranslation;\n\t\t\t\t\telse if (strcmp(value, \"noRotationOrReflection\") == 0)\n\t\t\t\t\t\tinherit = Inherit_NoRotationOrReflection;\n\t\t\t\t\telse if (strcmp(value, \"noScale\") == 0)\n\t\t\t\t\t\tinherit = Inherit_NoScale;\n\t\t\t\t\telse if (strcmp(value, \"noScaleOrReflection\") == 0)\n\t\t\t\t\t\tinherit = Inherit_NoScaleOrReflection;\n\t\t\t\t\ttimeline->setFrame(frame, time, inherit);\n\t\t\t\t\tnextMap = keyMap->_next;\n\t\t\t\t\tif (!nextMap) break;\n\t\t\t\t\tkeyMap = nextMap;\n\t\t\t\t}\n\t\t\t\ttimelines.add(timeline);\n\t\t\t} else {\n\t\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\t\tsetError(NULL, \"Invalid timeline type for a bone: \", timelineMap->_name);\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** IK constraint timelines. */\n\tfor (Json *constraintMap = ik ? ik->_child : 0; constraintMap; constraintMap = constraintMap->_next) {\n\t\tkeyMap = constraintMap->_child;\n\t\tif (keyMap == NULL) continue;\n\n\t\tIkConstraintData *constraint = skeletonData->findIkConstraint(constraintMap->_name);\n\t\tint constraintIndex = skeletonData->_ikConstraints.indexOf(constraint);\n\t\tIkConstraintTimeline *timeline = new (__FILE__, __LINE__) IkConstraintTimeline(constraintMap->_size,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   constraintMap->_size << 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   constraintIndex);\n\n\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\tfloat mix = Json::getFloat(keyMap, \"mix\", 1);\n\t\tfloat softness = Json::getFloat(keyMap, \"softness\", 0) * _scale;\n\n\t\tfor (frame = 0, bezier = 0;; frame++) {\n\t\t\tint bendDirection = Json::getBoolean(keyMap, \"bendPositive\", true) ? 1 : -1;\n\t\t\ttimeline->setFrame(frame, time, mix, softness, bendDirection, Json::getBoolean(keyMap, \"compress\", false),\n\t\t\t\t\t\t\t   Json::getBoolean(keyMap, \"stretch\", false));\n\t\t\tnextMap = keyMap->_next;\n\t\t\tif (!nextMap) {\n\t\t\t\t// timeline.shrink(); // BOZO\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\t\tfloat mix2 = Json::getFloat(nextMap, \"mix\", 1);\n\t\t\tfloat softness2 = Json::getFloat(nextMap, \"softness\", 0) * _scale;\n\t\t\tcurve = Json::getItem(keyMap, \"curve\");\n\t\t\tif (curve) {\n\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\n\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, _scale);\n\t\t\t}\n\n\t\t\ttime = time2;\n\t\t\tmix = mix2;\n\t\t\tsoftness = softness2;\n\t\t\tkeyMap = nextMap;\n\t\t}\n\n\t\ttimelines.add(timeline);\n\t}\n\n\t/** Transform constraint timelines. */\n\tfor (Json *constraintMap = transform ? transform->_child : 0; constraintMap; constraintMap = constraintMap->_next) {\n\t\tkeyMap = constraintMap->_child;\n\t\tif (keyMap == NULL) continue;\n\n\t\tTransformConstraintData *constraint = skeletonData->findTransformConstraint(constraintMap->_name);\n\t\tint constraintIndex = skeletonData->_transformConstraints.indexOf(constraint);\n\t\tTransformConstraintTimeline *timeline = new (__FILE__, __LINE__) TransformConstraintTimeline(\n\t\t\t\tconstraintMap->_size, constraintMap->_size * 6, constraintIndex);\n\n\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\tfloat mixRotate = Json::getFloat(keyMap, \"mixRotate\", 1);\n\t\tfloat mixShearY = Json::getFloat(keyMap, \"mixShearY\", 1);\n\t\tfloat mixX = Json::getFloat(keyMap, \"mixX\", 1);\n\t\tfloat mixY = Json::getFloat(keyMap, \"mixY\", mixX);\n\t\tfloat mixScaleX = Json::getFloat(keyMap, \"mixScaleX\", 1);\n\t\tfloat mixScaleY = Json::getFloat(keyMap, \"mixScaleY\", mixScaleX);\n\n\t\tfor (frame = 0, bezier = 0;; frame++) {\n\t\t\ttimeline->setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n\t\t\tnextMap = keyMap->_next;\n\t\t\tif (!nextMap) {\n\t\t\t\t// timeline.shrink(); // BOZO\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\t\tfloat mixRotate2 = Json::getFloat(nextMap, \"mixRotate\", 1);\n\t\t\tfloat mixShearY2 = Json::getFloat(nextMap, \"mixShearY\", 1);\n\t\t\tfloat mixX2 = Json::getFloat(nextMap, \"mixX\", 1);\n\t\t\tfloat mixY2 = Json::getFloat(nextMap, \"mixY\", mixX2);\n\t\t\tfloat mixScaleX2 = Json::getFloat(nextMap, \"mixScaleX\", 1);\n\t\t\tfloat mixScaleY2 = Json::getFloat(nextMap, \"mixScaleY\", mixScaleX2);\n\t\t\tcurve = Json::getItem(keyMap, \"curve\");\n\t\t\tif (curve) {\n\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n\t\t\t}\n\n\t\t\ttime = time2;\n\t\t\tmixRotate = mixRotate2;\n\t\t\tmixX = mixX2;\n\t\t\tmixY = mixY2;\n\t\t\tmixScaleX = mixScaleX2;\n\t\t\tmixScaleY = mixScaleY2;\n\t\t\tmixScaleX = mixScaleX2;\n\t\t\tkeyMap = nextMap;\n\t\t}\n\n\t\ttimelines.add(timeline);\n\t}\n\n\t/** Path constraint timelines. */\n\tfor (Json *constraintMap = paths ? paths->_child : 0; constraintMap; constraintMap = constraintMap->_next) {\n\t\tPathConstraintData *constraint = skeletonData->findPathConstraint(constraintMap->_name);\n\t\tif (!constraint) {\n\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\tsetError(NULL, \"Path constraint not found: \", constraintMap->_name);\n\t\t\treturn NULL;\n\t\t}\n\t\tint constraintIndex = skeletonData->_pathConstraints.indexOf(constraint);\n\t\tfor (Json *timelineMap = constraintMap->_child; timelineMap; timelineMap = timelineMap->_next) {\n\t\t\tkeyMap = timelineMap->_child;\n\t\t\tif (keyMap == NULL) continue;\n\t\t\tconst char *timelineName = timelineMap->_name;\n\t\t\tint frames = timelineMap->_size;\n\t\t\tif (strcmp(timelineName, \"position\") == 0) {\n\t\t\t\tPathConstraintPositionTimeline *timeline = new (__FILE__, __LINE__) PathConstraintPositionTimeline(\n\t\t\t\t\t\tframes, frames, constraintIndex);\n\t\t\t\ttimelines.add(\n\t\t\t\t\t\treadTimeline(keyMap, timeline, 0, constraint->_positionMode == PositionMode_Fixed ? _scale : 1));\n\t\t\t} else if (strcmp(timelineName, \"spacing\") == 0) {\n\t\t\t\tCurveTimeline1 *timeline = new PathConstraintSpacingTimeline(frames, frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t constraintIndex);\n\t\t\t\ttimelines.add(readTimeline(keyMap, timeline, 0,\n\t\t\t\t\t\t\t\t\t\t   constraint->_spacingMode == SpacingMode_Length ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   constraint->_spacingMode == SpacingMode_Fixed\n\t\t\t\t\t\t\t\t\t\t\t\t   ? _scale\n\t\t\t\t\t\t\t\t\t\t\t\t   : 1));\n\t\t\t} else if (strcmp(timelineName, \"mix\") == 0) {\n\t\t\t\tPathConstraintMixTimeline *timeline = new PathConstraintMixTimeline(frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tframes * 3, constraintIndex);\n\t\t\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\t\t\tfloat mixRotate = Json::getFloat(keyMap, \"mixRotate\", 1);\n\t\t\t\tfloat mixX = Json::getFloat(keyMap, \"mixX\", 1);\n\t\t\t\tfloat mixY = Json::getFloat(keyMap, \"mixY\", mixX);\n\t\t\t\tfor (frame = 0, bezier = 0;; frame++) {\n\t\t\t\t\ttimeline->setFrame(frame, time, mixRotate, mixX, mixY);\n\t\t\t\t\tnextMap = keyMap->_next;\n\t\t\t\t\tif (!nextMap) {\n\t\t\t\t\t\t// timeline.shrink(); // BOZO\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\t\t\t\tfloat mixRotate2 = Json::getFloat(nextMap, \"mixRotate\", 1);\n\t\t\t\t\tfloat mixX2 = Json::getFloat(nextMap, \"mixX\", 1);\n\t\t\t\t\tfloat mixY2 = Json::getFloat(nextMap, \"mixY\", mixX2);\n\t\t\t\t\tcurve = Json::getItem(keyMap, \"curve\");\n\t\t\t\t\tif (curve != NULL) {\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n\t\t\t\t\t}\n\t\t\t\t\ttime = time2;\n\t\t\t\t\tmixRotate = mixRotate2;\n\t\t\t\t\tmixX = mixX2;\n\t\t\t\t\tmixY = mixY2;\n\t\t\t\t\tkeyMap = nextMap;\n\t\t\t\t}\n\t\t\t\ttimelines.add(timeline);\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Physics constraint timelines. */\n\tfor (Json *constraintMap = physics ? physics->_child : 0; constraintMap; constraintMap = constraintMap->_next) {\n\t\tint index = -1;\n\t\tif (constraintMap->_name && strlen(constraintMap->_name) > 0) {\n\t\t\tPhysicsConstraintData *constraint = skeletonData->findPhysicsConstraint(constraintMap->_name);\n\t\t\tif (!constraint) {\n\t\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\t\tsetError(NULL, \"Physics constraint not found: \", constraintMap->_name);\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\tindex = skeletonData->_physicsConstraints.indexOf(constraint);\n\t\t}\n\t\tfor (Json *timelineMap = constraintMap->_child; timelineMap; timelineMap = timelineMap->_next) {\n\t\t\tkeyMap = timelineMap->_child;\n\t\t\tif (keyMap == NULL) continue;\n\t\t\tconst char *timelineName = timelineMap->_name;\n\t\t\tint frames = timelineMap->_size;\n\t\t\tif (strcmp(timelineName, \"reset\") == 0) {\n\t\t\t\tPhysicsConstraintResetTimeline *timeline = new (__FILE__, __LINE__) PhysicsConstraintResetTimeline(frames, index);\n\t\t\t\tfor (frame = 0; keyMap != nullptr; keyMap = keyMap->_next, frame++) {\n\t\t\t\t\ttimeline->setFrame(frame, Json::getFloat(keyMap, \"time\", 0));\n\t\t\t\t}\n\t\t\t\ttimelines.add(timeline);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tCurveTimeline1 *timeline = nullptr;\n\t\t\tif (strcmp(timelineName, \"inertia\") == 0) {\n\t\t\t\ttimeline = new PhysicsConstraintInertiaTimeline(frames, frames, index);\n\t\t\t} else if (strcmp(timelineName, \"strength\") == 0) {\n\t\t\t\ttimeline = new PhysicsConstraintStrengthTimeline(frames, frames, index);\n\t\t\t} else if (strcmp(timelineName, \"damping\") == 0) {\n\t\t\t\ttimeline = new PhysicsConstraintDampingTimeline(frames, frames, index);\n\t\t\t} else if (strcmp(timelineName, \"mass\") == 0) {\n\t\t\t\ttimeline = new PhysicsConstraintMassTimeline(frames, frames, index);\n\t\t\t} else if (strcmp(timelineName, \"wind\") == 0) {\n\t\t\t\ttimeline = new PhysicsConstraintWindTimeline(frames, frames, index);\n\t\t\t} else if (strcmp(timelineName, \"gravity\") == 0) {\n\t\t\t\ttimeline = new PhysicsConstraintGravityTimeline(frames, frames, index);\n\t\t\t} else if (strcmp(timelineName, \"mix\") == 0) {\n\t\t\t\ttimeline = new PhysicsConstraintMixTimeline(frames, frames, index);\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttimelines.add(readTimeline(keyMap, timeline, 0, 1));\n\t\t}\n\t}\n\n\t/** Attachment timelines. */\n\tfor (Json *attachmenstMap = attachments ? attachments->_child : NULL; attachmenstMap; attachmenstMap = attachmenstMap->_next) {\n\t\tSkin *skin = skeletonData->findSkin(attachmenstMap->_name);\n\t\tfor (slotMap = attachmenstMap->_child; slotMap; slotMap = slotMap->_next) {\n\t\t\tint slotIndex = findSlotIndex(skeletonData, slotMap->_name, timelines);\n\t\t\tif (slotIndex == -1) return NULL;\n\n\t\t\tfor (Json *attachmentMap = slotMap->_child; attachmentMap; attachmentMap = attachmentMap->_next) {\n\t\t\t\tAttachment *attachment = skin->getAttachment(slotIndex, attachmentMap->_name);\n\t\t\t\tif (!attachment) {\n\t\t\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\t\t\tsetError(NULL, \"Attachment not found: \", attachmentMap->_name);\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\n\t\t\t\tfor (Json *timelineMap = attachmentMap->_child; timelineMap; timelineMap = timelineMap->_next) {\n\t\t\t\t\tkeyMap = timelineMap->_child;\n\t\t\t\t\tif (keyMap == NULL) continue;\n\t\t\t\t\tint frames = timelineMap->_size;\n\t\t\t\t\tString timelineName = timelineMap->_name;\n\t\t\t\t\tif (timelineName == \"deform\") {\n\t\t\t\t\t\tVertexAttachment *vertexAttachment = static_cast<VertexAttachment *>(attachment);\n\t\t\t\t\t\tbool weighted = vertexAttachment->_bones.size() != 0;\n\t\t\t\t\t\tVector<float> &verts = vertexAttachment->_vertices;\n\t\t\t\t\t\tint deformLength = weighted ? (int) verts.size() / 3 * 2 : (int) verts.size();\n\n\t\t\t\t\t\tDeformTimeline *timeline = new (__FILE__, __LINE__) DeformTimeline(frames,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   frames, slotIndex, vertexAttachment);\n\t\t\t\t\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\t\t\t\t\tfor (frame = 0, bezier = 0;; frame++) {\n\t\t\t\t\t\t\tJson *vertices = Json::getItem(keyMap, \"vertices\");\n\t\t\t\t\t\t\tVector<float> deformed;\n\t\t\t\t\t\t\tif (!vertices) {\n\t\t\t\t\t\t\t\tif (weighted) {\n\t\t\t\t\t\t\t\t\tdeformed.setSize(deformLength, 0);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdeformed.clearAndAddAll(vertexAttachment->_vertices);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdeformed.setSize(deformLength, 0);\n\t\t\t\t\t\t\t\tint v, start = Json::getInt(keyMap, \"offset\", 0);\n\t\t\t\t\t\t\t\tJson *vertex;\n\t\t\t\t\t\t\t\tif (_scale == 1) {\n\t\t\t\t\t\t\t\t\tfor (vertex = vertices->_child, v = start; vertex; vertex = vertex->_next, ++v) {\n\t\t\t\t\t\t\t\t\t\tdeformed[v] = vertex->_valueFloat;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfor (vertex = vertices->_child, v = start; vertex; vertex = vertex->_next, ++v) {\n\t\t\t\t\t\t\t\t\t\tdeformed[v] = vertex->_valueFloat * _scale;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!weighted) {\n\t\t\t\t\t\t\t\t\tVector<float> &verticesAttachment = vertexAttachment->_vertices;\n\t\t\t\t\t\t\t\t\tfor (v = 0; v < deformLength; ++v) {\n\t\t\t\t\t\t\t\t\t\tdeformed[v] += verticesAttachment[v];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttimeline->setFrame(frame, time, deformed);\n\t\t\t\t\t\t\tnextMap = keyMap->_next;\n\t\t\t\t\t\t\tif (!nextMap) {\n\t\t\t\t\t\t\t\t// timeline.shrink(); // BOZO\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfloat time2 = Json::getFloat(nextMap, \"time\", 0);\n\t\t\t\t\t\t\tcurve = Json::getItem(keyMap, \"curve\");\n\t\t\t\t\t\t\tif (curve) {\n\t\t\t\t\t\t\t\tbezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttime = time2;\n\t\t\t\t\t\t\tkeyMap = nextMap;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\t} else if (timelineName == \"sequence\") {\n\t\t\t\t\t\tSequenceTimeline *timeline = new SequenceTimeline(frames, slotIndex, attachment);\n\t\t\t\t\t\tfloat lastDelay = 0;\n\t\t\t\t\t\tfor (frame = 0; keyMap != NULL; keyMap = keyMap->_next, frame++) {\n\t\t\t\t\t\t\tfloat delay = Json::getFloat(keyMap, \"delay\", lastDelay);\n\t\t\t\t\t\t\tfloat time = Json::getFloat(keyMap, \"time\", 0);\n\t\t\t\t\t\t\tString modeString = Json::getString(keyMap, \"mode\", \"hold\");\n\t\t\t\t\t\t\tint index = Json::getInt(keyMap, \"index\", 0);\n\t\t\t\t\t\t\tSequenceMode mode = SequenceMode::hold;\n\t\t\t\t\t\t\tif (modeString == \"once\") mode = SequenceMode::once;\n\t\t\t\t\t\t\tif (modeString == \"loop\") mode = SequenceMode::loop;\n\t\t\t\t\t\t\tif (modeString == \"pingpong\") mode = SequenceMode::pingpong;\n\t\t\t\t\t\t\tif (modeString == \"onceReverse\") mode = SequenceMode::onceReverse;\n\t\t\t\t\t\t\tif (modeString == \"loopReverse\") mode = SequenceMode::loopReverse;\n\t\t\t\t\t\t\tif (modeString == \"pingpongReverse\") mode = SequenceMode::pingpongReverse;\n\t\t\t\t\t\t\ttimeline->setFrame(frame, time, mode, index, delay);\n\t\t\t\t\t\t\tlastDelay = delay;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.add(timeline);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Draw order timeline. */\n\tif (drawOrder) {\n\t\tDrawOrderTimeline *timeline = new (__FILE__, __LINE__) DrawOrderTimeline(drawOrder->_size);\n\n\t\tfor (keyMap = drawOrder->_child, frame = 0; keyMap; keyMap = keyMap->_next, ++frame) {\n\t\t\tint ii;\n\t\t\tVector<int> drawOrder2;\n\t\t\tJson *offsets = Json::getItem(keyMap, \"offsets\");\n\t\t\tif (offsets) {\n\t\t\t\tJson *offsetMap;\n\t\t\t\tVector<int> unchanged;\n\t\t\t\tunchanged.ensureCapacity(skeletonData->_slots.size() - offsets->_size);\n\t\t\t\tunchanged.setSize(skeletonData->_slots.size() - offsets->_size, 0);\n\t\t\t\tsize_t originalIndex = 0, unchangedIndex = 0;\n\n\t\t\t\tdrawOrder2.ensureCapacity(skeletonData->_slots.size());\n\t\t\t\tdrawOrder2.setSize(skeletonData->_slots.size(), 0);\n\t\t\t\tfor (ii = (int) skeletonData->_slots.size() - 1; ii >= 0; --ii)\n\t\t\t\t\tdrawOrder2[ii] = -1;\n\n\t\t\t\tfor (offsetMap = offsets->_child; offsetMap; offsetMap = offsetMap->_next) {\n\t\t\t\t\tint slotIndex = findSlotIndex(skeletonData, Json::getString(offsetMap, \"slot\", 0), timelines);\n\t\t\t\t\tif (slotIndex == -1) return NULL;\n\n\t\t\t\t\t/* Collect unchanged items. */\n\t\t\t\t\twhile (originalIndex != (size_t) slotIndex)\n\t\t\t\t\t\tunchanged[unchangedIndex++] = (int) originalIndex++;\n\t\t\t\t\t/* Set changed items. */\n\t\t\t\t\tdrawOrder2[originalIndex + Json::getInt(offsetMap, \"offset\", 0)] = (int) originalIndex;\n\t\t\t\t\toriginalIndex++;\n\t\t\t\t}\n\t\t\t\t/* Collect remaining unchanged items. */\n\t\t\t\twhile ((int) originalIndex < (int) skeletonData->_slots.size())\n\t\t\t\t\tunchanged[unchangedIndex++] = (int) originalIndex++;\n\t\t\t\t/* Fill in unchanged items. */\n\t\t\t\tfor (ii = (int) skeletonData->_slots.size() - 1; ii >= 0; ii--)\n\t\t\t\t\tif (drawOrder2[ii] == -1) drawOrder2[ii] = unchanged[--unchangedIndex];\n\t\t\t}\n\t\t\ttimeline->setFrame(frame, Json::getFloat(keyMap, \"time\", 0), drawOrder2);\n\t\t}\n\t\ttimelines.add(timeline);\n\t}\n\n\t/** Event timeline. */\n\tif (events) {\n\t\tEventTimeline *timeline = new (__FILE__, __LINE__) EventTimeline(events->_size);\n\n\t\tfor (keyMap = events->_child, frame = 0; keyMap; keyMap = keyMap->_next, ++frame) {\n\t\t\tEvent *event;\n\t\t\tEventData *eventData = skeletonData->findEvent(Json::getString(keyMap, \"name\", 0));\n\t\t\tif (!eventData) {\n\t\t\t\tContainerUtil::cleanUpVectorOfPointers(timelines);\n\t\t\t\tsetError(NULL, \"Event not found: \", Json::getString(keyMap, \"name\", 0));\n\t\t\t\treturn NULL;\n\t\t\t}\n\n\t\t\tevent = new (__FILE__, __LINE__) Event(Json::getFloat(keyMap, \"time\", 0), *eventData);\n\t\t\tevent->_intValue = Json::getInt(keyMap, \"int\", eventData->_intValue);\n\t\t\tevent->_floatValue = Json::getFloat(keyMap, \"float\", eventData->_floatValue);\n\t\t\tevent->_stringValue = Json::getString(keyMap, \"string\", eventData->_stringValue.buffer());\n\t\t\tif (!eventData->_audioPath.isEmpty()) {\n\t\t\t\tevent->_volume = Json::getFloat(keyMap, \"volume\", 1);\n\t\t\t\tevent->_balance = Json::getFloat(keyMap, \"balance\", 0);\n\t\t\t}\n\t\t\ttimeline->setFrame(frame, event);\n\t\t}\n\t\ttimelines.add(timeline);\n\t}\n\n\tfloat duration = 0;\n\tfor (size_t i = 0; i < timelines.size(); i++)\n\t\tduration = MathUtil::max(duration, timelines[i]->getDuration());\n\treturn new (__FILE__, __LINE__) Animation(String(root->_name), timelines, duration);\n}\n\nvoid SkeletonJson::readVertices(Json *attachmentMap, VertexAttachment *attachment, size_t verticesLength) {\n\tJson *entry;\n\tsize_t i, n, nn, entrySize;\n\tVector<float> vertices;\n\n\tattachment->setWorldVerticesLength(verticesLength);\n\n\tentry = Json::getItem(attachmentMap, \"vertices\");\n\tentrySize = entry->_size;\n\tvertices.ensureCapacity(entrySize);\n\tvertices.setSize(entrySize, 0);\n\tfor (entry = entry->_child, i = 0; entry; entry = entry->_next, ++i)\n\t\tvertices[i] = entry->_valueFloat;\n\n\tif (verticesLength == entrySize) {\n\t\tif (_scale != 1) {\n\t\t\tfor (i = 0; i < entrySize; ++i)\n\t\t\t\tvertices[i] *= _scale;\n\t\t}\n\n\t\tattachment->getVertices().clearAndAddAll(vertices);\n\t\treturn;\n\t}\n\n\tVertices bonesAndWeights;\n\tbonesAndWeights._bones.ensureCapacity(verticesLength * 3);\n\tbonesAndWeights._vertices.ensureCapacity(verticesLength * 3 * 3);\n\n\tfor (i = 0, n = entrySize; i < n;) {\n\t\tint boneCount = (int) vertices[i++];\n\t\tbonesAndWeights._bones.add(boneCount);\n\t\tfor (nn = i + boneCount * 4; i < nn; i += 4) {\n\t\t\tbonesAndWeights._bones.add((int) vertices[i]);\n\t\t\tbonesAndWeights._vertices.add(vertices[i + 1] * _scale);\n\t\t\tbonesAndWeights._vertices.add(vertices[i + 2] * _scale);\n\t\t\tbonesAndWeights._vertices.add(vertices[i + 3]);\n\t\t}\n\t}\n\n\tattachment->getVertices().clearAndAddAll(bonesAndWeights._vertices);\n\tattachment->getBones().clearAndAddAll(bonesAndWeights._bones);\n}\n\nvoid SkeletonJson::setError(Json *root, const String &value1, const String &value2) {\n\t_error = String(value1).append(value2);\n\tdelete root;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/SkeletonRenderer.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/SkeletonRenderer.h>\n#include <spine/Skeleton.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n#include <spine/RegionAttachment.h>\n#include <spine/MeshAttachment.h>\n#include <spine/ClippingAttachment.h>\n#include <spine/Bone.h>\n\nusing namespace spine;\n\nSkeletonRenderer::SkeletonRenderer() : _allocator(4096), _worldVertices(), _quadIndices(), _clipping(), _renderCommands() {\n\t_quadIndices.add(0);\n\t_quadIndices.add(1);\n\t_quadIndices.add(2);\n\t_quadIndices.add(2);\n\t_quadIndices.add(3);\n\t_quadIndices.add(0);\n}\n\nSkeletonRenderer::~SkeletonRenderer() {\n}\n\nstatic RenderCommand *createRenderCommand(BlockAllocator &allocator, int numVertices, int32_t numIndices, BlendMode blendMode, void *texture) {\n\tRenderCommand *cmd = allocator.allocate<RenderCommand>(1);\n\tcmd->positions = allocator.allocate<float>(numVertices << 1);\n\tcmd->uvs = allocator.allocate<float>(numVertices << 1);\n\tcmd->colors = allocator.allocate<uint32_t>(numVertices);\n\tcmd->darkColors = allocator.allocate<uint32_t>(numVertices);\n\tcmd->numVertices = numVertices;\n\tcmd->indices = allocator.allocate<uint16_t>(numIndices);\n\tcmd->numIndices = numIndices;\n\tcmd->blendMode = blendMode;\n\tcmd->texture = texture;\n\tcmd->next = nullptr;\n\treturn cmd;\n}\n\nstatic RenderCommand *batchSubCommands(BlockAllocator &allocator, Vector<RenderCommand *> &commands, int first, int last, int numVertices, int numIndices) {\n\tRenderCommand *batched = createRenderCommand(allocator, numVertices, numIndices, commands[first]->blendMode, commands[first]->texture);\n\tfloat *positions = batched->positions;\n\tfloat *uvs = batched->uvs;\n\tuint32_t *colors = batched->colors;\n\tuint32_t *darkColors = batched->darkColors;\n\tuint16_t *indices = batched->indices;\n\tint indicesOffset = 0;\n\tfor (int i = first; i <= last; i++) {\n\t\tRenderCommand *cmd = commands[i];\n\t\tmemcpy(positions, cmd->positions, sizeof(float) * 2 * cmd->numVertices);\n\t\tmemcpy(uvs, cmd->uvs, sizeof(float) * 2 * cmd->numVertices);\n\t\tmemcpy(colors, cmd->colors, sizeof(int32_t) * cmd->numVertices);\n\t\tmemcpy(darkColors, cmd->darkColors, sizeof(int32_t) * cmd->numVertices);\n\t\tfor (int ii = 0; ii < cmd->numIndices; ii++)\n\t\t\tindices[ii] = cmd->indices[ii] + indicesOffset;\n\t\tindicesOffset += cmd->numVertices;\n\t\tpositions += 2 * cmd->numVertices;\n\t\tuvs += 2 * cmd->numVertices;\n\t\tcolors += cmd->numVertices;\n\t\tdarkColors += cmd->numVertices;\n\t\tindices += cmd->numIndices;\n\t}\n\treturn batched;\n}\n\nstatic RenderCommand *batchCommands(BlockAllocator &allocator, Vector<RenderCommand *> &commands) {\n\tif (commands.size() == 0) return nullptr;\n\n\tRenderCommand *root = nullptr;\n\tRenderCommand *last = nullptr;\n\n\tRenderCommand *first = commands[0];\n\tint startIndex = 0;\n\tint i = 1;\n\tint numVertices = first->numVertices;\n\tint numIndices = first->numIndices;\n\twhile (i <= (int) commands.size()) {\n\t\tRenderCommand *cmd = i < (int) commands.size() ? commands[i] : nullptr;\n\n\t\tif (cmd && cmd->numVertices == 0 && cmd->numIndices == 0) {\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (cmd != nullptr && cmd->texture == first->texture &&\n\t\t\tcmd->blendMode == first->blendMode &&\n\t\t\tcmd->colors[0] == first->colors[0] &&\n\t\t\tcmd->darkColors[0] == first->darkColors[0] &&\n\t\t\tnumIndices + cmd->numIndices < 0xffff) {\n\t\t\tnumVertices += cmd->numVertices;\n\t\t\tnumIndices += cmd->numIndices;\n\t\t} else {\n\t\t\tRenderCommand *batched = batchSubCommands(allocator, commands, startIndex, i - 1, numVertices, numIndices);\n\t\t\tif (!last) {\n\t\t\t\troot = last = batched;\n\t\t\t} else {\n\t\t\t\tlast->next = batched;\n\t\t\t\tlast = batched;\n\t\t\t}\n\t\t\tif (i == (int) commands.size()) break;\n\t\t\tfirst = commands[i];\n\t\t\tstartIndex = i;\n\t\t\tnumVertices = first->numVertices;\n\t\t\tnumIndices = first->numIndices;\n\t\t}\n\t\ti++;\n\t}\n\treturn root;\n}\n\nRenderCommand *SkeletonRenderer::render(Skeleton &skeleton) {\n\t_allocator.compress();\n\t_renderCommands.clear();\n\n\tSkeletonClipping &clipper = _clipping;\n\n\tfor (unsigned i = 0; i < skeleton.getSlots().size(); ++i) {\n\t\tSlot &slot = *skeleton.getDrawOrder()[i];\n\t\tAttachment *attachment = slot.getAttachment();\n\t\tif (!attachment) {\n\t\t\tclipper.clipEnd(slot);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Early out if the slot color is 0 or the bone is not active\n\t\tif ((slot.getColor().a == 0 || !slot.getBone().isActive()) && !attachment->getRTTI().isExactly(ClippingAttachment::rtti)) {\n\t\t\tclipper.clipEnd(slot);\n\t\t\tcontinue;\n\t\t}\n\n\t\tVector<float> *worldVertices = &_worldVertices;\n\t\tVector<unsigned short> *quadIndices = &_quadIndices;\n\t\tVector<float> *vertices = worldVertices;\n\t\tint32_t verticesCount;\n\t\tVector<float> *uvs;\n\t\tVector<unsigned short> *indices;\n\t\tint32_t indicesCount;\n\t\tColor *attachmentColor;\n\t\tvoid *texture;\n\n\t\tif (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {\n\t\t\tRegionAttachment *regionAttachment = (RegionAttachment *) attachment;\n\t\t\tattachmentColor = &regionAttachment->getColor();\n\n\t\t\t// Early out if the slot color is 0\n\t\t\tif (attachmentColor->a == 0) {\n\t\t\t\tclipper.clipEnd(slot);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tworldVertices->setSize(8, 0);\n\t\t\tregionAttachment->computeWorldVertices(slot, *worldVertices, 0, 2);\n\t\t\tverticesCount = 4;\n\t\t\tuvs = &regionAttachment->getUVs();\n\t\t\tindices = quadIndices;\n\t\t\tindicesCount = 6;\n\t\t\ttexture = regionAttachment->getRegion()->rendererObject;\n\n\t\t} else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {\n\t\t\tMeshAttachment *mesh = (MeshAttachment *) attachment;\n\t\t\tattachmentColor = &mesh->getColor();\n\n\t\t\t// Early out if the slot color is 0\n\t\t\tif (attachmentColor->a == 0) {\n\t\t\t\tclipper.clipEnd(slot);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tworldVertices->setSize(mesh->getWorldVerticesLength(), 0);\n\t\t\tmesh->computeWorldVertices(slot, 0, mesh->getWorldVerticesLength(), worldVertices->buffer(), 0, 2);\n\t\t\tverticesCount = (int32_t) (mesh->getWorldVerticesLength() >> 1);\n\t\t\tuvs = &mesh->getUVs();\n\t\t\tindices = &mesh->getTriangles();\n\t\t\tindicesCount = (int32_t) indices->size();\n\t\t\ttexture = mesh->getRegion()->rendererObject;\n\n\t\t} else if (attachment->getRTTI().isExactly(ClippingAttachment::rtti)) {\n\t\t\tClippingAttachment *clip = (ClippingAttachment *) slot.getAttachment();\n\t\t\tclipper.clipStart(slot, clip);\n\t\t\tcontinue;\n\t\t} else\n\t\t\tcontinue;\n\n\t\tuint8_t r = static_cast<uint8_t>(skeleton.getColor().r * slot.getColor().r * attachmentColor->r * 255);\n\t\tuint8_t g = static_cast<uint8_t>(skeleton.getColor().g * slot.getColor().g * attachmentColor->g * 255);\n\t\tuint8_t b = static_cast<uint8_t>(skeleton.getColor().b * slot.getColor().b * attachmentColor->b * 255);\n\t\tuint8_t a = static_cast<uint8_t>(skeleton.getColor().a * slot.getColor().a * attachmentColor->a * 255);\n\t\tuint32_t color = (a << 24) | (r << 16) | (g << 8) | b;\n\t\tuint32_t darkColor = 0xff000000;\n\t\tif (slot.hasDarkColor()) {\n\t\t\tColor &slotDarkColor = slot.getDarkColor();\n\t\t\tdarkColor = 0xff000000 | (static_cast<uint8_t>(slotDarkColor.r * 255) << 16) | (static_cast<uint8_t>(slotDarkColor.g * 255) << 8) | static_cast<uint8_t>(slotDarkColor.b * 255);\n\t\t}\n\n\t\tif (clipper.isClipping()) {\n\t\t\tclipper.clipTriangles(*worldVertices, *indices, *uvs, 2);\n\t\t\tvertices = &clipper.getClippedVertices();\n\t\t\tverticesCount = (int32_t) (clipper.getClippedVertices().size() >> 1);\n\t\t\tuvs = &clipper.getClippedUVs();\n\t\t\tindices = &clipper.getClippedTriangles();\n\t\t\tindicesCount = (int32_t) (clipper.getClippedTriangles().size());\n\t\t}\n\n\t\tRenderCommand *cmd = createRenderCommand(_allocator, verticesCount, indicesCount, slot.getData().getBlendMode(), texture);\n\t\t_renderCommands.add(cmd);\n\t\tmemcpy(cmd->positions, vertices->buffer(), (verticesCount << 1) * sizeof(float));\n\t\tmemcpy(cmd->uvs, uvs->buffer(), (verticesCount << 1) * sizeof(float));\n\t\tfor (int ii = 0; ii < verticesCount; ii++) {\n\t\t\tcmd->colors[ii] = color;\n\t\t\tcmd->darkColors[ii] = darkColor;\n\t\t}\n\t\tmemcpy(cmd->indices, indices->buffer(), indices->size() * sizeof(uint16_t));\n\t\tclipper.clipEnd(slot);\n\t}\n\tclipper.clipEnd();\n\n\treturn batchCommands(_allocator, _renderCommands);\n}"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Skin.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Skin.h>\n\n#include <spine/Attachment.h>\n#include <spine/MeshAttachment.h>\n#include <spine/Skeleton.h>\n\n#include <spine/ConstraintData.h>\n#include <spine/Slot.h>\n\n#include <assert.h>\n\nusing namespace spine;\n\nSkin::AttachmentMap::AttachmentMap() {\n}\n\nstatic void disposeAttachment(Attachment *attachment) {\n\tif (!attachment) return;\n\tattachment->dereference();\n\tif (attachment->getRefCount() == 0) delete attachment;\n}\n\nvoid Skin::AttachmentMap::put(size_t slotIndex, const String &attachmentName, Attachment *attachment) {\n\tif (slotIndex >= _buckets.size())\n\t\t_buckets.setSize(slotIndex + 1, Vector<Entry>());\n\tVector<Entry> &bucket = _buckets[slotIndex];\n\tint existing = findInBucket(bucket, attachmentName);\n\tattachment->reference();\n\tif (existing >= 0) {\n\t\tdisposeAttachment(bucket[existing]._attachment);\n\t\tbucket[existing]._attachment = attachment;\n\t} else {\n\t\tbucket.add(Entry(slotIndex, attachmentName, attachment));\n\t}\n}\n\nAttachment *Skin::AttachmentMap::get(size_t slotIndex, const String &attachmentName) {\n\tif (slotIndex >= _buckets.size()) return NULL;\n\tint existing = findInBucket(_buckets[slotIndex], attachmentName);\n\treturn existing >= 0 ? _buckets[slotIndex][existing]._attachment : NULL;\n}\n\nvoid Skin::AttachmentMap::remove(size_t slotIndex, const String &attachmentName) {\n\tif (slotIndex >= _buckets.size()) return;\n\tint existing = findInBucket(_buckets[slotIndex], attachmentName);\n\tif (existing >= 0) {\n\t\tdisposeAttachment(_buckets[slotIndex][existing]._attachment);\n\t\t_buckets[slotIndex].removeAt(existing);\n\t}\n}\n\nint Skin::AttachmentMap::findInBucket(Vector<Entry> &bucket, const String &attachmentName) {\n\tfor (size_t i = 0; i < bucket.size(); i++)\n\t\tif (bucket[i]._name == attachmentName) return (int) i;\n\treturn -1;\n}\n\nSkin::AttachmentMap::Entries Skin::AttachmentMap::getEntries() {\n\treturn Skin::AttachmentMap::Entries(_buckets);\n}\n\nSkin::Skin(const String &name) : _name(name), _attachments(), _color(0.99607843f, 0.61960787f, 0.30980393f, 1) {\n\tassert(_name.length() > 0);\n}\n\nSkin::~Skin() {\n\tSkin::AttachmentMap::Entries entries = _attachments.getEntries();\n\twhile (entries.hasNext()) {\n\t\tSkin::AttachmentMap::Entry entry = entries.next();\n\t\tdisposeAttachment(entry._attachment);\n\t}\n}\n\nvoid Skin::setAttachment(size_t slotIndex, const String &name, Attachment *attachment) {\n\tassert(attachment);\n\t_attachments.put(slotIndex, name, attachment);\n}\n\nAttachment *Skin::getAttachment(size_t slotIndex, const String &name) {\n\treturn _attachments.get(slotIndex, name);\n}\n\nvoid Skin::removeAttachment(size_t slotIndex, const String &name) {\n\t_attachments.remove(slotIndex, name);\n}\n\nvoid Skin::findNamesForSlot(size_t slotIndex, Vector<String> &names) {\n\tSkin::AttachmentMap::Entries entries = _attachments.getEntries();\n\twhile (entries.hasNext()) {\n\t\tSkin::AttachmentMap::Entry &entry = entries.next();\n\t\tif (entry._slotIndex == slotIndex) {\n\t\t\tnames.add(entry._name);\n\t\t}\n\t}\n}\n\nvoid Skin::findAttachmentsForSlot(size_t slotIndex, Vector<Attachment *> &attachments) {\n\tSkin::AttachmentMap::Entries entries = _attachments.getEntries();\n\twhile (entries.hasNext()) {\n\t\tSkin::AttachmentMap::Entry &entry = entries.next();\n\t\tif (entry._slotIndex == slotIndex) attachments.add(entry._attachment);\n\t}\n}\n\nconst String &Skin::getName() {\n\treturn _name;\n}\n\nSkin::AttachmentMap::Entries Skin::getAttachments() {\n\treturn _attachments.getEntries();\n}\n\nvoid Skin::attachAll(Skeleton &skeleton, Skin &oldSkin) {\n\tVector<Slot *> &slots = skeleton.getSlots();\n\tSkin::AttachmentMap::Entries entries = oldSkin.getAttachments();\n\twhile (entries.hasNext()) {\n\t\tSkin::AttachmentMap::Entry &entry = entries.next();\n\t\tint slotIndex = (int) entry._slotIndex;\n\t\tSlot *slot = slots[slotIndex];\n\n\t\tif (slot->getAttachment() == entry._attachment) {\n\t\t\tAttachment *attachment = getAttachment(slotIndex, entry._name);\n\t\t\tif (attachment) slot->setAttachment(attachment);\n\t\t}\n\t}\n}\n\nvoid Skin::addSkin(Skin *other) {\n\tfor (size_t i = 0; i < other->getBones().size(); i++)\n\t\tif (!_bones.contains(other->getBones()[i])) _bones.add(other->getBones()[i]);\n\n\tfor (size_t i = 0; i < other->getConstraints().size(); i++)\n\t\tif (!_constraints.contains(other->getConstraints()[i])) _constraints.add(other->getConstraints()[i]);\n\n\tAttachmentMap::Entries entries = other->getAttachments();\n\twhile (entries.hasNext()) {\n\t\tAttachmentMap::Entry &entry = entries.next();\n\t\tsetAttachment(entry._slotIndex, entry._name, entry._attachment);\n\t}\n}\n\nvoid Skin::copySkin(Skin *other) {\n\tfor (size_t i = 0; i < other->getBones().size(); i++)\n\t\tif (!_bones.contains(other->getBones()[i])) _bones.add(other->getBones()[i]);\n\n\tfor (size_t i = 0; i < other->getConstraints().size(); i++)\n\t\tif (!_constraints.contains(other->getConstraints()[i])) _constraints.add(other->getConstraints()[i]);\n\n\tAttachmentMap::Entries entries = other->getAttachments();\n\twhile (entries.hasNext()) {\n\t\tAttachmentMap::Entry &entry = entries.next();\n\t\tif (entry._attachment->getRTTI().isExactly(MeshAttachment::rtti))\n\t\t\tsetAttachment(entry._slotIndex, entry._name,\n\t\t\t\t\t\t  static_cast<MeshAttachment *>(entry._attachment)->newLinkedMesh());\n\t\telse\n\t\t\tsetAttachment(entry._slotIndex, entry._name, entry._attachment->copy());\n\t}\n}\n\nVector<ConstraintData *> &Skin::getConstraints() {\n\treturn _constraints;\n}\n\nVector<BoneData *> &Skin::getBones() {\n\treturn _bones;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Slot.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Slot.h>\n\n#include <spine/Attachment.h>\n#include <spine/Bone.h>\n#include <spine/Skeleton.h>\n#include <spine/SlotData.h>\n#include <spine/VertexAttachment.h>\n\nusing namespace spine;\n\nSlot::Slot(SlotData &data, Bone &bone) : _data(data),\n\t\t\t\t\t\t\t\t\t\t _bone(bone),\n\t\t\t\t\t\t\t\t\t\t _skeleton(bone.getSkeleton()),\n\t\t\t\t\t\t\t\t\t\t _color(1, 1, 1, 1),\n\t\t\t\t\t\t\t\t\t\t _darkColor(0, 0, 0, 0),\n\t\t\t\t\t\t\t\t\t\t _hasDarkColor(data.hasDarkColor()),\n\t\t\t\t\t\t\t\t\t\t _attachment(NULL),\n\t\t\t\t\t\t\t\t\t\t _attachmentState(0),\n\t\t\t\t\t\t\t\t\t\t _sequenceIndex(0) {\n\tsetToSetupPose();\n}\n\nvoid Slot::setToSetupPose() {\n\t_color.set(_data.getColor());\n\tif (_hasDarkColor) _darkColor.set(_data.getDarkColor());\n\n\tconst String &attachmentName = _data.getAttachmentName();\n\tif (attachmentName.length() > 0) {\n\t\t_attachment = NULL;\n\t\tsetAttachment(_skeleton.getAttachment(_data.getIndex(), attachmentName));\n\t} else {\n\t\tsetAttachment(NULL);\n\t}\n}\n\nSlotData &Slot::getData() {\n\treturn _data;\n}\n\nBone &Slot::getBone() {\n\treturn _bone;\n}\n\nSkeleton &Slot::getSkeleton() {\n\treturn _skeleton;\n}\n\nColor &Slot::getColor() {\n\treturn _color;\n}\n\nColor &Slot::getDarkColor() {\n\treturn _darkColor;\n}\n\nbool Slot::hasDarkColor() {\n\treturn _hasDarkColor;\n}\n\nAttachment *Slot::getAttachment() {\n\treturn _attachment;\n}\n\nvoid Slot::setAttachment(Attachment *inValue) {\n\tif (_attachment == inValue) {\n\t\treturn;\n\t}\n\n\tif (!inValue ||\n\t\t!_attachment ||\n\t\t!inValue->getRTTI().instanceOf(VertexAttachment::rtti) ||\n\t\t!_attachment->getRTTI().instanceOf(VertexAttachment::rtti) ||\n\t\tstatic_cast<VertexAttachment *>(inValue)->getTimelineAttachment() !=\n\t\t\t\tstatic_cast<VertexAttachment *>(_attachment)->getTimelineAttachment()) {\n\t\t_deform.clear();\n\t}\n\n\t_attachment = inValue;\n\t_sequenceIndex = -1;\n}\n\nint Slot::getAttachmentState() {\n\treturn _attachmentState;\n}\n\nvoid Slot::setAttachmentState(int state) {\n\t_attachmentState = state;\n}\n\nVector<float> &Slot::getDeform() {\n\treturn _deform;\n}\n\nint Slot::getSequenceIndex() {\n\treturn _sequenceIndex;\n}\n\nvoid Slot::setSequenceIndex(int index) {\n\t_sequenceIndex = index;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/SlotData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/SlotData.h>\n\n#include <assert.h>\n\nusing namespace spine;\n\nSlotData::SlotData(int index, const String &name, BoneData &boneData) : _index(index),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_name(name),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_boneData(boneData),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_color(1, 1, 1, 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_darkColor(0, 0, 0, 0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_hasDarkColor(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_attachmentName(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_blendMode(BlendMode_Normal),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_visible(true) {\n\tassert(_index >= 0);\n\tassert(_name.length() > 0);\n}\n\nint SlotData::getIndex() {\n\treturn _index;\n}\n\nconst String &SlotData::getName() {\n\treturn _name;\n}\n\nBoneData &SlotData::getBoneData() {\n\treturn _boneData;\n}\n\nColor &SlotData::getColor() {\n\treturn _color;\n}\n\nColor &SlotData::getDarkColor() {\n\treturn _darkColor;\n}\n\nbool SlotData::hasDarkColor() {\n\treturn _hasDarkColor;\n}\n\nvoid SlotData::setHasDarkColor(bool inValue) {\n\t_hasDarkColor = inValue;\n}\n\nconst String &SlotData::getAttachmentName() {\n\treturn _attachmentName;\n}\n\nvoid SlotData::setAttachmentName(const String &inValue) {\n\t_attachmentName = inValue;\n}\n\nBlendMode SlotData::getBlendMode() {\n\treturn _blendMode;\n}\n\nvoid SlotData::setBlendMode(BlendMode inValue) {\n\t_blendMode = inValue;\n}\n\nbool SlotData::isVisible() {\n\treturn _visible;\n}\n\nvoid SlotData::setVisible(bool inValue) {\n\tthis->_visible = inValue;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/SpineObject.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/SpineObject.h>\n#include <spine/Extension.h>\n\nusing namespace spine;\n\nvoid *SpineObject::operator new(size_t sz) {\n\treturn SpineExtension::getInstance()->_calloc(sz, __FILE__, __LINE__);\n}\n\nvoid *SpineObject::operator new(size_t sz, const char *file, int line) {\n\treturn SpineExtension::getInstance()->_calloc(sz, file, line);\n}\n\nvoid *SpineObject::operator new(size_t sz, void *ptr) {\n\tSP_UNUSED(sz);\n\treturn ptr;\n}\n\nvoid SpineObject::operator delete(void *p, const char *file, int line) {\n\tSpineExtension::free(p, file, line);\n}\n\nvoid SpineObject::operator delete(void *p, void *mem) {\n\tSP_UNUSED(mem);\n\tSpineExtension::free(p, __FILE__, __LINE__);\n}\n\nvoid SpineObject::operator delete(void *p) {\n\tSpineExtension::free(p, __FILE__, __LINE__);\n}\n\nSpineObject::~SpineObject() {\n\tSpineExtension::beforeFree(this);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/TextureLoader.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/TextureLoader.h>\n\nnamespace spine {\n\tTextureLoader::TextureLoader() {\n\t}\n\n\tTextureLoader::~TextureLoader() {\n\t}\n}// namespace spine\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Timeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Timeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\nnamespace spine {\n\tRTTI_IMPL_NOPARENT(Timeline)\n\n\tTimeline::Timeline(size_t frameCount, size_t frameEntries)\n\t\t: _propertyIds(), _frames(), _frameEntries(frameEntries) {\n\t\t_frames.setSize(frameCount * frameEntries, 0);\n\t}\n\n\tTimeline::~Timeline() {\n\t}\n\n\tVector<PropertyId> &Timeline::getPropertyIds() {\n\t\treturn _propertyIds;\n\t}\n\n\tvoid Timeline::setPropertyIds(PropertyId propertyIds[], size_t propertyIdsCount) {\n\t\t_propertyIds.clear();\n\t\t_propertyIds.ensureCapacity(propertyIdsCount);\n\t\tfor (size_t i = 0; i < propertyIdsCount; i++) {\n\t\t\t_propertyIds.add(propertyIds[i]);\n\t\t}\n\t}\n\n\tsize_t Timeline::getFrameCount() {\n\t\treturn _frames.size() / _frameEntries;\n\t}\n\n\tVector<float> &Timeline::getFrames() {\n\t\treturn _frames;\n\t}\n\n\tsize_t Timeline::getFrameEntries() {\n\t\treturn _frameEntries;\n\t}\n\n\tfloat Timeline::getDuration() {\n\t\treturn _frames[_frames.size() - getFrameEntries()];\n\t}\n}// namespace spine\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/TransformConstraint.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/TransformConstraint.h>\n\n#include <spine/Bone.h>\n#include <spine/Skeleton.h>\n#include <spine/TransformConstraintData.h>\n\n#include <spine/BoneData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(TransformConstraint, Updatable)\n\nTransformConstraint::TransformConstraint(TransformConstraintData &data, Skeleton &skeleton) : Updatable(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _data(data),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _target(skeleton.findBone(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  data.getTarget()->getName())),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _mixRotate(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  data.getMixRotate()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _mixX(data.getMixX()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _mixY(data.getMixY()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _mixScaleX(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  data.getMixScaleX()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _mixScaleY(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  data.getMixScaleY()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _mixShearY(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  data.getMixShearY()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  _active(false) {\n\t_bones.ensureCapacity(_data.getBones().size());\n\tfor (size_t i = 0; i < _data.getBones().size(); ++i) {\n\t\tBoneData *boneData = _data.getBones()[i];\n\t\t_bones.add(skeleton.findBone(boneData->getName()));\n\t}\n}\n\nvoid TransformConstraint::update(Physics) {\n\tif (_mixRotate == 0 && _mixX == 0 && _mixY == 0 && _mixScaleX == 0 && _mixScaleY == 0 && _mixShearY == 0) return;\n\n\tif (_data.isLocal()) {\n\t\tif (_data.isRelative())\n\t\t\tapplyRelativeLocal();\n\t\telse\n\t\t\tapplyAbsoluteLocal();\n\t} else {\n\t\tif (_data.isRelative())\n\t\t\tapplyRelativeWorld();\n\t\telse\n\t\t\tapplyAbsoluteWorld();\n\t}\n}\n\nint TransformConstraint::getOrder() {\n\treturn (int) _data.getOrder();\n}\n\nTransformConstraintData &TransformConstraint::getData() {\n\treturn _data;\n}\n\nVector<Bone *> &TransformConstraint::getBones() {\n\treturn _bones;\n}\n\nBone *TransformConstraint::getTarget() {\n\treturn _target;\n}\n\nvoid TransformConstraint::setTarget(Bone *inValue) {\n\t_target = inValue;\n}\n\nfloat TransformConstraint::getMixRotate() {\n\treturn _mixRotate;\n}\n\nvoid TransformConstraint::setMixRotate(float inValue) {\n\t_mixRotate = inValue;\n}\n\nfloat TransformConstraint::getMixX() {\n\treturn _mixX;\n}\n\nvoid TransformConstraint::setMixX(float inValue) {\n\t_mixX = inValue;\n}\n\nfloat TransformConstraint::getMixY() {\n\treturn _mixY;\n}\n\nvoid TransformConstraint::setMixY(float inValue) {\n\t_mixY = inValue;\n}\n\nvoid TransformConstraint::setMixScaleX(float inValue) {\n\t_mixScaleX = inValue;\n}\n\nfloat TransformConstraint::getMixScaleX() {\n\treturn _mixScaleX;\n}\n\nfloat TransformConstraint::getMixScaleY() {\n\treturn _mixScaleY;\n}\n\nvoid TransformConstraint::setMixScaleY(float inValue) {\n\t_mixScaleY = inValue;\n}\n\nfloat TransformConstraint::getMixShearY() {\n\treturn _mixShearY;\n}\n\nvoid TransformConstraint::setMixShearY(float inValue) {\n\t_mixShearY = inValue;\n}\n\nvoid TransformConstraint::applyAbsoluteWorld() {\n\tfloat mixRotate = _mixRotate, mixX = _mixX, mixY = _mixY, mixScaleX = _mixScaleX, mixScaleY = _mixScaleY, mixShearY = _mixShearY;\n\tbool translate = mixX != 0 || mixY != 0;\n\tBone &target = *_target;\n\tfloat ta = target._a, tb = target._b, tc = target._c, td = target._d;\n\tfloat degRadReflect = ta * td - tb * tc > 0 ? MathUtil::Deg_Rad : -MathUtil::Deg_Rad;\n\tfloat offsetRotation = _data._offsetRotation * degRadReflect, offsetShearY = _data._offsetShearY * degRadReflect;\n\n\tfor (size_t i = 0; i < _bones.size(); ++i) {\n\t\tBone *item = _bones[i];\n\t\tBone &bone = *item;\n\n\t\tif (mixRotate != 0) {\n\t\t\tfloat a = bone._a, b = bone._b, c = bone._c, d = bone._d;\n\t\t\tfloat r = MathUtil::atan2(tc, ta) - MathUtil::atan2(c, a) + offsetRotation;\n\t\t\tif (r > MathUtil::Pi)\n\t\t\t\tr -= MathUtil::Pi_2;\n\t\t\telse if (r < -MathUtil::Pi)\n\t\t\t\tr += MathUtil::Pi_2;\n\n\t\t\tr *= mixRotate;\n\t\t\tfloat cos = MathUtil::cos(r), sin = MathUtil::sin(r);\n\t\t\tbone._a = cos * a - sin * c;\n\t\t\tbone._b = cos * b - sin * d;\n\t\t\tbone._c = sin * a + cos * c;\n\t\t\tbone._d = sin * b + cos * d;\n\t\t}\n\n\t\tif (translate) {\n\t\t\tfloat tx, ty;\n\t\t\ttarget.localToWorld(_data._offsetX, _data._offsetY, tx, ty);\n\t\t\tbone._worldX += (tx - bone._worldX) * mixX;\n\t\t\tbone._worldY += (ty - bone._worldY) * mixY;\n\t\t}\n\n\t\tif (mixScaleX > 0) {\n\t\t\tfloat s = MathUtil::sqrt(bone._a * bone._a + bone._c * bone._c);\n\t\t\tif (s != 0) s = (s + (MathUtil::sqrt(ta * ta + tc * tc) - s + _data._offsetScaleX) * mixScaleX) / s;\n\t\t\tbone._a *= s;\n\t\t\tbone._c *= s;\n\t\t}\n\n\t\tif (mixScaleY > 0) {\n\t\t\tfloat s = MathUtil::sqrt(bone._b * bone._b + bone._d * bone._d);\n\t\t\tif (s != 0) s = (s + (MathUtil::sqrt(tb * tb + td * td) - s + _data._offsetScaleY) * mixScaleY) / s;\n\t\t\tbone._b *= s;\n\t\t\tbone._d *= s;\n\t\t}\n\n\t\tif (mixShearY > 0) {\n\t\t\tfloat b = bone._b, d = bone._d;\n\t\t\tfloat by = MathUtil::atan2(d, b);\n\t\t\tfloat r = MathUtil::atan2(td, tb) - MathUtil::atan2(tc, ta) - (by - MathUtil::atan2(bone._c, bone._a));\n\t\t\tif (r > MathUtil::Pi)\n\t\t\t\tr -= MathUtil::Pi_2;\n\t\t\telse if (r < -MathUtil::Pi)\n\t\t\t\tr += MathUtil::Pi_2;\n\n\t\t\tr = by + (r + offsetShearY) * mixShearY;\n\t\t\tfloat s = MathUtil::sqrt(b * b + d * d);\n\t\t\tbone._b = MathUtil::cos(r) * s;\n\t\t\tbone._d = MathUtil::sin(r) * s;\n\t\t}\n\n\t\tbone.updateAppliedTransform();\n\t}\n}\n\nvoid TransformConstraint::applyRelativeWorld() {\n\tfloat mixRotate = _mixRotate, mixX = _mixX, mixY = _mixY, mixScaleX = _mixScaleX, mixScaleY = _mixScaleY, mixShearY = _mixShearY;\n\tbool translate = mixX != 0 || mixY != 0;\n\tBone &target = *_target;\n\tfloat ta = target._a, tb = target._b, tc = target._c, td = target._d;\n\tfloat degRadReflect = ta * td - tb * tc > 0 ? MathUtil::Deg_Rad : -MathUtil::Deg_Rad;\n\tfloat offsetRotation = _data._offsetRotation * degRadReflect, offsetShearY = _data._offsetShearY * degRadReflect;\n\tfor (size_t i = 0; i < _bones.size(); ++i) {\n\t\tBone *item = _bones[i];\n\t\tBone &bone = *item;\n\n\t\tif (mixRotate != 0) {\n\t\t\tfloat a = bone._a, b = bone._b, c = bone._c, d = bone._d;\n\t\t\tfloat r = MathUtil::atan2(tc, ta) + offsetRotation;\n\t\t\tif (r > MathUtil::Pi)\n\t\t\t\tr -= MathUtil::Pi_2;\n\t\t\telse if (r < -MathUtil::Pi)\n\t\t\t\tr += MathUtil::Pi_2;\n\n\t\t\tr *= mixRotate;\n\t\t\tfloat cos = MathUtil::cos(r), sin = MathUtil::sin(r);\n\t\t\tbone._a = cos * a - sin * c;\n\t\t\tbone._b = cos * b - sin * d;\n\t\t\tbone._c = sin * a + cos * c;\n\t\t\tbone._d = sin * b + cos * d;\n\t\t}\n\n\t\tif (translate) {\n\t\t\tfloat tx, ty;\n\t\t\ttarget.localToWorld(_data._offsetX, _data._offsetY, tx, ty);\n\t\t\tbone._worldX += tx * mixX;\n\t\t\tbone._worldY += ty * mixY;\n\t\t}\n\n\t\tif (mixScaleX != 0) {\n\t\t\tfloat s = (MathUtil::sqrt(ta * ta + tc * tc) - 1 + _data._offsetScaleX) * mixScaleX + 1;\n\t\t\tbone._a *= s;\n\t\t\tbone._c *= s;\n\t\t}\n\t\tif (mixScaleY != 0) {\n\t\t\tfloat s = (MathUtil::sqrt(tb * tb + td * td) - 1 + _data._offsetScaleY) * mixScaleY + 1;\n\t\t\tbone._b *= s;\n\t\t\tbone._d *= s;\n\t\t}\n\n\t\tif (mixShearY > 0) {\n\t\t\tfloat r = MathUtil::atan2(td, tb) - MathUtil::atan2(tc, ta);\n\t\t\tif (r > MathUtil::Pi)\n\t\t\t\tr -= MathUtil::Pi_2;\n\t\t\telse if (r < -MathUtil::Pi)\n\t\t\t\tr += MathUtil::Pi_2;\n\n\t\t\tfloat b = bone._b, d = bone._d;\n\t\t\tr = MathUtil::atan2(d, b) + (r - MathUtil::Pi / 2 + offsetShearY) * mixShearY;\n\t\t\tfloat s = MathUtil::sqrt(b * b + d * d);\n\t\t\tbone._b = MathUtil::cos(r) * s;\n\t\t\tbone._d = MathUtil::sin(r) * s;\n\t\t}\n\n\t\tbone.updateAppliedTransform();\n\t}\n}\n\nvoid TransformConstraint::applyAbsoluteLocal() {\n\tfloat mixRotate = _mixRotate, mixX = _mixX, mixY = _mixY, mixScaleX = _mixScaleX, mixScaleY = _mixScaleY, mixShearY = _mixShearY;\n\tBone &target = *_target;\n\n\tfor (size_t i = 0; i < _bones.size(); ++i) {\n\t\tBone *item = _bones[i];\n\t\tBone &bone = *item;\n\n\t\tfloat rotation = bone._arotation;\n\t\tif (mixRotate != 0) {\n\t\t\tfloat r = target._arotation - rotation + _data._offsetRotation;\n\t\t\tr -= MathUtil::ceil(r / 360 - 0.5) * 360;\n\t\t\trotation += r * mixRotate;\n\t\t}\n\n\t\tfloat x = bone._ax, y = bone._ay;\n\t\tx += (target._ax - x + _data._offsetX) * mixX;\n\t\ty += (target._ay - y + _data._offsetY) * mixY;\n\n\t\tfloat scaleX = bone._ascaleX, scaleY = bone._ascaleY;\n\t\tif (mixScaleX != 0 && scaleX != 0)\n\t\t\tscaleX = (scaleX + (target._ascaleX - scaleX + _data._offsetScaleX) * mixScaleX) / scaleX;\n\t\tif (mixScaleY != 0 && scaleY != 0)\n\t\t\tscaleY = (scaleY + (target._ascaleY - scaleY + _data._offsetScaleY) * mixScaleY) / scaleY;\n\n\t\tfloat shearY = bone._ashearY;\n\t\tif (mixShearY != 0) {\n\t\t\tfloat r = target._ashearY - shearY + _data._offsetShearY;\n\t\t\tr -= MathUtil::ceil(r / 360 - 0.5) * 360;\n\t\t\tbone._shearY += r * mixShearY;\n\t\t}\n\n\t\tbone.updateWorldTransform(x, y, rotation, scaleX, scaleY, bone._ashearX, shearY);\n\t}\n}\n\nvoid TransformConstraint::applyRelativeLocal() {\n\tfloat mixRotate = _mixRotate, mixX = _mixX, mixY = _mixY, mixScaleX = _mixScaleX, mixScaleY = _mixScaleY, mixShearY = _mixShearY;\n\tBone &target = *_target;\n\n\tfor (size_t i = 0; i < _bones.size(); ++i) {\n\t\tBone *item = _bones[i];\n\t\tBone &bone = *item;\n\n\t\tfloat rotation = bone._arotation + (target._arotation + _data._offsetRotation) * mixRotate;\n\t\tfloat x = bone._ax + (target._ax + _data._offsetX) * mixX;\n\t\tfloat y = bone._ay + (target._ay + _data._offsetY) * mixY;\n\t\tfloat scaleX = bone._ascaleX * (((target._ascaleX - 1 + _data._offsetScaleX) * mixScaleX) + 1);\n\t\tfloat scaleY = bone._ascaleY * (((target._ascaleY - 1 + _data._offsetScaleY) * mixScaleY) + 1);\n\t\tfloat shearY = bone._ashearY + (target._ashearY + _data._offsetShearY) * mixShearY;\n\n\t\tbone.updateWorldTransform(x, y, rotation, scaleX, scaleY, bone._ashearX, shearY);\n\t}\n}\n\nbool TransformConstraint::isActive() {\n\treturn _active;\n}\n\nvoid TransformConstraint::setActive(bool inValue) {\n\t_active = inValue;\n}\n\nvoid TransformConstraint::setToSetupPose() {\n\tTransformConstraintData &data = this->_data;\n\tthis->_mixRotate = data._mixRotate;\n\tthis->_mixX = data._mixX;\n\tthis->_mixY = data._mixY;\n\tthis->_mixScaleX = data._mixScaleX;\n\tthis->_mixScaleY = data._mixScaleY;\n\tthis->_mixShearY = data._mixShearY;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/TransformConstraintData.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/TransformConstraintData.h>\n\n#include <spine/BoneData.h>\n\n#include <assert.h>\n\nusing namespace spine;\n\nRTTI_IMPL(TransformConstraintData, ConstraintData)\n\nTransformConstraintData::TransformConstraintData(const String &name) : ConstraintData(name),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _target(NULL),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _mixRotate(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _mixX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _mixY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _mixScaleX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _mixScaleY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _mixShearY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _offsetRotation(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _offsetX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _offsetY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _offsetScaleX(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _offsetScaleY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _offsetShearY(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _relative(false),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _local(false) {\n}\n\nVector<BoneData *> &TransformConstraintData::getBones() {\n\treturn _bones;\n}\n\nBoneData *TransformConstraintData::getTarget() {\n\treturn _target;\n}\n\nfloat TransformConstraintData::getMixRotate() {\n\treturn _mixRotate;\n}\n\nfloat TransformConstraintData::getMixX() {\n\treturn _mixX;\n}\n\nfloat TransformConstraintData::getMixY() {\n\treturn _mixY;\n}\n\nfloat TransformConstraintData::getMixScaleX() {\n\treturn _mixScaleX;\n}\n\nfloat TransformConstraintData::getMixScaleY() {\n\treturn _mixScaleY;\n}\n\nfloat TransformConstraintData::getMixShearY() {\n\treturn _mixShearY;\n}\n\nfloat TransformConstraintData::getOffsetRotation() {\n\treturn _offsetRotation;\n}\n\nfloat TransformConstraintData::getOffsetX() {\n\treturn _offsetX;\n}\n\nfloat TransformConstraintData::getOffsetY() {\n\treturn _offsetY;\n}\n\nfloat TransformConstraintData::getOffsetScaleX() {\n\treturn _offsetScaleX;\n}\n\nfloat TransformConstraintData::getOffsetScaleY() {\n\treturn _offsetScaleY;\n}\n\nfloat TransformConstraintData::getOffsetShearY() {\n\treturn _offsetShearY;\n}\n\nbool TransformConstraintData::isRelative() {\n\treturn _relative;\n}\n\nbool TransformConstraintData::isLocal() {\n\treturn _local;\n}\n\nvoid TransformConstraintData::setTarget(BoneData *target) {\n\t_target = target;\n}\n\nvoid TransformConstraintData::setMixRotate(float mixRotate) {\n\t_mixRotate = mixRotate;\n}\n\nvoid TransformConstraintData::setMixX(float mixX) {\n\t_mixX = mixX;\n}\n\nvoid TransformConstraintData::setMixY(float mixY) {\n\t_mixY = mixY;\n}\n\nvoid TransformConstraintData::setMixScaleX(float mixScaleX) {\n\t_mixScaleX = mixScaleX;\n}\n\nvoid TransformConstraintData::setMixScaleY(float mixScaleY) {\n\t_mixScaleY = mixScaleY;\n}\n\nvoid TransformConstraintData::setMixShearY(float mixShearY) {\n\t_mixShearY = mixShearY;\n}\n\nvoid TransformConstraintData::setOffsetRotation(float offsetRotation) {\n\t_offsetRotation = offsetRotation;\n}\n\nvoid TransformConstraintData::setOffsetX(float offsetX) {\n\t_offsetX = offsetX;\n}\n\nvoid TransformConstraintData::setOffsetY(float offsetY) {\n\t_offsetY = offsetY;\n}\n\nvoid TransformConstraintData::setOffsetScaleX(float offsetScaleX) {\n\t_offsetScaleX = offsetScaleX;\n}\n\nvoid TransformConstraintData::setOffsetScaleY(float offsetScaleY) {\n\t_offsetScaleY = offsetScaleY;\n}\n\nvoid TransformConstraintData::setOffsetShearY(float offsetShearY) {\n\t_offsetShearY = offsetShearY;\n}\n\nvoid TransformConstraintData::setRelative(bool isRelative) {\n\t_relative = isRelative;\n}\n\nvoid TransformConstraintData::setLocal(bool isLocal) {\n\t_local = isLocal;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/TransformConstraintTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/TransformConstraintTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Animation.h>\n#include <spine/Property.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n#include <spine/TransformConstraint.h>\n#include <spine/TransformConstraintData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(TransformConstraintTimeline, CurveTimeline)\n\nTransformConstraintTimeline::TransformConstraintTimeline(size_t frameCount, size_t bezierCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t int transformConstraintIndex) : CurveTimeline(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   TransformConstraintTimeline::ENTRIES,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _constraintIndex(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformConstraintIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_TransformConstraint << 32) | transformConstraintIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nvoid TransformConstraintTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents,\n\t\t\t\t\t\t\t\t\t\tfloat alpha, MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tTransformConstraint *constraintP = skeleton._transformConstraints[_constraintIndex];\n\tTransformConstraint &constraint = *constraintP;\n\tif (!constraint.isActive()) return;\n\n\tTransformConstraintData &data = constraint._data;\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tconstraint._mixRotate = data._mixRotate;\n\t\t\t\tconstraint._mixX = data._mixX;\n\t\t\t\tconstraint._mixY = data._mixY;\n\t\t\t\tconstraint._mixScaleX = data._mixScaleX;\n\t\t\t\tconstraint._mixScaleY = data._mixScaleY;\n\t\t\t\tconstraint._mixShearY = data._mixShearY;\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tconstraint._mixRotate += (data._mixRotate - constraint._mixRotate) * alpha;\n\t\t\t\tconstraint._mixX += (data._mixX - constraint._mixX) * alpha;\n\t\t\t\tconstraint._mixY += (data._mixY - constraint._mixY) * alpha;\n\t\t\t\tconstraint._mixScaleX += (data._mixScaleX - constraint._mixScaleX) * alpha;\n\t\t\t\tconstraint._mixScaleY += (data._mixScaleY - constraint._mixScaleY) * alpha;\n\t\t\t\tconstraint._mixShearY += (data._mixShearY - constraint._mixShearY) * alpha;\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\t}\n\n\tfloat rotate, x, y, scaleX, scaleY, shearY;\n\tint i = Animation::search(_frames, time, TransformConstraintTimeline::ENTRIES);\n\tint curveType = (int) _curves[i / TransformConstraintTimeline::ENTRIES];\n\tswitch (curveType) {\n\t\tcase TransformConstraintTimeline::LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\trotate = _frames[i + ROTATE];\n\t\t\tx = _frames[i + X];\n\t\t\ty = _frames[i + Y];\n\t\t\tscaleX = _frames[i + SCALEX];\n\t\t\tscaleY = _frames[i + SCALEY];\n\t\t\tshearY = _frames[i + SHEARY];\n\t\t\tfloat t = (time - before) / (_frames[i + ENTRIES] - before);\n\t\t\trotate += (_frames[i + ENTRIES + ROTATE] - rotate) * t;\n\t\t\tx += (_frames[i + ENTRIES + X] - x) * t;\n\t\t\ty += (_frames[i + ENTRIES + Y] - y) * t;\n\t\t\tscaleX += (_frames[i + ENTRIES + SCALEX] - scaleX) * t;\n\t\t\tscaleY += (_frames[i + ENTRIES + SCALEY] - scaleY) * t;\n\t\t\tshearY += (_frames[i + ENTRIES + SHEARY] - shearY) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase TransformConstraintTimeline::STEPPED: {\n\t\t\trotate = _frames[i + ROTATE];\n\t\t\tx = _frames[i + X];\n\t\t\ty = _frames[i + Y];\n\t\t\tscaleX = _frames[i + SCALEX];\n\t\t\tscaleY = _frames[i + SCALEY];\n\t\t\tshearY = _frames[i + SHEARY];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\trotate = getBezierValue(time, i, ROTATE, curveType - BEZIER);\n\t\t\tx = getBezierValue(time, i, X, curveType + BEZIER_SIZE - BEZIER);\n\t\t\ty = getBezierValue(time, i, Y, curveType + BEZIER_SIZE * 2 - BEZIER);\n\t\t\tscaleX = getBezierValue(time, i, SCALEX, curveType + BEZIER_SIZE * 3 - BEZIER);\n\t\t\tscaleY = getBezierValue(time, i, SCALEY, curveType + BEZIER_SIZE * 4 - BEZIER);\n\t\t\tshearY = getBezierValue(time, i, SHEARY, curveType + BEZIER_SIZE * 5 - BEZIER);\n\t\t}\n\t}\n\n\tif (blend == MixBlend_Setup) {\n\t\tconstraint._mixRotate = data._mixRotate + (rotate - data._mixRotate) * alpha;\n\t\tconstraint._mixX = data._mixX + (x - data._mixX) * alpha;\n\t\tconstraint._mixY = data._mixY + (y - data._mixY) * alpha;\n\t\tconstraint._mixScaleX = data._mixScaleX + (scaleX - data._mixScaleX) * alpha;\n\t\tconstraint._mixScaleY = data._mixScaleY + (scaleY - data._mixScaleY) * alpha;\n\t\tconstraint._mixShearY = data._mixShearY + (shearY - data._mixShearY) * alpha;\n\t} else {\n\t\tconstraint._mixRotate += (rotate - constraint._mixRotate) * alpha;\n\t\tconstraint._mixX += (x - constraint._mixX) * alpha;\n\t\tconstraint._mixY += (y - constraint._mixY) * alpha;\n\t\tconstraint._mixScaleX += (scaleX - constraint._mixScaleX) * alpha;\n\t\tconstraint._mixScaleY += (scaleY - constraint._mixScaleY) * alpha;\n\t\tconstraint._mixShearY += (shearY - constraint._mixShearY) * alpha;\n\t}\n}\n\nvoid TransformConstraintTimeline::setFrame(size_t frame, float time, float mixRotate, float mixX, float mixY,\n\t\t\t\t\t\t\t\t\t\t   float mixScaleX, float mixScaleY, float mixShearY) {\n\tframe *= ENTRIES;\n\t_frames[frame] = time;\n\t_frames[frame + ROTATE] = mixRotate;\n\t_frames[frame + X] = mixX;\n\t_frames[frame + Y] = mixY;\n\t_frames[frame + SCALEX] = mixScaleX;\n\t_frames[frame + SCALEY] = mixScaleY;\n\t_frames[frame + SHEARY] = mixShearY;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/TranslateTimeline.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/TranslateTimeline.h>\n\n#include <spine/Event.h>\n#include <spine/Skeleton.h>\n\n#include <spine/Bone.h>\n#include <spine/BoneData.h>\n#include <spine/Slot.h>\n#include <spine/SlotData.h>\n\nusing namespace spine;\n\nRTTI_IMPL(TranslateTimeline, CurveTimeline2)\n\nTranslateTimeline::TranslateTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline2(frameCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_X << 32) | boneIndex,\n\t\t\t\t\t\t((PropertyId) Property_Y << 32) | boneIndex};\n\tsetPropertyIds(ids, 2);\n}\n\nTranslateTimeline::~TranslateTimeline() {\n}\n\nvoid TranslateTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t\t  MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (!bone->_active) return;\n\n\tif (time < _frames[0]) {\n\t\tswitch (blend) {\n\t\t\tcase MixBlend_Setup:\n\t\t\t\tbone->_x = bone->_data._x;\n\t\t\t\tbone->_y = bone->_data._y;\n\t\t\t\treturn;\n\t\t\tcase MixBlend_First:\n\t\t\t\tbone->_x += (bone->_data._x - bone->_x) * alpha;\n\t\t\t\tbone->_y += (bone->_data._y - bone->_y) * alpha;\n\t\t\tdefault: {\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tfloat x = 0, y = 0;\n\tint i = Animation::search(_frames, time, CurveTimeline2::ENTRIES);\n\tint curveType = (int) _curves[i / CurveTimeline2::ENTRIES];\n\tswitch (curveType) {\n\t\tcase CurveTimeline::LINEAR: {\n\t\t\tfloat before = _frames[i];\n\t\t\tx = _frames[i + CurveTimeline2::VALUE1];\n\t\t\ty = _frames[i + CurveTimeline2::VALUE2];\n\t\t\tfloat t = (time - before) / (_frames[i + CurveTimeline2::ENTRIES] - before);\n\t\t\tx += (_frames[i + CurveTimeline2::ENTRIES + CurveTimeline2::VALUE1] - x) * t;\n\t\t\ty += (_frames[i + CurveTimeline2::ENTRIES + CurveTimeline2::VALUE2] - y) * t;\n\t\t\tbreak;\n\t\t}\n\t\tcase CurveTimeline::STEPPED: {\n\t\t\tx = _frames[i + CurveTimeline2::VALUE1];\n\t\t\ty = _frames[i + CurveTimeline2::VALUE2];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tx = getBezierValue(time, i, CurveTimeline2::VALUE1, curveType - CurveTimeline::BEZIER);\n\t\t\ty = getBezierValue(time, i, CurveTimeline2::VALUE2,\n\t\t\t\t\t\t\t   curveType + CurveTimeline::BEZIER_SIZE - CurveTimeline::BEZIER);\n\t\t}\n\t}\n\n\tswitch (blend) {\n\t\tcase MixBlend_Setup:\n\t\t\tbone->_x = bone->_data._x + x * alpha;\n\t\t\tbone->_y = bone->_data._y + y * alpha;\n\t\t\tbreak;\n\t\tcase MixBlend_First:\n\t\tcase MixBlend_Replace:\n\t\t\tbone->_x += (bone->_data._x + x - bone->_x) * alpha;\n\t\t\tbone->_y += (bone->_data._y + y - bone->_y) * alpha;\n\t\t\tbreak;\n\t\tcase MixBlend_Add:\n\t\t\tbone->_x += x * alpha;\n\t\t\tbone->_y += y * alpha;\n\t}\n}\n\nRTTI_IMPL(TranslateXTimeline, CurveTimeline1)\n\nTranslateXTimeline::TranslateXTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline1(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   frameCount, bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_X << 32) | boneIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nTranslateXTimeline::~TranslateXTimeline() {\n}\n\nvoid TranslateXTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t\t   MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (bone->_active) bone->_x = getRelativeValue(time, alpha, blend, bone->_x, bone->_data._x);\n}\n\nRTTI_IMPL(TranslateYTimeline, CurveTimeline1)\n\nTranslateYTimeline::TranslateYTimeline(size_t frameCount, size_t bezierCount, int boneIndex) : CurveTimeline1(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   frameCount, bezierCount),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   _boneIndex(boneIndex) {\n\tPropertyId ids[] = {((PropertyId) Property_Y << 32) | boneIndex};\n\tsetPropertyIds(ids, 1);\n}\n\nTranslateYTimeline::~TranslateYTimeline() {\n}\n\nvoid TranslateYTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,\n\t\t\t\t\t\t\t   MixBlend blend, MixDirection direction) {\n\tSP_UNUSED(lastTime);\n\tSP_UNUSED(pEvents);\n\tSP_UNUSED(direction);\n\n\tBone *bone = skeleton._bones[_boneIndex];\n\tif (bone->_active) bone->_y = getRelativeValue(time, alpha, blend, bone->_y, bone->_data._y);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Triangulator.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Triangulator.h>\n\n#include <spine/MathUtil.h>\n\nusing namespace spine;\n\nTriangulator::~Triangulator() {\n\tContainerUtil::cleanUpVectorOfPointers(_convexPolygons);\n\tContainerUtil::cleanUpVectorOfPointers(_convexPolygonsIndices);\n}\n\nVector<int> &Triangulator::triangulate(Vector<float> &vertices) {\n\tsize_t vertexCount = vertices.size() >> 1;\n\n\tVector<int> &indices = _indices;\n\tindices.clear();\n\tindices.ensureCapacity(vertexCount);\n\tindices.setSize(vertexCount, 0);\n\tfor (int i = 0; i < (int) vertexCount; ++i) {\n\t\tindices[i] = i;\n\t}\n\n\tVector<bool> &isConcaveArray = _isConcaveArray;\n\tisConcaveArray.ensureCapacity(vertexCount);\n\tisConcaveArray.setSize(vertexCount, 0);\n\tfor (int i = 0, n = (int) vertexCount; i < n; ++i) {\n\t\tisConcaveArray[i] = isConcave(i, (int) vertexCount, vertices, indices);\n\t}\n\n\tVector<int> &triangles = _triangles;\n\ttriangles.clear();\n\ttriangles.ensureCapacity(MathUtil::max((int) 0, (int) vertexCount - 2) << 2);\n\n\twhile (vertexCount > 3) {\n\t\t// Find ear tip.\n\t\tsize_t previous = vertexCount - 1, i = 0, next = 1;\n\n\t\t// outer:\n\t\twhile (true) {\n\t\t\tif (!isConcaveArray[i]) {\n\t\t\t\tint p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n\t\t\t\tfloat p1x = vertices[p1], p1y = vertices[p1 + 1];\n\t\t\t\tfloat p2x = vertices[p2], p2y = vertices[p2 + 1];\n\t\t\t\tfloat p3x = vertices[p3], p3y = vertices[p3 + 1];\n\t\t\t\tfor (size_t ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n\t\t\t\t\tif (!isConcaveArray[ii]) continue;\n\n\t\t\t\t\tint v = indices[ii] << 1;\n\t\t\t\t\tfloat &vx = vertices[v], vy = vertices[v + 1];\n\t\t\t\t\tif (positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\n\t\t\t\t\t\tif (positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\n\t\t\t\t\t\t\tif (positiveArea(p2x, p2y, p3x, p3y, vx, vy)) {\n\t\t\t\t\t\t\t\tgoto break_outer;// break outer;\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}\n\t\t\t\tbreak;\n\t\t\t}\n\t\tbreak_outer:\n\n\t\t\tif (next == 0) {\n\t\t\t\tdo {\n\t\t\t\t\tif (!isConcaveArray[i]) break;\n\t\t\t\t\ti--;\n\t\t\t\t} while (i > 0);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tprevious = i;\n\t\t\ti = next;\n\t\t\tnext = (next + 1) % vertexCount;\n\t\t}\n\n\t\t// Cut ear tip.\n\t\ttriangles.add(indices[(vertexCount + i - 1) % vertexCount]);\n\t\ttriangles.add(indices[i]);\n\t\ttriangles.add(indices[(i + 1) % vertexCount]);\n\t\tindices.removeAt(i);\n\t\tisConcaveArray.removeAt(i);\n\t\tvertexCount--;\n\n\t\tint previousIndex = (int) ((vertexCount + i - 1) % vertexCount);\n\t\tint nextIndex = (int) (i == vertexCount ? 0 : i);\n\t\tisConcaveArray[previousIndex] = isConcave(previousIndex, (int) vertexCount, vertices, indices);\n\t\tisConcaveArray[nextIndex] = isConcave(nextIndex, (int) vertexCount, vertices, indices);\n\t}\n\n\tif (vertexCount == 3) {\n\t\ttriangles.add(indices[2]);\n\t\ttriangles.add(indices[0]);\n\t\ttriangles.add(indices[1]);\n\t}\n\n\treturn triangles;\n}\n\nVector<Vector<float> *> &Triangulator::decompose(Vector<float> &vertices, Vector<int> &triangles) {\n\tVector<Vector<float> *> &convexPolygons = _convexPolygons;\n\tfor (size_t i = 0, n = convexPolygons.size(); i < n; ++i)\n\t\t_polygonPool.free(convexPolygons[i]);\n\tconvexPolygons.clear();\n\n\tVector<Vector<int> *> &convexPolygonsIndices = _convexPolygonsIndices;\n\tfor (size_t i = 0, n = convexPolygonsIndices.size(); i < n; ++i)\n\t\t_polygonIndicesPool.free(convexPolygonsIndices[i]);\n\tconvexPolygonsIndices.clear();\n\n\tVector<int> *polygonIndices = _polygonIndicesPool.obtain();\n\tpolygonIndices->clear();\n\n\tVector<float> *polygon = _polygonPool.obtain();\n\tpolygon->clear();\n\n\t// Merge subsequent triangles if they form a triangle fan.\n\tint fanBaseIndex = -1, lastwinding = 0;\n\tfor (size_t i = 0, n = triangles.size(); i < n; i += 3) {\n\t\tint t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n\t\tfloat x1 = vertices[t1], y1 = vertices[t1 + 1];\n\t\tfloat x2 = vertices[t2], y2 = vertices[t2 + 1];\n\t\tfloat x3 = vertices[t3], y3 = vertices[t3 + 1];\n\n\t\t// If the base of the last triangle is the same as this triangle, check if they form a convex polygon (triangle fan).\n\t\tbool merged = false;\n\t\tif (fanBaseIndex == t1) {\n\t\t\tsize_t o = polygon->size() - 4;\n\t\t\tVector<float> &p = *polygon;\n\t\t\tint winding1 = winding(p[o], p[o + 1], p[o + 2], p[o + 3], x3, y3);\n\t\t\tint winding2 = winding(x3, y3, p[0], p[1], p[2], p[3]);\n\t\t\tif (winding1 == lastwinding && winding2 == lastwinding) {\n\t\t\t\tpolygon->add(x3);\n\t\t\t\tpolygon->add(y3);\n\t\t\t\tpolygonIndices->add(t3);\n\t\t\t\tmerged = true;\n\t\t\t}\n\t\t}\n\n\t\t// Otherwise make this triangle the new base.\n\t\tif (!merged) {\n\t\t\tif (polygon->size() > 0) {\n\t\t\t\tconvexPolygons.add(polygon);\n\t\t\t\tconvexPolygonsIndices.add(polygonIndices);\n\t\t\t} else {\n\t\t\t\t_polygonPool.free(polygon);\n\t\t\t\t_polygonIndicesPool.free(polygonIndices);\n\t\t\t}\n\n\t\t\tpolygon = _polygonPool.obtain();\n\t\t\tpolygon->clear();\n\t\t\tpolygon->add(x1);\n\t\t\tpolygon->add(y1);\n\t\t\tpolygon->add(x2);\n\t\t\tpolygon->add(y2);\n\t\t\tpolygon->add(x3);\n\t\t\tpolygon->add(y3);\n\t\t\tpolygonIndices = _polygonIndicesPool.obtain();\n\t\t\tpolygonIndices->clear();\n\t\t\tpolygonIndices->add(t1);\n\t\t\tpolygonIndices->add(t2);\n\t\t\tpolygonIndices->add(t3);\n\t\t\tlastwinding = winding(x1, y1, x2, y2, x3, y3);\n\t\t\tfanBaseIndex = t1;\n\t\t}\n\t}\n\n\tif (polygon->size() > 0) {\n\t\tconvexPolygons.add(polygon);\n\t\tconvexPolygonsIndices.add(polygonIndices);\n\t}\n\n\t// Go through the list of polygons and try to merge the remaining triangles with the found triangle fans.\n\tfor (size_t i = 0, n = convexPolygons.size(); i < n; ++i) {\n\t\tpolygonIndices = convexPolygonsIndices[i];\n\n\t\tif (polygonIndices->size() == 0) continue;\n\t\tint firstIndex = (*polygonIndices)[0];\n\t\tint lastIndex = (*polygonIndices)[polygonIndices->size() - 1];\n\n\t\tpolygon = convexPolygons[i];\n\t\tsize_t o = polygon->size() - 4;\n\t\tVector<float> &p = *polygon;\n\t\tfloat prevPrevX = p[o], prevPrevY = p[o + 1];\n\t\tfloat prevX = p[o + 2], prevY = p[o + 3];\n\t\tfloat firstX = p[0], firstY = p[1];\n\t\tfloat secondX = p[2], secondY = p[3];\n\t\tint winding0 = winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n\n\t\tfor (size_t ii = 0; ii < n; ++ii) {\n\t\t\tif (ii == i) continue;\n\n\t\t\tVector<int> *otherIndicesP = convexPolygonsIndices[ii];\n\t\t\tVector<int> &otherIndices = *otherIndicesP;\n\n\t\t\tif (otherIndices.size() != 3) continue;\n\n\t\t\tint otherFirstIndex = otherIndices[0];\n\t\t\tint otherSecondIndex = otherIndices[1];\n\t\t\tint otherLastIndex = otherIndices[2];\n\n\t\t\tVector<float> *otherPolyP = convexPolygons[ii];\n\t\t\tVector<float> &otherPoly = *otherPolyP;\n\n\t\t\tfloat x3 = otherPoly[otherPoly.size() - 2], y3 = otherPoly[otherPoly.size() - 1];\n\n\t\t\tif (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) continue;\n\n\t\t\tint winding1 = winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n\t\t\tint winding2 = winding(x3, y3, firstX, firstY, secondX, secondY);\n\t\t\tif (winding1 == winding0 && winding2 == winding0) {\n\t\t\t\totherPoly.clear();\n\t\t\t\totherIndices.clear();\n\t\t\t\tpolygon->add(x3);\n\t\t\t\tpolygon->add(y3);\n\t\t\t\tpolygonIndices->add(otherLastIndex);\n\t\t\t\tprevPrevX = prevX;\n\t\t\t\tprevPrevY = prevY;\n\t\t\t\tprevX = x3;\n\t\t\t\tprevY = y3;\n\t\t\t\tii = 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove empty polygons that resulted from the merge step above.\n\tfor (int i = (int) convexPolygons.size() - 1; i >= 0; --i) {\n\t\tpolygon = convexPolygons[i];\n\t\tif (polygon->size() == 0) {\n\t\t\tconvexPolygons.removeAt(i);\n\t\t\t_polygonPool.free(polygon);\n\t\t\tpolygonIndices = convexPolygonsIndices[i];\n\t\t\tconvexPolygonsIndices.removeAt(i);\n\t\t\t_polygonIndicesPool.free(polygonIndices);\n\t\t}\n\t}\n\n\treturn convexPolygons;\n}\n\nbool Triangulator::isConcave(int index, int vertexCount, Vector<float> &vertices, Vector<int> &indices) {\n\tint previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n\tint current = indices[index] << 1;\n\tint next = indices[(index + 1) % vertexCount] << 1;\n\n\treturn !positiveArea(vertices[previous], vertices[previous + 1],\n\t\t\t\t\t\t vertices[current], vertices[current + 1],\n\t\t\t\t\t\t vertices[next], vertices[next + 1]);\n}\n\nbool Triangulator::positiveArea(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y) {\n\treturn p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n}\n\nint Triangulator::winding(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y) {\n\tfloat px = p2x - p1x, py = p2y - p1y;\n\treturn p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/Updatable.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/Updatable.h>\n\nusing namespace spine;\n\nRTTI_IMPL_NOPARENT(Updatable)\n\nUpdatable::Updatable() {\n}\n\nUpdatable::~Updatable() {\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/Spine/spine-cpp/src/spine/VertexAttachment.cpp",
    "content": "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\n#include <spine/VertexAttachment.h>\n\n#include <spine/Slot.h>\n\n#include <spine/Bone.h>\n#include <spine/Skeleton.h>\n\nusing namespace spine;\n\nRTTI_IMPL(VertexAttachment, Attachment)\n\nVertexAttachment::VertexAttachment(const String &name) : Attachment(name), _worldVerticesLength(0),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t _timelineAttachment(this), _id(getNextID()) {\n}\n\nVertexAttachment::~VertexAttachment() {\n}\n\nvoid VertexAttachment::computeWorldVertices(Slot &slot, Vector<float> &worldVertices) {\n\tcomputeWorldVertices(slot, 0, _worldVerticesLength, worldVertices, 0);\n}\n\nvoid VertexAttachment::computeWorldVertices(Slot &slot, float *worldVertices) {\n\tcomputeWorldVertices(slot, 0, _worldVerticesLength, worldVertices, 0);\n}\n\nvoid VertexAttachment::computeWorldVertices(Slot &slot, size_t start, size_t count, Vector<float> &worldVertices,\n\t\t\t\t\t\t\t\t\t\t\tsize_t offset, size_t stride) {\n\tcomputeWorldVertices(slot, start, count, worldVertices.buffer(), offset, stride);\n}\n\nvoid VertexAttachment::computeWorldVertices(Slot &slot, size_t start, size_t count, float *worldVertices, size_t offset,\n\t\t\t\t\t\t\t\t\t\t\tsize_t stride) {\n\tcount = offset + (count >> 1) * stride;\n\tSkeleton &skeleton = slot._bone._skeleton;\n\tVector<float> *deformArray = &slot.getDeform();\n\tVector<float> *vertices = &_vertices;\n\tVector<int> &bones = _bones;\n\tif (bones.size() == 0) {\n\t\tif (deformArray->size() > 0) vertices = deformArray;\n\n\t\tBone &bone = slot._bone;\n\t\tfloat x = bone._worldX;\n\t\tfloat y = bone._worldY;\n\t\tfloat a = bone._a, b = bone._b, c = bone._c, d = bone._d;\n\t\tfor (size_t vv = start, w = offset; w < count; vv += 2, w += stride) {\n\t\t\tfloat vx = (*vertices)[vv];\n\t\t\tfloat vy = (*vertices)[vv + 1];\n\t\t\tworldVertices[w] = vx * a + vy * b + x;\n\t\t\tworldVertices[w + 1] = vx * c + vy * d + y;\n\t\t}\n\t\treturn;\n\t}\n\n\tint v = 0, skip = 0;\n\tfor (size_t i = 0; i < start; i += 2) {\n\t\tint n = (int) bones[v];\n\t\tv += n + 1;\n\t\tskip += n;\n\t}\n\n\tVector<Bone *> &skeletonBones = skeleton.getBones();\n\tif (deformArray->size() == 0) {\n\t\tfor (size_t w = offset, b = skip * 3; w < count; w += stride) {\n\t\t\tfloat wx = 0, wy = 0;\n\t\t\tint n = (int) bones[v++];\n\t\t\tn += v;\n\t\t\tfor (; v < n; v++, b += 3) {\n\t\t\t\tBone *boneP = skeletonBones[bones[v]];\n\t\t\t\tBone &bone = *boneP;\n\t\t\t\tfloat vx = (*vertices)[b];\n\t\t\t\tfloat vy = (*vertices)[b + 1];\n\t\t\t\tfloat weight = (*vertices)[b + 2];\n\t\t\t\twx += (vx * bone._a + vy * bone._b + bone._worldX) * weight;\n\t\t\t\twy += (vx * bone._c + vy * bone._d + bone._worldY) * weight;\n\t\t\t}\n\t\t\tworldVertices[w] = wx;\n\t\t\tworldVertices[w + 1] = wy;\n\t\t}\n\t} else {\n\t\tfor (size_t w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n\t\t\tfloat wx = 0, wy = 0;\n\t\t\tint n = (int) bones[v++];\n\t\t\tn += v;\n\t\t\tfor (; v < n; v++, b += 3, f += 2) {\n\t\t\t\tBone *boneP = skeletonBones[bones[v]];\n\t\t\t\tBone &bone = *boneP;\n\t\t\t\tfloat vx = (*vertices)[b] + (*deformArray)[f];\n\t\t\t\tfloat vy = (*vertices)[b + 1] + (*deformArray)[f + 1];\n\t\t\t\tfloat weight = (*vertices)[b + 2];\n\t\t\t\twx += (vx * bone._a + vy * bone._b + bone._worldX) * weight;\n\t\t\t\twy += (vx * bone._c + vy * bone._d + bone._worldY) * weight;\n\t\t\t}\n\t\t\tworldVertices[w] = wx;\n\t\t\tworldVertices[w + 1] = wy;\n\t\t}\n\t}\n}\n\nint VertexAttachment::getId() {\n\treturn _id;\n}\n\nVector<int> &VertexAttachment::getBones() {\n\treturn _bones;\n}\n\nVector<float> &VertexAttachment::getVertices() {\n\treturn _vertices;\n}\n\nsize_t VertexAttachment::getWorldVerticesLength() {\n\treturn _worldVerticesLength;\n}\n\nvoid VertexAttachment::setWorldVerticesLength(size_t inValue) {\n\t_worldVerticesLength = inValue;\n}\n\nAttachment *VertexAttachment::getTimelineAttachment() {\n\treturn _timelineAttachment;\n}\n\nvoid VertexAttachment::setTimelineAttachment(Attachment *attachment) {\n\t_timelineAttachment = attachment;\n}\n\nint VertexAttachment::getNextID() {\n\tstatic int nextID = 0;\n\treturn nextID++;\n}\n\nvoid VertexAttachment::copyTo(VertexAttachment *other) {\n\tother->_bones.clearAndAddAll(this->_bones);\n\tother->_vertices.clearAndAddAll(this->_vertices);\n\tother->_worldVerticesLength = this->_worldVerticesLength;\n\tother->_timelineAttachment = this->_timelineAttachment;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/boost/CMakeLists.txt",
    "content": "project(boost)\n\nif (WIN32)\n    set(BOOST_STACKTRACE_ENABLE_NOOP ON CACHE BOOL \"\" FORCE)\n    set(BOOST_STACKTRACE_ENABLE_WINDBG ON CACHE BOOL \"\" FORCE)\nelse()\n    set(BOOST_STACKTRACE_ENABLE_NOOP OFF CACHE BOOL \"\" FORCE)\n    set(BOOST_STACKTRACE_ENABLE_WINDBG OFF CACHE BOOL \"\" FORCE)\nendif()\n\nadd_subdirectory(assert)\nadd_subdirectory(config)\nadd_subdirectory(container_hash)\nadd_subdirectory(core)\nadd_subdirectory(describe)\nadd_subdirectory(mp11)\nadd_subdirectory(predef)\nadd_subdirectory(stacktrace)\nadd_subdirectory(static_assert)\nadd_subdirectory(throw_exception)\nadd_subdirectory(winapi)\n\nset_target_properties(boost_assert PROPERTIES FOLDER o2/3rdPartyLibs/boost)\nset_target_properties(boost_core PROPERTIES FOLDER o2/3rdPartyLibs/boost)\nset_target_properties(boost_stacktrace_basic PROPERTIES FOLDER o2/3rdPartyLibs/boost)\n\nif (WIN32)\n    set_target_properties(boost_stacktrace_windbg PROPERTIES FOLDER o2/3rdPartyLibs/boost)\n    set_target_properties(boost_stacktrace_noop PROPERTIES FOLDER o2/3rdPartyLibs/boost)\nendif()"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/.github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\n\n---\n\nFirst of all, when reporting a bug, give the issue a descriptive title.\n\nIn the body of the issue, optionally give a free-form text description of the\nbug. Give the context necessary for others to understand the problem.\n\nThen, provide information necessary to reproduce the bug.\nOmit sections that are irrelevant for the bug report, but note that information\nlike git revision, build platform, build command, and test case are required in\nalmost all cases.\n\n###### JerryScript revision\nIdentify the git hash(es) or tag(s) where the issue was observed.\n\n###### Build platform\nName the build platform. E.g., copy the output of\n`echo \"$(lsb_release -ds) ($(uname -mrs))\"` (on Linux),\n`echo \"$(sw_vers -productName) $(sw_vers -productVersion) ($(uname -mrs))\"` (on macOS), or\n`python -c \"import platform; print(platform.platform())\"` (should work everywhere).\n\n###### Build steps\nDescribe how to build JerryScript. Give all the necessary details of the build\n(e.g., environment variables, command(s), profile, command line options, etc.).\n\nE.g.:\n```sh\ntools/build.py --clean --debug\n```\nOr:\n```sh\nmkdir build && cmake -H. -Bbuild && make -C build\n```\n\nEven if the bug was originally observed when JerryScript was integrated into a\nlarger project, try to reproduce it with as few external code as possible,\npreferably by building the `jerry` command line tool.\n\n###### Build log\nCopy the build log if the reported issue is a build problem. Do a verbose build\nif necessary. Try and trim the log to relevant parts.\n\n###### Test case\nGive the JavaScript input that should be passed to the engine to trigger the\nbug. Try and post a reduced test case that is minimally necessary to reproduce\nthe issue. As a rule of thumb, use Markdown's fenced code block syntax for the\ntest case. Attach the file (renamed to .txt) if the test case contains\n'problematic' bytes that cannot be copied in the bug report directly.\n\n###### Execution platform\nUnnecessary if the same as the build platform.\n\n###### Execution steps\nList the steps that trigger the bug.\n\nE.g., if a bug is snapshot-specific:\n```sh\nbuild/bin/jerry-snapshot generate -o testcase.js.snapshot testcase.js\nbuild/bin/jerry --exec-snapshot testcase.js.snapshot\n```\n\nUnnecessary if trivial (i.e., `build/bin/jerry testcase.js`).\n\n###### Output\nCopy relevant output from the standard output and/or error channels.\n\n###### Backtrace\nIn case of a crash (assertion failure, etc.), try to copy the backtrace from a\ndebugger at the point of failure.\n\n###### Expected behavior\nDescribe what should happen instead of current behavior. Unnecessary if trivial\n(e.g., in case of a crash, the trivial expected behavior is not to crash).\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/.github/pull_request_template.md",
    "content": "**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**\n\nBefore submitting a PR, please, make sure that:\n\n- Changes are in a separate branch, not in master.\n- The branch contains only one commit on top of master (if not, squash them into\n  one commit).\n- The commit has a descriptive commit message with a concise title (first line).\n- The commit message contains `fixes #XXXX` or `closes #XXXX` to auto-close the\n  issue(s) that the PR fixes (if any).\n- Tests for the changes have been added (for bug fixes / features).\n- Documentation has been added / updated (if applicable).\n- All new and existing tests passed locally (if not, fix them first and amend\n  the commit).\n\nIMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing\nguidelines.\n\n**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/.github/workflows/gh-actions.yml",
    "content": "name: JerryScript CI\n\non: [push, pull_request]\n\nenv:\n  RUNNER: tools/run-tests.py\n\njobs:\n  Checks:\n    runs-on: ubuntu-18.04 # needed for checker version stability\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n      - run: sudo apt update\n      - run: sudo apt install doxygen vera++ cppcheck pylint python-serial\n      - run: $RUNNER --check-signed-off=gh-actions\n      - run: $RUNNER --check-doxygen\n      - run: $RUNNER --check-vera\n      - run: $RUNNER --check-license\n      - run: $RUNNER --check-magic-strings\n      - run: $RUNNER --check-pylint\n      - run: $RUNNER --check-cppcheck\n\n  Linux_x86-64_Build_Correctness_Debugger_Tests:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-python@v2\n        with:\n          python-version: '2.7' # needed by jerry-debugger\n      - run: $RUNNER -q --jerry-tests\n      - run: $RUNNER -q --jerry-debugger\n\n  Linux_x86_cpointer-32bit_Build_Correctness_Tests:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - run: sudo apt update\n      - run: sudo apt install gcc-multilib\n      - run: $RUNNER -q --jerry-tests --buildoptions=--compile-flag=-m32,--cpointer-32bit=on\n\n  OSX_x86-64_Build_Correctness_Unit_Tests:\n    runs-on: macos-latest\n    steps:\n      - uses: actions/checkout@v2\n      - run: $RUNNER -q --jerry-tests\n      - run: $RUNNER -q --unittests\n\n  Linux_x86-64_Build_Option_Tests:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - run: sudo apt update\n      - run: sudo apt install gcc-multilib\n      - run: $RUNNER --buildoption-test\n\n  Conformance_Tests_ES5_1:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - run: $RUNNER --test262\n\n  Conformance_Tests_ES2015:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - run: $RUNNER --test262-es2015=update\n      - uses: actions/upload-artifact@v2\n        if: success() || failure()\n        with:\n          name: Test262-ES2015-results\n          path: build/tests/test262_tests_es2015/local/bin/test262.report\n\n  Conformance_Tests_ESNext_A:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - run: $RUNNER --test262-esnext=update --test262-test-list=built-ins,annexB,harness,intl402\n      - uses: actions/upload-artifact@v2\n        if: success() || failure()\n        with:\n          name: Test262-ESNext-results-A\n          path: build/tests/test262_tests_esnext/local/bin/test262.report\n\n  Conformance_Tests_ESNext_B:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - run: $RUNNER --test262-esnext=update --test262-test-list=language\n      - uses: actions/upload-artifact@v2\n        if: success() || failure()\n        with:\n          name: Test262-ESNext-results-B\n          path: build/tests/test262_tests_esnext/local/bin/test262.report\n\n  Unit_Tests:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - run: $RUNNER -q --unittests\n\n  ASAN_Tests:\n    runs-on: ubuntu-latest\n    env:\n      ASAN_OPTIONS: detect_stack_use_after_return=1:check_initialization_order=true:strict_init_order=true\n    steps:\n      - uses: actions/checkout@v2\n      - run: sudo apt update\n      - run: sudo apt install gcc-multilib\n      - run: >-\n          $RUNNER -q --jerry-tests\n          --buildoptions=--stack-limit=0,--compile-flag=-fsanitize=address,--compile-flag=-m32,--compile-flag=-fno-omit-frame-pointer,--compile-flag=-fno-common,--compile-flag=-O2,--debug,--system-allocator=on,--linker-flag=-fuse-ld=gold\n          --skip-list=parser-oom.js,parser-oom2.js,stack-limit.js,regression-test-issue-2190.js,regression-test-issue-2258-2963.js,regression-test-issue-2448.js,regression-test-issue-2905.js,regression-test-issue-3785.js\n\n  UBSAN_Tests:\n    runs-on: ubuntu-latest\n    env:\n      UBSAN_OPTIONS: print_stacktrace=1\n    steps:\n      - uses: actions/checkout@v2\n      - run: sudo apt update\n      - run: sudo apt install gcc-multilib\n      - run: >-\n          $RUNNER -q --jerry-tests\n          --buildoptions=--compile-flag=-fsanitize=undefined,--compile-flag=-m32,--compile-flag=-fno-omit-frame-pointer,--compile-flag=-fno-common,--debug,--system-allocator=on,--linker-flag=-fuse-ld=gold\n          --skip-list=parser-oom.js,parser-oom2.js\n\n  Linux_ARMv7l_Tests:\n    runs-on: ubuntu-latest\n    env:\n      RUNTIME: qemu-arm-static\n      TIMEOUT: 300\n    steps:\n      - uses: actions/checkout@v2\n      - run: sudo apt update\n      - run: sudo apt install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static\n      - run: >-\n          $RUNNER -q --jerry-tests\n          --buildoptions=--toolchain=cmake/toolchain_linux_armv7l.cmake,--linker-flag=-static\n\n  Linux_AArch64_Tests:\n    runs-on: ubuntu-latest\n    env:\n      RUNTIME: qemu-aarch64-static\n      TIMEOUT: 300\n    steps:\n      - uses: actions/checkout@v2\n      - run: sudo apt update\n      - run: sudo apt install gcc-aarch64-linux-gnu libc6-dev-armhf-cross qemu-user-static\n      - run: >-\n          $RUNNER -q --jerry-tests\n          --buildoptions=--toolchain=cmake/toolchain_linux_aarch64.cmake,--linker-flag=-static\n\n  MbedOS5_K64F_Build_Test:\n    runs-on: ubuntu-18.04 # needed due to ppa:team-gcc-arm-embedded/ppa\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-python@v2\n        with:\n          python-version: '3.8' # needed due to 'intelhex' module\n      - run: sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa\n      - run: sudo apt update\n      - run: sudo apt install gcc-arm-embedded python3-setuptools\n      - run: make -f ./targets/mbedos5/Makefile.travis install\n      - run: make -f ./targets/mbedos5/Makefile.travis script\n\n  Zephyr_Arduino_101_Build_Test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-python@v2\n        with:\n          python-version: '3.x'\n      - run: sudo apt update\n      - run: sudo apt install gperf dfu-util device-tree-compiler\n      - run: make -f ./targets/zephyr/Makefile.travis install\n      - run: make -f ./targets/zephyr/Makefile.travis script\n\n  NuttX_STM32F4_Build_Test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - run: sudo apt update\n      - run: sudo apt install gcc-arm-none-eabi libnewlib-arm-none-eabi gperf\n      - run: make -f ./targets/nuttx-stm32f4/Makefile.travis install-noapt\n      - run: make -f ./targets/nuttx-stm32f4/Makefile.travis script\n\n  RIOT_STM32F4_Build_Test:\n    runs-on: ubuntu-18.04 # needed due to ppa:team-gcc-arm-embedded/ppa\n    env:\n      CC: clang\n    steps:\n      - uses: actions/checkout@v2\n      - run: sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa\n      - run: sudo apt update\n      - run: sudo apt install clang gcc-arm-embedded gcc-multilib\n      - run: make -f ./targets/riot-stm32f4/Makefile.travis install-noapt\n      - run: make -f ./targets/riot-stm32f4/Makefile.travis script\n\n  ESP8266_Build_Test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-python@v2\n        with:\n          python-version: '2.7' # needed due to ESP8266_RTOS_SDK/tools/gen_appbin.py\n      - run: make -f ./targets/esp8266/Makefile.travis install-noapt\n      - run: make -f ./targets/esp8266/Makefile.travis script\n\n  Notification:\n    runs-on: ubuntu-latest\n    if: github.event_name == 'push' && github.repository == 'jerryscript-project/jerryscript'\n    steps:\n      - uses: rectalogic/notify-irc@v1\n        with:\n          channel: '#jerryscript'\n          nickname: jerryscript-notification\n          message: |\n            @${{ github.actor }}: ${{ github.repository }} (${{ github.ref }}#${{ github.sha }})\n            ${{ join(github.event.commits.*.message) }}\n            ${{ github.event.compare }}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/.gitignore",
    "content": "# Produced files\n.mbedignore\nbuild/*\n\n# IDE related files\nnbproject\n*.sublime-project\n*.sublime-workspace\n.idea\n\n# Random Trash\n*.swp\n*.swo\n*~\ncore\nvgcore.*\n*.orig\n*.directory\n*.patch\n.tags*\ncscope.*\n__pycache__\n*.pyc\n.DS_Store\n\n# ctags and ID database\ntags\nID\n\n# targets\njerry-targetjs.h\n.output\ntargets/esp8266/output.map\ntargets/esp8266/libs\n\n# Generated documentation\ndocs/doxygen\n\n# Tests\ntests/test262/\n.vs\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nproject (Jerry C)\n\n# Determining version\nexecute_process(COMMAND python ${CMAKE_SOURCE_DIR}/tools/version.py\n                OUTPUT_VARIABLE JERRY_VERSION\n                OUTPUT_STRIP_TRAILING_WHITESPACE)\n\n# Determining platform\nset(PLATFORM \"${CMAKE_SYSTEM_NAME}\")\nstring(TOUPPER \"${PLATFORM}\" PLATFORM)\n\n# Determining compiler\nif(CMAKE_C_COMPILER_ID MATCHES \"GNU\")\n  set(USING_GCC 1)\nendif()\n\nif(CMAKE_C_COMPILER_ID MATCHES \"Clang\")\n  set(USING_CLANG 1)\nendif()\n\nif(CMAKE_C_COMPILER_ID MATCHES \"TI\")\n  set(USING_TI 1)\nendif()\n\nif(CMAKE_C_COMPILER_ID MATCHES \"MSVC\")\n  set(USING_MSVC 1)\nendif()\n\n# Determining build type\nif(NOT CMAKE_BUILD_TYPE)\n  set(CMAKE_BUILD_TYPE \"MinSizeRel\")\nendif()\n\n# Optional components\nset(JERRY_CMDLINE           ON  CACHE BOOL \"Build jerry command line tool?\")\nset(JERRY_CMDLINE_TEST      OFF CACHE BOOL \"Build jerry test command line tool?\")\nset(JERRY_CMDLINE_SNAPSHOT  OFF CACHE BOOL \"Build jerry snapshot command line tool?\")\nset(JERRY_LIBFUZZER         OFF CACHE BOOL \"Build jerry with libfuzzer support?\")\nset(JERRY_PORT_DEFAULT      ON  CACHE BOOL \"Build default jerry port implementation?\")\nset(JERRY_EXT               ON  CACHE BOOL \"Build jerry-ext?\")\nset(JERRY_MATH              OFF CACHE BOOL \"Build and use jerry-math?\")\nset(UNITTESTS               OFF CACHE BOOL \"Build unit tests?\")\nset(DOCTESTS                OFF CACHE BOOL \"Build doc tests?\")\n\n# Optional build settings\nset(BUILD_SHARED_LIBS         OFF CACHE BOOL \"Build shared libraries?\")\nset(ENABLE_AMALGAM            OFF CACHE BOOL \"Enable amalgamated build?\")\nset(ENABLE_LTO                ON  CACHE BOOL \"Enable LTO build?\")\nset(ENABLE_STRIP              ON  CACHE BOOL \"Enable stripping all symbols from release binary?\")\nset(ENABLE_COMPILE_COMMANDS   ON  CACHE BOOL \"Enable generating compile_commands.json?\")\n\n# Option overrides\nif(NOT USING_CLANG)\n  set(JERRY_LIBFUZZER OFF)\n\n  set(JERRY_LIBFUZZER_MESSAGE \" (FORCED BY COMPILER)\")\nendif()\n\nif(JERRY_CMDLINE OR JERRY_CMDLINE_TEST OR JERRY_CMDLINE_SNAPSHOT OR JERRY_LIBFUZZER OR UNITTESTS OR DOCTESTS)\n  set(JERRY_PORT_DEFAULT ON)\n\n  set(JERRY_PORT_DEFAULT_MESSAGE \" (FORCED BY CMDLINE OR LIBFUZZER OR TESTS)\")\nendif()\n\nif(JERRY_CMDLINE OR DOCTESTS)\n  set(JERRY_EXT ON)\n\n  set(JERRY_EXT_MESSAGE \" (FORCED BY CMDLINE OR TESTS)\")\nendif()\n\nif(\"${PLATFORM}\" STREQUAL \"DARWIN\")\n  set(ENABLE_LTO         OFF)\n  set(ENABLE_STRIP       OFF)\n\n  set(ENABLE_LTO_MESSAGE         \" (FORCED BY PLATFORM)\")\n  set(ENABLE_STRIP_MESSAGE       \" (FORCED BY PLATFORM)\")\nendif()\n\nif(\"${PLATFORM}\" STREQUAL \"ESP-IDF\")\n  set(ENABLE_LTO         OFF)\n  set(ENABLE_STRIP       OFF)\n\n  set(ENABLE_LTO_MESSAGE         \" (FORCED BY PLATFORM)\")\n  set(ENABLE_STRIP_MESSAGE       \" (FORCED BY PLATFORM)\")\nendif()\n\nif(USING_TI)\n  set(ENABLE_STRIP       OFF)\n\n  set(ENABLE_STRIP_MESSAGE       \" (FORCED BY COMPILER)\")\nendif()\n\nif(USING_MSVC)\n  set(ENABLE_STRIP       OFF)\n\n  set(ENABLE_STRIP_MESSAGE       \" (FORCED BY COMPILER)\")\nendif()\n\nif(CYGWIN OR MINGW OR MSYS)\n  set(ENABLE_LTO         OFF)\n\n  set(ENABLE_LTO_MESSAGE         \" (FORCED BY PLATFORM)\")\nendif()\n\n# Generate compile_commands.json\nset(CMAKE_EXPORT_COMPILE_COMMANDS ${ENABLE_COMPILE_COMMANDS})\n\n# Status messages\nmessage(STATUS \"CMAKE_BUILD_TYPE               \" ${CMAKE_BUILD_TYPE})\nmessage(STATUS \"CMAKE_C_COMPILER_ID            \" ${CMAKE_C_COMPILER_ID})\nmessage(STATUS \"CMAKE_SYSTEM_NAME              \" ${CMAKE_SYSTEM_NAME})\nmessage(STATUS \"CMAKE_SYSTEM_PROCESSOR         \" ${CMAKE_SYSTEM_PROCESSOR})\nmessage(STATUS \"BUILD_SHARED_LIBS              \" ${BUILD_SHARED_LIBS})\nmessage(STATUS \"ENABLE_AMALGAM                 \" ${ENABLE_AMALGAM} ${ENABLE_AMALGAM_MESSAGE})\nmessage(STATUS \"ENABLE_LTO                     \" ${ENABLE_LTO} ${ENABLE_LTO_MESSAGE})\nmessage(STATUS \"ENABLE_STRIP                   \" ${ENABLE_STRIP} ${ENABLE_STRIP_MESSAGE})\nmessage(STATUS \"ENABLE_COMPILE_COMMANDS        \" ${ENABLE_COMPILE_COMMANDS})\nmessage(STATUS \"JERRY_VERSION                  \" ${JERRY_VERSION})\nmessage(STATUS \"JERRY_CMDLINE                  \" ${JERRY_CMDLINE} ${JERRY_CMDLINE_MESSAGE})\nmessage(STATUS \"JERRY_CMDLINE_TEST             \" ${JERRY_CMDLINE_TEST} ${JERRY_CMDLINE_TEST_MESSAGE})\nmessage(STATUS \"JERRY_CMDLINE_SNAPSHOT         \" ${JERRY_CMDLINE_SNAPSHOT} ${JERRY_CMDLINE_SNAPSHOT_MESSAGE})\nmessage(STATUS \"JERRY_LIBFUZZER                \" ${JERRY_LIBFUZZER} ${JERRY_LIBFUZZER_MESSAGE})\nmessage(STATUS \"JERRY_PORT_DEFAULT             \" ${JERRY_PORT_DEFAULT} ${JERRY_PORT_DEFAULT_MESSAGE})\nmessage(STATUS \"JERRY_EXT                      \" ${JERRY_EXT} ${JERRY_EXT_MESSAGE})\nmessage(STATUS \"JERRY_MATH                     \" ${JERRY_MATH} ${JERRY_MATH_MESSAGE})\nmessage(STATUS \"UNITTESTS                      \" ${UNITTESTS})\nmessage(STATUS \"DOCTESTS                       \" ${DOCTESTS})\n\n# Setup directories\n# Note: This mimics a conventional file system layout in the build directory for\n# the sake of convenient location of build artefacts. Proper installation to\n# traditional locations is also supported, e.g., to /usr/local.\nset(CMAKE_RUNTIME_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/bin/\")\nset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/lib/\")\nset(CMAKE_LIBRARY_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/lib/\")\n\n# Remove rdynamic option\nset(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS )\n\n# Compile/link flags\n# Helper macros\nmacro(jerry_add_flags VAR)\n  foreach(_flag ${ARGN})\n    set(${VAR} \"${${VAR}} ${_flag}\")\n  endforeach()\nendmacro()\n\nmacro(jerry_add_compile_flags)\n  jerry_add_flags(CMAKE_C_FLAGS ${ARGV})\nendmacro()\n\nmacro(jerry_add_compile_warnings)\n  foreach(_warning ${ARGV})\n    jerry_add_compile_flags(-W${_warning})\n    if(NOT EMSCRIPTEN)\n      jerry_add_compile_flags(-Werror=${_warning})\n    endif()\n  endforeach()\nendmacro()\n\nmacro(jerry_add_link_flags)\n  jerry_add_flags(LINKER_FLAGS_COMMON ${ARGV})\nendmacro()\n\n# Architecture-specific compile/link flags\njerry_add_compile_flags(${FLAGS_COMMON_ARCH})\njerry_add_flags(CMAKE_EXE_LINKER_FLAGS ${FLAGS_COMMON_ARCH})\n\n# LTO\nif(ENABLE_LTO)\n  if(USING_GCC OR USING_CLANG)\n    jerry_add_compile_flags(-flto)\n    jerry_add_link_flags(-flto)\n  endif()\n  if(USING_GCC)\n    jerry_add_compile_flags(-fno-fat-lto-objects)\n    # Use gcc-ar and gcc-ranlib to support LTO\n    set(CMAKE_AR \"gcc-ar\")\n    set(CMAKE_RANLIB \"gcc-ranlib\")\n  endif()\n  if(USING_TI)\n    jerry_add_link_flags(-lto)\n  endif()\nendif()\n\n# Compiler / Linker flags\nif(\"${PLATFORM}\" STREQUAL \"DARWIN\")\n  jerry_add_link_flags(-lSystem)\n  set(CMAKE_C_ARCHIVE_CREATE \"<CMAKE_AR> Sqc <TARGET> <LINK_FLAGS> <OBJECTS>\")\n  set(CMAKE_C_ARCHIVE_FINISH \"<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>\")\n  set(CMAKE_SHARED_LINKER_FLAGS  \"-undefined dynamic_lookup\")\nelseif((NOT CYGWIN AND NOT MINGW AND NOT MSYS) AND (USING_GCC OR USING_CLANG))\n  jerry_add_link_flags(-Wl,-z,noexecstack)\nendif()\n\nif(USING_GCC OR USING_CLANG)\n  jerry_add_compile_flags(-std=c99 -pedantic)\n  if(JERRY_MATH)\n    jerry_add_compile_flags(-fno-builtin)\n  endif()\n  jerry_add_compile_warnings(all extra format-nonliteral init-self conversion sign-conversion format-security missing-declarations shadow strict-prototypes undef old-style-definition)\n  if(EMSCRIPTEN)\n    jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes)\n  else()\n    jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes -Werror)\n  endif()\nendif()\n\nif(USING_GCC)\n  jerry_add_compile_warnings(logical-op)\n  # TODO: Remove workaround for gcc 7 bug if the fallthrough comment detection is fixed.\n  if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 7.0)\n    jerry_add_compile_flags(-Wno-implicit-fallthrough)\n  endif()\nendif()\n\nif(USING_CLANG)\n  jerry_add_compile_flags(-Wno-nested-anon-types -Wno-static-in-inline)\n  if(EMSCRIPTEN)\n    # Newer Clang flags a lot of legacy C warnings-as-errors in jerryscript.\n    # Keep warnings visible but stop treating them as errors for this vendored lib.\n    jerry_add_compile_flags(-Wno-error)\n  endif()\nendif()\n\nif(USING_TI)\n  jerry_add_compile_flags(--c99)\nendif()\n\nif(USING_MSVC)\n  jerry_add_link_flags(/OPT:NOREF)\n  # Disable MSVC warning 4996 globally because it stops us from using standard C functions.\n  jerry_add_compile_flags(/wd4996)\nendif()\n\nif(JERRY_LIBFUZZER)\n  jerry_add_compile_flags(-fsanitize=fuzzer-no-link)\nendif()\n\n# Strip binary\nif(ENABLE_STRIP AND NOT CMAKE_BUILD_TYPE STREQUAL \"Debug\")\n  jerry_add_link_flags(-s)\nendif()\n\n# External compiler & linker flags\nif(DEFINED EXTERNAL_COMPILE_FLAGS)\n  jerry_add_compile_flags(${EXTERNAL_COMPILE_FLAGS})\nendif()\n\nif(DEFINED EXTERNAL_LINKER_FLAGS)\n  jerry_add_link_flags(${EXTERNAL_LINKER_FLAGS})\nendif()\n\n# Used as placeholder to attach amalgamated build targets to\nadd_custom_target(amalgam)\n\n# Jerry's libm\nif(JERRY_MATH)\n  add_subdirectory(jerry-math)\nendif()\n\n# Jerry's core\nadd_subdirectory(jerry-core)\n\n# Jerry's extension tools\nif(JERRY_EXT)\n  add_subdirectory(jerry-ext)\nendif()\n\n# Jerry's default port implementation\nif(JERRY_PORT_DEFAULT)\n  add_subdirectory(jerry-port/default)\nendif()\n\n# Jerry command line tool\nif(JERRY_CMDLINE OR JERRY_CMDLINE_TEST OR JERRY_CMDLINE_SNAPSHOT OR JERRY_LIBFUZZER)\n  add_subdirectory(jerry-main)\nendif()\n\n# Unittests\nif(UNITTESTS)\n  add_subdirectory(tests/unit-core)\n  if(JERRY_MATH)\n    add_subdirectory(tests/unit-math)\n  endif()\n  if(JERRY_EXT)\n    add_subdirectory(tests/unit-ext)\n  endif()\nendif()\n\n# Doctests\nif(DOCTESTS)\n  add_subdirectory(tests/unit-doc)\nendif()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/CONTRIBUTING.md",
    "content": "# Contribution Guidelines\n## Patch Submission Process\n\nThe following guidelines on the submission process are provided to help you be more effective when submitting code to the JerryScript project.\n\nWhen development is complete, a patch set should be submitted via GitHub pull requests. A review of the patch set will take place. When accepted, the patch set will be integrated into the master branch, verified, and tested. It is then the responsibility of the authoring developer to maintain the code throughout its lifecycle.\n\nPlease submit all patches in public by opening a pull request. Patches sent privately to Maintainers and Committers will not be considered. Because the JerryScript Project is an Open Source project, be prepared for feedback and criticism-it happens to everyone-. If asked to rework your code, be persistent and resubmit after making changes.\n\n### 1. Scope the patch\n\nSmaller patches are generally easier to understand and test, so please submit changes in the smallest increments possible, within reason. Smaller patches are less likely to have unintended consequences, and if they do, getting to the root cause is much easier for you and the Maintainers and Committers. Additionally, smaller patches are much more likely to be accepted.\n\n### 2. Ensure all files have a proper license header and copyright notice\n\nAny code that you want to contribute to the project must be licensed under the [Apache License 2.0](LICENSE). Contributions under a different license can not be accepted. Each file should start with the following header:\n\n```c\n/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n```\n\nAdding copyright notices other than the project-wide notice (\"Copyright JS Foundation and other contributors, http://js.foundation\") is not permitted. The only exception is adding third-party code which requires copyright notices to be preserved. Adding third-party code to the project generally requires a strong justification.\n\n### 3. Sign your work with the JerryScript [Developer's Certificate of Origin](DCO.md)\n\nThe sign-off is a simple line at the end of the commit message of the patch, which certifies that you wrote it or otherwise have the right to pass it on as an Open Source patch. The sign-off is required for a patch to be accepted.\n\nWe have the same requirements for using the signed-off-by process as the Linux kernel.\nIn short, you need to include a signed-off-by tag in every patch.\n\nYou should use your real name and email address in the format below:\n\n> JerryScript-DCO-1.0-Signed-off-by: Random J Developer random@developer.example.org\n\n\"JerryScript-DCO-1.0-Signed-off-by:\" this is a developer's certification that he or she has the right to submit the patch for inclusion into the project. It is an agreement to the JerryScript [Developer's Certificate of Origin](DCO.md). **Code without a proper signoff cannot be merged into the mainline.**\n\n### 4. Open a GitHub [pull request](https://github.com/jerryscript-project/jerryscript/pulls)\n\nYou can find instructions about opening a pull request [here](https://help.github.com/articles/creating-a-pull-request).\n\n### 5. What if my patch is rejected?\n\nIt happens all the time, for many reasons, and not necessarily because the code is bad. Take the feedback, adapt your code, and try again. Remember, the ultimate goal is to preserve the quality of the code and maintain the focus of the Project through intensive review.\n\nMaintainers and Committers typically have to process a lot of submissions, and the time for any individual response is generally limited. If the reason for rejection is unclear, please ask for more information from the Maintainers and Committers.\nIf you have a solid technical reason to disagree with feedback and you feel that reason has been overlooked, take the time to thoroughly explain it in your response.\n\n### 6. Code review\n\nCode review can be performed by all the members of the Project (not just Maintainers and Committers). Members can review code changes and share their opinion through comments guided by the following principles:\n* Discuss code; never discuss the code's author\n* Respect and acknowledge contributions, suggestions, and comments\n* Listen and be open to all different opinions\n* Help each other\n\nChanges are submitted via pull requests and only the Maintainers and Committers should approve or reject the pull request (note that only Maintainers can give binding review scores).\nChanges should be reviewed in reasonable amount of time. Maintainers and Committers should leave changes open for some time (at least 1 full business day) so others can offer feedback. Review times increase with the complexity of the review.\n\n## Tips on GitHub Pull Requests\n\n* [Fork](https://guides.github.com/activities/forking) the GitHub repository and clone it locally\n* Connect your local repository to the original upstream repository by adding it as a remote\n* Create a [branch](https://guides.github.com/introduction/flow) for your edits\n* Pull in upstream changes often to stay up-to-date so that when you submit your pull request, merge conflicts will be less likely\n\nFor more details, see the GitHub [fork syncing](https://help.github.com/articles/syncing-a-fork) guidelines.\n\n## How to add the DCO line to every single commit automatically\n\nIt is easy to forget adding the DCO line to the end of every commit message. Fortunately there is a nice way to do it automatically. Once you've cloned the repository into your local machine, you can add `prepare commit message hook` in `.git/hooks` directory like this:\n\n```\n#!/usr/bin/env python\n\nimport sys\n\ncommit_msg_filepath = sys.argv[1]\n\nwith open(commit_msg_filepath, \"r+\") as f:\n\tcontent = f.read()\n\tf.seek(0, 0)\n\tif \"Signed-off-by\" not in content:\n\t\tf.write(\"\\n\\nJerryScript-DCO-1.0-Signed-off-by: <Your Name> <Your Email>\\n%s\" % content)\n\telse:\n\t\tf.write(content)\n```\n\nPlease refer [Git Hooks](http://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) for more information.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/DCO.md",
    "content": "# JerryScript Developer's Certificate of Origin\n\nThe JerryScript project uses the signed-off-by language and process to give us a clear chain of trust for every patch received.\n\n> By making a contribution to this project, I certify that:\n\n> (a)\tThe contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or\n\n> (b)\tThe contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or\n\n> (c)\tThe contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.\n\n> (d)\tI understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project, under the same open source license.\n\nWe have the same requirements for using the signed-off-by process as the Linux kernel.\nIn short, you need to include a signed-off-by tag in the commit message of every patch.\n\nYou should use your real name and email address in the format below:\n\n> JerryScript-DCO-1.0-Signed-off-by: Random J Developer random@developer.example.org\n\n\"JerryScript-DCO-1.0-Signed-off-by:\" this is a developer's certification that he or she has the right to submit the patch for inclusion into the project. It is an agreement to the Developer's Certificate of Origin (above). **Code without a proper signoff cannot be merged into the mainline.**\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/Doxyfile",
    "content": "# Doxyfile 1.8.9.1\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) for a project.\n#\n# All text after a double hash (##) is considered a comment and is placed in\n# front of the TAG it is preceding.\n#\n# All text after a single hash (#) is considered a comment and will be ignored.\n# The format is:\n# TAG = value [value, ...]\n# For lists, items can also be appended using:\n# TAG += value [value, ...]\n# Values that contain spaces should be placed between quotes (\\\" \\\").\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\n\n# This tag specifies the encoding used for all characters in the config file\n# that follow. The default is UTF-8 which is also the encoding used for all text\n# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv\n# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv\n# for the list of possible encodings.\n# The default value is: UTF-8.\n\nDOXYFILE_ENCODING      = UTF-8\n\n# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by\n# double-quotes, unless you are using Doxywizard) that should identify the\n# project for which the documentation is generated. This name is used in the\n# title of most generated pages and in a few other places.\n# The default value is: My Project.\n\nPROJECT_NAME           = \"JerryScript\"\n\n# The PROJECT_NUMBER tag can be used to enter a project or revision number. This\n# could be handy for archiving the generated documentation or if some version\n# control system is used.\n\nPROJECT_NUMBER         =\n\n# Using the PROJECT_BRIEF tag one can provide an optional one line description\n# for a project that appears at the top of each page and should give viewer a\n# quick idea about the purpose of the project. Keep the description short.\n\nPROJECT_BRIEF          = \"JavaScript Engine for Internet of Things\"\n\n# With the PROJECT_LOGO tag one can specify a logo or an icon that is included\n# in the documentation. The maximum height of the logo should not exceed 55\n# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy\n# the logo to the output directory.\n\nPROJECT_LOGO           =\n\n# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path\n# into which the generated documentation will be written. If a relative path is\n# entered, it will be relative to the location where doxygen was started. If\n# left blank the current directory will be used.\n\nOUTPUT_DIRECTORY       = \"docs/doxygen\"\n\n# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-\n# directories (in 2 levels) under the output directory of each output format and\n# will distribute the generated files over these directories. Enabling this\n# option can be useful when feeding doxygen a huge amount of source files, where\n# putting all generated files in the same directory would otherwise causes\n# performance problems for the file system.\n# The default value is: NO.\n\nCREATE_SUBDIRS         = NO\n\n# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII\n# characters to appear in the names of generated files. If set to NO, non-ASCII\n# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode\n# U+3044.\n# The default value is: NO.\n\n# ALLOW_UNICODE_NAMES    = NO\n\n# The OUTPUT_LANGUAGE tag is used to specify the language in which all\n# documentation generated by doxygen is written. Doxygen will use this\n# information to generate all constant output in the proper language.\n# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,\n# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),\n# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,\n# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),\n# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,\n# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,\n# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,\n# Ukrainian and Vietnamese.\n# The default value is: English.\n\nOUTPUT_LANGUAGE        = English\n\n# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member\n# descriptions after the members that are listed in the file and class\n# documentation (similar to Javadoc). Set to NO to disable this.\n# The default value is: YES.\n\nBRIEF_MEMBER_DESC      = YES\n\n# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief\n# description of a member or function before the detailed description\n#\n# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the\n# brief descriptions will be completely suppressed.\n# The default value is: YES.\n\nREPEAT_BRIEF           = YES\n\n# This tag implements a quasi-intelligent brief description abbreviator that is\n# used to form the text in various listings. Each string in this list, if found\n# as the leading text of the brief description, will be stripped from the text\n# and the result, after processing the whole list, is used as the annotated\n# text. Otherwise, the brief description is used as-is. If left blank, the\n# following values are used ($name is automatically replaced with the name of\n# the entity):The $name class, The $name widget, The $name file, is, provides,\n# specifies, contains, represents, a, an and the.\n\nABBREVIATE_BRIEF       =\n\n# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then\n# doxygen will generate a detailed section even if there is only a brief\n# description.\n# The default value is: NO.\n\nALWAYS_DETAILED_SEC    = YES\n\n# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all\n# inherited members of a class in the documentation of that class as if those\n# members were ordinary class members. Constructors, destructors and assignment\n# operators of the base classes will not be shown.\n# The default value is: NO.\n\nINLINE_INHERITED_MEMB  = NO\n\n# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path\n# before files name in the file list and in the header files. If set to NO the\n# shortest path that makes the file name unique will be used\n# The default value is: YES.\n\nFULL_PATH_NAMES        = YES\n\n# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.\n# Stripping is only done if one of the specified strings matches the left-hand\n# part of the path. The tag can be used to show relative paths in the file list.\n# If left blank the directory from which doxygen is run is used as the path to\n# strip.\n#\n# Note that you can specify absolute paths here, but also relative paths, which\n# will be relative from the directory where doxygen is started.\n# This tag requires that the tag FULL_PATH_NAMES is set to YES.\n\nSTRIP_FROM_PATH        =\n\n# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the\n# path mentioned in the documentation of a class, which tells the reader which\n# header file to include in order to use a class. If left blank only the name of\n# the header file containing the class definition is used. Otherwise one should\n# specify the list of include paths that are normally passed to the compiler\n# using the -I flag.\n\nSTRIP_FROM_INC_PATH    =\n\n# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but\n# less readable) file names. This can be useful is your file systems doesn't\n# support long names like on DOS, Mac, or CD-ROM.\n# The default value is: NO.\n\nSHORT_NAMES            = NO\n\n# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the\n# first line (until the first dot) of a Javadoc-style comment as the brief\n# description. If set to NO, the Javadoc-style will behave just like regular Qt-\n# style comments (thus requiring an explicit @brief command for a brief\n# description.)\n# The default value is: NO.\n\nJAVADOC_AUTOBRIEF      = YES\n\n# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first\n# line (until the first dot) of a Qt-style comment as the brief description. If\n# set to NO, the Qt-style will behave just like regular Qt-style comments (thus\n# requiring an explicit \\brief command for a brief description.)\n# The default value is: NO.\n\nQT_AUTOBRIEF           = NO\n\n# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a\n# multi-line C++ special comment block (i.e. a block of //! or /// comments) as\n# a brief description. This used to be the default behavior. The new default is\n# to treat a multi-line C++ comment block as a detailed description. Set this\n# tag to YES if you prefer the old behavior instead.\n#\n# Note that setting this tag to YES also means that rational rose comments are\n# not recognized any more.\n# The default value is: NO.\n\nMULTILINE_CPP_IS_BRIEF = NO\n\n# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the\n# documentation from any documented member that it re-implements.\n# The default value is: YES.\n\nINHERIT_DOCS           = YES\n\n# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new\n# page for each member. If set to NO, the documentation of a member will be part\n# of the file/class/namespace that contains it.\n# The default value is: NO.\n\nSEPARATE_MEMBER_PAGES  = NO\n\n# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen\n# uses this value to replace tabs by spaces in code fragments.\n# Minimum value: 1, maximum value: 16, default value: 4.\n\nTAB_SIZE               = 2\n\n# This tag can be used to specify a number of aliases that act as commands in\n# the documentation. An alias has the form:\n# name=value\n# For example adding\n# \"sideeffect=@par Side Effects:\\n\"\n# will allow you to put the command \\sideeffect (or @sideeffect) in the\n# documentation, which will result in a user-defined paragraph with heading\n# \"Side Effects:\". You can put \\n's in the value part of an alias to insert\n# newlines.\n\nALIASES                =\n\n# This tag can be used to specify a number of word-keyword mappings (TCL only).\n# A mapping has the form \"name=value\". For example adding \"class=itcl::class\"\n# will allow you to use the command class in the itcl::class meaning.\n\nTCL_SUBST              =\n\n# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources\n# only. Doxygen will then generate output that is more tailored for C. For\n# instance, some of the names that are used will be different. The list of all\n# members will be omitted, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_FOR_C  = YES\n\n# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or\n# Python sources only. Doxygen will then generate output that is more tailored\n# for that language. For instance, namespaces will be presented as packages,\n# qualified scopes will look different, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_JAVA   = NO\n\n# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran\n# sources. Doxygen will then generate output that is tailored for Fortran.\n# The default value is: NO.\n\nOPTIMIZE_FOR_FORTRAN   = NO\n\n# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL\n# sources. Doxygen will then generate output that is tailored for VHDL.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_VHDL   = NO\n\n# Doxygen selects the parser to use depending on the extension of the files it\n# parses. With this tag you can assign which parser to use for a given\n# extension. Doxygen has a built-in mapping, but you can override or extend it\n# using this tag. The format is ext=language, where ext is a file extension, and\n# language is one of the parsers supported by doxygen: IDL, Java, Javascript,\n# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:\n# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:\n# Fortran. In the later case the parser tries to guess whether the code is fixed\n# or free formatted code, this is the default for Fortran type files), VHDL. For\n# instance to make doxygen treat .inc files as Fortran files (default is PHP),\n# and .f files as C (default is Fortran), use: inc=Fortran f=C.\n#\n# Note: For files without extension you can use no_extension as a placeholder.\n#\n# Note that for custom extensions you also need to set FILE_PATTERNS otherwise\n# the files are not read by doxygen.\n\nEXTENSION_MAPPING      =\n\n# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments\n# according to the Markdown format, which allows for more readable\n# documentation. See http://daringfireball.net/projects/markdown/ for details.\n# The output of markdown processing is further processed by doxygen, so you can\n# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in\n# case of backward compatibilities issues.\n# The default value is: YES.\n\nMARKDOWN_SUPPORT       = YES\n\n# When enabled doxygen tries to link words that correspond to documented\n# classes, or namespaces to their corresponding documentation. Such a link can\n# be prevented in individual cases by putting a % sign in front of the word or\n# globally by setting AUTOLINK_SUPPORT to NO.\n# The default value is: YES.\n\nAUTOLINK_SUPPORT       = YES\n\n# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want\n# to include (a tag file for) the STL sources as input, then you should set this\n# tag to YES in order to let doxygen match functions declarations and\n# definitions whose arguments contain STL classes (e.g. func(std::string);\n# versus func(std::string) {}). This also make the inheritance and collaboration\n# diagrams that involve STL classes more complete and accurate.\n# The default value is: NO.\n\nBUILTIN_STL_SUPPORT    = NO\n\n# If you use Microsoft's C++/CLI language, you should set this option to YES to\n# enable parsing support.\n# The default value is: NO.\n\nCPP_CLI_SUPPORT        = NO\n\n# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:\n# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen\n# will parse them like normal C++ but will assume all classes use public instead\n# of private inheritance when no explicit protection keyword is present.\n# The default value is: NO.\n\nSIP_SUPPORT            = NO\n\n# For Microsoft's IDL there are propget and propput attributes to indicate\n# getter and setter methods for a property. Setting this option to YES will make\n# doxygen to replace the get and set methods by a property in the documentation.\n# This will only work if the methods are indeed getting or setting a simple\n# type. If this is not the case, or you want to show the methods anyway, you\n# should set this option to NO.\n# The default value is: YES.\n\nIDL_PROPERTY_SUPPORT   = YES\n\n# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC\n# tag is set to YES then doxygen will reuse the documentation of the first\n# member in the group (if any) for the other members of the group. By default\n# all members of a group must be documented explicitly.\n# The default value is: NO.\n\nDISTRIBUTE_GROUP_DOC   = YES\n\n# Set the SUBGROUPING tag to YES to allow class member groups of the same type\n# (for instance a group of public functions) to be put as a subgroup of that\n# type (e.g. under the Public Functions section). Set it to NO to prevent\n# subgrouping. Alternatively, this can be done per class using the\n# \\nosubgrouping command.\n# The default value is: YES.\n\nSUBGROUPING            = YES\n\n# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions\n# are shown inside the group in which they are included (e.g. using \\ingroup)\n# instead of on a separate page (for HTML and Man pages) or section (for LaTeX\n# and RTF).\n#\n# Note that this feature does not work in combination with\n# SEPARATE_MEMBER_PAGES.\n# The default value is: NO.\n\nINLINE_GROUPED_CLASSES = NO\n\n# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions\n# with only public data fields or simple typedef fields will be shown inline in\n# the documentation of the scope in which they are defined (i.e. file,\n# namespace, or group documentation), provided this scope is documented. If set\n# to NO, structs, classes, and unions are shown on a separate page (for HTML and\n# Man pages) or section (for LaTeX and RTF).\n# The default value is: NO.\n\nINLINE_SIMPLE_STRUCTS  = NO\n\n# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or\n# enum is documented as struct, union, or enum with the name of the typedef. So\n# typedef struct TypeS {} TypeT, will appear in the documentation as a struct\n# with name TypeT. When disabled the typedef will appear as a member of a file,\n# namespace, or class. And the struct will be named TypeS. This can typically be\n# useful for C code in case the coding convention dictates that all compound\n# types are typedef'ed and only the typedef is referenced, never the tag name.\n# The default value is: NO.\n\nTYPEDEF_HIDES_STRUCT   = NO\n\n# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This\n# cache is used to resolve symbols given their name and scope. Since this can be\n# an expensive process and often the same symbol appears multiple times in the\n# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small\n# doxygen will become slower. If the cache is too large, memory is wasted. The\n# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range\n# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536\n# symbols. At the end of a run doxygen will report the cache usage and suggest\n# the optimal cache size from a speed point of view.\n# Minimum value: 0, maximum value: 9, default value: 0.\n\nLOOKUP_CACHE_SIZE      = 0\n\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\n\n# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in\n# documentation are documented, even if no documentation was available. Private\n# class members and static file members will be hidden unless the\n# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.\n# Note: This will also disable the warnings about undocumented members that are\n# normally produced when WARNINGS is set to YES.\n# The default value is: NO.\n\nEXTRACT_ALL            = NO\n\n# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will\n# be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PRIVATE        = YES\n\n# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal\n# scope will be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PACKAGE        = NO\n\n# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be\n# included in the documentation.\n# The default value is: NO.\n\nEXTRACT_STATIC         = YES\n\n# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined\n# locally in source files will be included in the documentation. If set to NO,\n# only classes defined in header files are included. Does not have any effect\n# for Java sources.\n# The default value is: YES.\n\nEXTRACT_LOCAL_CLASSES  = YES\n\n# This flag is only useful for Objective-C code. If set to YES, local methods,\n# which are defined in the implementation section but not in the interface are\n# included in the documentation. If set to NO, only methods in the interface are\n# included.\n# The default value is: NO.\n\nEXTRACT_LOCAL_METHODS  = YES\n\n# If this flag is set to YES, the members of anonymous namespaces will be\n# extracted and appear in the documentation as a namespace called\n# 'anonymous_namespace{file}', where file will be replaced with the base name of\n# the file that contains the anonymous namespace. By default anonymous namespace\n# are hidden.\n# The default value is: NO.\n\nEXTRACT_ANON_NSPACES   = NO\n\n# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all\n# undocumented members inside documented classes or files. If set to NO these\n# members will be included in the various overviews, but no documentation\n# section is generated. This option has no effect if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_MEMBERS     = NO\n\n# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all\n# undocumented classes that are normally visible in the class hierarchy. If set\n# to NO, these classes will be included in the various overviews. This option\n# has no effect if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_CLASSES     = NO\n\n# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend\n# (class|struct|union) declarations. If set to NO, these declarations will be\n# included in the documentation.\n# The default value is: NO.\n\nHIDE_FRIEND_COMPOUNDS  = NO\n\n# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any\n# documentation blocks found inside the body of a function. If set to NO, these\n# blocks will be appended to the function's detailed documentation block.\n# The default value is: NO.\n\nHIDE_IN_BODY_DOCS      = NO\n\n# The INTERNAL_DOCS tag determines if documentation that is typed after a\n# \\internal command is included. If the tag is set to NO then the documentation\n# will be excluded. Set it to YES to include the internal documentation.\n# The default value is: NO.\n\nINTERNAL_DOCS          = NO\n\n# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file\n# names in lower-case letters. If set to YES, upper-case letters are also\n# allowed. This is useful if you have classes or files whose names only differ\n# in case and if your file system supports case sensitive file names. Windows\n# and Mac users are advised to set this option to NO.\n# The default value is: system dependent.\n\nCASE_SENSE_NAMES       = YES\n\n# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with\n# their full class and namespace scopes in the documentation. If set to YES, the\n# scope will be hidden.\n# The default value is: NO.\n\nHIDE_SCOPE_NAMES       = NO\n\n# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will\n# append additional text to a page's title, such as Class Reference. If set to\n# YES the compound reference will be hidden.\n# The default value is: NO.\n\n# HIDE_COMPOUND_REFERENCE= NO\n\n# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of\n# the files that are included by a file in the documentation of that file.\n# The default value is: YES.\n\nSHOW_INCLUDE_FILES     = YES\n\n# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each\n# grouped member an include statement to the documentation, telling the reader\n# which file to include in order to use the member.\n# The default value is: NO.\n\nSHOW_GROUPED_MEMB_INC  = NO\n\n# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include\n# files with double quotes in the documentation rather than with sharp brackets.\n# The default value is: NO.\n\nFORCE_LOCAL_INCLUDES   = NO\n\n# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the\n# documentation for inline members.\n# The default value is: YES.\n\nINLINE_INFO            = YES\n\n# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the\n# (detailed) documentation of file and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order.\n# The default value is: YES.\n\nSORT_MEMBER_DOCS       = YES\n\n# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief\n# descriptions of file, namespace and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order. Note that\n# this will also influence the order of the classes in the class list.\n# The default value is: NO.\n\nSORT_BRIEF_DOCS        = YES\n\n# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the\n# (brief and detailed) documentation of class members so that constructors and\n# destructors are listed first. If set to NO the constructors will appear in the\n# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.\n# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief\n# member documentation.\n# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting\n# detailed member documentation.\n# The default value is: NO.\n\nSORT_MEMBERS_CTORS_1ST = NO\n\n# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy\n# of group names into alphabetical order. If set to NO the group names will\n# appear in their defined order.\n# The default value is: NO.\n\nSORT_GROUP_NAMES       = NO\n\n# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by\n# fully-qualified names, including namespaces. If set to NO, the class list will\n# be sorted only by class name, not including the namespace part.\n# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\n# Note: This option applies only to the class list, not to the alphabetical\n# list.\n# The default value is: NO.\n\nSORT_BY_SCOPE_NAME     = NO\n\n# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper\n# type resolution of all parameters of a function it will reject a match between\n# the prototype and the implementation of a member function even if there is\n# only one candidate or it is obvious which candidate to choose by doing a\n# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still\n# accept a match between prototype and implementation in such cases.\n# The default value is: NO.\n\nSTRICT_PROTO_MATCHING  = NO\n\n# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo\n# list. This list is created by putting \\todo commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TODOLIST      = YES\n\n# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test\n# list. This list is created by putting \\test commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TESTLIST      = YES\n\n# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug\n# list. This list is created by putting \\bug commands in the documentation.\n# The default value is: YES.\n\nGENERATE_BUGLIST       = YES\n\n# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)\n# the deprecated list. This list is created by putting \\deprecated commands in\n# the documentation.\n# The default value is: YES.\n\nGENERATE_DEPRECATEDLIST= YES\n\n# The ENABLED_SECTIONS tag can be used to enable conditional documentation\n# sections, marked by \\if <section_label> ... \\endif and \\cond <section_label>\n# ... \\endcond blocks.\n\nENABLED_SECTIONS       =\n\n# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the\n# initial value of a variable or macro / define can have for it to appear in the\n# documentation. If the initializer consists of more lines than specified here\n# it will be hidden. Use a value of 0 to hide initializers completely. The\n# appearance of the value of individual variables and macros / defines can be\n# controlled using \\showinitializer or \\hideinitializer command in the\n# documentation regardless of this setting.\n# Minimum value: 0, maximum value: 10000, default value: 30.\n\nMAX_INITIALIZER_LINES  = 30\n\n# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at\n# the bottom of the documentation of classes and structs. If set to YES, the\n# list will mention the files that were used to generate the documentation.\n# The default value is: YES.\n\nSHOW_USED_FILES        = YES\n\n# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This\n# will remove the Files entry from the Quick Index and from the Folder Tree View\n# (if specified).\n# The default value is: YES.\n\nSHOW_FILES             = YES\n\n# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces\n# page. This will remove the Namespaces entry from the Quick Index and from the\n# Folder Tree View (if specified).\n# The default value is: YES.\n\nSHOW_NAMESPACES        = YES\n\n# The FILE_VERSION_FILTER tag can be used to specify a program or script that\n# doxygen should invoke to get the current version for each file (typically from\n# the version control system). Doxygen will invoke the program by executing (via\n# popen()) the command command input-file, where command is the value of the\n# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided\n# by doxygen. Whatever the program writes to standard output is used as the file\n# version. For an example see the documentation.\n\nFILE_VERSION_FILTER    =\n\n# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\n# by doxygen. The layout file controls the global structure of the generated\n# output files in an output format independent way. To create the layout file\n# that represents doxygen's defaults, run doxygen with the -l option. You can\n# optionally specify a file name after the option, if omitted DoxygenLayout.xml\n# will be used as the name of the layout file.\n#\n# Note that if you run doxygen from a directory containing a file called\n# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE\n# tag is left empty.\n\nLAYOUT_FILE            =\n\n# The CITE_BIB_FILES tag can be used to specify one or more bib files containing\n# the reference definitions. This must be a list of .bib files. The .bib\n# extension is automatically appended if omitted. This requires the bibtex tool\n# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.\n# For LaTeX the style of the bibliography can be controlled using\n# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the\n# search path. See also \\cite for info how to create references.\n\nCITE_BIB_FILES         =\n\n#---------------------------------------------------------------------------\n# Configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\n\n# The QUIET tag can be used to turn on/off the messages that are generated to\n# standard output by doxygen. If QUIET is set to YES this implies that the\n# messages are off.\n# The default value is: NO.\n\nQUIET                  = NO\n\n# The WARNINGS tag can be used to turn on/off the warning messages that are\n# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES\n# this implies that the warnings are on.\n#\n# Tip: Turn warnings on while writing the documentation.\n# The default value is: YES.\n\nWARNINGS               = YES\n\n# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate\n# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag\n# will automatically be disabled.\n# The default value is: YES.\n\nWARN_IF_UNDOCUMENTED   = YES\n\n# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for\n# potential errors in the documentation, such as not documenting some parameters\n# in a documented function, or documenting parameters that don't exist or using\n# markup commands wrongly.\n# The default value is: YES.\n\nWARN_IF_DOC_ERROR      = YES\n\n# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that\n# are documented, but have no documentation for their parameters or return\n# value. If set to NO, doxygen will only warn about wrong or incomplete\n# parameter documentation, but not about the absence of documentation.\n# The default value is: NO.\n\nWARN_NO_PARAMDOC       = YES\n\n# The WARN_FORMAT tag determines the format of the warning messages that doxygen\n# can produce. The string should contain the $file, $line, and $text tags, which\n# will be replaced by the file and line number from which the warning originated\n# and the warning text. Optionally the format may contain $version, which will\n# be replaced by the version of the file (if it could be obtained via\n# FILE_VERSION_FILTER)\n# The default value is: $file:$line: $text.\n\nWARN_FORMAT            = \"$file:$line: $text\"\n\n# The WARN_LOGFILE tag can be used to specify a file to which warning and error\n# messages should be written. If left blank the output is written to standard\n# error (stderr).\n\nWARN_LOGFILE           =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the input files\n#---------------------------------------------------------------------------\n\n# The INPUT tag is used to specify the files and/or directories that contain\n# documented source files. You may enter file names like myfile.cpp or\n# directories like /usr/src/myproject. Separate the files or directories with\n# spaces.\n# Note: If this tag is empty the current directory is searched.\n\nINPUT                  = jerry-core jerry-ext jerry-port\n\n# This tag can be used to specify the character encoding of the source files\n# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses\n# libiconv (or the iconv built into libc) for the transcoding. See the libiconv\n# documentation (see: http://www.gnu.org/software/libiconv) for the list of\n# possible encodings.\n# The default value is: UTF-8.\n\nINPUT_ENCODING         = UTF-8\n\n# If the value of the INPUT tag contains directories, you can use the\n# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and\n# *.h) to filter out the source-files in the directories. If left blank the\n# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,\n# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,\n# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,\n# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,\n# *.qsf, *.as and *.js.\n\nFILE_PATTERNS          = *.h *.c\n\n# The RECURSIVE tag can be used to specify whether or not subdirectories should\n# be searched for input files as well.\n# The default value is: NO.\n\nRECURSIVE              = YES\n\n# The EXCLUDE tag can be used to specify files and/or directories that should be\n# excluded from the INPUT source files. This way you can easily exclude a\n# subdirectory from a directory tree whose root is specified with the INPUT tag.\n#\n# Note that relative paths are relative to the directory from which doxygen is\n# run.\n\n# FIXME: None of these files are excluded light-heartedly. They should be\n# removed one-by-one and warnings reported by doxygen should be fixed by those\n# who are familiar with the undocumented parts.\nEXCLUDE                = \\\n        jerry-core/ecma/base/ecma-globals.h \\\n        jerry-core/ecma/operations/ecma-exceptions.h \\\n        jerry-core/include/jerryscript-debugger-transport.h \\\n        jerry-core/jcontext/jcontext.h \\\n        jerry-core/parser/js/byte-code.h \\\n        jerry-core/parser/js/common.h \\\n        jerry-core/parser/js/js-lexer.h \\\n        jerry-core/parser/js/js-parser-internal.h \\\n        jerry-core/parser/regexp/re-parser.h \\\n        jerry-core/vm/vm-stack.h\n\n# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n# directories that are symbolic links (a Unix file system feature) are excluded\n# from the input.\n# The default value is: NO.\n\nEXCLUDE_SYMLINKS       = NO\n\n# If the value of the INPUT tag contains directories, you can use the\n# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude\n# certain files from those directories.\n#\n# Note that the wildcards are matched against the file with absolute path, so to\n# exclude all test directories for example use the pattern */test/*\n\nEXCLUDE_PATTERNS       = *.inc.h\n\n# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n# (namespaces, classes, functions, etc.) that should be excluded from the\n# output. The symbol name can be a fully qualified name, a word, or if the\n# wildcard * is used, a substring. Examples: ANamespace, AClass,\n# AClass::ANamespace, ANamespace::*Test\n#\n# Note that the wildcards are matched against the file with absolute path, so to\n# exclude all test directories use the pattern */test/*\n\nEXCLUDE_SYMBOLS        =\n\n# The EXAMPLE_PATH tag can be used to specify one or more files or directories\n# that contain example code fragments that are included (see the \\include\n# command).\n\nEXAMPLE_PATH           =\n\n# If the value of the EXAMPLE_PATH tag contains directories, you can use the\n# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and\n# *.h) to filter out the source-files in the directories. If left blank all\n# files are included.\n\nEXAMPLE_PATTERNS       =\n\n# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be\n# searched for input files to be used with the \\include or \\dontinclude commands\n# irrespective of the value of the RECURSIVE tag.\n# The default value is: NO.\n\nEXAMPLE_RECURSIVE      = NO\n\n# The IMAGE_PATH tag can be used to specify one or more files or directories\n# that contain images that are to be included in the documentation (see the\n# \\image command).\n\nIMAGE_PATH             =\n\n# The INPUT_FILTER tag can be used to specify a program that doxygen should\n# invoke to filter for each input file. Doxygen will invoke the filter program\n# by executing (via popen()) the command:\n#\n# <filter> <input-file>\n#\n# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the\n# name of an input file. Doxygen will then use the output that the filter\n# program writes to standard output. If FILTER_PATTERNS is specified, this tag\n# will be ignored.\n#\n# Note that the filter must not add or remove lines; it is applied before the\n# code is scanned, but not when the output code is generated. If lines are added\n# or removed, the anchors will not be placed correctly.\n\nINPUT_FILTER           =\n\n# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern\n# basis. Doxygen will compare the file name with each pattern and apply the\n# filter if there is a match. The filters are a list of the form: pattern=filter\n# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how\n# filters are used. If the FILTER_PATTERNS tag is empty or if none of the\n# patterns match the file name, INPUT_FILTER is applied.\n\nFILTER_PATTERNS        =\n\n# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using\n# INPUT_FILTER) will also be used to filter the input files that are used for\n# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).\n# The default value is: NO.\n\nFILTER_SOURCE_FILES    = NO\n\n# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\n# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and\n# it is also possible to disable source filtering for a specific pattern using\n# *.ext= (so without naming a filter).\n# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.\n\nFILTER_SOURCE_PATTERNS =\n\n# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that\n# is part of the input, its contents will be placed on the main page\n# (index.html). This can be useful if you have a project on for instance GitHub\n# and want to reuse the introduction page also for the doxygen output.\n\nUSE_MDFILE_AS_MAINPAGE =\n\n#---------------------------------------------------------------------------\n# Configuration options related to source browsing\n#---------------------------------------------------------------------------\n\n# If the SOURCE_BROWSER tag is set to YES then a list of source files will be\n# generated. Documented entities will be cross-referenced with these sources.\n#\n# Note: To get rid of all source code in the generated output, make sure that\n# also VERBATIM_HEADERS is set to NO.\n# The default value is: NO.\n\nSOURCE_BROWSER         = YES\n\n# Setting the INLINE_SOURCES tag to YES will include the body of functions,\n# classes and enums directly into the documentation.\n# The default value is: NO.\n\nINLINE_SOURCES         = NO\n\n# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any\n# special comment blocks from generated source code fragments. Normal C, C++ and\n# Fortran comments will always remain visible.\n# The default value is: YES.\n\nSTRIP_CODE_COMMENTS    = YES\n\n# If the REFERENCED_BY_RELATION tag is set to YES then for each documented\n# function all documented functions referencing it will be listed.\n# The default value is: NO.\n\nREFERENCED_BY_RELATION = NO\n\n# If the REFERENCES_RELATION tag is set to YES then for each documented function\n# all documented entities called/used by that function will be listed.\n# The default value is: NO.\n\nREFERENCES_RELATION    = NO\n\n# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set\n# to YES then the hyperlinks from functions in REFERENCES_RELATION and\n# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will\n# link to the documentation.\n# The default value is: YES.\n\nREFERENCES_LINK_SOURCE = YES\n\n# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the\n# source code will show a tooltip with additional information such as prototype,\n# brief description and links to the definition and documentation. Since this\n# will make the HTML file larger and loading of large files a bit slower, you\n# can opt to disable this feature.\n# The default value is: YES.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nSOURCE_TOOLTIPS        = YES\n\n# If the USE_HTAGS tag is set to YES then the references to source code will\n# point to the HTML generated by the htags(1) tool instead of doxygen built-in\n# source browser. The htags tool is part of GNU's global source tagging system\n# (see http://www.gnu.org/software/global/global.html). You will need version\n# 4.8.6 or higher.\n#\n# To use it do the following:\n# - Install the latest version of global\n# - Enable SOURCE_BROWSER and USE_HTAGS in the config file\n# - Make sure the INPUT points to the root of the source tree\n# - Run doxygen as normal\n#\n# Doxygen will invoke htags (and that will in turn invoke gtags), so these\n# tools must be available from the command line (i.e. in the search path).\n#\n# The result: instead of the source browser generated by doxygen, the links to\n# source code will now point to the output of htags.\n# The default value is: NO.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nUSE_HTAGS              = NO\n\n# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a\n# verbatim copy of the header file for each class for which an include is\n# specified. Set to NO to disable this.\n# See also: Section \\class.\n# The default value is: YES.\n\nVERBATIM_HEADERS       = YES\n\n# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the\n# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the\n# cost of reduced performance. This can be particularly helpful with template\n# rich C++ code for which doxygen's built-in parser lacks the necessary type\n# information.\n# Note: The availability of this option depends on whether or not doxygen was\n# compiled with the --with-libclang option.\n# The default value is: NO.\n\n# CLANG_ASSISTED_PARSING = NO\n\n# If clang assisted parsing is enabled you can provide the compiler with command\n# line options that you would normally use when invoking the compiler. Note that\n# the include paths will already be set by doxygen for the files and directories\n# specified with INPUT and INCLUDE_PATH.\n# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.\n\n# CLANG_OPTIONS          =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\n\n# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all\n# compounds will be generated. Enable this if the project contains a lot of\n# classes, structs, unions or interfaces.\n# The default value is: YES.\n\nALPHABETICAL_INDEX     = YES\n\n# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in\n# which the alphabetical index list will be split.\n# Minimum value: 1, maximum value: 20, default value: 5.\n# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.\n\nCOLS_IN_ALPHA_INDEX    = 5\n\n# In case all classes in a project start with a common prefix, all classes will\n# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag\n# can be used to specify a prefix (or a list of prefixes) that should be ignored\n# while generating the index headers.\n# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.\n\nIGNORE_PREFIX          =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the HTML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output\n# The default value is: YES.\n\nGENERATE_HTML          = YES\n\n# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_OUTPUT            = html\n\n# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each\n# generated HTML page (for example: .htm, .php, .asp).\n# The default value is: .html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FILE_EXTENSION    = .html\n\n# The HTML_HEADER tag can be used to specify a user-defined HTML header file for\n# each generated HTML page. If the tag is left blank doxygen will generate a\n# standard header.\n#\n# To get valid HTML the header file that includes any scripts and style sheets\n# that doxygen needs, which is dependent on the configuration options used (e.g.\n# the setting GENERATE_TREEVIEW). It is highly recommended to start with a\n# default header using\n# doxygen -w html new_header.html new_footer.html new_stylesheet.css\n# YourConfigFile\n# and then modify the file new_header.html. See also section \"Doxygen usage\"\n# for information on how to generate the default header that doxygen normally\n# uses.\n# Note: The header is subject to change so you typically have to regenerate the\n# default header when upgrading to a newer version of doxygen. For a description\n# of the possible markers and block names see the documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_HEADER            =\n\n# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each\n# generated HTML page. If the tag is left blank doxygen will generate a standard\n# footer. See HTML_HEADER for more information on how to generate a default\n# footer and what special commands can be used inside the footer. See also\n# section \"Doxygen usage\" for information on how to generate the default footer\n# that doxygen normally uses.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FOOTER            =\n\n# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style\n# sheet that is used by each HTML page. It can be used to fine-tune the look of\n# the HTML output. If left blank doxygen will generate a default style sheet.\n# See also section \"Doxygen usage\" for information on how to generate the style\n# sheet that doxygen normally uses.\n# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as\n# it is more robust and this tag (HTML_STYLESHEET) will in the future become\n# obsolete.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_STYLESHEET        =\n\n# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# cascading style sheets that are included after the standard style sheets\n# created by doxygen. Using this option one can overrule certain style aspects.\n# This is preferred over using HTML_STYLESHEET since it does not replace the\n# standard style sheet and is therefore more robust against future updates.\n# Doxygen will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list). For an example see the documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_STYLESHEET  =\n\n# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the HTML output directory. Note\n# that these files will be copied to the base HTML output directory. Use the\n# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n# files. In the HTML_STYLESHEET file, use the file name only. Also note that the\n# files will be copied as-is; there are no commands or markers available.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_FILES       =\n\n# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen\n# will adjust the colors in the style sheet and background images according to\n# this color. Hue is specified as an angle on a colorwheel, see\n# http://en.wikipedia.org/wiki/Hue for more information. For instance the value\n# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300\n# purple, and 360 is red again.\n# Minimum value: 0, maximum value: 359, default value: 220.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_HUE    = 220\n\n# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors\n# in the HTML output. For a value of 0 the output will use grayscales only. A\n# value of 255 will produce the most vivid colors.\n# Minimum value: 0, maximum value: 255, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_SAT    = 100\n\n# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the\n# luminance component of the colors in the HTML output. Values below 100\n# gradually make the output lighter, whereas values above 100 make the output\n# darker. The value divided by 100 is the actual gamma applied, so 80 represents\n# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not\n# change the gamma.\n# Minimum value: 40, maximum value: 240, default value: 80.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_GAMMA  = 80\n\n# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\n# page will contain the date and time when the page was generated. Setting this\n# to YES can help to show when doxygen was last run and thus if the\n# documentation is up to date.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_TIMESTAMP         = NO\n\n# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML\n# documentation will contain sections that can be hidden and shown after the\n# page has loaded.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_DYNAMIC_SECTIONS  = YES\n\n# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries\n# shown in the various tree structured indices initially; the user can expand\n# and collapse entries dynamically later on. Doxygen will expand the tree to\n# such a level that at most the specified number of entries are visible (unless\n# a fully collapsed tree already exceeds this amount). So setting the number of\n# entries 1 will produce a full collapsed tree by default. 0 is a special value\n# representing an infinite number of entries and will result in a full expanded\n# tree by default.\n# Minimum value: 0, maximum value: 9999, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_INDEX_NUM_ENTRIES = 100\n\n# If the GENERATE_DOCSET tag is set to YES, additional index files will be\n# generated that can be used as input for Apple's Xcode 3 integrated development\n# environment (see: http://developer.apple.com/tools/xcode/), introduced with\n# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a\n# Makefile in the HTML output directory. Running make will produce the docset in\n# that directory and running make install will install the docset in\n# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at\n# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html\n# for more information.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_DOCSET        = NO\n\n# This tag determines the name of the docset feed. A documentation feed provides\n# an umbrella under which multiple documentation sets from a single provider\n# (such as a company or product suite) can be grouped.\n# The default value is: Doxygen generated docs.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_FEEDNAME        = \"Doxygen generated docs\"\n\n# This tag specifies a string that should uniquely identify the documentation\n# set bundle. This should be a reverse domain-name style string, e.g.\n# com.mycompany.MyDocSet. Doxygen will append .docset to the name.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_BUNDLE_ID       = org.doxygen.Project\n\n# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify\n# the documentation publisher. This should be a reverse domain-name style\n# string, e.g. com.mycompany.MyDocSet.documentation.\n# The default value is: org.doxygen.Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_ID    = org.doxygen.Publisher\n\n# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.\n# The default value is: Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_NAME  = Publisher\n\n# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three\n# additional HTML index files: index.hhp, index.hhc, and index.hhk. The\n# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop\n# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on\n# Windows.\n#\n# The HTML Help Workshop contains a compiler that can convert all HTML output\n# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML\n# files are now used as the Windows 98 help format, and will replace the old\n# Windows help format (.hlp) on all Windows platforms in the future. Compressed\n# HTML files also contain an index, a table of contents, and you can search for\n# words in the documentation. The HTML workshop also contains a viewer for\n# compressed HTML files.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_HTMLHELP      = NO\n\n# The CHM_FILE tag can be used to specify the file name of the resulting .chm\n# file. You can add a path in front of the file if the result should not be\n# written to the html output directory.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_FILE               =\n\n# The HHC_LOCATION tag can be used to specify the location (absolute path\n# including file name) of the HTML help compiler (hhc.exe). If non-empty,\n# doxygen will try to run the HTML help compiler on the generated index.hhp.\n# The file has to be specified with full path.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nHHC_LOCATION           =\n\n# The GENERATE_CHI flag controls if a separate .chi index file is generated\n# (YES) or that it should be included in the master .chm file (NO).\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nGENERATE_CHI           = NO\n\n# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)\n# and project file content.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_INDEX_ENCODING     =\n\n# The BINARY_TOC flag controls whether a binary table of contents is generated\n# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it\n# enables the Previous and Next buttons.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nBINARY_TOC             = NO\n\n# The TOC_EXPAND flag can be set to YES to add extra items for group members to\n# the table of contents of the HTML help documentation and to the tree view.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nTOC_EXPAND             = NO\n\n# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and\n# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that\n# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help\n# (.qch) of the generated HTML documentation.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_QHP           = NO\n\n# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify\n# the file name of the resulting .qch file. The path specified is relative to\n# the HTML output folder.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQCH_FILE               =\n\n# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help\n# Project output. For more information please see Qt Help Project / Namespace\n# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_NAMESPACE          = org.doxygen.Project\n\n# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt\n# Help Project output. For more information please see Qt Help Project / Virtual\n# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-\n# folders).\n# The default value is: doc.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_VIRTUAL_FOLDER     = doc\n\n# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom\n# filter to add. For more information please see Qt Help Project / Custom\n# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-\n# filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_NAME   =\n\n# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the\n# custom filter to add. For more information please see Qt Help Project / Custom\n# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-\n# filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_ATTRS  =\n\n# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this\n# project's filter section matches. Qt Help Project / Filter Attributes (see:\n# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_SECT_FILTER_ATTRS  =\n\n# The QHG_LOCATION tag can be used to specify the location of Qt's\n# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the\n# generated .qhp file.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHG_LOCATION           =\n\n# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be\n# generated, together with the HTML files, they form an Eclipse help plugin. To\n# install this plugin and make it available under the help contents menu in\n# Eclipse, the contents of the directory containing the HTML and XML files needs\n# to be copied into the plugins directory of eclipse. The name of the directory\n# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.\n# After copying Eclipse needs to be restarted before the help appears.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_ECLIPSEHELP   = NO\n\n# A unique identifier for the Eclipse help plugin. When installing the plugin\n# the directory name containing the HTML and XML files should also have this\n# name. Each documentation set should have its own identifier.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.\n\nECLIPSE_DOC_ID         = org.doxygen.Project\n\n# If you want full control over the layout of the generated HTML pages it might\n# be necessary to disable the index and replace it with your own. The\n# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top\n# of each HTML page. A value of NO enables the index and the value YES disables\n# it. Since the tabs in the index contain the same information as the navigation\n# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nDISABLE_INDEX          = YES\n\n# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\n# structure should be generated to display hierarchical information. If the tag\n# value is set to YES, a side panel will be generated containing a tree-like\n# index structure (just like the one that is generated for HTML Help). For this\n# to work a browser that supports JavaScript, DHTML, CSS and frames is required\n# (i.e. any modern browser). Windows users are probably better off using the\n# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can\n# further fine-tune the look of the index. As an example, the default style\n# sheet generated by doxygen has an example that shows how to put an image at\n# the root of the tree instead of the PROJECT_NAME. Since the tree basically has\n# the same information as the tab index, you could consider setting\n# DISABLE_INDEX to YES when enabling this option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_TREEVIEW      = YES\n\n# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that\n# doxygen will group on one line in the generated HTML documentation.\n#\n# Note that a value of 0 will completely suppress the enum values from appearing\n# in the overview section.\n# Minimum value: 0, maximum value: 20, default value: 4.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nENUM_VALUES_PER_LINE   = 4\n\n# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used\n# to set the initial width (in pixels) of the frame in which the tree is shown.\n# Minimum value: 0, maximum value: 1500, default value: 250.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nTREEVIEW_WIDTH         = 250\n\n# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to\n# external symbols imported via tag files in a separate window.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nEXT_LINKS_IN_WINDOW    = NO\n\n# Use this tag to change the font size of LaTeX formulas included as images in\n# the HTML documentation. When you change the font size after a successful\n# doxygen run you need to manually remove any form_*.png images from the HTML\n# output directory to force them to be regenerated.\n# Minimum value: 8, maximum value: 50, default value: 10.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFORMULA_FONTSIZE       = 10\n\n# Use the FORMULA_TRANPARENT tag to determine whether or not the images\n# generated for formulas are transparent PNGs. Transparent PNGs are not\n# supported properly for IE 6.0, but are supported on all modern browsers.\n#\n# Note that when changing this option you need to delete any form_*.png files in\n# the HTML output directory before the changes have effect.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFORMULA_TRANSPARENT    = YES\n\n# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see\n# http://www.mathjax.org) which uses client side Javascript for the rendering\n# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX\n# installed or if you want to formulas look prettier in the HTML output. When\n# enabled you may also need to install MathJax separately and configure the path\n# to it using the MATHJAX_RELPATH option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nUSE_MATHJAX            = NO\n\n# When MathJax is enabled you can set the default output format to be used for\n# the MathJax output. See the MathJax site (see:\n# http://docs.mathjax.org/en/latest/output.html) for more details.\n# Possible values are: HTML-CSS (which is slower, but has the best\n# compatibility), NativeMML (i.e. MathML) and SVG.\n# The default value is: HTML-CSS.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_FORMAT         = HTML-CSS\n\n# When MathJax is enabled you need to specify the location relative to the HTML\n# output directory using the MATHJAX_RELPATH option. The destination directory\n# should contain the MathJax.js script. For instance, if the mathjax directory\n# is located at the same level as the HTML output directory, then\n# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax\n# Content Delivery Network so you can quickly see the result without installing\n# MathJax. However, it is strongly recommended to install a local copy of\n# MathJax from http://www.mathjax.org before deployment.\n# The default value is: http://cdn.mathjax.org/mathjax/latest.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest\n\n# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax\n# extension names that should be enabled during MathJax rendering. For example\n# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_EXTENSIONS     =\n\n# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces\n# of code that will be used on startup of the MathJax code. See the MathJax site\n# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an\n# example see the documentation.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_CODEFILE       =\n\n# When the SEARCHENGINE tag is enabled doxygen will generate a search box for\n# the HTML output. The underlying search engine uses javascript and DHTML and\n# should work on any modern browser. Note that when using HTML help\n# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)\n# there is already a search function so this one should typically be disabled.\n# For large projects the javascript based search engine can be slow, then\n# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to\n# search using the keyboard; to jump to the search box use <access key> + S\n# (what the <access key> is depends on the OS and browser, but it is typically\n# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down\n# key> to jump into the search results window, the results can be navigated\n# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel\n# the search. The filter options can be selected when the cursor is inside the\n# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>\n# to select a filter and <Enter> or <escape> to activate or cancel the filter\n# option.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nSEARCHENGINE           = YES\n\n# When the SERVER_BASED_SEARCH tag is enabled the search engine will be\n# implemented using a web server instead of a web client using Javascript. There\n# are two flavors of web server based searching depending on the EXTERNAL_SEARCH\n# setting. When disabled, doxygen will generate a PHP script for searching and\n# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing\n# and searching needs to be provided by external tools. See the section\n# \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSERVER_BASED_SEARCH    = NO\n\n# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP\n# script for searching. Instead the search results are written to an XML file\n# which needs to be processed by an external indexer. Doxygen will invoke an\n# external search engine pointed to by the SEARCHENGINE_URL option to obtain the\n# search results.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see: http://xapian.org/).\n#\n# See the section \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH        = NO\n\n# The SEARCHENGINE_URL should point to a search engine hosted by a web server\n# which will return the search results when EXTERNAL_SEARCH is enabled.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see: http://xapian.org/). See the section \"External Indexing and\n# Searching\" for details.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHENGINE_URL       =\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed\n# search data is written to a file for indexing by an external tool. With the\n# SEARCHDATA_FILE tag the name of this file can be specified.\n# The default file is: searchdata.xml.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHDATA_FILE        = searchdata.xml\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the\n# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is\n# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple\n# projects and redirect the results back to the right project.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH_ID     =\n\n# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen\n# projects other than the one defined by this configuration file, but that are\n# all added to the same external search index. Each project needs to have a\n# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of\n# to a relative location where the documentation can be found. The format is:\n# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTRA_SEARCH_MAPPINGS  =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.\n# The default value is: YES.\n\nGENERATE_LATEX         = NO\n\n# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: latex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_OUTPUT           = latex\n\n# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\n# invoked.\n#\n# Note that when enabling USE_PDFLATEX this option is only used for generating\n# bitmaps for formulas in the HTML output, but not in the Makefile that is\n# written to the output directory.\n# The default file is: latex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_CMD_NAME         = latex\n\n# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate\n# index for LaTeX.\n# The default file is: makeindex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nMAKEINDEX_CMD_NAME     = makeindex\n\n# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nCOMPACT_LATEX          = NO\n\n# The PAPER_TYPE tag can be used to set the paper type that is used by the\n# printer.\n# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x\n# 14 inches) and executive (7.25 x 10.5 inches).\n# The default value is: a4.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPAPER_TYPE             = a4\n\n# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names\n# that should be included in the LaTeX output. To get the times font for\n# instance you can specify\n# EXTRA_PACKAGES=times\n# If left blank no extra packages will be included.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nEXTRA_PACKAGES         =\n\n# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the\n# generated LaTeX document. The header should contain everything until the first\n# chapter. If it is left blank doxygen will generate a standard header. See\n# section \"Doxygen usage\" for information on how to let doxygen write the\n# default header to a separate file.\n#\n# Note: Only use a user-defined header if you know what you are doing! The\n# following commands have a special meaning inside the header: $title,\n# $datetime, $date, $doxygenversion, $projectname, $projectnumber,\n# $projectbrief, $projectlogo. Doxygen will replace $title with the empty\n# string, for the replacement values of the other commands the user is referred\n# to HTML_HEADER.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HEADER           =\n\n# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the\n# generated LaTeX document. The footer should contain everything after the last\n# chapter. If it is left blank doxygen will generate a standard footer. See\n# LATEX_HEADER for more information on how to generate a default footer and what\n# special commands can be used inside the footer.\n#\n# Note: Only use a user-defined footer if you know what you are doing!\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_FOOTER           =\n\n# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# LaTeX style sheets that are included after the standard style sheets created\n# by doxygen. Using this option one can overrule certain style aspects. Doxygen\n# will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list).\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\n# LATEX_EXTRA_STYLESHEET =\n\n# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the LATEX_OUTPUT output\n# directory. Note that the files will be copied as-is; there are no commands or\n# markers available.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EXTRA_FILES      =\n\n# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is\n# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will\n# contain links (just like the HTML output) instead of page references. This\n# makes the output suitable for online browsing using a PDF viewer.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPDF_HYPERLINKS         = YES\n\n# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate\n# the PDF file directly from the LaTeX files. Set this option to YES, to get a\n# higher quality PDF documentation.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nUSE_PDFLATEX           = YES\n\n# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode\n# command to the generated LaTeX files. This will instruct LaTeX to keep running\n# if errors occur, instead of asking the user for help. This option is also used\n# when generating formulas in HTML.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BATCHMODE        = NO\n\n# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the\n# index chapters (such as File Index, Compound Index, etc.) in the output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HIDE_INDICES     = NO\n\n# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source\n# code with syntax highlighting in the LaTeX output.\n#\n# Note that which sources are shown also depends on other settings such as\n# SOURCE_BROWSER.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_SOURCE_CODE      = NO\n\n# The LATEX_BIB_STYLE tag can be used to specify the style to use for the\n# bibliography, e.g. plainnat, or ieeetr. See\n# http://en.wikipedia.org/wiki/BibTeX and \\cite for more info.\n# The default value is: plain.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BIB_STYLE        = plain\n\n#---------------------------------------------------------------------------\n# Configuration options related to the RTF output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The\n# RTF output is optimized for Word 97 and may not look too pretty with other RTF\n# readers/editors.\n# The default value is: NO.\n\nGENERATE_RTF           = NO\n\n# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: rtf.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_OUTPUT             = rtf\n\n# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nCOMPACT_RTF            = NO\n\n# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will\n# contain hyperlink fields. The RTF file will contain links (just like the HTML\n# output) instead of page references. This makes the output suitable for online\n# browsing using Word or some other Word compatible readers that support those\n# fields.\n#\n# Note: WordPad (write) and others do not support links.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_HYPERLINKS         = NO\n\n# Load stylesheet definitions from file. Syntax is similar to doxygen's config\n# file, i.e. a series of assignments. You only have to provide replacements,\n# missing definitions are set to their default value.\n#\n# See also section \"Doxygen usage\" for information on how to generate the\n# default style sheet that doxygen normally uses.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_STYLESHEET_FILE    =\n\n# Set optional variables used in the generation of an RTF document. Syntax is\n# similar to doxygen's config file. A template extensions file can be generated\n# using doxygen -e rtf extensionFile.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_EXTENSIONS_FILE    =\n\n# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code\n# with syntax highlighting in the RTF output.\n#\n# Note that which sources are shown also depends on other settings such as\n# SOURCE_BROWSER.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\n# RTF_SOURCE_CODE        = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the man page output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for\n# classes and files.\n# The default value is: NO.\n\nGENERATE_MAN           = NO\n\n# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it. A directory man3 will be created inside the directory specified by\n# MAN_OUTPUT.\n# The default directory is: man.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_OUTPUT             = man\n\n# The MAN_EXTENSION tag determines the extension that is added to the generated\n# man pages. In case the manual section does not start with a number, the number\n# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is\n# optional.\n# The default value is: .3.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_EXTENSION          = .3\n\n# The MAN_SUBDIR tag determines the name of the directory created within\n# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by\n# MAN_EXTENSION with the initial . removed.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\n# MAN_SUBDIR             =\n\n# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it\n# will generate one additional man file for each entity documented in the real\n# man page(s). These additional files only source the real man page, but without\n# them the man command would be unable to find the correct page.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_LINKS              = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the XML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that\n# captures the structure of the code including all documentation.\n# The default value is: NO.\n\nGENERATE_XML           = NO\n\n# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: xml.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_OUTPUT             = xml\n\n# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program\n# listings (including syntax highlighting and cross-referencing information) to\n# the XML output. Note that enabling this will significantly increase the size\n# of the XML output.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_PROGRAMLISTING     = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to the DOCBOOK output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files\n# that can be used to generate PDF.\n# The default value is: NO.\n\nGENERATE_DOCBOOK       = NO\n\n# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in\n# front of it.\n# The default directory is: docbook.\n# This tag requires that the tag GENERATE_DOCBOOK is set to YES.\n\nDOCBOOK_OUTPUT         = docbook\n\n# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the\n# program listings (including syntax highlighting and cross-referencing\n# information) to the DOCBOOK output. Note that enabling this will significantly\n# increase the size of the DOCBOOK output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_DOCBOOK is set to YES.\n\n# DOCBOOK_PROGRAMLISTING = NO\n\n#---------------------------------------------------------------------------\n# Configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an\n# AutoGen Definitions (see http://autogen.sf.net) file that captures the\n# structure of the code including all documentation. Note that this feature is\n# still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_AUTOGEN_DEF   = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the Perl module output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module\n# file that captures the structure of the code including all documentation.\n#\n# Note that this feature is still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_PERLMOD       = NO\n\n# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary\n# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI\n# output from the Perl module output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_LATEX          = NO\n\n# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely\n# formatted so it can be parsed by a human reader. This is useful if you want to\n# understand what is going on. On the other hand, if this tag is set to NO, the\n# size of the Perl module output will be much smaller and Perl will parse it\n# just the same.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_PRETTY         = YES\n\n# The names of the make variables in the generated doxyrules.make file are\n# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful\n# so different doxyrules.make files included by the same Makefile don't\n# overwrite each other's variables.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_MAKEVAR_PREFIX =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor\n#---------------------------------------------------------------------------\n\n# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all\n# C-preprocessor directives found in the sources and include files.\n# The default value is: YES.\n\nENABLE_PREPROCESSING   = YES\n\n# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names\n# in the source code. If set to NO, only conditional compilation will be\n# performed. Macro expansion can be done in a controlled way by setting\n# EXPAND_ONLY_PREDEF to YES.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nMACRO_EXPANSION        = YES\n\n# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then\n# the macro expansion is limited to the macros specified with the PREDEFINED and\n# EXPAND_AS_DEFINED tags.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_ONLY_PREDEF     = YES\n\n# If the SEARCH_INCLUDES tag is set to YES, the include files in the\n# INCLUDE_PATH will be searched if a #include is found.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSEARCH_INCLUDES        = YES\n\n# The INCLUDE_PATH tag can be used to specify one or more directories that\n# contain include files that are not input files but should be processed by the\n# preprocessor.\n# This tag requires that the tag SEARCH_INCLUDES is set to YES.\n\nINCLUDE_PATH           =\n\n# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard\n# patterns (like *.h and *.hpp) to filter out the header-files in the\n# directories. If left blank, the patterns specified with FILE_PATTERNS will be\n# used.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nINCLUDE_FILE_PATTERNS  =\n\n# The PREDEFINED tag can be used to specify one or more macro names that are\n# defined before the preprocessor is started (similar to the -D option of e.g.\n# gcc). The argument of the tag is a list of macros of the form: name or\n# name=definition (no spaces). If the definition and the \"=\" are omitted, \"=1\"\n# is assumed. To prevent a macro definition from being undefined via #undef or\n# recursively expanded use the := operator instead of the = operator.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nPREDEFINED             = JERRY_STATIC_ASSERT(x,y)= JERRY_ATTR_FORMAT(x,y,z)=\n\n# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this\n# tag can be used to specify a list of macro names that should be expanded. The\n# macro definition that is found in the sources will be used. Use the PREDEFINED\n# tag if you want to use a different macro definition that overrules the\n# definition found in the source code.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_AS_DEFINED      =\n\n# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will\n# remove all references to function-like macros that are alone on a line, have\n# an all uppercase name, and do not end with a semicolon. Such function macros\n# are typically used for boiler-plate code, and will confuse the parser if not\n# removed.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSKIP_FUNCTION_MACROS   = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to external references\n#---------------------------------------------------------------------------\n\n# The TAGFILES tag can be used to specify one or more tag files. For each tag\n# file the location of the external documentation should be added. The format of\n# a tag file without this location is as follows:\n# TAGFILES = file1 file2 ...\n# Adding location for the tag files is done as follows:\n# TAGFILES = file1=loc1 \"file2 = loc2\" ...\n# where loc1 and loc2 can be relative or absolute paths or URLs. See the\n# section \"Linking to external documentation\" for more information about the use\n# of tag files.\n# Note: Each tag file must have a unique name (where the name does NOT include\n# the path). If a tag file is not located in the directory in which doxygen is\n# run, you must also specify the path to the tagfile here.\n\nTAGFILES               =\n\n# When a file name is specified after GENERATE_TAGFILE, doxygen will create a\n# tag file that is based on the input files it reads. See section \"Linking to\n# external documentation\" for more information about the usage of tag files.\n\nGENERATE_TAGFILE       =\n\n# If the ALLEXTERNALS tag is set to YES, all external class will be listed in\n# the class index. If set to NO, only the inherited external classes will be\n# listed.\n# The default value is: NO.\n\nALLEXTERNALS           = NO\n\n# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed\n# in the modules index. If set to NO, only the current project's groups will be\n# listed.\n# The default value is: YES.\n\nEXTERNAL_GROUPS        = YES\n\n# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in\n# the related pages index. If set to NO, only the current project's pages will\n# be listed.\n# The default value is: YES.\n\nEXTERNAL_PAGES         = YES\n\n# The PERL_PATH should be the absolute path and name of the perl script\n# interpreter (i.e. the result of 'which perl').\n# The default file (with absolute path) is: /usr/bin/perl.\n\nPERL_PATH              = /usr/bin/perl\n\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool\n#---------------------------------------------------------------------------\n\n# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram\n# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to\n# NO turns the diagrams off. Note that this option also works with HAVE_DOT\n# disabled, but it is recommended to install and use dot, since it yields more\n# powerful graphs.\n# The default value is: YES.\n\nCLASS_DIAGRAMS         = YES\n\n# You can define message sequence charts within doxygen comments using the \\msc\n# command. Doxygen will then run the mscgen tool (see:\n# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the\n# documentation. The MSCGEN_PATH tag allows you to specify the directory where\n# the mscgen tool resides. If left empty the tool is assumed to be found in the\n# default search path.\n\nMSCGEN_PATH            =\n\n# You can include diagrams made with dia in doxygen documentation. Doxygen will\n# then run dia to produce the diagram and insert it in the documentation. The\n# DIA_PATH tag allows you to specify the directory where the dia binary resides.\n# If left empty dia is assumed to be found in the default search path.\n\nDIA_PATH               =\n\n# If set to YES the inheritance and collaboration graphs will hide inheritance\n# and usage relations if the target is undocumented or is not a class.\n# The default value is: YES.\n\nHIDE_UNDOC_RELATIONS   = YES\n\n# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is\n# available from the path. This tool is part of Graphviz (see:\n# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent\n# Bell Labs. The other options in this section have no effect if this option is\n# set to NO\n# The default value is: YES.\n\nHAVE_DOT               = NO\n\n# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed\n# to run in parallel. When set to 0 doxygen will base this on the number of\n# processors available in the system. You can set it explicitly to a value\n# larger than 0 to get control over the balance between CPU load and processing\n# speed.\n# Minimum value: 0, maximum value: 32, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_NUM_THREADS        = 0\n\n# When you want a differently looking font in the dot files that doxygen\n# generates you can specify the font name using DOT_FONTNAME. You need to make\n# sure dot is able to find the font, which can be done by putting it in a\n# standard location or by setting the DOTFONTPATH environment variable or by\n# setting DOT_FONTPATH to the directory containing the font.\n# The default value is: Helvetica.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTNAME           = Helvetica\n\n# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of\n# dot graphs.\n# Minimum value: 4, maximum value: 24, default value: 10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTSIZE           = 10\n\n# By default doxygen will tell dot to use the default font as specified with\n# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set\n# the path where dot can find it using this tag.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTPATH           =\n\n# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for\n# each documented class showing the direct and indirect inheritance relations.\n# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCLASS_GRAPH            = YES\n\n# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a\n# graph for each documented class showing the direct and indirect implementation\n# dependencies (inheritance, containment, and class references variables) of the\n# class with other documented classes.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCOLLABORATION_GRAPH    = YES\n\n# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for\n# groups, showing the direct groups dependencies.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGROUP_GRAPHS           = YES\n\n# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and\n# collaboration diagrams in a style similar to the OMG's Unified Modeling\n# Language.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nUML_LOOK               = NO\n\n# If the UML_LOOK tag is enabled, the fields and methods are shown inside the\n# class node. If there are many fields or methods and many nodes the graph may\n# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the\n# number of items for each type to make the size more manageable. Set this to 0\n# for no limit. Note that the threshold may be exceeded by 50% before the limit\n# is enforced. So when you set the threshold to 10, up to 15 fields may appear,\n# but if the number exceeds 15, the total amount of fields shown is limited to\n# 10.\n# Minimum value: 0, maximum value: 100, default value: 10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nUML_LIMIT_NUM_FIELDS   = 10\n\n# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and\n# collaboration graphs will show the relations between templates and their\n# instances.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nTEMPLATE_RELATIONS     = NO\n\n# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to\n# YES then doxygen will generate a graph for each documented file showing the\n# direct and indirect include dependencies of the file with other documented\n# files.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDE_GRAPH          = YES\n\n# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are\n# set to YES then doxygen will generate a graph for each documented file showing\n# the direct and indirect include dependencies of the file with other documented\n# files.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDED_BY_GRAPH      = YES\n\n# If the CALL_GRAPH tag is set to YES then doxygen will generate a call\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable call graphs for selected\n# functions only using the \\callgraph command.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALL_GRAPH             = NO\n\n# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable caller graphs for selected\n# functions only using the \\callergraph command.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALLER_GRAPH           = NO\n\n# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical\n# hierarchy of all classes instead of a textual one.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGRAPHICAL_HIERARCHY    = YES\n\n# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the\n# dependencies a directory has on other directories in a graphical way. The\n# dependency relations are determined by the #include relations between the\n# files in the directories.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDIRECTORY_GRAPH        = YES\n\n# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n# generated by dot.\n# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order\n# to make the SVG files visible in IE 9+ (other browsers do not have this\n# requirement).\n# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,\n# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,\n# gif:cairo:gd, gif:gd, gif:gd:gd and svg.\n# The default value is: png.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_IMAGE_FORMAT       = png\n\n# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to\n# enable generation of interactive SVG images that allow zooming and panning.\n#\n# Note that this requires a modern browser other than Internet Explorer. Tested\n# and working are Firefox, Chrome, Safari, and Opera.\n# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make\n# the SVG files visible. Older versions of IE do not have SVG support.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINTERACTIVE_SVG        = NO\n\n# The DOT_PATH tag can be used to specify the path where the dot tool can be\n# found. If left blank, it is assumed the dot tool can be found in the path.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_PATH               =\n\n# The DOTFILE_DIRS tag can be used to specify one or more directories that\n# contain dot files that are included in the documentation (see the \\dotfile\n# command).\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOTFILE_DIRS           =\n\n# The MSCFILE_DIRS tag can be used to specify one or more directories that\n# contain msc files that are included in the documentation (see the \\mscfile\n# command).\n\nMSCFILE_DIRS           =\n\n# The DIAFILE_DIRS tag can be used to specify one or more directories that\n# contain dia files that are included in the documentation (see the \\diafile\n# command).\n\nDIAFILE_DIRS           =\n\n# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the\n# path where java can find the plantuml.jar file. If left blank, it is assumed\n# PlantUML is not used or called during a preprocessing step. Doxygen will\n# generate a warning when it encounters a \\startuml command in this case and\n# will not generate output for the diagram.\n\n# PLANTUML_JAR_PATH      =\n\n# When using plantuml, the specified paths are searched for files specified by\n# the !include statement in a plantuml block.\n\n# PLANTUML_INCLUDE_PATH  =\n\n# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes\n# that will be shown in the graph. If the number of nodes in a graph becomes\n# larger than this value, doxygen will truncate the graph, which is visualized\n# by representing a node as a red box. Note that doxygen if the number of direct\n# children of the root node in a graph is already larger than\n# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that\n# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\n# Minimum value: 0, maximum value: 10000, default value: 50.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_GRAPH_MAX_NODES    = 50\n\n# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs\n# generated by dot. A depth value of 3 means that only nodes reachable from the\n# root by following a path via at most 3 edges will be shown. Nodes that lay\n# further from the root node will be omitted. Note that setting this option to 1\n# or 2 may greatly reduce the computation time needed for large code bases. Also\n# note that the size of a graph can be further restricted by\n# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\n# Minimum value: 0, maximum value: 1000, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nMAX_DOT_GRAPH_DEPTH    = 0\n\n# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent\n# background. This is disabled by default, because dot on Windows does not seem\n# to support this out of the box.\n#\n# Warning: Depending on the platform used, enabling this option may lead to\n# badly anti-aliased labels on the edges of a graph (i.e. they become hard to\n# read).\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_TRANSPARENT        = NO\n\n# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output\n# files in one run (i.e. multiple -o and -T options on the command line). This\n# makes dot run faster, but since only newer versions of dot (>1.8.10) support\n# this, this feature is disabled by default.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_MULTI_TARGETS      = NO\n\n# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page\n# explaining the meaning of the various boxes and arrows in the dot generated\n# graphs.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGENERATE_LEGEND        = YES\n\n# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot\n# files that are used to generate the various graphs.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_CLEANUP            = YES\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/LICENSE",
    "content": "Copyright JS Foundation and other contributors, http://js.foundation\n\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright JS Foundation and other contributors, http://js.foundation\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/README.md",
    "content": "![](https://github.com/jerryscript-project/jerryscript/blob/master/LOGO.png)\n# JerryScript: JavaScript engine for the Internet of Things\n[![License](https://img.shields.io/badge/licence-Apache%202.0-brightgreen.svg?style=flat)](LICENSE)\n[![GitHub Actions Status](https://github.com/jerryscript-project/jerryscript/workflows/JerryScript%20CI/badge.svg)](https://github.com/jerryscript-project/jerryscript/actions)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/ct8reap35u2vooa5/branch/master?svg=true)](https://ci.appveyor.com/project/jerryscript-project/jerryscript/branch/master)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fjerryscript-project%2Fjerryscript.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fjerryscript-project%2Fjerryscript?ref=badge_shield)\n[![IRC Channel](https://img.shields.io/badge/chat-on%20freenode-brightgreen.svg)](https://kiwiirc.com/client/irc.freenode.net/#jerryscript)\n\nJerryScript is a lightweight JavaScript engine for resource-constrained devices such as microcontrollers. It can run on devices with less than 64 KB of RAM and less than 200 KB of flash memory.\n\nKey characteristics of JerryScript:\n* Full ECMAScript 5.1 standard compliance\n* 160K binary size when compiled for ARM Thumb-2\n* Heavily optimized for low memory consumption\n* Written in C99 for maximum portability\n* Snapshot support for precompiling JavaScript source code to byte code\n* Mature C API, easy to embed in applications\n\nAdditional information can be found on our [project page](http://jerryscript.net) and [Wiki](https://github.com/jerryscript-project/jerryscript/wiki).\n\nMemory usage and Binary footprint are measured at [here](https://jerryscript-project.github.io/jerryscript-test-results) with real target daily.\n\nThe latest results on  **Raspberry Pi 2**:\n\n\n[![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fjerryscript%2Frpi2.svg?alt=media&token=1)](https://jerryscript-project.github.io/jerryscript-test-results/?view=rpi2)\n\nIRC channel: #jerryscript on [freenode](https://freenode.net)\nMailing list: jerryscript-dev@groups.io, you can subscribe [here](https://groups.io/g/jerryscript-dev) and access the mailing list archive [here](https://groups.io/g/jerryscript-dev/topics).\n\n## Quick Start\n### Getting the sources\n```bash\ngit clone https://github.com/jerryscript-project/jerryscript.git\ncd jerryscript\n```\n\n### Building JerryScript\n```bash\npython tools/build.py\n```\n\nFor additional information see [Getting Started](docs/00.GETTING-STARTED.md).\n\n## Documentation\n- [Getting Started](docs/00.GETTING-STARTED.md)\n- [Configuration](docs/01.CONFIGURATION.md)\n- [API Reference](docs/02.API-REFERENCE.md)\n- [API Example](docs/03.API-EXAMPLE.md)\n- [Internals](docs/04.INTERNALS.md)\n- [Migration Guide](docs/16.MIGRATION-GUIDE.md)\n\n## Contributing\nThe project can only accept contributions which are licensed under the [Apache License 2.0](LICENSE) and are signed according to the JerryScript [Developer's Certificate of Origin](DCO.md). For further information please see our [Contribution Guidelines](CONTRIBUTING.md).\n\n## License\nJerryScript is open source software under the [Apache License 2.0](LICENSE). Complete license and copyright information can be found in the source code.\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fjerryscript-project%2Fjerryscript.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fjerryscript-project%2Fjerryscript?ref=badge_large)\n\n> Copyright JS Foundation and other contributors, http://js.foundation\n\n> Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/appveyor.yml",
    "content": "version: \"{build}\"\nbranches:\n  except:\n  - coverity_scan\n  - gh_pages\nskip_tags: true\n\n# Build matrix setup.\nimage:\n  - Visual Studio 2017\nconfiguration:\n  - Debug\n  - Release\nplatform:\n  - x64\n  - Win32\n\n# Steps of a job.\ninit:\n  - cmake -version\nbefore_build:\n  - if \"%PLATFORM%\"==\"Win32\" cmake -G\"Visual Studio 15 2017\" -Bbuild -H. -DJERRY_DEBUGGER=ON\n  - if \"%PLATFORM%\"==\"x64\" cmake -G\"Visual Studio 15 2017 Win64\" -Bbuild -H. -DJERRY_DEBUGGER=ON\nbuild:\n  project: build\\Jerry.sln\n  parallel: false # FIXME: This should not be needed but right now it is: msbuild generates all amalgamated files twice, at the same time in parallel builds, leading to I/O errors.\n  verbosity: minimal\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain-esp32.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SYSTEM_NAME esp-idf)\nset(CMAKE_SYSTEM_PROCESSOR xtensa)\n\nset(CMAKE_C_COMPILER xtensa-esp32-elf-gcc)\nset(CMAKE_CXX_COMPILER xtensa-esp32-elf-g++)\nset(CMAKE_ASM_COMPILER xtensa-esp32-elf-gcc)\n\n# uncomment that if you want 4-bytes float (much faster on esp32)\n#add_definitions(-DJERRY_NUMBER_TYPE_FLOAT64=0)\n\nset(CMAKE_C_FLAGS \"-mlongcalls -Wno-frame-address\" CACHE STRING \"C Compiler Base Flags\")\nset(CMAKE_CXX_FLAGS \"-mlongcalls -Wno-frame-address\" CACHE STRING \"C++ Compiler Base Flags\")\n\n# Can be removed after gcc 5.2.0 support is removed (ref GCC_NOT_5_2_0)\nset(CMAKE_EXE_LINKER_FLAGS \"-nostdlib\" CACHE STRING \"Linker Base Flags\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_linux_aarch64.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SYSTEM_NAME Linux)\nset(CMAKE_SYSTEM_PROCESSOR aarch64)\n\nset(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_linux_armv7l-el.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SYSTEM_NAME Linux)\nset(CMAKE_SYSTEM_PROCESSOR armv7l-el)\n\nset(CMAKE_C_COMPILER arm-linux-gnueabi-gcc)\n\nset(FLAGS_COMMON_ARCH -mlittle-endian -mthumb)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_linux_armv7l.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SYSTEM_NAME Linux)\nset(CMAKE_SYSTEM_PROCESSOR armv7l)\n\nset(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)\n#\n# Limit fpu to VFPv3 with d0-d15 registers\n#\n# If this is changed, setjmp / longjmp for ARMv7 should be updated accordingly\n#\nset(FLAGS_COMMON_ARCH -mthumb -mfpu=vfp -march=armv7)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_linux_i686.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(FLAGS_COMMON_ARCH -mfpmath=sse -msse2)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_mcu_stm32f3.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SYSTEM_NAME MCU)\nset(CMAKE_SYSTEM_PROCESSOR armv7l)\nset(CMAKE_SYSTEM_VERSION STM32F3)\n\nset(FLAGS_COMMON_ARCH -mlittle-endian -mthumb -mcpu=cortex-m4 -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard)\n\nset(CMAKE_C_COMPILER arm-none-eabi-gcc)\nset(CMAKE_C_COMPILER_WORKS TRUE)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_mcu_stm32f4.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SYSTEM_NAME MCU)\nset(CMAKE_SYSTEM_PROCESSOR armv7l)\nset(CMAKE_SYSTEM_VERSION STM32F4)\n\nset(FLAGS_COMMON_ARCH -mlittle-endian -mthumb -mcpu=cortex-m4 -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard)\n\nset(CMAKE_C_COMPILER arm-none-eabi-gcc)\nset(CMAKE_C_COMPILER_WORKS TRUE)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_mcu_stm32f7.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SYSTEM_NAME MCU)\nset(CMAKE_SYSTEM_PROCESSOR armv7l)\nset(CMAKE_SYSTEM_VERSION STM32F7)\n\nset(FLAGS_COMMON_ARCH -mthumb -mcpu=cortex-m7 -march=armv7e-m -mfloat-abi=hard)\n\nset(CMAKE_C_COMPILER arm-none-eabi-gcc)\nset(CMAKE_C_COMPILER_WORKS TRUE)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_mcu_tim4f.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation \n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ninclude(CMakeForceCompiler)\n\nset(CMAKE_SYSTEM_NAME MCU)\nset(CMAKE_SYSTEM_PROCESSOR armv7l)\nset(CMAKE_SYSTEM_VERSION TIM4F)\n\nset(FLAGS_COMMON_ARCH --little_endian --silicon_version=7M4 --float_support=FPv4SPD16)\n\nCMAKE_FORCE_C_COMPILER(armcl TI)\n\nSET (CMAKE_C_FLAGS_DEBUG_INIT          \"-g\")\nSET (CMAKE_C_FLAGS_MINSIZEREL_INIT     \"-o4 -mf0 -DNDEBUG\")\nSET (CMAKE_C_FLAGS_RELEASE_INIT        \"-o4 -DNDEBUG\")\nSET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT \"-o2 -g\")\n\nSET (CMAKE_CXX_FLAGS_DEBUG_INIT          \"-g\")\nSET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT     \"-o4 -mf0 -DNDEBUG\")\nSET (CMAKE_CXX_FLAGS_RELEASE_INIT        \"-o4 -DNDEBUG\")\nSET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT \"-o2 -g\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_openwrt_mips.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SYSTEM_NAME Openwrt)\nset(CMAKE_SYSTEM_PROCESSOR mips)\n\nset(CMAKE_C_COMPILER mips-openwrt-linux-gcc)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/cmake/toolchain_openwrt_mipsel.cmake",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SYSTEM_NAME Openwrt)\nset(CMAKE_SYSTEM_PROCESSOR mips)\n\nset(CMAKE_C_COMPILER mipsel-openwrt-linux-gcc)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/00.GETTING-STARTED.md",
    "content": "## Setting up prerequisites\n\nCurrently, only Ubuntu 18.04+ is officially supported as primary development environment.\n\nThere are several dependencies, that should be installed manually. The following list is the absolute minimum for building:\n\n- `gcc` or any C99-compliant compiler (native or cross, e.g., arm-none-eabi)\n- `cmake` >= `2.8.12.2`\n\nSeveral scripts and tools help the building and development process, thus it is recommended to have the following installed as well:\n\n- `bash` >= `4.3.11`\n- `cppcheck` >= `1.61`\n- `vera++` >= `1.2.1`\n- `python` >= `2.7.6`\n\n```bash\nsudo apt-get install gcc gcc-arm-none-eabi cmake cppcheck vera++ python\n```\n\nTo make our scripts run correctly, several shell utilities should be available on the system:\n\n- `awk`\n- `bc`\n- `find`\n- `sed`\n\n## Building JerryScript\n\n**To build debug version for Linux**\n\n```bash\npython tools/build.py --debug\n```\n\n**To build debug version for Linux without LTO (Link Time Optimization)**\n\n```bash\npython tools/build.py --debug --lto=off\n```\n\n**To enable more verbose outputs for debugging**\n\n```bash\ntools/build.py --debug --logging=on --error-messages=on --line-info=on\n```\n\n**Add custom arguments to CMake**\n\n```bash\npython tools/build.py --cmake-param=CMAKE_PARAM\n```\n\n**Set a profile mode (ES.next, ES5.1, minimal)**\n\n```bash\npython tools/build.py --profile=es.next|es5.1|minimal\n```\n\nSee also the related [README.md](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).\n\n**Use (compiler-default, external) libc**\n\nThe default libc is the compiler-default libc but you can use an external libc as well:\n\n- compiler-default libc:\n\n```bash\npython tools/build.py\n```\n\n- external libc:\n\n```bash\npython tools/build.py --compile-flag=\"-nostdlib -I/path/to/ext-libc/include\" --link-lib=\"ext-c\"\n```\n\n**Add toolchain file**\n\nThe ```cmake``` dir already contains some usable toolchain files, which you can use in the following format:\n\n```bash\npython tools/build.py --toolchain=TOOLCHAIN\n```\n\nFor example the cross-compile to RaspberryPi 2 is something like this:\n\n```bash\npython tools/build.py --toolchain=cmake/toolchain_linux_armv7l.cmake\n```\n\n**Use system memory allocator**\n\n```bash\npython tools/build.py --system-allocator=on\n```\n\n*Note*: System allocator is only supported on 32 bit systems.\n\n**Enable 32bit compressed pointers**\n\n```bash\npython tools/build.py --cpointer-32bit=on\n```\n\n*Note*: There is no compression/decompression on 32 bit systems, if enabled.\n\n**Change default heap size (512K)**\n\n```bash\npython tools/build.py --mem-heap=256\n```\n\nIf you would like to use more than 512K, then you must enable the 32 bit compressed pointers.\n\n```bash\npython tools/build.py --cpointer-32bit=on --mem-heap=1024\n```\n\n*Note*: The heap size will be allocated statically at compile time, when JerryScript memory\nallocator is used.\n\n**To build with libfuzzer support**\n\n```bash\nCC=clang python tools/build.py --libfuzzer=on --compile-flag=-fsanitize=address --lto=off\n```\n\nCheck the documentation of libfuzzer to get the runtime settings of the created fuzzer\nbinary: https://llvm.org/docs/LibFuzzer.html.\n\n**To get a list of all the available buildoptions for Linux**\n\n```bash\npython tools/build.py --help\n```\n\n## Checking patch\n\n```bash\npython tools/run-tests.py --precommit\n```\n\n### Running only one type of test\n\n**To run build option tests**\n\n```bash\npython tools/run-tests.py --buildoption-test\n```\n\n**To run unittests**\n\n```bash\npython tools/run-tests.py --unittests\n```\n\n**To run jerry-tests**\n\n```bash\npython tools/run-tests.py --jerry-tests\n```\n\n**To run signed-off check**\n\n```bash\npython tools/run-tests.py --check-signed-off\n```\n\n**To run cppcheck**\n\n```bash\npython tools/run-tests.py --check-cppcheck\n```\n\n**To run vera check**\n\n```bash\npython tools/run-tests.py --check-vera\n```\n\n**To get a list of all the available test options**\n\n```bash\npython tools/run-tests.py --help\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/01.CONFIGURATION.md",
    "content": "# Configuration\n\nJerryScript provides a large number of configuration options which can be used to enable or disable specific features, allowing users to fine tune the engine to best suit their needs.\nA configuration option's value can be changed either by providing specific C preprocessor definitions, by adding CMake defininitions, or by using the arguments of the `tools/build.py` script.\nThis document lists the available configuration options, shows the configuration name for C, CMake, and python, and provides a brief description that explains the effect of the options.\n\n\n### Amalgamated build\n\nEnables the amalgamated build process, which aggregates the contents of each source file per library\n(i.e., JerryScript's core, port, and math libraries), and uses these combined files to compile the project.\nThis process can provide comparable results to link-time optimization, and can be useful when LTO is not available otherwise.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `<none>`                                     |\n| CMake:  | `-DENABLE_AMALGAM=ON/OFF`                    |\n| Python: | `--amalgam=ON/OFF`                           |\n\nSee also: [Amalgamated sources](#amalgamated-sources)\n\n### Jerry debugger\n\nEnables debugger support in the engine, which can be used to debug running JavaScript code. For more information on using the debugger see [Debugger](07.DEBUGGER.md).\nThe debugger is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_DEBUGGER=0/1`                       |\n| CMake:  | `-DJERRY_DEBUGGER=ON/OFF`                    |\n| Python: | `--jerry-debugger=ON/OFF`                    |\n\n### Line information\n\nBy default, all source code information is discarded after parsing is complete. This option can be used to augment the created bytecode to provide line information during runtime,\nthat can be used by the debugger to identify the currently executed source context. See [Debugger](07.DEBUGGER.md).\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_LINE_INFO=0/1`                      |\n| CMake:  | `-DJERRY_LINE_INFO=ON/OFF`                   |\n| Python: | `--line-info=ON/OFF`                         |\n\n### Profiles\n\nThis option can be used to enable/disable available JavaScript language features by providing profile files. Profile files contain a list of C definitions that configure each individual feature.\nThe `path` value for CMake and Python arguments should be a file path to the profile file, or one of `es.next`, `es5.1`, or `minimal`, which are the pre-defined profiles.\nTo see how a profile file should be created, or what configuration options are available in C, see the profile [README](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `<see description>`                          |\n| CMake:  | `-DJERRY_PROFILE=\"path\"`                     |\n| Python: | `--profile=\"path\"`                           |\n\n### External context\n\nEnables external context support in the engine. By default, JerryScript uses a statically allocated context to store the current state of the engine internals.\nWhen this option is enabled, an externally allocated memory region can be provided through the port API to the engine, to be used as the context.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_EXTERNAL_CONTEXT=0/1`               |\n| CMake:  | `-DJERRY_EXTERNAL_CONTEXT=ON/OFF`            |\n| Python: | `--external-context=ON/OFF`                  |\n\n### Snapshot execution\n\nThis option can be used to enable snapshot execution in the engine.\nThis option is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_SNAPSHOT_EXEC=0/1`                  |\n| CMake:  | `-DJERRY_SNAPSHOT_EXEC=ON/OFF`               |\n| Python: | `--snapshot-exec=ON/OFF`                     |\n\n### Snapshot saving\n\nThis option can be used to enable snapshot saving in the engine.\nThis option is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_SNAPSHOT_SAVE=0/1`                  |\n| CMake:  | `-DJERRY_SNAPSHOT_SAVE=ON/OFF`               |\n| Python: | `--snapshot-save=ON/OFF`                     |\n\n### Jerry parser\n\nThis option can be used to enable or disable the parser. When the parser is disabled all features that depend on source parsing are unavailable (eg. `jerry_parse`, `eval`, Function constructor).\nThis option can be useful in combination with the snapshot feature. The parser is enabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_PARSER=0/1`                         |\n| CMake:  | `-DJERRY_PARSER=ON/OFF`                      |\n| Python: | `--js-parser=ON/OFF`                         |\n\n### Dump bytecode\n\nThis option can be used to display created bytecode in a human readable format. See [Internals](04.INTERNALS.md#byte-code) for more details.\nThis option is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_PARSER_DUMP_BYTE_CODE=0/1`          |\n| CMake:  | `-DJERRY_PARSER_DUMP_BYTE_CODE=ON/OFF`       |\n| Python: | `--show-opcodes=ON/OFF`                      |\n\n### Dump RegExp bytecode\n\nThis option can be used to display created RegExp bytecode in a human readable format. The RegExp bytecode is different from the bytecode used by the virtual machine.\nThis option is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_REGEXP_DUMP_BYTE_CODE=0/1`          |\n| CMake:  | `-DJERRY_REGEXP_DUMP_BYTE_CODE=ON/OFF`       |\n| Python: | `--show-regexp-opcodes=ON/OFF`               |\n\n### Strict RegExp\n\nThis option can be used to enable strict RegExp mode. The standard RegExp syntax is a lot stricter than what is common in current JavaScript implementations.\nWhen enabled, this flag disables all of the non-standard, quality-of-life RegExp features, that are implemented to provide compatibility with other commonly used engines.\nThis option is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_REGEXP_STRICT_MODE=0/1`             |\n| CMake:  | `-DJERRY_REGEXP_STRICT_MODE=ON/OFF`          |\n| Python: | `--regexp-strict-mode=ON/OFF`                |\n\n### Error messages\n\nEnables error messages for thrown Error objects. By default, error messages are omitted to reduce memory usage.\nEnabling this feature provides detailed error messages where available, like line information for Syntax errors, variable names for Reference errors, Type/Range error messages for built-in routines, etc.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_ERROR_MESSAGES=0/1`                 |\n| CMake:  | `--DJERRY_ERROR_MESSAGES=ON/OFF`             |\n| Python: | `--error-messages=ON/OFF`                    |\n\n### Logging\n\nThis option can be used to enable log messages during runtime. When enabled the engine will use the `jerry_port_log` port API function to print relevant log messages.\nThis feature is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_LOGGING=0/1`                        |\n| CMake:  | `-DJERRY_LOGGING=ON/OFF`                     |\n| Python: | `--logging=ON/OFF`                           |\n\n### LCache\n\nThis option enables the LCache, allowing faster access to object properties. The LCache uses a statically allocated hash-map, which increases memory consumption.\nSee [Internals](04.INTERNALS.md#lcache) for further details.\nThis option is enabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_LCACHE=0/1`                         |\n| CMake:  | `<none>`                                     |\n| Python: | `<none>`                                     |\n\n### Property hashmaps\n\nThis option enables the creation of hashmaps for object properties, which allows faster property access, at the cost of increased memory consumption.\nSee [Internals](04.INTERNALS.md#property-hashmap) for further details.\nThis option is enabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_PROPRETY_HASHMAP=0/1`               |\n| CMake:  | `<none>`                                     |\n| Python: | `<none>`                                     |\n\n### Memory statistics\n\nThis option can be used to provide memory usage statistics either upon engine termination, or during runtime using the `jerry_get_memory_stats` jerry API function.\nThe feature can create a significant performance overhead, and should only be used for measurement purposes. This option is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_MEM_STATS=0/1`                      |\n| CMake:  | `-DJERRY_MEM_STATS=ON/OFF`                   |\n| Python: | `--mem-stats=ON/OFF`                         |\n\n### Heap size\n\nThis option can be used to adjust the size of the internal heap, represented in kilobytes. The provided value should be an integer. Values larger than 512 require 32-bit compressed pointers to be enabled.\nThe default value is 512.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_GLOBAL_HEAP_SIZE=(int)`             |\n| CMake:  | `--DJERRY_GLOBAL_HEAP_SIZE=(int)`            |\n| Python: | `--mem-heap=(int)`                           |\n\n### Garbage collection limit\n\nThis option can be used to adjust the maximum allowed heap usage increase until triggering the next garbage collection, in bytes.\nWhen the total allocated memory size reaches the current gc limit, garbage collection will be triggered to try and reduce clutter from unreachable objects.\nIf the total allocated memory can't be reduced below the current limit, then the limit will be increased by the amount specified via this option.\nSimilarly, when the total allocated memory goes well below the current gc limit, the limit is reduced by this amount.\nThe default value is 1/32 of the total heap size, but not greater than 8192 bytes.\nA value of 0 will use the default value.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_GC_LIMIT=(int)`                     |\n| CMake:  | `-DJERRY_GC_LIMIT=(int)`                     |\n| Python: | `--gc-limit=(int)`                           |\n\n### GC mark recursion limit\n\nThis option can be used to adjust the maximum recursion depth during the GC mark phase. The provided value should be an integer, which represents the allowed number of recursive calls. Increasing the depth of the recursion reduces the time of GC cycles, however increases stack usage.\nA value of 0 will prevent any recursive GC calls.\n\n| Options |                                                   |\n|---------|---------------------------------------------------|\n| C:      | `-DJERRY_GC_MARK_LIMIT=(int)`                     |\n| CMake:  | `-DJERRY_GC_MARK_LIMIT=(int)`                     |\n| Python: | `--gc-mark-limit=(int)`                           |\n\n### Stack limit\n\nThis option can be used to cap the stack usage of the engine, and prevent stack overflows due to recursion. The provided value should be an integer, which represents the allowed stack usage in kilobytes.\nThe default value is 0 (unlimited).\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_STACK_LIMIT=(int)`                  |\n| CMake:  | `-DJERRY_STACK_LIMIT=(int)`                  |\n| Python: | `--stack-limit=(int)`                        |\n\n### 32-bit compressed pointers\n\nEnables 32-bit pointers instead of the default 16-bit compressed pointers. This allows the engine to use a much larger heap, but also comes with slightly increased memory usage, as objects can't be packed as tightly.\nThis option must be enabled when using the system allocator.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_CPOINTER_32_BIT=0/1`                |\n| CMake:  | `-DJERRY_CPOINTER_32_BIT=ON/OFF`             |\n| Python: | `--cpointer-32bit=ON/OFF`                    |\n\n### System allocator\n\nThis option enables the use of malloc/free instead of the internal JerryScript allocator. This feature requires 32-bit compressed pointers, and is unsupported on 64-bit architectures.\nThis option is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_SYSTEM_ALLOCATOR=0/1`               |\n| CMake:  | `-DJERRY_SYSTEM_ALLOCATOR=ON/OFF`            |\n| Python: | `--system-allocator=ON/OFF`                  |\n\n### Valgrind support\n\nThis option enables valgrind support for the internal allocator. When enabled, valgrind will be able to properly identify allocated memory regions, and report leaks or out-of-bounds memory accesses.\nThis option is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_VALGRIND=0/1`                       |\n| CMake:  | `-DJERRY_VALGRIND=ON/OFF`                    |\n| Python: | `--valgrind=ON/OFF`                          |\n\n### Memory stress test\n\nThis option can be used to stress test memory management, by running garbage collection before every allocation attempt.\nThis option is disabled by default.\n\n| Options |                                              |\n|---------|----------------------------------------------|\n| C:      | `-DJERRY_MEM_GC_BEFORE_EACH_ALLOC=0/1`       |\n| CMake:  | `-DJERRY_MEM_GC_BEFORE_EACH_ALLOC=ON/OFF`    |\n| Python: | `--mem-stress-test=ON/OFF`                   |\n\n\n# Amalgamated sources\n\nThe sources of JerryScript can be combined into a handful of files to allow their easy integration\nin other projects. To achieve this, the following command can be executed to create a set of files\ninto the `amalgam` directory:\n\n```sh\n$ python tools/amalgam.py --output-dir amalgam --jerry-core --jerry-port-default --jerry-math\n```\n\n(Note: In the example above, the command is executed from the project's root directory, but that is\nnot mandatory.)\n\nThe command creates the following files in the `amalgam` dir:\n\n* `jerryscript.c`\n* `jerryscript.h`\n* `jerryscript-config.h`\n* `jerryscript-port-default.c`\n* `jerryscript-port-default.h`\n* `jerryscript-math.c`\n* `math.h`\n\n**Important**: the `jerryscript-config.h` contains the configurations mentioned above and\nshould be adapted to the required use-case. See the file contents for more details and for the\ndefault configuration. (Note: This config file is created from the the `jerry-core/config.h` file.)\n\nThese files can be directly compiled with an application using the JerryScript API.\nE.g., using a command similar to the one below:\n\n```sh\n$ gcc -Wall -o demo_app demo_app.c amalgam/jerryscript.c amalgam/jerryscript-port-default.c amalgam/jerryscript-math.c -Iamalgam/\n```\n\n(Note: The headers must be available on the include path.)\n\nThis approach is also under the hood of the [amalgamated build](#amalgamated-build) process.\n\n# Target specific information\n\n## x86 with GCC\n\nWhen building for Intel 32 bit architecture it is possible that GCC uses conservative options, thus assuming the most\nbasic floating-point support (that is it does not generate SSE or others instructions).\nHowever this could lead to loss off precision and/or different results than what is required by the JavaScript standard\nin regards of floating-point values and arithmetic.\n\nTo resolve this precision problem it is advised to use at least SSE2.\nTo do this with GCC please provide the `-mfpmath=sse -msse2` options during build.\n\nThese options can also be specified via the `build.py` script:\n\n```sh\n$ ./tools/build.py --compile-flag=-mfpmath=sse --compile-flag=-msse2 --compile-flag=-m32\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/02.API-REFERENCE.md",
    "content": "# JerryScript types\n\n## jerry_init_flag_t\n\nEnum that contains the following elements:\n\n - JERRY_INIT_EMPTY - empty flag set\n - JERRY_INIT_SHOW_OPCODES - dump byte-code to log after parse\n - JERRY_INIT_SHOW_REGEXP_OPCODES - dump regexp byte-code to log after compilation\n - JERRY_INIT_MEM_STATS - dump memory statistics\n - JERRY_INIT_MEM_STATS_SEPARATE - **deprecated**, dump memory statistics and reset peak values after parse\n - JERRY_INIT_DEBUGGER - **deprecated**, an unused placeholder now\n\n*Changed in version 2.0*: `JERRY_INIT_MEM_STATS_SEPARATE` and `JERRY_INIT_DEBUGGER` are now deprecated and not used internally.\n\n## jerry_type_t\n\nEnum that contains JerryScript API value types:\n\n - JERRY_TYPE_NONE - no type information\n - JERRY_TYPE_UNDEFINED - undefined type\n - JERRY_TYPE_NULL - null type\n - JERRY_TYPE_BOOLEAN - boolean type\n - JERRY_TYPE_NUMBER - number type\n - JERRY_TYPE_STRING - string type\n - JERRY_TYPE_OBJECT - object type\n - JERRY_TYPE_FUNCTION - function type\n - JERRY_TYPE_ERROR - error/abort type\n - JERRY_TYPE_SYMBOL - symbol type\n - JERRY_TYPE_BIGINT - bigint type\n\n*New in version 2.0*.\n\n*Changed in version 2.4*: Added `JERRY_TYPE_BIGINT` value.\n\n## jerry_object_type_t\n\nEnum that contains JerryScript **object** value types:\n\n - JERRY_OBJECT_TYPE_NONE - Non-object type\n - JERRY_OBJECT_TYPE_GENERIC - Generic JavaScript object without any internal property\n - JERRY_OBJECT_TYPE_ARRAY - Array object\n - JERRY_OBJECT_TYPE_PROXY - Proxy object\n - JERRY_OBJECT_TYPE_FUNCTION - Function object (see [jerry_function_get_type](#jerry_function_get_type))\n - JERRY_OBJECT_TYPE_TYPEDARRAY - %TypedArray% object (see [jerry_get_typedarray_type](#jerry_get_typedarray_type))\n - JERRY_OBJECT_TYPE_ITERATOR - Iterator object (see [jerry_iterator_get_type](#jerry_get_typedarray_type))\n - JERRY_OBJECT_TYPE_CONTAINER - Container object (see [jerry_get_container_type](#jerry_get_container_type))\n\n - JERRY_OBJECT_TYPE_ARGUMENTS - Arguments object\n - JERRY_OBJECT_TYPE_BOOLEAN - Boolean object\n - JERRY_OBJECT_TYPE_DATE - Date object\n - JERRY_OBJECT_TYPE_NUMBER - Number object\n - JERRY_OBJECT_TYPE_REGEXP - RegExp object\n - JERRY_OBJECT_TYPE_STRING - String object\n - JERRY_OBJECT_TYPE_SYMBOL - Symbol object\n - JERRY_OBJECT_TYPE_GENERATOR - Generator object\n - JERRY_OBJECT_TYPE_BIGINT - BigInt object\n\n*New in version 2.4*.\n\n## jerry_function_type_t\n\nEnum that contains JerryScript **function** value types:\n\n - JERRY_FUNCTION_TYPE_NONE - Non-function type\n - JERRY_FUNCTION_TYPE_GENERIC - Generic JavaScript function\n - JERRY_FUNCTION_TYPE_ACCESSOR - Accessor function\n - JERRY_FUNCTION_TYPE_BOUND - Bound function\n - JERRY_FUNCTION_TYPE_ARROW - Arrow fuction\n - JERRY_FUNCTION_TYPE_GENERATOR - Generator function object\n\n*New in version 2.4*.\n\n## jerry_iterator_type_t\n\nEnum that contains JerryScript **iterator** value types:\n\n - JERRY_ITERATOR_TYPE_NONE - Non-iterator type\n - JERRY_ITERATOR_TYPE_ARRAY - Array iterator\n - JERRY_ITERATOR_TYPE_STRING - String iterator\n - JERRY_ITERATOR_TYPE_MAP - Map iterator\n - JERRY_ITERATOR_TYPE_SET - Set iterator\n\n*New in version 2.4*.\n\n## jerry_property_filter_t\n\nEnum that contains JerryScript **property filter** options bits:\n\n - JERRY_PROPERTY_FILTER_ALL -  List all property keys independently from key type or property value attributes (equivalent to Reflect.ownKeys call)\n - JERRY_PROPERTY_FILTER_TRAVERSE_PROTOTYPE_CHAIN - Include keys from the objects's  prototype chain as well\n - JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE - Exclude property key if the property is non-configurable\n - JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE - Exclude property key if the property is non-enumerable\n - JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE - Exclude property key if the property is non-writable\n - JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS - Exclude property key if it is a string\n - JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS - Exclude property key if it is a symbol\n - JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES - Exclude property key if it is an integer index\n - JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER - By default integer index property keys are converted to string. Enabling this flags keeps integer index property keys as numbers\n\n*New in version 2.4*.\n\n## jerry_error_t\n\nPossible types of an error:\n\n - JERRY_ERROR_COMMON - common error\n - JERRY_ERROR_EVAL - eval error\n - JERRY_ERROR_RANGE - range error\n - JERRY_ERROR_REFERENCE - reference error\n - JERRY_ERROR_SYNTAX - syntax error\n - JERRY_ERROR_TYPE - type error\n - JERRY_ERROR_URI - URI error\n\nThere is also a special value `JERRY_ERROR_NONE` which is not an error type\nthis value can only be returned by the [jerry_get_error_type](#jerry_get_error_type).\n\n*Changed in version 2.0*: The `JERRY_ERROR_NONE` was added to be used by the [jerry_get_error_type](#jerry_get_error_type) method.\n\n## jerry_feature_t\n\nPossible compile time enabled feature types:\n\n - JERRY_FEATURE_CPOINTER_32_BIT - 32 bit compressed pointers\n - JERRY_FEATURE_ERROR_MESSAGES - error messages\n - JERRY_FEATURE_JS_PARSER - js-parser\n - JERRY_FEATURE_MEM_STATS - memory statistics\n - JERRY_FEATURE_PARSER_DUMP - parser byte-code dumps\n - JERRY_FEATURE_REGEXP_DUMP - regexp byte-code dumps\n - JERRY_FEATURE_SNAPSHOT_SAVE - saving snapshot files\n - JERRY_FEATURE_SNAPSHOT_EXEC - executing snapshot files\n - JERRY_FEATURE_DEBUGGER - debugging\n - JERRY_FEATURE_VM_EXEC_STOP - stopping ECMAScript execution\n - JERRY_FEATURE_JSON - JSON support\n - JERRY_FEATURE_PROMISE - promise support\n - JERRY_FEATURE_TYPEDARRAY - Typedarray support\n - JERRY_FEATURE_DATE - Date support\n - JERRY_FEATURE_REGEXP - RegExp support\n - JERRY_FEATURE_LINE_INFO - line info available\n - JERRY_FEATURE_LOGGING - logging\n - JERRY_FEATURE_SYMBOL - symbol support\n - JERRY_FEATURE_DATAVIEW - DataView support\n - JERRY_FEATURE_PROXY - Proxy support\n - JERRY_FEATURE_MAP - Map support\n - JERRY_FEATURE_SET - Set support\n - JERRY_FEATURE_WEAKMAP - WeakMap support\n - JERRY_FEATURE_WEAKSET - WeakSet support\n - JERRY_FEATURE_BIGINT - BigInt support\n - JERRY_FEATURE_REALM - realm support\n\n*New in version 2.0*.\n\n*Changed in version 2.3*: Added `JERRY_FEATURE_WEAKMAP`, `JERRY_FEATURE_WEAKSET` values.\n\n*Changed in version 2.4*: Added `JERRY_FEATURE_BIGINT`, `JERRY_FEATURE_REALM` values.\n\n## jerry_container_type_t\n\nContainer object types:\n\n - JERRY_CONTAINER_TYPE_INVALID - Invalid container\n - JERRY_CONTAINER_TYPE_MAP - Map type\n - JERRY_CONTAINER_TYPE_SET - Set type\n - JERRY_CONTAINER_TYPE_WEAKMAP - WeakMap type\n - JERRY_CONTAINER_TYPE_WEAKSET - WeakSet type\n\n *New in version 2.3*.\n\n## jerry_well_known_symbol_t\n\nWell-known symbols:\n\n - JERRY_SYMBOL_ASYNC_ITERATOR - @@asyncIterator well-known symbol\n - JERRY_SYMBOL_HAS_INSTANCE - @@hasInstance well-known symbol\n - JERRY_SYMBOL_IS_CONCAT_SPREADABLE - @@isConcatSpreadable well-known symbol\n - JERRY_SYMBOL_ITERATOR - @@iterator well-known symbol\n - JERRY_SYMBOL_MATCH - @@match well-known symbol\n - JERRY_SYMBOL_REPLACE - @@replace well-known symbol\n - JERRY_SYMBOL_SEARCH - @@search well-known symbol\n - JERRY_SYMBOL_SPECIES - @@species well-known symbol\n - JERRY_SYMBOL_SPLIT - @@split well-known symbol\n - JERRY_SYMBOL_TO_PRIMITIVE - @@toPrimitive well-known symbol\n - JERRY_SYMBOL_TO_STRING_TAG - @@toStringTag well-known symbol\n - JERRY_SYMBOL_UNSCOPABLES - @@unscopables well-known symbol\n - JERRY_SYMBOL_MATCH_ALL - @@matchAll well-known symbol\n\n *New in version 2.4*.\n\n## jerry_regexp_flags_t\n\nRegExp object optional flags:\n\n  - JERRY_REGEXP_FLAG_GLOBAL - global match; find all matches rather than stopping after the first match\n  - JERRY_REGEXP_FLAG_IGNORE_CASE - ignore case\n  - JERRY_REGEXP_FLAG_MULTILINE - multiline; treat beginning and end characters (^ and $) as working\n    over\n    multiple lines (i.e., match the beginning or end of each line (delimited by \\n or \\r), not only the\n    very beginning or end of the whole input string)\n  - JERRY_REGEXP_FLAG_STICKY - The sticky flag indicates that it matches only from the index indicated\n    by the lastIndex property\n  - JERRY_REGEXP_FLAG_UNICODE - The unicode flag enables various Unicode-related features\n  - JERRY_REGEXP_FLAG_DOTALL -The dotall flag indicates that the dot special character (\".\") should\n    additionally match the following line terminator (\"newline\") characters in a string;\n\n\n*New in version 2.0*.\n\n*Changed in version 2.4*: Added `JERRY_REGEXP_FLAG_STICKY`, `JERRY_REGEXP_FLAG_UNICODE` , `JERRY_REGEXP_FLAG_DOTALL` values.\n\n\n## jerry_parse_opts_t\n\nOption bits for [jerry_parse](#jerry_parse) and\n[jerry_parse_function](#jerry_parse_function) functions:\n\n - JERRY_PARSE_NO_OPTS - no options passed\n - JERRY_PARSE_STRICT_MODE - enable strict mode\n - JERRY_PARSE_MODULE - parse source as an ECMAScript module\n\n*New in version 2.0*.\n\n*Changed in version 2.4: Added `JERRY_PARSE_MODULE`.*\n\n## jerry_gc_mode_t\n\nSet garbage collection operational mode\n\n - JERRY_GC_PRESSURE_LOW - free unused objects\n - JERRY_GC_PRESSURE_HIGH - free as much memory as possible\n\nThe difference between `JERRY_GC_PRESSURE_LOW` and `JERRY_GC_PRESSURE_HIGH`\nis that the former keeps memory allocated for performance improvements such\nas property hash tables for large objects. The latter frees all possible\nmemory blocks but the performance may drop after the garbage collection.\n\n*New in version 2.0*.\n\n## jerry_generate_snapshot_opts_t\n\nFlags for [jerry_generate_snapshot](#jerry_generate_snapshot) and\n[jerry_generate_function_snapshot](#jerry_generate_function_snapshot) functions:\n\n - JERRY_SNAPSHOT_SAVE_STATIC - generate static snapshot (see below)\n - JERRY_SNAPSHOT_SAVE_STRICT - strict source code provided\n\n**Generate static snapshots**\nSnapshots contain literal pools, and these literal pools contain references\nto constant literals (strings, numbers, etc.). When a snapshot is executed,\nthese literals are converted to jerry values and the literal pool entries\nare changed to their corresponding jerry value. To support this conversion,\nthe literals and literal pools are copied into RAM even if the\n`JERRY_SNAPSHOT_EXEC_COPY_DATA` option is passed to\n[jerry_exec_snapshot](#jerry_exec_snapshot). This non-negligible memory\nconsumption can be avoided by using static snapshots. The literals of\nthese snapshots are limited to magic strings and 28 bit signed integers,\nso their constant pools do not need to be loaded into the memory.\nHence these snapshots can be executed from ROM.\n\n***Important note:*** The [jerry_exec_snapshot](#jerry_exec_snapshot)\nfunction rejects static snaphots unless the `JERRY_SNAPSHOT_EXEC_ALLOW_STATIC`\noption bit is set. The caller must also ensure that the same magic\nstrings are set by [jerry_register_magic_strings](#jerry_register_magic_strings)\nwhen the snapshot is generated and executed. Furthermore the\n`JERRY_SNAPSHOT_EXEC_COPY_DATA` option is not allowed.\n\n*New in version 2.0*.\n\n## jerry_exec_snapshot_opts_t\n\nFlags for [jerry_exec_snapshot](#jerry_exec_snapshot) and\n[jerry_load_function_snapshot](#jerry_load_function_snapshot) functions:\n\n - JERRY_SNAPSHOT_EXEC_COPY_DATA - copy snapshot data into memory (see below)\n - JERRY_SNAPSHOT_EXEC_ALLOW_STATIC - allow executing static snapshots\n\n**Copy snapshot data into memory**\n\nBy default the snapshot buffer is expected to be present in memory until\n[jerry_cleanup](#jerry_cleanup) is called. For example `static const` buffers\ncompiled into the application binary satisfy this requirement.\n\nIf the snapshot buffer is freed after [jerry_exec_snapshot](#jerry_exec_snapshot)\nis called the `JERRY_SNAPSHOT_EXEC_COPY_DATA` must be passed to copy the necessary\nparts of the snapshot buffer into memory.\n\nThe `JERRY_SNAPSHOT_EXEC_COPY_DATA` option is not allowed for static snapshots.\n\n*New in version 2.0*.\n\n## jerry_char_t\n\n**Summary**\n\nJerry's char value\n\n**Prototype**\n\n```c\ntypedef uint8_t jerry_char_t;\n```\n\n## jerry_size_t\n\n**Summary**\n\nJerry's size\n\n**Prototype**\n\n```c\ntypedef uint32_t jerry_size_t;\n```\n\n## jerry_length_t\n\n**Summary**\n\nJerry's length\n\n**Prototype**\n\n```c\ntypedef uint32_t jerry_length_t;\n```\n\n## jerry_value_t\n\n**Summary**\n\nJerryScript value can be a boolean, number, null, object, string or undefined. The value has an error flag,\nthat indicates whether is an error or not. Every type has an error flag not only objects. The error flag should\nbe cleared before the value is passed as an argument, otherwise it can lead to a type error. The error objects\ncreated by API functions has the error flag set.\n\nReturned and created values by the API functions must be freed with\n[jerry_release_value](#jerry_release_value) when they are no longer needed.\n\n**Prototype**\n\n```c\ntypedef uint32_t jerry_value_t;\n```\n\n## jerry_context_data_manager_t\n\n**Summary**\n\nStructure that defines how a context data item will be initialized and deinitialized. JerryScript zeroes out the memory\nfor the item by default, and if the `init_cb` field is not NULL, it will be called with the pointer to the memory as\nan additional custom initializer. The `deinit_cb` (if non-`NULL`) is called during a call to `jerry_cleanup ()` to run\nany custom deinitialization *before* the VM has been fully cleaned up. The `finalize_cb` (if non-`NULL`) is also called\nduring a call to `jerry_cleanup ()` to run any custom deinitialization *after* the VM has been fully cleaned up.\nIf bytes_needed field is 0, no buffer is allocated for the manager, callback functions are called with NULL pointer.\n\n**Prototype**\n\n```c\ntypedef struct\n{\n  /**\n   * Callback responsible for initializing a context item, or NULL to zero out the memory. This is called lazily, the\n   * first time jerry_get_context_data () is called with this manager.\n   *\n   * @param [in] data The buffer that JerryScript allocated for the manager. The buffer is zeroed out. The size is\n   * determined by the bytes_needed field. The buffer is kept alive until jerry_cleanup () is called.\n   */\n  void (*init_cb) (void *data);\n\n  /**\n   * Callback responsible for deinitializing a context item, or NULL. This is called as part of jerry_cleanup (),\n   * right *before* the VM has been cleaned up. This is a good place to release strong references to jerry_value_t's\n   * that the manager may be holding.\n   * Note: because the VM has not been fully cleaned up yet, jerry_object_native_info_t free_cb's can still get called\n   * *after* all deinit_cb's have been run. See finalize_cb for a callback that is guaranteed to run *after* all\n   * free_cb's have been run.\n   *\n   * @param [in] data The buffer that JerryScript allocated for the manager.\n   */\n  void (*deinit_cb) (void *data);\n\n  /**\n   * Callback responsible for finalizing a context item, or NULL. This is called as part of jerry_cleanup (),\n   * right *after* the VM has been cleaned up and destroyed and jerry_... APIs cannot be called any more. At this point,\n   * all values in the VM have been cleaned up. This is a good place to clean up native state that can only be cleaned\n   * up at the very end when there are no more VM values around that may need to access that state.\n   *\n   * @param [in] data The buffer that JerryScript allocated for the manager. After returning from this callback,\n   * the data pointer may no longer be used.\n   */\n  void (*finalize_cb) (void *data);\n\n  /**\n   * Number of bytes to allocate for this manager. This is the size of the buffer that JerryScript will allocate on\n   * behalf of the manager. The pointer to this buffer is passed into init_cb, deinit_cb and finalize_cb. It is also\n   * returned from the jerry_get_context_data () API.\n   */\n  size_t bytes_needed;\n} jerry_context_data_manager_t;\n```\n\n*New in version 2.0*.\n\n## jerry_context_alloc_t\n\n**Summary**\n\nFunction type for allocating buffer for JerryScript context.\n\n**Prototype**\n\n```c\ntypedef void *(*jerry_context_alloc_t) (size_t size, void *cb_data_p);\n```\n\n- `size` - allocation size\n- `cb_data_p` - pointer to user data\n\n*New in version 2.0*.\n\n## jerry_context_t\n\n**Summary**\n\nAn opaque declaration of the JerryScript context structure.\n\n**Prototype**\n\n```c\ntypedef struct jerry_context_t jerry_context_t;\n```\n\n*New in version 2.0*.\n\n\n## jerry_binary_operation_t\n\nEnum that contains the supported binary operation types\n - JERRY_BIN_OP_EQUAL - equal comparison (==)\n - JERRY_BIN_OP_STRICT_EQUAL - strict equal comparison (===)\n - JERRY_BIN_OP_LESS - less relation (<)\n - JERRY_BIN_OP_LESS_EQUAL - less or equal relation (<=)\n - JERRY_BIN_OP_GREATER - greater relation (>)\n - JERRY_BIN_OP_GREATER_EQUAL - greater or equal relation (>=)\n - JERRY_BIN_OP_INSTANCEOF - instanceof operation\n - JERRY_BIN_OP_ADD - addition operator (+)\n - JERRY_BIN_OP_SUB - subtraction operator (-)\n - JERRY_BIN_OP_MUL - multiplication operator (*)\n - JERRY_BIN_OP_DIV - division operator (/)\n - JERRY_BIN_OP_REM - remainder operator (%)\n\n*New in version 2.0*.\n\n**See also**\n\n- [jerry_binary_operation](#jerry_binary_operation)\n\n## jerry_property_descriptor_t\n\n**Summary**\n\nDescription of ECMA property descriptor. This struct can be used\nfor the [jerry_define_own_property](#jerry_define_own_property) method to\nconfigure how the property should be registered.\n\nThe naming scheme is similar to the JavaScript `Object.defineProperty` method.\n\nFields should be used in pairs. That is if the `is_value_defined` is set to `true`\nthe `value` field should contain the value for the property.\n\n**Prototype**\n\n```c\ntypedef struct\n{\n  /** Is [[Value]] defined? */\n  bool is_value_defined;\n\n  /** Is [[Get]] defined? */\n  bool is_get_defined;\n\n  /** Is [[Set]] defined? */\n  bool is_set_defined;\n\n  /** Is [[Writable]] defined? */\n  bool is_writable_defined;\n\n  /** [[Writable]] */\n  bool is_writable;\n\n  /** Is [[Enumerable]] defined? */\n  bool is_enumerable_defined;\n\n  /** [[Enumerable]] */\n  bool is_enumerable;\n\n  /** Is [[Configurable]] defined? */\n  bool is_configurable_defined;\n\n  /** [[Configurable]] */\n  bool is_configurable;\n\n  /** [[Value]] */\n  jerry_value_t value;\n\n  /** [[Get]] */\n  jerry_value_t getter;\n\n  /** [[Set]] */\n  jerry_value_t setter;\n} jerry_property_descriptor_t;\n```\n\n**See also**\n\n- [jerry_define_own_property](#jerry_define_own_property)\n\n## jerry_heap_stats_t\n\n**Summary**\n\nDescription of JerryScript heap memory stats.\nIt is for memory profiling.\n\n**Prototype**\n\n```c\ntypedef struct\n{\n  size_t version /**< the version of the stats struct */\n  size_t size; /**< heap total size */\n  size_t allocated_bytes; /**< currently allocated bytes */\n  size_t peak_allocated_bytes; /**< peak allocated bytes */\n  size_t reserved[4]; /**< padding for future extensions */\n} jerry_heap_stats_t;\n```\n\n*New in version 2.0*.\n\n**See also**\n\n- [jerry_get_memory_stats](#jerry_get_memory_stats)\n\n## jerry_external_handler_t\n\n**Summary**\n\nType of an external function handler\n\n**Prototype**\n\n```c\ntypedef jerry_value_t (*jerry_external_handler_t) (const jerry_value_t function_obj,\n                                                   const jerry_value_t this_val,\n                                                   const jerry_value_t args_p[],\n                                                   const jerry_length_t args_count);\n```\n\n- `function_object` - the JavaScript function object which was invoked.\n- `this_val` - the `this` value provided for the function call.\n- `args_p` - the function arguments, array of JavaScript values.\n- `args_count` - the number of arguments.\n- return value\n  - The function's return value. If there is no return value, use [jerry_create_undefined()](#jerry_create_undefined).\n\n**See also**\n\n- [jerry_create_external_function](#jerry_create_external_function)\n\n## jerry_object_native_free_callback_t\n\n**Summary**\n\nNative free callback of an object. It is used in `jerry_object_native_info_t` and for external Array buffers.\n\n*Note*:\n - Referred values by this method must have at least 1 reference. (Correct API usage satisfies this condition)\n\n**Prototype**\n\n```c\ntypedef void (*jerry_object_native_free_callback_t) (void *native_p);\n```\n\n*New in version 2.0*: Renamed from `jerry_object_free_callback_t`.\n\n*Changed in version 2.2*: API calls are once again allowed. (See note)\n\n**See also**\n\n- [jerry_object_native_info_t](#jerry_object_native_info_t)\n- [jerry_create_arraybuffer_external](#jerry_create_arraybuffer_external)\n\n## jerry_error_object_created_callback_t\n\n**Summary**\n\nDecorator callback for Error objects. This native callback is called every time when an Error\nobject is created and the decorator can create or update any properties of the newly created\nError object.\n\n*Note*:\n - The callback function cannot be called recursively, so the Error objects created\n   when the callback is running are not updated.\n\n**Prototype**\n\n```c\ntypedef void (*jerry_error_object_created_callback_t) (const jerry_value_t error_object, void *user_p);\n```\n\n- `error_object` - the newly created Error object.\n- `user_p` - pointer passed to [jerry_set_error_object_created_callback](#jerry_set_error_object_created_callback).\n\n*New in version 2.4*.\n\n**See also**\n\n- [jerry_set_error_object_created_callback](#jerry_set_error_object_created_callback)\n\n## jerry_object_native_info_t\n\n**Summary**\n\nThe type information of the native pointer.\nIt includes the free callback that will be called when associated JavaScript object is garbage collected. It can be left NULL in case it is not needed.\n\nTypically, one would create a `static const jerry_object_native_info_t` for\neach distinct C type for which a pointer is used with\n`jerry_set_object_native_pointer ()` and `jerry_get_object_native_pointer ()`.\nThis way, each `const jerry_object_native_info_t *` pointer address value itself\nuniquely identifies the C type of the native pointer.\n\nSee [jerry_get_object_native_pointer](#jerry_get_object_native_pointer)\nfor a best-practice code example.\n\n**Prototype**\n\n```c\ntypedef struct\n{\n  jerry_object_native_free_callback_t free_cb;\n} jerry_object_native_info_t;\n```\n\n*New in version 2.0*.\n\n**See also**\n\n- [jerry_set_object_native_pointer](#jerry_set_object_native_pointer)\n- [jerry_get_object_native_pointer](#jerry_get_object_native_pointer)\n\n## jerry_object_property_foreach_t\n\n**Summary**\n\nFunction type used as a callback for the [jerry_foreach_object_property](#jerry_foreach_object_property)\nmethod. A function with this type must return \"true\" to continue the iteration or \"false\" to finish the\niteration on the object's properties.\n\n**Prototype**\n\n```c\ntypedef bool (*jerry_object_property_foreach_t) (const jerry_value_t property_name,\n                                                 const jerry_value_t property_value,\n                                                 void *user_data_p);\n```\n\n- `property_name` - a property name, this is not always a string.\n- `property_value` - the value for the given property.\n- `user_data_p` - optional user data pointer supplied via the (jerry_foreach_object_property)[#jerry_foreach_object_property] method.\n- return value\n  - true, to continue the iteration\n  - false, to stop the iteration\n\n**See also**\n\n- [jerry_foreach_object_property](#jerry_foreach_object_property)\n\n## jerry_objects_foreach_t\n\n**Summary**\n\nFunction type used as a callback for the (jerry_objects_foreach)[#jerry_objects_foreach] method.\nA function with this type must return \"true\" to continue the iteration or \"false\" to finish the\niteration on the object's properties.\n\n**Prototype**\n\n```c\ntypedef bool (*jerry_objects_foreach_t) (const jerry_value_t object,\n                                         void *user_data_p);\n```\n\n- `object` - the current JavaScript object in the for-each iteration.\n- `user_data_p` - optional user data pointer supplied via the (jerry_objects_foreach)[#jerry_objects_foreach] method.\n- return value\n  - true, to continue the iteration\n  - false, to stop the iteration\n\n*New in version 2.0*.\n\n**See also**\n\n- [jerry_objects_foreach](#jerry_objects_foreach)\n\n## jerry_objects_foreach_by_native_info_t\n\n**Summary**\n\nFunction type used as a callback for the (jerry_objects_foreach_by_native_info)[#jerry_objects_foreach_by_native_info]\nmethod. A function with this type must return \"true\" to continue the iteration or \"false\" to finish the\niteration on the object's properties.\n\n**Prototype**\n\n```c\ntypedef bool (*jerry_objects_foreach_by_native_info_t) (const jerry_value_t object,\n                                                        void *object_data_p,\n                                                        void *user_data_p);\n```\n\n- `object` - the current JavaScript object in the for-each iteration.\n- `object_data_p` - the current object's native data pointer.\n- `user_data_p` - optional user data pointer supplied via the (jerry_objects_foreach_by_native_info)[#jerry_objects_foreach_by_native_info] method.\n- return value\n  - true, to continue the iteration\n  - false, to stop the iteration\n\n*New in version 2.0*.\n\n**See also**\n\n- [jerry_objects_foreach_by_native_info](#jerry_objects_foreach_by_native_info)\n\n## jerry_vm_exec_stop_callback_t\n\n**Summary**\n\nCallback which tells whether the ECMAScript execution should be stopped.\nIf it returns with undefined value the ECMAScript execution continues.\nOtherwise the result is thrown by the engine (if the error flag is not\nset for the returned value the engine automatically sets it). The\ncallback function might be called again even if it threw an error.\nIn this case the function must throw the same error again.\n\n**Prototype**\n\n```c\ntypedef jerry_value_t (*jerry_vm_exec_stop_callback_t) (void *user_p);\n```\n\n*New in version 2.0*.\n\n**See also**\n\n- [jerry_set_vm_exec_stop_callback](#jerry_set_vm_exec_stop_callback)\n\n## jerry_promise_state_t\n\nEnum which describes the state of a Promise.\n\nPossible values:\n\n - JERRY_PROMISE_STATE_NONE - Invalid/Unknown state (possibly called on a non-promise object).\n - JERRY_PROMISE_STATE_PENDING - Promise is in \"Pending\" state.\n - JERRY_PROMISE_STATE_FULFILLED - Promise is in \"Fulfilled\" state.\n - JERRY_PROMISE_STATE_REJECTED - Promise is in \"Rejected\" state.\n\n*New in version 2.2*.\n\n**See also**\n\n- [jerry_get_promise_result](#jerry_get_promise_result)\n\n## jerry_typedarray_type_t\n\nEnum which describes the TypedArray types.\nPossible values:\n\n - JERRY_TYPEDARRAY_UINT8 - represents the Uint8Array TypedArray\n - JERRY_TYPEDARRAY_UINT8CLAMPED - represents the Uint8ClampedArray TypedArray\n - JERRY_TYPEDARRAY_INT8 - represents the Int8Array TypedArray\n - JERRY_TYPEDARRAY_UINT16 - represents the Uint16Array TypedArray\n - JERRY_TYPEDARRAY_INT16 - represents the Int16Array TypedArray\n - JERRY_TYPEDARRAY_UINT32 - represents the Uint32Array TypedArray\n - JERRY_TYPEDARRAY_INT32 - represents the Int32Array TypedArray\n - JERRY_TYPEDARRAY_FLOAT32 - represents the Float32Array TypedArray\n - JERRY_TYPEDARRAY_FLOAT64 - represents the Float64Array TypedArray\n - JERRY_TYPEDARRAY_BIGINT64 - represents the BigInt64Array TypedArray\n - JERRY_TYPEDARRAY_BIGUINT64 - represents the BigUint64Array TypedArray\n - JERRY_TYPEDARRAY_INVALID - represents an invalid TypedArray\n\nAPI functions can return the `JERRY_TYPEDARRAY_INVALID` value if the\nTypedArray support is not in the engine.\n\n*New in version 2.0*.\n\n*Changed in version 2.4*: Added `JERRY_TYPEDARRAY_BIGINT64`, `JERRY_TYPEDARRAY_BIGUINT64` values.\n\n**See also**\n\n- [jerry_get_typedarray_type](#jerry_get_typedarray_type)\n\n\n# General engine functions\n\n## jerry_init\n\n**Summary**\n\nInitializes the JerryScript engine, making it possible to run JavaScript code and perform operations\non JavaScript values. This is required for almost all API functions.\n\n**Prototype**\n\n```c\nvoid\njerry_init (jerry_init_flag_t flags)\n```\n\n`flags` - combination of various engine configuration flags [jerry_init_flag_t](#jerry_init_flag_t).\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_SHOW_OPCODES | JERRY_INIT_SHOW_REGEXP_OPCODES);\n\n  // ...\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_init_flag_t](#jerry_init_flag_t)\n- [jerry_cleanup](#jerry_cleanup)\n\n\n## jerry_cleanup\n\n**Summary**\n\nFinish JavaScript engine execution, freeing memory and JavaScript values.\n\n*Note*: JavaScript values, received from engine, will be inaccessible after the cleanup.\n\n**Prototype**\n\n```c\nvoid\njerry_cleanup (void);\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n\n\n## jerry_get_context_data\n\n**Summary**\n\nRetrieve a pointer to the item stored within the current context by the given manager.\n\n*Note*: Since internally the pointer to a manager's context data item is linked to the next such pointer in a linked\n        list, it is inadvisable to invoke too many different managers, because doing so will increase the time it takes\n        to retrieve a manager's context data item, degrading performance. For example, try to keep the number of\n        managers below five.\n\n**Prototype**\n\n```c\nvoid *\njerry_get_context_data (const jerry_context_data_manager *manager_p);\n```\n\n- `manager_p`: the manager of this context data item.\n- return value: the item created by `manager_p` when `jerry_get_context_data ()` was first called, or a new item created\n  by `manager_p`, which will be stored for future identical calls to `jerry_get_context_data ()`, and which will be\n  deinitialized using the `deinit_cb` callback provided by `manager_p` when the context will be destroyed.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include \"jerryscript.h\"\n\ntypedef struct\n{\n  int my_data1;\n  double my_data2;\n  char *my_data3;\n} my_context_data_t;\n\n/* Define how context items will be initialized. */\nstatic void\nmy_context_data_new (void *user_data_p)\n{\n  my_context_data_t *my_data_p = (my_context_data_t *) user_data_p;\n\n  /*\n   * Initialize my_data_p. JerryScript will store it on the current context and return it whenever\n   * jerry_get_context_data () is called with a pointer to my_manager as defined below.\n   */\n}\n\n/* Define how context items will be deinitialized */\nstatic void\nmy_context_data_free (void *user_data_p)\n{\n  my_context_data_t *my_data_p = ((my_context_data_t *) user_data_p);\n\n  /* Perform any necessary cleanup on my_data. JerryScript will free the pointer after this function completes. */\n}\n\n/* Wrap the creation and destruction functions into a manager */\nstatic const jerry_context_data_manager_t my_manager =\n{\n  .init_cb = my_context_data_new,\n  .deinit_cb = my_context_data_free,\n  .bytes_needed = sizeof (my_context_data_t)\n};\n\n/*\n * Then, in some function in your code, you can retrieve an item of type my_context_data_t from the currently active\n * context such that JerryScript will create and store such an item if one was not previously created\n */\nstatic void\nsomeplace_in_the_code (void)\n{\n  my_context_data_t *my_data = (my_context_data_t *) jerry_get_context_data (&my_manager);\n  /* Perform useful things using the data found in my_data */\n}\n```\n\n\n## jerry_register_magic_strings\n\n**Summary**\n\nRegisters an external magic string array.\n\n*Notes*:\n  - The strings in the array must be sorted by size at first, then lexicographically.\n  - The maximum number of external magic strings is limited to 2147483648 (UINT32_MAX / 2).\n    If there are more than 2147483648 external magic strings the extra is cropped.\n\n**Prototype**\n\n```c\nvoid\njerry_register_magic_strings  (const jerry_char_t * const *ex_str_items_p,\n                               uint32_t count,\n                               const jerry_length_t *str_lengths_p);\n```\n\n- `ex_str_items_p` - character arrays, representing external magic strings' contents\n- `count` - number of elements in `ext_str_items_p` array\n- `str_lengths_p` - array of lengths for each magic string\n\n*Changed in version 2.0*: The first function argument type was changed.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  // must be static, because 'jerry_register_magic_strings' does not copy\n  // the items must be sorted by size at first, then lexicographically\n  static const jerry_char_t * const magic_string_items[] = {\n                                                             (const jerry_char_t *) \"magicstring1\",\n                                                             (const jerry_char_t *) \"magicstring2\",\n                                                             (const jerry_char_t *) \"magicstring3\"\n                                                           };\n  uint32_t num_magic_string_items = (uint32_t) (sizeof (magic_string_items) / sizeof (jerry_char_t *));\n\n  // must be static, because 'jerry_register_magic_strings' does not copy\n  static const jerry_length_t magic_string_lengths[] = {\n                                                         12,\n                                                         12,\n                                                         12\n                                                       };\n  jerry_register_magic_strings (magic_string_items, num_magic_string_items, magic_string_lengths);\n}\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n- [jerry_cleanup](#jerry_cleanup)\n- [jerry_get_literals_from_snapshot](#jerry_get_literals_from_snapshot)\n\n\n## jerry_get_memory_stats\n\n**Summary**\n\nGet heap memory stats.\n\n**Notes**:\n- The engine must be initialized with the `JERRY_INIT_MEM_STATS` option to allow\n  heap statistic collections. See [jerry_init](#jerry_init)\n- This API depends on a build option (`JERRY_MEM_STATS`) and can be checked\n  in runtime with the `JERRY_FEATURE_MEM_STATS` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n\n\n**Prototype**\n\n```c\nbool\njerry_get_memory_stats (jerry_heap_stats_t *out_stats_p);\n```\n\n- `out_stats_p` - out parameter, that provides the heap statistics.\n- return value\n  - true, if stats were written into the `out_stats_p` pointer.\n  - false, otherwise. Usually it is because the `JERRY_FEATURE_MEM_STATS` feature is not enabled.\n\n*New in version 2.0*.\n\n**Example**\n\n```c\njerry_init (JERRY_INIT_MEM_STATS);\n// ...\n\njerry_heap_stats_t stats = {0};\nbool get_stats_ret = jerry_get_memory_stats (&stats);\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n\n\n## jerry_gc\n\n**Summary**\n\nPerforms garbage collection.\n\n**Prototype**\n\n```c\nvoid\njerry_gc (jerry_gc_mode_t mode);\n```\n\n- `mode` - operational mode, see [jerry_gc_mode_t](#jerry_gc_mode_t)\n\n*Changed in version 2.0*: Added `mode` argument.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t object_value = jerry_create_object ();\n  jerry_release_value (object_value);\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n\n  jerry_cleanup ();\n}\n```\n\n**See also**\n\n- [jerry_gc_mode_t](#jerry_gc_mode_t)\n- [jerry_init](#jerry_init)\n- [jerry_cleanup](#jerry_cleanup)\n\n# Parser and executor functions\n\nFunctions to parse and run JavaScript source code.\n\n## jerry_run_simple\n\n**Summary**\n\nThe simplest way to run JavaScript.\n\n**Prototype**\n\n```c\nbool\njerry_run_simple (const jerry_char_t *script_source_p,\n                  size_t script_source_size,\n                  jerry_init_flag_t flags);\n```\n\n- `script_source_p` - source code, it must be a valid utf8 string.\n- `script_source_size` - size of source code buffer, in bytes.\n- `jerry_init_flag_t` - combination of various engine configuration flags\n- return value\n  - true, if run was successful\n  - false, otherwise\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  const jerry_char_t script[] = \"print ('Hello, World!');\";\n\n  jerry_run_simple (script, sizeof (script) - 1, JERRY_INIT_EMPTY);\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n- [jerry_cleanup](#jerry_cleanup)\n- [jerry_parse](#jerry_parse)\n- [jerry_run](#jerry_run)\n\n\n## jerry_parse\n\n**Summary**\n\nParse script and construct an EcmaScript function. The lexical environment is\nset to the global lexical environment. The resource name can be used by\ndebugging systems to provide line / backtrace info.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_parse (const jerry_char_t *resource_name_p, /**< resource name (usually a file name) */\n             size_t resource_name_length, /**< length of resource name */\n             const jerry_char_t *source_p,\n             size_t source_size,\n             uint32_t parse_opts);\n```\n\n- `resource_name_p` - resource name, usually a file name (must be a valid UTF8 string).\n- `resource_name_length` - size of the resource name, in bytes.\n- `source_p` - string, containing source code to parse (must be a valid UTF8 string).\n- `source_size` - size of the string, in bytes.\n- `parse_opts` - any combination of [jerry_parse_opts_t](#jerry_parse_opts_t) flags.\n- return value\n  - function object value, if script was parsed successfully,\n  - thrown error, otherwise\n\n*Changed in version 2.0*: Added `resource_name_p`, and `resource_name_length` arguments.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const jerry_char_t script[] = \"print ('Hello, World!');\";\n\n  jerry_value_t parsed_code = jerry_parse (NULL, 0, script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n  jerry_release_value (parsed_code);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_run](#jerry_run)\n- [jerry_parse_function](#jerry_parse_function)\n\n## jerry_parse_function\n\n**Summary**\n\nParse function source code and construct an ECMAScript\nfunction. The function arguments and function body are\npassed as separated arguments. The lexical environment\nis set to the global lexical environment. The resource\nname (usually a file name) is also passed to this function\nwhich is used by the debugger to find the source code.\n\n*Note*: The returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_parse_function (const jerry_char_t *resource_name_p, /**< resource name (usually a file name) */\n                      size_t resource_name_length, /**< length of resource name */\n                      const jerry_char_t *arg_list_p, /**< script source */\n                      size_t arg_list_size, /**< script source size */\n                      const jerry_char_t *source_p, /**< script source */\n                      size_t source_size, /**< script source size */\n                      uint32_t parse_opts) /**< strict mode */\n```\n\n- `resource_name_p` - resource name, usually a file name (must be a valid UTF8 string).\n- `resource_name_length` - size of the resource name, in bytes.\n- `arg_list_p` - argument list of the function (must be a valid UTF8 string).\n- `arg_list_size` - size of the argument list, in bytes.\n- `source_p` - string, containing source code to parse (must be a valid UTF8 string).\n- `source_size` - size of the string, in bytes.\n- `parse_opts` - any combination of [jerry_parse_opts_t](#jerry_parse_opts_t) flags.\n- return value\n  - function object value, if script was parsed successfully,\n  - thrown error, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # (name=\"02.API-REFERENCE-parse-func.c\")\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  int return_value = 1;\n\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Parse the 'function (a,b) { return a + b; }' function */\n  const char function_args[] = \"a, b\";\n  const char function_source[] = \"return a + b\";\n\n  jerry_value_t parsed_function = jerry_parse_function (NULL,\n                                                        0,\n                                                        (const jerry_char_t *) function_args,\n                                                        strlen (function_args),\n                                                        (const jerry_char_t *) function_source,\n                                                        strlen (function_source),\n                                                        JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (parsed_function))\n  {\n    /* Run the parsed function */\n    jerry_value_t args[] = {\n        jerry_create_number (3),\n        jerry_create_number (55),\n    };\n    jerry_size_t argc = sizeof (args) / sizeof (args[0]);\n    jerry_value_t ret_value = jerry_call_function (parsed_function,\n                                                   jerry_create_undefined(),\n                                                   args,\n                                                   argc);\n\n    /* Process result value */\n    if (jerry_value_is_number (ret_value)) {\n        double value = jerry_get_number_value (ret_value);\n        printf (\"Function result: %lf\\n\", value);\n\n        return_value = !(value == (3 + 55));\n    }\n\n    /* Release the function arguments */\n    for (jerry_size_t idx = 0; idx < argc; idx++) {\n        jerry_release_value (args[idx]);\n    }\n\n    /* Returned value must be freed */\n    jerry_release_value (ret_value);\n  }\n\n  /* Parsed function must be freed */\n  jerry_release_value (parsed_function);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return return_value;\n}\n```\n\n**See also**\n\n- [jerry_call_function](#jerry_call_function)\n\n\n## jerry_run\n\n**Summary**\n\nRun an EcmaScript function created by `jerry_parse`.\n\n*Notes*:\n  - The code should be previously parsed with `jerry_parse`.\n  - Returned value must be freed with [jerry_release_value](#jerry_release_value)\n    when it is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_run (const jerry_value_t func_val);\n```\n\n- `func_val` - function to run\n- return value\n  - result of bytecode, if run was successful\n  - thrown error, otherwise\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  const jerry_char_t script[] = \"print ('Hello, World!');\";\n\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Setup Global scope code */\n  jerry_value_t parsed_code = jerry_parse (NULL, 0, script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (parsed_code))\n  {\n    /* Execute the parsed source code in the Global scope */\n    jerry_value_t ret_value = jerry_run (parsed_code);\n\n    /* Returned value must be freed */\n    jerry_release_value (ret_value);\n  }\n\n  /* Parsed source code must be freed */\n  jerry_release_value (parsed_code);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n}\n```\n\n**See also**\n\n- [jerry_parse](#jerry_parse)\n\n\n## jerry_eval\n\n**Summary**\n\nPerform JavaScript `eval` function call (ECMA-262 v5.1 sec-15.1.2.1).\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_eval (const jerry_char_t *source_p,\n            size_t source_size,\n            uint32_t parse_opts);\n```\n\n- `source_p` - source code to evaluate, it must be a valid utf8 string.\n- `source_size` - length of the source code\n- `parse_opts` - any combination of [jerry_parse_opts_t](#jerry_parse_opts_t) flags.\n- return value - result of eval, may be an error value.\n\n**Example**\n\n```c\n{\n  jerry_value_t ret_val = jerry_eval (str_to_eval,\n                                      strlen (str_to_eval),\n                                      JERRY_PARSE_NO_OPTS);\n}\n```\n\n**See also**\n\n- [jerry_create_external_function](#jerry_create_external_function)\n- [jerry_external_handler_t](#jerry_external_handler_t)\n\n## jerry_run_all_enqueued_jobs\n\n**Summary**\n\nRun enqueued Promise jobs until the first thrown error or until all get executed.\n\n*Important Note*: The job queue is not guaranteed to be empty, after the function call has returned a value.\nTherefore, this function is best used in a while loop, handling each error it returns, until the job queue is empty.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_run_all_enqueued_jobs (void)\n```\n\n- return value - result of last executed job, may be error value.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const jerry_char_t script[] = \"new Promise(function(f,r) { f('Hello, World!'); }).then(function(x) { print(x); });\";\n\n  jerry_value_t parsed_code = jerry_parse (NULL, 0, script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n  jerry_value_t script_value = jerry_run (parsed_code);\n\n  jerry_value_t job_value;\n  while (true)\n  {\n    job_value = jerry_run_all_enqueued_jobs ();\n\n    if (jerry_value_is_error (job_value))\n    {\n      if (jerry_value_is_abort (job_value))\n      {\n        // Terminate the engine\n      }\n\n      // Handle the error here\n    }\n    else\n    {\n      // The queue should be empty now\n      break;\n    }\n  }\n\n  jerry_release_value (job_value);\n  jerry_release_value (script_value);\n  jerry_release_value (parsed_code);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n\n# Get the global context\n\n## jerry_get_global_object\n\n**Summary**\n\nGet the Global object.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_global_object (void);\n```\n\n- return value - api value of global object\n\n**Example**\n\n```c\n{\n  jerry_value_t glob_obj_val = jerry_get_global_object ();\n\n  ... // Do something with global object, ex: add properties\n\n  jerry_release_value (glob_obj_val);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_define_own_property](#jerry_define_own_property)\n\n\n# Checker functions\n\nFunctions to check the type of an API value ([jerry_value_t](#jerry_value_t)).\n\n## jerry_value_is_abort\n\n**Summary**\n\nReturns whether the given `jerry_value_t` has the error and abort value set.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_abort (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` has the error and abort value set\n  - false, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_abort (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_value_t](#jerry_value_t)\n- [jerry_value_is_error](#jerry_value_is_error)\n\n## jerry_value_is_array\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is an array.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_array (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is an array\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_array (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n## jerry_value_is_arraybuffer\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is an ArrayBuffer object.\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked\n  in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_arraybuffer (const jerry_value_t value)\n```\n\n- `value` - api value to check.\n- return value\n  - true, if the given `jerry_value_t` is an ArrayBuffer object.\n  - false, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_arraybuffer (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_create_arraybuffer](#jerry_create_arraybuffer)\n- [jerry_create_arraybuffer_external](#jerry_create_arraybuffer_external)\n\n\n## jerry_value_is_boolean\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a boolean value.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_boolean (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is a boolean value\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_boolean (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_value_is_constructor\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a constructor function.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_constructor (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is a constructor\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_constructor (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n## jerry_value_is_dataview\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a DataView object value.\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_DATAVIEW`) and can be checked\n  in runtime with the `JERRY_FEATURE_DATAVIEW` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_dataview (const jerry_value_t value)\n```\n\n- `value` - API value\n- return value\n  - true, if the given `jerry_value_t` is a DataView object\n  - false, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t arraybuffer = jerry_create_arraybuffer (16);\n  jerry_value_t dataview = jerry_create_dataview (arraybuffer, 0, 16);\n\n  if (jerry_value_is_dataview (dataview))\n  {\n    // usage of dataview\n  }\n\n  jerry_release_value (dataview);\n  jerry_release_value (arraybuffer);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_create_dataview](#jerry_create_dataview)\n\n\n## jerry_value_is_error\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is error value.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_error (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is error value.\n  - false, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_error (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_value_t](#jerry_value_t)\n- [jerry_value_is_abort](#jerry_value_is_abort)\n\n## jerry_value_is_function\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a function.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_function (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is a function\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_function (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_value_is_async_function\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is an async function.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_async_function (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is an async function\n  - false, otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_async_function (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n## jerry_value_is_number\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a number.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_number (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is a number\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_number (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_value_is_null\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a null value.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_null (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is a null\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_null (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_value_is_object\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is an object value.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_object (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is an object\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_object (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_value_is_promise\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a promise value.\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked\n  in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n\n**Prototype**\n\n```c\nbool\njerry_value_is_promise (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is a promise\n  - false, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_promise (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_create_promise](#jerry_create_promise)\n\n\n## jerry_value_is_proxy\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a proxy value.\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_PROXY`) and can be checked\n  in runtime with the `JERRY_FEATURE_PROXY` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n\n**Prototype**\n\n```c\nbool\njerry_value_is_proxy (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is a proxy object\n  - false, otherwise\n\n**Example**\n\n*New in version 2.3*.\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_proxy (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_create_proxy](#jerry_create_proxy)\n\n\n## jerry_value_is_string\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a string value.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_string (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is a string\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_string (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_value_is_symbol\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a symbol value.\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked\n  in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_symbol (const jerry_value_t value)\n```\n\n- `value` - API value\n- return value\n  - true, if the given `jerry_value_t` is a symbol\n  - false, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t string_value = jerry_create_string ((const jerry_char_t *) \"Symbol description string\");\n  jerry_value_t symbol_value = jerry_create_symbol (string_value);\n\n  jerry_release_value (string_value);\n\n  if (jerry_value_is_symbol (symbol_value))\n  {\n    // usage of symbol_value\n  }\n\n  jerry_release_value (symbol_value);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_create_symbol](#jerry_create_symbol)\n\n\n## jerry_value_is_bigint\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is a bigint value.\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_BIGINT`) and can be checked\n  in runtime with the `JERRY_FEATURE_BIGINT` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_bigint (const jerry_value_t value)\n```\n\n- `value` - API value\n- return value\n  - true, if the given `jerry_value_t` is a BigInt\n  - false, otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t string_value = jerry_create_string ((const jerry_char_t *) \"12345678\");\n  jerry_value_t bigint_value = jerry_value_to_bigint (string_value);\n\n  jerry_release_value (string_value);\n\n  if (jerry_value_is_bigint (bigint_value))\n  {\n    // usage of bigint_value\n  }\n\n  jerry_release_value (bigint_value);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_create_bigint](#jerry_create_bigint)\n- [jerry_value_to_bigint](#jerry_value_to_bigint)\n\n\n## jerry_value_is_typedarray\n\n**Summary**\n\nChecks whether the given `jerry_value_t` is a TypedArray object or not.\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked\n  in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_typedarray (const jerry_value_t value)\n```\n\n- `value` - object to check\n- return value\n  - true, if the given `jerry_value_t` is a TypedArray object.\n  - false, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t value = jerry_create_typedarray (JERRY_TYPEDARRAY_UINT16, 15);\n\n  if (jerry_value_is_typedarray (value))\n  {\n    /* \"value\" is a typedarray. */\n  }\n\n  jerry_release_value (value);\n\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_create_typedarray](#jerry_create_typedarray)\n\n\n## jerry_get_container_type\n\n**Summary**\n\nChecks whether the given `jerry_value_t` is the given `jerry_container_type_t` type container object.\n\n*Notes*\n- This API function depends on a build option (`JERRY_BUILTIN_CONTAINER`) and can be checked\n  runtime with the `JERRY_FEATURE_MAP, JERRY_FEATURE_SET, JERRY_FEATURE_WEAKMAP, JERRY_FEATURE_WEAKSET`\n  feature enum values.\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n*New in version 2.3*.\n\n**Prototype**\n\n```c\njerry_container_type_t\njerry_get_container_type (const jerry_value_t value)\n```\n\n- `value` - Container object\n- return value\n  - The corresponding enum value of `jerry_container_type_t`, or `JERRY_CONTAINER_TYPE_INVALID` if the container\n    was not a valid container object.\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t value = jerry_create_container (JERRY_CONTAINER_TYPE_MAP, NULL, 0);\n\n  if (jerry_get_container_type (value) == JERRY_CONTAINER_TYPE_MAP)\n  {\n    /* \"value\" is a map. */\n  }\n\n  jerry_release_value (value);\n\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_create_container](#jerry_create_container)\n- [jerry_container_type_t](#jerry_container_type_t)\n\n\n## jerry_value_is_undefined\n\n**Summary**\n\nReturns whether the given `jerry_value_t` is an undefined value.\n\n**Prototype**\n\n```c\nbool\njerry_value_is_undefined (const jerry_value_t value)\n```\n\n- `value` - api value\n- return value\n  - true, if the given `jerry_value_t` is an undefined value\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_undefined (value))\n  {\n    ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n## jerry_value_get_type\n\n**Summary**\n\nReturns the JavaScript type\nfor a given value as a [jerry_type_t](#jerry_type_t) enum value.\n\nThis is a similar operation to the 'typeof' operator\nin the standard with an exception that the 'null'\nvalue has its own enum value.\n\n**Prototype**\n\n```c\njerry_type_t\njerry_value_get_type (const jerry_value_t value);\n```\n\n- `value` - JavaScript value to check.\n- return value\n  - One of the [jerry_type_t](#jerry_type_t) value.\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t number = jerry_create_number (3.3);\n\n  jerry_type_t type_info = jerry_value_get_type (number);\n\n  if (type_info == JERRY_TYPE_NUMBER)\n  {\n    /* ... */\n  }\n\n  jerry_release_value (number);\n}\n```\n\n**See also**\n\n- [jerry_type_t](#jerry_type_t)\n\n## jerry_object_get_type\n\n**Summary**\n\nReturns the **object** type\nfor a given value as a [jerry_object_type_t](#jerry_object_type_t) enum value.\n\nNote: For non-object parameters `JERRY_OBJECT_TYPE_NONE` is returned.\nNote: the returned type can be checked for more detailed type information in the following cases:\n  - `JERRY_OBJECT_TYPE_CONTAINER`, *see also:* [jerry_container_get_type](#jerry_container_get_type)\n  - `JERRY_OBJECT_TYPE_FUNCTION`, *see also:* [jerry_function_get_type](#jerry_function_get_type)\n  - `JERRY_OBJECT_TYPE_ITERATOR`, *see also:* [jerry_iterator_get_type](#jerry_iterator_get_type)\n  - `JERRY_OBJECT_TYPE_TYPEDARRAY`, *see also:* [jerry_get_typedarray_type](#jerry_get_typedarray_type)\n\n**Prototype**\n\n```c\njerry_object_type_t\njerry_object_get_type (const jerry_value_t value);\n```\n\n- `value` - JavaScript value to check.\n- return value\n  - One of the [jerry_object_type_t](#jerry_object_type_t) value.\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  jerry_value_t object = jerry_create_object ();\n\n  jerry_object_type_t object_type_info = jerry_object_get_type (object);\n\n  if (type_info == JERRY_OBJECT_TYPE_GENERIC)\n  {\n    /* ... */\n  }\n\n  jerry_release_value (object);\n}\n```\n\n**See also**\n\n- [jerry_object_type_t](#jerry_object_type_t)\n\n## jerry_function_get_type\n\n**Summary**\n\nReturns the **function** type\nfor a given value as a [jerry_function_type_t](#jerry_function_type_t) enum value.\n\n**Prototype**\n\n```c\njerry_function_type_t\njerry_function_get_type (const jerry_value_t value);\n```\n\n- `value` - JavaScript value to check.\n- return value\n  - One of the [jerry_function_type_t](#jerry_function_type_t) value.\n\nNote: For non-function parameters `JERRY_FUNCTION_TYPE_NONE` is returned.\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  const jerry_char_t script[] = \"function f() {}; f\";\n  jerry_value_t function_object = jerry_eval (script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  jerry_function_type_t function_type_info = jerry_function_get_type (function_object);\n\n  if (type_info == JERRY_FUNCTION_TYPE_GENERIC)\n  {\n    /* ... */\n  }\n\n  jerry_release_value (function_object);\n}\n```\n\n**See also**\n\n- [jerry_function_type_t](#jerry_function_type_t)\n\n## jerry_iterator_get_type\n\n**Summary**\n\nReturns the **iterator** type\nfor a given value as a [jerry_iterator_type_t](#jerry_iterator_type_t) enum value.\n\n**Prototype**\n\n```c\njerry_iterator_type_t\njerry_iterator_get_type (const jerry_value_t value);\n```\n\n- `value` - JavaScript value to check.\n- return value\n  - One of the [jerry_iterator_type_t](#jerry_iterator_type_t) value.\n\nNote: For non-iterator parameters `JERRY_ITERATOR_TYPE_NONE` is returned.\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  const jerry_char_t script[] = \"[1, 2, 3].values()\";\n  jerry_value_t iterator = jerry_eval (script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  jerry_iterator_type_t iterator_type_info = jerry_iterator_get_type (iterator);\n\n  if (type_info == JERRY_ITERATOR_TYPE_ARRAY)\n  {\n    /* ... */\n  }\n\n  jerry_release_value (iterator);\n}\n```\n\n**See also**\n\n- [jerry_iterator_type_t](#jerry_iterator_type_t)\n\n## jerry_is_feature_enabled\n\n**Summary**\n\nReturns whether the specified compile time feature is enabled.\n\n**Prototype**\n\n```c\nbool\njerry_is_feature_enabled (const jerry_feature_t feature);\n```\n\n- `feature` - jerry feature\n- return value\n  - true, if the given `jerry_feature_t` is enabled\n  - false, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  /* ... */\n  jerry_feature_t feature = JERRY_FEATURE_SNAPSHOT_SAVE;\n\n  if (jerry_is_feature_enabled (feature))\n  {\n    /* ... */\n  }\n\n}\n```\n\n**See also**\n\n- [jerry_feature_t](#jerry_feature_t)\n\n\n# Binary operations\n\n## jerry_binary_operation\n\n**Summary**\n\nPerform binary operation on the given operands (==, ===, <, >, etc.).\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_binary_operation (jerry_binary_operation_t op,\n                        const jerry_value_t lhs,\n                        const jerry_value_t rhs);\n```\n\n- `op` - binary operation\n- `lhs` - left-hand side operand\n- `rhs` - right-hand side operand\n- return value\n  - error, if argument has an error flag or operation is unsuccessful or unsupported\n  - true/false, the result of the binary operation on the given operands otherwise\n\n*New in version 2.0*.\n\n**Example - JERRY_BIN_OP_EQUAL**\n\n```c\n{\n  jerry_value_t value1;\n  jerry_value_t value2;\n  ... // create or acquire value\n  jerry_value_t result = jerry_binary_operation (JERRY_BIN_OP_EQUAL, value1, value2)\n\n  if (!jerry_value_is_error (result))\n  {\n    if (jerry_get_boolean_value (result))\n    {\n       // value1 and value2 are equal\n    }\n    else\n    {\n      // value1 and value2 are NOT equal\n    }\n  }\n  else\n  {\n    ... // handle error\n  }\n\n  jerry_release_value (value1);\n  jerry_release_value (value2);\n  jerry_release_value (result);\n}\n```\n\n**Example - JERRY_BIN_OP_INSTANCEOF**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nstatic jerry_value_t\nmy_constructor (const jerry_value_t func_val,\n                const jerry_value_t this_val,\n                const jerry_value_t argv[],\n                const jerry_length_t argc)\n{\n  return jerry_create_undefined ();\n}\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t base_obj = jerry_create_object ();\n  jerry_value_t constructor = jerry_create_external_function (my_constructor);\n\n  /* External functions does not have a prototype by default, so we need to create one */\n  jerry_value_t prototype_str = jerry_create_string ((const jerry_char_t *) (\"prototype\"));\n  jerry_release_value (jerry_set_property (constructor, prototype_str, base_obj));\n  jerry_release_value (prototype_str);\n\n  /* Construct the instance. */\n  jerry_value_t instance_val = jerry_construct_object (constructor, NULL, 0);\n\n  /* Call the API function of 'instanceof'. */\n  jerry_value_t is_instance = jerry_binary_operation (JERRY_BIN_OP_INSTANCEOF,\n                                                      instance_val,\n                                                      constructor);\n  if (!jerry_value_is_error (is_instance)\n      && jerry_get_boolean_value (is_instance) == true)\n  {\n    /* ... */\n  }\n\n  /* Free all of the jerry values and cleanup the engine. */\n  jerry_release_value (base_obj);\n  jerry_release_value (constructor);\n  jerry_release_value (instance_val);\n  jerry_release_value (is_instance);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_binary_operation_t](#jerry_binary_operation_t)\n\n\n# Error manipulation functions\n\n*Changed in version 2.0*: The error handling and manipulation was modified and the old methods were replaced.\n\n## jerry_create_abort_from_value\n\n**Summary**\n\nCreate (api) abort from a value.\n\nThis function creates an API abort value from an API value. The second argument defines\nwhether the input value must be released or not. If it is set to `true`,\nthen a [`jerry_release_value`](#jerry_release_value) function will be called\nfor the first argument, so the api value won't be available after the call of\n`jerry_create_abort_from_value`. The second argument should be false if both value\nand created abort value are needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_abort_from_value (jerry_value_t value, bool release);\n```\n\n- `value` - api value\n- `release` - raw boolean, defines whether input value must be released\n- return value - abort (api) value\n\n*New in version 2.0*.\n\n**Example 1**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t abort = jerry_create_abort_from_value (value, true);\n  // using the 'value' variable after release is invalid.\n\n  jerry_release_value (abort);\n}\n```\n\n**Example 2**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t abort = jerry_create_abort_from_value (value, false);\n  // both 'abort' and 'value' can be used and must be released when they are no longer needed\n\n  jerry_release_value (abort);\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_value_t](#jerry_value_t)\n- [jerry_get_value_from_error](#jerry_get_value_from_error)\n- [jerry_create_error_from_value](#jerry_create_error_from_value)\n\n## jerry_create_error_from_value\n\n**Summary**\n\nCreate (api) error from a value.\n\nThis function creates an API error value from an API value. The second argument defines\nwhether the input value must be released or not. If it is set to `true`,\nthen a [`jerry_release_value`](#jerry_release_value) function will be called\nfor the first argument, so the api value won't be available after the call of\n`jerry_create_error_from_value`. The second argument should be false if both value\nand created error value are needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_error_from_value (jerry_value_t value, bool release);\n```\n\n- `value` - api value\n- `release` - raw boolean, defines whether input value must be released\n- return value - error (api) value\n\n*New in version 2.0*.\n\n**Example 1**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t error = jerry_create_error_from_value (value, true);\n  // using the 'value' variable after release is invalid.\n\n\n  jerry_release_value (error);\n}\n```\n\n**Example 2**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t error = jerry_create_error_from_value (value, false);\n  // both 'error' and 'value' can be used and must be released when they are no longer needed\n\n  jerry_release_value (error);\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_value_t](#jerry_value_t)\n- [jerry_get_value_from_error](#jerry_get_value_from_error)\n- [jerry_create_abort_from_value](#jerry_create_abort_from_value)\n\n## jerry_get_error_type\n\n**Summary**\n\nReturns the type of the Error object if possible.\n\nIf a non-error object is used as the input for the function the method\nwill return `JERRY_ERROR_NONE` indicating that the value was not\nan Error object. However it is still possible that the value contains\nerror semantics. To correctly detect if a value have error use the\n[jerry_value_is_error](#jerry_value_is_error) method.\n\n**Prototype**\n\n```c\njerry_error_t\njerry_get_error_type (const jerry_value_t value);\n```\n\n- `value` - api value (possible error object)\n- return value\n  - JERRY_ERROR_NONE if the input is not an error object\n  - one of the [jerry_error_t](#jerry_error_t) value\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t error_obj = jerry_create_error (JERRY_ERROR_RANGE,\n                                                (const jerry_char_t *) \"error msg\");\n  jerry_error_t error_type = jerry_get_error_type (error_obj);\n\n  // error_type is now JERRY_ERROR_RANGE.\n\n  jerry_release_value (error_obj);\n}\n```\n\n**See also**\n\n- [jerry_create_error](#jerry_create_error)\n- [jerry_value_is_error](#jerry_value_is_error)\n\n## jerry_get_value_from_error\n\n**Summary**\n\nGet the value from an error.\n\nMany API functions cannot be called with an error value.\nThis function extracts the API value from an error. The second argument defines\nwhether the input error value must be released or not. If it is set to `true`,\nthen a [`jerry_release_value`](#jerry_release_value) function will be called\nfor the first argument, so the error value won't be available after the call of\n`jerry_get_value_from_error`. The second argument should be false if both error\nand its represented value are needed.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_value_from_error (jerry_value_t value, bool release)\n```\n\n- `value` - error (api) value\n- `release` - raw boolean, defines whether input value must be released\n- return value - api value\n\n*New in version 2.0*.\n\n**Example 1**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t error = jerry_create_error_from_value (value, true);\n  jerry_value_t value_from_error = jerry_get_value_from_error (error, true);\n  // using the 'error' variable after release is invalid.\n\n  jerry_release_value (value_from_error);\n}\n```\n\n**Example 2**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t error = jerry_create_error_from_value (value, true);\n  jerry_value_t value_from_error = jerry_get_value_from_error (error, false);\n  // both 'error' and 'value_from_error' can be used and must be released when they are no longer needed\n\n  jerry_release_value (value_from_error);\n  jerry_release_value (error);\n}\n```\n\n**See also**\n\n- [jerry_value_t](#jerry_value_t)\n- [jerry_create_error_from_value](#jerry_create_error_from_value)\n- [jerry_create_abort_from_value](#jerry_create_abort_from_value)\n\n## jerry_set_error_object_created_callback\n\n**Summary**\n\nSet the decorator callback for newly created Error objects. The operation of the callback\nis described in [jerry_error_object_created_callback_t](#jerry_error_object_created_callback_t).\n\n**Prototype**\n\n```c\nvoid jerry_set_error_object_created_callback (jerry_error_object_created_callback_t callback, void *user_p);\n```\n\n- `callback` - callback function, the previously set value is overwritten, and setting NULL\n               disables the operation\n- `user_p` - pointer passed to the callback function, can be NULL\n\n*New in version 2.4*.\n\n**Example**\n\n```c\nstatic void\nerror_object_created_callback (const jerry_value_t error_object) /**< new error object */\n                               void *user_p) /**< user pointer */\n{\n  (void) error_object;\n  (void) user_p;\n  printf (\"Notification: a new error is created\\n\");\n} /* error_object_created_callback */\n\nvoid main(void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_set_error_object_created_callback (error_object_created_callback, NULL);\n\n  jerry_release_value (jerry_create_error (JERRY_ERROR_COMMON,\n                                           (const jerry_char_t *) \"Message\"));\n\n  jerry_cleanup ();\n} /* main */\n```\n\n**See also**\n\n- [jerry_error_object_created_callback_t](#jerry_error_object_created_callback_t)\n\n# Getter functions of 'jerry_value_t'\n\nGet raw data from API values.\n\n## jerry_get_boolean_value\n\n**Summary**\n\nGets the raw bool value from a `jerry_value_t`.\n\n**Prototype**\n\n```c\nbool\njerry_get_boolean_value (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value - boolean value represented by the argument.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_boolean (value))\n  {\n    bool raw_value = jerry_get_boolean_value (value);\n\n    ... // usage of raw value\n\n  }\n\n  jerry_release_value (value);\n}\n\n```\n\n**See also**\n\n- [jerry_value_is_boolean](#jerry_value_is_boolean)\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_get_number_value\n\n**Summary**\n\nGets the number value of the given `jerry_value_t` parameter as a raw double.\n\nIf the argument passed is not a number `0.0` will be returned.\n\n**Prototype**\n\n```c\ndouble\njerry_get_number_value (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value\n  - the number value of the given `jerry_value_t` parameter as a raw double.\n  - `0.0` if the api value passed is not a number.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  if (jerry_value_is_number (value))\n  {\n    double raw_value = jerry_get_number_value (value);\n\n    ... // usage of raw value\n\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_value_is_number](#jerry_value_is_number)\n- [jerry_release_value](#jerry_release_value)\n\n\n# Functions for string values\n\n## jerry_get_string_size\n\n**Summary**\n\nGet the size of a string. Returns zero, if the value parameter is not a string.\nThis is effectively the number of bytes required to store the string's characters.\n\n**Prototype**\n\n```c\njerry_size_t\njerry_get_string_size (const jerry_value_t value);\n```\n- `value` - api value\n- return value - number of bytes in the buffer needed to represent the string.\n\n**Example**\n\n```c\n{\n  const jerry_char_t char_array[] = \"a string\";\n  jerry_value_t string = jerry_create_string (char_array);\n\n  jerry_size_t string_size = jerry_get_string_size (string);\n\n  ... // usage of string_size\n\n  jerry_release_value (string);\n}\n```\n\n**See also**\n\n- [jerry_create_string](#jerry_create_string)\n- [jerry_get_string_length](#jerry_get_string_length)\n- [jerry_is_valid_cesu8_string](#jerry_is_valid_cesu8_string)\n\n\n## jerry_get_utf8_string_size\n\n**Summary**\n\nGet the size of an utf8-encoded string. Returns zero, if the value parameter is not a string.\nThis is effectively the number of bytes required to store the utf8 encoded string's characters.\n\n*Note*: The difference from [jerry_get_string_size](#jerry_get_string_size) is that it returns with utf-8 string size\ninstead of the cesu-8 string size.\n\n**Prototype**\n\n```c\njerry_size_t\njerry_get_utf8_string_size (const jerry_value_t value);\n```\n- `value` - api value\n- return value - number of bytes in the buffer needed to represent the utf8-encoded string.\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  const jerry_char_t char_array[] = \"a string\";\n  jerry_value_t string = jerry_create_string (char_array);\n\n  jerry_size_t string_size = jerry_get_utf8_string_size (string);\n\n  ... // usage of string_size\n\n  jerry_release_value (string);\n}\n```\n\n**See also**\n\n- [jerry_create_string_from_utf8](#jerry_create_string_from_utf8)\n- [jerry_get_utf8_string_length](#jerry_get_utf8_string_length)\n- [jerry_is_valid_utf8_string](#jerry_is_valid_utf8_string)\n\n\n## jerry_get_string_length\n\n**Summary**\n\nGet the length of a string. Returns zero, if the value parameter is not a string.\n\n*Notes:*\n- The difference from [jerry_get_string_size](#jerry_get_string_size) is that it\n  returns the number of bytes used for the string.\n- This is **not** the number of bytes required to store the string.\n\n**Prototype**\n\n```c\njerry_length_t\njerry_get_string_length (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value - number of characters in the string\n\n**Example**\n\n```c\n{\n  const jerry_char_t char_array[] = \"a string\";\n  jerry_value_t string = jerry_create_string (char_array);\n\n  jerry_length_t string_length = jerry_get_string_length (string);\n\n  ... // usage of string_length\n\n  jerry_release_value (string);\n}\n```\n\n**See also**\n\n- [jerry_create_string](#jerry_create_string)\n- [jerry_get_string_size](#jerry_get_string_size)\n- [jerry_is_valid_cesu8_string](#jerry_is_valid_cesu8_string)\n\n\n## jerry_get_utf8_string_length\n\n**Summary**\n\nGet the length of an UTF-8 encoded string. Returns zero, if the value parameter is not a string.\n\n*Notes*:\n- The difference from [jerry_get_string_length](#jerry_get_string_length) is that it\n  returns with utf-8 string length instead of the cesu-8 string length.\n- This is **not** the number of bytes required to store the string.\n\n**Prototype**\n\n```c\njerry_length_t\njerry_get_utf8_string_length (const jerry_value_t value);\n```\n\n- `value` - input string value\n- return value - number of characters in the string\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  const jerry_char_t char_array[] = \"a string\";\n  jerry_value_t string = jerry_create_string_from_utf8 (char_array);\n\n  jerry_length_t string_length = jerry_get_utf8_string_length (string);\n\n  ... // usage of string_length\n\n  jerry_release_value (string);\n}\n```\n\n**See also**\n\n- [jerry_create_string_from_utf8](#jerry_create_string_from_utf8)\n- [jerry_get_utf8_string_size](#jerry_get_utf8_string_size)\n- [jerry_is_valid_utf8_string](#jerry_is_valid_utf8_string)\n\n\n## jerry_string_to_char_buffer\n\n**Summary**\n\nCopy the characters of a string into a specified cesu-8 buffer.\nThe '\\0' character could occur in the character buffer. Returns 0,\nif the value parameter is not a string or the buffer is not large\nenough for the whole string.\n\n*Note*: Does not put '\\0' to the end of string, the return value identifies\nthe number of valid bytes in the output buffer.\n\n*Note*: If the size of the string in jerry value is larger than the size of the\ntarget buffer, the copy will fail. To copy a substring the\n[jerry_substring_to_char_buffer](#jerry_substring_to_char_buffer) API function\nis recommended instead.\n\n\n**Prototype**\n\n```c\njerry_size_t\njerry_string_to_char_buffer (const jerry_value_t value,\n                             jerry_char_t *buffer_p,\n                             jerry_size_t buffer_size);\n```\n\n- `value` - input string value\n- `buffer_p` - pointer to output buffer\n- `buffer_size` - size of the buffer\n- return value - number of bytes, actually copied to the buffer\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t value;\n  // create or acquire value\n  value = jerry_create_string ((const jerry_char_t *) \"Demo string\");\n\n  // Read the string into a byte buffer.\n  jerry_size_t string_size = jerry_get_string_size (value);\n  jerry_char_t *string_buffer_p = (jerry_char_t *) malloc (sizeof (jerry_char_t) * (string_size + 1));\n\n  jerry_size_t copied_bytes = jerry_string_to_char_buffer (value, string_buffer_p, string_size);\n  string_buffer_p[copied_bytes] = '\\0';\n\n  jerry_release_value (value);\n\n  jerry_cleanup ();\n\n  printf (\"Test string: %s\\n\", string_buffer_p);\n  free (string_buffer_p);\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_create_string](#jerry_create_string)\n- [jerry_get_string_size](#jerry_get_string_size)\n- [jerry_is_valid_cesu8_string](#jerry_is_valid_cesu8_string)\n- [jerry_substring_to_char_buffer](#jerry_substring_to_char_buffer)\n\n\n## jerry_string_to_utf8_char_buffer\n\n**Summary**\n\nCopy the characters of a string into a specified utf-8 buffer.\nThe '\\0' character could occur in character buffer. Returns 0,\nif the value parameter is not a string or the buffer is not\nlarge enough for the whole string.\n\n*Note*: Does not put '\\0' to the end of string, the return value identifies\nthe number of valid bytes in the output buffer.\n\n*Note*: If the size of the string in jerry value is larger than the size of the\ntarget buffer, the copy will fail. To copy a substring the\n[jerry_substring_to_utf8_char_buffer](#jerry_substring_to_utf8_char_buffer)\nAPI function is recommended instead.\n\n**Prototype**\n\n```c\njerry_size_t\njerry_string_to_utf8_char_buffer (const jerry_value_t value,\n                                  jerry_char_t *buffer_p,\n                                  jerry_size_t buffer_size);\n```\n\n- `value` - input string value\n- `buffer_p` - pointer to output buffer\n- `buffer_size` - size of the buffer\n- return value - number of bytes, actually copied to the buffer\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_size_t req_sz = jerry_get_utf8_string_size (value);\n  jerry_char_t str_buf_p[req_sz];\n\n  jerry_size_t bytes_copied = jerry_string_to_utf8_char_buffer (value, str_buf_p, req_sz);\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_create_string_from_utf8](#jerry_create_string_from_utf8)\n- [jerry_get_utf8_string_size](#jerry_get_utf8_string_size)\n- [jerry_is_valid_utf8_string](#jerry_is_valid_utf8_string)\n- [jerry_substring_to_utf8_char_buffer](#jerry_substring_to_utf8_char_buffer)\n\n\n## jerry_substring_to_char_buffer\n\n**Summary**\n\nCopy the characters of a cesu-8 encoded substring into a specified buffer.\nThe '\\0' character could occur in character buffer. Returns 0, if the value\nparameter is not a string. It will extract the substring between the\nspecified start position and the end position (or the end of the string,\nwhichever comes first).\n\n*Note*: Does not put '\\0' to the end of string, the return value identifies\nthe number of valid bytes in the output buffer.\n\n**Prototype**\n\n```c\njerry_size_t\njerry_substring_to_char_buffer (const jerry_value_t value,\n                                jerry_length_t start_pos,\n                                jerry_length_t end_pos,\n                                jerry_char_t *buffer_p,\n                                jerry_size_t buffer_size);\n```\n\n- `value` - input string value\n- `start_pos` - position of the first character\n- `end_pos` - position of the last character\n- `buffer_p` - pointer to output buffer\n- `buffer_size` - size of the buffer\n- return value - number of bytes, actually copied to the buffer\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_size_t req_sz = jerry_get_string_size (value);\n  jerry_char_t str_buf_p[req_sz];\n  jerry_length_t start_pos = 0;\n  jerry_length_t end_pos = jerry_get_string_length (value);\n\n  jerry_substring_to_char_buffer (value, start_pos, end_pos, str_buf_p, req_sz);\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_create_string](#jerry_create_string)\n- [jerry_get_string_size](#jerry_get_string_size)\n- [jerry_get_string_length](#jerry_get_string_length)\n- [jerry_is_valid_cesu8_string](#jerry_is_valid_cesu8_string)\n\n\n## jerry_substring_to_utf8_char_buffer\n\n**Summary**\n\nCopy the characters of an utf-8 encoded substring into a specified buffer.\nThe '\\0' character could occur in character buffer. Returns 0, if the value\nparameter is not a string. It will extract the substring between the specified\nstart position and the end position (or the end of the string, whichever\ncomes first).\n\n*Note*: Does not put '\\0' to the end of string, the return value identifies\nthe number of valid bytes in the output buffer.\n\n**Prototype**\n\n```c\njerry_size_t\njerry_substring_to_utf8_char_buffer (const jerry_value_t value,\n                                     jerry_length_t start_pos,\n                                     jerry_length_t end_pos,\n                                     jerry_char_t *buffer_p,\n                                     jerry_size_t buffer_size);\n```\n\n- `value` - input string value\n- `start_pos` - position of the first character\n- `end_pos` - position of the last character\n- `buffer_p` - pointer to output buffer\n- `buffer_size` - size of the buffer\n- return value - number of bytes, actually copied to the buffer\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_size_t req_sz = jerry_get_utf8_string_size (value);\n  jerry_char_t str_buf_p[req_sz];\n  jerry_length_t start_pos = 0;\n  jerry_length_t end_pos = jerry_get_utf8_string_length (value);\n\n  jerry_substring_to_utf8_char_buffer (value, start_pos, end_pos, str_buf_p, req_sz);\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_create_string_from_utf8](#jerry_create_string_from_utf8)\n- [jerry_get_utf8_string_size](#jerry_get_utf8_string_size)\n- [jerry_get_utf8_string_length](#jerry_get_utf8_string_length)\n- [jerry_is_valid_utf8_string](#jerry_is_valid_utf8_string)\n\n\n# Functions for array object values\n\n## jerry_get_array_length\n\n**Summary**\n\nGet length of an array object. Returns zero, if the given parameter is not an array object.\n\n**Prototype**\n\n```c\nuint32_t\njerry_get_array_length (const jerry_value_t value);\n```\n\n- `value` - input array value\n- return value - length of the given array\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  uint32_t len = jerry_get_array_length (value);\n\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_create_array](#jerry_create_array)\n\n\n# Converters of 'jerry_value_t'\n\nFunctions for converting API values to another value type.\n\n## jerry_value_to_boolean\n\n**Summary**\n\nCall ToBoolean operation on the api value.\n\n**Prototype**\n\n```c\nbool\njerry_value_to_boolean (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value\n  - true, if the logical value is true\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  bool b = jerry_value_to_boolean (value);\n\n  jerry_release_value (value);\n}\n\n```\n\n**See also**\n\n- [jerry_value_to_primitive](#jerry_value_to_primitive)\n\n## jerry_value_to_number\n\n**Summary**\n\nCall ToNumber operation on the api value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_value_to_number (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value\n  - converted number value, if success\n  - thrown error, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t number_value = jerry_value_to_number (value);\n\n  jerry_release_value (number_value);\n  jerry_release_value (value);\n}\n\n```\n\n**See also**\n\n- [jerry_value_to_primitive](#jerry_value_to_primitive)\n\n## jerry_value_to_object\n\n**Summary**\n\nCall ToObject operation on the api value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_value_to_object (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value\n  - converted object value, if success\n  - thrown error, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t object_value = jerry_value_to_object (value);\n\n  jerry_release_value (object_value);\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_value_to_primitive](#jerry_value_to_primitive)\n\n## jerry_value_to_primitive\n\n**Summary**\n\nCall ToPrimitive operation on the api value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_value_to_primitive (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value\n  - converted primitive value, if success\n  - thrown error, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t prim_value = jerry_value_to_primitive (value);\n\n  jerry_release_value (prim_value);\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_value_t](#jerry_value_t)\n\n## jerry_value_to_string\n\n**Summary**\n\nCall the ToString ecma builtin operation on the api value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_value_to_string (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value\n  - converted string value, if success\n  - thrown error, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t string_value = jerry_value_to_string (value);\n\n  jerry_release_value (string_value);\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_value_to_primitive](#jerry_value_to_primitive)\n\n\n## jerry_value_to_bigint\n\n**Summary**\n\nCall the BigInt constructor ecma builtin operation on the api value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_value_to_bigint (const jerry_value_t value);\n```\n\n- `value` - api value\n- return value\n  - converted BigInt value, if success\n  - thrown error, otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t bigint_value = jerry_value_to_bigint (value);\n\n  jerry_release_value (bigint_value);\n  jerry_release_value (value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_value_is_bigint](#jerry_value_is_bigint)\n- [jerry_get_bigint_digits](#jerry_get_bigint_digits)\n\n## jerry_value_as_integer\n\n**Summary**\n\nConvert any number to integer number. Returns 0 if value is not number.\nBased on ECMA 262 v11 7.1.5\n\n**Prototype**\n\n```c\ndouble\njerry_value_as_integer (const jerry_value_t value);\n```\n\n- `value` - api value\n- return\n  - 0, if value is not a number\n  - integer representation of the number, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t number_val = jerry_create_number (123321);\n  double number = jerry_value_as_integer (number_val);\n  jerry_release_value (number_val);\n}\n```\n\n## jerry_value_as_int32\n\n**Summary**\n\nConvert any number to int32 number. Returns 0 if value is not number.\nBased on ECMA 262 v11 7.1.6\n\n**Prototype**\n\n```c\nint32_t\njerry_value_as_int32 (const jerry_value_t value);\n```\n\n- `value` - api value\n- return\n  - 0, if value is not a number\n  - int32 representation of the number, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t number_val = jerry_create_number (123321);\n  int32_t number = jerry_value_as_int32 (number_val);\n  jerry_release_value (number_val);\n}\n```\n\n## jerry_value_as_uint32\n\n**Summary**\n\nConvert any number to uint32 number. Returns 0 if value is not number.\nBased on ECMA 262 v11 7.1.7\n\n**Prototype**\n\n```c\nuint32_t\njerry_value_as_uint32 (const jerry_value_t value);\n```\n\n- `value` - api value\n- return\n  - 0, if value is not a number\n  - uint32 representation of the number, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t number_val = jerry_create_number (123321);\n  uint32_t number = jerry_value_as_uint32 (number_val);\n  jerry_release_value (number_val);\n}\n```\n\n# Functions for promise objects\n\nThese APIs all depend on the es.next profile (or on some build options).\n\n## jerry_get_promise_result\n\n**Summary**\n\nThe function returns the result of a Promise object.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked\n  in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_promise_result (const jerry_value_t promise);\n```\n\n- `promise` - the input Promise object.\n- return\n  - The result of the Promise.\n  - If the Promise is not resolved yet the result is the 'undefined' value.\n  - A TypeError is returned if the input argument was not a Promise object or\n    the Promise support was not built into the library.\n\n*New in version 2.2*.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include <jerryscript.h>\n\nstatic void\nexample (void)\n{\n  // acquire/create a promise object.\n  jerry_value_t promise = jerry_create_promise ();\n  {\n    // prepare the argumnent for the resolve or reject.\n    jerry_value_t argument = jerry_create_number (33);\n\n    jerry_value_t is_ok = jerry_resolve_or_reject_promise (promise,\n                                                           argument,\n                                                           true);\n    // 'is_ok' should be checked if it is an error or not.\n    // skipped in this example\n    jerry_release_value (is_ok);\n    jerry_release_value (argument);\n  }\n\n  jerry_value_t promise_result = jerry_get_promise_result (promise);\n  // 'promise_result' is now the number 33.\n\n  jerry_release_value (promise_result);\n  jerry_release_value (promise);\n}\n```\n\n**See also**\n\n- [jerry_create_promise](#jerry_create_promise)\n- [jerry_promise_state_t](#jerry_promise_state_t)\n\n## jerry_get_promise_state\n\n**Summary**\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked\n  in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n\n**Prototype**\n\n```c\njerry_promise_state_t\njerry_get_promise_state (const jerry_value_t promise);\n```\n\n- `promise` - the input promise object.\n- return\n  - [jerry_promise_state_t](#jerry_promise_state_t)\n  - `JERRY_PROMISE_STATE_NONE` is returned if the input argument was not a promise object or\n    the Promise support was not built into the library.\n\n*New in version 2.2*.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include <jerryscript.h>\n\nstatic void\nexample (void)\n{\n  // acquire/create a promise object.\n  jerry_value_t promise = jerry_create_promise ();\n\n  jerry_promise_state_t start_state = jerry_get_promise_state (promise);\n  // a Promise have a default state of JERRY_PROMISE_STATE_PENDING\n\n  {\n    // prepare the argumnent for the resolve or reject.\n    jerry_value_t argument = jerry_create_number (33);\n\n    jerry_value_t is_ok = jerry_resolve_or_reject_promise (promise,\n                                                           argument,\n                                                           true);\n    // 'is_ok' should be checked if it is an error or not.\n    // skipped in this example\n    jerry_release_value (is_ok);\n    jerry_release_value (argument);\n  }\n\n  jerry_promise_state_t current_state = jerry_get_promise_state (promise);\n  // at this point the Promise should be in the JERRY_PROMISE_STATE_FULFILLED state.\n\n  jerry_release_value (promise);\n}\n```\n\n**See also**\n\n- [jerry_create_promise](#jerry_create_promise)\n- [jerry_promise_state_t](#jerry_promise_state_t)\n\n## jerry_from_property_descriptor\n\n**Summary**\n\nThis API function is equivalent to FromPropertyDescriptor operation defined in ECMA 262 v11 6.2.5.4.\nIt returns with an ECMAScript Object which represents the property attributes.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_from_property_descriptor (const jerry_property_descriptor_t *src_prop_desc_p)\n```\n\n- `src_prop_desc_p` - the input property descriptor.\n- return\n  - [jerry_value_t](#jerry_value_t)\n  - jerry value - if success\n  - value marked with error flag - otherwise\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include <jerryscript.h>\n\nstatic void\nexample (void)\n{\n  jerry_value_t prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"value\");\n\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n\n  prop_desc.value = prop_name;\n  prop_desc.is_value_defined = true;\n\n  jerry_value_t from_object = jerry_from_property_descriptor (&prop_desc);\n\n  jerry_release_value (prop_name);\n  jerry_release_value (from_object);\n  jerry_free_property_descriptor_fields (&prop_desc);\n}\n```\n\n## jerry_to_property_descriptor\n\n**Summary**\n\nThis API function is equivalent to ToPropertyDescriptor operation defined in ECMA 262 v11 6.2.5.5.\nIt decodes the ECMAScript object and fills the fields of a JerryScript property descriptor.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_to_property_descriptor (jerry_value_t obj_value, jerry_property_descriptor_t *out_prop_desc_p);\n```\n\n- `obj_value` - the input object\n- `src_prop_desc_p` - the output property descriptor.\n- return\n  - [jerry_value_t](#jerry_value_t)\n  - true, if success\n  - thrown error, otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include <jerryscript.h>\n\nstatic void\nexample (void)\n{\n  jerry_value_t object = jerry_create_object ();\n  jerry_value_t prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"value\");\n  jerry_value_t value = jerry_create_boolean (true);\n  jerry_property_descriptor_t prop_desc;\n\n  jerry_release_value (jerry_set_property (object, prop_name, prop_name));\n\n  jerry_release_value (jerry_to_property_descriptor (object, &prop_desc));\n\n  jerry_release_value (object);\n  jerry_release_value (prop_name);\n  jerry_release_value (value);\n  jerry_free_property_descriptor_fields (&prop_desc);\n}\n```\n\n## jerry_resolve_or_reject_promise\n\n**Summary**\n\nResolve or reject the promise with an argument.\n\n*Note*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked\n  in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n\n**Prototype**\n\n```c\njerry_value_t\njerry_resolve_or_reject_promise (jerry_value_t promise,\n                                 jerry_value_t argument,\n                                 bool is_resolve)\n```\n\n- `promise` - the promise value\n- `argument` - the argument for resolve or reject\n- `is_resolve` - whether the promise should be resolved or rejected\n- return value\n  - undefined jerry value - resolve or reject successed\n  - jerry value with error flag - otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t promise = ... // acquire/create a promise object.\n\n  ...\n\n  bool is_resolve = ... // whether the promise should be resolved or rejected\n  jerry_value_t argument = ... // prepare the argumnent for the resolve or reject.\n\n  jerry_value_t is_ok = jerry_resolve_or_reject_promise (promise,\n                                                         argument,\n                                                         is_resolve);\n\n  if (jerry_value_is_error (is_ok))\n  {\n    // handle the error.\n  }\n\n  jerry_release_value (is_ok);\n  jerry_release_value (argument);\n  jerry_release_value (promise);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_value_is_error](#jerry_value_is_error)\n\n# Functions for symbols\n\nThese APIs all depend on the es.next profile (or on build options).\n\n## jerry_get_well_known_symbol\n\n**Summary**\n\nGet the well-known symbol corresponding to the given [well-known symbol id](#jerry_well_known_symbol_t).\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked\n  in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n- If the symbol support is not enabled an undefined will be returned.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_well_known_symbol (jerry_well_known_symbol_t symbol);\n```\n\n- `symbol` - [jerry_well_known_symbol_t](#jerry_well_known_symbol_t) enum value\n- return value\n  - undefined value - if invalid well-known symbol was requested\n  - well-known symbol value, otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t array_value = jerry_create_array (5);\n  jerry_value_t symbol_iterator = jerry_get_well_known_symbol (JERRY_SYMBOL_ITERATOR);\n  jerry_value_t array_iterator = jerry_get_property (array_value, symbol_iterator);\n\n  // usage of array_iterator\n\n  jerry_release_value (array_iterator);\n  jerry_release_value (symbol_iterator);\n  jerry_release_value (array_value);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_well_known_symbol_t](#jerry_well_known_symbol_t)\n\n## jerry_get_symbol_description\n\n**Summary**\n\nReturns with the `[[Description]]` internal property of a symbol value.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked\n  in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n- If the symbol support is not enabled an error will be returned.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_symbol_description (const jerry_value_t value);\n```\n\n- `value` - symbol value\n- return value\n  - string or undefined value containing the symbol's description - if success\n  - thrown error, otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t string_value = jerry_create_string ((const jerry_char_t *) \"foo\");\n  jerry_value_t symbol_value = jerry_create_symbol (string_value);\n\n  jerry_release_value (string_value);\n\n  jerry_value_t symbol_description = jerry_get_symbol_description (symbol_value);\n\n  // usage of symbol_desc_string\n\n  jerry_release_value (symbol_description);\n  jerry_release_value (symbol_value);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_get_symbol_descriptive_string](#jerry_get_symbol_descriptive_string)\n\n## jerry_get_symbol_descriptive_string\n\n**Summary**\n\nCall the SymbolDescriptiveString ecma builtin operation on the API value.\nBased on ECMA 262 v6 19.4.3.2.1 this is in the form of `Symbol(<description>)`.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked\n  in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n- If the symbol support is not enabled an error will be returned.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_symbol_descriptive_string (const jerry_value_t value);\n```\n\n- `value` - symbol value\n- return value\n  - string value containing the symbol's descriptive string - if success\n  - thrown error, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t string_value = jerry_create_string ((const jerry_char_t *) \"foo\");\n  jerry_value_t symbol_value = jerry_create_symbol (string_value);\n\n  jerry_release_value (string_value);\n\n  jerry_value_t symbol_desc_string = jerry_get_symbol_descriptive_string (symbol_value);\n\n  // usage of symbol_desc_string\n\n  jerry_release_value (symbol_desc_string);\n  jerry_release_value (symbol_value);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_get_symbol_description](#jerry_get_symbol_description)\n\n# Functions for BigInts\n\nThese APIs all depend on build option (`JERRY_BUILTIN_BIGINT`).\n\n## jerry_get_bigint_size_in_digits\n\n**Summary**\n\nReturns the size of uint64 digits of a BigInt value. This value is the\nminimum size of the buffer which can hold all digits of a BigInt value when\nthe digits are retreived by `[jerry_get_bigint_digits](#jerry_get_bigint_digits)`.\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_BIGINT`) and can be checked\n  in runtime with the `JERRY_FEATURE_BIGINT` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n\n**Prototype**\n\n```c\nuint32_t\njerry_get_bigint_size_in_digits (jerry_value_t value)\n```\n\n- `value` - BigInt value\n- return value\n  - number of digits (can be zero for BigInt zero)\n  - if value is not a BigInt value, it returns with zero\n\n*New in version 2.4*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  uint64_t digits[4] = { 0x1, 0x1, 0x0, 0x0 };\n  jerry_value_t bigint_value = jerry_create_bigint (digits, 4, true);\n\n  /* Prints two, because the leading zeroes in digits buffer are discarded. */\n  printf(\"size: %d\\n\", (int) jerry_get_bigint_size_in_digits (bigint_value));\n\n  jerry_release_value (bigint_value);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_value_is_bigint](#jerry_value_is_bigint)\n- [jerry_get_bigint_digits](#jerry_get_bigint_digits)\n\n\n## jerry_get_bigint_digits\n\n**Summary**\n\nCopies the uint64 digits of a BigInt value into a buffer. This function supports any\nbuffer sizes. If the buffer size is smaller than the size returned by\n`[jerry_get_bigint_size_in_digits](#jerry_get_bigint_size_in_digits)`, only the\nleast significant digits are copied into the buffer. If the buffer size is greater,\nthe unused digits are filled with zero.\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_BIGINT`) and can be checked\n  in runtime with the `JERRY_FEATURE_BIGINT` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n\n**Prototype**\n\n```c\nvoid\njerry_get_bigint_digits (jerry_value_t value, uint64_t *digits_p, uint32_t size, bool *sign_p)\n```\n\n- `value` - BigInt value\n- `digits_p` - output buffer for digits\n- `size` - size of the output buffer\n- `sign_p` - the boolean passed to the function is set to false when the BigInt\n             is positive, and set to true otherwise (this parameter can be NULL)\n\n*New in version 2.4*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  uint64_t digits[4] = { 0x1, 0x1, 0x0, 0x0 };\n  jerry_value_t bigint_value = jerry_create_bigint (digits, 4, true);\n\n  uint64_t get_digits[4];\n  bool sign;\n  jerry_get_bigint_digits (bigint_value, get_digits, 2, &sign);\n\n  jerry_release_value (bigint_value);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_value_is_bigint](#jerry_value_is_bigint)\n- [jerry_get_bigint_size_in_digits](#jerry_get_bigint_size_in_digits)\n\n\n# Functions for Proxy objects\n\nThese APIs all depend on build option (`JERRY_BUILTIN_PROXY`).\n\n## jerry_get_proxy_target\n\n**Summary**\n\nGets the target object of a Proxy object\n\n*Notes*:\n- This API depends on a build option (`JERRY_BUILTIN_PROXY`) and can be checked\n  in runtime with the `JERRY_FEATURE_PROXY` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_proxy_target (jerry_value_t proxy_value)\n```\n\n- `proxy_value` - Proxy object value\n- return value\n  - type error - if proxy_value is not a Proxy object\n  - target object - otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  jerry_value_t target = jerry_create_object ();\n  jerry_value_t handler = jerry_create_object ();\n  jerry_value_t proxy = jerry_create_proxy (target, handler);\n\n  jerry_release_value (target);\n  jerry_release_value (handler);\n\n  target = jerry_get_proxy_target (proxy);\n\n  // ... usage of the target\n\n  jerry_release_value (target);\n  jerry_release_value (proxy);\n}\n```\n\n**See also**\n\n- [jerry_create_proxy](#jerry_create_proxy)\n\n\n# Acquire and release API values\n\n## jerry_acquire_value\n\n**Summary**\n\nAcquires the specified Jerry API value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_acquire_value (jerry_value_t value);\n```\n\n- `value` - api value\n- return value - acquired value that may be used outside of the engine\n\n**Example**\n\n```c\n{\n  jerry_value_t object_value = jerry_create_object ();\n\n  jerry_value_t acquired_object = jerry_acquire_value (object_value);\n\n  jerry_release_value (object_value);\n\n  // acquired_object refers to the created object and makes it\n  // available after the release of 'object_value'\n\n  jerry_release_value (acquired_object);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_value_t](#jerry_value_t)\n\n\n## jerry_release_value\n\n**Summary**\n\nRelease specified Jerry API value.\n\n**Prototype**\n\n```c\nvoid\njerry_release_value (jerry_value_t value);\n```\n\n- `value` - api value\n\n**Example**\n\n```c\n{\n  jerry_value_t object_value = jerry_create_object ();\n\n  ...\n\n  jerry_release_value (object_value);\n}\n```\n\n\n# Create API values\n\nFunction for creating [API values](#jerry_value_t).\n\n*Note*: Every created API value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n## jerry_create_array\n\n**Summary**\n\nCreate an array object value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_array (uint32_t size);\n```\n\n - `size` - size of array;\n - return value - value of the constructed array object\n\n **Example**\n\n```c\n{\n    jerry_value_t array = jerry_create_array (10);\n\n    ...\n\n    jerry_release_value (array);\n}\n```\n\n**See also**\n\n- [jerry_set_property_by_index](#jerry_set_property_by_index)\n- [jerry_get_property_by_index](#jerry_get_property_by_index)\n\n\n## jerry_create_arraybuffer\n\n**Summary**\n\nCreate a jerry_value_t representing an ArrayBuffer object.\n\n*Note*:\n  - This API depends on the es.next profile.\n  - Returned value must be freed with [jerry_release_value](#jerry_release_value)\n    when it is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_arraybuffer (jerry_length_t size);\n```\n\n - `size` - size of the ArrayBuffer to create **in bytes**\n - return value - the new ArrayBuffer as a `jerry_value_t`\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t buffer_value = jerry_create_arraybuffer (15);\n\n  ... // use the ArrayBuffer\n\n  jerry_release_value (buffer_value);\n}\n```\n\n**See also**\n\n- [jerry_arraybuffer_read](#jerry_arraybuffer_read)\n- [jerry_arraybuffer_write](#jerry_arraybuffer_write)\n- [jerry_value_is_arraybuffer](#jerry_value_is_arraybuffer)\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_arraybuffer_external\n\n**Summary**\n\nCreates a jerry_value_t representing an ArrayBuffer object with\nuser specified back-buffer.\n\nUser must pass a buffer pointer which is at least `size` big.\nAfter the object is not needed the GC will call the `free_cb`\nso the user can release the buffer which was provided.\n\n*Note*:\n  - This API depends on the es.next profile.\n  - Returned value must be freed with [jerry_release_value](#jerry_release_value)\n    when it is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_arraybuffer_external (const jerry_length_t size\n                                   uint8_t *buffer_p,\n                                   jerry_object_native_free_callback_t free_cb);\n```\n\n- `size` - size of the buffer to use **in bytes** (should not be 0)\n- `buffer_p` - the buffer used for the Array Buffer object (should not be a null pointer)\n- `free_cb` - the callback function called when the object is released\n- return value\n  - the new ArrayBuffer as a `jerry_value_t`\n  - if the `size` is zero or `buffer_p` is a null pointer this will return an empty ArrayBuffer.\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  uint8_t buffer_p[15];\n  jerry_value_t buffer_value = jerry_create_arraybuffer_external (15, buffer_p, NULL);\n\n  ... // use the array buffer\n\n  jerry_release_value (buffer_value);\n}\n```\n\n**See also**\n\n- [jerry_get_arraybuffer_pointer](#jerry_get_arraybuffer_pointer)\n- [jerry_arraybuffer_read](#jerry_arraybuffer_read)\n- [jerry_arraybuffer_write](#jerry_arraybuffer_write)\n- [jerry_value_is_arraybuffer](#jerry_value_is_arraybuffer)\n- [jerry_release_value](#jerry_release_value)\n- [jerry_object_native_free_callback_t](#jerry_object_native_free_callback_t)\n\n\n## jerry_create_boolean\n\n**Summary**\n\nCreate a jerry_value_t representing a boolean value from the given boolean parameter.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_boolean (bool value);\n```\n\n- `value` - raw boolean value.\n- return value - a `jerry_value_t` created from the given boolean argument.\n\n**Example**\n\n```c\n{\n  jerry_value_t boolean_value = jerry_create_boolean (true);\n\n  ... // usage of the value\n\n  jerry_release_value (boolean_value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_error\n\n**Summary**\n\nCreate new JavaScript error object.\n\nImportant! The `error_type` argument *must not be* `JERRY_ERROR_NONE`.\nCreating an error with no error type is not valid.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_error (jerry_error_t error_type,\n                    const jerry_char_t *message_p);\n```\n\n- `error_type` - type of error\n- `message_p` - value of 'message' property of constructed error object\n- return value - value of the constructed error object\n\n**Example**\n\n```c\n{\n  jerry_value_t error_obj = jerry_create_error (JERRY_ERROR_TYPE,\n                                                (const jerry_char_t *) \"error\");\n\n  ... // usage of error_obj\n\n\n  jerry_release_value (error_obj);\n}\n```\n\n**See also**\n\n- [jerry_value_is_error](#jerry_value_is_error)\n- [jerry_get_value_from_error](#jerry_get_value_from_error)\n- [jerry_create_error_from_value](#jerry_create_error_from_value)\n\n\n## jerry_create_error_sz\n\n**Summary**\n\nCreate new JavaScript error object.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_error_sz (jerry_error_t error_type,\n                       const jerry_char_t *message_p,\n                       jerry_size_t message_size);\n```\n\n- `error_type` - type of the error\n- `message_p` - value of 'message' property of the constructed error object\n- `message_size` - size of the message in bytes\n- return value - value of the constructed error object\n\n**Example**\n\n```c\n{\n  const jerry_char_t message[] = \"error\";\n  jerry_value_t error_obj = jerry_create_error_sz (JERRY_ERROR_COMMON,\n                                                   message,\n                                                   sizeof (message) - 1);\n\n  ... // usage of error_obj\n\n  jerry_release_value (error_obj);\n}\n```\n\n**See also**\n\n- [jerry_create_error](#jerry_create_error)\n\n\n## jerry_create_dataview\n\n**Summary**\n\nCreate new JavaScript DataView object.\n\n*Note*:\n  - This API depends on the es.next profile.\n  - Returned value must be freed with [jerry_release_value](#jerry_release_value)\n    when it is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_dataview (const jerry_value_t array_buffer,\n                       const jerry_length_t byte_offset,\n                       const jerry_length_t byte_length)\n```\n\n- `array_buffer` - arrayBuffer to create DataView from\n- `byte_offset` - offset in bytes, to the first byte in the buffer\n- `byte_length` - number of elements in the byte array\n- return value\n  - value of the constructed DataView object - if success\n  - created error - otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t arraybuffer = jerry_create_arraybuffer (16);\n  jerry_value_t dataview = jerry_create_dataview (arraybuffer, 0, 16);\n\n  // usage of dataview\n\n  jerry_release_value (dataview);\n  jerry_release_value (arraybuffer);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_value_is_dataview](#jerry_value_is_dataview)\n- [jerry_create_arraybuffer](#jerry_create_arraybuffer)\n\n\n## jerry_create_external_function\n\n**Summary**\n\nCreate an external function object.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_external_function (jerry_external_handler_t handler_p);\n```\n\n- `handler_p` - pointer to native handler of the function object\n- return value - value of the constructed function object\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include \"jerryscript.h\"\n\nstatic jerry_value_t\nhandler (const jerry_value_t function_obj,\n         const jerry_value_t this_val,\n         const jerry_value_t args_p[],\n         const jerry_length_t args_cnt)\n{\n  printf (\"native handler called!\\n\");\n\n  return jerry_create_boolean (true);\n}\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t func_val = jerry_create_external_function (handler);\n  jerry_value_t glob_obj = jerry_get_global_object ();\n\n  // after this, script can invoke the native handler through \"handler_field (1, 2, 3);\"\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"handler_field\");\n  // set property and release the return value without any check\n  jerry_release_value (jerry_set_property (glob_obj, prop_name, func_val));\n  jerry_release_value (prop_name);\n\n  jerry_release_value (func_val);\n  jerry_release_value (glob_obj);\n\n  // Test the method by calling it\n  const char *test_src = \"handler_field ();\";\n  jerry_value_t ret_val = jerry_eval ((const jerry_char_t *) test_src,\n                                      strlen (test_src),\n                                      JERRY_PARSE_NO_OPTS);\n  // release the eval result\n  jerry_release_value (ret_val);\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_external_handler_t](#jerry_external_handler_t)\n- [jerry_set_property](#jerry_set_property)\n- [jerry_call_function](#jerry_call_function)\n\n\n## jerry_create_number\n\n**Summary**\n\nCreates a `jerry_value_t` representing a number value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_number (double value);\n```\n\n- `value` - double value from which a `jerry_value_t` will be created\n- return value - a `jerry_value_t` created from the given double argument\n\n**Example**\n\n```c\n{\n  jerry_value_t number_value = jerry_create_number (3.14);\n\n  ... // usage of the value\n\n  jerry_release_value (number_value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_create_number_infinity](#jerry_create_number_infinity)\n- [jerry_create_number_nan](#jerry_create_number_nan)\n\n\n## jerry_create_number_infinity\n\n**Summary**\n\nCreates a `jerry_value_t` representing a positive or negative infinity value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_number_infinity (bool sign);\n```\n\n- `sign` - true for negative Infinity and false for positive Infinity\n- return value - a `jerry_value_t` representing the infinity value\n\n**Example**\n\n```c\n{\n  jerry_value_t positive_inf_value = jerry_create_number_infinity (false);\n\n  ... // usage of the positive_inf_value\n\n  jerry_release_value (positive_inf_value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_create_number](#jerry_create_number)\n- [jerry_create_number_nan](#jerry_create_number_nan)\n\n\n## jerry_create_number_nan\n\n**Summary**\n\nCreates a `jerry_value_t` representing a not-a-number value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_number_nan (void);\n```\n\n- return value - a `jerry_value_t` representing the not-a-number value\n\n**Example**\n\n```c\n{\n  jerry_value_t nan_value = jerry_create_number_nan ();\n\n  ... // usage of the nan_value\n\n  jerry_release_value (nan_value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_create_number](#jerry_create_number)\n- [jerry_create_number_infinity](#jerry_create_number_infinity)\n\n\n## jerry_create_null\n\n**Summary**\n\nCreates and returns a `jerry_value_t` with type null object.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_null (void);\n```\n\n- return value - a `jerry_value_t` representing null.\n\n**Example**\n\n```c\n{\n  jerry_value_t null_value = jerry_create_null ();\n\n  ... // usage of the value\n\n  jerry_release_value (null_value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_object\n\n**Summary**\n\nCreate new JavaScript object, like with new Object().\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_object (void);\n```\n\n- return value - value of the created object\n\n**Example**\n\n```c\n{\n  jerry_value_t object_value = jerry_create_object ();\n\n  ... // usage of object_value\n\n  jerry_release_value (object_value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_promise\n\n**Summary**\n\nCreate an empty promise object which can be resolved or rejected later\nby calling jerry_resolve_or_reject_promise.\n\n*Note*:\n  - This API depends on the es.next profile.\n  - Returned value must be freed with [jerry_release_value](#jerry_release_value)\n    when it is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_promise (void)\n```\n\n- return value - value of the newly created promise\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t p = jerry_create_promise ();\n\n  ...// usage of the promise\n\n  jerry_release_value (p);\n}\n```\n\n**See also**\n\n- [jerry_resolve_or_reject_promise](#jerry_resolve_or_reject_promise)\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_proxy\n\n**Summary**\n\nCreate a new Proxy object with the given target and handler.\n\n*Note*:\n  - This API depends on the es.next profile.\n  - Returned value must be freed with [jerry_release_value](#jerry_release_value)\n    when it is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_proxy (const jerry_value_t target,\n                    const jerry_value_t handler)\n```\n\n- `target` - proxy target\n- `handler` - proxy handler\n- return thrown error - if the Proxy construction fails\n         value of the newly created proxy object - otherwise\n\n**Example**\n\n*New in version 2.3*.\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t target = jerry_create_object ();\n  jerry_value_t handler = jerry_create_object ();\n  jerry_value_t proxy = jerry_create_proxy (target, handler);\n\n  jerry_release_value (target);\n  jerry_release_value (handler);\n\n  // usage of the proxy\n\n  jerry_release_value (proxy);\n\n  jerry_cleanup ();\n}\n```\n\n**See also**\n\n- [jerry_value_is_proxy](#jerry_value_is_proxy)\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_string\n\n**Summary**\n\nCreate string from a valid CESU8 string.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_string (const jerry_char_t *str_p);\n```\n\n- `str_p` - non-null pointer to string\n- return value - value of the created string\n\n**Example**\n\n```c\n{\n  const jerry_char_t char_array[] = \"a string\";\n  jerry_value_t string_value  = jerry_create_string (char_array);\n\n  ... // usage of string_value\n\n  jerry_release_value (string_value);\n}\n```\n\n**See also**\n\n- [jerry_is_valid_cesu8_string](#jerry_is_valid_cesu8_string)\n- [jerry_create_string_sz](#jerry_create_string_sz)\n\n\n## jerry_create_string_sz\n\n**Summary**\n\nCreate string from a valid CESU8 string.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_string_sz (const jerry_char_t *str_p,\n                        jerry_size_t str_size)\n```\n\n- `str_p` - non-null pointer to string\n- `str_size` - size of the string\n- return value - value of the created string\n\n**Example**\n\n```c\n{\n  const jerry_char_t char_array[] = \"a string\";\n  jerry_value_t string_value  = jerry_create_string_sz (char_array,\n                                                        sizeof (char_array) - 1);\n\n  ... // usage of string_value\n\n  jerry_release_value (string_value);\n}\n\n```\n\n**See also**\n\n- [jerry_is_valid_cesu8_string](#jerry_is_valid_cesu8_string)\n- [jerry_create_string](#jerry_create_string)\n\n\n## jerry_create_string_from_utf8\n\n**Summary**\n\nCreate string from a valid UTF8 string.\n\n*Note*:\n - The difference from [jerry_create_string](#jerry_create_string) is that it accepts utf-8 string instead of cesu-8 string.\n - Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_string_from_utf8 (const jerry_char_t *str_p);\n```\n\n- `str_p` - non-null pointer to string\n- return value - value of the created string\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  const jerry_char_t char_array[] = \"a string\";\n  jerry_value_t string_value  = jerry_create_string_from_utf8 (char_array);\n\n  ... // usage of string_value\n\n  jerry_release_value (string_value);\n}\n```\n\n**See also**\n\n- [jerry_is_valid_utf8_string](#jerry_is_valid_utf8_string)\n- [jerry_create_string_sz_from_utf8](#jerry_create_string_sz_from_utf8)\n\n\n## jerry_create_string_sz_from_utf8\n\n**Summary**\n\nCreate string from a valid UTF8 string.\n\n*Note*:\n - The difference from [jerry_create_string_sz](#jerry_create_string_sz) is that it accepts utf-8 string instead of cesu-8 string.\n - Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_string_sz_from_utf8 (const jerry_char_t *str_p,\n                                  jerry_size_t str_size)\n```\n\n- `str_p` - non-null pointer to string\n- `str_size` - size of the string\n- return value - value of the created string\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  const jerry_char_t char_array[] = \"a string\";\n  jerry_value_t string_value  = jerry_create_string_sz_from_utf8 (char_array,\n                                                                  sizeof (char_array) - 1);\n\n  ... // usage of string_value\n\n  jerry_release_value (string_value);\n}\n\n```\n\n**See also**\n\n- [jerry_is_valid_utf8_string](#jerry_is_valid_utf8_string)\n- [jerry_create_string_from_utf8](#jerry_create_string_from_utf8)\n\n\n## jerry_create_external_string\n\n**Summary**\n\nCreate an external string from a valid CESU8 string. The string buffer passed to the function\nshould not be modified until the free callback is called. This function can be used to avoid\nthe duplication of large strings.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_external_string (const jerry_char_t *str_p,\n                              jerry_object_native_free_callback_t free_cb)\n```\n\n- `str_p` - non-null pointer to string\n- `free_cb` - optional callback which is called right before the string is freed\n- return value - value of the created string\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  const char* string_p = \"a large and immutable string: this is a story about ....\";\n  jerry_value_t string_value  = jerry_create_external_string ((const jerry_char_t *) string_p,\n                                                              NULL);\n\n  ... // usage of string_value\n\n  jerry_release_value (string_value);\n}\n```\n\n**See also**\n\n- [jerry_is_valid_cesu8_string](#jerry_is_valid_cesu8_string)\n- [jerry_create_external_string_sz](#jerry_create_external_string_sz)\n\n\n## jerry_create_external_string_sz\n\n**Summary**\n\nCreate an external string from a valid CESU8 string. The string buffer passed to the function\nshould not be modified until the free callback is called. This function can be used to avoid\nthe duplication of large strings.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_external_string_sz (const jerry_char_t *str_p,\n                                 jerry_size_t str_size,\n                                 jerry_object_native_free_callback_t free_cb)\n```\n\n- `str_p` - non-null pointer to string\n- `str_size` - size of the string\n- `free_cb` - optional callback which is called right before the string is freed\n- return value - value of the created string\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  const char* string_p = \"a large and immutable string: this is a story about ....\";\n  jerry_value_t string_value  = jerry_create_external_string_sz ((const jerry_char_t *) string_p,\n                                                                 strlen (string_p),\n                                                                 NULL);\n\n  ... // usage of string_value\n\n  jerry_release_value (string_value);\n}\n\n```\n\n**See also**\n\n- [jerry_is_valid_cesu8_string](#jerry_is_valid_cesu8_string)\n- [jerry_create_external_string](#jerry_create_external_string)\n\n\n## jerry_create_symbol\n\n**Summary**\n\nCreate symbol from an API value.\n\n*Note*:\n  - The given argument is converted to string. This operation can throw an error.\n  - This API depends on the es.next profile.\n  - Returned value must be freed with [jerry_release_value](#jerry_release_value)\n    when it is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_symbol (const jerry_value_t value)\n```\n\n- `value` - API value\n- return value\n  - value of the created symbol, if success\n  - thrown error, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t string_value = jerry_create_string ((const jerry_char_t *) \"Symbol description string\");\n  jerry_value_t symbol_value = jerry_create_symbol (string_value);\n\n  // The description value is no longer needed\n  jerry_release_value (string_value);\n\n  // usage of symbol_value\n\n  jerry_release_value (symbol_value);\n\n  jerry_cleanup ();\n}\n```\n\n**See also**\n\n- [jerry_value_is_symbol](#jerry_value_is_symbol)\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_bigint\n\n**Summary**\n\nCreate BigInt value from uint64 digits\n\n*Note*:\n- This API depends on a build option (`JERRY_BUILTIN_BIGINT`) and can be checked\n  in runtime with the `JERRY_FEATURE_BIGINT` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- Returned value must be freed with [jerry_release_value](#jerry_release_value)\n  when it is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_bigint (const uint64_t *digits_p, uint32_t size, bool sign)\n```\n\n- `digits_p` - array of uint64 digits, least significant digit first\n- `size` - size of the `digits_p` array\n- `sign` - false if the created value should be positive, and true if the created value should be negative\n- return value\n  - value of the created bigint, if success\n  - thrown error, otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  uint64_t digits[2] = { 0x1, 0x1 };\n  jerry_value_t bigint_value = jerry_create_bigint (digits, 2, true);\n\n  // usage of bigint_value\n\n  jerry_release_value (bigint_value);\n\n  jerry_cleanup ();\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n- [jerry_value_is_bigint](#jerry_value_is_bigint)\n- [jerry_get_bigint_digits](#jerry_get_bigint_digits)\n\n\n## jerry_create_regexp\n\n**Summary**\n\nReturns a `jerry_value_t` RegExp object or an error, if the construction of the object fails.\nOptional flags can be set using [jerry_regexp_flags_t](#jerry_regexp_flags_t).\nThese flags can be combined together with the binary OR operator or used on their own as enum values.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n```c\njerry_value_t\njerry_create_regexp (const jerry_char_t *pattern_p, uint16_t flags);\n```\n\n- `pattern_p` - the RegExp pattern as a zero-terminated UTF-8 string\n- `flags` - optional flags for the RegExp object, see [jerry_regexp_flags_t](#jerry_regexp_flags_t)\n- return value - the RegExp object as a `jerry_value_t`\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_char_t pattern_p = \"[cgt]gggtaaa|tttaccc[acg]\";\n  uint16_t pattern_flags = JERRY_REGEXP_FLAG_IGNORE_CASE;\n\n  jerry_value_t regexp = jerry_create_regexp (pattern_p, pattern_flags);\n\n  ...\n\n  jerry_release_value (regexp);\n}\n```\n\n\n## jerry_create_regexp_sz\n\n**Summary**\n\nReturns a `jerry_value_t` RegExp object or an error, if the construction of the object fails.\nOptional flags can be set using [jerry_regexp_flags_t](#jerry_regexp_flags_t).\nThese flags can be combined together with the binary OR operator or used on their own as enum values.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n```c\njerry_value_t\njerry_create_regexp_sz (const jerry_char_t *pattern_p, jerry_size_t pattern_size, uint16_t flags);\n```\n\n- `pattern_p` - the RegExp pattern as a zero-terminated UTF-8 string\n- `pattern_size` - size of the `pattern`\n- `flags` - optional flags for the RegExp object, see [jerry_regexp_flags_t](#jerry_regexp_flags_t)\n- return value - the RegExp object as a `jerry_value_t`\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_char_t pattern_p = \"[cgt]gggtaaa|tttaccc[acg]\";\n  jerry_size_t pattern_size = sizeof (pattern_p) - 1;\n  uint16_t pattern_flags = JERRY_REGEXP_FLAG_IGNORE_CASE;\n\n  jerry_value_t regexp = jerry_create_regexp_sz (pattern_p, pattern_size, pattern_flags);\n\n  ...\n\n  jerry_release_value (regexp);\n}\n```\n\n\n## jerry_create_typedarray\n\n**Summary**\n\nCreate a jerry_value_t representing an TypedArray object.\n\nFor the new object the type of the TypedArray (see: [jerry_typedarray_type_t](#jerry_typedarray_type_t))\nand element count can be specified.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value)\n  when it is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked\n  in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_typedarray (jerry_typedarray_type_t type_name, jerry_length_t item_count);\n```\n\n- `type_name` - type of TypedArray to create\n- `item_count` - number of items in the new TypedArray\n- return value - the new TypedArray as a `jerry_value_t`\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t array = jerry_create_typedarray (JERRY_TYPEDARRAY_UINT16, 15);\n\n  ... // use the TypedArray\n\n  jerry_release_value (array);\n}\n```\n\n**See also**\n\n- [jerry_typedarray_type_t](#jerry_typedarray_type_t)\n- [jerry_value_is_typedarray](#jerry_value_is_typedarray)\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_typedarray_for_arraybuffer\n\n**Summary**\n\nCreate a jerry_value_t representing an TypedArray object using\nan already existing ArrayBuffer object.\n\nFor the new object the type of the TypedArray (see: [jerry_typedarray_type_t](#jerry_typedarray_type_t))\nand element count can be specified.\n\nThe developer must ensure that the ArrayBuffer has the correct length for the given\ntype of TypedArray otherwise an error is generated.\n\nThe JavaScript equivalent of this function is: `new %TypedArray%(arraybuffer)` where `%TypedArray%` is\none of the allowed TypedArray functions.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value)\n  when it is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked\n  in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_typedarray_for_arraybuffer (jerry_typedarray_type_t type_name,\n                                         const jerry_value_t arraybuffer);\n```\n\n- `type_name` - type of TypedArray to create\n- `arraybuffer` - the ArrayBuffer to use for the new TypedArray\n- return value\n  - the new TypedArray as a `jerry_value_t`\n  - Error if the ArrayBuffer does not have enough space for the given type of TypedArray\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t buffer = jerry_create_array_buffer (12 * 2);\n  jerry_value_t array = jerry_create_typedarray_for_arraybuffer (JERRY_TYPEDARRAY_UINT16, buffer);\n  jerry_release_value (buffer);\n\n  ... // use the TypedArray\n\n  jerry_release_value (array);\n}\n```\n\n**See also**\n\n- [jerry_typedarray_type_t](#jerry_typedarray_type_t)\n- [jerry_value_is_typedarray](#jerry_value_is_typedarray)\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_typedarray_for_arraybuffer_sz\n\n**Summary**\n\nCreate a jerry_value_t representing an TypedArray object using\nan already existing ArrayBuffer object and by specifying the byteOffset, and length properties.\n\nFor the new object the type of the TypedArray (see: [jerry_typedarray_type_t](#jerry_typedarray_type_t))\nand element count can be specified.\n\nThe developer must ensure that the ArrayBuffer has the correct length for the given\ntype of TypedArray otherwise an error is generated.\n\nThe JavaScript equivalent of this function is: `new %TypedArray%(arraybuffer, byteOffset, length)` where `%TypedArray%` is\none of the allowed TypedArray functions.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value)\n  when it is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked\n  in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_typedarray_for_arraybuffer_sz (jerry_typedarray_type_t type_name,\n                                            const jerry_value_t arraybuffer,\n                                            jerry_length_t byte_offset,\n                                            jerry_length_t length);\n```\n\n- `type_name` - type of TypedArray to create\n- `arraybuffer` - the ArrayBuffer to use for the new TypedArray\n- `byte_offset` - start offset to use for the ArrayBuffer\n- `length` - number of elements to used from the ArrayBuffer (this is not the same as the byteLength)\n- return value\n  - the new TypedArray as a `jerry_value_t`\n  - Error if the ArrayBuffer does not have enough space for the given type of TypedArray\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t buffer = jerry_create_array_buffer (12 * 2);\n  jerry_value_t array = jerry_create_typedarray_for_arraybuffer_sz (JERRY_TYPEDARRAY_UINT16, buffer, 4, 10);\n  jerry_release_value (buffer);\n\n  ... // use the TypedArray\n\n  jerry_release_value (array);\n}\n```\n\n**See also**\n\n- [jerry_typedarray_type_t](#jerry_typedarray_type_t)\n- [jerry_value_is_typedarray](#jerry_value_is_typedarray)\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_container\n\n**Summary**\n\nCreate a jerry_value_t representing a given type container object.\n\n*Notes*:\n- This method is expected to work the same way as the JavaScript Map constructor.\n- Returned value must be freed with [jerry_release_value](#jerry_release_value)\n  when it is no longer needed.\n- This API depends on a build option (`JERRY_BUILTIN_CONTAINER`) and can be checked\n  in runtime with the `JERRY_FEATURE_MAP, JERRY_FEATURE_SET, JERRY_FEATURE_WEAKMAP, JERRY_FEATURE_WEAKSET`\n  feature enum values.\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n*New in version 2.3*.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_container (jerry_container_type_t container_type,\n                        const jerry_value_t *arguments_list_p,\n                        jerry_length_t arguments_list_len);\n```\n\n- `container_type` - Type of the container to be created, see `jerry_container_type_t`.\n- `arguments_list_p` - The arguments passed to the container constructor to be inserted to the container.\n- `arguments_list_len` - The length of the above arguments.\n- return value - the new container object as a `jerry_value_t`\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n  jerry_char_t src[] = \"[1,2,3,4].entries()\";\n  jerry_value_t iterable = jerry_eval (src, sizeof (src) - 1, JERRY_PARSE_NO_OPTS);\n\n  jerry_value_t map = jerry_create_container (JERRY_CONTAINER_TYPE_MAP, &iterable, 1);\n  jerry_release_value (iterable);\n\n  // use the Map\n\n  jerry_release_value (map);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_container_type_t](#jerry_container_type_t)\n- [jerry_get_container_type](#jerry_get_container_type)\n\n\n## jerry_create_undefined\n\n**Summary**\n\nCreates a `jerry_value_t` representing an undefined value.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_undefined (void);\n```\n\n- return value - value of undefined\n\n**Example**\n\n```c\n{\n  jerry_value_t undefined_value = jerry_create_undefined ();\n\n  ... // usage of the value\n\n  jerry_release_value (undefined_value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n## jerry_create_realm\n\n**Summary**\n\nCreates a `jerry_value_t` representing a new global object.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_create_realm (void);\n```\n\n- return value - realm object value\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  jerry_value_t realm_value = jerry_create_realm ();\n\n  ... // usage of the value\n\n  jerry_release_value (realm_value);\n}\n```\n\n**See also**\n\n- [jerry_release_value](#jerry_release_value)\n\n\n# General API functions of JS objects\n\n## jerry_has_property\n\n**Summary**\n\nChecks whether the object or its prototype objects have the given property.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_has_property (const jerry_value_t obj_val,\n                    const jerry_value_t prop_name_val);\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- return value - JavaScript value that evaluates to\n  -  raised error - if the operation fail\n  -  true/false API value  - depend on whether the property exists\n\n*Changed in version 2.0*: The return value type is now a JavaScript value and not a primitive boolean value.\n\n*Changed in version 2.3*: The return value can be an error value.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"handler_field\");\n\n  jerry_value_t has_prop_js = jerry_has_property (global_object, prop_name);\n  bool has_prop = jerry_get_boolean_value (has_prop_js);\n\n  jerry_release_value (has_prop_js);\n  jerry_release_value (prop_name);\n  jerry_release_value (global_object);\n\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_has_own_property](#jerry_has_own_property)\n- [jerry_delete_property](#jerry_delete_property)\n\n\n## jerry_has_own_property\n\n**Summary**\n\nChecks whether the object has the given property.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_has_own_property (const jerry_value_t obj_val,\n                        const jerry_value_t prop_name_val);\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- return value - JavaScript value that evaluates to\n  -  raised error - if the operation fails\n  -  true/false API value - depend on whether the property exists\n\n*Changed in version 2.0*: The return value type is now a JavaScript value and not a primitive boolean value.\n\n*Changed in version 2.3*: The return value can be an error value.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"handler_field\");\n\n  jerry_value_t has_prop_js = jerry_has_own_property (global_object, prop_name);\n  bool has_prop = jerry_get_boolean_value (has_prop_js);\n\n  jerry_release_value (has_prop_js);\n  jerry_release_value (prop_name);\n  jerry_release_value (global_object);\n\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_has_property](#jerry_has_property)\n- [jerry_delete_property](#jerry_delete_property)\n\n\n## jerry_has_internal_property\n\n**Summary**\n\nChecks whether the object has the given internal property.\n\n*Note*:\n - Properties which were not created with [jerry_set_internal_property](#jerry_set_internal_property) are excluded\n   during the operation.\n - Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\nbool\njerry_has_internal_property (const jerry_value_t obj_val,\n                             const jerry_value_t prop_name_val);\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- return value\n  - true, if the property exists\n  - false, otherwise\n\n*New in version 2.2*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"hidden_property\");\n\n  bool has_internal_js_prop = jerry_has_internal_property (global_object, prop_name);\n\n  jerry_release_value (prop_name);\n  jerry_release_value (global_object);\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_delete_internal_property](#jerry_delete_internal_property)\n- [jerry_get_internal_property](#jerry_get_internal_property)\n- [jerry_set_internal_property](#jerry_set_internal_property)\n\n\n## jerry_delete_property\n\n**Summary**\n\nDelete a property from an object.\n\n**Prototype**\n\n```c\nbool\njerry_delete_property (const jerry_value_t obj_val,\n                       const jerry_value_t prop_name_val);\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- return value\n  - true, if property was deleted successfully\n  - false, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"my_prop\");\n\n  bool delete_result = jerry_delete_property (global_object, prop_name);\n  /* use \"delete_result\" */\n\n  jerry_release_value (prop_name);\n  jerry_release_value (global_object);\n}\n```\n\n**See also**\n\n- [jerry_has_property](#jerry_has_property)\n- [jerry_has_own_property](#jerry_has_own_property)\n- [jerry_delete_property_by_index](#jerry_delete_property_by_index)\n- [jerry_get_property](#jerry_get_property)\n\n\n## jerry_delete_property_by_index\n\n**Summary**\n\nDelete indexed property from the specified object.\n\n**Prototype**\n\n```c\nbool\njerry_delete_property_by_index (const jerry_value_t obj_val,\n                                uint32_t index);\n```\n\n- `obj_val` - object value\n- `index` - index number\n- return value\n  - true, if property was deleted successfully\n  - false, otherwise\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t object;\n\n  ... // create or acquire object\n\n  bool delete_result = jerry_delete_property_by_index (object, 5);\n\n  jerry_release_value (object);\n}\n```\n\n**See also**\n\n- [jerry_has_property](#jerry_has_property)\n- [jerry_has_own_property](#jerry_has_own_property)\n- [jerry_delete_property](#jerry_delete_property)\n- [jerry_get_property](#jerry_get_property)\n- [jerry_set_property](#jerry_set_property)\n- [jerry_get_property_by_index](#jerry_get_property_by_index)\n- [jerry_set_property_by_index](#jerry_set_property_by_index)\n\n## jerry_delete_internal_property\n\n**Summary**\n\nDelete an internal property from an object.\n\n*Note*: Properties which were not created with [jerry_set_internal_property](#jerry_set_internal_property) are excluded\n        during the operation.\n\n**Prototype**\n\n```c\nbool\njerry_delete_internal_property (const jerry_value_t obj_val,\n                                const jerry_value_t prop_name_val);\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- return value\n  - true, if property was deleted successfully\n  - false, otherwise\n\n*New in version 2.2*.\n\n**Example**\n\n```c\n{\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"hidden_property\");\n\n  bool delete_result = jerry_delete_internal_property (global_object, prop_name);\n  /* use \"delete_result\" */\n\n  jerry_release_value (prop_name);\n  jerry_release_value (global_object);\n}\n```\n\n**See also**\n\n- [jerry_has_internal_property](#jerry_has_internal_property)\n- [jerry_get_internal_property](#jerry_get_internal_property)\n- [jerry_set_internal_property](#jerry_set_internal_property)\n\n\n## jerry_get_property\n\n**Summary**\n\nGet value of a property to the specified object with the given name.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_property (const jerry_value_t obj_val,\n                    const jerry_value_t prop_name_val);\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- return value\n  - value of property, if success\n  - thrown error, otherwise\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"Object\");\n\n  jerry_value_t prop_value = jerry_get_property (global_object, prop_name);\n\n  /* use \"prop_value\" then release it. */\n\n  jerry_release_value (prop_value);\n  jerry_release_value (prop_name);\n  jerry_release_value (global_object);\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_has_property](#jerry_has_property)\n- [jerry_has_own_property](#jerry_has_own_property)\n- [jerry_delete_property](#jerry_delete_property)\n- [jerry_delete_property_by_index](#jerry_delete_property_by_index)\n- [jerry_set_property](#jerry_set_property)\n- [jerry_get_property_by_index](#jerry_get_property_by_index)\n- [jerry_set_property_by_index](#jerry_set_property_by_index)\n\n\n## jerry_get_property_by_index\n\n**Summary**\n\nGet value by an index from the specified object.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_property_by_index (const jerry_value_t obj_val,\n                             uint32_t index);\n```\n\n- `obj_val` - object value\n- `index` - index number\n- return value\n  - stored value on the specified index, if success\n  - thrown exception, otherwise.\n\n**Example**\n\n```c\n{\n  jerry_value_t object;\n\n  ... // create or acquire object\n\n  jerry_value_t value = jerry_get_property_by_index (object, 5);\n\n  ...\n\n  jerry_release_value (value);\n  jerry_release_value (object);\n}\n```\n\n**See also**\n\n- [jerry_has_property](#jerry_has_property)\n- [jerry_has_own_property](#jerry_has_own_property)\n- [jerry_delete_property](#jerry_delete_property)\n- [jerry_delete_property_by_index](#jerry_delete_property_by_index)\n- [jerry_get_property](#jerry_get_property)\n- [jerry_set_property](#jerry_set_property)\n- [jerry_set_property_by_index](#jerry_set_property_by_index)\n\n## jerry_get_internal_property\n\n**Summary**\n\nGet value of an internal property to the specified object with the given name.\n\n*Note*:\n - Properties which were not created with [jerry_set_internal_property](#jerry_set_internal_property) are excluded\n   during the operation.\n - Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n   is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_internal_property (const jerry_value_t obj_val,\n                             const jerry_value_t prop_name_val);\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- return value\n  - value of property, if the internal property exists\n  - undefined value, if the, if the internal does not property exists\n  - thrown error, otherwise\n\n*New in version 2.2*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"hidden_property\");\n\n  jerry_value_t prop_value = jerry_get_internal_property (global_object, prop_name);\n\n  /* use \"prop_value\" then release it. */\n\n  jerry_release_value (prop_value);\n  jerry_release_value (prop_name);\n  jerry_release_value (global_object);\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_has_internal_property](#jerry_has_internal_property)\n- [jerry_delete_internal_property](#jerry_delete_internal_property)\n- [jerry_set_internal_property](#jerry_set_internal_property)\n\n\n## jerry_set_property\n\n**Summary**\n\nSet a property to the specified object with the given name.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_set_property (const jerry_value_t obj_val,\n                    const jerry_value_t prop_name_val,\n                    const jerry_value_t value_to_set)\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- `value_to_set` - value to set\n- return value\n  - true, if success\n  - thrown error, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t value_to_set;\n\n  ... // create or acquire value to set\n\n  jerry_value_t glob_obj = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"my_prop\");\n\n  jerry_value_t set_result = jerry_set_property (glob_obj, prop_name, value_to_set);\n\n  ... // check result of property set call\n\n  jerry_release_value (set_result);\n  jerry_release_value (prop_name);\n\n  ...\n\n  jerry_release_value (value_to_set);\n  jerry_release_value (glob_obj);\n}\n```\n\n**See also**\n\n- [jerry_has_property](#jerry_has_property)\n- [jerry_has_own_property](#jerry_has_own_property)\n- [jerry_delete_property](#jerry_delete_property)\n- [jerry_delete_property_by_index](#jerry_delete_property_by_index)\n- [jerry_get_property](#jerry_get_property)\n- [jerry_get_property_by_index](#jerry_get_property_by_index)\n- [jerry_set_property_by_index](#jerry_set_property_by_index)\n\n\n## jerry_set_property_by_index\n\n**Summary**\n\nSet indexed value in the specified object\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_set_property_by_index (const jerry_value_t obj_val,\n                             uint32_t index,\n                             const jerry_value_t value_to_set);\n```\n\n- `obj_val` - object value\n- `index` - index number\n- `value_to_set` - value to set\n- return value\n  - true, if field value was set successfully\n  - thrown exception, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t object;\n  jerry_value_t value_to_set;\n\n  ... // create or acquire object and value to set\n\n  jerry_value_t ret_val = jerry_set_property_by_index (object, 5, value_to_set);\n\n  ...\n\n  jerry_release_value (value_to_set);\n  jerry_release_value (ret_val);\n  jerry_release_value (object);\n}\n```\n\n**See also**\n\n- [jerry_has_property](#jerry_has_property)\n- [jerry_has_own_property](#jerry_has_own_property)\n- [jerry_delete_property](#jerry_delete_property)\n- [jerry_delete_property_by_index](#jerry_delete_property_by_index)\n- [jerry_get_property](#jerry_get_property)\n- [jerry_set_property](#jerry_set_property)\n- [jerry_get_property_by_index](#jerry_get_property_by_index)\n\n\n## jerry_set_internal_property\n\n**Summary**\n\nSet an internal property to the specified object with the given name.\n\n*Note*:\n - The property cannot be accessed from the JavaScript context, only from the public API.\n - It is different from [jerry_set_object_native_pointer](#jerry_set_object_native_pointer) in that any jerry API value\n   can be hidden from the JavaScript context, not only native pointers.\n\n**Prototype**\n\n```c\nbool\njerry_set_internal_property (const jerry_value_t obj_val,\n                             const jerry_value_t prop_name_val,\n                             const jerry_value_t value_to_set)\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- `value_to_set` - value to set\n- return value\n  - true, if success\n  - thrown error, otherwise\n\n*New in version 2.2*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"hidden_property\");\n  jerry_value_t value_to_set = jerry_create_number (5);\n\n  bool set_result = jerry_set_internal_property (global_object, prop_name, value_to_set);\n\n  /* check the result of internal property set call */\n\n  jerry_release_value (value_to_set);\n  jerry_release_value (prop_name);\n  jerry_release_value (global_object);\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_has_internal_property](#jerry_has_internal_property)\n- [jerry_delete_internal_property](#jerry_delete_internal_property)\n- [jerry_get_internal_property](#jerry_get_internal_property)\n\n\n## jerry_init_property_descriptor_fields\n\n**Summary**\n\nInitialize property descriptor. This means that all fields in the `jerry_property_descriptor_t`\nstruct will be set to zero or false depending on the field's type.\n\n**Prototype**\n\n```c\nvoid\njerry_init_property_descriptor_fields (jerry_property_descriptor_t *prop_desc_p);\n```\n\n- `prop_desc_p` - pointer to property descriptor\n\n**Example**\n\n```c\n{\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n\n  ... // usage of prop_desc\n\n  jerry_free_property_descriptor_fields (&prop_desc);\n}\n```\n\nFor a more complete example see [jerry_define_own_property](#jerry_define_own_property).\n\n**See also**\n\n- [jerry_property_descriptor_t](#jerry_property_descriptor_t)\n- [jerry_define_own_property](#jerry_define_own_property)\n- [jerry_get_own_property_descriptor](#jerry_get_own_property_descriptor)\n- [jerry_free_property_descriptor_fields](#jerry_free_property_descriptor_fields)\n\n\n## jerry_define_own_property\n\n**Summary**\n\nDefine a property to the specified object with the given name.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_define_own_property (const jerry_value_t obj_val,\n                           const jerry_value_t prop_name_val,\n                           const jerry_property_descriptor_t *prop_desc_p);\n```\n\n- `obj_val` - target object where the property should be registered\n- `prop_name_val` - property name\n- `prop_desc_p` - pointer to property descriptor\n- return value\n  - true, if success\n  - thrown error, otherwise\n\n**Example**\n\nRegistering a simple value property via the `jerry_define_own_property` method:\n\n[doctest]: # (name=\"02.API-REFERENCE-define-property.c\")\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  // configure the property\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n\n  jerry_value_t value_to_set;\n\n  // create or acquire value to set\n  // For example:\n  value_to_set = jerry_create_number (33);\n\n  // set the property descriptor fields:\n  // set the \"is_value_defined\" field to \"true\" to indicate the \"value\"\n  //  field should be used during the property registration.\n  prop_desc.is_value_defined = true;\n\n  // set the \"value\" field to the number 33\n  prop_desc.value = value_to_set;\n\n  // add the property as \"my_prop\" for the global object\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"my_prop\");\n  jerry_value_t return_value = jerry_define_own_property (global_obj_val, prop_name, &prop_desc);\n  if (jerry_value_is_error (return_value))\n  {\n    // there was an error\n  }\n\n  // if there was no error at this point the global object should have a \"my_prop\" property\n\n  jerry_release_value (return_value);\n  jerry_release_value (prop_name);\n\n  jerry_free_property_descriptor_fields (&prop_desc);\n  jerry_release_value (global_obj_val);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n\nRegistering a getter/setter property via the `jerry_define_own_property` method:\n\n[doctest]: # (name=\"02.API-REFERENCE-define-property-getset.c\")\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include \"jerryscript.h\"\n\nstatic int counter = 0;\n\nstatic jerry_value_t\nmethod_getter (const jerry_value_t this_obj,\n               const jerry_value_t func_obj,\n               const jerry_value_t args[],\n               const jerry_length_t argc)\n{\n  counter++;\n  printf(\"Getter called, returning: %d\\n\", counter);\n\n  return jerry_create_number (counter);\n}\n\nstatic jerry_value_t\nmethod_setter (const jerry_value_t this_obj,\n               const jerry_value_t func_obj,\n               const jerry_value_t args[],\n               const jerry_length_t argc)\n{\n  // Note: the arguments count and type should be checked\n  // in this example it is ommitted!\n\n  double new_value = jerry_get_number_value (args[0]);\n  counter = (int) new_value;\n\n  printf(\"Setter called, setting: %d\\n\", counter);\n\n  return jerry_create_undefined ();\n}\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  // configure the property\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n\n  // set the property descriptor fields:\n\n  prop_desc.is_get_defined = true;\n  prop_desc.getter = jerry_create_external_function (method_getter);\n  prop_desc.is_set_defined = true;\n  prop_desc.setter = jerry_create_external_function (method_setter);\n\n  // add the property as \"my_prop\" for the global object\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"my_prop\");\n  jerry_value_t return_value = jerry_define_own_property (global_obj_val, prop_name, &prop_desc);\n  if (jerry_value_is_error (return_value))\n  {\n    // there was an error\n  }\n\n  // if there was no error at this point the global object should have a \"my_prop\" property\n\n  jerry_release_value (return_value);\n  jerry_release_value (prop_name);\n\n  jerry_free_property_descriptor_fields (&prop_desc);\n  jerry_release_value (global_obj_val);\n\n  // run an example js code to use the getter/setters\n\n  const char *src_p = \"this.my_prop; this.my_prop; this.my_prop = 4; this.my_prop\";\n  jerry_value_t eval_result = jerry_eval ((const jerry_char_t *) src_p, strlen (src_p), JERRY_PARSE_NO_OPTS);\n\n  // \"eval_result\" is the last result of \"this.my_prop\" that is \"5\" currently.\n  double result_number = jerry_get_number_value (eval_result);\n  printf(\"output: %lf\\n\", result_number);\n\n  jerry_cleanup ();\n\n  return result_number != 5.0;\n}\n```\n\n**See also**\n\n- [jerry_property_descriptor_t](#jerry_property_descriptor_t)\n- [jerry_init_property_descriptor_fields](#jerry_init_property_descriptor_fields)\n- [jerry_get_own_property_descriptor](#jerry_get_own_property_descriptor)\n- [jerry_free_property_descriptor_fields](#jerry_free_property_descriptor_fields)\n\n\n## jerry_get_own_property_descriptor\n\n**Summary**\n\nConstruct property descriptor from specified property.\n\n**Prototype**\n\n```c\nbool\njerry_get_own_property_descriptor (const jerry_value_t  obj_val,\n                                   const jerry_value_t prop_name_val,\n                                   jerry_property_descriptor_t *prop_desc_p);\n```\n\n- `obj_val` - object value\n- `prop_name_val` - property name\n- `prop_desc_p` - pointer to property descriptor\n- return value\n\n**Example**\n\n```c\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"my_prop\");\n  jerry_get_own_property_descriptor (global_obj_val, prop_name, &prop_desc);\n  jerry_release_value (prop_name);\n\n  ... // usage of property descriptor\n\n  jerry_free_property_descriptor_fields (&prop_desc);\n  jerry_release_value (global_obj_val);\n}\n```\n\n**See also**\n\n- [jerry_property_descriptor_t](#jerry_property_descriptor_t)\n- [jerry_init_property_descriptor_fields](#jerry_init_property_descriptor_fields)\n- [jerry_define_own_property](#jerry_define_own_property)\n- [jerry_free_property_descriptor_fields](#jerry_free_property_descriptor_fields)\n\n\n## jerry_free_property_descriptor_fields\n\n**Summary**\n\nFree fields of property descriptor (setter, getter and value).\n\n**Prototype**\n\n```c\nvoid\njerry_free_property_descriptor_fields (const jerry_property_descriptor_t *prop_desc_p);\n```\n\n- `prop_desc_p` - pointer to property descriptor\n\n**Example**\n\n```c\n{\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n\n  ... // usage of property descriptor\n\n  jerry_free_property_descriptor_fields (&prop_desc);\n}\n```\n\n**See also**\n\n- [jerry_init_property_descriptor_fields](#jerry_init_property_descriptor_fields)\n- [jerry_define_own_property](#jerry_define_own_property)\n- [jerry_get_own_property_descriptor](#jerry_get_own_property_descriptor)\n\n\n## jerry_call_function\n\n**Summary**\n\nCall function specified by a function value. Error flag must\nnot be set for any arguments of this function. Value of `this`\nparameter should be set to `undefined` for non-method calls.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_call_function (const jerry_value_t func_obj_val,\n                     const jerry_value_t this_val,\n                     const jerry_value_t args_p[],\n                     jerry_size_t args_count);\n```\n\n- `func_obj_val` - the function object to call\n- `this_val` - object for 'this' binding\n- `args_p` - function's call arguments\n- `args_count` - number of arguments\n- return value - returned jerry value of the called function\n\n**Example**\n\n```c\n{\n  jerry_value_t target_function;\n\n  ... // create or get \"target_function\"\n\n  if (jerry_value_is_function (target_function))\n  {\n    jerry_value_t this_val = jerry_create_undefined ();\n    jerry_value_t ret_val = jerry_call_function (target_function, this_val, NULL, 0);\n\n    if (!jerry_value_is_error (ret_val))\n    {\n      ... // handle return value\n    }\n\n    jerry_release_value (ret_val);\n    jerry_release_value (this_val);\n  }\n\n  jerry_release_value (target_function);\n}\n```\n\n**See also**\n\n- [jerry_is_function](#jerry_is_function)\n- [jerry_create_external_function](#jerry_create_external_function)\n\n\n## jerry_construct_object\n\n**Summary**\n\nConstruct object, invoking specified function object as constructor.\nError flag must not be set for any arguments of this function.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_construct_object (const jerry_value_t func_obj_val,\n                        const jerry_value_t args_p[],\n                        jerry_size_t args_count);\n```\n\n- `func_obj_val` - function object to call\n- `args_p` - function's call arguments\n- `args_count` - number of arguments\n- return value - returned value of the invoked constructor\n\n**Example**\n\n```c\n{\n  jerry_value_t val;\n\n  ... // receiving val\n\n  if (jerry_is_constructor (val))\n  {\n    jerry_value_t ret_val = jerry_construct_object (val, NULL, 0);\n\n    if (!jerry_value_is_error (ret_val))\n    {\n      ... // handle return value\n    }\n\n    jerry_release_value (ret_val);\n  }\n}\n```\n\n**See also**\n\n - [jerry_is_constructor](#jerry_is_constructor)\n\n\n## jerry_get_object_keys\n\n**Summary**\n\nGet keys of the specified object value.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_object_keys (const jerry_value_t obj_val);\n```\n\n- `obj_val` - object value\n- return value\n  - array object value, if success\n  - thrown error, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t object;\n  ... // create or acquire object\n\n  jerry_value_t keys_array = jerry_get_object_keys (object);\n\n  ... // usage of keys_array\n\n  jerry_release_value (keys_array);\n}\n```\n\n**See also**\n\n- [jerry_get_property](#jerry_get_property)\n- [jerry_set_property](#jerry_set_property)\n\n\n## jerry_get_prototype\n\n**Summary**\n\nGet the prototype of the specified object.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_prototype (const jerry_value_t obj_val);\n```\n\n- `obj_val` - object value\n- return value\n  - object value, if success\n  - null or thrown error, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t object;\n  ... // create or acquire object\n\n  jerry_value_t prototype = jerry_get_prototype (object);\n\n  ... // usage of prototype object\n\n  jerry_release_value (prototype);\n  jerry_release_value (object);\n}\n```\n\n**See also**\n\n- [jerry_set_prototype](#jerry_set_prototype)\n\n\n## jerry_set_prototype\n\n**Summary**\n\nSet the prototype of the specified object.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_set_prototype (const jerry_value_t obj_val,\n                     const jerry_value_t proto_obj_val);\n```\n\n- `obj_val` - object value\n- `proto_obj_val` - prototype object value\n- return value\n  - true, if success\n  - thrown error, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t object;\n  jerry_value_t prototype;\n\n  ... // create or acquire object and prototype\n\n  jerry_value_t ret_val = jerry_set_prototype (object, prototype);\n\n  jerry_release_value (ret_val);\n  jerry_release_value (prototype);\n  jerry_release_value (object);\n}\n```\n\n**See also**\n\n- [jerry_get_prototype](#jerry_get_prototype)\n\n\n## jerry_get_object_native_pointer\n\n**Summary**\n\nGet native pointer by the given type information.\nThe pointer and the type information are previously associated with the object by\n[jerry_set_object_native_pointer](#jerry_set_object_native_pointer).\n\n*Note*: `out_native_pointer_p` can be NULL, and it means the\n        caller doesn't want to get the native_pointer.\n\n**Prototype**\n\n```c\nbool\njerry_get_object_native_pointer (const jerry_value_t obj_val,\n                                 void **out_native_pointer_p,\n                                 const jerry_object_native_info_t *native_info_p)\n```\n\n- `obj_val` - object value to get native pointer from.\n- `out_native_pointer_p` - native pointer (output parameter).\n- `native_info_p` - native pointer's type information.\n- return value\n  - true, if there is native pointer associated of the specified object with the given native type info\n  - false, otherwise\n\n*New in version 2.0*: Changed from `jerry_get_object_native_handle`.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"jerryscript.h\"\n\ntypedef struct\n{\n  char *data_p;\n  unsigned int length;\n} buffer_native_object_t;\n\ntypedef struct\n{\n  int area;\n  int perimeter;\n} shape_native_object_t;\n\n#define SECRET_INFO ((void *) 42)\n\nstatic void\nbuffer_native_freecb (void *native_p)\n{\n  char *data_p = ((buffer_native_object_t*)native_p)->data_p;\n\n  if (data_p != NULL)\n  {\n    free (data_p);\n  }\n\n  free (native_p);\n}\n\nstatic void\nshape_native_freecb (void *native_p)\n{\n  free (native_p);\n}\n\nstatic void\ndestructor_freecb (void *native_p)\n{\n   printf(\"Note: the object has been freed\\n\");\n}\n\n// NOTE: The address (!) of type_info acts as a way to uniquely \"identify\" the\n// C type `buffer_native_object_t *`.\nstatic const jerry_object_native_info_t buffer_obj_type_info =\n{\n  .free_cb = buffer_native_freecb\n};\n\n// NOTE: The address (!) of type_info acts as a way to uniquely \"identify\" the\n// C type `shape_native_object_t *`.\nstatic const jerry_object_native_info_t shape_obj_type_info =\n{\n  .free_cb = shape_native_freecb\n};\n\n// NOTE: The address (!) of type_info is the unique \"identifier\"\nstatic const jerry_object_native_info_t destructor_obj_type_info =\n{\n  .free_cb = destructor_freecb\n};\n\nstatic void\nprint_buffer (char *data_p,\n              unsigned int length)\n{\n  for (unsigned int i = 0; i < length; ++i)\n  {\n    printf(\"%c\", data_p[i]);\n  }\n\n  printf(\"\\n\");\n}\n\nstatic void\ndo_stuff (jerry_value_t object)\n{\n  void *native_p;\n  bool has_p = jerry_get_object_native_pointer (object, &native_p, &buffer_obj_type_info);\n\n  if (!has_p)\n  {\n    // Process the error\n    return;\n  }\n\n  // It is safe to cast to buffer_native_object_t * and dereference the pointer:\n  buffer_native_object_t *buffer_p = (buffer_native_object_t *) native_p;\n  print_buffer (buffer_p->data_p, buffer_p->length); // Usage of buffer_p\n\n  bool need_shape_info = true; // implementation dependent\n\n  if (need_shape_info)\n  {\n    has_p = jerry_get_object_native_pointer (object, &native_p, &shape_obj_type_info);\n\n    if (!has_p)\n    {\n      // Process the error\n      return;\n    }\n\n    // It is safe to cast to shape_native_object_t * and dereference the pointer:\n    shape_native_object_t *shape_p = (shape_native_object_t *) native_p;\n\n    printf(\"Area: %d\\tPerimeter: %d\\n\", shape_p->area, shape_p->perimeter); // Usage of shape_p\n  }\n\n  bool need_secret_info = true; // implementation dependent\n\n  if (need_secret_info)\n  {\n    has_p = jerry_get_object_native_pointer (object, &native_p, NULL);\n\n    if (!has_p)\n    {\n      // Process the error\n      return;\n    }\n\n    printf(\"Secret: %d\\n\", (int)((uintptr_t) native_p)); // Usage of native_p\n\n    bool deleted = jerry_delete_object_native_pointer (object, NULL);\n\n    if (deleted)\n    {\n      printf(\"The secret is no longer available\\n\");\n    }\n  }\n}\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t object = jerry_create_object ();\n  buffer_native_object_t *buffer_p = (buffer_native_object_t *) malloc (sizeof (buffer_native_object_t));\n  buffer_p->length = 14;\n  buffer_p->data_p = (char *) malloc (buffer_p->length * sizeof (char));\n  memcpy (buffer_p->data_p, \"My buffer data\", buffer_p->length);\n  jerry_set_object_native_pointer (object, buffer_p, &buffer_obj_type_info);\n\n  shape_native_object_t *shape_p = (shape_native_object_t *) malloc (sizeof (shape_native_object_t));\n  shape_p->area = 6;\n  shape_p->perimeter = 12;\n  jerry_set_object_native_pointer (object, shape_p, &shape_obj_type_info);\n\n  // The native pointer can be NULL. This gives possibily to get notified via the native type info's\n  // free callback when the object has been freed by the GC.\n  jerry_set_object_native_pointer (object, NULL, &destructor_obj_type_info);\n\n  // The native type info can be NULL as well. In this case the registered property is simply freed\n  // when the object is freed by te GC.\n  jerry_set_object_native_pointer (object, SECRET_INFO, NULL);\n\n  do_stuff (object);\n\n  jerry_release_value (object);\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_create_object](#jerry_create_object)\n- [jerry_set_object_native_pointer](#jerry_set_object_native_pointer)\n- [jerry_object_native_info_t](#jerry_object_native_info_t)\n\n\n## jerry_set_object_native_pointer\n\n**Summary**\n\nSet native pointer and an optional type information for the specified object.\nYou can get them by calling [jerry_get_object_native_pointer](#jerry_get_object_native_pointer) later.\n\n*Notes*:\n - If a native pointer was already set for the object with the same type information, its value is updated.\n - If a non-NULL free callback is specified in the native type information,\n   it will be called by the garbage collector when the object is freed.\n - If the object is only referenced via the \"global\" object (or one of it's \"child\"),\n   the free callback will be invoked during the execution of `jerry_cleanup`.\n - The free callback can invoke API functions.\n\n*Note*: If possible do not store API values in native pointers, rather check\n        [jerry_set_internal_property](#jerry_set_internal_property).\n\n**Prototype**\n\n```c\nvoid\njerry_set_object_native_pointer (const jerry_value_t obj_val,\n                                 void *native_p,\n                                 const jerry_object_native_info_t *info_p)\n```\n\n- `obj_val` - object to set native pointer in.\n- `native_p` - native pointer.\n- `info_p` - native pointer's type information or NULL. When used, this should\n             be a long-lived pointer, usually a pointer to a\n             `static const jerry_object_native_info_t` makes most sense.\n\n*New in version 2.0*: Changed from `jerry_set_object_native_handle`.\n\n**Example**\n\nSee [jerry_get_object_native_pointer](#jerry_get_object_native_pointer) for a\nbest-practice example.\n\n**See also**\n\n- [jerry_create_object](#jerry_create_object)\n- [jerry_get_object_native_pointer](#jerry_get_object_native_pointer)\n- [jerry_object_native_info_t](#jerry_object_native_info_t)\n\n## jerry_delete_object_native_pointer\n\n**Summary**\n\nDelete the native pointer of the specified object associated with the given native type info.\n\n*Notes*:\n - If the specified object has no matching native pointer for the given native type info the operation has no effect.\n - The method does not invoke the free callback specified in the type info.\n   If the native pointer should be freed then one must get the native pointer first and invoke the free callback manually\n   before calling this method.\n - This operation cannot throw an exception.\n\n**Prototype**\n\n```c\nbool\njerry_delete_object_native_pointer (const jerry_value_t obj_val,\n                                    const jerry_object_native_info_t *info_p)\n```\n\n- `obj_val` - object to delete native pointer from.\n- `info_p` - native pointer's type information.\n\n*New in version 2.0*.\n\n**Example**\n\nSee [jerry_get_object_native_pointer](#jerry_get_object_native_pointer) for a\nbest-practice example.\n\n**See also**\n\n- [jerry_create_object](#jerry_create_object)\n- [jerry_get_object_native_pointer](#jerry_get_object_native_pointer)\n- [jerry_get_object_native_pointer](#jerry_set_object_native_pointer)\n- [jerry_object_native_info_t](#jerry_object_native_info_t)\n\n\n## jerry_object_get_property_names\n\n**Summary**\n\nGets the property keys for the given object using the selected filters.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_object_get_property_names (jerry_value_t obj_val,\n                                 jerry_property_filter_t filter);\n```\n\n- `obj_val` - object value\n- `filter` - any combination of [jerry_property_filter_t](#jerry_property_filter_t) options\n- return value\n  - array containing the filtered property keys in successful operation\n  - error marked with error flag, otherwise\n\n**Example**\n\n```c\n{\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t keys = jerry_object_get_property_names (object, JERRY_PROPERTY_FILTER_ALL);\n\n  ... // usage of keys\n\n  jerry_release_value (keys);\n  jerry_release_value (global_object);\n}\n```\n\n**See also**\n\n- [jerry_property_filter_t](#jerry_property_filter_t)\n\n## jerry_foreach_object_property\n\n**Summary**\n\nApplies the given function to every enumerable(!) property in the given object.\n\nThe \"iterator\" `foreach_p` method should return `true` value to continue the iteration.\nIf the method returns `false` the iteration will end.\n\n**Prototype**\n\n```c\nbool\njerry_foreach_object_property (jerry_value_t obj_val,\n                               jerry_object_property_foreach_t foreach_p,\n                               void *user_data_p);\n```\n\n- `obj_val` - object value\n- `foreach_p` - foreach function, that will be applied for each property\n- `user_data_p` - user data for foreach function\n- return value\n  - true, if object fields traversal was performed successfully, i.e.:\n    - no unhandled exceptions were thrown in object fields traversal\n    - object fields traversal was stopped on callback that returned false\n  - false, otherwise\n\n**Example**\n\n\n[doctest]: # (name=\"02.API-REFERENCE-foreach-property.c\")\n\n```c\n#include <stdio.h>\n#include \"jerryscript.h\"\n\n/* Example structure used as user data for the property iteration. */\nstruct iteration_data {\n  int string_property_count;\n};\n\n/*\n * Example foreach function to print out property names.\n */\nstatic bool\nforeach_function (const jerry_value_t prop_name,\n                  const jerry_value_t prop_value,\n                  void *user_data_p)\n{\n  if (jerry_value_is_string (prop_name)) {\n    jerry_char_t string_buffer[128];\n    jerry_size_t copied_bytes = jerry_substring_to_char_buffer (prop_name,\n                                                                0,\n                                                                127,\n                                                                string_buffer,\n                                                                127);\n    string_buffer[copied_bytes] = '\\0';\n\n    printf (\"Property: %s\\n\", string_buffer);\n\n    struct iteration_data *data = (struct iteration_data *) user_data_p;\n    data->string_property_count++;\n  }\n\n  /* return true to continue iteration */\n  return true;\n}\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Construct an example object with a single property. */\n  jerry_value_t object = jerry_create_object ();\n  {\n    jerry_value_t test_property = jerry_create_string ((const jerry_char_t *) \"DemoProp\");\n    jerry_value_t test_value = jerry_create_number (3);\n    /* By default all properties added to an object are enumerable. */\n    jerry_value_t set_result = jerry_set_property (object, test_property, test_value);\n    /* The `set_result` should be checked if it is an error or not. */\n    jerry_release_value (set_result);\n    jerry_release_value (test_value);\n    jerry_release_value (test_property);\n  }\n\n  /* Iterate on the object's properties with the given user data. */\n  struct iteration_data user_data = { 0 };\n\n  bool iteration_result = jerry_foreach_object_property (object, foreach_function, &user_data);\n  /* Check and process the `iteration_result` if required. */\n\n  jerry_release_value (object);\n\n  jerry_cleanup ();\n\n  return user_data.string_property_count == 0;\n}\n```\n\n**See also**\n\n- [jerry_object_property_foreach_t](#jerry_object_property_foreach_t)\n\n## jerry_objects_foreach\n\n**Summary**\n\nIterate over all objects available in the engine.\n\nThe \"iterator\" `foreach_p` method should return `true` value to continue the search.\nIf the method returns `false` the search for the object is finished.\n\n*Note*: Values obtained in `foreach_p` must be retained using [jerry_acquire_value](#jerry_acquire_value).\n\n**Prototype**\n\n```c\nbool\njerry_objects_foreach (jerry_objects_foreach_t foreach_p,\n                       void *user_data_p);\n```\n\n- `foreach_p` - function that will be invoked for each object.\n- `user_data_p` - User data to pass to the function.\n- return value\n  - `true`, if the search function terminated the traversal by returning `false`\n  - `false`, if the end of the list of objects was reached\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # (name=\"02.API-REFERENCE-objects-foreach.c\")\n\n```c\n#include <stdio.h>\n#include \"jerryscript.h\"\n\n/* Create a custom structure to guide the search and store the result. */\ntypedef struct\n{\n  jerry_value_t property_name;\n  jerry_value_t result;\n} find_my_object_info_t;\n\n/*\n * Find the first object with the given property.\n */\nstatic bool\nfind_my_object (const jerry_value_t candidate,\n                void *user_data_p)\n{\n  find_my_object_info_t *info_p = (find_my_object_info_t *) user_data_p;\n\n  /* Check if the given object has the required property. */\n  jerry_value_t has_property = jerry_has_property (candidate, info_p->property_name);\n  bool object_found = jerry_get_boolean_value (has_property);\n\n  if (object_found)\n  {\n    /* We found it, so we acquire the value and record it. */\n    info_p->result = jerry_acquire_value (candidate);\n  }\n\n  jerry_release_value (has_property);\n\n  /* If the object was not found continue the search. */\n  return !object_found;\n} /* find_my_object */\n\nint\nmain (void)\n{\n  int return_value = 0;\n\n  /* Initialize JerryScript engine. */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Create the test object. */\n  {\n    jerry_value_t test_object = jerry_create_object ();\n\n    {\n      jerry_value_t test_property = jerry_create_string ((const jerry_char_t *) \"DemoProp\");\n      jerry_value_t test_value = jerry_create_number (3);\n      jerry_value_t set_result = jerry_set_property (test_object, test_property, test_value);\n      /* The `set_result` should be checked if it is an error or not. */\n      jerry_release_value (set_result);\n      jerry_release_value (test_value);\n      jerry_release_value (test_property);\n    }\n\n    {\n      /* Register the test object into the global object. */\n      jerry_value_t global_object = jerry_get_global_object ();\n      jerry_value_t demo_property = jerry_create_string ((const jerry_char_t *) \"DemoObject\");\n      jerry_value_t set_result = jerry_set_property (global_object, demo_property, test_object);\n      /* The `set_result` should be checked if it is an error or not. */\n      jerry_release_value (set_result);\n      jerry_release_value (demo_property);\n      jerry_release_value (global_object);\n    }\n\n    jerry_release_value (test_object);\n  }\n\n  /* Look up the test object base on a property name. */\n  find_my_object_info_t search_info =\n  {\n    .property_name = jerry_create_string ((const jerry_char_t *) \"DemoProp\")\n  };\n\n  if (jerry_objects_foreach (find_my_object, &search_info))\n  {\n    /* The search was successful. Do something useful with search_info.result. */\n    // ...\n    printf (\"Object found\\n\");\n\n    /* Release the found object after we're done using it. */\n    jerry_release_value (search_info.result);\n  }\n  else\n  {\n    /* The search has failed. */\n    printf (\"Object not found\\n\");\n\n    return_value = 1;\n  }\n\n  jerry_release_value (search_info.property_name);\n\n  /* Engine cleanup */\n  jerry_cleanup ();\n  return return_value;\n}\n```\n\n**See also**\n\n- [jerry_objects_foreach_t](#jerry_objects_foreach_t)\n\n## jerry_objects_foreach_by_native_info\n\n**Summary**\n\nIterate over all objects in the engine matching a certain native data type.\n\nThe \"iterator\" `foreach_p` method should return `true` value to continue the search.\nIf the method returns `false` the search for the object is finished.\n\n*Note*: Values obtained in `foreach_p` must be retained using [jerry_acquire_value](#jerry_acquire_value).\n\n**Prototype**\n\n```c\nbool\njerry_objects_foreach_by_native_info (const jerry_object_native_info_t *native_info_p,\n                                      jerry_objects_foreach_by_native_info_t foreach_p,\n                                      void *user_data_p);\n```\n\n- `native_info_p` - native pointer's type information.\n- `foreach_p` - function that will be invoked for each object.\n- return value\n  - `true`, if the search function terminated the traversal by returning `false`\n  - `false`, if the end of the list of objects was reached\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # (name=\"02.API-REFERENCE-objects-foreach-nativeptr.c\")\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include \"jerryscript.h\"\n\ntypedef struct\n{\n  int foo;\n  bool bar;\n} native_obj_t;\n\ntypedef struct\n{\n  jerry_value_t found_object;\n  native_obj_t *found_native_data_p;\n\n  int match_foo_value;\n} find_object_data_t;\n\nstatic void native_freecb (void *native_p)\n{\n  /* `native_p` was allocated via malloc. */\n  free (native_p);\n} /* native_freecb */\n\n/*\n * NOTE: The address (!) of type_info acts as a way to uniquely \"identify\" the\n * C type `native_obj_t *`.\n */\nstatic const jerry_object_native_info_t native_obj_type_info =\n{\n  .free_cb = native_freecb\n};\n\n/*\n * Function creating JS object that is \"backed\" by a `native_obj_t`.\n */\nstatic void\nadd_object_with_nativeptr (int foo_value)\n{\n  // construct object and native_set value:\n  jerry_value_t test_object = jerry_create_object ();\n  native_obj_t *native_obj_p = malloc (sizeof (*native_obj_p));\n  native_obj_p->foo = foo_value;\n  native_obj_p->bar = true;\n\n  jerry_set_object_native_pointer (test_object, native_obj_p, &native_obj_type_info);\n\n  /* Register the test object into the global object. */\n  jerry_value_t global_object = jerry_get_global_object ();\n  jerry_value_t demo_property = jerry_create_string ((const jerry_char_t *) \"DemoObject\");\n  jerry_value_t set_result = jerry_set_property (global_object, demo_property, test_object);\n  /* The `set_result` should be checked if it is an error or not. */\n  jerry_release_value (set_result);\n  jerry_release_value (demo_property);\n  jerry_release_value (global_object);\n\n  jerry_release_value (test_object);\n} /* create_object_with_nativeptr */\n\n/*\n * Example native method that searches for a JavaScript object\n * with a `native_obj_type_info` has the correct value.\n */\nstatic bool\nfind_object (const jerry_value_t candidate, void *data_p, void *user_data_p)\n{\n  find_object_data_t *find_data_p = (find_object_data_t *) user_data_p;\n  native_obj_t *native_obj_p = (native_obj_t *) data_p;\n\n  if (find_data_p->match_foo_value == native_obj_p->foo)\n  {\n    /* If the object was found, acquire it and store it in the user data. */\n    find_data_p->found_object = jerry_acquire_value (candidate);\n    find_data_p->found_native_data_p = native_obj_p;\n\n    /* Stop traversing over the objects. */\n    return false;\n  }\n\n  /* Indicate that the object was not found, so traversal must continue. */\n  return true;\n} /* find_object */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  add_object_with_nativeptr (4);\n  add_object_with_nativeptr (3);\n  add_object_with_nativeptr (2);\n\n  find_object_data_t find_data =\n  {\n    .match_foo_value = 3,\n  };\n\n  if (jerry_objects_foreach_by_native_info (&native_obj_type_info, find_object, &find_data))\n  {\n    /* The object was found and is now stored in `find_data.found_object`. After using it, it must be released. */\n    printf (\"Object found, native foo value: %d\\n\", find_data.found_native_data_p->foo);\n\n    jerry_release_value (find_data.found_object);\n  }\n  else\n  {\n    printf (\"Object not found\\n\");\n  }\n\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_create_object](#jerry_create_object)\n- [jerry_set_object_native_pointer](#jerry_set_object_native_pointer)\n- [jerry_get_object_native_pointer](#jerry_get_object_native_pointer)\n- [jerry_object_native_info_t](#jerry_object_native_info_t)\n- [jerry_objects_foreach](#jerry_objects_foreach)\n\n\n# Input validator functions\n\n## jerry_is_valid_utf8_string\n\n**Summary**\n\nCheck if a given character buffer is a valid UTF-8 string.\n\n**Notes**: Calling this method is safe in any time. It can be called\neven before engine initialization.\n\n**Prototype**\n\n```c\nbool\njerry_is_valid_utf8_string (const jerry_char_t *utf8_buf_p, /**< UTF-8 string */\n                            jerry_size_t buf_size) /**< string size */\n```\n\n- `utf8_buf_p` - UTF-8 input string buffer.\n- `buf_size` - input string buffer size in bytes.\n- return value\n  - true, if the provided string was a valid UTF-8 string.\n  - false, if the string is not valid as an UTF-8 string.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  const jerry_char_t script[] = \"print ('Hello, World!');\";\n  const jerry_size_t script_size = sizeof (script) - 1;\n\n  if (jerry_is_valid_utf8_string (script, script_size))\n  {\n    jerry_run_simple (script, script_size, JERRY_INIT_EMPTY);\n  }\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_run_simple](#jerry_run_simple)\n- [jerry_create_string_from_utf8](#jerry_create_string_from_utf8)\n- [jerry_create_string_sz_from_utf8](#jerry_create_string_sz_from_utf8)\n- [jerry_get_utf8_string_size](#jerry_get_utf8_string_size)\n- [jerry_get_utf8_string_length](#jerry_get_utf8_string_length)\n- [jerry_string_to_utf8_char_buffer](#jerry_string_to_utf8_char_buffer)\n- [jerry_substring_to_utf8_char_buffer](#jerry_substring_to_utf8_char_buffer)\n\n## jerry_is_valid_cesu8_string\n\n**Summary**\n\nCheck if a given character buffer is a valid CESU-8 string.\n\n**Notes**: Calling this method is safe in any time. It can be called\neven before engine initialization.\n\n**Prototype**\n\n```c\nbool\njerry_is_valid_cesu8_string (const jerry_char_t *cesu8_buf_p, /**< CESU-8 string */\n                             jerry_size_t buf_size) /**< string size */\n```\n\n- `cesu8_buf_p` - CESU-8 input string buffer.\n- `buf_size` - input string buffer size in bytes.\n- return value\n  - true, if the provided string was a valid CESU-8 string.\n  - false, if the string is not valid as a CESU-8 string.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const jerry_char_t script[] = \"Hello, World!\";\n  const jerry_size_t script_size = sizeof (script) - 1;\n\n  if (jerry_is_valid_cesu8_string (script, script_size))\n  {\n    jerry_value_t string_value = jerry_create_string_sz (script,\n                                                         script_size);\n\n    // usage of string_value\n\n    jerry_release_value (string_value);\n  }\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_create_string](#jerry_create_string)\n- [jerry_create_string_sz](#jerry_create_string_sz)\n- [jerry_get_string_size](#jerry_get_string_size)\n- [jerry_get_string_length](#jerry_get_string_length)\n- [jerry_string_to_char_buffer](#jerry_string_to_char_buffer)\n- [jerry_substring_to_char_buffer](#jerry_substring_to_char_buffer)\n\n\n# Dynamic memory management functions\n\n## jerry_heap_alloc\n\n**Summary**\n\nAllocate memory on the engine's heap.\n\n*Note*: This function may take away memory from the executed JavaScript code.\nIf any other dynamic memory allocation API is available (e.g., libc malloc), it\nshould be used instead.\n\n**Prototype**\n\n```c\nvoid *jerry_heap_alloc (size_t size);\n```\n\n- `size`: size of the memory block.\n- return value: non-NULL pointer, if the memory is successfully allocated,\n                NULL otherwise.\n\n*New in version 2.0*.\n\n**See also**\n\n- [jerry_heap_free](#jerry_heap_free)\n\n## jerry_heap_free\n\n**Summary**\n\nFree memory allocated on the engine's heap.\n\n**Prototype**\n\n```c\nvoid jerry_heap_free (void *mem_p, size_t size);\n```\n\n- `mem_p`: value returned by `jerry_heap_alloc`.\n- `size`: same size as passed to `jerry_heap_alloc`.\n\n*New in version 2.0*.\n\n**See also**\n\n- [jerry_heap_alloc](#jerry_heap_alloc)\n\n\n# External context functions\n\n## jerry_create_context\n\n**Summary**\n\nCreate an external JerryScript engine context.\n\n**Prototype**\n\n```c\njerry_context_t *\njerry_create_context (uint32_t heap_size,\n                      jerry_context_alloc_t alloc,\n                      void *cb_data_p);\n```\n\n- `heap_size` - requested heap size of the JerryScript context\n- `alloc` - function for allocation\n- `cb_data_p` - user data\n- return value\n  - pointer to the newly created JerryScript context if success\n  - NULL otherwise.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # (test=\"compile\", name=\"02.API-REFERENCE-create-context.c\")\n\n```c\n#include <stdlib.h>\n#include <pthread.h>\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n\n/* A different Thread Local Storage variable for each jerry context. */\n__thread jerry_context_t *tls_context;\n\njerry_context_t *\njerry_port_get_current_context (void)\n{\n  /* Returns the context assigned to the thread. */\n  return tls_context;\n}\n\n/* Allocate JerryScript heap for each thread. */\nstatic void *\ncontext_alloc_fn (size_t size, void *cb_data)\n{\n  (void) cb_data;\n  return malloc (size);\n}\n\nstatic void *\nthread_function (void *param)\n{\n  tls_context = jerry_create_context (512 * 1024,\n                                      context_alloc_fn,\n                                      NULL);\n  jerry_init (JERRY_INIT_EMPTY);\n  /* Run JerryScript in the context (e.g.: jerry_parse & jerry_run) */\n  jerry_cleanup ();\n\n  /* Deallocate JerryScript context */\n  free (tls_context);\n\n  return NULL;\n}\n\n#define NUM_OF_THREADS 8\n\nint\nmain (void)\n{\n  pthread_t threads[NUM_OF_THREADS];\n\n  /* Create the threads. */\n  for (int i = 0; i < NUM_OF_THREADS; i++)\n  {\n    pthread_create (&threads[i], NULL, thread_function, (void *) (intptr_t) i);\n  }\n\n  /* Wait for the threads to complete, and release their resources. */\n  for (int i = 0; i < NUM_OF_THREADS; i++)\n  {\n    pthread_join (threads[i], NULL);\n  }\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_context_t](#jerry_context_t)\n- [jerry_context_alloc_t](#jerry_context_alloc_t)\n- [jerry_port_get_current_context](05.PORT-API.md#jerry_port_get_current_context)\n\n\n# Snapshot functions\n\n## jerry_generate_snapshot\n\n**Summary**\n\nGenerate snapshot from the specified source code.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_SNAPSHOT_SAVE`) and can be checked in runtime with\n  the `JERRY_FEATURE_SNAPSHOT_SAVE` feature enum value, see [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n  If the feature is not enabled the function will return an error.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_generate_snapshot (const jerry_char_t *resource_name_p,\n                         size_t resource_name_length,\n                         const jerry_char_t *source_p,\n                         size_t source_size,\n                         uint32_t generate_snapshot_opts,\n                         uint32_t *buffer_p,\n                         size_t buffer_size);\n```\n\n- `resource_name_p` - resource (file) name of the source code. Currently unused, the debugger may use it in the future.\n- `resource_name_length` - length of resource name.\n- `source_p` - script source, it must be a valid utf8 string.\n- `source_size` - script source size, in bytes.\n- `generate_snapshot_opts` - any combination of [jerry_generate_snapshot_opts_t](#jerry_generate_snapshot_opts_t) flags.\n- `buffer_p` - output buffer (aligned to 4 bytes) to save snapshot to.\n- `buffer_size` - the output buffer's size in bytes.\n- return value\n  - the size of the generated snapshot in bytes as number value, if it was generated succesfully (i.e. there\n    are no syntax errors in source code, buffer size is sufficient, and snapshot support is enabled in\n    current configuration through JERRY_SNAPSHOT_SAVE)\n  - thrown error, otherwise.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  static uint32_t global_mode_snapshot_buffer[256];\n  const jerry_char_t script_to_snapshot[] = \"(function () { return 'string from snapshot'; }) ();\";\n\n  jerry_value_t generate_result;\n  generate_result = jerry_generate_snapshot (NULL,\n                                             0,\n                                             script_to_snapshot,\n                                             sizeof (script_to_snapshot) - 1,\n                                             0,\n                                             global_mode_snapshot_buffer,\n                                             sizeof (global_mode_snapshot_buffer) / sizeof (uint32_t));\n\n  if (!jerry_value_is_error (generate_result))\n  {\n    size_t snapshot_size = (size_t) jerry_get_number_value (generate_result);\n  }\n\n  jerry_release_value (generate_result);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n- [jerry_cleanup](#jerry_cleanup)\n- [jerry_generate_function_snapshot](#jerry_generate_function_snapshot)\n- [jerry_exec_snapshot](#jerry_exec_snapshot)\n\n\n## jerry_generate_function_snapshot\n\n**Summary**\n\nGenerate function snapshot from the specified source code\nwith the given arguments.\n\nThe function arguments and function body are\npassed as separated arguments.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_SNAPSHOT_SAVE`) and can be checked in runtime with\n  the `JERRY_FEATURE_SNAPSHOT_SAVE` feature enum value, see [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n  If the feature is not enabled the function will return an error.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_generate_function_snapshot (const jerry_char_t *resource_name_p,\n                                  size_t resource_name_length,\n                                  const jerry_char_t *source_p,\n                                  size_t source_size,\n                                  const jerry_char_t *args_p,\n                                  size_t args_size,\n                                  uint32_t generate_snapshot_opts,\n                                  uint32_t *buffer_p,\n                                  size_t buffer_size)\n```\n\n- `resource_name_p` - resource (file) name of the source code. Currently unused, the debugger may use it in the future.\n- `resource_name_length` - length of resource name.\n- `source_p` - script source, it must be a valid utf8 string.\n- `source_size` - script source size, in bytes.\n- `args_p` - function arguments, it must be a valid utf8 string.\n- `args_size` - function argument size, in bytes.\n- `generate_snapshot_opts` - any combination of [jerry_generate_snapshot_opts_t](#jerry_generate_snapshot_opts_t) flags.\n- `buffer_p` - buffer (aligned to 4 bytes) to save snapshot to.\n- `buffer_size` - the buffer's size in bytes.\n- return value\n  - the size of the generated snapshot in bytes as number value, if it was generated succesfully (i.e. there\n    are no syntax errors in source code, buffer size is sufficient, and snapshot support is enabled in\n    current configuration through JERRY_SNAPSHOT_SAVE)\n  - thrown error, otherwise.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  static uint32_t func_snapshot_buffer[256];\n  const jerry_char_t args[] = \"a, b\";\n  const jerry_char_t src[] = \"return a + b;\";\n\n  jerry_value_t generate_result;\n  generate_result = jerry_generate_function_snapshot (NULL,\n                                                      0,\n                                                      src,\n                                                      sizeof (src) - 1,\n                                                      args,\n                                                      sizeof (args) - 1,\n                                                      0,\n                                                      func_snapshot_buffer,\n                                                      sizeof (func_snapshot_buffer) / sizeof (uint32_t));\n\n  if (!jerry_value_is_error (generate_result))\n  {\n    size_t snapshot_size = (size_t) jerry_get_number_value (generate_result);\n  }\n\n  jerry_release_value (generate_result);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n- [jerry_cleanup](#jerry_cleanup)\n- [jerry_generate_snapshot](#jerry_generate_snapshot)\n- [jerry_load_function_snapshot_at](#jerry_load_function_snapshot_at)\n\n\n## jerry_exec_snapshot\n\n**Summary**\n\nExecute snapshot from the specified buffer.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_SNAPSHOT_EXEC`) and can be checked in runtime with\n  the `JERRY_FEATURE_SNAPSHOT_EXEC` feature enum value, see [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n  If the feature is not enabled the function will return an error.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_exec_snapshot (const uint32_t *snapshot_p,\n                     size_t snapshot_size,\n                     size_t func_index,\n                     uint32_t exec_snapshot_opts);\n```\n\n- `snapshot_p` - pointer to snapshot.\n- `snapshot_size` - size of snapshot in bytes.\n- `func_index` - index of executed function.\n- `exec_snapshot_opts` - any combination of [jerry_exec_snapshot_opts_t](#jerry_exec_snapshot_opts_t) flags.\n- return value\n  - result of bytecode, if run was successful.\n  - thrown error, otherwise (an error is reported if the snapshot execution feature is not enabled).\n\n*Changed in version 2.0*: Added `func_index` and `exec_snapshot_opts` arguments. Removed the `copy_bytecode` last argument.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  static uint32_t global_mode_snapshot_buffer[256];\n  const jerry_char_t script_to_snapshot[] = \"(function () { return 'string from snapshot'; }) ();\";\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t generate_result;\n  generate_result = jerry_generate_snapshot (NULL,\n                                             0,\n                                             script_to_snapshot,\n                                             sizeof (script_to_snapshot) - 1,\n                                             0,\n                                             global_mode_snapshot_buffer,\n                                             sizeof (global_mode_snapshot_buffer) / sizeof (uint32_t));\n  // generate_result should be checked if it is an error or not\n\n  size_t global_mode_snapshot_size = (size_t) jerry_get_number_value (generate_result);\n  jerry_release_value (generate_result);\n\n  jerry_cleanup ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t res = jerry_exec_snapshot (global_mode_snapshot_buffer,\n                                           global_mode_snapshot_size,\n                                           0,\n                                           0);\n\n  // check the `res` value for error and process the result.\n\n  jerry_release_value (res);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n- [jerry_cleanup](#jerry_cleanup)\n- [jerry_parse_and_save_snapshot](#jerry_parse_and_save_snapshot)\n\n\n## jerry_load_function_snapshot\n\n**Summary**\n\nLoad the selected snapshot function from the specified buffer as a function object.\n\nThe lexical environment of the loaded function is always the global lexical environment.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n- This API depends on a build option (`JERRY_SNAPSHOT_EXEC`) and can be checked in runtime with\n  the `JERRY_FEATURE_SNAPSHOT_EXEC` feature enum value, see [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n  If the feature is not enabled the function will return an error.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_load_function_snapshot (const uint32_t *snapshot_p,\n                              size_t snapshot_size,\n                              size_t func_index,\n                              uint32_t exec_snapshot_opts);\n```\n\n- `snapshot_p` - pointer to snapshot.\n- `snapshot_size` - size of snapshot in bytes.\n- `func_index` - index of function to load from the snapshot.\n- `exec_snapshot_opts` - any combination of [jerry_exec_snapshot_opts_t](#jerry_exec_snapshot_opts_t) flags.\n- return value\n  - function object built from the snapshot.\n  - thrown error, otherwise.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  static uint32_t snapshot_buffer[256];\n  const jerry_char_t func_args[] = \"a, b\";\n  const jerry_char_t func_src[] = \"return a + b;\";\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t generate_result;\n  generate_result = jerry_generate_function_snapshot (NULL,\n                                                      0,\n                                                      func_src,\n                                                      sizeof (func_src) - 1,\n                                                      func_args,\n                                                      sizeof (func_args) - 1,\n                                                      false,\n                                                      snapshot_buffer,\n                                                      sizeof (snapshot_buffer) / sizeof (uint32_t));\n\n  size_t snapshot_size = (size_t) jerry_get_number_value (generate_result);\n  jerry_release_value (generate_result);\n\n  jerry_cleanup ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t func = jerry_load_function_snapshot (snapshot_buffer,\n                                                     snapshot_size,\n                                                     0,\n                                                     0);\n  /* 'func' can be used now as a function object */\n\n  jerry_value_t this_value = jerry_create_undefined ();\n  jerry_value_t args[2];\n  args[0] = jerry_create_number (1.0);\n  args[1] = jerry_create_number (2.0);\n\n  jerry_value_t res = jerry_call_function (func, this_value, args, 2);\n\n  /* 'res' now contains the value 3 as a jerry_value_t */\n\n  jerry_release_value (args[0]);\n  jerry_release_value (args[1]);\n  jerry_release_value (this_value);\n  jerry_release_value (func);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n- [jerry_cleanup](#jerry_cleanup)\n- [jerry_parse_and_save_function_snapshot](#jerry_parse_and_save_function_snapshot)\n\n\n## jerry_get_literals_from_snapshot\n\n**Summary**\n\nCollect the used literals from the given snapshot and save them into a buffer in list or C format.\nNone of these literals are magic strings. In C format only valid identifiers are collected.\n\n*Note*:\n- This API depends on a build option (`JERRY_SNAPSHOT_SAVE`) and can be checked in runtime with\n  the `JERRY_FEATURE_SNAPSHOT_SAVE` feature enum value, see [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n  If the feature is not enabled the function will return zero.\n\n**Prototype**\n\n```c\nsize_t\njerry_get_literals_from_snapshot (const uint32_t *snapshot_p,\n                                  size_t snapshot_size,\n                                  jerry_char_t *lit_buf_p,\n                                  size_t lit_buf_size,\n                                  bool is_c_format);\n```\n\n- `snapshot_p` - input snapshot buffer.\n- `snapshot_size` - size of snapshot in bytes.\n- `lit_buf_p` - buffer to save literals to.\n- `lit_buf_size` - the buffer's size.\n- `is_c_format` - the output format would be C-style (true) or a simple list (false).\n- return value\n  - the size of the literal-list, if it was generated succesfully (i.e. the list of literals isn't empty,\n    and literal-save support is enabled in current configuration through JERRY_SNAPSHOT_SAVE)\n  - 0 otherwise.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # (test=\"link\")\n\n```c\n#include <stdio.h>\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  static jerry_char_t literal_buffer[256];\n  static uint32_t snapshot_buffer[256];\n  const jerry_char_t script_for_literal_save[] = \"var obj = { a:'aa', bb:'Bb' }\";\n\n  jerry_value_t generate_result = jerry_generate_snapshot (NULL,\n                                                           0,\n                                                           script_for_literal_save,\n                                                           sizeof (script_for_literal_save) - 1,\n                                                           0,\n                                                           snapshot_buffer,\n                                                           256);\n  size_t snapshot_size = (size_t) jerry_get_number_value (generate_result);\n  jerry_release_value (generate_result);\n\n  const size_t literal_size = jerry_get_literals_from_snapshot (snapshot_buffer,\n                                                                snapshot_size,\n                                                                literal_buffer,\n                                                                256,\n                                                                true);\n\n  if (literal_size != 0)\n  {\n    FILE *literal_file_p = fopen (\"literals.h\", \"wb\");\n    fwrite (literal_buffer, sizeof (uint8_t), literal_size, literal_file_p);\n    fclose (literal_file_p);\n  }\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n- [jerry_cleanup](#jerry_cleanup)\n- [jerry_register_magic_strings](#jerry_register_magic_strings)\n\n\n# Miscellaneous functions\n\n## jerry_set_vm_exec_stop_callback\n\n**Summary**\n\nWhen JERRY_FEATURE_VM_EXEC_STOP is enabled a callback function can be\nspecified by this function. This callback is periodically called when\nJerryScript executes an ECMAScript program.\n\nIf the callback returns with undefined value the ECMAScript execution\ncontinues. Otherwise the result is thrown by the engine (if the error\nflag is not set for the returned value the engine automatically sets\nit). The callback function might be called again even if it threw\nan error. In this case the function must throw the same error again.\n\nTo reduce the CPU overhead of constantly checking the termination\ncondition the callback is called when a backward jump is executed\nor an exception is caught. Setting the `frequency` to a greater\nthan `1` value reduces this overhead further. If its value is N\nonly every Nth event (backward jump, etc.) trigger the next check.\n\n\n**Prototype**\n\n```c\nvoid\njerry_set_vm_exec_stop_callback (jerry_vm_exec_stop_callback_t stop_cb,\n                                 void *user_p,\n                                 uint32_t frequency);\n```\n\n- `stop_cb` - periodically called callback (passing NULL disables this feature)\n- `user_p` - user pointer passed to the `stop_cb` function\n- `frequency` - frequency of calling the `stop_cb` function\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # (test=\"link\")\n\n```c\n#include \"jerryscript.h\"\n\nstatic int countdown = 10;\n\nstatic jerry_value_t\nvm_exec_stop_callback (void *user_p)\n{\n  while (countdown > 0)\n  {\n    countdown--;\n    return jerry_create_undefined ();\n  }\n\n  // The error flag is added automatically.\n  return jerry_create_string ((const jerry_char_t *) \"Abort script\");\n}\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_set_vm_exec_stop_callback (vm_exec_stop_callback, &countdown, 16);\n\n  // Inifinte loop.\n  const jerry_char_t script[] = \"while(true) {}\";\n\n  jerry_value_t parsed_code = jerry_parse (NULL, 0, script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n  jerry_release_value (jerry_run (parsed_code));\n  jerry_release_value (parsed_code);\n  jerry_cleanup ();\n}\n```\n\n**See also**\n\n- [jerry_init](#jerry_init)\n- [jerry_cleanup](#jerry_cleanup)\n- [jerry_parse](#jerry_parse)\n- [jerry_run](#jerry_run)\n- [jerry_vm_exec_stop_callback_t](#jerry_vm_exec_stop_callback_t)\n\n## jerry_get_backtrace\n\n**Summary**\n\nGet backtrace. The backtrace is an array of strings where\neach string contains the position of the corresponding frame.\nThe array length is zero if the backtrace is not available.\n\nThis function is typically called from native callbacks.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n- This feature depends on build option (`JERRY_LINE_INFO`) and can be checked\n  in runtime with the `JERRY_FEATURE_LINE_INFO` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_backtrace (uint32_t max_depth);\n```\n\n- `max_depth` - backtrace collection stops after reaching this value, 0 = unlimited\n- return value\n  - a newly constructed JS array\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # (name=\"02.API-REFERENCE-jsbacktrace.c\")\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include \"jerryscript.h\"\n\nstatic jerry_value_t\nbacktrace_handler (const jerry_value_t function_obj,\n                   const jerry_value_t this_val,\n                   const jerry_value_t args_p[],\n                   const jerry_length_t args_count)\n{\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_LINE_INFO))\n  {\n    printf (\"Line info disabled, no backtrace will be printed\\n\");\n    return jerry_create_undefined ();\n  }\n\n  /* If the line info feature is disabled an empty array will be returned. */\n  jerry_value_t backtrace_array = jerry_get_backtrace (5);\n  uint32_t array_length = jerry_get_array_length (backtrace_array);\n\n  for (uint32_t idx = 0; idx < array_length; idx++)\n  {\n    jerry_value_t property = jerry_get_property_by_index (backtrace_array, idx);\n\n    jerry_char_t string_buffer[64];\n    jerry_size_t copied_bytes = jerry_substring_to_char_buffer (property,\n                                                                0,\n                                                                63,\n                                                                string_buffer,\n                                                                63);\n    string_buffer[copied_bytes] = '\\0';\n    printf(\" %d: %s\\n\", idx, string_buffer);\n\n    jerry_release_value (property);\n  }\n\n  jerry_release_value (backtrace_array);\n\n  return jerry_create_undefined ();\n} /* backtrace_handler */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global = jerry_get_global_object ();\n\n  /* Register the \"dump_backtrace\" method. */\n  {\n    jerry_value_t func = jerry_create_external_function (backtrace_handler);\n    jerry_value_t name = jerry_create_string ((const jerry_char_t *) \"backtrace\");\n    jerry_value_t result = jerry_set_property (global, name, func);\n    jerry_release_value (result);\n    jerry_release_value (name);\n    jerry_release_value (func);\n  }\n\n  jerry_release_value (global);\n\n  const char *source = (\"function f() { g (); }\\n\"\n                        \"function g() { h (); }\\n\"\n                        \"function h() { backtrace (); }\\n\"\n                        \"f ();\\n\");\n  const char *resource = \"demo_memoryjs\";\n\n  jerry_value_t program = jerry_parse ((const jerry_char_t *) resource,\n                                       strlen (resource),\n                                       (const jerry_char_t *) source,\n                                       strlen (source),\n                                       JERRY_PARSE_NO_OPTS);\n  if (!jerry_value_is_error (program))\n  {\n    jerry_value_t run_result = jerry_run (program);\n    jerry_release_value (run_result);\n  }\n\n  jerry_release_value (program);\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_get_backtrace_from](#jerry_get_backtrace_from)\n- [jerry_create_external_function](#jerry_create_external_function)\n\n\n## jerry_get_backtrace_from\n\n**Summary**\n\nGet backtrace. The backtrace is an array of strings where\neach string contains the position of the corresponding frame.\nThe array length is zero if the backtrace is not available.\n\nCollecting the trace starts after the function specified in\nthe `ignored_function` parameter. This parameter can be used to\nskip the helper function(s) which collects the backtrace from\nthe backtrace data.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n- This feature depends on build option (`JERRY_LINE_INFO`) and can be checked\n  in runtime with the `JERRY_FEATURE_LINE_INFO` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_backtrace_from (uint32_t max_depth, jerry_value_t ignored_function);\n```\n\n- `max_depth` - backtrace collection stops after reaching this value, 0 = unlimited\n- `ignored_function` - if this function is present in the backtrace, the backtrace\n                       only contains the stack frames after the topmost instance of\n                       this function. Otherwise this parameter is ignored\n- return value\n  - a newly constructed JS array\n\n*New in version 2.4*.\n\n**Example**\n\n[doctest]: # (name=\"02.API-REFERENCE-jsbacktracefrom.c\")\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include \"jerryscript.h\"\n\nstatic jerry_value_t\nbacktrace_handler (const jerry_value_t function_obj,\n                   const jerry_value_t this_val,\n                   const jerry_value_t args_p[],\n                   const jerry_length_t args_count)\n{\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_LINE_INFO))\n  {\n    printf (\"Line info disabled, no backtrace will be printed\\n\");\n    return jerry_create_undefined ();\n  }\n\n  if (args_count < 1)\n  {\n    printf (\"Ignored function is not specified\\n\");\n    return jerry_create_undefined ();\n  }\n\n  /* If the line info feature is disabled an empty array will be returned. */\n  jerry_value_t backtrace_array = jerry_get_backtrace_from (0, args_p[0]);\n  uint32_t array_length = jerry_get_array_length (backtrace_array);\n\n  for (uint32_t idx = 0; idx < array_length; idx++)\n  {\n    jerry_value_t property = jerry_get_property_by_index (backtrace_array, idx);\n\n    jerry_char_t string_buffer[64];\n    jerry_size_t copied_bytes = jerry_substring_to_char_buffer (property,\n                                                                0,\n                                                                63,\n                                                                string_buffer,\n                                                                63);\n    string_buffer[copied_bytes] = '\\0';\n    printf(\" %d: %s\\n\", idx, string_buffer);\n\n    jerry_release_value (property);\n  }\n\n  jerry_release_value (backtrace_array);\n\n  return jerry_create_undefined ();\n} /* backtrace_handler */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global = jerry_get_global_object ();\n\n  /* Register the \"dump_backtrace\" method. */\n  {\n    jerry_value_t func = jerry_create_external_function (backtrace_handler);\n    jerry_value_t name = jerry_create_string ((const jerry_char_t *) \"backtrace\");\n    jerry_value_t result = jerry_set_property (global, name, func);\n    jerry_release_value (result);\n    jerry_release_value (name);\n    jerry_release_value (func);\n  }\n\n  jerry_release_value (global);\n\n  const char *source = (\"function f() { g (); }\\n\"\n                        \"function g() { h (); }\\n\"\n                        \"function h() { backtrace (g); }\\n\"\n                        \"f ();\\n\");\n  const char *resource = \"demo_memoryjs\";\n\n  jerry_value_t program = jerry_parse ((const jerry_char_t *) resource,\n                                       strlen (resource),\n                                       (const jerry_char_t *) source,\n                                       strlen (source),\n                                       JERRY_PARSE_NO_OPTS);\n  if (!jerry_value_is_error (program))\n  {\n    jerry_value_t run_result = jerry_run (program);\n    jerry_release_value (run_result);\n  }\n\n  jerry_release_value (program);\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_get_backtrace](#jerry_get_backtrace)\n\n\n## jerry_get_resource_name\n\n**Summary**\n\nGet the resource name (usually a file name) of the currently executed script or the given function object.\n\nThis function is typically called from native callbacks.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n- This feature depends on build option (`JERRY_LINE_INFO`) and can be checked\n  in runtime with the `JERRY_FEATURE_LINE_INFO` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_resource_name (jerry_value_t value);\n```\n- `value` - api value to obtain the resource name from\n- return string value constructed from\n  - the currently executed function object's resource name, if the given value is undefined\n  - resource name of the function object, if the given value is a function object\n  - \"<anonymous>\", otherwise\n\n*New in version 2.2*.\n\n**Example**\n\n[doctest]: # (name=\"02.API-REFERENCE-jsresourcename.c\")\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include \"jerryscript.h\"\n\nstatic jerry_value_t\nresource_name_handler (const jerry_value_t function_obj,\n                       const jerry_value_t this_val,\n                       const jerry_value_t args_p[],\n                       const jerry_length_t args_count)\n{\n  jerry_value_t undefined_value = jerry_create_undefined ();\n  jerry_value_t resource_name = jerry_get_resource_name (args_count > 0 ? args_p[0] : undefined_value);\n  jerry_release_value (undefined_value);\n\n  return resource_name;\n} /* resource_name_handler */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global = jerry_get_global_object ();\n\n  /* Register the \"resourceName\" method. */\n  {\n    jerry_value_t func = jerry_create_external_function (resource_name_handler);\n    jerry_value_t name = jerry_create_string ((const jerry_char_t *) \"resourceName\");\n    jerry_value_t result = jerry_set_property (global, name, func);\n    jerry_release_value (result);\n    jerry_release_value (name);\n    jerry_release_value (func);\n  }\n\n  jerry_release_value (global);\n\n  const jerry_char_t source[] = \"function myFunction() { return resourceName() }; myFunction()\";\n  const jerry_char_t resource[] = \"demo.js\";\n\n  jerry_value_t program = jerry_parse (resource,\n                                       sizeof (resource) - 1,\n                                       source,\n                                       sizeof (source) - 1,\n                                       JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (program))\n  {\n    /* `run_result` contains \"demo.js\" */\n    jerry_value_t run_result = jerry_run (program);\n\n    /* usage of `run_result` */\n\n    jerry_release_value (run_result);\n  }\n\n  jerry_release_value (program);\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_create_external_function](#jerry_create_external_function)\n\n## jerry_get_new_target\n\n**Summary**\n\nReturns the current \"new.target\" JavaScript function at the call site.\n\nIf used outside of a native C function it will return \"undefined\" value.\n\n*Notes*:\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n- This feature depends on build option (`JERRY_ESNEXT`) and can be checked\n  in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value (as symbols are enabled in case of ES.next),\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- If the ES.next mode is not enabled this method will always return the \"undefined\" value.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_new_target (void);\n```\n- return\n  - \"undefined\" - if at the call site it was not a constructor call.\n  - function object - if the current call site is in a constructor call.\n\n*New in version 2.2*.\n\n**Example 1**\n\n[doctest]: # (name=\"02.API-REFERENCE-jsnewtarget-01.c\")\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include <jerryscript.h>\n\nstatic jerry_value_t\ndemo_handler (const jerry_value_t func_obj_val,\n              const jerry_value_t this_val,\n              const jerry_value_t args_p[],\n              const jerry_length_t args_cnt)\n{\n  jerry_value_t new_target = jerry_get_new_target ();\n\n  /* new_target is the \"demo\" JS function object */\n  if (jerry_value_get_type (new_target) == JERRY_TYPE_FUNCTION)\n  {\n    printf (\"This is a construct call\\r\\n\");\n  }\n\n  jerry_release_value (new_target);\n\n  return jerry_create_undefined ();\n}\n\nint\nmain (int argc, char** argv)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t function_val = jerry_create_external_function (demo_handler);\n\n  jerry_value_t ret_val = jerry_construct_object (function_val, NULL, 0);\n\n  jerry_release_value (ret_val);\n  jerry_release_value (function_val);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**Example 2**\n\n[doctest]: # (name=\"02.API-REFERENCE-jsnewtarget-02.c\")\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include <jerryscript.h>\n\nstatic jerry_value_t\ndemo_handler (const jerry_value_t func_obj_val,\n              const jerry_value_t this_val,\n              const jerry_value_t args_p[],\n              const jerry_length_t args_cnt)\n{\n  jerry_value_t new_target = jerry_get_new_target ();\n\n  /* new_target is a JS function object */\n  if (jerry_value_get_type (new_target) == JERRY_TYPE_FUNCTION)\n  {\n    printf (\"This is a construct call\\r\\n\");\n  }\n\n  jerry_release_value (new_target);\n\n  return jerry_create_undefined ();\n}\n\nint\nmain (int argc, char** argv)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* register C method */\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n  jerry_value_t function_val = jerry_create_external_function (demo_handler);\n  jerry_value_t function_name_val = jerry_create_string ((const jerry_char_t *) \"demo\");\n  jerry_value_t result_val = jerry_set_property (global_obj_val, function_name_val, function_val);\n  jerry_release_value (result_val);\n  jerry_release_value (function_name_val);\n  jerry_release_value (function_val);\n  jerry_release_value (global_obj_val);\n\n  /* Invoke C method via JS */\n  const char *src = \"new demo ()\";\n  jerry_value_t ret_val = jerry_eval ((const jerry_char_t *) src,\n                                      strlen (src),\n                                      JERRY_PARSE_NO_OPTS);\n\n  jerry_release_value (ret_val);\n\n  jerry_cleanup ();\n  return 0;\n}\n```\n\n**See also**\n\n- [jerry_construct_object](#jerry_construct_object)\n\n# Functions for realm objects\n\nThese APIs all depend on build option (`JERRY_BUILTIN_REALMS`).\n\n## jerry_set_realm\n\n**Summary**\n\nReplaces the currently active realm (including the global object) with another realm.\nThe replacement should be temporary, and the original realm must be restored after\nthe tasks are completed. During the replacement, the realm must be referenced\nby the application (i.e. the gc must not reclaim it). This is also true to\nthe returned previously active realm, so there is no need to free the value\nafter the restoration. The function can only fail if realms are not supported\nor the passed argument is not a realm. In this case the returned exception must\nbe freed by [jerry_release_value](#jerry_release_value).\n\nThis function is useful to parse a script, create a native function, load a snapshot\nor create an exception in another realm. Each ECMAScript code runs in the realm\nwhich was active when the code was parsed or loaded regardless of the current realm.\n\n*Notes*:\n- This feature depends on build option (`JERRY_BUILTIN_REALMS`) and can be checked\n  in runtime with the `JERRY_FEATURE_REALM` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_set_realm (jerry_value_t realm_value);\n```\n- `realm_value` - the new realm value\n- return\n  - previous realm value - if the passed value is a realm\n  - exception - otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  jerry_value_t realm_value = jerry_create_realm ();\n\n  jerry_value_t old_realm = jerry_set_realm (realm_value);\n\n  ... // usage of the realm\n\n  jerry_set_realm (old_realm);\n}\n```\n\n**See also**\n\n- [jerry_create_realm](#jerry_create_realm)\n\n## jerry_realm_get_this\n\n**Summary**\n\nGets the 'this' binding of a realm. The 'this' binding is always an object.\nBy default the 'this' binding is the same as the realm object and can be\nchanged by [jerry_realm_set_this](#jerry_realm_set_this).\n\n*Notes*:\n- This feature depends on build option (`JERRY_BUILTIN_REALMS`) and can be checked\n  in runtime with the `JERRY_FEATURE_REALM` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_realm_get_this (jerry_value_t realm_value)\n```\n- `realm_value` - realm value\n- return\n  - type error - if realm_value is not a realm\n  - 'this' binding object - otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  jerry_value_t realm_value = jerry_create_realm ();\n\n  jerry_value_t this_value = jerry_realm_get_this (realm_value);\n\n  ... // usage of the this_value\n\n  jerry_release_value (this_value);\n  jerry_release_value (realm_value);\n}\n```\n\n**See also**\n\n- [jerry_create_realm](#jerry_create_realm)\n- [jerry_realm_set_this](#jerry_realm_set_this)\n\n## jerry_realm_set_this\n\n**Summary**\n\nSets the 'this' binding of a realm. This function must be called before executing\nany script on the realm. Otherwise the operation is undefined.\n\n*Notes*:\n- This feature depends on build option (`JERRY_BUILTIN_REALMS`) and can be checked\n  in runtime with the `JERRY_FEATURE_REALM` feature enum value,\n  see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).\n- The es.next profile enables this by default.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_realm_set_this (jerry_value_t realm_value, jerry_value_t this_value)\n```\n- `realm_value` - realm value\n- `this_value` - new this value\n- return\n  - type error - if realm_value is not a realm or this_value is not object\n  - true - otherwise\n\n*New in version 2.4*.\n\n**Example**\n\n```c\n{\n  jerry_value_t realm_value = jerry_create_realm ();\n\n  jerry_value_t old_realm = jerry_set_realm (realm_value);\n  /* The prototype of the object comes from the new realm. */\n  jerry_value_t this_value = jerry_create_object ();\n  jerry_set_realm (old_realm);\n\n  jerry_value_t result = jerry_realm_set_this (realm_value, this_value);\n\n  ... // usage of the realm\n}\n```\n\n**See also**\n\n- [jerry_create_realm](#jerry_create_realm)\n- [jerry_set_realm](#jerry_set_realm)\n- [jerry_realm_get_this](#jerry_realm_get_this)\n\n# ArrayBuffer and TypedArray functions\n\nThese APIs all depend on the es.next profile.\n\n## jerry_get_arraybuffer_byte_length\n\n**Summary**\n\nGet the byte length property of the ArrayBuffer. This is the\nsame value which was passed to the ArrayBuffer constructor call.\n\n**Prototype**\n\n```c\njerry_length_t\njerry_get_arraybuffer_byte_length (const jerry_value_t value);\n```\n\n- `value` - ArrayBuffer object\n- return value\n  - size of the ArrayBuffer in bytes\n  - 0 if the `value` parameter is not an ArrayBuffer\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t buffer = jerry_create_arraybuffer (15);\n  jerry_length_t length = jerry_get_arraybuffer_byte_length (buffer);\n  // length should be 15\n\n  jerry_release_value (buffer);\n}\n```\n\n**See also**\n- [jerry_create_arraybuffer](#jerry_create_arraybuffer)\n\n\n## jerry_arraybuffer_read\n\n**Summary**\n\nCopy the portion of the ArrayBuffer into a user provided buffer.\nThe start offset of the read operation can be specified.\n\nThe number bytes to be read can be specified via the `buf_size`\nparameter. It is not possible to read more than the length of\nthe ArrayBuffer.\n\nFunction returns the number of bytes read from the ArrayBuffer\n(and written to the buffer parameter). This value is\ncalculated in the following way: `min(array buffer length - offset, buf_size)`.\n\n**Prototype**\n\n```c\njerry_length_t\njerry_arraybuffer_read (const jerry_value_t value,\n                        jerry_length_t offset,\n                        uint8_t *buf_p,\n                        jerry_length_t buf_size);\n```\n\n- `value` - ArrayBuffer to read from\n- `offset` - start offset of the read operation\n- `buf_p` - buffer to read the data to\n- `buf_size` - maximum number of bytes to read into the buffer\n- return value\n  - number of bytes written into the buffer (read from the ArrayBuffer)\n  - 0 if the `value` is not an ArrayBuffer object\n  - 0 if the `buf_size` is zero or there is nothing to read\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  uint8_t data[20];\n  jerry_value_t buffer;\n  // ... create the ArrayBuffer or acuiqre it from somewhere.\n\n  jerry_value_t bytes_read;\n\n  // read 10 bytes from the start of the ArrayBuffer.\n  bytes_read = jerry_arraybuffer_read (buffer, 0, data, 10);\n  // read the next 10 bytes\n  bytes_read += jerry_arraybuffer_read (buffer, bytes_read, data + bytes_read, 10);\n\n  // process the data variable\n\n  jerry_release_value (buffer);\n}\n```\n\n**See also**\n\n- [jerry_create_arraybuffer](#jerry_create_arraybuffer)\n- [jerry_arraybuffer_write](#jerry_arraybuffer_write)\n- [jerry_get_arraybuffer_byte_length](#jerry_get_arraybuffer_byte_length)\n\n\n## jerry_arraybuffer_write\n\n**Summary**\n\nCopy the contents of a buffer into the ArrayBuffer.\nThe start offset of the write operation can be specified.\n\nThe number bytes to be written can be specified via the `buf_size`\nparameter. It is not possible to write more than the length of\nthe ArrayBuffer.\n\nFunction returns the number of bytes written into the ArrayBuffer\n(and read from the buffer parameter). This value is\ncalculated in the following way: `min(array buffer length - offset, buf_size)`.\n\n**Prototype**\n\n```c\njerry_length_t\njerry_arraybuffer_write (const jerry_value_t value,\n                         jerry_length_t offset,\n                         const uint8_t *buf_p,\n                         jerry_length_t buf_size);\n```\n\n- `value` - ArrayBuffer to write to\n- `offset` - start offset of the write operation\n- `buf_p` - buffer to read the data from\n- `buf_size` - maximum number of bytes to write into the ArrayBuffer\n- return value\n  - number of bytes written into the ArrayBuffer (read from the buffer parameter)\n  - 0 if the `value` is not an ArrayBuffer object\n  - 0 if the `buf_size` is zero or there is nothing to write\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  uint8_t data[20];\n\n  // fill the data with values\n  for (int i = 0; i < 20; i++)\n  {\n    data[i] = (uint8_t) (i * 2);\n  }\n\n  jerry_value_t buffer;\n  // ... create the ArrayBuffer or acquire it from somewhere.\n\n  jerry_value_t bytes_written;\n\n  // write 10 bytes from to the start of the ArrayBuffer.\n  bytes_written = jerry_arraybuffer_write (buffer, 0, data, 10);\n  // read the next 10 bytes\n  bytes_written += jerry_arraybuffer_write (buffer, bytes_written, data + bytes_written, 10);\n\n  // use the ArrayBuffer\n\n  jerry_release_value (buffer);\n}\n```\n\n**See also**\n\n- [jerry_create_arraybuffer](#jerry_create_arraybuffer)\n- [jerry_arraybuffer_write](#jerry_arraybuffer_write)\n- [jerry_get_arraybuffer_byte_length](#jerry_get_arraybuffer_byte_length)\n\n\n## jerry_get_arraybuffer_pointer\n\n**Summary**\n\nThe function allows access to the contents of the Array Buffer directly.\n\n**WARNING!** This operation is for expert use only! The programmer must\nensure that the returned memory area is used correctly. That is\nthere is no out of bounds reads or writes. The lifetime of the underlying\ndata buffer is managed by the ArrayBuffer value. Make sure to acquire the\nvalue with [`jerry_acquire_value`](#jerry_acquire_value) if the data\nbuffer is needed later.\n\n**Prototype**\n\n```c\nuint8_t *\njerry_get_arraybuffer_pointer (const jerry_value_t value);\n```\n\n- `value` - Array Buffer object.\n- return value\n  - pointer to the Array Buffer's data area.\n  - NULL if the `value` is:\n    - not an ArrayBuffer object\n    - an external ArrayBuffer has been detached\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  // create the ArrayBuffer\n  jerry_value_t buffer = jerry_create_arraybuffer (16);\n\n  uint8_t *const data = jerry_get_arraybuffer_pointer (buffer);\n\n  for (int i = 0; i < 16; i++)\n  {\n    data[i] = (uint8_t) (i + 4);\n  }\n\n  // use the Array Buffer\n\n  // release buffer as it is not needed after this point\n  jerry_release_value (buffer);\n}\n```\n\n**See also**\n\n- [jerry_create_arraybuffer_external](#jerry_create_arraybuffer_external)\n\n## jerry_is_arraybuffer_detachable\n\n**Summary**\n\nGet if the ArrayBuffer is detachable.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_is_arraybuffer_detachable (const jerry_value_t value);\n```\n\n- `value` - ArrayBuffer to be detached\n- return\n  - boolean value if success\n  - Error otherwise\n\n*New in version 2.2*.\n\n**Example**\n\n```c\n{\n  // create the ArrayBuffer\n  jerry_value_t buffer = jerry_create_arraybuffer (16);\n\n  jerry_value_t res = jerry_is_arraybuffer_detachable (buffer);\n  bool is_detachable = jerry_get_boolean_value (res);\n\n  // release buffer as it is not needed after this point\n  jerry_release_value (res);\n  jerry_release_value (buffer);\n}\n```\n\n**See also**\n\n- [jerry_detach_arraybuffer](#jerry_detach_arraybuffer)\n\n## jerry_detach_arraybuffer\n\n**Summary**\n\nDetach the underlying data block from ArrayBuffer and set its bytelength to 0.\n\nThis operation requires the ArrayBuffer to be external that created by\n`jerry_create_arraybuffer_external`.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_detach_arraybuffer (const jerry_value_t value);\n```\n\n*Note*: If the ArrayBuffer has been created with `jerry_create_arraybuffer_external` the optional free callback is called on a successful detach operation\n\n- `value` - ArrayBuffer to be detached\n- return\n  - null value if success\n  - Error otherwise\n\n*New in version 2.2*.\n\n**Example**\n\n```c\n{\n  uint8_t buf[1];\n  jerry_size_t length = 1;\n  // create the ArrayBuffer\n  jerry_value_t buffer = jerry_create_arraybuffer (length, buf, NULL);\n\n  jerry_value_t res = jerry_detach_arraybuffer (buffer);\n\n  // release buffer as it is not needed after this point\n  jerry_release_value (res);\n  jerry_release_value (buffer);\n}\n```\n\n**See also**\n\n- [jerry_is_arraybuffer_detachable](#jerry_is_arraybuffer_detachable)\n\n## jerry_get_dataview_buffer\n\n**Summary**\n\nGet the ArrayBuffer object used by a DataView object.\nAdditionally returns the byteLength and byteOffset properties\nof the DataView object.\n\nFor the returned ArrayBuffer the [jerry_release_value](#jerry_release_value)\nmust be called when it is no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_dataview_buffer (const jerry_value_t value,\n                           jerry_length_t *byteOffset,\n                           jerry_length_t *byteLength);\n```\n\n- `value` - DataView to get the ArrayBuffer from\n- `byteOffset` - (Optional) returns the start offset of the ArrayBuffer for the DataView\n- `byteLength` - (Optional) returns the number of bytes used from the ArrayBuffer for the DataView\n- return\n  - DataView object's underlying ArrayBuffer object\n  - TypeError if the `value` is not a DataView object\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t arraybuffer = jerry_create_arraybuffer (16);\n  jerry_value_t dataview = jerry_create_dataview (arraybuffer, 0, 16);\n  jerry_length_t byteOffset = 0;\n  jerry_length_t byteLength = 0;\n  jerry_value_t buffer = jerry_get_dataview_buffer (dataview, &byteOffset, &byteLength);\n\n  // buffer is an ArrayBuffer object and ArrayBuffer operations can be performed on it\n  // byteOffset is 0\n  // byteLength is 16\n\n  // usage of buffer\n\n  jerry_release_value (buffer);\n  jerry_release_value (dataview);\n  jerry_release_value (arraybuffer);\n\n  jerry_cleanup ();\n}\n```\n\n**See also**\n\n- [jerry_create_dataview](#jerry_create_dataview)\n\n\n## jerry_get_typedarray_type\n\n**Summary**\n\nGet the type of the TypedArray.\n\nThe returned type is one of the [jerry_typedarray_type_t](#jerry_typedarray_type_t)\nenum value.\n\n**Prototype**\n\n```c\njerry_typedarray_type_t\njerry_get_typedarray_type (jerry_value_t value);\n```\n\n- `value` - TypedArray object to query for type.\n- return\n  - the type of the TypedArray\n  - JERRY_TYPEDARRAY_INVALID if the object was not a TypedArray\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_typedarray_type_t expected_type = JERRY_TYPEDARRAY_UINT32;\n  jerry_value_t typedarray = jerry_create_typedarray (expected_klass, 25);\n\n  jerry_typedarray_type_t type = jerry_get_typedarray_type (typedarray);\n\n  // 'type' is now JERRY_TYPEDARRAY_UINT32\n\n  jerry_release_value (typedarray);\n}\n```\n\n**See also**\n\n- [jerry_create_typedarray](#jerry_create_typedarray)\n- [jerry_typedarray_type_t](#jerry_typedarray_type_t)\n\n\n## jerry_get_typedarray_length\n\n**Summary**\n\nGet the element count of the TypedArray as specified during creation.\n\nThis is not the same as the byteLength property of a TypedArray object.\n\n**Prototype**\n\n```\njerry_length_t\njerry_get_typedarray_length (jerry_value_t value);\n```\n\n- `value` - TypedArray object to query\n- return\n  - length (element count) of the TypedArray object\n  - 0 if the object is not a TypedArray\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t array = jerry_create_typedarray (JERRY_TYPEDARRAY_INT32, 21);\n\n  jerry_length_t element_count = jerry_get_typedarray_length (array);\n\n  // element_count is now 21.\n\n  jerry_release_value (array);\n}\n```\n\n**See also**\n\n- [jerry_create_typedarray](#jerry_create_typedarray)\n\n\n## jerry_get_typedarray_buffer\n\n**Summary**\n\nGet the ArrayBuffer object used by a TypedArray object.\nAdditionally returns the byteLength and byteOffset properties\nof the TypedArray object.\n\nFor the returned ArrayBuffer the [jerry_release_value](#jerry_release_value)\nmust be called.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_get_typedarray_buffer (jerry_value_t value,\n                             jerry_length_t *byteOffset,\n                             jerry_length_t *byteLength);\n```\n\n- `value` - TypedArray to get the ArrayBuffer from\n- `byteOffset` - (Optional) returns the start offset of the ArrayBuffer for the TypedArray\n- `byteLength` - (Optional) returns the number of bytes used from the ArrayBuffer for the TypedArray\n- return\n  - TypedArray object's underlying ArrayBuffer object\n  - TypeError if the `value` is not a TypedArray object\n\n*New in version 2.0*.\n\n**Example**\n\n```c\n{\n  jerry_value_t array = jerry_create_typedarray (JERRY_TYPEDARRAY_INT16, 11);\n\n  jerry_length_t byteLength = 0;\n  jerry_length_t byteOffset = 0;\n  jerry_value_t buffer = jerry_get_typedarray_buffer (array, &byteOffset, &byteLength);\n\n  // buffer is an ArrayBuffer object and ArrayBuffer operations can be performed on it\n  // byteLength is 11 * 2  (2 as the TypedArray stores Int16 that is 2 byte elements)\n  // byteOffset is 0\n\n  jerry_release_value (buffer);\n  jerry_release_value (array);\n}\n```\n\n**See also**\n\n- [jerry_create_typedarray](#jerry_create_typedarray)\n\n# JSON functions\n\n## jerry_json_parse\n\n**Summary**\n\nParses a JSON string creating a JavaScript value. The behaviour is equivalent with\nthe \"JSON.parse(string)\" JS call.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_json_parse (const jerry_char_t *string_p,\n                  jerry_size_t string_size);\n```\n\n- `string_p` - pointer to a JSON string.\n- `string_size` - size of the string.\n- return\n  - `jerry_value_t` containing a JavaScript value.\n  - Error value in case of any parse error.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const jerry_char_t data[] = \"{\\\"name\\\": \\\"John\\\", \\\"age\\\": 5}\";\n  jerry_value_t obj = jerry_json_parse (data, sizeof (data) - 1);\n\n  /* \"obj\" now conatins and object created from the \"data\" JSON string. */\n\n  jerry_release_value (obj);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n## jerry_json_stringify\n\n**Summary**\n\nCreate a JSON string value from a JavaScript value. The behaviour is equivalent with\nthe \"JSON.stringify(input_value)\" JS call.\n\n*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\nis no longer needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerry_json_stringify (const jerry_value_t input_value);\n```\n\n- `input_value` - a `jerry_value_t` to stringify.\n- return\n  - `jerry_value_t` containing a JSON string.\n  - Error value in case of any stringification error.\n\n*New in version 2.0*.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t obj = jerry_create_object ();\n  {\n    jerry_value_t key = jerry_create_string ((const jerry_char_t *) \"name\");\n    jerry_value_t value = jerry_create_string ((const jerry_char_t *) \"John\");\n    jerry_release_value (jerry_set_property (obj, key, value));\n    jerry_release_value (key);\n    jerry_release_value (value);\n  }\n\n  jerry_value_t stringified = jerry_json_stringify (obj);\n\n  /* \"stringified\" now contains a JSON string */\n\n  jerry_release_value (stringified);\n  jerry_release_value (obj);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/03.API-EXAMPLE.md",
    "content": "JerryScript Engine can be embedded into any application, providing the way to run JavaScript in a large range of environments - from desktops to low-memory microcontrollers.\n\nThis guide is intended to introduce you to JerryScript embedding API and to create a minimal JavaScript shell.\nThe examples are not using all API methods please also check out the API reference document which contains additional examples.\n\n\n## Before trying out the examples: Get and build JerryScript library\n\nBefore getting started using the JerryScript library it should be cloned and built for a target os/device.\n\nThere are quite a few configuration options but for these examples the JerryScript is built\n**with default configuration** and installed to a user directory on a Linux system.\nThis is done by the following commands:\n\n```sh\n$ mkdir jerry\n$ cd jerry\n$ git clone https://github.com/jerryscript-project/jerryscript.git\n$ jerryscript/tools/build.py --builddir=$(pwd)/example_build --cmake-param=\"-DCMAKE_INSTALL_PREFIX=$(pwd)/example_install/\"\n$ make -C $(pwd)/example_build install\n```\n\nWith this the JerryScript library is installed into the `$(pwd)/example_install/{include,lib}` directories.\n\nIn this guide we will use `pkg-config` to ease the usage of headers and libraries.\nIn order to do so, the following export is required (executed from the jerry directory):\n\n```sh\n$ export PKG_CONFIG_PATH=$(pwd)/example_install/lib/pkgconfig/\n```\n\nTest if the `pkg-config` works for JerryScript:\n\n```sh\n$ pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-ext libjerry-math\n```\n\n## Example 1. Execute JavaScript from your application\n\nThe most basic example to test the engine is to create an `api-example-1.c` file containing the following code:\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  const jerry_char_t script[] = \"var str = 'Hello, World!';\";\n\n  bool ret_value = jerry_run_simple (script, sizeof (script) - 1, JERRY_INIT_EMPTY);\n\n  return (ret_value ? 0 : 1);\n}\n```\n\nTo compile it one can use the following command:\n\n```sh\n$ gcc api-example-1.c -o api-example-1 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)\n```\n\nIf everything is correct the application returns with a zero exit code:\n\n```\n$ ./api-example-1\n$ echo $?\n```\n\n## Example 2. Split engine initialization and script execution.\n\nIn this example the engine is initialized directly with the `jerry_init` method\nand cleaned up with the `jerry_cleanup` method. The example JavaScript code\nis directly parsed and executed via the `jerry_eval` method. Each `jerry_value_t`\nreturned by the API methods is freed with the `jerry_release_value` method.\n\nTo make sure that the code parsing and execution was ok, the `jerry_value_is_error`\nmethod is used to check for any errors.\n\nUse the following code for the `api-example-2.c` file:\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  const jerry_char_t script[] = \"var str = 'Hello, World!';\";\n  const jerry_length_t script_size = sizeof (script) - 1;\n  /* Note: sizeof can be used here only because the compiler knows the static character arrays's size.\n   * If this is not the case, strlen should be used instead.\n   */\n\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Run the demo script with 'eval' */\n  jerry_value_t eval_ret = jerry_eval (script,\n                                       script_size,\n                                       JERRY_PARSE_NO_OPTS);\n\n  /* Check if there was any error (syntax or runtime) */\n  bool run_ok = !jerry_value_is_error (eval_ret);\n\n  /* Parsed source code must be freed */\n  jerry_release_value (eval_ret);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return (run_ok ? 0 : 1);\n}\n```\n\nTo compile it one can use the following command:\n\n```sh\n$ gcc api-example-2.c -o api-example-2 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)\n```\n\nIf everything is correct the application returns with a zero exit code:\n\n```\n$ ./api-example-2\n$ echo $?\n```\n\n## Example 3. Split JavaScript parsing and script execution\n\nIn this example the `jerry_eval` is replaced with a more common API calls:\n\n- script code setup - `jerry_parse`.\n- script execution - `jerry_run`.\n\nThe `api-example-3.c` file should contain the following code:\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n\nint\nmain (void)\n{\n  bool run_ok = false;\n\n  const jerry_char_t script[] = \"var str = 'Hello, World!';\";\n\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Setup Global scope code */\n  jerry_value_t parsed_code = jerry_parse (NULL, 0, script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  /* Check if there is any JS code parse error */\n  if (!jerry_value_is_error (parsed_code))\n  {\n    /* Execute the parsed source code in the Global scope */\n    jerry_value_t ret_value = jerry_run (parsed_code);\n\n    /* Check the execution return value if there is any error */\n    run_ok = !jerry_value_is_error (ret_value);\n\n    /* Returned value must be freed */\n    jerry_release_value (ret_value);\n  }\n\n  /* Parsed source code must be freed */\n  jerry_release_value (parsed_code);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return (run_ok ? 0 : 1);\n}\n```\n\nTo compile it one can use the following command:\n\n```sh\n$ gcc api-example-3.c -o api-example-3 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)\n```\n\nIf everything is correct the application returns with a zero exit code:\n\n```\n$ ./api-example-3\n$ echo $?\n```\n\n## Example 4. Adding a C method for JavaScript\n\nThe previous examples were not that eye catching as there were no visual output by the JavaScript code\nand C program.\n\nIn this example a very simple \"print\" method is added which prints out a static string.\nThis method will be implemented in C and will be called from the JavaScript code.\nFor this a few extra API methods are required:\n\n- `jerry_get_global_object`\n- `jerry_create_string`\n- `jerry_set_property`\n- `jerry_create_external_function`\n\nThe `api-example-4.c` file should contain the following code:\n\n[doctest]: # ()\n\n```c\n#include <stdio.h>\n#include \"jerryscript.h\"\n\nstatic jerry_value_t\nprint_handler (const jerry_value_t function_object,\n               const jerry_value_t function_this,\n               const jerry_value_t arguments[],\n               const jerry_length_t argument_count)\n{\n  /* No arguments are used in this example */\n  /* Print out a static string */\n  printf (\"Print handler was called\\n\");\n\n  /* Return an \"undefined\" value to the JavaScript engine */\n  return jerry_create_undefined ();\n}\n\nint\nmain (void)\n{\n  const jerry_char_t script[] = \"print ();\";\n  const jerry_length_t script_size = sizeof (script) - 1;\n\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Add the \"print\" method for the JavaScript global object */\n  {\n    /* Get the \"global\" object */\n    jerry_value_t global_object = jerry_get_global_object ();\n    /* Create a \"print\" JS string */\n    jerry_value_t property_name_print = jerry_create_string ((const jerry_char_t *) \"print\");\n    /* Create a function from a native C method (this function will be called from JS) */\n    jerry_value_t property_value_func = jerry_create_external_function (print_handler);\n    /* Add the \"print\" property with the function value to the \"global\" object */\n    jerry_value_t set_result = jerry_set_property (global_object, property_name_print, property_value_func);\n\n    /* Check if there was no error when adding the property (in this case it should never happen) */\n    if (jerry_value_is_error (set_result)) {\n      printf (\"Failed to add the 'print' property\\n\");\n    }\n\n    /* Release all jerry_value_t-s */\n    jerry_release_value (set_result);\n    jerry_release_value (property_value_func);\n    jerry_release_value (property_name_print);\n    jerry_release_value (global_object);\n  }\n\n  /* Setup Global scope code */\n  jerry_value_t parsed_code = jerry_parse (NULL, 0, script, script_size, JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (parsed_code))\n  {\n    /* Execute the parsed source code in the Global scope */\n    jerry_value_t ret_value = jerry_run (parsed_code);\n\n    /* Returned value must be freed */\n    jerry_release_value (ret_value);\n  }\n\n  /* Parsed source code must be freed */\n  jerry_release_value (parsed_code);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n\nTo compile it one can use the following command:\n\n```sh\n$ gcc api-example-4.c -o api-example-4 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)\n```\n\nIf everything is correct the application should print out the message present in the `print_handler` method:\n\n```\n$ ./api-example-4\n```\n\n## Example 5. Passing and processing arguments for native C code\n\nIn the previous example the `print_handler` simply wrote a static string to the standard output.\nHowever in most cases this is not useful, ideally the method's argument(s) should be printed.\n\nIn this example the `print_handler` is extended to convert the first\nargument (which probably comes from a JavaScript source) to a JS string and prints it out to the standard output.\n\nNew API methods used:\n\n- `jerry_value_to_string`\n- `jerry_string_to_utf8_char_buffer`\n\nThe `api-example-5.c` file should contain the following code:\n\n[doctest]: # ()\n\n```c\n#include <stdio.h>\n#include \"jerryscript.h\"\n\nstatic jerry_value_t\nprint_handler (const jerry_value_t function_object,\n               const jerry_value_t function_this,\n               const jerry_value_t arguments[],\n               const jerry_length_t arguments_count)\n{\n  /* There should be at least one argument */\n  if (arguments_count > 0)\n  {\n    /* Convert the first argument to a string (JS \"toString\" operation) */\n    jerry_value_t string_value = jerry_value_to_string (arguments[0]);\n\n    /* A naive allocation of buffer for the string */\n    jerry_char_t buffer[256];\n\n    /* Copy the whole string to the buffer, without a null termination character,\n     * Please note that if the string does not fit into the buffer nothing will be copied.\n     * More details on the API reference page\n     */\n    jerry_size_t copied_bytes = jerry_string_to_utf8_char_buffer (string_value, buffer, sizeof (buffer) - 1);\n    buffer[copied_bytes] = '\\0';\n\n    /* Release the \"toString\" result */\n    jerry_release_value (string_value);\n\n    printf (\"%s\\n\", (const char *)buffer);\n  }\n\n  /* Return an \"undefined\" value to the JavaScript engine */\n  return jerry_create_undefined ();\n}\n\nint\nmain (void)\n{\n  const jerry_char_t script[] = \"print ('Hello from JS!');\";\n  const jerry_length_t script_size = sizeof (script) - 1;\n\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Add the \"print\" method for the JavaScript global object */\n  {\n    /* Get the \"global\" object */\n    jerry_value_t global_object = jerry_get_global_object ();\n    /* Create a \"print\" JS string */\n    jerry_value_t property_name_print = jerry_create_string ((const jerry_char_t *) \"print\");\n    /* Create a function from a native C method (this function will be called from JS) */\n    jerry_value_t property_value_func = jerry_create_external_function (print_handler);\n    /* Add the \"print\" property with the function value to the \"global\" object */\n    jerry_value_t set_result = jerry_set_property (global_object, property_name_print, property_value_func);\n\n    /* Check if there was no error when adding the property (in this case it should never happen) */\n    if (jerry_value_is_error (set_result)) {\n      printf (\"Failed to add the 'print' property\\n\");\n    }\n\n    /* Release all jerry_value_t-s */\n    jerry_release_value (set_result);\n    jerry_release_value (property_value_func);\n    jerry_release_value (property_name_print);\n    jerry_release_value (global_object);\n  }\n\n  /* Setup Global scope code */\n  jerry_value_t parsed_code = jerry_parse (NULL, 0, script, script_size, JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (parsed_code))\n  {\n    /* Execute the parsed source code in the Global scope */\n    jerry_value_t ret_value = jerry_run (parsed_code);\n\n    /* Returned value must be freed */\n    jerry_release_value (ret_value);\n  }\n\n  /* Parsed source code must be freed */\n  jerry_release_value (parsed_code);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n\nTo compile it one can use the following command:\n\n```sh\n$ gcc api-example-5.c -o api-example-5 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)\n```\n\nIf everything is correct the application should print out the string passed for the `print` method in the JS code:\n\n```\n$ ./api-example-5\n```\n\n\n## Example 6. Using JerryScript Extensions\n\nSome of the previous examples used a \"print\" method to write data out to the standard output.\nFor convenience JerryScript provides an extension to add a simple \"print\" handler which\ncan be used by other applications.\n\nIn this example the following extension methods are used:\n\n- `jerryx_handler_register_global`\n- `jerryx_handler_print`\n\nIn further examples this \"print\" handler will be used.\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nint\nmain (void)\n{\n  const jerry_char_t script[] = \"print ('Hello from JS with ext!');\";\n  const jerry_length_t script_size = sizeof (script) - 1;\n\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Register 'print' function from the extensions to the global object */\n  jerryx_handler_register_global ((const jerry_char_t *) \"print\",\n                                  jerryx_handler_print);\n\n  /* Setup Global scope code */\n  jerry_value_t parsed_code = jerry_parse (NULL, 0, script, script_size, JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (parsed_code))\n  {\n    /* Execute the parsed source code in the Global scope */\n    jerry_value_t ret_value = jerry_run (parsed_code);\n\n    /* Returned value must be freed */\n    jerry_release_value (ret_value);\n  }\n\n  /* Parsed source code must be freed */\n  jerry_release_value (parsed_code);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n\nTo compile it one can use the following command:\n\n(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.\n\n```sh\n$ gcc api-example-6.c -o api-example-6 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)\n```\n\nIf everything is correct the application should print out the string passed for the `print` method in the JS code:\n\n```\n$ ./api-example-6\n```\n\n## Example 7. Interaction with JavaScript environment - adding a string property\n\nPreviously a C method was registered for the global object, now this examples show how one can add a string\nproperty.\n\nUse the following code as the `api-example-7.c` file:\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nint\nmain (void)\n{\n  const jerry_char_t script[] = \"print (my_var);\";\n\n  /* Initializing JavaScript environment */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Register 'print' function from the extensions */\n  jerryx_handler_register_global ((const jerry_char_t *) \"print\",\n                                  jerryx_handler_print);\n\n  /* Getting pointer to the Global object */\n  jerry_value_t global_object = jerry_get_global_object ();\n\n  /* Constructing strings */\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"my_var\");\n  jerry_value_t prop_value = jerry_create_string ((const jerry_char_t *) \"Hello from C!\");\n\n  /* Setting the string value as a property of the Global object */\n  jerry_value_t set_result = jerry_set_property (global_object, prop_name, prop_value);\n  /* The 'set_result' should be checked if there was any error */\n  if (jerry_value_is_error (set_result)) {\n    printf (\"Failed to add the 'my_var' property\\n\");\n  }\n  jerry_release_value (set_result);\n\n  /* Releasing string values, as it is no longer necessary outside of engine */\n  jerry_release_value (prop_name);\n  jerry_release_value (prop_value);\n\n  /* Releasing the Global object */\n  jerry_release_value (global_object);\n\n  /* Now starting script that would output value of just initialized field */\n  jerry_value_t eval_ret = jerry_eval (script,\n                                       sizeof (script) - 1,\n                                       JERRY_PARSE_NO_OPTS);\n\n  /* Free JavaScript value, returned by eval */\n  jerry_release_value (eval_ret);\n\n  /* Freeing engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\nTo compile it one can use the following command:\n\n(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.\n\n```sh\n$ gcc api-example-7.c -o api-example-7 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)\n```\n\nThe sample will output 'Hello from C!'. However, now it is not just a part of the source script, but the value, dynamically supplied to the engine:\n\n```\n$ ./api-example-7\n```\n\n## Example 8. Description of JerryScript value descriptors\n\nJerryScript value can be a boolean, number, null, object, string, undefined or some special type of objects (arraybuffer, symbols, etc).\n\nThere is a special \"error\" value which wraps another value. This \"error\" can be created by throwing a JavaScript value from JS code\nor via API method(s). It is advised to check for this error with the `jerry_value_is_error` method as not all API methods\ncan process error values. To extract the value from the \"error\" the API method `jerry_get_value_from_error` should be used.\nIf an error object is created via API method (for example with `jerry_create_error`) the \"error\" value is automatically created.\n\nNotice the difference between error value and error object:\n- The error object is a object which was constructed via one of the `Error` objects (available from the global object or from API).\n  For example in JS such object be created with the following code example:\n\n```js\nvar error_object = new Error (\"error message\");\n```\n\n- The error value is not an object on its own. This is the exception raised/thrown either via API methods or from JS.\n  For example, creating such error value in JS would look like this:\n\n```js\nthrow \"message\";\n```\n\nTo check what type a given `jerry_value_t` is the `jerry_value_is_*` methods or the `jerry_value_get_type` could be used.\nFor example the following code snippet could print out a few types (not all types are checked):\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include \"jerryscript.h\"\n\nstatic void\nprint_value (const jerry_value_t jsvalue)\n{\n  jerry_value_t value;\n  /* If there is an error extract the object from it */\n  if (jerry_value_is_error (jsvalue))\n  {\n    printf (\"Error value detected: \");\n    value = jerry_get_value_from_error (jsvalue, false);\n  }\n  else\n  {\n    value = jerry_acquire_value (jsvalue);\n  }\n\n  if (jerry_value_is_undefined (value))\n  {\n    printf (\"undefined\");\n  }\n  else if (jerry_value_is_null (value))\n  {\n    printf (\"null\");\n  }\n  else if (jerry_value_is_boolean (value))\n  {\n    if (jerry_get_boolean_value (value))\n    {\n      printf (\"true\");\n    }\n    else\n    {\n      printf (\"false\");\n    }\n  }\n  /* Float value */\n  else if (jerry_value_is_number (value))\n  {\n    printf (\"number: %lf\", jerry_get_number_value (value));\n  }\n  /* String value */\n  else if (jerry_value_is_string (value))\n  {\n    jerry_char_t str_buf_p[256];\n\n    /* Determining required buffer size */\n    jerry_size_t req_sz = jerry_get_string_size (value);\n\n    if (req_sz <= 255)\n    {\n      jerry_string_to_char_buffer (value, str_buf_p, req_sz);\n      str_buf_p[req_sz] = '\\0';\n      printf (\"%s\", (const char *) str_buf_p);\n    }\n    else\n    {\n      printf (\"error: buffer isn't big enough\");\n    }\n  }\n  /* Object reference */\n  else if (jerry_value_is_object (value))\n  {\n    printf (\"[JS object]\");\n  }\n\n  printf (\"\\n\");\n  jerry_release_value (value);\n}\n```\n\n## Example 8: Simple JavaScript shell\n\nNow all building blocks, necessary to construct JavaScript shell, are ready.\n\nShell operation can be described with the following loop:\n\n- read command;\n- if command is 'quit'\n  - exit loop;\n- else\n  - eval (command);\n  - print result of eval;\n  - loop.\n\nSee the following `api-example-8-shell.c` file:\n\n[doctest]: # (test=\"link\")\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nstatic void\nprint_value (const jerry_value_t jsvalue)\n{\n  jerry_value_t value;\n  /* If there is an error extract the object from it */\n  if (jerry_value_is_error (jsvalue))\n  {\n    printf (\"Error value detected: \");\n    value = jerry_get_value_from_error (jsvalue, false);\n  }\n  else\n  {\n    value = jerry_acquire_value (jsvalue);\n  }\n\n  if (jerry_value_is_undefined (value))\n  {\n    printf (\"undefined\");\n  }\n  else if (jerry_value_is_null (value))\n  {\n    printf (\"null\");\n  }\n  else if (jerry_value_is_boolean (value))\n  {\n    if (jerry_get_boolean_value (value))\n    {\n      printf (\"true\");\n    }\n    else\n    {\n      printf (\"false\");\n    }\n  }\n  /* Float value */\n  else if (jerry_value_is_number (value))\n  {\n    printf (\"number: %lf\", jerry_get_number_value (value));\n  }\n  /* String value */\n  else if (jerry_value_is_string (value))\n  {\n    jerry_char_t str_buf_p[256];\n\n    /* Determining required buffer size */\n    jerry_size_t req_sz = jerry_get_string_size (value);\n\n    if (req_sz <= 255)\n    {\n      jerry_string_to_char_buffer (value, str_buf_p, req_sz);\n      str_buf_p[req_sz] = '\\0';\n      printf (\"%s\", (const char *) str_buf_p);\n    }\n    else\n    {\n      printf (\"error: buffer isn't big enough\");\n    }\n  }\n  /* Object reference */\n  else if (jerry_value_is_object (value))\n  {\n    printf (\"[JS object]\");\n  }\n\n  printf (\"\\n\");\n  jerry_release_value (value);\n}\n\nint\nmain (void)\n{\n  bool is_done = false;\n\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Register 'print' function from the extensions */\n  jerryx_handler_register_global ((const jerry_char_t *) \"print\",\n                                  jerryx_handler_print);\n\n  while (!is_done)\n  {\n    char cmd[256];\n    char *cmd_tail = cmd;\n    size_t len = 0;\n\n    printf (\"> \");\n\n    /* Read next command */\n    while (true)\n    {\n      if (fread (cmd_tail, 1, 1, stdin) != 1 && len == 0)\n      {\n        is_done = true;\n        break;\n      }\n      if (*cmd_tail == '\\n')\n      {\n        break;\n      }\n\n      cmd_tail++;\n      len++;\n    }\n\n    /* If the command is \"quit\", break the loop */\n    if (!strncmp (cmd, \"quit\\n\", sizeof (\"quit\\n\") - 1))\n    {\n      break;\n    }\n\n    jerry_value_t ret_val;\n\n    /* Evaluate entered command */\n    ret_val = jerry_eval ((const jerry_char_t *) cmd,\n                          len,\n                          JERRY_PARSE_NO_OPTS);\n\n    /* Print out the value */\n    print_value (ret_val);\n\n    jerry_release_value (ret_val);\n  }\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\nTo compile it one can use the following command:\n\n(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.\n\n```sh\n$ gcc api-example-8-shell.c -o api-example-8-shell $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)\n```\n\nThe application reads lines from standard input and evaluates them, one after another. To try out run:\n\n```\n$ ./api-example-8-shell\n```\n\n\n## Example 9. Creating JS object in global context\n\nIn this example (`api-example-9.c`) an object with a native function is added to the global object.\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nstruct my_struct\n{\n  const char *msg;\n} my_struct;\n\n/**\n * Get a string from a native object\n */\nstatic jerry_value_t\nget_msg_handler (const jerry_value_t func_value, /**< function object */\n                 const jerry_value_t this_value, /**< this arg */\n                 const jerry_value_t *args_p, /**< function arguments */\n                 const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  return jerry_create_string ((const jerry_char_t *) my_struct.msg);\n} /* get_msg_handler */\n\nint\nmain (void)\n{\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Register 'print' function from the extensions */\n  jerryx_handler_register_global ((const jerry_char_t *) \"print\",\n                                  jerryx_handler_print);\n\n  /* Do something with the native object */\n  my_struct.msg = \"Hello, World!\";\n\n  /* Create an empty JS object */\n  jerry_value_t object = jerry_create_object ();\n\n  /* Create a JS function object and wrap into a jerry value */\n  jerry_value_t func_obj = jerry_create_external_function (get_msg_handler);\n\n  /* Set the native function as a property of the empty JS object */\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"myFunc\");\n  jerry_release_value (jerry_set_property (object, prop_name, func_obj));\n  jerry_release_value (prop_name);\n  jerry_release_value (func_obj);\n\n  /* Wrap the JS object (not empty anymore) into a jerry api value */\n  jerry_value_t global_object = jerry_get_global_object ();\n\n  /* Add the JS object to the global context */\n  prop_name = jerry_create_string ((const jerry_char_t *) \"MyObject\");\n  jerry_release_value (jerry_set_property (global_object, prop_name, object));\n  jerry_release_value (prop_name);\n  jerry_release_value (object);\n  jerry_release_value (global_object);\n\n  /* Now we have a \"builtin\" object called MyObject with a function called myFunc()\n   *\n   * Equivalent JS code:\n   *                    var MyObject = { myFunc : function () { return \"some string value\"; } }\n   */\n  const jerry_char_t script[] = \" \\\n    var str = MyObject.myFunc (); \\\n    print (str); \\\n  \";\n\n  /* Evaluate script */\n  jerry_value_t eval_ret = jerry_eval (script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  /* Free JavaScript value, returned by eval */\n  jerry_release_value (eval_ret);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\nTo compile it one can use the following command:\n\n(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.\n\n```sh\n$ gcc api-example-9.c -o api-example-9 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)\n```\n\nExecute the example with:\n\n```\n$ ./api-example-9\n```\n\nThe application will generate the following output:\n\n```bash\nHello, World\n```\n\n## Example 10. Extending JS Objects with native functions\n\nThe example creates a JS Object with `jerry_eval`, then it is extended from C with a native function.\nIn addition this native function shows how to get a property value from the object and how to manipulate it.\n\n\nUse the following code for `api-example-10.c`:\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\n/**\n * Add param to 'this.x'\n */\nstatic jerry_value_t\nadd_handler (const jerry_value_t func_value, /**< function object */\n             const jerry_value_t this_val, /**< this arg */\n             const jerry_value_t args_p[], /**< function arguments */\n             const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  /* The the 'this_val' is the 'MyObject' from the JS code below */\n  /* Note: that the argument count check is ignored for the example's case */\n\n  /* Get 'this.x' */\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"x\");\n  jerry_value_t x_val = jerry_get_property (this_val, prop_name);\n\n  if (!jerry_value_is_error (x_val))\n  {\n    /* Convert Jerry API values to double */\n    double x = jerry_get_number_value (x_val);\n    double d = jerry_get_number_value (args_p[0]);\n\n    /* Add the parameter to 'x' */\n    jerry_value_t res_val = jerry_create_number (x + d);\n\n    /* Set the new value of 'this.x' */\n    jerry_release_value (jerry_set_property (this_val, prop_name, res_val));\n    jerry_release_value (res_val);\n  }\n\n  jerry_release_value (x_val);\n  jerry_release_value (prop_name);\n\n  return jerry_create_undefined ();\n} /* add_handler */\n\nint\nmain (void)\n{\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Register 'print' function from the extensions */\n  jerryx_handler_register_global ((const jerry_char_t *) \"print\",\n                                  jerryx_handler_print);\n\n  /* Create a JS object */\n  const jerry_char_t my_js_object[] = \" \\\n    MyObject = \\\n    { x : 12, \\\n      y : 'Value of x is ', \\\n      foo: function () \\\n      { \\\n        return this.y + this.x; \\\n      } \\\n    } \\\n  \";\n\n  jerry_value_t my_js_obj_val;\n\n  /* Evaluate script */\n  my_js_obj_val = jerry_eval (my_js_object,\n                              sizeof (my_js_object) - 1,\n                              JERRY_PARSE_NO_OPTS);\n\n  /* Create a JS function object and wrap into a jerry value */\n  jerry_value_t add_func_obj = jerry_create_external_function (add_handler);\n\n  /* Set the native function as a property of previously created MyObject */\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"add2x\");\n  jerry_release_value (jerry_set_property (my_js_obj_val, prop_name, add_func_obj));\n  jerry_release_value (add_func_obj);\n  jerry_release_value (prop_name);\n\n  /* Free JavaScript value, returned by eval (my_js_object) */\n  jerry_release_value (my_js_obj_val);\n\n  const jerry_char_t script[] = \" \\\n    var str = MyObject.foo (); \\\n    print (str); \\\n    MyObject.add2x (5); \\\n    print (MyObject.foo ()); \\\n  \";\n\n  /* Evaluate script */\n  jerry_value_t eval_ret = jerry_eval (script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  /* Free JavaScript value, returned by eval */\n  jerry_release_value (eval_ret);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\nTo compile it one can use the following command:\n\n(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.\n\n```sh\n$ gcc api-example-10.c -o api-example-10 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)\n```\n\nExecute the example with:\n\n```\n$ ./api-example-10\n```\n\n```bash\nValue of x is 12\nValue of x is 17\n```\n\n## Example 11. Changing the seed of pseudorandom generated numbers\n\nIf you want to change the seed of `Math.random()` generated numbers, you have to initialize the seed value with `srand`.\nA recommended method is using `jerry_port_get_current_time()` or something based on a constantly changing value, therefore every run produces truly random numbers.\n\n[doctest]: # ()\n\n```c\n#include <stdlib.h>\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-ext/handler.h\"\n\nint\nmain (void)\n{\n  /* Initialize srand value */\n  union { double d; unsigned u; } now = { .d = jerry_port_get_current_time () };\n  srand (now.u);\n\n  /* Generate a random number, and print it */\n  const jerry_char_t script[] = \"var a = Math.random (); print(a)\";\n\n  /* Initialize the engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Register the print function */\n  jerryx_handler_register_global ((const jerry_char_t *) \"print\",\n                                  jerryx_handler_print);\n\n  /* Evaluate the script */\n  jerry_value_t eval_ret = jerry_eval (script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  /* Free the JavaScript value returned by eval */\n  jerry_release_value (eval_ret);\n\n  /* Cleanup the engine */\n  jerry_cleanup ();\n\n  return 0;\n}\n```\n\n## Further steps\n\nFor further API description, please visit [API Reference page](https://jerryscript-project.github.io/jerryscript/api-reference/) on [JerryScript home page](https://jerryscript-project.github.io/jerryscript/).\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/04.INTERNALS.md",
    "content": "# High-Level Design\n![High-Level Design](img/engines_high_level_design.png)\n\nThe diagram above shows the interactions between the major components of JerryScript: Parser and Virtual Machine (VM). Parser performs translation of input ECMAScript application into the byte-code with the specified format (refer to [Bytecode](#byte-code) and [Parser](#parser) page for details). Prepared bytecode is executed by the Virtual Machine that performs interpretation (refer to [Virtual Machine](#virtual-machine) and [ECMA](#ecma) pages for details).\n\n# Parser\n\nThe parser is implemented as a recursive descent parser. The parser converts the JavaScript source code directly into byte-code without building an Abstract Syntax Tree. The parser depends on the following subcomponents.\n\n## Lexer\n\nThe lexer splits input string (ECMAScript program) into sequence of tokens. It is able to scan the input string not only forward, but it is possible to move to an arbitrary position. The token structure described by structure `lexer_token_t` in `./jerry-core/parser/js/js-lexer.h`.\n\n## Scanner\n\nScanner (`./jerry-core/parser/js/js-parser-scanner.c`) pre-scans the input string to find certain tokens. For example, scanner determines whether the keyword `for` defines a general for or a for-in loop. Reading tokens in a while loop is not enough because a slash (`/`) can indicate the start of a regular expression or can be a division operator.\n\n## Expression Parser\n\nExpression parser is responsible for parsing JavaScript expressions. It is implemented in `./jerry-core/parser/js/js-parser-expr.c`.\n\n## Statement Parser\n\nJavaScript statements are parsed by this component. It uses the [Expression parser](#expression-parser) to parse the constituent expressions. The implementation of Statement parser is located in `./jerry-core/parser/js/js-parser-statm.c`.\n\nFunction `parser_parse_source` carries out the parsing and compiling of the input ECMAScript source code. When a function appears in the source `parser_parse_source` calls `parser_parse_function` which is responsible for processing the source code of functions recursively including argument parsing and context handling. After the parsing, function `parser_post_processing` dumps the created opcodes and returns an `ecma_compiled_code_t*` that points to the compiled bytecode sequence.\n\nThe interactions between the major components shown on the following figure.\n\n![Parser dependency](img/parser_dependency.png)\n\n# Byte-code\n\nThis section describes the compact byte-code (CBC) representation. The key focus is reducing memory consumption of the byte-code representation without sacrificing considerable performance. Other byte-code representations often focus on performance only so inventing this representation is an original research.\n\nCBC is a CISC like instruction set which assigns shorter instructions for frequent operations. Many instructions represent multiple atomic tasks which reduces the bytecode size. This technique is basically a data compression method.\n\n## Compiled Code Format\n\nThe memory layout of the compiled bytecode is the following.\n\n![CBC layout](img/CBC_layout.png)\n\nThe header is a `cbc_compiled_code` structure with several fields. These fields contain the key properties of the compiled code.\n\nThe literals part is an array of ecma values. These values can contain any ECMAScript value types, e.g. strings, numbers, functions and regexp templates. The number of literals is stored in the `literal_end` field of the header.\n\nCBC instruction list is a sequence of bytecode instructions which represents the compiled code.\n\n## Byte-code Format\n\nThe memory layout of a byte-code is the following:\n\n![byte-code layout](img/opcode_layout.png)\n\nEach byte-code starts with an opcode. The opcode is one byte long for frequent and two byte long for rare instructions. The first byte of the rare instructions is always zero (`CBC_EXT_OPCODE`), and the second byte represents the extended opcode. The name of common and rare instructions start with `CBC_` and `CBC_EXT_` prefix respectively.\n\nThe maximum number of opcodes is 511, since 255 common (zero value excluded) and 256 rare instructions can be defined. Currently around 215 frequent and 70 rare instructions are available.\n\nThere are three types of bytecode arguments in CBC:\n\n * __byte argument__: A value between 0 and 255, which often represents the argument count of call like opcodes (function call, new, eval, etc.).\n\n * __literal argument__: An integer index which is greater or equal than zero and less than the `literal_end` field of the header. For further information see next section Literals (next).\n\n * __relative branch__: An 1-3 byte long offset. The branch argument might also represent the end of an instruction range. For example the branch argument of `CBC_EXT_WITH_CREATE_CONTEXT` shows the end of a `with` statement. More precisely the position after the last instruction in the with clause.\n\nArgument combinations are limited to the following seven forms:\n\n* no arguments\n* a literal argument\n* a byte argument\n* a branch argument\n* a byte and a literal arguments\n* two literal arguments\n* three literal arguments\n\n## Literals\n\nLiterals are organized into groups whose represent various literal types. Having these groups consuming less space than assigning flag bits to each literal.\n(In the followings, the mentioned ranges represent those indicies which are greater than or equal to the left side and less than the right side of the range. For example a range between `ident_end` and `literal_end` fields of the byte-code header contains those indicies, which are greater than or equal to `ident_end`\nand less than `literal_end`. If `ident_end` equals to `literal_end` the range is empty.)\n\nThe two major group of literals are _identifiers_ and _values_.\n\n  * __identifier__: A named reference to a variable. Literals between zero and `ident_end` of the header belongs to here. All of these literals must be a string or undefined. Undefined can only be used for those literals which cannot be accessed by a literal name. For example `function (arg,arg)` has two arguments, but the `arg` identifier only refers to the second argument. In such cases the name of the first argument is undefined. Furthermore optimizations such as *CSE* may also introduce literals without name.\n\n  * __value__: A reference to an immediate value. Literals between `ident_end` and `const_literal_end` are constant values such as numbers or strings. These literals can be used directly by the Virtual Machine. Literals between `const_literal_end` and `literal_end` are template literals. A new object needs to be constructed each time when their value is accessed. These literals are functions and regular expressions.\n\nThere are two other sub-groups of identifiers. *Registers* are those identifiers which are stored in the function call stack. *Arguments* are those registers which are passed by a caller function.\n\nThere are two types of literal encoding in CBC. Both are variable length, where the length is one or two byte long.\n\n  * __small__: maximum 511 literals can be encoded.\n\nOne byte encoding for literals 0 - 254.\n\n```c\nbyte[0] = literal_index\n```\n\nTwo byte encoding for literals 255 - 510.\n\n```c\nbyte[0] = 0xff\nbyte[1] = literal_index - 0xff\n```\n\n  * __full__: maximum 32767 literal can be encoded.\n\nOne byte encoding for literals 0 - 127.\n\n```c\nbyte[0] = literal_index\n```\n\nTwo byte encoding for literals 128 - 32767.\n\n```c\nbyte[0] = (literal_index >> 8) | 0x80\nbyte[1] = (literal_index & 0xff)\n```\n\nSince most functions require less than 255 literal, small encoding provides a single byte literal index for all literals. Small encoding consumes less space than full encoding, but it has a limited range.\n\n## Literal Store\n\nJerryScript does not have a global string table for literals, but stores them into the Literal Store. During the parsing phase, when a new literal appears with the same identifier that has already occurred before, the string won't be stored once again, but the identifier in the Literal Store will be used. If a new literal is not in the Literal Store yet, it will be inserted.\n\n## Byte-code Categories\n\nByte-codes can be placed into four main categories.\n\n### Push Byte-codes\n\nByte-codes of this category serve for placing objects onto the stack. As there are many instructions representing multiple atomic tasks in CBC, there are also many instructions for pushing objects onto the stack according to the number and the type of the arguments. The following table list a few of these opcodes with a brief description.\n\n<span class=\"CSSTableGenerator\" markdown=\"block\">\n\n| byte-code             | description                                           |\n| --------------------- | ----------------------------------------------------- |\n| CBC_PUSH_LITERAL      | Pushes the value of the given literal argument.       |\n| CBC_PUSH_TWO_LITERALS | Pushes the values of the given two literal arguments. |\n| CBC_PUSH_UNDEFINED    | Pushes an undefined value.                            |\n| CBC_PUSH_TRUE         | Pushes a logical true.                                |\n| CBC_PUSH_PROP_LITERAL | Pushes a property whose base object is popped from the stack, and the property name is passed as a literal argument. |\n\n</span>\n\n### Call Byte-codes\n\nThe byte-codes of this category perform calls in different ways.\n\n<span class=\"CSSTableGenerator\" markdown=\"block\">\n\n| byte-code             | description                                                                          |\n| --------------------- | ------------------------------------------------------------------------------------ |\n| CBC_CALL0             | Calls a function without arguments. The return value won't be pushed onto the stack. |\n| CBC_CALL1             | Calls a function with one argument. The return value won't be pushed onto the stack. |\n| CBC_CALL              | Calls a function with n arguments. n is passed as a byte argument. The return value won't be pushed onto the stack. |\n| CBC_CALL0_PUSH_RESULT | Calls a function without arguments. The return value will be pushed onto the stack.  |\n| CBC_CALL1_PUSH_RESULT | Calls a function with one argument. The return value will be pushed onto the stack.  |\n| CBC_CALL2_PROP        | Calls a property function with two arguments. The base object, the property name, and the two arguments are on the stack. |\n\n</span>\n\n### Arithmetic, Logical, Bitwise and Assignment Byte-codes\n\nThe opcodes of this category perform arithmetic, logical, bitwise and assignment operations.\n\n<span class=\"CSSTableGenerator\" markdown=\"block\">\n\n| byte-code               | description                                                                                         |\n| ----------------------- | --------------------------------------------------------------------------------------------------- |\n| CBC_LOGICAL_NOT         | Negates the logical value that popped from the stack. The result is pushed onto the stack.          |\n| CBC_LOGICAL_NOT_LITERAL | Negates the logical value that given in literal argument. The result is pushed onto the stack.      |\n| CBC_ADD                 | Adds two values that are popped from the stack. The result is pushed onto the stack.                |\n| CBC_ADD_RIGHT_LITERAL   | Adds two values. The left one popped from the stack, the right one is given as literal argument.    |\n| CBC_ADD_TWO_LITERALS    | Adds two values. Both are given as literal arguments.                                               |\n| CBC_ASSIGN              | Assigns a value to a property. It has three arguments: base object, property name, value to assign. |\n| CBC_ASSIGN_PUSH_RESULT  | Assigns a value to a property. It has three arguments: base object, property name, value to assign. The result will be pushed onto the stack. |\n\n</span>\n\n### Branch Byte-codes\n\nBranch byte-codes are used to perform conditional and unconditional jumps in the byte-code. The arguments of these instructions are 1-3 byte long relative offsets. The number of bytes is part of the opcode, so each byte-code with a branch argument has three forms. The direction (forward, backward) is also defined by the opcode since the offset is an unsigned value. Thus, certain branch instructions has six forms. Some examples can be found in the following table.\n\n<span class=\"CSSTableGenerator\" markdown=\"block\">\n\n| byte-code                  | description                                                 |\n| -------------------------- | ----------------------------------------------------------- |\n| CBC_JUMP_FORWARD           | Jumps forward by the 1 byte long relative offset argument.  |\n| CBC_JUMP_FORWARD_2         | Jumps forward by the 2 byte long relative offset argument.  |\n| CBC_JUMP_FORWARD_3         | Jumps forward by the 3 byte long relative offset argument.  |\n| CBC_JUMP_BACKWARD          | Jumps backward by the 1 byte long relative offset argument. |\n| CBC_JUMP_BACKWARD_2        | Jumps backward by the 2 byte long relative offset argument. |\n| CBC_JUMP_BACKWARD_3        | Jumps backward by the 3 byte long relative offset argument. |\n| CBC_BRANCH_IF_TRUE_FORWARD | Jumps forward if the value on the top of the stack is true by the 1 byte long relative offset argument. |\n\n</span>\n\n## Snapshot\n\nThe compiled byte-code can be saved into a snapshot, which also can be loaded back for execution. Directly executing the snapshot saves the costs of parsing the source in terms of memory consumption and performance. The snapshot can also be executed from ROM, in which case the overhead of loading it into the memory can also be saved.\n\n\n# Virtual Machine\n\nVirtual machine is an interpreter which executes byte-code instructions one by one. The function that starts the interpretation is `vm_run` in `./jerry-core/vm/vm.c`. `vm_loop` is the main loop of the virtual machine, which has the peculiarity that it is *non-recursive*. This means that in case of function calls it does not calls itself recursively but returns, which has the benefit that it does not burdens the stack as a recursive implementation.\n\n# ECMA\n\nECMA component of the engine is responsible for the following notions:\n\n* Data representation\n* Runtime representation\n* Garbage collection (GC)\n\n## Data Representation\n\nThe major structure for data representation is `ECMA_value`. The lower three bits of this structure encode value tag, which determines the type of the value:\n\n* simple\n* number\n* string\n* object\n* symbol\n* error\n\n![ECMA value representation](img/ecma_value.png)\n\nIn case of number, string and object the value contains an encoded pointer, and\nsimple value is a pre-defined constant which can be:\n\n* undefined\n* null\n* true\n* false\n* empty (uninitialized value)\n\n### Compressed Pointers\n\nCompressed pointers were introduced to save heap space.\n\n![Compressed Pointer](img/ecma_compressed.png)\n\nThese pointers are 8 byte aligned 16 bit long pointers which can address 512 Kb of\nmemory which is also the maximum size of the JerryScript heap. To support even more\nmemory the size of compressed pointers can be extended to 32 bit to cover the entire\naddress space of a 32 bit system by passing \"--cpointer_32_bit on\" to the build\nsystem. These \"uncompressed pointers\" increases the memory consumption by around 20%.\n\n### Number\n\nThere are two possible representation of numbers according to standard IEEE 754:\nThe default is 8-byte (double),\nbut the engine supports the 4-byte (single precision) representation by setting JERRY_NUMBER_TYPE_FLOAT64 to 0 as well.\n\n![Number](img/number.png)\n\nSeveral references to single allocated number are not supported. Each reference holds its own copy of a number.\n\n### String\n\nStrings in JerryScript are not just character sequences, but can hold numbers and so-called magic ids too. For common character sequences (defined in `./jerry-core/lit/lit-magic-strings.ini`) there is a table in the read only memory that contains magic id and character sequence pairs. If a string is already in this table, the magic id of its string is stored, not the character sequence itself. Using numbers speeds up the property access. These techniques save memory.\n\n### Object / Lexical Environment\n\nAn object can be a conventional data object or a lexical environment object. Unlike other data types, object can have references (called properties) to other data types. Because of circular references, reference counting is not always enough to determine dead objects. Hence a chain list is formed from all existing objects, which can be used to find unreferenced objects during garbage collection. The `gc-next` pointer of each object shows the next allocated object in the chain list.\n\n[Lexical environments](http://www.ecma-international.org/ecma-262/5.1/#sec-10.2) are implemented as objects in JerryScript, since lexical environments contains key-value pairs (called bindings) like objects. This simplifies the implementation and reduces code size.\n\n![Object/Lexicat environment structures](img/ecma_object.png)\n\nThe objects are represented as following structure:\n\n  * Reference counter - number of hard (non-property) references\n  * Next object pointer for the garbage collector\n  * type (function object, lexical environment, etc.)\n\n### Properties of Objects\n\n![Object properties](img/ecma_object_property.png)\n\nObjects have a linked list that contains their properties. This list actually contains property pairs, in order to save memory described in the followings:\nA property has a one byte long descriptor, a two byte long name and four byte long value. Hence 14 bytes consumed by a property pair. Another two bytes is\nused to show the next property pair, so the total size (16 byte) is divisible by 8.\n\n#### Property Hashmap\n\nIf the number of property pairs reach a limit (currently this limit is defined to 16), a hash map (called [Property Hashmap](#property-hashmap)) is inserted at the first position of the property pair list, in order to find a property using it, instead of finding it by iterating linearly over the property pairs.\n\nProperty hashmap contains 2<sup>n</sup> elements, where 2<sup>n</sup> is larger than the number of properties of the object. Each element can have tree types of value:\n\n* null, indicating an empty element\n* deleted, indicating a deleted property, or\n* reference to the existing property\n\nThis hashmap is a must-return type cache, meaning that every property that the object have, can be found using it.\n\n#### Internal Properties\n\nInternal properties are special properties that carry meta-information that cannot be accessed by the JavaScript code, but important for the engine itself. Some examples of internal properties are listed below:\n\n* [[Class]] - class (type) of the object (ECMA-defined)\n* [[Code]] - points where to find bytecode of the function\n* native code - points where to find the code of a native function\n* [[PrimitiveValue]] for Boolean - stores the boolean value of a Boolean object\n* [[PrimitiveValue]] for Number - stores the numeric value of a Number object\n\n### LCache\n\nLCache is a hashmap for finding a property specified by an object and by a property name. The object-name-property layout of the LCache presents multiple times in a row as it is shown in the figure below.\n\n![LCache](img/ecma_lcache.png)\n\nWhen a property access occurs, a hash value is extracted from the demanded property name and than this hash is used to index the LCache. After that, in the indexed row the specified object and property name will be searched.\n\nIt is important to note, that if the specified property is not found in the LCache, it does not mean that it does not exist (i.e. LCache is a may-return cache). If the property is not found, it will be searched in the property-list of the object, and if it is found there, the property will be placed into the LCache.\n\n### Collections\n\nCollections are array-like data structures, which are optimized to save memory. Actually, a collection is a linked list whose elements are not single elements, but arrays which can contain multiple elements.\n\n### Exception Handling\n\nIn order to implement a sense of exception handling, the return values of JerryScript functions are able to indicate their faulty or \"exceptional\" operation. The return values are ECMA values (see section [Data Representation](#data-representation)) and if an erroneous operation occurred the ECMA_VALUE_ERROR simple value is returned.\n\n### Value Management and Ownership\n\nEvery ECMA value stored by the engine is associated with a virtual \"ownership\", that defines how to manage the value: when to free it when it is not needed anymore and how to pass the value to an other function.\n\nInitially, value is allocated by its owner (i.e. with ownership). The owner has the responsibility for freeing the allocated value. When the value is passed to a function as an argument, the ownership of it will not pass, the called function have to make an own copy of the value. However, as long as a function returns a value, the ownership will pass, thus the caller will be responsible for freeing it.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/05.PORT-API.md",
    "content": "# Reference\n\n## Termination\n\nIt is questionable whether a library should be able to terminate an application. Any API function can signal an error (ex.: cannot allocate memory), so the engine use the termination approach with this port function.\n\n```c\n/**\n * Signal the port that jerry experienced a fatal failure from which it cannot\n * recover.\n *\n * @param code gives the cause of the error.\n *\n * Note:\n *      Jerry expects the function not to return.\n *\n * Example: a libc-based port may implement this with exit() or abort(), or both.\n */\nvoid jerry_port_fatal (jerry_fatal_code_t code);\n```\n\nError codes\n\n```c\ntypedef enum\n{\n  ERR_OUT_OF_MEMORY = 10,\n  ERR_REF_COUNT_LIMIT = 12,\n  ERR_DISABLED_BYTE_CODE = 13,\n  ERR_FAILED_INTERNAL_ASSERTION = 120\n} jerry_fatal_code_t;\n```\n\n## I/O\n\nThese are the only I/O functions jerry calls.\n\n```c\n/**\n * Jerry log levels. The levels are in severity order\n * where the most serious levels come first.\n */\ntypedef enum\n{\n  JERRY_LOG_LEVEL_ERROR,    /**< the engine will terminate after the message is printed */\n  JERRY_LOG_LEVEL_WARNING,  /**< a request is aborted, but the engine continues its operation */\n  JERRY_LOG_LEVEL_DEBUG,    /**< debug messages from the engine, low volume */\n  JERRY_LOG_LEVEL_TRACE     /**< detailed info about engine internals, potentially high volume */\n} jerry_log_level_t;\n\n/**\n * Display or log a debug/error message, and sends it to the debugger client as well.\n * The function should implement a printf-like interface, where the first argument\n * specifies the log level and the second argument specifies a format string on how\n * to stringify the rest of the parameter list.\n *\n * This function is only called with messages coming from the jerry engine as\n * the result of some abnormal operation or describing its internal operations\n * (e.g., data structure dumps or tracing info).\n *\n * It should be the port that decides whether error and debug messages are logged to\n * the console, or saved to a database or to a file.\n *\n * Example: a libc-based port may implement this with vfprintf(stderr) or\n * vfprintf(logfile), or both, depending on log level.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_LOGGING is\n *      enabled. It is also common practice though to use this function in\n *      application code.\n */\nvoid jerry_port_log (jerry_log_level_t level, const char *fmt, ...);\n```\n\nThe `jerry_port_print_char` is currenlty not used by the jerry-core directly.\nHowever, it provides a port specifc way for `jerry-ext` components to print\ninformation.\n\n```c\n/**\n * Print a character to stdout.\n */\nvoid jerry_port_print_char (char c);\n```\n\n### Jerry Module system\n\nThe port API provides functions that can be used by the module system to open\nand close source files, and normalize file paths.\nThe `jerry_port_get_native_module` port function can be used to provide native\nmodules to the engine. This function will be called when an import/export\nstatement is encountered with an unknown module specifier, which embedders can\nuse to supply native module objects based on the module name argument.\n\n```c\n/**\n * Opens file with the given path and reads its source.\n * @return the source of the file\n */\nuint8_t *\njerry_port_read_source (const char *file_name_p, /**< file name */\n                        size_t *out_size_p) /**< [out] read bytes */\n{\n  // open file from given path\n  // return its source\n} /* jerry_port_read_source */\n\n/**\n * Release the previously opened file's content.\n */\nvoid\njerry_port_release_source (uint8_t *buffer_p) /**< buffer to free */\n{\n  free (buffer_p);\n} /* jerry_port_release_source */\n\n/**\n * Normalize a file path\n *\n * @return length of the path written to the output buffer\n */\nsize_t\njerry_port_normalize_path (const char *in_path_p, /**< input file path */\n                           char *out_buf_p,       /**< output buffer */\n                           size_t out_buf_size,   /**< size of output buffer */\n                           char *base_file_p)     /**< base file path */\n{\n  // normalize in_path_p by expanding relative paths etc.\n  // if base_file_p is not NULL, in_path_p is relative to that file\n  // write to out_buf_p the normalized path\n  // return length of written path\n} /* jerry_port_normalize_path */\n\n/**\n * Get the module object of a native module.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_MODULE_SYSTEM\n *      is enabled.\n *\n * @param name String value of the module specifier.\n *\n * @return Undefined, if 'name' is not a native module\n *         jerry_value_t containing the module object, otherwise\n */\njerry_value_t\njerry_port_get_native_module (jerry_value_t name) /**< module specifier */\n{\n  (void) name;\n  return jerry_create_undefined ();\n}\n```\n\n## Promise\n\n```c\n/**\n * HostPromiseRejectionTracker operations\n */\ntypedef enum\n{\n  JERRY_PROMISE_REJECTION_OPERATION_REJECT, /**< promise is rejected without any handlers */\n  JERRY_PROMISE_REJECTION_OPERATION_HANDLE, /**< handler is added to a rejected promise for the first time */\n} jerry_promise_rejection_operation_t;\n\n/**\n * Track unhandled promise rejections.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_BUILTIN_PROMISE\n *      is enabled.\n *\n * @param promise rejected promise\n * @param operation HostPromiseRejectionTracker operation\n */\nvoid jerry_port_track_promise_rejection (const jerry_value_t promise,\n                                         const jerry_promise_rejection_operation_t operation);\n```\n\n## Date\n\n```c\n/**\n * Get local time zone adjustment, in milliseconds, for the given timestamp.\n * The timestamp can be specified in either UTC or local time, depending on\n * the value of is_utc. Adding the value returned from this function to\n * a timestamp in UTC time should result in local time for the current time\n * zone, and subtracting it from a timestamp in local time should result in\n * UTC time.\n *\n * Ideally, this function should satisfy the stipulations applied to LocalTZA\n * in section 20.3.1.7 of the ECMAScript version 9.0 spec.\n *\n * See Also:\n *          ECMA-262 v9, 20.3.1.7\n *\n * Note:\n *      This port function is called by jerry-core when\n *      JERRY_BUILTIN_DATE is set to 1. Otherwise this function is\n *      not used.\n *\n * @param unix_ms The unix timestamp we want an offset for, given in\n *                millisecond precision (could be now, in the future,\n *                or in the past). As with all unix timestamps, 0 refers to\n *                1970-01-01, a day is exactly 86 400 000 milliseconds, and\n *                leap seconds cause the same second to occur twice.\n * @param is_utc Is the given timestamp in UTC time? If false, it is in local\n *               time.\n *\n * @return milliseconds between local time and UTC for the given timestamp,\n *         if available\n *.        0 if not available / we are in UTC.\n */\ndouble jerry_port_get_local_time_zone_adjustment (double unix_ms, bool is_utc);\n\n/**\n * Get system time\n *\n * Note:\n *      This port function is called by jerry-core when\n *      JERRY_BUILTIN_DATE is set to 1. It is also common practice\n *      in application code to use this function for the initialization of the\n *      random number generator.\n *\n * @return milliseconds since Unix epoch\n */\ndouble jerry_port_get_current_time (void);\n```\n\n## External context\n\nAllow user to provide external buffer for isolated engine contexts, so that user\ncan configure the heap size at runtime and run multiple JS applications\nsimultaneously.\n\n```c\n/**\n * Get the current context of the engine. Each port should provide its own\n * implementation of this interface.\n *\n * Note:\n *      This port function is called by jerry-core when\n *      JERRY_EXTERNAL_CONTEXT is enabled. Otherwise this function is not\n *      used.\n *\n * @return the pointer to the engine context.\n */\nstruct jerry_context_t *jerry_port_get_current_context (void);\n```\n\n## Sleep\n\n```c\n/**\n * Makes the process sleep for a given time.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_DEBUGGER is set to 1.\n *      Otherwise this function is not used.\n *\n * @param sleep_time milliseconds to sleep.\n */\nvoid jerry_port_sleep (uint32_t sleep_time);\n```\n\n# How to port JerryScript\n\nThis section describes a basic port implementation which was created for Unix based systems.\n\n## Termination\n\n```c\n#include <stdlib.h>\n#include \"jerryscript-port.h\"\n\n/**\n * Default implementation of jerry_port_fatal.\n */\nvoid jerry_port_fatal (jerry_fatal_code_t code)\n{\n  exit (code);\n} /* jerry_port_fatal */\n```\n\n## I/O\n\n```c\n#include <stdarg.h>\n#include \"jerryscript-port.h\"\n\n/**\n * Provide log message implementation for the engine.\n *\n * Note:\n *      This example ignores the log level.\n */\nvoid\njerry_port_log (jerry_log_level_t level, /**< log level */\n                const char *format, /**< format string */\n                ...)  /**< parameters */\n{\n  va_list args;\n  va_start (args, format);\n  vfprintf (stderr, format, args);\n  va_end (args);\n} /* jerry_port_log */\n```\n\n```c\n/**\n * Print a character to stdout with putchar.\n */\nvoid\njerry_port_print_char (char c)\n{\n  putchar (c);\n} /* jerr_port_print_char */\n```\n\n## Date\n\n```c\n#include <time.h>\n#include <sys/time.h>\n#include \"jerryscript-port.h\"\n\n/**\n * Default implementation of jerry_port_get_local_time_zone_adjustment.\n */\ndouble jerry_port_get_local_time_zone_adjustment (double unix_ms, /**< ms since unix epoch */\n                                                  bool is_utc)    /**< is the time above in UTC? */\n{\n  struct tm tm;\n  time_t now = (time_t) (unix_ms / 1000);\n  localtime_r (&now, &tm);\n  if (!is_utc)\n  {\n    now -= tm.tm_gmtoff;\n    localtime_r (&now, &tm);\n  }\n  return ((double) tm.tm_gmtoff) * 1000;\n} /* jerry_port_get_local_time_zone_adjustment */\n\n/**\n * Default implementation of jerry_port_get_current_time.\n */\ndouble jerry_port_get_current_time (void)\n{\n  struct timeval tv;\n\n  if (gettimeofday (&tv, NULL) != 0)\n  {\n    return 0;\n  }\n\n  return ((double) tv.tv_sec) * 1000.0 + ((double) tv.tv_usec) / 1000.0;\n} /* jerry_port_get_current_time */\n```\n\n## External context\n\n```c\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n/**\n * Pointer to the current context.\n * Note that it is a global variable, and is not a thread safe implementation.\n */\nstatic jerry_context_t *current_context_p = NULL;\n\n/**\n * Set the current_context_p as the passed pointer.\n */\nvoid\njerry_port_default_set_current_context (jerry_context_t *context_p) /**< points to the created context */\n{\n  current_context_p = context_p;\n} /* jerry_port_default_set_current_context */\n\n/**\n * Get the current context.\n *\n * @return the pointer to the current context\n */\njerry_context_t *\njerry_port_get_current_context (void)\n{\n  return current_context_p;\n} /* jerry_port_get_current_context */\n```\n\n## Sleep\n\n```c\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n#ifdef HAVE_TIME_H\n#include <time.h>\n#elif defined (HAVE_UNISTD_H)\n#include <unistd.h>\n#endif /* HAVE_TIME_H */\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\nvoid jerry_port_sleep (uint32_t sleep_time)\n{\n#ifdef HAVE_TIME_H\n  nanosleep (&(const struct timespec)\n  {\n    (time_t) sleep_time / 1000, ((long int) sleep_time % 1000) * 1000000L /* Seconds, nanoseconds */\n  }\n  , NULL);\n#elif defined (HAVE_UNISTD_H)\n  usleep ((useconds_t) sleep_time * 1000);\n#endif /* HAVE_TIME_H */\n  (void) sleep_time;\n} /* jerry_port_sleep */\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n```\n\n## Promise\n\n```c\n#include \"jerryscript-port.h\"\n\n/**\n * Default implementation of jerry_port_track_promise_rejection.\n * Prints the reason of the unhandled rejections.\n */\nvoid\njerry_port_track_promise_rejection (const jerry_value_t promise, /**< rejected promise */\n                                    const jerry_promise_rejection_operation_t operation) /**< operation */\n{\n  (void) operation; /* unused */\n\n  jerry_value_t reason = jerry_get_promise_result (promise);\n  jerry_value_t reason_to_string = jerry_value_to_string (reason);\n  jerry_size_t req_sz = jerry_get_utf8_string_size (reason_to_string);\n  jerry_char_t str_buf_p[req_sz + 1];\n  jerry_string_to_utf8_char_buffer (reason_to_string, str_buf_p, req_sz);\n  str_buf_p[req_sz] = '\\0';\n\n  jerry_release_value (reason_to_string);\n  jerry_release_value (reason);\n\n  printf (\"Uncaught (in promise) %s\\n\", str_buf_p);\n} /* jerry_port_track_promise_rejection */\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/06.REFERENCE-COUNTING.md",
    "content": "## Reference counting in JerryScript\n\nIn JerryScript all `jerry_value_t` values are independent\nreferences to internal objects. Values returned by JerryScript\nAPI functions are always live references and must be released\nby `jerry_release_value`.\n\n```c\n  jerry_value_t global = jerry_get_global_object ();\n\n  /* The value stored in the 'global' variable contains a live\n   * reference to the global object. The system also keeps its\n   * own live reference to the global object. These two references\n   * are independent, and both must be destroyed before the global\n   * object can be freed. */\n\n  jerry_release_value (global);\n\n  /* Without jerry_release_value() the global object will not\n   * be freed even by jerry_cleanup(). After the reference\n   * is released it becomes a dead reference and cannot be\n   * used anymore. */\n```\n\nMultiple references might refer to the same internal object\neven though their `jerry_value_t` representation might be different.\n\n```c\n  jerry_value_t pi_ref1 = jerry_create_number (3.14);\n  jerry_value_t pi_ref2 = jerry_acquire_value (pi_ref1);\n\n  /* Both pi_ref1 and pi_ref2 refer to the same 3.14 value\n   * although they might not be equal in C (pi_ref1 != pi_ref2). */\n\n  /* Both references must be released. */\n  jerry_release_value (pi_ref1);\n  jerry_release_value (pi_ref2);\n```\n\nReleasing the same `jerry_value_t` twice to release two live\nreferences is not allowed and it might cause crashes. Hence the\nfollowing code is an **INCORRECT WAY** of releasing the 3.14 value.\n\n```c\n  jerry_release_value (pi_ref1);\n  jerry_release_value (pi_ref1);\n```\n\nJerryScript API functions returning with a `jerry_value_t` always\nreturn with a new live reference. Passing a `jerry_value_t` to\nan API function never releases its reference (unless explicitly\nstated in the documentation). The next example shows this\nbehaviour through property getting and setting.\n\n```c\n  jerry_value_t prop_value = jerry_get_property (...);\n\n  /* The prop_value must be released later because both the base\n   * object and the prop_value have an independent reference to\n   * the same JavaScript value. When the operation fails, the\n   * prop_value contains a live reference to an error object.\n   * This reference must be released as well. */\n\n  if (jerry_value_is_error (prop_value))\n  {\n    /* Errors can be handled here. */\n  }\n  else\n  {\n    /* The application has a live reference to the property\n     * value even if the base object is freed by the garbage\n     * collector. */\n  }\n\n  /* The prop_value must be released. */\n  jerry_release_value (prop_value);\n\n  /* Property setting is the same. */\n\n  jerry_value_t new_prop_value = jerry_create_number (2.718);\n  jerry_value_t result = jerry_set_property (..., new_prop_value);\n\n  /* If the property set is successful, a new reference is created\n   * for the value referenced by new_prop_value. The new_prop_value\n   * reference must be released regardless of whether the operation\n   * is successful. */\n\n  /* The new_prop_value can be passed to other JerryScript API\n   * functions before the jerry_release_value () call. */\n\n  jerry_release_value (new_prop_value);\n\n  /* The reference stored in the 'result' variable is live whether\n   * the operation is successful or not, and must also be freed. */\n\n  if (jerry_value_is_error (result))\n  {\n    /* Errors can be handled here. */\n  }\n  else\n  {\n    /* A reference to a true primitive value is returned. */\n  }\n\n  jerry_release_value (result);\n```\n\nThe simplest form of setting a property without error checking\nis the following:\n\n```c\n  /* There are no 'ifs' in this snippet. */\n  jerry_release_value (jerry_set_property (..., new_prop_value));\n  jerry_release_value (new_prop_value);\n```\n\nThe reference returned by a `jerry_external_handler_t` callback\ntransfers the ownership of the live reference. Otherwise the\nreferenced object could be freed by the garbage collector.\n\n```c\njerry_value_t my_external_handler (const jerry_value_t function_obj,\n                                   const jerry_value_t this_val,\n                                   const jerry_value_t args_p[],\n                                   const jerry_length_t args_count\n{\n  /* Do not release function_obj, this_val, and args_p because\n   * these references are automatically released after the handler\n   * is returned. This approach reduces code size which is useful\n   * on embedded systems. However you can create other references\n   * to them by calling jerry_acquire_value () if needed. */\n\n  /* Since the ownership of the reference is transferred to the\n   * caller the following snippet is valid. */\n\n  /* If the value to be returned is needed for other purposes the\n   * jerry_acquire_value () can be used to create new references. */\n  return jerry_create_string (...);\n}\n```\n\nDuplicating a `jerry_value_t` in C does not create another live reference.\n\n```c\n  jerry_value_t undef = jerry_create_undefined ();\n  jerry_value_t undef2 = undef;\n\n  /* Releasing either undef or undef2 is valid but not both.\n   * After the release both references become dead (invalid). */\n  jerry_release_value (undef2);\n\n  /* Dead references can be reassigned again. */\n  undef = jerry_create_boolean (true);\n```\n\nReferences can be duplicated in C as long as only one of them is freed.\n\n```c\n  jerry_value_t a = jerry_create_boolean (true);\n\n  jerry_value_t b = a;\n  jerry_value_t c = a;\n\n  /* A new reference is assigned to 'a'. */\n  a = jerry_create_boolean (false);\n\n  [...]\n\n  jerry_release_value (a);\n  /* The 'a' (boolean false) reference becomes dead (invalid). */\n\n  jerry_release_value (c);\n  /* Both 'b' and 'c' (boolean true) references become dead. */\n\n  /* Since all references are released, no memory leak occurs. */\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/07.DEBUGGER.md",
    "content": "## JerryScript debugger interface\n\nJerryScript provides a remote debugger which allows debugging\nJavaScript programs. The debugger has two main components:\na server which is part of the JerryScript binary and a\nseparate client application. Currently a Python-based debugger\nclient is available in the /jerry-debugger subdirectory.\nThis simple application demonstrates the communication protocol\nbetween the client and server, and can be reused by integrated\ndevelopment environments.\n\n## Setting up the debugger server\n\nThe following arguments must be passed to `tools/build.py`:\n\n`--jerry-debugger=on`\n\nThe transport layer of the communication protocol is pluggable.\nAt the moment, a WebSocket-based implementation is provided as a\nJerryScript extension, which transmits messages over TCP/IP networks.\nIf necessary/implemented, any reliable stream or datagram based\nprotocol can be used for transmitting debugger messages.\n\n## Debugging JavaScript applications\n\nThe debugger client must be connected to the server before the\nJavaScript application runs. On-the-fly attachment is supported\nfor more than one file, right after the engine initialization\n(this feature is available with the python client). The debugging\ninformation (e.g. line index of each possible breakpoint location)\nis not preserved by JerryScript. The client is expected to be run\non a system with much more resources and it should be capable of\nstoring this information. JerryScript frees all debug information\nafter it is transmitted to the client to save memory.\n\nThe following argument makes JerryScript wait for a client\nconnection:\n\n`--start-debug-server`\n\nThe following argument makes JerryScript wait for a client\nsource code:\n\n`--debugger-wait-source`\n\nIt is also recommended to increase the log level to see\nthe *Waiting for client connection* message:\n\n`--log-level 2`\n\nThe Python client can connect to the server by specifying its\nIP address on the command line. The address can be localhost\nif the server and the client are running on the same machine.\n\nAfter the connection is established the execution can be\ncontrolled by the debugger. The debugger always stops at\nthe first possible breakpoint location. The effect is the\nsame as using the `stop` command. This allows inserting\nbreakpoints right before the meaningful part of the execution\nstarts.\n\nAll available commands of the client can be queried by the\n`help` command.\n\n## Integrating debugger support into applications using JerryScript\n\nWhen using the extension-provided WebSocket transport layer, the\ndebugger can be enabled by calling `jerryx_debugger_after_connect\n(jerryx_debugger_tcp_create (debug_port) && jerryx_debugger_ws_create ())`\nafter the `jerry_init ()` function. It initializes the debugger and\nblocks until a client connects.\n(Custom transport layers may be implemented and initialized similarly.\nCurrently, `jerryx_debugger_rp_create ()` for raw packet transport layer and\n`jerryx_debugger_serial_create (const char* config)` for serial protocol\nare also available.)\n\nThe resource name provided to `jerry_parse ()` is used by the client\nto identify the resource name of the source code. This resource name\nis usually a file name.\n\n## JerryScript debugger C-API interface\n\nThe following section describes the debugger functions\navailable to the host application.\n\n## JerryScript debugger types\n\n## jerry_debugger_wait_for_source_callback_t\n\n**Summary**\n\nThis callback function is called by\n[jerry_debugger_wait_for_client_source](#jerry_debugger_wait_for_client_source)\nwhen a source code is received successfully.\n\n**Prototype**\n\n```c\ntypedef jerry_value_t\n(*jerry_debugger_wait_for_source_callback_t) (const jerry_char_t *resource_name_p,\n                                              size_t resource_name_size,\n                                              const jerry_char_t *source_p,\n                                              size_t source_size, void *user_p);\n```\n\n- `resource_name_p` - resource (usually a file) name of the source code\n- `resource_name_size` - size of resource name\n- `source_p` - source code character data\n- `source_size` - size of source code\n- `user_p` - custom pointer passed to [jerry_debugger_wait_for_client_source](#jerry_debugger_wait_for_client_source)\n\n\n## JerryScript debugger functions\n\n### jerry_debugger_is_connected\n\n**Summary**\n\nReturns true if a remote debugger client is connected.\n\n**Prototype**\n\n```c\nbool\njerry_debugger_is_connected (void);\n```\n\n**Example**\n\n[doctest]: # (test=\"link\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/debugger.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n  jerryx_debugger_after_connect (jerryx_debugger_tcp_create (5001)\n                                 && jerryx_debugger_ws_create ());\n\n  if (jerry_debugger_is_connected ())\n  {\n    printf (\"A remote debugger client is connected.\");\n  }\n\n  jerry_cleanup ();\n}\n```\n\n### jerry_debugger_stop\n\n**Summary**\n\nStops execution at the next available breakpoint if a remote\ndebugger client is connected and the engine is not waiting at\na breakpoint. The engine will stop regardless the breakpoint\nis enabled or not.\n\n**Prototype**\n\n```c\nvoid\njerry_debugger_stop (void)\n```\n\n**Example**\n\n[doctest]: # (test=\"link\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/debugger.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n  jerryx_debugger_after_connect (jerryx_debugger_tcp_create (5001)\n                                 && jerryx_debugger_ws_create ());\n\n  jerry_debugger_stop ();\n\n  jerry_cleanup ();\n}\n```\n\n**See also**\n\n- [jerry_debugger_continue](#jerry_debugger_continue)\n\n### jerry_debugger_continue\n\n**Summary**\n\nIf the engine would stop at the next available breakpoint it\ncancels this effect. The engine will still stop at enabled\nbreakpoints. This function effectively negates the effect of\n[jerry_debugger_stop ()](#jerry_debugger_stop) calls or stop\nrequests issued by the debugger client.\n\n**Prototype**\n\n```c\nvoid\njerry_debugger_continue (void)\n```\n\n**Example**\n\n[doctest]: # (test=\"link\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/debugger.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n  jerryx_debugger_after_connect (jerryx_debugger_tcp_create (5001)\n                                 && jerryx_debugger_ws_create ());\n\n  jerry_debugger_continue ();\n\n  jerry_cleanup ();\n}\n```\n\n**See also**\n\n- [jerry_debugger_stop](#jerry_debugger_stop)\n\n### jerry_debugger_stop_at_breakpoint\n\n**Summary**\n\nEnables or disables stopping at breakpoints. When stopping is\ndisabled all breakpoints are ignored including user enabled\nbreakpoints. This allows hidden execution of ECMAScript code.\n\n**Prototype**\n\n```c\nvoid\njerry_debugger_stop_at_breakpoint (bool enable_stop_at_breakpoint)\n```\n\n- `enable_stop_at_breakpoint` - enable (=`true`) or disable (=`false`) stopping at breakpoints\n\n**Example**\n\n[doctest]: # (test=\"link\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/debugger.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n  jerryx_debugger_after_connect (jerryx_debugger_tcp_create (5001)\n                                 && jerryx_debugger_ws_create ());\n\n  jerry_debugger_stop_at_breakpoint (true);\n\n  // Protected execution of JavaScript code.\n  const jerry_char_t script[] = \"42\";\n  jerry_eval (script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  jerry_debugger_stop_at_breakpoint (false);\n\n  jerry_cleanup ();\n}\n```\n\n### jerry_debugger_wait_for_client_source\n\n**Summary**\n\nAsks the client to provide the next source code. The function\nwaits until the whole source code is received. As a reply the\nthe client may request a context reset or notify that no more\nsource is available. These notifications are passed back as the\nreturn value of the function.\n\n**Prototype**\n\n```c\njerry_debugger_wait_for_source_status_t\njerry_debugger_wait_for_client_source (jerry_debugger_wait_for_source_callback_t callback_p,\n                                       void *user_p, jerry_value_t *return_value)\n```\n\n**Example**\n\n[doctest]: # (test=\"link\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/debugger.h\"\n\n/**\n * Runs the source code received by jerry_debugger_wait_for_client_source.\n */\nstatic jerry_value_t\nwait_for_source_callback (const jerry_char_t *resource_name_p, /**< resource name */\n                          size_t resource_name_size, /**< size of resource name */\n                          const jerry_char_t *source_p, /**< source code */\n                          size_t source_size, /**< source code size */\n                          void *user_p /**< user pointer */)\n{\n  (void) user_p;\n\n  jerry_value_t ret_val = jerry_parse (resource_name_p,\n                                       resource_name_size,\n                                       source_p,\n                                       source_size,\n                                       JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (ret_val))\n  {\n    jerry_value_t func_val = ret_val;\n    ret_val = jerry_run (func_val);\n    jerry_release_value (func_val);\n  }\n\n  return ret_val;\n} /* wait_for_source_callback */\n\nint\nmain (void)\n{\n  jerry_debugger_wait_for_source_status_t receive_status;\n\n  do\n  {\n    /* Create a new JerryScript instance when a context reset is\n     * received. Applications usually registers their core bindings\n     * here as well (e.g. print, setTimeout). */\n    jerry_init (JERRY_INIT_EMPTY);\n    jerryx_debugger_after_connect (jerryx_debugger_tcp_create (5001)\n                                   && jerryx_debugger_ws_create ());\n\n    do\n    {\n      jerry_value_t run_result;\n\n      receive_status = jerry_debugger_wait_for_client_source (wait_for_source_callback,\n                                                              NULL,\n                                                              &run_result);\n\n      jerry_release_value (run_result);\n    }\n    while (receive_status == JERRY_DEBUGGER_SOURCE_RECEIVED);\n\n    jerry_cleanup ();\n  }\n  while (receive_status == JERRY_DEBUGGER_CONTEXT_RESET_RECEIVED);\n\n  if (receive_status == JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED)\n  {\n    // Handle the failure (e.g. display an error).\n  }\n  return 0;\n}\n```\n\n### jerry_debugger_send_output\n\n**Summary**\n\nSends the program's output to the debugger client.\n\n**Prototype**\n\n```c\nvoid\njerry_debugger_send_output (const jerry_char_t *buffer, jerry_size_t string_size)\n```\n\n**Example**\n\n[doctest]: # (test=\"link\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/debugger.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n  jerryx_debugger_after_connect (jerryx_debugger_tcp_create (5001)\n                                 && jerryx_debugger_ws_create ());\n\n  jerry_char_t my_output[] = \"Hey, this should be sent too!\";\n  jerry_size_t my_output_size = sizeof (my_output);\n\n  jerry_debugger_send_output (my_output, my_output_size);\n\n  jerry_cleanup ();\n}\n```\n\n### jerry_debugger_send_log\n\n**Summary**\n\nSends the program's log to the debugger client.\n\n**Prototype**\n\n```c\nvoid\njerry_debugger_send_log (jerry_log_level_t level, const jerry_char_t *buffer, jerry_size_t string_size)\n```\n\n**Example**\n\n[doctest]: # (test=\"link\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/debugger.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n  jerryx_debugger_after_connect (jerryx_debugger_tcp_create (5001)\n                                 && jerryx_debugger_ws_create ());\n\n  jerry_char_t my_log[] = \"Custom diagnostics\";\n  jerry_size_t my_log_size = sizeof (my_log);\n\n  jerry_debugger_send_log (JERRY_LOG_LEVEL_DEBUG, my_log, my_log_size);\n\n  jerry_cleanup ();\n}\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/08.CODING-STANDARDS.md",
    "content": "# JerryScript Coding Standards\n\nThis text is a brief overview of JerryScript Coding Standards.\nEach rule starts with a short description followed by several\nexamples. We believe examples are better than long explanations.\nPlease follow these guidelines when you submit a patch for\nreview.\n\n## General rules\n\n* Indentation is two spaces.\n* Tab characters are not allowed.\n* Maximum line length is 120 characters (excluding newline).\n* No trailing white space is allowed.\n* Run `tools/run-tests.py --check-vera` to check several\n  of the coding conventions automatically.\n\n## Comments\n\nOnly block comments (`/* */`) are allowed in JerryScript.\nComments should be complete sentences (e.g. start with an\nupper case letter), except for return value, field and\nargument descriptions (see the exceptions below). The\ntext part of a comment should focus on explaining *why*\nthe code is doing something rather than *what* the code\nis doing.\n\n```diff\n+++ Good +++\n```\n\n```c\n  /* A perfect comment. */\n\n  /* A perfect multiline\n   * comment. Each line should\n   * start with an asterisk. */\n```\n\n```diff\n--- Bad ---\n```\n\n```c\n  // Double slash comments are not allowed.\n\n  /* not a complete sentence */\n\n  /* A bad mulitiline\n     comment. */\n```\n\nAll types, constants and functions require a description in\nJerryScript. These comments should start with `/**`. The starting\n`/**` and ending `*/` must be on separate lines.\n\n```diff\n+++ Good +++\n```\n\n```c\n/**\n * A correct description.\n */\n```\n\n```diff\n--- Bad ---\n```\n\n```c\n/** An incorrect description. */\n```\n\n## Preprocessor defines\n\nThe name of a preprocessor macro must be an uppercase string\nand these macros must be preceded by a description.\nAbbreviations are allowed but not preferred in new code.\n\n```diff\n+++ Good +++\n```\n\n```c\n/**\n * Short description about the constant.\n */\n#define JERRY_VALUE_SEVEN 7\n\n/**\n * Short description about the macro function.\n */\n#define JERRY_ADD_TWO_NUMBERS(arg1, arg2) \\\n  ((arg1) + (arg2))\n\n/**\n * Although this is correct, a reviewer might request\n * to change NUMS to NUMBERS. Hence it is recommended\n * to use NUMBERS in the first place.\n */\n#define JERRY_ADD_TWO_NUMS(arg1, arg2) \\\n  ((arg1) + (arg2))\n```\n\n```diff\n--- Bad ---\n```\n\n```c\n#define JERRY_CONSTANT_WITHOUT_DESCRIPTION 5\n\n#define JeRrY_mIxEd_CaSe_NaMe \"str\"\n```\n\n## Conditional preprocessor directives\n\nA comment is required after `#else` and `#endif` in JerryScript.\nThe defined keyword should be omitted from these comments.\n\n```diff\n+++ Good +++\n```\n\n```c\n#ifdef JERRY_A\n\n#else /* !JERRY_A */\n\n#endif /* JERRY_A */\n\n#ifdef JERRY_A\n#if defined JERRY_B && defined JERRY_C && (JERRY_C > 6)\n\n#else /* !(JERRY_B && JERRY_C && (JERRY_C > 6)) */\n\n#endif /* JERRY_B && JERRY_C && (JERRY_C > 6) */\n#endif /* JERRY_A */\n```\n\n```diff\n--- Bad ---\n```\n\n```c\n#ifdef JERRY_A\n\n#endif\n\n#ifdef JERRY_A\n\n#endif /* defined JERRY_A */\n\n#ifdef JERRY_B\n  /* Missing comment after else. */\n#else\n\n#endif /* JERRY_B */\n```\n\n## Code blocks\n\nEach code block must be enclosed in curly braces even\nif it is a single line statement. These braces must\nbe on separate lines. There must be a single space\nbefore the opening parenthesis of the expression\nafter if/while/switch keywords.\n\n```diff\n+++ Good +++\n```\n\n```c\nif (value > 6)\n{\n  function_call ();\n}\n\nif (value > 1)\n{\n  function_call_a ();\n}\nelse\n{\n  function_call_b ();\n}\n\ndo\n{\n  function_call ();\n  value++;\n}\nwhile (value < 6);\n\nswitch (value)\n{\n  case A:\n  {\n    /* FALLTHRU comment is allowed if a\n     * switch-case is not terminated by\n     * break/continue/return. */\n\n    /* FALLTHRU */\n  }\n  case B:\n  case C:\n  {\n    break;\n  }\n  case D:\n  {\n    /* We can use continue if we are in a loop. */\n    continue;\n  }\n  default:\n  {\n    return;\n  }\n}\n```\n\n```diff\n--- Bad ---\n```\n\n```c\nif (value > 6)\n  function_call_a ();\nelse\n  function_call_b ();\n\nif (value > 6) {\n  function_call_a ();\n}\n\nif (value > 6) function_call_a ();\nelse { function_call_b (); }\n\nif\n(value > 6)\n{\n}\n\nswitch (value) {\n  case 0: break;\n  default: {\n    return 5;\n  }\n}\n\nswitch (value)\n{\n  case A:\n  {\n    if (value > 6)\n    {\n      CASE B:\n      {\n        /* This is allowed in C but\n         * not in JerryScript. */\n        break;\n      }\n    }\n  }\n}\n\ndo\n  value++;\nwhile (value < 5);\n\ndo {\n  value++;\n} while (value < 5);\n\ndo\n{\n  value++;\n} while (value < 5);\n```\n\n## Newlines\n\nA newline in JerryScript is a separator which separates different\nparts of the source code. Its primary purpose is to improve\nreadability. Unlike other rules developers have some freedom\nto add newlines to their code. However there are some rules.\n\n* Only a single newline separator is allowed.\n* Source files must be terminated by a newline.\n* Global declarations must be separated by a newline.\n* Newlines are not allowed after an opening curly brace or before\n  a closing curly brace\n* No newlines are allowed between control statements (if-else, while,\n  for, switch, etc.) and their code blocks.\n* There should be a newline after the variable declarations\n  if they are the first statements of a block.\n\n```diff\n+++ Good +++\n```\n\n```c\nif (a > 5)\n{\n  /* Newline must be present after the first\n   * variable declarations of a code block. */\n  int j = a - 1;\n  int k = a * 2;\n\n  return j + k;\n}\n\nwhile (a < 5)\n{\n  a++;\n\n  /* It is recommended to put a newline after\n   * intermediate variable declarations. */\n  int i = a * 2;\n\n  b = i - 3;\n}\n\n/* It is a recommended to put newlines around asserts. */\na = b + 5;\n\nJERRY_ASSERT (a < 20);\n\nc = a + 7;\n\n/* It is a good practice to put a newline after a multiline\n * function call (see Function calls later). */\nf (a,\n   b,\n   c);\n\na = 6;\n```\n\n```diff\n--- Bad ---\n```\n\n```c\n/* No newlines are allowed after an opening curly\n * brace or before a closing curly brace */\n\nwhile (a > 0)\n{\n\n  a = 6;\n\n}\n\nif (a > 5)\n{\n  while (b < 6)\n  {\n\n    b++;\n  }\n\n}\n\n\n/* Two or more newlines are not allowed. */\na = 6;\n\n\nb = 7;\n\n/* No newlines are allowed between control staments\n * and their code blocks. */\n\nif (a > 6)\n\n{\n}\n\nelse\n\n{\n}\n\ndo\n\n{\n}\n\nwhile (a < 6);\n```\n\n## Expressions\n\nSpaces are required around binary operators. No space is\nneeded otherwise.\n\n```diff\n+++ Good +++\n```\n\n```c\na = b + c;\na = (b + c) << 3;\na = b = c + ~d;\na += ++c + d++;\ncall_function (a * (b + !!c) - d + (e % f));\nif (a)\n{\n}\n```\n\n```diff\n--- Bad ---\n```\n\n```c\na=b+c;\na = b+c;\na  +=  c  +  ( d );\n/* Introduce temporary variables or macros\n * if the expression is too long. Occures rarely.. */\na = b\n  + c;\nif ( a + b > 0 )\n{\n}\n```\n\n## Logical operators\n\nAll expressions with && and || logical operators must be\nenclosed in parentheses. A single and multiline form is\nallowed for these expressions. In the latter case each\nline must start with the logical operator and each line\nmust be aligned to the column right after the opening\nparenthesis.\n\n```diff\n+++ Good +++\n```\n\n```c\n/* Single line form. */\na = ((c && d) || (e && f));\n\na = (c\n     && d);\n\na = (c\n     && (d || e)\n     && f);\n\ndo\n{\n}\nwhile (a\n       && b);\n\n/* This form is rarely used but it is ok. */\nif (a\n    && (b\n        || c\n        || d)\n    && e)\n{\n}\n```\n\n```diff\n--- Bad ---\n```\n\n```c\nif (a || b ||\n    c)\n{\n}\n\n/* Parentheses are missing. */\na = b || c;\n\n/* Misaligned &&. */\nif (a\n  && b)\n{\n}\n```\n\n## Ternary conditional operators\n\nA special form of ternary conditional operators are allowed\nin JerryScript where the ? and : operators are on separate\nlines in the same column.\n\n```diff\n+++ Good +++\n```\n\n```c\na = (b ? c\n       : d);\n\n/* Single line form is accepted as well. */\na = (b ? c : d);\n\n/* This form is rarely used but it is ok. */\nif (a ? b\n      : (c ? d\n           : e))\n{\n}\n```\n\n```diff\n--- Bad ---\n```\n\n```c\na = b ?\n    c : d;\n\nwhile (a ? b\n       : c)\n{\n}\n\nif (a\n    ? b\n    : c)\n{\n}\n```\n\n## Function calls\n\nThere must be a space after the function name. Each argument\nmust be in the same or separated lines. In the former case\nthere must be a space before the next argument and in the\nlatter case all arguments must be aligned to the same column.\n\n```diff\n+++ Good +++\n```\n\n```c\nfunction_a ();\nfunction_b (a);\nfunction_c (a, b, c);\n\nfunction_c (a,\n            b,\n            c);\n\nfunction_c (a,\n            b,\n            function_c (a,\n                        b,\n                        c);\n```\n\n```diff\n--- Bad ---\n```\n\n```c\n/* No space before the opening parenthesis. */\nfunction_f();\n\nfunction_f (\n);\n\nfunction_g(a);\n\nfunction_g\n  (a\n  );\n\n/* Two arguments on the same line. */\nfunction_h (a, b,\n            c);\n\nfunction_h (a,\n            b, c);\n\n/* Misaligned arguments. */\nfunction_h (a,\n     b,\n     c);\n```\n\n## Variable declarations\n\nJerryScript is a pure C99 codebase so variable\ndeclarations can be anywhere in the code including\ninside for-loops. It is recommended to declare a\nvariable before the first use.\n\n```diff\n+++ Good +++\n```\n\n```c\nfor (int i = 0; i < 10; i++)\n{\n  int j = i + 1;\n  while (j < 10)\n  {\n    ++j;\n  }\n}\n\n/* Multiline form of for loops. */\nfor (int i = 0;\n     i < 10;\n     i++)\n{\n}\n```\n\n## Type casting\n\nThere must be a space after the closing parenthesis\nof the type cast. Type casting has no multiline form\nin JerryScript.\n\n```diff\n+++ Good +++\n```\n\n```c\nint a = (int) double_variable;\n\nint a = (int) (long) (float) double_variable;\n```\n\n```diff\n--- Bad ---\n```\n\n```c\n/* Wrong spaces. */\nint a = ( int )double_variable;\n\n/* No multiline form. */\nint a = (int)\n        double_variable;\n```\n\n## Pointers and asterisk character\n\nEach pointer in JerryScript must be a lowercase string\nwhich is ending with a `_p` suffix. Furthermore there\nmust be a space before the asterisk character.\n\n```diff\n+++ Good +++\n```\n\n```c\n  int *int_p;\n\n  /* No need to add multiple _p-s for multiple indirections.\n   * It is recommended to avoid these constructs using typedef\n   * declarations. A reviewer might request such a change. */\n  int ***int_p;\n\n  /* This rule applies for type casting as well. */\n  char = *(char *) type_p;\n```\n\n```diff\n--- Bad ---\n```\n\n```c\n  /* No _p after the name. */\n  int *ptr;\n\n  /* Wrong asterisk position. */\n  int* ptr_p;\n\n  char_p = * (char*)type_p;\n```\n\n## Types\n\nEach type in JerryScript must be a lowercase string\nwhich ends with a `_t` suffix. Furthermore each type\ndeclaration must be preceded by a short description\nof the type and each field must have a short description\nas well.\n\n```diff\n+++ Good +++\n```\n\n```c\n/**\n * Short description of the following structure.\n */\ntypedef struct\n{\n  /* Field descriptions do not start with capital letters\n   * and there is no full stop at the end. */\n  field1_t field1; /**< description of field 1 */\n  field2_t field2; /**< description of field 2 */\n\n  field_n_t field_n; /**< description of field n */\n} structure_name_t;\n\n/**\n * Another integer type.\n */\ntypedef int jerry_int;\n```\n\n```diff\n--- Bad ---\n```\n\n```c\ntypedef struct\n{\n  field_t field_without_description;\n} structure_without_description_t;\n\ntypedef struct { int a; } single_line_struct;\n\ntypedef\nunion {\n}\nwrong_newlines_t;\n\n/*\n  * Bad comment format.\n   */\ntypedef\nchar wrong_newlines_again_t;\n```\n\n### Type usage conventions\n\n - Passing the number of arguments for a function call is always `uint32_t`\n - String size/length/position related operation should use `lit_utf8_size_t`\n - Extended objects internal fields must be `uint32_t`\n\n## Function declarations\n\nFunction declarations in JerryScript are verbose but this format\nreduces the maintenance cost and allows faster understanding of\nthe code.\n\n```diff\n+++ Good +++\n```\n\n```c\n/**\n * Short overview about the purpose of this function.\n *\n * A more detailed explanation if needed.\n *\n * Note:\n *   Extra notes if needed.\n *\n * @return short description about the value\n *         returned by the function\n */\nreturn_value_type_t\nfunction_name (argument1, /**< description of argument1 */\n               argument2, /**< description of argument2 */\n               ...\n               argument_n, /**< description of argument n */\n{\n\n  /* Function body. */\n\n} /* function_name */\n```\n\n```diff\n--- Bad ---\n```\n\n```c\nstatic int\nprint (char *text) /**< description of text argument */\n{\n  /* Missing comment before the function. */\n} /* print */\n\n/**\n * Prints the text received by the function.\n *\n * @return number of characters printed by the function\n */\nint print(char *text)\n{\n  /* No description of text argument. */\n  /* Missing comment at the end of the function. */\n}\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/09.EXT-REFERENCE-ARG.md",
    "content": "# jerryx_arg types\n\n## jerryx_arg_t\n\n**Summary**\n\nThe structure defining a single validation/transformation step.\n\n*Note*: For commonly used validators, `arg.h` provides helpers to create the `jerryx_arg_t`s.\nFor example, `jerryx_arg_number ()`, `jerryx_arg_boolean ()`, etc.\n\n**Prototype**\n\n```c\ntypedef struct\n{\n  /** the transform function */\n  jerryx_arg_transform_func_t func;\n  /** pointer to destination where func should store the result */\n  void *dest;\n  /** extra information, specific to func */\n  uintptr_t extra_info;\n} jerryx_arg_t;\n```\n\n**See also**\n\n- [jerryx_arg_number](#jerryx_arg_number)\n- [jerryx_arg_boolean](#jerryx_arg_boolean)\n- [jerryx_arg_string](#jerryx_arg_string)\n- [jerryx_arg_utf8_string](#jerryx_arg_utf8_string)\n- [jerryx_arg_function](#jerryx_arg_function)\n- [jerryx_arg_native_pointer](#jerryx_arg_native_pointer)\n- [jerryx_arg_ignore](#jerryx_arg_ignore)\n- [jerryx_arg_object_properties](#jerryx_arg_object_properties)\n\n## jerryx_arg_object_props_t\n\n**Summary**\n\nThe structure is used in `jerryx_arg_object_properties`. It provides the properties' names,\nits corresponding JS-to-C mapping and other related information.\n\n**Prototype**\n\n```c\ntypedef struct\n{\n  const jerry_char_t **name_p; /**< property name list of the JS object */\n  jerry_length_t name_cnt; /**< count of the name list */\n  const jerryx_arg_t *c_arg_p; /**< points to the array of transformation steps */\n  jerry_length_t c_arg_cnt; /**< the count of the `c_arg_p` array */\n} jerryx_arg_object_props_t;\n```\n\n**See also**\n\n- [jerryx_arg_object_properties](#jerryx_arg_object_properties)\n\n## jerryx_arg_array_items_t\n\n**Summary**\n\nThe structure is used in `jerryx_arg_array`. It provides the array items' corresponding\nJS-to-C mappings and count.\n\n**Prototype**\n\n```c\ntypedef struct\n{\n  const jerryx_arg_t *c_arg_p; /**< points to the array of transformation steps */\n  jerry_length_t c_arg_cnt; /**< the count of the `c_arg_p` array */\n} jerryx_arg_array_items_t;\n```\n\n**See also**\n\n- [jerryx_arg_array](#jerryx_arg_array)\n\n## jerryx_arg_transform_func_t\n\n**Summary**\n\nSignature of the transform function.\n\nUsers can create custom transformations by implementing a transform function\nand using `jerryx_arg_custom ()`.\n\nThe function is expected to return `undefined` if it ran successfully or\nreturn an `Error` in case it failed. The function can use the iterator and the\nhelpers `jerryx_arg_js_iterator_pop ()` and `jerryx_arg_js_iterator_peek ()` to\nget the next input value.\n\n*Note*: A transform function is allowed to consume any number of input values!\nThis enables complex validation like handling different JS function signatures,\nmapping multiple input arguments to a C struct, etc.\n\nThe function is expected to store the result of\na successful transformation into `c_arg_p->dest`. In case the validation did\nnot pass, the transform should not modify `c_arg_p->dest`.\n\nAdditional parameters can be provided to the function through `c_arg_p->extra_info`.\n\n**Prototype**\n\n```c\ntypedef jerry_value_t (*jerryx_arg_transform_func_t) (jerryx_arg_js_iterator_t *js_arg_iter_p,\n                                                      const jerryx_arg_t *c_arg_p);\n```\n\n**See also**\n\n- [jerryx_arg_custom](#jerryx_arg_custom)\n- [jerryx_arg_js_iterator_pop](#jerryx_arg_js_iterator_pop)\n- [jerryx_arg_js_iterator_peek](#jerryx_arg_js_iterator_peek)\n\n\n## jerryx_arg_coerce_t\n\nEnum that indicates whether an argument is allowed to be coerced into the expected JS type.\n\n - JERRYX_ARG_COERCE - the transform will invoke toNumber, toBoolean, toString, etc.\n - JERRYX_ARG_NO_COERCE - the type coercion is not allowed. The transform will fail if the type does not match the expectation.\n\n**See also**\n\n- [jerryx_arg_number](#jerryx_arg_number)\n- [jerryx_arg_boolean](#jerryx_arg_boolean)\n- [jerryx_arg_string](#jerryx_arg_string)\n\n## jerryx_arg_optional_t\n\nEnum that indicates whether an argument is optional or required.\n\n - JERRYX_ARG_OPTIONAL - The argument is optional. If the argument is `undefined` the transform is successful and `c_arg_p->dest` remains untouched.\n - JERRYX_ARG_REQUIRED - The argument is required. If the argument is `undefined` the transform will fail and `c_arg_p->dest` remains untouched.\n\n**See also**\n\n- [jerryx_arg_number](#jerryx_arg_number)\n- [jerryx_arg_boolean](#jerryx_arg_boolean)\n- [jerryx_arg_string](#jerryx_arg_string)\n- [jerryx_arg_function](#jerryx_arg_function)\n- [jerryx_arg_native_pointer](#jerryx_arg_native_pointer)\n\n## jerryx_arg_round_t\n\nEnum that indicates the rounding policy which will be chosen to transform an integer.\n\n - JERRYX_ARG_ROUND - use round() method.\n - JERRYX_ARG_FLOOR - use floor() method.\n - JERRYX_ARG_CEIL - use ceil() method.\n\n**See also**\n\n- [jerryx_arg_uint8](#jerryx_arg_uint8)\n- [jerryx_arg_uint16](#jerryx_arg_uint16)\n- [jerryx_arg_uint32](#jerryx_arg_uint32)\n- [jerryx_arg_int8](#jerryx_arg_int8)\n- [jerryx_arg_int16](#jerryx_arg_int16)\n- [jerryx_arg_int32](#jerryx_arg_int32)\n\n\n## jerryx_arg_clamp_t\n\n Indicates the clamping policy which will be chosen to transform an integer.\n If the policy is NO_CLAMP, and the number is out of range,\n then the transformer will throw a range error.\n\n - JERRYX_ARG_CLAMP - clamp the number when it is out of range\n - JERRYX_ARG_NO_CLAMP - throw a range error\n\n**See also**\n\n- [jerryx_arg_uint8](#jerryx_arg_uint8)\n- [jerryx_arg_uint16](#jerryx_arg_uint16)\n- [jerryx_arg_uint32](#jerryx_arg_uint32)\n- [jerryx_arg_int8](#jerryx_arg_int8)\n- [jerryx_arg_int16](#jerryx_arg_int16)\n- [jerryx_arg_int32](#jerryx_arg_int32)\n\n# Main functions\n\n## jerryx_arg_transform_this_and_args\n\n**Summary**\n\nValidate the this value and the JS arguments, and assign them to the native arguments.\nThis function is useful to perform input validation inside external function handlers (see `jerry_external_handler_t`).\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_arg_transform_this_and_args (const jerry_value_t this_val,\n                                    const jerry_value_t *js_arg_p,\n                                    const jerry_length_t js_arg_cnt,\n                                    const jerryx_arg_t *c_arg_p,\n                                    jerry_length_t c_arg_cnt)\n```\n\n - `this_val` - `this` value. Note this is processed as the first value, before the array of arguments.\n - `js_arg_p` - points to the array with JS arguments.\n - `js_arg_cnt` - the count of the `js_arg_p` array.\n - `c_arg_p` - points to the array of validation/transformation steps\n - `c_arg_cnt` - the count of the `c_arg_p` array.\n - return value - a `jerry_value_t` representing `undefined` if all validators passed or an `Error` if a validator failed.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/arg.h\"\n\n/* JS signature: function (requiredBool, requiredString, optionalNumber) */\nstatic jerry_value_t\nmy_external_handler (const jerry_value_t function_obj,\n                     const jerry_value_t this_val,\n                     const jerry_value_t args_p[],\n                     const jerry_length_t args_count)\n{\n  bool required_bool;\n  char required_str[16];\n  double optional_num = 1234.567;  // default value\n\n  /* \"mapping\" defines the steps to transform input arguments to C variables. */\n  const jerryx_arg_t mapping[] =\n  {\n    /* `this` is the first value. No checking needed on `this` for this function. */\n    jerryx_arg_ignore (),\n\n    jerryx_arg_boolean (&required_bool, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_string (required_str, sizeof (required_str), JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&optional_num, JERRYX_ARG_NO_COERCE, JERRYX_ARG_OPTIONAL),\n  };\n\n  /* Validate and transform. */\n  const jerry_value_t rv = jerryx_arg_transform_this_and_args (this_val,\n                                                               args_p,\n                                                               args_count,\n                                                               mapping,\n                                                               4);\n\n  if (jerry_value_is_error (rv))\n  {\n    /* Handle error. */\n    return rv;\n  }\n\n  /*\n   * Validated and transformed successfully!\n   * required_bool, required_str and optional_num can now be used.\n   */\n\n  return jerry_create_undefined (); /* Or return something more meaningful. */\n}\n```\n\n**See also**\n\n- [jerryx_arg_ignore](#jerryx_arg_ignore)\n- [jerryx_arg_number](#jerryx_arg_number)\n- [jerryx_arg_boolean](#jerryx_arg_boolean)\n- [jerryx_arg_string](#jerryx_arg_string)\n- [jerryx_arg_function](#jerryx_arg_function)\n- [jerryx_arg_native_pointer](#jerryx_arg_native_pointer)\n- [jerryx_arg_custom](#jerryx_arg_custom)\n- [jerryx_arg_object_properties](#jerryx_arg_object_properties)\n\n\n## jerryx_arg_transform_args\n\n**Summary**\n\nValidate an array of `jerry_value_t` and assign them to the native arguments.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_arg_transform_args (const jerry_value_t *js_arg_p,\n                           const jerry_length_t js_arg_cnt,\n                           const jerryx_arg_t *c_arg_p,\n                           jerry_length_t c_arg_cnt)\n```\n\n - `js_arg_p` - points to the array with JS arguments.\n - `js_arg_cnt` - the count of the `js_arg_p` array.\n - `c_arg_p` - points to the array of validation/transformation steps\n - `c_arg_cnt` - the count of the `c_arg_p` array.\n - return value - a `jerry_value_t` representing `undefined` if all validators passed or an `Error` if a validator failed.\n\n**See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n\n\n## jerryx_arg_transform_object_properties\n\n**Summary**\n\nValidate the properties of a JS object and assign them to the native arguments.\n\n*Note*: This function transforms properties of a single JS object into native C values.\nTo transform multiple objects in one pass (for example when converting multiple arguments\nto an external handler), please use `jerryx_arg_object_properties` together with\n`jerryx_arg_transform_this_and_args` or `jerryx_arg_transform_args`.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_arg_transform_object_properties (const jerry_value_t obj_val,\n                                        const jerry_char_t **name_p,\n                                        const jerry_length_t name_cnt,\n                                        const jerryx_arg_t *c_arg_p,\n                                        jerry_length_t c_arg_cnt);\n\n```\n\n - `obj_val` - the JS object.\n - `name_p` - points to the array of property names.\n - `name_cnt` - the count of the `name_p` array.\n - `c_arg_p` - points to the array of validation/transformation steps\n - `c_arg_cnt` - the count of the `c_arg_p` array.\n - return value - a `jerry_value_t` representing `undefined` if all validators passed or an `Error` if a validator failed.\n\n**See also**\n\n- [jerryx_arg_object_properties](#jerryx_arg_object_properties)\n\n## jerryx_arg_transform_array\n\n**Summary**\n\nValidate the JS array and assign its items to the native arguments.\n\n*Note*: This function transforms items of a single JS array into native C values.\nTo transform multiple JS arguments in one pass, please use `jerryx_arg_array` together with\n`jerryx_arg_transform_this_and_args` or `jerryx_arg_transform_args`.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_arg_transform_array (const jerry_value_t array_val,\n                            const jerryx_arg_t *c_arg_p,\n                            jerry_length_t c_arg_cnt);\n\n```\n\n - `array_val` - the JS array.\n - `c_arg_p` - points to the array of validation/transformation steps\n - `c_arg_cnt` - the count of the `c_arg_p` array.\n - return value - a `jerry_value_t` representing `undefined` if all validators passed or an `Error` if a validator failed.\n\n**See also**\n\n- [jerryx_arg_array](#jerryx_arg_array)\n\n\n# Helpers for commonly used validations\n\n## jerryx_arg_uint8\n\n## jerryx_arg_uint16\n\n## jerryx_arg_uint32\n\n## jerryx_arg_int8\n\n## jerryx_arg_int16\n\n## jerryx_arg_int32\n\n**Summary**\n\nAll above jerryx_arg_[u]intX functions are used to create a validation/transformation step\n(`jerryx_arg_t`) that expects to consume one `number` JS argument\nand stores it into a C integer (uint8, int8, uint16, ...)\n\n**Prototype**\n\nTake jerryx_arg_int32 as an example\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_int32 (int32_t *dest,\n                  jerryx_arg_round_t round_flag,\n                  jerryx_arg_clamp_t clamp_flag,\n                  jerryx_arg_coerce_t coerce_flag,\n                  jerryx_arg_optional_t opt_flag);\n```\n\n - return value - the created `jerryx_arg_t` instance.\n - `dest` - pointer to the `int32_t` where the result should be stored.\n - `round_flag` - the rounding policy.\n - `clamp_flag` - the clamping policy.\n - `coerce_flag` - whether type coercion is allowed.\n - `opt_flag` - whether the argument is optional.\n\n**See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n\n\n## jerryx_arg_number\n\n**Summary**\n\nCreate a validation/transformation step (`jerryx_arg_t`) that expects to consume\none `number` JS argument and stores it into a C `double`.\n\n**Prototype**\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_number (double *dest,\n                   jerryx_arg_coerce_t coerce_flag,\n                   jerryx_arg_optional_t opt_flag)\n```\n\n - return value - the created `jerryx_arg_t` instance.\n - `dest` - pointer to the `double` where the result should be stored.\n - `coerce_flag` - whether type coercion is allowed.\n - `opt_flag` - whether the argument is optional.\n\n**See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n\n## jerryx_arg_boolean\n\n**Summary**\n\nCreate a validation/transformation step (`jerryx_arg_t`) that expects to\nconsume one `boolean` JS argument and stores it into a C `bool`.\n\n**Prototype**\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_boolean (bool *dest,\n                    jerryx_arg_coerce_t coerce_flag,\n                    jerryx_arg_optional_t opt_flag)\n```\n - return value - the created `jerryx_arg_t` instance.\n - `dest` - pointer to the `bool` where the result should be stored.\n - `coerce_flag` - whether type coercion is allowed.\n - `opt_flag` - whether the argument is optional.\n\n**See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n\n\n## jerryx_arg_string\n\n**Summary**\n\nCreate a validation/transformation step (`jerryx_arg_t`) that expects to\nconsume one `string` JS argument and stores it into a CESU-8 C `char` array.\n\n**Prototype**\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_string (char *dest,\n                   uint32_t size,\n                   jerryx_arg_coerce_t coerce_flag,\n                   jerryx_arg_optional_t opt_flag)\n```\n\n - return value - the created `jerryx_arg_t` instance.\n - `dest` - pointer to the native char array where the result should be stored.\n - `size` - the size of native char array.\n - `coerce_flag` - whether type coercion is allowed.\n - `opt_flag` - whether the argument is optional.\n\n**See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n- [jerry_arg_utf8_string](#jerry_arg_utf8_string)\n\n\n## jerryx_arg_utf8_string\n\n**Summary**\n\nCreate a validation/transformation step (`jerryx_arg_t`) that expects to\nconsume one `string` JS argument and stores it into a UTF-8 C `char` array.\n\n**Prototype**\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_utf8_string (char *dest,\n                        uint32_t size,\n                        jerryx_arg_coerce_t coerce_flag,\n                        jerryx_arg_optional_t opt_flag)\n```\n\n - return value - the created `jerryx_arg_t` instance.\n - `dest` - pointer to the native char array where the result should be stored.\n - `size` - the size of native char array.\n - `coerce_flag` - whether type coercion is allowed.\n - `opt_flag` - whether the argument is optional.\n\n**See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n- [jerry_arg_string](#jerry_arg_string)\n\n\n## jerryx_arg_function\n\n**Summary**\n\nCreate a validation/transformation step (`jerryx_arg_t`) that expects to\nconsume one `function` JS argument and stores it into a C `jerry_value_t`.\n\n**Prototype**\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_function (jerry_value_t *dest,\n                     jerryx_arg_optional_t opt_flag)\n\n```\n - return value - the created `jerryx_arg_t` instance.\n - `dest` - pointer to the `jerry_value_t` where the result should be stored.\n - `opt_flag` - whether the argument is optional.\n\n**See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n\n## jerryx_arg_native_pointer\n\n**Summary**\n\nCreate a validation/transformation step (`jerryx_arg_t`) that expects to\nconsume one `object` JS argument that is 'backed' with a native pointer with\na given type info. In case the native pointer info matches, the transform\nwill succeed and the object's native pointer will be assigned to `*dest`.\n\n**Prototype**\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_native_pointer (void **dest,\n                           const jerry_object_native_info_t *info_p,\n                           jerryx_arg_optional_t opt_flag)\n```\n - return value - the created `jerryx_arg_t` instance.\n - `dest` - pointer to where the resulting native pointer should be stored.\n - `info_p` - expected the type info.\n - `opt_flag` - whether the argument is optional.\n\n**See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n\n## jerryx_arg_object_properties\n\n**Summary**\n\nCreate a validation/transformation step (`jerryx_arg_t`) that expects to\nconsume one `object` JS argument and call `jerryx_arg_transform_object_properties` inside\nto transform its properties to native arguments.\nUser should prepare the `jerryx_arg_object_props_t` instance, and pass it to this function.\n\n**Prototype**\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_object_properties (const jerryx_arg_object_props_t *object_props_p,\n                              jerryx_arg_optional_t opt_flag);\n```\n - return value - the created `jerryx_arg_t` instance.\n - `object_props_p` - provides information for properties transform.\n - `opt_flag` - whether the argument is optional.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/arg.h\"\n\n/**\n * The binding function expects args_p[0] is an object, which has 3 properties:\n *     \"enable\": boolean\n *     \"data\": number\n *     \"extra_data\": number, optional\n */\nstatic jerry_value_t\nmy_external_handler (const jerry_value_t function_obj,\n                     const jerry_value_t this_val,\n                     const jerry_value_t args_p[],\n                     const jerry_length_t args_count)\n{\n  bool required_bool;\n  double required_num;\n  double optional_num = 1234.567;  // default value\n\n  /* \"prop_name_p\" defines the name list of the expected properties' names. */\n  const char *prop_name_p[] = { \"enable\", \"data\", \"extra_data\" };\n\n  /* \"prop_mapping\" defines the steps to transform properties to C variables. */\n  const jerryx_arg_t prop_mapping[] =\n  {\n    jerryx_arg_boolean (&required_bool, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&required_num, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&optional_num, JERRYX_ARG_COERCE, JERRYX_ARG_OPTIONAL)\n  };\n\n  /* Prepare the jerryx_arg_object_props_t instance. */\n  const jerryx_arg_object_props_t prop_info =\n  {\n    .name_p = (const jerry_char_t **) prop_name_p,\n    .name_cnt = 3,\n    .c_arg_p = prop_mapping,\n    .c_arg_cnt = 3\n  };\n\n  /* It is the mapping used in the jerryx_arg_transform_args. */\n  const jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_object_properties (&prop_info, JERRYX_ARG_REQUIRED)\n  };\n\n  /* Validate and transform. */\n  const jerry_value_t rv = jerryx_arg_transform_args (args_p,\n                                                      args_count,\n                                                      mapping,\n                                                      1);\n\n  if (jerry_value_is_error (rv))\n  {\n    /* Handle error. */\n    return rv;\n  }\n\n  /*\n   * Validated and transformed successfully!\n   * required_bool, required_num and optional_num can now be used.\n   */\n\n   return jerry_create_undefined (); /* Or return something more meaningful. */\n}\n\n```\n\n **See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n- [jerryx_arg_transform_object_properties](#jerryx_arg_transform_object_properties)\n\n## jerryx_arg_array\n\n**Summary**\n\nCreate a validation/transformation step (`jerryx_arg_t`) that expects to\nconsume one `array` JS argument and call `jerryx_arg_transform_array_items` inside\nto transform its items to native arguments.\nUser should prepare the `jerryx_arg_array_items_t` instance, and pass it to this function.\n\n**Prototype**\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_array (const jerryx_arg_array_items_t *array_items_p, jerryx_arg_optional_t opt_flag);\n```\n - return value - the created `jerryx_arg_t` instance.\n - `array_items_p` - provides items information for transform.\n - `opt_flag` - whether the argument is optional.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/arg.h\"\n\n/**\n * The binding function expects args_p[0] is an array, which has 3 items:\n *     first: boolean\n *     second: number\n *     third: number, optional\n */\nstatic jerry_value_t\nmy_external_handler (const jerry_value_t function_obj,\n                     const jerry_value_t this_val,\n                     const jerry_value_t args_p[],\n                     const jerry_length_t args_count)\n{\n  bool required_bool;\n  double required_num;\n  double optional_num = 1234.567;  // default value\n\n  /* \"item_mapping\" defines the steps to transform array items to C variables. */\n  const jerryx_arg_t item_mapping[] =\n  {\n    jerryx_arg_boolean (&required_bool, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&required_num, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&optional_num, JERRYX_ARG_COERCE, JERRYX_ARG_OPTIONAL)\n  };\n\n  /* Prepare the jerryx_arg_array_items_t instance. */\n  const jerryx_arg_array_items_t array_info =\n  {\n    .c_arg_p = item_mapping,\n    .c_arg_cnt = 3\n  };\n\n  /* It is the mapping used in the jerryx_arg_transform_args. */\n  const jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_array (&array_info, JERRYX_ARG_REQUIRED)\n  };\n\n  /* Validate and transform. */\n  const jerry_value_t rv = jerryx_arg_transform_args (args_p,\n                                                      args_count,\n                                                      mapping,\n                                                      1);\n\n  if (jerry_value_is_error (rv))\n  {\n    /* Handle error. */\n    return rv;\n  }\n\n  /*\n   * Validated and transformed successfully!\n   * required_bool, required_num and optional_num can now be used.\n   */\n\n   return jerry_create_undefined (); /* Or return something more meaningful. */\n}\n\n```\n\n **See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n- [jerryx_arg_transform_object_properties](#jerryx_arg_transform_object_properties)\n\n# Functions to create custom validations\n\n## jerryx_arg_custom\n\n**Summary**\n\nCreate a jerryx_arg_t instance with custom transform.\n\n**Prototype**\n\n```c\nstatic inline jerryx_arg_t\njerryx_arg_custom (void *dest,\n                   uintptr_t extra_info,\n                   jerryx_arg_transform_func_t func)\n\n```\n - return value - the created `jerryx_arg_t` instance.\n - `dest` - pointer to the native argument where the result should be stored.\n - `extra_info` - the extra parameter data, specific to the transform function.\n - `func` - the custom transform function.\n\n**See also**\n\n- [jerryx_arg_transform_this_and_args](#jerryx_arg_transform_this_and_args)\n\n\n\n## jerryx_arg_js_iterator_pop\n\n**Summary**\n\nPop the current `jerry_value_t` argument from the iterator.\nIt will change the `js_arg_idx` and `js_arg_p` value in the iterator.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_arg_js_iterator_pop (jerryx_arg_js_iterator_t *js_arg_iter_p)\n```\n - return value - the `jerry_value_t` argument that was popped.\n - `js_arg_iter_p` - the JS arg iterator from which to pop.\n\n## jerryx_arg_js_iterator_peek\n\n**Summary**\n\nGet the current JS argument from the iterator, without moving the iterator forward.\n*Note:* Unlike `jerryx_arg_js_iterator_pop ()`, it will not change `js_arg_idx` and\n`js_arg_p` value in the iterator.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_arg_js_iterator_peek (jerryx_arg_js_iterator_t *js_arg_iter_p)\n```\n - return value - the current `jerry_value_t` argument.\n - `js_arg_iter_p` - the JS arg iterator from which to peek.\n\n## jerryx_arg_js_iterator_restore\n\n**Summary**\n\nRestore the last item popped from the stack.  This can be called as\nmany times as there are arguments on the stack -- if called when the\nfirst element in the array is the current top of the stack, this\nfunction does nothing.\n\n*Note:* This function relies on the underlying implementation of the\narg stack as an array, as its function is to simply back up the \"top\nof stack\" pointer to point to the previous element of the array.\n\n*Note:* Like `jerryx_arg_js_iterator_pop ()`, this function will\nchange the `js_arg_idx` and `js_arg_p` values in the iterator.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_arg_js_iterator_restore (jerryx_arg_js_iterator_t *js_arg_iter_p)\n```\n - return value - the the new top of the stack.\n - `js_arg_iter_p` - the JS arg iterator to restore.\n\n\n## jerryx_arg_js_iterator_index\n\n**Summary**\n\nGet the index of the current JS argument from the iterator.\n\n**Prototype**\n\n```c\njerry_length_t\njerryx_arg_js_iterator_index (jerryx_arg_js_iterator_t *js_arg_iter_p)\n```\n - return value - the index of current JS argument.\n - `js_arg_iter_p` - the JS arg iterator from which to peek.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/10.EXT-REFERENCE-HANDLER.md",
    "content": "# Common methods to handle properties\n\nThe `jerryscript-ext/handler.h` header defines a set of convenience methods\nwhich makes the property access a bit straightforward.\n\n## jerryx_set_property_str\n\n**Summary**\n\nSet a property on a target object with a given name.\n\n*Note*:\n- The property name must be a zero terminated UTF-8 string.\n- There should be no '\\0' (NULL) character in the name excluding the string terminator.\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_set_property_str (const jerry_value_t target_object,\n                         const char *name,\n                         const jerry_value_t value);\n```\n\n- `target_object` - the object where the property should be set\n- `name` - name of the property\n- `value` - property value to be set\n- return value\n  - JS true value, if success\n  - thrown error, if there was a problem setting the property\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nint\nmain (int argc, char **argv)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global = jerry_get_global_object ();\n\n  jerry_value_t value = jerry_create_number (3.3);\n  jerry_value_t result = jerryx_set_property_str (global, \"value\", value);\n  if (jerry_value_is_error (result))\n  {\n    /* The error type/reason can be extracted via the `jerry_get_value_from_error` method */\n    printf (\"Error during property configuration\\r\\n\");\n  }\n\n  jerry_release_value (result);\n  jerry_release_value (value);\n  jerry_release_value (global);\n  jerry_cleanup();\n\n  return 0;\n}\n```\n\n## jerryx_get_property_str\n\n**Summary**\n\nGet the value of a property from the specified object with the given name.\n\n*Notes*:\n- The property name must be a zero terminated UTF-8 string.\n- There should be no '\\0' (NULL) character in the name excluding the string terminator.\n- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it\n  is no longer needed.\n\n\n**Prototype**\n\n```\njerry_value_t\njerryx_get_property_str (const jerry_value_t target_object,\n                         const char *name);\n```\n\n- `target_object` - object on which the property name is accessed\n- `name` - property name as an UTF-8 `char*`\n- return value\n  - value of property, if success\n  - thrown error, if there was a problem accessing the property\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nint\nmain (int argc, char **argv)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global = jerry_get_global_object ();\n\n  jerry_value_t math_object = jerryx_get_property_str (global, \"Math\");\n\n  /* use math_object */\n\n  jerry_release_value (math_object);\n  jerry_release_value (global);\n  jerry_cleanup();\n\n  return 0;\n}\n```\n\n## jerryx_has_property_str\n\n**Summary**\n\nCheck if a property exists on an object.\n\n*Notes*:\n- The operation performed is the same as what the `jerry_has_property` method.\n- The property name must be a zero terminated UTF-8 string.\n- There should be no '\\0' (NULL) character in the name excluding the string terminator.\n\n\n**Prototype**\n\n```\nbool\njerryx_has_property_str (const jerry_value_t target_object,\n                         const char *name);\n```\n\n- `target_object` - object on which the property name is accessed\n- `name` - property name as an UTF-8 `char*`\n- return value\n  - true, if the given property name exsits on the object\n  - false, if there is no such property name or there was an error accessing the property\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nint\nmain (int argc, char **argv)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global = jerry_get_global_object ();\n\n  bool have_math = jerryx_has_property_str (global, \"Math\");\n\n  jerry_release_value (global);\n  jerry_cleanup();\n\n  return have_math ? 0 : 1;\n}\n```\n\n# Utility to register multiple properties in bulk\n\nIn some cases it is useful to register multiple properties for a given object\nfor this the following utility structures and methods are provided.\n\n## jerryx_property_entry\n\n**Summary**\n\nStructure to define an array of properties with `name` and `value` fields which\ncan be registered to a target object.\n\nThe engine must be initialied before specifying the `jerry_value_t` in the struct.\n\n\n**Prototype**\n\n```c\ntypedef struct {\n  const char *name;\n  jerry_value_t value;\n} jerryx_function_list_entry;\n```\n\n**See also**\n\n- [jerryx_set_properties](#jerryx_set_properties)\n\n\n## jerryx_register_result\n\n**Summary**\n\nStructure returned as the result of the [jerryx_set_properties](#jerryx_set_properties) operation.\nThe `result` field will either be a JavaScript undefined value or an error object.\nIn every case the `registered` field is used to indicated the number of\nsuccessfully registered methods.\n\nThis must be passed for the [jerryx_release_property_entry](#jerryx_release_property_entry) method\nafter the property registration.\n\nIf any error occured during the property registration the `result` field of the structure\nmust be manually released after processing the error value.\n\n**Prototype**\n\n```c\ntypedef struct {\n  jerry_value_t result;\n  uint32_t registered;\n} jerryx_register_result;\n```\n\n**See also**\n\n- [jerryx_set_properties](#jerryx_set_properties)\n- [jerryx_release_property_entry](#jerryx_release_property_entry)\n\n\n## jerryx_set_properties\n\n**Summary**\n\nSet multiple properties on a target object.\n\nThe properties are an array of (name, jerry_value_t) pairs and\nthis list must end with a (NULL, 0) entry.\n\nImportant notes:\n* Each property value in the input array is released after a successful property registration.\n* The method [jerryx_release_property_entry](#jerryx_release_property_entry) must be called if there is any failed registration\n  to release the values in the entries array.\n  It is safe to call this cleanup method in every case not just in case of failure.\n* If the error value is reported via the result it must be freed manually.\n\n**Prototype**\n\n```c\njerryx_register_result\njerryx_set_properties (const jerry_value_t target_object,\n                       const jerryx_property_entry entries[]);\n```\n\n- `target_object` - object on which the entries will be set.\n- `entries` - array of (name, jerry_value_t) pairs.\n- return a [jerryx_register_result](#jerryx_register_result).\n   - if everything is ok, the struct's `result` field is set to a JS undefined value.\n   - otherwise the `result` field is an error object indicating the problem.\n   - in every case the `registered` field contains the number of successfully registered properties.\n\n**Example**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nstatic jerry_value_t\nhandler (const jerry_value_t function_obj,\n         const jerry_value_t this_val,\n         const jerry_value_t args_p[],\n         const jerry_length_t args_cnt)\n{\n  printf (\"native handler called!\\n\");\n\n  return jerry_create_boolean (true);\n}\n\nint\nmain (int argc, char **argv)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerryx_property_entry methods[] =\n  {\n    { \"demo\", jerry_create_external_function (handler) },\n    { NULL, 0 },\n  };\n\n  jerry_value_t global = jerry_get_global_object ();\n  jerryx_register_result reg = jerryx_set_properties (global, methods);\n  /* if `reg.result` is undefined all methods are registered */\n  if (jerry_value_is_error (reg.result))\n  {\n    printf (\"Only registered %d properties\\r\\n\", reg.registered);\n    /* clean up not registered property values */\n    jerryx_release_property_entry (methods, reg);\n\n    /* clean up the error */\n    jerry_release_value (reg.result);\n  }\n\n  jerry_release_value (global);\n\n  jerry_cleanup();\n\n  return 0;\n}\n```\n\n**Convenience macros**\n\nTo make property registration convenient, there are a set of macros to use\nwhen setting a property entry:\n\n* `JERRYX_PROPERTY_NUMBER(NAME, NUMBER)` - creates a number entry.\n* `JERRYX_PROPERTY_STRING(NAME, STR)` - creates an UTF-8 string entry. This string must be zero terminated.\n* `JERRYX_PROPERTY_STRING_SZ(NAME, STR, SIZE)` - creates an UTF-8 string entry using only `SIZE` bytes from the string.\n* `JERRYX_PROPERTY_BOOLEAN(NAME, VALUE)` - creates a boolean entry.\n* `JERRYX_PROPERTY_FUNCTION(NAME, NATIVE)` - creates a native C function entry.\n* `JERRYX_PROPERTY_UNDEFINED(NAME)` - creates an undefined property entry.\n* `JERRYX_PROPERTY_LIST_END()` - indicates the end of the property list.\n\n**Example usage of Convenience macros**\n\n[doctest]: # ()\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nstatic jerry_value_t\nhandler (const jerry_value_t function_obj,\n         const jerry_value_t this_val,\n         const jerry_value_t args_p[],\n         const jerry_length_t args_cnt)\n{\n  printf (\"native handler called!\\n\");\n\n  return jerry_create_boolean (true);\n}\n\nint\nmain (int argc, char **argv)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /**\n   * Create a array of properties to be registered.\n   * This must be done after initializing the engine as creating `jerry_value_t`\n   * elements are invalid before `jerry_init`.\n   */\n  jerryx_property_entry methods[] =\n  {\n    JERRYX_PROPERTY_FUNCTION (\"demo\", handler),\n    JERRYX_PROPERTY_NUMBER (\"test_num\", 2.3),\n    JERRYX_PROPERTY_UNDEFINED (\"this_is_undefined\"),\n    JERRYX_PROPERTY_LIST_END(),\n  };\n\n  jerry_value_t global = jerry_get_global_object ();\n  jerryx_register_result reg = jerryx_set_properties (global, methods);\n  /* if `reg.result` is undefined all methods are registered */\n  if (jerry_value_is_error (reg.result))\n  {\n    printf (\"Only registered %d properties\\r\\n\", reg.registered);\n    /* clean up not registered property values */\n    jerryx_release_property_entry (methods, reg);\n\n    /* clean up the error */\n    jerry_release_value (reg.result);\n  }\n\n  jerry_release_value (global);\n\n  jerry_cleanup();\n\n  return 0;\n}\n```\n\n\n**See also**\n\n- [jerryx_property_entry](#jerryx_property_entry)\n- [jerryx_release_property_entry](#jerryx_release_property_entry)\n- [jerryx_register_result](#jerryx_register_result)\n\n## jerryx_release_property_entry\n\n**Summary**\n\nRelease all `jerry_value_t` in a `jerryx_property_entry` array based on a previous [jerryx_set_properties](#jerryx_set_properties) call\nand also the error value (if any) in the `jerryx_register_result` structure.\nIn case of a successful registration it is safe to call this method.\n\nAfter the method call the `ęntries` array should not be used as all values are released.\n\n**Prototype**\n\n```\nvoid\njerryx_release_property_entry (const jerryx_property_entry entries[],\n                               const jerryx_register_result register_result);\n```\n\n- `entires` - array of [jerryx_property_entry](#jerryx_property_entry).\n- `register_result` - result of a previous [jerryx_set_properties](#jerryx_set_properties) call.\n\n**Example**\n\nFor example usage see [jerryx_set_properties](#jerryx_set_properties).\n\n\n#  Common external function handlers\n\n## jerryx_handler_assert_fatal\n\n**Summary**\n\nHard assert for scripts. The routine calls `jerry_port_fatal` on assertion failure.\n\nIf the `JERRY_FEATURE_LINE_INFO` runtime feature is enabled (build option: `JERRY_LINE_INFO`)\na backtrace is also printed out.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_handler_assert_fatal (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                             const jerry_value_t args_p[], const jerry_length_t args_cnt);\n```\n\n- `func_obj_val` - the function object that was called (unused).\n- `this_p` - the `this` value of the call (unused).\n- `args_p` - the array of function arguments.\n- `args_cnt` - the number of function arguments.\n- return value - `jerry_value_t` representing boolean true, if only one argument\n  was passed and that argument was a boolean true. Note that the function does\n  not return otherwise.\n\n**See also**\n\n- [jerryx_handler_register_global](#jerryx_handler_register_global)\n\n\n## jerryx_handler_assert_throw\n\n**Summary**\n\nSoft assert for scripts. The routine throws an error on assertion failure.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_handler_assert_throw (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                             const jerry_value_t args_p[], const jerry_length_t args_cnt);\n```\n\n- `func_obj_val` - the function object that was called (unused).\n- `this_p` - the `this` value of the call (unused).\n- `args_p` - the array of function arguments.\n- `args_cnt` - the number of function arguments.\n- return value - `jerry_value_t` representing boolean true, if only one argument\n  was passed and that argument was a boolean true, an error otherwise.\n\n**See also**\n\n- [jerryx_handler_register_global](#jerryx_handler_register_global)\n\n\n## jerryx_handler_assert\n\n**Summary**\n\nAn alias to `jerryx_handler_assert_fatal`.\n\n**See also**\n\n- [jerryx_handler_assert_fatal](#jerryx_handler_assert_fatal)\n\n\n## jerryx_handler_gc\n\n**Summary**\n\nExpose garbage collector to scripts. If the first argument of the function\nis logical true, it performs a high pressure gc. Otherwise a low pressure\ngc is performed, which is also the default if no parameters passed.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_handler_gc (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                   const jerry_value_t args_p[], const jerry_length_t args_cnt);\n```\n\n- `func_obj_val` - the function object that was called (unused).\n- `this_p` - the `this` value of the call (unused).\n- `args_p` - the array of function arguments (unused).\n- `args_cnt` - the number of function arguments (unused).\n- return value - `jerry_value_t` representing `undefined`.\n\n**See also**\n\n- [jerryx_handler_register_global](#jerryx_handler_register_global)\n\n\n## jerryx_handler_print\n\n**Summary**\n\nProvide a `print` implementation for scripts. The routine converts all of its\narguments to strings and outputs them char-by-char using\n`jerry_port_print_char`. The NUL character is output as \"\\u0000\",\nother characters are output bytewise.\n\n*Note*: This implementation does not use standard C `printf` to print its\noutput. This allows more flexibility but also extends the core JerryScript\nengine port API. Applications that want to use `jerryx_handler_print` must\nensure that their port implementation also provides\n`jerry_port_print_char`.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_handler_print (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                      const jerry_value_t args_p[], const jerry_length_t args_cnt);\n```\n\n- `func_obj_val` - the function object that was called (unused).\n- `this_p` - the `this` value of the call (unused).\n- `args_p` - the array of function arguments.\n- `args_cnt` - the number of function arguments.\n- return value - `jerry_value_t` representing `undefined` if all arguments could\n  be converted to strings, an `Error` otherwise.\n\n**See also**\n\n- [jerryx_handler_register_global](#jerryx_handler_register_global)\n- [jerry_port_print_char](05.PORT-API.md#jerry_port_print_char)\n\n\n# Handler registration helper\n\n## jerryx_handler_register_global\n\n**Summary**\n\nRegister a JavaScript function in the global object.\n\n*Note*: Returned value must be freed with `jerry_release_value`, when it is no\nlonger needed.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_handler_register_global (const jerry_char_t *name_p,\n                                jerry_external_handler_t handler_p);\n```\n\n- `name_p` - the name of the function to be registered.\n- `handler_p` - the address of the external function handler.\n- return value - `jerry_value_t` representing boolean true, if the operation was\n  successful, an `Error` otherwise.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n\nstatic const struct {\n  const char *name_p;\n  jerry_external_handler_t handler_p;\n} common_functions[] =\n{\n  { \"assert\", jerryx_handler_assert },\n  { \"gc\", jerryx_handler_gc },\n  { \"print\", jerryx_handler_print },\n  { NULL, NULL }\n};\n\nstatic void\nregister_common_functions (void)\n{\n  jerry_value_t ret = jerry_create_undefined ();\n\n  for (int i = 0; common_functions[i].name_p != NULL && !jerry_value_is_error (ret); i++)\n  {\n    ret = jerryx_handler_register_global ((const jerry_char_t *) common_functions[i].name_p,\n                                          common_functions[i].handler_p);\n  }\n\n  jerry_release_value (ret);\n}\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/11.EXT-REFERENCE-AUTORELEASE.md",
    "content": "#  Autorelease values\n\n## JERRYX_AR_VALUE_T\n\n**Summary**\n\nMacro for `const jerry_value_t` for which jerry_release_value() is\nautomatically called when the variable goes out of scope.\n\n*Note*: The macro depends on compiler support. For GCC and LLVM/clang, the macro is implemented\nusing the `__cleanup__` variable attribute. For other compilers, no support has been added yet.\n\n**Example**\n\n[doctest]: # (test=\"compile\", name=\"11.EXT-REFERENCE-AUTORELEASE.c\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/autorelease.h\"\n\nstatic void\nfoo (bool enable)\n{\n  JERRYX_AR_VALUE_T bar = jerry_create_string ((const jerry_char_t *) \"...\");\n\n  if (enable)\n  {\n    JERRYX_AR_VALUE_T baz = jerry_get_global_object ();\n\n    /* bar and baz can now be used. */\n\n    /*\n     * jerry_release_value (baz) and jerry_release_value (bar) is called automatically before\n     * returning, because `baz` and `bar` go out of scope.\n     */\n    return;\n  }\n\n  /*\n   * jerry_release_value (bar) is called automatically when the function returns,\n   * because `bar` goes out of scope.\n   */\n}\n```\n\n**See also**\n\n- [jerry_value_t](../docs/02.API-REFERENCE.md#jerry_value_t)\n- [jerry_acquire_value](../docs/02.API-REFERENCE.md#jerry_acquire_value)\n- [jerry_release_value](../docs/02.API-REFERENCE.md#jerry_release_value)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/12.EXT-REFERENCE-MODULE.md",
    "content": "#  Module API\n\nThis is a JerryScript extension that provides a means of loading modules. Fundamentally, a module is a name (stored as\na string) that resolves to a `jerry_value_t`. This extension provides the function `jerryx_module_resolve()` which\naccepts the name of the module being requested as well as an array of so-called \"resolvers\" - structures containing two\nfunction pointers: one for a function which computes a canonical name for the requested module or returns a reference\nto the requested name, and one that converts a canonical name to a `jerry_value_t`, thus \"resolving\" or \"loading\" the\nrequested module.\n\nThe resolvers are first called in sequence to each compute the canonical name of the requested module. This is\naccomplished by calling the `get_canonical_name` function pointer they provide. If the function pointer is `NULL`, the\nrequested module name is assumed to be what the resolver considers to be its canonical name. `jerryx_module_resolve`\nsearches its cache of loaded modules for each canonical name as returned by a `get_canonical_name` function pointer. If\none of the loaded modules in the cache corresponds to a canonical name, it is returned.\n\nIf no cached module is found, `jerryx_module_resolve` calls each resolver's `resolve` function pointer, passing it its\npreviously computed interpretation of the requested module's canonical name. If the resolver successfully creates the\n`jerry_value_t` that represents the loaded module, it returns `true` and the `jerry_value_t` in its out parameter.\n\nWhen `jerryx_module_resolve` receives a value of `true` from a resolver, it stops iterating over the remaining\nresolvers in the sequence and, if the `jerry_value_t` returned from the resolver's `resolve` does not have the error\nflag set, it will add the `jerry_value_t` to its cache under the module's canonical name and return it. Thus, on\nsubsequent calls to `jerryx_module_resolve` with a module name whose canonical name is associated with the\n`jerry_value_t`, no `resolve` callback need be called again.\n\nThe purpose of having resolvers is to be able to account for the fact that different types of modules may be structured\ndifferently and thus, for each type of module a module resolver must be supplied at the point where an instance of that\ntype of module is requested.\n\nIndividual modules may be removed from the cache by calling `jerryx_module_clear_cache`. This function behaves\nidentically to `jerryx_module_resolve` in that it first checks the cache for the requested module, except that it\nremoves the module if found. Additionally, it clears the entire cache of all modules if called using a JavaScript value\nof `undefined` as its first parameter.\n\nAdditionally, this extension provides a means of easily defining so-called \"native\" JerryScript modules which can be\nresolved using the native JerryScript module resolver `jerryx_module_native_resolver`, which can be passed to\n`jerryx_module_resolve()`. Native modules are registered during application startup and by calling `dlopen()` by means\nof library constructors, support for which can be turned on using the `FEATURE_INIT_FINI` build flag. In the absence of\nsuch a flag, the module registration and unregistration functions are exposed as global symbols which can be called\nexplicitly. Note: `FEATURE_INIT_FINI` build flag isn't supported on Windows, because Microsoft Visual C/C++ Compiler\ndoesn't support library constructors and destructors.\n\n## jerryx_module_resolve\n\n**Summary**\n\nLoad a copy of a module into the current context or return one that was already loaded if it is found.\n\nFor each resolver passed in via `resolvers_p`, its `get_canonical_name` function pointer gets called in order to\nestablish the resolver's interpretation of what the canonical name for the module should be. If `get_canonical_name` is\n`NULL`, it is assumed that the requested module's name as passed in is its canonical name.\n\nThen, for each resolver passed in via `resolvers_p`, its `resolve` function pointer gets called with its interpretation\nof what the module's canonical name should be, as computed in the previous step.\n\nIf the resolver's `resolve` function pointer returns `true`, the `jerry_value_t` returned in its out-parameter will be\nreturned by `jerryx_module_resolve` as the result of the request. If no error flag is set on the `jerry_value_t` it\nwill be cached under its canonical name so as to avoid loading the same module twice in the event of a subsequent call\nto `jerryx_module_resolve` with a module name whose canonical name matches an already loaded module.\n\n**Prototype**\n\n```c\njerry_value_t\njerryx_module_resolve (const jerry_value_t name,\n                       const jerryx_module_resolver_t *resolvers_p,\n                       size_t resolver_count);\n```\n\n- `name` - the name of the module to load\n- `resolvers_p` - the list of resolvers to call in sequence\n- `resolver_count` - the number of resolvers in `resolvers_p`\n- return value - `jerry_value_t` representing the module that was loaded, or the error that occurred in the process.\n\n\n## jerryx_module_clear_cache\n\n**Summary**\n\nRemove a module from the current context's cache, or clear the cache entirely.\n\n**Prototype**\n\n```c\nvoid\njerryx_module_clear_cache (const jerry_value_t name,\n                           const jerryx_module_resolver_t *resolvers_p,\n                           size_t resolver_count);\n```\n\n- `name` - the name of the module to remove from cache or a JavaScript `undefined` to clear the entire cache\n- `resolvers_p` - the list of resolvers to call in sequence\n- `resolver_count` - the number of resolvers in `resolvers_p`\n\n\n## jerryx_module_native_resolver\n\n**Summary**\n\nThe resolver for native JerryScript modules. A pointer to this structure can be passed in the second parameter to\n`jerryx_module_resolve` to search for the module among the native JerryScript modules built into the binary. This\nfunction is available only if the preprocessor directive `JERRYX_NATIVE_MODULES_SUPPORTED` is defined.\n\n**Prototype**\n\n```c\nextern jerry_module_resolver_t jerryx_native_module_resolver;\n```\n\n# Module data types\n\n## jerryx_module_get_canonical_name_t\n\n**Summary**\n\nThe function pointer type for converting a module's requested name to its canonical name.\n\n**Prototype**\n\n```c\ntypedef jerry_value_t (*jerryx_module_get_canonical_name_t) (const jerry_value_t name);\n```\n\n## jerryx_module_resolve_t\n\n**Summary**\n\nFunction pointer type for module resolution.\n\n**Prototype**\n\n```c\ntypedef bool (*jerryx_module_resolve_t) (const jerry_value_t canonical_name,\n                                        jerry_value_t *result);\n```\n\n## jerryx_module_resolver_t\n\n**Summary**\n\nStructure defining a module resolver.\n\n**Prototype**\n\n```c\ntypedef struct\n{\n  jerryx_module_get_canonical_name_t get_canonical_name_p;\n  jerryx_module_resolve_t resolve_p;\n} jerryx_module_resolver_t;\n```\n\n- `get_canonical_name_p` - function pointer to be called when the canonical name corresponding to the requested name\nof a module must be established.\n- `resolve_p` - function pointer to be called when a module with the given canonical name needs to be converted to the\n`jerry_value_t` that will become the loaded module.\n\n**Example**\n```c\nstatic bool\nload_and_evaluate_js_file (const jerry_value_t name, jerry_value_t *result)\n{\n  bool return_value = false;\n  char *js_file_contents = NULL;\n  int file_size = 0;\n\n  jerry_size_t name_size = jerry_get_utf8_string_size (name);\n  jerry_char_t name_string[name_size + 1];\n  jerry_string_to_utf8_char_buffer (name, name_string, name_size);\n  name_string[name_size] = 0;\n\n  FILE *js_file = fopen (name_string, \"r\");\n\n  if (js_file)\n  {\n    /* We have successfully opened the file. Now, we establish its size. */\n    file_size = fseek (js_file, 0, SEEK_END);\n    fseek (js_file, 0, SEEK_SET);\n\n    /* We allocate enough memory to store the contents of the file. */\n    js_file_contents = malloc (file_size);\n    if (js_file_contents)\n    {\n      /* We read the file into memory and call jerry_eval (), assigning the result to the out-parameter. */\n      fread (js_file_contents, file_size, 1, js_file);\n      (*result) = jerry_eval (js_file_contents, file_size, JERRY_PARSE_NO_OPTS);\n\n      /* We release the memory holding the contents of the file. */\n      free (js_file_contents);\n      return_value = true;\n    }\n\n    /* We close the file. */\n    fclose (js_file);\n  }\n\n  return return_value;\n}\n\nstatic jerry_value_t\ncanonicalize_file_path (const jerry_value_t name)\n{\n  jerry_value_t absolute_path;\n\n  /**\n   * Since a file on the file system can be referred to by multiple relative paths, but only by one absolute path, the\n   * absolute path becomes the canonical name for the module. Thus, to establish this canonical name, we must search\n   * name for \"./\" and \"../\", follow symlinks, etc., then create absolute_path via jerry_create_string () and return\n   * it, because it is the canonical name for this module. Thus, we avoid loading the same JavaScript file twice.\n   */\n\n  return absolute_path;\n}\n\nstatic jerryx_module_resolver_t js_file_loader\n{\n  canonicalize_file_path,\n  load_and_evaluate_js_file\n};\n```\n\nWe can now load JavaScript files:\n```c\nstatic const jerryx_module_resolver_t *resolvers[] =\n{\n  /*\n   * Consult the resolver for native JerryScript modules first, in case the requested module is a native JerryScript\n   * module.\n   */\n  &jerryx_module_native_resolver,\n\n  /*\n   * If the requested module is not a native JerryScript module, assume it is a JavaScript file on disk and use the\n   * above-defined JavaScript file loader to load it.\n   */\n  &js_file_loader\n};\njerry_value_t js_module = jerryx_module_resolve (requested_module, resolvers, 2);\n```\n\n# Module helper macros\n\n## JERRYX_NATIVE_MODULE\n\n**Summary**\n\nHelper macro to define a native JerryScript module. Currently declares a global static structure of type\n`jerryx_native_module_t` and a constructor/destructor pair that calls `jerryx_native_module_register()` resp.\n`jerryx_native_module_unregister()`. If the extension is built without the FEATURE_INIT_FINI flag, indicating that\nsupport for library constructors and destructors is absent, the constructor and destructor are declared as global\nsymbols so that they may be called explicitly from within the application.\n\n**Note**: The helper macro must appear at the bottom of a source file, and no semicolon must follow it.\n\n**Prototype**\n```c\n#define JERRYX_NATIVE_MODULE(module_name, on_resolve_cb)\n```\n\n- `module_name` - the name of the module without quotes. This value is used as the prefix for the registration and unregistration funtions. For example, when `module_name` is `example_module`, this results in the declaration of two functions `example_module_register()` and `example_module_unregister()`. These functions are declared global if support for library constructors/destructors is absent, allowing you to call them from other parts of the code by\nfirst forward-declaring them.\n- `on_resolve_cb` - the function of type `jerryx_native_module_on_resolve_t` that will be called when the module needs to be\nloaded.\n\n**Example**\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/module.h\"\n\nstatic jerry_value_t\nmy_module_on_resolve (void)\n{\n  return jerry_create_external_function (very_useful_function);\n} /* my_module_on_resolve */\n\n/* Note that there is no semicolon at the end of the next line. This is how it must be. */\nJERRYX_NATIVE_MODULE (my_module, my_module_on_resolve)\n```\n\n**Example Usage When Library Constructors Are Unavailable**\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/module.h\"\n\n/**\n * Forward-declare the module registration and unregistration function.\n */\nextern void my_module_register (void);\nextern void my_module_unregister (void);\nint\nmain (int argc, char **argv)\n{\n  jerryx_module_resolver_t resolvers[] =\n  {\n    jerryx_native_module_resolver\n  };\n\n  /* This plays the role of the library constructor. */\n  my_module_register ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n  ...\n  jerry_value_t my_module = jerryx_module_resolve (\"my_module\", resolvers, 1);\n  ...\n  jerry_cleanup ();\n\n  /* This plays the role of the library destructor */\n  my_module_unregister();\n\n  return 0;\n}\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/13.DEBUGGER-TRANSPORT.md",
    "content": "# JerryScript debugger transport interface\n\nThe transport interface support allows dynamic selection of transportation\nlayers which can encode/decode or send/receive messages transmitted between\nthe debugger client and server.\n\n# Types\n\n## jerry_debugger_transport_receive_context_t\n\n**Summary**\n\nThis context represents the current status of processing received data.\nThe final state is returned by\n[jerry_debugger_transport_receive](#jerry_debugger_transport_receive)\nand must be passed to\n[jerry_debugger_transport_receive_completed](#jerry_debugger_transport_receive_completed)\nafter the message is processed.\n\n**Prototype**\n\n```c\ntypedef struct\n{\n  uint8_t *buffer_p; /**< buffer for storing the received data */\n  size_t received_length; /**< number of currently received bytes */\n  uint8_t *message_p; /**< start of the received message */\n  size_t message_length; /**< length of the received message */\n  size_t message_total_length; /**< total length for datagram protocols,\n                                *   0 for stream protocols */\n} jerry_debugger_transport_receive_context_t;\n```\n\n## jerry_debugger_transport_header_t\n\n**Summary**\n\nShared header for each transport interface. It mostly contains callback functions\nused by the JerryScript debugger server.\n\n**Prototype**\n\n```c\ntypedef struct jerry_debugger_transport_layer_t\n{\n  /* The following fields must be filled before calling jerry_debugger_transport_add(). */\n  jerry_debugger_transport_close_t close; /**< close connection callback */\n  jerry_debugger_transport_send_t send;  /**< send data callback */\n  jerry_debugger_transport_receive_t receive; /**< receive data callback */\n\n  /* The following fields are filled by jerry_debugger_transport_add(). */\n  struct jerry_debugger_transport_layer_t *next_p; /**< next transport layer */\n} jerry_debugger_transport_header_t;\n```\n\n## jerry_debugger_transport_close_t\n\n**Summary**\n\nCalled when the connection is closed. Must release all resources (including the\nmemory area for the transport interface) allocated for the transport interface.\n\n**Prototype**\n\n```c\ntypedef void (*jerry_debugger_transport_close_t) (struct jerry_debugger_transport_interface_t *header_p);\n```\n\n## jerry_debugger_transport_send_t\n\n**Summary**\n\nCalled when a message needs to be sent. Must either transmit the message or call\nthe `header_p->next_p->send()` method.\n\n**Prototype**\n\n```c\ntypedef bool (*jerry_debugger_transport_send_t) (struct jerry_debugger_transport_interface_t *header_p,\n                                                 uint8_t *message_p, size_t message_length);\n```\n\n## jerry_debugger_transport_receive_t\n\n**Summary**\n\nCalled during message processing. If messages are available it must return with\nthe next message.\n\n**Prototype**\n\n```c\ntypedef bool (*jerry_debugger_transport_receive_t) (struct jerry_debugger_transport_interface_t *header_p,\n                                                    jerry_debugger_transport_receive_context_t *context_p);\n```\n\n# Transport interface API functions\n\n## jerry_debugger_transport_add\n\n**Summary**\n\nAdd a new interface to the transporation interface chain. The interface\nwill be the first item of the interface chain.\n\n**Prototype**\n\n```c\nvoid jerry_debugger_transport_add (jerry_debugger_transport_header_t *header_p,\n                                   size_t send_message_header_size, size_t max_send_message_size,\n                                   size_t receive_message_header_size, size_t max_receive_message_size);\n```\n\n- `header_p`: header of a transporation interface.\n- `send_message_header_size`: size of the outgoing message header, can be 0.\n- `max_send_message_size`: maximum outgoing message size supported by the interface.\n- `receive_message_header_size`: size of the incoming message header, can be 0.\n- `max_receive_message_size`: maximum incoming message size supported by the interface.\n\n## jerry_debugger_transport_start\n\n**Summary**\n\nStarts the communication to the debugger client. Must be called after the\nconnection is successfully established.\n\n**Prototype**\n\n```c\nvoid jerry_debugger_transport_start (void);\n```\n\n## jerry_debugger_transport_is_connected\n\n**Summary**\n\nTells whether a debugger client is connected to the debugger server.\n\n**Prototype**\n\n```c\nbool jerry_debugger_transport_is_connected (void);\n```\n\n- return value: `true`, if a client is connected, `false` otherwise.\n\n## jerry_debugger_transport_close\n\n**Summary**\n\nDisconnect from the current debugger client. It does nothing if a client is\nnot connected.\n\n**Prototype**\n\n```c\nvoid jerry_debugger_transport_close (void);\n```\n\n## jerry_debugger_transport_send\n\n**Summary**\n\nSend message to the client.\n\n**Prototype**\n\n```c\nbool jerry_debugger_transport_send (const uint8_t *message_p, size_t message_length);\n```\n\n- `message_p`: message to be sent.\n- `message_length`: message length in bytes.\n- return value: `true`, if a client is still connected, `false` otherwise.\n\n## jerry_debugger_transport_receive\n\n**Summary**\n\nReceive message from the client.\n\n**Prototype**\n\n```c\nbool jerry_debugger_transport_receive (jerry_debugger_transport_receive_context_t *context_p);\n```\n\n- `context_p`: an unused [jerry_debugger_transport_receive_context_t](#jerry_debugger_transport_receive_context_t).\n- return value: `true`, if a client is still connected, `false` otherwise.\n\n## jerry_debugger_transport_receive_completed\n\n**Summary**\n\nMust be called after [jerry_debugger_transport_receive](#jerry_debugger_transport_receive)\nreturns with a valid message. Must not be called otherwise.\n\n**Prototype**\n\n```c\nvoid jerry_debugger_transport_receive_completed (jerry_debugger_transport_receive_context_t *context_p);\n```\n\n- `context_p`: a [jerry_debugger_transport_receive_context_t](#jerry_debugger_transport_receive_context_t)\n               passed to [jerry_debugger_transport_receive](#jerry_debugger_transport_receive).\n\n## jerry_debugger_transport_sleep\n\n**Summary**\n\nCan be used to wait for incoming messages. Currently the delay is 100ms.\n\n**Prototype**\n\n```c\nvoid jerry_debugger_transport_sleep (void);\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/14.EXT-REFERENCE-HANDLE-SCOPE.md",
    "content": "# Handle Scope\n\n## jerryx_handle_scope\n\n**Summary**\nIt is often necessary to make the lifespan of handles shorter than the lifespan of a native method. Even though the native code could only use the most recent handle, all of the associated objects would also be kept alive since they all share the same scope.\n\nTo handle this case, JerryScript HandleScope extension provides the ability to establish a new 'scope' to which newly created handles will be associated. Once those handles are no longer required, the scope can be 'closed' and any handles associated with the scope are invalidated. The methods available to open/close scopes are `jerryx_open_handle_scope` and `jerryx_close_handle_scope`.\n\nJerryScript only supports a single nested hierarchy of scopes. There is only one active scope at any time, and all new handles will be associated with that scope while it is active. Scopes must be closed in the reverse order from which they are opened. In addition, all scopes created within a native method must be closed before returning from that method.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n\nstatic jerry_value_t\ncreate_object (void)\n{\n  jerry_value_t obj = jerry_create_object ();\n  return obj;\n} /* create_object */\n\nstatic void\ntest_handle_scope_val (void)\n{\n  jerryx_handle_scope scope;\n  jerryx_open_handle_scope (&scope);\n  jerry_value_t obj = jerryx_create_handle (create_object ());\n\n  jerryx_close_handle_scope (scope);\n  // now obj has been released\n} /* test_handle_scope_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  test_handle_scope_val ();\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n\n  jerry_cleanup ();\n} /* main */\n```\n\n## jerryx_escapable_handle_scope\n\n**Summary**\n\nIt is necessary in common cases that a handle has to be promote to outer scope and prevent from been garbage collected. To handle this case, a escapable handle scope has been proposed from which one object can be promoted to the outer scope. The method available to escape an object from been release at current scope is `jerryx_escape_handle`.\n\n**Example**\n\n[doctest]: # (test=\"compile\")\n\n```c\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n\nstatic jerry_value_t\ncreate_object (void)\n{\n  jerryx_escapable_handle_scope scope;\n  jerryx_open_escapable_handle_scope (&scope);\n  jerry_value_t obj = jerryx_create_handle (jerry_create_object ());\n\n  jerry_value_t escaped_obj;\n  jerryx_escape_handle(scope, obj, &escaped_obj);\n  jerryx_close_handle_scope (scope);\n  // escaped_obj has now been escaped to outer scope, thus not released at this point\n\n  return escaped_obj;\n} /* create_object */\n\nstatic void\ntest_handle_scope_val (void)\n{\n  jerryx_handle_scope scope;\n  jerryx_open_handle_scope (&scope);\n  jerry_value_t obj = create_object ();\n\n  jerryx_close_handle_scope (scope);\n  // now obj has been released\n} /* test_handle_scope_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  test_handle_scope_val ();\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n\n  jerry_cleanup ();\n} /* main */\n```\n\n**See also**\n\n- [jerry_value_t](../docs/02.API-REFERENCE.md#jerry_value_t)\n- [jerry_acquire_value](../docs/02.API-REFERENCE.md#jerry_acquire_value)\n- [jerry_release_value](../docs/02.API-REFERENCE.md#jerry_release_value)\n\n## Pre-allocated list of handle scopes and handles\n\nTo prevent trapping into system calls frequently, a pre-allocated dedicated list mechanism has been introduced to the implementation of JerryX handle scope.\n\nTo change the size of pre-allocation list, use build definition `JERRYX_HANDLE_PRELIST_SIZE` and `JERRYX_SCOPE_PRELIST_SIZE` to alter the default value of 20.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/15.MODULE-SYSTEM.md",
    "content": "# ES6 module support for JerryScript\n\nThe module system allows users to write import and export statements in scripts, which can be used to separate the logic of the application into custom modules.\nThe standard's relevant part can be found [here](https://www.ecma-international.org/ecma-262/6.0/#sec-modules).\nEmbedders wishing to use native builtin modules with ES6 imports can use the [Port API](05.PORT-API.md#jerry-module-system) to do so.\n\n## General\n\nIf a script contains import statements, then JerryScript will open and evaluate the the referenced modules before the main script runs, resolving and creating bindings for the referenced identifiers in the process.\nIt is not necessary to use any specific filename extensions for modules, JerryScript will try to open the given file paths as they are, but will try to normalize them before doing so. The exact normalization process is dependant on the port implementation provided. It is the user's responsibility to verify that the given files are valid EcmaScript modules.\n\nmain.js\n\n```js\nimport { exported_value } from \"./module.js\"\n\nprint (exported_value);\n```\n\nmodule.js\n\n```js\nvar exported_value = 42;\n\nexport exported_value;\n```\n\n## Supported features\n\n* exporting identifiers from the module's lexical environment\n  * specifying export names for the exported values\n* importing exported identifiers from a module\n  * specifying local binding names for the imported values\n* module namespace imports\n  * `import * as module from 'module.js`\n* indirect export statements\n  * `export {variable} from 'module.js'`\n* star export statements\n  * `export * from 'module.js'`\n* importing a module for side-effects\n  * `import 'module.js'`\n* default import and export statements\n  * `export default local_identifier`\n  * `import def from 'module.js'`\n* anonymous default exports\n  * `export default function () {}`\n\n### Example\n\n```js\nimport {\n  engine,\n  version as v\n} from \"./module.js\"\n\nimport { getFeatureDetails } from \"./module_2.js\"\n\nvar version = \"v3.1415\";\n\nprint(\"> main.js\");\n\nprint(\">> Engine: \" + engine);\nprint(\">> Version: \" + v);\n\nprint (\">> \" + getFeatureDetails());\nprint (\">> Script version: \" + version);\n```\n\n```js\n// module.js\nvar _engine = \"JerryScript\";\nexport _engine as engine;\n\nexport var version = \"1.0 (e92ae0fb)\";\n```\n\n```js\n// module_2.js\nvar featureName = \"EcmaScript modules\";\nvar year = 2018;\n\nexport function getFeatureDetails() {\n  return \"Feature name: \" + featureName + \" | developed in \" + year;\n}\n```\n\n### Module namespace import statements\n\nA module namespace object can be imported. In this case the local binding will contain an object holding the exported values of the module, including local exports and all indirect exports. Ambiguous exported names are exluded from the namespace object.\n\n```js\nimport * as module from './module.js';\n\nprint(\">> Engine: \" + module.engine);\nprint(\">> Version: \" + module.version);\n```\n\n### Indirect export statements\n\nAn export statement can transitively export variables from another module, either via named indirect exports or a star export statement. In this case the resolving process will follow the chain until it reaches a module containing a local binding for that export name. If there are multiple modules which satisfy the export, that means the export is ambiguous, and will result in a SyntaxError.\n\n```js\nimport { a, b } from 'module.js'\n\nprint (a + b);\n```\n\n```js\n// module.js\nexport var a = 2;\nexport { b } from 'module2.js'\n```\n\n```js\n// module2.js\nexport var b = 40;\n```\n\n### Default imports and exports\n\nEach module can optionally provide a single default export by using the `export default` statement. Default exports can either reference identifiers in the module's lexical environment, or be an anonymous default export, in which case they will only be accessible by an importing script.\n\n```js\nimport defaultExport, { b as c } from 'module.js'\n\nprint (defaultExport); // 2\nprint (c ()); // 42\n```\n\n```js\n// module.js\nexport default 2;\nexport function b () {\n  return 42;\n}\n```\n\n### Importing modules for side-effects\n\nEvaluate a module without importing anything. Any errors encountered in the module will be propagated.\n\n```js\nimport 'module.js' // > module.js\n// \"> module.js\" is printed\nb (); // (ReferenceError) b is not defined\n```\n\n```js\n// module.js\nexport function b () {\n  print (\"> module.js\");\n  return 42;\n}\nb ();\n```\n\n## Unsupported features\n\n* **snapshot**\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/docs/16.MIGRATION-GUIDE.md",
    "content": "# Migration guide\n\nThis guide intends to describe the major changes between the JerryScript 1.0 and 2.0 versions.\nIn addtion it is designed to provide a guide on how to modify the 1.0 version code to a\n2.0 compliant code.\n\nDuring the development it was important to minimize the changes in the API functions and types.\nEach API method removal or chang is described below providing a ***before*** and ***after***\ncode example.\nFor more information on the current API methods please check the [API reference](02.API-REFERENCE.md) document.\n\n# Short list of removed/renamed headers, types, functions, and macros\n\n***Removed legacy headers***\n\n- `jerry-internal.h`\n\n***Renamed headers***\n\n- `jerry-api.h` to `jerryscript.h`\n- `jerry-port.h` to `jerryscript-port.h`\n\n***Removed API types***\n\n- `jerry_char_ptr_t` usage replaced with `jerry_char_t *`\n- `jerry_object_free_callback_t` replaced by `jerry_object_native_free_callback_t`\n\n***Removed API methods***\n\n- `jerry_get_memory_limits`\n- `jerry_get_object_native_handle` replaced by `jerry_get_object_native_pointer`\n- `jerry_set_object_native_handle` replaced by `jerry_set_object_native_pointer`\n- `jerry_value_set_abort_flag` replaced by `jerry_create_abort_from_value`\n- `jerry_value_has_abort_flag` replaced by `jerry_value_is_abort`\n- `jerry_value_set_error_flag` replaced by `jerry_create_error_from_value`\n- `jerry_value_has_error_flag` replaced by `jerry_value_is_error`\n- `jerry_value_clear_error_flag` replaced by `jerry_get_value_from_error`\n- `jerry_get_value_without_error_flag` replaced by `jerry_get_value_from_error`\n- `jerry_parse_and_save_snapshot` replaced by `jerry_generate_snapshot`\n- `jerry_parse_and_save_function_snapshot` replaced by `jerry_generate_function_snapshot`\n\n\n***Removed unused configuration macros***\n\n- `CONFIG_MEM_DATA_LIMIT_MINUS_HEAP_SIZE`\n- `CONFIG_MEM_STACK_LIMIT`\n- `CONFIG_VM_STACK_FRAME_INLINED_VALUES_NUMBER`\n- `CONFIG_ECMA_GLOBAL_ENVIRONMENT_DECLARATIVE`\n- All `CONFIG_..` macros have been renamed to use the `JERRY_` prefix format.\n\n\n# Modified API functions\n\n## Error manipulating functions\n\nThe most important changes in the API are releated to error handling and manipulation.\n\n### jerry_value_set_abort_flag\n\nThis function was replaced with  [`jerry_create_abort_from_value`](02.API-REFERENCE.md#jerry_create_abort_from_value).\nTake note of the second argument of the new `jerry_create_abort_from_value` function which controls if the\nfirst argument should be usable after the call or not.\n\n**Before**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  jerry_value_set_abort_flag (&value);\n\n  jerry_release_value (value);\n}\n```\n\n**After**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  jerry_value_t abort = jerry_create_abort_from_value (value, true);\n  // using the 'value' variable after release is invalid\n\n  jerry_release_value (abort);\n}\n```\n\n- OR\n\n```c\n{\n  jerry_value_t value;\n  ... // create or acquire value\n\n  jerry_value_t abort = jerry_create_abort_from_value (value, false);\n  // both 'abort' and 'value' can be used and must be released when they are no longer needed\n\n  jerry_release_value (abort);\n  jerry_release_value (value);\n}\n```\n\n### jerry_value_has_abort_flag\n\nThis function was renamed to  [`jerry_value_is_abort`](02.API-REFERENCE.md#jerry_value_is_abort).\n\n**Before**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  if (jerry_value_has_abort_flag (value))\n  {\n    // ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**After**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  if (jerry_value_is_abort (value))\n  {\n    // ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n### jerry_value_set_error_flag\n\nThis function was replaced with  [`jerry_create_error_from_value`](02.API-REFERENCE.md#jerry_create_error_from_value).\nTake note of the second argument of the new `jerry_create_error_from_value` function which controls if the\nfirst argument should be usable after the call or not.\n\n**Before**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  jerry_value_set_error_flag (&value);\n\n  jerry_release_value (value);\n}\n```\n\n**After**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  jerry_value_t error = jerry_create_error_from_value (value, true);\n  // using the 'value' variable after release is invalid\n\n  jerry_release_value (error);\n}\n```\n\n- OR\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  jerry_value_t error = jerry_create_error_from_value (value, false);\n  // both 'error' and 'value' can be used and must be released when they are no longer needed\n\n  jerry_release_value (error);\n  jerry_release_value (value);\n}\n```\n\n### jerry_value_has_error_flag\n\nThis function was renamed to  [`jerry_value_is_error`](02.API-REFERENCE.md#jerry_value_is_error).\n\n**Before**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  if (jerry_value_has_error_flag (value))\n  {\n    // ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n**After**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  if (jerry_value_is_error (value))\n  {\n    // ...\n  }\n\n  jerry_release_value (value);\n}\n```\n\n### jerry_value_clear_error_flag AND jerry_get_value_without_error_flag\n\nThese functions were merged into [`jerry_get_value_from_error`](02.API-REFERENCE.md#jerry_get_value_from_error).\nPlease note the second argument of the new function which controls if the first argument passed should be released\nor not.\n\n**Before**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  jerry_value_set_error_flag (&value);\n  jerry_value_clear_error_flag (&value);\n  // or\n  jerry_value_t real_value = jerry_get_value_without_error_flag (value);\n\n  jerry_release_value (value);\n  jerry_release_value (real_value);\n}\n```\n\n**After**\n\n```c\n{\n  jerry_value_t value;\n  // create or acquire value\n  // ...\n\n  jerry_value_t error = jerry_create_error_from_value (value, true);\n\n  jerry_value_t real_value = jerry_get_value_from_error (error, true);\n\n  jerry_release_value (real_value);\n}\n```\n\n## Other functions changed\n\n### jerry_register_magic_strings\n\nIn case of the `jerry_register_magic_strings` function the change is that\nthe first argument's base type `jerry_char_ptr_t` was changed to `jerry_char_t*`.\nFor more details see: [`jerry_register_magic_strings`](02.API-REFERENCE.md#jerry_register_magic_strings).\n\nIn the following code parts please take note of the type used for the `magic_string_items` array.\n\n**Before**\n\n```c\n{\n  // must be static, because 'jerry_register_magic_strings' does not copy\n  // the items must be sorted by size at first, then lexicographically\n  static const jerry_char_ptr_t magic_string_items[] = {\n                                                          (const jerry_char_ptr_t) \"magicstring1\",\n                                                          (const jerry_char_ptr_t) \"magicstring2\",\n                                                          (const jerry_char_ptr_t) \"magicstring3\"\n                                                        };\n  uint32_t num_magic_string_items = (uint32_t) (sizeof (magic_string_items) / sizeof (jerry_char_ptr_t));\n\n  // must be static, because 'jerry_register_magic_strings' does not copy\n  static const jerry_length_t magic_string_lengths[] = { 12, 12, 12 };\n  jerry_register_magic_strings (magic_string_items, num_magic_string_items, magic_string_lengths);\n}\n```\n\n**After**\n\n```c\n{\n  // must be static, because 'jerry_register_magic_strings' does not copy\n  // the items must be sorted by size at first, then lexicographically\n  static const jerry_char_t *magic_string_items[] = {\n                                                      (const jerry_char_t *) \"magicstring1\",\n                                                      (const jerry_char_t *) \"magicstring2\",\n                                                      (const jerry_char_t *) \"magicstring3\"\n                                                    };\n  uint32_t num_magic_string_items = (uint32_t) (sizeof (magic_string_items) / sizeof (jerry_char_t *));\n\n  // must be static, because 'jerry_register_magic_strings' does not copy\n  static const jerry_length_t magic_string_lengths[] = { 12, 12, 12 };\n  jerry_register_magic_strings (magic_string_items, num_magic_string_items, magic_string_lengths);\n}\n```\n\n## Snapshot generating API\n\n### jerry_parse_and_save_snapshot\n\nThis function was replaced with [`jerry_generate_snapshot`](02.API-REFERENCE.md#jerry_generate_snapshot).\nThe function returns an error object if there was any problem during snapshot generation and\nif there was no problem the return value is a number value containing the snapshot size in bytes.\n\n**Before**\n\n```c\n{\n  static uint32_t global_mode_snapshot_buffer[256];\n  const jerry_char_t *code_to_snapshot_p = (const jerry_char_t *) \"(function () { return 'string from snapshot'; }) ();\";\n\n  size_t global_mode_snapshot_size =\n    jerry_parse_and_save_snapshot (code_to_snapshot_p,\n                                   strlen ((const char *) code_to_snapshot_p),\n                                   true,\n                                   false,\n                                   global_mode_snapshot_buffer,\n                                   sizeof (global_mode_snapshot_buffer) / sizeof (uint32_t));\n  // use \"global_mode_snapshot_buffer\"\n}\n```\n\n**After**\n\n```c\n{\n  static uint32_t global_mode_snapshot_buffer[256];\n  const jerry_char_t *code_to_snapshot_p = (const jerry_char_t *) \"(function () { return 'string from snapshot'; }) ();\";\n\n  jerry_value_t generate_result;\n  generate_result = jerry_generate_snapshot (NULL,\n                                             0,\n                                             code_to_snapshot_p,\n                                             strlen ((const char *) code_to_snapshot_p),\n                                             global_mode_snapshot_buffer,\n                                             sizeof (global_mode_snapshot_buffer) / sizeof (uint32_t));\n  if (jerry_value_is_error (generate_result))\n  {\n    // There was a problem during snapshot generation, for example there is a SyntaxError.\n    // Use the \"generate_result\" to check the error.\n  }\n  else\n  {\n    size_t snapshot_size = (size_t) jerry_get_number_value (generate_result);\n    // use \"global_mode_snapshot_buffer\"\n  }\n  jerry_release_value (generate_result);\n}\n```\n\n### jerry_parse_and_save_function_snapshot\n\nThis function was replaced with [`jerry_generate_function_snapshot`](02.API-REFERENCE.md#jerry_parse_and_save_function_snapshot).\nThe function returns an error object if there was any problem during snapshot generation and\nif there was no problem the return value is a number value containing the snapshot size in bytes.\n\n**Before**\n\n```c\n{\n  static uint32_t func_snapshot_buffer[1024];\n\n  const jerry_char_t *args_p = (const jerry_char_t *) \"a, b\";\n  const jerry_char_t *src_p = (const jerry_char_t *) \"return a + b;\";\n\n  size_t func_snapshot_size =\n  jerry_parse_and_save_function_snapshot (src_p,\n                                          strlen ((const char *) src_p),\n                                          args_p,\n                                          strlen ((const char *) args_p),\n                                          false,\n                                          func_snapshot_buffer,\n                                          sizeof (func_snapshot_buffer) / sizeof (uint32_t));\n  // check \"function_snapshot_size\" and use \"func_snapshot_buffer\"\n}\n```\n\n**After**\n\n```c\n{\n  static uint32_t func_snapshot_buffer[1024];\n\n  const jerry_char_t *args_p = (const jerry_char_t *) \"a, b\";\n  const jerry_char_t *src_p = (const jerry_char_t *) \"return a + b;\";\n\n  jerry_value_t generate_result;\n  generate_result = jerry_generate_function_snapshot (NULL,\n                                                      0,\n                                                      src_p,\n                                                      strlen ((const char *) src_p),\n                                                      args_p,\n                                                      strlen ((const char *) args_p),\n                                                      0,\n                                                      func_snapshot_buffer,\n                                                      sizeof (func_snapshot_buffer) / sizeof (uint32_t));\n  if (jerry_value_is_error (generate_result))\n  {\n    // There was a problem during snapshot generation, for example there is a SyntaxError.\n    // Use the \"generate_result\" to check the error.\n  }\n  else\n  {\n    size_t snapshot_size = (size_t) jerry_get_number_value (generate_result);\n    // use \"func_snapshot_buffer\"\n  }\n\n  jerry_release_value (generate_result)\n}\n```\n\n## Garbage collection\n\n### jerry_gc\n\nThe [`jerry_gc`](02.API-REFERENCE.md#jerry_gc) function was modified to handle an argument which represents the pressure for the garbage collector.\nFor more information checkout the [`jerry_gc_mode_t`](02.API-REFERENCE.md#jerry_gc_mode_t) reference.\n\n**Before**\n\n```c\n{\n  jerry_gc ();\n}\n```\n\n**After**\n\n```c\n{\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n}\n```\n\n## jerry_eval\n\nThe third argument of [`jerry_eval`](02.API-REFERENCE.md#jerry_eval) has been changed\nfrom `bool` to [`jerry_parse_opts_t`](02.API-REFERENCE.md#jerry_parse_opts_t).\n\n**Before**\n\n```c\nconst jerry_char_t *str_to_eval = (const jerry_char_t *) \"1 + 1\";\njerry_value_t ret_val = jerry_eval (str_to_eval,\n                                    strlen ((const char *) str_to_eval),\n                                    false);\n```\n\n**After**\n\n```c\nconst jerry_char_t *str_to_eval = (const jerry_char_t *) \"1 + 1\";\njerry_value_t ret_val = jerry_eval (str_to_eval,\n                                    strlen ((const char *) str_to_eval),\n                                    JERRY_PARSE_NO_OPTS);\n```\n\n## Port API\n\n### jerry_port_get_time_zone\n\nThe port API of handling timezones has been changed. The previous interface did not\nallow timezones to be handled correctly, even if the host system was up to the task.\nCheck [the related issue](https://github.com/jerryscript-project/jerryscript/issues/1661)\nfor more details.\n\nThe new port API function name is [jerry_port_get_local_time_zone_adjustment](05.PORT-API.md#date-1].\n\nBelow is the default implementations for both versions:\n\n**Before**\n\n```c\nbool jerry_port_get_time_zone (jerry_time_zone_t *tz_p)\n{\n  struct timeval tv;\n  struct timezone tz;\n\n  /* gettimeofday may not fill tz, so zero-initializing */\n  tz.tz_minuteswest = 0;\n  tz.tz_dsttime = 0;\n\n  if (gettimeofday (&tv, &tz) != 0)\n  {\n    return false;\n  }\n\n  tz_p->offset = tz.tz_minuteswest;\n  tz_p->daylight_saving_time = tz.tz_dsttime > 0 ? 1 : 0;\n\n  return true;\n} /* jerry_port_get_time_zone */\n```\n\n**After**\n\n```c\ndouble jerry_port_get_local_time_zone_adjustment (double unix_ms,\n                                                  bool is_utc)\n{\n  struct tm tm;\n  time_t now = (time_t) (unix_ms / 1000);\n  localtime_r (&now, &tm);\n  if (!is_utc)\n  {\n    now -= tm.tm_gmtoff;\n    localtime_r (&now, &tm);\n  }\n  return ((double) tm.tm_gmtoff) * 1000;\n} /* jerry_port_get_local_time_zone_adjustment */\n```\n\n## Native pointers\n\nThe assignment of native pointers (previously called handles) have been changed\nsince v1.0. In the previous version only one native pointer could be assigned to\na `jerry_value_t`. Now it is allowed to register multiple native infos, which\ncan be accessed with the corresponding\n[`jerry_object_native_info_t`](02.API-REFERENCE.md#jerry_object_native_info_t).\nThe old functions were removed and replaced by new ones.\n\n- `jerry_object_free_callback_t` callback type is replaced by `jerry_object_native_info_t`\n- `jerry_get_object_native_handle` is replaced by [`jerry_get_object_native_pointer`](02.API-REFERENCE.md#jerry_get_object_native_pointer)\n- `jerry_set_object_native_handle` is replaced by [`jerry_set_object_native_pointer`](02.API-REFERENCE.md#jerry_set_object_native_pointer)\n\n**Before**\n\n```c\nstruct\n{\n  int data;\n} my_info;\n\nstatic void\nhandler_construct_freecb (uintptr_t native_p)\n{\n  // Invoked when the JS object is released and the\n  // native data should be freed.\n\n  struct my_info *info = (struct my_info *) native_p;\n  free (info);\n}\n\nvoid\ndemo (void)\n{\n  jerry_value_t this_val;\n  // create or acquire this_val\n  // ...\n\n  struct my_info *info = (struct my_info *) malloc (sizeof (struct my_info));\n  info->data = 11;\n\n  // setting the native handle\n  jerry_set_object_native_handle (this_val,\n                                  (uintptr_t) info,\n                                  handler_construct_freecb);\n  // ...\n  // reading back the native handle\n  uintptr_t ptr = (uintptr_t) NULL;\n  bool is_ok = jerry_get_object_native_handle (this_val, &ptr);\n  if (is_ok)\n  {\n    struct my_info *obj_info = (struct my_info *) ptr;\n    // use \"obj_info\"\n  }\n}\n```\n\n\n**After**\n\n```c\nstruct\n{\n  int data;\n} my_info;\n\nstatic void\nhandler_construct_freecb (void *native_p)\n{\n  // Invoked when the JS object is released and the\n  // native data should be freed.\n\n  struct my_info *info = (struct my_info *) native_p;\n  free (info);\n}\n\nstatic const jerry_object_native_info_t my_info_type_info =\n{\n  .free_cb = handler_construct_freecb\n};\n\nvoid\ndemo (void)\n{\n  jerry_value_t this_val;\n  // create or acquire this_val\n  // ...\n\n  struct my_info *info = (struct my_info *) malloc (sizeof (struct my_info));\n  info->data = 11;\n\n  // setting the native handle\n  jerry_set_object_native_pointer (this_val,\n                                   info,\n                                   &my_info_type_info);\n  // ...\n  // reading back the native handle pointed by the \"my_info_type_info\" variable\n  void *ptr = NULL;\n  bool has_p = jerry_get_object_native_pointer (this_val, &ptr, &my_info_type_info);\n  if (has_p)\n  {\n    struct my_info *obj_info = (struct my_info *) ptr;\n    // use \"obj_info\"\n  }\n}\n```\n\n# New API functions\n\nIn this section the new API functions are listed.\n\n## Built-in objects\n\n***ArrayBuffer***\n\n- [`jerry_create_arraybuffer`](02.API-REFERENCE.md#jerry_create_arraybuffer)\n- [`jerry_create_arraybuffer_external`](02.API-REFERENCE.md#jerry_create_arraybuffer_external)\n- [`jerry_get_arraybuffer_pointer`](02.API-REFERENCE.md#jerry_get_arraybuffer_pointer)\n\n***DataView***\n\n- [`jerry_create_dataview`](02.API-REFERENCE.md#jerry_create_dataview)\n- [`jerry_value_is_dataview`](02.API-REFERENCE.md#jerry_value_is_dataview)\n- [`jerry_get_dataview_buffer`](02.API-REFERENCE.md#jerry_get_dataview_buffer)\n\n***JSON***\n\n- [`jerry_json_parse`](02.API-REFERENCE.md#jerry_json_parse)\n- [`jerry_json_stringify`](02.API-REFERENCE.md#jerry_json_stringify)\n\n***Number***\n\n- [`jerry_create_number_infinity`](02.API-REFERENCE.md#jerry_create_number_infinity)\n- [`jerry_create_number_nan`](02.API-REFERENCE.md#jerry_create_number_nan)\n\n***Promise***\n\n- [`jerry_run_all_enqueued_jobs`](02.API-REFERENCE.md#jerry_run_all_enqueued_jobs)\n- [`jerry_create_promise`](02.API-REFERENCE.md#jerry_create_promise)\n- [`jerry_resolve_or_reject_promise`](02.API-REFERENCE.md#jerry_resolve_or_reject_promise)\n- [`jerry_value_is_promise`](02.API-REFERENCE.md#jerry_value_is_promise)\n\n***RegExp***\n\n- [`jerry_create_regexp`](02.API-REFERENCE.md#jerry_create_regexp)\n- [`jerry_create_regexp_sz`](02.API-REFERENCE.md#jerry_create_regexp_sz)\n\n***String***\n\n- [`jerry_substring_to_utf8_char_buffer`](02.API-REFERENCE.md#jerry_substring_to_utf8_char_buffer)\n- [`jerry_get_utf8_string_size`](02.API-REFERENCE.md#jerry_get_utf8_string_size)\n- [`jerry_get_utf8_string_length`](02.API-REFERENCE.md#jerry_get_utf8_string_length)\n- [`jerry_create_string_from_utf8`](02.API-REFERENCE.md#jerry_create_string_from_utf8)\n- [`jerry_create_string_sz_from_utf8`](02.API-REFERENCE.md#jerry_create_string_sz_from_utf8)\n\n***Symbol***\n\n- [`jerry_create_symbol`](02.API-REFERENCE.md#jerry_create_symbol)\n- [`jerry_get_symbol_descriptive_string`](02.API-REFERENCE.md#jerry_get_symbol_descriptive_string)\n- [`jerry_value_is_symbol`](02.API-REFERENCE.md#jerry_value_is_symbol)\n\n***TypedArray***\n\n- [`jerry_create_typedarray`](02.API-REFERENCE.md#jerry_create_typedarray)\n- [`jerry_create_typedarray_for_arraybuffer`](02.API-REFERENCE.md#jerry_create_typedarray_for_arraybuffer)\n- [`jerry_create_typedarray_for_arraybuffer_sz`](02.API-REFERENCE.md#jerry_create_typedarray_for_arraybuffer_sz)\n- [`jerry_get_typedarray_type`](02.API-REFERENCE.md#jerry_get_typedarray_type)\n- [`jerry_get_typedarray_length`](02.API-REFERENCE.md#jerry_get_typedarray_length)\n- [`jerry_get_typedarray_buffer`](02.API-REFERENCE.md#jerry_get_typedarray_buffer)\n- [`jerry_value_is_typedarray`](02.API-REFERENCE.md#jerry_value_is_typedarray)\n\n\n## Instances and memory management\n\n***JerryScript instances***\n\n- [`jerry_create_context`](02.API-REFERENCE.md#jerry_create_context)\n- [`jerry_get_context_data`](02.API-REFERENCE.md#jerry_get_context_data)\n\n***Memory management***\n\n- [`jerry_heap_alloc`](02.API-REFERENCE.md#jerry_heap_alloc)\n- [`jerry_heap_free`](02.API-REFERENCE.md#jerry_heap_free)\n\n\n## Operations with JavaScript values\n\n***Binary operations***\n\n- [`jerry_binary_operation`](02.API-REFERENCE.md#jerry_binary_operation)\n\n***Error manipulating***\n\n- [`jerry_get_error_type`](02.API-REFERENCE.md#jerry_get_error_type)\n- [`jerry_get_backtrace`](02.API-REFERENCE.md#jerry_get_backtrace)\n\n***Native pointers***\n\n- [`jerry_delete_object_native_pointer`](02.API-REFERENCE.md#jerry_delete_object_native_pointer)\n- [`jerry_objects_foreach_by_native_info`](02.API-REFERENCE.md#jerry_objects_foreach_by_native_info)\n\n***Property***\n\n- [`jerry_delete_property_by_index`](02.API-REFERENCE.md#jerry_delete_property_by_index)\n- [`jerry_objects_foreach`](02.API-REFERENCE.md#jerry_objects_foreach)\n\n\n## Debugger\n\n- [`jerry_debugger_is_connected`](07.DEBUGGER.md#jerry_debugger_is_connected)\n- [`jerry_debugger_stop`](07.DEBUGGER.md#jerry_debugger_stop)\n- [`jerry_debugger_continue`](07.DEBUGGER.md#jerry_debugger_continue)\n- [`jerry_debugger_stop_at_breakpoint`](07.DEBUGGER.md#jerry_debugger_stop_at_breakpoint)\n- [`jerry_debugger_wait_for_client_source`](07.DEBUGGER.md#jerry_debugger_wait_for_client_source)\n- [`jerry_debugger_send_output`](07.DEBUGGER.md#jerry_debugger_send_output)\n- [`jerry_debugger_send_log`](07.DEBUGGER.md#jerry_debugger_send_log)\n\n\n## Other\n\n- [`jerry_is_feature_enabled`](02.API-REFERENCE.md#jerry_is_feature_enabled)\n- [`jerry_parse_and_save_literals`](02.API-REFERENCE.md#jerry_parse_and_save_literals)\n- [`jerry_set_vm_exec_stop_callback`](02.API-REFERENCE.md#jerry_set_vm_exec_stop_callback)\n\n\n## Port API functions\n\n- [`jerry_port_normalize_path`](05.PORT-API.md#jerry_port_normalize_path)\n- [`jerry_port_read_source`](05.PORT-API.md#jerry_port_read_source)\n- [`jerry_port_release_source`](05.PORT-API.md#jerry_port_release_source)\n- [`jerry_port_print_char`](05.PORT-API.md#jerry_port_print_char)\n- [`jerry_port_get_current_context`](05.PORT-API.md#jerry_port_get_current_context)\n- [`jerry_port_fatal`](05.PORT-API.md#jerry_port_fatal)\n- [`jerry_port_sleep`](05.PORT-API.md#jerry_port_sleep)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nset(JERRY_CORE_NAME jerry-core)\nproject (${JERRY_CORE_NAME} C)\n\ninclude(CheckLibraryExists)\n\n# Optional features\nset(JERRY_CPOINTER_32_BIT           OFF          CACHE BOOL   \"Enable 32 bit compressed pointers?\")\nset(JERRY_DEBUGGER                  OFF          CACHE BOOL   \"Enable JerryScript debugger?\")\nset(JERRY_ERROR_MESSAGES            OFF          CACHE BOOL   \"Enable error messages?\")\nset(JERRY_EXTERNAL_CONTEXT          OFF          CACHE BOOL   \"Enable external context?\")\nset(JERRY_PARSER                    ON           CACHE BOOL   \"Enable javascript-parser?\")\nset(JERRY_LINE_INFO                 OFF          CACHE BOOL   \"Enable line info?\")\nset(JERRY_LOGGING                   OFF          CACHE BOOL   \"Enable logging?\")\nset(JERRY_MEM_STATS                 OFF          CACHE BOOL   \"Enable memory statistics?\")\nset(JERRY_MEM_GC_BEFORE_EACH_ALLOC  OFF          CACHE BOOL   \"Enable mem-stress test?\")\nset(JERRY_PARSER_DUMP_BYTE_CODE     OFF          CACHE BOOL   \"Enable parser byte-code dumps?\")\nset(JERRY_PROFILE                   \"es.next\"    CACHE STRING \"Use default or other profile?\")\nset(JERRY_REGEXP_STRICT_MODE        OFF          CACHE BOOL   \"Enable regexp strict mode?\")\nset(JERRY_REGEXP_DUMP_BYTE_CODE     OFF          CACHE BOOL   \"Enable regexp byte-code dumps?\")\nset(JERRY_SNAPSHOT_EXEC             OFF          CACHE BOOL   \"Enable executing snapshot files?\")\nset(JERRY_SNAPSHOT_SAVE             OFF          CACHE BOOL   \"Enable saving snapshot files?\")\nset(JERRY_SYSTEM_ALLOCATOR          OFF          CACHE BOOL   \"Enable system allocator?\")\nset(JERRY_VALGRIND                  OFF          CACHE BOOL   \"Enable Valgrind support?\")\nset(JERRY_VM_EXEC_STOP              OFF          CACHE BOOL   \"Enable VM execution stopping?\")\nset(JERRY_GLOBAL_HEAP_SIZE          \"(512)\"      CACHE STRING \"Size of memory heap, in kilobytes\")\nset(JERRY_GC_LIMIT                  \"(0)\"        CACHE STRING \"Heap usage limit to trigger garbage collection\")\nset(JERRY_STACK_LIMIT               \"(0)\"        CACHE STRING \"Maximum stack usage size, in kilobytes\")\nset(JERRY_GC_MARK_LIMIT             \"(8)\"        CACHE STRING \"Maximum depth of recursion during GC mark phase\")\n\n# Option overrides\nif(JERRY_SYSTEM_ALLOCATOR)\n  set(JERRY_CPOINTER_32_BIT ON)\n\n  set(JERRY_CPOINTER_32_BIT_MESSAGE \" (FORCED BY SYSTEM ALLOCATOR)\")\nendif()\n\nif (JERRY_GLOBAL_HEAP_SIZE GREATER 512)\n  set(JERRY_CPOINTER_32_BIT ON)\n\n  set(JERRY_CPOINTER_32_BIT_MESSAGE \" (FORCED BY HEAP SIZE)\")\nendif()\n\nif(NOT JERRY_PARSER)\n  set(JERRY_SNAPSHOT_EXEC ON)\n  set(JERRY_PARSER_DUMP   OFF)\n\n  set(JERRY_SNAPSHOT_EXEC_MESSAGE \" (FORCED BY DISABLED JS PARSER)\")\n  set(JERRY_PARSER_DUMP_MESSAGE   \" (FORCED BY DISABLED JS PARSER)\")\nendif()\n\nif(JERRY_CMDLINE_SNAPSHOT)\n  set(JERRY_SNAPSHOT_SAVE ON)\n\n  set(JERRY_SNAPSHOT_SAVE_MESSAGE \" (FORCED BY SNAPSHOT TOOL)\")\nendif()\n\nif(JERRY_MEM_STATS OR JERRY_PARSER_DUMP_BYTE_CODE OR JERRY_REGEXP_DUMP_BYTE_CODE)\n  set(JERRY_LOGGING ON)\n\n  set(JERRYRE_LOGGING_MESSAGE \" (FORCED BY STATS OR DUMP)\")\nendif()\n\n# Status messages\nmessage(STATUS \"JERRY_CPOINTER_32_BIT          \" ${JERRY_CPOINTER_32_BIT} ${JERRY_CPOINTER_32_BIT_MESSAGE})\nmessage(STATUS \"JERRY_DEBUGGER                 \" ${JERRY_DEBUGGER})\nmessage(STATUS \"JERRY_ERROR_MESSAGES           \" ${JERRY_ERROR_MESSAGES})\nmessage(STATUS \"JERRY_EXTERNAL_CONTEXT         \" ${JERRY_EXTERNAL_CONTEXT})\nmessage(STATUS \"JERRY_PARSER                   \" ${JERRY_PARSER})\nmessage(STATUS \"JERRY_LINE_INFO                \" ${JERRY_LINE_INFO})\nmessage(STATUS \"JERRY_LOGGING                  \" ${JERRY_LOGGING} ${JERRY_LOGGING_MESSAGE})\nmessage(STATUS \"JERRY_MEM_STATS                \" ${JERRY_MEM_STATS})\nmessage(STATUS \"JERRY_MEM_GC_BEFORE_EACH_ALLOC \" ${JERRY_MEM_GC_BEFORE_EACH_ALLOC})\nmessage(STATUS \"JERRY_PARSER_DUMP_BYTE_CODE    \" ${JERRY_PARSER_DUMP_BYTE_CODE} ${JERRY_PARSER_DUMP_MESSAGE})\nmessage(STATUS \"JERRY_PROFILE                  \" ${JERRY_PROFILE})\nmessage(STATUS \"JERRY_REGEXP_STRICT_MODE       \" ${JERRY_REGEXP_STRICT_MODE})\nmessage(STATUS \"JERRY_REGEXP_DUMP_BYTE_CODE    \" ${JERRY_REGEXP_DUMP_BYTE_CODE})\nmessage(STATUS \"JERRY_SNAPSHOT_EXEC            \" ${JERRY_SNAPSHOT_EXEC} ${JERRY_SNAPSHOT_EXEC_MESSAGE})\nmessage(STATUS \"JERRY_SNAPSHOT_SAVE            \" ${JERRY_SNAPSHOT_SAVE} ${JERRY_SNAPSHOT_SAVE_MESSAGE})\nmessage(STATUS \"JERRY_SYSTEM_ALLOCATOR         \" ${JERRY_SYSTEM_ALLOCATOR})\nmessage(STATUS \"JERRY_VALGRIND                 \" ${JERRY_VALGRIND})\nmessage(STATUS \"JERRY_VM_EXEC_STOP             \" ${JERRY_VM_EXEC_STOP})\nmessage(STATUS \"JERRY_GLOBAL_HEAP_SIZE         \" ${JERRY_GLOBAL_HEAP_SIZE})\nmessage(STATUS \"JERRY_GC_LIMIT                 \" ${JERRY_GC_LIMIT})\nmessage(STATUS \"JERRY_STACK_LIMIT              \" ${JERRY_STACK_LIMIT})\nmessage(STATUS \"JERRY_GC_MARK_LIMIT            \" ${JERRY_GC_MARK_LIMIT})\n\n# Include directories\nset(INCLUDE_CORE_PUBLIC \"${CMAKE_CURRENT_SOURCE_DIR}/include\")\nset(INCLUDE_CORE_PRIVATE\n    \"${CMAKE_CURRENT_SOURCE_DIR}\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/api\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/debugger\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/ecma/base\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/ecma/builtin-objects\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/ecma/builtin-objects/typedarray\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/ecma/operations\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/jcontext\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/jmem\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/jrt\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/lit\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/parser/js\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/parser/regexp\"\n    \"${CMAKE_CURRENT_SOURCE_DIR}/vm\")\n\nset(INCLUDE_CORE_PUBLIC ${INCLUDE_CORE_PUBLIC} PARENT_SCOPE) # for jerry-port\nset(INCLUDE_CORE_PRIVATE ${INCLUDE_CORE_PRIVATE} PARENT_SCOPE) # for tests/unit-core\n\n# Sources\n# Jerry core\nset(SOURCE_CORE_FILES\n  api/jerry-debugger-transport.c\n  api/jerry-debugger.c\n  api/jerry-snapshot.c\n  api/jerry.c\n  debugger/debugger.c\n  ecma/base/ecma-alloc.c\n  ecma/base/ecma-gc.c\n  ecma/base/ecma-helpers-collection.c\n  ecma/base/ecma-helpers-conversion.c\n  ecma/base/ecma-helpers-errol.c\n  ecma/base/ecma-helpers-external-pointers.c\n  ecma/base/ecma-helpers-number.c\n  ecma/base/ecma-helpers-string.c\n  ecma/base/ecma-helpers-value.c\n  ecma/base/ecma-helpers.c\n  ecma/base/ecma-init-finalize.c\n  ecma/base/ecma-lcache.c\n  ecma/base/ecma-literal-storage.c\n  ecma/base/ecma-module.c\n  ecma/base/ecma-property-hashmap.c\n  ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c\n  ecma/builtin-objects/ecma-builtin-array-prototype-unscopables.c\n  ecma/builtin-objects/ecma-builtin-array-prototype.c\n  ecma/builtin-objects/ecma-builtin-array.c\n  ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c\n  ecma/builtin-objects/ecma-builtin-arraybuffer.c\n  ecma/builtin-objects/ecma-builtin-async-function-prototype.c\n  ecma/builtin-objects/ecma-builtin-async-function.c\n  ecma/builtin-objects/ecma-builtin-async-generator-function.c\n  ecma/builtin-objects/ecma-builtin-async-generator-prototype.c\n  ecma/builtin-objects/ecma-builtin-async-generator.c\n  ecma/builtin-objects/ecma-builtin-async-iterator-prototype.c\n  ecma/builtin-objects/ecma-builtin-bigint-prototype.c\n  ecma/builtin-objects/ecma-builtin-bigint.c\n  ecma/builtin-objects/ecma-builtin-boolean-prototype.c\n  ecma/builtin-objects/ecma-builtin-boolean.c\n  ecma/builtin-objects/ecma-builtin-dataview-prototype.c\n  ecma/builtin-objects/ecma-builtin-dataview.c\n  ecma/builtin-objects/ecma-builtin-date-prototype.c\n  ecma/builtin-objects/ecma-builtin-date.c\n  ecma/builtin-objects/ecma-builtin-error-prototype.c\n  ecma/builtin-objects/ecma-builtin-error.c\n  ecma/builtin-objects/ecma-builtin-evalerror-prototype.c\n  ecma/builtin-objects/ecma-builtin-evalerror.c\n  ecma/builtin-objects/ecma-builtin-function-prototype.c\n  ecma/builtin-objects/ecma-builtin-function.c\n  ecma/builtin-objects/ecma-builtin-generator-function.c\n  ecma/builtin-objects/ecma-builtin-generator-prototype.c\n  ecma/builtin-objects/ecma-builtin-generator.c\n  ecma/builtin-objects/ecma-builtin-global.c\n  ecma/builtin-objects/ecma-builtin-handlers.c\n  ecma/builtin-objects/ecma-builtin-helpers-date.c\n  ecma/builtin-objects/ecma-builtin-helpers-error.c\n  ecma/builtin-objects/ecma-builtin-helpers-json.c\n  ecma/builtin-objects/ecma-builtin-helpers-sort.c\n  ecma/builtin-objects/ecma-builtin-helpers.c\n  ecma/builtin-objects/ecma-builtin-intrinsic.c\n  ecma/builtin-objects/ecma-builtin-iterator-prototype.c\n  ecma/builtin-objects/ecma-builtin-json.c\n  ecma/builtin-objects/ecma-builtin-map-iterator-prototype.c\n  ecma/builtin-objects/ecma-builtin-map-prototype.c\n  ecma/builtin-objects/ecma-builtin-map.c\n  ecma/builtin-objects/ecma-builtin-math.c\n  ecma/builtin-objects/ecma-builtin-number-prototype.c\n  ecma/builtin-objects/ecma-builtin-number.c\n  ecma/builtin-objects/ecma-builtin-object-prototype.c\n  ecma/builtin-objects/ecma-builtin-object.c\n  ecma/builtin-objects/ecma-builtin-promise-prototype.c\n  ecma/builtin-objects/ecma-builtin-promise.c\n  ecma/builtin-objects/ecma-builtin-proxy.c\n  ecma/builtin-objects/ecma-builtin-rangeerror-prototype.c\n  ecma/builtin-objects/ecma-builtin-rangeerror.c\n  ecma/builtin-objects/ecma-builtin-referenceerror-prototype.c\n  ecma/builtin-objects/ecma-builtin-referenceerror.c\n  ecma/builtin-objects/ecma-builtin-reflect.c\n  ecma/builtin-objects/ecma-builtin-regexp-prototype.c\n  ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.c\n  ecma/builtin-objects/ecma-builtin-regexp.c\n  ecma/builtin-objects/ecma-builtin-set-iterator-prototype.c\n  ecma/builtin-objects/ecma-builtin-set-prototype.c\n  ecma/builtin-objects/ecma-builtin-set.c\n  ecma/builtin-objects/ecma-builtin-string-iterator-prototype.c\n  ecma/builtin-objects/ecma-builtin-string-prototype.c\n  ecma/builtin-objects/ecma-builtin-string.c\n  ecma/builtin-objects/ecma-builtin-symbol-prototype.c\n  ecma/builtin-objects/ecma-builtin-symbol.c\n  ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.c\n  ecma/builtin-objects/ecma-builtin-syntaxerror.c\n  ecma/builtin-objects/ecma-builtin-type-error-thrower.c\n  ecma/builtin-objects/ecma-builtin-typeerror-prototype.c\n  ecma/builtin-objects/ecma-builtin-typeerror.c\n  ecma/builtin-objects/ecma-builtin-urierror-prototype.c\n  ecma/builtin-objects/ecma-builtin-urierror.c\n  ecma/builtin-objects/ecma-builtin-weakmap-prototype.c\n  ecma/builtin-objects/ecma-builtin-weakmap.c\n  ecma/builtin-objects/ecma-builtin-weakset-prototype.c\n  ecma/builtin-objects/ecma-builtin-weakset.c\n  ecma/builtin-objects/ecma-builtins.c\n  ecma/builtin-objects/typedarray/ecma-builtin-bigint64array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-bigint64array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-biguint64array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-biguint64array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-float32array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-float32array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-float64array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-float64array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-int16array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-int16array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-int32array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-int32array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-int8array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-int8array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-typedarray-helpers.c\n  ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-typedarray.c\n  ecma/builtin-objects/typedarray/ecma-builtin-uint16array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-uint16array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-uint32array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-uint32array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-uint8array-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-uint8array.c\n  ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray-prototype.c\n  ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray.c\n  ecma/operations/ecma-arguments-object.c\n  ecma/operations/ecma-array-object.c\n  ecma/operations/ecma-arraybuffer-object.c\n  ecma/operations/ecma-async-generator-object.c\n  ecma/operations/ecma-big-uint.c\n  ecma/operations/ecma-bigint-object.c\n  ecma/operations/ecma-bigint.c\n  ecma/operations/ecma-boolean-object.c\n  ecma/operations/ecma-comparison.c\n  ecma/operations/ecma-container-object.c\n  ecma/operations/ecma-conversion.c\n  ecma/operations/ecma-dataview-object.c\n  ecma/operations/ecma-eval.c\n  ecma/operations/ecma-exceptions.c\n  ecma/operations/ecma-function-object.c\n  ecma/operations/ecma-get-put-value.c\n  ecma/operations/ecma-iterator-object.c\n  ecma/operations/ecma-jobqueue.c\n  ecma/operations/ecma-lex-env.c\n  ecma/operations/ecma-number-arithmetic.c\n  ecma/operations/ecma-number-object.c\n  ecma/operations/ecma-objects-general.c\n  ecma/operations/ecma-objects.c\n  ecma/operations/ecma-promise-object.c\n  ecma/operations/ecma-proxy-object.c\n  ecma/operations/ecma-reference.c\n  ecma/operations/ecma-regexp-object.c\n  ecma/operations/ecma-string-object.c\n  ecma/operations/ecma-symbol-object.c\n  ecma/operations/ecma-typedarray-object.c\n  jcontext/jcontext.c\n  jmem/jmem-allocator.c\n  jmem/jmem-heap.c\n  jmem/jmem-poolman.c\n  jrt/jrt-fatals.c\n  lit/lit-char-helpers.c\n  lit/lit-magic-strings.c\n  lit/lit-strings.c\n  parser/js/byte-code.c\n  parser/js/common.c\n  parser/js/js-lexer.c\n  parser/js/js-parser-expr.c\n  parser/js/js-parser-mem.c\n  parser/js/js-parser-module.c\n  parser/js/js-parser-statm.c\n  parser/js/js-parser-tagged-template-literal.c\n  parser/js/js-parser-util.c\n  parser/js/js-parser.c\n  parser/js/js-scanner-ops.c\n  parser/js/js-scanner-util.c\n  parser/js/js-scanner.c\n  parser/regexp/re-bytecode.c\n  parser/regexp/re-compiler.c\n  parser/regexp/re-parser.c\n  vm/opcodes-ecma-arithmetics.c\n  vm/opcodes-ecma-bitwise.c\n  vm/opcodes-ecma-relational-equality.c\n  vm/opcodes.c\n  vm/vm-stack.c\n  vm/vm-utils.c\n  vm/vm.c\n)\n\n# Amalgamated JerryScript source/header build.\n#  The process will create the following files:\n#   * jerryscript.c\n#   * jerryscript.h\n#   * jerryscript-config.h\nif(ENABLE_AMALGAM)\n\n  # Create single C/H file\n  set(HEADER_CORE_FILES\n    api/jerry-snapshot.h\n    debugger/debugger.h\n    ecma/base/ecma-alloc.h\n    ecma/base/ecma-gc.h\n    ecma/base/ecma-globals.h\n    ecma/base/ecma-helpers.h\n    ecma/base/ecma-init-finalize.h\n    ecma/base/ecma-lcache.h\n    ecma/base/ecma-literal-storage.h\n    ecma/base/ecma-module.h\n    ecma/base/ecma-property-hashmap.h\n    ecma/builtin-objects/ecma-builtin-array-iterator-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-array-prototype-unscopables.inc.h\n    ecma/builtin-objects/ecma-builtin-array-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-array.inc.h\n    ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-arraybuffer.inc.h\n    ecma/builtin-objects/ecma-builtin-async-function-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-async-function.inc.h\n    ecma/builtin-objects/ecma-builtin-async-generator-function.inc.h\n    ecma/builtin-objects/ecma-builtin-async-generator-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-async-generator.inc.h\n    ecma/builtin-objects/ecma-builtin-async-iterator-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-bigint-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-bigint.inc.h\n    ecma/builtin-objects/ecma-builtin-boolean-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-boolean.inc.h\n    ecma/builtin-objects/ecma-builtin-dataview-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-dataview.inc.h\n    ecma/builtin-objects/ecma-builtin-date-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-date.inc.h\n    ecma/builtin-objects/ecma-builtin-error-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-error.inc.h\n    ecma/builtin-objects/ecma-builtin-evalerror-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-evalerror.inc.h\n    ecma/builtin-objects/ecma-builtin-function-prototype.h\n    ecma/builtin-objects/ecma-builtin-function-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-function.inc.h\n    ecma/builtin-objects/ecma-builtin-generator-function.inc.h\n    ecma/builtin-objects/ecma-builtin-generator-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-generator.inc.h\n    ecma/builtin-objects/ecma-builtin-global.inc.h\n    ecma/builtin-objects/ecma-builtin-handlers.h\n    ecma/builtin-objects/ecma-builtin-handlers.inc.h\n    ecma/builtin-objects/ecma-builtin-helpers-macro-defines.inc.h\n    ecma/builtin-objects/ecma-builtin-helpers-macro-undefs.inc.h\n    ecma/builtin-objects/ecma-builtin-helpers.h\n    ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h\n    ecma/builtin-objects/ecma-builtin-intrinsic.inc.h\n    ecma/builtin-objects/ecma-builtin-iterator-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-json.inc.h\n    ecma/builtin-objects/ecma-builtin-map-iterator-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-map-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-map.inc.h\n    ecma/builtin-objects/ecma-builtin-math.inc.h\n    ecma/builtin-objects/ecma-builtin-number-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-number.inc.h\n    ecma/builtin-objects/ecma-builtin-object-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-object.h\n    ecma/builtin-objects/ecma-builtin-object.inc.h\n    ecma/builtin-objects/ecma-builtin-promise-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-promise.inc.h\n    ecma/builtin-objects/ecma-builtin-proxy.inc.h\n    ecma/builtin-objects/ecma-builtin-rangeerror-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-rangeerror.inc.h\n    ecma/builtin-objects/ecma-builtin-referenceerror-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-referenceerror.inc.h\n    ecma/builtin-objects/ecma-builtin-reflect.inc.h\n    ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-regexp.inc.h\n    ecma/builtin-objects/ecma-builtin-set-iterator-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-set-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-set.inc.h\n    ecma/builtin-objects/ecma-builtin-string-iterator-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-string-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-string.inc.h\n    ecma/builtin-objects/ecma-builtin-symbol-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-symbol.inc.h\n    ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-syntaxerror.inc.h\n    ecma/builtin-objects/ecma-builtin-type-error-thrower.inc.h\n    ecma/builtin-objects/ecma-builtin-typeerror-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-typeerror.inc.h\n    ecma/builtin-objects/ecma-builtin-urierror-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-urierror.inc.h\n    ecma/builtin-objects/ecma-builtin-weakmap-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-weakmap.inc.h\n    ecma/builtin-objects/ecma-builtin-weakset-prototype.inc.h\n    ecma/builtin-objects/ecma-builtin-weakset.inc.h\n    ecma/builtin-objects/ecma-builtins-internal.h\n    ecma/builtin-objects/ecma-builtins.h\n    ecma/builtin-objects/ecma-builtins.inc.h\n    ecma/operations/ecma-arguments-object.h\n    ecma/operations/ecma-array-object.h\n    ecma/operations/ecma-arraybuffer-object.h\n    ecma/operations/ecma-async-generator-object.h\n    ecma/operations/ecma-big-uint.h\n    ecma/operations/ecma-bigint-object.h\n    ecma/operations/ecma-bigint.h\n    ecma/operations/ecma-boolean-object.h\n    ecma/operations/ecma-comparison.h\n    ecma/operations/ecma-container-object.h\n    ecma/operations/ecma-conversion.h\n    ecma/operations/ecma-dataview-object.h\n    ecma/operations/ecma-eval.h\n    ecma/operations/ecma-exceptions.h\n    ecma/operations/ecma-function-object.h\n    ecma/operations/ecma-iterator-object.h\n    ecma/operations/ecma-jobqueue.h\n    ecma/operations/ecma-lex-env.h\n    ecma/operations/ecma-number-arithmetic.h\n    ecma/operations/ecma-number-object.h\n    ecma/operations/ecma-objects-general.h\n    ecma/operations/ecma-objects.h\n    ecma/operations/ecma-promise-object.h\n    ecma/operations/ecma-proxy-object.h\n    ecma/operations/ecma-reference.h\n    ecma/operations/ecma-regexp-object.h\n    ecma/operations/ecma-string-object.h\n    ecma/operations/ecma-symbol-object.h\n    ecma/operations/ecma-typedarray-object.h\n    include/jerryscript-compiler.h\n    include/jerryscript-core.h\n    include/jerryscript-debugger-transport.h\n    include/jerryscript-debugger.h\n    include/jerryscript-port.h\n    include/jerryscript-snapshot.h\n    include/jerryscript.h\n    jcontext/jcontext.h\n    jmem/jmem-allocator-internal.h\n    jmem/jmem.h\n    jrt/jrt-bit-fields.h\n    jrt/jrt-libc-includes.h\n    jrt/jrt-types.h\n    jrt/jrt.h\n    lit/lit-char-helpers.h\n    lit/lit-globals.h\n    lit/lit-magic-strings.h\n    lit/lit-magic-strings.inc.h\n    lit/lit-strings.h\n    lit/lit-unicode-conversions-sup.inc.h\n    lit/lit-unicode-conversions.inc.h\n    lit/lit-unicode-folding.inc.h\n    lit/lit-unicode-ranges-sup.inc.h\n    lit/lit-unicode-ranges.inc.h\n    vm/opcodes.h\n    vm/vm-defines.h\n    vm/vm-stack.h\n    vm/vm.h\n  )\n\n  # Generated files\n  set(AMALGAM_CORE_C \"${CMAKE_BINARY_DIR}/amalgam/jerryscript.c\")\n  set(AMALGAM_CORE_H \"${CMAKE_BINARY_DIR}/amalgam/jerryscript.h\")\n  set(AMALGAM_CONFIG_H \"${CMAKE_BINARY_DIR}/amalgam/jerryscript-config.h\")\n\n  add_custom_command(OUTPUT ${AMALGAM_CORE_C} ${AMALGAM_CORE_H}\n                     COMMAND python ${CMAKE_SOURCE_DIR}/tools/amalgam.py\n                             --jerry-core\n                             --output-dir ${CMAKE_BINARY_DIR}/amalgam\n                     DEPENDS ${SOURCE_CORE_FILES}\n                             ${HEADER_CORE_FILES}\n                             ${CMAKE_SOURCE_DIR}/tools/amalgam.py\n  )\n\n  # The \"true\" jerryscript-config.h will be generated by the configure_file below,\n  # which contains the default options and the ones passed for the CMake.\n  # The input for this is the jerryscript-config.h generated by the command above.\n  set(JERRYSCRIPT_GEN_CONFIG_H ${CMAKE_CURRENT_BINARY_DIR}/jerryscript-config.h)\n  add_custom_command(OUTPUT ${AMALGAM_CONFIG_H}\n                     COMMAND ${CMAKE_COMMAND} -E copy ${JERRYSCRIPT_GEN_CONFIG_H} ${AMALGAM_CONFIG_H}\n                     DEPENDS ${AMALGAM_CORE_C} ${AMALGAM_CORE_H})\n  add_custom_target(amalgam-jerry DEPENDS ${AMALGAM_CORE_C} ${AMALGAM_CORE_H} ${AMALGAM_CONFIG_H})\n  add_dependencies(amalgam amalgam-jerry)\n\n  set(SOURCE_CORE_FILES ${AMALGAM_CORE_C} ${AMALGAM_CORE_H} ${AMALGAM_CONFIG_H})\nendif()\n\n# Third-party\n# Valgrind\nset(INCLUDE_THIRD_PARTY_VALGRIND \"${CMAKE_SOURCE_DIR}/third-party/valgrind\")\n\n# build mode specific compile/link flags\nset(DEFINES_JERRY ${DEFINES_JERRY} $<$<NOT:$<CONFIG:Debug>>:JERRY_NDEBUG>)\n\n# Jerry heap-section\nif(DEFINED JERRY_ATTR_GLOBAL_HEAP)\n  set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_ATTR_GLOBAL_HEAP=${JERRY_ATTR_GLOBAL_HEAP})\nendif()\n\n# Memory usage limit for triggering garbage collection\nif(JERRY_GC_LIMIT)\n  set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_GC_LIMIT=${JERRY_GC_LIMIT})\nendif()\n\n# Helper macro to set 0/1 switch as Jerry Defines\nmacro(jerry_add_define01 NAME)\n  if(${NAME})\n    set(DEFINES_JERRY ${DEFINES_JERRY} ${NAME}=1)\n  else()\n    set(DEFINES_JERRY ${DEFINES_JERRY} ${NAME}=0)\n  endif()\nendmacro(jerry_add_define01)\n\n# Checks the optional features\n# Enable 32 bit cpointers\njerry_add_define01(JERRY_CPOINTER_32_BIT)\n\n# Fill error messages for builtin error objects\njerry_add_define01(JERRY_ERROR_MESSAGES)\n\n# Use external context instead of static one\njerry_add_define01(JERRY_EXTERNAL_CONTEXT)\n\n# JS-Parser\njerry_add_define01(JERRY_PARSER)\n\n# JS line info\njerry_add_define01(JERRY_LINE_INFO)\n\n# Logging\njerry_add_define01(JERRY_LOGGING)\n\n# Memory statistics\njerry_add_define01(JERRY_MEM_STATS)\n\n# Enable debugger\njerry_add_define01(JERRY_DEBUGGER)\n\n# Memory management stress-test mode\njerry_add_define01(JERRY_MEM_GC_BEFORE_EACH_ALLOC)\n\n# Parser byte-code dumps\njerry_add_define01(JERRY_PARSER_DUMP_BYTE_CODE)\n\n# Profile\nif (${JERRY_PROFILE} STREQUAL \"es2015-subset\")\n  message(DEPRECATION \"'es2015-subset' profile is deprecated, please use 'es.next' instead.\")\nendif()\n\nif (NOT IS_ABSOLUTE ${JERRY_PROFILE})\n  set(JERRY_PROFILE \"${CMAKE_CURRENT_SOURCE_DIR}/profiles/${JERRY_PROFILE}.profile\")\nendif()\n\nif(EXISTS ${JERRY_PROFILE})\n  file(READ \"${JERRY_PROFILE}\" PROFILE_SETTINGS)\n  string(REGEX REPLACE \"[ \\t]*#[^\\n]*\" \"\" PROFILE_SETTINGS \"${PROFILE_SETTINGS}\")\n  string(REGEX REPLACE \"[\\r\\n]\" \";\" PROFILE_SETTINGS \"${PROFILE_SETTINGS}\")\n\n  # Process entries and save them as CMake variables.\n  # This is required to correctly generate the jerryscript-config.h file.\n  foreach(PROFILE_ENTRY ${PROFILE_SETTINGS})\n    string(REPLACE \"=\" \";\" PROFILE_ENTRY \"${PROFILE_ENTRY}\")\n    list(GET PROFILE_ENTRY 0 PROFILE_KEY)\n    list(GET PROFILE_ENTRY 1 PROFILE_VALUE)\n    set(${PROFILE_KEY} ${PROFILE_VALUE})\n  endforeach()\n\n  set(DEFINES_JERRY ${DEFINES_JERRY} ${PROFILE_SETTINGS})\nelse()\n  message(FATAL_ERROR \"Profile file: '${JERRY_PROFILE}' doesn't exist!\")\nendif()\n\n# RegExp strict mode\njerry_add_define01(JERRY_REGEXP_STRICT_MODE)\n\n# RegExp byte-code dumps\njerry_add_define01(JERRY_REGEXP_DUMP_BYTE_CODE)\n\n# Snapshot exec\njerry_add_define01(JERRY_SNAPSHOT_EXEC)\n\n# Snapshot save\njerry_add_define01(JERRY_SNAPSHOT_SAVE)\n\n# Enable system allocator\njerry_add_define01(JERRY_SYSTEM_ALLOCATOR)\n\n# Valgrind\njerry_add_define01(JERRY_VALGRIND)\nif(JERRY_VALGRIND)\n  set(INCLUDE_CORE_PRIVATE ${INCLUDE_CORE_PRIVATE} ${INCLUDE_THIRD_PARTY_VALGRIND})\nendif()\n\n# Enable VM execution stopping\njerry_add_define01(JERRY_VM_EXEC_STOP)\n\n# Size of heap\nset(DEFINES_JERRY ${DEFINES_JERRY} JERRY_GLOBAL_HEAP_SIZE=${JERRY_GLOBAL_HEAP_SIZE})\n\n# Maximum size of stack memory usage\nset(DEFINES_JERRY ${DEFINES_JERRY} JERRY_STACK_LIMIT=${JERRY_STACK_LIMIT})\n\n# Maximum depth of recursion during GC mark phase\nset(DEFINES_JERRY ${DEFINES_JERRY} JERRY_GC_MARK_LIMIT=${JERRY_GC_MARK_LIMIT})\n\n## This function is to read \"config.h\" for default values\nfunction(read_set_defines FILE PREFIX OUTPUTVAR)\n  file(READ \"${CMAKE_CURRENT_SOURCE_DIR}/${FILE}\" INPUT_FILE_CONTENTS)\n\n  # match all \"#define <PREFIX>\\n\" lines\n  # notes:\n  #  * before the \"#\" there must be a newline and any number of spaces.\n  #  * after the \"#\" there can be any number of spaces.\n  string(REGEX MATCHALL \"\\r?\\n[ ]*#[ ]*define ${PREFIX}[^\\n]*\"\n         RAW_DEFINES \"${INPUT_FILE_CONTENTS}\")\n\n  set(SELECTED_VARS )\n\n  # Transform the defines to a list of (<name>; <value>; <name 2>; <value 2>; ...) list\n  foreach(DEFINE_ENTRY ${RAW_DEFINES})\n    # by default every define value is empty\n    set(DEFINE_VALUE \" \")\n\n    # split up the define at the space between the define name and value (if there is any)\n\n    # first remove \"#define\" part of the string\n    string(REGEX REPLACE \"\\r?\\n[ ]*#[ ]*define[ ]+\" \"\" DEFINE_KEY_VALUE \"${DEFINE_ENTRY}\")\n    string(FIND \"${DEFINE_KEY_VALUE}\" \" \" DEFINE_KEY_IDX)\n    string(LENGTH \"${DEFINE_KEY_VALUE}\" DEFINE_LENGTH)\n\n    if (DEFINE_KEY_IDX EQUAL \"-1\")\n        set(DEFINE_KEY ${DEFINE_KEY_VALUE})\n    else()\n        string(SUBSTRING \"${DEFINE_KEY_VALUE}\" 0 ${DEFINE_KEY_IDX} DEFINE_KEY)\n        string(SUBSTRING \"${DEFINE_KEY_VALUE}\" ${DEFINE_KEY_IDX} -1 DEFINE_VALUE)\n        string(STRIP \"${DEFINE_VALUE}\" DEFINE_VALUE)\n    endif()\n\n    list(APPEND SELECTED_VARS ${DEFINE_KEY} ${DEFINE_VALUE})\n  endforeach()\n\n  set(${OUTPUTVAR} ${SELECTED_VARS} PARENT_SCOPE)\nendfunction(read_set_defines)\n\n# CONFIG_DEFAULTS contains define name and values which have the JERRY_ prefix\n# as a list of (<name>; <value>; <name 2>; <value 2>; ...)\nread_set_defines(\"config.h\" JERRY_ CONFIG_DEFAULTS)\n\n\n## Process the default values and build options to generate build config defines\nlist(LENGTH CONFIG_DEFAULTS CONFIG_DEFAULT_LENGTH)\nmath(EXPR CONFIG_DEFAULT_LENGTH \"${CONFIG_DEFAULT_LENGTH} - 1\")\n\nset(JERRY_MODIFIED_OPTIONS)\nforeach(CONFIG_IDX RANGE 0 ${CONFIG_DEFAULT_LENGTH} 2)\n  list(GET CONFIG_DEFAULTS ${CONFIG_IDX} KEY)\n  math(EXPR VALUE_IDX \"${CONFIG_IDX} + 1\")\n  list(GET CONFIG_DEFAULTS ${VALUE_IDX} VALUE)\n\n  # ${KEY} is the value for the given variable (aka define)\n  # normalize ON/OFF cmake values to 1/0 for easier processing.\n  if(${KEY} STREQUAL \"ON\")\n    set(${KEY} 1)\n  elseif(${KEY} STREQUAL \"OFF\")\n    set(${KEY} 0)\n  endif()\n\n  # Generate \"#define JERRY_<CONFIG> <CONFIG_VALUE>\" entries if it is different from\n  # the config default.\n\n  # If the define loaded from the config file have a different value than the\n  # relevant option passed for the CMake means that it does not have a default value.\n  if(DEFINED ${KEY} AND NOT (${KEY} STREQUAL ${VALUE}))\n    set(JERRY_MODIFIED_OPTIONS \"${JERRY_MODIFIED_OPTIONS}#define ${KEY} ${${KEY}}\\n\")\n  endif()\nendforeach()\n\n# Generate the jerryscript-config.h file into the build directory\n# This file will contain the options different from the default (aka it's the build config).\nif(JERRY_MODIFIED_OPTIONS)\n  set(JERRY_BUILD_CFG\n      \"Generated differences from default by CMake based on build options:\\n${JERRY_MODIFIED_OPTIONS}\")\nelse()\n  set(JERRY_BUILD_CFG \"JerryScript configuration\")\nendif()\nconfigure_file(config.h jerryscript-config.h @ONLY)\n\nadd_library(${JERRY_CORE_NAME} ${SOURCE_CORE_FILES})\n\ntarget_compile_definitions(${JERRY_CORE_NAME} PUBLIC ${DEFINES_JERRY})\ntarget_include_directories(${JERRY_CORE_NAME} PUBLIC ${INCLUDE_CORE_PUBLIC})\ntarget_include_directories(${JERRY_CORE_NAME} PRIVATE ${INCLUDE_CORE_PRIVATE})\n\nset(JERRY_CORE_PKGCONFIG_REQUIRES)\nset(JERRY_CORE_PKGCONFIG_LIBS)\nset(JERRY_CORE_PKGCONFIG_CFLAGS)\n\nif(ENABLE_LTO)\n  set(JERRY_CORE_PKGCONFIG_CFLAGS \"${JERRY_CORE_PKGCONFIG_CFLAGS} -flto\")\nendif()\n\nif(JERRY_MATH)\n  target_link_libraries(${JERRY_CORE_NAME} jerry-math)\n  set(JERRY_CORE_PKGCONFIG_REQUIRES libjerry-math)\nelse()\n  if(USING_GCC OR USING_CLANG)\n    set(CMAKE_REQUIRED_FLAGS \"-Wno-error -Wno-error=strict-prototypes\")\n  endif()\n  check_library_exists(m sin \"\" HAVE_M_LIB)\n  if(HAVE_M_LIB)\n    target_link_libraries(${JERRY_CORE_NAME} m)\n    set(JERRY_CORE_PKGCONFIG_LIBS \"${JERRY_CORE_PKGCONFIG_LIBS} -lm\")\n  endif()\nendif()\n\nseparate_arguments(EXTERNAL_LINK_LIBS)\nforeach(EXT_LIB ${EXTERNAL_LINK_LIBS})\n  target_link_libraries(${JERRY_CORE_NAME} ${EXT_LIB})\n  set(JERRY_CORE_PKGCONFIG_LIBS \"${JERRY_CORE_PKGCONFIG_LIBS} -l${EXT_LIB}\")\nendforeach()\n\nconfigure_file(libjerry-core.pc.in libjerry-core.pc @ONLY)\n\ninstall(TARGETS ${JERRY_CORE_NAME} DESTINATION lib)\ninstall(FILES ${CMAKE_CURRENT_BINARY_DIR}/libjerry-core.pc DESTINATION lib/pkgconfig)\ninstall(FILES ${CMAKE_CURRENT_BINARY_DIR}/jerryscript-config.h DESTINATION include)\ninstall(DIRECTORY ${INCLUDE_CORE_PUBLIC}/ DESTINATION include)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/api/jerry-debugger-transport.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"debugger.h\"\n#include \"jcontext.h\"\n#include \"jerryscript.h\"\n\n#if ENABLED (JERRY_DEBUGGER)\n\n/**\n * Minimum number of bytes transmitted or received.\n */\n#define JERRY_DEBUGGER_TRANSPORT_MIN_BUFFER_SIZE 64\n\n/**\n * Sleep time in milliseconds between each jerry_debugger_receive call\n */\n#define JERRY_DEBUGGER_TRANSPORT_TIMEOUT 100\n\n/**\n * Add a new transport layer.\n */\nvoid\njerry_debugger_transport_add (jerry_debugger_transport_header_t *header_p, /**< transport implementation */\n                              size_t send_message_header_size, /**< header bytes reserved for outgoing messages */\n                              size_t max_send_message_size, /**< maximum number of bytes transmitted in a message */\n                              size_t receive_message_header_size, /**< header bytes reserved for incoming messages */\n                              size_t max_receive_message_size) /**< maximum number of bytes received in a message */\n{\n  JERRY_ASSERT (max_send_message_size > JERRY_DEBUGGER_TRANSPORT_MIN_BUFFER_SIZE\n                && max_receive_message_size > JERRY_DEBUGGER_TRANSPORT_MIN_BUFFER_SIZE);\n\n  header_p->next_p = JERRY_CONTEXT (debugger_transport_header_p);\n  JERRY_CONTEXT (debugger_transport_header_p) = header_p;\n\n  uint8_t *payload_p;\n  size_t max_send_size;\n  size_t max_receive_size;\n\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    payload_p = JERRY_CONTEXT (debugger_send_buffer_payload_p);\n    max_send_size = JERRY_CONTEXT (debugger_max_send_size);\n    max_receive_size = JERRY_CONTEXT (debugger_max_receive_size);\n  }\n  else\n  {\n    JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_CONNECTED);\n    payload_p = JERRY_CONTEXT (debugger_send_buffer);\n    max_send_size = JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE;\n    max_receive_size = JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE;\n  }\n\n  JERRY_ASSERT (max_send_size > JERRY_DEBUGGER_TRANSPORT_MIN_BUFFER_SIZE + send_message_header_size);\n  JERRY_ASSERT (max_receive_size > JERRY_DEBUGGER_TRANSPORT_MIN_BUFFER_SIZE + receive_message_header_size);\n\n  JERRY_CONTEXT (debugger_send_buffer_payload_p) = payload_p + send_message_header_size;\n\n  max_send_size = max_send_size - send_message_header_size;\n  max_receive_size = max_receive_size - receive_message_header_size;\n\n  if (max_send_size > max_send_message_size)\n  {\n    max_send_size = max_send_message_size;\n  }\n\n  if (max_receive_size > max_receive_message_size)\n  {\n    max_receive_size = max_receive_message_size;\n  }\n\n  JERRY_CONTEXT (debugger_max_send_size) = (uint8_t) max_send_size;\n  JERRY_CONTEXT (debugger_max_receive_size) = (uint8_t) max_receive_size;\n} /* jerry_debugger_transport_add */\n\n/**\n * Starts the communication to the debugger client.\n * Must be called after the connection is successfully established.\n */\nvoid\njerry_debugger_transport_start (void)\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n  if (jerry_debugger_send_configuration (JERRY_CONTEXT (debugger_max_receive_size)))\n  {\n    JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_STOP);\n    JERRY_CONTEXT (debugger_stop_context) = NULL;\n  }\n} /* jerry_debugger_transport_start */\n\n/**\n * Returns true if a debugger client is connected.\n *\n * @return true - a debugger client is connected,\n *         false - otherwise\n */\nbool\njerry_debugger_transport_is_connected (void)\n{\n  return (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED) != 0;\n} /* jerry_debugger_transport_is_connected */\n\n/**\n * Notifies the debugger server that the connection is closed.\n */\nvoid\njerry_debugger_transport_close (void)\n{\n  if (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED))\n  {\n    return;\n  }\n\n  JERRY_CONTEXT (debugger_flags) = JERRY_DEBUGGER_VM_IGNORE;\n\n  jerry_debugger_transport_header_t *current_p = JERRY_CONTEXT (debugger_transport_header_p);\n\n  JERRY_ASSERT (current_p != NULL);\n\n  do\n  {\n    jerry_debugger_transport_header_t *next_p = current_p->next_p;\n\n    current_p->close (current_p);\n\n    current_p = next_p;\n  }\n  while (current_p != NULL);\n\n  jerry_port_log (JERRY_LOG_LEVEL_DEBUG, \"Debugger client connection closed.\\n\");\n\n  jerry_debugger_free_unreferenced_byte_code ();\n} /* jerry_debugger_transport_close */\n\n/**\n * Send data over the current connection\n *\n * @return true - data sent successfully,\n *         false - connection closed\n */\nbool\njerry_debugger_transport_send (const uint8_t *message_p, /**< message to be sent */\n                               size_t message_length) /**< message length in bytes */\n{\n  JERRY_ASSERT (jerry_debugger_transport_is_connected ());\n  JERRY_ASSERT (message_length > 0);\n\n  jerry_debugger_transport_header_t *header_p = JERRY_CONTEXT (debugger_transport_header_p);\n  uint8_t *payload_p = JERRY_CONTEXT (debugger_send_buffer_payload_p);\n  size_t max_send_size = JERRY_CONTEXT (debugger_max_send_size);\n\n  do\n  {\n    size_t fragment_length = (message_length <= max_send_size ? message_length\n                                                              : max_send_size);\n\n    memcpy (payload_p, message_p, fragment_length);\n\n    if (!header_p->send (header_p, payload_p, fragment_length))\n    {\n      return false;\n    }\n\n    message_p += fragment_length;\n    message_length -= fragment_length;\n  }\n  while (message_length > 0);\n\n  return true;\n} /* jerry_debugger_transport_send */\n\n/**\n * Receive data from the current connection\n *\n * Note:\n *   A message is received if message_start_p is not NULL\n *\n * @return true - function successfully completed,\n *         false - connection closed\n */\nbool\njerry_debugger_transport_receive (jerry_debugger_transport_receive_context_t *context_p) /**< [out] receive\n                                                                                          *   context */\n{\n  JERRY_ASSERT (jerry_debugger_transport_is_connected ());\n\n  context_p->buffer_p = JERRY_CONTEXT (debugger_receive_buffer);\n  context_p->received_length = JERRY_CONTEXT (debugger_received_length);\n  context_p->message_p = NULL;\n  context_p->message_length = 0;\n  context_p->message_total_length = 0;\n\n  jerry_debugger_transport_header_t *header_p = JERRY_CONTEXT (debugger_transport_header_p);\n\n  return header_p->receive (header_p, context_p);\n} /* jerry_debugger_transport_receive */\n\n/**\n * Clear the message buffer after the message is processed\n */\nvoid\njerry_debugger_transport_receive_completed (jerry_debugger_transport_receive_context_t *context_p) /**< receive\n                                                                                                    *   context */\n{\n  JERRY_ASSERT (context_p->message_p != NULL);\n  JERRY_ASSERT (context_p->buffer_p == JERRY_CONTEXT (debugger_receive_buffer));\n\n  size_t message_total_length = context_p->message_total_length;\n  size_t received_length = context_p->received_length;\n\n  JERRY_ASSERT (message_total_length <= received_length);\n\n  if (message_total_length == 0 || message_total_length == received_length)\n  {\n    /* All received data is processed. */\n    JERRY_CONTEXT (debugger_received_length) = 0;\n    return;\n  }\n\n  uint8_t *buffer_p = context_p->buffer_p;\n  received_length -= message_total_length;\n\n  memmove (buffer_p, buffer_p + message_total_length, received_length);\n\n  JERRY_CONTEXT (debugger_received_length) = (uint16_t) received_length;\n} /* jerry_debugger_transport_receive_completed */\n\n/**\n * Suspend execution for a predefined time (JERRY_DEBUGGER_TRANSPORT_TIMEOUT ms).\n */\nvoid\njerry_debugger_transport_sleep (void)\n{\n  jerry_port_sleep (JERRY_DEBUGGER_TRANSPORT_TIMEOUT);\n} /* jerry_debugger_transport_sleep */\n\n#endif /* ENABLED (JERRY_DEBUGGER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/api/jerry-debugger.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"debugger.h\"\n#include \"jcontext.h\"\n#include \"jerryscript.h\"\n\n/**\n * Checks whether the debugger is connected.\n *\n * @return true - if the debugger is connected\n *         false - otherwise\n */\nbool\njerry_debugger_is_connected (void)\n{\n#if ENABLED (JERRY_DEBUGGER)\n  return JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED;\n#else /* !ENABLED (JERRY_DEBUGGER) */\n  return false;\n#endif /* ENABLED (JERRY_DEBUGGER) */\n} /* jerry_debugger_is_connected */\n\n/**\n * Stop execution at the next available breakpoint.\n */\nvoid\njerry_debugger_stop (void)\n{\n#if ENABLED (JERRY_DEBUGGER)\n  if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      && !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_BREAKPOINT_MODE))\n  {\n    JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_STOP);\n    JERRY_CONTEXT (debugger_stop_context) = NULL;\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n} /* jerry_debugger_stop */\n\n/**\n * Continue execution.\n */\nvoid\njerry_debugger_continue (void)\n{\n#if ENABLED (JERRY_DEBUGGER)\n  if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      && !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_BREAKPOINT_MODE))\n  {\n    JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_STOP);\n    JERRY_CONTEXT (debugger_stop_context) = NULL;\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n} /* jerry_debugger_continue */\n\n/**\n * Sets whether the engine should stop at breakpoints.\n */\nvoid\njerry_debugger_stop_at_breakpoint (bool enable_stop_at_breakpoint) /**< enable/disable stop at breakpoint */\n{\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED\n      && !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_BREAKPOINT_MODE))\n  {\n    if (enable_stop_at_breakpoint)\n    {\n      JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_IGNORE);\n    }\n    else\n    {\n      JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_IGNORE);\n    }\n  }\n#else /* !ENABLED (JERRY_DEBUGGER) */\n  JERRY_UNUSED (enable_stop_at_breakpoint);\n#endif /* ENABLED (JERRY_DEBUGGER) */\n} /* jerry_debugger_stop_at_breakpoint */\n\n/**\n * Sets whether the engine should wait and run a source.\n *\n * @return enum JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED - if the source is not received\n *              JERRY_DEBUGGER_SOURCE_RECEIVED - if a source code received\n *              JERRY_DEBUGGER_SOURCE_END - the end of the source codes\n *              JERRY_DEBUGGER_CONTEXT_RESET_RECEIVED - the end of the context\n */\njerry_debugger_wait_for_source_status_t\njerry_debugger_wait_for_client_source (jerry_debugger_wait_for_source_callback_t callback_p, /**< callback function */\n                                       void *user_p, /**< user pointer passed to the callback */\n                                       jerry_value_t *return_value) /**< [out] parse and run return value */\n{\n  *return_value = jerry_create_undefined ();\n\n#if ENABLED (JERRY_DEBUGGER)\n  if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      && !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_BREAKPOINT_MODE))\n  {\n    JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_CLIENT_SOURCE_MODE);\n    jerry_debugger_uint8_data_t *client_source_data_p = NULL;\n    jerry_debugger_wait_for_source_status_t ret_type = JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED;\n\n    /* Notify the client about that the engine is waiting for a source. */\n    jerry_debugger_send_type (JERRY_DEBUGGER_WAIT_FOR_SOURCE);\n\n    while (true)\n    {\n      if (jerry_debugger_receive (&client_source_data_p))\n      {\n        if (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED))\n        {\n          break;\n        }\n\n        /* Stop executing the current context. */\n        if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONTEXT_RESET_MODE))\n        {\n          ret_type = JERRY_DEBUGGER_CONTEXT_RESET_RECEIVED;\n          JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_CONTEXT_RESET_MODE);\n          break;\n        }\n\n        /* Stop waiting for a new source file. */\n        if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CLIENT_NO_SOURCE))\n        {\n          ret_type = JERRY_DEBUGGER_SOURCE_END;\n          JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_CLIENT_SOURCE_MODE);\n          break;\n        }\n\n        /* The source arrived. */\n        if (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CLIENT_SOURCE_MODE))\n        {\n          JERRY_ASSERT (client_source_data_p != NULL);\n\n          jerry_char_t *resource_name_p = (jerry_char_t *) (client_source_data_p + 1);\n          size_t resource_name_size = strlen ((const char *) resource_name_p);\n\n          *return_value = callback_p (resource_name_p,\n                                      resource_name_size,\n                                      resource_name_p + resource_name_size + 1,\n                                      client_source_data_p->uint8_size - resource_name_size - 1,\n                                      user_p);\n\n          ret_type = JERRY_DEBUGGER_SOURCE_RECEIVED;\n          break;\n        }\n      }\n\n      jerry_debugger_transport_sleep ();\n    }\n\n    JERRY_ASSERT (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CLIENT_SOURCE_MODE)\n                  || !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED));\n\n    if (client_source_data_p != NULL)\n    {\n      /* The data may partly arrived. */\n      jmem_heap_free_block (client_source_data_p,\n                            client_source_data_p->uint8_size + sizeof (jerry_debugger_uint8_data_t));\n    }\n\n    return ret_type;\n  }\n\n  return JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED;\n#else /* !ENABLED (JERRY_DEBUGGER) */\n  JERRY_UNUSED (callback_p);\n  JERRY_UNUSED (user_p);\n\n  return JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED;\n#endif /* ENABLED (JERRY_DEBUGGER) */\n} /* jerry_debugger_wait_for_client_source */\n\n/**\n * Send the output of the program to the debugger client.\n * Currently only sends print output.\n */\nvoid\njerry_debugger_send_output (const jerry_char_t *buffer, /**< buffer */\n                            jerry_size_t str_size) /**< string size */\n{\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_string (JERRY_DEBUGGER_OUTPUT_RESULT,\n                                JERRY_DEBUGGER_OUTPUT_OK,\n                                (const uint8_t *) buffer,\n                                sizeof (uint8_t) * str_size);\n  }\n#else /* !ENABLED (JERRY_DEBUGGER) */\n  JERRY_UNUSED (buffer);\n  JERRY_UNUSED (str_size);\n#endif /* ENABLED (JERRY_DEBUGGER) */\n} /* jerry_debugger_send_output */\n\n/**\n * Send the log of the program to the debugger client.\n */\nvoid\njerry_debugger_send_log (jerry_log_level_t level, /**< level of the diagnostics message */\n                         const jerry_char_t *buffer, /**< buffer */\n                         jerry_size_t str_size) /**< string size */\n{\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_string (JERRY_DEBUGGER_OUTPUT_RESULT,\n                                (uint8_t) (level + 2),\n                                (const uint8_t *) buffer,\n                                sizeof (uint8_t) * str_size);\n  }\n#else /* !ENABLED (JERRY_DEBUGGER) */\n  JERRY_UNUSED (level);\n  JERRY_UNUSED (buffer);\n  JERRY_UNUSED (str_size);\n#endif /* ENABLED (JERRY_DEBUGGER) */\n} /* jerry_debugger_send_log */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/api/jerry-snapshot.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-literal-storage.h\"\n#include \"jcontext.h\"\n#include \"jerryscript.h\"\n#include \"jerry-snapshot.h\"\n#include \"js-parser.h\"\n#include \"lit-char-helpers.h\"\n#include \"js-parser-internal.h\"\n#include \"re-compiler.h\"\n\n#if ENABLED (JERRY_SNAPSHOT_SAVE) || ENABLED (JERRY_SNAPSHOT_EXEC)\n\n/**\n * Get snapshot configuration flags.\n *\n * @return configuration flags\n */\nstatic inline uint32_t JERRY_ATTR_ALWAYS_INLINE\nsnapshot_get_global_flags (bool has_regex, /**< regex literal is present */\n                           bool has_class) /**< class literal is present */\n{\n  JERRY_UNUSED (has_regex);\n  JERRY_UNUSED (has_class);\n\n  uint32_t flags = 0;\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  flags |= (has_regex ? JERRY_SNAPSHOT_HAS_REGEX_LITERAL : 0);\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#if ENABLED (JERRY_ESNEXT)\n  flags |= (has_class ? JERRY_SNAPSHOT_HAS_CLASS_LITERAL : 0);\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  flags |= JERRY_SNAPSHOT_HAS_REALM_VALUE;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  return flags;\n} /* snapshot_get_global_flags */\n\n/**\n * Checks whether the global_flags argument matches to the current feature set.\n *\n * @return true if global_flags accepted, false otherwise\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\nsnapshot_check_global_flags (uint32_t global_flags) /**< global flags */\n{\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  global_flags &= (uint32_t) ~JERRY_SNAPSHOT_HAS_REGEX_LITERAL;\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#if ENABLED (JERRY_ESNEXT)\n  global_flags &= (uint32_t) ~JERRY_SNAPSHOT_HAS_CLASS_LITERAL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  global_flags |= JERRY_SNAPSHOT_HAS_REALM_VALUE;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  return global_flags == snapshot_get_global_flags (false, false);\n} /* snapshot_check_global_flags */\n\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) || ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n\n/**\n * Variables required to take a snapshot.\n */\ntypedef struct\n{\n  size_t snapshot_buffer_write_offset;\n  ecma_value_t snapshot_error;\n  bool regex_found;\n  bool class_found;\n} snapshot_globals_t;\n\n/** \\addtogroup jerrysnapshot Jerry snapshot operations\n * @{\n */\n\n/**\n * Write data into the specified buffer.\n *\n * Note:\n *      Offset is in-out and is incremented if the write operation completes successfully.\n *\n * @return true - if write was successful, i.e. offset + data_size doesn't exceed buffer size,\n *         false - otherwise\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\nsnapshot_write_to_buffer_by_offset (uint8_t *buffer_p, /**< buffer */\n                                    size_t buffer_size, /**< size of buffer */\n                                    size_t *in_out_buffer_offset_p,  /**< [in,out] offset to write to\n                                                                      * incremented with data_size */\n                                    const void *data_p, /**< data */\n                                    size_t data_size) /**< size of the writable data */\n{\n  if (*in_out_buffer_offset_p + data_size > buffer_size)\n  {\n    return false;\n  }\n\n  memcpy (buffer_p + *in_out_buffer_offset_p, data_p, data_size);\n  *in_out_buffer_offset_p += data_size;\n\n  return true;\n} /* snapshot_write_to_buffer_by_offset */\n\n/**\n * Maximum snapshot write buffer offset.\n */\n#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n#define JERRY_SNAPSHOT_MAXIMUM_WRITE_OFFSET (0x7fffff >> 1)\n#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#define JERRY_SNAPSHOT_MAXIMUM_WRITE_OFFSET (UINT32_MAX >> 1)\n#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n/**\n * Save snapshot helper.\n *\n * @return start offset\n */\nstatic uint32_t\nsnapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled code */\n                            uint8_t *snapshot_buffer_p, /**< snapshot buffer */\n                            size_t snapshot_buffer_size, /**< snapshot buffer size */\n                            snapshot_globals_t *globals_p) /**< snapshot globals */\n{\n  const jerry_char_t *error_buffer_too_small_p = (const jerry_char_t *) \"Snapshot buffer too small.\";\n\n  if (!ecma_is_value_empty (globals_p->snapshot_error))\n  {\n    return 0;\n  }\n\n  JERRY_ASSERT ((globals_p->snapshot_buffer_write_offset & (JMEM_ALIGNMENT - 1)) == 0);\n\n  if (globals_p->snapshot_buffer_write_offset > JERRY_SNAPSHOT_MAXIMUM_WRITE_OFFSET)\n  {\n    const char * const error_message_p = \"Maximum snapshot size reached.\";\n    globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);\n    return 0;\n  }\n\n  /* The snapshot generator always parses a single file,\n   * so the base always starts right after the snapshot header. */\n  uint32_t start_offset = (uint32_t) (globals_p->snapshot_buffer_write_offset - sizeof (jerry_snapshot_header_t));\n\n  uint8_t *copied_code_start_p = snapshot_buffer_p + globals_p->snapshot_buffer_write_offset;\n  ecma_compiled_code_t *copied_code_p = (ecma_compiled_code_t *) copied_code_start_p;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_HAS_TAGGED_LITERALS)\n  {\n    const char * const error_message_p = \"Unsupported feature: tagged template literals.\";\n    globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);\n    return 0;\n  }\n\n  if (CBC_FUNCTION_GET_TYPE (compiled_code_p->status_flags) == CBC_FUNCTION_CONSTRUCTOR)\n  {\n    globals_p->class_found = true;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  if (!CBC_IS_FUNCTION (compiled_code_p->status_flags))\n  {\n    /* Regular expression. */\n    if (globals_p->snapshot_buffer_write_offset + sizeof (ecma_compiled_code_t) > snapshot_buffer_size)\n    {\n      globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, error_buffer_too_small_p);\n      return 0;\n    }\n\n    globals_p->snapshot_buffer_write_offset += sizeof (ecma_compiled_code_t);\n\n    ecma_value_t pattern = ((re_compiled_code_t *) compiled_code_p)->source;\n    ecma_string_t *pattern_string_p = ecma_get_string_from_value (pattern);\n\n    lit_utf8_size_t pattern_size = 0;\n\n    ECMA_STRING_TO_UTF8_STRING (pattern_string_p, buffer_p, buffer_size);\n\n    pattern_size = buffer_size;\n\n    if (!snapshot_write_to_buffer_by_offset (snapshot_buffer_p,\n                                             snapshot_buffer_size,\n                                             &globals_p->snapshot_buffer_write_offset,\n                                             buffer_p,\n                                             buffer_size))\n    {\n      globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, error_buffer_too_small_p);\n      /* cannot return inside ECMA_FINALIZE_UTF8_STRING */\n    }\n\n    ECMA_FINALIZE_UTF8_STRING (buffer_p, buffer_size);\n\n    if (!ecma_is_value_empty (globals_p->snapshot_error))\n    {\n      return 0;\n    }\n\n    globals_p->regex_found = true;\n    globals_p->snapshot_buffer_write_offset = JERRY_ALIGNUP (globals_p->snapshot_buffer_write_offset,\n                                                             JMEM_ALIGNMENT);\n\n    /* Regexp character size is stored in refs. */\n    copied_code_p->refs = (uint16_t) pattern_size;\n\n    pattern_size += (lit_utf8_size_t) sizeof (ecma_compiled_code_t);\n    copied_code_p->size = (uint16_t) ((pattern_size + JMEM_ALIGNMENT - 1) >> JMEM_ALIGNMENT_LOG);\n\n    copied_code_p->status_flags = compiled_code_p->status_flags;\n\n    return start_offset;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n  JERRY_ASSERT (CBC_IS_FUNCTION (compiled_code_p->status_flags));\n\n  if (!snapshot_write_to_buffer_by_offset (snapshot_buffer_p,\n                                           snapshot_buffer_size,\n                                           &globals_p->snapshot_buffer_write_offset,\n                                           compiled_code_p,\n                                           ((size_t) compiled_code_p->size) << JMEM_ALIGNMENT_LOG))\n  {\n    globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, error_buffer_too_small_p);\n    return 0;\n  }\n\n  /* Sub-functions and regular expressions are stored recursively. */\n  uint8_t *buffer_p = (uint8_t *) copied_code_p;\n  ecma_value_t *literal_start_p;\n  uint32_t const_literal_end;\n  uint32_t literal_end;\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    literal_start_p = (ecma_value_t *) (buffer_p + sizeof (cbc_uint16_arguments_t));\n\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) buffer_p;\n    literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);\n    const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n  }\n  else\n  {\n    literal_start_p = (ecma_value_t *) (buffer_p + sizeof (cbc_uint8_arguments_t));\n\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) buffer_p;\n    literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);\n    const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n  }\n\n  for (uint32_t i = const_literal_end; i < literal_end; i++)\n  {\n    ecma_compiled_code_t *bytecode_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t,\n                                                                        literal_start_p[i]);\n\n    if (bytecode_p == compiled_code_p)\n    {\n      literal_start_p[i] = 0;\n    }\n    else\n    {\n      uint32_t offset = snapshot_add_compiled_code (bytecode_p,\n                                                    snapshot_buffer_p,\n                                                    snapshot_buffer_size,\n                                                    globals_p);\n\n      JERRY_ASSERT (!ecma_is_value_empty (globals_p->snapshot_error) || offset > start_offset);\n\n      literal_start_p[i] = offset - start_offset;\n    }\n  }\n\n  return start_offset;\n} /* snapshot_add_compiled_code */\n\n/**\n * Create unsupported literal error.\n */\nstatic void\nstatic_snapshot_error_unsupported_literal (snapshot_globals_t *globals_p, /**< snapshot globals */\n                                           ecma_value_t literal) /**< literal form the literal pool */\n{\n  lit_utf8_byte_t *str_p = (lit_utf8_byte_t *) \"Unsupported static snapshot literal: \";\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create_raw (str_p, 37);\n\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (literal));\n\n  ecma_string_t *literal_string_p = ecma_op_to_string (literal);\n  JERRY_ASSERT (literal_string_p != NULL);\n\n  ecma_stringbuilder_append (&builder, literal_string_p);\n\n  ecma_deref_ecma_string (literal_string_p);\n\n  ecma_object_t *error_object_p = ecma_new_standard_error (ECMA_ERROR_RANGE,\n                                                           ecma_stringbuilder_finalize (&builder));\n\n  globals_p->snapshot_error = ecma_create_error_object_reference (error_object_p);\n} /* static_snapshot_error_unsupported_literal */\n\n/**\n * Save static snapshot helper.\n *\n * @return start offset\n */\nstatic uint32_t\nstatic_snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled code */\n                                   uint8_t *snapshot_buffer_p, /**< snapshot buffer */\n                                   size_t snapshot_buffer_size, /**< snapshot buffer size */\n                                   snapshot_globals_t *globals_p) /**< snapshot globals */\n{\n  if (!ecma_is_value_empty (globals_p->snapshot_error))\n  {\n    return 0;\n  }\n\n  JERRY_ASSERT ((globals_p->snapshot_buffer_write_offset & (JMEM_ALIGNMENT - 1)) == 0);\n\n  if (globals_p->snapshot_buffer_write_offset >= JERRY_SNAPSHOT_MAXIMUM_WRITE_OFFSET)\n  {\n    const char * const error_message_p = \"Maximum snapshot size reached.\";\n    globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);\n    return 0;\n  }\n\n  /* The snapshot generator always parses a single file,\n   * so the base always starts right after the snapshot header. */\n  uint32_t start_offset = (uint32_t) (globals_p->snapshot_buffer_write_offset - sizeof (jerry_snapshot_header_t));\n\n  uint8_t *copied_code_start_p = snapshot_buffer_p + globals_p->snapshot_buffer_write_offset;\n  ecma_compiled_code_t *copied_code_p = (ecma_compiled_code_t *) copied_code_start_p;\n\n  if (!CBC_IS_FUNCTION (compiled_code_p->status_flags))\n  {\n    /* Regular expression literals are not supported. */\n    const char * const error_message_p = \"Regular expression literals are not supported.\";\n    globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);\n    return 0;\n  }\n\n  if (!snapshot_write_to_buffer_by_offset (snapshot_buffer_p,\n                                           snapshot_buffer_size,\n                                           &globals_p->snapshot_buffer_write_offset,\n                                           compiled_code_p,\n                                           ((size_t) compiled_code_p->size) << JMEM_ALIGNMENT_LOG))\n  {\n    const char * const error_message_p = \"Snapshot buffer too small.\";\n    globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);\n    return 0;\n  }\n\n  /* Sub-functions and regular expressions are stored recursively. */\n  uint8_t *buffer_p = (uint8_t *) copied_code_p;\n  ecma_value_t *literal_start_p;\n  uint32_t const_literal_end;\n  uint32_t literal_end;\n\n  ((ecma_compiled_code_t *) copied_code_p)->status_flags |= CBC_CODE_FLAGS_STATIC_FUNCTION;\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    literal_start_p = (ecma_value_t *) (buffer_p + sizeof (cbc_uint16_arguments_t));\n\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) buffer_p;\n    literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);\n    const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    args_p->realm_value = JMEM_CP_NULL;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n  }\n  else\n  {\n    literal_start_p = (ecma_value_t *) (buffer_p + sizeof (cbc_uint8_arguments_t));\n\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) buffer_p;\n    literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);\n    const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    args_p->realm_value = JMEM_CP_NULL;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n  }\n\n  for (uint32_t i = 0; i < const_literal_end; i++)\n  {\n    if (!ecma_is_value_direct (literal_start_p[i])\n        && !ecma_is_value_direct_string (literal_start_p[i]))\n    {\n      static_snapshot_error_unsupported_literal (globals_p, literal_start_p[i]);\n      return 0;\n    }\n  }\n\n  for (uint32_t i = const_literal_end; i < literal_end; i++)\n  {\n    ecma_compiled_code_t *bytecode_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t,\n                                                                        literal_start_p[i]);\n\n    if (bytecode_p == compiled_code_p)\n    {\n      literal_start_p[i] = 0;\n    }\n    else\n    {\n      uint32_t offset = static_snapshot_add_compiled_code (bytecode_p,\n                                                           snapshot_buffer_p,\n                                                           snapshot_buffer_size,\n                                                           globals_p);\n\n      JERRY_ASSERT (!ecma_is_value_empty (globals_p->snapshot_error) || offset > start_offset);\n\n      literal_start_p[i] = offset - start_offset;\n    }\n  }\n\n  buffer_p += ((size_t) compiled_code_p->size) << JMEM_ALIGNMENT_LOG;\n  literal_start_p = ecma_snapshot_resolve_serializable_values (compiled_code_p, buffer_p);\n\n  while (literal_start_p < (ecma_value_t *) buffer_p)\n  {\n    if (!ecma_is_value_direct_string (*literal_start_p)\n        && !ecma_is_value_empty (*literal_start_p))\n    {\n      static_snapshot_error_unsupported_literal (globals_p, *literal_start_p);\n      return 0;\n    }\n\n    literal_start_p++;\n  }\n\n  return start_offset;\n} /* static_snapshot_add_compiled_code */\n\n/**\n * Set the uint16_t offsets in the code area.\n */\nstatic void\njerry_snapshot_set_offsets (uint32_t *buffer_p, /**< buffer */\n                            uint32_t size, /**< buffer size */\n                            lit_mem_to_snapshot_id_map_entry_t *lit_map_p) /**< literal map */\n{\n  JERRY_ASSERT (size > 0);\n\n  do\n  {\n    ecma_compiled_code_t *bytecode_p = (ecma_compiled_code_t *) buffer_p;\n    uint32_t code_size = ((uint32_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG;\n\n    if (CBC_IS_FUNCTION (bytecode_p->status_flags))\n    {\n      ecma_value_t *literal_start_p;\n      uint32_t const_literal_end;\n\n      if (bytecode_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n      {\n        literal_start_p = (ecma_value_t *) (((uint8_t *) buffer_p) + sizeof (cbc_uint16_arguments_t));\n\n        cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) buffer_p;\n        const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n      }\n      else\n      {\n        literal_start_p = (ecma_value_t *) (((uint8_t *) buffer_p) + sizeof (cbc_uint8_arguments_t));\n\n        cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) buffer_p;\n        const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n      }\n\n      for (uint32_t i = 0; i < const_literal_end; i++)\n      {\n        if (ecma_is_value_string (literal_start_p[i])\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n            || ecma_is_value_bigint (literal_start_p[i])\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n            || ecma_is_value_float_number (literal_start_p[i]))\n        {\n          lit_mem_to_snapshot_id_map_entry_t *current_p = lit_map_p;\n\n          while (current_p->literal_id != literal_start_p[i])\n          {\n            current_p++;\n          }\n\n          literal_start_p[i] = current_p->literal_offset;\n        }\n      }\n\n      uint8_t *byte_p = (uint8_t *) bytecode_p + (((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG);\n      literal_start_p = ecma_snapshot_resolve_serializable_values (bytecode_p, byte_p);\n\n      while (literal_start_p < (ecma_value_t *) byte_p)\n      {\n        if (*literal_start_p != ECMA_VALUE_EMPTY)\n        {\n          JERRY_ASSERT (ecma_is_value_string (*literal_start_p));\n\n          lit_mem_to_snapshot_id_map_entry_t *current_p = lit_map_p;\n\n          while (current_p->literal_id != *literal_start_p)\n          {\n            current_p++;\n          }\n\n          *literal_start_p = current_p->literal_offset;\n        }\n\n        literal_start_p++;\n      }\n\n      /* Set reference counter to 1. */\n      bytecode_p->refs = 1;\n    }\n\n    JERRY_ASSERT ((code_size % sizeof (uint32_t)) == 0);\n    buffer_p += code_size / sizeof (uint32_t);\n    size -= code_size;\n  }\n  while (size > 0);\n} /* jerry_snapshot_set_offsets */\n\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n\n/**\n * Byte code blocks shorter than this threshold are always copied into the memory.\n * The memory / performance trade-of of byte code redirection does not worth\n * in such cases.\n */\n#define BYTECODE_NO_COPY_THRESHOLD 8\n\n/**\n * Load byte code from snapshot.\n *\n * @return byte code\n */\nstatic ecma_compiled_code_t *\nsnapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of the\n                                                          *   current primary function */\n                             const uint8_t *literal_base_p, /**< literal start */\n                             bool copy_bytecode) /**< byte code should be copied to memory */\n{\n  ecma_compiled_code_t *bytecode_p = (ecma_compiled_code_t *) base_addr_p;\n  uint32_t code_size = ((uint32_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG;\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  if (!CBC_IS_FUNCTION (bytecode_p->status_flags))\n  {\n    const uint8_t *regex_start_p = ((const uint8_t *) bytecode_p) + sizeof (ecma_compiled_code_t);\n\n    /* Real size is stored in refs. */\n    ecma_string_t *pattern_str_p = ecma_new_ecma_string_from_utf8 (regex_start_p,\n                                                                   bytecode_p->refs);\n\n    const re_compiled_code_t *re_bytecode_p = re_compile_bytecode (pattern_str_p,\n                                                                   bytecode_p->status_flags);\n    ecma_deref_ecma_string (pattern_str_p);\n\n    return (ecma_compiled_code_t *) re_bytecode_p;\n  }\n#else /* !ENABLED (JERRY_BUILTIN_REGEXP) */\n  JERRY_ASSERT (CBC_IS_FUNCTION (bytecode_p->status_flags));\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n  size_t header_size;\n  uint32_t argument_end;\n  uint32_t const_literal_end;\n  uint32_t literal_end;\n\n  if (bytecode_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    uint8_t *byte_p = (uint8_t *) bytecode_p;\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) byte_p;\n\n    argument_end = args_p->argument_end;\n    const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n    literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);\n    header_size = sizeof (cbc_uint16_arguments_t);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    ECMA_SET_INTERNAL_VALUE_POINTER (args_p->realm_value, ecma_builtin_get_global ());\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n  }\n  else\n  {\n    uint8_t *byte_p = (uint8_t *) bytecode_p;\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) byte_p;\n\n    argument_end = args_p->argument_end;\n    const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n    literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);\n    header_size = sizeof (cbc_uint8_arguments_t);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    ECMA_SET_INTERNAL_VALUE_POINTER (args_p->realm_value, ecma_builtin_get_global ());\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n  }\n\n  if (copy_bytecode\n      || (header_size + (literal_end * sizeof (uint16_t)) + BYTECODE_NO_COPY_THRESHOLD > code_size))\n  {\n    bytecode_p = (ecma_compiled_code_t *) jmem_heap_alloc_block (code_size);\n\n#if ENABLED (JERRY_MEM_STATS)\n    jmem_stats_allocate_byte_code_bytes (code_size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n    memcpy (bytecode_p, base_addr_p, code_size);\n  }\n  else\n  {\n    uint32_t start_offset = (uint32_t) (header_size + literal_end * sizeof (ecma_value_t));\n\n    uint8_t *real_bytecode_p = ((uint8_t *) bytecode_p) + start_offset;\n    uint32_t new_code_size = (uint32_t) (start_offset + 1 + sizeof (uint8_t *));\n    uint32_t extra_bytes = 0;\n\n    if (bytecode_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)\n    {\n      extra_bytes += (uint32_t) (argument_end * sizeof (ecma_value_t));\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    /* function name */\n    if (CBC_FUNCTION_GET_TYPE (bytecode_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)\n    {\n      extra_bytes += (uint32_t) sizeof (ecma_value_t);\n    }\n\n    /* tagged template literals */\n    if (bytecode_p->status_flags & CBC_CODE_FLAGS_HAS_TAGGED_LITERALS)\n    {\n      extra_bytes += (uint32_t) sizeof (ecma_value_t);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_RESOURCE_NAME)\n    /* resource name */\n    extra_bytes += (uint32_t) sizeof (ecma_value_t);\n#endif /* ENABLED (JERRY_RESOURCE_NAME) */\n\n    new_code_size = JERRY_ALIGNUP (new_code_size + extra_bytes, JMEM_ALIGNMENT);\n\n    bytecode_p = (ecma_compiled_code_t *) jmem_heap_alloc_block (new_code_size);\n\n#if ENABLED (JERRY_MEM_STATS)\n    jmem_stats_allocate_byte_code_bytes (new_code_size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n    memcpy (bytecode_p, base_addr_p, start_offset);\n\n    bytecode_p->size = (uint16_t) (new_code_size >> JMEM_ALIGNMENT_LOG);\n\n    uint8_t *byte_p = (uint8_t *) bytecode_p;\n\n    uint8_t *new_base_p = byte_p + new_code_size - extra_bytes;\n    const uint8_t *base_p = base_addr_p + code_size - extra_bytes;\n\n    if (extra_bytes != 0)\n    {\n      memcpy (new_base_p, base_p, extra_bytes);\n    }\n\n    byte_p[start_offset] = CBC_SET_BYTECODE_PTR;\n    memcpy (byte_p + start_offset + 1, &real_bytecode_p, sizeof (uint8_t *));\n\n    code_size = new_code_size;\n  }\n\n  JERRY_ASSERT (bytecode_p->refs == 1);\n\n#if ENABLED (JERRY_DEBUGGER)\n  bytecode_p->status_flags = (uint16_t) (bytecode_p->status_flags | CBC_CODE_FLAGS_DEBUGGER_IGNORE);\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  ecma_value_t *literal_start_p = (ecma_value_t *) (((uint8_t *) bytecode_p) + header_size);\n\n  for (uint32_t i = 0; i < const_literal_end; i++)\n  {\n    if ((literal_start_p[i] & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_SNAPSHOT_OFFSET)\n    {\n      literal_start_p[i] = ecma_snapshot_get_literal (literal_base_p, literal_start_p[i]);\n    }\n  }\n\n  for (uint32_t i = const_literal_end; i < literal_end; i++)\n  {\n    size_t literal_offset = (size_t) literal_start_p[i];\n\n    if (literal_offset == 0)\n    {\n      /* Self reference */\n      ECMA_SET_INTERNAL_VALUE_POINTER (literal_start_p[i],\n                                       bytecode_p);\n    }\n    else\n    {\n      ecma_compiled_code_t *literal_bytecode_p;\n      literal_bytecode_p = snapshot_load_compiled_code (base_addr_p + literal_offset,\n                                                        literal_base_p,\n                                                        copy_bytecode);\n\n      ECMA_SET_INTERNAL_VALUE_POINTER (literal_start_p[i],\n                                       literal_bytecode_p);\n    }\n  }\n\n  uint8_t *byte_p = ((uint8_t *) bytecode_p) + code_size;\n  literal_start_p = ecma_snapshot_resolve_serializable_values (bytecode_p, byte_p);\n\n  while (literal_start_p < (ecma_value_t *) byte_p)\n  {\n    if ((*literal_start_p & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_SNAPSHOT_OFFSET)\n    {\n      *literal_start_p = ecma_snapshot_get_literal (literal_base_p, *literal_start_p);\n    }\n\n    literal_start_p++;\n  }\n\n  return bytecode_p;\n} /* snapshot_load_compiled_code */\n\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n\n/**\n * Generate snapshot from specified source and arguments\n *\n * @return size of snapshot (a number value), if it was generated succesfully\n *          (i.e. there are no syntax errors in source code, buffer size is sufficient,\n *           and snapshot support is enabled in current configuration through JERRY_SNAPSHOT_SAVE),\n *         error object otherwise\n */\nstatic jerry_value_t\njerry_generate_snapshot_with_args (const jerry_char_t *resource_name_p, /**< script resource name */\n                                   size_t resource_name_length, /**< script resource name length */\n                                   const jerry_char_t *source_p, /**< script source */\n                                   size_t source_size, /**< script source size */\n                                   const jerry_char_t *args_p, /**< arguments string */\n                                   size_t args_size, /**< arguments string size */\n                                   uint32_t generate_snapshot_opts, /**< jerry_generate_snapshot_opts_t option bits */\n                                   uint32_t *buffer_p, /**< buffer to save snapshot to */\n                                   size_t buffer_size) /**< the buffer's size */\n{\n  /* Currently unused arguments. */\n  JERRY_UNUSED (resource_name_p);\n  JERRY_UNUSED (resource_name_length);\n\n  ecma_value_t resource_name = ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);\n\n#if ENABLED (JERRY_RESOURCE_NAME)\n  if (resource_name_length > 0)\n  {\n    resource_name = ecma_find_or_create_literal_string (resource_name_p, (lit_utf8_size_t) resource_name_length);\n  }\n#endif /* ENABLED (JERRY_RESOURCE_NAME) */\n\n  snapshot_globals_t globals;\n  const uint32_t aligned_header_size = JERRY_ALIGNUP (sizeof (jerry_snapshot_header_t),\n                                                      JMEM_ALIGNMENT);\n\n  globals.snapshot_buffer_write_offset = aligned_header_size;\n  globals.snapshot_error = ECMA_VALUE_EMPTY;\n  globals.regex_found = false;\n  globals.class_found = false;\n\n  uint32_t status_flags = ((generate_snapshot_opts & JERRY_SNAPSHOT_SAVE_STRICT) ? ECMA_PARSE_STRICT_MODE\n                                                                                 : ECMA_PARSE_NO_OPTS);\n\n  ecma_compiled_code_t *bytecode_data_p = parser_parse_script (args_p,\n                                                               args_size,\n                                                               source_p,\n                                                               source_size,\n                                                               resource_name,\n                                                               status_flags);\n\n  if (JERRY_UNLIKELY (bytecode_data_p == NULL))\n  {\n    return ecma_create_error_reference_from_context ();\n  }\n\n  if (generate_snapshot_opts & JERRY_SNAPSHOT_SAVE_STATIC)\n  {\n    static_snapshot_add_compiled_code (bytecode_data_p, (uint8_t *) buffer_p, buffer_size, &globals);\n  }\n  else\n  {\n    snapshot_add_compiled_code (bytecode_data_p, (uint8_t *) buffer_p, buffer_size, &globals);\n  }\n\n  if (!ecma_is_value_empty (globals.snapshot_error))\n  {\n    ecma_bytecode_deref (bytecode_data_p);\n    return globals.snapshot_error;\n  }\n\n  jerry_snapshot_header_t header;\n  header.magic = JERRY_SNAPSHOT_MAGIC;\n  header.version = JERRY_SNAPSHOT_VERSION;\n  header.global_flags = snapshot_get_global_flags (globals.regex_found, globals.class_found);\n  header.lit_table_offset = (uint32_t) globals.snapshot_buffer_write_offset;\n  header.number_of_funcs = 1;\n  header.func_offsets[0] = aligned_header_size;\n\n  lit_mem_to_snapshot_id_map_entry_t *lit_map_p = NULL;\n  uint32_t literals_num = 0;\n\n  if (!(generate_snapshot_opts & JERRY_SNAPSHOT_SAVE_STATIC))\n  {\n    ecma_collection_t *lit_pool_p = ecma_new_collection ();\n\n    ecma_save_literals_add_compiled_code (bytecode_data_p, lit_pool_p);\n\n    if (!ecma_save_literals_for_snapshot (lit_pool_p,\n                                          buffer_p,\n                                          buffer_size,\n                                          &globals.snapshot_buffer_write_offset,\n                                          &lit_map_p,\n                                          &literals_num))\n    {\n      JERRY_ASSERT (lit_map_p == NULL);\n      const char * const error_message_p = \"Cannot allocate memory for literals.\";\n      ecma_bytecode_deref (bytecode_data_p);\n      return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) error_message_p);\n    }\n\n    jerry_snapshot_set_offsets (buffer_p + (aligned_header_size / sizeof (uint32_t)),\n                                (uint32_t) (header.lit_table_offset - aligned_header_size),\n                                lit_map_p);\n  }\n\n  size_t header_offset = 0;\n\n  snapshot_write_to_buffer_by_offset ((uint8_t *) buffer_p,\n                                      buffer_size,\n                                      &header_offset,\n                                      &header,\n                                      sizeof (header));\n\n  if (lit_map_p != NULL)\n  {\n    jmem_heap_free_block (lit_map_p, literals_num * sizeof (lit_mem_to_snapshot_id_map_entry_t));\n  }\n\n  ecma_bytecode_deref (bytecode_data_p);\n\n  return ecma_make_number_value ((ecma_number_t) globals.snapshot_buffer_write_offset);\n} /* jerry_generate_snapshot_with_args */\n\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n\n/**\n * Generate snapshot from specified source and arguments\n *\n * @return size of snapshot (a number value), if it was generated succesfully\n *          (i.e. there are no syntax errors in source code, buffer size is sufficient,\n *           and snapshot support is enabled in current configuration through JERRY_SNAPSHOT_SAVE),\n *         error object otherwise\n */\njerry_value_t\njerry_generate_snapshot (const jerry_char_t *resource_name_p, /**< script resource name */\n                         size_t resource_name_length, /**< script resource name length */\n                         const jerry_char_t *source_p, /**< script source */\n                         size_t source_size, /**< script source size */\n                         uint32_t generate_snapshot_opts, /**< jerry_generate_snapshot_opts_t option bits */\n                         uint32_t *buffer_p, /**< buffer to save snapshot to */\n                         size_t buffer_size) /**< the buffer's size */\n{\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n  uint32_t allowed_opts = (JERRY_SNAPSHOT_SAVE_STATIC | JERRY_SNAPSHOT_SAVE_STRICT);\n\n  if ((generate_snapshot_opts & ~(allowed_opts)) != 0)\n  {\n    const char * const error_message_p = \"Unsupported generate snapshot flags specified.\";\n    return jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);\n  }\n\n  return jerry_generate_snapshot_with_args (resource_name_p,\n                                            resource_name_length,\n                                            source_p,\n                                            source_size,\n                                            NULL,\n                                            0,\n                                            generate_snapshot_opts,\n                                            buffer_p,\n                                            buffer_size);\n#else /* !ENABLED (JERRY_SNAPSHOT_SAVE) */\n  JERRY_UNUSED (resource_name_p);\n  JERRY_UNUSED (resource_name_length);\n  JERRY_UNUSED (source_p);\n  JERRY_UNUSED (source_size);\n  JERRY_UNUSED (generate_snapshot_opts);\n  JERRY_UNUSED (buffer_p);\n  JERRY_UNUSED (buffer_size);\n\n  return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) \"Snapshot save is not supported.\");\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n} /* jerry_generate_snapshot */\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n/**\n * Execute/load snapshot from specified buffer\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return result of bytecode - if run was successful\n *         thrown error - otherwise\n */\nstatic jerry_value_t\njerry_snapshot_result (const uint32_t *snapshot_p, /**< snapshot */\n                       size_t snapshot_size, /**< size of snapshot */\n                       size_t func_index, /**< index of primary function */\n                       uint32_t exec_snapshot_opts, /**< jerry_exec_snapshot_opts_t option bits */\n                       bool as_function) /** < specify if the loaded snapshot should be returned as a function */\n{\n  JERRY_ASSERT (snapshot_p != NULL);\n\n  uint32_t allowed_opts = (JERRY_SNAPSHOT_EXEC_COPY_DATA | JERRY_SNAPSHOT_EXEC_ALLOW_STATIC);\n\n  if ((exec_snapshot_opts & ~(allowed_opts)) != 0)\n  {\n    ecma_raise_range_error (ECMA_ERR_MSG (\"Unsupported exec snapshot flags specified.\"));\n    return ecma_create_error_reference_from_context ();\n  }\n\n  const char * const invalid_version_error_p = \"Invalid snapshot version or unsupported features present\";\n  const char * const invalid_format_error_p = \"Invalid snapshot format\";\n  const uint8_t *snapshot_data_p = (uint8_t *) snapshot_p;\n\n  if (snapshot_size <= sizeof (jerry_snapshot_header_t))\n  {\n    ecma_raise_type_error (invalid_format_error_p);\n    return ecma_create_error_reference_from_context ();\n  }\n\n  const jerry_snapshot_header_t *header_p = (const jerry_snapshot_header_t *) snapshot_data_p;\n\n  if (header_p->magic != JERRY_SNAPSHOT_MAGIC\n      || header_p->version != JERRY_SNAPSHOT_VERSION\n      || !snapshot_check_global_flags (header_p->global_flags))\n  {\n    ecma_raise_type_error (invalid_version_error_p);\n    return ecma_create_error_reference_from_context ();\n  }\n\n  if (header_p->lit_table_offset > snapshot_size)\n  {\n    ecma_raise_type_error (invalid_version_error_p);\n    return ecma_create_error_reference_from_context ();\n  }\n\n  if (func_index >= header_p->number_of_funcs)\n  {\n    ecma_raise_range_error (ECMA_ERR_MSG (\"Function index is higher than maximum\"));\n    return ecma_create_error_reference_from_context ();\n  }\n\n  JERRY_ASSERT ((header_p->lit_table_offset % sizeof (uint32_t)) == 0);\n\n  uint32_t func_offset = header_p->func_offsets[func_index];\n  ecma_compiled_code_t *bytecode_p = (ecma_compiled_code_t *) (snapshot_data_p + func_offset);\n\n  if (bytecode_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION)\n  {\n    if (!(exec_snapshot_opts & JERRY_SNAPSHOT_EXEC_ALLOW_STATIC))\n    {\n      ecma_raise_common_error (ECMA_ERR_MSG (\"Static snapshots not allowed\"));\n      return ecma_create_error_reference_from_context ();\n    }\n\n    if (exec_snapshot_opts & JERRY_SNAPSHOT_EXEC_COPY_DATA)\n    {\n      ecma_raise_common_error (ECMA_ERR_MSG (\"Static snapshots cannot be copied into memory\"));\n      return ecma_create_error_reference_from_context ();\n    }\n  }\n  else\n  {\n    const uint8_t *literal_base_p = snapshot_data_p + header_p->lit_table_offset;\n\n    bytecode_p = snapshot_load_compiled_code ((const uint8_t *) bytecode_p,\n                                              literal_base_p,\n                                              (exec_snapshot_opts & JERRY_SNAPSHOT_EXEC_COPY_DATA) != 0);\n\n    if (bytecode_p == NULL)\n    {\n      return ecma_raise_type_error (invalid_format_error_p);\n    }\n  }\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (JERRY_CONTEXT (jerry_init_flags) & ECMA_INIT_SHOW_OPCODES)\n  {\n    util_print_cbc (bytecode_p);\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  ecma_value_t ret_val;\n\n  if (as_function)\n  {\n    ecma_object_t *global_object_p = ecma_builtin_get_global ();\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    JERRY_ASSERT (global_object_p == (ecma_object_t *) ecma_op_function_get_realm (bytecode_p));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n#if ENABLED (JERRY_ESNEXT)\n    if (bytecode_p->status_flags & CBC_CODE_FLAGS_LEXICAL_BLOCK_NEEDED)\n    {\n      ecma_create_global_lexical_block (global_object_p);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    ecma_object_t *lex_env_p = ecma_get_global_scope (global_object_p);\n    ecma_object_t *func_obj_p = ecma_op_create_simple_function_object (lex_env_p, bytecode_p);\n\n    if (!(bytecode_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION))\n    {\n      ecma_bytecode_deref (bytecode_p);\n    }\n    ret_val = ecma_make_object_value (func_obj_p);\n  }\n  else\n  {\n    ret_val = vm_run_global (bytecode_p);\n    if (!(bytecode_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION))\n    {\n      ecma_bytecode_deref (bytecode_p);\n    }\n  }\n\n  if (ECMA_IS_VALUE_ERROR (ret_val))\n  {\n    return ecma_create_error_reference_from_context ();\n  }\n\n  return ret_val;\n} /* jerry_snapshot_result */\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n/**\n * Execute snapshot from specified buffer\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return result of bytecode - if run was successful\n *         thrown error - otherwise\n */\njerry_value_t\njerry_exec_snapshot (const uint32_t *snapshot_p, /**< snapshot */\n                     size_t snapshot_size, /**< size of snapshot */\n                     size_t func_index, /**< index of primary function */\n                     uint32_t exec_snapshot_opts) /**< jerry_exec_snapshot_opts_t option bits */\n{\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  return jerry_snapshot_result (snapshot_p, snapshot_size, func_index, exec_snapshot_opts, false);\n#else /* !ENABLED (JERRY_SNAPSHOT_EXEC) */\n  JERRY_UNUSED (snapshot_p);\n  JERRY_UNUSED (snapshot_size);\n  JERRY_UNUSED (func_index);\n  JERRY_UNUSED (exec_snapshot_opts);\n\n  return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) \"Snapshot execution is not supported.\");\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n} /* jerry_exec_snapshot */\n\n/**\n * @}\n */\n\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n\n/**\n * Collect all literals from a snapshot file.\n */\nstatic void\nscan_snapshot_functions (const uint8_t *buffer_p, /**< snapshot buffer start */\n                         const uint8_t *buffer_end_p, /**< snapshot buffer end */\n                         ecma_collection_t *lit_pool_p, /**< list of known values */\n                         const uint8_t *literal_base_p) /**< start of literal data */\n{\n  JERRY_ASSERT (buffer_end_p > buffer_p);\n\n  do\n  {\n    const ecma_compiled_code_t *bytecode_p = (ecma_compiled_code_t *) buffer_p;\n    uint32_t code_size = ((uint32_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG;\n\n    if (CBC_IS_FUNCTION (bytecode_p->status_flags)\n        && !(bytecode_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION))\n    {\n      const ecma_value_t *literal_start_p;\n      uint32_t const_literal_end;\n\n      if (bytecode_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n      {\n        literal_start_p = (ecma_value_t *) (buffer_p + sizeof (cbc_uint16_arguments_t));\n\n        cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) buffer_p;\n        const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n      }\n      else\n      {\n        literal_start_p = (ecma_value_t *) (buffer_p + sizeof (cbc_uint8_arguments_t));\n\n        cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) buffer_p;\n        const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n      }\n\n      for (uint32_t i = 0; i < const_literal_end; i++)\n      {\n        if ((literal_start_p[i] & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_SNAPSHOT_OFFSET)\n        {\n          ecma_value_t lit_value = ecma_snapshot_get_literal (literal_base_p, literal_start_p[i]);\n          ecma_save_literals_append_value (lit_value, lit_pool_p);\n        }\n      }\n\n      uint8_t *byte_p = (uint8_t *) bytecode_p + (((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG);\n      literal_start_p = ecma_snapshot_resolve_serializable_values ((ecma_compiled_code_t *) bytecode_p, byte_p);\n\n      while (literal_start_p < (ecma_value_t *) byte_p)\n      {\n        if ((*literal_start_p & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_SNAPSHOT_OFFSET)\n        {\n          ecma_value_t lit_value = ecma_snapshot_get_literal (literal_base_p, *literal_start_p);\n          ecma_save_literals_append_value (lit_value, lit_pool_p);\n        }\n\n        literal_start_p++;\n      }\n    }\n\n    buffer_p += code_size;\n  }\n  while (buffer_p < buffer_end_p);\n} /* scan_snapshot_functions */\n\n/**\n * Update all literal offsets in a snapshot data.\n */\nstatic void\nupdate_literal_offsets (uint8_t *buffer_p, /**< [in,out] snapshot buffer start */\n                        const uint8_t *buffer_end_p, /**< snapshot buffer end */\n                        const lit_mem_to_snapshot_id_map_entry_t *lit_map_p, /**< literal map */\n                        const uint8_t *literal_base_p) /**< start of literal data */\n{\n  JERRY_ASSERT (buffer_end_p > buffer_p);\n\n  do\n  {\n    const ecma_compiled_code_t *bytecode_p = (ecma_compiled_code_t *) buffer_p;\n    uint32_t code_size = ((uint32_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG;\n\n    if (CBC_IS_FUNCTION (bytecode_p->status_flags)\n        && !(bytecode_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION))\n    {\n      ecma_value_t *literal_start_p;\n      uint32_t const_literal_end;\n\n      if (bytecode_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n      {\n        literal_start_p = (ecma_value_t *) (buffer_p + sizeof (cbc_uint16_arguments_t));\n\n        cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) buffer_p;\n        const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n      }\n      else\n      {\n        literal_start_p = (ecma_value_t *) (buffer_p + sizeof (cbc_uint8_arguments_t));\n\n        cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) buffer_p;\n        const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);\n      }\n\n      for (uint32_t i = 0; i < const_literal_end; i++)\n      {\n        if ((literal_start_p[i] & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_SNAPSHOT_OFFSET)\n        {\n          ecma_value_t lit_value = ecma_snapshot_get_literal (literal_base_p, literal_start_p[i]);\n          const lit_mem_to_snapshot_id_map_entry_t *current_p = lit_map_p;\n\n          while (current_p->literal_id != lit_value)\n          {\n            current_p++;\n          }\n\n          literal_start_p[i] = current_p->literal_offset;\n        }\n      }\n\n      uint8_t *byte_p = (uint8_t *) bytecode_p + (((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG);\n      literal_start_p = ecma_snapshot_resolve_serializable_values ((ecma_compiled_code_t *) bytecode_p, byte_p);\n\n      while (literal_start_p < (ecma_value_t *) byte_p)\n      {\n        if ((*literal_start_p & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_SNAPSHOT_OFFSET)\n        {\n          ecma_value_t lit_value = ecma_snapshot_get_literal (literal_base_p, *literal_start_p);\n          const lit_mem_to_snapshot_id_map_entry_t *current_p = lit_map_p;\n\n          while (current_p->literal_id != lit_value)\n          {\n            current_p++;\n          }\n\n          *literal_start_p = current_p->literal_offset;\n        }\n\n        literal_start_p++;\n      }\n    }\n\n    buffer_p += code_size;\n  }\n  while (buffer_p < buffer_end_p);\n} /* update_literal_offsets */\n\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n\n/**\n * Merge multiple snapshots into a single buffer\n *\n * @return length of merged snapshot file\n *         0 on error\n */\nsize_t\njerry_merge_snapshots (const uint32_t **inp_buffers_p, /**< array of (pointers to start of) input buffers */\n                       size_t *inp_buffer_sizes_p, /**< array of input buffer sizes */\n                       size_t number_of_snapshots, /**< number of snapshots */\n                       uint32_t *out_buffer_p, /**< output buffer */\n                       size_t out_buffer_size, /**< output buffer size */\n                       const char **error_p) /**< error description */\n{\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n  uint32_t number_of_funcs = 0;\n  uint32_t merged_global_flags = 0;\n  size_t functions_size = sizeof (jerry_snapshot_header_t);\n\n  if (number_of_snapshots < 2)\n  {\n    *error_p = \"at least two snapshots must be passed\";\n    return 0;\n  }\n\n  ecma_collection_t *lit_pool_p = ecma_new_collection ();\n\n  for (uint32_t i = 0; i < number_of_snapshots; i++)\n  {\n    if (inp_buffer_sizes_p[i] < sizeof (jerry_snapshot_header_t))\n    {\n      *error_p = \"invalid snapshot file\";\n      ecma_collection_destroy (lit_pool_p);\n      return 0;\n    }\n\n    const jerry_snapshot_header_t *header_p = (const jerry_snapshot_header_t *) inp_buffers_p[i];\n\n    if (header_p->magic != JERRY_SNAPSHOT_MAGIC\n        || header_p->version != JERRY_SNAPSHOT_VERSION\n        || !snapshot_check_global_flags (header_p->global_flags))\n    {\n      *error_p = \"invalid snapshot version or unsupported features present\";\n      ecma_collection_destroy (lit_pool_p);\n      return 0;\n    }\n\n    merged_global_flags |= header_p->global_flags;\n\n    uint32_t start_offset = header_p->func_offsets[0];\n    const uint8_t *data_p = (const uint8_t *) inp_buffers_p[i];\n    const uint8_t *literal_base_p = data_p + header_p->lit_table_offset;\n\n    JERRY_ASSERT (header_p->number_of_funcs > 0);\n\n    number_of_funcs += header_p->number_of_funcs;\n    functions_size += header_p->lit_table_offset - start_offset;\n\n    scan_snapshot_functions (data_p + start_offset,\n                             literal_base_p,\n                             lit_pool_p,\n                             literal_base_p);\n  }\n\n  JERRY_ASSERT (number_of_funcs > 0);\n\n  functions_size += JERRY_ALIGNUP ((number_of_funcs - 1) * sizeof (uint32_t), JMEM_ALIGNMENT);\n\n  if (functions_size >= out_buffer_size)\n  {\n    *error_p = \"output buffer is too small\";\n    ecma_collection_destroy (lit_pool_p);\n    return 0;\n  }\n\n  jerry_snapshot_header_t *header_p = (jerry_snapshot_header_t *) out_buffer_p;\n\n  header_p->magic = JERRY_SNAPSHOT_MAGIC;\n  header_p->version = JERRY_SNAPSHOT_VERSION;\n  header_p->global_flags = merged_global_flags;\n  header_p->lit_table_offset = (uint32_t) functions_size;\n  header_p->number_of_funcs = number_of_funcs;\n\n  lit_mem_to_snapshot_id_map_entry_t *lit_map_p;\n  uint32_t literals_num;\n\n  if (!ecma_save_literals_for_snapshot (lit_pool_p,\n                                        out_buffer_p,\n                                        out_buffer_size,\n                                        &functions_size,\n                                        &lit_map_p,\n                                        &literals_num))\n  {\n    *error_p = \"buffer is too small\";\n    return 0;\n  }\n\n  uint32_t *func_offset_p = header_p->func_offsets;\n  uint8_t *dst_p = ((uint8_t *) out_buffer_p) + sizeof (jerry_snapshot_header_t);\n  dst_p += JERRY_ALIGNUP ((number_of_funcs - 1) * sizeof (uint32_t), JMEM_ALIGNMENT);\n\n  for (uint32_t i = 0; i < number_of_snapshots; i++)\n  {\n    const jerry_snapshot_header_t *current_header_p = (const jerry_snapshot_header_t *) inp_buffers_p[i];\n\n    uint32_t start_offset = current_header_p->func_offsets[0];\n\n    memcpy (dst_p,\n            ((const uint8_t *) inp_buffers_p[i]) + start_offset,\n            current_header_p->lit_table_offset - start_offset);\n\n    const uint8_t *literal_base_p = ((const uint8_t *) inp_buffers_p[i]) + current_header_p->lit_table_offset;\n    update_literal_offsets (dst_p,\n                            dst_p + current_header_p->lit_table_offset - start_offset,\n                            lit_map_p,\n                            literal_base_p);\n\n    uint32_t current_offset = (uint32_t) (dst_p - (uint8_t *) out_buffer_p) - start_offset;\n\n    for (uint32_t j = 0; j < current_header_p->number_of_funcs; j++)\n    {\n      /* Updating offset without changing any flags. */\n      *func_offset_p++ = current_header_p->func_offsets[j] + current_offset;\n    }\n\n    dst_p += current_header_p->lit_table_offset - start_offset;\n  }\n\n  JERRY_ASSERT ((uint32_t) (dst_p - (uint8_t *) out_buffer_p) == header_p->lit_table_offset);\n\n  if (lit_map_p != NULL)\n  {\n    jmem_heap_free_block (lit_map_p, literals_num * sizeof (lit_mem_to_snapshot_id_map_entry_t));\n  }\n\n  *error_p = NULL;\n  return functions_size;\n#else /* !ENABLED (JERRY_SNAPSHOT_SAVE) */\n  JERRY_UNUSED (inp_buffers_p);\n  JERRY_UNUSED (inp_buffer_sizes_p);\n  JERRY_UNUSED (number_of_snapshots);\n  JERRY_UNUSED (out_buffer_p);\n  JERRY_UNUSED (out_buffer_size);\n  JERRY_UNUSED (error_p);\n\n  *error_p = \"snapshot merge not supported\";\n  return 0;\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n} /* jerry_merge_snapshots */\n\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n\n/**\n * ====================== Functions for literal saving ==========================\n */\n\n/**\n * Compare two ecma_strings by size, then lexicographically.\n *\n * @return true - if the first string is less than the second one,\n *         false - otherwise\n */\nstatic bool\njerry_save_literals_compare (ecma_string_t *literal1, /**< first literal */\n                             ecma_string_t *literal2) /**< second literal */\n{\n  const lit_utf8_size_t lit1_size = ecma_string_get_size (literal1);\n  const lit_utf8_size_t lit2_size = ecma_string_get_size (literal2);\n\n  if (lit1_size == lit2_size)\n  {\n    return ecma_compare_ecma_strings_relational (literal1, literal2);\n  }\n\n  return (lit1_size < lit2_size);\n} /* jerry_save_literals_compare */\n\n/**\n * Helper function for the heapsort algorithm.\n *\n * @return index of the maximum value\n */\nstatic lit_utf8_size_t\njerry_save_literals_heap_max (ecma_string_t *literals[], /**< array of literals */\n                              lit_utf8_size_t num_of_nodes, /**< number of nodes */\n                              lit_utf8_size_t node_idx, /**< index of parent node */\n                              lit_utf8_size_t child_idx1, /**< index of the first child */\n                              lit_utf8_size_t child_idx2) /**< index of the second child */\n{\n  lit_utf8_size_t max_idx = node_idx;\n\n  if (child_idx1 < num_of_nodes\n      && jerry_save_literals_compare (literals[max_idx], literals[child_idx1]))\n  {\n    max_idx = child_idx1;\n  }\n\n  if (child_idx2 < num_of_nodes\n      && jerry_save_literals_compare (literals[max_idx], literals[child_idx2]))\n  {\n    max_idx = child_idx2;\n  }\n\n  return max_idx;\n} /* jerry_save_literals_heap_max */\n\n/**\n * Helper function for the heapsort algorithm.\n */\nstatic void\njerry_save_literals_down_heap (ecma_string_t *literals[], /**< array of literals */\n                               lit_utf8_size_t num_of_nodes, /**< number of nodes */\n                               lit_utf8_size_t node_idx) /**< index of parent node */\n{\n  while (true)\n  {\n    lit_utf8_size_t max_idx = jerry_save_literals_heap_max (literals,\n                                                            num_of_nodes,\n                                                            node_idx,\n                                                            2 * node_idx + 1,\n                                                            2 * node_idx + 2);\n    if (max_idx == node_idx)\n    {\n      break;\n    }\n\n    ecma_string_t *tmp_str_p  = literals[node_idx];\n    literals[node_idx] = literals[max_idx];\n    literals[max_idx] = tmp_str_p;\n\n    node_idx = max_idx;\n  }\n} /* jerry_save_literals_down_heap */\n\n/**\n * Helper function for a heapsort algorithm.\n */\nstatic void\njerry_save_literals_sort (ecma_string_t *literals[], /**< array of literals */\n                          lit_utf8_size_t num_of_literals) /**< number of literals */\n{\n  if (num_of_literals < 2)\n  {\n    return;\n  }\n\n  lit_utf8_size_t lit_idx = (num_of_literals - 2) / 2;\n\n  while (lit_idx <= (num_of_literals - 2) / 2)\n  {\n    jerry_save_literals_down_heap (literals, num_of_literals, lit_idx--);\n  }\n\n  for (lit_idx = 0; lit_idx < num_of_literals; lit_idx++)\n  {\n    const lit_utf8_size_t last_idx = num_of_literals - lit_idx - 1;\n\n    ecma_string_t *tmp_str_p = literals[last_idx];\n    literals[last_idx] = literals[0];\n    literals[0] = tmp_str_p;\n\n    jerry_save_literals_down_heap (literals, last_idx, 0);\n  }\n} /* jerry_save_literals_sort */\n\n/**\n * Append characters to the specified buffer.\n *\n * @return the position of the buffer pointer after copy.\n */\nstatic uint8_t *\njerry_append_chars_to_buffer (uint8_t *buffer_p, /**< buffer */\n                              uint8_t *buffer_end_p, /**< the end of the buffer */\n                              const char *chars, /**< string */\n                              lit_utf8_size_t string_size) /**< string size */\n{\n  if (buffer_p > buffer_end_p)\n  {\n    return buffer_p;\n  }\n\n  if (string_size == 0)\n  {\n    string_size = (lit_utf8_size_t) strlen (chars);\n  }\n\n  if (buffer_p + string_size <= buffer_end_p)\n  {\n    memcpy ((char *) buffer_p, chars, string_size);\n\n    return buffer_p + string_size;\n  }\n\n  /* Move the pointer behind the buffer to prevent further writes. */\n  return buffer_end_p + 1;\n} /* jerry_append_chars_to_buffer */\n\n/**\n * Append an ecma-string to the specified buffer.\n *\n * @return the position of the buffer pointer after copy.\n */\nstatic uint8_t *\njerry_append_ecma_string_to_buffer (uint8_t *buffer_p, /**< buffer */\n                                    uint8_t *buffer_end_p, /**< the end of the buffer */\n                                    ecma_string_t *string_p) /**< ecma-string */\n{\n  ECMA_STRING_TO_UTF8_STRING (string_p, str_buffer_p, str_buffer_size);\n\n  /* Append the string to the buffer. */\n  uint8_t *new_buffer_p = jerry_append_chars_to_buffer (buffer_p,\n                                                        buffer_end_p,\n                                                        (const char *) str_buffer_p,\n                                                        str_buffer_size);\n\n  ECMA_FINALIZE_UTF8_STRING (str_buffer_p, str_buffer_size);\n\n  return new_buffer_p;\n} /* jerry_append_ecma_string_to_buffer */\n\n/**\n * Append an unsigned number to the specified buffer.\n *\n * @return the position of the buffer pointer after copy.\n */\nstatic uint8_t *\njerry_append_number_to_buffer (uint8_t *buffer_p, /**< buffer */\n                               uint8_t *buffer_end_p, /**< the end of the buffer */\n                               lit_utf8_size_t number) /**< number */\n{\n  lit_utf8_byte_t uint32_to_str_buffer[ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32];\n  lit_utf8_size_t utf8_str_size = ecma_uint32_to_utf8_string (number,\n                                                              uint32_to_str_buffer,\n                                                              ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32);\n\n  JERRY_ASSERT (utf8_str_size <= ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32);\n\n  return jerry_append_chars_to_buffer (buffer_p,\n                                       buffer_end_p,\n                                       (const char *) uint32_to_str_buffer,\n                                       utf8_str_size);\n} /* jerry_append_number_to_buffer */\n\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n\n/**\n * Get the literals from a snapshot. Copies certain string literals into the given\n * buffer in a specified format.\n *\n * Note:\n *      Only valid identifiers are saved in C format.\n *\n * @return size of the literal-list in bytes, at most equal to the buffer size,\n *         if the list of the literals isn't empty,\n *         0 - otherwise.\n */\nsize_t\njerry_get_literals_from_snapshot (const uint32_t *snapshot_p, /**< input snapshot buffer */\n                                  size_t snapshot_size, /**< size of the input snapshot buffer */\n                                  jerry_char_t *lit_buf_p, /**< [out] buffer to save literals to */\n                                  size_t lit_buf_size, /**< the buffer's size */\n                                  bool is_c_format) /**< format-flag */\n{\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n  const uint8_t *snapshot_data_p = (uint8_t *) snapshot_p;\n  const jerry_snapshot_header_t *header_p = (const jerry_snapshot_header_t *) snapshot_data_p;\n\n  if (snapshot_size <= sizeof (jerry_snapshot_header_t)\n      || header_p->magic != JERRY_SNAPSHOT_MAGIC\n      || header_p->version != JERRY_SNAPSHOT_VERSION\n      || !snapshot_check_global_flags (header_p->global_flags))\n  {\n    /* Invalid snapshot format */\n    return 0;\n  }\n\n  JERRY_ASSERT ((header_p->lit_table_offset % sizeof (uint32_t)) == 0);\n  const uint8_t *literal_base_p = snapshot_data_p + header_p->lit_table_offset;\n\n  ecma_collection_t *lit_pool_p = ecma_new_collection ();\n  scan_snapshot_functions (snapshot_data_p + header_p->func_offsets[0],\n                           literal_base_p,\n                           lit_pool_p,\n                           literal_base_p);\n\n  lit_utf8_size_t literal_count = 0;\n  ecma_value_t *buffer_p = lit_pool_p->buffer_p;\n\n  /* Count the valid and non-magic identifiers in the list. */\n  for (uint32_t i = 0; i < lit_pool_p->item_count; i++)\n  {\n    if (ecma_is_value_string (buffer_p[i]))\n    {\n      ecma_string_t *literal_p = ecma_get_string_from_value (buffer_p[i]);\n\n      if (ecma_get_string_magic (literal_p) == LIT_MAGIC_STRING__COUNT)\n      {\n        literal_count++;\n      }\n    }\n  }\n\n  if (literal_count == 0)\n  {\n    ecma_collection_destroy (lit_pool_p);\n    return 0;\n  }\n\n  jerry_char_t *const buffer_start_p = lit_buf_p;\n  jerry_char_t *const buffer_end_p = lit_buf_p + lit_buf_size;\n\n  JMEM_DEFINE_LOCAL_ARRAY (literal_array, literal_count, ecma_string_t *);\n  lit_utf8_size_t literal_idx = 0;\n\n  buffer_p = lit_pool_p->buffer_p;\n\n  /* Count the valid and non-magic identifiers in the list. */\n  for (uint32_t i = 0; i < lit_pool_p->item_count; i++)\n  {\n    if (ecma_is_value_string (buffer_p[i]))\n    {\n      ecma_string_t *literal_p = ecma_get_string_from_value (buffer_p[i]);\n\n      if (ecma_get_string_magic (literal_p) == LIT_MAGIC_STRING__COUNT)\n      {\n        literal_array[literal_idx++] = literal_p;\n      }\n    }\n  }\n\n  ecma_collection_destroy (lit_pool_p);\n\n  /* Sort the strings by size at first, then lexicographically. */\n  jerry_save_literals_sort (literal_array, literal_count);\n\n  if (is_c_format)\n  {\n    /* Save literal count. */\n    lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p,\n                                              buffer_end_p,\n                                              \"jerry_length_t literal_count = \",\n                                              0);\n\n    lit_buf_p = jerry_append_number_to_buffer (lit_buf_p, buffer_end_p, literal_count);\n\n    /* Save the array of literals. */\n    lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p,\n                                              buffer_end_p,\n                                              \";\\n\\njerry_char_t *literals[\",\n                                              0);\n\n    lit_buf_p = jerry_append_number_to_buffer (lit_buf_p, buffer_end_p, literal_count);\n    lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"] =\\n{\\n\", 0);\n\n    for (lit_utf8_size_t i = 0; i < literal_count; i++)\n    {\n      lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"  \\\"\", 0);\n      ECMA_STRING_TO_UTF8_STRING (literal_array[i], str_buffer_p, str_buffer_size);\n      for (lit_utf8_size_t j = 0; j < str_buffer_size; j++)\n      {\n        uint8_t byte = str_buffer_p[j];\n        if (byte < 32 || byte > 127)\n        {\n          lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"\\\\x\", 0);\n          ecma_char_t hex_digit = (ecma_char_t) (byte >> 4);\n          *lit_buf_p++ = (lit_utf8_byte_t) ((hex_digit > 9) ? (hex_digit + ('A' - 10)) : (hex_digit + '0'));\n          hex_digit = (lit_utf8_byte_t) (byte & 0xf);\n          *lit_buf_p++ = (lit_utf8_byte_t) ((hex_digit > 9) ? (hex_digit + ('A' - 10)) : (hex_digit + '0'));\n        }\n        else\n        {\n          if (byte == '\\\\' || byte == '\"')\n          {\n            *lit_buf_p++ = '\\\\';\n          }\n          *lit_buf_p++ = byte;\n        }\n      }\n\n      ECMA_FINALIZE_UTF8_STRING (str_buffer_p, str_buffer_size);\n      lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"\\\"\", 0);\n\n      if (i < literal_count - 1)\n      {\n        lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \",\", 0);\n      }\n\n      lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"\\n\", 0);\n    }\n\n    lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p,\n                                              buffer_end_p,\n                                              \"};\\n\\njerry_length_t literal_sizes[\",\n                                              0);\n\n    lit_buf_p = jerry_append_number_to_buffer (lit_buf_p, buffer_end_p, literal_count);\n    lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"] =\\n{\\n\", 0);\n  }\n\n  /* Save the literal sizes respectively. */\n  for (lit_utf8_size_t i = 0; i < literal_count; i++)\n  {\n    lit_utf8_size_t str_size = ecma_string_get_size (literal_array[i]);\n\n    if (is_c_format)\n    {\n      lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"  \", 0);\n    }\n\n    lit_buf_p = jerry_append_number_to_buffer (lit_buf_p, buffer_end_p, str_size);\n    lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \" \", 0);\n\n    if (is_c_format)\n    {\n      /* Show the given string as a comment. */\n      lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"/* \", 0);\n      lit_buf_p = jerry_append_ecma_string_to_buffer (lit_buf_p, buffer_end_p, literal_array[i]);\n      lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \" */\", 0);\n\n      if (i < literal_count - 1)\n      {\n        lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \",\", 0);\n      }\n    }\n    else\n    {\n      lit_buf_p = jerry_append_ecma_string_to_buffer (lit_buf_p, buffer_end_p, literal_array[i]);\n    }\n\n    lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"\\n\", 0);\n  }\n\n  if (is_c_format)\n  {\n    lit_buf_p = jerry_append_chars_to_buffer (lit_buf_p, buffer_end_p, \"};\\n\", 0);\n  }\n\n  JMEM_FINALIZE_LOCAL_ARRAY (literal_array);\n\n  return lit_buf_p <= buffer_end_p ? (size_t) (lit_buf_p - buffer_start_p) : 0;\n#else /* !ENABLED (JERRY_SNAPSHOT_SAVE) */\n  JERRY_UNUSED (snapshot_p);\n  JERRY_UNUSED (snapshot_size);\n  JERRY_UNUSED (lit_buf_p);\n  JERRY_UNUSED (lit_buf_size);\n  JERRY_UNUSED (is_c_format);\n\n  return 0;\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n} /* jerry_get_literals_from_snapshot */\n\n/**\n * Generate snapshot function from specified source and arguments\n *\n * @return size of snapshot (a number value), if it was generated succesfully\n *          (i.e. there are no syntax errors in source code, buffer size is sufficient,\n *           and snapshot support is enabled in current configuration through JERRY_SNAPSHOT_SAVE),\n *         error object otherwise\n */\njerry_value_t\njerry_generate_function_snapshot (const jerry_char_t *resource_name_p, /**< script resource name */\n                                  size_t resource_name_length, /**< script resource name length */\n                                  const jerry_char_t *source_p, /**< script source */\n                                  size_t source_size, /**< script source size */\n                                  const jerry_char_t *args_p, /**< arguments string */\n                                  size_t args_size, /**< arguments string size */\n                                  uint32_t generate_snapshot_opts, /**< jerry_generate_snapshot_opts_t option bits */\n                                  uint32_t *buffer_p, /**< buffer to save snapshot to */\n                                  size_t buffer_size) /**< the buffer's size */\n{\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n  uint32_t allowed_opts = (JERRY_SNAPSHOT_SAVE_STATIC | JERRY_SNAPSHOT_SAVE_STRICT);\n\n  if ((generate_snapshot_opts & ~(allowed_opts)) != 0)\n  {\n    const char * const error_message_p = \"Unsupported generate snapshot flags specified.\";\n    return jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);\n  }\n\n  return jerry_generate_snapshot_with_args (resource_name_p,\n                                            resource_name_length,\n                                            source_p,\n                                            source_size,\n                                            args_p,\n                                            args_size,\n                                            generate_snapshot_opts,\n                                            buffer_p,\n                                            buffer_size);\n#else /* !ENABLED (JERRY_SNAPSHOT_SAVE) */\n  JERRY_UNUSED (resource_name_p);\n  JERRY_UNUSED (resource_name_length);\n  JERRY_UNUSED (source_p);\n  JERRY_UNUSED (source_size);\n  JERRY_UNUSED (args_p);\n  JERRY_UNUSED (args_size);\n  JERRY_UNUSED (generate_snapshot_opts);\n  JERRY_UNUSED (buffer_p);\n  JERRY_UNUSED (buffer_size);\n\n  return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) \"Snapshot save is not supported.\");\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n} /* jerry_generate_function_snapshot */\n\n/**\n * Load function from specified snapshot buffer\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return result of bytecode - if run was successful\n *         thrown error - otherwise\n */\njerry_value_t\njerry_load_function_snapshot (const uint32_t *function_snapshot_p, /**< snapshot of the function(s) */\n                              const size_t function_snapshot_size, /**< size of the snapshot */\n                              size_t func_index, /**< index of the function to load */\n                              uint32_t exec_snapshot_opts) /**< jerry_exec_snapshot_opts_t option bits */\n{\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  return jerry_snapshot_result (function_snapshot_p, function_snapshot_size, func_index, exec_snapshot_opts, true);\n#else /* !ENABLED (JERRY_SNAPSHOT_EXEC) */\n  JERRY_UNUSED (function_snapshot_p);\n  JERRY_UNUSED (function_snapshot_size);\n  JERRY_UNUSED (func_index);\n  JERRY_UNUSED (exec_snapshot_opts);\n\n  return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) \"Snapshot execution is not supported.\");\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n} /* jerry_load_function_snapshot */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/api/jerry-snapshot.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRY_SNAPSHOT_H\n#define JERRY_SNAPSHOT_H\n\n#include \"ecma-globals.h\"\n\n/**\n * Snapshot header\n */\ntypedef struct\n{\n  /* The size of this structure is recommended to be divisible by\n   * uint32_t alignment. Otherwise some bytes after the header are wasted. */\n  uint32_t magic; /**< four byte magic number */\n  uint32_t version; /**< version number */\n  uint32_t global_flags; /**< global configuration and feature flags */\n  uint32_t lit_table_offset; /**< byte offset of the literal table */\n  uint32_t number_of_funcs; /**< number of primary ECMAScript functions */\n  uint32_t func_offsets[1]; /**< function offsets (lowest bit: global(0) or eval(1) context) */\n} jerry_snapshot_header_t;\n\n/**\n * Jerry snapshot magic marker.\n */\n#define JERRY_SNAPSHOT_MAGIC (0x5952524Au)\n\n/**\n * Snapshot configuration flags.\n */\ntypedef enum\n{\n  /* 8 bits are reserved for dynamic features */\n  JERRY_SNAPSHOT_HAS_REGEX_LITERAL = (1u << 0), /**< byte code has regex literal */\n  JERRY_SNAPSHOT_HAS_REALM_VALUE = (1u << 1), /**< byte code has realm value */\n  JERRY_SNAPSHOT_HAS_CLASS_LITERAL = (1u << 2), /**< byte code has class literal */\n  /* 24 bits are reserved for compile time features */\n  JERRY_SNAPSHOT_FOUR_BYTE_CPOINTER = (1u << 8) /**< deprecated, an unused placeholder now */\n} jerry_snapshot_global_flags_t;\n\n#endif /* !JERRY_SNAPSHOT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/api/jerry.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include \"debugger.h\"\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-arraybuffer-object.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-comparison.h\"\n#include \"ecma-container-object.h\"\n#include \"ecma-dataview-object.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-eval.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-init-finalize.h\"\n#include \"ecma-lex-env.h\"\n#include \"lit-char-helpers.h\"\n#include \"ecma-literal-storage.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-regexp-object.h\"\n#include \"ecma-promise-object.h\"\n#include \"ecma-proxy-object.h\"\n#include \"ecma-symbol-object.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"opcodes.h\"\n#include \"jcontext.h\"\n#include \"jerryscript.h\"\n#include \"jerryscript-debugger-transport.h\"\n#include \"jmem.h\"\n#include \"js-parser.h\"\n#include \"re-compiler.h\"\n\nJERRY_STATIC_ASSERT (sizeof (jerry_value_t) == sizeof (ecma_value_t),\n                     size_of_jerry_value_t_must_be_equal_to_size_of_ecma_value_t);\n\nJERRY_STATIC_ASSERT ((int) ECMA_ERROR_NONE == (int) JERRY_ERROR_NONE\n                     && (int) ECMA_ERROR_COMMON == (int) JERRY_ERROR_COMMON\n                     && (int) ECMA_ERROR_EVAL == (int) JERRY_ERROR_EVAL\n                     && (int) ECMA_ERROR_RANGE == (int) JERRY_ERROR_RANGE\n                     && (int) ECMA_ERROR_REFERENCE == (int) JERRY_ERROR_REFERENCE\n                     && (int) ECMA_ERROR_SYNTAX == (int) JERRY_ERROR_SYNTAX\n                     && (int) ECMA_ERROR_TYPE == (int) JERRY_ERROR_TYPE\n                     && (int) ECMA_ERROR_URI == (int) JERRY_ERROR_URI,\n                     ecma_standard_error_t_must_be_equal_to_jerry_error_t);\n\nJERRY_STATIC_ASSERT ((int) ECMA_INIT_EMPTY == (int) JERRY_INIT_EMPTY\n                     && (int) ECMA_INIT_SHOW_OPCODES == (int) JERRY_INIT_SHOW_OPCODES\n                     && (int) ECMA_INIT_SHOW_REGEXP_OPCODES == (int) JERRY_INIT_SHOW_REGEXP_OPCODES\n                     && (int) ECMA_INIT_MEM_STATS == (int) JERRY_INIT_MEM_STATS,\n                     ecma_init_flag_t_must_be_equal_to_jerry_init_flag_t);\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\nJERRY_STATIC_ASSERT ((int) RE_FLAG_GLOBAL == (int) JERRY_REGEXP_FLAG_GLOBAL\n                     && (int) RE_FLAG_MULTILINE == (int) JERRY_REGEXP_FLAG_MULTILINE\n                     && (int) RE_FLAG_IGNORE_CASE == (int) JERRY_REGEXP_FLAG_IGNORE_CASE\n                     && (int) RE_FLAG_STICKY== (int) JERRY_REGEXP_FLAG_STICKY\n                     && (int) RE_FLAG_UNICODE == (int) JERRY_REGEXP_FLAG_UNICODE\n                     && (int) RE_FLAG_DOTALL == (int) JERRY_REGEXP_FLAG_DOTALL,\n                     re_flags_t_must_be_equal_to_jerry_regexp_flags_t);\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n/* The internal ECMA_PROMISE_STATE_* values are \"one byte away\" from the API values */\nJERRY_STATIC_ASSERT ((int) ECMA_PROMISE_IS_PENDING == (int) JERRY_PROMISE_STATE_PENDING\n                     && (int) ECMA_PROMISE_IS_FULFILLED == (int) JERRY_PROMISE_STATE_FULFILLED,\n                     promise_internal_state_matches_external);\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n\n/**\n * Offset between internal and external arithmetic operator types\n */\n#define ECMA_NUMBER_ARITHMETIC_OP_API_OFFSET (JERRY_BIN_OP_SUB - NUMBER_ARITHMETIC_SUBTRACTION)\n\nJERRY_STATIC_ASSERT (((NUMBER_ARITHMETIC_SUBTRACTION + ECMA_NUMBER_ARITHMETIC_OP_API_OFFSET) == JERRY_BIN_OP_SUB)\n                     && ((NUMBER_ARITHMETIC_MULTIPLICATION + ECMA_NUMBER_ARITHMETIC_OP_API_OFFSET) == JERRY_BIN_OP_MUL)\n                     && ((NUMBER_ARITHMETIC_DIVISION + ECMA_NUMBER_ARITHMETIC_OP_API_OFFSET) == JERRY_BIN_OP_DIV)\n                     && ((NUMBER_ARITHMETIC_REMAINDER + ECMA_NUMBER_ARITHMETIC_OP_API_OFFSET) == JERRY_BIN_OP_REM),\n                     number_arithmetics_operation_type_matches_external);\n\n#if !ENABLED (JERRY_PARSER) && !ENABLED (JERRY_SNAPSHOT_EXEC)\n#error \"JERRY_SNAPSHOT_EXEC must be enabled if JERRY_PARSER is disabled!\"\n#endif /* !ENABLED (JERRY_PARSER) && !ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n#if ENABLED (JERRY_ERROR_MESSAGES)\n\n/**\n * Error message, if an argument is has an error flag\n */\nstatic const char * const error_value_msg_p = \"argument cannot have an error flag\";\n\n/**\n * Error message, if types of arguments are incorrect\n */\nstatic const char * const wrong_args_msg_p = \"wrong type of argument\";\n\n#if !ENABLED (JERRY_BUILTIN_BIGINT)\n\n/**\n * Error message, if BigInt support is disabled\n */\nstatic const char * const error_bigint_not_supported_p = \"BigInt support is disabled\";\n\n#endif /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n\n/** \\addtogroup jerry Jerry engine interface\n * @{\n */\n\n/**\n * Assert that it is correct to call API in current state.\n *\n * Note:\n *         By convention, there are some states when API could not be invoked.\n *\n *         The API can be and only be invoked when the ECMA_STATUS_API_AVAILABLE\n *         flag is set.\n *\n *         This procedure checks whether the API is available, and terminates\n *         the engine if it is unavailable. Otherwise it is a no-op.\n *\n * Note:\n *         The API could not be invoked in the following cases:\n *           - before jerry_init and after jerry_cleanup\n *           - between enter to and return from a native free callback\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\njerry_assert_api_available (void)\n{\n  JERRY_ASSERT (JERRY_CONTEXT (status_flags) & ECMA_STATUS_API_AVAILABLE);\n} /* jerry_assert_api_available */\n\n/**\n * Turn on API availability\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\njerry_make_api_available (void)\n{\n  JERRY_CONTEXT (status_flags) |= ECMA_STATUS_API_AVAILABLE;\n} /* jerry_make_api_available */\n\n/**\n * Turn off API availability\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\njerry_make_api_unavailable (void)\n{\n  JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_API_AVAILABLE;\n} /* jerry_make_api_unavailable */\n\n/**\n * Create an API compatible return value.\n *\n * @return return value for Jerry API functions\n */\nstatic jerry_value_t\njerry_return (jerry_value_t value) /**< return value */\n{\n  if (ECMA_IS_VALUE_ERROR (value))\n  {\n    value = ecma_create_error_reference_from_context ();\n  }\n\n  return value;\n} /* jerry_return */\n\n/**\n * Throw an API compatible return value.\n *\n * @return return value for Jerry API functions\n */\nstatic inline jerry_value_t JERRY_ATTR_ALWAYS_INLINE\njerry_throw (jerry_value_t value) /**< return value */\n{\n  JERRY_ASSERT (ECMA_IS_VALUE_ERROR (value));\n  return ecma_create_error_reference_from_context ();\n} /* jerry_throw */\n\n/**\n * Jerry engine initialization\n */\nvoid\njerry_init (jerry_init_flag_t flags) /**< combination of Jerry flags */\n{\n  /* This function cannot be called twice unless jerry_cleanup is called. */\n  JERRY_ASSERT (!(JERRY_CONTEXT (status_flags) & ECMA_STATUS_API_AVAILABLE));\n\n  /* Zero out all non-external members. */\n  memset ((char *) &JERRY_CONTEXT_STRUCT + offsetof (jerry_context_t, JERRY_CONTEXT_FIRST_MEMBER), 0,\n          sizeof (jerry_context_t) - offsetof (jerry_context_t, JERRY_CONTEXT_FIRST_MEMBER));\n\n  JERRY_CONTEXT (jerry_init_flags) = flags;\n\n  jerry_make_api_available ();\n\n  jmem_init ();\n  ecma_init ();\n} /* jerry_init */\n\n/**\n * Terminate Jerry engine\n */\nvoid\njerry_cleanup (void)\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_type (JERRY_DEBUGGER_CLOSE_CONNECTION);\n\n    jerry_debugger_transport_close ();\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  for (jerry_context_data_header_t *this_p = JERRY_CONTEXT (context_data_p);\n       this_p != NULL;\n       this_p = this_p->next_p)\n  {\n    if (this_p->manager_p->deinit_cb)\n    {\n      void *data = (this_p->manager_p->bytes_needed > 0) ? JERRY_CONTEXT_DATA_HEADER_USER_DATA (this_p) : NULL;\n      this_p->manager_p->deinit_cb (data);\n    }\n  }\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n  ecma_free_all_enqueued_jobs ();\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n  ecma_finalize ();\n  jerry_make_api_unavailable ();\n\n  for (jerry_context_data_header_t *this_p = JERRY_CONTEXT (context_data_p), *next_p = NULL;\n       this_p != NULL;\n       this_p = next_p)\n  {\n    next_p = this_p->next_p;\n    if (this_p->manager_p->finalize_cb)\n    {\n      void *data = (this_p->manager_p->bytes_needed > 0) ? JERRY_CONTEXT_DATA_HEADER_USER_DATA (this_p) : NULL;\n      this_p->manager_p->finalize_cb (data);\n    }\n    jmem_heap_free_block (this_p, sizeof (jerry_context_data_header_t) + this_p->manager_p->bytes_needed);\n  }\n\n  jmem_finalize ();\n} /* jerry_cleanup */\n\n/**\n * Retrieve a context data item, or create a new one.\n *\n * @param manager_p pointer to the manager whose context data item should be returned.\n *\n * @return a pointer to the user-provided context-specific data item for the given manager, creating such a pointer if\n * none was found.\n */\nvoid *\njerry_get_context_data (const jerry_context_data_manager_t *manager_p)\n{\n  void *ret = NULL;\n  jerry_context_data_header_t *item_p;\n\n  for (item_p = JERRY_CONTEXT (context_data_p); item_p != NULL; item_p = item_p->next_p)\n  {\n    if (item_p->manager_p == manager_p)\n    {\n      return (manager_p->bytes_needed > 0) ? JERRY_CONTEXT_DATA_HEADER_USER_DATA (item_p) : NULL;\n    }\n  }\n\n  item_p = jmem_heap_alloc_block (sizeof (jerry_context_data_header_t) + manager_p->bytes_needed);\n  item_p->manager_p = manager_p;\n  item_p->next_p = JERRY_CONTEXT (context_data_p);\n  JERRY_CONTEXT (context_data_p) = item_p;\n\n  if (manager_p->bytes_needed > 0)\n  {\n    ret = JERRY_CONTEXT_DATA_HEADER_USER_DATA (item_p);\n    memset (ret, 0, manager_p->bytes_needed);\n  }\n\n  if (manager_p->init_cb)\n  {\n    manager_p->init_cb (ret);\n  }\n\n  return ret;\n} /* jerry_get_context_data */\n\n/**\n * Register external magic string array\n */\nvoid\njerry_register_magic_strings (const jerry_char_t * const *ex_str_items_p, /**< character arrays, representing\n                                                                           *   external magic strings' contents */\n                              uint32_t count, /**< number of the strings */\n                              const jerry_length_t *str_lengths_p) /**< lengths of all strings */\n{\n  jerry_assert_api_available ();\n\n  lit_magic_strings_ex_set ((const lit_utf8_byte_t * const *) ex_str_items_p,\n                            count,\n                            (const lit_utf8_size_t *) str_lengths_p);\n} /* jerry_register_magic_strings */\n\n/**\n * Run garbage collection\n */\nvoid\njerry_gc (jerry_gc_mode_t mode) /**< operational mode */\n{\n  jerry_assert_api_available ();\n\n  if (mode == JERRY_GC_PRESSURE_LOW)\n  {\n    /* Call GC directly, because 'ecma_free_unused_memory' might decide it's not yet worth it. */\n    ecma_gc_run ();\n    return;\n  }\n\n  ecma_free_unused_memory (JMEM_PRESSURE_HIGH);\n} /* jerry_gc */\n\n/**\n * Get heap memory stats.\n *\n * @return true - get the heap stats successful\n *         false - otherwise. Usually it is because the MEM_STATS feature is not enabled.\n */\nbool\njerry_get_memory_stats (jerry_heap_stats_t *out_stats_p) /**< [out] heap memory stats */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  if (out_stats_p == NULL)\n  {\n    return false;\n  }\n\n  jmem_heap_stats_t jmem_heap_stats;\n  memset (&jmem_heap_stats, 0, sizeof (jmem_heap_stats));\n  jmem_heap_get_stats (&jmem_heap_stats);\n\n  *out_stats_p = (jerry_heap_stats_t)\n  {\n    .version = 1,\n    .size = jmem_heap_stats.size,\n    .allocated_bytes = jmem_heap_stats.allocated_bytes,\n    .peak_allocated_bytes = jmem_heap_stats.peak_allocated_bytes\n  };\n\n  return true;\n#else /* !ENABLED (JERRY_MEM_STATS) */\n  JERRY_UNUSED (out_stats_p);\n  return false;\n#endif /* ENABLED (JERRY_MEM_STATS) */\n} /* jerry_get_memory_stats */\n\n/**\n * Simple Jerry runner\n *\n * @return true  - if run was successful\n *         false - otherwise\n */\nbool\njerry_run_simple (const jerry_char_t *script_source_p, /**< script source */\n                  size_t script_source_size, /**< script source size */\n                  jerry_init_flag_t flags) /**< combination of Jerry flags */\n{\n  bool result = false;\n\n  jerry_init (flags);\n\n  jerry_value_t parse_ret_val = jerry_parse (NULL, 0, script_source_p, script_source_size, JERRY_PARSE_NO_OPTS);\n\n  if (!ecma_is_value_error_reference (parse_ret_val))\n  {\n    jerry_value_t run_ret_val = jerry_run (parse_ret_val);\n\n    if (!ecma_is_value_error_reference (run_ret_val))\n    {\n      result = true;\n    }\n\n    jerry_release_value (run_ret_val);\n  }\n\n  jerry_release_value (parse_ret_val);\n  jerry_cleanup ();\n\n  return result;\n} /* jerry_run_simple */\n\n/**\n * Parse script and construct an EcmaScript function. The lexical\n * environment is set to the global lexical environment.\n *\n * @return function object value - if script was parsed successfully,\n *         thrown error - otherwise\n */\njerry_value_t\njerry_parse (const jerry_char_t *resource_name_p, /**< resource name (usually a file name) */\n             size_t resource_name_length, /**< length of resource name */\n             const jerry_char_t *source_p, /**< script source */\n             size_t source_size, /**< script source size */\n             uint32_t parse_opts) /**< jerry_parse_opts_t option bits */\n{\n#if ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER)\n  if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      && resource_name_length > 0)\n  {\n    jerry_debugger_send_string (JERRY_DEBUGGER_SOURCE_CODE_NAME,\n                                JERRY_DEBUGGER_NO_SUBTYPE,\n                                resource_name_p,\n                                resource_name_length);\n  }\n#else /* !(ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER)) */\n  JERRY_UNUSED (resource_name_p);\n  JERRY_UNUSED (resource_name_length);\n#endif /* ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER) */\n\n#if ENABLED (JERRY_PARSER)\n  jerry_assert_api_available ();\n\n  ecma_value_t resource_name = ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);\n\n#if ENABLED (JERRY_RESOURCE_NAME)\n  if (resource_name_length > 0)\n  {\n    resource_name = ecma_find_or_create_literal_string (resource_name_p, (lit_utf8_size_t) resource_name_length);\n  }\n#endif /* ENABLED (JERRY_RESOURCE_NAME) */\n\n  if ((parse_opts & JERRY_PARSE_MODULE) != 0)\n  {\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    ecma_module_initialize_context (ecma_get_string_from_value (resource_name));\n#else /* !ENABLED (JERRY_MODULE_SYSTEM) */\n    return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (\"Module system has been disabled.\")));\n#endif /* !ENABLED (JERRY_MODULE_SYSTEM) */\n  }\n\n  ecma_compiled_code_t *bytecode_data_p = parser_parse_script (NULL,\n                                                               0,\n                                                               source_p,\n                                                               source_size,\n                                                               resource_name,\n                                                               parse_opts);\n\n  if (JERRY_UNLIKELY (bytecode_data_p == NULL))\n  {\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    if ((parse_opts & JERRY_PARSE_MODULE) != 0)\n    {\n      ecma_module_cleanup_context ();\n    }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n    return ecma_create_error_reference_from_context ();\n  }\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  if ((parse_opts & JERRY_PARSE_MODULE) != 0)\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_module_parse_referenced_modules ()))\n    {\n      ecma_bytecode_deref (bytecode_data_p);\n      ecma_module_cleanup_context ();\n\n      return ecma_create_error_reference_from_context ();\n    }\n\n    ecma_object_t *obj_p = ecma_create_object (NULL, sizeof (ecma_extended_object_t), ECMA_OBJECT_TYPE_CLASS);\n\n    ecma_extended_object_t *wrapper_p = (ecma_extended_object_t *) obj_p;\n    wrapper_p->u.class_prop.class_id = LIT_MAGIC_STRING_RUNNABLE_UL;\n    wrapper_p->u.class_prop.extra_info = ECMA_RUNNABLE_FLAGS_MODULE;\n\n    ecma_module_t *root_module_p = JERRY_CONTEXT (module_current_p);\n    root_module_p->compiled_code_p = bytecode_data_p;\n\n    ECMA_SET_INTERNAL_VALUE_POINTER (wrapper_p->u.class_prop.u.value, root_module_p);\n    JERRY_CONTEXT (module_current_p) = NULL;\n    JERRY_CONTEXT (module_list_p) = NULL;\n\n    return ecma_make_object_value (obj_p);\n  }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n  ecma_object_t *global_object_p = ecma_builtin_get_global ();\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  JERRY_ASSERT (global_object_p == (ecma_object_t *) ecma_op_function_get_realm (bytecode_data_p));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  ecma_object_t *lex_env_p = ecma_get_global_environment (global_object_p);\n\n  /* TODO(dbatyai): For now Scripts continue to return Function objects due to backwards compatibility. This should be\n   * changed to also return a Runnable object eventually. */\n  ecma_object_t *func_obj_p = ecma_op_create_simple_function_object (lex_env_p, bytecode_data_p);\n  ecma_bytecode_deref (bytecode_data_p);\n\n  return ecma_make_object_value (func_obj_p);\n#else /* !ENABLED (JERRY_PARSER) */\n  JERRY_UNUSED (source_p);\n  JERRY_UNUSED (source_size);\n  JERRY_UNUSED (parse_opts);\n\n  return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (\"The parser has been disabled.\")));\n#endif /* ENABLED (JERRY_PARSER) */\n} /* jerry_parse */\n\n/**\n * Parse function and construct an EcmaScript function. The lexical\n * environment is set to the global lexical environment.\n *\n * @return function object value - if script was parsed successfully,\n *         thrown error - otherwise\n */\njerry_value_t\njerry_parse_function (const jerry_char_t *resource_name_p, /**< resource name (usually a file name) */\n                      size_t resource_name_length, /**< length of resource name */\n                      const jerry_char_t *arg_list_p, /**< script source */\n                      size_t arg_list_size, /**< script source size */\n                      const jerry_char_t *source_p, /**< script source */\n                      size_t source_size, /**< script source size */\n                      uint32_t parse_opts) /**< jerry_parse_opts_t option bits */\n{\n#if ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_string (JERRY_DEBUGGER_SOURCE_CODE_NAME,\n                                JERRY_DEBUGGER_NO_SUBTYPE,\n                                resource_name_p,\n                                resource_name_length);\n  }\n#else /* !(ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER)) */\n  JERRY_UNUSED (resource_name_p);\n  JERRY_UNUSED (resource_name_length);\n#endif /* ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER) */\n\n#if ENABLED (JERRY_PARSER)\n  jerry_assert_api_available ();\n\n  ecma_value_t resource_name = ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);\n\n#if ENABLED (JERRY_RESOURCE_NAME)\n  if (resource_name_length > 0)\n  {\n    resource_name = ecma_find_or_create_literal_string (resource_name_p, (lit_utf8_size_t) resource_name_length);\n  }\n#endif /* ENABLED (JERRY_RESOURCE_NAME) */\n\n  if (arg_list_p == NULL)\n  {\n    /* Must not be a NULL value. */\n    arg_list_p = (const jerry_char_t *) \"\";\n  }\n\n  ecma_compiled_code_t *bytecode_p = parser_parse_script (arg_list_p,\n                                                          arg_list_size,\n                                                          source_p,\n                                                          source_size,\n                                                          resource_name,\n                                                          parse_opts);\n\n  if (JERRY_UNLIKELY (bytecode_p == NULL))\n  {\n    return ecma_create_error_reference_from_context ();\n  }\n\n  ecma_object_t *global_object_p = ecma_builtin_get_global ();\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  JERRY_ASSERT (global_object_p == (ecma_object_t *) ecma_op_function_get_realm (bytecode_p));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  ecma_object_t *lex_env_p = ecma_get_global_environment (global_object_p);\n  ecma_object_t *func_obj_p = ecma_op_create_simple_function_object (lex_env_p, bytecode_p);\n  ecma_bytecode_deref (bytecode_p);\n\n  return ecma_make_object_value (func_obj_p);\n#else /* !ENABLED (JERRY_PARSER) */\n  JERRY_UNUSED (arg_list_p);\n  JERRY_UNUSED (arg_list_size);\n  JERRY_UNUSED (source_p);\n  JERRY_UNUSED (source_size);\n  JERRY_UNUSED (parse_opts);\n\n  return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (\"The parser has been disabled.\")));\n#endif /* ENABLED (JERRY_PARSER) */\n} /* jerry_parse_function */\n\n/**\n * Run an EcmaScript function created by jerry_parse.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return result of bytecode - if run was successful\n *         thrown error - otherwise\n */\njerry_value_t\njerry_run (const jerry_value_t func_val) /**< function to run */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (func_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (func_val);\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  if (ecma_object_class_is (obj_p, LIT_MAGIC_STRING_RUNNABLE_UL))\n  {\n    ecma_extended_object_t *wrapper_p = (ecma_extended_object_t *) obj_p;\n    JERRY_ASSERT (wrapper_p->u.class_prop.extra_info == ECMA_RUNNABLE_FLAGS_MODULE);\n    ecma_module_t *root_module_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_module_t, wrapper_p->u.class_prop.u.value);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    ecma_object_t *global_object_p = (ecma_object_t *) ecma_op_function_get_realm (root_module_p->compiled_code_p);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n    ecma_object_t *global_object_p = ecma_builtin_get_global ();\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n    ecma_create_global_lexical_block (global_object_p);\n    root_module_p->scope_p = ecma_get_global_scope (global_object_p);\n\n    return jerry_return (vm_run_module (root_module_p));\n  }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n  if (ecma_get_object_type (obj_p) != ECMA_OBJECT_TYPE_FUNCTION\n      || ecma_get_object_is_builtin (obj_p))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) obj_p;\n\n  const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);\n\n  if (CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags) != CBC_FUNCTION_SCRIPT)\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  return jerry_return (vm_run_global (ecma_op_function_get_compiled_code (ext_func_p)));\n} /* jerry_run */\n\n/**\n * Perform eval\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return result of eval, may be error value.\n */\njerry_value_t\njerry_eval (const jerry_char_t *source_p, /**< source code */\n            size_t source_size, /**< length of source code */\n            uint32_t parse_opts) /**< jerry_parse_opts_t option bits */\n{\n  jerry_assert_api_available ();\n\n  return jerry_return (ecma_op_eval_chars_buffer ((const lit_utf8_byte_t *) source_p,\n                                                  source_size,\n                                                  parse_opts));\n} /* jerry_eval */\n\n/**\n * Run enqueued Promise jobs until the first thrown error or until all get executed.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return result of last executed job, may be error value.\n */\njerry_value_t\njerry_run_all_enqueued_jobs (void)\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n  return ecma_process_all_enqueued_jobs ();\n#else /* !ENABLED (JERRY_BUILTIN_PROMISE) */\n  return ECMA_VALUE_UNDEFINED;\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n} /* jerry_run_all_enqueued_jobs */\n\n/**\n * Get global object\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return api value of global object\n */\njerry_value_t\njerry_get_global_object (void)\n{\n  jerry_assert_api_available ();\n  ecma_object_t *global_obj_p = ecma_builtin_get_global ();\n  ecma_ref_object (global_obj_p);\n  return ecma_make_object_value (global_obj_p);\n} /* jerry_get_global_object */\n\n/**\n * Check if the specified value is an abort value.\n *\n * @return true  - if both the error and abort values are set,\n *         false - otherwise\n */\nbool\njerry_value_is_abort (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_error_reference (value))\n  {\n    return false;\n  }\n\n  ecma_extended_primitive_t *error_ref_p = ecma_get_extended_primitive_from_value (value);\n\n  return ECMA_EXTENDED_PRIMITIVE_GET_TYPE (error_ref_p) == ECMA_EXTENDED_PRIMITIVE_ABORT;\n} /* jerry_value_is_abort */\n\n/**\n * Check if the specified value is an array object value.\n *\n * @return true  - if the specified value is an array object,\n *         false - otherwise\n */\nbool\njerry_value_is_array (const jerry_value_t value) /**< jerry api value */\n{\n  jerry_assert_api_available ();\n\n  return (ecma_is_value_object (value)\n          && ecma_get_object_type (ecma_get_object_from_value (value)) == ECMA_OBJECT_TYPE_ARRAY);\n} /* jerry_value_is_array */\n\n/**\n * Check if the specified value is boolean.\n *\n * @return true  - if the specified value is boolean,\n *         false - otherwise\n */\nbool\njerry_value_is_boolean (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_is_value_boolean (value);\n} /* jerry_value_is_boolean */\n\n/**\n * Check if the specified value is a constructor function object value.\n *\n * @return true - if the specified value is a function value that implements [[Construct]],\n *         false - otherwise\n */\nbool\njerry_value_is_constructor (const jerry_value_t value) /**< jerry api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_is_constructor (value);\n} /* jerry_value_is_constructor */\n\n/**\n * Check if the specified value is an error or abort value.\n *\n * @return true  - if the specified value is an error value,\n *         false - otherwise\n */\nbool\njerry_value_is_error (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_is_value_error_reference (value);\n} /* jerry_value_is_error */\n\n/**\n * Check if the specified value is a function object value.\n *\n * @return true - if the specified value is callable,\n *         false - otherwise\n */\nbool\njerry_value_is_function (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_op_is_callable (value);\n} /* jerry_value_is_function */\n\n/**\n * Check if the specified value is an async function object value.\n *\n * @return true - if the specified value is an async function,\n *         false - otherwise\n */\nbool\njerry_value_is_async_function (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_ESNEXT)\n  if (ecma_is_value_object (value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (value);\n\n    if (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION\n        && !ecma_get_object_is_builtin (obj_p))\n    {\n      const ecma_compiled_code_t *bytecode_data_p;\n      bytecode_data_p = ecma_op_function_get_compiled_code ((ecma_extended_object_t *) obj_p);\n      uint16_t type = CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags);\n\n      return (type == CBC_FUNCTION_ASYNC\n              || type == CBC_FUNCTION_ASYNC_ARROW\n              || type == CBC_FUNCTION_ASYNC_GENERATOR);\n    }\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (value);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return false;\n} /* jerry_value_is_async_function */\n\n/**\n * Check if the specified value is number.\n *\n * @return true  - if the specified value is number,\n *         false - otherwise\n */\nbool\njerry_value_is_number (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_is_value_number (value);\n} /* jerry_value_is_number */\n\n/**\n * Check if the specified value is null.\n *\n * @return true  - if the specified value is null,\n *         false - otherwise\n */\nbool\njerry_value_is_null (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_is_value_null (value);\n} /* jerry_value_is_null */\n\n/**\n * Check if the specified value is object.\n *\n * @return true  - if the specified value is object,\n *         false - otherwise\n */\nbool\njerry_value_is_object (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_is_value_object (value);\n} /* jerry_value_is_object */\n\n/**\n * Check if the specified value is promise.\n *\n * @return true  - if the specified value is promise,\n *         false - otherwise\n */\nbool\njerry_value_is_promise (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n  return (ecma_is_value_object (value)\n          && ecma_is_promise (ecma_get_object_from_value (value)));\n#else /* !ENABLED (JERRY_BUILTIN_PROMISE) */\n  JERRY_UNUSED (value);\n  return false;\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n} /* jerry_value_is_promise */\n\n/**\n * Check if the specified value is a proxy object.\n *\n * @return true  - if the specified value is a proxy object,\n *         false - otherwise\n */\nbool\njerry_value_is_proxy (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  return (ecma_is_value_object (value)\n          && ECMA_OBJECT_IS_PROXY (ecma_get_object_from_value (value)));\n#else /* !ENABLED (JERRY_BUILTIN_PROXY) */\n  JERRY_UNUSED (value);\n  return false;\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n} /* jerry_value_is_proxy */\n\n/**\n * Check if the specified value is string.\n *\n * @return true  - if the specified value is string,\n *         false - otherwise\n */\nbool\njerry_value_is_string (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_is_value_string (value);\n} /* jerry_value_is_string */\n\n/**\n * Check if the specified value is symbol.\n *\n * @return true  - if the specified value is symbol,\n *         false - otherwise\n */\nbool\njerry_value_is_symbol (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_ESNEXT)\n  return ecma_is_value_symbol (value);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (value);\n  return false;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* jerry_value_is_symbol */\n\n/**\n * Check if the specified value is BigInt.\n *\n * @return true  - if the specified value is BigInt,\n *         false - otherwise\n */\nbool\njerry_value_is_bigint (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  return ecma_is_value_bigint (value);\n#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  JERRY_UNUSED (value);\n  return false;\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* jerry_value_is_bigint */\n\n/**\n * Check if the specified value is undefined.\n *\n * @return true  - if the specified value is undefined,\n *         false - otherwise\n */\nbool\njerry_value_is_undefined (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_is_value_undefined (value);\n} /* jerry_value_is_undefined */\n\n/**\n * Perform the base type of the JavaScript value.\n *\n * @return jerry_type_t value\n */\njerry_type_t\njerry_value_get_type (const jerry_value_t value) /**< input value to check */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value))\n  {\n    return JERRY_TYPE_ERROR;\n  }\n\n  lit_magic_string_id_t lit_id = ecma_get_typeof_lit_id (value);\n\n  JERRY_ASSERT (lit_id != LIT_MAGIC_STRING__EMPTY);\n\n  switch (lit_id)\n  {\n    case LIT_MAGIC_STRING_UNDEFINED:\n    {\n      return JERRY_TYPE_UNDEFINED;\n    }\n    case LIT_MAGIC_STRING_BOOLEAN:\n    {\n      return JERRY_TYPE_BOOLEAN;\n    }\n    case LIT_MAGIC_STRING_NUMBER:\n    {\n      return JERRY_TYPE_NUMBER;\n    }\n    case LIT_MAGIC_STRING_STRING:\n    {\n      return JERRY_TYPE_STRING;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LIT_MAGIC_STRING_SYMBOL:\n    {\n      return JERRY_TYPE_SYMBOL;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case LIT_MAGIC_STRING_FUNCTION:\n    {\n      return JERRY_TYPE_FUNCTION;\n    }\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    case LIT_MAGIC_STRING_BIGINT:\n    {\n      return JERRY_TYPE_BIGINT;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    default:\n    {\n      JERRY_ASSERT (lit_id == LIT_MAGIC_STRING_OBJECT);\n\n      /* Based on the ECMA 262 5.1 standard the 'null' value is an object.\n       * Thus we'll do an extra check for 'null' here.\n       */\n      return ecma_is_value_null (value) ? JERRY_TYPE_NULL : JERRY_TYPE_OBJECT;\n    }\n  }\n} /* jerry_value_get_type */\n\n/**\n * Get the object type of the given value\n *\n * @return JERRY_OBJECT_TYPE_NONE - if the given value is not an object\n *         jerry_object_type_t value - otherwise\n */\njerry_object_type_t\njerry_object_get_type (const jerry_value_t value) /**< input value to check */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (value))\n  {\n    return JERRY_OBJECT_TYPE_NONE;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (value);\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n  switch (ecma_get_object_type (obj_p))\n  {\n    case ECMA_OBJECT_TYPE_FUNCTION:\n    case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n    case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n    {\n      return JERRY_OBJECT_TYPE_FUNCTION;\n    }\n    case ECMA_OBJECT_TYPE_ARRAY:\n    {\n      return JERRY_OBJECT_TYPE_ARRAY;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_OBJECT_TYPE_PROXY:\n    {\n      return JERRY_OBJECT_TYPE_PROXY;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n    {\n      switch (ext_obj_p->u.pseudo_array.type)\n      {\n        case ECMA_PSEUDO_ARRAY_ARGUMENTS:\n        {\n          return JERRY_OBJECT_TYPE_ARGUMENTS;\n        }\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n        case ECMA_PSEUDO_ARRAY_TYPEDARRAY:\n        case ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO:\n        {\n          return JERRY_OBJECT_TYPE_TYPEDARRAY;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#if ENABLED (JERRY_ESNEXT)\n        case ECMA_PSEUDO_STRING_ITERATOR:\n        case ECMA_PSEUDO_ARRAY_ITERATOR:\n#if ENABLED (JERRY_BUILTIN_MAP)\n        case ECMA_PSEUDO_MAP_ITERATOR:\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n#if ENABLED (JERRY_BUILTIN_SET)\n        case ECMA_PSEUDO_SET_ITERATOR:\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n        {\n          return JERRY_OBJECT_TYPE_ITERATOR;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n      break;\n    }\n    case ECMA_OBJECT_TYPE_CLASS:\n    {\n      switch (ext_obj_p->u.class_prop.class_id)\n      {\n        case LIT_MAGIC_STRING_ARGUMENTS_UL:\n        {\n          return JERRY_OBJECT_TYPE_ARGUMENTS;\n        }\n        case LIT_MAGIC_STRING_BOOLEAN_UL:\n        {\n          return JERRY_OBJECT_TYPE_BOOLEAN;\n        }\n        case LIT_MAGIC_STRING_DATE_UL:\n        {\n          return JERRY_OBJECT_TYPE_DATE;\n        }\n        case LIT_MAGIC_STRING_NUMBER_UL:\n        {\n          return JERRY_OBJECT_TYPE_NUMBER;\n        }\n        case LIT_MAGIC_STRING_REGEXP_UL:\n        {\n          return JERRY_OBJECT_TYPE_REGEXP;\n        }\n        case LIT_MAGIC_STRING_STRING_UL:\n        {\n          return JERRY_OBJECT_TYPE_STRING;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case LIT_MAGIC_STRING_SYMBOL_UL:\n        {\n          return JERRY_OBJECT_TYPE_SYMBOL;\n        }\n        case LIT_MAGIC_STRING_GENERATOR_UL:\n        {\n          return JERRY_OBJECT_TYPE_GENERATOR;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n        case LIT_MAGIC_STRING_BIGINT_UL:\n        {\n          return JERRY_OBJECT_TYPE_BIGINT;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#if ENABLED (JERRY_BUILTIN_CONTAINER)\n#if ENABLED (JERRY_BUILTIN_MAP)\n        case LIT_MAGIC_STRING_MAP_UL:\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n#if ENABLED (JERRY_BUILTIN_SET)\n        case LIT_MAGIC_STRING_SET_UL:\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n        case LIT_MAGIC_STRING_WEAKMAP_UL:\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n        case LIT_MAGIC_STRING_WEAKSET_UL:\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n        {\n          return JERRY_OBJECT_TYPE_CONTAINER;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */\n        default:\n        {\n          break;\n        }\n      }\n      break;\n    }\n    default:\n    {\n      break;\n    }\n  }\n\n  return JERRY_OBJECT_TYPE_GENERIC;\n} /* jerry_object_get_type */\n\n/**\n * Get the function type of the given value\n *\n * @return JERRY_FUNCTION_TYPE_NONE - if the given value is not a function object\n *         jerry_function_type_t value - otherwise\n */\njerry_function_type_t\njerry_function_get_type (const jerry_value_t value) /**< input value to check */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_object (value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (value);\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n    switch (ecma_get_object_type (obj_p))\n    {\n      case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n      {\n        return JERRY_FUNCTION_TYPE_BOUND;\n      }\n      case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n      {\n        return JERRY_FUNCTION_TYPE_GENERIC;\n      }\n      case ECMA_OBJECT_TYPE_FUNCTION:\n      {\n        if (!ecma_get_object_is_builtin (obj_p))\n        {\n          const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_obj_p);\n\n          switch (CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags))\n          {\n#if ENABLED (JERRY_ESNEXT)\n            case CBC_FUNCTION_ARROW:\n            case CBC_FUNCTION_ASYNC_ARROW:\n            {\n              return JERRY_FUNCTION_TYPE_ARROW;\n            }\n            case CBC_FUNCTION_GENERATOR:\n            case CBC_FUNCTION_ASYNC_GENERATOR:\n            {\n              return JERRY_FUNCTION_TYPE_GENERATOR;\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n            case CBC_FUNCTION_ACCESSOR:\n            {\n              return JERRY_FUNCTION_TYPE_ACCESSOR;\n            }\n            default:\n            {\n              break;\n            }\n          }\n        }\n        return JERRY_FUNCTION_TYPE_GENERIC;\n      }\n      default:\n      {\n        break;\n      }\n    }\n  }\n\n  return JERRY_FUNCTION_TYPE_NONE;\n} /* jerry_function_get_type */\n\n/**\n * Get the itearator type of the given value\n *\n * @return JERRY_ITERATOR_TYPE_NONE - if the given value is not an iterator object\n *         jerry_iterator_type_t value - otherwise\n */\njerry_iterator_type_t\njerry_iterator_get_type (const jerry_value_t value) /**< input value to check */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_ESNEXT)\n  if (ecma_is_value_object (value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (value);\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n    if (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_PSEUDO_ARRAY)\n    {\n      switch (ext_obj_p->u.pseudo_array.type)\n      {\n        case ECMA_PSEUDO_ARRAY_ITERATOR:\n        {\n          return JERRY_ITERATOR_TYPE_ARRAY;\n        }\n        case ECMA_PSEUDO_STRING_ITERATOR:\n        {\n          return JERRY_ITERATOR_TYPE_STRING;\n        }\n#if ENABLED (JERRY_BUILTIN_MAP)\n        case ECMA_PSEUDO_MAP_ITERATOR:\n        {\n          return JERRY_ITERATOR_TYPE_MAP;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n#if ENABLED (JERRY_BUILTIN_SET)\n        case ECMA_PSEUDO_SET_ITERATOR:\n        {\n          return JERRY_ITERATOR_TYPE_SET;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n        default:\n        {\n          break;\n        }\n      }\n    }\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (value);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return JERRY_ITERATOR_TYPE_NONE;\n} /* jerry_iterator_get_type */\n\n/**\n * Check if the specified feature is enabled.\n *\n * @return true  - if the specified feature is enabled,\n *         false - otherwise\n */\nbool\njerry_is_feature_enabled (const jerry_feature_t feature) /**< feature to check */\n{\n  JERRY_ASSERT (feature < JERRY_FEATURE__COUNT);\n\n  return (false\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n          || feature == JERRY_FEATURE_CPOINTER_32_BIT\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n#if ENABLED (JERRY_ERROR_MESSAGES)\n          || feature == JERRY_FEATURE_ERROR_MESSAGES\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n#if ENABLED (JERRY_PARSER)\n          || feature == JERRY_FEATURE_JS_PARSER\n#endif /* ENABLED (JERRY_PARSER) */\n#if ENABLED (JERRY_MEM_STATS)\n          || feature == JERRY_FEATURE_MEM_STATS\n#endif /* ENABLED (JERRY_MEM_STATS) */\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n          || feature == JERRY_FEATURE_PARSER_DUMP\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n#if ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE)\n          || feature == JERRY_FEATURE_REGEXP_DUMP\n#endif /* ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE) */\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n          || feature == JERRY_FEATURE_SNAPSHOT_SAVE\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n          || feature == JERRY_FEATURE_SNAPSHOT_EXEC\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n#if ENABLED (JERRY_DEBUGGER)\n          || feature == JERRY_FEATURE_DEBUGGER\n#endif /* ENABLED (JERRY_DEBUGGER) */\n#if ENABLED (JERRY_VM_EXEC_STOP)\n          || feature == JERRY_FEATURE_VM_EXEC_STOP\n#endif /* ENABLED (JERRY_VM_EXEC_STOP) */\n#if ENABLED (JERRY_BUILTIN_JSON)\n          || feature == JERRY_FEATURE_JSON\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n          || feature == JERRY_FEATURE_PROMISE\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n#if ENABLED (JERRY_ESNEXT)\n          || feature == JERRY_FEATURE_SYMBOL\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n          || feature == JERRY_FEATURE_TYPEDARRAY\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n          || feature == JERRY_FEATURE_DATAVIEW\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */\n#if ENABLED (JERRY_BUILTIN_PROXY)\n          || feature == JERRY_FEATURE_PROXY\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n#if ENABLED (JERRY_BUILTIN_DATE)\n          || feature == JERRY_FEATURE_DATE\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n          || feature == JERRY_FEATURE_REGEXP\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#if ENABLED (JERRY_LINE_INFO)\n          || feature == JERRY_FEATURE_LINE_INFO\n#endif /* ENABLED (JERRY_LINE_INFO) */\n#if ENABLED (JERRY_LOGGING)\n          || feature == JERRY_FEATURE_LOGGING\n#endif /* ENABLED (JERRY_LOGGING) */\n#if ENABLED (JERRY_BUILTIN_MAP)\n          || feature == JERRY_FEATURE_MAP\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n#if ENABLED (JERRY_BUILTIN_SET)\n          || feature == JERRY_FEATURE_SET\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n          || feature == JERRY_FEATURE_WEAKMAP\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n          || feature == JERRY_FEATURE_WEAKSET\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n          || feature == JERRY_FEATURE_BIGINT\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#if ENABLED (JERRY_BUILTIN_REALMS)\n          || feature == JERRY_FEATURE_REALM\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n          );\n} /* jerry_is_feature_enabled */\n\n/**\n * Perform binary operation on the given operands (==, ===, <, >, etc.).\n *\n * @return error - if argument has an error flag or operation is unsuccessful or unsupported\n *         true/false - the result of the binary operation on the given operands otherwise\n */\njerry_value_t\njerry_binary_operation (jerry_binary_operation_t op, /**< operation */\n                        const jerry_value_t lhs, /**< first operand */\n                        const jerry_value_t rhs) /**< second operand */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (lhs) || ecma_is_value_error_reference (rhs))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  switch (op)\n  {\n    case JERRY_BIN_OP_EQUAL:\n    {\n      return jerry_return (ecma_op_abstract_equality_compare (lhs, rhs));\n    }\n    case JERRY_BIN_OP_STRICT_EQUAL:\n    {\n      return ecma_make_boolean_value (ecma_op_strict_equality_compare (lhs, rhs));\n    }\n    case JERRY_BIN_OP_LESS:\n    {\n      return jerry_return (opfunc_relation (lhs, rhs, true, false));\n    }\n    case JERRY_BIN_OP_LESS_EQUAL:\n    {\n      return jerry_return (opfunc_relation (lhs, rhs, false, true));\n    }\n    case JERRY_BIN_OP_GREATER:\n    {\n      return jerry_return (opfunc_relation (lhs, rhs, false, false));\n    }\n    case JERRY_BIN_OP_GREATER_EQUAL:\n    {\n      return jerry_return (opfunc_relation (lhs, rhs, true, true));\n    }\n    case JERRY_BIN_OP_INSTANCEOF:\n    {\n      if (!ecma_is_value_object (lhs)\n          || !ecma_op_is_callable (rhs))\n      {\n        return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n      }\n\n      ecma_object_t *proto_obj_p = ecma_get_object_from_value (rhs);\n      return jerry_return (ecma_op_object_has_instance (proto_obj_p, lhs));\n    }\n    case JERRY_BIN_OP_ADD:\n    {\n      return jerry_return (opfunc_addition (lhs, rhs));\n    }\n    case JERRY_BIN_OP_SUB:\n    case JERRY_BIN_OP_MUL:\n    case JERRY_BIN_OP_DIV:\n    case JERRY_BIN_OP_REM:\n    {\n      return jerry_return (do_number_arithmetic (op - ECMA_NUMBER_ARITHMETIC_OP_API_OFFSET, lhs, rhs));\n    }\n    default:\n    {\n      return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Unsupported binary operation\")));\n    }\n  }\n} /* jerry_binary_operation */\n\n/**\n * Create abort from an api value.\n *\n * Create abort value from an api value. If the second argument is true\n * it will release the input api value.\n *\n * @return api abort value\n */\njerry_value_t\njerry_create_abort_from_value (jerry_value_t value, /**< api value */\n                               bool release) /**< release api value */\n{\n  jerry_assert_api_available ();\n\n  if (JERRY_UNLIKELY (ecma_is_value_error_reference (value)))\n  {\n    /* This is a rare case so it is optimized for\n     * binary size rather than performance. */\n    if (jerry_value_is_abort (value))\n    {\n      return release ? value : jerry_acquire_value (value);\n    }\n\n    value = jerry_get_value_from_error (value, release);\n    release = true;\n  }\n\n  if (!release)\n  {\n    value = ecma_copy_value (value);\n  }\n\n  return ecma_create_error_reference (value, false);\n} /* jerry_create_abort_from_value */\n\n/**\n * Create error from an api value.\n *\n * Create error value from an api value. If the second argument is true\n * it will release the input api value.\n *\n * @return api error value\n */\njerry_value_t\njerry_create_error_from_value (jerry_value_t value, /**< api value */\n                               bool release) /**< release api value */\n{\n  jerry_assert_api_available ();\n\n  if (JERRY_UNLIKELY (ecma_is_value_error_reference (value)))\n  {\n    /* This is a rare case so it is optimized for\n     * binary size rather than performance. */\n    if (!jerry_value_is_abort (value))\n    {\n      return release ? value : jerry_acquire_value (value);\n    }\n\n    value = jerry_get_value_from_error (value, release);\n    release = true;\n  }\n\n  if (!release)\n  {\n    value = ecma_copy_value (value);\n  }\n\n  return ecma_create_error_reference (value, true);\n} /* jerry_create_error_from_value */\n\n/**\n * Get the value from an error value.\n *\n * Extract the api value from an error. If the second argument is true\n * it will release the input error value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return jerry_value_t value\n */\njerry_value_t\njerry_get_value_from_error (jerry_value_t value, /**< api value */\n                            bool release) /**< release api value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_error_reference (value))\n  {\n    return release ? value : ecma_copy_value (value);\n  }\n\n  jerry_value_t ret_val = jerry_acquire_value (ecma_get_extended_primitive_from_value (value)->u.value);\n\n  if (release)\n  {\n    jerry_release_value (value);\n  }\n  return ret_val;\n} /* jerry_get_value_from_error */\n\n/**\n * Set new decorator callback for Error objects. The decorator can\n * create or update any properties of the newly created Error object.\n */\nvoid\njerry_set_error_object_created_callback (jerry_error_object_created_callback_t callback, /**< new callback */\n                                         void *user_p) /**< user pointer passed to the callback */\n{\n  jerry_assert_api_available ();\n\n  JERRY_CONTEXT (error_object_created_callback_p) = callback;\n  JERRY_CONTEXT (error_object_created_callback_user_p) = user_p;\n} /* jerry_set_error_object_created_callback */\n\n/**\n * Return the type of the Error object if possible.\n *\n * @return one of the jerry_error_t value as the type of the Error object\n *         JERRY_ERROR_NONE - if the input value is not an Error object\n */\njerry_error_t\njerry_get_error_type (jerry_value_t value) /**< api value */\n{\n  if (JERRY_UNLIKELY (ecma_is_value_error_reference (value)))\n  {\n    value = ecma_get_extended_primitive_from_value (value)->u.value;\n  }\n\n  if (!ecma_is_value_object (value))\n  {\n    return JERRY_ERROR_NONE;\n  }\n\n  ecma_object_t *object_p = ecma_get_object_from_value (value);\n  ecma_standard_error_t error_type = ecma_get_error_type (object_p);\n\n  return (jerry_error_t) error_type;\n} /* jerry_get_error_type */\n\n/**\n * Get boolean from the specified value.\n *\n * @return true or false.\n */\nbool\njerry_get_boolean_value (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  return ecma_is_value_true (value);\n} /* jerry_get_boolean_value */\n\n/**\n * Get number from the specified value as a double.\n *\n * @return stored number as double\n */\ndouble\njerry_get_number_value (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_number (value))\n  {\n    return 0;\n  }\n\n  return (double) ecma_get_number_from_value (value);\n} /* jerry_get_number_value */\n\n/**\n * Call ToBoolean operation on the api value.\n *\n * @return true  - if the logical value is true\n *         false - otherwise\n */\nbool\njerry_value_to_boolean (const jerry_value_t value) /**< input value */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value))\n  {\n    return false;\n  }\n\n  return ecma_op_to_boolean (value);\n} /* jerry_value_to_boolean */\n\n/**\n * Call ToNumber operation on the api value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return converted number value - if success\n *         thrown error - otherwise\n */\njerry_value_t\njerry_value_to_number (const jerry_value_t value) /**< input value */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  ecma_number_t num;\n  ecma_value_t ret_value = ecma_op_to_number (value, &num);\n\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    return ecma_create_error_reference_from_context ();\n  }\n\n  return ecma_make_number_value (num);\n} /* jerry_value_to_number */\n\n/**\n * Call ToObject operation on the api value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return converted object value - if success\n *         thrown error - otherwise\n */\njerry_value_t\njerry_value_to_object (const jerry_value_t value) /**< input value */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  return jerry_return (ecma_op_to_object (value));\n} /* jerry_value_to_object */\n\n/**\n * Call ToPrimitive operation on the api value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return converted primitive value - if success\n *         thrown error - otherwise\n */\njerry_value_t\njerry_value_to_primitive (const jerry_value_t value) /**< input value */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  return jerry_return (ecma_op_to_primitive (value, ECMA_PREFERRED_TYPE_NO));\n} /* jerry_value_to_primitive */\n\n/**\n * Call the ToString ecma builtin operation on the api value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return converted string value - if success\n *         thrown error - otherwise\n */\njerry_value_t\njerry_value_to_string (const jerry_value_t value) /**< input value */\n{\n\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  ecma_string_t *str_p = ecma_op_to_string (value);\n  if (JERRY_UNLIKELY (str_p == NULL))\n  {\n    return ecma_create_error_reference_from_context ();\n  }\n\n  return ecma_make_string_value (str_p);\n} /* jerry_value_to_string */\n\n/**\n * Call the BigInt constructor ecma builtin operation on the api value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return BigInt value - if success\n *         thrown error - otherwise\n */\njerry_value_t\njerry_value_to_bigint (const jerry_value_t value) /**< input value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (ecma_is_value_error_reference (value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  return jerry_return (ecma_bigint_to_bigint (value, true));\n#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  JERRY_UNUSED (value);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_bigint_not_supported_p)));\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* jerry_value_to_bigint */\n\n/**\n * Convert any number to integer number.\n *\n * Note:\n *      For non-number values 0 is returned.\n *\n * @return integer representation of the number.\n */\ndouble\njerry_value_as_integer (const jerry_value_t value) /**< input value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_number (value))\n  {\n    return 0;\n  }\n\n  double number = ecma_get_number_from_value (value);\n\n  if (ecma_number_is_nan (number))\n  {\n    return ECMA_NUMBER_ZERO;\n  }\n\n  if (ecma_number_is_zero (number) || ecma_number_is_infinity (number))\n  {\n    return number;\n  }\n\n  ecma_number_t floor_fabs = (ecma_number_t) floor (fabs (number));\n\n  return ecma_number_is_negative (number) ? -floor_fabs : floor_fabs;\n} /* jerry_value_as_integer */\n\n/**\n * Convert any number to int32 number.\n *\n * Note:\n *      For non-number values 0 is returned.\n *\n * @return int32 representation of the number.\n */\nint32_t\njerry_value_as_int32 (const jerry_value_t value) /**< input value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_number (value))\n  {\n    return 0;\n  }\n\n  return ecma_number_to_int32 (ecma_get_number_from_value (value));\n} /* jerry_value_as_int32 */\n\n/**\n * Convert any number to uint32 number.\n *\n * Note:\n *      For non-number values 0 is returned.\n *\n * @return uint32 representation of the number.\n */\nuint32_t\njerry_value_as_uint32 (const jerry_value_t value) /**< input value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_number (value))\n  {\n    return 0;\n  }\n\n  return ecma_number_to_uint32 (ecma_get_number_from_value (value));\n} /* jerry_value_as_uint32 */\n\n/**\n * Acquire specified Jerry API value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return acquired api value\n */\njerry_value_t\njerry_acquire_value (jerry_value_t value) /**< API value */\n{\n  jerry_assert_api_available ();\n\n  if (JERRY_UNLIKELY (ecma_is_value_error_reference (value)))\n  {\n    ecma_ref_extended_primitive (ecma_get_extended_primitive_from_value (value));\n    return value;\n  }\n\n  return ecma_copy_value (value);\n} /* jerry_acquire_value */\n\n/**\n * Release specified Jerry API value\n */\nvoid\njerry_release_value (jerry_value_t value) /**< API value */\n{\n  jerry_assert_api_available ();\n\n  if (JERRY_UNLIKELY (ecma_is_value_error_reference (value)))\n  {\n    ecma_deref_error_reference (ecma_get_extended_primitive_from_value (value));\n    return;\n  }\n\n  ecma_free_value (value);\n} /* jerry_release_value */\n\n/**\n * Create an array object value\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the constructed array object\n */\njerry_value_t\njerry_create_array (uint32_t size) /**< size of array */\n{\n  jerry_assert_api_available ();\n\n  ecma_object_t *array_p = ecma_op_new_array_object (size);\n  return ecma_make_object_value (array_p);\n} /* jerry_create_array */\n\n/**\n * Create a jerry_value_t representing a boolean value from the given boolean parameter.\n *\n * @return value of the created boolean\n */\njerry_value_t\njerry_create_boolean (bool value) /**< bool value from which a jerry_value_t will be created */\n{\n  jerry_assert_api_available ();\n\n  return jerry_return (ecma_make_boolean_value (value));\n} /* jerry_create_boolean */\n\n/**\n * Create an error object\n *\n * Note:\n *      - returned value must be freed with jerry_release_value, when it is no longer needed\n *      - the error flag is set for the returned value\n *\n * @return value of the constructed error object\n */\njerry_value_t\njerry_create_error (jerry_error_t error_type, /**< type of error */\n                    const jerry_char_t *message_p) /**< value of 'message' property\n                                                    *   of constructed error object */\n{\n  return jerry_create_error_sz (error_type,\n                                (lit_utf8_byte_t *) message_p,\n                                lit_zt_utf8_string_size (message_p));\n} /* jerry_create_error */\n\n/**\n * Create an error object\n *\n * Note:\n *      - returned value must be freed with jerry_release_value, when it is no longer needed\n *      - the error flag is set for the returned value\n *\n * @return value of the constructed error object\n */\njerry_value_t\njerry_create_error_sz (jerry_error_t error_type, /**< type of error */\n                       const jerry_char_t *message_p, /**< value of 'message' property\n                                                       *   of constructed error object */\n                       jerry_size_t message_size) /**< size of the message in bytes */\n{\n  jerry_assert_api_available ();\n\n  if (message_p == NULL || message_size == 0)\n  {\n    return ecma_create_error_object_reference (ecma_new_standard_error ((ecma_standard_error_t) error_type, NULL));\n  }\n  else\n  {\n    ecma_string_t *message_string_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) message_p,\n                                                                      (lit_utf8_size_t) message_size);\n\n    ecma_object_t *error_object_p = ecma_new_standard_error ((ecma_standard_error_t) error_type,\n                                                             message_string_p);\n\n    ecma_deref_ecma_string (message_string_p);\n\n    return ecma_create_error_object_reference (error_object_p);\n  }\n} /* jerry_create_error_sz */\n\n/**\n * Create an external function object\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the constructed function object\n */\njerry_value_t\njerry_create_external_function (jerry_external_handler_t handler_p) /**< pointer to native handler\n                                                                     *   for the function */\n{\n  jerry_assert_api_available ();\n\n  ecma_object_t *func_obj_p = ecma_op_create_external_function_object (handler_p);\n  return ecma_make_object_value (func_obj_p);\n} /* jerry_create_external_function */\n\n/**\n * Creates a jerry_value_t representing a number value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return jerry_value_t created from the given double argument.\n */\njerry_value_t\njerry_create_number (double value) /**< double value from which a jerry_value_t will be created */\n{\n  jerry_assert_api_available ();\n\n  return ecma_make_number_value ((ecma_number_t) value);\n} /* jerry_create_number */\n\n/**\n * Creates a jerry_value_t representing a positive or negative infinity value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return jerry_value_t representing an infinity value.\n */\njerry_value_t\njerry_create_number_infinity (bool sign) /**< true for negative Infinity\n                                          *   false for positive Infinity */\n{\n  jerry_assert_api_available ();\n\n  return ecma_make_number_value (ecma_number_make_infinity (sign));\n} /* jerry_create_number_infinity */\n\n/**\n * Creates a jerry_value_t representing a not-a-number value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return jerry_value_t representing a not-a-number value.\n */\njerry_value_t\njerry_create_number_nan (void)\n{\n  jerry_assert_api_available ();\n\n  return ecma_make_nan_value ();\n} /* jerry_create_number_nan */\n\n/**\n * Creates a jerry_value_t representing an undefined value.\n *\n * @return value of undefined\n */\njerry_value_t\njerry_create_undefined (void)\n{\n  jerry_assert_api_available ();\n\n  return ECMA_VALUE_UNDEFINED;\n} /* jerry_create_undefined */\n\n/**\n * Creates and returns a jerry_value_t with type null object.\n *\n * @return jerry_value_t representing null\n */\njerry_value_t\njerry_create_null (void)\n{\n  jerry_assert_api_available ();\n\n  return ECMA_VALUE_NULL;\n} /* jerry_create_null */\n\n/**\n * Create new JavaScript object, like with new Object().\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the created object\n */\njerry_value_t\njerry_create_object (void)\n{\n  jerry_assert_api_available ();\n\n  return ecma_make_object_value (ecma_op_create_object_object_noarg ());\n} /* jerry_create_object */\n\n/**\n * Create an empty Promise object which can be resolve/reject later\n * by calling jerry_resolve_or_reject_promise.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the created object\n */\njerry_value_t\njerry_create_promise (void)\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n  ecma_object_t *old_new_target_p = JERRY_CONTEXT (current_new_target_p);\n\n  if (old_new_target_p == NULL)\n  {\n    JERRY_CONTEXT (current_new_target_p) = ecma_builtin_get (ECMA_BUILTIN_ID_PROMISE);\n  }\n\n  ecma_value_t promise_value = ecma_op_create_promise_object (ECMA_VALUE_EMPTY, ECMA_PROMISE_EXECUTOR_EMPTY);\n\n  JERRY_CONTEXT (current_new_target_p) = old_new_target_p;\n  return promise_value;\n#else /* !ENABLED (JERRY_BUILTIN_PROMISE) */\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Promise not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n} /* jerry_create_promise */\n\n/**\n * Create a new Proxy object with the given target and handler\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the created Proxy object\n */\njerry_value_t\njerry_create_proxy (const jerry_value_t target, /**< target argument */\n                    const jerry_value_t handler) /**< handler argument */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (target)\n      || ecma_is_value_error_reference (handler))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  ecma_object_t *proxy_p = ecma_proxy_create (target, handler);\n  return jerry_return (proxy_p == NULL ? ECMA_VALUE_ERROR : ecma_make_object_value (proxy_p));\n#else /* !ENABLED (JERRY_BUILTIN_PROXY) */\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Proxy is not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n} /* jerry_create_proxy */\n\n/**\n * Create string from a valid UTF-8 string\n *\n * Note:\n *      returned value must be freed with jerry_release_value when it is no longer needed.\n *\n * @return value of the created string\n */\njerry_value_t\njerry_create_string_from_utf8 (const jerry_char_t *str_p) /**< pointer to string */\n{\n  return jerry_create_string_sz_from_utf8 (str_p, lit_zt_utf8_string_size ((lit_utf8_byte_t *) str_p));\n} /* jerry_create_string_from_utf8 */\n\n/**\n * Create string from a valid UTF-8 string\n *\n * Note:\n *      returned value must be freed with jerry_release_value when it is no longer needed.\n *\n * @return value of the created string\n */\njerry_value_t\njerry_create_string_sz_from_utf8 (const jerry_char_t *str_p, /**< pointer to string */\n                                  jerry_size_t str_size) /**< string size */\n{\n  jerry_assert_api_available ();\n\n  ecma_string_t *ecma_str_p = ecma_new_ecma_string_from_utf8_converted_to_cesu8 ((lit_utf8_byte_t *) str_p,\n                                                                                 (lit_utf8_size_t) str_size);\n\n  return ecma_make_string_value (ecma_str_p);\n} /* jerry_create_string_sz_from_utf8 */\n\n/**\n * Create string from a valid CESU-8 string\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the created string\n */\njerry_value_t\njerry_create_string (const jerry_char_t *str_p) /**< pointer to string */\n{\n  return jerry_create_string_sz (str_p, lit_zt_utf8_string_size ((lit_utf8_byte_t *) str_p));\n} /* jerry_create_string */\n\n/**\n * Create string from a valid CESU-8 string\n *\n * Note:\n *      returned value must be freed with jerry_release_value when it is no longer needed.\n *\n * @return value of the created string\n */\njerry_value_t\njerry_create_string_sz (const jerry_char_t *str_p, /**< pointer to string */\n                        jerry_size_t str_size) /**< string size */\n{\n  jerry_assert_api_available ();\n\n  ecma_string_t *ecma_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) str_p,\n                                                              (lit_utf8_size_t) str_size);\n  return ecma_make_string_value (ecma_str_p);\n} /* jerry_create_string_sz */\n\n/**\n * Create external string from a valid CESU-8 string\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the created external string\n */\njerry_value_t\njerry_create_external_string (const jerry_char_t *str_p, /**< pointer to string */\n                              jerry_object_native_free_callback_t free_cb) /**< free callback */\n{\n  return jerry_create_external_string_sz (str_p, lit_zt_utf8_string_size ((lit_utf8_byte_t *) str_p), free_cb);\n} /* jerry_create_external_string */\n\n/**\n * Create external string from a valid CESU-8 string\n *\n * Note:\n *      returned value must be freed with jerry_release_value when it is no longer needed.\n *\n * @return value of the created external string\n */\njerry_value_t\njerry_create_external_string_sz (const jerry_char_t *str_p, /**< pointer to string */\n                                 jerry_size_t str_size, /**< string size */\n                                 jerry_object_native_free_callback_t free_cb) /**< free callback */\n{\n  jerry_assert_api_available ();\n\n  ecma_string_t *ecma_str_p = ecma_new_ecma_external_string_from_cesu8 ((lit_utf8_byte_t *) str_p,\n                                                                        (lit_utf8_size_t) str_size,\n                                                                        free_cb);\n  return ecma_make_string_value (ecma_str_p);\n} /* jerry_create_external_string_sz */\n\n/**\n * Create symbol from an api value\n *\n * Note:\n *      The given argument is converted to string. This operation can throw an error.\n *      returned value must be freed with jerry_release_value when it is no longer needed.\n *\n * @return value of the created symbol, if success\n *         thrown error, otherwise\n */\njerry_value_t\njerry_create_symbol (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  return jerry_return (ecma_op_create_symbol (&value, 1));\n#else /* !ENABLED (JERRY_ESNEXT) */\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Symbol is not supported.\")));\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* jerry_create_symbol */\n\n/**\n * Create BigInt from a sequence of uint64 digits\n *\n * @return value of the created bigint, if success\n *         thrown error, otherwise\n */\njerry_value_t\njerry_create_bigint (const uint64_t *digits_p, /**< BigInt digits (lowest digit first) */\n                     uint32_t size, /**< number of BigInt digits */\n                     bool sign) /**< sign bit, true if the result should be negative */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  return jerry_return (ecma_bigint_create_from_digits (digits_p, size, sign));\n#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  JERRY_UNUSED (digits_p);\n  JERRY_UNUSED (size);\n  JERRY_UNUSED (sign);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_bigint_not_supported_p)));\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* jerry_create_bigint */\n\n/**\n * Calculates the size of the given pattern and creates a RegExp object.\n *\n * @return value of the constructed RegExp object.\n */\njerry_value_t\njerry_create_regexp (const jerry_char_t *pattern_p, /**< zero-terminated UTF-8 string as RegExp pattern */\n                     uint16_t flags) /**< optional RegExp flags */\n{\n  return jerry_create_regexp_sz (pattern_p, lit_zt_utf8_string_size (pattern_p), flags);\n} /* jerry_create_regexp */\n\n/**\n * Creates a RegExp object with the given pattern and flags.\n *\n * @return value of the constructed RegExp object.\n */\njerry_value_t\njerry_create_regexp_sz (const jerry_char_t *pattern_p, /**< zero-terminated UTF-8 string as RegExp pattern */\n                        jerry_size_t pattern_size, /**< length of the pattern */\n                        uint16_t flags) /**< optional RegExp flags */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  if (!lit_is_valid_utf8_string (pattern_p, pattern_size))\n  {\n    return jerry_throw (ecma_raise_common_error (ECMA_ERR_MSG (\"Input must be a valid utf8 string\")));\n  }\n\n  ecma_object_t *regexp_obj_p = ecma_op_regexp_alloc (NULL);\n\n  if (JERRY_UNLIKELY (regexp_obj_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_string_t *ecma_pattern = ecma_new_ecma_string_from_utf8 (pattern_p, pattern_size);\n\n  jerry_value_t ret_val = ecma_op_create_regexp_with_flags (regexp_obj_p,\n                                                            ecma_make_string_value (ecma_pattern),\n                                                            flags);\n  ecma_deref_ecma_string (ecma_pattern);\n\n  return ret_val;\n\n#else /* !ENABLED (JERRY_BUILTIN_REGEXP) */\n  JERRY_UNUSED (pattern_p);\n  JERRY_UNUSED (pattern_size);\n  JERRY_UNUSED (flags);\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"RegExp is not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n} /* jerry_create_regexp_sz */\n\n/**\n * Creates a new realm (global object).\n *\n * @return new realm object\n */\njerry_value_t\njerry_create_realm (void)\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_global_object_t *global_object_p = ecma_builtin_create_global_object ();\n  return ecma_make_object_value ((ecma_object_t *) global_object_p);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Realms are disabled.\")));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n} /* jerry_create_realm */\n\n/**\n * Get length of an array object\n *\n * Note:\n *      Returns 0, if the value parameter is not an array object.\n *\n * @return length of the given array\n */\nuint32_t\njerry_get_array_length (const jerry_value_t value) /**< api value */\n{\n  jerry_assert_api_available ();\n\n  if (!jerry_value_is_object (value))\n  {\n    return 0;\n  }\n\n  ecma_object_t *object_p = ecma_get_object_from_value (value);\n\n  if (JERRY_LIKELY (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_ARRAY))\n  {\n    return ecma_array_get_length (object_p);\n  }\n\n  return 0;\n} /* jerry_get_array_length */\n\n/**\n * Get size of Jerry string\n *\n * Note:\n *      Returns 0, if the value parameter is not a string.\n *\n * @return number of bytes in the buffer needed to represent the string\n */\njerry_size_t\njerry_get_string_size (const jerry_value_t value) /**< input string */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_string (value))\n  {\n    return 0;\n  }\n\n  return ecma_string_get_size (ecma_get_string_from_value (value));\n} /* jerry_get_string_size */\n\n/**\n * Get UTF-8 encoded string size from Jerry string\n *\n * Note:\n *      Returns 0, if the value parameter is not a string.\n *\n * @return number of bytes in the buffer needed to represent the UTF-8 encoded string\n */\njerry_size_t\njerry_get_utf8_string_size (const jerry_value_t value) /**< input string */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_string (value))\n  {\n    return 0;\n  }\n\n  return ecma_string_get_utf8_size (ecma_get_string_from_value (value));\n} /* jerry_get_utf8_string_size */\n\n/**\n * Get length of Jerry string\n *\n * Note:\n *      Returns 0, if the value parameter is not a string.\n *\n * @return number of characters in the string\n */\njerry_length_t\njerry_get_string_length (const jerry_value_t value) /**< input string */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_string (value))\n  {\n    return 0;\n  }\n\n  return ecma_string_get_length (ecma_get_string_from_value (value));\n} /* jerry_get_string_length */\n\n/**\n * Get UTF-8 string length from Jerry string\n *\n * Note:\n *      Returns 0, if the value parameter is not a string.\n *\n * @return number of characters in the string\n */\njerry_length_t\njerry_get_utf8_string_length (const jerry_value_t value) /**< input string */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_string (value))\n  {\n    return 0;\n  }\n\n  return ecma_string_get_utf8_length (ecma_get_string_from_value (value));\n} /* jerry_get_utf8_string_length */\n\n/**\n * Copy the characters of a string into a specified buffer.\n *\n * Note:\n *      The '\\0' character could occur in character buffer.\n *      Returns 0, if the value parameter is not a string or\n *      the buffer is not large enough for the whole string.\n *\n * Note:\n *      If the size of the string in jerry value is larger than the size of the\n *      target buffer, the copy will fail.\n *      To copy substring use jerry_substring_to_char_buffer() instead.\n *\n * @return number of bytes, actually copied to the buffer.\n */\njerry_size_t\njerry_string_to_char_buffer (const jerry_value_t value, /**< input string value */\n                             jerry_char_t *buffer_p, /**< [out] output characters buffer */\n                             jerry_size_t buffer_size) /**< size of output buffer */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_string (value) || buffer_p == NULL)\n  {\n    return 0;\n  }\n\n  ecma_string_t *str_p = ecma_get_string_from_value (value);\n\n  if (ecma_string_get_size (str_p) > buffer_size)\n  {\n    return 0;\n  }\n\n  return ecma_string_copy_to_cesu8_buffer (str_p,\n                                           (lit_utf8_byte_t *) buffer_p,\n                                           buffer_size);\n} /* jerry_string_to_char_buffer */\n\n/**\n * Copy the characters of an utf-8 encoded string into a specified buffer.\n *\n * Note:\n *      The '\\0' character could occur anywhere in the returned string\n *      Returns 0, if the value parameter is not a string or the buffer\n *      is not large enough for the whole string.\n *\n * Note:\n *      If the size of the string in jerry value is larger than the size of the\n *      target buffer, the copy will fail.\n *      To copy a substring use jerry_substring_to_utf8_char_buffer() instead.\n *\n * @return number of bytes copied to the buffer.\n */\njerry_size_t\njerry_string_to_utf8_char_buffer (const jerry_value_t value, /**< input string value */\n                                  jerry_char_t *buffer_p, /**< [out] output characters buffer */\n                                  jerry_size_t buffer_size) /**< size of output buffer */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_string (value) || buffer_p == NULL)\n  {\n    return 0;\n  }\n\n  ecma_string_t *str_p = ecma_get_string_from_value (value);\n\n  if (ecma_string_get_utf8_size (str_p) > buffer_size)\n  {\n    return 0;\n  }\n\n  return ecma_string_copy_to_utf8_buffer (str_p,\n                                          (lit_utf8_byte_t *) buffer_p,\n                                          buffer_size);\n} /* jerry_string_to_utf8_char_buffer */\n\n/**\n * Copy the characters of an cesu-8 encoded substring into a specified buffer.\n *\n * Note:\n *      The '\\0' character could occur anywhere in the returned string\n *      Returns 0, if the value parameter is not a string.\n *      It will extract the substring beetween the specified start position\n *      and the end position (or the end of the string, whichever comes first).\n *\n * @return number of bytes copied to the buffer.\n */\njerry_size_t\njerry_substring_to_char_buffer (const jerry_value_t value, /**< input string value */\n                                jerry_length_t start_pos, /**< position of the first character */\n                                jerry_length_t end_pos, /**< position of the last character */\n                                jerry_char_t *buffer_p, /**< [out] output characters buffer */\n                                jerry_size_t buffer_size) /**< size of output buffer */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_string (value) || buffer_p == NULL)\n  {\n    return 0;\n  }\n\n  ecma_string_t *str_p = ecma_get_string_from_value (value);\n\n  return ecma_substring_copy_to_cesu8_buffer (str_p,\n                                              start_pos,\n                                              end_pos,\n                                              (lit_utf8_byte_t *) buffer_p,\n                                              buffer_size);\n} /* jerry_substring_to_char_buffer */\n\n/**\n * Copy the characters of an utf-8 encoded substring into a specified buffer.\n *\n * Note:\n *      The '\\0' character could occur anywhere in the returned string\n *      Returns 0, if the value parameter is not a string.\n *      It will extract the substring beetween the specified start position\n *      and the end position (or the end of the string, whichever comes first).\n *\n * @return number of bytes copied to the buffer.\n */\njerry_size_t\njerry_substring_to_utf8_char_buffer (const jerry_value_t value, /**< input string value */\n                                     jerry_length_t start_pos, /**< position of the first character */\n                                     jerry_length_t end_pos, /**< position of the last character */\n                                     jerry_char_t *buffer_p, /**< [out] output characters buffer */\n                                     jerry_size_t buffer_size) /**< size of output buffer */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_string (value) || buffer_p == NULL)\n  {\n    return 0;\n  }\n\n  ecma_string_t *str_p = ecma_get_string_from_value (value);\n\n  return ecma_substring_copy_to_utf8_buffer (str_p,\n                                             start_pos,\n                                             end_pos,\n                                             (lit_utf8_byte_t *) buffer_p,\n                                             buffer_size);\n} /* jerry_substring_to_utf8_char_buffer */\n\n/**\n * Checks whether the object or it's prototype objects have the given property.\n *\n * @return raised error - if the operation fail\n *         true/false API value  - depend on whether the property exists\n */\njerry_value_t\njerry_has_property (const jerry_value_t obj_val, /**< object value */\n                    const jerry_value_t prop_name_val) /**< property name (string value) */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  return jerry_return (ecma_op_object_has_property (ecma_get_object_from_value (obj_val),\n                                                    ecma_get_prop_name_from_value (prop_name_val)));\n} /* jerry_has_property */\n\n/**\n * Checks whether the object has the given property.\n *\n * @return ECMA_VALUE_ERROR - if the operation raises error\n *         ECMA_VALUE_{TRUE, FALSE} - based on whether the property exists\n */\njerry_value_t\njerry_has_own_property (const jerry_value_t obj_val, /**< object value */\n                        const jerry_value_t prop_name_val) /**< property name (string value) */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_val);\n  ecma_string_t *prop_name_p = ecma_get_prop_name_from_value (prop_name_val);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    ecma_property_descriptor_t prop_desc;\n\n    ecma_value_t status = ecma_proxy_object_get_own_property_descriptor (obj_p, prop_name_p, &prop_desc);\n\n    if (ecma_is_value_true (status))\n    {\n      ecma_free_property_descriptor (&prop_desc);\n    }\n\n    return jerry_return (status);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return ecma_make_boolean_value (ecma_op_ordinary_object_has_own_property (obj_p, prop_name_p));\n} /* jerry_has_own_property */\n\n/**\n * Checks whether the object has the given internal property.\n *\n * @return true  - if the internal property exists\n *         false - otherwise\n */\nbool\njerry_has_internal_property (const jerry_value_t obj_val, /**< object value */\n                             const jerry_value_t prop_name_val) /**< property name value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return false;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_val);\n\n  ecma_string_t *internal_string_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_API_INTERNAL);\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    return false;\n  }\n\n  ecma_property_t *property_p = ecma_find_named_property (obj_p, internal_string_p);\n\n  if (property_p == NULL)\n  {\n    return false;\n  }\n\n  ecma_object_t *internal_object_p = ecma_get_object_from_value (ECMA_PROPERTY_VALUE_PTR (property_p)->value);\n  property_p = ecma_find_named_property (internal_object_p, ecma_get_prop_name_from_value (prop_name_val));\n\n  return property_p != NULL;\n} /* jerry_has_internal_property */\n\n/**\n * Delete a property from an object.\n *\n * @return true  - if property was deleted successfully\n *         false - otherwise\n */\nbool\njerry_delete_property (const jerry_value_t obj_val, /**< object value */\n                       const jerry_value_t prop_name_val) /**< property name (string value) */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return false;\n  }\n\n  ecma_value_t ret_value = ecma_op_object_delete (ecma_get_object_from_value (obj_val),\n                                                  ecma_get_prop_name_from_value (prop_name_val),\n                                                  false);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    // TODO: Due to Proxies the return value must be changed to jerry_value_t on next release\n    jcontext_release_exception ();\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return ecma_is_value_true (ret_value);\n} /* jerry_delete_property */\n\n/**\n * Delete indexed property from the specified object.\n *\n * @return true  - if property was deleted successfully\n *         false - otherwise\n */\nbool\njerry_delete_property_by_index (const jerry_value_t obj_val, /**< object value */\n                                uint32_t index) /**< index to be written */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val))\n  {\n    return false;\n  }\n\n  ecma_string_t *str_idx_p = ecma_new_ecma_string_from_uint32 (index);\n  ecma_value_t ret_value = ecma_op_object_delete (ecma_get_object_from_value (obj_val),\n                                                  str_idx_p,\n                                                  false);\n  ecma_deref_ecma_string (str_idx_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    // TODO: Due to Proxies the return value must be changed to jerry_value_t on next release\n    jcontext_release_exception ();\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return ecma_is_value_true (ret_value);\n} /* jerry_delete_property_by_index */\n\n/**\n * Delete an internal property from an object.\n *\n * @return true  - if property was deleted successfully\n *         false - otherwise\n */\nbool\njerry_delete_internal_property (const jerry_value_t obj_val, /**< object value */\n                                const jerry_value_t prop_name_val) /**< property name value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return false;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_val);\n\n  ecma_string_t *internal_string_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_API_INTERNAL);\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    return true;\n  }\n\n  ecma_property_t *property_p = ecma_find_named_property (obj_p, internal_string_p);\n\n  if (property_p == NULL)\n  {\n    return true;\n  }\n\n  ecma_object_t *internal_object_p = ecma_get_object_from_value (ECMA_PROPERTY_VALUE_PTR (property_p)->value);\n  property_p = ecma_find_named_property (internal_object_p, ecma_get_prop_name_from_value (prop_name_val));\n\n  if (property_p == NULL)\n  {\n    return true;\n  }\n\n  ecma_delete_property (internal_object_p, ECMA_PROPERTY_VALUE_PTR (property_p));\n\n  return true;\n} /* jerry_delete_internal_property */\n\n/**\n * Get value of a property to the specified object with the given name.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the property - if success\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_get_property (const jerry_value_t obj_val, /**< object value */\n                    const jerry_value_t prop_name_val) /**< property name (string value) */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  jerry_value_t ret_value = ecma_op_object_get (ecma_get_object_from_value (obj_val),\n                                                ecma_get_prop_name_from_value (prop_name_val));\n  return jerry_return (ret_value);\n} /* jerry_get_property */\n\n/**\n * Get value by an index from the specified object.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the property specified by the index - if success\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_get_property_by_index (const jerry_value_t obj_val, /**< object value */\n                             uint32_t index) /**< index to be written */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_value_t ret_value = ecma_op_object_get_by_index (ecma_get_object_from_value (obj_val), index);\n\n  return jerry_return (ret_value);\n} /* jerry_get_property_by_index */\n\n/**\n * Get value of an internal property to the specified object with the given name.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return value of the internal property - if the internal property exists\n *         undefined value - if the internal does not property exists\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_get_internal_property (const jerry_value_t obj_val, /**< object value */\n                             const jerry_value_t prop_name_val) /**< property name value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_val);\n\n  ecma_string_t *internal_string_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_API_INTERNAL);\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    return jerry_return (ECMA_VALUE_UNDEFINED);\n  }\n\n  ecma_property_t *property_p = ecma_find_named_property (obj_p, internal_string_p);\n\n  if (property_p == NULL)\n  {\n    return jerry_return (ECMA_VALUE_UNDEFINED);\n  }\n\n  ecma_object_t *internal_object_p = ecma_get_object_from_value (ECMA_PROPERTY_VALUE_PTR (property_p)->value);\n  property_p = ecma_find_named_property (internal_object_p, ecma_get_prop_name_from_value (prop_name_val));\n\n  if (property_p == NULL)\n  {\n    return jerry_return (ECMA_VALUE_UNDEFINED);\n  }\n\n  return jerry_return (ecma_copy_value (ECMA_PROPERTY_VALUE_PTR (property_p)->value));\n} /* jerry_get_internal_property */\n\n/**\n * Set a property to the specified object with the given name.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return true value - if the operation was successful\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_set_property (const jerry_value_t obj_val, /**< object value */\n                    const jerry_value_t prop_name_val, /**< property name (string value) */\n                    const jerry_value_t value_to_set) /**< value to set */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value_to_set)\n      || !ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  return jerry_return (ecma_op_object_put (ecma_get_object_from_value (obj_val),\n                                           ecma_get_prop_name_from_value (prop_name_val),\n                                           value_to_set,\n                                           true));\n} /* jerry_set_property */\n\n/**\n * Set indexed value in the specified object\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return true value - if the operation was successful\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_set_property_by_index (const jerry_value_t obj_val, /**< object value */\n                             uint32_t index, /**< index to be written */\n                             const jerry_value_t value_to_set) /**< value to set */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value_to_set)\n      || !ecma_is_value_object (obj_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_value_t ret_value = ecma_op_object_put_by_index (ecma_get_object_from_value (obj_val),\n                                                        index,\n                                                        value_to_set,\n                                                        true);\n\n  return jerry_return (ret_value);\n} /* jerry_set_property_by_index */\n\n/**\n * Set an internal property to the specified object with the given name.\n *\n * Note:\n *      - the property cannot be accessed from the JavaScript context, only from the public API\n *      - returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return true value - if the operation was successful\n *         value marked with error flag - otherwise\n */\nbool\njerry_set_internal_property (const jerry_value_t obj_val, /**< object value */\n                             const jerry_value_t prop_name_val, /**< property name value */\n                             const jerry_value_t value_to_set) /**< value to set */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_error_reference (value_to_set)\n      || !ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return false;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_val);\n\n  ecma_string_t *internal_string_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_API_INTERNAL);\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_fast_array_convert_to_normal (obj_p);\n  }\n\n  ecma_property_t *property_p = ecma_find_named_property (obj_p, internal_string_p);\n  ecma_object_t *internal_object_p;\n\n  if (property_p == NULL)\n  {\n    ecma_property_value_t *value_p = ecma_create_named_data_property (obj_p,\n                                                                      internal_string_p,\n                                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                                      NULL);\n\n    internal_object_p = ecma_create_object (NULL,\n                                            sizeof (ecma_extended_object_t),\n                                            ECMA_OBJECT_TYPE_CLASS);\n    {\n      ecma_extended_object_t *container_p = (ecma_extended_object_t *) internal_object_p;\n      container_p->u.class_prop.class_id = LIT_INTERNAL_MAGIC_STRING_INTERNAL_OBJECT;\n      container_p->u.class_prop.extra_info = 0;\n      container_p->u.class_prop.u.length = 0;\n    }\n\n    value_p->value = ecma_make_object_value (internal_object_p);\n    ecma_deref_object (internal_object_p);\n  }\n  else\n  {\n    internal_object_p = ecma_get_object_from_value (ECMA_PROPERTY_VALUE_PTR (property_p)->value);\n  }\n\n  ecma_string_t *prop_name_p = ecma_get_prop_name_from_value (prop_name_val);\n  property_p = ecma_find_named_property (internal_object_p, prop_name_p);\n\n  if (property_p == NULL)\n  {\n    ecma_property_value_t *value_p = ecma_create_named_data_property (internal_object_p,\n                                                                      prop_name_p,\n                                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                                      NULL);\n\n    value_p->value = ecma_copy_value_if_not_object (value_to_set);\n  }\n  else\n  {\n    ecma_named_data_property_assign_value (internal_object_p, ECMA_PROPERTY_VALUE_PTR (property_p), value_to_set);\n  }\n\n  return true;\n} /* jerry_set_internal_property */\n\n/**\n * Initialize property descriptor.\n */\nvoid\njerry_init_property_descriptor_fields (jerry_property_descriptor_t *prop_desc_p) /**< [out] property descriptor */\n{\n  prop_desc_p->is_value_defined = false;\n  prop_desc_p->value = ECMA_VALUE_UNDEFINED;\n  prop_desc_p->is_writable_defined = false;\n  prop_desc_p->is_writable = false;\n  prop_desc_p->is_enumerable_defined = false;\n  prop_desc_p->is_enumerable = false;\n  prop_desc_p->is_configurable_defined = false;\n  prop_desc_p->is_configurable = false;\n  prop_desc_p->is_get_defined = false;\n  prop_desc_p->getter = ECMA_VALUE_UNDEFINED;\n  prop_desc_p->is_set_defined = false;\n  prop_desc_p->setter = ECMA_VALUE_UNDEFINED;\n} /* jerry_init_property_descriptor_fields */\n\n/**\n * Convert a ecma_property_descriptor_t to a jerry_property_descriptor_t\n *\n * if error occurs the property descriptor's value field is filled with ECMA_VALUE_ERROR\n *\n * @return jerry_property_descriptor_t\n */\nstatic jerry_property_descriptor_t\njerry_property_descriptor_from_ecma (const ecma_property_descriptor_t *prop_desc_p) /**<[out] property_descriptor */\n{\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n\n  if (prop_desc_p->flags & (ECMA_PROP_IS_ENUMERABLE_DEFINED))\n  {\n    prop_desc.is_enumerable_defined = true;\n    prop_desc.is_enumerable = prop_desc_p->flags & (ECMA_PROP_IS_ENUMERABLE);\n  }\n\n  if (prop_desc_p->flags & (ECMA_PROP_IS_CONFIGURABLE_DEFINED))\n  {\n    prop_desc.is_configurable_defined = true;\n    prop_desc.is_configurable = prop_desc_p->flags & (ECMA_PROP_IS_CONFIGURABLE);\n  }\n\n  prop_desc.is_value_defined = prop_desc_p->flags & (ECMA_PROP_IS_VALUE_DEFINED);\n\n  if (prop_desc.is_value_defined)\n  {\n    prop_desc.value = prop_desc_p->value;\n  }\n\n  if (prop_desc_p->flags & (ECMA_PROP_IS_WRITABLE_DEFINED))\n  {\n    prop_desc.is_writable_defined = true;\n    prop_desc.is_writable = prop_desc_p->flags & (ECMA_PROP_IS_WRITABLE);\n  }\n\n  if (prop_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED))\n  {\n    ecma_value_t getter = ecma_make_object_value (prop_desc_p->get_p);\n    prop_desc.is_get_defined = true;\n\n    if (ecma_op_is_callable (getter))\n    {\n      prop_desc.getter = getter;\n    }\n  }\n\n  if (prop_desc_p->flags & (ECMA_PROP_IS_SET_DEFINED))\n  {\n    ecma_value_t setter = ecma_make_object_value (prop_desc_p->set_p);\n    prop_desc.is_set_defined = true;\n    prop_desc.setter = setter;\n  }\n\n  return prop_desc;\n} /* jerry_property_descriptor_from_ecma */\n\n/**\n * Convert a jerry_property_descriptor_t to a ecma_property_descriptor_t\n *\n * if error occurs the property descriptor's value field is filled with ECMA_VALUE_ERROR\n *\n * @return  ecma_property_descriptor_t\n */\nstatic ecma_property_descriptor_t\njerry_property_descriptor_to_ecma (const jerry_property_descriptor_t *prop_desc_p) /**< input property_descriptor */\n{\n  ecma_property_descriptor_t prop_desc = ecma_make_empty_property_descriptor ();\n\n  uint32_t flags = ECMA_PROP_NO_OPTS;\n\n  if (prop_desc_p->is_enumerable_defined)\n  {\n    flags |= (uint32_t) (ECMA_PROP_IS_ENUMERABLE_DEFINED | (prop_desc_p->is_enumerable ? ECMA_PROP_IS_ENUMERABLE\n                                                                                       : ECMA_PROP_NO_OPTS));\n  }\n\n  if (prop_desc_p->is_configurable_defined)\n  {\n    flags |= (uint32_t) (ECMA_PROP_IS_CONFIGURABLE_DEFINED | (prop_desc_p->is_configurable ? ECMA_PROP_IS_CONFIGURABLE\n                                                                                           : ECMA_PROP_NO_OPTS));\n  }\n\n  /* Copy data property info. */\n  flags |= (prop_desc_p->is_value_defined ? ECMA_PROP_IS_VALUE_DEFINED : ECMA_PROP_NO_OPTS);\n\n  if (prop_desc_p->is_value_defined)\n  {\n    if (ecma_is_value_error_reference (prop_desc_p->value))\n    {\n      prop_desc.value = ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p));\n      return prop_desc;\n    }\n\n    prop_desc.value = prop_desc_p->value;\n  }\n\n  if (prop_desc_p->is_writable_defined)\n  {\n    flags |= (uint32_t) (ECMA_PROP_IS_WRITABLE_DEFINED | (prop_desc_p->is_writable ? ECMA_PROP_IS_WRITABLE\n                                                                                   : ECMA_PROP_NO_OPTS));\n  }\n\n  /* Copy accessor property info. */\n  if (prop_desc_p->is_get_defined)\n  {\n    ecma_value_t getter = prop_desc_p->getter;\n    flags |= ECMA_PROP_IS_GET_DEFINED;\n\n    if (ecma_is_value_error_reference (getter))\n    {\n      prop_desc.value = ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p));\n      return prop_desc;\n    }\n\n    if (ecma_op_is_callable (getter))\n    {\n      prop_desc.get_p = ecma_get_object_from_value (getter);\n    }\n    else if (!ecma_is_value_null (getter))\n    {\n      prop_desc.value = ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p));\n      return prop_desc;\n    }\n  }\n\n  if (prop_desc_p->is_set_defined)\n  {\n    ecma_value_t setter = prop_desc_p->setter;\n    flags |= ECMA_PROP_IS_SET_DEFINED;\n\n    if (ecma_is_value_error_reference (setter))\n    {\n      prop_desc.value = ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p));\n      return prop_desc;\n    }\n\n    if (ecma_op_is_callable (setter))\n    {\n      prop_desc.set_p = ecma_get_object_from_value (setter);\n    }\n    else if (!ecma_is_value_null (setter))\n    {\n      prop_desc.value = ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p));\n      return prop_desc;\n    }\n  }\n\n  prop_desc.flags |= (uint16_t) (flags | ECMA_PROP_IS_THROW);\n\n  return prop_desc;\n} /* jerry_property_descriptor_to_ecma */\n\n/**\n * Define a property to the specified object with the given name.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return true value - if the operation was successful\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_define_own_property (const jerry_value_t obj_val, /**< object value */\n                           const jerry_value_t prop_name_val, /**< property name (string value) */\n                           const jerry_property_descriptor_t *prop_desc_p) /**< property descriptor */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  if ((prop_desc_p->is_writable_defined || prop_desc_p->is_value_defined)\n      && (prop_desc_p->is_get_defined || prop_desc_p->is_set_defined))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_property_descriptor_t prop_desc = jerry_property_descriptor_to_ecma (prop_desc_p);\n\n  if (ECMA_IS_VALUE_ERROR (prop_desc.value))\n  {\n    return jerry_throw (prop_desc.value);\n  }\n  return jerry_return (ecma_op_object_define_own_property (ecma_get_object_from_value (obj_val),\n                                                           ecma_get_prop_name_from_value (prop_name_val),\n                                                           &prop_desc));\n} /* jerry_define_own_property */\n\n/**\n * Construct property descriptor from specified property.\n *\n * @return true - if success, the prop_desc_p fields contains the property info\n *         false - otherwise, the prop_desc_p is unchanged\n */\nbool\njerry_get_own_property_descriptor (const jerry_value_t  obj_val, /**< object value */\n                                   const jerry_value_t prop_name_val, /**< property name (string value) */\n                                   jerry_property_descriptor_t *prop_desc_p) /**< property descriptor */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || !ecma_is_value_prop_name (prop_name_val))\n  {\n    return false;\n  }\n\n  ecma_property_descriptor_t prop_desc;\n\n  ecma_value_t status = ecma_op_object_get_own_property_descriptor (ecma_get_object_from_value (obj_val),\n                                                                    ecma_get_prop_name_from_value (prop_name_val),\n                                                                    &prop_desc);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    // TODO: Due to Proxies the return value must be changed to jerry_value_t on next release\n    jcontext_release_exception ();\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (!ecma_is_value_true (status))\n  {\n    return false;\n  }\n\n  prop_desc_p->is_configurable_defined = true;\n  prop_desc_p->is_configurable = (prop_desc.flags & ECMA_PROP_IS_CONFIGURABLE) != 0;\n  prop_desc_p->is_enumerable_defined = true;\n  prop_desc_p->is_enumerable = (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE) != 0;\n\n  prop_desc_p->is_writable_defined = (prop_desc.flags & ECMA_PROP_IS_WRITABLE_DEFINED) != 0;\n  prop_desc_p->is_writable = prop_desc_p->is_writable_defined ? (prop_desc.flags & ECMA_PROP_IS_WRITABLE) != 0 : false;\n\n  prop_desc_p->is_value_defined = (prop_desc.flags & ECMA_PROP_IS_VALUE_DEFINED) != 0;\n  prop_desc_p->is_get_defined = (prop_desc.flags & ECMA_PROP_IS_GET_DEFINED) != 0;\n  prop_desc_p->is_set_defined = (prop_desc.flags & ECMA_PROP_IS_SET_DEFINED) != 0;\n\n  prop_desc_p->value = ECMA_VALUE_UNDEFINED;\n  prop_desc_p->getter = ECMA_VALUE_UNDEFINED;\n  prop_desc_p->setter = ECMA_VALUE_UNDEFINED;\n\n  if (prop_desc_p->is_value_defined)\n  {\n    prop_desc_p->value = prop_desc.value;\n  }\n\n  if (prop_desc_p->is_get_defined)\n  {\n    if (prop_desc.get_p != NULL)\n    {\n      prop_desc_p->getter = ecma_make_object_value (prop_desc.get_p);\n    }\n    else\n    {\n      prop_desc_p->getter = ECMA_VALUE_NULL;\n    }\n  }\n\n  if (prop_desc_p->is_set_defined)\n  {\n    if (prop_desc.set_p != NULL)\n    {\n      prop_desc_p->setter = ecma_make_object_value (prop_desc.set_p);\n    }\n    else\n    {\n      prop_desc_p->setter = ECMA_VALUE_NULL;\n    }\n  }\n\n  return true;\n} /* jerry_get_own_property_descriptor */\n\n/**\n * Free fields of property descriptor (setter, getter and value).\n */\nvoid\njerry_free_property_descriptor_fields (const jerry_property_descriptor_t *prop_desc_p) /**< property descriptor */\n{\n  if (prop_desc_p->is_value_defined)\n  {\n    jerry_release_value (prop_desc_p->value);\n  }\n\n  if (prop_desc_p->is_get_defined)\n  {\n    jerry_release_value (prop_desc_p->getter);\n  }\n\n  if (prop_desc_p->is_set_defined)\n  {\n    jerry_release_value (prop_desc_p->setter);\n  }\n} /* jerry_free_property_descriptor_fields */\n\n/**\n * Invoke function specified by a function value\n *\n * Note:\n *      - returned value must be freed with jerry_release_value, when it is no longer needed.\n *      - If function is invoked as constructor, it should support [[Construct]] method,\n *        otherwise, if function is simply called - it should support [[Call]] method.\n *\n * @return returned jerry value of the invoked function\n */\nstatic jerry_value_t\njerry_invoke_function (bool is_invoke_as_constructor, /**< true - invoke function as constructor\n                                                       *          (this_arg_p should be NULL, as it is ignored),\n                                                       *   false - perform function call */\n                       const jerry_value_t func_obj_val, /**< function object to call */\n                       const jerry_value_t this_val, /**< object value of 'this' binding */\n                       const jerry_value_t args_p[], /**< function's call arguments */\n                       const jerry_size_t args_count) /**< number of the arguments */\n{\n  JERRY_ASSERT (args_count == 0 || args_p != NULL);\n\n  if (ecma_is_value_error_reference (func_obj_val)\n      || ecma_is_value_error_reference (this_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  for (uint32_t i = 0; i < args_count; i++)\n  {\n    if (ecma_is_value_error_reference (args_p[i]))\n    {\n      return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n    }\n  }\n\n  if (is_invoke_as_constructor)\n  {\n    JERRY_ASSERT (jerry_value_is_constructor (func_obj_val));\n\n    return jerry_return (ecma_op_function_construct (ecma_get_object_from_value (func_obj_val),\n                                                     ecma_get_object_from_value (func_obj_val),\n                                                     args_p,\n                                                     args_count));\n  }\n  else\n  {\n    JERRY_ASSERT (jerry_value_is_function (func_obj_val));\n\n    return jerry_return (ecma_op_function_call (ecma_get_object_from_value (func_obj_val),\n                                                this_val,\n                                                args_p,\n                                                args_count));\n  }\n} /* jerry_invoke_function */\n\n/**\n * Call function specified by a function value\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *      error flag must not be set for any arguments of this function.\n *\n * @return returned jerry value of the called function\n */\njerry_value_t\njerry_call_function (const jerry_value_t func_obj_val, /**< function object to call */\n                     const jerry_value_t this_val, /**< object for 'this' binding */\n                     const jerry_value_t args_p[], /**< function's call arguments */\n                     jerry_size_t args_count) /**< number of the arguments */\n{\n  jerry_assert_api_available ();\n\n  if (jerry_value_is_function (func_obj_val) && !ecma_is_value_error_reference (this_val))\n  {\n    for (jerry_size_t i = 0; i < args_count; i++)\n    {\n      if (ecma_is_value_error_reference (args_p[i]))\n      {\n        return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n      }\n    }\n\n    return jerry_invoke_function (false, func_obj_val, this_val, args_p, args_count);\n  }\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n} /* jerry_call_function */\n\n/**\n * Construct object value invoking specified function value as a constructor\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *      error flag must not be set for any arguments of this function.\n *\n * @return returned jerry value of the invoked constructor\n */\njerry_value_t\njerry_construct_object (const jerry_value_t func_obj_val, /**< function object to call */\n                        const jerry_value_t args_p[], /**< function's call arguments\n                                                       *   (NULL if arguments number is zero) */\n                        jerry_size_t args_count) /**< number of the arguments */\n{\n  jerry_assert_api_available ();\n\n  if (jerry_value_is_constructor (func_obj_val))\n  {\n    for (jerry_size_t i = 0; i < args_count; i++)\n    {\n      if (ecma_is_value_error_reference (args_p[i]))\n      {\n        return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n      }\n    }\n\n    ecma_value_t this_val = ECMA_VALUE_UNDEFINED;\n    return jerry_invoke_function (true, func_obj_val, this_val, args_p, args_count);\n  }\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n} /* jerry_construct_object */\n\n/**\n * Get keys of the specified object value\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return array object value - if success\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_get_object_keys (const jerry_value_t obj_val) /**< object value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_collection_t *prop_names = ecma_op_object_get_enumerable_property_names (ecma_get_object_from_value (obj_val),\n                                                                                ECMA_ENUMERABLE_PROPERTY_KEYS);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (JERRY_UNLIKELY (prop_names == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return ecma_op_new_array_object_from_collection (prop_names, false);\n} /* jerry_get_object_keys */\n\n/**\n * Get the prototype of the specified object\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return prototype object or null value - if success\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_get_prototype (const jerry_value_t obj_val) /**< object value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_val);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    return jerry_return (ecma_proxy_object_get_prototype_of (obj_p));\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (obj_p->u2.prototype_cp == JMEM_CP_NULL)\n  {\n    return ECMA_VALUE_NULL;\n  }\n\n  ecma_object_t *proto_obj_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, obj_p->u2.prototype_cp);\n  ecma_ref_object (proto_obj_p);\n\n  return ecma_make_object_value (proto_obj_p);\n} /* jerry_get_prototype */\n\n/**\n * Set the prototype of the specified object\n *\n * @return true value - if success\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_set_prototype (const jerry_value_t obj_val, /**< object value */\n                     const jerry_value_t proto_obj_val) /**< prototype object value */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val)\n      || ecma_is_value_error_reference (proto_obj_val)\n      || (!ecma_is_value_object (proto_obj_val) && !ecma_is_value_null (proto_obj_val)))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_val);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    return jerry_return (ecma_proxy_object_set_prototype_of (obj_p, proto_obj_val));\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return ecma_op_ordinary_object_set_prototype_of (obj_p, proto_obj_val);\n} /* jerry_set_prototype */\n\n/**\n * Utility to check if a given object can be used for the foreach api calls.\n *\n * Some objects/classes uses extra internal objects to correctly store data.\n * These extre object should never be exposed externally to the API user.\n *\n * @returns true - if the user can access the object in the callback.\n *          false - if the object is an internal object which should no be accessed by the user.\n */\nstatic\nbool jerry_object_is_valid_foreach (ecma_object_t *object_p) /**< object to test */\n{\n  if (ecma_is_lexical_environment (object_p))\n  {\n    return false;\n  }\n\n  ecma_object_type_t object_type = ecma_get_object_type (object_p);\n\n  if (object_type == ECMA_OBJECT_TYPE_CLASS)\n  {\n    ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n    switch (ext_object_p->u.class_prop.class_id)\n    {\n      /* An object's internal property object should not be iterable by foreach. */\n      case LIT_INTERNAL_MAGIC_STRING_INTERNAL_OBJECT: return false;\n    }\n  }\n\n  return true;\n} /* jerry_object_is_valid_foreach */\n\n/**\n * Traverse objects.\n *\n * @return true - traversal was interrupted by the callback.\n *         false - otherwise - traversal visited all objects.\n */\nbool\njerry_objects_foreach (jerry_objects_foreach_t foreach_p, /**< function pointer of the iterator function */\n                       void *user_data_p) /**< pointer to user data */\n{\n  jerry_assert_api_available ();\n\n  JERRY_ASSERT (foreach_p != NULL);\n\n  jmem_cpointer_t iter_cp = JERRY_CONTEXT (ecma_gc_objects_cp);\n\n  while (iter_cp != JMEM_CP_NULL)\n  {\n    ecma_object_t *iter_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, iter_cp);\n\n    if (jerry_object_is_valid_foreach (iter_p)\n        && !foreach_p (ecma_make_object_value (iter_p), user_data_p))\n    {\n      return true;\n    }\n\n    iter_cp = iter_p->gc_next_cp;\n  }\n\n  return false;\n} /* jerry_objects_foreach */\n\n/**\n * Traverse objects having a given native type info.\n *\n * @return true - traversal was interrupted by the callback.\n *         false - otherwise - traversal visited all objects.\n */\nbool\njerry_objects_foreach_by_native_info (const jerry_object_native_info_t *native_info_p, /**< the type info\n                                                                                        *   of the native pointer */\n                                      jerry_objects_foreach_by_native_info_t foreach_p, /**< function to apply for\n                                                                                         *   each matching object */\n                                      void *user_data_p) /**< pointer to user data */\n{\n  jerry_assert_api_available ();\n\n  JERRY_ASSERT (native_info_p != NULL);\n  JERRY_ASSERT (foreach_p != NULL);\n\n  ecma_native_pointer_t *native_pointer_p;\n\n  jmem_cpointer_t iter_cp = JERRY_CONTEXT (ecma_gc_objects_cp);\n\n  while (iter_cp != JMEM_CP_NULL)\n  {\n    ecma_object_t *iter_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, iter_cp);\n\n    if (jerry_object_is_valid_foreach (iter_p))\n    {\n      native_pointer_p = ecma_get_native_pointer_value (iter_p, (void *) native_info_p);\n      if (native_pointer_p\n          && !foreach_p (ecma_make_object_value (iter_p), native_pointer_p->data_p, user_data_p))\n      {\n        return true;\n      }\n    }\n\n    iter_cp = iter_p->gc_next_cp;\n  }\n\n  return false;\n} /* jerry_objects_foreach_by_native_info */\n\n/**\n * Get native pointer and its type information, associated with the given native type info.\n *\n * Note:\n *  If native pointer is present, its type information is returned in out_native_pointer_p\n *\n * @return true - if there is an associated pointer,\n *         false - otherwise\n */\nbool\njerry_get_object_native_pointer (const jerry_value_t obj_val, /**< object to get native pointer from */\n                                 void **out_native_pointer_p, /**< [out] native pointer */\n                                 const jerry_object_native_info_t *native_info_p) /**< the type info\n                                                                                   *   of the native pointer */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val))\n  {\n    return false;\n  }\n\n  ecma_native_pointer_t *native_pointer_p;\n  native_pointer_p = ecma_get_native_pointer_value (ecma_get_object_from_value (obj_val), (void *) native_info_p);\n\n  if (native_pointer_p == NULL)\n  {\n    return false;\n  }\n\n  if (out_native_pointer_p != NULL)\n  {\n    *out_native_pointer_p = native_pointer_p->data_p;\n  }\n\n  return true;\n} /* jerry_get_object_native_pointer */\n\n/**\n * Set native pointer and an optional type info for the specified object.\n *\n *\n * Note:\n *      If native pointer was already set for the object, its value is updated.\n *\n * Note:\n *      If a non-NULL free callback is specified in the native type info,\n *      it will be called by the garbage collector when the object is freed.\n *      Referred values by this method must have at least 1 reference. (Correct API usage satisfies this condition)\n *      The type info always overwrites the previous value, so passing\n *      a NULL value deletes the current type info.\n */\nvoid\njerry_set_object_native_pointer (const jerry_value_t obj_val, /**< object to set native pointer in */\n                                 void *native_pointer_p, /**< native pointer */\n                                 const jerry_object_native_info_t *native_info_p) /**< object's native type info */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_object (obj_val))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (obj_val);\n\n    ecma_create_native_pointer_property (object_p, native_pointer_p, (void *) native_info_p);\n  }\n} /* jerry_set_object_native_pointer */\n\n/**\n * Delete the previously set native pointer by the native type info from the specified object.\n *\n * Note:\n *      If the specified object has no matching native pointer for the given native type info\n *      the function has no effect.\n *\n * Note:\n *      This operation cannot throw an exception.\n *\n * @return true - if the native pointer has been deleted succesfully\n *         false - otherwise\n */\nbool\njerry_delete_object_native_pointer (const jerry_value_t obj_val, /**< object to delete native pointer from */\n                                    const jerry_object_native_info_t *native_info_p) /**< object's native type info */\n{\n  jerry_assert_api_available ();\n\n  if (ecma_is_value_object (obj_val))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (obj_val);\n\n    return ecma_delete_native_pointer_property (object_p, (void *) native_info_p);\n  }\n\n  return false;\n} /* jerry_delete_object_native_pointer */\n\n/**\n * Applies the given function to the every property in the object.\n *\n * @return true - if object fields traversal was performed successfully, i.e.:\n *                - no unhandled exceptions were thrown in object fields traversal;\n *                - object fields traversal was stopped on callback that returned false;\n *         false - otherwise,\n *                 if getter of field threw a exception or unhandled exceptions were thrown during traversal;\n */\nbool\njerry_foreach_object_property (const jerry_value_t obj_val, /**< object value */\n                               jerry_object_property_foreach_t foreach_p, /**< foreach function */\n                               void *user_data_p) /**< user data for foreach function */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val))\n  {\n    return false;\n  }\n\n  ecma_object_t *object_p = ecma_get_object_from_value (obj_val);\n  ecma_collection_t *names_p = ecma_op_object_enumerate (object_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (names_p == NULL)\n  {\n    // TODO: Due to Proxies the return value must be changed to jerry_value_t on next release\n    jcontext_release_exception ();\n    return false;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_value_t *buffer_p = names_p->buffer_p;\n\n  ecma_value_t property_value = ECMA_VALUE_EMPTY;\n\n  bool continuous = true;\n\n  for (uint32_t i = 0; continuous && (i < names_p->item_count); i++)\n  {\n    ecma_string_t *property_name_p = ecma_get_string_from_value (buffer_p[i]);\n\n    property_value = ecma_op_object_get (object_p, property_name_p);\n\n    if (ECMA_IS_VALUE_ERROR (property_value))\n    {\n      break;\n    }\n\n    continuous = foreach_p (buffer_p[i], property_value, user_data_p);\n    ecma_free_value (property_value);\n  }\n\n  ecma_collection_free (names_p);\n\n  if (!ECMA_IS_VALUE_ERROR (property_value))\n  {\n    return true;\n  }\n\n  jcontext_release_exception ();\n  return false;\n} /* jerry_foreach_object_property */\n\n/**\n * Gets the property keys for the given object using the selected filters.\n *\n * @return array containing the filtered property keys in successful operation\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_object_get_property_names (const jerry_value_t obj_val, /**< object */\n                                 jerry_property_filter_t filter) /**< property filter options */\n{\n  jerry_assert_api_available ();\n\n  if (!ecma_is_value_object (obj_val))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_val);\n  ecma_object_t *obj_iter_p = obj_p;\n  ecma_collection_t *result_p = ecma_new_collection ();\n\n  ecma_ref_object (obj_iter_p);\n\n  while (true)\n  {\n    /* Step 1. Get Object.[[OwnKeys]] */\n    ecma_collection_t *prop_names_p = ecma_op_object_own_property_keys (obj_iter_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (prop_names_p == NULL)\n    {\n      ecma_deref_object (obj_iter_p);\n      return jerry_throw (ECMA_VALUE_ERROR);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    for (uint32_t i = 0; i < prop_names_p->item_count; i++)\n    {\n      ecma_value_t key = prop_names_p->buffer_p[i];\n      ecma_string_t *key_p = ecma_get_prop_name_from_value (key);\n      uint32_t index = ecma_string_get_array_index (key_p);\n\n      /* Step 2. Filter by key type */\n      if (filter & (JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS\n                    | JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS\n                    | JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES))\n      {\n        if (ecma_is_value_symbol (key))\n        {\n          if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS)\n          {\n            continue;\n          }\n        }\n        else if (index != ECMA_STRING_NOT_ARRAY_INDEX)\n        {\n          if ((filter & JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES)\n              || ((filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS)\n                  && !(filter & JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER)))\n          {\n            continue;\n          }\n        }\n        else if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS)\n        {\n          continue;\n        }\n      }\n\n      /* Step 3. Filter property attributes */\n      if (filter & (JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE\n                    | JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE\n                    | JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE))\n      {\n        ecma_property_descriptor_t prop_desc;\n        ecma_value_t status = ecma_op_object_get_own_property_descriptor (obj_iter_p, key_p, &prop_desc);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n        if (ECMA_IS_VALUE_ERROR (status))\n        {\n          ecma_collection_free (prop_names_p);\n          ecma_collection_free (result_p);\n          ecma_deref_object (obj_iter_p);\n          return jerry_throw (ECMA_VALUE_ERROR);\n        }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n        JERRY_ASSERT (ecma_is_value_true (status));\n        uint16_t flags = prop_desc.flags;\n        ecma_free_property_descriptor (&prop_desc);\n\n        if ((!(flags & ECMA_PROP_IS_CONFIGURABLE)\n             && (filter & JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE))\n            || (!(flags & ECMA_PROP_IS_ENUMERABLE)\n                && (filter & JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE))\n            || (!(flags & ECMA_PROP_IS_WRITABLE)\n                && (filter & JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE)))\n        {\n          continue;\n        }\n      }\n\n      if (index != ECMA_STRING_NOT_ARRAY_INDEX\n          && (filter & JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER))\n      {\n        ecma_deref_ecma_string (key_p);\n        key = ecma_make_uint32_value (index);\n      }\n      else\n      {\n        ecma_ref_ecma_string (key_p);\n      }\n\n      if ((filter & JERRY_PROPERTY_FILTER_TRAVERSE_PROTOTYPE_CHAIN) && obj_iter_p != obj_p)\n      {\n        uint32_t duplicate_idx = 0;\n        while (duplicate_idx < result_p->item_count)\n        {\n          ecma_value_t value = result_p->buffer_p[duplicate_idx];\n          JERRY_ASSERT (ecma_is_value_prop_name (value) || ecma_is_value_number (value));\n          if (JERRY_UNLIKELY (ecma_is_value_number (value)))\n          {\n            if (ecma_get_number_from_value (value) == ecma_get_number_from_value (key))\n            {\n              break;\n            }\n          }\n          else if (ecma_compare_ecma_strings (ecma_get_prop_name_from_value (value), key_p))\n          {\n            break;\n          }\n\n          duplicate_idx++;\n        }\n\n        if (duplicate_idx == result_p->item_count)\n        {\n          ecma_collection_push_back (result_p, key);\n        }\n      }\n      else\n      {\n        ecma_collection_push_back (result_p, key);\n      }\n    }\n\n    ecma_collection_free (prop_names_p);\n\n    /* Step 4: Traverse prototype chain */\n\n    if ((filter & JERRY_PROPERTY_FILTER_TRAVERSE_PROTOTYPE_CHAIN) != JERRY_PROPERTY_FILTER_TRAVERSE_PROTOTYPE_CHAIN)\n    {\n      break;\n    }\n\n    ecma_object_t *proto_p = ecma_op_object_get_prototype_of (obj_iter_p);\n\n    if (proto_p == NULL)\n    {\n      break;\n    }\n\n    ecma_deref_object (obj_iter_p);\n\n    if (JERRY_UNLIKELY (proto_p == ECMA_OBJECT_POINTER_ERROR))\n    {\n      ecma_collection_free (result_p);\n      return jerry_throw (ECMA_VALUE_ERROR);\n    }\n\n    obj_iter_p = proto_p;\n  }\n\n  ecma_deref_object (obj_iter_p);\n\n  return ecma_op_new_array_object_from_collection (result_p, false);\n} /* jerry_object_get_property_names */\n\n/**\n * FromPropertyDescriptor abstract operation.\n *\n * @return new jerry_value_t - if success\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_from_property_descriptor (const jerry_property_descriptor_t *src_prop_desc_p) /**< property descriptor */\n{\n  jerry_assert_api_available ();\n\n  ecma_property_descriptor_t prop_desc = jerry_property_descriptor_to_ecma (src_prop_desc_p);\n\n  if (ECMA_IS_VALUE_ERROR (prop_desc.value))\n  {\n    return jerry_throw (prop_desc.value);\n  }\n\n  ecma_object_t *desc_obj_p = ecma_op_from_property_descriptor (&prop_desc);\n\n  return ecma_make_object_value (desc_obj_p);\n} /* jerry_from_property_descriptor */\n\n/**\n * ToPropertyDescriptor abstract operation.\n *\n * @return true - if the conversion is successful\n *         thrown error - otherwise\n */\njerry_value_t\njerry_to_property_descriptor (jerry_value_t obj_value, /**< object value */\n                              jerry_property_descriptor_t *out_prop_desc_p) /**< [out] filled property descriptor\n                                                                             *   if return value is true,\n                                                                             *   unmodified otherwise */\n{\n  jerry_assert_api_available ();\n\n  ecma_property_descriptor_t prop_desc;\n  jerry_value_t result = ecma_op_to_property_descriptor (obj_value, &prop_desc);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return jerry_throw (result);\n  }\n\n  JERRY_ASSERT (result == ECMA_VALUE_EMPTY);\n\n  *out_prop_desc_p = jerry_property_descriptor_from_ecma (&prop_desc);\n  return ECMA_VALUE_TRUE;\n} /* jerry_to_property_descriptor */\n\n/**\n * Resolve or reject the promise with an argument.\n *\n * @return undefined value - if success\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_resolve_or_reject_promise (jerry_value_t promise, /**< the promise value */\n                                 jerry_value_t argument, /**< the argument */\n                                 bool is_resolve) /**< whether the promise should be resolved or rejected */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n  if (!ecma_is_value_object (promise) || !ecma_is_promise (ecma_get_object_from_value (promise)))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  if (ecma_is_value_error_reference (argument))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  ecma_promise_object_t *promise_p = (ecma_promise_object_t *) ecma_get_object_from_value (promise);\n  ecma_value_t function = is_resolve ? promise_p->resolve : promise_p->reject;\n\n  return ecma_op_function_call (ecma_get_object_from_value (function),\n                                ECMA_VALUE_UNDEFINED,\n                                &argument,\n                                1);\n#else /* !ENABLED (JERRY_BUILTIN_PROMISE) */\n  JERRY_UNUSED (promise);\n  JERRY_UNUSED (argument);\n  JERRY_UNUSED (is_resolve);\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Promise not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n} /* jerry_resolve_or_reject_promise */\n\n/**\n * Get the result of a promise.\n *\n * @return - Promise result\n *         - Type error if the promise support was not enabled or the input was not a promise object\n */\njerry_value_t\njerry_get_promise_result (const jerry_value_t promise) /**< promise object to get the result from */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n  if (!jerry_value_is_promise (promise))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  return ecma_promise_get_result (ecma_get_object_from_value (promise));\n#else /* !ENABLED (JERRY_BUILTIN_PROMISE) */\n  JERRY_UNUSED (promise);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Promise not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n} /* jerry_get_promise_result */\n\n/**\n * Get the state of a promise object.\n *\n * @return - the state of the promise (one of the jerry_promise_state_t enum values)\n *         - JERRY_PROMISE_STATE_NONE is only returned if the input is not a promise object\n *           or the promise support was not enabled.\n */\njerry_promise_state_t\njerry_get_promise_state (const jerry_value_t promise) /**< promise object to get the state from */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n  if (!jerry_value_is_promise (promise))\n  {\n    return JERRY_PROMISE_STATE_NONE;\n  }\n\n  uint16_t flags = ecma_promise_get_flags (ecma_get_object_from_value (promise));\n  flags &= (ECMA_PROMISE_IS_PENDING | ECMA_PROMISE_IS_FULFILLED);\n\n  return (flags ? flags : JERRY_PROMISE_STATE_REJECTED);\n#else /* !ENABLED (JERRY_BUILTIN_PROMISE) */\n  JERRY_UNUSED (promise);\n  return JERRY_PROMISE_STATE_NONE;\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n} /* jerry_get_promise_state */\n\n/**\n * Get the well-knwon symbol represented by the given `symbol` enum value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return undefined value - if invalid well-known symbol was requested\n *         well-known symbol value - otherwise\n */\njerry_value_t\njerry_get_well_known_symbol (jerry_well_known_symbol_t symbol) /**< jerry_well_known_symbol_t enum value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_ESNEXT)\n  lit_magic_string_id_t id = (lit_magic_string_id_t) (LIT_GLOBAL_SYMBOL__FIRST + symbol);\n\n  if (!LIT_IS_GLOBAL_SYMBOL (id))\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  return ecma_make_symbol_value (ecma_op_get_global_symbol (id));\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (symbol);\n\n  return ECMA_VALUE_UNDEFINED;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /** jerry_get_well_known_symbol */\n\n/**\n * Returns the description internal property of a symbol.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return string or undefined value containing the symbol's description - if success\n *         thrown error - otherwise\n */\njerry_value_t\njerry_get_symbol_description (const jerry_value_t symbol) /**< symbol value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_ESNEXT)\n  if (!ecma_is_value_symbol (symbol))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  /* Note: This operation cannot throw an error */\n  return ecma_copy_value (ecma_get_symbol_description (ecma_get_symbol_from_value (symbol)));\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (symbol);\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Symbol is not supported.\")));\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* jerry_get_symbol_description */\n\n/**\n * Call the SymbolDescriptiveString ecma builtin operation on the symbol value.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return string value containing the symbol's descriptive string - if success\n *         thrown error - otherwise\n */\njerry_value_t\njerry_get_symbol_descriptive_string (const jerry_value_t symbol) /**< symbol value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_ESNEXT)\n  if (!ecma_is_value_symbol (symbol))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  /* Note: This operation cannot throw an error */\n  return ecma_get_symbol_descriptive_string (symbol);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (symbol);\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Symbol is not supported.\")));\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /** jerry_get_symbol_descriptive_string */\n\n/**\n * Get the number of uint64 digits of a BigInt value\n *\n * @return number of uint64 digits\n */\nuint32_t\njerry_get_bigint_size_in_digits (jerry_value_t value) /**< BigInt value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (!ecma_is_value_bigint (value))\n  {\n    return 0;\n  }\n\n  return ecma_bigint_get_size_in_digits (value);\n#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  JERRY_UNUSED (value);\n  return 0;\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* jerry_get_bigint_size_in_digits */\n\n/**\n * Get the uint64 digits of a BigInt value (lowest digit first)\n */\nvoid\njerry_get_bigint_digits (jerry_value_t value, /**< BigInt value */\n                         uint64_t *digits_p, /**< [out] buffer for digits */\n                         uint32_t size, /**< buffer size in digits */\n                         bool *sign_p) /**< [out] sign of BigInt */\n{\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (!ecma_is_value_bigint (value))\n  {\n    if (sign_p != NULL)\n    {\n      *sign_p = false;\n    }\n    memset (digits_p, 0, size * sizeof (uint64_t));\n  }\n\n  ecma_bigint_get_digits_and_sign (value, digits_p, size, sign_p);\n#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  JERRY_UNUSED (value);\n\n  if (sign_p != NULL)\n  {\n    *sign_p = false;\n  }\n  memset (digits_p, 0, size * sizeof (uint64_t));\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* jerry_get_bigint_digits */\n\n/**\n * Get the target object of a Proxy object\n *\n * @return type error - if proxy_value is not a Proxy object\n *         target object - otherwise\n */\njerry_value_t\njerry_get_proxy_target (jerry_value_t proxy_value) /**< proxy value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ecma_is_value_object (proxy_value))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (proxy_value);\n\n    if (ECMA_OBJECT_IS_PROXY (object_p))\n    {\n      ecma_proxy_object_t *proxy_object_p = (ecma_proxy_object_t *) object_p;\n\n      if (!ecma_is_value_null (proxy_object_p->target))\n      {\n        ecma_ref_object (ecma_get_object_from_value (proxy_object_p->target));\n      }\n      return proxy_object_p->target;\n    }\n  }\n#else /* !ENABLED (JERRY_BUILTIN_PROXY) */\n  JERRY_UNUSED (proxy_value);\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Passed value is not a proxy object\")));\n} /* jerry_get_proxy_target */\n\n/**\n * Validate UTF-8 string\n *\n * @return true - if UTF-8 string is well-formed\n *         false - otherwise\n */\nbool\njerry_is_valid_utf8_string (const jerry_char_t *utf8_buf_p, /**< UTF-8 string */\n                            jerry_size_t buf_size) /**< string size */\n{\n  return lit_is_valid_utf8_string ((lit_utf8_byte_t *) utf8_buf_p,\n                                   (lit_utf8_size_t) buf_size);\n} /* jerry_is_valid_utf8_string */\n\n/**\n * Validate CESU-8 string\n *\n * @return true - if CESU-8 string is well-formed\n *         false - otherwise\n */\nbool\njerry_is_valid_cesu8_string (const jerry_char_t *cesu8_buf_p, /**< CESU-8 string */\n                             jerry_size_t buf_size) /**< string size */\n{\n  return lit_is_valid_cesu8_string ((lit_utf8_byte_t *) cesu8_buf_p,\n                                    (lit_utf8_size_t) buf_size);\n} /* jerry_is_valid_cesu8_string */\n\n/**\n * Allocate memory on the engine's heap.\n *\n * Note:\n *      This function may take away memory from the executed JavaScript code.\n *      If any other dynamic memory allocation API is available (e.g., libc\n *      malloc), it should be used instead.\n *\n * @return allocated memory on success\n *         NULL otherwise\n */\nvoid *\njerry_heap_alloc (size_t size) /**< size of the memory block */\n{\n  jerry_assert_api_available ();\n\n  return jmem_heap_alloc_block_null_on_error (size);\n} /* jerry_heap_alloc */\n\n/**\n * Free memory allocated on the engine's heap.\n */\nvoid\njerry_heap_free (void *mem_p, /**< value returned by jerry_heap_alloc */\n                 size_t size) /**< same size as passed to jerry_heap_alloc */\n{\n  jerry_assert_api_available ();\n\n  jmem_heap_free_block (mem_p, size);\n} /* jerry_heap_free */\n\n/**\n * Create an external engine context.\n *\n * @return the pointer to the context.\n */\njerry_context_t *\njerry_create_context (uint32_t heap_size, /**< the size of heap */\n                      jerry_context_alloc_t alloc, /**< the alloc function */\n                      void *cb_data_p) /**< the cb_data for alloc function */\n{\n  JERRY_UNUSED (heap_size);\n\n#if ENABLED (JERRY_EXTERNAL_CONTEXT)\n\n  size_t total_size = sizeof (jerry_context_t) + JMEM_ALIGNMENT;\n\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  heap_size = JERRY_ALIGNUP (heap_size, JMEM_ALIGNMENT);\n\n  /* Minimum heap size is 1Kbyte. */\n  if (heap_size < 1024)\n  {\n    return NULL;\n  }\n\n  total_size += heap_size;\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n\n  total_size = JERRY_ALIGNUP (total_size, JMEM_ALIGNMENT);\n\n  jerry_context_t *context_p = (jerry_context_t *) alloc (total_size, cb_data_p);\n\n  if (context_p == NULL)\n  {\n    return NULL;\n  }\n\n  memset (context_p, 0, total_size);\n\n  uintptr_t context_ptr = ((uintptr_t) context_p) + sizeof (jerry_context_t);\n  context_ptr = JERRY_ALIGNUP (context_ptr, (uintptr_t) JMEM_ALIGNMENT);\n\n  uint8_t *byte_p = (uint8_t *) context_ptr;\n\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  context_p->heap_p = (jmem_heap_t *) byte_p;\n  context_p->heap_size = heap_size;\n  byte_p += heap_size;\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n\n  JERRY_ASSERT (byte_p <= ((uint8_t *) context_p) + total_size);\n\n  JERRY_UNUSED (byte_p);\n  return context_p;\n\n#else /* !ENABLED (JERRY_EXTERNAL_CONTEXT) */\n\n  JERRY_UNUSED (alloc);\n  JERRY_UNUSED (cb_data_p);\n\n  return NULL;\n\n#endif /* ENABLED (JERRY_EXTERNAL_CONTEXT) */\n} /* jerry_create_context */\n\n/**\n * If JERRY_VM_EXEC_STOP is enabled the callback passed to this function is\n * periodically called with the user_p argument. If frequency is greater\n * than 1, the callback is only called at every frequency ticks.\n */\nvoid\njerry_set_vm_exec_stop_callback (jerry_vm_exec_stop_callback_t stop_cb, /**< periodically called user function */\n                                 void *user_p, /**< pointer passed to the function */\n                                 uint32_t frequency) /**< frequency of the function call */\n{\n#if ENABLED (JERRY_VM_EXEC_STOP)\n  if (frequency == 0)\n  {\n    frequency = 1;\n  }\n\n  JERRY_CONTEXT (vm_exec_stop_frequency) = frequency;\n  JERRY_CONTEXT (vm_exec_stop_counter) = frequency;\n  JERRY_CONTEXT (vm_exec_stop_user_p) = user_p;\n  JERRY_CONTEXT (vm_exec_stop_cb) = stop_cb;\n#else /* !ENABLED (JERRY_VM_EXEC_STOP) */\n  JERRY_UNUSED (stop_cb);\n  JERRY_UNUSED (user_p);\n  JERRY_UNUSED (frequency);\n#endif /* ENABLED (JERRY_VM_EXEC_STOP) */\n} /* jerry_set_vm_exec_stop_callback */\n\n/**\n * Get backtrace. The backtrace is an array of strings where\n * each string contains the position of the corresponding frame.\n * The array length is zero if the backtrace is not available.\n *\n * @return array value\n */\njerry_value_t\njerry_get_backtrace (uint32_t max_depth) /**< depth limit of the backtrace */\n{\n  return vm_get_backtrace (max_depth, NULL);\n} /* jerry_get_backtrace */\n\n/**\n * Get backtrace. The backtrace is an array of strings where\n * each string contains the position of the corresponding frame.\n * The array length is zero if the backtrace is not available.\n *\n * @return array value\n */\njerry_value_t\njerry_get_backtrace_from (uint32_t max_depth, /**< depth limit of the backtrace */\n                          jerry_value_t ignored_function) /**< collect backtrace after this function */\n{\n  ecma_object_t *ignored_function_p = NULL;\n\n  if (ecma_is_value_object (ignored_function))\n  {\n    ignored_function_p = ecma_get_object_from_value (ignored_function);\n\n    while (true)\n    {\n      ecma_object_type_t type = ecma_get_object_type (ignored_function_p);\n\n      if (type == ECMA_OBJECT_TYPE_FUNCTION || type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION)\n      {\n        break;\n      }\n\n      if (type == ECMA_OBJECT_TYPE_BOUND_FUNCTION)\n      {\n        ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) ignored_function_p;\n        jmem_cpointer_tag_t target_function = bound_func_p->header.u.bound_function.target_function;\n\n        ignored_function_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t, target_function);\n        continue;\n      }\n\n      ignored_function_p = NULL;\n      break;\n    }\n  }\n\n  return vm_get_backtrace (max_depth, ignored_function_p);\n} /* jerry_get_backtrace_from */\n\n/**\n * Get the resource name (usually a file name) of the currently executed script or the given function object\n *\n * Note: returned value must be freed with jerry_release_value, when it is no longer needed\n *\n * @return JS string constructed from\n *         - the currently executed function object's resource name, if the given value is undefined\n *         - resource name of the function object, if the given value is a function object\n *         - \"<anonymous>\", otherwise\n */\njerry_value_t\njerry_get_resource_name (const jerry_value_t value) /**< jerry api value */\n{\n#if ENABLED (JERRY_RESOURCE_NAME)\n  if (ecma_is_value_undefined (value))\n  {\n    if (JERRY_CONTEXT (vm_top_context_p) != NULL)\n    {\n      return ecma_copy_value (ecma_get_resource_name (JERRY_CONTEXT (vm_top_context_p)->shared_p->bytecode_header_p));\n    }\n  }\n  else if (ecma_is_value_object (value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (value);\n\n    if (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION\n        && !ecma_get_object_is_builtin (obj_p))\n    {\n      ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) obj_p;\n\n      const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);\n\n      return ecma_copy_value (ecma_get_resource_name (bytecode_data_p));\n    }\n  }\n#endif /* ENABLED (JERRY_RESOURCE_NAME) */\n\n  JERRY_UNUSED (value);\n  return ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);\n} /* jerry_get_resource_name */\n\n/**\n * Access the \"new.target\" value.\n *\n * The \"new.target\" value depends on the current call site. That is\n * this method will only have a function object result if, at the call site\n * it was called inside a constructor method invoked with \"new\".\n *\n * @return \"undefined\" - if at the call site it was not a constructor call.\n *         function object - if the current call site is in a constructor call.\n */\njerry_value_t\njerry_get_new_target (void)\n{\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *current_new_target_p = JERRY_CONTEXT (current_new_target_p);\n\n  if (current_new_target_p == NULL)\n  {\n    return jerry_create_undefined ();\n  }\n\n  ecma_ref_object (current_new_target_p);\n  return ecma_make_object_value (current_new_target_p);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  return jerry_create_undefined ();\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* jerry_get_new_target */\n\n/**\n * Replaces the currently active realm with another realm.\n *\n * The replacement should be temporary, and the original realm must be\n * restored after the tasks are completed. During the replacement, the\n * realm must be referenced by the application (i.e. the gc must not\n * reclaim it). This is also true to the returned previously active\n * realm, so there is no need to free the value after the restoration.\n *\n * @return previous realm value - if the passed value is a realm\n *         exception - otherwise\n */\njerry_value_t\njerry_set_realm (jerry_value_t realm_value) /**< jerry api value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  if (ecma_is_value_object (realm_value))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (realm_value);\n\n    if (ecma_get_object_is_builtin (object_p)\n        && ecma_builtin_is_global (object_p))\n    {\n      ecma_global_object_t *previous_global_object_p = JERRY_CONTEXT (global_object_p);\n      JERRY_CONTEXT (global_object_p) = (ecma_global_object_t *) object_p;\n      return ecma_make_object_value ((ecma_object_t *) previous_global_object_p);\n    }\n  }\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Passed argument is not a realm\")));\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  JERRY_UNUSED (realm_value);\n  return jerry_throw (ecma_raise_reference_error (ECMA_ERR_MSG (\"Realm is not available\")));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n} /* jerry_set_realm */\n\n/**\n * Gets the 'this' binding of a realm\n *\n * @return type error - if realm_value is not a realm\n *         this value - otherwise\n */\njerry_value_t\njerry_realm_get_this (jerry_value_t realm_value) /**< realm value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  if (ecma_is_value_object (realm_value))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (realm_value);\n\n    if (ecma_get_object_is_builtin (object_p)\n        && ecma_builtin_is_global (object_p))\n    {\n      ecma_global_object_t *global_object_p = (ecma_global_object_t *) object_p;\n\n      ecma_ref_object (ecma_get_object_from_value (global_object_p->this_binding));\n      return global_object_p->this_binding;\n    }\n  }\n\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  ecma_object_t *global_object_p = ecma_builtin_get_global ();\n\n  if (realm_value == ecma_make_object_value (global_object_p))\n  {\n    ecma_ref_object (global_object_p);\n    return realm_value;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Passed argument is not a realm\")));\n} /* jerry_realm_get_this */\n\n/**\n * Sets the 'this' binding of a realm\n *\n * This function must be called before executing any script on the realm.\n * Otherwise the operation is undefined.\n *\n * @return type error - if realm_value is not a realm or this_value is not object\n *         true - otherwise\n */\njerry_value_t\njerry_realm_set_this (jerry_value_t realm_value, /**< realm value */\n                      jerry_value_t this_value) /**< this value */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  if (!ecma_is_value_object (this_value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Second argument must be an object\")));\n  }\n\n  if (ecma_is_value_object (realm_value))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (realm_value);\n\n    if (ecma_get_object_is_builtin (object_p)\n        && ecma_builtin_is_global (object_p))\n    {\n      ecma_global_object_t *global_object_p = (ecma_global_object_t *) object_p;\n      global_object_p->this_binding = this_value;\n\n      ecma_object_t *global_lex_env_p = ecma_create_object_lex_env (NULL,\n                                                                    ecma_get_object_from_value (this_value),\n                                                                    ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n      ECMA_SET_NON_NULL_POINTER (global_object_p->global_env_cp, global_lex_env_p);\n#if ENABLED (JERRY_ESNEXT)\n      global_object_p->global_scope_cp = global_object_p->global_env_cp;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      ecma_deref_object (global_lex_env_p);\n      return ECMA_VALUE_TRUE;\n    }\n  }\n\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"First argument is not a realm\")));\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  JERRY_UNUSED (realm_value);\n  JERRY_UNUSED (this_value);\n  return jerry_throw (ecma_raise_reference_error (ECMA_ERR_MSG (\"Realm is not available\")));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n} /* jerry_realm_set_this */\n\n/**\n * Check if the given value is an ArrayBuffer object.\n *\n * @return true - if it is an ArrayBuffer object\n *         false - otherwise\n */\nbool\njerry_value_is_arraybuffer (const jerry_value_t value) /**< value to check if it is an ArrayBuffer */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  return ecma_is_arraybuffer (value);\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n  return false;\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_value_is_arraybuffer */\n\n/**\n * Creates an ArrayBuffer object with the given length (size).\n *\n * Notes:\n *      * the length is specified in bytes.\n *      * returned value must be freed with jerry_release_value, when it is no longer needed.\n *      * if the typed arrays are disabled this will return a TypeError.\n *\n * @return value of the constructed ArrayBuffer object\n */\njerry_value_t\njerry_create_arraybuffer (const jerry_length_t size) /**< size of the ArrayBuffer to create */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  return jerry_return (ecma_make_object_value (ecma_arraybuffer_new_object (size)));\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (size);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_create_arraybuffer */\n\n/**\n * Creates an ArrayBuffer object with user specified buffer.\n *\n * Notes:\n *     * the size is specified in bytes.\n *     * the buffer passed should be at least the specified bytes big.\n *     * if the typed arrays are disabled this will return a TypeError.\n *     * if the size is zero or buffer_p is a null pointer this will return an empty ArrayBuffer.\n *\n * @return value of the construced ArrayBuffer object\n */\njerry_value_t\njerry_create_arraybuffer_external (const jerry_length_t size, /**< size of the buffer to used */\n                                   uint8_t *buffer_p, /**< buffer to use as the ArrayBuffer's backing */\n                                   jerry_object_native_free_callback_t free_cb) /**< buffer free callback */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  ecma_object_t *arraybuffer;\n\n  if (JERRY_UNLIKELY (size == 0 || buffer_p == NULL))\n  {\n    arraybuffer = ecma_arraybuffer_new_object (0);\n  }\n  else\n  {\n    arraybuffer = ecma_arraybuffer_new_object_external (size,\n                                                        buffer_p,\n                                                        (ecma_object_native_free_callback_t) free_cb);\n  }\n\n  return jerry_return (ecma_make_object_value (arraybuffer));\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (size);\n  JERRY_UNUSED (buffer_p);\n  JERRY_UNUSED (free_cb);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_create_arraybuffer_external */\n\n/**\n * Copy bytes into the ArrayBuffer from a buffer.\n *\n * Note:\n *     * if the object passed is not an ArrayBuffer will return 0.\n *\n * @return number of bytes copied into the ArrayBuffer.\n */\njerry_length_t\njerry_arraybuffer_write (const jerry_value_t value, /**< target ArrayBuffer */\n                         jerry_length_t offset, /**< start offset of the ArrayBuffer */\n                         const uint8_t *buf_p, /**< buffer to copy from */\n                         jerry_length_t buf_size) /**< number of bytes to copy from the buffer */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (!ecma_is_arraybuffer (value))\n  {\n    return 0;\n  }\n\n  ecma_object_t *buffer_p = ecma_get_object_from_value (value);\n  jerry_length_t length = ecma_arraybuffer_get_length (buffer_p);\n\n  if (offset >= length)\n  {\n    return 0;\n  }\n\n  jerry_length_t copy_count = JERRY_MIN (length - offset, buf_size);\n\n  if (copy_count > 0)\n  {\n    lit_utf8_byte_t *mem_buffer_p = ecma_arraybuffer_get_buffer (buffer_p);\n\n    memcpy ((void *) (mem_buffer_p + offset), (void *) buf_p, copy_count);\n  }\n\n  return copy_count;\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n  JERRY_UNUSED (offset);\n  JERRY_UNUSED (buf_p);\n  JERRY_UNUSED (buf_size);\n  return 0;\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_arraybuffer_write */\n\n/**\n * Copy bytes from a buffer into an ArrayBuffer.\n *\n * Note:\n *     * if the object passed is not an ArrayBuffer will return 0.\n *\n * @return number of bytes read from the ArrayBuffer.\n */\njerry_length_t\njerry_arraybuffer_read (const jerry_value_t value, /**< ArrayBuffer to read from */\n                        jerry_length_t offset, /**< start offset of the ArrayBuffer */\n                        uint8_t *buf_p, /**< destination buffer to copy to */\n                        jerry_length_t buf_size) /**< number of bytes to copy into the buffer */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (!ecma_is_arraybuffer (value))\n  {\n    return 0;\n  }\n\n  ecma_object_t *buffer_p = ecma_get_object_from_value (value);\n  jerry_length_t length = ecma_arraybuffer_get_length (buffer_p);\n\n  if (offset >= length)\n  {\n    return 0;\n  }\n\n  jerry_length_t copy_count = JERRY_MIN (length - offset, buf_size);\n\n  if (copy_count > 0)\n  {\n    lit_utf8_byte_t *mem_buffer_p = ecma_arraybuffer_get_buffer (buffer_p);\n\n    memcpy ((void *) buf_p, (void *) (mem_buffer_p + offset), copy_count);\n  }\n\n  return copy_count;\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n  JERRY_UNUSED (offset);\n  JERRY_UNUSED (buf_p);\n  JERRY_UNUSED (buf_size);\n  return 0;\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_arraybuffer_read */\n\n/**\n * Get the length (size) of the ArrayBuffer in bytes.\n *\n * Note:\n *     This is the 'byteLength' property of an ArrayBuffer.\n *\n * @return the length of the ArrayBuffer in bytes.\n */\njerry_length_t\njerry_get_arraybuffer_byte_length (const jerry_value_t value) /**< ArrayBuffer */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (ecma_is_arraybuffer (value))\n  {\n    ecma_object_t *buffer_p = ecma_get_object_from_value (value);\n    return ecma_arraybuffer_get_length (buffer_p);\n  }\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  return 0;\n} /* jerry_get_arraybuffer_byte_length */\n\n/**\n * Get a pointer for the start of the ArrayBuffer.\n *\n * Note:\n *    * This is a high-risk operation as the bounds are not checked\n *      when accessing the pointer elements.\n *\n * @return pointer to the back-buffer of the ArrayBuffer.\n *         pointer is NULL if:\n *            - the parameter is not an ArrayBuffer\n *            - an external ArrayBuffer has been detached\n */\nuint8_t *\njerry_get_arraybuffer_pointer (const jerry_value_t array_buffer) /**< Array Buffer to use */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (ecma_is_value_error_reference (array_buffer)\n      || !ecma_is_arraybuffer (array_buffer))\n  {\n    return NULL;\n  }\n\n  ecma_object_t *buffer_p = ecma_get_object_from_value (array_buffer);\n  lit_utf8_byte_t *mem_buffer_p = ecma_arraybuffer_get_buffer (buffer_p);\n  return (uint8_t *const) mem_buffer_p;\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (array_buffer);\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n  return NULL;\n} /* jerry_get_arraybuffer_pointer */\n\n/**\n * Get if the ArrayBuffer is detachable.\n *\n * @return boolean value - if success\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_is_arraybuffer_detachable (const jerry_value_t value) /**< ArrayBuffer */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (ecma_is_arraybuffer (value))\n  {\n    ecma_object_t *buffer_p = ecma_get_object_from_value (value);\n    return ecma_arraybuffer_is_detached (buffer_p) ? ECMA_VALUE_FALSE : ECMA_VALUE_TRUE;\n  }\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Expected an ArrayBuffer\")));\n} /* jerry_is_arraybuffer_detachable */\n\n/**\n * Detach the underlying data block from ArrayBuffer and set its bytelength to 0.\n *\n * Note: If the ArrayBuffer has been created with `jerry_create_arraybuffer_external`\n *       the optional free callback is called on a successful detach operation\n *\n * @return null value - if success\n *         value marked with error flag - otherwise\n */\njerry_value_t\njerry_detach_arraybuffer (const jerry_value_t value) /**< ArrayBuffer */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (ecma_is_arraybuffer (value))\n  {\n    ecma_object_t *buffer_p = ecma_get_object_from_value (value);\n    if (ecma_arraybuffer_detach (buffer_p))\n    {\n      return ECMA_VALUE_NULL;\n    }\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has already been detached.\")));\n  }\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Expected an ArrayBuffer\")));\n} /* jerry_detach_arraybuffer */\n\n/**\n * DataView related functions\n */\n\n/**\n * Creates a DataView object with the given ArrayBuffer, ByteOffset and ByteLength arguments.\n *\n * Notes:\n *      * returned value must be freed with jerry_release_value, when it is no longer needed.\n *      * if the DataView bulitin is disabled this will return a TypeError.\n *\n * @return value of the constructed DataView object - if success\n *         created error - otherwise\n */\njerry_value_t\njerry_create_dataview (const jerry_value_t array_buffer, /**< arraybuffer to create DataView from */\n                       const jerry_length_t byte_offset, /**< offset in bytes, to the first byte in the buffer */\n                       const jerry_length_t byte_length) /**< number of elements in the byte array */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n  if (ecma_is_value_error_reference (array_buffer))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_value_t arguments_p[3] =\n  {\n    array_buffer,\n    ecma_make_uint32_value (byte_offset),\n    ecma_make_uint32_value (byte_length)\n  };\n  ecma_object_t *old_new_target_p = JERRY_CONTEXT (current_new_target_p);\n  if (old_new_target_p == NULL)\n  {\n    JERRY_CONTEXT (current_new_target_p) = ecma_builtin_get (ECMA_BUILTIN_ID_DATAVIEW);\n  }\n\n  ecma_value_t dataview_value = ecma_op_dataview_create (arguments_p, 3);\n  JERRY_CONTEXT (current_new_target_p) = old_new_target_p;\n  return jerry_return (dataview_value);\n#else /* !ENABLED (JERRY_BUILTIN_DATAVIEW) */\n  JERRY_UNUSED (array_buffer);\n  JERRY_UNUSED (byte_offset);\n  JERRY_UNUSED (byte_length);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"DataView is not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n} /* jerry_create_dataview */\n\n/**\n * Check if the given value is a DataView object.\n *\n * @return true - if it is a DataView object\n *         false - otherwise\n */\nbool\njerry_value_is_dataview (const jerry_value_t value) /**< value to check if it is a DataView object */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n  return ecma_is_dataview (value);\n#else /* !ENABLED (JERRY_BUILTIN_DATAVIEW) */\n  JERRY_UNUSED (value);\n  return false;\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n} /* jerry_value_is_dataview */\n\n/**\n * Get the underlying ArrayBuffer from a DataView.\n *\n * Additionally the byteLength and byteOffset properties are also returned\n * which were specified when the DataView was created.\n *\n * Note:\n *     the returned value must be freed with a jerry_release_value call\n *\n * @return ArrayBuffer of a DataView\n *         TypeError if the object is not a DataView.\n */\njerry_value_t\njerry_get_dataview_buffer (const jerry_value_t value, /**< DataView to get the arraybuffer from */\n                           jerry_length_t *byte_offset, /**< [out] byteOffset property */\n                           jerry_length_t *byte_length) /**< [out] byteLength property */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n  if (ecma_is_value_error_reference (value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (wrong_args_msg_p)));\n  }\n\n  ecma_dataview_object_t *dataview_p = ecma_op_dataview_get_object (value);\n\n  if (JERRY_UNLIKELY (dataview_p == NULL))\n  {\n    return ecma_create_error_reference_from_context ();\n  }\n\n  if (byte_offset != NULL)\n  {\n    *byte_offset = dataview_p->byte_offset;\n  }\n\n  if (byte_length != NULL)\n  {\n    *byte_length = dataview_p->header.u.class_prop.u.length;\n  }\n\n  ecma_object_t *arraybuffer_p = dataview_p->buffer_p;\n  ecma_ref_object (arraybuffer_p);\n\n  return ecma_make_object_value (arraybuffer_p);\n#else /* !ENABLED (JERRY_BUILTIN_DATAVIEW) */\n  JERRY_UNUSED (value);\n  JERRY_UNUSED (byte_offset);\n  JERRY_UNUSED (byte_length);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"DataView is not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n} /* jerry_get_dataview_buffer */\n\n/**\n * TypedArray related functions\n */\n\n/**\n * Check if the given value is a TypedArray object.\n *\n * @return true - if it is a TypedArray object\n *         false - otherwise\n */\nbool\njerry_value_is_typedarray (jerry_value_t value) /**< value to check if it is a TypedArray */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  return ecma_is_typedarray (value);\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n  return false;\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_value_is_typedarray */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n/**\n * TypedArray mapping type\n */\ntypedef struct\n{\n  jerry_typedarray_type_t api_type; /**< api type */\n  ecma_builtin_id_t prototype_id; /**< prototype ID */\n  ecma_typedarray_type_t id; /**< typedArray ID */\n  uint8_t element_size_shift; /**< element size shift */\n} jerry_typedarray_mapping_t;\n\n/**\n * List of TypedArray mappings\n */\nstatic jerry_typedarray_mapping_t jerry_typedarray_mappings[] =\n{\n#define TYPEDARRAY_ENTRY(NAME, LIT_NAME, SIZE_SHIFT) \\\n  { JERRY_TYPEDARRAY_ ## NAME, ECMA_BUILTIN_ID_ ## NAME ## ARRAY_PROTOTYPE, \\\n    ECMA_ ## LIT_NAME ## _ARRAY, SIZE_SHIFT }\n\n  TYPEDARRAY_ENTRY (UINT8, UINT8, 0),\n  TYPEDARRAY_ENTRY (UINT8CLAMPED, UINT8_CLAMPED, 0),\n  TYPEDARRAY_ENTRY (INT8, INT8, 0),\n  TYPEDARRAY_ENTRY (UINT16, UINT16, 1),\n  TYPEDARRAY_ENTRY (INT16, INT16, 1),\n  TYPEDARRAY_ENTRY (UINT32, UINT32, 2),\n  TYPEDARRAY_ENTRY (INT32, INT32, 2),\n  TYPEDARRAY_ENTRY (FLOAT32, FLOAT32, 2),\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  TYPEDARRAY_ENTRY (FLOAT64, FLOAT64, 3),\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  TYPEDARRAY_ENTRY (BIGINT64, BIGINT64, 3),\n  TYPEDARRAY_ENTRY (BIGUINT64, BIGUINT64, 3),\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#undef TYPEDARRAY_ENTRY\n};\n\n/**\n * Helper function to get the TypedArray prototype, typedArray id, and element size shift\n * information.\n *\n * @return true - if the TypedArray information was found\n *         false - if there is no such TypedArray type\n */\nstatic bool\njerry_typedarray_find_by_type (jerry_typedarray_type_t type_name, /**< type of the TypedArray */\n                               ecma_builtin_id_t *prototype_id, /**< [out] found prototype object id */\n                               ecma_typedarray_type_t *id, /**< [out] found typedArray id */\n                               uint8_t *element_size_shift) /**< [out] found element size shift value */\n{\n  JERRY_ASSERT (prototype_id != NULL);\n  JERRY_ASSERT (id != NULL);\n  JERRY_ASSERT (element_size_shift != NULL);\n\n  for (uint32_t i = 0; i < sizeof (jerry_typedarray_mappings) / sizeof (jerry_typedarray_mappings[0]); i++)\n  {\n    if (type_name == jerry_typedarray_mappings[i].api_type)\n    {\n      *prototype_id = jerry_typedarray_mappings[i].prototype_id;\n      *id = jerry_typedarray_mappings[i].id;\n      *element_size_shift = jerry_typedarray_mappings[i].element_size_shift;\n      return true;\n    }\n  }\n\n  return false;\n} /* jerry_typedarray_find_by_type */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n/**\n * Create a TypedArray object with a given type and length.\n *\n * Notes:\n *      * returns TypeError if an incorrect type (type_name) is specified.\n *      * byteOffset property will be set to 0.\n *      * byteLength property will be a multiple of the length parameter (based on the type).\n *\n * @return - new TypedArray object\n */\njerry_value_t\njerry_create_typedarray (jerry_typedarray_type_t type_name, /**< type of TypedArray to create */\n                         jerry_length_t length) /**< element count of the new TypedArray */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  ecma_builtin_id_t prototype_id = 0;\n  ecma_typedarray_type_t id = 0;\n  uint8_t element_size_shift = 0;\n\n  if (!jerry_typedarray_find_by_type (type_name, &prototype_id, &id, &element_size_shift))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"incorrect type for TypedArray.\")));\n  }\n\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (prototype_id);\n\n  ecma_value_t array_value = ecma_typedarray_create_object_with_length (length,\n                                                                        NULL,\n                                                                        prototype_obj_p,\n                                                                        element_size_shift,\n                                                                        id);\n\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (array_value));\n\n  return array_value;\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (type_name);\n  JERRY_UNUSED (length);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"TypedArray not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_create_typedarray */\n\n/**\n * Create a TypedArray object using the given arraybuffer and size information.\n *\n * Notes:\n *      * returns TypeError if an incorrect type (type_name) is specified.\n *      * this is the 'new %TypedArray%(arraybuffer, byteOffset, length)' equivalent call.\n *\n * @return - new TypedArray object\n */\njerry_value_t\njerry_create_typedarray_for_arraybuffer_sz (jerry_typedarray_type_t type_name, /**< type of TypedArray to create */\n                                            const jerry_value_t arraybuffer, /**< ArrayBuffer to use */\n                                            jerry_length_t byte_offset, /**< offset for the ArrayBuffer */\n                                            jerry_length_t length) /**< number of elements to use from ArrayBuffer */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (ecma_is_value_error_reference (arraybuffer))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  ecma_builtin_id_t prototype_id = 0;\n  ecma_typedarray_type_t id = 0;\n  uint8_t element_size_shift = 0;\n\n  if (!jerry_typedarray_find_by_type (type_name, &prototype_id, &id, &element_size_shift))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"incorrect type for TypedArray.\")));\n  }\n\n  if (!ecma_is_arraybuffer (arraybuffer))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not an ArrayBuffer\")));\n  }\n\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (prototype_id);\n  ecma_value_t arguments_p[3] =\n  {\n    arraybuffer,\n    ecma_make_uint32_value (byte_offset),\n    ecma_make_uint32_value (length)\n  };\n\n  ecma_value_t array_value = ecma_op_create_typedarray (arguments_p, 3, prototype_obj_p, element_size_shift, id);\n  ecma_free_value (arguments_p[1]);\n  ecma_free_value (arguments_p[2]);\n\n  return jerry_return (array_value);\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (type_name);\n  JERRY_UNUSED (arraybuffer);\n  JERRY_UNUSED (byte_offset);\n  JERRY_UNUSED (length);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"TypedArray not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_create_typedarray_for_arraybuffer_sz */\n\n/**\n * Create a TypedArray object using the given arraybuffer and size information.\n *\n * Notes:\n *      * returns TypeError if an incorrect type (type_name) is specified.\n *      * this is the 'new %TypedArray%(arraybuffer)' equivalent call.\n *\n * @return - new TypedArray object\n */\njerry_value_t\njerry_create_typedarray_for_arraybuffer (jerry_typedarray_type_t type_name, /**< type of TypedArray to create */\n                                         const jerry_value_t arraybuffer) /**< ArrayBuffer to use */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (ecma_is_value_error_reference (arraybuffer))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  jerry_length_t byteLength = jerry_get_arraybuffer_byte_length (arraybuffer);\n  return jerry_create_typedarray_for_arraybuffer_sz (type_name, arraybuffer, 0, byteLength);\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (type_name);\n  JERRY_UNUSED (arraybuffer);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"TypedArray not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_create_typedarray_for_arraybuffer */\n\n/**\n * Get the type of the TypedArray.\n *\n * @return - type of the TypedArray\n *         - JERRY_TYPEDARRAY_INVALID if the argument is not a TypedArray\n */\njerry_typedarray_type_t\njerry_get_typedarray_type (jerry_value_t value) /**< object to get the TypedArray type */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (!ecma_is_typedarray (value))\n  {\n    return JERRY_TYPEDARRAY_INVALID;\n  }\n\n  ecma_object_t *array_p = ecma_get_object_from_value (value);\n  ecma_typedarray_type_t class_type = ecma_get_typedarray_id (array_p);\n\n  for (uint32_t i = 0; i < sizeof (jerry_typedarray_mappings) / sizeof (jerry_typedarray_mappings[0]); i++)\n  {\n    if (class_type == jerry_typedarray_mappings[i].id)\n    {\n      return jerry_typedarray_mappings[i].api_type;\n    }\n  }\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n  return JERRY_TYPEDARRAY_INVALID;\n} /* jerry_get_typedarray_type */\n\n/**\n * Get the element count of the TypedArray.\n *\n * @return length of the TypedArray.\n */\njerry_length_t\njerry_get_typedarray_length (jerry_value_t value) /**< TypedArray to query */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (ecma_is_typedarray (value))\n  {\n    ecma_object_t *array_p = ecma_get_object_from_value (value);\n    return ecma_typedarray_get_length (array_p);\n  }\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n  return 0;\n} /* jerry_get_typedarray_length */\n\n/**\n * Get the underlying ArrayBuffer from a TypedArray.\n *\n * Additionally the byteLength and byteOffset properties are also returned\n * which were specified when the TypedArray was created.\n *\n * Note:\n *     the returned value must be freed with a jerry_release_value call\n *\n * @return ArrayBuffer of a TypedArray\n *         TypeError if the object is not a TypedArray.\n */\njerry_value_t\njerry_get_typedarray_buffer (jerry_value_t value, /**< TypedArray to get the arraybuffer from */\n                             jerry_length_t *byte_offset, /**< [out] byteOffset property */\n                             jerry_length_t *byte_length) /**< [out] byteLength property */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n  if (!ecma_is_typedarray (value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Object is not a TypedArray.\")));\n  }\n\n  ecma_object_t *array_p = ecma_get_object_from_value (value);\n  uint8_t shift = ecma_typedarray_get_element_size_shift (array_p);\n\n  if (byte_length != NULL)\n  {\n    *byte_length = (jerry_length_t) (ecma_typedarray_get_length (array_p) << shift);\n  }\n\n  if (byte_offset != NULL)\n  {\n    *byte_offset = (jerry_length_t) ecma_typedarray_get_offset (array_p);\n  }\n\n  ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (array_p);\n  ecma_ref_object (arraybuffer_p);\n  return jerry_return (ecma_make_object_value (arraybuffer_p));\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n  JERRY_UNUSED (value);\n  JERRY_UNUSED (byte_length);\n  JERRY_UNUSED (byte_offset);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"TypedArray is not supported.\")));\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n} /* jerry_get_typedarray_buffer */\n\n/**\n * Parse the given JSON string to create a jerry_value_t.\n *\n * The behaviour is equivalent with the \"JSON.parse(string)\" JS call.\n *\n * Note:\n *      The returned value must be freed with jerry_release_value.\n *\n * @return - jerry_value_t containing a JavaScript value.\n *         - Error value if there was problems during the parse.\n */\njerry_value_t\njerry_json_parse (const jerry_char_t *string_p, /**< json string */\n                  jerry_size_t string_size) /**< json string size */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_JSON)\n  ecma_value_t ret_value = ecma_builtin_json_parse_buffer (string_p, string_size);\n\n  if (ecma_is_value_undefined (ret_value))\n  {\n    ret_value = jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (\"JSON string parse error.\")));\n  }\n\n  return jerry_return (ret_value);\n#else /* !ENABLED (JERRY_BUILTIN_JSON) */\n  JERRY_UNUSED (string_p);\n  JERRY_UNUSED (string_size);\n\n  return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (\"The JSON has been disabled.\")));\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n} /* jerry_json_parse */\n\n/**\n * Create a JSON string from a JavaScript value.\n *\n * The behaviour is equivalent with the \"JSON.stringify(input_value)\" JS call.\n *\n * Note:\n *      The returned value must be freed with jerry_release_value,\n *\n * @return - jerry_value_t containing a JSON string.\n *         - Error value if there was a problem during the stringification.\n */\njerry_value_t\njerry_json_stringify (const jerry_value_t input_value) /**< a value to stringify */\n{\n  jerry_assert_api_available ();\n#if ENABLED (JERRY_BUILTIN_JSON)\n  if (ecma_is_value_error_reference (input_value))\n  {\n    return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n  }\n\n  ecma_value_t ret_value = ecma_builtin_json_stringify_no_opts (input_value);\n\n  if (ecma_is_value_undefined (ret_value))\n  {\n    ret_value = jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (\"JSON stringify error.\")));\n  }\n\n  return jerry_return (ret_value);\n#else /* ENABLED (JERRY_BUILTIN_JSON) */\n  JERRY_UNUSED (input_value);\n\n  return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (\"The JSON has been disabled.\")));\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n} /* jerry_json_stringify */\n\n/**\n * Create a container type specified in jerry_container_type_t.\n * The container can be created with a list of arguments, which will be passed to the container constructor to be\n * inserted to the container.\n *\n * Note:\n *      The returned value must be freed with jerry_release_value\n * @return jerry_value_t representing a container with the given type.\n */\njerry_value_t\njerry_create_container (jerry_container_type_t container_type, /**< Type of the container */\n                        const jerry_value_t *arguments_list_p, /**< arguments list */\n                        jerry_length_t arguments_list_len) /**< Length of arguments list */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_CONTAINER)\n  for (jerry_length_t i = 0; i < arguments_list_len; i++)\n  {\n    if (ecma_is_value_error_reference (arguments_list_p[i]))\n    {\n      return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_value_msg_p)));\n    }\n  }\n\n  lit_magic_string_id_t lit_id;\n  ecma_builtin_id_t proto_id;\n  ecma_builtin_id_t ctor_id;\n\n  switch (container_type)\n  {\n#if ENABLED (JERRY_BUILTIN_MAP)\n    case JERRY_CONTAINER_TYPE_MAP:\n    {\n      lit_id = LIT_MAGIC_STRING_MAP_UL;\n      proto_id = ECMA_BUILTIN_ID_MAP_PROTOTYPE;\n      ctor_id = ECMA_BUILTIN_ID_MAP;\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n#if ENABLED (JERRY_BUILTIN_SET)\n    case JERRY_CONTAINER_TYPE_SET:\n    {\n      lit_id = LIT_MAGIC_STRING_SET_UL;\n      proto_id = ECMA_BUILTIN_ID_SET_PROTOTYPE;\n      ctor_id = ECMA_BUILTIN_ID_SET;\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n    case JERRY_CONTAINER_TYPE_WEAKMAP:\n    {\n      lit_id = LIT_MAGIC_STRING_WEAKMAP_UL;\n      proto_id = ECMA_BUILTIN_ID_WEAKMAP_PROTOTYPE;\n      ctor_id = ECMA_BUILTIN_ID_WEAKMAP;\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n    case JERRY_CONTAINER_TYPE_WEAKSET:\n    {\n      lit_id = LIT_MAGIC_STRING_WEAKSET_UL;\n      proto_id = ECMA_BUILTIN_ID_WEAKSET_PROTOTYPE;\n      ctor_id = ECMA_BUILTIN_ID_WEAKSET;\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n    default:\n    {\n      return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid container type.\")));\n    }\n  }\n  ecma_object_t * old_new_target_p = JERRY_CONTEXT (current_new_target_p);\n\n  if (old_new_target_p == NULL)\n  {\n    JERRY_CONTEXT (current_new_target_p) = ecma_builtin_get (ctor_id);\n  }\n\n  ecma_value_t container_value = ecma_op_container_create (arguments_list_p,\n                                                           arguments_list_len,\n                                                           lit_id,\n                                                           proto_id);\n\n  JERRY_CONTEXT (current_new_target_p) = old_new_target_p;\n  return container_value;\n#else /* !ENABLED (JERRY_BUILTIN_CONTAINER) */\n  JERRY_UNUSED (arguments_list_p);\n  JERRY_UNUSED (arguments_list_len);\n  JERRY_UNUSED (container_type);\n  return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (\"Containers are disabled.\")));\n#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */\n} /* jerry_create_container */\n\n/**\n * Get the type of the given container object.\n *\n * @return Corresponding type to the given container object.\n */\njerry_container_type_t\njerry_get_container_type (const jerry_value_t value) /**< the container object */\n{\n  jerry_assert_api_available ();\n\n#if ENABLED (JERRY_BUILTIN_CONTAINER)\n  if (ecma_is_value_object (value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (value);\n\n    if (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_CLASS)\n    {\n      uint16_t type = ((ecma_extended_object_t *) obj_p)->u.class_prop.class_id;\n\n      switch (type)\n      {\n#if ENABLED (JERRY_BUILTIN_MAP)\n        case LIT_MAGIC_STRING_MAP_UL:\n        {\n          return JERRY_CONTAINER_TYPE_MAP;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n#if ENABLED (JERRY_BUILTIN_SET)\n        case LIT_MAGIC_STRING_SET_UL:\n        {\n          return JERRY_CONTAINER_TYPE_SET;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n        case LIT_MAGIC_STRING_WEAKMAP_UL:\n        {\n          return JERRY_CONTAINER_TYPE_WEAKMAP;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n        case LIT_MAGIC_STRING_WEAKSET_UL:\n        {\n          return JERRY_CONTAINER_TYPE_WEAKSET;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n        default:\n        {\n          return JERRY_CONTAINER_TYPE_INVALID;\n        }\n      }\n    }\n  }\n\n#else /* !ENABLED (JERRY_BUILTIN_CONTAINER) */\n  JERRY_UNUSED (value);\n#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */\n  return JERRY_CONTAINER_TYPE_INVALID;\n} /* jerry_get_container_type */\n\n/**\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/config.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYSCRIPT_CONFIG_H\n#define JERRYSCRIPT_CONFIG_H\n\n// @JERRY_BUILD_CFG@\n\n/**\n * Built-in configurations\n *\n * Allowed values for built-in defines:\n *  0: Disable the given built-in.\n *  1: Enable the given built-in.\n */\n/*\n * By default all built-ins are enabled if they are not defined.\n */\n#ifndef JERRY_BUILTINS\n# define JERRY_BUILTINS 1\n#endif /* !defined (JERRY_BUILTINS) */\n\n#ifndef JERRY_BUILTIN_ANNEXB\n# define JERRY_BUILTIN_ANNEXB JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_ANNEXB) */\n\n#ifndef JERRY_BUILTIN_ARRAY\n# define JERRY_BUILTIN_ARRAY JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_ARRAY) */\n\n#ifndef JERRY_BUILTIN_BOOLEAN\n# define JERRY_BUILTIN_BOOLEAN JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_BOOLEAN) */\n\n#ifndef JERRY_BUILTIN_DATE\n# define JERRY_BUILTIN_DATE JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_DATE) */\n\n#ifndef JERRY_BUILTIN_ERRORS\n# define JERRY_BUILTIN_ERRORS JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_ERRORS) */\n\n#ifndef JERRY_BUILTIN_JSON\n# define JERRY_BUILTIN_JSON JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_JSON) */\n\n#ifndef JERRY_BUILTIN_MATH\n# define JERRY_BUILTIN_MATH JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_MATH) */\n\n#ifndef JERRY_BUILTIN_NUMBER\n# define JERRY_BUILTIN_NUMBER JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_NUMBER) */\n\n#ifndef JERRY_BUILTIN_REGEXP\n# define JERRY_BUILTIN_REGEXP JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_REGEXP) */\n\n#ifndef JERRY_BUILTIN_STRING\n# define JERRY_BUILTIN_STRING JERRY_BUILTINS\n#endif /* !defined (JERRY_BUILTIN_STRING) */\n\n/**\n * ES2015+ related features, by default all of them are enabled.\n */\n#ifndef JERRY_ESNEXT\n# define JERRY_ESNEXT 1\n#endif /* !defined (JERRY_ESNEXT) */\n\n#ifndef JERRY_BUILTIN_BIGINT\n# define JERRY_BUILTIN_BIGINT JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_BIGINT) */\n\n#ifndef JERRY_BUILTIN_DATAVIEW\n# define JERRY_BUILTIN_DATAVIEW JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_DATAVIEW) */\n\n#ifndef JERRY_BUILTIN_MAP\n# define JERRY_BUILTIN_MAP JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_MAP) */\n\n#ifndef JERRY_BUILTIN_PROMISE\n# define JERRY_BUILTIN_PROMISE JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_PROMISE) */\n\n#ifndef JERRY_BUILTIN_PROXY\n# define JERRY_BUILTIN_PROXY JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_PROXY) */\n\n#ifndef JERRY_BUILTIN_REALMS\n# define JERRY_BUILTIN_REALMS JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_REALMS) */\n\n#ifndef JERRY_BUILTIN_REFLECT\n# define JERRY_BUILTIN_REFLECT JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_REFLECT) */\n\n#ifndef JERRY_BUILTIN_SET\n# define JERRY_BUILTIN_SET JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_SET) */\n\n#ifndef JERRY_BUILTIN_TYPEDARRAY\n# define JERRY_BUILTIN_TYPEDARRAY JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_TYPEDARRAY) */\n\n#ifndef JERRY_BUILTIN_WEAKMAP\n# define JERRY_BUILTIN_WEAKMAP JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_WEAKMAP) */\n\n#ifndef JERRY_BUILTIN_WEAKSET\n# define JERRY_BUILTIN_WEAKSET JERRY_ESNEXT\n#endif /* !defined (JERRY_BUILTIN_WEAKSET) */\n\n#ifndef JERRY_MODULE_SYSTEM\n# define JERRY_MODULE_SYSTEM JERRY_ESNEXT\n#endif /* !defined (JERRY_MODULE_SYSTEM) */\n\n/**\n * Engine internal and misc configurations.\n */\n\n/**\n * Specifies the compressed pointer representation\n *\n * Allowed values:\n *  0: use 16 bit representation\n *  1: use 32 bit representation\n *\n * Default value: 0\n * For more details see: jmem/jmem.h\n */\n#ifndef JERRY_CPOINTER_32_BIT\n# define JERRY_CPOINTER_32_BIT 0\n#endif /* !defined (JERRY_CPOINTER_32_BIT) */\n\n/**\n * Enable/Disable the engine's JavaScript debugger interface\n *\n * Allowed values:\n *  0: Disable the debugger parts.\n *  1: Enable the debugger.\n */\n#ifndef JERRY_DEBUGGER\n# define JERRY_DEBUGGER 0\n#endif /* !defined (JERRY_DEBUGGER) */\n\n/**\n * Enable/Disable built-in error messages for error objects.\n *\n * Allowed values:\n *  0: Disable error messages.\n *  1: Enable error message.\n *\n * Default value: 0\n */\n#ifndef JERRY_ERROR_MESSAGES\n# define JERRY_ERROR_MESSAGES 0\n#endif /* !defined (JERRY_ERROR_MESSAGES) */\n\n/**\n * Enable/Disable external context.\n *\n * Allowed values:\n *  0: Disable external context.\n *  1: Enable external context support.\n *\n * Default value: 0\n */\n#ifndef JERRY_EXTERNAL_CONTEXT\n# define JERRY_EXTERNAL_CONTEXT 0\n#endif /* !defined (JERRY_EXTERNAL_CONTEXT) */\n\n/**\n * Maximum size of heap in kilobytes\n *\n * Default value: 512 KiB\n */\n#ifndef JERRY_GLOBAL_HEAP_SIZE\n# define JERRY_GLOBAL_HEAP_SIZE (512)\n#endif /* !defined (JERRY_GLOBAL_HEAP_SIZE) */\n\n/**\n * The allowed heap usage limit until next garbage collection, in bytes.\n *\n * If value is 0, the default is 1/32 of JERRY_HEAP_SIZE\n */\n#ifndef JERRY_GC_LIMIT\n# define JERRY_GC_LIMIT 0\n#endif /* !defined (JERRY_GC_LIMIT) */\n\n/**\n * Maximum stack usage size in kilobytes\n *\n * Note: This feature cannot be used when 'detect_stack_use_after_return=1' ASAN option is enabled.\n * For more detailed description:\n *   - https://github.com/google/sanitizers/wiki/AddressSanitizerUseAfterReturn#compatibility\n *\n * Default value: 0, unlimited\n */\n#ifndef JERRY_STACK_LIMIT\n# define JERRY_STACK_LIMIT (0)\n#endif /* !defined (JERRY_STACK_LIMIT) */\n\n/**\n * Maximum depth of recursion during GC mark phase\n *\n * Default value: 8\n */\n#ifndef JERRY_GC_MARK_LIMIT\n# define JERRY_GC_MARK_LIMIT (8)\n#endif /* !defined (JERRY_GC_MARK_LIMIT) */\n\n/**\n * Enable/Disable property lookup cache.\n *\n * Allowed values:\n *  0: Disable lookup cache.\n *  1: Enable lookup cache.\n *\n * Default value: 1\n */\n#ifndef JERRY_LCACHE\n# define JERRY_LCACHE 1\n#endif /* !defined (JERRY_LCACHE) */\n\n/**\n * Enable/Disable line-info management inside the engine.\n *\n * Allowed values:\n *  0: Disable line-info in the engine.\n *  1: Enable line-info management.\n *\n * Default value: 0\n */\n#ifndef JERRY_LINE_INFO\n# define JERRY_LINE_INFO 0\n#endif /* !defined (JERRY_LINE_INFO) */\n\n/**\n * Enable/Disable logging inside the engine.\n *\n * Allowed values:\n *  0: Disable internal logging.\n *  1: Enable internal logging.\n *\n * Default value: 0\n */\n#ifndef JERRY_LOGGING\n# define JERRY_LOGGING 0\n#endif /* !defined (JERRY_LOGGING) */\n\n/**\n * Enable/Disable gc call before every allocation.\n *\n * Allowed values:\n *  0: Disable gc call before each allocation.\n *  1: Enable and force gc call before each allocation.\n *\n * Default value: 0\n * Warning!: This is an advanced option and will slow down the engine!\n *           Only enable it for debugging purposes.\n */\n#ifndef JERRY_MEM_GC_BEFORE_EACH_ALLOC\n# define JERRY_MEM_GC_BEFORE_EACH_ALLOC 0\n#endif /* !defined (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */\n\n/**\n * Enable/Disable the collection if run-time memory statistics.\n *\n * Allowed values:\n *  0: Disable run-time memory information collection.\n *  1: Enable run-time memory statistics collection.\n *\n * Default value: 0\n */\n#ifndef JERRY_MEM_STATS\n# define JERRY_MEM_STATS 0\n#endif /* !defined (JERRY_MEM_STATS) */\n\n/**\n * Use 32-bit/64-bit float for ecma-numbers\n * This option is for expert use only!\n *\n * Allowed values:\n *  1: use 64-bit floating point number mode\n *  0: use 32-bit floating point number mode\n *\n * Default value: 1\n */\n#ifndef JERRY_NUMBER_TYPE_FLOAT64\n# define JERRY_NUMBER_TYPE_FLOAT64 1\n#endif /* !defined (JERRY_NUMBER_TYPE_FLOAT64 */\n\n/**\n * Enable/Disable the JavaScript parser.\n *\n * Allowed values:\n *  0: Disable the JavaScript parser and all related functionallity.\n *  1: Enable the JavaScript parser.\n *\n * Default value: 1\n */\n#ifndef JERRY_PARSER\n# define JERRY_PARSER 1\n#endif /* !defined (JERRY_PARSER) */\n\n/**\n * Enable/Disable JerryScript byte code dump functions during parsing.\n * To dump the JerryScript byte code the engine must be initialized with opcodes\n * display flag. This option does not influence RegExp byte code dumps.\n *\n * Allowed values:\n *  0: Disable all bytecode dump functions.\n *  1: Enable bytecode dump functions.\n *\n * Default value: 0\n */\n#ifndef JERRY_PARSER_DUMP_BYTE_CODE\n# define JERRY_PARSER_DUMP_BYTE_CODE 0\n#endif /* defined (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n/**\n * Enable/Disable ECMA property hashmap.\n *\n * Allowed values:\n *  0: Disable property hasmap.\n *  1: Enable property hashmap.\n *\n * Default value: 1\n */\n#ifndef JERRY_PROPRETY_HASHMAP\n# define JERRY_PROPRETY_HASHMAP 1\n#endif /* !defined (JERRY_PROPRETY_HASHMAP) */\n\n/**\n * Enable/Disable byte code dump functions for RegExp objects.\n * To dump the RegExp byte code the engine must be initialized with\n * regexp opcodes display flag. This option does not influence the\n * JerryScript byte code dumps.\n *\n * Allowed values:\n *  0: Disable all bytecode dump functions.\n *  1: Enable bytecode dump functions.\n *\n * Default value: 0\n */\n#ifndef JERRY_REGEXP_DUMP_BYTE_CODE\n# define JERRY_REGEXP_DUMP_BYTE_CODE 0\n#endif /* !defined (JERRY_REGEXP_DUMP_BYTE_CODE) */\n\n/**\n * Enables/disables the RegExp strict mode\n *\n * Default value: 0\n */\n#ifndef JERRY_REGEXP_STRICT_MODE\n# define JERRY_REGEXP_STRICT_MODE 0\n#endif /* !defined (JERRY_REGEXP_STRICT_MODE) */\n\n/**\n * Enable/Disable the snapshot execution functions.\n *\n * Allowed values:\n *  0: Disable snapshot execution.\n *  1: Enable snapshot execution.\n *\n * Default value: 0\n */\n#ifndef JERRY_SNAPSHOT_EXEC\n# define JERRY_SNAPSHOT_EXEC 0\n#endif /* !defined (JERRY_SNAPSHOT_EXEC) */\n\n/**\n * Enable/Disable the snapshot save functions.\n *\n * Allowed values:\n *  0: Disable snapshot save functions.\n *  1: Enable snapshot save functions.\n */\n#ifndef JERRY_SNAPSHOT_SAVE\n# define JERRY_SNAPSHOT_SAVE 0\n#endif /* !defined (JERRY_SNAPSHOT_SAVE) */\n\n/**\n * Enable/Disable usage of system allocator.\n *\n * Allowed values:\n *  0: Disable usage of system allocator.\n *  1: Enable usage of system allocator.\n *\n * Default value: 0\n */\n#ifndef JERRY_SYSTEM_ALLOCATOR\n# define JERRY_SYSTEM_ALLOCATOR 0\n#endif /* !defined (JERRY_SYSTEM_ALLOCATOR) */\n\n/**\n * Enables/disables the unicode case conversion in the engine.\n * By default Unicode case conversion is enabled.\n */\n#ifndef JERRY_UNICODE_CASE_CONVERSION\n# define JERRY_UNICODE_CASE_CONVERSION 1\n#endif /* !defined (JERRY_UNICODE_CASE_CONVERSION) */\n\n/**\n * Configures if the internal memory allocations are exposed to Valgrind or not.\n *\n * Allowed values:\n *  0: Disable the Valgrind specific memory allocation notifications.\n *  1: Enable the Valgrind specific allocation notifications.\n */\n#ifndef JERRY_VALGRIND\n# define JERRY_VALGRIND 0\n#endif /* !defined (JERRY_VALGRIND) */\n\n/**\n * Enable/Disable the vm execution stop callback function.\n *\n * Allowed values:\n *  0: Disable vm exec stop callbacks.\n *  1: Enable vm exec stop callback functionality.\n */\n#ifndef JERRY_VM_EXEC_STOP\n# define JERRY_VM_EXEC_STOP 0\n#endif /* !defined (JERRY_VM_EXEC_STOP) */\n\n/**\n * Advanced section configurations.\n */\n\n/**\n * Allow configuring attributes on a few constant data inside the engine.\n *\n * One of the main usages:\n * Normally compilers store const(ant)s in ROM. Thus saving RAM.\n * But if your compiler does not support it then the directive below can force it.\n *\n * For the moment it is mainly meant for the following targets:\n *      - ESP8266\n *\n * Example configuration for moving (some) constatns into a given section:\n *  # define JERRY_ATTR_CONST_DATA __attribute__((section(\".rodata.const\")))\n */\n#ifndef JERRY_ATTR_CONST_DATA\n# define JERRY_ATTR_CONST_DATA\n#endif /* !defined (JERRY_ATTR_CONST_DATA) */\n\n/**\n * The JERRY_ATTR_GLOBAL_HEAP allows adding extra attributes for the Jerry global heap.\n *\n * Example on how to move the global heap into it's own section:\n *   #define JERRY_ATTR_GLOBAL_HEAP __attribute__((section(\".text.globalheap\")))\n */\n#ifndef JERRY_ATTR_GLOBAL_HEAP\n# define JERRY_ATTR_GLOBAL_HEAP\n#endif /* !defined (JERRY_ATTR_GLOBAL_HEAP) */\n\n/**\n * Sanity check for macros to see if the values are 0 or 1\n *\n * If a new feature is added this should be updated.\n */\n/**\n * Check base builtins.\n */\n#if !defined (JERRY_BUILTIN_ANNEXB) \\\n|| ((JERRY_BUILTIN_ANNEXB != 0) && (JERRY_BUILTIN_ANNEXB != 1))\n# error \"Invalid value for JERRY_BUILTIN_ANNEXB macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_ARRAY) \\\n|| ((JERRY_BUILTIN_ARRAY != 0) && (JERRY_BUILTIN_ARRAY != 1))\n# error \"Invalid value for JERRY_BUILTIN_ARRAY macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_BOOLEAN) \\\n|| ((JERRY_BUILTIN_BOOLEAN != 0) && (JERRY_BUILTIN_BOOLEAN != 1))\n# error \"Invalid value for JERRY_BUILTIN_BOOLEAN macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_DATE) \\\n|| ((JERRY_BUILTIN_DATE != 0) && (JERRY_BUILTIN_DATE != 1))\n# error \"Invalid value for JERRY_BUILTIN_DATE macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_ERRORS) \\\n|| ((JERRY_BUILTIN_ERRORS != 0) && (JERRY_BUILTIN_ERRORS != 1))\n# error \"Invalid value for JERRY_BUILTIN_ERRORS macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_JSON) \\\n|| ((JERRY_BUILTIN_JSON != 0) && (JERRY_BUILTIN_JSON != 1))\n# error \"Invalid value for JERRY_BUILTIN_JSON macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_MATH) \\\n|| ((JERRY_BUILTIN_MATH != 0) && (JERRY_BUILTIN_MATH != 1))\n# error \"Invalid value for JERRY_BUILTIN_MATH macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_NUMBER) \\\n|| ((JERRY_BUILTIN_NUMBER != 0) && (JERRY_BUILTIN_NUMBER != 1))\n# error \"Invalid value for JERRY_BUILTIN_NUMBER macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_REGEXP) \\\n|| ((JERRY_BUILTIN_REGEXP != 0) && (JERRY_BUILTIN_REGEXP != 1))\n# error \"Invalid value for JERRY_BUILTIN_REGEXP macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_STRING) \\\n|| ((JERRY_BUILTIN_STRING != 0) && (JERRY_BUILTIN_STRING != 1))\n# error \"Invalid value for JERRY_BUILTIN_STRING macro.\"\n#endif\n#if !defined (JERRY_BUILTINS) \\\n|| ((JERRY_BUILTINS != 0) && (JERRY_BUILTINS != 1))\n# error \"Invalid value for JERRY_BUILTINS macro.\"\n#endif\n\n/**\n * Check ES2015+ features\n */\n#if !defined (JERRY_ESNEXT) \\\n|| ((JERRY_ESNEXT != 0) && (JERRY_ESNEXT != 1))\n# error \"Invalid value for JERRY_ESNEXT macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_REALMS) \\\n|| ((JERRY_BUILTIN_REALMS != 0) && (JERRY_BUILTIN_REALMS != 1))\n# error \"Invalid value for JERRY_BUILTIN_REALMS macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_DATAVIEW) \\\n|| ((JERRY_BUILTIN_DATAVIEW != 0) && (JERRY_BUILTIN_DATAVIEW != 1))\n# error \"Invalid value for JERRY_BUILTIN_DATAVIEW macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_MAP) \\\n|| ((JERRY_BUILTIN_MAP != 0) && (JERRY_BUILTIN_MAP != 1))\n# error \"Invalid value for JERRY_BUILTIN_MAP macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_REFLECT) \\\n|| ((JERRY_BUILTIN_REFLECT != 0) && (JERRY_BUILTIN_REFLECT != 1))\n# error \"Invalid value for JERRY_BUILTIN_REFLECT macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_SET) \\\n|| ((JERRY_BUILTIN_SET != 0) && (JERRY_BUILTIN_SET != 1))\n# error \"Invalid value for JERRY_BUILTIN_SET macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_WEAKMAP) \\\n|| ((JERRY_BUILTIN_WEAKMAP != 0) && (JERRY_BUILTIN_WEAKMAP != 1))\n# error \"Invalid value for JERRY_BUILTIN_WEAKMAP macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_WEAKSET) \\\n|| ((JERRY_BUILTIN_WEAKSET != 0) && (JERRY_BUILTIN_WEAKSET != 1))\n# error \"Invalid value for JERRY_BUILTIN_WEAKSET macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_PROMISE) \\\n|| ((JERRY_BUILTIN_PROMISE != 0) && (JERRY_BUILTIN_PROMISE != 1))\n# error \"Invalid value for JERRY_BUILTIN_PROMISE macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_PROXY) \\\n|| ((JERRY_BUILTIN_PROXY != 0) && (JERRY_BUILTIN_PROXY != 1))\n# error \"Invalid value for JERRY_BUILTIN_PROXY macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_TYPEDARRAY) \\\n|| ((JERRY_BUILTIN_TYPEDARRAY != 0) && (JERRY_BUILTIN_TYPEDARRAY != 1))\n# error \"Invalid value for JERRY_BUILTIN_TYPEDARRAY macro.\"\n#endif\n#if !defined (JERRY_BUILTIN_BIGINT) \\\n|| ((JERRY_BUILTIN_BIGINT != 0) && (JERRY_BUILTIN_BIGINT != 1))\n# error \"Invalid value for JERRY_BUILTIN_BIGINT macro.\"\n#endif\n#if !defined (JERRY_MODULE_SYSTEM) \\\n|| ((JERRY_MODULE_SYSTEM != 0) && (JERRY_MODULE_SYSTEM != 1))\n# error \"Invalid value for JERRY_MODULE_SYSTEM macro.\"\n#endif\n#if (JERRY_ESNEXT == 0) \\\n&& ((JERRY_BUILTIN_DATAVIEW == 1) \\\n|| (JERRY_BUILTIN_MAP == 1) \\\n|| (JERRY_BUILTIN_SET == 1) \\\n|| (JERRY_BUILTIN_WEAKMAP == 1) \\\n|| (JERRY_BUILTIN_WEAKSET == 1) \\\n|| (JERRY_BUILTIN_PROMISE == 1) \\\n|| (JERRY_BUILTIN_PROXY == 1) \\\n|| (JERRY_BUILTIN_REFLECT == 1) \\\n|| (JERRY_BUILTIN_TYPEDARRAY == 1))\n# error \"JERRY_ESNEXT should be enabled too to enable JERRY_BUILTIN_xxxxx macro.\"\n#endif\n#if (JERRY_ESNEXT == 0) && (JERRY_MODULE_SYSTEM == 1)\n# error \"JERRY_ESNEXT should be enabled too to enable JERRY_MODULE_SYSTEM macro.\"\n#endif\n\n/**\n * Internal options.\n */\n#if !defined (JERRY_CPOINTER_32_BIT) \\\n|| ((JERRY_CPOINTER_32_BIT != 0) && (JERRY_CPOINTER_32_BIT != 1))\n# error \"Invalid value for 'JERRY_CPOINTER_32_BIT' macro.\"\n#endif\n#if !defined (JERRY_DEBUGGER) \\\n|| ((JERRY_DEBUGGER != 0) && (JERRY_DEBUGGER != 1))\n# error \"Invalid value for 'JERRY_DEBUGGER' macro.\"\n#endif\n#if !defined (JERRY_ERROR_MESSAGES) \\\n|| ((JERRY_ERROR_MESSAGES != 0) && (JERRY_ERROR_MESSAGES != 1))\n# error \"Invalid value for 'JERRY_ERROR_MESSAGES' macro.\"\n#endif\n#if !defined (JERRY_EXTERNAL_CONTEXT) \\\n|| ((JERRY_EXTERNAL_CONTEXT != 0) && (JERRY_EXTERNAL_CONTEXT != 1))\n# error \"Invalid value for 'JERRY_EXTERNAL_CONTEXT' macro.\"\n#endif\n#if !defined (JERRY_GLOBAL_HEAP_SIZE) || (JERRY_GLOBAL_HEAP_SIZE <= 0)\n# error \"Invalid value for 'JERRY_GLOBAL_HEAP_SIZE' macro.\"\n#endif\n#if !defined (JERRY_GC_LIMIT) || (JERRY_GC_LIMIT < 0)\n# error \"Invalid value for 'JERRY_GC_LIMIT' macro.\"\n#endif\n#if !defined (JERRY_STACK_LIMIT) || (JERRY_STACK_LIMIT < 0)\n# error \"Invalid value for 'JERRY_STACK_LIMIT' macro.\"\n#endif\n#if !defined (JERRY_GC_MARK_LIMIT) || (JERRY_GC_MARK_LIMIT < 0)\n# error \"Invalid value for 'JERRY_GC_MARK_LIMIT' macro.\"\n#endif\n#if !defined (JERRY_LCACHE) \\\n|| ((JERRY_LCACHE != 0) && (JERRY_LCACHE != 1))\n# error \"Invalid value for 'JERRY_LCACHE' macro.\"\n#endif\n#if !defined (JERRY_LINE_INFO) \\\n|| ((JERRY_LINE_INFO != 0) && (JERRY_LINE_INFO != 1))\n# error \"Invalid value for 'JERRY_LINE_INFO' macro.\"\n#endif\n#if !defined (JERRY_LOGGING) \\\n|| ((JERRY_LOGGING != 0) && (JERRY_LOGGING != 1))\n# error \"Invalid value for 'JERRY_LOGGING' macro.\"\n#endif\n#if !defined (JERRY_MEM_GC_BEFORE_EACH_ALLOC) \\\n|| ((JERRY_MEM_GC_BEFORE_EACH_ALLOC != 0) && (JERRY_MEM_GC_BEFORE_EACH_ALLOC != 1))\n# error \"Invalid value for 'JERRY_MEM_GC_BEFORE_EACH_ALLOC' macro.\"\n#endif\n#if !defined (JERRY_MEM_STATS) \\\n|| ((JERRY_MEM_STATS != 0) && (JERRY_MEM_STATS != 1))\n# error \"Invalid value for 'JERRY_MEM_STATS' macro.\"\n#endif\n#if !defined (JERRY_NUMBER_TYPE_FLOAT64) \\\n|| ((JERRY_NUMBER_TYPE_FLOAT64 != 0) && (JERRY_NUMBER_TYPE_FLOAT64 != 1))\n# error \"Invalid value for 'JERRY_NUMBER_TYPE_FLOAT64' macro.\"\n#endif\n#if !defined (JERRY_PARSER) \\\n|| ((JERRY_PARSER != 0) && (JERRY_PARSER != 1))\n# error \"Invalid value for 'JERRY_PARSER' macro.\"\n#endif\n#if !defined (JERRY_PARSER_DUMP_BYTE_CODE) \\\n|| ((JERRY_PARSER_DUMP_BYTE_CODE != 0) && (JERRY_PARSER_DUMP_BYTE_CODE != 1))\n# error \"Invalid value for 'JERRY_PARSER_DUMP_BYTE_CODE' macro.\"\n#endif\n#if !defined (JERRY_PROPRETY_HASHMAP) \\\n|| ((JERRY_PROPRETY_HASHMAP != 0) && (JERRY_PROPRETY_HASHMAP != 1))\n# error \"Invalid value for 'JERRY_PROPRETY_HASHMAP' macro.\"\n#endif\n#if !defined (JERRY_REGEXP_DUMP_BYTE_CODE) \\\n|| ((JERRY_REGEXP_DUMP_BYTE_CODE != 0) && (JERRY_REGEXP_DUMP_BYTE_CODE != 1))\n# error \"Invalid value for 'JERRY_REGEXP_DUMP_BYTE_CODE' macro.\"\n#endif\n#if !defined (JERRY_REGEXP_STRICT_MODE) \\\n|| ((JERRY_REGEXP_STRICT_MODE != 0) && (JERRY_REGEXP_STRICT_MODE != 1))\n# error \"Invalid value for 'JERRY_REGEXP_STRICT_MODE' macro.\"\n#endif\n#if !defined (JERRY_SNAPSHOT_EXEC) \\\n|| ((JERRY_SNAPSHOT_EXEC != 0) && (JERRY_SNAPSHOT_EXEC != 1))\n# error \"Invalid value for 'JERRY_SNAPSHOT_EXEC' macro.\"\n#endif\n#if !defined (JERRY_SNAPSHOT_SAVE) \\\n|| ((JERRY_SNAPSHOT_SAVE != 0) && (JERRY_SNAPSHOT_SAVE != 1))\n# error \"Invalid value for 'JERRY_SNAPSHOT_SAVE' macro.\"\n#endif\n#if !defined (JERRY_SYSTEM_ALLOCATOR) \\\n|| ((JERRY_SYSTEM_ALLOCATOR != 0) && (JERRY_SYSTEM_ALLOCATOR != 1))\n# error \"Invalid value for 'JERRY_SYSTEM_ALLOCATOR' macro.\"\n#endif\n#if !defined (JERRY_UNICODE_CASE_CONVERSION) \\\n|| ((JERRY_UNICODE_CASE_CONVERSION != 0) && (JERRY_UNICODE_CASE_CONVERSION != 1))\n# error \"Invalid value for 'JERRY_UNICODE_CASE_CONVERSION' macro.\"\n#endif\n#if !defined (JERRY_VALGRIND) \\\n|| ((JERRY_VALGRIND != 0) && (JERRY_VALGRIND != 1))\n# error \"Invalid value for 'JERRY_VALGRIND' macro.\"\n#endif\n#if !defined (JERRY_VM_EXEC_STOP) \\\n|| ((JERRY_VM_EXEC_STOP != 0) && (JERRY_VM_EXEC_STOP != 1))\n# error \"Invalid value for 'JERRY_VM_EXEC_STOP' macro.\"\n#endif\n\n#define ENABLED(FEATURE) ((FEATURE) == 1)\n#define DISABLED(FEATURE) ((FEATURE) != 1)\n\n/**\n * Cross component requirements check.\n */\n/**\n * The date module can only use the float 64 number types.\n * Do a check for this.\n */\n#if ENABLED (JERRY_BUILTIN_DATE) && !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n#  error \"Date does not support float32\"\n#endif\n\n/**\n * Wrap container types into a single guard\n */\n#if ENABLED (JERRY_BUILTIN_MAP) || ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_BUILTIN_WEAKMAP) || ENABLED (JERRY_BUILTIN_WEAKSET)\n# define JERRY_BUILTIN_CONTAINER 1\n#else\n# define JERRY_BUILTIN_CONTAINER 0\n#endif\n\n/**\n * Resource name related types into a single guard\n */\n#if ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ERROR_MESSAGES) || ENABLED (JERRY_MODULE_SYSTEM)\n# define JERRY_RESOURCE_NAME 1\n#else\n# define JERRY_RESOURCE_NAME 0\n#endif\n\n#endif /* !JERRYSCRIPT_CONFIG_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/debugger/debugger.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"byte-code.h\"\n#include \"debugger.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-eval.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-objects.h\"\n#include \"jcontext.h\"\n#include \"jerryscript-port.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_DEBUGGER)\n\n/**\n * Incoming message: next message of string data.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n} jerry_debugger_receive_uint8_data_part_t;\n\n/**\n * The number of message types in the debugger should reflect the\n * debugger versioning.\n */\nJERRY_STATIC_ASSERT (JERRY_DEBUGGER_MESSAGES_OUT_MAX_COUNT == 33\n                     && JERRY_DEBUGGER_MESSAGES_IN_MAX_COUNT == 21\n                     && JERRY_DEBUGGER_VERSION == 9,\n                     debugger_version_correlates_to_message_type_count);\n\n/**\n * Waiting for data from the client.\n */\n#define JERRY_DEBUGGER_RECEIVE_DATA_MODE \\\n  (JERRY_DEBUGGER_BREAKPOINT_MODE | JERRY_DEBUGGER_CLIENT_SOURCE_MODE)\n\n/**\n * Type cast the debugger send buffer into a specific type.\n */\n#define JERRY_DEBUGGER_SEND_BUFFER_AS(type, name_p) \\\n  type *name_p = (type *) (JERRY_CONTEXT (debugger_send_buffer_payload_p))\n\n/**\n * Type cast the debugger receive buffer into a specific type.\n */\n#define JERRY_DEBUGGER_RECEIVE_BUFFER_AS(type, name_p) \\\n  type *name_p = ((type *) recv_buffer_p)\n\n/**\n * Free all unreferenced byte code structures which\n * were not acknowledged by the debugger client.\n */\nvoid\njerry_debugger_free_unreferenced_byte_code (void)\n{\n  jerry_debugger_byte_code_free_t *byte_code_free_p;\n\n  byte_code_free_p = JMEM_CP_GET_POINTER (jerry_debugger_byte_code_free_t,\n                                          JERRY_CONTEXT (debugger_byte_code_free_tail));\n\n  while (byte_code_free_p != NULL)\n  {\n    jerry_debugger_byte_code_free_t *prev_byte_code_free_p;\n    prev_byte_code_free_p = JMEM_CP_GET_POINTER (jerry_debugger_byte_code_free_t,\n                                                 byte_code_free_p->prev_cp);\n\n    jmem_heap_free_block (byte_code_free_p,\n                          ((size_t) byte_code_free_p->size) << JMEM_ALIGNMENT_LOG);\n\n    byte_code_free_p = prev_byte_code_free_p;\n  }\n} /* jerry_debugger_free_unreferenced_byte_code */\n\n/**\n * Send data over an active connection.\n *\n * @return true - if the data was sent successfully\n *         false - otherwise\n */\nstatic bool\njerry_debugger_send (size_t message_length) /**< message length in bytes */\n{\n  JERRY_ASSERT (message_length <= JERRY_CONTEXT (debugger_max_send_size));\n\n  jerry_debugger_transport_header_t *header_p = JERRY_CONTEXT (debugger_transport_header_p);\n  uint8_t *payload_p = JERRY_CONTEXT (debugger_send_buffer_payload_p);\n\n  return header_p->send (header_p, payload_p, message_length);\n} /* jerry_debugger_send */\n\n/**\n * Send backtrace.\n */\nstatic void\njerry_debugger_send_backtrace (const uint8_t *recv_buffer_p) /**< pointer to the received data */\n{\n  JERRY_DEBUGGER_RECEIVE_BUFFER_AS (jerry_debugger_receive_get_backtrace_t, get_backtrace_p);\n\n  uint32_t min_depth;\n  memcpy (&min_depth, get_backtrace_p->min_depth, sizeof (uint32_t));\n  uint32_t max_depth;\n  memcpy (&max_depth, get_backtrace_p->max_depth, sizeof (uint32_t));\n\n  if (max_depth == 0)\n  {\n    max_depth = UINT32_MAX;\n  }\n\n  if (get_backtrace_p->get_total_frame_count != 0)\n  {\n    JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_backtrace_total_t, backtrace_total_p);\n    backtrace_total_p->type = JERRY_DEBUGGER_BACKTRACE_TOTAL;\n\n    vm_frame_ctx_t *iter_frame_ctx_p = JERRY_CONTEXT (vm_top_context_p);\n    uint32_t frame_count = 0;\n    while (iter_frame_ctx_p != NULL)\n    {\n      if (!(iter_frame_ctx_p->shared_p->bytecode_header_p->status_flags & (CBC_CODE_FLAGS_STATIC_FUNCTION)))\n      {\n        frame_count++;\n      }\n      iter_frame_ctx_p = iter_frame_ctx_p->prev_context_p;\n    }\n    memcpy (backtrace_total_p->frame_count, &frame_count, sizeof (frame_count));\n\n    jerry_debugger_send (sizeof (jerry_debugger_send_type_t) + sizeof (frame_count));\n  }\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_backtrace_t, backtrace_p);\n\n  backtrace_p->type = JERRY_DEBUGGER_BACKTRACE;\n\n  vm_frame_ctx_t *frame_ctx_p = JERRY_CONTEXT (vm_top_context_p);\n\n  size_t current_frame = 0;\n  const size_t max_frame_count = JERRY_DEBUGGER_SEND_MAX (jerry_debugger_frame_t);\n  const size_t max_message_size = JERRY_DEBUGGER_SEND_SIZE (max_frame_count, jerry_debugger_frame_t);\n\n  if (min_depth <= max_depth)\n  {\n    uint32_t min_depth_offset = 0;\n\n    while (frame_ctx_p != NULL && min_depth_offset < min_depth)\n    {\n      frame_ctx_p = frame_ctx_p->prev_context_p;\n      min_depth_offset++;\n    }\n\n    while (frame_ctx_p != NULL && min_depth_offset++ < max_depth)\n    {\n      if (frame_ctx_p->shared_p->bytecode_header_p->status_flags\n          & (CBC_CODE_FLAGS_DEBUGGER_IGNORE | CBC_CODE_FLAGS_STATIC_FUNCTION))\n      {\n        frame_ctx_p = frame_ctx_p->prev_context_p;\n        continue;\n      }\n\n      if (current_frame >= max_frame_count)\n      {\n        if (!jerry_debugger_send (max_message_size))\n        {\n          return;\n        }\n        current_frame = 0;\n      }\n\n      jerry_debugger_frame_t *frame_p = backtrace_p->frames + current_frame;\n\n      jmem_cpointer_t byte_code_cp;\n      JMEM_CP_SET_NON_NULL_POINTER (byte_code_cp, frame_ctx_p->shared_p->bytecode_header_p);\n      memcpy (frame_p->byte_code_cp, &byte_code_cp, sizeof (jmem_cpointer_t));\n\n      uint32_t offset = (uint32_t) (frame_ctx_p->byte_code_p - (uint8_t *) frame_ctx_p->shared_p->bytecode_header_p);\n      memcpy (frame_p->offset, &offset, sizeof (uint32_t));\n\n      frame_ctx_p = frame_ctx_p->prev_context_p;\n      current_frame++;\n    }\n  }\n\n  size_t message_size = current_frame * sizeof (jerry_debugger_frame_t);\n\n  backtrace_p->type = JERRY_DEBUGGER_BACKTRACE_END;\n\n  jerry_debugger_send (sizeof (jerry_debugger_send_type_t) + message_size);\n} /* jerry_debugger_send_backtrace */\n\n/**\n * Send the scope chain types.\n */\nstatic void\njerry_debugger_send_scope_chain (void)\n{\n  vm_frame_ctx_t *iter_frame_ctx_p = JERRY_CONTEXT (vm_top_context_p);\n\n  const size_t max_byte_count = JERRY_DEBUGGER_SEND_MAX (uint8_t);\n  const size_t max_message_size = JERRY_DEBUGGER_SEND_SIZE (max_byte_count, uint8_t);\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_string_t, message_type_p);\n  message_type_p->type = JERRY_DEBUGGER_SCOPE_CHAIN;\n\n  size_t buffer_pos = 0;\n  bool next_func_is_local = true;\n  ecma_object_t *lex_env_p = iter_frame_ctx_p->lex_env_p;\n\n  while (true)\n  {\n    JERRY_ASSERT (ecma_is_lexical_environment (lex_env_p));\n\n    if (buffer_pos == max_byte_count)\n    {\n      if (!jerry_debugger_send (max_message_size))\n      {\n        return;\n      }\n\n      buffer_pos = 0;\n    }\n\n    if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n    {\n      if ((lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK) != 0)\n      {\n        message_type_p->string[buffer_pos++] = JERRY_DEBUGGER_SCOPE_NON_CLOSURE;\n      }\n      else if (next_func_is_local)\n      {\n        message_type_p->string[buffer_pos++] = JERRY_DEBUGGER_SCOPE_LOCAL;\n        next_func_is_local = false;\n      }\n      else\n      {\n        message_type_p->string[buffer_pos++] = JERRY_DEBUGGER_SCOPE_CLOSURE;\n      }\n    }\n    else if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND)\n    {\n      if (lex_env_p->u2.outer_reference_cp == JMEM_CP_NULL)\n      {\n        message_type_p->string[buffer_pos++] = JERRY_DEBUGGER_SCOPE_GLOBAL;\n        break;\n      }\n      else\n      {\n        message_type_p->string[buffer_pos++] = JERRY_DEBUGGER_SCOPE_WITH;\n      }\n    }\n\n    JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n    lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n  }\n\n  message_type_p->type = JERRY_DEBUGGER_SCOPE_CHAIN_END;\n\n  jerry_debugger_send (sizeof (jerry_debugger_send_type_t) + buffer_pos);\n} /* jerry_debugger_send_scope_chain */\n\n/**\n * Get type of the scope variable property.\n * @return (jerry_debugger_scope_variable_type_t)\n */\nstatic uint8_t\njerry_debugger_get_variable_type (ecma_value_t value) /**< input ecma value */\n{\n  uint8_t ret_value = JERRY_DEBUGGER_VALUE_NONE;\n\n  if (ecma_is_value_undefined (value))\n  {\n    ret_value = JERRY_DEBUGGER_VALUE_UNDEFINED;\n  }\n  else if (ecma_is_value_null (value))\n  {\n    ret_value = JERRY_DEBUGGER_VALUE_NULL;\n  }\n  else if (ecma_is_value_boolean (value))\n  {\n    ret_value = JERRY_DEBUGGER_VALUE_BOOLEAN;\n  }\n  else if (ecma_is_value_number (value))\n  {\n    ret_value = JERRY_DEBUGGER_VALUE_NUMBER;\n  }\n  else if (ecma_is_value_string (value))\n  {\n    ret_value = JERRY_DEBUGGER_VALUE_STRING;\n  }\n  else\n  {\n      if (ecma_is_value_object(value))\n      {\n          if (ecma_get_object_type(ecma_get_object_from_value(value)) == ECMA_OBJECT_TYPE_ARRAY)\n          {\n              ret_value = JERRY_DEBUGGER_VALUE_ARRAY;\n          }\n          else\n          {\n              ret_value = ecma_op_is_callable(value) ? JERRY_DEBUGGER_VALUE_FUNCTION : JERRY_DEBUGGER_VALUE_OBJECT;\n          }\n      }\n  }\n\n  //JERRY_ASSERT (ret_value != JERRY_DEBUGGER_VALUE_NONE);\n\n  return ret_value;\n} /* jerry_debugger_get_variable_type */\n\n/**\n * Helper function for jerry_debugger_send_scope_variables.\n *\n * It will copies the given scope values type, length and value into the outgoing message string.\n *\n * @param variable_type type (jerry_debugger_scope_variable_type_t)\n * @return true - if the copy was successfully\n *         false - otherwise\n */\nstatic bool\njerry_debugger_copy_variables_to_string_message (uint8_t variable_type, /**< type */\n                                                 ecma_string_t *value_str, /**< property name or value string */\n                                                 jerry_debugger_send_string_t *message_string_p, /**< msg pointer */\n                                                 size_t *buffer_pos) /**< string data position of the message */\n{\n  const size_t max_byte_count = JERRY_DEBUGGER_SEND_MAX (uint8_t);\n  const size_t max_message_size = JERRY_DEBUGGER_SEND_SIZE (max_byte_count, uint8_t);\n\n  ECMA_STRING_TO_UTF8_STRING (value_str, str_buff, str_buff_size);\n\n  size_t str_size = 0;\n  size_t str_limit = 255;\n  bool result = true;\n\n  bool type_processed = false;\n\n  while (true)\n  {\n    if (*buffer_pos == max_byte_count)\n    {\n      if (!jerry_debugger_send (max_message_size))\n      {\n        result = false;\n        break;\n      }\n\n      *buffer_pos = 0;\n    }\n\n    if (!type_processed)\n    {\n      if (variable_type != JERRY_DEBUGGER_VALUE_NONE)\n      {\n        message_string_p->string[*buffer_pos] = variable_type;\n        *buffer_pos += 1;\n      }\n      type_processed = true;\n      continue;\n    }\n\n    if (variable_type == JERRY_DEBUGGER_VALUE_FUNCTION)\n    {\n      str_size = 0; // do not copy function values\n    }\n    else\n    {\n      str_size = (str_buff_size > str_limit) ? str_limit : str_buff_size;\n    }\n\n    message_string_p->string[*buffer_pos] = (uint8_t) str_size;\n    *buffer_pos += 1;\n    break;\n  }\n\n  if (result)\n  {\n    size_t free_bytes = max_byte_count - *buffer_pos;\n    const uint8_t *string_p = str_buff;\n\n    while (str_size > free_bytes)\n    {\n      memcpy (message_string_p->string + *buffer_pos, string_p, free_bytes);\n\n      if (!jerry_debugger_send (max_message_size))\n      {\n        result = false;\n        break;\n      }\n\n      string_p += free_bytes;\n      str_size -= free_bytes;\n      free_bytes = max_byte_count;\n      *buffer_pos = 0;\n    }\n\n    if (result)\n    {\n      memcpy (message_string_p->string + *buffer_pos, string_p, str_size);\n      *buffer_pos += str_size;\n    }\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (str_buff, str_buff_size);\n\n  return result;\n} /* jerry_debugger_copy_variables_to_string_message */\n\n/**\n * Send variables of the given scope chain level.\n */\nstatic void\njerry_debugger_send_scope_variables (const uint8_t *recv_buffer_p) /**< pointer to the received data */\n{\n  JERRY_DEBUGGER_RECEIVE_BUFFER_AS (jerry_debugger_receive_get_scope_variables_t, get_scope_variables_p);\n\n  uint32_t chain_index;\n  memcpy (&chain_index, get_scope_variables_p->chain_index, sizeof (uint32_t));\n\n  vm_frame_ctx_t *iter_frame_ctx_p = JERRY_CONTEXT (vm_top_context_p);\n  ecma_object_t *lex_env_p = iter_frame_ctx_p->lex_env_p;\n\n  while (chain_index != 0)\n  {\n    if (JERRY_UNLIKELY (lex_env_p->u2.outer_reference_cp == JMEM_CP_NULL))\n    {\n      jerry_debugger_send_type (JERRY_DEBUGGER_SCOPE_VARIABLES_END);\n      return;\n    }\n\n    lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n\n    if ((ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND)\n        || (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE))\n    {\n      chain_index--;\n    }\n  }\n\n  jmem_cpointer_t prop_iter_cp;\n\n  if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n  {\n    prop_iter_cp = lex_env_p->u1.property_list_cp;\n  }\n  else\n  {\n    JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n    ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n\n    if (JERRY_UNLIKELY (ecma_op_object_is_fast_array (binding_obj_p)))\n    {\n      ecma_fast_array_convert_to_normal (binding_obj_p);\n    }\n\n    prop_iter_cp = binding_obj_p->u1.property_list_cp;\n  }\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_string_t, message_string_p);\n  message_string_p->type = JERRY_DEBUGGER_SCOPE_VARIABLES;\n\n  size_t buffer_pos = 0;\n\n  while (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      if (ECMA_PROPERTY_IS_NAMED_PROPERTY (prop_iter_p->types[i]))\n      {\n        if (ECMA_PROPERTY_GET_NAME_TYPE (prop_iter_p->types[i]) == ECMA_DIRECT_STRING_MAGIC\n            && prop_pair_p->names_cp[i] >= LIT_NON_INTERNAL_MAGIC_STRING__COUNT)\n        {\n          continue;\n        }\n\n        ecma_string_t *prop_name = ecma_string_from_property_name (prop_iter_p->types[i],\n                                                                   prop_pair_p->names_cp[i]);\n\n        if (!jerry_debugger_copy_variables_to_string_message (JERRY_DEBUGGER_VALUE_NONE,\n                                                              prop_name,\n                                                              message_string_p,\n                                                              &buffer_pos))\n        {\n          ecma_deref_ecma_string (prop_name);\n          return;\n        }\n\n        ecma_deref_ecma_string (prop_name);\n\n        ecma_property_value_t prop_value_p = prop_pair_p->values[i];\n\n        uint8_t variable_type = jerry_debugger_get_variable_type (prop_value_p.value);\n\n        if (variable_type != JERRY_DEBUGGER_VALUE_NONE)\n        {\n            ecma_string_t* str_p = ecma_op_to_string(prop_value_p.value);\n            JERRY_ASSERT(str_p != NULL);\n\n            if (!jerry_debugger_copy_variables_to_string_message(variable_type,\n                str_p,\n                message_string_p,\n                &buffer_pos))\n            {\n                ecma_deref_ecma_string(str_p);\n                return;\n            }\n\n            ecma_deref_ecma_string(str_p);\n        }\n      }\n    }\n\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n\n  message_string_p->type = JERRY_DEBUGGER_SCOPE_VARIABLES_END;\n  jerry_debugger_send (sizeof (jerry_debugger_send_type_t) + buffer_pos);\n} /* jerry_debugger_send_scope_variables */\n\n/**\n * Send result of evaluated expression or throw an error.\n *\n * @return true - if execution should be resumed\n *         false - otherwise\n */\nstatic bool\njerry_debugger_send_eval (const lit_utf8_byte_t *eval_string_p, /**< evaluated string */\n                          size_t eval_string_size) /**< evaluated string size */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n  JERRY_ASSERT (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_IGNORE));\n\n  JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_IGNORE);\n\n  uint32_t chain_index;\n  memcpy (&chain_index, eval_string_p, sizeof (uint32_t));\n  uint32_t parse_opts = ECMA_PARSE_DIRECT_EVAL | (chain_index << ECMA_PARSE_CHAIN_INDEX_SHIFT);\n\n  ecma_value_t result = ecma_op_eval_chars_buffer (eval_string_p + 5, eval_string_size - 5, parse_opts);\n  JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_IGNORE);\n\n  if (!ECMA_IS_VALUE_ERROR (result))\n  {\n    if (eval_string_p[4] != JERRY_DEBUGGER_EVAL_EVAL)\n    {\n      JERRY_ASSERT (eval_string_p[4] == JERRY_DEBUGGER_EVAL_THROW || eval_string_p[4] == JERRY_DEBUGGER_EVAL_ABORT);\n      JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_EXCEPTION_THROWN);\n\n      /* Stop where the error is caught. */\n      JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_STOP);\n      JERRY_CONTEXT (debugger_stop_context) = NULL;\n\n      jcontext_raise_exception (result);\n      jcontext_set_abort_flag (eval_string_p[4] == JERRY_DEBUGGER_EVAL_ABORT);\n\n      return true;\n    }\n\n    if (!ecma_is_value_string (result))\n    {\n      ecma_string_t *str_p = ecma_op_to_string (result);\n      ecma_value_t to_string_value = ecma_make_string_value (str_p);\n      ecma_free_value (result);\n      result = to_string_value;\n    }\n  }\n\n  ecma_value_t message = result;\n  uint8_t type = JERRY_DEBUGGER_EVAL_OK;\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    type = JERRY_DEBUGGER_EVAL_ERROR;\n    result = JERRY_CONTEXT (error_value);\n\n    if (ecma_is_value_object (result))\n    {\n      message = ecma_op_object_find (ecma_get_object_from_value (result),\n                                     ecma_get_magic_string (LIT_MAGIC_STRING_MESSAGE));\n\n      if (!ecma_is_value_string (message)\n          || ecma_string_is_empty (ecma_get_string_from_value (message)))\n      {\n        ecma_free_value (message);\n        lit_magic_string_id_t id = ecma_object_get_class_name (ecma_get_object_from_value (result));\n        ecma_free_value (result);\n\n        const lit_utf8_byte_t *string_p = lit_get_magic_string_utf8 (id);\n        jerry_debugger_send_string (JERRY_DEBUGGER_EVAL_RESULT,\n                                    type,\n                                    string_p,\n                                    strlen ((const char *) string_p));\n        return false;\n      }\n    }\n    else\n    {\n      /* Primitive type. */\n      ecma_string_t *str_p = ecma_op_to_string (result);\n      JERRY_ASSERT (str_p != NULL);\n\n      message = ecma_make_string_value (str_p);\n    }\n\n    ecma_free_value (result);\n  }\n\n  ecma_string_t *string_p = ecma_get_string_from_value (message);\n\n  ECMA_STRING_TO_UTF8_STRING (string_p, buffer_p, buffer_size);\n  jerry_debugger_send_string (JERRY_DEBUGGER_EVAL_RESULT, type, buffer_p, buffer_size);\n  ECMA_FINALIZE_UTF8_STRING (buffer_p, buffer_size);\n\n  ecma_free_value (message);\n\n  return false;\n} /* jerry_debugger_send_eval */\n\n/**\n * Check received packet size.\n */\n#define JERRY_DEBUGGER_CHECK_PACKET_SIZE(type) \\\n  if (message_size != sizeof (type)) \\\n  { \\\n    JERRY_ERROR_MSG (\"Invalid message size\\n\"); \\\n    jerry_debugger_transport_close (); \\\n    return false; \\\n  }\n\n/**\n * Receive message from the client.\n *\n * @return true - if message is processed successfully\n *         false - otherwise\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\njerry_debugger_process_message (const uint8_t *recv_buffer_p, /**< pointer to the received data */\n                                uint32_t message_size, /**< message size */\n                                bool *resume_exec_p, /**< pointer to the resume exec flag */\n                                uint8_t *expected_message_type_p, /**< message type */\n                                jerry_debugger_uint8_data_t **message_data_p) /**< custom message data */\n{\n  /* Process the received message. */\n\n  if (recv_buffer_p[0] >= JERRY_DEBUGGER_CONTINUE\n      && !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_BREAKPOINT_MODE))\n  {\n    JERRY_ERROR_MSG (\"Message requires breakpoint mode\\n\");\n    jerry_debugger_transport_close ();\n    return false;\n  }\n\n  if (*expected_message_type_p != 0)\n  {\n    JERRY_ASSERT (*expected_message_type_p == JERRY_DEBUGGER_EVAL_PART\n                  || *expected_message_type_p == JERRY_DEBUGGER_CLIENT_SOURCE_PART);\n\n    jerry_debugger_uint8_data_t *uint8_data_p = (jerry_debugger_uint8_data_t *) *message_data_p;\n\n    if (recv_buffer_p[0] != *expected_message_type_p)\n    {\n      jmem_heap_free_block (uint8_data_p, uint8_data_p->uint8_size + sizeof (jerry_debugger_uint8_data_t));\n      JERRY_ERROR_MSG (\"Unexpected message\\n\");\n      jerry_debugger_transport_close ();\n      return false;\n    }\n\n    JERRY_DEBUGGER_RECEIVE_BUFFER_AS (jerry_debugger_receive_uint8_data_part_t, uint8_data_part_p);\n\n    if (message_size < sizeof (jerry_debugger_receive_uint8_data_part_t) + 1)\n    {\n      jmem_heap_free_block (uint8_data_p, uint8_data_p->uint8_size + sizeof (jerry_debugger_uint8_data_t));\n      JERRY_ERROR_MSG (\"Invalid message size\\n\");\n      jerry_debugger_transport_close ();\n      return false;\n    }\n\n    uint32_t expected_data = uint8_data_p->uint8_size - uint8_data_p->uint8_offset;\n\n    message_size -= (uint32_t) sizeof (jerry_debugger_receive_uint8_data_part_t);\n\n    if (message_size > expected_data)\n    {\n      jmem_heap_free_block (uint8_data_p, uint8_data_p->uint8_size + sizeof (jerry_debugger_uint8_data_t));\n      JERRY_ERROR_MSG (\"Invalid message size\\n\");\n      jerry_debugger_transport_close ();\n      return false;\n    }\n\n    lit_utf8_byte_t *string_p = (lit_utf8_byte_t *) (uint8_data_p + 1);\n    memcpy (string_p + uint8_data_p->uint8_offset,\n            (lit_utf8_byte_t *) (uint8_data_part_p + 1),\n            message_size);\n\n    if (message_size < expected_data)\n    {\n      uint8_data_p->uint8_offset += message_size;\n      return true;\n    }\n\n    bool result;\n\n    if (*expected_message_type_p == JERRY_DEBUGGER_EVAL_PART)\n    {\n      if (jerry_debugger_send_eval (string_p, uint8_data_p->uint8_size))\n      {\n        *resume_exec_p = true;\n      }\n      result = (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED) != 0;\n    }\n    else\n    {\n      result = true;\n      JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_CLIENT_SOURCE_MODE);\n      *resume_exec_p = true;\n    }\n\n    *expected_message_type_p = 0;\n    return result;\n  }\n\n  switch (recv_buffer_p[0])\n  {\n    case JERRY_DEBUGGER_FREE_BYTE_CODE_CP:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_byte_code_cp_t);\n\n      JERRY_DEBUGGER_RECEIVE_BUFFER_AS (jerry_debugger_receive_byte_code_cp_t, byte_code_p);\n\n      jmem_cpointer_t byte_code_free_cp;\n      memcpy (&byte_code_free_cp, byte_code_p->byte_code_cp, sizeof (jmem_cpointer_t));\n\n      if (byte_code_free_cp != JERRY_CONTEXT (debugger_byte_code_free_tail))\n      {\n        JERRY_ERROR_MSG (\"Invalid byte code free order\\n\");\n        jerry_debugger_transport_close ();\n        return false;\n      }\n\n      jerry_debugger_byte_code_free_t *byte_code_free_p;\n      byte_code_free_p = JMEM_CP_GET_NON_NULL_POINTER (jerry_debugger_byte_code_free_t,\n                                                       byte_code_free_cp);\n\n      if (byte_code_free_p->prev_cp != ECMA_NULL_POINTER)\n      {\n        JERRY_CONTEXT (debugger_byte_code_free_tail) = byte_code_free_p->prev_cp;\n      }\n      else\n      {\n        JERRY_CONTEXT (debugger_byte_code_free_head) = ECMA_NULL_POINTER;\n        JERRY_CONTEXT (debugger_byte_code_free_tail) = ECMA_NULL_POINTER;\n      }\n\n#if ENABLED (JERRY_MEM_STATS)\n      jmem_stats_free_byte_code_bytes (((size_t) byte_code_free_p->size) << JMEM_ALIGNMENT_LOG);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n      jmem_heap_free_block (byte_code_free_p,\n                            ((size_t) byte_code_free_p->size) << JMEM_ALIGNMENT_LOG);\n      return true;\n    }\n\n    case JERRY_DEBUGGER_UPDATE_BREAKPOINT:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_update_breakpoint_t);\n\n      JERRY_DEBUGGER_RECEIVE_BUFFER_AS (jerry_debugger_receive_update_breakpoint_t, update_breakpoint_p);\n\n      jmem_cpointer_t byte_code_cp;\n      memcpy (&byte_code_cp, update_breakpoint_p->byte_code_cp, sizeof (jmem_cpointer_t));\n      uint8_t *byte_code_p = JMEM_CP_GET_NON_NULL_POINTER (uint8_t, byte_code_cp);\n\n      uint32_t offset;\n      memcpy (&offset, update_breakpoint_p->offset, sizeof (uint32_t));\n      byte_code_p += offset;\n\n      JERRY_ASSERT (*byte_code_p == CBC_BREAKPOINT_ENABLED || *byte_code_p == CBC_BREAKPOINT_DISABLED);\n\n      *byte_code_p = update_breakpoint_p->is_set_breakpoint ? CBC_BREAKPOINT_ENABLED : CBC_BREAKPOINT_DISABLED;\n      return true;\n    }\n\n    case JERRY_DEBUGGER_MEMSTATS:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      jerry_debugger_send_memstats ();\n      return true;\n    }\n\n    case JERRY_DEBUGGER_STOP:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_STOP);\n      JERRY_CONTEXT (debugger_stop_context) = NULL;\n      *resume_exec_p = false;\n      return true;\n    }\n\n    case JERRY_DEBUGGER_CONTINUE:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_STOP);\n      JERRY_CONTEXT (debugger_stop_context) = NULL;\n      *resume_exec_p = true;\n      return true;\n    }\n\n    case JERRY_DEBUGGER_STEP:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_STOP);\n      JERRY_CONTEXT (debugger_stop_context) = NULL;\n      *resume_exec_p = true;\n      return true;\n    }\n\n    case JERRY_DEBUGGER_NEXT:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_STOP);\n      JERRY_CONTEXT (debugger_stop_context) = JERRY_CONTEXT (vm_top_context_p);\n      *resume_exec_p = true;\n      return true;\n    }\n\n    case JERRY_DEBUGGER_FINISH:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_STOP);\n\n      /* This will point to the current context's parent (where the function was called)\n       * and in case of NULL the result will the same as in case of STEP. */\n      JERRY_CONTEXT (debugger_stop_context) = JERRY_CONTEXT (vm_top_context_p->prev_context_p);\n      *resume_exec_p = true;\n      return true;\n    }\n\n    case JERRY_DEBUGGER_GET_BACKTRACE:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_get_backtrace_t);\n\n      jerry_debugger_send_backtrace (recv_buffer_p);\n      return true;\n    }\n\n    case JERRY_DEBUGGER_GET_SCOPE_CHAIN:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      jerry_debugger_send_scope_chain ();\n\n      return true;\n    }\n\n    case JERRY_DEBUGGER_GET_SCOPE_VARIABLES:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_get_scope_variables_t);\n\n      jerry_debugger_send_scope_variables (recv_buffer_p);\n\n      return true;\n    }\n\n    case JERRY_DEBUGGER_EXCEPTION_CONFIG:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_exception_config_t);\n      JERRY_DEBUGGER_RECEIVE_BUFFER_AS (jerry_debugger_receive_exception_config_t, exception_config_p);\n\n      if (exception_config_p->enable == 0)\n      {\n        JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_IGNORE_EXCEPTION);\n        JERRY_DEBUG_MSG (\"Stop at exception disabled\\n\");\n      }\n      else\n      {\n        JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_IGNORE_EXCEPTION);\n        JERRY_DEBUG_MSG (\"Stop at exception enabled\\n\");\n      }\n\n      return true;\n    }\n\n    case JERRY_DEBUGGER_PARSER_CONFIG:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_parser_config_t);\n      JERRY_DEBUGGER_RECEIVE_BUFFER_AS (jerry_debugger_receive_parser_config_t, parser_config_p);\n\n      if (parser_config_p->enable_wait != 0)\n      {\n        JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_PARSER_WAIT);\n        JERRY_DEBUG_MSG (\"Waiting after parsing enabled\\n\");\n      }\n      else\n      {\n        JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_PARSER_WAIT);\n        JERRY_DEBUG_MSG (\"Waiting after parsing disabled\\n\");\n      }\n\n      return true;\n    }\n\n    case JERRY_DEBUGGER_PARSER_RESUME:\n    {\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      if (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_PARSER_WAIT_MODE))\n      {\n        JERRY_ERROR_MSG (\"Not in parser wait mode\\n\");\n        jerry_debugger_transport_close ();\n        return false;\n      }\n\n      JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_PARSER_WAIT_MODE);\n      return true;\n    }\n\n    case JERRY_DEBUGGER_EVAL:\n    {\n      if (message_size < sizeof (jerry_debugger_receive_eval_first_t) + 5)\n      {\n        JERRY_ERROR_MSG (\"Invalid message size\\n\");\n        jerry_debugger_transport_close ();\n        return false;\n      }\n\n      JERRY_DEBUGGER_RECEIVE_BUFFER_AS (jerry_debugger_receive_eval_first_t, eval_first_p);\n\n      uint32_t eval_size;\n      memcpy (&eval_size, eval_first_p->eval_size, sizeof (uint32_t));\n\n      if (eval_size <= JERRY_CONTEXT (debugger_max_receive_size) - sizeof (jerry_debugger_receive_eval_first_t))\n      {\n        if (eval_size != message_size - sizeof (jerry_debugger_receive_eval_first_t))\n        {\n          JERRY_ERROR_MSG (\"Invalid message size\\n\");\n          jerry_debugger_transport_close ();\n          return false;\n        }\n\n        if (jerry_debugger_send_eval ((lit_utf8_byte_t *) (eval_first_p + 1), eval_size))\n        {\n          *resume_exec_p = true;\n        }\n\n        return (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED) != 0;\n      }\n\n      jerry_debugger_uint8_data_t *eval_uint8_data_p;\n      size_t eval_data_size = sizeof (jerry_debugger_uint8_data_t) + eval_size;\n\n      eval_uint8_data_p = (jerry_debugger_uint8_data_t *) jmem_heap_alloc_block (eval_data_size);\n\n      eval_uint8_data_p->uint8_size = eval_size;\n      eval_uint8_data_p->uint8_offset = (uint32_t) (message_size - sizeof (jerry_debugger_receive_eval_first_t));\n\n      lit_utf8_byte_t *eval_string_p = (lit_utf8_byte_t *) (eval_uint8_data_p + 1);\n      memcpy (eval_string_p,\n              (lit_utf8_byte_t *) (eval_first_p + 1),\n              message_size - sizeof (jerry_debugger_receive_eval_first_t));\n\n      *message_data_p = eval_uint8_data_p;\n      *expected_message_type_p = JERRY_DEBUGGER_EVAL_PART;\n\n      return true;\n    }\n\n    case JERRY_DEBUGGER_CLIENT_SOURCE:\n    {\n      if (message_size <= sizeof (jerry_debugger_receive_client_source_first_t))\n      {\n        JERRY_ERROR_MSG (\"Invalid message size\\n\");\n        jerry_debugger_transport_close ();\n        return false;\n      }\n\n      if (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CLIENT_SOURCE_MODE))\n      {\n        JERRY_ERROR_MSG (\"Not in client source mode\\n\");\n        jerry_debugger_transport_close ();\n        return false;\n      }\n\n      JERRY_DEBUGGER_RECEIVE_BUFFER_AS (jerry_debugger_receive_client_source_first_t, client_source_first_p);\n\n      uint32_t client_source_size;\n      memcpy (&client_source_size, client_source_first_p->code_size, sizeof (uint32_t));\n\n      uint32_t header_size = sizeof (jerry_debugger_receive_client_source_first_t);\n\n      if (client_source_size <= JERRY_CONTEXT (debugger_max_receive_size) - header_size\n          && client_source_size != message_size - header_size)\n      {\n        JERRY_ERROR_MSG (\"Invalid message size\\n\");\n        jerry_debugger_transport_close ();\n        return false;\n      }\n\n      jerry_debugger_uint8_data_t *client_source_data_p;\n      size_t client_source_data_size = sizeof (jerry_debugger_uint8_data_t) + client_source_size;\n\n      client_source_data_p = (jerry_debugger_uint8_data_t *) jmem_heap_alloc_block (client_source_data_size);\n\n      client_source_data_p->uint8_size = client_source_size;\n      client_source_data_p->uint8_offset = (uint32_t) (message_size\n                                            - sizeof (jerry_debugger_receive_client_source_first_t));\n\n      lit_utf8_byte_t *client_source_string_p = (lit_utf8_byte_t *) (client_source_data_p + 1);\n      memcpy (client_source_string_p,\n              (lit_utf8_byte_t *) (client_source_first_p + 1),\n              message_size - sizeof (jerry_debugger_receive_client_source_first_t));\n\n      *message_data_p = client_source_data_p;\n\n      if (client_source_data_p->uint8_size != client_source_data_p->uint8_offset)\n      {\n        *expected_message_type_p = JERRY_DEBUGGER_CLIENT_SOURCE_PART;\n      }\n      else\n      {\n        JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_CLIENT_SOURCE_MODE);\n        *resume_exec_p = true;\n      }\n      return true;\n    }\n\n    case JERRY_DEBUGGER_NO_MORE_SOURCES:\n    {\n      if (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CLIENT_SOURCE_MODE))\n      {\n        JERRY_ERROR_MSG (\"Not in client source mode\\n\");\n        jerry_debugger_transport_close ();\n        return false;\n      }\n\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      JERRY_DEBUGGER_UPDATE_FLAGS (JERRY_DEBUGGER_CLIENT_NO_SOURCE, JERRY_DEBUGGER_CLIENT_SOURCE_MODE);\n\n      *resume_exec_p = true;\n\n      return true;\n    }\n\n    case JERRY_DEBUGGER_CONTEXT_RESET:\n    {\n      if (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CLIENT_SOURCE_MODE))\n      {\n        JERRY_ERROR_MSG (\"Not in client source mode\\n\");\n        jerry_debugger_transport_close ();\n        return false;\n      }\n\n      JERRY_DEBUGGER_CHECK_PACKET_SIZE (jerry_debugger_receive_type_t);\n\n      JERRY_DEBUGGER_UPDATE_FLAGS (JERRY_DEBUGGER_CONTEXT_RESET_MODE, JERRY_DEBUGGER_CLIENT_SOURCE_MODE);\n\n      *resume_exec_p = true;\n\n      return true;\n    }\n\n    default:\n    {\n      JERRY_ERROR_MSG (\"Unexpected message.\");\n      jerry_debugger_transport_close ();\n      return false;\n    }\n  }\n} /* jerry_debugger_process_message */\n\n/**\n * Receive message from the client.\n *\n * Note:\n *   If the function returns with true, the value of\n *   JERRY_DEBUGGER_VM_STOP flag should be ignored.\n *\n * @return true - if execution should be resumed,\n *         false - otherwise\n */\nbool\njerry_debugger_receive (jerry_debugger_uint8_data_t **message_data_p) /**< [out] data received from client */\n{\n  JERRY_ASSERT (jerry_debugger_transport_is_connected ());\n\n  JERRY_ASSERT (message_data_p != NULL ? !!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_RECEIVE_DATA_MODE)\n                                       : !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_RECEIVE_DATA_MODE));\n\n  JERRY_CONTEXT (debugger_message_delay) = JERRY_DEBUGGER_MESSAGE_FREQUENCY;\n\n  bool resume_exec = false;\n  uint8_t expected_message_type = 0;\n\n  while (true)\n  {\n    jerry_debugger_transport_receive_context_t context;\n    if (!jerry_debugger_transport_receive (&context))\n    {\n      JERRY_ASSERT (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED));\n      return true;\n    }\n\n    if (context.message_p == NULL)\n    {\n      JERRY_CONTEXT (debugger_received_length) = (uint16_t) context.received_length;\n\n      if (expected_message_type != 0)\n      {\n        jerry_debugger_transport_sleep ();\n        continue;\n      }\n\n      return resume_exec;\n    }\n\n    /* Only datagram packets are supported. */\n    JERRY_ASSERT (context.message_total_length > 0);\n\n    /* The jerry_debugger_process_message function is inlined\n     * so passing these arguments is essentially free. */\n    if (!jerry_debugger_process_message (context.message_p,\n                                         (uint32_t) context.message_length,\n                                         &resume_exec,\n                                         &expected_message_type,\n                                         message_data_p))\n    {\n      JERRY_ASSERT (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED));\n      return true;\n    }\n\n    jerry_debugger_transport_receive_completed (&context);\n  }\n} /* jerry_debugger_receive */\n\n#undef JERRY_DEBUGGER_CHECK_PACKET_SIZE\n\n/**\n * Tell the client that a breakpoint has been hit and wait for further debugger commands.\n */\nvoid\njerry_debugger_breakpoint_hit (uint8_t message_type) /**< message type */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_breakpoint_hit_t, breakpoint_hit_p);\n\n  breakpoint_hit_p->type = message_type;\n\n  vm_frame_ctx_t *frame_ctx_p = JERRY_CONTEXT (vm_top_context_p);\n\n  jmem_cpointer_t byte_code_header_cp;\n  JMEM_CP_SET_NON_NULL_POINTER (byte_code_header_cp, frame_ctx_p->shared_p->bytecode_header_p);\n  memcpy (breakpoint_hit_p->byte_code_cp, &byte_code_header_cp, sizeof (jmem_cpointer_t));\n\n  uint32_t offset = (uint32_t) (frame_ctx_p->byte_code_p - (uint8_t *) frame_ctx_p->shared_p->bytecode_header_p);\n  memcpy (breakpoint_hit_p->offset, &offset, sizeof (uint32_t));\n\n  if (!jerry_debugger_send (sizeof (jerry_debugger_send_breakpoint_hit_t)))\n  {\n    return;\n  }\n\n  JERRY_DEBUGGER_UPDATE_FLAGS (JERRY_DEBUGGER_BREAKPOINT_MODE, JERRY_DEBUGGER_VM_EXCEPTION_THROWN);\n\n  jerry_debugger_uint8_data_t *uint8_data = NULL;\n\n  while (!jerry_debugger_receive (&uint8_data))\n  {\n    jerry_debugger_transport_sleep ();\n  }\n\n  if (uint8_data != NULL)\n  {\n    jmem_heap_free_block (uint8_data,\n                          uint8_data->uint8_size + sizeof (jerry_debugger_uint8_data_t));\n  }\n\n  JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_BREAKPOINT_MODE);\n\n  JERRY_CONTEXT (debugger_message_delay) = JERRY_DEBUGGER_MESSAGE_FREQUENCY;\n} /* jerry_debugger_breakpoint_hit */\n\n/**\n * Send the type signal to the client.\n */\nvoid\njerry_debugger_send_type (jerry_debugger_header_type_t type) /**< message type */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_type_t, message_type_p);\n\n  message_type_p->type = (uint8_t) type;\n\n  jerry_debugger_send (sizeof (jerry_debugger_send_type_t));\n} /* jerry_debugger_send_type */\n\n/**\n * Send the type signal to the client.\n *\n * @return true - if the data sent successfully to the debugger client,\n *         false - otherwise\n */\nbool\njerry_debugger_send_configuration (uint8_t max_message_size) /**< maximum message size */\n{\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_configuration_t, configuration_p);\n\n  /* Helper structure for endianness check. */\n  union\n  {\n    uint16_t uint16_value; /**< a 16-bit value */\n    uint8_t uint8_value[2]; /**< lower and upper byte of a 16-bit value */\n  } endian_data;\n\n  endian_data.uint16_value = 1;\n\n  configuration_p->type = JERRY_DEBUGGER_CONFIGURATION;\n  configuration_p->configuration = 0;\n\n  if (endian_data.uint8_value[0] == 1)\n  {\n    configuration_p->configuration |= (uint8_t) JERRY_DEBUGGER_LITTLE_ENDIAN;\n  }\n\n  uint32_t version = JERRY_DEBUGGER_VERSION;\n  memcpy (configuration_p->version, &version, sizeof (uint32_t));\n\n  configuration_p->max_message_size = max_message_size;\n  configuration_p->cpointer_size = sizeof (jmem_cpointer_t);\n\n  return jerry_debugger_send (sizeof (jerry_debugger_send_configuration_t));\n} /* jerry_debugger_send_configuration */\n\n/**\n * Send raw data to the debugger client.\n */\nvoid\njerry_debugger_send_data (jerry_debugger_header_type_t type, /**< message type */\n                          const void *data, /**< raw data */\n                          size_t size) /**< size of data */\n{\n  JERRY_ASSERT (size <= JERRY_DEBUGGER_SEND_MAX (uint8_t));\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_type_t, message_type_p);\n\n  message_type_p->type = (uint8_t) type;\n  memcpy (message_type_p + 1, data, size);\n\n  jerry_debugger_send (sizeof (jerry_debugger_send_type_t) + size);\n} /* jerry_debugger_send_data */\n\n/**\n * Send string to the debugger client.\n *\n * @return true - if the data sent successfully to the debugger client,\n *         false - otherwise\n */\nbool\njerry_debugger_send_string (uint8_t message_type, /**< message type */\n                            uint8_t sub_type, /**< subtype of the string */\n                            const uint8_t *string_p, /**< string data */\n                            size_t string_length) /**< length of string */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n  const size_t max_byte_count = JERRY_DEBUGGER_SEND_MAX (uint8_t);\n  const size_t max_message_size = JERRY_DEBUGGER_SEND_SIZE (max_byte_count, uint8_t);\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_string_t, message_string_p);\n\n  message_string_p->type = message_type;\n\n  if (sub_type != JERRY_DEBUGGER_NO_SUBTYPE)\n  {\n    string_length += 1;\n  }\n\n  while (string_length > max_byte_count)\n  {\n    memcpy (message_string_p->string, string_p, max_byte_count);\n\n    if (!jerry_debugger_send (max_message_size))\n    {\n      return false;\n    }\n\n    string_length -= max_byte_count;\n    string_p += max_byte_count;\n  }\n\n  message_string_p->type = (uint8_t) (message_type + 1);\n\n  if (sub_type != JERRY_DEBUGGER_NO_SUBTYPE)\n  {\n    memcpy (message_string_p->string, string_p, string_length - 1);\n    message_string_p->string[string_length - 1] = sub_type;\n  }\n  else\n  {\n    memcpy (message_string_p->string, string_p, string_length);\n  }\n\n  return jerry_debugger_send (sizeof (jerry_debugger_send_type_t) + string_length);\n} /* jerry_debugger_send_string */\n\n/**\n * Send the function compressed pointer to the debugger client.\n *\n * @return true - if the data was sent successfully to the debugger client,\n *         false - otherwise\n */\nbool\njerry_debugger_send_function_cp (jerry_debugger_header_type_t type, /**< message type */\n                                 ecma_compiled_code_t *compiled_code_p) /**< byte code pointer */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_byte_code_cp_t, byte_code_cp_p);\n\n  byte_code_cp_p->type = (uint8_t) type;\n\n  jmem_cpointer_t compiled_code_cp;\n  JMEM_CP_SET_NON_NULL_POINTER (compiled_code_cp, compiled_code_p);\n  memcpy (byte_code_cp_p->byte_code_cp, &compiled_code_cp, sizeof (jmem_cpointer_t));\n\n  return jerry_debugger_send (sizeof (jerry_debugger_send_byte_code_cp_t));\n} /* jerry_debugger_send_function_cp */\n\n/**\n * Send function data to the debugger client.\n *\n * @return true - if the data sent successfully to the debugger client,\n *         false - otherwise\n */\nbool\njerry_debugger_send_parse_function (uint32_t line, /**< line */\n                                    uint32_t column) /**< column */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_parse_function_t, message_parse_function_p);\n\n  message_parse_function_p->type = JERRY_DEBUGGER_PARSE_FUNCTION;\n  memcpy (message_parse_function_p->line, &line, sizeof (uint32_t));\n  memcpy (message_parse_function_p->column, &column, sizeof (uint32_t));\n\n  return jerry_debugger_send (sizeof (jerry_debugger_send_parse_function_t));\n} /* jerry_debugger_send_parse_function */\n\n/**\n * Send memory statistics to the debugger client.\n */\nvoid\njerry_debugger_send_memstats (void)\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n  JERRY_DEBUGGER_SEND_BUFFER_AS (jerry_debugger_send_memstats_t, memstats_p);\n\n  memstats_p->type = JERRY_DEBUGGER_MEMSTATS_RECEIVE;\n\n#if ENABLED (JERRY_MEM_STATS) /* if memory statistics feature is enabled */\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  uint32_t allocated_bytes = (uint32_t) heap_stats->allocated_bytes;\n  memcpy (memstats_p->allocated_bytes, &allocated_bytes, sizeof (uint32_t));\n  uint32_t byte_code_bytes = (uint32_t) heap_stats->byte_code_bytes;\n  memcpy (memstats_p->byte_code_bytes, &byte_code_bytes, sizeof (uint32_t));\n  uint32_t string_bytes = (uint32_t) heap_stats->string_bytes;\n  memcpy (memstats_p->string_bytes, &string_bytes, sizeof (uint32_t));\n  uint32_t object_bytes = (uint32_t) heap_stats->object_bytes;\n  memcpy (memstats_p->object_bytes, &object_bytes, sizeof (uint32_t));\n  uint32_t property_bytes = (uint32_t) heap_stats->property_bytes;\n  memcpy (memstats_p->property_bytes, &property_bytes, sizeof (uint32_t));\n#else /* !ENABLED (JERRY_MEM_STATS) if not, just put zeros */\n  memset (memstats_p->allocated_bytes, 0, sizeof (uint32_t));\n  memset (memstats_p->byte_code_bytes, 0, sizeof (uint32_t));\n  memset (memstats_p->string_bytes, 0, sizeof (uint32_t));\n  memset (memstats_p->object_bytes, 0, sizeof (uint32_t));\n  memset (memstats_p->property_bytes, 0, sizeof (uint32_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  jerry_debugger_send (sizeof (jerry_debugger_send_memstats_t));\n} /* jerry_debugger_send_memstats */\n\n/*\n * Converts an standard error into a string.\n *\n * @return standard error string\n */\nstatic ecma_string_t *\njerry_debugger_exception_object_to_string (ecma_value_t exception_obj_value) /**< exception object */\n{\n  ecma_object_t *object_p = ecma_get_object_from_value (exception_obj_value);\n\n  jmem_cpointer_t prototype_cp = object_p->u2.prototype_cp;\n\n  if (prototype_cp == JMEM_CP_NULL)\n  {\n    return NULL;\n  }\n\n  ecma_object_t *prototype_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, prototype_cp);\n\n  if (ecma_get_object_type (prototype_p) != ECMA_OBJECT_TYPE_GENERAL\n      || !ecma_get_object_is_builtin (prototype_p))\n  {\n    return NULL;\n  }\n\n  lit_magic_string_id_t string_id;\n\n  switch (((ecma_extended_object_t *) prototype_p)->u.built_in.id)\n  {\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n    case ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE:\n    {\n      string_id = LIT_MAGIC_STRING_EVAL_ERROR_UL;\n      break;\n    }\n    case ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE:\n    {\n      string_id = LIT_MAGIC_STRING_RANGE_ERROR_UL;\n      break;\n    }\n    case ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE:\n    {\n      string_id = LIT_MAGIC_STRING_REFERENCE_ERROR_UL;\n      break;\n    }\n    case ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE:\n    {\n      string_id = LIT_MAGIC_STRING_SYNTAX_ERROR_UL;\n      break;\n    }\n    case ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE:\n    {\n      string_id = LIT_MAGIC_STRING_TYPE_ERROR_UL;\n      break;\n    }\n    case ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE:\n    {\n      string_id = LIT_MAGIC_STRING_URI_ERROR_UL;\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n    case ECMA_BUILTIN_ID_ERROR_PROTOTYPE:\n    {\n      string_id = LIT_MAGIC_STRING_ERROR_UL;\n      break;\n    }\n    default:\n    {\n      return NULL;\n    }\n  }\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  ecma_stringbuilder_append_magic (&builder, string_id);\n\n  ecma_property_t *property_p;\n  property_p = ecma_find_named_property (ecma_get_object_from_value (exception_obj_value),\n                                         ecma_get_magic_string (LIT_MAGIC_STRING_MESSAGE));\n\n  if (property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_DATA))\n  {\n    return ecma_stringbuilder_finalize (&builder);\n  }\n\n  ecma_property_value_t *prop_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n  if (!ecma_is_value_string (prop_value_p->value))\n  {\n    return ecma_stringbuilder_finalize (&builder);\n  }\n\n  ecma_stringbuilder_append_byte (&builder, LIT_CHAR_COLON);\n  ecma_stringbuilder_append_byte (&builder, LIT_CHAR_SP);\n  ecma_stringbuilder_append (&builder, ecma_get_string_from_value (prop_value_p->value));\n\n  return ecma_stringbuilder_finalize (&builder);\n} /* jerry_debugger_exception_object_to_string */\n\n/**\n * Send string representation of exception to the client.\n *\n * @return true - if the data sent successfully to the debugger client,\n *         false - otherwise\n */\nbool\njerry_debugger_send_exception_string (ecma_value_t exception_value)\n{\n  JERRY_ASSERT (jcontext_has_pending_exception ());\n  ecma_string_t *string_p = NULL;\n\n  if (ecma_is_value_object (exception_value))\n  {\n    string_p = jerry_debugger_exception_object_to_string (exception_value);\n\n    if (string_p == NULL)\n    {\n      string_p = ecma_get_string_from_value (ecma_builtin_helper_object_to_string (exception_value));\n    }\n  }\n  else if (ecma_is_value_string (exception_value))\n  {\n    string_p = ecma_get_string_from_value (exception_value);\n    ecma_ref_ecma_string (string_p);\n  }\n  else\n  {\n    string_p = ecma_op_to_string (exception_value);\n  }\n\n  ECMA_STRING_TO_UTF8_STRING (string_p, string_data_p, string_size);\n\n  bool result = jerry_debugger_send_string (JERRY_DEBUGGER_EXCEPTION_STR,\n                                            JERRY_DEBUGGER_NO_SUBTYPE,\n                                            string_data_p,\n                                            string_size);\n\n  ECMA_FINALIZE_UTF8_STRING (string_data_p, string_size);\n\n  ecma_deref_ecma_string (string_p);\n  return result;\n} /* jerry_debugger_send_exception_string */\n\n#endif /* ENABLED (JERRY_DEBUGGER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/debugger/debugger.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef DEBUGGER_H\n#define DEBUGGER_H\n\n#include \"ecma-globals.h\"\n#include \"jerryscript-debugger-transport.h\"\n\n#if ENABLED (JERRY_DEBUGGER)\n\n/* JerryScript debugger protocol is a simplified version of RFC-6455 (WebSockets). */\n\n/**\n * Frequency of calling jerry_debugger_receive() by the VM.\n */\n#define JERRY_DEBUGGER_MESSAGE_FREQUENCY 5\n\n/**\n * This constant represents that the string to be sent has no subtype.\n */\n#define JERRY_DEBUGGER_NO_SUBTYPE 0\n\n/**\n * Limited resources available for the engine, so it is important to\n * check the maximum buffer size. It needs to be between 64 and 256 bytes.\n */\n#if JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE < 64 || JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE > 256\n#error Please define the MAX_BUFFER_SIZE between 64 and 256 bytes.\n#endif /* JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE < 64 || JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE > 256 */\n\n/**\n * Calculate the maximum number of items for a given type\n * which can be transmitted in one message.\n */\n#define JERRY_DEBUGGER_SEND_MAX(type) \\\n  ((size_t) ((JERRY_CONTEXT (debugger_max_send_size) - sizeof (jerry_debugger_send_type_t)) / sizeof (type)))\n\n/**\n * Calculate the size of a message when a count number of items transmitted.\n */\n#define JERRY_DEBUGGER_SEND_SIZE(count, type) \\\n  ((size_t) ((count * sizeof (type)) + sizeof (jerry_debugger_send_type_t)))\n\n/**\n * Debugger operation modes:\n *\n * The debugger has two operation modes: run mode and breakpoint mode.\n *\n * In run mode the debugger server accepts only a limited number of message\n * types from the debugger client (e.g. stop execution, set breakpoint).\n *\n * In breakpoint mode the JavaScript execution is stopped at a breakpoint and\n * more message types are accepted (e.g. get backtrace, evaluate expression).\n *\n * Switching between modes:\n *\n * When the JavaScript execution stops at a breakpoint the server sends a\n * JERRY_DEBUGGER_BREAKPOINT_HIT message to the client. The client can only\n * issue breakpoint mode commands after this message is received.\n *\n * Certain breakpoint mode commands (e.g. continue) resumes the JavaScript\n * execution and the client must not send any breakpoint mode messages\n * until the JERRY_DEBUGGER_BREAKPOINT_HIT is received again.\n *\n * The debugger server starts in run mode but stops at the first available\n * breakpoint.\n */\n\n/**\n * Debugger option flags.\n */\ntypedef enum\n{\n  JERRY_DEBUGGER_CONNECTED = 1u << 0, /**< debugger is connected */\n  JERRY_DEBUGGER_BREAKPOINT_MODE = 1u << 1, /**< debugger waiting at a breakpoint */\n  JERRY_DEBUGGER_VM_STOP = 1u << 2, /**< stop at the next breakpoint even if disabled */\n  JERRY_DEBUGGER_VM_IGNORE = 1u << 3, /**< ignore all breakpoints */\n  JERRY_DEBUGGER_VM_IGNORE_EXCEPTION = 1u << 4, /**< debugger doesn't stop at any exception */\n  JERRY_DEBUGGER_VM_EXCEPTION_THROWN = 1u << 5, /**< no need to stop for this exception */\n  JERRY_DEBUGGER_PARSER_WAIT = 1u << 6, /**< debugger should wait after parsing is completed */\n  JERRY_DEBUGGER_PARSER_WAIT_MODE = 1u << 7, /**< debugger is waiting after parsing is completed */\n  JERRY_DEBUGGER_CLIENT_SOURCE_MODE = 1u << 8, /**< debugger waiting for client code */\n  JERRY_DEBUGGER_CLIENT_NO_SOURCE = 1u << 9, /**< debugger leaving the client source loop */\n  JERRY_DEBUGGER_CONTEXT_RESET_MODE = 1u << 10, /**< debugger and engine reinitialization mode */\n} jerry_debugger_flags_t;\n\n/**\n * Set debugger flags.\n */\n#define JERRY_DEBUGGER_SET_FLAGS(flags) \\\n  JERRY_CONTEXT (debugger_flags) = (JERRY_CONTEXT (debugger_flags) | (uint32_t) (flags))\n\n/**\n * Clear debugger flags.\n */\n#define JERRY_DEBUGGER_CLEAR_FLAGS(flags) \\\n  JERRY_CONTEXT (debugger_flags) = (JERRY_CONTEXT (debugger_flags) & (uint32_t) ~(flags))\n\n/**\n * Set and clear debugger flags.\n */\n#define JERRY_DEBUGGER_UPDATE_FLAGS(flags_to_set, flags_to_clear) \\\n  JERRY_CONTEXT (debugger_flags) = ((JERRY_CONTEXT (debugger_flags) | (uint32_t) (flags_to_set)) \\\n                                    & (uint32_t) ~(flags_to_clear))\n\n/**\n * Types for the package.\n */\ntypedef enum\n{\n  /* Messages sent by the server to client. */\n  /* This is a handshake message, sent once during initialization. */\n  JERRY_DEBUGGER_CONFIGURATION = 1, /**< debugger configuration */\n  /* These messages are sent by the parser. */\n  JERRY_DEBUGGER_PARSE_ERROR = 2, /**< parse error */\n  JERRY_DEBUGGER_BYTE_CODE_CP = 3, /**< byte code compressed pointer */\n  JERRY_DEBUGGER_PARSE_FUNCTION = 4, /**< parsing a new function */\n  JERRY_DEBUGGER_BREAKPOINT_LIST = 5, /**< list of line offsets */\n  JERRY_DEBUGGER_BREAKPOINT_OFFSET_LIST = 6, /**< list of byte code offsets */\n  JERRY_DEBUGGER_SOURCE_CODE = 7, /**< source code fragment */\n  JERRY_DEBUGGER_SOURCE_CODE_END = 8, /**< source code last fragment */\n  JERRY_DEBUGGER_SOURCE_CODE_NAME = 9, /**< source code name fragment */\n  JERRY_DEBUGGER_SOURCE_CODE_NAME_END = 10, /**< source code name last fragment */\n  JERRY_DEBUGGER_FUNCTION_NAME = 11, /**< function name fragment */\n  JERRY_DEBUGGER_FUNCTION_NAME_END = 12, /**< function name last fragment */\n  JERRY_DEBUGGER_WAITING_AFTER_PARSE = 13, /**< engine waiting for a parser resume */\n  /* These messages are generic messages. */\n  JERRY_DEBUGGER_RELEASE_BYTE_CODE_CP = 14, /**< invalidate byte code compressed pointer */\n  JERRY_DEBUGGER_MEMSTATS_RECEIVE = 15, /**< memstats sent to the client */\n  JERRY_DEBUGGER_BREAKPOINT_HIT = 16, /**< notify breakpoint hit */\n  JERRY_DEBUGGER_EXCEPTION_HIT = 17, /**< notify exception hit */\n  JERRY_DEBUGGER_EXCEPTION_STR = 18, /**< exception string fragment */\n  JERRY_DEBUGGER_EXCEPTION_STR_END = 19, /**< exception string last fragment */\n  JERRY_DEBUGGER_BACKTRACE_TOTAL = 20, /**< number of total frames */\n  JERRY_DEBUGGER_BACKTRACE = 21, /**< backtrace data */\n  JERRY_DEBUGGER_BACKTRACE_END = 22, /**< last backtrace data */\n  JERRY_DEBUGGER_EVAL_RESULT = 23, /**< eval result */\n  JERRY_DEBUGGER_EVAL_RESULT_END = 24, /**< last part of eval result */\n  JERRY_DEBUGGER_WAIT_FOR_SOURCE = 25, /**< engine waiting for source code */\n  JERRY_DEBUGGER_OUTPUT_RESULT = 26, /**< output sent by the program to the debugger */\n  JERRY_DEBUGGER_OUTPUT_RESULT_END = 27, /**< last output result data */\n  JERRY_DEBUGGER_SCOPE_CHAIN = 28, /**< scope chain */\n  JERRY_DEBUGGER_SCOPE_CHAIN_END = 29, /**< last output of scope chain */\n  JERRY_DEBUGGER_SCOPE_VARIABLES = 30, /**< scope variables */\n  JERRY_DEBUGGER_SCOPE_VARIABLES_END = 31, /**< last output of scope variables */\n  JERRY_DEBUGGER_CLOSE_CONNECTION = 32, /**< close connection with the client */\n  JERRY_DEBUGGER_MESSAGES_OUT_MAX_COUNT, /**< number of different type of output messages by the debugger */\n\n  /* Messages sent by the client to server. */\n\n  /* The following messages are accepted in both run and breakpoint modes. */\n  JERRY_DEBUGGER_FREE_BYTE_CODE_CP = 1, /**< free byte code compressed pointer */\n  JERRY_DEBUGGER_UPDATE_BREAKPOINT = 2, /**< update breakpoint status */\n  JERRY_DEBUGGER_EXCEPTION_CONFIG = 3, /**< exception handler config */\n  JERRY_DEBUGGER_PARSER_CONFIG = 4, /**< parser config */\n  JERRY_DEBUGGER_MEMSTATS = 5, /**< list memory statistics */\n  JERRY_DEBUGGER_STOP = 6, /**< stop execution */\n  /* The following message is only available in waiting after parse mode. */\n  JERRY_DEBUGGER_PARSER_RESUME = 7, /**< stop waiting after parse */\n  /* The following four messages are only available in client switch mode. */\n  JERRY_DEBUGGER_CLIENT_SOURCE = 8, /**< first message of client source */\n  JERRY_DEBUGGER_CLIENT_SOURCE_PART = 9, /**< next message of client source */\n  JERRY_DEBUGGER_NO_MORE_SOURCES = 10, /**< no more sources notification */\n  JERRY_DEBUGGER_CONTEXT_RESET = 11, /**< context reset request */\n  /* The following messages are only available in breakpoint\n   * mode and they switch the engine to run mode. */\n  JERRY_DEBUGGER_CONTINUE = 12, /**< continue execution */\n  JERRY_DEBUGGER_STEP = 13, /**< next breakpoint, step into functions */\n  JERRY_DEBUGGER_NEXT = 14, /**< next breakpoint in the same context */\n  JERRY_DEBUGGER_FINISH = 15, /**< Continue running just after the function in the current stack frame returns */\n  /* The following messages are only available in breakpoint\n   * mode and this mode is kept after the message is processed. */\n  JERRY_DEBUGGER_GET_BACKTRACE = 16, /**< get backtrace */\n  JERRY_DEBUGGER_EVAL = 17, /**< first message of evaluating a string */\n  JERRY_DEBUGGER_EVAL_PART = 18, /**< next message of evaluating a string */\n  JERRY_DEBUGGER_GET_SCOPE_CHAIN = 19, /**< get type names of the scope chain */\n  JERRY_DEBUGGER_GET_SCOPE_VARIABLES = 20, /**< get variables of a scope */\n  JERRY_DEBUGGER_MESSAGES_IN_MAX_COUNT, /**< number of different type of input messages */\n} jerry_debugger_header_type_t;\n\n/**\n * Debugger option flags.\n */\ntypedef enum\n{\n  JERRY_DEBUGGER_LITTLE_ENDIAN = 1u << 0, /**< little endian */\n} jerry_debugger_configuration_flags_t;\n\n/**\n * Subtypes of eval.\n */\ntypedef enum\n{\n  JERRY_DEBUGGER_EVAL_EVAL = 0, /**< evaluate expression */\n  JERRY_DEBUGGER_EVAL_THROW = 1, /**< evaluate expression and throw the result */\n  JERRY_DEBUGGER_EVAL_ABORT = 2, /**< evaluate expression and abrot with the result */\n} jerry_debugger_eval_type_t;\n\n/**\n * Subtypes of eval_result.\n */\ntypedef enum\n{\n  JERRY_DEBUGGER_EVAL_OK = 1, /**< eval result, no error */\n  JERRY_DEBUGGER_EVAL_ERROR = 2, /**< eval result when an error has occurred */\n} jerry_debugger_eval_result_type_t;\n\n/**\n * Subtypes of output_result.\n *\n * Note:\n *      This enum has to be kept in sync with jerry_log_level_t with an offset\n *      of +2.\n */\ntypedef enum\n{\n  JERRY_DEBUGGER_OUTPUT_OK = 1, /**< output result, no error */\n  JERRY_DEBUGGER_OUTPUT_ERROR = 2, /**< output result, error */\n  JERRY_DEBUGGER_OUTPUT_WARNING = 3, /**< output result, warning */\n  JERRY_DEBUGGER_OUTPUT_DEBUG = 4, /**< output result, debug */\n  JERRY_DEBUGGER_OUTPUT_TRACE = 5, /**< output result, trace */\n} jerry_debugger_output_subtype_t;\n\n/**\n * Types of scopes.\n */\ntypedef enum\n{\n  JERRY_DEBUGGER_SCOPE_WITH = 1, /**< with */\n  JERRY_DEBUGGER_SCOPE_LOCAL = 2, /**< local */\n  JERRY_DEBUGGER_SCOPE_CLOSURE = 3, /**< closure */\n  JERRY_DEBUGGER_SCOPE_GLOBAL = 4, /**< global */\n  JERRY_DEBUGGER_SCOPE_NON_CLOSURE = 5 /**< non closure */\n} jerry_debugger_scope_chain_type_t;\n\n/**\n * Type of scope variables.\n */\ntypedef enum\n{\n  JERRY_DEBUGGER_VALUE_NONE = 1,\n  JERRY_DEBUGGER_VALUE_UNDEFINED = 2,\n  JERRY_DEBUGGER_VALUE_NULL = 3,\n  JERRY_DEBUGGER_VALUE_BOOLEAN = 4,\n  JERRY_DEBUGGER_VALUE_NUMBER = 5,\n  JERRY_DEBUGGER_VALUE_STRING = 6,\n  JERRY_DEBUGGER_VALUE_FUNCTION = 7,\n  JERRY_DEBUGGER_VALUE_ARRAY = 8,\n  JERRY_DEBUGGER_VALUE_OBJECT = 9\n} jerry_debugger_scope_variable_type_t;\n\n/**\n * Byte data for evaluating expressions and receiving client source.\n */\ntypedef struct\n{\n  uint32_t uint8_size; /**< total size of the client source */\n  uint32_t uint8_offset; /**< current offset in the client source */\n} jerry_debugger_uint8_data_t;\n\n/**\n * Delayed free of byte code data.\n */\ntypedef struct\n{\n  uint16_t size; /**< size of the byte code header divided by JMEM_ALIGNMENT */\n  jmem_cpointer_t prev_cp; /**< previous byte code data to be freed */\n} jerry_debugger_byte_code_free_t;\n\n/**\n * Outgoing message: JerryScript configuration.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t configuration; /**< configuration option bits */\n  uint8_t version[sizeof (uint32_t)]; /**< debugger version */\n  uint8_t max_message_size; /**< maximum incoming message size */\n  uint8_t cpointer_size; /**< size of compressed pointers */\n} jerry_debugger_send_configuration_t;\n\n/**\n * Outgoing message: message without arguments.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n} jerry_debugger_send_type_t;\n\n/**\n * Incoming message: message without arguments.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n} jerry_debugger_receive_type_t;\n\n/**\n * Outgoing message: string (Source file name or function name).\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t string[]; /**< string data */\n} jerry_debugger_send_string_t;\n\n/**\n * Outgoing message: uint32 value.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t line[sizeof (uint32_t)]; /**< value data */\n  uint8_t column[sizeof (uint32_t)]; /**< value data */\n} jerry_debugger_send_parse_function_t;\n\n/**\n * Outgoing message: byte code compressed pointer.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */\n} jerry_debugger_send_byte_code_cp_t;\n\n/**\n * Incoming message: byte code compressed pointer.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */\n} jerry_debugger_receive_byte_code_cp_t;\n\n/**\n * Incoming message: update (enable/disable) breakpoint status.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t is_set_breakpoint; /**< set or clear breakpoint */\n  uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */\n  uint8_t offset[sizeof (uint32_t)]; /**< breakpoint offset */\n} jerry_debugger_receive_update_breakpoint_t;\n\n/**\n * Outgoing message: send memory statistics\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t allocated_bytes[sizeof (uint32_t)]; /**< allocated bytes */\n  uint8_t byte_code_bytes[sizeof (uint32_t)]; /**< byte code bytes */\n  uint8_t string_bytes[sizeof (uint32_t)]; /**< string bytes */\n  uint8_t object_bytes[sizeof (uint32_t)]; /**< object bytes */\n  uint8_t property_bytes[sizeof (uint32_t)]; /**< property bytes */\n} jerry_debugger_send_memstats_t;\n\n/**\n * Outgoing message: notify breakpoint hit.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */\n  uint8_t offset[sizeof (uint32_t)]; /**< breakpoint offset */\n} jerry_debugger_send_breakpoint_hit_t;\n\n/**\n * Stack frame descriptor for sending backtrace information.\n */\ntypedef struct\n{\n  uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */\n  uint8_t offset[sizeof (uint32_t)]; /**< last breakpoint offset */\n} jerry_debugger_frame_t;\n\n/**\n * Outgoing message: backtrace information.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  jerry_debugger_frame_t frames[]; /**< frames */\n} jerry_debugger_send_backtrace_t;\n\n/**\n * Outgoing message: scope chain.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t scope_types[]; /**< scope types */\n} jerry_debugger_send_scope_chain_t;\n\n/**\n * Outgoing message: number of total frames in backtrace.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t frame_count[sizeof (uint32_t)]; /**< total number of frames */\n} jerry_debugger_send_backtrace_total_t;\n\n/**\n * Incoming message: set behaviour when exception occures.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t enable; /**< non-zero: enable stop at exception */\n} jerry_debugger_receive_exception_config_t;\n\n/**\n * Incoming message: set parser configuration.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t enable_wait; /**< non-zero: wait after parsing is completed */\n} jerry_debugger_receive_parser_config_t;\n\n/**\n * Incoming message: get backtrace.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t min_depth[sizeof (uint32_t)]; /**< minimum depth*/\n  uint8_t max_depth[sizeof (uint32_t)]; /**< maximum depth (0 - unlimited) */\n  uint8_t get_total_frame_count; /**< non-zero: if total frame count is also requested */\n} jerry_debugger_receive_get_backtrace_t;\n\n/**\n * Incoming message: first message of evaluating expression.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t eval_size[sizeof (uint32_t)]; /**< total size of the message */\n} jerry_debugger_receive_eval_first_t;\n\n/**\n * Incoming message: get scope variables\n*/\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t chain_index[sizeof (uint32_t)]; /**< index element of the scope */\n} jerry_debugger_receive_get_scope_variables_t;\n\n/**\n * Incoming message: first message of client source.\n */\ntypedef struct\n{\n  uint8_t type; /**< type of the message */\n  uint8_t code_size[sizeof (uint32_t)]; /**< total size of the message */\n} jerry_debugger_receive_client_source_first_t;\n\nvoid jerry_debugger_free_unreferenced_byte_code (void);\n\nbool jerry_debugger_receive (jerry_debugger_uint8_data_t **message_data_p);\n\nvoid jerry_debugger_breakpoint_hit (uint8_t message_type);\n\nvoid jerry_debugger_send_type (jerry_debugger_header_type_t type);\nbool jerry_debugger_send_configuration (uint8_t max_message_size);\nvoid jerry_debugger_send_data (jerry_debugger_header_type_t type, const void *data, size_t size);\nbool jerry_debugger_send_string (uint8_t message_type, uint8_t sub_type, const uint8_t *string_p, size_t string_length);\nbool jerry_debugger_send_function_cp (jerry_debugger_header_type_t type, ecma_compiled_code_t *compiled_code_p);\nbool jerry_debugger_send_parse_function (uint32_t line, uint32_t column);\nvoid jerry_debugger_send_memstats (void);\nbool jerry_debugger_send_exception_string (ecma_value_t exception_value);\n\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#endif /* !DEBUGGER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-alloc.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-gc.h\"\n#include \"jrt.h\"\n#include \"jmem.h\"\n\nJERRY_STATIC_ASSERT (sizeof (ecma_property_value_t) == sizeof (ecma_value_t),\n                     size_of_ecma_property_value_t_must_be_equal_to_size_of_ecma_value_t);\nJERRY_STATIC_ASSERT (((sizeof (ecma_property_value_t) - 1) & sizeof (ecma_property_value_t)) == 0,\n                     size_of_ecma_property_value_t_must_be_power_of_2);\n\nJERRY_STATIC_ASSERT (sizeof (ecma_extended_object_t) - sizeof (ecma_object_t) <= sizeof (uint64_t),\n                     size_of_ecma_extended_object_part_must_be_less_than_or_equal_to_8_bytes);\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaalloc Routines for allocation/freeing memory for ECMA data types\n * @{\n */\n\n/**\n * Implementation of routines for allocation/freeing memory for ECMA data types.\n *\n * All allocation routines from this module have the same structure:\n *  1. Try to allocate memory.\n *  2. If allocation was successful, return pointer to the allocated block.\n *  3. Run garbage collection.\n *  4. Try to allocate memory.\n *  5. If allocation was successful, return pointer to the allocated block;\n *     else - shutdown engine.\n */\n\n/**\n * Allocate memory for ecma-number\n *\n * @return pointer to allocated memory\n */\necma_number_t *\necma_alloc_number (void)\n{\n  return (ecma_number_t *) jmem_pools_alloc (sizeof (ecma_number_t));\n} /* ecma_alloc_number */\n\n/**\n * Dealloc memory from an ecma-number\n */\nvoid\necma_dealloc_number (ecma_number_t *number_p) /**< number to be freed */\n{\n  jmem_pools_free ((uint8_t *) number_p, sizeof (ecma_number_t));\n} /* ecma_dealloc_number */\n\n/**\n * Allocate memory for ecma-object\n *\n * @return pointer to allocated memory\n */\nextern inline ecma_object_t * JERRY_ATTR_ALWAYS_INLINE\necma_alloc_object (void)\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_object_bytes (sizeof (ecma_object_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  return (ecma_object_t *) jmem_pools_alloc (sizeof (ecma_object_t));\n} /* ecma_alloc_object */\n\n/**\n * Dealloc memory from an ecma-object\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_dealloc_object (ecma_object_t *object_p) /**< object to be freed */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_free_object_bytes (sizeof (ecma_object_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  jmem_pools_free (object_p, sizeof (ecma_object_t));\n} /* ecma_dealloc_object */\n\n/**\n * Allocate memory for extended object\n *\n * @return pointer to allocated memory\n */\nextern inline ecma_extended_object_t * JERRY_ATTR_ALWAYS_INLINE\necma_alloc_extended_object (size_t size) /**< size of object */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_object_bytes (size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  return jmem_heap_alloc_block (size);\n} /* ecma_alloc_extended_object */\n\n/**\n * Dealloc memory of an extended object\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_dealloc_extended_object (ecma_object_t *object_p, /**< extended object */\n                              size_t size) /**< size of object */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_free_object_bytes (size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  jmem_heap_free_block (object_p, size);\n} /* ecma_dealloc_extended_object */\n\n/**\n * Allocate memory for ecma-string descriptor\n *\n * @return pointer to allocated memory\n */\nextern inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE\necma_alloc_string (void)\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_string_bytes (sizeof (ecma_string_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  return (ecma_string_t *) jmem_pools_alloc (sizeof (ecma_string_t));\n} /* ecma_alloc_string */\n\n/**\n * Dealloc memory from ecma-string descriptor\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_dealloc_string (ecma_string_t *string_p) /**< string to be freed */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_free_string_bytes (sizeof (ecma_string_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  jmem_pools_free (string_p, sizeof (ecma_string_t));\n} /* ecma_dealloc_string */\n\n/**\n * Allocate memory for extended ecma-string descriptor\n *\n * @return pointer to allocated memory\n */\nextern inline ecma_extended_string_t * JERRY_ATTR_ALWAYS_INLINE\necma_alloc_extended_string (void)\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_string_bytes (sizeof (ecma_extended_string_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  return (ecma_extended_string_t *) jmem_heap_alloc_block (sizeof (ecma_extended_string_t));\n} /* ecma_alloc_extended_string */\n\n/**\n * Dealloc memory from extended ecma-string descriptor\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_dealloc_extended_string (ecma_extended_string_t *ext_string_p) /**< extended string to be freed */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_free_string_bytes (sizeof (ecma_extended_string_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  jmem_heap_free_block (ext_string_p, sizeof (ecma_extended_string_t));\n} /* ecma_dealloc_extended_string */\n\n/**\n * Allocate memory for external ecma-string descriptor\n *\n * @return pointer to allocated memory\n */\nextern inline ecma_external_string_t * JERRY_ATTR_ALWAYS_INLINE\necma_alloc_external_string (void)\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_string_bytes (sizeof (ecma_external_string_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  return (ecma_external_string_t *) jmem_heap_alloc_block (sizeof (ecma_external_string_t));\n} /* ecma_alloc_external_string */\n\n/**\n * Dealloc memory from external ecma-string descriptor\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_dealloc_external_string (ecma_external_string_t *ext_string_p) /**< external string to be freed */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_free_string_bytes (sizeof (ecma_external_string_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  jmem_heap_free_block (ext_string_p, sizeof (ecma_external_string_t));\n} /* ecma_dealloc_external_string */\n\n/**\n * Allocate memory for an string with character data\n *\n * @return pointer to allocated memory\n */\nextern inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE\necma_alloc_string_buffer (size_t size) /**< size of string */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_string_bytes (size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  return jmem_heap_alloc_block (size);\n} /* ecma_alloc_string_buffer */\n\n/**\n * Dealloc memory of a string with character data\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_dealloc_string_buffer (ecma_string_t *string_p, /**< string with data */\n                            size_t size) /**< size of string */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_free_string_bytes (size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  jmem_heap_free_block (string_p, size);\n} /* ecma_dealloc_string_buffer */\n\n/**\n * Allocate memory for ecma-property pair\n *\n * @return pointer to allocated memory\n */\nextern inline ecma_property_pair_t * JERRY_ATTR_ALWAYS_INLINE\necma_alloc_property_pair (void)\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_property_bytes (sizeof (ecma_property_pair_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  return jmem_heap_alloc_block (sizeof (ecma_property_pair_t));\n} /* ecma_alloc_property_pair */\n\n/**\n * Dealloc memory of an ecma-property\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_dealloc_property_pair (ecma_property_pair_t *property_pair_p) /**< property pair to be freed */\n{\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_free_property_bytes (sizeof (ecma_property_pair_t));\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  jmem_heap_free_block (property_pair_p, sizeof (ecma_property_pair_t));\n} /* ecma_dealloc_property_pair */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-alloc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_ALLOC_H\n#define ECMA_ALLOC_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaalloc Routines for allocation/freeing memory for ECMA data types\n * @{\n */\n\n/**\n * Allocate memory for ecma-object\n *\n * @return pointer to allocated memory\n */\necma_object_t *ecma_alloc_object (void);\n\n/**\n * Dealloc memory from an ecma-object\n */\nvoid ecma_dealloc_object (ecma_object_t *object_p);\n\n/**\n * Allocate memory for extended object\n *\n * @return pointer to allocated memory\n */\necma_extended_object_t *ecma_alloc_extended_object (size_t size);\n\n/**\n * Dealloc memory of an extended object\n */\nvoid ecma_dealloc_extended_object (ecma_object_t *object_p, size_t size);\n\n/**\n * Allocate memory for ecma-number\n *\n * @return pointer to allocated memory\n */\necma_number_t *ecma_alloc_number (void);\n\n/**\n * Dealloc memory from an ecma-number\n */\nvoid ecma_dealloc_number (ecma_number_t *number_p);\n\n/**\n * Allocate memory for ecma-string descriptor\n *\n * @return pointer to allocated memory\n */\necma_string_t *ecma_alloc_string (void);\n\n/**\n * Dealloc memory from ecma-string descriptor\n */\nvoid ecma_dealloc_string (ecma_string_t *string_p);\n\n/**\n * Allocate memory for extended ecma-string descriptor\n *\n * @return pointer to allocated memory\n */\necma_extended_string_t *ecma_alloc_extended_string (void);\n\n/**\n * Dealloc memory from extended ecma-string descriptor\n */\nvoid ecma_dealloc_extended_string (ecma_extended_string_t *string_p);\n\n/**\n * Allocate memory for external ecma-string descriptor\n *\n * @return pointer to allocated memory\n */\necma_external_string_t *ecma_alloc_external_string (void);\n\n/**\n * Dealloc memory from external ecma-string descriptor\n */\nvoid ecma_dealloc_external_string (ecma_external_string_t *string_p);\n\n/**\n * Allocate memory for string with character data\n *\n * @return pointer to allocated memory\n */\necma_string_t *ecma_alloc_string_buffer (size_t size);\n\n/**\n * Dealloc memory of a string with character data\n */\nvoid ecma_dealloc_string_buffer (ecma_string_t *string_p, size_t size);\n\n/**\n * Allocate memory for ecma-property pair\n *\n * @return pointer to allocated memory\n */\necma_property_pair_t *ecma_alloc_property_pair (void);\n\n/**\n * Dealloc memory from an ecma-property pair\n */\nvoid ecma_dealloc_property_pair (ecma_property_pair_t *property_pair_p);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_ALLOC_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-gc.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Garbage collector implementation\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtin-handlers.h\"\n#include \"ecma-container-object.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lcache.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-property-hashmap.h\"\n#include \"ecma-proxy-object.h\"\n#include \"jcontext.h\"\n#include \"jrt.h\"\n#include \"jrt-libc-includes.h\"\n#include \"jrt-bit-fields.h\"\n#include \"re-compiler.h\"\n#include \"vm-defines.h\"\n#include \"vm-stack.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#include \"ecma-typedarray-object.h\"\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n#include \"ecma-promise-object.h\"\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n\n/* TODO: Extract GC to a separate component */\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmagc Garbage collector\n * @{\n */\n\n/*\n * The garbage collector uses the reference counter\n * of object: it increases the counter by one when\n * the object is marked at the first time.\n */\n\n/**\n * Get visited flag of the object.\n *\n * @return true  - if visited\n *         false - otherwise\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\necma_gc_is_object_visited (ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (object_p != NULL);\n\n  return (object_p->type_flags_refs < ECMA_OBJECT_NON_VISITED);\n} /* ecma_gc_is_object_visited */\n\n/**\n * Mark objects as visited starting from specified object as root\n */\nstatic void ecma_gc_mark (ecma_object_t *object_p);\n\n/**\n * Set visited flag of the object.\n */\nstatic void\necma_gc_set_object_visited (ecma_object_t *object_p) /**< object */\n{\n  if (object_p->type_flags_refs >= ECMA_OBJECT_NON_VISITED)\n  {\n#if (JERRY_GC_MARK_LIMIT != 0)\n    if (JERRY_CONTEXT (ecma_gc_mark_recursion_limit) != 0)\n    {\n      JERRY_CONTEXT (ecma_gc_mark_recursion_limit)--;\n      /* Set the reference count of gray object to 0 */\n      object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs & (ECMA_OBJECT_REF_ONE - 1));\n      ecma_gc_mark (object_p);\n      JERRY_CONTEXT (ecma_gc_mark_recursion_limit)++;\n    }\n    else\n    {\n      /* Set the reference count of the non-marked gray object to 1 */\n      object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs & ((ECMA_OBJECT_REF_ONE << 1) - 1));\n      JERRY_ASSERT (object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE);\n    }\n#else /* (JERRY_GC_MARK_LIMIT == 0) */\n    /* Set the reference count of gray object to 0 */\n    object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs & (ECMA_OBJECT_REF_ONE - 1));\n#endif /* (JERRY_GC_MARK_LIMIT != 0) */\n  }\n} /* ecma_gc_set_object_visited */\n\n/**\n * Initialize GC information for the object\n */\nextern inline void\necma_init_gc_info (ecma_object_t *object_p) /**< object */\n{\n  JERRY_CONTEXT (ecma_gc_objects_number)++;\n  JERRY_CONTEXT (ecma_gc_new_objects)++;\n\n  JERRY_ASSERT (object_p->type_flags_refs < ECMA_OBJECT_REF_ONE);\n  object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs | ECMA_OBJECT_REF_ONE);\n\n  object_p->gc_next_cp = JERRY_CONTEXT (ecma_gc_objects_cp);\n  ECMA_SET_NON_NULL_POINTER (JERRY_CONTEXT (ecma_gc_objects_cp), object_p);\n} /* ecma_init_gc_info */\n\n/**\n * Increase reference counter of an object\n */\nvoid\necma_ref_object (ecma_object_t *object_p) /**< object */\n{\n  if (JERRY_LIKELY (object_p->type_flags_refs < ECMA_OBJECT_MAX_REF))\n  {\n    object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs + ECMA_OBJECT_REF_ONE);\n  }\n  else\n  {\n    jerry_fatal (ERR_REF_COUNT_LIMIT);\n  }\n} /* ecma_ref_object */\n\n/**\n * Decrease reference counter of an object\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_deref_object (ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE);\n  object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs - ECMA_OBJECT_REF_ONE);\n} /* ecma_deref_object */\n\n/**\n * Mark objects referenced by global object\n */\nstatic void\necma_gc_mark_global_object (ecma_global_object_t *global_object_p) /**< global object */\n{\n  JERRY_ASSERT (global_object_p->extended_object.u.built_in.routine_id == 0);\n\n  ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, global_object_p->global_env_cp));\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_gc_set_object_visited (ecma_get_object_from_value (global_object_p->this_binding));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n#if ENABLED (JERRY_ESNEXT)\n  if (global_object_p->global_scope_cp != global_object_p->global_env_cp)\n  {\n    ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, global_object_p->global_scope_cp));\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  jmem_cpointer_t *builtin_objects_p = global_object_p->builtin_objects;\n\n  for (int i = 0; i < ECMA_BUILTIN_OBJECTS_COUNT; i++)\n  {\n    if (builtin_objects_p[i] != JMEM_CP_NULL)\n    {\n      ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, builtin_objects_p[i]));\n    }\n  }\n} /* ecma_gc_mark_global_object */\n\n/**\n * Mark objects referenced by arguments object\n */\nstatic void\necma_gc_mark_arguments_object (ecma_extended_object_t *ext_object_p) /**< arguments object */\n{\n  JERRY_ASSERT (ecma_get_object_type ((ecma_object_t *) ext_object_p) == ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n\n  ecma_unmapped_arguments_t *arguments_p = (ecma_unmapped_arguments_t *) ext_object_p;\n  ecma_gc_set_object_visited (ecma_get_object_from_value (arguments_p->callee));\n\n  ecma_value_t *argv_p = (ecma_value_t *) (arguments_p + 1);\n\n  if (ext_object_p->u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED)\n  {\n    ecma_mapped_arguments_t *mapped_arguments_p = (ecma_mapped_arguments_t *) ext_object_p;\n    argv_p = (ecma_value_t *) (mapped_arguments_p + 1);\n\n    ecma_gc_set_object_visited (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, mapped_arguments_p->lex_env));\n  }\n\n  uint32_t arguments_number = arguments_p->header.u.pseudo_array.u2.arguments_number;\n\n  for (uint32_t i = 0; i < arguments_number; i++)\n  {\n    if (ecma_is_value_object (argv_p[i]))\n    {\n      ecma_gc_set_object_visited (ecma_get_object_from_value (argv_p[i]));\n    }\n  }\n} /* ecma_gc_mark_arguments_object */\n\n/**\n * Mark referenced object from property\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\necma_gc_mark_properties (ecma_property_pair_t *property_pair_p) /**< property pair */\n{\n  for (uint32_t index = 0; index < ECMA_PROPERTY_PAIR_ITEM_COUNT; index++)\n  {\n    uint8_t property = property_pair_p->header.types[index];\n\n    if (JERRY_LIKELY (ECMA_PROPERTY_IS_RAW (property)))\n    {\n      if (property & ECMA_PROPERTY_FLAG_DATA)\n      {\n        ecma_value_t value = property_pair_p->values[index].value;\n\n        if (ecma_is_value_object (value))\n        {\n          ecma_gc_set_object_visited (ecma_get_object_from_value (value));\n        }\n        continue;\n      }\n\n      ecma_property_value_t *accessor_objs_p = property_pair_p->values + index;\n\n      ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (accessor_objs_p);\n\n      if (get_set_pair_p->getter_cp != JMEM_CP_NULL)\n      {\n        ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, get_set_pair_p->getter_cp));\n      }\n\n      if (get_set_pair_p->setter_cp != JMEM_CP_NULL)\n      {\n        ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, get_set_pair_p->setter_cp));\n      }\n\n      continue;\n    }\n\n    if (!ECMA_PROPERTY_IS_INTERNAL (property))\n    {\n      JERRY_ASSERT (property == ECMA_PROPERTY_TYPE_DELETED\n                    || property == ECMA_PROPERTY_TYPE_HASHMAP);\n      continue;\n    }\n\n    JERRY_ASSERT (property_pair_p->names_cp[index] >= LIT_INTERNAL_MAGIC_STRING_FIRST_DATA\n                  && property_pair_p->names_cp[index] < LIT_MAGIC_STRING__COUNT);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (property_pair_p->names_cp[index] == LIT_INTERNAL_MAGIC_STRING_ENVIRONMENT_RECORD)\n    {\n      ecma_environment_record_t *environment_record_p;\n      environment_record_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_environment_record_t,\n                                                              property_pair_p->values[index].value);\n\n      if (environment_record_p->this_binding != ECMA_VALUE_UNINITIALIZED)\n      {\n        JERRY_ASSERT (ecma_is_value_object (environment_record_p->this_binding));\n        ecma_gc_set_object_visited (ecma_get_object_from_value (environment_record_p->this_binding));\n      }\n\n      JERRY_ASSERT (ecma_is_value_object (environment_record_p->function_object));\n      ecma_gc_set_object_visited (ecma_get_object_from_value (environment_record_p->function_object));\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n} /* ecma_gc_mark_properties */\n\n/**\n * Mark objects referenced by bound function object.\n */\nstatic void JERRY_ATTR_NOINLINE\necma_gc_mark_bound_function_object (ecma_object_t *object_p) /**< bound function object */\n{\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION);\n\n  ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) object_p;\n\n  ecma_object_t *target_func_p;\n  target_func_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                              bound_func_p->header.u.bound_function.target_function);\n\n  ecma_gc_set_object_visited (target_func_p);\n\n  ecma_value_t args_len_or_this = bound_func_p->header.u.bound_function.args_len_or_this;\n\n  if (!ecma_is_value_integer_number (args_len_or_this))\n  {\n    if (ecma_is_value_object (args_len_or_this))\n    {\n      ecma_gc_set_object_visited (ecma_get_object_from_value (args_len_or_this));\n    }\n\n    return;\n  }\n\n  ecma_integer_value_t args_length = ecma_get_integer_from_value (args_len_or_this);\n  ecma_value_t *args_p = (ecma_value_t *) (bound_func_p + 1);\n\n  JERRY_ASSERT (args_length > 0);\n\n  for (ecma_integer_value_t i = 0; i < args_length; i++)\n  {\n    if (ecma_is_value_object (args_p[i]))\n    {\n      ecma_gc_set_object_visited (ecma_get_object_from_value (args_p[i]));\n    }\n  }\n} /* ecma_gc_mark_bound_function_object */\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n/**\n * Mark objects referenced by Promise built-in.\n */\nstatic void\necma_gc_mark_promise_object (ecma_extended_object_t *ext_object_p) /**< extended object */\n{\n  /* Mark promise result. */\n  ecma_value_t result = ext_object_p->u.class_prop.u.value;\n\n  if (ecma_is_value_object (result))\n  {\n    ecma_gc_set_object_visited (ecma_get_object_from_value (result));\n  }\n\n  /* Mark all reactions. */\n  ecma_promise_object_t *promise_object_p = (ecma_promise_object_t *) ext_object_p;\n\n  if (!ecma_is_value_empty (promise_object_p->resolve))\n  {\n    JERRY_ASSERT (ecma_is_value_object (promise_object_p->resolve)\n                  && ecma_is_value_object (promise_object_p->reject));\n    ecma_gc_set_object_visited (ecma_get_object_from_value (promise_object_p->resolve));\n    ecma_gc_set_object_visited (ecma_get_object_from_value (promise_object_p->reject));\n  }\n\n  ecma_collection_t *collection_p = promise_object_p->reactions;\n\n  if (collection_p != NULL)\n  {\n    ecma_value_t *buffer_p = collection_p->buffer_p;\n    ecma_value_t *buffer_end_p = buffer_p + collection_p->item_count;\n\n    while (buffer_p < buffer_end_p)\n    {\n      ecma_value_t value = *buffer_p++;\n\n      ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t, value));\n\n      if (JMEM_CP_GET_FIRST_BIT_FROM_POINTER_TAG (value))\n      {\n        ecma_gc_set_object_visited (ecma_get_object_from_value (*buffer_p++));\n      }\n\n      if (JMEM_CP_GET_SECOND_BIT_FROM_POINTER_TAG (value))\n      {\n        ecma_gc_set_object_visited (ecma_get_object_from_value (*buffer_p++));\n      }\n    }\n  }\n} /* ecma_gc_mark_promise_object */\n\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n/**\n * Mark objects referenced by Map built-in.\n */\nstatic void\necma_gc_mark_map_object (ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (object_p != NULL);\n\n  ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) object_p;\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n  ecma_value_t *start_p = ECMA_CONTAINER_START (container_p);\n  uint32_t entry_count = ECMA_CONTAINER_ENTRY_COUNT (container_p);\n\n  for (uint32_t i = 0; i < entry_count; i+= ECMA_CONTAINER_PAIR_SIZE)\n  {\n    ecma_container_pair_t *entry_p = (ecma_container_pair_t *) (start_p + i);\n\n    if (ecma_is_value_empty (entry_p->key))\n    {\n      continue;\n    }\n\n    if (ecma_is_value_object (entry_p->key))\n    {\n      ecma_gc_set_object_visited (ecma_get_object_from_value (entry_p->key));\n    }\n\n    if (ecma_is_value_object (entry_p->value))\n    {\n      ecma_gc_set_object_visited (ecma_get_object_from_value (entry_p->value));\n    }\n  }\n} /* ecma_gc_mark_map_object */\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n/**\n * Mark objects referenced by WeakMap built-in.\n */\nstatic void\necma_gc_mark_weakmap_object (ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (object_p != NULL);\n\n  ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) object_p;\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n  ecma_value_t *start_p = ECMA_CONTAINER_START (container_p);\n  uint32_t entry_count = ECMA_CONTAINER_ENTRY_COUNT (container_p);\n\n  for (uint32_t i = 0; i < entry_count; i+= ECMA_CONTAINER_PAIR_SIZE)\n  {\n    ecma_container_pair_t *entry_p = (ecma_container_pair_t *) (start_p + i);\n\n    if (ecma_is_value_empty (entry_p->key))\n    {\n      continue;\n    }\n\n    if (ecma_is_value_object (entry_p->value))\n    {\n      ecma_gc_set_object_visited (ecma_get_object_from_value (entry_p->value));\n    }\n  }\n} /* ecma_gc_mark_weakmap_object */\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n\n#if ENABLED (JERRY_BUILTIN_SET)\n/**\n * Mark objects referenced by Set built-in.\n */\nstatic void\necma_gc_mark_set_object (ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (object_p != NULL);\n\n  ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) object_p;\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n  ecma_value_t *start_p = ECMA_CONTAINER_START (container_p);\n  uint32_t entry_count = ECMA_CONTAINER_ENTRY_COUNT (container_p);\n\n  for (uint32_t i = 0; i < entry_count; i+= ECMA_CONTAINER_VALUE_SIZE)\n  {\n    ecma_value_t *entry_p = start_p + i;\n\n    if (ecma_is_value_empty (*entry_p))\n    {\n      continue;\n    }\n\n    if (ecma_is_value_object (*entry_p))\n    {\n      ecma_gc_set_object_visited (ecma_get_object_from_value (*entry_p));\n    }\n  }\n} /* ecma_gc_mark_set_object */\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Mark objects referenced by inactive generator functions, async functions, etc.\n */\nstatic void\necma_gc_mark_executable_object (ecma_object_t *object_p) /**< object */\n{\n  vm_executable_object_t *executable_object_p = (vm_executable_object_t *) object_p;\n\n  if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_ASYNC_GENERATOR_CALLED)\n  {\n    ecma_value_t task = executable_object_p->extended_object.u.class_prop.u.head;\n\n    while (!ECMA_IS_INTERNAL_VALUE_NULL (task))\n    {\n      ecma_async_generator_task_t *task_p;\n      task_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_async_generator_task_t, task);\n\n      JERRY_ASSERT (ecma_is_value_object (task_p->promise));\n      ecma_gc_set_object_visited (ecma_get_object_from_value (task_p->promise));\n\n      if (ecma_is_value_object (task_p->operation_value))\n      {\n        ecma_gc_set_object_visited (ecma_get_object_from_value (task_p->operation_value));\n      }\n\n      task = task_p->next;\n    }\n  }\n\n  ecma_gc_set_object_visited (executable_object_p->frame_ctx.lex_env_p);\n\n  if (!ECMA_EXECUTABLE_OBJECT_IS_SUSPENDED (executable_object_p->extended_object.u.class_prop.extra_info))\n  {\n    /* All objects referenced by running executable objects are strong roots,\n     * and a finished executable object cannot refer to other values. */\n    return;\n  }\n\n  if (ecma_is_value_object (executable_object_p->frame_ctx.this_binding))\n  {\n    ecma_gc_set_object_visited (ecma_get_object_from_value (executable_object_p->frame_ctx.this_binding));\n  }\n\n  const ecma_compiled_code_t *bytecode_header_p = executable_object_p->shared.bytecode_header_p;\n  size_t register_end;\n\n  if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_header_p;\n    register_end = args_p->register_end;\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_header_p;\n    register_end = args_p->register_end;\n  }\n\n  ecma_value_t *register_p = VM_GET_REGISTERS (&executable_object_p->frame_ctx);\n  ecma_value_t *register_end_p = register_p + register_end;\n\n  while (register_p < register_end_p)\n  {\n    if (ecma_is_value_object (*register_p))\n    {\n      ecma_gc_set_object_visited (ecma_get_object_from_value (*register_p));\n    }\n\n    register_p++;\n  }\n\n  if (executable_object_p->frame_ctx.context_depth > 0)\n  {\n    ecma_value_t *context_end_p = register_p;\n\n    register_p += executable_object_p->frame_ctx.context_depth;\n\n    ecma_value_t *context_top_p = register_p;\n\n    do\n    {\n      uint32_t offsets = vm_get_context_value_offsets (context_top_p);\n\n      while (VM_CONTEXT_HAS_NEXT_OFFSET (offsets))\n      {\n        int32_t offset = VM_CONTEXT_GET_NEXT_OFFSET (offsets);\n\n        if (ecma_is_value_object (context_top_p[offset]))\n        {\n          ecma_gc_set_object_visited (ecma_get_object_from_value (context_top_p[offset]));\n        }\n\n        offsets >>= VM_CONTEXT_OFFSET_SHIFT;\n      }\n\n      JERRY_ASSERT (context_top_p >= context_end_p + offsets);\n      context_top_p -= offsets;\n    }\n    while (context_top_p > context_end_p);\n  }\n\n  register_end_p = executable_object_p->frame_ctx.stack_top_p;\n\n  while (register_p < register_end_p)\n  {\n    if (ecma_is_value_object (*register_p))\n    {\n      ecma_gc_set_object_visited (ecma_get_object_from_value (*register_p));\n    }\n\n    register_p++;\n  }\n\n  if (ecma_is_value_object (executable_object_p->frame_ctx.block_result))\n  {\n    ecma_gc_set_object_visited (ecma_get_object_from_value (executable_object_p->frame_ctx.block_result));\n  }\n} /* ecma_gc_mark_executable_object */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n/**\n * Mark the objects referenced by a proxy object\n */\nstatic void\necma_gc_mark_proxy_object (ecma_object_t *object_p) /**< proxy object */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (object_p));\n\n  ecma_proxy_object_t *proxy_p = (ecma_proxy_object_t *) object_p;\n\n  if (!ecma_is_value_null (proxy_p->target))\n  {\n    ecma_gc_set_object_visited (ecma_get_object_from_value (proxy_p->target));\n  }\n\n  if (!ecma_is_value_null (proxy_p->handler))\n  {\n    ecma_gc_set_object_visited (ecma_get_object_from_value (proxy_p->handler));\n  }\n} /* ecma_gc_mark_proxy_object */\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n/**\n * Mark objects as visited starting from specified object as root\n */\nstatic void\necma_gc_mark (ecma_object_t *object_p) /**< object to mark from */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (ecma_gc_is_object_visited (object_p));\n\n  if (ecma_is_lexical_environment (object_p))\n  {\n    jmem_cpointer_t outer_lex_env_cp = object_p->u2.outer_reference_cp;\n\n    if (outer_lex_env_cp != JMEM_CP_NULL)\n    {\n      ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, outer_lex_env_cp));\n    }\n\n    if (ecma_get_lex_env_type (object_p) != ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n    {\n      ecma_object_t *binding_object_p = ecma_get_lex_env_binding_object (object_p);\n      ecma_gc_set_object_visited (binding_object_p);\n      return;\n    }\n  }\n  else\n  {\n    ecma_object_type_t object_type = ecma_get_object_type (object_p);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    if (JERRY_UNLIKELY (ecma_get_object_is_builtin (object_p)))\n    {\n      ecma_value_t realm_value;\n\n      if (ECMA_BUILTIN_IS_EXTENDED_BUILT_IN (object_type))\n      {\n        realm_value = ((ecma_extended_built_in_object_t *) object_p)->built_in.realm_value;\n      }\n      else\n      {\n        ecma_extended_object_t *extended_object_p = (ecma_extended_object_t *) object_p;\n\n        if (object_type == ECMA_OBJECT_TYPE_GENERAL\n            && extended_object_p->u.built_in.id == ECMA_BUILTIN_ID_GLOBAL)\n        {\n          ecma_gc_mark_global_object ((ecma_global_object_t *) object_p);\n        }\n\n        realm_value = extended_object_p->u.built_in.realm_value;\n      }\n\n      ecma_gc_set_object_visited (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, realm_value));\n    }\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n    /**\n     * Have the object's prototype here so the object could set it to JMEM_CP_NULL\n     * if the prototype should be ignored (like in case of PROXY).\n     */\n    jmem_cpointer_t proto_cp = object_p->u2.prototype_cp;\n\n    switch (object_type)\n    {\n#if !ENABLED (JERRY_BUILTIN_REALMS)\n      case ECMA_OBJECT_TYPE_GENERAL:\n      {\n        if (JERRY_UNLIKELY (ecma_get_object_is_builtin (object_p))\n            && ((ecma_extended_object_t *) object_p)->u.built_in.id == ECMA_BUILTIN_ID_GLOBAL)\n        {\n          ecma_gc_mark_global_object ((ecma_global_object_t *) object_p);\n        }\n        break;\n      }\n#endif /* !ENABLED (JERRY_BUILTIN_REALMS) */\n      case ECMA_OBJECT_TYPE_CLASS:\n      {\n        ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n        switch (ext_object_p->u.class_prop.class_id)\n        {\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n          case LIT_MAGIC_STRING_PROMISE_UL:\n          {\n            ecma_gc_mark_promise_object (ext_object_p);\n            break;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n          case LIT_MAGIC_STRING_DATAVIEW_UL:\n          {\n            ecma_dataview_object_t *dataview_p = (ecma_dataview_object_t *) object_p;\n            ecma_gc_set_object_visited (dataview_p->buffer_p);\n            break;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */\n#if ENABLED (JERRY_BUILTIN_CONTAINER)\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n          case LIT_MAGIC_STRING_WEAKSET_UL:\n          {\n            break;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n#if ENABLED (JERRY_BUILTIN_SET)\n          case LIT_MAGIC_STRING_SET_UL:\n          {\n            ecma_gc_mark_set_object (object_p);\n            break;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n          case LIT_MAGIC_STRING_WEAKMAP_UL:\n          {\n            ecma_gc_mark_weakmap_object (object_p);\n            break;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n#if ENABLED (JERRY_BUILTIN_MAP)\n          case LIT_MAGIC_STRING_MAP_UL:\n          {\n            ecma_gc_mark_map_object (object_p);\n            break;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */\n#if ENABLED (JERRY_ESNEXT)\n          case LIT_MAGIC_STRING_GENERATOR_UL:\n          case LIT_MAGIC_STRING_ASYNC_GENERATOR_UL:\n          {\n            ecma_gc_mark_executable_object (object_p);\n            break;\n          }\n          case LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY:\n          {\n            ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) object_p;\n\n            if (ecma_is_value_object (capability_p->header.u.class_prop.u.promise))\n            {\n              ecma_gc_set_object_visited (ecma_get_object_from_value (capability_p->header.u.class_prop.u.promise));\n            }\n            if (ecma_is_value_object (capability_p->resolve))\n            {\n              ecma_gc_set_object_visited (ecma_get_object_from_value (capability_p->resolve));\n            }\n            if (ecma_is_value_object (capability_p->reject))\n            {\n              ecma_gc_set_object_visited (ecma_get_object_from_value (capability_p->reject));\n            }\n            break;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          default:\n          {\n            break;\n          }\n        }\n\n        break;\n      }\n      case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n      {\n        ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n        switch (ext_object_p->u.pseudo_array.type)\n        {\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n          case ECMA_PSEUDO_ARRAY_TYPEDARRAY:\n          case ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO:\n          {\n            ecma_gc_set_object_visited (ecma_typedarray_get_arraybuffer (object_p));\n            break;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#if ENABLED (JERRY_ESNEXT)\n          case ECMA_PSEUDO_ARRAY_ITERATOR:\n          case ECMA_PSEUDO_SET_ITERATOR:\n          case ECMA_PSEUDO_MAP_ITERATOR:\n          {\n            ecma_value_t iterated_value = ext_object_p->u.pseudo_array.u2.iterated_value;\n            if (!ecma_is_value_empty (iterated_value))\n            {\n              ecma_gc_set_object_visited (ecma_get_object_from_value (iterated_value));\n            }\n            break;\n          }\n          case ECMA_PSEUDO_STRING_ITERATOR:\n          {\n            break;\n          }\n          case ECMA_PSEUDO_REGEXP_STRING_ITERATOR:\n          {\n            ecma_regexp_string_iterator_t *regexp_string_iterator_obj = (ecma_regexp_string_iterator_t *) object_p;\n            ecma_value_t regexp = regexp_string_iterator_obj->iterating_regexp;\n            ecma_gc_set_object_visited (ecma_get_object_from_value (regexp));\n            break;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          default:\n          {\n            JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);\n\n            ecma_gc_mark_arguments_object (ext_object_p);\n            break;\n          }\n        }\n\n        break;\n      }\n      case ECMA_OBJECT_TYPE_ARRAY:\n      {\n        ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n#if ENABLED (JERRY_ESNEXT)\n        if (JERRY_UNLIKELY (ext_object_p->u.array.length_prop_and_hole_count & ECMA_ARRAY_TEMPLATE_LITERAL))\n        {\n          /* Template objects are never marked. */\n          JERRY_ASSERT (object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE);\n          return;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (ecma_op_array_is_fast_array (ext_object_p))\n        {\n          if (object_p->u1.property_list_cp != JMEM_CP_NULL)\n          {\n            ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n            for (uint32_t i = 0; i < ext_object_p->u.array.length; i++)\n            {\n              if (ecma_is_value_object (values_p[i]))\n              {\n                ecma_gc_set_object_visited (ecma_get_object_from_value (values_p[i]));\n              }\n            }\n          }\n\n          if (proto_cp != JMEM_CP_NULL)\n          {\n            ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, proto_cp));\n          }\n          return;\n        }\n        break;\n      }\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      case ECMA_OBJECT_TYPE_PROXY:\n      {\n        ecma_gc_mark_proxy_object (object_p);\n        /* The protoype of the proxy should be \"empty\" (aside from the tag bits every other bit should be zero). */\n        JERRY_ASSERT ((object_p->u2.prototype_cp & ~JMEM_TAG_MASK) == 0);\n        /* Make sure that the prototype is not checked below. */\n        proto_cp = JMEM_CP_NULL;\n        break;\n      }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n      case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n      {\n        ecma_gc_mark_bound_function_object (object_p);\n        break;\n      }\n      case ECMA_OBJECT_TYPE_FUNCTION:\n      {\n        JERRY_ASSERT (!ecma_get_object_is_builtin (object_p));\n\n        ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n        ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                                                ext_func_p->u.function.scope_cp));\n\n#if ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS)\n        const ecma_compiled_code_t *byte_code_p = ecma_op_function_get_compiled_code (ext_func_p);\n#endif /* ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS) */\n\n#if ENABLED (JERRY_ESNEXT)\n        if (CBC_FUNCTION_IS_ARROW (byte_code_p->status_flags))\n        {\n          ecma_arrow_function_t *arrow_func_p = (ecma_arrow_function_t *) object_p;\n\n          if (ecma_is_value_object (arrow_func_p->this_binding))\n          {\n            ecma_gc_set_object_visited (ecma_get_object_from_value (arrow_func_p->this_binding));\n          }\n\n          if (ecma_is_value_object (arrow_func_p->new_target))\n          {\n            ecma_gc_set_object_visited (ecma_get_object_from_value (arrow_func_p->new_target));\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n        if (ext_func_p->u.function.bytecode_cp == JMEM_CP_NULL)\n        {\n          /* Static snapshot functions have a global realm */\n          break;\n        }\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n        ecma_object_t *realm_p;\n\n        if (byte_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n        {\n          cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) byte_code_p;\n          realm_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, args_p->realm_value);\n        }\n        else\n        {\n          cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) byte_code_p;\n          realm_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, args_p->realm_value);\n        }\n\n        ecma_gc_set_object_visited (realm_p);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS)\n      case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n      {\n#endif /* ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS) */\n\n        if (!ecma_get_object_is_builtin (object_p))\n        {\n#if ENABLED (JERRY_BUILTIN_REALMS)\n          ecma_native_function_t *native_function_p = (ecma_native_function_t *) object_p;\n          ecma_gc_set_object_visited (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t,\n                                                                       native_function_p->realm_value));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n          break;\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n\n        if (ext_func_p->u.built_in.id == ECMA_BUILTIN_ID_HANDLER)\n        {\n          switch (ext_func_p->u.built_in.routine_id)\n          {\n            case ECMA_NATIVE_HANDLER_PROMISE_RESOLVE:\n            case ECMA_NATIVE_HANDLER_PROMISE_REJECT:\n            {\n              ecma_promise_resolver_t *resolver_obj_p = (ecma_promise_resolver_t *) object_p;\n              ecma_gc_set_object_visited (ecma_get_object_from_value (resolver_obj_p->promise));\n              break;\n            }\n            case ECMA_NATIVE_HANDLER_PROMISE_THEN_FINALLY:\n            case ECMA_NATIVE_HANDLER_PROMISE_CATCH_FINALLY:\n            {\n              ecma_promise_finally_function_t *finally_obj_p = (ecma_promise_finally_function_t *) object_p;\n              ecma_gc_set_object_visited (ecma_get_object_from_value (finally_obj_p->constructor));\n              ecma_gc_set_object_visited (ecma_get_object_from_value (finally_obj_p->on_finally));\n              break;\n            }\n            case ECMA_NATIVE_HANDLER_PROMISE_CAPABILITY_EXECUTOR:\n            {\n              ecma_promise_capability_executor_t *executor_p = (ecma_promise_capability_executor_t *) object_p;\n              ecma_gc_set_object_visited (ecma_get_object_from_value (executor_p->capability));\n              break;\n            }\n            case ECMA_NATIVE_HANDLER_PROMISE_ALL_HELPER:\n            {\n              ecma_promise_all_executor_t *executor_p = (ecma_promise_all_executor_t *) object_p;\n              ecma_gc_set_object_visited (ecma_get_object_from_value (executor_p->capability));\n              ecma_gc_set_object_visited (ecma_get_object_from_value (executor_p->values));\n              ecma_gc_set_object_visited (ecma_get_object_from_value (executor_p->remaining_elements));\n              break;\n            }\n#if ENABLED (JERRY_BUILTIN_PROXY)\n            case ECMA_NATIVE_HANDLER_PROXY_REVOKE:\n            {\n              ecma_revocable_proxy_object_t *rev_proxy_p = (ecma_revocable_proxy_object_t *) object_p;\n\n              if (!ecma_is_value_null (rev_proxy_p->proxy))\n              {\n                ecma_gc_set_object_visited (ecma_get_object_from_value (rev_proxy_p->proxy));\n              }\n\n              break;\n            }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n            case ECMA_NATIVE_HANDLER_VALUE_THUNK:\n            case ECMA_NATIVE_HANDLER_VALUE_THROWER:\n            {\n              ecma_promise_value_thunk_t *thunk_obj_p = (ecma_promise_value_thunk_t *) object_p;\n\n              if (ecma_is_value_object (thunk_obj_p->value))\n              {\n                ecma_gc_set_object_visited (ecma_get_object_from_value (thunk_obj_p->value));\n              }\n              break;\n            }\n            default:\n            {\n              JERRY_UNREACHABLE ();\n            }\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS)\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS) */\n      default:\n      {\n        break;\n      }\n    }\n\n    if (proto_cp != JMEM_CP_NULL)\n    {\n      ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, proto_cp));\n    }\n  }\n\n  jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  if (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    if (prop_iter_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n    {\n      prop_iter_cp = prop_iter_p->next_property_cp;\n    }\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  while (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    ecma_gc_mark_properties ((ecma_property_pair_t *) prop_iter_p);\n\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n} /* ecma_gc_mark */\n\n/**\n * Free the native handle/pointer by calling its free callback.\n */\nstatic void\necma_gc_free_native_pointer (ecma_property_t *property_p) /**< property */\n{\n  JERRY_ASSERT (property_p != NULL);\n\n  ecma_property_value_t *value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n  ecma_native_pointer_t *native_pointer_p;\n\n  native_pointer_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_native_pointer_t,\n                                                      value_p->value);\n\n  while (native_pointer_p != NULL)\n  {\n    if (native_pointer_p->info_p != NULL)\n    {\n      ecma_object_native_free_callback_t free_cb = native_pointer_p->info_p->free_cb;\n\n      if (free_cb != NULL)\n      {\n        free_cb (native_pointer_p->data_p);\n      }\n    }\n\n    ecma_native_pointer_t *next_p = native_pointer_p->next_p;\n\n    jmem_heap_free_block (native_pointer_p, sizeof (ecma_native_pointer_t));\n\n    native_pointer_p = next_p;\n  }\n} /* ecma_gc_free_native_pointer */\n\n/**\n * Free specified arguments object.\n *\n * @return allocated object's size\n */\nstatic size_t\necma_free_arguments_object (ecma_extended_object_t *ext_object_p) /**< arguments object */\n{\n  JERRY_ASSERT (ecma_get_object_type ((ecma_object_t *) ext_object_p) == ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n\n  size_t object_size = sizeof (ecma_unmapped_arguments_t);\n\n  if (ext_object_p->u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED)\n  {\n    ecma_mapped_arguments_t *mapped_arguments_p = (ecma_mapped_arguments_t *) ext_object_p;\n    object_size = sizeof (ecma_mapped_arguments_t);\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n    if (!(mapped_arguments_p->unmapped.header.u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_STATIC_BYTECODE))\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n    {\n      ecma_compiled_code_t *byte_code_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t,\n                                                                           mapped_arguments_p->u.byte_code);\n\n      ecma_bytecode_deref (byte_code_p);\n    }\n  }\n\n  ecma_value_t *argv_p = (ecma_value_t *) (((uint8_t *) ext_object_p) + object_size);\n  ecma_unmapped_arguments_t *arguments_p = (ecma_unmapped_arguments_t *) ext_object_p;\n  uint32_t arguments_number = arguments_p->header.u.pseudo_array.u2.arguments_number;\n\n  for (uint32_t i = 0; i < arguments_number; i++)\n  {\n    ecma_free_value_if_not_object (argv_p[i]);\n  }\n\n  uint32_t saved_argument_count = JERRY_MAX (arguments_number,\n                                             arguments_p->header.u.pseudo_array.u1.formal_params_number);\n\n  return object_size + (saved_argument_count * sizeof (ecma_value_t));\n} /* ecma_free_arguments_object */\n\n/**\n * Free specified fast access mode array object.\n */\nstatic void\necma_free_fast_access_array (ecma_object_t *object_p) /**< fast access mode array object to free */\n{\n  JERRY_ASSERT (ecma_op_object_is_fast_array (object_p));\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  const uint32_t aligned_length = ECMA_FAST_ARRAY_ALIGN_LENGTH (ext_object_p->u.array.length);\n\n  if (object_p->u1.property_list_cp != JMEM_CP_NULL)\n  {\n    ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n    for (uint32_t i = 0; i < aligned_length; i++)\n    {\n      ecma_free_value_if_not_object (values_p[i]);\n    }\n\n    jmem_heap_free_block (values_p, aligned_length * sizeof (ecma_value_t));\n  }\n\n  ecma_dealloc_extended_object (object_p, sizeof (ecma_extended_object_t));\n} /* ecma_free_fast_access_array */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Free non-objects referenced by inactive generator functions, async functions, etc.\n *\n * @return total object size\n */\nstatic size_t\necma_gc_free_executable_object (ecma_object_t *object_p) /**< object */\n{\n  vm_executable_object_t *executable_object_p = (vm_executable_object_t *) object_p;\n\n  const ecma_compiled_code_t *bytecode_header_p = executable_object_p->shared.bytecode_header_p;\n  size_t size, register_end;\n\n  if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_header_p;\n\n    register_end = args_p->register_end;\n    size = (register_end + (size_t) args_p->stack_limit) * sizeof (ecma_value_t);\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_header_p;\n\n    register_end = args_p->register_end;\n    size = (register_end + (size_t) args_p->stack_limit) * sizeof (ecma_value_t);\n  }\n\n  size = JERRY_ALIGNUP (sizeof (vm_executable_object_t) + size, sizeof (uintptr_t));\n\n  JERRY_ASSERT (!(executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_RUNNING));\n\n  ecma_bytecode_deref ((ecma_compiled_code_t *) bytecode_header_p);\n\n  if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_ASYNC_GENERATOR_CALLED)\n  {\n    ecma_value_t task = executable_object_p->extended_object.u.class_prop.u.head;\n\n    while (!ECMA_IS_INTERNAL_VALUE_NULL (task))\n    {\n      ecma_async_generator_task_t *task_p;\n      task_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_async_generator_task_t, task);\n\n      JERRY_ASSERT (ecma_is_value_object (task_p->promise));\n      ecma_free_value_if_not_object (task_p->operation_value);\n\n      task = task_p->next;\n      jmem_heap_free_block (task_p, sizeof (ecma_async_generator_task_t));\n    }\n  }\n\n  if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_COMPLETED)\n  {\n    return size;\n  }\n\n  ecma_free_value_if_not_object (executable_object_p->frame_ctx.this_binding);\n\n  ecma_value_t *register_p = VM_GET_REGISTERS (&executable_object_p->frame_ctx);\n  ecma_value_t *register_end_p = register_p + register_end;\n\n  while (register_p < register_end_p)\n  {\n    ecma_free_value_if_not_object (*register_p++);\n  }\n\n  if (executable_object_p->frame_ctx.context_depth > 0)\n  {\n    ecma_value_t *context_end_p = register_p;\n\n    register_p += executable_object_p->frame_ctx.context_depth;\n\n    ecma_value_t *context_top_p = register_p;\n\n    do\n    {\n      context_top_p[-1] &= (uint32_t) ~VM_CONTEXT_HAS_LEX_ENV;\n\n      uint32_t offsets = vm_get_context_value_offsets (context_top_p);\n\n      while (VM_CONTEXT_HAS_NEXT_OFFSET (offsets))\n      {\n        int32_t offset = VM_CONTEXT_GET_NEXT_OFFSET (offsets);\n\n        if (ecma_is_value_object (context_top_p[offset]))\n        {\n          context_top_p[offset] = ECMA_VALUE_UNDEFINED;\n        }\n\n        offsets >>= VM_CONTEXT_OFFSET_SHIFT;\n      }\n\n      context_top_p = vm_stack_context_abort (&executable_object_p->frame_ctx, context_top_p);\n    }\n    while (context_top_p > context_end_p);\n  }\n\n  register_end_p = executable_object_p->frame_ctx.stack_top_p;\n\n  while (register_p < register_end_p)\n  {\n    ecma_free_value_if_not_object (*register_p++);\n  }\n\n  return size;\n} /* ecma_gc_free_executable_object */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Free properties of an object\n */\nvoid\necma_gc_free_properties (ecma_object_t *object_p) /**< object */\n{\n  jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  if (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                     prop_iter_cp);\n    if (prop_iter_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n    {\n      ecma_property_hashmap_free (object_p);\n      prop_iter_cp = object_p->u1.property_list_cp;\n    }\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  while (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    /* Both cannot be deleted. */\n    JERRY_ASSERT (prop_iter_p->types[0] != ECMA_PROPERTY_TYPE_DELETED\n                  || prop_iter_p->types[1] != ECMA_PROPERTY_TYPE_DELETED);\n\n    ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      ecma_property_t *property_p = (ecma_property_t *) (prop_iter_p->types + i);\n      jmem_cpointer_t name_cp = prop_pair_p->names_cp[i];\n\n      if (*property_p == ECMA_PROPERTY_TYPE_DELETED)\n      {\n        continue;\n      }\n\n      if (!ECMA_PROPERTY_IS_INTERNAL (*property_p))\n      {\n        ecma_free_property (object_p, name_cp, property_p);\n        continue;\n      }\n\n      /* Call the native's free callback. */\n      switch (name_cp)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        case LIT_INTERNAL_MAGIC_STRING_ENVIRONMENT_RECORD:\n        {\n          ecma_environment_record_t *environment_record_p;\n          environment_record_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_environment_record_t,\n                                                                    prop_pair_p->values[i].value);\n          jmem_heap_free_block (environment_record_p, sizeof (ecma_environment_record_t));\n          break;\n        }\n        case LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_COMPUTED:\n        {\n          ecma_value_t *compact_collection_p;\n          compact_collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_value_t,\n                                                                    prop_pair_p->values[i].value);\n          ecma_compact_collection_free (compact_collection_p);\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_WEAKMAP) || ENABLED (JERRY_BUILTIN_WEAKSET)\n        case LIT_INTERNAL_MAGIC_STRING_WEAK_REFS:\n        {\n          ecma_collection_t *refs_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                         prop_pair_p->values[i].value);\n          for (uint32_t j = 0; j < refs_p->item_count; j++)\n          {\n            const ecma_value_t value = refs_p->buffer_p[j];\n            if (!ecma_is_value_empty (value))\n            {\n              ecma_object_t *container_p = ecma_get_object_from_value (value);\n\n              ecma_op_container_remove_weak_entry (container_p,\n                                                   ecma_make_object_value (object_p));\n            }\n          }\n\n          ecma_collection_destroy (refs_p);\n          break;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) || ENABLED (JERRY_BUILTIN_WEAKSET) */\n        default:\n        {\n          JERRY_ASSERT (name_cp == LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER);\n          ecma_gc_free_native_pointer (property_p);\n          break;\n        }\n      }\n\n#if ENABLED (JERRY_LCACHE)\n      if (ecma_is_property_lcached (property_p))\n      {\n        ecma_lcache_invalidate (object_p, name_cp, property_p);\n      }\n#endif /* ENABLED (JERRY_LCACHE) */\n    }\n\n    prop_iter_cp = prop_iter_p->next_property_cp;\n\n    ecma_dealloc_property_pair (prop_pair_p);\n  }\n} /* ecma_gc_free_properties */\n\n/**\n * Free specified object.\n */\nstatic void\necma_gc_free_object (ecma_object_t *object_p) /**< object to free */\n{\n  JERRY_ASSERT (object_p != NULL\n                && !ecma_gc_is_object_visited (object_p)\n                && ((object_p->type_flags_refs & ECMA_OBJECT_REF_MASK) == ECMA_OBJECT_NON_VISITED));\n\n  JERRY_ASSERT (JERRY_CONTEXT (ecma_gc_objects_number) > 0);\n  JERRY_CONTEXT (ecma_gc_objects_number)--;\n\n  if (ecma_is_lexical_environment (object_p))\n  {\n    if (ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n    {\n      ecma_gc_free_properties (object_p);\n    }\n\n    ecma_dealloc_object (object_p);\n    return;\n  }\n\n  ecma_object_type_t object_type = ecma_get_object_type (object_p);\n\n  size_t ext_object_size = sizeof (ecma_extended_object_t);\n\n  if (JERRY_UNLIKELY (ecma_get_object_is_builtin (object_p)))\n  {\n    uint8_t length_and_bitset_size;\n\n    if (ECMA_BUILTIN_IS_EXTENDED_BUILT_IN (object_type))\n    {\n      ext_object_size = sizeof (ecma_extended_built_in_object_t);\n      length_and_bitset_size = ((ecma_extended_built_in_object_t *) object_p)->built_in.u.length_and_bitset_size;\n      ext_object_size += sizeof (uint64_t) * (length_and_bitset_size >> ECMA_BUILT_IN_BITSET_SHIFT);\n    }\n    else\n    {\n      ecma_extended_object_t *extended_object_p = (ecma_extended_object_t *) object_p;\n\n      if (extended_object_p->u.built_in.routine_id > 0)\n      {\n        JERRY_ASSERT (object_type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (extended_object_p->u.built_in.id == ECMA_BUILTIN_ID_HANDLER)\n        {\n          switch (extended_object_p->u.built_in.routine_id)\n          {\n            case ECMA_NATIVE_HANDLER_PROMISE_RESOLVE:\n            case ECMA_NATIVE_HANDLER_PROMISE_REJECT:\n            {\n              ext_object_size = sizeof (ecma_promise_resolver_t);\n              break;\n            }\n            case ECMA_NATIVE_HANDLER_PROMISE_THEN_FINALLY:\n            case ECMA_NATIVE_HANDLER_PROMISE_CATCH_FINALLY:\n            {\n              ext_object_size = sizeof (ecma_promise_finally_function_t);\n              break;\n            }\n            case ECMA_NATIVE_HANDLER_PROMISE_CAPABILITY_EXECUTOR:\n            {\n              ext_object_size = sizeof (ecma_promise_capability_executor_t);\n              break;\n            }\n            case ECMA_NATIVE_HANDLER_PROMISE_ALL_HELPER:\n            {\n              ext_object_size = sizeof (ecma_promise_all_executor_t);\n              break;\n            }\n#if ENABLED (JERRY_BUILTIN_PROXY)\n            case ECMA_NATIVE_HANDLER_PROXY_REVOKE:\n            {\n              ext_object_size = sizeof (ecma_revocable_proxy_object_t);\n              break;\n            }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n            case ECMA_NATIVE_HANDLER_VALUE_THUNK:\n            case ECMA_NATIVE_HANDLER_VALUE_THROWER:\n            {\n              ecma_free_value_if_not_object (((ecma_promise_value_thunk_t *) object_p)->value);\n              ext_object_size = sizeof (ecma_promise_value_thunk_t);\n              break;\n            }\n            default:\n            {\n              JERRY_UNREACHABLE ();\n            }\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n      else if (extended_object_p->u.built_in.id == ECMA_BUILTIN_ID_GLOBAL)\n      {\n        JERRY_ASSERT (object_type == ECMA_OBJECT_TYPE_GENERAL);\n        ext_object_size = sizeof (ecma_global_object_t);\n      }\n      else\n      {\n        length_and_bitset_size = ((ecma_extended_object_t *) object_p)->u.built_in.u.length_and_bitset_size;\n        ext_object_size += sizeof (uint64_t) * (length_and_bitset_size >> ECMA_BUILT_IN_BITSET_SHIFT);\n      }\n\n      ecma_gc_free_properties (object_p);\n      ecma_dealloc_extended_object (object_p, ext_object_size);\n      return;\n    }\n  }\n\n  switch (object_type)\n  {\n    case ECMA_OBJECT_TYPE_GENERAL:\n    {\n      ecma_gc_free_properties (object_p);\n      ecma_dealloc_object (object_p);\n      return;\n    }\n    case ECMA_OBJECT_TYPE_ARRAY:\n    {\n      if (ecma_op_array_is_fast_array ((ecma_extended_object_t *) object_p))\n      {\n        ecma_free_fast_access_array (object_p);\n        return;\n      }\n      break;\n    }\n    case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n    {\n      ext_object_size = sizeof (ecma_native_function_t);\n      break;\n    }\n    case ECMA_OBJECT_TYPE_CLASS:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      switch (ext_object_p->u.class_prop.class_id)\n      {\n        case LIT_MAGIC_STRING_STRING_UL:\n        case LIT_MAGIC_STRING_NUMBER_UL:\n#if ENABLED (JERRY_ESNEXT)\n        case LIT_MAGIC_STRING_SYMBOL_UL:\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n        case LIT_MAGIC_STRING_BIGINT_UL:\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n        {\n          ecma_free_value (ext_object_p->u.class_prop.u.value);\n          break;\n        }\n\n        case LIT_MAGIC_STRING_DATE_UL:\n        {\n          ecma_number_t *num_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_number_t,\n                                                                  ext_object_p->u.class_prop.u.value);\n          ecma_dealloc_number (num_p);\n          break;\n        }\n        case LIT_MAGIC_STRING_REGEXP_UL:\n        {\n          ecma_compiled_code_t *bytecode_p = ECMA_GET_INTERNAL_VALUE_ANY_POINTER (ecma_compiled_code_t,\n                                                                                  ext_object_p->u.class_prop.u.value);\n\n          ecma_bytecode_deref (bytecode_p);\n\n          break;\n        }\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n        case LIT_MAGIC_STRING_ARRAY_BUFFER_UL:\n        {\n          uint32_t arraybuffer_length = ext_object_p->u.class_prop.u.length;\n\n          if (ECMA_ARRAYBUFFER_HAS_EXTERNAL_MEMORY (ext_object_p))\n          {\n            ext_object_size = sizeof (ecma_arraybuffer_external_info);\n\n            /* Call external free callback if any. */\n            ecma_arraybuffer_external_info *array_p = (ecma_arraybuffer_external_info *) ext_object_p;\n\n            if (array_p->free_cb != NULL)\n            {\n              array_p->free_cb (array_p->buffer_p);\n            }\n          }\n          else\n          {\n            ext_object_size += arraybuffer_length;\n          }\n\n          break;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n        case LIT_MAGIC_STRING_PROMISE_UL:\n        {\n          ecma_free_value_if_not_object (ext_object_p->u.class_prop.u.value);\n\n          /* Reactions only contains objects. */\n          ecma_collection_destroy (((ecma_promise_object_t *) object_p)->reactions);\n\n          ext_object_size = sizeof (ecma_promise_object_t);\n          break;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n#if ENABLED (JERRY_BUILTIN_CONTAINER)\n#if ENABLED (JERRY_BUILTIN_MAP)\n        case LIT_MAGIC_STRING_MAP_UL:\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n#if ENABLED (JERRY_BUILTIN_SET)\n        case LIT_MAGIC_STRING_SET_UL:\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n        case LIT_MAGIC_STRING_WEAKMAP_UL:\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n        case LIT_MAGIC_STRING_WEAKSET_UL:\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n        {\n          ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) object_p;\n          ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                            map_object_p->u.class_prop.u.value);\n          ecma_op_container_free_entries (object_p);\n          ecma_collection_destroy (container_p);\n\n          break;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n        case LIT_MAGIC_STRING_DATAVIEW_UL:\n        {\n          ext_object_size = sizeof (ecma_dataview_object_t);\n          break;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */\n#if ENABLED (JERRY_ESNEXT)\n        case LIT_MAGIC_STRING_GENERATOR_UL:\n        case LIT_MAGIC_STRING_ASYNC_GENERATOR_UL:\n        {\n          ext_object_size = ecma_gc_free_executable_object (object_p);\n          break;\n        }\n        case LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY:\n        {\n          ext_object_size = sizeof (ecma_promise_capabality_t);\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n        case LIT_MAGIC_STRING_RUNNABLE_UL:\n        {\n          ecma_extended_object_t *wrapper_p = (ecma_extended_object_t *) object_p;\n\n          JERRY_ASSERT (wrapper_p->u.class_prop.extra_info == ECMA_RUNNABLE_FLAGS_MODULE);\n          ecma_module_t *root_module_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_module_t,\n                                                                          wrapper_p->u.class_prop.u.value);\n\n          ecma_bytecode_deref (root_module_p->compiled_code_p);\n          ecma_module_cleanup (root_module_p);\n          break;\n        }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n        default:\n        {\n          /* The undefined id represents an uninitialized class. */\n          JERRY_ASSERT (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_UNDEFINED\n                        || ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_ARGUMENTS_UL\n                        || ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_BOOLEAN_UL\n                        || ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_ERROR_UL\n                        || ext_object_p->u.class_prop.class_id == LIT_INTERNAL_MAGIC_STRING_INTERNAL_OBJECT);\n          break;\n        }\n      }\n\n      break;\n    }\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    case ECMA_OBJECT_TYPE_PROXY:\n    {\n      /* The protoype of the proxy should be \"empty\" (aside from the tag bits every other bit should be zero). */\n      JERRY_ASSERT ((object_p->u2.prototype_cp & ~JMEM_TAG_MASK) == 0);\n      ext_object_size = sizeof (ecma_proxy_object_t);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n    case ECMA_OBJECT_TYPE_FUNCTION:\n    {\n      /* Function with byte-code (not a built-in function). */\n      ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n      if (ext_func_p->u.function.bytecode_cp != ECMA_NULL_POINTER)\n      {\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n        ecma_compiled_code_t *byte_code_p = (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t,\n                                                                              ext_func_p->u.function.bytecode_cp));\n\n#if ENABLED (JERRY_ESNEXT)\n        if (CBC_FUNCTION_IS_ARROW (byte_code_p->status_flags))\n        {\n          ecma_free_value_if_not_object (((ecma_arrow_function_t *) object_p)->this_binding);\n          ecma_free_value_if_not_object (((ecma_arrow_function_t *) object_p)->new_target);\n          ext_object_size = sizeof (ecma_arrow_function_t);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        ecma_bytecode_deref (byte_code_p);\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n      }\n      else\n      {\n        ext_object_size = sizeof (ecma_static_function_t);\n      }\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n      break;\n    }\n    case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      switch (ext_object_p->u.pseudo_array.type)\n      {\n        case ECMA_PSEUDO_ARRAY_ARGUMENTS:\n        {\n          ext_object_size = ecma_free_arguments_object (ext_object_p);\n          break;\n        }\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n        case ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO:\n        {\n          ext_object_size = sizeof (ecma_extended_typedarray_object_t);\n          break;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#if ENABLED (JERRY_ESNEXT)\n        case ECMA_PSEUDO_STRING_ITERATOR:\n        {\n          ecma_value_t iterated_value = ext_object_p->u.pseudo_array.u2.iterated_value;\n\n          if (!ecma_is_value_empty (iterated_value))\n          {\n            ecma_deref_ecma_string (ecma_get_string_from_value (iterated_value));\n          }\n\n          break;\n        }\n        case ECMA_PSEUDO_REGEXP_STRING_ITERATOR:\n        {\n          ecma_regexp_string_iterator_t *regexp_string_iterator_obj = (ecma_regexp_string_iterator_t *) object_p;\n          ecma_value_t iterated_string = regexp_string_iterator_obj->iterated_string;\n\n          if (!ecma_is_value_empty (iterated_string))\n          {\n            ecma_deref_ecma_string (ecma_get_string_from_value (iterated_string));\n          }\n\n          ext_object_size = sizeof (ecma_regexp_string_iterator_t);\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        default:\n        {\n          JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY\n                        || ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ITERATOR\n                        || ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_SET_ITERATOR\n                        || ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_MAP_ITERATOR);\n          break;\n        }\n      }\n\n      break;\n    }\n    case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n    {\n      ext_object_size = sizeof (ecma_bound_function_t);\n      ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) object_p;\n\n      ecma_value_t args_len_or_this = bound_func_p->header.u.bound_function.args_len_or_this;\n\n#if ENABLED (JERRY_ESNEXT)\n      ecma_free_value (bound_func_p->target_length);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (!ecma_is_value_integer_number (args_len_or_this))\n      {\n        ecma_free_value_if_not_object (args_len_or_this);\n        break;\n      }\n\n      ecma_integer_value_t args_length = ecma_get_integer_from_value (args_len_or_this);\n      ecma_value_t *args_p = (ecma_value_t *) (bound_func_p + 1);\n\n      for (ecma_integer_value_t i = 0; i < args_length; i++)\n      {\n        ecma_free_value_if_not_object (args_p[i]);\n      }\n\n      size_t args_size = ((size_t) args_length) * sizeof (ecma_value_t);\n      ext_object_size += args_size;\n      break;\n    }\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n\n  ecma_gc_free_properties (object_p);\n  ecma_dealloc_extended_object (object_p, ext_object_size);\n} /* ecma_gc_free_object */\n\n/**\n * Run garbage collection, freeing objects that are no longer referenced.\n */\nvoid\necma_gc_run (void)\n{\n#if (JERRY_GC_MARK_LIMIT != 0)\n  JERRY_ASSERT (JERRY_CONTEXT (ecma_gc_mark_recursion_limit) == JERRY_GC_MARK_LIMIT);\n#endif /* (JERRY_GC_MARK_LIMIT != 0) */\n\n  JERRY_CONTEXT (ecma_gc_new_objects) = 0;\n\n  ecma_object_t black_list_head;\n  black_list_head.gc_next_cp = JMEM_CP_NULL;\n  ecma_object_t *black_end_p = &black_list_head;\n\n  ecma_object_t white_gray_list_head;\n  white_gray_list_head.gc_next_cp = JERRY_CONTEXT (ecma_gc_objects_cp);\n\n  ecma_object_t *obj_prev_p = &white_gray_list_head;\n  jmem_cpointer_t obj_iter_cp = obj_prev_p->gc_next_cp;\n  ecma_object_t *obj_iter_p;\n\n  /* Move root objects (i.e. they have global or stack references) to the black list. */\n  while (obj_iter_cp != JMEM_CP_NULL)\n  {\n    obj_iter_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_object_t, obj_iter_cp);\n    const jmem_cpointer_t obj_next_cp = obj_iter_p->gc_next_cp;\n\n    JERRY_ASSERT (obj_prev_p == NULL\n                  || ECMA_GET_NON_NULL_POINTER (ecma_object_t, obj_prev_p->gc_next_cp) == obj_iter_p);\n\n    if (obj_iter_p->type_flags_refs >= ECMA_OBJECT_REF_ONE)\n    {\n      /* Moving the object to list of marked objects. */\n      obj_prev_p->gc_next_cp = obj_next_cp;\n\n      black_end_p->gc_next_cp = obj_iter_cp;\n      black_end_p = obj_iter_p;\n    }\n    else\n    {\n      obj_iter_p->type_flags_refs |= ECMA_OBJECT_NON_VISITED;\n      obj_prev_p = obj_iter_p;\n    }\n\n    obj_iter_cp = obj_next_cp;\n  }\n\n  black_end_p->gc_next_cp = JMEM_CP_NULL;\n\n  /* Mark root objects. */\n  obj_iter_cp = black_list_head.gc_next_cp;\n  while (obj_iter_cp != JMEM_CP_NULL)\n  {\n    obj_iter_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_object_t, obj_iter_cp);\n    ecma_gc_mark (obj_iter_p);\n    obj_iter_cp = obj_iter_p->gc_next_cp;\n  }\n\n  /* Mark non-root objects. */\n  bool marked_anything_during_current_iteration;\n\n  do\n  {\n#if (JERRY_GC_MARK_LIMIT != 0)\n    JERRY_ASSERT (JERRY_CONTEXT (ecma_gc_mark_recursion_limit) == JERRY_GC_MARK_LIMIT);\n#endif /* (JERRY_GC_MARK_LIMIT != 0) */\n\n    marked_anything_during_current_iteration = false;\n\n    obj_prev_p = &white_gray_list_head;\n    obj_iter_cp = obj_prev_p->gc_next_cp;\n\n    while (obj_iter_cp != JMEM_CP_NULL)\n    {\n      obj_iter_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_object_t, obj_iter_cp);\n      const jmem_cpointer_t obj_next_cp = obj_iter_p->gc_next_cp;\n\n      JERRY_ASSERT (obj_prev_p == NULL\n                    || ECMA_GET_NON_NULL_POINTER (ecma_object_t, obj_prev_p->gc_next_cp) == obj_iter_p);\n\n      if (ecma_gc_is_object_visited (obj_iter_p))\n      {\n        /* Moving the object to list of marked objects */\n        obj_prev_p->gc_next_cp = obj_next_cp;\n\n        black_end_p->gc_next_cp = obj_iter_cp;\n        black_end_p = obj_iter_p;\n\n#if (JERRY_GC_MARK_LIMIT != 0)\n        if (obj_iter_p->type_flags_refs >= ECMA_OBJECT_REF_ONE)\n        {\n          /* Set the reference count of non-marked gray object to 0 */\n          obj_iter_p->type_flags_refs = (uint16_t) (obj_iter_p->type_flags_refs & (ECMA_OBJECT_REF_ONE - 1));\n          ecma_gc_mark (obj_iter_p);\n          marked_anything_during_current_iteration = true;\n        }\n#else /* (JERRY_GC_MARK_LIMIT == 0) */\n        marked_anything_during_current_iteration = true;\n#endif /* (JERRY_GC_MARK_LIMIT != 0) */\n      }\n      else\n      {\n        obj_prev_p = obj_iter_p;\n      }\n\n      obj_iter_cp = obj_next_cp;\n    }\n  }\n  while (marked_anything_during_current_iteration);\n\n  black_end_p->gc_next_cp = JMEM_CP_NULL;\n  JERRY_CONTEXT (ecma_gc_objects_cp) = black_list_head.gc_next_cp;\n\n  /* Sweep objects that are currently unmarked. */\n  obj_iter_cp = white_gray_list_head.gc_next_cp;\n\n  while (obj_iter_cp != JMEM_CP_NULL)\n  {\n    obj_iter_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_object_t, obj_iter_cp);\n    const jmem_cpointer_t obj_next_cp = obj_iter_p->gc_next_cp;\n\n    JERRY_ASSERT (!ecma_gc_is_object_visited (obj_iter_p));\n\n    ecma_gc_free_object (obj_iter_p);\n    obj_iter_cp = obj_next_cp;\n  }\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  /* Free RegExp bytecodes stored in cache */\n  re_cache_gc ();\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n} /* ecma_gc_run */\n\n/**\n * Try to free some memory (depending on memory pressure).\n *\n * When called with JMEM_PRESSURE_FULL, the engine will be terminated with ERR_OUT_OF_MEMORY.\n */\nvoid\necma_free_unused_memory (jmem_pressure_t pressure) /**< current pressure */\n{\n#if ENABLED (JERRY_DEBUGGER)\n  while ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n         && JERRY_CONTEXT (debugger_byte_code_free_tail) != ECMA_NULL_POINTER)\n  {\n    /* Wait until all byte code is freed or the connection is aborted. */\n    jerry_debugger_receive (NULL);\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  if (JERRY_LIKELY (pressure == JMEM_PRESSURE_LOW))\n  {\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n    if (JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) > ECMA_PROP_HASHMAP_ALLOC_ON)\n    {\n      --JERRY_CONTEXT (ecma_prop_hashmap_alloc_state);\n    }\n    JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_HIGH_PRESSURE_GC;\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n    /*\n     * If there is enough newly allocated objects since last GC, probably it is worthwhile to start GC now.\n     * Otherwise, probability to free sufficient space is considered to be low.\n     */\n    size_t new_objects_fraction = CONFIG_ECMA_GC_NEW_OBJECTS_FRACTION;\n\n    if (JERRY_CONTEXT (ecma_gc_new_objects) * new_objects_fraction > JERRY_CONTEXT (ecma_gc_objects_number))\n    {\n      ecma_gc_run ();\n    }\n\n    return;\n  }\n  else if (pressure == JMEM_PRESSURE_HIGH)\n  {\n    /* Freeing as much memory as we currently can */\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n    if (JERRY_CONTEXT (status_flags) & ECMA_STATUS_HIGH_PRESSURE_GC)\n    {\n      JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) = ECMA_PROP_HASHMAP_ALLOC_MAX;\n    }\n    else if (JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) < ECMA_PROP_HASHMAP_ALLOC_MAX)\n    {\n      ++JERRY_CONTEXT (ecma_prop_hashmap_alloc_state);\n      JERRY_CONTEXT (status_flags) |= ECMA_STATUS_HIGH_PRESSURE_GC;\n    }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n    ecma_gc_run ();\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n    /* Free hashmaps of remaining objects. */\n    jmem_cpointer_t obj_iter_cp = JERRY_CONTEXT (ecma_gc_objects_cp);\n\n    while (obj_iter_cp != JMEM_CP_NULL)\n    {\n      ecma_object_t *obj_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, obj_iter_cp);\n\n      if (!ecma_is_lexical_environment (obj_iter_p)\n          || ecma_get_lex_env_type (obj_iter_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n      {\n        if (!ecma_is_lexical_environment (obj_iter_p)\n            && ecma_op_object_is_fast_array (obj_iter_p))\n        {\n          obj_iter_cp = obj_iter_p->gc_next_cp;\n          continue;\n        }\n\n        jmem_cpointer_t prop_iter_cp = obj_iter_p->u1.property_list_cp;\n\n        if (prop_iter_cp != JMEM_CP_NULL)\n        {\n          ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n\n          if (prop_iter_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n          {\n            ecma_property_hashmap_free (obj_iter_p);\n          }\n        }\n\n      }\n\n      obj_iter_cp = obj_iter_p->gc_next_cp;\n    }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n    jmem_pools_collect_empty ();\n    return;\n  }\n  else if (JERRY_UNLIKELY (pressure == JMEM_PRESSURE_FULL))\n  {\n    jerry_fatal (ERR_OUT_OF_MEMORY);\n  }\n  else\n  {\n    JERRY_ASSERT (pressure == JMEM_PRESSURE_NONE);\n    JERRY_UNREACHABLE ();\n  }\n} /* ecma_free_unused_memory */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-gc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_GC_H\n#define ECMA_GC_H\n\n#include \"ecma-globals.h\"\n#include \"jmem.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmagc Garbage collector\n * @{\n */\n\nvoid ecma_init_gc_info (ecma_object_t *object_p);\nvoid ecma_ref_object (ecma_object_t *object_p);\nvoid ecma_deref_object (ecma_object_t *object_p);\nvoid ecma_gc_free_properties (ecma_object_t *object_p);\nvoid ecma_gc_run (void);\nvoid ecma_free_unused_memory (jmem_pressure_t pressure);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_GC_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-globals.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_GLOBALS_H\n#define ECMA_GLOBALS_H\n\n#include \"config.h\"\n#include \"jrt.h\"\n#include \"lit-magic-strings.h\"\n#include \"jmem.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmatypes ECMA types\n * @{\n *\n * \\addtogroup compressedpointer Compressed pointer\n * @{\n */\n\n/**\n * The NULL value for compressed pointers\n */\n#define ECMA_NULL_POINTER JMEM_CP_NULL\n\n#if defined (JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY)\n\n/**\n * JMEM_ALIGNMENT_LOG aligned pointers can be stored directly in ecma_value_t\n */\n#define ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY\n\n#endif /* JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY */\n\n/**\n * @}\n */\n\n/**\n * JerryScript init flags.\n */\ntypedef enum\n{\n  ECMA_INIT_EMPTY               = (0u),      /**< empty flag set */\n  ECMA_INIT_SHOW_OPCODES        = (1u << 0), /**< dump byte-code to log after parse */\n  ECMA_INIT_SHOW_REGEXP_OPCODES = (1u << 1), /**< dump regexp byte-code to log after compilation */\n  ECMA_INIT_MEM_STATS           = (1u << 2), /**< dump memory statistics */\n} ecma_init_flag_t;\n\n/**\n * JerryScript status flags.\n */\ntypedef enum\n{\n  ECMA_STATUS_API_AVAILABLE     = (1u << 0), /**< api available */\n  ECMA_STATUS_DIRECT_EVAL       = (1u << 1), /**< eval is called directly */\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  ECMA_STATUS_HIGH_PRESSURE_GC  = (1u << 2), /**< last gc was under high pressure */\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n  ECMA_STATUS_EXCEPTION         = (1u << 3), /**< last exception is a normal exception */\n  ECMA_STATUS_ABORT             = (1u << 4), /**< last exception is an abort */\n  ECMA_STATUS_ERROR_UPDATE      = (1u << 5), /**< the error_object_created_callback_p is called */\n} ecma_status_flag_t;\n\n/**\n * Type of ecma value\n */\ntypedef enum\n{\n  ECMA_TYPE_DIRECT = 0, /**< directly encoded value, a 28 bit signed integer or a simple value */\n  ECMA_TYPE_STRING = 1, /**< pointer to description of a string */\n  ECMA_TYPE_FLOAT = 2, /**< pointer to a 64 or 32 bit floating point number */\n  ECMA_TYPE_OBJECT = 3, /**< pointer to description of an object */\n  ECMA_TYPE_SYMBOL = 4, /**< pointer to description of a symbol */\n  ECMA_TYPE_DIRECT_STRING = 5, /**< directly encoded string values */\n  ECMA_TYPE_BIGINT = 6, /**< pointer to a bigint primitive */\n  ECMA_TYPE_ERROR = 7, /**< pointer to description of an error reference (only supported by C API) */\n  ECMA_TYPE_SNAPSHOT_OFFSET = ECMA_TYPE_ERROR, /**< offset to a snapshot number/string */\n  ECMA_TYPE___MAX = ECMA_TYPE_ERROR /** highest value for ecma types */\n} ecma_type_t;\n\n#if ENABLED (JERRY_DEBUGGER)\n/**\n * Shift for scope chain index part in ecma_parse_opts\n */\n#define ECMA_PARSE_CHAIN_INDEX_SHIFT 16\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n/**\n * Option flags for parser_parse_script and internal flags for global_status_flags in parser context.\n * Note:\n *      the last 16 bits is reserved for internal parser flags, because the debugger uses these\n *      16 bits to encode the scope chain skip index as well (see ECMA_PARSE_CHAIN_INDEX_SHIFT)\n */\ntypedef enum\n{\n  ECMA_PARSE_NO_OPTS = 0, /**< no options passed */\n  ECMA_PARSE_STRICT_MODE = (1u << 0), /**< enable strict mode, must be same as PARSER_IS_STRICT */\n  ECMA_PARSE_MODULE = (1u << 1), /**< module is parsed */\n  ECMA_PARSE_EVAL = (1u << 2), /**< eval is called */\n  ECMA_PARSE_DIRECT_EVAL = (1u << 3), /**< eval is called directly (ECMA-262 v5, 15.1.2.1.1) */\n  ECMA_PARSE_CLASS_CONSTRUCTOR = (1u << 4), /**< a class constructor is being parsed */\n\n  /* These five status flags must be in this order. The first four are also parser status flags.\n   * See PARSER_SAVE_STATUS_FLAGS / PARSER_RESTORE_STATUS_FLAGS. */\n  ECMA_PARSE_ALLOW_SUPER = (1u << 5), /**< allow super property access */\n  ECMA_PARSE_ALLOW_SUPER_CALL = (1u << 6), /**< allow super constructor call */\n  ECMA_PARSE_INSIDE_CLASS_FIELD = (1u << 7), /**< a class field is being parsed */\n  ECMA_PARSE_ALLOW_NEW_TARGET = (1u << 8), /**< allow new.target access */\n  ECMA_PARSE_FUNCTION_CONTEXT = (1u << 9), /**< function context is present (ECMA_PARSE_DIRECT_EVAL must be set) */\n\n  ECMA_PARSE_GENERATOR_FUNCTION = (1u << 10), /**< generator function is parsed */\n  ECMA_PARSE_ASYNC_FUNCTION = (1u << 11), /**< async function is parsed */\n\n  /* These flags are internally used by the parser. */\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_PARSE_INTERNAL_PRE_SCANNING = (1u << 12),\n#endif /* ENABLED (JERRY_ESNEXT) */\n#ifndef JERRY_NDEBUG\n  /**\n   * This flag represents an error in for in/of statements, which cannot be set\n   * if the parsing is completed successfully.\n   */\n  ECMA_PARSE_INTERNAL_FOR_IN_OFF_CONTEXT_ERROR = (1u << 30),\n#endif /* !JERRY_NDEBUG */\n} ecma_parse_opts_t;\n\n/**\n * Description of an ecma value\n *\n * Bit-field structure: type (3) | value (29)\n */\ntypedef uint32_t ecma_value_t;\n\n/**\n * Type for directly encoded integer numbers in JerryScript.\n */\ntypedef int32_t ecma_integer_value_t;\n\n/**\n * Mask for ecma types in ecma_value_t\n */\n#define ECMA_VALUE_TYPE_MASK 0x7u\n\n/**\n * Shift for value part in ecma_value_t\n */\n#define ECMA_VALUE_SHIFT 3\n\n/**\n * Mask for directly encoded values\n */\n#define ECMA_DIRECT_TYPE_MASK ((1u << ECMA_VALUE_SHIFT) | ECMA_VALUE_TYPE_MASK)\n\n/**\n * Ecma integer value type\n */\n#define ECMA_DIRECT_TYPE_INTEGER_VALUE ((0u << ECMA_VALUE_SHIFT) | ECMA_TYPE_DIRECT)\n\n/**\n * Ecma simple value type\n */\n#define ECMA_DIRECT_TYPE_SIMPLE_VALUE ((1u << ECMA_VALUE_SHIFT) | ECMA_TYPE_DIRECT)\n\n/**\n * Shift for directly encoded values in ecma_value_t\n */\n#define ECMA_DIRECT_SHIFT 4\n\n/**\n * ECMA make simple value\n */\n#define ECMA_MAKE_VALUE(value) \\\n  ((((ecma_value_t) (value)) << ECMA_DIRECT_SHIFT) | ECMA_DIRECT_TYPE_SIMPLE_VALUE)\n\n/**\n * Simple ecma values\n */\nenum\n{\n  /**\n   * Empty value is implementation defined value, used for representing:\n   *   - empty (uninitialized) values\n   *   - immutable binding values\n   *   - special register or stack values for vm\n   */\n  ECMA_VALUE_EMPTY = ECMA_MAKE_VALUE (0), /**< uninitialized value */\n  ECMA_VALUE_ERROR = ECMA_MAKE_VALUE (1), /**< an error is currently thrown */\n  ECMA_VALUE_FALSE = ECMA_MAKE_VALUE (2), /**< boolean false */\n  ECMA_VALUE_TRUE = ECMA_MAKE_VALUE (3), /**< boolean true */\n  ECMA_VALUE_UNDEFINED = ECMA_MAKE_VALUE (4), /**< undefined value */\n  ECMA_VALUE_NULL = ECMA_MAKE_VALUE (5), /**< null value */\n  ECMA_VALUE_UNINITIALIZED = ECMA_MAKE_VALUE (6), /**< a special value for uninitialized let/const declarations */\n  ECMA_VALUE_NOT_FOUND = ECMA_MAKE_VALUE (7), /**< a special value returned by\n                                               *   ecma_op_object_find */\n  /* Values for controlling the VM */\n  ECMA_VALUE_ARRAY_HOLE = ECMA_MAKE_VALUE (8), /**< array hole, used for\n                                                *   initialization of an array literal */\n  ECMA_VALUE_REGISTER_REF = ECMA_MAKE_VALUE (9), /**< register reference,\n                                                  *   a special \"base\" value for vm */\n  ECMA_VALUE_RELEASE_LEX_ENV = ECMA_MAKE_VALUE (10), /**< if this error remains on the stack when an exception occurs\n                                                         the top lexical environment of the VM frame should be popped */\n  ECMA_VALUE_SPREAD_ELEMENT = ECMA_MAKE_VALUE (11), /**< a special value for spread elements in array initialization\n                                                     *   or function call argument list */\n  /* Other values */\n  ECMA_VALUE_INITIALIZED = ECMA_MAKE_VALUE (12), /**< represents initialized mapped arguments formal parameter */\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_VALUE_SYNC_ITERATOR = ECMA_MAKE_VALUE (13), /**< option for ecma_op_get_iterator: sync iterator is requested */\n  ECMA_VALUE_ASYNC_ITERATOR = ECMA_MAKE_VALUE (14), /**< option for ecma_op_get_iterator: async iterator is requested */\n  ECMA_VALUE_GLOBAL_THIS = ECMA_MAKE_VALUE (15), /**< globalThis built-in */\n#endif /* ENABLED (JERRY_ESNEXT) */\n};\n\n#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n/**\n * Maximum integer number for an ecma value\n */\n#define ECMA_INTEGER_NUMBER_MAX         0x7fffff\n/**\n * Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)\n */\n#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7fffff0\n#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n/**\n * Maximum integer number for an ecma value\n */\n#define ECMA_INTEGER_NUMBER_MAX         0x7ffffff\n/**\n * Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)\n */\n#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7ffffff0\n#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n/**\n * Minimum integer number for an ecma value\n */\n#define ECMA_INTEGER_NUMBER_MIN         -0x7fffff\n/**\n * Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)\n */\n#define ECMA_INTEGER_NUMBER_MIN_SHIFTED -0x7fffff0\n#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n/**\n * Minimum integer number for an ecma value\n */\n#define ECMA_INTEGER_NUMBER_MIN         -0x8000000\n/**\n * Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)\n */\n#define ECMA_INTEGER_NUMBER_MIN_SHIFTED (-0x7fffffff - 1) /* -0x80000000 */\n#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n#if ECMA_DIRECT_SHIFT != 4\n#error \"Please update ECMA_INTEGER_NUMBER_MIN/MAX_SHIFTED according to the new value of ECMA_DIRECT_SHIFT.\"\n#endif\n\n/**\n * Checks whether the integer number is in the integer number range.\n */\n#define ECMA_IS_INTEGER_NUMBER(num) \\\n  (ECMA_INTEGER_NUMBER_MIN <= (num) && (num) <= ECMA_INTEGER_NUMBER_MAX)\n\n/**\n * Maximum integer number, which if squared, still fits in ecma_integer_value_t\n */\n#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n#define ECMA_INTEGER_MULTIPLY_MAX 0xb50\n#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#define ECMA_INTEGER_MULTIPLY_MAX 0x2d41\n#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n/**\n * Checks whether the error flag is set.\n */\n#define ECMA_IS_VALUE_ERROR(value) \\\n  (JERRY_UNLIKELY ((value) == ECMA_VALUE_ERROR))\n\n/**\n * Callback which tells whether the ECMAScript execution should be stopped.\n */\ntypedef ecma_value_t (*ecma_vm_exec_stop_callback_t) (void *user_p);\n\n/**\n * Type of an external function handler.\n */\ntypedef ecma_value_t (*ecma_native_handler_t) (const ecma_value_t function_obj,\n                                               const ecma_value_t this_val,\n                                               const ecma_value_t args_p[],\n                                               const uint32_t args_count);\n\n/**\n * Native free callback of an object.\n */\ntypedef void (*ecma_object_native_free_callback_t) (void *native_p);\n\n/**\n * Type information of a native pointer.\n */\ntypedef struct\n{\n  ecma_object_native_free_callback_t free_cb; /**< the free callback of the native pointer */\n} ecma_object_native_info_t;\n\n/**\n * Representation for native pointer data.\n */\ntypedef struct ecma_native_pointer_t\n{\n  void *data_p; /**< points to the data of the object */\n  ecma_object_native_info_t *info_p; /**< native info */\n  struct ecma_native_pointer_t *next_p; /**< points to the next ecma_native_pointer_t element */\n} ecma_native_pointer_t;\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Representation for class constructor environment record.\n */\ntypedef struct\n{\n  ecma_value_t this_binding; /**< this binding */\n  ecma_value_t function_object; /**< function object */\n} ecma_environment_record_t;\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Property list:\n *   The property list of an object is a chain list of various items.\n *   The type of each item is stored in the first byte of the item.\n *\n *   The most common item is the property pair, which contains two\n *   ecmascript properties. It is also important, that after the\n *   first property pair, only property pair items are allowed.\n *\n *   Example for other items is property name hash map, or array of items.\n */\n\n/**\n * Property name listing options.\n */\ntypedef enum\n{\n  ECMA_LIST_NO_OPTS = (0), /**< no options are provided */\n  ECMA_LIST_ARRAY_INDICES = (1 << 0), /**< exclude properties with names\n                                       *   that are not indices */\n  ECMA_LIST_ENUMERABLE = (1 << 1), /**< exclude non-enumerable properties */\n  ECMA_LIST_PROTOTYPE = (1 << 2), /**< list properties from prototype chain */\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_LIST_SYMBOLS = (1 << 3), /**< list symbol properties */\n  ECMA_LIST_SYMBOLS_ONLY = (1 << 4), /**< list symbol properties only */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ECMA_LIST_CONVERT_FAST_ARRAYS = (1 << 5), /**< after listing the properties convert\n                                             *   the fast access mode array back to normal array */\n} ecma_list_properties_options_t;\n\n/**\n * Enumerable property name listing options.\n */\ntypedef enum\n{\n  ECMA_ENUMERABLE_PROPERTY_KEYS, /**< List only property names */\n  ECMA_ENUMERABLE_PROPERTY_VALUES, /**< List only property values */\n  ECMA_ENUMERABLE_PROPERTY_ENTRIES, /**< List both propery names and values */\n\n  ECMA_ENUMERABLE_PROPERTY__COUNT /**< Number of enumerable property listing types */\n} ecma_enumerable_property_names_options_t;\n\n/**\n * List enumerable properties and include the prototype chain.\n */\n#define ECMA_LIST_ENUMERABLE_PROTOTYPE (ECMA_LIST_ENUMERABLE | ECMA_LIST_PROTOTYPE)\n\n/**\n * Property flag list. Several flags are alias\n */\ntypedef enum\n{\n  ECMA_PROPERTY_FLAG_DELETED = 1u << 0, /**< property is deleted */\n  ECMA_FAST_ARRAY_FLAG = 1u << 0, /**< array is fast array */\n  ECMA_PROPERTY_FLAG_LCACHED = 1u << 1, /**< property is lcached */\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_ARRAY_TEMPLATE_LITERAL = 1u << 1, /**< array is a template literal constructed by the parser */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ECMA_PROPERTY_FLAG_CONFIGURABLE = 1u << 2, /**< property is configurable */\n  ECMA_PROPERTY_FLAG_ENUMERABLE = 1u << 3, /**< property is enumerable */\n  ECMA_PROPERTY_FLAG_WRITABLE = 1u << 4, /**< property is writable */\n  ECMA_PROPERTY_FLAG_DATA = 1u << 5, /**< property contains data */\n} ecma_property_flags_t;\n\n/**\n * Property flags configurable, enumerable, writable.\n */\n#define ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE \\\n  (ECMA_PROPERTY_FLAG_CONFIGURABLE | ECMA_PROPERTY_FLAG_ENUMERABLE | ECMA_PROPERTY_FLAG_WRITABLE)\n\n/**\n * Property flags configurable, enumerable.\n */\n#define ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE \\\n  (ECMA_PROPERTY_FLAG_CONFIGURABLE | ECMA_PROPERTY_FLAG_ENUMERABLE)\n\n/**\n * Property flags configurable, enumerable.\n */\n#define ECMA_PROPERTY_CONFIGURABLE_WRITABLE \\\n  (ECMA_PROPERTY_FLAG_CONFIGURABLE | ECMA_PROPERTY_FLAG_WRITABLE)\n\n/**\n * Property flags enumerable, writable.\n */\n#define ECMA_PROPERTY_ENUMERABLE_WRITABLE \\\n  (ECMA_PROPERTY_FLAG_ENUMERABLE | ECMA_PROPERTY_FLAG_WRITABLE)\n\n/**\n * No attributes can be changed for this property.\n */\n#define ECMA_PROPERTY_FIXED 0\n\n/**\n * Default flag of length property.\n */\n#if ENABLED (JERRY_ESNEXT)\n#define ECMA_PROPERTY_FLAG_DEFAULT_LENGTH ECMA_PROPERTY_FLAG_CONFIGURABLE\n#else /* !ENABLED (JERRY_ESNEXT) */\n#define ECMA_PROPERTY_FLAG_DEFAULT_LENGTH ECMA_PROPERTY_FIXED\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Shift for property name part.\n */\n#define ECMA_PROPERTY_NAME_TYPE_SHIFT 6\n\n/**\n * Type of hash-map property.\n */\n#define ECMA_PROPERTY_TYPE_HASHMAP \\\n  (ECMA_DIRECT_STRING_SPECIAL << ECMA_PROPERTY_NAME_TYPE_SHIFT)\n\n/**\n * Type of deleted property.\n */\n#define ECMA_PROPERTY_TYPE_DELETED \\\n  (ECMA_PROPERTY_FLAG_DELETED | (ECMA_DIRECT_STRING_SPECIAL << ECMA_PROPERTY_NAME_TYPE_SHIFT))\n\n/**\n * Type of property not found.\n */\n#define ECMA_PROPERTY_TYPE_NOT_FOUND ECMA_PROPERTY_TYPE_HASHMAP\n\n/**\n * Type of property not found and no more searching in the proto chain.\n */\n#define ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP ECMA_PROPERTY_TYPE_DELETED\n\n/**\n * Abstract property representation.\n *\n * A property is a type_and_flags byte and an ecma_value_t value pair.\n * This pair is represented by a single pointer in JerryScript. Although\n * a packed struct would only consume sizeof(ecma_value_t)+1 memory\n * bytes, accessing such structure is inefficient from the CPU viewpoint\n * because the value is not naturally aligned. To improve performance,\n * two type bytes and values are packed together. The memory layout is\n * the following:\n *\n *  [type 1, type 2, unused byte 1, unused byte 2][value 1][value 2]\n *\n * The unused two bytes are used to store a compressed pointer for the\n * next property pair.\n *\n * The advantage of this layout is that the value reference can be computed\n * from the property address. However, property pointers cannot be compressed\n * anymore.\n */\ntypedef uint8_t ecma_property_t; /**< ecma_property_types_t (3 bit) and ecma_property_flags_t */\n\n/**\n * Number of items in a property pair.\n */\n#define ECMA_PROPERTY_PAIR_ITEM_COUNT 2\n\n/**\n * Property header for all items in a property list.\n */\ntypedef struct\n{\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  jmem_cpointer_t next_property_cp; /**< next cpointer */\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n  ecma_property_t types[ECMA_PROPERTY_PAIR_ITEM_COUNT]; /**< two property type slot. The first represent\n                                                         *   the type of this property (e.g. property pair) */\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  uint16_t padding; /**< an unused value */\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n  jmem_cpointer_t next_property_cp; /**< next cpointer */\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n} ecma_property_header_t;\n\n/**\n * Pair of pointers - to property's getter and setter\n */\ntypedef struct\n{\n  jmem_cpointer_t getter_cp; /**< compressed pointer to getter object */\n  jmem_cpointer_t setter_cp; /**< compressed pointer to setter object */\n} ecma_getter_setter_pointers_t;\n\n/**\n * Property data.\n */\ntypedef union\n{\n  ecma_value_t value; /**< value of a property */\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  jmem_cpointer_t getter_setter_pair_cp; /**< cpointer to getter setter pair */\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n  ecma_getter_setter_pointers_t getter_setter_pair; /**< getter setter pair */\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n} ecma_property_value_t;\n\n/**\n * Property pair.\n */\ntypedef struct\n{\n  ecma_property_header_t header; /**< header of the property */\n  ecma_property_value_t values[ECMA_PROPERTY_PAIR_ITEM_COUNT]; /**< property value slots */\n  jmem_cpointer_t names_cp[ECMA_PROPERTY_PAIR_ITEM_COUNT]; /**< property name slots */\n} ecma_property_pair_t;\n\n/**\n * Get property name type.\n */\n#define ECMA_PROPERTY_GET_NAME_TYPE(property) \\\n  ((property) >> ECMA_PROPERTY_NAME_TYPE_SHIFT)\n\n/**\n * Returns true if the property pointer is a property pair.\n */\n#define ECMA_PROPERTY_IS_PROPERTY_PAIR(property_header_p) \\\n  ((property_header_p)->types[0] != ECMA_PROPERTY_TYPE_HASHMAP)\n\n/**\n * Property value of all internal properties\n */\n#define ECMA_PROPERTY_INTERNAL \\\n  (ECMA_PROPERTY_FLAG_DATA | (ECMA_DIRECT_STRING_SPECIAL << ECMA_PROPERTY_NAME_TYPE_SHIFT))\n\n/**\n * Checks whether a property is internal property\n */\n#define ECMA_PROPERTY_IS_INTERNAL(property) ((property) >= ECMA_PROPERTY_INTERNAL)\n\n/**\n * Checks whether a property is raw data or accessor property\n */\n#define ECMA_PROPERTY_IS_RAW(property) \\\n  ((property) < (ECMA_DIRECT_STRING_SPECIAL << ECMA_PROPERTY_NAME_TYPE_SHIFT))\n\n/**\n * Checks whether a property is raw data property (should only be used in assertions)\n */\n#define ECMA_PROPERTY_IS_RAW_DATA(property) \\\n  (((property) & ECMA_PROPERTY_FLAG_DATA) && (property) < ECMA_PROPERTY_INTERNAL)\n\n/**\n * Create internal property.\n */\n#define ECMA_CREATE_INTERNAL_PROPERTY(object_p, name_p, property_p, property_value_p) \\\n  do \\\n  { \\\n    (property_value_p) = ecma_create_named_data_property ((object_p), (name_p), 0, &(property_p)); \\\n    JERRY_ASSERT (*(property_p) == ECMA_PROPERTY_INTERNAL); \\\n  } \\\n  while (0)\n\n/**\n * Property type of all virtual properties\n */\n#define ECMA_PROPERTY_VIRTUAL ECMA_PROPERTY_INTERNAL\n\n/**\n * Checks whether a property is virtual property\n */\n#define ECMA_PROPERTY_IS_VIRTUAL(property) ECMA_PROPERTY_IS_INTERNAL(property)\n\n/**\n * Returns true if the property is named property.\n */\n#define ECMA_PROPERTY_IS_NAMED_PROPERTY(property) \\\n  ((property) < ECMA_PROPERTY_TYPE_HASHMAP || (property) >= ECMA_PROPERTY_INTERNAL)\n\n/**\n * Add the offset part to a property for computing its property data pointer.\n */\n#define ECMA_PROPERTY_VALUE_ADD_OFFSET(property_p) \\\n  ((uintptr_t) ((((uint8_t *) (property_p)) + (sizeof (ecma_property_value_t) * 2 - 1))))\n\n/**\n * Align the property for computing its property data pointer.\n */\n#define ECMA_PROPERTY_VALUE_DATA_PTR(property_p) \\\n  (ECMA_PROPERTY_VALUE_ADD_OFFSET (property_p) & ~(sizeof (ecma_property_value_t) - 1))\n\n/**\n * Compute the property data pointer of a property.\n * The property must be part of a property pair.\n */\n#define ECMA_PROPERTY_VALUE_PTR(property_p) \\\n  ((ecma_property_value_t *) ECMA_PROPERTY_VALUE_DATA_PTR (property_p))\n\n/**\n * Property reference. It contains the value pointer\n * for real, and the value itself for virtual properties.\n */\ntypedef union\n{\n  ecma_property_value_t *value_p; /**< property value pointer for real properties */\n  ecma_value_t virtual_value; /**< property value for virtual properties */\n} ecma_property_ref_t;\n\n/**\n * Extended property reference, which also contains the\n * property descriptor pointer for real properties.\n */\ntypedef struct\n{\n  ecma_property_ref_t property_ref; /**< property reference */\n  ecma_property_t *property_p; /**< property descriptor pointer for real properties */\n} ecma_extended_property_ref_t;\n\n/**\n * Option flags for ecma_op_object_get_property.\n */\ntypedef enum\n{\n  ECMA_PROPERTY_GET_NO_OPTIONS = 0, /**< no option flags for ecma_op_object_get_property */\n  ECMA_PROPERTY_GET_VALUE = 1u << 0, /**< fill virtual_value field for virtual properties */\n  ECMA_PROPERTY_GET_EXT_REFERENCE = 1u << 1, /**< get extended reference to the property */\n} ecma_property_get_option_bits_t;\n\n/**\n * Internal object types.\n */\ntypedef enum\n{\n  ECMA_OBJECT_TYPE_GENERAL = 0, /**< all objects that are not belongs to the sub-types below. */\n  ECMA_OBJECT_TYPE_CLASS = 1, /**< Objects with class property */\n  ECMA_OBJECT_TYPE_ARRAY = 2, /**< Array object (15.4) */\n  ECMA_OBJECT_TYPE_PSEUDO_ARRAY  = 3, /**< Array-like object, such as Arguments object (10.6) */\n  ECMA_OBJECT_TYPE_PROXY  = 4, /**< Proxy object ECMAScript v6 26.2 */\n  /* Note: these 4 types must be in this order. See IsCallable operation.  */\n  ECMA_OBJECT_TYPE_FUNCTION = 5, /**< Function objects (15.3), created through 13.2 routine */\n  ECMA_OBJECT_TYPE_BOUND_FUNCTION = 6, /**< Function objects (15.3), created through 15.3.4.5 routine */\n  ECMA_OBJECT_TYPE_NATIVE_FUNCTION = 7, /**< Native function object */\n  /* Types between 13-15 cannot have a built-in flag. See ecma_lexical_environment_type_t. */\n\n  ECMA_OBJECT_TYPE__MAX /**< maximum value */\n} ecma_object_type_t;\n\n/**\n * Types of objects with class property.\n */\ntypedef enum\n{\n  ECMA_PSEUDO_ARRAY_ARGUMENTS = 0, /**< Arguments object (10.6) */\n  ECMA_PSEUDO_ARRAY_TYPEDARRAY = 1, /**< TypedArray which does NOT need extra space to store length and offset */\n  ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO = 2, /**< TypedArray which NEEDS extra space to store length and offset */\n  ECMA_PSEUDO_ARRAY_ITERATOR = 3, /**< Array iterator object (ECMAScript v6, 22.1.5.1) */\n  ECMA_PSEUDO_SET_ITERATOR = 4, /**< Set iterator object (ECMAScript v6, 23.2.5.1) */\n  ECMA_PSEUDO_MAP_ITERATOR = 5, /**< Map iterator object (ECMAScript v6, 23.1.5.1) */\n  ECMA_PSEUDO_STRING_ITERATOR = 6, /**< String iterator object (ECMAScript v6, 22.1.5.1) */\n  ECMA_PSEUDO_REGEXP_STRING_ITERATOR = 7, /** RegExp string iterator object (ECMAScript v11, 21.2.7) */\n  ECMA_PSEUDO_ARRAY__MAX = ECMA_PSEUDO_STRING_ITERATOR /**< maximum value */\n} ecma_pseudo_array_type_t;\n\n/**\n * Types of lexical environments.\n */\ntypedef enum\n{\n  /* Types between 0 - 12 are ecma_object_type_t which can have a built-in flag. */\n\n  ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE = 13, /**< declarative lexical environment */\n  ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND = 14, /**< object-bound lexical environment\n                                                    *   with provideThis flag */\n  ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND = 15, /**< object-bound lexical environment\n                                                     *  with provided home object reference */\n\n  ECMA_LEXICAL_ENVIRONMENT_TYPE_START = ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE, /**< first lexical\n                                                                               *   environment type */\n  ECMA_LEXICAL_ENVIRONMENT_TYPE__MAX = ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND /**< maximum value */\n} ecma_lexical_environment_type_t;\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Types of array iterators.\n */\ntypedef enum\n{\n  ECMA_ITERATOR_KEYS,     /**< keys iterator */\n  ECMA_ITERATOR_VALUES,   /**< values iterator */\n  ECMA_ITERATOR_ENTRIES,  /**< entries iterator */\n  ECMA_ITERATOR__COUNT,   /**< number of iterator kinds */\n} ecma_iterator_kind_t;\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Offset for JERRY_CONTEXT (status_flags) top 8 bits.\n */\n#define ECMA_LOCAL_PARSE_OPTS_OFFSET ((sizeof (uint32_t) - sizeof (uint8_t)) * JERRY_BITSINBYTE)\n\n/**\n * Set JERRY_CONTEXT (status_flags) top 8 bits to the specified 'opts'.\n */\n#define ECMA_SET_LOCAL_PARSE_OPTS(opts) \\\n  do \\\n  { \\\n    JERRY_CONTEXT (status_flags) |= ((uint32_t) opts << ECMA_LOCAL_PARSE_OPTS_OFFSET) | ECMA_STATUS_DIRECT_EVAL; \\\n  } while (0)\n\n/**\n * Get JERRY_CONTEXT (status_flags) top 8 bits.\n */\n#define ECMA_GET_LOCAL_PARSE_OPTS() \\\n  (JERRY_CONTEXT (status_flags) >> (ECMA_LOCAL_PARSE_OPTS_OFFSET - JERRY_LOG2 (ECMA_PARSE_ALLOW_SUPER)))\n\n/**\n * Clear JERRY_CONTEXT (status_flags) top 8 bits.\n */\n#define ECMA_CLEAR_LOCAL_PARSE_OPTS() \\\n  do \\\n  { \\\n    JERRY_CONTEXT (status_flags) &= ((1 << ECMA_LOCAL_PARSE_OPTS_OFFSET) - 1); \\\n  } while (0)\n\n/**\n * Ecma object type mask for getting the object type.\n */\n#define ECMA_OBJECT_TYPE_MASK 0x0fu\n\n/**\n * Ecma object is built-in or lexical environment. When this flag is set, the object is a\n *   - built-in, if object type is less than ECMA_LEXICAL_ENVIRONMENT_TYPES_START\n *   - lexical environment, if object type is greater or equal than ECMA_LEXICAL_ENVIRONMENT_TYPES_START\n */\n#define ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV 0x10\n\n/**\n * Extensible object.\n */\n#define ECMA_OBJECT_FLAG_EXTENSIBLE 0x20\n\n/**\n * Non closure flag for debugger.\n */\n#define ECMA_OBJECT_FLAG_BLOCK ECMA_OBJECT_FLAG_EXTENSIBLE\n\n/**\n * Bitshift index for an ecma-object reference count field\n */\n#define ECMA_OBJECT_REF_SHIFT 6\n\n/**\n * Bitmask for an ecma-object reference count field\n */\n#define ECMA_OBJECT_REF_MASK (((1u << 10) - 1) << ECMA_OBJECT_REF_SHIFT)\n\n/**\n * Value for increasing or decreasing the object reference counter.\n */\n#define ECMA_OBJECT_REF_ONE (1u << ECMA_OBJECT_REF_SHIFT)\n\n/**\n * Represents non-visited white object\n */\n#define ECMA_OBJECT_NON_VISITED (0x3ffu << ECMA_OBJECT_REF_SHIFT)\n\n/**\n * Maximum value of the object reference counter (1022).\n */\n#define ECMA_OBJECT_MAX_REF (ECMA_OBJECT_NON_VISITED - ECMA_OBJECT_REF_ONE)\n\n/**\n * Description of ECMA-object or lexical environment\n * (depending on is_lexical_environment).\n */\ntypedef struct\n{\n  /** type : 4 bit : ecma_object_type_t or ecma_lexical_environment_type_t\n                     depending on ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV\n      flags : 2 bit : ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV,\n                      ECMA_OBJECT_FLAG_EXTENSIBLE or ECMA_OBJECT_FLAG_BLOCK\n      refs : 10 bit (max 1022) */\n  uint16_t type_flags_refs;\n\n  /** next in the object chain maintained by the garbage collector */\n  jmem_cpointer_t gc_next_cp;\n\n  /** compressed pointer to property list or bound object */\n  union\n  {\n    jmem_cpointer_t property_list_cp; /**< compressed pointer to object's\n                                       *   or declerative lexical environments's property list */\n    jmem_cpointer_t bound_object_cp;  /**< compressed pointer to lexical environments's the bound object */\n    jmem_cpointer_t home_object_cp;   /**< compressed pointer to lexical environments's the home object */\n  } u1;\n\n  /** object prototype or outer reference */\n  union\n  {\n    jmem_cpointer_t prototype_cp; /**< compressed pointer to the object's prototype  */\n    jmem_cpointer_t outer_reference_cp; /**< compressed pointer to the lexical environments's outer reference  */\n  } u2;\n} ecma_object_t;\n\n/**\n * Description of built-in properties of an object.\n */\ntypedef struct\n{\n  uint8_t id; /**< built-in id */\n  uint8_t routine_id; /**< routine id for built-in functions */\n  /** built-in specific field */\n  union\n  {\n    uint8_t length_and_bitset_size; /**< length and bit set size for generic built-ins */\n    uint8_t routine_index; /**< property descriptor index for built-in routines */\n  } u;\n  /** extra built-in info */\n  union\n  {\n    uint8_t instantiated_bitset[1]; /**< instantiated property bit set for generic built-ins */\n    uint8_t routine_flags; /**< flags for built-in routines */\n  } u2;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_value_t realm_value; /**< realm value */\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  uint32_t continue_instantiated_bitset[1]; /**< bit set for instantiated properties */\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n} ecma_built_in_props_t;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n\n/**\n * Number of bits available in the instantiated bitset without allocation\n */\n#define ECMA_BUILTIN_INSTANTIATED_BITSET_MIN_SIZE (8)\n\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n\n/**\n * Number of bits available in the instantiated bitset without allocation\n */\n#define ECMA_BUILTIN_INSTANTIATED_BITSET_MIN_SIZE (8 + 32)\n\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n/**\n * Builtin routine function object status flags\n */\ntypedef enum\n{\n  ECMA_BUILTIN_ROUTINE_NO_OPTS = 0,                     /**< No options are provided */\n  ECMA_BUILTIN_ROUTINE_LENGTH_INITIALIZED = (1u << 0),  /**< 'length' property has been initialized */\n  ECMA_BUILTIN_ROUTINE_NAME_INITIALIZED  = (1u << 1),   /**< 'name' property has been initialized */\n  ECMA_BUILTIN_ROUTINE_GETTER = (1u << 2),              /**< this routine is getter */\n  ECMA_BUILTIN_ROUTINE_SETTER = (1u << 3),              /**< this routine is setter */\n} ecma_builtin_routine_flags_t;\n\n/**\n * Start position of bit set size in length_and_bitset_size field.\n */\n#define ECMA_BUILT_IN_BITSET_SHIFT 5\n\n/**\n * Description of extended ECMA-object.\n *\n * The extended object is an object with extra fields.\n */\ntypedef struct\n{\n  ecma_object_t object; /**< object header */\n\n  /**\n   * Description of extra fields. These extra fields depend on the object type.\n   */\n  union\n  {\n    ecma_built_in_props_t built_in; /**< built-in object part */\n\n    /**\n     * Description of objects with class.\n     */\n    struct\n    {\n      uint16_t class_id; /**< class id of the object */\n      uint16_t extra_info; /**< extra information for the object\n                            *   e.g. array buffer type info (external/internal) */\n\n      /**\n       * Description of extra fields. These extra fields depend on the class_id.\n       */\n      union\n      {\n        ecma_value_t value; /**< value of the object (e.g. boolean, number, string, etc.) */\n        uint32_t length; /**< length related property (e.g. length of ArrayBuffer) */\n        ecma_value_t target; /**< [[ProxyTarget]] internal property */\n        ecma_value_t head; /**< points to the async generator task queue head item */\n        ecma_value_t promise; /**< PromiseCapability[[Promise]] internal slot */\n      } u;\n    } class_prop;\n\n    /**\n     * Description of function objects.\n     */\n    struct\n    {\n      jmem_cpointer_tag_t scope_cp; /**< function scope */\n      ecma_value_t bytecode_cp; /**< function byte code */\n    } function;\n\n    /**\n     * Description of array objects.\n     */\n    struct\n    {\n      uint32_t length; /**< length property value */\n      uint32_t length_prop_and_hole_count; /**< length property attributes and number of array holes in\n                                            *   a fast access mode array multiplied ECMA_FAST_ACCESS_HOLE_ONE */\n    } array;\n\n    /**\n     * Description of pseudo array objects.\n     */\n    struct\n    {\n      uint8_t type; /**< pseudo array type, e.g. Arguments, TypedArray, ArrayIterator */\n      uint8_t extra_info; /**< extra information about the object.\n                           *   e.g. the specific builtin id for typed arrays,\n                           *        [[IterationKind]] property for %Iterator% */\n      union\n      {\n        uint16_t formal_params_number; /**< for arguments: formal parameters number */\n        uint16_t class_id; /**< for typedarray: the specific class name id */\n        uint16_t iterator_index; /**< for %Iterator%: [[%Iterator%NextIndex]] property */\n      } u1;\n      union\n      {\n        uint32_t arguments_number; /**< for arguments: arguments number */\n        ecma_value_t arraybuffer; /**< for typedarray: internal arraybuffer */\n        ecma_value_t iterated_value; /**< for %Iterator%: [[IteratedObject]] property */\n        ecma_value_t spread_value; /**< for spread object: spreaded element */\n      } u2;\n    } pseudo_array;\n\n    /**\n     * Description of bound function object.\n     */\n    struct\n    {\n      jmem_cpointer_tag_t target_function; /**< target function */\n      ecma_value_t args_len_or_this; /**< length of arguments or this value */\n    } bound_function;\n  } u;\n} ecma_extended_object_t;\n\n/**\n * Description of built-in extended ECMA-object.\n */\ntypedef struct\n{\n  ecma_extended_object_t extended_object; /**< extended object part */\n  ecma_built_in_props_t built_in; /**< built-in object part */\n} ecma_extended_built_in_object_t;\n\n/**\n * Checks whether the built-in is an ecma_extended_built_in_object_t\n */\n#define ECMA_BUILTIN_IS_EXTENDED_BUILT_IN(object_type) \\\n  ((object_type) == ECMA_OBJECT_TYPE_CLASS || (object_type) == ECMA_OBJECT_TYPE_ARRAY)\n\n/**\n * Description of native functions\n */\ntypedef struct\n{\n  ecma_extended_object_t extended_object; /**< extended object part */\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_value_t realm_value; /**< realm value */\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n  ecma_native_handler_t native_handler_cb; /**< external function */\n} ecma_native_function_t;\n\n/**\n * Alignment for the fast access mode array length.\n * The real length is aligned up for allocating the underlying buffer.\n */\n#define ECMA_FAST_ARRAY_ALIGNMENT (8)\n\n/**\n * Align the length of the fast mode array to get the allocated size of the underlying buffer\n */\n#define ECMA_FAST_ARRAY_ALIGN_LENGTH(length) \\\n  (uint32_t) ((((length)) + ECMA_FAST_ARRAY_ALIGNMENT - 1) / ECMA_FAST_ARRAY_ALIGNMENT * ECMA_FAST_ARRAY_ALIGNMENT)\n\n/**\n * Compiled byte code data.\n */\ntypedef struct\n{\n  uint16_t size;                    /**< real size >> JMEM_ALIGNMENT_LOG */\n  uint16_t refs;                    /**< reference counter for the byte code */\n  uint16_t status_flags;            /**< various status flags:\n                                     *   CBC_IS_FUNCTION check tells whether the byte code\n                                     *   is function or regular expression.\n                                     *   If function, the other flags must be CBC_CODE_FLAGS...\n                                     *   If regexp, the other flags must be RE_FLAG... */\n} ecma_compiled_code_t;\n\n/**\n * Description of bound function objects.\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< extended object header */\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t target_length; /**< length of target function */\n#endif /* ENABLED (JERRY_ESNEXT) */\n} ecma_bound_function_t;\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n\n/**\n * Description of static function objects.\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< header part */\n  const ecma_compiled_code_t *bytecode_p; /**< real byte code pointer */\n} ecma_static_function_t;\n\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Flags for runnable objects.\n */\ntypedef enum\n{\n  ECMA_RUNNABLE_FLAGS_EMPTY = (0), /**< empty flags */\n  ECMA_RUNNABLE_FLAGS_MODULE = (1 << 0) /**< runnable is a module */\n} ecma_runnable_flags_t;\n\n/**\n * Description of arrow function objects.\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< extended object header */\n  ecma_value_t this_binding; /**< value of 'this' binding */\n  ecma_value_t new_target; /**< value of new.target */\n} ecma_arrow_function_t;\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n\n/**\n * Description of static arrow function objects.\n */\ntypedef struct\n{\n  ecma_arrow_function_t header;\n  const ecma_compiled_code_t *bytecode_p;\n} ecma_static_arrow_function_t;\n\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_CONTAINER)\n/**\n * Flags for container objects\n */\ntypedef enum\n{\n  ECMA_CONTAINER_FLAGS_EMPTY = (0), /** empty flags */\n  ECMA_CONTAINER_FLAGS_WEAK = (1 << 0) /** container object is weak */\n} ecma_container_flags_t;\n\n/**\n * Description of map collection.\n */\ntypedef struct\n{\n  ecma_value_t key; /**< key value */\n  ecma_value_t value; /**< value of the key */\n} ecma_container_pair_t;\n\n/**\n * Size of a single element (in ecma_value_t unit).\n */\n#define ECMA_CONTAINER_VALUE_SIZE 1\n\n/**\n * Size of a key - value pair (in ecma_value_t unit).\n */\n#define ECMA_CONTAINER_PAIR_SIZE 2\n\n/**\n * Size of the internal buffer.\n */\n#define ECMA_CONTAINER_GET_SIZE(container_p) \\\n  (container_p->buffer_p[0])\n\n/**\n * Remove the size field of the internal buffer.\n */\n#define ECMA_CONTAINER_SET_SIZE(container_p, size) \\\n  (container_p->buffer_p[0] = (ecma_value_t) (size))\n\n/**\n * Number of entries of the internal buffer.\n */\n#define ECMA_CONTAINER_ENTRY_COUNT(collection_p) \\\n  (collection_p->item_count - 1)\n\n/**\n * Pointer to the first entry of the internal buffer.\n */\n#define ECMA_CONTAINER_START(collection_p) \\\n  (collection_p->buffer_p + 1)\n\n#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */\n\ntypedef enum\n{\n  ECMA_PROP_NO_OPTS = (0), /** empty property descriptor */\n  ECMA_PROP_IS_GET_DEFINED = (1 << 0), /** Is [[Get]] defined? */\n  ECMA_PROP_IS_SET_DEFINED = (1 << 1), /** Is [[Set]] defined? */\n\n  ECMA_PROP_IS_CONFIGURABLE = (1 << 2), /** [[Configurable]] */\n  ECMA_PROP_IS_ENUMERABLE = (1 << 3), /** [[Enumerable]] */\n  ECMA_PROP_IS_WRITABLE = (1 << 4), /** [[Writable]] */\n  ECMA_PROP_IS_THROW = (1 << 5), /** Flag that controls failure handling */\n\n  ECMA_PROP_IS_VALUE_DEFINED = (1 << 6), /** Is [[Value]] defined? */\n  ECMA_PROP_IS_CONFIGURABLE_DEFINED = (1 << 7), /** Is [[Configurable]] defined? */\n  ECMA_PROP_IS_ENUMERABLE_DEFINED = (1 << 8), /** Is [[Enumerable]] defined? */\n  ECMA_PROP_IS_WRITABLE_DEFINED = (1 << 9), /** Is [[Writable]] defined? */\n} ecma_property_descriptor_status_flags_t;\n\n/**\n * Description of ECMA property descriptor\n *\n * See also: ECMA-262 v5, 8.10.\n *\n * Note:\n *      If a component of descriptor is undefined then corresponding\n *      field should contain it's default value.\n *      The struct members must be in this order or keep in sync with ecma_property_flags_t and ECMA_IS_THROW flag.\n */\ntypedef struct\n{\n\n  /** any combination of ecma_property_descriptor_status_flags_t bits */\n  uint16_t flags;\n\n  /** [[Value]] */\n  ecma_value_t value;\n\n  /** [[Get]] */\n  ecma_object_t *get_p;\n\n  /** [[Set]] */\n  ecma_object_t *set_p;\n} ecma_property_descriptor_t;\n\n/**\n * Bitfield which represents a namedata property options in an ecma_property_descriptor_t\n * Attributes:\n *  - is_get_defined, is_set_defined : false\n *  - is_configurable, is_writable, is_enumerable : undefined (false)\n *  - is_throw : undefined (false)\n *  - is_value_defined : true\n *  - is_configurable_defined, is_writable_defined, is_enumerable_defined : true\n */\n#define ECMA_NAME_DATA_PROPERTY_DESCRIPTOR_BITS ((uint16_t) (ECMA_PROP_IS_VALUE_DEFINED \\\n                                                             | ECMA_PROP_IS_CONFIGURABLE_DEFINED \\\n                                                             | ECMA_PROP_IS_ENUMERABLE_DEFINED \\\n                                                             | ECMA_PROP_IS_WRITABLE_DEFINED))\n\n/**\n * Bitmask to get a the physical property flags from an ecma_property_descriptor\n */\n#define ECMA_PROPERTY_FLAGS_MASK ((uint16_t) (ECMA_PROP_IS_CONFIGURABLE \\\n                                              | ECMA_PROP_IS_ENUMERABLE \\\n                                              | ECMA_PROP_IS_WRITABLE))\n\n/**\n * Flag that controls failure handling during defining property\n *\n * Note: This flags represents the [[DefineOwnProperty]] (P, Desc, Throw) 3rd argument\n */\n#define ECMA_IS_THROW ((uint8_t) ECMA_PROP_IS_THROW)\n\n#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n/**\n * Description of an ecma-number\n */\ntypedef float ecma_number_t;\n\n/**\n * It makes possible to read/write an ecma_number_t as uint32_t without strict aliasing rule violation.\n */\ntypedef union\n{\n  ecma_number_t as_ecma_number_t;\n  uint32_t as_uint32_t;\n} ecma_number_accessor_t;\n\n#define DOUBLE_TO_ECMA_NUMBER_T(value) (ecma_number_t) (value)\n\n/**\n * Maximum number of significant digits that ecma-number can store\n */\n#define ECMA_NUMBER_MAX_DIGITS  (9)\n\n/**\n * Width of sign field\n *\n * See also:\n *          IEEE-754 2008, 3.6, Table 3.5\n */\n#define ECMA_NUMBER_SIGN_WIDTH       (1)\n\n/**\n * Width of biased exponent field\n *\n * See also:\n *          IEEE-754 2008, 3.6, Table 3.5\n */\n#define ECMA_NUMBER_BIASED_EXP_WIDTH (8)\n\n/**\n * Width of fraction field\n *\n * See also:\n *          IEEE-754 2008, 3.6, Table 3.5\n */\n#define ECMA_NUMBER_FRACTION_WIDTH   (23)\n#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n/**\n * Description of an ecma-number\n */\ntypedef double ecma_number_t;\n\n/**\n * It makes possible to read/write an ecma_number_t as uint64_t without strict aliasing rule violation.\n */\ntypedef union\n{\n  ecma_number_t as_ecma_number_t;\n  uint64_t as_uint64_t;\n} ecma_number_accessor_t;\n\n#define DOUBLE_TO_ECMA_NUMBER_T(value) value\n\n/**\n * Maximum number of significant digits that ecma-number can store\n */\n#define ECMA_NUMBER_MAX_DIGITS  (19)\n\n/**\n * Width of sign field\n *\n * See also:\n *          IEEE-754 2008, 3.6, Table 3.5\n */\n#define ECMA_NUMBER_SIGN_WIDTH       (1)\n\n/**\n * Width of biased exponent field\n *\n * See also:\n *          IEEE-754 2008, 3.6, Table 3.5\n */\n#define ECMA_NUMBER_BIASED_EXP_WIDTH (11)\n\n/**\n * Width of fraction field\n *\n * See also:\n *          IEEE-754 2008, 3.6, Table 3.5\n */\n#define ECMA_NUMBER_FRACTION_WIDTH   (52)\n#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n/**\n * Value '0' of ecma_number_t\n */\n#define ECMA_NUMBER_ZERO ((ecma_number_t) 0)\n\n/**\n * Value '1' of ecma_number_t\n */\n#define ECMA_NUMBER_ONE  ((ecma_number_t) 1)\n\n/**\n * Value '2' of ecma_number_t\n */\n#define ECMA_NUMBER_TWO  ((ecma_number_t) 2)\n\n/**\n * Value '0.5' of ecma_number_t\n */\n#define ECMA_NUMBER_HALF ((ecma_number_t) 0.5f)\n\n/**\n * Value '-1' of ecma_number_t\n */\n#define ECMA_NUMBER_MINUS_ONE ((ecma_number_t) -1)\n\n#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n/**\n * Number.MIN_VALUE (i.e., the smallest positive value of ecma-number)\n *\n * See also: ECMA_262 v5, 15.7.3.3\n */\n# define ECMA_NUMBER_MIN_VALUE (FLT_MIN)\n/**\n * Number.MAX_VALUE (i.e., the maximum value of ecma-number)\n *\n * See also: ECMA_262 v5, 15.7.3.2\n */\n# define ECMA_NUMBER_MAX_VALUE (FLT_MAX)\n/**\n * Number.EPSILON\n *\n * See also: ECMA_262 v6, 20.1.2.1\n */\n# define  ECMA_NUMBER_EPSILON ((ecma_number_t) 1.1920928955078125e-7)\n\n/**\n * Number.MAX_SAFE_INTEGER\n *\n * See also: ECMA_262 v6, 20.1.2.6\n */\n# define ECMA_NUMBER_MAX_SAFE_INTEGER ((ecma_number_t) 0xFFFFFF)\n\n/**\n * Number.MIN_SAFE_INTEGER\n *\n * See also: ECMA_262 v6, 20.1.2.8\n */\n# define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) -0xFFFFFF)\n#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n/**\n * Number.MAX_VALUE (i.e., the maximum value of ecma-number)\n *\n * See also: ECMA_262 v5, 15.7.3.2\n */\n# define ECMA_NUMBER_MAX_VALUE ((ecma_number_t) 1.7976931348623157e+308)\n\n/**\n * Number.MIN_VALUE (i.e., the smallest positive value of ecma-number)\n *\n * See also: ECMA_262 v5, 15.7.3.3\n */\n# define ECMA_NUMBER_MIN_VALUE ((ecma_number_t) 5e-324)\n\n/**\n * Number.EPSILON\n *\n * See also: ECMA_262 v6, 20.1.2.1\n */\n# define  ECMA_NUMBER_EPSILON ((ecma_number_t) 2.2204460492503130808472633361816e-16)\n\n/**\n * Number.MAX_SAFE_INTEGER\n *\n * See also: ECMA_262 v6, 20.1.2.6\n */\n# define ECMA_NUMBER_MAX_SAFE_INTEGER ((ecma_number_t) 0x1FFFFFFFFFFFFF)\n\n/**\n * Number.MIN_SAFE_INTEGER\n *\n * See also: ECMA_262 v6, 20.1.2.8\n */\n# define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) -0x1FFFFFFFFFFFFF)\n#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n/**\n * Euler number\n */\n#define ECMA_NUMBER_E  ((ecma_number_t) 2.7182818284590452354)\n\n/**\n * Natural logarithm of 10\n */\n#define ECMA_NUMBER_LN10 ((ecma_number_t) 2.302585092994046)\n\n/**\n * Natural logarithm of 2\n */\n#define ECMA_NUMBER_LN2 ((ecma_number_t) 0.6931471805599453)\n\n/**\n * Logarithm base 2 of the Euler number\n */\n#define ECMA_NUMBER_LOG2E ((ecma_number_t) 1.4426950408889634)\n\n/**\n * Logarithm base 10 of the Euler number\n */\n#define ECMA_NUMBER_LOG10E ((ecma_number_t) 0.4342944819032518)\n\n/**\n * Pi number\n */\n#define ECMA_NUMBER_PI  ((ecma_number_t) 3.1415926535897932)\n\n/**\n * Square root of 0.5\n */\n#define ECMA_NUMBER_SQRT_1_2  ((ecma_number_t) 0.7071067811865476)\n\n/**\n * Square root of 2\n */\n#define ECMA_NUMBER_SQRT2  ((ecma_number_t) 1.4142135623730951)\n\n/**\n * Maximum number of characters in string representation of ecma-number\n */\n#define ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER 64\n\n/**\n * Maximum number of characters in string representation of ecma-uint32\n */\n#define ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32 10\n\n/**\n * String is not a valid array index.\n */\n#define ECMA_STRING_NOT_ARRAY_INDEX UINT32_MAX\n\n/**\n * Ecma-collection: a growable list of ecma-values.\n */\ntypedef struct\n{\n  uint32_t item_count; /**< number of items in the collection */\n  uint32_t capacity; /**< number of items can be stored in the underlying buffer */\n  ecma_value_t *buffer_p; /**< underlying data buffer */\n} ecma_collection_t;\n\n/**\n * Initial capacity of an ecma-collection\n */\n#define ECMA_COLLECTION_INITIAL_CAPACITY 4\n\n/**\n * Ecma-collenction grow factor when the collection underlying buffer need to be reallocated\n */\n#define ECMA_COLLECTION_GROW_FACTOR (ECMA_COLLECTION_INITIAL_CAPACITY * 2)\n\n/**\n * Compute the total allocated size of the collection based on it's capacity\n */\n#define ECMA_COLLECTION_ALLOCATED_SIZE(capacity) \\\n  (uint32_t) (capacity * sizeof (ecma_value_t))\n\n/**\n * Initial allocated size of an ecma-collection\n */\n#define ECMA_COLLECTION_INITIAL_SIZE ECMA_COLLECTION_ALLOCATED_SIZE (ECMA_COLLECTION_INITIAL_CAPACITY)\n\n/**\n * Size shift of a compact collection\n */\n#define ECMA_COMPACT_COLLECTION_SIZE_SHIFT 3\n\n/**\n * Get the size of the compact collection\n */\n#define ECMA_COMPACT_COLLECTION_GET_SIZE(compact_collection_p) \\\n  ((compact_collection_p)[0] >> ECMA_COMPACT_COLLECTION_SIZE_SHIFT)\n\n/**\n * Direct string types (2 bit).\n */\ntypedef enum\n{\n  ECMA_DIRECT_STRING_PTR = 0, /**< string is a string pointer, only used by property names */\n  ECMA_DIRECT_STRING_MAGIC = 1, /**< string is a magic string */\n  ECMA_DIRECT_STRING_UINT = 2, /**< string is an unsigned int */\n  ECMA_DIRECT_STRING_SPECIAL = 3, /**< string is special */\n} ecma_direct_string_type_t;\n\n/**\n * Maximum value of the immediate part of a direct magic string.\n * Must be compatible with the immediate property name.\n */\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n#define ECMA_DIRECT_STRING_MAX_IMM 0x07ffffff\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n#define ECMA_DIRECT_STRING_MAX_IMM 0x0000ffff\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n/**\n * Shift for direct string value part in ecma_value_t.\n */\n#define ECMA_DIRECT_STRING_SHIFT (ECMA_VALUE_SHIFT + 2)\n\n/**\n * Full mask for direct strings.\n */\n#define ECMA_DIRECT_STRING_MASK ((uintptr_t) (ECMA_DIRECT_TYPE_MASK | (0x3u << ECMA_VALUE_SHIFT)))\n\n/**\n * Create an ecma direct string.\n */\n#define ECMA_CREATE_DIRECT_STRING(type, value) \\\n  ((uintptr_t) (ECMA_TYPE_DIRECT_STRING | ((type) << ECMA_VALUE_SHIFT) | (value) << ECMA_DIRECT_STRING_SHIFT))\n\n/**\n * Create an ecma direct string from the given number.\n *\n * Note: the given number must be less or equal than ECMA_DIRECT_STRING_MAX_IMM\n */\n#define ECMA_CREATE_DIRECT_UINT32_STRING(uint32_number) \\\n  ((ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_UINT, (uintptr_t) uint32_number))\n\n/**\n * Checks whether the string is direct.\n */\n#define ECMA_IS_DIRECT_STRING(string_p) \\\n  ((((uintptr_t) (string_p)) & 0x1) != 0)\n\n/**\n * Checks whether the string is direct.\n */\n#define ECMA_IS_DIRECT_STRING_WITH_TYPE(string_p, type) \\\n  ((((uintptr_t) (string_p)) & ECMA_DIRECT_STRING_MASK) == ECMA_CREATE_DIRECT_STRING (type, 0))\n\n/**\n * Returns the type of a direct string.\n */\n#define ECMA_GET_DIRECT_STRING_TYPE(string_p) \\\n  ((((uintptr_t) (string_p)) >> ECMA_VALUE_SHIFT) & 0x3)\n\n/**\n * Shift applied to type conversions.\n */\n#define ECMA_STRING_TYPE_CONVERSION_SHIFT (ECMA_PROPERTY_NAME_TYPE_SHIFT - ECMA_VALUE_SHIFT)\n\n/**\n * Converts direct string type to property name type.\n */\n#define ECMA_DIRECT_STRING_TYPE_TO_PROP_NAME_TYPE(string_p) \\\n  ((((uintptr_t) (string_p)) & (0x3 << ECMA_VALUE_SHIFT)) << ECMA_STRING_TYPE_CONVERSION_SHIFT)\n\n/**\n * Returns the value of a direct string.\n */\n#define ECMA_GET_DIRECT_STRING_VALUE(string_p) \\\n  (((uintptr_t) (string_p)) >> ECMA_DIRECT_STRING_SHIFT)\n\n/**\n * Maximum number of bytes that a long-utf8-string is able to store\n */\n#define ECMA_STRING_SIZE_LIMIT UINT32_MAX\n\ntypedef enum\n{\n  ECMA_STRING_CONTAINER_HEAP_UTF8_STRING, /**< actual data is on the heap as an utf-8 (cesu8) string\n                                           *   maximum size is 2^16. */\n  ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING, /**< the string is a long string or provided externally\n                                                  *   and only its attributes are stored. */\n  ECMA_STRING_CONTAINER_UINT32_IN_DESC, /**< string representation of an uint32 number */\n  ECMA_STRING_CONTAINER_HEAP_ASCII_STRING, /**< actual data is on the heap as an ASCII string\n                                            *   maximum size is 2^16. */\n  ECMA_STRING_CONTAINER_MAGIC_STRING_EX, /**< the ecma-string is equal to one of external magic strings */\n  ECMA_STRING_CONTAINER_SYMBOL, /**< the ecma-string is a symbol */\n\n  ECMA_STRING_CONTAINER__MAX = ECMA_STRING_CONTAINER_SYMBOL /**< maximum value */\n} ecma_string_container_t;\n\n/**\n * Mask for getting the container of a string.\n */\n#define ECMA_STRING_CONTAINER_MASK 0x7u\n\n/**\n * Value for increasing or decreasing the reference counter.\n */\n#define ECMA_STRING_REF_ONE (1u << 4)\n\n/**\n * Maximum value of the reference counter (4294967280).\n */\n#define ECMA_STRING_MAX_REF (0xFFFFFFF0)\n\n/**\n * Flag that identifies that the string is static which means it is stored in JERRY_CONTEXT (string_list_cp)\n */\n#define ECMA_STATIC_STRING_FLAG (1 << 3)\n\n/**\n * Set an ecma-string as static string\n */\n#define ECMA_SET_STRING_AS_STATIC(string_p) \\\n  (string_p)->refs_and_container |= ECMA_STATIC_STRING_FLAG\n\n/**\n * Checks whether the ecma-string is static string\n */\n#define ECMA_STRING_IS_STATIC(string_p) \\\n  ((string_p)->refs_and_container & ECMA_STATIC_STRING_FLAG)\n\n/**\n * Returns with the container type of a string.\n */\n#define ECMA_STRING_GET_CONTAINER(string_desc_p) \\\n  ((ecma_string_container_t) ((string_desc_p)->refs_and_container & ECMA_STRING_CONTAINER_MASK))\n\n/**\n * Checks whether the reference counter is 1 of a string.\n */\n#define ECMA_STRING_IS_REF_EQUALS_TO_ONE(string_desc_p) \\\n  (((string_desc_p)->refs_and_container >> 4) == 1)\n\n/**\n * Checks whether the reference counter is 1 of an extended primitive.\n */\n#define ECMA_EXTENDED_PRIMITIVE_IS_REF_EQUALS_TO_ONE(extended_primitive_p) \\\n  (((extended_primitive_p)->refs_and_type >> 3) == 1)\n\n/**\n * ECMA string-value descriptor\n */\ntypedef struct\n{\n  /** Reference counter for the string */\n  uint32_t refs_and_container;\n\n  /**\n   * Actual data or identifier of it's place in container (depending on 'container' field)\n   */\n  union\n  {\n    lit_string_hash_t hash; /**< hash of the ASCII/UTF8 string */\n    uint32_t magic_string_ex_id; /**< identifier of an external magic string (lit_magic_string_ex_id_t) */\n    uint32_t uint32_number; /**< uint32-represented number placed locally in the descriptor */\n  } u;\n} ecma_string_t;\n\n/**\n * ECMA UTF8 string-value descriptor\n */\ntypedef struct\n{\n  ecma_string_t header; /**< string header */\n  uint16_t size; /**< size of this utf-8 string in bytes */\n  uint16_t length; /**< length of this utf-8 string in characters */\n} ecma_short_string_t;\n\n/**\n * Long or external CESU8 string-value descriptor\n */\ntypedef struct\n{\n  ecma_string_t header; /**< string header */\n  const lit_utf8_byte_t *string_p; /**< string data */\n  lit_utf8_size_t size; /**< size of this external string in bytes */\n  lit_utf8_size_t length; /**< length of this external string in characters */\n} ecma_long_string_t;\n\n/**\n * External UTF8 string-value descriptor\n */\ntypedef struct\n{\n  ecma_long_string_t header;\n  ecma_object_native_free_callback_t free_cb; /**< free callback */\n} ecma_external_string_t;\n\n/**\n * Header size of an ecma ASCII string\n */\n#define ECMA_ASCII_STRING_HEADER_SIZE \\\n  ((lit_utf8_size_t) (sizeof (ecma_string_t) + sizeof (uint8_t)))\n\n/**\n * Get the size of an ecma ASCII string\n */\n#define ECMA_ASCII_STRING_GET_SIZE(string_p) \\\n  ((lit_utf8_size_t) *((lit_utf8_byte_t *) (string_p) + sizeof (ecma_string_t)) + 1)\n\n/**\n * Set the size of an ecma ASCII string\n */\n#define ECMA_ASCII_STRING_SET_SIZE(string_p, size) \\\n  (*((lit_utf8_byte_t *) (string_p) + sizeof (ecma_string_t)) = (uint8_t) ((size) - 1))\n\n/**\n * Get the start position of the string buffer of an ecma ASCII string\n */\n#define ECMA_ASCII_STRING_GET_BUFFER(string_p) \\\n  ((lit_utf8_byte_t *) (string_p) + ECMA_ASCII_STRING_HEADER_SIZE)\n\n/**\n * Get the start position of the string buffer of an ecma UTF8 string\n */\n#define ECMA_SHORT_STRING_GET_BUFFER(string_p) \\\n  ((lit_utf8_byte_t *) (string_p) + sizeof (ecma_short_string_t))\n\n/**\n * Get the start position of the string buffer of an ecma long CESU8 string\n */\n#define ECMA_LONG_STRING_BUFFER_START(string_p) \\\n  ((lit_utf8_byte_t *) (string_p) + sizeof (ecma_long_string_t))\n\n/**\n * ECMA extended string-value descriptor\n */\ntypedef struct\n{\n  ecma_string_t header; /**< string header */\n\n  union\n  {\n    ecma_value_t symbol_descriptor; /**< symbol descriptor string-value */\n    ecma_value_t value; /**< original key value corresponds to the map key string */\n  } u;\n} ecma_extended_string_t;\n\n/**\n * String builder header\n */\ntypedef struct\n{\n  lit_utf8_size_t current_size; /**< size of the data in the buffer */\n} ecma_stringbuilder_header_t;\n\n/**\n * Get pointer to the beginning of the stored string in the string builder\n */\n#define ECMA_STRINGBUILDER_STRING_PTR(header_p) \\\n  ((lit_utf8_byte_t *) (((lit_utf8_byte_t *) header_p) + ECMA_ASCII_STRING_HEADER_SIZE))\n\n/**\n * Get the size of the stored string in the string builder\n */\n#define ECMA_STRINGBUILDER_STRING_SIZE(header_p) \\\n  ((lit_utf8_size_t) (header_p->current_size - ECMA_ASCII_STRING_HEADER_SIZE))\n\n/**\n * String builder handle\n */\ntypedef struct\n{\n  ecma_stringbuilder_header_t *header_p; /**< pointer to header */\n} ecma_stringbuilder_t;\n\n/**\n * Types for extended primitive values.\n */\ntypedef enum\n{\n#ifndef JERRY_BUILTIN_BIGINT\n  ECMA_EXTENDED_PRIMITIVE_BIGINT, /**< BigInt value */\n#endif /* !defined (JERRY_BUILTIN_BIGINT) */\n  ECMA_EXTENDED_PRIMITIVE_ERROR, /**< external API error reference */\n  ECMA_EXTENDED_PRIMITIVE_ABORT, /**< external API abort reference */\n} ecma_extended_primitive_type_t;\n\n/**\n * Representation of a thrown value on API level.\n */\ntypedef struct\n{\n  uint32_t refs_and_type; /**< reference counter and type */\n  union\n  {\n    ecma_value_t value; /**< referenced value */\n    uint32_t bigint_sign_and_size; /**< BigInt properties */\n  } u;\n} ecma_extended_primitive_t;\n\n/**\n * Get the type of an extended primitve value.\n */\n#define ECMA_EXTENDED_PRIMITIVE_GET_TYPE(primitve_p) ((primitve_p)->refs_and_type & 0x7)\n\n/**\n * Value for increasing or decreasing the reference counter.\n */\n#define ECMA_EXTENDED_PRIMITIVE_REF_ONE (1u << 3)\n\n/**\n * Maximum value of the reference counter.\n */\n#define ECMA_EXTENDED_PRIMITIVE_MAX_REF (UINT32_MAX - (ECMA_EXTENDED_PRIMITIVE_REF_ONE - 1))\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n\n/**\n * The lowest state of the ecma_prop_hashmap_alloc_state counter.\n * If ecma_prop_hashmap_alloc_state other other than this value, it is\n * disabled.\n */\n#define ECMA_PROP_HASHMAP_ALLOC_ON 0\n\n/**\n * The highest state of the ecma_prop_hashmap_alloc_state counter.\n */\n#define ECMA_PROP_HASHMAP_ALLOC_MAX 4\n\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n/**\n * Number of values in a literal storage item\n */\n#define ECMA_LIT_STORAGE_VALUE_COUNT 3\n\n/**\n * Literal storage item\n */\ntypedef struct\n{\n  jmem_cpointer_t next_cp; /**< cpointer ot next item */\n  jmem_cpointer_t values[ECMA_LIT_STORAGE_VALUE_COUNT]; /**< list of values */\n} ecma_lit_storage_item_t;\n\n#if ENABLED (JERRY_LCACHE)\n/**\n * Container of an LCache entry identifier\n */\n#if ENABLED (JERRY_CPOINTER_32_BIT)\ntypedef uint64_t ecma_lcache_hash_entry_id_t;\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\ntypedef uint32_t ecma_lcache_hash_entry_id_t;\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n/**\n * Entry of LCache hash table\n */\ntypedef struct\n{\n  /** Pointer to a property of the object */\n  ecma_property_t *prop_p;\n\n  /** Entry identifier in LCache */\n  ecma_lcache_hash_entry_id_t id;\n} ecma_lcache_hash_entry_t;\n\n/**\n * Number of rows in LCache's hash table\n */\n#define ECMA_LCACHE_HASH_ROWS_COUNT 128\n\n/**\n * Number of entries in a row of LCache's hash table\n */\n#define ECMA_LCACHE_HASH_ROW_LENGTH 2\n\n#endif /* ENABLED (JERRY_LCACHE) */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/**\n * Function callback descriptor of a %TypedArray% object getter\n */\ntypedef ecma_value_t (*ecma_typedarray_getter_fn_t) (lit_utf8_byte_t *src);\n\n/**\n * Function callback descriptor of a %TypedArray% object setter\n */\ntypedef ecma_value_t (*ecma_typedarray_setter_fn_t) (lit_utf8_byte_t *src, ecma_value_t value);\n\n/**\n * Builtin id for the different types of TypedArray's\n */\ntypedef enum\n{\n  ECMA_INT8_ARRAY,          /**< Int8Array */\n  ECMA_UINT8_ARRAY,         /**< Uint8Array */\n  ECMA_UINT8_CLAMPED_ARRAY, /**< Uint8ClampedArray */\n  ECMA_INT16_ARRAY,         /**< Int16Array */\n  ECMA_UINT16_ARRAY,        /**< Uint16Array */\n  ECMA_INT32_ARRAY,         /**< Int32Array */\n  ECMA_UINT32_ARRAY,        /**< Uint32Array */\n  ECMA_FLOAT32_ARRAY,       /**< Float32Array */\n  ECMA_FLOAT64_ARRAY,       /**< Float64Array */\n  /* ECMA_TYPEDARRAY_IS_BIGINT_TYPE macro should be updated when new types are added */\n  ECMA_BIGINT64_ARRAY,      /**< BigInt64Array */\n  ECMA_BIGUINT64_ARRAY,     /**< BigUInt64Array */\n} ecma_typedarray_type_t;\n\n/**\n * Extra information for ArrayBuffers.\n */\ntypedef enum\n{\n  ECMA_ARRAYBUFFER_INTERNAL_MEMORY = 0u,        /* ArrayBuffer memory is handled internally. */\n  ECMA_ARRAYBUFFER_EXTERNAL_MEMORY = (1u << 0), /* ArrayBuffer created via jerry_create_arraybuffer_external. */\n  ECMA_ARRAYBUFFER_DETACHED = (1u << 1),        /* ArrayBuffer has been detached */\n} ecma_arraybuffer_extra_flag_t;\n\n/**\n * Check whether the ArrayBuffer has external underlying buffer\n */\n#define ECMA_ARRAYBUFFER_HAS_EXTERNAL_MEMORY(object_p) \\\n    ((((ecma_extended_object_t *) object_p)->u.class_prop.extra_info & ECMA_ARRAYBUFFER_EXTERNAL_MEMORY) != 0)\n\n/**\n * Struct to store information for ArrayBuffers with external memory.\n *\n * The following elements are stored in Jerry memory.\n *\n *  buffer_p - pointer to the external memory.\n *  free_cb - pointer to a callback function which is called when the ArrayBuffer is freed.\n */\ntypedef struct\n{\n  ecma_extended_object_t extended_object; /**< extended object part */\n  void *buffer_p; /**< external buffer pointer */\n  ecma_object_native_free_callback_t free_cb; /**<  the free callback for the above buffer pointer */\n} ecma_arraybuffer_external_info;\n\n/**\n * Some internal properties of TypedArray object.\n * It is only used when the offset is not 0, and\n * the array-length is not buffer-length / element_size.\n */\ntypedef struct\n{\n  ecma_extended_object_t extended_object; /**< extended object part */\n  uint32_t byte_offset; /**< the byteoffset of the above arraybuffer */\n  uint32_t array_length; /**< the array length */\n} ecma_extended_typedarray_object_t;\n\n/**\n * General structure for query %TypedArray% object's properties.\n **/\ntypedef struct\n{\n  ecma_object_t *array_buffer_p; /**< pointer to the typedArray's [[ViewedArrayBuffer]] internal slot */\n  lit_utf8_byte_t *buffer_p; /**< pointer to the underlying raw data buffer.\n                              *   Note:\n                              *    - This address is increased by the [ByteOffset]] internal property.\n                              *    - This address must be used during indexed read/write operation. */\n  ecma_typedarray_type_t id; /**< [[TypedArrayName]] internal slot */\n  uint32_t length; /**< [[ByteLength]] internal slot */\n  uint32_t offset; /**< [[ByteOffset]] internal slot. */\n  uint8_t shift; /**< the element size shift in the typedArray */\n  uint8_t element_size; /**< element size based on [[TypedArrayName]] in Table 49 */\n} ecma_typedarray_info_t;\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n/**\n * Checks whether a given typedarray is BigInt type or not.\n **/\n#define ECMA_TYPEDARRAY_IS_BIGINT_TYPE(id) \\\n    ((id) >= ECMA_BIGINT64_ARRAY)\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Executable (e.g. generator, async) object flags.\n */\ntypedef enum\n{\n  ECMA_EXECUTABLE_OBJECT_COMPLETED = (1u << 0), /**< executable object is completed and cannot be resumed */\n  ECMA_EXECUTABLE_OBJECT_RUNNING = (1u << 1), /**< executable object is currently running */\n  /* Generator specific flags. */\n  ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD = (1u << 2), /**< the executable object performs\n                                                         *   an await or a yield* operation */\n  ECMA_ASYNC_GENERATOR_CALLED = (1u << 3), /**< the async generator was executed before */\n  /* This must be the last generator specific flag. */\n  ECMA_AWAIT_STATE_SHIFT = 4, /**< shift for await states */\n} ecma_executable_object_flags_t;\n\n/**\n * Async function states after an await is completed.\n */\ntypedef enum\n{\n  ECMA_AWAIT_YIELD_NEXT, /**< wait for an iterator result object */\n  ECMA_AWAIT_YIELD_NEXT_RETURN, /**< wait for an iterator result object after a return operation */\n  ECMA_AWAIT_YIELD_RETURN, /**< wait for the argument passed to return operation */\n  ECMA_AWAIT_YIELD_NEXT_VALUE, /**< wait for the value property of an iterator result object */\n  ECMA_AWAIT_YIELD_OPERATION, /**< wait for the generator operation (next/throw/return) */\n  ECMA_AWAIT_YIELD_CLOSE, /**< wait for the result of iterator close operation */\n  /* After adding new ECMA_AWAIT_YIELD items, the ECMA_AWAIT_YIELD_END should be updated. */\n  ECMA_AWAIT_FOR_CLOSE, /**< wait for a close iterator result object of for-await-of statement */\n  ECMA_AWAIT_FOR_NEXT, /**< wait for an iterator result object of for-await-of statement */\n} ecma_await_states_t;\n\n/**\n * Checks whether the executable object is waiting for resuming.\n */\n#define ECMA_EXECUTABLE_OBJECT_IS_SUSPENDED(extra_info) \\\n  (!((extra_info) & (ECMA_EXECUTABLE_OBJECT_COMPLETED | ECMA_EXECUTABLE_OBJECT_RUNNING)))\n\n/**\n * Last item of yield* related await states.\n */\n#define ECMA_AWAIT_YIELD_END ECMA_AWAIT_YIELD_CLOSE\n\n/**\n * Helper macro for ECMA_EXECUTABLE_OBJECT_RESUME_EXEC.\n */\n#define ECMA_EXECUTABLE_OBJECT_RESUME_EXEC_MASK ((uint16_t) ~ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD)\n\n/**\n * Resume execution of the byte code.\n */\n#define ECMA_EXECUTABLE_OBJECT_RESUME_EXEC(executable_object_p) \\\n  ((executable_object_p)->extended_object.u.class_prop.extra_info &= ECMA_EXECUTABLE_OBJECT_RESUME_EXEC_MASK)\n\n/**\n * Enqueued task of an AsyncGenerator.\n *\n * An execution of a task has three steps:\n *  1) Perform a next/throw/return operation\n *  2) Resume the execution of the AsyncGenerator\n *  3) Fulfill or reject a promise if the AsyncGenerator yielded a value\n *     (these Promises are created by the AsyncGenerator itself)\n */\ntypedef struct\n{\n  ecma_value_t next; /**< points to the next task which will be performed after this task is completed */\n  ecma_value_t promise; /**< promise which will be fulfilled or rejected after this task is completed */\n  ecma_value_t operation_value; /**< value argument of the operation */\n  uint8_t operation_type; /**< type of operation (see ecma_async_generator_operation_type_t) */\n} ecma_async_generator_task_t;\n\n/**\n * Definition of PromiseCapability Records\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< object header, and [[Promise]] internal slot */\n  ecma_value_t resolve; /**< [[Resolve]] internal slot */\n  ecma_value_t reject; /**< [[Reject]] internal slot */\n} ecma_promise_capabality_t;\n\n/**\n * Definition of GetCapabilitiesExecutor Functions\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< object header */\n  ecma_value_t capability; /**< [[Capability]] internal slot */\n} ecma_promise_capability_executor_t;\n\n/**\n * Definition of Promise.all Resolve Element Functions\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< object header */\n  ecma_value_t remaining_elements; /**< [[Remaining elements]] internal slot */\n  ecma_value_t capability; /**< [[Capabilities]] internal slot */\n  ecma_value_t values; /**< [[Values]] internal slot */\n  uint32_t index; /**< [[Index]] and [[AlreadyCalled]] internal slot\n                   *   0 - if the element has been resolved\n                   *   real index + 1 in the [[Values]] list - otherwise */\n} ecma_promise_all_executor_t;\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n/**\n * Description of DataView objects.\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< header part */\n  ecma_object_t *buffer_p; /**< [[ViewedArrayBuffer]] internal slot */\n  uint32_t byte_offset; /**< [[ByteOffset]] internal slot */\n} ecma_dataview_object_t;\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */\n\n/**\n * Flag for indicating whether the symbol is a well known symbol\n *\n * See also: 6.1.5.1\n */\n#define ECMA_GLOBAL_SYMBOL_FLAG 0x01\n\n/**\n * Bitshift index for indicating whether the symbol is a well known symbol\n *\n * See also: 6.1.5.1\n */\n#define ECMA_GLOBAL_SYMBOL_SHIFT 1\n\n/**\n * Bitshift index for the symbol hash property\n */\n#define ECMA_SYMBOL_HASH_SHIFT 2\n\n#if (JERRY_STACK_LIMIT != 0)\n/**\n * Check the current stack usage. If the limit is reached a RangeError is raised.\n */\n#define ECMA_CHECK_STACK_USAGE() \\\ndo \\\n{ \\\n  if (ecma_get_current_stack_usage () > CONFIG_MEM_STACK_LIMIT) \\\n  { \\\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Maximum call stack size exceeded.\")); \\\n  } \\\n} while (0)\n#else /* JERRY_STACK_LIMIT == 0) */\n/**\n * If the stack limit is unlimited, this check is an empty macro.\n */\n#define ECMA_CHECK_STACK_USAGE()\n#endif /* (JERRY_STACK_LIMIT != 0) */\n\n/**\n * Invalid object pointer which represents abrupt completion\n */\n#define ECMA_OBJECT_POINTER_ERROR ((ecma_object_t *) 0x01)\n\n/**\n * Invalid property pointer which represents abrupt completion\n */\n#define ECMA_PROPERTY_POINTER_ERROR ((ecma_property_t *) 0x01)\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n/**\n * Description of Proxy objects.\n *\n * A Proxy object's property list is used to store extra information:\n *  * The \"header.u2.prototype_cp\" 1st tag bit stores the IsCallable information.\n *  * The \"header.u2.prototype_cp\" 2nd tag bit stores the IsConstructor information.\n */\ntypedef struct\n{\n  ecma_object_t header; /**< header part */\n  ecma_value_t target; /**< [[ProxyTarget]] internal slot */\n  ecma_value_t handler; /**< [[ProxyHandler]] internal slot */\n} ecma_proxy_object_t;\n\n/**\n * Description of Proxy objects.\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< header part */\n  ecma_value_t proxy; /**< [[RevocableProxy]] internal slot */\n} ecma_revocable_proxy_object_t;\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Type to repesent the maximum property index\n *\n * For ES6+ the maximum valid property index is 2**53 - 1\n */\ntypedef uint64_t ecma_length_t;\n#else /* !ENABLED (JERRY_ESNEXT) */\n/**\n * Type to repesent the maximum property index\n *\n * For ES5+ the maximum valid property index is 2**32 - 1\n */\ntypedef uint32_t ecma_length_t;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/**\n * BigUInt data is a sequence of uint32_t numbers.\n */\ntypedef uint32_t ecma_bigint_digit_t;\n\n/**\n * Special BigInt value representing zero.\n */\n#define ECMA_BIGINT_ZERO ((ecma_value_t) ECMA_TYPE_BIGINT)\n\n/**\n * Special BigInt value representing zero when the result is pointer.\n */\n#define ECMA_BIGINT_POINTER_TO_ZERO ((ecma_extended_primitive_t *) 0x1)\n\n/**\n * Return the size of a BigInt value in ecma_bigint_data_t units.\n */\n#define ECMA_BIGINT_GET_SIZE(value_p) \\\n  ((value_p)->u.bigint_sign_and_size & ~(uint32_t) (sizeof (ecma_bigint_digit_t) - 1))\n\n/**\n * Size of memory needs to be allocated for the digits of a BigInt.\n * The value is rounded up for two digits.\n */\n#define ECMA_BIGINT_GET_BYTE_SIZE(size) \\\n  (size_t) (((size) + sizeof (ecma_bigint_digit_t)) & ~(2 * sizeof (ecma_bigint_digit_t) - 1))\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/**\n * Struct for counting the different types properties in objects\n */\ntypedef struct\n{\n  uint32_t array_index_named_props; /**< number of array index named properties */\n  uint32_t string_named_props; /**< number of string named properties */\n  uint32_t symbol_named_props; /**< number of symbol named properties */\n  uint32_t lazy_string_named_props; /**< number of lazy instantiated string properties */\n  uint32_t lazy_symbol_named_props; /**< number of lazy instantiated symbol properties */\n} ecma_property_counter_t;\n\n/**\n * Arguments object related status flags\n */\ntypedef enum\n{\n  ECMA_ARGUMENTS_OBJECT_NO_FLAGS = 0,                    /* unmapped arguments object */\n  ECMA_ARGUMENTS_OBJECT_MAPPED = (1 << 0),               /* mapped arguments object */\n  ECMA_ARGUMENTS_OBJECT_STATIC_BYTECODE = (1 << 1),      /* static mapped arguments object */\n  ECMA_ARGUMENTS_OBJECT_CALLEE_INITIALIZED = (1 << 2),   /* 'callee' property has been lazy initialized */\n  ECMA_ARGUMENTS_OBJECT_CALLER_INITIALIZED = (1 << 3),   /* 'caller' property has been lazy initialized */\n  ECMA_ARGUMENTS_OBJECT_LENGTH_INITIALIZED = (1 << 4),   /* 'length' property has been lazy initialized */\n  ECMA_ARGUMENTS_OBJECT_ITERATOR_INITIALIZED = (1 << 5), /* 'Symbol.iterator' property has been lazy initialized */\n} ecma_arguments_object_flags_t;\n\n/**\n * Definition of unmapped arguments object\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< object header */\n  ecma_value_t callee; /**< 'callee' property */\n} ecma_unmapped_arguments_t;\n\n/**\n * Definition of mapped arguments object\n */\ntypedef struct\n{\n  ecma_unmapped_arguments_t unmapped; /**< unmapped arguments object header */\n  ecma_value_t lex_env; /**< environment reference */\n  union\n  {\n    ecma_value_t byte_code; /**< callee's compiled code */\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n    ecma_compiled_code_t *byte_code_p; /**< real byte code pointer */\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n  } u;\n} ecma_mapped_arguments_t;\n\n/**\n * @}\n * @}\n */\n\n#endif  /* !ECMA_GLOBALS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-helpers-collection.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"jrt.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmahelpers Helpers for operations with ECMA data types\n * @{\n */\n\n/**\n * Allocate a collection of ecma values.\n *\n * @return pointer to the collection\n */\necma_collection_t *\necma_new_collection (void)\n{\n  ecma_collection_t *collection_p;\n  collection_p = (ecma_collection_t *) jmem_heap_alloc_block (sizeof (ecma_collection_t));\n\n  collection_p->item_count = 0;\n  collection_p->capacity = ECMA_COLLECTION_INITIAL_CAPACITY;\n  const uint32_t size = ECMA_COLLECTION_ALLOCATED_SIZE (ECMA_COLLECTION_INITIAL_CAPACITY);\n  collection_p->buffer_p = (ecma_value_t *) jmem_heap_alloc_block (size);\n\n  return collection_p;\n} /* ecma_new_collection */\n\n/**\n * Deallocate a collection of ecma values without freeing it's values\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_collection_destroy (ecma_collection_t *collection_p) /**< value collection */\n{\n  JERRY_ASSERT (collection_p != NULL);\n\n  jmem_heap_free_block (collection_p->buffer_p, ECMA_COLLECTION_ALLOCATED_SIZE (collection_p->capacity));\n  jmem_heap_free_block (collection_p, sizeof (ecma_collection_t));\n} /* ecma_collection_destroy */\n\n/**\n * Free the object collection elements and deallocate the collection\n */\nvoid\necma_collection_free_objects (ecma_collection_t *collection_p) /**< value collection */\n{\n  JERRY_ASSERT (collection_p != NULL);\n\n  ecma_value_t *buffer_p = collection_p->buffer_p;\n\n  for (uint32_t i = 0; i < collection_p->item_count; i++)\n  {\n    if (ecma_is_value_object (buffer_p[i]))\n    {\n      ecma_deref_object (ecma_get_object_from_value (buffer_p[i]));\n    }\n  }\n\n  ecma_collection_destroy (collection_p);\n} /* ecma_collection_free_objects */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Free the template literal objects and deallocate the collection\n */\nvoid\necma_collection_free_template_literal (ecma_collection_t *collection_p) /**< value collection */\n{\n  for (uint32_t i = 0; i < collection_p->item_count; i++)\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (collection_p->buffer_p[i]);\n\n    JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_ARRAY);\n\n    ecma_extended_object_t *array_object_p = (ecma_extended_object_t *) object_p;\n\n    JERRY_ASSERT (array_object_p->u.array.length_prop_and_hole_count & ECMA_ARRAY_TEMPLATE_LITERAL);\n    array_object_p->u.array.length_prop_and_hole_count &= (uint32_t) ~ECMA_ARRAY_TEMPLATE_LITERAL;\n\n    ecma_property_value_t *property_value_p;\n\n    property_value_p = ecma_get_named_data_property (object_p, ecma_get_magic_string (LIT_MAGIC_STRING_RAW));\n    ecma_object_t *raw_object_p = ecma_get_object_from_value (property_value_p->value);\n\n    JERRY_ASSERT (ecma_get_object_type (raw_object_p) == ECMA_OBJECT_TYPE_ARRAY);\n\n    array_object_p = (ecma_extended_object_t *) raw_object_p;\n\n    JERRY_ASSERT (array_object_p->u.array.length_prop_and_hole_count & ECMA_ARRAY_TEMPLATE_LITERAL);\n    array_object_p->u.array.length_prop_and_hole_count &= (uint32_t) ~ECMA_ARRAY_TEMPLATE_LITERAL;\n\n    ecma_deref_object (raw_object_p);\n    ecma_deref_object (object_p);\n  }\n\n  ecma_collection_destroy (collection_p);\n} /* ecma_collection_free_template_literal */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Free the non-object collection elements and deallocate the collection\n */\nvoid\necma_collection_free_if_not_object (ecma_collection_t *collection_p) /**< value collection */\n{\n  JERRY_ASSERT (collection_p != NULL);\n\n  ecma_value_t *buffer_p = collection_p->buffer_p;\n\n  for (uint32_t i = 0; i < collection_p->item_count; i++)\n  {\n    ecma_free_value_if_not_object (buffer_p[i]);\n  }\n\n  ecma_collection_destroy (collection_p);\n} /* ecma_collection_free_if_not_object */\n\n/**\n * Free the collection elements and deallocate the collection\n */\nvoid\necma_collection_free (ecma_collection_t *collection_p) /**< value collection */\n{\n  JERRY_ASSERT (collection_p != NULL);\n\n  ecma_value_t *buffer_p = collection_p->buffer_p;\n\n  for (uint32_t i = 0; i < collection_p->item_count; i++)\n  {\n    ecma_free_value (buffer_p[i]);\n  }\n\n  ecma_collection_destroy (collection_p);\n} /* ecma_collection_free */\n\n/**\n * Append new value to ecma values collection\n *\n * Note: The reference count of the values are not increased\n */\nvoid\necma_collection_push_back (ecma_collection_t *collection_p, /**< value collection */\n                           ecma_value_t value) /**< ecma value to append */\n{\n  JERRY_ASSERT (collection_p != NULL);\n\n  ecma_value_t *buffer_p = collection_p->buffer_p;\n\n  if (JERRY_LIKELY (collection_p->item_count < collection_p->capacity))\n  {\n    buffer_p[collection_p->item_count++] = value;\n    return;\n  }\n\n  const uint32_t new_capacity = collection_p->capacity + ECMA_COLLECTION_GROW_FACTOR;\n  const uint32_t old_size = ECMA_COLLECTION_ALLOCATED_SIZE (collection_p->capacity);\n  const uint32_t new_size = ECMA_COLLECTION_ALLOCATED_SIZE (new_capacity);\n\n  buffer_p = jmem_heap_realloc_block (buffer_p, old_size, new_size);\n  buffer_p[collection_p->item_count++] = value;\n  collection_p->capacity = new_capacity;\n\n  collection_p->buffer_p = buffer_p;\n} /* ecma_collection_push_back */\n\n/**\n * Reserve space for the given amount of ecma_values in the collection\n */\nvoid\necma_collection_reserve (ecma_collection_t *collection_p, /**< value collection */\n                         uint32_t count) /**< number of ecma values to reserve */\n{\n  JERRY_ASSERT (collection_p != NULL);\n  JERRY_ASSERT (UINT32_MAX - count > collection_p->capacity);\n\n  const uint32_t new_capacity = collection_p->capacity + count;\n  const uint32_t old_size = ECMA_COLLECTION_ALLOCATED_SIZE (collection_p->capacity);\n  const uint32_t new_size = ECMA_COLLECTION_ALLOCATED_SIZE (new_capacity);\n\n  ecma_value_t *buffer_p = collection_p->buffer_p;\n  buffer_p = jmem_heap_realloc_block (buffer_p, old_size, new_size);\n\n  collection_p->capacity = new_capacity;\n  collection_p->buffer_p = buffer_p;\n} /* ecma_collection_reserve */\n\n/**\n * Append a list of values to the end of the collection\n */\nvoid\necma_collection_append (ecma_collection_t *collection_p, /**< value collection */\n                        const ecma_value_t *buffer_p, /**< values to append */\n                        uint32_t count) /**< number of ecma values to append */\n{\n  JERRY_ASSERT (collection_p != NULL);\n  JERRY_ASSERT (collection_p->capacity >= collection_p->item_count);\n\n  uint32_t free_count = collection_p->capacity - collection_p->item_count;\n\n  if (free_count < count)\n  {\n    ecma_collection_reserve (collection_p, count - free_count);\n  }\n\n  memcpy (collection_p->buffer_p + collection_p->item_count, buffer_p, count * sizeof (ecma_value_t));\n  collection_p->item_count += count;\n} /* ecma_collection_append */\n\n/**\n * Helper function to check if a given collection have duplicated properties or not\n *\n * @return true - if there are duplicated properties in the collection\n *         false - otherwise\n */\nbool\necma_collection_check_duplicated_entries (ecma_collection_t *collection_p) /**< prop name collection */\n{\n  if (collection_p->item_count == 0)\n  {\n    return false;\n  }\n\n  ecma_value_t *buffer_p = collection_p->buffer_p;\n\n  for (uint32_t i = 0; i < collection_p->item_count - 1; i++)\n  {\n    ecma_string_t *current_name_p = ecma_get_prop_name_from_value (buffer_p[i]);\n\n    for (uint32_t j = i + 1; j < collection_p->item_count; j++)\n    {\n      if (ecma_compare_ecma_strings (current_name_p, ecma_get_prop_name_from_value (buffer_p[j])))\n      {\n        return true;\n      }\n    }\n  }\n\n  return false;\n} /* ecma_collection_check_duplicated_entries */\n\n/**\n * Check the string value existance in the collection.\n *\n * Used by:\n *         - ecma_builtin_json_stringify step 4.b.ii.5\n *         - ecma_op_object_enumerate\n *\n * @return true, if the string is already in the collection.\n */\nbool\necma_collection_has_string_value (ecma_collection_t *collection_p, /**< collection */\n                                  ecma_string_t *string_p) /**< string */\n{\n  ecma_value_t *buffer_p = collection_p->buffer_p;\n\n  for (uint32_t i = 0; i < collection_p->item_count; i++)\n  {\n    ecma_string_t *current_p = ecma_get_string_from_value (buffer_p[i]);\n\n    if (ecma_compare_ecma_strings (current_p, string_p))\n    {\n      return true;\n    }\n  }\n\n  return false;\n} /* ecma_collection_has_string_value */\n\n/**\n * Initial capacity of an ecma-collection\n */\n#define ECMA_COMPACT_COLLECTION_GROWTH 8\n\n/**\n * Set the size of the compact collection\n */\n#define ECMA_COMPACT_COLLECTION_SET_SIZE(compact_collection_p, item_count, unused_items) \\\n  ((compact_collection_p)[0] = (((item_count) << ECMA_COMPACT_COLLECTION_SIZE_SHIFT) | (unused_items)))\n\n/**\n * Set the size of the compact collection\n */\n#define ECMA_COMPACT_COLLECTION_GET_UNUSED_ITEM_COUNT(compact_collection_p) \\\n  ((compact_collection_p)[0] & ((1 << ECMA_COMPACT_COLLECTION_SIZE_SHIFT) - 1))\n\n/**\n * Allocate a compact collection of ecma values\n *\n * @return pointer to the compact collection\n */\necma_value_t *\necma_new_compact_collection (void)\n{\n  size_t size = (ECMA_COMPACT_COLLECTION_GROWTH / 2) * sizeof (ecma_value_t);\n  ecma_value_t *compact_collection_p = (ecma_value_t *) jmem_heap_alloc_block (size);\n\n  ECMA_COMPACT_COLLECTION_SET_SIZE (compact_collection_p,\n                                    ECMA_COMPACT_COLLECTION_GROWTH / 2,\n                                    (ECMA_COMPACT_COLLECTION_GROWTH / 2) - 1);\n  return compact_collection_p;\n} /* ecma_new_compact_collection */\n\n/**\n * Append a value to the compact collection\n *\n * @return updated pointer to the compact collection\n */\necma_value_t *\necma_compact_collection_push_back (ecma_value_t *compact_collection_p, /**< compact collection */\n                                   ecma_value_t value) /**< ecma value to append */\n{\n  ecma_value_t size = ECMA_COMPACT_COLLECTION_GET_SIZE (compact_collection_p);\n  ecma_value_t unused_items = ECMA_COMPACT_COLLECTION_GET_UNUSED_ITEM_COUNT (compact_collection_p);\n\n  if (unused_items > 0)\n  {\n    compact_collection_p[size - unused_items] = value;\n    (*compact_collection_p)--;\n    return compact_collection_p;\n  }\n\n  if (size == ECMA_COMPACT_COLLECTION_GROWTH / 2)\n  {\n    size_t old_size = (ECMA_COMPACT_COLLECTION_GROWTH / 2) * sizeof (ecma_value_t);\n    size_t new_size = ECMA_COMPACT_COLLECTION_GROWTH * sizeof (ecma_value_t);\n    compact_collection_p = jmem_heap_realloc_block (compact_collection_p, old_size, new_size);\n\n    compact_collection_p[ECMA_COMPACT_COLLECTION_GROWTH / 2] = value;\n\n    ECMA_COMPACT_COLLECTION_SET_SIZE (compact_collection_p,\n                                      ECMA_COMPACT_COLLECTION_GROWTH,\n                                      (ECMA_COMPACT_COLLECTION_GROWTH / 2) - 1);\n    return compact_collection_p;\n  }\n\n  size_t old_size = size * sizeof (ecma_value_t);\n  size_t new_size = old_size + (ECMA_COMPACT_COLLECTION_GROWTH * sizeof (ecma_value_t));\n\n  compact_collection_p = jmem_heap_realloc_block (compact_collection_p, old_size, new_size);\n  compact_collection_p[size] = value;\n\n  ECMA_COMPACT_COLLECTION_SET_SIZE (compact_collection_p,\n                                    size + ECMA_COMPACT_COLLECTION_GROWTH,\n                                    ECMA_COMPACT_COLLECTION_GROWTH - 1);\n  return compact_collection_p;\n} /* ecma_compact_collection_push_back */\n\n/**\n * Discard the unused elements of a compact collection\n *\n * Note:\n *     further items should not be added after this call\n *\n * @return updated pointer to the compact collection\n */\necma_value_t *\necma_compact_collection_shrink (ecma_value_t *compact_collection_p) /**< compact collection */\n{\n  ecma_value_t unused_items = ECMA_COMPACT_COLLECTION_GET_UNUSED_ITEM_COUNT (compact_collection_p);\n\n  if (unused_items == 0)\n  {\n    return compact_collection_p;\n  }\n\n  ecma_value_t size = ECMA_COMPACT_COLLECTION_GET_SIZE (compact_collection_p);\n\n  size_t old_size = size * sizeof (ecma_value_t);\n  size_t new_size = (size - unused_items) * sizeof (ecma_value_t);\n\n  compact_collection_p = jmem_heap_realloc_block (compact_collection_p, old_size, new_size);\n\n  ECMA_COMPACT_COLLECTION_SET_SIZE (compact_collection_p, size - unused_items, 0);\n  return compact_collection_p;\n} /* ecma_compact_collection_shrink */\n\n/**\n * Free a compact collection\n */\nvoid\necma_compact_collection_free (ecma_value_t *compact_collection_p) /**< compact collection */\n{\n  ecma_value_t size = ECMA_COMPACT_COLLECTION_GET_SIZE (compact_collection_p);\n  ecma_value_t unused_items = ECMA_COMPACT_COLLECTION_GET_UNUSED_ITEM_COUNT (compact_collection_p);\n\n  ecma_value_t *end_p = compact_collection_p + size - unused_items;\n  ecma_value_t *current_p = compact_collection_p + 1;\n\n  while (current_p < end_p)\n  {\n    ecma_free_value (*current_p++);\n  }\n\n  jmem_heap_free_block (compact_collection_p, size * sizeof (ecma_value_t));\n} /* ecma_compact_collection_free */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-helpers-conversion.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"jrt-libc-includes.h\"\n#include \"lit-char-helpers.h\"\n#include \"lit-magic-strings.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmahelpers Helpers for operations with ECMA data types\n * @{\n */\n\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n\n/**\n * \\addtogroup ecmahelpersbigintegers Helpers for operations intermediate 128-bit integers\n * @{\n */\n\n/**\n * 128-bit integer type\n */\ntypedef struct\n{\n  uint64_t lo; /**< low 64 bits */\n  uint64_t hi; /**< high 64 bits */\n} ecma_uint128_t;\n\n/**\n * Round high part of 128-bit integer to uint64_t\n *\n * @return rounded high to uint64_t\n */\nstatic uint64_t\necma_round_high_to_uint64 (ecma_uint128_t *num_p)\n{\n  uint64_t masked_lo = num_p->lo & ~(1ULL << 63u);\n  uint64_t masked_hi = num_p->hi & 0x1;\n\n  if ((num_p->lo >> 63u != 0)\n      && (masked_lo > 0 || masked_hi != 0))\n  {\n    return (num_p->hi + 1);\n  }\n  return num_p->hi;\n} /* ecma_round_high_to_uint64 */\n\n/**\n * Check if 128-bit integer is zero\n */\n#define ECMA_UINT128_IS_ZERO(name) \\\n  (name.hi == 0 && name.lo == 0)\n\n/**\n * Left shift 128-bit integer by max 63 bits\n */\n#define ECMA_UINT128_LEFT_SHIFT_MAX63(name, shift) \\\n{ \\\n  name.hi = (name.hi << (shift)) | (name.lo >> (64 - (shift))); \\\n  name.lo <<= (shift); \\\n}\n\n/**\n * Right shift 128-bit integer by max 63 bits\n */\n#define ECMA_UINT128_RIGHT_SHIFT_MAX63(name, shift) \\\n{ \\\n  name.lo = (name.lo >> (shift)) | (name.hi << (64 - (shift))); \\\n  name.hi >>= (shift); \\\n}\n\n/**\n * Add 128-bit integer\n */\n#define ECMA_UINT128_ADD(name_add_to, name_to_add) \\\n{ \\\n  name_add_to.hi += name_to_add.hi; \\\n  name_add_to.lo += name_to_add.lo; \\\n  if (name_add_to.lo < name_to_add.lo) \\\n  { \\\n    name_add_to.hi++; \\\n  } \\\n}\n\n/**\n * Multiply 128-bit integer by 10\n */\n#define ECMA_UINT128_MUL10(name) \\\n{ \\\n  ECMA_UINT128_LEFT_SHIFT_MAX63 (name, 1u); \\\n  \\\n  ecma_uint128_t name ## _tmp = name; \\\n  \\\n  ECMA_UINT128_LEFT_SHIFT_MAX63 (name ## _tmp, 2u); \\\n  \\\n  ECMA_UINT128_ADD (name, name ## _tmp); \\\n}\n\n/**\n * Divide 128-bit integer by 10\n *\n * N = N3 *2^96  + N2 *2^64  + N1 *2^32  + N0 *2^0     // 128-bit dividend\n * T = T3 *2^-32 + T2 *2^-64 + T1 *2^-96 + T0 *2^-128  // 128-bit divisor reciprocal, 1/10 * 2^-128\n *\n * N * T    = N3*T3 *2^64 + N2*T3 *2^32 + N1*T3 *2^0 + N0*T3 *2^-32\n *          +               N3*T2 *2^32 + N2*T2 *2^0 + N1*T2 *2^-32 + N0*T2 *2^-64\n *          +                             N3*T1 *2^0 + N2*T1 *2^-32 + N1*T1 *2^-64 + N0*T1 *2^-96\n *          +                                          N3*T0 *2^-32 + N2*T0 *2^-64 + N1*T0 *2^-96 + N0*T0 *2^-128\n *\n *  Q3=carry  Q2=^+carry    Q1=^+carry    Q0=^+carry   fraction=^...\n *\n * Q = Q3 *2^96  + Q2 *2^64  + Q1 *2^32  + Q0 *2^0     // 128-bit quotient\n */\n#define ECMA_UINT128_DIV10(name) \\\n{ \\\n  /* estimation of reciprocal of 10, 128 bits right of the binary point (T1 == T2) */ \\\n  const uint64_t tenth_l = 0x9999999aul; \\\n  const uint64_t tenth_m = 0x99999999ul; \\\n  const uint64_t tenth_h = 0x19999999ul; \\\n  \\\n  uint64_t l0 = ((uint32_t) name.lo) * tenth_l; \\\n  uint64_t l1 = (name.lo >> 32u) * tenth_l; \\\n  uint64_t l2 = ((uint32_t) name.hi) * tenth_l; \\\n  uint64_t l3 = (name.hi >> 32u) * tenth_l; \\\n  uint64_t m0 = ((uint32_t) name.lo) * tenth_m; \\\n  uint64_t m1 = (name.lo >> 32u) * tenth_m; \\\n  uint64_t m2 = ((uint32_t) name.hi) * tenth_m; \\\n  uint64_t m3 = (name.hi >> 32u) * tenth_m; \\\n  uint64_t h0 = ((uint32_t) name.lo) * tenth_h; \\\n  uint64_t h1 = (name.lo >> 32u) * tenth_h; \\\n  uint64_t h2 = ((uint32_t) name.hi) * tenth_h; \\\n  uint64_t h3 = (name.hi >> 32u) * tenth_h; \\\n  \\\n  uint64_t q0 = l0 >> 32u; \\\n  q0 += (uint32_t) l1; \\\n  q0 += (uint32_t) m0; \\\n  \\\n  q0 >>= 32u; \\\n  q0 += l1 >> 32u; \\\n  q0 += m0 >> 32u; \\\n  q0 += (uint32_t) l2; \\\n  q0 += (uint32_t) m1; \\\n  q0 += (uint32_t) m0; \\\n  \\\n  q0 >>= 32u; \\\n  q0 += l2 >> 32u; \\\n  q0 += m1 >> 32u; \\\n  q0 += m0 >> 32u; \\\n  q0 += (uint32_t) l3; \\\n  q0 += (uint32_t) m2; \\\n  q0 += (uint32_t) m1; \\\n  q0 += (uint32_t) h0; \\\n  \\\n  q0 >>=32u; \\\n  q0 += l3 >> 32u; \\\n  q0 += m2 >> 32u; \\\n  q0 += m1 >> 32u; \\\n  q0 += h0 >> 32u; \\\n  q0 += (uint32_t) m3; \\\n  q0 += (uint32_t) m2; \\\n  q0 += (uint32_t) h1; \\\n  \\\n  uint64_t q1 = q0 >> 32u; \\\n  q1 += m3 >> 32u; \\\n  q1 += m2 >> 32u; \\\n  q1 += h1 >> 32u; \\\n  q1 += (uint32_t) m3; \\\n  q1 += (uint32_t) h2; \\\n  \\\n  uint64_t q32 = q1 >> 32u; \\\n  q32 += m3 >> 32u; \\\n  q32 += h2 >> 32u; \\\n  q32 += h3; \\\n  \\\n  name.lo = (q1 << 32u) | ((uint32_t) q0); \\\n  name.hi = q32; \\\n}\n\n#if defined (__GNUC__) || defined (__clang__)\n\n/**\n * Count leading zeros in the topmost 64 bits of a 128-bit integer.\n */\n#define ECMA_UINT128_CLZ_MAX63(name) \\\n  __builtin_clzll (name.hi)\n\n/**\n * Count leading zeros in the topmost 4 bits of a 128-bit integer.\n */\n#define ECMA_UINT128_CLZ_MAX4(name) \\\n  __builtin_clzll (name.hi)\n\n#else /* !__GNUC__ && !__clang__ */\n\n/**\n * Count leading zeros in a 64-bit integer. The behaviour is undefined for 0.\n *\n * @return number of leading zeros.\n */\nstatic inline int JERRY_ATTR_ALWAYS_INLINE\necma_uint64_clz (uint64_t n) /**< integer to count leading zeros in */\n{\n  JERRY_ASSERT (n != 0);\n\n  int cnt = 0;\n  uint64_t one = 0x8000000000000000ull;\n  while ((n & one) == 0)\n  {\n    cnt++;\n    one >>= 1;\n  }\n  return cnt;\n} /* ecma_uint64_clz */\n\n/**\n * Number of leading zeros in 4-bit integers.\n */\nstatic const uint8_t ecma_uint4_clz[] = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 };\n\n/**\n * Count leading zeros in the topmost 64 bits of a 128-bit integer.\n */\n#define ECMA_UINT128_CLZ_MAX63(name) \\\n  ecma_uint64_clz (name.hi)\n\n/**\n * Count leading zeros in the topmost 4 bits of a 128-bit integer.\n */\n#define ECMA_UINT128_CLZ_MAX4(name) \\\n  ecma_uint4_clz[name.hi >> 60]\n\n#endif /* __GNUC__ || __clang__ */\n\n/**\n * @}\n */\n\n/**\n * Number.MAX_VALUE exponent part when using 64 bit float representation.\n */\n#define NUMBER_MAX_DECIMAL_EXPONENT 308\n/**\n * Number.MIN_VALUE exponent part when using 64 bit float representation.\n */\n#define NUMBER_MIN_DECIMAL_EXPONENT -324\n\n#elif !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n\n/**\n * Number.MAX_VALUE exponent part when using 32 bit float representation.\n */\n#define NUMBER_MAX_DECIMAL_EXPONENT 38\n/**\n * Number.MIN_VALUE exponent part when using 32 bit float representation.\n */\n#define NUMBER_MIN_DECIMAL_EXPONENT -45\n\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n/**\n * Value of epsilon\n */\n#define EPSILON 0.0000001\n\n/**\n * ECMA-defined conversion from string to number for different radixes (2, 8, 16).\n *\n * See also:\n *          ECMA-262 v5 9.3.1\n *          ECMA-262 v6 7.1.3.1\n *\n * @return NaN - if the conversion fails\n *         converted number - otherwise\n */\nstatic ecma_number_t\necma_utf8_string_to_number_by_radix (const lit_utf8_byte_t *str_p, /**< utf-8 string */\n                                     const lit_utf8_byte_t *end_p, /**< end of utf-8 string  */\n                                     uint32_t radix) /**< radix */\n{\n#if ENABLED (JERRY_ESNEXT)\n  bool allow_underscore = (radix & ECMA_CONVERSION_ALLOW_UNDERSCORE);\n  radix &= (uint32_t) ~ECMA_CONVERSION_ALLOW_UNDERSCORE;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  JERRY_ASSERT (radix == 2 || radix == 8 || radix == 16);\n\n  ecma_number_t num = ECMA_NUMBER_ZERO;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (radix <= 8)\n  {\n    lit_code_point_t upper_limit = LIT_CHAR_0 + radix;\n\n    for (const lit_utf8_byte_t * iter_p = str_p;  iter_p <= end_p; iter_p++)\n    {\n      int32_t digit_value;\n\n      if (*iter_p >= LIT_CHAR_0 && *iter_p < upper_limit)\n      {\n        digit_value = (*iter_p - LIT_CHAR_0);\n      }\n      else\n      {\n        return ecma_number_make_nan ();\n      }\n\n      num = num * radix + (ecma_number_t) digit_value;\n    }\n\n    return num;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  for (const lit_utf8_byte_t * iter_p = str_p; iter_p <= end_p; iter_p++)\n  {\n    int32_t digit_value;\n\n    if (*iter_p >= LIT_CHAR_0\n        && *iter_p <= LIT_CHAR_9)\n    {\n      digit_value = (*iter_p - LIT_CHAR_0);\n    }\n    else if (*iter_p >= LIT_CHAR_LOWERCASE_A\n            && *iter_p <= LIT_CHAR_LOWERCASE_F)\n    {\n      digit_value = 10 + (*iter_p - LIT_CHAR_LOWERCASE_A);\n    }\n    else if (*iter_p >= LIT_CHAR_UPPERCASE_A\n            && *iter_p <= LIT_CHAR_UPPERCASE_F)\n    {\n      digit_value = 10 + (*iter_p - LIT_CHAR_UPPERCASE_A);\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (*iter_p == LIT_CHAR_UNDERSCORE && allow_underscore)\n    {\n      continue;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else\n    {\n      return ecma_number_make_nan ();\n    }\n\n    num = num * (ecma_number_t) radix + (ecma_number_t) digit_value;\n  }\n\n  return num;\n} /* ecma_utf8_string_to_number_by_radix */\n\n/**\n * ECMA-defined conversion of string to Number.\n *\n * See also:\n *          ECMA-262 v5, 9.3.1\n *\n * @return NaN - if the conversion fails\n *         converted number - otherwise\n */\necma_number_t\necma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */\n                            lit_utf8_size_t str_size, /**< string size */\n                            uint32_t options) /**< allowing underscore option bit */\n{\n  /* TODO: Check license issues */\n\n  if (str_size == 0)\n  {\n    return ECMA_NUMBER_ZERO;\n  }\n\n  ecma_string_trim_helper (&str_p, &str_size);\n  const lit_utf8_byte_t *end_p = str_p + (str_size - 1);\n\n  if (str_size < 1)\n  {\n    return ECMA_NUMBER_ZERO;\n  }\n\n  if (end_p >= str_p + 2\n      && str_p[0] == LIT_CHAR_0)\n  {\n    switch (LEXER_TO_ASCII_LOWERCASE (str_p[1]))\n    {\n      case LIT_CHAR_LOWERCASE_X :\n      {\n        return ecma_utf8_string_to_number_by_radix (str_p + 2, end_p, 16 | options);\n      }\n      case LIT_CHAR_LOWERCASE_O :\n      {\n        return ecma_utf8_string_to_number_by_radix (str_p + 2, end_p, 8 | options);\n      }\n      case LIT_CHAR_LOWERCASE_B :\n      {\n        return ecma_utf8_string_to_number_by_radix (str_p + 2, end_p, 2 | options);\n      }\n      default:\n      {\n        break;\n      }\n    }\n  }\n\n  bool sign = false; /* positive */\n\n  if (*str_p == LIT_CHAR_PLUS)\n  {\n    str_p++;\n  }\n  else if (*str_p == LIT_CHAR_MINUS)\n  {\n    sign = true; /* negative */\n\n    str_p++;\n  }\n\n  if (str_p > end_p)\n  {\n    return ecma_number_make_nan ();\n  }\n\n  /* Checking if significant part of parse string is equal to \"Infinity\" */\n  const lit_utf8_byte_t *infinity_zt_str_p = lit_get_magic_string_utf8 (LIT_MAGIC_STRING_INFINITY_UL);\n\n  JERRY_ASSERT (strlen ((const char *) infinity_zt_str_p) == 8);\n\n  if ((end_p - str_p) == (8 - 1) && memcmp (infinity_zt_str_p, str_p, 8) == 0)\n  {\n    return ecma_number_make_infinity (sign);\n  }\n\n  uint64_t fraction_uint64 = 0;\n  uint32_t digits = 0;\n  int32_t e = 0;\n  bool digit_seen = false;\n\n  /* Parsing digits before dot (or before end of digits part if there is no dot in number) */\n  while (str_p <= end_p)\n  {\n    int32_t digit_value;\n\n    if (*str_p >= LIT_CHAR_0\n        && *str_p <= LIT_CHAR_9)\n    {\n      digit_seen = true;\n      digit_value = (*str_p - LIT_CHAR_0);\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (*str_p == LIT_CHAR_UNDERSCORE && (options & ECMA_CONVERSION_ALLOW_UNDERSCORE))\n    {\n      str_p++;\n      continue;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else\n    {\n      break;\n    }\n\n    if (digits != 0 || digit_value != 0)\n    {\n      if (digits < ECMA_NUMBER_MAX_DIGITS)\n      {\n        fraction_uint64 = fraction_uint64 * 10 + (uint32_t) digit_value;\n        digits++;\n      }\n      else\n      {\n        e++;\n      }\n    }\n\n    str_p++;\n  }\n\n  if (str_p <= end_p\n      && *str_p == LIT_CHAR_DOT)\n  {\n    str_p++;\n\n    if (!digit_seen && str_p > end_p)\n    {\n      return ecma_number_make_nan ();\n    }\n\n    /* Parsing number's part that is placed after dot */\n    while (str_p <= end_p)\n    {\n      int32_t digit_value;\n\n      if (*str_p >= LIT_CHAR_0\n          && *str_p <= LIT_CHAR_9)\n      {\n        digit_seen = true;\n        digit_value = (*str_p - LIT_CHAR_0);\n      }\n      else if (*str_p == LIT_CHAR_UNDERSCORE && (options & ECMA_CONVERSION_ALLOW_UNDERSCORE))\n      {\n        str_p++;\n        continue;\n      }\n      else\n      {\n        break;\n      }\n\n      if (digits < ECMA_NUMBER_MAX_DIGITS)\n      {\n        if (digits != 0 || digit_value != 0)\n        {\n          fraction_uint64 = fraction_uint64 * 10 + (uint32_t) digit_value;\n          digits++;\n        }\n\n        e--;\n      }\n\n      str_p++;\n    }\n  }\n\n  /* Parsing exponent literal */\n  int32_t e_in_lit = 0;\n  bool e_in_lit_sign = false;\n\n  if (str_p <= end_p\n      && (*str_p == LIT_CHAR_LOWERCASE_E\n          || *str_p == LIT_CHAR_UPPERCASE_E))\n  {\n    str_p++;\n\n    if (!digit_seen || str_p > end_p)\n    {\n      return ecma_number_make_nan ();\n    }\n\n    if (*str_p == LIT_CHAR_PLUS)\n    {\n      str_p++;\n    }\n    else if (*str_p == LIT_CHAR_MINUS)\n    {\n      e_in_lit_sign = true;\n      str_p++;\n    }\n\n    if (str_p > end_p)\n    {\n      return ecma_number_make_nan ();\n    }\n\n    while (str_p <= end_p)\n    {\n      int32_t digit_value;\n\n      if (*str_p >= LIT_CHAR_0\n          && *str_p <= LIT_CHAR_9)\n      {\n        digit_value = (*str_p - LIT_CHAR_0);\n      }\n#if ENABLED (JERRY_ESNEXT)\n      else if (*str_p == LIT_CHAR_UNDERSCORE && (options & ECMA_CONVERSION_ALLOW_UNDERSCORE))\n      {\n        str_p++;\n        continue;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      else\n      {\n        return ecma_number_make_nan ();\n      }\n\n      e_in_lit = e_in_lit * 10 + digit_value;\n      int32_t e_check = e + (int32_t) digits - 1  + (e_in_lit_sign ? -e_in_lit : e_in_lit);\n\n      if (e_check > NUMBER_MAX_DECIMAL_EXPONENT)\n      {\n        return ecma_number_make_infinity (sign);\n      }\n      else if (e_check < NUMBER_MIN_DECIMAL_EXPONENT)\n      {\n        return sign ? -ECMA_NUMBER_ZERO : ECMA_NUMBER_ZERO;\n      }\n\n      str_p++;\n    }\n  }\n\n  /* Adding value of exponent literal to exponent value */\n  if (e_in_lit_sign)\n  {\n    e -= e_in_lit;\n  }\n  else\n  {\n    e += e_in_lit;\n  }\n\n  bool e_sign;\n\n  if (e < 0)\n  {\n    e_sign = true;\n    e = -e;\n  }\n  else\n  {\n    e_sign = false;\n  }\n\n  if (str_p <= end_p)\n  {\n    return ecma_number_make_nan ();\n  }\n\n  JERRY_ASSERT (str_p == end_p + 1);\n\n  if (fraction_uint64 == 0)\n  {\n    return sign ? -ECMA_NUMBER_ZERO : ECMA_NUMBER_ZERO;\n  }\n\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  /*\n   * 128-bit mantissa storage\n   *\n   * Normalized: |4 bits zero|124-bit mantissa with highest bit set to 1|\n   */\n  ecma_uint128_t fraction_uint128 = { 0, fraction_uint64 };\n\n  /* Normalizing mantissa */\n  int shift = 4 - ECMA_UINT128_CLZ_MAX63 (fraction_uint128);\n  if (shift < 0)\n  {\n    ECMA_UINT128_LEFT_SHIFT_MAX63 (fraction_uint128, -shift);\n  }\n  else\n  {\n    ECMA_UINT128_RIGHT_SHIFT_MAX63 (fraction_uint128, shift);\n  }\n  int32_t binary_exponent = 1 + shift;\n\n  if (!e_sign)\n  {\n    /* positive or zero decimal exponent */\n    JERRY_ASSERT (e >= 0);\n\n    while (e > 0)\n    {\n      JERRY_ASSERT (ECMA_UINT128_CLZ_MAX63 (fraction_uint128) == 4);\n\n      ECMA_UINT128_MUL10 (fraction_uint128);\n\n      e--;\n\n      /* Normalizing mantissa */\n      shift = 4 - ECMA_UINT128_CLZ_MAX4 (fraction_uint128);\n      JERRY_ASSERT (shift >= 0);\n      ECMA_UINT128_RIGHT_SHIFT_MAX63 (fraction_uint128, shift);\n      binary_exponent += shift;\n    }\n  }\n  else\n  {\n    /* negative decimal exponent */\n    JERRY_ASSERT (e != 0);\n\n    while (e > 0)\n    {\n      /* Denormalizing mantissa, moving highest 1 to bit 127 */\n      shift = ECMA_UINT128_CLZ_MAX4 (fraction_uint128);\n      JERRY_ASSERT (shift <= 4);\n      ECMA_UINT128_LEFT_SHIFT_MAX63 (fraction_uint128, shift);\n      binary_exponent -= shift;\n\n      JERRY_ASSERT (!ECMA_UINT128_IS_ZERO (fraction_uint128));\n\n      ECMA_UINT128_DIV10 (fraction_uint128);\n\n      e--;\n    }\n\n    /* Normalizing mantissa */\n    shift = 4 - ECMA_UINT128_CLZ_MAX4 (fraction_uint128);\n    JERRY_ASSERT (shift >= 0);\n    ECMA_UINT128_RIGHT_SHIFT_MAX63 (fraction_uint128, shift);\n    binary_exponent += shift;\n\n    JERRY_ASSERT (ECMA_UINT128_CLZ_MAX63 (fraction_uint128) == 4);\n  }\n\n  JERRY_ASSERT (!ECMA_UINT128_IS_ZERO (fraction_uint128));\n  JERRY_ASSERT (ECMA_UINT128_CLZ_MAX63 (fraction_uint128) == 4);\n\n  /*\n   * Preparing mantissa for conversion to 52-bit representation, converting it to:\n   *\n   * |11 zero bits|1|116 mantissa bits|\n   */\n  ECMA_UINT128_RIGHT_SHIFT_MAX63 (fraction_uint128, 7u);\n  binary_exponent += 7;\n\n  JERRY_ASSERT (ECMA_UINT128_CLZ_MAX63 (fraction_uint128) == 11);\n\n  fraction_uint64 = ecma_round_high_to_uint64 (&fraction_uint128);\n\n  return ecma_number_make_from_sign_mantissa_and_exponent (sign, fraction_uint64, binary_exponent);\n#elif !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  /* Less precise conversion */\n  ecma_number_t num = (ecma_number_t) (uint32_t) fraction_uint64;\n\n  ecma_number_t m = e_sign ? (ecma_number_t) 0.1 : (ecma_number_t) 10.0;\n\n  while (e)\n  {\n    if (e % 2)\n    {\n      num *= m;\n    }\n\n    m *= m;\n    e /= 2;\n  }\n\n  return num;\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n} /* ecma_utf8_string_to_number */\n\n/**\n * ECMA-defined conversion of UInt32 to String (zero-terminated).\n *\n * See also:\n *          ECMA-262 v5, 9.8.1\n *\n * @return number of bytes copied to buffer\n */\nlit_utf8_size_t\necma_uint32_to_utf8_string (uint32_t value, /**< value to convert */\n                            lit_utf8_byte_t *out_buffer_p, /**< buffer for string */\n                            lit_utf8_size_t buffer_size) /**< size of buffer */\n{\n  lit_utf8_byte_t *buf_p = out_buffer_p + buffer_size;\n\n  do\n  {\n    JERRY_ASSERT (buf_p >= out_buffer_p);\n\n    buf_p--;\n    *buf_p = (lit_utf8_byte_t) ((value % 10) + LIT_CHAR_0);\n    value /= 10;\n  }\n  while (value != 0);\n\n  JERRY_ASSERT (buf_p >= out_buffer_p);\n\n  lit_utf8_size_t bytes_copied = (lit_utf8_size_t) (out_buffer_p + buffer_size - buf_p);\n\n  if (JERRY_LIKELY (buf_p != out_buffer_p))\n  {\n    memmove (out_buffer_p, buf_p, bytes_copied);\n  }\n\n  return bytes_copied;\n} /* ecma_uint32_to_utf8_string */\n\n/**\n * ECMA-defined conversion of Number value to UInt32 value\n *\n * See also:\n *          ECMA-262 v5, 9.6\n *\n * @return 32-bit unsigned integer - result of conversion.\n */\nuint32_t\necma_number_to_uint32 (ecma_number_t num) /**< ecma-number */\n{\n  if (JERRY_UNLIKELY (ecma_number_is_zero (num) || !ecma_number_is_finite (num)))\n  {\n    return 0;\n  }\n\n  const bool sign = ecma_number_is_negative (num);\n  const ecma_number_t abs_num = sign ? -num : num;\n\n  /* 2 ^ 32 */\n  const uint64_t uint64_2_pow_32 = (1ull << 32);\n\n  const ecma_number_t num_2_pow_32 = (float) uint64_2_pow_32;\n\n  ecma_number_t num_in_uint32_range;\n\n  if (abs_num >= num_2_pow_32)\n  {\n    num_in_uint32_range = ecma_number_calc_remainder (abs_num,\n                                                      num_2_pow_32);\n  }\n  else\n  {\n    num_in_uint32_range = abs_num;\n  }\n\n  /* Check that the floating point value can be represented with uint32_t. */\n  JERRY_ASSERT (num_in_uint32_range < uint64_2_pow_32);\n  uint32_t uint32_num = (uint32_t) num_in_uint32_range;\n\n  const uint32_t ret = sign ? -uint32_num : uint32_num;\n\n#ifndef JERRY_NDEBUG\n  if (sign\n      && uint32_num != 0)\n  {\n    JERRY_ASSERT (ret == uint64_2_pow_32 - uint32_num);\n  }\n  else\n  {\n    JERRY_ASSERT (ret == uint32_num);\n  }\n#endif /* !JERRY_NDEBUG */\n\n  return ret;\n} /* ecma_number_to_uint32 */\n\n/**\n * ECMA-defined conversion of Number value to Int32 value\n *\n * See also:\n *          ECMA-262 v5, 9.5\n *\n * @return 32-bit signed integer - result of conversion.\n */\nint32_t\necma_number_to_int32 (ecma_number_t num) /**< ecma-number */\n{\n  uint32_t uint32_num = ecma_number_to_uint32 (num);\n\n  /* 2 ^ 32 */\n  const int64_t int64_2_pow_32 = (1ll << 32);\n\n  /* 2 ^ 31 */\n  const uint32_t uint32_2_pow_31 = (1ull << 31);\n\n  int32_t ret;\n\n  if (uint32_num >= uint32_2_pow_31)\n  {\n    ret = (int32_t) (uint32_num - int64_2_pow_32);\n  }\n  else\n  {\n    ret = (int32_t) uint32_num;\n  }\n\n#ifndef JERRY_NDEBUG\n  int64_t int64_num = uint32_num;\n\n  JERRY_ASSERT (int64_num >= 0);\n\n  if (int64_num >= uint32_2_pow_31)\n  {\n    JERRY_ASSERT (ret == int64_num - int64_2_pow_32);\n  }\n  else\n  {\n    JERRY_ASSERT (ret == int64_num);\n  }\n#endif /* !JERRY_NDEBUG */\n\n  return ret;\n} /* ecma_number_to_int32 */\n\n/**\n  * Perform conversion of ecma-number to decimal representation with decimal exponent.\n  *\n  * Note:\n  *      The calculated values correspond to s, n, k parameters in ECMA-262 v5, 9.8.1, item 5:\n  *         - parameter out_digits_p corresponds to s, the digits of the number;\n  *         - parameter out_decimal_exp_p corresponds to n, the decimal exponent;\n  *         - return value corresponds to k, the number of digits.\n  *\n  * @return the number of digits\n  */\nlit_utf8_size_t\necma_number_to_decimal (ecma_number_t num, /**< ecma-number */\n                        lit_utf8_byte_t *out_digits_p, /**< [out] buffer to fill with digits */\n                        int32_t *out_decimal_exp_p) /**< [out] decimal exponent */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (num));\n  JERRY_ASSERT (!ecma_number_is_zero (num));\n  JERRY_ASSERT (!ecma_number_is_infinity (num));\n  JERRY_ASSERT (!ecma_number_is_negative (num));\n\n  return ecma_errol0_dtoa ((double) num, out_digits_p, out_decimal_exp_p);\n} /* ecma_number_to_decimal */\n\n/**\n * Convert ecma-number to zero-terminated string\n *\n * See also:\n *          ECMA-262 v5, 9.8.1\n *\n *\n * @return size of utf-8 string\n */\nlit_utf8_size_t\necma_number_to_utf8_string (ecma_number_t num, /**< ecma-number */\n                            lit_utf8_byte_t *buffer_p, /**< buffer for utf-8 string */\n                            lit_utf8_size_t buffer_size) /**< size of buffer */\n{\n  lit_utf8_byte_t *dst_p;\n\n  if (ecma_number_is_nan (num))\n  {\n    /* 1. */\n    dst_p = lit_copy_magic_string_to_buffer (LIT_MAGIC_STRING_NAN, buffer_p, buffer_size);\n    return (lit_utf8_size_t) (dst_p - buffer_p);\n  }\n\n  if (ecma_number_is_zero (num))\n  {\n    /* 2. */\n    *buffer_p = LIT_CHAR_0;\n    JERRY_ASSERT (1 <= buffer_size);\n    return 1;\n  }\n\n  dst_p = buffer_p;\n\n  if (ecma_number_is_negative (num))\n  {\n    /* 3. */\n    *dst_p++ = LIT_CHAR_MINUS;\n    num = -num;\n  }\n\n  if (ecma_number_is_infinity (num))\n  {\n    /* 4. */\n    dst_p = lit_copy_magic_string_to_buffer (LIT_MAGIC_STRING_INFINITY_UL, dst_p,\n                                             (lit_utf8_size_t) (buffer_p + buffer_size - dst_p));\n    JERRY_ASSERT (dst_p <= buffer_p + buffer_size);\n    return (lit_utf8_size_t) (dst_p - buffer_p);\n  }\n\n  JERRY_ASSERT (ecma_number_get_next (ecma_number_get_prev (num)) == num);\n\n  /* 5. */\n  uint32_t num_uint32 = ecma_number_to_uint32 (num);\n\n  if (((ecma_number_t) num_uint32) == num)\n  {\n    dst_p += ecma_uint32_to_utf8_string (num_uint32, dst_p, (lit_utf8_size_t) (buffer_p + buffer_size - dst_p));\n    JERRY_ASSERT (dst_p <= buffer_p + buffer_size);\n    return (lit_utf8_size_t) (dst_p - buffer_p);\n  }\n\n  /* decimal exponent */\n  int32_t n;\n  /* number of digits in mantissa */\n  int32_t k;\n\n  k = (int32_t) ecma_number_to_decimal (num, dst_p, &n);\n\n  if (k <= n && n <= 21)\n  {\n    /* 6. */\n    dst_p += k;\n\n    memset (dst_p, LIT_CHAR_0, (size_t) (n - k));\n    dst_p += n - k;\n\n    JERRY_ASSERT (dst_p <= buffer_p + buffer_size);\n    return (lit_utf8_size_t) (dst_p - buffer_p);\n  }\n\n  if (0 < n && n <= 21)\n  {\n    /* 7. */\n    memmove (dst_p + n + 1, dst_p + n, (size_t) (k - n));\n    *(dst_p + n) = LIT_CHAR_DOT;\n    dst_p += k + 1;\n\n    JERRY_ASSERT (dst_p <= buffer_p + buffer_size);\n    return (lit_utf8_size_t) (dst_p - buffer_p);\n  }\n\n  if (-6 < n && n <= 0)\n  {\n    /* 8. */\n    memmove (dst_p + 2 - n, dst_p, (size_t) k);\n    memset (dst_p + 2, LIT_CHAR_0, (size_t) -n);\n    *dst_p = LIT_CHAR_0;\n    *(dst_p + 1) = LIT_CHAR_DOT;\n    dst_p += k - n + 2;\n\n    JERRY_ASSERT (dst_p <= buffer_p + buffer_size);\n    return (lit_utf8_size_t) (dst_p - buffer_p);\n  }\n\n  if (k == 1)\n  {\n    /* 9. */\n    dst_p++;\n  }\n  else\n  {\n    /* 10. */\n    memmove (dst_p + 2, dst_p + 1, (size_t) (k - 1));\n    *(dst_p + 1) = LIT_CHAR_DOT;\n    dst_p += k + 1;\n  }\n\n  /* 9., 10. */\n  *dst_p++ = LIT_CHAR_LOWERCASE_E;\n  *dst_p++ = (n >= 1) ? LIT_CHAR_PLUS : LIT_CHAR_MINUS;\n  uint32_t t = (uint32_t) (n >= 1 ? (n - 1) : -(n - 1));\n\n  dst_p += ecma_uint32_to_utf8_string (t, dst_p, (lit_utf8_size_t) (buffer_p + buffer_size - dst_p));\n\n  JERRY_ASSERT (dst_p <= buffer_p + buffer_size);\n\n  return (lit_utf8_size_t) (dst_p - buffer_p);\n} /* ecma_number_to_utf8_string */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-helpers-errol.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *   Copyright (c) 2016 Marc Andrysco\n *\n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n *\n *   The above copyright notice and this permission notice shall be included in all\n *   copies or substantial portions of the Software.\n *\n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n#include <math.h>\n\n#include \"ecma-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmahelpers Helpers for operations with ECMA data types\n * @{\n */\n\n/**\n * Printing Floating-Point Numbers\n *\n * available at http://cseweb.ucsd.edu/~mandrysc/pub/dtoa.pdf\n */\n\n/**\n * Floating point format definitions (next float value)\n */\n#define ECMA_NEXT_FLOAT(value) (nextafter ((value), INFINITY))\n/**\n * Floating point format definitions (previous float value)\n */\n#define ECMA_PREV_FLOAT(value) (nextafter ((value), -INFINITY))\n\n/**\n * Value of epsilon\n */\n#define ERROL0_EPSILON 0.0000001\n\n/**\n * High-precision data structure.\n */\ntypedef struct\n{\n  double value; /**< value */\n  double offset; /**< offset */\n} ecma_high_prec_t;\n\n/**\n * Normalize the number by factoring in the error.\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\necma_normalize_high_prec_data (ecma_high_prec_t *hp_data_p) /**< [in, out] float pair */\n{\n  double val = hp_data_p->value;\n\n  hp_data_p->value += hp_data_p->offset;\n  hp_data_p->offset += val - hp_data_p->value;\n} /* ecma_normalize_high_prec_data */\n\n/**\n * Multiply the high-precision number by ten.\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\necma_multiply_high_prec_by_10 (ecma_high_prec_t *hp_data_p) /**< [in, out] high-precision number */\n{\n  double value = hp_data_p->value;\n\n  hp_data_p->value *= 10.0;\n  hp_data_p->offset *= 10.0;\n\n  double offset = hp_data_p->value;\n\n  offset -= value * 8.0;\n  offset -= value * 2.0;\n\n  hp_data_p->offset -= offset;\n\n  ecma_normalize_high_prec_data (hp_data_p);\n} /* ecma_multiply_high_prec_by_10 */\n\n/**\n * Divide the high-precision number by ten.\n */\nstatic void\necma_divide_high_prec_by_10 (ecma_high_prec_t *hp_data_p) /**< [in, out] high-precision number */\n{\n  double value = hp_data_p->value;\n\n  hp_data_p->value /= 10.0;\n  hp_data_p->offset /= 10.0;\n\n  value -= hp_data_p->value * 8.0;\n  value -= hp_data_p->value * 2.0;\n\n  hp_data_p->offset += value / 10.0;\n\n  ecma_normalize_high_prec_data (hp_data_p);\n} /* ecma_divide_high_prec_by_10 */\n\n/**\n * Errol0 double to ASCII conversion, guaranteed correct but possibly not optimal.\n *\n * @return number of generated digits\n */\nextern inline lit_utf8_size_t JERRY_ATTR_ALWAYS_INLINE\necma_errol0_dtoa (double val, /**< ecma number */\n                  lit_utf8_byte_t *buffer_p, /**< buffer to generate digits into */\n                  int32_t *exp_p) /**< [out] exponent */\n{\n  double power_of_10 = 1.0;\n  int32_t exp = 1;\n\n  /* normalize the midpoint */\n  ecma_high_prec_t mid;\n\n  mid.value = val;\n  mid.offset = 0.0;\n\n  while (((mid.value > 10.0) || ((mid.value == 10.0) && (mid.offset >= 0.0))) && (exp < 308))\n  {\n    exp++;\n    ecma_divide_high_prec_by_10 (&mid);\n    power_of_10 /= 10.0;\n  }\n\n  while (((mid.value < 1.0) || ((mid.value == 1.0) && (mid.offset < 0.0))) && (exp > -307))\n  {\n    exp--;\n    ecma_multiply_high_prec_by_10 (&mid);\n    power_of_10 *= 10.0;\n  }\n\n  ecma_high_prec_t high_bound, low_bound;\n\n  high_bound.value = mid.value;\n  high_bound.offset = mid.offset;\n\n  if (ECMA_NEXT_FLOAT (val) != INFINITY)\n  {\n    high_bound.offset += (ECMA_NEXT_FLOAT (val) - val) * power_of_10 / (2.0 + ERROL0_EPSILON);\n  }\n\n  low_bound.value = mid.value;\n  low_bound.offset = mid.offset + (ECMA_PREV_FLOAT (val) - val) * power_of_10 / (2.0 + ERROL0_EPSILON);\n\n  ecma_normalize_high_prec_data (&high_bound);\n  ecma_normalize_high_prec_data (&low_bound);\n\n  /* normalized boundaries */\n\n  while (high_bound.value > 10.0 || (high_bound.value == 10.0 && (high_bound.offset >= 0.0)))\n  {\n    exp++;\n    ecma_divide_high_prec_by_10 (&high_bound);\n    ecma_divide_high_prec_by_10 (&low_bound);\n  }\n\n  while (high_bound.value < 1.0 || (high_bound.value == 1.0 && (high_bound.offset < 0.0)))\n  {\n    exp--;\n    ecma_multiply_high_prec_by_10 (&high_bound);\n    ecma_multiply_high_prec_by_10 (&low_bound);\n  }\n\n  /* digit generation */\n\n  lit_utf8_byte_t *dst_p = buffer_p;\n\n  while (high_bound.value != 0.0 || high_bound.offset != 0.0)\n  {\n    uint8_t high_digit = (uint8_t) high_bound.value;\n\n    if ((high_bound.value == high_digit) && (high_bound.offset < 0))\n    {\n      high_digit = (uint8_t) (high_digit - 1u);\n    }\n\n    uint8_t low_digit = (uint8_t) low_bound.value;\n\n    if ((low_bound.value == low_digit) && (low_bound.offset < 0))\n    {\n      low_digit = (uint8_t) (low_digit - 1u);\n    }\n\n    if (low_digit != high_digit)\n    {\n      break;\n    }\n\n    *dst_p++ = (lit_utf8_byte_t) ('0' + high_digit);\n\n    high_bound.value -= high_digit;\n    ecma_multiply_high_prec_by_10 (&high_bound);\n\n    low_bound.value -= low_digit;\n    ecma_multiply_high_prec_by_10 (&low_bound);\n  }\n\n  double mdig = (high_bound.value + low_bound.value) / 2.0 + 0.5;\n  *dst_p++ = (lit_utf8_byte_t) ('0' + (uint8_t) mdig);\n\n  *exp_p = exp;\n\n  return (lit_utf8_size_t) (dst_p - buffer_p);\n} /* ecma_errol0_dtoa */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-helpers-external-pointers.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmahelpers Helpers for operations with ECMA data types\n * @{\n */\n\n/**\n * Create a native pointer property to store the native pointer and its type info.\n *\n * @return true - if property was just created with specified value,\n *         false - otherwise, if property existed before the call, it's value was updated\n */\nbool\necma_create_native_pointer_property (ecma_object_t *obj_p, /**< object to create property in */\n                                     void *native_p, /**< native pointer */\n                                     void *info_p) /**< native pointer's type info */\n{\n  ecma_string_t *name_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER);\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_fast_array_convert_to_normal (obj_p);\n  }\n\n  ecma_property_t *property_p = ecma_find_named_property (obj_p, name_p);\n\n  bool is_new = (property_p == NULL);\n\n  ecma_native_pointer_t *native_pointer_p;\n\n  if (property_p == NULL)\n  {\n    ecma_property_value_t *value_p;\n    ECMA_CREATE_INTERNAL_PROPERTY (obj_p, name_p, property_p, value_p);\n\n    native_pointer_p = jmem_heap_alloc_block (sizeof (ecma_native_pointer_t));\n    ECMA_SET_INTERNAL_VALUE_POINTER (value_p->value, native_pointer_p);\n  }\n  else\n  {\n    ecma_property_value_t *value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n    ecma_native_pointer_t *iter_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_native_pointer_t, value_p->value);\n\n    /* There should be at least 1 native pointer in the chain */\n    JERRY_ASSERT (iter_p != NULL);\n\n    while (true)\n    {\n      if (iter_p->info_p == info_p)\n      {\n        /* The native info already exists -> update the corresponding data */\n        iter_p->data_p = native_p;\n        return false;\n      }\n\n      if (iter_p->next_p == NULL)\n      {\n        /* The native info does not exist -> append a new element to the chain */\n        break;\n      }\n\n      iter_p = iter_p->next_p;\n    }\n\n    native_pointer_p = jmem_heap_alloc_block (sizeof (ecma_native_pointer_t));\n\n    iter_p->next_p = native_pointer_p;\n  }\n\n  native_pointer_p->data_p = native_p;\n  native_pointer_p->info_p = info_p;\n  native_pointer_p->next_p = NULL;\n\n  return is_new;\n} /* ecma_create_native_pointer_property */\n\n/**\n * Get value of native package stored in the object's property with specified identifier\n *\n * Note:\n *      property identifier should be one of the following:\n *        - LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER\n *\n * @return native pointer data if property exists\n *         NULL otherwise\n */\necma_native_pointer_t *\necma_get_native_pointer_value (ecma_object_t *obj_p, /**< object to get property value from */\n                               void *info_p) /**< native pointer's type info */\n{\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    /* Fast access mode array can not have native pointer properties */\n    return NULL;\n  }\n\n  ecma_string_t *name_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER);\n  ecma_property_t *property_p = ecma_find_named_property (obj_p, name_p);\n\n  if (property_p == NULL)\n  {\n    return NULL;\n  }\n\n  ecma_property_value_t *value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n  ecma_native_pointer_t *native_pointer_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_native_pointer_t,\n                                                                             value_p->value);\n\n  JERRY_ASSERT (native_pointer_p != NULL);\n\n  while (native_pointer_p != NULL)\n  {\n    if (native_pointer_p->info_p == info_p)\n    {\n      return native_pointer_p;\n    }\n\n    native_pointer_p = native_pointer_p->next_p;\n  }\n\n  return NULL;\n} /* ecma_get_native_pointer_value */\n\n/**\n * Delete the previously set native pointer by the native type info from the specified object.\n *\n * Note:\n *      If the specified object has no matching native pointer for the given native type info\n *      the function has no effect.\n *\n * @return true - if the native pointer has been deleted succesfully\n *         false - otherwise\n */\nbool\necma_delete_native_pointer_property (ecma_object_t *obj_p, /**< object to delete property from */\n                                     void *info_p) /**< native pointer's type info */\n{\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    /* Fast access mode array can not have native pointer properties */\n    return false;\n  }\n\n  ecma_string_t *name_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER);\n  ecma_property_t *property_p = ecma_find_named_property (obj_p, name_p);\n\n  if (property_p == NULL)\n  {\n    return false;\n  }\n\n  ecma_property_value_t *value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n  ecma_native_pointer_t *native_pointer_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_native_pointer_t,\n                                                                             value_p->value);\n  ecma_native_pointer_t *prev_p = NULL;\n\n  JERRY_ASSERT (native_pointer_p != NULL);\n\n  while (native_pointer_p != NULL)\n  {\n    if (native_pointer_p->info_p == info_p)\n    {\n      if (prev_p == NULL)\n      {\n        if (native_pointer_p->next_p == NULL)\n        {\n          /* Only one native pointer property exists, so the property can be deleted as well. */\n          ecma_op_general_object_delete (obj_p, name_p, false);\n\n          jmem_heap_free_block (native_pointer_p, sizeof (ecma_native_pointer_t));\n          return true;\n        }\n        else\n        {\n          /* There are at least two native pointers and the first one should be deleted.\n             In this case the second element's data is copied to the head of the chain, and freed as well. */\n          ecma_native_pointer_t *next_p = native_pointer_p->next_p;\n          memcpy (native_pointer_p, next_p, sizeof (ecma_native_pointer_t));\n          jmem_heap_free_block (next_p, sizeof (ecma_native_pointer_t));\n          return true;\n        }\n      }\n      else\n      {\n        /* There are at least two native pointers and not the first element should be deleted.\n           In this case the current element's next element reference is copied to the previous element. */\n        prev_p->next_p = native_pointer_p->next_p;\n        jmem_heap_free_block (native_pointer_p, sizeof (ecma_native_pointer_t));\n        return true;\n      }\n    }\n\n    prev_p = native_pointer_p;\n    native_pointer_p = native_pointer_p->next_p;\n  }\n\n  return false;\n} /* ecma_delete_native_pointer_property */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"ecma-conversion.h\"\n#include \"lit-char-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmahelpers Helpers for operations with ECMA data types\n * @{\n */\n\nJERRY_STATIC_ASSERT (sizeof (ecma_value_t) == sizeof (ecma_integer_value_t),\n                     size_of_ecma_value_t_must_be_equal_to_the_size_of_ecma_integer_value_t);\n\nJERRY_STATIC_ASSERT (ECMA_DIRECT_SHIFT == ECMA_VALUE_SHIFT + 1,\n                     currently_directly_encoded_values_has_one_extra_flag);\n\nJERRY_STATIC_ASSERT (((1 << (ECMA_DIRECT_SHIFT - 1)) | ECMA_TYPE_DIRECT) == ECMA_DIRECT_TYPE_SIMPLE_VALUE,\n                     currently_directly_encoded_values_start_after_direct_type_simple_value);\n/**\n * Position of the sign bit in ecma-numbers\n */\n#define ECMA_NUMBER_SIGN_POS (ECMA_NUMBER_FRACTION_WIDTH + \\\n                              ECMA_NUMBER_BIASED_EXP_WIDTH)\n\n#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nJERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint32_t),\n                     size_of_ecma_number_t_must_be_equal_to_4_bytes);\n\n/**\n * Packing sign, fraction and biased exponent to ecma-number\n *\n * @return ecma-number with specified sign, biased_exponent and fraction\n */\necma_number_t\necma_number_pack (bool sign, /**< sign */\n                  uint32_t biased_exp, /**< biased exponent */\n                  uint64_t fraction) /**< fraction */\n{\n  JERRY_ASSERT ((biased_exp & ~((1u << ECMA_NUMBER_BIASED_EXP_WIDTH) - 1)) == 0);\n  JERRY_ASSERT ((fraction & ~((1ull << ECMA_NUMBER_FRACTION_WIDTH) - 1)) == 0);\n\n  uint32_t packed_value = (((sign ? 1u : 0u) << ECMA_NUMBER_SIGN_POS) |\n                           (biased_exp << ECMA_NUMBER_FRACTION_WIDTH) |\n                           ((uint32_t) fraction));\n\n  ecma_number_accessor_t u;\n  u.as_uint32_t = packed_value;\n  return u.as_ecma_number_t;\n} /* ecma_number_pack */\n\n/**\n * Unpacking sign, fraction and biased exponent from ecma-number\n */\nvoid\necma_number_unpack (ecma_number_t num, /**< ecma-number */\n                    bool *sign_p, /**< [out] sign (optional) */\n                    uint32_t *biased_exp_p, /**< [out] biased exponent (optional) */\n                    uint64_t *fraction_p) /**< [out] fraction (optional) */\n{\n  ecma_number_accessor_t u;\n  u.as_ecma_number_t = num;\n  uint32_t packed_value = u.as_uint32_t;\n\n  if (sign_p != NULL)\n  {\n    *sign_p = ((packed_value >> ECMA_NUMBER_SIGN_POS) != 0);\n  }\n\n  if (biased_exp_p != NULL)\n  {\n    *biased_exp_p = (((packed_value) & ~(1u << ECMA_NUMBER_SIGN_POS)) >> ECMA_NUMBER_FRACTION_WIDTH);\n  }\n\n  if (fraction_p != NULL)\n  {\n    *fraction_p = (packed_value & ((1u << ECMA_NUMBER_FRACTION_WIDTH) - 1));\n  }\n} /* ecma_number_unpack */\n\n/**\n * Value used to calculate exponent from biased exponent\n *\n * See also:\n *          IEEE-754 2008, 3.6, Table 3.5\n */\nconst int32_t ecma_number_exponent_bias = 127;\n\n#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nJERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint64_t),\n                     size_of_ecma_number_t_must_be_equal_to_8_bytes);\n\n/**\n * Packing sign, fraction and biased exponent to ecma-number\n *\n * @return ecma-number with specified sign, biased_exponent and fraction\n */\necma_number_t\necma_number_pack (bool sign, /**< sign */\n                  uint32_t biased_exp, /**< biased exponent */\n                  uint64_t fraction) /**< fraction */\n{\n  uint64_t packed_value = (((sign ? 1ull : 0ull) << ECMA_NUMBER_SIGN_POS) |\n                           (((uint64_t) biased_exp) << ECMA_NUMBER_FRACTION_WIDTH) |\n                           fraction);\n\n  JERRY_ASSERT ((biased_exp & ~((1u << ECMA_NUMBER_BIASED_EXP_WIDTH) - 1)) == 0);\n  JERRY_ASSERT ((fraction & ~((1ull << ECMA_NUMBER_FRACTION_WIDTH) - 1)) == 0);\n\n  ecma_number_accessor_t u;\n  u.as_uint64_t = packed_value;\n  return u.as_ecma_number_t;\n} /* ecma_number_pack */\n\n/**\n * Unpacking sign, fraction and biased exponent from ecma-number\n */\nvoid\necma_number_unpack (ecma_number_t num, /**< ecma-number */\n                    bool *sign_p, /**< [out] sign (optional) */\n                    uint32_t *biased_exp_p, /**< [out] biased exponent (optional) */\n                    uint64_t *fraction_p) /**< [out] fraction (optional) */\n{\n  ecma_number_accessor_t u;\n  u.as_ecma_number_t = num;\n  uint64_t packed_value = u.as_uint64_t;\n\n  if (sign_p != NULL)\n  {\n    *sign_p = ((packed_value >> ECMA_NUMBER_SIGN_POS) != 0);\n  }\n\n  if (biased_exp_p != NULL)\n  {\n    *biased_exp_p = (uint32_t) (((packed_value) & ~(1ull << ECMA_NUMBER_SIGN_POS)) >> ECMA_NUMBER_FRACTION_WIDTH);\n  }\n\n  if (fraction_p != NULL)\n  {\n    *fraction_p = (packed_value & ((1ull << ECMA_NUMBER_FRACTION_WIDTH) - 1));\n  }\n} /* ecma_number_unpack */\n\n/**\n * Value used to calculate exponent from biased exponent\n *\n * See also:\n *          IEEE-754 2008, 3.6, Table 3.5\n */\nconst int32_t ecma_number_exponent_bias = 1023;\n\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n/**\n * Get fraction of number\n *\n * @return normalized fraction field of number\n */\nstatic uint64_t\necma_number_get_fraction_field (ecma_number_t num) /**< ecma-number */\n{\n  uint64_t fraction;\n\n  ecma_number_unpack (num, NULL, NULL, &fraction);\n\n  return fraction;\n} /* ecma_number_get_fraction_field */\n\n/**\n * Get exponent of number\n *\n * @return exponent corresponding to normalized fraction of number\n */\nstatic uint32_t\necma_number_get_biased_exponent_field (ecma_number_t num) /**< ecma-number */\n{\n  uint32_t biased_exp;\n\n  ecma_number_unpack (num, NULL, &biased_exp, NULL);\n\n  return biased_exp;\n} /* ecma_number_get_biased_exponent_field */\n\n/**\n * Get sign bit of number\n *\n * @return 0 or 1 - value of sign bit\n */\nstatic uint32_t\necma_number_get_sign_field (ecma_number_t num) /**< ecma-number */\n{\n  bool sign;\n\n  ecma_number_unpack (num, &sign, NULL, NULL);\n\n  return sign;\n} /* ecma_number_get_sign_field */\n\n/**\n * Check if ecma-number is NaN\n *\n * @return true - if biased exponent is filled with 1 bits and\n                  fraction is filled with anything but not all zero bits,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_number_is_nan (ecma_number_t num) /**< ecma-number */\n{\n  bool is_nan = (num != num);\n\n#ifndef JERRY_NDEBUG\n  uint32_t biased_exp = ecma_number_get_biased_exponent_field (num);\n  uint64_t fraction = ecma_number_get_fraction_field (num);\n\n   /* IEEE-754 2008, 3.4, a */\n  bool is_nan_ieee754 = ((biased_exp == (1u << ECMA_NUMBER_BIASED_EXP_WIDTH) - 1)\n                         && (fraction != 0));\n\n  JERRY_ASSERT (is_nan == is_nan_ieee754);\n#endif /* !JERRY_NDEBUG */\n\n  return is_nan;\n} /* ecma_number_is_nan */\n\n/**\n * Make a NaN.\n *\n * @return NaN value\n */\necma_number_t\necma_number_make_nan (void)\n{\n  /* IEEE754 QNaN = sign bit: 0, exponent: all 1 bits, fraction: 1....0 */\n  ecma_number_accessor_t f;\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  f.as_uint64_t = 0x7ff8000000000000ull; /* double QNaN, same as the C99 nan(\"\") returns. */\n#else /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n  f.as_uint32_t = 0x7fc00000u;  /* float QNaN, same as the C99 nanf(\"\") returns. */\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n  return f.as_ecma_number_t;\n} /* ecma_number_make_nan */\n\n/**\n * Make an Infinity.\n *\n * @return if !sign - +Infinity value,\n *         else - -Infinity value.\n */\necma_number_t\necma_number_make_infinity (bool sign) /**< true - for negative Infinity,\n                                           false - for positive Infinity */\n{\n  /* IEEE754 INF = sign bit: sign, exponent: all 1 bits, fraction: 0....0 */\n  ecma_number_accessor_t f;\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  f.as_uint64_t = sign ? 0xfff0000000000000ull : 0x7ff0000000000000ull;\n#else /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n  f.as_uint32_t = sign ? 0xff800000u : 0x7f800000u;\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n  return f.as_ecma_number_t;\n} /* ecma_number_make_infinity */\n\n/**\n * Check if ecma-number is negative\n *\n * @return true - if sign bit of ecma-number is set\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_number_is_negative (ecma_number_t num) /**< ecma-number */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (num));\n\n  /* IEEE-754 2008, 3.4 */\n  return (ecma_number_get_sign_field (num) != 0);\n} /* ecma_number_is_negative */\n\n/**\n * Check if ecma-number is zero\n *\n * @return true - if fraction is zero and biased exponent is zero,\n *         false - otherwise\n */\nbool\necma_number_is_zero (ecma_number_t num) /**< ecma-number */\n{\n  bool is_zero = (num == ECMA_NUMBER_ZERO);\n\n#ifndef JERRY_NDEBUG\n  /* IEEE-754 2008, 3.4, e */\n  bool is_zero_ieee754 = (ecma_number_get_fraction_field (num) == 0\n                          && ecma_number_get_biased_exponent_field (num) == 0);\n\n  JERRY_ASSERT (is_zero == is_zero_ieee754);\n#endif /* !JERRY_NDEBUG */\n\n  return is_zero;\n} /* ecma_number_is_zero */\n\n/**\n * Check if number is infinity\n *\n * @return true - if biased exponent is filled with 1 bits and\n *                fraction is filled with zero bits,\n *         false - otherwise\n */\nbool\necma_number_is_infinity (ecma_number_t num) /**< ecma-number */\n{\n  uint32_t biased_exp = ecma_number_get_biased_exponent_field (num);\n  uint64_t fraction = ecma_number_get_fraction_field (num);\n\n  /* IEEE-754 2008, 3.4, b */\n  return ((biased_exp  == (1u << ECMA_NUMBER_BIASED_EXP_WIDTH) - 1)\n          && (fraction == 0));\n} /* ecma_number_is_infinity */\n\n/**\n * Check if number is finite\n *\n * @return true  - if number is finite\n *         false - if number is NaN or infinity\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_number_is_finite (ecma_number_t num) /**< ecma-number */\n{\n#if defined (__GNUC__) || defined (__clang__)\n  return __builtin_isfinite (num);\n#elif defined (_WIN32)\n  return isfinite (num);\n#else\n  return !ecma_number_is_nan (num) && !ecma_number_is_infinity (num);\n#endif /* defined (__GNUC__) || defined (__clang__) */\n} /* ecma_number_is_finite */\n\n/**\n * Get fraction and exponent of the number\n *\n * @return shift of dot in the fraction\n */\nstatic int32_t\necma_number_get_fraction_and_exponent (ecma_number_t num, /**< ecma-number */\n                                       uint64_t *out_fraction_p, /**< [out] fraction of the number */\n                                       int32_t *out_exponent_p) /**< [out] exponent of the number */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (num));\n\n  uint32_t biased_exp = ecma_number_get_biased_exponent_field (num);\n  uint64_t fraction = ecma_number_get_fraction_field (num);\n  int32_t exponent;\n\n  if (JERRY_UNLIKELY (biased_exp == 0))\n  {\n    /* IEEE-754 2008, 3.4, d */\n    if (ecma_number_is_zero (num))\n    {\n      exponent = -ecma_number_exponent_bias;\n    }\n    else\n    {\n      exponent = 1 - ecma_number_exponent_bias;\n\n      while (!(fraction & (1ull << ECMA_NUMBER_FRACTION_WIDTH)))\n      {\n        JERRY_ASSERT (fraction != 0);\n\n        fraction <<= 1;\n        exponent--;\n      }\n    }\n  }\n  else if (ecma_number_is_infinity (num))\n  {\n    /* The fraction and exponent should round to infinity */\n    exponent = (int32_t) biased_exp - ecma_number_exponent_bias;\n\n    JERRY_ASSERT ((fraction & (1ull << ECMA_NUMBER_FRACTION_WIDTH)) == 0);\n    fraction |= 1ull << ECMA_NUMBER_FRACTION_WIDTH;\n  }\n  else\n  {\n    /* IEEE-754 2008, 3.4, c */\n    exponent = (int32_t) biased_exp - ecma_number_exponent_bias;\n\n    JERRY_ASSERT (biased_exp > 0 && biased_exp < (1u << ECMA_NUMBER_BIASED_EXP_WIDTH) - 1);\n    JERRY_ASSERT ((fraction & (1ull << ECMA_NUMBER_FRACTION_WIDTH)) == 0);\n    fraction |= 1ull << ECMA_NUMBER_FRACTION_WIDTH;\n  }\n\n  *out_fraction_p = fraction;\n  *out_exponent_p = exponent;\n  return ECMA_NUMBER_FRACTION_WIDTH;\n} /* ecma_number_get_fraction_and_exponent */\n\n/**\n * Make normalised positive Number from given fraction and exponent\n *\n * @return ecma-number\n */\nstatic ecma_number_t\necma_number_make_normal_positive_from_fraction_and_exponent (uint64_t fraction, /**< fraction */\n                                                             int32_t exponent) /**< exponent */\n{\n  uint32_t biased_exp = (uint32_t) (exponent + ecma_number_exponent_bias);\n  JERRY_ASSERT (biased_exp > 0 && biased_exp < (1u << ECMA_NUMBER_BIASED_EXP_WIDTH) - 1);\n  JERRY_ASSERT ((fraction & ~((1ull << (ECMA_NUMBER_FRACTION_WIDTH + 1)) - 1)) == 0);\n  JERRY_ASSERT ((fraction & (1ull << ECMA_NUMBER_FRACTION_WIDTH)) != 0);\n\n  return ecma_number_pack (false,\n                           biased_exp,\n                           fraction & ~(1ull << ECMA_NUMBER_FRACTION_WIDTH));\n} /* ecma_number_make_normal_positive_from_fraction_and_exponent */\n\n/**\n * Make Number of given sign from given mantissa value and binary exponent\n *\n * @return ecma-number (possibly Infinity of specified sign)\n */\necma_number_t\necma_number_make_from_sign_mantissa_and_exponent (bool sign, /**< true - for negative sign,\n                                                                  false - for positive sign */\n                                                  uint64_t mantissa, /**< mantissa */\n                                                  int32_t exponent) /**< binary exponent */\n{\n  /* Rounding mantissa to fit into fraction field width */\n  if (mantissa & ~((1ull << (ECMA_NUMBER_FRACTION_WIDTH + 1)) - 1))\n  {\n    /* Rounded mantissa looks like the following: |00...0|1|fraction_width mantissa bits| */\n    while ((mantissa & ~((1ull << (ECMA_NUMBER_FRACTION_WIDTH + 1)) - 1)) != 0)\n    {\n      uint64_t rightmost_bit = (mantissa & 1);\n\n      exponent++;\n      mantissa >>= 1;\n\n      if ((mantissa & ~((1ull << (ECMA_NUMBER_FRACTION_WIDTH + 1)) - 1)) == 0)\n      {\n        /* Rounding to nearest value */\n        mantissa += rightmost_bit;\n\n        /* In the first case loop is finished,\n           and in the second - just one shift follows and then loop finishes */\n        JERRY_ASSERT (((mantissa & ~((1ull << (ECMA_NUMBER_FRACTION_WIDTH + 1)) - 1)) == 0)\n                      || (mantissa == (1ull << (ECMA_NUMBER_FRACTION_WIDTH + 1))));\n      }\n    }\n  }\n\n  /* Normalizing mantissa */\n  while (mantissa != 0\n         && ((mantissa & (1ull << ECMA_NUMBER_FRACTION_WIDTH)) == 0))\n  {\n    exponent--;\n    mantissa <<= 1;\n  }\n\n  /* Moving floating point */\n  exponent += ECMA_NUMBER_FRACTION_WIDTH - 1;\n\n  int32_t biased_exp_signed = exponent + ecma_number_exponent_bias;\n\n  if (biased_exp_signed < 1)\n  {\n    /* Denormalizing mantissa if biased_exponent is less than zero */\n    while (biased_exp_signed < 0)\n    {\n      biased_exp_signed++;\n      mantissa >>= 1;\n    }\n\n    /* Rounding to nearest value */\n    mantissa += 1;\n    mantissa >>= 1;\n\n    /* Encoding denormalized exponent */\n    biased_exp_signed = 0;\n  }\n  else\n  {\n    /* Clearing highest mantissa bit that should have been non-zero if mantissa is non-zero */\n    mantissa &= ~(1ull << ECMA_NUMBER_FRACTION_WIDTH);\n  }\n\n  uint32_t biased_exp = (uint32_t) biased_exp_signed;\n\n  if (biased_exp >= ((1u << ECMA_NUMBER_BIASED_EXP_WIDTH) - 1))\n  {\n    return ecma_number_make_infinity (sign);\n  }\n\n  JERRY_ASSERT (biased_exp < (1u << ECMA_NUMBER_BIASED_EXP_WIDTH) - 1);\n  JERRY_ASSERT ((mantissa & ~((1ull << ECMA_NUMBER_FRACTION_WIDTH) - 1)) == 0);\n\n  return ecma_number_pack (sign,\n                           biased_exp,\n                           mantissa);\n} /* ecma_number_make_from_sign_mantissa_and_exponent */\n\n/**\n * Get previous representable ecma-number\n *\n * @return maximum ecma-number that is less compared to passed argument\n */\necma_number_t\necma_number_get_prev (ecma_number_t num) /**< ecma-number */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (num));\n  JERRY_ASSERT (!ecma_number_is_zero (num));\n\n  if (ecma_number_is_negative (num))\n  {\n    return -ecma_number_get_next (num);\n  }\n\n  uint32_t biased_exp = ecma_number_get_biased_exponent_field (num);\n  uint64_t fraction = ecma_number_get_fraction_field (num);\n\n  if (fraction == 0 && biased_exp != 0)\n  {\n    fraction = (1ull << ECMA_NUMBER_FRACTION_WIDTH) - 1;\n\n    biased_exp--;\n  }\n  else\n  {\n    fraction--;\n  }\n\n  return ecma_number_pack (false,\n                           biased_exp,\n                           fraction);\n} /* ecma_number_get_prev */\n\n/**\n * Get next representable ecma-number\n *\n * @return minimum ecma-number that is greater compared to passed argument\n */\necma_number_t\necma_number_get_next (ecma_number_t num) /**< ecma-number */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (num));\n  JERRY_ASSERT (!ecma_number_is_infinity (num));\n\n  if (ecma_number_is_negative (num))\n  {\n    return -ecma_number_get_prev (num);\n  }\n\n  uint32_t biased_exp = ecma_number_get_biased_exponent_field (num);\n  uint64_t fraction = ecma_number_get_fraction_field (num);\n\n  fraction |= (1ull << ECMA_NUMBER_FRACTION_WIDTH);\n\n  fraction++;\n\n  if ((fraction & (1ull << ECMA_NUMBER_FRACTION_WIDTH)) == 0)\n  {\n    fraction >>= 1;\n\n    biased_exp++;\n  }\n\n  JERRY_ASSERT (fraction & (1ull << ECMA_NUMBER_FRACTION_WIDTH));\n\n  fraction &= ~(1ull << ECMA_NUMBER_FRACTION_WIDTH);\n\n  return ecma_number_pack (false,\n                           biased_exp,\n                           fraction);\n} /* ecma_number_get_next */\n\n/**\n * Truncate fractional part of the number\n *\n * @return integer part of the number\n */\necma_number_t\necma_number_trunc (ecma_number_t num) /**< ecma-number */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (num));\n\n  uint64_t fraction;\n  int32_t exponent;\n  const int32_t dot_shift = ecma_number_get_fraction_and_exponent (num, &fraction, &exponent);\n  const bool sign = ecma_number_is_negative (num);\n\n  if (exponent < 0)\n  {\n    return ECMA_NUMBER_ZERO;\n  }\n  else if (exponent < dot_shift)\n  {\n    fraction &= ~((1ull << (dot_shift - exponent)) - 1);\n\n    ecma_number_t tmp = ecma_number_make_normal_positive_from_fraction_and_exponent (fraction,\n                                                                                     exponent);\n    if (sign)\n    {\n      return -tmp;\n    }\n    else\n    {\n      return tmp;\n    }\n  }\n  else\n  {\n    return num;\n  }\n} /* ecma_number_trunc */\n\n/**\n * Calculate remainder of division of two numbers,\n * as specified in ECMA-262 v5, 11.5.3, item 6.\n *\n * Note:\n *      operands shouldn't contain NaN, Infinity, or zero.\n *\n * @return number - calculated remainder.\n */\necma_number_t\necma_number_calc_remainder (ecma_number_t left_num, /**< left operand */\n                            ecma_number_t right_num) /**< right operand */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (left_num)\n                && !ecma_number_is_zero (left_num)\n                && !ecma_number_is_infinity (left_num));\n  JERRY_ASSERT (!ecma_number_is_nan (right_num)\n                && !ecma_number_is_zero (right_num)\n                && !ecma_number_is_infinity (right_num));\n\n  const ecma_number_t q = ecma_number_trunc (left_num / right_num);\n  ecma_number_t r = left_num - right_num * q;\n\n  if (ecma_number_is_zero (r)\n      && ecma_number_is_negative (left_num))\n  {\n    r = -r;\n  }\n\n  return r;\n} /* ecma_number_calc_remainder */\n\n/**\n * Compute power operation according to the ES standard.\n *\n * @return x ** y\n */\necma_number_t\necma_number_pow (ecma_number_t x, /**< left operand */\n                 ecma_number_t y) /**< right operand */\n{\n  if (ecma_number_is_nan (y) ||\n      (ecma_number_is_infinity (y) && (x == 1.0 || x == -1.0)))\n  {\n    /* Handle differences between ES5.1 and ISO C standards for pow. */\n    return ecma_number_make_nan ();\n  }\n\n  if (ecma_number_is_zero (y))\n  {\n    /* Handle differences between ES5.1 and ISO C standards for pow. */\n    return (ecma_number_t) 1.0;\n  }\n\n  return DOUBLE_TO_ECMA_NUMBER_T (pow (x, y));\n} /* ecma_number_pow */\n\n/**\n * ECMA-integer number multiplication.\n *\n * @return number - result of multiplication.\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_integer_multiply (ecma_integer_value_t left_integer, /**< left operand */\n                       ecma_integer_value_t right_integer) /**< right operand */\n{\n#if defined (__GNUC__) || defined (__clang__)\n  /* Check if left_integer is power of 2 */\n  if (JERRY_UNLIKELY ((left_integer & (left_integer - 1)) == 0))\n  {\n    /* Right shift right_integer with log2 (left_integer) */\n    return ecma_make_integer_value (right_integer << (__builtin_ctz ((unsigned int) left_integer)));\n  }\n  else if (JERRY_UNLIKELY ((right_integer & (right_integer - 1)) == 0))\n  {\n    /* Right shift left_integer with log2 (right_integer) */\n    return ecma_make_integer_value (left_integer << (__builtin_ctz ((unsigned int) right_integer)));\n  }\n#endif /* defined (__GNUC__) || defined (__clang__) */\n  return ecma_make_integer_value (left_integer * right_integer);\n} /* ecma_integer_multiply */\n\n/**\n * The Number object's 'parseInt' routine\n *\n * See also:\n *          ECMA-262 v5, 15.1.2.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_number_parse_int (const lit_utf8_byte_t *string_buff, /**< routine's first argument's\n                                                            *   string buffer */\n                        lit_utf8_size_t string_buff_size, /**< routine's first argument's\n                                                           *   string buffer's size */\n                        ecma_value_t radix) /**< routine's second argument */\n{\n  if (string_buff_size == 0)\n  {\n    return ecma_make_nan_value ();\n  }\n\n   /* 2. Remove leading whitespace. */\n\n  const lit_utf8_byte_t *string_end_p = string_buff + string_buff_size;\n  const lit_utf8_byte_t *start_p = ecma_string_trim_front (string_buff, string_end_p);\n  const lit_utf8_byte_t *string_curr_p = start_p;\n  const lit_utf8_byte_t *end_p = string_end_p;\n\n  if (string_curr_p >= string_end_p)\n  {\n    return ecma_make_nan_value ();\n  }\n\n  /* 3. */\n  int sign = 1;\n\n  /* 4. */\n  ecma_char_t current = lit_cesu8_read_next (&string_curr_p);\n  if (current == LIT_CHAR_MINUS)\n  {\n    sign = -1;\n  }\n\n  /* 5. */\n  if (current == LIT_CHAR_MINUS || current == LIT_CHAR_PLUS)\n  {\n    start_p = string_curr_p;\n    if (string_curr_p < string_end_p)\n    {\n      current = lit_cesu8_read_next (&string_curr_p);\n    }\n  }\n\n  /* 6. */\n  ecma_number_t radix_num;\n  radix = ecma_op_to_number (radix, &radix_num);\n\n  if (ECMA_IS_VALUE_ERROR (radix))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  int32_t rad = ecma_number_to_int32 (radix_num);\n\n  /* 7.*/\n  bool strip_prefix = true;\n\n  /* 8. */\n  if (rad != 0)\n  {\n    /* 8.a */\n    if (rad < 2 || rad > 36)\n    {\n      return ecma_make_nan_value ();\n    }\n    /* 8.b */\n    else if (rad != 16)\n    {\n      strip_prefix = false;\n    }\n  }\n  /* 9. */\n  else\n  {\n    rad = 10;\n  }\n\n  /* 10. */\n  if (strip_prefix\n      && ((end_p - start_p) >= 2)\n      && (current == LIT_CHAR_0))\n  {\n    ecma_char_t next = *string_curr_p;\n    if (next == LIT_CHAR_LOWERCASE_X || next == LIT_CHAR_UPPERCASE_X)\n    {\n      /* Skip the 'x' or 'X' characters. */\n      start_p = ++string_curr_p;\n      rad = 16;\n    }\n  }\n\n  /* 11. Check if characters are in [0, Radix - 1]. We also convert them to number values in the process. */\n  string_curr_p = start_p;\n  while (string_curr_p < string_end_p)\n  {\n    ecma_char_t current_char = *string_curr_p++;\n    int32_t current_number;\n\n    if ((current_char >= LIT_CHAR_LOWERCASE_A && current_char <= LIT_CHAR_LOWERCASE_Z))\n    {\n      current_number = current_char - LIT_CHAR_LOWERCASE_A + 10;\n    }\n    else if ((current_char >= LIT_CHAR_UPPERCASE_A && current_char <= LIT_CHAR_UPPERCASE_Z))\n    {\n      current_number = current_char - LIT_CHAR_UPPERCASE_A + 10;\n    }\n    else if (lit_char_is_decimal_digit (current_char))\n    {\n      current_number = current_char - LIT_CHAR_0;\n    }\n    else\n    {\n      /* Not a valid number char, set value to radix so it fails to pass as a valid character. */\n      current_number = rad;\n    }\n\n    if (!(current_number < rad))\n    {\n      end_p = --string_curr_p;\n      break;\n    }\n  }\n\n  /* 12. */\n  if (end_p == start_p)\n  {\n    return ecma_make_nan_value ();\n  }\n\n  ecma_number_t value = ECMA_NUMBER_ZERO;\n  ecma_number_t multiplier = 1.0f;\n\n  /* 13. and 14. */\n  string_curr_p = end_p;\n\n  while (string_curr_p > start_p)\n  {\n    ecma_char_t current_char = *(--string_curr_p);\n    ecma_number_t current_number = ECMA_NUMBER_MINUS_ONE;\n\n    if ((current_char >= LIT_CHAR_LOWERCASE_A && current_char <= LIT_CHAR_LOWERCASE_Z))\n    {\n      current_number = (ecma_number_t) current_char - LIT_CHAR_LOWERCASE_A + 10;\n    }\n    else if ((current_char >= LIT_CHAR_UPPERCASE_A && current_char <= LIT_CHAR_UPPERCASE_Z))\n    {\n      current_number = (ecma_number_t) current_char - LIT_CHAR_UPPERCASE_A + 10;\n    }\n    else\n    {\n      JERRY_ASSERT (lit_char_is_decimal_digit (current_char));\n      current_number = (ecma_number_t) current_char - LIT_CHAR_0;\n    }\n\n    value += current_number * multiplier;\n    multiplier *= (ecma_number_t) rad;\n  }\n\n  /* 15. */\n  if (sign < 0)\n  {\n    value *= (ecma_number_t) sign;\n  }\n  return ecma_make_number_value (value);\n} /* ecma_number_parse_int */\n\n/**\n * The Number object's 'parseFloat' routine\n *\n * See also:\n *          ECMA-262 v5, 15.1.2.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_number_parse_float (const lit_utf8_byte_t *string_buff, /**< routine's first argument's\n                                                              *   string buffer */\n                          lit_utf8_size_t string_buff_size) /**< routine's first argument's\n                                                             *   string buffer's size */\n{\n  if (string_buff_size == 0)\n  {\n    return ecma_make_nan_value ();\n  }\n\n  /* 2. Remove leading whitespace. */\n\n  const lit_utf8_byte_t *str_end_p = string_buff + string_buff_size;\n  const lit_utf8_byte_t *start_p = ecma_string_trim_front (string_buff, str_end_p);\n  const lit_utf8_byte_t *str_curr_p = start_p;\n  const lit_utf8_byte_t *end_p = str_end_p;\n\n  bool sign = false;\n  ecma_char_t current;\n\n  if (str_curr_p < str_end_p)\n  {\n    /* Check if sign is present. */\n    current = *str_curr_p;\n    if (current == LIT_CHAR_MINUS)\n    {\n      sign = true;\n    }\n\n    if (current == LIT_CHAR_MINUS || current == LIT_CHAR_PLUS)\n    {\n      /* Set starting position to be after the sign character. */\n      start_p = ++str_curr_p;\n    }\n  }\n\n  /* Check if string is equal to \"Infinity\". */\n  const lit_utf8_byte_t *infinity_str_p = lit_get_magic_string_utf8 (LIT_MAGIC_STRING_INFINITY_UL);\n  const lit_utf8_size_t infinity_length = lit_get_magic_string_size (LIT_MAGIC_STRING_INFINITY_UL);\n\n  /* The input string should be at least the length of \"Infinity\" to be correctly processed as\n   * the infinity value.\n   */\n  if ((str_end_p - str_curr_p) >= (int) infinity_length\n      && memcmp (infinity_str_p, str_curr_p, infinity_length) == 0)\n  {\n    /* String matched Infinity. */\n    return ecma_make_number_value (ecma_number_make_infinity (sign));\n  }\n\n  /* Reset to starting position. */\n  str_curr_p = start_p;\n\n  /* String ended after sign character, or was empty after removing leading whitespace. */\n  if (str_curr_p >= str_end_p)\n  {\n    return ecma_make_nan_value ();\n  }\n\n  /* Reset to starting position. */\n  str_curr_p = start_p;\n\n  current = *str_curr_p;\n\n  bool has_whole_part = false;\n  bool has_fraction_part = false;\n\n  /* Check digits of whole part. */\n  if (lit_char_is_decimal_digit (current))\n  {\n    has_whole_part = true;\n    str_curr_p++;\n\n    while (str_curr_p < str_end_p)\n    {\n      current = *str_curr_p++;\n      if (!lit_char_is_decimal_digit (current))\n      {\n        str_curr_p--;\n        break;\n      }\n    }\n  }\n\n  /* Set end position to the end of whole part. */\n  end_p = str_curr_p;\n  if (str_curr_p < str_end_p)\n  {\n    current = *str_curr_p;\n\n    /* Check decimal point. */\n    if (current == LIT_CHAR_DOT)\n    {\n      str_curr_p++;\n\n      if (str_curr_p < str_end_p)\n      {\n        current = *str_curr_p;\n\n        if (lit_char_is_decimal_digit (current))\n        {\n          has_fraction_part = true;\n\n          /* Check digits of fractional part. */\n          while (str_curr_p < str_end_p)\n          {\n            current = *str_curr_p++;\n            if (!lit_char_is_decimal_digit (current))\n            {\n              str_curr_p--;\n              break;\n            }\n          }\n\n          /* Set end position to end of fraction part. */\n          end_p = str_curr_p;\n        }\n      }\n    }\n  }\n\n  if (str_curr_p < str_end_p)\n  {\n    current = *str_curr_p++;\n  }\n\n  /* Check exponent. */\n  if ((current == LIT_CHAR_LOWERCASE_E || current == LIT_CHAR_UPPERCASE_E)\n      && (has_whole_part || has_fraction_part)\n      && str_curr_p < str_end_p)\n  {\n    current = *str_curr_p++;\n\n    /* Check sign of exponent. */\n    if ((current == LIT_CHAR_PLUS || current == LIT_CHAR_MINUS)\n         && str_curr_p < str_end_p)\n    {\n      current = *str_curr_p++;\n    }\n\n    if (lit_char_is_decimal_digit (current))\n    {\n      /* Check digits of exponent part. */\n      while (str_curr_p < str_end_p)\n      {\n        current = *str_curr_p++;\n        if (!lit_char_is_decimal_digit (current))\n        {\n          str_curr_p--;\n          break;\n        }\n      }\n\n      /* Set end position to end of exponent part. */\n      end_p = str_curr_p;\n    }\n  }\n\n  /* String did not contain a valid number. */\n  if (start_p == end_p)\n  {\n    return ecma_make_nan_value ();\n  }\n\n  /* 5. */\n  ecma_number_t ret_num = ecma_utf8_string_to_number (start_p, (lit_utf8_size_t) (end_p - start_p), 0);\n\n  if (sign)\n  {\n    ret_num *= ECMA_NUMBER_MINUS_ONE;\n  }\n\n  return ecma_make_number_value (ret_num);\n} /* ecma_number_parse_float */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"jrt.h\"\n#include \"jrt-libc-includes.h\"\n#include \"lit-char-helpers.h\"\n#include \"lit-magic-strings.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmahelpers Helpers for operations with ECMA data types\n * @{\n */\n\nJERRY_STATIC_ASSERT (ECMA_STRING_CONTAINER_MASK >= ECMA_STRING_CONTAINER__MAX,\n                     ecma_string_container_types_must_be_lower_than_the_container_mask);\n\nJERRY_STATIC_ASSERT ((ECMA_STRING_MAX_REF | ECMA_STRING_CONTAINER_MASK | ECMA_STATIC_STRING_FLAG) == UINT32_MAX,\n                     ecma_string_ref_and_container_fields_should_fill_the_32_bit_field);\n\nJERRY_STATIC_ASSERT (ECMA_STRING_NOT_ARRAY_INDEX == UINT32_MAX,\n                     ecma_string_not_array_index_must_be_equal_to_uint32_max);\n\nJERRY_STATIC_ASSERT ((ECMA_TYPE_DIRECT_STRING & 0x1) != 0,\n                     ecma_type_direct_string_must_be_odd_number);\n\nJERRY_STATIC_ASSERT (LIT_MAGIC_STRING__COUNT <= ECMA_DIRECT_STRING_MAX_IMM,\n                     all_magic_strings_must_be_encoded_as_direct_string);\n\nJERRY_STATIC_ASSERT ((int) ECMA_DIRECT_STRING_UINT == (int) ECMA_STRING_CONTAINER_UINT32_IN_DESC,\n                     ecma_direct_and_container_types_must_match);\n\nJERRY_STATIC_ASSERT (ECMA_PROPERTY_NAME_TYPE_SHIFT > ECMA_VALUE_SHIFT,\n                     ecma_property_name_type_shift_must_be_greater_than_ecma_value_shift);\n\nJERRY_STATIC_ASSERT (sizeof (ecma_stringbuilder_header_t) <= ECMA_ASCII_STRING_HEADER_SIZE,\n                     ecma_stringbuilder_header_must_not_be_larger_than_ecma_ascii_string);\n\n/**\n * Convert a string to an unsigned 32 bit value if possible\n *\n * @return true if the conversion is successful\n *         false otherwise\n */\nstatic bool\necma_string_to_array_index (const lit_utf8_byte_t *string_p, /**< utf-8 string */\n                            lit_utf8_size_t string_size, /**< string size */\n                            uint32_t *result_p) /**< [out] converted value */\n{\n  JERRY_ASSERT (string_size > 0 && *string_p >= LIT_CHAR_0 && *string_p <= LIT_CHAR_9);\n\n  if (*string_p == LIT_CHAR_0)\n  {\n    *result_p = 0;\n    return (string_size == 1);\n  }\n\n  if (string_size > ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32)\n  {\n    return false;\n  }\n\n  uint32_t index = 0;\n  const lit_utf8_byte_t *string_end_p = string_p + string_size;\n\n  if (string_size == ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32)\n  {\n    string_end_p--;\n  }\n\n  do\n  {\n    if (*string_p > LIT_CHAR_9 || *string_p < LIT_CHAR_0)\n    {\n      return false;\n    }\n\n    index = (index * 10) + (uint32_t) (*string_p++ - LIT_CHAR_0);\n  }\n  while (string_p < string_end_p);\n\n  if (string_size < ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32)\n  {\n    *result_p = index;\n    return true;\n  }\n\n  /* Overflow must be checked as well when size is\n   * equal to ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32. */\n  if (*string_p > LIT_CHAR_9\n      || *string_p < LIT_CHAR_0\n      || index > (UINT32_MAX / 10)\n      || (index == (UINT32_MAX / 10) && *string_p > LIT_CHAR_5))\n  {\n    return false;\n  }\n\n  *result_p = (index * 10) + (uint32_t) (*string_p - LIT_CHAR_0);\n  return true;\n} /* ecma_string_to_array_index */\n\n/**\n * Returns the characters and size of a string.\n *\n * Note:\n *   UINT type is not supported\n *\n * @return byte array start - if the byte array of a string is available\n *         NULL - otherwise\n */\nstatic const lit_utf8_byte_t *\necma_string_get_chars_fast (const ecma_string_t *string_p, /**< ecma-string */\n                            lit_utf8_size_t *size_p) /**< [out] size of the ecma string */\n{\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    if (ECMA_GET_DIRECT_STRING_TYPE (string_p) == ECMA_DIRECT_STRING_MAGIC)\n    {\n      uint32_t id = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n\n      if (id >= LIT_MAGIC_STRING__COUNT)\n      {\n        id -= LIT_MAGIC_STRING__COUNT;\n\n        *size_p = lit_get_magic_string_ex_size (id);\n        return lit_get_magic_string_ex_utf8 (id);\n      }\n\n      *size_p = lit_get_magic_string_size (id);\n      return lit_get_magic_string_utf8 (id);\n    }\n  }\n\n  JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n  switch (ECMA_STRING_GET_CONTAINER (string_p))\n  {\n    case ECMA_STRING_CONTAINER_HEAP_UTF8_STRING:\n    {\n      *size_p = ((ecma_short_string_t *) string_p)->size;\n      return ECMA_SHORT_STRING_GET_BUFFER (string_p);\n    }\n    case ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING:\n    {\n      ecma_long_string_t *long_string_p = (ecma_long_string_t *) string_p;\n      *size_p = long_string_p->size;\n      return long_string_p->string_p;\n    }\n    case ECMA_STRING_CONTAINER_HEAP_ASCII_STRING:\n    {\n      *size_p = ECMA_ASCII_STRING_GET_SIZE (string_p);\n      return ECMA_ASCII_STRING_GET_BUFFER (string_p);\n    }\n    default:\n    {\n      JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_MAGIC_STRING_EX);\n\n      lit_magic_string_ex_id_t id = LIT_MAGIC_STRING__COUNT - string_p->u.magic_string_ex_id;\n      *size_p = lit_get_magic_string_ex_size (id);\n      return lit_get_magic_string_ex_utf8 (id);\n    }\n  }\n} /* ecma_string_get_chars_fast */\n\n/**\n * Allocate new ecma-string and fill it with reference to ECMA magic string\n *\n * @return pointer to ecma-string descriptor\n */\nstatic ecma_string_t *\necma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**< identifier of externl magic string */\n{\n  JERRY_ASSERT (id < lit_get_magic_string_ex_count ());\n\n  uintptr_t string_id = (uintptr_t) (id + LIT_MAGIC_STRING__COUNT);\n\n  if (JERRY_LIKELY (string_id <= ECMA_DIRECT_STRING_MAX_IMM))\n  {\n    return (ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_MAGIC, string_id);\n  }\n\n  ecma_string_t *string_desc_p = ecma_alloc_string ();\n\n  string_desc_p->refs_and_container = ECMA_STRING_CONTAINER_MAGIC_STRING_EX | ECMA_STRING_REF_ONE;\n  string_desc_p->u.magic_string_ex_id = id + LIT_MAGIC_STRING__COUNT;\n\n  return string_desc_p;\n} /* ecma_new_ecma_string_from_magic_string_ex_id */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Allocate new ecma-string and fill it with reference to the symbol descriptor\n *\n * Note:\n *     Takes the reference to the string_desc\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_symbol_from_descriptor_string (ecma_value_t string_desc) /**< ecma-string */\n{\n  JERRY_ASSERT (!ecma_is_value_symbol (string_desc));\n\n  ecma_extended_string_t *symbol_p = ecma_alloc_extended_string ();\n  symbol_p->header.refs_and_container = ECMA_STRING_REF_ONE | ECMA_STRING_CONTAINER_SYMBOL;\n  symbol_p->u.symbol_descriptor = string_desc;\n  symbol_p->header.u.hash = (lit_string_hash_t) (((uintptr_t) symbol_p) >> ECMA_SYMBOL_HASH_SHIFT);\n  JERRY_ASSERT ((symbol_p->header.u.hash & ECMA_GLOBAL_SYMBOL_FLAG) == 0);\n\n  return (ecma_string_t *) symbol_p;\n} /* ecma_new_symbol_from_descriptor_string */\n\n/**\n * Check whether an ecma-string contains an ecma-symbol\n *\n * @return true - if the ecma-string contains an ecma-symbol\n *         false - otherwise\n */\nbool\necma_prop_name_is_symbol (ecma_string_t *string_p) /**< ecma-string */\n{\n  JERRY_ASSERT (string_p != NULL);\n\n  return (!ECMA_IS_DIRECT_STRING (string_p)\n          && ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_SYMBOL);\n} /* ecma_prop_name_is_symbol */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Allocate new UTF8 ecma-string and fill it with characters from the given utf8 buffer\n *\n * @return pointer to ecma-string descriptor\n */\nstatic inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE\necma_new_ecma_string_from_utf8_buffer (lit_utf8_size_t length, /**< length of the buffer */\n                                       lit_utf8_size_t size, /**< size of the buffer */\n                                       lit_utf8_byte_t **data_p) /**< [out] pointer to the start of the string buffer */\n{\n  if (JERRY_LIKELY (size <= UINT16_MAX))\n  {\n    if (JERRY_LIKELY (length == size) && size <= (UINT8_MAX + 1))\n    {\n      ecma_string_t *string_desc_p;\n      string_desc_p = (ecma_string_t *) ecma_alloc_string_buffer (size + ECMA_ASCII_STRING_HEADER_SIZE);\n      string_desc_p->refs_and_container = ECMA_STRING_CONTAINER_HEAP_ASCII_STRING | ECMA_STRING_REF_ONE;\n      ECMA_ASCII_STRING_SET_SIZE (string_desc_p, size);\n\n      *data_p = ECMA_ASCII_STRING_GET_BUFFER (string_desc_p);\n      return (ecma_string_t *) string_desc_p;\n    }\n\n    ecma_short_string_t *string_desc_p;\n    string_desc_p = (ecma_short_string_t *) ecma_alloc_string_buffer (size + sizeof (ecma_short_string_t));\n    string_desc_p->header.refs_and_container = ECMA_STRING_CONTAINER_HEAP_UTF8_STRING | ECMA_STRING_REF_ONE;\n    string_desc_p->size = (uint16_t) size;\n    string_desc_p->length = (uint16_t) length;\n\n    *data_p = ECMA_SHORT_STRING_GET_BUFFER (string_desc_p);\n    return (ecma_string_t *) string_desc_p;\n  }\n\n  ecma_long_string_t *long_string_p;\n  long_string_p = (ecma_long_string_t *) ecma_alloc_string_buffer (size + sizeof (ecma_long_string_t));\n  long_string_p->header.refs_and_container = ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING | ECMA_STRING_REF_ONE;\n  long_string_p->string_p = ECMA_LONG_STRING_BUFFER_START (long_string_p);\n  long_string_p->size = size;\n  long_string_p->length = length;\n\n  *data_p = ECMA_LONG_STRING_BUFFER_START (long_string_p);\n  return (ecma_string_t *) long_string_p;\n} /* ecma_new_ecma_string_from_utf8_buffer */\n\n/**\n * Checks whether a string has a special representation, that is, the string is either a magic string,\n * an external magic string, or an uint32 number, and creates an ecma string using the special representation,\n * if available.\n *\n * @return pointer to ecma string with the special representation\n *         NULL, if there is no special representation for the string\n */\nstatic ecma_string_t *\necma_find_special_string (const lit_utf8_byte_t *string_p, /**< utf8 string */\n                          lit_utf8_size_t string_size) /**< string size */\n{\n  JERRY_ASSERT (string_p != NULL || string_size == 0);\n  lit_magic_string_id_t magic_string_id = lit_is_utf8_string_magic (string_p, string_size);\n\n  if (magic_string_id != LIT_MAGIC_STRING__COUNT)\n  {\n    return ecma_get_magic_string (magic_string_id);\n  }\n\n  JERRY_ASSERT (string_size > 0);\n\n  if (*string_p >= LIT_CHAR_0 && *string_p <= LIT_CHAR_9)\n  {\n    uint32_t array_index;\n\n    if (ecma_string_to_array_index (string_p, string_size, &array_index))\n    {\n      return ecma_new_ecma_string_from_uint32 (array_index);\n    }\n  }\n\n  if (lit_get_magic_string_ex_count () > 0)\n  {\n    lit_magic_string_ex_id_t magic_string_ex_id = lit_is_ex_utf8_string_magic (string_p, string_size);\n\n    if (magic_string_ex_id < lit_get_magic_string_ex_count ())\n    {\n      return ecma_new_ecma_string_from_magic_string_ex_id (magic_string_ex_id);\n    }\n  }\n\n  return NULL;\n} /* ecma_find_special_string */\n\n/**\n * Allocate new ecma-string and fill it with characters from the utf8 string\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_ecma_string_from_utf8 (const lit_utf8_byte_t *string_p, /**< utf-8 string */\n                                lit_utf8_size_t string_size) /**< string size */\n{\n  JERRY_ASSERT (string_p != NULL || string_size == 0);\n  JERRY_ASSERT (lit_is_valid_cesu8_string (string_p, string_size));\n\n  ecma_string_t *string_desc_p = ecma_find_special_string (string_p, string_size);\n\n  if (string_desc_p != NULL)\n  {\n    return string_desc_p;\n  }\n\n  lit_utf8_byte_t *data_p;\n  string_desc_p = ecma_new_ecma_string_from_utf8_buffer (lit_utf8_string_length (string_p, string_size),\n                                                         string_size,\n                                                         &data_p);\n\n  string_desc_p->u.hash = lit_utf8_string_calc_hash (string_p, string_size);\n  memcpy (data_p, string_p, string_size);\n\n  return string_desc_p;\n} /* ecma_new_ecma_string_from_utf8 */\n\n/**\n * Allocate a new ecma-string and initialize it from the utf8 string argument.\n * All 4-bytes long unicode sequences are converted into two 3-bytes long sequences.\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_ecma_string_from_utf8_converted_to_cesu8 (const lit_utf8_byte_t *string_p, /**< utf-8 string */\n                                                   lit_utf8_size_t string_size) /**< utf-8 string size */\n{\n  JERRY_ASSERT (string_p != NULL || string_size == 0);\n\n  lit_utf8_size_t converted_string_length = 0;\n  lit_utf8_size_t converted_string_size = 0;\n  lit_utf8_size_t pos = 0;\n\n  /* Calculate the required length and size information of the converted cesu-8 encoded string */\n  while (pos < string_size)\n  {\n    if ((string_p[pos] & LIT_UTF8_1_BYTE_MASK) == LIT_UTF8_1_BYTE_MARKER)\n    {\n      pos++;\n    }\n    else if ((string_p[pos] & LIT_UTF8_2_BYTE_MASK) == LIT_UTF8_2_BYTE_MARKER)\n    {\n      pos += 2;\n    }\n    else if ((string_p[pos] & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER)\n    {\n      pos += 3;\n    }\n    else\n    {\n      JERRY_ASSERT ((string_p[pos] & LIT_UTF8_4_BYTE_MASK) == LIT_UTF8_4_BYTE_MARKER);\n      pos += 4;\n      converted_string_size += 2;\n      converted_string_length++;\n    }\n\n    converted_string_length++;\n  }\n\n  JERRY_ASSERT (pos == string_size);\n\n  if (converted_string_size == 0)\n  {\n    return ecma_new_ecma_string_from_utf8 (string_p, string_size);\n  }\n\n  converted_string_size += string_size;\n\n  JERRY_ASSERT (lit_is_valid_utf8_string (string_p, string_size));\n\n  lit_utf8_byte_t *data_p;\n  ecma_string_t *string_desc_p = ecma_new_ecma_string_from_utf8_buffer (converted_string_length,\n                                                                        converted_string_size,\n                                                                        &data_p);\n\n  const lit_utf8_byte_t *const begin_data_p = data_p;\n  pos = 0;\n\n  while (pos < string_size)\n  {\n    if ((string_p[pos] & LIT_UTF8_4_BYTE_MASK) == LIT_UTF8_4_BYTE_MARKER)\n    {\n      /* Processing 4 byte unicode sequence. Always converted to two 3 byte long sequence. */\n      lit_four_byte_utf8_char_to_cesu8 (data_p, string_p + pos);\n      data_p += 3 * 2;\n      pos += 4;\n    }\n    else\n    {\n      *data_p++ = string_p[pos++];\n    }\n  }\n\n  JERRY_ASSERT (pos == string_size);\n\n  string_desc_p->u.hash = lit_utf8_string_calc_hash (begin_data_p, converted_string_size);\n\n  return (ecma_string_t *) string_desc_p;\n} /* ecma_new_ecma_string_from_utf8_converted_to_cesu8 */\n\n/**\n * Allocate new ecma-external-string and fill it with characters from the cesu8 string\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_ecma_external_string_from_cesu8 (const lit_utf8_byte_t *string_p, /**< cesu-8 string */\n                                          lit_utf8_size_t string_size, /**< string size */\n                                          ecma_object_native_free_callback_t free_cb) /**< free callback */\n{\n  JERRY_ASSERT (string_p != NULL || string_size == 0);\n  JERRY_ASSERT (lit_is_valid_cesu8_string (string_p, string_size));\n\n  if (string_size < (sizeof (ecma_external_string_t) - sizeof (ecma_short_string_t)))\n  {\n    /* Normal strings are created for short strings. */\n    ecma_string_t *string_desc_p = ecma_new_ecma_string_from_utf8 (string_p, string_size);\n\n    if (free_cb != NULL)\n    {\n      free_cb ((void *) string_p);\n    }\n    return string_desc_p;\n  }\n\n  ecma_string_t *string_desc_p = ecma_find_special_string (string_p, string_size);\n\n  if (string_desc_p != NULL)\n  {\n    if (free_cb != NULL)\n    {\n      free_cb ((void *) string_p);\n    }\n    return string_desc_p;\n  }\n\n  ecma_external_string_t *external_string_p = ecma_alloc_external_string ();\n  ecma_long_string_t *long_string_p = (ecma_long_string_t *) external_string_p;\n\n  long_string_p->header.refs_and_container = ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING | ECMA_STRING_REF_ONE;\n  long_string_p->header.u.hash = lit_utf8_string_calc_hash (string_p, string_size);\n  long_string_p->string_p = string_p;\n  long_string_p->size = string_size;\n  long_string_p->length = lit_utf8_string_length (string_p, string_size);\n  external_string_p->free_cb = free_cb;\n\n  return (ecma_string_t *) external_string_p;\n} /* ecma_new_ecma_external_string_from_cesu8 */\n\n/**\n * Allocate new ecma-string and fill it with cesu-8 character which represents specified code unit\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_ecma_string_from_code_unit (ecma_char_t code_unit) /**< code unit */\n{\n  lit_utf8_byte_t lit_utf8_bytes[LIT_UTF8_MAX_BYTES_IN_CODE_UNIT];\n  lit_utf8_size_t bytes_size = lit_code_unit_to_utf8 (code_unit, lit_utf8_bytes);\n\n  return ecma_new_ecma_string_from_utf8 (lit_utf8_bytes, bytes_size);\n} /* ecma_new_ecma_string_from_code_unit */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Allocate new ecma-string and fill it with cesu-8 character which represents specified code units\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_ecma_string_from_code_units (ecma_char_t first_code_unit, /**< code unit */\n                                      ecma_char_t second_code_unit) /**< code unit */\n{\n  lit_utf8_byte_t lit_utf8_bytes[2 * LIT_UTF8_MAX_BYTES_IN_CODE_UNIT];\n  lit_utf8_size_t bytes_size = lit_code_unit_to_utf8 (first_code_unit, lit_utf8_bytes);\n  bytes_size += lit_code_unit_to_utf8 (second_code_unit, lit_utf8_bytes + bytes_size);\n\n  return ecma_new_ecma_string_from_utf8 (lit_utf8_bytes, bytes_size);\n} /* ecma_new_ecma_string_from_code_units */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Allocate new ecma-string and fill it with ecma-number\n *\n * Note: the number cannot be represented as direct string\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_non_direct_string_from_uint32 (uint32_t uint32_number) /**< uint32 value of the string */\n{\n  JERRY_ASSERT (uint32_number > ECMA_DIRECT_STRING_MAX_IMM);\n\n  ecma_string_t *string_p = ecma_alloc_string ();\n\n  string_p->refs_and_container = ECMA_STRING_CONTAINER_UINT32_IN_DESC | ECMA_STRING_REF_ONE;\n  string_p->u.uint32_number = uint32_number;\n\n  return string_p;\n} /* ecma_new_non_direct_string_from_uint32 */\n\n/**\n * Allocate new ecma-string and fill it with property length number\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_ecma_string_from_length (ecma_length_t number) /**< property length */\n{\n  if (JERRY_LIKELY (number <= ECMA_DIRECT_STRING_MAX_IMM))\n  {\n    return (ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_UINT, (uintptr_t) number);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT ((ecma_number_t) number <= ECMA_NUMBER_MAX_SAFE_INTEGER);\n\n  if (JERRY_UNLIKELY (number > UINT32_MAX))\n  {\n    return ecma_new_ecma_string_from_number ((ecma_number_t) number);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ecma_new_non_direct_string_from_uint32 ((uint32_t) number);\n} /* ecma_new_ecma_string_from_length */\n\n/**\n * Allocate new ecma-string and fill it with uint32 number\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_ecma_string_from_uint32 (uint32_t uint32_number) /**< uint32 value of the string */\n{\n  if (JERRY_LIKELY (uint32_number <= ECMA_DIRECT_STRING_MAX_IMM))\n  {\n    return (ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_UINT, (uintptr_t) uint32_number);\n  }\n\n  return ecma_new_non_direct_string_from_uint32 (uint32_number);\n} /* ecma_new_ecma_string_from_uint32 */\n\n/**\n * Returns the constant assigned to the uint32 number.\n *\n * Note:\n *   Calling ecma_deref_ecma_string on the returned pointer is optional.\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_get_ecma_string_from_uint32 (uint32_t uint32_number) /**< input number */\n{\n  JERRY_ASSERT (uint32_number <= ECMA_DIRECT_STRING_MAX_IMM);\n\n  return (ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_UINT, (uintptr_t) uint32_number);\n} /* ecma_get_ecma_string_from_uint32 */\n\n/**\n * Allocate new ecma-string and fill it with ecma-number\n *\n * @return pointer to ecma-string descriptor\n */\necma_string_t *\necma_new_ecma_string_from_number (ecma_number_t num) /**< ecma-number */\n{\n  uint32_t uint32_num = ecma_number_to_uint32 (num);\n  if (num == ((ecma_number_t) uint32_num))\n  {\n    return ecma_new_ecma_string_from_uint32 (uint32_num);\n  }\n\n  if (ecma_number_is_nan (num))\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING_NAN);\n  }\n\n  if (ecma_number_is_infinity (num))\n  {\n    lit_magic_string_id_t id = (ecma_number_is_negative (num) ? LIT_MAGIC_STRING_NEGATIVE_INFINITY_UL\n                                                              : LIT_MAGIC_STRING_INFINITY_UL);\n    return ecma_get_magic_string (id);\n  }\n\n  lit_utf8_byte_t str_buf[ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER];\n  lit_utf8_size_t str_size = ecma_number_to_utf8_string (num, str_buf, sizeof (str_buf));\n\n  JERRY_ASSERT (str_size > 0);\n#ifndef JERRY_NDEBUG\n  JERRY_ASSERT (lit_is_utf8_string_magic (str_buf, str_size) == LIT_MAGIC_STRING__COUNT\n                && lit_is_ex_utf8_string_magic (str_buf, str_size) == lit_get_magic_string_ex_count ());\n#endif /* !JERRY_NDEBUG */\n\n  lit_utf8_byte_t *data_p;\n  ecma_string_t *string_desc_p = ecma_new_ecma_string_from_utf8_buffer (lit_utf8_string_length (str_buf, str_size),\n                                                                        str_size,\n                                                                        &data_p);\n\n  string_desc_p->u.hash = lit_utf8_string_calc_hash (str_buf, str_size);\n  memcpy (data_p, str_buf, str_size);\n\n  return string_desc_p;\n} /* ecma_new_ecma_string_from_number */\n\n/**\n * Returns the constant assigned to the magic string id.\n *\n * Note:\n *   Calling ecma_deref_ecma_string on the returned pointer is optional.\n *\n * @return pointer to ecma-string descriptor\n */\nextern inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE\necma_get_magic_string (lit_magic_string_id_t id) /**< identifier of magic string */\n{\n  JERRY_ASSERT (id < LIT_MAGIC_STRING__COUNT);\n  return (ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_MAGIC, (uintptr_t) id);\n} /* ecma_get_magic_string */\n\n/**\n * Returns the constant assigned to the internal magic string id.\n *\n * Note:\n *   Calling ecma_deref_ecma_string on the returned pointer is optional.\n *\n * @return pointer to ecma-string descriptor\n */\nextern inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE\necma_get_internal_string (lit_magic_string_id_t id) /**< identifier of magic string */\n{\n  JERRY_ASSERT (id >= LIT_NON_INTERNAL_MAGIC_STRING__COUNT && id < LIT_MAGIC_STRING__COUNT);\n  return (ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_SPECIAL, (uintptr_t) id);\n} /* ecma_get_internal_string */\n\n/**\n * Append a cesu8 string after an ecma-string\n *\n * Note:\n *   The string1_p argument is freed. If it needs to be preserved,\n *   call ecma_ref_ecma_string with string1_p before the call.\n *\n * @return concatenation of an ecma-string and a cesu8 string\n */\necma_string_t *\necma_append_chars_to_string (ecma_string_t *string1_p, /**< base ecma-string */\n                             const lit_utf8_byte_t *cesu8_string2_p, /**< characters to be appended */\n                             lit_utf8_size_t cesu8_string2_size, /**< byte size of cesu8_string2_p */\n                             lit_utf8_size_t cesu8_string2_length) /**< character length of cesu8_string2_p */\n{\n  JERRY_ASSERT (string1_p != NULL && cesu8_string2_size > 0 && cesu8_string2_length > 0);\n\n  if (JERRY_UNLIKELY (ecma_string_is_empty (string1_p)))\n  {\n    return ecma_new_ecma_string_from_utf8 (cesu8_string2_p, cesu8_string2_size);\n  }\n\n  lit_utf8_size_t cesu8_string1_size;\n  lit_utf8_size_t cesu8_string1_length;\n  uint8_t flags = ECMA_STRING_FLAG_IS_ASCII;\n  lit_utf8_byte_t uint32_to_string_buffer[ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32];\n\n  const lit_utf8_byte_t *cesu8_string1_p = ecma_string_get_chars (string1_p,\n                                                                  &cesu8_string1_size,\n                                                                  &cesu8_string1_length,\n                                                                  uint32_to_string_buffer,\n                                                                  &flags);\n\n  JERRY_ASSERT (!(flags & ECMA_STRING_FLAG_MUST_BE_FREED));\n  JERRY_ASSERT (cesu8_string1_length > 0);\n  JERRY_ASSERT (cesu8_string1_length <= cesu8_string1_size);\n\n  lit_utf8_size_t new_size = cesu8_string1_size + cesu8_string2_size;\n\n  /* Poor man's carry flag check: it is impossible to allocate this large string. */\n  if (new_size < (cesu8_string1_size | cesu8_string2_size))\n  {\n    jerry_fatal (ERR_OUT_OF_MEMORY);\n  }\n\n  lit_magic_string_id_t magic_string_id;\n  magic_string_id = lit_is_utf8_string_pair_magic (cesu8_string1_p,\n                                                   cesu8_string1_size,\n                                                   cesu8_string2_p,\n                                                   cesu8_string2_size);\n\n  if (magic_string_id != LIT_MAGIC_STRING__COUNT)\n  {\n    ecma_deref_ecma_string (string1_p);\n    return ecma_get_magic_string (magic_string_id);\n  }\n\n  if ((flags & ECMA_STRING_FLAG_IS_UINT32) && new_size <= ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32)\n  {\n    memcpy (uint32_to_string_buffer + cesu8_string1_size, cesu8_string2_p, cesu8_string2_size);\n\n    uint32_t array_index;\n\n    if (ecma_string_to_array_index (uint32_to_string_buffer, new_size, &array_index))\n    {\n      ecma_deref_ecma_string (string1_p);\n      return ecma_new_ecma_string_from_uint32 (array_index);\n    }\n  }\n\n  if (lit_get_magic_string_ex_count () > 0)\n  {\n    lit_magic_string_ex_id_t magic_string_ex_id;\n    magic_string_ex_id = lit_is_ex_utf8_string_pair_magic (cesu8_string1_p,\n                                                           cesu8_string1_size,\n                                                           cesu8_string2_p,\n                                                           cesu8_string2_size);\n\n    if (magic_string_ex_id < lit_get_magic_string_ex_count ())\n    {\n      ecma_deref_ecma_string (string1_p);\n      return ecma_new_ecma_string_from_magic_string_ex_id (magic_string_ex_id);\n    }\n  }\n\n  lit_utf8_byte_t *data_p;\n  ecma_string_t *string_desc_p = ecma_new_ecma_string_from_utf8_buffer (cesu8_string1_length + cesu8_string2_length,\n                                                                        new_size,\n                                                                        &data_p);\n\n  lit_string_hash_t hash_start;\n\n  if (JERRY_UNLIKELY (flags & ECMA_STRING_FLAG_REHASH_NEEDED))\n  {\n    hash_start = lit_utf8_string_calc_hash (cesu8_string1_p, cesu8_string1_size);\n  }\n  else\n  {\n    JERRY_ASSERT (!ECMA_IS_DIRECT_STRING (string1_p));\n    hash_start = string1_p->u.hash;\n  }\n\n  string_desc_p->u.hash = lit_utf8_string_hash_combine (hash_start, cesu8_string2_p, cesu8_string2_size);\n\n  memcpy (data_p, cesu8_string1_p, cesu8_string1_size);\n  memcpy (data_p + cesu8_string1_size, cesu8_string2_p, cesu8_string2_size);\n\n  ecma_deref_ecma_string (string1_p);\n  return (ecma_string_t *) string_desc_p;\n} /* ecma_append_chars_to_string */\n\n/**\n * Concatenate ecma-strings\n *\n * Note:\n *   The string1_p argument is freed. If it needs to be preserved,\n *   call ecma_ref_ecma_string with string1_p before the call.\n *\n * @return concatenation of two ecma-strings\n */\necma_string_t *\necma_concat_ecma_strings (ecma_string_t *string1_p, /**< first ecma-string */\n                          ecma_string_t *string2_p) /**< second ecma-string */\n{\n  JERRY_ASSERT (string1_p != NULL && string2_p != NULL);\n\n  if (JERRY_UNLIKELY (ecma_string_is_empty (string1_p)))\n  {\n    ecma_ref_ecma_string (string2_p);\n    return string2_p;\n  }\n  else if (JERRY_UNLIKELY (ecma_string_is_empty (string2_p)))\n  {\n    return string1_p;\n  }\n\n  lit_utf8_size_t cesu8_string2_size;\n  lit_utf8_size_t cesu8_string2_length;\n  lit_utf8_byte_t uint32_to_string_buffer[ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32];\n  uint8_t flags = ECMA_STRING_FLAG_IS_ASCII;\n\n  const lit_utf8_byte_t *cesu8_string2_p = ecma_string_get_chars (string2_p,\n                                                                  &cesu8_string2_size,\n                                                                  &cesu8_string2_length,\n                                                                  uint32_to_string_buffer,\n                                                                  &flags);\n\n  JERRY_ASSERT (cesu8_string2_p != NULL);\n\n  ecma_string_t *result_p = ecma_append_chars_to_string (string1_p,\n                                                         cesu8_string2_p,\n                                                         cesu8_string2_size,\n                                                         cesu8_string2_length);\n\n  JERRY_ASSERT (!(flags & ECMA_STRING_FLAG_MUST_BE_FREED));\n\n  return result_p;\n} /* ecma_concat_ecma_strings */\n\n/**\n * Increase reference counter of ecma-string.\n */\nvoid\necma_ref_ecma_string (ecma_string_t *string_p) /**< string descriptor */\n{\n  JERRY_ASSERT (string_p != NULL);\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    return;\n  }\n\n#ifdef JERRY_NDEBUG\n  if (ECMA_STRING_IS_STATIC (string_p))\n  {\n    return;\n  }\n#endif /* JERRY_NDEBUG */\n\n  JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n  if (JERRY_LIKELY (string_p->refs_and_container < ECMA_STRING_MAX_REF))\n  {\n    /* Increase reference counter. */\n    string_p->refs_and_container += ECMA_STRING_REF_ONE;\n  }\n  else\n  {\n    jerry_fatal (ERR_REF_COUNT_LIMIT);\n  }\n} /* ecma_ref_ecma_string */\n\n/**\n * Decrease reference counter and deallocate ecma-string\n * if the counter becomes zero.\n */\nvoid\necma_deref_ecma_string (ecma_string_t *string_p) /**< ecma-string */\n{\n  JERRY_ASSERT (string_p != NULL);\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    return;\n  }\n\n#ifdef JERRY_NDEBUG\n  if (ECMA_STRING_IS_STATIC (string_p))\n  {\n    return;\n  }\n#endif /* JERRY_NDEBUG */\n\n  JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n  /* Decrease reference counter. */\n  string_p->refs_and_container -= ECMA_STRING_REF_ONE;\n\n  if (string_p->refs_and_container >= ECMA_STRING_REF_ONE)\n  {\n    return;\n  }\n\n  ecma_destroy_ecma_string (string_p);\n} /* ecma_deref_ecma_string */\n\n/**\n * Deallocate an ecma-string\n */\nvoid\necma_destroy_ecma_string (ecma_string_t *string_p) /**< ecma-string */\n{\n  JERRY_ASSERT (string_p != NULL);\n  JERRY_ASSERT (!ECMA_IS_DIRECT_STRING (string_p));\n  JERRY_ASSERT ((string_p->refs_and_container < ECMA_STRING_REF_ONE) || ECMA_STRING_IS_STATIC (string_p));\n\n  switch (ECMA_STRING_GET_CONTAINER (string_p))\n  {\n    case ECMA_STRING_CONTAINER_HEAP_UTF8_STRING:\n    {\n      ecma_dealloc_string_buffer (string_p, ((ecma_short_string_t *) string_p)->size + sizeof (ecma_short_string_t));\n      return;\n    }\n    case ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING:\n    {\n      ecma_long_string_t *long_string_p = (ecma_long_string_t *) string_p;\n\n      if (long_string_p->string_p == ECMA_LONG_STRING_BUFFER_START (long_string_p))\n      {\n        ecma_dealloc_string_buffer (string_p, long_string_p->size + sizeof (ecma_long_string_t));\n        return;\n      }\n\n      ecma_external_string_t *external_string_p = (ecma_external_string_t *) string_p;\n\n      if (external_string_p->free_cb != NULL)\n      {\n        external_string_p->free_cb ((void *) external_string_p->header.string_p);\n      }\n\n      ecma_dealloc_external_string (external_string_p);\n      return;\n    }\n    case ECMA_STRING_CONTAINER_HEAP_ASCII_STRING:\n    {\n      ecma_dealloc_string_buffer (string_p, ECMA_ASCII_STRING_GET_SIZE (string_p) + ECMA_ASCII_STRING_HEADER_SIZE);\n      return;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_STRING_CONTAINER_SYMBOL:\n    {\n      ecma_extended_string_t *symbol_p = (ecma_extended_string_t *) string_p;\n      ecma_free_value (symbol_p->u.symbol_descriptor);\n      ecma_dealloc_extended_string (symbol_p);\n      return;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC\n                    || ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_MAGIC_STRING_EX);\n\n      /* only the string descriptor itself should be freed */\n      ecma_dealloc_string (string_p);\n    }\n  }\n} /* ecma_destroy_ecma_string */\n\n/**\n * Convert ecma-string to number\n *\n * @return converted ecma-number\n */\necma_number_t\necma_string_to_number (const ecma_string_t *string_p) /**< ecma-string */\n{\n  JERRY_ASSERT (string_p != NULL);\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    if (ECMA_IS_DIRECT_STRING_WITH_TYPE (string_p, ECMA_DIRECT_STRING_UINT))\n    {\n      return (ecma_number_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n    }\n  }\n  else if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC)\n  {\n    return ((ecma_number_t) string_p->u.uint32_number);\n  }\n\n  lit_utf8_size_t size;\n  const lit_utf8_byte_t *chars_p = ecma_string_get_chars_fast (string_p, &size);\n\n  JERRY_ASSERT (chars_p != NULL);\n\n  if (size == 0)\n  {\n    return ECMA_NUMBER_ZERO;\n  }\n\n  return ecma_utf8_string_to_number (chars_p, size, 0);\n} /* ecma_string_to_number */\n\n/**\n * Check if string is array index.\n *\n * @return ECMA_STRING_NOT_ARRAY_INDEX if string is not array index\n *         the array index otherwise\n */\nextern inline uint32_t JERRY_ATTR_ALWAYS_INLINE\necma_string_get_array_index (const ecma_string_t *str_p) /**< ecma-string */\n{\n  if (ECMA_IS_DIRECT_STRING (str_p))\n  {\n    if (ECMA_IS_DIRECT_STRING_WITH_TYPE (str_p, ECMA_DIRECT_STRING_UINT))\n    {\n      /* Value cannot be equal to the maximum value of a 32 bit unsigned number. */\n      return (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (str_p);\n    }\n\n    return ECMA_STRING_NOT_ARRAY_INDEX;\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (str_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC)\n  {\n    /* When the uint32_number is equal to the maximum value of 32 bit unsigned integer number,\n     * it is also an invalid array index. The comparison to ECMA_STRING_NOT_ARRAY_INDEX will\n     * be true in this case. */\n    return str_p->u.uint32_number;\n  }\n\n  return ECMA_STRING_NOT_ARRAY_INDEX;\n} /* ecma_string_get_array_index */\n\n/**\n * Convert ecma-string's contents to a cesu-8 string and put it to the buffer.\n * It is the caller's responsibility to make sure that the string fits in the buffer.\n *\n * @return number of bytes, actually copied to the buffer.\n */\nlit_utf8_size_t JERRY_ATTR_WARN_UNUSED_RESULT\necma_string_copy_to_cesu8_buffer (const ecma_string_t *string_p, /**< ecma-string descriptor */\n                                  lit_utf8_byte_t *buffer_p, /**< destination buffer pointer\n                                                              * (can be NULL if buffer_size == 0) */\n                                  lit_utf8_size_t buffer_size) /**< size of buffer */\n{\n  JERRY_ASSERT (string_p != NULL);\n  JERRY_ASSERT (buffer_p != NULL || buffer_size == 0);\n  JERRY_ASSERT (ecma_string_get_size (string_p) <= buffer_size);\n\n  lit_utf8_size_t size;\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    if (ECMA_IS_DIRECT_STRING_WITH_TYPE (string_p, ECMA_DIRECT_STRING_UINT))\n    {\n      uint32_t uint32_number = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n      size = ecma_uint32_to_utf8_string (uint32_number, buffer_p, buffer_size);\n      JERRY_ASSERT (size <= buffer_size);\n      return size;\n    }\n  }\n  else\n  {\n    JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n    if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC)\n    {\n      uint32_t uint32_number = string_p->u.uint32_number;\n      size = ecma_uint32_to_utf8_string (uint32_number, buffer_p, buffer_size);\n      JERRY_ASSERT (size <= buffer_size);\n      return size;\n    }\n  }\n\n  const lit_utf8_byte_t *chars_p = ecma_string_get_chars_fast (string_p, &size);\n\n  JERRY_ASSERT (chars_p != NULL);\n  JERRY_ASSERT (size <= buffer_size);\n\n  memcpy (buffer_p, chars_p, size);\n  return size;\n} /* ecma_string_copy_to_cesu8_buffer */\n\n/**\n * Convert ecma-string's contents to an utf-8 string and put it to the buffer.\n * It is the caller's responsibility to make sure that the string fits in the buffer.\n *\n * @return number of bytes, actually copied to the buffer.\n */\nlit_utf8_size_t JERRY_ATTR_WARN_UNUSED_RESULT\necma_string_copy_to_utf8_buffer (const ecma_string_t *string_p, /**< ecma-string descriptor */\n                                 lit_utf8_byte_t *buffer_p, /**< destination buffer pointer\n                                                             * (can be NULL if buffer_size == 0) */\n                                 lit_utf8_size_t buffer_size) /**< size of buffer */\n{\n  JERRY_ASSERT (string_p != NULL);\n  JERRY_ASSERT (buffer_p != NULL || buffer_size == 0);\n  JERRY_ASSERT (ecma_string_get_utf8_size (string_p) <= buffer_size);\n\n  lit_utf8_size_t size;\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    if (ECMA_IS_DIRECT_STRING_WITH_TYPE (string_p, ECMA_DIRECT_STRING_UINT))\n    {\n      uint32_t uint32_number = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n      size = ecma_uint32_to_utf8_string (uint32_number, buffer_p, buffer_size);\n      JERRY_ASSERT (size <= buffer_size);\n      return size;\n    }\n  }\n  else\n  {\n    JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n    if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC)\n    {\n      uint32_t uint32_number = string_p->u.uint32_number;\n      size = ecma_uint32_to_utf8_string (uint32_number, buffer_p, buffer_size);\n      JERRY_ASSERT (size <= buffer_size);\n      return size;\n    }\n  }\n\n  uint8_t flags = ECMA_STRING_FLAG_IS_ASCII;\n  const lit_utf8_byte_t *chars_p = ecma_string_get_chars (string_p, &size, NULL, NULL, &flags);\n\n  JERRY_ASSERT (chars_p != NULL);\n\n  if (flags & ECMA_STRING_FLAG_IS_ASCII)\n  {\n    JERRY_ASSERT (size <= buffer_size);\n    memcpy (buffer_p, chars_p, size);\n    return size;\n  }\n\n  size = lit_convert_cesu8_string_to_utf8_string (chars_p,\n                                                  size,\n                                                  buffer_p,\n                                                  buffer_size);\n\n  if (flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) chars_p, size);\n  }\n\n  JERRY_ASSERT (size <= buffer_size);\n  return size;\n} /* ecma_string_copy_to_utf8_buffer */\n\n/**\n * Convert ecma-string's contents to a cesu-8 string, extract the parts of the converted string between the specified\n * start position and the end position (or the end of the string, whichever comes first), and copy these characters\n * into the buffer.\n *\n * @return number of bytes, actually copied to the buffer.\n */\nlit_utf8_size_t\necma_substring_copy_to_cesu8_buffer (const ecma_string_t *string_desc_p, /**< ecma-string descriptor */\n                                     lit_utf8_size_t start_pos, /**< position of the first character */\n                                     lit_utf8_size_t end_pos, /**< position of the last character */\n                                     lit_utf8_byte_t *buffer_p, /**< destination buffer pointer\n                                                                 * (can be NULL if buffer_size == 0) */\n                                     lit_utf8_size_t buffer_size) /**< size of buffer */\n{\n  JERRY_ASSERT (string_desc_p != NULL);\n  JERRY_ASSERT (buffer_p != NULL || buffer_size == 0);\n\n  lit_utf8_size_t string_length = ecma_string_get_length (string_desc_p);\n  lit_utf8_size_t size = 0;\n\n  if (start_pos >= string_length || start_pos >= end_pos)\n  {\n    return 0;\n  }\n\n  if (end_pos > string_length)\n  {\n    end_pos = string_length;\n  }\n\n  ECMA_STRING_TO_UTF8_STRING (string_desc_p, utf8_str_p, utf8_str_size);\n\n  const lit_utf8_byte_t *start_p = utf8_str_p;\n\n  if (string_length == utf8_str_size)\n  {\n    start_p += start_pos;\n    size = end_pos - start_pos;\n\n    if (size > buffer_size)\n    {\n      size = buffer_size;\n    }\n\n    memcpy (buffer_p, start_p, size);\n  }\n  else\n  {\n    end_pos -= start_pos;\n    while (start_pos--)\n    {\n      start_p += lit_get_unicode_char_size_by_utf8_first_byte (*start_p);\n    }\n\n    const lit_utf8_byte_t *end_p = start_p;\n\n    while (end_pos--)\n    {\n      lit_utf8_size_t code_unit_size = lit_get_unicode_char_size_by_utf8_first_byte (*end_p);\n\n      if ((size + code_unit_size) > buffer_size)\n      {\n        break;\n      }\n\n      end_p += code_unit_size;\n      size += code_unit_size;\n    }\n\n    memcpy (buffer_p, start_p, size);\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (utf8_str_p, utf8_str_size);\n\n  JERRY_ASSERT (size <= buffer_size);\n  return size;\n} /* ecma_substring_copy_to_cesu8_buffer */\n\n/**\n * Convert ecma-string's contents to an utf-8 string, extract the parts of the converted string between the specified\n * start position and the end position (or the end of the string, whichever comes first), and copy these characters\n * into the buffer.\n *\n * @return number of bytes, actually copied to the buffer.\n */\nlit_utf8_size_t\necma_substring_copy_to_utf8_buffer (const ecma_string_t *string_desc_p, /**< ecma-string descriptor */\n                                    lit_utf8_size_t start_pos, /**< position of the first character */\n                                    lit_utf8_size_t end_pos, /**< position of the last character */\n                                    lit_utf8_byte_t *buffer_p, /**< destination buffer pointer\n                                                                * (can be NULL if buffer_size == 0) */\n                                    lit_utf8_size_t buffer_size) /**< size of buffer */\n{\n  JERRY_ASSERT (string_desc_p != NULL);\n  JERRY_ASSERT (ECMA_IS_DIRECT_STRING (string_desc_p) || string_desc_p->refs_and_container >= ECMA_STRING_REF_ONE);\n  JERRY_ASSERT (buffer_p != NULL || buffer_size == 0);\n\n  lit_utf8_size_t size = 0;\n\n  lit_utf8_size_t utf8_str_length = ecma_string_get_utf8_length (string_desc_p);\n\n  if (start_pos >= utf8_str_length || start_pos >= end_pos)\n  {\n    return 0;\n  }\n\n  if (end_pos > utf8_str_length)\n  {\n    end_pos = utf8_str_length;\n  }\n\n  ECMA_STRING_TO_UTF8_STRING (string_desc_p, cesu8_str_p, cesu8_str_size);\n  lit_utf8_size_t cesu8_str_length = ecma_string_get_length (string_desc_p);\n\n  if (cesu8_str_length == cesu8_str_size)\n  {\n    cesu8_str_p += start_pos;\n    size = end_pos - start_pos;\n\n    if (size > buffer_size)\n    {\n      size = buffer_size;\n    }\n\n    memcpy (buffer_p, cesu8_str_p, size);\n  }\n  else\n  {\n    const lit_utf8_byte_t *cesu8_end_pos = cesu8_str_p + cesu8_str_size;\n    end_pos -= start_pos;\n\n    while (start_pos--)\n    {\n      ecma_char_t ch;\n      lit_utf8_size_t code_unit_size = lit_read_code_unit_from_utf8 (cesu8_str_p, &ch);\n\n      cesu8_str_p += code_unit_size;\n      if ((cesu8_str_p != cesu8_end_pos) && lit_is_code_point_utf16_high_surrogate (ch))\n      {\n        ecma_char_t next_ch;\n        lit_utf8_size_t next_ch_size = lit_read_code_unit_from_utf8 (cesu8_str_p, &next_ch);\n        if (lit_is_code_point_utf16_low_surrogate (next_ch))\n        {\n          JERRY_ASSERT (code_unit_size == next_ch_size);\n          cesu8_str_p += code_unit_size;\n        }\n      }\n    }\n\n    const lit_utf8_byte_t *cesu8_pos = cesu8_str_p;\n\n    lit_utf8_byte_t *utf8_pos = buffer_p;\n    lit_utf8_byte_t *utf8_end_pos = buffer_p + buffer_size;\n\n    while (end_pos--)\n    {\n      ecma_char_t ch;\n      lit_utf8_size_t code_unit_size = lit_read_code_unit_from_utf8 (cesu8_pos, &ch);\n\n      if ((size + code_unit_size) > buffer_size)\n      {\n        break;\n      }\n\n      if (((cesu8_pos + code_unit_size) != cesu8_end_pos) && lit_is_code_point_utf16_high_surrogate (ch))\n      {\n        ecma_char_t next_ch;\n        lit_utf8_size_t next_ch_size = lit_read_code_unit_from_utf8 (cesu8_pos + code_unit_size, &next_ch);\n\n        if (lit_is_code_point_utf16_low_surrogate (next_ch))\n        {\n          JERRY_ASSERT (code_unit_size == next_ch_size);\n\n          if ((size + code_unit_size + 1) > buffer_size)\n          {\n            break;\n          }\n\n          cesu8_pos += next_ch_size;\n\n          lit_code_point_t code_point = lit_convert_surrogate_pair_to_code_point (ch, next_ch);\n          lit_code_point_to_utf8 (code_point, utf8_pos);\n          size += (code_unit_size + 1);\n        }\n        else\n        {\n          memcpy (utf8_pos, cesu8_pos, code_unit_size);\n          size += code_unit_size;\n        }\n      }\n      else\n      {\n        memcpy (utf8_pos, cesu8_pos, code_unit_size);\n        size += code_unit_size;\n      }\n\n      utf8_pos = buffer_p + size;\n      cesu8_pos += code_unit_size;\n    }\n\n    JERRY_ASSERT (utf8_pos <= utf8_end_pos);\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (cesu8_str_p, cesu8_str_size);\n  JERRY_ASSERT (size <= buffer_size);\n\n  return size;\n} /* ecma_substring_copy_to_utf8_buffer */\n\n/**\n * Convert ecma-string's contents to a cesu-8 string and put it to the buffer.\n * It is the caller's responsibility to make sure that the string fits in the buffer.\n * Check if the size of the string is equal with the size of the buffer.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_string_to_utf8_bytes (const ecma_string_t *string_desc_p, /**< ecma-string descriptor */\n                           lit_utf8_byte_t *buffer_p, /**< destination buffer pointer\n                                                       * (can be NULL if buffer_size == 0) */\n                           lit_utf8_size_t buffer_size) /**< size of buffer */\n{\n  const lit_utf8_size_t size = ecma_string_copy_to_cesu8_buffer (string_desc_p, buffer_p, buffer_size);\n  JERRY_ASSERT (size == buffer_size);\n} /* ecma_string_to_utf8_bytes */\n\n/**\n * Get size of the uint32 number stored locally in the string's descriptor\n *\n * Note: the represented number size and length are equal\n *\n * @return size in bytes\n */\nstatic inline lit_utf8_size_t JERRY_ATTR_ALWAYS_INLINE\necma_string_get_uint32_size (const uint32_t uint32_number) /**< number in the string-descriptor */\n{\n  uint32_t prev_number = 1;\n  uint32_t next_number = 100;\n  lit_utf8_size_t size = 1;\n\n  const uint32_t max_size = 9;\n\n  while (size < max_size && uint32_number >= next_number)\n  {\n    prev_number = next_number;\n    next_number *= 100;\n    size += 2;\n  }\n\n  if (uint32_number >= prev_number * 10)\n  {\n    size++;\n  }\n\n  return size;\n} /* ecma_string_get_uint32_size */\n\n/**\n * Checks whether the given string is a sequence of ascii characters.\n */\n#define ECMA_STRING_IS_ASCII(char_p, size) ((size) == lit_utf8_string_length ((char_p), (size)))\n\n/**\n * Returns with the cesu8 character array of a string.\n *\n * Note:\n *   - This function returns with a newly allocated buffer for uint32 strings,\n *     which must be freed if the optional uint32_buff_p parameter is NULL.\n *   - The ASCII check only happens if the flags parameter gets\n *     'ECMA_STRING_FLAG_IS_ASCII' as an input.\n *\n * @return start of cesu8 characters\n */\nconst lit_utf8_byte_t *\necma_string_get_chars (const ecma_string_t *string_p, /**< ecma-string */\n                       lit_utf8_size_t *size_p, /**< [out] size of the ecma string */\n                       lit_utf8_size_t *length_p, /**< [out] optional argument. If the pointer is not NULL the pointed\n                                                   *    memory area is filled with the length of the ecma string */\n                       lit_utf8_byte_t *uint32_buff_p, /**< [out] optional argument. If the pointer is not NULL the\n                                                        *    pointed memory area is filled with the string converted\n                                                        *    uint32 string descriptor */\n                       uint8_t *flags_p) /**< [in,out] any combination of ecma_string_flag_t bits */\n{\n  lit_utf8_size_t length;\n  lit_utf8_size_t size;\n  const lit_utf8_byte_t *result_p;\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    *flags_p |= ECMA_STRING_FLAG_REHASH_NEEDED;\n\n    switch (ECMA_GET_DIRECT_STRING_TYPE (string_p))\n    {\n      case ECMA_DIRECT_STRING_MAGIC:\n      {\n        uint32_t id = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n\n        if (id >= LIT_MAGIC_STRING__COUNT)\n        {\n          id -= LIT_MAGIC_STRING__COUNT;\n          size = lit_get_magic_string_ex_size (id);\n          result_p = lit_get_magic_string_ex_utf8 (id);\n          length = 0;\n\n          if (JERRY_UNLIKELY (*flags_p & ECMA_STRING_FLAG_IS_ASCII))\n          {\n            length = lit_utf8_string_length (result_p, size);\n          }\n        }\n        else\n        {\n          size = lit_get_magic_string_size (id);\n          length = size;\n\n          result_p = lit_get_magic_string_utf8 (id);\n\n          /* All magic strings must be ascii strings. */\n          JERRY_ASSERT (ECMA_STRING_IS_ASCII (result_p, size));\n        }\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (ECMA_GET_DIRECT_STRING_TYPE (string_p) == ECMA_DIRECT_STRING_UINT);\n        uint32_t uint32_number = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n        size = (lit_utf8_size_t) ecma_string_get_uint32_size (uint32_number);\n\n        if (uint32_buff_p != NULL)\n        {\n          result_p = uint32_buff_p;\n        }\n        else\n        {\n          result_p = (const lit_utf8_byte_t *) jmem_heap_alloc_block (size);\n          *flags_p |= ECMA_STRING_FLAG_MUST_BE_FREED;\n        }\n\n        length = ecma_uint32_to_utf8_string (uint32_number, (lit_utf8_byte_t *) result_p, size);\n\n        JERRY_ASSERT (length == size);\n        *flags_p |= ECMA_STRING_FLAG_IS_UINT32;\n        break;\n      }\n    }\n  }\n  else\n  {\n    JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n    switch (ECMA_STRING_GET_CONTAINER (string_p))\n    {\n      case ECMA_STRING_CONTAINER_HEAP_UTF8_STRING:\n      {\n        ecma_short_string_t *short_string_p = (ecma_short_string_t *) string_p;\n        size = short_string_p->size;\n        length = short_string_p->length;\n        result_p = ECMA_SHORT_STRING_GET_BUFFER (short_string_p);\n        break;\n      }\n      case ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING:\n      {\n        ecma_long_string_t *long_string_desc_p = (ecma_long_string_t *) string_p;\n        size = long_string_desc_p->size;\n        length = long_string_desc_p->length;\n        result_p = long_string_desc_p->string_p;\n        break;\n      }\n      case ECMA_STRING_CONTAINER_HEAP_ASCII_STRING:\n      {\n        size = ECMA_ASCII_STRING_GET_SIZE (string_p);\n        length = size;\n        result_p = ECMA_ASCII_STRING_GET_BUFFER (string_p);\n        break;\n      }\n      case ECMA_STRING_CONTAINER_UINT32_IN_DESC:\n      {\n        size = (lit_utf8_size_t) ecma_string_get_uint32_size (string_p->u.uint32_number);\n\n        if (uint32_buff_p != NULL)\n        {\n          result_p = uint32_buff_p;\n        }\n        else\n        {\n          result_p = (const lit_utf8_byte_t *) jmem_heap_alloc_block (size);\n          *flags_p |= ECMA_STRING_FLAG_MUST_BE_FREED;\n        }\n\n        length = ecma_uint32_to_utf8_string (string_p->u.uint32_number, (lit_utf8_byte_t *) result_p, size);\n\n        JERRY_ASSERT (length == size);\n        *flags_p |= ECMA_STRING_FLAG_IS_UINT32 | ECMA_STRING_FLAG_REHASH_NEEDED;\n        break;\n\n      }\n      default:\n      {\n        JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_MAGIC_STRING_EX);\n\n        lit_magic_string_ex_id_t id = LIT_MAGIC_STRING__COUNT - string_p->u.magic_string_ex_id;\n        size = lit_get_magic_string_ex_size (id);\n        length = 0;\n\n        if (JERRY_UNLIKELY (*flags_p & ECMA_STRING_FLAG_IS_ASCII))\n        {\n          length = lit_utf8_string_length (lit_get_magic_string_ex_utf8 (id), size);\n        }\n\n        result_p = lit_get_magic_string_ex_utf8 (id);\n        *flags_p |= ECMA_STRING_FLAG_REHASH_NEEDED;\n        break;\n      }\n    }\n  }\n\n  *size_p = size;\n  if (length_p != NULL)\n  {\n    *length_p = length;\n  }\n\n  if ((*flags_p & ECMA_STRING_FLAG_IS_ASCII)\n      && length != size)\n  {\n    *flags_p = (uint8_t) (*flags_p & (uint8_t) ~ECMA_STRING_FLAG_IS_ASCII);\n  }\n\n  return result_p;\n} /* ecma_string_get_chars */\n\n/**\n * Checks whether the string equals to the magic string id.\n *\n * @return true - if the string equals to the magic string id\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_compare_ecma_string_to_magic_id (const ecma_string_t *string_p, /**< property name */\n                                      lit_magic_string_id_t id) /**< magic string id */\n{\n  return (string_p == ecma_get_magic_string (id));\n} /* ecma_compare_ecma_string_to_magic_id */\n\n/**\n * Checks whether ecma string is empty or not\n *\n * @return true - if the string is an empty string\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_string_is_empty (const ecma_string_t *string_p) /**< ecma-string */\n{\n  return ecma_compare_ecma_string_to_magic_id (string_p, LIT_MAGIC_STRING__EMPTY);\n} /* ecma_string_is_empty */\n\n/**\n * Checks whether the string equals to \"length\".\n *\n * @return true - if the string equals to \"length\"\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_string_is_length (const ecma_string_t *string_p) /**< property name */\n{\n  return ecma_compare_ecma_string_to_magic_id (string_p, LIT_MAGIC_STRING_LENGTH);\n} /* ecma_string_is_length */\n\n/**\n * Converts a property name into a string\n *\n * @return pointer to the converted ecma string\n */\nstatic inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE\necma_property_to_string (ecma_property_t property, /**< property name type */\n                         jmem_cpointer_t prop_name_cp) /**< property name compressed pointer */\n{\n  uintptr_t property_string = ((uintptr_t) (property)) & (0x3 << ECMA_PROPERTY_NAME_TYPE_SHIFT);\n  property_string = (property_string >> ECMA_STRING_TYPE_CONVERSION_SHIFT) | ECMA_TYPE_DIRECT_STRING;\n  return (ecma_string_t *) (property_string | (((uintptr_t) prop_name_cp) << ECMA_DIRECT_STRING_SHIFT));\n} /* ecma_property_to_string */\n\n/**\n * Converts a string into a property name\n *\n * @return the compressed pointer part of the name\n */\nextern inline jmem_cpointer_t JERRY_ATTR_ALWAYS_INLINE\necma_string_to_property_name (ecma_string_t *prop_name_p, /**< property name */\n                              ecma_property_t *name_type_p) /**< [out] property name type */\n{\n  if (ECMA_IS_DIRECT_STRING (prop_name_p))\n  {\n    *name_type_p = (ecma_property_t) ECMA_DIRECT_STRING_TYPE_TO_PROP_NAME_TYPE (prop_name_p);\n    return (jmem_cpointer_t) ECMA_GET_DIRECT_STRING_VALUE (prop_name_p);\n  }\n\n  *name_type_p = ECMA_DIRECT_STRING_PTR << ECMA_PROPERTY_NAME_TYPE_SHIFT;\n\n  ecma_ref_ecma_string (prop_name_p);\n\n  jmem_cpointer_t prop_name_cp;\n  ECMA_SET_NON_NULL_POINTER (prop_name_cp, prop_name_p);\n  return prop_name_cp;\n} /* ecma_string_to_property_name */\n\n/**\n * Converts a property name into a string\n *\n * @return the string pointer\n *         string must be released with ecma_deref_ecma_string\n */\necma_string_t *\necma_string_from_property_name (ecma_property_t property, /**< property name type */\n                                jmem_cpointer_t prop_name_cp) /**< property name compressed pointer */\n{\n  if (ECMA_PROPERTY_GET_NAME_TYPE (property) != ECMA_DIRECT_STRING_PTR)\n  {\n    return ecma_property_to_string (property, prop_name_cp);\n  }\n\n  ecma_string_t *prop_name_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, prop_name_cp);\n  ecma_ref_ecma_string (prop_name_p);\n  return prop_name_p;\n} /* ecma_string_from_property_name */\n\n/**\n * Get hash code of property name\n *\n * @return hash code of property name\n */\nextern inline lit_string_hash_t JERRY_ATTR_ALWAYS_INLINE\necma_string_get_property_name_hash (ecma_property_t property, /**< property name type */\n                                    jmem_cpointer_t prop_name_cp) /**< property name compressed pointer */\n{\n  if (ECMA_PROPERTY_GET_NAME_TYPE (property) == ECMA_DIRECT_STRING_PTR)\n  {\n    ecma_string_t *prop_name_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, prop_name_cp);\n    return prop_name_p->u.hash;\n  }\n\n  return (lit_string_hash_t) prop_name_cp;\n} /* ecma_string_get_property_name_hash */\n\n/**\n * Check if property name is array index.\n *\n * @return ECMA_STRING_NOT_ARRAY_INDEX if string is not array index\n *         the array index otherwise\n */\nuint32_t\necma_string_get_property_index (ecma_property_t property, /**< property name type */\n                                jmem_cpointer_t prop_name_cp) /**< property name compressed pointer */\n{\n  switch (ECMA_PROPERTY_GET_NAME_TYPE (property))\n  {\n    case ECMA_DIRECT_STRING_UINT:\n    {\n      return (uint32_t) prop_name_cp;\n    }\n    case ECMA_DIRECT_STRING_PTR:\n    {\n      ecma_string_t *prop_name_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, prop_name_cp);\n      return ecma_string_get_array_index (prop_name_p);\n    }\n    default:\n    {\n      return ECMA_STRING_NOT_ARRAY_INDEX;\n    }\n  }\n} /* ecma_string_get_property_index */\n\n/**\n * Compare a property name to a string\n *\n * @return true if they are equals\n *         false otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_string_compare_to_property_name (ecma_property_t property, /**< property name type */\n                                      jmem_cpointer_t prop_name_cp, /**< property name compressed pointer */\n                                      const ecma_string_t *string_p) /**< other string */\n{\n  if (ECMA_PROPERTY_GET_NAME_TYPE (property) != ECMA_DIRECT_STRING_PTR)\n  {\n    return ecma_property_to_string (property, prop_name_cp) == string_p;\n  }\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    return false;\n  }\n\n  ecma_string_t *prop_name_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, prop_name_cp);\n  return ecma_compare_ecma_non_direct_strings (prop_name_p, string_p);\n} /* ecma_string_compare_to_property_name */\n\n/**\n * Helper for ecma_compare_ecma_strings_longpath to get string data\n *\n * @return string characters\n */\nstatic const lit_utf8_byte_t *\necma_compare_get_string_chars (const ecma_string_t *string_p, /**< ecma-string */\n                               lit_utf8_size_t *size_and_length_p) /**< [out] size and length */\n{\n  switch (ECMA_STRING_GET_CONTAINER (string_p))\n  {\n    case ECMA_STRING_CONTAINER_HEAP_UTF8_STRING:\n    {\n      ecma_short_string_t *short_string_p = (ecma_short_string_t *) string_p;\n      size_and_length_p[0] = short_string_p->size;\n      size_and_length_p[1] = short_string_p->length;\n      return ECMA_SHORT_STRING_GET_BUFFER (string_p);\n    }\n    case ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING:\n    {\n      ecma_long_string_t *long_string_p = (ecma_long_string_t *) string_p;\n      size_and_length_p[0] = long_string_p->size;\n      size_and_length_p[1] = long_string_p->length;\n      return long_string_p->string_p;\n    }\n    case ECMA_STRING_CONTAINER_HEAP_ASCII_STRING:\n    {\n      size_and_length_p[0] = ECMA_ASCII_STRING_GET_SIZE (string_p);\n      size_and_length_p[1] = size_and_length_p[0];\n      return ECMA_ASCII_STRING_GET_BUFFER (string_p);\n    }\n    default:\n    {\n      return NULL;\n    }\n  }\n} /* ecma_compare_get_string_chars */\n\n/**\n * Long path part of ecma-string to ecma-string comparison routine\n *\n * See also:\n *          ecma_compare_ecma_strings\n *\n * @return true - if strings are equal;\n *         false - otherwise\n */\nstatic bool JERRY_ATTR_NOINLINE\necma_compare_ecma_strings_longpath (const ecma_string_t *string1_p, /**< ecma-string */\n                                    const ecma_string_t *string2_p) /**< ecma-string */\n{\n  const lit_utf8_byte_t *utf8_string1_p, *utf8_string2_p;\n  lit_utf8_size_t string1_size_and_length[2], string2_size_and_length[2];\n\n  utf8_string1_p = ecma_compare_get_string_chars (string1_p, string1_size_and_length);\n  utf8_string2_p = ecma_compare_get_string_chars (string2_p, string2_size_and_length);\n\n  if (utf8_string1_p == NULL || utf8_string2_p == NULL)\n  {\n    return false;\n  }\n\n  if (string1_size_and_length[0] != string2_size_and_length[0]\n      || string1_size_and_length[1] != string2_size_and_length[1])\n  {\n    return false;\n  }\n\n  return !memcmp ((char *) utf8_string1_p, (char *) utf8_string2_p, string1_size_and_length[0]);\n} /* ecma_compare_ecma_strings_longpath */\n\n/**\n * Compare two ecma-strings\n *\n * @return true - if strings are equal;\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_compare_ecma_strings (const ecma_string_t *string1_p, /**< ecma-string */\n                           const ecma_string_t *string2_p) /**< ecma-string */\n{\n  JERRY_ASSERT (string1_p != NULL && string2_p != NULL);\n\n  /* Fast paths first. */\n  if (string1_p == string2_p)\n  {\n    return true;\n  }\n\n  /* Either string is direct, return with false. */\n  if (ECMA_IS_DIRECT_STRING (((uintptr_t) string1_p) | ((uintptr_t) string2_p)))\n  {\n    return false;\n  }\n\n  /* Also compares uint32 values in descriptor. */\n  if (string1_p->u.hash != string2_p->u.hash)\n  {\n    return false;\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string1_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC)\n  {\n    return ECMA_STRING_GET_CONTAINER (string2_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC;\n  }\n\n  return ecma_compare_ecma_strings_longpath (string1_p, string2_p);\n} /* ecma_compare_ecma_strings */\n\n/**\n * Compare two non-direct ecma-strings\n *\n * @return true - if strings are equal;\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_compare_ecma_non_direct_strings (const ecma_string_t *string1_p, /**< ecma-string */\n                                      const ecma_string_t *string2_p) /**< ecma-string */\n{\n  JERRY_ASSERT (string1_p != NULL && string2_p != NULL);\n  JERRY_ASSERT (!ECMA_IS_DIRECT_STRING (string1_p) && !ECMA_IS_DIRECT_STRING (string2_p));\n\n  /* Fast paths first. */\n  if (string1_p == string2_p)\n  {\n    return true;\n  }\n\n  if (string1_p->u.hash != string2_p->u.hash)\n  {\n    return false;\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string1_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC)\n  {\n    return ECMA_STRING_GET_CONTAINER (string2_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC;\n  }\n\n  return ecma_compare_ecma_strings_longpath (string1_p, string2_p);\n} /* ecma_compare_ecma_non_direct_strings */\n\n/**\n * Relational compare of ecma-strings.\n *\n * First string is less than second string if:\n *  - strings are not equal;\n *  - first string is prefix of second or is lexicographically less than second.\n *\n * @return true - if first string is less than second string,\n *         false - otherwise\n */\nbool\necma_compare_ecma_strings_relational (const ecma_string_t *string1_p, /**< ecma-string */\n                                      const ecma_string_t *string2_p) /**< ecma-string */\n{\n  if (ecma_compare_ecma_strings (string1_p,\n                                 string2_p))\n  {\n    return false;\n  }\n\n  const lit_utf8_byte_t *utf8_string1_p, *utf8_string2_p;\n  lit_utf8_size_t utf8_string1_size, utf8_string2_size;\n\n  lit_utf8_byte_t uint32_to_string_buffer1[ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32];\n  lit_utf8_byte_t uint32_to_string_buffer2[ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32];\n\n  if (ECMA_IS_DIRECT_STRING (string1_p))\n  {\n    if (ECMA_GET_DIRECT_STRING_TYPE (string1_p) != ECMA_DIRECT_STRING_UINT)\n    {\n      utf8_string1_p = ecma_string_get_chars_fast (string1_p, &utf8_string1_size);\n    }\n    else\n    {\n      utf8_string1_size = ecma_uint32_to_utf8_string ((uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string1_p),\n                                                      uint32_to_string_buffer1,\n                                                      ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32);\n      utf8_string1_p = uint32_to_string_buffer1;\n    }\n  }\n  else\n  {\n    JERRY_ASSERT (string1_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n    if (ECMA_STRING_GET_CONTAINER (string1_p) != ECMA_STRING_CONTAINER_UINT32_IN_DESC)\n    {\n      utf8_string1_p = ecma_string_get_chars_fast (string1_p, &utf8_string1_size);\n    }\n    else\n    {\n      utf8_string1_size = ecma_uint32_to_utf8_string (string1_p->u.uint32_number,\n                                                      uint32_to_string_buffer1,\n                                                      ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32);\n      utf8_string1_p = uint32_to_string_buffer1;\n    }\n  }\n\n  if (ECMA_IS_DIRECT_STRING (string2_p))\n  {\n    if (ECMA_GET_DIRECT_STRING_TYPE (string2_p) != ECMA_DIRECT_STRING_UINT)\n    {\n      utf8_string2_p = ecma_string_get_chars_fast (string2_p, &utf8_string2_size);\n    }\n    else\n    {\n      utf8_string2_size = ecma_uint32_to_utf8_string ((uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string2_p),\n                                                      uint32_to_string_buffer2,\n                                                      ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32);\n      utf8_string2_p = uint32_to_string_buffer2;\n    }\n  }\n  else\n  {\n    JERRY_ASSERT (string2_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n    if (ECMA_STRING_GET_CONTAINER (string2_p) != ECMA_STRING_CONTAINER_UINT32_IN_DESC)\n    {\n      utf8_string2_p = ecma_string_get_chars_fast (string2_p, &utf8_string2_size);\n    }\n    else\n    {\n      utf8_string2_size = ecma_uint32_to_utf8_string (string2_p->u.uint32_number,\n                                                      uint32_to_string_buffer2,\n                                                      ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32);\n      utf8_string2_p = uint32_to_string_buffer2;\n    }\n  }\n\n  return lit_compare_utf8_strings_relational (utf8_string1_p,\n                                              utf8_string1_size,\n                                              utf8_string2_p,\n                                              utf8_string2_size);\n} /* ecma_compare_ecma_strings_relational */\n\n/**\n * Special value to represent that no size is available.\n */\n#define ECMA_STRING_NO_ASCII_SIZE 0xffffffff\n\n/**\n * Return the size of uint32 and magic strings.\n * The length of these strings are equal to their size.\n *\n * @return number of characters in the string\n */\nstatic lit_utf8_size_t\necma_string_get_ascii_size (const ecma_string_t *string_p) /**< ecma-string */\n{\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    switch (ECMA_GET_DIRECT_STRING_TYPE (string_p))\n    {\n      case ECMA_DIRECT_STRING_MAGIC:\n      {\n        uint32_t id = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n\n        if (id >= LIT_MAGIC_STRING__COUNT)\n        {\n          return ECMA_STRING_NO_ASCII_SIZE;\n        }\n\n        JERRY_ASSERT (ECMA_STRING_IS_ASCII (lit_get_magic_string_utf8 (id),\n                                            lit_get_magic_string_size (id)));\n\n        return lit_get_magic_string_size (id);\n      }\n      default:\n      {\n        JERRY_ASSERT (ECMA_GET_DIRECT_STRING_TYPE (string_p) == ECMA_DIRECT_STRING_UINT);\n        uint32_t uint32_number = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n        return ecma_string_get_uint32_size (uint32_number);\n      }\n    }\n  }\n\n  JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n  if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC)\n  {\n    return ecma_string_get_uint32_size (string_p->u.uint32_number);\n  }\n  else if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_HEAP_ASCII_STRING)\n  {\n    return ECMA_ASCII_STRING_GET_SIZE (string_p);\n  }\n\n  return ECMA_STRING_NO_ASCII_SIZE;\n} /* ecma_string_get_ascii_size */\n\n/**\n * Get length of ecma-string\n *\n * @return number of characters in the string\n */\nlit_utf8_size_t\necma_string_get_length (const ecma_string_t *string_p) /**< ecma-string */\n{\n  lit_utf8_size_t length = ecma_string_get_ascii_size (string_p);\n\n  if (length != ECMA_STRING_NO_ASCII_SIZE)\n  {\n    return length;\n  }\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    JERRY_ASSERT (ECMA_GET_DIRECT_STRING_TYPE (string_p) == ECMA_DIRECT_STRING_MAGIC);\n    JERRY_ASSERT ((uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p) >= LIT_MAGIC_STRING__COUNT);\n\n    uint32_t id = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p) - LIT_MAGIC_STRING__COUNT;\n    return lit_utf8_string_length (lit_get_magic_string_ex_utf8 (id),\n                                   lit_get_magic_string_ex_size (id));\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_HEAP_UTF8_STRING)\n  {\n    return ((ecma_short_string_t *) string_p)->length;\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING)\n  {\n    return ((ecma_long_string_t *) string_p)->length;\n  }\n\n  JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_MAGIC_STRING_EX);\n\n  lit_magic_string_ex_id_t id = LIT_MAGIC_STRING__COUNT - string_p->u.magic_string_ex_id;\n  return lit_utf8_string_length (lit_get_magic_string_ex_utf8 (id),\n                                 lit_get_magic_string_ex_size (id));\n} /* ecma_string_get_length */\n\n/**\n * Get length of UTF-8 encoded string length from ecma-string\n *\n * @return number of characters in the UTF-8 encoded string\n */\nlit_utf8_size_t\necma_string_get_utf8_length (const ecma_string_t *string_p) /**< ecma-string */\n{\n  lit_utf8_size_t length = ecma_string_get_ascii_size (string_p);\n\n  if (length != ECMA_STRING_NO_ASCII_SIZE)\n  {\n    return length;\n  }\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    JERRY_ASSERT (ECMA_GET_DIRECT_STRING_TYPE (string_p) == ECMA_DIRECT_STRING_MAGIC);\n    JERRY_ASSERT ((uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p) >= LIT_MAGIC_STRING__COUNT);\n\n    uint32_t id = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p) - LIT_MAGIC_STRING__COUNT;\n    return lit_get_utf8_length_of_cesu8_string (lit_get_magic_string_ex_utf8 (id),\n                                                lit_get_magic_string_ex_size (id));\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_HEAP_UTF8_STRING)\n  {\n    ecma_short_string_t *short_string_p = (ecma_short_string_t *) string_p;\n    lit_utf8_size_t size = short_string_p->size;\n\n    if (size == short_string_p->length)\n    {\n      return size;\n    }\n\n    return lit_get_utf8_length_of_cesu8_string (ECMA_SHORT_STRING_GET_BUFFER (string_p), size);\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING)\n  {\n    ecma_long_string_t *long_string_p = (ecma_long_string_t *) string_p;\n    lit_utf8_size_t size = long_string_p->size;\n\n    if (size == long_string_p->length)\n    {\n      return size;\n    }\n\n    return lit_get_utf8_length_of_cesu8_string (long_string_p->string_p, size);\n  }\n\n  JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_MAGIC_STRING_EX);\n\n  lit_magic_string_ex_id_t id = LIT_MAGIC_STRING__COUNT - string_p->u.magic_string_ex_id;\n\n  return lit_get_utf8_length_of_cesu8_string (lit_get_magic_string_ex_utf8 (id),\n                                              lit_get_magic_string_ex_size (id));\n} /* ecma_string_get_utf8_length */\n\n/**\n * Get size of ecma-string\n *\n * @return number of bytes in the buffer needed to represent the string\n */\nlit_utf8_size_t\necma_string_get_size (const ecma_string_t *string_p) /**< ecma-string */\n{\n  lit_utf8_size_t length = ecma_string_get_ascii_size (string_p);\n\n  if (length != ECMA_STRING_NO_ASCII_SIZE)\n  {\n    return length;\n  }\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    JERRY_ASSERT (ECMA_GET_DIRECT_STRING_TYPE (string_p) == ECMA_DIRECT_STRING_MAGIC);\n    JERRY_ASSERT ((uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p) >= LIT_MAGIC_STRING__COUNT);\n\n    return lit_get_magic_string_ex_size ((uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p) - LIT_MAGIC_STRING__COUNT);\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_HEAP_UTF8_STRING)\n  {\n    return ((ecma_short_string_t *) string_p)->size;\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING)\n  {\n    return ((ecma_long_string_t *) string_p)->size;\n  }\n\n  JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_MAGIC_STRING_EX);\n\n  return lit_get_magic_string_ex_size (LIT_MAGIC_STRING__COUNT - string_p->u.magic_string_ex_id);\n} /* ecma_string_get_size */\n\n/**\n * Get the UTF-8 encoded string size from ecma-string\n *\n * @return number of bytes in the buffer needed to represent an UTF-8 encoded string\n */\nlit_utf8_size_t\necma_string_get_utf8_size (const ecma_string_t *string_p) /**< ecma-string */\n{\n  lit_utf8_size_t length = ecma_string_get_ascii_size (string_p);\n\n  if (length != ECMA_STRING_NO_ASCII_SIZE)\n  {\n    return length;\n  }\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    JERRY_ASSERT (ECMA_GET_DIRECT_STRING_TYPE (string_p) == ECMA_DIRECT_STRING_MAGIC);\n    JERRY_ASSERT ((uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p) >= LIT_MAGIC_STRING__COUNT);\n\n    uint32_t id = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p) - LIT_MAGIC_STRING__COUNT;\n    return lit_get_utf8_size_of_cesu8_string (lit_get_magic_string_ex_utf8 (id),\n                                              lit_get_magic_string_ex_size (id));\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_HEAP_UTF8_STRING)\n  {\n    ecma_short_string_t *short_string_p = (ecma_short_string_t *) string_p;\n    lit_utf8_size_t size = short_string_p->size;\n\n    if (size == short_string_p->length)\n    {\n      return size;\n    }\n\n    return lit_get_utf8_size_of_cesu8_string (ECMA_SHORT_STRING_GET_BUFFER (string_p), size);\n  }\n\n  if (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING)\n  {\n    ecma_long_string_t *long_string_p = (ecma_long_string_t *) string_p;\n\n    if (long_string_p->size == long_string_p->length)\n    {\n      return long_string_p->size;\n    }\n\n    return lit_get_utf8_size_of_cesu8_string (long_string_p->string_p, long_string_p->size);\n  }\n\n  JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_MAGIC_STRING_EX);\n\n  lit_magic_string_ex_id_t id = LIT_MAGIC_STRING__COUNT - string_p->u.magic_string_ex_id;\n  return lit_get_utf8_size_of_cesu8_string (lit_get_magic_string_ex_utf8 (id),\n                                            lit_get_magic_string_ex_size (id));\n} /* ecma_string_get_utf8_size */\n\n/**\n * Get character from specified position in an external ecma-string.\n *\n * @return character value\n */\nstatic ecma_char_t JERRY_ATTR_NOINLINE\necma_external_string_get_char_at_pos (lit_utf8_size_t id, /**< id of the external magic string */\n                                      lit_utf8_size_t index) /**< index of character */\n{\n  id -= LIT_MAGIC_STRING__COUNT;\n  const lit_utf8_byte_t *data_p = lit_get_magic_string_ex_utf8 (id);\n  lit_utf8_size_t size = lit_get_magic_string_ex_size (id);\n  lit_utf8_size_t length = lit_utf8_string_length (data_p, size);\n\n  if (JERRY_LIKELY (size == length))\n  {\n    return (ecma_char_t) data_p[index];\n  }\n\n  return lit_utf8_string_code_unit_at (data_p, size, index);\n} /* ecma_external_string_get_char_at_pos */\n\n/**\n * Get character from specified position in the ecma-string.\n *\n * @return character value\n */\necma_char_t\necma_string_get_char_at_pos (const ecma_string_t *string_p, /**< ecma-string */\n                             lit_utf8_size_t index) /**< index of character */\n{\n  JERRY_ASSERT (index < ecma_string_get_length (string_p));\n\n  lit_utf8_byte_t uint32_to_string_buffer[ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32];\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    switch (ECMA_GET_DIRECT_STRING_TYPE (string_p))\n    {\n      case ECMA_DIRECT_STRING_MAGIC:\n      {\n        uint32_t id = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n\n        if (JERRY_LIKELY (id < LIT_MAGIC_STRING__COUNT))\n        {\n          /* All magic strings must be ascii strings. */\n          const lit_utf8_byte_t *data_p = lit_get_magic_string_utf8 (id);\n\n          return (ecma_char_t) data_p[index];\n        }\n\n        return ecma_external_string_get_char_at_pos (id, index);\n      }\n      default:\n      {\n        JERRY_ASSERT (ECMA_GET_DIRECT_STRING_TYPE (string_p) == ECMA_DIRECT_STRING_UINT);\n        uint32_t uint32_number = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n\n        ecma_uint32_to_utf8_string (uint32_number, uint32_to_string_buffer, ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32);\n\n        return (ecma_char_t) uint32_to_string_buffer[index];\n      }\n    }\n  }\n\n  JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE);\n\n  switch (ECMA_STRING_GET_CONTAINER (string_p))\n  {\n    case ECMA_STRING_CONTAINER_HEAP_UTF8_STRING:\n    {\n      ecma_short_string_t *short_string_p = (ecma_short_string_t *) string_p;\n      lit_utf8_size_t size = short_string_p->size;\n      const lit_utf8_byte_t *data_p = ECMA_SHORT_STRING_GET_BUFFER (string_p);\n\n      if (JERRY_LIKELY (size == short_string_p->length))\n      {\n        return (ecma_char_t) data_p[index];\n      }\n\n      return lit_utf8_string_code_unit_at (data_p, size, index);\n    }\n    case ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING:\n    {\n      ecma_long_string_t *long_string_p = (ecma_long_string_t *) string_p;\n      lit_utf8_size_t size = long_string_p->size;\n      const lit_utf8_byte_t *data_p = long_string_p->string_p;\n\n      if (JERRY_LIKELY (size == long_string_p->length))\n      {\n        return (ecma_char_t) data_p[index];\n      }\n\n      return lit_utf8_string_code_unit_at (data_p, size, index);\n    }\n    case ECMA_STRING_CONTAINER_HEAP_ASCII_STRING:\n    {\n      const lit_utf8_byte_t *data_p = ECMA_ASCII_STRING_GET_BUFFER (string_p);\n      return (ecma_char_t) data_p[index];\n    }\n    case ECMA_STRING_CONTAINER_UINT32_IN_DESC:\n    {\n      ecma_uint32_to_utf8_string (string_p->u.uint32_number,\n                                  uint32_to_string_buffer,\n                                  ECMA_MAX_CHARS_IN_STRINGIFIED_UINT32);\n\n      return (ecma_char_t) uint32_to_string_buffer[index];\n    }\n    default:\n    {\n      JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_MAGIC_STRING_EX);\n      return ecma_external_string_get_char_at_pos (string_p->u.magic_string_ex_id, index);\n    }\n  }\n} /* ecma_string_get_char_at_pos */\n\n/**\n * Check if passed string equals to one of magic strings\n * and if equal magic string was found, return it's id in 'out_id_p' argument.\n *\n * @return id - if magic string equal to passed string was found,\n *         LIT_MAGIC_STRING__COUNT - otherwise.\n */\nlit_magic_string_id_t\necma_get_string_magic (const ecma_string_t *string_p) /**< ecma-string */\n{\n  if (ECMA_IS_DIRECT_STRING_WITH_TYPE (string_p, ECMA_DIRECT_STRING_MAGIC))\n  {\n    uint32_t id = (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n\n    if (id < LIT_MAGIC_STRING__COUNT)\n    {\n      return (lit_magic_string_id_t) id;\n    }\n  }\n\n  return LIT_MAGIC_STRING__COUNT;\n} /* ecma_get_string_magic */\n\n/**\n * Try to calculate hash of the ecma-string\n *\n * @return calculated hash\n */\nextern inline lit_string_hash_t JERRY_ATTR_ALWAYS_INLINE\necma_string_hash (const ecma_string_t *string_p) /**< ecma-string to calculate hash for */\n{\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    return (lit_string_hash_t) ECMA_GET_DIRECT_STRING_VALUE (string_p);\n  }\n\n  return (lit_string_hash_t) string_p->u.hash;\n} /* ecma_string_hash */\n\n/**\n * Create a substring from an ecma string\n *\n * @return a newly consturcted ecma string with its value initialized to a copy of a substring of the first argument\n */\necma_string_t *\necma_string_substr (const ecma_string_t *string_p, /**< pointer to an ecma string */\n                    lit_utf8_size_t start_pos, /**< start position, should be less or equal than string length */\n                    lit_utf8_size_t end_pos) /**< end position, should be less or equal than string length */\n{\n  const lit_utf8_size_t string_length = ecma_string_get_length (string_p);\n  JERRY_ASSERT (start_pos <= string_length);\n  JERRY_ASSERT (end_pos <= string_length);\n\n  if (start_pos >= end_pos)\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ecma_string_t *ecma_string_p = NULL;\n  end_pos -= start_pos;\n\n  ECMA_STRING_TO_UTF8_STRING (string_p, start_p, buffer_size);\n\n  if (string_length == buffer_size)\n  {\n    ecma_string_p = ecma_new_ecma_string_from_utf8 (start_p + start_pos,\n                                                    (lit_utf8_size_t) end_pos);\n  }\n  else\n  {\n    while (start_pos--)\n    {\n      start_p += lit_get_unicode_char_size_by_utf8_first_byte (*start_p);\n    }\n\n    const lit_utf8_byte_t *end_p = start_p;\n    while (end_pos--)\n    {\n      end_p += lit_get_unicode_char_size_by_utf8_first_byte (*end_p);\n    }\n\n    ecma_string_p = ecma_new_ecma_string_from_utf8 (start_p, (lit_utf8_size_t) (end_p - start_p));\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (start_p, buffer_size);\n\n  return ecma_string_p;\n} /* ecma_string_substr */\n\n/**\n * Helper function for trimming.\n *\n * Used by:\n *        - ecma_string_trim_helper\n *        - ecma_builtin_global_object_parse_int\n *        - ecma_builtin_global_object_parse_float\n *\n * @return position of the first non whitespace character.\n */\nconst lit_utf8_byte_t *\necma_string_trim_front (const lit_utf8_byte_t *start_p, /**< current string's start position */\n                        const lit_utf8_byte_t *end_p)  /**< current string's end position */\n{\n  ecma_char_t ch;\n\n  while (start_p < end_p)\n  {\n    lit_utf8_size_t read_size = lit_read_code_unit_from_utf8 (start_p, &ch);\n\n    if (!lit_char_is_white_space (ch))\n    {\n      break;\n    }\n\n    start_p += read_size;\n  }\n\n  return start_p;\n} /* ecma_string_trim_front */\n\n/**\n * Helper function for trimming.\n *\n * Used by:\n *        - ecma_string_trim_helper\n *\n * @return position of the last non whitespace character.\n */\nconst lit_utf8_byte_t *\necma_string_trim_back (const lit_utf8_byte_t *start_p, /**< current string's start position */\n                       const lit_utf8_byte_t *end_p)  /**< current string's end position */\n{\n  ecma_char_t ch;\n\n  while (end_p > start_p)\n  {\n    lit_utf8_size_t read_size = lit_read_prev_code_unit_from_utf8 (end_p, &ch);\n\n    if (!lit_char_is_white_space (ch))\n    {\n      break;\n    }\n\n    end_p -= read_size;\n  }\n\n  return end_p;\n} /* ecma_string_trim_back */\n\n/**\n * Helper function for trimming.\n *\n * Used by:\n *        - ecma_string_trim\n *        - ecma_utf8_string_to_number\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p, /**< [in, out] current string position */\n                         lit_utf8_size_t *utf8_str_size)  /**< [in, out] size of the given string */\n{\n  const lit_utf8_byte_t *end_p = *utf8_str_p + *utf8_str_size;\n  const lit_utf8_byte_t *start_p = *utf8_str_p;\n\n  const lit_utf8_byte_t *new_start_p = ecma_string_trim_front (start_p, end_p);\n  const lit_utf8_byte_t *new_end_p = ecma_string_trim_back (new_start_p, end_p);\n\n  *utf8_str_size = (lit_utf8_size_t) (new_end_p - new_start_p);\n  *utf8_str_p = new_start_p;\n} /* ecma_string_trim_helper */\n\n/**\n * Trim leading and trailing whitespace characters from string.\n *\n * @return trimmed ecma string\n */\necma_string_t *\necma_string_trim (const ecma_string_t *string_p) /**< pointer to an ecma string */\n{\n  ecma_string_t *ret_string_p;\n\n  lit_utf8_size_t utf8_str_size;\n  uint8_t flags = ECMA_STRING_FLAG_IS_ASCII;\n  const lit_utf8_byte_t *utf8_str_p = ecma_string_get_chars (string_p, &utf8_str_size, NULL, NULL, &flags);\n\n  if (utf8_str_size > 0)\n  {\n    ecma_string_trim_helper (&utf8_str_p, &utf8_str_size);\n    ret_string_p = ecma_new_ecma_string_from_utf8 (utf8_str_p, utf8_str_size);\n  }\n  else\n  {\n    ret_string_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  if (flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) utf8_str_p, utf8_str_size);\n  }\n\n  return ret_string_p;\n} /* ecma_string_trim */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Pad the beginning or the end of string with parameter given in fill_string to the length of max_length.\n *\n * @return new string from original, padded with given parameters\n */\necma_value_t\necma_string_pad (ecma_value_t original_string_p, /**< Input ecma string */\n                 ecma_value_t max_length, /**< Length to pad to, including original length */\n                 ecma_value_t fill_string,  /**< The string to pad with */\n                 bool pad_on_start) /**< true - if we are padding to the start, calling with padStart\n                                         false - if we are padding to the end, calling with padEnd */\n{\n\n  /* 3 */\n  ecma_length_t int_max_length;\n  if (ECMA_IS_VALUE_ERROR (ecma_op_to_length (max_length, &int_max_length)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n  /* 4 */\n  ecma_string_t *original_str_val_p = ecma_get_string_from_value (original_string_p);\n  const uint32_t string_length = ecma_string_get_length (original_str_val_p);\n  /* 5 */\n  if (int_max_length <= string_length)\n  {\n    ecma_ref_ecma_string (original_str_val_p);\n    return original_string_p;\n  }\n\n  ecma_string_t *filler_p = ecma_get_magic_string (LIT_MAGIC_STRING_SPACE_CHAR);\n  /* 6 - 7 */\n  if (!ecma_is_value_undefined (fill_string))\n  {\n    filler_p = ecma_op_to_string (fill_string);\n    if (filler_p == NULL)\n    {\n      return ECMA_VALUE_ERROR;\n    }\n    if (ecma_string_is_empty (filler_p))\n    {\n      ecma_ref_ecma_string (original_str_val_p);\n      return original_string_p;\n    }\n  }\n\n  if (int_max_length >= UINT32_MAX)\n  {\n    ecma_deref_ecma_string (filler_p);\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Maximum string length is reached.\"));\n  }\n\n  /* 9 */\n  uint32_t fill_len = (uint32_t) int_max_length - string_length;\n\n  /* 10 */\n  uint32_t filler_length = ecma_string_get_length (filler_p);\n  uint32_t prepend_count = fill_len / filler_length;\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  if (!pad_on_start)\n  {\n    ecma_stringbuilder_append (&builder, original_str_val_p);\n  }\n\n  for (uint32_t i = 0; i < prepend_count; i++)\n  {\n    ecma_stringbuilder_append (&builder, filler_p);\n  }\n\n  lit_utf8_size_t read_size;\n  ecma_char_t ch;\n\n  uint32_t remaining = fill_len - (prepend_count * filler_length);\n\n  ECMA_STRING_TO_UTF8_STRING (filler_p, start_p, utf8_str_size);\n  const lit_utf8_byte_t *temp_start_p = start_p;\n  while (remaining > 0)\n  {\n    read_size = lit_read_code_unit_from_utf8 (temp_start_p, &ch);\n    ecma_stringbuilder_append_char (&builder, ch);\n    temp_start_p += read_size;\n    remaining--;\n  }\n  ECMA_FINALIZE_UTF8_STRING (start_p, utf8_str_size);\n  ecma_deref_ecma_string (filler_p);\n\n  /* 11 - 12 */\n  if (pad_on_start)\n  {\n    ecma_stringbuilder_append (&builder, original_str_val_p);\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_string_pad */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Create an empty string builder\n *\n * @return new string builder\n */\necma_stringbuilder_t\necma_stringbuilder_create (void)\n{\n  const lit_utf8_size_t initial_size = ECMA_ASCII_STRING_HEADER_SIZE;\n  ecma_stringbuilder_header_t *header_p = (ecma_stringbuilder_header_t *) jmem_heap_alloc_block (initial_size);\n  header_p->current_size = initial_size;\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_string_bytes (initial_size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  ecma_stringbuilder_t ret = {.header_p = header_p};\n  return ret;\n} /* ecma_stringbuilder_create */\n\n/**\n * Create a string builder from an ecma string\n *\n * @return new string builder\n */\necma_stringbuilder_t\necma_stringbuilder_create_from (ecma_string_t *string_p) /**< ecma string */\n{\n  const lit_utf8_size_t string_size = ecma_string_get_size (string_p);\n  const lit_utf8_size_t initial_size = string_size + ECMA_ASCII_STRING_HEADER_SIZE;\n\n  ecma_stringbuilder_header_t *header_p = (ecma_stringbuilder_header_t *) jmem_heap_alloc_block (initial_size);\n  header_p->current_size = initial_size;\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_string_bytes (initial_size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  size_t copied_size = ecma_string_copy_to_cesu8_buffer (string_p,\n                                                         ECMA_STRINGBUILDER_STRING_PTR (header_p),\n                                                         string_size);\n  JERRY_ASSERT (copied_size == string_size);\n\n  ecma_stringbuilder_t ret = {.header_p = header_p};\n  return ret;\n} /* ecma_stringbuilder_create_from */\n\n/**\n * Create a string builder from a raw string\n *\n * @return new string builder\n */\necma_stringbuilder_t\necma_stringbuilder_create_raw (const lit_utf8_byte_t *data_p, /**< pointer to data */\n                               const lit_utf8_size_t data_size) /**< size of the data */\n{\n  const lit_utf8_size_t initial_size = data_size + ECMA_ASCII_STRING_HEADER_SIZE;\n\n  ecma_stringbuilder_header_t *header_p = (ecma_stringbuilder_header_t *) jmem_heap_alloc_block (initial_size);\n  header_p->current_size = initial_size;\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_string_bytes (initial_size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  memcpy (ECMA_STRINGBUILDER_STRING_PTR (header_p), data_p, data_size);\n\n  ecma_stringbuilder_t ret = {.header_p = header_p};\n  return ret;\n} /* ecma_stringbuilder_create_raw */\n\n/**\n * Grow the underlying buffer of a string builder\n *\n * @return pointer to the end of the data in the underlying buffer\n */\nstatic lit_utf8_byte_t *\necma_stringbuilder_grow (ecma_stringbuilder_t *builder_p, /**< string builder */\n                         lit_utf8_size_t required_size) /**< required size */\n{\n  ecma_stringbuilder_header_t *header_p = builder_p->header_p;\n  JERRY_ASSERT (header_p != NULL);\n\n  const lit_utf8_size_t new_size = header_p->current_size + required_size;\n  header_p = jmem_heap_realloc_block (header_p, header_p->current_size, new_size);\n  header_p->current_size = new_size;\n  builder_p->header_p = header_p;\n\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_string_bytes (required_size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  return ((lit_utf8_byte_t *)  header_p) + header_p->current_size - required_size;\n} /* ecma_stringbuilder_grow */\n\n/**\n * Get the current size of the string in a string builder\n *\n * @return the size of the string data\n */\nlit_utf8_size_t\necma_stringbuilder_get_size (ecma_stringbuilder_t *builder_p) /**< string builder */\n{\n  ecma_stringbuilder_header_t *header_p = builder_p->header_p;\n  JERRY_ASSERT (header_p != NULL);\n\n  return ECMA_STRINGBUILDER_STRING_SIZE (header_p);\n} /* ecma_stringbuilder_get_size */\n\n/**\n * Get pointer to the raw string data in a string builder\n *\n * @return pointer to the string data\n */\nlit_utf8_byte_t *\necma_stringbuilder_get_data (ecma_stringbuilder_t *builder_p) /**< string builder */\n{\n  ecma_stringbuilder_header_t *header_p = builder_p->header_p;\n  JERRY_ASSERT (header_p != NULL);\n\n  return ECMA_STRINGBUILDER_STRING_PTR (header_p);\n} /* ecma_stringbuilder_get_data */\n\n/**\n * Revert the string builder to a smaller size\n */\nvoid\necma_stringbuilder_revert (ecma_stringbuilder_t *builder_p, /**< string builder */\n                           const lit_utf8_size_t size) /**< new size */\n{\n  ecma_stringbuilder_header_t *header_p = builder_p->header_p;\n  JERRY_ASSERT (header_p != NULL);\n\n  const lit_utf8_size_t new_size = size + ECMA_ASCII_STRING_HEADER_SIZE;\n  JERRY_ASSERT (new_size <= header_p->current_size);\n\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_free_string_bytes (header_p->current_size - new_size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  header_p = jmem_heap_realloc_block (header_p, header_p->current_size, new_size);\n  header_p->current_size = new_size;\n  builder_p->header_p = header_p;\n} /* ecma_stringbuilder_revert */\n\n/**\n * Append an ecma_string_t to a string builder\n */\nvoid\necma_stringbuilder_append (ecma_stringbuilder_t *builder_p, /**< string builder */\n                           const ecma_string_t *string_p) /**< ecma string */\n{\n  const lit_utf8_size_t string_size = ecma_string_get_size (string_p);\n  lit_utf8_byte_t *dest_p = ecma_stringbuilder_grow (builder_p, string_size);\n\n  size_t copied_size = ecma_string_copy_to_cesu8_buffer (string_p,\n                                                         dest_p,\n                                                         string_size);\n  JERRY_ASSERT (copied_size == string_size);\n} /* ecma_stringbuilder_append */\n\n/**\n * Append a magic string to a string builder\n */\nvoid\necma_stringbuilder_append_magic (ecma_stringbuilder_t *builder_p, /**< string builder */\n                                 const lit_magic_string_id_t id) /**< magic string id */\n{\n  const lit_utf8_size_t string_size = lit_get_magic_string_size (id);\n  lit_utf8_byte_t *dest_p = ecma_stringbuilder_grow (builder_p, string_size);\n\n  const lit_utf8_byte_t *string_data_p = lit_get_magic_string_utf8 (id);\n  memcpy (dest_p, string_data_p, string_size);\n} /* ecma_stringbuilder_append_magic */\n\n/**\n * Append raw string data to a string builder\n */\nvoid\necma_stringbuilder_append_raw (ecma_stringbuilder_t *builder_p, /**< string builder */\n                               const lit_utf8_byte_t *data_p, /**< pointer to data */\n                               const lit_utf8_size_t data_size) /**< size of the data */\n{\n  lit_utf8_byte_t *dest_p = ecma_stringbuilder_grow (builder_p, data_size);\n  memcpy (dest_p, data_p, data_size);\n} /* ecma_stringbuilder_append_raw */\n\n/**\n * Append a codepoint to a string builder\n */\nvoid\necma_stringbuilder_append_codepoint (ecma_stringbuilder_t *builder_p, /**< string builder */\n                                     lit_code_point_t cp) /**< code point */\n{\n  const lit_utf8_size_t size = (lit_utf8_size_t) lit_code_point_get_cesu8_length (cp);\n  lit_utf8_byte_t *dest_p = ecma_stringbuilder_grow (builder_p, size);\n\n  lit_code_point_to_cesu8_bytes (dest_p, cp);\n} /* ecma_stringbuilder_append_codepoint */\n\n/**\n * Append an ecma_char_t to a string builder\n */\nvoid\necma_stringbuilder_append_char (ecma_stringbuilder_t *builder_p, /**< string builder */\n                                const ecma_char_t c) /**< ecma char */\n{\n  ecma_stringbuilder_append_codepoint (builder_p, c);\n} /* ecma_stringbuilder_append_char */\n\n/**\n * Append a single byte to a string builder\n */\nvoid\necma_stringbuilder_append_byte (ecma_stringbuilder_t *builder_p, /**< string builder */\n                                const lit_utf8_byte_t byte) /**< byte */\n{\n  lit_utf8_byte_t *dest_p = ecma_stringbuilder_grow (builder_p, 1);\n  *dest_p = byte;\n} /* ecma_stringbuilder_append_byte */\n\n/**\n * Finalize a string builder, returning the created string, and releasing the underlying buffer.\n *\n * Note:\n *      The builder should no longer be used.\n *\n * @return the created string\n */\necma_string_t *\necma_stringbuilder_finalize (ecma_stringbuilder_t *builder_p) /**< string builder */\n{\n  ecma_stringbuilder_header_t *header_p = builder_p->header_p;\n  JERRY_ASSERT (header_p != NULL);\n\n  const lit_utf8_size_t string_size = ECMA_STRINGBUILDER_STRING_SIZE (header_p);\n  lit_utf8_byte_t *string_begin_p = ECMA_STRINGBUILDER_STRING_PTR (header_p);\n\n  ecma_string_t *string_p = ecma_find_special_string (string_begin_p, string_size);\n\n  if (JERRY_UNLIKELY (string_p != NULL))\n  {\n    ecma_stringbuilder_destroy (builder_p);\n    return string_p;\n  }\n\n#ifndef JERRY_NDEBUG\n  builder_p->header_p = NULL;\n#endif\n\n  size_t container_size = sizeof (ecma_short_string_t);\n  const lit_string_hash_t hash = lit_utf8_string_calc_hash (string_begin_p, string_size);\n  const lit_utf8_size_t length = lit_utf8_string_length (string_begin_p, string_size);\n\n  if (JERRY_LIKELY (string_size <= UINT16_MAX))\n  {\n    if (JERRY_LIKELY (length == string_size) && string_size <= (UINT8_MAX + 1))\n    {\n      string_p = (ecma_string_t *) header_p;\n      string_p->refs_and_container = ECMA_STRING_CONTAINER_HEAP_ASCII_STRING | ECMA_STRING_REF_ONE;\n      string_p->u.hash = hash;\n      ECMA_ASCII_STRING_SET_SIZE (string_p, string_size);\n\n      return (ecma_string_t *) string_p;\n    }\n  }\n  else\n  {\n    container_size = sizeof (ecma_long_string_t);\n  }\n\n  const size_t utf8_string_size = string_size + container_size;\n  header_p = jmem_heap_realloc_block (header_p, header_p->current_size, utf8_string_size);\n  memmove (((lit_utf8_byte_t *) header_p + container_size),\n           ECMA_STRINGBUILDER_STRING_PTR (header_p),\n           string_size);\n\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_string_bytes (container_size - ECMA_ASCII_STRING_HEADER_SIZE);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  if (JERRY_LIKELY (string_size <= UINT16_MAX))\n  {\n    ecma_short_string_t *short_string_p = (ecma_short_string_t *) header_p;\n\n    short_string_p->header.refs_and_container = ECMA_STRING_CONTAINER_HEAP_UTF8_STRING | ECMA_STRING_REF_ONE;\n    short_string_p->header.u.hash = hash;\n    short_string_p->size = (uint16_t) string_size;\n    short_string_p->length = (uint16_t) length;\n\n    return (ecma_string_t *) short_string_p;\n  }\n\n  ecma_long_string_t *long_string_p = (ecma_long_string_t *) header_p;\n\n  long_string_p->header.refs_and_container = ECMA_STRING_CONTAINER_LONG_OR_EXTERNAL_STRING | ECMA_STRING_REF_ONE;\n  long_string_p->header.u.hash = hash;\n  long_string_p->string_p = ECMA_LONG_STRING_BUFFER_START (long_string_p);\n  long_string_p->size = string_size;\n  long_string_p->length = length;\n\n  return (ecma_string_t *) long_string_p;\n} /* ecma_stringbuilder_finalize */\n\n/**\n * Destroy a string builder that is no longer needed without creating a string from the contents.\n */\nvoid\necma_stringbuilder_destroy (ecma_stringbuilder_t *builder_p) /**< string builder */\n{\n  JERRY_ASSERT (builder_p->header_p != NULL);\n  const lit_utf8_size_t size = builder_p->header_p->current_size;\n  jmem_heap_free_block (builder_p->header_p, size);\n\n#ifndef JERRY_NDEBUG\n  builder_p->header_p = NULL;\n#endif\n\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_free_string_bytes (size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n} /* ecma_stringbuilder_destroy */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * AdvanceStringIndex operation\n *\n * See also:\n *          ECMA-262 v6.0, 21.2.5.2.3\n *\n * @return uint32_t - the proper character index based on the operation\n */\necma_length_t\necma_op_advance_string_index (ecma_string_t *str_p, /**< input string */\n                              ecma_length_t index, /**< given character index */\n                              bool is_unicode) /**< true - if regexp object's \"unicode\" flag is set\n                                                    false - otherwise */\n{\n  JERRY_ASSERT ((ecma_number_t) index <= ECMA_NUMBER_MAX_SAFE_INTEGER);\n  ecma_length_t next_index = index + 1;\n\n  if (!is_unicode)\n  {\n    return next_index;\n  }\n\n  lit_utf8_size_t str_len = ecma_string_get_length (str_p);\n\n  if (next_index >= str_len)\n  {\n    return next_index;\n  }\n\n  JERRY_ASSERT (index < UINT32_MAX);\n  ecma_char_t first = ecma_string_get_char_at_pos (str_p, (lit_utf8_size_t) index);\n\n  if (!lit_is_code_point_utf16_high_surrogate (first))\n  {\n    return next_index;\n  }\n\n  ecma_char_t second = ecma_string_get_char_at_pos (str_p, (lit_utf8_size_t) next_index);\n\n  if (!lit_is_code_point_utf16_low_surrogate (second))\n  {\n    return next_index;\n  }\n\n  return next_index + 1;\n} /* ecma_op_advance_string_index */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"jrt.h\"\n#include \"jrt-bit-fields.h\"\n#include \"vm-defines.h\"\n\n#include \"ecma-function-object.h\"\n\nJERRY_STATIC_ASSERT (ECMA_TYPE___MAX <= ECMA_VALUE_TYPE_MASK,\n                     ecma_types_must_be_less_than_mask);\n\nJERRY_STATIC_ASSERT ((ECMA_VALUE_TYPE_MASK + 1) == (1 << ECMA_VALUE_SHIFT),\n                     ecma_value_part_must_start_after_flags);\n\nJERRY_STATIC_ASSERT (ECMA_VALUE_SHIFT <= JMEM_ALIGNMENT_LOG,\n                     ecma_value_shift_must_be_less_than_or_equal_than_mem_alignment_log);\n\nJERRY_STATIC_ASSERT (sizeof (jmem_cpointer_t) <= sizeof (ecma_value_t),\n                     size_of_jmem_cpointer_t_must_be_less_or_equal_to_the_size_of_ecma_value_t);\n\nJERRY_STATIC_ASSERT (sizeof (jmem_cpointer_t) <= sizeof (jmem_cpointer_tag_t),\n                     size_of_jmem_cpointer_t_must_be_less_or_equal_to_the_size_of_jmem_cpointer_tag_t);\n\n#ifdef ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY\n\n/* cppcheck-suppress zerodiv */\nJERRY_STATIC_ASSERT (sizeof (uintptr_t) <= sizeof (ecma_value_t),\n                     uintptr_t_must_fit_in_ecma_value_t);\n\n#else /* !ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n\nJERRY_STATIC_ASSERT (sizeof (uintptr_t) > sizeof (ecma_value_t),\n                     uintptr_t_must_not_fit_in_ecma_value_t);\n\n#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n\nJERRY_STATIC_ASSERT ((ECMA_VALUE_FALSE | (1 << ECMA_DIRECT_SHIFT)) == ECMA_VALUE_TRUE\n                     && ECMA_VALUE_FALSE != ECMA_VALUE_TRUE,\n                     only_the_lowest_bit_must_be_different_for_simple_value_true_and_false);\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\nJERRY_STATIC_ASSERT (ECMA_NULL_POINTER == (ECMA_BIGINT_ZERO & ~(ecma_value_t) ECMA_VALUE_TYPE_MASK),\n                     ecma_bigint_zero_must_be_encoded_as_null_pointer);\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmahelpers Helpers for operations with ECMA data types\n * @{\n */\n\n/**\n * Get type field of ecma value\n *\n * @return type field\n */\nextern inline ecma_type_t JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_get_value_type_field (ecma_value_t value) /**< ecma value */\n{\n  return value & ECMA_VALUE_TYPE_MASK;\n} /* ecma_get_value_type_field */\n\n/**\n * Convert a pointer into an ecma value.\n *\n * @return ecma value\n */\nstatic inline ecma_value_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_pointer_to_ecma_value (const void *ptr) /**< pointer */\n{\n#ifdef ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY\n\n  JERRY_ASSERT (ptr != NULL);\n  uintptr_t uint_ptr = (uintptr_t) ptr;\n  JERRY_ASSERT ((uint_ptr & ECMA_VALUE_TYPE_MASK) == 0);\n  return (ecma_value_t) uint_ptr;\n\n#else /* !ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n\n  jmem_cpointer_t ptr_cp;\n  ECMA_SET_NON_NULL_POINTER (ptr_cp, ptr);\n  return ((ecma_value_t) ptr_cp) << ECMA_VALUE_SHIFT;\n\n#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n} /* ecma_pointer_to_ecma_value */\n\n/**\n * Get a pointer from an ecma value\n *\n * @return pointer\n */\nstatic inline void * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_get_pointer_from_ecma_value (ecma_value_t value) /**< value */\n{\n#ifdef ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY\n  void *ptr = (void *) (uintptr_t) ((value) & ~ECMA_VALUE_TYPE_MASK);\n  JERRY_ASSERT (ptr != NULL);\n  return ptr;\n#else /* !ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n  return ECMA_GET_NON_NULL_POINTER (void, value >> ECMA_VALUE_SHIFT);\n#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n} /* ecma_get_pointer_from_ecma_value */\n\n/**\n * Check if the value is direct ecma-value.\n *\n * @return true - if the value is a direct value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_direct (ecma_value_t value) /**< ecma value */\n{\n  return (ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT);\n} /* ecma_is_value_direct */\n\n/**\n * Check if the value is simple ecma-value.\n *\n * @return true - if the value is a simple value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_simple (ecma_value_t value) /**< ecma value */\n{\n  return (value & ECMA_DIRECT_TYPE_MASK) == ECMA_DIRECT_TYPE_SIMPLE_VALUE;\n} /* ecma_is_value_simple */\n\n/**\n * Check whether the value is a given simple value.\n *\n * @return true - if the value is equal to the given simple value,\n *         false - otherwise\n */\nstatic inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_equal_to_simple_value (ecma_value_t value, /**< ecma value */\n                                     ecma_value_t simple_value) /**< simple value */\n{\n  return value == simple_value;\n} /* ecma_is_value_equal_to_simple_value */\n\n/**\n * Check if the value is empty.\n *\n * @return true - if the value contains implementation-defined empty simple value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_empty (ecma_value_t value) /**< ecma value */\n{\n  return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_EMPTY);\n} /* ecma_is_value_empty */\n\n/**\n * Check if the value is undefined.\n *\n * @return true - if the value contains ecma-undefined simple value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_undefined (ecma_value_t value) /**< ecma value */\n{\n  return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_UNDEFINED);\n} /* ecma_is_value_undefined */\n\n/**\n * Check if the value is null.\n *\n * @return true - if the value contains ecma-null simple value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_null (ecma_value_t value) /**< ecma value */\n{\n  return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_NULL);\n} /* ecma_is_value_null */\n\n/**\n * Check if the value is boolean.\n *\n * @return true - if the value contains ecma-true or ecma-false simple values,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_boolean (ecma_value_t value) /**< ecma value */\n{\n  return ecma_is_value_true (value | (1 << ECMA_DIRECT_SHIFT));\n} /* ecma_is_value_boolean */\n\n/**\n * Check if the value is true.\n *\n * @return true - if the value contains ecma-true simple value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_true (ecma_value_t value) /**< ecma value */\n{\n  return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_TRUE);\n} /* ecma_is_value_true */\n\n/**\n * Check if the value is false.\n *\n * @return true - if the value contains ecma-false simple value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_false (ecma_value_t value) /**< ecma value */\n{\n  return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_FALSE);\n} /* ecma_is_value_false */\n\n/**\n * Check if the value is not found.\n *\n * @return true - if the value contains ecma-not-found simple value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_found (ecma_value_t value) /**< ecma value */\n{\n  return value != ECMA_VALUE_NOT_FOUND;\n} /* ecma_is_value_found */\n\n/**\n * Check if the value is array hole.\n *\n * @return true - if the value contains ecma-array-hole simple value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_array_hole (ecma_value_t value) /**< ecma value */\n{\n  return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_ARRAY_HOLE);\n} /* ecma_is_value_array_hole */\n\n/**\n * Check if the value is integer ecma-number.\n *\n * @return true - if the value contains an integer ecma-number value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_integer_number (ecma_value_t value) /**< ecma value */\n{\n  return (value & ECMA_DIRECT_TYPE_MASK) == ECMA_DIRECT_TYPE_INTEGER_VALUE;\n} /* ecma_is_value_integer_number */\n\n/**\n * Check if both values are integer ecma-numbers.\n *\n * @return true - if both values contain integer ecma-number values,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_are_values_integer_numbers (ecma_value_t first_value, /**< first ecma value */\n                                 ecma_value_t second_value) /**< second ecma value */\n{\n  JERRY_STATIC_ASSERT (ECMA_DIRECT_TYPE_INTEGER_VALUE == 0,\n                       ecma_direct_type_integer_value_must_be_zero);\n\n  return ((first_value | second_value) & ECMA_DIRECT_TYPE_MASK) == ECMA_DIRECT_TYPE_INTEGER_VALUE;\n} /* ecma_are_values_integer_numbers */\n\n/**\n * Check if the value is floating-point ecma-number.\n *\n * @return true - if the value contains a floating-point ecma-number value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_float_number (ecma_value_t value) /**< ecma value */\n{\n  return (ecma_get_value_type_field (value) == ECMA_TYPE_FLOAT);\n} /* ecma_is_value_float_number */\n\n/**\n * Check if the value is ecma-number.\n *\n * @return true - if the value contains ecma-number value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_number (ecma_value_t value) /**< ecma value */\n{\n  return (ecma_is_value_integer_number (value)\n          || ecma_is_value_float_number (value));\n} /* ecma_is_value_number */\n\nJERRY_STATIC_ASSERT ((ECMA_TYPE_STRING | 0x4) == ECMA_TYPE_DIRECT_STRING,\n                     ecma_type_string_and_direct_string_must_have_one_bit_difference);\n\n/**\n * Check if the value is ecma-string.\n *\n * @return true - if the value contains ecma-string value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_string (ecma_value_t value) /**< ecma value */\n{\n  return ((value & (ECMA_VALUE_TYPE_MASK - 0x4)) == ECMA_TYPE_STRING);\n} /* ecma_is_value_string */\n\n/**\n * Check if the value is symbol.\n *\n * @return true - if the value contains symbol value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_symbol (ecma_value_t value) /**< ecma value */\n{\n#if ENABLED (JERRY_ESNEXT)\n  return (ecma_get_value_type_field (value) == ECMA_TYPE_SYMBOL);\n#else /* ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (value);\n  return false;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_is_value_symbol */\n\n/**\n * Check if the value is a specific magic string.\n *\n * @return true - if the value the magic string value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_magic_string (ecma_value_t value, /**< ecma value */\n                            lit_magic_string_id_t id) /**< magic string id */\n{\n  return value == ecma_make_magic_string_value (id);\n} /* ecma_is_value_magic_string */\n\n/**\n * Check if the value is bigint.\n *\n * @return true - if the value contains bigint value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_bigint (ecma_value_t value) /**< ecma value */\n{\n  #if ENABLED (JERRY_BUILTIN_BIGINT)\n  return (ecma_get_value_type_field (value) == ECMA_TYPE_BIGINT);\n  #else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  JERRY_UNUSED (value);\n  return false;\n  #endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* ecma_is_value_bigint */\n\n/**\n * Check if the value can be property name.\n *\n * @return true - if the value can be property name value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_prop_name (ecma_value_t value) /**< ecma value */\n{\n#if ENABLED (JERRY_ESNEXT)\n  return ecma_is_value_string (value) || ecma_is_value_symbol (value);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  return ecma_is_value_string (value);\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_is_value_prop_name */\n\n/**\n * Check if the value is direct ecma-string.\n *\n * @return true - if the value contains direct ecma-string value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_direct_string (ecma_value_t value) /**< ecma value */\n{\n  return (ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT_STRING);\n} /* ecma_is_value_direct_string */\n\n/**\n * Check if the value is non-direct ecma-string.\n *\n * @return true - if the value contains non-direct ecma-string value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_non_direct_string (ecma_value_t value) /**< ecma value */\n{\n  return (ecma_get_value_type_field (value) == ECMA_TYPE_STRING);\n} /* ecma_is_value_non_direct_string */\n\n/**\n * Check if the value is object.\n *\n * @return true - if the value contains object value,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_object (ecma_value_t value) /**< ecma value */\n{\n  return (ecma_get_value_type_field (value) == ECMA_TYPE_OBJECT);\n} /* ecma_is_value_object */\n\n/**\n * Check if the value is error reference.\n *\n * @return true - if the value contains an error reference,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_value_error_reference (ecma_value_t value) /**< ecma value */\n{\n  return (ecma_get_value_type_field (value) == ECMA_TYPE_ERROR);\n} /* ecma_is_value_error_reference */\n\n/**\n * Debug assertion that specified value's type is one of ECMA-defined\n * script-visible types, i.e.: undefined, null, boolean, number, string, object.\n */\nvoid\necma_check_value_type_is_spec_defined (ecma_value_t value) /**< ecma value */\n{\n  JERRY_ASSERT (ecma_is_value_undefined (value)\n                || ecma_is_value_null (value)\n                || ecma_is_value_boolean (value)\n                || ecma_is_value_number (value)\n                || ecma_is_value_string (value)\n                || ecma_is_value_bigint (value)\n                || ecma_is_value_symbol (value)\n                || ecma_is_value_object (value));\n} /* ecma_check_value_type_is_spec_defined */\n\n/**\n * Checks if the given argument is an array or not.\n *\n * @return ECMA_VALUE_ERROR- if the operation fails\n *         ECMA_VALUE_{TRUE/FALSE} - depends on whether 'arg' is an array object\n */\necma_value_t\necma_is_value_array (ecma_value_t arg) /**< argument */\n{\n  if (!ecma_is_value_object (arg))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_object_t *arg_obj_p = ecma_get_object_from_value (arg);\n\n  if (ecma_get_object_type (arg_obj_p) == ECMA_OBJECT_TYPE_ARRAY)\n  {\n    return ECMA_VALUE_TRUE;\n  }\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (arg_obj_p))\n  {\n    ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) arg_obj_p;\n\n    if (proxy_obj_p->handler == ECMA_VALUE_NULL)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot perform 'IsArray' on the given proxy \"\n                                                  \"because handler is null\"));\n    }\n\n    return ecma_is_value_array (proxy_obj_p->target);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return ECMA_VALUE_FALSE;\n} /* ecma_is_value_array */\n\n/**\n * Creates an ecma value from the given raw boolean.\n *\n * @return boolean ecma_value\n */\nextern inline ecma_value_t JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_make_boolean_value (bool boolean_value) /**< raw bool value from which the ecma value will be created */\n{\n  return boolean_value ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;\n} /* ecma_make_boolean_value */\n\n/**\n * Encode an integer number into an ecma-value without allocating memory\n *\n * Note:\n *   The value must fit into the range of allowed ecma integer values\n *\n * @return ecma-value\n */\nextern inline ecma_value_t JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_make_integer_value (ecma_integer_value_t integer_value) /**< integer number to be encoded */\n{\n  JERRY_ASSERT (ECMA_IS_INTEGER_NUMBER (integer_value));\n\n  return (((ecma_value_t) integer_value) << ECMA_DIRECT_SHIFT) | ECMA_DIRECT_TYPE_INTEGER_VALUE;\n} /* ecma_make_integer_value */\n\n/**\n * Allocate and initialize a new float number without checks.\n *\n * @return ecma-value\n */\nstatic ecma_value_t\necma_create_float_number (ecma_number_t ecma_number) /**< value of the float number */\n{\n  ecma_number_t *ecma_num_p = ecma_alloc_number ();\n\n  *ecma_num_p = ecma_number;\n\n  return ecma_pointer_to_ecma_value (ecma_num_p) | ECMA_TYPE_FLOAT;\n} /* ecma_create_float_number */\n\n/**\n * Encode float number without checks.\n *\n * @return ecma-value\n */\necma_value_t\necma_make_float_value (ecma_number_t *ecma_num_p) /**< pointer to the float number */\n{\n  return ecma_pointer_to_ecma_value (ecma_num_p) | ECMA_TYPE_FLOAT;\n} /* ecma_make_float_value */\n\n/**\n * Create a new NaN value.\n *\n * @return ecma-value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_make_nan_value (void)\n{\n  return ecma_create_float_number (ecma_number_make_nan ());\n} /* ecma_make_nan_value */\n\n/**\n * Checks whether the passed number is +0.0\n *\n * @return true, if it is +0.0, false otherwise\n */\nstatic inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_is_number_equal_to_positive_zero (ecma_number_t ecma_number) /**< number */\n{\n  ecma_number_accessor_t u;\n  u.as_ecma_number_t = ecma_number;\n#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  return u.as_uint32_t == 0;\n#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n  return u.as_uint64_t == 0;\n#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n} /* ecma_is_number_equal_to_positive_zero */\n\n/**\n * Encode a property length number into an ecma-value\n *\n * @return ecma-value\n */\necma_value_t\necma_make_length_value (ecma_length_t number) /**< number to be encoded */\n{\n  if (number <= ECMA_INTEGER_NUMBER_MAX)\n  {\n    return ecma_make_integer_value ((ecma_integer_value_t) number);\n  }\n\n  return ecma_create_float_number ((ecma_number_t) number);\n} /* ecma_make_length_value */\n\n/**\n * Encode a number into an ecma-value\n *\n * @return ecma-value\n */\necma_value_t\necma_make_number_value (ecma_number_t ecma_number) /**< number to be encoded */\n{\n  ecma_integer_value_t integer_value = (ecma_integer_value_t) ecma_number;\n\n  if ((ecma_number_t) integer_value == ecma_number\n      && ((integer_value == 0) ? ecma_is_number_equal_to_positive_zero (ecma_number)\n                               : ECMA_IS_INTEGER_NUMBER (integer_value)))\n  {\n    return ecma_make_integer_value (integer_value);\n  }\n\n  return ecma_create_float_number (ecma_number);\n} /* ecma_make_number_value */\n\n/**\n * Encode an int32 number into an ecma-value\n *\n * @return ecma-value\n */\necma_value_t\necma_make_int32_value (int32_t int32_number) /**< int32 number to be encoded */\n{\n  if (ECMA_IS_INTEGER_NUMBER (int32_number))\n  {\n    return ecma_make_integer_value ((ecma_integer_value_t) int32_number);\n  }\n\n  return ecma_create_float_number ((ecma_number_t) int32_number);\n} /* ecma_make_int32_value */\n\n/**\n * Encode an unsigned int32 number into an ecma-value\n *\n * @return ecma-value\n */\necma_value_t\necma_make_uint32_value (uint32_t uint32_number) /**< uint32 number to be encoded */\n{\n  if (uint32_number <= ECMA_INTEGER_NUMBER_MAX)\n  {\n    return ecma_make_integer_value ((ecma_integer_value_t) uint32_number);\n  }\n\n  return ecma_create_float_number ((ecma_number_t) uint32_number);\n} /* ecma_make_uint32_value */\n\n/**\n * String value constructor\n *\n * @return ecma-value representation of the string argument\n */\nextern inline ecma_value_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_make_string_value (const ecma_string_t *ecma_string_p) /**< string to reference in value */\n{\n  JERRY_ASSERT (ecma_string_p != NULL);\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT (!ecma_prop_name_is_symbol ((ecma_string_t *) ecma_string_p));\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if ((((uintptr_t) ecma_string_p) & ECMA_VALUE_TYPE_MASK) != 0)\n  {\n    return (ecma_value_t) (uintptr_t) ecma_string_p;\n  }\n\n  return ecma_pointer_to_ecma_value (ecma_string_p) | ECMA_TYPE_STRING;\n} /* ecma_make_string_value */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Symbol value constructor\n *\n * @return ecma-value representation of the string argument\n */\nextern inline ecma_value_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_make_symbol_value (const ecma_string_t *ecma_symbol_p) /**< symbol to reference in value */\n{\n  JERRY_ASSERT (ecma_symbol_p != NULL);\n  JERRY_ASSERT (ecma_prop_name_is_symbol ((ecma_string_t *) ecma_symbol_p));\n\n  return ecma_pointer_to_ecma_value (ecma_symbol_p) | ECMA_TYPE_SYMBOL;\n} /* ecma_make_symbol_value */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Property-name value constructor\n *\n * @return ecma-value representation of a property name argument\n */\nextern inline ecma_value_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_make_prop_name_value (const ecma_string_t *ecma_prop_name_p) /**< property name to reference in value */\n{\n  JERRY_ASSERT (ecma_prop_name_p != NULL);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (ecma_prop_name_is_symbol ((ecma_string_t *) ecma_prop_name_p))\n  {\n    return ecma_make_symbol_value (ecma_prop_name_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ecma_make_string_value (ecma_prop_name_p);\n} /* ecma_make_prop_name_value */\n\n/**\n * String value constructor\n *\n * @return ecma-value representation of the string argument\n */\nextern inline ecma_value_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_make_magic_string_value (lit_magic_string_id_t id) /**< magic string id */\n{\n  return (ecma_value_t) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_MAGIC, (uintptr_t) id);\n} /* ecma_make_magic_string_value */\n\n/**\n * Object value constructor\n *\n * @return ecma-value representation of the object argument\n */\nextern inline ecma_value_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_make_object_value (const ecma_object_t *object_p) /**< object to reference in value */\n{\n  JERRY_ASSERT (object_p != NULL);\n\n  return ecma_pointer_to_ecma_value (object_p) | ECMA_TYPE_OBJECT;\n} /* ecma_make_object_value */\n\n/**\n * Error reference constructor\n *\n * @return ecma-value representation of the Error reference\n */\nextern inline ecma_value_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_make_extended_primitive_value (const ecma_extended_primitive_t *primitve_p, /**< extended primitve value */\n                                    uint32_t type) /**< ecma type of extended primitve value */\n{\n  JERRY_ASSERT (primitve_p != NULL);\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  JERRY_ASSERT (primitve_p != ECMA_BIGINT_POINTER_TO_ZERO);\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  JERRY_ASSERT (type == ECMA_TYPE_BIGINT || type == ECMA_TYPE_ERROR);\n\n  return ecma_pointer_to_ecma_value (primitve_p) | type;\n} /* ecma_make_extended_primitive_value */\n\n/**\n * Get integer value from an integer ecma value\n *\n * @return integer value\n */\nextern inline ecma_integer_value_t JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_get_integer_from_value (ecma_value_t value) /**< ecma value */\n{\n  JERRY_ASSERT (ecma_is_value_integer_number (value));\n\n  return ((ecma_integer_value_t) value) >> ECMA_DIRECT_SHIFT;\n} /* ecma_get_integer_from_value */\n\n/**\n * Get floating point value from an ecma value\n *\n * @return floating point value\n */\nextern inline ecma_number_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_get_float_from_value (ecma_value_t value) /**< ecma value */\n{\n  JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_FLOAT);\n\n  return *(ecma_number_t *) ecma_get_pointer_from_ecma_value (value);\n} /* ecma_get_float_from_value */\n\n/**\n * Get floating point value pointer from an ecma value\n *\n * @return floating point value\n */\nextern inline ecma_number_t * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_get_pointer_from_float_value (ecma_value_t value) /**< ecma value */\n{\n  JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_FLOAT);\n\n  return (ecma_number_t *) ecma_get_pointer_from_ecma_value (value);\n} /* ecma_get_pointer_from_float_value */\n\n/**\n * Get floating point value from an ecma value\n *\n * @return floating point value\n */\necma_number_t JERRY_ATTR_PURE\necma_get_number_from_value (ecma_value_t value) /**< ecma value */\n{\n  if (ecma_is_value_integer_number (value))\n  {\n    return (ecma_number_t) ecma_get_integer_from_value (value);\n  }\n\n  return ecma_get_float_from_value (value);\n} /* ecma_get_number_from_value */\n\n/**\n * Get pointer to ecma-string from ecma value\n *\n * @return the string pointer\n */\nextern inline ecma_string_t * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_get_string_from_value (ecma_value_t value) /**< ecma value */\n{\n  JERRY_ASSERT (ecma_is_value_string (value));\n\n  if ((value & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_DIRECT_STRING)\n  {\n    return (ecma_string_t *) (uintptr_t) value;\n  }\n\n  return (ecma_string_t *) ecma_get_pointer_from_ecma_value (value);\n} /* ecma_get_string_from_value */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Get pointer to ecma-string from ecma value\n *\n * @return the string pointer\n */\nextern inline ecma_string_t * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_get_symbol_from_value (ecma_value_t value) /**< ecma value */\n{\n  JERRY_ASSERT (ecma_is_value_symbol (value));\n\n  return (ecma_string_t *) ecma_get_pointer_from_ecma_value (value);\n} /* ecma_get_symbol_from_value */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Get pointer to a property name from ecma value\n *\n * @return the string pointer\n */\nextern inline ecma_string_t * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_get_prop_name_from_value (ecma_value_t value) /**< ecma value */\n{\n  JERRY_ASSERT (ecma_is_value_prop_name (value));\n\n  if ((value & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_DIRECT_STRING)\n  {\n    return (ecma_string_t *) (uintptr_t) value;\n  }\n\n  return (ecma_string_t *) ecma_get_pointer_from_ecma_value (value);\n} /* ecma_get_prop_name_from_value */\n\n/**\n * Get pointer to ecma-object from ecma value\n *\n * @return the pointer\n */\nextern inline ecma_object_t * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_get_object_from_value (ecma_value_t value) /**< ecma value */\n{\n  JERRY_ASSERT (ecma_is_value_object (value));\n\n  return (ecma_object_t *) ecma_get_pointer_from_ecma_value (value);\n} /* ecma_get_object_from_value */\n\n/**\n * Get pointer to error reference from ecma value\n *\n * @return the pointer\n */\nextern inline ecma_extended_primitive_t * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_get_extended_primitive_from_value (ecma_value_t value) /**< ecma value */\n{\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  JERRY_ASSERT (value != ECMA_BIGINT_ZERO);\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_BIGINT\n                || ecma_get_value_type_field (value) == ECMA_TYPE_ERROR);\n\n  return (ecma_extended_primitive_t *) ecma_get_pointer_from_ecma_value (value);\n} /* ecma_get_extended_primitive_from_value */\n\n/**\n * Invert a boolean value\n *\n * @return ecma value\n */\nextern inline ecma_value_t JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE\necma_invert_boolean_value (ecma_value_t value) /**< ecma value */\n{\n  JERRY_ASSERT (ecma_is_value_boolean (value));\n\n  return (value ^ (1 << ECMA_DIRECT_SHIFT));\n} /* ecma_invert_boolean_value */\n\n/**\n * Copy ecma value.\n *\n * @return copy of the given value\n */\necma_value_t\necma_copy_value (ecma_value_t value)  /**< value description */\n{\n  switch (ecma_get_value_type_field (value))\n  {\n    case ECMA_TYPE_FLOAT:\n    {\n      ecma_number_t *num_p = (ecma_number_t *) ecma_get_pointer_from_ecma_value (value);\n\n      return ecma_create_float_number (*num_p);\n    }\n    case ECMA_TYPE_STRING:\n    {\n      ecma_ref_ecma_string (ecma_get_string_from_value (value));\n      return value;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_TYPE_SYMBOL:\n    {\n      ecma_ref_ecma_string (ecma_get_symbol_from_value (value));\n      return value;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    case ECMA_TYPE_BIGINT:\n    {\n      if (value != ECMA_BIGINT_ZERO)\n      {\n        ecma_ref_extended_primitive (ecma_get_extended_primitive_from_value (value));\n      }\n      return value;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    case ECMA_TYPE_OBJECT:\n    {\n      ecma_ref_object (ecma_get_object_from_value (value));\n      return value;\n    }\n    default:\n    {\n      JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT\n                    || ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT_STRING);\n\n      return value;\n    }\n  }\n} /* ecma_copy_value */\n\n/**\n * Copy ecma value.\n *\n * Note:\n *   this function is similar to ecma_copy_value, but it is\n *   faster for direct values since no function call is performed.\n *   It also increases the binary size so it is recommended for\n *   critical code paths only.\n *\n * @return copy of the given value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_fast_copy_value (ecma_value_t value)  /**< value description */\n{\n  return (ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT) ? value : ecma_copy_value (value);\n} /* ecma_fast_copy_value */\n\n/**\n * Copy the ecma value if not an object\n *\n * @return copy of the given value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_copy_value_if_not_object (ecma_value_t value) /**< value description */\n{\n  if (!ecma_is_value_object (value))\n  {\n    return ecma_copy_value (value);\n  }\n\n  return value;\n} /* ecma_copy_value_if_not_object */\n\n/**\n * Increase reference counter of a value if it is an object.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_ref_if_object (ecma_value_t value) /**< value description */\n{\n  if (ecma_is_value_object (value))\n  {\n    ecma_ref_object (ecma_get_object_from_value (value));\n  }\n} /* ecma_ref_if_object */\n\n/**\n * Decrease reference counter of a value if it is an object.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_deref_if_object (ecma_value_t value) /**< value description */\n{\n  if (ecma_is_value_object (value))\n  {\n    ecma_deref_object (ecma_get_object_from_value (value));\n  }\n} /* ecma_deref_if_object */\n\n/**\n * Assign a new value to an ecma-value\n *\n * Note:\n *      value previously stored in the property is freed\n */\nvoid\necma_value_assign_value (ecma_value_t *value_p, /**< [in, out] ecma value */\n                         ecma_value_t ecma_value) /**< value to assign */\n{\n  JERRY_STATIC_ASSERT (ECMA_TYPE_DIRECT == 0,\n                       ecma_type_direct_must_be_zero_for_the_next_check);\n\n  if (*value_p == ecma_value)\n  {\n    return;\n  }\n\n  if (ecma_get_value_type_field (ecma_value || *value_p) == ECMA_TYPE_DIRECT)\n  {\n    *value_p = ecma_value;\n  }\n  else if (ecma_is_value_float_number (ecma_value)\n           && ecma_is_value_float_number (*value_p))\n  {\n    const ecma_number_t *num_src_p = (ecma_number_t *) ecma_get_pointer_from_ecma_value (ecma_value);\n    ecma_number_t *num_dst_p = (ecma_number_t *) ecma_get_pointer_from_ecma_value (*value_p);\n\n    *num_dst_p = *num_src_p;\n  }\n  else\n  {\n    ecma_free_value_if_not_object (*value_p);\n    *value_p = ecma_copy_value_if_not_object (ecma_value);\n  }\n} /* ecma_value_assign_value */\n\n/**\n * Update the value of a float number to a new value\n *\n * Note:\n *   The original value is destroyed.\n *\n * @return updated ecma value\n */\necma_value_t\necma_update_float_number (ecma_value_t float_value, /**< original float value */\n                          ecma_number_t new_number) /**< updated number value */\n{\n  JERRY_ASSERT (ecma_is_value_float_number (float_value));\n\n  ecma_integer_value_t integer_number = (ecma_integer_value_t) new_number;\n  ecma_number_t *number_p = (ecma_number_t *) ecma_get_pointer_from_ecma_value (float_value);\n\n  if ((ecma_number_t) integer_number == new_number\n      && ((integer_number == 0) ? ecma_is_number_equal_to_positive_zero (new_number)\n                                : ECMA_IS_INTEGER_NUMBER (integer_number)))\n  {\n    ecma_dealloc_number (number_p);\n    return ecma_make_integer_value (integer_number);\n  }\n\n  *number_p = new_number;\n  return float_value;\n} /* ecma_update_float_number */\n\n/**\n * Assign a float number to an ecma-value\n *\n * Note:\n *      value previously stored in the property is freed\n */\nstatic void\necma_value_assign_float_number (ecma_value_t *value_p, /**< [in, out] ecma value */\n                                ecma_number_t ecma_number) /**< number to assign */\n{\n  if (ecma_is_value_float_number (*value_p))\n  {\n    ecma_number_t *num_dst_p = (ecma_number_t *) ecma_get_pointer_from_ecma_value (*value_p);\n\n    *num_dst_p = ecma_number;\n    return;\n  }\n\n  if (ecma_get_value_type_field (*value_p) != ECMA_TYPE_DIRECT\n      && ecma_get_value_type_field (*value_p) != ECMA_TYPE_OBJECT)\n  {\n    ecma_free_value (*value_p);\n  }\n\n  *value_p = ecma_create_float_number (ecma_number);\n} /* ecma_value_assign_float_number */\n\n/**\n * Assign a number to an ecma-value\n *\n * Note:\n *      value previously stored in the property is freed\n */\nvoid\necma_value_assign_number (ecma_value_t *value_p, /**< [in, out] ecma value */\n                          ecma_number_t ecma_number) /**< number to assign */\n{\n  ecma_integer_value_t integer_value = (ecma_integer_value_t) ecma_number;\n\n  if ((ecma_number_t) integer_value == ecma_number\n      && ((integer_value == 0) ? ecma_is_number_equal_to_positive_zero (ecma_number)\n                               : ECMA_IS_INTEGER_NUMBER (integer_value)))\n  {\n    if (ecma_get_value_type_field (*value_p) != ECMA_TYPE_DIRECT\n        && ecma_get_value_type_field (*value_p) != ECMA_TYPE_OBJECT)\n    {\n      ecma_free_value (*value_p);\n    }\n    *value_p = ecma_make_integer_value (integer_value);\n    return;\n  }\n\n  ecma_value_assign_float_number (value_p, ecma_number);\n} /* ecma_value_assign_number */\n\n/**\n * Free the ecma value\n */\nvoid\necma_free_value (ecma_value_t value) /**< value description */\n{\n  switch (ecma_get_value_type_field (value))\n  {\n    case ECMA_TYPE_FLOAT:\n    {\n      ecma_number_t *number_p = (ecma_number_t *) ecma_get_pointer_from_ecma_value (value);\n      ecma_dealloc_number (number_p);\n      break;\n    }\n\n    case ECMA_TYPE_STRING:\n    {\n      ecma_string_t *string_p = ecma_get_string_from_value (value);\n      ecma_deref_ecma_string (string_p);\n      break;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_TYPE_SYMBOL:\n    {\n      ecma_deref_ecma_string (ecma_get_symbol_from_value (value));\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case ECMA_TYPE_OBJECT:\n    {\n      ecma_deref_object (ecma_get_object_from_value (value));\n      break;\n    }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    case ECMA_TYPE_BIGINT:\n    {\n      if (value != ECMA_BIGINT_ZERO)\n      {\n        ecma_deref_bigint (ecma_get_extended_primitive_from_value (value));\n      }\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n    default:\n    {\n      JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT\n                    || ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT_STRING);\n\n      /* no memory is allocated */\n      break;\n    }\n  }\n} /* ecma_free_value */\n\n/**\n * Free the ecma value\n *\n * Note:\n *   this function is similar to ecma_free_value, but it is\n *   faster for direct values since no function call is performed.\n *   It also increases the binary size so it is recommended for\n *   critical code paths only.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_fast_free_value (ecma_value_t value) /**< value description */\n{\n  if (ecma_get_value_type_field (value) != ECMA_TYPE_DIRECT)\n  {\n    ecma_free_value (value);\n  }\n} /* ecma_fast_free_value */\n\n/**\n * Free the ecma value if not an object\n */\nvoid\necma_free_value_if_not_object (ecma_value_t value) /**< value description */\n{\n  if (ecma_get_value_type_field (value) != ECMA_TYPE_OBJECT)\n  {\n    ecma_free_value (value);\n  }\n} /* ecma_free_value_if_not_object */\n\n/**\n * Free an ecma-value object\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_free_object (ecma_value_t value) /**< value description */\n{\n  ecma_deref_object (ecma_get_object_from_value (value));\n} /* ecma_free_object */\n\n/**\n * Free an ecma-value number\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_free_number (ecma_value_t value) /**< value description */\n{\n  JERRY_ASSERT (ecma_is_value_number (value));\n\n  if (ecma_is_value_float_number (value))\n  {\n    ecma_number_t *number_p = (ecma_number_t *) ecma_get_pointer_from_ecma_value (value);\n    ecma_dealloc_number (number_p);\n  }\n} /* ecma_free_number */\n\n/**\n * Get the literal id associated with the given ecma_value type.\n * This operation is equivalent to the JavaScript 'typeof' operator.\n *\n * @returns one of the following value:\n *          - LIT_MAGIC_STRING_UNDEFINED\n *          - LIT_MAGIC_STRING_OBJECT\n *          - LIT_MAGIC_STRING_BOOLEAN\n *          - LIT_MAGIC_STRING_NUMBER\n *          - LIT_MAGIC_STRING_STRING\n *          - LIT_MAGIC_STRING_FUNCTION\n */\nlit_magic_string_id_t\necma_get_typeof_lit_id (ecma_value_t value) /**< input ecma value */\n{\n  lit_magic_string_id_t ret_value = LIT_MAGIC_STRING__EMPTY;\n\n  if (ecma_is_value_undefined (value))\n  {\n    ret_value = LIT_MAGIC_STRING_UNDEFINED;\n  }\n  else if (ecma_is_value_null (value))\n  {\n    ret_value = LIT_MAGIC_STRING_OBJECT;\n  }\n  else if (ecma_is_value_boolean (value))\n  {\n    ret_value = LIT_MAGIC_STRING_BOOLEAN;\n  }\n  else if (ecma_is_value_number (value))\n  {\n    ret_value = LIT_MAGIC_STRING_NUMBER;\n  }\n  else if (ecma_is_value_string (value))\n  {\n    ret_value = LIT_MAGIC_STRING_STRING;\n  }\n#if ENABLED (JERRY_ESNEXT)\n  else if (ecma_is_value_symbol (value))\n  {\n    ret_value = LIT_MAGIC_STRING_SYMBOL;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  else if (ecma_is_value_bigint (value))\n  {\n    ret_value = LIT_MAGIC_STRING_BIGINT;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  else\n  {\n    JERRY_ASSERT (ecma_is_value_object (value));\n\n    ret_value = ecma_op_is_callable (value) ? LIT_MAGIC_STRING_FUNCTION : LIT_MAGIC_STRING_OBJECT;\n  }\n\n  JERRY_ASSERT (ret_value != LIT_MAGIC_STRING__EMPTY);\n\n  return ret_value;\n} /* ecma_get_typeof_lit_id */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-helpers.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lcache.h\"\n#include \"ecma-property-hashmap.h\"\n#include \"jcontext.h\"\n#include \"jrt-bit-fields.h\"\n#include \"byte-code.h\"\n#include \"re-compiler.h\"\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_DEBUGGER)\n#include \"debugger.h\"\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmahelpers Helpers for operations with ECMA data types\n * @{\n */\n\nJERRY_STATIC_ASSERT (ECMA_OBJECT_TYPE_MASK >= ECMA_OBJECT_TYPE__MAX - 1,\n                     ecma_object_types_must_be_lower_than_the_container_mask);\n\nJERRY_STATIC_ASSERT (ECMA_OBJECT_TYPE_MASK >= ECMA_LEXICAL_ENVIRONMENT_TYPE__MAX,\n                     ecma_lexical_environment_types_must_be_lower_than_the_container_mask);\n\nJERRY_STATIC_ASSERT (ECMA_OBJECT_TYPE_MASK + 1 == ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV,\n                     ecma_built_in_flag_must_follow_the_object_type);\n\nJERRY_STATIC_ASSERT (ECMA_OBJECT_FLAG_EXTENSIBLE == (ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV << 1),\n                     ecma_extensible_flag_must_follow_the_built_in_flag);\n\nJERRY_STATIC_ASSERT (ECMA_OBJECT_REF_ONE == (ECMA_OBJECT_FLAG_EXTENSIBLE << 1),\n                     ecma_object_ref_one_must_follow_the_extensible_flag);\n\nJERRY_STATIC_ASSERT (((ECMA_OBJECT_MAX_REF + ECMA_OBJECT_REF_ONE) | (ECMA_OBJECT_REF_ONE - 1)) == UINT16_MAX,\n                      ecma_object_max_ref_does_not_fill_the_remaining_bits);\n\nJERRY_STATIC_ASSERT (ECMA_PROPERTY_FLAGS_MASK == ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                     ecma_property_flags_mask_must_use_the_configurable_enumerable_writable_flags);\n\n/**\n * Create an object with specified prototype object\n * (or NULL prototype if there is not prototype for the object)\n * and value of 'Extensible' attribute.\n *\n * Reference counter's value will be set to one.\n *\n * @return pointer to the object's descriptor\n */\necma_object_t *\necma_create_object (ecma_object_t *prototype_object_p, /**< pointer to prototybe of the object (or NULL) */\n                    size_t ext_object_size, /**< size of extended objects */\n                    ecma_object_type_t type) /**< object type */\n{\n  ecma_object_t *new_object_p;\n\n  if (ext_object_size > 0)\n  {\n    new_object_p = (ecma_object_t *) ecma_alloc_extended_object (ext_object_size);\n  }\n  else\n  {\n    new_object_p = ecma_alloc_object ();\n  }\n\n  new_object_p->type_flags_refs = (uint16_t) (type | ECMA_OBJECT_FLAG_EXTENSIBLE);\n\n  ecma_init_gc_info (new_object_p);\n\n  new_object_p->u1.property_list_cp = JMEM_CP_NULL;\n\n  ECMA_SET_POINTER (new_object_p->u2.prototype_cp, prototype_object_p);\n\n  return new_object_p;\n} /* ecma_create_object */\n\n/**\n * Create a declarative lexical environment with specified outer lexical environment\n * (or NULL if the environment is not nested).\n *\n * See also: ECMA-262 v5, 10.2.1.1\n *\n * Reference counter's value will be set to one.\n *\n * @return pointer to the descriptor of lexical environment\n */\necma_object_t *\necma_create_decl_lex_env (ecma_object_t *outer_lexical_environment_p) /**< outer lexical environment */\n{\n  ecma_object_t *new_lexical_environment_p = ecma_alloc_object ();\n\n  uint16_t type = ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV | ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE;\n  new_lexical_environment_p->type_flags_refs = type;\n\n  ecma_init_gc_info (new_lexical_environment_p);\n\n  new_lexical_environment_p->u1.property_list_cp = JMEM_CP_NULL;\n\n  ECMA_SET_POINTER (new_lexical_environment_p->u2.outer_reference_cp, outer_lexical_environment_p);\n\n  return new_lexical_environment_p;\n} /* ecma_create_decl_lex_env */\n\n/**\n * Create a object lexical environment with specified outer lexical environment\n * (or NULL if the environment is not nested), binding object and provided type flag.\n *\n * See also: ECMA-262 v5, 10.2.1.2\n *\n * Reference counter's value will be set to one.\n *\n * @return pointer to the descriptor of lexical environment\n */\necma_object_t *\necma_create_object_lex_env (ecma_object_t *outer_lexical_environment_p, /**< outer lexical environment */\n                            ecma_object_t *binding_obj_p, /**< binding object */\n                            ecma_lexical_environment_type_t type) /**< type of the new lexical environment */\n{\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT (type == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND\n                || type == ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_ASSERT (type == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (binding_obj_p != NULL\n                && !ecma_is_lexical_environment (binding_obj_p));\n\n  ecma_object_t *new_lexical_environment_p = ecma_alloc_object ();\n\n  new_lexical_environment_p->type_flags_refs = (uint16_t) (ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV | type);\n\n  ecma_init_gc_info (new_lexical_environment_p);\n\n  ECMA_SET_NON_NULL_POINTER (new_lexical_environment_p->u1.bound_object_cp,\n                             binding_obj_p);\n\n  ECMA_SET_POINTER (new_lexical_environment_p->u2.outer_reference_cp, outer_lexical_environment_p);\n\n  return new_lexical_environment_p;\n} /* ecma_create_object_lex_env */\n\n/**\n * Check if the object is lexical environment.\n *\n * @return true  - if object is a lexical environment\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_PURE\necma_is_lexical_environment (const ecma_object_t *object_p) /**< object or lexical environment */\n{\n  JERRY_ASSERT (object_p != NULL);\n\n  uint32_t full_type = object_p->type_flags_refs & (ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV | ECMA_OBJECT_TYPE_MASK);\n\n  return full_type >= (ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV | ECMA_LEXICAL_ENVIRONMENT_TYPE_START);\n} /* ecma_is_lexical_environment */\n\n/**\n * Set value of [[Extensible]] object's internal property.\n */\nextern inline void\necma_op_ordinary_object_set_extensible (ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (!ecma_is_lexical_environment (object_p));\n\n  object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs | ECMA_OBJECT_FLAG_EXTENSIBLE);\n} /* ecma_op_ordinary_object_set_extensible */\n\n/**\n * Get object's internal implementation-defined type.\n *\n * @return type of the object (ecma_object_type_t)\n */\nextern inline ecma_object_type_t JERRY_ATTR_PURE\necma_get_object_type (const ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (!ecma_is_lexical_environment (object_p));\n\n  return (ecma_object_type_t) (object_p->type_flags_refs & ECMA_OBJECT_TYPE_MASK);\n} /* ecma_get_object_type */\n\n/**\n * Check if the object is a built-in object\n *\n * @return true  - if object is a built-in object\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_PURE\necma_get_object_is_builtin (const ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (!ecma_is_lexical_environment (object_p));\n\n  return (object_p->type_flags_refs & ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV) != 0;\n} /* ecma_get_object_is_builtin */\n\n/**\n * Set flag indicating whether the object is a built-in object\n */\nextern inline void\necma_set_object_is_builtin (ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (!(object_p->type_flags_refs & ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV));\n  JERRY_ASSERT ((object_p->type_flags_refs & ECMA_OBJECT_TYPE_MASK) < ECMA_LEXICAL_ENVIRONMENT_TYPE_START);\n\n  object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs | ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV);\n} /* ecma_set_object_is_builtin */\n\n/**\n * Get the built-in ID of the object.\n * If the object is not builtin, return ECMA_BUILTIN_ID__COUNT\n *\n * @return the ID of the built-in\n */\nextern inline uint8_t\necma_get_object_builtin_id (ecma_object_t *object_p) /**< object */\n{\n  if (!ecma_get_object_is_builtin (object_p))\n  {\n    return ECMA_BUILTIN_ID__COUNT;\n  }\n\n  ecma_built_in_props_t *built_in_props_p;\n  ecma_object_type_t object_type = ecma_get_object_type (object_p);\n\n  if (ECMA_BUILTIN_IS_EXTENDED_BUILT_IN (object_type))\n  {\n    built_in_props_p = &((ecma_extended_built_in_object_t *) object_p)->built_in;\n  }\n  else\n  {\n    built_in_props_p = &((ecma_extended_object_t *) object_p)->u.built_in;\n  }\n\n  return built_in_props_p->id;\n} /* ecma_get_object_builtin_id */\n\n/**\n * Get type of lexical environment.\n *\n * @return type of the lexical environment (ecma_lexical_environment_type_t)\n */\nextern inline ecma_lexical_environment_type_t JERRY_ATTR_PURE\necma_get_lex_env_type (const ecma_object_t *object_p) /**< lexical environment */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (ecma_is_lexical_environment (object_p));\n\n  return (ecma_lexical_environment_type_t) (object_p->type_flags_refs & ECMA_OBJECT_TYPE_MASK);\n} /* ecma_get_lex_env_type */\n\n/**\n * Get lexical environment's bound object.\n *\n * @return pointer to ecma object\n */\nextern inline ecma_object_t *JERRY_ATTR_PURE\necma_get_lex_env_binding_object (const ecma_object_t *object_p) /**< object-bound lexical environment */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (ecma_is_lexical_environment (object_p));\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT (ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND\n                || ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_ASSERT (ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ECMA_GET_NON_NULL_POINTER (ecma_object_t, object_p->u1.bound_object_cp);\n} /* ecma_get_lex_env_binding_object */\n\n/**\n * Create a new lexical environment with the same property list as the passed lexical environment\n *\n * @return pointer to the newly created lexical environment\n */\necma_object_t *\necma_clone_decl_lexical_environment (ecma_object_t *lex_env_p, /**< declarative lexical environment */\n                                     bool copy_values) /**< copy property values as well */\n{\n  JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n  JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n\n  ecma_object_t *outer_lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n  ecma_object_t *new_lex_env_p = ecma_create_decl_lex_env (outer_lex_env_p);\n\n  jmem_cpointer_t prop_iter_cp = lex_env_p->u1.property_list_cp;\n  JERRY_ASSERT (prop_iter_cp != JMEM_CP_NULL);\n\n  ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                   prop_iter_cp);\n  if (prop_iter_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n  {\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n\n  JERRY_ASSERT (prop_iter_cp != JMEM_CP_NULL);\n\n  do\n  {\n    prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      if (prop_iter_p->types[i] != ECMA_PROPERTY_TYPE_DELETED)\n      {\n        JERRY_ASSERT (ECMA_PROPERTY_IS_RAW_DATA (prop_iter_p->types[i]));\n\n        uint8_t prop_attributes = (uint8_t) (prop_iter_p->types[i] & ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n        ecma_string_t *name_p = ecma_string_from_property_name (prop_iter_p->types[i], prop_pair_p->names_cp[i]);\n\n        ecma_property_value_t *property_value_p;\n        property_value_p = ecma_create_named_data_property (new_lex_env_p, name_p, prop_attributes, NULL);\n\n        ecma_deref_ecma_string (name_p);\n\n        JERRY_ASSERT (property_value_p->value == ECMA_VALUE_UNDEFINED);\n\n        if (copy_values)\n        {\n          property_value_p->value = ecma_copy_value_if_not_object (prop_pair_p->values[i].value);\n        }\n        else\n        {\n          property_value_p->value = ECMA_VALUE_UNINITIALIZED;\n        }\n      }\n    }\n\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n  while (prop_iter_cp != JMEM_CP_NULL);\n\n  ecma_deref_object (lex_env_p);\n  return new_lex_env_p;\n} /* ecma_clone_decl_lexical_environment */\n\n/**\n * Create a property in an object and link it into\n * the object's properties' linked-list (at start of the list).\n *\n * @return pointer to the newly created property value\n */\nstatic ecma_property_value_t *\necma_create_property (ecma_object_t *object_p, /**< the object */\n                      ecma_string_t *name_p, /**< property name */\n                      uint8_t type_and_flags, /**< type and flags, see ecma_property_info_t */\n                      ecma_property_value_t value, /**< property value */\n                      ecma_property_t **out_prop_p) /**< [out] the property is also returned\n                                                     *         if this field is non-NULL */\n{\n  JERRY_ASSERT (ECMA_PROPERTY_PAIR_ITEM_COUNT == 2);\n  JERRY_ASSERT (name_p != NULL);\n  JERRY_ASSERT (object_p != NULL);\n\n  jmem_cpointer_t *property_list_head_p = &object_p->u1.property_list_cp;\n\n  if (*property_list_head_p != ECMA_NULL_POINTER)\n  {\n    /* If the first entry is free (deleted), it is reused. */\n    ecma_property_header_t *first_property_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                          *property_list_head_p);\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n    bool has_hashmap = false;\n\n    if (first_property_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n    {\n      property_list_head_p = &first_property_p->next_property_cp;\n      first_property_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                    *property_list_head_p);\n      has_hashmap = true;\n    }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (first_property_p));\n\n    if (first_property_p->types[0] == ECMA_PROPERTY_TYPE_DELETED)\n    {\n      ecma_property_pair_t *first_property_pair_p = (ecma_property_pair_t *) first_property_p;\n\n      ecma_property_t name_type;\n      first_property_pair_p->names_cp[0] = ecma_string_to_property_name (name_p,\n                                                                         &name_type);\n      first_property_p->types[0] = (ecma_property_t) (type_and_flags | name_type);\n\n      ecma_property_t *property_p = first_property_p->types + 0;\n\n      JERRY_ASSERT (ECMA_PROPERTY_VALUE_PTR (property_p) == first_property_pair_p->values + 0);\n\n      if (out_prop_p != NULL)\n      {\n        *out_prop_p = property_p;\n      }\n\n      first_property_pair_p->values[0] = value;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n      /* The property must be fully initialized before ecma_property_hashmap_insert\n       * is called, because the insert operation may reallocate the hashmap, and\n       * that triggers garbage collection which scans all properties of all objects.\n       * A not fully initialized but queued property may cause a crash. */\n\n      if (has_hashmap)\n      {\n        ecma_property_hashmap_insert (object_p,\n                                      name_p,\n                                      first_property_pair_p,\n                                      0);\n      }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n      return first_property_pair_p->values + 0;\n    }\n  }\n\n  /* Otherwise we create a new property pair and use its second value. */\n  ecma_property_pair_t *first_property_pair_p = ecma_alloc_property_pair ();\n\n  /* Need to query property_list_head_p again and recheck the existennce\n   * of property hasmap, because ecma_alloc_property_pair may delete them. */\n  property_list_head_p = &object_p->u1.property_list_cp;\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  bool has_hashmap = false;\n\n  if (*property_list_head_p != ECMA_NULL_POINTER)\n  {\n    ecma_property_header_t *first_property_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                          *property_list_head_p);\n\n    if (first_property_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n    {\n      property_list_head_p = &first_property_p->next_property_cp;\n      has_hashmap = true;\n    }\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  /* Just copy the previous value (no need to decompress, compress). */\n  first_property_pair_p->header.next_property_cp = *property_list_head_p;\n  first_property_pair_p->header.types[0] = ECMA_PROPERTY_TYPE_DELETED;\n  first_property_pair_p->names_cp[0] = LIT_INTERNAL_MAGIC_STRING_DELETED;\n\n  ecma_property_t name_type;\n  first_property_pair_p->names_cp[1] = ecma_string_to_property_name (name_p,\n                                                                     &name_type);\n\n  first_property_pair_p->header.types[1] = (ecma_property_t) (type_and_flags | name_type);\n\n  ECMA_SET_NON_NULL_POINTER (*property_list_head_p, &first_property_pair_p->header);\n\n  ecma_property_t *property_p = first_property_pair_p->header.types + 1;\n\n  JERRY_ASSERT (ECMA_PROPERTY_VALUE_PTR (property_p) == first_property_pair_p->values + 1);\n\n  if (out_prop_p != NULL)\n  {\n    *out_prop_p = property_p;\n  }\n\n  first_property_pair_p->values[1] = value;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  /* See the comment before the other ecma_property_hashmap_insert above. */\n\n  if (has_hashmap)\n  {\n    ecma_property_hashmap_insert (object_p,\n                                  name_p,\n                                  first_property_pair_p,\n                                  1);\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  return first_property_pair_p->values + 1;\n} /* ecma_create_property */\n\n/**\n * Create named data property with given name, attributes and undefined value\n * in the specified object.\n *\n * @return pointer to the newly created property value\n */\necma_property_value_t *\necma_create_named_data_property (ecma_object_t *object_p, /**< object */\n                                 ecma_string_t *name_p, /**< property name */\n                                 uint8_t prop_attributes, /**< property attributes (See: ecma_property_flags_t) */\n                                 ecma_property_t **out_prop_p) /**< [out] the property is also returned\n                                                                *         if this field is non-NULL */\n{\n  JERRY_ASSERT (object_p != NULL && name_p != NULL);\n  JERRY_ASSERT (ecma_is_lexical_environment (object_p)\n                || !ecma_op_object_is_fast_array (object_p));\n  JERRY_ASSERT (ecma_find_named_property (object_p, name_p) == NULL);\n  JERRY_ASSERT ((prop_attributes & ~ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE) == 0);\n\n  uint8_t type_and_flags = ECMA_PROPERTY_FLAG_DATA | prop_attributes;\n\n  ecma_property_value_t value;\n  value.value = ECMA_VALUE_UNDEFINED;\n\n  return ecma_create_property (object_p, name_p, type_and_flags, value, out_prop_p);\n} /* ecma_create_named_data_property */\n\n/**\n * Create named accessor property with given name, attributes, getter and setter.\n *\n * @return pointer to the newly created property value\n */\necma_property_value_t *\necma_create_named_accessor_property (ecma_object_t *object_p, /**< object */\n                                     ecma_string_t *name_p, /**< property name */\n                                     ecma_object_t *get_p, /**< getter */\n                                     ecma_object_t *set_p, /**< setter */\n                                     uint8_t prop_attributes, /**< property attributes */\n                                     ecma_property_t **out_prop_p) /**< [out] the property is also returned\n                                                                    *         if this field is non-NULL */\n{\n  JERRY_ASSERT (object_p != NULL && name_p != NULL);\n  JERRY_ASSERT (ecma_is_lexical_environment (object_p)\n                || !ecma_op_object_is_fast_array (object_p));\n  JERRY_ASSERT (ecma_find_named_property (object_p, name_p) == NULL);\n  JERRY_ASSERT ((prop_attributes & ~ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE) == 0);\n\n  uint8_t type_and_flags = prop_attributes;\n\n  ecma_property_value_t value;\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  ecma_getter_setter_pointers_t *getter_setter_pair_p;\n  getter_setter_pair_p = jmem_pools_alloc (sizeof (ecma_getter_setter_pointers_t));\n  ECMA_SET_POINTER (getter_setter_pair_p->getter_cp, get_p);\n  ECMA_SET_POINTER (getter_setter_pair_p->setter_cp, set_p);\n  ECMA_SET_NON_NULL_POINTER (value.getter_setter_pair_cp, getter_setter_pair_p);\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n  ECMA_SET_POINTER (value.getter_setter_pair.getter_cp, get_p);\n  ECMA_SET_POINTER (value.getter_setter_pair.setter_cp, set_p);\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n  return ecma_create_property (object_p, name_p, type_and_flags, value, out_prop_p);\n} /* ecma_create_named_accessor_property */\n\n/**\n * Find named data property or named accessor property in a specified object.\n *\n * @return pointer to the property, if it is found,\n *         NULL - otherwise.\n */\necma_property_t *\necma_find_named_property (ecma_object_t *obj_p, /**< object to find property in */\n                          ecma_string_t *name_p) /**< property's name */\n{\n  JERRY_ASSERT (obj_p != NULL);\n  JERRY_ASSERT (name_p != NULL);\n  JERRY_ASSERT (ecma_is_lexical_environment (obj_p)\n                || !ecma_op_object_is_fast_array (obj_p));\n\n  ecma_property_t *property_p = NULL;\n\n#if ENABLED (JERRY_LCACHE)\n  property_p = ecma_lcache_lookup (obj_p, name_p);\n  if (property_p != NULL)\n  {\n    return property_p;\n  }\n#endif /* ENABLED (JERRY_LCACHE) */\n\n  jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  if (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                     prop_iter_cp);\n    if (prop_iter_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n    {\n      jmem_cpointer_t property_real_name_cp;\n      property_p = ecma_property_hashmap_find ((ecma_property_hashmap_t *) prop_iter_p,\n                                               name_p,\n                                               &property_real_name_cp);\n#if ENABLED (JERRY_LCACHE)\n      if (property_p != NULL\n          && !ecma_is_property_lcached (property_p))\n      {\n        ecma_lcache_insert (obj_p, property_real_name_cp, property_p);\n      }\n#endif /* ENABLED (JERRY_LCACHE) */\n      return property_p;\n    }\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  uint32_t steps = 0;\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n  jmem_cpointer_t property_name_cp = ECMA_NULL_POINTER;\n\n  if (ECMA_IS_DIRECT_STRING (name_p))\n  {\n    ecma_property_t prop_name_type = (ecma_property_t) ECMA_GET_DIRECT_STRING_TYPE (name_p);\n    property_name_cp = (jmem_cpointer_t) ECMA_GET_DIRECT_STRING_VALUE (name_p);\n\n    JERRY_ASSERT (prop_name_type > 0);\n\n    while (prop_iter_cp != JMEM_CP_NULL)\n    {\n      ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                       prop_iter_cp);\n\n      JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n      ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n      if (prop_pair_p->names_cp[0] == property_name_cp\n          && ECMA_PROPERTY_GET_NAME_TYPE (prop_iter_p->types[0]) == prop_name_type)\n      {\n        JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (prop_iter_p->types[0]));\n\n        property_p = prop_iter_p->types + 0;\n        break;\n      }\n\n      if (prop_pair_p->names_cp[1] == property_name_cp\n          && ECMA_PROPERTY_GET_NAME_TYPE (prop_iter_p->types[1]) == prop_name_type)\n      {\n        JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (prop_iter_p->types[1]));\n\n        property_p = prop_iter_p->types + 1;\n        break;\n      }\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n      steps++;\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n      prop_iter_cp = prop_iter_p->next_property_cp;\n    }\n  }\n  else\n  {\n    while (prop_iter_cp != JMEM_CP_NULL)\n    {\n      ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                       prop_iter_cp);\n\n      JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n      ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n      if (ECMA_PROPERTY_GET_NAME_TYPE (prop_iter_p->types[0]) == ECMA_DIRECT_STRING_PTR)\n      {\n        property_name_cp = prop_pair_p->names_cp[0];\n        ecma_string_t *prop_name_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, property_name_cp);\n\n        if (ecma_compare_ecma_non_direct_strings (name_p, prop_name_p))\n        {\n          property_p = prop_iter_p->types + 0;\n          break;\n        }\n      }\n\n      if (ECMA_PROPERTY_GET_NAME_TYPE (prop_iter_p->types[1]) == ECMA_DIRECT_STRING_PTR)\n      {\n        property_name_cp = prop_pair_p->names_cp[1];\n        ecma_string_t *prop_name_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, property_name_cp);\n\n        if (ecma_compare_ecma_non_direct_strings (name_p, prop_name_p))\n        {\n          property_p = prop_iter_p->types + 1;\n          break;\n        }\n      }\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n      steps++;\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n      prop_iter_cp = prop_iter_p->next_property_cp;\n    }\n  }\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  if (steps >= (ECMA_PROPERTY_HASMAP_MINIMUM_SIZE / 2))\n  {\n    ecma_property_hashmap_create (obj_p);\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n#if ENABLED (JERRY_LCACHE)\n  if (property_p != NULL\n      && !ecma_is_property_lcached (property_p))\n  {\n    ecma_lcache_insert (obj_p, property_name_cp, property_p);\n  }\n#endif /* ENABLED (JERRY_LCACHE) */\n\n  return property_p;\n} /* ecma_find_named_property */\n\n/**\n * Get named data property or named access property in specified object.\n *\n * Warning:\n *         the property must exist\n *\n * @return pointer to the property, if it is found,\n *         NULL - otherwise.\n */\necma_property_value_t *\necma_get_named_data_property (ecma_object_t *obj_p, /**< object to find property in */\n                              ecma_string_t *name_p) /**< property's name */\n{\n  JERRY_ASSERT (obj_p != NULL);\n  JERRY_ASSERT (name_p != NULL);\n  JERRY_ASSERT (ecma_is_lexical_environment (obj_p)\n                || !ecma_op_object_is_fast_array (obj_p));\n\n  ecma_property_t *property_p = ecma_find_named_property (obj_p, name_p);\n\n  JERRY_ASSERT (property_p != NULL && ECMA_PROPERTY_IS_RAW_DATA (*property_p));\n\n  return ECMA_PROPERTY_VALUE_PTR (property_p);\n} /* ecma_get_named_data_property */\n\n/**\n * Free property values and change their type to deleted.\n *\n * Note:\n *     internal properties are not supported\n */\nvoid\necma_free_property (ecma_object_t *object_p, /**< object the property belongs to */\n                    jmem_cpointer_t name_cp, /**< name of the property or ECMA_NULL_POINTER */\n                    ecma_property_t *property_p) /**< property */\n{\n  JERRY_ASSERT (object_p != NULL && property_p != NULL);\n  JERRY_ASSERT (ECMA_PROPERTY_IS_RAW (*property_p));\n\n  if (*property_p & ECMA_PROPERTY_FLAG_DATA)\n  {\n    ecma_free_value_if_not_object (ECMA_PROPERTY_VALUE_PTR (property_p)->value);\n  }\n  else\n  {\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n    ecma_getter_setter_pointers_t *getter_setter_pair_p;\n    getter_setter_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t,\n                                                      ECMA_PROPERTY_VALUE_PTR (property_p)->getter_setter_pair_cp);\n    jmem_pools_free (getter_setter_pair_p, sizeof (ecma_getter_setter_pointers_t));\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n  }\n\n#if ENABLED (JERRY_LCACHE)\n  if (ecma_is_property_lcached (property_p))\n  {\n    ecma_lcache_invalidate (object_p, name_cp, property_p);\n  }\n#endif /* ENABLED (JERRY_LCACHE) */\n\n  if (ECMA_PROPERTY_GET_NAME_TYPE (*property_p) == ECMA_DIRECT_STRING_PTR)\n  {\n    ecma_string_t *prop_name_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, name_cp);\n    ecma_deref_ecma_string (prop_name_p);\n  }\n} /* ecma_free_property */\n\n/**\n * Delete the object's property referenced by its value pointer.\n *\n * Note: specified property must be owned by specified object.\n */\nvoid\necma_delete_property (ecma_object_t *object_p, /**< object */\n                      ecma_property_value_t *prop_value_p) /**< property value reference */\n{\n  jmem_cpointer_t cur_prop_cp = object_p->u1.property_list_cp;\n\n  ecma_property_header_t *prev_prop_p = NULL;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  ecma_property_hashmap_delete_status hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP;\n\n  if (cur_prop_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *cur_prop_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                    cur_prop_cp);\n\n    if (cur_prop_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n    {\n      prev_prop_p = cur_prop_p;\n      cur_prop_cp = cur_prop_p->next_property_cp;\n      hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP;\n    }\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  while (cur_prop_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *cur_prop_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                    cur_prop_cp);\n\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (cur_prop_p));\n\n    ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) cur_prop_p;\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      if ((prop_pair_p->values + i) == prop_value_p)\n      {\n        JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (cur_prop_p->types[i]));\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n        if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP)\n        {\n          hashmap_status = ecma_property_hashmap_delete (object_p,\n                                                         prop_pair_p->names_cp[i],\n                                                         cur_prop_p->types + i);\n        }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n        ecma_free_property (object_p, prop_pair_p->names_cp[i], cur_prop_p->types + i);\n        cur_prop_p->types[i] = ECMA_PROPERTY_TYPE_DELETED;\n        prop_pair_p->names_cp[i] = LIT_INTERNAL_MAGIC_STRING_DELETED;\n\n        JERRY_ASSERT (ECMA_PROPERTY_PAIR_ITEM_COUNT == 2);\n\n        if (cur_prop_p->types[1 - i] != ECMA_PROPERTY_TYPE_DELETED)\n        {\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n          /* The other property is still valid. */\n          if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP)\n          {\n            ecma_property_hashmap_free (object_p);\n            ecma_property_hashmap_create (object_p);\n          }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n          return;\n        }\n\n        JERRY_ASSERT (cur_prop_p->types[i] == ECMA_PROPERTY_TYPE_DELETED);\n\n        if (prev_prop_p == NULL)\n        {\n          object_p->u1.property_list_cp = cur_prop_p->next_property_cp;\n        }\n        else\n        {\n          prev_prop_p->next_property_cp = cur_prop_p->next_property_cp;\n        }\n\n        ecma_dealloc_property_pair ((ecma_property_pair_t *) cur_prop_p);\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n        if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP)\n        {\n          ecma_property_hashmap_free (object_p);\n          ecma_property_hashmap_create (object_p);\n        }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n        return;\n      }\n    }\n\n    prev_prop_p = cur_prop_p;\n    cur_prop_cp = cur_prop_p->next_property_cp;\n  }\n} /* ecma_delete_property */\n\n/**\n * Check whether the object contains a property\n */\nstatic void\necma_assert_object_contains_the_property (const ecma_object_t *object_p, /**< ecma-object */\n                                          const ecma_property_value_t *prop_value_p, /**< property value */\n                                          bool is_data) /**< property should be data property */\n{\n#ifndef JERRY_NDEBUG\n  jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp;\n  JERRY_ASSERT (prop_iter_cp != JMEM_CP_NULL);\n\n  ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n\n  if (prop_iter_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n  {\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n\n  while (prop_iter_cp != JMEM_CP_NULL)\n  {\n    prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      if ((prop_pair_p->values + i) == prop_value_p)\n      {\n        JERRY_ASSERT (is_data == ((prop_pair_p->header.types[i] & ECMA_PROPERTY_FLAG_DATA) != 0));\n        return;\n      }\n    }\n\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n#else /* JERRY_NDEBUG */\n  JERRY_UNUSED (object_p);\n  JERRY_UNUSED (prop_value_p);\n  JERRY_UNUSED (is_data);\n#endif /* !JERRY_NDEBUG */\n} /* ecma_assert_object_contains_the_property */\n\n/**\n * Assign value to named data property\n *\n * Note:\n *      value previously stored in the property is freed\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_named_data_property_assign_value (ecma_object_t *obj_p, /**< object */\n                                       ecma_property_value_t *prop_value_p, /**< property value reference */\n                                       ecma_value_t value) /**< value to assign */\n{\n  ecma_assert_object_contains_the_property (obj_p, prop_value_p, true);\n\n  ecma_value_assign_value (&prop_value_p->value, value);\n} /* ecma_named_data_property_assign_value */\n\n/**\n * Get named accessor property getter-setter-pair\n *\n * @return pointer to object's getter-setter pair\n */\necma_getter_setter_pointers_t *\necma_get_named_accessor_property (const ecma_property_value_t *prop_value_p) /**< property value reference */\n{\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  return ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t, prop_value_p->getter_setter_pair_cp);\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n  return (ecma_getter_setter_pointers_t *) &prop_value_p->getter_setter_pair;\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n} /* ecma_get_named_accessor_property */\n\n/**\n * Set getter of named accessor property\n */\nvoid\necma_set_named_accessor_property_getter (ecma_object_t *object_p, /**< the property's container */\n                                         ecma_property_value_t *prop_value_p, /**< property value reference */\n                                         ecma_object_t *getter_p) /**< getter object */\n{\n  ecma_assert_object_contains_the_property (object_p, prop_value_p, false);\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  ecma_getter_setter_pointers_t *getter_setter_pair_p;\n  getter_setter_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t,\n                                                    prop_value_p->getter_setter_pair_cp);\n  ECMA_SET_POINTER (getter_setter_pair_p->getter_cp, getter_p);\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n  ECMA_SET_POINTER (prop_value_p->getter_setter_pair.getter_cp, getter_p);\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n} /* ecma_set_named_accessor_property_getter */\n\n/**\n * Set setter of named accessor property\n */\nvoid\necma_set_named_accessor_property_setter (ecma_object_t *object_p, /**< the property's container */\n                                         ecma_property_value_t *prop_value_p, /**< property value reference */\n                                         ecma_object_t *setter_p) /**< setter object */\n{\n  ecma_assert_object_contains_the_property (object_p, prop_value_p, false);\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  ecma_getter_setter_pointers_t *getter_setter_pair_p;\n  getter_setter_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t,\n                                                    prop_value_p->getter_setter_pair_cp);\n  ECMA_SET_POINTER (getter_setter_pair_p->setter_cp, setter_p);\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n  ECMA_SET_POINTER (prop_value_p->getter_setter_pair.setter_cp, setter_p);\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n} /* ecma_set_named_accessor_property_setter */\n\n/**\n * Get property's 'Writable' attribute value\n *\n * @return true - property is writable,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_is_property_writable (ecma_property_t property) /**< property */\n{\n  JERRY_ASSERT (property & ECMA_PROPERTY_FLAG_DATA);\n\n  return (property & ECMA_PROPERTY_FLAG_WRITABLE) != 0;\n} /* ecma_is_property_writable */\n\n/**\n * Set property's 'Writable' attribute value\n */\nvoid\necma_set_property_writable_attr (ecma_property_t *property_p, /**< [in,out] property */\n                                 bool is_writable) /**< new value for writable flag */\n{\n  JERRY_ASSERT (ECMA_PROPERTY_IS_RAW_DATA (*property_p));\n\n  if (is_writable)\n  {\n    *property_p = (uint8_t) (*property_p | ECMA_PROPERTY_FLAG_WRITABLE);\n  }\n  else\n  {\n    *property_p = (uint8_t) (*property_p & ~ECMA_PROPERTY_FLAG_WRITABLE);\n  }\n} /* ecma_set_property_writable_attr */\n\n/**\n * Get property's 'Enumerable' attribute value\n *\n * @return true - property is enumerable,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_is_property_enumerable (ecma_property_t property) /**< property */\n{\n  JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (property));\n\n  return (property & ECMA_PROPERTY_FLAG_ENUMERABLE) != 0;\n} /* ecma_is_property_enumerable */\n\n/**\n * Set property's 'Enumerable' attribute value\n */\nvoid\necma_set_property_enumerable_attr (ecma_property_t *property_p, /**< [in,out] property */\n                                   bool is_enumerable) /**< new value for enumerable flag */\n{\n  JERRY_ASSERT (ECMA_PROPERTY_IS_RAW (*property_p));\n\n  if (is_enumerable)\n  {\n    *property_p = (uint8_t) (*property_p | ECMA_PROPERTY_FLAG_ENUMERABLE);\n  }\n  else\n  {\n    *property_p = (uint8_t) (*property_p & ~ECMA_PROPERTY_FLAG_ENUMERABLE);\n  }\n} /* ecma_set_property_enumerable_attr */\n\n/**\n * Get property's 'Configurable' attribute value\n *\n * @return true - property is configurable,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_is_property_configurable (ecma_property_t property) /**< property */\n{\n  JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (property));\n\n  return (property & ECMA_PROPERTY_FLAG_CONFIGURABLE) != 0;\n} /* ecma_is_property_configurable */\n\n/**\n * Set property's 'Configurable' attribute value\n */\nvoid\necma_set_property_configurable_attr (ecma_property_t *property_p, /**< [in,out] property */\n                                     bool is_configurable) /**< new value for configurable flag */\n{\n  JERRY_ASSERT (ECMA_PROPERTY_IS_RAW (*property_p));\n\n  if (is_configurable)\n  {\n    *property_p = (uint8_t) (*property_p | ECMA_PROPERTY_FLAG_CONFIGURABLE);\n  }\n  else\n  {\n    *property_p = (uint8_t) (*property_p & ~ECMA_PROPERTY_FLAG_CONFIGURABLE);\n  }\n} /* ecma_set_property_configurable_attr */\n\n#if ENABLED (JERRY_LCACHE)\n\n/**\n * Check whether the property is registered in LCache\n *\n * @return true / false\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_is_property_lcached (ecma_property_t *property_p) /**< property */\n{\n  JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (*property_p));\n\n  return (*property_p & ECMA_PROPERTY_FLAG_LCACHED) != 0;\n} /* ecma_is_property_lcached */\n\n/**\n * Set value of flag indicating whether the property is registered in LCache\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\necma_set_property_lcached (ecma_property_t *property_p, /**< property */\n                           bool is_lcached) /**< new value for lcached flag */\n{\n  JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (*property_p));\n\n  if (is_lcached)\n  {\n    *property_p = (uint8_t) (*property_p | ECMA_PROPERTY_FLAG_LCACHED);\n  }\n  else\n  {\n    *property_p = (uint8_t) (*property_p & ~ECMA_PROPERTY_FLAG_LCACHED);\n  }\n} /* ecma_set_property_lcached */\n\n#endif /* ENABLED (JERRY_LCACHE) */\n\n/**\n * Construct empty property descriptor, i.e.:\n *  property descriptor with all is_defined flags set to false and the rest - to default value.\n *\n * @return empty property descriptor\n */\necma_property_descriptor_t\necma_make_empty_property_descriptor (void)\n{\n  ecma_property_descriptor_t prop_desc;\n\n  prop_desc.flags = 0;\n  prop_desc.value = ECMA_VALUE_UNDEFINED;\n  prop_desc.get_p = NULL;\n  prop_desc.set_p = NULL;\n\n  return prop_desc;\n} /* ecma_make_empty_property_descriptor */\n\n/**\n * Free values contained in the property descriptor\n * and make it empty property descriptor\n */\nvoid\necma_free_property_descriptor (ecma_property_descriptor_t *prop_desc_p) /**< property descriptor */\n{\n  if (prop_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n  {\n    ecma_free_value (prop_desc_p->value);\n  }\n\n  if ((prop_desc_p->flags & ECMA_PROP_IS_GET_DEFINED)\n      && prop_desc_p->get_p != NULL)\n  {\n    ecma_deref_object (prop_desc_p->get_p);\n  }\n\n  if ((prop_desc_p->flags & ECMA_PROP_IS_SET_DEFINED)\n      && prop_desc_p->set_p != NULL)\n  {\n    ecma_deref_object (prop_desc_p->set_p);\n  }\n\n  *prop_desc_p = ecma_make_empty_property_descriptor ();\n} /* ecma_free_property_descriptor */\n\n/**\n * The size of error reference must be 8 bytes to use jmem_pools_alloc().\n */\nJERRY_STATIC_ASSERT (sizeof (ecma_extended_primitive_t) == 8,\n                     ecma_error_reference_size_must_be_8_bytes);\n\n/**\n * Increase ref count of an extended primitve value.\n */\nvoid\necma_ref_extended_primitive (ecma_extended_primitive_t *primitve_p) /**< extended primitve value */\n{\n  if (JERRY_LIKELY (primitve_p->refs_and_type < ECMA_EXTENDED_PRIMITIVE_MAX_REF))\n  {\n    primitve_p->refs_and_type += ECMA_EXTENDED_PRIMITIVE_REF_ONE;\n  }\n  else\n  {\n    jerry_fatal (ERR_REF_COUNT_LIMIT);\n  }\n} /* ecma_ref_extended_primitive */\n\n/**\n * Decrease ref count of an error reference.\n */\nvoid\necma_deref_error_reference (ecma_extended_primitive_t *error_ref_p) /**< error reference */\n{\n  JERRY_ASSERT (error_ref_p->refs_and_type >= ECMA_EXTENDED_PRIMITIVE_REF_ONE);\n\n  error_ref_p->refs_and_type -= ECMA_EXTENDED_PRIMITIVE_REF_ONE;\n\n  if (error_ref_p->refs_and_type < ECMA_EXTENDED_PRIMITIVE_REF_ONE)\n  {\n    ecma_free_value (error_ref_p->u.value);\n    jmem_pools_free (error_ref_p, sizeof (ecma_extended_primitive_t));\n  }\n} /* ecma_deref_error_reference */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/**\n * Decrease ref count of a bigint value.\n */\nvoid\necma_deref_bigint (ecma_extended_primitive_t *bigint_p) /**< bigint value */\n{\n  JERRY_ASSERT (bigint_p->refs_and_type >= ECMA_EXTENDED_PRIMITIVE_REF_ONE);\n\n  bigint_p->refs_and_type -= ECMA_EXTENDED_PRIMITIVE_REF_ONE;\n\n  if (bigint_p->refs_and_type >= ECMA_EXTENDED_PRIMITIVE_REF_ONE)\n  {\n    return;\n  }\n\n  uint32_t size = ECMA_BIGINT_GET_SIZE (bigint_p);\n\n  JERRY_ASSERT (size > 0);\n\n  size_t mem_size = ECMA_BIGINT_GET_BYTE_SIZE (size) + sizeof (ecma_extended_primitive_t);\n  jmem_heap_free_block (bigint_p, mem_size);\n} /* ecma_deref_bigint */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/**\n * Create an error reference from a given value.\n *\n * Note:\n *   Reference of the value is taken.\n *\n * @return error reference value\n */\necma_value_t\necma_create_error_reference (ecma_value_t value, /**< referenced value */\n                             bool is_exception) /**< error reference is an exception */\n{\n  ecma_extended_primitive_t *error_ref_p;\n  error_ref_p = (ecma_extended_primitive_t *) jmem_pools_alloc (sizeof (ecma_extended_primitive_t));\n\n  error_ref_p->refs_and_type = (ECMA_EXTENDED_PRIMITIVE_REF_ONE\n                                | (is_exception ? ECMA_EXTENDED_PRIMITIVE_ERROR : ECMA_EXTENDED_PRIMITIVE_ABORT));\n  error_ref_p->u.value = value;\n  return ecma_make_extended_primitive_value (error_ref_p, ECMA_TYPE_ERROR);\n} /* ecma_create_error_reference */\n\n/**\n * Create an error reference from the currently thrown error value.\n *\n * @return error reference value\n */\necma_value_t\necma_create_error_reference_from_context (void)\n{\n  bool is_abort = jcontext_has_pending_abort ();\n\n  if (is_abort)\n  {\n    jcontext_set_abort_flag (false);\n  }\n  return ecma_create_error_reference (jcontext_take_exception (), !is_abort);\n} /* ecma_create_error_reference_from_context */\n\n/**\n * Create an error reference from a given object.\n *\n * Note:\n *   Reference of the value is taken.\n *\n * @return error reference value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_create_error_object_reference (ecma_object_t *object_p) /**< referenced object */\n{\n  return ecma_create_error_reference (ecma_make_object_value (object_p), true);\n} /* ecma_create_error_object_reference */\n\n/**\n * Raise error from the given error reference.\n *\n * Note: the error reference's ref count is also decreased\n */\nvoid\necma_raise_error_from_error_reference (ecma_value_t value) /**< error reference */\n{\n  JERRY_ASSERT (!jcontext_has_pending_exception () && !jcontext_has_pending_abort ());\n  ecma_extended_primitive_t *error_ref_p = ecma_get_extended_primitive_from_value (value);\n\n  JERRY_ASSERT (error_ref_p->refs_and_type >= ECMA_EXTENDED_PRIMITIVE_REF_ONE);\n\n  ecma_value_t referenced_value = error_ref_p->u.value;\n\n  jcontext_set_exception_flag (true);\n  jcontext_set_abort_flag (ECMA_EXTENDED_PRIMITIVE_GET_TYPE (error_ref_p) == ECMA_EXTENDED_PRIMITIVE_ABORT);\n\n  if (error_ref_p->refs_and_type >= 2 * ECMA_EXTENDED_PRIMITIVE_REF_ONE)\n  {\n    error_ref_p->refs_and_type -= ECMA_EXTENDED_PRIMITIVE_REF_ONE;\n    referenced_value = ecma_copy_value (referenced_value);\n  }\n  else\n  {\n    jmem_pools_free (error_ref_p, sizeof (ecma_extended_primitive_t));\n  }\n\n  JERRY_CONTEXT (error_value) = referenced_value;\n} /* ecma_raise_error_from_error_reference */\n\n/**\n * Increase reference counter of Compact\n * Byte Code or regexp byte code.\n */\nvoid\necma_bytecode_ref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */\n{\n  /* Abort program if maximum reference number is reached. */\n  if (bytecode_p->refs >= UINT16_MAX)\n  {\n    jerry_fatal (ERR_REF_COUNT_LIMIT);\n  }\n\n  bytecode_p->refs++;\n} /* ecma_bytecode_ref */\n\n/**\n * Decrease reference counter of Compact\n * Byte Code or regexp byte code.\n */\nvoid\necma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */\n{\n  JERRY_ASSERT (bytecode_p->refs > 0);\n  JERRY_ASSERT (!CBC_IS_FUNCTION (bytecode_p->status_flags)\n                || !(bytecode_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION));\n\n  bytecode_p->refs--;\n\n  if (bytecode_p->refs > 0)\n  {\n    /* Non-zero reference counter. */\n    return;\n  }\n\n  if (CBC_IS_FUNCTION (bytecode_p->status_flags))\n  {\n    ecma_value_t *literal_start_p = NULL;\n    uint32_t literal_end;\n    uint32_t const_literal_end;\n\n    if (bytecode_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n    {\n      cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_p;\n      literal_end = args_p->literal_end;\n      const_literal_end = args_p->const_literal_end;\n\n      literal_start_p = (ecma_value_t *) ((uint8_t *) bytecode_p + sizeof (cbc_uint16_arguments_t));\n      literal_start_p -= args_p->register_end;\n    }\n    else\n    {\n      cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_p;\n      literal_end = args_p->literal_end;\n      const_literal_end = args_p->const_literal_end;\n\n      literal_start_p = (ecma_value_t *) ((uint8_t *) bytecode_p + sizeof (cbc_uint8_arguments_t));\n      literal_start_p -= args_p->register_end;\n    }\n\n    for (uint32_t i = const_literal_end; i < literal_end; i++)\n    {\n      ecma_compiled_code_t *bytecode_literal_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t,\n                                                                                  literal_start_p[i]);\n\n      /* Self references are ignored. */\n      if (bytecode_literal_p != bytecode_p)\n      {\n        ecma_bytecode_deref (bytecode_literal_p);\n      }\n    }\n\n#if ENABLED (JERRY_DEBUGGER)\n    if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n        && !(bytecode_p->status_flags & CBC_CODE_FLAGS_DEBUGGER_IGNORE)\n        && jerry_debugger_send_function_cp (JERRY_DEBUGGER_RELEASE_BYTE_CODE_CP, bytecode_p))\n    {\n      /* Delay the byte code free until the debugger client is notified.\n       * If the connection is aborted the pointer is still freed by\n       * jerry_debugger_close_connection(). */\n      jerry_debugger_byte_code_free_t *byte_code_free_p = (jerry_debugger_byte_code_free_t *) bytecode_p;\n      jmem_cpointer_t byte_code_free_head = JERRY_CONTEXT (debugger_byte_code_free_head);\n\n      byte_code_free_p->prev_cp = ECMA_NULL_POINTER;\n\n      jmem_cpointer_t byte_code_free_cp;\n      JMEM_CP_SET_NON_NULL_POINTER (byte_code_free_cp, byte_code_free_p);\n\n      if (byte_code_free_head == ECMA_NULL_POINTER)\n      {\n        JERRY_CONTEXT (debugger_byte_code_free_tail) = byte_code_free_cp;\n      }\n      else\n      {\n        jerry_debugger_byte_code_free_t *first_byte_code_free_p;\n\n        first_byte_code_free_p = JMEM_CP_GET_NON_NULL_POINTER (jerry_debugger_byte_code_free_t,\n                                                               byte_code_free_head);\n        first_byte_code_free_p->prev_cp = byte_code_free_cp;\n      }\n\n      JERRY_CONTEXT (debugger_byte_code_free_head) = byte_code_free_cp;\n      return;\n    }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_ESNEXT)\n    if (bytecode_p->status_flags & CBC_CODE_FLAGS_HAS_TAGGED_LITERALS)\n    {\n      ecma_collection_t *collection_p = ecma_compiled_code_get_tagged_template_collection (bytecode_p);\n\n      /* Since the objects in the tagged template collection are not strong referenced anymore by the compiled code\n         we can treat them as 'new' objects. */\n      JERRY_CONTEXT (ecma_gc_new_objects) += collection_p->item_count * 2;\n      ecma_collection_free_template_literal (collection_p);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_MEM_STATS)\n    jmem_stats_free_byte_code_bytes (((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n  }\n  else\n  {\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n    re_compiled_code_t *re_bytecode_p = (re_compiled_code_t *) bytecode_p;\n\n    ecma_deref_ecma_string (ecma_get_string_from_value (re_bytecode_p->source));\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n  }\n\n  jmem_heap_free_block (bytecode_p,\n                        ((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG);\n} /* ecma_bytecode_deref */\n\n/**\n * Resolve the position of the arguments list start of the compiled code\n *\n * @return start position of the arguments list start of the compiled code\n */\necma_value_t *\necma_compiled_code_resolve_arguments_start (const ecma_compiled_code_t *bytecode_header_p) /**< compiled code */\n{\n  JERRY_ASSERT (bytecode_header_p != NULL);\n\n  uint8_t *byte_p = (uint8_t *) bytecode_header_p;\n  byte_p += ((size_t) bytecode_header_p->size) << JMEM_ALIGNMENT_LOG;\n\n  if (!(bytecode_header_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED))\n  {\n    return ((ecma_value_t *) byte_p);\n  }\n\n  if (JERRY_LIKELY (!(bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)))\n  {\n    return ((ecma_value_t *) byte_p) - ((cbc_uint8_arguments_t *) bytecode_header_p)->argument_end;\n  }\n\n  return ((ecma_value_t *) byte_p) - ((cbc_uint16_arguments_t *) bytecode_header_p)->argument_end;\n} /* ecma_compiled_code_resolve_arguments_start */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Resolve the position of the function name of the compiled code\n *\n * @return position of the function name of the compiled code\n */\nextern inline ecma_value_t * JERRY_ATTR_ALWAYS_INLINE\necma_compiled_code_resolve_function_name (const ecma_compiled_code_t *bytecode_header_p) /**< compiled code */\n{\n  JERRY_ASSERT (bytecode_header_p != NULL);\n  ecma_value_t *base_p = ecma_compiled_code_resolve_arguments_start (bytecode_header_p);\n\n  if (CBC_FUNCTION_GET_TYPE (bytecode_header_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)\n  {\n    base_p--;\n  }\n\n  return base_p;\n} /* ecma_compiled_code_resolve_function_name */\n\n/**\n * Get the extended info from a byte code\n *\n * @return extended info value\n */\nuint32_t\necma_compiled_code_resolve_extended_info (const ecma_compiled_code_t *bytecode_header_p) /**< compiled code */\n{\n  JERRY_ASSERT (bytecode_header_p != NULL);\n  JERRY_ASSERT (bytecode_header_p->status_flags & CBC_CODE_FLAGS_HAS_EXTENDED_INFO);\n\n  ecma_value_t *base_p = ecma_compiled_code_resolve_function_name (bytecode_header_p);\n  return base_p[-1];\n} /* ecma_compiled_code_resolve_extended_info */\n\n/**\n * Get the tagged template collection of the compiled code\n *\n * @return pointer to the tagged template collection\n */\necma_collection_t *\necma_compiled_code_get_tagged_template_collection (const ecma_compiled_code_t *bytecode_header_p) /**< compiled code */\n{\n  JERRY_ASSERT (bytecode_header_p != NULL);\n  JERRY_ASSERT (bytecode_header_p->status_flags & CBC_CODE_FLAGS_HAS_TAGGED_LITERALS);\n\n  ecma_value_t *base_p = ecma_compiled_code_resolve_function_name (bytecode_header_p);\n  int offset = (bytecode_header_p->status_flags & CBC_CODE_FLAGS_HAS_EXTENDED_INFO) ? -2 : -1;\n\n  return ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t, base_p[offset]);\n} /* ecma_compiled_code_get_tagged_template_collection */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Get the resource name of a compiled code.\n *\n * @return resource name value\n */\necma_value_t\necma_get_resource_name (const ecma_compiled_code_t *bytecode_p) /**< compiled code */\n{\n#if ENABLED (JERRY_RESOURCE_NAME)\n  if (bytecode_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_p;\n    ecma_value_t *lit_pool_p = (ecma_value_t *) ((uint8_t *) bytecode_p + sizeof (cbc_uint16_arguments_t));\n    return lit_pool_p[args_p->const_literal_end - args_p->register_end - 1];\n  }\n\n  cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_p;\n  ecma_value_t *lit_pool_p = (ecma_value_t *) ((uint8_t *) bytecode_p + sizeof (cbc_uint8_arguments_t));\n  return lit_pool_p[args_p->const_literal_end - args_p->register_end - 1];\n#else /* !ENABLED (JERRY_RESOURCE_NAME) */\n  JERRY_UNUSED (bytecode_p);\n  return ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);\n#endif /* !ENABLED (JERRY_RESOURCE_NAME) */\n} /* ecma_get_resource_name */\n\n#if (JERRY_STACK_LIMIT != 0)\n/**\n * Check the current stack usage by calculating the difference from the initial stack base.\n *\n * @return current stack usage in bytes\n */\nuintptr_t JERRY_ATTR_NOINLINE\necma_get_current_stack_usage (void)\n{\n  volatile int __sp;\n  return (uintptr_t) (JERRY_CONTEXT (stack_base) - (uintptr_t) &__sp);\n} /* ecma_get_current_stack_usage */\n\n#endif /* (JERRY_STACK_LIMIT != 0) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-helpers.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_HELPERS_H\n#define ECMA_HELPERS_H\n\n#include \"ecma-globals.h\"\n#include \"jmem.h\"\n#include \"lit-strings.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmahelpers Helpers for operations with ECMA data types\n * @{\n */\n\n/**\n * Get value of pointer from specified non-null compressed pointer.\n */\n#define ECMA_GET_NON_NULL_POINTER(type, field) JMEM_CP_GET_NON_NULL_POINTER (type, field)\n\n/**\n * Extract value of pointer from specified pointer-tag value\n */\n#define ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG(type, field) \\\n  JMEM_CP_GET_NON_NULL_POINTER_FROM_POINTER_TAG (type, field)\n\n/**\n * Get value of pointer from specified compressed pointer.\n */\n#define ECMA_GET_POINTER(type, field) JMEM_CP_GET_POINTER (type, field)\n\n/**\n * Set value of non-null compressed pointer so that it will correspond\n * to specified non_compressed_pointer.\n */\n#define ECMA_SET_NON_NULL_POINTER(field, non_compressed_pointer) JMEM_CP_SET_NON_NULL_POINTER (field, \\\n                                                                                               non_compressed_pointer)\n\n/**\n * Set value of pointer-tag value so that it will correspond\n * to specified non_compressed_pointer along with tag\n */\n#define ECMA_SET_NON_NULL_POINTER_TAG(field, non_compressed_pointer, tag) \\\n  JMEM_CP_SET_NON_NULL_POINTER_TAG (field, non_compressed_pointer, tag)\n\n/**\n * Set value of compressed pointer so that it will correspond\n * to specified non_compressed_pointer.\n */\n#define ECMA_SET_POINTER(field, non_compressed_pointer) JMEM_CP_SET_POINTER (field, non_compressed_pointer)\n\n/**\n * Get value of each tag bit from specified pointer-tag value\n */\n#define ECMA_GET_FIRST_BIT_FROM_POINTER_TAG(field) \\\n  JMEM_CP_GET_FIRST_BIT_FROM_POINTER_TAG (field) /**< get first tag bit from jmem_cpointer_tag_t **/\n#define ECMA_GET_SECOND_BIT_FROM_POINTER_TAG(field) \\\n  JMEM_CP_GET_SECOND_BIT_FROM_POINTER_TAG (field) /**< get second tag bit from jmem_cpointer_tag_t **/\n#define ECMA_GET_THIRD_BIT_FROM_POINTER_TAG(field) \\\n  JMEM_CP_GET_THIRD_BIT_FROM_POINTER_TAG (field) /**< get third tag bit from jmem_cpointer_tag_t **/\n\n/**\n * Set value of each tag bit to specified pointer-tag value\n */\n#define ECMA_SET_FIRST_BIT_TO_POINTER_TAG(field) \\\n  JMEM_CP_SET_FIRST_BIT_TO_POINTER_TAG (field) /**< set first tag bit to jmem_cpointer_tag_t **/\n#define ECMA_SET_SECOND_BIT_TO_POINTER_TAG(field) \\\n  JMEM_CP_SET_SECOND_BIT_TO_POINTER_TAG (field) /**< set second tag bit to jmem_cpointer_tag_t **/\n#define ECMA_SET_THIRD_BIT_TO_POINTER_TAG(field) \\\n  JMEM_CP_SET_THIRD_BIT_TO_POINTER_TAG (field) /**< set third tag bit to jmem_cpointer_tag_t **/\n\n/**\n * Status flags for ecma_string_get_chars function\n */\ntypedef enum\n{\n  ECMA_STRING_FLAG_EMPTY = 0,                /**< No options are provided. */\n  ECMA_STRING_FLAG_IS_ASCII = (1 << 0),      /**< The string contains only ASCII characters. */\n  ECMA_STRING_FLAG_REHASH_NEEDED = (1 << 1), /**< The hash of the string must be recalculated.\n                                              *   For more details see ecma_append_chars_to_string */\n  ECMA_STRING_FLAG_IS_UINT32 = (1 << 2),     /**< The string repesents an UINT32 number */\n  ECMA_STRING_FLAG_MUST_BE_FREED = (1 << 3), /**< The returned buffer must be freed */\n} ecma_string_flag_t;\n\n/**\n * Underscore is ignored when this option is passed.\n */\n #define ECMA_CONVERSION_ALLOW_UNDERSCORE 0x1\n\n/**\n * Convert ecma-string's contents to a cesu-8 string and put it into a buffer.\n */\n#define ECMA_STRING_TO_UTF8_STRING(ecma_str_ptr, /**< ecma string pointer */ \\\n                                   utf8_ptr, /**< [out] output buffer pointer */ \\\n                                   utf8_str_size) /**< [out] output buffer size */ \\\n  lit_utf8_size_t utf8_str_size; \\\n  uint8_t utf8_ptr ## flags = ECMA_STRING_FLAG_EMPTY; \\\n  const lit_utf8_byte_t *utf8_ptr = ecma_string_get_chars (ecma_str_ptr, \\\n                                                           &utf8_str_size, \\\n                                                           NULL, \\\n                                                           NULL, \\\n                                                           &utf8_ptr ## flags);\n\n/**\n * Free the cesu-8 string buffer allocated by 'ECMA_STRING_TO_UTF8_STRING'\n */\n#define ECMA_FINALIZE_UTF8_STRING(utf8_ptr, /**< pointer to character buffer */ \\\n                                  utf8_str_size) /**< buffer size */ \\\n  if (utf8_ptr ## flags & ECMA_STRING_FLAG_MUST_BE_FREED) \\\n  { \\\n    JERRY_ASSERT (utf8_ptr != NULL); \\\n    jmem_heap_free_block ((void *) utf8_ptr, utf8_str_size); \\\n  }\n\n#ifdef ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY\n\n/**\n * Set an internal property value from pointer.\n */\n#define ECMA_SET_INTERNAL_VALUE_POINTER(field, pointer) \\\n  ((field) = ((ecma_value_t) pointer))\n\n/**\n * Set an internal property value from pointer. Pointer can be NULL.\n */\n#define ECMA_SET_INTERNAL_VALUE_ANY_POINTER(field, pointer) \\\n  ((field) = ((ecma_value_t) pointer))\n\n/**\n * Convert an internal property value to pointer.\n */\n#define ECMA_GET_INTERNAL_VALUE_POINTER(type, field) \\\n  ((type *) field)\n\n/**\n * Convert an internal property value to pointer. Result can be NULL.\n */\n#define ECMA_GET_INTERNAL_VALUE_ANY_POINTER(type, field) \\\n  ((type *) field)\n\n/**\n * Checks whether an internal property is NULL.\n */\n#define ECMA_IS_INTERNAL_VALUE_NULL(field) \\\n  ((field) == ((ecma_value_t) NULL))\n\n#else /* !ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n\n/**\n * Set an internal property value from pointer.\n */\n#define ECMA_SET_INTERNAL_VALUE_POINTER(field, pointer) \\\n  ECMA_SET_NON_NULL_POINTER (field, pointer)\n\n/**\n * Set an internal property value from pointer. Pointer can be NULL.\n */\n#define ECMA_SET_INTERNAL_VALUE_ANY_POINTER(field, pointer) \\\n  ECMA_SET_POINTER (field, pointer)\n\n/**\n * Convert an internal property value to pointer.\n */\n#define ECMA_GET_INTERNAL_VALUE_POINTER(type, field) \\\n  ECMA_GET_NON_NULL_POINTER (type, field)\n\n/**\n * Convert an internal property value to pointer. Result can be NULL.\n */\n#define ECMA_GET_INTERNAL_VALUE_ANY_POINTER(type, field) \\\n  ECMA_GET_POINTER (type, field)\n\n/**\n * Checks whether an internal property is NULL.\n */\n#define ECMA_IS_INTERNAL_VALUE_NULL(field) \\\n  ((field) == ((ecma_value_t) JMEM_CP_NULL))\n\n#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n\n/**\n * Convert boolean to bitfield value.\n */\n#define ECMA_BOOL_TO_BITFIELD(x) ((x) ? 1 : 0)\n\n/**\n * Check whether the given type is ECMA_OBJECT_TYPE_PROXY\n *\n * @param type object type\n */\n#define ECMA_OBJECT_TYPE_IS_PROXY(type) (JERRY_UNLIKELY ((type) == ECMA_OBJECT_TYPE_PROXY))\n\n/**\n * Check whether the given object has [[ProxyHandler]] and [[ProxyTarger]] internal slots\n *\n * @param obj_p ecma-object\n */\n#if ENABLED (JERRY_BUILTIN_PROXY)\n#define ECMA_OBJECT_IS_PROXY(obj_p) (ECMA_OBJECT_TYPE_IS_PROXY (ecma_get_object_type ((obj_p))))\n#else /* !ENABLED (JERRY_BUILTIN_PROXY) */\n#define ECMA_OBJECT_IS_PROXY(obj_p) (false)\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n/* ecma-helpers-value.c */\necma_type_t JERRY_ATTR_CONST ecma_get_value_type_field (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_direct (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_simple (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_empty (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_undefined (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_null (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_boolean (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_true (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_false (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_found (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_array_hole (ecma_value_t value);\n\nbool JERRY_ATTR_CONST ecma_is_value_integer_number (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_are_values_integer_numbers (ecma_value_t first_value, ecma_value_t second_value);\nbool JERRY_ATTR_CONST ecma_is_value_float_number (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_number (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_string (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_symbol (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_magic_string (ecma_value_t value, lit_magic_string_id_t id);\nbool JERRY_ATTR_CONST ecma_is_value_bigint (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_prop_name (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_direct_string (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_non_direct_string (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_object (ecma_value_t value);\nbool JERRY_ATTR_CONST ecma_is_value_error_reference (ecma_value_t value);\necma_value_t ecma_is_value_array (ecma_value_t arg);\n\nvoid ecma_check_value_type_is_spec_defined (ecma_value_t value);\n\necma_value_t JERRY_ATTR_CONST ecma_make_boolean_value (bool boolean_value);\necma_value_t JERRY_ATTR_CONST ecma_make_integer_value (ecma_integer_value_t integer_value);\necma_value_t ecma_make_nan_value (void);\necma_value_t ecma_make_float_value (ecma_number_t *ecma_num_p);\necma_value_t ecma_make_length_value (ecma_length_t length);\necma_value_t ecma_make_number_value (ecma_number_t ecma_number);\necma_value_t ecma_make_int32_value (int32_t int32_number);\necma_value_t ecma_make_uint32_value (uint32_t uint32_number);\necma_value_t JERRY_ATTR_PURE ecma_make_string_value (const ecma_string_t *ecma_string_p);\n#if ENABLED (JERRY_ESNEXT)\necma_value_t JERRY_ATTR_PURE ecma_make_symbol_value (const ecma_string_t *ecma_symbol_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\necma_value_t JERRY_ATTR_PURE ecma_make_prop_name_value (const ecma_string_t *ecma_prop_name_p);\necma_value_t JERRY_ATTR_PURE ecma_make_magic_string_value (lit_magic_string_id_t id);\necma_value_t JERRY_ATTR_PURE ecma_make_object_value (const ecma_object_t *object_p);\necma_value_t JERRY_ATTR_PURE ecma_make_extended_primitive_value (const ecma_extended_primitive_t *primitve_p,\n                                                                 uint32_t type);\necma_integer_value_t JERRY_ATTR_CONST ecma_get_integer_from_value (ecma_value_t value);\necma_number_t JERRY_ATTR_PURE ecma_get_float_from_value (ecma_value_t value);\necma_number_t * ecma_get_pointer_from_float_value (ecma_value_t value);\necma_number_t JERRY_ATTR_PURE ecma_get_number_from_value (ecma_value_t value);\necma_string_t JERRY_ATTR_PURE *ecma_get_string_from_value (ecma_value_t value);\n#if ENABLED (JERRY_ESNEXT)\necma_string_t JERRY_ATTR_PURE *ecma_get_symbol_from_value (ecma_value_t value);\n#endif /* ENABLED (JERRY_ESNEXT) */\necma_string_t JERRY_ATTR_PURE *ecma_get_prop_name_from_value (ecma_value_t value);\necma_object_t JERRY_ATTR_PURE *ecma_get_object_from_value (ecma_value_t value);\necma_extended_primitive_t JERRY_ATTR_PURE *ecma_get_extended_primitive_from_value (ecma_value_t value);\necma_value_t JERRY_ATTR_CONST ecma_invert_boolean_value (ecma_value_t value);\necma_value_t ecma_copy_value (ecma_value_t value);\necma_value_t ecma_fast_copy_value (ecma_value_t value);\necma_value_t ecma_copy_value_if_not_object (ecma_value_t value);\nvoid ecma_ref_if_object (ecma_value_t value);\nvoid ecma_deref_if_object (ecma_value_t value);\necma_value_t ecma_update_float_number (ecma_value_t float_value, ecma_number_t new_number);\nvoid ecma_value_assign_value (ecma_value_t *value_p, ecma_value_t ecma_value);\nvoid ecma_value_assign_number (ecma_value_t *value_p, ecma_number_t ecma_number);\nvoid ecma_free_value (ecma_value_t value);\nvoid ecma_fast_free_value (ecma_value_t value);\nvoid ecma_free_value_if_not_object (ecma_value_t value);\nvoid ecma_free_object (ecma_value_t value);\nvoid ecma_free_number (ecma_value_t value);\nlit_magic_string_id_t ecma_get_typeof_lit_id (ecma_value_t value);\n\n/* ecma-helpers-string.c */\n#if ENABLED (JERRY_ESNEXT)\necma_string_t *ecma_new_symbol_from_descriptor_string (ecma_value_t string_desc);\nbool ecma_prop_name_is_symbol (ecma_string_t *string_p);\necma_length_t ecma_op_advance_string_index (ecma_string_t *str_p, ecma_length_t index_num, bool is_unicode);\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_MAP) || ENABLED (JERRY_BUILTIN_SET)\necma_string_t *ecma_new_map_key_string (ecma_value_t value);\nbool ecma_prop_name_is_map_key (ecma_string_t *string_p);\n#endif /* ENABLED (JERRY_BUILTIN_MAP) || ENABLED (JERRY_BUILTIN_SET) */\necma_string_t *ecma_new_ecma_string_from_utf8 (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size);\necma_string_t *ecma_new_ecma_string_from_utf8_converted_to_cesu8 (const lit_utf8_byte_t *string_p,\n                                                                  lit_utf8_size_t string_size);\necma_string_t *ecma_new_ecma_external_string_from_cesu8 (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size,\n                                                         ecma_object_native_free_callback_t free_cb);\necma_string_t *ecma_new_ecma_string_from_code_unit (ecma_char_t code_unit);\n#if ENABLED (JERRY_ESNEXT)\necma_string_t *ecma_new_ecma_string_from_code_units (ecma_char_t first_code_unit, ecma_char_t second_code_unit);\n#endif /* ENABLED (JERRY_ESNEXT) */\necma_string_t *ecma_new_ecma_string_from_length (ecma_length_t index);\necma_string_t *ecma_new_ecma_string_from_uint32 (uint32_t uint32_number);\necma_string_t *ecma_new_non_direct_string_from_uint32 (uint32_t uint32_number);\necma_string_t *ecma_get_ecma_string_from_uint32 (uint32_t uint32_number);\necma_string_t *ecma_new_ecma_string_from_number (ecma_number_t num);\necma_string_t *ecma_get_magic_string (lit_magic_string_id_t id);\necma_string_t *ecma_get_internal_string (lit_magic_string_id_t id);\necma_string_t *ecma_append_chars_to_string (ecma_string_t *string1_p,\n                                            const lit_utf8_byte_t *cesu8_string2_p,\n                                            lit_utf8_size_t cesu8_string2_size,\n                                            lit_utf8_size_t cesu8_string2_length);\necma_string_t *ecma_concat_ecma_strings (ecma_string_t *string1_p, ecma_string_t *string2_p);\nvoid ecma_ref_ecma_string (ecma_string_t *string_p);\nvoid ecma_deref_ecma_string (ecma_string_t *string_p);\nvoid ecma_destroy_ecma_string (ecma_string_t *string_p);\necma_number_t ecma_string_to_number (const ecma_string_t *str_p);\nuint32_t ecma_string_get_array_index (const ecma_string_t *str_p);\n\nlit_utf8_size_t JERRY_ATTR_WARN_UNUSED_RESULT\necma_string_copy_to_cesu8_buffer (const ecma_string_t *string_desc_p,\n                                  lit_utf8_byte_t *buffer_p,\n                                  lit_utf8_size_t buffer_size);\nlit_utf8_size_t JERRY_ATTR_WARN_UNUSED_RESULT\necma_string_copy_to_utf8_buffer (const ecma_string_t *string_desc_p,\n                                 lit_utf8_byte_t *buffer_p,\n                                 lit_utf8_size_t buffer_size);\nlit_utf8_size_t\necma_substring_copy_to_cesu8_buffer (const ecma_string_t *string_desc_p,\n                                     lit_utf8_size_t start_pos,\n                                     lit_utf8_size_t end_pos,\n                                     lit_utf8_byte_t *buffer_p,\n                                     lit_utf8_size_t buffer_size);\nlit_utf8_size_t\necma_substring_copy_to_utf8_buffer (const ecma_string_t *string_desc_p,\n                                    lit_utf8_size_t start_pos,\n                                    lit_utf8_size_t end_pos,\n                                    lit_utf8_byte_t *buffer_p,\n                                    lit_utf8_size_t buffer_size);\nvoid ecma_string_to_utf8_bytes (const ecma_string_t *string_desc_p, lit_utf8_byte_t *buffer_p,\n                                lit_utf8_size_t buffer_size);\nconst lit_utf8_byte_t *ecma_string_get_chars (const ecma_string_t *string_p,\n                                              lit_utf8_size_t *size_p,\n                                              lit_utf8_size_t *length_p,\n                                              lit_utf8_byte_t *uint32_buff_p,\n                                              uint8_t *flags_p);\nbool ecma_compare_ecma_string_to_magic_id (const ecma_string_t *string_p, lit_magic_string_id_t id);\nbool ecma_string_is_empty (const ecma_string_t *string_p);\nbool ecma_string_is_length (const ecma_string_t *string_p);\n\njmem_cpointer_t ecma_string_to_property_name (ecma_string_t *prop_name_p, ecma_property_t *name_type_p);\necma_string_t *ecma_string_from_property_name (ecma_property_t property, jmem_cpointer_t prop_name_cp);\nlit_string_hash_t ecma_string_get_property_name_hash (ecma_property_t property, jmem_cpointer_t prop_name_cp);\nuint32_t ecma_string_get_property_index (ecma_property_t property, jmem_cpointer_t prop_name_cp);\nbool ecma_string_compare_to_property_name (ecma_property_t property, jmem_cpointer_t prop_name_cp,\n                                           const ecma_string_t *string_p);\n\nbool ecma_compare_ecma_strings (const ecma_string_t *string1_p, const ecma_string_t *string2_p);\nbool ecma_compare_ecma_non_direct_strings (const ecma_string_t *string1_p, const ecma_string_t *string2_p);\nbool ecma_compare_ecma_strings_relational (const ecma_string_t *string1_p, const ecma_string_t *string2_p);\nlit_utf8_size_t ecma_string_get_length (const ecma_string_t *string_p);\nlit_utf8_size_t ecma_string_get_utf8_length (const ecma_string_t *string_p);\nlit_utf8_size_t ecma_string_get_size (const ecma_string_t *string_p);\nlit_utf8_size_t ecma_string_get_utf8_size (const ecma_string_t *string_p);\necma_char_t ecma_string_get_char_at_pos (const ecma_string_t *string_p, lit_utf8_size_t index);\n\nlit_magic_string_id_t ecma_get_string_magic (const ecma_string_t *string_p);\n\nlit_string_hash_t ecma_string_hash (const ecma_string_t *string_p);\necma_string_t *ecma_string_substr (const ecma_string_t *string_p, lit_utf8_size_t start_pos, lit_utf8_size_t end_pos);\nconst lit_utf8_byte_t *ecma_string_trim_front (const lit_utf8_byte_t *start_p, const lit_utf8_byte_t *end_p);\nconst lit_utf8_byte_t *ecma_string_trim_back (const lit_utf8_byte_t *start_p, const lit_utf8_byte_t *end_p);\nvoid ecma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p,\n                              lit_utf8_size_t *utf8_str_size);\necma_string_t *ecma_string_trim (const ecma_string_t *string_p);\n#if ENABLED (JERRY_ESNEXT)\necma_value_t ecma_string_pad (ecma_value_t original_string_p,\n                              ecma_value_t max_length,\n                              ecma_value_t fill_string,\n                              bool pad_on_start);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\necma_stringbuilder_t ecma_stringbuilder_create (void);\necma_stringbuilder_t ecma_stringbuilder_create_from (ecma_string_t *string_p);\necma_stringbuilder_t ecma_stringbuilder_create_raw (const lit_utf8_byte_t *data_p,\n                                                    const lit_utf8_size_t data_size);\nlit_utf8_size_t ecma_stringbuilder_get_size (ecma_stringbuilder_t *builder_p);\nlit_utf8_byte_t *ecma_stringbuilder_get_data (ecma_stringbuilder_t *builder_p);\nvoid ecma_stringbuilder_revert (ecma_stringbuilder_t *builder_p, const lit_utf8_size_t size);\nvoid ecma_stringbuilder_append (ecma_stringbuilder_t *builder_p, const ecma_string_t *string_p);\nvoid ecma_stringbuilder_append_magic (ecma_stringbuilder_t *builder_p, const lit_magic_string_id_t id);\nvoid ecma_stringbuilder_append_raw (ecma_stringbuilder_t *builder_p,\n                                    const lit_utf8_byte_t *data_p,\n                                    const lit_utf8_size_t data_size);\nvoid ecma_stringbuilder_append_codepoint (ecma_stringbuilder_t *builder_p, lit_code_point_t cp);\nvoid ecma_stringbuilder_append_char (ecma_stringbuilder_t *builder_p, const ecma_char_t c);\nvoid ecma_stringbuilder_append_byte (ecma_stringbuilder_t *builder_p, const lit_utf8_byte_t);\necma_string_t *ecma_stringbuilder_finalize (ecma_stringbuilder_t *builder_p);\nvoid ecma_stringbuilder_destroy (ecma_stringbuilder_t *builder_p);\n\n/* ecma-helpers-number.c */\necma_number_t ecma_number_pack (bool sign, uint32_t biased_exp, uint64_t fraction);\nvoid ecma_number_unpack (ecma_number_t num, bool *sign_p, uint32_t *biased_exp_p, uint64_t *fraction_p);\necma_number_t ecma_number_make_nan (void);\necma_number_t ecma_number_make_infinity (bool sign);\nbool ecma_number_is_nan (ecma_number_t num);\nbool ecma_number_is_negative (ecma_number_t num);\nbool ecma_number_is_zero (ecma_number_t num);\nbool ecma_number_is_infinity (ecma_number_t num);\nbool ecma_number_is_finite (ecma_number_t num);\necma_number_t\necma_number_make_from_sign_mantissa_and_exponent (bool sign, uint64_t mantissa, int32_t exponent);\necma_number_t ecma_number_get_prev (ecma_number_t num);\necma_number_t ecma_number_get_next (ecma_number_t num);\necma_number_t ecma_number_trunc (ecma_number_t num);\necma_number_t ecma_number_calc_remainder (ecma_number_t left_num, ecma_number_t right_num);\necma_number_t ecma_number_pow (ecma_number_t x, ecma_number_t y);\necma_value_t ecma_number_parse_int (const lit_utf8_byte_t *string_buff,\n                                    lit_utf8_size_t string_buff_size,\n                                    ecma_value_t radix);\necma_value_t ecma_number_parse_float (const lit_utf8_byte_t *string_buff,\n                                      lit_utf8_size_t string_buff_size);\necma_value_t ecma_integer_multiply (ecma_integer_value_t left_integer, ecma_integer_value_t right_integer);\nlit_utf8_size_t ecma_number_to_decimal (ecma_number_t num, lit_utf8_byte_t *out_digits_p, int32_t *out_decimal_exp_p);\n\n/* ecma-helpers-collection.c */\necma_collection_t *ecma_new_collection (void);\nvoid ecma_collection_push_back (ecma_collection_t *collection_p, ecma_value_t value);\nvoid ecma_collection_reserve (ecma_collection_t *collection_p, uint32_t count);\nvoid ecma_collection_append (ecma_collection_t *collection_p, const ecma_value_t *buffer_p, uint32_t count);\nvoid ecma_collection_destroy (ecma_collection_t *collection_p);\nvoid ecma_collection_free (ecma_collection_t *collection_p);\nvoid ecma_collection_free_if_not_object (ecma_collection_t *collection_p);\nvoid ecma_collection_free_objects (ecma_collection_t *collection_p);\n#if ENABLED (JERRY_ESNEXT)\nvoid ecma_collection_free_template_literal (ecma_collection_t *collection_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\nbool ecma_collection_check_duplicated_entries (ecma_collection_t *collection_p);\nbool ecma_collection_has_string_value (ecma_collection_t *collection_p, ecma_string_t *string_p);\n\necma_value_t *ecma_new_compact_collection (void);\necma_value_t *ecma_compact_collection_push_back (ecma_value_t *compact_collection_p, ecma_value_t value);\necma_value_t *ecma_compact_collection_shrink (ecma_value_t *compact_collection_p);\nvoid ecma_compact_collection_free (ecma_value_t *compact_collection_p);\n\n/* ecma-helpers.c */\necma_object_t *ecma_create_object (ecma_object_t *prototype_object_p, size_t ext_object_size, ecma_object_type_t type);\necma_object_t *ecma_create_decl_lex_env (ecma_object_t *outer_lexical_environment_p);\necma_object_t *ecma_create_object_lex_env (ecma_object_t *outer_lexical_environment_p, ecma_object_t *binding_obj_p,\n                                           ecma_lexical_environment_type_t type);\nbool JERRY_ATTR_PURE ecma_is_lexical_environment (const ecma_object_t *object_p);\nvoid ecma_op_ordinary_object_set_extensible (ecma_object_t *object_p);\necma_object_type_t JERRY_ATTR_PURE ecma_get_object_type (const ecma_object_t *object_p);\nbool JERRY_ATTR_PURE ecma_get_object_is_builtin (const ecma_object_t *object_p);\nvoid ecma_set_object_is_builtin (ecma_object_t *object_p);\nuint8_t ecma_get_object_builtin_id (ecma_object_t *object_p);\necma_lexical_environment_type_t JERRY_ATTR_PURE ecma_get_lex_env_type (const ecma_object_t *object_p);\necma_object_t JERRY_ATTR_PURE *ecma_get_lex_env_binding_object (const ecma_object_t *object_p);\necma_object_t *ecma_clone_decl_lexical_environment (ecma_object_t *lex_env_p, bool copy_values);\n\necma_property_value_t *\necma_create_named_data_property (ecma_object_t *object_p, ecma_string_t *name_p, uint8_t prop_attributes,\n                                 ecma_property_t **out_prop_p);\necma_property_value_t *\necma_create_named_accessor_property (ecma_object_t *object_p, ecma_string_t *name_p, ecma_object_t *get_p,\n                                     ecma_object_t *set_p, uint8_t prop_attributes, ecma_property_t **out_prop_p);\necma_property_t *\necma_find_named_property (ecma_object_t *obj_p, ecma_string_t *name_p);\necma_property_value_t *\necma_get_named_data_property (ecma_object_t *obj_p, ecma_string_t *name_p);\n\nvoid ecma_free_property (ecma_object_t *object_p, jmem_cpointer_t name_cp, ecma_property_t *property_p);\n\nvoid ecma_delete_property (ecma_object_t *object_p, ecma_property_value_t *prop_value_p);\n\nvoid ecma_named_data_property_assign_value (ecma_object_t *obj_p, ecma_property_value_t *prop_value_p,\n                                            ecma_value_t value);\n\necma_getter_setter_pointers_t *\necma_get_named_accessor_property (const ecma_property_value_t *prop_value_p);\nvoid ecma_set_named_accessor_property_getter (ecma_object_t *object_p, ecma_property_value_t *prop_value_p,\n                                              ecma_object_t *getter_p);\nvoid ecma_set_named_accessor_property_setter (ecma_object_t *object_p, ecma_property_value_t *prop_value_p,\n                                              ecma_object_t *setter_p);\nbool ecma_is_property_writable (ecma_property_t property);\nvoid ecma_set_property_writable_attr (ecma_property_t *property_p, bool is_writable);\nbool ecma_is_property_enumerable (ecma_property_t property);\nvoid ecma_set_property_enumerable_attr (ecma_property_t *property_p, bool is_enumerable);\nbool ecma_is_property_configurable (ecma_property_t property);\nvoid ecma_set_property_configurable_attr (ecma_property_t *property_p, bool is_configurable);\n\n#if ENABLED (JERRY_LCACHE)\nbool ecma_is_property_lcached (ecma_property_t *property_p);\nvoid ecma_set_property_lcached (ecma_property_t *property_p, bool is_lcached);\n#endif /* ENABLED (JERRY_LCACHE) */\n\necma_property_descriptor_t ecma_make_empty_property_descriptor (void);\nvoid ecma_free_property_descriptor (ecma_property_descriptor_t *prop_desc_p);\n\nvoid ecma_ref_extended_primitive (ecma_extended_primitive_t *primitve_p);\nvoid ecma_deref_error_reference (ecma_extended_primitive_t *error_ref_p);\n#if ENABLED (JERRY_BUILTIN_BIGINT)\nvoid ecma_deref_bigint (ecma_extended_primitive_t *bigint_p);\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\necma_value_t ecma_create_error_reference (ecma_value_t value, bool is_exception);\necma_value_t ecma_create_error_reference_from_context (void);\necma_value_t ecma_create_error_object_reference (ecma_object_t *object_p);\nvoid ecma_raise_error_from_error_reference (ecma_value_t value);\n\nvoid ecma_bytecode_ref (ecma_compiled_code_t *bytecode_p);\nvoid ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p);\necma_value_t *ecma_compiled_code_resolve_arguments_start (const ecma_compiled_code_t *bytecode_header_p);\n#if ENABLED (JERRY_ESNEXT)\necma_value_t *ecma_compiled_code_resolve_function_name (const ecma_compiled_code_t *bytecode_header_p);\nuint32_t ecma_compiled_code_resolve_extended_info (const ecma_compiled_code_t *bytecode_header_p);\necma_collection_t *ecma_compiled_code_get_tagged_template_collection (const ecma_compiled_code_t *bytecode_header_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\necma_value_t ecma_get_resource_name (const ecma_compiled_code_t *bytecode_p);\n#if (JERRY_STACK_LIMIT != 0)\nuintptr_t ecma_get_current_stack_usage (void);\n#endif /* (JERRY_STACK_LIMIT != 0) */\n\n/* ecma-helpers-external-pointers.c */\nbool ecma_create_native_pointer_property (ecma_object_t *obj_p, void *native_p, void *info_p);\necma_native_pointer_t *ecma_get_native_pointer_value (ecma_object_t *obj_p, void *info_p);\nbool ecma_delete_native_pointer_property (ecma_object_t *obj_p, void *info_p);\n\n/* ecma-helpers-conversion.c */\necma_number_t ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, lit_utf8_size_t str_size,\n                                          uint32_t option);\nlit_utf8_size_t ecma_uint32_to_utf8_string (uint32_t value, lit_utf8_byte_t *out_buffer_p, lit_utf8_size_t buffer_size);\nuint32_t ecma_number_to_uint32 (ecma_number_t num);\nint32_t ecma_number_to_int32 (ecma_number_t num);\nlit_utf8_size_t ecma_number_to_utf8_string (ecma_number_t num, lit_utf8_byte_t *buffer_p, lit_utf8_size_t buffer_size);\n\n/* ecma-helpers-errol.c */\nlit_utf8_size_t ecma_errol0_dtoa (double val, lit_utf8_byte_t *buffer_p, int32_t *exp_p);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_HELPERS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-init-finalize.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-init-finalize.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-literal-storage.h\"\n#include \"jmem.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmainitfinalize Initialization and finalization of ECMA components\n * @{\n */\n\n/**\n * Maximum number of GC loops on cleanup.\n */\n#define JERRY_GC_LOOP_LIMIT 100\n\n/**\n * Initialize ECMA components\n */\nvoid\necma_init (void)\n{\n#if (JERRY_GC_MARK_LIMIT != 0)\n  JERRY_CONTEXT (ecma_gc_mark_recursion_limit) = JERRY_GC_MARK_LIMIT;\n#endif /* (JERRY_GC_MARK_LIMIT != 0) */\n\n  ecma_init_global_environment ();\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) = ECMA_PROP_HASHMAP_ALLOC_ON;\n  JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_HIGH_PRESSURE_GC;\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n#if (JERRY_STACK_LIMIT != 0)\n  volatile int sp;\n  JERRY_CONTEXT (stack_base) = (uintptr_t) &sp;\n#endif /* (JERRY_STACK_LIMIT != 0) */\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n  ecma_job_queue_init ();\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_CONTEXT (current_new_target_p) = NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_init */\n\n/**\n * Finalize ECMA components\n */\nvoid\necma_finalize (void)\n{\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT (JERRY_CONTEXT (current_new_target_p) == NULL);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_finalize_global_environment ();\n  uint8_t runs = 0;\n\n  do\n  {\n    ecma_gc_run ();\n    if (++runs >= JERRY_GC_LOOP_LIMIT)\n    {\n      jerry_fatal (ERR_UNTERMINATED_GC_LOOPS);\n    }\n  }\n  while (JERRY_CONTEXT (ecma_gc_new_objects) != 0);\n\n#if ENABLED (JERRY_ESNEXT)\n  jmem_cpointer_t *global_symbols_cp = JERRY_CONTEXT (global_symbols_cp);\n\n  for (uint32_t i = 0; i < ECMA_BUILTIN_GLOBAL_SYMBOL_COUNT; i++)\n  {\n    if (global_symbols_cp[i] != JMEM_CP_NULL)\n    {\n      ecma_deref_ecma_string (ECMA_GET_NON_NULL_POINTER (ecma_string_t, global_symbols_cp[i]));\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_finalize_lit_storage ();\n} /* ecma_finalize */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-init-finalize.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_INIT_FINALIZE_H\n#define ECMA_INIT_FINALIZE_H\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmainitfinalize Initialization and finalization of ECMA components\n * @{\n */\n\nvoid ecma_init (void);\nvoid ecma_finalize (void);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_INIT_FINALIZE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-lcache.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lcache.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmalcache Property lookup cache\n * @{\n */\n\n#if ENABLED (JERRY_LCACHE)\n\n/**\n * Bitshift index for calculating hash.\n */\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n#define ECMA_LCACHE_HASH_BITSHIFT_INDEX (2 * JMEM_ALIGNMENT_LOG)\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n#define ECMA_LCACHE_HASH_BITSHIFT_INDEX 0\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n/**\n * Mask for hash bits\n */\n#define ECMA_LCACHE_HASH_MASK ((ECMA_LCACHE_HASH_ROWS_COUNT - 1) << ECMA_LCACHE_HASH_BITSHIFT_INDEX)\n\n/**\n * Bitshift index for creating property identifier\n */\n#define ECMA_LCACHE_HASH_ENTRY_ID_SHIFT (8 * sizeof (jmem_cpointer_t))\n\n/**\n * Create property identifier\n */\n#define ECMA_LCACHE_CREATE_ID(object_cp, name_cp) \\\n  (((ecma_lcache_hash_entry_id_t) (object_cp) << ECMA_LCACHE_HASH_ENTRY_ID_SHIFT) | (name_cp))\n\n/**\n * Invalidate specified LCache entry\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\necma_lcache_invalidate_entry (ecma_lcache_hash_entry_t *entry_p) /**< entry to invalidate */\n{\n  JERRY_ASSERT (entry_p != NULL);\n  JERRY_ASSERT (entry_p->id != 0);\n  JERRY_ASSERT (entry_p->prop_p != NULL);\n\n  entry_p->id = 0;\n  ecma_set_property_lcached (entry_p->prop_p, false);\n} /* ecma_lcache_invalidate_entry */\n\n/**\n * Compute the row index of object / property name pair\n *\n * @return row index\n */\nstatic inline size_t JERRY_ATTR_ALWAYS_INLINE\necma_lcache_row_index (jmem_cpointer_t object_cp, /**< compressed pointer to object */\n                       jmem_cpointer_t name_cp) /**< compressed pointer to property name */\n{\n  /* Randomize the property name with the object pointer using a xor operation,\n   * so properties of different objects with the same name can be cached effectively. */\n  return (size_t) (((name_cp ^ object_cp) & ECMA_LCACHE_HASH_MASK) >> ECMA_LCACHE_HASH_BITSHIFT_INDEX);\n} /* ecma_lcache_row_index */\n\n/**\n * Insert an entry into LCache\n */\nvoid\necma_lcache_insert (const ecma_object_t *object_p, /**< object */\n                    const jmem_cpointer_t name_cp, /**< property name */\n                    ecma_property_t *prop_p) /**< property */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (prop_p != NULL && !ecma_is_property_lcached (prop_p));\n  JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (*prop_p));\n\n  jmem_cpointer_t object_cp;\n\n  ECMA_SET_NON_NULL_POINTER (object_cp, object_p);\n\n  size_t row_index = ecma_lcache_row_index (object_cp, name_cp);\n  ecma_lcache_hash_entry_t *entry_p = JERRY_CONTEXT (lcache) [row_index];\n  ecma_lcache_hash_entry_t *entry_end_p = entry_p + ECMA_LCACHE_HASH_ROW_LENGTH;\n\n  do\n  {\n    if (entry_p->id == 0)\n    {\n      goto insert;\n    }\n\n    entry_p++;\n  }\n  while (entry_p < entry_end_p);\n\n  /* Invalidate the last entry. */\n  ecma_lcache_invalidate_entry (--entry_p);\n\n  /* Shift other entries towards the end. */\n  for (uint32_t i = 0; i < ECMA_LCACHE_HASH_ROW_LENGTH - 1; i++)\n  {\n    entry_p->id = entry_p[-1].id;\n    entry_p->prop_p = entry_p[-1].prop_p;\n    entry_p--;\n  }\n\ninsert:\n  entry_p->prop_p = prop_p;\n  entry_p->id = ECMA_LCACHE_CREATE_ID (object_cp, name_cp);\n\n  ecma_set_property_lcached (entry_p->prop_p, true);\n} /* ecma_lcache_insert */\n\n/**\n * Lookup property in the LCache\n *\n * @return a pointer to an ecma_property_t if the lookup is successful\n *         NULL otherwise\n */\nextern inline ecma_property_t * JERRY_ATTR_ALWAYS_INLINE\necma_lcache_lookup (const ecma_object_t *object_p, /**< object */\n                    const ecma_string_t *prop_name_p) /**< property's name */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (prop_name_p != NULL);\n\n  jmem_cpointer_t object_cp;\n  ECMA_SET_NON_NULL_POINTER (object_cp, object_p);\n\n  ecma_property_t prop_name_type = ECMA_DIRECT_STRING_PTR;\n  jmem_cpointer_t prop_name_cp;\n\n  if (JERRY_UNLIKELY (ECMA_IS_DIRECT_STRING (prop_name_p)))\n  {\n    prop_name_type = (ecma_property_t) ECMA_GET_DIRECT_STRING_TYPE (prop_name_p);\n    prop_name_cp = (jmem_cpointer_t) ECMA_GET_DIRECT_STRING_VALUE (prop_name_p);\n  }\n  else\n  {\n    ECMA_SET_NON_NULL_POINTER (prop_name_cp, prop_name_p);\n  }\n\n  size_t row_index = ecma_lcache_row_index (object_cp, prop_name_cp);\n\n  ecma_lcache_hash_entry_t *entry_p = JERRY_CONTEXT (lcache) [row_index];\n  ecma_lcache_hash_entry_t *entry_end_p = entry_p + ECMA_LCACHE_HASH_ROW_LENGTH;\n  ecma_lcache_hash_entry_id_t id = ECMA_LCACHE_CREATE_ID (object_cp, prop_name_cp);\n\n  do\n  {\n    if (entry_p->id == id && JERRY_LIKELY (ECMA_PROPERTY_GET_NAME_TYPE (*entry_p->prop_p) == prop_name_type))\n    {\n      JERRY_ASSERT (entry_p->prop_p != NULL && ecma_is_property_lcached (entry_p->prop_p));\n      return entry_p->prop_p;\n    }\n    entry_p++;\n  }\n  while (entry_p < entry_end_p);\n\n  return NULL;\n} /* ecma_lcache_lookup */\n\n/**\n * Invalidate LCache entries associated with given object and property name / property\n */\nvoid\necma_lcache_invalidate (const ecma_object_t *object_p, /**< object */\n                        const jmem_cpointer_t name_cp, /**< property name */\n                        ecma_property_t *prop_p) /**< property */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (prop_p != NULL && ecma_is_property_lcached (prop_p));\n  JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (*prop_p));\n\n  jmem_cpointer_t object_cp;\n  ECMA_SET_NON_NULL_POINTER (object_cp, object_p);\n\n  size_t row_index = ecma_lcache_row_index (object_cp, name_cp);\n  ecma_lcache_hash_entry_t *entry_p = JERRY_CONTEXT (lcache) [row_index];\n\n  while (true)\n  {\n    /* The property must be present. */\n    JERRY_ASSERT (entry_p - JERRY_CONTEXT (lcache) [row_index] < ECMA_LCACHE_HASH_ROW_LENGTH);\n\n    if (entry_p->id != 0 && entry_p->prop_p == prop_p)\n    {\n      JERRY_ASSERT (entry_p->id == ECMA_LCACHE_CREATE_ID (object_cp, name_cp));\n\n      ecma_lcache_invalidate_entry (entry_p);\n      return;\n    }\n    entry_p++;\n  }\n} /* ecma_lcache_invalidate */\n\n#endif /* ENABLED (JERRY_LCACHE) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-lcache.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_LCACHE_H\n#define ECMA_LCACHE_H\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmalcache Property lookup cache\n * @{\n */\n\n#if ENABLED (JERRY_LCACHE)\nvoid ecma_lcache_insert (const ecma_object_t *object_p, const jmem_cpointer_t name_cp, ecma_property_t *prop_p);\necma_property_t *ecma_lcache_lookup (const ecma_object_t *object_p, const ecma_string_t *prop_name_p);\nvoid ecma_lcache_invalidate (const ecma_object_t *object_p, const jmem_cpointer_t name_cp, ecma_property_t *prop_p);\n\n#endif /* ENABLED (JERRY_LCACHE) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_LCACHE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-literal-storage.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-big-uint.h\"\n#include \"ecma-literal-storage.h\"\n#include \"ecma-helpers.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmalitstorage Literal storage\n * @{\n */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Free symbol list\n */\nstatic void\necma_free_symbol_list (jmem_cpointer_t symbol_list_cp) /**< symbol list */\n{\n  while (symbol_list_cp != JMEM_CP_NULL)\n  {\n    ecma_lit_storage_item_t *symbol_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t, symbol_list_cp);\n\n    for (int i = 0; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n    {\n      if (symbol_list_p->values[i] != JMEM_CP_NULL)\n      {\n        ecma_string_t *string_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_string_t,\n                                                                symbol_list_p->values[i]);\n\n        JERRY_ASSERT (ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p));\n        ecma_deref_ecma_string (string_p);\n      }\n    }\n\n    jmem_cpointer_t next_item_cp = symbol_list_p->next_cp;\n    jmem_pools_free (symbol_list_p, sizeof (ecma_lit_storage_item_t));\n    symbol_list_cp = next_item_cp;\n  }\n} /* ecma_free_symbol_list */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Free string list\n */\nstatic void\necma_free_string_list (jmem_cpointer_t string_list_cp) /**< string list */\n{\n  while (string_list_cp != JMEM_CP_NULL)\n  {\n    ecma_lit_storage_item_t *string_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t, string_list_cp);\n\n    for (int i = 0; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n    {\n      if (string_list_p->values[i] != JMEM_CP_NULL)\n      {\n        ecma_string_t *string_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_string_t,\n                                                                string_list_p->values[i]);\n\n        JERRY_ASSERT (ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p));\n        ecma_destroy_ecma_string (string_p);\n      }\n    }\n\n    jmem_cpointer_t next_item_cp = string_list_p->next_cp;\n    jmem_pools_free (string_list_p, sizeof (ecma_lit_storage_item_t));\n    string_list_cp = next_item_cp;\n  }\n} /* ecma_free_string_list */\n\n/**\n * Free number list\n */\nstatic void\necma_free_number_list (jmem_cpointer_t number_list_cp) /**< number list */\n{\n  while (number_list_cp != JMEM_CP_NULL)\n  {\n    ecma_lit_storage_item_t *number_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t,\n                                                                           number_list_cp);\n\n    for (int i = 0; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n    {\n      if (number_list_p->values[i] != JMEM_CP_NULL)\n      {\n        ecma_dealloc_number (JMEM_CP_GET_NON_NULL_POINTER (ecma_number_t, number_list_p->values[i]));\n      }\n    }\n\n    jmem_cpointer_t next_item_cp = number_list_p->next_cp;\n    jmem_pools_free (number_list_p, sizeof (ecma_lit_storage_item_t));\n    number_list_cp = next_item_cp;\n  }\n} /* ecma_free_number_list */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/**\n * Free bigint list\n */\nstatic void\necma_free_bigint_list (jmem_cpointer_t bigint_list_cp) /**< bigint list */\n{\n  while (bigint_list_cp != JMEM_CP_NULL)\n  {\n    ecma_lit_storage_item_t *bigint_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t,\n                                                                           bigint_list_cp);\n\n    for (int i = 0; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n    {\n      if (bigint_list_p->values[i] != JMEM_CP_NULL)\n      {\n        ecma_extended_primitive_t *bigint_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_extended_primitive_t,\n                                                                            bigint_list_p->values[i]);\n        JERRY_ASSERT (ECMA_EXTENDED_PRIMITIVE_IS_REF_EQUALS_TO_ONE (bigint_p));\n        ecma_deref_bigint (bigint_p);\n      }\n    }\n\n    jmem_cpointer_t next_item_cp = bigint_list_p->next_cp;\n    jmem_pools_free (bigint_list_p, sizeof (ecma_lit_storage_item_t));\n    bigint_list_cp = next_item_cp;\n  }\n} /* ecma_free_bigint_list */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/**\n * Finalize literal storage\n */\nvoid\necma_finalize_lit_storage (void)\n{\n#if ENABLED (JERRY_ESNEXT)\n  ecma_free_symbol_list (JERRY_CONTEXT (symbol_list_first_cp));\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ecma_free_string_list (JERRY_CONTEXT (string_list_first_cp));\n  ecma_free_number_list (JERRY_CONTEXT (number_list_first_cp));\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  ecma_free_bigint_list (JERRY_CONTEXT (bigint_list_first_cp));\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* ecma_finalize_lit_storage */\n\n/**\n * Find or create a literal string.\n *\n * @return ecma_string_t compressed pointer\n */\necma_value_t\necma_find_or_create_literal_string (const lit_utf8_byte_t *chars_p, /**< string to be searched */\n                                    lit_utf8_size_t size) /**< size of the string */\n{\n  ecma_string_t *string_p = ecma_new_ecma_string_from_utf8 (chars_p, size);\n\n  if (ECMA_IS_DIRECT_STRING (string_p))\n  {\n    return ecma_make_string_value (string_p);\n  }\n\n  jmem_cpointer_t string_list_cp = JERRY_CONTEXT (string_list_first_cp);\n  jmem_cpointer_t *empty_cpointer_p = NULL;\n\n  while (string_list_cp != JMEM_CP_NULL)\n  {\n    ecma_lit_storage_item_t *string_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t, string_list_cp);\n\n    for (int i = 0; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n    {\n      if (string_list_p->values[i] == JMEM_CP_NULL)\n      {\n        if (empty_cpointer_p == NULL)\n        {\n          empty_cpointer_p = string_list_p->values + i;\n        }\n      }\n      else\n      {\n        ecma_string_t *value_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_string_t,\n                                                               string_list_p->values[i]);\n\n        if (ecma_compare_ecma_strings (string_p, value_p))\n        {\n          /* Return with string if found in the list. */\n          ecma_deref_ecma_string (string_p);\n          return ecma_make_string_value (value_p);\n        }\n      }\n    }\n\n    string_list_cp = string_list_p->next_cp;\n  }\n\n  ECMA_SET_STRING_AS_STATIC (string_p);\n  jmem_cpointer_t result;\n  JMEM_CP_SET_NON_NULL_POINTER (result, string_p);\n\n  if (empty_cpointer_p != NULL)\n  {\n    *empty_cpointer_p = result;\n    return ecma_make_string_value (string_p);\n  }\n\n  ecma_lit_storage_item_t *new_item_p;\n  new_item_p = (ecma_lit_storage_item_t *) jmem_pools_alloc (sizeof (ecma_lit_storage_item_t));\n\n  new_item_p->values[0] = result;\n  for (int i = 1; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n  {\n    new_item_p->values[i] = JMEM_CP_NULL;\n  }\n\n  new_item_p->next_cp = JERRY_CONTEXT (string_list_first_cp);\n  JMEM_CP_SET_NON_NULL_POINTER (JERRY_CONTEXT (string_list_first_cp), new_item_p);\n\n  return ecma_make_string_value (string_p);\n} /* ecma_find_or_create_literal_string */\n\n/**\n * Find or create a literal number.\n *\n * @return ecma value\n */\necma_value_t\necma_find_or_create_literal_number (ecma_number_t number_arg) /**< number to be searched */\n{\n  ecma_value_t num = ecma_make_number_value (number_arg);\n\n  if (ecma_is_value_integer_number (num))\n  {\n    return num;\n  }\n\n  JERRY_ASSERT (ecma_is_value_float_number (num));\n\n  jmem_cpointer_t number_list_cp = JERRY_CONTEXT (number_list_first_cp);\n  jmem_cpointer_t *empty_cpointer_p = NULL;\n\n  while (number_list_cp != JMEM_CP_NULL)\n  {\n    ecma_lit_storage_item_t *number_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t,\n                                                                           number_list_cp);\n\n    for (int i = 0; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n    {\n      if (number_list_p->values[i] == JMEM_CP_NULL)\n      {\n        if (empty_cpointer_p == NULL)\n        {\n          empty_cpointer_p = number_list_p->values + i;\n        }\n      }\n      else\n      {\n        ecma_number_t *number_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_number_t,\n                                                                number_list_p->values[i]);\n\n        if (*number_p == number_arg)\n        {\n          ecma_free_value (num);\n          return ecma_make_float_value (number_p);\n        }\n      }\n    }\n\n    number_list_cp = number_list_p->next_cp;\n  }\n\n  jmem_cpointer_t result;\n  JMEM_CP_SET_NON_NULL_POINTER (result, ecma_get_pointer_from_float_value (num));\n\n  if (empty_cpointer_p != NULL)\n  {\n    *empty_cpointer_p = result;\n    return num;\n  }\n\n  ecma_lit_storage_item_t *new_item_p;\n  new_item_p = (ecma_lit_storage_item_t *) jmem_pools_alloc (sizeof (ecma_lit_storage_item_t));\n\n  new_item_p->values[0] = result;\n  for (int i = 1; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n  {\n    new_item_p->values[i] = JMEM_CP_NULL;\n  }\n\n  new_item_p->next_cp = JERRY_CONTEXT (number_list_first_cp);\n  JMEM_CP_SET_NON_NULL_POINTER (JERRY_CONTEXT (number_list_first_cp), new_item_p);\n\n  return num;\n} /* ecma_find_or_create_literal_number */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/**\n * Find or create a literal BigInt.\n *\n * @return BigInt value\n */\necma_value_t\necma_find_or_create_literal_bigint (ecma_value_t bigint) /**< bigint to be searched */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (bigint));\n\n  if (bigint == ECMA_BIGINT_ZERO)\n  {\n    return bigint;\n  }\n\n  jmem_cpointer_t bigint_list_cp = JERRY_CONTEXT (bigint_list_first_cp);\n  jmem_cpointer_t *empty_cpointer_p = NULL;\n\n  while (bigint_list_cp != JMEM_CP_NULL)\n  {\n    ecma_lit_storage_item_t *bigint_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t,\n                                                                           bigint_list_cp);\n\n    for (int i = 0; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n    {\n      if (bigint_list_p->values[i] == JMEM_CP_NULL)\n      {\n        if (empty_cpointer_p == NULL)\n        {\n          empty_cpointer_p = bigint_list_p->values + i;\n        }\n      }\n      else\n      {\n        ecma_extended_primitive_t *other_bigint_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_extended_primitive_t,\n                                                                                  bigint_list_p->values[i]);\n        ecma_value_t other_bigint = ecma_make_extended_primitive_value (other_bigint_p, ECMA_TYPE_BIGINT);\n\n        if (ecma_bigint_is_equal_to_bigint (bigint, other_bigint))\n        {\n          ecma_free_value (bigint);\n          return other_bigint;\n        }\n      }\n    }\n\n    bigint_list_cp = bigint_list_p->next_cp;\n  }\n\n  jmem_cpointer_t result;\n  JMEM_CP_SET_NON_NULL_POINTER (result, ecma_get_extended_primitive_from_value (bigint));\n\n  if (empty_cpointer_p != NULL)\n  {\n    *empty_cpointer_p = result;\n    return bigint;\n  }\n\n  ecma_lit_storage_item_t *new_item_p;\n  new_item_p = (ecma_lit_storage_item_t *) jmem_pools_alloc (sizeof (ecma_lit_storage_item_t));\n\n  new_item_p->values[0] = result;\n  for (int i = 1; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n  {\n    new_item_p->values[i] = JMEM_CP_NULL;\n  }\n\n  new_item_p->next_cp = JERRY_CONTEXT (bigint_list_first_cp);\n  JMEM_CP_SET_NON_NULL_POINTER (JERRY_CONTEXT (bigint_list_first_cp), new_item_p);\n\n  return bigint;\n} /* ecma_find_or_create_literal_bigint */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/**\n * Log2 of snapshot literal alignment.\n */\n#define JERRY_SNAPSHOT_LITERAL_ALIGNMENT_LOG 1\n\n/**\n * Snapshot literal alignment.\n */\n#define JERRY_SNAPSHOT_LITERAL_ALIGNMENT (1u << JERRY_SNAPSHOT_LITERAL_ALIGNMENT_LOG)\n\n/**\n * Literal offset shift.\n */\n#define JERRY_SNAPSHOT_LITERAL_SHIFT (ECMA_VALUE_SHIFT + 2)\n\n/**\n * Literal value is number.\n */\n#define JERRY_SNAPSHOT_LITERAL_IS_NUMBER (1u << ECMA_VALUE_SHIFT)\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n/**\n * Literal value is BigInt.\n */\n#define JERRY_SNAPSHOT_LITERAL_IS_BIGINT (2u << ECMA_VALUE_SHIFT)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n\n/**\n * Append the value at the end of the appropriate list if it is not present there.\n */\nvoid ecma_save_literals_append_value (ecma_value_t value, /**< value to be appended */\n                                      ecma_collection_t *lit_pool_p) /**< list of known values */\n{\n  /* Unlike direct numbers, direct strings are converted to character literals. */\n  if (!ecma_is_value_string (value)\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n      && (!ecma_is_value_bigint (value) || value == ECMA_BIGINT_ZERO)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n      && !ecma_is_value_float_number (value))\n  {\n    return;\n  }\n\n  ecma_value_t *buffer_p = lit_pool_p->buffer_p;\n\n  for (uint32_t i = 0; i < lit_pool_p->item_count; i++)\n  {\n    /* Strings / numbers are direct strings or stored in the literal storage.\n     * Therefore direct comparison is enough to find the same strings / numbers. */\n    if (buffer_p[i] == value)\n    {\n      return;\n    }\n  }\n\n  ecma_collection_push_back (lit_pool_p, value);\n} /* ecma_save_literals_append_value */\n\n/**\n * Add names from a byte-code data to a list.\n */\nvoid\necma_save_literals_add_compiled_code (const ecma_compiled_code_t *compiled_code_p, /**< byte-code data */\n                                      ecma_collection_t *lit_pool_p) /**< list of known values */\n{\n  ecma_value_t *literal_p;\n  uint32_t argument_end;\n  uint32_t register_end;\n  uint32_t const_literal_end;\n  uint32_t literal_end;\n\n  JERRY_ASSERT (CBC_IS_FUNCTION (compiled_code_p->status_flags));\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) compiled_code_p;\n    uint8_t *byte_p = (uint8_t *) compiled_code_p;\n\n    literal_p = (ecma_value_t *) (byte_p + sizeof (cbc_uint16_arguments_t));\n    register_end = args_p->register_end;\n    const_literal_end = args_p->const_literal_end - register_end;\n    literal_end = args_p->literal_end - register_end;\n    argument_end = args_p->argument_end;\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) compiled_code_p;\n    uint8_t *byte_p = (uint8_t *) compiled_code_p;\n\n    literal_p = (ecma_value_t *) (byte_p + sizeof (cbc_uint8_arguments_t));\n    register_end = args_p->register_end;\n    const_literal_end = args_p->const_literal_end - register_end;\n    literal_end = args_p->literal_end - register_end;\n    argument_end = args_p->argument_end;\n  }\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)\n  {\n    for (uint32_t i = 0; i < argument_end; i++)\n    {\n      ecma_save_literals_append_value (literal_p[i], lit_pool_p);\n    }\n  }\n\n  for (uint32_t i = 0; i < const_literal_end; i++)\n  {\n    ecma_save_literals_append_value (literal_p[i], lit_pool_p);\n  }\n\n  for (uint32_t i = const_literal_end; i < literal_end; i++)\n  {\n    ecma_compiled_code_t *bytecode_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t,\n                                                                        literal_p[i]);\n\n    if (CBC_IS_FUNCTION (bytecode_p->status_flags)\n        && bytecode_p != compiled_code_p)\n    {\n      ecma_save_literals_add_compiled_code (bytecode_p, lit_pool_p);\n    }\n  }\n\n  uint8_t *byte_p = ((uint8_t *) compiled_code_p) + (((size_t) compiled_code_p->size) << JMEM_ALIGNMENT_LOG);\n  literal_p = ecma_snapshot_resolve_serializable_values ((ecma_compiled_code_t *) compiled_code_p, byte_p);\n\n  while (literal_p < (ecma_value_t *) byte_p)\n  {\n    ecma_save_literals_append_value (*literal_p, lit_pool_p);\n    literal_p++;\n  }\n} /* ecma_save_literals_add_compiled_code */\n\n/**\n * Save literals to specified snapshot buffer.\n *\n * Note:\n *      Frees 'lit_pool_p' regardless of success.\n *\n * @return true - if save was performed successfully (i.e. buffer size is sufficient),\n *         false - otherwise\n */\nbool\necma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, /**< list of known values */\n                                 uint32_t *buffer_p, /**< [out] output snapshot buffer */\n                                 size_t buffer_size, /**< size of the buffer */\n                                 size_t *in_out_buffer_offset_p, /**< [in,out] write position in the buffer */\n                                 lit_mem_to_snapshot_id_map_entry_t **out_map_p, /**< [out] map from literal identifiers\n                                                                                  *   to the literal offsets\n                                                                                  *   in snapshot */\n                                 uint32_t *out_map_len_p) /**< [out] number of literals */\n{\n  if (lit_pool_p->item_count == 0)\n  {\n    *out_map_p = NULL;\n    *out_map_len_p = 0;\n  }\n\n  uint32_t lit_table_size = 0;\n  size_t max_lit_table_size = buffer_size - *in_out_buffer_offset_p;\n\n  if (max_lit_table_size > (UINT32_MAX >> JERRY_SNAPSHOT_LITERAL_SHIFT))\n  {\n    max_lit_table_size = (UINT32_MAX >> JERRY_SNAPSHOT_LITERAL_SHIFT);\n  }\n\n  ecma_value_t *lit_buffer_p = lit_pool_p->buffer_p;\n\n  /* Compute the size of the literal pool. */\n  for (uint32_t i = 0; i < lit_pool_p->item_count; i++)\n  {\n    if (ecma_is_value_float_number (lit_buffer_p[i]))\n    {\n      lit_table_size += (uint32_t) sizeof (ecma_number_t);\n    }\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    else if (ecma_is_value_bigint (lit_buffer_p[i]))\n    {\n      ecma_extended_primitive_t *bigint_p = ecma_get_extended_primitive_from_value (lit_buffer_p[i]);\n\n      lit_table_size += (uint32_t) JERRY_ALIGNUP (sizeof (uint32_t) + ECMA_BIGINT_GET_SIZE (bigint_p),\n                                                  JERRY_SNAPSHOT_LITERAL_ALIGNMENT);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    else\n    {\n      ecma_string_t *string_p = ecma_get_string_from_value (lit_buffer_p[i]);\n\n      lit_table_size += (uint32_t) JERRY_ALIGNUP (sizeof (uint16_t) + ecma_string_get_size (string_p),\n                                                  JERRY_SNAPSHOT_LITERAL_ALIGNMENT);\n    }\n\n    /* Check whether enough space is available and the maximum size is not reached. */\n    if (lit_table_size > max_lit_table_size)\n    {\n      ecma_collection_destroy (lit_pool_p);\n      return false;\n    }\n  }\n\n  lit_mem_to_snapshot_id_map_entry_t *map_p;\n  uint32_t total_count = lit_pool_p->item_count;\n\n  map_p = jmem_heap_alloc_block (total_count * sizeof (lit_mem_to_snapshot_id_map_entry_t));\n\n  /* Set return values (no error is possible from here). */\n  JERRY_ASSERT ((*in_out_buffer_offset_p % sizeof (uint32_t)) == 0);\n\n  uint8_t *destination_p = (uint8_t *) (buffer_p + (*in_out_buffer_offset_p / sizeof (uint32_t)));\n  uint32_t literal_offset = 0;\n\n  *in_out_buffer_offset_p += lit_table_size;\n  *out_map_p = map_p;\n  *out_map_len_p = total_count;\n\n  lit_buffer_p = lit_pool_p->buffer_p;\n\n  /* Generate literal pool data. */\n  for (uint32_t i = 0; i < lit_pool_p->item_count; i++)\n  {\n    map_p->literal_id = lit_buffer_p[i];\n    map_p->literal_offset = (literal_offset << JERRY_SNAPSHOT_LITERAL_SHIFT) | ECMA_TYPE_SNAPSHOT_OFFSET;\n\n    lit_utf8_size_t length;\n\n    if (ecma_is_value_float_number (lit_buffer_p[i]))\n    {\n      map_p->literal_offset |= JERRY_SNAPSHOT_LITERAL_IS_NUMBER;\n\n      ecma_number_t num = ecma_get_float_from_value (lit_buffer_p[i]);\n      memcpy (destination_p, &num, sizeof (ecma_number_t));\n\n      length = JERRY_ALIGNUP (sizeof (ecma_number_t), JERRY_SNAPSHOT_LITERAL_ALIGNMENT);\n    }\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    else if (ecma_is_value_bigint (lit_buffer_p[i]))\n    {\n      map_p->literal_offset |= JERRY_SNAPSHOT_LITERAL_IS_BIGINT;\n\n      ecma_extended_primitive_t *bigint_p = ecma_get_extended_primitive_from_value (lit_buffer_p[i]);\n      uint32_t size = ECMA_BIGINT_GET_SIZE (bigint_p);\n\n      memcpy (destination_p, &bigint_p->u.bigint_sign_and_size, sizeof (uint32_t));\n      memcpy (destination_p + sizeof (uint32_t), ECMA_BIGINT_GET_DIGITS (bigint_p, 0), size);\n\n      length = JERRY_ALIGNUP (sizeof (uint32_t) + size, JERRY_SNAPSHOT_LITERAL_ALIGNMENT);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    else\n    {\n      ecma_string_t *string_p = ecma_get_string_from_value (lit_buffer_p[i]);\n      length = ecma_string_get_size (string_p);\n\n      *(uint16_t *) destination_p = (uint16_t) length;\n\n      ecma_string_to_utf8_bytes (string_p, destination_p + sizeof (uint16_t), length);\n\n      length = JERRY_ALIGNUP (sizeof (uint16_t) + length, JERRY_SNAPSHOT_LITERAL_ALIGNMENT);\n    }\n\n    JERRY_ASSERT ((length % sizeof (uint16_t)) == 0);\n    destination_p += length;\n    literal_offset += length;\n\n    map_p++;\n  }\n\n  ecma_collection_destroy (lit_pool_p);\n  return true;\n} /* ecma_save_literals_for_snapshot */\n\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE)\n\n/**\n * Get the compressed pointer of a given literal.\n *\n * @return literal compressed pointer\n */\necma_value_t\necma_snapshot_get_literal (const uint8_t *literal_base_p, /**< literal start */\n                           ecma_value_t literal_value) /**< string / number offset */\n{\n  JERRY_ASSERT ((literal_value & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_SNAPSHOT_OFFSET);\n\n  const uint8_t *literal_p = literal_base_p + (literal_value >> JERRY_SNAPSHOT_LITERAL_SHIFT);\n\n  if (literal_value & JERRY_SNAPSHOT_LITERAL_IS_NUMBER)\n  {\n    ecma_number_t num;\n    memcpy (&num, literal_p, sizeof (ecma_number_t));\n    return ecma_find_or_create_literal_number (num);\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (literal_value & JERRY_SNAPSHOT_LITERAL_IS_BIGINT)\n  {\n    uint32_t bigint_sign_and_size = *(uint32_t *) literal_p;\n    uint32_t size = bigint_sign_and_size & ~(uint32_t) (sizeof (ecma_bigint_digit_t) - 1);\n\n    ecma_extended_primitive_t *bigint_p = ecma_bigint_create (size);\n\n    if (bigint_p == NULL)\n    {\n      jerry_fatal (ERR_OUT_OF_MEMORY);\n    }\n\n    /* Only the sign bit can differ. */\n    JERRY_ASSERT (bigint_p->u.bigint_sign_and_size == (bigint_sign_and_size & ~(uint32_t) ECMA_BIGINT_SIGN));\n\n    bigint_p->u.bigint_sign_and_size = bigint_sign_and_size;\n    memcpy (ECMA_BIGINT_GET_DIGITS (bigint_p, 0), literal_p + sizeof (uint32_t), size);\n    return ecma_find_or_create_literal_bigint (ecma_make_extended_primitive_value (bigint_p, ECMA_TYPE_BIGINT));\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  uint16_t length = *(const uint16_t *) literal_p;\n\n  return ecma_find_or_create_literal_string (literal_p + sizeof (uint16_t), length);\n} /* ecma_snapshot_get_literal */\n\n/**\n * Compute the start of the serializable ecma-values of the bytecode\n * Related values:\n *  - function argument names, if CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED is present\n *  - function name, if CBC_CODE_FLAGS_CLASS_CONSTRUCTOR is not present and ES.next profile is enabled\n *\n * @return pointer to the beginning of the serializable ecma-values\n */\necma_value_t *\necma_snapshot_resolve_serializable_values (ecma_compiled_code_t *compiled_code_p, /**< compiled code */\n                                           uint8_t *bytecode_end_p) /**< end of the bytecode */\n{\n  ecma_value_t *base_p = (ecma_value_t *) bytecode_end_p;\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)\n  {\n    uint32_t argument_end;\n    if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n    {\n      argument_end = ((cbc_uint16_arguments_t *) compiled_code_p)->argument_end;\n    }\n    else\n    {\n      argument_end = ((cbc_uint8_arguments_t *) compiled_code_p)->argument_end;\n    }\n\n    base_p -= argument_end;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  /* function name */\n  if (CBC_FUNCTION_GET_TYPE (compiled_code_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)\n  {\n    base_p--;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return base_p;\n} /* ecma_snapshot_resolve_serializable_values */\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-literal-storage.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_LIT_STORAGE_H\n#define ECMA_LIT_STORAGE_H\n\n#include \"ecma-globals.h\"\n#include \"jmem.h\"\n#include \"lit-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmalitstorage Literal storage\n * @{\n */\n\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\n/**\n * Snapshot literal - offset map\n */\ntypedef struct\n{\n  ecma_value_t literal_id; /**< literal id */\n  ecma_value_t literal_offset; /**< literal offset */\n} lit_mem_to_snapshot_id_map_entry_t;\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n\nvoid ecma_finalize_lit_storage (void);\n\necma_value_t ecma_find_or_create_literal_string (const lit_utf8_byte_t *chars_p, lit_utf8_size_t size);\necma_value_t ecma_find_or_create_literal_number (ecma_number_t number_arg);\n#if ENABLED (JERRY_BUILTIN_BIGINT)\necma_value_t ecma_find_or_create_literal_bigint (ecma_value_t bigint);\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#if ENABLED (JERRY_SNAPSHOT_SAVE)\nvoid ecma_save_literals_append_value (ecma_value_t value, ecma_collection_t *lit_pool_p);\nvoid ecma_save_literals_add_compiled_code (const ecma_compiled_code_t *compiled_code_p,\n                                           ecma_collection_t *lit_pool_p);\nbool ecma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, uint32_t *buffer_p, size_t buffer_size,\n                                      size_t *in_out_buffer_offset_p, lit_mem_to_snapshot_id_map_entry_t **out_map_p,\n                                      uint32_t *out_map_len_p);\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE)\necma_value_t\necma_snapshot_get_literal (const uint8_t *literal_base_p, ecma_value_t literal_value);\necma_value_t *\necma_snapshot_resolve_serializable_values (ecma_compiled_code_t *compiled_code_p, uint8_t *byte_code_end_p);\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_LIT_STORAGE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-module.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jcontext.h\"\n#include \"jerryscript.h\"\n\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-module.h\"\n#include \"ecma-objects.h\"\n#include \"lit-char-helpers.h\"\n#include \"vm.h\"\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n\n/**\n * Takes a ModuleSpecifier and applies path normalization to it.\n * It's not checked if the ModuleSpecifier is a valid path or not.\n * Note: See 15.2.1.17\n *\n * @return pointer to ecma_string_t containing the normalized and zero terminated path\n */\necma_string_t *\necma_module_create_normalized_path (const lit_utf8_byte_t *char_p, /**< module path specifier */\n                                    lit_utf8_size_t size, /**< size of module specifier */\n                                    ecma_string_t *const base_path_p) /**< base path for the module specifier */\n{\n  JERRY_ASSERT (size > 0);\n  ecma_string_t *ret_p = NULL;\n\n  /* The module specifier is cesu8 encoded, we need to convert is to utf8, and zero terminate it,\n   * so that OS level functions can handle it. */\n  lit_utf8_byte_t *path_p = (lit_utf8_byte_t *) jmem_heap_alloc_block (size + 1u);\n\n  lit_utf8_size_t utf8_size;\n  utf8_size = lit_convert_cesu8_string_to_utf8_string (char_p,\n                                                       size,\n                                                       path_p,\n                                                       size);\n  path_p[utf8_size] = LIT_CHAR_NULL;\n\n  lit_utf8_byte_t *module_path_p = NULL;\n  lit_utf8_size_t module_path_size = 0;\n\n  if (base_path_p != NULL)\n  {\n    module_path_size = ecma_string_get_size (base_path_p);\n    module_path_p = (lit_utf8_byte_t *) jmem_heap_alloc_block (module_path_size + 1);\n\n    lit_utf8_size_t module_utf8_size;\n    module_utf8_size = ecma_string_copy_to_utf8_buffer (base_path_p,\n                                                        module_path_p,\n                                                        module_path_size);\n\n    module_path_p[module_utf8_size] = LIT_CHAR_NULL;\n  }\n\n  lit_utf8_byte_t *normalized_out_p = (lit_utf8_byte_t *) jmem_heap_alloc_block (ECMA_MODULE_MAX_PATH);\n  size_t normalized_size = jerry_port_normalize_path ((const char *) path_p,\n                                                      (char *) normalized_out_p,\n                                                      ECMA_MODULE_MAX_PATH,\n                                                      (char *) module_path_p);\n\n  if (normalized_size > 0)\n  {\n    /* Convert the normalized path to cesu8. */\n    ret_p = ecma_new_ecma_string_from_utf8_converted_to_cesu8 (normalized_out_p, (lit_utf8_size_t) (normalized_size));\n  }\n\n  jmem_heap_free_block (path_p, size + 1u);\n  jmem_heap_free_block (normalized_out_p, ECMA_MODULE_MAX_PATH);\n  if (module_path_p != NULL)\n  {\n    jmem_heap_free_block (module_path_p, module_path_size + 1);\n  }\n\n  return ret_p;\n} /* ecma_module_create_normalized_path */\n\n/**\n * Push a new module into the module list. New modules are inserted after the head module, this way in the end the\n * root module remains the first in the list.\n */\nstatic void\necma_module_list_push (ecma_module_t *module_p)\n{\n  ecma_module_t *head_p = JERRY_CONTEXT (module_list_p);\n  module_p->next_p = head_p->next_p;\n  head_p->next_p = module_p;\n} /* ecma_module_list_push */\n\n/**\n * Lookup a module with a specific identifier.\n *\n * @return pointer to ecma_module_t, if found\n *         NULL, otherwise\n */\nstatic ecma_module_t *\necma_module_list_lookup (ecma_string_t *const path_p) /**< module identifier */\n{\n  ecma_module_t *current_p = JERRY_CONTEXT (module_list_p);\n  while (current_p != NULL)\n  {\n    if (ecma_compare_ecma_strings (path_p, current_p->path_p))\n    {\n      return current_p;\n    }\n\n    current_p = current_p->next_p;\n  }\n\n  return NULL;\n} /* ecma_module_list_lookup */\n\n/**\n * Create a new module\n *\n * @return pointer to created module\n */\nstatic ecma_module_t *\necma_module_create_module (ecma_string_t *const path_p) /**< module identifier */\n{\n  ecma_module_t *module_p = (ecma_module_t *) jmem_heap_alloc_block (sizeof (ecma_module_t));\n  memset (module_p, 0, sizeof (ecma_module_t));\n\n  module_p->path_p = path_p;\n  ecma_module_list_push (module_p);\n  return module_p;\n} /* ecma_module_create_module */\n\n/**\n * Checks if we already have a module request in the module list.\n *\n * @return pointer to found or newly created module structure\n */\necma_module_t *\necma_module_find_module (ecma_string_t *const path_p) /**< module path */\n{\n  ecma_module_t *module_p = ecma_module_list_lookup (path_p);\n\n  if (module_p)\n  {\n    ecma_deref_ecma_string (path_p);\n    return module_p;\n  }\n\n  return ecma_module_create_module (path_p);\n} /* ecma_module_find_module */\n\n/**\n * Create a new native module\n *\n * @return pointer to created module\n */\necma_module_t *\necma_module_find_native_module (ecma_string_t *const path_p)\n{\n  ecma_module_t *module_p = ecma_module_list_lookup (path_p);\n\n  if (module_p != NULL)\n  {\n    return module_p;\n  }\n\n  ecma_value_t native = jerry_port_get_native_module (ecma_make_string_value (path_p));\n\n  if (!ecma_is_value_undefined (native))\n  {\n    JERRY_ASSERT (ecma_is_value_object (native));\n\n    module_p = ecma_module_create_module (path_p);\n    module_p->state = ECMA_MODULE_STATE_NATIVE;\n    module_p->namespace_object_p = ecma_get_object_from_value (native);\n\n    return module_p;\n  }\n\n  return NULL;\n} /* ecma_module_find_native_module */\n\n/**\n * Initialize context variables for the root module.\n */\nvoid\necma_module_initialize_context (ecma_string_t *root_path_p) /**< root module */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (module_current_p) == NULL);\n  JERRY_ASSERT (JERRY_CONTEXT (module_list_p) == NULL);\n\n  lit_utf8_size_t path_str_size;\n  uint8_t flags = ECMA_STRING_FLAG_EMPTY;\n\n  const lit_utf8_byte_t *path_str_chars_p = ecma_string_get_chars (root_path_p,\n                                                                   &path_str_size,\n                                                                   NULL,\n                                                                   NULL,\n                                                                   &flags);\n\n  ecma_string_t *path_p = ecma_module_create_normalized_path (path_str_chars_p,\n                                                              path_str_size,\n                                                              NULL);\n\n  if (path_p == NULL)\n  {\n    ecma_ref_ecma_string (root_path_p);\n    path_p = root_path_p;\n  }\n\n  ecma_module_t *module_p = (ecma_module_t *) jmem_heap_alloc_block (sizeof (ecma_module_t));\n  memset (module_p, 0, sizeof (ecma_module_t));\n\n  module_p->path_p = path_p;\n  /* Root modules are handled differently then the rest of the referenced modules, as the scope and compiled code\n   * are handled separately. */\n  module_p->state = ECMA_MODULE_STATE_ROOT;\n\n  JERRY_CONTEXT (module_current_p) = module_p;\n  JERRY_CONTEXT (module_list_p) = module_p;\n} /* ecma_module_initialize_context */\n\n/**\n * cleanup context variables for the root module.\n */\nvoid\necma_module_cleanup_context (void)\n{\n  ecma_module_cleanup (JERRY_CONTEXT (module_current_p));\n#ifndef JERRY_NDEBUG\n  JERRY_CONTEXT (module_current_p) = NULL;\n  JERRY_CONTEXT (module_list_p) = NULL;\n#endif /* JERRY_NDEBUG */\n} /* ecma_module_cleanup_context */\n\n/**\n *  Inserts a {module, export_name} record into a resolve set.\n *  Note: See 15.2.1.16.3 - resolveSet and exportStarSet\n *\n *  @return true - if the set already contains the record\n *          false - otherwise\n */\nbool\necma_module_resolve_set_insert (ecma_module_resolve_set_t **set_p, /**< [in, out] resolve set */\n                                ecma_module_t *const module_p, /**< module */\n                                ecma_string_t *const export_name_p) /**< export name */\n{\n  JERRY_ASSERT (set_p != NULL);\n  ecma_module_resolve_set_t *current_p = *set_p;\n\n  while (current_p != NULL)\n  {\n    if (current_p->record.module_p == module_p\n        && ecma_compare_ecma_strings (current_p->record.name_p, export_name_p))\n    {\n      return false;\n    }\n\n    current_p = current_p->next_p;\n  }\n\n  ecma_module_resolve_set_t *new_p;\n  new_p = (ecma_module_resolve_set_t *) jmem_heap_alloc_block (sizeof (ecma_module_resolve_set_t));\n\n  new_p->next_p = *set_p;\n  new_p->record.module_p = module_p;\n  ecma_ref_ecma_string (export_name_p);\n  new_p->record.name_p = export_name_p;\n\n  *set_p = new_p;\n  return true;\n} /* ecma_module_resolve_set_insert */\n\n/**\n * Cleans up contents of a resolve set.\n */\nvoid\necma_module_resolve_set_cleanup (ecma_module_resolve_set_t *set_p) /**< resolve set */\n{\n  while (set_p != NULL)\n  {\n    ecma_module_resolve_set_t *next_p = set_p->next_p;\n    ecma_deref_ecma_string (set_p->record.name_p);\n    jmem_heap_free_block (set_p, sizeof (ecma_module_resolve_set_t));\n    set_p = next_p;\n  }\n} /* ecma_module_resolve_set_cleanup */\n\n/**\n * Pushes a new resolve frame on top of a resolve stack and initializes it\n * to begin resolving the specified exported name in the base module.\n */\nvoid\necma_module_resolve_stack_push (ecma_module_resolve_stack_t **stack_p, /**< [in, out] resolve stack */\n                                ecma_module_t * const module_p, /**< base module */\n                                ecma_string_t * const export_name_p) /**< exported name */\n{\n  JERRY_ASSERT (stack_p != NULL);\n  ecma_module_resolve_stack_t *new_frame_p;\n  new_frame_p = (ecma_module_resolve_stack_t *) jmem_heap_alloc_block (sizeof (ecma_module_resolve_stack_t));\n\n  ecma_ref_ecma_string (export_name_p);\n  new_frame_p->export_name_p = export_name_p;\n  new_frame_p->module_p = module_p;\n  new_frame_p->resolving = false;\n\n  new_frame_p->next_p = *stack_p;\n  *stack_p = new_frame_p;\n} /* ecma_module_resolve_stack_push */\n\n/**\n * Pops the topmost frame from a resolve stack.\n */\nvoid\necma_module_resolve_stack_pop (ecma_module_resolve_stack_t **stack_p) /**< [in, out] resolve stack */\n{\n  JERRY_ASSERT (stack_p != NULL);\n  ecma_module_resolve_stack_t *current_p = *stack_p;\n\n  if (current_p != NULL)\n  {\n    *stack_p = current_p->next_p;\n    ecma_deref_ecma_string (current_p->export_name_p);\n    jmem_heap_free_block (current_p, sizeof (ecma_module_resolve_stack_t));\n  }\n} /* ecma_module_resolve_stack_pop */\n\n/**\n * Resolves which module satisfies an export based from a specific module in the import tree.\n * If no error occurs, out_record_p will contain a {module, local_name} record, which satisfies\n * the export, or {NULL, NULL} if the export is ambiguous.\n * Note: See 15.2.1.16.3\n *\n * @return ECMA_VALUE_ERROR - if an error occured\n *         ECMA_VALUE_EMPTY - otherwise\n */\nstatic ecma_value_t\necma_module_resolve_export (ecma_module_t *const module_p, /**< base module */\n                            ecma_string_t *const export_name_p, /**< export name */\n                            ecma_module_record_t *out_record_p) /**< [out] found module record */\n{\n  ecma_module_resolve_set_t *resolve_set_p = NULL;\n  ecma_module_resolve_stack_t *stack_p = NULL;\n\n  bool found = false;\n  ecma_module_record_t found_record = { NULL, NULL };\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  ecma_module_resolve_stack_push (&stack_p, module_p, export_name_p);\n\n  while (stack_p != NULL)\n  {\n    ecma_module_resolve_stack_t *current_frame_p = stack_p;\n\n    ecma_module_t *current_module_p = current_frame_p->module_p;\n    JERRY_ASSERT (current_module_p->state >= ECMA_MODULE_STATE_PARSED);\n    ecma_string_t *current_export_name_p = current_frame_p->export_name_p;\n\n    if (!current_frame_p->resolving)\n    {\n      current_frame_p->resolving = true;\n\n      /* 15.2.1.16.3 / 2-3 */\n      if (!ecma_module_resolve_set_insert (&resolve_set_p, current_module_p, current_export_name_p))\n      {\n        /* This is a circular import request. */\n        ecma_module_resolve_stack_pop (&stack_p);\n        continue;\n      }\n\n      if (current_module_p->state == ECMA_MODULE_STATE_NATIVE)\n      {\n        ecma_object_t *object_p = current_module_p->namespace_object_p;\n        ecma_value_t prop_value = ecma_op_object_find_own (ecma_make_object_value (object_p),\n                                                           object_p,\n                                                           current_export_name_p);\n        if (ecma_is_value_found (prop_value))\n        {\n          found = true;\n          found_record.module_p = current_module_p;\n          found_record.name_p = current_export_name_p;\n          ecma_free_value (prop_value);\n        }\n\n        if (ecma_compare_ecma_string_to_magic_id (current_export_name_p, LIT_MAGIC_STRING_DEFAULT))\n        {\n          ret_value = ecma_raise_syntax_error (ECMA_ERR_MSG (\"No default export in native module.\"));\n          break;\n        }\n\n        ecma_module_resolve_stack_pop (&stack_p);\n        continue;\n      }\n\n      if (current_module_p->local_exports_p != NULL)\n      {\n        /* 15.2.1.16.3 / 4 */\n        JERRY_ASSERT (current_module_p->local_exports_p->next_p == NULL);\n        ecma_module_names_t *export_names_p = current_module_p->local_exports_p->module_names_p;\n        while (export_names_p != NULL)\n        {\n          if (ecma_compare_ecma_strings (current_export_name_p, export_names_p->imex_name_p))\n          {\n            if (found)\n            {\n              /* This is an ambigous export. */\n              found_record.module_p = NULL;\n              found_record.name_p = NULL;\n              break;\n            }\n\n            /* The current module provides a direct binding for this export. */\n            found = true;\n            found_record.module_p = current_module_p;\n            found_record.name_p = export_names_p->local_name_p;\n            break;\n          }\n\n          export_names_p = export_names_p->next_p;\n        }\n      }\n\n      if (found)\n      {\n        /* We found a resolution for the current frame, return to the previous. */\n        ecma_module_resolve_stack_pop (&stack_p);\n        continue;\n      }\n\n      /* 15.2.1.16.3 / 5 */\n      ecma_module_node_t *indirect_export_p = current_module_p->indirect_exports_p;\n      while (indirect_export_p != NULL)\n      {\n        ecma_module_names_t *export_names_p = indirect_export_p->module_names_p;\n        while (export_names_p != NULL)\n        {\n          if (ecma_compare_ecma_strings (current_export_name_p, export_names_p->imex_name_p))\n          {\n            /* 5.2.1.16.3 / 5.a.iv */\n            ecma_module_resolve_stack_push (&stack_p,\n                                            indirect_export_p->module_request_p,\n                                            export_names_p->local_name_p);\n            break;\n          }\n\n          export_names_p = export_names_p->next_p;\n        }\n\n        indirect_export_p = indirect_export_p->next_p;\n      }\n\n      /* We need to check whether the newly pushed indirect exports resolve to anything.\n       * Keep current frame in the stack, and continue from the topmost frame. */\n      continue;\n    } /* if (!current_frame_p->resolving) */\n\n    /* By the time we return to the current frame, the indirect exports will have finished resolving. */\n    if (found)\n    {\n      /* We found at least one export that satisfies the current request.\n       * Pop current frame, and return to the previous. */\n      ecma_module_resolve_stack_pop (&stack_p);\n      continue;\n    }\n\n    /* 15.2.1.16.3 / 6 */\n    if (ecma_compare_ecma_string_to_magic_id (current_export_name_p, LIT_MAGIC_STRING_DEFAULT))\n    {\n      ret_value = ecma_raise_syntax_error (ECMA_ERR_MSG (\"No explicitly defined default export in module.\"));\n      break;\n    }\n\n    /* 15.2.1.16.3 / 7-8 */\n    if (!ecma_module_resolve_set_insert (&resolve_set_p,\n                                         current_module_p,\n                                         ecma_get_magic_string (LIT_MAGIC_STRING_ASTERIX_CHAR)))\n    {\n      /* This is a circular import request. */\n      ecma_module_resolve_stack_pop (&stack_p);\n      continue;\n    }\n\n    /* Pop the current frame, we have nothing else to do here after the star export resolutions are queued. */\n    ecma_module_resolve_stack_pop (&stack_p);\n\n    /* 15.2.1.16.3 / 10 */\n    ecma_module_node_t *star_export_p = current_module_p->star_exports_p;\n    while (star_export_p != NULL)\n    {\n      JERRY_ASSERT (star_export_p->module_names_p == NULL);\n\n      /* 15.2.1.16.3 / 10.c */\n      ecma_module_resolve_stack_push (&stack_p, star_export_p->module_request_p, export_name_p);\n\n      star_export_p = star_export_p->next_p;\n    }\n  }\n\n  /* Clean up. */\n  ecma_module_resolve_set_cleanup (resolve_set_p);\n  while (stack_p)\n  {\n    ecma_module_resolve_stack_pop (&stack_p);\n  }\n\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    /* No default export was found */\n    return ret_value;\n  }\n\n  if (found)\n  {\n    *out_record_p = found_record;\n  }\n  else\n  {\n    ret_value = ecma_raise_syntax_error (ECMA_ERR_MSG (\"Unexported or circular import request.\"));\n  }\n\n  return ret_value;\n} /* ecma_module_resolve_export */\n\n/**\n * Evaluates an EcmaScript module.\n *\n * @return ECMA_VALUE_ERROR - if an error occured\n *         ECMA_VALUE_EMPTY - otherwise\n */\nstatic ecma_value_t\necma_module_evaluate (ecma_module_t *module_p) /**< module */\n{\n  JERRY_ASSERT (module_p->state >= ECMA_MODULE_STATE_PARSED);\n\n  if (module_p->state >= ECMA_MODULE_STATE_EVALUATING)\n  {\n    return ECMA_VALUE_EMPTY;\n  }\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_object_t *global_object_p = (ecma_object_t *) ecma_op_function_get_realm (module_p->compiled_code_p);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  ecma_object_t *global_object_p = ecma_builtin_get_global ();\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  module_p->state = ECMA_MODULE_STATE_EVALUATING;\n  module_p->scope_p = ecma_create_decl_lex_env (ecma_get_global_environment (global_object_p));\n\n  ecma_value_t ret_value;\n  ret_value = vm_run_module (module_p);\n\n  if (!ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    ecma_free_value (ret_value);\n    ret_value = ECMA_VALUE_EMPTY;\n  }\n\n  module_p->state = ECMA_MODULE_STATE_EVALUATED;\n  ecma_bytecode_deref (module_p->compiled_code_p);\n#ifndef JERRY_NDEBUG\n  module_p->compiled_code_p = NULL;\n#endif /* JERRY_NDEBUG */\n\n  return ret_value;\n} /* ecma_module_evaluate */\n\n/**\n * Resolves an export and adds it to the modules namespace object, if the export name is not yet handled.\n * Note: See 15.2.1.16.2 and 15.2.1.18\n *\n * @return ECMA_VALUE_ERROR - if an error occured\n *         ECMA_VALUE_EMPTY - otherwise\n */\nstatic ecma_value_t\necma_module_namespace_object_add_export_if_needed (ecma_module_t *module_p, /**< module */\n                                                   ecma_string_t *export_name_p) /**< export name */\n{\n  JERRY_ASSERT (module_p->namespace_object_p != NULL);\n  ecma_value_t result = ECMA_VALUE_EMPTY;\n\n  /* Default exports should not be added to the namespace object. */\n  if (ecma_compare_ecma_string_to_magic_id (export_name_p, LIT_MAGIC_STRING_DEFAULT)\n      || ecma_find_named_property (module_p->namespace_object_p, export_name_p) != NULL)\n  {\n    /* This export name has already been handled. */\n    return result;\n  }\n\n  ecma_module_record_t record;\n  result = ecma_module_resolve_export (module_p, export_name_p, &record);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  if (record.module_p == NULL)\n  {\n    /* 15.2.1.18 / 3.d.iv Skip ambiguous names. */\n    return result;\n  }\n\n  ecma_object_t *ref_base_lex_env_p;\n  ecma_value_t prop_value = ecma_op_get_value_lex_env_base (record.module_p->scope_p,\n                                                            &ref_base_lex_env_p,\n                                                            record.name_p);\n  ecma_property_t *new_property_p;\n  ecma_create_named_data_property (module_p->namespace_object_p,\n                                   export_name_p,\n                                   ECMA_PROPERTY_FIXED,\n                                   &new_property_p);\n\n  ecma_named_data_property_assign_value (module_p->namespace_object_p,\n                                         ECMA_PROPERTY_VALUE_PTR (new_property_p),\n                                         prop_value);\n\n  ecma_free_value (prop_value);\n  return result;\n} /* ecma_module_namespace_object_add_export_if_needed */\n\n/**\n * Creates a namespace object for a module.\n * Note: See 15.2.1.18\n *\n * @return ECMA_VALUE_ERROR - if an error occured\n *         ECMA_VALUE_EMPTY - otherwise\n */\nstatic ecma_value_t\necma_module_create_namespace_object (ecma_module_t *module_p) /**< module */\n{\n  ecma_value_t result = ECMA_VALUE_EMPTY;\n  if (module_p->namespace_object_p != NULL)\n  {\n    return result;\n  }\n\n  JERRY_ASSERT (module_p->state == ECMA_MODULE_STATE_EVALUATED);\n  ecma_module_resolve_set_t *resolve_set_p = NULL;\n  ecma_module_resolve_stack_t *stack_p = NULL;\n\n  module_p->namespace_object_p = ecma_create_object (ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE),\n                                                     0,\n                                                     ECMA_OBJECT_TYPE_GENERAL);\n\n  ecma_module_resolve_stack_push (&stack_p, module_p, ecma_get_magic_string (LIT_MAGIC_STRING_ASTERIX_CHAR));\n  while (stack_p != NULL)\n  {\n    ecma_module_resolve_stack_t *current_frame_p = stack_p;\n    ecma_module_t *current_module_p = current_frame_p->module_p;\n\n    ecma_module_resolve_stack_pop (&stack_p);\n\n    /* 15.2.1.16.2 / 2-3 */\n    if (!ecma_module_resolve_set_insert (&resolve_set_p,\n                                         current_module_p,\n                                         ecma_get_magic_string (LIT_MAGIC_STRING_ASTERIX_CHAR)))\n    {\n      /* Circular import. */\n      continue;\n    }\n\n    result = ecma_module_evaluate (current_module_p);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      break;\n    }\n\n    if (current_module_p->local_exports_p != NULL)\n    {\n      /* 15.2.1.16.2 / 5 */\n      JERRY_ASSERT (current_module_p->local_exports_p->next_p == NULL);\n      ecma_module_names_t *export_names_p = current_module_p->local_exports_p->module_names_p;\n      while (export_names_p != NULL && ecma_is_value_empty (result))\n      {\n        result = ecma_module_namespace_object_add_export_if_needed (module_p,\n                                                                    export_names_p->imex_name_p);\n        export_names_p = export_names_p->next_p;\n      }\n    }\n\n    /* 15.2.1.16.2 / 6 */\n    ecma_module_node_t *indirect_export_p = current_module_p->indirect_exports_p;\n    while (indirect_export_p != NULL && ecma_is_value_empty (result))\n    {\n      ecma_module_names_t *export_names_p = indirect_export_p->module_names_p;\n      while (export_names_p != NULL && ecma_is_value_empty (result))\n      {\n        result = ecma_module_namespace_object_add_export_if_needed (module_p,\n                                                                    export_names_p->imex_name_p);\n        export_names_p = export_names_p->next_p;\n      }\n      indirect_export_p = indirect_export_p->next_p;\n    }\n\n    /* 15.2.1.16.2 / 7 */\n    ecma_module_node_t *star_export_p = current_module_p->star_exports_p;\n    while (star_export_p != NULL && ecma_is_value_empty (result))\n    {\n      JERRY_ASSERT (star_export_p->module_names_p == NULL);\n\n      /* 15.2.1.16.3/10.c */\n      ecma_module_resolve_stack_push (&stack_p,\n                                      star_export_p->module_request_p,\n                                      ecma_get_magic_string (LIT_MAGIC_STRING_ASTERIX_CHAR));\n\n      star_export_p = star_export_p->next_p;\n    }\n  }\n\n  /* Clean up. */\n  ecma_module_resolve_set_cleanup (resolve_set_p);\n  while (stack_p)\n  {\n    ecma_module_resolve_stack_pop (&stack_p);\n  }\n\n  return result;\n} /* ecma_module_create_namespace_object */\n\n/**\n * Connects imported values to the current module scope.\n *\n * @return ECMA_VALUE_ERROR - if an error occured\n *         ECMA_VALUE_EMPTY - otherwise\n */\nstatic ecma_value_t\necma_module_connect_imports (ecma_module_t *module_p)\n{\n  ecma_object_t *local_env_p = module_p->scope_p;\n  JERRY_ASSERT (ecma_is_lexical_environment (local_env_p));\n\n  ecma_module_node_t *import_node_p = module_p->imports_p;\n\n  /* Check that the imported bindings don't exist yet. */\n  while (import_node_p != NULL)\n  {\n    ecma_module_names_t *import_names_p = import_node_p->module_names_p;\n\n    while (import_names_p != NULL)\n    {\n      ecma_object_t *lex_env_p = local_env_p;\n      ecma_property_t *binding_p = NULL;\n\n      if (lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK)\n      {\n        binding_p = ecma_find_named_property (lex_env_p, import_names_p->local_name_p);\n\n        JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n        lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n      }\n\n      if (binding_p != NULL)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Imported binding shadows local variable.\"));\n      }\n\n      ecma_value_t status = ecma_op_has_binding (lex_env_p, import_names_p->local_name_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      if (ECMA_IS_VALUE_ERROR (status))\n      {\n        return status;\n      }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n      if (ecma_is_value_true (status))\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Imported binding shadows local variable.\"));\n      }\n\n      import_names_p = import_names_p->next_p;\n    }\n\n    import_node_p = import_node_p->next_p;\n  }\n\n  import_node_p = module_p->imports_p;\n\n  /* Resolve imports and create local bindings. */\n  while (import_node_p != NULL)\n  {\n    ecma_value_t result = ecma_module_evaluate (import_node_p->module_request_p);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      return result;\n    }\n\n    ecma_module_names_t *import_names_p = import_node_p->module_names_p;\n    while (import_names_p != NULL)\n    {\n      const bool is_namespace_import = ecma_compare_ecma_string_to_magic_id (import_names_p->imex_name_p,\n                                                                             LIT_MAGIC_STRING_ASTERIX_CHAR);\n\n      ecma_value_t prop_value;\n\n      if (is_namespace_import)\n      {\n        result = ecma_module_create_namespace_object (import_node_p->module_request_p);\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          return result;\n        }\n\n        ecma_ref_object (import_node_p->module_request_p->namespace_object_p);\n        prop_value = ecma_make_object_value (import_node_p->module_request_p->namespace_object_p);\n      }\n      else /* !is_namespace_import */\n      {\n        ecma_module_record_t record;\n        result = ecma_module_resolve_export (import_node_p->module_request_p, import_names_p->imex_name_p, &record);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          return result;\n        }\n\n        if (record.module_p == NULL)\n        {\n          return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Ambiguous import request.\"));\n        }\n\n        if (record.module_p->state == ECMA_MODULE_STATE_NATIVE)\n        {\n          ecma_object_t *object_p = record.module_p->namespace_object_p;\n          prop_value = ecma_op_object_find_own (ecma_make_object_value (object_p), object_p, record.name_p);\n          JERRY_ASSERT (ecma_is_value_found (prop_value));\n        }\n        else\n        {\n          result = ecma_module_evaluate (record.module_p);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            return result;\n          }\n\n          ecma_object_t *ref_base_lex_env_p;\n          prop_value = ecma_op_get_value_lex_env_base (record.module_p->scope_p,\n                                                       &ref_base_lex_env_p,\n                                                       record.name_p);\n\n        }\n      }\n\n      ecma_property_t *prop_p = ecma_op_create_mutable_binding (local_env_p,\n                                                                import_names_p->local_name_p,\n                                                                true /* is_deletable */);\n      JERRY_ASSERT (prop_p != ECMA_PROPERTY_POINTER_ERROR);\n\n      if (prop_p != NULL)\n      {\n        JERRY_ASSERT (ecma_is_value_undefined (ECMA_PROPERTY_VALUE_PTR (prop_p)->value));\n        ECMA_PROPERTY_VALUE_PTR (prop_p)->value = prop_value;\n        ecma_deref_if_object (prop_value);\n      }\n      else\n      {\n        ecma_op_set_mutable_binding (local_env_p,\n                                     import_names_p->local_name_p,\n                                     prop_value,\n                                     false /* is_strict */);\n        ecma_free_value (prop_value);\n      }\n\n      import_names_p = import_names_p->next_p;\n    }\n\n    import_node_p = import_node_p->next_p;\n  }\n\n  return ECMA_VALUE_EMPTY;\n} /* ecma_module_connect_imports */\n\n/**\n * Checks if indirect exports in the current context are resolvable.\n * Note: See 15.2.1.16.4 / 9.\n *\n * @return ECMA_VALUE_ERROR - if an error occured\n *         ECMA_VALUE_EMPTY - otherwise\n */\nstatic ecma_value_t\necma_module_check_indirect_exports (ecma_module_t *module_p)\n{\n  ecma_module_node_t *indirect_export_p = module_p->indirect_exports_p;\n  while (indirect_export_p != NULL)\n  {\n    ecma_module_names_t *name_p = indirect_export_p->module_names_p;\n    while (name_p != NULL)\n    {\n      ecma_module_record_t record;\n      ecma_value_t result = ecma_module_resolve_export (indirect_export_p->module_request_p,\n                                                        name_p->local_name_p,\n                                                        &record);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        return result;\n      }\n\n      JERRY_ASSERT (ecma_is_value_empty (result));\n\n      if (record.module_p == NULL)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Ambiguous indirect export request.\"));\n      }\n\n      name_p = name_p->next_p;\n    }\n\n    indirect_export_p = indirect_export_p->next_p;\n  }\n\n  return ECMA_VALUE_EMPTY;\n} /* ecma_module_check_indirect_exports */\n\n/**\n * Initialize the current module by creating the local binding for the imported variables\n * and verifying indirect exports.\n *\n * @return ECMA_VALUE_ERROR - if an error occured\n *         ECMA_VALUE_EMPTY - otherwise\n */\necma_value_t\necma_module_initialize (ecma_module_t *module_p) /**< module */\n{\n  ecma_value_t ret_value = ecma_module_connect_imports (module_p);\n\n  if (ecma_is_value_empty (ret_value))\n  {\n    ret_value = ecma_module_check_indirect_exports (module_p);\n  }\n\n  return ret_value;\n} /* ecma_module_initialize */\n\nstatic ecma_value_t ecma_module_parse (ecma_module_t *module_p);\n\n/**\n * Parses all referenced modules.\n *\n * @return ECMA_VALUE_ERROR - if an error occured\n *         ECMA_VALUE_EMPTY - otherwise\n */\necma_value_t\necma_module_parse_referenced_modules (void)\n{\n  ecma_module_t *current_p = JERRY_CONTEXT (module_list_p);\n  while (current_p != NULL)\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_module_parse (current_p)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    current_p = current_p->next_p;\n  }\n\n  return ECMA_VALUE_EMPTY;\n} /* ecma_module_parse_referenced_modules */\n\n/**\n * Parses an EcmaScript module.\n *\n * @return ECMA_VALUE_ERROR - if an error occured\n *         ECMA_VALUE_EMPTY - otherwise\n */\nstatic ecma_value_t\necma_module_parse (ecma_module_t *module_p) /**< module */\n{\n  if (module_p->state >= ECMA_MODULE_STATE_PARSING)\n  {\n    return ECMA_VALUE_EMPTY;\n  }\n\n  module_p->state = ECMA_MODULE_STATE_PARSING;\n\n  lit_utf8_size_t module_path_size = ecma_string_get_size (module_p->path_p);\n  lit_utf8_byte_t *module_path_p = (lit_utf8_byte_t *) jmem_heap_alloc_block (module_path_size + 1);\n\n  lit_utf8_size_t module_path_utf8_size;\n  module_path_utf8_size = ecma_string_copy_to_utf8_buffer (module_p->path_p,\n                                                           module_path_p,\n                                                           module_path_size);\n  module_path_p[module_path_utf8_size] = LIT_CHAR_NULL;\n\n  size_t source_size = 0;\n  uint8_t *source_p = jerry_port_read_source ((const char *) module_path_p, &source_size);\n  jmem_heap_free_block (module_path_p, module_path_size + 1);\n\n  if (source_p == NULL)\n  {\n    return ecma_raise_syntax_error (ECMA_ERR_MSG (\"File not found.\"));\n  }\n\n  ecma_module_t *prev_module_p = JERRY_CONTEXT (module_current_p);\n  JERRY_CONTEXT (module_current_p) = module_p;\n\n#if ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_string (JERRY_DEBUGGER_SOURCE_CODE_NAME,\n                                JERRY_DEBUGGER_NO_SUBTYPE,\n                                module_path_p,\n                                module_path_size - 1);\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER) */\n\n  ecma_compiled_code_t *bytecode_p = parser_parse_script (NULL,\n                                                          0,\n                                                          (jerry_char_t *) source_p,\n                                                          source_size,\n                                                          ecma_make_string_value (module_p->path_p),\n                                                          ECMA_PARSE_STRICT_MODE | ECMA_PARSE_MODULE);\n\n  JERRY_CONTEXT (module_current_p) = prev_module_p;\n  jerry_port_release_source (source_p);\n\n  if (JERRY_UNLIKELY (bytecode_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  if (ECMA_IS_VALUE_ERROR (ecma_module_parse_referenced_modules ()))\n  {\n    ecma_bytecode_deref (bytecode_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  module_p->compiled_code_p = bytecode_p;\n  module_p->state = ECMA_MODULE_STATE_PARSED;\n\n  return ECMA_VALUE_EMPTY;\n} /* ecma_module_parse */\n\n/**\n * Cleans up a list of module names.\n */\nstatic void\necma_module_release_module_names (ecma_module_names_t *module_name_p) /**< first module name */\n{\n  while (module_name_p != NULL)\n  {\n    ecma_module_names_t *next_p = module_name_p->next_p;\n\n    ecma_deref_ecma_string (module_name_p->imex_name_p);\n    ecma_deref_ecma_string (module_name_p->local_name_p);\n    jmem_heap_free_block (module_name_p, sizeof (ecma_module_names_t));\n\n    module_name_p = next_p;\n  }\n} /* ecma_module_release_module_names */\n\n/**\n * Cleans up a list of module nodes.\n */\nvoid\necma_module_release_module_nodes (ecma_module_node_t *module_node_p) /**< first module node */\n{\n  while (module_node_p != NULL)\n  {\n    ecma_module_node_t *next_p = module_node_p->next_p;\n\n    ecma_module_release_module_names (module_node_p->module_names_p);\n    jmem_heap_free_block (module_node_p, sizeof (ecma_module_node_t));\n\n    module_node_p = next_p;\n  }\n} /* ecma_module_release_module_nodes */\n\n/**\n * Cleans up and releases a module structure including all referenced modules.\n */\nstatic void\necma_module_release_module (ecma_module_t *module_p) /**< module */\n{\n  ecma_module_state_t state = module_p->state;\n\n  ecma_deref_ecma_string (module_p->path_p);\n#ifndef JERRY_NDEBUG\n  module_p->path_p = NULL;\n#endif /* JERRY_NDEBUG */\n\n  if (module_p->namespace_object_p != NULL)\n  {\n    /* The module structure keeps a strong reference to the namespace object, which will require an extra GC call. */\n    JERRY_CONTEXT (ecma_gc_new_objects)++;\n    ecma_deref_object (module_p->namespace_object_p);\n#ifndef JERRY_NDEBUG\n    module_p->namespace_object_p = NULL;\n#endif /* JERRY_NDEBUG */\n  }\n\n  if (state == ECMA_MODULE_STATE_NATIVE)\n  {\n    goto finished;\n  }\n\n  if (state >= ECMA_MODULE_STATE_PARSING)\n  {\n    ecma_module_release_module_nodes (module_p->imports_p);\n    ecma_module_release_module_nodes (module_p->local_exports_p);\n    ecma_module_release_module_nodes (module_p->indirect_exports_p);\n    ecma_module_release_module_nodes (module_p->star_exports_p);\n  }\n\n  if (state == ECMA_MODULE_STATE_ROOT)\n  {\n    goto finished;\n  }\n\n  if (state >= ECMA_MODULE_STATE_EVALUATING)\n  {\n    /* The module structure keeps a strong reference to the module scope, which will require an extra GC call. */\n    JERRY_CONTEXT (ecma_gc_new_objects)++;\n    ecma_deref_object (module_p->scope_p);\n  }\n\n  if (state >= ECMA_MODULE_STATE_PARSED\n      && state < ECMA_MODULE_STATE_EVALUATED)\n  {\n    ecma_bytecode_deref (module_p->compiled_code_p);\n#ifndef JERRY_NDEBUG\n    module_p->compiled_code_p = NULL;\n#endif /* JERRY_NDEBUG */\n  }\n\nfinished:\n  jmem_heap_free_block (module_p, sizeof (ecma_module_t));\n} /* ecma_module_release_module */\n\n/**\n * Cleans up and releases a module list.\n */\nvoid\necma_module_cleanup (ecma_module_t *head_p) /**< module */\n{\n  while (head_p != NULL)\n  {\n    ecma_module_t *next_p = head_p->next_p;\n    ecma_module_release_module (head_p);\n    head_p = next_p;\n  }\n} /* ecma_module_cleanup */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-module.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_MODULE_H\n#define ECMA_MODULE_H\n\n#include \"common.h\"\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n\n#define ECMA_MODULE_MAX_PATH 255u\n\n/**\n * Imported or exported names, such as \"a as b\"\n * Note: See https://www.ecma-international.org/ecma-262/6.0/#table-39\n *       and https://www.ecma-international.org/ecma-262/6.0/#table-41\n */\ntypedef struct ecma_module_names\n{\n  struct ecma_module_names *next_p; /**< next linked list node */\n  ecma_string_t *imex_name_p;       /**< Import/export name of the item */\n  ecma_string_t *local_name_p;      /**< Local name of the item */\n} ecma_module_names_t;\n\n/**\n * An enum identifing the current state of the module\n */\ntypedef enum\n{\n  ECMA_MODULE_STATE_INIT = 0,       /**< module is initialized */\n  ECMA_MODULE_STATE_PARSING = 1,    /**< module is currently being parsed */\n  ECMA_MODULE_STATE_PARSED = 2,     /**< module has been parsed */\n  ECMA_MODULE_STATE_EVALUATING = 3, /**< module is currently being evaluated */\n  ECMA_MODULE_STATE_EVALUATED = 4,  /**< module has been evaluated */\n  ECMA_MODULE_STATE_NATIVE = 5,     /**< module is native */\n  ECMA_MODULE_STATE_ROOT = 6,       /**< module is a root module */\n} ecma_module_state_t;\n\n/**\n * Module structure storing an instance of a module\n */\ntypedef struct ecma_module\n{\n  /* TODO(dbatyai): These could be compressed pointers */\n  struct ecma_module *next_p;                      /**< next module in the list */\n  struct ecma_module_node *imports_p;              /**< import requests of the module */\n  struct ecma_module_node *local_exports_p;        /**< local exports of the module */\n  struct ecma_module_node *indirect_exports_p;     /**< indirect exports of the module */\n  struct ecma_module_node *star_exports_p;         /**< star exports of the module*/\n  ecma_string_t *path_p;                           /**< path of the module */\n  ecma_compiled_code_t *compiled_code_p;           /**< compiled code for the module */\n  ecma_object_t *scope_p;                          /**< lexical lenvironment of the module */\n  ecma_object_t *namespace_object_p;               /**< namespace object of the module */\n  ecma_module_state_t state;                       /**< evaluation state of the module */\n} ecma_module_t;\n\n/**\n * Module node to store imports / exports.\n */\ntypedef struct ecma_module_node\n{\n  struct ecma_module_node *next_p;     /**< next linked list node */\n  ecma_module_names_t *module_names_p; /**< names of the requested import/export node */\n  ecma_module_t *module_request_p;     /**< module structure of the requested module */\n} ecma_module_node_t;\n\n/**\n *  A record that can be used to store {module, identifier} pairs\n */\ntypedef struct ecma_module_record\n{\n  ecma_module_t *module_p;  /**< module */\n  ecma_string_t *name_p;    /**< identifier name */\n} ecma_module_record_t;\n\n/**\n *  A list of module records that can be used to identify circular imports during resolution\n */\ntypedef struct ecma_module_resolve_set\n{\n  struct ecma_module_resolve_set *next_p; /**< next in linked list */\n  ecma_module_record_t record;            /**< module record */\n} ecma_module_resolve_set_t;\n\n/**\n * A list that is used like a stack to drive the resolution process, instead of recursion.\n */\ntypedef struct ecma_module_resolve_stack\n{\n  struct ecma_module_resolve_stack *next_p; /**< next in linked list */\n  ecma_module_t *module_p;                  /**< module request */\n  ecma_string_t *export_name_p;             /**< export identifier name */\n  bool resolving;                           /**< flag storing wether the current frame started resolving */\n} ecma_module_resolve_stack_t;\n\nbool ecma_module_resolve_set_insert (ecma_module_resolve_set_t **set_p,\n                                     ecma_module_t *const module_p,\n                                     ecma_string_t *const export_name_p);\nvoid ecma_module_resolve_set_cleanup (ecma_module_resolve_set_t *set_p);\n\nvoid ecma_module_resolve_stack_push (ecma_module_resolve_stack_t **stack_p,\n                                     ecma_module_t *const module_p,\n                                     ecma_string_t *const export_name_p);\nvoid ecma_module_resolve_stack_pop (ecma_module_resolve_stack_t **stack_p);\n\necma_string_t *ecma_module_create_normalized_path (const lit_utf8_byte_t *char_p,\n                                                   lit_utf8_size_t size,\n                                                   ecma_string_t *const base_path_p);\n\necma_module_t *ecma_module_find_module (ecma_string_t *const path_p);\necma_module_t *ecma_module_find_native_module (ecma_string_t *const path_p);\n\necma_value_t ecma_module_parse_referenced_modules (void);\necma_value_t ecma_module_initialize (ecma_module_t *module_p);\n\nvoid ecma_module_initialize_context (ecma_string_t *root_path_p);\nvoid ecma_module_cleanup_context (void);\n\nvoid ecma_module_release_module_nodes (ecma_module_node_t *module_node_p);\nvoid ecma_module_cleanup (ecma_module_t *head_p);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n#endif /* !ECMA_MODULE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-property-hashmap.h\"\n#include \"jrt-libc-includes.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmapropertyhashmap Property hashmap\n * @{\n */\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n\n/**\n * Compute the total size of the property hashmap.\n */\n#define ECMA_PROPERTY_HASHMAP_GET_TOTAL_SIZE(max_property_count) \\\n  (sizeof (ecma_property_hashmap_t) + (max_property_count * sizeof (jmem_cpointer_t)) + (max_property_count >> 3))\n\n/**\n * Number of items in the stepping table.\n */\n#define ECMA_PROPERTY_HASHMAP_NUMBER_OF_STEPS 8\n\n/**\n * Stepping values for searching items in the hashmap.\n */\nstatic const uint8_t ecma_property_hashmap_steps[ECMA_PROPERTY_HASHMAP_NUMBER_OF_STEPS] JERRY_ATTR_CONST_DATA =\n{\n  3, 5, 7, 11, 13, 17, 19, 23\n};\n\n/**\n * Get the value of a bit in a bitmap.\n */\n#define ECMA_PROPERTY_HASHMAP_GET_BIT(byte_p, index) \\\n  ((byte_p)[(index) >> 3] & (1 << ((index) & 0x7)))\n\n/**\n * Clear the value of a bit in a bitmap.\n */\n#define ECMA_PROPERTY_HASHMAP_CLEAR_BIT(byte_p, index) \\\n  ((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] & ~(1 << ((index) & 0x7))))\n\n/**\n * Set the value of a bit in a bitmap.\n */\n#define ECMA_PROPERTY_HASHMAP_SET_BIT(byte_p, index) \\\n  ((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] | (1 << ((index) & 0x7))))\n\n/**\n * Create a new property hashmap for the object.\n * The object must not have a property hashmap.\n */\nvoid\necma_property_hashmap_create (ecma_object_t *object_p) /**< object */\n{\n  if (JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) != ECMA_PROP_HASHMAP_ALLOC_ON)\n  {\n    return;\n  }\n\n  jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp;\n\n  if (prop_iter_cp == JMEM_CP_NULL)\n  {\n    return;\n  }\n\n  uint32_t named_property_count = 0;\n\n  while (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      if (prop_iter_p->types[i] != ECMA_PROPERTY_TYPE_DELETED)\n      {\n        JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (prop_iter_p->types[i]));\n        named_property_count++;\n      }\n    }\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n\n  if (named_property_count < (ECMA_PROPERTY_HASMAP_MINIMUM_SIZE / 2))\n  {\n    return;\n  }\n\n  /* The max_property_count must be power of 2. */\n  uint32_t max_property_count = ECMA_PROPERTY_HASMAP_MINIMUM_SIZE;\n\n  /* At least 1/3 items must be NULL. */\n  while (max_property_count < (named_property_count + (named_property_count >> 1)))\n  {\n    max_property_count <<= 1;\n  }\n\n  size_t total_size = ECMA_PROPERTY_HASHMAP_GET_TOTAL_SIZE (max_property_count);\n\n  ecma_property_hashmap_t *hashmap_p = (ecma_property_hashmap_t *) jmem_heap_alloc_block_null_on_error (total_size);\n\n  if (hashmap_p == NULL)\n  {\n    return;\n  }\n\n  memset (hashmap_p, 0, total_size);\n\n  hashmap_p->header.types[0] = ECMA_PROPERTY_TYPE_HASHMAP;\n  hashmap_p->header.next_property_cp = object_p->u1.property_list_cp;\n  hashmap_p->max_property_count = max_property_count;\n  hashmap_p->null_count = max_property_count - named_property_count;\n  hashmap_p->unused_count = max_property_count - named_property_count;\n\n  jmem_cpointer_t *pair_list_p = (jmem_cpointer_t *) (hashmap_p + 1);\n  uint8_t *bits_p = (uint8_t *) (pair_list_p + max_property_count);\n  uint32_t mask = max_property_count - 1;\n\n  prop_iter_cp = object_p->u1.property_list_cp;\n  ECMA_SET_NON_NULL_POINTER (object_p->u1.property_list_cp, hashmap_p);\n\n  while (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      if (prop_iter_p->types[i] == ECMA_PROPERTY_TYPE_DELETED)\n      {\n        continue;\n      }\n\n      JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (prop_iter_p->types[i]));\n\n      ecma_property_pair_t *property_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n      uint32_t entry_index = ecma_string_get_property_name_hash (prop_iter_p->types[i],\n                                                                 property_pair_p->names_cp[i]);\n      uint32_t step = ecma_property_hashmap_steps[entry_index & (ECMA_PROPERTY_HASHMAP_NUMBER_OF_STEPS - 1)];\n\n      entry_index &= mask;\n#ifndef JERRY_NDEBUG\n      /* Because max_property_count (power of 2) and step (a prime\n       * number) are relative primes, all entries of the hasmap are\n       * visited exactly once before the start entry index is reached\n       * again. Furthermore because at least one NULL is present in\n       * the hashmap, the while loop must be terminated before the\n       * the starting index is reached again. */\n      uint32_t start_entry_index = entry_index;\n#endif /* !JERRY_NDEBUG */\n\n      while (pair_list_p[entry_index] != ECMA_NULL_POINTER)\n      {\n        entry_index = (entry_index + step) & mask;\n\n#ifndef JERRY_NDEBUG\n        JERRY_ASSERT (entry_index != start_entry_index);\n#endif /* !JERRY_NDEBUG */\n      }\n\n      ECMA_SET_NON_NULL_POINTER (pair_list_p[entry_index], property_pair_p);\n\n      if (i != 0)\n      {\n        ECMA_PROPERTY_HASHMAP_SET_BIT (bits_p, entry_index);\n      }\n    }\n\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n} /* ecma_property_hashmap_create */\n\n/**\n * Free the hashmap of the object.\n * The object must have a property hashmap.\n */\nvoid\necma_property_hashmap_free (ecma_object_t *object_p) /**< object */\n{\n  /* Property hash must be exists and must be the first property. */\n  JERRY_ASSERT (object_p->u1.property_list_cp != JMEM_CP_NULL);\n\n  ecma_property_header_t *property_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,\n                                                                  object_p->u1.property_list_cp);\n\n  JERRY_ASSERT (property_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP);\n\n  ecma_property_hashmap_t *hashmap_p = (ecma_property_hashmap_t *) property_p;\n\n  object_p->u1.property_list_cp = property_p->next_property_cp;\n\n  jmem_heap_free_block (hashmap_p,\n                        ECMA_PROPERTY_HASHMAP_GET_TOTAL_SIZE (hashmap_p->max_property_count));\n} /* ecma_property_hashmap_free */\n\n/**\n * Insert named property into the hashmap.\n */\nvoid\necma_property_hashmap_insert (ecma_object_t *object_p, /**< object */\n                              ecma_string_t *name_p, /**< name of the property */\n                              ecma_property_pair_t *property_pair_p, /**< property pair */\n                              int property_index) /**< property index in the pair (0 or 1) */\n{\n  JERRY_ASSERT (property_pair_p != NULL);\n\n  ecma_property_hashmap_t *hashmap_p = ECMA_GET_NON_NULL_POINTER (ecma_property_hashmap_t,\n                                                                  object_p->u1.property_list_cp);\n\n  JERRY_ASSERT (hashmap_p->header.types[0] == ECMA_PROPERTY_TYPE_HASHMAP);\n\n  /* The NULLs are reduced below 1/8 of the hashmap. */\n  if (hashmap_p->null_count < (hashmap_p->max_property_count >> 3))\n  {\n    ecma_property_hashmap_free (object_p);\n    ecma_property_hashmap_create (object_p);\n    return;\n  }\n\n  JERRY_ASSERT (property_index < ECMA_PROPERTY_PAIR_ITEM_COUNT);\n\n  uint32_t entry_index = ecma_string_hash (name_p);\n  uint32_t step = ecma_property_hashmap_steps[entry_index & (ECMA_PROPERTY_HASHMAP_NUMBER_OF_STEPS - 1)];\n  uint32_t mask = hashmap_p->max_property_count - 1;\n  entry_index &= mask;\n\n#ifndef JERRY_NDEBUG\n  /* See the comment for this variable in ecma_property_hashmap_create. */\n  uint32_t start_entry_index = entry_index;\n#endif /* !JERRY_NDEBUG */\n\n  jmem_cpointer_t *pair_list_p = (jmem_cpointer_t *) (hashmap_p + 1);\n\n  while (pair_list_p[entry_index] != ECMA_NULL_POINTER)\n  {\n    entry_index = (entry_index + step) & mask;\n\n#ifndef JERRY_NDEBUG\n    JERRY_ASSERT (entry_index != start_entry_index);\n#endif /* !JERRY_NDEBUG */\n  }\n\n  ECMA_SET_NON_NULL_POINTER (pair_list_p[entry_index], property_pair_p);\n\n  uint8_t *bits_p = (uint8_t *) (pair_list_p + hashmap_p->max_property_count);\n  bits_p += (entry_index >> 3);\n  mask = (uint32_t) (1 << (entry_index & 0x7));\n\n  if (!(*bits_p & mask))\n  {\n    /* Deleted entries also has ECMA_NULL_POINTER\n     * value, but they are not NULL values. */\n    hashmap_p->null_count--;\n    JERRY_ASSERT (hashmap_p->null_count > 0);\n  }\n\n  hashmap_p->unused_count--;\n  JERRY_ASSERT (hashmap_p->unused_count > 0);\n\n  if (property_index == 0)\n  {\n    *bits_p = (uint8_t) ((*bits_p) & ~mask);\n  }\n  else\n  {\n    *bits_p = (uint8_t) ((*bits_p) | mask);\n  }\n} /* ecma_property_hashmap_insert */\n\n/**\n * Delete named property from the hashmap.\n *\n * @return ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP if hashmap should be recreated\n *         ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP otherwise\n */\necma_property_hashmap_delete_status\necma_property_hashmap_delete (ecma_object_t *object_p, /**< object */\n                              jmem_cpointer_t name_cp, /**< property name */\n                              ecma_property_t *property_p) /**< property */\n{\n  ecma_property_hashmap_t *hashmap_p = ECMA_GET_NON_NULL_POINTER (ecma_property_hashmap_t,\n                                                                  object_p->u1.property_list_cp);\n\n  JERRY_ASSERT (hashmap_p->header.types[0] == ECMA_PROPERTY_TYPE_HASHMAP);\n\n  hashmap_p->unused_count++;\n\n  /* The NULLs are above 3/4 of the hashmap. */\n  if (hashmap_p->unused_count > ((hashmap_p->max_property_count * 3) >> 2))\n  {\n    return ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP;\n  }\n\n  uint32_t entry_index = ecma_string_get_property_name_hash (*property_p, name_cp);\n  uint32_t step = ecma_property_hashmap_steps[entry_index & (ECMA_PROPERTY_HASHMAP_NUMBER_OF_STEPS - 1)];\n  uint32_t mask = hashmap_p->max_property_count - 1;\n  jmem_cpointer_t *pair_list_p = (jmem_cpointer_t *) (hashmap_p + 1);\n  uint8_t *bits_p = (uint8_t *) (pair_list_p + hashmap_p->max_property_count);\n\n  entry_index &= mask;\n\n#ifndef JERRY_NDEBUG\n  /* See the comment for this variable in ecma_property_hashmap_create. */\n  uint32_t start_entry_index = entry_index;\n#endif /* !JERRY_NDEBUG */\n\n  while (true)\n  {\n    if (pair_list_p[entry_index] != ECMA_NULL_POINTER)\n    {\n      size_t offset = 0;\n\n      if (ECMA_PROPERTY_HASHMAP_GET_BIT (bits_p, entry_index))\n      {\n        offset = 1;\n      }\n\n      ecma_property_pair_t *property_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_property_pair_t,\n                                                                         pair_list_p[entry_index]);\n\n      if ((property_pair_p->header.types + offset) == property_p)\n      {\n        JERRY_ASSERT (property_pair_p->names_cp[offset] == name_cp);\n\n        pair_list_p[entry_index] = ECMA_NULL_POINTER;\n        ECMA_PROPERTY_HASHMAP_SET_BIT (bits_p, entry_index);\n        return ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP;\n      }\n    }\n    else\n    {\n      /* Must be a deleted entry. */\n      JERRY_ASSERT (ECMA_PROPERTY_HASHMAP_GET_BIT (bits_p, entry_index));\n    }\n\n    entry_index = (entry_index + step) & mask;\n\n#ifndef JERRY_NDEBUG\n    JERRY_ASSERT (entry_index != start_entry_index);\n#endif /* !JERRY_NDEBUG */\n  }\n} /* ecma_property_hashmap_delete */\n\n/**\n * Find a named property.\n *\n * @return pointer to the property if found or NULL otherwise\n */\necma_property_t *\necma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, /**< hashmap */\n                            ecma_string_t *name_p, /**< property name */\n                            jmem_cpointer_t *property_real_name_cp) /**< [out] property real name */\n{\n#ifndef JERRY_NDEBUG\n  /* A sanity check in debug mode: a named property must be present\n   * in both the property hashmap and in the property chain, or missing\n   * from both data collection. The following code checks the property\n   * chain, and sets the property_found variable. */\n  bool property_found = false;\n\n  jmem_cpointer_t prop_iter_cp = hashmap_p->header.next_property_cp;\n\n  while (prop_iter_cp != JMEM_CP_NULL && !property_found)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      if (ECMA_PROPERTY_IS_NAMED_PROPERTY (prop_iter_p->types[i]))\n      {\n        if (ecma_string_compare_to_property_name (prop_iter_p->types[i],\n                                                  prop_pair_p->names_cp[i],\n                                                  name_p))\n        {\n          /* Property is found */\n          property_found = true;\n          break;\n        }\n      }\n    }\n\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n#endif /* !JERRY_NDEBUG */\n\n  uint32_t entry_index = ecma_string_hash (name_p);\n  uint32_t step = ecma_property_hashmap_steps[entry_index & (ECMA_PROPERTY_HASHMAP_NUMBER_OF_STEPS - 1)];\n  uint32_t mask = hashmap_p->max_property_count - 1;\n  jmem_cpointer_t *pair_list_p = (jmem_cpointer_t *) (hashmap_p + 1);\n  uint8_t *bits_p = (uint8_t *) (pair_list_p + hashmap_p->max_property_count);\n  entry_index &= mask;\n\n#ifndef JERRY_NDEBUG\n  /* See the comment for this variable in ecma_property_hashmap_create. */\n  uint32_t start_entry_index = entry_index;\n#endif /* !JERRY_NDEBUG */\n\n  if (ECMA_IS_DIRECT_STRING (name_p))\n  {\n    ecma_property_t prop_name_type = (ecma_property_t) ECMA_GET_DIRECT_STRING_TYPE (name_p);\n    jmem_cpointer_t property_name_cp = (jmem_cpointer_t) ECMA_GET_DIRECT_STRING_VALUE (name_p);\n\n    JERRY_ASSERT (prop_name_type > 0);\n\n    while (true)\n    {\n      if (pair_list_p[entry_index] != ECMA_NULL_POINTER)\n      {\n        size_t offset = 0;\n        if (ECMA_PROPERTY_HASHMAP_GET_BIT (bits_p, entry_index))\n        {\n          offset = 1;\n        }\n\n        ecma_property_pair_t *property_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_property_pair_t,\n                                                                           pair_list_p[entry_index]);\n\n        ecma_property_t *property_p = property_pair_p->header.types + offset;\n\n        JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (*property_p));\n\n        if (property_pair_p->names_cp[offset] == property_name_cp\n            && ECMA_PROPERTY_GET_NAME_TYPE (*property_p) == prop_name_type)\n        {\n#ifndef JERRY_NDEBUG\n          JERRY_ASSERT (property_found);\n#endif /* !JERRY_NDEBUG */\n\n          *property_real_name_cp = property_name_cp;\n          return property_p;\n        }\n      }\n      else\n      {\n        if (!ECMA_PROPERTY_HASHMAP_GET_BIT (bits_p, entry_index))\n        {\n#ifndef JERRY_NDEBUG\n          JERRY_ASSERT (!property_found);\n#endif /* !JERRY_NDEBUG */\n\n          return NULL;\n        }\n        /* Otherwise it is a deleted entry. */\n      }\n\n      entry_index = (entry_index + step) & mask;\n\n#ifndef JERRY_NDEBUG\n      JERRY_ASSERT (entry_index != start_entry_index);\n#endif /* !JERRY_NDEBUG */\n    }\n  }\n\n  while (true)\n  {\n    if (pair_list_p[entry_index] != ECMA_NULL_POINTER)\n    {\n      size_t offset = 0;\n      if (ECMA_PROPERTY_HASHMAP_GET_BIT (bits_p, entry_index))\n      {\n        offset = 1;\n      }\n\n      ecma_property_pair_t *property_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_property_pair_t,\n                                                                         pair_list_p[entry_index]);\n\n      ecma_property_t *property_p = property_pair_p->header.types + offset;\n\n      JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (*property_p));\n\n      if (ECMA_PROPERTY_GET_NAME_TYPE (*property_p) == ECMA_DIRECT_STRING_PTR)\n      {\n        ecma_string_t *prop_name_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, property_pair_p->names_cp[offset]);\n\n        if (ecma_compare_ecma_non_direct_strings (prop_name_p, name_p))\n        {\n#ifndef JERRY_NDEBUG\n          JERRY_ASSERT (property_found);\n#endif /* !JERRY_NDEBUG */\n\n          *property_real_name_cp = property_pair_p->names_cp[offset];\n          return property_p;\n        }\n      }\n    }\n    else\n    {\n      if (!ECMA_PROPERTY_HASHMAP_GET_BIT (bits_p, entry_index))\n      {\n#ifndef JERRY_NDEBUG\n        JERRY_ASSERT (!property_found);\n#endif /* !JERRY_NDEBUG */\n\n        return NULL;\n      }\n      /* Otherwise it is a deleted entry. */\n    }\n\n    entry_index = (entry_index + step) & mask;\n\n#ifndef JERRY_NDEBUG\n    JERRY_ASSERT (entry_index != start_entry_index);\n#endif /* !JERRY_NDEBUG */\n  }\n} /* ecma_property_hashmap_find */\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/base/ecma-property-hashmap.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_PROPERTY_HASHMAP_H\n#define ECMA_PROPERTY_HASHMAP_H\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmapropertyhashmap Property hashmap\n * @{\n */\n\n/**\n * Recommended minimum number of items in a property cache.\n */\n#define ECMA_PROPERTY_HASMAP_MINIMUM_SIZE 32\n\n/**\n * Property hash.\n */\ntypedef struct\n{\n  ecma_property_header_t header; /**< header of the property */\n  uint32_t max_property_count; /**< maximum property count (power of 2) */\n  uint32_t null_count; /**< number of NULLs in the map */\n  uint32_t unused_count; /**< number of unused entires in the map */\n\n  /*\n   * The hash is followed by max_property_count ecma_cpointer_t\n   * compressed pointers and (max_property_count + 7) / 8 bytes\n   * which stores a flag for each compressed pointer.\n   *\n   * If the compressed pointer is equal to ECMA_NULL_POINTER\n   *   - flag is cleared if the entry is NULL\n   *   - flag is set if the entry is deleted\n   *\n   * If the compressed pointer is not equal to ECMA_NULL_POINTER\n   *   - flag is cleared if the first entry of a property pair is referenced\n   *   - flag is set if the second entry of a property pair is referenced\n   */\n} ecma_property_hashmap_t;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n\n/**\n * Simple ecma values\n */\ntypedef enum\n{\n  ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP, /**< object has no hashmap */\n  ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP, /**< object has hashmap */\n  ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP, /**< hashmap should be recreated */\n} ecma_property_hashmap_delete_status;\n\nvoid ecma_property_hashmap_create (ecma_object_t *object_p);\nvoid ecma_property_hashmap_free (ecma_object_t *object_p);\nvoid ecma_property_hashmap_insert (ecma_object_t *object_p, ecma_string_t *name_p,\n                                   ecma_property_pair_t *property_pair_p, int property_index);\necma_property_hashmap_delete_status ecma_property_hashmap_delete (ecma_object_t *object_p, jmem_cpointer_t name_cp,\n                                                                  ecma_property_t *property_p);\n\necma_property_t *ecma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, ecma_string_t *name_p,\n                                             jmem_cpointer_t *property_real_name_cp);\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_PROPERTY_HASHMAP_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"ecma-arraybuffer-object.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-array-iterator-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID array_iterator_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup %arrayiteratorprototype% ECMA %ArrayIteratorPrototype% object built-in\n * @{\n */\n\n/**\n * The %ArrayIteratorPrototype% object's 'next' routine\n *\n * See also:\n *          ECMA-262 v6, 22.1.5.2.1\n *\n * Note:\n *     Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object, if success\n *         error - otherwise\n */\nstatic ecma_value_t\necma_builtin_array_iterator_prototype_object_next (ecma_value_t this_val) /**< this argument */\n{\n  /* 1 - 2. */\n  if (!ecma_is_value_object (this_val))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an object.\"));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_val);\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n  /* 3. */\n  if (ecma_get_object_type (obj_p) != ECMA_OBJECT_TYPE_PSEUDO_ARRAY\n      || ext_obj_p->u.pseudo_array.type != ECMA_PSEUDO_ARRAY_ITERATOR)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an iterator.\"));\n  }\n\n  ecma_value_t iterated_value = ext_obj_p->u.pseudo_array.u2.iterated_value;\n\n  /* 4 - 5 */\n  if (ecma_is_value_empty (iterated_value))\n  {\n    return ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n  }\n\n  ecma_object_t *array_object_p = ecma_get_object_from_value (iterated_value);\n\n  /* 8. */\n  ecma_length_t length;\n  if (ecma_object_is_typedarray (array_object_p))\n  {\n    /* a. */\n    ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (array_object_p);\n    if (ecma_arraybuffer_is_detached (arraybuffer_p))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n    }\n\n    /* b. */\n    length = ecma_typedarray_get_length (array_object_p);\n  }\n  else\n  {\n    ecma_value_t len_value = ecma_op_object_get_length (array_object_p, &length);\n\n    if (ECMA_IS_VALUE_ERROR (len_value))\n    {\n      return len_value;\n    }\n  }\n\n  ecma_length_t index = ext_obj_p->u.pseudo_array.u1.iterator_index;\n\n  if (JERRY_UNLIKELY (index == ECMA_ITERATOR_INDEX_LIMIT))\n  {\n    /* After the ECMA_ITERATOR_INDEX_LIMIT limit is reached the [[%Iterator%NextIndex]]\n       property is stored as an internal property */\n    ecma_string_t *prop_name_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_STRING_ITERATOR_NEXT_INDEX);\n    ecma_value_t index_value = ecma_op_object_get (obj_p, prop_name_p);\n\n    if (!ecma_is_value_undefined (index_value))\n    {\n      index = (ecma_length_t) (ecma_get_number_from_value (index_value) + 1);\n    }\n\n    ecma_value_t put_result = ecma_op_object_put (obj_p,\n                                                  prop_name_p,\n                                                  ecma_make_length_value (index),\n                                                  true);\n\n    JERRY_ASSERT (ecma_is_value_true (put_result));\n\n    ecma_free_value (index_value);\n  }\n  else\n  {\n    /* 11. */\n    ext_obj_p->u.pseudo_array.u1.iterator_index++;\n  }\n\n  if (index >= length)\n  {\n    ext_obj_p->u.pseudo_array.u2.iterated_value = ECMA_VALUE_EMPTY;\n    return ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n  }\n\n  /* 7. */\n  uint8_t iterator_kind = ext_obj_p->u.pseudo_array.extra_info;\n\n  if (iterator_kind == ECMA_ITERATOR_KEYS)\n  {\n    /* 12. */\n    return ecma_create_iter_result_object (ecma_make_length_value (index), ECMA_VALUE_FALSE);\n  }\n\n  /* 14. */\n  ecma_value_t get_value = ecma_op_object_get_by_index (array_object_p, index);\n\n  /* 15. */\n  if (ECMA_IS_VALUE_ERROR (get_value))\n  {\n    return get_value;\n  }\n\n  ecma_value_t result;\n\n  /* 16. */\n  if (iterator_kind == ECMA_ITERATOR_VALUES)\n  {\n    result = ecma_create_iter_result_object (get_value, ECMA_VALUE_FALSE);\n  }\n  else\n  {\n    /* 17.a */\n    JERRY_ASSERT (iterator_kind == ECMA_ITERATOR_ENTRIES);\n\n    /* 17.b */\n    ecma_value_t entry_array_value;\n    entry_array_value = ecma_create_array_from_iter_element (get_value,\n                                                             ecma_make_length_value (index));\n\n    result = ecma_create_iter_result_object (entry_array_value, ECMA_VALUE_FALSE);\n    ecma_free_value (entry_array_value);\n  }\n\n  ecma_free_value (get_value);\n\n  return result;\n} /* ecma_builtin_array_iterator_prototype_object_next */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %ArrayIteratorPrototype% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_ARRAY_ITERATOR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_array_iterator_prototype_object_next, 0, 0)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype-unscopables.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-array-prototype-unscopables.inc.h\"\n#define BUILTIN_UNDERSCORED_ID array_prototype_unscopables\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype-unscopables.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Array.prototype[@@unscopables] built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_COPY_WITHIN,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_ENTRIES,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_FILL,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_FIND,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_FIND_INDEX,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_FLAT,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_FLATMAP,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_INCLUDES,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_KEYS,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\nSIMPLE_VALUE (LIT_MAGIC_STRING_VALUES,\n              ECMA_VALUE_TRUE,\n              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-comparison.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"lit-char-helpers.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_ARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_ARRAY_PROTOTYPE_ROUTINE_START = 0,\n  /* Note: these 2 routine ids must be in this order */\n#if !ENABLED (JERRY_ESNEXT)\n  ECMA_ARRAY_PROTOTYPE_TO_STRING,\n#endif /* !ENABLED (JERRY_ESNEXT) */\n  ECMA_ARRAY_PROTOTYPE_SORT,\n  ECMA_ARRAY_PROTOTYPE_CONCAT,\n  ECMA_ARRAY_PROTOTYPE_TO_LOCALE_STRING,\n  ECMA_ARRAY_PROTOTYPE_JOIN,\n  ECMA_ARRAY_PROTOTYPE_POP,\n  ECMA_ARRAY_PROTOTYPE_PUSH,\n  ECMA_ARRAY_PROTOTYPE_REVERSE,\n  ECMA_ARRAY_PROTOTYPE_SHIFT,\n  ECMA_ARRAY_PROTOTYPE_SLICE,\n  ECMA_ARRAY_PROTOTYPE_SPLICE,\n  ECMA_ARRAY_PROTOTYPE_UNSHIFT,\n  ECMA_ARRAY_PROTOTYPE_INDEX_OF,\n  ECMA_ARRAY_PROTOTYPE_LAST_INDEX_OF,\n  /* Note these 3 routines must be in this order */\n  ECMA_ARRAY_PROTOTYPE_EVERY,\n  ECMA_ARRAY_PROTOTYPE_SOME,\n  ECMA_ARRAY_PROTOTYPE_FOR_EACH,\n  ECMA_ARRAY_PROTOTYPE_MAP,\n  ECMA_ARRAY_PROTOTYPE_FILTER,\n  /* Note these 2 routines must be in this order */\n  ECMA_ARRAY_PROTOTYPE_REDUCE,\n  ECMA_ARRAY_PROTOTYPE_REDUCE_RIGHT,\n  ECMA_ARRAY_PROTOTYPE_FIND,\n  ECMA_ARRAY_PROTOTYPE_FIND_INDEX,\n  ECMA_ARRAY_PROTOTYPE_ENTRIES,\n  ECMA_ARRAY_PROTOTYPE_KEYS,\n  ECMA_ARRAY_PROTOTYPE_SYMBOL_ITERATOR,\n  ECMA_ARRAY_PROTOTYPE_FILL,\n  ECMA_ARRAY_PROTOTYPE_COPY_WITHIN,\n  ECMA_ARRAY_PROTOTYPE_INCLUDES,\n  ECMA_ARRAY_PROTOTYPE_FLAT,\n  ECMA_ARRAY_PROTOTYPE_FLATMAP,\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup arrayprototype ECMA Array.prototype object built-in\n * @{\n */\n\n/**\n * Helper function to set an object's length property\n *\n * @return ecma value (return value of the [[Put]] method)\n *         Calling ecma_free_value on the returned value is optional if it is not abrupt completion.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_helper_set_length (ecma_object_t *object, /**< object*/\n                                                ecma_number_t length) /**< new length */\n{\n  ecma_value_t length_value = ecma_make_number_value (length);\n  ecma_value_t ret_value = ecma_op_object_put (object,\n                                               ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),\n                                               length_value,\n                                               true);\n\n  ecma_free_value (length_value);\n\n  JERRY_ASSERT (ecma_is_value_boolean (ret_value)\n                || ecma_is_value_empty (ret_value)\n                || ECMA_IS_VALUE_ERROR (ret_value));\n  return ret_value;\n} /* ecma_builtin_array_prototype_helper_set_length */\n\n/**\n * The Array.prototype object's 'toLocaleString' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_to_locale_string (ecma_object_t *obj_p, /**< object */\n                                                      ecma_length_t length) /**< object's length */\n{\n  /* 5. */\n  if (length == 0)\n  {\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  /* 7-8. */\n  ecma_string_t *first_string_p = ecma_builtin_helper_get_to_locale_string_at_index (obj_p, 0);\n\n  if (JERRY_UNLIKELY (first_string_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (first_string_p);\n  ecma_deref_ecma_string (first_string_p);\n\n  /* 9-10. */\n  for (ecma_length_t k = 1; k < length; k++)\n  {\n    /* 4. Implementation-defined: set the separator to a single comma character. */\n    ecma_stringbuilder_append_byte (&builder, LIT_CHAR_COMMA);\n\n    ecma_string_t *next_string_p = ecma_builtin_helper_get_to_locale_string_at_index (obj_p, k);\n\n    if (JERRY_UNLIKELY (next_string_p == NULL))\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_stringbuilder_append (&builder, next_string_p);\n    ecma_deref_ecma_string (next_string_p);\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_array_prototype_object_to_locale_string */\n\n/**\n * The Array.prototype object's 'concat' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_concat (const ecma_value_t args[], /**< arguments list */\n                                            uint32_t args_number, /**< number of arguments */\n                                            ecma_object_t *obj_p) /**< array object */\n{\n  /* 2. */\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, 0);\n\n  if (JERRY_UNLIKELY (new_array_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *new_array_p = ecma_op_new_array_object (0);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_length_t new_length = 0;\n\n  /* 5.b - 5.c for this_arg */\n  ecma_value_t concat_this_value = ecma_builtin_helper_array_concat_value (new_array_p,\n                                                                           &new_length,\n                                                                           ecma_make_object_value (obj_p));\n  if (ECMA_IS_VALUE_ERROR (concat_this_value))\n  {\n    ecma_deref_object (new_array_p);\n    return concat_this_value;\n  }\n\n  JERRY_ASSERT (ecma_is_value_empty (concat_this_value));\n\n  /* 5. */\n  for (uint32_t arg_index = 0; arg_index < args_number; arg_index++)\n  {\n    ecma_value_t concat_value = ecma_builtin_helper_array_concat_value (new_array_p, &new_length, args[arg_index]);\n\n    if (ECMA_IS_VALUE_ERROR (concat_value))\n    {\n      ecma_deref_object (new_array_p);\n      return concat_value;\n    }\n\n    JERRY_ASSERT (ecma_is_value_empty (concat_value));\n  }\n\n  ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (new_array_p,\n                                                                                  ((ecma_number_t) new_length));\n  if (ECMA_IS_VALUE_ERROR (set_length_value))\n  {\n    ecma_deref_object (new_array_p);\n    return set_length_value;\n  }\n\n  return ecma_make_object_value (new_array_p);\n} /* ecma_builtin_array_prototype_object_concat */\n\n/**\n * The Array.prototype.toString's separator creation routine\n *\n * See also:\n *          ECMA-262 v5.1, 15.4.4.2 4th step\n *\n * @return NULL - if the conversion fails\n *         ecma_string_t * - otherwise\n */\n\nstatic ecma_string_t *\necma_op_array_get_separator_string (ecma_value_t separator) /**< possible separator */\n{\n  if (ecma_is_value_undefined (separator))\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING_COMMA_CHAR);\n  }\n\n  return ecma_op_to_string (separator);\n} /* ecma_op_array_get_separator_string */\n\n/**\n * The Array.prototype's 'toString' single element operation routine\n *\n * See also:\n *          ECMA-262 v5.1, 15.4.4.2\n *\n * @return NULL - if the conversion fails\n *         ecma_string_t * - otherwise\n */\nstatic ecma_string_t *\necma_op_array_get_to_string_at_index (ecma_object_t *obj_p, /**< this object */\n                                      ecma_length_t index) /**< array index */\n{\n  ecma_value_t index_value = ecma_op_object_get_by_index (obj_p, index);\n\n  if (ECMA_IS_VALUE_ERROR (index_value))\n  {\n    return NULL;\n  }\n\n  if (ecma_is_value_undefined (index_value)\n      || ecma_is_value_null (index_value))\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ecma_string_t *ret_str_p = ecma_op_to_string (index_value);\n\n  ecma_free_value (index_value);\n\n  return ret_str_p;\n} /* ecma_op_array_get_to_string_at_index */\n\n/**\n * The Array.prototype object's 'join' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_join (ecma_value_t separator_arg, /**< separator argument */\n                                   ecma_object_t *obj_p, /**< object */\n                                   ecma_length_t length) /**< object's length */\n{\n  /* 4-5. */\n  ecma_string_t *separator_string_p = ecma_op_array_get_separator_string (separator_arg);\n\n  if (JERRY_UNLIKELY (separator_string_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  if (length == 0)\n  {\n    /* 6. */\n    ecma_deref_ecma_string (separator_string_p);\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  /* 7-8. */\n  ecma_string_t *first_string_p = ecma_op_array_get_to_string_at_index (obj_p, 0);\n\n  if (JERRY_UNLIKELY (first_string_p == NULL))\n  {\n    ecma_deref_ecma_string (separator_string_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (first_string_p);\n  ecma_deref_ecma_string (first_string_p);\n\n  /* 9-10. */\n  for (ecma_length_t k = 1; k < length; k++)\n  {\n    /* 10.a */\n    ecma_stringbuilder_append (&builder, separator_string_p);\n\n    /* 10.d */\n    ecma_string_t *next_string_p = ecma_op_array_get_to_string_at_index (obj_p, k);\n\n    if (JERRY_UNLIKELY (next_string_p == NULL))\n    {\n      ecma_deref_ecma_string (separator_string_p);\n      ecma_stringbuilder_destroy (&builder);\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_stringbuilder_append (&builder, next_string_p);\n    ecma_deref_ecma_string (next_string_p);\n  }\n\n  ecma_deref_ecma_string (separator_string_p);\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_array_prototype_join */\n\n/**\n * The Array.prototype object's 'pop' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_pop (ecma_object_t *obj_p, /**< object */\n                                         ecma_length_t len) /**< object's length */\n{\n   /* 4. */\n  if (len == 0)\n  {\n    /* 4.a */\n    ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (obj_p, ECMA_NUMBER_ZERO);\n\n    /* 4.b */\n    return ECMA_IS_VALUE_ERROR (set_length_value) ? set_length_value : ECMA_VALUE_UNDEFINED;\n  }\n\n  /* 5.b */\n  len--;\n  ecma_value_t get_value = ecma_op_object_get_by_index (obj_p, len);\n\n  if (ECMA_IS_VALUE_ERROR (get_value))\n  {\n    return get_value;\n  }\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    if (!ecma_op_ordinary_object_is_extensible (obj_p))\n    {\n      ecma_free_value (get_value);\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument type.\"));\n    }\n\n    ecma_delete_fast_array_properties (obj_p, (uint32_t) len);\n\n    return get_value;\n  }\n\n  /* 5.c */\n  ecma_value_t del_value = ecma_op_object_delete_by_index (obj_p, len, true);\n\n  if (ECMA_IS_VALUE_ERROR (del_value))\n  {\n    ecma_free_value (get_value);\n    return del_value;\n  }\n\n  ecma_free_value (del_value);\n\n  /* 5.d */\n  ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (obj_p, ((ecma_number_t) len));\n\n  if (ECMA_IS_VALUE_ERROR (set_length_value))\n  {\n    ecma_free_value (get_value);\n    return set_length_value;\n  }\n\n  return get_value;\n} /* ecma_builtin_array_prototype_object_pop */\n\n/**\n * The Array.prototype object's 'push' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.7\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_push (const ecma_value_t *argument_list_p, /**< arguments list */\n                                          uint32_t arguments_number, /**< number of arguments */\n                                          ecma_object_t *obj_p, /**< object */\n                                          ecma_length_t length) /**< object's length */\n{\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    if (!ecma_op_ordinary_object_is_extensible (obj_p))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument type.\"));\n    }\n\n    if ((ecma_number_t) (length + arguments_number) > UINT32_MAX)\n    {\n      return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid array length\"));\n    }\n\n    if (arguments_number == 0)\n    {\n      return ecma_make_uint32_value ((uint32_t) length);\n    }\n\n    uint32_t new_length = ((uint32_t) length) + arguments_number;\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n    ecma_value_t *buffer_p = ecma_fast_array_extend (obj_p, new_length) + length;\n\n    for (uint32_t index = 0; index < arguments_number; index++)\n    {\n      buffer_p[index] = ecma_copy_value_if_not_object (argument_list_p[index]);\n    }\n\n    ext_obj_p->u.array.length_prop_and_hole_count -= ECMA_FAST_ARRAY_HOLE_ONE * arguments_number;\n\n    return ecma_make_uint32_value (new_length);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  /* 5. */\n  if ((ecma_number_t) (length + arguments_number) > ECMA_NUMBER_MAX_SAFE_INTEGER)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Pushing element over 2**53-1 length is disallowed\"));\n  }\n\n  /* 6. */\n  for (ecma_length_t index = 0; index < arguments_number; index++, length++)\n  {\n    /* 6.b */\n    ecma_value_t put_value = ecma_op_object_put_by_index (obj_p, length, argument_list_p[index], true);\n\n    if (ECMA_IS_VALUE_ERROR (put_value))\n    {\n      return put_value;\n    }\n  }\n\n  ecma_number_t n = (ecma_number_t) length;\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_number_t n = (ecma_number_t) length;\n\n  /* 5. */\n  for (ecma_length_t index = 0; index < arguments_number; index++, n++)\n  {\n    /* 5.b */\n    ecma_string_t *index_str_p = ecma_new_ecma_string_from_number (n);\n    ecma_value_t put_value = ecma_op_object_put (obj_p, index_str_p, argument_list_p[index], true);\n    ecma_deref_ecma_string (index_str_p);\n\n    if (ECMA_IS_VALUE_ERROR (put_value))\n    {\n      return put_value;\n    }\n  }\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n  /* 6 - 7. */\n  ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (obj_p, n);\n\n  if (ECMA_IS_VALUE_ERROR (set_length_value))\n  {\n    return set_length_value;\n  }\n\n  return ecma_make_number_value (n);\n} /* ecma_builtin_array_prototype_object_push */\n\n/**\n * The Array.prototype object's 'reverse' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.8\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_reverse (ecma_value_t this_arg, /**< this argument */\n                                             ecma_object_t *obj_p, /**< object */\n                                             ecma_length_t len) /**< object's length */\n{\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    uint32_t middle = (uint32_t) len / 2;\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n    if (ext_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE\n        && len != 0\n        && ecma_op_ordinary_object_is_extensible (obj_p))\n    {\n      ecma_value_t *buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, obj_p->u1.property_list_cp);\n\n      for (uint32_t i = 0; i < middle; i++)\n      {\n        ecma_value_t tmp = buffer_p[i];\n        buffer_p[i] = buffer_p[len - 1 - i];\n        buffer_p[len - 1 - i] = tmp;\n      }\n\n      return ecma_copy_value (this_arg);\n    }\n  }\n\n  ecma_length_t middle = len / 2;\n  for (ecma_length_t lower = 0; lower < middle; lower++)\n  {\n    ecma_length_t upper = len - lower - 1;\n    ecma_value_t ret_value = ECMA_VALUE_ERROR;\n\n    ecma_string_t *lower_str_p = ecma_new_ecma_string_from_length (lower);\n    ecma_string_t *upper_str_p = ecma_new_ecma_string_from_length (upper);\n\n#if ENABLED (JERRY_ESNEXT)\n    ecma_value_t lower_value = ECMA_VALUE_EMPTY;\n    ecma_value_t upper_value = ECMA_VALUE_EMPTY;\n\n    ecma_value_t has_lower = ecma_op_object_has_property (obj_p, lower_str_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_IS_VALUE_ERROR (has_lower))\n    {\n      goto clean_up;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    bool lower_exist = ecma_is_value_true (has_lower);\n\n    if (lower_exist)\n    {\n      lower_value = ecma_op_object_get (obj_p, lower_str_p);\n\n      if (ECMA_IS_VALUE_ERROR (lower_value))\n      {\n        goto clean_up;\n      }\n    }\n\n    ecma_value_t has_upper = ecma_op_object_has_property (obj_p, upper_str_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_IS_VALUE_ERROR (has_upper))\n    {\n      goto clean_up;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    bool upper_exist = ecma_is_value_true (has_upper);\n\n    if (upper_exist)\n    {\n      upper_value = ecma_op_object_get (obj_p, upper_str_p);\n\n      if (ECMA_IS_VALUE_ERROR (upper_value))\n      {\n        goto clean_up;\n      }\n    }\n#else /* !ENABLED (JERRY_ESNEXT) */\n    ecma_value_t lower_value = ecma_op_object_get (obj_p, lower_str_p);\n\n    if (ECMA_IS_VALUE_ERROR (lower_value))\n    {\n      ecma_deref_ecma_string (lower_str_p);\n      ecma_deref_ecma_string (upper_str_p);\n      return ret_value;\n    }\n\n    ecma_value_t upper_value = ecma_op_object_get (obj_p, upper_str_p);\n\n    if (ECMA_IS_VALUE_ERROR (upper_value))\n    {\n      goto clean_up;\n    }\n\n    ecma_value_t has_lower = ecma_op_object_has_property (obj_p, lower_str_p);\n    ecma_value_t has_upper = ecma_op_object_has_property (obj_p, upper_str_p);\n\n    bool lower_exist = ecma_is_value_true (has_lower);\n    bool upper_exist = ecma_is_value_true (has_upper);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (lower_exist && upper_exist)\n    {\n      ecma_value_t outer_put_value = ecma_op_object_put (obj_p, lower_str_p, upper_value, true);\n\n      if (ECMA_IS_VALUE_ERROR (outer_put_value))\n      {\n        goto clean_up;\n      }\n\n      ecma_value_t inner_put_value = ecma_op_object_put (obj_p, upper_str_p, lower_value, true);\n\n      if (ECMA_IS_VALUE_ERROR (inner_put_value))\n      {\n        goto clean_up;\n      }\n    }\n    else if (!lower_exist && upper_exist)\n    {\n      ecma_value_t put_value = ecma_op_object_put (obj_p, lower_str_p, upper_value, true);\n\n      if (ECMA_IS_VALUE_ERROR (put_value))\n      {\n        goto clean_up;\n      }\n\n      ecma_value_t del_value = ecma_op_object_delete (obj_p, upper_str_p, true);\n\n      if (ECMA_IS_VALUE_ERROR (del_value))\n      {\n        goto clean_up;\n      }\n    }\n    else if (lower_exist)\n    {\n      ecma_value_t del_value = ecma_op_object_delete (obj_p, lower_str_p, true);\n\n      if (ECMA_IS_VALUE_ERROR (del_value))\n      {\n        goto clean_up;\n      }\n\n      ecma_value_t put_value = ecma_op_object_put (obj_p, upper_str_p, lower_value, true);\n\n      if (ECMA_IS_VALUE_ERROR (put_value))\n      {\n        goto clean_up;\n      }\n    }\n\n    ret_value = ECMA_VALUE_EMPTY;\n\nclean_up:\n    ecma_free_value (upper_value);\n    ecma_free_value (lower_value);\n    ecma_deref_ecma_string (lower_str_p);\n    ecma_deref_ecma_string (upper_str_p);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      return ret_value;\n    }\n  }\n\n  return ecma_copy_value (this_arg);\n} /* ecma_builtin_array_prototype_object_reverse */\n\n/**\n * The Array.prototype object's 'shift' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.9\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_shift (ecma_object_t *obj_p, /**< object */\n                                           ecma_length_t len) /**< object's length */\n{\n  /* 4. */\n  if (len == 0)\n  {\n    ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (obj_p, ECMA_NUMBER_ZERO);\n\n    return ECMA_IS_VALUE_ERROR (set_length_value) ? set_length_value : ECMA_VALUE_UNDEFINED;\n  }\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n    if (ext_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE\n        && len != 0\n        && ecma_op_ordinary_object_is_extensible (obj_p))\n    {\n      ecma_value_t *buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, obj_p->u1.property_list_cp);\n      ecma_value_t ret_value = buffer_p[0];\n\n      if (ecma_is_value_object (ret_value))\n      {\n        ecma_ref_object (ecma_get_object_from_value (ret_value));\n      }\n\n      memmove (buffer_p, buffer_p + 1, (size_t) (sizeof (ecma_value_t) * (len - 1)));\n\n      buffer_p[len - 1] = ECMA_VALUE_UNDEFINED;\n      ecma_delete_fast_array_properties (obj_p, (uint32_t) (len - 1));\n\n      return ret_value;\n    }\n  }\n\n  /* 5. */\n  ecma_value_t first_value = ecma_op_object_get_by_index (obj_p, 0);\n\n  if (ECMA_IS_VALUE_ERROR (first_value))\n  {\n    return first_value;\n  }\n\n  /* 6. and 7. */\n  for (ecma_length_t k = 1; k < len; k++)\n  {\n    /* 7.a - 7.c */\n    ecma_value_t curr_value = ecma_op_object_find_by_index (obj_p, k);\n\n    if (ECMA_IS_VALUE_ERROR (curr_value))\n    {\n      ecma_free_value (first_value);\n      return curr_value;\n    }\n\n    /* 7.b */\n    ecma_length_t to = k - 1;\n    ecma_value_t operation_value;\n\n    if (ecma_is_value_found (curr_value))\n    {\n      /* 7.d.i, 7.d.ii */\n      operation_value = ecma_op_object_put_by_index (obj_p, to, curr_value, true);\n      ecma_free_value (curr_value);\n    }\n    else\n    {\n      /* 7.e.i */\n      operation_value = ecma_op_object_delete_by_index (obj_p, to, true);\n    }\n\n    if (ECMA_IS_VALUE_ERROR (operation_value))\n    {\n      ecma_free_value (first_value);\n      return operation_value;\n    }\n  }\n\n  /* 8. */\n  ecma_value_t del_value = ecma_op_object_delete_by_index (obj_p, --len, true);\n\n  if (ECMA_IS_VALUE_ERROR (del_value))\n  {\n    ecma_free_value (first_value);\n    return del_value;\n  }\n\n  /* 9. */\n  ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (obj_p, ((ecma_number_t) len));\n\n  if (ECMA_IS_VALUE_ERROR (set_length_value))\n  {\n    ecma_free_value (first_value);\n    return set_length_value;\n  }\n\n  /* 10. */\n  return first_value;\n} /* ecma_builtin_array_prototype_object_shift */\n\n/**\n * The Array.prototype object's 'slice' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.10\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */\n                                           ecma_value_t arg2, /**< end */\n                                           ecma_object_t *obj_p, /**< object */\n                                           ecma_length_t len) /**< object's length */\n{\n  ecma_length_t start = 0, end = len;\n\n  /* 5. 6.*/\n  if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (arg1,\n                                                                      len,\n                                                                      &start)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 7. */\n  if (ecma_is_value_undefined (arg2))\n  {\n    end = len;\n  }\n  else\n  {\n    /* 7. part 2, 8.*/\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (arg2,\n                                                                        len,\n                                                                        &end)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  JERRY_ASSERT (start <= len && end <= len);\n\n  bool use_fast_path = ecma_op_object_is_fast_array (obj_p);\n  ecma_length_t copied_length = (end > start) ? end - start : 0;\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, copied_length);\n\n  if (JERRY_UNLIKELY (new_array_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  use_fast_path &= ecma_op_object_is_fast_array (new_array_p);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *new_array_p = ecma_op_new_array_object (0);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (use_fast_path && copied_length > 0)\n  {\n    ecma_extended_object_t *ext_from_obj_p = (ecma_extended_object_t *) obj_p;\n\n    if (ext_from_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE)\n    {\n      if (JERRY_UNLIKELY (obj_p->u1.property_list_cp == JMEM_CP_NULL))\n      {\n        /**\n         * Very unlikely case: the buffer copied from is a fast buffer and the property list was deleted.\n         * There is no need to do any copy.\n         */\n        return ecma_make_object_value (new_array_p);\n      }\n\n      ecma_extended_object_t *ext_to_obj_p = (ecma_extended_object_t *) new_array_p;\n\n#if ENABLED (JERRY_ESNEXT)\n      uint32_t target_length = ext_to_obj_p->u.array.length;\n      ecma_value_t *to_buffer_p;\n      JERRY_ASSERT (copied_length <= UINT32_MAX);\n\n      if (copied_length == target_length)\n      {\n        to_buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, new_array_p->u1.property_list_cp);\n      }\n      else if (copied_length > target_length)\n      {\n        to_buffer_p = ecma_fast_array_extend (new_array_p, (uint32_t) copied_length);\n      }\n      else\n      {\n        ecma_delete_fast_array_properties (new_array_p, (uint32_t) copied_length);\n        to_buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, new_array_p->u1.property_list_cp);\n      }\n#else /* !ENABLED (JERRY_ESNEXT) */\n      ecma_value_t *to_buffer_p = ecma_fast_array_extend (new_array_p, copied_length);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      ecma_value_t *from_buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, obj_p->u1.property_list_cp);\n\n      /* 9. */\n      uint32_t n = 0;\n\n      for (uint32_t k = (uint32_t) start; k < (uint32_t) end; k++, n++)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        ecma_free_value_if_not_object (to_buffer_p[n]);\n#endif /* ENABLED (JERRY_ESNEXT) */\n        to_buffer_p[n] = ecma_copy_value_if_not_object (from_buffer_p[k]);\n      }\n\n      ext_to_obj_p->u.array.length_prop_and_hole_count &= ECMA_FAST_ARRAY_HOLE_ONE - 1;\n\n      return ecma_make_object_value (new_array_p);\n    }\n  }\n\n  /* 9. */\n  ecma_length_t n = 0;\n\n  /* 10. */\n  for (ecma_length_t k = start; k < end; k++, n++)\n  {\n    /* 10.c */\n    ecma_value_t get_value = ecma_op_object_find_by_index (obj_p, k);\n\n    if (ECMA_IS_VALUE_ERROR (get_value))\n    {\n      ecma_deref_object (new_array_p);\n      return get_value;\n    }\n\n    if (ecma_is_value_found (get_value))\n    {\n      /* 10.c.ii */\n      ecma_value_t put_comp;\n#if ENABLED (JERRY_ESNEXT)\n      const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n#else /* !ENABLED (JERRY_ESNEXT) */\n      const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      put_comp = ecma_builtin_helper_def_prop_by_index (new_array_p,\n                                                        n,\n                                                        get_value,\n                                                        prop_flags);\n      ecma_free_value (get_value);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (ECMA_IS_VALUE_ERROR (put_comp))\n      {\n        ecma_deref_object (new_array_p);\n        return put_comp;\n      }\n#else /* !ENABLED (JERRY_ESNEXT) */\n      JERRY_ASSERT (ecma_is_value_true (put_comp));\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (new_array_p, ((ecma_number_t) n));\n\n  if (ECMA_IS_VALUE_ERROR (set_length_value))\n  {\n    ecma_deref_object (new_array_p);\n    return set_length_value;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ecma_make_object_value (new_array_p);\n} /* ecma_builtin_array_prototype_object_slice */\n\n/**\n * SortCompare abstract method\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.11\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_sort_compare_helper (ecma_value_t lhs, /**< left value */\n                                                         ecma_value_t rhs, /**< right value */\n                                                         ecma_value_t compare_func) /**< compare function */\n{\n  /*\n   * ECMA-262 v5, 15.4.4.11 NOTE1: Because non-existent property values always\n   * compare greater than undefined property values, and undefined always\n   * compares greater than any other value, undefined property values always\n   * sort to the end of the result, followed by non-existent property values.\n   */\n  bool lhs_is_undef = ecma_is_value_undefined (lhs);\n  bool rhs_is_undef = ecma_is_value_undefined (rhs);\n\n  if (lhs_is_undef)\n  {\n    return ecma_make_integer_value (rhs_is_undef ? 0 : 1);\n  }\n\n  if (rhs_is_undef)\n  {\n    return ecma_make_integer_value (-1);\n  }\n\n  ecma_number_t result = ECMA_NUMBER_ZERO;\n\n  if (ecma_is_value_undefined (compare_func))\n  {\n    /* Default comparison when no compare_func is passed. */\n    ecma_string_t *lhs_str_p = ecma_op_to_string (lhs);\n    if (JERRY_UNLIKELY (lhs_str_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_string_t *rhs_str_p = ecma_op_to_string (rhs);\n    if (JERRY_UNLIKELY (rhs_str_p == NULL))\n    {\n      ecma_deref_ecma_string (lhs_str_p);\n      return ECMA_VALUE_ERROR;\n    }\n\n    if (ecma_compare_ecma_strings_relational (lhs_str_p, rhs_str_p))\n    {\n      result = ECMA_NUMBER_MINUS_ONE;\n    }\n    else if (!ecma_compare_ecma_strings (lhs_str_p, rhs_str_p))\n    {\n      result = ECMA_NUMBER_ONE;\n    }\n    else\n    {\n      result = ECMA_NUMBER_ZERO;\n    }\n\n    ecma_deref_ecma_string (rhs_str_p);\n    ecma_deref_ecma_string (lhs_str_p);\n  }\n  else\n  {\n    /*\n     * compare_func, if not undefined, will always contain a callable function object.\n     * We checked this previously, before this function was called.\n     */\n    JERRY_ASSERT (ecma_op_is_callable (compare_func));\n    ecma_object_t *comparefn_obj_p = ecma_get_object_from_value (compare_func);\n\n    ecma_value_t compare_args[] = { lhs, rhs };\n\n    ecma_value_t call_value = ecma_op_function_call (comparefn_obj_p,\n                                                     ECMA_VALUE_UNDEFINED,\n                                                     compare_args,\n                                                     2);\n    if (ECMA_IS_VALUE_ERROR (call_value))\n    {\n      return call_value;\n    }\n\n    if (!ecma_is_value_number (call_value))\n    {\n      ecma_number_t ret_num;\n\n      if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (call_value, &ret_num)))\n      {\n        ecma_free_value (call_value);\n        return ECMA_VALUE_ERROR;\n      }\n\n      result = ret_num;\n    }\n    else\n    {\n      result = ecma_get_number_from_value (call_value);\n    }\n\n    ecma_free_value (call_value);\n  }\n\n  return ecma_make_number_value (result);\n} /* ecma_builtin_array_prototype_object_sort_compare_helper */\n\n/**\n * The Array.prototype object's 'sort' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.11\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_sort (ecma_value_t this_arg, /**< this argument */\n                                          ecma_value_t arg1, /**< comparefn */\n                                          ecma_object_t *obj_p) /**< object */\n{\n  /* Check if the provided compare function is callable. */\n  if (!ecma_is_value_undefined (arg1) && !ecma_op_is_callable (arg1))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Compare function is not callable.\"));\n  }\n\n  ecma_length_t len;\n  ecma_value_t len_value = ecma_op_object_get_length (obj_p, &len);\n\n  if (ECMA_IS_VALUE_ERROR (len_value))\n  {\n    return len_value;\n  }\n  ecma_collection_t *array_index_props_p = ecma_new_collection ();\n\n  for (uint32_t i = 0; i < len; i++)\n  {\n    ecma_string_t *prop_name_p = ecma_new_ecma_string_from_uint32 (i);\n\n    ecma_property_descriptor_t prop_desc;\n    ecma_value_t get_desc = ecma_op_object_get_own_property_descriptor (obj_p, prop_name_p, &prop_desc);\n\n    if (ECMA_IS_VALUE_ERROR (get_desc))\n    {\n      ecma_collection_free (array_index_props_p);\n      ecma_deref_ecma_string (prop_name_p);\n      return get_desc;\n    }\n\n    if (ecma_is_value_true (get_desc))\n    {\n      ecma_ref_ecma_string (prop_name_p);\n      ecma_collection_push_back (array_index_props_p, ecma_make_string_value (prop_name_p));\n      ecma_free_property_descriptor (&prop_desc);\n      continue;\n    }\n  }\n\n  uint32_t defined_prop_count = array_index_props_p->item_count;\n\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n  uint32_t copied_num = 0;\n  JMEM_DEFINE_LOCAL_ARRAY (values_buffer, defined_prop_count, ecma_value_t);\n\n  ecma_value_t *buffer_p = array_index_props_p->buffer_p;\n\n  /* Copy unsorted array into a native c array. */\n  for (uint32_t i = 0; i < array_index_props_p->item_count; i++)\n  {\n    ecma_string_t *property_name_p = ecma_get_string_from_value (buffer_p[i]);\n\n    uint32_t index = ecma_string_get_array_index (property_name_p);\n    JERRY_ASSERT (index != ECMA_STRING_NOT_ARRAY_INDEX);\n\n    if (index >= len)\n    {\n      break;\n    }\n\n    ecma_value_t index_value = ecma_op_object_get (obj_p, property_name_p);\n\n    if (ECMA_IS_VALUE_ERROR (index_value))\n    {\n      goto clean_up;\n    }\n\n    values_buffer[copied_num++] = index_value;\n  }\n\n  JERRY_ASSERT (copied_num == defined_prop_count);\n\n  /* Sorting. */\n  if (copied_num > 1)\n  {\n    const ecma_builtin_helper_sort_compare_fn_t sort_cb = &ecma_builtin_array_prototype_object_sort_compare_helper;\n    ecma_value_t sort_value = ecma_builtin_helper_array_merge_sort_helper (values_buffer,\n                                                                           (uint32_t) (copied_num),\n                                                                           arg1,\n                                                                           sort_cb);\n    if (ECMA_IS_VALUE_ERROR (sort_value))\n    {\n      goto clean_up;\n    }\n\n    ecma_free_value (sort_value);\n  }\n\n  /* Put sorted values to the front of the array. */\n  for (uint32_t index = 0; index < copied_num; index++)\n  {\n    ecma_value_t put_value = ecma_op_object_put_by_index (obj_p, index, values_buffer[index], true);\n\n    if (ECMA_IS_VALUE_ERROR (put_value))\n    {\n      goto clean_up;\n    }\n  }\n\n  ret_value = ECMA_VALUE_EMPTY;\n\nclean_up:\n  /* Free values that were copied to the local array. */\n  for (uint32_t index = 0; index < copied_num; index++)\n  {\n    ecma_free_value (values_buffer[index]);\n  }\n\n  JMEM_FINALIZE_LOCAL_ARRAY (values_buffer);\n\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    ecma_collection_free (array_index_props_p);\n    return ret_value;\n  }\n\n  JERRY_ASSERT (ecma_is_value_empty (ret_value));\n\n  /* Undefined properties should be in the back of the array. */\n  ecma_value_t *buffer_p = array_index_props_p->buffer_p;\n\n  for (uint32_t i = 0; i < array_index_props_p->item_count; i++)\n  {\n    ecma_string_t *property_name_p = ecma_get_string_from_value (buffer_p[i]);\n\n    uint32_t index = ecma_string_get_array_index (property_name_p);\n    JERRY_ASSERT (index != ECMA_STRING_NOT_ARRAY_INDEX);\n\n    if (index >= copied_num && index < len)\n    {\n      ecma_value_t del_value = ecma_op_object_delete (obj_p, property_name_p, true);\n\n      if (ECMA_IS_VALUE_ERROR (del_value))\n      {\n        ecma_collection_free (array_index_props_p);\n        return del_value;\n      }\n    }\n  }\n\n  ecma_collection_free (array_index_props_p);\n\n  return ecma_copy_value (this_arg);\n} /* ecma_builtin_array_prototype_object_sort */\n\n/**\n * The Array.prototype object's 'splice' routine\n *\n * See also:\n *          ECMA-262 v11, 22.1.3.28\n *          ECMA-262 v5, 15.4.4.12\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< arguments list */\n                                            uint32_t args_number, /**< number of arguments */\n                                            ecma_object_t *obj_p, /**< object */\n                                            ecma_length_t len) /**< object's length */\n{\n  ecma_length_t actual_start = 0;\n  ecma_length_t actual_delete_count = 0;\n  ecma_length_t insert_count = 0;\n\n  if (args_number > 0)\n  {\n    /* ES5.1: 6, ES11: 4. */\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (args[0],\n                                                                        len,\n                                                                        &actual_start)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    /* ES11: 6. */\n    if (args_number == 1)\n    {\n      actual_delete_count = len - actual_start;\n    }\n    /* ES11: 7. */\n    else\n    {\n      insert_count = args_number - 2;\n\n      ecma_number_t delete_num;\n      if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (args[1], &delete_num)))\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      /* ES5.1: 7 */\n      actual_delete_count = (ecma_length_t) (JERRY_MIN (JERRY_MAX (delete_num, 0),\n                                                        (ecma_number_t) (len - actual_start)));\n    }\n  }\n\n  ecma_length_t new_length = len + insert_count - actual_delete_count;\n\n#if ENABLED (JERRY_ESNEXT)\n  /* ES11: 8. */\n  if ((ecma_number_t) new_length > ECMA_NUMBER_MAX_SAFE_INTEGER)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid new array length\"));\n  }\n\n  /* ES11: 9. */\n  ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, actual_delete_count);\n\n  if (JERRY_UNLIKELY (new_array_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  /* ES5.1: 2. */\n  ecma_object_t *new_array_p = ecma_op_new_array_object (actual_delete_count);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* ES5.1: 8, ES11: 10. */\n  ecma_length_t k = 0;\n\n  /* ES5.1: 9, ES11: 11. */\n  for (; k < actual_delete_count; k++)\n  {\n    ecma_length_t from = actual_start + k;\n    ecma_value_t from_present = ecma_op_object_find_by_index (obj_p, from);\n\n    if (ECMA_IS_VALUE_ERROR (from_present))\n    {\n      ecma_deref_object (new_array_p);\n      return from_present;\n    }\n\n    if (ecma_is_value_found (from_present))\n    {\n#if ENABLED (JERRY_ESNEXT)\n      const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n#else /* !ENABLED (JERRY_ESNEXT) */\n      const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      ecma_value_t put_comp = ecma_builtin_helper_def_prop_by_index (new_array_p,\n                                                                     k,\n                                                                     from_present,\n                                                                     prop_flags);\n      ecma_free_value (from_present);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (ECMA_IS_VALUE_ERROR (put_comp))\n      {\n        ecma_deref_object (new_array_p);\n        return put_comp;\n      }\n#else /* !ENABLED (JERRY_ESNEXT) */\n      JERRY_ASSERT (ecma_is_value_true (put_comp));\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  /* ES11: 12. */\n  ecma_value_t set_length = ecma_builtin_array_prototype_helper_set_length (new_array_p,\n                                                                            ((ecma_number_t) actual_delete_count));\n\n  if (ECMA_IS_VALUE_ERROR (set_length))\n  {\n    ecma_deref_object (new_array_p);\n    return set_length;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* ES5.1: 12, ES11: 15. */\n  if (insert_count < actual_delete_count)\n  {\n    for (k = actual_start; k < len - actual_delete_count; k++)\n    {\n      ecma_length_t from = k + actual_delete_count;\n      ecma_length_t to = k + insert_count;\n\n      ecma_value_t from_present = ecma_op_object_find_by_index (obj_p, from);\n\n      if (ECMA_IS_VALUE_ERROR (from_present))\n      {\n        ecma_deref_object (new_array_p);\n        return from_present;\n      }\n\n      ecma_value_t operation_value;\n\n      if (ecma_is_value_found (from_present))\n      {\n        operation_value = ecma_op_object_put_by_index (obj_p, to, from_present, true);\n        ecma_free_value (from_present);\n      }\n      else\n      {\n        operation_value = ecma_op_object_delete_by_index (obj_p, to, true);\n      }\n\n      if (ECMA_IS_VALUE_ERROR (operation_value))\n      {\n        ecma_deref_object (new_array_p);\n        return operation_value;\n      }\n    }\n\n    k = len;\n\n    for (k = len; k > new_length; k--)\n    {\n      ecma_value_t del_value = ecma_op_object_delete_by_index (obj_p, k - 1, true);\n\n      if (ECMA_IS_VALUE_ERROR (del_value))\n      {\n        ecma_deref_object (new_array_p);\n        return del_value;\n      }\n    }\n  }\n  /* ES5.1: 13, ES11: 16. */\n  else if (insert_count > actual_delete_count)\n  {\n    for (k = len - actual_delete_count; k > actual_start; k--)\n    {\n      ecma_length_t from = k + actual_delete_count - 1;\n      ecma_length_t to = k + insert_count - 1;\n\n      ecma_value_t from_present = ecma_op_object_find_by_index (obj_p, from);\n\n      if (ECMA_IS_VALUE_ERROR (from_present))\n      {\n        ecma_deref_object (new_array_p);\n        return from_present;\n      }\n\n      ecma_value_t operation_value;\n\n      if (ecma_is_value_found (from_present))\n      {\n        operation_value = ecma_op_object_put_by_index (obj_p, to, from_present, true);\n        ecma_free_value (from_present);\n      }\n      else\n      {\n        operation_value = ecma_op_object_delete_by_index (obj_p, to, true);\n      }\n\n      if (ECMA_IS_VALUE_ERROR (operation_value))\n      {\n        ecma_deref_object (new_array_p);\n        return operation_value;\n      }\n    }\n  }\n\n  /* ES5.1: 14, ES11: 17. */\n  k = actual_start;\n\n  /* ES5.1: 15, ES11: 18. */\n  uint32_t idx = 0;\n  for (uint32_t arg_index = 2; arg_index < args_number; arg_index++, idx++)\n  {\n    ecma_value_t put_value = ecma_op_object_put_by_index (obj_p,\n                                                          actual_start + idx,\n                                                          args[arg_index],\n                                                          true);\n\n    if (ECMA_IS_VALUE_ERROR (put_value))\n    {\n      ecma_deref_object (new_array_p);\n      return put_value;\n    }\n  }\n\n  /* ES5.1: 16, ES11: 19. */\n  ecma_value_t set_new_length = ecma_builtin_array_prototype_helper_set_length (obj_p, ((ecma_number_t) new_length));\n\n  if (ECMA_IS_VALUE_ERROR (set_new_length))\n  {\n    ecma_deref_object (new_array_p);\n    return set_new_length;\n  }\n\n  /* ES5.1: 17, ES11: 20. */\n  return ecma_make_object_value (new_array_p);\n} /* ecma_builtin_array_prototype_object_splice */\n\n/**\n * The Array.prototype object's 'unshift' routine\n *\n * See also:\n *          ECMA-262  v5, 15.4.4.13\n *          ECMA-262 v11, 22.1.3.31\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_unshift (const ecma_value_t args[], /**< arguments list */\n                                             uint32_t args_number, /**< number of arguments */\n                                             ecma_object_t *obj_p, /**< object */\n                                             ecma_length_t len) /**< object's length */\n{\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n    if (ext_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE\n        && len != 0\n        && ecma_op_ordinary_object_is_extensible (obj_p))\n    {\n      if (args_number > UINT32_MAX - len)\n      {\n        return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid array length\"));\n      }\n\n      if (args_number == 0)\n      {\n        return ecma_make_uint32_value ((uint32_t) len);\n      }\n\n      uint32_t new_length = ((uint32_t) len) + args_number;\n      ecma_value_t *buffer_p = ecma_fast_array_extend (obj_p, new_length);\n      memmove (buffer_p + args_number, buffer_p, (size_t) (sizeof (ecma_value_t) * len));\n\n      uint32_t index = 0;\n\n      while (index < args_number)\n      {\n        buffer_p[index] = ecma_copy_value_if_not_object (args[index]);\n        index++;\n      }\n\n      ext_obj_p->u.array.length_prop_and_hole_count -= args_number * ECMA_FAST_ARRAY_HOLE_ONE;\n\n      return ecma_make_uint32_value (new_length);\n    }\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  const bool should_iterate = args_number > 0;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  const bool should_iterate = true;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  if (should_iterate)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    /* ES11:4.a. */\n    if ((ecma_number_t) (len + args_number) > ECMA_NUMBER_MAX_SAFE_INTEGER)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Unshift elements over 2**53-1 length is disallowed\"));\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    /* ES5.1:5.,6. ES11: 4.b, 4.c */\n    for (ecma_length_t k = len; k > 0; k--)\n    {\n      /* ES5.1:6.a, 6.c, ES11:4.c.i., 4.c.iii.  */\n      ecma_value_t get_value = ecma_op_object_find_by_index (obj_p, k - 1);\n\n      if (ECMA_IS_VALUE_ERROR (get_value))\n      {\n        return get_value;\n      }\n\n      /* ES5.1:6.b, ES11:4.c.ii. */\n      ecma_number_t new_idx = ((ecma_number_t) k) + ((ecma_number_t) args_number) - 1;\n      ecma_string_t *index_str_p = ecma_new_ecma_string_from_number (new_idx);\n      ecma_value_t operation_value;\n\n      if (ecma_is_value_found (get_value))\n      {\n        /* ES5.1:6.d.i, 6.d.ii, ES11:4.c.iv. */\n        operation_value = ecma_op_object_put (obj_p, index_str_p, get_value, true);\n        ecma_free_value (get_value);\n      }\n      else\n      {\n        /* ES5.1:6.e.i, ES11:4.c.v. */\n        operation_value = ecma_op_object_delete (obj_p, index_str_p, true);\n      }\n\n      ecma_deref_ecma_string (index_str_p);\n\n      if (ECMA_IS_VALUE_ERROR (operation_value))\n      {\n        return operation_value;\n      }\n    }\n\n    for (uint32_t arg_index = 0; arg_index < args_number; arg_index++)\n    {\n      /* ES5.1:9.b, ES11:4.f.ii.  */\n      ecma_value_t put_value = ecma_op_object_put_by_index (obj_p, arg_index, args[arg_index], true);\n\n      if (ECMA_IS_VALUE_ERROR (put_value))\n      {\n        return put_value;\n      }\n    }\n  }\n\n  /* ES5.1:10., ES11:5. */\n  ecma_number_t new_len = ((ecma_number_t) len) + ((ecma_number_t) args_number);\n  ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (obj_p, new_len);\n\n  if (ECMA_IS_VALUE_ERROR (set_length_value))\n  {\n    return set_length_value;\n  }\n\n  return ecma_make_number_value (new_len);\n} /* ecma_builtin_array_prototype_object_unshift */\n\n/**\n * The Array.prototype object's 'indexOf' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.14\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_index_of (const ecma_value_t args[], /**< arguments list */\n                                              uint32_t args_number, /**< number of arguments */\n                                              ecma_object_t *obj_p, /**< object */\n                                              ecma_length_t len) /**< object's length */\n{\n  /* 4. */\n  if (len == 0)\n  {\n    return ecma_make_integer_value (-1);\n  }\n\n  /* 5. */\n  ecma_number_t idx = 0;\n  if (args_number > 1)\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (args[1], &idx)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  /* 6. */\n  if (idx >= (ecma_number_t) len)\n  {\n    return ecma_make_number_value (-1);\n  }\n\n  /* 7. */\n  ecma_length_t from_idx = (ecma_length_t) idx;\n\n  /* 8. */\n  if (idx < 0)\n  {\n    from_idx = (ecma_length_t) JERRY_MAX ((ecma_number_t) len + idx, 0);\n  }\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n    if (ext_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE)\n    {\n      if (JERRY_UNLIKELY (obj_p->u1.property_list_cp == JMEM_CP_NULL))\n      {\n        return ecma_make_integer_value (-1);\n      }\n\n      len = JERRY_MIN (ext_obj_p->u.array.length, len);\n\n      ecma_value_t *buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, obj_p->u1.property_list_cp);\n\n      while (from_idx < len)\n      {\n        if (ecma_op_strict_equality_compare (args[0], buffer_p[from_idx]))\n        {\n          return ecma_make_uint32_value ((uint32_t) from_idx);\n        }\n\n        from_idx++;\n      }\n\n      return ecma_make_integer_value (-1);\n    }\n  }\n\n  /* 6. */\n  while (from_idx < len)\n  {\n    /* 9.a */\n    ecma_value_t get_value = ecma_op_object_find_by_index (obj_p, from_idx);\n\n    if (ECMA_IS_VALUE_ERROR (get_value))\n    {\n      return get_value;\n    }\n\n    /* 9.b.i, 9.b.ii */\n    if (ecma_is_value_found (get_value)\n        && ecma_op_strict_equality_compare (args[0], get_value))\n    {\n      ecma_free_value (get_value);\n      return ecma_make_length_value (from_idx);\n    }\n\n    from_idx++;\n\n    ecma_free_value (get_value);\n  }\n\n  return ecma_make_integer_value (-1);\n} /* ecma_builtin_array_prototype_object_index_of */\n\n/**\n * The Array.prototype object's 'lastIndexOf' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.15\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_last_index_of (const ecma_value_t args[], /**< arguments list */\n                                                   uint32_t args_number, /**< number of arguments */\n                                                   ecma_object_t *obj_p, /**< object */\n                                                   ecma_length_t len) /**< object's length */\n{\n  /* 4. */\n  if (len == 0)\n  {\n    return ecma_make_integer_value (-1);\n  }\n\n  /* 5. */\n  ecma_number_t idx = (ecma_number_t) len - 1;\n  if (args_number > 1)\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (args[1], &idx)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  ecma_length_t from_idx;\n\n  /* 6 */\n  if (idx >= 0)\n  {\n    from_idx = (ecma_length_t) (JERRY_MIN (idx, (ecma_number_t) (len - 1)));\n  }\n  else\n  {\n    ecma_number_t k = (ecma_number_t) len + idx;\n    if (k < 0)\n    {\n      return ecma_make_integer_value (-1);\n    }\n    from_idx = (ecma_length_t) k;\n  }\n\n  ecma_value_t search_element = (args_number > 0) ? args[0] : ECMA_VALUE_UNDEFINED;\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n    if (ext_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE)\n    {\n      if (JERRY_UNLIKELY (obj_p->u1.property_list_cp == JMEM_CP_NULL))\n      {\n        return ecma_make_integer_value (-1);\n      }\n\n      len = JERRY_MIN (ext_obj_p->u.array.length, len);\n\n      ecma_value_t *buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, obj_p->u1.property_list_cp);\n\n      while (from_idx < len)\n      {\n        if (ecma_op_strict_equality_compare (search_element, buffer_p[from_idx]))\n        {\n          return ecma_make_uint32_value ((uint32_t) from_idx);\n        }\n        from_idx--;\n      }\n      return ecma_make_integer_value (-1);\n    }\n  }\n\n    /* 8. */\n  while (from_idx < len)\n  {\n    /* 8.a */\n    ecma_value_t get_value = ecma_op_object_find_by_index (obj_p, from_idx);\n\n    if (ECMA_IS_VALUE_ERROR (get_value))\n    {\n      return get_value;\n    }\n\n    /* 8.b.i, 8.b.ii */\n    if (ecma_is_value_found (get_value)\n        && ecma_op_strict_equality_compare (search_element, get_value))\n    {\n      ecma_free_value (get_value);\n      return ecma_make_length_value (from_idx);\n    }\n\n    from_idx--;\n\n    ecma_free_value (get_value);\n  }\n\n  return ecma_make_integer_value (-1);\n} /* ecma_builtin_array_prototype_object_last_index_of */\n\n/**\n * Type of array routine.\n */\ntypedef enum\n{\n  ARRAY_ROUTINE_EVERY, /**< Array.every: ECMA-262 v5, 15.4.4.16 */\n  ARRAY_ROUTINE_SOME, /**< Array.some: ECMA-262 v5, 15.4.4.17 */\n  ARRAY_ROUTINE_FOREACH, /**< Array.forEach: ECMA-262 v5, 15.4.4.18 */\n  ARRAY_ROUTINE__COUNT /**< count of the modes */\n} array_routine_mode;\n\n/**\n * Applies the provided function to each element of the array as long as\n * the return value stays empty. The common function for 'every', 'some'\n * and 'forEach' of the Array prototype.\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.16\n *          ECMA-262 v5, 15.4.4.17\n *          ECMA-262 v5, 15.4.4.18\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_apply (ecma_value_t arg1, /**< callbackfn */\n                          ecma_value_t arg2, /**< thisArg */\n                          array_routine_mode mode, /**< array routine mode */\n                          ecma_object_t *obj_p, /**< object */\n                          ecma_length_t len) /**< object's length */\n\n{\n  JERRY_ASSERT (mode < ARRAY_ROUTINE__COUNT);\n\n  /* 4. */\n  if (!ecma_op_is_callable (arg1))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n  }\n\n  /* We already checked that arg1 is callable */\n  ecma_object_t *func_object_p = ecma_get_object_from_value (arg1);\n  ecma_value_t current_index;\n\n  /* 7. */\n  for (ecma_length_t index = 0; index < len; index++)\n  {\n    /* 7.a - 7.c */\n    ecma_value_t get_value = ecma_op_object_find_by_index (obj_p, index);\n\n    if (ECMA_IS_VALUE_ERROR (get_value))\n    {\n      return get_value;\n    }\n\n    if (ecma_is_value_found (get_value))\n    {\n      /* 7.c.i */\n      current_index = ecma_make_length_value (index);\n\n      ecma_value_t call_args[] = { get_value, current_index, ecma_make_object_value (obj_p) };\n      /* 7.c.ii */\n      ecma_value_t call_value = ecma_op_function_call (func_object_p, arg2, call_args, 3);\n\n      if (ECMA_IS_VALUE_ERROR (call_value))\n      {\n        ecma_free_value (get_value);\n        return call_value;\n      }\n\n      bool to_boolean = ecma_op_to_boolean (call_value);\n\n      ecma_free_value (call_value);\n      ecma_free_value (get_value);\n\n      /* 7.c.iii */\n      if (mode == ARRAY_ROUTINE_EVERY && !to_boolean)\n      {\n        return ECMA_VALUE_FALSE;\n      }\n      else if (mode == ARRAY_ROUTINE_SOME && to_boolean)\n      {\n        return ECMA_VALUE_TRUE;\n      }\n    }\n  }\n\n  /* 8. */\n\n  if (mode == ARRAY_ROUTINE_EVERY)\n  {\n    return ECMA_VALUE_TRUE;\n  }\n  else if (mode == ARRAY_ROUTINE_SOME)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  JERRY_ASSERT (mode == ARRAY_ROUTINE_FOREACH);\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_builtin_array_apply */\n\n/**\n * The Array.prototype object's 'map' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.19\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_map (ecma_value_t arg1, /**< callbackfn */\n                                         ecma_value_t arg2, /**< thisArg */\n                                         ecma_object_t *obj_p, /**< object */\n                                         ecma_length_t len) /**< object's length */\n{\n  /* 4. */\n  if (!ecma_op_is_callable (arg1))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n  }\n\n  /* 6. */\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, len);\n\n  if (JERRY_UNLIKELY (new_array_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *new_array_p = ecma_op_new_array_object (len);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (ecma_is_value_object (arg1));\n  ecma_object_t *func_object_p = ecma_get_object_from_value (arg1);\n\n  /* 7-8. */\n  ecma_value_t current_index;\n\n  for (ecma_length_t index = 0; index < len; index++)\n  {\n    /* 8.a - 8.b */\n    ecma_value_t current_value = ecma_op_object_find_by_index (obj_p, index);\n\n    if (ECMA_IS_VALUE_ERROR (current_value))\n    {\n      ecma_deref_object (new_array_p);\n      return current_value;\n    }\n\n    if (ecma_is_value_found (current_value))\n    {\n      /* 8.c.i, 8.c.ii */\n      current_index = ecma_make_length_value (index);\n      ecma_value_t call_args[] = { current_value, current_index, ecma_make_object_value (obj_p) };\n\n      ecma_value_t mapped_value = ecma_op_function_call (func_object_p, arg2, call_args, 3);\n\n      if (ECMA_IS_VALUE_ERROR (mapped_value))\n      {\n        ecma_free_value (current_value);\n        ecma_deref_object (new_array_p);\n        return mapped_value;\n      }\n\n      /* 8.c.iii */\n      ecma_value_t put_comp;\n#if ENABLED (JERRY_ESNEXT)\n      const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n#else /* !ENABLED (JERRY_ESNEXT) */\n      const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      put_comp = ecma_builtin_helper_def_prop_by_index (new_array_p,\n                                                        index,\n                                                        mapped_value,\n                                                        prop_flags);\n\n      ecma_free_value (mapped_value);\n      ecma_free_value (current_value);\n#if ENABLED (JERRY_ESNEXT)\n      if (ECMA_IS_VALUE_ERROR (put_comp))\n      {\n        ecma_deref_object (new_array_p);\n        return put_comp;\n      }\n#else /* !ENABLED (JERRY_ESNEXT) */\n      JERRY_ASSERT (ecma_is_value_true (put_comp));\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n  }\n\n  return ecma_make_object_value (new_array_p);\n} /* ecma_builtin_array_prototype_object_map */\n\n/**\n * The Array.prototype object's 'filter' routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.20\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn */\n                                            ecma_value_t arg2, /**< thisArg */\n                                            ecma_object_t *obj_p, /**< object */\n                                            ecma_length_t len) /**< object's length */\n{\n  /* 4. */\n  if (!ecma_op_is_callable (arg1))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n  }\n\n  /* 6. */\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, 0);\n\n  if (JERRY_UNLIKELY (new_array_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* ES11: 22.1.3.7. 7.c.iii.1 */\n  const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *new_array_p = ecma_op_new_array_object (0);\n\n  /* ES5.1: 15.4.4.20. 9.c.iii.1 */\n  const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* We already checked that arg1 is callable, so it will always be an object. */\n  JERRY_ASSERT (ecma_is_value_object (arg1));\n  ecma_object_t *func_object_p = ecma_get_object_from_value (arg1);\n\n  /* 8. */\n  ecma_length_t new_array_index = 0;\n  ecma_value_t current_index;\n\n  /* 9. */\n  for (ecma_length_t index = 0; index < len; index++)\n  {\n    /* 9.a - 9.c */\n    ecma_value_t get_value = ecma_op_object_find_by_index (obj_p, index);\n\n    if (ECMA_IS_VALUE_ERROR (get_value))\n    {\n      ecma_deref_object (new_array_p);\n      return get_value;\n    }\n\n    if (ecma_is_value_found (get_value))\n    {\n      /* 9.c.i */\n      current_index = ecma_make_length_value (index);\n\n      ecma_value_t call_args[] = { get_value, current_index, ecma_make_object_value (obj_p) };\n      /* 9.c.ii */\n      ecma_value_t call_value = ecma_op_function_call (func_object_p, arg2, call_args, 3);\n\n      if (ECMA_IS_VALUE_ERROR (call_value))\n      {\n        ecma_free_value (get_value);\n        ecma_deref_object (new_array_p);\n        return call_value;\n      }\n\n      /* 9.c.iii */\n      if (ecma_op_to_boolean (call_value))\n      {\n        ecma_value_t put_comp;\n        put_comp = ecma_builtin_helper_def_prop_by_index (new_array_p,\n                                                          new_array_index,\n                                                          get_value,\n                                                          prop_flags);\n#if ENABLED (JERRY_ESNEXT)\n        if (ECMA_IS_VALUE_ERROR (put_comp))\n        {\n          ecma_free_value (call_value);\n          ecma_free_value (get_value);\n          ecma_deref_object (new_array_p);\n\n          return put_comp;\n        }\n#else /* !ENABLED (JERRY_ESNEXT) */\n        JERRY_ASSERT (ecma_is_value_true (put_comp));\n#endif /* ENABLED (JERRY_ESNEXT) */\n        new_array_index++;\n      }\n\n      ecma_free_value (call_value);\n      ecma_free_value (get_value);\n    }\n  }\n\n  return ecma_make_object_value (new_array_p);\n} /* ecma_builtin_array_prototype_object_filter */\n\n/**\n * The Array.prototype object's 'reduce' and 'reduceRight' routine\n *\n * See also:\n *         ECMA-262 v5, 15.4.4.21\n *         ECMA-262 v5, 15.4.4.22\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_reduce_from (const ecma_value_t args_p[], /**< routine's arguments */\n                                uint32_t args_number, /**< arguments list length */\n                                bool start_from_left, /**< whether the reduce starts from left or right */\n                                ecma_object_t *obj_p, /**< object */\n                                ecma_length_t len) /**< object's length */\n{\n  /* 4. */\n  if (!ecma_op_is_callable (args_p[0]))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n  }\n\n  /* 5. */\n  if (len == 0 && args_number == 1)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Reduce of empty array with no initial value.\"));\n  }\n\n  JERRY_ASSERT (ecma_is_value_object (args_p[0]));\n  ecma_object_t *func_object_p = ecma_get_object_from_value (args_p[0]);\n\n  ecma_value_t accumulator = ECMA_VALUE_UNDEFINED;\n\n  /* 6. */\n  ecma_length_t index = 0;\n  const ecma_length_t last_index = len - 1;\n\n  /* 7.a */\n  if (args_number > 1)\n  {\n    accumulator = ecma_copy_value (args_p[1]);\n  }\n  else\n  {\n    /* 8.a */\n    bool k_present = false;\n\n    /* 8.b */\n    while (!k_present && index < len)\n    {\n      /* 8.b.i */\n      k_present = true;\n\n      /* 8.b.ii-iii */\n      ecma_value_t current_value = ecma_op_object_find_by_index (obj_p, start_from_left ? index\n                                                                                                  : last_index - index);\n\n      if (ECMA_IS_VALUE_ERROR (current_value))\n      {\n        return current_value;\n      }\n\n      if (ecma_is_value_found (current_value))\n      {\n        accumulator = current_value;\n      }\n      else\n      {\n        k_present = false;\n      }\n\n      /* 8.b.iv */\n      index++;\n    }\n\n    /* 8.c */\n    if (!k_present)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Missing array element.\"));\n    }\n  }\n  /* 9. */\n  ecma_value_t current_index;\n\n  for (; index < len; index++)\n  {\n    const ecma_length_t corrected_index = start_from_left ? index : last_index - index;\n\n    /* 9.a - 9.b */\n    ecma_value_t current_value = ecma_op_object_find_by_index (obj_p, corrected_index);\n\n    if (ECMA_IS_VALUE_ERROR (current_value))\n    {\n      ecma_free_value (accumulator);\n      return current_value;\n    }\n\n    if (ecma_is_value_found (current_value))\n    {\n      /* 9.c.i, 9.c.ii */\n      current_index = ecma_make_length_value (corrected_index);\n      ecma_value_t call_args[] = {accumulator, current_value, current_index, ecma_make_object_value (obj_p)};\n\n      ecma_value_t call_value = ecma_op_function_call (func_object_p,\n                                                       ECMA_VALUE_UNDEFINED,\n                                                       call_args,\n                                                       4);\n      ecma_free_value (current_index);\n      ecma_free_value (accumulator);\n      ecma_free_value (current_value);\n\n      if (ECMA_IS_VALUE_ERROR (call_value))\n      {\n        return call_value;\n      }\n\n      accumulator = call_value;\n    }\n  }\n\n  return accumulator;\n} /* ecma_builtin_array_reduce_from */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * The Array.prototype object's 'fill' routine\n *\n * Note: this method only supports length up to uint32, instead of max_safe_integer\n *\n * See also:\n *          ECMA-262 v6, 22.1.3.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_fill (ecma_value_t value, /**< value */\n                                   ecma_value_t start_val, /**< start value */\n                                   ecma_value_t end_val, /**< end value */\n                                   ecma_object_t *obj_p, /**< object */\n                                   ecma_length_t len) /**< object's length */\n{\n  ecma_length_t k, final;\n\n  /* 5. 6. 7. */\n  if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (start_val,\n                                                                      len,\n                                                                      &k)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 8. */\n  if (ecma_is_value_undefined (end_val))\n  {\n    final = len;\n  }\n  else\n  {\n    /* 8 part 2, 9, 10 */\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (end_val,\n                                                                        len,\n                                                                        &final)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n    if (ext_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE\n        && ecma_op_ordinary_object_is_extensible (obj_p))\n    {\n      if (JERRY_UNLIKELY (obj_p->u1.property_list_cp == JMEM_CP_NULL))\n      {\n        ecma_ref_object (obj_p);\n        return ecma_make_object_value (obj_p);\n      }\n\n      ecma_value_t *buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, obj_p->u1.property_list_cp);\n\n      while (k < final)\n      {\n        ecma_free_value_if_not_object (buffer_p[k]);\n        buffer_p[k] = ecma_copy_value_if_not_object (value);\n        k++;\n      }\n\n      ecma_ref_object (obj_p);\n      return ecma_make_object_value (obj_p);\n    }\n  }\n\n  /* 11. */\n  while (k < final)\n  {\n    /* 11.a - 11.b */\n    ecma_value_t put_val = ecma_op_object_put_by_index (obj_p, k, value, true);\n\n    /* 11. c */\n    if (ECMA_IS_VALUE_ERROR (put_val))\n    {\n      return put_val;\n    }\n\n    /* 11.d */\n    k++;\n  }\n\n  ecma_ref_object (obj_p);\n  return ecma_make_object_value (obj_p);\n} /* ecma_builtin_array_prototype_fill */\n\n/**\n * The Array.prototype object's 'find' and 'findIndex' routine\n *\n * See also:\n *          ECMA-262 v6, 22.1.3.8\n *          ECMA-262 v6, 22.1.3.9\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_find (ecma_value_t predicate, /**< callback function */\n                                          ecma_value_t predicate_this_arg, /**< this argument for\n                                                                            *   invoke predicate */\n                                          bool is_find, /**< true - find routine\n                                                         *   false - findIndex routine */\n                                          ecma_object_t *obj_p, /**< object */\n                                          ecma_length_t len) /**< object's length */\n{\n  /* 5. */\n  if (!ecma_op_is_callable (predicate))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n  }\n\n  /* We already checked that predicate is callable, so it will always be an object. */\n  JERRY_ASSERT (ecma_is_value_object (predicate));\n  ecma_object_t *func_object_p = ecma_get_object_from_value (predicate);\n\n  /* 7 - 8. */\n  for (ecma_length_t index = 0; index < len; index++)\n  {\n    /* 8.a - 8.c */\n    ecma_value_t get_value = ecma_op_object_get_by_index (obj_p, index);\n\n    if (ECMA_IS_VALUE_ERROR (get_value))\n    {\n      return get_value;\n    }\n\n    /* 8.d - 8.e */\n    ecma_value_t current_index = ecma_make_length_value (index);\n\n    ecma_value_t call_args[] = { get_value, current_index, ecma_make_object_value (obj_p) };\n\n    ecma_value_t call_value = ecma_op_function_call (func_object_p, predicate_this_arg, call_args, 3);\n\n    if (ECMA_IS_VALUE_ERROR (call_value))\n    {\n      ecma_free_value (get_value);\n      return call_value;\n    }\n\n    bool call_value_to_bool = ecma_op_to_boolean (call_value);\n\n    ecma_free_value (call_value);\n\n    if (call_value_to_bool)\n    {\n      /* 8.f */\n      if (is_find)\n      {\n        ecma_free_value (current_index);\n        return get_value;\n      }\n\n      ecma_free_value (get_value);\n      return current_index;\n    }\n\n    ecma_free_value (get_value);\n    ecma_free_value (current_index);\n  }\n\n  /* 9. */\n  return is_find ? ECMA_VALUE_UNDEFINED : ecma_make_integer_value (-1);\n} /* ecma_builtin_array_prototype_object_find */\n\n/**\n * The Array.prototype object's 'copyWithin' routine\n *\n * See also:\n *          ECMA-262 v6, 22.1.3.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_copy_within (const ecma_value_t args[], /**< arguments list */\n                                                 uint32_t args_number, /**< number of arguments */\n                                                 ecma_object_t *obj_p, /**< object */\n                                                 ecma_length_t len) /**< object's length */\n{\n  if (args_number == 0)\n  {\n    return ecma_copy_value (ecma_make_object_value (obj_p));\n  }\n\n  /* 5 - 7 */\n  ecma_length_t target;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (args[0], len, &target)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_length_t start = 0;\n  ecma_length_t end = len;\n\n  if (args_number > 1)\n  {\n    /* 8 - 10 */\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (args[1], len, &start)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    if (args_number > 2)\n    {\n      /* 11 */\n      if (ecma_is_value_undefined (args[2]))\n      {\n        end = len;\n      }\n      else\n      {\n        /* 11 part 2, 12, 13 */\n        if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (args[2], len, &end)))\n        {\n          return ECMA_VALUE_ERROR;\n        }\n      }\n    }\n  }\n\n  ecma_length_t count = JERRY_MIN (end - start, len - target);\n  if (end <= start || len <= target) /* count <= 0 check, but variables are unsigned */\n  {\n    ecma_ref_object (obj_p);\n    return ecma_make_object_value (obj_p);\n  }\n\n  bool forward = true;\n\n  if (start < target && target < start + count)\n  {\n    start = start + count - 1;\n    target = target + count - 1;\n    forward = false;\n  }\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n    const uint32_t actual_length = ext_obj_p->u.array.length;\n\n    if (ext_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE\n        && ((forward && (target + count - 1 < actual_length)) || (!forward && (target < actual_length))))\n    {\n      if (obj_p->u1.property_list_cp != JMEM_CP_NULL)\n      {\n        ecma_value_t *buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, obj_p->u1.property_list_cp);\n\n        for (; count > 0; count--)\n        {\n          ecma_value_t copy_value = ecma_copy_value_if_not_object (buffer_p[start]);\n\n          ecma_free_value_if_not_object (buffer_p[target]);\n\n          buffer_p[target] = copy_value;\n\n          if (forward)\n          {\n            start++;\n            target++;\n          }\n          else\n          {\n            start--;\n            target--;\n          }\n        }\n      }\n\n      ecma_ref_object (obj_p);\n      return ecma_make_object_value (obj_p);\n    }\n  }\n\n  while (count > 0)\n  {\n    ecma_value_t get_value = ecma_op_object_find_by_index (obj_p, start);\n\n    if (ECMA_IS_VALUE_ERROR (get_value))\n    {\n      return get_value;\n    }\n\n    ecma_value_t op_value;\n\n    if (ecma_is_value_found (get_value))\n    {\n      op_value = ecma_op_object_put_by_index (obj_p, target, get_value, true);\n    }\n    else\n    {\n      op_value = ecma_op_object_delete_by_index (obj_p, target, true);\n    }\n\n    ecma_free_value (get_value);\n\n    if (ECMA_IS_VALUE_ERROR (op_value))\n    {\n      return op_value;\n    }\n\n    ecma_free_value (op_value);\n\n    if (forward)\n    {\n      start++;\n      target++;\n    }\n    else\n    {\n      start--;\n      target--;\n    }\n\n    count--;\n  }\n\n  return ecma_copy_value (ecma_make_object_value (obj_p));\n} /* ecma_builtin_array_prototype_object_copy_within */\n\n/**\n * The Array.prototype object's 'includes' routine\n *\n * See also:\n *          ECMA-262 v11, 22.1.3.13\n *\n * @return ECMA_VALUE_ERROR -if the operation fails\n *         ECMA_VALUE_{TRUE/FALSE} - depends on whether the search element is in the array or not\n */\nstatic ecma_value_t\necma_builtin_array_prototype_includes (const ecma_value_t args[], /**< arguments list */\n                                       uint32_t args_number, /**< number of arguments */\n                                       ecma_object_t *obj_p, /**< object */\n                                       ecma_length_t len) /**< object's length */\n{\n  /* 3. */\n  if (len == 0)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_length_t from_index = 0;\n\n  /* 4-7. */\n  if (args_number > 1)\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (args[1], len, &from_index)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  /* Fast array path */\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n    if (ext_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE)\n    {\n      if (obj_p->u1.property_list_cp != JMEM_CP_NULL)\n      {\n        len = JERRY_MIN (ext_obj_p->u.array.length, len);\n\n        ecma_value_t *buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, obj_p->u1.property_list_cp);\n\n        while (from_index < len)\n        {\n          if (ecma_op_same_value_zero (buffer_p[from_index], args[0], false))\n          {\n            return ECMA_VALUE_TRUE;\n          }\n\n          from_index++;\n        }\n      }\n\n      return ECMA_VALUE_FALSE;\n    }\n  }\n\n  /* 8. */\n  while (from_index < len)\n  {\n    ecma_value_t element = ecma_op_object_get_by_index (obj_p, from_index);\n\n    if (ECMA_IS_VALUE_ERROR (element))\n    {\n      return element;\n    }\n\n    if (ecma_op_same_value_zero (element, args[0], false))\n    {\n      ecma_free_value (element);\n      return ECMA_VALUE_TRUE;\n    }\n\n    ecma_free_value (element);\n    from_index++;\n  }\n\n  /* 9. */\n  return ECMA_VALUE_FALSE;\n} /* ecma_builtin_array_prototype_includes */\n\n/**\n * Abstract operation: FlattenIntoArray\n *\n * See also:\n *          ECMA-262 v10, 22.1.3.10.1\n *\n * @return  ECMA_VALUE_ERROR -if the operation fails\n *          ecma value which contains target_index\n */\nstatic ecma_value_t\necma_builtin_array_flatten_into_array (ecma_value_t target, /**< target will contains source's elements  */\n                                       ecma_object_t *source, /**< source object */\n                                       ecma_length_t source_len, /**< source object length */\n                                       ecma_length_t start, /**< remaining recursion depth */\n                                       ecma_number_t depth, /**< start index offset */\n                                       ecma_value_t mapped_value, /**< mapped value  */\n                                       ecma_value_t thisArg) /**< this arg */\n{\n  /* 7. */\n  ecma_length_t target_index = start;\n\n  /* 9. */\n  for (ecma_length_t source_index = 0; source_index < source_len; source_index++)\n  {\n    /* a. */\n    ecma_value_t element = ecma_op_object_find_by_index (source, source_index);\n\n    if (ECMA_IS_VALUE_ERROR (element))\n    {\n      return element;\n    }\n\n    if (!ecma_is_value_found (element))\n    {\n      continue;\n    }\n\n    /* b-c. */\n    if (!ecma_is_value_undefined (mapped_value))\n    {\n      /* i-ii. */\n      ecma_value_t source_val = ecma_make_length_value (source_index);\n      ecma_value_t args[] = {element, source_val, ecma_make_object_value (source)};\n      ecma_value_t temp_element = ecma_op_function_call (ecma_get_object_from_value (mapped_value), thisArg, args, 3);\n\n      ecma_free_value (element);\n      ecma_free_value (source_val);\n\n      if (ECMA_IS_VALUE_ERROR (temp_element))\n      {\n        return temp_element;\n      }\n\n      element = temp_element;\n    }\n\n    /* iv-v. */\n    if (depth > 0)\n    {\n      ecma_value_t is_array = ecma_is_value_array (element);\n\n      if (ECMA_IS_VALUE_ERROR (is_array))\n      {\n        ecma_free_value (element);\n        return is_array;\n      }\n\n      if (ecma_is_value_true (is_array))\n      {\n        ecma_object_t *element_obj = ecma_get_object_from_value (element);\n        ecma_length_t element_len;\n        ecma_value_t len_value = ecma_op_object_get_length (element_obj, &element_len);\n\n        if (ECMA_IS_VALUE_ERROR (len_value))\n        {\n          ecma_deref_object (element_obj);\n          return len_value;\n        }\n\n        ecma_value_t target_index_val = ecma_builtin_array_flatten_into_array (target,\n                                                                               element_obj,\n                                                                               element_len,\n                                                                               target_index,\n                                                                               depth - 1,\n                                                                               ECMA_VALUE_UNDEFINED,\n                                                                               ECMA_VALUE_UNDEFINED);\n\n        ecma_deref_object (element_obj);\n\n        if (ECMA_IS_VALUE_ERROR (target_index_val))\n        {\n          return target_index_val;\n        }\n\n        target_index = (ecma_length_t) ecma_get_number_from_value (target_index_val);\n        continue;\n      }\n    }\n\n    /* vi. */\n    const uint8_t flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n    ecma_value_t element_temp = ecma_builtin_helper_def_prop_by_index (ecma_get_object_from_value (target),\n                                                                       target_index,\n                                                                       element,\n                                                                       flags);\n\n    ecma_free_value (element);\n\n    if (ECMA_IS_VALUE_ERROR (element_temp))\n    {\n      return element_temp;\n    }\n\n    target_index++;\n  }\n  /* 10. */\n  return ecma_make_length_value (target_index);\n} /* ecma_builtin_array_flatten_into_array */\n\n/**\n * The Array.prototype object's 'flat' routine\n *\n * See also:\n *          ECMA-262 v10, 22.1.3.10\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_flat (const ecma_value_t args[], /**< arguments list */\n                                          uint32_t args_number, /**< number of arguments */\n                                          ecma_object_t *obj_p, /**< array object */\n                                          ecma_length_t len) /**< array object's length */\n{\n  /* 3. */\n  ecma_number_t depth_num = 1;\n\n  /* 4. */\n  if (args_number > 0 && ECMA_IS_VALUE_ERROR (ecma_op_to_integer (args[0], &depth_num)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 5. */\n  ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, 0);\n\n  if (JERRY_UNLIKELY (new_array_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 6. */\n  ecma_value_t flatten_val = ecma_builtin_array_flatten_into_array (ecma_make_object_value (new_array_p),\n                                                                    obj_p,\n                                                                    len,\n                                                                    0,\n                                                                    depth_num,\n                                                                    ECMA_VALUE_UNDEFINED,\n                                                                    ECMA_VALUE_UNDEFINED);\n\n  if (ECMA_IS_VALUE_ERROR (flatten_val))\n  {\n    ecma_deref_object (new_array_p);\n    return flatten_val;\n  }\n\n  /* 7. */\n  return ecma_make_object_value (new_array_p);\n} /* ecma_builtin_array_prototype_object_flat */\n\n/**\n * The Array.prototype object's 'flatMap' routine\n *\n * See also:\n *          ECMA-262 v10, 22.1.3.11\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_prototype_object_flat_map (ecma_value_t callback, /**< callbackFn */\n                                              ecma_value_t this_arg, /**< thisArg */\n                                              ecma_object_t *obj_p, /**< array object */\n                                              ecma_length_t len) /**< array object's length */\n{\n  if (!ecma_op_is_callable (callback))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n  }\n\n  /* 4. */\n  ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, 0);\n\n  if (JERRY_UNLIKELY (new_array_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 5. */\n  ecma_value_t flatten_val = ecma_builtin_array_flatten_into_array (ecma_make_object_value (new_array_p),\n                                                                    obj_p,\n                                                                    len,\n                                                                    0,\n                                                                    1,\n                                                                    callback,\n                                                                    this_arg);\n  if (ECMA_IS_VALUE_ERROR (flatten_val))\n  {\n    ecma_deref_object (new_array_p);\n    return flatten_val;\n  }\n\n  /* 6. */\n  return ecma_make_object_value (new_array_p);\n} /* ecma_builtin_array_prototype_object_flat_map */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                               ecma_value_t this_arg, /**< 'this' argument value */\n                                               const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                       *   passed to routine */\n                                               uint32_t arguments_number) /**< length of arguments' list */\n{\n  ecma_value_t obj_this = ecma_op_to_object (this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (obj_this))\n  {\n    return obj_this;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_this);\n\n  if (JERRY_UNLIKELY (builtin_routine_id <= ECMA_ARRAY_PROTOTYPE_CONCAT))\n  {\n    ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n#if !ENABLED (JERRY_ESNEXT)\n    if (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_TO_STRING)\n    {\n      ret_value = ecma_array_object_to_string (obj_this);\n    }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n    if (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_SORT)\n    {\n      ret_value = ecma_builtin_array_prototype_object_sort (this_arg,\n                                                            arguments_list_p[0],\n                                                            obj_p);\n\n    }\n    else if (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_CONCAT)\n    {\n      ret_value = ecma_builtin_array_prototype_object_concat (arguments_list_p,\n                                                              arguments_number,\n                                                              obj_p);\n    }\n\n    ecma_deref_object (obj_p);\n    return ret_value;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (builtin_routine_id >= ECMA_ARRAY_PROTOTYPE_ENTRIES\n                      && builtin_routine_id <= ECMA_ARRAY_PROTOTYPE_KEYS))\n  {\n    ecma_value_t ret_value;\n\n    if (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_ENTRIES)\n    {\n      ret_value = ecma_op_create_array_iterator (obj_p, ECMA_ITERATOR_ENTRIES);\n    }\n    else\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_KEYS);\n      ret_value = ecma_op_create_array_iterator (obj_p, ECMA_ITERATOR_KEYS);\n    }\n\n    ecma_deref_object (obj_p);\n    return ret_value;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_length_t length;\n  ecma_value_t len_value = ecma_op_object_get_length (obj_p, &length);\n\n  if (ECMA_IS_VALUE_ERROR (len_value))\n  {\n    ecma_deref_object (obj_p);\n    return len_value;\n  }\n\n  ecma_value_t ret_value;\n  ecma_value_t routine_arg_1 = arguments_list_p[0];\n  ecma_value_t routine_arg_2 = arguments_list_p[1];\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_ARRAY_PROTOTYPE_TO_LOCALE_STRING:\n    {\n      ret_value = ecma_builtin_array_prototype_object_to_locale_string (obj_p, length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_JOIN:\n    {\n      ret_value = ecma_builtin_array_prototype_join (routine_arg_1, obj_p, length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_POP:\n    {\n      ret_value = ecma_builtin_array_prototype_object_pop (obj_p, length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_PUSH:\n    {\n      ret_value = ecma_builtin_array_prototype_object_push (arguments_list_p,\n                                                            arguments_number,\n                                                            obj_p,\n                                                            length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_REVERSE:\n    {\n      ret_value = ecma_builtin_array_prototype_object_reverse (this_arg, obj_p, length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_SHIFT:\n    {\n      ret_value = ecma_builtin_array_prototype_object_shift (obj_p, length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_SLICE:\n    {\n      ret_value = ecma_builtin_array_prototype_object_slice (routine_arg_1,\n                                                             routine_arg_2,\n                                                             obj_p,\n                                                             length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_SPLICE:\n    {\n      ret_value = ecma_builtin_array_prototype_object_splice (arguments_list_p,\n                                                              arguments_number,\n                                                              obj_p,\n                                                              length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_UNSHIFT:\n    {\n      ret_value = ecma_builtin_array_prototype_object_unshift (arguments_list_p,\n                                                               arguments_number,\n                                                               obj_p,\n                                                               length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_INDEX_OF:\n    {\n      ret_value = ecma_builtin_array_prototype_object_index_of (arguments_list_p,\n                                                                arguments_number,\n                                                                obj_p,\n                                                                length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_LAST_INDEX_OF:\n    {\n      ret_value = ecma_builtin_array_prototype_object_last_index_of (arguments_list_p,\n                                                                     arguments_number,\n                                                                     obj_p,\n                                                                     length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_EVERY:\n    case ECMA_ARRAY_PROTOTYPE_SOME:\n    case ECMA_ARRAY_PROTOTYPE_FOR_EACH:\n    {\n      ret_value = ecma_builtin_array_apply (routine_arg_1,\n                                            routine_arg_2,\n                                            (array_routine_mode) builtin_routine_id - ECMA_ARRAY_PROTOTYPE_EVERY,\n                                            obj_p,\n                                            length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_MAP:\n    {\n      ret_value = ecma_builtin_array_prototype_object_map (routine_arg_1,\n                                                           routine_arg_2,\n                                                           obj_p,\n                                                           length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_REDUCE:\n    case ECMA_ARRAY_PROTOTYPE_REDUCE_RIGHT:\n    {\n      ret_value = ecma_builtin_array_reduce_from (arguments_list_p,\n                                                  arguments_number,\n                                                  builtin_routine_id == ECMA_ARRAY_PROTOTYPE_REDUCE,\n                                                  obj_p,\n                                                  length);\n      break;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_ARRAY_PROTOTYPE_COPY_WITHIN:\n    {\n      ret_value = ecma_builtin_array_prototype_object_copy_within (arguments_list_p,\n                                                                   arguments_number,\n                                                                   obj_p,\n                                                                   length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_FIND:\n    case ECMA_ARRAY_PROTOTYPE_FIND_INDEX:\n    {\n      ret_value = ecma_builtin_array_prototype_object_find (routine_arg_1,\n                                                            routine_arg_2,\n                                                            builtin_routine_id == ECMA_ARRAY_PROTOTYPE_FIND,\n                                                            obj_p,\n                                                            length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_FILL:\n    {\n      ret_value = ecma_builtin_array_prototype_fill (routine_arg_1,\n                                                     routine_arg_2,\n                                                     arguments_list_p[2],\n                                                     obj_p,\n                                                     length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_INCLUDES:\n    {\n      ret_value = ecma_builtin_array_prototype_includes (arguments_list_p,\n                                                         arguments_number,\n                                                         obj_p,\n                                                         length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_FLAT:\n    {\n      ret_value = ecma_builtin_array_prototype_object_flat (arguments_list_p,\n                                                            arguments_number,\n                                                            obj_p,\n                                                            length);\n      break;\n    }\n    case ECMA_ARRAY_PROTOTYPE_FLATMAP:\n    {\n      ret_value = ecma_builtin_array_prototype_object_flat_map (routine_arg_1,\n                                                                routine_arg_2,\n                                                                obj_p,\n                                                                length);\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_FILTER);\n\n      ret_value = ecma_builtin_array_prototype_object_filter (routine_arg_1,\n                                                              routine_arg_2,\n                                                              obj_p,\n                                                              length);\n      break;\n    }\n  }\n\n  ecma_free_value (len_value);\n  ecma_deref_object (obj_p);\n\n  return ret_value;\n} /* ecma_builtin_array_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Array.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ARRAY)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.4.4.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#if ENABLED (JERRY_ESNEXT)\n/* ECMA-262 v6, 22.1.3.31 */\nOBJECT_VALUE (LIT_GLOBAL_SYMBOL_UNSCOPABLES,\n              ECMA_BUILTIN_ID_ARRAY_PROTOTYPE_UNSCOPABLES,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Number properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.4.4 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FLAG_WRITABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_ARRAY_PROTOTYPE_TO_LOCALE_STRING, 0, 0)\n#if !ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_ARRAY_PROTOTYPE_TO_STRING, 0, 0)\n#endif /* !ENABLED (JERRY_ESNEXT) */\nROUTINE (LIT_MAGIC_STRING_CONCAT, ECMA_ARRAY_PROTOTYPE_CONCAT, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_JOIN, ECMA_ARRAY_PROTOTYPE_JOIN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_POP, ECMA_ARRAY_PROTOTYPE_POP, 0, 0)\nROUTINE (LIT_MAGIC_STRING_PUSH, ECMA_ARRAY_PROTOTYPE_PUSH, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_REVERSE, ECMA_ARRAY_PROTOTYPE_REVERSE, 0, 0)\nROUTINE (LIT_MAGIC_STRING_SHIFT, ECMA_ARRAY_PROTOTYPE_SHIFT, 0, 0)\nROUTINE (LIT_MAGIC_STRING_SLICE, ECMA_ARRAY_PROTOTYPE_SLICE, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SORT, ECMA_ARRAY_PROTOTYPE_SORT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SPLICE, ECMA_ARRAY_PROTOTYPE_SPLICE, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_UNSHIFT, ECMA_ARRAY_PROTOTYPE_UNSHIFT, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_INDEX_OF_UL, ECMA_ARRAY_PROTOTYPE_INDEX_OF, 2, 1)\nROUTINE (LIT_MAGIC_STRING_LAST_INDEX_OF_UL, ECMA_ARRAY_PROTOTYPE_LAST_INDEX_OF, NON_FIXED, 1)\n/* Note these 3 routines must be in this order */\nROUTINE (LIT_MAGIC_STRING_EVERY, ECMA_ARRAY_PROTOTYPE_EVERY, 2, 1)\nROUTINE (LIT_MAGIC_STRING_SOME, ECMA_ARRAY_PROTOTYPE_SOME, 2, 1)\nROUTINE (LIT_MAGIC_STRING_FOR_EACH_UL, ECMA_ARRAY_PROTOTYPE_FOR_EACH, 2, 1)\nROUTINE (LIT_MAGIC_STRING_MAP, ECMA_ARRAY_PROTOTYPE_MAP, 2, 1)\nROUTINE (LIT_MAGIC_STRING_FILTER, ECMA_ARRAY_PROTOTYPE_FILTER, 2, 1)\n/* Note these 2 routines must be in this order */\nROUTINE (LIT_MAGIC_STRING_REDUCE, ECMA_ARRAY_PROTOTYPE_REDUCE, 2, 1)\nROUTINE (LIT_MAGIC_STRING_REDUCE_RIGHT_UL, ECMA_ARRAY_PROTOTYPE_REDUCE_RIGHT, 2, 1)\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_FIND, ECMA_ARRAY_PROTOTYPE_FIND, 2, 1)\nROUTINE (LIT_MAGIC_STRING_FIND_INDEX, ECMA_ARRAY_PROTOTYPE_FIND_INDEX, 2, 1)\nROUTINE (LIT_MAGIC_STRING_FILL, ECMA_ARRAY_PROTOTYPE_FILL, 3, 1)\nROUTINE (LIT_MAGIC_STRING_COPY_WITHIN, ECMA_ARRAY_PROTOTYPE_COPY_WITHIN, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_ENTRIES, ECMA_ARRAY_PROTOTYPE_ENTRIES, 0, 0)\nROUTINE (LIT_MAGIC_STRING_KEYS, ECMA_ARRAY_PROTOTYPE_KEYS, 0, 0)\nROUTINE (LIT_MAGIC_STRING_INCLUDES, ECMA_ARRAY_PROTOTYPE_INCLUDES, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_FLAT, ECMA_ARRAY_PROTOTYPE_FLAT, 1, 0)\nROUTINE (LIT_MAGIC_STRING_FLATMAP, ECMA_ARRAY_PROTOTYPE_FLATMAP, 2, 1)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_TO_STRING_UL, LIT_MAGIC_STRING_TO_STRING_UL,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_VALUES, LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_GLOBAL_SYMBOL_ITERATOR, LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-array-object.h\"\n#include \"jcontext.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_ARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_ARRAY_ROUTINE_START = 0,\n  ECMA_ARRAY_ROUTINE_IS_ARRAY,\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_ARRAY_ROUTINE_FROM,\n  ECMA_ARRAY_ROUTINE_OF,\n  ECMA_ARRAY_ROUTINE_SPECIES_GET\n#endif /* ENABLED (JERRY_ESNEXT) */\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup array ECMA Array object built-in\n * @{\n */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * The Array object's 'from' routine\n *\n * See also:\n *          ECMA-262 v6, 22.1.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_object_from (ecma_value_t this_arg, /**< 'this' argument */\n                                const ecma_value_t *arguments_list_p, /**< arguments list */\n                                uint32_t arguments_list_len) /**< number of arguments */\n{\n  /* 1. */\n  ecma_value_t constructor = this_arg;\n  ecma_value_t call_this_arg = ECMA_VALUE_UNDEFINED;\n  ecma_value_t items = arguments_list_p[0];\n  ecma_value_t mapfn = (arguments_list_len > 1) ? arguments_list_p[1] : ECMA_VALUE_UNDEFINED;\n\n  /* 2. */\n  ecma_object_t *mapfn_obj_p = NULL;\n\n  /* 3. */\n  if (!ecma_is_value_undefined (mapfn))\n  {\n    /* 3.a */\n    if (!ecma_op_is_callable (mapfn))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n    }\n\n    /* 3.b */\n    if (arguments_list_len > 2)\n    {\n      call_this_arg = arguments_list_p[2];\n    }\n\n    /* 3.c */\n    mapfn_obj_p = ecma_get_object_from_value (mapfn);\n  }\n\n  /* 4. */\n  ecma_value_t using_iterator = ecma_op_get_method_by_symbol_id (items, LIT_GLOBAL_SYMBOL_ITERATOR);\n\n  /* 5. */\n  if (ECMA_IS_VALUE_ERROR (using_iterator))\n  {\n    return using_iterator;\n  }\n\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n\n  /* 6. */\n  if (!ecma_is_value_undefined (using_iterator))\n  {\n    ecma_object_t *array_obj_p;\n\n    /* 6.a */\n    if (ecma_is_constructor (constructor))\n    {\n      ecma_object_t *constructor_obj_p = ecma_get_object_from_value (constructor);\n\n      ecma_value_t array = ecma_op_function_construct (constructor_obj_p, constructor_obj_p, NULL, 0);\n\n      if (ecma_is_value_undefined (array) || ecma_is_value_null (array))\n      {\n        ecma_free_value (using_iterator);\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot convert undefined or null to object\"));\n      }\n\n      /* 6.c */\n      if (ECMA_IS_VALUE_ERROR (array))\n      {\n        ecma_free_value (using_iterator);\n        return array;\n      }\n\n      array_obj_p = ecma_get_object_from_value (array);\n    }\n    else\n    {\n      /* 6.b */\n      array_obj_p = ecma_op_new_array_object (0);\n    }\n\n    /* 6.d */\n    ecma_value_t next_method;\n    ecma_value_t iterator = ecma_op_get_iterator (items, using_iterator, &next_method);\n    ecma_free_value (using_iterator);\n\n    /* 6.e */\n    if (ECMA_IS_VALUE_ERROR (iterator))\n    {\n      ecma_deref_object (array_obj_p);\n      return iterator;\n    }\n\n    /* 6.f */\n    uint32_t k = 0;\n\n    /* 6.g */\n    while (true)\n    {\n      /* 6.g.ii */\n      ecma_value_t next = ecma_op_iterator_step (iterator, next_method);\n\n      /* 6.g.iii */\n      if (ECMA_IS_VALUE_ERROR (next))\n      {\n        goto iterator_cleanup;\n      }\n\n      /* 6.g.iii */\n      if (ecma_is_value_false (next))\n      {\n        /* 6.g.iv.1 */\n        ecma_value_t len_value = ecma_make_uint32_value (k);\n        ecma_value_t set_status = ecma_op_object_put (array_obj_p,\n                                                      ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),\n                                                      len_value,\n                                                      true);\n        ecma_free_value (len_value);\n\n        /* 6.g.iv.2 */\n        if (ECMA_IS_VALUE_ERROR (set_status))\n        {\n          goto iterator_cleanup;\n        }\n\n        ecma_free_value (iterator);\n        ecma_free_value (next_method);\n        /* 6.g.iv.3 */\n        return ecma_make_object_value (array_obj_p);\n      }\n\n      /* 6.g.v */\n      ecma_value_t next_value = ecma_op_iterator_value (next);\n\n      ecma_free_value (next);\n\n      /* 6.g.vi */\n      if (ECMA_IS_VALUE_ERROR (next_value))\n      {\n        goto iterator_cleanup;\n      }\n\n      ecma_value_t mapped_value;\n      /* 6.g.vii */\n      if (mapfn_obj_p != NULL)\n      {\n        /* 6.g.vii.1 */\n        ecma_value_t args_p[2] = { next_value, ecma_make_uint32_value (k) };\n        /* 6.g.vii.3 */\n        mapped_value = ecma_op_function_call (mapfn_obj_p, call_this_arg, args_p, 2);\n        ecma_free_value (args_p[1]);\n        ecma_free_value (next_value);\n\n        /* 6.g.vii.2 */\n        if (ECMA_IS_VALUE_ERROR (mapped_value))\n        {\n          ecma_op_iterator_close (iterator);\n          goto iterator_cleanup;\n        }\n      }\n      else\n      {\n        /* 6.g.viii */\n        mapped_value = next_value;\n      }\n\n      /* 6.g.ix */\n      const uint32_t flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n      ecma_value_t set_status = ecma_builtin_helper_def_prop_by_index (array_obj_p, k, mapped_value, flags);\n\n      ecma_free_value (mapped_value);\n\n      /* 6.g.x */\n      if (ECMA_IS_VALUE_ERROR (set_status))\n      {\n        ecma_op_iterator_close (iterator);\n        goto iterator_cleanup;\n      }\n\n      /* 6.g.xi */\n      k++;\n    }\n\niterator_cleanup:\n    ecma_free_value (iterator);\n    ecma_free_value (next_method);\n    ecma_deref_object (array_obj_p);\n\n    return ret_value;\n  }\n\n  /* 8. */\n  ecma_value_t array_like = ecma_op_to_object (items);\n\n  /* 9. */\n  if (ECMA_IS_VALUE_ERROR (array_like))\n  {\n    return array_like;\n  }\n\n  ecma_object_t *array_like_obj_p = ecma_get_object_from_value (array_like);\n\n  /* 10. */\n  ecma_length_t len;\n  ecma_value_t len_value = ecma_op_object_get_length (array_like_obj_p, &len);\n\n  /* 11. */\n  if (ECMA_IS_VALUE_ERROR (len_value))\n  {\n    goto cleanup;\n  }\n\n  /* 12. */\n  ecma_object_t *array_obj_p;\n\n  /* 12.a */\n  if (ecma_is_constructor (constructor))\n  {\n    ecma_object_t *constructor_obj_p = ecma_get_object_from_value (constructor);\n\n    len_value = ecma_make_length_value (len);\n    ecma_value_t array = ecma_op_function_construct (constructor_obj_p, constructor_obj_p, &len_value, 1);\n    ecma_free_value (len_value);\n\n    if (ecma_is_value_undefined (array) || ecma_is_value_null (array))\n    {\n      ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot convert undefined or null to object\"));\n      goto cleanup;\n    }\n\n    /* 14. */\n    if (ECMA_IS_VALUE_ERROR (array))\n    {\n      goto cleanup;\n    }\n\n    array_obj_p = ecma_get_object_from_value (array);\n  }\n  else\n  {\n    /* 13.a */\n    array_obj_p = ecma_op_new_array_object_from_length (len);\n\n    if (JERRY_UNLIKELY (array_obj_p == NULL))\n    {\n      goto cleanup;\n    }\n  }\n\n  /* 15. */\n  ecma_length_t k = 0;\n\n  /* 16. */\n  while (k < len)\n  {\n    /* 16.b */\n    ecma_value_t k_value = ecma_op_object_get_by_index (array_like_obj_p, k);\n\n    /* 16.c */\n    if (ECMA_IS_VALUE_ERROR (k_value))\n    {\n      goto construct_cleanup;\n    }\n\n    ecma_value_t mapped_value;\n    /* 16.d */\n    if (mapfn_obj_p != NULL)\n    {\n      /* 16.d.i */\n      ecma_value_t args_p[2] = { k_value, ecma_make_length_value (k) };\n      mapped_value = ecma_op_function_call (mapfn_obj_p, call_this_arg, args_p, 2);\n      ecma_free_value (args_p[1]);\n      ecma_free_value (k_value);\n\n      /* 16.d.ii */\n      if (ECMA_IS_VALUE_ERROR (mapped_value))\n      {\n        goto construct_cleanup;\n      }\n    }\n    else\n    {\n      /* 16.e */\n      mapped_value = k_value;\n    }\n\n    /* 16.f */\n    const uint32_t flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n    ecma_value_t set_status = ecma_builtin_helper_def_prop_by_index (array_obj_p, k, mapped_value, flags);\n\n    ecma_free_value (mapped_value);\n\n    /* 16.g */\n    if (ECMA_IS_VALUE_ERROR (set_status))\n    {\n      goto construct_cleanup;\n    }\n\n    /* 16.h */\n    k++;\n  }\n\n  /* 17. */\n  len_value = ecma_make_length_value (k);\n  ecma_value_t set_status = ecma_op_object_put (array_obj_p,\n                                                ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),\n                                                len_value,\n                                                true);\n  ecma_free_value (len_value);\n\n  /* 18. */\n  if (ECMA_IS_VALUE_ERROR (set_status))\n  {\n    goto construct_cleanup;\n  }\n\n  /* 19. */\n  ecma_deref_object (array_like_obj_p);\n  return ecma_make_object_value (array_obj_p);\n\nconstruct_cleanup:\n  ecma_deref_object (array_obj_p);\ncleanup:\n  ecma_deref_object (array_like_obj_p);\n  return ret_value;\n} /* ecma_builtin_array_object_from */\n\n/**\n * The Array object's 'of' routine\n *\n * See also:\n *          ECMA-262 v6, 22.1.2.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_array_object_of (ecma_value_t this_arg, /**< 'this' argument */\n                              const ecma_value_t *arguments_list_p, /**< arguments list */\n                              uint32_t arguments_list_len) /**< number of arguments */\n{\n  if (!ecma_is_constructor (this_arg))\n  {\n    return ecma_op_new_array_object_from_buffer (arguments_list_p, arguments_list_len);\n  }\n\n  ecma_value_t len = ecma_make_uint32_value (arguments_list_len);\n\n  ecma_value_t ret_val = ecma_op_function_construct (ecma_get_object_from_value (this_arg),\n                                                     ecma_get_object_from_value (this_arg),\n                                                     &len,\n                                                     1);\n\n  if (ECMA_IS_VALUE_ERROR (ret_val))\n  {\n    ecma_free_value (len);\n    return ret_val;\n  }\n\n  uint32_t k = 0;\n  ecma_object_t *obj_p = ecma_get_object_from_value (ret_val);\n  const uint32_t prop_status_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n\n  while (k < arguments_list_len)\n  {\n    ecma_value_t define_status = ecma_builtin_helper_def_prop_by_index (obj_p,\n                                                                        k,\n                                                                        arguments_list_p[k],\n                                                                        prop_status_flags);\n\n    if (ECMA_IS_VALUE_ERROR (define_status))\n    {\n      ecma_free_value (len);\n      ecma_deref_object (obj_p);\n      return define_status;\n    }\n\n    k++;\n  }\n\n  ret_val = ecma_op_object_put (obj_p,\n                                ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),\n                                len,\n                                true);\n\n  ecma_free_value (len);\n\n  if (ECMA_IS_VALUE_ERROR (ret_val))\n  {\n    ecma_deref_object (obj_p);\n    return ret_val;\n  }\n\n  return ecma_make_object_value (obj_p);\n} /* ecma_builtin_array_object_of */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Handle calling [[Call]] of built-in Array object\n *\n * @return ECMA_VALUE_ERROR - if the array construction fails\n *         constructed array object - otherwise\n */\necma_value_t\necma_builtin_array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                  uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  if (arguments_list_len != 1\n      || !ecma_is_value_number (arguments_list_p[0]))\n  {\n    return ecma_op_new_array_object_from_buffer (arguments_list_p, arguments_list_len);\n  }\n\n  ecma_number_t num = ecma_get_number_from_value (arguments_list_p[0]);\n  uint32_t num_uint32 = ecma_number_to_uint32 (num);\n\n  if (num != ((ecma_number_t) num_uint32))\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid array length.\"));\n  }\n\n  return ecma_make_object_value (ecma_op_new_array_object (num_uint32));\n} /* ecma_builtin_array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Array object\n *\n * @return ECMA_VALUE_ERROR - if the array construction fails\n *         constructed array object - otherwise\n */\necma_value_t\necma_builtin_array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                       uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n#if !ENABLED (JERRY_ESNEXT)\n  return ecma_builtin_array_dispatch_call (arguments_list_p, arguments_list_len);\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_ARRAY_PROTOTYPE);\n\n  if (proto_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_builtin_array_dispatch_call (arguments_list_p, arguments_list_len);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_deref_object (proto_p);\n    return result;\n  }\n\n  ecma_object_t *object_p = ecma_get_object_from_value (result);\n  ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, proto_p);\n  ecma_deref_object (proto_p);\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_array_dispatch_construct */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                     ecma_value_t this_arg, /**< 'this' argument value */\n                                     const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                             *   passed to routine */\n                                     uint32_t arguments_number) /**< length of arguments' list */\n{\n  switch (builtin_routine_id)\n  {\n    case ECMA_ARRAY_ROUTINE_IS_ARRAY:\n    {\n      JERRY_UNUSED (this_arg);\n\n      return arguments_number > 0 ? ecma_is_value_array (arguments_list_p[0]) : ECMA_VALUE_FALSE;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_ARRAY_ROUTINE_FROM:\n    {\n      return ecma_builtin_array_object_from (this_arg, arguments_list_p, arguments_number);\n    }\n    case ECMA_ARRAY_ROUTINE_OF:\n    {\n      return ecma_builtin_array_object_of (this_arg, arguments_list_p, arguments_number);\n    }\n    case ECMA_ARRAY_ROUTINE_SPECIES_GET:\n    {\n      return ecma_copy_value (this_arg);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_builtin_array_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Array description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ARRAY)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.4.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_ARRAY_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n/* Number properties:\n *  (property name, object pointer getter) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_ARRAY_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_IS_ARRAY_UL, ECMA_ARRAY_ROUTINE_IS_ARRAY, 1, 1)\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_FROM, ECMA_ARRAY_ROUTINE_FROM, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_OF, ECMA_ARRAY_ROUTINE_OF, NON_FIXED, 0)\n\n/* ECMA-262 v6, 22.1.2.5 */\nACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,\n                    ECMA_ARRAY_ROUTINE_SPECIES_GET,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* !(ENABLED (JERRY_BUILTIN_ARRAY)) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-arraybuffer-object.h\"\n#include \"jrt.h\"\n#include \"jrt-libc-includes.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-arraybuffer-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID arraybuffer_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup arraybufferprototype ECMA ArrayBuffer.prototype object built-in\n * @{\n */\n\n/**\n * The ArrayBuffer.prototype.bytelength accessor\n *\n * See also:\n *          ES2015, 24.1.4.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_arraybuffer_prototype_bytelength_getter (ecma_value_t this_arg) /**< this argument */\n{\n  if (ecma_is_value_object (this_arg))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (this_arg);\n\n    if (ecma_object_class_is (object_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL))\n    {\n      if (ecma_arraybuffer_is_detached (object_p))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n      }\n      uint32_t len = ecma_arraybuffer_get_length (object_p);\n\n      return ecma_make_uint32_value (len);\n    }\n  }\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not a ArrayBuffer object.\"));\n} /* ecma_builtin_arraybuffer_prototype_bytelength_getter */\n\n/**\n * The ArrayBuffer.prototype object's 'slice' routine\n *\n * See also:\n *          ECMA-262 v11, 24.1.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< this argument */\n                                                 const ecma_value_t *argument_list_p, /**< arguments list */\n                                                 uint32_t arguments_number) /**< number of arguments */\n{\n  if (!ecma_is_value_object (this_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not object.\"));\n  }\n\n  ecma_object_t *object_p = ecma_get_object_from_value (this_arg);\n\n  /* 2. */\n  if (!ecma_object_class_is (object_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an ArrayBuffer object.\"));\n  }\n\n  /* TODO: step 3. if SharedArrayBuffer will be implemented */\n\n  /* 4. */\n  if (ecma_arraybuffer_is_detached (object_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n  }\n\n  /* 5. */\n  uint32_t len = ecma_arraybuffer_get_length (object_p);\n\n  uint32_t start = 0;\n  uint32_t end = len;\n\n  if (arguments_number > 0)\n  {\n    /* 6-7. */\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (argument_list_p[0],\n                                                                         len,\n                                                                         &start)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    if (arguments_number > 1 && !ecma_is_value_undefined (argument_list_p[1]))\n    {\n      /* 8-9 .*/\n      if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (argument_list_p[1],\n                                                                           len,\n                                                                           &end)))\n      {\n        return ECMA_VALUE_ERROR;\n      }\n    }\n  }\n\n  /* 10. */\n  uint32_t new_len = (end >= start) ? (end - start) : 0;\n\n  /* 11. */\n  ecma_value_t ctor = ecma_op_species_constructor (object_p, ECMA_BUILTIN_ID_ARRAYBUFFER);\n\n  if (ECMA_IS_VALUE_ERROR (ctor))\n  {\n    return ctor;\n  }\n\n  /* 12. */\n  ecma_object_t *ctor_obj_p = ecma_get_object_from_value (ctor);\n  ecma_value_t new_len_value = ecma_make_uint32_value (new_len);\n\n  ecma_value_t new_arraybuffer = ecma_op_function_construct (ctor_obj_p, ctor_obj_p, &new_len_value, 1);\n\n  ecma_deref_object (ctor_obj_p);\n  ecma_free_value (new_len_value);\n\n  if (ECMA_IS_VALUE_ERROR (new_arraybuffer))\n  {\n    return new_arraybuffer;\n  }\n\n  ecma_object_t *new_arraybuffer_p = ecma_get_object_from_value (new_arraybuffer);\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  /* 13. */\n  if (!ecma_object_class_is (new_arraybuffer_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL))\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Return value is not an ArrayBuffer object.\"));\n    goto free_new_arraybuffer;\n  }\n\n  /* TODO: step 14. if SharedArrayBuffer will be implemented */\n\n  /* 15. */\n  if (ecma_arraybuffer_is_detached (new_arraybuffer_p))\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Return ArrayBuffer has been detached.\"));\n    goto free_new_arraybuffer;\n  }\n\n  /* 16. */\n  if (ecma_op_same_value (new_arraybuffer, this_arg))\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer subclass returned this from species constructor\"));\n    goto free_new_arraybuffer;\n  }\n\n  /* 17. */\n  if (ecma_arraybuffer_get_length (new_arraybuffer_p) < new_len)\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Derived ArrayBuffer constructor created a too small buffer.\"));\n    goto free_new_arraybuffer;\n  }\n\n  /* 19. */\n  if (ecma_arraybuffer_is_detached (object_p))\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Original ArrayBuffer has been detached.\"));\n    goto free_new_arraybuffer;\n  }\n\n  /* 20. */\n  lit_utf8_byte_t *old_buf = ecma_arraybuffer_get_buffer (object_p);\n\n  /* 21. */\n  lit_utf8_byte_t *new_buf = ecma_arraybuffer_get_buffer (new_arraybuffer_p);\n\n  /* 22. */\n  memcpy (new_buf, old_buf + start, new_len);\n\nfree_new_arraybuffer:\n  if (ret_value != ECMA_VALUE_EMPTY)\n  {\n    ecma_deref_object (new_arraybuffer_p);\n  }\n  else\n  {\n    /* 23. */\n    ret_value = ecma_make_object_value (new_arraybuffer_p);\n  }\n\n  return ret_value;\n} /* ecma_builtin_arraybuffer_prototype_object_slice */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * ArrayBuffer.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_ARRAYBUFFER,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* Readonly accessor properties */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_LENGTH_UL,\n                    ecma_builtin_arraybuffer_prototype_bytelength_getter,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 24.1.4.4 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_ARRAY_BUFFER_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_SLICE, ecma_builtin_arraybuffer_prototype_object_slice, NON_FIXED, 2)\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-arraybuffer-object.h\"\n#include \"ecma-dataview-object.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-arraybuffer.inc.h\"\n#define BUILTIN_UNDERSCORED_ID arraybuffer\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup arraybuffer ECMA ArrayBuffer object built-in\n * @{\n */\n\n/**\n * The ArrayBuffer object's 'isView' routine\n *\n * See also:\n *         ES2015 24.1.3.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_arraybuffer_object_is_view (ecma_value_t this_arg, /**< 'this' argument */\n                                         ecma_value_t arg) /**< argument 1 */\n{\n  JERRY_UNUSED (this_arg);\n\n  return ecma_make_boolean_value (ecma_is_typedarray (arg) || ecma_is_dataview (arg));\n} /* ecma_builtin_arraybuffer_object_is_view */\n\n/**\n * Handle calling [[Call]] of built-in ArrayBuffer object\n *\n * ES2015 24.1.2 ArrayBuffer is not intended to be called as\n * a function and will throw an exception when called in\n * that manner.\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_arraybuffer_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructor ArrayBuffer requires 'new'\"));\n} /* ecma_builtin_arraybuffer_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in ArrayBuffer object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_arraybuffer_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                             uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_op_create_arraybuffer_object (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_arraybuffer_dispatch_construct */\n\n/**\n * 24.1.3.3 get ArrayBuffer [ @@species ] accessor\n *\n * @return ecma_value\n *         returned value must be freed with ecma_free_value\n */\necma_value_t\necma_builtin_arraybuffer_species_get (ecma_value_t this_value) /**< This Value */\n{\n  return ecma_copy_value (this_value);\n} /* ecma_builtin_arraybuffer_species_get */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * ArrayBuffer built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_ARRAY_BUFFER_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\n\n/* ES2015 24.1.3.1 */\nROUTINE (LIT_MAGIC_STRING_IS_VIEW_UL, ecma_builtin_arraybuffer_object_is_view, 1, 1)\n\n/* ES2015 24.1.3.3 */\nACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,\n                    ecma_builtin_arraybuffer_species_get,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-function-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-async-function-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID async_function_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup asyncfunctionprototype ECMA AsyncFunction.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-function-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %AsyncFunctionPrototype% built-in description (AsyncFunction.prototype)\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* ECMA-262 v11, 25.7.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_ASYNC_FUNCTION,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v11, 25.7.3.2 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_ASYNC_FUNCTION_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-function.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n#include \"ecma-function-object.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-async-function.inc.h\"\n#define BUILTIN_UNDERSCORED_ID async_function\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup asyncfunction ECMA AsyncFunction object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in AsyncFunction object\n *\n * @return constructed async function object - if success\n *         raised error otherwise\n */\necma_value_t\necma_builtin_async_function_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                           uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_op_create_dynamic_function (arguments_list_p,\n                                          arguments_list_len,\n                                          ECMA_PARSE_ASYNC_FUNCTION);\n} /* ecma_builtin_async_function_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in AsyncFunction object\n *\n * @return constructed async function object - if success\n *        raised error otherwise\n */\necma_value_t\necma_builtin_async_function_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_async_function_dispatch_call (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_async_function_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-function.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %AsyncFunction% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* ECMA-262 v11, 25.7.2 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_ASYNC_FUNCTION_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v11, 25.7.2.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v10, 25.7.2.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_ASYNC_FUNCTION,\n              ECMA_PROPERTY_FIXED)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-function.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n#include \"ecma-function-object.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-async-generator-function.inc.h\"\n#define BUILTIN_UNDERSCORED_ID async_generator_function\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup asyncgenerator ECMA AsyncGeneratorFunction object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in AsyncGeneratorFunction object\n *\n * @return constructed async generator function object - if success\n *         raised error otherwise\n */\necma_value_t\necma_builtin_async_generator_function_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                     uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_op_create_dynamic_function (arguments_list_p,\n                                          arguments_list_len,\n                                          ECMA_PARSE_GENERATOR_FUNCTION | ECMA_PARSE_ASYNC_FUNCTION);\n} /* ecma_builtin_async_generator_function_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in AsyncGeneratorFunction object\n *\n * @return constructed async generator function object - if success\n *        raised error otherwise\n */\necma_value_t\necma_builtin_async_generator_function_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                          uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_async_generator_function_dispatch_call (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_async_generator_function_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-function.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %AsyncGeneratorFunction% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* ECMA-262 v10, 25.3.2 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_ASYNC_GENERATOR_FUNCTION_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v10, 25.3.2.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 25.3.2.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_ASYNC_GENERATOR,\n              ECMA_PROPERTY_FIXED)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-async-generator-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-promise-object.h\"\n#include \"jcontext.h\"\n#include \"opcodes.h\"\n#include \"vm-defines.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n  * This object has a custom dispatch function.\n  */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT,\n  ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_THROW,\n  ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_RETURN\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-async-generator-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID async_generator_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup asyncgenerator ECMA AsyncGenerator.prototype object built-in\n * @{\n */\n\n/**\n * Convert routine type to operation type..\n */\n#define ECMA_ASYNC_GENERATOR_ROUTINE_TO_OPERATION(type) \\\n  ((ecma_async_generator_operation_type_t) ((type) - ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT))\n\nJERRY_STATIC_ASSERT (ECMA_ASYNC_GENERATOR_ROUTINE_TO_OPERATION (ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT)\n                     == ECMA_ASYNC_GENERATOR_DO_NEXT,\n                     convert_ecma_async_generator_routine_next_to_ecma_async_generator_do_next_failed);\n\nJERRY_STATIC_ASSERT (ECMA_ASYNC_GENERATOR_ROUTINE_TO_OPERATION (ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_THROW)\n                     == ECMA_ASYNC_GENERATOR_DO_THROW,\n                     convert_ecma_async_generator_routine_throw_to_ecma_async_generator_do_throw_failed);\n\nJERRY_STATIC_ASSERT (ECMA_ASYNC_GENERATOR_ROUTINE_TO_OPERATION (ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_RETURN)\n                     == ECMA_ASYNC_GENERATOR_DO_RETURN,\n                     convert_ecma_async_generator_routine_return_to_ecma_async_generator_do_return_failed);\n\n/**\n  * Dispatcher of the Generator built-in's routines\n  *\n  * @return ecma value\n  *         Returned value must be freed with ecma_free_value.\n  */\necma_value_t\necma_builtin_async_generator_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine\n                                                                                      *   identifier */\n                                                         ecma_value_t this_arg, /**< 'this' argument value */\n                                                         const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                                 *   passed to\n                                                                                                 *   routine */\n                                                         uint32_t arguments_number) /**< length of arguments'\n                                                                                     *   list */\n{\n  JERRY_UNUSED (arguments_number);\n\n  vm_executable_object_t *executable_object_p = NULL;\n\n  if (ecma_is_value_object (this_arg))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (this_arg);\n\n    if (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_CLASS)\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      if (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_ASYNC_GENERATOR_UL)\n      {\n        executable_object_p = (vm_executable_object_t *) ext_object_p;\n      }\n    }\n  }\n\n  if (executable_object_p == NULL)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an async generator object.\"));\n  }\n\n  if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_COMPLETED)\n  {\n    ecma_value_t promise = ecma_make_object_value (ecma_builtin_get (ECMA_BUILTIN_ID_PROMISE));\n\n    if (JERRY_UNLIKELY (builtin_routine_id == ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_THROW))\n    {\n      return ecma_promise_reject_or_resolve (promise, arguments_list_p[0], false);\n    }\n\n    ecma_value_t iter_result = ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n    ecma_value_t result = ecma_promise_reject_or_resolve (promise, iter_result, true);\n    ecma_free_value (iter_result);\n    return result;\n  }\n\n  return ecma_async_generator_enqueue (executable_object_p,\n                                       ECMA_ASYNC_GENERATOR_ROUTINE_TO_OPERATION (builtin_routine_id),\n                                       arguments_list_p[0]);\n} /* ecma_builtin_async_generator_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * AsyncGenerator.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 25.3.1.5 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_ASYNC_GENERATOR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 25.2.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_ASYNC_GENERATOR,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_NEXT, ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_RETURN, ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_RETURN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_THROW, ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_THROW, 1, 1)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-async-generator.inc.h\"\n#define BUILTIN_UNDERSCORED_ID async_generator\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup asyncgenerator ECMA AsyncGenerator object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %AsyncGenerator% built-in description (AsyncGeneratorFunction.prototype)\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* ECMA-262 v6, 25.3.2.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_ASYNC_GENERATOR_FUNCTION,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 25.3.2.3.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_ASYNC_GENERATOR_PROTOTYPE,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 25.3.2.3.3 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_ASYNC_GENERATOR_FUNCTION_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-iterator-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-iterator-object.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-async-iterator-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID async_iterator_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup %asynciteratorprototype% ECMA %AsyncIteratorPrototype% object built-in\n * @{\n */\n\n/**\n * The %AsyncIteratorPrototype% object's '@@asyncIterator' routine\n *\n * See also:\n *          ECMA-262 v10, 25.1.3.1\n *\n * Note:\n *     Returned value must be freed with ecma_free_value.\n *\n * @return the given this value\n */\nstatic ecma_value_t\necma_builtin_async_iterator_prototype_object_async_iterator (ecma_value_t this_val) /**< this argument */\n{\n  /* 1. */\n  return ecma_copy_value (this_val);\n} /* ecma_builtin_async_iterator_prototype_object_async_iterator */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-async-iterator-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %AsyncIteratorPrototype% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_GLOBAL_SYMBOL_ASYNC_ITERATOR, ecma_builtin_async_iterator_prototype_object_async_iterator, 0, 0)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-bigint-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-bigint.h\"\n#include \"ecma-exceptions.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-bigint-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID bigint_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup bigint ECMA BigInt object built-in\n * @{\n */\n\n/**\n * The BigInt.prototype object's 'valueOf' routine\n *\n * See also:\n *          ECMA-262 v11, 20.2.3.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_bigint_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */\n{\n  if (ecma_is_value_bigint (this_arg))\n  {\n    return ecma_copy_value (this_arg);\n  }\n\n  if (ecma_is_value_object (this_arg))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (this_arg);\n\n    if (ecma_object_class_is (object_p, LIT_MAGIC_STRING_BIGINT_UL))\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      JERRY_ASSERT (ecma_is_value_bigint (ext_object_p->u.class_prop.u.value));\n\n      return ecma_copy_value (ext_object_p->u.class_prop.u.value);\n    }\n  }\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"BigInt value expected.\"));\n} /* ecma_builtin_bigint_prototype_object_value_of */\n\n/**\n * The BigInt.prototype object's 'toString' routine\n *\n * See also:\n *          ECMA-262 v11, 20.2.3.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_bigint_prototype_object_to_string (ecma_value_t this_arg, /**< this argument */\n                                                const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                uint32_t arguments_list_len) /**< number of arguments */\n{\n  ecma_value_t bigint = ecma_builtin_bigint_prototype_object_value_of (this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (bigint))\n  {\n    return bigint;\n  }\n\n  uint32_t radix = 10;\n\n  if (arguments_list_len > 0 && !ecma_is_value_undefined (arguments_list_p[0]))\n  {\n    ecma_number_t arg_num;\n\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (arguments_list_p[0], &arg_num)))\n    {\n      ecma_free_value (bigint);\n      return ECMA_VALUE_ERROR;\n    }\n\n    if (arg_num < 2 || arg_num > 36)\n    {\n      ecma_free_value (bigint);\n      return ecma_raise_range_error (ECMA_ERR_MSG (\"Radix must be between 2 and 36.\"));\n    }\n\n    radix = (uint32_t) arg_num;\n  }\n\n  ecma_string_t *string_p = ecma_bigint_to_string (bigint, radix);\n  ecma_free_value (bigint);\n\n  if (string_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  return ecma_make_string_value (string_p);\n} /* ecma_builtin_bigint_prototype_object_to_string */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-bigint-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * BigInt.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v11, 20.2.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_BIGINT,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v11, 20.2.3.5 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_BIGINT_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ecma_builtin_bigint_prototype_object_value_of, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_bigint_prototype_object_to_string, NON_FIXED, 0)\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-bigint.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-bigint.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-bigint.inc.h\"\n#define BUILTIN_UNDERSCORED_ID bigint\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup bigint ECMA BigInt object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in BigInt object\n *\n * See also:\n *          ECMA-262 v11, 20.2.1.1\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_bigint_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                   uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  ecma_value_t value = (arguments_list_len == 0) ? ECMA_VALUE_UNDEFINED : arguments_list_p[0];\n  return ecma_bigint_to_bigint (value, true);\n} /* ecma_builtin_bigint_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in BigInt object\n *\n * See also:\n *          ECMA-262 v11, 20.2.1\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_bigint_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"BigInt function is not a constructor.\"));\n} /* ecma_builtin_bigint_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-bigint.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * BigInt built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\n/* ECMA-262 v11, 20.2.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v11, 20.2.1 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_BIGINT_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v11, 20.2.2.3 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_BIGINT_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_BOOLEAN_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_BOOLEAN_PROTOTYPE_ROUTINE_TO_STRING,\n  ECMA_BOOLEAN_PROTOTYPE_ROUTINE_VALUE_OF\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-boolean-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID boolean_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup booleanprototype ECMA Boolean.prototype object built-in\n * @{\n */\n\n/**\n * The Boolean.prototype object's 'valueOf' routine\n *\n * See also:\n *          ECMA-262 v5, 15.6.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_boolean_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */\n{\n  if (ecma_is_value_boolean (this_arg))\n  {\n    return this_arg;\n  }\n  else if (ecma_is_value_object (this_arg))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (this_arg);\n\n    if (ecma_object_class_is (object_p, LIT_MAGIC_STRING_BOOLEAN_UL))\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      JERRY_ASSERT (ecma_is_value_boolean (ext_object_p->u.class_prop.u.value));\n\n      return ext_object_p->u.class_prop.u.value;\n    }\n  }\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not a Boolean object.\"));\n} /* ecma_builtin_boolean_prototype_object_value_of */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_boolean_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine\n                                                                              *   identifier */\n                                                 ecma_value_t this_arg, /**< 'this' argument value */\n                                                 const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                         *   passed to routine */\n                                                 uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (arguments_number);\n  JERRY_UNUSED (arguments_list_p);\n\n  ecma_value_t value_of_ret = ecma_builtin_boolean_prototype_object_value_of (this_arg);\n  if (builtin_routine_id == ECMA_BOOLEAN_PROTOTYPE_ROUTINE_VALUE_OF)\n  {\n    return value_of_ret;\n  }\n\n  JERRY_ASSERT (builtin_routine_id == ECMA_BOOLEAN_PROTOTYPE_ROUTINE_TO_STRING);\n\n  if (ECMA_IS_VALUE_ERROR (value_of_ret))\n  {\n    return value_of_ret;\n  }\n\n  if (ecma_is_value_true (value_of_ret))\n  {\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING_TRUE);\n  }\n\n  JERRY_ASSERT (ecma_is_value_false (value_of_ret));\n\n  return ecma_make_magic_string_value (LIT_MAGIC_STRING_FALSE);\n} /* ecma_builtin_boolean_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Boolean.prototype description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.6.4.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_BOOLEAN,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_BOOLEAN_PROTOTYPE_ROUTINE_TO_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL,  ECMA_BOOLEAN_PROTOTYPE_ROUTINE_VALUE_OF,  0, 0)\n\n#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-boolean.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-boolean-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-boolean.inc.h\"\n#define BUILTIN_UNDERSCORED_ID boolean\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup boolean ECMA Boolean object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in Boolean object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_boolean_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                    uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  ecma_value_t arg_value;\n\n  if (arguments_list_len == 0)\n  {\n    arg_value = ECMA_VALUE_UNDEFINED;\n  }\n  else\n  {\n    arg_value = arguments_list_p[0];\n  }\n\n  return ecma_make_boolean_value (ecma_op_to_boolean (arg_value));\n} /* ecma_builtin_boolean_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Boolean object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_boolean_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  if (arguments_list_len == 0)\n  {\n    return ecma_op_create_boolean_object (ECMA_VALUE_FALSE);\n  }\n  else\n  {\n    return ecma_op_create_boolean_object (arguments_list_p[0]);\n  }\n} /* ecma_builtin_boolean_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-boolean.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Boolean description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.6.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n/* Number properties:\n *  (property name, object pointer getter) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_BOOLEAN_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-arraybuffer-object.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-dataview-object.h\"\n#include \"ecma-gc.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n\n#if !ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#error \"DataView builtin requires ES2015 TypedArray builtin\"\n#endif /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_DATAVIEW_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_DATAVIEW_PROTOTYPE_BUFFER_GETTER,\n  ECMA_DATAVIEW_PROTOTYPE_BYTE_LENGTH_GETTER,\n  ECMA_DATAVIEW_PROTOTYPE_BYTE_OFFSET_GETTER,\n  ECMA_DATAVIEW_PROTOTYPE_GET_INT8,\n  ECMA_DATAVIEW_PROTOTYPE_GET_UINT8,\n  ECMA_DATAVIEW_PROTOTYPE_GET_UINT8_CLAMPED, /* unused value */\n  ECMA_DATAVIEW_PROTOTYPE_GET_INT16,\n  ECMA_DATAVIEW_PROTOTYPE_GET_UINT16,\n  ECMA_DATAVIEW_PROTOTYPE_GET_INT32,\n  ECMA_DATAVIEW_PROTOTYPE_GET_UINT32,\n  ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT32,\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT64,\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  ECMA_DATAVIEW_PROTOTYPE_GET_BIGINT64,\n  ECMA_DATAVIEW_PROTOTYPE_GET_BIGUINT64,\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  ECMA_DATAVIEW_PROTOTYPE_SET_INT8,\n  ECMA_DATAVIEW_PROTOTYPE_SET_UINT8,\n  ECMA_DATAVIEW_PROTOTYPE_SET_UINT8_CLAMPED, /* unused value */\n  ECMA_DATAVIEW_PROTOTYPE_SET_INT16,\n  ECMA_DATAVIEW_PROTOTYPE_SET_UINT16,\n  ECMA_DATAVIEW_PROTOTYPE_SET_INT32,\n  ECMA_DATAVIEW_PROTOTYPE_SET_UINT32,\n  ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT32,\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT64,\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  ECMA_DATAVIEW_PROTOTYPE_SET_BIGINT64,\n  ECMA_DATAVIEW_PROTOTYPE_SET_BIGUINT64,\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-dataview-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID dataview_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup dataviewprototype ECMA DataView.prototype object built-in\n * @{\n */\n\n/**\n * The DataView.prototype object's {buffer, byteOffset, byteLength} getters\n *\n * See also:\n *          ECMA-262 v6, 24.2.4.1\n *          ECMA-262 v6, 24.2.4.2\n *          ECMA-262 v6, 24.2.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_dataview_prototype_object_getters (ecma_value_t this_arg, /**< this argument */\n                                                uint16_t builtin_routine_id) /**< built-in wide routine identifier */\n{\n  ecma_dataview_object_t *obj_p = ecma_op_dataview_get_object (this_arg);\n\n  if (JERRY_UNLIKELY (obj_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_DATAVIEW_PROTOTYPE_BUFFER_GETTER:\n    {\n      ecma_object_t *buffer_p = obj_p->buffer_p;\n      ecma_ref_object (buffer_p);\n\n      return ecma_make_object_value (buffer_p);\n    }\n    case ECMA_DATAVIEW_PROTOTYPE_BYTE_LENGTH_GETTER:\n    {\n      if (ecma_arraybuffer_is_detached (obj_p->buffer_p))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n      }\n      return ecma_make_uint32_value (obj_p->header.u.class_prop.u.length);\n    }\n    default:\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_DATAVIEW_PROTOTYPE_BYTE_OFFSET_GETTER);\n\n      if (ecma_arraybuffer_is_detached (obj_p->buffer_p))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n      }\n      return ecma_make_uint32_value (obj_p->byte_offset);\n    }\n  }\n} /* ecma_builtin_dataview_prototype_object_getters */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_dataview_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                                  ecma_value_t this_arg, /**< 'this' argument value */\n                                                  const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                          *   passed to routine */\n                                                  uint32_t arguments_number) /**< length of arguments' list */\n{\n  ecma_value_t byte_offset = arguments_number > 0 ? arguments_list_p[0] : ECMA_VALUE_UNDEFINED;\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_DATAVIEW_PROTOTYPE_BUFFER_GETTER:\n    case ECMA_DATAVIEW_PROTOTYPE_BYTE_LENGTH_GETTER:\n    case ECMA_DATAVIEW_PROTOTYPE_BYTE_OFFSET_GETTER:\n    {\n      return ecma_builtin_dataview_prototype_object_getters (this_arg, builtin_routine_id);\n    }\n    case ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT32:\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n    case ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT64:\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n    case ECMA_DATAVIEW_PROTOTYPE_GET_INT16:\n    case ECMA_DATAVIEW_PROTOTYPE_GET_INT32:\n    case ECMA_DATAVIEW_PROTOTYPE_GET_UINT16:\n    case ECMA_DATAVIEW_PROTOTYPE_GET_UINT32:\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    case ECMA_DATAVIEW_PROTOTYPE_GET_BIGINT64:\n    case ECMA_DATAVIEW_PROTOTYPE_GET_BIGUINT64:\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    {\n      ecma_value_t little_endian = arguments_number > 1 ? arguments_list_p[1] : ECMA_VALUE_FALSE;\n      ecma_typedarray_type_t id = (ecma_typedarray_type_t) (builtin_routine_id - ECMA_DATAVIEW_PROTOTYPE_GET_INT8);\n\n      return ecma_op_dataview_get_set_view_value (this_arg, byte_offset, little_endian, ECMA_VALUE_EMPTY, id);\n    }\n    case ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT32:\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n    case ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT64:\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n    case ECMA_DATAVIEW_PROTOTYPE_SET_INT16:\n    case ECMA_DATAVIEW_PROTOTYPE_SET_INT32:\n    case ECMA_DATAVIEW_PROTOTYPE_SET_UINT16:\n    case ECMA_DATAVIEW_PROTOTYPE_SET_UINT32:\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    case ECMA_DATAVIEW_PROTOTYPE_SET_BIGINT64:\n    case ECMA_DATAVIEW_PROTOTYPE_SET_BIGUINT64:\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    {\n      ecma_value_t value_to_set = arguments_number > 1 ? arguments_list_p[1] : ECMA_VALUE_UNDEFINED;\n      ecma_value_t little_endian = arguments_number > 2 ? arguments_list_p[2] : ECMA_VALUE_FALSE;\n      ecma_typedarray_type_t id = (ecma_typedarray_type_t) (builtin_routine_id - ECMA_DATAVIEW_PROTOTYPE_SET_INT8);\n\n      return ecma_op_dataview_get_set_view_value (this_arg, byte_offset, little_endian, value_to_set, id);\n    }\n    case ECMA_DATAVIEW_PROTOTYPE_GET_INT8:\n    case ECMA_DATAVIEW_PROTOTYPE_GET_UINT8:\n    {\n      ecma_typedarray_type_t id = (ecma_typedarray_type_t) (builtin_routine_id - ECMA_DATAVIEW_PROTOTYPE_GET_INT8);\n\n      return ecma_op_dataview_get_set_view_value (this_arg, byte_offset, ECMA_VALUE_FALSE, ECMA_VALUE_EMPTY, id);\n    }\n    default:\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_DATAVIEW_PROTOTYPE_SET_INT8\n                    || builtin_routine_id == ECMA_DATAVIEW_PROTOTYPE_SET_UINT8);\n      ecma_value_t value_to_set = arguments_number > 1 ? arguments_list_p[1] : ECMA_VALUE_UNDEFINED;\n      ecma_typedarray_type_t id = (ecma_typedarray_type_t) (builtin_routine_id - ECMA_DATAVIEW_PROTOTYPE_SET_INT8);\n\n      return ecma_op_dataview_get_set_view_value (this_arg, byte_offset, ECMA_VALUE_FALSE, value_to_set, id);\n    }\n  }\n} /* ecma_builtin_dataview_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * DataView.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 24.2.3 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_DATAVIEW,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v6, 23.2.4.21 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_DATAVIEW_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_GET_FLOAT_32_UL, ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT32, 2, 1)\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nROUTINE (LIT_MAGIC_STRING_GET_FLOAT_64_UL, ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT64, 2, 1)\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\nROUTINE (LIT_MAGIC_STRING_GET_INT8_UL, ECMA_DATAVIEW_PROTOTYPE_GET_INT8, 1, 1)\nROUTINE (LIT_MAGIC_STRING_GET_INT16_UL, ECMA_DATAVIEW_PROTOTYPE_GET_INT16, 2, 1)\nROUTINE (LIT_MAGIC_STRING_GET_INT32_UL, ECMA_DATAVIEW_PROTOTYPE_GET_INT32, 2, 1)\nROUTINE (LIT_MAGIC_STRING_GET_UINT8_UL, ECMA_DATAVIEW_PROTOTYPE_GET_UINT8, 2, 1)\nROUTINE (LIT_MAGIC_STRING_GET_UINT16_UL, ECMA_DATAVIEW_PROTOTYPE_GET_UINT16, 2, 1)\nROUTINE (LIT_MAGIC_STRING_GET_UINT32_UL, ECMA_DATAVIEW_PROTOTYPE_GET_UINT32, 2, 1)\nROUTINE (LIT_MAGIC_STRING_SET_FLOAT_32_UL, ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT32, 2, 2)\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nROUTINE (LIT_MAGIC_STRING_SET_FLOAT_64_UL, ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT64, 2, 2)\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\nROUTINE (LIT_MAGIC_STRING_SET_INT8_UL, ECMA_DATAVIEW_PROTOTYPE_SET_INT8, 1, 2)\nROUTINE (LIT_MAGIC_STRING_SET_INT16_UL, ECMA_DATAVIEW_PROTOTYPE_SET_INT16, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SET_INT32_UL, ECMA_DATAVIEW_PROTOTYPE_SET_INT32, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SET_UINT8_UL, ECMA_DATAVIEW_PROTOTYPE_SET_UINT8, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SET_UINT16_UL, ECMA_DATAVIEW_PROTOTYPE_SET_UINT16, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SET_UINT32_UL, ECMA_DATAVIEW_PROTOTYPE_SET_UINT32, 2, 2)\n#if ENABLED (JERRY_BUILTIN_BIGINT)\nROUTINE (LIT_MAGIC_STRING_GET_BIGINT64, ECMA_DATAVIEW_PROTOTYPE_GET_BIGINT64, 2, 1)\nROUTINE (LIT_MAGIC_STRING_GET_BIGUINT64, ECMA_DATAVIEW_PROTOTYPE_GET_BIGUINT64, 2, 1)\nROUTINE (LIT_MAGIC_STRING_SET_BIGINT64, ECMA_DATAVIEW_PROTOTYPE_SET_BIGINT64, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SET_BIGUINT64, ECMA_DATAVIEW_PROTOTYPE_SET_BIGUINT64, 2, 2)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/* ECMA-262 v6, 24.2.4.1 */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BUFFER,\n                    ECMA_DATAVIEW_PROTOTYPE_BUFFER_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 24.2.4.2 */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_LENGTH_UL,\n                    ECMA_DATAVIEW_PROTOTYPE_BYTE_LENGTH_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 24.2.4.3 */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_OFFSET_UL,\n                    ECMA_DATAVIEW_PROTOTYPE_BYTE_OFFSET_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-dataview-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-dataview.inc.h\"\n#define BUILTIN_UNDERSCORED_ID dataview\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup dataview ECMA DataView object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in DataView object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_dataview_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                     uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructor DataView requires 'new'.\"));\n} /* ecma_builtin_dataview_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in DataView object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_dataview_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                          uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_op_dataview_create (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_dataview_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * DataView built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\n/* ECMA-262 v6, 23.1.2 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 23.1 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_DATAVIEW_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 23.1.2.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_DATAVIEW_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATE)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * Checks whether the function uses UTC time zone.\n */\n#define BUILTIN_DATE_FUNCTION_IS_UTC(builtin_routine_id) \\\n  (((builtin_routine_id) - ECMA_DATE_PROTOTYPE_GET_FULL_YEAR) & 0x1)\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_DATE_PROTOTYPE_ROUTINE_START = 0,\n\n  ECMA_DATE_PROTOTYPE_GET_FULL_YEAR, /* ECMA-262 v5 15.9.5.10 */\n  ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR, /* ECMA-262 v5 15.9.5.11 */\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n  ECMA_DATE_PROTOTYPE_GET_YEAR, /* ECMA-262 v5, AnnexB.B.2.4 */\n  ECMA_DATE_PROTOTYPE_GET_UTC_YEAR, /* has no UTC variant */\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n  ECMA_DATE_PROTOTYPE_GET_MONTH, /* ECMA-262 v5 15.9.5.12 */\n  ECMA_DATE_PROTOTYPE_GET_UTC_MONTH, /* ECMA-262 v5 15.9.5.13 */\n  ECMA_DATE_PROTOTYPE_GET_DATE, /* ECMA-262 v5 15.9.5.14 */\n  ECMA_DATE_PROTOTYPE_GET_UTC_DATE, /* ECMA-262 v5 15.9.5.15 */\n  ECMA_DATE_PROTOTYPE_GET_DAY, /* ECMA-262 v5 15.9.5.16 */\n  ECMA_DATE_PROTOTYPE_GET_UTC_DAY, /* ECMA-262 v5 15.9.5.17 */\n  ECMA_DATE_PROTOTYPE_GET_HOURS, /* ECMA-262 v5 15.9.5.18 */\n  ECMA_DATE_PROTOTYPE_GET_UTC_HOURS, /* ECMA-262 v5 15.9.5.19 */\n  ECMA_DATE_PROTOTYPE_GET_MINUTES, /* ECMA-262 v5 15.9.5.20 */\n  ECMA_DATE_PROTOTYPE_GET_UTC_MINUTES, /* ECMA-262 v5 15.9.5.21 */\n  ECMA_DATE_PROTOTYPE_GET_SECONDS, /* ECMA-262 v5 15.9.5.22 */\n  ECMA_DATE_PROTOTYPE_GET_UTC_SECONDS, /* ECMA-262 v5 15.9.5.23 */\n  ECMA_DATE_PROTOTYPE_GET_MILLISECONDS, /* ECMA-262 v5 15.9.5.24 */\n  ECMA_DATE_PROTOTYPE_GET_UTC_MILLISECONDS, /* ECMA-262 v5 15.9.5.25 */\n  ECMA_DATE_PROTOTYPE_GET_TIMEZONE_OFFSET, /* has no local time zone variant */\n  ECMA_DATE_PROTOTYPE_GET_UTC_TIMEZONE_OFFSET, /* ECMA-262 v5 15.9.5.26 */\n\n  ECMA_DATE_PROTOTYPE_SET_FULL_YEAR, /* ECMA-262 v5, 15.9.5.40 */\n  ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR, /* ECMA-262 v5, 15.9.5.41 */\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n  ECMA_DATE_PROTOTYPE_SET_YEAR, /* ECMA-262 v5, ECMA-262 v5, AnnexB.B.2.5 */\n  ECMA_DATE_PROTOTYPE_SET_UTC_YEAR, /* has no UTC variant */\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n  ECMA_DATE_PROTOTYPE_SET_MONTH, /* ECMA-262 v5, 15.9.5.38 */\n  ECMA_DATE_PROTOTYPE_SET_UTC_MONTH, /* ECMA-262 v5, 15.9.5.39 */\n  ECMA_DATE_PROTOTYPE_SET_DATE, /* ECMA-262 v5, 15.9.5.36 */\n  ECMA_DATE_PROTOTYPE_SET_UTC_DATE, /* ECMA-262 v5, 15.9.5.37 */\n  ECMA_DATE_PROTOTYPE_SET_HOURS, /* ECMA-262 v5, 15.9.5.34 */\n  ECMA_DATE_PROTOTYPE_SET_UTC_HOURS, /* ECMA-262 v5, 15.9.5.35 */\n  ECMA_DATE_PROTOTYPE_SET_MINUTES, /* ECMA-262 v5, 15.9.5.32 */\n  ECMA_DATE_PROTOTYPE_SET_UTC_MINUTES, /* ECMA-262 v5, 15.9.5.33 */\n  ECMA_DATE_PROTOTYPE_SET_SECONDS, /* ECMA-262 v5, 15.9.5.30 */\n  ECMA_DATE_PROTOTYPE_SET_UTC_SECONDS, /* ECMA-262 v5, 15.9.5.31 */\n  ECMA_DATE_PROTOTYPE_SET_MILLISECONDS, /* ECMA-262 v5, 15.9.5.28 */\n  ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS, /* ECMA-262 v5, 15.9.5.29 */\n\n  ECMA_DATE_PROTOTYPE_TO_STRING, /* ECMA-262 v5, 15.9.5.2 */\n  ECMA_DATE_PROTOTYPE_TO_DATE_STRING, /* ECMA-262 v5, 15.9.5.3 */\n#if !ENABLED (JERRY_ESNEXT)\n  ECMA_DATE_PROTOTYPE_TO_UTC_STRING, /* ECMA-262 v5, 15.9.5.42 */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ECMA_DATE_PROTOTYPE_TO_TIME_STRING, /* ECMA-262 v5, 15.9.5.4 */\n  ECMA_DATE_PROTOTYPE_TO_ISO_STRING, /* ECMA-262 v5, 15.9.5.43 */\n\n  ECMA_DATE_PROTOTYPE_GET_TIME, /* ECMA-262 v5, 15.9.5.9 */\n  ECMA_DATE_PROTOTYPE_SET_TIME, /* ECMA-262 v5, 15.9.5.27 */\n  ECMA_DATE_PROTOTYPE_TO_JSON, /* ECMA-262 v5, 15.9.5.44 */\n\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_DATE_PROTOTYPE_TO_PRIMITIVE, /*  ECMA-262 v6 20.3.4.45 */\n#endif /* ENABLED (JERRY_ESNEXT) */\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-date-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID date_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup dateprototype ECMA Date.prototype object built-in\n * @{\n */\n\n/**\n * The Date.prototype object's 'toJSON' routine\n *\n * See also:\n *          ECMA-262 v5, 15.9.5.44\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_date_prototype_to_json (ecma_value_t this_arg) /**< this argument */\n{\n  /* 1. */\n  ecma_value_t obj = ecma_op_to_object (this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (obj))\n  {\n    return obj;\n  }\n\n  /* 2. */\n  ecma_value_t tv = ecma_op_to_primitive (obj, ECMA_PREFERRED_TYPE_NUMBER);\n\n  if (ECMA_IS_VALUE_ERROR (tv))\n  {\n    ecma_free_value (obj);\n    return tv;\n  }\n\n  /* 3. */\n  if (ecma_is_value_number (tv))\n  {\n    ecma_number_t num_value = ecma_get_number_from_value (tv);\n\n    ecma_free_value (tv);\n\n    if (ecma_number_is_nan (num_value) || ecma_number_is_infinity (num_value))\n    {\n      ecma_free_value (obj);\n      return ECMA_VALUE_NULL;\n    }\n  }\n  else\n  {\n    ecma_free_value (tv);\n  }\n\n  ecma_object_t *value_obj_p = ecma_get_object_from_value (obj);\n\n  /* 4. */\n  ecma_value_t ret_value = ecma_op_invoke_by_magic_id (obj, LIT_MAGIC_STRING_TO_ISO_STRING_UL, NULL, 0);\n\n  ecma_deref_object (value_obj_p);\n\n  return ret_value;\n} /* ecma_builtin_date_prototype_to_json */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * The Date.prototype object's toPrimitive routine\n *\n * See also:\n *          ECMA-262 v6, 20.3.4.45\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_date_prototype_to_primitive (ecma_value_t this_arg, /**< this argument */\n                                          ecma_value_t hint_arg) /**< {\"default\", \"number\", \"string\"} */\n{\n  if (ecma_is_value_object (this_arg) && ecma_is_value_string (hint_arg))\n  {\n    ecma_string_t *hint_str_p = ecma_get_string_from_value (hint_arg);\n\n    ecma_preferred_type_hint_t hint = ECMA_PREFERRED_TYPE_NO;\n\n    if (hint_str_p == ecma_get_magic_string (LIT_MAGIC_STRING_STRING)\n        || hint_str_p == ecma_get_magic_string (LIT_MAGIC_STRING_DEFAULT))\n    {\n      hint = ECMA_PREFERRED_TYPE_STRING;\n    }\n    else if (hint_str_p == ecma_get_magic_string (LIT_MAGIC_STRING_NUMBER))\n    {\n      hint = ECMA_PREFERRED_TYPE_NUMBER;\n    }\n\n    if (hint != ECMA_PREFERRED_TYPE_NO)\n    {\n      return ecma_op_general_object_ordinary_value (ecma_get_object_from_value (this_arg), hint);\n    }\n  }\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument type in toPrimitive.\"));\n} /* ecma_builtin_date_prototype_to_primitive */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Dispatch get date functions\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< built-in wide routine\n                                                                        *   identifier */\n                                          ecma_number_t date_num) /**< date converted to number */\n{\n  if (ecma_number_is_nan (date_num))\n  {\n    return ecma_make_nan_value ();\n  }\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_DATE_PROTOTYPE_GET_FULL_YEAR:\n    case ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR:\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n    case ECMA_DATE_PROTOTYPE_GET_YEAR:\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n    {\n      date_num = ecma_date_year_from_time (date_num);\n\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n      if (builtin_routine_id == ECMA_DATE_PROTOTYPE_GET_YEAR)\n      {\n        date_num -= 1900;\n      }\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n      break;\n    }\n    case ECMA_DATE_PROTOTYPE_GET_MONTH:\n    case ECMA_DATE_PROTOTYPE_GET_UTC_MONTH:\n    {\n      date_num = ecma_date_month_from_time (date_num);\n      break;\n    }\n    case ECMA_DATE_PROTOTYPE_GET_DATE:\n    case ECMA_DATE_PROTOTYPE_GET_UTC_DATE:\n    {\n      date_num = ecma_date_date_from_time (date_num);\n      break;\n    }\n    case ECMA_DATE_PROTOTYPE_GET_DAY:\n    case ECMA_DATE_PROTOTYPE_GET_UTC_DAY:\n    {\n      date_num = ecma_date_week_day (date_num);\n      break;\n    }\n    case ECMA_DATE_PROTOTYPE_GET_HOURS:\n    case ECMA_DATE_PROTOTYPE_GET_UTC_HOURS:\n    {\n      date_num = ecma_date_hour_from_time (date_num);\n      break;\n    }\n    case ECMA_DATE_PROTOTYPE_GET_MINUTES:\n    case ECMA_DATE_PROTOTYPE_GET_UTC_MINUTES:\n    {\n      date_num = ecma_date_min_from_time (date_num);\n      break;\n    }\n    case ECMA_DATE_PROTOTYPE_GET_SECONDS:\n    case ECMA_DATE_PROTOTYPE_GET_UTC_SECONDS:\n    {\n      date_num = ecma_date_sec_from_time (date_num);\n      break;\n    }\n    case ECMA_DATE_PROTOTYPE_GET_MILLISECONDS:\n    case ECMA_DATE_PROTOTYPE_GET_UTC_MILLISECONDS:\n    {\n      date_num = ecma_date_ms_from_time (date_num);\n      break;\n    }\n    default:\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_GET_UTC_TIMEZONE_OFFSET);\n\n      date_num = ecma_date_timezone_offset (date_num);\n      break;\n    }\n  }\n\n  return ecma_make_number_value (date_num);\n} /* ecma_builtin_date_prototype_dispatch_get */\n\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n\n/**\n * Returns true, if the built-in id sets a year.\n */\n#define ECMA_DATE_PROTOTYPE_IS_SET_YEAR_ROUTINE(builtin_routine_id) \\\n  ((builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_FULL_YEAR \\\n   || (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR \\\n   || (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_YEAR)\n\n#else /* !ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n/**\n * Returns true, if the built-in id sets a year.\n */\n#define ECMA_DATE_PROTOTYPE_IS_SET_YEAR_ROUTINE(builtin_routine_id) \\\n  ((builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_FULL_YEAR \\\n   || (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR)\n\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n/**\n * Dispatch set date functions\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< built-in wide routine\n                                                                        *   identifier */\n                                          ecma_extended_object_t *ext_object_p, /**< date extended object */\n                                          ecma_number_t date_num, /**< date converted to number */\n                                          const ecma_value_t arguments_list[], /**< list of arguments\n                                                                                *   passed to routine */\n                                          uint32_t arguments_number) /**< length of arguments' list */\n{\n  ecma_number_t converted_number[4];\n  uint32_t conversions = 0;\n\n  /* If the first argument is not specified, it is always converted to NaN. */\n  converted_number[0] = ecma_number_make_nan ();\n\n  switch (builtin_routine_id)\n  {\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n    case ECMA_DATE_PROTOTYPE_SET_YEAR:\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n    case ECMA_DATE_PROTOTYPE_SET_DATE:\n    case ECMA_DATE_PROTOTYPE_SET_UTC_DATE:\n    case ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS:\n    case ECMA_DATE_PROTOTYPE_SET_MILLISECONDS:\n    {\n      conversions = 1;\n      break;\n    }\n    case ECMA_DATE_PROTOTYPE_SET_MONTH:\n    case ECMA_DATE_PROTOTYPE_SET_UTC_MONTH:\n    case ECMA_DATE_PROTOTYPE_SET_UTC_SECONDS:\n    case ECMA_DATE_PROTOTYPE_SET_SECONDS:\n    {\n      conversions = 2;\n      break;\n    }\n    case ECMA_DATE_PROTOTYPE_SET_FULL_YEAR:\n    case ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR:\n    case ECMA_DATE_PROTOTYPE_SET_MINUTES:\n    case ECMA_DATE_PROTOTYPE_SET_UTC_MINUTES:\n    {\n      conversions = 3;\n      break;\n    }\n    default:\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_HOURS\n                    || builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_UTC_HOURS);\n\n      conversions = 4;\n      break;\n    }\n  }\n\n  if (conversions > arguments_number)\n  {\n    conversions = arguments_number;\n  }\n\n  for (uint32_t i = 0; i < conversions; i++)\n  {\n    ecma_value_t value = ecma_op_to_number (arguments_list[i], &converted_number[i]);\n\n    if (ECMA_IS_VALUE_ERROR (value))\n    {\n      return value;\n    }\n  }\n\n  ecma_number_t day_part;\n  ecma_number_t time_part;\n\n  if (builtin_routine_id <= ECMA_DATE_PROTOTYPE_SET_UTC_DATE)\n  {\n    if (ecma_number_is_nan (date_num))\n    {\n      if (ECMA_DATE_PROTOTYPE_IS_SET_YEAR_ROUTINE (builtin_routine_id))\n      {\n        date_num = ECMA_NUMBER_ZERO;\n      }\n      else\n      {\n        return ecma_make_number_value (date_num);\n      }\n    }\n\n    time_part = ecma_date_time_within_day (date_num);\n\n    ecma_number_t year = ecma_date_year_from_time (date_num);\n    ecma_number_t month = ecma_date_month_from_time (date_num);\n    ecma_number_t day = ecma_date_date_from_time (date_num);\n\n    switch (builtin_routine_id)\n    {\n      case ECMA_DATE_PROTOTYPE_SET_FULL_YEAR:\n      case ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR:\n      {\n        year = converted_number[0];\n        if (conversions >= 2)\n        {\n          month = converted_number[1];\n        }\n        if (conversions >= 3)\n        {\n          day = converted_number[2];\n        }\n        break;\n      }\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n      case ECMA_DATE_PROTOTYPE_SET_YEAR:\n      {\n        year = converted_number[0];\n        if (year >= 0 && year <= 99)\n        {\n          year += 1900;\n        }\n        break;\n      }\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n      case ECMA_DATE_PROTOTYPE_SET_MONTH:\n      case ECMA_DATE_PROTOTYPE_SET_UTC_MONTH:\n      {\n        month = converted_number[0];\n        if (conversions >= 2)\n        {\n          day = converted_number[1];\n        }\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_DATE\n                      || builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_UTC_DATE);\n\n        day = converted_number[0];\n        break;\n      }\n    }\n\n    day_part = ecma_date_make_day (year, month, day);\n\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n    if (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_YEAR)\n    {\n      builtin_routine_id = ECMA_DATE_PROTOTYPE_SET_UTC_YEAR;\n\n      if (ecma_number_is_nan (converted_number[0]))\n      {\n        day_part = 0;\n        time_part = converted_number[0];\n      }\n    }\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n  }\n  else\n  {\n    if (ecma_number_is_nan (date_num))\n    {\n      return ecma_make_number_value (date_num);\n    }\n\n    day_part = ecma_date_day (date_num);\n\n    ecma_number_t hour = ecma_date_hour_from_time (date_num);\n    ecma_number_t min = ecma_date_min_from_time (date_num);\n    ecma_number_t sec = ecma_date_sec_from_time (date_num);\n    ecma_number_t ms = ecma_date_ms_from_time (date_num);\n\n    switch (builtin_routine_id)\n    {\n      case ECMA_DATE_PROTOTYPE_SET_HOURS:\n      case ECMA_DATE_PROTOTYPE_SET_UTC_HOURS:\n      {\n        hour = converted_number[0];\n        if (conversions >= 2)\n        {\n          min = converted_number[1];\n        }\n        if (conversions >= 3)\n        {\n          sec = converted_number[2];\n        }\n        if (conversions >= 4)\n        {\n          ms = converted_number[3];\n        }\n        break;\n      }\n      case ECMA_DATE_PROTOTYPE_SET_MINUTES:\n      case ECMA_DATE_PROTOTYPE_SET_UTC_MINUTES:\n      {\n        min = converted_number[0];\n        if (conversions >= 2)\n        {\n          sec = converted_number[1];\n        }\n        if (conversions >= 3)\n        {\n          ms = converted_number[2];\n        }\n        break;\n      }\n      case ECMA_DATE_PROTOTYPE_SET_UTC_SECONDS:\n      case ECMA_DATE_PROTOTYPE_SET_SECONDS:\n      {\n        sec = converted_number[0];\n        if (conversions >= 2)\n        {\n          ms = converted_number[1];\n        }\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS\n                      || builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_MILLISECONDS);\n\n        ms = converted_number[0];\n        break;\n      }\n    }\n\n    time_part = ecma_date_make_time (hour, min, sec, ms);\n  }\n\n  bool is_utc = BUILTIN_DATE_FUNCTION_IS_UTC (builtin_routine_id);\n\n  ecma_number_t full_date = ecma_date_make_date (day_part, time_part);\n\n  if (!is_utc)\n  {\n    full_date = ecma_date_utc (full_date);\n  }\n\n  full_date = ecma_date_time_clip (full_date);\n\n  *ECMA_GET_INTERNAL_VALUE_POINTER (ecma_number_t, ext_object_p->u.class_prop.u.value) = full_date;\n\n  return ecma_make_number_value (full_date);\n} /* ecma_builtin_date_prototype_dispatch_set */\n\n#undef ECMA_DATE_PROTOTYPE_IS_SET_YEAR_ROUTINE\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_date_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine\n                                                                           *   identifier */\n                                              ecma_value_t this_arg, /**< 'this' argument value */\n                                              const ecma_value_t arguments_list[], /**< list of arguments\n                                                                                    *   passed to routine */\n                                              uint32_t arguments_number) /**< length of arguments' list */\n{\n  if (JERRY_UNLIKELY (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_JSON))\n  {\n    return ecma_builtin_date_prototype_to_json (this_arg);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_PRIMITIVE))\n  {\n    ecma_value_t argument = arguments_number > 0 ? arguments_list[0] : ECMA_VALUE_UNDEFINED;\n    return ecma_builtin_date_prototype_to_primitive (this_arg, argument);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (!ecma_is_value_object (this_arg)\n      || !ecma_object_class_is (ecma_get_object_from_value (this_arg), LIT_MAGIC_STRING_DATE_UL))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a Date object\"));\n  }\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) ecma_get_object_from_value (this_arg);\n  ecma_number_t *prim_value_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_number_t,\n                                                                 ext_object_p->u.class_prop.u.value);\n\n  if (builtin_routine_id == ECMA_DATE_PROTOTYPE_GET_TIME)\n  {\n    return ecma_make_number_value (*prim_value_p);\n  }\n\n  if (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_TIME)\n  {\n    ecma_number_t time_num;\n\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (arguments_list[0], &time_num)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    *prim_value_p = ecma_date_time_clip (time_num);\n\n    return ecma_make_number_value (time_num);\n  }\n\n  if (builtin_routine_id <= ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS)\n  {\n    ecma_number_t this_num = *prim_value_p;\n\n    if (!BUILTIN_DATE_FUNCTION_IS_UTC (builtin_routine_id))\n    {\n      this_num += ecma_date_local_time_zone_adjustment (this_num);\n    }\n\n    if (builtin_routine_id <= ECMA_DATE_PROTOTYPE_GET_UTC_TIMEZONE_OFFSET)\n    {\n      return ecma_builtin_date_prototype_dispatch_get (builtin_routine_id, this_num);\n    }\n\n    return ecma_builtin_date_prototype_dispatch_set (builtin_routine_id,\n                                                     ext_object_p,\n                                                     this_num,\n                                                     arguments_list,\n                                                     arguments_number);\n  }\n\n  if (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_ISO_STRING)\n  {\n    if (ecma_number_is_nan (*prim_value_p) || ecma_number_is_infinity (*prim_value_p))\n    {\n      return ecma_raise_range_error (ECMA_ERR_MSG (\"Date must be a finite number.\"));\n    }\n\n    return ecma_date_value_to_iso_string (*prim_value_p);\n  }\n\n  if (ecma_number_is_nan (*prim_value_p))\n  {\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING_INVALID_DATE_UL);\n  }\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_DATE_PROTOTYPE_TO_STRING:\n    {\n      return ecma_date_value_to_string (*prim_value_p);\n    }\n    case ECMA_DATE_PROTOTYPE_TO_DATE_STRING:\n    {\n      return ecma_date_value_to_date_string (*prim_value_p);\n    }\n#if !ENABLED (JERRY_ESNEXT)\n    case ECMA_DATE_PROTOTYPE_TO_UTC_STRING:\n    {\n      return ecma_date_value_to_utc_string (*prim_value_p);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_TIME_STRING);\n\n      return ecma_date_value_to_time_string (*prim_value_p);\n    }\n  }\n} /* ecma_builtin_date_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Date.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATE)\n\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_DATE,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_DATE_PROTOTYPE_TO_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_DATE_STRING_UL, ECMA_DATE_PROTOTYPE_TO_DATE_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_TIME_STRING_UL, ECMA_DATE_PROTOTYPE_TO_TIME_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_DATE_PROTOTYPE_TO_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_LOCALE_DATE_STRING_UL, ECMA_DATE_PROTOTYPE_TO_DATE_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_LOCALE_TIME_STRING_UL, ECMA_DATE_PROTOTYPE_TO_TIME_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_DATE_PROTOTYPE_GET_TIME, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_TIME_UL, ECMA_DATE_PROTOTYPE_GET_TIME, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_GET_FULL_YEAR, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_UTC_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_MONTH_UL, ECMA_DATE_PROTOTYPE_GET_MONTH, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_UTC_MONTH_UL, ECMA_DATE_PROTOTYPE_GET_UTC_MONTH, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_DATE_UL, ECMA_DATE_PROTOTYPE_GET_DATE, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_UTC_DATE_UL, ECMA_DATE_PROTOTYPE_GET_UTC_DATE, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_DAY_UL, ECMA_DATE_PROTOTYPE_GET_DAY, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_UTC_DAY_UL, ECMA_DATE_PROTOTYPE_GET_UTC_DAY, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_HOURS_UL, ECMA_DATE_PROTOTYPE_GET_HOURS, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_UTC_HOURS_UL, ECMA_DATE_PROTOTYPE_GET_UTC_HOURS, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_MINUTES_UL, ECMA_DATE_PROTOTYPE_GET_MINUTES, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_UTC_MINUTES_UL, ECMA_DATE_PROTOTYPE_GET_UTC_MINUTES, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_SECONDS_UL, ECMA_DATE_PROTOTYPE_GET_SECONDS, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_UTC_SECONDS_UL, ECMA_DATE_PROTOTYPE_GET_UTC_SECONDS, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_MILLISECONDS_UL, ECMA_DATE_PROTOTYPE_GET_MILLISECONDS, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_UTC_MILLISECONDS_UL, ECMA_DATE_PROTOTYPE_GET_UTC_MILLISECONDS, 0, 0)\nROUTINE (LIT_MAGIC_STRING_GET_TIMEZONE_OFFSET_UL, ECMA_DATE_PROTOTYPE_GET_UTC_TIMEZONE_OFFSET, 0, 0)\nROUTINE (LIT_MAGIC_STRING_SET_TIME_UL, ECMA_DATE_PROTOTYPE_SET_TIME, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SET_MILLISECONDS_UL, ECMA_DATE_PROTOTYPE_SET_MILLISECONDS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SET_UTC_MILLISECONDS_UL, ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SET_SECONDS_UL, ECMA_DATE_PROTOTYPE_SET_SECONDS, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SET_UTC_SECONDS_UL, ECMA_DATE_PROTOTYPE_SET_UTC_SECONDS, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SET_MINUTES_UL, ECMA_DATE_PROTOTYPE_SET_MINUTES, NON_FIXED, 3)\nROUTINE (LIT_MAGIC_STRING_SET_UTC_MINUTES_UL, ECMA_DATE_PROTOTYPE_SET_UTC_MINUTES, NON_FIXED, 3)\nROUTINE (LIT_MAGIC_STRING_SET_HOURS_UL, ECMA_DATE_PROTOTYPE_SET_HOURS, NON_FIXED, 4)\nROUTINE (LIT_MAGIC_STRING_SET_UTC_HOURS_UL, ECMA_DATE_PROTOTYPE_SET_UTC_HOURS, NON_FIXED, 4)\nROUTINE (LIT_MAGIC_STRING_SET_DATE_UL, ECMA_DATE_PROTOTYPE_SET_DATE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SET_UTC_DATE_UL, ECMA_DATE_PROTOTYPE_SET_UTC_DATE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SET_MONTH_UL, ECMA_DATE_PROTOTYPE_SET_MONTH, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SET_UTC_MONTH_UL, ECMA_DATE_PROTOTYPE_SET_UTC_MONTH, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SET_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_FULL_YEAR, NON_FIXED, 3)\nROUTINE (LIT_MAGIC_STRING_SET_UTC_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR, NON_FIXED, 3)\nROUTINE (LIT_MAGIC_STRING_TO_ISO_STRING_UL, ECMA_DATE_PROTOTYPE_TO_ISO_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_JSON_UL, ECMA_DATE_PROTOTYPE_TO_JSON, 1, 1)\n#if ENABLED (JERRY_ESNEXT)\nROUTINE_CONFIGURABLE_ONLY (LIT_GLOBAL_SYMBOL_TO_PRIMITIVE, ECMA_DATE_PROTOTYPE_TO_PRIMITIVE, 1, 1)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_TO_UTC_STRING_UL, LIT_MAGIC_STRING_TO_UTC_STRING_UL,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_TO_GMT_STRING_UL, LIT_MAGIC_STRING_TO_UTC_STRING_UL,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n#else /* !ENABLED (JERRY_ESNEXT) */\nROUTINE (LIT_MAGIC_STRING_TO_UTC_STRING_UL, ECMA_DATE_PROTOTYPE_TO_UTC_STRING, 0, 0)\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\nROUTINE (LIT_MAGIC_STRING_TO_GMT_STRING_UL, ECMA_DATE_PROTOTYPE_TO_UTC_STRING, 0, 0)\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n\nROUTINE (LIT_MAGIC_STRING_GET_YEAR_UL, ECMA_DATE_PROTOTYPE_GET_YEAR, 0, 0)\nROUTINE (LIT_MAGIC_STRING_SET_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_YEAR, 1, 1)\n\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-date.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"jcontext.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-alloc.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATE)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-date.inc.h\"\n#define BUILTIN_UNDERSCORED_ID date\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup date ECMA Date object built-in\n * @{\n */\n\n/**\n * Helper function to try to parse a part of a date string\n *\n * @return NaN if cannot read from string, ToNumber() otherwise\n */\nstatic ecma_number_t\necma_date_parse_date_chars (const lit_utf8_byte_t **str_p, /**< pointer to the cesu8 string */\n                            const lit_utf8_byte_t *str_end_p, /**< pointer to the end of the string */\n                            uint32_t num_of_chars, /**< number of characters to read and convert */\n                            uint32_t min, /**< minimum valid value */\n                            uint32_t max) /**< maximum valid value */\n{\n  JERRY_ASSERT (num_of_chars > 0);\n  const lit_utf8_byte_t *str_start_p = *str_p;\n\n  while (num_of_chars--)\n  {\n    if (*str_p >= str_end_p || !lit_char_is_decimal_digit (lit_cesu8_read_next (str_p)))\n    {\n      return ecma_number_make_nan ();\n    }\n  }\n\n  ecma_number_t parsed_number = ecma_utf8_string_to_number (str_start_p, (lit_utf8_size_t) (*str_p - str_start_p), 0);\n\n  if (parsed_number < min || parsed_number > max)\n  {\n    return ecma_number_make_nan ();\n  }\n\n  return parsed_number;\n} /* ecma_date_parse_date_chars */\n\n/**\n * Helper function to try to parse a special chracter (+,-,T,Z,:,.) in a date string\n *\n * @return true if the first character is same as the expected, false otherwise\n */\nstatic bool\necma_date_parse_special_char (const lit_utf8_byte_t **str_p, /**< pointer to the cesu8 string */\n                              const lit_utf8_byte_t *str_end_p, /**< pointer to the end of the string */\n                              const lit_utf8_byte_t expected_char) /**< expected character */\n{\n  if ((*str_p < str_end_p) && (**str_p == expected_char))\n  {\n    (*str_p)++;\n    return true;\n  }\n\n  return false;\n} /* ecma_date_parse_special_char */\n\n/**\n * Helper function to try to parse a 4-5-6 digit year with optional negative sign in a date string\n *\n * Date.prototype.toString() and Date.prototype.toUTCString() emits year\n * in this format and Date.parse() should parse this format too.\n *\n * @return the parsed year or NaN.\n */\nstatic ecma_number_t\necma_date_parse_year (const lit_utf8_byte_t **str_p, /**< pointer to the cesu8 string */\n                      const lit_utf8_byte_t *str_end_p) /**< pointer to the end of the string */\n{\n  bool is_year_sign_negative = ecma_date_parse_special_char (str_p, str_end_p, '-');\n  const lit_utf8_byte_t *str_start_p = *str_p;\n  int32_t parsed_year = 0;\n\n  while ((str_start_p - *str_p < 6) && (str_start_p < str_end_p) && lit_char_is_decimal_digit (*str_start_p))\n  {\n    parsed_year = 10 * parsed_year + *str_start_p - LIT_CHAR_0;\n    str_start_p++;\n  }\n\n  if (str_start_p - *str_p >=4)\n  {\n    *str_p = str_start_p;\n    if (is_year_sign_negative)\n    {\n      return -parsed_year;\n    }\n    return parsed_year;\n  }\n\n  return ecma_number_make_nan ();\n} /* ecma_date_parse_year */\n\n/**\n * Helper function to try to parse a day name in a date string\n * Valid day names: Sun, Mon, Tue, Wed, Thu, Fri, Sat\n * See also:\n *          ECMA-262 v9, 20.3.4.41.2 Table 46\n *\n * @return true if the string starts with a valid day name, false otherwise\n */\nstatic bool\necma_date_parse_day_name (const lit_utf8_byte_t **str_p, /**< pointer to the cesu8 string */\n                          const lit_utf8_byte_t *str_end_p) /**< pointer to the end of the string */\n{\n  if (*str_p + 3 < str_end_p)\n  {\n    for (uint32_t i = 0; i < 7; i++)\n    {\n      if (!memcmp (day_names_p[i], *str_p, 3))\n      {\n        (*str_p) += 3;\n        return true;\n      }\n    }\n  }\n  return false;\n} /* ecma_date_parse_day_name */\n\n/**\n * Helper function to try to parse a month name in a date string\n * Valid month names: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec\n * See also:\n *          ECMA-262 v9, 20.3.4.41.2 Table 47\n *\n * @return number of the month if the string starts with a valid month name, 0 otherwise\n */\nstatic uint32_t\necma_date_parse_month_name (const lit_utf8_byte_t **str_p, /**< pointer to the cesu8 string */\n                            const lit_utf8_byte_t *str_end_p) /**< pointer to the end of the string */\n{\n  if (*str_p + 3 < str_end_p)\n  {\n    for (uint32_t i = 0; i < 12; i++)\n    {\n      if (!memcmp (month_names_p[i], *str_p, 3))\n      {\n        (*str_p) += 3;\n        return (i+1);\n      }\n    }\n  }\n  return 0;\n} /* ecma_date_parse_month_name */\n\n/**\n  * Calculate MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli)) for Date constructor and UTC\n  *\n  * See also:\n  *          ECMA-262 v5, 15.9.3.1\n  *          ECMA-262 v5, 15.9.4.3\n  *\n  * @return result of MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))\n  */\nstatic ecma_value_t\necma_date_construct_helper (const ecma_value_t *args, /**< arguments passed to the Date constructor */\n                            uint32_t args_len) /**< number of arguments */\n{\n  ecma_number_t date_nums[7] =\n  {\n    ECMA_NUMBER_ZERO, /* year */\n    ECMA_NUMBER_ZERO, /* month */\n    ECMA_NUMBER_ONE, /* date */\n    ECMA_NUMBER_ZERO, /* hours */\n    ECMA_NUMBER_ZERO, /* minutes */\n    ECMA_NUMBER_ZERO, /* seconds */\n    ECMA_NUMBER_ZERO /* miliseconds */\n  };\n\n  args_len = JERRY_MIN (args_len, sizeof (date_nums) / sizeof (date_nums[0]));\n\n  /* 1-7. */\n  for (uint32_t i = 0; i < args_len; i++)\n  {\n    ecma_value_t status = ecma_op_to_number (args[i], date_nums + i);\n\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      return status;\n    }\n  }\n\n  ecma_number_t prim_value = ecma_number_make_nan ();\n\n  if (!ecma_number_is_nan (date_nums[0]))\n  {\n    /* 8. */\n    ecma_number_t y = ecma_number_trunc (date_nums[0]);\n\n    if (y >= 0 && y <= 99)\n    {\n      date_nums[0] = 1900 + y;\n    }\n  }\n\n  prim_value = ecma_date_make_date (ecma_date_make_day (date_nums[0],\n                                                        date_nums[1],\n                                                        date_nums[2]),\n                                    ecma_date_make_time (date_nums[3],\n                                                         date_nums[4],\n                                                         date_nums[5],\n                                                         date_nums[6]));\n\n  return ecma_make_number_value (prim_value);\n} /* ecma_date_construct_helper */\n\n/**\n * Helper function used by ecma_builtin_date_parse\n *\n * See also:\n *          ECMA-262 v5, 15.9.4.2  Date.parse (string)\n *          ECMA-262 v5, 15.9.1.15 Date Time String Format\n *\n * @return the parsed date as ecma_number_t or NaN otherwise\n */\nstatic ecma_number_t\necma_builtin_date_parse_ISO_string_format (const lit_utf8_byte_t *date_str_curr_p,\n                                           const lit_utf8_byte_t *date_str_end_p)\n{\n  /* 1. read year */\n\n  uint32_t year_digits = 4;\n\n  bool is_year_sign_negative = ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, '-');\n  if (is_year_sign_negative || ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, '+'))\n  {\n    year_digits = 6;\n  }\n\n  ecma_number_t year = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, year_digits,\n                                                   0, (year_digits == 4) ? 9999 : 999999);\n  if (is_year_sign_negative)\n  {\n    year = -year;\n  }\n\n  if (!ecma_number_is_nan (year))\n  {\n    ecma_number_t month = ECMA_NUMBER_ONE;\n    ecma_number_t day = ECMA_NUMBER_ONE;\n    ecma_number_t time = ECMA_NUMBER_ZERO;\n\n    /* 2. read month if any */\n    if (ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, '-'))\n    {\n      month = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 1, 12);\n    }\n\n    /* 3. read day if any */\n    if (ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, '-'))\n    {\n      day = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 1, 31);\n    }\n\n    bool is_utc = true;\n    /* 4. read time if any */\n    if (ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, 'T'))\n    {\n      ecma_number_t hours = ECMA_NUMBER_ZERO;\n      ecma_number_t minutes = ECMA_NUMBER_ZERO;\n      ecma_number_t seconds = ECMA_NUMBER_ZERO;\n      ecma_number_t milliseconds = ECMA_NUMBER_ZERO;\n\n      lit_utf8_size_t remaining_length = lit_utf8_string_length (date_str_curr_p,\n                                                                 (lit_utf8_size_t) (date_str_end_p - date_str_curr_p));\n\n      if (remaining_length >= 5)\n      {\n        /* 4.1 read hours and minutes */\n        hours = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 24);\n\n        if (ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ':'))\n        {\n          minutes = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 59);\n\n          /* 4.2 read seconds if any */\n          if (ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ':'))\n          {\n            seconds = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 59);\n\n            /* 4.3 read milliseconds if any */\n            if (ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, '.'))\n            {\n              milliseconds = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 3, 0, 999);\n            }\n          }\n        }\n        else\n        {\n          minutes = ecma_number_make_nan ();\n        }\n\n        if (hours == 24 && (minutes != 0 || seconds != 0 || milliseconds != 0))\n        {\n          hours = ecma_number_make_nan ();\n        }\n\n        time = ecma_date_make_time (hours, minutes, seconds, milliseconds);\n      }\n      else\n      {\n        time = ecma_number_make_nan ();\n      }\n\n      /* 4.4 read timezone if any */\n      if (ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, 'Z') && !ecma_number_is_nan (time))\n      {\n        time = ecma_date_make_time (hours, minutes, seconds, milliseconds);\n      }\n      else\n      {\n        bool is_timezone_sign_negative;\n        if ((lit_utf8_string_length (date_str_curr_p, (lit_utf8_size_t) (date_str_end_p - date_str_curr_p)) == 6)\n            && ((is_timezone_sign_negative = ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, '-'))\n            || ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, '+')))\n        {\n          /* read hours and minutes */\n          hours = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 24);\n\n          if (hours == 24)\n          {\n            hours = ECMA_NUMBER_ZERO;\n          }\n\n          ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ':');\n          minutes = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 59);\n          ecma_number_t timezone_offset = ecma_date_make_time (hours, minutes, ECMA_NUMBER_ZERO, ECMA_NUMBER_ZERO);\n          time += is_timezone_sign_negative ? timezone_offset : -timezone_offset;\n        }\n        else\n        {\n          is_utc = false;\n        }\n      }\n    }\n\n    if (date_str_curr_p >= date_str_end_p)\n    {\n      ecma_number_t date = ecma_date_make_day (year, month - 1, day);\n\n      ecma_number_t result_date = ecma_date_make_date (date, time);\n      if (!is_utc)\n      {\n        result_date = ecma_date_utc (result_date);\n      }\n\n      return result_date;\n    }\n  }\n  return ecma_number_make_nan ();\n} /* ecma_builtin_date_parse_ISO_string_format */\n\n/**\n * Helper function used by ecma_builtin_date_parse\n *\n * See also:\n *          ECMA-262 v5, 15.9.4.2  Date.parse (string)\n *          ECMA-262 v9, 20.3.4.41 Date.prototype.toString ()\n *          ECMA-262 v9, 20.3.4.43 Date.prototype.toUTCString ()\n *\n * Used by: ecma_builtin_date_parse\n *\n * @return the parsed date as ecma_number_t or NaN otherwise\n */\nstatic ecma_number_t\necma_builtin_date_parse_toString_formats (const lit_utf8_byte_t *date_str_curr_p,\n                                          const lit_utf8_byte_t *date_str_end_p)\n{\n  const ecma_number_t nan = ecma_number_make_nan ();\n\n  if (!ecma_date_parse_day_name (&date_str_curr_p, date_str_end_p))\n  {\n    return nan;\n  }\n\n  const bool is_toUTCString_format = ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ',');\n\n  if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ' '))\n  {\n    return nan;\n  }\n\n  ecma_number_t month = 0;\n  ecma_number_t day = 0;\n  if (is_toUTCString_format)\n  {\n    day = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 31);\n    if (ecma_number_is_nan (day))\n    {\n      return nan;\n    }\n\n    if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ' '))\n    {\n      return nan;\n    }\n\n    month = ecma_date_parse_month_name (&date_str_curr_p, date_str_end_p);\n    if (!(int) month)\n    {\n      return nan;\n    }\n  }\n  else\n  {\n    month = ecma_date_parse_month_name (&date_str_curr_p, date_str_end_p);\n    if (!(int) month)\n    {\n      return nan;\n    }\n\n    if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ' '))\n    {\n      return nan;\n    }\n\n    day = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 31);\n    if (ecma_number_is_nan (day))\n    {\n      return nan;\n    }\n  }\n\n  if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ' '))\n  {\n    return nan;\n  }\n\n  ecma_number_t year = ecma_date_parse_year (&date_str_curr_p, date_str_end_p);\n  if (ecma_number_is_nan (year))\n  {\n    return nan;\n  }\n\n  if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ' '))\n  {\n    return nan;\n  }\n\n  ecma_number_t hours = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 24);\n  if (ecma_number_is_nan (hours))\n  {\n    return nan;\n  }\n\n  if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ':'))\n  {\n    return nan;\n  }\n\n  ecma_number_t minutes = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 59);\n  if (ecma_number_is_nan (minutes))\n  {\n    return nan;\n  }\n\n  if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ':'))\n  {\n    return nan;\n  }\n\n  ecma_number_t seconds = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 59);\n  if (ecma_number_is_nan (seconds))\n  {\n    return nan;\n  }\n\n  if (hours == 24 && (minutes != 0 || seconds != 0))\n  {\n    return nan;\n  }\n\n  if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, ' '))\n  {\n    return nan;\n  }\n\n  if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, 'G'))\n  {\n    return nan;\n  }\n\n  if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, 'M'))\n  {\n    return nan;\n  }\n\n  if (!ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, 'T'))\n  {\n    return nan;\n  }\n\n  ecma_number_t time = ecma_date_make_time (hours, minutes, seconds, 0);\n\n  if (!is_toUTCString_format)\n  {\n    bool is_timezone_sign_negative = ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, '-');\n    if (!is_timezone_sign_negative && !ecma_date_parse_special_char (&date_str_curr_p, date_str_end_p, '+'))\n    {\n      return nan;\n    }\n\n    hours = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 24);\n    if (ecma_number_is_nan (hours))\n    {\n      return nan;\n    }\n    if (hours == 24)\n    {\n      hours = ECMA_NUMBER_ZERO;\n    }\n\n    minutes = ecma_date_parse_date_chars (&date_str_curr_p, date_str_end_p, 2, 0, 59);\n    if (ecma_number_is_nan (minutes))\n    {\n      return nan;\n    }\n\n    ecma_number_t timezone_offset = ecma_date_make_time (hours, minutes, ECMA_NUMBER_ZERO, ECMA_NUMBER_ZERO);\n    time += is_timezone_sign_negative ? timezone_offset : -timezone_offset;\n  }\n\n  if (date_str_curr_p >= date_str_end_p)\n  {\n    ecma_number_t date = ecma_date_make_day (year, month - 1, day);\n    return ecma_date_make_date (date, time);\n  }\n\n  return nan;\n} /* ecma_builtin_date_parse_toString_formats */\n\n/**\n * The Date object's 'parse' routine\n *\n * See also:\n *          ECMA-262 v5, 15.9.4.2  Date.parse (string)\n *          ECMA-262 v5, 15.9.1.15 Date Time String Format\n *          ECMA-262 v9, 20.3.4.41 Date.prototype.toString ()\n *          ECMA-262 v9, 20.3.4.43 Date.prototype.toUTCString ()\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_date_parse (ecma_value_t this_arg, /**< this argument */\n                         ecma_value_t arg) /**< string */\n{\n  JERRY_UNUSED (this_arg);\n\n  /* Date Time String fromat (ECMA-262 v5, 15.9.1.15) */\n  ecma_string_t *date_str_p = ecma_op_to_string (arg);\n  if (JERRY_UNLIKELY (date_str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ECMA_STRING_TO_UTF8_STRING (date_str_p, date_start_p, date_start_size);\n  const lit_utf8_byte_t *date_str_curr_p = date_start_p;\n  const lit_utf8_byte_t *date_str_end_p = date_start_p + date_start_size;\n\n  // try to parse date string as ISO string - ECMA-262 v5, 15.9.1.15\n  ecma_number_t ret_value = ecma_builtin_date_parse_ISO_string_format (date_str_curr_p, date_str_end_p);\n\n  if (ecma_number_is_nan (ret_value))\n  {\n    // try to parse date string in Date.prototype.toString() or toUTCString() format\n    ret_value = ecma_builtin_date_parse_toString_formats (date_str_curr_p, date_str_end_p);\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (date_start_p, date_start_size);\n  ecma_deref_ecma_string (date_str_p);\n  return ecma_make_number_value (ecma_date_time_clip (ret_value));\n} /* ecma_builtin_date_parse */\n\n/**\n * The Date object's 'UTC' routine\n *\n * See also:\n *          ECMA-262 v5, 15.9.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_date_utc (ecma_value_t this_arg, /**< this argument */\n                       const ecma_value_t args[], /**< arguments list */\n                       uint32_t args_number) /**< number of arguments */\n{\n  JERRY_UNUSED (this_arg);\n\n#if ENABLED (JERRY_ESNEXT)\n  const uint32_t required_args_number = 1;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  const uint32_t required_args_number = 2;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (args_number < required_args_number)\n  {\n    /* Note:\n     *      When the UTC function is called with fewer than two arguments,\n     *      the behaviour is implementation-dependent, so just return NaN.\n     */\n    return ecma_make_number_value (ecma_number_make_nan ());\n  }\n\n  ecma_value_t time_value = ecma_date_construct_helper (args, args_number);\n\n  if (ECMA_IS_VALUE_ERROR (time_value))\n  {\n    return time_value;\n  }\n\n  ecma_number_t time = ecma_get_number_from_value (time_value);\n\n  ecma_free_value (time_value);\n\n  return ecma_make_number_value (ecma_date_time_clip (time));\n} /* ecma_builtin_date_utc */\n\n/**\n * Helper method to get the current time\n *\n * @return ecma_number_t\n */\nstatic ecma_number_t\necma_builtin_date_now_helper (void)\n{\n  return floor (DOUBLE_TO_ECMA_NUMBER_T (jerry_port_get_current_time ()));\n} /* ecma_builtin_date_now_helper */\n\n/**\n * The Date object's 'now' routine\n *\n * See also:\n *          ECMA-262 v5, 15.9.4.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_date_now (ecma_value_t this_arg) /**< this argument */\n{\n  JERRY_UNUSED (this_arg);\n  return ecma_make_number_value (ecma_builtin_date_now_helper ());\n} /* ecma_builtin_date_now */\n\n/**\n * Handle calling [[Call]] of built-in Date object\n *\n * See also:\n *          ECMA-262 v5, 15.9.2.1\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_date_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                 uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_UNUSED (arguments_list_p);\n  JERRY_UNUSED (arguments_list_len);\n\n  ecma_number_t now_val_num = ecma_builtin_date_now_helper ();\n\n  return ecma_date_value_to_string (now_val_num);\n} /* ecma_builtin_date_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Date object\n *\n * See also:\n *          ECMA-262 v5, 15.9.3.1\n *          ECMA-262 v11, 20.4.2\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                      uint32_t arguments_list_len) /**< number of arguments */\n{\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT (JERRY_CONTEXT (current_new_target_p));\n\n  ecma_object_t *prototype_obj_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                           ECMA_BUILTIN_ID_DATE_PROTOTYPE);\n  if (JERRY_UNLIKELY (prototype_obj_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_DATE_PROTOTYPE);\n#endif /* (ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *obj_p = ecma_create_object (prototype_obj_p,\n                                             sizeof (ecma_extended_object_t),\n                                             ECMA_OBJECT_TYPE_CLASS);\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_deref_object (prototype_obj_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n  ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_UNDEFINED;\n\n  ecma_number_t prim_value_num = ECMA_NUMBER_ZERO;\n\n  /* 20.4.2.3 */\n  if (arguments_list_len == 0)\n  {\n    prim_value_num = ecma_builtin_date_now_helper ();\n  }\n  /* 20.4.2.2 */\n  else if (arguments_list_len == 1)\n  {\n    ecma_value_t argument = arguments_list_p[0];\n    ecma_object_t *arg_obj = NULL;\n\n    /* 4.a */\n    if (ecma_is_value_object (argument))\n    {\n      arg_obj = ecma_get_object_from_value (argument);\n    }\n\n    if (arg_obj && ecma_object_class_is (arg_obj, LIT_MAGIC_STRING_DATE_UL))\n    {\n      ecma_extended_object_t *arg_ext_object_p = (ecma_extended_object_t *) arg_obj;\n      prim_value_num = *ECMA_GET_INTERNAL_VALUE_POINTER (ecma_number_t, arg_ext_object_p->u.class_prop.u.value);\n    }\n    /* 4.b */\n    else\n    {\n      ecma_value_t prim_comp_value = ecma_op_to_primitive (argument, ECMA_PREFERRED_TYPE_NUMBER);\n\n      if (ECMA_IS_VALUE_ERROR (prim_comp_value))\n      {\n        ecma_deref_object (obj_p);\n        return prim_comp_value;\n      }\n\n      if (ecma_is_value_string (prim_comp_value))\n      {\n        ecma_value_t parse_res_value = ecma_builtin_date_parse (ecma_make_object_value (obj_p), prim_comp_value);\n\n        if (ECMA_IS_VALUE_ERROR (parse_res_value))\n        {\n          ecma_deref_object (obj_p);\n          ecma_free_value (prim_comp_value);\n          return parse_res_value;\n        }\n\n        prim_value_num = ecma_get_number_from_value (parse_res_value);\n\n        ecma_free_value (parse_res_value);\n      }\n      else\n      {\n        ecma_number_t arg;\n        ecma_value_t prim_value = ecma_op_to_number (argument, &arg);\n\n        if (ECMA_IS_VALUE_ERROR (prim_value))\n        {\n          ecma_deref_object (obj_p);\n          ecma_free_value (prim_comp_value);\n          return prim_value;\n        }\n\n        prim_value_num = ecma_date_time_clip (arg);\n\n      }\n\n      ecma_free_value (prim_comp_value);\n    }\n  }\n  /* 20.4.2.1 */\n  else\n  {\n    ecma_value_t time_value = ecma_date_construct_helper (arguments_list_p, arguments_list_len);\n\n    if (ECMA_IS_VALUE_ERROR (time_value))\n    {\n      ecma_deref_object (obj_p);\n      return time_value;\n    }\n\n    ecma_number_t time = ecma_get_number_from_value (time_value);\n    prim_value_num = ecma_date_time_clip (ecma_date_utc (time));\n\n    ecma_free_value (time_value);\n  }\n\n  if (!ecma_number_is_nan (prim_value_num) && ecma_number_is_infinity (prim_value_num))\n  {\n    prim_value_num = ecma_number_make_nan ();\n  }\n\n  ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_DATE_UL;\n\n  ecma_number_t *date_num_p = ecma_alloc_number ();\n  *date_num_p = prim_value_num;\n  ECMA_SET_INTERNAL_VALUE_POINTER (ext_object_p->u.class_prop.u.value, date_num_p);\n\n  return ecma_make_object_value (obj_p);\n} /* ecma_builtin_date_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#undef BREAK_IF_FALSE\n#undef BREAK_IF_NAN\n\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-date.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Date built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATE)\n\n/* ECMA-262 v5, 15.9.4.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_DATE_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              7,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\nROUTINE (LIT_MAGIC_STRING_PARSE, ecma_builtin_date_parse, 1, 1)\nROUTINE (LIT_MAGIC_STRING_UTC_U, ecma_builtin_date_utc, NON_FIXED, 7)\nROUTINE (LIT_MAGIC_STRING_NOW, ecma_builtin_date_now, 0, 0)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_DATE_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"lit-char-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n#include \"lit-magic-strings.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-error-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID error_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup errorprototype ECMA Error.prototype object built-in\n * @{\n */\n\n/**\n * Helper method to get a property value from an error object\n *\n * @return ecma_string_t\n */\nstatic ecma_string_t *\necma_builtin_error_prototype_object_to_string_helper (ecma_object_t *obj_p, /**< error object */\n                                                      lit_magic_string_id_t property_id, /**< property id */\n                                                      lit_magic_string_id_t default_value) /**< default prop value */\n{\n  ecma_value_t prop_value = ecma_op_object_get_by_magic_id (obj_p, property_id);\n\n  if (ECMA_IS_VALUE_ERROR (prop_value))\n  {\n    return NULL;\n  }\n\n  if (ecma_is_value_undefined (prop_value))\n  {\n    return ecma_get_magic_string (default_value);\n  }\n\n  ecma_string_t *ret_str_p = ecma_op_to_string (prop_value);\n  ecma_free_value (prop_value);\n\n  return ret_str_p;\n} /* ecma_builtin_error_prototype_object_to_string_helper */\n\n/**\n * The Error.prototype object's 'toString' routine\n *\n * See also:\n *          ECMA-262 v5, 15.11.4.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_error_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */\n{\n  /* 2. */\n  if (!ecma_is_value_object (this_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an object.\"));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);\n\n  ecma_string_t *name_string_p = ecma_builtin_error_prototype_object_to_string_helper (obj_p,\n                                                                                       LIT_MAGIC_STRING_NAME,\n                                                                                       LIT_MAGIC_STRING_ERROR_UL);\n\n  if (JERRY_UNLIKELY (name_string_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_string_t *msg_string_p = ecma_builtin_error_prototype_object_to_string_helper (obj_p,\n                                                                                      LIT_MAGIC_STRING_MESSAGE,\n                                                                                      LIT_MAGIC_STRING__EMPTY);\n\n  if (JERRY_UNLIKELY (msg_string_p == NULL))\n  {\n    ecma_deref_ecma_string (name_string_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  if (ecma_string_is_empty (name_string_p))\n  {\n    return ecma_make_string_value (msg_string_p);\n  }\n\n  if (ecma_string_is_empty (msg_string_p))\n  {\n    return ecma_make_string_value (name_string_p);\n  }\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (name_string_p);\n\n  ecma_stringbuilder_append_raw (&builder, (const lit_utf8_byte_t *)\": \", 2);\n  ecma_stringbuilder_append (&builder, msg_string_p);\n\n  ecma_deref_ecma_string (name_string_p);\n  ecma_deref_ecma_string (msg_string_p);\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_error_prototype_object_to_string */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Error.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.4.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.4.2 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_ERROR_UL,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.4.3 */\nSTRING_VALUE (LIT_MAGIC_STRING_MESSAGE,\n              LIT_MAGIC_STRING__EMPTY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_error_prototype_object_to_string, 0, 0)\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-error.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-function-object.h\"\n#include \"jrt.h\"\n#include \"jcontext.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-error.inc.h\"\n#define BUILTIN_UNDERSCORED_ID error\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup error ECMA Error object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in Error object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                  uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_COMMON, arguments_list_p, arguments_list_len);\n} /* ecma_builtin_error_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Error object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                       uint32_t arguments_list_len) /**< number of arguments */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  return ecma_builtin_error_dispatch_call (arguments_list_p, arguments_list_len);\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_ERROR_PROTOTYPE);\n\n  if (proto_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_builtin_error_dispatch_call (arguments_list_p, arguments_list_len);\n\n  if (!ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (result);\n    ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, proto_p);\n  }\n\n  ecma_deref_object (proto_p);\n\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_error_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-error.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Error built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.7.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_ERROR_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_ERROR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-evalerror-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID eval_error_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * EvalError.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.7.8 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_EVAL_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.9 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_EVAL_ERROR_UL,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.10 */\nSTRING_VALUE (LIT_MAGIC_STRING_MESSAGE,\n              LIT_MAGIC_STRING__EMPTY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-function-object.h\"\n#include \"jrt.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-evalerror.inc.h\"\n#define BUILTIN_UNDERSCORED_ID eval_error\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup evalerror ECMA EvalError object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in EvalError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_eval_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                       uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_EVAL, arguments_list_p, arguments_list_len);\n} /* ecma_builtin_eval_error_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in EvalError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_eval_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                            uint32_t arguments_list_len) /**< number of arguments */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  return ecma_builtin_eval_error_dispatch_call (arguments_list_p, arguments_list_len);\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE);\n\n  if (proto_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_builtin_eval_error_dispatch_call (arguments_list_p, arguments_list_len);\n\n  if (!ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (result);\n    ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, proto_p);\n  }\n\n  ecma_deref_object (proto_p);\n\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_eval_error_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * EvalError built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_EVAL_ERROR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-proxy-object.h\"\n#include \"jrt.h\"\n#include \"ecma-builtin-function-prototype.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_FUNCTION_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_FUNCTION_PROTOTYPE_TO_STRING,\n  ECMA_FUNCTION_PROTOTYPE_CALL,\n  ECMA_FUNCTION_PROTOTYPE_APPLY,\n  ECMA_FUNCTION_PROTOTYPE_BIND,\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE,\n#endif /* ENABLED (JERRY_ESNEXT) */\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-function-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID function_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup functionprototype ECMA Function.prototype object built-in\n * @{\n */\n\n/**\n * Maximum number of arguments for an apply function.\n */\n#define ECMA_FUNCTION_APPLY_ARGUMENT_COUNT_LIMIT 65535\n\n/**\n * The Function.prototype object's 'toString' routine\n *\n * See also:\n *          ECMA-262 v5, 15.3.4.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_function_prototype_object_to_string (void)\n{\n  return ecma_make_magic_string_value (LIT_MAGIC_STRING__FUNCTION_TO_STRING);\n} /* ecma_builtin_function_prototype_object_to_string */\n\n/**\n * The Function.prototype object's 'apply' routine\n *\n * See also:\n *          ECMA-262 v5, 15.3.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_function_prototype_object_apply (ecma_object_t *func_obj_p, /**< this argument object */\n                                              ecma_value_t arg1, /**< first argument */\n                                              ecma_value_t arg2) /**< second argument */\n{\n  /* 2. */\n  if (ecma_is_value_null (arg2) || ecma_is_value_undefined (arg2))\n  {\n    return  ecma_op_function_call (func_obj_p, arg1, NULL, 0);\n  }\n\n  /* 3. */\n  if (!ecma_is_value_object (arg2))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not an object.\"));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (arg2);\n\n  /* 4-5. */\n  ecma_length_t length;\n  ecma_value_t len_value = ecma_op_object_get_length (obj_p, &length);\n\n  if (ECMA_IS_VALUE_ERROR (len_value))\n  {\n    return len_value;\n  }\n\n  if (length >= ECMA_FUNCTION_APPLY_ARGUMENT_COUNT_LIMIT)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Too many arguments declared for Function.apply().\"));\n  }\n\n  /* 6. */\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n  JMEM_DEFINE_LOCAL_ARRAY (arguments_list_p, length, ecma_value_t);\n  ecma_length_t index = 0;\n\n  /* 7. */\n  for (index = 0; index < length; index++)\n  {\n    ecma_value_t get_value = ecma_op_object_get_by_index (obj_p, index);\n\n    if (ECMA_IS_VALUE_ERROR (get_value))\n    {\n      ret_value = get_value;\n      break;\n    }\n\n    arguments_list_p[index] = get_value;\n  }\n\n  if (ecma_is_value_empty (ret_value))\n  {\n    JERRY_ASSERT (index == length);\n    ret_value = ecma_op_function_call (func_obj_p,\n                                       arg1,\n                                       arguments_list_p,\n                                       (uint32_t) length);\n  }\n\n  for (uint32_t remove_index = 0; remove_index < index; remove_index++)\n  {\n    ecma_free_value (arguments_list_p[remove_index]);\n  }\n\n  JMEM_FINALIZE_LOCAL_ARRAY (arguments_list_p);\n\n  return ret_value;\n} /* ecma_builtin_function_prototype_object_apply */\n\n/**\n * The Function.prototype object's 'call' routine\n *\n * See also:\n *          ECMA-262 v5, 15.3.4.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_function_prototype_object_call (ecma_object_t *func_obj_p , /**< this argument object */\n                                             const ecma_value_t *arguments_list_p, /**< list of arguments */\n                                             uint32_t arguments_number) /**< number of arguments */\n{\n  if (arguments_number == 0)\n  {\n    /* Even a 'this' argument is missing. */\n    return ecma_op_function_call (func_obj_p,\n                                  ECMA_VALUE_UNDEFINED,\n                                  NULL,\n                                  0);\n  }\n\n  return ecma_op_function_call (func_obj_p,\n                                arguments_list_p[0],\n                                arguments_list_p + 1,\n                                (uint32_t) (arguments_number - 1u));\n} /* ecma_builtin_function_prototype_object_call */\n\n/**\n * The Function.prototype object's 'bind' routine\n *\n * See also:\n *          ECMA-262 v5, 15.3.4.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**< this argument object */\n                                             const ecma_value_t *arguments_list_p, /**< list of arguments */\n                                             uint32_t arguments_number) /**< number of arguments */\n{\n  /* 4. 11. 18. */\n  ecma_object_t *prototype_obj_p;\n\n#if !ENABLED (JERRY_ESNEXT)\n  prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);\n#else /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (this_arg_obj_p))\n  {\n    ecma_value_t proto = ecma_proxy_object_get_prototype_of (this_arg_obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (proto))\n    {\n      return proto;\n    }\n    prototype_obj_p = ecma_is_value_null (proto) ? NULL : ecma_get_object_from_value (proto);\n  }\n  else\n  {\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n    jmem_cpointer_t proto_cp = ecma_op_ordinary_object_get_prototype_of (this_arg_obj_p);\n    if (proto_cp != JMEM_CP_NULL)\n    {\n      prototype_obj_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, proto_cp);\n      ecma_ref_object (prototype_obj_p);\n    }\n    else\n    {\n      prototype_obj_p = NULL;\n    }\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *function_p;\n  ecma_bound_function_t *bound_func_p;\n\n  if (arguments_number == 0\n      || (arguments_number == 1 && !ecma_is_value_integer_number (arguments_list_p[0])))\n  {\n    function_p = ecma_create_object (prototype_obj_p,\n                                     sizeof (ecma_bound_function_t),\n                                     ECMA_OBJECT_TYPE_BOUND_FUNCTION);\n\n    /* 8. */\n    bound_func_p = (ecma_bound_function_t *) function_p;\n    ECMA_SET_NON_NULL_POINTER_TAG (bound_func_p->header.u.bound_function.target_function,\n                                   this_arg_obj_p,\n                                   0);\n\n    bound_func_p->header.u.bound_function.args_len_or_this = ECMA_VALUE_UNDEFINED;\n\n    if (arguments_number != 0)\n    {\n      bound_func_p->header.u.bound_function.args_len_or_this = ecma_copy_value_if_not_object (arguments_list_p[0]);\n    }\n  }\n  else\n  {\n    JERRY_ASSERT (arguments_number > 0);\n\n    size_t obj_size = sizeof (ecma_bound_function_t) + (arguments_number * sizeof (ecma_value_t));\n\n    function_p = ecma_create_object (prototype_obj_p,\n                                     obj_size,\n                                     ECMA_OBJECT_TYPE_BOUND_FUNCTION);\n\n    /* 8. */\n    bound_func_p = (ecma_bound_function_t *) function_p;\n    ECMA_SET_NON_NULL_POINTER_TAG (bound_func_p->header.u.bound_function.target_function,\n                                   this_arg_obj_p,\n                                   0);\n\n    /* NOTE: This solution provides temporary false data about the object's size\n       but prevents GC from freeing it until it's not fully initialized. */\n    bound_func_p->header.u.bound_function.args_len_or_this = ECMA_VALUE_UNDEFINED;\n    ecma_value_t *args_p = (ecma_value_t *) (bound_func_p + 1);\n\n    for (uint32_t i = 0; i < arguments_number; i++)\n    {\n      *args_p++ = ecma_copy_value_if_not_object (arguments_list_p[i]);\n    }\n\n    ecma_value_t args_len_or_this = ecma_make_integer_value ((ecma_integer_value_t) arguments_number);\n    bound_func_p->header.u.bound_function.args_len_or_this = args_len_or_this;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (prototype_obj_p != NULL)\n  {\n    ecma_deref_object (prototype_obj_p);\n  }\n\n  bound_func_p->target_length = ecma_make_integer_value (0);\n\n  ecma_string_t *len_string = ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH);\n  ecma_property_descriptor_t prop_desc;\n  ecma_value_t status = ecma_op_object_get_own_property_descriptor (this_arg_obj_p,\n                                                                    len_string,\n                                                                    &prop_desc);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    ecma_deref_object (function_p);\n    return status;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (ecma_is_value_true (status))\n  {\n    ecma_free_property_descriptor (&prop_desc);\n    ecma_value_t len_value = ecma_op_object_get (this_arg_obj_p,\n                                                 len_string);\n\n    if (ECMA_IS_VALUE_ERROR (len_value))\n    {\n      ecma_deref_object (function_p);\n      return len_value;\n    }\n\n    if (ecma_is_value_number (len_value))\n    {\n      ecma_number_t len_num;\n      ecma_op_to_integer (len_value, &len_num);\n      bound_func_p->target_length = ecma_make_number_value (len_num);\n    }\n    ecma_free_value (len_value);\n  }\n\n  /* 12. */\n  ecma_value_t name_value = ecma_op_object_get_by_magic_id (this_arg_obj_p, LIT_MAGIC_STRING_NAME);\n  if (ECMA_IS_VALUE_ERROR (name_value))\n  {\n    ecma_deref_object (function_p);\n    return name_value;\n  }\n\n  ecma_string_t *name_p;\n\n  if (ecma_is_value_string (name_value))\n  {\n    name_p = ecma_get_string_from_value (name_value);\n  }\n  else\n  {\n    ecma_free_value (name_value);\n    name_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ecma_value_t bound_function_name = ecma_op_function_form_name (name_p, \"bound \", 6);\n\n  ecma_deref_ecma_string (name_p);\n\n  ecma_property_value_t *name_prop_value_p;\n  name_prop_value_p = ecma_create_named_data_property (function_p,\n                                                       ecma_get_magic_string (LIT_MAGIC_STRING_NAME),\n                                                       ECMA_PROPERTY_FLAG_CONFIGURABLE,\n                                                       NULL);\n\n  name_prop_value_p->value = bound_function_name;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /*\n   * [[Class]] property is not stored explicitly for objects of ECMA_OBJECT_TYPE_FUNCTION type.\n   *\n   * See also: ecma_object_get_class_name\n   */\n\n  /* 22. */\n  return ecma_make_object_value (function_p);\n} /* ecma_builtin_function_prototype_object_bind */\n\n/**\n * Handle calling [[Call]] of built-in Function.prototype object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_function_prototype_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                               uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_builtin_function_prototype_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Function.prototype object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_function_prototype_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                    uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"'Function.prototype' is not a constructor.\"));\n} /* ecma_builtin_function_prototype_dispatch_construct */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_function_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                                  ecma_value_t this_arg, /**< 'this' argument value */\n                                                  const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                          *   passed to routine */\n                                                  uint32_t arguments_number) /**< length of arguments' list */\n{\n  if (!ecma_op_is_callable (this_arg))\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (JERRY_UNLIKELY (builtin_routine_id == ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE))\n    {\n      return ECMA_VALUE_FALSE;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not a function.\"));\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (this_arg);\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_FUNCTION_PROTOTYPE_TO_STRING:\n    {\n      return ecma_builtin_function_prototype_object_to_string ();\n    }\n    case ECMA_FUNCTION_PROTOTYPE_APPLY:\n    {\n      return ecma_builtin_function_prototype_object_apply (func_obj_p,\n                                                           arguments_list_p[0],\n                                                           arguments_list_p[1]);\n    }\n    case ECMA_FUNCTION_PROTOTYPE_CALL:\n    {\n      return ecma_builtin_function_prototype_object_call (func_obj_p, arguments_list_p, arguments_number);\n    }\n    case ECMA_FUNCTION_PROTOTYPE_BIND:\n    {\n      return ecma_builtin_function_prototype_object_bind (func_obj_p, arguments_list_p, arguments_number);\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE:\n    {\n      return ecma_op_object_has_instance (func_obj_p, arguments_list_p[0]);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_builtin_function_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_BUILTIN_FUNCTION_PROTOTYPE_H\n#define ECMA_BUILTIN_FUNCTION_PROTOTYPE_H\n\necma_value_t ecma_builtin_function_prototype_object_apply (ecma_object_t *func_obj_p,\n                                                           ecma_value_t arg1,\n                                                           ecma_value_t arg2);\n\n#endif /* !ECMA_BUILTIN_FUNCTION_PROTOTYPE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Function.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.3.4.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_FUNCTION,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* Number properties:\n *  (property name, object pointer getter) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING__EMPTY,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_FUNCTION_PROTOTYPE_TO_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_APPLY, ECMA_FUNCTION_PROTOTYPE_APPLY, 2, 2)\nROUTINE (LIT_MAGIC_STRING_CALL, ECMA_FUNCTION_PROTOTYPE_CALL, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_BIND, ECMA_FUNCTION_PROTOTYPE_BIND, NON_FIXED, 1)\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * ECMA-262 v6.0 19.2.3.6 @@hasInstance\n *  the property attributes are: { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.\n */\nROUTINE_WITH_FLAGS (LIT_GLOBAL_SYMBOL_HAS_INSTANCE, ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE, 1, 1, 0 /* flags */)\nACCESSOR_BUILTIN_FUNCTION (LIT_MAGIC_STRING_ARGUMENTS,\n                           ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,\n                           ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,\n                           ECMA_PROPERTY_FLAG_CONFIGURABLE)\nACCESSOR_BUILTIN_FUNCTION (LIT_MAGIC_STRING_CALLER,\n                           ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,\n                           ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,\n                           ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-eval.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-lex-env.h\"\n#include \"js-parser.h\"\n#include \"lit-magic-strings.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-function.inc.h\"\n#define BUILTIN_UNDERSCORED_ID function\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup function ECMA Function object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in Function object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_function_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                     uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_builtin_function_dispatch_construct (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_function_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Function object\n *\n * See also:\n *          ECMA-262 v5, 15.3.\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_function_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                          uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_op_create_dynamic_function (arguments_list_p, arguments_list_len, ECMA_PARSE_NO_OPTS);\n} /* ecma_builtin_function_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Function built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.3.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n/* Number properties:\n *  (property name, object pointer getter) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_FUNCTION_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-generator-function.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n#include \"ecma-function-object.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-generator-function.inc.h\"\n#define BUILTIN_UNDERSCORED_ID generator_function\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup generator ECMA GeneratorFunction object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in GeneratorFunction object\n *\n * @return constructed generator function object - if success\n *         raised error otherwise\n */\necma_value_t\necma_builtin_generator_function_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                               uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_op_create_dynamic_function (arguments_list_p, arguments_list_len, ECMA_PARSE_GENERATOR_FUNCTION);\n} /* ecma_builtin_generator_function_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in GeneratorFunction object\n *\n* @return constructed generator function object - if success\n *        raised error otherwise\n */\necma_value_t\necma_builtin_generator_function_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                    uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_generator_function_dispatch_call (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_generator_function_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-generator-function.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %GeneratorFunction% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* ECMA-262 v6, 25.2.2 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_GENERATOR_FUNCTION_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 25.2.2.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 25.2.2.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_GENERATOR,\n              ECMA_PROPERTY_FIXED)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-generator-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"jcontext.h\"\n#include \"opcodes.h\"\n#include \"vm-defines.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n  * This object has a custom dispatch function.\n  */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_GENERATOR_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT,\n  ECMA_GENERATOR_PROTOTYPE_ROUTINE_THROW,\n  ECMA_GENERATOR_PROTOTYPE_ROUTINE_RETURN\n} ecma_generator_operation_type_t;\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-generator-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID generator_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup generator ECMA Generator.prototype object built-in\n * @{\n */\n\n/**\n * Convert routine type to operation type..\n */\n#define ECMA_GENERATOR_ROUTINE_TO_OPERATION(type) \\\n  ((ecma_iterator_command_type_t) ((type) - ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT))\n\nJERRY_STATIC_ASSERT (ECMA_GENERATOR_ROUTINE_TO_OPERATION (ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT)\n                     == ECMA_ITERATOR_NEXT,\n                     convert_ecma_generator_routine_next_to_ecma_iterator_next_failed);\n\nJERRY_STATIC_ASSERT (ECMA_GENERATOR_ROUTINE_TO_OPERATION (ECMA_GENERATOR_PROTOTYPE_ROUTINE_THROW)\n                     == ECMA_ITERATOR_THROW,\n                     convert_ecma_generator_routine_throw_to_ecma_iterator_throw_failed);\n\nJERRY_STATIC_ASSERT (ECMA_GENERATOR_ROUTINE_TO_OPERATION (ECMA_GENERATOR_PROTOTYPE_ROUTINE_RETURN)\n                     == ECMA_ITERATOR_RETURN,\n                     convert_ecma_generator_routine_return_to_ecma_iterator_return_failed);\n\n/**\n * Helper function for next / return / throw\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_generator_prototype_object_do (vm_executable_object_t *generator_object_p, /**< generator object */\n                                            ecma_value_t arg, /**< argument */\n                                            ecma_iterator_command_type_t resume_mode) /**< resume mode */\n{\n  arg = ecma_copy_value (arg);\n\n  while (true)\n  {\n    if (generator_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD)\n    {\n      ecma_value_t iterator = generator_object_p->frame_ctx.block_result;\n      ecma_value_t next_method = generator_object_p->frame_ctx.stack_top_p[-1];\n\n      bool done = false;\n      ecma_value_t result = ecma_op_iterator_do (resume_mode, iterator, next_method, arg, &done);\n      ecma_free_value (arg);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        arg = result;\n      }\n      else if (done)\n      {\n        arg = ecma_op_iterator_value (result);\n        ecma_free_value (result);\n\n        if (resume_mode == ECMA_ITERATOR_THROW)\n        {\n          resume_mode = ECMA_ITERATOR_NEXT;\n        }\n      }\n      else\n      {\n        return result;\n      }\n\n      ECMA_EXECUTABLE_OBJECT_RESUME_EXEC (generator_object_p);\n      generator_object_p->frame_ctx.block_result = ECMA_VALUE_UNDEFINED;\n\n      JERRY_ASSERT (generator_object_p->frame_ctx.stack_top_p[-1] == ECMA_VALUE_UNDEFINED\n                    || ecma_is_value_object (generator_object_p->frame_ctx.stack_top_p[-1]));\n      generator_object_p->frame_ctx.stack_top_p--;\n\n      if (ECMA_IS_VALUE_ERROR (arg))\n      {\n        arg = jcontext_take_exception ();\n        resume_mode = ECMA_ITERATOR_THROW;\n      }\n    }\n\n    if (resume_mode == ECMA_ITERATOR_RETURN)\n    {\n      generator_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_return;\n    }\n    else if (resume_mode == ECMA_ITERATOR_THROW)\n    {\n      generator_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_throw;\n    }\n\n    ecma_value_t value = opfunc_resume_executable_object (generator_object_p, arg);\n\n    if (ECMA_IS_VALUE_ERROR (value))\n    {\n      return value;\n    }\n\n    bool done = (generator_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_COMPLETED);\n\n    if (!done)\n    {\n      const uint8_t *byte_code_p = generator_object_p->frame_ctx.byte_code_p;\n\n      JERRY_ASSERT (byte_code_p[-2] == CBC_EXT_OPCODE\n                    && (byte_code_p[-1] == CBC_EXT_YIELD || byte_code_p[-1] == CBC_EXT_YIELD_ITERATOR));\n\n      if (byte_code_p[-1] == CBC_EXT_YIELD_ITERATOR)\n      {\n        ecma_value_t iterator = ecma_op_get_iterator (value,\n                                                      ECMA_VALUE_SYNC_ITERATOR,\n                                                      generator_object_p->frame_ctx.stack_top_p);\n        ecma_free_value (value);\n\n        if (ECMA_IS_VALUE_ERROR (iterator))\n        {\n          resume_mode = ECMA_ITERATOR_THROW;\n          arg = jcontext_take_exception ();\n          continue;\n        }\n\n        ecma_deref_object (ecma_get_object_from_value (iterator));\n        generator_object_p->extended_object.u.class_prop.extra_info |= ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD;\n        generator_object_p->frame_ctx.block_result = iterator;\n\n        if (generator_object_p->frame_ctx.stack_top_p[0] != ECMA_VALUE_UNDEFINED)\n        {\n          ecma_deref_object (ecma_get_object_from_value (generator_object_p->frame_ctx.stack_top_p[0]));\n        }\n\n        generator_object_p->frame_ctx.stack_top_p++;\n        arg = ECMA_VALUE_UNDEFINED;\n        continue;\n      }\n    }\n\n    ecma_value_t result = ecma_create_iter_result_object (value, ecma_make_boolean_value (done));\n    ecma_fast_free_value (value);\n    return result;\n  }\n} /* ecma_builtin_generator_prototype_object_do */\n\n/**\n  * Dispatcher of the Generator built-in's routines\n  *\n  * @return ecma value\n  *         Returned value must be freed with ecma_free_value.\n  */\necma_value_t\necma_builtin_generator_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine\n                                                                                *   identifier */\n                                                   ecma_value_t this_arg, /**< 'this' argument value */\n                                                   const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                           *   passed to routine */\n                                                   uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (arguments_number);\n\n  vm_executable_object_t *executable_object_p = NULL;\n\n  if (ecma_is_value_object (this_arg))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (this_arg);\n\n    if (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_CLASS)\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      if (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_GENERATOR_UL)\n      {\n        executable_object_p = (vm_executable_object_t *) ext_object_p;\n      }\n    }\n  }\n\n  if (executable_object_p == NULL)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not a generator object.\"));\n  }\n\n  if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_RUNNING)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Generator is currently under execution.\"));\n  }\n\n  if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_COMPLETED)\n  {\n    if (builtin_routine_id != ECMA_GENERATOR_PROTOTYPE_ROUTINE_THROW)\n    {\n      return ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n    }\n\n    jcontext_raise_exception (ecma_copy_value (arguments_list_p[0]));\n    return ECMA_VALUE_ERROR;\n  }\n\n  return ecma_builtin_generator_prototype_object_do (executable_object_p,\n                                                     arguments_list_p[0],\n                                                     ECMA_GENERATOR_ROUTINE_TO_OPERATION (builtin_routine_id));\n} /* ecma_builtin_generator_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-generator-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Generator.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 25.3.1.5 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_GENERATOR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 25.2.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_GENERATOR,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_NEXT, ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_RETURN, ECMA_GENERATOR_PROTOTYPE_ROUTINE_RETURN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_THROW, ECMA_GENERATOR_PROTOTYPE_ROUTINE_THROW, 1, 1)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-generator.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-generator.inc.h\"\n#define BUILTIN_UNDERSCORED_ID generator\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup generator ECMA Generator object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-generator.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %Generator% built-in description (GeneratorFunction.prototype)\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* ECMA-262 v6, 25.3.2.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_GENERATOR_FUNCTION,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 25.3.2.3.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_GENERATOR_PROTOTYPE,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 25.3.2.3.3 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_GENERATOR_FUNCTION_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-eval.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"jrt.h\"\n#include \"lit-char-helpers.h\"\n#include \"lit-magic-strings.h\"\n#include \"lit-strings.h\"\n#include \"vm.h\"\n#include \"jcontext.h\"\n#include \"jrt-libc-includes.h\"\n#include \"jrt-bit-fields.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_GLOBAL_ROUTINE_START = 0,\n  /* Note: these 5 routine ids must be in this order */\n  ECMA_GLOBAL_IS_NAN,\n  ECMA_GLOBAL_IS_FINITE,\n  ECMA_GLOBAL_EVAL,\n  ECMA_GLOBAL_PARSE_INT,\n  ECMA_GLOBAL_PARSE_FLOAT,\n  ECMA_GLOBAL_DECODE_URI,\n  ECMA_GLOBAL_DECODE_URI_COMPONENT,\n  ECMA_GLOBAL_ENCODE_URI,\n  ECMA_GLOBAL_ENCODE_URI_COMPONENT,\n  ECMA_GLOBAL_ESCAPE,\n  ECMA_GLOBAL_UNESCAPE,\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-global.inc.h\"\n#define BUILTIN_UNDERSCORED_ID global\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup global ECMA Global object built-in\n * @{\n */\n\n/**\n * The Global object's 'eval' routine\n *\n * See also:\n *          ECMA-262 v5, 15.1.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_global_object_eval (ecma_value_t x) /**< routine's first argument */\n{\n  if (JERRY_UNLIKELY (!ecma_is_value_string (x)))\n  {\n    /* step 1 */\n    return ecma_copy_value (x);\n  }\n\n  uint32_t parse_opts = vm_is_direct_eval_form_call () ? ECMA_PARSE_DIRECT_EVAL : ECMA_PARSE_NO_OPTS;\n\n  /* See also: ECMA-262 v5, 10.1.1 */\n  if (parse_opts && vm_is_strict_mode ())\n  {\n    JERRY_ASSERT (parse_opts & ECMA_PARSE_DIRECT_EVAL);\n    parse_opts |= ECMA_PARSE_STRICT_MODE;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (vm_is_direct_eval_form_call ())\n  {\n    parse_opts |= ECMA_GET_LOCAL_PARSE_OPTS ();\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* steps 2 to 8 */\n  return ecma_op_eval (ecma_get_string_from_value (x), parse_opts);\n} /* ecma_builtin_global_object_eval */\n\n/**\n * The Global object's 'isNaN' routine\n *\n * See also:\n *          ECMA-262 v5, 15.1.2.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_global_object_is_nan (ecma_number_t arg_num) /**< routine's first argument */\n{\n  return ecma_make_boolean_value (ecma_number_is_nan (arg_num));\n} /* ecma_builtin_global_object_is_nan */\n\n/**\n * The Global object's 'isFinite' routine\n *\n * See also:\n *          ECMA-262 v5, 15.1.2.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_global_object_is_finite (ecma_number_t arg_num) /**< routine's first argument */\n{\n  bool is_finite = !(ecma_number_is_nan (arg_num)\n                     || ecma_number_is_infinity (arg_num));\n\n  return ecma_make_boolean_value (is_finite);\n} /* ecma_builtin_global_object_is_finite */\n\n/**\n * Helper function to check whether a character is in a character bitset.\n *\n * @return true if the character is in the character bitset.\n */\nstatic bool\necma_builtin_global_object_character_is_in (uint32_t character, /**< character */\n                                            const uint8_t *bitset) /**< character set */\n{\n  JERRY_ASSERT (character < 128);\n  return (bitset[character >> 3] & (1u << (character & 0x7))) != 0;\n} /* ecma_builtin_global_object_character_is_in */\n\n/**\n * Unescaped URI characters bitset:\n *   One bit for each character between 0 - 127.\n *   Bit is set if the character is in the unescaped URI set.\n */\nstatic const uint8_t unescaped_uri_set[16] =\n{\n  0x0, 0x0, 0x0, 0x0, 0xda, 0xff, 0xff, 0xaf,\n  0xff, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x47\n};\n\n/**\n * Unescaped URI component characters bitset:\n *   One bit for each character between 0 - 127.\n *   Bit is set if the character is in the unescaped component URI set.\n */\nstatic const uint8_t unescaped_uri_component_set[16] =\n{\n  0x0, 0x0, 0x0, 0x0, 0x82, 0x67, 0xff, 0x3,\n  0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x47\n};\n\n/**\n * Format is a percent sign followed by two hex digits.\n */\n#define URI_ENCODED_BYTE_SIZE (3)\n\n/**\n * The Global object's 'decodeURI' and 'decodeURIComponent' routines\n *\n * See also:\n *          ECMA-262 v5, 15.1.3.1\n *          ECMA-262 v5, 15.1.3.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_global_object_decode_uri_helper (lit_utf8_byte_t *input_start_p, /**< routine's first argument's\n                                                                               *   string buffer */\n                                              lit_utf8_size_t input_size, /**< routine's first argument's\n                                                                           *   string buffer's size */\n                                              const uint8_t *reserved_uri_bitset) /**< reserved characters bitset */\n{\n  lit_utf8_byte_t *input_char_p = input_start_p;\n  lit_utf8_byte_t *input_end_p = input_start_p + input_size;\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  while (input_char_p < input_end_p)\n  {\n    if (*input_char_p != '%')\n    {\n      ecma_stringbuilder_append_byte (&builder, *input_char_p++);\n      continue;\n    }\n\n    uint32_t hex_value = lit_char_hex_lookup (input_char_p + 1, input_end_p, 2);\n    if (hex_value == UINT32_MAX)\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return ecma_raise_uri_error (ECMA_ERR_MSG (\"Invalid hexadecimal value.\"));\n    }\n\n    ecma_char_t decoded_byte = (ecma_char_t) hex_value;\n    input_char_p += URI_ENCODED_BYTE_SIZE;\n\n    if (decoded_byte <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n    {\n      if (ecma_builtin_global_object_character_is_in (decoded_byte, reserved_uri_bitset)\n          && !ecma_builtin_global_object_character_is_in (decoded_byte, unescaped_uri_component_set))\n      {\n        ecma_stringbuilder_append_char (&builder, LIT_CHAR_PERCENT);\n        input_char_p -= 2;\n      }\n      else\n      {\n        ecma_stringbuilder_append_byte (&builder, (lit_utf8_byte_t) decoded_byte);\n      }\n    }\n    else\n    {\n      uint32_t bytes_count;\n\n      if ((decoded_byte & LIT_UTF8_2_BYTE_MASK) == LIT_UTF8_2_BYTE_MARKER)\n      {\n        bytes_count = 2;\n      }\n      else if ((decoded_byte & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER)\n      {\n        bytes_count = 3;\n      }\n      else if ((decoded_byte & LIT_UTF8_4_BYTE_MASK) == LIT_UTF8_4_BYTE_MARKER)\n      {\n        bytes_count = 4;\n      }\n      else\n      {\n        ecma_stringbuilder_destroy (&builder);\n        return ecma_raise_uri_error (ECMA_ERR_MSG (\"Invalid UTF8 character.\"));\n      }\n\n      lit_utf8_byte_t octets[LIT_UTF8_MAX_BYTES_IN_CODE_POINT];\n      octets[0] = (lit_utf8_byte_t) decoded_byte;\n      bool is_valid = true;\n\n      for (uint32_t i = 1; i < bytes_count; i++)\n      {\n        if (input_char_p >= input_end_p || *input_char_p != '%')\n        {\n          is_valid = false;\n          break;\n        }\n        else\n        {\n          hex_value = lit_char_hex_lookup (input_char_p + 1, input_end_p, 2);\n\n          if (hex_value == UINT32_MAX || (hex_value & LIT_UTF8_EXTRA_BYTE_MASK) != LIT_UTF8_EXTRA_BYTE_MARKER)\n          {\n            is_valid = false;\n            break;\n          }\n\n          input_char_p += URI_ENCODED_BYTE_SIZE;\n          octets[i] = (lit_utf8_byte_t) hex_value;\n        }\n      }\n\n      if (!is_valid\n          || !lit_is_valid_utf8_string (octets, bytes_count))\n      {\n        ecma_stringbuilder_destroy (&builder);\n        return ecma_raise_uri_error (ECMA_ERR_MSG (\"Invalid UTF8 string.\"));\n      }\n\n      lit_code_point_t cp;\n      lit_read_code_point_from_utf8 (octets, bytes_count, &cp);\n\n      if (lit_is_code_point_utf16_high_surrogate (cp)\n          || lit_is_code_point_utf16_low_surrogate (cp))\n      {\n        ecma_stringbuilder_destroy (&builder);\n        return ecma_raise_uri_error (ECMA_ERR_MSG (\"Invalid UTF8 codepoint.\"));\n      }\n\n      lit_utf8_byte_t result_chars[LIT_CESU8_MAX_BYTES_IN_CODE_POINT];\n      lit_utf8_size_t cp_size = lit_code_point_to_cesu8 (cp, result_chars);\n      ecma_stringbuilder_append_raw (&builder, result_chars, cp_size);\n    }\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_global_object_decode_uri_helper */\n\n/**\n * Helper function to encode byte as hexadecimal values.\n */\nstatic void\necma_builtin_global_object_byte_to_hex (lit_utf8_byte_t *dest_p, /**< destination pointer */\n                                        uint32_t byte) /**< value */\n{\n  JERRY_ASSERT (byte < 256);\n\n  dest_p[0] = LIT_CHAR_PERCENT;\n  ecma_char_t hex_digit = (ecma_char_t) (byte >> 4);\n  dest_p[1] = (lit_utf8_byte_t) ((hex_digit > 9) ? (hex_digit + ('A' - 10)) : (hex_digit + '0'));\n  hex_digit = (lit_utf8_byte_t) (byte & 0xf);\n  dest_p[2] = (lit_utf8_byte_t) ((hex_digit > 9) ? (hex_digit + ('A' - 10)) : (hex_digit + '0'));\n} /* ecma_builtin_global_object_byte_to_hex */\n\n/**\n * The Global object's 'encodeURI' and 'encodeURIComponent' routines\n *\n * See also:\n *          ECMA-262 v5, 15.1.3.3\n *          ECMA-262 v5, 15.1.3.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_global_object_encode_uri_helper (lit_utf8_byte_t *input_start_p, /**< routine's first argument's\n                                                                               *   string buffer */\n                                              lit_utf8_size_t input_size, /**< routine's first argument's\n                                                                           *   string buffer's size */\n                                              const uint8_t *unescaped_uri_bitset_p) /**< unescaped bitset */\n{\n  lit_utf8_byte_t *input_char_p = input_start_p;\n  const lit_utf8_byte_t *input_end_p = input_start_p + input_size;\n  ecma_char_t ch;\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n  lit_utf8_byte_t octets[LIT_UTF8_MAX_BYTES_IN_CODE_POINT];\n  memset (octets, LIT_BYTE_NULL, LIT_UTF8_MAX_BYTES_IN_CODE_POINT);\n\n  while (input_char_p < input_end_p)\n  {\n    input_char_p += lit_read_code_unit_from_utf8 (input_char_p, &ch);\n\n    if (lit_is_code_point_utf16_low_surrogate (ch))\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return ecma_raise_uri_error (ECMA_ERR_MSG (\"Unicode surrogate pair missing.\"));\n    }\n\n    lit_code_point_t cp = ch;\n\n    if (lit_is_code_point_utf16_high_surrogate (ch))\n    {\n      if (input_char_p == input_end_p)\n      {\n        ecma_stringbuilder_destroy (&builder);\n        return ecma_raise_uri_error (ECMA_ERR_MSG (\"Unicode surrogate pair missing.\"));\n      }\n\n      ecma_char_t next_ch;\n      lit_utf8_size_t read_size = lit_read_code_unit_from_utf8 (input_char_p, &next_ch);\n\n      if (lit_is_code_point_utf16_low_surrogate (next_ch))\n      {\n        cp = lit_convert_surrogate_pair_to_code_point (ch, next_ch);\n        input_char_p += read_size;\n      }\n      else\n      {\n        ecma_stringbuilder_destroy (&builder);\n        return ecma_raise_uri_error (ECMA_ERR_MSG (\"Unicode surrogate pair missing.\"));\n      }\n    }\n\n    lit_utf8_size_t utf_size = lit_code_point_to_utf8 (cp, octets);\n    lit_utf8_byte_t result_chars[URI_ENCODED_BYTE_SIZE];\n\n    if (utf_size == 1)\n    {\n      if (ecma_builtin_global_object_character_is_in (octets[0], unescaped_uri_bitset_p))\n      {\n        ecma_stringbuilder_append_byte (&builder, octets[0]);\n      }\n      else\n      {\n        ecma_builtin_global_object_byte_to_hex (result_chars, octets[0]);\n        ecma_stringbuilder_append_raw (&builder, result_chars, URI_ENCODED_BYTE_SIZE);\n      }\n    }\n    else\n    {\n      for (uint32_t i = 0; i < utf_size; i++)\n      {\n        JERRY_ASSERT (utf_size <= LIT_UTF8_MAX_BYTES_IN_CODE_POINT);\n        ecma_builtin_global_object_byte_to_hex (result_chars, octets[i]);\n        ecma_stringbuilder_append_raw (&builder, result_chars, URI_ENCODED_BYTE_SIZE);\n      }\n    }\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_global_object_encode_uri_helper */\n\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n\n/**\n * Maximum value of a byte.\n */\n#define ECMA_ESCAPE_MAXIMUM_BYTE_VALUE (255)\n\n/**\n * Format is a percent sign followed by lowercase u and four hex digits.\n */\n#define ECMA_ESCAPE_ENCODED_UNICODE_CHARACTER_SIZE (6)\n\n/**\n * Escape characters bitset:\n *   One bit for each character between 0 - 127.\n *   Bit is set if the character does not need to be converted to %xx form.\n *   These characters are: a-z A-Z 0-9 @ * _ + - . /\n */\nstatic const uint8_t ecma_escape_set[16] =\n{\n  0x0, 0x0, 0x0, 0x0, 0x0, 0xec, 0xff, 0x3,\n  0xff, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x7\n};\n\n/**\n * The Global object's 'escape' routine\n *\n * See also:\n *          ECMA-262 v5, B.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_global_object_escape (lit_utf8_byte_t *input_start_p, /**< routine's first argument's\n                                                                    *   string buffer */\n                                   lit_utf8_size_t input_size) /**< routine's first argument's\n                                                                *   string buffer's size */\n{\n  const lit_utf8_byte_t *input_curr_p = input_start_p;\n  const lit_utf8_byte_t *input_end_p = input_start_p + input_size;\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n  lit_utf8_byte_t result_chars[URI_ENCODED_BYTE_SIZE];\n\n  while (input_curr_p < input_end_p)\n  {\n    ecma_char_t chr = lit_cesu8_read_next (&input_curr_p);\n\n    if (chr <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n    {\n      if (ecma_builtin_global_object_character_is_in ((uint32_t) chr, ecma_escape_set))\n      {\n        ecma_stringbuilder_append_char (&builder, chr);\n      }\n      else\n      {\n        ecma_builtin_global_object_byte_to_hex (result_chars, chr);\n        ecma_stringbuilder_append_raw (&builder, result_chars, URI_ENCODED_BYTE_SIZE);\n      }\n    }\n    else if (chr > ECMA_ESCAPE_MAXIMUM_BYTE_VALUE)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_PERCENT);\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_LOWERCASE_U);\n\n      ecma_builtin_global_object_byte_to_hex (result_chars, (chr >> JERRY_BITSINBYTE));\n      ecma_stringbuilder_append_raw (&builder, result_chars + 1, 2);\n\n      ecma_builtin_global_object_byte_to_hex (result_chars, (chr & 0xff));\n      ecma_stringbuilder_append_raw (&builder, result_chars + 1, 2);\n    }\n    else\n    {\n      ecma_builtin_global_object_byte_to_hex (result_chars, chr);\n      ecma_stringbuilder_append_raw (&builder, result_chars, URI_ENCODED_BYTE_SIZE);\n    }\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_global_object_escape */\n\n/**\n * Utility method to resolve character sequences for the 'unescape' method.\n *\n * Expected formats: %uxxxx or %yy\n *\n * @return number of characters processed during the escape resolve\n */\nstatic uint8_t\necma_builtin_global_object_unescape_resolve_escape (const lit_utf8_byte_t *buffer_p,  /**< character buffer */\n                                                    bool unicode_sequence, /**< true if unescaping unicode sequence */\n                                                    ecma_char_t *out_result_p) /**< [out] resolved character */\n{\n  JERRY_ASSERT (buffer_p != NULL);\n  JERRY_ASSERT (out_result_p != NULL);\n\n  ecma_char_t unescaped_chr = 0;\n  uint8_t sequence_length = unicode_sequence ? 5 : 2;\n  uint8_t start = unicode_sequence ? 1 : 0;\n\n  for (uint8_t i = start; i < sequence_length; i++)\n  {\n    const lit_utf8_byte_t current_char = buffer_p[i];\n\n    if (!lit_char_is_hex_digit (current_char))\n    {\n      /* This was not an escape sequence, skip processing */\n      return 0;\n    }\n\n    unescaped_chr = (ecma_char_t) ((unescaped_chr << 4) + (ecma_char_t) lit_char_hex_to_int (current_char));\n  }\n\n  *out_result_p = unescaped_chr;\n\n  return sequence_length;\n} /* ecma_builtin_global_object_unescape_resolve_escape */\n\n/**\n * The Global object's 'unescape' routine\n *\n * See also:\n *          ECMA-262 v5, B.2.2\n *          ECMA-262 v11, B.2.1.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_global_object_unescape (lit_utf8_byte_t *input_start_p, /**< routine's first argument's\n                                                                      *   string buffer */\n                                     lit_utf8_size_t input_size) /**< routine's first argument's\n                                                                  *   string buffer's size */\n{\n  if (input_size == 0)\n  {\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  const lit_utf8_byte_t *input_curr_p = input_start_p;\n  const lit_utf8_byte_t *input_end_p = input_start_p + input_size;\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  while (input_curr_p < input_end_p)\n  {\n    ecma_char_t chr = lit_cesu8_read_next (&input_curr_p);\n\n    // potential pattern\n    if (chr == LIT_CHAR_PERCENT)\n    {\n      const lit_utf8_size_t chars_leftover = (lit_utf8_size_t) (input_end_p - input_curr_p);\n\n      // potential unicode sequence\n      if (chars_leftover >= 5 && input_curr_p[0] == LIT_CHAR_LOWERCASE_U)\n      {\n        input_curr_p += ecma_builtin_global_object_unescape_resolve_escape (input_curr_p, true, &chr);\n      }\n      // potential two hexa sequence\n      else if (chars_leftover >= 2)\n      {\n        input_curr_p += ecma_builtin_global_object_unescape_resolve_escape (input_curr_p, false, &chr);\n      }\n    }\n\n    ecma_stringbuilder_append_char (&builder, chr);\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_global_object_unescape */\n\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_global_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                      ecma_value_t this_arg, /**< 'this' argument value */\n                                      const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                              *   passed to routine */\n                                      uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (this_arg);\n  JERRY_UNUSED (arguments_list_p);\n  JERRY_UNUSED (arguments_number);\n\n  ecma_value_t routine_arg_1 = arguments_list_p[0];\n\n  if (builtin_routine_id == ECMA_GLOBAL_EVAL)\n  {\n    return ecma_builtin_global_object_eval (routine_arg_1);\n  }\n\n  if (builtin_routine_id <= ECMA_GLOBAL_IS_FINITE)\n  {\n    ecma_number_t arg_num;\n\n    routine_arg_1 = ecma_op_to_number (routine_arg_1, &arg_num);\n\n    if (!ecma_is_value_empty (routine_arg_1))\n    {\n      return routine_arg_1;\n    }\n\n    if (builtin_routine_id == ECMA_GLOBAL_IS_NAN)\n    {\n      return ecma_builtin_global_object_is_nan (arg_num);\n    }\n\n    JERRY_ASSERT (builtin_routine_id == ECMA_GLOBAL_IS_FINITE);\n\n    return ecma_builtin_global_object_is_finite (arg_num);\n  }\n\n  ecma_string_t *str_p = ecma_op_to_string (routine_arg_1);\n\n  if (JERRY_UNLIKELY (str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t ret_value;\n\n  if (builtin_routine_id <= ECMA_GLOBAL_PARSE_FLOAT)\n  {\n    ECMA_STRING_TO_UTF8_STRING (str_p, string_buff, string_buff_size);\n\n    if (builtin_routine_id == ECMA_GLOBAL_PARSE_INT)\n    {\n      ret_value = ecma_number_parse_int (string_buff,\n                                         string_buff_size,\n                                         arguments_list_p[1]);\n    }\n    else\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_GLOBAL_PARSE_FLOAT);\n      ret_value = ecma_number_parse_float (string_buff,\n                                           string_buff_size);\n    }\n\n    ECMA_FINALIZE_UTF8_STRING (string_buff, string_buff_size);\n    ecma_deref_ecma_string (str_p);\n    return ret_value;\n  }\n\n  lit_utf8_size_t input_size = ecma_string_get_size (str_p);\n\n  JMEM_DEFINE_LOCAL_ARRAY (input_start_p,\n                           input_size + 1,\n                           lit_utf8_byte_t);\n\n  ecma_string_to_utf8_bytes (str_p, input_start_p, input_size);\n\n  input_start_p[input_size] = LIT_BYTE_NULL;\n\n  switch (builtin_routine_id)\n  {\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n    case ECMA_GLOBAL_ESCAPE:\n    {\n      ret_value = ecma_builtin_global_object_escape (input_start_p, input_size);\n      break;\n    }\n    case ECMA_GLOBAL_UNESCAPE:\n    {\n      ret_value = ecma_builtin_global_object_unescape (input_start_p, input_size);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n    case ECMA_GLOBAL_DECODE_URI:\n    case ECMA_GLOBAL_DECODE_URI_COMPONENT:\n    {\n      const uint8_t *uri_set = (builtin_routine_id == ECMA_GLOBAL_DECODE_URI ? unescaped_uri_set\n                                                                             : unescaped_uri_component_set);\n\n      ret_value = ecma_builtin_global_object_decode_uri_helper (input_start_p, input_size, uri_set);\n      break;\n    }\n    default:\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_GLOBAL_ENCODE_URI\n                    || builtin_routine_id == ECMA_GLOBAL_ENCODE_URI_COMPONENT);\n\n      const uint8_t *uri_set = (builtin_routine_id == ECMA_GLOBAL_ENCODE_URI ? unescaped_uri_set\n                                                                             : unescaped_uri_component_set);\n\n      ret_value = ecma_builtin_global_object_encode_uri_helper (input_start_p, input_size, uri_set);\n      break;\n    }\n  }\n\n  JMEM_FINALIZE_LOCAL_ARRAY (input_start_p);\n\n  ecma_deref_ecma_string (str_p);\n  return ret_value;\n} /* ecma_builtin_global_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Global built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* Simple value properties:\n * (property name, simple value, writable, enumerable, configurable) */\n\n/* ECMA-262 v5, 15.1.1.3 */\nSIMPLE_VALUE (LIT_MAGIC_STRING_UNDEFINED,\n              ECMA_VALUE_UNDEFINED,\n              ECMA_PROPERTY_FIXED)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\n/* ECMA-262 v5, 15.1.1.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_NAN,\n              ECMA_BUILTIN_NUMBER_NAN,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.1.1.2 */\nNUMBER_VALUE (LIT_MAGIC_STRING_INFINITY_UL,\n              ECMA_BUILTIN_NUMBER_POSITIVE_INFINITY,\n              ECMA_PROPERTY_FIXED)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.1.4.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_OBJECT_UL,\n              ECMA_BUILTIN_ID_OBJECT,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.1.4.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_FUNCTION_UL,\n              ECMA_BUILTIN_ID_FUNCTION,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.1.4.3 */\n#if ENABLED (JERRY_BUILTIN_ARRAY)\nOBJECT_VALUE (LIT_MAGIC_STRING_ARRAY_UL,\n              ECMA_BUILTIN_ID_ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */\n\n#if ENABLED (JERRY_BUILTIN_STRING)\n/* ECMA-262 v5, 15.1.4.4 */\nOBJECT_VALUE (LIT_MAGIC_STRING_STRING_UL,\n              ECMA_BUILTIN_ID_STRING,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n/* ECMA-262 v5, 15.1.4.5 */\nOBJECT_VALUE (LIT_MAGIC_STRING_BOOLEAN_UL,\n              ECMA_BUILTIN_ID_BOOLEAN,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n/* ECMA-262 v5, 15.1.4.6 */\nOBJECT_VALUE (LIT_MAGIC_STRING_NUMBER_UL,\n              ECMA_BUILTIN_ID_NUMBER,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n\n#if ENABLED (JERRY_BUILTIN_DATE)\n/* ECMA-262 v5, 15.1.4.7 */\nOBJECT_VALUE (LIT_MAGIC_STRING_DATE_UL,\n              ECMA_BUILTIN_ID_DATE,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n/* ECMA-262 v5, 15.1.4.8 */\nOBJECT_VALUE (LIT_MAGIC_STRING_REGEXP_UL,\n              ECMA_BUILTIN_ID_REGEXP,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n/* ECMA-262 v5, 15.1.4.9 */\nOBJECT_VALUE (LIT_MAGIC_STRING_ERROR_UL,\n              ECMA_BUILTIN_ID_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* ECMA-262 v5, 15.1.4.10 */\nOBJECT_VALUE (LIT_MAGIC_STRING_EVAL_ERROR_UL,\n              ECMA_BUILTIN_ID_EVAL_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.1.4.11 */\nOBJECT_VALUE (LIT_MAGIC_STRING_RANGE_ERROR_UL,\n              ECMA_BUILTIN_ID_RANGE_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.1.4.12 */\nOBJECT_VALUE (LIT_MAGIC_STRING_REFERENCE_ERROR_UL,\n              ECMA_BUILTIN_ID_REFERENCE_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.1.4.13 */\nOBJECT_VALUE (LIT_MAGIC_STRING_SYNTAX_ERROR_UL,\n              ECMA_BUILTIN_ID_SYNTAX_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.1.4.14 */\nOBJECT_VALUE (LIT_MAGIC_STRING_TYPE_ERROR_UL,\n              ECMA_BUILTIN_ID_TYPE_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.1.4.15 */\nOBJECT_VALUE (LIT_MAGIC_STRING_URI_ERROR_UL,\n              ECMA_BUILTIN_ID_URI_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#if ENABLED (JERRY_BUILTIN_MATH)\n/* ECMA-262 v5, 15.1.5.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_MATH_UL,\n              ECMA_BUILTIN_ID_MATH,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_MATH) */\n#if ENABLED (JERRY_BUILTIN_REFLECT)\n/* ECMA-262 v6, 26.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_REFLECT_UL,\n              ECMA_BUILTIN_ID_REFLECT,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_REFLECT) */\n\n#if ENABLED (JERRY_BUILTIN_JSON)\n/* ECMA-262 v5, 15.1.5.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_JSON_U,\n              ECMA_BUILTIN_ID_JSON,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nOBJECT_VALUE (LIT_MAGIC_STRING_ARRAY_BUFFER_UL,\n              ECMA_BUILTIN_ID_ARRAYBUFFER,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nOBJECT_VALUE (LIT_MAGIC_STRING_INT8_ARRAY_UL,\n              ECMA_BUILTIN_ID_INT8ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nOBJECT_VALUE (LIT_MAGIC_STRING_UINT8_ARRAY_UL,\n              ECMA_BUILTIN_ID_UINT8ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nOBJECT_VALUE (LIT_MAGIC_STRING_INT16_ARRAY_UL,\n              ECMA_BUILTIN_ID_INT16ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nOBJECT_VALUE (LIT_MAGIC_STRING_UINT16_ARRAY_UL,\n              ECMA_BUILTIN_ID_UINT16ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nOBJECT_VALUE (LIT_MAGIC_STRING_INT32_ARRAY_UL,\n              ECMA_BUILTIN_ID_INT32ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nOBJECT_VALUE (LIT_MAGIC_STRING_UINT32_ARRAY_UL,\n              ECMA_BUILTIN_ID_UINT32ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nOBJECT_VALUE (LIT_MAGIC_STRING_FLOAT32_ARRAY_UL,\n              ECMA_BUILTIN_ID_FLOAT32ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nOBJECT_VALUE (LIT_MAGIC_STRING_FLOAT64_ARRAY_UL,\n              ECMA_BUILTIN_ID_FLOAT64ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\nOBJECT_VALUE (LIT_MAGIC_STRING_BIGINT64_ARRAY_UL,\n              ECMA_BUILTIN_ID_BIGINT64ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nOBJECT_VALUE (LIT_MAGIC_STRING_BIGUINT64_ARRAY_UL,\n              ECMA_BUILTIN_ID_BIGUINT64ARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\nOBJECT_VALUE (LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL,\n              ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\nOBJECT_VALUE (LIT_MAGIC_STRING_PROMISE_UL,\n              ECMA_BUILTIN_ID_PROMISE,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n/* ECMA-262 v6, 23.1.1.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_MAP_UL,\n              ECMA_BUILTIN_ID_MAP,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n\n#if ENABLED (JERRY_BUILTIN_SET)\n/* ECMA-262 v6, 23.1.1.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_SET_UL,\n              ECMA_BUILTIN_ID_SET,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n/* ECMA-262 v6, 23.1.1.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_WEAKMAP_UL,\n              ECMA_BUILTIN_ID_WEAKMAP,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n/* ECMA-262 v6, 23.1.1.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_WEAKSET_UL,\n              ECMA_BUILTIN_ID_WEAKSET,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#if ENABLED (JERRY_ESNEXT)\n/* ECMA-262 v6, 19.4.1.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_SYMBOL_UL,\n              ECMA_BUILTIN_ID_SYMBOL,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v11, 18.1.1 */\nSIMPLE_VALUE (LIT_MAGIC_STRING_GLOBAL_THIS_UL,\n              ECMA_VALUE_GLOBAL_THIS,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n/* ECMA-262 v6, 23.1.1.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_DATAVIEW_UL,\n              ECMA_BUILTIN_ID_DATAVIEW,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n/* ECMA-262 v6, 26.2.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROXY_UL,\n              ECMA_BUILTIN_ID_PROXY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n/* ECMA-262 v11, 20.2.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_BIGINT_UL,\n              ECMA_BUILTIN_ID_BIGINT,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\n\nROUTINE (LIT_MAGIC_STRING_EVAL, ECMA_GLOBAL_EVAL, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_NAN, ECMA_GLOBAL_IS_NAN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_FINITE, ECMA_GLOBAL_IS_FINITE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_DECODE_URI, ECMA_GLOBAL_DECODE_URI, 1, 1)\nROUTINE (LIT_MAGIC_STRING_DECODE_URI_COMPONENT, ECMA_GLOBAL_DECODE_URI_COMPONENT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ENCODE_URI, ECMA_GLOBAL_ENCODE_URI, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ENCODE_URI_COMPONENT, ECMA_GLOBAL_ENCODE_URI_COMPONENT, 1, 1)\n#if ENABLED (JERRY_ESNEXT)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_PARSE_FLOAT, LIT_MAGIC_STRING_PARSE_FLOAT, ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_PARSE_INT, LIT_MAGIC_STRING_PARSE_INT, ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#else /* !ENABLED (JERRY_ESNEXT) */\nROUTINE (LIT_MAGIC_STRING_PARSE_FLOAT, ECMA_GLOBAL_PARSE_FLOAT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_PARSE_INT, ECMA_GLOBAL_PARSE_INT, 2, 2)\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\nROUTINE (LIT_MAGIC_STRING_ESCAPE, ECMA_GLOBAL_ESCAPE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_UNESCAPE, ECMA_GLOBAL_UNESCAPE, 1, 1)\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-handlers.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#include \"ecma-builtin-handlers.h\"\n#include \"ecma-promise-object.h\"\n\nstatic const ecma_native_handler_t ecma_native_handlers[] =\n{\n#define ECMA_NATIVE_HANDLER(id, handler, length) handler,\n#include \"ecma-builtin-handlers.inc.h\"\n#undef ECMA_NATIVE_HANDLER\n};\n\nstatic const uint8_t  ecma_native_handler_lengths[] =\n{\n#define ECMA_NATIVE_HANDLER(id, handler, length) length,\n#include \"ecma-builtin-handlers.inc.h\"\n#undef ECMA_NATIVE_HANDLER\n};\n\n/**\n * Get the native handler of a built-in handler type.\n *\n * return Function pointer of the handler\n */\necma_native_handler_t\necma_builtin_handler_get (ecma_native_handler_id_t id) /**< handler id */\n{\n  JERRY_ASSERT (id != ECMA_NATIVE_HANDLER_START && id < ECMA_NATIVE_HANDLER__COUNT);\n  return ecma_native_handlers[id - 1];\n} /* ecma_builtin_handler_get */\n\n/**\n * Get the initial 'length' value of a built-in handler type.\n *\n * return 'length' value of the handler\n */\nuint8_t\necma_builtin_handler_get_length (ecma_native_handler_id_t id) /**< handler id */\n{\n  JERRY_ASSERT (id != ECMA_NATIVE_HANDLER_START && id < ECMA_NATIVE_HANDLER__COUNT);\n  return ecma_native_handler_lengths[id - 1];\n} /* ecma_builtin_handler_get_length */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-handlers.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_BUILTIN_HANDLERS_H\n#define ECMA_BUILTIN_HANDLERS_H\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#include \"ecma-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-promise-object.h\"\n#include \"ecma-proxy-object.h\"\n\ntypedef enum\n{\n  ECMA_NATIVE_HANDLER_START = 0,\n#define ECMA_NATIVE_HANDLER(id, handler, length) id,\n#include \"ecma-builtin-handlers.inc.h\"\n#undef ECMA_NATIVE_HANDLER\n  ECMA_NATIVE_HANDLER__COUNT\n} ecma_native_handler_id_t;\n\ntypedef enum\n{\n  ECMA_NATIVE_HANDLER_FLAGS_NONE = 0,\n  ECMA_NATIVE_HANDLER_FLAGS_NAME_INITIALIZED = (1 << 0),\n  ECMA_NATIVE_HANDLER_FLAGS_LENGTH_INITIALIZED = (1 << 1),\n  ECMA_NATIVE_HANDLER_FLAGS_PROMISE_ALREADY_RESOLVED = (1 << 2),\n} ecma_native_handler_flags_t;\n\necma_native_handler_t\necma_builtin_handler_get (ecma_native_handler_id_t id);\nuint8_t\necma_builtin_handler_get_length (ecma_native_handler_id_t id);\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* !ECMA_BUILTIN_HANDLERS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-handlers.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_RESOLVE, ecma_promise_resolve_handler, 1)\nECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_REJECT, ecma_promise_reject_handler, 1)\nECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_THEN_FINALLY, ecma_promise_then_finally_cb, 1)\nECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_CATCH_FINALLY, ecma_promise_catch_finally_cb, 1)\nECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_ALL_HELPER, ecma_promise_all_handler_cb, 1)\nECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_CAPABILITY_EXECUTOR, ecma_op_get_capabilities_executor_cb, 2)\n#if ENABLED (JERRY_BUILTIN_PROXY)\nECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROXY_REVOKE, ecma_proxy_revoke_cb, 0)\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\nECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_VALUE_THUNK, ecma_value_thunk_helper_cb, 0)\nECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_VALUE_THROWER, ecma_value_thunk_thrower_cb, 0)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-date.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATE)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltinhelpers ECMA builtin helper operations\n * @{\n */\n\nconst char day_names_p[7][3] =\n{\n  \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"\n};\n\nconst char month_names_p[12][3] =\n{\n  \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"\n};\n\n/**\n * Helper function to get day number from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.2\n *\n * @return time value for day number\n */\nextern inline ecma_number_t JERRY_ATTR_ALWAYS_INLINE\necma_date_day (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  return (ecma_number_t) floor (time / ECMA_DATE_MS_PER_DAY);\n} /* ecma_date_day */\n\n/**\n * Helper function to get time within day from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.2\n *\n * @return time value within the day\n */\nextern inline ecma_number_t JERRY_ATTR_ALWAYS_INLINE\necma_date_time_within_day (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  ecma_number_t modulo = fmod (time, ECMA_DATE_MS_PER_DAY);\n  if (modulo < 0)\n  {\n    modulo += ECMA_DATE_MS_PER_DAY;\n  }\n\n  return modulo;\n} /* ecma_date_time_within_day */\n\n/**\n * Helper function to get the day number of the first day of a year.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.3\n *\n * @return day number of the first day of a year\n */\nstatic ecma_number_t\necma_date_day_from_year (ecma_number_t year) /**< year value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (year));\n\n  return (ecma_number_t) (365 * (year - 1970)\n                          + floor ((year - 1969) / 4)\n                          - floor ((year - 1901) / 100)\n                          + floor ((year - 1601) / 400));\n} /* ecma_date_day_from_year */\n\n/**\n * Helper function to get the time value of the start of a year.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.3\n *\n * @return  time value of the start of a year\n */\nstatic inline ecma_number_t JERRY_ATTR_ALWAYS_INLINE\necma_date_time_from_year (ecma_number_t year) /**< year value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (year));\n\n  return ECMA_DATE_MS_PER_DAY * ecma_date_day_from_year (year);\n} /* ecma_date_time_from_year */\n\n/**\n * Helper function to determine a year value from the time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.3\n *\n * @return year value\n */\necma_number_t\necma_date_year_from_time (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  /* ECMA-262 v5, 15.9.1.1 define the largest year that is\n   * representable (285616) forward from 01 January, 1970 UTC.\n   */\n  ecma_number_t year = (ecma_number_t) (1970 + 285616);\n  ecma_number_t lower_year_boundary = (ecma_number_t) (1970 - 285616);\n\n  if (ecma_date_time_from_year (year) < time || ecma_date_time_from_year (lower_year_boundary) > time)\n  {\n    return ecma_number_make_nan ();\n  }\n\n  while (ecma_date_time_from_year (year) > time)\n  {\n    ecma_number_t year_boundary = (ecma_number_t) floor (lower_year_boundary + (year - lower_year_boundary) / 2);\n    if (ecma_date_time_from_year (year_boundary) > time)\n    {\n      year = year_boundary;\n    }\n    else\n    {\n      lower_year_boundary = year_boundary;\n    }\n\n    year--;\n  }\n\n  return year;\n} /* ecma_date_year_from_time */\n\n/**\n * Helper function to decide if time value is in a leap-year.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.3\n *\n * @return 1 if time within a leap year\n *         0 otherwise\n */\nstatic int\necma_date_in_leap_year (ecma_number_t year) /**< time value */\n{\n  int mod_400 = (int) fmod (floor (year), 400);\n\n  JERRY_ASSERT (mod_400 >= -399 && mod_400 <= 399);\n\n  if ((mod_400 % 4) != 0)\n  {\n    return 0;\n  }\n\n  if ((mod_400 % 100) != 0)\n  {\n    return 1;\n  }\n\n  if (mod_400 != 0)\n  {\n    return 0;\n  }\n\n  return 1;\n} /* ecma_date_in_leap_year */\n\n/**\n * End day for the first 11 months.\n */\nstatic const int16_t ecma_date_month_end_day[10] =\n{\n  58, 89, 119, 150, 180, 211, 242, 272, 303, 333\n};\n\n/**\n * Helper function to get month from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.4\n *\n * @return month number\n */\necma_number_t\necma_date_month_from_time (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  ecma_number_t year = ecma_date_year_from_time (time);\n\n  if (ecma_number_is_nan (year))\n  {\n    return ecma_number_make_nan ();\n  }\n\n  int day_within_year = (int) (ecma_date_day (time) - ecma_date_day_from_year (year));\n\n  JERRY_ASSERT (day_within_year >= 0);\n\n  if (day_within_year <= 30)\n  {\n    return 0;\n  }\n\n  day_within_year -= ecma_date_in_leap_year (year);\n\n  JERRY_ASSERT (day_within_year < 365);\n\n  for (int i = 0; i < 10; i++)\n  {\n    if (day_within_year <= ecma_date_month_end_day[i])\n    {\n      return i + 1;\n    }\n  }\n\n  return 11;\n} /* ecma_date_month_from_time */\n\n/**\n * Helper function to get date number from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.5\n *\n * @return date number\n */\necma_number_t\necma_date_date_from_time (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  ecma_number_t year = ecma_date_year_from_time (time);\n\n  if (ecma_number_is_nan (year))\n  {\n    return ecma_number_make_nan ();\n  }\n\n  int day_within_year = (int) (ecma_date_day (time) - ecma_date_day_from_year (year));\n\n  JERRY_ASSERT (day_within_year >= 0);\n\n  if (day_within_year <= 30)\n  {\n    return day_within_year + 1;\n  }\n\n  int leap_year = ecma_date_in_leap_year (year);\n\n  if (day_within_year <= 58 + leap_year)\n  {\n    return day_within_year - 30;\n  }\n\n  day_within_year -= leap_year;\n\n  JERRY_ASSERT (day_within_year < 365);\n\n  for (int i = 1; i < 10; i++)\n  {\n    if (day_within_year <= ecma_date_month_end_day[i])\n    {\n      return day_within_year - ecma_date_month_end_day[i - 1];\n    }\n  }\n\n  return day_within_year - 333;\n} /* ecma_date_date_from_time */\n\n/**\n * Helper function to get weekday from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.6\n *\n * Used by:\n *         - The Date.prototype.getDay routine. (Generated.)\n *         - The Date.prototype.getUTCDay routine. (Generated.)\n *\n * @return  weekday number\n */\necma_number_t\necma_date_week_day (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  ecma_number_t week_day = (ecma_number_t) fmod ((ecma_date_day (time) + 4), 7);\n\n  return (week_day < 0) ? (7 + week_day) : week_day;\n} /* ecma_date_week_day */\n\n/**\n * Helper function to get the local time zone offset at a given UTC timestamp.\n * You can add this number to the given UTC timestamp to get local time.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.9\n *\n * @return local time zone adjustment\n */\nextern inline ecma_number_t JERRY_ATTR_ALWAYS_INLINE\necma_date_local_time_zone_adjustment (ecma_number_t time) /**< time value */\n{\n  return jerry_port_get_local_time_zone_adjustment (time, true);\n} /* ecma_date_local_time_zone_adjustment */\n\n/**\n * Helper function to get UTC time from local time.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.9\n *\n * @return UTC time\n */\necma_number_t\necma_date_utc (ecma_number_t time) /**< time value */\n{\n  return time - jerry_port_get_local_time_zone_adjustment (time, false);\n} /* ecma_date_utc */\n\n/**\n * Helper function to get hour from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.10\n *\n * @return hour value\n */\necma_number_t\necma_date_hour_from_time (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  ecma_number_t hour = (ecma_number_t) fmod (floor (time / ECMA_DATE_MS_PER_HOUR),\n                                             ECMA_DATE_HOURS_PER_DAY);\n  return (hour < 0) ? ECMA_DATE_HOURS_PER_DAY + hour : hour;\n} /* ecma_date_hour_from_time */\n\n/**\n * Helper function to get minute from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.10\n *\n * @return minute value\n */\necma_number_t\necma_date_min_from_time (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  ecma_number_t min = (ecma_number_t) fmod (floor (time / ECMA_DATE_MS_PER_MINUTE),\n                                            ECMA_DATE_MINUTES_PER_HOUR);\n  return (min < 0) ? ECMA_DATE_MINUTES_PER_HOUR + min : min;\n} /* ecma_date_min_from_time */\n\n/**\n * Helper function to get second from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.10\n *\n * @return second value\n */\necma_number_t\necma_date_sec_from_time (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  ecma_number_t sec = (ecma_number_t) fmod (floor (time / ECMA_DATE_MS_PER_SECOND),\n                                            ECMA_DATE_SECONDS_PER_MINUTE);\n  return (sec < 0) ? ECMA_DATE_SECONDS_PER_MINUTE + sec : sec;\n} /* ecma_date_sec_from_time */\n\n/**\n * Helper function to get millisecond from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.10\n *\n * @return millisecond value\n */\necma_number_t\necma_date_ms_from_time (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  ecma_number_t milli = (ecma_number_t) fmod (time, ECMA_DATE_MS_PER_SECOND);\n  return (milli < 0) ? ECMA_DATE_MS_PER_SECOND + milli : milli;\n} /* ecma_date_ms_from_time */\n\n/**\n * Helper function to make time value from hour, min, sec and ms.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.11\n *\n * @return time value\n */\necma_number_t\necma_date_make_time (ecma_number_t hour, /**< hour value */\n                     ecma_number_t min, /**< minute value */\n                     ecma_number_t sec, /**< second value */\n                     ecma_number_t ms) /**< millisecond value */\n{\n  if (ecma_number_is_nan (hour)\n      || ecma_number_is_nan (min)\n      || ecma_number_is_nan (sec)\n      || ecma_number_is_nan (ms)\n      || ecma_number_is_infinity (hour)\n      || ecma_number_is_infinity (min)\n      || ecma_number_is_infinity (sec)\n      || ecma_number_is_infinity (ms))\n  {\n    return ecma_number_make_nan ();\n  }\n\n  /* Replaced toInteger to ecma_number_trunc because it does the same thing. */\n  ecma_number_t h = ecma_number_trunc (hour);\n  ecma_number_t m = ecma_number_trunc (min);\n  ecma_number_t s = ecma_number_trunc (sec);\n  ecma_number_t milli = ecma_number_trunc (ms);\n\n  return (h * ECMA_DATE_MS_PER_HOUR\n          + m * ECMA_DATE_MS_PER_MINUTE\n          + s * ECMA_DATE_MS_PER_SECOND\n          + milli);\n} /* ecma_date_make_time */\n\n/**\n * Helper function to make day value from year, month and date.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.12\n *\n * @return day value\n */\necma_number_t\necma_date_make_day (ecma_number_t year, /**< year value */\n                    ecma_number_t month, /**< month value */\n                    ecma_number_t date) /**< date value */\n{\n  /* 1. */\n  if (ecma_number_is_nan (year)\n      || ecma_number_is_nan (month)\n      || ecma_number_is_nan (date)\n      || ecma_number_is_infinity (year)\n      || ecma_number_is_infinity (month)\n      || ecma_number_is_infinity (date))\n  {\n    return ecma_number_make_nan ();\n  }\n\n  /* 2., 3., 4. */\n  ecma_number_t y = ecma_number_trunc (year);\n  ecma_number_t m = ecma_number_trunc (month);\n  ecma_number_t dt = ecma_number_trunc (date);\n  /* 5. */\n  ecma_number_t ym = y + (ecma_number_t) floor (m / 12);\n  /* 6. */\n  ecma_number_t mn = (ecma_number_t) fmod (m, 12);\n  mn = (mn < 0) ? 12 + mn : mn;\n\n  /* 7. */\n  ecma_number_t time = ecma_date_time_from_year (ym);\n\n  /**\n   * The algorithm below searches the following date: ym-mn-1\n   * To find this time it starts from the beginning of the year (ym)\n   * then find the first day of the month.\n   */\n  if (!ecma_number_is_nan (time)\n      && ecma_date_year_from_time (time) == ym)\n  {\n    /* Get the month */\n    time += 31 * mn * ECMA_DATE_MS_PER_DAY;\n\n    /* Get the month's first day */\n    time += ((ecma_number_t) 1.0 - ecma_date_date_from_time (time)) * ECMA_DATE_MS_PER_DAY;\n\n    if (!ecma_number_is_nan (time)\n        && ecma_date_month_from_time (time) == mn\n        && ecma_date_date_from_time (time) == 1)\n    {\n      /* 8. */\n      return ecma_date_day (time) + dt - ((ecma_number_t) 1.0);\n    }\n  }\n\n  return ecma_number_make_nan ();\n} /* ecma_date_make_day */\n\n/**\n * Helper function to make date value from day and time.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.13\n *\n * @return date value\n */\necma_number_t\necma_date_make_date (ecma_number_t day, /**< day value */\n                     ecma_number_t time) /**< time value */\n{\n  if (ecma_number_is_nan (day)\n      || ecma_number_is_nan (time))\n  {\n    return ecma_number_make_nan ();\n  }\n\n  ecma_number_t result = day * ECMA_DATE_MS_PER_DAY + time;\n\n  if (ecma_number_is_infinity (result))\n  {\n    return ecma_number_make_nan ();\n  }\n\n  return result;\n} /* ecma_date_make_date */\n\n/**\n * Helper function to calculate number of milliseconds from time value.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.14\n *\n * @return number of milliseconds\n */\necma_number_t\necma_date_time_clip (ecma_number_t time) /**< time value */\n{\n  if (ecma_number_is_nan (time)\n      || ecma_number_is_infinity (time)\n      || fabs (time) > ECMA_DATE_MAX_VALUE)\n  {\n    return ecma_number_make_nan ();\n  }\n\n  return ecma_number_trunc (time);\n} /* ecma_date_time_clip */\n\n/**\n * Helper function to calculate timezone offset.\n *\n * See also:\n *          ECMA-262 v5, 15.9.5.26\n *\n * @return timezone offset\n */\nextern inline ecma_number_t JERRY_ATTR_ALWAYS_INLINE\necma_date_timezone_offset (ecma_number_t time) /**< time value */\n{\n  JERRY_ASSERT (!ecma_number_is_nan (time));\n\n  return (-ecma_date_local_time_zone_adjustment (time)) / ECMA_DATE_MS_PER_MINUTE;\n} /* ecma_date_timezone_offset */\n\n/**\n * Common function to convert date to string.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_date_to_string_format (ecma_number_t datetime_number, /**< datetime */\n                            const char *format_p) /**< format buffer */\n{\n  const uint32_t date_buffer_length = 37;\n  JERRY_VLA (lit_utf8_byte_t, date_buffer, date_buffer_length);\n\n  lit_utf8_byte_t *dest_p = date_buffer;\n\n  while (*format_p != LIT_CHAR_NULL)\n  {\n    if (*format_p != LIT_CHAR_DOLLAR_SIGN)\n    {\n      *dest_p++ = (lit_utf8_byte_t) *format_p++;\n      continue;\n    }\n\n    format_p++;\n\n    const char *str_p = NULL;\n    int32_t number = 0;\n    int32_t number_length = 0;\n\n    switch (*format_p)\n    {\n      case LIT_CHAR_UPPERCASE_Y: /* Year. */\n      {\n        number = (int32_t) ecma_date_year_from_time (datetime_number);\n\n        if (number >= 100000 || number <= -100000)\n        {\n          number_length = 6;\n        }\n        else if (number >= 10000 || number <= -10000)\n        {\n          number_length = 5;\n        }\n        else\n        {\n          number_length = 4;\n        }\n        break;\n      }\n      case LIT_CHAR_LOWERCASE_Y: /* ISO Year: -000001, 0000, 0001, 9999, +012345 */\n      {\n        number = (int32_t) ecma_date_year_from_time (datetime_number);\n        if (0 <= number && number <= 9999)\n        {\n          number_length = 4;\n        }\n        else\n        {\n          number_length = 6;\n        }\n        break;\n      }\n      case LIT_CHAR_UPPERCASE_M: /* Month. */\n      {\n        int32_t month = (int32_t) ecma_date_month_from_time (datetime_number);\n\n        JERRY_ASSERT (month >= 0 && month <= 11);\n\n        str_p = month_names_p[month];\n        break;\n      }\n      case LIT_CHAR_UPPERCASE_O: /* Month as number. */\n      {\n        /* The 'ecma_date_month_from_time' (ECMA 262 v5, 15.9.1.4) returns a\n         * number from 0 to 11, but we have to print the month from 1 to 12\n         * for ISO 8601 standard (ECMA 262 v5, 15.9.1.15). */\n        number = ((int32_t) ecma_date_month_from_time (datetime_number)) + 1;\n        number_length = 2;\n        break;\n      }\n      case LIT_CHAR_UPPERCASE_D: /* Day. */\n      {\n        number = (int32_t) ecma_date_date_from_time (datetime_number);\n        number_length = 2;\n        break;\n      }\n      case LIT_CHAR_UPPERCASE_W: /* Day of week. */\n      {\n        int32_t day = (int32_t) ecma_date_week_day (datetime_number);\n\n        JERRY_ASSERT (day >= 0 && day <= 6);\n\n        str_p = day_names_p[day];\n        break;\n      }\n      case LIT_CHAR_LOWERCASE_H: /* Hour. */\n      {\n        number = (int32_t) ecma_date_hour_from_time (datetime_number);\n        number_length = 2;\n        break;\n      }\n      case LIT_CHAR_LOWERCASE_M: /* Minutes. */\n      {\n        number = (int32_t) ecma_date_min_from_time (datetime_number);\n        number_length = 2;\n        break;\n      }\n      case LIT_CHAR_LOWERCASE_S: /* Seconds. */\n      {\n        number = (int32_t) ecma_date_sec_from_time (datetime_number);\n        number_length = 2;\n        break;\n      }\n      case LIT_CHAR_LOWERCASE_I: /* Milliseconds. */\n      {\n        number = (int32_t) ecma_date_ms_from_time (datetime_number);\n        number_length = 3;\n        break;\n      }\n      case LIT_CHAR_LOWERCASE_Z: /* Time zone hours part. */\n      {\n        int32_t time_zone = (int32_t) ecma_date_local_time_zone_adjustment (datetime_number);\n\n        if (time_zone >= 0)\n        {\n          *dest_p++ = LIT_CHAR_PLUS;\n        }\n        else\n        {\n          *dest_p++ = LIT_CHAR_MINUS;\n          time_zone = -time_zone;\n        }\n\n        number = time_zone / (int32_t) ECMA_DATE_MS_PER_HOUR;\n        number_length = 2;\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (*format_p == LIT_CHAR_UPPERCASE_Z); /* Time zone minutes part. */\n\n        int32_t time_zone = (int32_t) ecma_date_local_time_zone_adjustment (datetime_number);\n\n        if (time_zone < 0)\n        {\n          time_zone = -time_zone;\n        }\n\n        number = time_zone % (int32_t) ECMA_DATE_MS_PER_HOUR / (int32_t) ECMA_DATE_MS_PER_MINUTE;\n        number_length = 2;\n        break;\n      }\n    }\n\n    format_p++;\n\n    if (str_p != NULL)\n    {\n      /* Print string values: month or day name which is always 3 characters */\n      memcpy (dest_p, str_p, 3);\n      dest_p += 3;\n      continue;\n    }\n\n    /* Print right aligned number values. */\n    JERRY_ASSERT (number_length > 0);\n\n    if (number < 0)\n    {\n      number = -number;\n      *dest_p++ = '-';\n    }\n    else if (*(format_p - 1) == LIT_CHAR_LOWERCASE_Y && number_length == 6)\n    {\n      /* positive sign is compulsory for extended years */\n      *dest_p++ = '+';\n    }\n\n    dest_p += number_length;\n    lit_utf8_byte_t *buffer_p = dest_p;\n\n    do\n    {\n      buffer_p--;\n      *buffer_p = (lit_utf8_byte_t) ((number % 10) + (int32_t) LIT_CHAR_0);\n      number /= 10;\n    }\n    while (--number_length);\n  }\n\n  JERRY_ASSERT (dest_p <= date_buffer + date_buffer_length);\n\n  return ecma_make_string_value (ecma_new_ecma_string_from_utf8 (date_buffer,\n                                                                 (lit_utf8_size_t) (dest_p - date_buffer)));\n} /* ecma_date_to_string_format */\n\n/**\n * Common function to create a time zone specific string from a numeric value.\n *\n * Used by:\n *        - The Date routine.\n *        - The Date.prototype.toString routine.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_date_value_to_string (ecma_number_t datetime_number) /**< datetime */\n{\n  datetime_number += ecma_date_local_time_zone_adjustment (datetime_number);\n  return ecma_date_to_string_format (datetime_number, \"$W $M $D $Y $h:$m:$s GMT$z$Z\");\n} /* ecma_date_value_to_string */\n\n/**\n * Common function to create a time zone specific string from a numeric value.\n *\n * Used by:\n *        - The Date.prototype.toUTCString routine.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_date_value_to_utc_string (ecma_number_t datetime_number) /**< datetime */\n{\n  return ecma_date_to_string_format (datetime_number, \"$W, $D $M $Y $h:$m:$s GMT\");\n} /* ecma_date_value_to_utc_string */\n\n/**\n * Common function to create a ISO specific string from a numeric value.\n *\n * Used by:\n *        - The Date.prototype.toISOString routine.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_date_value_to_iso_string (ecma_number_t datetime_number) /**<datetime */\n{\n  return ecma_date_to_string_format (datetime_number, \"$y-$O-$DT$h:$m:$s.$iZ\");\n} /* ecma_date_value_to_iso_string */\n\n/**\n * Common function to create a date string from a numeric value.\n *\n * Used by:\n *        - The Date.prototype.toDateString routine.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_date_value_to_date_string (ecma_number_t datetime_number) /**<datetime */\n{\n  return ecma_date_to_string_format (datetime_number, \"$Y-$O-$D\");\n} /* ecma_date_value_to_date_string */\n\n/**\n * Common function to create a time string from a numeric value.\n *\n * Used by:\n *        - The Date.prototype.toTimeString routine.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_date_value_to_time_string (ecma_number_t datetime_number) /**<datetime */\n{\n  return ecma_date_to_string_format (datetime_number, \"$h:$m:$s.$i\");\n} /* ecma_date_value_to_time_string */\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-error.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"jrt.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltinhelpers ECMA builtin helper operations\n * @{\n */\n\n/**\n * Handle calling [[Call]] of a built-in error object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_helper_error_dispatch_call (ecma_standard_error_t error_type, /**< native error type */\n                                         const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  if (arguments_list_len != 0\n      && !ecma_is_value_undefined (arguments_list_p[0]))\n  {\n    ecma_string_t *message_string_p = ecma_op_to_string (arguments_list_p[0]);\n\n    if (JERRY_UNLIKELY (message_string_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_object_t *new_error_object_p = ecma_new_standard_error (error_type, message_string_p);\n\n    ecma_deref_ecma_string (message_string_p);\n    return ecma_make_object_value (new_error_object_p);\n  }\n\n  ecma_object_t *new_error_object_p = ecma_new_standard_error (error_type, NULL);\n\n  return ecma_make_object_value (new_error_object_p);\n} /* ecma_builtin_helper_error_dispatch_call */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_BUILTIN_JSON)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltinhelpers ECMA builtin helper operations\n * @{\n */\n\n/**\n * Check whether the object is pushed onto the occurence stack\n *\n * Used by:\n *         - ecma_builtin_json_object step 1\n *         - ecma_builtin_json_array step 1\n *\n * @return true - if the object is pushed onto the occurence stack\n *         false - otherwise\n */\nbool\necma_json_has_object_in_stack (ecma_json_occurence_stack_item_t *stack_p, /**< stack */\n                               ecma_object_t *object_p) /**< object */\n{\n  while (stack_p != NULL)\n  {\n    if (stack_p->object_p == object_p)\n    {\n      return true;\n    }\n\n    stack_p = stack_p->next_p;\n  }\n\n  return false;\n} /* ecma_json_has_object_in_stack */\n\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-macro-defines.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef SIMPLE_VALUE\n#define SIMPLE_VALUE(name, simple_value, prop_attributes)\n#endif /* !SIMPLE_VALUE */\n\n#ifndef NUMBER_VALUE\n#define NUMBER_VALUE(name, number_value, prop_attributes)\n#endif /* !NUMBER_VALUE */\n\n#ifndef STRING_VALUE\n#define STRING_VALUE(name, magic_string_id, prop_attributes)\n#endif /* !STRING_VALUE */\n\n#if ENABLED (JERRY_ESNEXT)\n#ifndef SYMBOL_VALUE\n#define SYMBOL_VALUE(symbol, desc_magic_string_id)\n#endif /* !SYMBOL_VALUE */\n\n#ifndef INTRINSIC_PROPERTY\n#define INTRINSIC_PROPERTY(name, magic_string_id, prop_attributes)\n#endif /* !INTRINSIC_PROPERTY */\n\n#ifndef ACCESSOR_BUILTIN_FUNCTION_OBJECT\n#define ACCESSOR_BUILTIN_FUNCTION_OBJECT(name, getter_builtin_id, setter_builtin_id, prop_attributes)\n#endif /* !ACCESSOR_BUILTIN_FUNCTION_OBJECT */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#ifndef OBJECT_VALUE\n#define OBJECT_VALUE(name, obj_builtin_id, prop_attributes)\n#endif /* !OBJECT_VALUE */\n\n#ifndef ROUTINE\n#define ROUTINE(name, c_function_name, args_number, length_prop_value)\n#endif /* !ROUTINE */\n\n#ifndef ROUTINE_CONFIGURABLE_ONLY\n#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value)\n#endif /* !ROUTINE_CONFIGURABLE_ONLY */\n\n#ifndef ROUTINE_WITH_FLAGS\n#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, flags)\n#endif /* !ROUTINE_WITH_FLAGS */\n\n#ifndef ACCESSOR_READ_WRITE\n#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes)\n#endif /* !ACCESSOR_READ_WRITE */\n\n#ifndef ACCESSOR_READ_ONLY\n#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes)\n#endif /* !ACCESSOR_READ_ONLY */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-macro-undefs.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#undef SIMPLE_VALUE\n#undef NUMBER_VALUE\n#undef STRING_VALUE\n#if ENABLED (JERRY_ESNEXT)\n#undef SYMBOL_VALUE\n#undef INTRINSIC_PROPERTY\n#undef ACCESSOR_BUILTIN_FUNCTION_OBJECT\n#endif /* ENABLED (JERRY_ESNEXT) */\n#undef OBJECT_VALUE\n#undef ROUTINE\n#undef ROUTINE_CONFIGURABLE_ONLY\n#undef ROUTINE_WITH_FLAGS\n#undef ACCESSOR_READ_WRITE\n#undef ACCESSOR_READ_ONLY\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-sort.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-globals.h\"\n\n/**\n * Function used to merge two arrays for merge sort.\n * Arrays are stored as below:\n * First  -> source_array_p [left_idx : right_idx - 1]\n * Second -> source_array_p [right_idx : end_idx - 1]\n * Output -> output_array_p\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_helper_array_merge_sort_bottom_up (ecma_value_t *source_array_p, /**< arrays to merge */\n                                                uint32_t left_idx, /**< first array begin */\n                                                uint32_t right_idx, /**< first array end */\n                                                uint32_t end_idx, /**< second array end */\n                                                ecma_value_t *output_array_p, /**< output array */\n                                                ecma_value_t compare_func, /**< compare function */\n                                                const ecma_builtin_helper_sort_compare_fn_t sort_cb) /**< sorting cb */\n{\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n  uint32_t i = left_idx, j = right_idx;\n\n  for (uint32_t k = left_idx; k < end_idx; k++)\n  {\n    ecma_value_t compare_value = ecma_make_number_value (ECMA_NUMBER_ZERO);\n\n    if (i < right_idx && j < end_idx)\n    {\n      compare_value = sort_cb (source_array_p[i], source_array_p[j], compare_func);\n      if (ECMA_IS_VALUE_ERROR (compare_value))\n      {\n        ret_value = ECMA_VALUE_ERROR;\n        break;\n      }\n    }\n\n    if (i < right_idx && ecma_get_number_from_value (compare_value) <= ECMA_NUMBER_ZERO)\n    {\n      output_array_p[k] = source_array_p[i];\n      i++;\n    }\n    else\n    {\n      output_array_p[k] = source_array_p[j];\n      j++;\n    }\n    ecma_free_value (compare_value);\n  }\n\n  return ret_value;\n} /* ecma_builtin_helper_array_merge_sort_bottom_up */\n\n/**\n * Mergesort function\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_helper_array_merge_sort_helper (ecma_value_t *array_p, /**< array to sort */\n                                             uint32_t length, /**< length */\n                                             ecma_value_t compare_func, /**< compare function */\n                                             const ecma_builtin_helper_sort_compare_fn_t sort_cb) /**< sorting cb */\n{\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n  JMEM_DEFINE_LOCAL_ARRAY (dest_array_p, length, ecma_value_t);\n\n  ecma_value_t *temp_p;\n  ecma_value_t *base_array_p = array_p;\n  uint32_t r, e;\n\n  for (uint32_t w = 1; w < length; w = 2 * w)\n  {\n    for (uint32_t i = 0; i < length; i = i + 2 * w)\n    {\n      // End of first array\n      r = i + w;\n      if (r > length)\n      {\n        r = length;\n      }\n\n      // End of second array\n      e = i + 2 * w;\n      if (e > length)\n      {\n        e = length;\n      }\n\n      // Merge two arrays\n      ret_value = ecma_builtin_helper_array_merge_sort_bottom_up (array_p,\n                                                                  i,\n                                                                  r,\n                                                                  e,\n                                                                  dest_array_p,\n                                                                  compare_func,\n                                                                  sort_cb);\n      if (ECMA_IS_VALUE_ERROR (ret_value))\n      {\n        break;\n      }\n    }\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      break;\n    }\n\n    // Swap arrays\n    temp_p = dest_array_p;\n    dest_array_p = array_p;\n    array_p = temp_p;\n  }\n\n  // Sorted array is in dest_array_p - there was uneven number of arrays swaps\n  if (dest_array_p == base_array_p)\n  {\n    uint32_t index = 0;\n    temp_p = dest_array_p;\n    dest_array_p = array_p;\n    array_p = temp_p;\n\n    while (index < length)\n    {\n      array_p[index] = dest_array_p[index];\n      index++;\n    }\n    JERRY_ASSERT (index == length);\n  }\n\n  JMEM_FINALIZE_LOCAL_ARRAY (dest_array_p);\n\n  return ret_value;\n} /* ecma_builtin_helper_array_merge_sort_helper */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"jmem.h\"\n#include \"ecma-objects.h\"\n#include \"lit-magic-strings.h\"\n#include \"lit-char-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltinhelpers ECMA builtin helper operations\n * @{\n */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Helper function for Object.prototype.toString routine when\n * the @@toStringTag property is present\n *\n * See also:\n *          ECMA-262 v6, 19.1.3.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_helper_object_to_string_tag_helper (ecma_value_t tag_value) /**< string tag */\n{\n  JERRY_ASSERT (ecma_is_value_string (tag_value));\n\n  ecma_string_t *tag_str_p = ecma_get_string_from_value (tag_value);\n  ecma_string_t *ret_string_p;\n\n  /* Building string \"[object #@@toStringTag#]\"\n     The string size will be size(\"[object \") + size(#@@toStringTag#) + size (\"]\"). */\n  const lit_utf8_size_t buffer_size = 9 + ecma_string_get_size (tag_str_p);\n  JMEM_DEFINE_LOCAL_ARRAY (str_buffer, buffer_size, lit_utf8_byte_t);\n\n  lit_utf8_byte_t *buffer_ptr = str_buffer;\n\n  const lit_magic_string_id_t magic_string_ids[] =\n  {\n    LIT_MAGIC_STRING_LEFT_SQUARE_CHAR,\n    LIT_MAGIC_STRING_OBJECT,\n    LIT_MAGIC_STRING_SPACE_CHAR,\n  };\n\n  /* Copy to buffer the \"[object \" string */\n  for (uint32_t i = 0; i < sizeof (magic_string_ids) / sizeof (lit_magic_string_id_t); ++i)\n  {\n    buffer_ptr = lit_copy_magic_string_to_buffer (magic_string_ids[i], buffer_ptr,\n                                                  (lit_utf8_size_t) ((str_buffer + buffer_size) - buffer_ptr));\n\n    JERRY_ASSERT (buffer_ptr <= str_buffer + buffer_size);\n  }\n\n  /* Copy to buffer the #@@toStringTag# string */\n  buffer_ptr += ecma_string_copy_to_cesu8_buffer (tag_str_p, buffer_ptr,\n                                                  (lit_utf8_size_t) ((str_buffer + buffer_size) - buffer_ptr));\n\n  JERRY_ASSERT (buffer_ptr <= str_buffer + buffer_size);\n\n  /* Copy to buffer the \"]\" string */\n  buffer_ptr = lit_copy_magic_string_to_buffer (LIT_MAGIC_STRING_RIGHT_SQUARE_CHAR, buffer_ptr,\n                                                (lit_utf8_size_t) ((str_buffer + buffer_size) - buffer_ptr));\n\n  JERRY_ASSERT (buffer_ptr <= str_buffer + buffer_size);\n\n  ret_string_p = ecma_new_ecma_string_from_utf8 (str_buffer, (lit_utf8_size_t) (buffer_ptr - str_buffer));\n\n  JMEM_FINALIZE_LOCAL_ARRAY (str_buffer);\n  ecma_deref_ecma_string (tag_str_p);\n\n  return ecma_make_string_value (ret_string_p);\n} /* ecma_builtin_helper_object_to_string_tag_helper */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Common implementation of the Object.prototype.toString routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.4.2\n *\n * Used by:\n *         - The Object.prototype.toString routine.\n *         - The Array.prototype.toString routine as fallback.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\n\necma_value_t\necma_builtin_helper_object_to_string (const ecma_value_t this_arg) /**< this argument */\n{\n  lit_magic_string_id_t builtin_tag;\n\n  if (ecma_is_value_undefined (this_arg))\n  {\n    builtin_tag = LIT_MAGIC_STRING_UNDEFINED_UL;\n  }\n  else if (ecma_is_value_null (this_arg))\n  {\n    builtin_tag = LIT_MAGIC_STRING_NULL_UL;\n  }\n  else\n  {\n    ecma_value_t obj_this = ecma_op_to_object (this_arg);\n\n    if (ECMA_IS_VALUE_ERROR (obj_this))\n    {\n      return obj_this;\n    }\n\n    JERRY_ASSERT (ecma_is_value_object (obj_this));\n\n    ecma_object_t *obj_p = ecma_get_object_from_value (obj_this);\n\n    builtin_tag = ecma_object_get_class_name (obj_p);\n\n#if ENABLED (JERRY_ESNEXT)\n    ecma_value_t is_array = ecma_is_value_array (obj_this);\n\n    if (ECMA_IS_VALUE_ERROR (is_array))\n    {\n      ecma_deref_object (obj_p);\n      return is_array;\n    }\n\n    if (ecma_is_value_true (is_array))\n    {\n      builtin_tag = LIT_MAGIC_STRING_ARRAY_UL;\n    }\n\n    ecma_value_t tag = ecma_op_object_get_by_symbol_id (obj_p, LIT_GLOBAL_SYMBOL_TO_STRING_TAG);\n\n    if (ECMA_IS_VALUE_ERROR (tag))\n    {\n      ecma_deref_object (obj_p);\n      return tag;\n    }\n\n    if (ecma_is_value_string (tag))\n    {\n      ecma_deref_object (obj_p);\n      return ecma_builtin_helper_object_to_string_tag_helper (tag);\n    }\n    else if (builtin_tag != LIT_MAGIC_STRING_ARGUMENTS_UL\n             && builtin_tag != LIT_MAGIC_STRING_FUNCTION_UL\n             && builtin_tag != LIT_MAGIC_STRING_ERROR_UL\n             && builtin_tag != LIT_MAGIC_STRING_BOOLEAN_UL\n             && builtin_tag != LIT_MAGIC_STRING_NUMBER_UL\n             && builtin_tag != LIT_MAGIC_STRING_STRING_UL\n             && builtin_tag != LIT_MAGIC_STRING_DATE_UL\n             && builtin_tag != LIT_MAGIC_STRING_REGEXP_UL\n             && builtin_tag != LIT_MAGIC_STRING_ARRAY_UL)\n    {\n      builtin_tag = LIT_MAGIC_STRING_OBJECT_UL;\n    }\n\n    ecma_free_value (tag);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    ecma_deref_object (obj_p);\n  }\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  ecma_stringbuilder_append_magic (&builder, LIT_MAGIC_STRING_OBJECT_TO_STRING_UL);\n  ecma_stringbuilder_append_magic (&builder, builtin_tag);\n  ecma_stringbuilder_append_byte (&builder, LIT_CHAR_RIGHT_SQUARE);\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_helper_object_to_string */\n\n/**\n * The Array.prototype's 'toLocaleString' single element operation routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.3 steps 6-8 and 10.b-d\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_string_t *\necma_builtin_helper_get_to_locale_string_at_index (ecma_object_t *obj_p, /**< this object */\n                                                   ecma_length_t index) /**< array index */\n{\n  ecma_value_t index_value = ecma_op_object_get_by_index (obj_p, index);\n\n  if (ECMA_IS_VALUE_ERROR (index_value))\n  {\n    return NULL;\n  }\n\n  if (ecma_is_value_undefined (index_value) || ecma_is_value_null (index_value))\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ecma_value_t call_value = ecma_op_invoke_by_magic_id (index_value, LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, NULL, 0);\n\n  ecma_free_value (index_value);\n\n  if (ECMA_IS_VALUE_ERROR (call_value))\n  {\n    return NULL;\n  }\n\n  ecma_string_t *ret_string_p = ecma_op_to_string (call_value);\n\n  ecma_free_value (call_value);\n\n  return ret_string_p;\n} /* ecma_builtin_helper_get_to_locale_string_at_index */\n\n/**\n * Helper function to normalizing an array index\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.10 steps 5, 6, 7 part 2, 8\n *          ECMA-262 v5, 15.4.4.12 steps 5, 6\n *\n *          ECMA-262 v6, 22.1.3.6 steps 5 - 7, 8 part 2, 9, 10\n *          ECMA-262 v6, 22.1.3.3 steps 5 - 10, 11 part 2, 12, 13\n *\n * Used by:\n *         - The Array.prototype.slice routine.\n *         - The Array.prototype.splice routine.\n *         - The Array.prototype.fill routine.\n *         - The Array.prototype.copyWithin routine.\n *\n * @return ECMA_VALUE_EMPTY if successful\n *         conversion error otherwise\n */\necma_value_t\necma_builtin_helper_array_index_normalize (ecma_value_t arg, /**< index */\n                                           ecma_length_t length, /**< array's length */\n                                           ecma_length_t *number_p) /**< [out] ecma_length_t */\n{\n#if ENABLED (JERRY_ESNEXT)\n  ecma_number_t to_int;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (arg, &to_int)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  *number_p = ((to_int < 0) ? (ecma_length_t) JERRY_MAX (((ecma_number_t) length + to_int), 0)\n                            : (ecma_length_t) JERRY_MIN (to_int, (ecma_number_t) length));\n\n  return ECMA_VALUE_EMPTY;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  return ecma_builtin_helper_uint32_index_normalize (arg, length, number_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_helper_array_index_normalize */\n\n/**\n * Helper function to normalizing an uint32 index\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.13 steps 4 - 7\n *          ECMA-262 v6, 22.2.3.5 steps 5 - 10, 11 part 2, 12, 13\n *          ECMA-262 v6, 22.2.3.23 steps 5 - 10\n *          ECMA-262 v6, 24.1.4.3 steps 6 - 8, 9 part 2, 10, 11\n *          ECMA-262 v6, 22.2.3.26 steps 7 - 9, 10 part 2, 11, 12\n *          ECMA-262 v6, 22.2.3.8 steps 5 - 7, 8 part 2, 9, 10\n *\n * Used by:\n *         - The String.prototype.slice routine.\n *         - The Array.prototype.copyWithin routine.\n *         - The TypedArray.prototype.copyWithin routine.\n *         - The TypedArray.prototype.slice routine.\n *         - The ArrayBuffer.prototype.slice routine.\n *         - The TypedArray.prototype.subarray routine.\n *         - The TypedArray.prototype.fill routine.\n *\n * @return ECMA_VALUE_EMPTY if successful\n *         conversion error otherwise\n */\necma_value_t\necma_builtin_helper_uint32_index_normalize (ecma_value_t arg, /**< index */\n                                            uint32_t length, /**< array's length */\n                                            uint32_t *number_p) /**< [out] uint32_t number */\n{\n  ecma_number_t to_int;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (arg, &to_int)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  *number_p = ((to_int < 0) ? (uint32_t) JERRY_MAX ((ecma_number_t) length + to_int, 0)\n                            : (uint32_t) JERRY_MIN (to_int, (ecma_number_t) length));\n\n  return ECMA_VALUE_EMPTY;\n} /* ecma_builtin_helper_uint32_index_normalize */\n\n/**\n * Helper function for concatenating an ecma_value_t to an Array.\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.4 steps 5.b - 5.c\n *\n * Used by:\n *         - The Array.prototype.concat routine.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array */\n                                        ecma_length_t *length_p, /**< [in,out] array's length */\n                                        ecma_value_t value) /**< value to concat */\n{\n  /* 5.b */\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t is_spreadable = ecma_op_is_concat_spreadable (value);\n\n  if (ECMA_IS_VALUE_ERROR (is_spreadable))\n  {\n    return is_spreadable;\n  }\n\n  bool spread_object = is_spreadable == ECMA_VALUE_TRUE;\n  /* ES11: 22.1.3.1.5.c.iv.3.b */\n  const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  /* ES5.1: 15.4.4.4.5.b.iii.3.b */\n  const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;\n  bool spread_object = ecma_is_value_true (ecma_is_value_array (value));\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (spread_object)\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (value);\n\n#if ENABLED (JERRY_ESNEXT)\n    ecma_length_t arg_len;\n    ecma_value_t error = ecma_op_object_get_length (obj_p, &arg_len);\n\n    if (ECMA_IS_VALUE_ERROR (error))\n    {\n      return error;\n    }\n\n    /* 4 . */\n    if ((ecma_number_t) (*length_p + arg_len) > ECMA_NUMBER_MAX_SAFE_INTEGER)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid array length.\"));\n    }\n#else /* !ENABLED (JERRY_ESNEXT) */\n    /* 5.b.ii */\n    uint32_t arg_len = ecma_array_get_length (obj_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n    /* 5.b.iii */\n    for (ecma_length_t array_index = 0; array_index < arg_len; array_index++)\n    {\n      /* 5.b.iii.2 */\n      ecma_value_t get_value = ecma_op_object_find_by_index (obj_p, array_index);\n\n      if (ECMA_IS_VALUE_ERROR (get_value))\n      {\n        return get_value;\n      }\n\n      if (!ecma_is_value_found (get_value))\n      {\n        continue;\n      }\n\n      /* 5.b.iii.3.b */\n      /* This will always be a simple value since 'is_throw' is false, so no need to free. */\n      ecma_value_t put_comp = ecma_builtin_helper_def_prop_by_index (array_obj_p,\n                                                                     *length_p + array_index,\n                                                                     get_value,\n                                                                     prop_flags);\n      ecma_free_value (get_value);\n#if ENABLED (JERRY_ESNEXT)\n      if (ECMA_IS_VALUE_ERROR (put_comp))\n      {\n        return put_comp;\n      }\n#else /* !ENABLED (JERRY_ESNEXT) */\n      JERRY_ASSERT (ecma_is_value_true (put_comp));\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n\n    *length_p += arg_len;\n    return ECMA_VALUE_EMPTY;\n  }\n\n  /* 5.c.i */\n  /* This will always be a simple value since 'is_throw' is false, so no need to free. */\n  ecma_value_t put_comp = ecma_builtin_helper_def_prop_by_index (array_obj_p,\n                                                                 (*length_p)++,\n                                                                 value,\n                                                                 prop_flags);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (ECMA_IS_VALUE_ERROR (put_comp))\n  {\n    return put_comp;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_ASSERT (ecma_is_value_true (put_comp));\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ECMA_VALUE_EMPTY;\n} /* ecma_builtin_helper_array_concat_value */\n\n/**\n * Helper function to normalizing a string index\n *\n * This function clamps the given index to the [0, length] range.\n * If the index is negative, 0 value is used.\n * If the index is greater than the length of the string, the normalized index will be the length of the string.\n * NaN is mapped to zero or length depending on the nan_to_zero parameter.\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.15\n *\n * Used by:\n *         - The String.prototype.substring routine.\n *         - The ecma_builtin_helper_string_prototype_object_index_of helper routine.\n *\n * @return lit_utf8_size_t - the normalized value of the index\n */\nlit_utf8_size_t\necma_builtin_helper_string_index_normalize (ecma_number_t index, /**< index */\n                                            lit_utf8_size_t length, /**< string's length */\n                                            bool nan_to_zero) /**< whether NaN is mapped to zero (t) or length (f) */\n{\n  uint32_t norm_index = 0;\n\n  if (ecma_number_is_nan (index))\n  {\n    if (!nan_to_zero)\n    {\n      norm_index = length;\n    }\n  }\n  else if (!ecma_number_is_negative (index))\n  {\n    if (ecma_number_is_infinity (index))\n    {\n      norm_index = length;\n    }\n    else\n    {\n      norm_index = ecma_number_to_uint32 (index);\n\n      if (norm_index > length)\n      {\n        norm_index = length;\n      }\n    }\n  }\n\n  return norm_index;\n} /* ecma_builtin_helper_string_index_normalize */\n\n/**\n * Helper function for finding lastindex of a search string\n *\n * This function clamps the given index to the [0, length] range.\n * If the index is negative, 0 value is used.\n * If the index is greater than the length of the string, the normalized index will be the length of the string.\n *\n * See also:\n *          ECMA-262 v6, 21.1.3.9\n *\n * Used by:\n *         - The ecma_builtin_helper_string_prototype_object_index_of helper routine.\n *         - The ecma_builtin_string_prototype_object_replace_match helper routine.\n *\n * @return uint32_t - whether there is a match for the search string\n */\nstatic uint32_t\necma_builtin_helper_string_find_last_index (ecma_string_t *original_str_p, /**< original string */\n                                            ecma_string_t *search_str_p, /**< search string */\n                                            uint32_t position) /**< start_position */\n{\n  if (ecma_string_is_empty (search_str_p))\n  {\n    return position;\n  }\n\n  uint32_t original_length = ecma_string_get_length (original_str_p);\n\n  ECMA_STRING_TO_UTF8_STRING (search_str_p, search_str_utf8_p, search_str_size);\n  ECMA_STRING_TO_UTF8_STRING (original_str_p, original_str_utf8_p, original_str_size);\n\n  uint32_t ret_value = UINT32_MAX;\n\n  if (original_str_size >= search_str_size)\n  {\n    const lit_utf8_byte_t *end_p = original_str_utf8_p + original_str_size;\n    const lit_utf8_byte_t *current_p = end_p;\n\n    for (ecma_number_t i = original_length; i > position; i--)\n    {\n      lit_utf8_decr (&current_p);\n    }\n\n    while (current_p + search_str_size > end_p)\n    {\n      lit_utf8_decr (&current_p);\n      position--;\n    }\n\n    while (true)\n    {\n      if (memcmp (current_p, search_str_utf8_p, search_str_size) == 0)\n      {\n        ret_value = position;\n        break;\n      }\n\n      if (position == 0)\n      {\n        break;\n      }\n\n      lit_utf8_decr (&current_p);\n      position--;\n    }\n  }\n  ECMA_FINALIZE_UTF8_STRING (original_str_utf8_p, original_str_size);\n  ECMA_FINALIZE_UTF8_STRING (search_str_utf8_p, search_str_size);\n\n  return ret_value;\n} /* ecma_builtin_helper_string_find_last_index */\n\n/**\n * Helper function for string indexOf, lastIndexOf, startsWith, includes, endsWith functions\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.7\n *          ECMA-262 v5, 15.5.4.8\n *          ECMA-262 v6, 21.1.3.6\n *          ECMA-262 v6, 21.1.3.7\n *          ECMA-262 v6, 21.1.3.18\n *\n * Used by:\n *         - The String.prototype.indexOf routine.\n *         - The String.prototype.lastIndexOf routine.\n *         - The String.prototype.startsWith routine.\n *         - The String.prototype.includes routine.\n *         - The String.prototype.endsWith routine.\n *\n * @return ecma_value_t - Returns index (last index) or a\n *                        boolean value\n */\necma_value_t\necma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_str_p, /**< this argument */\n                                                      ecma_value_t arg1, /**< routine's first argument */\n                                                      ecma_value_t arg2, /**< routine's second argument */\n                                                      ecma_string_index_of_mode_t mode) /**< routine's mode */\n{\n  /* 5 (indexOf) -- 6 (lastIndexOf) */\n  const lit_utf8_size_t original_len = ecma_string_get_length (original_str_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  /* 4, 6 (startsWith, includes, endsWith) */\n  if (mode >= ECMA_STRING_STARTS_WITH)\n  {\n    ecma_value_t regexp = ecma_op_is_regexp (arg1);\n\n    if (ECMA_IS_VALUE_ERROR (regexp))\n    {\n      return regexp;\n    }\n\n    if (regexp == ECMA_VALUE_TRUE)\n    {\n      JERRY_ASSERT (ECMA_STRING_LAST_INDEX_OF < mode && mode <= ECMA_STRING_ENDS_WITH);\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Search string can't be of type: RegExp\"));\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* 7, 8 */\n  ecma_string_t *search_str_p = ecma_op_to_string (arg1);\n\n  if (JERRY_UNLIKELY (search_str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t ret_value;\n\n  /* 4 (indexOf, lastIndexOf), 9 (startsWith, includes), 10 (endsWith) */\n  ecma_number_t pos_num;\n#if ENABLED (JERRY_ESNEXT)\n  if (mode > ECMA_STRING_LAST_INDEX_OF)\n  {\n    ret_value = ecma_op_to_integer (arg2, &pos_num);\n  }\n  else\n  {\n#endif /* ENABLED (JERRY_ESNEXT) */\n    ret_value = ecma_op_to_number (arg2, &pos_num);\n#if ENABLED (JERRY_ESNEXT)\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* 10 (startsWith, includes), 11 (endsWith) */\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    ecma_deref_ecma_string (search_str_p);\n    return ret_value;\n  }\n\n  bool use_first_index = mode != ECMA_STRING_LAST_INDEX_OF;\n\n  /* 4b, 6 (indexOf) - 4b, 5, 7 (lastIndexOf) */\n  lit_utf8_size_t start = ecma_builtin_helper_string_index_normalize (pos_num, original_len, use_first_index);\n\n  ecma_number_t ret_num = ECMA_NUMBER_MINUS_ONE;\n\n  ret_value = ECMA_VALUE_FALSE;\n\n  switch (mode)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_STRING_STARTS_WITH:\n    {\n      if (start > original_len)\n      {\n        break;\n      }\n      /* 15, 16 (startsWith) */\n      uint32_t index = ecma_builtin_helper_string_find_index (original_str_p, search_str_p, start);\n      ret_value = ecma_make_boolean_value (index == start);\n      break;\n    }\n    case ECMA_STRING_INCLUDES:\n    {\n      if (ecma_builtin_helper_string_find_index (original_str_p, search_str_p, start) != UINT32_MAX)\n      {\n        ret_value = ECMA_VALUE_TRUE;\n      }\n      break;\n    }\n    case ECMA_STRING_ENDS_WITH:\n    {\n      if (start == 0)\n      {\n        start = original_len;\n      }\n\n      lit_utf8_size_t search_str_len = ecma_string_get_length (search_str_p);\n\n      if (search_str_len == 0)\n      {\n        ret_value = ECMA_VALUE_TRUE;\n        break;\n      }\n\n      int32_t start_ends_with = (int32_t) (start - search_str_len);\n\n      if (start_ends_with < 0)\n      {\n        break;\n      }\n      uint32_t index = ecma_builtin_helper_string_find_index (original_str_p,\n                                                              search_str_p,\n                                                              (uint32_t) start_ends_with);\n      ret_value = ecma_make_boolean_value (index  == (uint32_t) start_ends_with);\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    case ECMA_STRING_INDEX_OF:\n    {\n      /* 8 (indexOf) -- 9 (lastIndexOf) */\n      ecma_value_t find_index = ecma_builtin_helper_string_find_index (original_str_p, search_str_p, start);\n\n      if (find_index != UINT32_MAX)\n      {\n        ret_num = ((ecma_number_t) find_index);\n      }\n      ret_value = ecma_make_number_value (ret_num);\n      break;\n    }\n\n    case ECMA_STRING_LAST_INDEX_OF:\n    {\n      uint32_t index = ecma_builtin_helper_string_find_last_index (original_str_p, search_str_p, start);\n\n      if (index != UINT32_MAX)\n      {\n        ret_num = ((ecma_number_t) index);\n      }\n      ret_value = ecma_make_number_value (ret_num);\n      break;\n    }\n\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n\n  ecma_deref_ecma_string (search_str_p);\n\n  return ret_value;\n} /* ecma_builtin_helper_string_prototype_object_index_of */\n\n/**\n * Helper function for finding index of a search string\n *\n * This function clamps the given index to the [0, length] range.\n * If the index is negative, 0 value is used.\n * If the index is greater than the length of the string, the normalized index will be the length of the string.\n *\n * See also:\n *          ECMA-262 v6, 21.1.3.8\n *\n * Used by:\n *         - The ecma_builtin_helper_string_prototype_object_index_of helper routine.\n *         - The ecma_builtin_string_prototype_object_replace_match helper routine.\n *\n * @return uint32_t - whether there is a match for the search string\n */\nuint32_t\necma_builtin_helper_string_find_index (ecma_string_t *original_str_p, /**< index */\n                                       ecma_string_t *search_str_p, /**< string's length */\n                                       uint32_t start_pos) /**< start position */\n{\n  uint32_t match_found = UINT32_MAX;\n\n  if (ecma_string_is_empty (search_str_p))\n  {\n    return start_pos;\n  }\n\n  ECMA_STRING_TO_UTF8_STRING (search_str_p, search_str_utf8_p, search_str_size);\n  ECMA_STRING_TO_UTF8_STRING (original_str_p, original_str_utf8_p, original_str_size);\n\n  const lit_utf8_byte_t *str_current_p = original_str_utf8_p;\n\n  for (ecma_number_t i = 0; i < start_pos; i++)\n  {\n    lit_utf8_incr (&str_current_p);\n  }\n\n  const lit_utf8_byte_t *original_end_p = original_str_utf8_p + original_str_size;\n\n  while (!((size_t) (original_end_p - str_current_p) < search_str_size))\n  {\n    if (memcmp (str_current_p , search_str_utf8_p, search_str_size) == 0)\n    {\n      match_found = start_pos;\n      break;\n    }\n\n    lit_utf8_incr (&str_current_p);\n    start_pos++;\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (original_str_utf8_p, original_str_size);\n  ECMA_FINALIZE_UTF8_STRING (search_str_utf8_p, search_str_size);\n\n  return match_found;\n} /* ecma_builtin_helper_string_find_index */\n\n/**\n * Helper function for using [[DefineOwnProperty]] specialized for indexed property names\n *\n * Note: this method falls back to the general ecma_builtin_helper_def_prop\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_helper_def_prop_by_index (ecma_object_t *obj_p, /**< object */\n                                       ecma_length_t index, /**< property index */\n                                       ecma_value_t value, /**< value */\n                                       uint32_t opts) /**< any combination of ecma_property_flag_t bits */\n{\n  if (JERRY_LIKELY (index <= ECMA_DIRECT_STRING_MAX_IMM))\n  {\n    return ecma_builtin_helper_def_prop (obj_p,\n                                         ECMA_CREATE_DIRECT_UINT32_STRING (index),\n                                         value,\n                                         opts);\n  }\n\n  ecma_string_t *index_str_p = ecma_new_ecma_string_from_length (index);\n  ecma_value_t ret_value = ecma_builtin_helper_def_prop (obj_p, index_str_p, value, opts);\n  ecma_deref_ecma_string (index_str_p);\n\n  return ret_value;\n} /* ecma_builtin_helper_def_prop_by_index */\n\n/**\n * Helper function for using [[DefineOwnProperty]].\n *\n * See also:\n *          ECMA-262 v5, 8.12.9\n *          ECMA-262 v5, 15.4.5.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_helper_def_prop (ecma_object_t *obj_p, /**< object */\n                              ecma_string_t *name_p, /**< name string */\n                              ecma_value_t value, /**< value */\n                              uint32_t opts) /**< any combination of ecma_property_flag_t bits\n                                              *   with the optional ECMA_IS_THROW flag */\n{\n  ecma_property_descriptor_t prop_desc;\n\n  prop_desc.flags = (uint16_t) (ECMA_NAME_DATA_PROPERTY_DESCRIPTOR_BITS | opts);\n\n  prop_desc.value = value;\n\n  return ecma_op_object_define_own_property (obj_p,\n                                             name_p,\n                                             &prop_desc);\n} /* ecma_builtin_helper_def_prop */\n\n/**\n * GetSubstitution abstract operation\n *\n * See:\n *     ECMA-262 v6.0 21.1.3.14.1\n */\nvoid\necma_builtin_replace_substitute (ecma_replace_context_t *ctx_p) /**< replace context */\n{\n  JERRY_ASSERT (ctx_p->string_p != NULL);\n  JERRY_ASSERT (ctx_p->matched_p == NULL\n                || (ctx_p->matched_p >= ctx_p->string_p\n                    && ctx_p->matched_p <= ctx_p->string_p + ctx_p->string_size));\n\n  lit_utf8_size_t replace_size;\n  uint8_t replace_flags = ECMA_STRING_FLAG_IS_ASCII;\n  const lit_utf8_byte_t *replace_buf_p = ecma_string_get_chars (ctx_p->replace_str_p,\n                                                                &replace_size,\n                                                                NULL,\n                                                                NULL,\n                                                                &replace_flags);\n\n  const lit_utf8_byte_t *const replace_end_p = replace_buf_p + replace_size;\n  const lit_utf8_byte_t *curr_p = replace_buf_p;\n  const lit_utf8_byte_t *last_inserted_end_p = replace_buf_p;\n\n  while (curr_p < replace_end_p)\n  {\n    if (*curr_p++ == LIT_CHAR_DOLLAR_SIGN)\n    {\n      ecma_stringbuilder_append_raw (&(ctx_p->builder),\n                                     last_inserted_end_p,\n                                     (lit_utf8_size_t) (curr_p - last_inserted_end_p - 1));\n      if (curr_p >= replace_end_p)\n      {\n        last_inserted_end_p = curr_p - 1;\n        break;\n      }\n\n      const lit_utf8_byte_t c = *curr_p++;\n\n      switch (c)\n      {\n        case LIT_CHAR_DOLLAR_SIGN:\n        {\n          ecma_stringbuilder_append_byte (&(ctx_p->builder), LIT_CHAR_DOLLAR_SIGN);\n          break;\n        }\n        case LIT_CHAR_AMPERSAND:\n        {\n#if ENABLED (JERRY_ESNEXT)\n          if (JERRY_UNLIKELY (ctx_p->matched_p == NULL))\n          {\n            JERRY_ASSERT (ctx_p->capture_count == 0);\n            JERRY_ASSERT (ctx_p->u.collection_p != NULL);\n            JERRY_ASSERT (ctx_p->u.collection_p->item_count > 0);\n            const ecma_value_t match_value = ctx_p->u.collection_p->buffer_p[0];\n\n            JERRY_ASSERT (ecma_is_value_string (match_value));\n            ecma_stringbuilder_append (&(ctx_p->builder), ecma_get_string_from_value (match_value));\n            break;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          JERRY_ASSERT (ctx_p->matched_p != NULL);\n          ecma_stringbuilder_append_raw (&(ctx_p->builder), ctx_p->matched_p, ctx_p->matched_size);\n          break;\n        }\n        case LIT_CHAR_GRAVE_ACCENT:\n        {\n          ecma_stringbuilder_append_raw (&(ctx_p->builder), ctx_p->string_p, ctx_p->match_byte_pos);\n          break;\n        }\n        case LIT_CHAR_SINGLE_QUOTE:\n        {\n#if ENABLED (JERRY_ESNEXT)\n          if (JERRY_UNLIKELY (ctx_p->matched_p == NULL))\n          {\n            JERRY_ASSERT (ctx_p->capture_count == 0);\n            JERRY_ASSERT (ctx_p->u.collection_p != NULL);\n            JERRY_ASSERT (ctx_p->u.collection_p->item_count > 0);\n            const ecma_value_t match_value = ctx_p->u.collection_p->buffer_p[0];\n\n            JERRY_ASSERT (ecma_is_value_string (match_value));\n            const ecma_string_t *const matched_p = ecma_get_string_from_value (match_value);\n            const lit_utf8_size_t match_size = ecma_string_get_size (matched_p);\n            const lit_utf8_byte_t *const begin_p = ctx_p->string_p + ctx_p->match_byte_pos + match_size;\n\n            ecma_stringbuilder_append_raw (&(ctx_p->builder),\n                                           begin_p,\n                                           (lit_utf8_size_t) (ctx_p->string_p + ctx_p->string_size - begin_p));\n            break;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          JERRY_ASSERT (ctx_p->matched_p != NULL);\n          ecma_stringbuilder_append_raw (&(ctx_p->builder),\n                                         ctx_p->matched_p + ctx_p->matched_size,\n                                         ctx_p->string_size - ctx_p->match_byte_pos - ctx_p->matched_size);\n          break;\n        }\n        default:\n        {\n          const lit_utf8_byte_t *const number_begin_p = curr_p - 1;\n\n          if (lit_char_is_decimal_digit (c))\n          {\n            uint32_t capture_count = ctx_p->capture_count;\n#if ENABLED (JERRY_ESNEXT)\n            if (capture_count == 0 && ctx_p->u.collection_p != NULL)\n            {\n              capture_count = ctx_p->u.collection_p->item_count;\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n            uint8_t idx = (uint8_t) (c - LIT_CHAR_0);\n            if (curr_p < replace_end_p && lit_char_is_decimal_digit (*(curr_p)))\n            {\n              uint8_t two_digit_index = (uint8_t) (idx * 10 + (uint8_t) (*(curr_p) - LIT_CHAR_0));\n              if (two_digit_index < capture_count)\n              {\n                idx = two_digit_index;\n                curr_p++;\n              }\n            }\n\n            if (idx > 0 && idx < capture_count)\n            {\n              if (ctx_p->capture_count > 0)\n              {\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n                JERRY_ASSERT (ctx_p->u.captures_p != NULL);\n                const ecma_regexp_capture_t *const capture_p = ctx_p->u.captures_p + idx;\n\n                if (ECMA_RE_IS_CAPTURE_DEFINED (capture_p))\n                {\n                  ecma_stringbuilder_append_raw (&(ctx_p->builder),\n                                                 capture_p->begin_p,\n                                                 (lit_utf8_size_t) (capture_p->end_p - capture_p->begin_p));\n                }\n\n                break;\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n              }\n#if ENABLED (JERRY_ESNEXT)\n              else if (ctx_p->u.collection_p != NULL)\n              {\n                const ecma_value_t capture_value = ctx_p->u.collection_p->buffer_p[idx];\n                if (!ecma_is_value_undefined (capture_value))\n                {\n                  ecma_stringbuilder_append (&(ctx_p->builder), ecma_get_string_from_value (capture_value));\n                }\n\n                break;\n              }\n#endif /* ENABLED (JERRY_ESNEXT) */\n            }\n          }\n\n          ecma_stringbuilder_append_byte (&(ctx_p->builder), LIT_CHAR_DOLLAR_SIGN);\n          curr_p = number_begin_p;\n          break;\n        }\n      }\n\n      last_inserted_end_p = curr_p;\n    }\n  }\n\n  ecma_stringbuilder_append_raw (&(ctx_p->builder),\n                                 last_inserted_end_p,\n                                 (lit_utf8_size_t) (replace_end_p - last_inserted_end_p));\n\n  if (replace_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) replace_buf_p, replace_size);\n  }\n} /* ecma_builtin_replace_substitute */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_BUILTIN_HELPERS_H\n#define ECMA_BUILTIN_HELPERS_H\n\n#include \"ecma-globals.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-regexp-object.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltinhelpers ECMA builtin helper operations\n * @{\n */\n\n/**\n * Mode of string index routine.\n */\ntypedef enum\n{\n  /** These routines must be in this order */\n  ECMA_STRING_LAST_INDEX_OF, /**< String.lastIndexOf: ECMA-262 v5, 15.5.4.8 */\n  ECMA_STRING_INDEX_OF, /**< String.indexOf: ECMA-262 v5, 15.5.4.7 */\n  ECMA_STRING_STARTS_WITH, /**< String.startsWith: ECMA-262 v6, 21.1.3.18 */\n  ECMA_STRING_INCLUDES, /**< String.includes: ECMA-262 v6, 21.1.3.7 */\n  ECMA_STRING_ENDS_WITH /**< String.includes: ECMA-262 v6, 21.1.3.6 */\n} ecma_string_index_of_mode_t;\n\necma_value_t\necma_builtin_helper_object_to_string (const ecma_value_t this_arg);\necma_string_t *\necma_builtin_helper_get_to_locale_string_at_index (ecma_object_t *obj_p, ecma_length_t index);\necma_value_t\necma_builtin_helper_array_concat_value (ecma_object_t *obj_p, ecma_length_t *length_p, ecma_value_t value);\necma_value_t\necma_builtin_helper_uint32_index_normalize (ecma_value_t arg, uint32_t length, uint32_t *number_p);\necma_value_t\necma_builtin_helper_array_index_normalize (ecma_value_t arg, ecma_length_t length, ecma_length_t *number_p);\necma_value_t\necma_builtin_helper_string_index_normalize (ecma_number_t index, uint32_t length, bool nan_to_zero);\necma_value_t\necma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_str_p, ecma_value_t arg1,\n                                                      ecma_value_t arg2, ecma_string_index_of_mode_t mode);\nuint32_t\necma_builtin_helper_string_find_index (ecma_string_t *original_str_p, ecma_string_t *search_str_p,\n                                       uint32_t start_pos);\necma_value_t\necma_builtin_helper_def_prop (ecma_object_t *obj_p, ecma_string_t *name_p, ecma_value_t value, uint32_t opts);\n\necma_value_t\necma_builtin_helper_def_prop_by_index (ecma_object_t *obj_p, ecma_length_t index, ecma_value_t value,\n                                       uint32_t opts);\n/**\n * Context for replace substitutions\n */\ntypedef struct\n{\n  ecma_stringbuilder_t builder;      /**< result string builder */\n  const lit_utf8_byte_t *string_p;   /**< source string */\n  lit_utf8_size_t string_size;       /**< source string size */\n  const lit_utf8_byte_t *matched_p;  /**< matched string */\n  lit_utf8_size_t matched_size;      /**< matcehd string size */\n  lit_utf8_size_t match_byte_pos;    /**< byte position of the match in the source string */\n  uint16_t flags;                    /**< replace flags */\n\n  /**\n   * Capture results\n   */\n  union\n  {\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n    const ecma_regexp_capture_t *captures_p; /**< array of regexp capturing groups */\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n    const ecma_collection_t *collection_p;   /**< collection of captured substrings */\n  } u;\n\n  uint32_t capture_count;            /**< number of captures in the capturing group array */\n  ecma_string_t *replace_str_p;      /**< replacement string */\n} ecma_replace_context_t;\n\nvoid\necma_builtin_replace_substitute (ecma_replace_context_t *ctx_p);\n\n#if ENABLED (JERRY_ESNEXT)\nbool\necma_builtin_is_regexp_exec (ecma_extended_object_t *obj_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_DATE)\n\n/**\n * Time range defines for helper functions.\n *\n * See also:\n *          ECMA-262 v5, 15.9.1.1, 15.9.1.10\n */\n\n/** Hours in a day. */\n#define ECMA_DATE_HOURS_PER_DAY         ((ecma_number_t) 24)\n\n/** Minutes in an hour. */\n#define ECMA_DATE_MINUTES_PER_HOUR      ((ecma_number_t) 60)\n\n/** Seconds in a minute. */\n#define ECMA_DATE_SECONDS_PER_MINUTE    ((ecma_number_t) 60)\n\n/** Milliseconds in a second. */\n#define ECMA_DATE_MS_PER_SECOND         ((ecma_number_t) 1000)\n\n/** ECMA_DATE_MS_PER_MINUTE == 60000 */\n#define ECMA_DATE_MS_PER_MINUTE         (ECMA_DATE_MS_PER_SECOND * ECMA_DATE_SECONDS_PER_MINUTE)\n\n/** ECMA_DATE_MS_PER_HOUR == 3600000 */\n#define ECMA_DATE_MS_PER_HOUR           (ECMA_DATE_MS_PER_MINUTE * ECMA_DATE_MINUTES_PER_HOUR)\n\n/** ECMA_DATE_MS_PER_DAY == 86400000 */\n#define ECMA_DATE_MS_PER_DAY            (ECMA_DATE_MS_PER_HOUR * ECMA_DATE_HOURS_PER_DAY)\n\n/**\n * This gives a range of 8,640,000,000,000,000 milliseconds\n * to either side of 01 January, 1970 UTC.\n */\n#define ECMA_DATE_MAX_VALUE             8.64e15\n\n/**\n * Timezone type.\n */\ntypedef enum\n{\n  ECMA_DATE_UTC, /**< date vaule is in UTC */\n  ECMA_DATE_LOCAL /**< date vaule is in local time */\n} ecma_date_timezone_t;\n\n/* ecma-builtin-helpers-date.c */\nextern const char day_names_p[7][3];\nextern const char month_names_p[12][3];\n\necma_number_t ecma_date_day (ecma_number_t time);\necma_number_t ecma_date_time_within_day (ecma_number_t time);\necma_number_t ecma_date_year_from_time (ecma_number_t time);\necma_number_t ecma_date_month_from_time (ecma_number_t time);\necma_number_t ecma_date_date_from_time (ecma_number_t time);\necma_number_t ecma_date_week_day (ecma_number_t time);\necma_number_t ecma_date_local_time_zone_adjustment (ecma_number_t time);\necma_number_t ecma_date_utc (ecma_number_t time);\necma_number_t ecma_date_hour_from_time (ecma_number_t time);\necma_number_t ecma_date_min_from_time (ecma_number_t time);\necma_number_t ecma_date_sec_from_time (ecma_number_t time);\necma_number_t ecma_date_ms_from_time (ecma_number_t time);\necma_number_t ecma_date_make_time (ecma_number_t hour, ecma_number_t min, ecma_number_t sec, ecma_number_t ms);\necma_number_t ecma_date_make_day (ecma_number_t year, ecma_number_t month, ecma_number_t date);\necma_number_t ecma_date_make_date (ecma_number_t day, ecma_number_t time);\necma_number_t ecma_date_time_clip (ecma_number_t time);\necma_number_t ecma_date_timezone_offset (ecma_number_t time);\n\necma_value_t ecma_date_value_to_string (ecma_number_t datetime_number);\necma_value_t ecma_date_value_to_utc_string (ecma_number_t datetime_number);\necma_value_t ecma_date_value_to_iso_string (ecma_number_t datetime_number);\necma_value_t ecma_date_value_to_date_string (ecma_number_t datetime_number);\necma_value_t ecma_date_value_to_time_string (ecma_number_t datetime_number);\n\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n\n#if ENABLED (JERRY_BUILTIN_JSON)\n/* ecma-builtin-helper-json.c */\n\n/**\n * Occurence stack item of JSON.stringify()\n */\ntypedef struct struct_ecma_json_occurence_stack_item_t\n{\n  struct struct_ecma_json_occurence_stack_item_t *next_p; /**< next stack item */\n  ecma_object_t *object_p; /**< current object */\n} ecma_json_occurence_stack_item_t;\n\n/**\n * Context for JSON.stringify()\n */\ntypedef struct\n{\n  /** Collection for property keys. */\n  ecma_collection_t *property_list_p;\n\n  /** Collection for traversing objects. */\n  ecma_json_occurence_stack_item_t *occurence_stack_last_p;\n\n  /** The actual indentation text. */\n  ecma_stringbuilder_t indent_builder;\n\n  /** The indentation text. */\n  ecma_string_t *gap_str_p;\n\n  /** The replacer function. */\n  ecma_object_t *replacer_function_p;\n\n  /** Result string builder. */\n  ecma_stringbuilder_t result_builder;\n} ecma_json_stringify_context_t;\n\necma_value_t ecma_builtin_json_parse_buffer (const lit_utf8_byte_t * str_start_p,\n                                             lit_utf8_size_t string_size);\necma_value_t ecma_builtin_json_stringify_no_opts (const ecma_value_t value);\nbool ecma_json_has_object_in_stack (ecma_json_occurence_stack_item_t *stack_p, ecma_object_t *object_p);\n\necma_value_t\necma_builtin_helper_json_create_non_formatted_json (lit_utf8_byte_t left_bracket, lit_utf8_byte_t right_bracket,\n                                                    ecma_collection_t *partial_p);\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n\n/* ecma-builtin-helper-error.c */\n\necma_value_t\necma_builtin_helper_error_dispatch_call (ecma_standard_error_t error_type, const ecma_value_t *arguments_list_p,\n                                         uint32_t arguments_list_len);\n\n/* ecma-builtin-helpers-sort.c */\n\n/**\n * Comparison callback function header for sorting helper routines.\n */\ntypedef ecma_value_t (*ecma_builtin_helper_sort_compare_fn_t) (ecma_value_t lhs, /**< left value */\n                                                               ecma_value_t rhs, /**< right value */\n                                                               ecma_value_t compare_func); /**< compare function */\n\necma_value_t ecma_builtin_helper_array_merge_sort_helper (ecma_value_t *array_p,\n                                                          uint32_t length,\n                                                          ecma_value_t compare_func,\n                                                          const ecma_builtin_helper_sort_compare_fn_t sort_cb);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_BUILTIN_HELPERS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef BUILTIN_UNDERSCORED_ID\n# error \"Please, define BUILTIN_UNDERSCORED_ID\"\n#endif /* !BUILTIN_UNDERSCORED_ID */\n\n#ifndef BUILTIN_INC_HEADER_NAME\n# error \"Please, define BUILTIN_INC_HEADER_NAME\"\n#endif /* !BUILTIN_INC_HEADER_NAME */\n\n#include \"ecma-objects.h\"\n\n#define PASTE__(x, y) x ## y\n#define PASTE_(x, y) PASTE__ (x, y)\n#define PASTE(x, y) PASTE_ (x, y)\n\n#define PROPERTY_DESCRIPTOR_LIST_NAME \\\n  PASTE (PASTE (ecma_builtin_, BUILTIN_UNDERSCORED_ID), _property_descriptor_list)\n#define DISPATCH_ROUTINE_ROUTINE_NAME \\\n  PASTE (PASTE (ecma_builtin_, BUILTIN_UNDERSCORED_ID), _dispatch_routine)\n\n#ifndef BUILTIN_CUSTOM_DISPATCH\n\n#define ROUTINE_ARG(n) , ecma_value_t arg ## n\n#define ROUTINE_ARG_LIST_0 ecma_value_t this_arg\n#define ROUTINE_ARG_LIST_1 ROUTINE_ARG_LIST_0 ROUTINE_ARG(1)\n#define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1 ROUTINE_ARG(2)\n#define ROUTINE_ARG_LIST_3 ROUTINE_ARG_LIST_2 ROUTINE_ARG(3)\n#define ROUTINE_ARG_LIST_NON_FIXED ROUTINE_ARG_LIST_0, \\\n  const ecma_value_t *arguments_list_p, uint32_t arguments_list_len\n#define ROUTINE(name, c_function_name, args_number, length_prop_value) \\\n  static ecma_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number);\n#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \\\n  static ecma_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number);\n#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, flags) \\\n  static ecma_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number);\n#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \\\n  static ecma_value_t c_getter_func_name (ROUTINE_ARG_LIST_0); \\\n  static ecma_value_t c_setter_func_name (ROUTINE_ARG_LIST_1);\n#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \\\n  static ecma_value_t c_getter_func_name (ROUTINE_ARG_LIST_0);\n#include BUILTIN_INC_HEADER_NAME\n#undef ROUTINE_ARG_LIST_NON_FIXED\n#undef ROUTINE_ARG_LIST_3\n#undef ROUTINE_ARG_LIST_2\n#undef ROUTINE_ARG_LIST_1\n#undef ROUTINE_ARG_LIST_0\n#undef ROUTINE_ARG\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  PASTE (ECMA_ROUTINE_START_, BUILTIN_UNDERSCORED_ID) = 0,\n#define ROUTINE(name, c_function_name, args_number, length_prop_value) \\\n  ECMA_ROUTINE_ ## name ## c_function_name,\n#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \\\n  ECMA_ROUTINE_ ## name ## c_function_name,\n#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, flags) \\\n  ECMA_ROUTINE_ ## name ## c_function_name,\n#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \\\n  ECMA_ACCESSOR_ ## name ## c_getter_func_name, \\\n  ECMA_ACCESSOR_ ## name ## c_setter_func_name,\n#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \\\n  ECMA_ACCESSOR_ ## name ## c_getter_func_name,\n#include BUILTIN_INC_HEADER_NAME\n};\n\n#endif /* !BUILTIN_CUSTOM_DISPATCH */\n\n/**\n * Built-in property list of the built-in object.\n */\nconst ecma_builtin_property_descriptor_t PROPERTY_DESCRIPTOR_LIST_NAME[] =\n{\n#ifndef BUILTIN_CUSTOM_DISPATCH\n#define ROUTINE(name, c_function_name, args_number, length_prop_value) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ROUTINE, \\\n    ECMA_PROPERTY_CONFIGURABLE_WRITABLE, \\\n    ECMA_ROUTINE_VALUE (ECMA_ROUTINE_ ## name ## c_function_name, length_prop_value) \\\n  },\n#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ROUTINE, \\\n    ECMA_PROPERTY_FLAG_CONFIGURABLE, \\\n    ECMA_ROUTINE_VALUE (ECMA_ROUTINE_ ## name ## c_function_name, length_prop_value) \\\n  },\n#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, flags) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ROUTINE, \\\n    flags, \\\n    ECMA_ROUTINE_VALUE (ECMA_ROUTINE_ ## name ## c_function_name, length_prop_value) \\\n  },\n#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_ONLY, \\\n    prop_attributes, \\\n    ECMA_ACCESSOR_ ## name ## c_getter_func_name \\\n  },\n#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_WRITE, \\\n    prop_attributes, \\\n    ECMA_ACCESSOR_READ_WRITE (ECMA_ACCESSOR_ ## name ## c_getter_func_name, \\\n                              ECMA_ACCESSOR_ ## name ## c_setter_func_name) \\\n  },\n#else /* BUILTIN_CUSTOM_DISPATCH */\n#define ROUTINE(name, c_function_name, args_number, length_prop_value) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ROUTINE, \\\n    ECMA_PROPERTY_CONFIGURABLE_WRITABLE, \\\n    ECMA_ROUTINE_VALUE (c_function_name, length_prop_value) \\\n  },\n#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ROUTINE, \\\n    ECMA_PROPERTY_FLAG_CONFIGURABLE, \\\n    ECMA_ROUTINE_VALUE (c_function_name, length_prop_value) \\\n  },\n#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, flags) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ROUTINE, \\\n    flags, \\\n    ECMA_ROUTINE_VALUE (c_function_name, length_prop_value) \\\n  },\n#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_ONLY, \\\n    prop_attributes, \\\n    c_getter_func_name \\\n  },\n#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_WRITE, \\\n    prop_attributes, \\\n    ECMA_ACCESSOR_READ_WRITE (c_getter_func_name, c_setter_func_name) \\\n  },\n#endif /* !BUILTIN_CUSTOM_DISPATCH */\n#define OBJECT_VALUE(name, obj_builtin_id, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_OBJECT, \\\n    prop_attributes, \\\n    obj_builtin_id \\\n  },\n#define SIMPLE_VALUE(name, simple_value, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_SIMPLE, \\\n    prop_attributes, \\\n    simple_value \\\n  },\n#define NUMBER_VALUE(name, number_value, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_NUMBER, \\\n    prop_attributes, \\\n    number_value \\\n  },\n#define STRING_VALUE(name, magic_string_id, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_STRING, \\\n    prop_attributes, \\\n    magic_string_id \\\n  },\n#if ENABLED (JERRY_ESNEXT)\n#define SYMBOL_VALUE(name, symbol) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_SYMBOL, \\\n    ECMA_PROPERTY_FIXED, \\\n    symbol \\\n  },\n#define INTRINSIC_PROPERTY(name, magic_string_id, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_INTRINSIC_PROPERTY, \\\n    prop_attributes, \\\n    magic_string_id \\\n  },\n#define ACCESSOR_BUILTIN_FUNCTION(name, getter_builtin_id, setter_builtin_id, prop_attributes) \\\n  { \\\n    name, \\\n    ECMA_BUILTIN_PROPERTY_ACCESSOR_BUILTIN_FUNCTION, \\\n    prop_attributes, \\\n    ECMA_ACCESSOR_READ_WRITE (getter_builtin_id, setter_builtin_id) \\\n  },\n#endif /* ENABLED (JERRY_ESNEXT) */\n#include BUILTIN_INC_HEADER_NAME\n  {\n    LIT_MAGIC_STRING__COUNT,\n    ECMA_BUILTIN_PROPERTY_END,\n    0,\n    0\n  }\n};\n\n#ifndef BUILTIN_CUSTOM_DISPATCH\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\nDISPATCH_ROUTINE_ROUTINE_NAME (uint8_t builtin_routine_id, /**< built-in wide routine\n                                                                identifier */\n                               ecma_value_t this_arg_value, /**< 'this' argument\n                                                                 value */\n                               const ecma_value_t arguments_list[], /**< list of arguments\n                                                                         passed to routine */\n                               uint32_t arguments_number) /**< length of\n                                                           *   arguments' list */\n{\n  /* the arguments may be unused for some built-ins */\n  JERRY_UNUSED (this_arg_value);\n  JERRY_UNUSED (arguments_list);\n  JERRY_UNUSED (arguments_number);\n\n  switch (builtin_routine_id)\n  {\n#define ROUTINE_ARG(n) (arguments_list[n - 1])\n#define ROUTINE_ARG_LIST_0\n#define ROUTINE_ARG_LIST_1 , ROUTINE_ARG(1)\n#define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1, ROUTINE_ARG(2)\n#define ROUTINE_ARG_LIST_3 ROUTINE_ARG_LIST_2, ROUTINE_ARG(3)\n#define ROUTINE_ARG_LIST_NON_FIXED , arguments_list, arguments_number\n#define ROUTINE(name, c_function_name, args_number, length_prop_value) \\\n       case ECMA_ROUTINE_ ## name ## c_function_name: \\\n       { \\\n         return c_function_name (this_arg_value ROUTINE_ARG_LIST_ ## args_number); \\\n       }\n#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \\\n       case ECMA_ROUTINE_ ## name ## c_function_name: \\\n       { \\\n         return c_function_name (this_arg_value ROUTINE_ARG_LIST_ ## args_number); \\\n       }\n#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, flags) \\\n       case ECMA_ROUTINE_ ## name ## c_function_name: \\\n       { \\\n         return c_function_name (this_arg_value ROUTINE_ARG_LIST_ ## args_number); \\\n       }\n#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \\\n       case ECMA_ACCESSOR_ ## name ## c_getter_func_name: \\\n       { \\\n         return c_getter_func_name(this_arg_value); \\\n       } \\\n       case ECMA_ACCESSOR_ ## name ## c_setter_func_name: \\\n       { \\\n         return c_setter_func_name(this_arg_value ROUTINE_ARG_LIST_1); \\\n       }\n#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \\\n       case ECMA_ACCESSOR_ ## name ## c_getter_func_name: \\\n       { \\\n         return c_getter_func_name(this_arg_value); \\\n       }\n#include BUILTIN_INC_HEADER_NAME\n#undef ROUTINE_ARG\n#undef ROUTINE_ARG_LIST_0\n#undef ROUTINE_ARG_LIST_1\n#undef ROUTINE_ARG_LIST_2\n#undef ROUTINE_ARG_LIST_3\n#undef ROUTINE_ARG_LIST_NON_FIXED\n\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* DISPATCH_ROUTINE_ROUTINE_NAME */\n\n#endif /* !BUILTIN_CUSTOM_DISPATCH */\n\n#undef BUILTIN_INC_HEADER_NAME\n#undef BUILTIN_CUSTOM_DISPATCH\n#undef BUILTIN_UNDERSCORED_ID\n#undef DISPATCH_ROUTINE_ROUTINE_NAME\n#undef ECMA_BUILTIN_PROPERTY_NAME_INDEX\n#undef PASTE__\n#undef PASTE_\n#undef PASTE\n#undef PROPERTY_DESCRIPTOR_LIST_NAME\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-container-object.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-arraybuffer-object.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"ecma-string-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_INTRINSIC_ROUTINE_START = 0,\n  ECMA_INTRINSIC_ARRAY_PROTOTYPE_VALUES,\n  ECMA_INTRINSIC_TYPEDARRAY_PROTOTYPE_VALUES,\n  ECMA_INTRINSIC_MAP_PROTOTYPE_ENTRIES,\n  ECMA_INTRINSIC_SET_PROTOTYPE_VALUES,\n  ECMA_INTRINSIC_ARRAY_TO_STRING,\n  ECMA_INTRINSIC_DATE_TO_UTC_STRING,\n  ECMA_INTRINSIC_PARSE_FLOAT,\n  ECMA_INTRINSIC_PARSE_INT,\n  ECMA_INTRINSIC_STRING_TRIM_START,\n  ECMA_INTRINSIC_STRING_TRIM_END,\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-intrinsic.inc.h\"\n#define BUILTIN_UNDERSCORED_ID intrinsic\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup intrinsic ECMA Intrinsic object built-in\n * @{\n */\n\n/**\n * The %ArrayProto_values% intrinsic routine\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_intrinsic_array_prototype_values (ecma_value_t this_value) /**< this argument */\n{\n  ecma_value_t this_obj = ecma_op_to_object (this_value);\n\n  if (ECMA_IS_VALUE_ERROR (this_obj))\n  {\n    return this_obj;\n  }\n\n  ecma_object_t *this_obj_p = ecma_get_object_from_value (this_obj);\n\n  ecma_value_t ret_value = ecma_op_create_array_iterator (this_obj_p, ECMA_ITERATOR_VALUES);\n\n  ecma_deref_object (this_obj_p);\n\n  return ret_value;\n} /* ecma_builtin_intrinsic_array_prototype_values */\n\n/**\n * The Map.prototype entries and [@@iterator] routines\n *\n * See also:\n *          ECMA-262 v6, 23.1.3.4\n *          ECMA-262 v6, 23.1.3.12\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_intrinsic_map_prototype_entries (ecma_value_t this_value)\n{\n  ecma_extended_object_t *map_object_p = ecma_op_container_get_object (this_value, LIT_MAGIC_STRING_MAP_UL);\n\n  if (map_object_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  return ecma_op_container_create_iterator (this_value,\n                                            ECMA_BUILTIN_ID_MAP_ITERATOR_PROTOTYPE,\n                                            ECMA_PSEUDO_MAP_ITERATOR,\n                                            ECMA_ITERATOR_ENTRIES);\n} /* ecma_builtin_intrinsic_map_prototype_entries */\n\n/**\n * The Set.prototype values, keys and [@@iterator] routines\n *\n * See also:\n *          ECMA-262 v6, 23.2.3.8\n *          ECMA-262 v6, 23.2.3.10\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_intrinsic_set_prototype_values (ecma_value_t this_value)\n{\n  ecma_extended_object_t *map_object_p = ecma_op_container_get_object (this_value, LIT_MAGIC_STRING_SET_UL);\n\n  if (map_object_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  return ecma_op_container_create_iterator (this_value,\n                                            ECMA_BUILTIN_ID_SET_ITERATOR_PROTOTYPE,\n                                            ECMA_PSEUDO_SET_ITERATOR,\n                                            ECMA_ITERATOR_VALUES);\n} /* ecma_builtin_intrinsic_set_prototype_values */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_intrinsic_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                         ecma_value_t this_arg, /**< 'this' argument value */\n                                         const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                 *   passed to routine */\n                                         uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (arguments_number);\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_INTRINSIC_ARRAY_PROTOTYPE_VALUES:\n    {\n      return ecma_builtin_intrinsic_array_prototype_values (this_arg);\n    }\n    case ECMA_INTRINSIC_TYPEDARRAY_PROTOTYPE_VALUES:\n    {\n      if (!ecma_is_typedarray (this_arg))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not a TypedArray.\"));\n      }\n\n      if (ecma_arraybuffer_is_detached (ecma_typedarray_get_arraybuffer (ecma_get_object_from_value (this_arg))))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n      }\n\n      return ecma_typedarray_iterators_helper (this_arg, ECMA_ITERATOR_VALUES);\n    }\n    case ECMA_INTRINSIC_SET_PROTOTYPE_VALUES:\n    {\n      return ecma_builtin_intrinsic_set_prototype_values (this_arg);\n    }\n    case ECMA_INTRINSIC_MAP_PROTOTYPE_ENTRIES:\n    {\n      return ecma_builtin_intrinsic_map_prototype_entries (this_arg);\n    }\n    case ECMA_INTRINSIC_ARRAY_TO_STRING:\n    {\n      ecma_value_t this_obj = ecma_op_to_object (this_arg);\n      if (ECMA_IS_VALUE_ERROR (this_obj))\n      {\n        return this_obj;\n      }\n\n      ecma_value_t result = ecma_array_object_to_string (this_obj);\n      ecma_deref_object (ecma_get_object_from_value (this_obj));\n\n      return result;\n    }\n    case ECMA_INTRINSIC_DATE_TO_UTC_STRING:\n    {\n      if (!ecma_is_value_object (this_arg)\n          || !ecma_object_class_is (ecma_get_object_from_value (this_arg), LIT_MAGIC_STRING_DATE_UL))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a Date object\"));\n      }\n\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) ecma_get_object_from_value (this_arg);\n      ecma_number_t *prim_value_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_number_t,\n                                                                     ext_object_p->u.class_prop.u.value);\n\n      if (ecma_number_is_nan (*prim_value_p))\n      {\n        return ecma_make_magic_string_value (LIT_MAGIC_STRING_INVALID_DATE_UL);\n      }\n\n      return ecma_date_value_to_utc_string (*prim_value_p);\n    }\n    case ECMA_INTRINSIC_STRING_TRIM_START:\n    case ECMA_INTRINSIC_STRING_TRIM_END:\n    {\n      if (!ecma_op_require_object_coercible (this_arg))\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      ecma_string_t *to_str_p = ecma_op_to_string (this_arg);\n      if (to_str_p == NULL)\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      ECMA_STRING_TO_UTF8_STRING (to_str_p, start_p, input_start_size);\n\n      lit_utf8_size_t size;\n      const lit_utf8_byte_t *input_start_p = start_p;\n      const lit_utf8_byte_t *input_str_end_p = start_p + input_start_size;\n\n      ecma_string_t *ret_str_p;\n      if (builtin_routine_id == ECMA_INTRINSIC_STRING_TRIM_START)\n      {\n        const lit_utf8_byte_t *new_start_p = ecma_string_trim_front (input_start_p, input_str_end_p);\n        size = (lit_utf8_size_t) (input_str_end_p - new_start_p);\n        ret_str_p = ecma_new_ecma_string_from_utf8 (new_start_p, size);\n      }\n      else\n      {\n        const lit_utf8_byte_t *new_end_p = ecma_string_trim_back (input_start_p, input_str_end_p);\n        size = (lit_utf8_size_t) (new_end_p - input_start_p);\n        ret_str_p = ecma_new_ecma_string_from_utf8 (input_start_p, size);\n      }\n\n      ECMA_FINALIZE_UTF8_STRING (start_p, input_start_size);\n      ecma_value_t result = ecma_make_string_value (ret_str_p);\n      ecma_deref_ecma_string (to_str_p);\n      return result;\n\n    }\n    default:\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_INTRINSIC_PARSE_INT\n                    || builtin_routine_id == ECMA_INTRINSIC_PARSE_FLOAT);\n\n      ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]);\n\n      if (JERRY_UNLIKELY (str_p == NULL))\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      ecma_value_t result;\n      ECMA_STRING_TO_UTF8_STRING (str_p, string_buff, string_buff_size);\n\n      if (builtin_routine_id == ECMA_INTRINSIC_PARSE_INT)\n      {\n        result = ecma_number_parse_int (string_buff,\n                                        string_buff_size,\n                                        arguments_list_p[1]);\n      }\n      else\n      {\n        JERRY_ASSERT (builtin_routine_id == ECMA_INTRINSIC_PARSE_FLOAT);\n        result = ecma_number_parse_float (string_buff,\n                                          string_buff_size);\n      }\n\n      ECMA_FINALIZE_UTF8_STRING (string_buff, string_buff_size);\n      ecma_deref_ecma_string (str_p);\n      return result;\n    }\n  }\n} /* ecma_builtin_intrinsic_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Intrinsic built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES, ECMA_INTRINSIC_ARRAY_PROTOTYPE_VALUES, 0, 0)\nROUTINE (LIT_INTERNAL_MAGIC_STRING_TYPEDARRAY_PROTOTYPE_VALUES, ECMA_INTRINSIC_TYPEDARRAY_PROTOTYPE_VALUES, 0, 0)\nROUTINE (LIT_INTERNAL_MAGIC_STRING_SET_PROTOTYPE_VALUES, ECMA_INTRINSIC_SET_PROTOTYPE_VALUES, 0, 0)\nROUTINE (LIT_INTERNAL_MAGIC_STRING_MAP_PROTOTYPE_ENTRIES, ECMA_INTRINSIC_MAP_PROTOTYPE_ENTRIES, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TRIM_START, ECMA_INTRINSIC_STRING_TRIM_START, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TRIM_END, ECMA_INTRINSIC_STRING_TRIM_END, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_INTRINSIC_ARRAY_TO_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_UTC_STRING_UL, ECMA_INTRINSIC_DATE_TO_UTC_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_PARSE_FLOAT, ECMA_INTRINSIC_PARSE_FLOAT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_PARSE_INT, ECMA_INTRINSIC_PARSE_INT, 2, 2)\n#endif /* ENABLED (JERRY_ESNEXT) */\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-iterator-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-iterator-object.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-iterator-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID iterator_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup %iteratorprototype% ECMA %IteratorPrototype% object built-in\n * @{\n */\n\n/**\n * The %IteratorPrototype% object's '@@iterator' routine\n *\n * See also:\n *          ECMA-262 v6, 22.1.2.1\n *\n * Note:\n *     Returned value must be freed with ecma_free_value.\n *\n * @return the given this value\n */\nstatic ecma_value_t\necma_builtin_iterator_prototype_object_iterator (ecma_value_t this_val) /**< this argument */\n{\n  /* 1. */\n  return ecma_copy_value (this_val);\n} /* ecma_builtin_iterator_prototype_object_iterator */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-iterator-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %IteratorPrototype% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ecma_builtin_iterator_prototype_object_iterator, 0, 0)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"jrt.h\"\n#include \"jrt-libc-includes.h\"\n#include \"lit-char-helpers.h\"\n#include \"lit-globals.h\"\n\n#if ENABLED (JERRY_BUILTIN_JSON)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-json.inc.h\"\n#define BUILTIN_UNDERSCORED_ID json\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/**\n * The number of expected hexidecimal characters in a hex escape sequence\n */\n#define ECMA_JSON_HEX_ESCAPE_SEQUENCE_LENGTH (4)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup json ECMA JSON object built-in\n * @{\n */\n\n/**\n * JSON token type\n */\ntypedef enum\n{\n  TOKEN_INVALID, /**< error token */\n  TOKEN_END, /**< end of stream reached */\n  TOKEN_NUMBER, /**< JSON number */\n  TOKEN_STRING, /**< JSON string */\n  TOKEN_NULL, /**< JSON null primitive value */\n  TOKEN_TRUE, /**< JSON true primitive value */\n  TOKEN_FALSE, /**< JSON false primitive value */\n  TOKEN_LEFT_BRACE, /**< JSON left brace */\n  TOKEN_RIGHT_BRACE, /**< JSON right brace */\n  TOKEN_LEFT_SQUARE, /**< JSON left square bracket */\n  TOKEN_RIGHT_SQUARE, /**< JSON right square bracket */\n  TOKEN_COMMA, /**< JSON comma */\n  TOKEN_COLON /**< JSON colon */\n} ecma_json_token_type_t;\n\n/**\n * JSON token\n */\ntypedef struct\n{\n  ecma_json_token_type_t type; /**< type of the current token */\n  const lit_utf8_byte_t *current_p; /**< current position of the string processed by the parser */\n  const lit_utf8_byte_t *end_p; /**< end of the string processed by the parser */\n\n  /**\n   * Fields depending on type.\n   */\n  union\n  {\n    ecma_string_t *string_p; /**< when type is string_token it contains the string */\n    ecma_number_t number; /**< when type is number_token, it contains the value of the number */\n  } u;\n} ecma_json_token_t;\n\n/**\n * Parse and extract string token.\n */\nstatic void\necma_builtin_json_parse_string (ecma_json_token_t *token_p) /**< token argument */\n{\n  const lit_utf8_byte_t *current_p = token_p->current_p;\n  const lit_utf8_byte_t *end_p = token_p->end_p;\n\n  ecma_stringbuilder_t result_builder = ecma_stringbuilder_create ();\n  const lit_utf8_byte_t *unappended_p = current_p;\n\n  while (true)\n  {\n    if (current_p >= end_p || *current_p <= 0x1f)\n    {\n      goto invalid_string;\n    }\n\n    if (*current_p == LIT_CHAR_DOUBLE_QUOTE)\n    {\n      break;\n    }\n\n    if (*current_p == LIT_CHAR_BACKSLASH)\n    {\n      ecma_stringbuilder_append_raw (&result_builder,\n                                     unappended_p,\n                                     (lit_utf8_size_t) (current_p - unappended_p));\n\n      current_p++;\n\n      /* If there is an escape sequence but there's no escapable character just return */\n      if (current_p >= end_p)\n      {\n        goto invalid_string;\n      }\n\n      const lit_utf8_byte_t c = *current_p;\n      switch (c)\n      {\n        case LIT_CHAR_DOUBLE_QUOTE:\n        case LIT_CHAR_SLASH:\n        case LIT_CHAR_BACKSLASH:\n        {\n          ecma_stringbuilder_append_byte (&result_builder, c);\n          current_p++;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_B:\n        {\n          ecma_stringbuilder_append_byte (&result_builder, LIT_CHAR_BS);\n          current_p++;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_F:\n        {\n          ecma_stringbuilder_append_byte (&result_builder, LIT_CHAR_FF);\n          current_p++;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_N:\n        {\n          ecma_stringbuilder_append_byte (&result_builder, LIT_CHAR_LF);\n          current_p++;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_R:\n        {\n          ecma_stringbuilder_append_byte (&result_builder, LIT_CHAR_CR);\n          current_p++;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_T:\n        {\n          ecma_stringbuilder_append_byte (&result_builder, LIT_CHAR_TAB);\n          current_p++;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_U:\n        {\n          uint32_t hex_value = lit_char_hex_lookup (current_p + 1, end_p, ECMA_JSON_HEX_ESCAPE_SEQUENCE_LENGTH);\n          if (hex_value == UINT32_MAX)\n          {\n            goto invalid_string;\n          }\n\n          ecma_stringbuilder_append_char (&result_builder, (ecma_char_t) hex_value);\n          current_p += ECMA_JSON_HEX_ESCAPE_SEQUENCE_LENGTH + 1;\n          break;\n        }\n        default:\n        {\n          goto invalid_string;\n        }\n      }\n\n      unappended_p = current_p;\n      continue;\n    }\n\n    current_p++;\n  }\n\n  ecma_stringbuilder_append_raw (&result_builder,\n                                 unappended_p,\n                                 (lit_utf8_size_t) (current_p - unappended_p));\n  token_p->u.string_p = ecma_stringbuilder_finalize (&result_builder);\n  token_p->current_p = current_p + 1;\n  token_p->type = TOKEN_STRING;\n  return;\n\ninvalid_string:\n  ecma_stringbuilder_destroy (&result_builder);\n} /* ecma_builtin_json_parse_string */\n\n/**\n * Parse and extract string token.\n */\nstatic void\necma_builtin_json_parse_number (ecma_json_token_t *token_p) /**< token argument */\n{\n  const lit_utf8_byte_t *current_p = token_p->current_p;\n  const lit_utf8_byte_t *end_p = token_p->end_p;\n  const lit_utf8_byte_t *start_p = current_p;\n\n  JERRY_ASSERT (current_p < end_p);\n\n  if (*current_p == LIT_CHAR_MINUS)\n  {\n    current_p++;\n  }\n\n  if (current_p >= end_p)\n  {\n    return;\n  }\n\n  if (*current_p == LIT_CHAR_0)\n  {\n    current_p++;\n\n    if (current_p < end_p && lit_char_is_decimal_digit (*current_p))\n    {\n      return;\n    }\n  }\n  else if (lit_char_is_decimal_digit (*current_p))\n  {\n    do\n    {\n      current_p++;\n    }\n    while (current_p < end_p && lit_char_is_decimal_digit (*current_p));\n  }\n\n  if (current_p < end_p && *current_p == LIT_CHAR_DOT)\n  {\n    current_p++;\n\n    if (current_p >= end_p || !lit_char_is_decimal_digit (*current_p))\n    {\n      return;\n    }\n\n    do\n    {\n      current_p++;\n    }\n    while (current_p < end_p && lit_char_is_decimal_digit (*current_p));\n  }\n\n  if (current_p < end_p && (*current_p == LIT_CHAR_LOWERCASE_E || *current_p == LIT_CHAR_UPPERCASE_E))\n  {\n    current_p++;\n\n    if (current_p < end_p && (*current_p == LIT_CHAR_PLUS || *current_p == LIT_CHAR_MINUS))\n    {\n      current_p++;\n    }\n\n    if (current_p >= end_p || !lit_char_is_decimal_digit (*current_p))\n    {\n      return;\n    }\n\n    do\n    {\n      current_p++;\n    }\n    while (current_p < end_p && lit_char_is_decimal_digit (*current_p));\n  }\n\n  token_p->type = TOKEN_NUMBER;\n  token_p->u.number = ecma_utf8_string_to_number (start_p, (lit_utf8_size_t) (current_p - start_p), 0);\n\n  token_p->current_p = current_p;\n} /* ecma_builtin_json_parse_number */\n\n/**\n * Parse next token.\n *\n * The function fills the fields of the ecma_json_token_t\n * argument and advances the string pointer.\n */\nstatic void\necma_builtin_json_parse_next_token (ecma_json_token_t *token_p, /**< token argument */\n                                    bool parse_string) /**< strings are allowed to parse */\n{\n  const lit_utf8_byte_t *current_p = token_p->current_p;\n  const lit_utf8_byte_t *end_p = token_p->end_p;\n  token_p->type = TOKEN_INVALID;\n\n  while (current_p < end_p\n         && (*current_p == LIT_CHAR_SP\n             || *current_p == LIT_CHAR_CR\n             || *current_p == LIT_CHAR_LF\n             || *current_p == LIT_CHAR_TAB))\n  {\n    current_p++;\n  }\n\n  if (current_p == end_p)\n  {\n    token_p->type = TOKEN_END;\n    return;\n  }\n\n  switch (*current_p)\n  {\n    case LIT_CHAR_LEFT_BRACE:\n    {\n      token_p->type = TOKEN_LEFT_BRACE;\n      token_p->current_p = current_p + 1;\n      return;\n    }\n    case LIT_CHAR_RIGHT_BRACE:\n    {\n      token_p->type = TOKEN_RIGHT_BRACE;\n      token_p->current_p = current_p + 1;\n      return;\n    }\n    case LIT_CHAR_LEFT_SQUARE:\n    {\n      token_p->type = TOKEN_LEFT_SQUARE;\n      token_p->current_p = current_p + 1;\n      return;\n    }\n    case LIT_CHAR_RIGHT_SQUARE:\n    {\n      token_p->type = TOKEN_RIGHT_SQUARE;\n      token_p->current_p = current_p + 1;\n      return;\n    }\n    case LIT_CHAR_COMMA:\n    {\n      token_p->type = TOKEN_COMMA;\n      token_p->current_p = current_p + 1;\n      return;\n    }\n    case LIT_CHAR_COLON:\n    {\n      token_p->type = TOKEN_COLON;\n      token_p->current_p = current_p + 1;\n      return;\n    }\n    case LIT_CHAR_DOUBLE_QUOTE:\n    {\n      if (parse_string)\n      {\n        token_p->current_p = current_p + 1;\n        ecma_builtin_json_parse_string (token_p);\n      }\n      return;\n    }\n    case LIT_CHAR_LOWERCASE_N:\n    {\n      lit_utf8_size_t size = lit_get_magic_string_size (LIT_MAGIC_STRING_NULL);\n      if (current_p + size <= end_p)\n      {\n        if (!memcmp (lit_get_magic_string_utf8 (LIT_MAGIC_STRING_NULL),\n                     current_p,\n                     size))\n        {\n          token_p->type = TOKEN_NULL;\n          token_p->current_p = current_p + size;\n          return;\n        }\n      }\n      break;\n    }\n    case LIT_CHAR_LOWERCASE_T:\n    {\n      lit_utf8_size_t size = lit_get_magic_string_size (LIT_MAGIC_STRING_TRUE);\n      if (current_p + size <= end_p)\n      {\n        if (!memcmp (lit_get_magic_string_utf8 (LIT_MAGIC_STRING_TRUE),\n                     current_p,\n                     size))\n        {\n          token_p->type = TOKEN_TRUE;\n          token_p->current_p = current_p + size;\n          return;\n        }\n      }\n      break;\n    }\n    case LIT_CHAR_LOWERCASE_F:\n    {\n      lit_utf8_size_t size = lit_get_magic_string_size (LIT_MAGIC_STRING_FALSE);\n      if (current_p + size <= end_p)\n      {\n        if (!memcmp (lit_get_magic_string_utf8 (LIT_MAGIC_STRING_FALSE),\n                     current_p,\n                     size))\n        {\n          token_p->type = TOKEN_FALSE;\n          token_p->current_p = current_p + size;\n          return;\n        }\n      }\n      break;\n    }\n    default:\n    {\n      if (*current_p == LIT_CHAR_MINUS || lit_char_is_decimal_digit (*current_p))\n      {\n        token_p->current_p = current_p;\n        ecma_builtin_json_parse_number (token_p);\n        return;\n      }\n      break;\n    }\n  }\n} /* ecma_builtin_json_parse_next_token */\n\n/**\n * Utility for defining properties.\n *\n * It silently ignores all errors.\n */\nstatic void\necma_builtin_json_define_value_property (ecma_object_t *obj_p, /**< this object */\n                                         ecma_string_t *property_name_p, /**< property name */\n                                         ecma_value_t value) /**< value */\n{\n  ecma_value_t completion_value = ecma_builtin_helper_def_prop (obj_p,\n                                                                property_name_p,\n                                                                value,\n                                                                ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n\n  JERRY_ASSERT (ecma_is_value_boolean (completion_value));\n} /* ecma_builtin_json_define_value_property */\n\n/**\n * Parse next value.\n *\n * The function fills the fields of the ecma_json_token_t\n * argument and advances the string pointer.\n *\n * @return ecma_value with the property value\n */\nstatic ecma_value_t\necma_builtin_json_parse_value (ecma_json_token_t *token_p) /**< token argument */\n{\n  switch (token_p->type)\n  {\n    case TOKEN_NUMBER:\n    {\n      return ecma_make_number_value (token_p->u.number);\n    }\n    case TOKEN_STRING:\n    {\n      return ecma_make_string_value (token_p->u.string_p);\n    }\n    case TOKEN_NULL:\n    {\n      return ECMA_VALUE_NULL;\n    }\n    case TOKEN_TRUE:\n    {\n      return ECMA_VALUE_TRUE;\n    }\n    case TOKEN_FALSE:\n    {\n      return ECMA_VALUE_FALSE;\n    }\n    case TOKEN_LEFT_BRACE:\n    {\n      ecma_object_t *object_p = ecma_op_create_object_object_noarg ();\n\n      ecma_builtin_json_parse_next_token (token_p, true);\n\n      if (token_p->type == TOKEN_RIGHT_BRACE)\n      {\n        return ecma_make_object_value (object_p);\n      }\n\n      while (true)\n      {\n        if (token_p->type != TOKEN_STRING)\n        {\n          break;\n        }\n\n        ecma_string_t *name_p = token_p->u.string_p;\n\n        ecma_builtin_json_parse_next_token (token_p, false);\n        if (token_p->type != TOKEN_COLON)\n        {\n          ecma_deref_ecma_string (name_p);\n          break;\n        }\n\n        ecma_builtin_json_parse_next_token (token_p, true);\n        ecma_value_t value = ecma_builtin_json_parse_value (token_p);\n\n        if (ecma_is_value_empty (value))\n        {\n          ecma_deref_ecma_string (name_p);\n          break;\n        }\n\n        ecma_builtin_json_define_value_property (object_p, name_p, value);\n        ecma_deref_ecma_string (name_p);\n        ecma_free_value (value);\n\n        ecma_builtin_json_parse_next_token (token_p, false);\n        if (token_p->type == TOKEN_RIGHT_BRACE)\n        {\n          return ecma_make_object_value (object_p);\n        }\n\n        if (token_p->type != TOKEN_COMMA)\n        {\n          break;\n        }\n\n        ecma_builtin_json_parse_next_token (token_p, true);\n      }\n\n      /*\n       * Parse error occured.\n       */\n      ecma_deref_object (object_p);\n      return ECMA_VALUE_EMPTY;\n    }\n    case TOKEN_LEFT_SQUARE:\n    {\n      uint32_t length = 0;\n      ecma_object_t *array_p = ecma_op_new_array_object (0);\n\n      ecma_builtin_json_parse_next_token (token_p, true);\n\n      if (token_p->type == TOKEN_RIGHT_SQUARE)\n      {\n        return ecma_make_object_value (array_p);\n      }\n\n      while (true)\n      {\n        ecma_value_t value = ecma_builtin_json_parse_value (token_p);\n\n        if (ecma_is_value_empty (value))\n        {\n          JERRY_ASSERT (token_p->type != TOKEN_STRING);\n          break;\n        }\n\n        ecma_value_t completion;\n        completion = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                            length,\n                                                            value,\n                                                            ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n        JERRY_ASSERT (ecma_is_value_true (completion));\n        ecma_free_value (value);\n\n        ecma_builtin_json_parse_next_token (token_p, false);\n\n        if (token_p->type == TOKEN_RIGHT_SQUARE)\n        {\n          return ecma_make_object_value (array_p);\n        }\n\n        if (token_p->type != TOKEN_COMMA)\n        {\n          JERRY_ASSERT (token_p->type != TOKEN_STRING);\n          break;\n        }\n\n        ecma_builtin_json_parse_next_token (token_p, true);\n        length++;\n      }\n\n      ecma_deref_object (array_p);\n      return ECMA_VALUE_EMPTY;\n    }\n    default:\n    {\n      return ECMA_VALUE_EMPTY;\n    }\n  }\n} /* ecma_builtin_json_parse_value */\n\nstatic ecma_value_t\necma_builtin_json_internalize_process_property (ecma_object_t *reviver_p,\n                                                ecma_object_t *object_p,\n                                                ecma_string_t *prop_name);\n\n/**\n * Abstract operation InternalizeJSONProperty\n *\n * See also:\n *         ECMA-262 v5, 24.3.1.1\n *         ECMA-262 v11, 24.5.1.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_json_internalize_property (ecma_object_t *reviver_p, /**< reviver function */\n                                        ecma_object_t *holder_p, /**< holder object */\n                                        ecma_string_t *name_p) /**< property name */\n{\n  JERRY_ASSERT (reviver_p);\n  JERRY_ASSERT (holder_p);\n  JERRY_ASSERT (name_p);\n\n  /* 1. */\n  ecma_value_t value = ecma_op_object_get (holder_p, name_p);\n\n  /* 2. */\n  if (ECMA_IS_VALUE_ERROR (value))\n  {\n    return value;\n  }\n\n  /* 3. */\n  if (ecma_is_value_object (value))\n  {\n    /* 3.a */\n    ecma_value_t is_array = ecma_is_value_array (value);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (ECMA_IS_VALUE_ERROR (is_array))\n    {\n      ecma_free_value (value);\n      return is_array;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    ecma_object_t *object_p = ecma_get_object_from_value (value);\n\n    /* 3.c */\n    if (ecma_is_value_true (is_array))\n    {\n      /* 3.c.ii */\n      ecma_length_t length;\n      ecma_value_t to_len = ecma_op_object_get_length (object_p, &length);\n\n      /* 3.c.iii */\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      if (ECMA_IS_VALUE_ERROR (to_len))\n      {\n        ecma_deref_object (object_p);\n        return to_len;\n      }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n      JERRY_ASSERT (ecma_is_value_empty (to_len));\n\n      /* 3.c.iv */\n      for (ecma_length_t i = 0; i < length; i++)\n      {\n        ecma_string_t *prop_index = ecma_new_ecma_string_from_length (i);\n        ecma_value_t result = ecma_builtin_json_internalize_process_property (reviver_p, object_p, prop_index);\n\n        ecma_deref_ecma_string (prop_index);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          ecma_deref_object (object_p);\n          return result;\n        }\n\n        JERRY_ASSERT (result == ECMA_VALUE_TRUE);\n      }\n    }\n    /* 3.d */\n    else\n    {\n      ecma_collection_t *props_p = ecma_op_object_get_enumerable_property_names (object_p,\n                                                                                 ECMA_ENUMERABLE_PROPERTY_KEYS);\n#if ENABLED (JERRY_ESNEXT)\n      if (JERRY_UNLIKELY (props_p == NULL))\n      {\n        ecma_deref_object (object_p);\n        return ECMA_VALUE_ERROR;\n      }\n#else /* !ENABLED (JERRY_ESNEXT) */\n      JERRY_ASSERT (props_p != NULL);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      ecma_value_t *buffer_p = props_p->buffer_p;\n\n      /* 3.d.iii */\n      for (uint32_t i = 0; i < props_p->item_count; i++)\n      {\n        ecma_string_t *property_name_p = ecma_get_string_from_value (buffer_p[i]);\n        ecma_value_t result = ecma_builtin_json_internalize_process_property (reviver_p, object_p, property_name_p);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          ecma_collection_free (props_p);\n          ecma_deref_object (object_p);\n          return result;\n        }\n\n        JERRY_ASSERT (result == ECMA_VALUE_TRUE);\n      }\n\n      ecma_collection_free (props_p);\n    }\n  }\n\n  ecma_value_t arguments_list[2];\n  arguments_list[0] = ecma_make_string_value (name_p);\n  arguments_list[1] = value;\n\n  /* 4. */\n  ecma_value_t ret_value = ecma_op_function_call (reviver_p,\n                                                  ecma_make_object_value (holder_p),\n                                                  arguments_list,\n                                                  2);\n  ecma_free_value (value);\n  return ret_value;\n} /* ecma_builtin_json_internalize_property */\n\n/**\n * Part of the InternalizeJSONProperty abstract method.\n *\n * See also:\n *         ECMA-262 v5, 15.12.2\n *         ECMA-262 v11, 24.5.1.1 in step 2\n *\n * @return ECMA_VALUE_TRUE - if no error occured.\n *         error if one of the operation failed.\n */\nstatic\necma_value_t ecma_builtin_json_internalize_process_property (ecma_object_t *reviver_p, /**< reviver function */\n                                                             ecma_object_t *object_p, /**< holder object */\n                                                             ecma_string_t *prop_name) /**< property name */\n{\n  /* ES11: 2.b.iii.1 / 2.c.ii.1 */\n  ecma_value_t new_element = ecma_builtin_json_internalize_property (reviver_p, object_p, prop_name);\n\n  if (ECMA_IS_VALUE_ERROR (new_element))\n  {\n    return new_element;\n  }\n\n  /* ES11: 2.b.iii.2 / 2.c.ii.2 */\n  if (ecma_is_value_undefined (new_element))\n  {\n    /* ES11: 2.b.iii.2.a / 2.c.ii.2.a */\n    ecma_value_t delete_val = ecma_op_object_delete (object_p, prop_name, false);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (ECMA_IS_VALUE_ERROR (delete_val))\n    {\n      return delete_val;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    JERRY_ASSERT (ecma_is_value_boolean (delete_val));\n  }\n  else\n  {\n    /* ES11: 2.b.iii.3.a / 2.c.ii.3.a */\n    ecma_value_t def_value = ecma_builtin_helper_def_prop (object_p,\n                                                           prop_name,\n                                                           new_element,\n                                                           ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n    ecma_free_value (new_element);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (ECMA_IS_VALUE_ERROR (def_value))\n    {\n      return def_value;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    JERRY_ASSERT (ecma_is_value_boolean (def_value));\n  }\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_builtin_json_internalize_process_property */\n\n/**\n * Function to set a string token from the given arguments, fills its fields and advances the string pointer.\n *\n * @return ecma_value_t containing an object or an error massage\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_json_parse_buffer (const lit_utf8_byte_t * str_start_p, /**< String to parse */\n                                lit_utf8_size_t string_size) /**< size of the string */\n{\n  ecma_json_token_t token;\n  token.current_p = str_start_p;\n  token.end_p = str_start_p + string_size;\n\n  ecma_builtin_json_parse_next_token (&token, true);\n  ecma_value_t result = ecma_builtin_json_parse_value (&token);\n\n  if (!ecma_is_value_empty (result))\n  {\n    ecma_builtin_json_parse_next_token (&token, false);\n    if (token.type == TOKEN_END)\n    {\n      return result;\n    }\n\n    ecma_free_value (result);\n  }\n\n  return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid JSON format.\"));\n} /*ecma_builtin_json_parse_buffer*/\n\n/**\n * The JSON object's 'parse' routine\n *\n * See also:\n *          ECMA-262 v5, 15.12.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_json_parse (ecma_value_t this_arg, /**< 'this' argument */\n                         ecma_value_t arg1, /**< string argument */\n                         ecma_value_t arg2) /**< reviver argument */\n{\n  JERRY_UNUSED (this_arg);\n\n  ecma_string_t *text_string_p = ecma_op_to_string (arg1);\n\n  if (JERRY_UNLIKELY (text_string_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ECMA_STRING_TO_UTF8_STRING (text_string_p, str_start_p, string_size);\n  ecma_value_t result = ecma_builtin_json_parse_buffer (str_start_p, string_size);\n  ECMA_FINALIZE_UTF8_STRING (str_start_p, string_size);\n  ecma_deref_ecma_string (text_string_p);\n\n  if (!ECMA_IS_VALUE_ERROR (result) && ecma_op_is_callable (arg2))\n  {\n    ecma_object_t *object_p = ecma_op_create_object_object_noarg ();\n\n    ecma_property_value_t *prop_value_p;\n    prop_value_p = ecma_create_named_data_property (object_p,\n                                                    ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY),\n                                                    ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                    NULL);\n\n    ecma_named_data_property_assign_value (object_p, prop_value_p, result);\n\n    ecma_free_value (result);\n    result = ecma_builtin_json_internalize_property (ecma_get_object_from_value (arg2),\n                                                     object_p,\n                                                     ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY));\n    ecma_deref_object (object_p);\n  }\n\n  return result;\n} /* ecma_builtin_json_parse */\n\n/**\n * Abstract operation 'QuoteJSONString' defined in 24.3.2.2\n */\nstatic void\necma_builtin_json_quote (ecma_stringbuilder_t *builder_p, /**< builder for the result */\n                         ecma_string_t *string_p) /**< string that should be quoted */\n{\n  ECMA_STRING_TO_UTF8_STRING (string_p, string_buff, string_buff_size);\n  const lit_utf8_byte_t *str_p = string_buff;\n  const lit_utf8_byte_t *regular_str_start_p = string_buff;\n  const lit_utf8_byte_t *str_end_p = str_p + string_buff_size;\n\n  ecma_stringbuilder_append_byte (builder_p, LIT_CHAR_DOUBLE_QUOTE);\n\n  while (str_p < str_end_p)\n  {\n    ecma_char_t c = lit_cesu8_read_next (&str_p);\n\n    bool should_escape = false;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (lit_is_code_point_utf16_high_surrogate (c))\n    {\n      if (str_p < str_end_p)\n      {\n        const ecma_char_t next_ch = lit_cesu8_peek_next (str_p);\n        if (lit_is_code_point_utf16_low_surrogate (next_ch))\n        {\n          str_p += LIT_UTF8_MAX_BYTES_IN_CODE_UNIT;\n          continue;\n        }\n        should_escape = true;\n      }\n      else\n      {\n        should_escape = true;\n      }\n    }\n    else if (lit_is_code_point_utf16_low_surrogate (c))\n    {\n      should_escape = true;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (c == LIT_CHAR_BACKSLASH || c == LIT_CHAR_DOUBLE_QUOTE)\n    {\n      ecma_stringbuilder_append_raw (builder_p,\n                                     regular_str_start_p,\n                                     (lit_utf8_size_t) (str_p - regular_str_start_p - 1));\n      regular_str_start_p = str_p;\n      ecma_stringbuilder_append_byte (builder_p, LIT_CHAR_BACKSLASH);\n      ecma_stringbuilder_append_byte (builder_p, (lit_utf8_byte_t) c);\n    }\n    else if (c < LIT_CHAR_SP || should_escape)\n    {\n      /**\n        * In ES10 we should escape high or low surrogate characters,\n        * so we shouldn't append the unescaped character to the stringbuilder\n        */\n      uint8_t offset = should_escape ? LIT_UTF8_MAX_BYTES_IN_CODE_UNIT : 1;\n\n      ecma_stringbuilder_append_raw (builder_p,\n                                     regular_str_start_p,\n                                     (lit_utf8_size_t) (str_p - regular_str_start_p - offset));\n\n      regular_str_start_p = str_p;\n\n      switch (c)\n      {\n        case LIT_CHAR_BS:\n        {\n          ecma_stringbuilder_append_raw (builder_p, (lit_utf8_byte_t *) \"\\\\b\", 2);\n          break;\n        }\n        case LIT_CHAR_FF:\n        {\n          ecma_stringbuilder_append_raw (builder_p, (lit_utf8_byte_t *) \"\\\\f\", 2);\n          break;\n        }\n        case LIT_CHAR_LF:\n        {\n          ecma_stringbuilder_append_raw (builder_p, (lit_utf8_byte_t *) \"\\\\n\", 2);\n          break;\n        }\n        case LIT_CHAR_CR:\n        {\n          ecma_stringbuilder_append_raw (builder_p, (lit_utf8_byte_t *) \"\\\\r\", 2);\n          break;\n        }\n        case LIT_CHAR_TAB:\n        {\n          ecma_stringbuilder_append_raw (builder_p, (lit_utf8_byte_t *) \"\\\\t\", 2);\n          break;\n        }\n        default: /* Hexadecimal. */\n        {\n          lit_char_unicode_escape (builder_p, c);\n          break;\n        }\n      }\n    }\n  }\n\n  ecma_stringbuilder_append_raw (builder_p,\n                                 regular_str_start_p,\n                                 (lit_utf8_size_t) (str_end_p - regular_str_start_p));\n  ecma_stringbuilder_append_byte (builder_p, LIT_CHAR_DOUBLE_QUOTE);\n\n  ECMA_FINALIZE_UTF8_STRING (string_buff, string_buff_size);\n} /* ecma_builtin_json_quote */\n\nstatic ecma_value_t\necma_builtin_json_serialize_property (ecma_json_stringify_context_t *context_p,\n                                      ecma_object_t *holder_p,\n                                      ecma_string_t *key_p);\n\n/**\n * Abstract operation 'SerializeJSONObject' defined in 24.3.2.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_json_serialize_object (ecma_json_stringify_context_t *context_p, /**< context*/\n                                    ecma_object_t *obj_p) /**< the object*/\n{\n  /* 1. */\n  if (ecma_json_has_object_in_stack (context_p->occurence_stack_last_p, obj_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"The structure is cyclical.\"));\n  }\n\n  /* 2. */\n  ecma_json_occurence_stack_item_t stack_item;\n  stack_item.next_p = context_p->occurence_stack_last_p;\n  stack_item.object_p = obj_p;\n  context_p->occurence_stack_last_p = &stack_item;\n\n  /* 3. - 4.*/\n  const lit_utf8_size_t stepback_size = ecma_stringbuilder_get_size (&context_p->indent_builder);\n  ecma_stringbuilder_append (&context_p->indent_builder, context_p->gap_str_p);\n\n  const bool has_gap = !ecma_compare_ecma_string_to_magic_id (context_p->gap_str_p, LIT_MAGIC_STRING__EMPTY);\n  const lit_utf8_size_t separator_size = ecma_stringbuilder_get_size (&context_p->indent_builder);\n\n  ecma_collection_t *property_keys_p;\n  /* 5. */\n  if (context_p->property_list_p != NULL)\n  {\n    property_keys_p = context_p->property_list_p;\n  }\n  /* 6. */\n  else\n  {\n    property_keys_p = ecma_op_object_get_enumerable_property_names (obj_p, ECMA_ENUMERABLE_PROPERTY_KEYS);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (property_keys_p == NULL)\n    {\n      return ECMA_VALUE_ERROR;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n  }\n\n  /* 8. */\n  ecma_value_t *buffer_p = property_keys_p->buffer_p;\n\n  ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_LEFT_BRACE);\n  const lit_utf8_size_t left_brace = ecma_stringbuilder_get_size (&context_p->result_builder);\n  lit_utf8_size_t last_prop = left_brace;\n  ecma_value_t result = ECMA_VALUE_EMPTY;\n\n  for (uint32_t i = 0; i < property_keys_p->item_count; i++)\n  {\n    if (has_gap)\n    {\n      ecma_stringbuilder_append_raw (&context_p->result_builder,\n                                     ecma_stringbuilder_get_data (&context_p->indent_builder),\n                                     separator_size);\n    }\n\n    ecma_string_t *key_p = ecma_get_string_from_value (buffer_p[i]);\n    ecma_builtin_json_quote (&context_p->result_builder, key_p);\n    ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_COLON);\n\n    /* 8.c.iii */\n    if (has_gap)\n    {\n      ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_SP);\n    }\n\n    result = ecma_builtin_json_serialize_property (context_p, obj_p, key_p);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup;\n    }\n\n    /* 8.b */\n    if (!ecma_is_value_undefined (result))\n    {\n      /* ecma_builtin_json_serialize_property already appended the result. */\n      JERRY_ASSERT (ecma_is_value_empty (result));\n\n      ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_COMMA);\n      last_prop = ecma_stringbuilder_get_size (&context_p->result_builder);\n    }\n    else\n    {\n      /* The property should not be appended, we must backtrack. */\n      ecma_stringbuilder_revert (&context_p->result_builder, last_prop);\n    }\n  }\n\n  if (last_prop != left_brace)\n  {\n    /* Remove the last comma. */\n    ecma_stringbuilder_revert (&context_p->result_builder, last_prop - 1);\n\n    if (has_gap)\n    {\n      /* We appended at least one element, and have a separator, so must append the stepback. */\n      ecma_stringbuilder_append_raw (&context_p->result_builder,\n                                     ecma_stringbuilder_get_data (&context_p->indent_builder),\n                                     stepback_size);\n    }\n  }\n\n  ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_RIGHT_BRACE);\n  result = ECMA_VALUE_EMPTY;\n\n  /* 11. */\n  context_p->occurence_stack_last_p = stack_item.next_p;\n\n  /* 12. */\n  ecma_stringbuilder_revert (&context_p->indent_builder, stepback_size);\n\ncleanup:\n  if (context_p->property_list_p == NULL)\n  {\n    ecma_collection_free (property_keys_p);\n  }\n\n  return result;\n} /* ecma_builtin_json_serialize_object */\n\n/**\n * Abstract operation 'SerializeJSONArray' defined in 24.3.2.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_json_serialize_array (ecma_json_stringify_context_t *context_p, /**< context*/\n                                   ecma_object_t *obj_p) /**< the array object*/\n{\n#ifndef JERRY_NDEBUG\n  ecma_value_t obj_value = ecma_make_object_value (obj_p);\n  ecma_value_t is_array = ecma_is_value_array (obj_value);\n\n  JERRY_ASSERT (ecma_is_value_true (is_array));\n#endif /* !JERRY_NDEBUG */\n\n  /* 1. */\n  if (ecma_json_has_object_in_stack (context_p->occurence_stack_last_p, obj_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"The structure is cyclical.\"));\n  }\n\n  /* 2. */\n  ecma_json_occurence_stack_item_t stack_item;\n  stack_item.next_p = context_p->occurence_stack_last_p;\n  stack_item.object_p = obj_p;\n  context_p->occurence_stack_last_p = &stack_item;\n\n  /* 3. - 4.*/\n  const lit_utf8_size_t stepback_size = ecma_stringbuilder_get_size (&context_p->indent_builder);\n  ecma_stringbuilder_append (&context_p->indent_builder, context_p->gap_str_p);\n  const lit_utf8_size_t separator_size = ecma_stringbuilder_get_size (&context_p->indent_builder);\n\n  const bool has_gap = !ecma_compare_ecma_string_to_magic_id (context_p->gap_str_p, LIT_MAGIC_STRING__EMPTY);\n\n  /* 6. */\n  ecma_length_t array_length;\n  ecma_value_t length_value = ecma_op_object_get_length (obj_p, &array_length);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_IS_VALUE_ERROR (length_value))\n  {\n    return length_value;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n  JERRY_ASSERT (ecma_is_value_empty (length_value));\n\n  ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_LEFT_SQUARE);\n\n  const lit_utf8_size_t left_square = ecma_stringbuilder_get_size (&context_p->result_builder);\n  lit_utf8_size_t last_prop = left_square;\n\n  /* 8. - 9. */\n  for (ecma_length_t index = 0; index < array_length; index++)\n  {\n    /* 9.a */\n    ecma_string_t *index_str_p = ecma_new_ecma_string_from_length (index);\n\n    if (has_gap)\n    {\n      ecma_stringbuilder_append_raw (&context_p->result_builder,\n                                     ecma_stringbuilder_get_data (&context_p->indent_builder),\n                                     separator_size);\n    }\n\n    ecma_value_t result = ecma_builtin_json_serialize_property (context_p, obj_p, index_str_p);\n    ecma_deref_ecma_string (index_str_p);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      return result;\n    }\n\n    if (ecma_is_value_undefined (result))\n    {\n      /* 9.c */\n      ecma_stringbuilder_append_magic (&context_p->result_builder, LIT_MAGIC_STRING_NULL);\n    }\n    else\n    {\n      JERRY_ASSERT (ecma_is_value_empty (result));\n    }\n\n    last_prop = ecma_stringbuilder_get_size (&context_p->result_builder);\n    ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_COMMA);\n  }\n\n  /* Remove the last comma. */\n  ecma_stringbuilder_revert (&context_p->result_builder, last_prop);\n\n  /* 11.b.iii */\n  if (last_prop != left_square && has_gap)\n  {\n    /* We appended at least one element, and have a separator, so must append the stepback. */\n    ecma_stringbuilder_append_raw (&context_p->result_builder,\n                                   ecma_stringbuilder_get_data (&context_p->indent_builder),\n                                   stepback_size);\n  }\n\n  ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_RIGHT_SQUARE);\n\n  /* 12. */\n  context_p->occurence_stack_last_p = stack_item.next_p;\n\n  /* 13. */\n  ecma_stringbuilder_revert (&context_p->indent_builder, stepback_size);\n\n  return ECMA_VALUE_EMPTY;\n} /* ecma_builtin_json_serialize_array */\n\n/**\n * Abstract operation 'SerializeJSONProperty' defined in 24.3.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_json_serialize_property (ecma_json_stringify_context_t *context_p, /**< context*/\n                                      ecma_object_t *holder_p, /**< the object*/\n                                      ecma_string_t *key_p) /**< property key*/\n{\n  /* 1. */\n  ecma_value_t value = ecma_op_object_get (holder_p, key_p);\n\n  /* 2. */\n  if (ECMA_IS_VALUE_ERROR (value))\n  {\n    return value;\n  }\n\n  /* 3. */\n  if (ecma_is_value_object (value) || ecma_is_value_bigint (value))\n  {\n    ecma_value_t to_object_value = ecma_op_to_object (value);\n\n    if (ECMA_IS_VALUE_ERROR (to_object_value))\n    {\n      ecma_free_value (value);\n      return to_object_value;\n    }\n\n    ecma_object_t *value_obj_p = ecma_get_object_from_value (to_object_value);\n    ecma_value_t to_json = ecma_op_object_get_with_receiver (value_obj_p,\n                                                             ecma_get_magic_string (LIT_MAGIC_STRING_TO_JSON_UL),\n                                                             value);\n\n    ecma_deref_object (value_obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (to_json))\n    {\n      ecma_free_value (value);\n      return to_json;\n    }\n\n    /* 3.c */\n    if (ecma_op_is_callable (to_json))\n    {\n      ecma_value_t key_value = ecma_make_string_value (key_p);\n      ecma_value_t call_args[] = { key_value };\n      ecma_object_t *to_json_obj_p = ecma_get_object_from_value (to_json);\n\n      ecma_value_t result = ecma_op_function_call (to_json_obj_p, value, call_args, 1);\n      ecma_free_value (value);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        ecma_deref_object (to_json_obj_p);\n        return result;\n      }\n      value = result;\n    }\n    ecma_free_value (to_json);\n  }\n\n  /* 4. */\n  if (context_p->replacer_function_p)\n  {\n    ecma_value_t holder_value = ecma_make_object_value (holder_p);\n    ecma_value_t key_value = ecma_make_string_value (key_p);\n    ecma_value_t call_args[] = { key_value, value };\n\n    ecma_value_t result = ecma_op_function_call (context_p->replacer_function_p, holder_value, call_args, 2);\n    ecma_free_value (value);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      return result;\n    }\n\n    value = result;\n  }\n\n  /* 5. */\n  if (ecma_is_value_object (value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (value);\n    lit_magic_string_id_t class_name = ecma_object_get_class_name (obj_p);\n\n    /* 5.a */\n    if (class_name == LIT_MAGIC_STRING_NUMBER_UL)\n    {\n      ecma_number_t num;\n      value = ecma_op_to_number (value, &num);\n      ecma_deref_object (obj_p);\n\n      if (ECMA_IS_VALUE_ERROR (value))\n      {\n        return value;\n      }\n\n      value = ecma_make_number_value (num);\n    }\n    /* 5.b */\n    else if (class_name == LIT_MAGIC_STRING_STRING_UL)\n    {\n      ecma_string_t *str_p = ecma_op_to_string (value);\n      ecma_deref_object (obj_p);\n\n      if (JERRY_UNLIKELY (str_p == NULL))\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      value = ecma_make_string_value (str_p);\n    }\n    /* 5.c */\n    else if (class_name == LIT_MAGIC_STRING_BOOLEAN_UL)\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n      value = ext_object_p->u.class_prop.u.value;\n      ecma_deref_object (obj_p);\n    }\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    /* 5.d */\n    else if (class_name == LIT_MAGIC_STRING_BIGINT_UL)\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n      value = ecma_copy_value (ext_object_p->u.class_prop.u.value);\n      ecma_deref_object (obj_p);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  }\n\n  /* 6. - 8. */\n  if (ecma_is_value_null (value))\n  {\n    ecma_stringbuilder_append_magic (&context_p->result_builder, LIT_MAGIC_STRING_NULL);\n    return ECMA_VALUE_EMPTY;\n  }\n\n  if (ecma_is_value_true (value))\n  {\n    ecma_stringbuilder_append_magic (&context_p->result_builder, LIT_MAGIC_STRING_TRUE);\n    return ECMA_VALUE_EMPTY;\n  }\n\n  if (ecma_is_value_false (value))\n  {\n    ecma_stringbuilder_append_magic (&context_p->result_builder, LIT_MAGIC_STRING_FALSE);\n    return ECMA_VALUE_EMPTY;\n  }\n\n  /* 9. */\n  if (ecma_is_value_string (value))\n  {\n    ecma_string_t *value_str_p = ecma_get_string_from_value (value);\n    /* Quote will append the result. */\n    ecma_builtin_json_quote (&context_p->result_builder, value_str_p);\n    ecma_deref_ecma_string (value_str_p);\n\n    return ECMA_VALUE_EMPTY;\n  }\n\n  /* 10. */\n  if (ecma_is_value_number (value))\n  {\n    ecma_number_t num_value = ecma_get_number_from_value (value);\n\n    /* 10.a */\n    if (!ecma_number_is_nan (num_value) && !ecma_number_is_infinity (num_value))\n    {\n      ecma_string_t *result_string_p = ecma_op_to_string (value);\n      JERRY_ASSERT (result_string_p != NULL);\n\n      ecma_stringbuilder_append (&context_p->result_builder, result_string_p);\n      ecma_deref_ecma_string (result_string_p);\n    }\n    else\n    {\n      /* 10.b */\n      ecma_stringbuilder_append_magic (&context_p->result_builder, LIT_MAGIC_STRING_NULL);\n    }\n\n    ecma_free_value (value);\n    return ECMA_VALUE_EMPTY;\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (ecma_is_value_bigint (value))\n  {\n    ecma_free_value (value);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"BigInt cannot be serialized\"));\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  /* 11. */\n  if (ecma_is_value_object (value) && !ecma_op_is_callable (value))\n  {\n    ecma_value_t is_array = ecma_is_value_array (value);\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    if (ECMA_IS_VALUE_ERROR (is_array))\n    {\n      ecma_free_value (value);\n      return is_array;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n    ecma_object_t *obj_p = ecma_get_object_from_value (value);\n\n    ecma_value_t ret_value;\n    /* 10.a */\n    if (ecma_is_value_true (is_array))\n    {\n      ret_value = ecma_builtin_json_serialize_array (context_p, obj_p);\n    }\n    /* 10.b */\n    else\n    {\n      ret_value = ecma_builtin_json_serialize_object (context_p, obj_p);\n    }\n\n    ecma_deref_object (obj_p);\n    return ret_value;\n  }\n\n  /* 12. */\n  ecma_free_value (value);\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_builtin_json_serialize_property */\n\n/**\n * Helper function to stringify an object in JSON format representing an ecma_value.\n *\n *  @return ecma_value_t string created from an abject formating by a given context\n *          Returned value must be freed with ecma_free_value.\n *\n */\nstatic ecma_value_t ecma_builtin_json_str_helper (ecma_json_stringify_context_t *context_p, /**< context argument */\n                                                  const ecma_value_t arg1) /**< object argument */\n{\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n  ecma_object_t *obj_wrapper_p = ecma_op_create_object_object_noarg ();\n  ecma_string_t *empty_str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  ecma_value_t put_comp_val = ecma_builtin_helper_def_prop (obj_wrapper_p,\n                                                            empty_str_p,\n                                                            arg1,\n                                                            ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n\n  JERRY_ASSERT (ecma_is_value_true (put_comp_val));\n\n  context_p->result_builder = ecma_stringbuilder_create ();\n\n  if (!ecma_compare_ecma_string_to_magic_id (context_p->gap_str_p, LIT_MAGIC_STRING__EMPTY))\n  {\n    ecma_stringbuilder_append_byte (&context_p->indent_builder, LIT_CHAR_LF);\n  }\n\n  ret_value = ecma_builtin_json_serialize_property (context_p, obj_wrapper_p, empty_str_p);\n  ecma_deref_object (obj_wrapper_p);\n\n  if (ECMA_IS_VALUE_ERROR (ret_value) || ecma_is_value_undefined (ret_value))\n  {\n    ecma_stringbuilder_destroy (&context_p->result_builder);\n    return ret_value;\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&context_p->result_builder));\n} /* ecma_builtin_json_str_helper */\n\n/**\n * Function to create a JSON string from a JS value.\n *\n * Note:\n *      The returned value must be freed with ecma_free_value.\n *\n * @return - ecma_value_t containing a json string.\n *         - Error value in case of any errors.\n */\necma_value_t\necma_builtin_json_stringify_no_opts (const ecma_value_t value) /**< value to stringify */\n{\n  ecma_json_stringify_context_t context;\n  context.occurence_stack_last_p = NULL;\n  context.indent_builder = ecma_stringbuilder_create ();\n  context.property_list_p = NULL;\n  context.replacer_function_p = NULL;\n  context.gap_str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n\n  ecma_value_t ret_value = ecma_builtin_json_str_helper (&context, value);\n\n  ecma_deref_ecma_string (context.gap_str_p);\n  ecma_stringbuilder_destroy (&context.indent_builder);\n  return ret_value;\n} /* ecma_builtin_json_stringify_no_opts */\n\n/**\n * The JSON object's 'stringify' routine\n *\n * See also:\n *          ECMA-262 v5, 15.12.3\n *          ECMA-262 v11, 24.5.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_json_stringify (ecma_value_t this_arg, /**< 'this' argument */\n                             ecma_value_t arg1,  /**< value */\n                             ecma_value_t arg2,  /**< replacer */\n                             ecma_value_t arg3)  /**< space */\n{\n  JERRY_UNUSED (this_arg);\n\n  ecma_json_stringify_context_t context;\n  context.replacer_function_p = NULL;\n  context.property_list_p = NULL;\n\n  /* 4. */\n  if (ecma_is_value_object (arg2))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (arg2);\n\n    /* 4.a */\n    if (ecma_op_is_callable (arg2))\n    {\n      context.replacer_function_p = obj_p;\n    }\n    /* 4.b */\n    else\n    {\n      ecma_value_t is_array = ecma_is_value_array (arg2);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (ECMA_IS_VALUE_ERROR (is_array))\n      {\n        return is_array;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (ecma_is_value_true (is_array))\n      {\n        ecma_length_t array_length;\n        ecma_value_t to_len = ecma_op_object_get_length (obj_p, &array_length);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n        if (ECMA_IS_VALUE_ERROR (to_len))\n        {\n          return to_len;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n        JERRY_ASSERT (ecma_is_value_empty (to_len));\n\n        context.property_list_p = ecma_new_collection ();\n\n        uint32_t index = 0;\n\n        /* 4.b.iii.5 */\n        while (index < array_length)\n        {\n          ecma_value_t value = ecma_op_object_get_by_index (obj_p, index);\n\n          if (ECMA_IS_VALUE_ERROR (value))\n          {\n            ecma_collection_free (context.property_list_p);\n            return value;\n          }\n\n          /* 4.b.iii.5.c */\n          ecma_value_t item = ECMA_VALUE_UNDEFINED;\n\n          /* 4.b.iii.5.d */\n          if (ecma_is_value_string (value))\n          {\n            ecma_ref_ecma_string (ecma_get_string_from_value (value));\n            item = value;\n          }\n          /* 4.b.iii.5.e */\n          else if (ecma_is_value_number (value))\n          {\n            ecma_string_t *number_str_p = ecma_op_to_string (value);\n            JERRY_ASSERT (number_str_p != NULL);\n            item = ecma_make_string_value (number_str_p);\n          }\n          /* 4.b.iii.5.f */\n          else if (ecma_is_value_object (value))\n          {\n            ecma_object_t *value_obj_p = ecma_get_object_from_value (value);\n            lit_magic_string_id_t class_id = ecma_object_get_class_name (value_obj_p);\n\n            if (class_id == LIT_MAGIC_STRING_NUMBER_UL || class_id == LIT_MAGIC_STRING_STRING_UL)\n            {\n              ecma_string_t *str_p = ecma_op_to_string (value);\n\n              if (JERRY_UNLIKELY (str_p == NULL))\n              {\n                ecma_collection_free (context.property_list_p);\n                ecma_free_value (value);\n                return ECMA_VALUE_ERROR;\n              }\n\n              item = ecma_make_string_value (str_p);\n            }\n          }\n\n          ecma_free_value (value);\n\n          /* 4.b.iii.5.g */\n          if (!ecma_is_value_undefined (item))\n          {\n            JERRY_ASSERT (ecma_is_value_string (item));\n            ecma_string_t *string_p = ecma_get_string_from_value (item);\n\n            if (!ecma_collection_has_string_value (context.property_list_p, string_p))\n            {\n              ecma_collection_push_back (context.property_list_p, item);\n            }\n            else\n            {\n              ecma_deref_ecma_string (string_p);\n            }\n          }\n\n          index++;\n        }\n      }\n    }\n  }\n\n  ecma_value_t space;\n\n  /* 5. */\n  if (ecma_is_value_object (arg3))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (arg3);\n    lit_magic_string_id_t class_name = ecma_object_get_class_name (obj_p);\n\n    /* 5.a */\n    if (class_name == LIT_MAGIC_STRING_NUMBER_UL)\n    {\n      ecma_number_t num;\n      ecma_value_t value = ecma_op_to_number (arg3, &num);\n\n      if (ECMA_IS_VALUE_ERROR (value))\n      {\n        if (context.property_list_p != NULL)\n        {\n          ecma_collection_free (context.property_list_p);\n        }\n        return value;\n      }\n      space = ecma_make_number_value (num);\n    }\n    /* 5.b */\n    else if (class_name == LIT_MAGIC_STRING_STRING_UL)\n    {\n      ecma_string_t *value_str_p = ecma_op_to_string (arg3);\n\n      if (JERRY_UNLIKELY (value_str_p == NULL))\n      {\n        if (context.property_list_p != NULL)\n        {\n          ecma_collection_free (context.property_list_p);\n        }\n        return ECMA_VALUE_ERROR;\n      }\n\n      space = ecma_make_string_value (value_str_p);\n    }\n    else\n    {\n      space = ecma_copy_value (arg3);\n    }\n  }\n  else\n  {\n    space = ecma_copy_value (arg3);\n  }\n\n  /* 6. */\n  if (ecma_is_value_number (space))\n  {\n    /* 6.a */\n    ecma_number_t num_of_spaces;\n    ecma_op_to_integer (space, &num_of_spaces);\n\n    num_of_spaces = JERRY_MIN (10, num_of_spaces);\n\n    /* 6.b */\n    if (num_of_spaces < 1)\n    {\n      context.gap_str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n    }\n    else\n    {\n      JMEM_DEFINE_LOCAL_ARRAY (space_buff, num_of_spaces, char);\n\n      memset (space_buff, LIT_CHAR_SP, (size_t) num_of_spaces);\n      context.gap_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) space_buff,\n                                                          (lit_utf8_size_t) num_of_spaces);\n\n      JMEM_FINALIZE_LOCAL_ARRAY (space_buff);\n    }\n  }\n  /* 7. */\n  else if (ecma_is_value_string (space))\n  {\n    ecma_string_t *space_str_p = ecma_get_string_from_value (space);\n    lit_utf8_size_t num_of_chars = ecma_string_get_length (space_str_p);\n\n    if (num_of_chars < 10)\n    {\n      ecma_ref_ecma_string (space_str_p);\n      context.gap_str_p = space_str_p;\n    }\n    else\n    {\n      context.gap_str_p = ecma_string_substr (space_str_p, 0, 10);\n    }\n  }\n  /* 8. */\n  else\n  {\n    context.gap_str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ecma_free_value (space);\n\n  /* 1., 2., 3. */\n  context.occurence_stack_last_p = NULL;\n  context.indent_builder = ecma_stringbuilder_create ();\n\n  /* 9. */\n  ecma_value_t ret_value = ecma_builtin_json_str_helper (&context, arg1);\n\n  ecma_deref_ecma_string (context.gap_str_p);\n  ecma_stringbuilder_destroy (&context.indent_builder);\n\n  if (context.property_list_p != NULL)\n  {\n    ecma_collection_free (context.property_list_p);\n  }\n\n  return ret_value;\n} /* ecma_builtin_json_stringify */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * JSON built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_JSON)\n\n#if ENABLED (JERRY_ESNEXT)\n/* ECMA-262 v6, 24.3.3 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_JSON_U,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_PARSE, ecma_builtin_json_parse, 2, 2)\nROUTINE (LIT_MAGIC_STRING_STRINGIFY, ecma_builtin_json_stringify, 3, 3)\n\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-iterator-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-map-iterator-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID map_iterator_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup %mapiteratorprototype% ECMA %MapIteratorPrototype% object built-in\n * @{\n */\n\n/**\n * The %MapIteratorPrototype% object's 'next' routine\n *\n * See also:\n *          ECMA-262 v6, 23.1.5.2.1\n *\n * Note:\n *     Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object, if success\n *         error - otherwise\n */\nstatic ecma_value_t\necma_builtin_map_iterator_prototype_object_next (ecma_value_t this_val) /**< this argument */\n{\n  return ecma_op_container_iterator_next (this_val, ECMA_PSEUDO_MAP_ITERATOR);\n} /* ecma_builtin_map_iterator_prototype_object_next */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-iterator-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %MapIteratorPrototype% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_MAP_ITERATOR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_map_iterator_prototype_object_next, 0, 0)\n\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-map-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID map_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup map ECMA Map object built-in\n * @{\n */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_map_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                             ecma_value_t this_arg, /**< 'this' argument value */\n                                             const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                     *   passed to routine */\n                                             uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (arguments_number);\n  return ecma_builtin_container_dispatch_routine (builtin_routine_id,\n                                                  this_arg,\n                                                  arguments_list_p,\n                                                  LIT_MAGIC_STRING_MAP_UL);\n} /* ecma_builtin_map_prototype_dispatch_routine */\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Map.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 23.1.3.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_MAP,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v6, 23.1.3.13 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_MAP_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_CLEAR, ECMA_CONTAINER_ROUTINE_CLEAR, 0, 0)\nROUTINE (LIT_MAGIC_STRING_DELETE, ECMA_CONTAINER_ROUTINE_DELETE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_FOR_EACH_UL, ECMA_CONTAINER_ROUTINE_FOREACH, 2, 1)\nROUTINE (LIT_MAGIC_STRING_GET, ECMA_CONTAINER_ROUTINE_GET, 1, 1)\nROUTINE (LIT_MAGIC_STRING_HAS, ECMA_CONTAINER_ROUTINE_HAS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SET, ECMA_CONTAINER_ROUTINE_SET, 2, 2)\nROUTINE (LIT_MAGIC_STRING_VALUES, ECMA_CONTAINER_ROUTINE_VALUES, 0, 0)\nROUTINE (LIT_MAGIC_STRING_KEYS, ECMA_CONTAINER_ROUTINE_KEYS, 0, 0)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_ENTRIES, LIT_INTERNAL_MAGIC_STRING_MAP_PROTOTYPE_ENTRIES,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_GLOBAL_SYMBOL_ITERATOR, LIT_INTERNAL_MAGIC_STRING_MAP_PROTOTYPE_ENTRIES,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v6, 23.1.3.10 */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_SIZE,\n                    ECMA_CONTAINER_ROUTINE_SIZE_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-map.inc.h\"\n#define BUILTIN_UNDERSCORED_ID map\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup map ECMA Map object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in Map object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_map_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructor Map requires 'new'.\"));\n} /* ecma_builtin_map_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Map object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_map_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                     uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_op_container_create (arguments_list_p,\n                                   arguments_list_len,\n                                   LIT_MAGIC_STRING_MAP_UL,\n                                   ECMA_BUILTIN_ID_MAP_PROTOTYPE);\n} /* ecma_builtin_map_dispatch_construct */\n\n/**\n * 23.1.2.2 get Map [ @@species ] accessor\n *\n * @return ecma_value\n *         returned value must be freed with ecma_free_value\n */\necma_value_t\necma_builtin_map_species_get (ecma_value_t this_value) /**< This Value */\n{\n  return ecma_copy_value (this_value);\n} /* ecma_builtin_map_species_get */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Map built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\n/* ECMA-262 v6, 23.1.2 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 23.1 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_MAP_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 23.1.2.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_MAP_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v6, 23.1.2.2 */\nACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,\n                    ecma_builtin_map_species_get,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-math.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-number-arithmetic.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"jrt.h\"\n#include \"jrt-libc-includes.h\"\n\n#if defined (_WIN32)\n#include <intrin.h>\n#endif\n\n#if ENABLED (JERRY_BUILTIN_MATH)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_MATH_OBJECT_ROUTINE_START = 0,\n\n  ECMA_MATH_OBJECT_ABS, /* ECMA-262 v5, 15.8.2.1 */\n  ECMA_MATH_OBJECT_ACOS, /* ECMA-262 v5, 15.8.2.2 */\n  ECMA_MATH_OBJECT_ASIN, /* ECMA-262 v5, 15.8.2.3 */\n  ECMA_MATH_OBJECT_ATAN, /* ECMA-262 v5, 15.8.2.4 */\n  ECMA_MATH_OBJECT_CEIL, /* ECMA-262 v5, 15.8.2.6 */\n  ECMA_MATH_OBJECT_COS, /* ECMA-262 v5, 15.8.2.7 */\n  ECMA_MATH_OBJECT_EXP, /* ECMA-262 v5, 15.8.2.8 */\n  ECMA_MATH_OBJECT_FLOOR, /* ECMA-262 v5, 15.8.2.9 */\n  ECMA_MATH_OBJECT_LOG, /* ECMA-262 v5, 15.8.2.10 */\n  ECMA_MATH_OBJECT_ROUND, /* ECMA-262 v5, 15.8.2.15 */\n  ECMA_MATH_OBJECT_SIN, /* ECMA-262 v5, 15.8.2.16 */\n  ECMA_MATH_OBJECT_SQRT, /* ECMA-262 v5, 15.8.2.17 */\n  ECMA_MATH_OBJECT_TAN, /* ECMA-262 v5, 15.8.2.18 */\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_MATH_OBJECT_ACOSH, /* ECMA-262 v6, 20.2.2.3  */\n  ECMA_MATH_OBJECT_ASINH, /* ECMA-262 v6, 20.2.2.5  */\n  ECMA_MATH_OBJECT_ATANH, /* ECMA-262 v6, 20.2.2.7  */\n  ECMA_MATH_OBJECT_CBRT, /* ECMA-262 v6, 20.2.2.9  */\n  ECMA_MATH_OBJECT_CLZ32, /* ECMA-262 v6, 20.2.2.11  */\n  ECMA_MATH_OBJECT_COSH, /* ECMA-262 v6, 20.2.2.13  */\n  ECMA_MATH_OBJECT_EXPM1, /* ECMA-262 v6, 20.2.2.15  */\n  ECMA_MATH_OBJECT_FROUND, /* ECMA-262 v6, 20.2.2.17  */\n  ECMA_MATH_OBJECT_LOG1P, /* ECMA-262 v6, 20.2.2.21  */\n  ECMA_MATH_OBJECT_LOG10, /* ECMA-262 v6, 20.2.2.22  */\n  ECMA_MATH_OBJECT_LOG2, /* ECMA-262 v6, 20.2.2.23  */\n  ECMA_MATH_OBJECT_SIGN, /* ECMA-262 v6, 20.2.2.29 */\n  ECMA_MATH_OBJECT_SINH, /* ECMA-262 v6, 20.2.2.31  */\n  ECMA_MATH_OBJECT_TANH, /* ECMA-262 v6, 20.2.2.34  */\n  ECMA_MATH_OBJECT_TRUNC, /* ECMA-262 v6, 20.2.2.35  */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ECMA_MATH_OBJECT_ATAN2, /* ECMA-262 v5, 15.8.2.5 */ /* first routine with 2 arguments */\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_MATH_OBJECT_IMUL, /* ECMA-262 v6, 20.2.2.19  */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ECMA_MATH_OBJECT_POW, /* ECMA-262 v5, 15.8.2.13 */ /* last routine with 1 or 2 arguments*/\n  ECMA_MATH_OBJECT_MAX, /* ECMA-262 v5, 15.8.2.11 */\n  ECMA_MATH_OBJECT_MIN, /* ECMA-262 v5, 15.8.2.12 */\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_MATH_OBJECT_HYPOT, /* ECMA-262 v6, 20.2.2.18  */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ECMA_MATH_OBJECT_RANDOM, /* ECMA-262 v5, 15.8.2.14 */\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-math.inc.h\"\n#define BUILTIN_UNDERSCORED_ID math\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup object ECMA Object object built-in\n * @{\n */\n\n/**\n * The Math object's 'max' 'min' routines.\n *\n * See also:\n *          ECMA-262 v5, 15.8.2.11\n *          ECMA-262 v5, 15.8.2.12\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_math_object_max_min (bool is_max, /**< 'max' or 'min' operation */\n                                  const ecma_value_t *arg, /**< arguments list */\n                                  uint32_t args_number) /**< number of arguments */\n{\n  ecma_number_t result_num = ecma_number_make_infinity (is_max);\n  bool nan_found = false;\n\n  while (args_number > 0)\n  {\n    ecma_number_t arg_num;\n\n    if (ecma_is_value_number (*arg))\n    {\n      arg_num = ecma_get_number_from_value (*arg);\n    }\n    else\n    {\n      ecma_value_t value = ecma_op_to_number (*arg, &arg_num);\n\n      if (ECMA_IS_VALUE_ERROR (value))\n      {\n        return value;\n      }\n    }\n\n    arg++;\n    args_number--;\n\n    if (JERRY_UNLIKELY (nan_found || ecma_number_is_nan (arg_num)))\n    {\n      nan_found = true;\n      continue;\n    }\n\n    if (ecma_number_is_zero (arg_num)\n        && ecma_number_is_zero (result_num))\n    {\n      bool is_negative = ecma_number_is_negative (arg_num);\n\n      if (is_max ? !is_negative : is_negative)\n      {\n        result_num = arg_num;\n      }\n    }\n    else\n    {\n      if (is_max ? (arg_num > result_num) : (arg_num < result_num))\n      {\n        result_num = arg_num;\n      }\n    }\n  }\n\n  if (JERRY_UNLIKELY (nan_found))\n  {\n    result_num = ecma_number_make_nan ();\n  }\n\n  return ecma_make_number_value (result_num);\n} /* ecma_builtin_math_object_max_min */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * The Math object's 'hypot' routine\n *\n * See also:\n *          ECMA-262 v6, 20.2.2.18\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_math_object_hypot (const ecma_value_t *arg, /**< arguments list */\n                                uint32_t args_number) /**< number of arguments */\n{\n  if (args_number == 0)\n  {\n    return ecma_make_number_value (0.0);\n  }\n\n  bool nan_found = false;\n  bool inf_found = false;\n  ecma_number_t result_num = 0;\n\n  while (args_number > 0)\n  {\n    ecma_number_t arg_num;\n    if (ecma_is_value_number (*arg))\n    {\n      arg_num = ecma_get_number_from_value (*arg);\n    }\n    else\n    {\n      ecma_value_t value = ecma_op_to_number (*arg, &arg_num);\n      if (ECMA_IS_VALUE_ERROR (value))\n      {\n        return value;\n      }\n    }\n\n    arg++;\n    args_number--;\n\n    if (JERRY_UNLIKELY (inf_found || ecma_number_is_infinity (arg_num)))\n    {\n      inf_found = true;\n      continue;\n    }\n\n    if (JERRY_UNLIKELY (nan_found || ecma_number_is_nan (arg_num)))\n    {\n      nan_found = true;\n      continue;\n    }\n\n    result_num += arg_num * arg_num;\n  }\n\n  if (JERRY_UNLIKELY (inf_found))\n  {\n    return ecma_make_number_value (ecma_number_make_infinity (false));\n  }\n\n  if (JERRY_UNLIKELY (nan_found))\n  {\n    return ecma_make_nan_value ();\n  }\n\n  return ecma_make_number_value (sqrt (result_num));\n} /* ecma_builtin_math_object_hypot */\n\n/**\n * The Math object's 'trunc' routine\n *\n * See also:\n *          ECMA-262 v6, 20.2.2.35\n *\n * @return ecma number\n */\nstatic ecma_number_t\necma_builtin_math_object_trunc (ecma_number_t arg)\n{\n  if (ecma_number_is_nan (arg) || ecma_number_is_infinity (arg) || ecma_number_is_zero (arg))\n  {\n    return arg;\n  }\n\n  if ((arg > 0) && (arg < 1))\n  {\n    return (ecma_number_t) 0.0;\n  }\n\n  if ((arg < 0) && (arg > -1))\n  {\n    return (ecma_number_t) -0.0;\n  }\n\n  return (ecma_number_t) arg - fmod (arg, 1);\n} /* ecma_builtin_math_object_trunc */\n\n/**\n * The Math object's 'sign' routine\n *\n * See also:\n *          ECMA-262 v6, 20.2.2.29\n *\n * @return ecma number\n */\nstatic ecma_number_t\necma_builtin_math_object_sign (ecma_number_t arg)\n{\n  if (ecma_number_is_nan (arg) || ecma_number_is_zero (arg))\n  {\n    return arg;\n  }\n\n  if (ecma_number_is_negative (arg))\n  {\n    return (ecma_number_t) -1.0;\n  }\n\n  return (ecma_number_t) 1.0;\n} /* ecma_builtin_math_object_sign */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * The Math object's 'random' routine.\n *\n * See also:\n *          ECMA-262 v5, 15.8.2.14\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_math_object_random (void)\n{\n  const ecma_number_t rand_max = (ecma_number_t) RAND_MAX;\n  const ecma_number_t rand_max_min_1 = (ecma_number_t) (RAND_MAX - 1);\n\n  return ecma_make_number_value (((ecma_number_t) rand ()) / rand_max * rand_max_min_1 / rand_max);\n} /* ecma_builtin_math_object_random */\n\n/**\n * Dispatcher for the built-in's routines.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_math_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                    ecma_value_t this_arg, /**< 'this' argument value */\n                                    const ecma_value_t arguments_list[], /**< list of arguments\n                                                                          *   passed to routine */\n                                    uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (this_arg);\n\n  if (builtin_routine_id <= ECMA_MATH_OBJECT_POW)\n  {\n    ecma_number_t x = ecma_number_make_nan ();\n    ecma_number_t y = ecma_number_make_nan ();\n\n    if (arguments_number >= 1)\n    {\n      if (ecma_is_value_number (arguments_list[0]))\n      {\n        x = ecma_get_number_from_value (arguments_list[0]);\n      }\n      else\n      {\n        ecma_value_t value = ecma_op_to_number (arguments_list[0], &x);\n\n        if (ECMA_IS_VALUE_ERROR (value))\n        {\n          return value;\n        }\n      }\n    }\n\n    if (builtin_routine_id >= ECMA_MATH_OBJECT_ATAN2\n        && arguments_number >= 2)\n    {\n      if (ecma_is_value_number (arguments_list[1]))\n      {\n        y = ecma_get_number_from_value (arguments_list[1]);\n      }\n      else\n      {\n        ecma_value_t value = ecma_op_to_number (arguments_list[1], &y);\n\n        if (ECMA_IS_VALUE_ERROR (value))\n        {\n          return value;\n        }\n      }\n    }\n\n    switch (builtin_routine_id)\n    {\n      case ECMA_MATH_OBJECT_ABS:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (fabs (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_ACOS:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (acos (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_ASIN:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (asin (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_ATAN:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (atan (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_CEIL:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (ceil (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_COS:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (cos (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_EXP:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (exp (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_FLOOR:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (floor (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_LOG:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (log (x));\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case ECMA_MATH_OBJECT_TRUNC:\n      {\n        x = ecma_builtin_math_object_trunc (x);\n        break;\n      }\n      case ECMA_MATH_OBJECT_SIGN:\n      {\n        x = ecma_builtin_math_object_sign (x);\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case ECMA_MATH_OBJECT_ROUND:\n      {\n        if (ecma_number_is_nan (x)\n            || ecma_number_is_zero (x)\n            || ecma_number_is_infinity (x)\n            || fmod (x, 1.0) == 0)\n        {\n          /* Do nothing. */\n        }\n        else if (ecma_number_is_negative (x)\n                 && x >= -ECMA_NUMBER_HALF)\n        {\n          x = -ECMA_NUMBER_ZERO;\n        }\n        else\n        {\n          const ecma_number_t up_half = x + ECMA_NUMBER_HALF;\n          const ecma_number_t down_half = x - ECMA_NUMBER_HALF;\n          const ecma_number_t up_rounded = up_half - ecma_op_number_remainder (up_half, ECMA_NUMBER_ONE);\n          const ecma_number_t down_rounded = down_half - ecma_op_number_remainder (down_half, ECMA_NUMBER_ONE);\n\n          if (up_rounded - x <= x - down_rounded)\n          {\n            x = up_rounded;\n          }\n          else\n          {\n            x = down_rounded;\n          }\n        }\n        break;\n      }\n      case ECMA_MATH_OBJECT_SIN:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (sin (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_SQRT:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (sqrt (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_TAN:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (tan (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_ATAN2:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (atan2 (x, y));\n        break;\n      }\n      case ECMA_MATH_OBJECT_POW:\n      {\n        x = ecma_number_pow (x, y);\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case ECMA_MATH_OBJECT_ACOSH:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (acosh (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_ASINH:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (asinh (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_ATANH:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (atanh (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_CBRT:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (cbrt (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_COSH:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (cosh (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_EXPM1:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (expm1 (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_LOG1P:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (log1p (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_LOG10:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (log10 (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_LOG2:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (log2 (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_SINH:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (sinh (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_TANH:\n      {\n        x = DOUBLE_TO_ECMA_NUMBER_T (tanh (x));\n        break;\n      }\n      case ECMA_MATH_OBJECT_CLZ32:\n      {\n        uint32_t n = ecma_number_to_uint32 (x);\n#if defined (__GNUC__) || defined (__clang__)\n        x = n ? __builtin_clz (n) : 32;\n#elif defined (_WIN32)\n        unsigned long ret;\n        x = _BitScanReverse (&ret, n) ? 31 - ret : 32;\n#else\n        x = 32;\n        for (int i = 31; i >= 0; i--)\n        {\n          if (n >> i)\n          {\n            x = 31 - i;\n            break;\n          }\n        }\n#endif\n        break;\n      }\n      case ECMA_MATH_OBJECT_FROUND:\n      {\n        x = (float) x;\n        break;\n      }\n      case ECMA_MATH_OBJECT_IMUL:\n      {\n        x = (int32_t) (ecma_number_to_uint32 (x) * ecma_number_to_uint32 (y));\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n    return ecma_make_number_value (x);\n  } /* if (builtin_routine_id <= ECMA_MATH_OBJECT_POW) */\n\n  if (builtin_routine_id <= ECMA_MATH_OBJECT_MIN)\n  {\n    return ecma_builtin_math_object_max_min (builtin_routine_id == ECMA_MATH_OBJECT_MAX,\n                                             arguments_list,\n                                             arguments_number);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (builtin_routine_id == ECMA_MATH_OBJECT_HYPOT)\n  {\n    return ecma_builtin_math_object_hypot (arguments_list, arguments_number);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (builtin_routine_id == ECMA_MATH_OBJECT_RANDOM);\n\n  return ecma_builtin_math_object_random ();\n} /* ecma_builtin_math_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_MATH) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-math.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Math built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_MATH)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\n/* ECMA-262 v5, 15.8.1.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_E_U,\n              ECMA_BUILTIN_NUMBER_E,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.8.1.2 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LN10_U,\n              ECMA_BUILTIN_NUMBER_LN10,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.8.1.3 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LN2_U,\n              ECMA_BUILTIN_NUMBER_LN2,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.8.1.4 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LOG2E_U,\n              ECMA_BUILTIN_NUMBER_LOG2E,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.8.1.5 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LOG10E_U,\n              ECMA_BUILTIN_NUMBER_LOG10E,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.8.1.6 */\nNUMBER_VALUE (LIT_MAGIC_STRING_PI_U,\n              ECMA_BUILTIN_NUMBER_PI,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.8.1.7 */\nNUMBER_VALUE (LIT_MAGIC_STRING_SQRT1_2_U,\n              ECMA_BUILTIN_NUMBER_SQRT_1_2,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.8.1.8 */\nNUMBER_VALUE (LIT_MAGIC_STRING_SQRT2_U,\n              ECMA_BUILTIN_NUMBER_SQRT2,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\n/* ECMA-262 v6, 20.2.1.9 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_MATH_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_ABS, ECMA_MATH_OBJECT_ABS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ACOS, ECMA_MATH_OBJECT_ACOS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ASIN, ECMA_MATH_OBJECT_ASIN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ATAN, ECMA_MATH_OBJECT_ATAN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ATAN2, ECMA_MATH_OBJECT_ATAN2, 2, 2)\nROUTINE (LIT_MAGIC_STRING_CEIL, ECMA_MATH_OBJECT_CEIL, 1, 1)\nROUTINE (LIT_MAGIC_STRING_COS, ECMA_MATH_OBJECT_COS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_EXP, ECMA_MATH_OBJECT_EXP, 1, 1)\nROUTINE (LIT_MAGIC_STRING_FLOOR, ECMA_MATH_OBJECT_FLOOR, 1, 1)\nROUTINE (LIT_MAGIC_STRING_LOG, ECMA_MATH_OBJECT_LOG, 1, 1)\nROUTINE (LIT_MAGIC_STRING_MAX, ECMA_MATH_OBJECT_MAX, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_MIN, ECMA_MATH_OBJECT_MIN, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_POW, ECMA_MATH_OBJECT_POW, 2, 2)\nROUTINE (LIT_MAGIC_STRING_RANDOM, ECMA_MATH_OBJECT_RANDOM, 0, 0)\nROUTINE (LIT_MAGIC_STRING_ROUND, ECMA_MATH_OBJECT_ROUND, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SIN, ECMA_MATH_OBJECT_SIN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SQRT, ECMA_MATH_OBJECT_SQRT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_TAN, ECMA_MATH_OBJECT_TAN, 1, 1)\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_ACOSH, ECMA_MATH_OBJECT_ACOSH, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ASINH, ECMA_MATH_OBJECT_ASINH, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ATANH, ECMA_MATH_OBJECT_ATANH, 1, 1)\nROUTINE (LIT_MAGIC_STRING_CBRT, ECMA_MATH_OBJECT_CBRT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_CLZ32, ECMA_MATH_OBJECT_CLZ32, 1, 1)\nROUTINE (LIT_MAGIC_STRING_COSH, ECMA_MATH_OBJECT_COSH, 1, 1)\nROUTINE (LIT_MAGIC_STRING_EXPM1, ECMA_MATH_OBJECT_EXPM1, 1, 1)\nROUTINE (LIT_MAGIC_STRING_FROUND, ECMA_MATH_OBJECT_FROUND, 1, 1)\nROUTINE (LIT_MAGIC_STRING_HYPOT, ECMA_MATH_OBJECT_HYPOT, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_IMUL, ECMA_MATH_OBJECT_IMUL, 2, 2)\nROUTINE (LIT_MAGIC_STRING_LOG1P, ECMA_MATH_OBJECT_LOG1P, 1, 1)\nROUTINE (LIT_MAGIC_STRING_LOG10, ECMA_MATH_OBJECT_LOG10, 1, 1)\nROUTINE (LIT_MAGIC_STRING_LOG2, ECMA_MATH_OBJECT_LOG2, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SIGN, ECMA_MATH_OBJECT_SIGN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SINH, ECMA_MATH_OBJECT_SINH, 1, 1)\nROUTINE (LIT_MAGIC_STRING_TANH, ECMA_MATH_OBJECT_TANH, 1, 1)\nROUTINE (LIT_MAGIC_STRING_TRUNC, ECMA_MATH_OBJECT_TRUNC, 1, 1)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_MATH) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n#include \"jrt-libc-includes.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_NUMBER_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_NUMBER_PROTOTYPE_VALUE_OF,\n  ECMA_NUMBER_PROTOTYPE_TO_STRING,\n  ECMA_NUMBER_PROTOTYPE_TO_LOCALE_STRING,\n  ECMA_NUMBER_PROTOTYPE_TO_FIXED,\n  ECMA_NUMBER_PROTOTYPE_TO_EXPONENTIAL,\n  ECMA_NUMBER_PROTOTYPE_TO_PRECISION,\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-number-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID number_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup numberprototype ECMA Number.prototype object built-in\n * @{\n */\n\n/**\n * Helper for rounding numbers\n *\n * @return rounded number\n */\nstatic inline lit_utf8_size_t JERRY_ATTR_ALWAYS_INLINE\necma_builtin_number_prototype_helper_round (lit_utf8_byte_t *digits_p, /**< [in,out] number as a string in decimal\n                                                                        *   form */\n                                            lit_utf8_size_t num_digits, /**< length of the string representation */\n                                            int32_t round_num, /**< number of digits to keep */\n                                            int32_t *exponent_p, /**< [in, out] decimal exponent */\n                                            bool zero) /**< true if digits_p represents zero */\n{\n  if (round_num == 0 && *exponent_p == 0)\n  {\n    if (digits_p[0] >= 5)\n    {\n      digits_p[0] = '1';\n    }\n    else\n    {\n      digits_p[0] = '0';\n    }\n\n    return 1;\n  }\n\n  if (round_num < 1)\n  {\n    return 0;\n  }\n\n  if ((lit_utf8_size_t) round_num >= num_digits || zero)\n  {\n    return num_digits;\n  }\n\n  if (digits_p[round_num] >= '5')\n  {\n    digits_p[round_num] = '0';\n\n    int i = 1;\n\n    /* Handle carry number. */\n    for (; i <= round_num; i++)\n    {\n      if (++digits_p[round_num - i] <= '9')\n      {\n        break;\n      }\n      digits_p[round_num - i] = '0';\n    }\n\n    /* Prepend highest digit */\n    if (i > round_num)\n    {\n      memmove (digits_p + 1, digits_p, num_digits);\n      digits_p[0] = '1';\n      *exponent_p += 1;\n    }\n  }\n\n  return (lit_utf8_size_t) round_num;\n} /* ecma_builtin_number_prototype_helper_round */\n\n/**\n * The Number.prototype object's 'toString' and 'toLocaleString' routines\n *\n * See also:\n *          ECMA-262 v5, 15.7.4.2\n *          ECMA-262 v5, 15.7.4.7\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_number_prototype_object_to_string (ecma_number_t this_arg_number, /**< this argument number */\n                                                const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                uint32_t arguments_list_len) /**< number of arguments */\n{\n  static const lit_utf8_byte_t digit_chars[36] =\n  {\n    '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n    'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',\n    'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n    'u', 'v', 'w', 'x', 'y', 'z'\n  };\n\n  uint32_t radix = 10;\n  if (arguments_list_len > 0 && !ecma_is_value_undefined (arguments_list_p[0]))\n  {\n    ecma_number_t arg_num;\n\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (arguments_list_p[0], &arg_num)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    radix = ecma_number_to_uint32 (arg_num);\n\n    if (radix < 2 || radix > 36)\n    {\n      return ecma_raise_range_error (ECMA_ERR_MSG (\"Radix must be between 2 and 36.\"));\n    }\n  }\n\n  if (ecma_number_is_nan (this_arg_number)\n      || ecma_number_is_infinity (this_arg_number)\n      || ecma_number_is_zero (this_arg_number)\n      || radix == 10)\n  {\n    ecma_string_t *ret_str_p = ecma_new_ecma_string_from_number (this_arg_number);\n    return ecma_make_string_value (ret_str_p);\n  }\n\n  int buff_size = 0;\n\n  bool is_number_negative = false;\n  if (ecma_number_is_negative (this_arg_number))\n  {\n    /* ecma_number_to_decimal can't handle negative numbers, so we get rid of the sign. */\n    this_arg_number = -this_arg_number;\n    is_number_negative = true;\n\n    /* Add space for the sign in the result. */\n    buff_size += 1;\n  }\n\n  /* Decompose the number. */\n  lit_utf8_byte_t digits[ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER];\n  int32_t exponent;\n  lit_utf8_size_t digit_count = ecma_number_to_decimal (this_arg_number, digits, &exponent);\n\n  /*\n   * The 'exponent' given by 'ecma_number_to_decimal' specifies where the decimal point is located\n   * compared to the first digit in 'digits'.\n   * For example: 120 -> '12', exp: 3 and 0.012 -> '12', exp: -1\n   * We convert it to be location of the decimal point compared to the last digit of 'digits':\n   * 120 -> 12 * 10^1 and 0.012 -> 12 * 10^-3\n   */\n  exponent = exponent - (int32_t) digit_count;\n\n  /* 'magnitude' will be the magnitude of the number in the specific radix. */\n  int magnitude;\n  int required_digits;\n  if (exponent >= 0)\n  {\n    /*\n     * If the exponent is non-negative that means we won't have a fractional part, and can calculate\n     * exactly how many digits we will have. This could be done via a mathematic formula, but in rare\n     * cases that can cause incorrect results due to precision issues, so we use a loop instead.\n     */\n    magnitude = 0;\n    ecma_number_t counter = this_arg_number;\n    while (counter >= radix)\n    {\n      counter /= radix;\n      magnitude++;\n    }\n\n    /*\n     * The magnitude will only tell us how many digits we have after the first one, so we add one extra.\n     * In this case we won't be needing a radix point, so we don't need to worry about space for it.\n     */\n    required_digits = magnitude + 1;\n  }\n  else\n  {\n    /*\n     * We can't know exactly how many digits we will need, since the number may be non-terminating in the\n     * new radix, so we will have to estimate it. We do this by first calculating how many zeros we will\n     * need in the specific radix before we hit a significant digit. This is calculated from the decimal\n     * exponent, which we negate so that we get a positive number in the end.\n     */\n    magnitude = (int) floor ((log (10) / log (radix)) * -exponent);\n\n    /*\n     * We also need to add space for significant digits. The worst case is radix == 2, since this will\n     * require the most digits. In this case, the upper limit to the number of significant digits we can have is\n     * ECMA_NUMBER_FRACTION_WIDTH + 1. This should be sufficient for any number.\n     */\n    required_digits = magnitude + ECMA_NUMBER_FRACTION_WIDTH + 1;\n\n    /*\n     * We add an exta slot for the radix point. It is also likely that we will need extra space for a\n     * leading zero before the radix point. It's better to add space for that here as well, even if we may not\n     * need it, since later we won't be able to do so.\n     */\n    buff_size += 2;\n  }\n\n  /*\n   * Here we normalize the number so that it is as close to 0 as possible, which will prevent us from losing\n   * precision in case of extreme numbers when we later split the number into integer and fractional parts.\n   * This has to be done in the specific radix, otherwise it messes up the result, so we use magnitude instead.\n   */\n  if (exponent > 0)\n  {\n    for (int i = 0; i < magnitude; i++)\n    {\n      this_arg_number /= radix;\n    }\n  }\n  else if (exponent < 0)\n  {\n    for (int i = 0; i < magnitude; i++)\n    {\n      this_arg_number *= radix;\n    }\n  }\n\n  /* Split the number into an integer and a fractional part, since we have to handle them separately. */\n  uint64_t whole = (uint64_t) this_arg_number;\n  ecma_number_t fraction = this_arg_number - (ecma_number_t) whole;\n\n  bool should_round = false;\n  if (!ecma_number_is_zero (fraction) && exponent >= 0)\n  {\n    /*\n     * If the exponent is non-negative, and we get a non-zero fractional part, that means\n     * the normalization might have introduced a small error, in which case we have to correct it by rounding.\n     * We'll add one extra significant digit which we will later use to round.\n     */\n    required_digits += 1;\n    should_round = true;\n  }\n\n  /* Get the total required buffer size and allocate the buffer. */\n  buff_size += required_digits;\n  ecma_value_t ret_value;\n  JMEM_DEFINE_LOCAL_ARRAY (buff, buff_size, lit_utf8_byte_t);\n  int buff_index = 0;\n\n  /* Calculate digits for whole part. */\n  while (whole > 0)\n  {\n    JERRY_ASSERT (buff_index < buff_size && buff_index < required_digits);\n    buff[buff_index++] = (lit_utf8_byte_t) (whole % radix);\n    whole /= radix;\n  }\n\n  /* The digits are backwards, we need to reverse them. */\n  for (int i = 0; i < buff_index / 2; i++)\n  {\n    lit_utf8_byte_t swap = buff[i];\n    buff[i] = buff[buff_index - i - 1];\n    buff[buff_index - i - 1] = swap;\n  }\n\n  /*\n   * Calculate where we have to put the radix point relative to the beginning of\n   * the new digits. If the exponent is non-negative this will be right after the number.\n   */\n  int point = exponent >= 0 ? magnitude + 1: buff_index - magnitude;\n\n  if (point < 0)\n  {\n    /*\n     * In this case the radix point will be before the first digit,\n     * so we need to leave space for leading zeros.\n     */\n    JERRY_ASSERT (exponent < 0);\n    required_digits += point;\n  }\n\n  JERRY_ASSERT (required_digits <= buff_size);\n\n  /* Calculate digits for fractional part. */\n  while (buff_index < required_digits)\n  {\n    fraction *= radix;\n    lit_utf8_byte_t digit = (lit_utf8_byte_t) floor (fraction);\n\n    buff[buff_index++] = digit;\n    fraction -= (ecma_number_t) floor (fraction);\n  }\n\n  if (should_round)\n  {\n    /* Consume last digit for rounding. */\n    buff_index--;\n    if (buff[buff_index] > radix / 2)\n    {\n      /* We should be rounding up. */\n      buff[buff_index - 1]++;\n\n      /* Propagate carry forward in the digits. */\n      for (int i = buff_index - 1; i > 0 && buff[i] >= radix; i--)\n      {\n        buff[i] = (lit_utf8_byte_t) (buff[i] - radix);\n        buff[i - 1]++;\n      }\n\n      if (buff[0] >= radix)\n      {\n        /*\n         * Carry propagated over the whole number, we need to add a new leading digit.\n         * We can use the place of the original rounded digit, we just need to shift everything\n         * right by one.\n         */\n        memmove (buff + 1, buff, (size_t) buff_index);\n        buff_index++;\n        buff[0] = 1;\n      }\n    }\n  }\n\n  /* Remove trailing zeros. */\n  while (buff_index - 1 > point && buff[buff_index - 1] == 0)\n  {\n    buff_index--;\n  }\n\n  /* Add leading zeros in case place of radix point is negative. */\n  if (point <= 0)\n  {\n    /* We will have 'point' amount of zeros after the radix point, and +1 before. */\n    int zero_count = -point + 1;\n    memmove (buff + zero_count, buff, (size_t) buff_index);\n    buff_index += zero_count;\n\n    for (int i = 0; i < zero_count; i++)\n    {\n      buff[i] = 0;\n    }\n\n    /* We now need to place the radix point after the first zero. */\n    point = 1;\n  }\n\n  /* Convert digits to characters. */\n  for (int i = 0; i < buff_index; i++)\n  {\n    buff[i] = digit_chars[buff[i]];\n  }\n\n  /* Place radix point to the required position. */\n  if (point < buff_index)\n  {\n    memmove (buff + point + 1, buff + point, (size_t) (buff_index - point));\n    buff[point] = '.';\n    buff_index++;\n  }\n\n  /* Add negative sign if necessary. */\n  if (is_number_negative)\n  {\n    memmove (buff + 1, buff, (size_t) buff_index);\n    buff[0] = '-';\n    buff_index++;\n  }\n\n  JERRY_ASSERT (buff_index <= buff_size);\n  ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (buff, (lit_utf8_size_t) buff_index);\n  ret_value = ecma_make_string_value (str_p);\n  JMEM_FINALIZE_LOCAL_ARRAY (buff);\n\n  return ret_value;\n} /* ecma_builtin_number_prototype_object_to_string */\n\n/**\n * The Number.prototype object's 'valueOf' routine\n *\n * See also:\n *          ECMA-262 v5, 15.7.4.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_number_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */\n{\n  if (ecma_is_value_number (this_arg))\n  {\n    return this_arg;\n  }\n  else if (ecma_is_value_object (this_arg))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (this_arg);\n\n    if (ecma_object_class_is (object_p, LIT_MAGIC_STRING_NUMBER_UL))\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      JERRY_ASSERT (ecma_is_value_number (ext_object_p->u.class_prop.u.value));\n\n      return ext_object_p->u.class_prop.u.value;\n    }\n  }\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not a Number or a Number object.\"));\n} /* ecma_builtin_number_prototype_object_value_of */\n\n/**\n * Type of number routine\n */\ntypedef enum\n{\n  NUMBER_ROUTINE_TO_FIXED,       /**< Number.prototype.toFixed: ECMA-262 v11, 20.1.3.3 */\n  NUMBER_ROUTINE_TO_EXPONENTIAL, /**< Number.prototype.toExponential: ECMA-262 v11, 20.1.3.2 */\n  NUMBER_ROUTINE_TO_PRECISION,   /**< Number.prototype.toPrecision: ECMA-262 v11, 20.1.3.5 */\n  NUMBER_ROUTINE__COUNT,         /**< count of the modes */\n} number_routine_mode_t;\n\n/**\n * Helper method to convert a number based on the given routine.\n */\nstatic ecma_value_t\necma_builtin_number_prototype_object_to_number_convert (ecma_number_t this_num, /**< this argument number */\n                                                        ecma_value_t arg, /**< routine's argument */\n                                                        number_routine_mode_t mode) /**< number routine mode */\n{\n  if (ecma_is_value_undefined (arg)\n      && mode == NUMBER_ROUTINE_TO_PRECISION)\n  {\n    return ecma_builtin_number_prototype_object_to_string (this_num, NULL, 0);\n  }\n\n  ecma_number_t arg_num;\n  ecma_value_t to_integer = ecma_op_to_integer (arg, &arg_num);\n\n  if (ECMA_IS_VALUE_ERROR (to_integer))\n  {\n    return to_integer;\n  }\n\n  /* Argument boundary check for toFixed method */\n  if (mode == NUMBER_ROUTINE_TO_FIXED\n      && (arg_num <= -1 || arg_num >= 101))\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Fraction digits must be between 0 and 100.\"));\n  }\n\n  /* Handle NaN separately */\n  if (ecma_number_is_nan (this_num))\n  {\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING_NAN);\n  }\n\n  /* Get the parameters of the number */\n  lit_utf8_byte_t digits[ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER];\n  lit_utf8_size_t num_of_digits;\n  int32_t exponent;\n  int32_t arg_int = ecma_number_to_int32 (arg_num);\n  bool is_zero = ecma_number_is_zero (this_num);\n  bool is_negative = ecma_number_is_negative (this_num);\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  if (is_negative)\n  {\n    if (!is_zero)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_MINUS);\n    }\n\n    this_num *= -1;\n  }\n\n  /* Handle zero separately */\n  if (is_zero)\n  {\n    if (mode == NUMBER_ROUTINE_TO_PRECISION)\n    {\n      arg_int--;\n    }\n\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_0);\n\n    if (arg_int > 0)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_DOT);\n    }\n\n    for (int32_t i = 0; i < arg_int; i++)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_0);\n    }\n\n    if (mode == NUMBER_ROUTINE_TO_EXPONENTIAL)\n    {\n      ecma_stringbuilder_append_raw (&builder, (const lit_utf8_byte_t *) \"e+0\", 3);\n    }\n\n    return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n  }\n\n  /* Handle infinity separately */\n  if (ecma_number_is_infinity (this_num))\n  {\n    ecma_stringbuilder_append_magic (&builder, LIT_MAGIC_STRING_INFINITY_UL);\n    return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n  }\n\n  /* Argument boundary check for toExponential and toPrecision methods */\n  if (mode == NUMBER_ROUTINE_TO_EXPONENTIAL\n      && (arg_num <= -1 || arg_num >= 101))\n  {\n    ecma_stringbuilder_destroy (&builder);\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Fraction digits must be between 0 and 100.\"));\n  }\n  else if (mode == NUMBER_ROUTINE_TO_PRECISION\n          && (arg_num < 1 || arg_num > 100))\n  {\n    ecma_stringbuilder_destroy (&builder);\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Precision digits must be between 1 and 100.\"));\n  }\n\n  num_of_digits = ecma_number_to_decimal (this_num, digits, &exponent);\n\n  /* Handle undefined argument */\n  if (ecma_is_value_undefined (arg) && mode == NUMBER_ROUTINE_TO_EXPONENTIAL)\n  {\n    arg_int = (int32_t) num_of_digits - 1;\n  }\n\n  if (mode == NUMBER_ROUTINE_TO_FIXED\n      && exponent > 21)\n  {\n    ecma_stringbuilder_destroy (&builder);\n\n    if (is_negative)\n    {\n      this_num *= -1;\n    }\n\n    return ecma_builtin_number_prototype_object_to_string (this_num, NULL, 0);\n  }\n\n  int32_t digits_to_keep = arg_int;\n\n  if (mode == NUMBER_ROUTINE_TO_FIXED)\n  {\n    digits_to_keep += exponent;\n  }\n  else if (mode == NUMBER_ROUTINE_TO_EXPONENTIAL)\n  {\n    digits_to_keep += 1;\n  }\n\n  num_of_digits = ecma_builtin_number_prototype_helper_round (digits,\n                                                              num_of_digits,\n                                                              digits_to_keep,\n                                                              &exponent,\n                                                              false);\n\n  /* toExponent routine and toPrecision cases where the exponent > precision or exponent < -5 */\n  if (mode == NUMBER_ROUTINE_TO_EXPONENTIAL\n      || (mode == NUMBER_ROUTINE_TO_PRECISION\n          && (exponent < -5 || exponent > arg_int)))\n  {\n    /* Append first digit */\n    ecma_stringbuilder_append_byte (&builder, *digits);\n\n    if (mode == NUMBER_ROUTINE_TO_PRECISION)\n    {\n      arg_int--;\n    }\n\n    if (arg_int > 0)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_DOT);\n    }\n\n    /* Append significant fraction digits */\n    ecma_stringbuilder_append_raw (&builder, digits + 1, num_of_digits - 1);\n\n    /* Append leading zeros */\n    for (int32_t i = (int32_t) (num_of_digits); i < arg_int + 1; i++)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_0);\n    }\n\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_LOWERCASE_E);\n\n    if (exponent <= 0)\n    {\n      exponent = (-exponent) + 1;\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_MINUS);\n    }\n    else\n    {\n      exponent -= 1;\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_PLUS);\n    }\n\n    /* Append exponent part */\n    lit_utf8_size_t exp_size = ecma_uint32_to_utf8_string ((uint32_t) exponent, digits, 3);\n    ecma_stringbuilder_append_raw (&builder, digits, exp_size);\n\n    return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n  }\n\n  /* toFixed routine and toPrecision cases where the exponent <= precision and exponent >= -5 */\n  lit_utf8_size_t result_digits;\n\n  if (mode == NUMBER_ROUTINE_TO_FIXED)\n  {\n    result_digits = ((exponent > 0) ? (lit_utf8_size_t) (exponent + arg_int)\n                                    : (lit_utf8_size_t) (arg_int + 1));\n  }\n  else\n  {\n    result_digits = ((exponent <= 0) ? (lit_utf8_size_t) (1 - exponent + arg_int)\n                                     : (lit_utf8_size_t) arg_int);\n  }\n\n  /* Number of digits we copied from digits array */\n  lit_utf8_size_t copied_digits = 0;\n\n  if (exponent == 0 && digits_to_keep == 0)\n  {\n    ecma_stringbuilder_append_char (&builder, *digits);\n    return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n  }\n\n  if (exponent <= 0)\n  {\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_0);\n    result_digits--;\n\n    if (result_digits > 0)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_DOT);\n\n      /* Append leading zeros to the fraction part */\n      for (int32_t i = 0; i < -exponent && result_digits > 0; i++)\n      {\n        ecma_stringbuilder_append_char (&builder, LIT_CHAR_0);\n        result_digits--;\n      }\n    }\n  }\n  else\n  {\n    /* Append significant digits of integer part */\n    copied_digits = JERRY_MIN (JERRY_MIN (num_of_digits, result_digits), (lit_utf8_size_t) exponent);\n    ecma_stringbuilder_append_raw (&builder, digits, copied_digits);\n\n    result_digits -= copied_digits;\n    num_of_digits -= copied_digits;\n    exponent -= (int32_t) copied_digits;\n\n    /* Append zeros before decimal point */\n    while (exponent > 0 && result_digits > 0)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_0);\n      result_digits--;\n      exponent--;\n    }\n\n    if (result_digits > 0)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_DOT);\n    }\n  }\n\n  if (result_digits > 0)\n  {\n    /* Append significant digits to the fraction part */\n    lit_utf8_size_t to_copy = JERRY_MIN (num_of_digits, result_digits);\n    ecma_stringbuilder_append_raw (&builder, digits + copied_digits, to_copy);\n    result_digits -= to_copy;\n\n    /* Append leading zeros */\n    while (result_digits > 0)\n    {\n      ecma_stringbuilder_append_char (&builder, LIT_CHAR_0);\n      result_digits--;\n    }\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_number_prototype_object_to_number_convert */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_number_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                                ecma_value_t this_arg, /**< 'this' argument value */\n                                                const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                        *   passed to routine */\n                                                uint32_t arguments_number) /**< length of arguments' list */\n{\n  ecma_value_t this_value = ecma_builtin_number_prototype_object_value_of (this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (this_value))\n  {\n    return this_value;\n  }\n\n  if (builtin_routine_id == ECMA_NUMBER_PROTOTYPE_VALUE_OF)\n  {\n    return ecma_copy_value (this_value);\n  }\n\n  ecma_number_t this_arg_number = ecma_get_number_from_value (this_value);\n\n  ecma_value_t routine_arg_1 = arguments_list_p[0];\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_NUMBER_PROTOTYPE_TO_STRING:\n    {\n      return ecma_builtin_number_prototype_object_to_string (this_arg_number, arguments_list_p, arguments_number);\n    }\n    case ECMA_NUMBER_PROTOTYPE_TO_LOCALE_STRING:\n    {\n      return ecma_builtin_number_prototype_object_to_string (this_arg_number, NULL, 0);\n    }\n    case ECMA_NUMBER_PROTOTYPE_TO_FIXED:\n    case ECMA_NUMBER_PROTOTYPE_TO_EXPONENTIAL:\n    case ECMA_NUMBER_PROTOTYPE_TO_PRECISION:\n    {\n      const int option = NUMBER_ROUTINE_TO_FIXED + (builtin_routine_id - ECMA_NUMBER_PROTOTYPE_TO_FIXED);\n      return ecma_builtin_number_prototype_object_to_number_convert (this_arg_number,\n                                                                     routine_arg_1,\n                                                                     (number_routine_mode_t) option);\n    }\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_builtin_number_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Number.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.7.4.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_NUMBER,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_NUMBER_PROTOTYPE_TO_STRING, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_NUMBER_PROTOTYPE_VALUE_OF, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_NUMBER_PROTOTYPE_TO_LOCALE_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_FIXED_UL, ECMA_NUMBER_PROTOTYPE_TO_FIXED, 1, 1)\nROUTINE (LIT_MAGIC_STRING_TO_EXPONENTIAL_UL, ECMA_NUMBER_PROTOTYPE_TO_EXPONENTIAL, 1, 1)\nROUTINE (LIT_MAGIC_STRING_TO_PRECISION_UL, ECMA_NUMBER_PROTOTYPE_TO_PRECISION, 1, 1)\n\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-number.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"ecma-alloc.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-number-object.h\"\n#include \"ecma-objects.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_NUMBER_OBJECT_ROUTINE_START = 0,\n  ECMA_NUMBER_OBJECT_ROUTINE_IS_FINITE,\n  ECMA_NUMBER_OBJECT_ROUTINE_IS_NAN,\n  ECMA_NUMBER_OBJECT_ROUTINE_IS_INTEGER,\n  ECMA_NUMBER_OBJECT_ROUTINE_IS_SAFE_INTEGER\n};\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-number.inc.h\"\n#define BUILTIN_UNDERSCORED_ID number\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup number ECMA Number object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in Number object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_number_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                   uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  if (arguments_list_len == 0)\n  {\n    ret_value = ecma_make_integer_value (0);\n  }\n  else\n  {\n    ecma_number_t num;\n    ret_value = ecma_op_to_numeric (arguments_list_p[0], &num, ECMA_TO_NUMERIC_ALLOW_BIGINT);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      return ret_value;\n    }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    if (ecma_is_value_bigint (ret_value))\n    {\n      ecma_value_t bigint = ret_value;\n      ret_value = ecma_bigint_to_number (bigint);\n      ecma_free_value (bigint);\n    }\n    else\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    {\n      ret_value = ecma_make_number_value (num);\n    }\n  }\n\n  return ret_value;\n} /* ecma_builtin_number_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Number object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_number_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  if (arguments_list_len == 0)\n  {\n    return ecma_op_create_number_object (ecma_make_integer_value (0));\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  ecma_number_t num;\n  ecma_value_t value = ecma_op_to_numeric (arguments_list_p[0], &num, ECMA_TO_NUMERIC_ALLOW_BIGINT);\n\n  if (ECMA_IS_VALUE_ERROR (value))\n  {\n    return value;\n  }\n\n  if (ecma_is_value_bigint (value))\n  {\n    ecma_value_t bigint = value;\n    value = ecma_bigint_to_number (bigint);\n    ecma_free_value (bigint);\n  }\n  else\n  {\n    value = ecma_make_number_value (num);\n  }\n\n  ecma_value_t result = ecma_op_create_number_object (value);\n  ecma_free_value (value);\n  return result;\n#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  return ecma_op_create_number_object (arguments_list_p[0]);\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* ecma_builtin_number_dispatch_construct */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * The Number object 'isInteger' and 'isSafeInteger' routine\n *\n * See also:\n *          ECMA-262 v6, 20.1.2.3\n *          ECMA-262 v6, 20.1.2.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_number_object_is_integer_helper (ecma_value_t arg, /**< routine's argument */\n                                              ecma_number_t num, /**< this number */\n                                              bool is_safe) /**< is the number safe */\n{\n  if (ecma_number_is_nan (num) || ecma_number_is_infinity (num))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_number_t int_num;\n\n  if (is_safe)\n  {\n    int_num = ecma_number_trunc (num);\n\n    if (fabs (int_num) > ECMA_NUMBER_MAX_SAFE_INTEGER)\n    {\n      return ECMA_VALUE_FALSE;\n    }\n  }\n  else\n  {\n    ecma_op_to_integer (arg, &int_num);\n  }\n\n  return (int_num == num) ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;\n} /* ecma_builtin_number_object_is_integer_helper */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_number_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                      ecma_value_t this_arg, /**< 'this' argument value */\n                                      const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                              *   passed to routine */\n                                      uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (this_arg);\n  JERRY_UNUSED (arguments_number);\n\n  if (!ecma_is_value_number (arguments_list_p[0]))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_number_t num = ecma_get_number_from_value (arguments_list_p[0]);\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_NUMBER_OBJECT_ROUTINE_IS_FINITE:\n    {\n      return ecma_make_boolean_value (!(ecma_number_is_nan (num) || ecma_number_is_infinity (num)));\n    }\n    case ECMA_NUMBER_OBJECT_ROUTINE_IS_NAN:\n    {\n      return ecma_make_boolean_value (ecma_number_is_nan (num));\n    }\n    case ECMA_NUMBER_OBJECT_ROUTINE_IS_INTEGER:\n    case ECMA_NUMBER_OBJECT_ROUTINE_IS_SAFE_INTEGER:\n    {\n      bool is_safe = (builtin_routine_id == ECMA_NUMBER_OBJECT_ROUTINE_IS_SAFE_INTEGER);\n      return ecma_builtin_number_object_is_integer_helper (arguments_list_p[0], num, is_safe);\n    }\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_builtin_number_dispatch_routine */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-number.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Number built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* ECMA-262 v5, 15.7.3.4 */\nNUMBER_VALUE (LIT_MAGIC_STRING_NAN,\n              ECMA_BUILTIN_NUMBER_NAN,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.7.3.2 */\nNUMBER_VALUE (LIT_MAGIC_STRING_MAX_VALUE_U,\n              ECMA_BUILTIN_NUMBER_MAX,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.7.3.3 */\nNUMBER_VALUE (LIT_MAGIC_STRING_MIN_VALUE_U,\n              ECMA_BUILTIN_NUMBER_MIN,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.7.3.5 */\nNUMBER_VALUE (LIT_MAGIC_STRING_POSITIVE_INFINITY_U,\n              ECMA_BUILTIN_NUMBER_POSITIVE_INFINITY,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.7.3.6 */\nNUMBER_VALUE (LIT_MAGIC_STRING_NEGATIVE_INFINITY_U,\n              ECMA_BUILTIN_NUMBER_NEGATIVE_INFINITY,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* ECMA-262 v6, 20.1.2.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_EPSILON_U,\n              ECMA_BUILTIN_NUMBER_EPSILON,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v6, 20.1.2.6 */\nNUMBER_VALUE (LIT_MAGIC_STRING_MAX_SAFE_INTEGER_U,\n              ECMA_BUILTIN_NUMBER_MAX_SAFE_INTEGER,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v6, 20.1.2.8 */\nNUMBER_VALUE (LIT_MAGIC_STRING_MIN_SAFE_INTEGER_U,\n              ECMA_BUILTIN_NUMBER_MIN_SAFE_INTEGER,\n              ECMA_PROPERTY_FIXED)\n\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_NUMBER_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.7.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_IS_FINITE, ECMA_NUMBER_OBJECT_ROUTINE_IS_FINITE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_NAN, ECMA_NUMBER_OBJECT_ROUTINE_IS_NAN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_INTEGER, ECMA_NUMBER_OBJECT_ROUTINE_IS_INTEGER, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_SAFE_INTEGER, ECMA_NUMBER_OBJECT_ROUTINE_IS_SAFE_INTEGER, 1, 1)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_PARSE_FLOAT, LIT_MAGIC_STRING_PARSE_FLOAT, ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_PARSE_INT, LIT_MAGIC_STRING_PARSE_INT, ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-object.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-proxy-object.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  /* Note: these 6 routines must be in this order */\n  ECMA_OBJECT_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_OBJECT_PROTOTYPE_TO_STRING,\n  ECMA_OBJECT_PROTOTYPE_VALUE_OF,\n  ECMA_OBJECT_PROTOTYPE_TO_LOCALE_STRING,\n  ECMA_OBJECT_PROTOTYPE_GET_PROTO,\n  ECMA_OBJECT_PROTOTYPE_IS_PROTOTYPE_OF,\n  ECMA_OBJECT_PROTOTYPE_HAS_OWN_PROPERTY,\n  ECMA_OBJECT_PROTOTYPE_PROPERTY_IS_ENUMERABLE,\n  ECMA_OBJECT_PROTOTYPE_SET_PROTO,\n#if ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_ANNEXB)\n  ECMA_OBJECT_PROTOTYPE_DEFINE_GETTER,\n  ECMA_OBJECT_PROTOTYPE_DEFINE_SETTER,\n  ECMA_OBJECT_PROTOTYPE_LOOKUP_GETTER,\n  ECMA_OBJECT_PROTOTYPE_LOOKUP_SETTER,\n#endif /* ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_ANNEXB) */\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-object-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID object_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup objectprototype ECMA Object.prototype object built-in\n * @{\n */\n\n/**\n * The Object.prototype object's 'toString' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.4.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */\n{\n  return ecma_builtin_helper_object_to_string (this_arg);\n} /* ecma_builtin_object_prototype_object_to_string */\n\n/**\n * The Object.prototype object's 'valueOf' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.4.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */\n{\n  return ecma_op_to_object (this_arg);\n} /* ecma_builtin_object_prototype_object_value_of */\n\n/**\n * The Object.prototype object's 'toLocaleString' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_prototype_object_to_locale_string (ecma_value_t this_arg) /**< this argument */\n{\n  return ecma_op_invoke_by_magic_id (this_arg, LIT_MAGIC_STRING_TO_STRING_UL, &this_arg, 1);\n} /* ecma_builtin_object_prototype_object_to_locale_string */\n\n/**\n * The Object.prototype object's 'hasOwnProperty' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.4.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_prototype_object_has_own_property (ecma_object_t *obj_p, /**< this argument */\n                                                       ecma_string_t *prop_name_p) /**< first argument */\n{\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    ecma_property_descriptor_t prop_desc;\n\n    ecma_value_t status = ecma_proxy_object_get_own_property_descriptor (obj_p, prop_name_p, &prop_desc);\n\n    if (ecma_is_value_true (status))\n    {\n      ecma_free_property_descriptor (&prop_desc);\n    }\n\n    return status;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return ecma_make_boolean_value (ecma_op_ordinary_object_has_own_property (obj_p, prop_name_p));\n} /* ecma_builtin_object_prototype_object_has_own_property */\n\n/**\n * The Object.prototype object's 'isPrototypeOf' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.4.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_prototype_object_is_prototype_of (ecma_object_t *obj_p, /**< this argument */\n                                                      ecma_value_t arg) /**< routine's first argument */\n{\n  /* 3. Compare prototype to object */\n  ecma_value_t v_obj_value = ecma_op_to_object (arg);\n\n  if (ECMA_IS_VALUE_ERROR (v_obj_value))\n  {\n    return v_obj_value;\n  }\n\n  ecma_object_t *v_obj_p = ecma_get_object_from_value (v_obj_value);\n\n  ecma_value_t ret_value = ecma_op_object_is_prototype_of (obj_p, v_obj_p);\n\n  ecma_deref_object (v_obj_p);\n\n  return ret_value;\n} /* ecma_builtin_object_prototype_object_is_prototype_of */\n\n/**\n * The Object.prototype object's 'propertyIsEnumerable' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.4.7\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_prototype_object_property_is_enumerable (ecma_object_t *obj_p, /**< this argument */\n                                                             ecma_string_t *prop_name_p) /**< first argument */\n{\n  ecma_property_descriptor_t prop_desc;\n  ecma_value_t status = ecma_op_object_get_own_property_descriptor (obj_p, prop_name_p, &prop_desc);\n\n  if (!ecma_is_value_true (status))\n  {\n    return status;\n  }\n\n  bool is_enumerable = (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE);\n\n  ecma_free_property_descriptor (&prop_desc);\n\n  return ecma_make_boolean_value (is_enumerable);\n} /* ecma_builtin_object_prototype_object_property_is_enumerable */\n\n#if ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_ANNEXB)\n/**\n * The Object.prototype object's '__defineGetter__' and '__defineSetter__' routine\n *\n * See also:\n *          ECMA-262 v11, B.2.2.2\n *          ECMA-262 v11, B.2.2.3\n *\n * @return ECMA_VALUE_ERROR - if the operation fails,\n *         ECMA_VALUE_UNDEFINED - otherwise\n */\nstatic ecma_value_t\necma_builtin_object_prototype_define_getter_setter (ecma_value_t this_arg, /**< this argument */\n                                                    ecma_value_t prop, /**< property */\n                                                    ecma_value_t accessor, /**< getter/setter function */\n                                                    bool define_getter) /**< true - defineGetter method\n                                                                             false - defineSetter method */\n{\n  /* 1. */\n  ecma_value_t to_obj = ecma_op_to_object (this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (to_obj))\n  {\n    return to_obj;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (to_obj);\n\n  /* 2. */\n  if (!ecma_op_is_callable (accessor))\n  {\n    ecma_deref_object (obj_p);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Getter is not callable.\"));\n  }\n\n  ecma_object_t *accessor_obj_p = ecma_get_object_from_value (accessor);\n\n  /* 3. */\n  ecma_property_descriptor_t desc = ecma_make_empty_property_descriptor ();\n  desc.flags |= (ECMA_PROP_IS_ENUMERABLE\n                 | ECMA_PROP_IS_CONFIGURABLE\n                 | ECMA_PROP_IS_ENUMERABLE_DEFINED\n                 | ECMA_PROP_IS_CONFIGURABLE_DEFINED\n                 | ECMA_PROP_IS_THROW);\n\n  if (define_getter)\n  {\n    desc.get_p = accessor_obj_p;\n    desc.flags |= ECMA_PROP_IS_GET_DEFINED;\n  }\n  else\n  {\n    desc.set_p = accessor_obj_p;\n    desc.flags |= ECMA_PROP_IS_SET_DEFINED;\n  }\n\n  /* 4. */\n  ecma_string_t *prop_name_p = ecma_op_to_property_key (prop);\n\n  if (JERRY_UNLIKELY (prop_name_p == NULL))\n  {\n    ecma_deref_object (obj_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 5. */\n  ecma_value_t define_prop = ecma_op_object_define_own_property (obj_p, prop_name_p, &desc);\n\n  ecma_deref_object (obj_p);\n  ecma_deref_ecma_string (prop_name_p);\n\n  if (ECMA_IS_VALUE_ERROR (define_prop))\n  {\n    return define_prop;\n  }\n\n  /* 6. */\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_builtin_object_prototype_define_getter_setter */\n\n/**\n * The Object.prototype object's '__lookupGetter__' and '__lookupSetter__' routine\n *\n * See also:\n *          ECMA-262 v11, B.2.2.4\n *          ECMA-262 v11, B.2.2.5\n *\n * @return ECMA_VALUE_ERROR - if the operation fails,\n *         ECMA_VALUE_UNDEFINED - if the property was not found\n *         Accessor property - otherwise\n */\nstatic ecma_value_t\necma_builtin_object_prototype_lookup_getter_setter (ecma_value_t this_arg, /**< this argument */\n                                                    ecma_value_t prop, /**< property */\n                                                    bool lookup_getter) /**< true - lookupGetter method\n                                                                             false - lookupSetter method */\n{\n  /* 1. */\n  ecma_value_t to_obj = ecma_op_to_object (this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (to_obj))\n  {\n    return to_obj;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (to_obj);\n\n  /* 2. */\n  ecma_string_t *prop_name_p = ecma_op_to_property_key (prop);\n\n  if (JERRY_UNLIKELY (prop_name_p == NULL))\n  {\n    ecma_deref_object (obj_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t ret_value = ECMA_VALUE_UNDEFINED;\n\n  ecma_ref_object (obj_p);\n\n  /* 3. */\n  while (true)\n  {\n    /* 3.a */\n    ecma_property_descriptor_t desc;\n    ecma_value_t get_desc = ecma_op_object_get_own_property_descriptor (obj_p, prop_name_p, &desc);\n\n    if (ECMA_IS_VALUE_ERROR (get_desc))\n    {\n      ret_value = get_desc;\n      ecma_deref_object (obj_p);\n      break;\n    }\n\n    /* 3.b */\n    if (ecma_is_value_true (get_desc))\n    {\n      if ((desc.flags & ECMA_PROP_IS_SET_DEFINED) || (desc.flags & ECMA_PROP_IS_GET_DEFINED))\n      {\n        if (lookup_getter && desc.get_p != NULL)\n        {\n          ecma_ref_object (desc.get_p);\n          ret_value = ecma_make_object_value (desc.get_p);\n        }\n        else if (!lookup_getter && desc.set_p != NULL)\n        {\n          ecma_ref_object (desc.set_p);\n          ret_value = ecma_make_object_value (desc.set_p);\n        }\n      }\n\n      ecma_free_property_descriptor (&desc);\n      ecma_deref_object (obj_p);\n      break;\n    }\n\n    /* 3.c */\n    ecma_object_t *proto_p = ecma_op_object_get_prototype_of (obj_p);\n    ecma_deref_object (obj_p);\n\n    if (proto_p == NULL)\n    {\n      break;\n    }\n    else if (JERRY_UNLIKELY (proto_p == ECMA_OBJECT_POINTER_ERROR))\n    {\n      ret_value = ECMA_VALUE_ERROR;\n      break;\n    }\n\n    /* Advance up on prototype chain. */\n    obj_p = proto_p;\n  }\n\n  ecma_free_value (to_obj);\n  ecma_deref_ecma_string (prop_name_p);\n\n  return ret_value;\n} /* ecma_builtin_object_prototype_lookup_getter_setter */\n#endif /* ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_object_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine\n                                                                             *   identifier */\n                                                ecma_value_t this_arg, /**< 'this' argument value */\n                                                const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                        *   passed to routine */\n                                                uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (arguments_number);\n\n  /* no specialization */\n  if (builtin_routine_id <= ECMA_OBJECT_PROTOTYPE_VALUE_OF)\n  {\n    if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_TO_STRING)\n    {\n      return ecma_builtin_object_prototype_object_to_string (this_arg);\n    }\n\n    JERRY_ASSERT (builtin_routine_id <= ECMA_OBJECT_PROTOTYPE_VALUE_OF);\n\n    return ecma_builtin_object_prototype_object_value_of (this_arg);\n  }\n\n  if (builtin_routine_id <= ECMA_OBJECT_PROTOTYPE_IS_PROTOTYPE_OF)\n  {\n    if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_IS_PROTOTYPE_OF)\n    {\n      /* 15.2.4.6.1. */\n      if (!ecma_is_value_object (arguments_list_p[0]))\n      {\n        return ECMA_VALUE_FALSE;\n      }\n    }\n\n    if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_TO_LOCALE_STRING)\n    {\n      return ecma_builtin_object_prototype_object_to_locale_string (this_arg);\n    }\n\n    ecma_value_t to_object = ecma_op_to_object (this_arg);\n\n    if (ECMA_IS_VALUE_ERROR (to_object))\n    {\n      return to_object;\n    }\n\n    ecma_object_t *obj_p = ecma_get_object_from_value (to_object);\n\n    ecma_value_t ret_value;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_GET_PROTO)\n    {\n      ret_value = ecma_builtin_object_object_get_prototype_of (obj_p);\n    }\n    else\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n      ret_value = ecma_builtin_object_prototype_object_is_prototype_of (obj_p, arguments_list_p[0]);\n    }\n\n    ecma_deref_object (obj_p);\n\n    return ret_value;\n  }\n\n  JERRY_ASSERT (builtin_routine_id >= ECMA_OBJECT_PROTOTYPE_HAS_OWN_PROPERTY);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_SET_PROTO)\n  {\n    return ecma_builtin_object_object_set_proto (this_arg, arguments_list_p[0]);\n  }\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n  else if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_LOOKUP_GETTER)\n  {\n    return ecma_builtin_object_prototype_lookup_getter_setter (this_arg, arguments_list_p[0], true);\n  }\n  else if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_LOOKUP_SETTER)\n  {\n    return ecma_builtin_object_prototype_lookup_getter_setter (this_arg, arguments_list_p[0], false);\n  }\n  else if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_DEFINE_GETTER)\n  {\n    return ecma_builtin_object_prototype_define_getter_setter (this_arg,\n                                                               arguments_list_p[0],\n                                                               arguments_list_p[1],\n                                                               true);\n  }\n  else if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_DEFINE_SETTER)\n  {\n    return ecma_builtin_object_prototype_define_getter_setter (this_arg,\n                                                               arguments_list_p[0],\n                                                               arguments_list_p[1],\n                                                               false);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n#endif /* ENABLED (JERRY_ESNEXT)*/\n\n  ecma_string_t *prop_name_p = ecma_op_to_property_key (arguments_list_p[0]);\n\n  if (prop_name_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t to_object = ecma_op_to_object (this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (to_object))\n  {\n    ecma_deref_ecma_string (prop_name_p);\n    return to_object;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (to_object);\n\n  ecma_value_t ret_value;\n\n  if (builtin_routine_id == ECMA_OBJECT_PROTOTYPE_HAS_OWN_PROPERTY)\n  {\n    ret_value = ecma_builtin_object_prototype_object_has_own_property (obj_p, prop_name_p);\n  }\n  else\n  {\n    ret_value = ecma_builtin_object_prototype_object_property_is_enumerable (obj_p, prop_name_p);\n  }\n\n  ecma_deref_ecma_string (prop_name_p);\n  ecma_deref_object (obj_p);\n\n  return ret_value;\n} /* ecma_builtin_object_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Object.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.2.4.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_OBJECT,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nACCESSOR_READ_WRITE (LIT_MAGIC_STRING__PROTO__,\n                     ECMA_OBJECT_PROTOTYPE_GET_PROTO,\n                     ECMA_OBJECT_PROTOTYPE_SET_PROTO,\n                     ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_OBJECT_PROTOTYPE_TO_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_OBJECT_PROTOTYPE_VALUE_OF, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_OBJECT_PROTOTYPE_TO_LOCALE_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_HAS_OWN_PROPERTY_UL, ECMA_OBJECT_PROTOTYPE_HAS_OWN_PROPERTY, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_PROTOTYPE_OF_UL, ECMA_OBJECT_PROTOTYPE_IS_PROTOTYPE_OF, 1, 1)\nROUTINE (LIT_MAGIC_STRING_PROPERTY_IS_ENUMERABLE_UL, ECMA_OBJECT_PROTOTYPE_PROPERTY_IS_ENUMERABLE, 1, 1)\n\n#if ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_ANNEXB)\nROUTINE (LIT_MAGIC_STRING_DEFINE_GETTER, ECMA_OBJECT_PROTOTYPE_DEFINE_GETTER, 2, 2)\nROUTINE (LIT_MAGIC_STRING_DEFINE_SETTER, ECMA_OBJECT_PROTOTYPE_DEFINE_SETTER, 2, 2)\nROUTINE (LIT_MAGIC_STRING_LOOKUP_GETTER, ECMA_OBJECT_PROTOTYPE_LOOKUP_GETTER, 1, 1)\nROUTINE (LIT_MAGIC_STRING_LOOKUP_SETTER, ECMA_OBJECT_PROTOTYPE_LOOKUP_SETTER, 1, 1)\n#endif /* ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_ANNEXB)*/\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-proxy-object.h\"\n#include \"ecma-objects-general.h\"\n#include \"jrt.h\"\n#include \"ecma-builtin-object.h\"\n#if ENABLED (JERRY_ESNEXT)\n#include \"ecma-iterator-object.h\"\n#include \"ecma-function-object.h\"\n#include \"jcontext.h\"\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_OBJECT_ROUTINE_START = 0,\n\n  ECMA_OBJECT_ROUTINE_CREATE,\n  ECMA_OBJECT_ROUTINE_IS,\n  ECMA_OBJECT_ROUTINE_SET_PROTOTYPE_OF,\n\n  /* These should be in this order. */\n  ECMA_OBJECT_ROUTINE_DEFINE_PROPERTY,\n  ECMA_OBJECT_ROUTINE_DEFINE_PROPERTIES,\n\n  /* These should be in this order. */\n  ECMA_OBJECT_ROUTINE_ASSIGN,\n  ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_DESCRIPTOR,\n  ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_DESCRIPTORS,\n  ECMA_OBJECT_ROUTINE_GET_PROTOTYPE_OF,\n  ECMA_OBJECT_ROUTINE_FROM_ENTRIES,\n  ECMA_OBJECT_ROUTINE_KEYS,\n  ECMA_OBJECT_ROUTINE_VALUES,\n  ECMA_OBJECT_ROUTINE_ENTRIES,\n\n  /* These should be in this order. */\n  ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_NAMES,\n  ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_SYMBOLS,\n\n  /* These should be in this order. */\n  ECMA_OBJECT_ROUTINE_FREEZE,\n  ECMA_OBJECT_ROUTINE_PREVENT_EXTENSIONS,\n  ECMA_OBJECT_ROUTINE_SEAL,\n\n  /* These should be in this order. */\n  ECMA_OBJECT_ROUTINE_IS_EXTENSIBLE,\n  ECMA_OBJECT_ROUTINE_IS_FROZEN,\n  ECMA_OBJECT_ROUTINE_IS_SEALED,\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-object.inc.h\"\n#define BUILTIN_UNDERSCORED_ID object\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup object ECMA Object object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in Object object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_object_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                   uint32_t arguments_list_len) /**< number of arguments */\n{\n  if (arguments_list_len == 0\n      || ecma_is_value_undefined (arguments_list_p[0])\n      || ecma_is_value_null (arguments_list_p[0]))\n  {\n    return ecma_make_object_value (ecma_op_create_object_object_noarg ());\n  }\n\n  return ecma_op_to_object (arguments_list_p[0]);\n} /* ecma_builtin_object_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Object object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_object_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_CONTEXT (current_new_target_p) != ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT))\n  {\n    ecma_object_t *prototype_obj_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                             ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n    if (JERRY_UNLIKELY (prototype_obj_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                  0,\n                                                  ECMA_OBJECT_TYPE_GENERAL);\n    ecma_deref_object (prototype_obj_p);\n\n    return ecma_make_object_value (object_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  return ecma_builtin_object_dispatch_call (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_object_dispatch_construct */\n\n/**\n * The Object object's 'getPrototypeOf' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.3.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_object_object_get_prototype_of (ecma_object_t *obj_p) /**< routine's argument */\n{\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    return ecma_proxy_object_get_prototype_of (obj_p);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  jmem_cpointer_t proto_cp = ecma_op_ordinary_object_get_prototype_of (obj_p);\n\n  if (proto_cp != JMEM_CP_NULL)\n  {\n    ecma_object_t *prototype_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, proto_cp);\n    ecma_ref_object (prototype_p);\n    return ecma_make_object_value (prototype_p);\n  }\n\n  return ECMA_VALUE_NULL;\n} /* ecma_builtin_object_object_get_prototype_of */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * The Object object's 'setPrototypeOf' routine\n *\n * See also:\n *          ES2015 19.1.2.18\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_object_object_set_prototype_of (ecma_value_t arg1, /**< routine's first argument */\n                                             ecma_value_t arg2) /**< routine's second argument */\n{\n  /* 1., 2. */\n  if (!ecma_op_require_object_coercible (arg1))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 3. */\n  if (!ecma_is_value_object (arg2) && !ecma_is_value_null (arg2))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"proto is neither Object nor Null.\"));\n  }\n\n  /* 4. */\n  if (!ecma_is_value_object (arg1))\n  {\n    return ecma_copy_value (arg1);\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (arg1);\n  ecma_value_t status;\n\n  /* 5. */\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    status = ecma_proxy_object_set_prototype_of (obj_p, arg2);\n\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      return status;\n    }\n  }\n  else\n  {\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n    status = ecma_op_ordinary_object_set_prototype_of (obj_p, arg2);\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (ecma_is_value_false (status))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot set [[Prototype]].\"));\n  }\n\n  JERRY_ASSERT (ecma_is_value_true (status));\n  ecma_ref_object (obj_p);\n\n  return arg1;\n} /* ecma_builtin_object_object_set_prototype_of */\n\n/**\n * The Object object's set __proto__ routine\n *\n * See also:\n *          ECMA-262 v6, B.2.2.1.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_object_object_set_proto (ecma_value_t arg1, /**< routine's first argument */\n                                      ecma_value_t arg2) /**< routine's second argument */\n{\n  /* 1., 2. */\n  if (!ecma_op_require_object_coercible (arg1))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 3. */\n  if (!ecma_is_value_object (arg2) && !ecma_is_value_null (arg2))\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  /* 4. */\n  if (!ecma_is_value_object (arg1))\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (arg1);\n  ecma_value_t status;\n\n  /* 5. */\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    status = ecma_proxy_object_set_prototype_of (obj_p, arg2);\n\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      return status;\n    }\n  }\n  else\n  {\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n    status = ecma_op_ordinary_object_set_prototype_of (obj_p, arg2);\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (ecma_is_value_false (status))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot set [[Prototype]].\"));\n  }\n\n  JERRY_ASSERT (ecma_is_value_true (status));\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_builtin_object_object_set_proto */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * SetIntegrityLevel operation\n *\n * See also:\n *          ECMA-262 v6, 7.3.14\n *\n * @return ECMA_VALUE_ERROR - if the operation raised an error\n *         ECMA_VALUE_{TRUE/FALSE} - depends on whether the integrity level has been set sucessfully\n */\nstatic ecma_value_t\necma_builtin_object_set_integrity_level (ecma_object_t *obj_p, /**< object */\n                                         bool is_seal) /**< true - set \"sealed\"\n                                                        *   false - set \"frozen\" */\n{\n  /* 3. */\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    ecma_value_t status = ecma_proxy_object_prevent_extensions (obj_p);\n\n    if (!ecma_is_value_true (status))\n    {\n      return status;\n    }\n  }\n  else\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n  {\n    ecma_op_ordinary_object_prevent_extensions (obj_p);\n  }\n\n  /* 6. */\n  ecma_collection_t *props_p = ecma_op_object_own_property_keys (obj_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (props_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_value_t *buffer_p = props_p->buffer_p;\n\n  if (is_seal)\n  {\n    /* 8.a */\n    for (uint32_t i = 0; i < props_p->item_count; i++)\n    {\n      ecma_string_t *property_name_p = ecma_get_prop_name_from_value (buffer_p[i]);\n\n      ecma_property_descriptor_t prop_desc;\n      ecma_value_t status = ecma_op_object_get_own_property_descriptor (obj_p, property_name_p, &prop_desc);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      if (ECMA_IS_VALUE_ERROR (status))\n      {\n        ecma_collection_free (props_p);\n        return ECMA_VALUE_ERROR;\n      }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n      if (ecma_is_value_false (status))\n      {\n        continue;\n      }\n\n      prop_desc.flags &= (uint16_t) ~ECMA_PROP_IS_CONFIGURABLE;\n      prop_desc.flags |= ECMA_PROP_IS_THROW;\n\n      /* 8.a.i */\n      ecma_value_t define_own_prop_ret = ecma_op_object_define_own_property (obj_p,\n                                                                             property_name_p,\n                                                                             &prop_desc);\n\n      ecma_free_property_descriptor (&prop_desc);\n\n      /* 8.a.ii */\n      if (ECMA_IS_VALUE_ERROR (define_own_prop_ret))\n      {\n        ecma_collection_free (props_p);\n        return define_own_prop_ret;\n      }\n\n      ecma_free_value (define_own_prop_ret);\n    }\n  }\n  else\n  {\n    /* 9.a */\n    for (uint32_t i = 0; i < props_p->item_count; i++)\n    {\n      ecma_string_t *property_name_p = ecma_get_prop_name_from_value (buffer_p[i]);\n\n      /* 9.1 */\n      ecma_property_descriptor_t prop_desc;\n      ecma_value_t status = ecma_op_object_get_own_property_descriptor (obj_p, property_name_p, &prop_desc);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      if (ECMA_IS_VALUE_ERROR (status))\n      {\n        ecma_collection_free (props_p);\n        return ECMA_VALUE_ERROR;\n      }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n      if (ecma_is_value_false (status))\n      {\n        continue;\n      }\n\n      /* 9.2 */\n      if ((prop_desc.flags & (ECMA_PROP_IS_WRITABLE_DEFINED | ECMA_PROP_IS_WRITABLE))\n          == (ECMA_PROP_IS_WRITABLE_DEFINED | ECMA_PROP_IS_WRITABLE))\n      {\n        prop_desc.flags &= (uint16_t) ~ECMA_PROP_IS_WRITABLE;\n      }\n\n      prop_desc.flags &= (uint16_t) ~ECMA_PROP_IS_CONFIGURABLE;\n      prop_desc.flags |= ECMA_PROP_IS_THROW;\n\n      /* 9.3 */\n      ecma_value_t define_own_prop_ret = ecma_op_object_define_own_property (obj_p,\n                                                                             property_name_p,\n                                                                             &prop_desc);\n\n      ecma_free_property_descriptor (&prop_desc);\n\n      /* 9.4 */\n      if (ECMA_IS_VALUE_ERROR (define_own_prop_ret))\n      {\n        ecma_collection_free (props_p);\n        return define_own_prop_ret;\n      }\n\n      ecma_free_value (define_own_prop_ret);\n    }\n\n  }\n\n  ecma_collection_free (props_p);\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_builtin_object_set_integrity_level */\n\n/**\n * The Object object's 'seal' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.3.8\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_object_seal (ecma_object_t *obj_p) /**< routine's argument */\n{\n  ecma_value_t status = ecma_builtin_object_set_integrity_level (obj_p, true);\n\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    return status;\n  }\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ecma_is_value_false (status))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Object cannot be sealed.\"));\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  /* 4. */\n  ecma_ref_object (obj_p);\n  return ecma_make_object_value (obj_p);\n} /* ecma_builtin_object_object_seal */\n\n/**\n * The Object object's 'freeze' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.3.9\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_object_freeze (ecma_object_t *obj_p) /**< routine's argument */\n{\n  ecma_value_t status = ecma_builtin_object_set_integrity_level (obj_p, false);\n\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    return status;\n  }\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ecma_is_value_false (status))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Object cannot be frozen.\"));\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  /* 4. */\n  ecma_ref_object (obj_p);\n  return ecma_make_object_value (obj_p);\n} /* ecma_builtin_object_object_freeze */\n\n/**\n * The Object object's 'preventExtensions' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.3.10\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_object_object_prevent_extensions (ecma_object_t *obj_p) /**< routine's argument */\n{\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    ecma_value_t status = ecma_proxy_object_prevent_extensions (obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      return status;\n    }\n\n    if (ecma_is_value_false (status))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot set [[Extensible]] property of the object.\"));\n    }\n\n    JERRY_ASSERT (ecma_is_value_true (status));\n  }\n  else\n  {\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n    ecma_op_ordinary_object_prevent_extensions (obj_p);\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n  ecma_ref_object (obj_p);\n\n  return ecma_make_object_value (obj_p);\n} /* ecma_builtin_object_object_prevent_extensions */\n\n/**\n * The Object object's 'isSealed' and 'isFrozen' routines\n *\n * See also:\n *         ECMA-262 v5, 15.2.3.11\n *         ECMA-262 v5, 15.2.3.12\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_test_integrity_level (ecma_object_t *obj_p, /**< routine's argument */\n                                          int mode) /**< routine mode */\n{\n  JERRY_ASSERT (mode == ECMA_OBJECT_ROUTINE_IS_FROZEN || mode == ECMA_OBJECT_ROUTINE_IS_SEALED);\n\n  /* 3. */\n  bool is_extensible;\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    ecma_value_t status = ecma_proxy_object_is_extensible (obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      return status;\n    }\n\n    is_extensible = ecma_is_value_true (status);\n  }\n  else\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n  {\n    is_extensible = ecma_op_ordinary_object_is_extensible (obj_p);\n  }\n\n  if (is_extensible)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  /* the value can be updated in the loop below */\n  ecma_value_t ret_value = ECMA_VALUE_TRUE;\n\n  /* 2. */\n  ecma_collection_t *props_p = ecma_op_object_own_property_keys (obj_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (props_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_value_t *buffer_p = props_p->buffer_p;\n\n  for (uint32_t i = 0; i < props_p->item_count; i++)\n  {\n    ecma_string_t *property_name_p = ecma_get_prop_name_from_value (buffer_p[i]);\n\n    /* 2.a */\n    ecma_property_descriptor_t prop_desc;\n    ecma_value_t status = ecma_op_object_get_own_property_descriptor (obj_p, property_name_p, &prop_desc);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      ret_value = status;\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    if (ecma_is_value_false (status))\n    {\n      continue;\n    }\n\n    bool is_writable_data = ((prop_desc.flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE))\n                             == (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE));\n    bool is_configurable = (prop_desc.flags & ECMA_PROP_IS_CONFIGURABLE);\n\n    ecma_free_property_descriptor (&prop_desc);\n\n    /* 2.b for isFrozen */\n    /* 2.b for isSealed, 2.c for isFrozen */\n    if ((mode == ECMA_OBJECT_ROUTINE_IS_FROZEN && is_writable_data)\n        || is_configurable)\n    {\n      ret_value = ECMA_VALUE_FALSE;\n      break;\n    }\n  }\n\n  ecma_collection_free (props_p);\n\n  return ret_value;\n} /* ecma_builtin_object_test_integrity_level */\n\n/**\n * The Object object's 'isExtensible' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.3.13\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_object_object_is_extensible (ecma_object_t *obj_p) /**< routine's argument */\n{\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    return ecma_proxy_object_is_extensible (obj_p);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return ecma_make_boolean_value (ecma_op_ordinary_object_is_extensible (obj_p));\n} /* ecma_builtin_object_object_is_extensible */\n\n/**\n * Common implementation of the Object object's 'keys', 'values', 'entries' routines\n *\n * See also:\n *          ECMA-262 v11, 19.1.2.17\n *          ECMA-262 v11, 19.1.2.22\n *          ECMA-262 v11, 19.1.2.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_object_keys_values_helper (ecma_object_t *obj_p, /**< routine's first argument */\n                                               ecma_enumerable_property_names_options_t option) /**< listing option */\n{\n  /* 2. */\n  ecma_collection_t *props_p = ecma_op_object_get_enumerable_property_names (obj_p, option);\n\n  if (props_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 3. */\n  return ecma_op_new_array_object_from_collection (props_p, option != ECMA_ENUMERABLE_PROPERTY_KEYS);\n} /* ecma_builtin_object_object_keys_values_helper */\n\n/**\n * The Object object's 'getOwnPropertyDescriptor' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.3.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_object_object_get_own_property_descriptor (ecma_object_t *obj_p, /**< routine's first argument */\n                                                        ecma_string_t *name_str_p) /**< routine's second argument */\n{\n  /* 3. */\n  ecma_property_descriptor_t prop_desc;\n\n  ecma_value_t status = ecma_op_object_get_own_property_descriptor (obj_p, name_str_p, &prop_desc);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    return status;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (ecma_is_value_true (status))\n  {\n    /* 4. */\n    ecma_object_t *desc_obj_p = ecma_op_from_property_descriptor (&prop_desc);\n\n    ecma_free_property_descriptor (&prop_desc);\n\n    return ecma_make_object_value (desc_obj_p);\n  }\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_builtin_object_object_get_own_property_descriptor */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * The Object object's 'getOwnPropertyDescriptors' routine\n *\n * See also:\n *          ECMA-262 v11, 19.1.2.9\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_object_get_own_property_descriptors (ecma_object_t *obj_p) /**< routine's first argument */\n{\n  /* 2 */\n  ecma_collection_t *prop_names_p = ecma_op_object_own_property_keys (obj_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (prop_names_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_value_t *names_buffer_p = prop_names_p->buffer_p;\n\n  /* 3 */\n  ecma_object_t *object_prototype_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n  ecma_object_t *descriptors_p = ecma_create_object (object_prototype_p, 0, ECMA_OBJECT_TYPE_GENERAL);\n\n  /* 4 */\n  for (uint32_t i = 0; i < prop_names_p->item_count; i++)\n  {\n    ecma_string_t *property_name_p = ecma_get_prop_name_from_value (names_buffer_p[i]);\n\n    /* 4.a */\n    ecma_property_descriptor_t prop_desc;\n    ecma_value_t status = ecma_op_object_get_own_property_descriptor (obj_p, property_name_p, &prop_desc);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      ecma_deref_object (descriptors_p);\n      ecma_collection_free (prop_names_p);\n\n      return status;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    if (ecma_is_value_true (status))\n    {\n      /* 4.b */\n      ecma_object_t *desc_obj_p = ecma_op_from_property_descriptor (&prop_desc);\n      /* 4.c */\n      ecma_property_value_t *value_p = ecma_create_named_data_property (descriptors_p,\n                                                                        property_name_p,\n                                                                        ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                                        NULL);\n      value_p->value = ecma_make_object_value (desc_obj_p);\n\n      ecma_deref_object (desc_obj_p);\n      ecma_free_property_descriptor (&prop_desc);\n    }\n  }\n\n  ecma_collection_free (prop_names_p);\n\n  return ecma_make_object_value (descriptors_p);\n} /* ecma_builtin_object_object_get_own_property_descriptors */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * The Object object's 'defineProperties' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.3.7\n *          ECMA-262 v11, 19.1.2.3.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_object_define_properties (ecma_object_t *obj_p, /**< routine's first argument */\n                                              ecma_value_t arg2) /**< routine's second argument */\n{\n  /* 2. */\n  ecma_value_t props = ecma_op_to_object (arg2);\n\n  if (ECMA_IS_VALUE_ERROR (props))\n  {\n    return props;\n  }\n\n  ecma_object_t *props_p = ecma_get_object_from_value (props);\n\n  /* 3. */\n  ecma_collection_t *prop_names_p = ecma_op_object_own_property_keys (props_p);\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (prop_names_p == NULL)\n  {\n    ecma_deref_object (props_p);\n    return ret_value;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_value_t *buffer_p = prop_names_p->buffer_p;\n\n  /* 4. */\n  JMEM_DEFINE_LOCAL_ARRAY (property_descriptors, prop_names_p->item_count, ecma_property_descriptor_t);\n  uint32_t property_descriptor_number = 0;\n  ecma_collection_t *enum_prop_names = ecma_new_collection ();\n\n  /* 5. */\n  for (uint32_t i = 0; i < prop_names_p->item_count; i++)\n  {\n    ecma_string_t *prop_name_p = ecma_get_prop_name_from_value (buffer_p[i]);\n\n    ecma_property_descriptor_t prop_desc;\n    ecma_value_t get_desc = ecma_op_object_get_own_property_descriptor (props_p,\n                                                                        prop_name_p,\n                                                                        &prop_desc);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (ECMA_IS_VALUE_ERROR (get_desc))\n    {\n      goto cleanup;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (ecma_is_value_true (get_desc))\n    {\n      if (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE)\n      {\n        ecma_value_t desc_obj = ecma_op_object_get (props_p, prop_name_p);\n\n        if (ECMA_IS_VALUE_ERROR (desc_obj))\n        {\n          ecma_free_property_descriptor (&prop_desc);\n          goto cleanup;\n        }\n\n        ecma_value_t conv_result = ecma_op_to_property_descriptor (desc_obj,\n                                                                   &property_descriptors[property_descriptor_number]);\n\n        property_descriptors[property_descriptor_number].flags |= ECMA_PROP_IS_THROW;\n\n        ecma_free_value (desc_obj);\n\n        if (ECMA_IS_VALUE_ERROR (conv_result))\n        {\n          ecma_free_property_descriptor (&prop_desc);\n          goto cleanup;\n        }\n\n        property_descriptor_number++;\n        ecma_free_value (conv_result);\n        ecma_ref_ecma_string (prop_name_p);\n        ecma_collection_push_back (enum_prop_names, buffer_p[i]);\n      }\n\n      ecma_free_property_descriptor (&prop_desc);\n    }\n  }\n\n  /* 6. */\n  for (uint32_t i = 0; i < enum_prop_names->item_count; i++)\n  {\n    ecma_string_t *prop_name_p = ecma_get_prop_name_from_value (enum_prop_names->buffer_p[i]);\n\n    ecma_value_t define_own_prop_ret = ecma_op_object_define_own_property (obj_p,\n                                                                           prop_name_p,\n                                                                           &property_descriptors[i]);\n    if (ECMA_IS_VALUE_ERROR (define_own_prop_ret))\n    {\n      goto cleanup;\n    }\n\n    ecma_free_value (define_own_prop_ret);\n  }\n\n  ecma_ref_object (obj_p);\n  ret_value = ecma_make_object_value (obj_p);\n\ncleanup:\n  /* Clean up. */\n  for (uint32_t index = 0;\n       index < property_descriptor_number;\n       index++)\n  {\n    ecma_free_property_descriptor (&property_descriptors[index]);\n  }\n\n  ecma_collection_free (enum_prop_names);\n\n  JMEM_FINALIZE_LOCAL_ARRAY (property_descriptors);\n\n  ecma_collection_free (prop_names_p);\n\n  ecma_deref_object (props_p);\n\n  return ret_value;\n} /* ecma_builtin_object_object_define_properties */\n\n/**\n * The Object object's 'create' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.3.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_object_create (ecma_value_t arg1, /**< routine's first argument */\n                                   ecma_value_t arg2) /**< routine's second argument */\n{\n  /* 1. */\n  if (!ecma_is_value_object (arg1) && !ecma_is_value_null (arg1))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not an object.\"));\n  }\n\n  ecma_object_t *obj_p = NULL;\n\n  if (!ecma_is_value_null (arg1))\n  {\n    obj_p = ecma_get_object_from_value (arg1);\n  }\n  /* 2-3. */\n  ecma_object_t *result_obj_p = ecma_op_create_object_object_noarg_and_set_prototype (obj_p);\n\n  /* 4. */\n  if (!ecma_is_value_undefined (arg2))\n  {\n    ecma_value_t obj = ecma_builtin_object_object_define_properties (result_obj_p, arg2);\n\n    if (ECMA_IS_VALUE_ERROR (obj))\n    {\n      ecma_deref_object (result_obj_p);\n      return obj;\n    }\n\n    ecma_free_value (obj);\n  }\n\n  /* 5. */\n  return ecma_make_object_value (result_obj_p);\n} /* ecma_builtin_object_object_create */\n\n/**\n * The Object object's 'defineProperty' routine\n *\n * See also:\n *          ECMA-262 v5, 15.2.3.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_object_object_define_property (ecma_object_t *obj_p, /**< routine's first argument */\n                                            ecma_string_t *name_str_p, /**< routine's second argument */\n                                            ecma_value_t arg3) /**< routine's third argument */\n{\n  ecma_property_descriptor_t prop_desc;\n\n  ecma_value_t conv_result = ecma_op_to_property_descriptor (arg3, &prop_desc);\n\n  if (ECMA_IS_VALUE_ERROR (conv_result))\n  {\n    return conv_result;\n  }\n\n  prop_desc.flags |= ECMA_PROP_IS_THROW;\n\n  ecma_value_t define_own_prop_ret = ecma_op_object_define_own_property (obj_p,\n                                                                         name_str_p,\n                                                                         &prop_desc);\n\n  ecma_free_property_descriptor (&prop_desc);\n  ecma_free_value (conv_result);\n\n  if (ECMA_IS_VALUE_ERROR (define_own_prop_ret))\n  {\n    return define_own_prop_ret;\n  }\n\n  if (ecma_is_value_false (define_own_prop_ret))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"The requested property update cannot be performed.\"));\n  }\n\n  JERRY_ASSERT (ecma_is_value_true (define_own_prop_ret));\n\n  ecma_ref_object (obj_p);\n  ecma_free_value (define_own_prop_ret);\n\n  return ecma_make_object_value (obj_p);\n} /* ecma_builtin_object_object_define_property */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * The Object object's 'assign' routine\n *\n * See also:\n *          ECMA-262 v6, 19.1.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_object_assign (ecma_object_t *target_p, /**< target object */\n                                   const ecma_value_t arguments_list_p[], /**< arguments list */\n                                   uint32_t arguments_list_len) /**< number of arguments */\n{\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  /* 4-5. */\n  for (uint32_t i = 0; i < arguments_list_len && ecma_is_value_empty (ret_value); i++)\n  {\n    ecma_value_t next_source = arguments_list_p[i];\n\n    /* 5.a */\n    if (ecma_is_value_undefined (next_source) || ecma_is_value_null (next_source))\n    {\n      continue;\n    }\n\n    /* 5.b.i */\n    ecma_value_t from_value = ecma_op_to_object (next_source);\n    /* null and undefied cases are handled above, so this must be a valid object */\n    JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (from_value));\n\n    ecma_object_t *from_obj_p = ecma_get_object_from_value (from_value);\n\n    /* 5.b.iii */\n    ecma_collection_t *props_p = ecma_op_object_own_property_keys (from_obj_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (props_p == NULL)\n    {\n      ecma_deref_object (from_obj_p);\n      return ECMA_VALUE_ERROR;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    ecma_value_t *buffer_p = props_p->buffer_p;\n\n    for (uint32_t j = 0; (j < props_p->item_count) && ecma_is_value_empty (ret_value); j++)\n    {\n      ecma_string_t *property_name_p = ecma_get_prop_name_from_value (buffer_p[j]);\n\n      /* 5.c.i-ii */\n      ecma_property_descriptor_t prop_desc;\n      ecma_value_t desc_status = ecma_op_object_get_own_property_descriptor (from_obj_p, property_name_p, &prop_desc);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      if (ECMA_IS_VALUE_ERROR (desc_status))\n      {\n        ret_value = desc_status;\n        break;\n      }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n      if (ecma_is_value_false (desc_status))\n      {\n        continue;\n      }\n\n      /* 5.c.iii */\n      if ((prop_desc.flags & ECMA_PROP_IS_ENUMERABLE)\n          && (((prop_desc.flags & ECMA_PROP_IS_VALUE_DEFINED) && !ecma_is_value_undefined (prop_desc.value))\n              || (prop_desc.flags & ECMA_PROP_IS_GET_DEFINED)))\n      {\n        /* 5.c.iii.1 */\n        ecma_value_t prop_value = ecma_op_object_get (from_obj_p, property_name_p);\n\n        /* 5.c.iii.2 */\n        if (ECMA_IS_VALUE_ERROR (prop_value))\n        {\n          ret_value = prop_value;\n        }\n        else\n        {\n          /* 5.c.iii.3 */\n          ecma_value_t status = ecma_op_object_put (target_p, property_name_p, prop_value, true);\n\n          /* 5.c.iii.4 */\n          if (ECMA_IS_VALUE_ERROR (status))\n          {\n            ret_value = status;\n          }\n        }\n\n        ecma_free_value (prop_value);\n      }\n\n      ecma_free_property_descriptor (&prop_desc);\n    }\n\n    ecma_deref_object (from_obj_p);\n    ecma_collection_free (props_p);\n  }\n\n  /* 6. */\n  if (ecma_is_value_empty (ret_value))\n  {\n    ecma_ref_object (target_p);\n    return ecma_make_object_value (target_p);\n  }\n\n  return ret_value;\n} /* ecma_builtin_object_object_assign */\n\n/**\n * The Object object's 'is' routine\n *\n * See also:\n *          ECMA-262 v6, 19.1.2.10\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_object_is (ecma_value_t arg1, /**< routine's first argument */\n                               ecma_value_t arg2) /**< routine's second argument */\n{\n  return ecma_op_same_value (arg1, arg2) ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;\n} /* ecma_builtin_object_object_is */\n\n/**\n * The Object object's 'fromEntries' routine\n *\n * See also:\n *          ECMA-262 v10, 19.1.2.7\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_object_from_entries (ecma_value_t iterator) /**< object's iterator */\n{\n  JERRY_ASSERT (ecma_op_require_object_coercible (iterator));\n  /* 2 */\n  ecma_object_t *object_prototype_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n  ecma_object_t *obj_p = ecma_create_object (object_prototype_p, 0, ECMA_OBJECT_TYPE_GENERAL);\n\n  /* 6.a */\n  ecma_value_t next_method;\n  ecma_value_t result = ecma_op_get_iterator (iterator, ECMA_VALUE_SYNC_ITERATOR, &next_method);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_deref_object (obj_p);\n    return result;\n  }\n\n  const ecma_value_t original_iterator = result;\n\n  /* 6.b */\n  while (true)\n  {\n    /* 6.a.i */\n    result = ecma_op_iterator_step (original_iterator, next_method);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_iterator;\n    }\n\n    /* 6.a.ii */\n    if (ecma_is_value_false (result))\n    {\n      break;\n    }\n\n    /* 6.a.iii */\n    const ecma_value_t next = result;\n    result = ecma_op_iterator_value (next);\n    ecma_free_value (next);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_iterator;\n    }\n\n    /* 6.a.iv */\n    if (!ecma_is_value_object (result))\n    {\n      ecma_free_value (result);\n      ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator value is not an object.\"));\n      result = ecma_op_iterator_close (original_iterator);\n      JERRY_ASSERT (ECMA_IS_VALUE_ERROR (result));\n      goto cleanup_iterator;\n    }\n\n    /* 6.a.v-vi */\n    ecma_object_t *next_object_p = ecma_get_object_from_value (result);\n\n    result = ecma_op_object_get_by_index (next_object_p, 0);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      ecma_deref_object (next_object_p);\n      ecma_op_iterator_close (original_iterator);\n      goto cleanup_iterator;\n    }\n\n    const ecma_value_t key = result;\n\n    result = ecma_op_object_get_by_index (next_object_p, 1);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      ecma_deref_object (next_object_p);\n      ecma_free_value (key);\n      ecma_op_iterator_close (original_iterator);\n      goto cleanup_iterator;\n    }\n\n    /* 6.a.vii */\n    const ecma_value_t value = result;\n    ecma_string_t *property_key = ecma_op_to_property_key (key);\n\n    if (property_key == NULL)\n    {\n      ecma_deref_object (next_object_p);\n      ecma_free_value (key);\n      ecma_op_iterator_close (original_iterator);\n      result = ECMA_VALUE_ERROR;\n      goto cleanup_iterator;\n    }\n\n    ecma_property_value_t *prop;\n    ecma_property_t *property_p = ecma_find_named_property (obj_p, property_key);\n\n    if (property_p == NULL)\n    {\n      prop = ecma_create_named_data_property (obj_p,\n                                              property_key,\n                                              ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                              NULL);\n      prop->value = ecma_copy_value_if_not_object (value);\n    }\n    else\n    {\n      ecma_named_data_property_assign_value (obj_p, ECMA_PROPERTY_VALUE_PTR (property_p), value);\n    }\n\n    ecma_deref_ecma_string (property_key);\n    ecma_free_value (key);\n    ecma_free_value (value);\n    ecma_deref_object (next_object_p);\n  }\n\n  ecma_ref_object (obj_p);\n  result = ecma_make_object_value (obj_p);\n\ncleanup_iterator:\n  ecma_free_value (original_iterator);\n  ecma_free_value (next_method);\n  ecma_deref_object (obj_p);\n\n  return result;\n} /* ecma_builtin_object_from_entries */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * GetOwnPropertyKeys abstract method\n *\n * See also:\n *          ECMA-262 v11, 19.1.2.11.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_op_object_get_own_property_keys (ecma_value_t this_arg, /**< this argument */\n                                      uint16_t type) /**< routine type */\n{\n#if ENABLED (JERRY_ESNEXT)\n  /* 1. */\n  ecma_value_t object = ecma_op_to_object (this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (object))\n  {\n    return object;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (object);\n\n  /* 2. */\n  ecma_collection_t *props_p = ecma_op_object_own_property_keys (obj_p);\n\n  if (props_p == NULL)\n  {\n    ecma_deref_object (obj_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 3. */\n  ecma_collection_t *name_list_p = ecma_new_collection ();\n\n  /* 4. */\n  for (uint32_t i = 0; i < props_p->item_count; i++)\n  {\n    ecma_value_t prop_name = props_p->buffer_p[i];\n    ecma_string_t *name_p = ecma_get_prop_name_from_value (prop_name);\n\n    if ((ecma_prop_name_is_symbol (name_p) && type == ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_SYMBOLS)\n        || (ecma_is_value_string (prop_name) && type == ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_NAMES))\n    {\n      ecma_ref_ecma_string (name_p);\n      ecma_collection_push_back (name_list_p, prop_name);\n    }\n  }\n\n  ecma_value_t result_array = ecma_op_new_array_object_from_collection (name_list_p, false);\n\n  ecma_deref_object (obj_p);\n  ecma_collection_free (props_p);\n\n  return result_array;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (type);\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);\n  ecma_collection_t *props_p = ecma_op_object_own_property_keys (obj_p);\n  return ecma_op_new_array_object_from_collection (props_p, false);\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_op_object_get_own_property_keys */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_object_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                      ecma_value_t this_arg, /**< 'this' argument value */\n                                      const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                              *   passed to routine */\n                                      uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (this_arg);\n  JERRY_UNUSED (arguments_list_p);\n  JERRY_UNUSED (arguments_number);\n\n  ecma_value_t arg1 = arguments_list_p[0];\n  ecma_value_t arg2 = arguments_list_p[1];\n\n  /* No specialization for the arguments */\n  switch (builtin_routine_id)\n  {\n    case ECMA_OBJECT_ROUTINE_CREATE:\n    {\n      return ecma_builtin_object_object_create (arg1, arg2);\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_OBJECT_ROUTINE_SET_PROTOTYPE_OF:\n    {\n      return ecma_builtin_object_object_set_prototype_of (arg1, arg2);\n    }\n    case ECMA_OBJECT_ROUTINE_IS:\n    {\n      return ecma_builtin_object_object_is (arg1, arg2);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      break;\n    }\n  }\n\n  ecma_object_t *obj_p;\n#if !ENABLED (JERRY_ESNEXT)\n  if (!ecma_is_value_object (arg1))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not an object.\"));\n  }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  if (builtin_routine_id <= ECMA_OBJECT_ROUTINE_DEFINE_PROPERTIES)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (!ecma_is_value_object (arg1))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not an object.\"));\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    obj_p = ecma_get_object_from_value (arg1);\n\n    if (builtin_routine_id == ECMA_OBJECT_ROUTINE_DEFINE_PROPERTY)\n    {\n      ecma_string_t *prop_name_p = ecma_op_to_property_key (arg2);\n\n      if (prop_name_p == NULL)\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      ecma_value_t result = ecma_builtin_object_object_define_property (obj_p, prop_name_p, arguments_list_p[2]);\n\n      ecma_deref_ecma_string (prop_name_p);\n      return result;\n    }\n\n    JERRY_ASSERT (builtin_routine_id == ECMA_OBJECT_ROUTINE_DEFINE_PROPERTIES);\n    return ecma_builtin_object_object_define_properties (obj_p, arg2);\n  }\n  else if (builtin_routine_id <= ECMA_OBJECT_ROUTINE_ENTRIES)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    ecma_value_t object = ecma_op_to_object (arg1);\n    if (ECMA_IS_VALUE_ERROR (object))\n    {\n      return object;\n    }\n\n    obj_p = ecma_get_object_from_value (object);\n#else /* !ENABLED (JERRY_ESNEXT) */\n    obj_p = ecma_get_object_from_value (arg1);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    ecma_value_t result;\n    switch (builtin_routine_id)\n    {\n      case ECMA_OBJECT_ROUTINE_GET_PROTOTYPE_OF:\n      {\n        result = ecma_builtin_object_object_get_prototype_of (obj_p);\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case ECMA_OBJECT_ROUTINE_ASSIGN:\n      {\n        result = ecma_builtin_object_object_assign (obj_p, arguments_list_p + 1, arguments_number - 1);\n        break;\n      }\n      case ECMA_OBJECT_ROUTINE_ENTRIES:\n      case ECMA_OBJECT_ROUTINE_VALUES:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case ECMA_OBJECT_ROUTINE_KEYS:\n      {\n        JERRY_ASSERT (builtin_routine_id - ECMA_OBJECT_ROUTINE_KEYS < ECMA_ENUMERABLE_PROPERTY__COUNT);\n\n        const int option = builtin_routine_id - ECMA_OBJECT_ROUTINE_KEYS;\n        result = ecma_builtin_object_object_keys_values_helper (obj_p,\n                                                                (ecma_enumerable_property_names_options_t) option);\n        break;\n      }\n      case ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_DESCRIPTOR:\n      {\n        ecma_string_t *prop_name_p = ecma_op_to_property_key (arg2);\n\n        if (prop_name_p == NULL)\n        {\n          result = ECMA_VALUE_ERROR;\n          break;\n        }\n\n        result = ecma_builtin_object_object_get_own_property_descriptor (obj_p, prop_name_p);\n        ecma_deref_ecma_string (prop_name_p);\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_DESCRIPTORS:\n      {\n        result = ecma_builtin_object_object_get_own_property_descriptors (obj_p);\n        break;\n      }\n      case ECMA_OBJECT_ROUTINE_FROM_ENTRIES:\n      {\n        result = ecma_builtin_object_from_entries (arg1);\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      default:\n      {\n        JERRY_UNREACHABLE ();\n      }\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    ecma_deref_object (obj_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n    return result;\n  }\n  else if (builtin_routine_id <= ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_SYMBOLS)\n  {\n    return ecma_op_object_get_own_property_keys (arg1, builtin_routine_id);\n  }\n  else if (builtin_routine_id <= ECMA_OBJECT_ROUTINE_SEAL)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (!ecma_is_value_object (arg1))\n    {\n      return ecma_copy_value (arg1);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    obj_p = ecma_get_object_from_value (arg1);\n    switch (builtin_routine_id)\n    {\n      case ECMA_OBJECT_ROUTINE_SEAL:\n      {\n        return ecma_builtin_object_object_seal (obj_p);\n      }\n      case ECMA_OBJECT_ROUTINE_FREEZE:\n      {\n        return ecma_builtin_object_object_freeze (obj_p);\n      }\n      case ECMA_OBJECT_ROUTINE_PREVENT_EXTENSIONS:\n      {\n        return ecma_builtin_object_object_prevent_extensions (obj_p);\n      }\n      default:\n      {\n        JERRY_UNREACHABLE ();\n      }\n    }\n  }\n  else\n  {\n    JERRY_ASSERT (builtin_routine_id <= ECMA_OBJECT_ROUTINE_IS_SEALED);\n#if ENABLED (JERRY_ESNEXT)\n    if (!ecma_is_value_object (arg1))\n    {\n      return ecma_make_boolean_value (builtin_routine_id != ECMA_OBJECT_ROUTINE_IS_EXTENSIBLE);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    obj_p = ecma_get_object_from_value (arg1);\n    switch (builtin_routine_id)\n    {\n      case ECMA_OBJECT_ROUTINE_IS_SEALED:\n      case ECMA_OBJECT_ROUTINE_IS_FROZEN:\n      {\n        return ecma_builtin_object_test_integrity_level (obj_p, builtin_routine_id);\n      }\n      case ECMA_OBJECT_ROUTINE_IS_EXTENSIBLE:\n      {\n        return ecma_builtin_object_object_is_extensible (obj_p);\n      }\n      default:\n      {\n        JERRY_UNREACHABLE ();\n      }\n    }\n  }\n} /* ecma_builtin_object_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef ECMA_BUILTIN_OBJECT_H\n#define ECMA_BUILTIN_OBJECT_H\n\necma_value_t ecma_builtin_object_object_get_prototype_of (ecma_object_t *obj_p);\n\necma_value_t ecma_builtin_object_object_set_prototype_of (ecma_value_t arg1,\n                                                          ecma_value_t arg2);\n\necma_value_t ecma_builtin_object_object_set_proto (ecma_value_t arg1,\n                                                   ecma_value_t arg2);\n\necma_value_t ecma_builtin_object_object_prevent_extensions (ecma_object_t *obj_p);\n\necma_value_t ecma_builtin_object_object_is_extensible (ecma_object_t *obj_p);\n\necma_value_t ecma_builtin_object_object_get_own_property_descriptor (ecma_object_t *obj_p,\n                                                                     ecma_string_t *name_str_p);\necma_value_t ecma_builtin_object_object_define_property (ecma_object_t *obj_p,\n                                                         ecma_string_t *name_str_p,\n                                                         ecma_value_t arg3);\n\n#endif /* !ECMA_BUILTIN_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Object built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.2.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_OBJECT_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_GET_PROTOTYPE_OF_UL, ECMA_OBJECT_ROUTINE_GET_PROTOTYPE_OF, 1, 1)\nROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_NAMES_UL, ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_NAMES, 1, 1)\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_SYMBOLS_UL, ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_SYMBOLS, 1, 1)\n#endif /* ENABLED (JERRY_ESNEXT) */\nROUTINE (LIT_MAGIC_STRING_SEAL, ECMA_OBJECT_ROUTINE_SEAL, 1, 1)\nROUTINE (LIT_MAGIC_STRING_FREEZE, ECMA_OBJECT_ROUTINE_FREEZE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_PREVENT_EXTENSIONS_UL, ECMA_OBJECT_ROUTINE_PREVENT_EXTENSIONS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_SEALED_UL, ECMA_OBJECT_ROUTINE_IS_SEALED, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_FROZEN_UL, ECMA_OBJECT_ROUTINE_IS_FROZEN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_EXTENSIBLE, ECMA_OBJECT_ROUTINE_IS_EXTENSIBLE, 1, 1)\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_ENTRIES, ECMA_OBJECT_ROUTINE_ENTRIES, 1, 1)\nROUTINE (LIT_MAGIC_STRING_VALUES, ECMA_OBJECT_ROUTINE_VALUES, 1, 1)\n#endif /* ENABLED (JERRY_ESNEXT) */\nROUTINE (LIT_MAGIC_STRING_KEYS, ECMA_OBJECT_ROUTINE_KEYS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL, ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_DESCRIPTOR, 2, 2)\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTORS_UL, ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_DESCRIPTORS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_OBJECT_FROM_ENTRIES, ECMA_OBJECT_ROUTINE_FROM_ENTRIES, 1, 1)\n#endif /* ENABLED (JERRY_ESNEXT) */\nROUTINE (LIT_MAGIC_STRING_CREATE, ECMA_OBJECT_ROUTINE_CREATE, 2, 2)\nROUTINE (LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL, ECMA_OBJECT_ROUTINE_DEFINE_PROPERTIES, 2, 2)\nROUTINE (LIT_MAGIC_STRING_DEFINE_PROPERTY_UL, ECMA_OBJECT_ROUTINE_DEFINE_PROPERTY, 3, 3)\n\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_SET_PROTOTYPE_OF_UL, ECMA_OBJECT_ROUTINE_SET_PROTOTYPE_OF, 2, 2)\nROUTINE (LIT_MAGIC_STRING_ASSIGN, ECMA_OBJECT_ROUTINE_ASSIGN, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_IS, ECMA_OBJECT_ROUTINE_IS, 2, 2)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-promise-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_PROMISE_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_PROMISE_PROTOTYPE_ROUTINE_THEN,\n  ECMA_PROMISE_PROTOTYPE_ROUTINE_CATCH,\n  ECMA_PROMISE_PROTOTYPE_ROUTINE_FINALLY\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-promise-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID promise_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup promiseprototype ECMA Promise.prototype object built-in\n * @{\n */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_promise_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                                 ecma_value_t this_arg, /**< 'this' argument value */\n                                                 const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                         *   passed to routine */\n                                                 uint32_t arguments_number) /**< length of arguments' list */\n{\n  ecma_value_t arg_1 = (arguments_number > 0) ? arguments_list_p[0] : ECMA_VALUE_UNDEFINED;\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_PROMISE_PROTOTYPE_ROUTINE_THEN:\n    {\n      ecma_value_t arg_2 = (arguments_number > 1) ? arguments_list_p[1] : ECMA_VALUE_UNDEFINED;\n      return ecma_promise_then (this_arg, arg_1, arg_2);\n    }\n    case ECMA_PROMISE_PROTOTYPE_ROUTINE_CATCH:\n    {\n      ecma_value_t args[] = {ECMA_VALUE_UNDEFINED, arg_1};\n      return ecma_op_invoke_by_magic_id (this_arg, LIT_MAGIC_STRING_THEN, args, 2);\n    }\n    case ECMA_PROMISE_PROTOTYPE_ROUTINE_FINALLY:\n    {\n      return ecma_promise_finally (this_arg, arg_1);\n    }\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_builtin_promise_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_PROMISE,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v6, 25.4.5.4 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_PROMISE_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nROUTINE (LIT_MAGIC_STRING_THEN, ECMA_PROMISE_PROTOTYPE_ROUTINE_THEN, 2, 2)\nROUTINE (LIT_MAGIC_STRING_CATCH, ECMA_PROMISE_PROTOTYPE_ROUTINE_CATCH, 1, 1)\nROUTINE (LIT_MAGIC_STRING_FINALLY, ECMA_PROMISE_PROTOTYPE_ROUTINE_FINALLY, 1, 1)\n\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtin-handlers.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-number-object.h\"\n#include \"ecma-promise-object.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_PROMISE_ROUTINE_START = 0,\n  ECMA_PROMISE_ROUTINE_REJECT,\n  ECMA_PROMISE_ROUTINE_RESOLVE,\n  ECMA_PROMISE_ROUTINE_RACE,\n  ECMA_PROMISE_ROUTINE_ALL,\n  ECMA_PROMISE_ROUTINE_SPECIES_GET\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-promise.inc.h\"\n#define BUILTIN_UNDERSCORED_ID promise\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup promise ECMA Promise object built-in\n * @{\n */\n\n/**\n * Reject the promise if the value is error.\n *\n * See also:\n *         ES2015 25.4.1.1.1\n *\n * @return ecma value of the new promise.\n *         Returned value must be freed with ecma_free_value.\n */\ninline static ecma_value_t\necma_builtin_promise_reject_abrupt (ecma_value_t value, /**< value */\n                                    ecma_object_t *capability_obj_p) /**< capability */\n{\n  JERRY_ASSERT (ecma_object_class_is (capability_obj_p, LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY));\n\n  if (!ECMA_IS_VALUE_ERROR (value))\n  {\n    return value;\n  }\n\n  ecma_value_t reason = jcontext_take_exception ();\n\n  ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;\n  ecma_value_t call_ret = ecma_op_function_call (ecma_get_object_from_value (capability_p->reject),\n                                                 ECMA_VALUE_UNDEFINED,\n                                                 &reason,\n                                                 1);\n  ecma_free_value (reason);\n\n  if (ECMA_IS_VALUE_ERROR (call_ret))\n  {\n    return call_ret;\n  }\n\n  ecma_free_value (call_ret);\n\n  return ecma_copy_value (capability_p->header.u.class_prop.u.promise);\n} /* ecma_builtin_promise_reject_abrupt */\n\n/**\n * Runtime Semantics: PerformPromiseRace.\n *\n * See also:\n *         ES2020 25.6.4.4.1\n *\n * @return ecma value of the new promise.\n *         Returned value must be freed with ecma_free_value.\n */\ninline static ecma_value_t\necma_builtin_promise_perform_race (ecma_value_t iterator, /**< the iterator for race */\n                                   ecma_value_t next_method, /**< next method */\n                                   ecma_object_t *capability_obj_p, /**< PromiseCapability record */\n                                   ecma_value_t ctor, /**< Constructor value */\n                                   bool *done_p) /**< [out] iteratorRecord[[done]] */\n{\n  JERRY_ASSERT (ecma_is_value_object (iterator));\n  JERRY_ASSERT (ecma_object_class_is (capability_obj_p, LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY));\n  JERRY_ASSERT (ecma_is_constructor (ctor));\n\n  ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;\n\n  /* 3. */\n  ecma_value_t resolve = ecma_op_object_get_by_magic_id (ecma_get_object_from_value (ctor), LIT_MAGIC_STRING_RESOLVE);\n\n  if (ECMA_IS_VALUE_ERROR (resolve))\n  {\n    return resolve;\n  }\n\n  /* 4. */\n  if (!ecma_op_is_callable (resolve))\n  {\n    ecma_free_value (resolve);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Resolve method must be callable.\"));\n  }\n\n  ecma_object_t *resolve_func_p = ecma_get_object_from_value (resolve);\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n\n  /* 5. */\n  while (true)\n  {\n    /* a. */\n    ecma_value_t next = ecma_op_iterator_step (iterator, next_method);\n    /* b, c. */\n    if (ECMA_IS_VALUE_ERROR (next))\n    {\n      goto done;\n    }\n\n    /* d. */\n    if (ecma_is_value_false (next))\n    {\n      /* ii. */\n      ret_value = ecma_copy_value (capability_p->header.u.class_prop.u.promise);\n      goto done;\n    }\n\n    /* e. */\n    ecma_value_t next_val = ecma_op_iterator_value (next);\n    ecma_free_value (next);\n\n    /* f, g. */\n    if (ECMA_IS_VALUE_ERROR (next_val))\n    {\n      goto done;\n    }\n\n    /* h. */\n    ecma_value_t next_promise = ecma_op_function_call (resolve_func_p, ctor, &next_val, 1);\n    ecma_free_value (next_val);\n\n    if (ECMA_IS_VALUE_ERROR (next_promise))\n    {\n      goto exit;\n    }\n\n    /* i. */\n    ecma_value_t args[2] = {capability_p->resolve, capability_p->reject};\n    ecma_value_t result = ecma_op_invoke_by_magic_id (next_promise, LIT_MAGIC_STRING_THEN, args, 2);\n    ecma_free_value (next_promise);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto exit;\n    }\n\n    ecma_free_value (result);\n  }\n\ndone:\n  *done_p = true;\nexit:\n  ecma_deref_object (resolve_func_p);\n  return ret_value;\n} /* ecma_builtin_promise_perform_race */\n\n/**\n * Runtime Semantics: PerformPromiseAll.\n *\n * See also:\n *         ES2020 25.6.4.1.1\n *\n * @return ecma value of the new promise.\n *         Returned value must be freed with ecma_free_value.\n */\ninline static ecma_value_t\necma_builtin_promise_perform_all (ecma_value_t iterator, /**< iteratorRecord */\n                                  ecma_value_t next_method, /**< next method */\n                                  ecma_object_t *capability_obj_p,  /**< PromiseCapability record */\n                                  ecma_value_t ctor, /**< the caller of Promise.race */\n                                  bool *done_p) /**< [out] iteratorRecord[[done]] */\n{\n  /* 1. - 2. */\n  JERRY_ASSERT (ecma_object_class_is (capability_obj_p, LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY));\n  JERRY_ASSERT (ecma_is_constructor (ctor));\n\n  ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;\n\n  ecma_value_t resolve = ecma_op_object_get_by_magic_id (ecma_get_object_from_value (ctor),\n                                                         LIT_MAGIC_STRING_RESOLVE);\n\n  if (ECMA_IS_VALUE_ERROR (resolve))\n  {\n    return resolve;\n  }\n\n  if (!ecma_op_is_callable (resolve))\n  {\n    ecma_free_value (resolve);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Resolve method must be callable.\"));\n  }\n\n  ecma_object_t *resolve_func_p = ecma_get_object_from_value (resolve);\n\n  /* 3. */\n  ecma_object_t *values_array_obj_p = ecma_op_new_array_object (0);\n  ecma_value_t values_array = ecma_make_object_value (values_array_obj_p);\n  /* 4. */\n  ecma_value_t remaining = ecma_op_create_number_object (ecma_make_integer_value (1));\n  /* 5. */\n  uint32_t idx = 0;\n\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n\n  /* 6. */\n  while (true)\n  {\n    /* a. */\n    ecma_value_t next = ecma_op_iterator_step (iterator, next_method);\n    /* b. - c. */\n    if (ECMA_IS_VALUE_ERROR (next))\n    {\n      goto done;\n    }\n\n    /* d. */\n    if (ecma_is_value_false (next))\n    {\n      /* ii. - iii. */\n      if (ecma_promise_remaining_inc_or_dec (remaining, false) == 0)\n      {\n        /* 2. */\n        ecma_value_t resolve_result = ecma_op_function_call (ecma_get_object_from_value (capability_p->resolve),\n                                                             ECMA_VALUE_UNDEFINED,\n                                                             &values_array,\n                                                             1);\n        /* 3. */\n        if (ECMA_IS_VALUE_ERROR (resolve_result))\n        {\n          goto done;\n        }\n\n        ecma_free_value (resolve_result);\n      }\n\n      /* iv. */\n      ret_value = ecma_copy_value (capability_p->header.u.class_prop.u.promise);\n      goto done;\n    }\n\n    /* e. */\n    ecma_value_t next_value = ecma_op_iterator_value (next);\n    ecma_free_value (next);\n\n    /* f. - g. */\n    if (ECMA_IS_VALUE_ERROR (next_value))\n    {\n      goto done;\n    }\n\n    /* h. */\n    ecma_builtin_helper_def_prop_by_index (values_array_obj_p,\n                                           idx,\n                                           ECMA_VALUE_UNDEFINED,\n                                           ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n\n    /* i. */\n    ecma_value_t next_promise = ecma_op_function_call (resolve_func_p, ctor, &next_value, 1);\n    ecma_free_value (next_value);\n\n    /* j. */\n    if (ECMA_IS_VALUE_ERROR (next_promise))\n    {\n      goto exit;\n    }\n\n    if (JERRY_UNLIKELY (idx == UINT32_MAX - 1))\n    {\n      ecma_raise_range_error (ECMA_ERR_MSG (\"Promise.all remaining elements limit reached.\"));\n      goto exit;\n    }\n\n    /* k. */\n    ecma_object_t *executor_func_p = ecma_op_create_native_handler (ECMA_NATIVE_HANDLER_PROMISE_ALL_HELPER,\n                                                                    sizeof (ecma_promise_all_executor_t));\n\n    ecma_promise_all_executor_t *executor_p = (ecma_promise_all_executor_t *) executor_func_p;\n\n    /* m. + t. */\n    executor_p->index = ++idx;\n\n    /* n. */\n    executor_p->values = values_array;\n\n    /* o. */\n    executor_p->capability = ecma_make_object_value (capability_obj_p);\n\n    /* p. */\n    executor_p->remaining_elements = remaining;\n\n    /* q. */\n    ecma_promise_remaining_inc_or_dec (remaining, true);\n\n    /* r. */\n    ecma_value_t args[2];\n    args[0] = ecma_make_object_value (executor_func_p);\n    args[1] = capability_p->reject;\n    ecma_value_t result = ecma_op_invoke_by_magic_id (next_promise, LIT_MAGIC_STRING_THEN, args, 2);\n    ecma_free_value (next_promise);\n    ecma_deref_object (executor_func_p);\n\n    /* s. */\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto exit;\n    }\n\n    ecma_free_value (result);\n  }\n\ndone:\n  *done_p = true;\nexit:\n  ecma_free_value (remaining);\n  ecma_deref_object (values_array_obj_p);\n  ecma_deref_object (resolve_func_p);\n\n  return ret_value;\n} /* ecma_builtin_promise_perform_all */\n\n/**\n * The common function for both Promise.race and Promise.all.\n *\n * @return ecma value of the new promise.\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_promise_race_or_all (ecma_value_t this_arg, /**< 'this' argument */\n                                  ecma_value_t iterable, /**< the items to be resolved */\n                                  bool is_race) /**< indicates whether it is race function */\n{\n  ecma_object_t *capability_obj_p = ecma_promise_new_capability (this_arg);\n\n  if (JERRY_UNLIKELY (capability_obj_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t next_method;\n  ecma_value_t iterator = ecma_op_get_iterator (iterable, ECMA_VALUE_SYNC_ITERATOR, &next_method);\n  iterator = ecma_builtin_promise_reject_abrupt (iterator, capability_obj_p);\n\n  if (ECMA_IS_VALUE_ERROR (iterator))\n  {\n    ecma_deref_object (capability_obj_p);\n    return iterator;\n  }\n\n  ecma_value_t ret = ECMA_VALUE_EMPTY;\n  bool is_done = false;\n\n  if (is_race)\n  {\n    ret = ecma_builtin_promise_perform_race (iterator, next_method, capability_obj_p, this_arg, &is_done);\n  }\n  else\n  {\n    ret = ecma_builtin_promise_perform_all (iterator, next_method, capability_obj_p, this_arg, &is_done);\n  }\n\n  if (ECMA_IS_VALUE_ERROR (ret))\n  {\n    if (!is_done)\n    {\n      ret = ecma_op_iterator_close (iterator);\n    }\n\n    ret = ecma_builtin_promise_reject_abrupt (ret, capability_obj_p);\n  }\n\n  ecma_free_value (iterator);\n  ecma_free_value (next_method);\n  ecma_deref_object (capability_obj_p);\n\n  return ret;\n} /* ecma_builtin_promise_race_or_all */\n\n/**\n * Handle calling [[Call]] of built-in Promise object.\n *\n * ES2015 25.4.3 Promise is not intended to be called\n * as a function and will throw an exception when called\n * in that manner.\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_promise_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                    uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructor Promise requires 'new'.\"));\n} /* ecma_builtin_promise_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Promise object.\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_promise_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  if (arguments_list_len == 0 || !ecma_op_is_callable (arguments_list_p[0]))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"First parameter must be callable.\"));\n  }\n\n  return ecma_op_create_promise_object (arguments_list_p[0], ECMA_PROMISE_EXECUTOR_FUNCTION);\n} /* ecma_builtin_promise_dispatch_construct */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_promise_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine\n                                                                    *   identifier */\n                                       ecma_value_t this_arg, /**< 'this' argument value */\n                                       const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                               *   passed to routine */\n                                       uint32_t arguments_number) /**< length of arguments' list */\n{\n  ecma_value_t argument = (arguments_number > 0) ? arguments_list_p[0] : ECMA_VALUE_UNDEFINED;\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_PROMISE_ROUTINE_REJECT:\n    case ECMA_PROMISE_ROUTINE_RESOLVE:\n    {\n      bool is_resolve = (builtin_routine_id == ECMA_PROMISE_ROUTINE_RESOLVE);\n      return ecma_promise_reject_or_resolve (this_arg, argument, is_resolve);\n    }\n    case ECMA_PROMISE_ROUTINE_RACE:\n    case ECMA_PROMISE_ROUTINE_ALL:\n    {\n      bool is_race = (builtin_routine_id == ECMA_PROMISE_ROUTINE_RACE);\n      return ecma_builtin_promise_race_or_all (this_arg, argument, is_race);\n    }\n    case ECMA_PROMISE_ROUTINE_SPECIES_GET:\n    {\n      return ecma_copy_value (this_arg);\n    }\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_builtin_promise_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Promose built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_PROMISE_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_PROMISE_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_REJECT, ECMA_PROMISE_ROUTINE_REJECT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_RESOLVE, ECMA_PROMISE_ROUTINE_RESOLVE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_RACE, ECMA_PROMISE_ROUTINE_RACE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ALL, ECMA_PROMISE_ROUTINE_ALL, 1, 1)\n\n/* ES2015 25.4.4.6 */\nACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,\n                    ECMA_PROMISE_ROUTINE_SPECIES_GET,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-proxy.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-proxy-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-proxy.inc.h\"\n#define BUILTIN_UNDERSCORED_ID proxy\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup proxy ECMA Proxy object built-in\n * @{\n */\n\n/**\n * The Proxy object's 'revocable' routine\n *\n * See also:\n *         ES2015 26.2.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_proxy_object_revocable (ecma_value_t this_arg, /**< 'this' argument */\n                                     ecma_value_t target, /**< target argument */\n                                     ecma_value_t handler) /**< handler argument */\n{\n  JERRY_UNUSED (this_arg);\n\n  ecma_object_t *rev_proxy_p = ecma_proxy_create_revocable (target, handler);\n\n  if (JERRY_UNLIKELY (rev_proxy_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  return ecma_make_object_value (rev_proxy_p);\n} /* ecma_builtin_proxy_object_revocable */\n\n/**\n * Handle calling [[Call]] of built-in Proxy object\n *\n * See also:\n *          ES2015 26.2.2\n *\n * @return raised error\n */\necma_value_t\necma_builtin_proxy_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                  uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  /* 1. */\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructor Proxy requires 'new'\"));\n} /* ecma_builtin_proxy_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in proxy object\n *\n * See also:\n *          ES2015 26.2.2\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         new proxy object - otherwise\n */\necma_value_t\necma_builtin_proxy_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                       uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  /* 2. */\n  ecma_object_t *proxy_p = ecma_proxy_create (arguments_list_len > 0 ? arguments_list_p[0] : ECMA_VALUE_UNDEFINED,\n                                              arguments_list_len > 1 ? arguments_list_p[1] : ECMA_VALUE_UNDEFINED);\n\n  if (JERRY_UNLIKELY (proxy_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  return ecma_make_object_value (proxy_p);\n} /* ecma_builtin_proxy_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-proxy.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Proxy object built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              2,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_PROXY_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\n\nROUTINE (LIT_MAGIC_STRING_REVOCABLE, ecma_builtin_proxy_object_revocable, 2, 2)\n\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-rangeerror-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID range_error_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * RangeError.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.7.8 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_RANGE_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.9 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_RANGE_ERROR_UL,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.10 */\nSTRING_VALUE (LIT_MAGIC_STRING_MESSAGE,\n              LIT_MAGIC_STRING__EMPTY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-function-object.h\"\n#include \"jrt.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-rangeerror.inc.h\"\n#define BUILTIN_UNDERSCORED_ID range_error\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup rangeerror ECMA RangeError object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in RangeError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_range_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_RANGE, arguments_list_p, arguments_list_len);\n} /* ecma_builtin_range_error_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in RangeError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_range_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                             uint32_t arguments_list_len) /**< number of arguments */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  return ecma_builtin_range_error_dispatch_call (arguments_list_p, arguments_list_len);\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE);\n\n  if (proto_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_builtin_range_error_dispatch_call (arguments_list_p, arguments_list_len);\n\n  if (!ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (result);\n    ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, proto_p);\n  }\n\n  ecma_deref_object (proto_p);\n\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_range_error_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * RangeError built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_RANGE_ERROR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-referenceerror-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID reference_error_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * ReferenceError.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.7.8 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_REFERENCE_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.9 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_REFERENCE_ERROR_UL,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.10 */\nSTRING_VALUE (LIT_MAGIC_STRING_MESSAGE,\n              LIT_MAGIC_STRING__EMPTY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-function-object.h\"\n#include \"jrt.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-referenceerror.inc.h\"\n#define BUILTIN_UNDERSCORED_ID reference_error\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup referenceerror ECMA ReferenceError object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in ReferenceError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_reference_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                            uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_REFERENCE, arguments_list_p, arguments_list_len);\n} /* ecma_builtin_reference_error_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in ReferenceError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_reference_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                 uint32_t arguments_list_len) /**< number of arguments */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  return ecma_builtin_reference_error_dispatch_call (arguments_list_p, arguments_list_len);\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE);\n\n  if (proto_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_builtin_reference_error_dispatch_call (arguments_list_p, arguments_list_len);\n\n  if (!ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (result);\n    ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, proto_p);\n  }\n\n  ecma_deref_object (proto_p);\n\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_reference_error_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * ReferenceError built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_REFERENCE_ERROR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-reflect.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-function-prototype.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtin-object.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-proxy-object.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_REFLECT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_REFLECT_OBJECT_ROUTINE_START = 0,\n  ECMA_REFLECT_OBJECT_GET, /* ECMA-262 v6, 26.1.6 */\n  ECMA_REFLECT_OBJECT_SET, /* ECMA-262 v6, 26.1.13 */\n  ECMA_REFLECT_OBJECT_HAS, /* ECMA-262 v6, 26.1.9 */\n  ECMA_REFLECT_OBJECT_DELETE_PROPERTY, /* ECMA-262 v6, 26.1.4 */\n  ECMA_REFLECT_OBJECT_CONSTRUCT, /* ECMA-262, 26.1.2 */\n  ECMA_REFLECT_OBJECT_OWN_KEYS, /* ECMA-262 v6, 26.1.11 */\n  ECMA_REFLECT_OBJECT_GET_PROTOTYPE_OF, /* ECMA-262 v6, 26.1.8 */\n  ECMA_REFLECT_OBJECT_SET_PROTOTYPE_OF, /* ECMA-262 v6, 26.1.14 */\n  ECMA_REFLECT_OBJECT_APPLY, /* ECMA-262 v6, 26.1.1 */\n  ECMA_REFLECT_OBJECT_DEFINE_PROPERTY, /* ECMA-262 v6, 26.1.3 */\n  ECMA_REFLECT_OBJECT_GET_OWN_PROPERTY_DESCRIPTOR, /* ECMA-262 v6, 26.1.7 */\n  ECMA_REFLECT_OBJECT_IS_EXTENSIBLE, /* ECMA-262 v6, 26.1.10 */\n  ECMA_REFLECT_OBJECT_PREVENT_EXTENSIONS, /* ECMA-262 v6, 26.1.12 */\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-reflect.inc.h\"\n#define BUILTIN_UNDERSCORED_ID reflect\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup object ECMA Reflect object built-in\n * @{\n */\n\n/**\n * Dispatcher for the built-in's routines.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_reflect_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                       ecma_value_t this_arg, /**< 'this' argument value */\n                                       const ecma_value_t arguments_list[], /**< list of arguments\n                                                                             *   passed to routine */\n                                       uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (this_arg);\n  JERRY_UNUSED (arguments_number);\n\n  if (builtin_routine_id < ECMA_REFLECT_OBJECT_CONSTRUCT)\n  {\n    /* 1. */\n    if (arguments_number == 0 || !ecma_is_value_object (arguments_list[0]))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not an Object.\"));\n    }\n\n    /* 2. */\n    ecma_string_t *name_str_p = ecma_op_to_property_key (((arguments_number > 1) ? arguments_list[1]\n                                                                                 : ECMA_VALUE_UNDEFINED));\n\n    /* 3. */\n    if (name_str_p == NULL)\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_value_t ret_value;\n    ecma_object_t *target_p = ecma_get_object_from_value (arguments_list[0]);\n    switch (builtin_routine_id)\n    {\n      case ECMA_REFLECT_OBJECT_GET:\n      {\n        ecma_value_t receiver = arguments_list[0];\n\n        /* 4. */\n        if (arguments_number > 2)\n        {\n          receiver = arguments_list[2];\n        }\n\n        ret_value = ecma_op_object_get_with_receiver (target_p, name_str_p, receiver);\n        break;\n      }\n\n      case ECMA_REFLECT_OBJECT_HAS:\n      {\n        ret_value = ecma_op_object_has_property (target_p, name_str_p);\n        break;\n      }\n\n      case ECMA_REFLECT_OBJECT_DELETE_PROPERTY:\n      {\n        ret_value = ecma_op_object_delete (target_p, name_str_p, false);\n        break;\n      }\n\n      default:\n      {\n        JERRY_ASSERT (builtin_routine_id == ECMA_REFLECT_OBJECT_SET);\n\n        ecma_value_t receiver = arguments_list[0];\n\n        if (arguments_number > 3)\n        {\n          receiver = arguments_list[3];\n        }\n\n        ret_value = ecma_op_object_put_with_receiver (target_p, name_str_p, arguments_list[2], receiver, false);\n        break;\n      }\n    }\n\n    ecma_deref_ecma_string (name_str_p);\n    return ret_value;\n  }\n\n  if (builtin_routine_id == ECMA_REFLECT_OBJECT_OWN_KEYS)\n  {\n    /* 1. */\n    if (arguments_number == 0 || !ecma_is_value_object (arguments_list[0]))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not an Object.\"));\n    }\n\n    ecma_object_t *target_p = ecma_get_object_from_value (arguments_list[0]);\n\n    /* 2. */\n    ecma_collection_t *prop_names = ecma_op_object_own_property_keys (target_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (prop_names == NULL)\n    {\n      return ECMA_VALUE_ERROR;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    /* 3. */\n    return ecma_op_new_array_object_from_collection (prop_names, false);\n  }\n\n  if (builtin_routine_id == ECMA_REFLECT_OBJECT_CONSTRUCT)\n  {\n    /* 1. */\n    if (arguments_number < 1 || !ecma_is_constructor (arguments_list[0]))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Target is not a constructor\"));\n    }\n\n    ecma_object_t *target_p = ecma_get_object_from_value (arguments_list[0]);\n\n    /* 2. */\n    ecma_object_t *new_target_p = target_p;\n\n    if (arguments_number > 2)\n    {\n      /* 3. */\n      if (!ecma_is_constructor (arguments_list[2]))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Target is not a constructor\"));\n      }\n\n      new_target_p = ecma_get_object_from_value (arguments_list[2]);\n    }\n\n    /* 4. */\n    if (arguments_number < 2)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Reflect.construct requires the second argument be an object\"));\n    }\n\n    ecma_collection_t *coll_p = ecma_op_create_list_from_array_like (arguments_list[1], false);\n\n    if (coll_p == NULL)\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_value_t ret_value = ecma_op_function_construct (target_p,\n                                                         new_target_p,\n                                                         coll_p->buffer_p,\n                                                         coll_p->item_count);\n\n    ecma_collection_free (coll_p);\n    return ret_value;\n  }\n\n  if (!ecma_is_value_object (arguments_list[0]))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not an Object.\"));\n  }\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_REFLECT_OBJECT_GET_PROTOTYPE_OF:\n    {\n      return ecma_builtin_object_object_get_prototype_of (ecma_get_object_from_value (arguments_list[0]));\n    }\n    case ECMA_REFLECT_OBJECT_SET_PROTOTYPE_OF:\n    {\n      if (!ecma_is_value_object (arguments_list[1]) && !ecma_is_value_null (arguments_list[1]))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"proto is neither Object nor Null.\"));\n      }\n\n      ecma_object_t *obj_p = ecma_get_object_from_value (arguments_list[0]);\n      ecma_value_t status;\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      if (ECMA_OBJECT_IS_PROXY (obj_p))\n      {\n        status = ecma_proxy_object_set_prototype_of (obj_p, arguments_list[1]);\n      }\n      else\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n      {\n        status = ecma_op_ordinary_object_set_prototype_of (obj_p, arguments_list[1]);\n      }\n\n      return status;\n    }\n    case ECMA_REFLECT_OBJECT_APPLY:\n    {\n      if (!ecma_op_is_callable (arguments_list[0]))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not a function.\"));\n      }\n\n      ecma_object_t *func_obj_p = ecma_get_object_from_value (arguments_list[0]);\n      return ecma_builtin_function_prototype_object_apply (func_obj_p, arguments_list[1], arguments_list[2]);\n    }\n    case ECMA_REFLECT_OBJECT_DEFINE_PROPERTY:\n    {\n      ecma_object_t *obj_p = ecma_get_object_from_value (arguments_list[0]);\n      ecma_string_t *name_str_p = ecma_op_to_property_key (arguments_list[1]);\n\n      if (name_str_p == NULL)\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      ecma_property_descriptor_t prop_desc;\n      ecma_value_t conv_result = ecma_op_to_property_descriptor (arguments_list[2], &prop_desc);\n\n      if (ECMA_IS_VALUE_ERROR (conv_result))\n      {\n        ecma_deref_ecma_string (name_str_p);\n        return conv_result;\n      }\n\n      ecma_value_t result = ecma_op_object_define_own_property (obj_p,\n                                                                name_str_p,\n                                                                &prop_desc);\n\n      ecma_deref_ecma_string (name_str_p);\n      ecma_free_property_descriptor (&prop_desc);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        return result;\n      }\n\n      bool boolean_result = ecma_op_to_boolean (result);\n\n      return ecma_make_boolean_value (boolean_result);\n    }\n    case ECMA_REFLECT_OBJECT_GET_OWN_PROPERTY_DESCRIPTOR:\n    {\n      ecma_object_t *obj_p = ecma_get_object_from_value (arguments_list[0]);\n      ecma_string_t *name_str_p = ecma_op_to_property_key (arguments_list[1]);\n\n      if (name_str_p == NULL)\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      ecma_value_t ret_val = ecma_builtin_object_object_get_own_property_descriptor (obj_p, name_str_p);\n      ecma_deref_ecma_string (name_str_p);\n      return ret_val;\n    }\n    case ECMA_REFLECT_OBJECT_IS_EXTENSIBLE:\n    {\n      ecma_object_t *obj_p = ecma_get_object_from_value (arguments_list[0]);\n      return ecma_builtin_object_object_is_extensible (obj_p);\n    }\n    default:\n    {\n      JERRY_ASSERT (builtin_routine_id == ECMA_REFLECT_OBJECT_PREVENT_EXTENSIONS);\n      ecma_object_t *obj_p = ecma_get_object_from_value (arguments_list[0]);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      if (ECMA_OBJECT_IS_PROXY (obj_p))\n      {\n        return ecma_proxy_object_prevent_extensions (obj_p);\n      }\n#endif /* !ENABLED (JERRY_BUILTIN_PROXY) */\n\n      ecma_op_ordinary_object_prevent_extensions (obj_p);\n\n      return ECMA_VALUE_TRUE;\n    }\n  }\n} /* ecma_builtin_reflect_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REFLECT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-reflect.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_REFLECT)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_APPLY, ECMA_REFLECT_OBJECT_APPLY, 3, 3)\nROUTINE (LIT_MAGIC_STRING_DEFINE_PROPERTY_UL, ECMA_REFLECT_OBJECT_DEFINE_PROPERTY, 3, 3)\nROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL, ECMA_REFLECT_OBJECT_GET_OWN_PROPERTY_DESCRIPTOR, 2, 2)\nROUTINE (LIT_MAGIC_STRING_GET, ECMA_REFLECT_OBJECT_GET, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_SET, ECMA_REFLECT_OBJECT_SET, NON_FIXED, 3)\nROUTINE (LIT_MAGIC_STRING_HAS, ECMA_REFLECT_OBJECT_HAS, 2, 2)\nROUTINE (LIT_MAGIC_STRING_DELETE_PROPERTY_UL, ECMA_REFLECT_OBJECT_DELETE_PROPERTY, 2, 2)\nROUTINE (LIT_MAGIC_STRING_OWN_KEYS_UL, ECMA_REFLECT_OBJECT_OWN_KEYS, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_CONSTRUCT, ECMA_REFLECT_OBJECT_CONSTRUCT, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_GET_PROTOTYPE_OF_UL, ECMA_REFLECT_OBJECT_GET_PROTOTYPE_OF, 1, 1)\nROUTINE (LIT_MAGIC_STRING_IS_EXTENSIBLE, ECMA_REFLECT_OBJECT_IS_EXTENSIBLE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_PREVENT_EXTENSIONS_UL, ECMA_REFLECT_OBJECT_PREVENT_EXTENSIONS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SET_PROTOTYPE_OF_UL, ECMA_REFLECT_OBJECT_SET_PROTOTYPE_OF, 2, 2)\n\n#endif /* ENABLED (JERRY_BUILTIN_REFLECT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-regexp-object.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n#include \"ecma-regexp-object.h\"\n#include \"re-compiler.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n #define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  /** These routines must be in this order */\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_EXEC,\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_COMPILE,\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_TEST,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_TO_STRING,\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_SOURCE,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_FLAGS,\n\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_GLOBAL,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_IGNORE_CASE,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_MULTILINE,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_STICKY,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_UNICODE,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_DOT_ALL,\n\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_SEARCH,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_MATCH,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_REPLACE,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_SPLIT,\n  ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_MATCH_ALL,\n#endif /* ENABLED (JERRY_ESNEXT) */\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-regexp-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID regexp_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup regexpprototype ECMA RegExp.prototype object built-in\n * @{\n */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Helper function to retrieve the flags associated with a RegExp object\n *\n * @return ECMA_VALUE_{TRUE,FALSE} depends on whether the given flag is present.\n */\nstatic ecma_value_t\necma_builtin_regexp_prototype_flags_helper (ecma_extended_object_t *re_obj_p, /**< this object */\n                                            uint16_t builtin_routine_id) /**< id of the flag */\n{\n  re_compiled_code_t *bc_p = ECMA_GET_INTERNAL_VALUE_POINTER (re_compiled_code_t,\n                                                              re_obj_p->u.class_prop.u.value);\n\n  uint16_t flags = bc_p->header.status_flags;\n\n  static const uint8_t re_flags[] =\n  {\n    RE_FLAG_GLOBAL,\n    RE_FLAG_IGNORE_CASE,\n    RE_FLAG_MULTILINE,\n    RE_FLAG_STICKY,\n    RE_FLAG_UNICODE,\n    RE_FLAG_DOTALL,\n  };\n\n  uint16_t offset = (uint16_t) (builtin_routine_id - ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_GLOBAL);\n  return ecma_make_boolean_value ((flags & re_flags[offset]) != 0);\n} /* ecma_builtin_regexp_prototype_flags_helper */\n\n/**\n * The RegExp.prototype object's 'flags' accessor property\n *\n * See also:\n *          ECMA-262 v6, 21.2.5.3\n *\n * @return ECMA_VALUE_ERROR - if 'this' is not a RegExp object\n *         string value     - otherwise\n *\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_regexp_prototype_get_flags (ecma_object_t *object_p) /**< this object */\n{\n  static const lit_magic_string_id_t flag_lit_ids[] =\n  {\n    LIT_MAGIC_STRING_GLOBAL,\n    LIT_MAGIC_STRING_IGNORECASE_UL,\n    LIT_MAGIC_STRING_MULTILINE,\n    LIT_MAGIC_STRING_DOTALL,\n    LIT_MAGIC_STRING_UNICODE,\n    LIT_MAGIC_STRING_STICKY\n  };\n\n  static const lit_utf8_byte_t flag_chars[] =\n  {\n    LIT_CHAR_LOWERCASE_G,\n    LIT_CHAR_LOWERCASE_I,\n    LIT_CHAR_LOWERCASE_M,\n    LIT_CHAR_LOWERCASE_S,\n    LIT_CHAR_LOWERCASE_U,\n    LIT_CHAR_LOWERCASE_Y\n  };\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n  for (uint32_t i = 0; i < sizeof (flag_lit_ids) / sizeof (lit_magic_string_id_t); i++)\n  {\n    ecma_value_t result = ecma_op_object_get_by_magic_id (object_p, flag_lit_ids[i]);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return result;\n    }\n\n    if (ecma_op_to_boolean (result))\n    {\n      ecma_stringbuilder_append_byte (&builder, flag_chars[i]);\n    }\n\n    ecma_free_value (result);\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_regexp_prototype_get_flags */\n\n/**\n * The EscapeRegExpPattern method.\n *\n * See also:\n *          ECMA-262 v6, 21.2.3.2.4\n *\n * @return ecma_value_t\n */\nstatic ecma_value_t\necma_op_escape_regexp_pattern (ecma_string_t *pattern_str_p) /**< RegExp pattern */\n{\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  ECMA_STRING_TO_UTF8_STRING (pattern_str_p, pattern_start_p, pattern_start_size);\n\n  const lit_utf8_byte_t *pattern_str_curr_p = pattern_start_p;\n  const lit_utf8_byte_t *pattern_str_end_p = pattern_start_p + pattern_start_size;\n\n  while (pattern_str_curr_p < pattern_str_end_p)\n  {\n    ecma_char_t c = lit_cesu8_read_next (&pattern_str_curr_p);\n\n    switch (c)\n    {\n      case LIT_CHAR_SLASH:\n      {\n        ecma_stringbuilder_append_raw (&builder, (const lit_utf8_byte_t *) \"\\\\/\", 2);\n        break;\n      }\n      case LIT_CHAR_LF:\n      {\n        ecma_stringbuilder_append_raw (&builder, (const lit_utf8_byte_t *) \"\\\\n\", 2);\n        break;\n      }\n      case LIT_CHAR_CR:\n      {\n        ecma_stringbuilder_append_raw (&builder, (const lit_utf8_byte_t *) \"\\\\r\", 2);\n        break;\n      }\n      case LIT_CHAR_LS:\n      {\n        ecma_stringbuilder_append_raw (&builder, (const lit_utf8_byte_t *) \"\\\\u2028\", 6);\n        break;\n      }\n      case LIT_CHAR_PS:\n      {\n        ecma_stringbuilder_append_raw (&builder, (const lit_utf8_byte_t *) \"\\\\u2029\", 6);\n        break;\n      }\n      case LIT_CHAR_BACKSLASH:\n      {\n        JERRY_ASSERT (pattern_str_curr_p < pattern_str_end_p);\n        ecma_stringbuilder_append_char (&builder, LIT_CHAR_BACKSLASH);\n        ecma_stringbuilder_append_char (&builder, lit_cesu8_read_next (&pattern_str_curr_p));\n        break;\n      }\n      default:\n      {\n        ecma_stringbuilder_append_char (&builder, c);\n        break;\n      }\n    }\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (pattern_start_p, pattern_start_size);\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_op_escape_regexp_pattern */\n\n/**\n * The RegExp.prototype object's 'source' accessor property\n *\n * See also:\n *          ECMA-262 v6, 21.2.5.10\n *\n * @return ECMA_VALUE_ERROR - if 'this' is not a RegExp object\n *         string value     - otherwise\n *\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_regexp_prototype_get_source (ecma_extended_object_t *re_obj_p) /**< this argument */\n{\n  re_compiled_code_t *bc_p = ECMA_GET_INTERNAL_VALUE_POINTER (re_compiled_code_t,\n                                                              re_obj_p->u.class_prop.u.value);\n\n  return ecma_op_escape_regexp_pattern (ecma_get_string_from_value (bc_p->source));\n} /* ecma_builtin_regexp_prototype_get_source */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n/**\n * The RegExp.prototype object's 'compile' routine\n *\n * See also:\n *          ECMA-262 v11, B.2.5.1\n *\n * @return undefined        - if compiled successfully\n *         error ecma value - otherwise\n *\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_regexp_prototype_compile (ecma_value_t this_arg, /**< this */\n                                       ecma_value_t pattern_arg, /**< pattern or RegExp object */\n                                       ecma_value_t flags_arg) /**< flags */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  if (ecma_get_object_from_value (this_arg) == ecma_builtin_get (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a RegExp object\"));\n  }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *this_obj_p = ecma_get_object_from_value (this_arg);\n  ecma_extended_object_t *re_obj_p = (ecma_extended_object_t *) this_obj_p;\n  re_compiled_code_t *old_bc_p = ECMA_GET_INTERNAL_VALUE_POINTER (re_compiled_code_t,\n                                                                  re_obj_p->u.class_prop.u.value);\n\n  ecma_value_t ret_value;\n\n  if (ecma_object_is_regexp_object (pattern_arg))\n  {\n    if (!ecma_is_value_undefined (flags_arg))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument\"));\n    }\n\n    ecma_extended_object_t *pattern_obj_p = (ecma_extended_object_t *) ecma_get_object_from_value (pattern_arg);\n    re_compiled_code_t *bc_p = ECMA_GET_INTERNAL_VALUE_POINTER (re_compiled_code_t,\n                                                                pattern_obj_p->u.class_prop.u.value);\n\n    ret_value = ecma_op_create_regexp_from_bytecode (this_obj_p, bc_p);\n  }\n  else\n  {\n    ret_value = ecma_op_create_regexp_from_pattern (this_obj_p, pattern_arg, flags_arg);\n  }\n\n  if (!ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    ecma_value_t status = ecma_builtin_helper_def_prop (this_obj_p,\n                                                        ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                                        ecma_make_uint32_value (0),\n                                                        ECMA_PROPERTY_FLAG_WRITABLE | ECMA_PROP_IS_THROW);\n\n    ecma_bytecode_deref ((ecma_compiled_code_t *) old_bc_p);\n\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      return status;\n    }\n\n    ecma_ref_object (this_obj_p);\n  }\n\n  return ret_value;\n} /* ecma_builtin_regexp_prototype_compile */\n\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n/**\n * The RegExp.prototype object's 'exec' routine\n *\n * See also:\n *          ECMA-262 v5, 15.10.6.2\n *\n * @return array object containing the results - if the matched\n *         null                                - otherwise\n *\n *         May raise error, so returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_regexp_prototype_exec (ecma_value_t this_arg, /**< this argument */\n                                    ecma_value_t arg) /**< routine's argument */\n{\n  ecma_value_t obj_this = ecma_op_to_object (this_arg);\n  if (ECMA_IS_VALUE_ERROR (obj_this))\n  {\n    return obj_this;\n  }\n\n  ecma_string_t *input_str_p = ecma_op_to_string (arg);\n  if (JERRY_UNLIKELY (input_str_p == NULL))\n  {\n    ecma_free_value (obj_this);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t ret_value = ecma_regexp_exec_helper (ecma_get_object_from_value (obj_this), input_str_p);\n\n  ecma_free_value (obj_this);\n  ecma_deref_ecma_string (input_str_p);\n\n  return ret_value;\n} /* ecma_builtin_regexp_prototype_exec */\n\n/**\n * The RegExp.prototype object's 'test' routine\n *\n * See also:\n *          ECMA-262 v5, 15.10.6.3\n *          ECMA-262 v6, 21.2.5.13\n *\n * @return true  - if match is not null\n *         false - otherwise\n *\n *         May raise error, so returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_regexp_prototype_test (ecma_value_t this_arg, /**< this argument */\n                                    ecma_value_t arg) /**< routine's argument */\n{\n#if ENABLED (JERRY_ESNEXT)\n  ecma_string_t *arg_str_p = ecma_op_to_string (arg);\n\n  if (JERRY_UNLIKELY (arg_str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_op_regexp_exec (this_arg, arg_str_p);\n\n  ecma_deref_ecma_string (arg_str_p);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_value_t result = ecma_builtin_regexp_prototype_exec (this_arg, arg);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t ret_value = ecma_make_boolean_value (!ecma_is_value_null (result));\n  ecma_free_value (result);\n\n  return ret_value;\n} /* ecma_builtin_regexp_prototype_test */\n\n/**\n * The RegExp.prototype object's 'toString' routine\n *\n * See also:\n *          ECMA-262 v5, 15.10.6.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_regexp_prototype_to_string (ecma_object_t *object_p) /**< this object */\n{\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t result = ecma_op_object_get_by_magic_id (object_p, LIT_MAGIC_STRING_SOURCE);\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  ecma_string_t *source_p = ecma_op_to_string (result);\n  ecma_free_value (result);\n\n  if (source_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  result = ecma_op_object_get_by_magic_id (object_p, LIT_MAGIC_STRING_FLAGS);\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_deref_ecma_string (source_p);\n    return result;\n  }\n\n  ecma_string_t *flags_p = ecma_op_to_string (result);\n  ecma_free_value (result);\n\n  if (flags_p == NULL)\n  {\n    ecma_deref_ecma_string (source_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n  ecma_stringbuilder_append_byte (&builder, LIT_CHAR_SLASH);\n  ecma_stringbuilder_append (&builder, source_p);\n  ecma_stringbuilder_append_byte (&builder, LIT_CHAR_SLASH);\n  ecma_stringbuilder_append (&builder, flags_p);\n\n  ecma_deref_ecma_string (source_p);\n  ecma_deref_ecma_string (flags_p);\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_extended_object_t *re_obj_p = (ecma_extended_object_t *) object_p;\n\n  re_compiled_code_t *bc_p = ECMA_GET_INTERNAL_VALUE_POINTER (re_compiled_code_t,\n                                                              re_obj_p->u.class_prop.u.value);\n\n  ecma_string_t *source_p = ecma_get_string_from_value (bc_p->source);\n  uint16_t flags = bc_p->header.status_flags;\n\n  ecma_stringbuilder_t result = ecma_stringbuilder_create ();\n  ecma_stringbuilder_append_byte (&result, LIT_CHAR_SLASH);\n  ecma_stringbuilder_append (&result, source_p);\n  ecma_stringbuilder_append_byte (&result, LIT_CHAR_SLASH);\n\n  if (flags & RE_FLAG_GLOBAL)\n  {\n    ecma_stringbuilder_append_byte (&result, LIT_CHAR_LOWERCASE_G);\n  }\n\n  if (flags & RE_FLAG_IGNORE_CASE)\n  {\n    ecma_stringbuilder_append_byte (&result, LIT_CHAR_LOWERCASE_I);\n  }\n\n  if (flags & RE_FLAG_MULTILINE)\n  {\n    ecma_stringbuilder_append_byte (&result, LIT_CHAR_LOWERCASE_M);\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&result));\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_regexp_prototype_to_string */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Helper function to determine if method is the builtin exec method\n *\n * @return true, if function is the builtin exec method\n *         false, otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_builtin_is_regexp_exec (ecma_extended_object_t *obj_p)\n{\n  return (ecma_get_object_is_builtin ((ecma_object_t *) obj_p)\n          && obj_p->u.built_in.routine_id == ECMA_REGEXP_PROTOTYPE_ROUTINE_EXEC);\n} /* ecma_builtin_is_regexp_exec */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * The RegExp.prototype object's 'matchAll' routine\n *\n * See also:\n *          ECMA-262 v11, 21.2.5.8\n *\n * @return ecma_value_t\n */\nstatic ecma_value_t\necma_builtin_regexp_prototype_match_all (ecma_object_t *regexp_obj_p, /**< this argument */\n                                         ecma_value_t string_arg) /**< source string */\n{\n  /* 3. */\n  ecma_string_t *str_p = ecma_op_to_string (string_arg);\n\n  if (JERRY_UNLIKELY (str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 4. */\n  ecma_value_t constructor = ecma_op_species_constructor (regexp_obj_p, ECMA_BUILTIN_ID_REGEXP);\n\n  if (ECMA_IS_VALUE_ERROR (constructor))\n  {\n    ecma_deref_ecma_string (str_p);\n    return constructor;\n  }\n\n  /* 5. */\n  ecma_value_t get_flag = ecma_op_object_get_by_magic_id (regexp_obj_p, LIT_MAGIC_STRING_FLAGS);\n\n  if (ECMA_IS_VALUE_ERROR (get_flag))\n  {\n    ecma_deref_ecma_string (str_p);\n    ecma_free_value (constructor);\n    return get_flag;\n  }\n\n  ecma_string_t *flags = ecma_op_to_string (get_flag);\n\n  ecma_free_value (get_flag);\n\n  if (JERRY_UNLIKELY (flags == NULL))\n  {\n    ecma_deref_ecma_string (str_p);\n    ecma_free_value (constructor);\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 6. */\n  ecma_object_t *constructor_obj_p = ecma_get_object_from_value (constructor);\n  ecma_value_t flags_value = ecma_make_string_value (flags);\n  ecma_value_t match_args[] = { ecma_make_object_value (regexp_obj_p), flags_value};\n  ecma_value_t matcher = ecma_op_function_construct (constructor_obj_p, constructor_obj_p, match_args, 2);\n\n  ecma_deref_object (constructor_obj_p);\n\n  if (ECMA_IS_VALUE_ERROR (matcher))\n  {\n    ecma_deref_ecma_string (str_p);\n    ecma_deref_ecma_string (flags);\n    return matcher;\n  }\n\n  /* 7. */\n  ecma_value_t get_last_index = ecma_op_object_get_by_magic_id (regexp_obj_p, LIT_MAGIC_STRING_LASTINDEX_UL);\n\n  if (ECMA_IS_VALUE_ERROR (get_last_index))\n  {\n    ecma_deref_ecma_string (str_p);\n    ecma_deref_ecma_string (flags);\n    ecma_free_value (matcher);\n    return get_last_index;\n  }\n\n  ecma_length_t last_index;\n  ecma_value_t to_len = ecma_op_to_length (get_last_index, &last_index);\n\n  ecma_free_value (get_last_index);\n\n  if (ECMA_IS_VALUE_ERROR (to_len))\n  {\n    ecma_deref_ecma_string (str_p);\n    ecma_deref_ecma_string (flags);\n    ecma_free_value (matcher);\n    return to_len;\n  }\n\n  /* 8. */\n  ecma_object_t *matcher_obj_p = ecma_get_object_from_value (matcher);\n  ecma_value_t last_index_value = ecma_make_length_value (last_index);\n  ecma_value_t set = ecma_op_object_put (matcher_obj_p,\n                                         ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                         last_index_value,\n                                         true);\n\n  ecma_free_value (last_index_value);\n\n  if (ECMA_IS_VALUE_ERROR (set))\n  {\n    ecma_deref_ecma_string (str_p);\n    ecma_deref_ecma_string (flags);\n    ecma_deref_object (matcher_obj_p);\n  }\n\n  uint16_t parsed_flag;\n  ecma_value_t flag_parse = ecma_regexp_parse_flags (flags, &parsed_flag);\n\n  ecma_deref_ecma_string (flags);\n\n  if (ECMA_IS_VALUE_ERROR (flag_parse))\n  {\n    ecma_deref_ecma_string (str_p);\n    ecma_deref_object (matcher_obj_p);\n    return flag_parse;\n  }\n\n  /* 13. */\n  ecma_object_t *result_obj;\n  ecma_object_t *proto_p = ecma_builtin_get (ECMA_BUILTIN_ID_REGEXP_STRING_ITERATOR_PROTOTYPE);\n  result_obj = ecma_create_object (proto_p,\n                                   sizeof (ecma_regexp_string_iterator_t),\n                                   ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) result_obj;\n  ext_obj_p->u.pseudo_array.type = (uint8_t) ECMA_PSEUDO_REGEXP_STRING_ITERATOR;\n  ext_obj_p->u.pseudo_array.extra_info = (uint8_t) (parsed_flag & (RE_FLAG_GLOBAL | RE_FLAG_UNICODE));\n\n  ecma_regexp_string_iterator_t *regexp_string_iterator_obj = (ecma_regexp_string_iterator_t *) result_obj;\n\n  regexp_string_iterator_obj->iterating_regexp = matcher;\n  regexp_string_iterator_obj->iterated_string = ecma_make_string_value (str_p);\n\n  ecma_deref_object (matcher_obj_p);\n\n  return ecma_make_object_value (result_obj);\n} /* ecma_builtin_regexp_prototype_match_all */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Dispatcher of the Regexp built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_regexp_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                                ecma_value_t this_arg, /**< 'this' argument value */\n                                                const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                        *   passed to routine */\n                                                uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (arguments_number);\n\n#if !ENABLED (JERRY_ESNEXT)\n  bool require_regexp = builtin_routine_id <= ECMA_REGEXP_PROTOTYPE_ROUTINE_TO_STRING;\n#else /* ENABLED (JERRY_ESNEXT) */\n  bool require_regexp = builtin_routine_id < ECMA_REGEXP_PROTOTYPE_ROUTINE_TEST;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *obj_p = NULL;\n\n  if (ecma_is_value_object (this_arg))\n  {\n    /* 2. */\n    obj_p = ecma_get_object_from_value (this_arg);\n\n    if (require_regexp && !ecma_object_class_is (obj_p, LIT_MAGIC_STRING_REGEXP_UL))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a RegExp object\"));\n    }\n  }\n  /* 1. */\n  else\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not an object\"));\n  }\n\n  JERRY_ASSERT (obj_p != NULL);\n\n  switch (builtin_routine_id)\n  {\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_COMPILE:\n    {\n      return ecma_builtin_regexp_prototype_compile (this_arg, arguments_list_p[0], arguments_list_p[1]);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_TEST:\n    {\n      return ecma_builtin_regexp_prototype_test (this_arg, arguments_list_p[0]);\n    }\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_EXEC:\n    {\n      return ecma_builtin_regexp_prototype_exec (this_arg, arguments_list_p[0]);\n    }\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_TO_STRING:\n    {\n      return ecma_builtin_regexp_prototype_to_string (obj_p);\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_SEARCH:\n    {\n      return ecma_regexp_search_helper (this_arg, arguments_list_p[0]);\n    }\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_MATCH:\n    {\n      return ecma_regexp_match_helper (this_arg, arguments_list_p[0]);\n    }\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_MATCH_ALL:\n    {\n      return ecma_builtin_regexp_prototype_match_all (obj_p, arguments_list_p[0]);\n    }\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_REPLACE:\n    {\n      return ecma_regexp_replace_helper (this_arg, arguments_list_p[0], arguments_list_p[1]);\n    }\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_SPLIT:\n    {\n      return ecma_regexp_split_helper (this_arg, arguments_list_p[0], arguments_list_p[1]);\n    }\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_FLAGS:\n    {\n      return ecma_builtin_regexp_prototype_get_flags (obj_p);\n    }\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_SOURCE:\n    {\n      if (!ecma_object_class_is (obj_p, LIT_MAGIC_STRING_REGEXP_UL))\n      {\n        if (ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_REGEXP_PROTOTYPE))\n        {\n          return ecma_make_magic_string_value (LIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP);\n        }\n\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a RegExp object\"));\n      }\n\n      ecma_extended_object_t *re_obj_p = (ecma_extended_object_t *) obj_p;\n      return ecma_builtin_regexp_prototype_get_source (re_obj_p);\n    }\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_GLOBAL:\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_IGNORE_CASE:\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_MULTILINE:\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_STICKY:\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_UNICODE:\n    case ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_DOT_ALL:\n    {\n      if (!ecma_object_class_is (obj_p, LIT_MAGIC_STRING_REGEXP_UL))\n      {\n        if (ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_REGEXP_PROTOTYPE))\n        {\n          return ECMA_VALUE_UNDEFINED;\n        }\n\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a RegExp object\"));\n      }\n\n      ecma_extended_object_t *re_obj_p = (ecma_extended_object_t *) obj_p;\n      return ecma_builtin_regexp_prototype_flags_helper (re_obj_p, builtin_routine_id);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_builtin_regexp_prototype_dispatch_routine */\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * RegExp.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n/* ECMA-262 v5, 15.10.6.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_REGEXP,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#if ENABLED (JERRY_ESNEXT)\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_FLAGS,\n                    ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_FLAGS,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_SOURCE,\n                    ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_SOURCE,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_GLOBAL,\n                    ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_GLOBAL,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_IGNORECASE_UL,\n                    ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_IGNORE_CASE,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_DOTALL,\n                    ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_DOT_ALL,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_MULTILINE,\n                    ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_MULTILINE,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_UNICODE,\n                    ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_UNICODE,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_STICKY,\n                    ECMA_REGEXP_PROTOTYPE_ROUTINE_GET_STICKY,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nROUTINE (LIT_GLOBAL_SYMBOL_REPLACE, ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_REPLACE, 2, 2)\nROUTINE (LIT_GLOBAL_SYMBOL_SEARCH, ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_SEARCH, 1, 1)\nROUTINE (LIT_GLOBAL_SYMBOL_SPLIT, ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_SPLIT, 2, 2)\nROUTINE (LIT_GLOBAL_SYMBOL_MATCH, ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_MATCH, 1, 1)\nROUTINE (LIT_GLOBAL_SYMBOL_MATCH_ALL, ECMA_REGEXP_PROTOTYPE_ROUTINE_SYMBOL_MATCH_ALL, 1, 1)\n#else /* !ENABLED (JERRY_ESNEXT) */\n/* ECMA-262 v5, 15.10.7.1 */\nSTRING_VALUE (LIT_MAGIC_STRING_SOURCE,\n              LIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.10.7.2 */\nSIMPLE_VALUE (LIT_MAGIC_STRING_GLOBAL,\n              ECMA_VALUE_FALSE,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.10.7.3 */\nSIMPLE_VALUE (LIT_MAGIC_STRING_IGNORECASE_UL,\n              ECMA_VALUE_FALSE,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.10.7.4 */\nSIMPLE_VALUE (LIT_MAGIC_STRING_MULTILINE,\n              ECMA_VALUE_FALSE,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v5, 15.10.7.5 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LASTINDEX_UL,\n              0,\n              ECMA_PROPERTY_FLAG_WRITABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\nROUTINE (LIT_MAGIC_STRING_COMPILE, ECMA_REGEXP_PROTOTYPE_ROUTINE_COMPILE, 2, 2)\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\nROUTINE (LIT_MAGIC_STRING_EXEC, ECMA_REGEXP_PROTOTYPE_ROUTINE_EXEC, 1, 1)\nROUTINE (LIT_MAGIC_STRING_TEST, ECMA_REGEXP_PROTOTYPE_ROUTINE_TEST, 1, 1)\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_REGEXP_PROTOTYPE_ROUTINE_TO_STRING, 0, 0)\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-objects.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-regexp-string-iterator-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID regexp_string_iterator_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup %regexpstringiteratorprototype% ECMA %ArrayIteratorPrototype% object built-in\n * @{\n */\n\n/**\n * The %RegExpStringIteratorPrototype% object's 'next' routine\n *\n * See also:\n *          ECMA-262 v11, 21.2.7.1.1\n *\n * Note:\n *     Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object, if success\n *         error - otherwise\n */\nstatic ecma_value_t\necma_builtin_regexp_string_iterator_prototype_object_next (ecma_value_t this_val) /**< this argument */\n{\n  /* 2. */\n  if (!ecma_is_value_object (this_val))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an object.\"));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_val);\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n  /* 3. */\n  if (ecma_get_object_type (obj_p) != ECMA_OBJECT_TYPE_PSEUDO_ARRAY\n      || ext_obj_p->u.pseudo_array.type != ECMA_PSEUDO_REGEXP_STRING_ITERATOR)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an iterator.\"));\n  }\n\n  ecma_regexp_string_iterator_t *regexp_string_iterator_obj = (ecma_regexp_string_iterator_t *) obj_p;\n\n  /* 4. */\n  if (ecma_is_value_empty (regexp_string_iterator_obj->iterated_string))\n  {\n    return ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n  }\n\n  /* 5. */\n  ecma_value_t regexp = regexp_string_iterator_obj->iterating_regexp;\n\n  /* 6. */\n  ecma_value_t matcher_str_value = regexp_string_iterator_obj->iterated_string;\n  ecma_string_t *matcher_str_p = ecma_get_string_from_value (matcher_str_value);\n\n  /* 9. */\n  ecma_value_t match = ecma_op_regexp_exec (regexp, matcher_str_p);\n\n  if (ECMA_IS_VALUE_ERROR (match))\n  {\n    return match;\n  }\n\n  /* 10. */\n  if (ecma_is_value_null (match))\n  {\n    ecma_free_value (regexp_string_iterator_obj->iterated_string);\n    regexp_string_iterator_obj->iterated_string = ECMA_VALUE_EMPTY;\n    return ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n  }\n\n  ecma_object_t *match_result_array_p = ecma_get_object_from_value (match);\n\n  ecma_value_t result = ECMA_VALUE_ERROR;\n\n  /* 11. */\n  if (regexp_string_iterator_obj->header.u.pseudo_array.extra_info & RE_FLAG_GLOBAL)\n  {\n    ecma_value_t matched_str_value = ecma_op_object_get_by_index (match_result_array_p, 0);\n\n    if (ECMA_IS_VALUE_ERROR (matched_str_value))\n    {\n      goto free_variables;\n    }\n\n    ecma_string_t *matched_str_p = ecma_op_to_string (matched_str_value);\n\n    ecma_free_value (matched_str_value);\n\n    if (JERRY_UNLIKELY (matched_str_p == NULL))\n    {\n      ecma_deref_ecma_string (matched_str_p);\n      goto free_variables;\n    }\n\n    if (ecma_string_is_empty (matched_str_p))\n    {\n      ecma_object_t *regexp_obj_p = ecma_get_object_from_value (regexp);\n\n      ecma_value_t get_last_index = ecma_op_object_get_by_magic_id (regexp_obj_p, LIT_MAGIC_STRING_LASTINDEX_UL);\n\n      if (ECMA_IS_VALUE_ERROR (get_last_index))\n      {\n        goto free_variables;\n      }\n\n      ecma_length_t this_index;\n      ecma_value_t to_len = ecma_op_to_length (get_last_index, &this_index);\n\n      ecma_free_value (get_last_index);\n\n      if (ECMA_IS_VALUE_ERROR (to_len))\n      {\n        goto free_variables;\n      }\n\n      bool full_unciode = (regexp_string_iterator_obj->header.u.pseudo_array.extra_info & RE_FLAG_UNICODE) != 0;\n      ecma_length_t next_index = ecma_op_advance_string_index (matcher_str_p,\n                                                               this_index,\n                                                               full_unciode);\n\n      ecma_value_t next_index_value = ecma_make_length_value (next_index);\n      ecma_value_t set = ecma_op_object_put (regexp_obj_p,\n                                             ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                             next_index_value,\n                                             true);\n\n      ecma_free_value (next_index_value);\n\n      if (ECMA_IS_VALUE_ERROR (set))\n      {\n        goto free_variables;\n      }\n    }\n    else\n    {\n      ecma_deref_ecma_string (matched_str_p);\n    }\n  }\n  else\n  {\n    ecma_free_value (regexp_string_iterator_obj->iterated_string);\n    regexp_string_iterator_obj->iterated_string = ECMA_VALUE_EMPTY;\n  }\n\n  result = ecma_create_iter_result_object (match, ECMA_VALUE_FALSE);\n\nfree_variables:\n  ecma_deref_object (match_result_array_p);\n\n  return result;\n} /* ecma_builtin_regexp_string_iterator_prototype_object_next */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %RegExpStringIteratorPrototype% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_REGEXP_STRING_ITERATOR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_regexp_string_iterator_prototype_object_next, 0, 0)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"jcontext.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-regexp-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-regexp.inc.h\"\n#define BUILTIN_UNDERSCORED_ID regexp\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup regexp ECMA RegExp object built-in\n * @{\n */\n\nstatic ecma_value_t\necma_builtin_regexp_dispatch_helper (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                     uint32_t arguments_list_len) /**< number of arguments */\n{\n  ecma_value_t pattern_value = ECMA_VALUE_UNDEFINED;\n  ecma_value_t flags_value = ECMA_VALUE_UNDEFINED;\n#if ENABLED (JERRY_ESNEXT)\n  bool create_regexp_from_bc = false;\n  bool free_arguments = false;\n  ecma_object_t *new_target_p = JERRY_CONTEXT (current_new_target_p);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *new_target_p = NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (arguments_list_len > 0)\n  {\n    /* pattern string or RegExp object */\n    pattern_value = arguments_list_p[0];\n\n    if (arguments_list_len > 1)\n    {\n      flags_value = arguments_list_p[1];\n    }\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t regexp_value = ecma_op_is_regexp (pattern_value);\n\n  if (ECMA_IS_VALUE_ERROR (regexp_value))\n  {\n    return regexp_value;\n  }\n\n  bool pattern_is_regexp = regexp_value == ECMA_VALUE_TRUE;\n  re_compiled_code_t *bc_p = NULL;\n\n  if (new_target_p == NULL)\n  {\n    new_target_p = ecma_builtin_get (ECMA_BUILTIN_ID_REGEXP);\n\n    if (pattern_is_regexp && ecma_is_value_undefined (flags_value))\n    {\n      ecma_object_t *pattern_obj_p = ecma_get_object_from_value (pattern_value);\n\n      ecma_value_t pattern_constructor = ecma_op_object_get_by_magic_id (pattern_obj_p, LIT_MAGIC_STRING_CONSTRUCTOR);\n\n      if (ECMA_IS_VALUE_ERROR (pattern_constructor))\n      {\n        return pattern_constructor;\n      }\n\n      bool is_same = ecma_op_same_value (ecma_make_object_value (new_target_p), pattern_constructor);\n      ecma_free_value (pattern_constructor);\n\n      if (is_same)\n      {\n        return ecma_copy_value (pattern_value);\n      }\n    }\n  }\n\n  if (ecma_object_is_regexp_object (pattern_value))\n  {\n    ecma_extended_object_t *pattern_obj_p = (ecma_extended_object_t *) ecma_get_object_from_value (pattern_value);\n    bc_p = ECMA_GET_INTERNAL_VALUE_POINTER (re_compiled_code_t,\n                                            pattern_obj_p->u.class_prop.u.value);\n\n    create_regexp_from_bc = ecma_is_value_undefined (flags_value);\n\n    if (!create_regexp_from_bc)\n    {\n      pattern_value = bc_p->source;\n    }\n  }\n  else if (pattern_is_regexp)\n  {\n    ecma_object_t *pattern_obj_p = ecma_get_object_from_value (pattern_value);\n\n    pattern_value = ecma_op_object_get_by_magic_id (pattern_obj_p, LIT_MAGIC_STRING_SOURCE);\n\n    if (ECMA_IS_VALUE_ERROR (pattern_value))\n    {\n      return pattern_value;\n    }\n\n    if (ecma_is_value_undefined (flags_value))\n    {\n      flags_value = ecma_op_object_get_by_magic_id (pattern_obj_p, LIT_MAGIC_STRING_FLAGS);\n\n      if (ECMA_IS_VALUE_ERROR (flags_value))\n      {\n        ecma_free_value (pattern_value);\n        return flags_value;\n      }\n    }\n    else\n    {\n      flags_value = ecma_copy_value (flags_value);\n    }\n\n    free_arguments = true;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  if (ecma_object_is_regexp_object (pattern_value))\n  {\n    if (ecma_is_value_undefined (flags_value))\n    {\n      return ecma_copy_value (pattern_value);\n    }\n\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument of RegExp call.\"));\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n  ecma_object_t *new_target_obj_p = ecma_op_regexp_alloc (new_target_p);\n\n  if (JERRY_LIKELY (new_target_obj_p != NULL))\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (create_regexp_from_bc)\n    {\n      ret_value = ecma_op_create_regexp_from_bytecode (new_target_obj_p, bc_p);\n      JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (ret_value));\n    }\n    else\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n      ret_value = ecma_op_create_regexp_from_pattern (new_target_obj_p, pattern_value, flags_value);\n\n      if (ECMA_IS_VALUE_ERROR (ret_value))\n      {\n        ecma_deref_object (new_target_obj_p);\n      }\n    }\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (free_arguments)\n  {\n    ecma_free_value (pattern_value);\n    ecma_free_value (flags_value);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ret_value;\n} /* ecma_builtin_regexp_dispatch_helper */\n\n/**\n * Handle calling [[Call]] of built-in RegExp object\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_regexp_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                   uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_regexp_dispatch_helper (arguments_list_p,\n                                              arguments_list_len);\n} /* ecma_builtin_regexp_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in RegExp object\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_regexp_dispatch_helper (arguments_list_p,\n                                              arguments_list_len);\n} /* ecma_builtin_regexp_dispatch_construct */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * 21.2.4.2 get RegExp [ @@species ] accessor\n *\n * @return ecma_value\n *         returned value must be freed with ecma_free_value\n */\necma_value_t\necma_builtin_regexp_species_get (ecma_value_t this_value) /**< This Value */\n{\n  return ecma_copy_value (this_value);\n} /* ecma_builtin_regexp_species_get */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * RegExp built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              2,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* ECMA-262 v5, 15.10.5.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_REGEXP_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 21.2.4.2 */\nACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,\n                    ecma_builtin_regexp_species_get,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-iterator-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_SET)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-set-iterator-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID set_iterator_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup %setiteratorprototype% ECMA %SetIteratorPrototype% object built-in\n * @{\n */\n\n/**\n * The %SetIteratorPrototype% object's 'next' routine\n *\n * See also:\n *          ECMA-262 v6, 23.2.5.2.1\n *\n * Note:\n *     Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object, if success\n *         error - otherwise\n */\nstatic ecma_value_t\necma_builtin_set_iterator_prototype_object_next (ecma_value_t this_val) /**< this argument */\n{\n  return ecma_op_container_iterator_next (this_val, ECMA_PSEUDO_SET_ITERATOR);\n} /* ecma_builtin_set_iterator_prototype_object_next */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-iterator-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %SetIteratorPrototype% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_SET)\n\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_SET_ITERATOR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_set_iterator_prototype_object_next, 0, 0)\n\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_SET)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-set-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID set_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup set ECMA Set object built-in\n * @{\n */\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_set_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                             ecma_value_t this_arg, /**< 'this' argument value */\n                                             const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                     *   passed to routine */\n                                             uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (arguments_number);\n  return ecma_builtin_container_dispatch_routine (builtin_routine_id,\n                                                  this_arg,\n                                                  arguments_list_p,\n                                                  LIT_MAGIC_STRING_SET_UL);\n} /* ecma_builtin_set_prototype_dispatch_routine */\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Set.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_SET)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 23.2.3.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_SET,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v6, 23.1.3.13 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_SET_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_CLEAR, ECMA_CONTAINER_ROUTINE_CLEAR, 0, 0)\nROUTINE (LIT_MAGIC_STRING_ADD, ECMA_CONTAINER_ROUTINE_ADD, 1, 1)\nROUTINE (LIT_MAGIC_STRING_DELETE, ECMA_CONTAINER_ROUTINE_DELETE, 1, 1)\nROUTINE (LIT_MAGIC_STRING_FOR_EACH_UL, ECMA_CONTAINER_ROUTINE_FOREACH, 2, 1)\nROUTINE (LIT_MAGIC_STRING_HAS, ECMA_CONTAINER_ROUTINE_HAS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_ENTRIES, ECMA_CONTAINER_ROUTINE_ENTRIES, 0, 0)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_VALUES, LIT_INTERNAL_MAGIC_STRING_SET_PROTOTYPE_VALUES,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_GLOBAL_SYMBOL_ITERATOR, LIT_INTERNAL_MAGIC_STRING_SET_PROTOTYPE_VALUES,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_KEYS, LIT_INTERNAL_MAGIC_STRING_SET_PROTOTYPE_VALUES,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_SIZE,\n                    ECMA_CONTAINER_ROUTINE_SIZE_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_SET)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-set.inc.h\"\n#define BUILTIN_UNDERSCORED_ID set\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup set ECMA Set object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in Set object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_set_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructor Set requires 'new'.\"));\n} /* ecma_builtin_set_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Map object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_set_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                     uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_op_container_create (arguments_list_p,\n                                   arguments_list_len,\n                                   LIT_MAGIC_STRING_SET_UL,\n                                   ECMA_BUILTIN_ID_SET_PROTOTYPE);\n} /* ecma_builtin_set_dispatch_construct */\n\n/**\n * 23.2.2.2 get Set [ @@species ] accessor\n *\n * @return ecma_value\n *         returned value must be freed with ecma_free_value\n */\necma_value_t\necma_builtin_set_species_get (ecma_value_t this_value) /**< This Value */\n{\n  return ecma_copy_value (this_value);\n} /* ecma_builtin_set_species_get */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Set built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_SET)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\n/* ECMA-262 v6, 23.2.2 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 23.1 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_SET_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 23.2.2.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_SET_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v6, 23.2.2.2 */\nACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,\n                    ecma_builtin_set_species_get,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-iterator-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-iterator-object.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-string-iterator-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID string_iterator_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup %stringiteratorprototype% ECMA %ArrayIteratorPrototype% object built-in\n * @{\n */\n\n/**\n * The %StringIteratorPrototype% object's 'next' routine\n *\n * See also:\n *          ECMA-262 v6, 22.1.5.2.1\n *\n * Note:\n *     Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object, if success\n *         error - otherwise\n */\nstatic ecma_value_t\necma_builtin_string_iterator_prototype_object_next (ecma_value_t this_val) /**< this argument */\n{\n    /* 1 - 2. */\n  if (!ecma_is_value_object (this_val))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an object.\"));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_val);\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n  /* 3. */\n  if (ecma_get_object_type (obj_p) != ECMA_OBJECT_TYPE_PSEUDO_ARRAY\n      || ext_obj_p->u.pseudo_array.type != ECMA_PSEUDO_STRING_ITERATOR)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an iterator.\"));\n  }\n\n  ecma_value_t iterated_value = ext_obj_p->u.pseudo_array.u2.iterated_value;\n\n  /* 4 - 5 */\n  if (ecma_is_value_empty (iterated_value))\n  {\n    return ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n  }\n\n  JERRY_ASSERT (ecma_is_value_string (iterated_value));\n\n  ecma_string_t *string_p = ecma_get_string_from_value (iterated_value);\n\n  /* 6. */\n  lit_utf8_size_t position = ext_obj_p->u.pseudo_array.u1.iterator_index;\n\n  if (JERRY_UNLIKELY (position == ECMA_ITERATOR_INDEX_LIMIT))\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"String iteration cannot be continued.\"));\n  }\n\n  /* 7. */\n  lit_utf8_size_t len = ecma_string_get_length (string_p);\n\n  /* 8. */\n  if (position >= len)\n  {\n    ecma_deref_ecma_string (string_p);\n    ext_obj_p->u.pseudo_array.u2.iterated_value = ECMA_VALUE_EMPTY;\n    return ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n  }\n\n  /* 9. */\n  ecma_char_t first = ecma_string_get_char_at_pos (string_p, position);\n\n  ecma_string_t *result_str_p;\n  lit_utf8_size_t result_size = 1;\n\n  /* 10. */\n  if (first < LIT_UTF16_HIGH_SURROGATE_MIN || first > LIT_UTF16_HIGH_SURROGATE_MAX || (position + 1 == len))\n  {\n    result_str_p = ecma_new_ecma_string_from_code_unit (first);\n  }\n  /* 11. */\n  else\n  {\n    /* 11.a */\n    ecma_char_t second = ecma_string_get_char_at_pos (string_p, position + 1);\n\n    /* 11.b */\n    if (second < LIT_UTF16_LOW_SURROGATE_MIN || second > LIT_UTF16_LOW_SURROGATE_MAX)\n    {\n      result_str_p = ecma_new_ecma_string_from_code_unit (first);\n    }\n    /* 11.c */\n    else\n    {\n      result_str_p = ecma_new_ecma_string_from_code_units (first, second);\n      result_size = 2;\n    }\n  }\n\n  /* 13. */\n  ext_obj_p->u.pseudo_array.u1.iterator_index = (uint16_t) (position + result_size);\n\n  /* 14. */\n  ecma_value_t result = ecma_create_iter_result_object (ecma_make_string_value (result_str_p), ECMA_VALUE_FALSE);\n  ecma_deref_ecma_string (result_str_p);\n\n  return result;\n} /* ecma_builtin_string_iterator_prototype_object_next */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-iterator-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %StringIteratorPrototype% built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_STRING_ITERATOR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_string_iterator_prototype_object_next, 0, 0)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-regexp.inc.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jcontext.h\"\n#include \"jrt.h\"\n#include \"jrt-libc-includes.h\"\n#include \"lit-char-helpers.h\"\n#include \"lit-strings.h\"\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n#include \"ecma-regexp-object.h\"\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n#if ENABLED (JERRY_BUILTIN_STRING)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_STRING_PROTOTYPE_ROUTINE_START = 0,\n  /* Note: These 4 routines MUST be in this order */\n  ECMA_STRING_PROTOTYPE_TO_STRING,\n  ECMA_STRING_PROTOTYPE_VALUE_OF,\n  ECMA_STRING_PROTOTYPE_CHAR_AT,\n  ECMA_STRING_PROTOTYPE_CHAR_CODE_AT,\n\n  ECMA_STRING_PROTOTYPE_CONCAT,\n  ECMA_STRING_PROTOTYPE_SLICE,\n\n  ECMA_STRING_PROTOTYPE_LOCALE_COMPARE,\n\n  ECMA_STRING_PROTOTYPE_MATCH,\n  ECMA_STRING_PROTOTYPE_REPLACE,\n  ECMA_STRING_PROTOTYPE_SEARCH,\n\n  ECMA_STRING_PROTOTYPE_SPLIT,\n  ECMA_STRING_PROTOTYPE_SUBSTRING,\n  ECMA_STRING_PROTOTYPE_TO_LOWER_CASE,\n  ECMA_STRING_PROTOTYPE_TO_LOCAL_LOWER_CASE,\n  ECMA_STRING_PROTOTYPE_TO_UPPER_CASE,\n  ECMA_STRING_PROTOTYPE_TO_LOCAL_UPPER_CASE,\n  ECMA_STRING_PROTOTYPE_TRIM,\n\n  ECMA_STRING_PROTOTYPE_SUBSTR,\n\n  ECMA_STRING_PROTOTYPE_REPEAT,\n  ECMA_STRING_PROTOTYPE_CODE_POINT_AT,\n  ECMA_STRING_PROTOTYPE_PAD_START,\n  ECMA_STRING_PROTOTYPE_PAD_END,\n  /* Note: These 5 routines MUST be in this order */\n  ECMA_STRING_PROTOTYPE_LAST_INDEX_OF,\n  ECMA_STRING_PROTOTYPE_INDEX_OF,\n  ECMA_STRING_PROTOTYPE_STARTS_WITH,\n  ECMA_STRING_PROTOTYPE_INCLUDES,\n  ECMA_STRING_PROTOTYPE_ENDS_WITH,\n\n  ECMA_STRING_PROTOTYPE_ITERATOR,\n  ECMA_STRING_PROTOTYPE_REPLACE_ALL,\n  ECMA_STRING_PROTOTYPE_MATCH_ALL,\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-string-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID string_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup stringprototype ECMA String.prototype object built-in\n * @{\n */\n\n/**\n * The String.prototype object's 'toString' and 'valueOf' routines\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.2\n *          ECMA-262 v5, 15.5.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */\n{\n  if (ecma_is_value_string (this_arg))\n  {\n    return ecma_copy_value (this_arg);\n  }\n\n  if (ecma_is_value_object (this_arg))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (this_arg);\n\n    if (ecma_object_class_is (object_p, LIT_MAGIC_STRING_STRING_UL))\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      JERRY_ASSERT (ecma_is_value_string (ext_object_p->u.class_prop.u.value));\n\n      return ecma_copy_value (ext_object_p->u.class_prop.u.value);\n    }\n  }\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not a String or a String object.\"));\n} /* ecma_builtin_string_prototype_object_to_string */\n\n/**\n * Helper function for the String.prototype object's 'charAt' and charCodeAt' routine\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_char_at_helper (ecma_value_t this_arg, /**< this argument */\n                                              ecma_value_t arg, /**< routine's argument */\n                                              bool charcode_mode) /**< routine mode */\n{\n  /* 3 */\n  ecma_number_t index_num;\n  ecma_value_t to_num_result = ecma_op_to_integer (arg, &index_num);\n\n  if (JERRY_UNLIKELY (!ecma_is_value_empty (to_num_result)))\n  {\n    return to_num_result;\n  }\n\n  /* 2 */\n  ecma_string_t *original_string_p = ecma_op_to_string (this_arg);\n  if (JERRY_UNLIKELY (original_string_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 4 */\n  const lit_utf8_size_t len = ecma_string_get_length (original_string_p);\n\n  /* 5 */\n  // When index_num is NaN, then the first two comparisons are false\n  if (index_num < 0 || index_num >= len || (ecma_number_is_nan (index_num) && len == 0))\n  {\n    ecma_deref_ecma_string (original_string_p);\n    return (charcode_mode ? ecma_make_nan_value ()\n                          : ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY));\n  }\n\n  /* 6 */\n  /*\n   * String length is currently uint32_t, but index_num may be bigger,\n   * ToInteger performs floor, while ToUInt32 performs modulo 2^32,\n   * hence after the check 0 <= index_num < len we assume to_uint32 can be used.\n   * We assume to_uint32 (NaN) is 0.\n   */\n  JERRY_ASSERT (ecma_number_is_nan (index_num) || ecma_number_to_uint32 (index_num) == ecma_number_trunc (index_num));\n\n  ecma_char_t new_ecma_char = ecma_string_get_char_at_pos (original_string_p, ecma_number_to_uint32 (index_num));\n  ecma_deref_ecma_string (original_string_p);\n\n  return (charcode_mode ? ecma_make_uint32_value (new_ecma_char)\n                        : ecma_make_string_value (ecma_new_ecma_string_from_code_unit (new_ecma_char)));\n} /* ecma_builtin_string_prototype_char_at_helper */\n\n/**\n * The String.prototype object's 'concat' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_concat (ecma_string_t *this_string_p, /**< this argument */\n                                             const ecma_value_t *argument_list_p, /**< arguments list */\n                                             uint32_t arguments_number) /**< number of arguments */\n{\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (this_string_p);\n\n  /* 5 */\n  for (uint32_t arg_index = 0; arg_index < arguments_number; ++arg_index)\n  {\n    /* 5a, b */\n    ecma_string_t *get_arg_string_p = ecma_op_to_string (argument_list_p[arg_index]);\n\n    if (JERRY_UNLIKELY (get_arg_string_p == NULL))\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_stringbuilder_append (&builder, get_arg_string_p);\n\n    ecma_deref_ecma_string (get_arg_string_p);\n  }\n\n  /* 6 */\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_string_prototype_object_concat */\n\n/**\n * The String.prototype object's 'localeCompare' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.9\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_locale_compare (ecma_string_t *this_string_p, /**< this argument */\n                                                     ecma_value_t arg) /**< routine's argument */\n{\n  /* 3. */\n  ecma_string_t *arg_string_p = ecma_op_to_string (arg);\n\n  if (JERRY_UNLIKELY (arg_string_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_number_t result = ECMA_NUMBER_ZERO;\n\n  if (ecma_compare_ecma_strings_relational (this_string_p, arg_string_p))\n  {\n    result = ECMA_NUMBER_MINUS_ONE;\n  }\n  else if (!ecma_compare_ecma_strings (this_string_p, arg_string_p))\n  {\n    result = ECMA_NUMBER_ONE;\n  }\n  else\n  {\n    result = ECMA_NUMBER_ZERO;\n  }\n\n  ecma_deref_ecma_string (arg_string_p);\n\n  return ecma_make_number_value (result);\n} /* ecma_builtin_string_prototype_object_locale_compare */\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n/**\n * The String.prototype object's 'match' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.10\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_match (ecma_value_t this_argument, /**< this argument */\n                                            ecma_value_t regexp_arg) /**< routine's argument */\n{\n#if ENABLED (JERRY_ESNEXT)\n  /* 3. */\n  if (!(ecma_is_value_undefined (regexp_arg) || ecma_is_value_null (regexp_arg)))\n  {\n    /* 3.a */\n    ecma_value_t matcher = ecma_op_get_method_by_symbol_id (regexp_arg, LIT_GLOBAL_SYMBOL_MATCH);\n\n    /* 3.b */\n    if (ECMA_IS_VALUE_ERROR (matcher))\n    {\n      return matcher;\n    }\n\n    /* 3.c */\n    if (!ecma_is_value_undefined (matcher))\n    {\n      /* 3.c.i */\n      ecma_object_t *matcher_method = ecma_get_object_from_value (matcher);\n      ecma_value_t result = ecma_op_function_call (matcher_method, regexp_arg, &this_argument, 1);\n      ecma_deref_object (matcher_method);\n      return result;\n    }\n  }\n\n  /* 4. */\n  ecma_string_t *this_str_p = ecma_op_to_string (this_argument);\n\n  /* 5. */\n  if (JERRY_UNLIKELY (this_str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 6. */\n  ecma_object_t *regexp_obj_p = ecma_op_regexp_alloc (NULL);\n\n  if (JERRY_UNLIKELY (regexp_obj_p == NULL))\n  {\n    ecma_deref_ecma_string (this_str_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t new_regexp = ecma_op_create_regexp_from_pattern (regexp_obj_p, regexp_arg, ECMA_VALUE_UNDEFINED);\n\n  /* 7. */\n  if (ECMA_IS_VALUE_ERROR (new_regexp))\n  {\n\n    ecma_deref_object (regexp_obj_p);\n    ecma_deref_ecma_string (this_str_p);\n    return new_regexp;\n  }\n  ecma_value_t this_str_value = ecma_make_string_value (this_str_p);\n\n  /* 8. */\n  ecma_value_t ret_value = ecma_op_invoke_by_symbol_id (new_regexp, LIT_GLOBAL_SYMBOL_MATCH, &this_str_value, 1);\n\n  ecma_deref_ecma_string (this_str_p);\n  ecma_free_value (new_regexp);\n\n  return ret_value;\n\n#else /* !ENABLED (JERRY_ESNEXT) */\n  if (ecma_object_is_regexp_object (regexp_arg))\n  {\n    return ecma_regexp_match_helper (regexp_arg, this_argument);\n  }\n\n  ecma_object_t *regexp_obj_p = ecma_op_regexp_alloc (NULL);\n\n  if (JERRY_UNLIKELY (regexp_obj_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t new_regexp = ecma_op_create_regexp_from_pattern (regexp_obj_p, regexp_arg, ECMA_VALUE_UNDEFINED);\n\n  if (ECMA_IS_VALUE_ERROR (new_regexp))\n  {\n    ecma_deref_object (regexp_obj_p);\n    return new_regexp;\n  }\n\n  ecma_value_t result = ecma_regexp_match_helper (new_regexp, this_argument);\n\n  ecma_free_value (new_regexp);\n\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_string_prototype_object_match */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * The String.prototype object's 'matchAll' routine\n *\n * See also:\n *          ECMA-262 v11, 21.1.3.12\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_match_all (ecma_value_t this_argument, /**< this argument */\n                                                ecma_value_t regexp_arg) /**< routine's argument */\n{\n  /* 2. */\n  if (!ecma_is_value_null (regexp_arg) && !ecma_is_value_undefined (regexp_arg))\n  {\n    /* 2.a */\n    ecma_value_t is_regexp = ecma_op_is_regexp (regexp_arg);\n\n    if (ECMA_IS_VALUE_ERROR (is_regexp))\n    {\n      return is_regexp;\n    }\n\n    /* 2.b */\n    if (ecma_is_value_true (is_regexp))\n    {\n      /* 2.b.i */\n      ecma_object_t *regexp_obj_p = ecma_get_object_from_value (regexp_arg);\n      ecma_value_t get_flags = ecma_op_object_get_by_magic_id (regexp_obj_p, LIT_MAGIC_STRING_FLAGS);\n\n      if (ECMA_IS_VALUE_ERROR (get_flags))\n      {\n        return get_flags;\n      }\n\n      /* 2.b.ii */\n      if (!ecma_op_require_object_coercible (get_flags))\n      {\n        ecma_free_value (get_flags);\n        return ECMA_VALUE_ERROR;\n      }\n\n      /* 2.b.iii */\n      ecma_string_t *flags = ecma_op_to_string (get_flags);\n\n      ecma_free_value (get_flags);\n\n      if (JERRY_UNLIKELY (flags == NULL))\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      uint16_t parsed_flag;\n      ecma_value_t flag_parse = ecma_regexp_parse_flags (flags, &parsed_flag);\n\n      ecma_deref_ecma_string (flags);\n\n      if (ECMA_IS_VALUE_ERROR (flag_parse))\n      {\n        return flag_parse;\n      }\n\n      if (!(parsed_flag & RE_FLAG_GLOBAL))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"RegExp argument should have global flag.\"));\n      }\n    }\n\n    /* 2.c */\n    ecma_value_t matcher = ecma_op_get_method_by_symbol_id (regexp_arg, LIT_GLOBAL_SYMBOL_MATCH_ALL);\n\n    if (ECMA_IS_VALUE_ERROR (matcher))\n    {\n      return matcher;\n    }\n\n    /* 2.d */\n    if (!ecma_is_value_undefined (matcher))\n    {\n      /* 2.d.i */\n      ecma_object_t *matcher_method = ecma_get_object_from_value (matcher);\n      ecma_value_t result = ecma_op_function_call (matcher_method, regexp_arg, &this_argument, 1);\n      ecma_deref_object (matcher_method);\n      return result;\n    }\n  }\n\n  /* 3. */\n  ecma_string_t *str_p = ecma_op_to_string (this_argument);\n\n  if (JERRY_UNLIKELY (str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 4. */\n  ecma_object_t *new_regexp_obj_p = ecma_op_regexp_alloc (NULL);\n\n  if (JERRY_UNLIKELY (new_regexp_obj_p == NULL))\n  {\n    ecma_deref_ecma_string (str_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t new_regexp = ecma_op_create_regexp_from_pattern (new_regexp_obj_p, regexp_arg, ECMA_VALUE_UNDEFINED);\n\n  if (ECMA_IS_VALUE_ERROR (new_regexp))\n  {\n    ecma_deref_ecma_string (str_p);\n    ecma_deref_object (new_regexp_obj_p);\n    return new_regexp;\n  }\n\n  /* 5. */\n  ecma_value_t string_arg = ecma_make_string_value (str_p);\n  ecma_value_t ret_value = ecma_op_invoke_by_symbol_id (new_regexp, LIT_GLOBAL_SYMBOL_MATCH_ALL, &string_arg, 1);\n\n  ecma_deref_ecma_string (str_p);\n  ecma_free_value (new_regexp);\n\n  return ret_value;\n} /* ecma_builtin_string_prototype_object_match_all */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * The String.prototype object's 'replace' and 'replaceAll' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.11 (replace ES5)\n *          ECMA-262 v6, 21.1.3.14 (replace ES6)\n *          ECMA-262 v12, 21.1.3.18 (replaceAll)\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_replace_helper (ecma_value_t this_value, /**< this argument */\n                                                     ecma_value_t search_value, /**< routine's first argument */\n                                                     ecma_value_t replace_value, /**< routine's second argument */\n                                                     bool replace_all)\n{\n#if ENABLED (JERRY_ESNEXT)\n  if (!(ecma_is_value_undefined (search_value) || ecma_is_value_null (search_value)))\n  {\n    if (replace_all)\n    {\n      ecma_value_t is_regexp = ecma_op_is_regexp (search_value);\n\n      if (ECMA_IS_VALUE_ERROR (is_regexp))\n      {\n        return is_regexp;\n      }\n\n      if (ecma_is_value_true (is_regexp))\n      {\n        ecma_object_t *regexp_obj_p = ecma_get_object_from_value (search_value);\n        ecma_value_t get_flags = ecma_op_object_get_by_magic_id (regexp_obj_p, LIT_MAGIC_STRING_FLAGS);\n\n        if (ECMA_IS_VALUE_ERROR (get_flags))\n        {\n          return get_flags;\n        }\n\n        if (!ecma_op_require_object_coercible (get_flags))\n        {\n          ecma_free_value (get_flags);\n          return ECMA_VALUE_ERROR;\n        }\n\n        ecma_string_t *flags = ecma_op_to_string (get_flags);\n\n        ecma_free_value (get_flags);\n\n        if (JERRY_UNLIKELY (flags == NULL))\n        {\n          return ECMA_VALUE_ERROR;\n        }\n\n        bool have_global_flag = lit_find_char_in_string (flags, LIT_CHAR_LOWERCASE_G);\n\n        ecma_deref_ecma_string (flags);\n\n        if (!have_global_flag)\n        {\n          return ecma_raise_type_error (ECMA_ERR_MSG (\"RegExp argument should have global flag.\"));\n        }\n      }\n    }\n\n    ecma_object_t *obj_p = ecma_get_object_from_value (ecma_op_to_object (search_value));\n    ecma_value_t replace_symbol = ecma_op_object_get_by_symbol_id (obj_p, LIT_GLOBAL_SYMBOL_REPLACE);\n    ecma_deref_object (obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (replace_symbol))\n    {\n      return replace_symbol;\n    }\n\n    if (!ecma_is_value_undefined (replace_symbol) && !ecma_is_value_null (replace_symbol))\n    {\n      if (!ecma_op_is_callable (replace_symbol))\n      {\n        ecma_free_value (replace_symbol);\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"@@replace is not callable\"));\n      }\n\n      ecma_object_t *replace_method = ecma_get_object_from_value (replace_symbol);\n\n      ecma_value_t arguments[] = { this_value, replace_value };\n      ecma_value_t replace_result = ecma_op_function_call (replace_method, search_value, arguments, 2);\n\n      ecma_deref_object (replace_method);\n      return replace_result;\n    }\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  if (ecma_object_is_regexp_object (search_value))\n  {\n    return ecma_regexp_replace_helper (search_value, this_value, replace_value);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_string_t *input_str_p = ecma_op_to_string (this_value);\n\n  if (input_str_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ECMA_VALUE_ERROR;\n\n  ecma_string_t *search_str_p = ecma_op_to_string (search_value);\n  if (search_str_p == NULL)\n  {\n    ecma_deref_ecma_string (input_str_p);\n    return result;\n  }\n\n  ecma_replace_context_t replace_ctx;\n  replace_ctx.capture_count = 0;\n  replace_ctx.u.captures_p = NULL;\n\n  replace_ctx.replace_str_p = NULL;\n  if (!ecma_op_is_callable (replace_value))\n  {\n    replace_ctx.replace_str_p = ecma_op_to_string (replace_value);\n    if (replace_ctx.replace_str_p == NULL)\n    {\n      goto cleanup_search;\n    }\n  }\n\n  uint8_t input_flags = ECMA_STRING_FLAG_IS_ASCII;\n  replace_ctx.string_p = ecma_string_get_chars (input_str_p,\n                                                &(replace_ctx.string_size),\n                                                NULL,\n                                                NULL,\n                                                &input_flags);\n\n  lit_utf8_size_t search_size;\n  lit_utf8_size_t search_length;\n  uint8_t search_flags = ECMA_STRING_FLAG_IS_ASCII;\n  const lit_utf8_byte_t *search_buf_p = ecma_string_get_chars (search_str_p,\n                                                               &search_size,\n                                                               &search_length,\n                                                               NULL,\n                                                               &search_flags);\n\n  ecma_string_t *result_string_p = NULL;\n\n  if (replace_ctx.string_size >= search_size)\n  {\n    replace_ctx.builder = ecma_stringbuilder_create ();\n    replace_ctx.matched_size = search_size;\n    const lit_utf8_byte_t *const input_end_p = replace_ctx.string_p + replace_ctx.string_size;\n    const lit_utf8_byte_t *const loop_end_p = input_end_p - search_size;\n    const lit_utf8_byte_t *last_match_end_p = replace_ctx.string_p;\n    const lit_utf8_byte_t *curr_p = replace_ctx.string_p;\n\n    lit_utf8_size_t pos = 0;\n    while (curr_p <= loop_end_p)\n    {\n      if (!memcmp (curr_p, search_buf_p, search_size))\n      {\n        const lit_utf8_size_t prefix_size = (lit_utf8_size_t) (curr_p - last_match_end_p);\n        ecma_stringbuilder_append_raw (&replace_ctx.builder, last_match_end_p, prefix_size);\n\n        last_match_end_p = curr_p + search_size;\n\n        if (replace_ctx.replace_str_p == NULL)\n        {\n          ecma_object_t *function_p = ecma_get_object_from_value (replace_value);\n\n          ecma_value_t args[] =\n          {\n            ecma_make_string_value (search_str_p),\n            ecma_make_uint32_value (pos),\n            ecma_make_string_value (input_str_p)\n          };\n\n          result = ecma_op_function_call (function_p,\n                                          ECMA_VALUE_UNDEFINED,\n                                          args,\n                                          3);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            ecma_stringbuilder_destroy (&replace_ctx.builder);\n            goto cleanup_replace;\n          }\n\n          ecma_string_t *const result_str_p = ecma_op_to_string (result);\n          ecma_free_value (result);\n\n          if (result_str_p == NULL)\n          {\n            ecma_stringbuilder_destroy (&replace_ctx.builder);\n            result = ECMA_VALUE_ERROR;\n            goto cleanup_replace;\n          }\n\n          ecma_stringbuilder_append (&replace_ctx.builder, result_str_p);\n          ecma_deref_ecma_string (result_str_p);\n        }\n        else\n        {\n          replace_ctx.matched_p = curr_p;\n          replace_ctx.match_byte_pos = (lit_utf8_size_t) (curr_p - replace_ctx.string_p);\n\n          ecma_builtin_replace_substitute (&replace_ctx);\n        }\n\n        if (!replace_all\n            || last_match_end_p == input_end_p)\n        {\n          break;\n        }\n\n        if (search_size != 0)\n        {\n          curr_p = last_match_end_p;\n          pos += search_length;\n          continue;\n        }\n      }\n\n      pos++;\n      lit_utf8_incr (&curr_p);\n    }\n\n    ecma_stringbuilder_append_raw (&replace_ctx.builder,\n                                    last_match_end_p,\n                                    (lit_utf8_size_t) (input_end_p - last_match_end_p));\n    result_string_p = ecma_stringbuilder_finalize (&replace_ctx.builder);\n\n  }\n\n  if (result_string_p == NULL)\n  {\n    ecma_ref_ecma_string (input_str_p);\n    result_string_p = input_str_p;\n  }\n\n  result = ecma_make_string_value (result_string_p);\n\ncleanup_replace:\n  if (input_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) replace_ctx.string_p, replace_ctx.string_size);\n  }\n\n  if (search_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) search_buf_p, search_size);\n  }\n\n  if (replace_ctx.replace_str_p != NULL)\n  {\n    ecma_deref_ecma_string (replace_ctx.replace_str_p);\n  }\n\ncleanup_search:\n  ecma_deref_ecma_string (search_str_p);\n  ecma_deref_ecma_string (input_str_p);\n\n  return result;\n} /* ecma_builtin_string_prototype_object_replace_helper */\n\n/**\n * The String.prototype object's 'search' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.12\n *          ECMA-262 v6, 21.1.3.15\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_search (ecma_value_t this_value, /**< this argument */\n                                             ecma_value_t regexp_value) /**< routine's argument */\n{\n#if ENABLED (JERRY_ESNEXT)\n  if (!(ecma_is_value_undefined (regexp_value) || ecma_is_value_null (regexp_value)))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (ecma_op_to_object (regexp_value));\n    ecma_value_t search_symbol = ecma_op_object_get_by_symbol_id (obj_p, LIT_GLOBAL_SYMBOL_SEARCH);\n    ecma_deref_object (obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (search_symbol))\n    {\n      return search_symbol;\n    }\n\n    if (!ecma_is_value_undefined (search_symbol) && !ecma_is_value_null (search_symbol))\n    {\n      if (!ecma_op_is_callable (search_symbol))\n      {\n        ecma_free_value (search_symbol);\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"@@search is not callable\"));\n      }\n\n      ecma_object_t *search_method = ecma_get_object_from_value (search_symbol);\n      ecma_value_t search_result = ecma_op_function_call (search_method, regexp_value, &this_value, 1);\n\n      ecma_deref_object (search_method);\n      return search_result;\n    }\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  if (ecma_object_is_regexp_object (regexp_value))\n  {\n    return ecma_regexp_search_helper (regexp_value, this_value);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t result = ECMA_VALUE_ERROR;\n\n  ecma_string_t *string_p = ecma_op_to_string (this_value);\n  if (string_p == NULL)\n  {\n    return result;\n  }\n\n  ecma_string_t *pattern_p = ecma_regexp_read_pattern_str_helper (regexp_value);\n  if (pattern_p == NULL)\n  {\n    goto cleanup_string;\n  }\n\n  ecma_object_t *new_regexp_obj_p = ecma_op_regexp_alloc (NULL);\n\n  if (JERRY_UNLIKELY (new_regexp_obj_p == NULL))\n  {\n    ecma_deref_ecma_string (string_p);\n    ecma_deref_ecma_string (pattern_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t new_regexp = ecma_op_create_regexp_from_pattern (new_regexp_obj_p,\n                                                                ecma_make_string_value (pattern_p),\n                                                                ECMA_VALUE_UNDEFINED);\n\n  ecma_deref_ecma_string (pattern_p);\n\n  if (ECMA_IS_VALUE_ERROR (new_regexp))\n  {\n    ecma_deref_object (new_regexp_obj_p);\n    goto cleanup_string;\n  }\n\n#if !ENABLED (JERRY_ESNEXT)\n  result = ecma_regexp_search_helper (new_regexp, ecma_make_string_value (string_p));\n  ecma_deref_object (ecma_get_object_from_value (new_regexp));\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *regexp_obj_p = ecma_get_object_from_value (new_regexp);\n  ecma_value_t this_str_value = ecma_make_string_value (string_p);\n  result = ecma_op_invoke_by_symbol_id (new_regexp, LIT_GLOBAL_SYMBOL_SEARCH, &this_str_value, 1);\n  ecma_deref_object (regexp_obj_p);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\ncleanup_string:\n  ecma_deref_ecma_string (string_p);\n  return result;\n} /* ecma_builtin_string_prototype_object_search */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n/**\n * The String.prototype object's 'slice' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.13\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_slice (ecma_string_t *get_string_val, /**< this argument */\n                                            ecma_value_t arg1, /**< routine's first argument */\n                                            ecma_value_t arg2) /**< routine's second argument */\n{\n  const lit_utf8_size_t len = ecma_string_get_length (get_string_val);\n\n  /* 4. 6. */\n  lit_utf8_size_t start = 0, end = len;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (arg1,\n                                                                       len,\n                                                                       &start)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 5. 7. */\n  if (ecma_is_value_undefined (arg2))\n  {\n    end = len;\n  }\n  else\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (arg2,\n                                                                         len,\n                                                                         &end)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  JERRY_ASSERT (start <= len && end <= len);\n\n  /* 8-9. */\n  ecma_string_t *new_str_p = ecma_string_substr (get_string_val, start, end);\n\n  return ecma_make_string_value (new_str_p);\n} /* ecma_builtin_string_prototype_object_slice */\n\n/**\n * The String.prototype object's 'split' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.14\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_split (ecma_value_t this_value, /**< this argument */\n                                            ecma_value_t separator_value, /**< separator */\n                                            ecma_value_t limit_value) /**< limit */\n{\n#if ENABLED (JERRY_ESNEXT)\n  if (!(ecma_is_value_undefined (separator_value) || ecma_is_value_null (separator_value)))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (ecma_op_to_object (separator_value));\n    ecma_value_t split_symbol = ecma_op_object_get_by_symbol_id (obj_p, LIT_GLOBAL_SYMBOL_SPLIT);\n    ecma_deref_object (obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (split_symbol))\n    {\n      return split_symbol;\n    }\n\n    if (!ecma_is_value_undefined (split_symbol) && !ecma_is_value_null (split_symbol))\n    {\n      if (!ecma_op_is_callable (split_symbol))\n      {\n        ecma_free_value (split_symbol);\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"@@split is not callable\"));\n      }\n\n      ecma_object_t *split_method_p = ecma_get_object_from_value (split_symbol);\n\n      ecma_value_t arguments[] = { this_value, limit_value };\n      ecma_value_t split_result = ecma_op_function_call (split_method_p, separator_value, arguments, 2);\n\n      ecma_deref_object (split_method_p);\n      return split_result;\n    }\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  if (ecma_object_is_regexp_object (separator_value))\n  {\n    return ecma_regexp_split_helper (separator_value, this_value, limit_value);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t result = ECMA_VALUE_ERROR;\n\n  /* 4. */\n  ecma_string_t *string_p = ecma_op_to_string (this_value);\n  if (string_p == NULL)\n  {\n    return result;\n  }\n\n  /* 8. */\n  uint32_t limit = UINT32_MAX - 1;\n\n  if (!ecma_is_value_undefined (limit_value))\n  {\n    /* ECMA-262 v11, 21.1.3.20 6 */\n    ecma_number_t num;\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (limit_value, &num)))\n    {\n      goto cleanup_string;\n    }\n    limit = ecma_number_to_uint32 (num);\n  }\n\n  /* 12. */\n  ecma_string_t *separator_p = ecma_op_to_string (separator_value);\n  if (separator_p == NULL)\n  {\n    goto cleanup_string;\n  }\n\n  /* 6. */\n  ecma_object_t *array_p = ecma_op_new_array_object (0);\n  result = ecma_make_object_value (array_p);\n\n  /* 14. */\n  if (limit == 0)\n  {\n    goto cleanup_separator;\n  }\n\n  /* 6. */\n  lit_utf8_size_t array_length = 0;\n\n  /* 15. */\n  if (ecma_is_value_undefined (separator_value))\n  {\n    ecma_value_t put_result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                                     array_length,\n                                                                     ecma_make_string_value (string_p),\n                                                                     ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n    JERRY_ASSERT (put_result == ECMA_VALUE_TRUE);\n    goto cleanup_separator;\n  }\n\n  /* 16. */\n  if (ecma_string_is_empty (string_p))\n  {\n    if (!ecma_string_is_empty (separator_p))\n    {\n      ecma_value_t put_result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                                       array_length,\n                                                                       ecma_make_string_value (string_p),\n                                                                       ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n      JERRY_ASSERT (put_result == ECMA_VALUE_TRUE);\n    }\n\n    goto cleanup_separator;\n  }\n\n  lit_utf8_size_t string_size;\n  uint8_t string_flags = ECMA_STRING_FLAG_IS_ASCII;\n  const lit_utf8_byte_t *string_buffer_p = ecma_string_get_chars (string_p,\n                                                                  &string_size,\n                                                                  NULL,\n                                                                  NULL,\n                                                                  &string_flags);\n  lit_utf8_size_t separator_size;\n  uint8_t separator_flags = ECMA_STRING_FLAG_IS_ASCII;\n  const lit_utf8_byte_t *separator_buffer_p = ecma_string_get_chars (separator_p,\n                                                                     &separator_size,\n                                                                     NULL,\n                                                                     NULL,\n                                                                     &separator_flags);\n\n  const lit_utf8_byte_t *const string_end_p = string_buffer_p + string_size;\n  const lit_utf8_byte_t *const compare_end_p = JERRY_MIN (string_end_p - separator_size + 1,\n                                                          string_end_p);\n  const lit_utf8_byte_t *current_p = string_buffer_p;\n  const lit_utf8_byte_t *last_str_begin_p = string_buffer_p;\n\n  while (current_p < compare_end_p)\n  {\n    if (!memcmp (current_p, separator_buffer_p, separator_size)\n        && (last_str_begin_p != current_p + separator_size))\n    {\n      ecma_string_t *substr_p = ecma_new_ecma_string_from_utf8 (last_str_begin_p,\n                                                                (lit_utf8_size_t) (current_p - last_str_begin_p));\n      ecma_value_t put_result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                                       array_length++,\n                                                                       ecma_make_string_value (substr_p),\n                                                                       ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n      JERRY_ASSERT (put_result == ECMA_VALUE_TRUE);\n      ecma_deref_ecma_string (substr_p);\n\n      if (array_length >= limit)\n      {\n        goto cleanup_buffers;\n      }\n\n      current_p += separator_size;\n      last_str_begin_p = current_p;\n      continue;\n    }\n\n    lit_utf8_incr (&current_p);\n  }\n\n  ecma_string_t *end_substr_p = ecma_new_ecma_string_from_utf8 (last_str_begin_p,\n                                                                (lit_utf8_size_t) (string_end_p - last_str_begin_p));\n  ecma_value_t put_result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                                   array_length,\n                                                                   ecma_make_string_value (end_substr_p),\n                                                                   ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n  JERRY_ASSERT (put_result == ECMA_VALUE_TRUE);\n  ecma_deref_ecma_string (end_substr_p);\n\ncleanup_buffers:\n  if (string_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) string_buffer_p, string_size);\n  }\n\n  if (separator_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) separator_buffer_p, separator_size);\n  }\n\ncleanup_separator:\n  ecma_deref_ecma_string (separator_p);\ncleanup_string:\n  ecma_deref_ecma_string (string_p);\n  return result;\n} /* ecma_builtin_string_prototype_object_split */\n\n/**\n * The String.prototype object's 'substring' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.15\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_substring (ecma_string_t *original_string_p, /**< this argument */\n                                                ecma_value_t arg1, /**< routine's first argument */\n                                                ecma_value_t arg2) /**< routine's second argument */\n{\n  /* 3 */\n  const lit_utf8_size_t len = ecma_string_get_length (original_string_p);\n  lit_utf8_size_t start = 0, end = len;\n\n  /* 4 */\n  ecma_number_t start_num;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (arg1, &start_num)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 6 */\n  start = (uint32_t) JERRY_MIN (JERRY_MAX (start_num, 0), len);\n\n  /* 5 */\n  if (ecma_is_value_undefined (arg2))\n  {\n    end = len;\n  }\n  else\n  {\n    /* 5 part 2 */\n    ecma_number_t end_num;\n\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (arg2, &end_num)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n    /* 7 */\n    end = (uint32_t) JERRY_MIN (JERRY_MAX (end_num, 0), len);\n  }\n\n  JERRY_ASSERT (start <= len && end <= len);\n\n  /* 8 */\n  uint32_t from = start < end ? start : end;\n\n  /* 9 */\n  uint32_t to = start > end ? start : end;\n\n  /* 10 */\n  ecma_string_t *new_str_p = ecma_string_substr (original_string_p, from, to);\n  return ecma_make_string_value (new_str_p);\n} /* ecma_builtin_string_prototype_object_substring */\n\n/**\n * The common implementation of the String.prototype object's\n * 'toLowerCase', 'toLocaleLowerCase', 'toUpperCase', 'toLocalUpperCase' routines\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.16\n *          ECMA-262 v5, 15.5.4.17\n *          ECMA-262 v5, 15.5.4.18\n *          ECMA-262 v5, 15.5.4.19\n *\n * Helper function to convert a string to upper or lower case.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_conversion_helper (ecma_string_t *input_string_p, /**< this argument */\n                                                        bool lower_case) /**< convert to lower (true)\n                                                                          *   or upper (false) case */\n{\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  ECMA_STRING_TO_UTF8_STRING (input_string_p, input_start_p, input_start_size);\n\n  const lit_utf8_byte_t *input_curr_p = input_start_p;\n  const lit_utf8_byte_t *input_str_end_p = input_start_p + input_start_size;\n\n  while (input_curr_p < input_str_end_p)\n  {\n    lit_code_point_t cp = lit_cesu8_read_next (&input_curr_p);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (lit_is_code_point_utf16_high_surrogate (cp)\n        && input_curr_p < input_str_end_p)\n    {\n      const ecma_char_t next_ch = lit_cesu8_peek_next (input_curr_p);\n      if (lit_is_code_point_utf16_low_surrogate (next_ch))\n      {\n        cp = lit_convert_surrogate_pair_to_code_point ((ecma_char_t) cp, next_ch);\n        input_curr_p += LIT_UTF8_MAX_BYTES_IN_CODE_UNIT;\n      }\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (lower_case)\n    {\n      lit_char_to_lower_case (cp, &builder);\n    }\n    else\n    {\n      lit_char_to_upper_case (cp, &builder);\n    }\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (input_start_p, input_start_size);\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_string_prototype_object_conversion_helper */\n\n/**\n * The String.prototype object's 'trim' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.4.20\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_trim (ecma_string_t *original_string_p) /**< this argument */\n{\n  ecma_string_t *trimmed_string_p = ecma_string_trim (original_string_p);\n\n  return ecma_make_string_value (trimmed_string_p);\n} /* ecma_builtin_string_prototype_object_trim */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * The String.prototype object's 'repeat' routine\n *\n * See also:\n *          ECMA-262 v6, 21.1.3.13\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_repeat (ecma_string_t *original_string_p, /**< this argument */\n                                             ecma_value_t repeat) /**< times to repeat */\n{\n  ecma_string_t *ret_string_p;\n\n  /* 4 */\n  ecma_number_t count_number;\n  ecma_value_t count_value = ecma_op_to_integer (repeat, &count_number);\n\n  /* 5 */\n  if (ECMA_IS_VALUE_ERROR (count_value))\n  {\n    return count_value;\n  }\n\n  int32_t repeat_count = ecma_number_to_int32 (count_number);\n\n  bool isNan = ecma_number_is_nan (count_number);\n\n  /* 6, 7 */\n  if (count_number < 0 || (!isNan && ecma_number_is_infinity (count_number)))\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid count value\"));\n  }\n\n  lit_utf8_size_t size = ecma_string_get_size (original_string_p);\n\n  if (repeat_count == 0 || size == 0 || isNan)\n  {\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  if ((uint32_t) repeat_count >= (ECMA_STRING_SIZE_LIMIT / size))\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid string length\"));\n  }\n\n  lit_utf8_size_t total_size = size * (lit_utf8_size_t) repeat_count;\n\n  JMEM_DEFINE_LOCAL_ARRAY (str_buffer, total_size, lit_utf8_byte_t);\n\n  lit_utf8_byte_t *buffer_ptr = str_buffer;\n\n  for (int32_t n = 0; n < repeat_count; n++)\n  {\n    buffer_ptr += ecma_string_copy_to_cesu8_buffer (original_string_p, buffer_ptr,\n                                                    (lit_utf8_size_t) (size));\n  }\n\n  ret_string_p = ecma_new_ecma_string_from_utf8 (str_buffer, (lit_utf8_size_t) (buffer_ptr - str_buffer));\n  JMEM_FINALIZE_LOCAL_ARRAY (str_buffer);\n\n  return ecma_make_string_value (ret_string_p);\n} /* ecma_builtin_string_prototype_object_repeat */\n\n/**\n * The String.prototype object's 'codePointAt' routine\n *\n * See also:\n *          ECMA-262 v6, 21.1.3.3\n *\n * @return lit_code_point_t\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_code_point_at (ecma_string_t *this_string_p, /**< this argument */\n                                                    ecma_value_t pos) /**< given position */\n{\n  ecma_number_t pos_num;\n  ecma_value_t error = ecma_op_to_integer (pos, &pos_num);\n\n  if (ECMA_IS_VALUE_ERROR (error))\n  {\n    return error;\n  }\n\n  lit_utf8_size_t length = ecma_string_get_length (this_string_p);\n\n  if (pos_num < 0 || pos_num >= length)\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  uint32_t index = (uint32_t) pos_num;\n\n  ecma_char_t first = ecma_string_get_char_at_pos (this_string_p, index);\n\n  if (first < LIT_UTF16_HIGH_SURROGATE_MIN\n      || first > LIT_UTF16_HIGH_SURROGATE_MAX\n      || index + 1 == length)\n  {\n    return ecma_make_uint32_value (first);\n  }\n\n  ecma_char_t second = ecma_string_get_char_at_pos (this_string_p, index + 1);\n\n  if (second < LIT_UTF16_LOW_SURROGATE_MARKER\n      || second > LIT_UTF16_LOW_SURROGATE_MAX)\n  {\n    return ecma_make_uint32_value (first);\n  }\n\n  return ecma_make_uint32_value (lit_convert_surrogate_pair_to_code_point (first, second));\n} /* ecma_builtin_string_prototype_object_code_point_at */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n\n/**\n * The String.prototype object's 'substr' routine\n *\n * See also:\n *          ECMA-262 v5, B.2.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_substr (ecma_string_t *this_string_p, /**< this argument */\n                                             ecma_value_t start, /**< routine's first argument */\n                                             ecma_value_t length) /**< routine's second argument */\n{\n  /* 2. */\n  ecma_number_t start_num;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (start, &start_num)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 3. */\n  ecma_number_t length_num = ecma_number_make_infinity (false);\n\n  if (!ecma_is_value_undefined (length))\n  {\n    ecma_number_t len;\n\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (length, &len)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    length_num = ecma_number_is_nan (len) ? 0 : len;\n  }\n\n  /* 4. */\n  lit_utf8_size_t this_len = ecma_string_get_length (this_string_p);\n\n  /* 5. */\n  uint32_t from = (uint32_t) ((start_num < 0) ? JERRY_MAX (this_len + start_num, 0) : start_num);\n\n  if (from > this_len)\n  {\n    from = this_len;\n  }\n\n  /* 6. */\n  ecma_number_t to_num = JERRY_MIN (JERRY_MAX (length_num, 0), this_len - from);\n\n  /* 7. */\n  uint32_t to = from + (uint32_t) to_num;\n\n  /* 8. */\n  ecma_string_t *new_str_p = ecma_string_substr (this_string_p, from, to);\n  return ecma_make_string_value (new_str_p);\n} /* ecma_builtin_string_prototype_object_substr */\n\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * The String.prototype object's @@iterator routine\n *\n * See also:\n *          ECMA-262 v6, 21.1.3.27\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_prototype_object_iterator (ecma_value_t to_string) /**< this argument */\n{\n  return ecma_op_create_iterator_object (ecma_copy_value (to_string),\n                                         ecma_builtin_get (ECMA_BUILTIN_ID_STRING_ITERATOR_PROTOTYPE),\n                                         ECMA_PSEUDO_STRING_ITERATOR,\n                                         ECMA_ITERATOR_VALUES);\n} /* ecma_builtin_string_prototype_object_iterator */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_string_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine\n                                                                             *   identifier */\n                                                ecma_value_t this_arg, /**< 'this' argument value */\n                                                const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                        *   passed to routine */\n                                                uint32_t arguments_number) /**< length of arguments' list */\n{\n  if (builtin_routine_id <= ECMA_STRING_PROTOTYPE_VALUE_OF)\n  {\n    return ecma_builtin_string_prototype_object_to_string (this_arg);\n  }\n\n  if (!ecma_op_require_object_coercible (this_arg))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t arg1 = arguments_list_p[0];\n  ecma_value_t arg2 = arguments_list_p[1];\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  if (builtin_routine_id == ECMA_STRING_PROTOTYPE_MATCH)\n  {\n    return ecma_builtin_string_prototype_object_match (this_arg, arg1);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (builtin_routine_id == ECMA_STRING_PROTOTYPE_MATCH_ALL)\n  {\n    return ecma_builtin_string_prototype_object_match_all (this_arg, arg1);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n  if (builtin_routine_id <= ECMA_STRING_PROTOTYPE_CHAR_CODE_AT)\n  {\n    return ecma_builtin_string_prototype_char_at_helper (this_arg,\n                                                         arg1,\n                                                         builtin_routine_id == ECMA_STRING_PROTOTYPE_CHAR_CODE_AT);\n  }\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  if (builtin_routine_id == ECMA_STRING_PROTOTYPE_REPLACE)\n  {\n    return ecma_builtin_string_prototype_object_replace_helper (this_arg, arg1, arg2, false);\n  }\n#if ENABLED (JERRY_ESNEXT)\n  else if (builtin_routine_id == ECMA_STRING_PROTOTYPE_REPLACE_ALL)\n  {\n    return ecma_builtin_string_prototype_object_replace_helper (this_arg, arg1, arg2, true);\n  }\n#endif /* ENABLED (JERRY_ESNEXT)  */\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n  ecma_string_t *string_p = ecma_op_to_string (this_arg);\n\n  if (JERRY_UNLIKELY (string_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t to_string_val = ecma_make_string_value (string_p);\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_STRING_PROTOTYPE_CONCAT:\n    {\n      ret_value = ecma_builtin_string_prototype_object_concat (string_p, arguments_list_p, arguments_number);\n      break;\n    }\n    case ECMA_STRING_PROTOTYPE_SLICE:\n    {\n      ret_value = ecma_builtin_string_prototype_object_slice (string_p, arg1, arg2);\n      break;\n    }\n    case ECMA_STRING_PROTOTYPE_LAST_INDEX_OF:\n    case ECMA_STRING_PROTOTYPE_INDEX_OF:\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_STRING_PROTOTYPE_STARTS_WITH:\n    case ECMA_STRING_PROTOTYPE_INCLUDES:\n    case ECMA_STRING_PROTOTYPE_ENDS_WITH:\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n      ecma_string_index_of_mode_t mode;\n      mode = (ecma_string_index_of_mode_t) (builtin_routine_id - ECMA_STRING_PROTOTYPE_LAST_INDEX_OF);\n      ret_value = ecma_builtin_helper_string_prototype_object_index_of (string_p, arg1, arg2, mode);\n      break;\n    }\n    case ECMA_STRING_PROTOTYPE_LOCALE_COMPARE:\n    {\n      ret_value = ecma_builtin_string_prototype_object_locale_compare (string_p, arg1);\n      break;\n    }\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n    case ECMA_STRING_PROTOTYPE_SEARCH:\n    {\n      ret_value = ecma_builtin_string_prototype_object_search (to_string_val, arg1);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n    case ECMA_STRING_PROTOTYPE_SPLIT:\n    {\n      ret_value = ecma_builtin_string_prototype_object_split (to_string_val, arg1, arg2);\n      break;\n    }\n    case ECMA_STRING_PROTOTYPE_SUBSTRING:\n    {\n      ret_value = ecma_builtin_string_prototype_object_substring (string_p, arg1, arg2);\n      break;\n    }\n    case ECMA_STRING_PROTOTYPE_TO_LOWER_CASE:\n    case ECMA_STRING_PROTOTYPE_TO_LOCAL_LOWER_CASE:\n    case ECMA_STRING_PROTOTYPE_TO_UPPER_CASE:\n    case ECMA_STRING_PROTOTYPE_TO_LOCAL_UPPER_CASE:\n    {\n      bool is_lower_case = builtin_routine_id <= ECMA_STRING_PROTOTYPE_TO_LOCAL_LOWER_CASE;\n      ret_value = ecma_builtin_string_prototype_object_conversion_helper (string_p, is_lower_case);\n      break;\n    }\n    case ECMA_STRING_PROTOTYPE_TRIM:\n    {\n      ret_value = ecma_builtin_string_prototype_object_trim (string_p);\n      break;\n    }\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\n    case ECMA_STRING_PROTOTYPE_SUBSTR:\n    {\n      ret_value = ecma_builtin_string_prototype_object_substr (string_p, arg1, arg2);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_STRING_PROTOTYPE_REPEAT:\n    {\n      ret_value = ecma_builtin_string_prototype_object_repeat (string_p, arg1);\n      break;\n    }\n    case ECMA_STRING_PROTOTYPE_CODE_POINT_AT:\n    {\n      ret_value = ecma_builtin_string_prototype_object_code_point_at (string_p, arg1);\n      break;\n    }\n    case ECMA_STRING_PROTOTYPE_ITERATOR:\n    {\n      ret_value = ecma_builtin_string_prototype_object_iterator (to_string_val);\n      break;\n    }\n    case ECMA_STRING_PROTOTYPE_PAD_END:\n    case ECMA_STRING_PROTOTYPE_PAD_START:\n    {\n      ret_value = ecma_string_pad (to_string_val, arg1, arg2, builtin_routine_id == ECMA_STRING_PROTOTYPE_PAD_START);\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n\n  ecma_deref_ecma_string (string_p);\n\n  return ret_value;\n} /* ecma_builtin_string_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * String.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_STRING)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.5.4.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_STRING,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* Number properties:\n *  (property name, number value) */\n\n/* ECMA-262 v5, 15.5.4 (String.prototype is itself a String object whose value is an empty String), 15.5.5.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FIXED)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_STRING_PROTOTYPE_TO_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_STRING_PROTOTYPE_VALUE_OF, 0, 0)\nROUTINE (LIT_MAGIC_STRING_CONCAT, ECMA_STRING_PROTOTYPE_CONCAT, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_SLICE, ECMA_STRING_PROTOTYPE_SLICE, 2, 2)\nROUTINE (LIT_MAGIC_STRING_INDEX_OF_UL, ECMA_STRING_PROTOTYPE_INDEX_OF, 2, 1)\nROUTINE (LIT_MAGIC_STRING_LAST_INDEX_OF_UL, ECMA_STRING_PROTOTYPE_LAST_INDEX_OF, 2, 1)\nROUTINE (LIT_MAGIC_STRING_CHAR_AT_UL, ECMA_STRING_PROTOTYPE_CHAR_AT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_CHAR_CODE_AT_UL, ECMA_STRING_PROTOTYPE_CHAR_CODE_AT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_LOCALE_COMPARE_UL, ECMA_STRING_PROTOTYPE_LOCALE_COMPARE, 1, 1)\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\nROUTINE (LIT_MAGIC_STRING_MATCH, ECMA_STRING_PROTOTYPE_MATCH, 1, 1)\nROUTINE (LIT_MAGIC_STRING_REPLACE, ECMA_STRING_PROTOTYPE_REPLACE, 2, 2)\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_REPLACE_ALL, ECMA_STRING_PROTOTYPE_REPLACE_ALL, 2, 2)\n#endif /* ENABLED (JERRY_ESNEXT) */\nROUTINE (LIT_MAGIC_STRING_SEARCH, ECMA_STRING_PROTOTYPE_SEARCH, 1, 1)\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\nROUTINE (LIT_MAGIC_STRING_SPLIT, ECMA_STRING_PROTOTYPE_SPLIT, 2, 2)\nROUTINE (LIT_MAGIC_STRING_SUBSTRING, ECMA_STRING_PROTOTYPE_SUBSTRING, 2, 2)\nROUTINE (LIT_MAGIC_STRING_TO_LOWER_CASE_UL, ECMA_STRING_PROTOTYPE_TO_LOWER_CASE, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_LOCALE_LOWER_CASE_UL, ECMA_STRING_PROTOTYPE_TO_LOCAL_LOWER_CASE, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_UPPER_CASE_UL, ECMA_STRING_PROTOTYPE_TO_UPPER_CASE, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TO_LOCALE_UPPER_CASE_UL, ECMA_STRING_PROTOTYPE_TO_LOCAL_UPPER_CASE, 0, 0)\nROUTINE (LIT_MAGIC_STRING_TRIM, ECMA_STRING_PROTOTYPE_TRIM, 0, 0)\n\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\nROUTINE (LIT_MAGIC_STRING_SUBSTR, ECMA_STRING_PROTOTYPE_SUBSTR, 2, 2)\n#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */\n\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_REPEAT, ECMA_STRING_PROTOTYPE_REPEAT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_STARTS_WITH, ECMA_STRING_PROTOTYPE_STARTS_WITH, 2, 1)\nROUTINE (LIT_MAGIC_STRING_INCLUDES, ECMA_STRING_PROTOTYPE_INCLUDES, 2, 1)\nROUTINE (LIT_MAGIC_STRING_ENDS_WITH, ECMA_STRING_PROTOTYPE_ENDS_WITH, 2, 1)\nROUTINE (LIT_MAGIC_STRING_CODE_POINT_AT, ECMA_STRING_PROTOTYPE_CODE_POINT_AT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_PAD_START,  ECMA_STRING_PROTOTYPE_PAD_START, 2, 1)\nROUTINE (LIT_MAGIC_STRING_PAD_END,  ECMA_STRING_PROTOTYPE_PAD_END, 2, 1)\nROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ECMA_STRING_PROTOTYPE_ITERATOR, 0, 0)\nROUTINE (LIT_MAGIC_STRING_MATCH_ALL, ECMA_STRING_PROTOTYPE_MATCH_ALL, 1, 1)\n\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_TRIM_START, LIT_MAGIC_STRING_TRIM_START,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_TRIM_LEFT, LIT_MAGIC_STRING_TRIM_START,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_TRIM_END, LIT_MAGIC_STRING_TRIM_END,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_TRIM_RIGHT, LIT_MAGIC_STRING_TRIM_END,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"lit-strings.h\"\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#if ENABLED (JERRY_ESNEXT)\n#include \"ecma-symbol-object.h\"\n#endif /* ENABLED (JERRY_ESNEXT) */\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_STRING)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-string.inc.h\"\n#define BUILTIN_UNDERSCORED_ID string\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup string ECMA String object built-in\n * @{\n */\n\n/**\n * The String object's 'fromCharCode' routine\n *\n * See also:\n *          ECMA-262 v5, 15.5.3.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_object_from_char_code (ecma_value_t this_arg, /**< 'this' argument */\n                                           const ecma_value_t args[], /**< arguments list */\n                                           uint32_t args_number) /**< number of arguments */\n{\n  JERRY_UNUSED (this_arg);\n\n  if (args_number == 0)\n  {\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  lit_utf8_size_t utf8_buf_size = args_number * LIT_CESU8_MAX_BYTES_IN_CODE_UNIT;\n  ecma_string_t *ret_string_p = NULL;\n  bool isError = false;\n\n  JMEM_DEFINE_LOCAL_ARRAY (utf8_buf_p,\n                           utf8_buf_size,\n                           lit_utf8_byte_t);\n\n  lit_utf8_size_t utf8_buf_used = 0;\n\n  for (uint32_t arg_index = 0;\n       arg_index < args_number;\n       arg_index++)\n  {\n    ecma_number_t arg_num;\n\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (args[arg_index], &arg_num)))\n    {\n      isError = true;\n      break;\n    }\n\n    uint32_t uint32_char_code = ecma_number_to_uint32 (arg_num);\n    ecma_char_t code_unit = (uint16_t) uint32_char_code;\n\n    JERRY_ASSERT (utf8_buf_used <= utf8_buf_size - LIT_UTF8_MAX_BYTES_IN_CODE_UNIT);\n    utf8_buf_used += lit_code_unit_to_utf8 (code_unit, utf8_buf_p + utf8_buf_used);\n    JERRY_ASSERT (utf8_buf_used <= utf8_buf_size);\n  }\n\n  if (!isError)\n  {\n    ret_string_p = ecma_new_ecma_string_from_utf8 (utf8_buf_p, utf8_buf_used);\n  }\n\n  JMEM_FINALIZE_LOCAL_ARRAY (utf8_buf_p);\n\n  return isError ? ECMA_VALUE_ERROR : ecma_make_string_value (ret_string_p);\n} /* ecma_builtin_string_object_from_char_code */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * The String object's 'raw' routine\n *\n * See also:\n *          ECMA-262 v6, 21.1.2.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_object_raw (ecma_value_t this_arg, /**< 'this' argument */\n                                const ecma_value_t args[], /**< arguments list */\n                                uint32_t args_number) /**< number of arguments */\n{\n  JERRY_UNUSED (this_arg);\n\n  /* 1 - 2. */\n  const ecma_value_t *substitutions;\n  uint32_t number_of_substitutions;\n\n  if (args_number > 1)\n  {\n    substitutions = args + 1;\n    number_of_substitutions = args_number - 1;\n  }\n  else\n  {\n    substitutions = NULL;\n    number_of_substitutions = 0;\n  }\n\n  /* 3. */\n  ecma_value_t template = args_number > 0 ? args[0] : ECMA_VALUE_UNDEFINED;\n\n  ecma_value_t cooked = ecma_op_to_object (template);\n\n  /* 4. */\n  if (ECMA_IS_VALUE_ERROR (cooked))\n  {\n    return cooked;\n  }\n\n  ecma_object_t *cooked_obj_p = ecma_get_object_from_value (cooked);\n\n  /* 5. */\n  ecma_value_t raw = ecma_op_object_get_by_magic_id (cooked_obj_p, LIT_MAGIC_STRING_RAW);\n\n  ecma_deref_object (cooked_obj_p);\n\n  if (ECMA_IS_VALUE_ERROR (raw))\n  {\n    return raw;\n  }\n\n  ecma_value_t raw_obj = ecma_op_to_object (raw);\n\n  /* 6. */\n  if (ECMA_IS_VALUE_ERROR (raw_obj))\n  {\n    ecma_free_value (raw);\n    return raw_obj;\n  }\n\n  ecma_object_t *raw_obj_p = ecma_get_object_from_value (raw_obj);\n\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n\n  /* 7 - 8. */\n  ecma_length_t literal_segments;\n  if (ECMA_IS_VALUE_ERROR (ecma_op_object_get_length (raw_obj_p, &literal_segments)))\n  {\n    goto cleanup;\n  }\n\n  /* 9. */\n  if (literal_segments == 0)\n  {\n    ret_value = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n    goto cleanup;\n  }\n\n  /* 10. */\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  /* 11. */\n  ecma_length_t next_index = 0;\n\n  /* 12. */\n  while (true)\n  {\n    /* 12.a,b */\n    ecma_value_t next_seg = ecma_op_object_get_by_index (raw_obj_p, next_index);\n\n    if (ECMA_IS_VALUE_ERROR (next_seg))\n    {\n      goto builder_cleanup;\n    }\n\n    ecma_string_t *next_seg_srt_p = ecma_op_to_string (next_seg);\n\n    /* 12.c */\n    if (JERRY_UNLIKELY (next_seg_srt_p == NULL))\n    {\n      ecma_free_value (next_seg);\n      goto builder_cleanup;\n    }\n\n    /* 12.d */\n    ecma_stringbuilder_append (&builder, next_seg_srt_p);\n\n    ecma_deref_ecma_string (next_seg_srt_p);\n    ecma_free_value (next_seg);\n\n    /* 12.e */\n    if (next_index + 1 == literal_segments)\n    {\n      ret_value = ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n      goto cleanup;\n    }\n\n    /* 12.f-g */\n    if (next_index >= number_of_substitutions)\n    {\n      next_index++;\n      continue;\n    }\n\n    /* 12.h */\n    ecma_string_t *next_sub_p = ecma_op_to_string (substitutions[next_index]);\n\n    /* 12.i */\n    if (JERRY_UNLIKELY (next_sub_p == NULL))\n    {\n      goto builder_cleanup;\n    }\n\n    /* 12.j */\n    ecma_stringbuilder_append (&builder, next_sub_p);\n    ecma_deref_ecma_string (next_sub_p);\n\n    /* 12.k */\n    next_index++;\n  }\n\nbuilder_cleanup:\n  ecma_stringbuilder_destroy (&builder);\n\ncleanup:\n  ecma_deref_object (raw_obj_p);\n  ecma_free_value (raw);\n\n  return ret_value;\n} /* ecma_builtin_string_object_raw */\n\n/**\n * The String object's 'fromCodePoint' routine\n *\n * See also:\n *          ECMA-262 v6, 21.1.2.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_string_object_from_code_point (ecma_value_t this_arg, /**< 'this' argument */\n                                            const ecma_value_t args[], /**< arguments list */\n                                            uint32_t args_number) /**< number of arguments */\n{\n  JERRY_UNUSED (this_arg);\n\n  if (args_number == 0)\n  {\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  for (uint32_t index = 0; index < args_number; index++)\n  {\n    ecma_number_t to_number_num;\n    ecma_value_t to_number_value = ecma_op_to_number (args[index], &to_number_num);\n\n    if (ECMA_IS_VALUE_ERROR (to_number_value))\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return to_number_value;\n    }\n\n    if (!ecma_op_is_integer (to_number_num))\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return ecma_raise_range_error (\"Error: Invalid code point\");\n    }\n\n    ecma_free_value (to_number_value);\n\n    if (to_number_num < 0 || to_number_num > LIT_UNICODE_CODE_POINT_MAX)\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return ecma_raise_range_error (ECMA_ERR_MSG (\"Error: Invalid code point\"));\n    }\n\n    lit_code_point_t code_point = (lit_code_point_t) to_number_num;\n\n    ecma_char_t converted_cp[2];\n    uint8_t encoded_size = lit_utf16_encode_code_point (code_point, converted_cp);\n\n    for (uint8_t i = 0; i < encoded_size; i++)\n    {\n      ecma_stringbuilder_append_char (&builder, converted_cp[i]);\n    }\n  }\n\n  ecma_string_t *ret_str_p = ecma_stringbuilder_finalize (&builder);\n\n  return ecma_make_string_value (ret_str_p);\n} /* ecma_builtin_string_object_from_code_point */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Handle calling [[Call]] of built-in String object\n *\n * See also:\n *          ECMA-262 v6, 21.1.1.1\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_string_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                   uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  /* 1. */\n  if (arguments_list_len == 0)\n  {\n    ret_value = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n#if ENABLED (JERRY_ESNEXT)\n  /* 2.a */\n  else if (ecma_is_value_symbol (arguments_list_p[0]))\n  {\n    ret_value = ecma_get_symbol_descriptive_string (arguments_list_p[0]);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  /* 2.b */\n  else\n  {\n    ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]);\n    if (JERRY_UNLIKELY (str_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    ret_value = ecma_make_string_value (str_p);\n  }\n\n  return ret_value;\n} /* ecma_builtin_string_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in String object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_string_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_op_create_string_object (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_string_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * String built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_STRING)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.7.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_STRING_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_STRING_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_FROM_CHAR_CODE_UL, ecma_builtin_string_object_from_char_code, NON_FIXED, 1)\n\n#if ENABLED (JERRY_ESNEXT)\nROUTINE (LIT_MAGIC_STRING_FROM_CODE_POINT_UL, ecma_builtin_string_object_from_code_point, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_RAW, ecma_builtin_string_object_raw, NON_FIXED, 1)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-symbol-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n #include \"ecma-alloc.h\"\n #include \"ecma-builtins.h\"\n #include \"ecma-conversion.h\"\n #include \"ecma-exceptions.h\"\n #include \"ecma-gc.h\"\n #include \"ecma-globals.h\"\n #include \"ecma-helpers.h\"\n #include \"ecma-objects.h\"\n #include \"ecma-symbol-object.h\"\n #include \"jrt.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_SYMBOL_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_SYMBOL_PROTOTYPE_VALUE_OF, /**< ECMA-262 v11, 19.4.3.4 */\n  ECMA_SYMBOL_PROTOTYPE_TO_PRIMITIVE, /**< ECMA-262 v11, 19.4.3.5 */\n  ECMA_SYMBOL_PROTOTYPE_TO_STRING, /**< ECMA-262 v11, 19.4.3.3 */\n  ECMA_SYMBOL_PROTOTYPE_DESCRIPTION, /**< ECMA-262 v11, 19.4.3.2 */\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-symbol-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID symbol_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup symbolprototype ECMA Symbol prototype object built-in\n * @{\n */\n\n/**\n * Dispatcher of the Symbol built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_symbol_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                                ecma_value_t this_arg, /**< 'this' argument value */\n                                                const ecma_value_t arguments_list[], /**< list of arguments\n                                                                                      *   passed to routine */\n                                                uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED_2 (arguments_list, arguments_number);\n\n  ecma_value_t sym = ecma_symbol_this_value (this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (sym))\n  {\n    return sym;\n  }\n\n  if (builtin_routine_id < ECMA_SYMBOL_PROTOTYPE_TO_STRING)\n  {\n    return ecma_copy_value (sym);\n  }\n\n  if (builtin_routine_id == ECMA_SYMBOL_PROTOTYPE_TO_STRING)\n  {\n    return ecma_get_symbol_descriptive_string (sym);\n  }\n\n  JERRY_ASSERT (builtin_routine_id == ECMA_SYMBOL_PROTOTYPE_DESCRIPTION);\n  ecma_string_t *symbol_p = ecma_get_symbol_from_value (sym);\n  ecma_value_t desc = ecma_get_symbol_description (symbol_p);\n  if (ecma_is_value_undefined (desc))\n  {\n    return desc;\n  }\n\n  ecma_string_t *desc_p = ecma_get_string_from_value (desc);\n  ecma_ref_ecma_string (desc_p);\n  return desc;\n} /* ecma_builtin_symbol_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-symbol-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Symbol prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_SYMBOL,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\nROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_SYMBOL_PROTOTYPE_TO_STRING, 0, 0)\nROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_SYMBOL_PROTOTYPE_VALUE_OF, 0, 0)\nROUTINE_CONFIGURABLE_ONLY (LIT_GLOBAL_SYMBOL_TO_PRIMITIVE,\n                           ECMA_SYMBOL_PROTOTYPE_TO_PRIMITIVE,\n                           0,\n                           1)\n\n/* ECMA-262 v6, 19.4.3.4 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_SYMBOL_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262, v11, 19.4.3.2 */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_DESCRIPTION,\n                    ECMA_SYMBOL_PROTOTYPE_DESCRIPTION,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n #include \"ecma-alloc.h\"\n #include \"ecma-builtins.h\"\n #include \"ecma-conversion.h\"\n #include \"ecma-exceptions.h\"\n #include \"ecma-gc.h\"\n #include \"ecma-globals.h\"\n #include \"ecma-helpers.h\"\n #include \"ecma-objects.h\"\n #include \"ecma-symbol-object.h\"\n #include \"ecma-literal-storage.h\"\n #include \"jcontext.h\"\n #include \"jrt.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-symbol.inc.h\"\n#define BUILTIN_UNDERSCORED_ID symbol\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup symbol ECMA Symbol object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in Symbol object.\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_symbol_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                   uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_op_create_symbol (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_symbol_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in Symbol object.\n *\n * Symbol constructor is not intended to be used\n * with the new operator or to be subclassed.\n *\n * See also:\n *          ECMA-262 v6, 19.4.1\n * @return ecma value\n */\necma_value_t\necma_builtin_symbol_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Symbol is not a constructor.\"));\n} /* ecma_builtin_symbol_dispatch_construct */\n\n/**\n * Helper function for Symbol object's 'for' and `keyFor`\n * routines common parts\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_symbol_for_helper (ecma_value_t value_to_find) /**< symbol or ecma-string */\n{\n  ecma_string_t *string_p;\n\n  bool is_for = ecma_is_value_string (value_to_find);\n\n  if (is_for)\n  {\n    string_p = ecma_get_string_from_value (value_to_find);\n  }\n  else\n  {\n    string_p = ecma_get_symbol_from_value (value_to_find);\n  }\n\n  jmem_cpointer_t symbol_list_cp = JERRY_CONTEXT (symbol_list_first_cp);\n  jmem_cpointer_t *empty_cpointer_p = NULL;\n\n  while (symbol_list_cp != JMEM_CP_NULL)\n  {\n    ecma_lit_storage_item_t *symbol_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t,\n                                                                           symbol_list_cp);\n\n    for (int i = 0; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n    {\n      if (symbol_list_p->values[i] != JMEM_CP_NULL)\n      {\n        ecma_string_t *value_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_string_t,\n                                                               symbol_list_p->values[i]);\n\n        if (is_for)\n        {\n          ecma_value_t symbol_desc = ecma_get_symbol_description (value_p);\n\n          if (ecma_is_value_undefined (symbol_desc))\n          {\n            ecma_ref_ecma_string (value_p);\n            return ecma_make_symbol_value (value_p);\n          }\n\n          ecma_string_t *symbol_desc_p = ecma_get_string_from_value (symbol_desc);\n\n          if (ecma_compare_ecma_strings (symbol_desc_p, string_p))\n          {\n            /* The current symbol's descriptor matches with the value_to_find,\n               so the value is no longer needed. */\n            ecma_deref_ecma_string (string_p);\n            return ecma_copy_value (ecma_make_symbol_value (value_p));\n          }\n        }\n        else\n        {\n          if (string_p == value_p)\n          {\n            ecma_value_t symbol_desc = ecma_get_symbol_description (string_p);\n\n            if (ecma_is_value_undefined (symbol_desc))\n            {\n              return symbol_desc;\n            }\n\n            ecma_string_t *symbol_desc_p = ecma_get_string_from_value (symbol_desc);\n            ecma_ref_ecma_string (symbol_desc_p);\n            return symbol_desc;\n          }\n        }\n      }\n      else\n      {\n        if (empty_cpointer_p == NULL)\n        {\n          empty_cpointer_p = symbol_list_p->values + i;\n        }\n      }\n    }\n\n    symbol_list_cp = symbol_list_p->next_cp;\n  }\n\n  if (!is_for)\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  /* There was no matching, sp a new symbol should be added the the global symbol list. The symbol creation requires\n     an extra reference to the descriptor string, but this reference has already been added. */\n  ecma_string_t *new_symbol_p = ecma_new_symbol_from_descriptor_string (value_to_find);\n\n  jmem_cpointer_t result;\n  JMEM_CP_SET_NON_NULL_POINTER (result, new_symbol_p);\n\n  if (empty_cpointer_p != NULL)\n  {\n    *empty_cpointer_p = result;\n    return ecma_copy_value (ecma_make_symbol_value (new_symbol_p));\n  }\n\n  ecma_lit_storage_item_t *new_item_p;\n  new_item_p = (ecma_lit_storage_item_t *) jmem_pools_alloc (sizeof (ecma_lit_storage_item_t));\n\n  new_item_p->values[0] = result;\n  for (int i = 1; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++)\n  {\n    new_item_p->values[i] = JMEM_CP_NULL;\n  }\n\n  new_item_p->next_cp = JERRY_CONTEXT (symbol_list_first_cp);\n  JMEM_CP_SET_NON_NULL_POINTER (JERRY_CONTEXT (symbol_list_first_cp), new_item_p);\n\n  return ecma_copy_value (ecma_make_symbol_value (new_symbol_p));\n} /* ecma_builtin_symbol_for_helper */\n\n/**\n * The Symbol object's 'for' routine\n *\n * See also:\n *          ECMA-262 v6, 19.4.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_symbol_for (ecma_value_t this_arg, /**< this argument */\n                         ecma_value_t key) /**< key string */\n{\n  JERRY_UNUSED (this_arg);\n  ecma_string_t *string_desc_p = ecma_op_to_string (key);\n\n  /* 1. */\n  if (JERRY_UNLIKELY (string_desc_p == NULL))\n  {\n    /* 2. */\n    return ECMA_VALUE_ERROR;\n  }\n\n  return ecma_builtin_symbol_for_helper (ecma_make_string_value (string_desc_p));\n} /* ecma_builtin_symbol_for */\n\n/**\n * The Symbol object's 'keyFor' routine\n *\n * See also:\n *          ECMA-262 v6, 19.4.2.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_symbol_key_for (ecma_value_t this_arg, /**< this argument */\n                             ecma_value_t symbol) /**< symbol */\n{\n  JERRY_UNUSED (this_arg);\n\n  /* 1. */\n  if (!ecma_is_value_symbol (symbol))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"The given argument is not a Symbol.\"));\n  }\n\n  /* 2-4. */\n  return ecma_builtin_symbol_for_helper (symbol);\n} /* ecma_builtin_symbol_key_for */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Symbol built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\n/* ECMA-262 v6, 19.4.2 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_SYMBOL_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 19.4.2.7 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n/* ECMA-262 v10, 19.4.2.1 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_ASYNC_ITERATOR,\n              LIT_GLOBAL_SYMBOL_ASYNC_ITERATOR)\n\n/* ECMA-262 v6, 19.4.2.2 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_HAS_INSTANCE,\n              LIT_GLOBAL_SYMBOL_HAS_INSTANCE)\n\n/* ECMA-262 v6, 19.4.2.3 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_IS_CONCAT_SPREADABLE,\n              LIT_GLOBAL_SYMBOL_IS_CONCAT_SPREADABLE)\n\n/* ECMA-262 v6, 19.4.2.4 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_ITERATOR,\n              LIT_GLOBAL_SYMBOL_ITERATOR)\n\n/* ECMA-262 v6, 19.4.2.6 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_MATCH,\n              LIT_GLOBAL_SYMBOL_MATCH)\n\n/* ECMA-262 v6, 19.4.2.8 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_REPLACE,\n              LIT_GLOBAL_SYMBOL_REPLACE)\n\n/* ECMA-262 v6, 19.4.2.9 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_SEARCH,\n              LIT_GLOBAL_SYMBOL_SEARCH)\n\n/* ECMA-262 v6, 19.4.2.10 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_SPECIES,\n              LIT_GLOBAL_SYMBOL_SPECIES)\n\n/* ECMA-262 v6, 19.4.2.11 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_SPLIT,\n              LIT_GLOBAL_SYMBOL_SPLIT)\n\n/* ECMA-262 v6, 19.4.2.12 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_TO_PRIMITIVE,\n              LIT_GLOBAL_SYMBOL_TO_PRIMITIVE)\n\n/* ECMA-262 v6, 19.4.2.13 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_TO_STRING_TAG,\n              LIT_GLOBAL_SYMBOL_TO_STRING_TAG)\n\n/* ECMA-262 v6, 19.4.2.14 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_UNSCOPABLES,\n              LIT_GLOBAL_SYMBOL_UNSCOPABLES)\n\n/* ECMA-262 v11, 19.4.2.8 */\nSYMBOL_VALUE (LIT_MAGIC_STRING_MATCH_ALL,\n              LIT_GLOBAL_SYMBOL_MATCH_ALL)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_FOR, ecma_builtin_symbol_for, 1, 1)\nROUTINE (LIT_MAGIC_STRING_KEY_FOR, ecma_builtin_symbol_key_for, 1, 1)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-syntaxerror-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID syntax_error_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * SyntaxError.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.7.8 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_SYNTAX_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.9 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_SYNTAX_ERROR_UL,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.10 */\nSTRING_VALUE (LIT_MAGIC_STRING_MESSAGE,\n              LIT_MAGIC_STRING__EMPTY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-function-object.h\"\n#include \"jrt.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-syntaxerror.inc.h\"\n#define BUILTIN_UNDERSCORED_ID syntax_error\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup syntaxerror ECMA SyntaxError object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in SyntaxError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_syntax_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_SYNTAX, arguments_list_p, arguments_list_len);\n} /* ecma_builtin_syntax_error_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in SyntaxError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_syntax_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                              uint32_t arguments_list_len) /**< number of arguments */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  return ecma_builtin_syntax_error_dispatch_call (arguments_list_p, arguments_list_len);\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE);\n\n  if (proto_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_builtin_syntax_error_dispatch_call (arguments_list_p, arguments_list_len);\n\n  if (!ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (result);\n    ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, proto_p);\n  }\n\n  ecma_deref_object (proto_p);\n\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_syntax_error_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * SyntaxError built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_SYNTAX_ERROR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-type-error-thrower.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"jrt.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-type-error-thrower.inc.h\"\n#define BUILTIN_UNDERSCORED_ID type_error_thrower\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup type_error_thrower ECMA [[ThrowTypeError]] object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in [[ThrowTypeError]] object\n *\n * See also:\n *          ECMA-262 v5, 13.2.3\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_type_error_thrower_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                               uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"'caller', 'callee', and 'arguments' properties may not be accessed\"\n                                              \" on strict mode functions or the arguments objects for calls to them\"));\n} /* ecma_builtin_type_error_thrower_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in [[ThrowTypeError]] object\n *\n * See also:\n *          ECMA-262 v5, 13.2.3\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_type_error_thrower_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                    uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_builtin_type_error_thrower_dispatch_call (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_type_error_thrower_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-type-error-thrower.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * [[ThrowTypeError]] description\n *\n * See also: ECMA-262 v5, 13.2.3\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FIXED)\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-typeerror-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID type_error_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * TypeError.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.7.8 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_TYPE_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.9 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_TYPE_ERROR_UL,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.10 */\nSTRING_VALUE (LIT_MAGIC_STRING_MESSAGE,\n              LIT_MAGIC_STRING__EMPTY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-function-object.h\"\n#include \"jrt.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-typeerror.inc.h\"\n#define BUILTIN_UNDERSCORED_ID type_error\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup typeerror ECMA TypeError object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in TypeError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_type_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                       uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_TYPE, arguments_list_p, arguments_list_len);\n} /* ecma_builtin_type_error_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in TypeError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_type_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                            uint32_t arguments_list_len) /**< number of arguments */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  return ecma_builtin_type_error_dispatch_call (arguments_list_p, arguments_list_len);\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE);\n\n  if (proto_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_builtin_type_error_dispatch_call (arguments_list_p, arguments_list_len);\n\n  if (!ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (result);\n    ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, proto_p);\n  }\n\n  ecma_deref_object (proto_p);\n\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_type_error_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * TypeError built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_TYPE_ERROR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-urierror-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-string-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-urierror-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uri_error_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-urierror-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * UriError.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.7.8 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_URI_ERROR,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.9 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_URI_ERROR_UL,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v5, 15.11.7.10 */\nSTRING_VALUE (LIT_MAGIC_STRING_MESSAGE,\n              LIT_MAGIC_STRING__EMPTY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-urierror.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-function-object.h\"\n#include \"jrt.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-urierror.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uri_error\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup urierror ECMA UriError object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in UriError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uri_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                      uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_URI, arguments_list_p, arguments_list_len);\n} /* ecma_builtin_uri_error_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in UriError object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uri_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                           uint32_t arguments_list_len) /**< number of arguments */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  return ecma_builtin_uri_error_dispatch_call (arguments_list_p, arguments_list_len);\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE);\n\n  if (proto_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_builtin_uri_error_dispatch_call (arguments_list_p, arguments_list_len);\n\n  if (!ECMA_IS_VALUE_ERROR (result))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (result);\n    ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, proto_p);\n  }\n\n  ecma_deref_object (proto_p);\n\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_uri_error_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-urierror.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * UriError built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              1,\n              ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v5, 15.11.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#if ENABLED (JERRY_ESNEXT)\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_URI_ERROR_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-weakmap-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID weakmap_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup weakmap ECMA WeakMap object built-in\n * @{\n */\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_weakmap_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */\n                                                 ecma_value_t this_arg, /**< 'this' argument value */\n                                                 const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                         *   passed to routine */\n                                                 uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (arguments_number);\n  return ecma_builtin_container_dispatch_routine (builtin_routine_id,\n                                                  this_arg,\n                                                  arguments_list_p,\n                                                  LIT_MAGIC_STRING_WEAKMAP_UL);\n} /* ecma_builtin_weakmap_prototype_dispatch_routine */\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * WeakMap.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 23.3.3.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_WEAKMAP,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v6, 23.3.3.6 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_WEAKMAP_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_DELETE, ECMA_CONTAINER_ROUTINE_DELETE_WEAK, 1, 1)\nROUTINE (LIT_MAGIC_STRING_GET, ECMA_CONTAINER_ROUTINE_GET, 1, 1)\nROUTINE (LIT_MAGIC_STRING_HAS, ECMA_CONTAINER_ROUTINE_HAS, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SET, ECMA_CONTAINER_ROUTINE_SET, 2, 2)\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-weakmap.inc.h\"\n#define BUILTIN_UNDERSCORED_ID weakmap\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup weakmap ECMA WeakMap object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in WeakMap object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_weakmap_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                    uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructor WeakMap requires 'new'.\"));\n} /* ecma_builtin_weakmap_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in WeakMap object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_weakmap_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_op_container_create (arguments_list_p,\n                                   arguments_list_len,\n                                   LIT_MAGIC_STRING_WEAKMAP_UL,\n                                   ECMA_BUILTIN_ID_WEAKMAP_PROTOTYPE);\n} /* ecma_builtin_weakmap_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * WeakMap built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\n/* ECMA-262 v6, 23.3.2 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 23.1 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_WEAKMAP_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 23.3.2.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_WEAKMAP_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakset-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-weakset-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID weakset_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup weakset ECMA WeakSet object built-in\n * @{\n */\n\n/**\n * Dispatcher of the built-in's routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_weakset_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine\n                                                                              *   identifier */\n                                                 ecma_value_t this_arg, /**< 'this' argument value */\n                                                 const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                         *   passed to routine */\n                                                 uint32_t arguments_number) /**< length of arguments' list */\n{\n  JERRY_UNUSED (arguments_number);\n  return ecma_builtin_container_dispatch_routine (builtin_routine_id,\n                                                  this_arg,\n                                                  arguments_list_p,\n                                                  LIT_MAGIC_STRING_WEAKSET_UL);\n} /* ecma_builtin_weakset_prototype_dispatch_routine */\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakset-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * WeakSet.prototype built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 23.4.3.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_WEAKSET,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ECMA-262 v6, 23.4.3.5 */\nSTRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n              LIT_MAGIC_STRING_WEAKSET_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_ADD, ECMA_CONTAINER_ROUTINE_ADD, 1, 1)\nROUTINE (LIT_MAGIC_STRING_DELETE, ECMA_CONTAINER_ROUTINE_DELETE_WEAK, 1, 1)\nROUTINE (LIT_MAGIC_STRING_HAS, ECMA_CONTAINER_ROUTINE_HAS, 1, 1)\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakset.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-container-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-weakset.inc.h\"\n#define BUILTIN_UNDERSCORED_ID weakset\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup weakset ECMA WeakSet object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of built-in WeakSet object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_weakset_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                    uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructor WeakSet requires 'new'.\"));\n} /* ecma_builtin_weakset_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in WeakSet object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_weakset_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_op_container_create (arguments_list_p,\n                                   arguments_list_len,\n                                   LIT_MAGIC_STRING_WEAKSET_UL,\n                                   ECMA_BUILTIN_ID_WEAKSET_PROTOTYPE);\n} /* ecma_builtin_weakset_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakset.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * WeakSet built-in description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n\n/* Number properties:\n *  (property name, number value, writable, enumerable, configurable) */\n\n/* ECMA-262 v6, 23.4.2 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 23.4 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_WEAKSET_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Object properties:\n *  (property name, object pointer getter) */\n\n/* ECMA-262 v6, 23.4.2.1 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_WEAKSET_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins-internal.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_BUILTINS_INTERNAL_H\n#define ECMA_BUILTINS_INTERNAL_H\n\n#ifndef ECMA_BUILTINS_INTERNAL\n# error \"!ECMA_BUILTINS_INTERNAL\"\n#endif /* !ECMA_BUILTINS_INTERNAL */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-globals.h\"\n\n/**\n * Type of built-in properties.\n */\ntypedef enum\n{\n  ECMA_BUILTIN_PROPERTY_SIMPLE, /**< simple value property */\n  ECMA_BUILTIN_PROPERTY_NUMBER, /**< number value property */\n  ECMA_BUILTIN_PROPERTY_STRING, /**< string value property */\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_BUILTIN_PROPERTY_SYMBOL, /**< symbol value property */\n  ECMA_BUILTIN_PROPERTY_INTRINSIC_PROPERTY, /**< intrinsic routine property */\n  ECMA_BUILTIN_PROPERTY_ACCESSOR_BUILTIN_FUNCTION, /**< full accessor property with builtin function object\n                                                        getter/setter pair */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ECMA_BUILTIN_PROPERTY_OBJECT, /**< builtin object property */\n  ECMA_BUILTIN_PROPERTY_ROUTINE, /**< routine property */\n  ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_WRITE, /**< full accessor property */\n  ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_ONLY, /**< read-only accessor property */\n  ECMA_BUILTIN_PROPERTY_END, /**< last property */\n} ecma_builtin_property_type_t;\n\n/**\n * Type of symbolic built-in number types (starting from 256).\n */\ntypedef enum\n{\n  ECMA_BUILTIN_NUMBER_MAX = 256, /**< value of ECMA_NUMBER_MAX_VALUE */\n  ECMA_BUILTIN_NUMBER_MIN, /**< value of ECMA_NUMBER_MIN_VALUE */\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_BUILTIN_NUMBER_EPSILON, /**< value of ECMA_NUMBER_EPSILON */\n  ECMA_BUILTIN_NUMBER_MAX_SAFE_INTEGER, /**< value of ECMA_NUMBER_MAX_SAFE_INTEGER */\n  ECMA_BUILTIN_NUMBER_MIN_SAFE_INTEGER, /**< value of ECMA_NUMBER_MIN_SAFE_INTEGER */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ECMA_BUILTIN_NUMBER_E, /**< value of ECMA_NUMBER_E */\n  ECMA_BUILTIN_NUMBER_PI, /**< value of ECMA_NUMBER_PI */\n  ECMA_BUILTIN_NUMBER_LN10, /**< value of ECMA_NUMBER_LN10 */\n  ECMA_BUILTIN_NUMBER_LN2, /**< value of ECMA_NUMBER_LN2 */\n  ECMA_BUILTIN_NUMBER_LOG2E, /**< value of ECMA_NUMBER_LOG2E */\n  ECMA_BUILTIN_NUMBER_LOG10E, /**< value of ECMA_NUMBER_LOG10E */\n  ECMA_BUILTIN_NUMBER_SQRT2, /**< value of ECMA_NUMBER_SQRT2 */\n  ECMA_BUILTIN_NUMBER_SQRT_1_2, /**< value of ECMA_NUMBER_SQRT_1_2 */\n  ECMA_BUILTIN_NUMBER_NAN, /**< result of ecma_number_make_nan () */\n  ECMA_BUILTIN_NUMBER_POSITIVE_INFINITY, /**< result of ecma_number_make_infinity (false) */\n  ECMA_BUILTIN_NUMBER_NEGATIVE_INFINITY, /**< result of ecma_number_make_infinity (true) */\n} ecma_builtin_number_type_t;\n\n/**\n * Description of built-in properties.\n */\ntypedef struct\n{\n  uint16_t magic_string_id; /**< name of the property */\n  uint8_t type; /**< type of the property */\n  uint8_t attributes; /**< attributes of the property */\n  uint16_t value; /**< value of the property */\n} ecma_builtin_property_descriptor_t;\n\n#define BUILTIN_ROUTINE(builtin_id, \\\n                        object_type, \\\n                        object_prototype_builtin_id, \\\n                        is_extensible, \\\n                        lowercase_name) \\\nextern const ecma_builtin_property_descriptor_t \\\necma_builtin_ ## lowercase_name ## _property_descriptor_list[]; \\\necma_value_t \\\necma_builtin_ ## lowercase_name ## _dispatch_call (const ecma_value_t *, \\\n                                                   uint32_t); \\\necma_value_t \\\necma_builtin_ ## lowercase_name ## _dispatch_construct (const ecma_value_t *, \\\n                                                        uint32_t); \\\necma_value_t \\\necma_builtin_ ## lowercase_name ## _dispatch_routine (uint8_t builtin_routine_id, \\\n                                                      ecma_value_t this_arg_value, \\\n                                                      const ecma_value_t [], \\\n                                                      uint32_t);\n#define BUILTIN(builtin_id, \\\n                object_type, \\\n                object_prototype_builtin_id, \\\n                is_extensible, \\\n                lowercase_name) \\\nextern const ecma_builtin_property_descriptor_t \\\necma_builtin_ ## lowercase_name ## _property_descriptor_list[]; \\\necma_value_t \\\necma_builtin_ ## lowercase_name ## _dispatch_routine (uint8_t builtin_routine_id, \\\n                                                      ecma_value_t this_arg_value, \\\n                                                      const ecma_value_t [], \\\n                                                      uint32_t);\n#include \"ecma-builtins.inc.h\"\n\n#undef BUILTIN_ROUTINE\n#undef BUILTIN\n\n#endif /* !ECMA_BUILTINS_INTERNAL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-objects.h\"\n#include \"jcontext.h\"\n#include \"jrt-bit-fields.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n */\n\nJERRY_STATIC_ASSERT (ECMA_BUILTIN_ID_GLOBAL == ECMA_BUILTIN_OBJECTS_COUNT,\n                     ecma_builtin_id_global_must_be_the_last_builtin_id);\n\n/**\n * Helper definition for ecma_builtin_property_list_references.\n */\ntypedef const ecma_builtin_property_descriptor_t *ecma_builtin_property_list_reference_t;\n\n/**\n * Definition of built-in dispatch routine function pointer.\n */\ntypedef ecma_value_t (*ecma_builtin_dispatch_routine_t) (uint8_t builtin_routine_id,\n                                                         ecma_value_t this_arg,\n                                                         const ecma_value_t arguments_list[],\n                                                         uint32_t arguments_number);\n/**\n * Definition of built-in dispatch call function pointer.\n */\ntypedef ecma_value_t (*ecma_builtin_dispatch_call_t) (const ecma_value_t arguments_list[],\n                                                      uint32_t arguments_number);\n/**\n * Definition of a builtin descriptor which contains the builtin object's:\n * - prototype objects's id (13-bits)\n * - type (3-bits)\n *\n * Layout:\n *\n * |----------------------|---------------|\n *     prototype_id(13)      obj_type(3)\n */\ntypedef uint16_t ecma_builtin_descriptor_t;\n\n/**\n * Bitshift index for get the prototype object's id from a builtin descriptor\n */\n#define ECMA_BUILTIN_PROTOTYPE_ID_SHIFT 3\n\n/**\n * Bitmask for get the object's type from a builtin descriptor\n */\n#define ECMA_BUILTIN_OBJECT_TYPE_MASK ((1 << ECMA_BUILTIN_PROTOTYPE_ID_SHIFT) - 1)\n\n/**\n * Create a builtin descriptor value\n */\n#define ECMA_MAKE_BUILTIN_DESCRIPTOR(type, proto_id) \\\n  (((proto_id) << ECMA_BUILTIN_PROTOTYPE_ID_SHIFT) | (type))\n\n/**\n * List of the built-in descriptors.\n */\nstatic const ecma_builtin_descriptor_t ecma_builtin_descriptors[] =\n{\n/** @cond doxygen_suppress */\n#define BUILTIN(a, b, c, d, e)\n#define BUILTIN_ROUTINE(builtin_id, \\\n                        object_type, \\\n                        object_prototype_builtin_id, \\\n                        is_extensible, \\\n                        lowercase_name) \\\n  ECMA_MAKE_BUILTIN_DESCRIPTOR (object_type, object_prototype_builtin_id),\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN\n#undef BUILTIN_ROUTINE\n#define BUILTIN_ROUTINE(a, b, c, d, e)\n#define BUILTIN(builtin_id, \\\n                object_type, \\\n                object_prototype_builtin_id, \\\n                is_extensible, \\\n                lowercase_name) \\\n  ECMA_MAKE_BUILTIN_DESCRIPTOR (object_type, object_prototype_builtin_id),\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN\n#undef BUILTIN_ROUTINE\n/** @endcond */\n};\n\n#ifndef JERRY_NDEBUG\n/** @cond doxygen_suppress */\nenum\n{\n  ECMA_BUILTIN_EXTENSIBLE_CHECK =\n#define BUILTIN(a, b, c, d, e)\n#define BUILTIN_ROUTINE(builtin_id, \\\n                        object_type, \\\n                        object_prototype_builtin_id, \\\n                        is_extensible, \\\n                        lowercase_name) \\\n  (is_extensible != 0 || builtin_id == ECMA_BUILTIN_ID_TYPE_ERROR_THROWER) &&\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN\n#undef BUILTIN_ROUTINE\n#define BUILTIN_ROUTINE(a, b, c, d, e)\n#define BUILTIN(builtin_id, \\\n                object_type, \\\n                object_prototype_builtin_id, \\\n                is_extensible, \\\n                lowercase_name) \\\n  (is_extensible != 0 || builtin_id == ECMA_BUILTIN_ID_TYPE_ERROR_THROWER) &&\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN\n#undef BUILTIN_ROUTINE\n  true\n};\n/** @endcond */\n\n/**\n * All the builtin object must be extensible except the ThrowTypeError object.\n */\nJERRY_STATIC_ASSERT (ECMA_BUILTIN_EXTENSIBLE_CHECK == true,\n                     ecma_builtin_must_be_extensible_except_the_builtin_thorw_type_error_object);\n#endif /* !JERRY_NDEBUG */\n\n/**\n * List of the built-in routines.\n */\nstatic const ecma_builtin_dispatch_routine_t ecma_builtin_routines[] =\n{\n/** @cond doxygen_suppress */\n#define BUILTIN(a, b, c, d, e)\n#define BUILTIN_ROUTINE(builtin_id, \\\n                        object_type, \\\n                        object_prototype_builtin_id, \\\n                        is_extensible, \\\n                        lowercase_name) \\\n  ecma_builtin_ ## lowercase_name ## _dispatch_routine,\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN\n#undef BUILTIN_ROUTINE\n#define BUILTIN_ROUTINE(a, b, c, d, e)\n#define BUILTIN(builtin_id, \\\n                object_type, \\\n                object_prototype_builtin_id, \\\n                is_extensible, \\\n                lowercase_name) \\\n  ecma_builtin_ ## lowercase_name ## _dispatch_routine,\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN\n#undef BUILTIN_ROUTINE\n/** @endcond */\n};\n\n/**\n * List of the built-in call functions.\n */\nstatic const ecma_builtin_dispatch_call_t ecma_builtin_call_functions[] =\n{\n/** @cond doxygen_suppress */\n#define BUILTIN(a, b, c, d, e)\n#define BUILTIN_ROUTINE(builtin_id, \\\n                        object_type, \\\n                        object_prototype_builtin_id, \\\n                        is_extensible, \\\n                        lowercase_name) \\\n  ecma_builtin_ ## lowercase_name ## _dispatch_call,\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN_ROUTINE\n#undef BUILTIN\n/** @endcond */\n};\n\n/**\n * List of the built-in construct functions.\n */\nstatic const ecma_builtin_dispatch_call_t ecma_builtin_construct_functions[] =\n{\n/** @cond doxygen_suppress */\n#define BUILTIN(a, b, c, d, e)\n#define BUILTIN_ROUTINE(builtin_id, \\\n                        object_type, \\\n                        object_prototype_builtin_id, \\\n                        is_extensible, \\\n                        lowercase_name) \\\n  ecma_builtin_ ## lowercase_name ## _dispatch_construct,\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN_ROUTINE\n#undef BUILTIN\n/** @endcond */\n};\n\n/**\n * Property descriptor lists for all built-ins.\n */\nstatic const ecma_builtin_property_list_reference_t ecma_builtin_property_list_references[] =\n{\n/** @cond doxygen_suppress */\n#define BUILTIN(a, b, c, d, e)\n#define BUILTIN_ROUTINE(builtin_id, \\\n                        object_type, \\\n                        object_prototype_builtin_id, \\\n                        is_extensible, \\\n                        lowercase_name) \\\n  ecma_builtin_ ## lowercase_name ## _property_descriptor_list,\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN\n#undef BUILTIN_ROUTINE\n#define BUILTIN_ROUTINE(a, b, c, d, e)\n#define BUILTIN(builtin_id, \\\n                object_type, \\\n                object_prototype_builtin_id, \\\n                is_extensible, \\\n                lowercase_name) \\\n  ecma_builtin_ ## lowercase_name ## _property_descriptor_list,\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN_ROUTINE\n#undef BUILTIN\n/** @endcond */\n};\n\n/**\n * Get the number of properties of a built-in object.\n *\n * @return the number of properties\n */\nstatic size_t\necma_builtin_get_property_count (ecma_builtin_id_t builtin_id) /**< built-in ID */\n{\n  JERRY_ASSERT (builtin_id < ECMA_BUILTIN_ID__COUNT);\n  const ecma_builtin_property_descriptor_t *property_list_p = ecma_builtin_property_list_references[builtin_id];\n\n  const ecma_builtin_property_descriptor_t *curr_property_p = property_list_p;\n\n  while (curr_property_p->magic_string_id != LIT_MAGIC_STRING__COUNT)\n  {\n    curr_property_p++;\n  }\n\n  return (size_t) (curr_property_p - property_list_p);\n} /* ecma_builtin_get_property_count */\n\n/**\n * Check if passed object is the instance of specified built-in.\n *\n * @return true  - if the object is instance of the specified built-in\n *         false - otherwise\n */\nbool\necma_builtin_is (ecma_object_t *object_p, /**< pointer to an object */\n                 ecma_builtin_id_t builtin_id) /**< id of built-in to check on */\n{\n  JERRY_ASSERT (object_p != NULL && !ecma_is_lexical_environment (object_p));\n  JERRY_ASSERT (builtin_id < ECMA_BUILTIN_ID__COUNT);\n\n  if (!ecma_get_object_is_builtin (object_p))\n  {\n    return false;\n  }\n\n  if (ECMA_BUILTIN_IS_EXTENDED_BUILT_IN (ecma_get_object_type (object_p)))\n  {\n    ecma_extended_built_in_object_t *extended_built_in_object_p = (ecma_extended_built_in_object_t *) object_p;\n\n    return (extended_built_in_object_p->built_in.id == builtin_id\n            && extended_built_in_object_p->built_in.routine_id == 0);\n  }\n\n  ecma_extended_object_t *built_in_object_p = (ecma_extended_object_t *) object_p;\n\n  return (built_in_object_p->u.built_in.id == builtin_id\n          && built_in_object_p->u.built_in.routine_id == 0);\n} /* ecma_builtin_is */\n\n/**\n * Check if passed object is a global built-in.\n *\n * @return true  - if the object is a global built-in\n *         false - otherwise\n */\nbool\necma_builtin_is_global (ecma_object_t *object_p) /**< pointer to an object */\n{\n  JERRY_ASSERT (ecma_get_object_is_builtin (object_p));\n\n  return (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_GENERAL\n          && ((ecma_extended_object_t *) object_p)->u.built_in.id == ECMA_BUILTIN_ID_GLOBAL);\n} /* ecma_builtin_is_global */\n\n/**\n * Get reference to the global object\n *\n * Note:\n *   Does not increase the reference counter.\n *\n * @return pointer to the global object\n */\nextern inline ecma_object_t * JERRY_ATTR_ALWAYS_INLINE\necma_builtin_get_global (void)\n{\n  JERRY_ASSERT (JERRY_CONTEXT (global_object_p) != NULL);\n\n  return (ecma_object_t *) JERRY_CONTEXT (global_object_p);\n} /* ecma_builtin_get_global */\n\n/**\n * Checks whether the given function is a built-in routine\n *\n * @return true - if the function object is a built-in routine\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_builtin_function_is_routine (ecma_object_t *func_obj_p) /**< function object */\n{\n  JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n  JERRY_ASSERT (ecma_get_object_is_builtin (func_obj_p));\n\n  ecma_extended_object_t *ext_func_obj_p = (ecma_extended_object_t *) func_obj_p;\n  return (ext_func_obj_p->u.built_in.routine_id != 0);\n} /* ecma_builtin_function_is_routine */\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n\n/**\n * Get reference to the realm provided by another built-in object\n *\n * Note:\n *   Does not increase the reference counter.\n *\n * @return pointer to the global object\n */\nstatic ecma_global_object_t *\necma_builtin_get_realm (ecma_object_t *builtin_object_p) /**< built-in object */\n{\n  JERRY_ASSERT (ecma_get_object_is_builtin (builtin_object_p));\n\n  ecma_object_type_t object_type = ecma_get_object_type (builtin_object_p);\n  ecma_value_t realm_value;\n\n  if (ECMA_BUILTIN_IS_EXTENDED_BUILT_IN (object_type))\n  {\n    realm_value = ((ecma_extended_built_in_object_t *) builtin_object_p)->built_in.realm_value;\n  }\n  else\n  {\n    realm_value = ((ecma_extended_object_t *) builtin_object_p)->u.built_in.realm_value;\n  }\n\n  return ECMA_GET_INTERNAL_VALUE_POINTER (ecma_global_object_t, realm_value);\n} /* ecma_builtin_get_realm */\n\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n/**\n * Instantiate specified ECMA built-in object\n *\n * @return the newly instantiated built-in\n */\nstatic ecma_object_t *\necma_instantiate_builtin (ecma_global_object_t *global_object_p, /**< global object */\n                          ecma_builtin_id_t obj_builtin_id) /**< built-in id */\n{\n  jmem_cpointer_t *builtin_objects = global_object_p->builtin_objects;\n\n  JERRY_ASSERT (obj_builtin_id < ECMA_BUILTIN_OBJECTS_COUNT);\n  JERRY_ASSERT (builtin_objects[obj_builtin_id] == JMEM_CP_NULL);\n\n  ecma_builtin_descriptor_t builtin_desc = ecma_builtin_descriptors[obj_builtin_id];\n  ecma_builtin_id_t object_prototype_builtin_id = (ecma_builtin_id_t) (builtin_desc >> ECMA_BUILTIN_PROTOTYPE_ID_SHIFT);\n\n  ecma_object_t *prototype_obj_p;\n\n  /* cppcheck-suppress arrayIndexOutOfBoundsCond */\n  if (JERRY_UNLIKELY (object_prototype_builtin_id == ECMA_BUILTIN_ID__COUNT))\n  {\n    prototype_obj_p = NULL;\n  }\n  else\n  {\n    if (builtin_objects[object_prototype_builtin_id] == JMEM_CP_NULL)\n    {\n      ecma_instantiate_builtin (global_object_p, object_prototype_builtin_id);\n    }\n    prototype_obj_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, builtin_objects[object_prototype_builtin_id]);\n    JERRY_ASSERT (prototype_obj_p != NULL);\n  }\n\n  ecma_object_type_t obj_type = (ecma_object_type_t) (builtin_desc & ECMA_BUILTIN_OBJECT_TYPE_MASK);\n\n  bool is_extended_built_in = ECMA_BUILTIN_IS_EXTENDED_BUILT_IN (obj_type);\n\n  size_t ext_object_size = (is_extended_built_in ? sizeof (ecma_extended_built_in_object_t)\n                                                 : sizeof (ecma_extended_object_t));\n\n  size_t property_count = ecma_builtin_get_property_count (obj_builtin_id);\n\n  if (property_count > ECMA_BUILTIN_INSTANTIATED_BITSET_MIN_SIZE)\n  {\n    /* Only 64 extra properties supported at the moment.\n     * This can be extended to 256 later. */\n    JERRY_ASSERT (property_count <= (ECMA_BUILTIN_INSTANTIATED_BITSET_MIN_SIZE + 64));\n\n    ext_object_size += sizeof (uint64_t);\n  }\n\n  ecma_object_t *obj_p = ecma_create_object (prototype_obj_p, ext_object_size, obj_type);\n\n  if (JERRY_UNLIKELY (obj_builtin_id == ECMA_BUILTIN_ID_TYPE_ERROR_THROWER))\n  {\n    ecma_op_ordinary_object_prevent_extensions (obj_p);\n  }\n  else\n  {\n    ecma_op_ordinary_object_set_extensible (obj_p);\n  }\n\n  /*\n   * [[Class]] property of built-in object is not stored explicitly.\n   *\n   * See also: ecma_object_get_class_name\n   */\n\n  ecma_set_object_is_builtin (obj_p);\n  ecma_built_in_props_t *built_in_props_p;\n\n  if (is_extended_built_in)\n  {\n    built_in_props_p = &((ecma_extended_built_in_object_t *) obj_p)->built_in;\n  }\n  else\n  {\n    built_in_props_p = &((ecma_extended_object_t *) obj_p)->u.built_in;\n  }\n\n  built_in_props_p->id = (uint8_t) obj_builtin_id;\n  built_in_props_p->routine_id = 0;\n  built_in_props_p->u.length_and_bitset_size = 0;\n  built_in_props_p->u2.instantiated_bitset[0] = 0;\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ECMA_SET_INTERNAL_VALUE_POINTER (built_in_props_p->realm_value, global_object_p);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  built_in_props_p->continue_instantiated_bitset[0] = 0;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  if (property_count > ECMA_BUILTIN_INSTANTIATED_BITSET_MIN_SIZE)\n  {\n    built_in_props_p->u.length_and_bitset_size = 1 << ECMA_BUILT_IN_BITSET_SHIFT;\n\n    uint32_t *instantiated_bitset_p = (uint32_t *) (built_in_props_p + 1);\n    instantiated_bitset_p[0] = 0;\n    instantiated_bitset_p[1] = 0;\n  }\n\n  /** Initializing [[PrimitiveValue]] properties of built-in prototype objects */\n  switch (obj_builtin_id)\n  {\n#if ENABLED (JERRY_BUILTIN_ARRAY)\n    case ECMA_BUILTIN_ID_ARRAY_PROTOTYPE:\n    {\n      JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_ARRAY);\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n      ext_object_p->u.array.length = 0;\n      ext_object_p->u.array.length_prop_and_hole_count = ECMA_PROPERTY_FLAG_WRITABLE | ECMA_PROPERTY_VIRTUAL;\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */\n\n#if ENABLED (JERRY_BUILTIN_STRING)\n    case ECMA_BUILTIN_ID_STRING_PROTOTYPE:\n    {\n      JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n      ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_STRING_UL;\n      ext_object_p->u.class_prop.u.value = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n    case ECMA_BUILTIN_ID_NUMBER_PROTOTYPE:\n    {\n      JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n      ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_NUMBER_UL;\n      ext_object_p->u.class_prop.u.value = ecma_make_integer_value (0);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n    case ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE:\n    {\n      JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n      ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_BOOLEAN_UL;\n      ext_object_p->u.class_prop.u.value = ECMA_VALUE_FALSE;\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n\n#if !ENABLED (JERRY_ESNEXT)\n#if ENABLED (JERRY_BUILTIN_DATE)\n    case ECMA_BUILTIN_ID_DATE_PROTOTYPE:\n    {\n      JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n      ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_DATE_UL;\n\n      ecma_number_t *prim_prop_num_value_p = ecma_alloc_number ();\n      *prim_prop_num_value_p = ecma_number_make_nan ();\n      ECMA_SET_INTERNAL_VALUE_POINTER (ext_object_p->u.class_prop.u.value, prim_prop_num_value_p);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n    case ECMA_BUILTIN_ID_REGEXP_PROTOTYPE:\n    {\n      JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n      ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_REGEXP_UL;\n\n      re_compiled_code_t *bc_p = re_compile_bytecode (ecma_get_magic_string (LIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP),\n                                                      RE_FLAG_EMPTY);\n\n      JERRY_ASSERT (bc_p != NULL);\n\n      ECMA_SET_INTERNAL_VALUE_POINTER (ext_object_p->u.class_prop.u.value, bc_p);\n\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#endif /* !ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      JERRY_ASSERT (obj_type != ECMA_OBJECT_TYPE_CLASS);\n      break;\n    }\n  }\n\n  ECMA_SET_NON_NULL_POINTER (builtin_objects[obj_builtin_id], obj_p);\n  ecma_deref_object (obj_p);\n  return obj_p;\n} /* ecma_instantiate_builtin */\n\n/**\n * Create a global object\n *\n * @return a new global object\n */\necma_global_object_t *\necma_builtin_create_global_object (void)\n{\n  ecma_builtin_descriptor_t builtin_desc = ecma_builtin_descriptors[ECMA_BUILTIN_ID_GLOBAL];\n  ecma_builtin_id_t prototype_builtin_id = (ecma_builtin_id_t) (builtin_desc >> ECMA_BUILTIN_PROTOTYPE_ID_SHIFT);\n  ecma_object_type_t obj_type = (ecma_object_type_t) (builtin_desc & ECMA_BUILTIN_OBJECT_TYPE_MASK);\n  size_t property_count = ecma_builtin_get_property_count (ECMA_BUILTIN_ID_GLOBAL);\n\n  JERRY_ASSERT (prototype_builtin_id != ECMA_BUILTIN_ID__COUNT);\n  JERRY_ASSERT (obj_type != ECMA_OBJECT_TYPE_CLASS && obj_type != ECMA_OBJECT_TYPE_ARRAY);\n\n  /* Whenever this assertion fails, the size of extra_instantiated_bitset in ecma_global_object_t\n   * must be increased and 32 must be added to these constants. Furthermore the new uint32 item\n   * must be set to zero. */\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  JERRY_ASSERT (property_count <= ECMA_BUILTIN_INSTANTIATED_BITSET_MIN_SIZE + 64);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  JERRY_ASSERT (property_count <= ECMA_BUILTIN_INSTANTIATED_BITSET_MIN_SIZE + 32);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  ecma_object_t *object_p = ecma_create_object (NULL, sizeof (ecma_global_object_t), obj_type);\n\n  ecma_op_ordinary_object_set_extensible (object_p);\n  ecma_set_object_is_builtin (object_p);\n\n  ecma_global_object_t *global_object_p = (ecma_global_object_t *) object_p;\n\n  global_object_p->extended_object.u.built_in.id = (uint8_t) ECMA_BUILTIN_ID_GLOBAL;\n  global_object_p->extended_object.u.built_in.routine_id = 0;\n  /* Bitset size is ignored by the gc. */\n  global_object_p->extended_object.u.built_in.u.length_and_bitset_size = 0;\n  global_object_p->extended_object.u.built_in.u2.instantiated_bitset[0] = 0;\n  global_object_p->extra_instantiated_bitset[0] = 0;\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ECMA_SET_INTERNAL_VALUE_POINTER (global_object_p->extended_object.u.built_in.realm_value, global_object_p);\n  global_object_p->extra_realms_bitset = 0;\n  global_object_p->this_binding = ecma_make_object_value (object_p);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  global_object_p->extended_object.u.built_in.continue_instantiated_bitset[0] = 0;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  memset (global_object_p->builtin_objects, 0, (sizeof (jmem_cpointer_t) * ECMA_BUILTIN_OBJECTS_COUNT));\n\n  /* Temporary self reference for GC mark. */\n  ECMA_SET_NON_NULL_POINTER (global_object_p->global_env_cp, object_p);\n#if ENABLED (JERRY_ESNEXT)\n  global_object_p->global_scope_cp = global_object_p->global_env_cp;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *global_lex_env_p = ecma_create_object_lex_env (NULL,\n                                                                object_p,\n                                                                ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n  ECMA_SET_NON_NULL_POINTER (global_object_p->global_env_cp, global_lex_env_p);\n#if ENABLED (JERRY_ESNEXT)\n  global_object_p->global_scope_cp = global_object_p->global_env_cp;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ecma_deref_object (global_lex_env_p);\n\n  ecma_object_t *prototype_object_p;\n  prototype_object_p = ecma_instantiate_builtin (global_object_p, prototype_builtin_id);\n  JERRY_ASSERT (prototype_object_p != NULL);\n\n  ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, prototype_object_p);\n\n  return global_object_p;\n} /* ecma_builtin_create_global_object */\n\n/**\n * Get reference to specified built-in object\n *\n * Note:\n *   Does not increase the reference counter.\n *\n * @return pointer to the object's instance\n */\necma_object_t *\necma_builtin_get (ecma_builtin_id_t builtin_id) /**< id of built-in to check on */\n{\n  JERRY_ASSERT (builtin_id < ECMA_BUILTIN_OBJECTS_COUNT);\n\n  ecma_global_object_t *global_object_p = (ecma_global_object_t *) ecma_builtin_get_global ();\n  jmem_cpointer_t *builtin_p = global_object_p->builtin_objects + builtin_id;\n\n  if (JERRY_UNLIKELY (*builtin_p == JMEM_CP_NULL))\n  {\n    return ecma_instantiate_builtin (global_object_p, builtin_id);\n  }\n\n  return ECMA_GET_NON_NULL_POINTER (ecma_object_t, *builtin_p);\n} /* ecma_builtin_get */\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n\n/**\n * Get reference to specified built-in object using the realm provided by another built-in object\n *\n * Note:\n *   Does not increase the reference counter.\n *\n * @return pointer to the object's instance\n */\necma_object_t *\necma_builtin_get_from_realm (ecma_global_object_t *global_object_p, /**< global object */\n                             ecma_builtin_id_t builtin_id) /**< id of built-in to check on */\n{\n  JERRY_ASSERT (builtin_id < ECMA_BUILTIN_OBJECTS_COUNT);\n\n  jmem_cpointer_t *builtin_p = global_object_p->builtin_objects + builtin_id;\n\n  if (JERRY_UNLIKELY (*builtin_p == JMEM_CP_NULL))\n  {\n    return ecma_instantiate_builtin (global_object_p, builtin_id);\n  }\n\n  return ECMA_GET_NON_NULL_POINTER (ecma_object_t, *builtin_p);\n} /* ecma_builtin_get_from_realm */\n\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n/**\n * Get reference to specified built-in object using the realm provided by another built-in object\n *\n * Note:\n *   Does not increase the reference counter.\n *\n * @return pointer to the object's instance\n */\nstatic inline ecma_object_t * JERRY_ATTR_ALWAYS_INLINE\necma_builtin_get_from_builtin (ecma_object_t *builtin_object_p, /**< built-in object */\n                               ecma_builtin_id_t builtin_id) /**< id of built-in to check on */\n{\n  JERRY_ASSERT (builtin_id < ECMA_BUILTIN_OBJECTS_COUNT);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  return ecma_builtin_get_from_realm (ecma_builtin_get_realm (builtin_object_p), builtin_id);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  JERRY_UNUSED (builtin_object_p);\n  return ecma_builtin_get (builtin_id);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n} /* ecma_builtin_get_from_builtin */\n\n/**\n * Construct a Function object for specified built-in routine\n *\n * See also: ECMA-262 v5, 15\n *\n * @return pointer to constructed Function object\n */\nstatic ecma_object_t *\necma_builtin_make_function_object_for_routine (ecma_object_t *builtin_object_p, /**< builtin object */\n                                               uint8_t routine_id, /**< builtin-wide identifier of the built-in\n                                                                    *   object's routine property */\n                                               uint32_t routine_index, /**< property descriptor index of routine */\n                                               uint8_t flags) /**< see also: ecma_builtin_routine_flags */\n{\n  ecma_object_t *prototype_obj_p = ecma_builtin_get_from_builtin (builtin_object_p,\n                                                                  ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);\n\n  size_t ext_object_size = sizeof (ecma_extended_object_t);\n\n  ecma_object_t *func_obj_p = ecma_create_object (prototype_obj_p,\n                                                  ext_object_size,\n                                                  ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n  ecma_set_object_is_builtin (func_obj_p);\n\n  JERRY_ASSERT (routine_id > 0);\n  JERRY_ASSERT (routine_index <= UINT8_MAX);\n\n  ecma_built_in_props_t *built_in_props_p;\n\n  if (ECMA_BUILTIN_IS_EXTENDED_BUILT_IN (ecma_get_object_type (builtin_object_p)))\n  {\n    built_in_props_p = &((ecma_extended_built_in_object_t *) builtin_object_p)->built_in;\n  }\n  else\n  {\n    built_in_props_p = &((ecma_extended_object_t *) builtin_object_p)->u.built_in;\n  }\n\n  ecma_extended_object_t *ext_func_obj_p = (ecma_extended_object_t *) func_obj_p;\n  ext_func_obj_p->u.built_in.id = built_in_props_p->id;\n  ext_func_obj_p->u.built_in.routine_id = routine_id;\n  ext_func_obj_p->u.built_in.u.routine_index = (uint8_t) routine_index;\n  ext_func_obj_p->u.built_in.u2.routine_flags = flags;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ext_func_obj_p->u.built_in.realm_value = built_in_props_p->realm_value;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  return func_obj_p;\n} /* ecma_builtin_make_function_object_for_routine */\n\n/**\n * Construct a Function object for specified built-in accessor getter\n *\n * @return pointer to constructed accessor getter Function object\n */\nstatic ecma_object_t *\necma_builtin_make_function_object_for_getter_accessor (ecma_object_t *builtin_object_p, /**< builtin object */\n                                                       uint8_t routine_id, /**< builtin-wide id of the built-in\n                                                                            *   object's routine property */\n                                                       uint32_t routine_index) /**< property descriptor index\n                                                                                *   of routine */\n{\n  return ecma_builtin_make_function_object_for_routine (builtin_object_p,\n                                                        routine_id,\n                                                        routine_index,\n                                                        ECMA_BUILTIN_ROUTINE_GETTER);\n} /* ecma_builtin_make_function_object_for_getter_accessor */\n\n/**\n * Construct a Function object for specified built-in accessor setter\n *\n * @return pointer to constructed accessor getter Function object\n */\nstatic ecma_object_t *\necma_builtin_make_function_object_for_setter_accessor (ecma_object_t *builtin_object_p, /**< builtin object */\n                                                       uint8_t routine_id, /**< builtin-wide id of the built-in\n                                                                            *   object's routine property */\n                                                       uint32_t routine_index) /**< property descriptor index\n                                                                                *   of routine */\n{\n  return ecma_builtin_make_function_object_for_routine (builtin_object_p,\n                                                        routine_id,\n                                                        routine_index,\n                                                        ECMA_BUILTIN_ROUTINE_SETTER);\n} /* ecma_builtin_make_function_object_for_setter_accessor */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Create specification defined properties for built-in native handlers.\n *\n * @return pointer property, if one was instantiated,\n *         NULL - otherwise.\n */\nstatic ecma_property_t *\necma_builtin_native_handler_try_to_instantiate_property (ecma_object_t *object_p, /**< object */\n                                                         ecma_string_t *property_name_p) /**< property's name */\n{\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION\n                && ecma_get_object_is_builtin (object_p));\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n  ecma_property_t *prop_p = NULL;\n\n  if (ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_NAME))\n  {\n    if ((ext_obj_p->u.built_in.u2.routine_flags & ECMA_NATIVE_HANDLER_FLAGS_NAME_INITIALIZED) == 0)\n    {\n      ecma_property_value_t *value_p = ecma_create_named_data_property (object_p,\n                                                                        property_name_p,\n                                                                        ECMA_PROPERTY_FLAG_CONFIGURABLE,\n                                                                        &prop_p);\n\n      value_p->value = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n\n      ext_obj_p->u.built_in.u2.routine_flags |= ECMA_NATIVE_HANDLER_FLAGS_NAME_INITIALIZED;\n    }\n  }\n  else if (ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_LENGTH))\n  {\n    if ((ext_obj_p->u.built_in.u2.routine_flags & ECMA_NATIVE_HANDLER_FLAGS_LENGTH_INITIALIZED) == 0)\n    {\n      ecma_property_value_t *value_p = ecma_create_named_data_property (object_p,\n                                                                        property_name_p,\n                                                                        ECMA_PROPERTY_FLAG_CONFIGURABLE,\n                                                                        &prop_p);\n\n      const uint8_t length = ecma_builtin_handler_get_length (ext_obj_p->u.built_in.routine_id);\n      value_p->value = ecma_make_integer_value (length);\n\n      ext_obj_p->u.built_in.u2.routine_flags |= ECMA_NATIVE_HANDLER_FLAGS_LENGTH_INITIALIZED;\n    }\n  }\n\n  return prop_p;\n} /* ecma_builtin_native_handler_try_to_instantiate_property */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Lazy instantiation of builtin routine property of builtin object\n *\n * If the property is not instantiated yet, instantiate the property and\n * return pointer to the instantiated property.\n *\n * @return pointer property, if one was instantiated,\n *         NULL - otherwise.\n */\necma_property_t *\necma_builtin_routine_try_to_instantiate_property (ecma_object_t *object_p, /**< object */\n                                                  ecma_string_t *string_p) /**< property's name */\n{\n  JERRY_ASSERT (ecma_get_object_is_builtin (object_p));\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n  JERRY_ASSERT (ecma_builtin_function_is_routine (object_p));\n\n  ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (ext_func_p->u.built_in.id == ECMA_BUILTIN_ID_HANDLER))\n  {\n    return ecma_builtin_native_handler_try_to_instantiate_property (object_p, string_p);\n  }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  if (ecma_string_is_length (string_p))\n  {\n    /*\n     * Lazy instantiation of 'length' property\n     */\n    ecma_property_t *len_prop_p;\n\n#if ENABLED (JERRY_ESNEXT)\n    uint8_t *bitset_p = &ext_func_p->u.built_in.u2.routine_flags;\n\n    if (*bitset_p & ECMA_BUILTIN_ROUTINE_LENGTH_INITIALIZED)\n    {\n      /* length property was already instantiated */\n      return NULL;\n    }\n\n    /* We mark that the property was lazily instantiated,\n     * as it is configurable and so can be deleted (ECMA-262 v6, 19.2.4.1) */\n    *bitset_p |= ECMA_BUILTIN_ROUTINE_LENGTH_INITIALIZED;\n    ecma_property_value_t *len_prop_value_p = ecma_create_named_data_property (object_p,\n                                                                               string_p,\n                                                                               ECMA_PROPERTY_FLAG_CONFIGURABLE,\n                                                                               &len_prop_p);\n#else /* !ENABLED (JERRY_ESNEXT) */\n    /* We don't need to mark that the property was already lazy instantiated,\n     * as it is non-configurable and so can't be deleted (ECMA-262 v5, 13.2.5) */\n    ecma_property_value_t *len_prop_value_p = ecma_create_named_data_property (object_p,\n                                                                               string_p,\n                                                                               ECMA_PROPERTY_FIXED,\n                                                                               &len_prop_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    uint8_t length = 0;\n\n    if (ext_func_p->u.built_in.u2.routine_flags & ECMA_BUILTIN_ROUTINE_SETTER)\n    {\n      length = 1;\n    }\n    else if (!(ext_func_p->u.built_in.u2.routine_flags & ECMA_BUILTIN_ROUTINE_GETTER))\n    {\n      uint8_t routine_index = ext_func_p->u.built_in.u.routine_index;\n      const ecma_builtin_property_descriptor_t *property_list_p;\n\n      property_list_p = ecma_builtin_property_list_references[ext_func_p->u.built_in.id];\n\n      JERRY_ASSERT (property_list_p[routine_index].type == ECMA_BUILTIN_PROPERTY_ROUTINE);\n\n      length = ECMA_GET_ROUTINE_LENGTH (property_list_p[routine_index].value);\n    }\n\n    len_prop_value_p->value = ecma_make_integer_value (length);\n    return len_prop_p;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  /*\n   * Lazy instantiation of 'name' property\n   */\n  if (ecma_compare_ecma_string_to_magic_id (string_p, LIT_MAGIC_STRING_NAME))\n  {\n    uint8_t *bitset_p = &ext_func_p->u.built_in.u2.routine_flags;\n\n    if (*bitset_p & ECMA_BUILTIN_ROUTINE_NAME_INITIALIZED)\n    {\n      /* name property was already instantiated */\n      return NULL;\n    }\n\n    /* We mark that the property was lazily instantiated */\n    *bitset_p |= ECMA_BUILTIN_ROUTINE_NAME_INITIALIZED;\n    ecma_property_t *name_prop_p;\n    ecma_property_value_t *name_prop_value_p = ecma_create_named_data_property (object_p,\n                                                                                string_p,\n                                                                                ECMA_PROPERTY_FLAG_CONFIGURABLE,\n                                                                                &name_prop_p);\n\n    uint8_t routine_index = ext_func_p->u.built_in.u.routine_index;\n    const ecma_builtin_property_descriptor_t *property_list_p;\n\n    property_list_p = ecma_builtin_property_list_references[ext_func_p->u.built_in.id];\n\n    JERRY_ASSERT (property_list_p[routine_index].type == ECMA_BUILTIN_PROPERTY_ROUTINE\n                  || property_list_p[routine_index].type == ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_WRITE\n                  || property_list_p[routine_index].type == ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_ONLY);\n\n    lit_magic_string_id_t name_id = property_list_p[routine_index].magic_string_id;\n    ecma_string_t *name_p;\n\n    if (JERRY_UNLIKELY (name_id > LIT_NON_INTERNAL_MAGIC_STRING__COUNT))\n    {\n      /* Note: Whenever new intrinsic routine is being added this mapping should be updated as well! */\n      if (JERRY_UNLIKELY (name_id == LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES)\n          || JERRY_UNLIKELY (name_id == LIT_INTERNAL_MAGIC_STRING_TYPEDARRAY_PROTOTYPE_VALUES)\n          || JERRY_UNLIKELY (name_id == LIT_INTERNAL_MAGIC_STRING_SET_PROTOTYPE_VALUES))\n      {\n        name_p = ecma_get_magic_string (LIT_MAGIC_STRING_VALUES);\n      }\n      else if (JERRY_UNLIKELY (name_id == LIT_INTERNAL_MAGIC_STRING_MAP_PROTOTYPE_ENTRIES))\n      {\n        name_p = ecma_get_magic_string (LIT_MAGIC_STRING_ENTRIES);\n      }\n      else\n      {\n        JERRY_ASSERT (LIT_IS_GLOBAL_SYMBOL (name_id));\n        name_p = ecma_op_get_global_symbol (name_id);\n      }\n    }\n    else\n    {\n      name_p = ecma_get_magic_string (name_id);\n    }\n\n    char *prefix_p = NULL;\n    lit_utf8_size_t prefix_size = 0;\n\n    if (*bitset_p & (ECMA_BUILTIN_ROUTINE_GETTER | ECMA_BUILTIN_ROUTINE_SETTER))\n    {\n      prefix_size = 4;\n      prefix_p = (*bitset_p & ECMA_BUILTIN_ROUTINE_GETTER) ? \"get \" : \"set \";\n    }\n\n    name_prop_value_p->value = ecma_op_function_form_name (name_p, prefix_p, prefix_size);\n\n    if (JERRY_UNLIKELY (name_id > LIT_NON_INTERNAL_MAGIC_STRING__COUNT))\n    {\n      ecma_deref_ecma_string (name_p);\n    }\n\n    return name_prop_p;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return NULL;\n} /* ecma_builtin_routine_try_to_instantiate_property */\n\n/**\n * If the property's name is one of built-in properties of the object\n * that is not instantiated yet, instantiate the property and\n * return pointer to the instantiated property.\n *\n * @return pointer property, if one was instantiated,\n *         NULL - otherwise.\n */\necma_property_t *\necma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object */\n                                          ecma_string_t *string_p) /**< property's name */\n{\n  JERRY_ASSERT (ecma_get_object_is_builtin (object_p));\n\n  lit_magic_string_id_t magic_string_id = ecma_get_string_magic (string_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (ecma_prop_name_is_symbol (string_p)))\n  {\n    if (string_p->u.hash & ECMA_GLOBAL_SYMBOL_FLAG)\n    {\n      magic_string_id = (string_p->u.hash >> ECMA_GLOBAL_SYMBOL_SHIFT);\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (magic_string_id == LIT_MAGIC_STRING__COUNT)\n  {\n    return NULL;\n  }\n\n  ecma_built_in_props_t *built_in_props_p;\n  ecma_object_type_t object_type = ecma_get_object_type (object_p);\n  JERRY_ASSERT (object_type != ECMA_OBJECT_TYPE_FUNCTION || !ecma_builtin_function_is_routine (object_p));\n\n  if (ECMA_BUILTIN_IS_EXTENDED_BUILT_IN (object_type))\n  {\n    built_in_props_p = &((ecma_extended_built_in_object_t *) object_p)->built_in;\n  }\n  else\n  {\n    built_in_props_p = &((ecma_extended_object_t *) object_p)->u.built_in;\n  }\n\n  ecma_builtin_id_t builtin_id = (ecma_builtin_id_t) built_in_props_p->id;\n\n  JERRY_ASSERT (builtin_id < ECMA_BUILTIN_ID__COUNT);\n\n  const ecma_builtin_property_descriptor_t *property_list_p = ecma_builtin_property_list_references[builtin_id];\n\n  const ecma_builtin_property_descriptor_t *curr_property_p = property_list_p;\n\n  while (curr_property_p->magic_string_id != magic_string_id)\n  {\n    if (curr_property_p->magic_string_id == LIT_MAGIC_STRING__COUNT)\n    {\n      return NULL;\n    }\n    curr_property_p++;\n  }\n\n  uint32_t index = (uint32_t) (curr_property_p - property_list_p);\n  uint8_t *bitset_p = built_in_props_p->u2.instantiated_bitset + (index >> 3);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  if (index >= 8 * sizeof (uint8_t))\n  {\n    bitset_p += sizeof (ecma_value_t);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  uint8_t bit_for_index = (uint8_t) (1u << (index & 0x7));\n\n  if (*bitset_p & bit_for_index)\n  {\n    /* This property was instantiated before. */\n    return NULL;\n  }\n\n  *bitset_p |= bit_for_index;\n\n  ecma_value_t value = ECMA_VALUE_EMPTY;\n  bool is_accessor = false;\n  ecma_object_t *getter_p = NULL;\n  ecma_object_t *setter_p = NULL;\n\n  switch (curr_property_p->type)\n  {\n    case ECMA_BUILTIN_PROPERTY_SIMPLE:\n    {\n      value = curr_property_p->value;\n\n#if ENABLED (JERRY_ESNEXT)\n      if (value == ECMA_VALUE_GLOBAL_THIS)\n      {\n        /* Only the global object has globalThis property. */\n        JERRY_ASSERT (ecma_builtin_is_global (object_p));\n        ecma_ref_object (object_p);\n        value = ecma_make_object_value (object_p);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      break;\n    }\n    case ECMA_BUILTIN_PROPERTY_NUMBER:\n    {\n      ecma_number_t num = 0.0;\n\n      if (curr_property_p->value < ECMA_BUILTIN_NUMBER_MAX)\n      {\n        num = curr_property_p->value;\n      }\n      else if (curr_property_p->value < ECMA_BUILTIN_NUMBER_NAN)\n      {\n        static const ecma_number_t builtin_number_list[] =\n        {\n          ECMA_NUMBER_MAX_VALUE,\n          ECMA_NUMBER_MIN_VALUE,\n#if ENABLED (JERRY_ESNEXT)\n          ECMA_NUMBER_EPSILON,\n          ECMA_NUMBER_MAX_SAFE_INTEGER,\n          ECMA_NUMBER_MIN_SAFE_INTEGER,\n#endif /* ENABLED (JERRY_ESNEXT) */\n          ECMA_NUMBER_E,\n          ECMA_NUMBER_PI,\n          ECMA_NUMBER_LN10,\n          ECMA_NUMBER_LN2,\n          ECMA_NUMBER_LOG2E,\n          ECMA_NUMBER_LOG10E,\n          ECMA_NUMBER_SQRT2,\n          ECMA_NUMBER_SQRT_1_2,\n        };\n\n        num = builtin_number_list[curr_property_p->value - ECMA_BUILTIN_NUMBER_MAX];\n      }\n      else\n      {\n        switch (curr_property_p->value)\n        {\n          case ECMA_BUILTIN_NUMBER_POSITIVE_INFINITY:\n          {\n            num = ecma_number_make_infinity (false);\n            break;\n          }\n          case ECMA_BUILTIN_NUMBER_NEGATIVE_INFINITY:\n          {\n            num = ecma_number_make_infinity (true);\n            break;\n          }\n          default:\n          {\n            JERRY_ASSERT (curr_property_p->value == ECMA_BUILTIN_NUMBER_NAN);\n\n            num = ecma_number_make_nan ();\n            break;\n          }\n        }\n      }\n\n      value = ecma_make_number_value (num);\n      break;\n    }\n    case ECMA_BUILTIN_PROPERTY_STRING:\n    {\n      value = ecma_make_magic_string_value ((lit_magic_string_id_t) curr_property_p->value);\n      break;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case ECMA_BUILTIN_PROPERTY_SYMBOL:\n    {\n      lit_magic_string_id_t symbol_id = (lit_magic_string_id_t) curr_property_p->value;\n\n      value = ecma_make_symbol_value (ecma_op_get_global_symbol (symbol_id));\n      break;\n    }\n    case ECMA_BUILTIN_PROPERTY_INTRINSIC_PROPERTY:\n    {\n      ecma_object_t *intrinsic_object_p = ecma_builtin_get_from_builtin (object_p, ECMA_BUILTIN_ID_INTRINSIC_OBJECT);\n      value = ecma_op_object_get_by_magic_id (intrinsic_object_p, (lit_magic_string_id_t) curr_property_p->value);\n      break;\n    }\n    case ECMA_BUILTIN_PROPERTY_ACCESSOR_BUILTIN_FUNCTION:\n    {\n      is_accessor = true;\n      uint16_t getter_id = ECMA_ACCESSOR_READ_WRITE_GET_GETTER_ID (curr_property_p->value);\n      uint16_t setter_id = ECMA_ACCESSOR_READ_WRITE_GET_SETTER_ID (curr_property_p->value);\n      getter_p = ecma_builtin_get_from_builtin (object_p, getter_id);\n      setter_p = ecma_builtin_get_from_builtin (object_p, setter_id);\n      ecma_ref_object (getter_p);\n      ecma_ref_object (setter_p);\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case ECMA_BUILTIN_PROPERTY_OBJECT:\n    {\n      ecma_object_t *builtin_object_p;\n      builtin_object_p = ecma_builtin_get_from_builtin (object_p, (ecma_builtin_id_t) curr_property_p->value);\n      ecma_ref_object (builtin_object_p);\n      value = ecma_make_object_value (builtin_object_p);\n      break;\n    }\n    case ECMA_BUILTIN_PROPERTY_ROUTINE:\n    {\n      ecma_object_t *func_obj_p;\n      func_obj_p = ecma_builtin_make_function_object_for_routine (object_p,\n                                                                  ECMA_GET_ROUTINE_ID (curr_property_p->value),\n                                                                  index,\n                                                                  ECMA_BUILTIN_ROUTINE_NO_OPTS);\n      value = ecma_make_object_value (func_obj_p);\n      break;\n    }\n    case ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_WRITE:\n    {\n      is_accessor = true;\n      uint8_t getter_id = ECMA_ACCESSOR_READ_WRITE_GET_GETTER_ID (curr_property_p->value);\n      uint8_t setter_id = ECMA_ACCESSOR_READ_WRITE_GET_SETTER_ID (curr_property_p->value);\n      getter_p = ecma_builtin_make_function_object_for_getter_accessor (object_p, getter_id, index);\n      setter_p = ecma_builtin_make_function_object_for_setter_accessor (object_p, setter_id, index);\n      break;\n    }\n    default:\n    {\n      JERRY_ASSERT (curr_property_p->type == ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_ONLY);\n\n      is_accessor = true;\n      uint8_t getter_id = (uint8_t) curr_property_p->value;\n      getter_p = ecma_builtin_make_function_object_for_getter_accessor (object_p, getter_id, index);\n      break;\n    }\n  }\n\n  ecma_property_t *prop_p;\n\n  if (is_accessor)\n  {\n    ecma_create_named_accessor_property (object_p,\n                                         string_p,\n                                         getter_p,\n                                         setter_p,\n                                         curr_property_p->attributes,\n                                         &prop_p);\n\n    if (setter_p)\n    {\n      ecma_deref_object (setter_p);\n    }\n    if (getter_p)\n    {\n      ecma_deref_object (getter_p);\n    }\n  }\n  else\n  {\n    ecma_property_value_t *prop_value_p = ecma_create_named_data_property (object_p,\n                                                                           string_p,\n                                                                           curr_property_p->attributes,\n                                                                           &prop_p);\n    prop_value_p->value = value;\n\n    /* Reference count of objects must be decreased. */\n    ecma_deref_if_object (value);\n  }\n\n  return prop_p;\n} /* ecma_builtin_try_to_instantiate_property */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * List names of an Built-in native handler object's lazy instantiated properties,\n * adding them to corresponding string collections\n */\nstatic void\necma_builtin_native_handler_list_lazy_property_names (ecma_object_t *object_p, /**< function object */\n                                                      ecma_collection_t *prop_names_p, /**< prop name collection */\n                                                      ecma_property_counter_t *prop_counter_p)  /**< prop counter */\n{\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION\n                && ecma_get_object_is_builtin (object_p));\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n\n  if ((ext_obj_p->u.built_in.u2.routine_flags & ECMA_NATIVE_HANDLER_FLAGS_NAME_INITIALIZED) == 0)\n  {\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_NAME));\n    prop_counter_p->string_named_props++;\n  }\n\n  if ((ext_obj_p->u.built_in.u2.routine_flags & ECMA_NATIVE_HANDLER_FLAGS_LENGTH_INITIALIZED) == 0)\n  {\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n    prop_counter_p->string_named_props++;\n  }\n} /* ecma_builtin_native_handler_list_lazy_property_names */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * List names of a built-in function's lazy instantiated properties\n *\n * See also:\n *          ecma_builtin_routine_try_to_instantiate_property\n */\nvoid\necma_builtin_routine_list_lazy_property_names (ecma_object_t *object_p, /**< a built-in object */\n                                               ecma_collection_t *prop_names_p,  /**< prop name collection */\n                                               ecma_property_counter_t *prop_counter_p)  /**< prop counter */\n{\n  JERRY_ASSERT (ecma_get_object_is_builtin (object_p));\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n  JERRY_ASSERT (ecma_builtin_function_is_routine (object_p));\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n\n  if (JERRY_UNLIKELY (ext_func_p->u.built_in.id == ECMA_BUILTIN_ID_HANDLER))\n  {\n    ecma_builtin_native_handler_list_lazy_property_names (object_p, prop_names_p, prop_counter_p);\n    return;\n  }\n\n  if (!(ext_func_p->u.built_in.u2.routine_flags & ECMA_BUILTIN_ROUTINE_LENGTH_INITIALIZED))\n  {\n    /* Unintialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n    prop_counter_p->string_named_props++;\n  }\n  if (!(ext_func_p->u.built_in.u2.routine_flags & ECMA_BUILTIN_ROUTINE_NAME_INITIALIZED))\n  {\n    /* Unintialized 'name' property is non-enumerable (ECMA-262 v6, 19.2.4.2) */\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_NAME));\n    prop_counter_p->string_named_props++;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  /* 'length' property is non-enumerable (ECMA-262 v5, 15) */\n  ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n  prop_counter_p->string_named_props++;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_builtin_routine_list_lazy_property_names */\n\n/**\n * List names of a built-in object's lazy instantiated properties\n *\n * See also:\n *          ecma_builtin_try_to_instantiate_property\n */\nvoid\necma_builtin_list_lazy_property_names (ecma_object_t *object_p, /**< a built-in object */\n                                       ecma_collection_t *prop_names_p, /**< prop name collection */\n                                       ecma_property_counter_t *prop_counter_p)  /**< prop counter */\n{\n  JERRY_ASSERT (ecma_get_object_is_builtin (object_p));\n  JERRY_ASSERT (ecma_get_object_type (object_p) != ECMA_OBJECT_TYPE_NATIVE_FUNCTION\n                || !ecma_builtin_function_is_routine (object_p));\n\n  ecma_built_in_props_t *built_in_props_p;\n  ecma_object_type_t object_type = ecma_get_object_type (object_p);\n\n  if (ECMA_BUILTIN_IS_EXTENDED_BUILT_IN (object_type))\n  {\n    built_in_props_p = &((ecma_extended_built_in_object_t *) object_p)->built_in;\n  }\n  else\n  {\n    built_in_props_p = &((ecma_extended_object_t *) object_p)->u.built_in;\n  }\n\n  ecma_builtin_id_t builtin_id = (ecma_builtin_id_t) built_in_props_p->id;\n\n  JERRY_ASSERT (builtin_id < ECMA_BUILTIN_ID__COUNT);\n\n  const ecma_builtin_property_descriptor_t *curr_property_p = ecma_builtin_property_list_references[builtin_id];\n\n  uint32_t index = 0;\n  uint8_t bitset = built_in_props_p->u2.instantiated_bitset[0];\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  uint8_t *bitset_p = built_in_props_p->u2.instantiated_bitset + 1 + sizeof (ecma_value_t);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  uint8_t *bitset_p = built_in_props_p->u2.instantiated_bitset + 1;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  while (curr_property_p->magic_string_id != LIT_MAGIC_STRING__COUNT)\n  {\n    if (index == 8)\n    {\n      bitset = *bitset_p++;\n      index = 0;\n    }\n\n    uint32_t bit_for_index = (uint32_t) 1u << index;\n\n    if (curr_property_p->magic_string_id > LIT_NON_INTERNAL_MAGIC_STRING__COUNT)\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (LIT_IS_GLOBAL_SYMBOL (curr_property_p->magic_string_id))\n      {\n        ecma_string_t *name_p = ecma_op_get_global_symbol (curr_property_p->magic_string_id);\n\n        if (!(bitset & bit_for_index) || ecma_op_ordinary_object_has_own_property (object_p, name_p))\n        {\n          ecma_value_t name = ecma_make_symbol_value (name_p);\n          ecma_collection_push_back (prop_names_p, name);\n          prop_counter_p->symbol_named_props++;\n        }\n        else\n        {\n          ecma_deref_ecma_string (name_p);\n        }\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n    else\n    {\n      ecma_string_t *name_p = ecma_get_magic_string ((lit_magic_string_id_t) curr_property_p->magic_string_id);\n\n      if (!(bitset & bit_for_index) || ecma_op_ordinary_object_has_own_property (object_p, name_p))\n      {\n        ecma_value_t name = ecma_make_magic_string_value ((lit_magic_string_id_t) curr_property_p->magic_string_id);\n        ecma_collection_push_back (prop_names_p, name);\n        prop_counter_p->string_named_props++;\n      }\n    }\n\n    curr_property_p++;\n    index++;\n  }\n} /* ecma_builtin_list_lazy_property_names */\n\n/**\n * Dispatcher of built-in routines\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_dispatch_routine (ecma_extended_object_t *func_obj_p, /**< builtin object */\n                               ecma_value_t this_arg_value, /**< 'this' argument value */\n                               const ecma_value_t *arguments_list_p, /**< list of arguments passed to routine */\n                               uint32_t arguments_list_len) /**< length of arguments' list */\n{\n  JERRY_ASSERT (ecma_builtin_function_is_routine ((ecma_object_t *) func_obj_p));\n\n  ecma_value_t padded_arguments_list_p[3] = { ECMA_VALUE_UNDEFINED, ECMA_VALUE_UNDEFINED, ECMA_VALUE_UNDEFINED };\n\n  if (arguments_list_len <= 2)\n  {\n    switch (arguments_list_len)\n    {\n      case 2:\n      {\n        padded_arguments_list_p[1] = arguments_list_p[1];\n        /* FALLTHRU */\n      }\n      case 1:\n      {\n        padded_arguments_list_p[0] = arguments_list_p[0];\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (arguments_list_len == 0);\n      }\n    }\n\n    arguments_list_p = padded_arguments_list_p;\n  }\n\n  return ecma_builtin_routines[func_obj_p->u.built_in.id] (func_obj_p->u.built_in.routine_id,\n                                                           this_arg_value,\n                                                           arguments_list_p,\n                                                           arguments_list_len);\n} /* ecma_builtin_dispatch_routine */\n\n/**\n * Handle calling [[Call]] of built-in object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */\n                            ecma_value_t this_arg_value, /**< 'this' argument value */\n                            const ecma_value_t *arguments_list_p, /**< arguments list */\n                            uint32_t arguments_list_len) /**< arguments list length */\n{\n  JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n  JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n  if (ecma_builtin_function_is_routine (obj_p))\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (JERRY_UNLIKELY (ext_obj_p->u.built_in.id == ECMA_BUILTIN_ID_HANDLER))\n    {\n      ecma_native_handler_t handler = ecma_builtin_handler_get (ext_obj_p->u.built_in.routine_id);\n      return handler (ecma_make_object_value (obj_p), this_arg_value, arguments_list_p, arguments_list_len);\n    }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n    return ecma_builtin_dispatch_routine (ext_obj_p,\n                                          this_arg_value,\n                                          arguments_list_p,\n                                          arguments_list_len);\n  }\n\n  ecma_builtin_id_t builtin_object_id = ext_obj_p->u.built_in.id;\n  JERRY_ASSERT (builtin_object_id < sizeof (ecma_builtin_call_functions) / sizeof (ecma_builtin_dispatch_call_t));\n  return ecma_builtin_call_functions[builtin_object_id] (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in object\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_dispatch_construct (ecma_object_t *obj_p, /**< built-in object */\n                                 const ecma_value_t *arguments_list_p, /**< arguments list */\n                                 uint32_t arguments_list_len) /**< arguments list length */\n{\n  JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n  JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));\n\n  if (ecma_builtin_function_is_routine (obj_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Built-in routines have no constructor.\"));\n  }\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n  ecma_builtin_id_t builtin_object_id = ext_obj_p->u.built_in.id;\n  JERRY_ASSERT (builtin_object_id < sizeof (ecma_builtin_construct_functions) / sizeof (ecma_builtin_dispatch_call_t));\n\n  return ecma_builtin_construct_functions[builtin_object_id] (arguments_list_p, arguments_list_len);\n} /* ecma_builtin_dispatch_construct */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_BUILTINS_H\n#define ECMA_BUILTINS_H\n\n#include \"ecma-globals.h\"\n\n/**\n * A built-in object's identifier\n */\ntypedef enum\n{\n/** @cond doxygen_suppress */\n#define BUILTIN(a, b, c, d, e)\n#define BUILTIN_ROUTINE(builtin_id, \\\n                        object_type, \\\n                        object_prototype_builtin_id, \\\n                        is_extensible, \\\n                        lowercase_name) \\\n  builtin_id,\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN\n#undef BUILTIN_ROUTINE\n#define BUILTIN_ROUTINE(a, b, c, d, e)\n#define BUILTIN(builtin_id, \\\n                object_type, \\\n                object_prototype_builtin_id, \\\n                is_extensible, \\\n                lowercase_name) \\\n  builtin_id,\n#include \"ecma-builtins.inc.h\"\n#undef BUILTIN\n#undef BUILTIN_ROUTINE\n/** @endcond */\n  ECMA_BUILTIN_ID__COUNT /**< number of built-in objects */\n} ecma_builtin_id_t;\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Special id for handlers (handlers are not regular built-ins, but\n * they use the same ecma_built_in_props_t structure as other built-ins)\n */\n#define ECMA_BUILTIN_ID_HANDLER ECMA_BUILTIN_ID__COUNT\n\n/**\n * Number of global symbols\n */\n#define ECMA_BUILTIN_GLOBAL_SYMBOL_COUNT \\\n  (LIT_GLOBAL_SYMBOL__LAST - LIT_GLOBAL_SYMBOL__FIRST + 1)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Construct a routine value\n */\n#define ECMA_ROUTINE_VALUE(id, length) (((id) << 4) | length)\n\n/**\n * Get routine length\n */\n#define ECMA_GET_ROUTINE_LENGTH(value) ((uint8_t) ((value) & 0xf))\n\n/**\n * Get routine ID\n */\n#define ECMA_GET_ROUTINE_ID(value) ((uint8_t) ((value) >> 4))\n\n/**\n * Construct a fully accessor value\n */\n#define ECMA_ACCESSOR_READ_WRITE(getter, setter) (((getter) << 8) | (setter))\n\n/**\n * Get accessor setter ID\n */\n#define ECMA_ACCESSOR_READ_WRITE_GET_SETTER_ID(value) ((uint8_t) ((value) & 0xff))\n\n/**\n * Get accessor getter ID\n */\n#define ECMA_ACCESSOR_READ_WRITE_GET_GETTER_ID(value) ((uint8_t) ((value) >> 8))\n\n/**\n * Number ob built-in objects excluding global object\n */\n#define ECMA_BUILTIN_OBJECTS_COUNT (ECMA_BUILTIN_ID__COUNT - 1)\n\n/**\n * Description of built-in global ECMA-object.\n */\ntypedef struct\n{\n  ecma_extended_object_t extended_object; /**< extended object part */\n  uint32_t extra_instantiated_bitset[1]; /**< extra bit set for instantiated properties */\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  uint32_t extra_realms_bitset; /**< extra bit set for instantiated properties when realms is enabled */\n  ecma_value_t this_binding; /**< 'this' binding of this global object */\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n  jmem_cpointer_t global_env_cp; /**< global lexical environment */\n#if ENABLED (JERRY_ESNEXT)\n  jmem_cpointer_t global_scope_cp; /**< global lexical scope */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  jmem_cpointer_t builtin_objects[ECMA_BUILTIN_OBJECTS_COUNT]; /**< pointer to instances of built-in objects */\n} ecma_global_object_t;\n\n/* ecma-builtins.c */\n\necma_global_object_t *ecma_builtin_create_global_object (void);\n\necma_value_t\necma_builtin_dispatch_call (ecma_object_t *obj_p, ecma_value_t this_arg_value,\n                            const ecma_value_t *arguments_list_p, uint32_t arguments_list_len);\necma_value_t\necma_builtin_dispatch_construct (ecma_object_t *obj_p, const ecma_value_t *arguments_list_p,\n                                 uint32_t arguments_list_len);\necma_property_t *\necma_builtin_routine_try_to_instantiate_property (ecma_object_t *object_p, ecma_string_t *string_p);\necma_property_t *\necma_builtin_try_to_instantiate_property (ecma_object_t *object_p, ecma_string_t *string_p);\nvoid\necma_builtin_routine_list_lazy_property_names (ecma_object_t *object_p,\n                                               ecma_collection_t *prop_names_p,\n                                               ecma_property_counter_t *prop_counter_p);\nvoid\necma_builtin_list_lazy_property_names (ecma_object_t *object_p,\n                                       ecma_collection_t *prop_names_p,\n                                       ecma_property_counter_t *prop_counter_p);\nbool\necma_builtin_is (ecma_object_t *object_p, ecma_builtin_id_t builtin_id);\nbool\necma_builtin_is_global (ecma_object_t *object_p);\necma_object_t *\necma_builtin_get (ecma_builtin_id_t builtin_id);\necma_object_t *\necma_builtin_get_global (void);\nbool\necma_builtin_function_is_routine (ecma_object_t *func_obj_p);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\necma_object_t *\necma_builtin_get_from_realm (ecma_global_object_t *global_object_p, ecma_builtin_id_t builtin_id);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n#endif /* !ECMA_BUILTINS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Description of built-in objects\n   in format (ECMA_BUILTIN_ID_id, object_type, prototype_id, is_extensible, is_static, underscored_id) */\n\n/* The Object.prototype object (15.2.4) */\nBUILTIN (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID__COUNT /* no prototype */,\n         true,\n         object_prototype)\n\n/* The Object object (15.2.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_OBJECT,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 object)\n\n#if ENABLED (JERRY_BUILTIN_ARRAY)\n/* The Array.prototype object (15.4.4) */\nBUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_ARRAY,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         array_prototype)\n\n/* The Array object (15.4.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 array)\n#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */\n\n#if ENABLED (JERRY_ESNEXT)\n# if ENABLED (JERRY_BUILTIN_DATE)\n/* The Date.prototype object (20.3.4) */\nBUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         date_prototype)\n# endif /* ENABLED (JERRY_BUILTIN_DATE) */\n\n# if ENABLED (JERRY_BUILTIN_REGEXP)\n/* The RegExp.prototype object (21.2.5) */\nBUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         regexp_prototype)\n# endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#else /* !ENABLED (JERRY_ESNEXT) */\n# if ENABLED (JERRY_BUILTIN_DATE)\n/* The Date.prototype object (15.9.4) */\nBUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE,\n         ECMA_OBJECT_TYPE_CLASS,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         date_prototype)\n# endif /* ENABLED (JERRY_BUILTIN_DATE) */\n\n# if ENABLED (JERRY_BUILTIN_REGEXP)\n/* The RegExp.prototype object (15.10.6) */\nBUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,\n         ECMA_OBJECT_TYPE_CLASS,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         regexp_prototype)\n# endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_STRING)\n/* The String.prototype object (15.5.4) */\nBUILTIN (ECMA_BUILTIN_ID_STRING_PROTOTYPE,\n          ECMA_OBJECT_TYPE_CLASS,\n          ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n          true,\n          string_prototype)\n\n/* The String object (15.5.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_STRING,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 string)\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n/* The Boolean.prototype object (15.6.4) */\nBUILTIN (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE,\n         ECMA_OBJECT_TYPE_CLASS,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         boolean_prototype)\n\n/* The Boolean object (15.6.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_BOOLEAN,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 boolean)\n#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n/* The Number.prototype object (15.7.4) */\nBUILTIN (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,\n         ECMA_OBJECT_TYPE_CLASS,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         number_prototype)\n\n/* The Number object (15.7.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_NUMBER,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 number)\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n\n/* The Function.prototype object (15.3.4) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n                 true,\n                 function_prototype)\n\n/* The Function object (15.3.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 function)\n\n#if ENABLED (JERRY_BUILTIN_MATH)\n/* The Math object (15.8) */\nBUILTIN (ECMA_BUILTIN_ID_MATH,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         math)\n#endif /* ENABLED (JERRY_BUILTIN_MATH) */\n\n#if ENABLED (JERRY_BUILTIN_REFLECT)\n\n/* The Reflect object (26.1) */\nBUILTIN (ECMA_BUILTIN_ID_REFLECT,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         reflect)\n#endif /* ENABLED (JERRY_BUILTIN_REFLECT) */\n\n#if ENABLED (JERRY_BUILTIN_JSON)\n/* The JSON object (15.12) */\nBUILTIN (ECMA_BUILTIN_ID_JSON,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         json)\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n\n#if ENABLED (JERRY_BUILTIN_DATE)\n/* The Date object (15.9.3) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_DATE,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 date)\n#endif /* ENABLED (JERRY_BUILTIN_DATE) */\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n/* The RegExp object (15.10) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_REGEXP,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 regexp)\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n#if ENABLED (JERRY_ESNEXT)\n#define ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID ECMA_BUILTIN_ID_ERROR\n#else /* !ENABLED (JERRY_ESNEXT) */\n#define ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE\n#endif /* ENABLED (JERRY_ESNEXT */\n\n/* The Error object (15.11.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_ERROR,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 error)\n\n/* The Error.prototype object (15.11.4) */\nBUILTIN (ECMA_BUILTIN_ID_ERROR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         error_prototype)\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n/* The EvalError.prototype object (15.11.6.1) */\nBUILTIN (ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ERROR_PROTOTYPE,\n         true,\n         eval_error_prototype)\n\n/* The EvalError object (15.11.6.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_EVAL_ERROR,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID,\n                 true,\n                 eval_error)\n\n/* The RangeError.prototype object (15.11.6.2) */\nBUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ERROR_PROTOTYPE,\n         true,\n         range_error_prototype)\n\n/* The RangeError object (15.11.6.2) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_RANGE_ERROR,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID,\n                 true,\n                 range_error)\n\n/* The ReferenceError.prototype object (15.11.6.3) */\nBUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ERROR_PROTOTYPE,\n         true,\n         reference_error_prototype)\n\n/* The ReferenceError object (15.11.6.3) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_REFERENCE_ERROR,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID,\n                 true,\n                 reference_error)\n\n/* The SyntaxError.prototype object (15.11.6.4) */\nBUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ERROR_PROTOTYPE,\n         true,\n         syntax_error_prototype)\n\n/* The SyntaxError object (15.11.6.4) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_SYNTAX_ERROR,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID,\n                 true,\n                 syntax_error)\n\n/* The TypeError.prototype object (15.11.6.5) */\nBUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ERROR_PROTOTYPE,\n         true,\n         type_error_prototype)\n\n/* The TypeError object (15.11.6.5) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID,\n                 true,\n                 type_error)\n\n/* The URIError.prototype object (15.11.6.6) */\nBUILTIN (ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ERROR_PROTOTYPE,\n         true,\n         uri_error_prototype)\n\n/* The URIError object (15.11.6.6) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_URI_ERROR,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID,\n                 true,\n                 uri_error)\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n/**< The [[ThrowTypeError]] object (13.2.3) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 false,\n                 type_error_thrower)\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/* The ArrayBuffer.prototype object (ES2015 24.1.4) */\nBUILTIN (ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         arraybuffer_prototype)\n\n/* The ArrayBuffer object (ES2015 24.1.2) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAYBUFFER,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 arraybuffer)\n\n /* The %TypedArrayPrototype% object (ES2015 24.2.3) */\nBUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         typedarray_prototype)\n\n/* The %TypedArray% intrinsic object (ES2015 22.2.1)\n   Note: The routines must be in this order. */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPEDARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 typedarray)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT8ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 int8array)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 uint8array)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 uint8clampedarray)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT16ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 int16array)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT16ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 uint16array)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT32ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 int32array)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT32ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 uint32array)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT32ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 float32array)\n\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT64ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 float64array)\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_BIGINT64ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 bigint64array)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_BIGUINT64ARRAY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_TYPEDARRAY,\n                 true,\n                 biguint64array)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\nBUILTIN (ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         int8array_prototype)\n\nBUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         uint8array_prototype)\n\nBUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         uint8clampedarray_prototype)\n\nBUILTIN (ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         int16array_prototype)\n\nBUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         uint16array_prototype)\n\nBUILTIN (ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         int32array_prototype)\n\nBUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         uint32array_prototype)\n\nBUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         float32array_prototype)\n\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nBUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         float64array_prototype)\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\nBUILTIN (ECMA_BUILTIN_ID_BIGINT64ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         bigint64array_prototype)\n\nBUILTIN (ECMA_BUILTIN_ID_BIGUINT64ARRAY_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n         true,\n         biguint64array_prototype)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n\nBUILTIN (ECMA_BUILTIN_ID_PROMISE_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         promise_prototype)\n\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROMISE,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 promise)\n\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n\n/* The Map prototype object (23.1.3) */\nBUILTIN (ECMA_BUILTIN_ID_MAP_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         map_prototype)\n\n/* The Map routine (ECMA-262 v6, 23.1.1.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_MAP,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 map)\n\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n\n#if ENABLED (JERRY_BUILTIN_SET)\n\n/* The Set prototype object (23.1.3) */\nBUILTIN (ECMA_BUILTIN_ID_SET_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         set_prototype)\n\n/* The Set routine (ECMA-262 v6, 23.1.1.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_SET,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 set)\n\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n\n/* The WeakMap prototype object (23.1.3) */\nBUILTIN (ECMA_BUILTIN_ID_WEAKMAP_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         weakmap_prototype)\n\n/* The WeakMap routine (ECMA-262 v6, 23.1.1.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_WEAKMAP,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 weakmap)\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n\n/* The WeakSet prototype object (23.1.3) */\nBUILTIN (ECMA_BUILTIN_ID_WEAKSET_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         weakset_prototype)\n\n/* The WeakSet routine (ECMA-262 v6, 23.1.1.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_WEAKSET,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 weakset)\n\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n/* The Proxy routine (ECMA-262 v6, 26.2.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROXY,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 proxy)\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/* Intrinsic hidden builtin object  */\nBUILTIN (ECMA_BUILTIN_ID_INTRINSIC_OBJECT,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID__COUNT /* no prototype */,\n         true,\n         intrinsic)\n\n/* The Array.prototype[@@unscopables] object */\nBUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE_UNSCOPABLES,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID__COUNT /* no prototype */,\n         true,\n         array_prototype_unscopables)\n\n/* The Symbol prototype object (ECMA-262 v6, 19.4.2.7) */\nBUILTIN (ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         symbol_prototype)\n\n/* The Symbol routine (ECMA-262 v6, 19.4.2.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_SYMBOL,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 symbol)\n\n/* The %AsyncFunction% object (ECMA-262 v11, 25.7.2) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_ASYNC_FUNCTION,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION,\n                 true,\n                 async_function)\n\n/* The %AsyncFunctionPrototype% object (ECMA-262 v11, 25.7.3) */\nBUILTIN (ECMA_BUILTIN_ID_ASYNC_FUNCTION_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n         true,\n         async_function_prototype)\n\n/* The %IteratorPrototype% object (ECMA-262 v6, 25.1.2) */\nBUILTIN (ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         iterator_prototype)\n\n/* The %ArrayIteratorPrototype% object (ECMA-262 v6, 22.1.5.2) */\nBUILTIN (ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,\n         true,\n         array_iterator_prototype)\n\n/* The %StringIteratorPrototype% object (ECMA-262 v6, 22.1.5.2) */\nBUILTIN (ECMA_BUILTIN_ID_STRING_ITERATOR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,\n         true,\n         string_iterator_prototype)\n\n/* The %RegExpStringIteratorPrototype% object (ECMA-262 v11, 21.2.7.1) */\nBUILTIN (ECMA_BUILTIN_ID_REGEXP_STRING_ITERATOR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,\n         true,\n         regexp_string_iterator_prototype)\n\n/* The %AsyncIteratorPrototype% object (ECMA-262 v10, 25.1.3) */\nBUILTIN (ECMA_BUILTIN_ID_ASYNC_ITERATOR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         async_iterator_prototype)\n\n/* The %(GeneratorFunction)% object */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_GENERATOR_FUNCTION,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION,\n                 true,\n                 generator_function)\n\n/* The %(Generator)% object */\nBUILTIN (ECMA_BUILTIN_ID_GENERATOR,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n         true,\n         generator)\n\n/* The %(Generator).prototype% object */\nBUILTIN (ECMA_BUILTIN_ID_GENERATOR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,\n         true,\n         generator_prototype)\n\n/* The %(AsyncGeneratorFunction)% object */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_ASYNC_GENERATOR_FUNCTION,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION,\n                 true,\n                 async_generator_function)\n\n/* The %(AsyncGenerator)% object */\nBUILTIN (ECMA_BUILTIN_ID_ASYNC_GENERATOR,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n         true,\n         async_generator)\n\n/* The %(AsyncGenerator).prototype% object */\nBUILTIN (ECMA_BUILTIN_ID_ASYNC_GENERATOR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ASYNC_ITERATOR_PROTOTYPE,\n         true,\n         async_generator_prototype)\n\n#if ENABLED (JERRY_BUILTIN_SET)\n/* The %SetIteratorPrototype% object (ECMA-262 v6, 23.2.5.2) */\nBUILTIN (ECMA_BUILTIN_ID_SET_ITERATOR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,\n         true,\n         set_iterator_prototype)\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n/* The %MapIteratorPrototype% object (ECMA-262 v6, 23.1.5.2) */\nBUILTIN (ECMA_BUILTIN_ID_MAP_ITERATOR_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,\n         true,\n         map_iterator_prototype)\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n/* The %BigInt.prototype% object */\nBUILTIN (ECMA_BUILTIN_ID_BIGINT_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         bigint_prototype)\n\n/* The %BigInt% object */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_BIGINT,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 bigint)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n/* The DataView prototype object (ECMA-262 v6, 24.2.3.1) */\nBUILTIN (ECMA_BUILTIN_ID_DATAVIEW_PROTOTYPE,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,\n         true,\n         dataview_prototype)\n\n/* The DataView routine (ECMA-262 v6, 24.2.2.1) */\nBUILTIN_ROUTINE (ECMA_BUILTIN_ID_DATAVIEW,\n                 ECMA_OBJECT_TYPE_NATIVE_FUNCTION,\n                 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,\n                 true,\n                 dataview)\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n\n/* The Global object (15.1) */\nBUILTIN (ECMA_BUILTIN_ID_GLOBAL,\n         ECMA_OBJECT_TYPE_GENERAL,\n         ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, /* Implementation-dependent */\n         true,\n         global)\n\n#undef BUILTIN\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-bigint64array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID bigint64array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup bigint64arrayprototype ECMA BigInt64Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * BigInt64Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 8\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_BIGINT64ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-bigint64array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID bigint64array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup bigint64array ECMA BigInt64Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of BigInt64Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_bigint64array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"BigInt64Array cannot be directly called\"));\n} /* ecma_builtin_bigint64array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of BigInt64Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_bigint64array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                              uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_BIGINT64_ARRAY);\n} /* ecma_builtin_bigint64array_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * BigInt64Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 8\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_BIGINT64_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_BIGINT64ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-biguint64array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID biguint64array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup biguint64arrayprototype ECMA BigUInt64Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * BigUInt64Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 8\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_BIGUINT64ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-biguint64array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID biguint64array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup biguint64array ECMA BigUInt64Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of BigUInt64Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_biguint64array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"BigUInt64Array cannot be directly called\"));\n} /* ecma_builtin_biguint64array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of BigUInt64Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_biguint64array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                              uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_BIGUINT64_ARRAY);\n} /* ecma_builtin_biguint64array_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * BigUInt64Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 8\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_BIGUINT64_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_BIGUINT64ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) && ENABLED (JERRY_BUILTIN_BIGINT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-float32array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID float32array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup float32arrayprototype ECMA Float32Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Float32Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 4\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT32ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-float32array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID float32array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup float32array ECMA Float32Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of Float32Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_float32array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Float32Array cannot be directly called\"));\n} /* ecma_builtin_float32array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of Float32Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_float32array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                              uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_FLOAT32_ARRAY);\n} /* ecma_builtin_float32array_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Float32Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 4\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_FLOAT32_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-float64array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID float64array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup float64arrayprototype ECMA Float64Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Float64Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 8\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT64ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-float64array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID float64array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup float64array ECMA Float64Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of Float64Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_float64array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Float64Array cannot be directly called\"));\n} /* ecma_builtin_float64array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of Float64Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_float64array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                              uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_FLOAT64_ARRAY);\n} /* ecma_builtin_float64array_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Float64Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 8\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_FLOAT64_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-int16array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID int16array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup int16arrayprototype ECMA Int16Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Int16Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 2\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT16ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-int16array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID int16array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup int64array ECMA Int16Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of Int16Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_int16array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                       uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Int16Array cannot be directly called\"));\n} /* ecma_builtin_int16array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of Int16Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_int16array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                            uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_INT16_ARRAY);\n} /* ecma_builtin_int16array_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Int16Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 2\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_INT16_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-int32array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID int32array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup int32arrayprototype ECMA Int32Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Int32Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 4\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT32ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-int32array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID int32array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup int32array ECMA Int32Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of Int32Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_int32array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                       uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Int32Array cannot be directly called\"));\n} /* ecma_builtin_int32array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of Int32Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_int32array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                            uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_INT32_ARRAY);\n} /* ecma_builtin_int32array_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Int32Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 4\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_INT32_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-int8array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID int8array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup int8arrayprototype ECMA Int8Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Int8Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 1\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT8ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-int8array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID int8array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup int8array ECMA Int8Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of Int8Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_int8array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                      uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Int8Array cannot be directly called\"));\n} /* ecma_builtin_int8array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of Int8Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_int8array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                           uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_INT8_ARRAY);\n} /* ecma_builtin_int8array_dispatch_construct */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Int8Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 1\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_INT8_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-helpers.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#include \"ecma-builtins.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"ecma-function-object.h\"\n#include \"jcontext.h\"\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * Common implementation of the [[Construct]] call of TypedArrays.\n *\n * @return ecma value of the new TypedArray object\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_typedarray_helper_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                           uint32_t arguments_list_len, /**< number of arguments */\n                                           ecma_typedarray_type_t typedarray_id) /**< id of the typedarray */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n  ecma_builtin_id_t proto_id = ecma_typedarray_helper_get_prototype_id (typedarray_id);\n  ecma_object_t *prototype_obj_p = NULL;\n  ecma_object_t *current_new_target_p = JERRY_CONTEXT (current_new_target_p);\n\n  if (current_new_target_p != NULL)\n  {\n    prototype_obj_p = ecma_op_get_prototype_from_constructor (current_new_target_p, proto_id);\n    if (prototype_obj_p == NULL)\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n  else\n  {\n    prototype_obj_p = ecma_builtin_get (proto_id);\n  }\n\n  ecma_value_t val = ecma_op_create_typedarray (arguments_list_p,\n                                                arguments_list_len,\n                                                prototype_obj_p,\n                                                ecma_typedarray_helper_get_shift_size (typedarray_id),\n                                                typedarray_id);\n\n  if (current_new_target_p != NULL)\n  {\n    ecma_deref_object (prototype_obj_p);\n  }\n\n  return val;\n} /* ecma_typedarray_helper_dispatch_construct */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-helpers.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_TYPEDARRAY_HELPERS_H\n#define ECMA_TYPEDARRAY_HELPERS_H\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltinhelpers ECMA builtin helper operations\n * @{\n */\n\necma_value_t\necma_typedarray_helper_dispatch_construct (const ecma_value_t *arguments_list_p,\n                                           uint32_t arguments_list_len,\n                                           ecma_typedarray_type_t typedarray_id);\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#endif /* !ECMA_TYPEDARRAY_HELPERS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype-template.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#ifndef TYPEDARRAY_BYTES_PER_ELEMENT\n# error \"Please define TYPEDARRAY_BYTES_PER_ELEMENT\"\n#endif /* !TYPEDARRAY_BYTES_PER_ELEMENT */\n\n#ifndef TYPEDARRAY_BUILTIN_ID\n# error \"Please define TYPEDARRAY_BUILTIN_ID\"\n#endif /* !TYPEDARRAY_BUILTIN_ID */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* ES2015 22.2.3.4 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              TYPEDARRAY_BUILTIN_ID,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* ES2015 22.2.6.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U,\n              TYPEDARRAY_BYTES_PER_ELEMENT,\n              ECMA_PROPERTY_FIXED)\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n\n#undef TYPEDARRAY_BUILTIN_ID\n#undef TYPEDARRAY_BYTES_PER_ELEMENT\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"ecma-arraybuffer-object.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtin-typedarray-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-comparison.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-number-object.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jcontext.h\"\n#include \"jmem.h\"\n#include \"jrt-libc-includes.h\"\n#include \"jrt.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/**\n * This object has a custom dispatch function.\n */\n#define BUILTIN_CUSTOM_DISPATCH\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  /* These routines must be in this order */\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_START = 0,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_MAP,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REDUCE,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REDUCE_RIGHT,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_EVERY,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SOME,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FOR_EACH,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FILTER,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FIND,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FIND_INDEX,\n\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_INDEX_OF,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_LAST_INDEX_OF,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_INCLUDES,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FILL,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SORT,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REVERSE,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_COPY_WITHIN,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SLICE,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SUBARRAY,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_TO_LOCALE_STRING,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_JOIN,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_KEYS,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_ENTRIES,\n\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BUFFER_GETTER,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BYTELENGTH_GETTER,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BYTEOFFSET_GETTER,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_LENGTH_GETTER,\n\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SET,\n  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_TO_STRING_TAG_GETTER,\n};\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-typedarray-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID typedarray_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup typedarrayprototype ECMA %TypedArray%.prototype object built-in\n * @{\n */\n\n/**\n * Type of routine.\n */\ntypedef enum\n{\n  TYPEDARRAY_ROUTINE_EVERY, /**< routine: every ES2015, 22.2.3.7 */\n  TYPEDARRAY_ROUTINE_SOME, /**< routine: some ES2015, 22.2.3.9 */\n  TYPEDARRAY_ROUTINE_FOREACH, /**< routine: forEach ES2015, 15.4.4.18 */\n  TYPEDARRAY_ROUTINE__COUNT /**< count of the modes */\n} typedarray_routine_mode;\n\n/**\n * The common function for 'every', 'some' and 'forEach'\n * because they have a similar structure.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_exec_routine (ecma_value_t this_arg, /**< this argument */\n                                                ecma_typedarray_info_t *info_p, /**< object info */\n                                                ecma_value_t cb_func_val, /**< callback function */\n                                                ecma_value_t cb_this_arg, /**< 'this' of the callback function */\n                                                typedarray_routine_mode mode) /**< mode: which routine */\n{\n  JERRY_ASSERT (mode < TYPEDARRAY_ROUTINE__COUNT);\n\n  ecma_typedarray_getter_fn_t typedarray_getter_cb = ecma_get_typedarray_getter_fn (info_p->id);\n\n  ecma_object_t *func_object_p = ecma_get_object_from_value (cb_func_val);\n  uint32_t byte_pos = 0;\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  for (uint32_t index = 0; index < info_p->length && ecma_is_value_empty (ret_value); index++)\n  {\n    ecma_value_t current_index = ecma_make_uint32_value (index);\n    ecma_value_t element = typedarray_getter_cb (info_p->buffer_p + byte_pos);\n\n    ecma_value_t call_args[] = { element, current_index, this_arg };\n\n    ecma_value_t call_value = ecma_op_function_call (func_object_p, cb_this_arg, call_args, 3);\n\n    ecma_fast_free_value (current_index);\n    ecma_fast_free_value (element);\n\n    if (ECMA_IS_VALUE_ERROR (call_value))\n    {\n      return call_value;\n    }\n\n    bool to_bool_result = ecma_op_to_boolean (call_value);\n    ecma_free_value (call_value);\n\n    if (mode == TYPEDARRAY_ROUTINE_EVERY)\n    {\n      if (!to_bool_result)\n      {\n        return ECMA_VALUE_FALSE;\n      }\n    }\n    else if (mode == TYPEDARRAY_ROUTINE_SOME\n             && to_bool_result)\n    {\n      return ECMA_VALUE_TRUE;\n    }\n\n    byte_pos += info_p->element_size;\n  }\n\n  if (mode == TYPEDARRAY_ROUTINE_EVERY)\n  {\n    ret_value = ECMA_VALUE_TRUE;\n  }\n  else if (mode == TYPEDARRAY_ROUTINE_SOME)\n  {\n    ret_value = ECMA_VALUE_FALSE;\n  }\n  else\n  {\n    ret_value = ECMA_VALUE_UNDEFINED;\n  }\n\n  return ret_value;\n} /* ecma_builtin_typedarray_prototype_exec_routine */\n\n/**\n * The %TypedArray%.prototype object's 'map' routine\n *\n * See also:\n *          ES2015, 22.2.3.8\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_map (ecma_value_t this_arg, /**< this object */\n                                       ecma_typedarray_info_t *src_info_p, /**< object info */\n                                       ecma_value_t cb_func_val, /**< callback function */\n                                       ecma_value_t cb_this_arg) /**< this' of the callback function */\n{\n  ecma_object_t *func_object_p = ecma_get_object_from_value (cb_func_val);\n\n  // TODO: 22.2.3.18, 7-8.\n  ecma_value_t len = ecma_make_number_value (src_info_p->length);\n  ecma_value_t new_typedarray = ecma_typedarray_species_create (this_arg, &len, 1);\n  ecma_free_value (len);\n\n  if (ECMA_IS_VALUE_ERROR (new_typedarray))\n  {\n    return new_typedarray;\n  }\n\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (new_typedarray);\n  ecma_typedarray_info_t target_info = ecma_typedarray_get_info (target_obj_p);\n\n  ecma_typedarray_getter_fn_t src_typedarray_getter_cb = ecma_get_typedarray_getter_fn (src_info_p->id);\n  ecma_typedarray_setter_fn_t target_typedarray_setter_cb = ecma_get_typedarray_setter_fn (target_info.id);\n\n  uint32_t src_byte_pos = 0;\n\n  for (uint32_t index = 0; index < src_info_p->length; index++)\n  {\n    ecma_value_t current_index = ecma_make_uint32_value (index);\n    ecma_value_t element = src_typedarray_getter_cb (src_info_p->buffer_p + src_byte_pos);\n\n    ecma_value_t call_args[] = { element, current_index, this_arg };\n    ecma_value_t mapped_value = ecma_op_function_call (func_object_p, cb_this_arg, call_args, 3);\n\n    ecma_free_value (current_index);\n    ecma_free_value (element);\n\n    if (ECMA_IS_VALUE_ERROR (mapped_value))\n    {\n      ecma_free_value (new_typedarray);\n      return mapped_value;\n    }\n\n    uint32_t target_byte_pos = index << target_info.shift;\n    ecma_value_t set_element = target_typedarray_setter_cb (target_info.buffer_p + target_byte_pos, mapped_value);\n    ecma_free_value (mapped_value);\n\n    if (ECMA_IS_VALUE_ERROR (set_element))\n    {\n      ecma_free_value (new_typedarray);\n      return set_element;\n    }\n\n    src_byte_pos += src_info_p->element_size;\n  }\n\n  return new_typedarray;\n} /* ecma_builtin_typedarray_prototype_map */\n\n/**\n * Reduce and reduceRight routines share a similar structure.\n * And we use 'is_right' to distinguish between them.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_reduce_with_direction (ecma_value_t this_arg, /**< this object */\n                                                         ecma_typedarray_info_t *info_p, /**< object info */\n                                                         const ecma_value_t arguments_list_p[], /**arg_list*/\n                                                         uint32_t arguments_number, /**< length of arguments' list*/\n                                                         bool is_right) /**< choose order, true is reduceRight */\n{\n  ecma_typedarray_getter_fn_t getter_cb = ecma_get_typedarray_getter_fn (info_p->id);\n  uint32_t byte_pos;\n\n  if (info_p->length == 0)\n  {\n    if (arguments_number < 2)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Initial value cannot be undefined.\"));\n    }\n\n    return ecma_copy_value (arguments_list_p[1]);\n  }\n\n  JERRY_ASSERT (info_p->length > 0);\n\n  ecma_value_t accumulator = ECMA_VALUE_UNDEFINED;\n  uint32_t index = is_right ? (info_p->length - 1) : 0;\n\n  if (ecma_is_value_undefined (arguments_list_p[1]))\n  {\n    byte_pos = index << info_p->shift;\n    accumulator = getter_cb (info_p->buffer_p + byte_pos);\n\n    if (is_right)\n    {\n      if (index == 0)\n      {\n        return accumulator;\n      }\n\n      index--;\n    }\n    else\n    {\n      index++;\n\n      if (index == info_p->length)\n      {\n        return accumulator;\n      }\n    }\n  }\n  else\n  {\n    accumulator = ecma_copy_value (arguments_list_p[1]);\n  }\n\n  ecma_object_t *func_object_p = ecma_get_object_from_value (arguments_list_p[0]);\n\n  while (true)\n  {\n    ecma_value_t current_index = ecma_make_uint32_value (index);\n    byte_pos = index << info_p->shift;\n    ecma_value_t get_value = getter_cb (info_p->buffer_p + byte_pos);\n\n    ecma_value_t call_args[] = { accumulator, get_value, current_index, this_arg };\n\n    JERRY_ASSERT (ecma_is_value_number (get_value) || ecma_is_value_bigint (get_value));\n\n    ecma_value_t call_value = ecma_op_function_call (func_object_p,\n                                                     ECMA_VALUE_UNDEFINED,\n                                                     call_args,\n                                                     4);\n\n    ecma_fast_free_value (accumulator);\n    ecma_fast_free_value (get_value);\n    ecma_fast_free_value (current_index);\n\n    if (ECMA_IS_VALUE_ERROR (call_value))\n    {\n      return call_value;\n    }\n\n    accumulator = call_value;\n\n    if (is_right)\n    {\n      if (index == 0)\n      {\n        break;\n      }\n\n      index--;\n    }\n    else\n    {\n      index++;\n\n      if (index == info_p->length)\n      {\n        break;\n      }\n    }\n  }\n\n  return accumulator;\n} /* ecma_builtin_typedarray_prototype_reduce_with_direction */\n\n/**\n * The %TypedArray%.prototype object's 'filter' routine\n *\n * See also:\n *          ES2015, 22.2.3.9\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_filter (ecma_value_t this_arg, /**< this object */\n                                          ecma_typedarray_info_t *info_p, /**< object info */\n                                          ecma_value_t cb_func_val, /**< callback function */\n                                          ecma_value_t cb_this_arg) /**< 'this' of the callback function */\n{\n  ecma_typedarray_getter_fn_t getter_cb = ecma_get_typedarray_getter_fn (info_p->id);\n\n  ecma_object_t *func_object_p = ecma_get_object_from_value (cb_func_val);\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n\n  // TODO: 22.2.3.9, 7-8.\n  if (info_p->length == 0)\n  {\n    return ecma_op_create_typedarray_with_type_and_length (info_p->id, 0);\n  }\n\n  JMEM_DEFINE_LOCAL_ARRAY (pass_value_list_p, info_p->length * info_p->element_size, lit_utf8_byte_t);\n\n  lit_utf8_byte_t *pass_value_p = pass_value_list_p;\n  uint32_t byte_pos = 0;\n\n  for (uint32_t index = 0; index < info_p->length; index++)\n  {\n    ecma_value_t current_index = ecma_make_uint32_value (index);\n    ecma_value_t get_value = getter_cb (info_p->buffer_p + byte_pos);\n\n    JERRY_ASSERT (ecma_is_value_number (get_value) || ecma_is_value_bigint (get_value));\n\n    ecma_value_t call_args[] = { get_value, current_index, this_arg };\n\n    ecma_value_t call_value = ecma_op_function_call (func_object_p, cb_this_arg, call_args, 3);\n\n    ecma_fast_free_value (current_index);\n    ecma_fast_free_value (get_value);\n\n    if (ECMA_IS_VALUE_ERROR (call_value))\n    {\n      goto cleanup;\n    }\n\n    if (ecma_op_to_boolean (call_value))\n    {\n      memcpy (pass_value_p, info_p->buffer_p + byte_pos, info_p->element_size);\n      pass_value_p += info_p->element_size;\n    }\n\n    byte_pos += info_p->element_size;\n\n    ecma_free_value (call_value);\n  }\n\n  uint32_t pass_num = (uint32_t) ((pass_value_p - pass_value_list_p) >> info_p->shift);\n\n  ecma_value_t collected = ecma_make_number_value (pass_num);\n  ret_value = ecma_typedarray_species_create (this_arg, &collected, 1);\n  ecma_free_value (collected);\n\n  if (!ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (ret_value);\n\n    JERRY_ASSERT (ecma_typedarray_get_offset (obj_p) == 0);\n\n    memcpy (ecma_typedarray_get_buffer (obj_p),\n            pass_value_list_p,\n            (size_t) (pass_value_p - pass_value_list_p));\n  }\n\ncleanup:\n  JMEM_FINALIZE_LOCAL_ARRAY (pass_value_list_p);\n\n  return ret_value;\n} /* ecma_builtin_typedarray_prototype_filter */\n\n/**\n * The %TypedArray%.prototype object's 'reverse' routine\n *\n * See also:\n *          ES2015, 22.2.3.21\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_reverse (ecma_value_t this_arg, /**< this argument */\n                                           ecma_typedarray_info_t *info_p) /**< object info */\n{\n  uint32_t middle = (info_p->length / 2) << info_p->shift;\n  uint32_t buffer_last = (info_p->length << info_p->shift) - info_p->element_size;\n\n  for (uint32_t lower = 0; lower < middle; lower += info_p->element_size)\n  {\n    uint32_t upper = buffer_last - lower;\n    lit_utf8_byte_t *lower_p = info_p->buffer_p + lower;\n    lit_utf8_byte_t *upper_p = info_p->buffer_p + upper;\n\n    lit_utf8_byte_t tmp[8];\n    memcpy (&tmp[0], lower_p, info_p->element_size);\n    memcpy (lower_p, upper_p, info_p->element_size);\n    memcpy (upper_p, &tmp[0], info_p->element_size);\n  }\n\n  return ecma_copy_value (this_arg);\n} /* ecma_builtin_typedarray_prototype_reverse */\n\n/**\n * The %TypedArray%.prototype object's 'set' routine for a typedArray source\n *\n * See also:\n *          ES2015, 22.2.3.22, 22.2.3.22.2\n *\n * @return ecma value of undefined if success, error otherwise.\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_op_typedarray_set_with_typedarray (ecma_value_t this_arg, /**< this argument */\n                                        ecma_value_t arr_val, /**< typedarray object */\n                                        ecma_value_t offset_val) /**< offset value */\n{\n  /* 6.~ 8. targetOffset */\n  ecma_number_t target_offset_num;\n  if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (offset_val, &target_offset_num)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  if (target_offset_num <= -1.0 || target_offset_num >= (ecma_number_t) UINT32_MAX + 0.5)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid offset\"));\n  }\n\n  ecma_object_t *target_typedarray_p = ecma_get_object_from_value (this_arg);\n  ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (target_typedarray_p);\n  if (ecma_arraybuffer_is_detached (arraybuffer_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n  }\n\n  ecma_typedarray_info_t target_info = ecma_typedarray_get_info (target_typedarray_p);\n\n  ecma_object_t *src_typedarray_p = ecma_get_object_from_value (arr_val);\n  ecma_object_t *src_arraybuffer_p = ecma_typedarray_get_arraybuffer (src_typedarray_p);\n  if (ecma_arraybuffer_is_detached (src_arraybuffer_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n  }\n\n  ecma_typedarray_info_t src_info = ecma_typedarray_get_info (src_typedarray_p);\n\n  uint32_t target_offset_uint32 = ecma_number_to_uint32 (target_offset_num);\n\n  if ((int64_t) src_info.length + target_offset_uint32 > target_info.length)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid range of index\"));\n  }\n\n  /* Fast path first. If the source and target arrays are the same we do not need to copy anything. */\n  if (this_arg == arr_val)\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  /* 26. targetByteIndex */\n  uint32_t target_byte_index = target_offset_uint32 * target_info.element_size;\n\n  /* 27. limit */\n  uint32_t limit = target_byte_index + target_info.element_size * src_info.length;\n\n  if (src_info.id == target_info.id)\n  {\n    memmove (target_info.buffer_p + target_byte_index, src_info.buffer_p,\n             target_info.element_size * src_info.length);\n  }\n  else\n  {\n    ecma_typedarray_getter_fn_t src_typedarray_getter_cb = ecma_get_typedarray_getter_fn (src_info.id);\n    ecma_typedarray_setter_fn_t target_typedarray_setter_cb = ecma_get_typedarray_setter_fn (target_info.id);\n\n    uint32_t src_byte_index = 0;\n    while (target_byte_index < limit)\n    {\n      ecma_value_t element = src_typedarray_getter_cb (src_info.buffer_p + src_byte_index);\n      ecma_value_t set_element = target_typedarray_setter_cb (target_info.buffer_p + target_byte_index, element);\n      ecma_free_value (element);\n\n      if (ECMA_IS_VALUE_ERROR (set_element))\n      {\n        return set_element;\n      }\n\n      src_byte_index += src_info.element_size;\n      target_byte_index += target_info.element_size;\n    }\n  }\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_op_typedarray_set_with_typedarray */\n\n/**\n * The %TypedArray%.prototype object's 'set' routine\n *\n * See also:\n *          ES2015, 22.2.3.22, 22.2.3.22.1\n *\n * @return ecma value of undefined if success, error otherwise.\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_set (ecma_value_t this_arg, /**< this argument */\n                                       ecma_value_t arr_val, /**< array object */\n                                       ecma_value_t offset_val) /**< offset value */\n{\n  /* 1. */\n  if (ecma_is_typedarray (arr_val))\n  {\n    /* 22.2.3.22.2 */\n    return ecma_op_typedarray_set_with_typedarray (this_arg, arr_val, offset_val);\n  }\n\n  /* 6.~ 8. targetOffset */\n  ecma_number_t target_offset_num;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (offset_val, &target_offset_num)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  if (target_offset_num <= -1.0 || target_offset_num >= (ecma_number_t) UINT32_MAX + 0.5)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid offset\"));\n  }\n  uint32_t target_offset_uint32 = ecma_number_to_uint32 (target_offset_num);\n\n  /* 11. ~ 15. */\n  ecma_object_t *typedarray_p = ecma_get_object_from_value (this_arg);\n  ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (typedarray_p);\n  if (ecma_arraybuffer_is_detached (arraybuffer_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n  }\n\n  ecma_typedarray_info_t target_info = ecma_typedarray_get_info (typedarray_p);\n\n  /* 16.~ 17. */\n  ecma_value_t source_obj = ecma_op_to_object (arr_val);\n\n  if (ECMA_IS_VALUE_ERROR (source_obj))\n  {\n    return source_obj;\n  }\n\n  /* 18.~ 19. */\n  ecma_object_t *source_obj_p = ecma_get_object_from_value (source_obj);\n\n  ecma_length_t source_length;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_op_object_get_length (source_obj_p, &source_length)))\n  {\n    ecma_deref_object (source_obj_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 20. if srcLength + targetOffset > targetLength, throw a RangeError */\n  if ((int64_t) source_length + target_offset_uint32 > target_info.length)\n  {\n    ecma_deref_object (source_obj_p);\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid range of index\"));\n  }\n  JERRY_ASSERT (source_length <= UINT32_MAX);\n  uint32_t source_length_uint32 = (uint32_t) source_length;\n\n  /* 21.~ 25. */\n  uint32_t target_byte_index = target_offset_uint32 * target_info.element_size;\n  uint32_t k = 0;\n\n  ecma_typedarray_setter_fn_t target_typedarray_setter_cb = ecma_get_typedarray_setter_fn (target_info.id);\n\n  while (k < source_length_uint32)\n  {\n    ecma_value_t elem = ecma_op_object_get_by_index (source_obj_p, k);\n\n    if (ECMA_IS_VALUE_ERROR (elem))\n    {\n      ecma_deref_object (source_obj_p);\n      return elem;\n    }\n\n    ecma_value_t value_to_set;\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    if (ECMA_TYPEDARRAY_IS_BIGINT_TYPE (target_info.id))\n    {\n      value_to_set = ecma_bigint_to_bigint (elem, true);\n\n      if (ECMA_IS_VALUE_ERROR (value_to_set))\n      {\n        ecma_deref_object (source_obj_p);\n        ecma_free_value (elem);\n        return value_to_set;\n      }\n    }\n    else\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    {\n      ecma_number_t elem_num;\n      if (ECMA_IS_VALUE_ERROR (ecma_op_to_numeric (elem, &elem_num, ECMA_TO_NUMERIC_NO_OPTS)))\n      {\n        ecma_free_value (elem);\n        ecma_deref_object (source_obj_p);\n        return ECMA_VALUE_ERROR;\n      }\n\n      value_to_set = ecma_make_number_value (elem_num);\n    }\n\n    ecma_free_value (elem);\n\n    ecma_value_t set_element = target_typedarray_setter_cb (target_info.buffer_p + target_byte_index, value_to_set);\n\n    ecma_free_value (value_to_set);\n\n    if (ECMA_IS_VALUE_ERROR (set_element))\n    {\n      ecma_deref_object (source_obj_p);\n      return set_element;\n    }\n\n    k++;\n    target_byte_index += target_info.element_size;\n  }\n\n  ecma_deref_object (source_obj_p);\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_builtin_typedarray_prototype_set */\n\n/**\n * TypedArray.prototype's 'toString' single element operation routine based\n * on the Array.prototype's 'toString' single element operation routine\n *\n * See also:\n *          ECMA-262 v5.1, 15.4.4.2\n *\n * @return NULL - if the converison fails\n *         ecma_string_t * - otherwise\n */\nstatic ecma_string_t *\necma_op_typedarray_get_to_string_at_index (ecma_object_t *obj_p, /**< this object */\n                                           uint32_t index) /**< array index */\n{\n  ecma_value_t index_value = ecma_op_object_get_by_index (obj_p, index);\n\n  if (ECMA_IS_VALUE_ERROR (index_value))\n  {\n    return NULL;\n  }\n\n  if (ecma_is_value_undefined (index_value)\n      || ecma_is_value_null (index_value))\n  {\n    ecma_free_value (index_value);\n    return ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ecma_string_t *ret_str_p = ecma_op_to_string (index_value);\n\n  ecma_free_value (index_value);\n\n  return ret_str_p;\n} /* ecma_op_typedarray_get_to_string_at_index */\n\n/**\n * The TypedArray.prototype.toString's separator creation routine based on\n * the Array.prototype.toString's separator routine\n *\n * See also:\n *          ECMA-262 v5.1, 15.4.4.2 4th step\n *\n * @return NULL - if the conversion fails\n *         ecma_string_t * - otherwise\n */\nstatic ecma_string_t *\necma_op_typedarray_get_separator_string (ecma_value_t separator) /**< possible separator */\n{\n  if (ecma_is_value_undefined (separator))\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING_COMMA_CHAR);\n  }\n\n  return ecma_op_to_string (separator);\n} /* ecma_op_typedarray_get_separator_string */\n\n/**\n * The TypedArray.prototype object's 'join' routine basen on\n * the Array.porottype object's 'join'\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_join (ecma_object_t *obj_p, /**< this object */\n                                        ecma_value_t separator_arg) /**< separator argument */\n{\n  /* 2. */\n  ecma_value_t length_value = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_LENGTH);\n\n  if (ECMA_IS_VALUE_ERROR (length_value))\n  {\n    return length_value;\n  }\n\n  ecma_number_t length_number;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (length_value, &length_number)))\n  {\n    ecma_free_value (length_value);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n\n  /* 3. */\n  uint32_t length = ecma_number_to_uint32 (length_number);\n\n  if (length == 0)\n  {\n    /* 6. */\n    ecma_free_value (length_value);\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n  else\n  {\n    ecma_string_t *separator_string_p = ecma_op_typedarray_get_separator_string (separator_arg);\n\n    if (JERRY_UNLIKELY (separator_string_p == NULL))\n    {\n      goto cleanup;\n    }\n\n    /* 7-8. */\n    ecma_string_t *first_string_p = ecma_op_typedarray_get_to_string_at_index (obj_p, 0);\n\n    if (JERRY_UNLIKELY (first_string_p == NULL))\n    {\n      ecma_deref_ecma_string (separator_string_p);\n      goto cleanup;\n    }\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (first_string_p);\n\n    ecma_deref_ecma_string (first_string_p);\n\n    /* 9-10. */\n    for (uint32_t k = 1; k < length; k++)\n    {\n      /* 10.a */\n      ecma_stringbuilder_append (&builder, separator_string_p);\n\n      /* 10.d */\n      ecma_string_t *next_string_p = ecma_op_typedarray_get_to_string_at_index (obj_p, k);\n\n      if (JERRY_UNLIKELY (next_string_p == NULL))\n      {\n        ecma_stringbuilder_destroy (&builder);\n        ecma_deref_ecma_string (separator_string_p);\n        goto cleanup;\n      }\n\n      ecma_stringbuilder_append (&builder, next_string_p);\n\n      ecma_deref_ecma_string (next_string_p);\n    }\n\n    ecma_deref_ecma_string (separator_string_p);\n    ret_value = ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n  }\n\ncleanup:\n  ecma_free_value (length_value);\n\n  return ret_value;\n} /* ecma_builtin_typedarray_prototype_join */\n\n/**\n * The %TypedArray%.prototype object's 'subarray' routine.\n *\n * See also:\n *          ES2015, 22.2.3.26\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_subarray (ecma_value_t this_arg, /**< this object */\n                                            ecma_typedarray_info_t *info_p, /**< object info */\n                                            ecma_value_t begin, /**< begin */\n                                            ecma_value_t end) /**< end */\n{\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  /* 9. beginIndex, 12. endIndex */\n  uint32_t begin_index_uint32 = 0, end_index_uint32 = 0;\n\n  /* 7. relativeBegin */\n  if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (begin,\n                                                                       info_p->length,\n                                                                       &begin_index_uint32)))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  if (ecma_is_value_undefined (end))\n  {\n    end_index_uint32 = (uint32_t) info_p->length;\n  }\n  else\n  {\n    /* 10. relativeEnd */\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (end,\n                                                                         info_p->length,\n                                                                         &end_index_uint32)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  /* 13. newLength */\n  uint32_t subarray_length = 0;\n\n  if (end_index_uint32 > begin_index_uint32)\n  {\n    subarray_length = end_index_uint32 - begin_index_uint32;\n  }\n\n  /* 17. beginByteOffset */\n  uint32_t begin_byte_offset = info_p->offset + begin_index_uint32 * info_p->element_size;\n\n  ecma_value_t arguments_p[3] =\n  {\n    ecma_make_object_value (info_p->array_buffer_p),\n    ecma_make_uint32_value (begin_byte_offset),\n    ecma_make_uint32_value (subarray_length)\n  };\n\n  ret_value = ecma_typedarray_species_create (this_arg, arguments_p, 3);\n\n  ecma_free_value (arguments_p[1]);\n  ecma_free_value (arguments_p[2]);\n  return ret_value;\n} /* ecma_builtin_typedarray_prototype_subarray */\n\n/**\n * The %TypedArray%.prototype object's 'fill' routine.\n *\n * See also:\n *          ES2015, 22.2.3.8, 22.1.3.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_fill (ecma_value_t this_arg, /**< this object */\n                                        ecma_typedarray_info_t *info_p, /**< object info */\n                                        ecma_value_t value, /**< value */\n                                        ecma_value_t begin, /**< begin */\n                                        ecma_value_t end) /**< end */\n{\n  ecma_value_t value_to_set;\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (ECMA_TYPEDARRAY_IS_BIGINT_TYPE (info_p->id))\n  {\n    value_to_set = ecma_bigint_to_bigint (value, true);\n\n    if (ECMA_IS_VALUE_ERROR (value_to_set))\n    {\n      return value_to_set;\n    }\n  }\n  else\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  {\n    ecma_number_t value_num;\n    ecma_value_t ret_value = ecma_op_to_numeric (value, &value_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n    if (!ecma_is_value_empty (ret_value))\n    {\n      return ret_value;\n    }\n\n    value_to_set = ecma_make_number_value (value_num);\n  }\n\n  uint32_t begin_index_uint32 = 0, end_index_uint32 = 0;\n\n  if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (begin,\n                                                                       info_p->length,\n                                                                       &begin_index_uint32)))\n  {\n    ecma_free_value (value_to_set);\n    return ECMA_VALUE_ERROR;\n  }\n\n  if (ecma_is_value_undefined (end))\n  {\n    end_index_uint32 = (uint32_t) info_p->length;\n  }\n  else\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (end,\n                                                                         info_p->length,\n                                                                         &end_index_uint32)))\n    {\n      ecma_free_value (value_to_set);\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  uint32_t subarray_length = 0;\n\n  if (end_index_uint32 > begin_index_uint32)\n  {\n    subarray_length = end_index_uint32 - begin_index_uint32;\n  }\n\n  ecma_typedarray_setter_fn_t typedarray_setter_cb = ecma_get_typedarray_setter_fn (info_p->id);\n  uint32_t byte_index = begin_index_uint32 * info_p->element_size;\n  uint32_t limit = byte_index + subarray_length * info_p->element_size;\n\n  while (byte_index < limit)\n  {\n    ecma_value_t set_element = typedarray_setter_cb (info_p->buffer_p + byte_index, value_to_set);\n\n    if (ECMA_IS_VALUE_ERROR (set_element))\n    {\n      ecma_free_value (value_to_set);\n      return set_element;\n    }\n\n    byte_index += info_p->element_size;\n  }\n\n  ecma_free_value (value_to_set);\n\n  return ecma_copy_value (this_arg);\n} /* ecma_builtin_typedarray_prototype_fill */\n\n/**\n * SortCompare abstract method\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.11\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_sort_compare_helper (ecma_value_t lhs, /**< left value */\n                                                       ecma_value_t rhs, /**< right value */\n                                                       ecma_value_t compare_func) /**< compare function */\n{\n  if (ecma_is_value_undefined (compare_func))\n  {\n    /* Default comparison when no comparefn is passed. */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    if (ecma_is_value_bigint (lhs) && ecma_is_value_bigint (rhs))\n    {\n      return ecma_make_number_value (ecma_bigint_compare_to_bigint (lhs, rhs));\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n    ecma_number_t result = ECMA_NUMBER_ZERO;\n\n    double lhs_value = (double) ecma_get_number_from_value (lhs);\n    double rhs_value = (double) ecma_get_number_from_value (rhs);\n\n    if (ecma_number_is_nan (lhs_value))\n    {\n      // Keep NaNs at the end of the array.\n      result = ECMA_NUMBER_ONE;\n    }\n    else if (ecma_number_is_nan (rhs_value))\n    {\n      // Keep NaNs at the end of the array.\n      result = ECMA_NUMBER_MINUS_ONE;\n    }\n    else if (lhs_value < rhs_value)\n    {\n      result = ECMA_NUMBER_MINUS_ONE;\n    }\n    else if (lhs_value > rhs_value)\n    {\n      result = ECMA_NUMBER_ONE;\n    }\n    else\n    {\n      result = ECMA_NUMBER_ZERO;\n    }\n\n    return ecma_make_number_value (result);\n  }\n\n  /*\n   * compare_func, if not undefined, will always contain a callable function object.\n   * We checked this previously, before this function was called.\n   */\n  JERRY_ASSERT (ecma_op_is_callable (compare_func));\n  ecma_object_t *comparefn_obj_p = ecma_get_object_from_value (compare_func);\n\n  ecma_value_t compare_args[] = { lhs, rhs };\n\n  ecma_value_t call_value = ecma_op_function_call (comparefn_obj_p,\n                                                   ECMA_VALUE_UNDEFINED,\n                                                   compare_args,\n                                                   2);\n\n  if (ECMA_IS_VALUE_ERROR (call_value) || ecma_is_value_number (call_value))\n  {\n    return call_value;\n  }\n\n  ecma_number_t ret_num;\n  ecma_value_t number_result = ecma_op_to_number (call_value, &ret_num);\n\n  ecma_free_value (call_value);\n\n  if (ECMA_IS_VALUE_ERROR (number_result))\n  {\n    return number_result;\n  }\n\n  // If the coerced value can't be represented as a Number, compare them as equals.\n  if (ecma_number_is_nan (ret_num))\n  {\n    return ecma_make_number_value (ECMA_NUMBER_ZERO);\n  }\n\n  return ecma_make_number_value (ret_num);\n} /* ecma_builtin_typedarray_prototype_sort_compare_helper */\n\n/**\n * The %TypedArray%.prototype object's 'sort' routine.\n *\n * See also:\n *          ES2015, 22.2.3.25, 22.1.3.24\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_sort (ecma_value_t this_arg, /**< this argument */\n                                        ecma_typedarray_info_t *info_p, /**< object info */\n                                        ecma_value_t compare_func) /**< comparator fn */\n{\n  JERRY_ASSERT (ecma_is_typedarray (this_arg));\n  JERRY_ASSERT (ecma_is_value_undefined (compare_func) || ecma_op_is_callable (compare_func));\n\n  if (!info_p->length)\n  {\n    return ecma_copy_value (this_arg);\n  }\n\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n  JMEM_DEFINE_LOCAL_ARRAY (values_buffer, info_p->length, ecma_value_t);\n\n  uint32_t byte_index = 0, buffer_index = 0;\n  uint32_t limit = info_p->length * info_p->element_size;\n\n  ecma_typedarray_getter_fn_t typedarray_getter_cb = ecma_get_typedarray_getter_fn (info_p->id);\n  /* Copy unsorted array into a native c array. */\n  while (byte_index < limit)\n  {\n    JERRY_ASSERT (buffer_index < info_p->length);\n    ecma_value_t element_value = typedarray_getter_cb (info_p->buffer_p + byte_index);\n    values_buffer[buffer_index++] = element_value;\n    byte_index += info_p->element_size;\n  }\n\n  JERRY_ASSERT (buffer_index == info_p->length);\n\n  const ecma_builtin_helper_sort_compare_fn_t sort_cb = &ecma_builtin_typedarray_prototype_sort_compare_helper;\n\n  ecma_value_t sort_value = ecma_builtin_helper_array_merge_sort_helper (values_buffer,\n                                                                         (uint32_t) (info_p->length),\n                                                                         compare_func,\n                                                                         sort_cb);\n\n  if (ECMA_IS_VALUE_ERROR (sort_value))\n  {\n    ret_value = sort_value;\n    goto free_values;\n  }\n\n  JERRY_ASSERT (sort_value == ECMA_VALUE_EMPTY);\n\n  ecma_typedarray_setter_fn_t typedarray_setter_cb = ecma_get_typedarray_setter_fn (info_p->id);\n\n  byte_index = 0;\n  buffer_index = 0;\n  limit = info_p->length * info_p->element_size;\n  /* Put sorted values from the native array back into the typedarray buffer. */\n  while (byte_index < limit)\n  {\n    JERRY_ASSERT (buffer_index < info_p->length);\n    ecma_value_t element_value = values_buffer[buffer_index++];\n    ecma_value_t set_element = typedarray_setter_cb (info_p->buffer_p + byte_index, element_value);\n\n    if (ECMA_IS_VALUE_ERROR (set_element))\n    {\n      ret_value = set_element;\n      goto free_values;\n    }\n\n    byte_index += info_p->element_size;\n  }\n\n  JERRY_ASSERT (buffer_index == info_p->length);\n\n  ret_value = ecma_copy_value (this_arg);\n\nfree_values:\n  /* Free values that were copied to the local array. */\n  for (uint32_t index = 0; index < info_p->length; index++)\n  {\n    ecma_free_value (values_buffer[index]);\n  }\n\n  JMEM_FINALIZE_LOCAL_ARRAY (values_buffer);\n\n  return ret_value;\n} /* ecma_builtin_typedarray_prototype_sort */\n\n/**\n * The %TypedArray%.prototype object's 'find' and 'findIndex' routine helper\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_find_helper (ecma_value_t this_arg, /**< this argument */\n                                               ecma_typedarray_info_t *info_p, /**< object info */\n                                               ecma_value_t predicate, /**< callback function */\n                                               ecma_value_t predicate_this_arg, /**< this argument for\n                                                                                 *   invoke predicate */\n                                               bool is_find) /**< true - find routine\n                                                              *   false - findIndex routine */\n{\n  JERRY_ASSERT (ecma_is_value_object (predicate));\n  ecma_object_t *func_object_p = ecma_get_object_from_value (predicate);\n\n  uint32_t buffer_index = 0;\n  uint32_t limit = info_p->length * info_p->element_size;\n\n  ecma_typedarray_getter_fn_t typedarray_getter_cb = ecma_get_typedarray_getter_fn (info_p->id);\n\n  for (uint32_t byte_index = 0; byte_index < limit; byte_index += info_p->element_size)\n  {\n    JERRY_ASSERT (buffer_index < info_p->length);\n    ecma_value_t element_value = typedarray_getter_cb (info_p->buffer_p + byte_index);\n\n    ecma_value_t call_args[] = { element_value, ecma_make_uint32_value (buffer_index), this_arg };\n    ecma_value_t call_value = ecma_op_function_call (func_object_p, predicate_this_arg, call_args, 3);\n\n    if (ECMA_IS_VALUE_ERROR (call_value))\n    {\n      ecma_free_value (element_value);\n      return call_value;\n    }\n\n    bool call_result = ecma_op_to_boolean (call_value);\n    ecma_free_value (call_value);\n\n    if (call_result)\n    {\n      if (is_find)\n      {\n        return element_value;\n      }\n\n      ecma_free_value (element_value);\n      return ecma_make_uint32_value (buffer_index);\n    }\n\n    buffer_index++;\n    ecma_free_value (element_value);\n  }\n\n  return is_find ? ECMA_VALUE_UNDEFINED : ecma_make_integer_value (-1);\n} /* ecma_builtin_typedarray_prototype_find_helper */\n\n/**\n * The %TypedArray%.prototype object's 'indexOf' routine\n *\n * See also:\n *         ECMA-262 v6, 22.2.3.13\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_index_of (ecma_typedarray_info_t *info_p, /**< object info */\n                                            const ecma_value_t args[], /**< arguments list */\n                                            uint32_t args_number) /**< number of arguments */\n{\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  bool is_bigint = ECMA_TYPEDARRAY_IS_BIGINT_TYPE (info_p->id);\n#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  bool is_bigint = false;\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  uint32_t limit = info_p->length * info_p->element_size;\n  uint32_t from_index;\n\n   /* 5. */\n  if (args_number == 0\n      || (!ecma_is_value_number (args[0]) && !is_bigint)\n      || info_p->length == 0)\n  {\n    return ecma_make_integer_value (-1);\n  }\n  if (args_number == 1)\n  {\n    from_index = 0;\n  }\n  else\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (args[1],\n                                                                         info_p->length,\n                                                                         &from_index)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n  }\n\n  ecma_typedarray_getter_fn_t getter_cb = ecma_get_typedarray_getter_fn (info_p->id);\n\n  /* 11. */\n  for (uint32_t position = from_index * info_p->element_size;\n       position < limit;\n       position += info_p->element_size)\n  {\n    ecma_value_t element = getter_cb (info_p->buffer_p + position);\n\n    if (ecma_op_same_value_zero (args[0], element, true))\n    {\n      ecma_free_value (element);\n      return ecma_make_number_value ((ecma_number_t) position / info_p->element_size);\n    }\n\n    ecma_free_value (element);\n  }\n\n  /* 12. */\n  return ecma_make_integer_value (-1);\n} /* ecma_builtin_typedarray_prototype_index_of */\n\n/**\n * The %TypedArray%.prototype object's 'lastIndexOf' routine\n *\n * See also:\n *          ECMA-262 v6, 22.2.3.16\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_last_index_of (ecma_typedarray_info_t *info_p, /**< object info */\n                                                const ecma_value_t args[], /**< arguments list */\n                                                uint32_t args_number) /**< number of arguments */\n{\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  bool is_bigint = ECMA_TYPEDARRAY_IS_BIGINT_TYPE (info_p->id);\n#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  bool is_bigint = false;\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  uint32_t from_index;\n\n  /* 5. */\n  if (args_number == 0\n      || (!ecma_is_value_number (args[0]) && !is_bigint)\n      || info_p->length == 0)\n  {\n    return ecma_make_integer_value (-1);\n  }\n\n  if (args_number == 1)\n  {\n    from_index = info_p->length - 1;\n  }\n  else\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (args[1],\n                                                                         info_p->length,\n                                                                         &from_index)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_number_t to_int;\n\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (args[1], &to_int)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    if (info_p->length + to_int < 0)\n    {\n      return ecma_make_integer_value (-1);\n    }\n\n    from_index = JERRY_MIN (from_index, info_p->length - 1);\n  }\n\n  ecma_typedarray_getter_fn_t getter_cb = ecma_get_typedarray_getter_fn (info_p->id);\n  uint8_t *current_element_p = info_p->buffer_p + from_index * info_p->element_size;\n\n  /* 10. */\n  while (current_element_p >= info_p->buffer_p)\n  {\n    ecma_value_t element = getter_cb (info_p->buffer_p + from_index * info_p->element_size);\n\n    if (ecma_op_same_value_zero (args[0], element, true))\n    {\n      ecma_free_value (element);\n      return ecma_make_number_value ((ecma_number_t) from_index * info_p->element_size / info_p->element_size);\n    }\n\n    ecma_free_value (element);\n    current_element_p -= info_p->element_size;\n    from_index--;\n  }\n\n  /* 11. */\n  return ecma_make_integer_value (-1);\n} /* ecma_builtin_typedarray_prototype_last_index_of */\n\n/**\n * The %TypedArray%.prototype object's 'copyWithin' routine\n *\n * See also:\n *          ECMA-262 v6, 22.2.3.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_copy_within (ecma_value_t this_arg, /**< this argument */\n                                               ecma_typedarray_info_t *info_p, /**< object info */\n                                               const ecma_value_t args[], /**< arguments list */\n                                               uint32_t args_number) /**< number of arguments */\n{\n  uint32_t relative_target = 0;\n  uint32_t relative_start = 0;\n  uint32_t relative_end = info_p->length;\n\n  if (args_number > 0)\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (args[0],\n                                                                         info_p->length,\n                                                                         &relative_target)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    if (args_number > 1)\n    {\n      if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (args[1],\n                                                                           info_p->length,\n                                                                           &relative_start)))\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      if (args_number > 2 && args[2] != ECMA_VALUE_UNDEFINED)\n      {\n        if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (args[2],\n                                                                             info_p->length,\n                                                                             &relative_end)))\n        {\n          return ECMA_VALUE_ERROR;\n        }\n      }\n    }\n  }\n\n  if (relative_target >= info_p->length || relative_start >= relative_end || relative_end == 0)\n  {\n    return ecma_copy_value (this_arg);\n  }\n  else\n  {\n    uint32_t distance = relative_end - relative_start;\n    uint32_t offset = info_p->length - relative_target;\n    uint32_t count = JERRY_MIN (distance, offset);\n\n    memmove (info_p->buffer_p + (relative_target * info_p->element_size),\n             info_p->buffer_p + (relative_start * info_p->element_size),\n             (size_t) (count * info_p->element_size));\n  }\n\n  return ecma_copy_value (this_arg);\n} /* ecma_builtin_typedarray_prototype_copy_within */\n\n/**\n * The %TypedArray%.prototype object's 'slice' routine\n *\n * See also:\n *          ECMA-262 v6, 22.2.3.23\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_slice (ecma_value_t this_arg, /**< this argument */\n                                         ecma_typedarray_info_t *info_p, /**< object info */\n                                         const ecma_value_t args[], /**< arguments list */\n                                         uint32_t args_number) /**< number of arguments */\n{\n  uint32_t relative_start = 0;\n  uint32_t relative_end = info_p->length;\n\n  if (args_number > 0)\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (args[0],\n                                                                         info_p->length,\n                                                                         &relative_start)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    if (args_number > 1\n        && args[1] != ECMA_VALUE_UNDEFINED\n        && ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (args[1],\n                                                                            info_p->length,\n                                                                            &relative_end)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  int32_t distance = (int32_t) (relative_end - relative_start);\n  uint32_t count = distance > 0 ? (uint32_t) distance : 0;\n\n  ecma_value_t len = ecma_make_number_value (count);\n  // TODO: 22.2.3.23, 12-13.\n  ecma_value_t new_typedarray = ecma_typedarray_species_create (this_arg, &len, 1);\n  ecma_free_value (len);\n\n  if (ECMA_IS_VALUE_ERROR (new_typedarray))\n  {\n    return new_typedarray;\n  }\n\n  if (count > 0)\n  {\n    ecma_object_t *new_typedarray_p = ecma_get_object_from_value (new_typedarray);\n\n    lit_utf8_byte_t *new_typedarray_buffer_p = ecma_typedarray_get_buffer (new_typedarray_p);\n    uint32_t src_byte_index = (relative_start * info_p->element_size);\n\n    memcpy (new_typedarray_buffer_p,\n            info_p->buffer_p + src_byte_index,\n            count * info_p->element_size);\n  }\n\n  return new_typedarray;\n} /* ecma_builtin_typedarray_prototype_slice */\n\n/**\n * The TypedArray.prototype's 'toLocaleString' single element operation routine.\n *\n * See also:\n *          ECMA-262 v6, 22.1.3.26 steps 7-10 and 12.b-e\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n*/\nstatic ecma_value_t\necma_builtin_typedarray_prototype_to_locale_string_helper (ecma_typedarray_info_t *info_p, /**< object info */\n                                                           uint32_t index) /** array index */\n{\n  ecma_value_t element_value = ecma_get_typedarray_element (info_p->buffer_p + index, info_p->id);\n  ecma_value_t call_value = ecma_op_invoke_by_magic_id (element_value, LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, NULL, 0);\n\n  ecma_free_value (element_value);\n\n  if (ECMA_IS_VALUE_ERROR (call_value))\n  {\n    return call_value;\n  }\n\n  ecma_string_t *str_p = ecma_op_to_string (call_value);\n\n  ecma_free_value (call_value);\n\n  if (JERRY_UNLIKELY (str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  return ecma_make_string_value (str_p);\n} /* ecma_builtin_typedarray_prototype_to_locale_string_helper */\n\n/**\n * The %TypedArray%.prototype object's 'toLocaleString' routine\n *\n * See also:\n *          ECMA-262 v6, 22.2.3.27\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_to_locale_string (ecma_typedarray_info_t *info_p) /**< object info */\n{\n  uint32_t limit = info_p->length * info_p->element_size;\n\n  if (info_p->length == 0)\n  {\n    return ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ecma_value_t first_element = ecma_builtin_typedarray_prototype_to_locale_string_helper (info_p, 0);\n\n  if (ECMA_IS_VALUE_ERROR (first_element))\n  {\n    return first_element;\n  }\n\n  ecma_string_t *return_string_p = ecma_get_string_from_value (first_element);\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (return_string_p);\n  ecma_deref_ecma_string (return_string_p);\n\n  for (uint32_t k = info_p->element_size; k < limit; k += info_p->element_size)\n  {\n    ecma_stringbuilder_append_byte (&builder, LIT_CHAR_COMMA);\n    ecma_value_t next_element = ecma_builtin_typedarray_prototype_to_locale_string_helper (info_p, k);\n\n    if (ECMA_IS_VALUE_ERROR (next_element))\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return next_element;\n    }\n\n    ecma_string_t *next_element_p = ecma_get_string_from_value (next_element);\n    ecma_stringbuilder_append (&builder, next_element_p);\n    ecma_deref_ecma_string (next_element_p);\n  }\n\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_builtin_typedarray_prototype_to_locale_string */\n\n/**\n * The %TypedArray%.prototype object's 'includes' routine\n *\n * See also:\n *          ECMA-262 v11, 22.2.3.13.\n */\nstatic ecma_value_t\necma_builtin_typedarray_prototype_includes (ecma_typedarray_info_t *info_p, /**< object info */\n                                            const ecma_value_t args[], /**< arguments list */\n                                            uint32_t args_number) /**< number of arguments */\n{\n  uint32_t limit = info_p->length * info_p->element_size;\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  bool is_bigint = ECMA_TYPEDARRAY_IS_BIGINT_TYPE (info_p->id);\n#else /* !ENABLED (JERRRY_BUILTIN_BIGINT) */\n  bool is_bigint = false;\n#endif /* ENABLED (JERRRY_BUILTIN_BIGINT) */\n\n  if (args_number == 0\n      || (!ecma_is_value_number (args[0]) && !is_bigint)\n      || info_p->length == 0)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  uint32_t from_index = 0;\n\n  if (args_number > 1)\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_uint32_index_normalize (args[1], info_p->length, &from_index)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n\n  ecma_typedarray_getter_fn_t getter_cb = ecma_get_typedarray_getter_fn (info_p->id);\n\n  uint32_t search_pos = (uint32_t) from_index * info_p->element_size;\n\n  while (search_pos < limit)\n  {\n    ecma_value_t element = getter_cb (info_p->buffer_p + search_pos);\n\n    if (ecma_op_same_value_zero (args[0], element, false))\n    {\n      ecma_free_value (element);\n      return ECMA_VALUE_TRUE;\n    }\n\n    ecma_free_value (element);\n    search_pos += info_p->element_size;\n  }\n\n  return ECMA_VALUE_FALSE;\n} /* ecma_builtin_typedarray_prototype_includes */\n\n/**\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_typedarray_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide\n                                                                                 *   routine identifier */\n                                                    ecma_value_t this_arg, /**< 'this' argument value */\n                                                    const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                            *   passed to routine */\n                                                    uint32_t arguments_number) /**< length of arguments' list */\n{\n  if (!ecma_is_typedarray (this_arg))\n  {\n    if (builtin_routine_id == ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_TO_STRING_TAG_GETTER)\n    {\n      return ECMA_VALUE_UNDEFINED;\n    }\n\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not a TypedArray.\"));\n  }\n\n  ecma_object_t *typedarray_p = ecma_get_object_from_value (this_arg);\n  ecma_typedarray_info_t info = { 0 };\n\n  if (builtin_routine_id < ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BUFFER_GETTER)\n  {\n    info = ecma_typedarray_get_info (typedarray_p);\n\n    if (ecma_arraybuffer_is_detached (info.array_buffer_p)\n        && builtin_routine_id != ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SUBARRAY)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n    }\n  }\n\n  if (builtin_routine_id < ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_INDEX_OF && !ecma_op_is_callable (arguments_list_p[0]))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n  }\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_INCLUDES:\n    {\n      return ecma_builtin_typedarray_prototype_includes (&info, arguments_list_p, arguments_number);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_JOIN:\n    {\n      return ecma_builtin_typedarray_prototype_join (typedarray_p, arguments_list_p[0]);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_EVERY:\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SOME:\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FOR_EACH:\n    {\n      uint8_t offset = (uint8_t) (builtin_routine_id - ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_EVERY);\n\n      return ecma_builtin_typedarray_prototype_exec_routine (this_arg,\n                                                             &info,\n                                                             arguments_list_p[0],\n                                                             arguments_list_p[1],\n                                                             offset);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_MAP:\n    {\n      return ecma_builtin_typedarray_prototype_map (this_arg, &info, arguments_list_p[0], arguments_list_p[1]);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REDUCE:\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REDUCE_RIGHT:\n    {\n      bool is_reduce =  builtin_routine_id == ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REDUCE_RIGHT;\n      return ecma_builtin_typedarray_prototype_reduce_with_direction (this_arg,\n                                                                      &info,\n                                                                      arguments_list_p,\n                                                                      arguments_number,\n                                                                      is_reduce);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FILTER:\n    {\n      return ecma_builtin_typedarray_prototype_filter (this_arg, &info, arguments_list_p[0], arguments_list_p[1]);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REVERSE:\n    {\n      return ecma_builtin_typedarray_prototype_reverse (this_arg, &info);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SET:\n    {\n      return ecma_builtin_typedarray_prototype_set (this_arg, arguments_list_p[0], arguments_list_p[1]);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SUBARRAY:\n    {\n      return ecma_builtin_typedarray_prototype_subarray (this_arg, &info, arguments_list_p[0], arguments_list_p[1]);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FILL:\n    {\n      return ecma_builtin_typedarray_prototype_fill (this_arg,\n                                                     &info,\n                                                     arguments_list_p[0],\n                                                     arguments_list_p[1],\n                                                     arguments_list_p[2]);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SORT:\n    {\n      if (!ecma_is_value_undefined (arguments_list_p[0]) && !ecma_op_is_callable (arguments_list_p[0]))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n      }\n\n      return ecma_builtin_typedarray_prototype_sort (this_arg, &info, arguments_list_p[0]);\n\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FIND:\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FIND_INDEX:\n    {\n      bool is_find = builtin_routine_id == ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FIND;\n      return ecma_builtin_typedarray_prototype_find_helper (this_arg,\n                                                            &info,\n                                                            arguments_list_p[0],\n                                                            arguments_list_p[1],\n                                                            is_find);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_INDEX_OF:\n    {\n      return ecma_builtin_typedarray_prototype_index_of (&info, arguments_list_p, arguments_number);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_LAST_INDEX_OF:\n    {\n      return ecma_builtin_typedarray_prototype_last_index_of (&info, arguments_list_p, arguments_number);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_COPY_WITHIN:\n    {\n      return ecma_builtin_typedarray_prototype_copy_within (this_arg, &info, arguments_list_p, arguments_number);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SLICE:\n    {\n      return ecma_builtin_typedarray_prototype_slice (this_arg, &info, arguments_list_p, arguments_number);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_TO_LOCALE_STRING:\n    {\n      return ecma_builtin_typedarray_prototype_to_locale_string (&info);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_KEYS:\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_ENTRIES:\n    {\n      ecma_iterator_kind_t iter_id = (builtin_routine_id == ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_KEYS)\n      ? ECMA_ITERATOR_KEYS : ECMA_ITERATOR_ENTRIES;\n\n      return ecma_typedarray_iterators_helper (this_arg, iter_id);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BUFFER_GETTER:\n    {\n      ecma_object_t *buffer_p = ecma_typedarray_get_arraybuffer (typedarray_p);\n      ecma_ref_object (buffer_p);\n\n      return ecma_make_object_value (buffer_p);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BYTELENGTH_GETTER:\n    {\n      uint32_t length = ecma_typedarray_get_length (typedarray_p);\n      uint8_t shift = ecma_typedarray_get_element_size_shift (typedarray_p);\n      return ecma_make_uint32_value (length << shift);\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BYTEOFFSET_GETTER:\n    {\n      return ecma_make_uint32_value (ecma_typedarray_get_offset (typedarray_p));\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_LENGTH_GETTER:\n    {\n      return ecma_make_uint32_value (ecma_typedarray_get_length (typedarray_p));\n    }\n    case ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_TO_STRING_TAG_GETTER:\n    {\n      ecma_extended_object_t *obj_p = (ecma_extended_object_t *) typedarray_p;\n      return ecma_make_magic_string_value (obj_p->u.pseudo_array.u1.class_id);\n    }\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_builtin_typedarray_prototype_dispatch_routine */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %TypedArrayPrototype% description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/* ES2015 22.2.3.4 */\nOBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,\n              ECMA_BUILTIN_ID_TYPEDARRAY,\n              ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n\n/* Readonly accessor properties */\n/* ES2015 22.2.3.1 */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BUFFER,\n                    ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BUFFER_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n/* ES2015 22.2.3.2 */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_LENGTH_UL,\n                    ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BYTELENGTH_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n/* ES2015 22.2.3.3 */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_OFFSET_UL,\n                    ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_BYTEOFFSET_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ES2015 22.2.3.17 */\nACCESSOR_READ_ONLY (LIT_MAGIC_STRING_LENGTH,\n                    ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_LENGTH_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ECMA-262 v6, 23.1.3.13 */\nACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,\n                    ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_TO_STRING_TAG_GETTER,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\nROUTINE (LIT_MAGIC_STRING_COPY_WITHIN, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_COPY_WITHIN, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_ENTRIES, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_ENTRIES, 0, 0)\nROUTINE (LIT_MAGIC_STRING_EVERY, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_EVERY, 2, 1)\nROUTINE (LIT_MAGIC_STRING_FILL, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FILL, 3, 1)\nROUTINE (LIT_MAGIC_STRING_FILTER, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FILTER, 2, 1)\nROUTINE (LIT_MAGIC_STRING_FIND, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FIND, 2, 1)\nROUTINE (LIT_MAGIC_STRING_FIND_INDEX, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FIND_INDEX, 2, 1)\nROUTINE (LIT_MAGIC_STRING_FOR_EACH_UL, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_FOR_EACH, 2, 1)\nROUTINE (LIT_MAGIC_STRING_INCLUDES, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_INCLUDES, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_INDEX_OF_UL, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_INDEX_OF, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_JOIN,  ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_JOIN, 1, 1)\nROUTINE (LIT_MAGIC_STRING_KEYS, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_KEYS, 0, 0)\nROUTINE (LIT_MAGIC_STRING_LAST_INDEX_OF_UL, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_LAST_INDEX_OF, NON_FIXED, 1)\nROUTINE (LIT_MAGIC_STRING_MAP, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_MAP, 2, 1)\nROUTINE (LIT_MAGIC_STRING_REDUCE, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REDUCE, 2, 1)\nROUTINE (LIT_MAGIC_STRING_REDUCE_RIGHT_UL, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REDUCE_RIGHT, 2, 1)\nROUTINE (LIT_MAGIC_STRING_REVERSE, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_REVERSE, 0, 0)\nROUTINE (LIT_MAGIC_STRING_SET, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SET, 2, 1)\nROUTINE (LIT_MAGIC_STRING_SLICE, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SLICE, NON_FIXED, 2)\nROUTINE (LIT_MAGIC_STRING_SOME, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SOME, 2, 1)\nROUTINE (LIT_MAGIC_STRING_SORT, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SORT, 1, 1)\nROUTINE (LIT_MAGIC_STRING_SUBARRAY, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SUBARRAY, 2, 2)\nROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_TO_LOCALE_STRING, 0, 0)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_TO_STRING_UL, LIT_MAGIC_STRING_TO_STRING_UL,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_MAGIC_STRING_VALUES, LIT_INTERNAL_MAGIC_STRING_TYPEDARRAY_PROTOTYPE_VALUES,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\nINTRINSIC_PROPERTY (LIT_GLOBAL_SYMBOL_ITERATOR, LIT_INTERNAL_MAGIC_STRING_TYPEDARRAY_PROTOTYPE_VALUES,\n                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE)\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-template.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#ifndef TYPEDARRAY_BYTES_PER_ELEMENT\n# error \"Please define TYPEDARRAY_BYTES_PER_ELEMENT\"\n#endif /* !TYPEDARRAY_BYTES_PER_ELEMENT */\n\n#ifndef TYPEDARRAY_MAGIC_STRING_ID\n# error \"Please define TYPEDARRAY_MAGIC_STRING_ID\"\n#endif /* !TYPEDARRAY_MAGIC_STRING_ID */\n\n#ifndef TYPEDARRAY_BUILTIN_ID\n# error \"Please define TYPEDARRAY_BUILTIN_ID\"\n#endif /* !TYPEDARRAY_BUILTIN_ID */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n/* ES2015 22.2.5 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              3,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ES2015 22.2.5.1 */\nNUMBER_VALUE (LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U,\n              TYPEDARRAY_BYTES_PER_ELEMENT,\n              ECMA_PROPERTY_FIXED)\n\n/* ES2015 22.2.5 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              TYPEDARRAY_MAGIC_STRING_ID,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ES2015 22.2.5.2 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              TYPEDARRAY_BUILTIN_ID,\n              ECMA_PROPERTY_FIXED)\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n\n#undef TYPEDARRAY_BUILTIN_ID\n#undef TYPEDARRAY_MAGIC_STRING_ID\n#undef TYPEDARRAY_BYTES_PER_ELEMENT\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-typedarray-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"ecma-function-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-typedarray.inc.h\"\n#define BUILTIN_UNDERSCORED_ID typedarray\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup typedarray ECMA %TypedArray% object built-in\n * @{\n */\n\n/**\n * The %TypedArray%.from routine\n *\n * See also:\n *         ES2015 22.2.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_from (ecma_value_t this_arg, /**< 'this' argument */\n                              const ecma_value_t *arguments_list_p, /**< arguments list */\n                              uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  if (!ecma_is_constructor (this_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a constructor.\"));\n  }\n\n  ecma_value_t source;\n  ecma_value_t map_fn = ECMA_VALUE_UNDEFINED;\n  ecma_value_t this_in_fn = ECMA_VALUE_UNDEFINED;\n\n  if (arguments_list_len == 0)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"no source argument\"));\n  }\n\n  source = arguments_list_p[0];\n\n  if (arguments_list_len > 1)\n  {\n    map_fn = arguments_list_p[1];\n\n    if (!ecma_op_is_callable (map_fn))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"mapfn argument is not callable\"));\n    }\n\n    if (arguments_list_len > 2)\n    {\n      this_in_fn = arguments_list_p[2];\n    }\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);\n\n  const uint8_t builtin_id = ecma_get_object_builtin_id (obj_p);\n  if (!ecma_typedarray_helper_is_typedarray (builtin_id))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a typedarray constructor\"));\n  }\n\n  ecma_typedarray_type_t typedarray_id = ecma_typedarray_helper_builtin_to_typedarray_id (builtin_id);\n\n  ecma_object_t *proto_p = ecma_builtin_get (ecma_typedarray_helper_get_prototype_id (typedarray_id));\n  const uint8_t element_size_shift = ecma_typedarray_helper_get_shift_size (typedarray_id);\n\n  return ecma_op_typedarray_from (source,\n                                  map_fn,\n                                  this_in_fn,\n                                  proto_p,\n                                  element_size_shift,\n                                  typedarray_id);\n\n} /* ecma_builtin_typedarray_from */\n\n/**\n * The %TypedArray%.of routine\n *\n * See also:\n *         ES2015 22.2.2.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_builtin_typedarray_of (ecma_value_t this_arg, /**< 'this' argument */\n                            const ecma_value_t *arguments_list_p, /**< arguments list */\n                            uint32_t arguments_list_len) /**< number of arguments */\n{\n  if (!ecma_is_constructor (this_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a constructor.\"));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);\n  const uint8_t builtin_id = ecma_get_object_builtin_id (obj_p);\n\n  if (!ecma_typedarray_helper_is_typedarray (builtin_id))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a typedarray constructor\"));\n  }\n\n  ecma_typedarray_type_t typedarray_id = ecma_typedarray_helper_builtin_to_typedarray_id (builtin_id);\n\n  ecma_object_t *proto_p = ecma_builtin_get (ecma_typedarray_helper_get_prototype_id (typedarray_id));\n  const uint8_t element_size_shift = ecma_typedarray_helper_get_shift_size (typedarray_id);\n\n  ecma_value_t ret_val = ecma_typedarray_create_object_with_length (arguments_list_len,\n                                                                    NULL,\n                                                                    proto_p,\n                                                                    element_size_shift,\n                                                                    typedarray_id);\n\n  if (ECMA_IS_VALUE_ERROR (ret_val))\n  {\n    return ret_val;\n  }\n\n  uint32_t k = 0;\n  ecma_object_t *ret_obj_p = ecma_get_object_from_value (ret_val);\n  ecma_typedarray_info_t info = ecma_typedarray_get_info (ret_obj_p);\n  ecma_typedarray_setter_fn_t setter_cb = ecma_get_typedarray_setter_fn (info.id);\n\n  while (k < arguments_list_len)\n  {\n    ecma_value_t set_element = setter_cb (info.buffer_p, arguments_list_p[k]);\n\n    if (ECMA_IS_VALUE_ERROR (set_element))\n    {\n      ecma_deref_object (ret_obj_p);\n      return set_element;\n    }\n\n    k++;\n    info.buffer_p += info.element_size;\n  }\n\n  return ret_val;\n} /* ecma_builtin_typedarray_of */\n\n/**\n * Handle calling [[Call]] of built-in %TypedArray% object\n *\n * ES2015 22.2.1 If %TypedArray% is directly called or\n * called as part of a new expression an exception is thrown\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_typedarray_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                       uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"TypedArray intrinstic cannot be directly called\"));\n} /* ecma_builtin_typedarray_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of built-in %TypedArray% object\n *\n * ES2015 22.2.1 If %TypedArray% is directly called or\n * called as part of a new expression an exception is thrown\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_typedarray_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                            uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"TypedArray intrinstic cannot be called by a 'new' expression\"));\n} /* ecma_builtin_typedarray_dispatch_construct */\n\n/**\n * 22.2.2.4 get %TypedArray% [ @@species ] accessor\n *\n * @return ecma_value\n *         returned value must be freed with ecma_free_value\n */\necma_value_t\necma_builtin_typedarray_species_get (ecma_value_t this_value) /**< This Value */\n{\n  return ecma_copy_value (this_value);\n} /* ecma_builtin_typedarray_species_get */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * %TypedArray% description\n */\n\n#include \"ecma-builtin-helpers-macro-defines.inc.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/* ES2015 22.2.2 */\n/* ES11 22.2.1.1 - value of length changed to 0 */\nNUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,\n              0,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ES2015 22.2.2 */\nSTRING_VALUE (LIT_MAGIC_STRING_NAME,\n              LIT_MAGIC_STRING_TYPED_ARRAY_UL,\n              ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n/* ES2015 22.2.2.3 */\nOBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,\n              ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,\n              ECMA_PROPERTY_FIXED)\n\n/* Routine properties:\n *  (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */\n\n/* ES2015 22.2.2.1 */\nROUTINE (LIT_MAGIC_STRING_FROM, ecma_builtin_typedarray_from, NON_FIXED, 1)\n\n/* ES2015 22.2.2.2 */\nROUTINE (LIT_MAGIC_STRING_OF, ecma_builtin_typedarray_of, NON_FIXED, 0)\n\n/* ES2015 22.2.2.4 */\nACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,\n                    ecma_builtin_typedarray_species_get,\n                    ECMA_PROPERTY_FLAG_CONFIGURABLE)\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n#include \"ecma-builtin-helpers-macro-undefs.inc.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-uint16array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uint16array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup uint16arrayprototype ECMA Uint16Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Uint16Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 2\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT16ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-uint16array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uint16array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup uint16array ECMA Uint16Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of Uint16Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uint16array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Uint16Array cannot be directly called\"));\n} /* ecma_builtin_uint16array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of Uint16Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uint16array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                             uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_UINT16_ARRAY);\n} /* ecma_builtin_uint16array_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Uint16Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 2\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_UINT16_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-uint32array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uint32array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup uint32arrayprototype ECMA Uint32Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Uint32Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 4\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT32ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-uint32array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uint32array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup uint32array ECMA Uint32Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of Uint32Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uint32array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                        uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Uint32Array cannot be directly called\"));\n} /* ecma_builtin_uint32array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of Uint32Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uint32array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                             uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_UINT32_ARRAY);\n} /* ecma_builtin_uint32array_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Uint32Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 4\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_UINT32_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-uint8array-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uint8array_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup uint8arrayprototype ECMA Uint8Array.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Uint8Array prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 1\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT8ARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-uint8array.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uint8array\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup uint8array ECMA Uint8Array object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of Uint8Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uint8array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                       uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Uint8Array cannot be directly called\"));\n} /* ecma_builtin_uint8array_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of Uint8Array\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uint8array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                            uint32_t arguments_list_len) /**< number of arguments */\n{\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_UINT8_ARRAY);\n} /* ecma_builtin_uint8array_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Uint8Array description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 1\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_UINT8_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray-prototype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-uint8clampedarray-prototype.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uint8clampedarray_prototype\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup uint8clampedarrayprototype ECMA Uint8ClampedArray.prototype object built-in\n * @{\n */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray-prototype.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Uint8ClampedArray prototype description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 1\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY\n#include \"ecma-builtin-typedarray-prototype-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n#define BUILTIN_INC_HEADER_NAME \"ecma-builtin-uint8clampedarray.inc.h\"\n#define BUILTIN_UNDERSCORED_ID uint8clampedarray\n#include \"ecma-builtin-internal-routines-template.inc.h\"\n\n#include \"ecma-builtin-typedarray-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabuiltins\n * @{\n *\n * \\addtogroup uint8clampedarray ECMA Uint8ClampedArray object built-in\n * @{\n */\n\n/**\n * Handle calling [[Call]] of Uint8ClampedArray\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uint8clampedarray_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                              uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Uint8ClampedArray cannot be directly called\"));\n} /* ecma_builtin_uint8clampedarray_dispatch_call */\n\n/**\n * Handle calling [[Construct]] of Uint8ClampedArray\n *\n * @return ecma value\n */\necma_value_t\necma_builtin_uint8clampedarray_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                   uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,\n                                                    ECMA_UINT8_CLAMPED_ARRAY);\n} /* ecma_builtin_uint8clampedarray_dispatch_construct */\n\n/**\n  * @}\n  * @}\n  * @}\n  */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Uint8ClampedArray description\n */\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n#define TYPEDARRAY_BYTES_PER_ELEMENT 1\n#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL\n#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE\n#include \"ecma-builtin-typedarray-template.inc.h\"\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-arguments-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-arguments-object.h\"\n#include \"ecma-objects-general.h\"\n#include \"jrt.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaargumentsobject ECMA arguments object related routines\n * @{\n */\n\n/**\n * Arguments object creation operation.\n *\n * See also: ECMA-262 v5, 10.6\n *\n * @return ecma value of arguments object\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_arguments_object (vm_frame_ctx_shared_args_t *shared_p, /**< shared context data */\n                                 ecma_object_t *lex_env_p) /**< lexical environment the Arguments\n                                                            *   object is created for */\n{\n  ecma_object_t *func_obj_p = shared_p->function_object_p;\n  const ecma_compiled_code_t *bytecode_data_p = shared_p->header.bytecode_header_p;\n  uint16_t formal_params_number;\n\n  if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    formal_params_number = ((cbc_uint16_arguments_t *) bytecode_data_p)->argument_end;\n  }\n  else\n  {\n    formal_params_number = ((cbc_uint8_arguments_t *) bytecode_data_p)->argument_end;\n  }\n\n  uint32_t object_size = sizeof (ecma_unmapped_arguments_t);\n  uint32_t saved_arg_count = JERRY_MAX (shared_p->arg_list_len, formal_params_number);\n\n  if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)\n  {\n    object_size = sizeof (ecma_mapped_arguments_t);\n  }\n\n  ecma_object_t *obj_p = ecma_create_object (ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE),\n                                             object_size + (saved_arg_count * sizeof (ecma_value_t)),\n                                             ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n\n  ecma_unmapped_arguments_t *arguments_p = (ecma_unmapped_arguments_t *) obj_p;\n\n  arguments_p->header.u.pseudo_array.type = ECMA_PSEUDO_ARRAY_ARGUMENTS;\n  arguments_p->header.u.pseudo_array.extra_info = ECMA_ARGUMENTS_OBJECT_NO_FLAGS;\n  arguments_p->header.u.pseudo_array.u1.formal_params_number = formal_params_number;\n  arguments_p->header.u.pseudo_array.u2.arguments_number = 0;\n  arguments_p->callee = ecma_make_object_value (func_obj_p);\n\n  ecma_value_t *argv_p = (ecma_value_t *) (((uint8_t *) obj_p) + object_size);\n\n  for (uint32_t i = 0; i < shared_p->arg_list_len; i++)\n  {\n    argv_p[i] = ecma_copy_value_if_not_object (shared_p->arg_list_p[i]);\n  }\n\n  for (uint32_t i = shared_p->arg_list_len; i < saved_arg_count; i++)\n  {\n    argv_p[i] = ECMA_VALUE_INITIALIZED;\n  }\n\n  arguments_p->header.u.pseudo_array.u2.arguments_number = shared_p->arg_list_len;\n\n  if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)\n  {\n    ecma_mapped_arguments_t *mapped_arguments_p = (ecma_mapped_arguments_t *) obj_p;\n\n    ECMA_SET_INTERNAL_VALUE_POINTER (mapped_arguments_p->lex_env, lex_env_p);\n    arguments_p->header.u.pseudo_array.extra_info |= ECMA_ARGUMENTS_OBJECT_MAPPED;\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n    if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION)\n    {\n      arguments_p->header.u.pseudo_array.extra_info |= ECMA_ARGUMENTS_OBJECT_STATIC_BYTECODE;\n      mapped_arguments_p->u.byte_code_p = (ecma_compiled_code_t *) bytecode_data_p;\n    }\n    else\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n    {\n      ECMA_SET_INTERNAL_VALUE_POINTER (mapped_arguments_p->u.byte_code, bytecode_data_p);\n    }\n\n    /* Static snapshots are not ref counted. */\n    if ((bytecode_data_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION) == 0)\n    {\n      ecma_bytecode_ref ((ecma_compiled_code_t *) bytecode_data_p);\n    }\n\n    ecma_value_t *formal_parameter_start_p;\n    formal_parameter_start_p = ecma_compiled_code_resolve_arguments_start ((ecma_compiled_code_t *) bytecode_data_p);\n\n    for (uint32_t i = 0; i < formal_params_number; i++)\n    {\n      /* For legacy (non-strict) argument definition the trailing duplicated arguments cannot be lazy instantiated\n         E.g: function f (a,a,a,a) {} */\n      if (JERRY_UNLIKELY (ecma_is_value_empty (formal_parameter_start_p[i])))\n      {\n        ecma_property_value_t *prop_value_p;\n        ecma_string_t *prop_name_p = ecma_new_ecma_string_from_uint32 (i);\n\n        prop_value_p = ecma_create_named_data_property (obj_p,\n                                                        prop_name_p,\n                                                        ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                        NULL);\n\n        ecma_deref_ecma_string (prop_name_p);\n\n        prop_value_p->value = argv_p[i] == ECMA_VALUE_INITIALIZED ? ECMA_VALUE_UNDEFINED : argv_p[i];\n        argv_p[i] = ECMA_VALUE_EMPTY;\n      }\n    }\n  }\n\n  return ecma_make_object_value (obj_p);\n} /* ecma_op_create_arguments_object */\n\n/**\n * [[DefineOwnProperty]] ecma Arguments object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *          ECMA-262 v5, 10.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_arguments_object_define_own_property (ecma_object_t *object_p, /**< the object */\n                                              ecma_string_t *property_name_p, /**< property name */\n                                              const ecma_property_descriptor_t *property_desc_p) /**< property\n                                                                                                  *   descriptor */\n{\n  /* 3. */\n  ecma_value_t ret_value = ecma_op_general_object_define_own_property (object_p,\n                                                                       property_name_p,\n                                                                       property_desc_p);\n\n  if (ECMA_IS_VALUE_ERROR (ret_value)\n      || !(((ecma_extended_object_t *) object_p)->u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED))\n  {\n    return ret_value;\n  }\n\n  ecma_mapped_arguments_t *mapped_arguments_p = (ecma_mapped_arguments_t *) object_p;\n  uint32_t index = ecma_string_get_array_index (property_name_p);\n\n  if (index >= mapped_arguments_p->unmapped.header.u.pseudo_array.u1.formal_params_number)\n  {\n    return ret_value;\n  }\n\n  ecma_value_t *argv_p = (ecma_value_t *) (mapped_arguments_p + 1);\n\n  if (!ecma_is_value_empty (argv_p[index]))\n  {\n    if (property_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))\n    {\n      ecma_free_value_if_not_object (argv_p[index]);\n      argv_p[index] = ECMA_VALUE_EMPTY;\n    }\n    else\n    {\n      if (property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n      {\n        ecma_string_t *name_p = ecma_op_arguments_object_get_formal_parameter (mapped_arguments_p, index);\n        ecma_object_t *lex_env_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, mapped_arguments_p->lex_env);\n\n        ecma_value_t completion = ecma_op_set_mutable_binding (lex_env_p,\n                                                               name_p,\n                                                               property_desc_p->value,\n                                                               true);\n\n        JERRY_ASSERT (ecma_is_value_empty (completion));\n      }\n\n      if ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)\n          && !(property_desc_p->flags & ECMA_PROP_IS_WRITABLE))\n      {\n        ecma_free_value_if_not_object (argv_p[index]);\n        argv_p[index] = ECMA_VALUE_EMPTY;\n      }\n    }\n  }\n\n  return ret_value;\n} /* ecma_op_arguments_object_define_own_property */\n\n/**\n * [[Delete]] ecma Arguments object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *          ECMA-262 v5, 10.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_arguments_object_delete (ecma_object_t *object_p, /**< the object */\n                                 ecma_string_t *property_name_p, /**< property name */\n                                 bool is_throw) /**< flag that controls failure handling */\n{\n  /* 3. */\n  ecma_value_t ret_value = ecma_op_general_object_delete (object_p, property_name_p, is_throw);\n\n  if (!ecma_is_value_true (ret_value)\n      || !(((ecma_extended_object_t *) object_p)->u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED))\n  {\n    return ret_value;\n  }\n\n  ecma_mapped_arguments_t *mapped_arguments_p = (ecma_mapped_arguments_t *) object_p;\n  ecma_value_t *argv_p = (ecma_value_t *) (mapped_arguments_p + 1);\n  uint32_t index = ecma_string_get_array_index (property_name_p);\n\n  if (index < mapped_arguments_p->unmapped.header.u.pseudo_array.u1.formal_params_number)\n  {\n    ecma_free_value_if_not_object (argv_p[index]);\n    argv_p[index] = ECMA_VALUE_EMPTY;\n  }\n\n  return ret_value;\n} /* ecma_op_arguments_object_delete */\n\n/**\n * Try to lazy instantiate the given property of a mapped/unmapped arguments object\n *\n * @return pointer property, if one was instantiated,\n *         NULL - otherwise.\n */\necma_property_t *\necma_op_arguments_object_try_to_lazy_instantiate_property (ecma_object_t *object_p, /**< object */\n                                                           ecma_string_t *property_name_p) /**< property's name */\n{\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n  JERRY_ASSERT (((ecma_extended_object_t *) object_p)->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);\n\n  ecma_unmapped_arguments_t *arguments_p = (ecma_unmapped_arguments_t *) object_p;\n  ecma_value_t *argv_p = (ecma_value_t *) (arguments_p + 1);\n  ecma_property_value_t *prop_value_p;\n  ecma_property_t *prop_p = NULL;\n  uint32_t arguments_number = arguments_p->header.u.pseudo_array.u2.arguments_number;\n  uint8_t flags = arguments_p->header.u.pseudo_array.extra_info;\n\n  if (flags & ECMA_ARGUMENTS_OBJECT_MAPPED)\n  {\n    argv_p = (ecma_value_t *) (((ecma_mapped_arguments_t *) object_p) + 1);\n  }\n\n  uint32_t index = ecma_string_get_array_index (property_name_p);\n\n  if (index != ECMA_STRING_NOT_ARRAY_INDEX)\n  {\n    if (index >= arguments_number\n        || ecma_is_value_empty (argv_p[index])\n        || argv_p[index] == ECMA_VALUE_INITIALIZED)\n    {\n      return NULL;\n    }\n\n    prop_value_p = ecma_create_named_data_property (object_p,\n                                                    property_name_p,\n                                                    ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                    &prop_p);\n\n    /* Passing the reference */\n    prop_value_p->value = argv_p[index];\n\n    /* Pevent reinitialization */\n    if ((flags & ECMA_ARGUMENTS_OBJECT_MAPPED)\n         && index < arguments_p->header.u.pseudo_array.u1.formal_params_number)\n    {\n      argv_p[index] = ECMA_VALUE_INITIALIZED;\n    }\n    else\n    {\n      argv_p[index] = ECMA_VALUE_EMPTY;\n    }\n\n    return prop_p;\n  }\n\n  if (property_name_p == ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH)\n      && !(flags & ECMA_ARGUMENTS_OBJECT_LENGTH_INITIALIZED))\n  {\n    arguments_p->header.u.pseudo_array.extra_info |= ECMA_ARGUMENTS_OBJECT_LENGTH_INITIALIZED;\n\n    prop_value_p = ecma_create_named_data_property (object_p,\n                                                    ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),\n                                                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE,\n                                                    &prop_p);\n\n    prop_value_p->value = ecma_make_uint32_value (arguments_number);\n  }\n\n  if (property_name_p == ecma_get_magic_string (LIT_MAGIC_STRING_CALLEE)\n      && !(flags & ECMA_ARGUMENTS_OBJECT_CALLEE_INITIALIZED))\n  {\n    arguments_p->header.u.pseudo_array.extra_info |= ECMA_ARGUMENTS_OBJECT_CALLEE_INITIALIZED;\n\n    if (flags & ECMA_ARGUMENTS_OBJECT_MAPPED)\n    {\n      prop_value_p = ecma_create_named_data_property (object_p,\n                                                      property_name_p,\n                                                      ECMA_PROPERTY_CONFIGURABLE_WRITABLE,\n                                                      &prop_p);\n\n      prop_value_p->value = arguments_p->callee;\n    }\n    else\n    {\n      ecma_object_t *thrower_p = ecma_builtin_get (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER);\n\n      prop_value_p = ecma_create_named_accessor_property (object_p,\n                                                          ecma_get_magic_string (LIT_MAGIC_STRING_CALLEE),\n                                                          thrower_p,\n                                                          thrower_p,\n                                                          ECMA_PROPERTY_FIXED,\n                                                          &prop_p);\n    }\n    return prop_p;\n  }\n\n#if !ENABLED (JERRY_ESNEXT)\n  if (property_name_p == ecma_get_magic_string (LIT_MAGIC_STRING_CALLER)\n      && !(arguments_p->header.u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_CALLER_INITIALIZED))\n  {\n    if (arguments_p->header.u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED)\n    {\n      return NULL;\n    }\n\n    arguments_p->header.u.pseudo_array.extra_info |= ECMA_ARGUMENTS_OBJECT_CALLER_INITIALIZED;\n\n    ecma_object_t *thrower_p = ecma_builtin_get (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER);\n\n    prop_value_p = ecma_create_named_accessor_property (object_p,\n                                                        ecma_get_magic_string (LIT_MAGIC_STRING_CALLER),\n                                                        thrower_p,\n                                                        thrower_p,\n                                                        ECMA_PROPERTY_FIXED,\n                                                        &prop_p);\n    return prop_p;\n  }\n#else /* ENABLED (JERRY_ESNEXT) */\n  ecma_string_t *symbol_p = ecma_op_get_global_symbol (LIT_GLOBAL_SYMBOL_ITERATOR);\n\n  if (property_name_p == symbol_p\n      && !(flags & ECMA_ARGUMENTS_OBJECT_ITERATOR_INITIALIZED))\n  {\n    arguments_p->header.u.pseudo_array.extra_info |= ECMA_ARGUMENTS_OBJECT_ITERATOR_INITIALIZED;\n\n    prop_value_p = ecma_create_named_data_property (object_p,\n                                                    symbol_p,\n                                                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE,\n                                                    &prop_p);\n\n    prop_value_p->value = ecma_op_object_get_by_magic_id (ecma_builtin_get (ECMA_BUILTIN_ID_INTRINSIC_OBJECT),\n                                                          LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES);\n\n    JERRY_ASSERT (ecma_is_value_object (prop_value_p->value));\n    ecma_deref_object (ecma_get_object_from_value (prop_value_p->value));\n  }\n\n  ecma_deref_ecma_string (symbol_p);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  return prop_p;\n} /* ecma_op_arguments_object_try_to_lazy_instantiate_property */\n\n/**\n * List names of an arguments object's lazy instantiated properties\n */\nvoid\necma_op_arguments_object_list_lazy_property_names (ecma_object_t *obj_p, /**< arguments object */\n                                                   ecma_collection_t *prop_names_p, /**< prop name collection */\n                                                   ecma_property_counter_t *prop_counter_p) /**< prop counter */\n{\n  JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n  JERRY_ASSERT (((ecma_extended_object_t *) obj_p)->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);\n\n  ecma_unmapped_arguments_t *arguments_p = (ecma_unmapped_arguments_t *) obj_p;\n\n  ecma_value_t *argv_p = (ecma_value_t *) (arguments_p + 1);\n  uint32_t arguments_number = arguments_p->header.u.pseudo_array.u2.arguments_number;\n  uint8_t flags = arguments_p->header.u.pseudo_array.extra_info;\n\n  if (flags & ECMA_ARGUMENTS_OBJECT_MAPPED)\n  {\n    argv_p = (ecma_value_t *) (((ecma_mapped_arguments_t *) obj_p) + 1);\n  }\n\n  for (uint32_t index = 0; index < arguments_number; index++)\n  {\n    if (!ecma_is_value_empty (argv_p[index]))\n    {\n      ecma_string_t *index_string_p = ecma_new_ecma_string_from_uint32 (index);\n      ecma_collection_push_back (prop_names_p, ecma_make_string_value (index_string_p));\n      prop_counter_p->array_index_named_props++;\n    }\n  }\n\n  if (!(flags & ECMA_ARGUMENTS_OBJECT_LENGTH_INITIALIZED))\n  {\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n    prop_counter_p->string_named_props++;\n  }\n\n  if (!(flags & ECMA_ARGUMENTS_OBJECT_CALLEE_INITIALIZED))\n  {\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_CALLEE));\n    prop_counter_p->string_named_props++;\n  }\n\n#if !ENABLED (JERRY_ESNEXT)\n  if (!(flags & (ECMA_ARGUMENTS_OBJECT_CALLER_INITIALIZED | ECMA_ARGUMENTS_OBJECT_MAPPED)))\n  {\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_CALLER));\n    prop_counter_p->string_named_props++;\n  }\n#else /* ENABLED (JERRY_ESNEXT) */\n  if (!(flags & ECMA_ARGUMENTS_OBJECT_ITERATOR_INITIALIZED))\n  {\n    ecma_string_t *symbol_p = ecma_op_get_global_symbol (LIT_GLOBAL_SYMBOL_ITERATOR);\n    ecma_collection_push_back (prop_names_p, ecma_make_symbol_value (symbol_p));\n    prop_counter_p->symbol_named_props++;\n  }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n} /* ecma_op_arguments_object_list_lazy_property_names */\n\n/**\n * Get the formal parameter name corresponding to the given property index\n *\n * @return pointer to the formal parameter name\n */\necma_string_t *\necma_op_arguments_object_get_formal_parameter (ecma_mapped_arguments_t *mapped_arguments_p, /**< mapped arguments\n                                                                                             *   object */\n                                               uint32_t index) /**< formal parameter index */\n{\n  JERRY_ASSERT (mapped_arguments_p->unmapped.header.u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED);\n  JERRY_ASSERT (index < mapped_arguments_p->unmapped.header.u.pseudo_array.u1.formal_params_number);\n\n  ecma_compiled_code_t *byte_code_p;\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  if (mapped_arguments_p->unmapped.header.u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_STATIC_BYTECODE)\n  {\n    byte_code_p = mapped_arguments_p->u.byte_code_p;\n  }\n  else\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n  {\n    byte_code_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t, mapped_arguments_p->u.byte_code);\n  }\n\n  ecma_value_t *formal_param_names_p = ecma_compiled_code_resolve_arguments_start (byte_code_p);\n\n  return ecma_get_string_from_value (formal_param_names_p[index]);\n} /* ecma_op_arguments_object_get_formal_parameter */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-arguments-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_ARGUMENTS_OBJECT_H\n#define ECMA_ARGUMENTS_OBJECT_H\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"vm-defines.h\"\n\necma_value_t\necma_op_create_arguments_object (vm_frame_ctx_shared_args_t *shared_p, ecma_object_t *lex_env_p);\n\necma_value_t\necma_op_arguments_object_delete (ecma_object_t *object_p, ecma_string_t *property_name_p, bool is_throw);\necma_value_t\necma_op_arguments_object_define_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p,\n                                              const ecma_property_descriptor_t *property_desc_p);\n\necma_property_t *\necma_op_arguments_object_try_to_lazy_instantiate_property (ecma_object_t *object_p,\n                                                           ecma_string_t *property_name_p);\n\nvoid\necma_op_arguments_object_list_lazy_property_names (ecma_object_t *obj_p,\n                                                   ecma_collection_t *prop_names_p,\n                                                   ecma_property_counter_t *prop_counter_p);\n\necma_string_t *\necma_op_arguments_object_get_formal_parameter (ecma_mapped_arguments_t *mapped_arguments_p,\n                                               uint32_t index);\n#endif /* !ECMA_ARGUMENTS_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-array-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-property-hashmap.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-number-arithmetic.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-function-object.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaarrayobject ECMA Array object related routines\n * @{\n */\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n/**\n * Maximum length of the array length to allocate fast mode access for it\n * e.g. new Array(5000) is constructed as fast mode access array,\n * but new Array(50000000) is consturcted as normal property list based array\n */\n#define ECMA_FAST_ARRAY_MAX_INITIAL_LENGTH (1 << 17)\n#else /* ENABLED (JERRY_CPOINTER_32_BIT) */\n/**\n * Maximum length of the array length to allocate fast mode access for it\n * e.g. new Array(5000) is constructed as fast mode access array,\n * but new Array(50000000) is consturcted as normal property list based array\n */\n#define ECMA_FAST_ARRAY_MAX_INITIAL_LENGTH (1 << 13)\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n/**\n * Property name type flag for array indices.\n */\n#define ECMA_FAST_ARRAY_UINT_DIRECT_STRING_PROP_TYPE \\\n  (ECMA_DIRECT_STRING_UINT << ECMA_PROPERTY_NAME_TYPE_SHIFT)\n\n/**\n * Allocate a new array object with the given length\n *\n * @return pointer to the constructed array object\n */\nstatic ecma_object_t *\necma_op_alloc_array_object (uint32_t length) /**< length of the new array */\n{\n#if ENABLED (JERRY_BUILTIN_ARRAY)\n  ecma_object_t *array_prototype_object_p = ecma_builtin_get (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE);\n#else /* !ENABLED (JERRY_BUILTIN_ARRAY) */\n  ecma_object_t *array_prototype_object_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */\n\n  ecma_object_t *object_p = ecma_create_object (array_prototype_object_p,\n                                                sizeof (ecma_extended_object_t),\n                                                ECMA_OBJECT_TYPE_ARRAY);\n\n  /*\n   * [[Class]] property is not stored explicitly for objects of ECMA_OBJECT_TYPE_ARRAY type.\n   *\n   * See also: ecma_object_get_class_name\n   */\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n  ext_obj_p->u.array.length = length;\n  ext_obj_p->u.array.length_prop_and_hole_count = ECMA_PROPERTY_FLAG_WRITABLE | ECMA_PROPERTY_VIRTUAL;\n\n  return object_p;\n} /* ecma_op_alloc_array_object */\n\n/**\n * Check whether the given object is fast-access mode array\n *\n * @return true - if the object is fast-access mode array\n *         false, otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_op_object_is_fast_array (ecma_object_t *object_p) /**< ecma-object */\n{\n  return (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_ARRAY &&\n          ecma_op_array_is_fast_array ((ecma_extended_object_t *) object_p));\n} /* ecma_op_object_is_fast_array */\n\n/**\n * Check whether the given array object is fast-access mode array\n *\n * @return true - if the array object is fast-access mode array\n *         false, otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_op_array_is_fast_array (ecma_extended_object_t *array_p) /**< ecma-array-object */\n{\n  JERRY_ASSERT (ecma_get_object_type ((ecma_object_t *) array_p) == ECMA_OBJECT_TYPE_ARRAY);\n\n  return array_p->u.array.length_prop_and_hole_count & ECMA_FAST_ARRAY_FLAG;\n} /* ecma_op_array_is_fast_array */\n\n/**\n * Allocate a new array object with the given length\n *\n * Note: The returned array can be normal of fast access mode\n *\n * @return pointer to the constructed array object\n */\necma_object_t *\necma_op_new_array_object (uint32_t length) /**< length of the new array */\n{\n  ecma_object_t *object_p = ecma_op_alloc_array_object (length);\n\n  const uint32_t aligned_length = ECMA_FAST_ARRAY_ALIGN_LENGTH (length);\n  ecma_value_t *values_p = NULL;\n\n  if (length > 0)\n  {\n    if (length >= ECMA_FAST_ARRAY_MAX_INITIAL_LENGTH)\n    {\n      return object_p;\n    }\n\n    values_p = (ecma_value_t *) jmem_heap_alloc_block_null_on_error (aligned_length * sizeof (ecma_value_t));\n\n    if (JERRY_UNLIKELY (values_p == NULL))\n    {\n      return object_p;\n    }\n  }\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n  ext_obj_p->u.array.length_prop_and_hole_count |= ECMA_FAST_ARRAY_FLAG;\n  ext_obj_p->u.array.length_prop_and_hole_count += length * ECMA_FAST_ARRAY_HOLE_ONE;\n\n  for (uint32_t i = 0; i < aligned_length; i++)\n  {\n    values_p[i] = ECMA_VALUE_ARRAY_HOLE;\n  }\n\n  JERRY_ASSERT (object_p->u1.property_list_cp == JMEM_CP_NULL);\n  ECMA_SET_POINTER (object_p->u1.property_list_cp, values_p);\n  return object_p;\n} /* ecma_op_new_array_object */\n\n/**\n * Allocate a new array object from the given length\n *\n * Note: The returned array can be normal of fast access mode\n *\n * @return NULL - if the given length is invalid\n *         pointer to the constructed array object - otherwise\n */\necma_object_t *\necma_op_new_array_object_from_length (ecma_length_t length) /**< length of the new array */\n{\n#if ENABLED (JERRY_ESNEXT)\n  if (length > UINT32_MAX)\n  {\n    ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid array length\"));\n    return NULL;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ecma_op_new_array_object ((uint32_t) length);\n} /* ecma_op_new_array_object_from_length */\n\n/**\n * Allocate a new array object from the given buffer\n *\n * Note: The returned array can be normal of fast access mode\n *\n * @return ecma_value - constructed array object\n */\necma_value_t\necma_op_new_array_object_from_buffer (const ecma_value_t *args_p, /**< array element list */\n                                      uint32_t length) /**< number of array elements */\n{\n  if (length == 0)\n  {\n    return ecma_make_object_value (ecma_op_new_array_object (0));\n  }\n\n  ecma_object_t *object_p = ecma_op_alloc_array_object (length);\n  const uint32_t aligned_length = ECMA_FAST_ARRAY_ALIGN_LENGTH (length);\n  ecma_value_t *values_p;\n  values_p = (ecma_value_t *) jmem_heap_alloc_block_null_on_error (aligned_length * sizeof (ecma_value_t));\n\n  if (values_p != NULL)\n  {\n    ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n    ext_obj_p->u.array.length_prop_and_hole_count |= ECMA_FAST_ARRAY_FLAG;\n    JERRY_ASSERT (object_p->u1.property_list_cp == JMEM_CP_NULL);\n\n    for (uint32_t i = 0; i < length; i++)\n    {\n      JERRY_ASSERT (!ecma_is_value_array_hole (args_p[i]));\n      values_p[i] = ecma_copy_value_if_not_object (args_p[i]);\n    }\n\n    for (uint32_t i = length; i < aligned_length; i++)\n    {\n      values_p[i] = ECMA_VALUE_ARRAY_HOLE;\n    }\n\n    ECMA_SET_POINTER (object_p->u1.property_list_cp, values_p);\n  }\n  else\n  {\n    for (uint32_t i = 0; i < length; i++)\n    {\n      JERRY_ASSERT (!ecma_is_value_array_hole (args_p[i]));\n\n      ecma_string_t *prop_name_p = ecma_new_ecma_string_from_uint32 (i);\n      ecma_property_value_t *prop_value_p;\n      prop_value_p = ecma_create_named_data_property (object_p,\n                                                      prop_name_p,\n                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                      NULL);\n      ecma_deref_ecma_string (prop_name_p);\n      prop_value_p->value = ecma_copy_value_if_not_object (args_p[i]);\n    }\n  }\n\n  return ecma_make_object_value (object_p);\n} /* ecma_op_new_array_object_from_buffer */\n\n/**\n * Allocate a new fast acces mode array object from the given collection\n *\n * Note: The given collection will be unavailable after and it's underlying buffer is reused\n *\n * @return ecma_value - constructed fast access mode array object\n */\necma_value_t\necma_op_new_array_object_from_collection (ecma_collection_t *collection_p, /**< collection to create array from */\n                                          bool unref_objects) /**< true - if the collection potentially\n                                                                          containts objects\n                                                                   false - otherwise */\n{\n  const uint32_t item_count = collection_p->item_count;\n\n  if (item_count == 0)\n  {\n    ecma_collection_destroy (collection_p);\n    return ecma_make_object_value (ecma_op_new_array_object (0));\n  }\n\n  ecma_object_t *object_p;\n  ecma_value_t *buffer_p = collection_p->buffer_p;\n  const uint32_t old_size = ECMA_COLLECTION_ALLOCATED_SIZE (collection_p->capacity);\n  const uint32_t aligned_length = ECMA_FAST_ARRAY_ALIGN_LENGTH (collection_p->item_count);\n\n  jmem_heap_free_block (collection_p, sizeof (ecma_collection_t));\n  buffer_p = jmem_heap_realloc_block (buffer_p, old_size, aligned_length * sizeof (ecma_value_t));\n  object_p = ecma_op_alloc_array_object (item_count);\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n  ext_obj_p->u.array.length_prop_and_hole_count |= ECMA_FAST_ARRAY_FLAG;\n  JERRY_ASSERT (object_p->u1.property_list_cp == JMEM_CP_NULL);\n  JERRY_ASSERT (ext_obj_p->u.array.length_prop_and_hole_count < ECMA_FAST_ARRAY_HOLE_ONE);\n  ECMA_SET_POINTER (object_p->u1.property_list_cp, buffer_p);\n\n  if (JERRY_UNLIKELY (unref_objects))\n  {\n    for (uint32_t i = 0; i < item_count; i++)\n    {\n      /* Strong references from the collection are no longer needed\n         since GC will mark these object as a fast access mode array properties */\n      ecma_deref_if_object (buffer_p[i]);\n    }\n  }\n\n  for (uint32_t i = item_count; i < aligned_length; i++)\n  {\n    buffer_p[i] = ECMA_VALUE_ARRAY_HOLE;\n  }\n\n  return ecma_make_object_value (object_p);\n} /* ecma_op_new_array_object_from_collection */\n\n/**\n * Converts a fast access mode array back to a normal property list based array\n */\nvoid\necma_fast_array_convert_to_normal (ecma_object_t *object_p) /**< fast access mode array object */\n{\n  JERRY_ASSERT (ecma_op_object_is_fast_array (object_p));\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n\n  if (object_p->u1.property_list_cp == JMEM_CP_NULL)\n  {\n    ext_obj_p->u.array.length_prop_and_hole_count &= (uint32_t) ~ECMA_FAST_ARRAY_FLAG;\n    return;\n  }\n\n  uint32_t length = ext_obj_p->u.array.length;\n  const uint32_t aligned_length = ECMA_FAST_ARRAY_ALIGN_LENGTH (length);\n  ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n  ecma_ref_object (object_p);\n\n  ecma_property_pair_t *property_pair_p = NULL;\n  jmem_cpointer_t next_property_pair_cp = JMEM_CP_NULL;\n\n  uint32_t prop_index = 1;\n  int32_t index = (int32_t) (length - 1);\n\n  while (index >= 0)\n  {\n    if (ecma_is_value_array_hole (values_p[index]))\n    {\n      index--;\n      continue;\n    }\n\n    if (prop_index == 1)\n    {\n      property_pair_p = ecma_alloc_property_pair ();\n      property_pair_p->header.next_property_cp = next_property_pair_cp;\n      property_pair_p->names_cp[0] = LIT_INTERNAL_MAGIC_STRING_DELETED;\n      property_pair_p->header.types[0] = ECMA_PROPERTY_TYPE_DELETED;\n      ECMA_SET_NON_NULL_POINTER (next_property_pair_cp, property_pair_p);\n    }\n\n    JERRY_ASSERT (index <= ECMA_DIRECT_STRING_MAX_IMM);\n\n    property_pair_p->names_cp[prop_index] = (jmem_cpointer_t) index;\n    property_pair_p->header.types[prop_index] = (ecma_property_t) (ECMA_PROPERTY_FLAG_DATA\n                                                                   | ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE\n                                                                   | ECMA_FAST_ARRAY_UINT_DIRECT_STRING_PROP_TYPE);\n\n    property_pair_p->values[prop_index].value = values_p[index];\n\n    index--;\n    prop_index = !prop_index;\n  }\n\n  ext_obj_p->u.array.length_prop_and_hole_count &= (uint32_t) ~ECMA_FAST_ARRAY_FLAG;\n  jmem_heap_free_block (values_p, aligned_length * sizeof (ecma_value_t));\n  ECMA_SET_POINTER (object_p->u1.property_list_cp, property_pair_p);\n\n  ecma_deref_object (object_p);\n} /* ecma_fast_array_convert_to_normal */\n\n/**\n * [[Put]] operation for a fast access mode array\n *\n * @return false - If the property name is not array index, or the requested index to be set\n *                 would result too much array hole in the underlying buffer. The these cases\n *                 the array is converted back to normal property list based array.\n *         true - If the indexed property can be set with/without resizing the underlying buffer.\n */\nbool\necma_fast_array_set_property (ecma_object_t *object_p, /**< fast access mode array object */\n                              uint32_t index, /**< property name index */\n                              ecma_value_t value) /**< value to be set */\n{\n  JERRY_ASSERT (ecma_op_object_is_fast_array (object_p));\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n  uint32_t old_length = ext_obj_p->u.array.length;\n\n  ecma_value_t *values_p;\n\n  if (JERRY_LIKELY (index < old_length))\n  {\n    JERRY_ASSERT (object_p->u1.property_list_cp != JMEM_CP_NULL);\n\n    values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n    if (ecma_is_value_array_hole (values_p[index]))\n    {\n      ext_obj_p->u.array.length_prop_and_hole_count -= ECMA_FAST_ARRAY_HOLE_ONE;\n    }\n    else\n    {\n      ecma_free_value_if_not_object (values_p[index]);\n    }\n\n    values_p[index] = ecma_copy_value_if_not_object (value);\n\n    return true;\n  }\n\n  uint32_t old_holes = ext_obj_p->u.array.length_prop_and_hole_count;\n  uint32_t new_holes = index - old_length;\n\n  if (JERRY_UNLIKELY (new_holes > ECMA_FAST_ARRAY_MAX_NEW_HOLES_COUNT\n                      || ((old_holes >> ECMA_FAST_ARRAY_HOLE_SHIFT) + new_holes) > ECMA_FAST_ARRAY_MAX_HOLE_COUNT))\n  {\n    ecma_fast_array_convert_to_normal (object_p);\n\n    return false;\n  }\n\n  uint32_t new_length = index + 1;\n\n  JERRY_ASSERT (new_length < UINT32_MAX);\n\n  const uint32_t aligned_length = ECMA_FAST_ARRAY_ALIGN_LENGTH (old_length);\n\n  if (JERRY_LIKELY (index < aligned_length))\n  {\n    JERRY_ASSERT (object_p->u1.property_list_cp != JMEM_CP_NULL);\n\n    values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n    /* This area is filled with ECMA_VALUE_ARRAY_HOLE, but not counted in u.array.length_prop_and_hole_count */\n    JERRY_ASSERT (ecma_is_value_array_hole (values_p[index]));\n    ext_obj_p->u.array.length_prop_and_hole_count += new_holes * ECMA_FAST_ARRAY_HOLE_ONE;\n    ext_obj_p->u.array.length = new_length;\n  }\n  else\n  {\n    values_p = ecma_fast_array_extend (object_p, new_length);\n    ext_obj_p->u.array.length_prop_and_hole_count -= ECMA_FAST_ARRAY_HOLE_ONE;\n  }\n\n  values_p[index] = ecma_copy_value_if_not_object (value);\n\n  return true;\n} /* ecma_fast_array_set_property */\n\n/**\n * Get the number of array holes in a fast access array object\n *\n * @return number of array holes in a fast access array object\n */\nextern inline uint32_t JERRY_ATTR_ALWAYS_INLINE\necma_fast_array_get_hole_count (ecma_object_t *obj_p) /**< fast access mode array object */\n{\n  JERRY_ASSERT (ecma_op_object_is_fast_array (obj_p));\n\n  return ((ecma_extended_object_t *) obj_p)->u.array.length_prop_and_hole_count >> ECMA_FAST_ARRAY_HOLE_SHIFT;\n} /* ecma_fast_array_get_hole_count */\n\n/**\n * Extend the underlying buffer of a fast mode access array for the given new length\n *\n * @return pointer to the extended underlying buffer\n */\necma_value_t *\necma_fast_array_extend (ecma_object_t *object_p, /**< fast access mode array object */\n                        uint32_t new_length) /**< new length of the fast access mode array */\n{\n  JERRY_ASSERT (ecma_op_object_is_fast_array (object_p));\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n  uint32_t old_length = ext_obj_p->u.array.length;\n\n  JERRY_ASSERT (old_length < new_length);\n\n  ecma_ref_object (object_p);\n\n  ecma_value_t *new_values_p;\n  const uint32_t old_length_aligned = ECMA_FAST_ARRAY_ALIGN_LENGTH (old_length);\n  const uint32_t new_length_aligned = ECMA_FAST_ARRAY_ALIGN_LENGTH (new_length);\n\n  if (object_p->u1.property_list_cp == JMEM_CP_NULL)\n  {\n    new_values_p = jmem_heap_alloc_block (new_length_aligned * sizeof (ecma_value_t));\n  }\n  else\n  {\n    ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n    new_values_p = (ecma_value_t *) jmem_heap_realloc_block (values_p,\n                                                             old_length_aligned * sizeof (ecma_value_t),\n                                                             new_length_aligned * sizeof (ecma_value_t));\n  }\n\n  for (uint32_t i = old_length; i < new_length_aligned; i++)\n  {\n    new_values_p[i] = ECMA_VALUE_ARRAY_HOLE;\n  }\n\n  ext_obj_p->u.array.length_prop_and_hole_count += (new_length - old_length) * ECMA_FAST_ARRAY_HOLE_ONE;\n  ext_obj_p->u.array.length = new_length;\n\n  ECMA_SET_NON_NULL_POINTER (object_p->u1.property_list_cp, new_values_p);\n\n  ecma_deref_object (object_p);\n  return new_values_p;\n} /* ecma_fast_array_extend */\n\n/**\n * Delete the array object's property referenced by its value pointer.\n *\n * Note: specified property must be owned by specified object.\n */\nvoid\necma_array_object_delete_property (ecma_object_t *object_p, /**< object */\n                                   ecma_string_t *property_name_p, /**< property name */\n                                   ecma_property_value_t *prop_value_p) /**< property value reference */\n{\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_ARRAY);\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n\n  if (!ecma_op_object_is_fast_array (object_p))\n  {\n    ecma_delete_property (object_p, prop_value_p);\n    return;\n  }\n\n  JERRY_ASSERT (object_p->u1.property_list_cp != JMEM_CP_NULL);\n\n  uint32_t index = ecma_string_get_array_index (property_name_p);\n\n  JERRY_ASSERT (index != ECMA_STRING_NOT_ARRAY_INDEX);\n  JERRY_ASSERT (index < ext_obj_p->u.array.length);\n\n  ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n  if (ecma_is_value_array_hole (values_p[index]))\n  {\n    return;\n  }\n\n  ecma_free_value_if_not_object (values_p[index]);\n\n  values_p[index] = ECMA_VALUE_ARRAY_HOLE;\n  ext_obj_p->u.array.length_prop_and_hole_count += ECMA_FAST_ARRAY_HOLE_ONE;\n} /* ecma_array_object_delete_property */\n\n/**\n * Low level delete of fast access mode array items\n *\n * @return the updated value of new_length\n */\nuint32_t\necma_delete_fast_array_properties (ecma_object_t *object_p, /**< fast access mode array */\n                                   uint32_t new_length) /**< new length of the fast access mode array */\n{\n  JERRY_ASSERT (ecma_op_object_is_fast_array (object_p));\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n\n  ecma_ref_object (object_p);\n  ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n  uint32_t old_length = ext_obj_p->u.array.length;\n  const uint32_t old_aligned_length = ECMA_FAST_ARRAY_ALIGN_LENGTH (old_length);\n  JERRY_ASSERT (new_length < old_length);\n\n  for (uint32_t i = new_length; i < old_length; i++)\n  {\n    if (ecma_is_value_array_hole (values_p[i]))\n    {\n      ext_obj_p->u.array.length_prop_and_hole_count -= ECMA_FAST_ARRAY_HOLE_ONE;\n    }\n    else\n    {\n      ecma_free_value_if_not_object (values_p[i]);\n    }\n  }\n\n  jmem_cpointer_t new_property_list_cp;\n\n  if (new_length == 0)\n  {\n    jmem_heap_free_block (values_p, old_aligned_length * sizeof (ecma_value_t));\n    new_property_list_cp = JMEM_CP_NULL;\n  }\n  else\n  {\n    const uint32_t new_aligned_length = ECMA_FAST_ARRAY_ALIGN_LENGTH (new_length);\n\n    ecma_value_t *new_values_p;\n    new_values_p = (ecma_value_t *) jmem_heap_realloc_block (values_p,\n                                                             old_aligned_length * sizeof (ecma_value_t),\n                                                             new_aligned_length * sizeof (ecma_value_t));\n\n    for (uint32_t i = new_length; i < new_aligned_length; i++)\n    {\n      new_values_p[i] = ECMA_VALUE_ARRAY_HOLE;\n    }\n\n    ECMA_SET_NON_NULL_POINTER (new_property_list_cp, new_values_p);\n  }\n\n  ext_obj_p->u.array.length = new_length;\n  object_p->u1.property_list_cp = new_property_list_cp;\n\n  ecma_deref_object (object_p);\n\n  return new_length;\n} /* ecma_delete_fast_array_properties */\n\n/**\n * Update the length of a fast access mode array to a new length\n *\n * Note: if the new length would result too much array hole in the underlying arraybuffer\n *       the array is converted back to normal property list based array\n */\nstatic void\necma_fast_array_set_length (ecma_object_t *object_p, /**< fast access mode array object */\n                            uint32_t new_length) /**< new length of the fast access mode array object*/\n{\n  JERRY_ASSERT (ecma_op_object_is_fast_array (object_p));\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n  uint32_t old_length = ext_obj_p->u.array.length;\n\n  JERRY_ASSERT (new_length >= old_length);\n\n  if (new_length == old_length)\n  {\n    return;\n  }\n\n  uint32_t old_holes = ext_obj_p->u.array.length_prop_and_hole_count;\n  uint32_t new_holes = new_length - old_length;\n\n  if (JERRY_UNLIKELY (new_holes > ECMA_FAST_ARRAY_MAX_NEW_HOLES_COUNT\n                      || ((old_holes >> ECMA_FAST_ARRAY_HOLE_SHIFT) + new_holes) > ECMA_FAST_ARRAY_MAX_HOLE_COUNT))\n  {\n    ecma_fast_array_convert_to_normal (object_p);\n  }\n  else\n  {\n    ecma_fast_array_extend (object_p, new_length);\n  }\n\n  return;\n} /* ecma_fast_array_set_length */\n\n/**\n * Get collection of property names of a fast access mode array object\n *\n * Note: Since the fast array object only contains indexed, enumerable, writable, configurable properties\n *       we can return a collection of non-array hole array indices\n *\n * @return collection of strings - property names\n */\necma_collection_t *\necma_fast_array_object_own_property_keys (ecma_object_t *object_p) /**< fast access mode array object */\n{\n  JERRY_ASSERT (ecma_op_object_is_fast_array (object_p));\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n  ecma_collection_t *ret_p = ecma_new_collection ();\n  uint32_t length = ext_obj_p->u.array.length;\n\n  if (length != 0)\n  {\n    ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n    for (uint32_t i = 0; i < length; i++)\n    {\n      if (ecma_is_value_array_hole (values_p[i]))\n      {\n        continue;\n      }\n\n      ecma_string_t *index_str_p = ecma_new_ecma_string_from_uint32 (i);\n\n      ecma_collection_push_back (ret_p, ecma_make_string_value (index_str_p));\n    }\n  }\n\n  ecma_collection_push_back (ret_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n\n  return ret_p;\n} /* ecma_fast_array_object_own_property_keys */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Array object creation with custom prototype.\n *\n * See also: ECMA-262 v6, 9.4.2.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_object_t *\necma_op_array_species_create (ecma_object_t *original_array_p, /**< The object from whom the new array object\n                                                                *   is being created */\n                              ecma_length_t length) /**< length of the array */\n{\n  ecma_value_t constructor = ECMA_VALUE_UNDEFINED;\n  ecma_value_t original_array = ecma_make_object_value (original_array_p);\n\n  ecma_value_t is_array = ecma_is_value_array (original_array);\n\n  if (ECMA_IS_VALUE_ERROR (is_array))\n  {\n    return NULL;\n  }\n\n  if (ecma_is_value_true (is_array))\n  {\n    constructor = ecma_op_object_get_by_magic_id (original_array_p, LIT_MAGIC_STRING_CONSTRUCTOR);\n    if (ECMA_IS_VALUE_ERROR (constructor))\n    {\n      return NULL;\n    }\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    if (ecma_is_constructor (constructor))\n    {\n      ecma_object_t *constructor_p = ecma_get_object_from_value (constructor);\n      ecma_global_object_t *global_object_p = ecma_op_function_get_function_realm (constructor_p);\n\n      if ((ecma_object_t *) global_object_p != ecma_builtin_get_global ()\n          && constructor_p == ecma_builtin_get_from_realm (global_object_p, ECMA_BUILTIN_ID_ARRAY))\n      {\n        ecma_deref_object (constructor_p);\n        constructor = ECMA_VALUE_UNDEFINED;\n      }\n    }\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n    if (ecma_is_value_object (constructor))\n    {\n      ecma_object_t *ctor_object_p = ecma_get_object_from_value (constructor);\n      constructor = ecma_op_object_get_by_symbol_id (ctor_object_p, LIT_GLOBAL_SYMBOL_SPECIES);\n      ecma_deref_object (ctor_object_p);\n\n      if (ECMA_IS_VALUE_ERROR (constructor))\n      {\n        return NULL;\n      }\n\n      if (ecma_is_value_null (constructor))\n      {\n        constructor = ECMA_VALUE_UNDEFINED;\n      }\n    }\n  }\n\n  if (ecma_is_value_undefined (constructor))\n  {\n    return ecma_op_new_array_object_from_length (length);\n  }\n\n  if (!ecma_is_constructor (constructor))\n  {\n    ecma_free_value (constructor);\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid species constructor\"));\n    return NULL;\n  }\n\n  ecma_value_t len_val = ecma_make_length_value (length);\n  ecma_object_t *ctor_object_p = ecma_get_object_from_value (constructor);\n  ecma_value_t ret_val = ecma_op_function_construct (ctor_object_p,\n                                                     ctor_object_p,\n                                                     &len_val,\n                                                     1);\n\n  ecma_deref_object (ctor_object_p);\n  ecma_free_value (len_val);\n\n  if (ECMA_IS_VALUE_ERROR (ret_val))\n  {\n    return NULL;\n  }\n\n  return ecma_get_object_from_value (ret_val);\n} /* ecma_op_array_species_create */\n\n/**\n * CreateArrayIterator Abstract Operation\n *\n * See also:\n *          ECMA-262 v6, 22.1.5.1\n *\n * Referenced by:\n *          ECMA-262 v6, 22.1.3.4\n *          ECMA-262 v6, 22.1.3.13\n *          ECMA-262 v6, 22.1.3.29\n *          ECMA-262 v6, 22.1.3.30\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return array iterator object\n */\necma_value_t\necma_op_create_array_iterator (ecma_object_t *obj_p, /**< array object */\n                               ecma_iterator_kind_t kind) /**< array iterator kind */\n{\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE);\n\n  return ecma_op_create_iterator_object (ecma_make_object_value (obj_p),\n                                         prototype_obj_p,\n                                         ECMA_PSEUDO_ARRAY_ITERATOR,\n                                         kind);\n} /* ecma_op_create_array_iterator */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Low level delete of array items from new_length to old_length\n *\n * Note: new_length must be less than old_length\n *\n * @return the updated value of new_length\n */\nstatic uint32_t\necma_delete_array_properties (ecma_object_t *object_p, /**< object */\n                              uint32_t new_length, /**< new length */\n                              uint32_t old_length) /**< old length */\n{\n  JERRY_ASSERT (new_length < old_length);\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_ARRAY);\n\n  if (ecma_op_object_is_fast_array (object_p))\n  {\n    return ecma_delete_fast_array_properties (object_p, new_length);\n  }\n\n  /* First the minimum value of new_length is updated. */\n  jmem_cpointer_t current_prop_cp = object_p->u1.property_list_cp;\n\n  if (current_prop_cp == JMEM_CP_NULL)\n  {\n    return new_length;\n  }\n\n  ecma_property_header_t *current_prop_p;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  current_prop_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, current_prop_cp);\n\n  if (current_prop_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n  {\n    current_prop_cp = current_prop_p->next_property_cp;\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  while (current_prop_cp != JMEM_CP_NULL)\n  {\n    current_prop_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, current_prop_cp);\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (current_prop_p));\n\n    ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) current_prop_p;\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      if (current_prop_p->types[i] != ECMA_PROPERTY_TYPE_DELETED\n          && !ecma_is_property_configurable (current_prop_p->types[i]))\n      {\n        uint32_t index = ecma_string_get_property_index (current_prop_p->types[i],\n                                                         prop_pair_p->names_cp[i]);\n\n        if (index < old_length && index >= new_length)\n        {\n          JERRY_ASSERT (index != ECMA_STRING_NOT_ARRAY_INDEX);\n\n          new_length = index + 1;\n\n          if (new_length == old_length)\n          {\n            /* Early return. */\n            return new_length;\n          }\n        }\n      }\n    }\n\n    current_prop_cp = current_prop_p->next_property_cp;\n  }\n\n  /* Second all properties between new_length and old_length are deleted. */\n  current_prop_cp = object_p->u1.property_list_cp;\n  ecma_property_header_t *prev_prop_p = NULL;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  JERRY_ASSERT (current_prop_cp != JMEM_CP_NULL);\n\n  ecma_property_hashmap_delete_status hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP;\n  current_prop_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, current_prop_cp);\n\n  if (current_prop_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n  {\n    prev_prop_p = current_prop_p;\n    current_prop_cp = current_prop_p->next_property_cp;\n    hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP;\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  while (current_prop_cp != JMEM_CP_NULL)\n  {\n    current_prop_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, current_prop_cp);\n\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (current_prop_p));\n    ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) current_prop_p;\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      if (current_prop_p->types[i] != ECMA_PROPERTY_TYPE_DELETED\n          && ecma_is_property_configurable (current_prop_p->types[i]))\n      {\n        uint32_t index = ecma_string_get_property_index (current_prop_p->types[i],\n                                                         prop_pair_p->names_cp[i]);\n\n        if (index < old_length && index >= new_length)\n        {\n          JERRY_ASSERT (index != ECMA_STRING_NOT_ARRAY_INDEX);\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n          if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP)\n          {\n            hashmap_status = ecma_property_hashmap_delete (object_p,\n                                                           prop_pair_p->names_cp[i],\n                                                           current_prop_p->types + i);\n          }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n          ecma_free_property (object_p, prop_pair_p->names_cp[i], current_prop_p->types + i);\n          current_prop_p->types[i] = ECMA_PROPERTY_TYPE_DELETED;\n          prop_pair_p->names_cp[i] = LIT_INTERNAL_MAGIC_STRING_DELETED;\n        }\n      }\n    }\n\n    if (current_prop_p->types[0] == ECMA_PROPERTY_TYPE_DELETED\n        && current_prop_p->types[1] == ECMA_PROPERTY_TYPE_DELETED)\n    {\n      if (prev_prop_p == NULL)\n      {\n        object_p->u1.property_list_cp = current_prop_p->next_property_cp;\n      }\n      else\n      {\n        prev_prop_p->next_property_cp = current_prop_p->next_property_cp;\n      }\n\n      jmem_cpointer_t next_prop_cp = current_prop_p->next_property_cp;\n      ecma_dealloc_property_pair ((ecma_property_pair_t *) current_prop_p);\n      current_prop_cp = next_prop_cp;\n    }\n    else\n    {\n      prev_prop_p = current_prop_p;\n      current_prop_cp = current_prop_p->next_property_cp;\n    }\n  }\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP)\n  {\n    ecma_property_hashmap_free (object_p);\n    ecma_property_hashmap_create (object_p);\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  return new_length;\n} /* ecma_delete_array_properties */\n\n/**\n * Update the length of an array to a new length\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_array_object_set_length (ecma_object_t *object_p, /**< the array object */\n                                 ecma_value_t new_value, /**< new length value */\n                                 uint32_t flags) /**< configuration options */\n{\n  bool is_throw = (flags & ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_IS_THROW);\n  ecma_number_t new_len_num;\n  ecma_value_t completion = ecma_op_to_number (new_value, &new_len_num);\n\n  if (ECMA_IS_VALUE_ERROR (completion))\n  {\n    return completion;\n  }\n\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (completion));\n\n  if (ecma_is_value_object (new_value))\n  {\n    ecma_value_t compared_num_val = ecma_op_to_number (new_value, &new_len_num);\n\n    if (ECMA_IS_VALUE_ERROR (compared_num_val))\n    {\n      return compared_num_val;\n    }\n  }\n\n  uint32_t new_len_uint32 = ecma_number_to_uint32 (new_len_num);\n\n  if (((ecma_number_t) new_len_uint32) != new_len_num)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid array length.\"));\n  }\n\n  if (flags & ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_REJECT)\n  {\n    return ecma_reject (is_throw);\n  }\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n  uint32_t old_len_uint32 = ext_object_p->u.array.length;\n\n  if (new_len_num == old_len_uint32)\n  {\n    /* Only the writable flag must be updated. */\n    if (flags & ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE_DEFINED)\n    {\n      if (!(flags & ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE))\n      {\n        ext_object_p->u.array.length_prop_and_hole_count &= (uint32_t) ~ECMA_PROPERTY_FLAG_WRITABLE;\n      }\n      else if (!ecma_is_property_writable ((ecma_property_t) ext_object_p->u.array.length_prop_and_hole_count))\n      {\n        return ecma_reject (is_throw);\n      }\n    }\n    return ECMA_VALUE_TRUE;\n  }\n  else if (!ecma_is_property_writable ((ecma_property_t) ext_object_p->u.array.length_prop_and_hole_count))\n  {\n    return ecma_reject (is_throw);\n  }\n\n  uint32_t current_len_uint32 = new_len_uint32;\n\n  if (new_len_uint32 < old_len_uint32)\n  {\n    current_len_uint32 = ecma_delete_array_properties (object_p, new_len_uint32, old_len_uint32);\n  }\n  else if (ecma_op_object_is_fast_array (object_p))\n  {\n    ecma_fast_array_set_length (object_p, new_len_uint32);\n  }\n\n  ext_object_p->u.array.length = current_len_uint32;\n\n  if ((flags & ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE_DEFINED)\n      && !(flags & ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE))\n  {\n    ext_object_p->u.array.length_prop_and_hole_count &= (uint32_t) ~ECMA_PROPERTY_FLAG_WRITABLE;\n  }\n\n  if (current_len_uint32 == new_len_uint32)\n  {\n    return ECMA_VALUE_TRUE;\n  }\n  return ecma_reject (is_throw);\n} /* ecma_op_array_object_set_length */\n\n/**\n * Property descriptor bitset for fast array data properties.\n * If the property desciptor fields contains all the flags below\n * attempt to stay fast access array during [[DefineOwnProperty]] operation.\n */\n#define ECMA_FAST_ARRAY_DATA_PROP_FLAGS (ECMA_PROP_IS_VALUE_DEFINED \\\n                                         | ECMA_PROP_IS_ENUMERABLE_DEFINED \\\n                                         | ECMA_PROP_IS_ENUMERABLE \\\n                                         | ECMA_PROP_IS_CONFIGURABLE_DEFINED \\\n                                         | ECMA_PROP_IS_CONFIGURABLE \\\n                                         | ECMA_PROP_IS_WRITABLE_DEFINED \\\n                                         | ECMA_PROP_IS_WRITABLE)\n\n/**\n * [[DefineOwnProperty]] ecma array object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *          ECMA-262 v5, 15.4.5.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_array_object_define_own_property (ecma_object_t *object_p, /**< the array object */\n                                          ecma_string_t *property_name_p, /**< property name */\n                                          const ecma_property_descriptor_t *property_desc_p) /**< property descriptor */\n{\n  if (ecma_string_is_length (property_name_p))\n  {\n    JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE_DEFINED)\n                  || !(property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE));\n    JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)\n                  || !(property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE));\n    JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)\n                  || !(property_desc_p->flags & ECMA_PROP_IS_WRITABLE));\n\n    uint32_t flags = 0;\n\n    if (property_desc_p->flags & ECMA_PROP_IS_THROW)\n    {\n      flags |= ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_IS_THROW;\n    }\n\n    /* Only the writable and data properties can be modified. */\n    if (property_desc_p->flags & (ECMA_PROP_IS_CONFIGURABLE\n                                  | ECMA_PROP_IS_ENUMERABLE\n                                  | ECMA_PROP_IS_GET_DEFINED\n                                  | ECMA_PROP_IS_SET_DEFINED))\n    {\n      flags |= ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_REJECT;\n    }\n\n    if (property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)\n    {\n      flags |= ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE_DEFINED;\n    }\n\n    if (property_desc_p->flags & ECMA_PROP_IS_WRITABLE)\n    {\n      flags |= ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE;\n    }\n\n    if (property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n    {\n      return ecma_op_array_object_set_length (object_p, property_desc_p->value, flags);\n    }\n\n    ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n    ecma_value_t length_value = ecma_make_uint32_value (ext_object_p->u.array.length);\n\n    ecma_value_t result = ecma_op_array_object_set_length (object_p, length_value, flags);\n\n    ecma_fast_free_value (length_value);\n    return result;\n  }\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n  if (ecma_op_object_is_fast_array (object_p))\n  {\n    if ((property_desc_p->flags & ECMA_FAST_ARRAY_DATA_PROP_FLAGS) == ECMA_FAST_ARRAY_DATA_PROP_FLAGS)\n    {\n      uint32_t index = ecma_string_get_array_index (property_name_p);\n\n      if (JERRY_UNLIKELY (index == ECMA_STRING_NOT_ARRAY_INDEX))\n      {\n        ecma_fast_array_convert_to_normal (object_p);\n      }\n      else if (ecma_fast_array_set_property (object_p, index, property_desc_p->value))\n      {\n        return ECMA_VALUE_TRUE;\n      }\n\n      JERRY_ASSERT (!ecma_op_array_is_fast_array (ext_object_p));\n    }\n    else\n    {\n      ecma_fast_array_convert_to_normal (object_p);\n    }\n  }\n\n  JERRY_ASSERT (!ecma_op_object_is_fast_array (object_p));\n  uint32_t index = ecma_string_get_array_index (property_name_p);\n\n  if (index == ECMA_STRING_NOT_ARRAY_INDEX)\n  {\n    return ecma_op_general_object_define_own_property (object_p, property_name_p, property_desc_p);\n  }\n\n  bool update_length = (index >= ext_object_p->u.array.length);\n\n  if (update_length\n      && !ecma_is_property_writable ((ecma_property_t) ext_object_p->u.array.length_prop_and_hole_count))\n  {\n    return ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n  }\n\n  ecma_property_descriptor_t prop_desc;\n\n  prop_desc = *property_desc_p;\n  prop_desc.flags &= (uint16_t) ~ECMA_PROP_IS_THROW;\n\n  ecma_value_t completition = ecma_op_general_object_define_own_property (object_p,\n                                                                          property_name_p,\n                                                                          &prop_desc);\n  JERRY_ASSERT (ecma_is_value_boolean (completition));\n\n  if (ecma_is_value_false (completition))\n  {\n    return ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n  }\n\n  if (update_length)\n  {\n    ext_object_p->u.array.length = index + 1;\n  }\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_op_array_object_define_own_property */\n\n/**\n * Get the length of the an array object\n *\n * @return the array length\n */\nextern inline uint32_t JERRY_ATTR_ALWAYS_INLINE\necma_array_get_length (ecma_object_t *array_p) /**< array object */\n{\n  JERRY_ASSERT (ecma_get_object_type (array_p) == ECMA_OBJECT_TYPE_ARRAY);\n\n  return ((ecma_extended_object_t *) array_p)->u.array.length;\n} /* ecma_array_get_length */\n\n/**\n * The Array.prototype and %TypedArray%.prototype objects' 'toString' routine.\n *\n * See also:\n *          ECMA-262 v5, 15.4.4.2\n *          ECMA-262 v6, 22.1.3.7\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_array_object_to_string (ecma_value_t this_arg) /**< this argument */\n{\n  JERRY_ASSERT (ecma_is_value_object (this_arg));\n\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);\n\n  /* 2. */\n  ecma_value_t join_value = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_JOIN);\n  if (ECMA_IS_VALUE_ERROR (join_value))\n  {\n    return join_value;\n  }\n\n  if (!ecma_op_is_callable (join_value))\n  {\n    /* 3. */\n    ret_value = ecma_builtin_helper_object_to_string (this_arg);\n  }\n  else\n  {\n    /* 4. */\n    ecma_object_t *join_func_obj_p = ecma_get_object_from_value (join_value);\n\n    ret_value = ecma_op_function_call (join_func_obj_p, this_arg, NULL, 0);\n  }\n\n  ecma_free_value (join_value);\n\n  return ret_value;\n} /* ecma_array_object_to_string */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-array-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_ARRAY_OBJECT_H\n#define ECMA_ARRAY_OBJECT_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaarrayobject ECMA Array object related routines\n * @{\n */\n\n/**\n * Maximum number of new array holes in a fast mode access array.\n * If the number of new holes exceeds this limit, the array is converted back\n * to normal property list based array.\n */\n#define ECMA_FAST_ARRAY_MAX_NEW_HOLES_COUNT 32\n\n/**\n * Bitshift index for fast array hole count representation\n */\n#define ECMA_FAST_ARRAY_HOLE_SHIFT 8\n\n/**\n * This number represents 1 array hole in underlying buffer of a fast acces mode array\n */\n#define ECMA_FAST_ARRAY_HOLE_ONE (1 << ECMA_FAST_ARRAY_HOLE_SHIFT)\n\n/**\n * Maximum number of array holes in a fast access mode array\n */\n#define ECMA_FAST_ARRAY_MAX_HOLE_COUNT (1 << 24)\n\n/**\n * Flags for ecma_op_array_object_set_length\n */\ntypedef enum\n{\n  ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_IS_THROW = 1u << 0, /**< is_throw flag is set */\n  ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_REJECT = 1u << 1, /**< reject later because the descriptor flags\n                                                       *   contains an unallowed combination */\n  ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE_DEFINED = 1u << 2, /**< writable flag defined\n                                                                 *   in the property descriptor */\n  ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE = 1u << 3, /**< writable flag enabled\n                                                         *   in the property descriptor */\n} ecma_array_object_set_length_flags_t;\n\necma_object_t *\necma_op_new_array_object (uint32_t length);\n\necma_object_t *\necma_op_new_array_object_from_length (ecma_length_t length);\n\necma_value_t\necma_op_new_array_object_from_buffer (const ecma_value_t *args_p, uint32_t length);\n\necma_value_t\necma_op_new_array_object_from_collection (ecma_collection_t *collection_p, bool unref_objects);\n\nbool\necma_op_object_is_fast_array (ecma_object_t *object_p);\n\nbool\necma_op_array_is_fast_array (ecma_extended_object_t *array_p);\n\nuint32_t\necma_fast_array_get_hole_count (ecma_object_t *obj_p);\n\necma_value_t *\necma_fast_array_extend (ecma_object_t *object_p, uint32_t new_lengt);\n\nbool\necma_fast_array_set_property (ecma_object_t *object_p, uint32_t index, ecma_value_t value);\n\nvoid\necma_array_object_delete_property (ecma_object_t *object_p, ecma_string_t *property_name_p,\n                                   ecma_property_value_t *prop_value_p);\n\nuint32_t\necma_delete_fast_array_properties (ecma_object_t *object_p, uint32_t new_length);\n\necma_collection_t *\necma_fast_array_object_own_property_keys (ecma_object_t *object_p);\n\nvoid\necma_fast_array_convert_to_normal (ecma_object_t *object_p);\n\n#if ENABLED (JERRY_ESNEXT)\necma_object_t *\necma_op_array_species_create (ecma_object_t *original_array_p,\n                              ecma_length_t length);\n\necma_value_t\necma_op_create_array_iterator (ecma_object_t *obj_p,\n                               ecma_iterator_kind_t kind);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\necma_value_t\necma_op_array_object_set_length (ecma_object_t *object_p, ecma_value_t new_value, uint32_t flags);\n\necma_value_t\necma_op_array_object_define_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p,\n                                          const ecma_property_descriptor_t *property_desc_p);\n\nuint32_t ecma_array_get_length (ecma_object_t *array_p);\n\necma_value_t\necma_array_object_to_string (ecma_value_t this_arg);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_ARRAY_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-arraybuffer-object.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"jmem.h\"\n#include \"jcontext.h\"\n#include \"ecma-function-object.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaarraybufferobject ECMA ArrayBuffer object related routines\n * @{\n */\n\n/**\n * Helper function: create arraybuffer object based on the array length\n *\n * The struct of arraybuffer object:\n *   ecma_object_t\n *   extend_part\n *   data buffer\n *\n * @return ecma_object_t *\n */\necma_object_t *\necma_arraybuffer_new_object (uint32_t length) /**< length of the arraybuffer */\n{\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE);\n  ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                sizeof (ecma_extended_object_t) + length,\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.class_prop.extra_info = ECMA_ARRAYBUFFER_INTERNAL_MEMORY;\n  ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_ARRAY_BUFFER_UL;\n  ext_object_p->u.class_prop.u.length = length;\n\n  lit_utf8_byte_t *buf = (lit_utf8_byte_t *) (ext_object_p + 1);\n  memset (buf, 0, length);\n\n  return object_p;\n} /* ecma_arraybuffer_new_object */\n\n/**\n * Helper function: create arraybuffer object with external buffer backing.\n *\n * The struct of external arraybuffer object:\n *   ecma_object_t\n *   extend_part\n *   arraybuffer external info part\n *\n * @return ecma_object_t *, pointer to the created ArrayBuffer object\n */\necma_object_t *\necma_arraybuffer_new_object_external (uint32_t length, /**< length of the buffer_p to use */\n                                      void *buffer_p, /**< pointer for ArrayBuffer's buffer backing */\n                                      ecma_object_native_free_callback_t free_cb) /**< buffer free callback */\n{\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE);\n  ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                sizeof (ecma_arraybuffer_external_info),\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_arraybuffer_external_info *array_object_p = (ecma_arraybuffer_external_info *) object_p;\n  array_object_p->extended_object.u.class_prop.extra_info = ECMA_ARRAYBUFFER_EXTERNAL_MEMORY;\n  array_object_p->extended_object.u.class_prop.class_id = LIT_MAGIC_STRING_ARRAY_BUFFER_UL;\n  array_object_p->extended_object.u.class_prop.u.length = length;\n\n  array_object_p->buffer_p = buffer_p;\n  array_object_p->free_cb = free_cb;\n\n  return object_p;\n} /* ecma_arraybuffer_new_object_external */\n\n/**\n * ArrayBuffer object creation operation.\n *\n * See also: ES2015 24.1.1.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_arraybuffer_object (const ecma_value_t *arguments_list_p, /**< list of arguments that\n                                                                          *   are passed to String constructor */\n                                   uint32_t arguments_list_len) /**< length of the arguments' list */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  ecma_number_t length_num = 0;\n\n  if (arguments_list_len > 0)\n  {\n\n    if (ecma_is_value_number (arguments_list_p[0]))\n    {\n      length_num = ecma_get_number_from_value (arguments_list_p[0]);\n    }\n    else\n    {\n      ecma_value_t to_number_value = ecma_op_to_number (arguments_list_p[0], &length_num);\n\n      if (ECMA_IS_VALUE_ERROR (to_number_value))\n      {\n        return to_number_value;\n      }\n    }\n\n    if (ecma_number_is_nan (length_num))\n    {\n      length_num = 0;\n    }\n\n    const uint32_t maximum_size_in_byte = UINT32_MAX - sizeof (ecma_extended_object_t) - JMEM_ALIGNMENT + 1;\n\n    if (length_num <= -1.0 || length_num > (ecma_number_t) maximum_size_in_byte + 0.5)\n    {\n      return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid ArrayBuffer length.\"));\n    }\n  }\n\n  uint32_t length_uint32 = ecma_number_to_uint32 (length_num);\n\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE);\n\n  if (proto_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_object_t *array_buffer = ecma_arraybuffer_new_object (length_uint32);\n  ECMA_SET_NON_NULL_POINTER (array_buffer->u2.prototype_cp, proto_p);\n  ecma_deref_object (proto_p);\n\n  return ecma_make_object_value (array_buffer);\n} /* ecma_op_create_arraybuffer_object */\n\n/**\n * Helper function: check if the target is ArrayBuffer\n *\n *\n * See also: ES2015 24.1.1.4\n *\n * @return true - if value is an ArrayBuffer object\n *         false - otherwise\n */\nbool\necma_is_arraybuffer (ecma_value_t target) /**< the target value */\n{\n  return (ecma_is_value_object (target)\n          && ecma_object_class_is (ecma_get_object_from_value (target),\n                                   LIT_MAGIC_STRING_ARRAY_BUFFER_UL));\n} /* ecma_is_arraybuffer */\n\n/**\n * Helper function: return the length of the buffer inside the arraybuffer object\n *\n * @return uint32_t, the length of the arraybuffer\n */\nuint32_t JERRY_ATTR_PURE\necma_arraybuffer_get_length (ecma_object_t *object_p) /**< pointer to the ArrayBuffer object */\n{\n  JERRY_ASSERT (ecma_object_class_is (object_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL));\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  return ecma_arraybuffer_is_detached (object_p) ? 0 : ext_object_p->u.class_prop.u.length;\n} /* ecma_arraybuffer_get_length */\n\n/**\n * Helper function: return the pointer to the data buffer inside the arraybuffer object\n *\n * @return pointer to the data buffer\n */\nextern inline lit_utf8_byte_t * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_arraybuffer_get_buffer (ecma_object_t *object_p) /**< pointer to the ArrayBuffer object */\n{\n  JERRY_ASSERT (ecma_object_class_is (object_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL));\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n  if (ECMA_ARRAYBUFFER_HAS_EXTERNAL_MEMORY (ext_object_p))\n  {\n    ecma_arraybuffer_external_info *array_p = (ecma_arraybuffer_external_info *) ext_object_p;\n    JERRY_ASSERT (!ecma_arraybuffer_is_detached (object_p) || array_p->buffer_p == NULL);\n    return (lit_utf8_byte_t *) array_p->buffer_p;\n  }\n  else if (ext_object_p->u.class_prop.extra_info & ECMA_ARRAYBUFFER_DETACHED)\n  {\n    return NULL;\n  }\n\n  return (lit_utf8_byte_t *) (ext_object_p + 1);\n} /* ecma_arraybuffer_get_buffer */\n\n/**\n * Helper function: check if the target ArrayBuffer is detached\n *\n * @return true - if value is an detached ArrayBuffer object\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\necma_arraybuffer_is_detached (ecma_object_t *object_p) /**< pointer to the ArrayBuffer object */\n{\n  JERRY_ASSERT (ecma_object_class_is (object_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL));\n\n  return (((ecma_extended_object_t *) object_p)->u.class_prop.extra_info & ECMA_ARRAYBUFFER_DETACHED) != 0;\n} /* ecma_arraybuffer_is_detached */\n\n/**\n * ArrayBuffer object detaching operation\n *\n * See also: ES2015 24.1.1.3\n *\n * @return true - if detach op succeeded\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_arraybuffer_detach (ecma_object_t *object_p) /**< pointer to the ArrayBuffer object */\n{\n  JERRY_ASSERT (ecma_object_class_is (object_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL));\n\n  if (ecma_arraybuffer_is_detached (object_p))\n  {\n    return false;\n  }\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.class_prop.extra_info |= ECMA_ARRAYBUFFER_DETACHED;\n\n  if (ECMA_ARRAYBUFFER_HAS_EXTERNAL_MEMORY (ext_object_p))\n  {\n    ecma_arraybuffer_external_info *array_p = (ecma_arraybuffer_external_info *) ext_object_p;\n\n    if (array_p->free_cb != NULL)\n    {\n      array_p->free_cb (array_p->buffer_p);\n      array_p->free_cb = NULL;\n    }\n\n    ext_object_p->u.class_prop.u.length = 0;\n    array_p->buffer_p = NULL;\n  }\n\n  return true;\n} /* ecma_arraybuffer_detach */\n\n/**\n * @}\n * @}\n */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_ARRAYBUFFER_OBJECT_H\n#define ECMA_ARRAYBUFFER_OBJECT_H\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaarraybufferobject ECMA ArrayBuffer object related routines\n * @{\n */\n\necma_value_t\necma_op_create_arraybuffer_object (const ecma_value_t *, uint32_t);\n\n/**\n * Helper functions for arraybuffer.\n */\necma_object_t *\necma_arraybuffer_new_object (uint32_t lengh);\necma_object_t *\necma_arraybuffer_new_object_external (uint32_t length,\n                                      void *buffer_p,\n                                      ecma_object_native_free_callback_t free_cb);\nlit_utf8_byte_t * JERRY_ATTR_PURE\necma_arraybuffer_get_buffer (ecma_object_t *obj_p);\nuint32_t JERRY_ATTR_PURE\necma_arraybuffer_get_length (ecma_object_t *obj_p);\nbool JERRY_ATTR_PURE\necma_arraybuffer_is_detached (ecma_object_t *obj_p);\nbool\necma_arraybuffer_detach (ecma_object_t *obj_p);\nbool\necma_is_arraybuffer (ecma_value_t val);\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#endif /* !ECMA_ARRAYBUFFER_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-async-generator-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-async-generator-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-promise-object.h\"\n#include \"jcontext.h\"\n#include \"opcodes.h\"\n#include \"vm.h\"\n#include \"vm-stack.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaasyncgeneratorobject ECMA AsyncGenerator object related routines\n * @{\n */\n\n/**\n * Enqueue a task into the command queue of an async generator\n *\n * @return ecma Promise value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_async_generator_enqueue (vm_executable_object_t *async_generator_object_p, /**< async generator */\n                              ecma_async_generator_operation_type_t operation, /**< operation */\n                              ecma_value_t value) /**< value argument of operation */\n{\n  ecma_async_generator_task_t *task_p = jmem_heap_alloc_block (sizeof (ecma_async_generator_task_t));\n\n  ECMA_SET_INTERNAL_VALUE_ANY_POINTER (task_p->next, NULL);\n  task_p->operation_value = ecma_copy_value_if_not_object (value);\n  task_p->operation_type = (uint8_t) operation;\n\n  ecma_object_t *old_new_target_p = JERRY_CONTEXT (current_new_target_p);\n  JERRY_CONTEXT (current_new_target_p) = ecma_builtin_get (ECMA_BUILTIN_ID_PROMISE);\n  ecma_value_t result = ecma_op_create_promise_object (ECMA_VALUE_EMPTY, ECMA_PROMISE_EXECUTOR_EMPTY);\n  JERRY_CONTEXT (current_new_target_p) = old_new_target_p;\n  task_p->promise = result;\n\n  ecma_value_t head = async_generator_object_p->extended_object.u.class_prop.u.head;\n\n  if (ECMA_IS_INTERNAL_VALUE_NULL (head))\n  {\n    ECMA_SET_INTERNAL_VALUE_POINTER (async_generator_object_p->extended_object.u.class_prop.u.head, task_p);\n\n    if (async_generator_object_p->extended_object.u.class_prop.extra_info & ECMA_ASYNC_GENERATOR_CALLED)\n    {\n      ecma_value_t executable_object = ecma_make_object_value ((ecma_object_t *) async_generator_object_p);\n      ecma_enqueue_promise_async_generator_job (executable_object);\n      return result;\n    }\n\n    async_generator_object_p->extended_object.u.class_prop.extra_info |= ECMA_ASYNC_GENERATOR_CALLED;\n    ecma_async_generator_run (async_generator_object_p);\n    return result;\n  }\n\n  /* Append the new task at the end. */\n  ecma_async_generator_task_t *prev_task_p;\n  prev_task_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_async_generator_task_t, head);\n\n  while (!ECMA_IS_INTERNAL_VALUE_NULL (prev_task_p->next))\n  {\n    prev_task_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_async_generator_task_t, prev_task_p->next);\n  }\n\n  ECMA_SET_INTERNAL_VALUE_POINTER (prev_task_p->next, task_p);\n  return result;\n} /* ecma_async_generator_enqueue */\n\n/**\n * Call a function and await its return value\n *\n * @return ECMA_VALUE_UNDEFINED on success, error otherwise\n */\nstatic ecma_value_t\necma_async_yield_call (ecma_value_t function, /**< function (takes reference) */\n                       vm_executable_object_t *async_generator_object_p, /**< async generator */\n                       ecma_value_t argument, /**< argument passed to the function */\n                       const char *error_msg_p) /**< error message when the function is not callable */\n{\n  if (!ecma_is_value_object (function) || !ecma_op_is_callable (function))\n  {\n    ecma_free_value (function);\n    return ecma_raise_type_error (error_msg_p);\n  }\n\n  ecma_object_t *return_obj_p = ecma_get_object_from_value (function);\n  ecma_value_t iterator = async_generator_object_p->frame_ctx.block_result;\n  ecma_value_t result;\n\n  if (argument == ECMA_VALUE_EMPTY)\n  {\n    result = ecma_op_function_call (return_obj_p, iterator, NULL, 0);\n  }\n  else\n  {\n    result = ecma_op_function_call (return_obj_p, iterator, &argument, 1);\n  }\n\n  ecma_deref_object (return_obj_p);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  return ecma_promise_async_await ((ecma_extended_object_t *) async_generator_object_p, result);\n} /* ecma_async_yield_call */\n\n/**\n * Perform an exception throw and call the approprite handler\n */\nstatic ecma_value_t\necma_async_yield_throw (vm_executable_object_t *async_generator_object_p, /**< async generator */\n                        ecma_value_t value) /**< thrown value */\n{\n  ecma_object_t *obj_p = ecma_get_object_from_value (async_generator_object_p->frame_ctx.block_result);\n  ecma_value_t result = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_THROW);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  if (result == ECMA_VALUE_UNDEFINED)\n  {\n    result = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_RETURN);\n\n    if (result == ECMA_VALUE_UNDEFINED)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator throw() is not available.\"));\n    }\n\n    result = ecma_async_yield_call (result,\n                                    async_generator_object_p,\n                                    ECMA_VALUE_EMPTY,\n                                    ECMA_ERR_MSG (\"Iterator return() is not callable.\"));\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      return result;\n    }\n\n    ECMA_AWAIT_CHANGE_STATE (async_generator_object_p, YIELD_OPERATION, YIELD_CLOSE);\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  result = ecma_async_yield_call (result,\n                                  async_generator_object_p,\n                                  value,\n                                  ECMA_ERR_MSG (\"Iterator throw() is not callable.\"));\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  ECMA_AWAIT_CHANGE_STATE (async_generator_object_p, YIELD_OPERATION, YIELD_NEXT);\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_async_yield_throw */\n\n/**\n * Execute the next task in the command queue of the async generator\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_async_generator_run (vm_executable_object_t *async_generator_object_p) /**< async generator */\n{\n  JERRY_ASSERT (async_generator_object_p->extended_object.u.class_prop.class_id\n                == LIT_MAGIC_STRING_ASYNC_GENERATOR_UL);\n  JERRY_ASSERT (!ECMA_IS_INTERNAL_VALUE_NULL (async_generator_object_p->extended_object.u.class_prop.u.head));\n\n  ecma_value_t head = async_generator_object_p->extended_object.u.class_prop.u.head;\n  ecma_async_generator_task_t *task_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_async_generator_task_t, head);\n  ecma_value_t result;\n\n  if (async_generator_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD)\n  {\n    switch (task_p->operation_type)\n    {\n      case ECMA_ASYNC_GENERATOR_DO_NEXT:\n      {\n        result = ecma_op_iterator_next (async_generator_object_p->frame_ctx.block_result,\n                                        async_generator_object_p->frame_ctx.stack_top_p[-1],\n                                        task_p->operation_value);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          break;\n        }\n\n        result = ecma_promise_async_await ((ecma_extended_object_t *) async_generator_object_p, result);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          break;\n        }\n\n        ECMA_AWAIT_CHANGE_STATE (async_generator_object_p, YIELD_OPERATION, YIELD_NEXT);\n        break;\n      }\n      case ECMA_ASYNC_GENERATOR_DO_THROW:\n      {\n        result = ecma_async_yield_throw (async_generator_object_p, task_p->operation_value);\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (task_p->operation_type == ECMA_ASYNC_GENERATOR_DO_RETURN);\n\n        result = ecma_copy_value (task_p->operation_value);\n        result = ecma_promise_async_await ((ecma_extended_object_t *) async_generator_object_p, result);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          break;\n        }\n\n        ECMA_AWAIT_CHANGE_STATE (async_generator_object_p, YIELD_OPERATION, YIELD_RETURN);\n        break;\n      }\n    }\n\n    ecma_free_value_if_not_object (task_p->operation_value);\n    task_p->operation_value = ECMA_VALUE_UNDEFINED;\n\n    if (result == ECMA_VALUE_UNDEFINED)\n    {\n      return ECMA_VALUE_UNDEFINED;\n    }\n\n    JERRY_ASSERT (ECMA_IS_VALUE_ERROR (result));\n\n    async_generator_object_p->extended_object.u.class_prop.extra_info &= ECMA_AWAIT_CLEAR_MASK;\n    async_generator_object_p->frame_ctx.block_result = ECMA_VALUE_UNDEFINED;\n    async_generator_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_throw;\n\n    JERRY_ASSERT (async_generator_object_p->frame_ctx.stack_top_p[-1] == ECMA_VALUE_UNDEFINED\n                  || ecma_is_value_object (async_generator_object_p->frame_ctx.stack_top_p[-1]));\n    async_generator_object_p->frame_ctx.stack_top_p--;\n\n    result = jcontext_take_exception ();\n  }\n  else\n  {\n    if (task_p->operation_type == ECMA_ASYNC_GENERATOR_DO_RETURN)\n    {\n      async_generator_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_return;\n    }\n    else if (task_p->operation_type == ECMA_ASYNC_GENERATOR_DO_THROW)\n    {\n      async_generator_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_throw;\n    }\n\n    result = task_p->operation_value;\n    ecma_ref_if_object (result);\n    task_p->operation_value = ECMA_VALUE_UNDEFINED;\n  }\n\n  result = opfunc_resume_executable_object (async_generator_object_p, result);\n\n  if (async_generator_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_COMPLETED)\n  {\n    JERRY_ASSERT (head == async_generator_object_p->extended_object.u.class_prop.u.head);\n    ecma_async_generator_finalize (async_generator_object_p, result);\n    result = ECMA_VALUE_UNDEFINED;\n  }\n\n  return result;\n} /* ecma_async_generator_run */\n\n/**\n * Finalize the promises of an executable generator\n */\nvoid\necma_async_generator_finalize (vm_executable_object_t *async_generator_object_p, /**< async generator */\n                               ecma_value_t value) /**< final value (takes reference) */\n{\n  ecma_value_t next = async_generator_object_p->extended_object.u.class_prop.u.head;\n  ecma_async_generator_task_t *task_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_async_generator_task_t, next);\n\n  if (ECMA_IS_VALUE_ERROR (value))\n  {\n    value = jcontext_take_exception ();\n    ecma_reject_promise (task_p->promise, value);\n  }\n  else\n  {\n    ecma_value_t result = ecma_create_iter_result_object (value, ECMA_VALUE_TRUE);\n    ecma_fulfill_promise (task_p->promise, result);\n    ecma_free_value (result);\n  }\n\n  ecma_free_value (value);\n\n  next = task_p->next;\n  async_generator_object_p->extended_object.u.class_prop.u.head = next;\n  jmem_heap_free_block (task_p, sizeof (ecma_async_generator_task_t));\n\n  while (!ECMA_IS_INTERNAL_VALUE_NULL (next))\n  {\n    task_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_async_generator_task_t, next);\n\n    if (task_p->operation_type != ECMA_ASYNC_GENERATOR_DO_THROW)\n    {\n      value = ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n      ecma_fulfill_promise (task_p->promise, value);\n      ecma_free_value (value);\n    }\n    else\n    {\n      ecma_reject_promise (task_p->promise, task_p->operation_value);\n    }\n\n    ecma_free_value_if_not_object (task_p->operation_value);\n\n    next = task_p->next;\n    async_generator_object_p->extended_object.u.class_prop.u.head = next;\n    jmem_heap_free_block (task_p, sizeof (ecma_async_generator_task_t));\n  }\n} /* ecma_async_generator_finalize */\n\n/**\n * Continue after an await operation is completed.\n *\n * @return an updated value for the value argument\n */\necma_value_t\necma_await_continue (vm_executable_object_t *executable_object_p, /**< executable object */\n                     ecma_value_t value) /**< job value (takes reference) */\n{\n  ecma_await_states_t state = (ecma_await_states_t) ECMA_AWAIT_GET_STATE (executable_object_p);\n\n  switch (state)\n  {\n    case ECMA_AWAIT_YIELD_NEXT:\n    case ECMA_AWAIT_YIELD_NEXT_RETURN:\n    {\n      if (!ecma_is_value_object (value))\n      {\n        ecma_free_value (value);\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Value received by yield* is not Object.\"));\n      }\n\n      ecma_object_t *result_obj_p = ecma_get_object_from_value (value);\n      ecma_value_t result = ecma_op_object_get_by_magic_id (result_obj_p, LIT_MAGIC_STRING_DONE);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        ecma_deref_object (result_obj_p);\n        return result;\n      }\n\n      bool done = ecma_op_to_boolean (result);\n      ecma_free_value (result);\n      result = ecma_op_object_get_by_magic_id (result_obj_p, LIT_MAGIC_STRING_VALUE);\n      ecma_deref_object (result_obj_p);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        return result;\n      }\n\n      if (!done)\n      {\n        ECMA_AWAIT_SET_STATE (executable_object_p, YIELD_NEXT_VALUE);\n        return ecma_promise_async_await ((ecma_extended_object_t *) executable_object_p, result);\n      }\n\n      ECMA_EXECUTABLE_OBJECT_RESUME_EXEC (executable_object_p);\n\n      if (state == ECMA_AWAIT_YIELD_NEXT_RETURN)\n      {\n        executable_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_return;\n      }\n      return result;\n    }\n    case ECMA_AWAIT_YIELD_RETURN:\n    {\n      ecma_object_t *obj_p = ecma_get_object_from_value (executable_object_p->frame_ctx.block_result);\n      ecma_value_t result = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_RETURN);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        ecma_free_value (value);\n        return result;\n      }\n\n      if (result == ECMA_VALUE_UNDEFINED)\n      {\n        ECMA_EXECUTABLE_OBJECT_RESUME_EXEC (executable_object_p);\n        executable_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_return;\n        return value;\n      }\n\n      result = ecma_async_yield_call (result,\n                                      executable_object_p,\n                                      value,\n                                      ECMA_ERR_MSG (\"Iterator return() is not callable.\"));\n      ecma_free_value (value);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        return result;\n      }\n\n      JERRY_ASSERT (result == ECMA_VALUE_UNDEFINED);\n      ECMA_AWAIT_CHANGE_STATE (executable_object_p, YIELD_RETURN, YIELD_NEXT_RETURN);\n      return ECMA_VALUE_UNDEFINED;\n    }\n    case ECMA_AWAIT_YIELD_NEXT_VALUE:\n    {\n      ECMA_AWAIT_CHANGE_STATE (executable_object_p, YIELD_NEXT_VALUE, YIELD_OPERATION);\n      opfunc_async_generator_yield ((ecma_extended_object_t *) executable_object_p, value);\n      return ECMA_VALUE_UNDEFINED;\n    }\n    case ECMA_AWAIT_YIELD_OPERATION:\n    {\n      /* Currently this is always a throw exception case. */\n      ecma_value_t result = ecma_async_yield_throw (executable_object_p, value);\n      ecma_free_value (value);\n      return result;\n    }\n    case ECMA_AWAIT_YIELD_CLOSE:\n    {\n      const char *msg_p = (ecma_is_value_object (value) ? ECMA_ERR_MSG (\"Iterator throw() is not available.\")\n                                                        : ECMA_ERR_MSG (\"Value received by yield* is not Object.\"));\n\n      ecma_free_value (value);\n      return ecma_raise_type_error (msg_p);\n    }\n    case ECMA_AWAIT_FOR_CLOSE:\n    {\n      bool is_value_object = ecma_is_value_object (value);\n      ecma_free_value (value);\n      ECMA_EXECUTABLE_OBJECT_RESUME_EXEC (executable_object_p);\n\n      if (!is_value_object\n          && VM_GET_CONTEXT_TYPE (executable_object_p->frame_ctx.stack_top_p[-1]) != VM_CONTEXT_FINALLY_THROW)\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator return() result is not object\"));\n      }\n      return ECMA_VALUE_EMPTY;\n    }\n    default:\n    {\n      JERRY_ASSERT (state == ECMA_AWAIT_FOR_NEXT);\n      JERRY_ASSERT (VM_GET_CONTEXT_TYPE (executable_object_p->frame_ctx.stack_top_p[-1]) == VM_CONTEXT_FOR_AWAIT_OF);\n      JERRY_ASSERT (!(executable_object_p->frame_ctx.stack_top_p[-1] & VM_CONTEXT_CLOSE_ITERATOR));\n\n      if (!ecma_is_value_object (value))\n      {\n        ecma_free_value (value);\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Value received by for-async-of is not Object.\"));\n      }\n\n      ecma_object_t *result_obj_p = ecma_get_object_from_value (value);\n      ecma_value_t result = ecma_op_object_get_by_magic_id (result_obj_p, LIT_MAGIC_STRING_DONE);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        ecma_deref_object (result_obj_p);\n        return result;\n      }\n\n      bool done = ecma_op_to_boolean (result);\n      ecma_free_value (result);\n\n      ecma_value_t *stack_top_p = executable_object_p->frame_ctx.stack_top_p;\n      JERRY_ASSERT (stack_top_p[-2] == ECMA_VALUE_UNDEFINED);\n      JERRY_ASSERT (ecma_is_value_object (stack_top_p[-3]));\n      JERRY_ASSERT (stack_top_p[-4] == ECMA_VALUE_UNDEFINED || ecma_is_value_object (stack_top_p[-4]));\n\n      if (!done)\n      {\n        result = ecma_op_object_get_by_magic_id (result_obj_p, LIT_MAGIC_STRING_VALUE);\n        ecma_deref_object (result_obj_p);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          return result;\n        }\n\n        /* It seems browsers call Await(result) here, although the standard does not\n         * requests to do so. The following code might follow browsers in the future. */\n        ecma_deref_if_object (result);\n        stack_top_p[-1] |= VM_CONTEXT_CLOSE_ITERATOR;\n        stack_top_p[-2] = result;\n        ECMA_EXECUTABLE_OBJECT_RESUME_EXEC (executable_object_p);\n        return ECMA_VALUE_EMPTY;\n      }\n\n      ecma_deref_object (result_obj_p);\n\n      /* This code jumps to the end regardless of the byte code which triggered this await. */\n      uint32_t context_end = VM_GET_CONTEXT_END (stack_top_p[-1]);\n      executable_object_p->frame_ctx.byte_code_p = executable_object_p->frame_ctx.byte_code_start_p + context_end;\n\n      VM_MINUS_EQUAL_U16 (executable_object_p->frame_ctx.context_depth,\n                          PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION);\n      stack_top_p -= PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION;\n      executable_object_p->frame_ctx.stack_top_p = stack_top_p;\n\n      ECMA_EXECUTABLE_OBJECT_RESUME_EXEC (executable_object_p);\n      return ECMA_VALUE_EMPTY;\n    }\n  }\n} /* ecma_await_continue */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-async-generator-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_ASYNC_GENERATOR_OBJECT_H\n#define ECMA_ASYNC_GENERATOR_OBJECT_H\n\n#include \"ecma-globals.h\"\n#include \"vm-defines.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaasyncgeneratorobject ECMA AsyncGenerator object related routines\n * @{\n */\n\n/**\n * AsyncGenerator command types.\n */\ntypedef enum\n{\n  ECMA_ASYNC_GENERATOR_DO_NEXT, /**< async generator next operation */\n  ECMA_ASYNC_GENERATOR_DO_THROW, /**< async generator throw operation */\n  ECMA_ASYNC_GENERATOR_DO_RETURN, /**< async generator return operation */\n} ecma_async_generator_operation_type_t;\n\n/**\n * Get the state of an async yield iterator.\n */\n#define ECMA_AWAIT_GET_STATE(async_generator_object_p) \\\n  ((async_generator_object_p)->extended_object.u.class_prop.extra_info >> ECMA_AWAIT_STATE_SHIFT)\n\n/**\n * Set the state of an async yield iterator.\n */\n#define ECMA_AWAIT_SET_STATE(async_generator_object_p, to) \\\n  do \\\n  { \\\n    uint16_t extra_info = (async_generator_object_p)->extended_object.u.class_prop.extra_info; \\\n    extra_info &= ((1 << ECMA_AWAIT_STATE_SHIFT) - 1); \\\n    extra_info |= (ECMA_AWAIT_ ## to) << ECMA_AWAIT_STATE_SHIFT; \\\n    (async_generator_object_p)->extended_object.u.class_prop.extra_info = extra_info; \\\n  } \\\n  while (false)\n\n/**\n * Mask for clearing all ASYNC_AWAIT status bits\n */\n#define ECMA_AWAIT_CLEAR_MASK \\\n  (((1 << ECMA_AWAIT_STATE_SHIFT) - 1) - ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD)\n\n/**\n * Helper macro for ECMA_AWAIT_CHANGE_STATE.\n */\n#define ECMA_AWAIT_CS_HELPER(from, to) \\\n  (((ECMA_AWAIT_ ## from) ^ (ECMA_AWAIT_ ## to)) << ECMA_AWAIT_STATE_SHIFT)\n\n/**\n * Change the state of an async yield iterator.\n */\n#define ECMA_AWAIT_CHANGE_STATE(async_generator_object_p, from, to) \\\n  ((async_generator_object_p)->extended_object.u.class_prop.extra_info ^= ECMA_AWAIT_CS_HELPER (from, to))\n\necma_value_t ecma_async_generator_enqueue (vm_executable_object_t *async_generator_object_p,\n                                           ecma_async_generator_operation_type_t operation, ecma_value_t value);\n\necma_value_t ecma_async_generator_run (vm_executable_object_t *async_generator_object_p);\nvoid ecma_async_generator_finalize (vm_executable_object_t *async_generator_object_p, ecma_value_t value);\n\necma_value_t ecma_await_continue (vm_executable_object_t *async_generator_object_p, ecma_value_t value);\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_ASYNC_GENERATOR_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-big-uint.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-big-uint.h\"\n#include \"ecma-helpers.h\"\n#include \"jmem.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\nJERRY_STATIC_ASSERT (sizeof (ecma_bigint_two_digits_t) == 2 * sizeof (ecma_bigint_digit_t),\n                     ecma_big_int_two_digits_must_be_twice_as_long_as_ecma_big_int_digit);\n\nJERRY_STATIC_ASSERT ((1 << ECMA_BIGINT_DIGIT_SHIFT) == (8 * sizeof (ecma_bigint_digit_t)),\n                     ecma_bigint_digit_shift_is_incorrect);\n\nJERRY_STATIC_ASSERT ((ECMA_BIG_UINT_BITWISE_DECREASE_LEFT << 1) == ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT,\n                     ecma_big_uint_bitwise_left_and_right_sub_option_bits_must_follow_each_other);\n\n/**\n * Create a new BigInt value\n *\n * @return new BigInt value, NULL on error\n */\necma_extended_primitive_t *\necma_bigint_create (uint32_t size) /**< size of the new BigInt value */\n{\n  JERRY_ASSERT (size > 0);\n  JERRY_ASSERT ((size % sizeof (ecma_bigint_digit_t)) == 0);\n\n  if (JERRY_UNLIKELY (size > ECMA_BIGINT_MAX_SIZE))\n  {\n    return NULL;\n  }\n\n  ecma_extended_primitive_t *value_p;\n\n  size_t mem_size = ECMA_BIGINT_GET_BYTE_SIZE (size) + sizeof (ecma_extended_primitive_t);\n  value_p = (ecma_extended_primitive_t *) jmem_heap_alloc_block_null_on_error (mem_size);\n\n  if (JERRY_UNLIKELY (value_p == NULL))\n  {\n    return NULL;\n  }\n\n  value_p->refs_and_type = ECMA_EXTENDED_PRIMITIVE_REF_ONE | ECMA_TYPE_BIGINT;\n  value_p->u.bigint_sign_and_size = size;\n  return value_p;\n} /* ecma_bigint_create */\n\n/**\n * Extend a BigUInt value with a new data prefix value\n *\n * @return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_extend (ecma_extended_primitive_t *value_p, /**< BigUInt value */\n                      ecma_bigint_digit_t digit) /**< new digit */\n{\n  uint32_t old_size = ECMA_BIGINT_GET_SIZE (value_p);\n\n  if (ECMA_BIGINT_SIZE_IS_ODD (old_size))\n  {\n    value_p->u.bigint_sign_and_size += (uint32_t) sizeof (ecma_bigint_digit_t);\n    *ECMA_BIGINT_GET_DIGITS (value_p, old_size) = digit;\n    return value_p;\n  }\n\n  ecma_extended_primitive_t *result_p = ecma_bigint_create (old_size + (uint32_t) sizeof (ecma_bigint_digit_t));\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    ecma_deref_bigint (value_p);\n    return NULL;\n  }\n\n  memcpy (result_p + 1, value_p + 1, old_size);\n  ecma_deref_bigint (value_p);\n\n  *ECMA_BIGINT_GET_DIGITS (result_p, old_size) = digit;\n  return result_p;\n} /* ecma_big_uint_extend */\n\n/**\n * Count the number of leading zero bits of a digit\n *\n * return number of leading zero bits\n */\necma_bigint_digit_t\necma_big_uint_count_leading_zero (ecma_bigint_digit_t digit) /**< digit value */\n{\n  ecma_bigint_digit_t shift = 4 * sizeof (ecma_bigint_digit_t);\n  ecma_bigint_digit_t result = 8 * sizeof (ecma_bigint_digit_t);\n\n  do\n  {\n    ecma_bigint_digit_t value = digit >> shift;\n    if (value > 0)\n    {\n      digit = value;\n      result -= shift;\n    }\n    shift >>= 1;\n  }\n  while (shift > 0);\n\n  return result - digit;\n} /* ecma_big_uint_count_leading_zero */\n\n/**\n * Helper function which discards the leading zero digits of a BigUInt value\n *\n * @return new BigUInt value, NULL on error\n */\nstatic ecma_extended_primitive_t *\necma_big_uint_normalize_result (ecma_extended_primitive_t *value_p, /**< BigUInt value */\n                                ecma_bigint_digit_t *last_digit_p) /**< points to the end of BigUInt */\n{\n  JERRY_ASSERT (last_digit_p[-1] == 0);\n\n  ecma_bigint_digit_t *first_digit_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n\n  /* The following code is tricky. The value stored in first_digit_p[-1] is the size\n   * of the BigUInt value, and it cannot be zero. Hence the loop below will terminate. */\n  JERRY_ASSERT (first_digit_p[-1] != 0);\n\n  do\n  {\n    --last_digit_p;\n  }\n  while (last_digit_p[-1] == 0);\n\n  JERRY_ASSERT (last_digit_p >= first_digit_p);\n\n  if (first_digit_p == last_digit_p)\n  {\n    ecma_deref_bigint (value_p);\n    return ECMA_BIGINT_POINTER_TO_ZERO;\n  }\n\n  uint32_t new_size = (uint32_t) ((uint8_t *) last_digit_p - (uint8_t *) first_digit_p);\n\n  if (ECMA_BIGINT_SIZE_IS_ODD (new_size)\n      && ((new_size + sizeof (ecma_bigint_digit_t)) == ECMA_BIGINT_GET_SIZE (value_p)))\n  {\n    value_p->u.bigint_sign_and_size -= (uint32_t) sizeof (ecma_bigint_digit_t);\n    return value_p;\n  }\n\n  ecma_extended_primitive_t *result_p = ecma_bigint_create (new_size);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    ecma_deref_bigint (value_p);\n    return NULL;\n  }\n\n  memcpy (ECMA_BIGINT_GET_DIGITS (result_p, 0), ECMA_BIGINT_GET_DIGITS (value_p, 0), new_size);\n  ecma_deref_bigint (value_p);\n\n  return result_p;\n} /* ecma_big_uint_normalize_result */\n\n/**\n * Helper function which increases the result by 1 and extends or shrinks the BigUInt when necessary\n *\n * @return new BigUInt value, NULL on error\n */\nstatic ecma_extended_primitive_t *\necma_big_uint_increase_result (ecma_extended_primitive_t *value_p) /**< BigUInt value */\n{\n  uint32_t size = ECMA_BIGINT_GET_SIZE (value_p);\n\n  JERRY_ASSERT (size > 0);\n\n  ecma_bigint_digit_t *first_digit_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n  ecma_bigint_digit_t *last_digit_p = ECMA_BIGINT_GET_DIGITS (value_p, size);\n\n  while (*first_digit_p == ~((ecma_bigint_digit_t) 0))\n  {\n    *first_digit_p++ = 0;\n\n    if (first_digit_p == last_digit_p)\n    {\n      return ecma_big_uint_extend (value_p, 1);\n    }\n  }\n\n  (*first_digit_p)++;\n\n  if (last_digit_p[-1] != 0)\n  {\n    return value_p;\n  }\n\n  return ecma_big_uint_normalize_result (value_p, last_digit_p);\n} /* ecma_big_uint_increase_result */\n\n/**\n * Compare two BigUInt numbers\n *\n * return -1, if left value < right value, 0 if they are equal, and 1 otherwise\n */\nint\necma_big_uint_compare (ecma_extended_primitive_t *left_value_p, /**< left BigUInt value */\n                       ecma_extended_primitive_t *right_value_p) /**< right BigUInt value */\n{\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_value_p);\n  uint32_t right_size = ECMA_BIGINT_GET_SIZE (right_value_p);\n\n  JERRY_ASSERT (left_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) != 0);\n  JERRY_ASSERT (right_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (right_value_p, right_size) != 0);\n\n  if (left_size > right_size)\n  {\n    return 1;\n  }\n\n  if (left_size < right_size)\n  {\n    return -1;\n  }\n\n  ecma_bigint_digit_t *start_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n  ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, left_size);\n  ecma_bigint_digit_t *right_p = ECMA_BIGINT_GET_DIGITS (right_value_p, left_size);\n\n  do\n  {\n    ecma_bigint_digit_t left_value = *(--left_p);\n    ecma_bigint_digit_t right_value = *(--right_p);\n\n    if (left_value < right_value)\n    {\n      return -1;\n    }\n\n    if (left_value > right_value)\n    {\n      return 1;\n    }\n  }\n  while (left_p > start_p);\n\n  return 0;\n} /* ecma_big_uint_compare */\n\n/**\n * In-place multiply and addition operation with digit\n *\n * return updated value on success, NULL if no memory is available\n */\necma_extended_primitive_t *\necma_big_uint_mul_digit (ecma_extended_primitive_t *value_p, /**< BigUInt value */\n                         ecma_bigint_digit_t mul, /**< multiply value */\n                         ecma_bigint_digit_t add) /**< addition value */\n{\n  JERRY_ASSERT (mul > 1);\n  JERRY_ASSERT (add < mul);\n\n  if (JERRY_UNLIKELY (value_p == NULL))\n  {\n    JERRY_ASSERT (add > 0);\n\n    value_p = ecma_bigint_create (sizeof (ecma_bigint_digit_t));\n\n    if (JERRY_UNLIKELY (value_p == NULL))\n    {\n      return NULL;\n    }\n\n    *ECMA_BIGINT_GET_DIGITS (value_p, 0) = add;\n    return value_p;\n  }\n\n  uint32_t size = ECMA_BIGINT_GET_SIZE (value_p);\n\n  JERRY_ASSERT (size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (value_p, size) != 0);\n\n  ecma_bigint_digit_t *current_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n  ecma_bigint_digit_t *end_p = ECMA_BIGINT_GET_DIGITS (value_p, size);\n  ecma_bigint_digit_t carry = add;\n\n  do\n  {\n    ecma_bigint_two_digits_t multiply_result = ((ecma_bigint_two_digits_t) *current_p) * mul;\n    ecma_bigint_digit_t multiply_result_low, new_carry;\n\n    multiply_result_low = (ecma_bigint_digit_t) multiply_result;\n    new_carry = (ecma_bigint_digit_t) (multiply_result >> (8 * sizeof (ecma_bigint_digit_t)));\n\n    multiply_result_low += carry;\n    if (multiply_result_low < carry)\n    {\n      new_carry++;\n    }\n\n    *current_p++ = multiply_result_low;\n    carry = new_carry;\n  }\n  while (current_p < end_p);\n\n  if (carry == 0)\n  {\n    return value_p;\n  }\n\n  return ecma_big_uint_extend (value_p, carry);\n} /* ecma_big_uint_mul_digit */\n\n/**\n * Convert a BigUInt to a human readable number\n *\n * return char sequence on success, NULL otherwise\n */\nlit_utf8_byte_t *\necma_big_uint_to_string (ecma_extended_primitive_t *value_p, /**< BigUInt value */\n                         uint32_t radix, /**< radix number between 2 and 36 */\n                         uint32_t *char_start_p, /**< [out] start offset of numbers */\n                         uint32_t *char_size_p) /**< [out] size of the output buffer */\n{\n  uint32_t size = ECMA_BIGINT_GET_SIZE (value_p);\n\n  JERRY_ASSERT (radix >= 2 && radix <= 36);\n  JERRY_ASSERT (size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (value_p, size) != 0);\n\n  uint32_t max_size = size * 8;\n\n  if (radix < 16)\n  {\n    if (radix >= 8)\n    {\n      /* Most frequent case. */\n      max_size = (max_size + 2) / 3;\n    }\n    else if (radix >= 4)\n    {\n      max_size = (max_size + 1) >> 1;\n    }\n  }\n  else if (radix < 32)\n  {\n    max_size = (max_size + 3) >> 2;\n  }\n  else\n  {\n    max_size = (max_size + 4) / 5;\n  }\n\n  /* This space can be used to store a sign. */\n  max_size += (uint32_t) (2 * sizeof (ecma_bigint_digit_t) - 1);\n  max_size &= ~(uint32_t) (sizeof (ecma_bigint_digit_t) - 1);\n  *char_size_p = max_size;\n\n  lit_utf8_byte_t *result_p = (lit_utf8_byte_t *) jmem_heap_alloc_block_null_on_error (max_size);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return NULL;\n  }\n\n  memcpy (result_p, value_p + 1, size);\n\n  ecma_bigint_digit_t *start_p = (ecma_bigint_digit_t *) (result_p + size);\n  ecma_bigint_digit_t *end_p = (ecma_bigint_digit_t *) result_p;\n  lit_utf8_byte_t *string_p = result_p + max_size;\n\n  do\n  {\n    ecma_bigint_digit_t *current_p = (ecma_bigint_digit_t *) start_p;\n    ecma_bigint_digit_t remainder = 0;\n\n    if (sizeof (uintptr_t) == sizeof (ecma_bigint_two_digits_t))\n    {\n      do\n      {\n        ecma_bigint_two_digits_t result = *(--current_p) | ECMA_BIGINT_HIGH_DIGIT (remainder);\n\n        *current_p = (ecma_bigint_digit_t) (result / radix);\n        remainder = (ecma_bigint_digit_t) (result % radix);\n      }\n      while (current_p > end_p);\n    }\n    else\n    {\n      if (ECMA_BIGINT_SIZE_IS_ODD ((uintptr_t) current_p - (uintptr_t) end_p))\n      {\n        ecma_bigint_digit_t result = *(--current_p);\n        *current_p = result / radix;\n        remainder = result % radix;\n      }\n\n      while (current_p > end_p)\n      {\n        /* The following algorithm splits the 64 bit input into three numbers, extend\n         * them with remainder, divide them by radix, and updates the three bit ranges\n         * corresponding to the three numbers. */\n\n        const uint32_t extract_bits_low = 10;\n        const uint32_t extract_bits_low_mask = (uint32_t) ((1 << extract_bits_low) - 1);\n        const uint32_t extract_bits_high = (uint32_t) ((sizeof (ecma_bigint_digit_t) * 8) - extract_bits_low);\n        const uint32_t extract_bits_high_mask = (uint32_t) ((1 << extract_bits_high) - 1);\n\n        ecma_bigint_digit_t result_high = current_p[-1];\n        ecma_bigint_digit_t result_mid = (result_high & extract_bits_low_mask) << extract_bits_low;\n\n        result_high = (result_high >> extract_bits_low) | (remainder << extract_bits_high);\n        result_mid |= (result_high % radix) << (extract_bits_low * 2);\n        result_high = (result_high / radix) << extract_bits_low;\n\n        ecma_bigint_digit_t result_low = current_p[-2];\n        result_mid |= result_low >> extract_bits_high;\n        result_low = (result_low & extract_bits_high_mask) | ((result_mid % radix) << extract_bits_high);\n\n        result_mid = result_mid / radix;\n\n        current_p[-1] = result_high | (result_mid >> extract_bits_low);\n        current_p[-2] = (result_low / radix) | (result_mid << extract_bits_high);\n\n        remainder = result_low % radix;\n        current_p -= 2;\n      }\n    }\n\n    *(--string_p) = (lit_utf8_byte_t) ((remainder < 10) ? (remainder + LIT_CHAR_0)\n                                                        : (remainder + (LIT_CHAR_LOWERCASE_A - 10)));\n    JERRY_ASSERT (string_p >= (lit_utf8_byte_t *) start_p);\n\n    if (start_p[-1] == 0)\n    {\n      start_p--;\n    }\n  }\n  while (start_p > end_p);\n\n  *char_start_p = (uint32_t) (string_p - result_p);\n  return result_p;\n} /* ecma_big_uint_to_string */\n\n/**\n * Increase the value of a BigUInt value by 1\n *\n * return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_increase (ecma_extended_primitive_t *value_p) /**< BigUInt value */\n{\n  uint32_t size = ECMA_BIGINT_GET_SIZE (value_p);\n\n  JERRY_ASSERT (size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (value_p, size) != 0);\n\n  ecma_bigint_digit_t *digits_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n  ecma_bigint_digit_t *digits_end_p = ECMA_BIGINT_GET_DIGITS (value_p, size);\n\n  if (JERRY_UNLIKELY (digits_p[0] == ~((ecma_bigint_digit_t) 0) && digits_end_p[-1] == ~((ecma_bigint_digit_t) 0)))\n  {\n    do\n    {\n      digits_p++;\n    }\n    while (digits_p < digits_end_p && digits_p[0] == ~((ecma_bigint_digit_t) 0));\n\n    if (digits_p == digits_end_p)\n    {\n      ecma_extended_primitive_t *result_value_p;\n      result_value_p = ecma_bigint_create ((uint32_t) (size + sizeof (ecma_bigint_digit_t)));\n\n      if (JERRY_UNLIKELY (result_value_p == NULL))\n      {\n        return NULL;\n      }\n\n      memset (ECMA_BIGINT_GET_DIGITS (result_value_p, 0), 0, size);\n      *ECMA_BIGINT_GET_DIGITS (result_value_p, size) = 1;\n      return result_value_p;\n    }\n\n    digits_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n  }\n\n  ecma_extended_primitive_t *result_value_p = ecma_bigint_create (size);\n\n  if (JERRY_UNLIKELY (result_value_p == NULL))\n  {\n    return NULL;\n  }\n\n  ecma_bigint_digit_t *result_p = ECMA_BIGINT_GET_DIGITS (result_value_p, 0);\n\n  while (digits_p[0] == ~((ecma_bigint_digit_t) 0))\n  {\n    digits_p++;\n    *result_p++ = 0;\n  }\n\n  *result_p++ = (*digits_p++) + 1;\n\n  if (digits_p < digits_end_p)\n  {\n    memcpy (result_p, digits_p, (size_t) ((uint8_t *) digits_end_p - (uint8_t *) digits_p));\n  }\n  return result_value_p;\n} /* ecma_big_uint_increase */\n\n/**\n * Decrease the value of a BigUInt value by 1\n *\n * return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_decrease (ecma_extended_primitive_t *value_p) /**< BigUInt value */\n{\n  uint32_t size = ECMA_BIGINT_GET_SIZE (value_p);\n\n  JERRY_ASSERT (size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (value_p, size) != 0);\n\n  ecma_bigint_digit_t *digits_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n  ecma_bigint_digit_t *digits_end_p = ECMA_BIGINT_GET_DIGITS (value_p, size);\n\n  JERRY_ASSERT (size > sizeof (ecma_bigint_digit_t) || *digits_p > 1);\n\n  if (JERRY_UNLIKELY (digits_p[0] == 0 && digits_end_p[-1] == 1))\n  {\n    do\n    {\n      digits_p++;\n      JERRY_ASSERT (digits_p < digits_end_p);\n    }\n    while (digits_p[0] == 0);\n\n    if (digits_p + 1 == digits_end_p)\n    {\n      size -= (uint32_t) sizeof (ecma_bigint_digit_t);\n      ecma_extended_primitive_t *result_value_p = ecma_bigint_create (size);\n\n      if (JERRY_UNLIKELY (result_value_p == NULL))\n      {\n        return NULL;\n      }\n\n      memset (ECMA_BIGINT_GET_DIGITS (result_value_p, 0), 0xff, size);\n      return result_value_p;\n    }\n\n    digits_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n  }\n\n  ecma_extended_primitive_t *result_value_p = ecma_bigint_create (size);\n\n  if (JERRY_UNLIKELY (result_value_p == NULL))\n  {\n    return NULL;\n  }\n\n  ecma_bigint_digit_t *result_p = ECMA_BIGINT_GET_DIGITS (result_value_p, 0);\n\n  while (digits_p[0] == 0)\n  {\n    digits_p++;\n    *result_p++ = ~((ecma_bigint_digit_t) 0);\n  }\n\n  *result_p++ = (*digits_p++) - 1;\n\n  if (digits_p < digits_end_p)\n  {\n    memcpy (result_p, digits_p, (size_t) ((uint8_t *) digits_end_p - (uint8_t *) digits_p));\n  }\n  return result_value_p;\n} /* ecma_big_uint_decrease */\n\n/**\n * Add right BigUInt value to the left BigUInt value\n *\n * return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_add (ecma_extended_primitive_t *left_value_p, /**< left BigUInt value */\n                   ecma_extended_primitive_t *right_value_p) /**< right BigUInt value */\n{\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_value_p);\n  uint32_t right_size = ECMA_BIGINT_GET_SIZE (right_value_p);\n\n  JERRY_ASSERT (left_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) != 0);\n  JERRY_ASSERT (right_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (right_value_p, right_size) != 0);\n\n  if (left_size < right_size)\n  {\n    /* Swap values. */\n    ecma_extended_primitive_t *tmp_value_p = left_value_p;\n    left_value_p = right_value_p;\n    right_value_p = tmp_value_p;\n\n    uint32_t tmp_size = left_size;\n    left_size = right_size;\n    right_size = tmp_size;\n  }\n\n  ecma_extended_primitive_t *result_p = ecma_bigint_create (left_size);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return NULL;\n  }\n\n  ecma_bigint_digit_t *current_p = ECMA_BIGINT_GET_DIGITS (result_p, 0);\n  ecma_bigint_digit_t *end_p = ECMA_BIGINT_GET_DIGITS (result_p, right_size);\n  ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n  ecma_bigint_digit_t *right_p = ECMA_BIGINT_GET_DIGITS (right_value_p, 0);\n  ecma_bigint_digit_t carry = 0;\n\n  left_size -= right_size;\n\n  do\n  {\n    ecma_bigint_digit_t left = *left_p++;\n\n    if (carry == 0 || left != ~(ecma_bigint_digit_t) 0)\n    {\n      left += carry;\n      carry = 0;\n    }\n    else\n    {\n      left = 0;\n      carry = 1;\n    }\n\n    ecma_bigint_digit_t right = *right_p++;\n    left += right;\n\n    if (left < right)\n    {\n      JERRY_ASSERT (carry == 0);\n      carry = 1;\n    }\n\n    *current_p++ = left;\n  }\n  while (current_p < end_p);\n\n  end_p = (ecma_bigint_digit_t *) (((uint8_t *) end_p) + left_size);\n\n  if (carry != 0)\n  {\n    while (true)\n    {\n      if (JERRY_UNLIKELY (current_p == end_p))\n      {\n        return ecma_big_uint_extend (result_p, 1);\n      }\n\n      ecma_bigint_digit_t value = *left_p++;\n\n      if (value != ~(ecma_bigint_digit_t) 0)\n      {\n        *current_p++ = value + 1;\n        break;\n      }\n\n      *current_p++ = 0;\n    }\n  }\n\n  if (current_p < end_p)\n  {\n    memcpy (current_p, left_p, (size_t) ((uint8_t *) end_p - (uint8_t *) current_p));\n  }\n\n  return result_p;\n} /* ecma_big_uint_add */\n\n/**\n * Substract right BigUInt value from the left BigUInt value\n *\n * return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_sub (ecma_extended_primitive_t *left_value_p, /**< left BigUInt value */\n                   ecma_extended_primitive_t *right_value_p) /**< right BigUInt value */\n{\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_value_p);\n  uint32_t right_size = ECMA_BIGINT_GET_SIZE (right_value_p);\n\n  JERRY_ASSERT (left_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) != 0);\n  JERRY_ASSERT (right_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (right_value_p, right_size) != 0);\n  JERRY_ASSERT (left_size >= right_size);\n\n  ecma_extended_primitive_t *result_p = ecma_bigint_create (left_size);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return NULL;\n  }\n\n  ecma_bigint_digit_t *current_p = ECMA_BIGINT_GET_DIGITS (result_p, 0);\n  ecma_bigint_digit_t *end_p = ECMA_BIGINT_GET_DIGITS (result_p, right_size);\n  ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n  ecma_bigint_digit_t *right_p = ECMA_BIGINT_GET_DIGITS (right_value_p, 0);\n  ecma_bigint_digit_t carry = 0;\n\n  left_size -= right_size;\n\n  do\n  {\n    ecma_bigint_digit_t left = *left_p++;\n    ecma_bigint_digit_t right = *right_p++;\n\n    if (carry == 0 || left != 0)\n    {\n      left -= carry;\n      carry = left < right;\n    }\n    else\n    {\n      left = ~(ecma_bigint_digit_t) 0;\n      carry = 1;\n    }\n\n    *current_p++ = left - right;\n  }\n  while (current_p < end_p);\n\n  end_p = (ecma_bigint_digit_t *) (((uint8_t *) end_p) + left_size);\n\n  if (carry != 0)\n  {\n    while (true)\n    {\n      JERRY_ASSERT (current_p < end_p);\n\n      ecma_bigint_digit_t value = *left_p++;\n\n      if (value != 0)\n      {\n        *current_p++ = value - 1;\n        break;\n      }\n\n      *current_p++ = ~(ecma_bigint_digit_t) 0;\n    }\n  }\n\n  if (current_p < end_p)\n  {\n    memcpy (current_p, left_p, (size_t) ((uint8_t *) end_p - (uint8_t *) current_p));\n    return result_p;\n  }\n\n  if (current_p[-1] != 0)\n  {\n    return result_p;\n  }\n\n  return ecma_big_uint_normalize_result (result_p, current_p);\n} /* ecma_big_uint_sub */\n\n/**\n * Multiply two BigUInt values\n *\n * return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_mul (ecma_extended_primitive_t *left_value_p, /**< left BigUInt value */\n                   ecma_extended_primitive_t *right_value_p) /**< right BigUInt value */\n{\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_value_p);\n  uint32_t right_size = ECMA_BIGINT_GET_SIZE (right_value_p);\n\n  JERRY_ASSERT (left_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) != 0);\n  JERRY_ASSERT (right_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (right_value_p, right_size) != 0);\n\n  if (left_size < right_size)\n  {\n    /* Swap values. */\n    ecma_extended_primitive_t *tmp_value_p = left_value_p;\n    left_value_p = right_value_p;\n    right_value_p = tmp_value_p;\n\n    uint32_t tmp_size = left_size;\n    left_size = right_size;\n    right_size = tmp_size;\n  }\n\n  uint32_t result_size = left_size + right_size - (uint32_t) sizeof (ecma_bigint_digit_t);\n\n  ecma_extended_primitive_t *result_p = ecma_bigint_create (result_size);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return NULL;\n  }\n\n  memset (ECMA_BIGINT_GET_DIGITS (result_p, 0), 0, result_size);\n\n  /* Lower amount of space is allocated by default. This value provides extra space if needed. */\n  ecma_bigint_digit_t extra_space[1] = { 0 };\n\n  ecma_bigint_digit_t *right_p = ECMA_BIGINT_GET_DIGITS (right_value_p, 0);\n  ecma_bigint_digit_t *right_end_p = ECMA_BIGINT_GET_DIGITS (right_value_p, right_size);\n  ecma_bigint_digit_t *left_start_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n  ecma_bigint_digit_t *left_end_p = ECMA_BIGINT_GET_DIGITS (left_value_p, left_size);\n\n  ecma_bigint_digit_t *result_start_p = ECMA_BIGINT_GET_DIGITS (result_p, 0);\n  ecma_bigint_digit_t *result_end_p = ECMA_BIGINT_GET_DIGITS (result_p, result_size);\n\n  do\n  {\n    ecma_bigint_two_digits_t right = *right_p++;\n\n    if (right == 0)\n    {\n      result_start_p++;\n      continue;\n    }\n\n    ecma_bigint_digit_t *left_p = left_start_p;\n    ecma_bigint_digit_t *destination_p = result_start_p;\n    ecma_bigint_digit_t carry = 0;\n\n    do\n    {\n      JERRY_ASSERT (destination_p != (ecma_bigint_digit_t *) (extra_space + 1));\n\n      ecma_bigint_two_digits_t multiply_result;\n      ecma_bigint_digit_t multiply_result_low, new_carry;\n      ecma_bigint_digit_t value = *destination_p;\n\n      multiply_result = ((ecma_bigint_two_digits_t) (*left_p++)) * ((ecma_bigint_two_digits_t) right);\n      multiply_result_low = (ecma_bigint_digit_t) multiply_result;\n      value += multiply_result_low;\n      new_carry = (ecma_bigint_digit_t) (multiply_result >> (8 * sizeof (ecma_bigint_digit_t)));\n\n      /* The new_carry can never overflow because:\n       *   a) If left or right is less than 0xff..ff, new_carry will be less than or equal to\n       *      0xff...fd, and increasing it by maximum of two (carries) cannot overflow.\n       *   b) If left and right are both equal to 0xff..ff, multiply_result_low will be 1,\n       *      and computing value + carry + 1 can only increase new_carry at most once. */\n\n      if (value < multiply_result_low)\n      {\n        JERRY_ASSERT (new_carry < ~(ecma_bigint_digit_t) 0);\n        new_carry++;\n      }\n\n      value += carry;\n\n      if (value < carry)\n      {\n        JERRY_ASSERT (new_carry < ~(ecma_bigint_digit_t) 0);\n        new_carry++;\n      }\n\n      carry = new_carry;\n      *destination_p++ = value;\n\n      if (destination_p == result_end_p)\n      {\n        destination_p = (ecma_bigint_digit_t *) extra_space;\n      }\n    }\n    while (left_p < left_end_p);\n\n    while (carry > 0)\n    {\n      JERRY_ASSERT (destination_p != (ecma_bigint_digit_t *) (extra_space + 1));\n\n      ecma_bigint_digit_t value = *destination_p;\n\n      value += carry;\n      carry = (value < carry);\n\n      *destination_p++ = value;\n\n      if (destination_p == result_end_p)\n      {\n        destination_p = (ecma_bigint_digit_t *) extra_space;\n      }\n    }\n\n    result_start_p++;\n  }\n  while (right_p < right_end_p);\n\n  if (extra_space[0] == 0)\n  {\n    return result_p;\n  }\n\n  return ecma_big_uint_extend (result_p, extra_space[0]);\n} /* ecma_big_uint_mul */\n\n/**\n * Divide left BigUInt value with right digit value\n *\n * return new BigUInt value, NULL on error\n */\nstatic ecma_extended_primitive_t *\necma_big_uint_div_digit (ecma_extended_primitive_t *left_value_p, /**< left BigUInt value */\n                         ecma_bigint_digit_t divisor_digit, /**< divisor value */\n                         bool is_mod) /**< true if return with remainder */\n{\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_value_p);\n\n  JERRY_ASSERT (left_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) != 0);\n  JERRY_ASSERT (divisor_digit > 0);\n\n  ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, left_size - sizeof (ecma_bigint_digit_t));\n  ecma_bigint_digit_t *end_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n\n  ecma_bigint_digit_t last_digit = *left_p;\n  ecma_bigint_digit_t remainder = last_digit % divisor_digit;\n\n  last_digit = last_digit / divisor_digit;\n\n  ecma_bigint_digit_t result_size = 0;\n  ecma_extended_primitive_t *result_p = NULL;\n  ecma_bigint_digit_t *current_p = NULL;\n\n  if (!is_mod)\n  {\n    result_size = left_size;\n\n    if (last_digit == 0)\n    {\n      result_size -= (uint32_t) sizeof (ecma_bigint_digit_t);\n    }\n\n    result_p = ecma_bigint_create (result_size);\n\n    if (JERRY_UNLIKELY (result_p == NULL))\n    {\n      return NULL;\n    }\n\n    current_p = ECMA_BIGINT_GET_DIGITS (result_p, result_size);\n\n    if (last_digit != 0)\n    {\n      *(--current_p) = last_digit;\n    }\n  }\n\n  while (left_p > end_p)\n  {\n    const uint32_t shift = 1 << ECMA_BIGINT_DIGIT_SHIFT;\n\n    ecma_bigint_two_digits_t result = *(--left_p) | (((ecma_bigint_two_digits_t) remainder) << shift);\n\n    if (!is_mod)\n    {\n      *(--current_p) = (ecma_bigint_digit_t) (result / divisor_digit);\n    }\n\n    remainder = (ecma_bigint_digit_t) (result % divisor_digit);\n  }\n\n  if (!is_mod)\n  {\n    JERRY_ASSERT (current_p == ECMA_BIGINT_GET_DIGITS (result_p, 0));\n    return result_p;\n  }\n\n  if (remainder == 0)\n  {\n    return ECMA_BIGINT_POINTER_TO_ZERO;\n  }\n\n  result_p = ecma_bigint_create (sizeof (ecma_bigint_digit_t));\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return NULL;\n  }\n\n  *ECMA_BIGINT_GET_DIGITS (result_p, 0) = remainder;\n  return result_p;\n} /* ecma_big_uint_div_digit */\n\n/**\n * Shift left a BigUInt value by a digit value\n *\n * return newly allocated buffer, NULL on error\n */\nstatic ecma_bigint_digit_t *\necma_big_uint_div_shift_left (ecma_extended_primitive_t *value_p, /**< BigUInt value */\n                              ecma_bigint_digit_t shift_left, /**< left shift */\n                              bool extend) /**< extend the result with an extra digit */\n{\n  uint32_t size = ECMA_BIGINT_GET_SIZE (value_p);\n\n  JERRY_ASSERT (size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (value_p, size) != 0);\n\n  ecma_bigint_digit_t *source_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n  ecma_bigint_digit_t *end_p = ECMA_BIGINT_GET_DIGITS (value_p, size);\n\n  if (extend)\n  {\n    size += (uint32_t) sizeof (ecma_bigint_digit_t);\n  }\n\n  ecma_bigint_digit_t *result_p = (ecma_bigint_digit_t *) jmem_heap_alloc_block_null_on_error (size);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return result_p;\n  }\n\n  if (shift_left == 0)\n  {\n    JERRY_ASSERT (extend);\n\n    size -= (uint32_t) sizeof (ecma_bigint_digit_t);\n    *(ecma_bigint_digit_t *) (((uint8_t *) result_p) + size) = 0;\n\n    memcpy (result_p, source_p, size);\n    return result_p;\n  }\n\n  ecma_bigint_digit_t *destination_p = result_p;\n  ecma_bigint_digit_t carry = 0;\n  uint32_t shift_right = (1 << ECMA_BIGINT_DIGIT_SHIFT) - shift_left;\n\n  do\n  {\n    ecma_bigint_digit_t value = *source_p++;\n\n    *destination_p++ = (value << shift_left) | carry;\n    carry = value >> shift_right;\n  }\n  while (source_p < end_p);\n\n  if (extend)\n  {\n    *destination_p++ = carry;\n  }\n\n  return result_p;\n} /* ecma_big_uint_div_shift_left */\n\n/**\n * Divide left BigUInt value with right BigUInt value\n *\n * return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_div_mod (ecma_extended_primitive_t *dividend_value_p, /**< divider BigUInt value */\n                       ecma_extended_primitive_t *divisor_value_p, /**< divisor BigUInt value */\n                       bool is_mod) /**< true if return with remainder instead of quotient */\n{\n  /* This algorithm is based on Donald Knuth’s \"Algorithm D\" */\n  uint32_t divisor_size = ECMA_BIGINT_GET_SIZE (divisor_value_p);\n\n  JERRY_ASSERT (divisor_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (divisor_value_p, divisor_size) != 0);\n\n  /* The divisor must have at least two digits, so the single digit case is handled separately. */\n  if (divisor_size == sizeof (ecma_bigint_digit_t))\n  {\n    return ecma_big_uint_div_digit (dividend_value_p, *ECMA_BIGINT_GET_DIGITS (divisor_value_p, 0), is_mod);\n  }\n\n  /* D1. [Normalize] */\n  ecma_bigint_digit_t divisor_high = ECMA_BIGINT_GET_LAST_DIGIT (divisor_value_p, divisor_size);\n  ecma_bigint_digit_t shift_left = ecma_big_uint_count_leading_zero (divisor_high);\n  ecma_bigint_digit_t *buffer_p = ecma_big_uint_div_shift_left (dividend_value_p, shift_left, true);\n\n  if (JERRY_UNLIKELY (buffer_p == NULL))\n  {\n    return NULL;\n  }\n\n  uint32_t dividend_size = ECMA_BIGINT_GET_SIZE (dividend_value_p);\n  ecma_extended_primitive_t *result_p = NULL;\n  ecma_bigint_digit_t *divisor_p;\n\n  JERRY_ASSERT (dividend_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (dividend_value_p, dividend_size) != 0);\n  JERRY_ASSERT (dividend_size >= divisor_size);\n\n  if (shift_left > 0)\n  {\n    divisor_p = ecma_big_uint_div_shift_left (divisor_value_p, shift_left, false);\n\n    if (JERRY_UNLIKELY (divisor_p == NULL))\n    {\n      goto error;\n    }\n  }\n  else\n  {\n    divisor_p = ECMA_BIGINT_GET_DIGITS (divisor_value_p, 0);\n  }\n\n  ecma_bigint_digit_t *dividend_end_p = (ecma_bigint_digit_t *) (((uint8_t *) buffer_p) + dividend_size);\n  ecma_bigint_digit_t *dividend_p = (ecma_bigint_digit_t *) (((uint8_t *) dividend_end_p) - divisor_size);\n  ecma_bigint_digit_t *divisor_end_p = (ecma_bigint_digit_t *) (((uint8_t *) divisor_p) + divisor_size);\n  ecma_bigint_digit_t divisor_low = divisor_end_p[-2];\n\n  divisor_high = divisor_end_p[-1];\n  JERRY_ASSERT ((divisor_high & (((ecma_bigint_digit_t) 1) << (8 * sizeof (ecma_bigint_digit_t) - 1))) != 0);\n\n  do\n  {\n    /* D3. [Calculate Q′] */\n    ecma_bigint_digit_t result_div;\n\n    /* This do-while(false) statement allows local declarations and early exit. */\n    do\n    {\n      ecma_bigint_digit_t result_mod;\n\n      if (dividend_end_p[0] < divisor_high)\n      {\n        ecma_bigint_two_digits_t dividend = dividend_end_p[-1] | ECMA_BIGINT_HIGH_DIGIT (dividend_end_p[0]);\n        result_div = (ecma_bigint_digit_t) (dividend / divisor_high);\n        result_mod = (ecma_bigint_digit_t) (dividend % divisor_high);\n      }\n      else\n      {\n        JERRY_ASSERT (dividend_end_p[0] == divisor_high && dividend_end_p[-1] < divisor_high);\n\n        result_div = ~((ecma_bigint_digit_t) 0);\n        result_mod = dividend_end_p[-1] + divisor_high;\n\n        if (result_mod < divisor_high)\n        {\n          break;\n        }\n      }\n\n      ecma_bigint_two_digits_t low_digits = ((ecma_bigint_two_digits_t) result_div) * divisor_low;\n\n      while (low_digits > (ECMA_BIGINT_HIGH_DIGIT (result_mod) | divisor_low))\n      {\n        result_div--;\n        result_mod += divisor_high;\n\n        /* If result_mod becomes a two digit long number, the condition of the loop must be true,\n         * so the loop can be aborted. This loop stops after maximum of two iterations, since\n         * the highest bit of divisor_high is set. */\n        if (result_mod < divisor_high)\n        {\n          break;\n        }\n\n        /* Subtraction is faster than recomputing result_div * divisor_low. */\n        low_digits -= divisor_low;\n      }\n    }\n    while (false);\n\n    /* D4. [Multiply and subtract] */\n    ecma_bigint_digit_t *destination_p = dividend_p;\n    ecma_bigint_digit_t *source_p = divisor_p;\n    ecma_bigint_digit_t carry = 0;\n\n    do\n    {\n      ecma_bigint_two_digits_t multiply_result = ((ecma_bigint_two_digits_t) (*source_p++)) * result_div;\n      ecma_bigint_digit_t multiply_result_low, new_carry;\n      ecma_bigint_digit_t value = *destination_p;\n\n      /* The new carry never overflows. See the comment in ecma_big_uint_mul. */\n      new_carry = (ecma_bigint_digit_t) (multiply_result >> (8 * sizeof (ecma_bigint_digit_t)));\n      multiply_result_low = (ecma_bigint_digit_t) multiply_result;\n\n      if (value < multiply_result_low)\n      {\n        new_carry++;\n      }\n\n      value -= multiply_result_low;\n\n      if (value < carry)\n      {\n        new_carry++;\n      }\n\n      *destination_p++ = value - carry;\n      carry = new_carry;\n    }\n    while (source_p < divisor_end_p);\n\n    bool negative_result = *destination_p < carry;\n    *destination_p -= carry;\n\n    if (negative_result)\n    {\n      /* D6. [Add back] */\n      result_div--;\n\n      destination_p = dividend_p;\n      source_p = divisor_p;\n      carry = 0;\n\n      do\n      {\n        ecma_bigint_digit_t left = *destination_p;\n\n        if (carry == 0 || left != ~(ecma_bigint_digit_t) 0)\n        {\n          left += carry;\n          carry = 0;\n        }\n        else\n        {\n          left = 0;\n          carry = 1;\n        }\n\n        ecma_bigint_digit_t right = *source_p++;\n        left += right;\n\n        if (left < right)\n        {\n          JERRY_ASSERT (carry == 0);\n          carry = 1;\n        }\n\n        *destination_p++ = left;\n      }\n      while (source_p < divisor_end_p);\n    }\n\n    *dividend_end_p = result_div;\n\n    dividend_p--;\n    dividend_end_p--;\n  }\n  while (dividend_p >= buffer_p);\n\n  ecma_bigint_digit_t *source_p;\n  ecma_bigint_digit_t *source_end_p;\n\n  if (is_mod)\n  {\n    source_p = buffer_p;\n    source_end_p = dividend_end_p;\n\n    while (source_end_p > source_p && *source_end_p == 0)\n    {\n      source_end_p--;\n    }\n\n    if ((*source_end_p >> shift_left) != 0)\n    {\n      source_end_p++;\n      /* This is required to reset carry below. */\n      *source_end_p = 0;\n    }\n  }\n  else\n  {\n    source_p = dividend_end_p + 1;\n    source_end_p = (ecma_bigint_digit_t *) (((uint8_t *) buffer_p) + dividend_size);\n\n    if (*source_end_p != 0)\n    {\n      source_end_p++;\n    }\n  }\n\n  result_p = ECMA_BIGINT_POINTER_TO_ZERO;\n\n  if (source_p < source_end_p)\n  {\n    result_p = ecma_bigint_create ((uint32_t) ((uint8_t *) source_end_p - (uint8_t *) source_p));\n\n    if (result_p != NULL)\n    {\n      ecma_bigint_digit_t *destination_p = ECMA_BIGINT_GET_DIGITS (result_p, 0);\n\n      if (is_mod && shift_left > 0)\n      {\n        ecma_bigint_digit_t shift_right = shift_left;\n\n        shift_left = (ecma_bigint_digit_t) (8 * (sizeof (ecma_bigint_digit_t)) - shift_left);\n        destination_p += source_end_p - source_p;\n\n        ecma_bigint_digit_t carry = *source_end_p << shift_left;\n\n        do\n        {\n          ecma_bigint_digit_t value = *(--source_end_p);\n\n          *(--destination_p) = (value >> shift_right) | carry;\n          carry = value << shift_left;\n        }\n        while (source_end_p > source_p);\n      }\n      else\n      {\n        memcpy (destination_p, source_p, (size_t) ((uint8_t *) source_end_p - (uint8_t *) source_p));\n      }\n    }\n  }\n\nerror:\n  jmem_heap_free_block (buffer_p, dividend_size + sizeof (ecma_bigint_digit_t));\n\n  if (shift_left > 0 && divisor_p != NULL)\n  {\n    jmem_heap_free_block (divisor_p, divisor_size);\n  }\n\n  return result_p;\n} /* ecma_big_uint_div_mod */\n\n/**\n * Shift left BigUInt values by an uint32 value\n *\n * return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_shift_left (ecma_extended_primitive_t *left_value_p, /**< left BigUInt value */\n                          uint32_t right_value) /**< shift value */\n{\n  JERRY_ASSERT (right_value > 0);\n\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_value_p);\n  JERRY_ASSERT (left_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) != 0);\n\n  uint32_t zero_size = (right_value >> ECMA_BIGINT_DIGIT_SHIFT) * (uint32_t) sizeof (ecma_bigint_digit_t);\n  uint32_t result_size = left_size + zero_size;\n\n  uint32_t shift_left = right_value & ((1 << ECMA_BIGINT_DIGIT_SHIFT) - 1);\n  uint32_t shift_right = (1 << ECMA_BIGINT_DIGIT_SHIFT) - shift_left;\n\n  if (shift_left > 0 && (ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) >> shift_right) != 0)\n  {\n    result_size += (uint32_t) sizeof (ecma_bigint_digit_t);\n  }\n\n  if (result_size > ECMA_BIGINT_MAX_SIZE)\n  {\n    return NULL;\n  }\n\n  ecma_extended_primitive_t *result_value_p = ecma_bigint_create (result_size);\n\n  if (JERRY_UNLIKELY (result_value_p == NULL))\n  {\n    return NULL;\n  }\n\n  ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n  ecma_bigint_digit_t *result_p = ECMA_BIGINT_GET_DIGITS (result_value_p, 0);\n\n  if (zero_size > 0)\n  {\n    memset (result_p, 0, zero_size);\n    result_p = (ecma_bigint_digit_t *) (((uint8_t *) result_p) + zero_size);\n  }\n\n  if (shift_left == 0)\n  {\n    /* Shift by full digits. */\n    memcpy (result_p, left_p, left_size);\n    return result_value_p;\n  }\n\n  ecma_bigint_digit_t *left_end_p = ECMA_BIGINT_GET_DIGITS (left_value_p, left_size);\n  ecma_bigint_digit_t carry = 0;\n\n  do\n  {\n    ecma_bigint_digit_t value = *left_p++;\n\n    *result_p++ = (value << shift_left) | carry;\n    carry = value >> shift_right;\n  }\n  while (left_p < left_end_p);\n\n  if (carry > 0)\n  {\n    *result_p = carry;\n  }\n\n  return result_value_p;\n} /* ecma_big_uint_shift_left */\n\n/**\n * Shift right BigUInt values by an uint32 value\n *\n * @return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_shift_right (ecma_extended_primitive_t *left_value_p,  /**< left BigUInt value */\n                           uint32_t right_value, /**< shift value */\n                           bool increase_result) /**< increase result */\n{\n  JERRY_ASSERT (right_value > 0);\n\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_value_p);\n  JERRY_ASSERT (left_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) != 0);\n\n  uint32_t crop_size = (right_value >> ECMA_BIGINT_DIGIT_SHIFT) * (uint32_t) sizeof (ecma_bigint_digit_t);\n\n  uint32_t shift_right = right_value & ((1 << ECMA_BIGINT_DIGIT_SHIFT) - 1);\n  uint32_t shift_left = (1 << ECMA_BIGINT_DIGIT_SHIFT) - shift_right;\n  ecma_bigint_digit_t carry = 0;\n\n  if (shift_right > 0\n      && (ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) >> shift_right) == 0)\n  {\n    carry = ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) << shift_left;\n    left_size -= (uint32_t) sizeof (ecma_bigint_digit_t);\n  }\n\n  if (left_size <= crop_size)\n  {\n    if (JERRY_LIKELY (!increase_result))\n    {\n      return ECMA_BIGINT_POINTER_TO_ZERO;\n    }\n\n    ecma_extended_primitive_t *result_value_p = ecma_bigint_create (sizeof (ecma_bigint_digit_t));\n    if (result_value_p != NULL)\n    {\n      *ECMA_BIGINT_GET_DIGITS (result_value_p, 0) = 1;\n    }\n    return result_value_p;\n  }\n\n  if (JERRY_UNLIKELY (increase_result)\n      && (shift_right == 0\n          || (*ECMA_BIGINT_GET_DIGITS (left_value_p, crop_size) << shift_left) == 0))\n  {\n    ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n    ecma_bigint_digit_t *left_end_p = ECMA_BIGINT_GET_DIGITS (left_value_p, crop_size);\n\n    while (left_p < left_end_p)\n    {\n      if (*left_p != 0)\n      {\n        break;\n      }\n      left_p++;\n    }\n\n    if (left_p == left_end_p)\n    {\n      increase_result = false;\n    }\n  }\n\n  uint32_t size = left_size - crop_size;\n  ecma_extended_primitive_t *result_value_p = ecma_bigint_create (size);\n\n  if (JERRY_UNLIKELY (result_value_p == NULL))\n  {\n    return NULL;\n  }\n\n  if (shift_right == 0)\n  {\n    memcpy (ECMA_BIGINT_GET_DIGITS (result_value_p, 0), ECMA_BIGINT_GET_DIGITS (left_value_p, crop_size), size);\n\n    if (JERRY_LIKELY (!increase_result))\n    {\n      return result_value_p;\n    }\n    return ecma_big_uint_increase_result (result_value_p);\n  }\n\n  ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, left_size);\n  ecma_bigint_digit_t *result_p = ECMA_BIGINT_GET_DIGITS (result_value_p, size);\n  ecma_bigint_digit_t *end_p = ECMA_BIGINT_GET_DIGITS (result_value_p, 0);\n\n  do\n  {\n    ecma_bigint_digit_t value = *(--left_p);\n\n    *(--result_p) = (value >> shift_right) | carry;\n    carry = value << shift_left;\n  }\n  while (result_p > end_p);\n\n  if (JERRY_LIKELY (!increase_result))\n  {\n    return result_value_p;\n  }\n  return ecma_big_uint_increase_result (result_value_p);\n} /* ecma_big_uint_shift_right */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Compute the left value raised to the power of right value\n *\n * return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_pow (ecma_extended_primitive_t *left_value_p, /**< left BigUInt value */\n                   uint32_t right_value) /**< power value */\n{\n  ecma_extended_primitive_t *result_p = ECMA_BIGINT_NUMBER_IS_ODD (right_value) ? left_value_p : NULL;\n  ecma_extended_primitive_t *square_p = left_value_p;\n\n  JERRY_ASSERT (right_value >= 2);\n\n  while (true)\n  {\n    ecma_extended_primitive_t *new_square_p = ecma_big_uint_mul (square_p, square_p);\n\n    if (JERRY_UNLIKELY (new_square_p == NULL))\n    {\n      if (result_p != NULL && result_p != left_value_p)\n      {\n        ecma_deref_bigint (result_p);\n      }\n      result_p = NULL;\n      break;\n    }\n\n    if (square_p != left_value_p)\n    {\n      ecma_deref_bigint (square_p);\n    }\n\n    square_p = new_square_p;\n    right_value >>= 1;\n\n    if (ECMA_BIGINT_NUMBER_IS_ODD (right_value))\n    {\n      if (result_p != NULL)\n      {\n        ecma_extended_primitive_t *new_result_p = ecma_big_uint_mul (square_p, result_p);\n\n        if (result_p != left_value_p)\n        {\n          ecma_deref_bigint (result_p);\n        }\n\n        result_p = new_result_p;\n      }\n      else\n      {\n        ecma_ref_extended_primitive (square_p);\n        result_p = square_p;\n      }\n\n      if (JERRY_UNLIKELY (result_p == NULL) || right_value == 1)\n      {\n        break;\n      }\n    }\n  }\n\n  if (square_p != left_value_p)\n  {\n    ecma_deref_bigint (square_p);\n  }\n\n  return result_p;\n} /* ecma_big_uint_pow */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Perform bitwise operations on two BigUInt numbers\n *\n * return new BigUInt value, NULL on error\n */\necma_extended_primitive_t *\necma_big_uint_bitwise_op (uint32_t operation_and_options, /**< bitwise operation type and options */\n                          ecma_extended_primitive_t *left_value_p, /**< left BigUInt value */\n                          ecma_extended_primitive_t *right_value_p) /**< right BigUInt value */\n{\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_value_p);\n  uint32_t right_size = ECMA_BIGINT_GET_SIZE (right_value_p);\n\n  JERRY_ASSERT (left_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (left_value_p, left_size) != 0);\n  JERRY_ASSERT (right_size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (right_value_p, right_size) != 0);\n\n  uint32_t operation_type = ECMA_BIGINT_BITWISE_GET_OPERATION_TYPE (operation_and_options);\n\n  switch (operation_type)\n  {\n    case ECMA_BIG_UINT_BITWISE_AND:\n    {\n      if (left_size > right_size)\n      {\n        left_size = right_size;\n        break;\n      }\n      /* FALLTHRU */\n    }\n    case ECMA_BIG_UINT_BITWISE_AND_NOT:\n    {\n      if (right_size > left_size)\n      {\n        right_size = left_size;\n      }\n      break;\n    }\n    default:\n    {\n      JERRY_ASSERT (operation_type == ECMA_BIG_UINT_BITWISE_OR\n                    || operation_type == ECMA_BIG_UINT_BITWISE_XOR);\n\n      if (right_size <= left_size)\n      {\n        break;\n      }\n\n      /* Swap values. */\n      ecma_extended_primitive_t *tmp_value_p = left_value_p;\n      left_value_p = right_value_p;\n      right_value_p = tmp_value_p;\n\n      uint32_t tmp_size = left_size;\n      left_size = right_size;\n      right_size = tmp_size;\n\n      uint32_t decrease_opts = (operation_and_options & ECMA_BIG_UINT_BITWISE_DECREASE_BOTH);\n\n      /* When exactly one bit is set, invert both bits. */\n      if (decrease_opts >= ECMA_BIG_UINT_BITWISE_DECREASE_LEFT\n          && decrease_opts <= ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT)\n      {\n        operation_and_options ^= ECMA_BIG_UINT_BITWISE_DECREASE_BOTH;\n      }\n      break;\n    }\n  }\n\n  ecma_extended_primitive_t *result_value_p = ecma_bigint_create (left_size);\n\n  if (JERRY_UNLIKELY (result_value_p == NULL))\n  {\n    return NULL;\n  }\n\n  ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n  ecma_bigint_digit_t *right_p = ECMA_BIGINT_GET_DIGITS (right_value_p, 0);\n  ecma_bigint_digit_t *result_p = ECMA_BIGINT_GET_DIGITS (result_value_p, 0);\n  ecma_bigint_digit_t *result_end_p = ECMA_BIGINT_GET_DIGITS (result_value_p, right_size);\n\n  if (!(operation_and_options & ECMA_BIG_UINT_BITWISE_DECREASE_BOTH))\n  {\n    JERRY_ASSERT (!(operation_and_options & ECMA_BIG_UINT_BITWISE_INCREASE_RESULT));\n\n    if (operation_type == ECMA_BIG_UINT_BITWISE_AND)\n    {\n      do\n      {\n        *result_p++ = *left_p++ & *right_p++;\n      }\n      while (result_p < result_end_p);\n\n      if (result_p[-1] == 0)\n      {\n        return ecma_big_uint_normalize_result (result_value_p, result_p);\n      }\n      return result_value_p;\n    }\n\n    if (operation_type == ECMA_BIG_UINT_BITWISE_OR)\n    {\n      do\n      {\n        *result_p++ = *left_p++ | *right_p++;\n      }\n      while (result_p < result_end_p);\n\n      if (left_size > right_size)\n      {\n        memcpy (result_p, left_p, left_size - right_size);\n      }\n      return result_value_p;\n    }\n\n    JERRY_ASSERT (operation_type == ECMA_BIG_UINT_BITWISE_XOR);\n\n    do\n    {\n      *result_p++ = *left_p++ ^ *right_p++;\n    }\n    while (result_p < result_end_p);\n\n    if (left_size > right_size)\n    {\n      memcpy (result_p, left_p, left_size - right_size);\n      return result_value_p;\n    }\n\n    if (result_p[-1] == 0)\n    {\n      return ecma_big_uint_normalize_result (result_value_p, result_p);\n    }\n    return result_value_p;\n  }\n\n  uint32_t left_carry = 0, right_carry = 0;\n\n  if (operation_and_options & ECMA_BIG_UINT_BITWISE_DECREASE_LEFT)\n  {\n    left_carry = 1;\n  }\n\n  if (operation_and_options & ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT)\n  {\n    right_carry = 1;\n  }\n\n  do\n  {\n    ecma_bigint_digit_t left = (*left_p++) - left_carry;\n\n    if (left != ~((ecma_bigint_digit_t) 0))\n    {\n      left_carry = 0;\n    }\n\n    ecma_bigint_digit_t right = (*right_p++) - right_carry;\n\n    if (right != ~((ecma_bigint_digit_t) 0))\n    {\n      right_carry = 0;\n    }\n\n    switch (operation_type)\n    {\n      case ECMA_BIG_UINT_BITWISE_AND:\n      {\n        *result_p++ = left & right;\n        break;\n      }\n      case ECMA_BIG_UINT_BITWISE_OR:\n      {\n        *result_p++ = left | right;\n        break;\n      }\n      case ECMA_BIG_UINT_BITWISE_XOR:\n      {\n        *result_p++ = left ^ right;\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (operation_type == ECMA_BIG_UINT_BITWISE_AND_NOT);\n        *result_p++ = left & ~right;\n        break;\n      }\n    }\n  }\n  while (result_p < result_end_p);\n\n  if (operation_type != ECMA_BIG_UINT_BITWISE_AND)\n  {\n    result_end_p = ECMA_BIGINT_GET_DIGITS (result_value_p, left_size);\n\n    if (left_carry > 0)\n    {\n      while (*left_p == 0)\n      {\n        *result_p++ = ~((ecma_bigint_digit_t) 0);\n        left_p++;\n\n        JERRY_ASSERT (result_p < result_end_p);\n      }\n\n      *result_p++ = *left_p++ - 1;\n    }\n\n    if (result_p < result_end_p)\n    {\n      memcpy (result_p, left_p, (size_t) ((uint8_t *) result_end_p - (uint8_t *) result_p));\n\n      if (operation_and_options & ECMA_BIG_UINT_BITWISE_INCREASE_RESULT)\n      {\n        return ecma_big_uint_increase_result (result_value_p);\n      }\n      return result_value_p;\n    }\n  }\n\n  if (operation_and_options & ECMA_BIG_UINT_BITWISE_INCREASE_RESULT)\n  {\n    return ecma_big_uint_increase_result (result_value_p);\n  }\n\n  if (result_p[-1] == 0)\n  {\n    return ecma_big_uint_normalize_result (result_value_p, result_p);\n  }\n  return result_value_p;\n} /* ecma_big_uint_bitwise_op */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-big-uint.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_BIG_UINT_H\n#define ECMA_BIG_UINT_H\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/**\n * Limit of BigUInt memory allocation in JerryScript.\n */\n#define ECMA_BIGINT_MAX_SIZE 0x10000\n\n/**\n * Unsigned type which can hold two digits.\n */\ntypedef uint64_t ecma_bigint_two_digits_t;\n\n/**\n * Shift used by left/right shifting of a value.\n */\n#define ECMA_BIGINT_DIGIT_SHIFT 5\n\n/**\n * Return with the digits of a BigInt value.\n */\n#define ECMA_BIGINT_GET_DIGITS(value_p, offset) \\\n  ((ecma_bigint_digit_t *) (((uint8_t *) (value_p)) + sizeof (ecma_extended_primitive_t) + (offset)))\n\n/**\n * Return with the digits of a BigInt value.\n */\n#define ECMA_BIGINT_GET_LAST_DIGIT(value_p, size) \\\n  *ECMA_BIGINT_GET_DIGITS (value_p, size - sizeof (ecma_bigint_digit_t))\n\n/**\n * Returns true if size is an odd number.\n */\n#define ECMA_BIGINT_SIZE_IS_ODD(size) \\\n  (((size) & sizeof (ecma_bigint_digit_t)) != 0)\n\n/**\n * Returns a two digit value where the high digit is set to the passed digit.\n */\n#define ECMA_BIGINT_HIGH_DIGIT(digit) \\\n  (((ecma_bigint_two_digits_t) digit) << (8 * sizeof (ecma_bigint_digit_t)))\n\n/**\n * Tells whether a number (usually a digit or uint32_t value) is an odd number.\n */\n#define ECMA_BIGINT_NUMBER_IS_ODD(number) ((number & 0x1) != 0)\n\n/**\n * Bitwise operation types.\n */\ntypedef enum\n{\n  ECMA_BIG_UINT_BITWISE_AND, /**< bitwise 'and' operation */\n  ECMA_BIG_UINT_BITWISE_OR, /**< bitwise 'or' operation */\n  ECMA_BIG_UINT_BITWISE_XOR, /**< bitwise 'xor' operation */\n  ECMA_BIG_UINT_BITWISE_AND_NOT, /**< bitwise 'and not' operation */\n} ecma_big_uint_bitwise_operation_types_t;\n\n/**\n * Returns with the type of the operation.\n */\n#define ECMA_BIGINT_BITWISE_GET_OPERATION_TYPE(operation_and_options) \\\n  ((operation_and_options) & 0xf)\n\n/**\n * Options for bitwise operations.\n */\ntypedef enum\n{\n  ECMA_BIG_UINT_BITWISE_DECREASE_LEFT = (1 << 4), /**< subtract 1 from left value */\n  ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT = (1 << 5), /**< subtract 1 from right value */\n  ECMA_BIG_UINT_BITWISE_INCREASE_RESULT = (1 << 6), /**< add 1 to the result */\n} ecma_big_uint_bitwise_options_t;\n\n/**\n * Subtract 1 from both left and right values.\n */\n#define ECMA_BIG_UINT_BITWISE_DECREASE_BOTH \\\n  (ECMA_BIG_UINT_BITWISE_DECREASE_LEFT | ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT)\n\necma_extended_primitive_t *ecma_bigint_create (uint32_t size);\necma_extended_primitive_t *ecma_big_uint_extend (ecma_extended_primitive_t *value_p, ecma_bigint_digit_t digit);\n\necma_bigint_digit_t ecma_big_uint_count_leading_zero (ecma_bigint_digit_t digit);\n\nint ecma_big_uint_compare (ecma_extended_primitive_t *left_value_p, ecma_extended_primitive_t *right_value_p);\n\necma_extended_primitive_t *ecma_big_uint_mul_digit (ecma_extended_primitive_t *value_p,\n                                                    ecma_bigint_digit_t mul, ecma_bigint_digit_t add);\n\nuint8_t *ecma_big_uint_to_string (ecma_extended_primitive_t *value_p, uint32_t radix,\n                                  uint32_t *char_start_p, uint32_t *char_size_p);\n\necma_extended_primitive_t *ecma_big_uint_increase (ecma_extended_primitive_t *value_p);\necma_extended_primitive_t *ecma_big_uint_decrease (ecma_extended_primitive_t *value_p);\n\necma_extended_primitive_t *ecma_big_uint_add (ecma_extended_primitive_t *left_value_p,\n                                              ecma_extended_primitive_t *right_value_p);\necma_extended_primitive_t *ecma_big_uint_sub (ecma_extended_primitive_t *left_value_p,\n                                              ecma_extended_primitive_t *right_value_p);\necma_extended_primitive_t *ecma_big_uint_mul (ecma_extended_primitive_t *left_value_p,\n                                              ecma_extended_primitive_t *right_value_p);\necma_extended_primitive_t *ecma_big_uint_div_mod (ecma_extended_primitive_t *dividend_value_p,\n                                                  ecma_extended_primitive_t *divisor_value_p,\n                                                  bool is_mod);\n\necma_extended_primitive_t *ecma_big_uint_shift_left (ecma_extended_primitive_t *left_value_p, uint32_t right_value);\necma_extended_primitive_t *ecma_big_uint_shift_right (ecma_extended_primitive_t *left_value_p, uint32_t right_value,\n                                                      bool increase_result);\n\n#if ENABLED (JERRY_ESNEXT)\necma_extended_primitive_t *ecma_big_uint_pow (ecma_extended_primitive_t *left_value_p, uint32_t right_value);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\necma_extended_primitive_t *ecma_big_uint_bitwise_op (uint32_t operation_and_options,\n                                                     ecma_extended_primitive_t *left_value_p,\n                                                     ecma_extended_primitive_t *right_value_p);\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#endif /* ECMA_BIG_UINT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-bigint-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-bigint-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabigintobject ECMA BigInt object related routines\n * @{\n */\n\n/**\n * BigInt object creation operation.\n *\n * See also: ECMA-262 v11, 7.1.18\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_bigint_object (ecma_value_t arg) /**< argument passed to the toObject operation */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (arg));\n\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_BIGINT_PROTOTYPE);\n\n  ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                sizeof (ecma_extended_object_t),\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_BIGINT_UL;\n  ext_object_p->u.class_prop.u.value = ecma_copy_value (arg);\n\n  return ecma_make_object_value (object_p);\n} /* ecma_op_create_bigint_object */\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-bigint-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_BIGINT_OBJECT_H\n#define ECMA_BIGINT_OBJECT_H\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabigintobject ECMA BigInt object related routines\n * @{\n */\n\necma_value_t ecma_op_create_bigint_object (ecma_value_t arg);\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#endif /* !ECMA_BIGINT_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-bigint.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-bigint.h\"\n#include \"ecma-big-uint.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/**\n * Raise a not enough memory error\n *\n * @return ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_bigint_raise_memory_error (void)\n{\n  return ecma_raise_range_error (ECMA_ERR_MSG (\"Cannot allocate memory for a BigInt value\"));\n} /* ecma_bigint_raise_memory_error */\n\n/**\n * Create a single digit long BigInt value\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_bigint_create_from_digit (ecma_bigint_digit_t digit, /* single digit */\n                               bool sign) /* set ECMA_BIGINT_SIGN if true */\n{\n  JERRY_ASSERT (digit != 0);\n\n  ecma_extended_primitive_t *result_value_p = ecma_bigint_create (sizeof (ecma_bigint_digit_t));\n\n  if (JERRY_UNLIKELY (result_value_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  if (sign)\n  {\n    result_value_p->u.bigint_sign_and_size |= ECMA_BIGINT_SIGN;\n  }\n\n  *ECMA_BIGINT_GET_DIGITS (result_value_p, 0) = digit;\n  return ecma_make_extended_primitive_value (result_value_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_create_from_digit */\n\n/**\n * Parse a string and create a BigInt value\n *\n * @return ecma BigInt value or a special value allowed by the option flags\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_parse_string (const lit_utf8_byte_t *string_p, /**< string represenation of the BigInt */\n                          lit_utf8_size_t size, /**< string size */\n                          uint32_t options) /**< ecma_bigint_parse_string_options_t option bits */\n{\n  ecma_bigint_digit_t radix = 10;\n  uint32_t sign = (options & ECMA_BIGINT_PARSE_SET_NEGATIVE) ? ECMA_BIGINT_SIGN : 0;\n  bool allow_underscore = options & ECMA_BIGINT_PARSE_ALLOW_UNDERSCORE;\n\n  const lit_utf8_byte_t *string_end_p = string_p + size;\n  string_p = ecma_string_trim_front (string_p, string_p + size);\n  size = (lit_utf8_size_t) (string_end_p - string_p);\n\n  if (size >= 3 && string_p[0] == LIT_CHAR_0)\n  {\n    if (string_p[1] == LIT_CHAR_LOWERCASE_X || string_p[1] == LIT_CHAR_UPPERCASE_X)\n    {\n      radix = 16;\n      string_p += 2;\n      size -= 2;\n    }\n    else if (string_p[1] == LIT_CHAR_LOWERCASE_O || string_p[1] == LIT_CHAR_UPPERCASE_O)\n    {\n      radix = 8;\n      string_p += 2;\n      size -= 2;\n    }\n    else if (string_p[1] == LIT_CHAR_LOWERCASE_B || string_p[1] == LIT_CHAR_UPPERCASE_B)\n    {\n      radix = 2;\n      string_p += 2;\n      size -= 2;\n    }\n  }\n  else if (size >= 2)\n  {\n    if (string_p[0] == LIT_CHAR_PLUS)\n    {\n      size--;\n      string_p++;\n    }\n    else if (string_p[0] == LIT_CHAR_MINUS)\n    {\n      sign = ECMA_BIGINT_SIGN;\n      size--;\n      string_p++;\n    }\n  }\n  else if (size == 0)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  while (string_p < string_end_p && (*string_p == LIT_CHAR_0 || (*string_p == LIT_CHAR_UNDERSCORE && allow_underscore)))\n  {\n    string_p++;\n  }\n\n  ecma_extended_primitive_t *result_p = NULL;\n\n  if (string_p == string_end_p)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  do\n  {\n    ecma_bigint_digit_t digit = radix;\n\n    if (*string_p >= LIT_CHAR_0 && *string_p <= LIT_CHAR_9)\n    {\n      digit = (ecma_bigint_digit_t) (*string_p - LIT_CHAR_0);\n    }\n    else if (*string_p == LIT_CHAR_UNDERSCORE && allow_underscore)\n    {\n      continue;\n    }\n    else\n    {\n      lit_utf8_byte_t character = (lit_utf8_byte_t) LEXER_TO_ASCII_LOWERCASE (*string_p);\n\n      if (character >= LIT_CHAR_LOWERCASE_A && character <= LIT_CHAR_LOWERCASE_F)\n      {\n        digit = (ecma_bigint_digit_t) (character - (LIT_CHAR_LOWERCASE_A - 10));\n      }\n      else if (ecma_string_trim_front (string_p, string_end_p) == string_end_p)\n      {\n        string_p = string_end_p;\n        break;\n      }\n    }\n    if (digit >= radix)\n    {\n      if (result_p != NULL)\n      {\n        ecma_deref_bigint (result_p);\n      }\n\n      if (options & ECMA_BIGINT_PARSE_DISALLOW_SYNTAX_ERROR)\n      {\n        return ECMA_VALUE_FALSE;\n      }\n      return ecma_raise_syntax_error (ECMA_ERR_MSG (\"String cannot be converted to BigInt value\"));\n    }\n\n    result_p = ecma_big_uint_mul_digit (result_p, radix, digit);\n\n    if (JERRY_UNLIKELY (result_p == NULL))\n    {\n      break;\n    }\n  }\n  while (++string_p < string_end_p);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    if (options & ECMA_BIGINT_PARSE_DISALLOW_MEMORY_ERROR)\n    {\n      return ECMA_VALUE_NULL;\n    }\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  result_p->u.bigint_sign_and_size |= sign;\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_parse_string */\n\n/**\n * Parse a string value and create a BigInt value\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_parse_string_value (ecma_value_t string, /**< ecma string */\n                                uint32_t options) /**< ecma_bigint_parse_string_options_t option bits */\n{\n  JERRY_ASSERT (ecma_is_value_string (string));\n\n  ECMA_STRING_TO_UTF8_STRING (ecma_get_string_from_value (string), string_buffer_p, string_buffer_size);\n\n  ecma_value_t result = ecma_bigint_parse_string (string_buffer_p, string_buffer_size, options);\n  ECMA_FINALIZE_UTF8_STRING (string_buffer_p, string_buffer_size);\n\n  return result;\n} /* ecma_bigint_parse_string_value */\n\n/**\n * Create a string representation for a BigInt value\n *\n * @return ecma string or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_string_t *\necma_bigint_to_string (ecma_value_t value, /**< BigInt value */\n                       ecma_bigint_digit_t radix) /**< conversion radix */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (value));\n\n  if (value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_new_ecma_string_from_code_unit (LIT_CHAR_0);\n  }\n\n  uint32_t char_start_p, char_size_p;\n  ecma_extended_primitive_t *bigint_p = ecma_get_extended_primitive_from_value (value);\n  lit_utf8_byte_t *string_buffer_p = ecma_big_uint_to_string (bigint_p, radix, &char_start_p, &char_size_p);\n\n  if (JERRY_UNLIKELY (string_buffer_p == NULL))\n  {\n    ecma_raise_range_error (ECMA_ERR_MSG (\"Cannot allocate memory for a string representation of a BigInt value\"));\n    return NULL;\n  }\n\n  JERRY_ASSERT (char_start_p > 0);\n\n  if (bigint_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN)\n  {\n    string_buffer_p[--char_start_p] = LIT_CHAR_MINUS;\n  }\n\n  ecma_string_t *string_p;\n  string_p = ecma_new_ecma_string_from_utf8 (string_buffer_p + char_start_p, char_size_p - char_start_p);\n\n  jmem_heap_free_block (string_buffer_p, char_size_p);\n  return string_p;\n} /* ecma_bigint_to_string */\n\n/**\n * Get the size of zero digits from the result of ecma_bigint_number_to_digits\n */\n#define ECMA_BIGINT_NUMBER_TO_DIGITS_GET_ZERO_SIZE(value) \\\n  (((value) & 0xffff) * (uint32_t) sizeof (ecma_bigint_digit_t))\n\n/**\n * Get the number of digits from the result of ecma_bigint_number_to_digits\n */\n#define ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS(value) ((value) >> 20)\n\n/**\n * Get the size of digits from the result of ecma_bigint_number_to_digits\n */\n#define ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS_SIZE(value) \\\n  (ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS (value) * (uint32_t) sizeof (ecma_bigint_digit_t))\n\n/**\n * Set number of digits in the result of ecma_bigint_number_to_digits\n */\n#define ECMA_BIGINT_NUMBER_TO_DIGITS_SET_DIGITS(value) ((uint32_t) (value) << 20)\n\n/**\n * This flag is set when the number passed to ecma_bigint_number_to_digits has fraction part\n */\n#define ECMA_BIGINT_NUMBER_TO_DIGITS_HAS_FRACTION 0x10000\n\n/**\n * Convert a number to maximum of 3 digits and left shift\n *\n * @return packed value, ECMA_BIGINT_NUMBER_TO_DIGITS* macros can be used to decode it\n */\nstatic uint32_t\necma_bigint_number_to_digits (ecma_number_t number, /**< ecma number */\n                              ecma_bigint_digit_t *digits_p) /**< [out] BigInt digits */\n{\n  uint32_t biased_exp;\n  uint64_t fraction;\n\n  ecma_number_unpack (number, NULL, &biased_exp, &fraction);\n\n  if (biased_exp == 0 && fraction == 0)\n  {\n    /* Number is zero. */\n    return ECMA_BIGINT_NUMBER_TO_DIGITS_SET_DIGITS (0);\n  }\n\n  if (biased_exp < ((1 << (ECMA_NUMBER_BIASED_EXP_WIDTH - 1)) - 1))\n  {\n    /* Number is less than 1. */\n    return ECMA_BIGINT_NUMBER_TO_DIGITS_SET_DIGITS (0) | ECMA_BIGINT_NUMBER_TO_DIGITS_HAS_FRACTION;\n  }\n\n  biased_exp -= ((1 << (ECMA_NUMBER_BIASED_EXP_WIDTH - 1)) - 1);\n  fraction |= ((uint64_t) 1) << ECMA_NUMBER_FRACTION_WIDTH;\n\n  if (biased_exp <= ECMA_NUMBER_FRACTION_WIDTH)\n  {\n    uint32_t has_fraction = 0;\n\n    if (biased_exp < ECMA_NUMBER_FRACTION_WIDTH\n        && (fraction << (biased_exp + ((8 * sizeof (uint64_t)) - ECMA_NUMBER_FRACTION_WIDTH))) != 0)\n    {\n      has_fraction |= ECMA_BIGINT_NUMBER_TO_DIGITS_HAS_FRACTION;\n    }\n\n    fraction >>= ECMA_NUMBER_FRACTION_WIDTH - biased_exp;\n    digits_p[0] = (ecma_bigint_digit_t) fraction;\n\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n    digits_p[1] = (ecma_bigint_digit_t) (fraction >> (8 * sizeof (ecma_bigint_digit_t)));\n    return ECMA_BIGINT_NUMBER_TO_DIGITS_SET_DIGITS (digits_p[1] == 0 ? 1 : 2) | has_fraction;\n#else /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n    return ECMA_BIGINT_NUMBER_TO_DIGITS_SET_DIGITS (1) | has_fraction;\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n  }\n\n  digits_p[0] = (ecma_bigint_digit_t) fraction;\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  digits_p[1] = (ecma_bigint_digit_t) (fraction >> (8 * sizeof (ecma_bigint_digit_t)));\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n  biased_exp -= ECMA_NUMBER_FRACTION_WIDTH;\n\n  uint32_t shift_left = biased_exp & ((8 * sizeof (ecma_bigint_digit_t)) - 1);\n  biased_exp = biased_exp >> ECMA_BIGINT_DIGIT_SHIFT;\n\n  if (shift_left == 0)\n  {\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n    return biased_exp | ECMA_BIGINT_NUMBER_TO_DIGITS_SET_DIGITS (2);\n#else /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n    return biased_exp | ECMA_BIGINT_NUMBER_TO_DIGITS_SET_DIGITS (1);\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n  }\n\n  uint32_t shift_right = (1 << ECMA_BIGINT_DIGIT_SHIFT) - shift_left;\n\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  digits_p[2] = digits_p[1] >> shift_right;\n  digits_p[1] = (digits_p[1] << shift_left) | (digits_p[0] >> shift_right);\n  digits_p[0] <<= shift_left;\n\n  return biased_exp | ECMA_BIGINT_NUMBER_TO_DIGITS_SET_DIGITS (digits_p[2] == 0 ? 2 : 3);\n#else /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n  digits_p[1] = digits_p[0] >> shift_right;\n  digits_p[0] <<= shift_left;\n\n  return biased_exp | ECMA_BIGINT_NUMBER_TO_DIGITS_SET_DIGITS (digits_p[1] == 0 ? 1 : 2);\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n} /* ecma_bigint_number_to_digits */\n\n/**\n * Convert an ecma number to BigInt value\n *\n * See also:\n *          ECMA-262 v11, 20.2.1.1.1\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_bigint_number_to_bigint (ecma_number_t number) /**< ecma number */\n{\n  if (ecma_number_is_nan (number) || ecma_number_is_infinity (number))\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Infinity or NaN cannot be converted to BigInt\"));\n  }\n\n  ecma_bigint_digit_t digits[3];\n  uint32_t result = ecma_bigint_number_to_digits (number, digits);\n\n  JERRY_ASSERT (ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS (result) == 0\n                || digits[ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS (result) - 1] > 0);\n\n  if (result & ECMA_BIGINT_NUMBER_TO_DIGITS_HAS_FRACTION)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Only integer numbers can be converted to BigInt\"));\n  }\n\n  uint32_t digits_size = ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS_SIZE (result);\n\n  if (digits_size == 0)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  uint32_t zero_size = ECMA_BIGINT_NUMBER_TO_DIGITS_GET_ZERO_SIZE (result);\n\n  ecma_extended_primitive_t *result_p = ecma_bigint_create (digits_size + zero_size);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  uint8_t *data_p = (uint8_t *) ECMA_BIGINT_GET_DIGITS (result_p, 0);\n  memset (data_p, 0, zero_size);\n  memcpy (data_p + zero_size, digits, digits_size);\n\n  if (number < 0)\n  {\n    result_p->u.bigint_sign_and_size |= ECMA_BIGINT_SIGN;\n  }\n\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_number_to_bigint */\n\n/**\n * Convert a value to BigInt value\n *\n * See also:\n *          ECMA-262 v11, 7.1.13\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_to_bigint (ecma_value_t value, /**< any value */\n                       bool allow_numbers) /**< converting ecma numbers is allowed */\n{\n  bool free_value = false;\n\n  if (ecma_is_value_object (value))\n  {\n    value = ecma_op_object_default_value (ecma_get_object_from_value (value), ECMA_PREFERRED_TYPE_NUMBER);\n    free_value = true;\n\n    if (ECMA_IS_VALUE_ERROR (value))\n    {\n      return value;\n    }\n  }\n\n  ecma_value_t result;\n\n  if (ecma_is_value_string (value))\n  {\n    result = ecma_bigint_parse_string_value (value, ECMA_BIGINT_PARSE_NO_OPTIONS);\n  }\n  else if (ecma_is_value_bigint (value))\n  {\n    result = value;\n\n    if (!free_value && value != ECMA_BIGINT_ZERO)\n    {\n      ecma_ref_extended_primitive (ecma_get_extended_primitive_from_value (value));\n    }\n    else\n    {\n      free_value = false;\n    }\n  }\n  else if (allow_numbers && ecma_is_value_number (value))\n  {\n    result = ecma_bigint_number_to_bigint (ecma_get_number_from_value (value));\n  }\n  else if (ecma_is_value_false (value))\n  {\n    result = ECMA_BIGINT_ZERO;\n  }\n  else if (ecma_is_value_true (value))\n  {\n    result = ecma_bigint_create_from_digit (1, false);\n  }\n  else\n  {\n    result = ecma_raise_type_error (ECMA_ERR_MSG (\"Value cannot be converted to BigInt\"));\n  }\n\n  if (free_value)\n  {\n    ecma_free_value (value);\n  }\n\n  return result;\n} /* ecma_bigint_to_bigint */\n\n/**\n * Convert a BigInt value to number value\n *\n * @return ecma number value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_to_number (ecma_value_t value) /**< BigInt value */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (value));\n\n  if (value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_make_integer_value (0);\n  }\n\n  ecma_extended_primitive_t *value_p = ecma_get_extended_primitive_from_value (value);\n  uint32_t size = ECMA_BIGINT_GET_SIZE (value_p);\n  ecma_bigint_digit_t *digits_p = ECMA_BIGINT_GET_DIGITS (value_p, size);\n\n  if (size == sizeof (ecma_bigint_digit_t))\n  {\n    if (!(value_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n    {\n      if (digits_p[-1] <= ECMA_INTEGER_NUMBER_MAX)\n      {\n        return ecma_make_integer_value ((ecma_integer_value_t) digits_p[-1]);\n      }\n    }\n    else if (digits_p[-1] <= -ECMA_INTEGER_NUMBER_MIN)\n    {\n      return ecma_make_integer_value (-(ecma_integer_value_t) digits_p[-1]);\n    }\n  }\n\n  uint64_t fraction = 0;\n  ecma_bigint_digit_t shift_left;\n\n  if (digits_p[-1] == 1)\n  {\n    JERRY_ASSERT (size > sizeof (ecma_bigint_digit_t));\n\n    fraction = ((uint64_t) digits_p[-2]) << (8 * sizeof (ecma_bigint_digit_t));\n    shift_left = (uint32_t) (8 * sizeof (ecma_bigint_digit_t));\n\n    if (size >= 3 * sizeof (ecma_bigint_digit_t))\n    {\n      fraction |= (uint64_t) digits_p[-3];\n    }\n  }\n  else\n  {\n    shift_left = ecma_big_uint_count_leading_zero (digits_p[-1]) + 1;\n\n    fraction = ((uint64_t) digits_p[-1]) << (8 * sizeof (ecma_bigint_digit_t) + shift_left);\n\n    if (size >= 2 * sizeof (ecma_bigint_digit_t))\n    {\n      fraction |= ((uint64_t) digits_p[-2]) << shift_left;\n    }\n\n    if (size >= 3 * sizeof (ecma_bigint_digit_t))\n    {\n      fraction |= ((uint64_t) digits_p[-3]) >> (8 * sizeof (ecma_bigint_digit_t) - shift_left);\n    }\n  }\n\n  uint32_t biased_exp = (uint32_t) (((1 << (ECMA_NUMBER_BIASED_EXP_WIDTH - 1)) - 1) + (size * 8 - shift_left));\n\n  /* Rounding result. */\n  const uint64_t rounding_bit = (((uint64_t) 1) << (8 * sizeof (uint64_t) - ECMA_NUMBER_FRACTION_WIDTH - 1));\n  bool round_up = false;\n\n  if (fraction & rounding_bit)\n  {\n    round_up = true;\n\n    /* IEEE_754 roundTiesToEven mode: when rounding_bit is set, and all the remaining bits\n     * are zero, the number needs to be rounded down the bit before rounding_bit is zero. */\n    if ((fraction & ((rounding_bit << 2) - 1)) == rounding_bit)\n    {\n      round_up = false;\n\n      if ((size >= (3 * sizeof (ecma_bigint_digit_t)))\n          && (shift_left == (8 * sizeof (ecma_bigint_digit_t))\n              || (digits_p[-3] & ((((ecma_bigint_digit_t) 1) << shift_left) - 1)) == 0))\n      {\n        ecma_bigint_digit_t *digits_start_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n\n        digits_p -= 3;\n\n        while (digits_p > digits_start_p)\n        {\n          if (digits_p[-1] != 0)\n          {\n            round_up = true;\n            break;\n          }\n          digits_p--;\n        }\n      }\n    }\n  }\n\n  if (round_up)\n  {\n    fraction += rounding_bit;\n    fraction >>= (8 * sizeof (uint64_t) - ECMA_NUMBER_FRACTION_WIDTH);\n\n    if (fraction == 0)\n    {\n      biased_exp++;\n    }\n  }\n  else\n  {\n    fraction >>= (8 * sizeof (uint64_t) - ECMA_NUMBER_FRACTION_WIDTH);\n  }\n\n  bool sign = (value_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN);\n  ecma_number_t result;\n\n  if (biased_exp < (1u << ECMA_NUMBER_BIASED_EXP_WIDTH) - 1)\n  {\n    result = ecma_number_pack (sign, biased_exp, fraction);\n  }\n  else\n  {\n    result = ecma_number_make_infinity (sign);\n  }\n\n  return ecma_make_number_value (result);\n} /* ecma_bigint_to_number */\n\n/**\n * Returns with a BigInt if the value is BigInt,\n * or the value is object, and its default value is BigInt\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_get_bigint (ecma_value_t value, /**< any value */\n                        bool *free_result_p) /**< [out] result should be freed */\n{\n  *free_result_p = false;\n\n  if (ecma_is_value_bigint (value))\n  {\n    return value;\n  }\n\n  if (ecma_is_value_object (value))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (value);\n    ecma_value_t default_value = ecma_op_object_default_value (object_p, ECMA_PREFERRED_TYPE_NUMBER);\n\n    if (ECMA_IS_VALUE_ERROR (default_value))\n    {\n      return default_value;\n    }\n\n    if (ecma_is_value_bigint (default_value))\n    {\n      *free_result_p = (default_value != ECMA_BIGINT_ZERO);\n      return default_value;\n    }\n\n    ecma_free_value (default_value);\n  }\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot convert a BigInt value to a number\"));\n} /* ecma_bigint_get_bigint */\n\n/**\n * Create BigInt value from uint64 digits\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_create_from_digits (const uint64_t *digits_p, /**< BigInt digits */\n                                uint32_t size, /**< number of BigInt digits */\n                                bool sign) /**< sign bit, true if the result should be negative */\n{\n  const uint64_t *digits_end_p = digits_p + size;\n\n  while (digits_end_p > digits_p && digits_end_p[-1] == 0)\n  {\n    digits_end_p--;\n  }\n\n  if (digits_p == digits_end_p)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  size = (uint32_t) (digits_end_p - digits_p);\n\n  if (size < ECMA_BIGINT_MAX_SIZE)\n  {\n    size *= (uint32_t) sizeof (uint64_t);\n  }\n\n  if ((digits_end_p[-1] >> (8 * sizeof (ecma_bigint_digit_t))) == 0)\n  {\n    size -= (uint32_t) sizeof (ecma_bigint_digit_t);\n  }\n\n  ecma_extended_primitive_t *result_value_p = ecma_bigint_create (size);\n\n  if (JERRY_UNLIKELY (result_value_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  if (sign)\n  {\n    result_value_p->u.bigint_sign_and_size |= ECMA_BIGINT_SIGN;\n  }\n\n  ecma_bigint_digit_t *result_p = ECMA_BIGINT_GET_DIGITS (result_value_p, 0);\n\n  while (digits_p < digits_end_p)\n  {\n    uint64_t digit = *digits_p++;\n\n    result_p[0] = (ecma_bigint_digit_t) digit;\n    result_p[1] = (ecma_bigint_digit_t) (digit >> (8 * sizeof (ecma_bigint_digit_t)));\n    result_p+= 2;\n  }\n\n  return ecma_make_extended_primitive_value (result_value_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_create_from_digits */\n\n/**\n * Get the number of uint64 digits of a BigInt value\n *\n * @return number of uint64 digits\n */\nuint32_t\necma_bigint_get_size_in_digits (ecma_value_t value) /**< BigInt value */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (value));\n\n  if (value == ECMA_BIGINT_ZERO)\n  {\n    return 0;\n  }\n\n  ecma_extended_primitive_t *value_p = ecma_get_extended_primitive_from_value (value);\n  uint32_t size = ECMA_BIGINT_GET_SIZE (value_p);\n\n  return (size + (uint32_t) sizeof (ecma_bigint_digit_t)) / sizeof (uint64_t);\n} /* ecma_bigint_get_size_in_digits */\n\n/**\n * Get the uint64 digits of a BigInt value\n */\nvoid\necma_bigint_get_digits_and_sign (ecma_value_t value, /**< BigInt value */\n                                 uint64_t *digits_p, /**< [out] buffer for digits */\n                                 uint32_t size, /**< buffer size in digits */\n                                 bool *sign_p) /**< [out] sign of BigInt */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (value));\n\n  if (value == ECMA_BIGINT_ZERO)\n  {\n    if (sign_p != NULL)\n    {\n      *sign_p = false;\n    }\n    memset (digits_p, 0, size * sizeof (uint64_t));\n    return;\n  }\n\n  ecma_extended_primitive_t *value_p = ecma_get_extended_primitive_from_value (value);\n\n  if (sign_p != NULL)\n  {\n    *sign_p = (value_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN) != 0;\n  }\n\n  uint32_t bigint_size = ECMA_BIGINT_GET_SIZE (value_p);\n  uint32_t copy_size = bigint_size / sizeof (uint64_t);\n\n  if (copy_size > size)\n  {\n    copy_size = size;\n  }\n\n  const uint64_t *digits_end_p = digits_p + copy_size;\n  ecma_bigint_digit_t *source_p = ECMA_BIGINT_GET_DIGITS (value_p, 0);\n\n  while (digits_p < digits_end_p)\n  {\n    *digits_p++ = source_p[0] | (((uint64_t) source_p[1]) << (8 * sizeof (ecma_bigint_digit_t)));\n    source_p += 2;\n  }\n\n  size -= copy_size;\n\n  if (size == 0)\n  {\n    return;\n  }\n\n  if (ECMA_BIGINT_SIZE_IS_ODD (bigint_size))\n  {\n    *digits_p++ = source_p[0];\n    size--;\n  }\n\n  if (size > 0)\n  {\n    memset (digits_p, 0, size * sizeof (uint64_t));\n  }\n} /* ecma_bigint_get_digits_and_sign */\n\n/**\n * Compare two BigInt values\n *\n * @return true if they are the same, false otherwise\n */\nbool\necma_bigint_is_equal_to_bigint (ecma_value_t left_value, /**< left BigInt value */\n                                ecma_value_t right_value) /**< right BigInt value */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (left_value) && ecma_is_value_bigint (right_value));\n\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    return right_value == ECMA_BIGINT_ZERO;\n  }\n  else if (right_value == ECMA_BIGINT_ZERO)\n  {\n    return false;\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n\n  if (left_p->u.bigint_sign_and_size != right_p->u.bigint_sign_and_size)\n  {\n    return false;\n  }\n\n  uint32_t size = ECMA_BIGINT_GET_SIZE (left_p);\n  return memcmp (ECMA_BIGINT_GET_DIGITS (left_p, 0), ECMA_BIGINT_GET_DIGITS (right_p, 0), size) == 0;\n} /* ecma_bigint_is_equal_to_bigint */\n\n/**\n * Compare a BigInt value and a number\n *\n * @return true if they are the same, false otherwise\n */\nbool\necma_bigint_is_equal_to_number (ecma_value_t left_value, /**< left BigInt value */\n                                ecma_number_t right_value) /**< right number value */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (left_value));\n\n  if (ecma_number_is_nan (right_value) || ecma_number_is_infinity (right_value))\n  {\n    return false;\n  }\n\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    return right_value == 0;\n  }\n\n  ecma_extended_primitive_t *left_value_p = ecma_get_extended_primitive_from_value (left_value);\n\n  /* Sign must be the same. */\n  if (left_value_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN)\n  {\n    if (right_value > 0)\n    {\n      return false;\n    }\n  }\n  else if (right_value < 0)\n  {\n    return false;\n  }\n\n  ecma_bigint_digit_t digits[3];\n  uint32_t result = ecma_bigint_number_to_digits (right_value, digits);\n\n  JERRY_ASSERT (ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS (result) == 0\n                || digits[ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS (result) - 1] > 0);\n\n  if (result & ECMA_BIGINT_NUMBER_TO_DIGITS_HAS_FRACTION)\n  {\n    return false;\n  }\n\n  uint32_t digits_size = ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS_SIZE (result);\n  uint32_t zero_size = ECMA_BIGINT_NUMBER_TO_DIGITS_GET_ZERO_SIZE (result);\n\n  if (ECMA_BIGINT_GET_SIZE (left_value_p) != digits_size + zero_size)\n  {\n    return false;\n  }\n\n  ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n  ecma_bigint_digit_t *left_end_p = (ecma_bigint_digit_t *) (((uint8_t *) left_p) + zero_size);\n\n  /* Check value bits first. */\n  if (memcmp (left_end_p, digits, digits_size) != 0)\n  {\n    return false;\n  }\n\n  while (left_p < left_end_p)\n  {\n    if (*left_p++ != 0)\n    {\n      return false;\n    }\n  }\n\n  return true;\n} /* ecma_bigint_is_equal_to_number */\n\n/**\n * Convert 0 to 1, and 1 to -1. Useful for getting sign.\n */\n#define ECMA_BIGINT_TO_SIGN(value) (1 - (((int) (value)) << 1))\n\n/**\n * Convert 0 to -1, and 1 to 1. Useful for getting negated sign.\n */\n#define ECMA_BIGINT_TO_NEGATED_SIGN(value) (-1 + (((int) (value)) << 1))\n\n/**\n * Compare two BigInt values\n *\n * return -1, if left value < right value, 0 if they are equal, 1 otherwise\n */\nint\necma_bigint_compare_to_bigint (ecma_value_t left_value, /**< left BigInt value */\n                               ecma_value_t right_value) /**< right BigInt value */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (left_value) && ecma_is_value_bigint (right_value));\n\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    if (right_value == ECMA_BIGINT_ZERO)\n    {\n      return 0;\n    }\n\n    ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n    return ECMA_BIGINT_TO_NEGATED_SIGN (right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN);\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n  uint32_t left_sign = left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN;\n\n  if (right_value == ECMA_BIGINT_ZERO)\n  {\n    return ECMA_BIGINT_TO_SIGN (left_sign);\n  }\n\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n  uint32_t right_sign = right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN;\n\n  if ((left_sign ^ right_sign) != 0)\n  {\n    return ECMA_BIGINT_TO_SIGN (left_sign);\n  }\n\n  if (left_sign == 0)\n  {\n    return ecma_big_uint_compare (left_p, right_p);\n  }\n\n  return -ecma_big_uint_compare (left_p, right_p);\n} /* ecma_bigint_compare_to_bigint */\n\n/**\n * Compare a BigInt value and a number\n *\n * return -1, if left value < right value, 0 if they are equal, 1 otherwise\n */\nint\necma_bigint_compare_to_number (ecma_value_t left_value, /**< left BigInt value */\n                               ecma_number_t right_value) /**< right number value */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (left_value));\n  JERRY_ASSERT (!ecma_number_is_nan (right_value));\n\n  int right_invert_sign = ECMA_BIGINT_TO_SIGN (right_value > 0);\n\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    if (right_value == 0)\n    {\n      return 0;\n    }\n\n    return right_invert_sign;\n  }\n\n  ecma_extended_primitive_t *left_value_p = ecma_get_extended_primitive_from_value (left_value);\n  int left_sign = ECMA_BIGINT_TO_SIGN (left_value_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN);\n\n  if (right_value == 0 || left_sign == right_invert_sign)\n  {\n    /* Second condition: a positive BigInt is always greater than any negative number, and the opposite is true. */\n    return left_sign;\n  }\n\n  if (ecma_number_is_infinity (right_value))\n  {\n    /* Infinity is always bigger than any BigInt number. */\n    return right_invert_sign;\n  }\n\n  ecma_bigint_digit_t digits[3];\n  uint32_t result = ecma_bigint_number_to_digits (right_value, digits);\n\n  JERRY_ASSERT (ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS (result) == 0\n                || digits[ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS (result) - 1] > 0);\n\n  uint32_t digits_size = ECMA_BIGINT_NUMBER_TO_DIGITS_GET_DIGITS_SIZE (result);\n\n  if (digits_size == 0)\n  {\n    JERRY_ASSERT (result & ECMA_BIGINT_NUMBER_TO_DIGITS_HAS_FRACTION);\n    /* The number is between [-1 .. 1] exclusive. */\n    return left_sign;\n  }\n\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_value_p);\n  uint32_t right_size = digits_size + ECMA_BIGINT_NUMBER_TO_DIGITS_GET_ZERO_SIZE (result);\n\n  if (left_size != right_size)\n  {\n    return left_size > right_size ? left_sign : -left_sign;\n  }\n\n  ecma_bigint_digit_t *left_p = ECMA_BIGINT_GET_DIGITS (left_value_p, right_size);\n  ecma_bigint_digit_t *left_end_p = (ecma_bigint_digit_t *) (((uint8_t *) left_p) - digits_size);\n  ecma_bigint_digit_t *digits_p = (ecma_bigint_digit_t *) (((uint8_t *) digits) + digits_size);\n\n  do\n  {\n    ecma_bigint_digit_t left = *(--left_p);\n    ecma_bigint_digit_t right = *(--digits_p);\n\n    if (left != right)\n    {\n      return left > right ? left_sign : -left_sign;\n    }\n  }\n  while (left_p > left_end_p);\n\n  left_end_p = ECMA_BIGINT_GET_DIGITS (left_value_p, 0);\n\n  while (left_p > left_end_p)\n  {\n    if (*(--left_p) != 0)\n    {\n      return left_sign;\n    }\n  }\n\n  return (result & ECMA_BIGINT_NUMBER_TO_DIGITS_HAS_FRACTION) ? -left_sign : 0;\n} /* ecma_bigint_compare_to_number */\n\n#undef ECMA_BIGINT_TO_SIGN\n\n/**\n * Negate a non-zero BigInt value\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_negate (ecma_extended_primitive_t *value_p) /**< BigInt value */\n{\n  uint32_t size = ECMA_BIGINT_GET_SIZE (value_p);\n\n  JERRY_ASSERT (size > 0 && ECMA_BIGINT_GET_LAST_DIGIT (value_p, size) != 0);\n\n  ecma_extended_primitive_t *result_p = ecma_bigint_create (size);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  memcpy (result_p + 1, value_p + 1, size);\n  result_p->refs_and_type = ECMA_EXTENDED_PRIMITIVE_REF_ONE | ECMA_TYPE_BIGINT;\n  result_p->u.bigint_sign_and_size = value_p->u.bigint_sign_and_size ^ ECMA_BIGINT_SIGN;\n\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_negate */\n\n/**\n * Invert all bits of a BigInt value\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_unary (ecma_value_t value, /**< BigInt value */\n                   ecma_bigint_unary_operation_type type) /**< type of unary operation */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (value));\n\n  if (value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_bigint_create_from_digit (1, type != ECMA_BIGINT_UNARY_INCREASE);\n  }\n\n  ecma_extended_primitive_t *value_p = ecma_get_extended_primitive_from_value (value);\n\n  uint32_t sign = (type != ECMA_BIGINT_UNARY_DECREASE) ? ECMA_BIGINT_SIGN : 0;\n\n  if ((value_p->u.bigint_sign_and_size == (uint32_t) (sizeof (ecma_bigint_digit_t) | sign))\n      && *ECMA_BIGINT_GET_DIGITS (value_p, 0) == 1)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  ecma_extended_primitive_t *result_p;\n\n  if ((value_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN) == (sign ^ ECMA_BIGINT_SIGN))\n  {\n    result_p = ecma_big_uint_increase (value_p);\n\n    if (type != ECMA_BIGINT_UNARY_INCREASE && result_p != NULL)\n    {\n      result_p->u.bigint_sign_and_size |= ECMA_BIGINT_SIGN;\n    }\n  }\n  else\n  {\n    result_p = ecma_big_uint_decrease (value_p);\n\n    if (type == ECMA_BIGINT_UNARY_INCREASE && result_p != NULL)\n    {\n      result_p->u.bigint_sign_and_size |= ECMA_BIGINT_SIGN;\n    }\n  }\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_unary */\n\n/**\n * Add/subtract right BigInt value to/from left BigInt value\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_add_sub (ecma_value_t left_value, /**< left BigInt value */\n                     ecma_value_t right_value, /**< right BigInt value */\n                     bool is_add) /**< true if add operation should be performed */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (left_value) && ecma_is_value_bigint (right_value));\n\n  if (right_value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_copy_value (left_value);\n  }\n\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    if (!is_add)\n    {\n      return ecma_bigint_negate (right_p);\n    }\n\n    ecma_ref_extended_primitive (right_p);\n    return right_value;\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n  uint32_t sign = is_add ? 0 : ECMA_BIGINT_SIGN;\n\n  if (((left_p->u.bigint_sign_and_size ^ right_p->u.bigint_sign_and_size) & ECMA_BIGINT_SIGN) == sign)\n  {\n    ecma_extended_primitive_t *result_p = ecma_big_uint_add (left_p, right_p);\n\n    if (JERRY_UNLIKELY (result_p == NULL))\n    {\n      return ecma_bigint_raise_memory_error ();\n    }\n\n    result_p->u.bigint_sign_and_size |= left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN;\n    return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n  }\n\n  int compare_result = ecma_big_uint_compare (left_p, right_p);\n  ecma_extended_primitive_t *result_p;\n\n  if (compare_result == 0)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  if (compare_result > 0)\n  {\n    sign = left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN;\n    result_p = ecma_big_uint_sub (left_p, right_p);\n  }\n  else\n  {\n    sign = right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN;\n\n    if (!is_add)\n    {\n      sign ^= ECMA_BIGINT_SIGN;\n    }\n\n    result_p = ecma_big_uint_sub (right_p, left_p);\n  }\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  result_p->u.bigint_sign_and_size |= sign;\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_add_sub */\n\n/**\n * Multiply two BigInt values\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_mul (ecma_value_t left_value, /**< left BigInt value */\n                 ecma_value_t right_value) /**< right BigInt value */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (left_value) && ecma_is_value_bigint (right_value));\n\n  if (left_value == ECMA_BIGINT_ZERO || right_value == ECMA_BIGINT_ZERO)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n  uint32_t left_size = ECMA_BIGINT_GET_SIZE (left_p);\n  uint32_t right_size = ECMA_BIGINT_GET_SIZE (right_p);\n\n  if (left_size == sizeof (ecma_bigint_digit_t)\n      && ECMA_BIGINT_GET_LAST_DIGIT (left_p, sizeof (ecma_bigint_digit_t)) == 1)\n  {\n    if (left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN)\n    {\n      return ecma_bigint_negate (right_p);\n    }\n\n    ecma_ref_extended_primitive (right_p);\n    return right_value;\n  }\n\n  if (right_size == sizeof (ecma_bigint_digit_t)\n      && ECMA_BIGINT_GET_LAST_DIGIT (right_p, sizeof (ecma_bigint_digit_t)) == 1)\n  {\n    if (right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN)\n    {\n      return ecma_bigint_negate (left_p);\n    }\n\n    ecma_ref_extended_primitive (left_p);\n    return left_value;\n  }\n\n  ecma_extended_primitive_t *result_p = ecma_big_uint_mul (left_p, right_p);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  uint32_t sign = (left_p->u.bigint_sign_and_size ^ right_p->u.bigint_sign_and_size) & ECMA_BIGINT_SIGN;\n  result_p->u.bigint_sign_and_size |= sign;\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_mul */\n\n/**\n * Divide two BigInt values\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_div_mod (ecma_value_t left_value, /**< left BigInt value */\n                     ecma_value_t right_value, /**< right BigInt value */\n                     bool is_mod) /**< true if return with remainder */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (left_value) && ecma_is_value_bigint (right_value));\n\n  if (right_value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"BigInt division by zero\"));\n  }\n\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    return left_value;\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n\n  int compare_result = ecma_big_uint_compare (left_p, right_p);\n  ecma_extended_primitive_t *result_p;\n\n  if (compare_result < 0)\n  {\n    if (!is_mod)\n    {\n      return ECMA_BIGINT_ZERO;\n    }\n\n    ecma_ref_extended_primitive (left_p);\n    return left_value;\n  }\n  else if (compare_result == 0)\n  {\n    if (is_mod)\n    {\n      return ECMA_BIGINT_ZERO;\n    }\n\n    result_p = ecma_bigint_create (sizeof (ecma_bigint_digit_t));\n\n    if (result_p != NULL)\n    {\n      *ECMA_BIGINT_GET_DIGITS (result_p, 0) = 1;\n    }\n  }\n  else\n  {\n    result_p = ecma_big_uint_div_mod (left_p, right_p, is_mod);\n\n    if (result_p == ECMA_BIGINT_POINTER_TO_ZERO)\n    {\n      return ECMA_BIGINT_ZERO;\n    }\n  }\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  if (is_mod)\n  {\n    result_p->u.bigint_sign_and_size |= left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN;\n  }\n  else\n  {\n    uint32_t sign = (left_p->u.bigint_sign_and_size ^ right_p->u.bigint_sign_and_size) & ECMA_BIGINT_SIGN;\n    result_p->u.bigint_sign_and_size |= sign;\n  }\n\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_div_mod */\n\n/**\n * Shift left BigInt value to left or right\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_shift (ecma_value_t left_value, /**< left BigInt value */\n                   ecma_value_t right_value, /**< right BigInt value */\n                   bool is_left) /**< true if left shift operation should be performed */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (left_value) && ecma_is_value_bigint (right_value));\n\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n\n  if (right_value == ECMA_BIGINT_ZERO)\n  {\n    ecma_ref_extended_primitive (left_p);\n    return left_value;\n  }\n\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n\n  if (right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN)\n  {\n    is_left = !is_left;\n  }\n\n  if (ECMA_BIGINT_GET_SIZE (right_p) > sizeof (ecma_bigint_digit_t))\n  {\n    if (is_left)\n    {\n      return ecma_bigint_raise_memory_error ();\n    }\n    else if (left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN)\n    {\n      /* Shifting a negative value with a very big number to the right should be -1. */\n      return ecma_bigint_create_from_digit (1, true);\n    }\n\n    return ECMA_BIGINT_ZERO;\n  }\n\n  ecma_extended_primitive_t *result_p;\n  ecma_bigint_digit_t shift = ECMA_BIGINT_GET_LAST_DIGIT (right_p, sizeof (ecma_bigint_digit_t));\n  uint32_t left_sign = left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN;\n\n  if (is_left)\n  {\n    result_p = ecma_big_uint_shift_left (left_p, shift);\n  }\n  else\n  {\n    /* -x >> y == ~(x - 1) >> y == ~((x - 1) >> y) == -(((x - 1) >> y) + 1)\n     * When a non-zero bit is shifted out: (x - 1) >> y == x >> y, so the formula is -((x >> y) + 1)\n     * When only zero bits are shifted out: (((x - 1) >> y) + 1) == x >> y so the formula is: -(x >> y) */\n    result_p = ecma_big_uint_shift_right (left_p, shift, left_sign != 0);\n\n    if (result_p == ECMA_BIGINT_POINTER_TO_ZERO)\n    {\n      return ECMA_BIGINT_ZERO;\n    }\n  }\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  result_p->u.bigint_sign_and_size |= left_sign;\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_shift */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Compute the left value raised to the power of right value\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_pow (ecma_value_t left_value, /**< left BigInt value */\n                 ecma_value_t right_value) /**< right BigInt value */\n{\n  JERRY_ASSERT (ecma_is_value_bigint (left_value) && ecma_is_value_bigint (right_value));\n\n  if (right_value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_bigint_create_from_digit (1, false);\n  }\n\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n\n  if (right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Negative exponent is not allowed for BigInts\"));\n  }\n\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n  ecma_bigint_digit_t base = 0;\n\n  if (ECMA_BIGINT_GET_SIZE (left_p) == sizeof (ecma_bigint_digit_t))\n  {\n    base = *ECMA_BIGINT_GET_DIGITS (left_p, 0);\n\n    JERRY_ASSERT (base != 0);\n\n    if (base == 1)\n    {\n      if (!(left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN)\n          || ECMA_BIGINT_NUMBER_IS_ODD (*ECMA_BIGINT_GET_DIGITS (right_p, 0)))\n      {\n        ecma_ref_extended_primitive (left_p);\n        return left_value;\n      }\n\n      return ecma_bigint_create_from_digit (1, false);\n    }\n  }\n\n  if (JERRY_UNLIKELY (ECMA_BIGINT_GET_SIZE (right_p) > sizeof (ecma_bigint_digit_t)))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  ecma_bigint_digit_t power = *ECMA_BIGINT_GET_DIGITS (right_p, 0);\n\n  if (power == 1)\n  {\n    ecma_ref_extended_primitive (left_p);\n    return left_value;\n  }\n\n  ecma_extended_primitive_t *result_p;\n\n  if (base == 2)\n  {\n    result_p = ecma_big_uint_shift_left (left_p, power - 1);\n  }\n  else\n  {\n    result_p = ecma_big_uint_pow (left_p, power);\n  }\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  if ((left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN) && ECMA_BIGINT_NUMBER_IS_ODD (power))\n  {\n    result_p->u.bigint_sign_and_size |= ECMA_BIGINT_SIGN;\n  }\n\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_pow */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Convert the result to an ecma value\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_bigint_bitwise_op (uint32_t operation_and_options, /**< bitwise operation type and options */\n                        ecma_extended_primitive_t *left_value_p, /**< left BigInt value */\n                        ecma_extended_primitive_t *right_value_p) /**< right BigInt value */\n{\n  ecma_extended_primitive_t *result_p;\n  result_p = ecma_big_uint_bitwise_op (operation_and_options, left_value_p, right_value_p);\n\n  if (JERRY_UNLIKELY (result_p == NULL))\n  {\n    return ecma_bigint_raise_memory_error ();\n  }\n\n  if (result_p == ECMA_BIGINT_POINTER_TO_ZERO)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  if (operation_and_options & ECMA_BIG_UINT_BITWISE_INCREASE_RESULT)\n  {\n    result_p->u.bigint_sign_and_size |= ECMA_BIGINT_SIGN;\n  }\n\n  return ecma_make_extended_primitive_value (result_p, ECMA_TYPE_BIGINT);\n} /* ecma_bigint_bitwise_op */\n\n/**\n * Perform bitwise 'and' operations on two BigUInt numbers\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_and (ecma_value_t left_value, /**< left BigInt value */\n                 ecma_value_t right_value) /**< right BigInt value */\n{\n  if (left_value == ECMA_BIGINT_ZERO || right_value == ECMA_BIGINT_ZERO)\n  {\n    return ECMA_BIGINT_ZERO;\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n\n  if (!(left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n  {\n    if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n    {\n      return ecma_bigint_bitwise_op (ECMA_BIG_UINT_BITWISE_AND, left_p, right_p);\n    }\n\n    /* x & (-y) == x & ~(y-1) == x &~ (y-1) */\n    uint32_t operation_and_options = ECMA_BIG_UINT_BITWISE_AND_NOT | ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT;\n    return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);\n  }\n\n  if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n  {\n    /* (-x) & y == ~(x-1) & y == y &~ (x-1) */\n    uint32_t operation_and_options = ECMA_BIG_UINT_BITWISE_AND_NOT | ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT;\n    return ecma_bigint_bitwise_op (operation_and_options, right_p, left_p);\n  }\n\n  /* (-x) & (-y) == ~(x-1) & ~(y-1) == ~((x-1) | (y-1)) == -(((x-1) | (y-1)) + 1) */\n  uint32_t operation_and_options = (ECMA_BIG_UINT_BITWISE_OR\n                                    | ECMA_BIG_UINT_BITWISE_DECREASE_BOTH\n                                    | ECMA_BIG_UINT_BITWISE_INCREASE_RESULT);\n  return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);\n} /* ecma_bigint_and */\n\n/**\n * Perform bitwise 'or' operations on two BigUInt numbers\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_or (ecma_value_t left_value, /**< left BigInt value */\n                ecma_value_t right_value) /**< right BigInt value */\n{\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_copy_value (right_value);\n  }\n\n  if (right_value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_copy_value (left_value);\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n\n  if (!(left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n  {\n    if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n    {\n      return ecma_bigint_bitwise_op (ECMA_BIG_UINT_BITWISE_OR, left_p, right_p);\n    }\n\n    /* x | (-y) == x | ~(y-1) == ~((y-1) &~ x) == -(((y-1) &~ x) + 1) */\n    uint32_t operation_and_options = (ECMA_BIG_UINT_BITWISE_AND_NOT\n                                      | ECMA_BIG_UINT_BITWISE_DECREASE_LEFT\n                                      | ECMA_BIG_UINT_BITWISE_INCREASE_RESULT);\n    return ecma_bigint_bitwise_op (operation_and_options, right_p, left_p);\n  }\n\n  if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n  {\n    /* (-x) | y == ~(x-1) | y == ~((x-1) &~ y) == -(((x-1) &~ y) + 1) */\n    uint32_t operation_and_options = (ECMA_BIG_UINT_BITWISE_AND_NOT\n                                      | ECMA_BIG_UINT_BITWISE_DECREASE_LEFT\n                                      | ECMA_BIG_UINT_BITWISE_INCREASE_RESULT);\n    return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);\n  }\n\n  /* (-x) | (-y) == ~(x-1) | ~(y-1) == ~((x-1) & (y-1)) = -(((x-1) & (y-1)) + 1) */\n  uint32_t operation_and_options = (ECMA_BIG_UINT_BITWISE_AND\n                                    | ECMA_BIG_UINT_BITWISE_DECREASE_BOTH\n                                    | ECMA_BIG_UINT_BITWISE_INCREASE_RESULT);\n  return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);\n} /* ecma_bigint_or */\n\n/**\n * Perform bitwise 'xor' operations on two BigUInt numbers\n *\n * @return ecma BigInt value or ECMA_VALUE_ERROR\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_bigint_xor (ecma_value_t left_value, /**< left BigInt value */\n                 ecma_value_t right_value) /**< right BigInt value */\n{\n  if (left_value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_copy_value (right_value);\n  }\n\n  if (right_value == ECMA_BIGINT_ZERO)\n  {\n    return ecma_copy_value (left_value);\n  }\n\n  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);\n  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);\n\n  if (!(left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n  {\n    if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n    {\n      return ecma_bigint_bitwise_op (ECMA_BIG_UINT_BITWISE_XOR, left_p, right_p);\n    }\n\n    /* x ^ (-y) == x ^ ~(y-1) == ~(x ^ (y-1)) == -((x ^ (y-1)) + 1) */\n    uint32_t operation_and_options = (ECMA_BIG_UINT_BITWISE_XOR\n                                      | ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT\n                                      | ECMA_BIG_UINT_BITWISE_INCREASE_RESULT);\n    return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);\n  }\n\n  if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))\n  {\n    /* (-x) | y == ~(x-1) ^ y == ~((x-1) ^ y) == -(((x-1) ^ y) + 1) */\n    uint32_t operation_and_options = (ECMA_BIG_UINT_BITWISE_XOR\n                                      | ECMA_BIG_UINT_BITWISE_DECREASE_LEFT\n                                      | ECMA_BIG_UINT_BITWISE_INCREASE_RESULT);\n    return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);\n  }\n\n  /* (-x) ^ (-y) == ~(x-1) ^ ~(y-1) == (x-1) ^ (y-1) */\n  uint32_t operation_and_options = ECMA_BIG_UINT_BITWISE_XOR | ECMA_BIG_UINT_BITWISE_DECREASE_BOTH;\n  return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);\n} /* ecma_bigint_xor */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-bigint.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_BIG_INT_H\n#define ECMA_BIG_INT_H\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/**\n * Sign bit of a BigInt value. The number is negative, if this bit is set.\n */\n#define ECMA_BIGINT_SIGN 0x1\n\n/**\n * Flags for ecma_bigint_parse_string.\n */\ntypedef enum\n{\n  ECMA_BIGINT_PARSE_NO_OPTIONS = 0, /**< no options */\n  ECMA_BIGINT_PARSE_SET_NEGATIVE = (1 << 0), /**< return with a negative BigInt value */\n  ECMA_BIGINT_PARSE_DISALLOW_SYNTAX_ERROR = (1 << 1), /**< don't throw SyntaxError,\n                                                       *   return with ECMA_VALUE_FALSE */\n  ECMA_BIGINT_PARSE_DISALLOW_MEMORY_ERROR = (1 << 2), /**< don't throw out-of-memory error,\n                                                       *   return with ECMA_VALUE_NULL instead */\n  ECMA_BIGINT_PARSE_ALLOW_UNDERSCORE = (1 << 3),      /** allow parse underscore characters */\n} ecma_bigint_parse_string_options_t;\n\n/**\n * Types for unary operations\n */\ntypedef enum\n{\n  ECMA_BIGINT_UNARY_BITWISE_NOT, /**< bitwise not operation */\n  ECMA_BIGINT_UNARY_INCREASE, /**< increase operation */\n  ECMA_BIGINT_UNARY_DECREASE, /**< decrease operation */\n} ecma_bigint_unary_operation_type;\n\necma_value_t ecma_bigint_parse_string (const lit_utf8_byte_t *string_p, lit_utf8_size_t size,\n                                       uint32_t options);\necma_value_t ecma_bigint_parse_string_value (ecma_value_t string, uint32_t options);\necma_string_t *ecma_bigint_to_string (ecma_value_t value, ecma_bigint_digit_t radix);\necma_value_t ecma_bigint_to_bigint (ecma_value_t value, bool allow_numbers);\necma_value_t ecma_bigint_to_number (ecma_value_t value);\necma_value_t ecma_bigint_get_bigint (ecma_value_t value, bool *free_result_p);\necma_value_t ecma_bigint_create_from_digits (const uint64_t *digits_p, uint32_t size, bool sign);\nuint32_t ecma_bigint_get_size_in_digits (ecma_value_t value);\nvoid ecma_bigint_get_digits_and_sign (ecma_value_t value, uint64_t *digits_p, uint32_t size, bool *sign_p);\n\nbool ecma_bigint_is_equal_to_bigint (ecma_value_t left_value, ecma_value_t right_value);\nbool ecma_bigint_is_equal_to_number (ecma_value_t left_value, ecma_number_t right_value);\nint ecma_bigint_compare_to_bigint (ecma_value_t left_value, ecma_value_t right_value);\nint ecma_bigint_compare_to_number (ecma_value_t left_value, ecma_number_t right_value);\n\necma_value_t ecma_bigint_negate (ecma_extended_primitive_t *value_p);\necma_value_t ecma_bigint_unary (ecma_value_t value, ecma_bigint_unary_operation_type type);\necma_value_t ecma_bigint_add_sub (ecma_value_t left_value, ecma_value_t right_value, bool is_add);\necma_value_t ecma_bigint_mul (ecma_value_t left_value, ecma_value_t right_value);\necma_value_t ecma_bigint_div_mod (ecma_value_t left_value, ecma_value_t right_value, bool is_mod);\necma_value_t ecma_bigint_shift (ecma_value_t left_value, ecma_value_t right_value, bool is_left);\n#if ENABLED (JERRY_ESNEXT)\necma_value_t ecma_bigint_pow (ecma_value_t left_value, ecma_value_t right_value);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\necma_value_t ecma_bigint_and (ecma_value_t left_value, ecma_value_t right_value);\necma_value_t ecma_bigint_or (ecma_value_t left_value, ecma_value_t right_value);\necma_value_t ecma_bigint_xor (ecma_value_t left_value, ecma_value_t right_value);\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#endif /* ECMA_BIG_INT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-boolean-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jcontext.h\"\n#include \"ecma-alloc.h\"\n#include \"ecma-boolean-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-function-object.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabooleanobject ECMA Boolean object related routines\n * @{\n */\n\n/**\n * Boolean object creation operation.\n *\n * See also: ECMA-262 v5, 15.6.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boolean constructor */\n{\n  bool boolean_value = ecma_op_to_boolean (arg);\n  ecma_builtin_id_t proto_id;\n\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n  proto_id = ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE;\n#else /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n  proto_id = ECMA_BUILTIN_ID_OBJECT_PROTOTYPE;\n#endif /* !(ENABLED (JERRY_BUILTIN_BOOLEAN) */\n\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (proto_id);\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *new_target = JERRY_CONTEXT (current_new_target_p);\n  if (new_target)\n  {\n    prototype_obj_p = ecma_op_get_prototype_from_constructor (new_target, proto_id);\n\n    if (JERRY_UNLIKELY (prototype_obj_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                sizeof (ecma_extended_object_t),\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_BOOLEAN_UL;\n  ext_object_p->u.class_prop.u.value = ecma_make_boolean_value (boolean_value);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (new_target)\n  {\n    ecma_deref_object (prototype_obj_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ecma_make_object_value (object_p);\n} /* ecma_op_create_boolean_object */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-boolean-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_BOOLEAN_OBJECT_H\n#define ECMA_BOOLEAN_OBJECT_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmabooleanobject ECMA Boolean object related routines\n * @{\n */\n\necma_value_t ecma_op_create_boolean_object (ecma_value_t arg);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_BOOLEAN_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-comparison.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-bigint.h\"\n#include \"ecma-comparison.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-objects.h\"\n#include \"jrt.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmacomparison ECMA comparison\n * @{\n */\n\n/**\n * ECMA abstract equality comparison routine.\n *\n * See also: ECMA-262 v5, 11.9.3\n *\n * Note:\n *      This function might raise an exception, so the\n *      returned value must be freed with ecma_free_value.\n *\n * @return true - if values are equal,\n *         false - otherwise\n *         error - in case of any problems\n */\necma_value_t\necma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */\n                                   ecma_value_t y) /**< second operand */\n{\n  if (x == y)\n  {\n    return ECMA_VALUE_TRUE;\n  }\n\n  if (ecma_are_values_integer_numbers (x, y))\n  {\n    /* Note: the (x == y) comparison captures the true case. */\n    return ECMA_VALUE_FALSE;\n  }\n\n  if (ecma_is_value_number (x))\n  {\n    if (ecma_is_value_number (y))\n    {\n      /* 1.c */\n      ecma_number_t x_num = ecma_get_number_from_value (x);\n      ecma_number_t y_num = ecma_get_number_from_value (y);\n\n      bool is_x_equal_to_y = (x_num == y_num);\n\n#ifndef JERRY_NDEBUG\n      bool is_x_equal_to_y_check;\n\n      if (ecma_number_is_nan (x_num)\n          || ecma_number_is_nan (y_num))\n      {\n        is_x_equal_to_y_check = false;\n      }\n      else if (x_num == y_num\n               || (ecma_number_is_zero (x_num)\n                   && ecma_number_is_zero (y_num)))\n      {\n        is_x_equal_to_y_check = true;\n      }\n      else\n      {\n        is_x_equal_to_y_check = false;\n      }\n\n      JERRY_ASSERT (is_x_equal_to_y == is_x_equal_to_y_check);\n#endif /* !JERRY_NDEBUG */\n\n      return ecma_make_boolean_value (is_x_equal_to_y);\n    }\n\n    /* Swap values. */\n    x ^= y;\n    y ^= x;\n    x ^= y;\n  }\n\n  if (ecma_is_value_string (x))\n  {\n    if (ecma_is_value_string (y))\n    {\n      /* 1., d. */\n      ecma_string_t *x_str_p = ecma_get_string_from_value (x);\n      ecma_string_t *y_str_p = ecma_get_string_from_value (y);\n\n      bool is_equal = ecma_compare_ecma_strings (x_str_p, y_str_p);\n\n      return ecma_make_boolean_value (is_equal);\n    }\n\n    if (ecma_is_value_number (y))\n    {\n      /* 4. */\n      ecma_number_t num;\n      ecma_value_t x_num_value = ecma_op_to_number (x, &num);\n\n      if (ECMA_IS_VALUE_ERROR (x_num_value))\n      {\n        return x_num_value;\n      }\n      ecma_value_t num_value = ecma_make_number_value (num);\n      ecma_value_t compare_result = ecma_op_abstract_equality_compare (num_value, y);\n\n      ecma_free_value (num_value);\n      return compare_result;\n    }\n\n    /* Swap values. */\n    x ^= y;\n    y ^= x;\n    x ^= y;\n  }\n\n  if (ecma_is_value_boolean (y))\n  {\n    if (ecma_is_value_boolean (x))\n    {\n      /* 1., e. */\n      /* Note: the (x == y) comparison captures the true case. */\n      return ECMA_VALUE_FALSE;\n    }\n\n    /* 7. */\n    return ecma_op_abstract_equality_compare (x, ecma_make_integer_value (ecma_is_value_true (y) ? 1 : 0));\n  }\n\n  if (ecma_is_value_boolean (x))\n  {\n    /* 6. */\n    return ecma_op_abstract_equality_compare (ecma_make_integer_value (ecma_is_value_true (x) ? 1 : 0), y);\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (JERRY_UNLIKELY (ecma_is_value_bigint (x)))\n  {\n    if (ecma_is_value_bigint (y))\n    {\n      return ecma_make_boolean_value (ecma_bigint_is_equal_to_bigint (x, y));\n    }\n\n    if (ecma_is_value_string (y))\n    {\n      ecma_value_t bigint = ecma_bigint_parse_string_value (y, ECMA_BIGINT_PARSE_DISALLOW_SYNTAX_ERROR);\n\n      if (ECMA_IS_VALUE_ERROR (bigint)\n          || bigint == ECMA_VALUE_FALSE)\n      {\n        return bigint;\n      }\n\n      JERRY_ASSERT (ecma_is_value_bigint (bigint));\n\n      ecma_value_t result = ecma_make_boolean_value (ecma_bigint_is_equal_to_bigint (x, bigint));\n\n      ecma_free_value (bigint);\n      return result;\n    }\n\n    if (ecma_is_value_number (y))\n    {\n      return ecma_make_boolean_value (ecma_bigint_is_equal_to_number (x, ecma_get_number_from_value (y)));\n    }\n\n    /* Swap values. */\n    x ^= y;\n    y ^= x;\n    x ^= y;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  if (ecma_is_value_undefined (x)\n      || ecma_is_value_null (x))\n  {\n    /* 1. a., b. */\n    /* 2., 3. */\n    bool is_equal = ecma_is_value_undefined (y) || ecma_is_value_null (y);\n\n    return ecma_make_boolean_value (is_equal);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (ecma_is_value_symbol (x)))\n  {\n    if (!ecma_is_value_object (y))\n    {\n      return ECMA_VALUE_FALSE;\n    }\n\n    /* Swap values. */\n    x ^= y;\n    y ^= x;\n    x ^= y;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (ecma_is_value_object (x));\n\n  if (ecma_is_value_string (y)\n#if ENABLED (JERRY_ESNEXT)\n      || ecma_is_value_symbol (y)\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n      || ecma_is_value_bigint (y)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n      || ecma_is_value_number (y))\n  {\n    /* 9. */\n    ecma_object_t *obj_p = ecma_get_object_from_value (x);\n\n    ecma_value_t def_value = ecma_op_object_default_value (obj_p, ECMA_PREFERRED_TYPE_NO);\n\n    if (ECMA_IS_VALUE_ERROR (def_value))\n    {\n      return def_value;\n    }\n\n    ecma_value_t compare_result = ecma_op_abstract_equality_compare (def_value, y);\n\n    ecma_free_value (def_value);\n\n    return compare_result;\n  }\n\n  return ECMA_VALUE_FALSE;\n} /* ecma_op_abstract_equality_compare */\n\n/**\n * ECMA strict equality comparison routine.\n *\n * See also: ECMA-262 v5, 11.9.6\n *\n * @return true - if values are strict equal,\n *         false - otherwise\n */\nbool\necma_op_strict_equality_compare (ecma_value_t x, /**< first operand */\n                                 ecma_value_t y) /**< second operand */\n{\n  if (ecma_is_value_direct (x)\n      || ecma_is_value_direct (y)\n#if ENABLED (JERRY_ESNEXT)\n      || ecma_is_value_symbol (x)\n      || ecma_is_value_symbol (y)\n#endif /* ENABLED (JERRY_ESNEXT) */\n      || ecma_is_value_object (x)\n      || ecma_is_value_object (y))\n  {\n    JERRY_ASSERT (!ecma_is_value_direct (x)\n                  || ecma_is_value_undefined (x)\n                  || ecma_is_value_null (x)\n                  || ecma_is_value_boolean (x)\n                  || ecma_is_value_integer_number (x));\n\n    JERRY_ASSERT (!ecma_is_value_direct (y)\n                  || ecma_is_value_undefined (y)\n                  || ecma_is_value_null (y)\n                  || ecma_is_value_boolean (y)\n                  || ecma_is_value_integer_number (y));\n\n    if ((x != ecma_make_integer_value (0) || !ecma_is_value_float_number (y))\n        && (y != ecma_make_integer_value (0) || !ecma_is_value_float_number (x)))\n    {\n      return (x == y);\n    }\n\n    /* The +0 === -0 case handled below. */\n  }\n\n  JERRY_ASSERT (ecma_is_value_number (x) || ecma_is_value_string (x) ||\n                ecma_is_value_bigint (x));\n  JERRY_ASSERT (ecma_is_value_number (y) || ecma_is_value_string (y) ||\n                ecma_is_value_bigint (y));\n\n  if (ecma_is_value_string (x))\n  {\n    if (!ecma_is_value_string (y))\n    {\n      return false;\n    }\n\n    ecma_string_t *x_str_p = ecma_get_string_from_value (x);\n    ecma_string_t *y_str_p = ecma_get_string_from_value (y);\n\n    return ecma_compare_ecma_strings (x_str_p, y_str_p);\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (JERRY_UNLIKELY (ecma_is_value_bigint (x)))\n  {\n    if (!ecma_is_value_bigint (y))\n    {\n      return false;\n    }\n\n    return ecma_bigint_is_equal_to_bigint (x, y);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  if (!ecma_is_value_number (y))\n  {\n    return false;\n  }\n\n  ecma_number_t x_num = ecma_get_number_from_value (x);\n  ecma_number_t y_num = ecma_get_number_from_value (y);\n\n  bool is_x_equal_to_y = (x_num == y_num);\n\n#ifndef JERRY_NDEBUG\n  bool is_x_equal_to_y_check;\n\n  if (ecma_number_is_nan (x_num)\n      || ecma_number_is_nan (y_num))\n  {\n    is_x_equal_to_y_check = false;\n  }\n  else if (x_num == y_num\n           || (ecma_number_is_zero (x_num)\n               && ecma_number_is_zero (y_num)))\n  {\n    is_x_equal_to_y_check = true;\n  }\n  else\n  {\n    is_x_equal_to_y_check = false;\n  }\n\n  JERRY_ASSERT (is_x_equal_to_y == is_x_equal_to_y_check);\n#endif /* !JERRY_NDEBUG */\n\n  return is_x_equal_to_y;\n} /* ecma_op_strict_equality_compare */\n\n/**\n * ECMA abstract relational comparison routine.\n *\n * See also: ECMA-262 v5, 11.8.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_abstract_relational_compare (ecma_value_t x, /**< first operand */\n                                     ecma_value_t y, /**< second operand */\n                                     bool left_first) /**< 'LeftFirst' flag */\n{\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  /* 1., 2. */\n  ecma_value_t prim_first_converted_value = ecma_op_to_primitive (x, ECMA_PREFERRED_TYPE_NUMBER);\n  if (ECMA_IS_VALUE_ERROR (prim_first_converted_value))\n  {\n    return prim_first_converted_value;\n  }\n\n  ecma_value_t prim_second_converted_value = ecma_op_to_primitive (y, ECMA_PREFERRED_TYPE_NUMBER);\n  if (ECMA_IS_VALUE_ERROR (prim_second_converted_value))\n  {\n    ecma_free_value (prim_first_converted_value);\n    return prim_second_converted_value;\n  }\n\n  ecma_value_t px = left_first ? prim_first_converted_value : prim_second_converted_value;\n  ecma_value_t py = left_first ? prim_second_converted_value : prim_first_converted_value;\n\n  const bool is_px_string = ecma_is_value_string (px);\n  const bool is_py_string = ecma_is_value_string (py);\n\n  if (!(is_px_string && is_py_string))\n  {\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    if (JERRY_LIKELY (!ecma_is_value_bigint (px))\n        && JERRY_LIKELY (!ecma_is_value_bigint (py)))\n    {\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n      /* 3. */\n\n      /* a. */\n\n      ecma_number_t nx;\n      ecma_number_t ny;\n\n      if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (px, &nx))\n          || ECMA_IS_VALUE_ERROR (ecma_op_to_number (py, &ny)))\n      {\n        ret_value = ECMA_VALUE_ERROR;\n        goto end;\n      }\n\n      /* b. */\n      if (ecma_number_is_nan (nx)\n          || ecma_number_is_nan (ny))\n      {\n        /* c., d. */\n        ret_value = ECMA_VALUE_UNDEFINED;\n      }\n      else\n      {\n        bool is_x_less_than_y = (nx < ny);\n\n#ifndef JERRY_NDEBUG\n        bool is_x_less_than_y_check;\n\n        if (nx == ny\n            || (ecma_number_is_zero (nx)\n                && ecma_number_is_zero (ny)))\n        {\n          /* e., f., g. */\n          is_x_less_than_y_check = false;\n        }\n        else if (ecma_number_is_infinity (nx)\n                 && !ecma_number_is_negative (nx))\n        {\n          /* h. */\n          is_x_less_than_y_check = false;\n        }\n        else if (ecma_number_is_infinity (ny)\n                 && !ecma_number_is_negative (ny))\n        {\n          /* i. */\n          is_x_less_than_y_check = true;\n        }\n        else if (ecma_number_is_infinity (ny)\n                 && ecma_number_is_negative (ny))\n        {\n          /* j. */\n          is_x_less_than_y_check = false;\n        }\n        else if (ecma_number_is_infinity (nx)\n                 && ecma_number_is_negative (nx))\n        {\n          /* k. */\n          is_x_less_than_y_check = true;\n        }\n        else\n        {\n          /* l. */\n          JERRY_ASSERT (!ecma_number_is_nan (nx)\n                        && !ecma_number_is_infinity (nx));\n          JERRY_ASSERT (!ecma_number_is_nan (ny)\n                        && !ecma_number_is_infinity (ny));\n          JERRY_ASSERT (!(ecma_number_is_zero (nx)\n                        && ecma_number_is_zero (ny)));\n\n          if (nx < ny)\n          {\n            is_x_less_than_y_check = true;\n          }\n          else\n          {\n            is_x_less_than_y_check = false;\n          }\n        }\n\n        JERRY_ASSERT (is_x_less_than_y_check == is_x_less_than_y);\n#endif /* !JERRY_NDEBUG */\n\n        ret_value = ecma_make_boolean_value (is_x_less_than_y);\n      }\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    }\n    else\n    {\n      bool invert_result = false;\n      int compare_result = 0;\n\n      if (!ecma_is_value_bigint (px))\n      {\n        ecma_value_t tmp = px;\n        px = py;\n        py = tmp;\n        invert_result = true;\n      }\n\n      JERRY_ASSERT (ecma_is_value_bigint (px));\n\n      if (ecma_is_value_bigint (py))\n      {\n        compare_result = ecma_bigint_compare_to_bigint (px, py);\n      }\n      else if (ecma_is_value_string (py))\n      {\n        ret_value = ecma_bigint_parse_string_value (py, ECMA_BIGINT_PARSE_DISALLOW_SYNTAX_ERROR);\n\n        if (!ECMA_IS_VALUE_ERROR (ret_value))\n        {\n          if (ret_value == ECMA_VALUE_FALSE)\n          {\n            ret_value = ECMA_VALUE_UNDEFINED;\n          }\n          else\n          {\n            compare_result = ecma_bigint_compare_to_bigint (px, ret_value);\n            ecma_free_value (ret_value);\n            ret_value = ECMA_VALUE_EMPTY;\n          }\n        }\n      }\n      else\n      {\n        ecma_number_t ny;\n        if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (py, &ny)))\n        {\n          ret_value = ECMA_VALUE_ERROR;\n          goto end;\n        }\n\n        if (ecma_number_is_nan (ny))\n        {\n          ret_value = ECMA_VALUE_UNDEFINED;\n        }\n        else\n        {\n          compare_result = ecma_bigint_compare_to_number (px, ny);\n        }\n      }\n\n      if (ret_value == ECMA_VALUE_EMPTY)\n      {\n        if (invert_result)\n        {\n          compare_result = -compare_result;\n        }\n\n        ret_value = ecma_make_boolean_value (compare_result < 0);\n      }\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  }\n  else\n  { /* 4. */\n    JERRY_ASSERT (is_px_string && is_py_string);\n\n    ecma_string_t *str_x_p = ecma_get_string_from_value (px);\n    ecma_string_t *str_y_p = ecma_get_string_from_value (py);\n\n    bool is_px_less = ecma_compare_ecma_strings_relational (str_x_p, str_y_p);\n\n    ret_value = ecma_make_boolean_value (is_px_less);\n  }\n\nend:\n  ecma_free_value (prim_second_converted_value);\n  ecma_free_value (prim_first_converted_value);\n\n  return ret_value;\n} /* ecma_op_abstract_relational_compare */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-comparison.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_COMPARISON_H\n#define ECMA_COMPARISON_H\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmacomparison ECMA comparison\n * @{\n */\n\necma_value_t ecma_op_abstract_equality_compare (ecma_value_t x, ecma_value_t y);\nbool ecma_op_strict_equality_compare (ecma_value_t x, ecma_value_t y);\necma_value_t ecma_op_abstract_relational_compare (ecma_value_t x, ecma_value_t y, bool left_first);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_COMPARISON_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-container-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jcontext.h\"\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-container-object.h\"\n#include \"ecma-property-hashmap.h\"\n#include \"ecma-objects.h\"\n\n#if ENABLED (JERRY_BUILTIN_CONTAINER)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup \\addtogroup ecmamaphelpers ECMA builtin Map/Set helper functions\n * @{\n */\n\n/**\n * Create a new internal buffer.\n *\n * Note:\n *   The first element of the collection tracks the size of the buffer.\n *   ECMA_VALUE_EMPTY values are not calculated into the size.\n *\n * @return pointer to the internal buffer\n */\nstatic inline ecma_collection_t *\necma_op_create_internal_buffer (void)\n{\n  ecma_collection_t *collection_p = ecma_new_collection ();\n  ecma_collection_push_back (collection_p, (ecma_value_t) 0);\n\n  return collection_p;\n} /* ecma_op_create_internal_buffer */\n\n/**\n * Append values to the internal buffer.\n */\nstatic void\necma_op_internal_buffer_append (ecma_collection_t *container_p, /**< internal container pointer */\n                                ecma_value_t key_arg, /**< key argument */\n                                ecma_value_t value_arg, /**< value argument */\n                                lit_magic_string_id_t lit_id) /**< class id */\n{\n  JERRY_ASSERT (container_p != NULL);\n\n  if (lit_id == LIT_MAGIC_STRING_WEAKMAP_UL || lit_id == LIT_MAGIC_STRING_MAP_UL)\n  {\n    ecma_value_t values[] = { ecma_copy_value_if_not_object (key_arg), ecma_copy_value_if_not_object (value_arg) };\n    ecma_collection_append (container_p, values, 2);\n  }\n  else\n  {\n    ecma_collection_push_back (container_p, ecma_copy_value_if_not_object (key_arg));\n  }\n\n  ECMA_CONTAINER_SET_SIZE (container_p, ECMA_CONTAINER_GET_SIZE (container_p) + 1);\n} /* ecma_op_internal_buffer_append */\n\n/**\n * Update the value of a given entry.\n */\nstatic inline void\necma_op_internal_buffer_update (ecma_value_t *entry_p, /**< entry pointer */\n                                ecma_value_t value_arg, /**< value argument */\n                                lit_magic_string_id_t lit_id) /**< class id */\n{\n  JERRY_ASSERT (entry_p != NULL);\n\n  if (lit_id == LIT_MAGIC_STRING_WEAKMAP_UL || lit_id == LIT_MAGIC_STRING_MAP_UL)\n  {\n    ecma_free_value_if_not_object (((ecma_container_pair_t *) entry_p)->value);\n\n    ((ecma_container_pair_t *) entry_p)->value = ecma_copy_value_if_not_object (value_arg);\n  }\n} /* ecma_op_internal_buffer_update */\n\n/**\n * Delete element from the internal buffer.\n */\nstatic void\necma_op_internal_buffer_delete (ecma_collection_t *container_p, /**< internal container pointer */\n                                ecma_container_pair_t *entry_p, /**< entry pointer */\n                                lit_magic_string_id_t lit_id) /**< class id */\n{\n  JERRY_ASSERT (container_p != NULL);\n  JERRY_ASSERT (entry_p != NULL);\n\n  ecma_free_value_if_not_object (entry_p->key);\n  entry_p->key = ECMA_VALUE_EMPTY;\n\n  if (lit_id == LIT_MAGIC_STRING_WEAKMAP_UL || lit_id == LIT_MAGIC_STRING_MAP_UL)\n  {\n    ecma_free_value_if_not_object (entry_p->value);\n    entry_p->value = ECMA_VALUE_EMPTY;\n  }\n\n  ECMA_CONTAINER_SET_SIZE (container_p, ECMA_CONTAINER_GET_SIZE (container_p) - 1);\n} /* ecma_op_internal_buffer_delete */\n\n/**\n * Find an entry in the collection.\n *\n * @return pointer to the appropriate entry.\n */\nstatic ecma_value_t *\necma_op_internal_buffer_find (ecma_collection_t *container_p, /**< internal container pointer */\n                              ecma_value_t key_arg, /**< key argument */\n                              lit_magic_string_id_t lit_id) /**< class id */\n{\n  JERRY_ASSERT (container_p != NULL);\n\n  uint8_t entry_size = ecma_op_container_entry_size (lit_id);\n  uint32_t entry_count = ECMA_CONTAINER_ENTRY_COUNT (container_p);\n  ecma_value_t *start_p = ECMA_CONTAINER_START (container_p);\n\n  for (uint32_t i = 0; i < entry_count; i += entry_size)\n  {\n    ecma_value_t *entry_p = start_p + i;\n\n    if (ecma_op_same_value_zero (*entry_p, key_arg, false))\n    {\n      return entry_p;\n    }\n  }\n\n  return NULL;\n} /* ecma_op_internal_buffer_find */\n\n/**\n * Get the value that belongs to the key.\n *\n * Note: in case of Set containers, the values are the same as the keys.\n *\n * @return ecma value\n */\nstatic ecma_value_t\necma_op_container_get_value (ecma_value_t *entry_p, /**< entry (key) pointer */\n                             lit_magic_string_id_t lit_id) /**< class id */\n{\n  JERRY_ASSERT (entry_p != NULL);\n\n  if (lit_id == LIT_MAGIC_STRING_WEAKMAP_UL || lit_id == LIT_MAGIC_STRING_MAP_UL)\n  {\n    return ((ecma_container_pair_t *) entry_p)->value;\n  }\n\n  return *entry_p;\n} /* ecma_op_container_get_value */\n\n/**\n * Get the size (in ecma_value_t) of the stored entries.\n *\n * @return size of the entries.\n */\nuint8_t\necma_op_container_entry_size (lit_magic_string_id_t lit_id) /**< class id */\n{\n  if (lit_id == LIT_MAGIC_STRING_WEAKMAP_UL || lit_id == LIT_MAGIC_STRING_MAP_UL)\n  {\n    return ECMA_CONTAINER_PAIR_SIZE;\n  }\n\n  return ECMA_CONTAINER_VALUE_SIZE;\n} /* ecma_op_container_entry_size */\n\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n/**\n * Release the entries in the WeakSet container.\n */\nstatic void\necma_op_container_free_weakset_entries (ecma_object_t *object_p, /**< object pointer */\n                                        ecma_collection_t *container_p) /** internal buffer pointer */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (container_p != NULL);\n\n  uint32_t entry_count = ECMA_CONTAINER_ENTRY_COUNT (container_p);\n  ecma_value_t *start_p = ECMA_CONTAINER_START (container_p);\n\n  for (uint32_t i = 0; i < entry_count; i += ECMA_CONTAINER_VALUE_SIZE)\n  {\n    ecma_value_t *entry_p = start_p + i;\n\n    if (ecma_is_value_empty (*entry_p))\n    {\n      continue;\n    }\n\n    ecma_op_container_unref_weak (ecma_get_object_from_value (*entry_p), ecma_make_object_value (object_p));\n    ecma_op_container_remove_weak_entry (object_p, *entry_p);\n\n    *entry_p = ECMA_VALUE_EMPTY;\n  }\n} /* ecma_op_container_free_weakset_entries */\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n/**\n * Release the entries in the WeakMap container.\n */\nstatic void\necma_op_container_free_weakmap_entries (ecma_object_t *object_p, /**< object pointer */\n                                        ecma_collection_t *container_p) /**< internal buffer pointer */\n{\n  JERRY_ASSERT (object_p != NULL);\n  JERRY_ASSERT (container_p != NULL);\n\n  uint32_t entry_count = ECMA_CONTAINER_ENTRY_COUNT (container_p);\n  ecma_value_t *start_p = ECMA_CONTAINER_START (container_p);\n\n  for (uint32_t i = 0; i < entry_count; i += ECMA_CONTAINER_PAIR_SIZE)\n  {\n    ecma_container_pair_t *entry_p = (ecma_container_pair_t *) (start_p + i);\n\n    if (ecma_is_value_empty (entry_p->key))\n    {\n      continue;\n    }\n\n    ecma_op_container_unref_weak (ecma_get_object_from_value (entry_p->key), ecma_make_object_value (object_p));\n    ecma_op_container_remove_weak_entry (object_p, entry_p->key);\n\n    ecma_free_value_if_not_object (entry_p->value);\n\n    entry_p->key = ECMA_VALUE_EMPTY;\n    entry_p->value = ECMA_VALUE_EMPTY;\n  }\n} /* ecma_op_container_free_weakmap_entries */\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n\n#if ENABLED (JERRY_BUILTIN_SET)\n/**\n * Release the entries in the Set container.\n */\nstatic void\necma_op_container_free_set_entries (ecma_collection_t *container_p)\n{\n  JERRY_ASSERT (container_p != NULL);\n\n  uint32_t entry_count = ECMA_CONTAINER_ENTRY_COUNT (container_p);\n  ecma_value_t *start_p = ECMA_CONTAINER_START (container_p);\n\n  for (uint32_t i = 0; i < entry_count; i += ECMA_CONTAINER_VALUE_SIZE)\n  {\n    ecma_value_t *entry_p = start_p + i;\n\n    if (ecma_is_value_empty (*entry_p))\n    {\n      continue;\n    }\n\n    ecma_free_value_if_not_object (*entry_p);\n    *entry_p = ECMA_VALUE_EMPTY;\n  }\n} /* ecma_op_container_free_set_entries */\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n/**\n * Release the entries in the Map container.\n */\nstatic void\necma_op_container_free_map_entries (ecma_collection_t *container_p)\n{\n  JERRY_ASSERT (container_p != NULL);\n\n  uint32_t entry_count = ECMA_CONTAINER_ENTRY_COUNT (container_p);\n  ecma_value_t *start_p = ECMA_CONTAINER_START (container_p);\n\n  for (uint32_t i = 0; i < entry_count; i += ECMA_CONTAINER_PAIR_SIZE)\n  {\n    ecma_container_pair_t *entry_p = (ecma_container_pair_t *) (start_p + i);\n\n    if (ecma_is_value_empty (entry_p->key))\n    {\n      continue;\n    }\n\n    ecma_free_value_if_not_object (entry_p->key);\n    ecma_free_value_if_not_object (entry_p->value);\n\n    entry_p->key = ECMA_VALUE_EMPTY;\n    entry_p->value = ECMA_VALUE_EMPTY;\n  }\n} /* ecma_op_container_free_map_entries */\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n\n/**\n * Release the internal buffer and the stored entries.\n */\nvoid\necma_op_container_free_entries (ecma_object_t *object_p) /**< collection object pointer */\n{\n  JERRY_ASSERT (object_p != NULL);\n\n  ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) object_p;\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n\n  switch (map_object_p->u.class_prop.class_id)\n  {\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n    case LIT_MAGIC_STRING_WEAKSET_UL:\n    {\n      ecma_op_container_free_weakset_entries (object_p, container_p);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n    case LIT_MAGIC_STRING_WEAKMAP_UL:\n    {\n      ecma_op_container_free_weakmap_entries (object_p, container_p);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n#if ENABLED (JERRY_BUILTIN_SET)\n    case LIT_MAGIC_STRING_SET_UL:\n    {\n      ecma_op_container_free_set_entries (container_p);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n#if ENABLED (JERRY_BUILTIN_MAP)\n    case LIT_MAGIC_STRING_MAP_UL:\n    {\n      ecma_op_container_free_map_entries (container_p);\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n    default:\n    {\n      break;\n    }\n  }\n\n  ECMA_CONTAINER_SET_SIZE (container_p, 0);\n} /* ecma_op_container_free_entries */\n\n/**\n * Handle calling [[Construct]] of built-in Map/Set like objects\n *\n * @return ecma value\n */\necma_value_t\necma_op_container_create (const ecma_value_t *arguments_list_p, /**< arguments list */\n                          uint32_t arguments_list_len, /**< number of arguments */\n                          lit_magic_string_id_t lit_id, /**< internal class id */\n                          ecma_builtin_id_t proto_id) /**< prototype builtin id */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n  JERRY_ASSERT (lit_id == LIT_MAGIC_STRING_MAP_UL\n                || lit_id == LIT_MAGIC_STRING_SET_UL\n                || lit_id == LIT_MAGIC_STRING_WEAKMAP_UL\n                || lit_id == LIT_MAGIC_STRING_WEAKSET_UL);\n  JERRY_ASSERT (JERRY_CONTEXT (current_new_target_p) != NULL);\n\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p), proto_id);\n\n  if (JERRY_UNLIKELY (proto_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_collection_t *container_p = ecma_op_create_internal_buffer ();\n  ecma_object_t *object_p  = ecma_create_object (proto_p,\n                                                 sizeof (ecma_extended_object_t),\n                                                 ECMA_OBJECT_TYPE_CLASS);\n  ecma_deref_object (proto_p);\n  ecma_extended_object_t *map_obj_p = (ecma_extended_object_t *) object_p;\n  map_obj_p->u.class_prop.extra_info = ECMA_CONTAINER_FLAGS_EMPTY;\n  map_obj_p->u.class_prop.class_id = (uint16_t) lit_id;\n\n  if (lit_id == LIT_MAGIC_STRING_WEAKMAP_UL || lit_id == LIT_MAGIC_STRING_WEAKSET_UL)\n  {\n    map_obj_p->u.class_prop.extra_info |= ECMA_CONTAINER_FLAGS_WEAK;\n  }\n\n  ECMA_SET_INTERNAL_VALUE_POINTER (map_obj_p->u.class_prop.u.value, container_p);\n\n  ecma_value_t set_value = ecma_make_object_value (object_p);\n  ecma_value_t result = set_value;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (arguments_list_len == 0)\n  {\n    return result;\n  }\n\n  ecma_value_t iterable = arguments_list_p[0];\n\n  if (ecma_is_value_undefined (iterable) || ecma_is_value_null (iterable))\n  {\n    return result;\n  }\n\n  lit_magic_string_id_t adder_string_id;\n  if (lit_id == LIT_MAGIC_STRING_MAP_UL || lit_id == LIT_MAGIC_STRING_WEAKMAP_UL)\n  {\n    adder_string_id = LIT_MAGIC_STRING_SET;\n  }\n  else\n  {\n    adder_string_id = LIT_MAGIC_STRING_ADD;\n  }\n\n  result = ecma_op_object_get_by_magic_id (object_p, adder_string_id);\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    goto cleanup_object;\n  }\n\n  if (!ecma_op_is_callable (result))\n  {\n    ecma_free_value (result);\n    result = ecma_raise_type_error (ECMA_ERR_MSG (\"add/set function is not callable.\"));\n    goto cleanup_object;\n  }\n\n  ecma_object_t *adder_func_p = ecma_get_object_from_value (result);\n\n  ecma_value_t next_method;\n  result = ecma_op_get_iterator (iterable, ECMA_VALUE_SYNC_ITERATOR, &next_method);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    goto cleanup_adder;\n  }\n\n  const ecma_value_t iterator = result;\n\n  while (true)\n  {\n    result = ecma_op_iterator_step (iterator, next_method);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_iterator;\n    }\n\n    if (ecma_is_value_false (result))\n    {\n      break;\n    }\n\n    const ecma_value_t next = result;\n    result = ecma_op_iterator_value (next);\n    ecma_free_value (next);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_iterator;\n    }\n\n    if (lit_id == LIT_MAGIC_STRING_SET_UL || lit_id == LIT_MAGIC_STRING_WEAKSET_UL)\n    {\n      const ecma_value_t value = result;\n\n      ecma_value_t arguments[] = { value };\n      result = ecma_op_function_call (adder_func_p, set_value, arguments, 1);\n\n      ecma_free_value (value);\n    }\n    else\n    {\n      if (!ecma_is_value_object (result))\n      {\n        ecma_free_value (result);\n        ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator value is not an object.\"));\n        result = ecma_op_iterator_close (iterator);\n        JERRY_ASSERT (ECMA_IS_VALUE_ERROR (result));\n        goto cleanup_iterator;\n      }\n\n      ecma_object_t *next_object_p = ecma_get_object_from_value (result);\n\n      result = ecma_op_object_get_by_index (next_object_p, 0);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        ecma_deref_object (next_object_p);\n        ecma_op_iterator_close (iterator);\n        goto cleanup_iterator;\n      }\n\n      const ecma_value_t key = result;\n\n      result = ecma_op_object_get_by_index (next_object_p, 1);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        ecma_deref_object (next_object_p);\n        ecma_free_value (key);\n        ecma_op_iterator_close (iterator);\n        goto cleanup_iterator;\n      }\n\n      const ecma_value_t value = result;\n      ecma_value_t arguments[] = { key, value };\n      result = ecma_op_function_call (adder_func_p, set_value, arguments, 2);\n\n      ecma_free_value (key);\n      ecma_free_value (value);\n      ecma_deref_object (next_object_p);\n    }\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      ecma_op_iterator_close (iterator);\n      goto cleanup_iterator;\n    }\n\n    ecma_free_value (result);\n  }\n\n  ecma_ref_object (object_p);\n  result = ecma_make_object_value (object_p);\n\ncleanup_iterator:\n  ecma_free_value (iterator);\n  ecma_free_value (next_method);\ncleanup_adder:\n  ecma_deref_object (adder_func_p);\ncleanup_object:\n  ecma_deref_object (object_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return result;\n} /* ecma_op_container_create */\n\n/**\n * Get Map/Set object pointer\n *\n * Note:\n *   If the function returns with NULL, the error object has\n *   already set, and the caller must return with ECMA_VALUE_ERROR\n *\n * @return pointer to the Map/Set if this_arg is a valid Map/Set object\n *         NULL otherwise\n */\necma_extended_object_t *\necma_op_container_get_object (ecma_value_t this_arg, /**< this argument */\n                              lit_magic_string_id_t lit_id) /**< internal class id */\n{\n  if (ecma_is_value_object (this_arg))\n  {\n    ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) ecma_get_object_from_value (this_arg);\n\n    if (ecma_get_object_type ((ecma_object_t *) map_object_p) == ECMA_OBJECT_TYPE_CLASS\n        && map_object_p->u.class_prop.class_id == lit_id)\n    {\n      return map_object_p;\n    }\n  }\n\n#if ENABLED (JERRY_ERROR_MESSAGES)\n  ecma_raise_standard_error_with_format (ECMA_ERROR_TYPE,\n                                         \"Expected a % object.\",\n                                         ecma_make_string_value (ecma_get_magic_string (lit_id)));\n#else /* !ENABLED (JERRY_ERROR_MESSAGES) */\n  ecma_raise_type_error (NULL);\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n\n  return NULL;\n} /* ecma_op_container_get_object */\n\n/**\n * Returns with the size of the Map/Set object.\n *\n * @return size of the Map/Set object as ecma-value.\n */\necma_value_t\necma_op_container_size (ecma_extended_object_t *map_object_p) /**< internal class id */\n{\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n\n  return ecma_make_uint32_value (ECMA_CONTAINER_GET_SIZE (container_p));\n} /* ecma_op_container_size */\n\n/**\n * The generic Map/WeakMap prototype object's 'get' routine\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_container_get (ecma_extended_object_t *map_object_p, /**< map object */\n                       ecma_value_t key_arg, /**< key argument */\n                       lit_magic_string_id_t lit_id) /**< internal class id */\n{\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n  if (lit_id == LIT_MAGIC_STRING_WEAKMAP_UL && !ecma_is_value_object (key_arg))\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n\n  if (ECMA_CONTAINER_GET_SIZE (container_p) == 0)\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  ecma_value_t *entry_p = ecma_op_internal_buffer_find (container_p, key_arg, lit_id);\n\n  if (entry_p == NULL)\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  return ecma_copy_value (((ecma_container_pair_t *) entry_p)->value);\n} /* ecma_op_container_get */\n\n/**\n * The generic Map/Set prototype object's 'has' routine\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_container_has (ecma_extended_object_t *map_object_p, /**< map object */\n                       ecma_value_t key_arg, /**< key argument */\n                       lit_magic_string_id_t lit_id) /**< internal class id */\n{\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP) || ENABLED (JERRY_BUILTIN_WEAKSET)\n  if ((map_object_p->u.class_prop.extra_info & ECMA_CONTAINER_FLAGS_WEAK) != 0\n      && !ecma_is_value_object (key_arg))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) ||  ENABLED (JERRY_BUILTIN_WEAKSET) */\n\n  if (ECMA_CONTAINER_GET_SIZE (container_p) == 0)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_value_t *entry_p = ecma_op_internal_buffer_find (container_p, key_arg, lit_id);\n\n  return ecma_make_boolean_value (entry_p != NULL);\n} /* ecma_op_container_has */\n\n/**\n * Set a weak reference from a container to a key object\n */\nstatic void\necma_op_container_set_weak (ecma_object_t *const key_p, /**< key object */\n                            ecma_extended_object_t *const container_p) /**< container */\n{\n  if (JERRY_UNLIKELY (ecma_op_object_is_fast_array (key_p)))\n  {\n    ecma_fast_array_convert_to_normal (key_p);\n  }\n\n  ecma_string_t *weak_refs_string_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_WEAK_REFS);\n  ecma_property_t *property_p = ecma_find_named_property (key_p, weak_refs_string_p);\n  ecma_collection_t *refs_p;\n\n  if (property_p == NULL)\n  {\n    ecma_property_value_t *value_p;\n    ECMA_CREATE_INTERNAL_PROPERTY (key_p, weak_refs_string_p, property_p, value_p);\n\n    refs_p = ecma_new_collection ();\n    ECMA_SET_INTERNAL_VALUE_POINTER (value_p->value, refs_p);\n  }\n  else\n  {\n    refs_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t, (ECMA_PROPERTY_VALUE_PTR (property_p)->value));\n  }\n\n  const ecma_value_t container_value = ecma_make_object_value ((ecma_object_t *) container_p);\n  for (uint32_t i = 0; i < refs_p->item_count; i++)\n  {\n    if (ecma_is_value_empty (refs_p->buffer_p[i]))\n    {\n      refs_p->buffer_p[i] = container_value;\n      return;\n    }\n  }\n\n  ecma_collection_push_back (refs_p, container_value);\n} /* ecma_op_container_set_weak */\n\n/**\n * Helper method for the Map.prototype.set and Set.prototype.add methods to swap the sign of the given value if needed\n *\n * See also:\n *          ECMA-262 v6, 23.2.3.1 step 6\n *          ECMA-262 v6, 23.1.3.9 step 6\n *\n * @return ecma value\n */\nstatic ecma_value_t\necma_op_container_set_noramlize_zero (ecma_value_t this_arg) /*< this arg */\n{\n  if (ecma_is_value_number (this_arg))\n  {\n    ecma_number_t number_value = ecma_get_number_from_value (this_arg);\n\n    if (JERRY_UNLIKELY (ecma_number_is_zero (number_value) && ecma_number_is_negative (number_value)))\n    {\n      return ecma_make_integer_value (0);\n    }\n  }\n\n  return this_arg;\n} /* ecma_op_container_set_noramlize_zero */\n\n/**\n * The generic Map prototype object's 'set' and Set prototype object's 'add' routine\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_container_set (ecma_extended_object_t *map_object_p, /**< map object */\n                       ecma_value_t key_arg, /**< key argument */\n                       ecma_value_t value_arg, /**< value argument */\n                       lit_magic_string_id_t lit_id) /**< internal class id */\n{\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP) ||  ENABLED (JERRY_BUILTIN_WEAKSET)\n  if ((map_object_p->u.class_prop.extra_info & ECMA_CONTAINER_FLAGS_WEAK) != 0\n      && !ecma_is_value_object (key_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Key must be an object\"));\n  }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) ||  ENABLED (JERRY_BUILTIN_WEAKSET) */\n\n  ecma_value_t *entry_p = ecma_op_internal_buffer_find (container_p, key_arg, lit_id);\n\n  if (entry_p == NULL)\n  {\n    ecma_op_internal_buffer_append (container_p,\n                                    ecma_op_container_set_noramlize_zero (key_arg),\n                                    value_arg,\n                                    lit_id);\n\n#if ENABLED (JERRY_BUILTIN_WEAKMAP) ||  ENABLED (JERRY_BUILTIN_WEAKSET)\n    if ((map_object_p->u.class_prop.extra_info & ECMA_CONTAINER_FLAGS_WEAK) != 0)\n    {\n      ecma_object_t *key_p = ecma_get_object_from_value (key_arg);\n      ecma_op_container_set_weak (key_p, map_object_p);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) ||  ENABLED (JERRY_BUILTIN_WEAKSET) */\n  }\n  else\n  {\n    ecma_op_internal_buffer_update (entry_p, ecma_op_container_set_noramlize_zero (value_arg), lit_id);\n  }\n\n  ecma_ref_object ((ecma_object_t *) map_object_p);\n  return ecma_make_object_value ((ecma_object_t *) map_object_p);\n} /* ecma_op_container_set */\n\n/**\n * The generic Map/Set prototype object's 'forEach' routine\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_container_foreach (ecma_extended_object_t *map_object_p, /**< map object */\n                           ecma_value_t predicate, /**< callback function */\n                           ecma_value_t predicate_this_arg, /**< this argument for\n                                                             *   invoke predicate */\n                           lit_magic_string_id_t lit_id) /**< internal class id */\n{\n  if (!ecma_op_is_callable (predicate))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Callback function is not callable.\"));\n  }\n\n  JERRY_ASSERT (ecma_is_value_object (predicate));\n  ecma_object_t *func_object_p = ecma_get_object_from_value (predicate);\n  ecma_value_t ret_value = ECMA_VALUE_UNDEFINED;\n\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n\n  uint8_t entry_size = ecma_op_container_entry_size (lit_id);\n\n  for (uint32_t i = 0; i < ECMA_CONTAINER_ENTRY_COUNT (container_p); i += entry_size)\n  {\n    ecma_value_t *entry_p = ECMA_CONTAINER_START (container_p) + i;\n\n    if (ecma_is_value_empty (*entry_p))\n    {\n      continue;\n    }\n\n    ecma_value_t key_arg = *entry_p;\n    ecma_value_t value_arg = ecma_op_container_get_value (entry_p, lit_id);\n\n    ecma_value_t this_arg = ecma_make_object_value ((ecma_object_t *) map_object_p);\n    ecma_value_t call_args[] = { value_arg, key_arg, this_arg };\n    ecma_value_t call_value = ecma_op_function_call (func_object_p, predicate_this_arg, call_args, 3);\n\n    if (ECMA_IS_VALUE_ERROR (call_value))\n    {\n      ret_value = call_value;\n      break;\n    }\n\n    ecma_free_value (call_value);\n  }\n\n  return ret_value;\n} /* ecma_op_container_foreach */\n\n/**\n * The Map/Set prototype object's 'clear' routine\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_container_clear (ecma_extended_object_t *map_object_p) /**< this argument */\n{\n\n  ecma_op_container_free_entries ((ecma_object_t *) map_object_p);\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_op_container_clear */\n\n/**\n * The generic Map/Set prototype object's 'delete' routine\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_container_delete (ecma_extended_object_t *map_object_p, /**< map object */\n                          ecma_value_t key_arg, /**< key argument */\n                          lit_magic_string_id_t lit_id) /**< internal class id */\n{\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n\n  ecma_value_t *entry_p = ecma_op_internal_buffer_find (container_p, key_arg, lit_id);\n\n  if (entry_p == NULL)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_op_internal_buffer_delete (container_p, (ecma_container_pair_t *) entry_p, lit_id);\n  return ECMA_VALUE_TRUE;\n} /* ecma_op_container_delete */\n\n/**\n * The generic WeakMap/WeakSet prototype object's 'delete' routine\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_container_delete_weak (ecma_extended_object_t *map_object_p, /**< map object */\n                               ecma_value_t key_arg, /**< key argument */\n                               lit_magic_string_id_t lit_id) /**< internal class id */\n{\n  if (!ecma_is_value_object (key_arg))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n\n  ecma_value_t *entry_p = ecma_op_internal_buffer_find (container_p, key_arg, lit_id);\n\n  if (entry_p == NULL)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_op_internal_buffer_delete (container_p, (ecma_container_pair_t *) entry_p, lit_id);\n\n  ecma_object_t *key_object_p = ecma_get_object_from_value (key_arg);\n  ecma_op_container_unref_weak (key_object_p, ecma_make_object_value ((ecma_object_t *) map_object_p));\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_op_container_delete_weak */\n\n/**\n * Helper function to remove a weak reference to an object.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\nvoid\necma_op_container_unref_weak (ecma_object_t *object_p, /**< this argument */\n                              ecma_value_t ref_holder) /**< key argument */\n{\n  ecma_string_t *weak_refs_string_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_WEAK_REFS);\n\n  ecma_property_t *property_p = ecma_find_named_property (object_p, weak_refs_string_p);\n  JERRY_ASSERT (property_p != NULL);\n\n  ecma_collection_t *refs_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                               ECMA_PROPERTY_VALUE_PTR (property_p)->value);\n  for (uint32_t i = 0; i < refs_p->item_count; i++)\n  {\n    if (refs_p->buffer_p[i] == ref_holder)\n    {\n      refs_p->buffer_p[i] = ECMA_VALUE_EMPTY;\n      break;\n    }\n  }\n} /* ecma_op_container_unref_weak */\n\n/**\n * Helper function to remove a key/value pair from a weak container object\n */\nvoid\necma_op_container_remove_weak_entry (ecma_object_t *object_p, /**< internal container object */\n                                     ecma_value_t key_arg) /**< key */\n{\n  ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) object_p;\n\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n\n  ecma_value_t *entry_p = ecma_op_internal_buffer_find (container_p, key_arg, map_object_p->u.class_prop.class_id);\n\n  JERRY_ASSERT (entry_p != NULL);\n\n  ecma_op_internal_buffer_delete (container_p, (ecma_container_pair_t *) entry_p, map_object_p->u.class_prop.class_id);\n} /* ecma_op_container_remove_weak_entry */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * The Create{Set, Map}Iterator Abstract operation\n *\n * See also:\n *          ECMA-262 v6, 23.1.5.1\n *          ECMA-262 v6, 23.2.5.1\n *\n * Note:\n *     Returned value must be freed with ecma_free_value.\n *\n * @return Map/Set iterator object, if success\n *         error - otherwise\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_op_container_create_iterator (ecma_value_t this_arg, /**< this argument */\n                                   ecma_builtin_id_t proto_id, /**< prototype builtin id */\n                                   ecma_pseudo_array_type_t iterator_type, /**< iterator type */\n                                   ecma_iterator_kind_t kind) /**< iterator kind */\n{\n  return ecma_op_create_iterator_object (this_arg,\n                                         ecma_builtin_get (proto_id),\n                                         iterator_type,\n                                         kind);\n} /* ecma_op_container_create_iterator */\n\n/**\n * Get the index of the iterator object.\n *\n * @return index of the iterator.\n */\nstatic uint32_t\necma_op_iterator_get_index (ecma_object_t *iter_obj_p)  /**< iterator object pointer */\n{\n  uint32_t index = ((ecma_extended_object_t *) iter_obj_p)->u.pseudo_array.u1.iterator_index;\n\n  if (JERRY_UNLIKELY (index == ECMA_ITERATOR_INDEX_LIMIT))\n  {\n    ecma_string_t *prop_name_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_STRING_ITERATOR_NEXT_INDEX);\n    ecma_property_t *property_p = ecma_find_named_property (iter_obj_p, prop_name_p);\n    ecma_property_value_t *value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n    return (uint32_t) (ecma_get_number_from_value (value_p->value));\n  }\n\n  return index;\n} /* ecma_op_iterator_get_index */\n\n/**\n * Set the index of the iterator object.\n */\nstatic void\necma_op_iterator_set_index (ecma_object_t *iter_obj_p, /**< iterator object pointer */\n                            uint32_t index) /* iterator index to set */\n{\n  if (JERRY_UNLIKELY (index >= ECMA_ITERATOR_INDEX_LIMIT))\n  {\n    /* After the ECMA_ITERATOR_INDEX_LIMIT limit is reached the [[%Iterator%NextIndex]]\n       property is stored as an internal property */\n    ecma_string_t *prop_name_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_STRING_ITERATOR_NEXT_INDEX);\n    ecma_property_t *property_p = ecma_find_named_property (iter_obj_p, prop_name_p);\n    ecma_property_value_t *value_p;\n\n    if (property_p == NULL)\n    {\n      value_p = ecma_create_named_data_property (iter_obj_p, prop_name_p, ECMA_PROPERTY_FLAG_WRITABLE, &property_p);\n      value_p->value = ecma_make_uint32_value (index);\n    }\n    else\n    {\n      value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n      value_p->value = ecma_make_uint32_value (index);\n    }\n  }\n  else\n  {\n    ((ecma_extended_object_t *) iter_obj_p)->u.pseudo_array.u1.iterator_index = (uint16_t) index;\n  }\n} /* ecma_op_iterator_set_index */\n\n/**\n * The %{Set, Map}IteratorPrototype% object's 'next' routine\n *\n * See also:\n *          ECMA-262 v6, 23.1.5.2.1\n *          ECMA-262 v6, 23.2.5.2.1\n *\n * Note:\n *     Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object, if success\n *         error - otherwise\n */\necma_value_t\necma_op_container_iterator_next (ecma_value_t this_val, /**< this argument */\n                                 ecma_pseudo_array_type_t iterator_type) /**< type of the iterator */\n{\n  if (!ecma_is_value_object (this_val))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an object.\"));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_val);\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n  if (ecma_get_object_type (obj_p) != ECMA_OBJECT_TYPE_PSEUDO_ARRAY\n      || ext_obj_p->u.pseudo_array.type != iterator_type)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' is not an iterator.\"));\n  }\n\n  ecma_value_t iterated_value = ext_obj_p->u.pseudo_array.u2.iterated_value;\n\n  if (ecma_is_value_empty (iterated_value))\n  {\n    return ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n  }\n\n  ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) (ecma_get_object_from_value (iterated_value));\n  lit_magic_string_id_t lit_id = map_object_p->u.class_prop.class_id;\n\n  ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                    map_object_p->u.class_prop.u.value);\n  uint32_t entry_count = ECMA_CONTAINER_ENTRY_COUNT (container_p);\n  uint32_t index = ecma_op_iterator_get_index (obj_p);\n\n  if (index == entry_count)\n  {\n    ext_obj_p->u.pseudo_array.u2.iterated_value = ECMA_VALUE_EMPTY;\n\n    return ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n  }\n\n  uint8_t entry_size = ecma_op_container_entry_size (lit_id);\n  uint8_t iterator_kind = ext_obj_p->u.pseudo_array.extra_info;\n  ecma_value_t *start_p = ECMA_CONTAINER_START (container_p);\n  ecma_value_t ret_value = ECMA_VALUE_UNDEFINED;\n\n  for (uint32_t i = index; i < entry_count; i += entry_size)\n  {\n    ecma_value_t *entry_p = start_p + i;\n\n    if (ecma_is_value_empty (*entry_p))\n    {\n      if (i == (entry_count - entry_size))\n      {\n        ret_value = ecma_create_iter_result_object (ECMA_VALUE_UNDEFINED, ECMA_VALUE_TRUE);\n        break;\n      }\n\n      continue;\n    }\n\n    ecma_op_iterator_set_index (obj_p, i + entry_size);\n\n    ecma_value_t key_arg = *entry_p;\n    ecma_value_t value_arg = ecma_op_container_get_value (entry_p, lit_id);\n\n    if (iterator_kind == ECMA_ITERATOR_KEYS)\n    {\n      ret_value = ecma_create_iter_result_object (key_arg, ECMA_VALUE_FALSE);\n    }\n    else if (iterator_kind == ECMA_ITERATOR_VALUES)\n    {\n      ret_value = ecma_create_iter_result_object (value_arg, ECMA_VALUE_FALSE);\n    }\n    else\n    {\n      JERRY_ASSERT (iterator_kind == ECMA_ITERATOR_ENTRIES);\n\n      ecma_value_t entry_array_value;\n      entry_array_value = ecma_create_array_from_iter_element (value_arg, key_arg);\n\n      ret_value = ecma_create_iter_result_object (entry_array_value, ECMA_VALUE_FALSE);\n      ecma_free_value (entry_array_value);\n    }\n\n    break;\n  }\n\n  return ret_value;\n} /* ecma_op_container_iterator_next */\n\n/**\n * Dispatcher of builtin container routines.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_builtin_container_dispatch_routine (uint16_t builtin_routine_id, /**< built-in wide routine\n                                                                       *   identifier */\n                                         ecma_value_t this_arg, /**< 'this' argument value */\n                                         const ecma_value_t arguments_list_p[], /**< list of arguments\n                                                                                 *   passed to routine */\n                                         lit_magic_string_id_t lit_id) /**< internal class id */\n{\n  ecma_extended_object_t *map_object_p = ecma_op_container_get_object (this_arg, lit_id);\n\n  if (map_object_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  switch (builtin_routine_id)\n  {\n    case ECMA_CONTAINER_ROUTINE_DELETE:\n    {\n      return ecma_op_container_delete (map_object_p, arguments_list_p[0], lit_id);\n    }\n    case ECMA_CONTAINER_ROUTINE_DELETE_WEAK:\n    {\n      return ecma_op_container_delete_weak (map_object_p, arguments_list_p[0], lit_id);\n    }\n    case ECMA_CONTAINER_ROUTINE_GET:\n    {\n      return ecma_op_container_get (map_object_p, arguments_list_p[0], lit_id);\n    }\n    case ECMA_CONTAINER_ROUTINE_SET:\n    {\n      return ecma_op_container_set (map_object_p, arguments_list_p[0], arguments_list_p[1], lit_id);\n    }\n    case ECMA_CONTAINER_ROUTINE_HAS:\n    {\n      return ecma_op_container_has (map_object_p, arguments_list_p[0], lit_id);\n    }\n    case ECMA_CONTAINER_ROUTINE_FOREACH:\n    {\n      return ecma_op_container_foreach (map_object_p, arguments_list_p[0], arguments_list_p[1], lit_id);\n    }\n    case ECMA_CONTAINER_ROUTINE_SIZE_GETTER:\n    {\n      return ecma_op_container_size (map_object_p);\n    }\n    case ECMA_CONTAINER_ROUTINE_ADD:\n    {\n      return ecma_op_container_set (map_object_p, arguments_list_p[0], arguments_list_p[0], lit_id);\n    }\n    case ECMA_CONTAINER_ROUTINE_CLEAR:\n    {\n      return ecma_op_container_clear (map_object_p);\n    }\n    case ECMA_CONTAINER_ROUTINE_KEYS:\n    case ECMA_CONTAINER_ROUTINE_VALUES:\n    case ECMA_CONTAINER_ROUTINE_ENTRIES:\n    {\n      ecma_builtin_id_t builtin_iterator_prototype = ECMA_BUILTIN_ID_MAP_ITERATOR_PROTOTYPE;\n      ecma_pseudo_array_type_t iterator_type = ECMA_PSEUDO_MAP_ITERATOR;\n\n      if (lit_id != LIT_MAGIC_STRING_MAP_UL)\n      {\n        builtin_iterator_prototype = ECMA_BUILTIN_ID_SET_ITERATOR_PROTOTYPE;\n        iterator_type = ECMA_PSEUDO_SET_ITERATOR;\n      }\n\n      ecma_iterator_kind_t kind = (ecma_iterator_kind_t) (builtin_routine_id - ECMA_CONTAINER_ROUTINE_KEYS);\n\n      return ecma_op_container_create_iterator (this_arg,\n                                                builtin_iterator_prototype,\n                                                iterator_type,\n                                                kind);\n    }\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_builtin_container_dispatch_routine */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-container-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_CONTAINER_OBJECT_H\n#define ECMA_CONTAINER_OBJECT_H\n\n#include \"ecma-globals.h\"\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_CONTAINER)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmamaphelpers ECMA builtin map/set helper functions\n * @{\n */\n\n/**\n * List of built-in routine identifiers.\n */\nenum\n{\n  ECMA_CONTAINER_ROUTINE_START = 0,\n  ECMA_CONTAINER_ROUTINE_ADD,\n  ECMA_CONTAINER_ROUTINE_CLEAR,\n  ECMA_CONTAINER_ROUTINE_DELETE_WEAK,\n  ECMA_CONTAINER_ROUTINE_DELETE,\n  ECMA_CONTAINER_ROUTINE_FOREACH,\n  ECMA_CONTAINER_ROUTINE_HAS,\n  ECMA_CONTAINER_ROUTINE_SIZE_GETTER,\n  ECMA_CONTAINER_ROUTINE_GET,\n  ECMA_CONTAINER_ROUTINE_SET,\n  /* Note: These 3 routines MUST be in this order */\n  ECMA_CONTAINER_ROUTINE_KEYS,\n  ECMA_CONTAINER_ROUTINE_VALUES,\n  ECMA_CONTAINER_ROUTINE_ENTRIES\n};\n\nuint8_t ecma_op_container_entry_size (lit_magic_string_id_t lit_id);\necma_extended_object_t *ecma_op_container_get_object (ecma_value_t this_arg, lit_magic_string_id_t lit_id);\necma_value_t ecma_op_container_create (const ecma_value_t *arguments_list_p, uint32_t arguments_list_len,\n                                       lit_magic_string_id_t lit_id, ecma_builtin_id_t proto_id);\necma_value_t ecma_op_container_size (ecma_extended_object_t *map_object_p);\necma_value_t ecma_op_container_get (ecma_extended_object_t *map_object_p, ecma_value_t key_arg,\n                                    lit_magic_string_id_t lit_id);\necma_value_t ecma_op_container_foreach (ecma_extended_object_t *map_object_p, ecma_value_t predicate,\n                                        ecma_value_t predicate_this_arg, lit_magic_string_id_t lit_id);\necma_value_t ecma_op_container_has (ecma_extended_object_t *map_object_p, ecma_value_t key_arg,\n                                    lit_magic_string_id_t lit_id);\necma_value_t ecma_op_container_set (ecma_extended_object_t *map_object_p, ecma_value_t key_arg,\n                                    ecma_value_t value_arg, lit_magic_string_id_t lit_id);\necma_value_t ecma_op_container_clear (ecma_extended_object_t *map_object_p);\necma_value_t ecma_op_container_delete (ecma_extended_object_t *map_object_p, ecma_value_t key_arg,\n                                       lit_magic_string_id_t lit_id);\necma_value_t ecma_op_container_delete_weak (ecma_extended_object_t *map_object_p, ecma_value_t key_arg,\n                                            lit_magic_string_id_t lit_id);\nvoid ecma_op_container_unref_weak (ecma_object_t *object_p, ecma_value_t ref_holder);\nvoid ecma_op_container_remove_weak_entry (ecma_object_t *container_p, ecma_value_t key_arg);\nvoid ecma_op_container_free_entries (ecma_object_t *object_p);\necma_value_t ecma_op_container_create_iterator (ecma_value_t this_arg,\n                                                ecma_builtin_id_t proto_id,\n                                                ecma_pseudo_array_type_t iterator_type,\n                                                ecma_iterator_kind_t kind);\necma_value_t ecma_op_container_iterator_next (ecma_value_t this_val, ecma_pseudo_array_type_t iterator_type);\necma_value_t ecma_builtin_container_dispatch_routine (uint16_t builtin_routine_id, ecma_value_t this_arg,\n                                                      const ecma_value_t arguments_list_p[],\n                                                      lit_magic_string_id_t lit_id);\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */\n\n#endif /* !ECMA_CONTAINER_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-conversion.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Implementation of ECMA-defined conversion routines\n */\n\n#include <math.h>\n\n#include \"ecma-alloc.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-bigint-object.h\"\n#include \"ecma-boolean-object.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-number-object.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-string-object.h\"\n#include \"ecma-symbol-object.h\"\n#include \"jrt-libc-includes.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaconversion ECMA conversion routines\n * @{\n */\n\n/**\n * RequireObjectCoercible operation.\n *\n * See also:\n *          ECMA-262 v11, 7.2.1\n *\n * @return true - if the value can be coerced to object without any exceptions\n *         false - otherwise\n */\nbool\necma_op_require_object_coercible (ecma_value_t value) /**< ecma value */\n{\n  ecma_check_value_type_is_spec_defined (value);\n\n  if (ecma_is_value_undefined (value) || ecma_is_value_null (value))\n  {\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Argument cannot be converted to an object.\"));\n    return false;\n  }\n\n  return true;\n} /* ecma_op_require_object_coercible */\n\n/**\n * SameValue operation.\n *\n * See also:\n *          ECMA-262 v5, 9.12\n *\n * @return true - if the value are same according to ECMA-defined SameValue algorithm,\n *         false - otherwise\n */\nbool\necma_op_same_value (ecma_value_t x, /**< ecma value */\n                    ecma_value_t y) /**< ecma value */\n{\n  if (x == y)\n  {\n    return true;\n  }\n\n  ecma_type_t type_of_x = ecma_get_value_type_field (x);\n\n  if (type_of_x != ecma_get_value_type_field (y)\n      || type_of_x == ECMA_TYPE_DIRECT)\n  {\n    return false;\n  }\n\n  if (ecma_is_value_number (x))\n  {\n    ecma_number_t x_num = ecma_get_number_from_value (x);\n    ecma_number_t y_num = ecma_get_number_from_value (y);\n\n    bool is_x_nan = ecma_number_is_nan (x_num);\n    bool is_y_nan = ecma_number_is_nan (y_num);\n\n    if (is_x_nan || is_y_nan)\n    {\n      return is_x_nan && is_y_nan;\n    }\n\n    if (ecma_number_is_zero (x_num)\n        && ecma_number_is_zero (y_num)\n        && ecma_number_is_negative (x_num) != ecma_number_is_negative (y_num))\n    {\n      return false;\n    }\n\n    return (x_num == y_num);\n  }\n\n  if (ecma_is_value_string (x))\n  {\n    ecma_string_t *x_str_p = ecma_get_string_from_value (x);\n    ecma_string_t *y_str_p = ecma_get_string_from_value (y);\n\n    return ecma_compare_ecma_strings (x_str_p, y_str_p);\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (ecma_is_value_bigint (x))\n  {\n    return (ecma_is_value_bigint (y) && ecma_bigint_compare_to_bigint (x, y) == 0);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  JERRY_ASSERT (ecma_is_value_object (x) || ecma_is_value_symbol (x));\n\n  return false;\n} /* ecma_op_same_value */\n\n#if ENABLED (JERRY_BUILTIN_MAP)\n/**\n * SameValueZero operation.\n *\n * See also:\n *          ECMA-262 v6, 7.2.10\n *\n * @return true - if the value are same according to ECMA-defined SameValueZero algorithm,\n *         false - otherwise\n */\nbool\necma_op_same_value_zero (ecma_value_t x, /**< ecma value */\n                         ecma_value_t y, /**< ecma value */\n                         bool strict_equality) /**< strict equality */\n{\n  if (ecma_is_value_number (x) && ecma_is_value_number (y))\n  {\n    ecma_number_t x_num = ecma_get_number_from_value (x);\n    ecma_number_t y_num = ecma_get_number_from_value (y);\n\n    bool is_x_nan = ecma_number_is_nan (x_num);\n    bool is_y_nan = ecma_number_is_nan (y_num);\n\n    if (strict_equality\n        && is_x_nan\n        && is_y_nan)\n    {\n      return false;\n    }\n\n    if (is_x_nan || is_y_nan)\n    {\n      return (is_x_nan && is_y_nan);\n    }\n\n    if (ecma_number_is_zero (x_num)\n        && ecma_number_is_zero (y_num)\n        && ecma_number_is_negative (x_num) != ecma_number_is_negative (y_num))\n    {\n      return true;\n    }\n\n    return (x_num == y_num);\n  }\n\n  return ecma_op_same_value (x, y);\n} /* ecma_op_same_value_zero */\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n\n/**\n * ToPrimitive operation.\n *\n * See also:\n *          ECMA-262 v5, 9.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_to_primitive (ecma_value_t value, /**< ecma value */\n                      ecma_preferred_type_hint_t preferred_type) /**< preferred type hint */\n{\n  ecma_check_value_type_is_spec_defined (value);\n\n  if (ecma_is_value_object (value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (value);\n\n    return ecma_op_object_default_value (obj_p, preferred_type);\n  }\n  else\n  {\n    return ecma_copy_value (value);\n  }\n} /* ecma_op_to_primitive */\n\n/**\n * ToBoolean operation. Cannot throw an exception.\n *\n * See also:\n *          ECMA-262 v5, 9.2\n *\n * @return true - if the logical value is true\n *         false - otherwise\n */\nbool\necma_op_to_boolean (ecma_value_t value) /**< ecma value */\n{\n  ecma_check_value_type_is_spec_defined (value);\n\n  if (ecma_is_value_simple (value))\n  {\n    JERRY_ASSERT (ecma_is_value_boolean (value)\n                  || ecma_is_value_undefined (value)\n                  || ecma_is_value_null (value));\n\n    return ecma_is_value_true (value);\n  }\n\n  if (ecma_is_value_integer_number (value))\n  {\n    return (value != ecma_make_integer_value (0));\n  }\n\n  if (ecma_is_value_float_number (value))\n  {\n    ecma_number_t num = ecma_get_float_from_value (value);\n\n    return (!ecma_number_is_nan (num) && !ecma_number_is_zero (num));\n  }\n\n  if (ecma_is_value_string (value))\n  {\n    ecma_string_t *str_p = ecma_get_string_from_value (value);\n\n    return !ecma_string_is_empty (str_p);\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (ecma_is_value_bigint (value))\n  {\n    return value != ECMA_BIGINT_ZERO;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  JERRY_ASSERT (ecma_is_value_object (value) || ecma_is_value_symbol (value));\n\n  return true;\n} /* ecma_op_to_boolean */\n\n/**\n * ToNumber operation.\n *\n * See also:\n *          ECMA-262 v5, 9.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_op_to_number (ecma_value_t value, /**< ecma value */\n                   ecma_number_t *number_p) /**< [out] ecma number */\n{\n  return ecma_op_to_numeric (value, number_p, ECMA_TO_NUMERIC_NO_OPTS);\n} /* ecma_op_to_number */\n\n/**\n * Helper to get the numeric value of an ecma value\n *\n * See also:\n *          ECMA-262 v11, 7.1.3\n *\n * @return ECMA_VALUE_EMPTY if converted to number, BigInt if\n *         converted to BigInt, and conversion error otherwise\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_to_numeric (ecma_value_t value, /**< ecma value */\n                    ecma_number_t *number_p, /**< [out] ecma number */\n                    ecma_to_numeric_options_t options) /**< option bits */\n{\n  JERRY_UNUSED (options);\n\n  if (ecma_is_value_integer_number (value))\n  {\n    *number_p = (ecma_number_t) ecma_get_integer_from_value (value);\n    return ECMA_VALUE_EMPTY;\n  }\n\n  if (ecma_is_value_float_number (value))\n  {\n    *number_p = ecma_get_float_from_value (value);\n    return ECMA_VALUE_EMPTY;\n  }\n\n  if (ecma_is_value_string (value))\n  {\n    ecma_string_t *str_p = ecma_get_string_from_value (value);\n    *number_p = ecma_string_to_number (str_p);\n    return ECMA_VALUE_EMPTY;\n  }\n\n  if (ecma_is_value_undefined (value))\n  {\n    *number_p = ecma_number_make_nan ();\n    return ECMA_VALUE_EMPTY;\n  }\n\n  if (ecma_is_value_null (value))\n  {\n    *number_p = 0;\n    return ECMA_VALUE_EMPTY;\n  }\n\n  if (ecma_is_value_true (value))\n  {\n    *number_p = 1;\n    return ECMA_VALUE_EMPTY;\n  }\n\n  if (ecma_is_value_false (value))\n  {\n    *number_p = 0;\n    return ECMA_VALUE_EMPTY;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (ecma_is_value_symbol (value))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot convert a Symbol value to a number.\"));\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (ecma_is_value_bigint (value))\n  {\n    if (options & ECMA_TO_NUMERIC_ALLOW_BIGINT)\n    {\n      return ecma_copy_value (value);\n    }\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot convert a BigInt value to a number\"));\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  JERRY_ASSERT (ecma_is_value_object (value));\n\n  ecma_object_t *object_p = ecma_get_object_from_value (value);\n\n  ecma_value_t def_value = ecma_op_object_default_value (object_p, ECMA_PREFERRED_TYPE_NUMBER);\n\n  if (ECMA_IS_VALUE_ERROR (def_value))\n  {\n    return def_value;\n  }\n\n  ecma_value_t ret_value = ecma_op_to_numeric (def_value, number_p, options);\n\n  ecma_fast_free_value (def_value);\n\n  return ret_value;\n} /* ecma_op_to_numeric */\n\n/**\n * ToString operation.\n *\n * See also:\n *          ECMA-262 v5, 9.8\n *\n * @return NULL - if the conversion fails\n *         pointer to the string descriptor - otherwise\n */\necma_string_t *\necma_op_to_string (ecma_value_t value) /**< ecma value */\n{\n  ecma_check_value_type_is_spec_defined (value);\n\n  if (ecma_is_value_string (value))\n  {\n    ecma_string_t *res_p = ecma_get_string_from_value (value);\n    ecma_ref_ecma_string (res_p);\n    return res_p;\n  }\n\n  if (ecma_is_value_integer_number (value))\n  {\n    ecma_integer_value_t num = ecma_get_integer_from_value (value);\n\n    if (num < 0)\n    {\n      return ecma_new_ecma_string_from_number ((ecma_number_t) num);\n    }\n    else\n    {\n      return ecma_new_ecma_string_from_uint32 ((uint32_t) num);\n    }\n  }\n\n  if (ecma_is_value_float_number (value))\n  {\n    ecma_number_t num = ecma_get_float_from_value (value);\n    return ecma_new_ecma_string_from_number (num);\n  }\n\n  if (ecma_is_value_undefined (value))\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING_UNDEFINED);\n  }\n\n  if (ecma_is_value_null (value))\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING_NULL);\n  }\n\n  if (ecma_is_value_true (value))\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING_TRUE);\n  }\n\n  if (ecma_is_value_false (value))\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING_FALSE);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (ecma_is_value_symbol (value))\n  {\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot convert a Symbol value to a string.\"));\n    return NULL;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (ecma_is_value_bigint (value))\n  {\n    return ecma_bigint_to_string (value, 10);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  JERRY_ASSERT (ecma_is_value_object (value));\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (value);\n\n  ecma_value_t def_value = ecma_op_object_default_value (obj_p, ECMA_PREFERRED_TYPE_STRING);\n\n  if (ECMA_IS_VALUE_ERROR (def_value))\n  {\n    return NULL;\n  }\n\n  ecma_string_t *ret_string_p = ecma_op_to_string (def_value);\n\n  ecma_free_value (def_value);\n\n  return ret_string_p;\n} /* ecma_op_to_string */\n\n/**\n * ToPropertyKey operation.\n *\n * See also:\n *   ECMA 262 v6, 7.1.14\n *   ECMA 262 v10, 7.1.14\n *   ECMA 262 v11, 7.1.19\n *\n * @return NULL - if the conversion fails\n *         ecma-string - otherwise\n */\necma_string_t *\necma_op_to_property_key (ecma_value_t value) /**< ecma value */\n{\n  /* Fast path for strings and symbols */\n  if (JERRY_LIKELY (ecma_is_value_prop_name (value)))\n  {\n    ecma_string_t *key_p = ecma_get_prop_name_from_value (value);\n    ecma_ref_ecma_string (key_p);\n    return key_p;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t key = ecma_op_to_primitive (value, ECMA_PREFERRED_TYPE_STRING);\n\n  if (ECMA_IS_VALUE_ERROR (key))\n  {\n    return NULL;\n  }\n\n  if (ecma_is_value_symbol (key))\n  {\n    ecma_string_t *symbol_p = ecma_get_symbol_from_value (key);\n    return symbol_p;\n  }\n\n  ecma_string_t *result = ecma_op_to_string (key);\n  ecma_free_value (key);\n\n  return result;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_check_value_type_is_spec_defined (value);\n\n  return ecma_op_to_string (value);\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_op_to_property_key */\n\n/**\n * ToObject operation.\n *\n * See also:\n *          ECMA-262 v5, 9.9\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_to_object (ecma_value_t value) /**< ecma value */\n{\n  ecma_check_value_type_is_spec_defined (value);\n  ecma_builtin_id_t proto_id = ECMA_BUILTIN_ID_OBJECT_PROTOTYPE;\n  uint16_t lit_id;\n\n  if (ecma_is_value_number (value))\n  {\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n    proto_id =  ECMA_BUILTIN_ID_NUMBER_PROTOTYPE;\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n    lit_id = LIT_MAGIC_STRING_NUMBER_UL;\n  }\n  else if (ecma_is_value_string (value))\n  {\n#if ENABLED (JERRY_BUILTIN_STRING)\n    proto_id = ECMA_BUILTIN_ID_STRING_PROTOTYPE;\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n    lit_id = LIT_MAGIC_STRING_STRING_UL;\n  }\n  else if (ecma_is_value_object (value))\n  {\n    return ecma_copy_value (value);\n  }\n#if ENABLED (JERRY_ESNEXT)\n  else if (ecma_is_value_symbol (value))\n  {\n    proto_id = ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE;\n    lit_id = LIT_MAGIC_STRING_SYMBOL_UL;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  else if (ecma_is_value_bigint (value))\n  {\n    return ecma_op_create_bigint_object (value);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  else\n  {\n    if (ecma_is_value_undefined (value)\n        || ecma_is_value_null (value))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument cannot be converted to an object.\"));\n    }\n    else\n    {\n      JERRY_ASSERT (ecma_is_value_boolean (value));\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n      proto_id = ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE;\n#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n      lit_id = LIT_MAGIC_STRING_BOOLEAN_UL;\n    }\n  }\n\n  return ecma_op_create_class_object (proto_id, value, lit_id);\n} /* ecma_op_to_object */\n\n/**\n * Create a ECMA_OBJECT_TYPE_CLASS object from the given arguments.\n *\n * @return ecma_value - constructed object\n */\necma_value_t\necma_op_create_class_object (ecma_builtin_id_t proto_id, /**< prototype id */\n                             ecma_value_t value, /**< ecma value */\n                             uint16_t class_id) /**< magic string id */\n{\n  ecma_object_t *object_p = ecma_create_object (ecma_builtin_get (proto_id),\n                                                sizeof (ecma_extended_object_t),\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.class_prop.class_id = class_id;\n  ext_object_p->u.class_prop.u.value = ecma_copy_value_if_not_object (value);\n\n  return ecma_make_object_value (object_p);\n} /* ecma_op_create_class_object */\n\n/**\n * FromPropertyDescriptor operation.\n *\n * See also:\n *          ECMA-262 v5, 8.10.4\n *\n * @return constructed object\n */\necma_object_t *\necma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_desc_p) /**< property descriptor */\n{\n  /* 2. */\n  ecma_object_t *obj_p = ecma_op_create_object_object_noarg ();\n\n  ecma_value_t completion;\n  ecma_property_descriptor_t prop_desc = ecma_make_empty_property_descriptor ();\n  {\n    prop_desc.flags = (ECMA_PROP_IS_VALUE_DEFINED\n                       | ECMA_PROP_IS_WRITABLE_DEFINED\n                       | ECMA_PROP_IS_WRITABLE\n                       | ECMA_PROP_IS_ENUMERABLE_DEFINED\n                       | ECMA_PROP_IS_ENUMERABLE\n                       | ECMA_PROP_IS_CONFIGURABLE_DEFINED\n                       | ECMA_PROP_IS_CONFIGURABLE);\n  }\n\n  /* 3. */\n  if (src_prop_desc_p->flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED))\n  {\n    JERRY_ASSERT ((prop_desc.flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED))\n                   == (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED));\n\n    /* a. */\n    prop_desc.value = src_prop_desc_p->value;\n\n    completion = ecma_op_object_define_own_property (obj_p,\n                                                     ecma_get_magic_string (LIT_MAGIC_STRING_VALUE),\n                                                     &prop_desc);\n    JERRY_ASSERT (ecma_is_value_true (completion));\n\n    /* b. */\n    prop_desc.value = ecma_make_boolean_value (src_prop_desc_p->flags & ECMA_PROP_IS_WRITABLE);\n\n    completion = ecma_op_object_define_own_property (obj_p,\n                                                     ecma_get_magic_string (LIT_MAGIC_STRING_WRITABLE),\n                                                     &prop_desc);\n    JERRY_ASSERT (ecma_is_value_true (completion));\n  }\n  else\n  {\n#if !ENABLED (JERRY_ESNEXT)\n    JERRY_ASSERT (src_prop_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED));\n#else /* ENABLED (JERRY_ESNEXT) */\n    if (src_prop_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n      /* a. */\n      if (src_prop_desc_p->get_p == NULL)\n      {\n        prop_desc.value = ECMA_VALUE_UNDEFINED;\n      }\n      else\n      {\n        prop_desc.value = ecma_make_object_value (src_prop_desc_p->get_p);\n      }\n\n      completion = ecma_op_object_define_own_property (obj_p,\n                                                       ecma_get_magic_string (LIT_MAGIC_STRING_GET),\n                                                       &prop_desc);\n      JERRY_ASSERT (ecma_is_value_true (completion));\n\n      /* b. */\n      if (src_prop_desc_p->set_p == NULL)\n      {\n        prop_desc.value = ECMA_VALUE_UNDEFINED;\n      }\n      else\n      {\n        prop_desc.value = ecma_make_object_value (src_prop_desc_p->set_p);\n      }\n\n      completion = ecma_op_object_define_own_property (obj_p,\n                                                       ecma_get_magic_string (LIT_MAGIC_STRING_SET),\n                                                       &prop_desc);\n      JERRY_ASSERT (ecma_is_value_true (completion));\n    }\n  }\n\n  prop_desc.value = ecma_make_boolean_value (src_prop_desc_p->flags & ECMA_PROP_IS_ENUMERABLE);\n\n  completion = ecma_op_object_define_own_property (obj_p,\n                                                   ecma_get_magic_string (LIT_MAGIC_STRING_ENUMERABLE),\n                                                   &prop_desc);\n  JERRY_ASSERT (ecma_is_value_true (completion));\n\n  prop_desc.value = ecma_make_boolean_value (src_prop_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE);\n\n  completion = ecma_op_object_define_own_property (obj_p,\n                                                   ecma_get_magic_string (LIT_MAGIC_STRING_CONFIGURABLE),\n                                                   &prop_desc);\n  JERRY_ASSERT (ecma_is_value_true (completion));\n\n  return obj_p;\n} /* ecma_op_from_property_descriptor */\n\n/**\n * ToPropertyDescriptor operation.\n *\n * See also:\n *          ECMA-262 v5, 8.10.5\n *\n * @return ECMA_VALUE_EMPTY if successful, ECMA_VALUE_ERROR otherwise\n */\necma_value_t\necma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */\n                                ecma_property_descriptor_t *out_prop_desc_p) /**< [out] filled property descriptor\n                                                                              *   if the operation is successful,\n                                                                              *   unmodified otherwise */\n{\n  /* 1. */\n  if (!ecma_is_value_object (obj_value))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Expected an object.\"));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_value);\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n\n  /* 3. */\n  ecma_value_t enumerable_prop_value = ecma_op_object_find (obj_p,\n                                                            ecma_get_magic_string (LIT_MAGIC_STRING_ENUMERABLE));\n\n  if (ECMA_IS_VALUE_ERROR (enumerable_prop_value))\n  {\n    return enumerable_prop_value;\n  }\n\n  /* 2. */\n  ecma_property_descriptor_t prop_desc = ecma_make_empty_property_descriptor ();\n\n  if (ecma_is_value_found (enumerable_prop_value))\n  {\n    uint32_t is_enumerable = (ecma_op_to_boolean (enumerable_prop_value) ? ECMA_PROP_IS_ENUMERABLE\n                                                                         : ECMA_PROP_NO_OPTS);\n\n    prop_desc.flags |= (uint16_t) (ECMA_PROP_IS_ENUMERABLE_DEFINED | is_enumerable);\n\n    ecma_free_value (enumerable_prop_value);\n  }\n\n  /* 4. */\n  ecma_value_t configurable_prop_value = ecma_op_object_find (obj_p,\n                                                              ecma_get_magic_string (LIT_MAGIC_STRING_CONFIGURABLE));\n\n  if (ECMA_IS_VALUE_ERROR (configurable_prop_value))\n  {\n    goto free_desc;\n  }\n\n  if (ecma_is_value_found (configurable_prop_value))\n  {\n    uint32_t is_configurable = (ecma_op_to_boolean (configurable_prop_value) ? ECMA_PROP_IS_CONFIGURABLE\n                                                                             : ECMA_PROP_NO_OPTS);\n\n    prop_desc.flags |= (uint16_t) (ECMA_PROP_IS_CONFIGURABLE_DEFINED | is_configurable);\n\n    ecma_free_value (configurable_prop_value);\n  }\n\n  /* 5. */\n  ecma_value_t value_prop_value = ecma_op_object_find (obj_p,\n                                                       ecma_get_magic_string (LIT_MAGIC_STRING_VALUE));\n\n  if (ECMA_IS_VALUE_ERROR (value_prop_value))\n  {\n    goto free_desc;\n  }\n\n  if (ecma_is_value_found (value_prop_value))\n  {\n    prop_desc.flags |= ECMA_PROP_IS_VALUE_DEFINED;\n    prop_desc.value = ecma_copy_value (value_prop_value);\n    ecma_free_value (value_prop_value);\n  }\n\n  /* 6. */\n  ecma_value_t writable_prop_value = ecma_op_object_find (obj_p,\n                                                          ecma_get_magic_string (LIT_MAGIC_STRING_WRITABLE));\n\n  if (ECMA_IS_VALUE_ERROR (writable_prop_value))\n  {\n    goto free_desc;\n  }\n\n  if (ecma_is_value_found (writable_prop_value))\n  {\n    uint32_t is_writable = (ecma_op_to_boolean (writable_prop_value) ? ECMA_PROP_IS_WRITABLE\n                                                                     : ECMA_PROP_NO_OPTS);\n\n    prop_desc.flags |= (uint16_t) (ECMA_PROP_IS_WRITABLE_DEFINED | is_writable);\n\n    ecma_free_value (writable_prop_value);\n  }\n\n  /* 7. */\n  ecma_value_t get_prop_value = ecma_op_object_find (obj_p,\n                                                      ecma_get_magic_string (LIT_MAGIC_STRING_GET));\n\n  if (ECMA_IS_VALUE_ERROR (get_prop_value))\n  {\n    goto free_desc;\n  }\n\n  if (ecma_is_value_found (get_prop_value))\n  {\n    if (!ecma_op_is_callable (get_prop_value)\n        && !ecma_is_value_undefined (get_prop_value))\n    {\n      ecma_free_value (get_prop_value);\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Expected a function.\"));\n      goto free_desc;\n    }\n\n    prop_desc.flags |= ECMA_PROP_IS_GET_DEFINED;\n\n    if (ecma_is_value_undefined (get_prop_value))\n    {\n      prop_desc.get_p = NULL;\n    }\n    else\n    {\n      JERRY_ASSERT (ecma_is_value_object (get_prop_value));\n\n      ecma_object_t *get_p = ecma_get_object_from_value (get_prop_value);\n      ecma_ref_object (get_p);\n\n      prop_desc.get_p = get_p;\n    }\n\n    ecma_free_value (get_prop_value);\n  }\n\n  /* 8. */\n  ecma_value_t set_prop_value = ecma_op_object_find (obj_p,\n                                                      ecma_get_magic_string (LIT_MAGIC_STRING_SET));\n\n  if (ECMA_IS_VALUE_ERROR (set_prop_value))\n  {\n    goto free_desc;\n  }\n\n  if (ecma_is_value_found (set_prop_value))\n  {\n    if (!ecma_op_is_callable (set_prop_value)\n        && !ecma_is_value_undefined (set_prop_value))\n    {\n      ecma_free_value (set_prop_value);\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Expected a function.\"));\n      goto free_desc;\n    }\n\n    prop_desc.flags |= ECMA_PROP_IS_SET_DEFINED;\n\n    if (ecma_is_value_undefined (set_prop_value))\n    {\n      prop_desc.set_p = NULL;\n    }\n    else\n    {\n      JERRY_ASSERT (ecma_is_value_object (set_prop_value));\n\n      ecma_object_t *set_p = ecma_get_object_from_value (set_prop_value);\n      ecma_ref_object (set_p);\n\n      prop_desc.set_p = set_p;\n    }\n\n    ecma_free_value (set_prop_value);\n  }\n\n  /* 9. */\n  if ((prop_desc.flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED))\n        && (prop_desc.flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)))\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Accessors cannot be writable.\"));\n  }\n  else\n  {\n    *out_prop_desc_p = prop_desc;\n    ret_value = ECMA_VALUE_EMPTY;\n  }\n\nfree_desc:\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    ecma_free_property_descriptor (&prop_desc);\n  }\n\n  return ret_value;\n} /* ecma_op_to_property_descriptor */\n\n/**\n * IsInteger operation.\n *\n * See also:\n *          ECMA-262 v5, 9.4\n *          ECMA-262 v6, 7.1.4\n *\n * @return true - if the argument is integer\n *              false - otherwise\n */\nbool\necma_op_is_integer (ecma_number_t num) /**< ecma number */\n{\n\n  if (ecma_number_is_nan (num) || ecma_number_is_infinity (num))\n  {\n    return false;\n  }\n\n  ecma_number_t floor_fabs = (ecma_number_t) floor (fabs (num));\n  ecma_number_t fabs_value = (ecma_number_t) fabs (num);\n\n  return (floor_fabs == fabs_value);\n} /* ecma_op_is_integer*/\n/**\n * ToInteger operation.\n *\n * See also:\n *          ECMA-262 v5, 9.4\n *          ECMA-262 v6, 7.1.4\n *\n * @return ECMA_VALUE_EMPTY if successful\n *         conversion error otherwise\n */\necma_value_t\necma_op_to_integer (ecma_value_t value, /**< ecma value */\n                    ecma_number_t *number_p) /**< [out] ecma number */\n{\n  if (ECMA_IS_VALUE_ERROR (value))\n  {\n    return value;\n  }\n\n  /* 1 */\n  ecma_value_t to_number = ecma_op_to_number (value, number_p);\n\n  /* 2 */\n  if (ECMA_IS_VALUE_ERROR (to_number))\n  {\n    return to_number;\n  }\n\n  ecma_number_t number = *number_p;\n\n  /* 3 */\n  if (ecma_number_is_nan (number))\n  {\n    *number_p = ECMA_NUMBER_ZERO;\n    return ECMA_VALUE_EMPTY;\n  }\n\n  /* 4 */\n  if (ecma_number_is_zero (number) || ecma_number_is_infinity (number))\n  {\n    return ECMA_VALUE_EMPTY;\n  }\n\n  ecma_number_t floor_fabs = (ecma_number_t) floor (fabs (number));\n  /* 5 */\n  *number_p = ecma_number_is_negative (number) ? -floor_fabs : floor_fabs;\n  return ECMA_VALUE_EMPTY;\n} /* ecma_op_to_integer */\n\n/**\n * ToLength operation.\n *\n * See also:\n *          ECMA-262 v6, 7.1.15\n *\n * @return ECMA_VALUE_EMPTY if successful\n *         conversion error otherwise\n */\necma_value_t\necma_op_to_length (ecma_value_t value, /**< ecma value */\n                   ecma_length_t *length) /**< [out] ecma number */\n{\n  /* 1 */\n  if (ECMA_IS_VALUE_ERROR (value))\n  {\n    return value;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  /* 2 */\n  ecma_number_t num;\n  ecma_value_t length_num = ecma_op_to_integer (value, &num);\n\n  /* 3 */\n  if (ECMA_IS_VALUE_ERROR (length_num))\n  {\n    return length_num;\n  }\n\n  /* 4 */\n  if (num <= 0.0f)\n  {\n    *length = 0;\n    return ECMA_VALUE_EMPTY;\n  }\n\n  /* 5 */\n  if (num >= ECMA_NUMBER_MAX_SAFE_INTEGER)\n  {\n    *length = (ecma_length_t) ECMA_NUMBER_MAX_SAFE_INTEGER;\n    return ECMA_VALUE_EMPTY;\n  }\n\n  /* 6 */\n  *length = (ecma_length_t) num;\n  return ECMA_VALUE_EMPTY;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  /* In the case of ES5, ToLength(ES6) operation is the same as ToUint32(ES5) */\n  ecma_number_t num;\n  ecma_value_t to_number = ecma_op_to_number (value, &num);\n\n  /* 2 */\n  if (ECMA_IS_VALUE_ERROR (to_number))\n  {\n    return to_number;\n  }\n\n  *length = ecma_number_to_uint32 (num);\n  return ECMA_VALUE_EMPTY;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_op_to_length */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * ToIndex operation.\n *\n * See also:\n *          ECMA-262 v11, 7.1.22\n *\n * @return ECMA_VALUE_EMPTY if successful\n *         conversion error otherwise\n */\necma_value_t\necma_op_to_index (ecma_value_t value, /**< ecma value */\n                  ecma_number_t *index) /**< [out] ecma number */\n{\n  /* 1. */\n  if (ecma_is_value_undefined (value))\n  {\n    *index = 0;\n    return ECMA_VALUE_EMPTY;\n  }\n\n  /* 2.a */\n  ecma_number_t integer_index;\n  ecma_value_t index_value = ecma_op_to_integer (value, &integer_index);\n\n  if (ECMA_IS_VALUE_ERROR (index_value))\n  {\n    return index_value;\n  }\n\n  /* 2.b - 2.d */\n  if (integer_index < 0.0f || integer_index > ECMA_NUMBER_MAX_SAFE_INTEGER)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid or out-of-range index\"));\n  }\n\n  /* 3. */\n  *index = integer_index;\n  return ECMA_VALUE_EMPTY;\n} /* ecma_op_to_index */\n\n/**\n * CreateListFromArrayLike operation.\n * Different types are not handled yet.\n *\n * See also:\n *          ECMA-262 v6, 7.3.17\n *\n * @return ecma_collection_t if successful\n *         NULL otherwise\n */\necma_collection_t *\necma_op_create_list_from_array_like (ecma_value_t arr,  /**< array value */\n                                     bool prop_names_only) /**< true - accept only property names\n                                                                false - otherwise */\n{\n  /* 1. */\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (arr));\n\n  /* 3. */\n  if (!ecma_is_value_object (arr))\n  {\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not an Object.\"));\n    return NULL;\n  }\n  ecma_object_t *obj_p = ecma_get_object_from_value (arr);\n\n  /* 4. 5. */\n  ecma_length_t len;\n  if (ECMA_IS_VALUE_ERROR (ecma_op_object_get_length (obj_p, &len)))\n  {\n    return NULL;\n  }\n\n  /* 6. */\n  ecma_collection_t *list_ptr = ecma_new_collection ();\n\n  /* 7. 8. */\n  for (ecma_length_t idx = 0; idx < len; idx++)\n  {\n    ecma_value_t next = ecma_op_object_get_by_index (obj_p, idx);\n    if (ECMA_IS_VALUE_ERROR (next))\n    {\n      ecma_collection_free (list_ptr);\n      return NULL;\n    }\n\n    if (prop_names_only\n        && !ecma_is_value_prop_name (next))\n    {\n      ecma_free_value (next);\n      ecma_collection_free (list_ptr);\n      ecma_raise_type_error (ECMA_ERR_MSG (\"Property name is neither Symbol nor String.\"));\n      return NULL;\n    }\n\n    ecma_collection_push_back (list_ptr, next);\n  }\n\n  /* 9. */\n  return list_ptr;\n} /* ecma_op_create_list_from_array_like */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-conversion.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_CONVERSION_H\n#define ECMA_CONVERSION_H\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-builtins.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaconversion ECMA conversion routines\n * @{\n */\n\n/**\n * Second argument of 'ToPrimitive' operation that is a hint,\n * specifying the preferred type of conversion result.\n */\ntypedef enum\n{\n  ECMA_PREFERRED_TYPE_NO = 0, /**< no preferred type is specified */\n  ECMA_PREFERRED_TYPE_NUMBER, /**< Number */\n  ECMA_PREFERRED_TYPE_STRING /**< String */\n} ecma_preferred_type_hint_t;\n\n/**\n * Option bits for ecma_op_to_numeric.\n */\ntypedef enum\n{\n  ECMA_TO_NUMERIC_NO_OPTS = 0, /**< no options (same as toNumber operation) */\n  ECMA_TO_NUMERIC_ALLOW_BIGINT = (1 << 0), /**< allow BigInt values (ignored if BigInts are disabled) */\n} ecma_to_numeric_options_t;\n\nbool ecma_op_require_object_coercible (ecma_value_t value);\nbool ecma_op_same_value (ecma_value_t x, ecma_value_t y);\n#if ENABLED (JERRY_BUILTIN_MAP)\nbool ecma_op_same_value_zero (ecma_value_t x, ecma_value_t y, bool strict_equality);\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\necma_value_t ecma_op_to_primitive (ecma_value_t value, ecma_preferred_type_hint_t preferred_type);\nbool ecma_op_to_boolean (ecma_value_t value);\necma_value_t ecma_op_to_number (ecma_value_t value, ecma_number_t *number_p);\necma_value_t ecma_op_to_numeric (ecma_value_t value, ecma_number_t *number_p, ecma_to_numeric_options_t options);\necma_string_t *ecma_op_to_string (ecma_value_t value);\necma_string_t *ecma_op_to_property_key (ecma_value_t value);\necma_value_t ecma_op_to_object (ecma_value_t value);\nbool ecma_op_is_integer (ecma_number_t value);\necma_value_t ecma_op_create_class_object (ecma_builtin_id_t proto_id,\n                                          ecma_value_t value,\n                                          uint16_t lit_id);\necma_value_t ecma_op_to_integer (ecma_value_t value, ecma_number_t *number_p);\necma_value_t ecma_op_to_length (ecma_value_t value, ecma_length_t *length);\n#if ENABLED (JERRY_ESNEXT)\necma_value_t ecma_op_to_index (ecma_value_t value, ecma_number_t *index);\necma_collection_t *ecma_op_create_list_from_array_like (ecma_value_t arr, bool prop_names_only);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\necma_object_t *ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_desc_p);\necma_value_t ecma_op_to_property_descriptor (ecma_value_t obj_value, ecma_property_descriptor_t *out_prop_desc_p);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_CONVERSION_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-dataview-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jcontext.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-arraybuffer-object.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-dataview-object.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"ecma-objects.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmadataviewobject ECMA builtin DataView helper functions\n * @{\n */\n\n/**\n * Handle calling [[Construct]] of built-in DataView like objects\n *\n * See also:\n *          ECMA-262 v11, 24.3.2.1\n *\n * @return created DataView object as an ecma-value - if success\n *         raised error - otherwise\n */\necma_value_t\necma_op_dataview_create (const ecma_value_t *arguments_list_p, /**< arguments list */\n                         uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n  JERRY_ASSERT (JERRY_CONTEXT (current_new_target_p));\n\n  ecma_value_t buffer = arguments_list_len > 0 ? arguments_list_p[0] : ECMA_VALUE_UNDEFINED;\n\n  /* 2. */\n  if (!ecma_is_value_object (buffer))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument buffer is not an object.\"));\n  }\n\n  ecma_object_t *buffer_p = ecma_get_object_from_value (buffer);\n\n  if (!ecma_object_class_is (buffer_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument buffer is not an arraybuffer.\"));\n  }\n\n  /* 3. */\n  ecma_number_t offset = 0;\n\n  if (arguments_list_len > 1)\n  {\n    ecma_value_t offset_value = ecma_op_to_index (arguments_list_p[1], &offset);\n    if (ECMA_IS_VALUE_ERROR (offset_value))\n    {\n      return offset_value;\n    }\n  }\n\n  /* 4. */\n  if (ecma_arraybuffer_is_detached (buffer_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n  }\n\n  /* 5. */\n  ecma_number_t buffer_byte_length = ecma_arraybuffer_get_length (buffer_p);\n\n  /* 6. */\n  if (offset > buffer_byte_length)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Start offset is outside the bounds of the buffer.\"));\n  }\n\n  /* 7. */\n  uint32_t view_byte_length;\n  if (arguments_list_len > 2 && !ecma_is_value_undefined (arguments_list_p[2]))\n  {\n    /* 8.a */\n    ecma_number_t byte_length_to_index;\n    ecma_value_t byte_length_value = ecma_op_to_index (arguments_list_p[2], &byte_length_to_index);\n\n    if (ECMA_IS_VALUE_ERROR (byte_length_value))\n    {\n      return byte_length_value;\n    }\n\n    /* 8.b */\n    if (offset + byte_length_to_index > buffer_byte_length)\n    {\n      return ecma_raise_range_error (ECMA_ERR_MSG (\"Start offset is outside the bounds of the buffer.\"));\n    }\n\n    JERRY_ASSERT (byte_length_to_index <= UINT32_MAX);\n    view_byte_length = (uint32_t) byte_length_to_index;\n  }\n  else\n  {\n    /* 7.a */\n    view_byte_length = (uint32_t) (buffer_byte_length - offset);\n  }\n\n  /* 9. */\n  ecma_object_t *prototype_obj_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                           ECMA_BUILTIN_ID_DATAVIEW_PROTOTYPE);\n  if (JERRY_UNLIKELY (prototype_obj_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 10. */\n  if (ecma_arraybuffer_is_detached (buffer_p))\n  {\n    ecma_deref_object (prototype_obj_p);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n  }\n\n  /* 9. */\n  /* It must happen after 10., because uninitialized object can't be destroyed properly. */\n  ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                sizeof (ecma_dataview_object_t),\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_deref_object (prototype_obj_p);\n\n  /* 11 - 14. */\n  ecma_dataview_object_t *dataview_obj_p = (ecma_dataview_object_t *) object_p;\n  dataview_obj_p->header.u.class_prop.class_id = LIT_MAGIC_STRING_DATAVIEW_UL;\n  dataview_obj_p->header.u.class_prop.u.length = view_byte_length;\n  dataview_obj_p->buffer_p = buffer_p;\n  dataview_obj_p->byte_offset = (uint32_t) offset;\n\n  return ecma_make_object_value (object_p);\n} /* ecma_op_dataview_create */\n\n/**\n * Get the DataView object pointer\n *\n * Note:\n *   If the function returns with NULL, the error object has\n *   already set, and the caller must return with ECMA_VALUE_ERROR\n *\n * @return pointer to the dataView if this_arg is a valid dataView object\n *         NULL otherwise\n */\necma_dataview_object_t *\necma_op_dataview_get_object (ecma_value_t this_arg) /**< this argument */\n{\n  if (ecma_is_value_object (this_arg))\n  {\n    ecma_dataview_object_t *dataview_object_p = (ecma_dataview_object_t *) ecma_get_object_from_value (this_arg);\n\n    if (ecma_get_object_type (&dataview_object_p->header.object) == ECMA_OBJECT_TYPE_CLASS\n        && dataview_object_p->header.u.class_prop.class_id == LIT_MAGIC_STRING_DATAVIEW_UL)\n    {\n      return dataview_object_p;\n    }\n  }\n\n  ecma_raise_type_error (ECMA_ERR_MSG (\"Expected a DataView object.\"));\n  return NULL;\n} /* ecma_op_dataview_get_object */\n\n/**\n * Helper union to specify the system's endiannes\n */\ntypedef union\n{\n  uint32_t number; /**< for write numeric data */\n  char data[sizeof (uint32_t)]; /**< for read numeric data */\n} ecma_dataview_endiannes_check_t;\n\n/**\n * Helper function to check the current system endiannes\n *\n * @return true - if the current system has little endian byteorder\n *         false - otherwise\n */\nstatic bool\necma_dataview_check_little_endian (void)\n{\n  ecma_dataview_endiannes_check_t checker;\n  checker.number = 0x01;\n\n  return checker.data[0] == 0x01;\n} /* ecma_dataview_check_little_endian */\n\n/**\n * Helper function for swap bytes if the system's endiannes\n * does not match with the requested endiannes.\n */\nstatic void\necma_dataview_swap_order (bool system_is_little_endian, /**< true - if the system has little endian byteorder\n                                                         *   false - otherwise */\n                          bool is_little_endian, /**< true - if little endian byteorder is requested\n                                                  *   false - otherwise */\n                          uint32_t element_size, /**< element size byte according to the Table 49.*/\n                          lit_utf8_byte_t *block_p) /**< data block */\n{\n  if (system_is_little_endian ^ is_little_endian)\n  {\n    for (uint32_t i = 0; i < element_size / 2; i++)\n    {\n      lit_utf8_byte_t tmp = block_p[i];\n      block_p[i] = block_p[element_size - i -  1];\n      block_p[element_size - i - 1] = tmp;\n    }\n  }\n} /* ecma_dataview_swap_order */\n\n/**\n * GetViewValue and SetViewValue abstact operation\n *\n * See also:\n *          ECMA-262 v11, 24.3.1.1\n *          ECMA-262 v11, 24.3.1.2\n *\n * @return ecma value\n */\necma_value_t\necma_op_dataview_get_set_view_value (ecma_value_t view, /**< the operation's 'view' argument */\n                                     ecma_value_t request_index, /**< the operation's 'requestIndex' argument */\n                                     ecma_value_t is_little_endian_value, /**< the operation's\n                                                                           *   'isLittleEndian' argument */\n                                     ecma_value_t value_to_set, /**< the operation's 'value' argument */\n                                     ecma_typedarray_type_t id) /**< the operation's 'type' argument */\n{\n  /* 1 - 2. */\n  ecma_dataview_object_t *view_p = ecma_op_dataview_get_object (view);\n\n  if (JERRY_UNLIKELY (view_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_object_t *buffer_p = view_p->buffer_p;\n  JERRY_ASSERT (ecma_object_class_is (buffer_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL));\n\n  /* 3. */\n  ecma_number_t get_index;\n  ecma_value_t number_index_value = ecma_op_to_index (request_index, &get_index);\n\n  if (ECMA_IS_VALUE_ERROR (number_index_value))\n  {\n    return number_index_value;\n  }\n\n  /* SetViewValue 4 - 5. */\n  if (!ecma_is_value_empty (value_to_set))\n  {\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    if (ECMA_TYPEDARRAY_IS_BIGINT_TYPE (id))\n    {\n      value_to_set = ecma_bigint_to_bigint (value_to_set, true);\n\n      if (ECMA_IS_VALUE_ERROR (value_to_set))\n      {\n        return value_to_set;\n      }\n    }\n    else\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    {\n      ecma_number_t value_to_set_number;\n      ecma_value_t value = ecma_op_to_number (value_to_set, &value_to_set_number);\n\n      if (ECMA_IS_VALUE_ERROR (value))\n      {\n        return value;\n      }\n\n      value_to_set = ecma_make_number_value (value_to_set_number);\n    }\n  }\n\n  /* GetViewValue 4., SetViewValue 6. */\n  bool is_little_endian = ecma_op_to_boolean (is_little_endian_value);\n\n  /* GetViewValue 5 - 6., SetViewValue 7 - 8. */\n  if (ecma_arraybuffer_is_detached (buffer_p))\n  {\n    ecma_free_value (value_to_set);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n  }\n\n  /* GetViewValue 7., SetViewValue 9. */\n  uint32_t view_offset = view_p->byte_offset;\n\n  /* GetViewValue 8., SetViewValue 10. */\n  uint32_t view_size = view_p->header.u.class_prop.u.length;\n\n  /* GetViewValue 9., SetViewValue 11. */\n  uint8_t element_size = (uint8_t) (1 << (ecma_typedarray_helper_get_shift_size (id)));\n\n  /* GetViewValue 10., SetViewValue 12. */\n  if (get_index + element_size > (ecma_number_t) view_size)\n  {\n    ecma_free_value (value_to_set);\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Start offset is outside the bounds of the buffer.\"));\n  }\n\n  /* GetViewValue 11., SetViewValue 13. */\n  uint32_t buffer_index = (uint32_t) get_index + view_offset;\n  lit_utf8_byte_t *block_p = ecma_arraybuffer_get_buffer (buffer_p) + buffer_index;\n\n  bool system_is_little_endian = ecma_dataview_check_little_endian ();\n\n  /* GetViewValue 12. */\n  if (ecma_is_value_empty (value_to_set))\n  {\n    JERRY_VLA (lit_utf8_byte_t, swap_block_p, element_size);\n    memcpy (swap_block_p, block_p, element_size * sizeof (lit_utf8_byte_t));\n    ecma_dataview_swap_order (system_is_little_endian, is_little_endian, element_size, swap_block_p);\n    return ecma_get_typedarray_element (swap_block_p, id);\n  }\n\n  /* SetViewValue 14. */\n  ecma_value_t set_element = ecma_set_typedarray_element (block_p, value_to_set, id);\n  ecma_free_value (value_to_set);\n\n  if (ECMA_IS_VALUE_ERROR (set_element))\n  {\n    return set_element;\n  }\n\n  ecma_dataview_swap_order (system_is_little_endian, is_little_endian, element_size, block_p);\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_op_dataview_get_set_view_value */\n\n/**\n * Check if the value is dataview\n *\n * @return true - if value is a DataView object\n *         false - otherwise\n */\nbool\necma_is_dataview (ecma_value_t value) /**< the target need to be checked */\n{\n  if (!ecma_is_value_object (value))\n  {\n    return false;\n  }\n\n  ecma_dataview_object_t *dataview_object_p = (ecma_dataview_object_t *) ecma_get_object_from_value (value);\n\n  return (ecma_get_object_type (&dataview_object_p->header.object) == ECMA_OBJECT_TYPE_CLASS\n          && dataview_object_p->header.u.class_prop.class_id == LIT_MAGIC_STRING_DATAVIEW_UL);\n} /* ecma_is_dataview */\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-dataview-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_DATAVIEW_OBJECT_H\n#define ECMA_DATAVIEW_OBJECT_H\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmadataviewobject ECMA builtin DataView helper functions\n * @{\n */\n\necma_value_t ecma_op_dataview_create (const ecma_value_t *arguments_list_p, uint32_t arguments_list_len);\necma_dataview_object_t *ecma_op_dataview_get_object (ecma_value_t this_arg);\necma_value_t ecma_op_dataview_get_set_view_value (ecma_value_t view, ecma_value_t request_index,\n                                                  ecma_value_t little_endian, ecma_value_t value_to_set,\n                                                  ecma_typedarray_type_t id);\nbool ecma_is_dataview (ecma_value_t value);\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */\n\n#endif /* !ECMA_DATAVIEW_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-eval.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-eval.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lex-env.h\"\n#include \"js-parser.h\"\n#include \"vm.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup eval eval\n * @{\n */\n\n/**\n * Perform 'eval' with code stored in ecma-string\n *\n * See also:\n *          ecma_op_eval_chars_buffer\n *          ECMA-262 v5, 15.1.2.1 (steps 2 to 8)\n *\n * @return ecma value\n */\necma_value_t\necma_op_eval (ecma_string_t *code_p, /**< code string */\n              uint32_t parse_opts) /**< ecma_parse_opts_t option bits */\n{\n  ecma_value_t ret_value;\n\n  lit_utf8_size_t chars_num = ecma_string_get_size (code_p);\n  if (chars_num == 0)\n  {\n    ret_value = ECMA_VALUE_UNDEFINED;\n  }\n  else\n  {\n    ECMA_STRING_TO_UTF8_STRING (code_p, code_utf8_buffer_p, code_utf8_buffer_size);\n\n    ret_value = ecma_op_eval_chars_buffer (code_utf8_buffer_p,\n                                           chars_num,\n                                           parse_opts);\n\n    ECMA_FINALIZE_UTF8_STRING (code_utf8_buffer_p, code_utf8_buffer_size);\n  }\n\n  return ret_value;\n} /* ecma_op_eval */\n\n/**\n * Perform 'eval' with code stored in continuous character buffer\n *\n * See also:\n *          ecma_op_eval\n *          ECMA-262 v5, 15.1.2.1 (steps 2 to 8)\n *\n * @return ecma value\n */\necma_value_t\necma_op_eval_chars_buffer (const lit_utf8_byte_t *code_p, /**< code characters buffer */\n                           size_t code_buffer_size, /**< size of the buffer */\n                           uint32_t parse_opts) /**< ecma_parse_opts_t option bits */\n{\n#if ENABLED (JERRY_PARSER)\n  JERRY_ASSERT (code_p != NULL);\n\n  uint32_t is_strict_call = ECMA_PARSE_STRICT_MODE | ECMA_PARSE_DIRECT_EVAL;\n\n  if ((parse_opts & is_strict_call) != is_strict_call)\n  {\n    parse_opts &= (uint32_t) ~ECMA_PARSE_STRICT_MODE;\n  }\n\n  parse_opts |= ECMA_PARSE_EVAL;\n\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_CLEAR_LOCAL_PARSE_OPTS ();\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t resource_name = ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_EVAL);\n  ecma_compiled_code_t *bytecode_p = parser_parse_script (NULL,\n                                                          0,\n                                                          code_p,\n                                                          code_buffer_size,\n                                                          resource_name,\n                                                          parse_opts);\n\n  if (JERRY_UNLIKELY (bytecode_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  return vm_run_eval (bytecode_p, parse_opts);\n#else /* !ENABLED (JERRY_PARSER) */\n  JERRY_UNUSED (code_p);\n  JERRY_UNUSED (code_buffer_size);\n  JERRY_UNUSED (parse_opts);\n\n  return ecma_raise_syntax_error (ECMA_ERR_MSG (\"The parser has been disabled.\"));\n#endif /* ENABLED (JERRY_PARSER) */\n} /* ecma_op_eval_chars_buffer */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-eval.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_EVAL_H\n#define ECMA_EVAL_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup eval eval\n * @{\n */\n\necma_value_t\necma_op_eval (ecma_string_t *code_p, uint32_t parse_opts);\n\necma_value_t\necma_op_eval_chars_buffer (const lit_utf8_byte_t *code_p, size_t code_buffer_size, uint32_t parse_opts);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_EVAL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-exceptions.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdarg.h>\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-symbol-object.h\"\n#include \"jcontext.h\"\n#include \"jrt.h\"\n\n#if ENABLED (JERRY_LINE_INFO)\n#include \"vm.h\"\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup exceptions Exceptions\n * @{\n */\n\n/**\n * Map error type to error prototype.\n */\ntypedef struct\n{\n  ecma_standard_error_t error_type; /**< Native error type */\n  ecma_builtin_id_t error_prototype_id; /**< ID of the error prototype */\n} ecma_error_mapping_t;\n\n/**\n * List of error type mappings\n */\nconst ecma_error_mapping_t ecma_error_mappings[] =\n{\n#define ERROR_ELEMENT(TYPE, ID) { TYPE, ID }\n  ERROR_ELEMENT (ECMA_ERROR_COMMON,      ECMA_BUILTIN_ID_ERROR_PROTOTYPE),\n\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n  ERROR_ELEMENT (ECMA_ERROR_EVAL,        ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE),\n  ERROR_ELEMENT (ECMA_ERROR_RANGE,       ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE),\n  ERROR_ELEMENT (ECMA_ERROR_REFERENCE,   ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE),\n  ERROR_ELEMENT (ECMA_ERROR_TYPE,        ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE),\n  ERROR_ELEMENT (ECMA_ERROR_URI,         ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE),\n  ERROR_ELEMENT (ECMA_ERROR_SYNTAX,      ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE),\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n#undef ERROR_ELEMENT\n};\n\n/**\n * Standard ecma-error object constructor.\n *\n * Note:\n *    message_string_p can be NULL.\n *\n * Note:\n *    calling with ECMA_ERROR_NONE does not make sense thus it will\n *    cause a fault in the system.\n *\n * @return pointer to ecma-object representing specified error\n *         with reference counter set to one.\n */\necma_object_t *\necma_new_standard_error (ecma_standard_error_t error_type, /**< native error type */\n                         ecma_string_t *message_string_p) /**< message string */\n{\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n  ecma_builtin_id_t prototype_id = ECMA_BUILTIN_ID__COUNT;\n\n  switch (error_type)\n  {\n    case ECMA_ERROR_EVAL:\n    {\n      prototype_id = ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE;\n      break;\n    }\n\n    case ECMA_ERROR_RANGE:\n    {\n      prototype_id = ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE;\n      break;\n    }\n\n    case ECMA_ERROR_REFERENCE:\n    {\n      prototype_id = ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE;\n      break;\n    }\n\n    case ECMA_ERROR_TYPE:\n    {\n      prototype_id = ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE;\n      break;\n    }\n\n    case ECMA_ERROR_URI:\n    {\n      prototype_id = ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE;\n      break;\n    }\n\n    case ECMA_ERROR_SYNTAX:\n    {\n      prototype_id = ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE;\n      break;\n    }\n\n    default:\n    {\n      JERRY_ASSERT (error_type == ECMA_ERROR_COMMON);\n\n      prototype_id = ECMA_BUILTIN_ID_ERROR_PROTOTYPE;\n      break;\n    }\n  }\n#else\n  JERRY_UNUSED (error_type);\n  ecma_builtin_id_t prototype_id = ECMA_BUILTIN_ID_ERROR_PROTOTYPE;\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (prototype_id);\n\n  ecma_object_t *new_error_obj_p = ecma_create_object (prototype_obj_p,\n                                                       sizeof (ecma_extended_object_t),\n                                                       ECMA_OBJECT_TYPE_CLASS);\n\n  ((ecma_extended_object_t *) new_error_obj_p)->u.class_prop.class_id = LIT_MAGIC_STRING_ERROR_UL;\n\n  if (message_string_p != NULL)\n  {\n    ecma_property_value_t *prop_value_p;\n    prop_value_p = ecma_create_named_data_property (new_error_obj_p,\n                                                    ecma_get_magic_string (LIT_MAGIC_STRING_MESSAGE),\n                                                    ECMA_PROPERTY_CONFIGURABLE_WRITABLE,\n                                                    NULL);\n\n    ecma_ref_ecma_string (message_string_p);\n    prop_value_p->value = ecma_make_string_value (message_string_p);\n  }\n\n  /* Avoid calling the decorator function recursively. */\n  if (JERRY_CONTEXT (error_object_created_callback_p) != NULL\n      && !(JERRY_CONTEXT (status_flags) & ECMA_STATUS_ERROR_UPDATE))\n  {\n    JERRY_CONTEXT (status_flags) |= ECMA_STATUS_ERROR_UPDATE;\n    JERRY_CONTEXT (error_object_created_callback_p) (ecma_make_object_value (new_error_obj_p),\n                                                     JERRY_CONTEXT (error_object_created_callback_user_p));\n    JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_ERROR_UPDATE;\n  }\n  else\n  {\n#if ENABLED (JERRY_LINE_INFO)\n    /* Default decorator when line info is enabled. */\n    ecma_string_t *stack_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_STACK);\n\n    ecma_property_value_t *prop_value_p = ecma_create_named_data_property (new_error_obj_p,\n                                                                           stack_str_p,\n                                                                           ECMA_PROPERTY_CONFIGURABLE_WRITABLE,\n                                                                           NULL);\n    ecma_deref_ecma_string (stack_str_p);\n\n    ecma_value_t backtrace_value = vm_get_backtrace (0, NULL);\n\n    prop_value_p->value = backtrace_value;\n    ecma_deref_object (ecma_get_object_from_value (backtrace_value));\n#endif /* ENABLED (JERRY_LINE_INFO) */\n  }\n\n  return new_error_obj_p;\n} /* ecma_new_standard_error */\n\n/**\n * Return the error type for an Error object.\n *\n * @return one of the ecma_standard_error_t value\n *         if it is not an Error object then ECMA_ERROR_NONE will be returned\n */\necma_standard_error_t\necma_get_error_type (ecma_object_t *error_object) /**< possible error object */\n{\n  if (error_object->u2.prototype_cp == JMEM_CP_NULL || ECMA_OBJECT_IS_PROXY (error_object))\n  {\n    return ECMA_ERROR_NONE;\n  }\n\n  ecma_object_t *prototype_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, error_object->u2.prototype_cp);\n\n  uint8_t builtin_id = ecma_get_object_builtin_id (prototype_p);\n\n  for (uint8_t idx = 0; idx < sizeof (ecma_error_mappings) / sizeof (ecma_error_mappings[0]); idx++)\n  {\n    if (ecma_error_mappings[idx].error_prototype_id == builtin_id)\n    {\n      return ecma_error_mappings[idx].error_type;\n    }\n  }\n\n  return ECMA_ERROR_NONE;\n} /* ecma_get_error_type */\n\n/**\n * Raise a standard ecma-error with the given type and message.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\necma_raise_standard_error (ecma_standard_error_t error_type, /**< error type */\n                           const lit_utf8_byte_t *msg_p) /**< error message */\n{\n  ecma_object_t *error_obj_p;\n\n  if (msg_p != NULL)\n  {\n    ecma_string_t *error_msg_p = ecma_new_ecma_string_from_utf8 (msg_p,\n                                                                 lit_zt_utf8_string_size (msg_p));\n    error_obj_p = ecma_new_standard_error (error_type, error_msg_p);\n    ecma_deref_ecma_string (error_msg_p);\n  }\n  else\n  {\n    error_obj_p = ecma_new_standard_error (error_type, NULL);\n  }\n\n  jcontext_raise_exception (ecma_make_object_value (error_obj_p));\n  return ECMA_VALUE_ERROR;\n} /* ecma_raise_standard_error */\n\n#if ENABLED (JERRY_ERROR_MESSAGES)\n\n/**\n * Raise a standard ecma-error with the given format string and arguments.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_raise_standard_error_with_format (ecma_standard_error_t error_type, /**< error type */\n                                       const char *format, /**< format string */\n                                       ...) /**< ecma-values */\n{\n  JERRY_ASSERT (format != NULL);\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n  const char *start_p = format;\n  const char *end_p = format;\n\n  va_list args;\n\n  va_start (args, format);\n\n  while (*end_p)\n  {\n    if (*end_p == '%')\n    {\n      /* Concat template string. */\n      if (end_p > start_p)\n      {\n        ecma_stringbuilder_append_raw (&builder, (lit_utf8_byte_t *) start_p, (lit_utf8_size_t) (end_p - start_p));\n      }\n\n      /* Convert an argument to string without side effects. */\n      ecma_string_t *arg_string_p;\n      const ecma_value_t arg_val = va_arg (args, ecma_value_t);\n\n      if (JERRY_UNLIKELY (ecma_is_value_object (arg_val)))\n      {\n        ecma_object_t *arg_object_p = ecma_get_object_from_value (arg_val);\n        lit_magic_string_id_t class_name = ecma_object_get_class_name (arg_object_p);\n        arg_string_p = ecma_get_magic_string (class_name);\n      }\n#if ENABLED (JERRY_ESNEXT)\n      else if (ecma_is_value_symbol (arg_val))\n      {\n        ecma_value_t symbol_desc_value = ecma_get_symbol_descriptive_string (arg_val);\n        arg_string_p = ecma_get_string_from_value (symbol_desc_value);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      else\n      {\n        arg_string_p = ecma_op_to_string (arg_val);\n        JERRY_ASSERT (arg_string_p != NULL);\n      }\n\n      /* Concat argument. */\n      ecma_stringbuilder_append (&builder, arg_string_p);\n\n      ecma_deref_ecma_string (arg_string_p);\n\n      start_p = end_p + 1;\n    }\n\n    end_p++;\n  }\n\n  va_end (args);\n\n  /* Concat reset of template string. */\n  if (start_p < end_p)\n  {\n    ecma_stringbuilder_append_raw (&builder, (lit_utf8_byte_t *) start_p, (lit_utf8_size_t) (end_p - start_p));\n  }\n\n  ecma_string_t *builder_str_p = ecma_stringbuilder_finalize (&builder);\n\n  ecma_object_t *error_obj_p = ecma_new_standard_error (error_type, builder_str_p);\n\n  ecma_deref_ecma_string (builder_str_p);\n\n  jcontext_raise_exception (ecma_make_object_value (error_obj_p));\n  return ECMA_VALUE_ERROR;\n} /* ecma_raise_standard_error_with_format */\n\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n\n/**\n * Raise a common error with the given message.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_raise_common_error (const char *msg_p) /**< error message */\n{\n  return ecma_raise_standard_error (ECMA_ERROR_COMMON, (const lit_utf8_byte_t *) msg_p);\n} /* ecma_raise_common_error */\n\n/**\n * Raise a RangeError with the given message.\n *\n * See also: ECMA-262 v5, 15.11.6.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_raise_range_error (const char *msg_p) /**< error message */\n{\n  return ecma_raise_standard_error (ECMA_ERROR_RANGE, (const lit_utf8_byte_t *) msg_p);\n} /* ecma_raise_range_error */\n\n/**\n * Raise a ReferenceError with the given message.\n *\n * See also: ECMA-262 v5, 15.11.6.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_raise_reference_error (const char *msg_p) /**< error message */\n{\n  return ecma_raise_standard_error (ECMA_ERROR_REFERENCE, (const lit_utf8_byte_t *) msg_p);\n} /* ecma_raise_reference_error */\n\n/**\n * Raise a SyntaxError with the given message.\n *\n * See also: ECMA-262 v5, 15.11.6.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_raise_syntax_error (const char *msg_p) /**< error message */\n{\n  return ecma_raise_standard_error (ECMA_ERROR_SYNTAX, (const lit_utf8_byte_t *) msg_p);\n} /* ecma_raise_syntax_error */\n\n/**\n * Raise a TypeError with the given message.\n *\n* See also: ECMA-262 v5, 15.11.6.5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_raise_type_error (const char *msg_p) /**< error message */\n{\n  return ecma_raise_standard_error (ECMA_ERROR_TYPE, (const lit_utf8_byte_t *) msg_p);\n} /* ecma_raise_type_error */\n\n/**\n * Raise a URIError with the given message.\n *\n* See also: ECMA-262 v5, 15.11.6.6\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_raise_uri_error (const char *msg_p) /**< error message */\n{\n  return ecma_raise_standard_error (ECMA_ERROR_URI, (const lit_utf8_byte_t *) msg_p);\n} /* ecma_raise_uri_error */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-exceptions.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_EXCEPTIONS_H\n#define ECMA_EXCEPTIONS_H\n\n#include \"ecma-globals.h\"\n#include \"jrt.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup exceptions Exceptions\n * @{\n */\n\n#if ENABLED (JERRY_ERROR_MESSAGES)\n#define ECMA_ERR_MSG(msg) msg\n#else /* !ENABLED (JERRY_ERROR_MESSAGES) */\n#define ECMA_ERR_MSG(msg) NULL\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n\n/**\n * Native errors.\n *\n * See also: 15.11.1, 15.11.6\n */\ntypedef enum\n{\n  ECMA_ERROR_NONE,      /**< Not an Error */\n\n  ECMA_ERROR_COMMON,    /**< Error */\n  ECMA_ERROR_EVAL,      /**< EvalError */\n  ECMA_ERROR_RANGE,     /**< RangeError */\n  ECMA_ERROR_REFERENCE, /**< ReferenceError */\n  ECMA_ERROR_SYNTAX,    /**< SyntaxError */\n  ECMA_ERROR_TYPE,      /**< TypeError */\n  ECMA_ERROR_URI        /**< URIError */\n} ecma_standard_error_t;\n\necma_standard_error_t ecma_get_error_type (ecma_object_t *error_object);\necma_object_t *ecma_new_standard_error (ecma_standard_error_t error_type, ecma_string_t *message_string_p);\n#if ENABLED (JERRY_ERROR_MESSAGES)\necma_value_t ecma_raise_standard_error_with_format (ecma_standard_error_t error_type, const char *msg_p, ...);\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\necma_value_t ecma_raise_common_error (const char *msg_p);\necma_value_t ecma_raise_range_error (const char *msg_p);\necma_value_t ecma_raise_reference_error (const char *msg_p);\necma_value_t ecma_raise_syntax_error (const char *msg_p);\necma_value_t ecma_raise_type_error (const char *msg_p);\necma_value_t ecma_raise_uri_error (const char *msg_p);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_EXCEPTIONS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-function-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtin-handlers.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-promise-object.h\"\n#include \"lit-char-helpers.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-proxy-object.h\"\n#include \"ecma-symbol-object.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmafunctionobject ECMA Function object related routines\n * @{\n */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * SetFunctionName operation\n *\n * See also: ECMAScript v6, 9.2.1.1\n *\n * @return resource name as ecma-string\n */\necma_value_t\necma_op_function_form_name (ecma_string_t *prop_name_p, /**< property name */\n                            char *prefix_p, /**< prefix */\n                            lit_utf8_size_t prefix_size) /**< prefix length */\n{\n  /* 4. */\n  if (ecma_prop_name_is_symbol (prop_name_p))\n  {\n    /* .a */\n    ecma_value_t string_desc = ecma_get_symbol_description (prop_name_p);\n\n    /* .b */\n    if (ecma_is_value_undefined (string_desc))\n    {\n      prop_name_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n    }\n    /* .c */\n    else\n    {\n      ecma_string_t *string_desc_p = ecma_get_string_from_value (string_desc);\n      ecma_stringbuilder_t builder = ecma_stringbuilder_create_raw ((lit_utf8_byte_t *) \"[\", 1);\n      ecma_stringbuilder_append (&builder, string_desc_p);\n      ecma_stringbuilder_append_byte (&builder, (lit_utf8_byte_t) LIT_CHAR_RIGHT_SQUARE);\n      prop_name_p = ecma_stringbuilder_finalize (&builder);\n    }\n  }\n  else\n  {\n    ecma_ref_ecma_string (prop_name_p);\n  }\n\n  /* 5. */\n  if (JERRY_UNLIKELY (prefix_p != NULL))\n  {\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create_raw ((lit_utf8_byte_t *) prefix_p, prefix_size);\n    ecma_stringbuilder_append (&builder, prop_name_p);\n    ecma_deref_ecma_string (prop_name_p);\n    prop_name_p = ecma_stringbuilder_finalize (&builder);\n  }\n\n  return ecma_make_string_value (prop_name_p);\n} /* ecma_op_function_form_name */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * IsCallable operation.\n *\n * See also: ECMA-262 v5, 9.11\n *\n * @return true - if the given object is callable;\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_op_object_is_callable (ecma_object_t *obj_p) /**< ecma object */\n{\n  JERRY_ASSERT (!ecma_is_lexical_environment (obj_p));\n\n  const ecma_object_type_t type = ecma_get_object_type (obj_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_TYPE_IS_PROXY (type))\n  {\n    return ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (obj_p->u2.prototype_cp) != 0;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return type >= ECMA_OBJECT_TYPE_FUNCTION;\n} /* ecma_op_object_is_callable */\n\n/**\n * IsCallable operation.\n *\n * See also: ECMA-262 v5, 9.11\n *\n * @return true - if value is callable object;\n *         false - otherwise\n */\nbool\necma_op_is_callable (ecma_value_t value) /**< ecma value */\n{\n  return (ecma_is_value_object (value)\n          && ecma_op_object_is_callable (ecma_get_object_from_value (value)));\n} /* ecma_op_is_callable */\n\n/**\n * Implement IsConstructor abstract operation.\n *\n *\n * @return ECMA_IS_VALID_CONSTRUCTOR - if object is a valid for constructor call\n *         any other value - if object is not a valid constructor, the pointer contains the error message.\n */\nchar *\necma_object_check_constructor (ecma_object_t *obj_p) /**< ecma object */\n{\n  JERRY_ASSERT (!ecma_is_lexical_environment (obj_p));\n\n  ecma_object_type_t type = ecma_get_object_type (obj_p);\n\n  if (JERRY_UNLIKELY (type < ECMA_OBJECT_TYPE_PROXY))\n  {\n    return ECMA_ERR_MSG (\"Invalid type for constructor call.\");\n  }\n\n  while (JERRY_UNLIKELY (type == ECMA_OBJECT_TYPE_BOUND_FUNCTION))\n  {\n    ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) obj_p;\n\n    obj_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                        bound_func_p->header.u.bound_function.target_function);\n\n    type = ecma_get_object_type (obj_p);\n  }\n\n  if (JERRY_LIKELY (type == ECMA_OBJECT_TYPE_FUNCTION))\n  {\n    JERRY_ASSERT (!ecma_get_object_is_builtin (obj_p));\n\n#if ENABLED (JERRY_ESNEXT)\n    const ecma_compiled_code_t *byte_code_p = ecma_op_function_get_compiled_code ((ecma_extended_object_t *) obj_p);\n\n    if (!CBC_FUNCTION_IS_CONSTRUCTABLE (byte_code_p->status_flags))\n    {\n#if ENABLED (JERRY_ERROR_MESSAGES)\n      switch (CBC_FUNCTION_GET_TYPE (byte_code_p->status_flags))\n      {\n        case CBC_FUNCTION_SCRIPT:\n        {\n          return \"Script (global) functions cannot be invoked with 'new'.\";\n        }\n        case CBC_FUNCTION_GENERATOR:\n        {\n          return \"Generator functions cannot be invoked with 'new'.\";\n        }\n        case CBC_FUNCTION_ASYNC:\n        {\n          return \"Async functions cannot be invoked with 'new'.\";\n        }\n        case CBC_FUNCTION_ASYNC_GENERATOR:\n        {\n          return \"Async generator functions cannot be invoked with 'new'.\";\n        }\n        case CBC_FUNCTION_ACCESSOR:\n        {\n          return \"Accessor functions cannot be invoked with 'new'.\";\n        }\n        case CBC_FUNCTION_METHOD:\n        {\n          return \"Methods cannot be invoked with 'new'.\";\n        }\n        case CBC_FUNCTION_ARROW:\n        {\n          return \"Arrow functions cannot be invoked with 'new'.\";\n        }\n        default:\n        {\n          JERRY_ASSERT (CBC_FUNCTION_GET_TYPE (byte_code_p->status_flags) == CBC_FUNCTION_ASYNC_ARROW);\n          return \"Async arrow functions cannot be invoked with 'new'.\";\n        }\n      }\n#else /* !ENABLED (JERRY_ERROR_MESSAGES) */\n      return NULL;\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n    }\n#endif /* ENABLED (JERRY_NEXT) */\n\n    return ECMA_IS_VALID_CONSTRUCTOR;\n  }\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_TYPE_IS_PROXY (type))\n  {\n    if (ECMA_GET_SECOND_BIT_FROM_POINTER_TAG (obj_p->u2.prototype_cp) == 0)\n    {\n      return ECMA_ERR_MSG (\"Proxy target is not a constructor.\");\n    }\n\n    return ECMA_IS_VALID_CONSTRUCTOR;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  JERRY_ASSERT (type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n  if (ecma_get_object_is_builtin (obj_p))\n  {\n    if (ecma_builtin_function_is_routine (obj_p))\n    {\n      return ECMA_ERR_MSG (\"Built-in routines are not constructors.\");\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    JERRY_ASSERT (((ecma_extended_object_t *) obj_p)->u.built_in.id != ECMA_BUILTIN_ID_HANDLER);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n  }\n\n  return ECMA_IS_VALID_CONSTRUCTOR;\n} /* ecma_object_check_constructor */\n\n/**\n * Implement IsConstructor abstract operation.\n *\n * @return ECMA_IS_VALID_CONSTRUCTOR - if the input value is a constructor.\n *         any other value - if the input value is not a valid constructor, the pointer contains the error message.\n */\nextern inline char *JERRY_ATTR_ALWAYS_INLINE\necma_check_constructor (ecma_value_t value) /**< ecma object */\n{\n  if (!ecma_is_value_object (value))\n  {\n    return ECMA_ERR_MSG (\"Invalid type for constructor call.\");\n  }\n\n  return ecma_object_check_constructor (ecma_get_object_from_value (value));\n} /* ecma_check_constructor */\n\n/**\n * Checks whether the given object implements [[Construct]].\n *\n * @return true - if the given object is constructor;\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_object_is_constructor (ecma_object_t *obj_p) /**< ecma object */\n{\n  return ecma_object_check_constructor (obj_p) == ECMA_IS_VALID_CONSTRUCTOR;\n} /* ecma_object_is_constructor */\n\n/**\n * Checks whether the value is Object that implements [[Construct]].\n *\n * @return true - if value is constructor object;\n *         false - otherwise\n */\nbool\necma_is_constructor (ecma_value_t value) /**< ecma value */\n{\n  return (ecma_is_value_object (value)\n          && ecma_object_is_constructor (ecma_get_object_from_value (value)));\n} /* ecma_is_constructor */\n\n/**\n * Helper method to count and convert the arguments for the Function/GeneratorFunction constructor call.\n *\n * See also:\n *          ECMA 262 v5.1 15.3.2.1 steps 5.a-d\n *          ECMA 262 v6 19.2.1.1.1 steps 8\n *\n * @return ecma value - concatenated arguments as a string.\n *         Returned value must be freed with ecma_free_value.\n */\nstatic ecma_string_t *\necma_op_create_dynamic_function_arguments_helper (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                                  uint32_t arguments_list_len) /**< number of arguments */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  if (arguments_list_len <= 1)\n  {\n    return ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]);\n\n  if (JERRY_UNLIKELY (str_p == NULL))\n  {\n    return str_p;\n  }\n\n  if (arguments_list_len == 2)\n  {\n    return str_p;\n  }\n\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (str_p);\n  ecma_deref_ecma_string (str_p);\n\n  for (uint32_t idx = 1; idx < arguments_list_len - 1; idx++)\n  {\n    str_p = ecma_op_to_string (arguments_list_p[idx]);\n\n    if (JERRY_UNLIKELY (str_p == NULL))\n    {\n      ecma_stringbuilder_destroy (&builder);\n      return str_p;\n    }\n\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_COMMA);\n    ecma_stringbuilder_append (&builder, str_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  return ecma_stringbuilder_finalize (&builder);\n} /* ecma_op_create_dynamic_function_arguments_helper */\n\n/**\n * Function object creation operation.\n *\n * See also: ECMA-262 v5, 13.2\n *\n * @return pointer to newly created Function object\n */\nstatic ecma_object_t *\necma_op_create_function_object (ecma_object_t *scope_p, /**< function's scope */\n                                const ecma_compiled_code_t *bytecode_data_p, /**< byte-code array */\n                                ecma_builtin_id_t proto_id) /**< builtin id of the prototype object */\n{\n  JERRY_ASSERT (ecma_is_lexical_environment (scope_p));\n\n  /* 1., 4., 13. */\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (proto_id);\n\n  size_t function_object_size = sizeof (ecma_extended_object_t);\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION)\n  {\n    function_object_size = sizeof (ecma_static_function_t);\n  }\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n  ecma_object_t *func_p = ecma_create_object (prototype_obj_p,\n                                              function_object_size,\n                                              ECMA_OBJECT_TYPE_FUNCTION);\n\n  /* 2., 6., 7., 8. */\n  /*\n   * We don't setup [[Get]], [[Call]], [[Construct]], [[HasInstance]] for each function object.\n   * Instead we set the object's type to ECMA_OBJECT_TYPE_FUNCTION\n   * that defines which version of the routine should be used on demand.\n   */\n\n  /* 3. */\n  /*\n   * [[Class]] property is not stored explicitly for objects of ECMA_OBJECT_TYPE_FUNCTION type.\n   *\n   * See also: ecma_object_get_class_name\n   */\n\n  ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) func_p;\n\n  /* 9. */\n  ECMA_SET_NON_NULL_POINTER_TAG (ext_func_p->u.function.scope_cp, scope_p, 0);\n\n  /* 10., 11., 12. */\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION)\n  {\n    ext_func_p->u.function.bytecode_cp = JMEM_CP_NULL;\n    ((ecma_static_function_t *) func_p)->bytecode_p = bytecode_data_p;\n  }\n  else\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n  {\n    ECMA_SET_INTERNAL_VALUE_POINTER (ext_func_p->u.function.bytecode_cp, bytecode_data_p);\n    ecma_bytecode_ref ((ecma_compiled_code_t *) bytecode_data_p);\n  }\n\n  /* 14., 15., 16., 17., 18. */\n  /*\n   * 'length' and 'prototype' properties are instantiated lazily\n   *\n   * See also: ecma_op_function_try_to_lazy_instantiate_property\n   */\n\n  return func_p;\n} /* ecma_op_create_function_object */\n\n/**\n * CreateDynamicFunction operation\n *\n * See also:\n *          ECMA-262 v5, 15.3.\n *          ECMA-262 v6, 19.2.1.1\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         constructed function object - otherwise\n */\necma_value_t\necma_op_create_dynamic_function (const ecma_value_t *arguments_list_p, /**< arguments list */\n                                 uint32_t arguments_list_len, /**< number of arguments */\n                                 ecma_parse_opts_t parse_opts) /**< parse options */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  ecma_string_t *arguments_str_p = ecma_op_create_dynamic_function_arguments_helper (arguments_list_p,\n                                                                                     arguments_list_len);\n\n  if (JERRY_UNLIKELY (arguments_str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_string_t *function_body_str_p;\n\n  if (arguments_list_len > 0)\n  {\n    function_body_str_p = ecma_op_to_string (arguments_list_p[arguments_list_len - 1]);\n\n    if (JERRY_UNLIKELY (function_body_str_p == NULL))\n    {\n      ecma_deref_ecma_string (arguments_str_p);\n      return ECMA_VALUE_ERROR;\n    }\n  }\n  else\n  {\n    /* Very unlikely code path, not optimized. */\n    function_body_str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  ECMA_STRING_TO_UTF8_STRING (arguments_str_p, arguments_buffer_p, arguments_buffer_size);\n  ECMA_STRING_TO_UTF8_STRING (function_body_str_p, function_body_buffer_p, function_body_buffer_size);\n\n  ecma_value_t resource_name = ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);\n  ecma_compiled_code_t *bytecode_p = parser_parse_script (arguments_buffer_p,\n                                                          arguments_buffer_size,\n                                                          function_body_buffer_p,\n                                                          function_body_buffer_size,\n                                                          resource_name,\n                                                          parse_opts);\n\n  ECMA_FINALIZE_UTF8_STRING (function_body_buffer_p, function_body_buffer_size);\n  ECMA_FINALIZE_UTF8_STRING (arguments_buffer_p, arguments_buffer_size);\n  ecma_deref_ecma_string (arguments_str_p);\n  ecma_deref_ecma_string (function_body_str_p);\n\n  if (JERRY_UNLIKELY (bytecode_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t *func_name_p;\n  func_name_p = ecma_compiled_code_resolve_function_name ((const ecma_compiled_code_t *) bytecode_p);\n  *func_name_p = ecma_make_magic_string_value (LIT_MAGIC_STRING_ANONYMOUS);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *global_object_p = ecma_builtin_get_global ();\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  JERRY_ASSERT (global_object_p == (ecma_object_t *) ecma_op_function_get_realm (bytecode_p));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  ecma_object_t *global_env_p = ecma_get_global_environment (global_object_p);\n  ecma_builtin_id_t fallback_proto = ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE;\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *new_target_p = JERRY_CONTEXT (current_new_target_p);\n\n  if (JERRY_UNLIKELY (parse_opts & (ECMA_PARSE_GENERATOR_FUNCTION | ECMA_PARSE_ASYNC_FUNCTION)))\n  {\n    fallback_proto = ECMA_BUILTIN_ID_GENERATOR;\n\n    if (parse_opts & ECMA_PARSE_ASYNC_FUNCTION)\n    {\n      fallback_proto = ECMA_BUILTIN_ID_ASYNC_GENERATOR;\n\n      if (new_target_p == NULL)\n      {\n        new_target_p = ecma_builtin_get (ECMA_BUILTIN_ID_ASYNC_GENERATOR_FUNCTION);\n      }\n    }\n    else if (new_target_p == NULL)\n    {\n      new_target_p = ecma_builtin_get (ECMA_BUILTIN_ID_GENERATOR_FUNCTION);\n    }\n  }\n  else if (new_target_p == NULL)\n  {\n    new_target_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION);\n  }\n\n  ecma_object_t *proto = ecma_op_get_prototype_from_constructor (new_target_p, fallback_proto);\n\n  if (JERRY_UNLIKELY (proto == NULL))\n  {\n    ecma_bytecode_deref (bytecode_p);\n    return ECMA_VALUE_ERROR;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *func_obj_p = ecma_op_create_function_object (global_env_p, bytecode_p, fallback_proto);\n\n#if ENABLED (JERRY_ESNEXT)\n  ECMA_SET_NON_NULL_POINTER (func_obj_p->u2.prototype_cp, proto);\n  ecma_deref_object (proto);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_bytecode_deref (bytecode_p);\n  return ecma_make_object_value (func_obj_p);\n} /* ecma_op_create_dynamic_function */\n\n/**\n * Function object creation operation.\n *\n * See also: ECMA-262 v5, 13.2\n *\n * @return pointer to newly created Function object\n */\necma_object_t *\necma_op_create_simple_function_object (ecma_object_t *scope_p, /**< function's scope */\n                                       const ecma_compiled_code_t *bytecode_data_p) /**< byte-code array */\n{\n  return ecma_op_create_function_object (scope_p, bytecode_data_p, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);\n} /* ecma_op_create_simple_function_object */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Create a function object with the appropriate prototype.\n *\n * @return pointer to newly created Function object\n */\necma_object_t *\necma_op_create_any_function_object (ecma_object_t *scope_p, /**< function's scope */\n                                    const ecma_compiled_code_t *bytecode_data_p) /**< byte-code array */\n{\n  ecma_builtin_id_t proto_id;\n\n  switch (CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags))\n  {\n    case CBC_FUNCTION_GENERATOR:\n    {\n      proto_id = ECMA_BUILTIN_ID_GENERATOR;\n      break;\n    }\n    case CBC_FUNCTION_ASYNC:\n    {\n      proto_id = ECMA_BUILTIN_ID_ASYNC_FUNCTION_PROTOTYPE;\n      break;\n    }\n    case CBC_FUNCTION_ASYNC_GENERATOR:\n    {\n      proto_id = ECMA_BUILTIN_ID_ASYNC_GENERATOR;\n      break;\n    }\n    default:\n    {\n      proto_id = ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE;\n      break;\n    }\n  }\n\n  return ecma_op_create_function_object (scope_p, bytecode_data_p, proto_id);\n} /* ecma_op_create_any_function_object */\n\n/**\n * Arrow function object creation operation.\n *\n * See also: ES2015, 9.2.12\n *\n * @return pointer to newly created Function object\n */\necma_object_t *\necma_op_create_arrow_function_object (ecma_object_t *scope_p, /**< function's scope */\n                                      const ecma_compiled_code_t *bytecode_data_p, /**< byte-code array */\n                                      ecma_value_t this_binding) /**< value of 'this' binding */\n{\n  ecma_object_t *prototype_obj_p;\n\n  if (CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags) == CBC_FUNCTION_ARROW)\n  {\n    prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);\n  }\n  else\n  {\n    JERRY_ASSERT (CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags) == CBC_FUNCTION_ASYNC_ARROW);\n    prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_ASYNC_FUNCTION_PROTOTYPE);\n  }\n\n  size_t arrow_function_object_size = sizeof (ecma_arrow_function_t);\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION)\n  {\n    arrow_function_object_size = sizeof (ecma_static_arrow_function_t);\n  }\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n  ecma_object_t *func_p = ecma_create_object (prototype_obj_p,\n                                              arrow_function_object_size,\n                                              ECMA_OBJECT_TYPE_FUNCTION);\n\n  ecma_arrow_function_t *arrow_func_p = (ecma_arrow_function_t *) func_p;\n\n  ECMA_SET_NON_NULL_POINTER_TAG (arrow_func_p->header.u.function.scope_cp, scope_p, 0);\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  if ((bytecode_data_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION))\n  {\n    arrow_func_p->header.u.function.bytecode_cp = ECMA_NULL_POINTER;\n    ((ecma_static_arrow_function_t *) func_p)->bytecode_p = bytecode_data_p;\n  }\n  else\n  {\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n    ECMA_SET_INTERNAL_VALUE_POINTER (arrow_func_p->header.u.function.bytecode_cp, bytecode_data_p);\n    ecma_bytecode_ref ((ecma_compiled_code_t *) bytecode_data_p);\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  }\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n  arrow_func_p->this_binding = ecma_copy_value_if_not_object (this_binding);\n  arrow_func_p->new_target = ECMA_VALUE_UNDEFINED;\n\n  if (JERRY_CONTEXT (current_new_target_p) != NULL)\n  {\n    arrow_func_p->new_target = ecma_make_object_value (JERRY_CONTEXT (current_new_target_p));\n  }\n  return func_p;\n} /* ecma_op_create_arrow_function_object */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * External function object creation operation.\n *\n * Note:\n *      external function object is implementation-defined object type\n *      that represent functions implemented in native code, using Embedding API\n *\n * @return pointer to newly created external function object\n */\necma_object_t *\necma_op_create_external_function_object (ecma_native_handler_t handler_cb) /**< pointer to external native handler */\n{\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);\n\n  ecma_object_t *function_obj_p = ecma_create_object (prototype_obj_p,\n                                                      sizeof (ecma_native_function_t),\n                                                      ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n  /*\n   * [[Class]] property is not stored explicitly for objects of ECMA_OBJECT_TYPE_NATIVE_FUNCTION type.\n   *\n   * See also: ecma_object_get_class_name\n   */\n\n  ecma_native_function_t *native_function_p = (ecma_native_function_t *) function_obj_p;\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ECMA_SET_INTERNAL_VALUE_POINTER (native_function_p->realm_value,\n                                   ecma_builtin_get_global ());\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n  native_function_p->native_handler_cb = handler_cb;\n\n  return function_obj_p;\n} /* ecma_op_create_external_function_object */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Create built-in native handler object.\n *\n * @return pointer to newly created native handler object\n */\necma_object_t *\necma_op_create_native_handler (ecma_native_handler_id_t id, /**< handler id */\n                               size_t object_size) /**< created object size */\n{\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);\n\n  ecma_object_t *function_obj_p = ecma_create_object (prototype_obj_p,\n                                                      object_size,\n                                                      ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n  ecma_set_object_is_builtin (function_obj_p);\n\n  ecma_extended_object_t *ext_func_obj_p = (ecma_extended_object_t *) function_obj_p;\n  ext_func_obj_p->u.built_in.id = ECMA_BUILTIN_ID_HANDLER;\n  ext_func_obj_p->u.built_in.routine_id = (uint8_t) id;\n  ext_func_obj_p->u.built_in.u2.routine_flags = ECMA_NATIVE_HANDLER_FLAGS_NONE;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ECMA_SET_INTERNAL_VALUE_POINTER (ext_func_obj_p->u.built_in.realm_value,\n                                   ecma_builtin_get_global ());\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  return function_obj_p;\n} /* ecma_op_create_native_handler */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Get compiled code of a function object.\n *\n * @return compiled code\n */\nextern inline const ecma_compiled_code_t * JERRY_ATTR_ALWAYS_INLINE\necma_op_function_get_compiled_code (ecma_extended_object_t *function_p) /**< function pointer */\n{\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  if (JERRY_LIKELY (function_p->u.function.bytecode_cp != ECMA_NULL_POINTER))\n  {\n    return ECMA_GET_INTERNAL_VALUE_POINTER (const ecma_compiled_code_t,\n                                            function_p->u.function.bytecode_cp);\n  }\n\n  return ((ecma_static_function_t *) function_p)->bytecode_p;\n#else /* !ENABLED (JERRY_SNAPSHOT_EXEC) */\n  return ECMA_GET_INTERNAL_VALUE_POINTER (const ecma_compiled_code_t,\n                                          function_p->u.function.bytecode_cp);\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n} /* ecma_op_function_get_compiled_code */\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n\n/**\n * Get realm from a byte code.\n *\n * Note:\n *   Does not increase the reference counter.\n *\n * @return pointer to realm (global) object\n */\nextern inline ecma_global_object_t * JERRY_ATTR_ALWAYS_INLINE\necma_op_function_get_realm (const ecma_compiled_code_t *bytecode_header_p) /**< byte code header */\n{\n  ecma_value_t realm_value;\n\n  if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_header_p;\n    realm_value = args_p->realm_value;\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_header_p;\n    realm_value = args_p->realm_value;\n  }\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  if (JERRY_LIKELY (realm_value != JMEM_CP_NULL))\n  {\n    return ECMA_GET_INTERNAL_VALUE_POINTER (ecma_global_object_t, realm_value);\n  }\n\n  return (ecma_global_object_t *) ecma_builtin_get_global ();\n#else /* !ENABLED (JERRY_SNAPSHOT_EXEC) */\n  return ECMA_GET_INTERNAL_VALUE_POINTER (ecma_global_object_t, realm_value);\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n} /* ecma_op_function_get_realm */\n\n/**\n * Get realm from a function\n *\n * Note:\n *   Does not increase the reference counter.\n *\n * @return realm (global) object\n */\necma_global_object_t *\necma_op_function_get_function_realm (ecma_object_t *func_obj_p) /**< function object */\n{\n  while (true)\n  {\n    if (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_FUNCTION)\n    {\n      ecma_extended_object_t *ext_function_obj_p = (ecma_extended_object_t *) func_obj_p;\n      const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_function_obj_p);\n      return ecma_op_function_get_realm (bytecode_data_p);\n    }\n\n    if (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION)\n    {\n      if (ecma_get_object_is_builtin (func_obj_p))\n      {\n        ecma_extended_object_t *ext_function_obj_p = (ecma_extended_object_t *) func_obj_p;\n        return ECMA_GET_INTERNAL_VALUE_POINTER (ecma_global_object_t,\n                                                ext_function_obj_p->u.built_in.realm_value);\n      }\n      ecma_native_function_t *native_function_p = (ecma_native_function_t *) func_obj_p;\n      return ECMA_GET_INTERNAL_VALUE_POINTER (ecma_global_object_t,\n                                              native_function_p->realm_value);\n    }\n\n  #if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_OBJECT_IS_PROXY (func_obj_p))\n    {\n      ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) func_obj_p;\n      if (ecma_is_value_null (proxy_obj_p->handler))\n      {\n        ecma_raise_type_error (ECMA_ERR_MSG (\"Prototype from revoked Proxy is invalid.\"));\n        return NULL;\n      }\n      func_obj_p = ecma_get_object_from_value (proxy_obj_p->target);\n      continue;\n    }\n  #endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION);\n    ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) func_obj_p;\n    func_obj_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                             bound_func_p->header.u.bound_function.target_function);\n  }\n} /* ecma_op_function_get_function_realm */\n\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n/**\n * 15.3.5.3 implementation of [[HasInstance]] for Function objects\n *\n * @return true/false - if arguments are valid\n *         error - otherwise\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_function_has_instance (ecma_object_t *func_obj_p, /**< Function object */\n                               ecma_value_t value) /**< argument 'V' */\n{\n  JERRY_ASSERT (func_obj_p != NULL\n                && !ecma_is_lexical_environment (func_obj_p));\n\n  if (!ecma_is_value_object (value))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  while (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION)\n  {\n    JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION);\n\n    /* 1. 3. */\n    ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) func_obj_p;\n\n    func_obj_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                             bound_func_p->header.u.bound_function.target_function);\n  }\n\n  JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_FUNCTION\n                || ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION\n                || ECMA_OBJECT_IS_PROXY (func_obj_p));\n\n  ecma_object_t *v_obj_p = ecma_get_object_from_value (value);\n\n  ecma_value_t prototype_obj_value = ecma_op_object_get_by_magic_id (func_obj_p,\n                                                                     LIT_MAGIC_STRING_PROTOTYPE);\n\n  if (ECMA_IS_VALUE_ERROR (prototype_obj_value))\n  {\n    return prototype_obj_value;\n  }\n\n  if (!ecma_is_value_object (prototype_obj_value))\n  {\n    ecma_free_value (prototype_obj_value);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Object expected.\"));\n  }\n\n  ecma_object_t *prototype_obj_p = ecma_get_object_from_value (prototype_obj_value);\n  JERRY_ASSERT (prototype_obj_p != NULL);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  ecma_value_t result = ECMA_VALUE_ERROR;\n#else /* !ENABLED (JERRY_BUILTIN_PROXY) */\n  ecma_value_t result = ECMA_VALUE_FALSE;\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_ref_object (v_obj_p);\n\n  while (true)\n  {\n    ecma_object_t *current_proto_p = ecma_op_object_get_prototype_of (v_obj_p);\n    ecma_deref_object (v_obj_p);\n\n    if (current_proto_p == NULL)\n    {\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      result = ECMA_VALUE_FALSE;\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n      break;\n    }\n    else if (current_proto_p == ECMA_OBJECT_POINTER_ERROR)\n    {\n      break;\n    }\n\n    if (current_proto_p == prototype_obj_p)\n    {\n      ecma_deref_object (current_proto_p);\n      result = ECMA_VALUE_TRUE;\n      break;\n    }\n\n    /* Advance up on prototype chain. */\n    v_obj_p = current_proto_p;\n  }\n\n  ecma_deref_object (prototype_obj_p);\n  return result;\n} /* ecma_op_function_has_instance */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * GetSuperConstructor operation for class methods\n *\n * See also: ECMAScript v6, 12.3.5.2\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         super constructor - otherwise\n */\necma_value_t\necma_op_function_get_super_constructor (ecma_object_t *func_obj_p) /**< function object */\n{\n  ecma_object_t *super_ctor_p = ecma_op_object_get_prototype_of (func_obj_p);\n\n  if (JERRY_UNLIKELY (super_ctor_p == ECMA_OBJECT_POINTER_ERROR))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n  else if (super_ctor_p == NULL || !ecma_object_is_constructor (super_ctor_p))\n  {\n    if (super_ctor_p != NULL)\n    {\n      ecma_deref_object (super_ctor_p);\n    }\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Super binding must be a constructor.\"));\n  }\n\n  return ecma_make_object_value (super_ctor_p);\n} /* ecma_op_function_get_super_constructor */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Ordinary internal method: GetPrototypeFromConstructor (constructor, intrinsicDefaultProto)\n *\n * See also:\n *   - ECMAScript v6, 9.1.15\n *   - ECMAScript v10, 9.1.14\n *\n * @return NULL - if the operation fail (exception on the global context is raised)\n *         pointer to the prototype object - otherwise\n */\necma_object_t *\necma_op_get_prototype_from_constructor (ecma_object_t *ctor_obj_p, /**< constructor to get prototype from  */\n                                        ecma_builtin_id_t default_proto_id) /**< intrinsicDefaultProto */\n{\n  JERRY_ASSERT (ecma_op_object_is_callable (ctor_obj_p));\n  JERRY_ASSERT (default_proto_id < ECMA_BUILTIN_ID__COUNT);\n\n  ecma_value_t proto = ecma_op_object_get_by_magic_id (ctor_obj_p, LIT_MAGIC_STRING_PROTOTYPE);\n\n  if (ECMA_IS_VALUE_ERROR (proto))\n  {\n    return NULL;\n  }\n\n  ecma_object_t *proto_obj_p;\n\n  if (!ecma_is_value_object (proto))\n  {\n    ecma_free_value (proto);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_OBJECT_IS_PROXY (ctor_obj_p))\n    {\n      ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) ctor_obj_p;\n      if (ecma_is_value_null (proxy_obj_p->handler))\n      {\n        ecma_raise_type_error (ECMA_ERR_MSG (\"Prototype from revoked Proxy is invalid.\"));\n        return NULL;\n      }\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    proto_obj_p = ecma_builtin_get_from_realm (ecma_op_function_get_function_realm (ctor_obj_p), default_proto_id);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n    proto_obj_p = ecma_builtin_get (default_proto_id);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n    ecma_ref_object (proto_obj_p);\n  }\n  else\n  {\n    proto_obj_p = ecma_get_object_from_value (proto);\n  }\n\n  return proto_obj_p;\n} /* ecma_op_get_prototype_from_constructor */\n\n/**\n * Perform a JavaScript function object method call.\n *\n * The input function object should be a pure JavaScript method\n *\n * @return the result of the function call.\n */\nstatic ecma_value_t\necma_op_function_call_simple (ecma_object_t *func_obj_p, /**< Function object */\n                              ecma_value_t this_arg_value, /**< 'this' argument's value */\n                              const ecma_value_t *arguments_list_p, /**< arguments list */\n                              uint32_t arguments_list_len) /**< length of arguments list */\n{\n  JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_FUNCTION);\n  JERRY_ASSERT (!ecma_get_object_is_builtin (func_obj_p));\n\n  vm_frame_ctx_shared_args_t shared_args;\n  shared_args.header.status_flags = VM_FRAME_CTX_SHARED_HAS_ARG_LIST;\n  shared_args.function_object_p = func_obj_p;\n  shared_args.arg_list_p = arguments_list_p;\n  shared_args.arg_list_len = arguments_list_len;\n\n  /* Entering Function Code (ECMA-262 v5, 10.4.3) */\n  ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) func_obj_p;\n\n  ecma_object_t *scope_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                                       ext_func_p->u.function.scope_cp);\n\n  /* 8. */\n  ecma_value_t this_binding = this_arg_value;\n\n  const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);\n  uint16_t status_flags = bytecode_data_p->status_flags;\n\n  shared_args.header.bytecode_header_p = bytecode_data_p;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_global_object_t *realm_p = ecma_op_function_get_realm (bytecode_data_p);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  /* 1. */\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (CBC_FUNCTION_IS_ARROW (status_flags)))\n  {\n    ecma_arrow_function_t *arrow_func_p = (ecma_arrow_function_t *) func_obj_p;\n\n    if (ecma_is_value_undefined (arrow_func_p->new_target))\n    {\n      JERRY_CONTEXT (current_new_target_p) = NULL;\n    }\n    else\n    {\n      JERRY_CONTEXT (current_new_target_p) = ecma_get_object_from_value (arrow_func_p->new_target);\n    }\n    this_binding = arrow_func_p->this_binding;\n  }\n  else\n  {\n    shared_args.header.status_flags |= VM_FRAME_CTX_SHARED_NON_ARROW_FUNC;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (!(status_flags & CBC_CODE_FLAGS_STRICT_MODE))\n    {\n      if (ecma_is_value_undefined (this_binding)\n          || ecma_is_value_null (this_binding))\n      {\n        /* 2. */\n#if ENABLED (JERRY_BUILTIN_REALMS)\n        this_binding = realm_p->this_binding;\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n        this_binding = ecma_make_object_value (ecma_builtin_get_global ());\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n      }\n      else if (!ecma_is_value_object (this_binding))\n      {\n        /* 3., 4. */\n        this_binding = ecma_op_to_object (this_binding);\n        shared_args.header.status_flags |= VM_FRAME_CTX_SHARED_FREE_THIS;\n\n        JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (this_binding));\n      }\n    }\n#if ENABLED (JERRY_ESNEXT)\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* 5. */\n  if (!(status_flags & CBC_CODE_FLAGS_LEXICAL_ENV_NOT_NEEDED))\n  {\n    shared_args.header.status_flags |= VM_FRAME_CTX_SHARED_FREE_LOCAL_ENV;\n    scope_p = ecma_create_decl_lex_env (scope_p);\n  }\n\n  ecma_value_t ret_value;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (CBC_FUNCTION_GET_TYPE (status_flags) == CBC_FUNCTION_CONSTRUCTOR))\n  {\n    if (JERRY_CONTEXT (current_new_target_p) == NULL)\n    {\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Class constructor cannot be invoked without 'new'.\"));\n      goto exit;\n    }\n\n    ecma_value_t lexical_this = this_binding;\n\n    if (ECMA_GET_THIRD_BIT_FROM_POINTER_TAG (ext_func_p->u.function.scope_cp))\n    {\n      shared_args.header.status_flags |= VM_FRAME_CTX_SHARED_HERITAGE_PRESENT;\n      lexical_this = ECMA_VALUE_UNINITIALIZED;\n    }\n\n    ecma_op_create_environment_record (scope_p, lexical_this, func_obj_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_global_object_t *saved_global_object_p = JERRY_CONTEXT (global_object_p);\n  JERRY_CONTEXT (global_object_p) = realm_p;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  ret_value = vm_run (&shared_args.header, this_binding, scope_p);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  JERRY_CONTEXT (global_object_p) = saved_global_object_p;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n#if ENABLED (JERRY_ESNEXT)\n  /* ECMAScript v6, 9.2.2.13 */\n  if (JERRY_UNLIKELY (shared_args.header.status_flags & VM_FRAME_CTX_SHARED_HERITAGE_PRESENT))\n  {\n    if (!ECMA_IS_VALUE_ERROR (ret_value) && !ecma_is_value_object (ret_value))\n    {\n      if (!ecma_is_value_undefined (ret_value))\n      {\n        ecma_free_value (ret_value);\n        ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Derived constructors may only return object or undefined.\"));\n      }\n      else\n      {\n        ret_value = ecma_op_get_this_binding (scope_p);\n      }\n    }\n  }\n\nexit:\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (JERRY_UNLIKELY (shared_args.header.status_flags & VM_FRAME_CTX_SHARED_FREE_LOCAL_ENV))\n  {\n    ecma_deref_object (scope_p);\n  }\n\n  if (JERRY_UNLIKELY (shared_args.header.status_flags & VM_FRAME_CTX_SHARED_FREE_THIS))\n  {\n    ecma_free_value (this_binding);\n  }\n\n  return ret_value;\n} /* ecma_op_function_call_simple */\n\n/**\n * Perform a native C method call which was registered via the API.\n *\n * @return the result of the function call.\n */\nstatic ecma_value_t JERRY_ATTR_NOINLINE\necma_op_function_call_native (ecma_object_t *func_obj_p, /**< Function object */\n                              ecma_value_t this_arg_value, /**< 'this' argument's value */\n                              const ecma_value_t *arguments_list_p, /**< arguments list */\n                              uint32_t arguments_list_len) /**< length of arguments list */\n\n{\n  JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n  if (ecma_get_object_is_builtin (func_obj_p))\n  {\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    ecma_global_object_t *saved_global_object_p = JERRY_CONTEXT (global_object_p);\n\n    ecma_extended_object_t *ext_func_obj_p = (ecma_extended_object_t *) func_obj_p;\n    JERRY_CONTEXT (global_object_p) = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_global_object_t,\n                                                                       ext_func_obj_p->u.built_in.realm_value);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n    ecma_value_t ret_value = ecma_builtin_dispatch_call (func_obj_p,\n                                                         this_arg_value,\n                                                         arguments_list_p,\n                                                         arguments_list_len);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    JERRY_CONTEXT (global_object_p) = saved_global_object_p;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n    return ret_value;\n  }\n\n  ecma_native_function_t *native_function_p = (ecma_native_function_t *) func_obj_p;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_global_object_t *saved_global_object_p = JERRY_CONTEXT (global_object_p);\n  JERRY_CONTEXT (global_object_p) = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_global_object_t,\n                                                                     native_function_p->realm_value);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  JERRY_ASSERT (native_function_p->native_handler_cb != NULL);\n  ecma_value_t ret_value = native_function_p->native_handler_cb (ecma_make_object_value (func_obj_p),\n                                                                 this_arg_value,\n                                                                 arguments_list_p,\n                                                                 arguments_list_len);\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  JERRY_CONTEXT (global_object_p) = saved_global_object_p;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  if (JERRY_UNLIKELY (ecma_is_value_error_reference (ret_value)))\n  {\n    ecma_raise_error_from_error_reference (ret_value);\n    return ECMA_VALUE_ERROR;\n  }\n\n#if ENABLED (JERRY_DEBUGGER)\n  JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_EXCEPTION_THROWN);\n#endif /* ENABLED (JERRY_DEBUGGER) */\n  return ret_value;\n} /* ecma_op_function_call_native */\n\n/**\n * Append the bound arguments into the given collection\n *\n * Note:\n *       - The whole bound chain is resolved\n *       - The first element of the collection contains the bounded this value\n *\n * @return target function of the bound function\n */\nJERRY_ATTR_NOINLINE static ecma_object_t *\necma_op_bound_function_get_argument_list (ecma_object_t *func_obj_p, /**< bound bunction object */\n                                          ecma_collection_t *list_p) /**< list of arguments */\n{\n  JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION);\n\n  ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) func_obj_p;\n\n  func_obj_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                           bound_func_p->header.u.bound_function.target_function);\n\n  ecma_value_t args_len_or_this = bound_func_p->header.u.bound_function.args_len_or_this;\n\n  uint32_t args_length = 1;\n\n  if (ecma_is_value_integer_number (args_len_or_this))\n  {\n    args_length = (uint32_t) ecma_get_integer_from_value (args_len_or_this);\n  }\n\n  /* 5. */\n  if (args_length != 1)\n  {\n    const ecma_value_t *args_p = (const ecma_value_t *) (bound_func_p + 1);\n    list_p->buffer_p[0] = *args_p;\n\n    if (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION)\n    {\n      func_obj_p = ecma_op_bound_function_get_argument_list (func_obj_p, list_p);\n    }\n    ecma_collection_append (list_p, args_p + 1, args_length - 1);\n  }\n  else\n  {\n    list_p->buffer_p[0] = args_len_or_this;\n  }\n\n  return func_obj_p;\n} /* ecma_op_bound_function_get_argument_list */\n\n/**\n * [[Call]] internal method for bound function objects\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t JERRY_ATTR_NOINLINE\necma_op_function_call_bound (ecma_object_t *func_obj_p, /**< Function object */\n                             const ecma_value_t *arguments_list_p, /**< arguments list */\n                             uint32_t arguments_list_len) /**< length of arguments list */\n{\n  JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION);\n\n  JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_DIRECT_EVAL;\n\n  ecma_collection_t *bound_arg_list_p = ecma_new_collection ();\n  ecma_collection_push_back (bound_arg_list_p, ECMA_VALUE_EMPTY);\n\n  ecma_object_t *target_obj_p = ecma_op_bound_function_get_argument_list (func_obj_p, bound_arg_list_p);\n\n  ecma_collection_append (bound_arg_list_p, arguments_list_p, arguments_list_len);\n\n  JERRY_ASSERT (!ecma_is_value_empty (bound_arg_list_p->buffer_p[0]));\n\n  ecma_value_t ret_value = ecma_op_function_call (target_obj_p,\n                                                  bound_arg_list_p->buffer_p[0],\n                                                  bound_arg_list_p->buffer_p + 1,\n                                                  (uint32_t) (bound_arg_list_p->item_count - 1));\n\n  ecma_collection_destroy (bound_arg_list_p);\n\n  return ret_value;\n} /* ecma_op_function_call_bound */\n\n/**\n * [[Call]] implementation for Function objects,\n * created through 13.2 (ECMA_OBJECT_TYPE_FUNCTION)\n * or 15.3.4.5 (ECMA_OBJECT_TYPE_BOUND_FUNCTION),\n * and for built-in Function objects\n * from section 15 (ECMA_OBJECT_TYPE_FUNCTION).\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */\n                       ecma_value_t this_arg_value, /**< 'this' argument's value */\n                       const ecma_value_t *arguments_list_p, /**< arguments list */\n                       uint32_t arguments_list_len) /**< length of arguments list */\n{\n  JERRY_ASSERT (func_obj_p != NULL\n                && !ecma_is_lexical_environment (func_obj_p));\n  JERRY_ASSERT (ecma_op_object_is_callable (func_obj_p));\n\n  ECMA_CHECK_STACK_USAGE ();\n\n  const ecma_object_type_t type = ecma_get_object_type (func_obj_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_TYPE_IS_PROXY (type))\n  {\n    return ecma_proxy_object_call (func_obj_p, this_arg_value, arguments_list_p, arguments_list_len);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *old_new_target_p = JERRY_CONTEXT (current_new_target_p);\n  if (JERRY_UNLIKELY (!(JERRY_CONTEXT (status_flags) & ECMA_STATUS_DIRECT_EVAL)))\n  {\n    JERRY_CONTEXT (current_new_target_p) = NULL;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t result;\n\n  if (JERRY_LIKELY (type == ECMA_OBJECT_TYPE_FUNCTION))\n  {\n    result = ecma_op_function_call_simple (func_obj_p, this_arg_value, arguments_list_p, arguments_list_len);\n  }\n  else if (type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION)\n  {\n    result = ecma_op_function_call_native (func_obj_p, this_arg_value, arguments_list_p, arguments_list_len);\n  }\n  else\n  {\n    result = ecma_op_function_call_bound (func_obj_p, arguments_list_p, arguments_list_len);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_CONTEXT (current_new_target_p) = old_new_target_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return result;\n} /* ecma_op_function_call */\n\n/**\n * [[Construct]] internal method for bound function objects\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t JERRY_ATTR_NOINLINE\necma_op_function_construct_bound (ecma_object_t *func_obj_p, /**< Function object */\n                                  ecma_object_t *new_target_p, /**< new target */\n                                  const ecma_value_t *arguments_list_p, /**< arguments list */\n                                  uint32_t arguments_list_len) /**< length of arguments list */\n{\n  JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION);\n\n  ecma_collection_t *bound_arg_list_p = ecma_new_collection ();\n  ecma_collection_push_back (bound_arg_list_p, ECMA_VALUE_EMPTY);\n\n  ecma_object_t *target_obj_p = ecma_op_bound_function_get_argument_list (func_obj_p, bound_arg_list_p);\n\n  ecma_collection_append (bound_arg_list_p, arguments_list_p, arguments_list_len);\n\n  if (func_obj_p == new_target_p)\n  {\n    new_target_p = target_obj_p;\n  }\n\n  ecma_value_t ret_value = ecma_op_function_construct (target_obj_p,\n                                                       new_target_p,\n                                                       bound_arg_list_p->buffer_p + 1,\n                                                       (uint32_t) (bound_arg_list_p->item_count - 1));\n\n  ecma_collection_destroy (bound_arg_list_p);\n\n  return ret_value;\n} /* ecma_op_function_construct_bound */\n\n/**\n * [[Construct]] internal method for external function objects\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\necma_op_function_construct_native (ecma_object_t *func_obj_p, /**< Function object */\n                                   ecma_object_t *new_target_p, /**< new target */\n                                   const ecma_value_t *arguments_list_p, /**< arguments list */\n                                   uint32_t arguments_list_len) /**< length of arguments list */\n{\n  JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (new_target_p, ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n\n  if (JERRY_UNLIKELY (proto_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_object_t *new_this_obj_p = ecma_create_object (proto_p, 0, ECMA_OBJECT_TYPE_GENERAL);\n  ecma_value_t this_arg = ecma_make_object_value (new_this_obj_p);\n  ecma_deref_object (proto_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *old_new_target_p = JERRY_CONTEXT (current_new_target_p);\n  JERRY_CONTEXT (current_new_target_p) = new_target_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t ret_value = ecma_op_function_call_native (func_obj_p, this_arg, arguments_list_p, arguments_list_len);\n\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_CONTEXT (current_new_target_p) = old_new_target_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (ECMA_IS_VALUE_ERROR (ret_value) || ecma_is_value_object (ret_value))\n  {\n    ecma_deref_object (new_this_obj_p);\n    return ret_value;\n  }\n\n  ecma_free_value (ret_value);\n\n  return this_arg;\n} /* ecma_op_function_construct_native */\n\n/**\n * General [[Construct]] implementation function objects\n *\n * See also: ECMAScript v6, 9.2.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_function_construct (ecma_object_t *func_obj_p, /**< Function object */\n                            ecma_object_t *new_target_p, /**< new target */\n                            const ecma_value_t *arguments_list_p, /**< arguments list */\n                            uint32_t arguments_list_len) /**< length of arguments list */\n{\n  JERRY_ASSERT (func_obj_p != NULL\n                && !ecma_is_lexical_environment (func_obj_p));\n\n  const ecma_object_type_t type = ecma_get_object_type (func_obj_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_TYPE_IS_PROXY (type))\n  {\n    return ecma_proxy_object_construct (func_obj_p,\n                                        new_target_p,\n                                        arguments_list_p,\n                                        arguments_list_len);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (JERRY_UNLIKELY (type == ECMA_OBJECT_TYPE_BOUND_FUNCTION))\n  {\n    return ecma_op_function_construct_bound (func_obj_p, new_target_p, arguments_list_p, arguments_list_len);\n  }\n\n  if (JERRY_UNLIKELY (type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION))\n  {\n    if (JERRY_UNLIKELY (ecma_get_object_is_builtin (func_obj_p)))\n    {\n#if ENABLED (JERRY_BUILTIN_REALMS)\n      ecma_global_object_t *saved_global_object_p = JERRY_CONTEXT (global_object_p);\n      ecma_value_t realm_value = ((ecma_extended_object_t *) func_obj_p)->u.built_in.realm_value;\n      JERRY_CONTEXT (global_object_p) = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_global_object_t, realm_value);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n#if ENABLED (JERRY_ESNEXT)\n      ecma_object_t *old_new_target = JERRY_CONTEXT (current_new_target_p);\n      JERRY_CONTEXT (current_new_target_p) = new_target_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      ecma_value_t ret_value = ecma_builtin_dispatch_construct (func_obj_p, arguments_list_p, arguments_list_len);\n\n#if ENABLED (JERRY_ESNEXT)\n      JERRY_CONTEXT (current_new_target_p) = old_new_target;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n      JERRY_CONTEXT (global_object_p) = saved_global_object_p;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n      return ret_value;\n    }\n\n    return ecma_op_function_construct_native (func_obj_p, new_target_p, arguments_list_p, arguments_list_len);\n  }\n\n  JERRY_ASSERT (type == ECMA_OBJECT_TYPE_FUNCTION);\n  JERRY_ASSERT (!ecma_get_object_is_builtin (func_obj_p));\n\n  ecma_object_t *new_this_obj_p = NULL;\n  ecma_value_t this_arg;\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_extended_object_t *ext_func_obj_p = (ecma_extended_object_t *) func_obj_p;\n\n  /* 5. */\n  if (!ECMA_GET_THIRD_BIT_FROM_POINTER_TAG (ext_func_obj_p->u.function.scope_cp))\n  {\n#endif /* ENABLED (JERRY_ESNEXT) */\n    /* 5.a */\n    ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (new_target_p, ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n\n    /* 5.b */\n    if (JERRY_UNLIKELY (proto_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    new_this_obj_p = ecma_create_object (proto_p, 0, ECMA_OBJECT_TYPE_GENERAL);\n    ecma_deref_object (proto_p);\n    this_arg = ecma_make_object_value (new_this_obj_p);\n#if ENABLED (JERRY_ESNEXT)\n  }\n  else\n  {\n    this_arg = ECMA_VALUE_UNDEFINED;\n  }\n\n  /* 6. */\n  ecma_object_t *old_new_target_p = JERRY_CONTEXT (current_new_target_p);\n  JERRY_CONTEXT (current_new_target_p) = new_target_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t ret_value = ecma_op_function_call_simple (func_obj_p, this_arg, arguments_list_p, arguments_list_len);\n\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_CONTEXT (current_new_target_p) = old_new_target_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* 13.a */\n  if (ECMA_IS_VALUE_ERROR (ret_value) || ecma_is_value_object (ret_value))\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (new_this_obj_p != NULL)\n    {\n      ecma_deref_object (new_this_obj_p);\n    }\n#else /* !ENABLED (JERRY_ESNEXT) */\n    ecma_deref_object (new_this_obj_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n    return ret_value;\n  }\n\n  /* 13.b */\n  ecma_free_value (ret_value);\n  return this_arg;\n} /* ecma_op_function_construct */\n\n/**\n * Lazy instantiation of 'prototype' property for non-builtin and external functions\n *\n * @return pointer to newly instantiated property\n */\nstatic ecma_property_t *\necma_op_lazy_instantiate_prototype_object (ecma_object_t *object_p) /**< the function object */\n{\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_FUNCTION\n                || ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_global_object_t *global_object_p;\n\n  if (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_FUNCTION)\n  {\n    const ecma_compiled_code_t *bytecode_data_p;\n    bytecode_data_p = ecma_op_function_get_compiled_code ((ecma_extended_object_t *) object_p);\n\n    global_object_p = ecma_op_function_get_realm (bytecode_data_p);\n  }\n  else\n  {\n    ecma_native_function_t *native_function_p = (ecma_native_function_t *) object_p;\n\n    global_object_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_global_object_t,\n                                                       native_function_p->realm_value);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  /* ECMA-262 v5, 13.2, 16-18 */\n\n  ecma_object_t *proto_object_p = NULL;\n  bool init_constructor = true;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_FUNCTION)\n  {\n    const ecma_compiled_code_t *byte_code_p = ecma_op_function_get_compiled_code ((ecma_extended_object_t *) object_p);\n\n    if (!CBC_FUNCTION_HAS_PROTOTYPE (byte_code_p->status_flags))\n    {\n      return NULL;\n    }\n\n    if (CBC_FUNCTION_GET_TYPE (byte_code_p->status_flags) == CBC_FUNCTION_GENERATOR)\n    {\n      ecma_object_t *prototype_p;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n      prototype_p = ecma_builtin_get_from_realm (global_object_p, ECMA_BUILTIN_ID_GENERATOR_PROTOTYPE);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n      prototype_p = ecma_builtin_get (ECMA_BUILTIN_ID_GENERATOR_PROTOTYPE);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n      proto_object_p = ecma_create_object (prototype_p, 0, ECMA_OBJECT_TYPE_GENERAL);\n      init_constructor = false;\n    }\n\n    if (CBC_FUNCTION_GET_TYPE (byte_code_p->status_flags) == CBC_FUNCTION_ASYNC_GENERATOR)\n    {\n      ecma_object_t *prototype_p;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n      prototype_p = ecma_builtin_get_from_realm (global_object_p, ECMA_BUILTIN_ID_ASYNC_GENERATOR_PROTOTYPE);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n      prototype_p = ecma_builtin_get (ECMA_BUILTIN_ID_ASYNC_GENERATOR_PROTOTYPE);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n      proto_object_p = ecma_create_object (prototype_p, 0, ECMA_OBJECT_TYPE_GENERAL);\n      init_constructor = false;\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n  if (proto_object_p == NULL)\n#endif /* ENABLED (JERRY_ESNEXT) */\n  {\n    ecma_object_t *prototype_p;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    prototype_p = ecma_builtin_get_from_realm (global_object_p, ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n    prototype_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n    proto_object_p = ecma_op_create_object_object_noarg_and_set_prototype (prototype_p);\n  }\n\n  /* 17. */\n  if (init_constructor)\n  {\n    ecma_property_value_t *constructor_prop_value_p;\n    constructor_prop_value_p = ecma_create_named_data_property (proto_object_p,\n                                                                ecma_get_magic_string (LIT_MAGIC_STRING_CONSTRUCTOR),\n                                                                ECMA_PROPERTY_CONFIGURABLE_WRITABLE,\n                                                                NULL);\n\n    constructor_prop_value_p->value = ecma_make_object_value (object_p);\n  }\n\n  /* 18. */\n  ecma_property_t *prototype_prop_p;\n  ecma_property_value_t *prototype_prop_value_p;\n  prototype_prop_value_p = ecma_create_named_data_property (object_p,\n                                                            ecma_get_magic_string (LIT_MAGIC_STRING_PROTOTYPE),\n                                                            ECMA_PROPERTY_FLAG_WRITABLE,\n                                                            &prototype_prop_p);\n\n  prototype_prop_value_p->value = ecma_make_object_value (proto_object_p);\n\n  ecma_deref_object (proto_object_p);\n\n  return prototype_prop_p;\n} /* ecma_op_lazy_instantiate_prototype_object */\n\n/**\n * Lazy instantiation of non-builtin ecma function object's properties\n *\n * Warning:\n *         Only non-configurable properties could be instantiated lazily in this function,\n *         as configurable properties could be deleted and it would be incorrect\n *         to reinstantiate them in the function in second time.\n *\n * @return pointer to newly instantiated property, if a property was instantiated,\n *         NULL - otherwise\n */\necma_property_t *\necma_op_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, /**< the function object */\n                                                   ecma_string_t *property_name_p) /**< property name */\n{\n  JERRY_ASSERT (!ecma_get_object_is_builtin (object_p));\n\n#if ENABLED (JERRY_ESNEXT)\n  if (ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_LENGTH))\n  {\n    ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n\n    if (!ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (ext_func_p->u.function.scope_cp))\n    {\n      /* Initialize 'length' property */\n      const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);\n      uint32_t len;\n\n      if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_HAS_EXTENDED_INFO)\n      {\n        len = CBC_EXTENDED_INFO_GET_LENGTH (ecma_compiled_code_resolve_extended_info (bytecode_data_p));\n      }\n      else if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n      {\n        cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_data_p;\n        len = args_p->argument_end;\n      }\n      else\n      {\n        cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_data_p;\n        len = args_p->argument_end;\n      }\n\n      /* Set tag bit to represent initialized 'length' property */\n      ECMA_SET_FIRST_BIT_TO_POINTER_TAG (ext_func_p->u.function.scope_cp);\n      ecma_property_t *value_prop_p;\n      ecma_property_value_t *value_p = ecma_create_named_data_property (object_p,\n                                                                        property_name_p,\n                                                                        ECMA_PROPERTY_FLAG_CONFIGURABLE,\n                                                                        &value_prop_p);\n      value_p->value = ecma_make_uint32_value (len);\n      return value_prop_p;\n    }\n\n    return NULL;\n  }\n\n  if (ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_NAME))\n  {\n    ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n    if (!ECMA_GET_SECOND_BIT_FROM_POINTER_TAG (ext_func_p->u.function.scope_cp))\n    {\n      /* Set tag bit to represent initialized 'name' property */\n      ECMA_SET_SECOND_BIT_TO_POINTER_TAG (ext_func_p->u.function.scope_cp);\n      const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);\n\n      if (CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)\n      {\n        ecma_value_t value = *ecma_compiled_code_resolve_function_name (bytecode_data_p);\n        JERRY_ASSERT (ecma_is_value_string (value));\n\n        /* Initialize 'name' property */\n        ecma_property_t *value_prop_p;\n        ecma_property_value_t *value_p = ecma_create_named_data_property (object_p,\n                                                                          property_name_p,\n                                                                          ECMA_PROPERTY_FLAG_CONFIGURABLE,\n                                                                          &value_prop_p);\n        value_p->value = ecma_copy_value (value);\n        return value_prop_p;\n      }\n    }\n\n    return NULL;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_PROTOTYPE)\n      && ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_FUNCTION)\n  {\n    return ecma_op_lazy_instantiate_prototype_object (object_p);\n  }\n\n  const bool is_arguments = ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_ARGUMENTS);\n\n  if (is_arguments\n      || ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_CALLER))\n  {\n    const ecma_compiled_code_t *bytecode_data_p;\n    bytecode_data_p = ecma_op_function_get_compiled_code ((ecma_extended_object_t *) object_p);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (!(bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE)\n        && CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags) == CBC_FUNCTION_NORMAL)\n    {\n      ecma_property_t *value_prop_p;\n      /* The property_name_p argument contains the name. */\n      ecma_property_value_t *value_p = ecma_create_named_data_property (object_p,\n                                                                        property_name_p,\n                                                                        ECMA_PROPERTY_FIXED,\n                                                                        &value_prop_p);\n      value_p->value = is_arguments ? ECMA_VALUE_NULL : ECMA_VALUE_UNDEFINED;\n      return value_prop_p;\n    }\n#else /* !ENABLED (JERRY_ESNEXT) */\n    if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE)\n    {\n      ecma_object_t *thrower_p = ecma_builtin_get (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER);\n\n      ecma_property_t *caller_prop_p;\n      /* The property_name_p argument contains the name. */\n      ecma_create_named_accessor_property (object_p,\n                                           property_name_p,\n                                           thrower_p,\n                                           thrower_p,\n                                           ECMA_PROPERTY_FIXED,\n                                           &caller_prop_p);\n      return caller_prop_p;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n\n  return NULL;\n} /* ecma_op_function_try_to_lazy_instantiate_property */\n\n/**\n * Create specification defined non-configurable properties for external functions.\n *\n * See also:\n *          ECMA-262 v5, 15.3.4.5\n *\n * @return pointer property, if one was instantiated,\n *         NULL - otherwise.\n */\necma_property_t *\necma_op_external_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, /**< object */\n                                                            ecma_string_t *property_name_p) /**< property's name */\n{\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n  if (ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_PROTOTYPE))\n  {\n    return ecma_op_lazy_instantiate_prototype_object (object_p);\n  }\n\n  return NULL;\n} /* ecma_op_external_function_try_to_lazy_instantiate_property */\n\n/**\n * Create specification defined non-configurable properties for bound functions.\n *\n * See also:\n *          ECMA-262 v5, 15.3.4.5\n *\n * @return pointer property, if one was instantiated,\n *         NULL - otherwise.\n */\necma_property_t *\necma_op_bound_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, /**< object */\n                                                         ecma_string_t *property_name_p) /**< property's name */\n{\n  JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION);\n\n  if (ecma_string_is_length (property_name_p))\n  {\n    ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) object_p;\n    ecma_value_t args_len_or_this = bound_func_p->header.u.bound_function.args_len_or_this;\n    ecma_number_t length = 0;\n    ecma_integer_value_t args_length = 1;\n    uint8_t length_attributes;\n\n    if (ecma_is_value_integer_number (args_len_or_this))\n    {\n      args_length = ecma_get_integer_from_value (args_len_or_this);\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (bound_func_p->header.u.bound_function.target_function))\n    {\n      return NULL;\n    }\n\n    length_attributes = ECMA_PROPERTY_FLAG_CONFIGURABLE;\n    length = ecma_get_number_from_value (bound_func_p->target_length) - (args_length - 1);\n\n    /* Set tag bit to represent initialized 'length' property */\n    ECMA_SET_FIRST_BIT_TO_POINTER_TAG (bound_func_p->header.u.bound_function.target_function);\n#else /* !ENABLED (JERRY_ESNEXT) */\n    length_attributes = ECMA_PROPERTY_FIXED;\n\n    ecma_object_t *target_func_p;\n    target_func_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                                bound_func_p->header.u.bound_function.target_function);\n\n    if (ecma_object_get_class_name (target_func_p) == LIT_MAGIC_STRING_FUNCTION_UL)\n    {\n      /* The property_name_p argument contains the 'length' string. */\n      ecma_value_t get_len_value = ecma_op_object_get (target_func_p, property_name_p);\n\n      JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (get_len_value));\n      JERRY_ASSERT (ecma_is_value_integer_number (get_len_value));\n\n      length = (ecma_number_t) (ecma_get_integer_from_value (get_len_value) - (args_length - 1));\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (length < 0)\n    {\n      length = 0;\n    }\n\n    ecma_property_t *len_prop_p;\n    ecma_property_value_t *len_prop_value_p = ecma_create_named_data_property (object_p,\n                                                                               property_name_p,\n                                                                               length_attributes,\n                                                                               &len_prop_p);\n\n    len_prop_value_p->value = ecma_make_number_value (length);\n    return len_prop_p;\n  }\n\n#if !ENABLED (JERRY_ESNEXT)\n  if (ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_CALLER)\n      || ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_ARGUMENTS))\n  {\n    ecma_object_t *thrower_p = ecma_builtin_get (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER);\n\n    ecma_property_t *caller_prop_p;\n    /* The string_p argument contans the name. */\n    ecma_create_named_accessor_property (object_p,\n                                         property_name_p,\n                                         thrower_p,\n                                         thrower_p,\n                                         ECMA_PROPERTY_FIXED,\n                                         &caller_prop_p);\n    return caller_prop_p;\n  }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  return NULL;\n} /* ecma_op_bound_function_try_to_lazy_instantiate_property */\n\n/**\n * List names of a Function object's lazy instantiated properties,\n * adding them to corresponding string collections\n *\n * See also:\n *          ecma_op_function_try_to_lazy_instantiate_property\n */\nvoid\necma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functionobject */\n                                           ecma_collection_t *prop_names_p, /**< prop name collection */\n                                           ecma_property_counter_t *prop_counter_p)  /**< prop counter */\n{\n#if ENABLED (JERRY_ESNEXT)\n  ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n  if (!ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (ext_func_p->u.function.scope_cp))\n  {\n    /* Unintialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n    prop_counter_p->string_named_props++;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  /* 'length' property is non-enumerable (ECMA-262 v5, 13.2.5) */\n  ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n  prop_counter_p->string_named_props++;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  const ecma_compiled_code_t *bytecode_data_p;\n  bytecode_data_p = ecma_op_function_get_compiled_code ((ecma_extended_object_t *) object_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (!CBC_FUNCTION_HAS_PROTOTYPE (bytecode_data_p->status_flags))\n  {\n    return;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* 'prototype' property is non-enumerable (ECMA-262 v5, 13.2.18) */\n  ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_PROTOTYPE));\n  prop_counter_p->string_named_props++;\n\n#if ENABLED (JERRY_ESNEXT)\n  bool append_caller_and_arguments = !(bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  bool append_caller_and_arguments = (bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (append_caller_and_arguments)\n  {\n    /* 'caller' property is non-enumerable (ECMA-262 v5, 13.2.5) */\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_CALLER));\n\n    /* 'arguments' property is non-enumerable (ECMA-262 v5, 13.2.5) */\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_ARGUMENTS));\n\n    prop_counter_p->string_named_props += 2;\n  }\n} /* ecma_op_function_list_lazy_property_names */\n\n/**\n * List names of an External Function object's lazy instantiated properties,\n * adding them to corresponding string collections\n *\n * See also:\n *          ecma_op_external_function_try_to_lazy_instantiate_property\n */\nvoid\necma_op_external_function_list_lazy_property_names (ecma_object_t *object_p, /**< function object */\n                                                    ecma_collection_t *prop_names_p, /**< prop name collection */\n                                                    ecma_property_counter_t *prop_counter_p)  /**< prop counter */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  JERRY_UNUSED (object_p);\n#else /* ENABLED (JERRY_ESNEXT) */\n  if (!ecma_op_ordinary_object_has_own_property (object_p, ecma_get_magic_string (LIT_MAGIC_STRING_PROTOTYPE)))\n#endif /* !ENABLED (JERRY_ESNEXT) */\n  {\n    /* 'prototype' property is non-enumerable (ECMA-262 v5, 13.2.18) */\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_PROTOTYPE));\n    prop_counter_p->string_named_props++;\n  }\n} /* ecma_op_external_function_list_lazy_property_names */\n\n/**\n * List names of a Bound Function object's lazy instantiated properties,\n * adding them to corresponding string collections\n *\n * See also:\n *          ecma_op_bound_function_try_to_lazy_instantiate_property\n */\nvoid\necma_op_bound_function_list_lazy_property_names (ecma_object_t *object_p, /**< bound function object*/\n                                                 ecma_collection_t *prop_names_p, /**< prop name collection */\n                                                 ecma_property_counter_t *prop_counter_p)  /**< prop counter */\n{\n#if ENABLED (JERRY_ESNEXT)\n  /* Unintialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */\n  ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) object_p;\n  if (!ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (bound_func_p->header.u.bound_function.target_function))\n  {\n    ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n    prop_counter_p->string_named_props++;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (object_p);\n  /* 'length' property is non-enumerable (ECMA-262 v5, 13.2.5) */\n  ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n  prop_counter_p->string_named_props++;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* 'caller' property is non-enumerable (ECMA-262 v5, 13.2.5) */\n  ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_CALLER));\n\n  /* 'arguments' property is non-enumerable (ECMA-262 v5, 13.2.5) */\n  ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_ARGUMENTS));\n\n  prop_counter_p->string_named_props += 2;\n} /* ecma_op_bound_function_list_lazy_property_names */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-function-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_FUNCTION_OBJECT_H\n#define ECMA_FUNCTION_OBJECT_H\n\n#include \"ecma-globals.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-handlers.h\"\n#include \"vm.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmafunctionobject ECMA Function object related routines\n * @{\n */\n\n#if ENABLED (JERRY_ESNEXT)\necma_value_t ecma_op_function_form_name (ecma_string_t *prop_name_p, char *prefix_p, lit_utf8_size_t prefix_size);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\nbool ecma_op_is_callable (ecma_value_t value);\nbool ecma_op_object_is_callable (ecma_object_t *obj_p);\nbool ecma_is_constructor (ecma_value_t value);\nbool ecma_object_is_constructor (ecma_object_t *obj_p);\n\n/**\n * Special constant indicating that the value is a valid constructor\n *\n * Use after the ecma_*_check_constructor calls.\n */\n#define ECMA_IS_VALID_CONSTRUCTOR ((char *) 0x1)\n\nchar *ecma_object_check_constructor (ecma_object_t *obj_p);\nchar *ecma_check_constructor (ecma_value_t value);\n\necma_object_t *\necma_op_create_simple_function_object (ecma_object_t *scope_p, const ecma_compiled_code_t *bytecode_data_p);\n\necma_object_t *\necma_op_create_external_function_object (ecma_native_handler_t handler_cb);\n\nconst ecma_compiled_code_t *\necma_op_function_get_compiled_code (ecma_extended_object_t *function_p);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\necma_global_object_t *\necma_op_function_get_realm (const ecma_compiled_code_t *bytecode_header_p);\n\necma_global_object_t *\necma_op_function_get_function_realm (ecma_object_t *func_obj_p);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\necma_value_t\necma_op_create_dynamic_function (const ecma_value_t *arguments_list_p,\n                                 uint32_t arguments_list_len,\n                                 ecma_parse_opts_t opts);\n\n#if ENABLED (JERRY_ESNEXT)\necma_value_t\necma_op_function_get_super_constructor (ecma_object_t *func_obj_p);\n\necma_object_t *\necma_op_create_any_function_object (ecma_object_t *scope_p, const ecma_compiled_code_t *bytecode_data_p);\n\necma_object_t *\necma_op_create_arrow_function_object (ecma_object_t *scope_p, const ecma_compiled_code_t *bytecode_data_p,\n                                      ecma_value_t this_binding);\n\necma_object_t *\necma_op_create_native_handler (ecma_native_handler_id_t id, size_t object_size);\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\necma_object_t *\necma_op_get_prototype_from_constructor (ecma_object_t *ctor_obj_p, ecma_builtin_id_t default_proto_id);\n\necma_value_t\necma_op_function_has_instance (ecma_object_t *func_obj_p, ecma_value_t value);\n\necma_value_t\necma_op_function_call (ecma_object_t *func_obj_p, ecma_value_t this_arg_value,\n                       const ecma_value_t *arguments_list_p, uint32_t arguments_list_len);\n\necma_value_t\necma_op_function_construct (ecma_object_t *func_obj_p, ecma_object_t *new_target_p,\n                            const ecma_value_t *arguments_list_p, uint32_t arguments_list_len);\n\necma_property_t *\necma_op_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, ecma_string_t *property_name_p);\n\necma_property_t *\necma_op_external_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, ecma_string_t *property_name_p);\n\necma_property_t *\necma_op_bound_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, ecma_string_t *property_name_p);\n\nvoid\necma_op_function_list_lazy_property_names (ecma_object_t *object_p,\n                                           ecma_collection_t *prop_names_p,\n                                           ecma_property_counter_t *prop_counter_p);\n\nvoid\necma_op_external_function_list_lazy_property_names (ecma_object_t *object_p,\n                                                    ecma_collection_t *prop_names_p,\n                                                    ecma_property_counter_t *prop_counter_p);\n\nvoid\necma_op_bound_function_list_lazy_property_names (ecma_object_t *object_p,\n                                                 ecma_collection_t *prop_names_p,\n                                                 ecma_property_counter_t *prop_counter_p);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_FUNCTION_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-get-put-value.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Implementation of ECMA GetValue and PutValue\n */\n\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-objects-general.h\"\n\n#include \"ecma-reference.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup lexicalenvironment Lexical environment\n * @{\n */\n\n/**\n * GetValue operation part\n *\n * See also: ECMA-262 v5, 8.7.1, sections 3 and 5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_get_value_lex_env_base (ecma_object_t *lex_env_p, /**< lexical environment */\n                                ecma_object_t **ref_base_lex_env_p, /**< [out] reference's base (lexical environment) */\n                                ecma_string_t *name_p) /**< variable name */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n\n  while (true)\n  {\n    switch (ecma_get_lex_env_type (lex_env_p))\n    {\n      case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:\n      {\n        ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n        if (property_p != NULL)\n        {\n          *ref_base_lex_env_p = lex_env_p;\n          ecma_property_value_t *property_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n#if ENABLED (JERRY_ESNEXT)\n          if (JERRY_UNLIKELY (property_value_p->value == ECMA_VALUE_UNINITIALIZED))\n          {\n            return ecma_raise_reference_error (ECMA_ERR_MSG (\"Variables declared by let/const must be\"\n                                                             \" initialized before reading their value.\"));\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          return ecma_fast_copy_value (property_value_p->value);\n        }\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND:\n      {\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      default:\n      {\n        JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n        ecma_value_t result = ecma_op_object_bound_environment_resolve_reference_value (lex_env_p, name_p);\n\n        if (ecma_is_value_found (result))\n        {\n          /* Note: the result may contains ECMA_VALUE_ERROR */\n          *ref_base_lex_env_p = lex_env_p;\n          return result;\n        }\n\n        break;\n      }\n    }\n\n    if (lex_env_p->u2.outer_reference_cp == JMEM_CP_NULL)\n    {\n      break;\n    }\n\n    lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n  }\n\n  *ref_base_lex_env_p = NULL;\n#if ENABLED (JERRY_ERROR_MESSAGES)\n  return ecma_raise_standard_error_with_format (ECMA_ERROR_REFERENCE,\n                                                \"% is not defined\",\n                                                ecma_make_string_value (name_p));\n#else /* ENABLED (JERRY_ERROR_MESSAGES) */\n  return ecma_raise_reference_error (NULL);\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n\n} /* ecma_op_get_value_lex_env_base */\n\n/**\n * GetValue operation part (object base).\n *\n * See also: ECMA-262 v5, 8.7.1, section 4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_get_value_object_base (ecma_value_t base_value, /**< base value */\n                               ecma_string_t *property_name_p) /**< property name */\n{\n  ecma_object_t *obj_p;\n\n  if (JERRY_UNLIKELY (ecma_is_value_object (base_value)))\n  {\n    obj_p = ecma_get_object_from_value (base_value);\n  }\n  else\n  {\n    ecma_builtin_id_t id = ECMA_BUILTIN_ID_OBJECT_PROTOTYPE;\n\n    if (JERRY_LIKELY (ecma_is_value_string (base_value)))\n    {\n      ecma_string_t *string_p = ecma_get_string_from_value (base_value);\n\n      if (ecma_string_is_length (property_name_p))\n      {\n        return ecma_make_uint32_value (ecma_string_get_length (string_p));\n      }\n\n      uint32_t index = ecma_string_get_array_index (property_name_p);\n\n      if (index != ECMA_STRING_NOT_ARRAY_INDEX\n          && index < ecma_string_get_length (string_p))\n      {\n        ecma_char_t char_at_idx = ecma_string_get_char_at_pos (string_p, index);\n        return ecma_make_string_value (ecma_new_ecma_string_from_code_unit (char_at_idx));\n      }\n\n#if ENABLED (JERRY_BUILTIN_STRING)\n      id = ECMA_BUILTIN_ID_STRING_PROTOTYPE;\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n    }\n    else if (ecma_is_value_number (base_value))\n    {\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n      id = ECMA_BUILTIN_ID_NUMBER_PROTOTYPE;\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (ecma_is_value_symbol (base_value))\n    {\n      id = ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    else if (ecma_is_value_bigint (base_value))\n    {\n      id = ECMA_BUILTIN_ID_BIGINT_PROTOTYPE;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    else\n    {\n      JERRY_ASSERT (ecma_is_value_boolean (base_value));\n#if ENABLED (JERRY_BUILTIN_BOOLEAN)\n      id = ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE;\n#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */\n    }\n\n    obj_p = ecma_builtin_get (id);\n  }\n\n  return ecma_op_object_get_with_receiver (obj_p, property_name_p, base_value);\n} /* ecma_op_get_value_object_base */\n\n/**\n * PutValue operation part\n *\n * See also: ECMA-262 v5, 8.7.2, sections 3 and 5\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_put_value_lex_env_base (ecma_object_t *lex_env_p, /**< lexical environment */\n                                ecma_string_t *name_p, /**< variable name */\n                                bool is_strict, /**< flag indicating strict mode */\n                                ecma_value_t value) /**< ECMA-value */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n\n  while (true)\n  {\n    switch (ecma_get_lex_env_type (lex_env_p))\n    {\n      case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:\n      {\n        ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n        if (property_p != NULL)\n        {\n          if (ecma_is_property_writable (*property_p))\n          {\n            ecma_property_value_t *property_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n#if ENABLED (JERRY_ESNEXT)\n            if (JERRY_UNLIKELY (property_value_p->value == ECMA_VALUE_UNINITIALIZED))\n            {\n              return ecma_raise_reference_error (ECMA_ERR_MSG (\"Variables declared by let/const must be\"\n                                                               \" initialized before writing their value.\"));\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n            ecma_named_data_property_assign_value (lex_env_p, property_value_p, value);\n          }\n#if ENABLED (JERRY_ESNEXT)\n          else if (ecma_is_property_enumerable (*property_p))\n          {\n            if (JERRY_UNLIKELY (ECMA_PROPERTY_VALUE_PTR (property_p)->value == ECMA_VALUE_UNINITIALIZED))\n            {\n              return ecma_raise_reference_error (ECMA_ERR_MSG (\"Variables declared by let/const must be\"\n                                                               \" initialized before writing their value.\"));\n            }\n\n            return ecma_raise_type_error (ECMA_ERR_MSG (\"Constant bindings cannot be reassigned.\"));\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          else if (is_strict)\n          {\n            return ecma_raise_type_error (ECMA_ERR_MSG (\"Binding cannot be set.\"));\n          }\n          return ECMA_VALUE_EMPTY;\n        }\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND:\n      {\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      default:\n      {\n        JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n        ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n\n        ecma_value_t has_property = ecma_op_object_has_property (binding_obj_p, name_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n        if (ECMA_IS_VALUE_ERROR (has_property))\n        {\n          return has_property;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n        if (ecma_is_value_true (has_property))\n        {\n          ecma_value_t completion = ecma_op_object_put (binding_obj_p,\n                                                        name_p,\n                                                        value,\n                                                        is_strict);\n\n          if (ECMA_IS_VALUE_ERROR (completion))\n          {\n            return completion;\n          }\n\n          JERRY_ASSERT (ecma_is_value_boolean (completion));\n          return ECMA_VALUE_EMPTY;\n        }\n\n        break;\n      }\n    }\n\n    if (lex_env_p->u2.outer_reference_cp == JMEM_CP_NULL)\n    {\n      break;\n    }\n\n    lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n  }\n\n  JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n  if (is_strict)\n  {\n#if ENABLED (JERRY_ERROR_MESSAGES)\n    return ecma_raise_standard_error_with_format (ECMA_ERROR_REFERENCE,\n                                                  \"% is not defined\",\n                                                  ecma_make_string_value (name_p));\n#else /* !ENABLED (JERRY_ERROR_MESSAGES) */\n    return ecma_raise_reference_error (NULL);\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n  }\n\n  ecma_value_t completion = ecma_op_object_put (ecma_get_lex_env_binding_object (lex_env_p),\n                                                name_p,\n                                                value,\n                                                false);\n\n  JERRY_ASSERT (ecma_is_value_boolean (completion));\n\n  return ECMA_VALUE_EMPTY;\n} /* ecma_op_put_value_lex_env_base */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-number-arithmetic.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-function-object.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaiteratorobject ECMA iterator object related routines\n * @{\n */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Implementation of 'CreateArrayFromList' specialized for iterators\n *\n * See also:\n *          ECMA-262 v6, 7.3.16.\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return new array object\n */\necma_value_t\necma_create_array_from_iter_element (ecma_value_t value, /**< value */\n                                     ecma_value_t index_value) /**< iterator index */\n{\n  /* 2. */\n  ecma_object_t *new_array_p = ecma_op_new_array_object (0);\n\n  /* 3-4. */\n  ecma_value_t completion;\n  completion = ecma_builtin_helper_def_prop_by_index (new_array_p,\n                                                      0,\n                                                      index_value,\n                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n\n  /* 4.b */\n  JERRY_ASSERT (ecma_is_value_true (completion));\n\n  completion = ecma_builtin_helper_def_prop_by_index (new_array_p,\n                                                      1,\n                                                      value,\n                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n  JERRY_ASSERT (ecma_is_value_true (completion));\n\n  /* 5. */\n  return ecma_make_object_value (new_array_p);\n} /* ecma_create_array_from_iter_element */\n\n/**\n * CreateIterResultObject operation\n *\n * See also:\n *          ECMA-262 v6, 7.4.7.\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object\n */\necma_value_t\necma_create_iter_result_object (ecma_value_t value, /**< value */\n                                ecma_value_t done) /**< ECMA_VALUE_{TRUE,FALSE} based\n                                                    *   on the iterator index */\n{\n  /* 1. */\n  JERRY_ASSERT (ecma_is_value_boolean (done));\n\n  /* 2. */\n  ecma_object_t *object_p = ecma_create_object (ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE),\n                                                0,\n                                                ECMA_OBJECT_TYPE_GENERAL);\n\n  /* 3. */\n  ecma_property_value_t *prop_value_p;\n  prop_value_p = ecma_create_named_data_property (object_p,\n                                                  ecma_get_magic_string (LIT_MAGIC_STRING_VALUE),\n                                                  ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                  NULL);\n\n  prop_value_p->value = ecma_copy_value_if_not_object (value);\n\n  /* 4. */\n  prop_value_p = ecma_create_named_data_property (object_p,\n                                                  ecma_get_magic_string (LIT_MAGIC_STRING_DONE),\n                                                  ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                  NULL);\n  prop_value_p->value = done;\n\n  /* 5. */\n  return ecma_make_object_value (object_p);\n} /* ecma_create_iter_result_object */\n\n/**\n * General iterator object creation operation.\n *\n * See also: ECMA-262 v6, 21.1.5.1, 22.1.5.1, 23.1.5.1\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator object\n */\necma_value_t\necma_op_create_iterator_object (ecma_value_t iterated_value, /**< value from create iterator */\n                                ecma_object_t *prototype_obj_p, /**< prototype object */\n                                ecma_pseudo_array_type_t iterator_type, /**< iterator type */\n                                ecma_iterator_kind_t kind) /**< iterator kind*/\n{\n  /* 1. */\n  JERRY_ASSERT (iterator_type >= ECMA_PSEUDO_ARRAY_ITERATOR\n                && iterator_type <= ECMA_PSEUDO_ARRAY__MAX\n                && kind < ECMA_ITERATOR__COUNT);\n\n  /* 2. */\n  ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                sizeof (ecma_extended_object_t),\n                                                ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n  ext_obj_p->u.pseudo_array.type = (uint8_t) iterator_type;\n\n  /* 3. */\n  ext_obj_p->u.pseudo_array.u2.iterated_value = iterated_value;\n  /* 4. */\n  ext_obj_p->u.pseudo_array.u1.iterator_index = 0;\n  /* 5. */\n  ext_obj_p->u.pseudo_array.extra_info = (uint8_t) kind;\n\n  /* 6. */\n  return ecma_make_object_value (object_p);\n} /* ecma_op_create_iterator_object */\n\n/**\n * GetIterator operation\n *\n * See also: ECMA-262 v10, 7.4.1\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator object - if success\n *         raised error - otherwise\n */\necma_value_t\necma_op_get_iterator (ecma_value_t value, /**< value to get iterator from */\n                      ecma_value_t method, /**< provided method argument */\n                      ecma_value_t *next_method_p) /**< [out] next method */\n{\n  if (next_method_p != NULL)\n  {\n    /* TODO: NULL support should be removed after all functions support next method caching. */\n    *next_method_p = ECMA_VALUE_UNDEFINED;\n  }\n\n  /* 1. */\n  if (ECMA_IS_VALUE_ERROR (value))\n  {\n    return value;\n  }\n\n  bool use_default_method = false;\n\n  /* 2. */\n  if (method == ECMA_VALUE_SYNC_ITERATOR)\n  {\n    /* 2.a */\n    use_default_method = true;\n    method = ecma_op_get_method_by_symbol_id (value, LIT_GLOBAL_SYMBOL_ITERATOR);\n\n    /* 2.b */\n    if (ECMA_IS_VALUE_ERROR (method))\n    {\n      return method;\n    }\n  }\n  else if (method == ECMA_VALUE_ASYNC_ITERATOR)\n  {\n    /* TODO: CreateAsyncFromSyncIterator should be supported. */\n    use_default_method = true;\n    method = ecma_op_get_method_by_symbol_id (value, LIT_GLOBAL_SYMBOL_ASYNC_ITERATOR);\n\n    if (ECMA_IS_VALUE_ERROR (method))\n    {\n      return method;\n    }\n  }\n\n  /* 3. */\n  if (!ecma_is_value_object (method) || !ecma_op_is_callable (method))\n  {\n    ecma_free_value (method);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator is not function\"));\n  }\n\n  ecma_object_t *method_obj_p = ecma_get_object_from_value (method);\n  ecma_value_t iterator = ecma_op_function_call (method_obj_p, value, NULL, 0);\n\n  if (use_default_method)\n  {\n    ecma_deref_object (method_obj_p);\n  }\n\n  /* 4. */\n  if (ECMA_IS_VALUE_ERROR (iterator))\n  {\n    return iterator;\n  }\n\n  /* 5. */\n  if (!ecma_is_value_object (iterator))\n  {\n    ecma_free_value (iterator);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator is not an object.\"));\n  }\n\n  if (next_method_p != NULL)\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (iterator);\n    ecma_value_t next_method = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_NEXT);\n\n    if (ECMA_IS_VALUE_ERROR (next_method))\n    {\n      ecma_free_value (iterator);\n      return next_method;\n    }\n\n    if (ecma_is_value_object (next_method) && ecma_op_is_callable (next_method))\n    {\n      *next_method_p = next_method;\n    }\n    else\n    {\n      ecma_free_value (next_method);\n    }\n  }\n\n  /* 6. */\n  return iterator;\n} /* ecma_op_get_iterator */\n\n/**\n * IteratorNext operation\n *\n * See also: ECMA-262 v6, 7.4.2\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object - if success\n *         raised error - otherwise\n */\nstatic ecma_value_t\necma_op_iterator_next_old (ecma_value_t iterator, /**< iterator value */\n                           ecma_value_t value) /**< the routines's value argument */\n{\n  JERRY_ASSERT (ecma_is_value_object (iterator));\n\n  /* 1 - 2. */\n  ecma_object_t *obj_p = ecma_get_object_from_value (iterator);\n\n  ecma_value_t func_next = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_NEXT);\n\n  if (ECMA_IS_VALUE_ERROR (func_next))\n  {\n    return func_next;\n  }\n\n  if (!ecma_is_value_object (func_next) || !ecma_op_is_callable (func_next))\n  {\n    ecma_free_value (func_next);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator next() is not callable.\"));\n  }\n\n  ecma_object_t *next_obj_p = ecma_get_object_from_value (func_next);\n\n  bool has_value = !ecma_is_value_empty (value);\n\n  ecma_value_t result;\n  if (has_value)\n  {\n    result = ecma_op_function_call (next_obj_p, iterator, &value, 1);\n  }\n  else\n  {\n    result = ecma_op_function_call (next_obj_p, iterator, NULL, 0);\n  }\n\n  ecma_free_value (func_next);\n\n  /* 5. */\n  return result;\n} /* ecma_op_iterator_next_old */\n\n/**\n * IteratorNext operation\n *\n * See also: ECMA-262 v10, 7.4.2\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object - if success\n *         raised error - otherwise\n */\necma_value_t\necma_op_iterator_next (ecma_value_t iterator, /**< iterator value */\n                       ecma_value_t next_method, /**< next method */\n                       ecma_value_t value) /**< the routines's value argument */\n{\n  JERRY_ASSERT (ecma_is_value_object (iterator));\n\n  /* 1 - 2. */\n  if (next_method == ECMA_VALUE_UNDEFINED)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator next() is not callable.\"));\n  }\n\n  ecma_object_t *next_method_obj_p = ecma_get_object_from_value (next_method);\n\n  bool has_value = !ecma_is_value_empty (value);\n\n  if (has_value)\n  {\n    return ecma_op_function_call (next_method_obj_p, iterator, &value, 1);\n  }\n\n  return ecma_op_function_call (next_method_obj_p, iterator, NULL, 0);\n} /* ecma_op_iterator_next */\n\n/**\n * IteratorReturn operation\n *\n * See also: ECMA-262 v6, 14.4.14 (last part)\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object - if success\n *         raised error - otherwise\n */\nstatic ecma_value_t\necma_op_iterator_return (ecma_value_t iterator, /**< iterator value */\n                         ecma_value_t value) /**< the routines's value argument */\n{\n  JERRY_ASSERT (ecma_is_value_object (iterator));\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (iterator);\n  ecma_value_t func_return = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_RETURN);\n\n  if (ECMA_IS_VALUE_ERROR (func_return))\n  {\n    return func_return;\n  }\n\n  if (func_return == ECMA_VALUE_UNDEFINED)\n  {\n    return ecma_create_iter_result_object (value, ECMA_VALUE_TRUE);\n  }\n\n  if (!ecma_is_value_object (func_return) || !ecma_op_is_callable (func_return))\n  {\n    ecma_free_value (func_return);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator return() is not callable.\"));\n  }\n\n  ecma_object_t *return_obj_p = ecma_get_object_from_value (func_return);\n\n  ecma_value_t result = ecma_op_function_call (return_obj_p, iterator, &value, 1);\n  ecma_free_value (func_return);\n\n  return result;\n} /* ecma_op_iterator_return */\n\n/**\n * IteratorThrow operation\n *\n * See also: ECMA-262 v6, 14.4.14 (last part)\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object - if success\n *         raised error - otherwise\n */\nstatic ecma_value_t\necma_op_iterator_throw (ecma_value_t iterator, /**< iterator value */\n                        ecma_value_t value) /**< the routines's value argument */\n{\n  JERRY_ASSERT (ecma_is_value_object (iterator));\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (iterator);\n  ecma_value_t func_throw = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_THROW);\n\n  if (ECMA_IS_VALUE_ERROR (func_throw))\n  {\n    return func_throw;\n  }\n\n  if (func_throw == ECMA_VALUE_UNDEFINED)\n  {\n    ecma_value_t result = ecma_op_iterator_close (iterator);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      return result;\n    }\n\n    ecma_free_value (result);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator throw() is not available.\"));\n  }\n\n  if (!ecma_is_value_object (func_throw) || !ecma_op_is_callable (func_throw))\n  {\n    ecma_free_value (func_throw);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator throw() is not callable.\"));\n  }\n\n  ecma_object_t *return_obj_p = ecma_get_object_from_value (func_throw);\n\n  ecma_value_t result = ecma_op_function_call (return_obj_p, iterator, &value, 1);\n  ecma_free_value (func_throw);\n\n  return result;\n} /* ecma_op_iterator_throw */\n\n/**\n * IteratorValue operation\n *\n * See also: ECMA-262 v6, 7.4.4\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return value of the iterator result object\n */\necma_value_t\necma_op_iterator_value (ecma_value_t iter_result) /**< iterator value */\n{\n  /* 1. */\n  JERRY_ASSERT (ecma_is_value_object (iter_result));\n\n  /* 2. */\n  ecma_object_t *obj_p = ecma_get_object_from_value (iter_result);\n  return ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_VALUE);\n} /* ecma_op_iterator_value */\n\n/**\n * IteratorClose operation\n *\n * See also: ECMA-262 v6, 7.4.6\n *\n * @return ECMA_VALUE_EMPTY - if \"return\" is succesfully invoked,\n *                            and the operation is called with normal completion\n *         ECMA_VALUE_ERROR - otherwise\n */\necma_value_t\necma_op_iterator_close (ecma_value_t iterator) /**< iterator value */\n{\n  /* 1. */\n  JERRY_ASSERT (ecma_is_value_object (iterator));\n\n  /* 2. */\n  ecma_value_t completion = ECMA_VALUE_EMPTY;\n\n  if (jcontext_has_pending_exception ())\n  {\n    completion = jcontext_take_exception ();\n  }\n\n  /* 3. */\n  ecma_value_t return_method = ecma_op_get_method_by_magic_id (iterator, LIT_MAGIC_STRING_RETURN);\n\n  /* 4. */\n  if (ECMA_IS_VALUE_ERROR (return_method))\n  {\n    ecma_free_value (completion);\n    return return_method;\n  }\n\n  /* 5. */\n  if (ecma_is_value_undefined (return_method))\n  {\n    if (ecma_is_value_empty (completion))\n    {\n      return ECMA_VALUE_UNDEFINED;\n    }\n\n    jcontext_raise_exception (completion);\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 6. */\n  ecma_object_t *return_obj_p = ecma_get_object_from_value (return_method);\n  ecma_value_t inner_result = ecma_op_function_call (return_obj_p, iterator, NULL, 0);\n  ecma_deref_object (return_obj_p);\n\n  /* 7. */\n  if (!ecma_is_value_empty (completion))\n  {\n    if (ECMA_IS_VALUE_ERROR (inner_result))\n    {\n      jcontext_release_exception ();\n    }\n    else\n    {\n      ecma_free_value (inner_result);\n    }\n\n    jcontext_raise_exception (completion);\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* 8. */\n  if (ECMA_IS_VALUE_ERROR (inner_result))\n  {\n    ecma_free_value (completion);\n    return inner_result;\n  }\n\n  /* 9. */\n  bool is_object = ecma_is_value_object (inner_result);\n  ecma_free_value (inner_result);\n\n  if (!is_object)\n  {\n    ecma_free_value (completion);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"method 'return' is not callable.\"));\n  }\n\n  /* 10. */\n  if (ecma_is_value_empty (completion))\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  jcontext_raise_exception (completion);\n  return ECMA_VALUE_ERROR;\n} /* ecma_op_iterator_close */\n\n/**\n * IteratorStep operation\n *\n * See also: ECMA-262 v6, 7.4.5\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator object or ECMA_VALUE_FALSE - if success\n *         raised error - otherwise\n */\necma_value_t\necma_op_iterator_step (ecma_value_t iterator, /**< iterator value */\n                       ecma_value_t next_method) /**< next method */\n{\n  /* 1. */\n  ecma_value_t result;\n  if (next_method == ECMA_VALUE_EMPTY)\n  {\n    /* TODO: EMPTY support should be removed after all functions support next method caching. */\n    result = ecma_op_iterator_next_old (iterator, ECMA_VALUE_EMPTY);\n  }\n  else\n  {\n    result = ecma_op_iterator_next (iterator, next_method, ECMA_VALUE_EMPTY);\n  }\n\n  /* 2. */\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  if (!ecma_is_value_object (result))\n  {\n    ecma_free_value (result);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator result is not an object.\"));\n  }\n\n  /* 3. */\n  ecma_object_t *obj_p = ecma_get_object_from_value (result);\n  ecma_value_t done = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_DONE);\n\n  /* 4. */\n  if (ECMA_IS_VALUE_ERROR (done))\n  {\n    ecma_free_value (result);\n    return done;\n  }\n\n  bool is_done = ecma_op_to_boolean (done);\n  ecma_free_value (done);\n\n  /* 5. */\n  if (is_done)\n  {\n    ecma_free_value (result);\n    return ECMA_VALUE_FALSE;\n  }\n\n  /* 6. */\n  return result;\n} /* ecma_op_iterator_step */\n\n/**\n * Perform a command specified by the command argument\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator object - if success\n *         raised error - otherwise\n */\necma_value_t\necma_op_iterator_do (ecma_iterator_command_type_t command, /**< command to be executed */\n                     ecma_value_t iterator, /**< iterator object */\n                     ecma_value_t next_method, /**< next method */\n                     ecma_value_t value, /**< the routines's value argument */\n                     bool *done_p) /**< it contains the logical value of the done property */\n{\n  ecma_value_t result;\n\n  if (command == ECMA_ITERATOR_NEXT)\n  {\n    result = ecma_op_iterator_next (iterator, next_method, value);\n  }\n  else if (command == ECMA_ITERATOR_THROW)\n  {\n    result = ecma_op_iterator_throw (iterator, value);\n  }\n  else\n  {\n    JERRY_ASSERT (command == ECMA_ITERATOR_RETURN);\n    result = ecma_op_iterator_return (iterator, value);\n  }\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  if (!ecma_is_value_object (result))\n  {\n    ecma_free_value (result);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator result is not an object.\"));\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (result);\n  ecma_value_t done = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_DONE);\n\n  if (ECMA_IS_VALUE_ERROR (done))\n  {\n    ecma_free_value (result);\n    return done;\n  }\n\n  *done_p = ecma_op_to_boolean (done);\n  ecma_free_value (done);\n\n  return result;\n} /* ecma_op_iterator_do */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-iterator-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_ITERATOR_OBJECT_H\n#define ECMA_ITERATOR_OBJECT_H\n\n#include \"ecma-globals.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaiteratorobject ECMA iterator object related routines\n * @{\n */\n\n/**\n * Generator resume execution flags.\n */\ntypedef enum\n{\n  ECMA_ITERATOR_NEXT, /**< generator should continue its execution */\n  ECMA_ITERATOR_THROW, /**< generator should perform a throw operation */\n  ECMA_ITERATOR_RETURN, /**< generator should perform a return operation */\n} ecma_iterator_command_type_t;\n\n/**\n * Maximum value of [[%Iterator%NextIndex]] until it can be stored\n * in an ecma pseudo array object structure element.\n */\n#define ECMA_ITERATOR_INDEX_LIMIT UINT16_MAX\n\necma_value_t\necma_op_create_iterator_object (ecma_value_t iterated_value,\n                                ecma_object_t *prototype_obj_p,\n                                ecma_pseudo_array_type_t iterator_type,\n                                ecma_iterator_kind_t kind);\n\necma_value_t\necma_create_iter_result_object (ecma_value_t value, ecma_value_t done);\n\necma_value_t\necma_create_array_from_iter_element (ecma_value_t value, ecma_value_t index_value);\n\necma_value_t\necma_op_get_iterator (ecma_value_t value, ecma_value_t method, ecma_value_t *next_method_p);\n\necma_value_t\necma_op_iterator_value (ecma_value_t iter_result);\n\necma_value_t\necma_op_iterator_next (ecma_value_t iterator, ecma_value_t next_method, ecma_value_t value);\n\necma_value_t\necma_op_iterator_close (ecma_value_t iterator);\n\necma_value_t\necma_op_iterator_step (ecma_value_t iterator, ecma_value_t next_method);\n\necma_value_t\necma_op_iterator_do (ecma_iterator_command_type_t command, ecma_value_t iterator,\n                     ecma_value_t next_method, ecma_value_t value, bool *done_p);\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_ITERATOR_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-async-generator-object.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-jobqueue.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-promise-object.h\"\n#include \"jcontext.h\"\n#include \"opcodes.h\"\n#include \"vm-stack.h\"\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n\n/**\n * Mask for job queue type.\n */\n#define ECMA_JOB_QUEURE_TYPE_MASK ((uintptr_t) 0x07)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmajobqueue ECMA Job Queue related routines\n * @{\n */\n\n/**\n * Description of the PromiseReactionJob\n */\ntypedef struct\n{\n  ecma_job_queue_item_t header; /**< job queue item header */\n  ecma_value_t capability; /**< capability object */\n  ecma_value_t handler; /**< handler function */\n  ecma_value_t argument; /**< argument for the reaction */\n} ecma_job_promise_reaction_t;\n\n/**\n * Description of the PromiseAsyncReactionJob\n */\ntypedef struct\n{\n  ecma_job_queue_item_t header; /**< job queue item header */\n  ecma_value_t executable_object; /**< executable object */\n  ecma_value_t argument; /**< argument for the reaction */\n} ecma_job_promise_async_reaction_t;\n\n/**\n * Description of the PromiseAsyncGeneratorJob\n */\ntypedef struct\n{\n  ecma_job_queue_item_t header; /**< job queue item header */\n  ecma_value_t executable_object; /**< executable object */\n} ecma_job_promise_async_generator_t;\n\n/**\n * Description of the PromiseResolveThenableJob\n */\ntypedef struct\n{\n  ecma_job_queue_item_t header; /**< job queue item header */\n  ecma_value_t promise; /**< promise to be resolved */\n  ecma_value_t thenable; /**< thenable object */\n  ecma_value_t then; /**< 'then' function */\n} ecma_job_promise_resolve_thenable_t;\n\n/**\n * Initialize the jobqueue.\n */\nvoid ecma_job_queue_init (void)\n{\n  JERRY_CONTEXT (job_queue_head_p) = NULL;\n  JERRY_CONTEXT (job_queue_tail_p) = NULL;\n} /* ecma_job_queue_init */\n\n/**\n * Get the type of the job.\n *\n * @return type of the job\n */\nstatic inline ecma_job_queue_item_type_t JERRY_ATTR_ALWAYS_INLINE\necma_job_queue_get_type (ecma_job_queue_item_t *job_p) /**< the job */\n{\n  return (ecma_job_queue_item_type_t) (job_p->next_and_type & ECMA_JOB_QUEURE_TYPE_MASK);\n} /* ecma_job_queue_get_type */\n\n/**\n * Get the next job of the job queue.\n *\n * @return next job\n */\nstatic inline ecma_job_queue_item_t *JERRY_ATTR_ALWAYS_INLINE\necma_job_queue_get_next (ecma_job_queue_item_t *job_p) /**< the job */\n{\n  return (ecma_job_queue_item_t *) (job_p->next_and_type & ~ECMA_JOB_QUEURE_TYPE_MASK);\n} /* ecma_job_queue_get_next */\n\n/**\n * Free the heap and the member of the PromiseReactionJob.\n */\nstatic void\necma_free_promise_reaction_job (ecma_job_promise_reaction_t *job_p) /**< points to the PromiseReactionJob */\n{\n  JERRY_ASSERT (job_p != NULL);\n\n  ecma_free_value (job_p->capability);\n  ecma_free_value (job_p->handler);\n  ecma_free_value (job_p->argument);\n\n  jmem_heap_free_block (job_p, sizeof (ecma_job_promise_reaction_t));\n} /* ecma_free_promise_reaction_job */\n\n/**\n * Free the heap and the member of the PromiseAsyncReactionJob.\n */\nstatic void\necma_free_promise_async_reaction_job (ecma_job_promise_async_reaction_t *job_p) /**< points to the\n                                                                                 *   PromiseAsyncReactionJob */\n{\n  JERRY_ASSERT (job_p != NULL);\n\n  ecma_free_value (job_p->executable_object);\n  ecma_free_value (job_p->argument);\n\n  jmem_heap_free_block (job_p, sizeof (ecma_job_promise_async_reaction_t));\n} /* ecma_free_promise_async_reaction_job */\n\n/**\n * Free the heap and the member of the PromiseAsyncGeneratorJob.\n */\nstatic void\necma_free_promise_async_generator_job (ecma_job_promise_async_generator_t *job_p) /**< points to the\n                                                                                   *   PromiseAsyncReactionJob */\n{\n  JERRY_ASSERT (job_p != NULL);\n\n  ecma_free_value (job_p->executable_object);\n\n  jmem_heap_free_block (job_p, sizeof (ecma_job_promise_async_generator_t));\n} /* ecma_free_promise_async_generator_job */\n\n/**\n * Free the heap and the member of the PromiseResolveThenableJob.\n */\nstatic void\necma_free_promise_resolve_thenable_job (ecma_job_promise_resolve_thenable_t *job_p) /**< points to the\n                                                                                     *   PromiseResolveThenableJob */\n{\n  JERRY_ASSERT (job_p != NULL);\n\n  ecma_free_value (job_p->promise);\n  ecma_free_value (job_p->thenable);\n  ecma_free_value (job_p->then);\n\n  jmem_heap_free_block (job_p, sizeof (ecma_job_promise_resolve_thenable_t));\n} /* ecma_free_promise_resolve_thenable_job */\n\n/**\n * The processor for PromiseReactionJob.\n *\n * See also: ES2015 25.4.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\necma_process_promise_reaction_job (ecma_job_promise_reaction_t *job_p) /**< the job to be operated */\n{\n  /* 2. */\n  JERRY_ASSERT (ecma_object_class_is (ecma_get_object_from_value (job_p->capability),\n                                      LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY));\n  ecma_promise_capabality_t *capability_p;\n  capability_p = (ecma_promise_capabality_t *) ecma_get_object_from_value (job_p->capability);\n  /* 3. */\n  ecma_value_t handler = job_p->handler;\n\n  JERRY_ASSERT (ecma_is_value_boolean (handler) || ecma_op_is_callable (handler));\n\n  ecma_value_t handler_result;\n\n  if (ecma_is_value_boolean (handler))\n  {\n    /* 4-5. True indicates \"identity\" and false indicates \"thrower\" */\n    handler_result = ecma_copy_value (job_p->argument);\n  }\n  else\n  {\n    /* 6. */\n    handler_result = ecma_op_function_call (ecma_get_object_from_value (handler),\n                                            ECMA_VALUE_UNDEFINED,\n                                            &(job_p->argument),\n                                            1);\n  }\n\n  ecma_value_t status;\n\n  if (ecma_is_value_false (handler) || ECMA_IS_VALUE_ERROR (handler_result))\n  {\n    if (ECMA_IS_VALUE_ERROR (handler_result))\n    {\n      handler_result = jcontext_take_exception ();\n    }\n\n    /* 7. */\n    status = ecma_op_function_call (ecma_get_object_from_value (capability_p->reject),\n                                    ECMA_VALUE_UNDEFINED,\n                                    &handler_result,\n                                    1);\n  }\n  else\n  {\n    /* 8. */\n    status = ecma_op_function_call (ecma_get_object_from_value (capability_p->resolve),\n                                    ECMA_VALUE_UNDEFINED,\n                                    &handler_result,\n                                    1);\n  }\n\n  ecma_free_value (handler_result);\n  ecma_free_promise_reaction_job (job_p);\n\n  return status;\n} /* ecma_process_promise_reaction_job */\n\n/**\n * The processor for PromiseAsyncReactionJob.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\necma_process_promise_async_reaction_job (ecma_job_promise_async_reaction_t *job_p) /**< the job to be operated */\n{\n  ecma_object_t *object_p = ecma_get_object_from_value (job_p->executable_object);\n  vm_executable_object_t *executable_object_p = (vm_executable_object_t *) object_p;\n\n  if (ecma_job_queue_get_type (&job_p->header) == ECMA_JOB_PROMISE_ASYNC_REACTION_REJECTED)\n  {\n    if (!(executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD))\n    {\n      executable_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_throw;\n    }\n    else if (ECMA_AWAIT_GET_STATE (executable_object_p) == ECMA_AWAIT_YIELD_RETURN)\n    {\n      /* Unlike other operations, return captures rejected promises as well. */\n      ECMA_AWAIT_CHANGE_STATE (executable_object_p, YIELD_RETURN, YIELD_OPERATION);\n    }\n    else\n    {\n      if (ECMA_AWAIT_GET_STATE (executable_object_p) <= ECMA_AWAIT_YIELD_END)\n      {\n        JERRY_ASSERT (ecma_is_value_object (executable_object_p->frame_ctx.block_result));\n        executable_object_p->frame_ctx.block_result = ECMA_VALUE_UNDEFINED;\n\n        JERRY_ASSERT (executable_object_p->frame_ctx.stack_top_p[-1] == ECMA_VALUE_UNDEFINED\n                      || ecma_is_value_object (executable_object_p->frame_ctx.stack_top_p[-1]));\n        executable_object_p->frame_ctx.stack_top_p--;\n      }\n      else if (ECMA_AWAIT_GET_STATE (executable_object_p) == ECMA_AWAIT_FOR_CLOSE\n               && VM_GET_CONTEXT_TYPE (executable_object_p->frame_ctx.stack_top_p[-1]) == VM_CONTEXT_FINALLY_THROW)\n      {\n        ecma_free_value (job_p->argument);\n        job_p->argument = ecma_copy_value (executable_object_p->frame_ctx.stack_top_p[-2]);\n      }\n\n      /* Exception: Abort iterators, clear all status. */\n      executable_object_p->extended_object.u.class_prop.extra_info &= ECMA_AWAIT_CLEAR_MASK;\n      executable_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_throw;\n    }\n  }\n\n  if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD)\n  {\n    job_p->argument = ecma_await_continue (executable_object_p, job_p->argument);\n\n    if (ECMA_IS_VALUE_ERROR (job_p->argument))\n    {\n      job_p->argument = jcontext_take_exception ();\n      executable_object_p->frame_ctx.byte_code_p = opfunc_resume_executable_object_with_throw;\n    }\n    else if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD)\n    {\n      /* Continue iteration. */\n      JERRY_ASSERT (job_p->argument == ECMA_VALUE_UNDEFINED);\n\n      ecma_free_promise_async_reaction_job (job_p);\n      return ECMA_VALUE_UNDEFINED;\n    }\n\n    if (ECMA_AWAIT_GET_STATE (executable_object_p) <= ECMA_AWAIT_YIELD_END)\n    {\n      JERRY_ASSERT (ecma_is_value_object (executable_object_p->frame_ctx.block_result));\n      executable_object_p->frame_ctx.block_result = ECMA_VALUE_UNDEFINED;\n\n      JERRY_ASSERT (executable_object_p->frame_ctx.stack_top_p[-1] == ECMA_VALUE_UNDEFINED\n                    || ecma_is_value_object (executable_object_p->frame_ctx.stack_top_p[-1]));\n      executable_object_p->frame_ctx.stack_top_p--;\n    }\n\n    /* Clear all status. */\n    executable_object_p->extended_object.u.class_prop.extra_info &= ECMA_AWAIT_CLEAR_MASK;\n  }\n\n  ecma_value_t result = opfunc_resume_executable_object (executable_object_p, job_p->argument);\n  /* Argument reference has been taken by opfunc_resume_executable_object. */\n  job_p->argument = ECMA_VALUE_UNDEFINED;\n\n  uint16_t expected_bits = (ECMA_EXECUTABLE_OBJECT_COMPLETED | ECMA_ASYNC_GENERATOR_CALLED);\n  if ((executable_object_p->extended_object.u.class_prop.extra_info & expected_bits) == expected_bits)\n  {\n    ecma_async_generator_finalize (executable_object_p, result);\n    result = ECMA_VALUE_UNDEFINED;\n  }\n\n  ecma_free_promise_async_reaction_job (job_p);\n  return result;\n} /* ecma_process_promise_async_reaction_job */\n\n/**\n * The processor for PromiseAsyncGeneratorJob.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\necma_process_promise_async_generator_job (ecma_job_promise_async_generator_t *job_p) /**< the job to be operated */\n{\n  ecma_object_t *object_p = ecma_get_object_from_value (job_p->executable_object);\n\n  ecma_value_t result = ecma_async_generator_run ((vm_executable_object_t *) object_p);\n\n  ecma_free_value (job_p->executable_object);\n  jmem_heap_free_block (job_p, sizeof (ecma_job_promise_async_generator_t));\n  return result;\n} /* ecma_process_promise_async_generator_job */\n\n/**\n * Process the PromiseResolveThenableJob.\n *\n * See also: ES2015 25.4.2.2\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\necma_process_promise_resolve_thenable_job (ecma_job_promise_resolve_thenable_t *job_p) /**< the job to be operated */\n{\n  ecma_promise_object_t *promise_p = (ecma_promise_object_t *) ecma_get_object_from_value (job_p->promise);\n  ecma_promise_create_resolving_functions (promise_p);\n\n  uint16_t new_flags = (uint16_t) (promise_p->header.u.class_prop.extra_info & ~ECMA_PROMISE_ALREADY_RESOLVED);\n  promise_p->header.u.class_prop.extra_info = new_flags;\n\n  ecma_value_t argv[] = { promise_p->resolve, promise_p->reject };\n  ecma_value_t ret;\n  ecma_value_t then_call_result = ecma_op_function_call (ecma_get_object_from_value (job_p->then),\n                                                         job_p->thenable,\n                                                         argv,\n                                                         2);\n\n  ret = then_call_result;\n\n  if (ECMA_IS_VALUE_ERROR (then_call_result))\n  {\n    then_call_result = jcontext_take_exception ();\n\n    ret = ecma_op_function_call (ecma_get_object_from_value (promise_p->reject),\n                                 ECMA_VALUE_UNDEFINED,\n                                 &then_call_result,\n                                 1);\n\n    ecma_free_value (then_call_result);\n  }\n\n  ecma_free_promise_resolve_thenable_job (job_p);\n\n  return ret;\n} /* ecma_process_promise_resolve_thenable_job */\n\n/**\n * Enqueue a Promise job into the jobqueue.\n */\nstatic void\necma_enqueue_job (ecma_job_queue_item_t *job_p) /**< the job */\n{\n  JERRY_ASSERT (job_p->next_and_type <= ECMA_JOB_QUEURE_TYPE_MASK);\n\n  if (JERRY_CONTEXT (job_queue_head_p) == NULL)\n  {\n    JERRY_CONTEXT (job_queue_head_p) = job_p;\n    JERRY_CONTEXT (job_queue_tail_p) = job_p;\n  }\n  else\n  {\n    JERRY_ASSERT ((JERRY_CONTEXT (job_queue_tail_p)->next_and_type & ~ECMA_JOB_QUEURE_TYPE_MASK) == 0);\n\n    JERRY_CONTEXT (job_queue_tail_p)->next_and_type |= (uintptr_t) job_p;\n    JERRY_CONTEXT (job_queue_tail_p) = job_p;\n  }\n} /* ecma_enqueue_job */\n\n/**\n * Enqueue a PromiseReactionJob into the job queue.\n */\nvoid\necma_enqueue_promise_reaction_job (ecma_value_t capability, /**< capability object */\n                                   ecma_value_t handler, /**< handler function */\n                                   ecma_value_t argument) /**< argument for the reaction */\n{\n  ecma_job_promise_reaction_t *job_p;\n  job_p = (ecma_job_promise_reaction_t *) jmem_heap_alloc_block (sizeof (ecma_job_promise_reaction_t));\n  job_p->header.next_and_type = ECMA_JOB_PROMISE_REACTION;\n  job_p->capability = ecma_copy_value (capability);\n  job_p->handler = ecma_copy_value (handler);\n  job_p->argument = ecma_copy_value (argument);\n\n  ecma_enqueue_job (&job_p->header);\n} /* ecma_enqueue_promise_reaction_job */\n\n/**\n * Enqueue a PromiseAsyncReactionJob into the job queue.\n */\nvoid\necma_enqueue_promise_async_reaction_job (ecma_value_t executable_object, /**< executable object */\n                                         ecma_value_t argument, /**< argument */\n                                         bool is_rejected) /**< is_fulfilled */\n{\n  ecma_job_promise_async_reaction_t *job_p;\n  job_p = (ecma_job_promise_async_reaction_t *) jmem_heap_alloc_block (sizeof (ecma_job_promise_async_reaction_t));\n  job_p->header.next_and_type = (is_rejected ? ECMA_JOB_PROMISE_ASYNC_REACTION_REJECTED\n                                             : ECMA_JOB_PROMISE_ASYNC_REACTION_FULFILLED);\n  job_p->executable_object = ecma_copy_value (executable_object);\n  job_p->argument = ecma_copy_value (argument);\n\n  ecma_enqueue_job (&job_p->header);\n} /* ecma_enqueue_promise_async_reaction_job */\n\n/**\n * Enqueue a PromiseAsyncGeneratorJob into the job queue.\n */\nvoid\necma_enqueue_promise_async_generator_job (ecma_value_t executable_object) /**< executable object */\n{\n  ecma_job_promise_async_generator_t *job_p;\n  job_p = (ecma_job_promise_async_generator_t *) jmem_heap_alloc_block (sizeof (ecma_job_promise_async_generator_t));\n  job_p->header.next_and_type = ECMA_JOB_PROMISE_ASYNC_GENERATOR;\n  job_p->executable_object = ecma_copy_value (executable_object);\n\n  ecma_enqueue_job (&job_p->header);\n} /* ecma_enqueue_promise_async_generator_job */\n\n/**\n * Enqueue a PromiseResolveThenableJob into the job queue.\n */\nvoid\necma_enqueue_promise_resolve_thenable_job (ecma_value_t promise, /**< promise to be resolved */\n                                           ecma_value_t thenable, /**< thenable object */\n                                           ecma_value_t then) /**< 'then' function */\n{\n  JERRY_ASSERT (ecma_is_promise (ecma_get_object_from_value (promise)));\n  JERRY_ASSERT (ecma_is_value_object (thenable));\n  JERRY_ASSERT (ecma_op_is_callable (then));\n\n  ecma_job_promise_resolve_thenable_t *job_p;\n  job_p = (ecma_job_promise_resolve_thenable_t *) jmem_heap_alloc_block (sizeof (ecma_job_promise_resolve_thenable_t));\n  job_p->header.next_and_type = ECMA_JOB_PROMISE_THENABLE;\n  job_p->promise = ecma_copy_value (promise);\n  job_p->thenable = ecma_copy_value (thenable);\n  job_p->then = ecma_copy_value (then);\n\n  ecma_enqueue_job (&job_p->header);\n} /* ecma_enqueue_promise_resolve_thenable_job */\n\n/**\n * Process enqueued Promise jobs until the first thrown error or until the\n * jobqueue becomes empty.\n *\n * @return result of the last processed job - if the jobqueue was non-empty,\n *         undefined - otherwise.\n */\necma_value_t\necma_process_all_enqueued_jobs (void)\n{\n  ecma_value_t ret = ECMA_VALUE_UNDEFINED;\n\n  while (JERRY_CONTEXT (job_queue_head_p) != NULL)\n  {\n    ecma_job_queue_item_t *job_p = JERRY_CONTEXT (job_queue_head_p);\n    JERRY_CONTEXT (job_queue_head_p) = ecma_job_queue_get_next (job_p);\n\n    ecma_fast_free_value (ret);\n\n    switch (ecma_job_queue_get_type (job_p))\n    {\n      case ECMA_JOB_PROMISE_REACTION:\n      {\n        ret = ecma_process_promise_reaction_job ((ecma_job_promise_reaction_t *) job_p);\n        break;\n      }\n      case ECMA_JOB_PROMISE_ASYNC_REACTION_FULFILLED:\n      case ECMA_JOB_PROMISE_ASYNC_REACTION_REJECTED:\n      {\n        ret = ecma_process_promise_async_reaction_job ((ecma_job_promise_async_reaction_t *) job_p);\n        break;\n      }\n      case ECMA_JOB_PROMISE_ASYNC_GENERATOR:\n      {\n        ret = ecma_process_promise_async_generator_job ((ecma_job_promise_async_generator_t *) job_p);\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (ecma_job_queue_get_type (job_p) == ECMA_JOB_PROMISE_THENABLE);\n\n        ret = ecma_process_promise_resolve_thenable_job ((ecma_job_promise_resolve_thenable_t *) job_p);\n        break;\n      }\n    }\n\n    if (ECMA_IS_VALUE_ERROR (ret))\n    {\n      return ret;\n    }\n  }\n\n  ecma_free_value (ret);\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_process_all_enqueued_jobs */\n\n/**\n * Release enqueued Promise jobs.\n */\nvoid\necma_free_all_enqueued_jobs (void)\n{\n  while (JERRY_CONTEXT (job_queue_head_p) != NULL)\n  {\n    ecma_job_queue_item_t *job_p = JERRY_CONTEXT (job_queue_head_p);\n    JERRY_CONTEXT (job_queue_head_p) = ecma_job_queue_get_next (job_p);\n\n    switch (ecma_job_queue_get_type (job_p))\n    {\n      case ECMA_JOB_PROMISE_REACTION:\n      {\n        ecma_free_promise_reaction_job ((ecma_job_promise_reaction_t *) job_p);\n        break;\n      }\n      case ECMA_JOB_PROMISE_ASYNC_REACTION_FULFILLED:\n      case ECMA_JOB_PROMISE_ASYNC_REACTION_REJECTED:\n      {\n        ecma_free_promise_async_reaction_job ((ecma_job_promise_async_reaction_t *) job_p);\n        break;\n      }\n      case ECMA_JOB_PROMISE_ASYNC_GENERATOR:\n      {\n        ecma_free_promise_async_generator_job ((ecma_job_promise_async_generator_t *) job_p);\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (ecma_job_queue_get_type (job_p) == ECMA_JOB_PROMISE_THENABLE);\n\n        ecma_free_promise_resolve_thenable_job ((ecma_job_promise_resolve_thenable_t *) job_p);\n        break;\n      }\n    }\n  }\n} /* ecma_free_all_enqueued_jobs */\n\n/**\n * @}\n * @}\n */\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-jobqueue.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_JOB_QUEUE_H\n#define ECMA_JOB_QUEUE_H\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmajobqueue ECMA Job Queue related routines\n * @{\n */\n\n/**\n * Job queue item types.\n */\ntypedef enum\n{\n  ECMA_JOB_PROMISE_REACTION, /**< promise reaction job */\n  ECMA_JOB_PROMISE_ASYNC_REACTION_FULFILLED, /**< fulfilled promise async reaction job */\n  ECMA_JOB_PROMISE_ASYNC_REACTION_REJECTED, /**< rejected promise async reaction job */\n  ECMA_JOB_PROMISE_ASYNC_GENERATOR, /**< continue async generator */\n  ECMA_JOB_PROMISE_THENABLE, /**< promise thenable job */\n} ecma_job_queue_item_type_t;\n\n/**\n * Description of the job queue item.\n */\ntypedef struct\n{\n  uintptr_t next_and_type; /**< next and type members of a queue item */\n} ecma_job_queue_item_t;\n\nvoid ecma_job_queue_init (void);\n\nvoid ecma_enqueue_promise_reaction_job (ecma_value_t capability, ecma_value_t handler, ecma_value_t argument);\nvoid ecma_enqueue_promise_async_reaction_job (ecma_value_t executable_object,\n                                              ecma_value_t argument, bool is_rejected);\nvoid ecma_enqueue_promise_async_generator_job (ecma_value_t executable_object);\nvoid ecma_enqueue_promise_resolve_thenable_job (ecma_value_t promise, ecma_value_t thenable, ecma_value_t then);\nvoid ecma_free_all_enqueued_jobs (void);\n\necma_value_t ecma_process_all_enqueued_jobs (void);\n\n/**\n * @}\n * @}\n */\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n#endif /* !ECMA_JOB_QUEUE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-lex-env.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-proxy-object.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup lexicalenvironment Lexical environment\n * @{\n *\n * \\addtogroup globallexicalenvironment Global lexical environment\n * @{\n */\n\n/**\n * Initialize Global environment\n */\nvoid\necma_init_global_environment (void)\n{\n  JERRY_CONTEXT (global_object_p) = ecma_builtin_create_global_object ();\n} /* ecma_init_global_environment */\n\n/**\n * Finalize Global environment\n */\nvoid\necma_finalize_global_environment (void)\n{\n  /* After this point the gc can free the global object, but the global_object_p pointer\n   * is not set to NULL because the global object might still be used before the free. */\n  ecma_deref_object ((ecma_object_t *) JERRY_CONTEXT (global_object_p));\n} /* ecma_finalize_global_environment */\n\n/**\n * Get reference to Global lexical environment\n * without increasing its reference count.\n *\n * @return pointer to the object's instance\n */\necma_object_t *\necma_get_global_environment (ecma_object_t *global_object_p) /**< global object */\n{\n  JERRY_ASSERT (global_object_p != NULL && ecma_builtin_is_global (global_object_p));\n  return ECMA_GET_NON_NULL_POINTER (ecma_object_t, ((ecma_global_object_t *) global_object_p)->global_env_cp);\n} /* ecma_get_global_environment */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Create the global lexical block on top of the global environment.\n */\nvoid\necma_create_global_lexical_block (ecma_object_t *global_object_p) /**< global object */\n{\n  JERRY_ASSERT (global_object_p != NULL && ecma_builtin_is_global (global_object_p));\n\n  ecma_global_object_t *real_global_object_p = (ecma_global_object_t *) global_object_p;\n\n  if (real_global_object_p->global_scope_cp == real_global_object_p->global_env_cp)\n  {\n    ecma_object_t *global_scope_p = ecma_create_decl_lex_env (ecma_get_global_environment (global_object_p));\n    global_scope_p->type_flags_refs |= (uint16_t) ECMA_OBJECT_FLAG_BLOCK;\n    ECMA_SET_NON_NULL_POINTER (real_global_object_p->global_scope_cp, global_scope_p);\n    ecma_deref_object (global_scope_p);\n  }\n} /* ecma_create_global_lexical_block */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Get reference to Global lexical scope\n * without increasing its reference count.\n *\n * @return pointer to the object's instance\n */\necma_object_t *\necma_get_global_scope (ecma_object_t *global_object_p) /**< global object */\n{\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT (global_object_p != NULL && ecma_builtin_is_global (global_object_p));\n  return ECMA_GET_NON_NULL_POINTER (ecma_object_t, ((ecma_global_object_t *) global_object_p)->global_scope_cp);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  return ecma_get_global_environment (global_object_p);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n} /* ecma_get_global_scope */\n\n/**\n * @}\n */\n\n/**\n * HasBinding operation.\n *\n * See also: ECMA-262 v5, 10.2.1\n *\n * @return true / false\n */\necma_value_t\necma_op_has_binding (ecma_object_t *lex_env_p, /**< lexical environment */\n                     ecma_string_t *name_p) /**< argument N */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n\n  ecma_lexical_environment_type_t lex_env_type = ecma_get_lex_env_type (lex_env_p);\n\n  if (lex_env_type == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n  {\n    ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n    return ecma_make_boolean_value (property_p != NULL);\n  }\n\n  JERRY_ASSERT (lex_env_type == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n  ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n\n  return ecma_op_object_has_property (binding_obj_p, name_p);\n} /* ecma_op_has_binding */\n\n/**\n * CreateMutableBinding operation.\n *\n * See also: ECMA-262 v5, 10.2.1\n *\n * @return ECMA_PROPERTY_POINTER_ERROR - if the operation raises error\n *         pointer to the created property - if the binding was created into a declerative environment\n *         NULL - otherwise\n */\necma_property_t *\necma_op_create_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environment */\n                                ecma_string_t *name_p, /**< argument N */\n                                bool is_deletable) /**< argument D */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n  JERRY_ASSERT (name_p != NULL);\n\n  if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n  {\n    uint8_t prop_attributes = ECMA_PROPERTY_FLAG_WRITABLE;\n\n    if (is_deletable)\n    {\n      prop_attributes = (uint8_t) (prop_attributes | ECMA_PROPERTY_FLAG_CONFIGURABLE);\n    }\n\n    ecma_property_t *prop_p;\n\n    ecma_create_named_data_property (lex_env_p,\n                                     name_p,\n                                     prop_attributes,\n                                     &prop_p);\n    return prop_p;\n  }\n  else\n  {\n    JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n    ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY) && ENABLED (JERRY_BUILTIN_REALMS)\n    if (ECMA_OBJECT_IS_PROXY (binding_obj_p))\n    {\n      ecma_value_t result = ecma_proxy_object_is_extensible (binding_obj_p);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        return ECMA_PROPERTY_POINTER_ERROR;\n      }\n\n      if (result == ECMA_VALUE_FALSE)\n      {\n        return NULL;\n      }\n    }\n    else if (!ecma_op_ordinary_object_is_extensible (binding_obj_p))\n    {\n      return NULL;\n    }\n#else /* !ENABLED (JERRY_BUILTIN_PROXY) || !ENABLED (JERRY_BUILTIN_REALMS) */\n    if (!ecma_op_ordinary_object_is_extensible (binding_obj_p))\n    {\n      return NULL;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) && ENABLED (JERRY_BUILTIN_REALMS) */\n\n    const uint32_t flags = ECMA_PROPERTY_ENUMERABLE_WRITABLE | ECMA_IS_THROW;\n\n    ecma_value_t completion = ecma_builtin_helper_def_prop (binding_obj_p,\n                                                            name_p,\n                                                            ECMA_VALUE_UNDEFINED,\n                                                            is_deletable ? flags | ECMA_PROPERTY_FLAG_CONFIGURABLE\n                                                                         : flags);\n\n    if (ECMA_IS_VALUE_ERROR (completion))\n    {\n      return ECMA_PROPERTY_POINTER_ERROR;\n    }\n    else\n    {\n      JERRY_ASSERT (ecma_is_value_boolean (completion));\n    }\n  }\n\n  return NULL;\n} /* ecma_op_create_mutable_binding */\n\n/**\n * SetMutableBinding operation.\n *\n * See also: ECMA-262 v5, 10.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_set_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environment */\n                             ecma_string_t *name_p, /**< argument N */\n                             ecma_value_t value, /**< argument V */\n                             bool is_strict) /**< argument S */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n  JERRY_ASSERT (name_p != NULL);\n\n  if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n  {\n    ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n    if (JERRY_UNLIKELY (property_p == NULL))\n    {\n      property_p = ecma_op_create_mutable_binding (lex_env_p, name_p, is_strict);\n      JERRY_ASSERT (property_p != ECMA_PROPERTY_POINTER_ERROR);\n    }\n\n    JERRY_ASSERT (property_p != NULL && ECMA_PROPERTY_IS_RAW_DATA (*property_p));\n\n    if (ecma_is_property_writable (*property_p))\n    {\n      ecma_named_data_property_assign_value (lex_env_p, ECMA_PROPERTY_VALUE_PTR (property_p), value);\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (ecma_is_property_enumerable (*property_p))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Constant bindings cannot be reassigned.\"));\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else if (is_strict)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Binding cannot be set.\"));\n    }\n  }\n  else\n  {\n    JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n    ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n\n    ecma_value_t completion = ecma_op_object_put (binding_obj_p,\n                                                  name_p,\n                                                  value,\n                                                  is_strict);\n\n    if (ECMA_IS_VALUE_ERROR (completion))\n    {\n      return completion;\n    }\n\n    JERRY_ASSERT (ecma_is_value_boolean (completion));\n  }\n\n  return ECMA_VALUE_EMPTY;\n} /* ecma_op_set_mutable_binding */\n\n/**\n * GetBindingValue operation.\n *\n * See also: ECMA-262 v5, 10.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_get_binding_value (ecma_object_t *lex_env_p, /**< lexical environment */\n                           ecma_string_t *name_p, /**< argument N */\n                           bool is_strict) /**< argument S */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n  JERRY_ASSERT (name_p != NULL);\n\n  if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n  {\n    ecma_property_value_t *prop_value_p = ecma_get_named_data_property (lex_env_p, name_p);\n\n    return ecma_copy_value (prop_value_p->value);\n  }\n  else\n  {\n    JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n    ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n\n    ecma_value_t result = ecma_op_object_find (binding_obj_p, name_p);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      return result;\n    }\n\n    if (!ecma_is_value_found (result))\n    {\n      if (is_strict)\n      {\n        result = ecma_raise_reference_error (ECMA_ERR_MSG (\"Binding does not exist or is uninitialised.\"));\n      }\n      else\n      {\n        result = ECMA_VALUE_UNDEFINED;\n      }\n    }\n\n    return result;\n  }\n} /* ecma_op_get_binding_value */\n\n/**\n * DeleteBinding operation.\n *\n * See also: ECMA-262 v5, 10.2.1\n *\n * @return ecma value\n *         Return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE/FALSE} - depends on whether the binding can be deleted\n */\necma_value_t\necma_op_delete_binding (ecma_object_t *lex_env_p, /**< lexical environment */\n                        ecma_string_t *name_p) /**< argument N */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n  JERRY_ASSERT (name_p != NULL);\n\n  if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n  {\n    ecma_property_t *prop_p = ecma_find_named_property (lex_env_p, name_p);\n    ecma_value_t ret_val;\n\n    if (prop_p == NULL)\n    {\n      ret_val = ECMA_VALUE_TRUE;\n    }\n    else\n    {\n      JERRY_ASSERT (ECMA_PROPERTY_IS_RAW_DATA (*prop_p));\n\n      if (!ecma_is_property_configurable (*prop_p))\n      {\n        ret_val = ECMA_VALUE_FALSE;\n      }\n      else\n      {\n        ecma_delete_property (lex_env_p, ECMA_PROPERTY_VALUE_PTR (prop_p));\n\n        ret_val = ECMA_VALUE_TRUE;\n      }\n    }\n\n    return ret_val;\n  }\n  else\n  {\n    JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n    ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n\n    return ecma_op_object_delete (binding_obj_p, name_p, false);\n  }\n} /* ecma_op_delete_binding */\n\n/**\n * ImplicitThisValue operation.\n *\n * See also: ECMA-262 v5, 10.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_implicit_this_value (ecma_object_t *lex_env_p) /**< lexical environment */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n\n  if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n  else\n  {\n    JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n\n    ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n    ecma_ref_object (binding_obj_p);\n\n    return ecma_make_object_value (binding_obj_p);\n  }\n} /* ecma_op_implicit_this_value */\n\n/**\n * CreateImmutableBinding operation.\n *\n * See also: ECMA-262 v5, 10.2.1\n */\nvoid\necma_op_create_immutable_binding (ecma_object_t *lex_env_p, /**< lexical environment */\n                                  ecma_string_t *name_p, /**< argument N */\n                                  ecma_value_t value) /**< argument V */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n  JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n\n  /*\n   * Warning:\n   *         Whether immutable bindings are deletable seems not to be defined by ECMA v5.\n   */\n  ecma_property_value_t *prop_value_p = ecma_create_named_data_property (lex_env_p,\n                                                                         name_p,\n                                                                         ECMA_PROPERTY_FIXED,\n                                                                         NULL);\n\n  prop_value_p->value = ecma_copy_value_if_not_object (value);\n} /* ecma_op_create_immutable_binding */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * InitializeBinding operation.\n *\n * See also: ECMA-262 v6, 8.1.1.1.4\n */\nvoid\necma_op_initialize_binding (ecma_object_t *lex_env_p, /**< lexical environment */\n                            ecma_string_t *name_p, /**< argument N */\n                            ecma_value_t value) /**< argument V */\n{\n  JERRY_ASSERT (lex_env_p != NULL\n                && ecma_is_lexical_environment (lex_env_p));\n  JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n\n  ecma_property_t *prop_p = ecma_find_named_property (lex_env_p, name_p);\n  JERRY_ASSERT (prop_p != NULL && ECMA_PROPERTY_IS_RAW_DATA (*prop_p));\n\n  ecma_property_value_t *prop_value_p = ECMA_PROPERTY_VALUE_PTR (prop_p);\n  JERRY_ASSERT (prop_value_p->value == ECMA_VALUE_UNINITIALIZED);\n\n  prop_value_p->value = ecma_copy_value_if_not_object (value);\n} /* ecma_op_initialize_binding */\n\n/**\n * BindThisValue operation for an empty lexical environment\n *\n * See also: ECMA-262 v6, 8.1.1.3.1\n */\nvoid\necma_op_create_environment_record (ecma_object_t *lex_env_p, /**< lexical environment */\n                                   ecma_value_t this_binding, /**< this binding value */\n                                   ecma_object_t *func_obj_p) /**< function object */\n{\n  JERRY_ASSERT (lex_env_p != NULL);\n  JERRY_ASSERT (ecma_is_value_object (this_binding) || this_binding == ECMA_VALUE_UNINITIALIZED);\n\n  ecma_environment_record_t *environment_record_p;\n  environment_record_p = (ecma_environment_record_t *) jmem_heap_alloc_block (sizeof (ecma_environment_record_t));\n\n  environment_record_p->this_binding = this_binding;\n  environment_record_p->function_object = ecma_make_object_value (func_obj_p);\n\n  ecma_string_t *property_name_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_ENVIRONMENT_RECORD);\n\n  ecma_property_t *property_p;\n  ecma_property_value_t *prop_value_p;\n  ECMA_CREATE_INTERNAL_PROPERTY (lex_env_p, property_name_p, property_p, prop_value_p);\n\n  ECMA_SET_INTERNAL_VALUE_POINTER (prop_value_p->value, environment_record_p);\n} /* ecma_op_create_environment_record */\n\n/**\n * GetThisEnvironment operation.\n *\n * See also: ECMA-262 v6, 8.3.2\n *\n * @return property pointer for the internal [[ThisBindingValue]] property\n */\necma_environment_record_t *\necma_op_get_environment_record (ecma_object_t *lex_env_p) /**< lexical environment */\n{\n  JERRY_ASSERT (lex_env_p != NULL);\n\n  ecma_string_t *property_name_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_ENVIRONMENT_RECORD);\n  while (true)\n  {\n    if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n    {\n      ecma_property_t *property_p = ecma_find_named_property (lex_env_p, property_name_p);\n\n      if (property_p != NULL)\n      {\n        ecma_property_value_t *property_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n        return ECMA_GET_INTERNAL_VALUE_POINTER (ecma_environment_record_t, property_value_p->value);\n      }\n    }\n\n    JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n    lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n  }\n} /* ecma_op_get_environment_record */\n\n/**\n * Get the environment record [[ThisBindingStatus]] internal property.\n *\n * See also: ECMA-262 v6, 8.1.1.3\n *\n * @return true - if the status is \"initialzed\"\n *         false - otherwise\n */\nbool\necma_op_this_binding_is_initialized (ecma_environment_record_t *environment_record_p) /**< environment record */\n{\n  JERRY_ASSERT (environment_record_p != NULL);\n\n  return environment_record_p->this_binding != ECMA_VALUE_UNINITIALIZED;\n} /* ecma_op_this_binding_is_initialized */\n\n/**\n * BindThisValue operation.\n *\n * See also: ECMA-262 v6, 8.1.1.3.1\n */\nvoid\necma_op_bind_this_value (ecma_environment_record_t *environment_record_p, /**< environment record */\n                         ecma_value_t this_binding) /**< this binding value */\n{\n  JERRY_ASSERT (environment_record_p != NULL);\n  JERRY_ASSERT (ecma_is_value_object (this_binding));\n  JERRY_ASSERT (!ecma_op_this_binding_is_initialized (environment_record_p));\n\n  environment_record_p->this_binding = this_binding;\n} /* ecma_op_bind_this_value */\n\n/**\n * GetThisBinding operation.\n *\n * See also: ECMA-262 v6, 8.1.1.3.4\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ecma-object - otherwise\n */\necma_value_t\necma_op_get_this_binding (ecma_object_t *lex_env_p) /**< lexical environment */\n{\n  JERRY_ASSERT (lex_env_p != NULL);\n\n  ecma_environment_record_t *environment_record_p = ecma_op_get_environment_record (lex_env_p);\n  JERRY_ASSERT (environment_record_p != NULL);\n\n  ecma_value_t this_value = environment_record_p->this_binding;\n\n  if (this_value == ECMA_VALUE_UNINITIALIZED)\n  {\n    return ecma_raise_reference_error (ECMA_ERR_MSG (\"Must call super constructor in derived class before \"\n                                                     \"accessing 'this' or returning from it.\"));\n  }\n\n  ecma_ref_object (ecma_get_object_from_value (this_value));\n\n  return this_value;\n} /* ecma_op_get_this_binding */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-lex-env.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_LEX_ENV_H\n#define ECMA_LEX_ENV_H\n\n#include \"ecma-globals.h\"\n#include \"ecma-reference.h\"\n#include \"jrt.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup lexicalenvironment Lexical environment\n * @{\n *\n * \\addtogroup globallexicalenvironment Global lexical environment\n * @{\n */\n\nvoid ecma_init_global_environment (void);\nvoid ecma_finalize_global_environment (void);\necma_object_t *ecma_get_global_environment (ecma_object_t *global_object_p);\necma_object_t *ecma_get_global_scope (ecma_object_t *global_object_p);\n#if ENABLED (JERRY_ESNEXT)\nvoid ecma_create_global_lexical_block (ecma_object_t *global_object_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\nvoid ecma_module_add_lex_env (ecma_object_t *lex_env_p);\nvoid ecma_module_finalize_lex_envs (void);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n/**\n * @}\n */\n\n/* ECMA-262 v5, 8.7.1 and 8.7.2 */\necma_value_t ecma_op_get_value_lex_env_base (ecma_object_t *lex_env_p, ecma_object_t **ref_base_lex_env_p,\n                                             ecma_string_t *name_p);\necma_value_t ecma_op_get_value_object_base (ecma_value_t base_value, ecma_string_t *property_name_p);\necma_value_t ecma_op_put_value_lex_env_base (ecma_object_t *lex_env_p, ecma_string_t *var_name_string_p,\n                                             bool is_strict, ecma_value_t value);\n\n/* ECMA-262 v5, Table 17. Abstract methods of Environment Records */\necma_value_t ecma_op_has_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p);\necma_property_t *ecma_op_create_mutable_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p, bool is_deletable);\necma_value_t ecma_op_set_mutable_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p, ecma_value_t value,\n                                          bool is_strict);\necma_value_t ecma_op_get_binding_value (ecma_object_t *lex_env_p, ecma_string_t *name_p, bool is_strict);\necma_value_t ecma_op_delete_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p);\necma_value_t ecma_op_implicit_this_value (ecma_object_t *lex_env_p);\n\n/* ECMA-262 v5, Table 18. Additional methods of Declarative Environment Records */\nvoid ecma_op_create_immutable_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p, ecma_value_t value);\n\n#if ENABLED (JERRY_ESNEXT)\nvoid ecma_op_initialize_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p, ecma_value_t value);\n\nvoid ecma_op_create_environment_record (ecma_object_t *lex_env_p, ecma_value_t this_binding,\n                                        ecma_object_t *func_obj_p);\necma_environment_record_t *ecma_op_get_environment_record (ecma_object_t *lex_env_p);\n\nbool ecma_op_this_binding_is_initialized (ecma_environment_record_t *environment_record_p);\nvoid ecma_op_bind_this_value (ecma_environment_record_t *environment_record_p, ecma_value_t this_binding);\necma_value_t ecma_op_get_this_binding (ecma_object_t *lex_env_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_LEX_ENV_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-number-arithmetic.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-number-arithmetic.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup numberarithmetic ECMA number arithmetic operations\n * @{\n */\n\n/**\n * ECMA-defined number remainder calculation.\n *\n * See also:\n *          ECMA-262 v5, 11.5.3\n *\n * @return number - calculated remainder.\n */\necma_number_t\necma_op_number_remainder (ecma_number_t left_num, /**< left operand */\n                          ecma_number_t right_num) /**< right operand */\n{\n  if (ecma_number_is_nan (left_num)\n      || ecma_number_is_nan (right_num)\n      || ecma_number_is_infinity (left_num)\n      || ecma_number_is_zero (right_num))\n  {\n    return ecma_number_make_nan ();\n  }\n  else if (ecma_number_is_infinity (right_num)\n           || (ecma_number_is_zero (left_num)\n               && !ecma_number_is_zero (right_num)))\n  {\n    return left_num;\n  }\n\n  return ecma_number_calc_remainder (left_num, right_num);\n} /* ecma_op_number_remainder */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-number-arithmetic.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_NUMBER_ARITHMETIC_H\n#define ECMA_NUMBER_ARITHMETIC_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup numberarithmetic ECMA number arithmetic operations\n * @{\n */\n\necma_number_t ecma_op_number_remainder (ecma_number_t left_num, ecma_number_t right_num);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_NUMBER_ARITHMETIC_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-number-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-number-object.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-function-object.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmanumberobject ECMA Number object related routines\n * @{\n */\n\n/**\n * Number object creation operation.\n *\n * See also: ECMA-262 v5, 15.7.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Number constructor */\n{\n  ecma_number_t num;\n  ecma_value_t conv_to_num_completion = ecma_op_to_number (arg, &num);\n\n  if (ECMA_IS_VALUE_ERROR (conv_to_num_completion))\n  {\n    return conv_to_num_completion;\n  }\n\n  conv_to_num_completion = ecma_make_number_value (num);\n  ecma_builtin_id_t proto_id;\n#if ENABLED (JERRY_BUILTIN_NUMBER)\n  proto_id = ECMA_BUILTIN_ID_NUMBER_PROTOTYPE;\n#else /* ENABLED (JERRY_BUILTIN_NUMBER) */\n  proto_id = ECMA_BUILTIN_ID_OBJECT_PROTOTYPE;\n#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (proto_id);\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *new_target = JERRY_CONTEXT (current_new_target_p);\n  if (new_target)\n  {\n    prototype_obj_p = ecma_op_get_prototype_from_constructor (new_target, proto_id);\n    if (JERRY_UNLIKELY (prototype_obj_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                sizeof (ecma_extended_object_t),\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_NUMBER_UL;\n\n  /* Pass reference (no need to free conv_to_num_completion). */\n  ext_object_p->u.class_prop.u.value = conv_to_num_completion;\n#if ENABLED (JERRY_ESNEXT)\n  if (new_target)\n  {\n    ecma_deref_object (prototype_obj_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  return ecma_make_object_value (object_p);\n} /* ecma_op_create_number_object */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-number-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_NUMBER_OBJECT_H\n#define ECMA_NUMBER_OBJECT_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmanumberobject ECMA Number object related routines\n * @{\n */\n\necma_value_t ecma_op_create_number_object (ecma_value_t arg);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_NUMBER_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-proxy-object.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaobjectsinternalops ECMA objects' operations\n * @{\n */\n\n/**\n * Reject sequence\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_reject (bool is_throw) /**< Throw flag */\n{\n  if (is_throw)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument type.\"));\n  }\n  else\n  {\n    return ECMA_VALUE_FALSE;\n  }\n} /* ecma_reject */\n\n/**\n * 'Object' object creation operation with no arguments.\n *\n * See also: ECMA-262 v5, 15.2.2.1\n *\n * @return pointer to newly created 'Object' object\n */\necma_object_t *\necma_op_create_object_object_noarg (void)\n{\n  ecma_object_t *object_prototype_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n\n  /* 3., 4., 6., 7. */\n  return ecma_op_create_object_object_noarg_and_set_prototype (object_prototype_p);\n} /* ecma_op_create_object_object_noarg */\n\n/**\n * Object creation operation with no arguments.\n * It sets the given prototype to the newly created object.\n *\n * See also: ECMA-262 v5, 15.2.2.1, 15.2.3.5\n *\n * @return pointer to newly created object\n */\necma_object_t *\necma_op_create_object_object_noarg_and_set_prototype (ecma_object_t *object_prototype_p) /**< pointer to prototype of\n                                                                                              the object\n                                                                                              (can be NULL) */\n{\n  ecma_object_t *obj_p = ecma_create_object (object_prototype_p, 0, ECMA_OBJECT_TYPE_GENERAL);\n\n  /*\n   * [[Class]] property of ECMA_OBJECT_TYPE_GENERAL type objects\n   * without ECMA_INTERNAL_PROPERTY_CLASS internal property\n   * is \"Object\".\n   *\n   * See also: ecma_object_get_class_name\n   */\n\n  return obj_p;\n} /* ecma_op_create_object_object_noarg_and_set_prototype */\n\n/**\n * [[Delete]] ecma general object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *          ECMA-262 v5, 8.12.7\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_general_object_delete (ecma_object_t *obj_p, /**< the object */\n                               ecma_string_t *property_name_p, /**< property name */\n                               bool is_throw) /**< flag that controls failure handling */\n{\n  JERRY_ASSERT (obj_p != NULL\n                && !ecma_is_lexical_environment (obj_p));\n  JERRY_ASSERT (property_name_p != NULL);\n\n  /* 1. */\n  ecma_property_ref_t property_ref;\n\n  ecma_property_t property = ecma_op_object_get_own_property (obj_p,\n                                                              property_name_p,\n                                                              &property_ref,\n                                                              ECMA_PROPERTY_GET_NO_OPTIONS);\n\n  /* 2. */\n  if (property == ECMA_PROPERTY_TYPE_NOT_FOUND || property == ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP)\n  {\n    return ECMA_VALUE_TRUE;\n  }\n\n  /* 3. */\n  if (ecma_is_property_configurable (property))\n  {\n    if (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_ARRAY)\n    {\n      ecma_array_object_delete_property (obj_p, property_name_p, property_ref.value_p);\n    }\n    else\n    {\n      /* a. */\n      ecma_delete_property (obj_p, property_ref.value_p);\n    }\n\n    /* b. */\n    return ECMA_VALUE_TRUE;\n  }\n\n  /* 4. */\n  if (is_throw)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Expected a configurable property.\"));\n  }\n\n  /* 5. */\n  return ECMA_VALUE_FALSE;\n} /* ecma_op_general_object_delete */\n\n/**\n * Property invocation order during [[DefaultValue]] operation with string hint\n */\nstatic const lit_magic_string_id_t to_primitive_string_hint_method_names[2] =\n{\n  LIT_MAGIC_STRING_TO_STRING_UL, /**< toString operation */\n  LIT_MAGIC_STRING_VALUE_OF_UL, /**< valueOf operation */\n};\n\n/**\n * Property invocation order during [[DefaultValue]] operation with non string hint\n */\nstatic const lit_magic_string_id_t to_primitive_non_string_hint_method_names[2] =\n{\n  LIT_MAGIC_STRING_VALUE_OF_UL, /**< valueOf operation */\n  LIT_MAGIC_STRING_TO_STRING_UL, /**< toString operation */\n};\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Hints for the ecma general object's toPrimitve operation\n */\nstatic const lit_magic_string_id_t hints[3] =\n{\n  LIT_MAGIC_STRING_DEFAULT, /**< \"default\" hint */\n  LIT_MAGIC_STRING_NUMBER, /**< \"number\" hint */\n  LIT_MAGIC_STRING_STRING, /**< \"string\" hint */\n};\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * [[DefaultValue]] ecma general object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *          ECMA-262 v5, 8.12.8\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_general_object_default_value (ecma_object_t *obj_p, /**< the object */\n                                      ecma_preferred_type_hint_t hint) /**< hint on preferred result type */\n{\n  JERRY_ASSERT (obj_p != NULL\n                && !ecma_is_lexical_environment (obj_p));\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t obj_value = ecma_make_object_value (obj_p);\n\n  ecma_value_t exotic_to_prim = ecma_op_get_method_by_symbol_id (obj_value,\n                                                                 LIT_GLOBAL_SYMBOL_TO_PRIMITIVE);\n\n  if (ECMA_IS_VALUE_ERROR (exotic_to_prim))\n  {\n    return exotic_to_prim;\n  }\n\n  if (!ecma_is_value_undefined (exotic_to_prim))\n  {\n    ecma_object_t *call_func_p = ecma_get_object_from_value (exotic_to_prim);\n    ecma_value_t argument = ecma_make_magic_string_value (hints[hint]);\n\n    ecma_value_t result = ecma_op_function_call (call_func_p,\n                                                 obj_value,\n                                                 &argument,\n                                                 1);\n\n    ecma_free_value (exotic_to_prim);\n\n    if (ECMA_IS_VALUE_ERROR (result)\n        || !ecma_is_value_object (result))\n    {\n      return result;\n    }\n\n    ecma_free_value (result);\n\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument type in [[DefaultValue]].\"));\n  }\n\n  ecma_free_value (exotic_to_prim);\n\n  if (hint == ECMA_PREFERRED_TYPE_NO)\n  {\n    hint = ECMA_PREFERRED_TYPE_NUMBER;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  if (hint == ECMA_PREFERRED_TYPE_NO)\n  {\n    if (ecma_object_class_is (obj_p, LIT_MAGIC_STRING_DATE_UL))\n    {\n      hint = ECMA_PREFERRED_TYPE_STRING;\n    }\n    else\n    {\n      hint = ECMA_PREFERRED_TYPE_NUMBER;\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ecma_op_general_object_ordinary_value (obj_p, hint);\n} /* ecma_op_general_object_default_value */\n\n/**\n * Ecma general object's OrdinaryToPrimitive operation\n *\n * See also:\n *          ECMA-262 v6 7.1.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_general_object_ordinary_value (ecma_object_t *obj_p, /**< the object */\n                                       ecma_preferred_type_hint_t hint) /**< hint on preferred result type */\n{\n  const lit_magic_string_id_t *function_name_ids_p = (hint == ECMA_PREFERRED_TYPE_STRING\n                                                      ? to_primitive_string_hint_method_names\n                                                      : to_primitive_non_string_hint_method_names);\n\n  for (uint32_t i = 0; i < 2; i++)\n  {\n    ecma_value_t function_value = ecma_op_object_get_by_magic_id (obj_p, function_name_ids_p[i]);\n\n    if (ECMA_IS_VALUE_ERROR (function_value))\n    {\n      return function_value;\n    }\n\n    ecma_value_t call_completion = ECMA_VALUE_EMPTY;\n\n    if (ecma_op_is_callable (function_value))\n    {\n      ecma_object_t *func_obj_p = ecma_get_object_from_value (function_value);\n\n      call_completion = ecma_op_function_call (func_obj_p,\n                                               ecma_make_object_value (obj_p),\n                                               NULL,\n                                               0);\n    }\n\n    ecma_free_value (function_value);\n\n    if (ECMA_IS_VALUE_ERROR (call_completion)\n        || (!ecma_is_value_empty (call_completion)\n           && !ecma_is_value_object (call_completion)))\n    {\n      return call_completion;\n    }\n\n    ecma_free_value (call_completion);\n  }\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument type in [[DefaultValue]].\"));\n} /* ecma_op_general_object_ordinary_value */\n\n/**\n * Special types for ecma_op_general_object_define_own_property.\n */\ntypedef enum\n{\n  ECMA_OP_OBJECT_DEFINE_GENERIC = 1, /**< generic property */\n  ECMA_OP_OBJECT_DEFINE_ACCESSOR = 0, /**< accessor property */\n  ECMA_OP_OBJECT_DEFINE_DATA = ECMA_PROPERTY_FLAG_DATA /**< data property */\n} ecma_op_object_define_own_property_type_t;\n\n/**\n * [[DefineOwnProperty]] ecma general object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *          ECMA-262 v5, 8.12.9\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the object */\n                                            ecma_string_t *property_name_p, /**< property name */\n                                            const ecma_property_descriptor_t *property_desc_p) /**< property\n                                                                                                *   descriptor */\n{\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (object_p))\n  {\n    return ecma_proxy_object_define_own_property (object_p, property_name_p, property_desc_p);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  JERRY_ASSERT (object_p != NULL\n                && !ecma_is_lexical_environment (object_p));\n  JERRY_ASSERT (!ecma_op_object_is_fast_array (object_p));\n  JERRY_ASSERT (property_name_p != NULL);\n\n  uint8_t property_desc_type = ECMA_OP_OBJECT_DEFINE_GENERIC;\n\n  if (property_desc_p->flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED))\n  {\n    /* A property descriptor cannot be both named data and named accessor. */\n    JERRY_ASSERT ((property_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))\n                   != (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED));\n    property_desc_type = ECMA_OP_OBJECT_DEFINE_DATA;\n  }\n  else if (property_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))\n  {\n    JERRY_ASSERT (!(property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED));\n    property_desc_type = ECMA_OP_OBJECT_DEFINE_ACCESSOR;\n  }\n\n  /* These three asserts ensures that a new property is created with the appropriate default flags.\n   * E.g. if ECMA_PROP_IS_CONFIGURABLE_DEFINED is false, the newly created property must be non-configurable. */\n  JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE_DEFINED)\n                || !(property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE));\n  JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)\n                || !(property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE));\n  JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)\n                || !(property_desc_p->flags & ECMA_PROP_IS_WRITABLE));\n\n  /* 1. */\n  ecma_extended_property_ref_t ext_property_ref = { .property_ref.value_p = NULL, .property_p = NULL };\n  ecma_property_t current_prop;\n\n  current_prop = ecma_op_object_get_own_property (object_p,\n                                                  property_name_p,\n                                                  &ext_property_ref.property_ref,\n                                                  ECMA_PROPERTY_GET_VALUE | ECMA_PROPERTY_GET_EXT_REFERENCE);\n\n  if (current_prop == ECMA_PROPERTY_TYPE_NOT_FOUND || current_prop == ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP)\n  {\n    /* 3. */\n    if (!ecma_op_ordinary_object_is_extensible (object_p))\n    {\n      /* 2. */\n      return ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n    }\n\n    /* 4. */\n    uint8_t prop_attributes = (uint8_t) (property_desc_p->flags & ECMA_PROPERTY_FLAGS_MASK);\n\n    if (property_desc_type != ECMA_OP_OBJECT_DEFINE_ACCESSOR)\n    {\n      /* a. */\n      JERRY_ASSERT (property_desc_type == ECMA_OP_OBJECT_DEFINE_GENERIC\n                    || property_desc_type == ECMA_OP_OBJECT_DEFINE_DATA);\n\n      ecma_property_value_t *new_prop_value_p = ecma_create_named_data_property (object_p,\n                                                                                 property_name_p,\n                                                                                 prop_attributes,\n                                                                                 NULL);\n\n      JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n                    || ecma_is_value_undefined (property_desc_p->value));\n\n      new_prop_value_p->value = ecma_copy_value_if_not_object (property_desc_p->value);\n    }\n    else\n    {\n      /* b. */\n      ecma_create_named_accessor_property (object_p,\n                                           property_name_p,\n                                           property_desc_p->get_p,\n                                           property_desc_p->set_p,\n                                           prop_attributes,\n                                           NULL);\n    }\n\n    return ECMA_VALUE_TRUE;\n  }\n\n  /* 6. */\n  const bool is_current_configurable = ecma_is_property_configurable (current_prop);\n\n  /* 7. a., b. */\n  bool is_enumerable = (property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE) != 0;\n  if (!is_current_configurable\n      && ((property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE)\n          || ((property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)\n              && (is_enumerable != ecma_is_property_enumerable (current_prop)))))\n  {\n    if (ECMA_PROPERTY_IS_VIRTUAL (current_prop))\n    {\n      ecma_free_value (ext_property_ref.property_ref.virtual_value);\n    }\n    return ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n  }\n\n  if (ECMA_PROPERTY_IS_VIRTUAL (current_prop))\n  {\n    JERRY_ASSERT (!is_current_configurable && !ecma_is_property_writable (current_prop));\n\n    ecma_value_t result = ECMA_VALUE_TRUE;\n\n    if (property_desc_type == ECMA_OP_OBJECT_DEFINE_ACCESSOR\n        || (property_desc_p->flags & ECMA_PROP_IS_WRITABLE)\n        || ((property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n            && !ecma_op_same_value (property_desc_p->value,\n                                    ext_property_ref.property_ref.virtual_value)))\n    {\n      result = ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n    }\n\n    ecma_free_value (ext_property_ref.property_ref.virtual_value);\n    return result;\n  }\n\n  /* 8. */\n  if (property_desc_type == ECMA_OP_OBJECT_DEFINE_GENERIC)\n  {\n    /* No action required. */\n  }\n  else if (JERRY_LIKELY (property_desc_type == (current_prop & ECMA_PROPERTY_FLAG_DATA)))\n  {\n    /* If property is configurable, there is no need for checks. */\n    if (JERRY_UNLIKELY (!is_current_configurable))\n    {\n      if (property_desc_type == ECMA_OP_OBJECT_DEFINE_DATA)\n      {\n        /* 10. a. i. & ii. */\n        if (!ecma_is_property_writable (current_prop)\n            && ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE)\n                || ((property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n                    && !ecma_op_same_value (property_desc_p->value,\n                                            ext_property_ref.property_ref.value_p->value))))\n        {\n          return ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n        }\n      }\n      else\n      {\n        /* 11. */\n\n        /* a. */\n        ecma_property_value_t *value_p = ext_property_ref.property_ref.value_p;\n\n        ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (value_p);\n        jmem_cpointer_t prop_desc_getter_cp, prop_desc_setter_cp;\n        ECMA_SET_POINTER (prop_desc_getter_cp, property_desc_p->get_p);\n        ECMA_SET_POINTER (prop_desc_setter_cp, property_desc_p->set_p);\n\n        if (((property_desc_p->flags & ECMA_PROP_IS_GET_DEFINED)\n             && prop_desc_getter_cp != get_set_pair_p->getter_cp)\n            || ((property_desc_p->flags & ECMA_PROP_IS_SET_DEFINED)\n                && prop_desc_setter_cp != get_set_pair_p->setter_cp))\n        {\n          /* i., ii. */\n          return ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n        }\n      }\n    }\n  }\n  else\n  {\n    /* 9. */\n    if (!is_current_configurable)\n    {\n      /* a. */\n      return ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n    }\n\n    ecma_property_value_t *value_p = ext_property_ref.property_ref.value_p;\n\n    if (property_desc_type == ECMA_OP_OBJECT_DEFINE_ACCESSOR)\n    {\n      JERRY_ASSERT (current_prop & ECMA_PROPERTY_FLAG_DATA);\n      ecma_free_value_if_not_object (value_p->value);\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n      ecma_getter_setter_pointers_t *getter_setter_pair_p;\n      getter_setter_pair_p = jmem_pools_alloc (sizeof (ecma_getter_setter_pointers_t));\n      getter_setter_pair_p->getter_cp = JMEM_CP_NULL;\n      getter_setter_pair_p->setter_cp = JMEM_CP_NULL;\n      ECMA_SET_NON_NULL_POINTER (value_p->getter_setter_pair_cp, getter_setter_pair_p);\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n      value_p->getter_setter_pair.getter_cp = JMEM_CP_NULL;\n      value_p->getter_setter_pair.setter_cp = JMEM_CP_NULL;\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n    }\n    else\n    {\n      JERRY_ASSERT (!(current_prop & ECMA_PROPERTY_FLAG_DATA));\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n      ecma_getter_setter_pointers_t *getter_setter_pair_p;\n      getter_setter_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t,\n                                                        value_p->getter_setter_pair_cp);\n      jmem_pools_free (getter_setter_pair_p, sizeof (ecma_getter_setter_pointers_t));\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n      value_p->value = ECMA_VALUE_UNDEFINED;\n    }\n\n    /* Update flags */\n    ecma_property_t prop_flags = *(ext_property_ref.property_p);\n    prop_flags = (ecma_property_t) (prop_flags & ~ECMA_PROPERTY_FLAG_WRITABLE);\n    prop_flags ^= ECMA_PROPERTY_FLAG_DATA;\n    *(ext_property_ref.property_p) = prop_flags;\n  }\n\n  /* 12. */\n  if (property_desc_type == ECMA_OP_OBJECT_DEFINE_DATA)\n  {\n    JERRY_ASSERT (ECMA_PROPERTY_IS_RAW_DATA (*ext_property_ref.property_p));\n\n    if (property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n    {\n      ecma_named_data_property_assign_value (object_p,\n                                             ext_property_ref.property_ref.value_p,\n                                             property_desc_p->value);\n    }\n\n    if (property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)\n    {\n      ecma_set_property_writable_attr (ext_property_ref.property_p, (property_desc_p->flags & ECMA_PROP_IS_WRITABLE));\n    }\n  }\n  else if (property_desc_type == ECMA_OP_OBJECT_DEFINE_ACCESSOR)\n  {\n    JERRY_ASSERT (!(*ext_property_ref.property_p & ECMA_PROPERTY_FLAG_DATA));\n\n    if (property_desc_p->flags & ECMA_PROP_IS_GET_DEFINED)\n    {\n      ecma_set_named_accessor_property_getter (object_p,\n                                               ext_property_ref.property_ref.value_p,\n                                               property_desc_p->get_p);\n    }\n\n    if (property_desc_p->flags & ECMA_PROP_IS_SET_DEFINED)\n    {\n      ecma_set_named_accessor_property_setter (object_p,\n                                               ext_property_ref.property_ref.value_p,\n                                               property_desc_p->set_p);\n    }\n  }\n\n  if (property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)\n  {\n    ecma_set_property_enumerable_attr (ext_property_ref.property_p,\n                                       (property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE));\n  }\n\n  if (property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE_DEFINED)\n  {\n    ecma_set_property_configurable_attr (ext_property_ref.property_p,\n                                         (property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE));\n  }\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_op_general_object_define_own_property */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * The IsCompatiblePropertyDescriptor method for Proxy object internal methods\n *\n * See also:\n *          ECMAScript v6, 9.1.6.2\n *\n * @return bool\n */\nbool\necma_op_is_compatible_property_descriptor (const ecma_property_descriptor_t *desc_p, /**< target descriptor */\n                                           const ecma_property_descriptor_t *current_p, /**< current descriptor */\n                                           bool is_extensible) /**< true - if target object is extensible\n                                                                    false - otherwise */\n{\n  JERRY_ASSERT (desc_p != NULL);\n\n  /* 2. */\n  if (current_p == NULL)\n  {\n    return is_extensible;\n  }\n\n  /* 3. */\n  if (desc_p->flags == 0)\n  {\n    return true;\n  }\n\n  /* 4. */\n  if ((current_p->flags & desc_p->flags) == desc_p->flags)\n  {\n    if ((current_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n         && ecma_op_same_value (current_p->value, desc_p->value))\n    {\n      return true;\n    }\n\n    if ((current_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)\n         && current_p->get_p == desc_p->get_p\n         && current_p->set_p == desc_p->set_p))\n    {\n      return true;\n    }\n  }\n\n  /* 5. */\n  if (!(current_p->flags & ECMA_PROP_IS_CONFIGURABLE))\n  {\n    if (desc_p->flags & ECMA_PROP_IS_CONFIGURABLE)\n    {\n      return false;\n    }\n    if ((desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)\n        && ((current_p->flags & ECMA_PROP_IS_ENUMERABLE) != (desc_p->flags & ECMA_PROP_IS_ENUMERABLE)))\n    {\n      return false;\n    }\n  }\n\n  const uint32_t accessor_desc_flags = (ECMA_PROP_IS_SET_DEFINED | ECMA_PROP_IS_GET_DEFINED);\n  const uint32_t data_desc_flags = (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED);\n\n  bool desc_is_accessor = (desc_p->flags & accessor_desc_flags) != 0;\n  bool desc_is_data = (desc_p->flags & data_desc_flags) != 0;\n  bool current_is_data = (current_p->flags & data_desc_flags) != 0;\n\n  /* 6. */\n  if (!desc_is_accessor && !desc_is_data)\n  {\n    return true;\n  }\n\n  /* 7. */\n  if (current_is_data != desc_is_data)\n  {\n    return (current_p->flags & ECMA_PROP_IS_CONFIGURABLE) != 0;\n  }\n\n  /* 8. */\n  if (current_is_data)\n  {\n    if (!(current_p->flags & ECMA_PROP_IS_CONFIGURABLE))\n    {\n      if (!(current_p->flags & ECMA_PROP_IS_WRITABLE)\n           && (desc_p->flags & ECMA_PROP_IS_WRITABLE))\n      {\n        return false;\n      }\n\n      if (!(current_p->flags & ECMA_PROP_IS_WRITABLE)\n           && (desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n           && !ecma_op_same_value (desc_p->value, current_p->value))\n      {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  JERRY_ASSERT ((current_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)) != 0);\n  JERRY_ASSERT ((desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)) != 0);\n\n  /* 9. */\n  if (!(current_p->flags & ECMA_PROP_IS_CONFIGURABLE))\n  {\n    if ((desc_p->flags & ECMA_PROP_IS_SET_DEFINED)\n         && desc_p->set_p != current_p->set_p)\n    {\n      return false;\n    }\n\n    if ((desc_p->flags & ECMA_PROP_IS_GET_DEFINED)\n         && desc_p->get_p != current_p->get_p)\n    {\n      return false;\n    }\n  }\n\n  return true;\n} /* ecma_op_is_compatible_property_descriptor */\n\n/**\n * CompletePropertyDescriptor method for proxy internal method\n *\n * See also:\n *          ECMA-262 v6, 6.2.4.5\n */\nvoid\necma_op_to_complete_property_descriptor (ecma_property_descriptor_t *desc_p) /**< target descriptor */\n{\n  /* 4. */\n  if (!(desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)))\n  {\n    /* a. */\n    desc_p->flags |= ECMA_PROP_IS_VALUE_DEFINED;\n  }\n  /* 5. */\n  else\n  {\n    desc_p->flags |= (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED);\n  }\n} /* ecma_op_to_complete_property_descriptor */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-objects-general.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_OBJECTS_GENERAL_H\n#define ECMA_OBJECTS_GENERAL_H\n\n#include \"ecma-conversion.h\"\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaobjectsinternalops ECMA objects' operations\n * @{\n */\n\necma_value_t ecma_reject (bool is_throw);\necma_object_t *ecma_op_create_object_object_noarg (void);\necma_object_t *ecma_op_create_object_object_noarg_and_set_prototype (ecma_object_t *object_prototype_p);\n\necma_value_t ecma_op_general_object_delete (ecma_object_t *obj_p, ecma_string_t *property_name_p, bool is_throw);\necma_value_t ecma_op_general_object_default_value (ecma_object_t *obj_p, ecma_preferred_type_hint_t hint);\necma_value_t ecma_op_general_object_ordinary_value (ecma_object_t *obj_p, ecma_preferred_type_hint_t hint);\necma_value_t ecma_op_general_object_define_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p,\n                                                         const ecma_property_descriptor_t *property_desc_p);\n\n#if ENABLED (JERRY_ESNEXT)\nvoid ecma_op_to_complete_property_descriptor (ecma_property_descriptor_t *desc_p);\n\nbool ecma_op_is_compatible_property_descriptor (const ecma_property_descriptor_t *desc_p,\n                                                const ecma_property_descriptor_t *current_p,\n                                                bool is_extensible);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_OBJECTS_GENERAL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-objects.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-lcache.h\"\n#include \"ecma-string-object.h\"\n#include \"ecma-arguments-object.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-proxy-object.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n#include \"ecma-typedarray-object.h\"\n#include \"ecma-arraybuffer-object.h\"\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaobjectsinternalops ECMA objects' operations\n * @{\n */\n\n/**\n * Hash bitmap size for ecma objects\n */\n#define ECMA_OBJECT_HASH_BITMAP_SIZE 256\n\n/**\n * Assert that specified object type value is valid\n *\n * @param type object's implementation-defined type\n */\n#ifndef JERRY_NDEBUG\n#define JERRY_ASSERT_OBJECT_TYPE_IS_VALID(type) \\\n  JERRY_ASSERT (type < ECMA_OBJECT_TYPE__MAX);\n#else /* JERRY_NDEBUG */\n#define JERRY_ASSERT_OBJECT_TYPE_IS_VALID(type)\n#endif /* !JERRY_NDEBUG */\n\n/**\n * [[GetOwnProperty]] ecma object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *\n * @return pointer to a property - if it exists,\n *         NULL (i.e. ecma-undefined) - otherwise.\n */\necma_property_t\necma_op_object_get_own_property (ecma_object_t *object_p, /**< the object */\n                                 ecma_string_t *property_name_p, /**< property name */\n                                 ecma_property_ref_t *property_ref_p, /**< property reference */\n                                 uint32_t options) /**< option bits */\n{\n  JERRY_ASSERT (object_p != NULL\n                && !ecma_is_lexical_environment (object_p));\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  JERRY_ASSERT (!ECMA_OBJECT_IS_PROXY (object_p));\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n  JERRY_ASSERT (property_name_p != NULL);\n  JERRY_ASSERT (options == ECMA_PROPERTY_GET_NO_OPTIONS\n                || property_ref_p != NULL);\n\n  ecma_object_type_t type = ecma_get_object_type (object_p);\n\n  switch (type)\n  {\n    case ECMA_OBJECT_TYPE_CLASS:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      if (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_STRING_UL)\n      {\n        if (ecma_string_is_length (property_name_p))\n        {\n          if (options & ECMA_PROPERTY_GET_VALUE)\n          {\n            ecma_value_t prim_value_p = ext_object_p->u.class_prop.u.value;\n            ecma_string_t *prim_value_str_p = ecma_get_string_from_value (prim_value_p);\n\n            lit_utf8_size_t length = ecma_string_get_length (prim_value_str_p);\n            property_ref_p->virtual_value = ecma_make_uint32_value (length);\n          }\n\n          return ECMA_PROPERTY_VIRTUAL;\n        }\n\n        uint32_t index = ecma_string_get_array_index (property_name_p);\n\n        if (index != ECMA_STRING_NOT_ARRAY_INDEX)\n        {\n          ecma_value_t prim_value_p = ext_object_p->u.class_prop.u.value;\n          ecma_string_t *prim_value_str_p = ecma_get_string_from_value (prim_value_p);\n\n          if (index < ecma_string_get_length (prim_value_str_p))\n          {\n            if (options & ECMA_PROPERTY_GET_VALUE)\n            {\n              ecma_char_t char_at_idx = ecma_string_get_char_at_pos (prim_value_str_p, index);\n              ecma_string_t *char_str_p = ecma_new_ecma_string_from_code_unit (char_at_idx);\n              property_ref_p->virtual_value = ecma_make_string_value (char_str_p);\n            }\n\n            return ECMA_PROPERTY_FLAG_ENUMERABLE | ECMA_PROPERTY_VIRTUAL;\n          }\n        }\n      }\n      break;\n    }\n    case ECMA_OBJECT_TYPE_ARRAY:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      if (ecma_string_is_length (property_name_p))\n      {\n        if (options & ECMA_PROPERTY_GET_VALUE)\n        {\n          property_ref_p->virtual_value = ecma_make_uint32_value (ext_object_p->u.array.length);\n        }\n\n        uint32_t length_prop = ext_object_p->u.array.length_prop_and_hole_count;\n        return length_prop & (ECMA_PROPERTY_FLAG_WRITABLE | ECMA_PROPERTY_VIRTUAL);\n      }\n\n      if (ecma_op_array_is_fast_array (ext_object_p))\n      {\n        uint32_t index = ecma_string_get_array_index (property_name_p);\n\n        if (index != ECMA_STRING_NOT_ARRAY_INDEX)\n        {\n          if (JERRY_LIKELY (index < ext_object_p->u.array.length))\n          {\n            ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n            if (ecma_is_value_array_hole (values_p[index]))\n            {\n              return ECMA_PROPERTY_TYPE_NOT_FOUND;\n            }\n\n            if (options & ECMA_PROPERTY_GET_VALUE)\n            {\n              property_ref_p->virtual_value = ecma_fast_copy_value (values_p[index]);\n            }\n\n            return ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROPERTY_VIRTUAL;\n          }\n        }\n\n        return ECMA_PROPERTY_TYPE_NOT_FOUND;\n      }\n\n      break;\n    }\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n    case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n    {\n      /* ES2015 9.4.5.1 */\n      if (ecma_object_is_typedarray (object_p))\n      {\n        if (ecma_prop_name_is_symbol (property_name_p))\n        {\n          break;\n        }\n\n        uint32_t array_index = ecma_string_get_array_index (property_name_p);\n\n        if (array_index != ECMA_STRING_NOT_ARRAY_INDEX)\n        {\n          ecma_typedarray_info_t info = ecma_typedarray_get_info (object_p);\n          ecma_value_t value = ECMA_VALUE_UNDEFINED;\n\n          if (array_index < info.length)\n          {\n            uint32_t byte_pos = array_index << info.shift;\n            value = ecma_get_typedarray_element (info.buffer_p + byte_pos, info.id);\n          }\n\n          if (!ecma_is_value_undefined (value))\n          {\n            if (options & ECMA_PROPERTY_GET_VALUE)\n            {\n              property_ref_p->virtual_value = value;\n            }\n            else\n            {\n              ecma_fast_free_value (value);\n            }\n\n            return ECMA_PROPERTY_ENUMERABLE_WRITABLE | ECMA_PROPERTY_VIRTUAL;\n          }\n\n          return ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP;\n        }\n\n        ecma_number_t num = ecma_string_to_number (property_name_p);\n        ecma_string_t *num_to_str = ecma_new_ecma_string_from_number (num);\n\n        if (ecma_compare_ecma_strings (property_name_p, num_to_str))\n        {\n          ecma_deref_ecma_string (num_to_str);\n\n          return ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP;\n        }\n\n        ecma_deref_ecma_string (num_to_str);\n      }\n\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n    default:\n    {\n      break;\n    }\n  }\n\n  ecma_property_t *property_p = ecma_find_named_property (object_p, property_name_p);\n\n  if (property_p == NULL)\n  {\n    if (ecma_get_object_is_builtin (object_p))\n    {\n      if (type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION && ecma_builtin_function_is_routine (object_p))\n      {\n        property_p = ecma_builtin_routine_try_to_instantiate_property (object_p, property_name_p);\n      }\n      else\n      {\n        property_p = ecma_builtin_try_to_instantiate_property (object_p, property_name_p);\n      }\n    }\n    else\n    {\n      switch (type)\n      {\n        case ECMA_OBJECT_TYPE_FUNCTION:\n        {\n#if !ENABLED (JERRY_ESNEXT)\n          if (ecma_string_is_length (property_name_p))\n          {\n            if (options & ECMA_PROPERTY_GET_VALUE)\n            {\n              /* Get length virtual property. */\n              ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n              const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);\n\n              uint32_t len;\n              if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n              {\n                cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_data_p;\n                len = args_p->argument_end;\n              }\n              else\n              {\n                cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_data_p;\n                len = args_p->argument_end;\n              }\n\n              property_ref_p->virtual_value = ecma_make_uint32_value (len);\n            }\n\n            return ECMA_PROPERTY_VIRTUAL;\n          }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n          /* Get prototype physical property. */\n          property_p = ecma_op_function_try_to_lazy_instantiate_property (object_p, property_name_p);\n          break;\n        }\n        case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n        {\n          property_p = ecma_op_external_function_try_to_lazy_instantiate_property (object_p, property_name_p);\n          break;\n        }\n        case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n        {\n          property_p = ecma_op_bound_function_try_to_lazy_instantiate_property (object_p, property_name_p);\n          break;\n        }\n        case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n        {\n          if (((ecma_extended_object_t *) object_p)->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS)\n          {\n            property_p = ecma_op_arguments_object_try_to_lazy_instantiate_property (object_p, property_name_p);\n          }\n          break;\n        }\n        default:\n        {\n          break;\n        }\n      }\n    }\n\n    if (property_p == NULL)\n    {\n      return ECMA_PROPERTY_TYPE_NOT_FOUND;\n    }\n  }\n  else if (type == ECMA_OBJECT_TYPE_PSEUDO_ARRAY\n           && ((ecma_extended_object_t *) object_p)->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS\n           && (((ecma_extended_object_t *) object_p)->u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED))\n  {\n    ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n    uint32_t index = ecma_string_get_array_index (property_name_p);\n\n    if (index < ext_object_p->u.pseudo_array.u1.formal_params_number)\n    {\n      ecma_mapped_arguments_t *mapped_arguments_p = (ecma_mapped_arguments_t *) ext_object_p;\n\n      ecma_value_t *argv_p = (ecma_value_t *) (mapped_arguments_p + 1);\n\n      if (!ecma_is_value_empty (argv_p[index]))\n      {\n#if ENABLED (JERRY_LCACHE)\n        /* Mapped arguments initialized properties MUST not be lcached */\n        if (ecma_is_property_lcached (property_p))\n        {\n          jmem_cpointer_t prop_name_cp;\n\n          if (JERRY_UNLIKELY (ECMA_IS_DIRECT_STRING (property_name_p)))\n          {\n            prop_name_cp = (jmem_cpointer_t) ECMA_GET_DIRECT_STRING_VALUE (property_name_p);\n          }\n          else\n          {\n            ECMA_SET_NON_NULL_POINTER (prop_name_cp, property_name_p);\n          }\n          ecma_lcache_invalidate (object_p, prop_name_cp, property_p);\n        }\n#endif /* ENABLED (JERRY_LCACHE) */\n        ecma_string_t *name_p = ecma_op_arguments_object_get_formal_parameter (mapped_arguments_p, index);\n        ecma_object_t *lex_env_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, mapped_arguments_p->lex_env);\n\n        ecma_value_t binding_value = ecma_op_get_binding_value (lex_env_p, name_p, true);\n\n        ecma_named_data_property_assign_value (object_p,\n                                               ECMA_PROPERTY_VALUE_PTR (property_p),\n                                               binding_value);\n        ecma_free_value (binding_value);\n      }\n    }\n  }\n\n  if (options & ECMA_PROPERTY_GET_EXT_REFERENCE)\n  {\n    ((ecma_extended_property_ref_t *) property_ref_p)->property_p = property_p;\n  }\n\n  if (property_ref_p != NULL)\n  {\n    property_ref_p->value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n  }\n\n  return *property_p;\n} /* ecma_op_object_get_own_property */\n\n/**\n * Generic [[HasProperty]] operation\n *\n * See also:\n *          ECMAScript v6, 9.1.7.1\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE_FALSE} - whether the property is found\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_op_object_has_property (ecma_object_t *object_p, /**< the object */\n                             ecma_string_t *property_name_p) /**< property name */\n{\n  while (true)\n  {\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_OBJECT_IS_PROXY (object_p))\n    {\n      return ecma_proxy_object_has (object_p, property_name_p);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    /* 2 - 3. */\n    if (ecma_op_ordinary_object_has_own_property (object_p, property_name_p))\n    {\n      return ECMA_VALUE_TRUE;\n    }\n\n    jmem_cpointer_t proto_cp = ecma_op_ordinary_object_get_prototype_of (object_p);\n\n    /* 7. */\n    if (proto_cp == JMEM_CP_NULL)\n    {\n      return ECMA_VALUE_FALSE;\n    }\n\n    object_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, proto_cp);\n  }\n} /* ecma_op_object_has_property */\n\n/**\n * Search the value corresponding to a property name\n *\n * Note: search includes prototypes\n *\n * @return ecma value if property is found\n *         ECMA_VALUE_NOT_FOUND if property is not found\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_object_find_own (ecma_value_t base_value, /**< base value */\n                         ecma_object_t *object_p, /**< target object */\n                         ecma_string_t *property_name_p) /**< property name */\n{\n  JERRY_ASSERT (object_p != NULL\n                && !ecma_is_lexical_environment (object_p));\n  JERRY_ASSERT (property_name_p != NULL);\n  JERRY_ASSERT (!ECMA_OBJECT_IS_PROXY (object_p));\n\n  ecma_object_type_t type = ecma_get_object_type (object_p);\n\n  switch (type)\n  {\n    case ECMA_OBJECT_TYPE_CLASS:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      if (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_STRING_UL)\n      {\n        if (ecma_string_is_length (property_name_p))\n        {\n          ecma_value_t prim_value_p = ext_object_p->u.class_prop.u.value;\n\n          ecma_string_t *prim_value_str_p = ecma_get_string_from_value (prim_value_p);\n          lit_utf8_size_t length = ecma_string_get_length (prim_value_str_p);\n\n          return ecma_make_uint32_value (length);\n        }\n\n        uint32_t index = ecma_string_get_array_index (property_name_p);\n\n        if (index != ECMA_STRING_NOT_ARRAY_INDEX)\n        {\n          ecma_value_t prim_value_p = ext_object_p->u.class_prop.u.value;\n\n          ecma_string_t *prim_value_str_p = ecma_get_string_from_value (prim_value_p);\n\n          if (index < ecma_string_get_length (prim_value_str_p))\n          {\n            ecma_char_t char_at_idx = ecma_string_get_char_at_pos (prim_value_str_p, index);\n            return ecma_make_string_value (ecma_new_ecma_string_from_code_unit (char_at_idx));\n          }\n        }\n      }\n\n      break;\n    }\n    case ECMA_OBJECT_TYPE_ARRAY:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      if (ecma_string_is_length (property_name_p))\n      {\n        return ecma_make_uint32_value (ext_object_p->u.array.length);\n      }\n\n      if (JERRY_LIKELY (ecma_op_array_is_fast_array (ext_object_p)))\n      {\n        uint32_t index = ecma_string_get_array_index (property_name_p);\n\n        if (JERRY_LIKELY (index != ECMA_STRING_NOT_ARRAY_INDEX))\n        {\n          if (JERRY_LIKELY (index < ext_object_p->u.array.length))\n          {\n            ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n            return (ecma_is_value_array_hole (values_p[index]) ? ECMA_VALUE_NOT_FOUND\n                                                               : ecma_fast_copy_value (values_p[index]));\n          }\n        }\n        return ECMA_VALUE_NOT_FOUND;\n      }\n\n      break;\n    }\n    case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS\n          && ext_object_p->u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED)\n      {\n        uint32_t index = ecma_string_get_array_index (property_name_p);\n\n        if (index < ext_object_p->u.pseudo_array.u1.formal_params_number)\n        {\n          ecma_mapped_arguments_t *mapped_arguments_p = (ecma_mapped_arguments_t *) ext_object_p;\n\n          ecma_value_t *argv_p = (ecma_value_t *) (mapped_arguments_p + 1);\n\n          if (!ecma_is_value_empty (argv_p[index]))\n          {\n            ecma_string_t *name_p = ecma_op_arguments_object_get_formal_parameter (mapped_arguments_p, index);\n            ecma_object_t *lex_env_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, mapped_arguments_p->lex_env);\n\n            return ecma_op_get_binding_value (lex_env_p, name_p, true);\n          }\n        }\n      }\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n      /* ES2015 9.4.5.4 */\n      if (ecma_object_is_typedarray (object_p))\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (ecma_prop_name_is_symbol (property_name_p))\n        {\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        uint32_t array_index = ecma_string_get_array_index (property_name_p);\n\n        if (array_index != ECMA_STRING_NOT_ARRAY_INDEX)\n        {\n          ecma_typedarray_info_t info = ecma_typedarray_get_info (object_p);\n\n          if (array_index >= info.length)\n          {\n            return ECMA_VALUE_UNDEFINED;\n          }\n\n          uint32_t byte_pos = array_index << info.shift;\n          return ecma_get_typedarray_element (info.buffer_p + byte_pos, info.id);\n        }\n\n        ecma_number_t num = ecma_string_to_number (property_name_p);\n        ecma_string_t *num_to_str = ecma_new_ecma_string_from_number (num);\n\n        if (ecma_compare_ecma_strings (property_name_p, num_to_str))\n        {\n          ecma_deref_ecma_string (num_to_str);\n\n          return ECMA_VALUE_UNDEFINED;\n        }\n\n        ecma_deref_ecma_string (num_to_str);\n      }\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n\n      break;\n    }\n    default:\n    {\n      break;\n    }\n  }\n\n  ecma_property_t *property_p = ecma_find_named_property (object_p, property_name_p);\n\n  if (property_p == NULL)\n  {\n    if (ecma_get_object_is_builtin (object_p))\n    {\n      if (type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION && ecma_builtin_function_is_routine (object_p))\n      {\n        property_p = ecma_builtin_routine_try_to_instantiate_property (object_p, property_name_p);\n      }\n      else\n      {\n        property_p = ecma_builtin_try_to_instantiate_property (object_p, property_name_p);\n      }\n    }\n    else\n    {\n      switch (type)\n      {\n        case ECMA_OBJECT_TYPE_FUNCTION:\n        {\n#if !ENABLED (JERRY_ESNEXT)\n          if (ecma_string_is_length (property_name_p))\n          {\n            /* Get length virtual property. */\n            ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;\n            const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);\n\n            uint32_t len;\n            if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n            {\n              cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_data_p;\n              len = args_p->argument_end;\n            }\n            else\n            {\n              cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_data_p;\n              len = args_p->argument_end;\n            }\n\n            return ecma_make_uint32_value (len);\n          }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n          /* Get prototype physical property. */\n          property_p = ecma_op_function_try_to_lazy_instantiate_property (object_p, property_name_p);\n          break;\n        }\n        case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n        {\n          property_p = ecma_op_external_function_try_to_lazy_instantiate_property (object_p, property_name_p);\n          break;\n        }\n        case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n        {\n          property_p = ecma_op_bound_function_try_to_lazy_instantiate_property (object_p, property_name_p);\n          break;\n        }\n        case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n        {\n          if (((ecma_extended_object_t *) object_p)->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS)\n          {\n            property_p = ecma_op_arguments_object_try_to_lazy_instantiate_property (object_p, property_name_p);\n          }\n          break;\n        }\n        default:\n        {\n          break;\n        }\n      }\n    }\n\n    if (property_p == NULL)\n    {\n      return ECMA_VALUE_NOT_FOUND;\n    }\n  }\n\n  JERRY_ASSERT (ECMA_PROPERTY_IS_RAW (*property_p));\n\n  ecma_property_value_t *prop_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n  if (*property_p & ECMA_PROPERTY_FLAG_DATA)\n  {\n    return ecma_fast_copy_value (prop_value_p->value);\n  }\n\n  ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (prop_value_p);\n\n  if (get_set_pair_p->getter_cp == JMEM_CP_NULL)\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  ecma_object_t *getter_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, get_set_pair_p->getter_cp);\n\n  return ecma_op_function_call (getter_p, base_value, NULL, 0);\n} /* ecma_op_object_find_own */\n\n/**\n * Search the value corresponding to a property index\n *\n * Note: this method falls back to the general ecma_op_object_find\n *\n * @return ecma value if property is found\n *         ECMA_VALUE_NOT_FOUND if property is not found\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_object_find_by_index (ecma_object_t *object_p, /**< the object */\n                              ecma_length_t index) /**< property index */\n{\n  if (JERRY_LIKELY (index <= ECMA_DIRECT_STRING_MAX_IMM))\n  {\n    return ecma_op_object_find (object_p, ECMA_CREATE_DIRECT_UINT32_STRING (index));\n  }\n\n  ecma_string_t *index_str_p = ecma_new_ecma_string_from_length (index);\n  ecma_value_t ret_value = ecma_op_object_find (object_p, index_str_p);\n  ecma_deref_ecma_string (index_str_p);\n\n  return ret_value;\n} /* ecma_op_object_find_by_index */\n\n/**\n * Search the value corresponding to a property name\n *\n * Note: search includes prototypes\n *\n * @return ecma value if property is found\n *         ECMA_VALUE_NOT_FOUND if property is not found\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_object_find (ecma_object_t *object_p, /**< the object */\n                     ecma_string_t *property_name_p) /**< property name */\n{\n  ecma_value_t base_value = ecma_make_object_value (object_p);\n\n  while (true)\n  {\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_OBJECT_IS_PROXY (object_p))\n    {\n      return ecma_proxy_object_find (object_p, property_name_p);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    ecma_value_t value = ecma_op_object_find_own (base_value, object_p, property_name_p);\n\n    if (ecma_is_value_found (value))\n    {\n      return value;\n    }\n\n    if (object_p->u2.prototype_cp == JMEM_CP_NULL)\n    {\n      break;\n    }\n\n    object_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, object_p->u2.prototype_cp);\n  }\n\n  return ECMA_VALUE_NOT_FOUND;\n} /* ecma_op_object_find */\n\n/**\n * [[Get]] operation of ecma object\n *\n * This function returns the value of a named property, or undefined\n * if the property is not found in the prototype chain. If the property\n * is an accessor, it calls the \"get\" callback function and returns\n * with its result (including error throws).\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_op_object_get (ecma_object_t *object_p, /**< the object */\n                    ecma_string_t *property_name_p) /**< property name */\n{\n  return ecma_op_object_get_with_receiver (object_p, property_name_p, ecma_make_object_value (object_p));\n} /* ecma_op_object_get */\n\n/**\n * [[Get]] operation of ecma object with the specified receiver\n *\n * This function returns the value of a named property, or undefined\n * if the property is not found in the prototype chain. If the property\n * is an accessor, it calls the \"get\" callback function and returns\n * with its result (including error throws).\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_object_get_with_receiver (ecma_object_t *object_p, /**< the object */\n                                  ecma_string_t *property_name_p, /**< property name */\n                                  ecma_value_t receiver) /**< receiver to invoke getter function */\n{\n  while (true)\n  {\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_OBJECT_IS_PROXY (object_p))\n    {\n      return ecma_proxy_object_get (object_p, property_name_p, receiver);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    ecma_value_t value = ecma_op_object_find_own (receiver, object_p, property_name_p);\n\n    if (ecma_is_value_found (value))\n    {\n      return value;\n    }\n\n    jmem_cpointer_t proto_cp = ecma_op_ordinary_object_get_prototype_of (object_p);\n\n    if (proto_cp == JMEM_CP_NULL)\n    {\n      break;\n    }\n\n    object_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, proto_cp);\n  }\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_op_object_get_with_receiver */\n\n/**\n * [[Get]] operation of ecma object specified for property index\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_object_get_by_index (ecma_object_t *object_p, /**< the object */\n                             ecma_length_t index) /**< property index */\n{\n  if (JERRY_LIKELY (index <= ECMA_DIRECT_STRING_MAX_IMM))\n  {\n    return ecma_op_object_get (object_p, ECMA_CREATE_DIRECT_UINT32_STRING (index));\n  }\n\n  ecma_string_t *index_str_p = ecma_new_ecma_string_from_length (index);\n  ecma_value_t ret_value = ecma_op_object_get (object_p, index_str_p);\n  ecma_deref_ecma_string (index_str_p);\n\n  return ret_value;\n} /* ecma_op_object_get_by_index */\n\n/**\n * Perform ToLength(O.[[Get]](\"length\")) operation\n *\n * The property is converted to uint32 during the operation\n *\n * @return ECMA_VALUE_ERROR - if there was any error during the operation\n *         ECMA_VALUE_EMPTY - otherwise\n */\necma_value_t\necma_op_object_get_length (ecma_object_t *object_p, /**< the object */\n                           ecma_length_t *length_p) /**< [out] length value converted to uint32 */\n{\n  if (JERRY_LIKELY (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_ARRAY))\n  {\n    *length_p = (ecma_length_t) ecma_array_get_length (object_p);\n    return ECMA_VALUE_EMPTY;\n  }\n\n  ecma_value_t len_value = ecma_op_object_get_by_magic_id (object_p, LIT_MAGIC_STRING_LENGTH);\n  ecma_value_t len_number = ecma_op_to_length (len_value, length_p);\n  ecma_free_value (len_value);\n\n  JERRY_ASSERT (ECMA_IS_VALUE_ERROR (len_number) || ecma_is_value_empty (len_number));\n\n  return len_number;\n} /* ecma_op_object_get_length */\n\n/**\n * [[Get]] operation of ecma object where the property name is a magic string\n *\n * This function returns the value of a named property, or undefined\n * if the property is not found in the prototype chain. If the property\n * is an accessor, it calls the \"get\" callback function and returns\n * with its result (including error throws).\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_op_object_get_by_magic_id (ecma_object_t *object_p, /**< the object */\n                                lit_magic_string_id_t property_id) /**< property magic string id */\n{\n  return ecma_op_object_get (object_p, ecma_get_magic_string (property_id));\n} /* ecma_op_object_get_by_magic_id */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Descriptor string for each global symbol\n */\nstatic const uint16_t ecma_global_symbol_descriptions[] =\n{\n  LIT_MAGIC_STRING_ASYNC_ITERATOR,\n  LIT_MAGIC_STRING_HAS_INSTANCE,\n  LIT_MAGIC_STRING_IS_CONCAT_SPREADABLE,\n  LIT_MAGIC_STRING_ITERATOR,\n  LIT_MAGIC_STRING_MATCH,\n  LIT_MAGIC_STRING_REPLACE,\n  LIT_MAGIC_STRING_SEARCH,\n  LIT_MAGIC_STRING_SPECIES,\n  LIT_MAGIC_STRING_SPLIT,\n  LIT_MAGIC_STRING_TO_PRIMITIVE,\n  LIT_MAGIC_STRING_TO_STRING_TAG,\n  LIT_MAGIC_STRING_UNSCOPABLES,\n  LIT_MAGIC_STRING_MATCH_ALL,\n};\n\nJERRY_STATIC_ASSERT (sizeof (ecma_global_symbol_descriptions) / sizeof (uint16_t) == ECMA_BUILTIN_GLOBAL_SYMBOL_COUNT,\n                     ecma_global_symbol_descriptions_must_have_global_symbol_count_elements);\n\n/**\n * [[Get]] a well-known symbol by the given property id\n *\n * @return pointer to the requested well-known symbol\n */\necma_string_t *\necma_op_get_global_symbol (lit_magic_string_id_t property_id) /**< property symbol id */\n{\n  JERRY_ASSERT (LIT_IS_GLOBAL_SYMBOL (property_id));\n\n  uint32_t symbol_index = (uint32_t) property_id - (uint32_t) LIT_GLOBAL_SYMBOL__FIRST;\n  jmem_cpointer_t symbol_cp = JERRY_CONTEXT (global_symbols_cp)[symbol_index];\n\n  if (symbol_cp != JMEM_CP_NULL)\n  {\n    ecma_string_t *symbol_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, symbol_cp);\n    ecma_ref_ecma_string (symbol_p);\n    return symbol_p;\n  }\n\n  ecma_string_t *symbol_dot_p = ecma_get_magic_string (LIT_MAGIC_STRING_SYMBOL_DOT_UL);\n  uint16_t description = ecma_global_symbol_descriptions[symbol_index];\n  ecma_string_t *name_p = ecma_get_magic_string ((lit_magic_string_id_t) description);\n  ecma_string_t *descriptor_p = ecma_concat_ecma_strings (symbol_dot_p, name_p);\n\n  ecma_string_t *symbol_p = ecma_new_symbol_from_descriptor_string (ecma_make_string_value (descriptor_p));\n  symbol_p->u.hash = (uint16_t) ((property_id << ECMA_GLOBAL_SYMBOL_SHIFT) | ECMA_GLOBAL_SYMBOL_FLAG);\n\n  ECMA_SET_NON_NULL_POINTER (JERRY_CONTEXT (global_symbols_cp)[symbol_index], symbol_p);\n\n  ecma_ref_ecma_string (symbol_p);\n  return symbol_p;\n} /* ecma_op_get_global_symbol */\n\n/**\n * [[Get]] operation of ecma object where the property is a well-known symbol\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_object_get_by_symbol_id (ecma_object_t *object_p, /**< the object */\n                                 lit_magic_string_id_t property_id) /**< property symbol id */\n{\n  ecma_string_t *symbol_p = ecma_op_get_global_symbol (property_id);\n  ecma_value_t ret_value = ecma_op_object_get (object_p, symbol_p);\n  ecma_deref_ecma_string (symbol_p);\n\n  return ret_value;\n} /* ecma_op_object_get_by_symbol_id */\n\n/**\n * GetMethod operation\n *\n * See also: ECMA-262 v6, 7.3.9\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator function object - if success\n *         raised error - otherwise\n */\nstatic ecma_value_t\necma_op_get_method (ecma_value_t value, /**< ecma value */\n                    ecma_string_t *prop_name_p) /** property name */\n{\n  /* 2. */\n  ecma_value_t obj_value = ecma_op_to_object (value);\n\n  if (ECMA_IS_VALUE_ERROR (obj_value))\n  {\n    return obj_value;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_value);\n  ecma_value_t func;\n\n  func = ecma_op_object_get (obj_p, prop_name_p);\n  ecma_deref_object (obj_p);\n\n  /* 3. */\n  if (ECMA_IS_VALUE_ERROR (func))\n  {\n    return func;\n  }\n\n  /* 4. */\n  if (ecma_is_value_undefined (func) || ecma_is_value_null (func))\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  /* 5. */\n  if (!ecma_op_is_callable (func))\n  {\n    ecma_free_value (func);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator is not callable.\"));\n  }\n\n  /* 6. */\n  return func;\n} /* ecma_op_get_method */\n\n/**\n * GetMethod operation when the property is a well-known symbol\n *\n * See also: ECMA-262 v6, 7.3.9\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator function object - if success\n *         raised error - otherwise\n */\necma_value_t\necma_op_get_method_by_symbol_id (ecma_value_t value, /**< ecma value */\n                                 lit_magic_string_id_t symbol_id) /**< property symbol id */\n{\n  ecma_string_t *prop_name_p = ecma_op_get_global_symbol (symbol_id);\n  ecma_value_t ret_value = ecma_op_get_method (value, prop_name_p);\n  ecma_deref_ecma_string (prop_name_p);\n\n  return ret_value;\n} /* ecma_op_get_method_by_symbol_id */\n\n/**\n * GetMethod operation when the property is a magic string\n *\n * See also: ECMA-262 v6, 7.3.9\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator function object - if success\n *         raised error - otherwise\n */\necma_value_t\necma_op_get_method_by_magic_id (ecma_value_t value, /**< ecma value */\n                                lit_magic_string_id_t magic_id) /**< property magic id */\n{\n  return ecma_op_get_method (value, ecma_get_magic_string (magic_id));\n} /* ecma_op_get_method_by_magic_id */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * [[Put]] ecma general object's operation specialized for property index\n *\n * Note: This function falls back to the general ecma_op_object_put\n *\n * @return ecma value\n *         The returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_object_put_by_index (ecma_object_t *object_p, /**< the object */\n                             ecma_length_t index, /**< property index */\n                             ecma_value_t value, /**< ecma value */\n                             bool is_throw) /**< flag that controls failure handling */\n{\n  if (JERRY_LIKELY (index <= ECMA_DIRECT_STRING_MAX_IMM))\n  {\n    return ecma_op_object_put (object_p,\n                               ECMA_CREATE_DIRECT_UINT32_STRING (index),\n                               value,\n                               is_throw);\n  }\n\n  ecma_string_t *index_str_p = ecma_new_ecma_string_from_length (index);\n  ecma_value_t ret_value = ecma_op_object_put (object_p, index_str_p, value, is_throw);\n  ecma_deref_ecma_string (index_str_p);\n\n  return ret_value;\n} /* ecma_op_object_put_by_index */\n\n/**\n * [[Put]] ecma general object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *          ECMA-262 v5, 8.12.5\n *          Also incorporates [[CanPut]] ECMA-262 v5, 8.12.4\n *\n * @return ecma value\n *         The returned value must be freed with ecma_free_value.\n *\n *         Returns with ECMA_VALUE_TRUE if the operation is\n *         successful. Otherwise it returns with an error object\n *         or ECMA_VALUE_FALSE.\n *\n *         Note: even if is_throw is false, the setter can throw an\n *         error, and this function returns with that error.\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_op_object_put (ecma_object_t *object_p, /**< the object */\n                    ecma_string_t *property_name_p, /**< property name */\n                    ecma_value_t value, /**< ecma value */\n                    bool is_throw) /**< flag that controls failure handling */\n{\n  return ecma_op_object_put_with_receiver (object_p,\n                                           property_name_p,\n                                           value,\n                                           ecma_make_object_value (object_p),\n                                           is_throw);\n} /* ecma_op_object_put */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * [[Set]] ( P, V, Receiver) operation part for ordinary objects\n *\n * See also: ECMAScript v6, 9.19.9\n *\n * @return ecma value\n *         The returned value must be freed with ecma_free_value.\n */\nstatic ecma_value_t\necma_op_object_put_apply_receiver (ecma_value_t receiver, /**< receiver */\n                                   ecma_string_t *property_name_p, /**< property name */\n                                   ecma_value_t value, /**< value to set */\n                                   bool is_throw) /**< flag that controls failure handling */\n{\n  /* 5.b */\n  if (!ecma_is_value_object (receiver))\n  {\n    return ecma_reject (is_throw);\n  }\n\n  ecma_object_t *receiver_obj_p = ecma_get_object_from_value (receiver);\n\n  ecma_property_descriptor_t prop_desc;\n  /* 5.c */\n  ecma_value_t status = ecma_op_object_get_own_property_descriptor (receiver_obj_p,\n                                                                    property_name_p,\n                                                                    &prop_desc);\n\n  /* 5.d */\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    return status;\n  }\n\n  /* 5.e */\n  if (ecma_is_value_true (status))\n  {\n    ecma_value_t result;\n\n    /* 5.e.i - 5.e.ii */\n    if (prop_desc.flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)\n        || !(prop_desc.flags & ECMA_PROP_IS_WRITABLE))\n    {\n      result = ecma_reject (is_throw);\n    }\n    else\n    {\n      /* 5.e.iii */\n      JERRY_ASSERT (prop_desc.flags & ECMA_PROP_IS_VALUE_DEFINED);\n      ecma_free_value (prop_desc.value);\n      prop_desc.value = ecma_copy_value (value);\n\n      /* 5.e.iv */\n      result = ecma_op_object_define_own_property (receiver_obj_p, property_name_p, &prop_desc);\n\n      if (JERRY_UNLIKELY (ecma_is_value_false (result)) && is_throw)\n      {\n        result = ecma_raise_type_error (ECMA_ERR_MSG (\"Proxy trap returned falsish\"));\n      }\n    }\n\n    ecma_free_property_descriptor (&prop_desc);\n\n    return result;\n  }\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (receiver_obj_p))\n  {\n    ecma_property_descriptor_t desc;\n    /* Based on: ES6 9.1.9 [[Set]] 4.d.i. / ES11 9.1.9.2 OrdinarySetWithOwnDescriptor 2.c.i. */\n    desc.flags = (ECMA_PROP_IS_CONFIGURABLE\n                  | ECMA_PROP_IS_CONFIGURABLE_DEFINED\n                  | ECMA_PROP_IS_ENUMERABLE\n                  | ECMA_PROP_IS_ENUMERABLE_DEFINED\n                  | ECMA_PROP_IS_WRITABLE\n                  | ECMA_PROP_IS_WRITABLE_DEFINED\n                  | ECMA_PROP_IS_VALUE_DEFINED);\n    desc.value = value;\n    ecma_value_t ret_value = ecma_proxy_object_define_own_property (receiver_obj_p, property_name_p, &desc);\n\n    if (JERRY_UNLIKELY (ecma_is_value_false (ret_value)) && is_throw)\n    {\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Proxy trap returned falsish\"));\n    }\n\n    return ret_value;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (JERRY_UNLIKELY (ecma_op_object_is_fast_array (receiver_obj_p)))\n  {\n    ecma_fast_array_convert_to_normal (receiver_obj_p);\n  }\n\n  /* 5.f.i */\n  ecma_property_value_t *new_prop_value_p;\n  new_prop_value_p = ecma_create_named_data_property (receiver_obj_p,\n                                                      property_name_p,\n                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                      NULL);\n  JERRY_ASSERT (ecma_is_value_undefined (new_prop_value_p->value));\n  new_prop_value_p->value = ecma_copy_value_if_not_object (value);\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_op_object_put_apply_receiver */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * [[Put]] ecma general object's operation with given receiver\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *          ECMA-262 v5, 8.12.5\n *          ECMA-262 v6, 9.1.9\n *          Also incorporates [[CanPut]] ECMA-262 v5, 8.12.4\n *\n * @return ecma value\n *         The returned value must be freed with ecma_free_value.\n *\n *         Returns with ECMA_VALUE_TRUE if the operation is\n *         successful. Otherwise it returns with an error object\n *         or ECMA_VALUE_FALSE.\n *\n *         Note: even if is_throw is false, the setter can throw an\n *         error, and this function returns with that error.\n */\necma_value_t\necma_op_object_put_with_receiver (ecma_object_t *object_p, /**< the object */\n                                  ecma_string_t *property_name_p, /**< property name */\n                                  ecma_value_t value, /**< ecma value */\n                                  ecma_value_t receiver, /**< receiver */\n                                  bool is_throw) /**< flag that controls failure handling */\n{\n  JERRY_ASSERT (object_p != NULL\n                && !ecma_is_lexical_environment (object_p));\n  JERRY_ASSERT (property_name_p != NULL);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (object_p))\n  {\n    return ecma_proxy_object_set (object_p, property_name_p, value, receiver, is_throw);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_object_type_t type = ecma_get_object_type (object_p);\n\n  switch (type)\n  {\n    case ECMA_OBJECT_TYPE_ARRAY:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      if (ecma_string_is_length (property_name_p))\n      {\n        if (ecma_is_property_writable ((ecma_property_t) ext_object_p->u.array.length_prop_and_hole_count))\n        {\n          return ecma_op_array_object_set_length (object_p, value, 0);\n        }\n\n        return ecma_reject (is_throw);\n      }\n\n      if (JERRY_LIKELY (ecma_op_array_is_fast_array (ext_object_p)))\n      {\n        if (JERRY_UNLIKELY (!ecma_op_ordinary_object_is_extensible (object_p)))\n        {\n          return ecma_reject (is_throw);\n        }\n\n        uint32_t index = ecma_string_get_array_index (property_name_p);\n\n        if (JERRY_UNLIKELY (index == ECMA_STRING_NOT_ARRAY_INDEX))\n        {\n          ecma_fast_array_convert_to_normal (object_p);\n        }\n        else if (ecma_fast_array_set_property (object_p, index, value))\n        {\n          return ECMA_VALUE_TRUE;\n        }\n      }\n\n      JERRY_ASSERT (!ecma_op_object_is_fast_array (object_p));\n\n      break;\n    }\n    case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n      if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS\n          && (ext_object_p->u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED))\n      {\n        uint32_t index = ecma_string_get_array_index (property_name_p);\n\n        if (index < ext_object_p->u.pseudo_array.u1.formal_params_number)\n        {\n          ecma_mapped_arguments_t *mapped_arguments_p = (ecma_mapped_arguments_t *) ext_object_p;\n\n          ecma_value_t *argv_p = (ecma_value_t *) (mapped_arguments_p + 1);\n\n          if (!ecma_is_value_empty (argv_p[index]))\n          {\n            ecma_string_t *name_p = ecma_op_arguments_object_get_formal_parameter (mapped_arguments_p, index);\n            ecma_object_t *lex_env_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, mapped_arguments_p->lex_env);\n            ecma_op_set_mutable_binding (lex_env_p, name_p, value, true);\n            return ECMA_VALUE_TRUE;\n          }\n        }\n      }\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n      /* ES2015 9.4.5.5 */\n      if (ecma_object_is_typedarray (object_p))\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (ecma_prop_name_is_symbol (property_name_p))\n        {\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        uint32_t array_index = ecma_string_get_array_index (property_name_p);\n\n        if (array_index != ECMA_STRING_NOT_ARRAY_INDEX)\n        {\n          ecma_typedarray_info_t info = ecma_typedarray_get_info (object_p);\n\n          if (array_index >= info.length)\n          {\n            return ecma_reject (is_throw);\n          }\n\n          uint32_t byte_pos = array_index << info.shift;\n          return ecma_set_typedarray_element (info.buffer_p + byte_pos, value, info.id);\n        }\n\n        ecma_number_t num = ecma_string_to_number (property_name_p);\n        ecma_string_t *num_to_str = ecma_new_ecma_string_from_number (num);\n\n        if (ecma_compare_ecma_strings (property_name_p, num_to_str))\n        {\n          ecma_deref_ecma_string (num_to_str);\n\n          return ecma_reject (is_throw);\n        }\n\n        ecma_deref_ecma_string (num_to_str);\n      }\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n      break;\n    }\n    default:\n    {\n      break;\n    }\n  }\n\n  ecma_property_t *property_p = ecma_find_named_property (object_p, property_name_p);\n\n  if (property_p == NULL)\n  {\n    if (ecma_get_object_is_builtin (object_p))\n    {\n      if (type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION && ecma_builtin_function_is_routine (object_p))\n      {\n        property_p = ecma_builtin_routine_try_to_instantiate_property (object_p, property_name_p);\n      }\n      else\n      {\n        property_p = ecma_builtin_try_to_instantiate_property (object_p, property_name_p);\n      }\n    }\n    else\n    {\n      switch (type)\n      {\n        case ECMA_OBJECT_TYPE_CLASS:\n        {\n          ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n          if (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_STRING_UL)\n          {\n            uint32_t index = ecma_string_get_array_index (property_name_p);\n\n            if (index != ECMA_STRING_NOT_ARRAY_INDEX)\n            {\n              ecma_value_t prim_value_p = ext_object_p->u.class_prop.u.value;\n              ecma_string_t *prim_value_str_p = ecma_get_string_from_value (prim_value_p);\n\n              if (index < ecma_string_get_length (prim_value_str_p))\n              {\n                return ecma_reject (is_throw);\n              }\n            }\n          }\n          break;\n        }\n        case ECMA_OBJECT_TYPE_FUNCTION:\n        {\n  #if ENABLED (JERRY_ESNEXT)\n          /* Uninitialized 'length' property is non-writable (ECMA-262 v6, 19.2.4.1) */\n          if ((ecma_string_is_length (property_name_p))\n              && (!ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (((ecma_extended_object_t *) object_p)->u.function.scope_cp)))\n          {\n            return ecma_reject (is_throw);\n          }\n  #else /* !ENABLED (JERRY_ESNEXT) */\n          if (ecma_string_is_length (property_name_p))\n          {\n            return ecma_reject (is_throw);\n          }\n  #endif /* ENABLED (JERRY_ESNEXT) */\n\n          /* Get prototype physical property. */\n          property_p = ecma_op_function_try_to_lazy_instantiate_property (object_p, property_name_p);\n          break;\n        }\n        case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n        {\n          property_p = ecma_op_external_function_try_to_lazy_instantiate_property (object_p, property_name_p);\n          break;\n        }\n        case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n        {\n          property_p = ecma_op_bound_function_try_to_lazy_instantiate_property (object_p, property_name_p);\n          break;\n        }\n        case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n        {\n          if (((ecma_extended_object_t *) object_p)->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS)\n          {\n            property_p = ecma_op_arguments_object_try_to_lazy_instantiate_property (object_p, property_name_p);\n          }\n          break;\n        }\n        default:\n        {\n          break;\n        }\n      }\n    }\n  }\n\n  jmem_cpointer_t setter_cp = JMEM_CP_NULL;\n\n  if (property_p != NULL)\n  {\n    JERRY_ASSERT (ECMA_PROPERTY_IS_RAW (*property_p));\n\n    if (*property_p & ECMA_PROPERTY_FLAG_DATA)\n    {\n      if (ecma_is_property_writable (*property_p))\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (ecma_make_object_value (object_p) != receiver)\n        {\n          return ecma_op_object_put_apply_receiver (receiver, property_name_p, value, is_throw);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        /* There is no need for special casing arrays here because changing the\n         * value of an existing property never changes the length of an array. */\n        ecma_named_data_property_assign_value (object_p,\n                                               ECMA_PROPERTY_VALUE_PTR (property_p),\n                                               value);\n        return ECMA_VALUE_TRUE;\n      }\n    }\n    else\n    {\n      ecma_getter_setter_pointers_t *get_set_pair_p;\n      get_set_pair_p = ecma_get_named_accessor_property (ECMA_PROPERTY_VALUE_PTR (property_p));\n      setter_cp = get_set_pair_p->setter_cp;\n    }\n  }\n  else\n  {\n    bool create_new_property = true;\n\n    jmem_cpointer_t obj_cp;\n    ECMA_SET_NON_NULL_POINTER (obj_cp, object_p);\n    ecma_object_t *proto_p = object_p;\n\n    while (true)\n    {\n      obj_cp = ecma_op_ordinary_object_get_prototype_of (proto_p);\n\n      if (obj_cp == JMEM_CP_NULL)\n      {\n        break;\n      }\n\n      ecma_property_ref_t property_ref = { NULL };\n      proto_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, obj_cp);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      if (ECMA_OBJECT_IS_PROXY (proto_p))\n      {\n        return ecma_op_object_put_with_receiver (proto_p,\n                                                 property_name_p,\n                                                 value,\n                                                 receiver,\n                                                 is_throw);\n      }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n      ecma_property_t inherited_property = ecma_op_object_get_own_property (proto_p,\n                                                                            property_name_p,\n                                                                            &property_ref,\n                                                                            ECMA_PROPERTY_GET_NO_OPTIONS);\n\n      if (inherited_property != ECMA_PROPERTY_TYPE_NOT_FOUND\n          && inherited_property != ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP)\n      {\n        JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (inherited_property));\n\n        if (!(inherited_property & ECMA_PROPERTY_FLAG_DATA))\n        {\n          setter_cp = ecma_get_named_accessor_property (property_ref.value_p)->setter_cp;\n          create_new_property = false;\n        }\n        else\n        {\n          create_new_property = ecma_is_property_writable (inherited_property);\n        }\n      }\n    }\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (create_new_property\n        && ecma_is_value_object (receiver)\n        && ECMA_OBJECT_IS_PROXY (ecma_get_object_from_value (receiver)))\n    {\n      return ecma_op_object_put_apply_receiver (receiver, property_name_p, value, is_throw);\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    if (create_new_property\n        && ecma_op_ordinary_object_is_extensible (object_p))\n    {\n      const ecma_object_type_t obj_type = ecma_get_object_type (object_p);\n\n      if (obj_type == ECMA_OBJECT_TYPE_PSEUDO_ARRAY)\n      {\n        ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n        if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS\n            && ext_object_p->u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_MAPPED)\n        {\n          return ecma_builtin_helper_def_prop (object_p,\n                                               property_name_p,\n                                               value,\n                                               ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW);\n        }\n      }\n\n      uint32_t index = ecma_string_get_array_index (property_name_p);\n\n      if (obj_type == ECMA_OBJECT_TYPE_ARRAY\n          && index != ECMA_STRING_NOT_ARRAY_INDEX)\n      {\n        ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n        if (index < UINT32_MAX\n            && index >= ext_object_p->u.array.length)\n        {\n          if (!ecma_is_property_writable ((ecma_property_t) ext_object_p->u.array.length_prop_and_hole_count))\n          {\n            return ecma_reject (is_throw);\n          }\n\n          ext_object_p->u.array.length = index + 1;\n        }\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      return ecma_op_object_put_apply_receiver (receiver, property_name_p, value, is_throw);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      ecma_property_value_t *new_prop_value_p;\n      new_prop_value_p = ecma_create_named_data_property (object_p,\n                                                          property_name_p,\n                                                          ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                          NULL);\n\n      JERRY_ASSERT (ecma_is_value_undefined (new_prop_value_p->value));\n      new_prop_value_p->value = ecma_copy_value_if_not_object (value);\n      return ECMA_VALUE_TRUE;\n    }\n  }\n\n  if (setter_cp == JMEM_CP_NULL)\n  {\n    return ecma_reject (is_throw);\n  }\n\n  ecma_value_t ret_value = ecma_op_function_call (ECMA_GET_NON_NULL_POINTER (ecma_object_t, setter_cp),\n                                                  receiver,\n                                                  &value,\n                                                  1);\n\n  if (!ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    ecma_fast_free_value (ret_value);\n    ret_value = ECMA_VALUE_TRUE;\n  }\n\n  return ret_value;\n} /* ecma_op_object_put_with_receiver */\n\n/**\n * [[Delete]] ecma object's operation specialized for property index\n *\n * Note:\n *      This method falls back to the general ecma_op_object_delete\n *\n * @return true - if deleted successfully\n *         false - or type error otherwise (based in 'is_throw')\n */\necma_value_t\necma_op_object_delete_by_index (ecma_object_t *obj_p, /**< the object */\n                                ecma_length_t index, /**< property index */\n                                bool is_throw) /**< flag that controls failure handling */\n{\n  if (JERRY_LIKELY (index <= ECMA_DIRECT_STRING_MAX_IMM))\n  {\n    return ecma_op_object_delete (obj_p, ECMA_CREATE_DIRECT_UINT32_STRING (index), is_throw);;\n  }\n\n  ecma_string_t *index_str_p = ecma_new_ecma_string_from_length (index);\n  ecma_value_t ret_value = ecma_op_object_delete (obj_p, index_str_p, is_throw);\n  ecma_deref_ecma_string (index_str_p);\n\n  return ret_value;\n} /* ecma_op_object_delete_by_index */\n\n/**\n * [[Delete]] ecma object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *\n * Note:\n *      returned value must be freed with ecma_free_value\n *\n * @return true - if deleted successfully\n *         false - or type error otherwise (based in 'is_throw')\n */\necma_value_t\necma_op_object_delete (ecma_object_t *obj_p, /**< the object */\n                       ecma_string_t *property_name_p, /**< property name */\n                       bool is_strict) /**< flag that controls failure handling */\n{\n  JERRY_ASSERT (obj_p != NULL\n                && !ecma_is_lexical_environment (obj_p));\n  JERRY_ASSERT (property_name_p != NULL);\n\n  if (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_PSEUDO_ARRAY)\n  {\n    ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n    if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS)\n    {\n      return ecma_op_arguments_object_delete (obj_p,\n                                              property_name_p,\n                                              is_strict);\n    }\n  }\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    return ecma_proxy_object_delete_property (obj_p, property_name_p, is_strict);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  JERRY_ASSERT_OBJECT_TYPE_IS_VALID (ecma_get_object_type (obj_p));\n\n  return ecma_op_general_object_delete (obj_p,\n                                        property_name_p,\n                                        is_strict);\n} /* ecma_op_object_delete */\n\n/**\n * [[DefaultValue]] ecma object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_object_default_value (ecma_object_t *obj_p, /**< the object */\n                              ecma_preferred_type_hint_t hint) /**< hint on preferred result type */\n{\n  JERRY_ASSERT (obj_p != NULL\n                && !ecma_is_lexical_environment (obj_p));\n\n  JERRY_ASSERT_OBJECT_TYPE_IS_VALID (ecma_get_object_type (obj_p));\n\n  /*\n   * typedef ecma_property_t * (*default_value_ptr_t) (ecma_object_t *, ecma_string_t *);\n   * static const default_value_ptr_t default_value [ECMA_OBJECT_TYPE__COUNT] =\n   * {\n   *   [ECMA_OBJECT_TYPE_GENERAL]           = &ecma_op_general_object_default_value,\n   *   [ECMA_OBJECT_TYPE_CLASS]             = &ecma_op_general_object_default_value,\n   *   [ECMA_OBJECT_TYPE_FUNCTION]          = &ecma_op_general_object_default_value,\n   *   [ECMA_OBJECT_TYPE_NATIVE_FUNCTION]   = &ecma_op_general_object_default_value,\n   *   [ECMA_OBJECT_TYPE_ARRAY]             = &ecma_op_general_object_default_value,\n   *   [ECMA_OBJECT_TYPE_BOUND_FUNCTION]    = &ecma_op_general_object_default_value,\n   *   [ECMA_OBJECT_TYPE_PSEUDO_ARRAY]      = &ecma_op_general_object_default_value\n   * };\n   *\n   * return default_value[type] (obj_p, property_name_p);\n   */\n\n  return ecma_op_general_object_default_value (obj_p, hint);\n} /* ecma_op_object_default_value */\n\n/**\n * [[DefineOwnProperty]] ecma object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 8\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_object_define_own_property (ecma_object_t *obj_p, /**< the object */\n                                    ecma_string_t *property_name_p, /**< property name */\n                                    const ecma_property_descriptor_t *property_desc_p) /**< property\n                                                                                        *   descriptor */\n{\n  JERRY_ASSERT (obj_p != NULL\n                && !ecma_is_lexical_environment (obj_p));\n  JERRY_ASSERT (property_name_p != NULL);\n\n  const ecma_object_type_t type = ecma_get_object_type (obj_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    return ecma_proxy_object_define_own_property (obj_p, property_name_p, property_desc_p);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  switch (type)\n  {\n    case ECMA_OBJECT_TYPE_GENERAL:\n    case ECMA_OBJECT_TYPE_CLASS:\n    case ECMA_OBJECT_TYPE_FUNCTION:\n    case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n    case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n    {\n      return ecma_op_general_object_define_own_property (obj_p,\n                                                         property_name_p,\n                                                         property_desc_p);\n    }\n\n    case ECMA_OBJECT_TYPE_ARRAY:\n    {\n      return ecma_op_array_object_define_own_property (obj_p,\n                                                       property_name_p,\n                                                       property_desc_p);\n    }\n\n    default:\n    {\n      JERRY_ASSERT (type == ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n      if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS)\n      {\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n        JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n        return ecma_op_arguments_object_define_own_property (obj_p,\n                                                             property_name_p,\n                                                             property_desc_p);\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n      }\n      /* ES2015 9.4.5.3 */\n      if (ecma_object_is_typedarray (obj_p))\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (ecma_prop_name_is_symbol (property_name_p))\n        {\n          return ecma_op_general_object_define_own_property (obj_p,\n                                                             property_name_p,\n                                                             property_desc_p);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        uint32_t array_index = ecma_string_get_array_index (property_name_p);\n\n        if (array_index != ECMA_STRING_NOT_ARRAY_INDEX)\n        {\n          ecma_value_t define_status = ecma_op_typedarray_define_index_prop (obj_p,\n                                                                             array_index,\n                                                                             property_desc_p);\n\n          if (ECMA_IS_VALUE_ERROR (define_status))\n          {\n            return define_status;\n          }\n\n          if (ecma_is_value_true (define_status))\n          {\n            return ECMA_VALUE_TRUE;\n          }\n\n          return ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n        }\n\n        ecma_number_t num = ecma_string_to_number (property_name_p);\n        ecma_string_t *num_to_str = ecma_new_ecma_string_from_number (num);\n\n        if (ecma_compare_ecma_strings (property_name_p, num_to_str))\n        {\n          ecma_deref_ecma_string (num_to_str);\n\n          return ecma_reject (property_desc_p->flags & ECMA_PROP_IS_THROW);\n        }\n\n        ecma_deref_ecma_string (num_to_str);\n      }\n\n      return ecma_op_general_object_define_own_property (obj_p,\n                                                         property_name_p,\n                                                         property_desc_p);\n#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n      break;\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n    }\n  }\n} /* ecma_op_object_define_own_property */\n\n/**\n * Get property descriptor from specified property\n *\n * depending on the property type the following fields are set:\n *   - for named data properties: { [Value], [Writable], [Enumerable], [Configurable] };\n *   - for named accessor properties: { [Get] - if defined,\n *                                      [Set] - if defined,\n *                                      [Enumerable], [Configurable]\n *                                    }.\n *\n * The output property descriptor will always be initialized to an empty descriptor.\n *\n * @return ECMA_VALUE_ERROR - if the Proxy.[[GetOwnProperty]] operation raises error\n *         ECMA_VALUE_{TRUE, FALSE} - if property found or not\n */\necma_value_t\necma_op_object_get_own_property_descriptor (ecma_object_t *object_p, /**< the object */\n                                            ecma_string_t *property_name_p, /**< property name */\n                                            ecma_property_descriptor_t *prop_desc_p) /**< property descriptor */\n{\n  *prop_desc_p = ecma_make_empty_property_descriptor ();\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (object_p))\n  {\n    return ecma_proxy_object_get_own_property_descriptor (object_p, property_name_p, prop_desc_p);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_property_ref_t property_ref;\n\n  ecma_property_t property = ecma_op_object_get_own_property (object_p,\n                                                              property_name_p,\n                                                              &property_ref,\n                                                              ECMA_PROPERTY_GET_VALUE);\n\n  if (property == ECMA_PROPERTY_TYPE_NOT_FOUND || property == ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  uint32_t flags = ecma_is_property_enumerable (property) ? ECMA_PROP_IS_ENUMERABLE : ECMA_PROP_NO_OPTS;\n  flags |= ecma_is_property_configurable (property) ? ECMA_PROP_IS_CONFIGURABLE: ECMA_PROP_NO_OPTS;\n\n  prop_desc_p->flags = (uint16_t) (ECMA_PROP_IS_ENUMERABLE_DEFINED | ECMA_PROP_IS_CONFIGURABLE_DEFINED | flags);\n\n  if (property & ECMA_PROPERTY_FLAG_DATA)\n  {\n    if (!ECMA_PROPERTY_IS_VIRTUAL (property))\n    {\n      prop_desc_p->value = ecma_copy_value (property_ref.value_p->value);\n    }\n    else\n    {\n      prop_desc_p->value = property_ref.virtual_value;\n    }\n\n    prop_desc_p->flags |= (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED);\n    prop_desc_p->flags = (uint16_t) (prop_desc_p->flags | (ecma_is_property_writable (property) ? ECMA_PROP_IS_WRITABLE\n                                                                                                : ECMA_PROP_NO_OPTS));\n  }\n  else\n  {\n    ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (property_ref.value_p);\n    prop_desc_p->flags |= (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED);\n\n    if (get_set_pair_p->getter_cp == JMEM_CP_NULL)\n    {\n      prop_desc_p->get_p = NULL;\n    }\n    else\n    {\n      prop_desc_p->get_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, get_set_pair_p->getter_cp);\n      ecma_ref_object (prop_desc_p->get_p);\n    }\n\n    if (get_set_pair_p->setter_cp == JMEM_CP_NULL)\n    {\n      prop_desc_p->set_p = NULL;\n    }\n    else\n    {\n      prop_desc_p->set_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, get_set_pair_p->setter_cp);\n      ecma_ref_object (prop_desc_p->set_p);\n    }\n  }\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_op_object_get_own_property_descriptor */\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n/**\n * Get property descriptor from a target value for a specified property.\n *\n * For more details see ecma_op_object_get_own_property_descriptor\n *\n * @return ECMA_VALUE_ERROR - if the Proxy.[[GetOwnProperty]] operation raises error\n *         ECMA_VALUE_{TRUE, FALSE} - if property found or not\n */\necma_value_t\necma_op_get_own_property_descriptor (ecma_value_t target, /**< target value */\n                                     ecma_string_t *property_name_p, /**< property name */\n                                     ecma_property_descriptor_t *prop_desc_p) /**< property descriptor */\n{\n  if (!ecma_is_value_object (target))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  return ecma_op_object_get_own_property_descriptor (ecma_get_object_from_value (target), property_name_p, prop_desc_p);\n} /* ecma_op_get_own_property_descriptor */\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n/**\n * [[HasInstance]] ecma object's operation\n *\n * See also:\n *          ECMA-262 v5, 8.6.2; ECMA-262 v5, Table 9\n *\n * @return ecma value containing a boolean value or an error\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_object_has_instance (ecma_object_t *obj_p, /**< the object */\n                             ecma_value_t value) /**< argument 'V' */\n{\n  JERRY_ASSERT (obj_p != NULL\n                && !ecma_is_lexical_environment (obj_p));\n\n  JERRY_ASSERT_OBJECT_TYPE_IS_VALID (ecma_get_object_type (obj_p));\n\n  if (ecma_op_object_is_callable (obj_p))\n  {\n    return ecma_op_function_has_instance (obj_p, value);\n  }\n\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Expected a function object.\"));\n} /* ecma_op_object_has_instance */\n\n/**\n * General [[GetPrototypeOf]] abstract operation\n *\n * Note: returned valid object must be freed.\n *\n * @return ecma_object_t * - prototype of the input object.\n *         ECMA_OBJECT_POINTER_ERROR - error reported during Proxy resolve.\n *         NULL - the input object does not have a prototype.\n */\necma_object_t *\necma_op_object_get_prototype_of (ecma_object_t *obj_p) /**< input object */\n{\n  JERRY_ASSERT (obj_p != NULL);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    ecma_value_t proto = ecma_proxy_object_get_prototype_of (obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (proto))\n    {\n      return ECMA_OBJECT_POINTER_ERROR;\n    }\n    if (ecma_is_value_null (proto))\n    {\n      return NULL;\n    }\n\n    JERRY_ASSERT (ecma_is_value_object (proto));\n\n    return ecma_get_object_from_value (proto);\n  }\n  else\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n  {\n    jmem_cpointer_t proto_cp = ecma_op_ordinary_object_get_prototype_of (obj_p);\n\n    if (proto_cp == JMEM_CP_NULL)\n    {\n      return NULL;\n    }\n\n    ecma_object_t *proto_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, proto_cp);\n    ecma_ref_object (proto_p);\n\n    return proto_p;\n  }\n} /* ecma_op_object_get_prototype_of */\n\n/**\n * Object's isPrototypeOf operation\n *\n * See also:\n *          ECMA-262 v5, 15.2.4.6; 3\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_TRUE - if the target object is prototype of the base object\n *         ECMA_VALUE_FALSE - if the target object is not prototype of the base object\n */\necma_value_t\necma_op_object_is_prototype_of (ecma_object_t *base_p, /**< base object */\n                                ecma_object_t *target_p) /**< target object */\n{\n  ecma_ref_object (target_p);\n\n  do\n  {\n    ecma_object_t *proto_p = ecma_op_object_get_prototype_of (target_p);\n    ecma_deref_object (target_p);\n\n    if (proto_p == NULL)\n    {\n      return ECMA_VALUE_FALSE;\n    }\n    else if (proto_p == ECMA_OBJECT_POINTER_ERROR)\n    {\n      return ECMA_VALUE_ERROR;\n    }\n    else if (proto_p == base_p)\n    {\n      ecma_deref_object (proto_p);\n      return ECMA_VALUE_TRUE;\n    }\n\n    /* Advance up on prototype chain. */\n    target_p = proto_p;\n  }\n  while (true);\n} /* ecma_op_object_is_prototype_of */\n\n/**\n * Object's EnumerableOwnPropertyNames operation\n *\n * See also:\n *          ECMA-262 v11, 7.3.23\n *\n * @return NULL - if operation fails\n *         collection of property names / values / name-value pairs - otherwise\n */\necma_collection_t *\necma_op_object_get_enumerable_property_names (ecma_object_t *obj_p, /**< routine's first argument */\n                                              ecma_enumerable_property_names_options_t option) /**< listing option */\n{\n  /* 2. */\n  ecma_collection_t *prop_names_p = ecma_op_object_own_property_keys (obj_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (JERRY_UNLIKELY (prop_names_p == NULL))\n  {\n    return prop_names_p;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_value_t *names_buffer_p = prop_names_p->buffer_p;\n  /* 3. */\n  ecma_collection_t *properties_p = ecma_new_collection ();\n\n  /* 4. */\n  for (uint32_t i = 0; i < prop_names_p->item_count; i++)\n  {\n    /* 4.a */\n    if (ecma_is_value_string (names_buffer_p[i]))\n    {\n      ecma_string_t *key_p = ecma_get_string_from_value (names_buffer_p[i]);\n\n      /* 4.a.i */\n      ecma_property_descriptor_t prop_desc;\n      ecma_value_t status = ecma_op_object_get_own_property_descriptor (obj_p, key_p, &prop_desc);\n\n      if (ECMA_IS_VALUE_ERROR (status))\n      {\n        ecma_collection_free (prop_names_p);\n        ecma_collection_free (properties_p);\n\n        return NULL;\n      }\n\n      const bool is_enumerable = (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE) != 0;\n      ecma_free_property_descriptor (&prop_desc);\n      /* 4.a.ii */\n      if (is_enumerable)\n      {\n        /* 4.a.ii.1 */\n        if (option == ECMA_ENUMERABLE_PROPERTY_KEYS)\n        {\n          ecma_collection_push_back (properties_p, ecma_copy_value (names_buffer_p[i]));\n        }\n        else\n        {\n          /* 4.a.ii.2.a */\n          ecma_value_t value = ecma_op_object_get (obj_p, key_p);\n\n          if (ECMA_IS_VALUE_ERROR (value))\n          {\n            ecma_collection_free (prop_names_p);\n            ecma_collection_free (properties_p);\n\n            return NULL;\n          }\n\n          /* 4.a.ii.2.b */\n          if (option == ECMA_ENUMERABLE_PROPERTY_VALUES)\n          {\n            ecma_collection_push_back (properties_p, value);\n          }\n          else\n          {\n            /* 4.a.ii.2.c.i */\n            JERRY_ASSERT (option == ECMA_ENUMERABLE_PROPERTY_ENTRIES);\n\n            /* 4.a.ii.2.c.ii */\n            ecma_object_t *entry_p = ecma_op_new_array_object (2);\n\n            ecma_builtin_helper_def_prop_by_index (entry_p,\n                                                   0,\n                                                   names_buffer_p[i],\n                                                   ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n            ecma_builtin_helper_def_prop_by_index (entry_p,\n                                                   1,\n                                                   value,\n                                                   ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n            ecma_free_value (value);\n\n            /* 4.a.ii.2.c.iii */\n            ecma_collection_push_back (properties_p, ecma_make_object_value (entry_p));\n          }\n        }\n      }\n    }\n  }\n\n  ecma_collection_free (prop_names_p);\n\n  return properties_p;\n} /* ecma_op_object_get_enumerable_property_names */\n\n/**\n * Helper method to check if a given property is already in the collection or not\n *\n * @return true - if the property is already in the collection\n *         false - otherwise\n */\nstatic bool\necma_object_prop_name_is_duplicated (ecma_collection_t *prop_names_p, /**< prop name collection */\n                                     ecma_string_t *name_p) /**< property name */\n{\n  for (uint64_t i = 0; i < prop_names_p->item_count; i++)\n  {\n    if (ecma_compare_ecma_strings (ecma_get_prop_name_from_value (prop_names_p->buffer_p[i]), name_p))\n    {\n      return true;\n    }\n  }\n\n  return false;\n} /* ecma_object_prop_name_is_duplicated */\n\n/**\n * Helper method for getting lazy instantiated properties for [[OwnPropertyKeys]]\n */\nstatic void\necma_object_list_lazy_property_names (ecma_object_t *obj_p, /**< object */\n                                      ecma_collection_t *prop_names_p, /**< prop name collection */\n                                      ecma_property_counter_t *prop_counter_p) /**< prop counter */\n{\n  const ecma_object_type_t type = ecma_get_object_type (obj_p);\n  const bool obj_is_builtin = ecma_get_object_is_builtin (obj_p);\n\n  if (obj_is_builtin)\n  {\n    if (type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION && ecma_builtin_function_is_routine (obj_p))\n    {\n      ecma_builtin_routine_list_lazy_property_names (obj_p, prop_names_p, prop_counter_p);\n    }\n    else\n    {\n      ecma_builtin_list_lazy_property_names (obj_p, prop_names_p, prop_counter_p);\n    }\n  }\n  else\n  {\n    switch (type)\n    {\n      case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n      {\n        if (((ecma_extended_object_t *) obj_p)->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS)\n        {\n          ecma_op_arguments_object_list_lazy_property_names (obj_p, prop_names_p, prop_counter_p);\n        }\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n        if (ecma_object_is_typedarray (obj_p))\n        {\n          ecma_op_typedarray_list_lazy_property_names (obj_p, prop_names_p, prop_counter_p);\n        }\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n        break;\n      }\n      case ECMA_OBJECT_TYPE_FUNCTION:\n      {\n        ecma_op_function_list_lazy_property_names (obj_p, prop_names_p, prop_counter_p);\n        break;\n      }\n      case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n      {\n        ecma_op_external_function_list_lazy_property_names (obj_p, prop_names_p, prop_counter_p);\n        break;\n      }\n      case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n      {\n        ecma_op_bound_function_list_lazy_property_names (obj_p, prop_names_p, prop_counter_p);\n        break;\n      }\n      case ECMA_OBJECT_TYPE_CLASS:\n      {\n        ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n        if (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_STRING_UL)\n        {\n          ecma_op_string_list_lazy_property_names (obj_p, prop_names_p, prop_counter_p);\n        }\n\n        break;\n      }\n      case ECMA_OBJECT_TYPE_ARRAY:\n      {\n        ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n        prop_counter_p->string_named_props++;\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (type == ECMA_OBJECT_TYPE_GENERAL);\n        break;\n      }\n    }\n  }\n} /* ecma_object_list_lazy_property_names */\n\n/**\n * Helper method for sorting the given property names based on [[OwnPropertyKeys]]\n */\nstatic void\necma_object_sort_property_names (ecma_collection_t *prop_names_p, /**< prop name collection */\n                                 ecma_property_counter_t *prop_counter) /**< prop counter */\n{\n  uint32_t lazy_string_prop_name_count = prop_counter->lazy_string_named_props;\n#if ENABLED (JERRY_ESNEXT)\n  uint32_t lazy_symbol_prop_name_count = prop_counter->lazy_symbol_named_props;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  uint32_t string_name_pos = prop_counter->string_named_props;\n#if ENABLED (JERRY_ESNEXT)\n  uint32_t symbol_name_pos = prop_counter->symbol_named_props;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  uint32_t all_prop_count = (prop_counter->array_index_named_props) + (string_name_pos);\n#if ENABLED (JERRY_ESNEXT)\n  all_prop_count += symbol_name_pos;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t *names_p = jmem_heap_alloc_block (all_prop_count * sizeof (ecma_value_t));\n\n  ecma_value_t *string_names_p = names_p + prop_counter->array_index_named_props;\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t *symbol_names_p = string_names_p + string_name_pos;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  uint32_t array_index_name_pos = 0;\n  uint32_t lazy_string_name_pos = 0;\n#if ENABLED (JERRY_ESNEXT)\n  uint32_t lazy_symbol_name_pos = 0;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  for (uint32_t i = 0; i < prop_names_p->item_count; i++)\n  {\n    ecma_value_t prop_name = prop_names_p->buffer_p[i];\n    ecma_string_t *name_p = ecma_get_prop_name_from_value (prop_name);\n    uint32_t index = ecma_string_get_array_index (name_p);\n\n    /* sort array index named properties in ascending order */\n    if (index != ECMA_STRING_NOT_ARRAY_INDEX)\n    {\n      JERRY_ASSERT (array_index_name_pos < prop_counter->array_index_named_props);\n\n      uint32_t insert_pos = 0;\n      while (insert_pos < array_index_name_pos\n              && index > ecma_string_get_array_index (ecma_get_string_from_value (names_p[insert_pos])))\n      {\n        insert_pos++;\n      }\n\n      if (insert_pos == array_index_name_pos)\n      {\n        names_p[array_index_name_pos++] = prop_name;\n      }\n      else\n      {\n        JERRY_ASSERT (insert_pos < array_index_name_pos);\n        JERRY_ASSERT (index <= ecma_string_get_array_index (ecma_get_string_from_value (names_p[insert_pos])));\n\n        uint32_t move_pos = array_index_name_pos++;\n\n        while (move_pos > insert_pos)\n        {\n          names_p[move_pos] = names_p[move_pos - 1u];\n\n          move_pos--;\n        }\n\n        names_p[insert_pos] = prop_name;\n      }\n    }\n#if ENABLED (JERRY_ESNEXT)\n    /* sort symbol named properites in creation order */\n    else if (ecma_prop_name_is_symbol (name_p))\n    {\n      JERRY_ASSERT (symbol_name_pos > 0);\n      JERRY_ASSERT (symbol_name_pos <= prop_counter->symbol_named_props);\n\n      if (i < lazy_symbol_prop_name_count)\n      {\n        symbol_names_p[lazy_symbol_name_pos++] = prop_name;\n      }\n      else\n      {\n        symbol_names_p[--symbol_name_pos] = prop_name;\n      }\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    /* sort string named properties in creation order */\n    else\n    {\n      JERRY_ASSERT (string_name_pos > 0);\n      JERRY_ASSERT (string_name_pos <= prop_counter->string_named_props);\n\n      if (i < lazy_string_prop_name_count)\n      {\n        string_names_p[lazy_string_name_pos++] = prop_name;\n      }\n      else\n      {\n        string_names_p[--string_name_pos] = prop_name;\n      }\n    }\n  }\n\n  /* Free the unsorted buffer and copy the sorted one in its place */\n  jmem_heap_free_block (prop_names_p->buffer_p, ECMA_COLLECTION_ALLOCATED_SIZE (prop_names_p->capacity));\n  prop_names_p->buffer_p = names_p;\n  prop_names_p->item_count = all_prop_count;\n  prop_names_p->capacity = all_prop_count;\n} /* ecma_object_sort_property_names */\n\n/**\n * Object's [[OwnPropertyKeys]] internal method\n *\n * Order of names in the collection:\n *  - integer indices in ascending order\n *  - other indices in creation order (for built-ins: the order of the properties are listed in specification).\n *\n * Note:\n *      Implementation of the routine assumes that new properties are appended to beginning of corresponding object's\n *      property list, and the list is not reordered (in other words, properties are stored in order that is reversed\n *      to the properties' addition order).\n *\n * @return NULL - if the Proxy.[[OwnPropertyKeys]] operation raises error\n *         collection of property names - otherwise\n */\necma_collection_t *\necma_op_object_own_property_keys (ecma_object_t *obj_p) /**< object */\n{\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (obj_p))\n  {\n    return ecma_proxy_object_own_property_keys (obj_p);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    return ecma_fast_array_object_own_property_keys (obj_p);\n  }\n\n  ecma_collection_t *prop_names_p = ecma_new_collection ();\n  ecma_property_counter_t prop_counter = {0, 0, 0, 0, 0};\n\n  ecma_object_list_lazy_property_names (obj_p, prop_names_p, &prop_counter);\n\n  prop_counter.lazy_string_named_props = prop_names_p->item_count - prop_counter.symbol_named_props;\n  prop_counter.lazy_symbol_named_props = prop_counter.symbol_named_props;\n\n  jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  if (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n\n    if (prop_iter_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n    {\n      prop_iter_cp = prop_iter_p->next_property_cp;\n    }\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  while (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)\n    {\n      ecma_property_t *property_p = prop_iter_p->types + i;\n\n      if (ECMA_PROPERTY_IS_RAW (*property_p))\n      {\n        ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n        if (ECMA_PROPERTY_GET_NAME_TYPE (*property_p) == ECMA_DIRECT_STRING_MAGIC\n            && prop_pair_p->names_cp[i] >= LIT_NON_INTERNAL_MAGIC_STRING__COUNT\n            && prop_pair_p->names_cp[i] < LIT_MAGIC_STRING__COUNT)\n        {\n          continue;\n        }\n\n        ecma_string_t *name_p = ecma_string_from_property_name (*property_p,\n                                                                prop_pair_p->names_cp[i]);\n\n        if (!ecma_object_prop_name_is_duplicated (prop_names_p, name_p))\n        {\n          if (ecma_string_get_array_index (name_p) != ECMA_STRING_NOT_ARRAY_INDEX)\n          {\n            prop_counter.array_index_named_props++;\n          }\n      #if ENABLED (JERRY_ESNEXT)\n          else if (ecma_prop_name_is_symbol (name_p))\n          {\n            prop_counter.symbol_named_props++;\n          }\n      #endif /* ENABLED (JERRY_ESNEXT) */\n          else\n          {\n            prop_counter.string_named_props++;\n          }\n\n          ecma_collection_push_back (prop_names_p, ecma_make_prop_name_value (name_p));\n        }\n        else\n        {\n          ecma_deref_ecma_string (name_p);\n        }\n      }\n    }\n\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n\n  if (prop_names_p->item_count != 0)\n  {\n    ecma_object_sort_property_names (prop_names_p, &prop_counter);\n  }\n\n  return prop_names_p;\n} /* ecma_op_object_own_property_keys */\n\n/**\n * EnumerateObjectProperties abstract method\n *\n * See also:\n *          ECMA-262 v11, 13.7.5.15\n *\n * @return NULL - if the Proxy.[[OwnPropertyKeys]] operation raises error\n *         collection of enumerable property names - otherwise\n */\necma_collection_t *\necma_op_object_enumerate (ecma_object_t *obj_p) /**< object */\n{\n  ecma_collection_t *visited_names_p = ecma_new_collection ();\n  ecma_collection_t *return_names_p = ecma_new_collection ();\n\n  ecma_ref_object (obj_p);\n\n  while (true)\n  {\n    ecma_collection_t *keys = ecma_op_object_own_property_keys (obj_p);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (JERRY_UNLIKELY (keys == NULL))\n    {\n      ecma_collection_free (return_names_p);\n      ecma_collection_free (visited_names_p);\n      ecma_deref_object (obj_p);\n      return keys;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    for (uint32_t i = 0; i < keys->item_count; i++)\n    {\n      ecma_value_t prop_name = keys->buffer_p[i];\n      ecma_string_t *name_p = ecma_get_prop_name_from_value (prop_name);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (ecma_prop_name_is_symbol (name_p))\n      {\n        continue;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      ecma_property_descriptor_t prop_desc;\n      ecma_value_t get_desc = ecma_op_object_get_own_property_descriptor (obj_p, name_p, &prop_desc);\n\n      if (ECMA_IS_VALUE_ERROR (get_desc))\n      {\n        ecma_collection_free (keys);\n        ecma_collection_free (return_names_p);\n        ecma_collection_free (visited_names_p);\n        ecma_deref_object (obj_p);\n        return NULL;\n      }\n\n      if (ecma_is_value_true (get_desc))\n      {\n        bool is_enumerable = (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE) != 0;\n        ecma_free_property_descriptor (&prop_desc);\n\n        if (ecma_collection_has_string_value (visited_names_p, name_p)\n            || ecma_collection_has_string_value (return_names_p, name_p))\n        {\n          continue;\n        }\n\n        ecma_ref_ecma_string (name_p);\n\n        if (is_enumerable)\n        {\n          ecma_collection_push_back (return_names_p, prop_name);\n        }\n        else\n        {\n          ecma_collection_push_back (visited_names_p, prop_name);\n        }\n      }\n    }\n\n    ecma_collection_free (keys);\n\n    /* Query the prototype. */\n    ecma_object_t *proto_p = ecma_op_object_get_prototype_of (obj_p);\n    ecma_deref_object (obj_p);\n\n    if (proto_p == NULL)\n    {\n      break;\n    }\n    else if (JERRY_UNLIKELY (proto_p == ECMA_OBJECT_POINTER_ERROR))\n    {\n      ecma_collection_free (return_names_p);\n      ecma_collection_free (visited_names_p);\n      return NULL;\n    }\n\n    /* Advance up on prototype chain. */\n    obj_p = proto_p;\n  }\n\n  ecma_collection_free (visited_names_p);\n\n  return return_names_p;\n} /* ecma_op_object_enumerate */\n\n/**\n * The function is used in the assert of ecma_object_get_class_name\n *\n * @return true  - if class name is an object\n *         false - otherwise\n */\ninline static bool\necma_object_check_class_name_is_object (ecma_object_t *obj_p) /**< object */\n{\n#ifndef JERRY_NDEBUG\n  return (ecma_builtin_is_global (obj_p)\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_PROMISE_PROTOTYPE)\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE)\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE)\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_BIGINT64ARRAY_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_BIGUINT64ARRAY_PROTOTYPE)\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#if ENABLED (JERRY_ESNEXT)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ARRAY_PROTOTYPE_UNSCOPABLES)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_STRING_ITERATOR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_REGEXP_STRING_ITERATOR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_GENERATOR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ERROR_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_DATE_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_REGEXP_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ASYNC_FUNCTION_PROTOTYPE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_MAP)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_MAP_PROTOTYPE)\n#if ENABLED (JERRY_ESNEXT)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_MAP_ITERATOR_PROTOTYPE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n#endif /* ENABLED (JERRY_BUILTIN_MAP) */\n#if ENABLED (JERRY_BUILTIN_SET)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_SET_PROTOTYPE)\n#if ENABLED (JERRY_ESNEXT)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_SET_ITERATOR_PROTOTYPE)\n#endif /* ENABLED (JERRY_ESNEXT) */\n#endif /* ENABLED (JERRY_BUILTIN_SET) */\n#if ENABLED (JERRY_BUILTIN_WEAKMAP)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_WEAKMAP_PROTOTYPE)\n#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */\n#if ENABLED (JERRY_BUILTIN_WEAKSET)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_WEAKSET_PROTOTYPE)\n#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_DATAVIEW_PROTOTYPE)\n#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */\n          || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_OBJECT_PROTOTYPE));\n#else /* JERRY_NDEBUG */\n  JERRY_UNUSED (obj_p);\n  return true;\n#endif /* !JERRY_NDEBUG */\n} /* ecma_object_check_class_name_is_object */\n\n/**\n * Get [[Class]] string of specified object\n *\n * @return class name magic string\n */\nlit_magic_string_id_t\necma_object_get_class_name (ecma_object_t *obj_p) /**< object */\n{\n  ecma_object_type_t type = ecma_get_object_type (obj_p);\n\n  switch (type)\n  {\n    case ECMA_OBJECT_TYPE_ARRAY:\n    {\n      return LIT_MAGIC_STRING_ARRAY_UL;\n    }\n    case ECMA_OBJECT_TYPE_CLASS:\n    {\n      ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n      return (lit_magic_string_id_t) ext_object_p->u.class_prop.class_id;\n    }\n    case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:\n    {\n      ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n      switch (ext_obj_p->u.pseudo_array.type)\n      {\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n        case ECMA_PSEUDO_ARRAY_TYPEDARRAY:\n        case ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO:\n        {\n          return (lit_magic_string_id_t) ext_obj_p->u.pseudo_array.u1.class_id;\n        }\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#if ENABLED (JERRY_ESNEXT)\n        case ECMA_PSEUDO_ARRAY_ITERATOR:\n        {\n          return LIT_MAGIC_STRING_ARRAY_ITERATOR_UL;\n        }\n        case ECMA_PSEUDO_SET_ITERATOR:\n        {\n          return LIT_MAGIC_STRING_SET_ITERATOR_UL;\n        }\n        case ECMA_PSEUDO_MAP_ITERATOR:\n        {\n          return LIT_MAGIC_STRING_MAP_ITERATOR_UL;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_ESNEXT)\n        case ECMA_PSEUDO_STRING_ITERATOR:\n        {\n          return LIT_MAGIC_STRING_STRING_ITERATOR_UL;\n        }\n        case ECMA_PSEUDO_REGEXP_STRING_ITERATOR:\n        {\n          return LIT_MAGIC_STRING_REGEXP_STRING_ITERATOR_UL;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        default:\n        {\n          JERRY_ASSERT (ext_obj_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);\n\n          return LIT_MAGIC_STRING_ARGUMENTS_UL;\n        }\n      }\n\n      break;\n    }\n    case ECMA_OBJECT_TYPE_FUNCTION:\n    case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:\n    case ECMA_OBJECT_TYPE_BOUND_FUNCTION:\n    {\n      return LIT_MAGIC_STRING_FUNCTION_UL;\n    }\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    case ECMA_OBJECT_TYPE_PROXY:\n    {\n      ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n      if (!ecma_is_value_null (proxy_obj_p->target) && ecma_is_value_object (proxy_obj_p->target))\n      {\n        ecma_object_t *target_obj_p = ecma_get_object_from_value (proxy_obj_p->target);\n        return ecma_object_get_class_name (target_obj_p);\n      }\n      return LIT_MAGIC_STRING_OBJECT_UL;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n    default:\n    {\n      JERRY_ASSERT (type == ECMA_OBJECT_TYPE_GENERAL || type == ECMA_OBJECT_TYPE_PROXY);\n\n      if (ecma_get_object_is_builtin (obj_p))\n      {\n        ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n\n        switch (ext_obj_p->u.built_in.id)\n        {\n#if ENABLED (JERRY_BUILTIN_MATH)\n          case ECMA_BUILTIN_ID_MATH:\n          {\n            return LIT_MAGIC_STRING_MATH_UL;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_MATH) */\n#if ENABLED (JERRY_BUILTIN_REFLECT)\n          case ECMA_BUILTIN_ID_REFLECT:\n          {\n            return LIT_MAGIC_STRING_REFLECT_UL;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_REFLECT) */\n#if ENABLED (JERRY_ESNEXT)\n          case ECMA_BUILTIN_ID_GENERATOR:\n          {\n            return LIT_MAGIC_STRING_GENERATOR_UL;\n          }\n          case ECMA_BUILTIN_ID_ASYNC_GENERATOR:\n          {\n            return LIT_MAGIC_STRING_ASYNC_GENERATOR_UL;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_JSON)\n          case ECMA_BUILTIN_ID_JSON:\n          {\n            return LIT_MAGIC_STRING_JSON_U;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_JSON) */\n#if !ENABLED (JERRY_ESNEXT)\n#if ENABLED (JERRY_BUILTIN_ERRORS)\n          case ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE:\n          case ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE:\n          case ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE:\n          case ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE:\n          case ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE:\n          case ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE:\n#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */\n          case ECMA_BUILTIN_ID_ERROR_PROTOTYPE:\n          {\n            return LIT_MAGIC_STRING_ERROR_UL;\n          }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_BUILTIN_PROXY)\n          case ECMA_BUILTIN_ID_PROXY:\n          {\n            return LIT_MAGIC_STRING_FUNCTION_UL;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n          case ECMA_BUILTIN_ID_BIGINT:\n          {\n            return LIT_MAGIC_STRING_FUNCTION_UL;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n          default:\n          {\n            JERRY_ASSERT (ecma_object_check_class_name_is_object (obj_p));\n\n            return LIT_MAGIC_STRING_OBJECT_UL;\n          }\n        }\n      }\n      else\n      {\n        return LIT_MAGIC_STRING_OBJECT_UL;\n      }\n    }\n  }\n} /* ecma_object_get_class_name */\n\n/**\n * Get value of an object if the class matches\n *\n * @return value of the object if the class matches\n *         ECMA_VALUE_NOT_FOUND otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_object_class_is (ecma_object_t *object_p, /**< object */\n                      uint32_t class_id) /**< class id */\n{\n  if (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_CLASS)\n  {\n    ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n    if (ext_object_p->u.class_prop.class_id == class_id)\n    {\n      return true;\n    }\n  }\n\n  return false;\n} /* ecma_object_class_is */\n\n/**\n * Checks if the given argument has [[RegExpMatcher]] internal slot\n *\n * @return true - if the given argument is a regexp\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_object_is_regexp_object (ecma_value_t arg) /**< argument */\n{\n  return (ecma_is_value_object (arg)\n          && ecma_object_class_is (ecma_get_object_from_value (arg), LIT_MAGIC_STRING_REGEXP_UL));\n} /* ecma_object_is_regexp_object */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Object's IsConcatSpreadable operation, used for Array.prototype.concat\n * It checks the argument's [Symbol.isConcatSpreadable] property value\n *\n * See also:\n *          ECMA-262 v6, 22.1.3.1.1;\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_TRUE - if the argument is concatSpreadable\n *         ECMA_VALUE_FALSE - otherwise\n */\necma_value_t\necma_op_is_concat_spreadable (ecma_value_t arg) /**< argument */\n{\n  if (!ecma_is_value_object (arg))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_value_t spreadable = ecma_op_object_get_by_symbol_id (ecma_get_object_from_value (arg),\n                                                             LIT_GLOBAL_SYMBOL_IS_CONCAT_SPREADABLE);\n\n  if (ECMA_IS_VALUE_ERROR (spreadable))\n  {\n    return spreadable;\n  }\n\n  if (!ecma_is_value_undefined (spreadable))\n  {\n    const bool to_bool = ecma_op_to_boolean (spreadable);\n    ecma_free_value (spreadable);\n    return ecma_make_boolean_value (to_bool);\n  }\n\n  return ecma_is_value_array (arg);\n} /* ecma_op_is_concat_spreadable */\n\n/**\n * IsRegExp operation\n *\n * See also:\n *          ECMA-262 v6, 22.1.3.1.1;\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_TRUE - if the argument is regexp\n *         ECMA_VALUE_FALSE - otherwise\n */\necma_value_t\necma_op_is_regexp (ecma_value_t arg) /**< argument */\n{\n  if (!ecma_is_value_object (arg))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  ecma_value_t is_regexp = ecma_op_object_get_by_symbol_id (ecma_get_object_from_value (arg),\n                                                            LIT_GLOBAL_SYMBOL_MATCH);\n\n  if (ECMA_IS_VALUE_ERROR (is_regexp))\n  {\n    return is_regexp;\n  }\n\n  if (!ecma_is_value_undefined (is_regexp))\n  {\n    const bool to_bool = ecma_op_to_boolean (is_regexp);\n    ecma_free_value (is_regexp);\n    return ecma_make_boolean_value (to_bool);\n  }\n\n  return ecma_make_boolean_value (ecma_object_is_regexp_object (arg));\n} /* ecma_op_is_regexp */\n\n/**\n * SpeciesConstructor operation\n * See also:\n *          ECMA-262 v6, 7.3.20;\n *\n * @return ecma_value\n *         returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_species_constructor (ecma_object_t *this_value, /**< This Value */\n                             ecma_builtin_id_t default_constructor_id) /**< Builtin ID of default constructor */\n{\n  ecma_object_t *default_constructor_p = ecma_builtin_get (default_constructor_id);\n  ecma_value_t constructor = ecma_op_object_get_by_magic_id (this_value, LIT_MAGIC_STRING_CONSTRUCTOR);\n  if (ECMA_IS_VALUE_ERROR (constructor))\n  {\n    return constructor;\n  }\n\n  if (ecma_is_value_undefined (constructor))\n  {\n    ecma_ref_object (default_constructor_p);\n    return ecma_make_object_value (default_constructor_p);\n  }\n\n  if (!ecma_is_value_object (constructor))\n  {\n    ecma_free_value (constructor);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructor must be an Object\"));\n  }\n\n  ecma_object_t *ctor_object_p = ecma_get_object_from_value (constructor);\n  ecma_value_t species = ecma_op_object_get_by_symbol_id (ctor_object_p, LIT_GLOBAL_SYMBOL_SPECIES);\n  ecma_deref_object (ctor_object_p);\n\n  if (ECMA_IS_VALUE_ERROR (species))\n  {\n    return species;\n  }\n\n  if (ecma_is_value_undefined (species) || ecma_is_value_null (species))\n  {\n    ecma_ref_object (default_constructor_p);\n    return ecma_make_object_value (default_constructor_p);\n  }\n\n  if (!ecma_is_constructor (species))\n  {\n    ecma_free_value (species);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Species must be a Constructor\"));\n  }\n\n  return species;\n} /* ecma_op_species_constructor */\n\n/**\n * 7.3.18 Abstract operation Invoke when property name is a magic string\n *\n * @return ecma_value result of the invoked function or raised error\n *         note: returned value must be freed with ecma_free_value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_op_invoke_by_symbol_id (ecma_value_t object, /**< Object value */\n                             lit_magic_string_id_t symbol_id, /**< Symbol ID */\n                             ecma_value_t *args_p, /**< Argument list */\n                             uint32_t args_len) /**< Argument list length */\n{\n  ecma_string_t *symbol_p = ecma_op_get_global_symbol (symbol_id);\n  ecma_value_t ret_value = ecma_op_invoke (object, symbol_p, args_p, args_len);\n  ecma_deref_ecma_string (symbol_p);\n\n  return ret_value;\n} /* ecma_op_invoke_by_symbol_id */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * 7.3.18 Abstract operation Invoke when property name is a magic string\n *\n * @return ecma_value result of the invoked function or raised error\n *         note: returned value must be freed with ecma_free_value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_op_invoke_by_magic_id (ecma_value_t object, /**< Object value */\n                            lit_magic_string_id_t magic_string_id, /**< Magic string ID */\n                            ecma_value_t *args_p, /**< Argument list */\n                            uint32_t args_len) /**< Argument list length */\n{\n  return ecma_op_invoke (object, ecma_get_magic_string (magic_string_id), args_p, args_len);\n} /* ecma_op_invoke_by_magic_id */\n\n/**\n * 7.3.18 Abstract operation Invoke\n *\n * @return ecma_value result of the invoked function or raised error\n *         note: returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_invoke (ecma_value_t object, /**< Object value */\n                ecma_string_t *property_name_p, /**< Property name */\n                ecma_value_t *args_p, /**< Argument list */\n                uint32_t args_len) /**< Argument list length */\n{\n  /* 3. */\n  ecma_value_t object_value = ecma_op_to_object (object);\n  if (ECMA_IS_VALUE_ERROR (object_value))\n  {\n    return object_value;\n  }\n\n  ecma_object_t *object_p = ecma_get_object_from_value (object_value);\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t this_arg = object;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_value_t this_arg = object_value;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t func = ecma_op_object_get_with_receiver (object_p, property_name_p, this_arg);\n\n  if (ECMA_IS_VALUE_ERROR (func))\n  {\n    ecma_deref_object (object_p);\n    return func;\n  }\n\n  /* 4. */\n  if (!ecma_op_is_callable (func))\n  {\n    ecma_free_value (func);\n    ecma_deref_object (object_p);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument is not callable\"));\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (func);\n  ecma_value_t call_result = ecma_op_function_call (func_obj_p, this_arg, args_p, args_len);\n\n  ecma_deref_object (object_p);\n  ecma_deref_object (func_obj_p);\n\n  return call_result;\n} /* ecma_op_invoke */\n\n/**\n * Ordinary object [[GetPrototypeOf]] operation\n *\n * See also:\n *          ECMAScript v6, 9.1.1\n *\n * @return the value of the [[Prototype]] internal slot of the given object.\n */\nextern inline jmem_cpointer_t JERRY_ATTR_ALWAYS_INLINE\necma_op_ordinary_object_get_prototype_of (ecma_object_t *obj_p) /**< object */\n{\n  JERRY_ASSERT (!ecma_is_lexical_environment (obj_p));\n  JERRY_ASSERT (!ECMA_OBJECT_IS_PROXY (obj_p));\n\n  return obj_p->u2.prototype_cp;\n} /* ecma_op_ordinary_object_get_prototype_of */\n\n/**\n * Ordinary object [[SetPrototypeOf]] operation\n *\n * See also:\n *          ECMAScript v6, 9.1.2\n *\n * @return ECMA_VALUE_FALSE - if the operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_op_ordinary_object_set_prototype_of (ecma_object_t *obj_p, /**< base object */\n                                          ecma_value_t proto) /**< prototype object */\n{\n  JERRY_ASSERT (!ecma_is_lexical_environment (obj_p));\n  JERRY_ASSERT (!ECMA_OBJECT_IS_PROXY (obj_p));\n\n  /* 1. */\n  JERRY_ASSERT (ecma_is_value_object (proto) || ecma_is_value_null (proto));\n\n  /* 3. */\n  ecma_object_t *current_proto_p = ECMA_GET_POINTER (ecma_object_t, ecma_op_ordinary_object_get_prototype_of (obj_p));\n  ecma_object_t *new_proto_p = ecma_is_value_null (proto) ? NULL : ecma_get_object_from_value (proto);\n\n  /* 4. */\n  if (new_proto_p == current_proto_p)\n  {\n    return ECMA_VALUE_TRUE;\n  }\n\n  /* 2 - 5. */\n  if (!ecma_op_ordinary_object_is_extensible (obj_p))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  /**\n   * When the prototype of a fast array changes, it is required to convert the\n   * array to a \"normal\" array. This ensures that all [[Get]]/[[Set]]/etc.\n   * calls works as expected.\n   */\n  if (ecma_op_object_is_fast_array (obj_p))\n  {\n    ecma_fast_array_convert_to_normal (obj_p);\n  }\n\n  /* 6. */\n  ecma_object_t *iter_p = new_proto_p;\n\n  /* 7 - 8. */\n  while (true)\n  {\n    /* 8.a */\n    if (iter_p == NULL)\n    {\n      break;\n    }\n\n    /* 8.b */\n    if (obj_p == iter_p)\n    {\n      return ECMA_VALUE_FALSE;\n    }\n\n    /* 8.c.i */\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_OBJECT_IS_PROXY (iter_p))\n    {\n      break;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    /* 8.c.ii */\n    iter_p = ECMA_GET_POINTER (ecma_object_t, ecma_op_ordinary_object_get_prototype_of (iter_p));\n  }\n\n  /* 9. */\n  ECMA_SET_POINTER (obj_p->u2.prototype_cp, new_proto_p);\n\n  /* 10. */\n  return ECMA_VALUE_TRUE;\n} /* ecma_op_ordinary_object_set_prototype_of */\n\n/**\n * [[IsExtensible]] operation for Ordinary object.\n *\n * See also:\n *          ECMAScript v6, 9.1.2\n *\n * @return true  - if object is extensible\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_PURE\necma_op_ordinary_object_is_extensible (ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (!ECMA_OBJECT_IS_PROXY (object_p));\n\n  return (object_p->type_flags_refs & ECMA_OBJECT_FLAG_EXTENSIBLE) != 0;\n} /* ecma_op_ordinary_object_is_extensible */\n\n/**\n * Set value of [[Extensible]] object's internal property.\n */\nvoid JERRY_ATTR_NOINLINE\necma_op_ordinary_object_prevent_extensions (ecma_object_t *object_p) /**< object */\n{\n  JERRY_ASSERT (!ECMA_OBJECT_IS_PROXY (object_p));\n  object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs & ~ECMA_OBJECT_FLAG_EXTENSIBLE);\n} /* ecma_op_ordinary_object_prevent_extensions */\n\n/**\n * Checks whether an object (excluding prototypes) has a named property\n *\n * @return true - if property is found\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_op_ordinary_object_has_own_property (ecma_object_t *object_p, /**< the object */\n                                          ecma_string_t *property_name_p) /**< property name */\n{\n  JERRY_ASSERT (!ECMA_OBJECT_IS_PROXY (object_p));\n\n  ecma_property_t property = ecma_op_object_get_own_property (object_p,\n                                                              property_name_p,\n                                                              NULL,\n                                                              ECMA_PROPERTY_GET_NO_OPTIONS);\n\n  return property != ECMA_PROPERTY_TYPE_NOT_FOUND && property != ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP;\n} /* ecma_op_ordinary_object_has_own_property */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-objects.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_OBJECTS_H\n#define ECMA_OBJECTS_H\n\n#include \"ecma-builtins.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaobjectsinternalops ECMA objects' operations\n * @{\n */\n\necma_property_t ecma_op_object_get_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p,\n                                                 ecma_property_ref_t *property_ref_p, uint32_t options);\nbool ecma_op_ordinary_object_has_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p);\necma_value_t ecma_op_object_has_property (ecma_object_t *object_p, ecma_string_t *property_name_p);\necma_value_t ecma_op_object_find_own (ecma_value_t base_value, ecma_object_t *object_p, ecma_string_t *property_name_p);\necma_value_t ecma_op_object_find (ecma_object_t *object_p, ecma_string_t *property_name_p);\necma_value_t ecma_op_object_find_by_index (ecma_object_t *object_p, ecma_length_t index);\necma_value_t ecma_op_object_get (ecma_object_t *object_p, ecma_string_t *property_name_p);\necma_value_t ecma_op_object_get_with_receiver (ecma_object_t *object_p, ecma_string_t *property_name_p,\n                                               ecma_value_t receiver);\necma_value_t ecma_op_object_get_length (ecma_object_t *object_p, ecma_length_t *length_p);\necma_value_t ecma_op_object_get_by_index (ecma_object_t *object_p, ecma_length_t index);\necma_value_t ecma_op_object_get_by_magic_id (ecma_object_t *object_p, lit_magic_string_id_t property_id);\n#if ENABLED (JERRY_ESNEXT)\necma_string_t *ecma_op_get_global_symbol (lit_magic_string_id_t property_id);\necma_value_t ecma_op_object_get_by_symbol_id (ecma_object_t *object_p, lit_magic_string_id_t property_id);\necma_value_t ecma_op_get_method_by_symbol_id (ecma_value_t value, lit_magic_string_id_t symbol_id);\necma_value_t ecma_op_get_method_by_magic_id (ecma_value_t value, lit_magic_string_id_t magic_id);\n#endif /* ENABLED (JERRY_ESNEXT) */\necma_value_t ecma_op_object_put_with_receiver (ecma_object_t *object_p, ecma_string_t *property_name_p,\n                                               ecma_value_t value, ecma_value_t receiver, bool is_throw);\necma_value_t ecma_op_object_put (ecma_object_t *object_p, ecma_string_t *property_name_p, ecma_value_t value,\n                                 bool is_throw);\necma_value_t ecma_op_object_put_with_receiver (ecma_object_t *object_p, ecma_string_t *property_name_p,\n                                               ecma_value_t value, ecma_value_t receiver, bool is_throw);\necma_value_t ecma_op_object_put_by_index (ecma_object_t *object_p, ecma_length_t index,\n                                          ecma_value_t value, bool is_throw);\necma_value_t ecma_op_object_delete (ecma_object_t *obj_p, ecma_string_t *property_name_p, bool is_throw);\necma_value_t ecma_op_object_delete_by_index (ecma_object_t *obj_p, ecma_length_t index, bool is_throw);\necma_value_t ecma_op_object_default_value (ecma_object_t *obj_p, ecma_preferred_type_hint_t hint);\necma_value_t ecma_op_object_define_own_property (ecma_object_t *obj_p, ecma_string_t *property_name_p,\n                                                 const ecma_property_descriptor_t *property_desc_p);\necma_value_t ecma_op_object_get_own_property_descriptor (ecma_object_t *object_p, ecma_string_t *property_name_p,\n                                                         ecma_property_descriptor_t *prop_desc_p);\necma_value_t ecma_op_object_has_instance (ecma_object_t *obj_p, ecma_value_t value);\necma_object_t *ecma_op_object_get_prototype_of (ecma_object_t *obj_p);\n\necma_value_t ecma_op_object_is_prototype_of (ecma_object_t *base_p, ecma_object_t *target_p);\necma_collection_t * ecma_op_object_get_enumerable_property_names (ecma_object_t *obj_p,\n                                                                  ecma_enumerable_property_names_options_t option);\necma_collection_t *ecma_op_object_own_property_keys (ecma_object_t *obj_p);\necma_collection_t *ecma_op_object_enumerate (ecma_object_t *obj_p);\n\nlit_magic_string_id_t ecma_object_get_class_name (ecma_object_t *obj_p);\nbool ecma_object_class_is (ecma_object_t *object_p, uint32_t class_id);\nbool ecma_object_is_regexp_object (ecma_value_t arg);\n#if ENABLED (JERRY_ESNEXT)\necma_value_t ecma_op_is_concat_spreadable (ecma_value_t arg);\necma_value_t ecma_op_is_regexp (ecma_value_t arg);\necma_value_t ecma_op_species_constructor (ecma_object_t *this_value, ecma_builtin_id_t default_constructor_id);\necma_value_t ecma_op_invoke_by_symbol_id (ecma_value_t object, lit_magic_string_id_t magic_string_id,\n                                          ecma_value_t *args_p, uint32_t args_len);\n#endif /* ENABLED (JERRY_ESNEXT) */\necma_value_t ecma_op_invoke (ecma_value_t object, ecma_string_t *property_name_p, ecma_value_t *args_p,\n                             uint32_t args_len);\necma_value_t ecma_op_invoke_by_magic_id (ecma_value_t object, lit_magic_string_id_t magic_string_id,\n                                         ecma_value_t *args_p, uint32_t args_len);\n\njmem_cpointer_t ecma_op_ordinary_object_get_prototype_of (ecma_object_t *obj_p);\necma_value_t ecma_op_ordinary_object_set_prototype_of (ecma_object_t *base_p, ecma_value_t proto);\nbool JERRY_ATTR_PURE ecma_op_ordinary_object_is_extensible (ecma_object_t *object_p);\nvoid ecma_op_ordinary_object_prevent_extensions (ecma_object_t *object_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\necma_value_t ecma_op_get_own_property_descriptor (ecma_value_t target,\n                                                  ecma_string_t *property_name_p,\n                                                  ecma_property_descriptor_t *prop_desc_p);\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_OBJECTS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-promise-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-boolean-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-handlers.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-jobqueue.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-promise-object.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmapromiseobject ECMA Promise object related routines\n * @{\n */\n\n/**\n * Check if an object is promise.\n *\n * @return true - if the object is a promise.\n *         false - otherwise.\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\necma_is_promise (ecma_object_t *obj_p) /**< points to object */\n{\n  return ecma_object_class_is (obj_p, LIT_MAGIC_STRING_PROMISE_UL);\n} /* ecma_is_promise */\n\n/**\n * Get the result of the promise.\n *\n * @return ecma value of the promise result.\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_promise_get_result (ecma_object_t *obj_p) /**< points to promise object */\n{\n  JERRY_ASSERT (ecma_is_promise (obj_p));\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n  return ecma_copy_value (ext_object_p->u.class_prop.u.value);\n} /* ecma_promise_get_result */\n\n/**\n * Set the PromiseResult of promise.\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\necma_promise_set_result (ecma_object_t *obj_p, /**< points to promise object */\n                         ecma_value_t result) /**< the result value */\n{\n  JERRY_ASSERT (ecma_is_promise (obj_p));\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n  JERRY_ASSERT (ext_object_p->u.class_prop.u.value == ECMA_VALUE_UNDEFINED);\n\n  ext_object_p->u.class_prop.u.value = result;\n} /* ecma_promise_set_result */\n\n/**\n * Get the PromiseState of promise.\n *\n * @return the state's enum value\n */\nuint16_t\necma_promise_get_flags (ecma_object_t *obj_p) /**< points to promise object */\n{\n  JERRY_ASSERT (ecma_is_promise (obj_p));\n\n  return ((ecma_extended_object_t *) obj_p)->u.class_prop.extra_info;\n} /* ecma_promise_get_flags */\n\n/**\n * Set the PromiseState of promise.\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\necma_promise_set_state (ecma_object_t *obj_p, /**< points to promise object */\n                        bool is_fulfilled) /**< new flags */\n{\n  JERRY_ASSERT (ecma_is_promise (obj_p));\n  JERRY_ASSERT (ecma_promise_get_flags (obj_p) & ECMA_PROMISE_IS_PENDING);\n\n  uint16_t flags_to_invert = (is_fulfilled ? (ECMA_PROMISE_IS_PENDING | ECMA_PROMISE_IS_FULFILLED)\n                                           : ECMA_PROMISE_IS_PENDING);\n\n  ((ecma_extended_object_t *) obj_p)->u.class_prop.extra_info ^= flags_to_invert;\n} /* ecma_promise_set_state */\n\n/**\n * Take a collection of Reactions and enqueue a new PromiseReactionJob for each Reaction.\n *\n * See also: ES2015 25.4.1.8\n */\nstatic void\necma_promise_trigger_reactions (ecma_collection_t *reactions, /**< lists of reactions */\n                                ecma_value_t value, /**< value for resolve or reject */\n                                bool is_reject) /**< true if promise is rejected, false otherwise */\n{\n  ecma_value_t *buffer_p = reactions->buffer_p;\n  ecma_value_t *buffer_end_p = buffer_p + reactions->item_count;\n\n  while (buffer_p < buffer_end_p)\n  {\n    ecma_value_t object_with_tag = *buffer_p++;\n    ecma_object_t *object_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t, object_with_tag);\n    ecma_value_t object = ecma_make_object_value (object_p);\n\n    if (JMEM_CP_GET_THIRD_BIT_FROM_POINTER_TAG (object_with_tag))\n    {\n      ecma_enqueue_promise_async_reaction_job (object, value, is_reject);\n      continue;\n    }\n\n    if (!is_reject)\n    {\n      ecma_value_t handler = ECMA_VALUE_TRUE;\n\n      if (JMEM_CP_GET_FIRST_BIT_FROM_POINTER_TAG (object_with_tag))\n      {\n        handler = *buffer_p++;\n      }\n\n      ecma_enqueue_promise_reaction_job (object, handler, value);\n    }\n    else if (JMEM_CP_GET_FIRST_BIT_FROM_POINTER_TAG (object_with_tag))\n    {\n      buffer_p++;\n    }\n\n    if (is_reject)\n    {\n      ecma_value_t handler = ECMA_VALUE_FALSE;\n\n      if (JMEM_CP_GET_SECOND_BIT_FROM_POINTER_TAG (object_with_tag))\n      {\n        handler = *buffer_p++;\n      }\n\n      ecma_enqueue_promise_reaction_job (object, handler, value);\n    }\n    else if (JMEM_CP_GET_SECOND_BIT_FROM_POINTER_TAG (object_with_tag))\n    {\n      buffer_p++;\n    }\n  }\n} /* ecma_promise_trigger_reactions */\n\n/**\n * Checks whether a resolver is called before.\n *\n * @return true if it was called before, false otherwise\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\necma_is_resolver_already_called (ecma_object_t *promise_obj_p) /**< promise */\n{\n  return (ecma_promise_get_flags (promise_obj_p) & ECMA_PROMISE_ALREADY_RESOLVED) != 0;\n} /* ecma_is_resolver_already_called */\n\n/**\n * HostPromiseRejectionTracker\n *\n * See also: ES11 25.6.1.9\n */\nstatic void\necma_track_promise_rejection (ecma_object_t *obj_p, /**< rejected promise */\n                              jerry_promise_rejection_operation_t operation) /**< operation */\n{\n  JERRY_ASSERT (ecma_is_promise (obj_p));\n\n  if (!(ecma_promise_get_flags (obj_p) & ECMA_PROMISE_HANDLED))\n  {\n    jerry_port_track_promise_rejection (ecma_make_object_value (obj_p), operation);\n  }\n} /* ecma_track_promise_rejection */\n\n/**\n * Reject a Promise with a reason.\n *\n * See also: ES2015 25.4.1.7\n */\nvoid\necma_reject_promise (ecma_value_t promise, /**< promise */\n                     ecma_value_t reason) /**< reason for reject */\n{\n  ecma_object_t *obj_p = ecma_get_object_from_value (promise);\n\n  JERRY_ASSERT (ecma_promise_get_flags (obj_p) & ECMA_PROMISE_IS_PENDING);\n\n  ecma_promise_set_state (obj_p, false);\n  ecma_promise_set_result (obj_p, ecma_copy_value_if_not_object (reason));\n  ecma_promise_object_t *promise_p = (ecma_promise_object_t *) obj_p;\n\n  /* GC can be triggered by ecma_new_collection so freeing the collection\n     first and creating a new one might cause a heap after use event. */\n  ecma_collection_t *reactions = promise_p->reactions;\n\n  /* Fulfill reactions will never be triggered. */\n  ecma_promise_trigger_reactions (reactions, reason, true);\n\n  promise_p->reactions = ecma_new_collection ();\n\n  ecma_collection_destroy (reactions);\n  ecma_track_promise_rejection (obj_p, JERRY_PROMISE_REJECTION_OPERATION_REJECT);\n} /* ecma_reject_promise */\n\n/**\n * Fulfill a Promise with a value.\n *\n * See also: ES2015 25.4.1.4\n */\nvoid\necma_fulfill_promise (ecma_value_t promise, /**< promise */\n                      ecma_value_t value) /**< fulfilled value */\n{\n  ecma_object_t *obj_p = ecma_get_object_from_value (promise);\n\n  JERRY_ASSERT (ecma_promise_get_flags (obj_p) & ECMA_PROMISE_IS_PENDING);\n\n  if (promise == value)\n  {\n    ecma_raise_type_error (ECMA_ERR_MSG (\"A promise cannot be resolved with itself.\"));\n    ecma_value_t exception = jcontext_take_exception ();\n    ecma_reject_promise (promise, exception);\n    ecma_free_value (exception);\n    return;\n  }\n\n  if (ecma_is_value_object (value))\n  {\n    ecma_value_t then = ecma_op_object_get_by_magic_id (ecma_get_object_from_value (value), LIT_MAGIC_STRING_THEN);\n\n    if (ECMA_IS_VALUE_ERROR (then))\n    {\n      then = jcontext_take_exception ();\n      ecma_reject_promise (promise, then);\n      ecma_free_value (then);\n      return;\n    }\n\n    if (ecma_op_is_callable (then))\n    {\n      ecma_enqueue_promise_resolve_thenable_job (promise, value, then);\n      ecma_free_value (then);\n      return;\n    }\n\n    ecma_free_value (then);\n  }\n\n  ecma_promise_set_state (obj_p, true);\n  ecma_promise_set_result (obj_p, ecma_copy_value_if_not_object (value));\n  ecma_promise_object_t *promise_p = (ecma_promise_object_t *) obj_p;\n\n  /* GC can be triggered by ecma_new_collection so freeing the collection\n     first and creating a new one might cause a heap after use event. */\n  ecma_collection_t *reactions = promise_p->reactions;\n\n  /* Reject reactions will never be triggered. */\n  ecma_promise_trigger_reactions (reactions, value, false);\n\n  promise_p->reactions = ecma_new_collection ();\n\n  ecma_collection_destroy (reactions);\n} /* ecma_fulfill_promise */\n\n/**\n * Native handler for Promise Reject Function.\n *\n * See also: ES2015 25.4.1.3.1\n *\n * @return ecma value of undefined.\n */\necma_value_t\necma_promise_reject_handler (const ecma_value_t function, /**< the function itself */\n                             const ecma_value_t this_arg, /**< this_arg of the function */\n                             const ecma_value_t argv[], /**< argument list */\n                             const uint32_t argc) /**< argument number */\n{\n  JERRY_UNUSED (this_arg);\n  ecma_promise_resolver_t *function_p = (ecma_promise_resolver_t *) ecma_get_object_from_value (function);\n\n  /* 1. */\n  ecma_object_t *promise_obj_p = ecma_get_object_from_value (function_p->promise);\n  JERRY_ASSERT (ecma_is_promise (promise_obj_p));\n\n  /* 3., 4. */\n  if (!ecma_is_resolver_already_called (promise_obj_p))\n  {\n    /* 5. */\n    ((ecma_extended_object_t *) promise_obj_p)->u.class_prop.extra_info |= ECMA_PROMISE_ALREADY_RESOLVED;\n\n    /* 6. */\n    ecma_value_t reject_value = (argc == 0) ? ECMA_VALUE_UNDEFINED : argv[0];\n    ecma_reject_promise (function_p->promise, reject_value);\n  }\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_promise_reject_handler */\n\n/**\n * Native handler for Promise Resolve Function.\n *\n * See also: ES2015 25.4.1.3.2\n *\n * @return ecma value of undefined.\n */\necma_value_t\necma_promise_resolve_handler (const ecma_value_t function, /**< the function itself */\n                              const ecma_value_t this_arg, /**< this_arg of the function */\n                              const ecma_value_t argv[], /**< argument list */\n                              const uint32_t argc) /**< argument number */\n{\n  JERRY_UNUSED (this_arg);\n  ecma_promise_resolver_t *function_p = (ecma_promise_resolver_t *) ecma_get_object_from_value (function);\n\n  /* 1. */\n  ecma_object_t *promise_obj_p = ecma_get_object_from_value (function_p->promise);\n  JERRY_ASSERT (ecma_is_promise (promise_obj_p));\n\n  /* 3., 4. */\n  if (!ecma_is_resolver_already_called (promise_obj_p))\n  {\n    /* 5. */\n    ((ecma_extended_object_t *) promise_obj_p)->u.class_prop.extra_info |= ECMA_PROMISE_ALREADY_RESOLVED;\n\n    ecma_fulfill_promise (function_p->promise, (argc == 0) ? ECMA_VALUE_UNDEFINED : argv[0]);\n  }\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_promise_resolve_handler */\n\n/**\n * Helper function for PromiseCreateResovingFucntions.\n *\n * See also: ES2015 25.4.1.3 2. - 7.\n *\n * @return pointer to the resolving function\n */\nstatic ecma_object_t *\necma_promise_create_resolving_functions_helper (ecma_object_t *promise_p, /**< Promise Object */\n                                                ecma_native_handler_id_t id) /**< Callback handler */\n{\n  ecma_object_t *func_obj_p = ecma_op_create_native_handler (id, sizeof (ecma_promise_resolver_t));\n\n  ecma_promise_resolver_t *resolver_p = (ecma_promise_resolver_t *) func_obj_p;\n  resolver_p->promise = ecma_make_object_value (promise_p);\n\n  return func_obj_p;\n} /* ecma_promise_create_resolving_functions_helper */\n\n/**\n * Create a PromiseCreateResovingFucntions.\n *\n * See also: ES2015 25.4.1.3\n *\n * @return pointer to the resolving functions\n */\nvoid\necma_promise_create_resolving_functions (ecma_promise_object_t *promise_p) /**< the promise object */\n{\n  /* 2. - 7. */\n  ecma_object_t *resolve_func_p = ecma_promise_create_resolving_functions_helper ((ecma_object_t *) promise_p,\n                                                                                  ECMA_NATIVE_HANDLER_PROMISE_RESOLVE);\n  ecma_object_t *reject_func_p = ecma_promise_create_resolving_functions_helper ((ecma_object_t *) promise_p,\n                                                                                 ECMA_NATIVE_HANDLER_PROMISE_REJECT);\n\n  promise_p->resolve = ecma_make_object_value (resolve_func_p);\n  promise_p->reject = ecma_make_object_value (reject_func_p);\n\n  ecma_deref_object (resolve_func_p);\n  ecma_deref_object (reject_func_p);\n} /* ecma_promise_create_resolving_functions */\n\n/**\n * Create a promise object.\n *\n * See also: ES2015 25.4.3.1\n *\n * @return ecma value of the new promise object\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_promise_object (ecma_value_t executor, /**< the executor function or object */\n                               ecma_promise_executor_type_t type) /**< indicates the type of executor */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (current_new_target_p) != NULL);\n  /* 3. */\n  ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),\n                                                                   ECMA_BUILTIN_ID_PROMISE_PROTOTYPE);\n\n  if (JERRY_UNLIKELY (proto_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  /* Calling ecma_new_collection might trigger a GC call, so this\n   * allocation is performed before the object is constructed. */\n  ecma_collection_t *reactions = ecma_new_collection ();\n\n  ecma_object_t *object_p = ecma_create_object (proto_p,\n                                                sizeof (ecma_promise_object_t),\n                                                ECMA_OBJECT_TYPE_CLASS);\n  ecma_deref_object (proto_p);\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_PROMISE_UL;\n  /* 5 */\n  ext_object_p->u.class_prop.extra_info = ECMA_PROMISE_IS_PENDING;\n  ext_object_p->u.class_prop.u.value = ECMA_VALUE_UNDEFINED;\n\n  /* 6-8. */\n  ecma_promise_object_t *promise_object_p = (ecma_promise_object_t *) object_p;\n  promise_object_p->reactions = reactions;\n  /* Creating the resolving function may trigger a GC, so these need to be initialized. */\n  promise_object_p->resolve = ECMA_VALUE_EMPTY;\n  promise_object_p->reject = ECMA_VALUE_EMPTY;\n\n  ecma_promise_create_resolving_functions (promise_object_p);\n\n  /* 9. */\n  ecma_value_t completion = ECMA_VALUE_UNDEFINED;\n\n  if (type == ECMA_PROMISE_EXECUTOR_FUNCTION)\n  {\n    JERRY_ASSERT (ecma_op_is_callable (executor));\n\n    ecma_value_t argv[] = { promise_object_p->resolve, promise_object_p->reject };\n    completion = ecma_op_function_call (ecma_get_object_from_value (executor),\n                                        ECMA_VALUE_UNDEFINED,\n                                        argv,\n                                        2);\n  }\n  else\n  {\n    JERRY_ASSERT (type == ECMA_PROMISE_EXECUTOR_EMPTY);\n    JERRY_UNUSED (executor);\n  }\n\n  ecma_value_t status = ECMA_VALUE_EMPTY;\n\n  if (ECMA_IS_VALUE_ERROR (completion))\n  {\n    /* 10.a. */\n    completion = jcontext_take_exception ();\n    status = ecma_op_function_call (ecma_get_object_from_value (promise_object_p->reject),\n                                    ECMA_VALUE_UNDEFINED,\n                                    &completion,\n                                    1);\n  }\n\n  ecma_free_value (completion);\n\n  /* 10.b. */\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    ecma_deref_object (object_p);\n    return status;\n  }\n\n  /* 11. */\n  ecma_free_value (status);\n\n  return ecma_make_object_value (object_p);\n} /* ecma_op_create_promise_object */\n\n/**\n * Helper function for increase or decrease the remaining count.\n *\n * @return the current remaining count after increase or decrease.\n */\nuint32_t\necma_promise_remaining_inc_or_dec (ecma_value_t remaining, /**< the remaining count */\n                                   bool is_inc) /**< whether to increase the count */\n{\n  JERRY_ASSERT (ecma_is_value_object (remaining));\n\n  ecma_object_t *remaining_p = ecma_get_object_from_value (remaining);\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) remaining_p;\n\n  JERRY_ASSERT (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_NUMBER_UL);\n\n  JERRY_ASSERT (ecma_is_value_integer_number (ext_object_p->u.class_prop.u.value));\n\n  uint32_t current = (uint32_t) ecma_get_integer_from_value (ext_object_p->u.class_prop.u.value);\n\n  if (is_inc)\n  {\n    current++;\n  }\n  else\n  {\n    current--;\n  }\n  ext_object_p->u.class_prop.u.value = ecma_make_uint32_value (current);\n\n  return current;\n} /* ecma_promise_remaining_inc_or_dec */\n\n/**\n * Native handler for Promise.all Resolve Element Function.\n *\n * See also:\n *         ES2015 25.4.4.1.2\n *\n * @return ecma value of undefined.\n */\necma_value_t\necma_promise_all_handler_cb (const ecma_value_t function_obj, /**< the function itself */\n                             const ecma_value_t this_val, /**< this_arg of the function */\n                             const ecma_value_t args_p[], /**< argument list */\n                             const uint32_t args_count) /**< argument number */\n{\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_count);\n  ecma_promise_all_executor_t *executor_p = (ecma_promise_all_executor_t *) ecma_get_object_from_value (function_obj);\n\n  /* 1 - 2. */\n  if (executor_p->index == 0)\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  /* 8. */\n  ecma_op_object_put_by_index (ecma_get_object_from_value (executor_p->values),\n                               (uint32_t) (executor_p->index - 1),\n                               args_p[0],\n                               false);\n  /* 3. */\n  executor_p->index = 0;\n\n  /* 9-10. */\n  ecma_value_t ret = ECMA_VALUE_UNDEFINED;\n  if (ecma_promise_remaining_inc_or_dec (executor_p->remaining_elements, false) == 0)\n  {\n    ecma_value_t capability = executor_p->capability;\n    ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) ecma_get_object_from_value (capability);\n    ret = ecma_op_function_call (ecma_get_object_from_value (capability_p->resolve),\n                                 ECMA_VALUE_UNDEFINED,\n                                 &executor_p->values,\n                                 1);\n  }\n\n  return ret;\n} /* ecma_promise_all_handler_cb */\n\n/**\n * GetCapabilitiesExecutor Functions\n *\n * Checks and sets a promiseCapability's resolve and reject properties.\n *\n * See also: ES11 25.6.1.5.1\n *\n * @return ECMA_VALUE_UNDEFINED or TypeError\n *         returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_get_capabilities_executor_cb (const ecma_value_t function_obj, /**< the function itself */\n                                      const ecma_value_t this_val, /**< this_arg of the function */\n                                      const ecma_value_t args_p[], /**< argument list */\n                                      const uint32_t args_count) /**< argument number */\n{\n  JERRY_UNUSED (this_val);\n\n  /* 1. */\n  ecma_promise_capability_executor_t *executor_p;\n  executor_p = (ecma_promise_capability_executor_t *) ecma_get_object_from_value (function_obj);\n\n  /* 2-3. */\n  ecma_object_t *capability_obj_p = ecma_get_object_from_value (executor_p->capability);\n  JERRY_ASSERT (ecma_object_class_is (capability_obj_p, LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY));\n  ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;\n\n  /* 4. */\n  if (!ecma_is_value_undefined (capability_p->resolve))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Resolve must be undefined\"));\n  }\n\n  /* 5. */\n  if (!ecma_is_value_undefined (capability_p->reject))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Reject must be undefined\"));\n  }\n\n  /* 6. */\n  capability_p->resolve = args_count > 0 ? args_p[0] : ECMA_VALUE_UNDEFINED;\n  /* 7. */\n  capability_p->reject = args_count > 1 ? args_p[1] : ECMA_VALUE_UNDEFINED;\n\n  /* 8. */\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_op_get_capabilities_executor_cb */\n\n/**\n * Create a new PromiseCapability.\n *\n * See also: ES11 25.6.1.5\n *\n * @return NULL - if the operation raises error\n *         new PromiseCapability object - otherwise\n */\necma_object_t *\necma_promise_new_capability (ecma_value_t constructor)\n{\n  /* 1. */\n  if (!ecma_is_constructor (constructor))\n  {\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid capability\"));\n    return NULL;\n  }\n\n  ecma_object_t *constructor_obj_p = ecma_get_object_from_value (constructor);\n\n  /* 3. */\n  ecma_object_t *capability_obj_p = ecma_create_object (ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE),\n                                                        sizeof (ecma_promise_capabality_t),\n                                                        ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;\n  capability_p->header.u.class_prop.class_id = LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY;\n  capability_p->header.u.class_prop.u.promise = ECMA_VALUE_UNDEFINED;\n  capability_p->resolve = ECMA_VALUE_UNDEFINED;\n  capability_p->reject = ECMA_VALUE_UNDEFINED;\n\n  /* 4-5. */\n  ecma_object_t *executor_p = ecma_op_create_native_handler (ECMA_NATIVE_HANDLER_PROMISE_CAPABILITY_EXECUTOR,\n                                                             sizeof (ecma_promise_capability_executor_t));\n\n  /* 6. */\n  ecma_promise_capability_executor_t *executor_func_p = (ecma_promise_capability_executor_t *) executor_p;\n  executor_func_p->capability = ecma_make_object_value (capability_obj_p);\n\n  /* 7. */\n  ecma_value_t executor = ecma_make_object_value (executor_p);\n  ecma_value_t promise = ecma_op_function_construct (constructor_obj_p,\n                                                     constructor_obj_p,\n                                                     &executor,\n                                                     1);\n  ecma_deref_object (executor_p);\n\n  if (ECMA_IS_VALUE_ERROR (promise))\n  {\n    ecma_deref_object (capability_obj_p);\n    return NULL;\n  }\n\n  /* 8. */\n  if (!ecma_op_is_callable (capability_p->resolve))\n  {\n    ecma_free_value (promise);\n    ecma_deref_object (capability_obj_p);\n    ecma_raise_type_error (ECMA_ERR_MSG (\"'resolve' parameter must be callable.\"));\n    return NULL;\n  }\n\n  /* 9. */\n  if (!ecma_op_is_callable (capability_p->reject))\n  {\n    ecma_free_value (promise);\n    ecma_deref_object (capability_obj_p);\n    ecma_raise_type_error (ECMA_ERR_MSG (\"'reject' parameter must be callable.\"));\n    return NULL;\n  }\n\n  /* 10. */\n  capability_p->header.u.class_prop.u.promise = promise;\n\n  ecma_free_value (promise);\n\n  /* 11. */\n  return capability_obj_p;\n} /* ecma_promise_new_capability */\n\n/**\n * The common function for 'reject' and 'resolve'.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_promise_reject_or_resolve (ecma_value_t this_arg, /**< \"this\" argument */\n                                ecma_value_t value, /**< rejected or resolved value */\n                                bool is_resolve) /**< the operation is resolve */\n{\n  if (!ecma_is_value_object (this_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not an object.\"));\n  }\n\n  if (is_resolve\n      && ecma_is_value_object (value)\n      && ecma_is_promise (ecma_get_object_from_value (value)))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (value);\n    ecma_value_t constructor = ecma_op_object_get_by_magic_id (object_p, LIT_MAGIC_STRING_CONSTRUCTOR);\n\n    if (ECMA_IS_VALUE_ERROR (constructor))\n    {\n      return constructor;\n    }\n\n    /* The this_arg must be an object. */\n    bool is_same_value = (constructor == this_arg);\n    ecma_free_value (constructor);\n\n    if (is_same_value)\n    {\n      return ecma_copy_value (value);\n    }\n  }\n\n  ecma_object_t *capability_obj_p = ecma_promise_new_capability (this_arg);\n\n  if (JERRY_UNLIKELY (capability_obj_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;\n\n  ecma_value_t func = is_resolve ? capability_p->resolve : capability_p->reject;\n\n  ecma_value_t call_ret = ecma_op_function_call (ecma_get_object_from_value (func),\n                                                 ECMA_VALUE_UNDEFINED,\n                                                 &value,\n                                                 1);\n\n  if (ECMA_IS_VALUE_ERROR (call_ret))\n  {\n    ecma_deref_object (capability_obj_p);\n    return call_ret;\n  }\n\n  ecma_free_value (call_ret);\n\n  ecma_value_t promise = ecma_copy_value (capability_p->header.u.class_prop.u.promise);\n  ecma_deref_object (capability_obj_p);\n\n  return promise;\n} /* ecma_promise_reject_or_resolve */\n\n/**\n * It performs the \"then\" operation on promiFulfilled\n * and onRejected as its settlement actions.\n *\n * See also: 25.4.5.3.1\n *\n * @return ecma value of the new promise object\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\necma_promise_do_then (ecma_value_t promise, /**< the promise which call 'then' */\n                      ecma_value_t on_fulfilled, /**< on_fulfilled function */\n                      ecma_value_t on_rejected, /**< on_rejected function */\n                      ecma_object_t *result_capability_obj_p) /**< promise capability */\n{\n  JERRY_ASSERT (ecma_object_class_is (result_capability_obj_p, LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY));\n\n  ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) result_capability_obj_p;\n\n  /* 3. boolean true indicates \"indentity\" */\n  if (!ecma_op_is_callable (on_fulfilled))\n  {\n    on_fulfilled = ECMA_VALUE_TRUE;\n  }\n\n  /* 4. boolean false indicates \"thrower\" */\n  if (!ecma_op_is_callable (on_rejected))\n  {\n    on_rejected = ECMA_VALUE_FALSE;\n  }\n\n  ecma_object_t *promise_obj_p = ecma_get_object_from_value (promise);\n  ecma_promise_object_t *promise_p = (ecma_promise_object_t *) promise_obj_p;\n\n  uint16_t flags = ecma_promise_get_flags (promise_obj_p);\n\n  if (flags & ECMA_PROMISE_IS_PENDING)\n  {\n    /* 7. */\n    /* [ capability, (on_fulfilled), (on_rejected) ] */\n    ecma_value_t reaction_values[3];\n    ecma_value_t *reactions_p = reaction_values + 1;\n\n    uint8_t tag = 0;\n\n    if (on_fulfilled != ECMA_VALUE_TRUE)\n    {\n      tag |= JMEM_FIRST_TAG_BIT_MASK;\n      *reactions_p++ = on_fulfilled;\n    }\n\n    if (on_rejected != ECMA_VALUE_FALSE)\n    {\n      tag |= JMEM_SECOND_TAG_BIT_MASK;\n      *reactions_p++ = on_rejected;\n    }\n\n    ECMA_SET_NON_NULL_POINTER_TAG (reaction_values[0], result_capability_obj_p, tag);\n\n    uint32_t value_count = (uint32_t) (reactions_p - reaction_values);\n    ecma_collection_append (promise_p->reactions, reaction_values, value_count);\n  }\n  else if (flags & ECMA_PROMISE_IS_FULFILLED)\n  {\n    /* 8. */\n    ecma_value_t value = ecma_promise_get_result (promise_obj_p);\n    ecma_enqueue_promise_reaction_job (ecma_make_object_value (result_capability_obj_p), on_fulfilled, value);\n    ecma_free_value (value);\n  }\n  else\n  {\n    /* 9. */\n    ecma_value_t reason = ecma_promise_get_result (promise_obj_p);\n    ecma_track_promise_rejection (promise_obj_p, JERRY_PROMISE_REJECTION_OPERATION_HANDLE);\n    ecma_enqueue_promise_reaction_job (ecma_make_object_value (result_capability_obj_p), on_rejected, reason);\n    ecma_free_value (reason);\n  }\n\n  /* ES11: 11. */\n  promise_p->header.u.class_prop.extra_info |= ECMA_PROMISE_HANDLED;\n\n  /* 10. */\n  return ecma_copy_value (capability_p->header.u.class_prop.u.promise);\n} /* ecma_promise_do_then */\n\n/**\n * The common function for ecma_builtin_promise_prototype_then\n * and ecma_builtin_promise_prototype_catch.\n *\n * @return ecma value of a new promise object.\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_promise_then (ecma_value_t promise, /**< the promise which call 'then' */\n                   ecma_value_t on_fulfilled, /**< on_fulfilled function */\n                   ecma_value_t on_rejected) /**< on_rejected function */\n{\n  if (!ecma_is_value_object (promise))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not an object.\"));\n  }\n\n  ecma_object_t *obj = ecma_get_object_from_value (promise);\n\n  if (!ecma_is_promise (obj))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a Promise.\"));\n  }\n\n  ecma_value_t species = ecma_op_species_constructor (obj, ECMA_BUILTIN_ID_PROMISE);\n  if (ECMA_IS_VALUE_ERROR (species))\n  {\n    return species;\n  }\n\n  ecma_object_t *result_capability_obj_p = ecma_promise_new_capability (species);\n  ecma_free_value (species);\n\n  if (JERRY_UNLIKELY (result_capability_obj_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t ret = ecma_promise_do_then (promise, on_fulfilled, on_rejected, result_capability_obj_p);\n  ecma_deref_object (result_capability_obj_p);\n\n  return ret;\n} /* ecma_promise_then */\n\n/**\n * Definition of valueThunk function\n *\n * See also:\n *         ES2020 25.6.5.3.1 step 8.\n *\n * @return ecma value\n */\necma_value_t\necma_value_thunk_helper_cb (const ecma_value_t function_obj, /**< the function itself */\n                            const ecma_value_t this_val, /**< this_arg of the function */\n                            const ecma_value_t args_p[], /**< argument list */\n                            const uint32_t args_count) /**< argument number */\n{\n  JERRY_UNUSED_3 (this_val, args_p, args_count);\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (function_obj);\n  ecma_promise_value_thunk_t *value_thunk_obj_p = (ecma_promise_value_thunk_t *) func_obj_p;\n\n  return ecma_copy_value (value_thunk_obj_p->value);\n} /* ecma_value_thunk_helper_cb */\n\n/**\n * Definition of thrower function\n *\n * See also:\n *         ES2020 25.6.5.3.2 step 8.\n *\n * @return ecma value\n */\necma_value_t\necma_value_thunk_thrower_cb (const ecma_value_t function_obj, /**< the function itself */\n                             const ecma_value_t this_val, /**< this_arg of the function */\n                             const ecma_value_t args_p[], /**< argument list */\n                             const uint32_t args_count) /**< argument number */\n{\n  JERRY_UNUSED_3 (this_val, args_p, args_count);\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (function_obj);\n  ecma_promise_value_thunk_t *value_thunk_obj_p = (ecma_promise_value_thunk_t *) func_obj_p;\n\n  jcontext_raise_exception (ecma_copy_value (value_thunk_obj_p->value));\n\n  return ECMA_VALUE_ERROR;\n} /* ecma_value_thunk_thrower_cb */\n\n/**\n * Helper function for Then Finally and Catch Finally common parts\n *\n * See also:\n *         ES2020 25.6.5.3.1\n *         ES2020 25.6.5.3.2\n *\n * @return ecma value\n */\nstatic ecma_value_t\necma_promise_then_catch_finally_helper (ecma_value_t function_obj,  /**< the function itself */\n                                        ecma_native_handler_id_t id, /**< handler id */\n                                        ecma_value_t arg) /**< callback function argument */\n{\n  /* 2. */\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (function_obj);\n  ecma_promise_finally_function_t *finally_func_obj = (ecma_promise_finally_function_t *) func_obj_p;\n\n  /* 3. */\n  JERRY_ASSERT (ecma_op_is_callable (finally_func_obj->on_finally));\n\n  /* 4. */\n  ecma_value_t result = ecma_op_function_call (ecma_get_object_from_value (finally_func_obj->on_finally),\n                                               ECMA_VALUE_UNDEFINED,\n                                               NULL,\n                                               0);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  /* 6. */\n  JERRY_ASSERT (ecma_is_constructor (finally_func_obj->constructor));\n\n  /* 7. */\n  ecma_value_t promise = ecma_promise_reject_or_resolve (finally_func_obj->constructor, result, true);\n\n  ecma_free_value (result);\n\n  if (ECMA_IS_VALUE_ERROR (promise))\n  {\n    return promise;\n  }\n\n  /* 8. */\n  ecma_object_t *value_thunk_func_p;\n  value_thunk_func_p = ecma_op_create_native_handler (id, sizeof (ecma_promise_value_thunk_t));\n\n  ecma_promise_value_thunk_t *value_thunk_func_obj = (ecma_promise_value_thunk_t *) value_thunk_func_p;\n  value_thunk_func_obj->value = ecma_copy_value_if_not_object (arg);\n\n  /* 9. */\n  ecma_value_t value_thunk = ecma_make_object_value (value_thunk_func_p);\n  ecma_value_t ret_value = ecma_op_invoke_by_magic_id (promise, LIT_MAGIC_STRING_THEN, &value_thunk, 1);\n\n  ecma_free_value (promise);\n  ecma_deref_object (value_thunk_func_p);\n\n  return ret_value;\n} /* ecma_promise_then_catch_finally_helper */\n\n/**\n * Definition of Then Finally Function\n *\n * See also:\n *         ES2020 25.6.5.3.1\n *\n * @return ecma value\n */\necma_value_t\necma_promise_then_finally_cb (const ecma_value_t function_obj, /**< the function itself */\n                              const ecma_value_t this_val, /**< this_arg of the function */\n                              const ecma_value_t args_p[], /**< argument list */\n                              const uint32_t args_count) /**< argument number */\n{\n  JERRY_UNUSED_2 (this_val, args_count);\n  JERRY_ASSERT (args_count > 0);\n\n  return ecma_promise_then_catch_finally_helper (function_obj, ECMA_NATIVE_HANDLER_VALUE_THUNK, args_p[0]);\n} /* ecma_promise_then_finally_cb */\n\n/**\n * Definition of Catch Finally Function\n *\n * See also:\n *         ES2020 25.6.5.3.2\n *\n * @return ecma value\n */\necma_value_t\necma_promise_catch_finally_cb (const ecma_value_t function_obj, /**< the function itself */\n                               const ecma_value_t this_val, /**< this_arg of the function */\n                               const ecma_value_t args_p[], /**< argument list */\n                               const uint32_t args_count) /**< argument number */\n{\n  JERRY_UNUSED_2 (this_val, args_count);\n  JERRY_ASSERT (args_count > 0);\n\n  return ecma_promise_then_catch_finally_helper (function_obj, ECMA_NATIVE_HANDLER_VALUE_THROWER, args_p[0]);\n} /* ecma_promise_catch_finally_cb */\n\n/**\n * The common function for ecma_builtin_promise_prototype_finally\n *\n * @return ecma value of a new promise object.\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_promise_finally (ecma_value_t promise, /**< the promise which call 'finally' */\n                      ecma_value_t on_finally) /**< on_finally function */\n{\n  /* 2. */\n  if (!ecma_is_value_object (promise))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not an object.\"));\n  }\n\n  ecma_object_t *obj = ecma_get_object_from_value (promise);\n\n  /* 3. */\n  ecma_value_t species = ecma_op_species_constructor (obj, ECMA_BUILTIN_ID_PROMISE);\n\n  if (ECMA_IS_VALUE_ERROR (species))\n  {\n    return species;\n  }\n\n  /* 4. */\n  JERRY_ASSERT (ecma_is_constructor (species));\n\n  /* 5. */\n  if (!ecma_op_is_callable (on_finally))\n  {\n    ecma_free_value (species);\n    ecma_value_t invoke_args[2] = {on_finally, on_finally};\n    return ecma_op_invoke_by_magic_id (promise, LIT_MAGIC_STRING_THEN, invoke_args, 2);\n  }\n\n  /* 6.a-b */\n  ecma_object_t *then_finally_obj_p;\n  then_finally_obj_p = ecma_op_create_native_handler (ECMA_NATIVE_HANDLER_PROMISE_THEN_FINALLY,\n                                                      sizeof (ecma_promise_finally_function_t));\n\n  /* 6.c-d */\n  ecma_promise_finally_function_t *then_finally_func_obj_p = (ecma_promise_finally_function_t *) then_finally_obj_p;\n  then_finally_func_obj_p->constructor = species;\n  then_finally_func_obj_p->on_finally = on_finally;\n\n  /* 6.e-f */\n  ecma_object_t *catch_finally_obj_p;\n  catch_finally_obj_p = ecma_op_create_native_handler (ECMA_NATIVE_HANDLER_PROMISE_CATCH_FINALLY,\n                                                       sizeof (ecma_promise_finally_function_t));\n\n  /* 6.g-h */\n  ecma_promise_finally_function_t *catch_finally_func_obj = (ecma_promise_finally_function_t *) catch_finally_obj_p;\n  catch_finally_func_obj->constructor = species;\n  catch_finally_func_obj->on_finally = on_finally;\n\n  ecma_deref_object (ecma_get_object_from_value (species));\n\n  /* 7. */\n  ecma_value_t invoke_args[2] =\n  {\n    ecma_make_object_value (then_finally_obj_p),\n    ecma_make_object_value (catch_finally_obj_p)\n  };\n\n  ecma_value_t ret_value = ecma_op_invoke_by_magic_id (promise, LIT_MAGIC_STRING_THEN, invoke_args, 2);\n\n  ecma_deref_object (then_finally_obj_p);\n  ecma_deref_object (catch_finally_obj_p);\n\n  return ret_value;\n} /* ecma_promise_finally */\n\n/**\n * Resume the execution of an async function after the promise is resolved\n */\nvoid\necma_promise_async_then (ecma_value_t promise, /**< promise object */\n                         ecma_value_t executable_object) /**< executable object of the async function */\n{\n  ecma_object_t *promise_obj_p = ecma_get_object_from_value (promise);\n  uint16_t flags = ecma_promise_get_flags (promise_obj_p);\n\n  if (flags & ECMA_PROMISE_IS_PENDING)\n  {\n    ecma_value_t executable_object_with_tag;\n    ECMA_SET_NON_NULL_POINTER_TAG (executable_object_with_tag, ecma_get_object_from_value (executable_object), 0);\n    ECMA_SET_THIRD_BIT_TO_POINTER_TAG (executable_object_with_tag);\n\n    ecma_collection_push_back (((ecma_promise_object_t *) promise_obj_p)->reactions, executable_object_with_tag);\n    return;\n  }\n\n  ecma_value_t value = ecma_promise_get_result (promise_obj_p);\n  ecma_enqueue_promise_async_reaction_job (executable_object, value, !(flags & ECMA_PROMISE_IS_FULFILLED));\n  ecma_free_value (value);\n} /* ecma_promise_async_then */\n\n/**\n * Resolves the value and resume the execution of an async function after the resolve is completed\n *\n * @return ECMA_VALUE_UNDEFINED if not error is occured, an error otherwise\n */\necma_value_t\necma_promise_async_await (ecma_extended_object_t *async_generator_object_p, /**< async generator function */\n                          ecma_value_t value) /**< value to be resolved (takes the reference) */\n{\n  ecma_value_t promise = ecma_make_object_value (ecma_builtin_get (ECMA_BUILTIN_ID_PROMISE));\n  ecma_value_t result = ecma_promise_reject_or_resolve (promise, value, true);\n\n  ecma_free_value (value);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  ecma_promise_async_then (result, ecma_make_object_value ((ecma_object_t *) async_generator_object_p));\n  ecma_free_value (result);\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_promise_async_await */\n\n/**\n * @}\n * @}\n */\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-promise-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_PROMISE_OBJECT_H\n#define ECMA_PROMISE_OBJECT_H\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaarraybufferobject ECMA ArrayBuffer object related routines\n * @{\n */\n\n/**\n * The PromiseState of promise object.\n */\ntypedef enum\n{\n  ECMA_PROMISE_IS_PENDING = (1 << 0), /**< pending state */\n  ECMA_PROMISE_IS_FULFILLED = (1 << 1), /**< fulfilled state */\n  ECMA_PROMISE_ALREADY_RESOLVED = (1 << 2), /**< already resolved */\n  ECMA_PROMISE_HANDLED = (1 << 3), /**< ES11: 25.6.6 [[PromiseIsHandled]] internal slot */\n} ecma_promise_flags_t;\n\n/**\n * Indicates the type of the executor in promise construct.\n */\ntypedef enum\n{\n  ECMA_PROMISE_EXECUTOR_FUNCTION, /**< the executor is a function, it is for the usual constructor */\n  ECMA_PROMISE_EXECUTOR_EMPTY /**< the executor is empty, it is for external C API */\n} ecma_promise_executor_type_t;\n\n/**\n * Description of a promise resolving function.\n */\ntypedef struct\n{\n  ecma_extended_object_t header;\n  ecma_value_t promise;\n} ecma_promise_resolver_t;\n\n/**\n * Description of the promise object.\n * It need more space than normal object to store builtin properties.\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< extended object part */\n  ecma_collection_t *reactions; /**< list of promise reactions */\n  ecma_value_t resolve; /**< resolve function */\n  ecma_value_t reject; /**< reject function */\n} ecma_promise_object_t;\n\n/**\n * Description of the finally function object\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< extended object part */\n  ecma_value_t constructor; /**< [[Constructor]] internal slot */\n  ecma_value_t on_finally; /**< [[OnFinally]] internal slot */\n} ecma_promise_finally_function_t;\n\n/**\n * Description of the thunk function object\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< extended object part */\n  ecma_value_t value; /**< value thunk */\n} ecma_promise_value_thunk_t;\n\n/* The Promise reaction is a compressed structure, where each item can\n * be a sequence of up to three ecma object values as seen below:\n *\n * [ Capability ][ Optional fullfilled callback ][ Optional rejected callback ]\n * [ Async function callback ]\n *\n * The first member is an object, which lower bits specify the type of the reaction:\n *   bit 2 is not set: callback reactions\n *     The first two objects specify the resolve/reject functions of the promise\n *     returned by the `then` operation which can be used to chain event handlers.\n *\n *     bit 0: has a fullfilled callback\n *     bit 1: has a rejected callback\n *\n *   bit 2 is set: async function callback\n */\n\nbool ecma_is_promise (ecma_object_t *obj_p);\necma_value_t ecma_op_create_promise_object (ecma_value_t executor, ecma_promise_executor_type_t type);\nuint16_t ecma_promise_get_flags (ecma_object_t *promise_p);\necma_value_t ecma_promise_get_result (ecma_object_t *promise_p);\nvoid ecma_reject_promise (ecma_value_t promise, ecma_value_t reason);\nvoid ecma_fulfill_promise (ecma_value_t promise, ecma_value_t value);\necma_object_t *ecma_promise_new_capability (ecma_value_t constructor);\necma_value_t ecma_promise_reject_or_resolve (ecma_value_t this_arg, ecma_value_t value, bool is_resolve);\necma_value_t ecma_promise_then (ecma_value_t promise, ecma_value_t on_fulfilled, ecma_value_t on_rejected);\necma_value_t ecma_value_thunk_helper_cb (const ecma_value_t function_obj,\n                                         const ecma_value_t this_val,\n                                         const ecma_value_t args_p[],\n                                         const uint32_t args_count);\necma_value_t ecma_value_thunk_thrower_cb (const ecma_value_t function_obj,\n                                          const ecma_value_t this_val,\n                                          const ecma_value_t args_p[],\n                                          const uint32_t args_count);\necma_value_t ecma_promise_then_finally_cb (const ecma_value_t function_obj,\n                                           const ecma_value_t this_val,\n                                           const ecma_value_t args_p[],\n                                           const uint32_t args_count);\necma_value_t ecma_promise_catch_finally_cb (const ecma_value_t function_obj,\n                                            const ecma_value_t this_val,\n                                            const ecma_value_t args_p[],\n                                            const uint32_t args_count);\necma_value_t\necma_promise_reject_handler (const ecma_value_t function,\n                             const ecma_value_t this_arg,\n                             const ecma_value_t argv[],\n                             const uint32_t argc);\necma_value_t\necma_promise_resolve_handler (const ecma_value_t function,\n                              const ecma_value_t this_arg,\n                              const ecma_value_t argv[],\n                              const uint32_t argc);\n\necma_value_t ecma_promise_finally (ecma_value_t promise, ecma_value_t on_finally);\nvoid ecma_promise_async_then (ecma_value_t promise, ecma_value_t executable_object);\necma_value_t ecma_promise_async_await (ecma_extended_object_t *async_generator_object_p, ecma_value_t value);\nvoid ecma_promise_create_resolving_functions (ecma_promise_object_t *object_p);\n\nuint32_t ecma_promise_remaining_inc_or_dec (ecma_value_t remaining, bool is_inc);\necma_value_t ecma_promise_all_handler_cb (const ecma_value_t function_obj, const ecma_value_t this_val,\n                                          const ecma_value_t args_p[], const uint32_t args_count);\n\necma_value_t ecma_op_get_capabilities_executor_cb (const ecma_value_t function_obj, const ecma_value_t this_val,\n                                                   const ecma_value_t args_p[], const uint32_t args_count);\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n#endif /* !ECMA_PROMISE_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-proxy-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-handlers.h\"\n#include \"ecma-builtin-object.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-proxy-object.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaproxyobject ECMA Proxy object related routines\n * @{\n */\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n/**\n * ProxyCreate operation for create a new proxy object\n *\n * See also:\n *         ES2015 9.5.15\n *         ES11+: 9.5.14 ProxyCreate\n *\n * @return created Proxy object as an ecma-value - if success\n *         raised error - otherwise\n */\necma_object_t *\necma_proxy_create (ecma_value_t target, /**< proxy target */\n                   ecma_value_t handler) /**< proxy handler */\n{\n  /* ES2015: 1, 3. */\n  /* ES11+: 1 - 2. */\n  if (!ecma_is_value_object (target) || !ecma_is_value_object (handler))\n  {\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot create proxy with a non-object target or handler\"));\n    return NULL;\n  }\n\n  /* ES2015: 5 - 6. */\n  /* ES11+: 3 - 4. */\n  /* A Proxy does not have [[Prototype]] value as per standard */\n  ecma_object_t *obj_p = ecma_create_object (NULL, sizeof (ecma_proxy_object_t), ECMA_OBJECT_TYPE_PROXY);\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* ES2015: 7. */\n  /* ES11+: 5. */\n  if (ecma_op_is_callable (target))\n  {\n    ECMA_SET_FIRST_BIT_TO_POINTER_TAG (obj_p->u2.prototype_cp);\n\n    /* ES2015: 7.b. */\n    /* ES11+: 5.b. */\n    if (ecma_is_constructor (target))\n    {\n      ECMA_SET_SECOND_BIT_TO_POINTER_TAG (obj_p->u2.prototype_cp);\n    }\n  }\n\n  /* ES2015: 8. */\n  /* ES11+: 6. */\n  proxy_obj_p->target = target;\n\n  /* ES2015: 9. */\n  /* ES11+: 7. */\n  proxy_obj_p->handler = handler;\n\n  /* ES2015: 10. */\n  /* ES11+: 8 */\n  return obj_p;\n} /* ecma_proxy_create */\n\n/**\n * Definition of Proxy Revocation Function\n *\n * See also:\n *         ES2015 26.2.2.1.1\n *\n * @return ECMA_VALUE_UNDEFINED\n */\necma_value_t\necma_proxy_revoke_cb (const ecma_value_t function_obj, /**< the function itself */\n                      const ecma_value_t this_val, /**< this_arg of the function */\n                      const ecma_value_t args_p[], /**< argument list */\n                      const uint32_t args_count) /**< argument number */\n{\n  JERRY_UNUSED_3 (this_val, args_p, args_count);\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (function_obj);\n\n  /* 1. */\n  ecma_revocable_proxy_object_t *rev_proxy_p = (ecma_revocable_proxy_object_t *) func_obj_p;\n\n  /* 2. */\n  if (ecma_is_value_null (rev_proxy_p->proxy))\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  /* 4. */\n  ecma_proxy_object_t *proxy_p = (ecma_proxy_object_t *) ecma_get_object_from_value (rev_proxy_p->proxy);\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY ((ecma_object_t *) proxy_p));\n\n  /* 3. */\n  rev_proxy_p->proxy = ECMA_VALUE_NULL;\n\n  /* 5. */\n  proxy_p->target = ECMA_VALUE_NULL;\n\n  /* 6. */\n  proxy_p->handler = ECMA_VALUE_NULL;\n\n  /* 7. */\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_proxy_revoke_cb */\n\n/**\n * Proxy.revocable operation for create a new revocable proxy object\n *\n * See also:\n *         ES2015 26.2.2.1\n *\n * @return NULL - if the operation fails\n *         pointer to the newly created revocable proxy object - otherwise\n */\necma_object_t *\necma_proxy_create_revocable (ecma_value_t target, /**< target argument */\n                             ecma_value_t handler) /**< handler argument */\n{\n  /* 1. */\n  ecma_object_t *proxy_p = ecma_proxy_create (target, handler);\n\n  /* 2. */\n  if (proxy_p == NULL)\n  {\n    return proxy_p;\n  }\n\n  ecma_value_t proxy_value = ecma_make_object_value (proxy_p);\n\n  /* 3. */\n  ecma_object_t *func_obj_p;\n  func_obj_p = ecma_op_create_native_handler (ECMA_NATIVE_HANDLER_PROXY_REVOKE,\n                                              sizeof (ecma_revocable_proxy_object_t));\n\n  /* 4. */\n  ecma_revocable_proxy_object_t *rev_proxy_p = (ecma_revocable_proxy_object_t *) func_obj_p;\n  rev_proxy_p->proxy = proxy_value;\n\n  ecma_property_value_t *prop_value_p;\n  ecma_value_t revoker = ecma_make_object_value (func_obj_p);\n\n  /* 5. */\n  ecma_object_t *obj_p = ecma_create_object (ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE),\n                                             0,\n                                             ECMA_OBJECT_TYPE_GENERAL);\n\n  /* 6. */\n  prop_value_p = ecma_create_named_data_property (obj_p,\n                                                  ecma_get_magic_string (LIT_MAGIC_STRING_PROXY),\n                                                  ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                  NULL);\n  prop_value_p->value = proxy_value;\n\n  /* 7. */\n  prop_value_p = ecma_create_named_data_property (obj_p,\n                                                  ecma_get_magic_string (LIT_MAGIC_STRING_REVOKE),\n                                                  ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                  NULL);\n  prop_value_p->value = revoker;\n\n  ecma_deref_object (proxy_p);\n  ecma_deref_object (func_obj_p);\n\n  /* 8. */\n  return obj_p;\n} /* ecma_proxy_create_revocable */\n\n/**\n * Internal find property operation for Proxy object\n *\n * Note: Returned value must be freed with ecma_free_value.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_NOT_FOUND - if the property is not found\n *         value of the property - otherwise\n */\necma_value_t\necma_proxy_object_find (ecma_object_t *obj_p, /**< proxy object */\n                        ecma_string_t *prop_name_p) /**< property name */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  ecma_value_t has_result = ecma_proxy_object_has (obj_p, prop_name_p);\n\n  if (ECMA_IS_VALUE_ERROR (has_result))\n  {\n    return has_result;\n  }\n\n  if (ecma_is_value_false (has_result))\n  {\n    return ECMA_VALUE_NOT_FOUND;\n  }\n\n  return ecma_proxy_object_get (obj_p, prop_name_p, ecma_make_object_value (obj_p));\n} /* ecma_proxy_object_find */\n\n/**\n * Helper method for validate the proxy object\n *\n * @return proxy trap - if the validation is successful\n *         ECMA_VALUE_ERROR - otherwise\n */\nstatic ecma_value_t\necma_validate_proxy_object (ecma_value_t handler, /**< proxy handler */\n                            lit_magic_string_id_t magic_id) /**< routine magic id */\n{\n  if (ecma_is_value_null (handler))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Handler can not be null\"));\n  }\n\n  JERRY_ASSERT (ecma_is_value_object (handler));\n\n  return ecma_op_get_method_by_magic_id (handler, magic_id);\n} /* ecma_validate_proxy_object */\n\n/* Interal operations */\n\n/**\n * The Proxy object [[GetPrototypeOf]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.1\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_NULL or valid object (prototype) otherwise\n */\necma_value_t\necma_proxy_object_get_prototype_of (ecma_object_t *obj_p) /**< proxy object */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 1. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 2-5. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_GET_PROTOTYPE_OF_UL);\n\n  /* 6. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 7. */\n  if (ecma_is_value_undefined (trap))\n  {\n    return ecma_builtin_object_object_get_prototype_of (target_obj_p);\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n\n  /* 8. */\n  ecma_value_t handler_proto = ecma_op_function_call (func_obj_p, handler, &target, 1);\n\n  ecma_deref_object (func_obj_p);\n\n  /* 9. */\n  if (ECMA_IS_VALUE_ERROR (handler_proto))\n  {\n    return handler_proto;\n  }\n\n  /* 10. */\n  if (!ecma_is_value_object (handler_proto) && !ecma_is_value_null (handler_proto))\n  {\n    ecma_free_value (handler_proto);\n\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned neither object nor null.\"));\n  }\n\n  /* 11. */\n  ecma_value_t extensible_target = ecma_builtin_object_object_is_extensible (target_obj_p);\n\n  /* 12. */\n  if (ECMA_IS_VALUE_ERROR (extensible_target))\n  {\n    ecma_free_value (handler_proto);\n\n    return extensible_target;\n  }\n\n  /* 13. */\n  if (ecma_is_value_true (extensible_target))\n  {\n    return handler_proto;\n  }\n\n  /* 14. */\n  ecma_value_t target_proto = ecma_builtin_object_object_get_prototype_of (target_obj_p);\n\n  /* 15. */\n  if (ECMA_IS_VALUE_ERROR (target_proto))\n  {\n    return target_proto;\n  }\n\n  ecma_value_t ret_value = handler_proto;\n\n  /* 16. */\n  if (handler_proto != target_proto)\n  {\n    ecma_free_value (handler_proto);\n\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Proxy target is non-extensible, but the trap did not \"\n                                                     \"return its actual prototype.\"));\n  }\n\n  ecma_free_value (target_proto);\n\n  /* 17. */\n  return ret_value;\n} /* ecma_proxy_object_get_prototype_of */\n\n/**\n * The Proxy object [[SetPrototypeOf]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.2\n *\n * Note: Returned value is always a simple value so freeing it is unnecessary.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE/FALSE} - depends on whether the new prototype can be set for the given object\n */\necma_value_t\necma_proxy_object_set_prototype_of (ecma_object_t *obj_p, /**< proxy object */\n                                    ecma_value_t proto) /**< new prototype object */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  /* 1. */\n  JERRY_ASSERT (ecma_is_value_object (proto) || ecma_is_value_null (proto));\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 2. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 3-6. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_SET_PROTOTYPE_OF_UL);\n\n  /* 7.*/\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 8. */\n  if (ecma_is_value_undefined (trap))\n  {\n    if (ECMA_OBJECT_IS_PROXY (target_obj_p))\n    {\n      return ecma_proxy_object_set_prototype_of (target_obj_p, proto);\n    }\n\n    return ecma_op_ordinary_object_set_prototype_of (target_obj_p, proto);\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n  ecma_value_t args[] = { target, proto };\n\n  /* 9. */\n  ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, args, 2);\n\n  ecma_deref_object (func_obj_p);\n\n  /* 10. */\n  if (ECMA_IS_VALUE_ERROR (trap_result))\n  {\n    return trap_result;\n  }\n\n  bool boolean_trap_result = ecma_op_to_boolean (trap_result);\n\n  ecma_free_value (trap_result);\n\n  /* 11. */\n  ecma_value_t extensible_target = ecma_builtin_object_object_is_extensible (target_obj_p);\n\n  /* 12. */\n  if (ECMA_IS_VALUE_ERROR (extensible_target))\n  {\n    return extensible_target;\n  }\n\n  /* 13. */\n  if (ecma_is_value_true (extensible_target))\n  {\n    return ecma_make_boolean_value (boolean_trap_result);\n  }\n\n  /* 14. */\n  ecma_value_t target_proto = ecma_builtin_object_object_get_prototype_of (target_obj_p);\n\n  /* 15. */\n  if (ECMA_IS_VALUE_ERROR (target_proto))\n  {\n    return target_proto;\n  }\n\n  ecma_value_t ret_value = ecma_make_boolean_value (boolean_trap_result);\n\n  /* 16. */\n  if (boolean_trap_result && (target_proto != proto))\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Target object is non-extensible and trap \"\n                                                     \"returned different prototype.\"));\n  }\n\n  ecma_free_value (target_proto);\n\n  /* 17. */\n  return ret_value;\n} /* ecma_proxy_object_set_prototype_of */\n\n/**\n * The Proxy object [[isExtensible]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.3\n *\n * Note: Returned value is always a simple value so freeing it is unnecessary.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE/FALSE} - depends on whether the object is extensible\n */\necma_value_t\necma_proxy_object_is_extensible (ecma_object_t *obj_p) /**< proxy object */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 1. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 2-5. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_IS_EXTENSIBLE);\n\n  /* 6. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 7. */\n  if (ecma_is_value_undefined (trap))\n  {\n    return ecma_builtin_object_object_is_extensible (target_obj_p);\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n\n  /* 8. */\n  ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, &target, 1);\n\n  ecma_deref_object (func_obj_p);\n\n  /* 9. */\n  if (ECMA_IS_VALUE_ERROR (trap_result))\n  {\n    return trap_result;\n  }\n\n  bool boolean_trap_result = ecma_op_to_boolean (trap_result);\n\n  ecma_free_value (trap_result);\n\n  bool target_result;\n\n  /* 10. */\n  if (ECMA_OBJECT_IS_PROXY (target_obj_p))\n  {\n    ecma_value_t proxy_is_ext = ecma_proxy_object_is_extensible (target_obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (proxy_is_ext))\n    {\n      return proxy_is_ext;\n    }\n\n    target_result = ecma_is_value_true (proxy_is_ext);\n  }\n  else\n  {\n    target_result = ecma_op_ordinary_object_is_extensible (target_obj_p);\n  }\n\n  /* 12. */\n  if (boolean_trap_result != target_result)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Trap result does not reflect extensibility of proxy target\"));\n  }\n\n  return ecma_make_boolean_value (boolean_trap_result);\n} /* ecma_proxy_object_is_extensible */\n\n/**\n * The Proxy object [[PreventExtensions]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.4\n *\n * Note: Returned value is always a simple value so freeing it is unnecessary.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE/FALSE} - depends on whether the object can be set as inextensible\n */\necma_value_t\necma_proxy_object_prevent_extensions (ecma_object_t *obj_p) /**< proxy object */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 1. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 2-5. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_PREVENT_EXTENSIONS_UL);\n\n  /* 6. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 7. */\n  if (ecma_is_value_undefined (trap))\n  {\n    ecma_value_t ret_value = ecma_builtin_object_object_prevent_extensions (target_obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      return ret_value;\n    }\n\n    ecma_deref_object (target_obj_p);\n\n    return ECMA_VALUE_TRUE;\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n\n  /* 8. */\n  ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, &target, 1);\n\n  ecma_deref_object (func_obj_p);\n\n  /* 9. */\n  if (ECMA_IS_VALUE_ERROR (trap_result))\n  {\n    return trap_result;\n  }\n\n  bool boolean_trap_result = ecma_op_to_boolean (trap_result);\n\n  ecma_free_value (trap_result);\n\n  /* 10. */\n  if (boolean_trap_result)\n  {\n    ecma_value_t target_is_ext = ecma_builtin_object_object_is_extensible (target_obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (target_is_ext))\n    {\n      return target_is_ext;\n    }\n\n    if (ecma_is_value_true (target_is_ext))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Trap result does not reflect inextensibility of proxy target\"));\n    }\n  }\n\n  /* 11. */\n  return ecma_make_boolean_value (boolean_trap_result);\n} /* ecma_proxy_object_prevent_extensions */\n\n/**\n * The Proxy object [[GetOwnProperty]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.5\n *\n * Note: - Returned value is always a simple value so freeing it is unnecessary.\n *       - If the operation does not fail, freeing the filled property descriptor is the caller's responsibility\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE_FALSE} - depends on whether object has property with the given name\n */\necma_value_t\necma_proxy_object_get_own_property_descriptor (ecma_object_t *obj_p, /**< proxy object */\n                                               ecma_string_t *prop_name_p, /**< property name */\n                                               ecma_property_descriptor_t *prop_desc_p) /**< [out] property\n                                                                                         *   descriptor */\n{\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 2. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 3-6. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL);\n\n  ecma_value_t target = proxy_obj_p->target;\n\n  /* 7. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 8. */\n  if (ecma_is_value_undefined (trap))\n  {\n    return ecma_op_object_get_own_property_descriptor (target_obj_p, prop_name_p, prop_desc_p);\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n  ecma_value_t prop_value = ecma_make_prop_name_value (prop_name_p);\n  ecma_value_t args[] = { target, prop_value };\n\n  /* 9. */\n  ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, args, 2);\n  ecma_deref_object (func_obj_p);\n\n  /* 10. */\n  if (ECMA_IS_VALUE_ERROR (trap_result))\n  {\n    return trap_result;\n  }\n\n  /* 11. */\n  if (!ecma_is_value_object (trap_result) && !ecma_is_value_undefined (trap_result))\n  {\n    ecma_free_value (trap_result);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Trap is not object nor undefined.\"));\n  }\n\n  /* 12. */\n  ecma_property_descriptor_t target_desc;\n  ecma_value_t target_status = ecma_op_object_get_own_property_descriptor (target_obj_p, prop_name_p, &target_desc);\n\n  /* 13. */\n  if (ECMA_IS_VALUE_ERROR (target_status))\n  {\n    ecma_free_value (trap_result);\n    return target_status;\n  }\n\n  /* 14. */\n  if (ecma_is_value_undefined (trap_result))\n  {\n    /* .a */\n    if (ecma_is_value_false (target_status))\n    {\n      return ECMA_VALUE_FALSE;\n    }\n    /* .b */\n    if (!(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE))\n    {\n      ecma_free_property_descriptor (&target_desc);\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Given property is a non-configurable\"\n                                                  \" data property on the proxy target\"));\n    }\n\n    /* .c */\n    ecma_free_property_descriptor (&target_desc);\n    ecma_value_t extensible_target = ecma_builtin_object_object_is_extensible (target_obj_p);\n\n    /* .d */\n    if (ECMA_IS_VALUE_ERROR (extensible_target))\n    {\n      return extensible_target;\n    }\n\n    /* .e */\n    JERRY_ASSERT (ecma_is_value_boolean (extensible_target));\n\n    /* .f */\n    if (ecma_is_value_false (extensible_target))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Target not extensible.\"));\n    }\n\n    /* .g */\n    return ECMA_VALUE_FALSE;\n  }\n\n  /* 15. */\n  ecma_value_t extensible_target = ecma_builtin_object_object_is_extensible (target_obj_p);\n\n  /* 16. */\n  if (ECMA_IS_VALUE_ERROR (extensible_target))\n  {\n    if (ecma_is_value_true (target_status))\n    {\n      ecma_free_property_descriptor (&target_desc);\n    }\n    ecma_free_value (trap_result);\n    return extensible_target;\n  }\n\n  /* 17, 19 */\n  ecma_value_t result_val = ecma_op_to_property_descriptor (trap_result, prop_desc_p);\n\n  ecma_op_to_complete_property_descriptor (prop_desc_p);\n  ecma_free_value (trap_result);\n\n  /* 18. */\n  if (ECMA_IS_VALUE_ERROR (result_val))\n  {\n    if (ecma_is_value_true (target_status))\n    {\n      ecma_free_property_descriptor (&target_desc);\n    }\n    return result_val;\n  }\n\n  /* 20. */\n  bool is_extensible = ecma_is_value_true (extensible_target);\n\n  bool is_valid = ecma_op_is_compatible_property_descriptor (prop_desc_p,\n                                                             (ecma_is_value_true (target_status) ? &target_desc : NULL),\n                                                             is_extensible);\n\n  bool target_has_desc = ecma_is_value_true (target_status);\n  bool target_is_writable = (target_desc.flags & ECMA_PROP_IS_WRITABLE) ;\n  bool target_is_configurable = false;\n\n  if (target_has_desc)\n  {\n    target_is_configurable = ((target_desc.flags & ECMA_PROP_IS_CONFIGURABLE) != 0);\n    ecma_free_property_descriptor (&target_desc);\n  }\n\n  /* 21. */\n  if (!is_valid)\n  {\n    ecma_free_property_descriptor (prop_desc_p);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"The two descriptors are not compatible.\"));\n  }\n\n  /* 22. */\n  else if (!(prop_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE))\n  {\n    if (!target_has_desc || target_is_configurable)\n    {\n      ecma_free_property_descriptor (prop_desc_p);\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Not compatible.\"));\n    }\n\n    /* ES11: 17.b */\n    if ((prop_desc_p->flags & (ECMA_PROP_IS_WRITABLE_DEFINED | ECMA_PROP_IS_WRITABLE)) == ECMA_PROP_IS_WRITABLE_DEFINED\n        && target_is_writable)\n    {\n      ecma_free_property_descriptor (prop_desc_p);\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Not compatible.\"));\n    }\n  }\n  return ECMA_VALUE_TRUE;\n} /* ecma_proxy_object_get_own_property_descriptor */\n\n/**\n * The Proxy object [[DefineOwnProperty]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.6\n *\n * Note: Returned value is always a simple value so freeing it is unnecessary.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE_FALSE} - depends on whether the property can be defined for the given object\n */\necma_value_t\necma_proxy_object_define_own_property (ecma_object_t *obj_p, /**< proxy object */\n                                       ecma_string_t *prop_name_p, /**< property name */\n                                       const ecma_property_descriptor_t *prop_desc_p) /**< property descriptor */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 2. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 3-6. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_DEFINE_PROPERTY_UL);\n\n  /* 7. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 8. */\n  if (ecma_is_value_undefined (trap))\n  {\n    return ecma_op_object_define_own_property (target_obj_p, prop_name_p, prop_desc_p);\n  }\n\n  /* 9. */\n  ecma_object_t *desc_obj = ecma_op_from_property_descriptor (prop_desc_p);\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n  ecma_value_t prop_value = ecma_make_prop_name_value (prop_name_p);\n  ecma_value_t desc_obj_value = ecma_make_object_value (desc_obj);\n  ecma_value_t args[] = {target, prop_value, desc_obj_value};\n\n  /* 10. */\n  ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, args, 3);\n\n  ecma_deref_object (func_obj_p);\n  ecma_deref_object (desc_obj);\n\n  /* 11. */\n  if (ECMA_IS_VALUE_ERROR (trap_result))\n  {\n    return trap_result;\n  }\n\n  bool boolean_trap_result = ecma_op_to_boolean (trap_result);\n\n  ecma_free_value (trap_result);\n\n  /* 12. */\n  if (!boolean_trap_result)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  /* 13. */\n  ecma_property_descriptor_t target_desc;\n\n  ecma_value_t status = ecma_op_object_get_own_property_descriptor (target_obj_p, prop_name_p, &target_desc);\n\n  /* 14. */\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    return status;\n  }\n\n  bool target_prop_found = ecma_is_value_true (status);\n\n  /* 15. */\n  ecma_value_t extensible_target = ecma_builtin_object_object_is_extensible (target_obj_p);\n\n  bool is_target_ext = ecma_is_value_true (extensible_target);\n\n  /* 16. */\n  if (ECMA_IS_VALUE_ERROR (extensible_target))\n  {\n    if (target_prop_found)\n    {\n      ecma_free_property_descriptor (&target_desc);\n    }\n\n    return extensible_target;\n  }\n\n  /* 17. */\n  bool setting_config_false = ((prop_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE_DEFINED)\n                                && !(prop_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE));\n\n  /* 19. */\n  if (!target_prop_found)\n  {\n    if (!is_target_ext)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned truish for adding property \"\n                                                  \"to the non-extensible target\"));\n    }\n\n    if (setting_config_false)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned truish for defining non-configurable property \"\n                                                  \"which is non-existent in the target\"));\n    }\n  }\n  /* 20. */\n  else\n  {\n    ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n    if (!ecma_op_is_compatible_property_descriptor (prop_desc_p, &target_desc, is_target_ext))\n    {\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned truish for adding property that is \"\n                                                       \"incompatible with the existing property in the target\"));\n    }\n    else if (setting_config_false && (target_desc.flags & ECMA_PROP_IS_CONFIGURABLE))\n    {\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned truish for defining non-configurable property \"\n                                                       \"which is configurable in the target\"));\n    }\n    /* ES11: 16.c */\n    else if ((target_desc.flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED)) != 0\n             && (prop_desc_p->flags & (ECMA_PROP_IS_WRITABLE_DEFINED | ECMA_PROP_IS_WRITABLE))\n                 == ECMA_PROP_IS_WRITABLE_DEFINED\n             && (target_desc.flags & (ECMA_PROP_IS_WRITABLE | ECMA_PROP_IS_CONFIGURABLE)) == ECMA_PROP_IS_WRITABLE)\n\n    {\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned truish for defining non-configurable property \"\n                                                       \"which is configurable in the target\"));\n    }\n\n    ecma_free_property_descriptor (&target_desc);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      return ret_value;\n    }\n  }\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_proxy_object_define_own_property */\n\n/**\n * The Proxy object [[HasProperty]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.7\n *\n * Note: Returned value is always a simple value so freeing it is unnecessary.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE_FALSE} - depends on whether the property is found\n */\necma_value_t\necma_proxy_object_has (ecma_object_t *obj_p, /**< proxy object */\n                       ecma_string_t *prop_name_p) /**< property name */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n  ECMA_CHECK_STACK_USAGE ();\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 2. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 3-6. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_HAS);\n\n  /* 7. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 8. */\n  if (ecma_is_value_undefined (trap))\n  {\n    return ecma_op_object_has_property (target_obj_p, prop_name_p);\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n  ecma_value_t prop_value = ecma_make_prop_name_value (prop_name_p);\n  ecma_value_t args[] = {target, prop_value};\n\n  /* 9. */\n  ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, args, 2);\n\n  ecma_deref_object (func_obj_p);\n\n  /* 10. */\n  if (ECMA_IS_VALUE_ERROR (trap_result))\n  {\n    return trap_result;\n  }\n\n  bool boolean_trap_result = ecma_op_to_boolean (trap_result);\n\n  ecma_free_value (trap_result);\n\n  /* 11. */\n  if (!boolean_trap_result)\n  {\n    ecma_property_descriptor_t target_desc;\n\n    ecma_value_t status = ecma_op_object_get_own_property_descriptor (target_obj_p, prop_name_p, &target_desc);\n\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      return status;\n    }\n\n    if (ecma_is_value_true (status))\n    {\n      bool prop_is_configurable = target_desc.flags & ECMA_PROP_IS_CONFIGURABLE;\n\n      ecma_free_property_descriptor (&target_desc);\n\n      if (!prop_is_configurable)\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned falsish for property which exists \"\n                                                    \"in the proxy target as non-configurable\"));\n      }\n\n      ecma_value_t extensible_target = ecma_builtin_object_object_is_extensible (target_obj_p);\n\n      if (ECMA_IS_VALUE_ERROR (extensible_target))\n      {\n        return extensible_target;\n      }\n\n      if (ecma_is_value_false (extensible_target))\n      {\n        return ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned falsish for property but \"\n                                                    \"the proxy target is not extensible\"));\n      }\n    }\n  }\n\n  /* 12. */\n  return ecma_make_boolean_value (boolean_trap_result);\n} /* ecma_proxy_object_has */\n\n/**\n * The Proxy object [[Get]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.8\n *\n * Note: Returned value is always a simple value so freeing it is unnecessary.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         value of the given nameddata property or the result of the getter function call - otherwise\n */\necma_value_t\necma_proxy_object_get (ecma_object_t *obj_p, /**< proxy object */\n                       ecma_string_t *prop_name_p, /**< property name */\n                       ecma_value_t receiver) /**< receiver to invoke getter function */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n  ECMA_CHECK_STACK_USAGE ();\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 2. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 3-6. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_GET);\n\n  /* 7. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  /* 8. */\n  if (ecma_is_value_undefined (trap))\n  {\n    ecma_object_t *target_obj_p = ecma_get_object_from_value (proxy_obj_p->target);\n    return ecma_op_object_get_with_receiver (target_obj_p, prop_name_p, receiver);\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n  ecma_value_t prop_value = ecma_make_prop_name_value (prop_name_p);\n  ecma_value_t args[] = { proxy_obj_p->target, prop_value, receiver };\n\n  /* 9. */\n  ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, args, 3);\n\n  ecma_deref_object (func_obj_p);\n\n  /* 10. */\n  if (ECMA_IS_VALUE_ERROR (trap_result))\n  {\n    return trap_result;\n  }\n\n  /* 11. */\n  ecma_property_descriptor_t target_desc;\n  ecma_value_t status = ecma_op_get_own_property_descriptor (proxy_obj_p->target, prop_name_p, &target_desc);\n\n  /* 12. */\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    ecma_free_value (trap_result);\n    return status;\n  }\n\n  /* 13. */\n  if (ecma_is_value_true (status))\n  {\n    ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n    if ((target_desc.flags & ECMA_PROP_IS_VALUE_DEFINED)\n        && !(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE)\n        && !(target_desc.flags & ECMA_PROP_IS_WRITABLE)\n        && !ecma_op_same_value (trap_result, target_desc.value))\n    {\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"given property is a read-only and non-configurable\"\n                                                       \" data property on the proxy target\"));\n    }\n    else if (!(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE)\n            && (target_desc.flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))\n            && target_desc.get_p == NULL\n            && !ecma_is_value_undefined (trap_result))\n    {\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"given property is a non-configurable property and\"\n                                                       \" does not have a getter function\"));\n    }\n\n    ecma_free_property_descriptor (&target_desc);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      ecma_free_value (trap_result);\n\n      return ret_value;\n    }\n  }\n\n  /* 14. */\n  return trap_result;\n} /* ecma_proxy_object_get */\n\n/**\n * The Proxy object [[Set]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.9\n *\n * Note: Returned value is always a simple value so freeing it is unnecessary.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE/FALSE} - depends on whether the propety can be set to the given object\n */\necma_value_t\necma_proxy_object_set (ecma_object_t *obj_p, /**< proxy object */\n                       ecma_string_t *prop_name_p, /**< property name */\n                       ecma_value_t value, /**< value to set */\n                       ecma_value_t receiver, /**< receiver to invoke setter function */\n                       bool is_strict) /**< indicate strict mode */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n  ECMA_CHECK_STACK_USAGE ();\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 2. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 3-6. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_SET);\n\n  /* 7. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 8. */\n  if (ecma_is_value_undefined (trap))\n  {\n    return ecma_op_object_put_with_receiver (target_obj_p, prop_name_p, value, receiver, is_strict);\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n  ecma_value_t prop_name_value = ecma_make_prop_name_value (prop_name_p);\n  ecma_value_t args[] = { target, prop_name_value, value, receiver };\n\n  /* 9. */\n  ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, args, 4);\n\n  ecma_deref_object (func_obj_p);\n\n  /* 10. */\n  if (ECMA_IS_VALUE_ERROR (trap_result))\n  {\n    return trap_result;\n  }\n\n  bool boolean_trap_result = ecma_op_to_boolean (trap_result);\n\n  ecma_free_value (trap_result);\n\n  /* 11. */\n  if (!boolean_trap_result)\n  {\n    if (is_strict)\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Proxy trap returned falsish\"));\n    }\n\n    return ECMA_VALUE_FALSE;\n  }\n\n  /* 12. */\n  ecma_property_descriptor_t target_desc;\n\n  ecma_value_t status = ecma_op_object_get_own_property_descriptor (target_obj_p, prop_name_p, &target_desc);\n\n  /* 13. */\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    return status;\n  }\n\n  /* 14. */\n  if (ecma_is_value_true (status))\n  {\n    ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n    if ((target_desc.flags & ECMA_PROP_IS_VALUE_DEFINED)\n        && !(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE)\n        && !(target_desc.flags & ECMA_PROP_IS_WRITABLE)\n        && !ecma_op_same_value (value, target_desc.value))\n    {\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"The property exists in the proxy target as a\"\n                                                       \" non-configurable and non-writable data property\"\n                                                       \" with a different value.\"));\n    }\n    else if (!(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE)\n            && (target_desc.flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))\n            && target_desc.set_p == NULL)\n    {\n      ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"The property exists in the proxy target as a\"\n                                                       \" non-configurable accessor property whitout a setter.\"));\n    }\n\n    ecma_free_property_descriptor (&target_desc);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      return ret_value;\n    }\n  }\n\n  /* 15. */\n  return ECMA_VALUE_TRUE;\n} /* ecma_proxy_object_set */\n\n/**\n * The Proxy object [[Delete]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.10\n *\n * Note: Returned value is always a simple value so freeing it is unnecessary.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_{TRUE/FALSE} - depends on whether the propety can be deleted\n */\necma_value_t\necma_proxy_object_delete_property (ecma_object_t *obj_p, /**< proxy object */\n                                   ecma_string_t *prop_name_p, /**< property name */\n                                   bool is_strict) /**< delete in strict mode? */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 2. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 3-6.*/\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_DELETE_PROPERTY_UL);\n\n  /* 7. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 8. */\n  if (ecma_is_value_undefined (trap))\n  {\n    return ecma_op_object_delete (target_obj_p, prop_name_p, is_strict);\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n  ecma_value_t prop_name_value = ecma_make_prop_name_value (prop_name_p);\n  ecma_value_t args[] = { target, prop_name_value };\n\n  /* 9. */\n  ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, args, 2);\n\n  ecma_deref_object (func_obj_p);\n\n  /* 10. */\n  if (ECMA_IS_VALUE_ERROR (trap_result))\n  {\n    return trap_result;\n  }\n\n  bool boolean_trap_result = ecma_op_to_boolean (trap_result);\n\n  ecma_free_value (trap_result);\n\n  /* 11. */\n  if (!boolean_trap_result)\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  /* 12. */\n  ecma_property_descriptor_t target_desc;\n\n  ecma_value_t status = ecma_op_object_get_own_property_descriptor (target_obj_p, prop_name_p, &target_desc);\n\n  /* 13. */\n  if (ECMA_IS_VALUE_ERROR (status))\n  {\n    return status;\n  }\n\n  /* 14. */\n  if (ecma_is_value_false (status))\n  {\n    return ECMA_VALUE_TRUE;\n  }\n\n  ecma_value_t ret_value = ECMA_VALUE_TRUE;\n\n  /* 15. */\n  if (!(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE))\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned truish for property which is \"\n                                                     \"non-configurable in the proxy target.\"));\n  }\n  /* ES11: 13-14 */\n  ecma_value_t extensible_target = ecma_builtin_object_object_is_extensible (target_obj_p);\n\n  if (!ecma_is_value_true (extensible_target))\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned truish for target is not extensible\"));\n  }\n\n  ecma_free_property_descriptor (&target_desc);\n\n  /* 16. */\n  return ret_value;\n} /* ecma_proxy_object_delete_property */\n\n/**\n * Helper method for the Proxy object [[OwnPropertyKeys]] operation\n *\n * See also:\n *          ECMAScript v6, 9.5.12 steps 21. 23.\n *\n * @return ECMA_VALUE_ERROR - if a target key is not in the unchecked_result_keys collection\n *         ECMA_VALUE_EMPTY - otherwise\n */\nstatic ecma_value_t\necma_proxy_object_own_property_keys_helper (ecma_collection_t *target_collection, /**< target keys */\n                                            ecma_collection_t *unchecked_result_keys, /**< unchecked keys */\n                                            uint32_t *counter) /**< unchecked property counter */\n{\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  for (uint32_t i = 0; i < target_collection->item_count; i++)\n  {\n    ecma_string_t *current_prop_name = ecma_get_prop_name_from_value (target_collection->buffer_p[i]);\n\n    ret_value = ECMA_VALUE_ERROR;\n\n    for (uint32_t j = 0; j < unchecked_result_keys->item_count; j++)\n    {\n      if (ecma_is_value_empty (unchecked_result_keys->buffer_p[j]))\n      {\n        continue;\n      }\n\n      ecma_string_t *unchecked_prop_name = ecma_get_prop_name_from_value (unchecked_result_keys->buffer_p[j]);\n\n      if (ecma_compare_ecma_strings (current_prop_name, unchecked_prop_name))\n      {\n        ecma_deref_ecma_string (unchecked_prop_name);\n        ret_value = ECMA_VALUE_EMPTY;\n        unchecked_result_keys->buffer_p[j] = ECMA_VALUE_EMPTY;\n        (*counter)++;\n      }\n    }\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      break;\n    }\n  }\n\n  return ret_value;\n} /* ecma_proxy_object_own_property_keys_helper */\n\n/**\n * Helper method for checking the invariants in the Proxy object [[OwnPropertyKeys]] operation\n *\n * See also:\n *          ECMAScript v6, 9.5.12 steps 20-25.\n *\n * @return true - if none of the invariants got violated\n *         false - otherwise\n */\nstatic bool\necma_proxy_check_invariants_for_own_prop_keys (ecma_collection_t *trap_result,\n                                               ecma_collection_t *target_non_configurable_keys,\n                                               ecma_collection_t *target_configurable_keys,\n                                               ecma_value_t extensible_target)\n{\n  /* 20. */\n  ecma_collection_t *unchecked_result_keys = ecma_new_collection ();\n\n  ecma_collection_append (unchecked_result_keys, trap_result->buffer_p, trap_result->item_count);\n\n  for (uint32_t i = 0; i < unchecked_result_keys->item_count; i++)\n  {\n    ecma_string_t *unchecked_prop_name = ecma_get_prop_name_from_value (unchecked_result_keys->buffer_p[i]);\n    ecma_ref_ecma_string (unchecked_prop_name);\n  }\n\n  bool check_ok = false;\n  uint32_t unchecked_prop_name_counter = 0;\n\n  /* 21. */\n  if (ECMA_IS_VALUE_ERROR (ecma_proxy_object_own_property_keys_helper (target_non_configurable_keys,\n                                                                       unchecked_result_keys,\n                                                                       &unchecked_prop_name_counter)))\n  {\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Trap result did not include all non-configurable keys.\"));\n  }\n  /* 22. */\n  else if (ecma_is_value_true (extensible_target))\n  {\n    check_ok = true;\n  }\n  /* 23. */\n  else if (ECMA_IS_VALUE_ERROR (ecma_proxy_object_own_property_keys_helper (target_configurable_keys,\n                                                                            unchecked_result_keys,\n                                                                            &unchecked_prop_name_counter)))\n  {\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Trap result did not include all configurable keys.\"));\n  }\n  /* 24. */\n  else if (unchecked_result_keys->item_count != unchecked_prop_name_counter)\n  {\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned extra keys but proxy target is non-extensible\"));\n  }\n  /* 25. */\n  else\n  {\n    check_ok = true;\n  }\n\n  ecma_collection_free (unchecked_result_keys);\n\n  return check_ok;\n} /* ecma_proxy_check_invariants_for_own_prop_keys */\n\n/**\n * The Proxy object [[OwnPropertyKeys]] internal routine\n *\n * See also:\n *          ECMAScript v11, 9.5.11\n *\n * Note: If the returned collection is not NULL, it must be freed with\n *       ecma_collection_free if it is no longer needed\n *\n * @return NULL - if the operation fails\n *         pointer to a newly allocated list of property names - otherwise\n */\necma_collection_t *\necma_proxy_object_own_property_keys (ecma_object_t *obj_p) /**< proxy object */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 1. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 2-5. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_OWN_KEYS_UL);\n\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return NULL;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 6. */\n  if (ecma_is_value_undefined (trap))\n  {\n    return ecma_op_object_own_property_keys (target_obj_p);\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n\n  /* 7. */\n  ecma_value_t trap_result_array = ecma_op_function_call (func_obj_p, handler, &target, 1);\n\n  ecma_deref_object (func_obj_p);\n\n  if (ECMA_IS_VALUE_ERROR (trap_result_array))\n  {\n    return NULL;\n  }\n\n  /* 8. */\n  ecma_collection_t *trap_result = ecma_op_create_list_from_array_like (trap_result_array, true);\n\n  ecma_free_value (trap_result_array);\n\n  if (trap_result == NULL)\n  {\n    return trap_result;\n  }\n\n  /* 9. */\n  if (ecma_collection_check_duplicated_entries (trap_result))\n  {\n    ecma_collection_free (trap_result);\n    ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned duplicate entries\"));\n    return NULL;\n  }\n\n  /* 10. */\n  ecma_value_t extensible_target = ecma_builtin_object_object_is_extensible (target_obj_p);\n\n  if (ECMA_IS_VALUE_ERROR (extensible_target))\n  {\n    ecma_collection_free (trap_result);\n    return NULL;\n  }\n\n  /* 11. */\n  ecma_collection_t *target_keys = ecma_op_object_own_property_keys (target_obj_p);\n\n  if (target_keys == NULL)\n  {\n    ecma_collection_free (trap_result);\n    return target_keys;\n  }\n\n  /* 14. */\n  ecma_collection_t *target_configurable_keys = ecma_new_collection ();\n\n  /* 15. */\n  ecma_collection_t *target_non_configurable_keys = ecma_new_collection ();\n\n  ecma_collection_t *ret_value = NULL;\n\n  /* 16. */\n  for (uint32_t i = 0; i < target_keys->item_count; i++)\n  {\n    ecma_property_descriptor_t target_desc;\n\n    ecma_string_t *prop_name_p = ecma_get_prop_name_from_value (target_keys->buffer_p[i]);\n\n    ecma_value_t status = ecma_op_object_get_own_property_descriptor (target_obj_p,\n                                                                      prop_name_p,\n                                                                      &target_desc);\n\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      ecma_collection_free (trap_result);\n      goto free_target_collections;\n    }\n\n    ecma_value_t prop_value = ecma_make_prop_name_value (prop_name_p);\n\n    if (ecma_is_value_true (status)\n        && !(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE))\n    {\n      ecma_collection_push_back (target_non_configurable_keys, prop_value);\n    }\n    else\n    {\n      ecma_collection_push_back (target_configurable_keys, prop_value);\n    }\n\n    if (ecma_is_value_true (status))\n    {\n      ecma_free_property_descriptor (&target_desc);\n    }\n  }\n\n  /* 17. */\n  if (ecma_is_value_true (extensible_target) && target_non_configurable_keys->item_count == 0)\n  {\n    ret_value = trap_result;\n  }\n  /* 18-22. */\n  else if (ecma_proxy_check_invariants_for_own_prop_keys (trap_result,\n                                                          target_non_configurable_keys,\n                                                          target_configurable_keys,\n                                                          extensible_target))\n  {\n    ret_value = trap_result;\n  }\n  else\n  {\n    JERRY_ASSERT (ret_value == NULL);\n    ecma_collection_free (trap_result);\n  }\n\nfree_target_collections:\n  ecma_collection_destroy (target_keys);\n  ecma_collection_free (target_configurable_keys);\n  ecma_collection_free (target_non_configurable_keys);\n\n  /* 23. */\n  return ret_value;\n} /* ecma_proxy_object_own_property_keys */\n\n/**\n * The Proxy object [[Call]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.13\n *\n * Note: Returned value must be freed with ecma_free_value.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         result of the function call - otherwise\n */\necma_value_t\necma_proxy_object_call (ecma_object_t *obj_p, /**< proxy object */\n                        ecma_value_t this_argument, /**< this argument to invoke the function */\n                        const ecma_value_t *args_p, /**< argument list */\n                        uint32_t argc) /**< number of arguments */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 1. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 2-5.*/\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_APPLY);\n\n  /* 6. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n\n  /* 7. */\n  if (ecma_is_value_undefined (trap))\n  {\n    ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n    return ecma_op_function_call (target_obj_p, this_argument, args_p, argc);\n  }\n\n  /* 8. */\n  ecma_value_t args_array = ecma_op_new_array_object_from_buffer (args_p, argc);\n  ecma_value_t value_array[] = {target, this_argument, args_array};\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n  /* 9. */\n  ecma_value_t ret_value = ecma_op_function_call (func_obj_p, handler, value_array, 3);\n  ecma_deref_object (func_obj_p);\n  ecma_free_object (args_array);\n\n  return ret_value;\n} /* ecma_proxy_object_call */\n\n/**\n * The Proxy object [[Construct]] internal routine\n *\n * See also:\n *          ECMAScript v6, 9.5.14\n *\n * Note: Returned value must be freed with ecma_free_value.\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         result of the construct call - otherwise\n */\necma_value_t\necma_proxy_object_construct (ecma_object_t *obj_p, /**< proxy object */\n                             ecma_object_t *new_target_p, /**< new target */\n                             const ecma_value_t *args_p, /**< argument list */\n                             uint32_t argc) /**< number of arguments */\n{\n  JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));\n\n  ecma_proxy_object_t * proxy_obj_p = (ecma_proxy_object_t *) obj_p;\n\n  /* 1. */\n  ecma_value_t handler = proxy_obj_p->handler;\n\n  /* 2-5. */\n  ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_CONSTRUCT);\n\n  /* 6. */\n  if (ECMA_IS_VALUE_ERROR (trap))\n  {\n    return trap;\n  }\n\n  ecma_value_t target = proxy_obj_p->target;\n  ecma_object_t *target_obj_p = ecma_get_object_from_value (target);\n\n  /* 7. */\n  if (ecma_is_value_undefined (trap))\n  {\n    JERRY_ASSERT (ecma_object_is_constructor (target_obj_p));\n\n    return ecma_op_function_construct (target_obj_p, new_target_p, args_p, argc);\n  }\n\n  /* 8. */\n  ecma_value_t args_array = ecma_op_new_array_object_from_buffer (args_p, argc);\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);\n  ecma_value_t new_target_value = ecma_make_object_value (new_target_p);\n  ecma_value_t function_call_args[] = {target, args_array, new_target_value};\n\n  /* 9. */\n  ecma_value_t new_obj = ecma_op_function_call (func_obj_p, handler, function_call_args, 3);\n\n  ecma_free_object (args_array);\n  ecma_deref_object (func_obj_p);\n\n  /* 10 .*/\n  if (ECMA_IS_VALUE_ERROR (new_obj))\n  {\n    return new_obj;\n  }\n\n  /* 11. */\n  if (!ecma_is_value_object (new_obj))\n  {\n    ecma_free_value (new_obj);\n\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Trap returned non-object\"));\n  }\n\n  /* 12. */\n  return new_obj;\n} /* ecma_proxy_object_construct */\n\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-proxy-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_PROXY_OBJECT_H\n#define ECMA_PROXY_OBJECT_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaproxyobject ECMA Proxy object related routines\n * @{\n */\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n\necma_object_t *\necma_proxy_create (ecma_value_t target,\n                   ecma_value_t handler);\n\necma_object_t *\necma_proxy_create_revocable (ecma_value_t target,\n                             ecma_value_t handler);\n\necma_value_t\necma_proxy_revoke_cb (const ecma_value_t function_obj,\n                      const ecma_value_t this_val,\n                      const ecma_value_t args_p[],\n                      const uint32_t args_count);\n\necma_value_t\necma_proxy_object_find (ecma_object_t *obj_p,\n                        ecma_string_t *prop_name_p);\n\n/* Interal operations */\n\necma_value_t\necma_proxy_object_get_prototype_of (ecma_object_t *obj_p);\n\necma_value_t\necma_proxy_object_set_prototype_of (ecma_object_t *obj_p,\n                                    ecma_value_t proto);\n\necma_value_t\necma_proxy_object_is_extensible (ecma_object_t *obj_p);\n\necma_value_t\necma_proxy_object_prevent_extensions (ecma_object_t *obj_p);\n\necma_value_t\necma_proxy_object_get_own_property_descriptor (ecma_object_t *obj_p,\n                                               ecma_string_t *prop_name_p,\n                                               ecma_property_descriptor_t *prop_desc_p);\n\necma_value_t\necma_proxy_object_define_own_property (ecma_object_t *obj_p,\n                                       ecma_string_t *prop_name_p,\n                                       const ecma_property_descriptor_t *prop_desc_p);\n\necma_value_t\necma_proxy_object_has (ecma_object_t *obj_p,\n                       ecma_string_t *prop_name_p);\n\necma_value_t\necma_proxy_object_get (ecma_object_t *obj_p,\n                       ecma_string_t *prop_name_p,\n                       ecma_value_t receiver);\n\necma_value_t\necma_proxy_object_set (ecma_object_t *obj_p,\n                       ecma_string_t *prop_name_p,\n                       ecma_value_t name,\n                       ecma_value_t receiver,\n                       bool is_strict);\n\necma_value_t\necma_proxy_object_delete_property (ecma_object_t *obj_p,\n                                   ecma_string_t *prop_name_p,\n                                   bool is_strict);\n\necma_collection_t *\necma_proxy_object_own_property_keys (ecma_object_t *obj_p);\n\necma_value_t\necma_proxy_object_call (ecma_object_t *obj_p,\n                        ecma_value_t this_argument,\n                        const ecma_value_t *args_p,\n                        uint32_t argc);\n\necma_value_t\necma_proxy_object_construct (ecma_object_t *obj_p,\n                             ecma_object_t *new_target_p,\n                             const ecma_value_t *args_p,\n                             uint32_t argc);\n\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_PROXY_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-reference.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lcache.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-proxy-object.h\"\n#include \"ecma-reference.h\"\n#include \"jrt.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup references ECMA-Reference\n * @{\n */\n\n/**\n * Resolve syntactic reference.\n *\n * @return ECMA_OBJECT_POINTER_ERROR - if the operation fails\n *         pointer to lexical environment - if the reference's base is resolved sucessfully,\n *         NULL - otherwise.\n */\necma_object_t *\necma_op_resolve_reference_base (ecma_object_t *lex_env_p, /**< starting lexical environment */\n                                ecma_string_t *name_p) /**< identifier's name */\n{\n  JERRY_ASSERT (lex_env_p != NULL);\n\n  while (true)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND)\n    {\n      JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n      lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    ecma_value_t has_binding = ecma_op_has_binding (lex_env_p, name_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_IS_VALUE_ERROR (has_binding))\n    {\n      return ECMA_OBJECT_POINTER_ERROR;\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n    if (ecma_is_value_true (has_binding))\n    {\n      return lex_env_p;\n    }\n\n    if (lex_env_p->u2.outer_reference_cp == JMEM_CP_NULL)\n    {\n      return NULL;\n    }\n\n    lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n  }\n} /* ecma_op_resolve_reference_base */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Check if the passed lexical environment is a global lexical environment\n *\n * @return true  - if the lexical environment is a global lexical environment\n *         false - otherwise\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\necma_op_is_global_environment (ecma_object_t *lex_env_p) /**< lexical environment */\n{\n  JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL\n                || (ecma_make_object_value (ecma_get_lex_env_binding_object (lex_env_p))\n                    == ((ecma_global_object_t *) ecma_builtin_get_global ())->this_binding));\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL\n                || ecma_get_lex_env_binding_object (lex_env_p) == ecma_builtin_get_global ());\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  return lex_env_p->u2.outer_reference_cp == JMEM_CP_NULL;\n} /* ecma_op_is_global_environment */\n\n/**\n * Perform GetThisEnvironment and GetSuperBase operations\n *\n * See also: ECMAScript v6, 8.1.1.3.5\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_UNDEFINED - if the home object is null\n *         value of the [[HomeObject]].[[Prototype]] internal slot - otherwise\n */\necma_value_t\necma_op_resolve_super_base (ecma_object_t *lex_env_p) /**< starting lexical environment */\n{\n  JERRY_ASSERT (lex_env_p != NULL);\n\n  while (true)\n  {\n    if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND)\n    {\n      ecma_object_t *home_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u1.home_object_cp);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n      if (ECMA_OBJECT_IS_PROXY (home_p))\n      {\n        return ecma_proxy_object_get_prototype_of (home_p);\n      }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n      jmem_cpointer_t proto_cp = ecma_op_ordinary_object_get_prototype_of (home_p);\n\n      if (proto_cp == JMEM_CP_NULL)\n      {\n        return ECMA_VALUE_NULL;\n      }\n\n      ecma_object_t *proto_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, proto_cp);\n      ecma_ref_object (proto_p);\n\n      return ecma_make_object_value (proto_p);\n    }\n\n    if (lex_env_p->u2.outer_reference_cp == JMEM_CP_NULL)\n    {\n      break;\n    }\n\n    lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n  }\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_op_resolve_super_base */\n\n/**\n * Helper method for HasBindig operation\n *\n * See also:\n *         ECMA-262 v6, 8.1.1.2.1 steps 7-9;\n *\n * @return ECMA_VALUE_TRUE - if the property is unscopable\n *         ECMA_VALUE_FALSE - if a the property is not unscopable\n *         ECMA_VALUE_ERROR - otherwise\n */\nstatic ecma_value_t\necma_op_is_prop_unscopable (ecma_object_t *binding_obj_p, /**< binding object */\n                            ecma_string_t *prop_name_p) /**< property's name */\n{\n  ecma_value_t unscopables = ecma_op_object_get_by_symbol_id (binding_obj_p, LIT_GLOBAL_SYMBOL_UNSCOPABLES);\n\n  if (ECMA_IS_VALUE_ERROR (unscopables))\n  {\n    return unscopables;\n  }\n\n  if (ecma_is_value_object (unscopables))\n  {\n    ecma_object_t *unscopables_obj_p = ecma_get_object_from_value (unscopables);\n    ecma_value_t get_unscopables_value = ecma_op_object_get (unscopables_obj_p, prop_name_p);\n    ecma_deref_object (unscopables_obj_p);\n\n    if (ECMA_IS_VALUE_ERROR (get_unscopables_value))\n    {\n      return get_unscopables_value;\n    }\n\n    bool is_blocked = ecma_op_to_boolean (get_unscopables_value);\n\n    ecma_free_value (get_unscopables_value);\n\n    return ecma_make_boolean_value (is_blocked);\n  }\n\n  ecma_free_value (unscopables);\n\n  return ECMA_VALUE_FALSE;\n} /* ecma_op_is_prop_unscopable */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Helper method for HasBindig operation\n *\n * See also:\n *         ECMA-262 v6, 8.1.1.2.1 steps 7-9;\n *\n * @return ECMA_VALUE_TRUE - if the property is unscopable\n *         ECMA_VALUE_FALSE - if a the property is not unscopable\n *         ECMA_VALUE_ERROR - otherwise\n */\n\n/**\n * Resolve value corresponding to the given object environment reference.\n *\n * Note: the steps are already include the HasBindig operation steps\n *\n *  See also:\n *         ECMA-262 v6, 8.1.1.2.1\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_NOT_FOUND - if the binding not exists or blocked via @@unscopables\n *         result of the binding - otherwise\n */\necma_value_t\necma_op_object_bound_environment_resolve_reference_value (ecma_object_t *lex_env_p, /**< lexical environment */\n                                                          ecma_string_t *name_p) /**< variable name */\n{\n  ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n  ecma_value_t found_binding;\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (ECMA_OBJECT_IS_PROXY (binding_obj_p))\n  {\n    found_binding = ecma_proxy_object_has (binding_obj_p, name_p);\n\n    if (!ecma_is_value_true (found_binding))\n    {\n      return ECMA_IS_VALUE_ERROR (found_binding) ? found_binding : ECMA_VALUE_NOT_FOUND;\n    }\n  }\n  else\n  {\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n    found_binding = ecma_op_object_find (binding_obj_p, name_p);\n\n    if (ECMA_IS_VALUE_ERROR (found_binding) || !ecma_is_value_found (found_binding))\n    {\n      return found_binding;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (JERRY_LIKELY (ecma_op_is_global_environment (lex_env_p)))\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n      return found_binding;\n    }\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t blocked = ecma_op_is_prop_unscopable (binding_obj_p, name_p);\n\n  if (ecma_is_value_false (blocked))\n  {\n#if ENABLED (JERRY_BUILTIN_PROXY)\n    if (ECMA_OBJECT_IS_PROXY (binding_obj_p))\n    {\n      return ecma_proxy_object_get (binding_obj_p, name_p, ecma_make_object_value (binding_obj_p));\n    }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n    return found_binding;\n  }\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (!ECMA_OBJECT_IS_PROXY (binding_obj_p))\n  {\n    ecma_free_value (found_binding);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  return ECMA_IS_VALUE_ERROR (blocked) ? blocked : ECMA_VALUE_NOT_FOUND;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_op_object_bound_environment_resolve_reference_value */\n\n/**\n * Resolve value corresponding to reference.\n *\n * @return value of the reference\n */\necma_value_t\necma_op_resolve_reference_value (ecma_object_t *lex_env_p, /**< starting lexical environment */\n                                 ecma_string_t *name_p) /**< identifier's name */\n{\n  JERRY_ASSERT (lex_env_p != NULL);\n\n  while (true)\n  {\n    ecma_lexical_environment_type_t lex_env_type = ecma_get_lex_env_type (lex_env_p);\n\n    if (lex_env_type == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n    {\n      ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n      if (property_p != NULL)\n      {\n        ecma_property_value_t *property_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (JERRY_UNLIKELY (property_value_p->value == ECMA_VALUE_UNINITIALIZED))\n        {\n          return ecma_raise_reference_error (ECMA_ERR_MSG (\"Variables declared by let/const must be\"\n                                                           \" initialized before reading their value.\"));\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        return ecma_fast_copy_value (property_value_p->value);\n      }\n    }\n    else if (lex_env_type == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND)\n    {\n#if ENABLED (JERRY_ESNEXT)\n      bool lcache_lookup_allowed = ecma_op_is_global_environment (lex_env_p);\n#else /* !ENABLED (JERRY_ESNEXT)*/\n      bool lcache_lookup_allowed = true;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (lcache_lookup_allowed)\n      {\n#if ENABLED (JERRY_LCACHE)\n        ecma_object_t *binding_obj_p = ecma_get_lex_env_binding_object (lex_env_p);\n        ecma_property_t *property_p = ecma_lcache_lookup (binding_obj_p, name_p);\n\n        if (property_p != NULL)\n        {\n          JERRY_ASSERT (ECMA_PROPERTY_IS_RAW (*property_p));\n\n          ecma_property_value_t *prop_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n          if (*property_p & ECMA_PROPERTY_FLAG_DATA)\n          {\n            return ecma_fast_copy_value (prop_value_p->value);\n          }\n\n          ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (prop_value_p);\n\n          if (get_set_pair_p->getter_cp == JMEM_CP_NULL)\n          {\n            return ECMA_VALUE_UNDEFINED;\n          }\n\n          ecma_object_t *getter_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, get_set_pair_p->getter_cp);\n\n          ecma_value_t base_value = ecma_make_object_value (binding_obj_p);\n          return ecma_op_function_call (getter_p, base_value, NULL, 0);\n        }\n#endif /* ENABLED (JERRY_LCACHE) */\n      }\n\n      ecma_value_t result = ecma_op_object_bound_environment_resolve_reference_value (lex_env_p, name_p);\n\n      if (ecma_is_value_found (result))\n      {\n        /* Note: the result may contains ECMA_VALUE_ERROR */\n        return result;\n      }\n    }\n    else\n    {\n#if ENABLED (JERRY_ESNEXT)\n      JERRY_ASSERT (lex_env_type == ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND);\n#else /* !ENABLED (JERRY_ESNEXT) */\n      JERRY_UNREACHABLE ();\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n\n    if (lex_env_p->u2.outer_reference_cp == JMEM_CP_NULL)\n    {\n      break;\n    }\n\n    lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n  }\n\n#if ENABLED (JERRY_ERROR_MESSAGES)\n  ecma_value_t name_val = ecma_make_string_value (name_p);\n  ecma_value_t error_value = ecma_raise_standard_error_with_format (ECMA_ERROR_REFERENCE,\n                                                                    \"% is not defined\",\n                                                                    name_val);\n#else /* ENABLED (JERRY_ERROR_MESSAGES) */\n  ecma_value_t error_value = ecma_raise_reference_error (NULL);\n#endif /* !ENABLED (JERRY_ERROR_MESSAGES) */\n  return error_value;\n} /* ecma_op_resolve_reference_value */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-reference.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_REFERENCE_H\n#define ECMA_REFERENCE_H\n\n#include \"ecma-globals.h\"\n#include \"jrt.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup references ECMA-Reference\n * @{\n */\n\necma_object_t *ecma_op_resolve_reference_base (ecma_object_t *lex_env_p, ecma_string_t *name_p);\necma_value_t ecma_op_resolve_reference_value (ecma_object_t *lex_env_p, ecma_string_t *name_p);\necma_value_t ecma_op_object_bound_environment_resolve_reference_value (ecma_object_t *lex_env_p, ecma_string_t *name_p);\n#if ENABLED (JERRY_ESNEXT)\necma_value_t ecma_op_resolve_super_base (ecma_object_t *lex_env_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_REFERENCE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-regexp-object.h\"\n#include \"jcontext.h\"\n#include \"jrt-libc-includes.h\"\n#include \"lit-char-helpers.h\"\n#include \"re-compiler.h\"\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n#define ECMA_BUILTINS_INTERNAL\n#include \"ecma-builtins-internal.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaregexpobject ECMA RegExp object related routines\n * @{\n */\n\n/**\n * Index of the global capturing group\n */\n#define RE_GLOBAL_CAPTURE 0\n\n/**\n * Parse RegExp flags (global, ignoreCase, multiline)\n *\n * See also: ECMA-262 v5, 15.10.4.1\n *\n * @return empty ecma value - if parsed successfully\n *         error ecma value - otherwise\n *\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_regexp_parse_flags (ecma_string_t *flags_str_p, /**< Input string with flags */\n                         uint16_t *flags_p) /**< [out] parsed flag bits */\n{\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n  uint16_t result_flags = RE_FLAG_EMPTY;\n\n  ECMA_STRING_TO_UTF8_STRING (flags_str_p, flags_start_p, flags_start_size);\n\n  const lit_utf8_byte_t *flags_str_curr_p = flags_start_p;\n  const lit_utf8_byte_t *flags_str_end_p = flags_start_p + flags_start_size;\n\n  while (flags_str_curr_p < flags_str_end_p)\n  {\n    ecma_regexp_flags_t flag;\n    switch (*flags_str_curr_p++)\n    {\n      case 'g':\n      {\n        flag = RE_FLAG_GLOBAL;\n        break;\n      }\n      case 'i':\n      {\n        flag = RE_FLAG_IGNORE_CASE;\n        break;\n      }\n      case 'm':\n      {\n        flag = RE_FLAG_MULTILINE;\n        break;\n      }\n      case 'y':\n      {\n        flag = RE_FLAG_STICKY;\n        break;\n      }\n      case 'u':\n      {\n        flag = RE_FLAG_UNICODE;\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case 's':\n      {\n        flag = RE_FLAG_DOTALL;\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      default:\n      {\n        flag = RE_FLAG_EMPTY;\n        break;\n      }\n    }\n\n    if (flag == RE_FLAG_EMPTY || (result_flags & flag) != 0)\n    {\n      ret_value = ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid RegExp flags.\"));\n      break;\n    }\n\n    result_flags = (uint16_t) (result_flags | flag);\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (flags_start_p, flags_start_size);\n\n  *flags_p = result_flags;\n  return ret_value;\n} /* ecma_regexp_parse_flags */\n\n#if !ENABLED (JERRY_ESNEXT)\n/*\n * Create the properties of a RegExp instance.\n */\nstatic void\necma_regexp_create_props (ecma_object_t *re_object_p, /**< RegExp object */\n                          ecma_string_t *source_p, /**< source string */\n                          uint16_t flags) /**< flags */\n{\n  ecma_property_value_t *prop_value_p;\n\n  prop_value_p = ecma_create_named_data_property (re_object_p,\n                                                  ecma_get_magic_string (LIT_MAGIC_STRING_SOURCE),\n                                                  ECMA_PROPERTY_FIXED,\n                                                  NULL);\n\n  ecma_ref_ecma_string (source_p);\n  prop_value_p->value = ecma_make_string_value (source_p);\n\n  prop_value_p = ecma_create_named_data_property (re_object_p,\n                                                  ecma_get_magic_string (LIT_MAGIC_STRING_GLOBAL),\n                                                  ECMA_PROPERTY_FIXED,\n                                                  NULL);\n\n  prop_value_p->value = ecma_make_boolean_value (flags & RE_FLAG_GLOBAL);\n\n  prop_value_p = ecma_create_named_data_property (re_object_p,\n                                                  ecma_get_magic_string (LIT_MAGIC_STRING_IGNORECASE_UL),\n                                                  ECMA_PROPERTY_FIXED,\n                                                  NULL);\n\n  prop_value_p->value = ecma_make_boolean_value (flags & RE_FLAG_IGNORE_CASE);\n\n  prop_value_p = ecma_create_named_data_property (re_object_p,\n                                                  ecma_get_magic_string (LIT_MAGIC_STRING_MULTILINE),\n                                                  ECMA_PROPERTY_FIXED,\n                                                  NULL);\n\n  prop_value_p->value = ecma_make_boolean_value (flags & RE_FLAG_MULTILINE);\n} /* ecma_regexp_create_props */\n\n/*\n * Update the properties of a RegExp instance.\n */\nstatic void\necma_regexp_update_props (ecma_object_t *re_object_p, /**< RegExp object */\n                          ecma_string_t *source_p, /**< source string */\n                          uint16_t flags) /**< flags */\n{\n  ecma_property_t *prop_p;\n\n  prop_p = ecma_find_named_property (re_object_p, ecma_get_magic_string (LIT_MAGIC_STRING_SOURCE));\n  JERRY_ASSERT (prop_p != NULL);\n  ecma_property_value_t *prop_value_p = ECMA_PROPERTY_VALUE_PTR (prop_p);\n  ecma_free_value (prop_value_p->value);\n  ecma_ref_ecma_string (source_p);\n  prop_value_p->value = ecma_make_string_value (source_p);\n\n  prop_p = ecma_find_named_property (re_object_p, ecma_get_magic_string (LIT_MAGIC_STRING_GLOBAL));\n  JERRY_ASSERT (prop_p != NULL);\n  prop_value_p = ECMA_PROPERTY_VALUE_PTR (prop_p);\n  prop_value_p->value = ecma_make_boolean_value (flags & RE_FLAG_GLOBAL);\n\n  prop_p = ecma_find_named_property (re_object_p, ecma_get_magic_string (LIT_MAGIC_STRING_IGNORECASE_UL));\n  JERRY_ASSERT (prop_p != NULL);\n  prop_value_p = ECMA_PROPERTY_VALUE_PTR (prop_p);\n  prop_value_p->value = ecma_make_boolean_value (flags & RE_FLAG_IGNORE_CASE);\n\n  prop_p = ecma_find_named_property (re_object_p, ecma_get_magic_string (LIT_MAGIC_STRING_MULTILINE));\n  JERRY_ASSERT (prop_p != NULL);\n  prop_value_p = ECMA_PROPERTY_VALUE_PTR (prop_p);\n  prop_value_p->value = ecma_make_boolean_value (flags & RE_FLAG_MULTILINE);\n} /* ecma_regexp_update_props */\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n/**\n * RegExpAlloc method\n *\n * See also: ECMA-262 v5, 15.10.4.1\n *           ECMA-262 v6, 21.2.3.2.1\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return ecma_object_t\n */\necma_object_t *\necma_op_regexp_alloc (ecma_object_t *ctr_obj_p) /**< constructor object pointer */\n{\n#if ENABLED (JERRY_ESNEXT)\n  if (ctr_obj_p == NULL)\n  {\n    ctr_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_REGEXP);\n  }\n\n  ecma_object_t *proto_obj_p = ecma_op_get_prototype_from_constructor (ctr_obj_p,\n                                                                       ECMA_BUILTIN_ID_REGEXP_PROTOTYPE);\n\n  if (JERRY_UNLIKELY (proto_obj_p == NULL))\n  {\n    return proto_obj_p;\n  }\n\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (ctr_obj_p);\n  ecma_object_t *proto_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *new_object_p = ecma_create_object (proto_obj_p,\n                                                    sizeof (ecma_extended_object_t),\n                                                    ECMA_OBJECT_TYPE_CLASS);\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_deref_object (proto_obj_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_extended_object_t *regexp_obj_p = (ecma_extended_object_t *) new_object_p;\n\n  /* Class id will be initialized after the bytecode is compiled. */\n  regexp_obj_p->u.class_prop.class_id = LIT_MAGIC_STRING_UNDEFINED;\n\n  ecma_value_t status = ecma_builtin_helper_def_prop (new_object_p,\n                                                      ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                                      ecma_make_uint32_value (0),\n                                                      ECMA_PROPERTY_FLAG_WRITABLE | ECMA_PROP_IS_THROW);\n\n  JERRY_ASSERT (ecma_is_value_true (status));\n\n  return new_object_p;\n} /* ecma_op_regexp_alloc */\n\n/**\n * Helper method for initializing an aready existing RegExp object.\n */\nstatic void\necma_op_regexp_initialize (ecma_object_t *regexp_obj_p, /**< RegExp object */\n                           const re_compiled_code_t *bc_p, /**< bytecode */\n                           ecma_string_t *pattern_str_p, /**< pattern */\n                           uint16_t flags) /**< flags */\n{\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) regexp_obj_p;\n\n#if !ENABLED (JERRY_ESNEXT)\n  if (ext_obj_p->u.class_prop.class_id == LIT_MAGIC_STRING_UNDEFINED)\n  {\n    /* This instance has not been initialized before. */\n    ecma_regexp_create_props (regexp_obj_p, pattern_str_p, flags);\n  }\n  else\n  {\n    ecma_regexp_update_props (regexp_obj_p, pattern_str_p, flags);\n  }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_UNUSED (pattern_str_p);\n  JERRY_UNUSED (flags);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ext_obj_p->u.class_prop.class_id = LIT_MAGIC_STRING_REGEXP_UL;\n  ECMA_SET_INTERNAL_VALUE_POINTER (ext_obj_p->u.class_prop.u.value, bc_p);\n} /* ecma_op_regexp_initialize */\n\n/**\n * Method for creating a RegExp object from pattern.\n *\n * Note:\n *      Allocation have to happen before invoking this function using ecma_op_regexp_alloc.\n *\n * @return ecma_value_t\n */\necma_value_t\necma_op_create_regexp_from_pattern (ecma_object_t *regexp_obj_p, /**< RegExp object */\n                                    ecma_value_t pattern_value, /**< pattern */\n                                    ecma_value_t flags_value) /**< flags */\n{\n  ecma_string_t *pattern_str_p = ecma_regexp_read_pattern_str_helper (pattern_value);\n  uint16_t flags = 0;\n\n  if (JERRY_UNLIKELY (pattern_str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  if (!ecma_is_value_undefined (flags_value))\n  {\n    ecma_string_t *flags_str_p = ecma_op_to_string (flags_value);\n\n    if (JERRY_UNLIKELY (flags_str_p == NULL))\n    {\n      ecma_deref_ecma_string (pattern_str_p);\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_value_t parse_flags_value = ecma_regexp_parse_flags (flags_str_p, &flags);\n    ecma_deref_ecma_string (flags_str_p);\n\n    if (ECMA_IS_VALUE_ERROR (parse_flags_value))\n    {\n      ecma_deref_ecma_string (pattern_str_p);\n      return parse_flags_value;\n    }\n\n    JERRY_ASSERT (ecma_is_value_empty (parse_flags_value));\n  }\n\n  re_compiled_code_t *bc_p = re_compile_bytecode (pattern_str_p, flags);\n\n  if (JERRY_UNLIKELY (bc_p == NULL))\n  {\n    ecma_deref_ecma_string (pattern_str_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_op_regexp_initialize (regexp_obj_p, bc_p, pattern_str_p, flags);\n  ecma_deref_ecma_string (pattern_str_p);\n\n  return ecma_make_object_value (regexp_obj_p);\n} /* ecma_op_create_regexp_from_pattern */\n\n/**\n * Method for creating a RegExp object from bytecode.\n *\n * Note:\n *      Allocation have to happen before invoking this function using ecma_op_regexp_alloc.\n *\n * @return ecma_value_t\n */\necma_value_t\necma_op_create_regexp_from_bytecode (ecma_object_t *regexp_obj_p, /**< RegExp object */\n                                     re_compiled_code_t *bc_p) /**< bytecode */\n{\n  ecma_bytecode_ref ((ecma_compiled_code_t *) bc_p);\n  ecma_string_t *pattern_str_p = ecma_get_string_from_value (bc_p->source);\n  uint16_t flags = bc_p->header.status_flags;\n\n  ecma_op_regexp_initialize (regexp_obj_p, bc_p, pattern_str_p, flags);\n\n  return ecma_make_object_value (regexp_obj_p);\n} /* ecma_op_create_regexp_from_bytecode */\n\n/**\n * Method for creating a RegExp object from pattern with already parsed flags.\n *\n * Note:\n *      Allocation have to happen before invoking this function using ecma_op_regexp_alloc.\n *\n * @return ecma_value_t\n */\necma_value_t\necma_op_create_regexp_with_flags (ecma_object_t *regexp_obj_p, /**< RegExp object */\n                                  ecma_value_t pattern_value, /**< pattern */\n                                  uint16_t flags) /**< flags */\n{\n  ecma_string_t *pattern_str_p = ecma_regexp_read_pattern_str_helper (pattern_value);\n\n  if (JERRY_UNLIKELY (pattern_str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  re_compiled_code_t *bc_p = re_compile_bytecode (pattern_str_p, flags);\n  ecma_deref_ecma_string (pattern_str_p);\n\n  if (JERRY_UNLIKELY (bc_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_op_regexp_initialize (regexp_obj_p, bc_p, pattern_str_p, flags);\n\n  return ecma_make_object_value (regexp_obj_p);\n} /* ecma_op_create_regexp_with_flags */\n\n/**\n * Canonicalize a character\n *\n * @return ecma_char_t canonicalized character\n */\nlit_code_point_t\necma_regexp_canonicalize_char (lit_code_point_t ch, /**< character */\n                               bool unicode) /**< unicode */\n{\n#if ENABLED (JERRY_ESNEXT)\n  if (unicode)\n  {\n    /* In unicode mode the mappings contained in the CaseFolding.txt file should be used to canonicalize the character.\n     * These mappings generally correspond to the lowercase variant of the character, however there are some\n     * differences. In some cases the uppercase variant is used, in others the lowercase of the uppercase character is\n     * used, and there are also cases where the character has no case folding mapping even though it has upper/lower\n     * variants. Since lowercasing is the most common this is used as the default behaviour, and characters with\n     * differing behaviours are encoded in lookup tables. */\n\n    if (lit_char_fold_to_upper (ch))\n    {\n      ch = lit_char_to_upper_case (ch, NULL);\n      JERRY_ASSERT (ch != LIT_MULTIPLE_CU);\n    }\n\n    if (lit_char_fold_to_lower (ch))\n    {\n      ch = lit_char_to_lower_case (ch, NULL);\n      JERRY_ASSERT (ch != LIT_MULTIPLE_CU);\n    }\n\n    return ch;\n  }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  JERRY_UNUSED (unicode);\n  lit_code_point_t cu = lit_char_to_upper_case (ch, NULL);\n\n  if (ch <= LIT_UTF8_1_BYTE_CODE_POINT_MAX\n      || (cu > LIT_UTF8_1_BYTE_CODE_POINT_MAX\n          && cu != LIT_MULTIPLE_CU))\n  {\n    return cu;\n  }\n\n  return ch;\n} /* ecma_regexp_canonicalize_char */\n\n/**\n * RegExp Canonicalize abstract operation\n *\n * See also: ECMA-262 v5, 15.10.2.8\n *\n * @return ecma_char_t canonicalized character\n */\nstatic inline lit_code_point_t JERRY_ATTR_ALWAYS_INLINE\necma_regexp_canonicalize (lit_code_point_t ch, /**< character */\n                          uint16_t flags) /**< flags */\n{\n  if (flags & RE_FLAG_IGNORE_CASE)\n  {\n    return ecma_regexp_canonicalize_char (ch, flags & RE_FLAG_UNICODE);\n  }\n\n  return ch;\n} /* ecma_regexp_canonicalize */\n\n/**\n * Check if a code point is matched by a class escape.\n *\n * @return true, if code point matches escape\n *         false, otherwise\n */\nstatic bool\necma_regexp_check_class_escape (lit_code_point_t cp, /**< char */\n                                ecma_class_escape_t escape) /**< escape */\n{\n  switch (escape)\n  {\n    case RE_ESCAPE_DIGIT:\n    {\n      return (cp >= LIT_CHAR_0 && cp <= LIT_CHAR_9);\n    }\n    case RE_ESCAPE_NOT_DIGIT:\n    {\n      return (cp < LIT_CHAR_0 || cp > LIT_CHAR_9);\n    }\n    case RE_ESCAPE_WORD_CHAR:\n    {\n      return lit_char_is_word_char (cp);\n    }\n    case RE_ESCAPE_NOT_WORD_CHAR:\n    {\n      return !lit_char_is_word_char (cp);\n    }\n    case RE_ESCAPE_WHITESPACE:\n    {\n      return lit_char_is_white_space ((ecma_char_t) cp);\n    }\n    case RE_ESCAPE_NOT_WHITESPACE:\n    {\n      return !lit_char_is_white_space ((ecma_char_t) cp);\n    }\n    default:\n    {\n      JERRY_UNREACHABLE ();\n    }\n  }\n} /* ecma_regexp_check_class_escape */\n\n/**\n * Helper function to get current code point or code unit depending on execution mode,\n * and advance the string pointer.\n *\n * @return lit_code_point_t current code point\n */\nstatic lit_code_point_t\necma_regexp_advance (ecma_regexp_ctx_t *re_ctx_p, /**< regexp context */\n                     const lit_utf8_byte_t **str_p) /**< reference to string pointer */\n{\n  JERRY_ASSERT (str_p != NULL);\n  lit_code_point_t cp = lit_cesu8_read_next (str_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (re_ctx_p->flags & RE_FLAG_UNICODE)\n      && lit_is_code_point_utf16_high_surrogate ((ecma_char_t) cp)\n      && *str_p < re_ctx_p->input_end_p)\n  {\n    const ecma_char_t next_ch = lit_cesu8_peek_next (*str_p);\n    if (lit_is_code_point_utf16_low_surrogate (next_ch))\n    {\n      cp = lit_convert_surrogate_pair_to_code_point ((ecma_char_t) cp, next_ch);\n      *str_p += LIT_UTF8_MAX_BYTES_IN_CODE_UNIT;\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ecma_regexp_canonicalize (cp, re_ctx_p->flags);\n} /* ecma_regexp_advance */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Helper function to get current full unicode code point and advance the string pointer.\n *\n * @return lit_code_point_t current code point\n */\nlit_code_point_t\necma_regexp_unicode_advance (const lit_utf8_byte_t **str_p, /**< reference to string pointer */\n                             const lit_utf8_byte_t *end_p) /**< string end pointer */\n{\n  JERRY_ASSERT (str_p != NULL);\n  const lit_utf8_byte_t *current_p = *str_p;\n\n  lit_code_point_t ch = lit_cesu8_read_next (&current_p);\n  if (lit_is_code_point_utf16_high_surrogate ((ecma_char_t) ch)\n      && current_p < end_p)\n  {\n    const ecma_char_t next_ch = lit_cesu8_peek_next (current_p);\n    if (lit_is_code_point_utf16_low_surrogate (next_ch))\n    {\n      ch = lit_convert_surrogate_pair_to_code_point ((ecma_char_t) ch, next_ch);\n      current_p += LIT_UTF8_MAX_BYTES_IN_CODE_UNIT;\n    }\n  }\n\n  *str_p = current_p;\n  return ch;\n} /* ecma_regexp_unicode_advance */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Helper function to revert the string pointer to the previous code point.\n *\n * @return pointer to previous code point\n */\nstatic JERRY_ATTR_NOINLINE const lit_utf8_byte_t *\necma_regexp_step_back (ecma_regexp_ctx_t *re_ctx_p, /**< regexp context */\n                       const lit_utf8_byte_t *str_p) /**< reference to string pointer */\n{\n  JERRY_ASSERT (str_p != NULL);\n#if ENABLED (JERRY_ESNEXT)\n  lit_code_point_t ch = lit_cesu8_read_prev (&str_p);\n  if (JERRY_UNLIKELY (re_ctx_p->flags & RE_FLAG_UNICODE)\n      && lit_is_code_point_utf16_low_surrogate (ch)\n      && lit_is_code_point_utf16_high_surrogate (lit_cesu8_peek_prev (str_p)))\n  {\n    str_p -= LIT_UTF8_MAX_BYTES_IN_CODE_UNIT;\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (re_ctx_p);\n  lit_utf8_decr (&str_p);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n  return str_p;\n} /* ecma_regexp_step_back */\n\n/**\n * Check if the current poisition is on a word boundary.\n *\n * @return true, if on a word boundary\n *         false - otherwise\n */\nstatic bool\necma_regexp_is_word_boundary (ecma_regexp_ctx_t *re_ctx_p, /**< regexp context */\n                              const lit_utf8_byte_t *str_p) /**< string pointer */\n{\n  lit_code_point_t left_cp;\n  lit_code_point_t right_cp;\n\n  if (JERRY_UNLIKELY (str_p <= re_ctx_p->input_start_p))\n  {\n    left_cp = LIT_INVALID_CP;\n  }\n#if ENABLED (JERRY_ESNEXT)\n  else if (JERRY_UNLIKELY ((re_ctx_p->flags & (RE_FLAG_UNICODE | RE_FLAG_IGNORE_CASE))\n                           == (RE_FLAG_UNICODE | RE_FLAG_IGNORE_CASE)))\n  {\n    const lit_utf8_byte_t *prev_p = ecma_regexp_step_back (re_ctx_p, str_p);\n    left_cp = ecma_regexp_advance (re_ctx_p, &prev_p);\n    JERRY_ASSERT (prev_p == str_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  else\n  {\n    left_cp = str_p[-1];\n  }\n\n  if (JERRY_UNLIKELY (str_p >= re_ctx_p->input_end_p))\n  {\n    right_cp = LIT_INVALID_CP;\n  }\n#if ENABLED (JERRY_ESNEXT)\n  else if (JERRY_UNLIKELY ((re_ctx_p->flags & (RE_FLAG_UNICODE | RE_FLAG_IGNORE_CASE))\n                           == (RE_FLAG_UNICODE | RE_FLAG_IGNORE_CASE)))\n  {\n    right_cp = ecma_regexp_advance (re_ctx_p, &str_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  else\n  {\n    right_cp = str_p[0];\n  }\n\n  return lit_char_is_word_char (left_cp) != lit_char_is_word_char (right_cp);\n} /* ecma_regexp_is_word_boundary */\n\n/**\n * Recursive function for executing RegExp bytecode.\n *\n * See also:\n *          ECMA-262 v5, 15.10.2.1\n *\n * @return pointer to the end of the currently matched substring\n *         NULL, if pattern did not match\n */\nstatic const lit_utf8_byte_t *\necma_regexp_run (ecma_regexp_ctx_t *re_ctx_p, /**< RegExp matcher context */\n                 const uint8_t *bc_p, /**< pointer to the current RegExp bytecode */\n                 const lit_utf8_byte_t *str_curr_p) /**< input string pointer */\n{\n#if (JERRY_STACK_LIMIT != 0)\n  if (JERRY_UNLIKELY (ecma_get_current_stack_usage () > CONFIG_MEM_STACK_LIMIT))\n  {\n    return ECMA_RE_OUT_OF_STACK;\n  }\n#endif /* JERRY_STACK_LIMIT != 0 */\n\n  const lit_utf8_byte_t *str_start_p = str_curr_p;\n  const uint8_t *next_alternative_p = NULL;\n\n  while (true)\n  {\n    const re_opcode_t op = re_get_opcode (&bc_p);\n\n    switch (op)\n    {\n      case RE_OP_EOF:\n      {\n        re_ctx_p->captures_p[RE_GLOBAL_CAPTURE].end_p = str_curr_p;\n        /* FALLTHRU */\n      }\n      case RE_OP_ASSERT_END:\n      case RE_OP_ITERATOR_END:\n      {\n        return str_curr_p;\n      }\n      case RE_OP_ALTERNATIVE_START:\n      {\n        const uint32_t offset = re_get_value (&bc_p);\n        next_alternative_p = bc_p + offset;\n        continue;\n      }\n      case RE_OP_ALTERNATIVE_NEXT:\n      {\n        while (true)\n        {\n          const uint32_t offset = re_get_value (&bc_p);\n          bc_p += offset;\n\n          if (*bc_p != RE_OP_ALTERNATIVE_NEXT)\n          {\n            break;\n          }\n\n          bc_p++;\n        }\n\n        continue;\n      }\n      case RE_OP_NO_ALTERNATIVE:\n      {\n        return NULL;\n      }\n      case RE_OP_CAPTURING_GROUP_START:\n      {\n        const uint32_t group_idx = re_get_value (&bc_p);\n        ecma_regexp_capture_t *const group_p = re_ctx_p->captures_p + group_idx;\n        group_p->subcapture_count = re_get_value (&bc_p);\n\n        const lit_utf8_byte_t *const saved_begin_p = group_p->begin_p;\n        const lit_utf8_byte_t *const saved_end_p = group_p->end_p;\n        const uint32_t saved_iterator = group_p->iterator;\n\n        const uint32_t qmin = re_get_value (&bc_p);\n        group_p->end_p = NULL;\n\n        /* If zero iterations are allowed, then execute the end opcode which will handle further iterations,\n         * otherwise run the 1st iteration immediately by executing group bytecode. */\n        if (qmin == 0)\n        {\n          group_p->iterator = 0;\n          group_p->begin_p = NULL;\n          const uint32_t end_offset = re_get_value (&bc_p);\n          group_p->bc_p = bc_p;\n\n          bc_p += end_offset;\n        }\n        else\n        {\n          group_p->iterator = 1;\n          group_p->begin_p = str_curr_p;\n          group_p->bc_p = bc_p;\n        }\n\n        const lit_utf8_byte_t *matched_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n        group_p->iterator = saved_iterator;\n\n        if (matched_p == NULL)\n        {\n          group_p->begin_p = saved_begin_p;\n          group_p->end_p = saved_end_p;\n          goto fail;\n        }\n\n        return matched_p;\n      }\n      case RE_OP_NON_CAPTURING_GROUP_START:\n      {\n        const uint32_t group_idx = re_get_value (&bc_p);\n        ecma_regexp_non_capture_t *const group_p = re_ctx_p->non_captures_p + group_idx;\n\n        group_p->subcapture_start = re_get_value (&bc_p);\n        group_p->subcapture_count = re_get_value (&bc_p);\n\n        const lit_utf8_byte_t *const saved_begin_p = group_p->begin_p;\n        const uint32_t saved_iterator = group_p->iterator;\n        const uint32_t qmin = re_get_value (&bc_p);\n\n        /* If zero iterations are allowed, then execute the end opcode which will handle further iterations,\n         * otherwise run the 1st iteration immediately by executing group bytecode. */\n        if (qmin == 0)\n        {\n          group_p->iterator = 0;\n          group_p->begin_p = NULL;\n          const uint32_t end_offset = re_get_value (&bc_p);\n          group_p->bc_p = bc_p;\n\n          bc_p += end_offset;\n        }\n        else\n        {\n          group_p->iterator = 1;\n          group_p->begin_p = str_curr_p;\n          group_p->bc_p = bc_p;\n        }\n\n        const lit_utf8_byte_t *matched_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n        group_p->iterator = saved_iterator;\n\n        if (matched_p == NULL)\n        {\n          group_p->begin_p = saved_begin_p;\n          goto fail;\n        }\n\n        return matched_p;\n      }\n      case RE_OP_GREEDY_CAPTURING_GROUP_END:\n      {\n        const uint32_t group_idx = re_get_value (&bc_p);\n        ecma_regexp_capture_t *const group_p = re_ctx_p->captures_p + group_idx;\n        const uint32_t qmin = re_get_value (&bc_p);\n\n        if (group_p->iterator < qmin)\n        {\n          /* No need to save begin_p since we don't have to backtrack beyond the minimum iteration count, but we have\n           * to clear nested capturing groups. */\n          group_p->begin_p = str_curr_p;\n          for (uint32_t i = 1; i < group_p->subcapture_count; ++i)\n          {\n            group_p[i].begin_p = NULL;\n          }\n\n          group_p->iterator++;\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, group_p->bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          group_p->iterator--;\n          goto fail;\n        }\n\n        /* Empty matches are not allowed after reaching the minimum number of iterations. */\n        if (JERRY_UNLIKELY (group_p->begin_p >= str_curr_p) && (group_p->iterator > qmin))\n        {\n          goto fail;\n        }\n\n        const uint32_t qmax = re_get_value (&bc_p) - RE_QMAX_OFFSET;\n        if (JERRY_UNLIKELY (group_p->iterator >= qmax))\n        {\n          /* Reached maximum number of iterations, try to match tail bytecode. */\n          group_p->end_p = str_curr_p;\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          goto fail;\n        }\n\n        {\n          /* Save and clear all nested capturing groups, and try to iterate. */\n          JERRY_VLA (const lit_utf8_byte_t *, saved_captures_p, group_p->subcapture_count);\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            saved_captures_p[i] = group_p[i].begin_p;\n            group_p[i].begin_p = NULL;\n          }\n\n          group_p->iterator++;\n          group_p->begin_p = str_curr_p;\n\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, group_p->bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          /* Failed to iterate again, backtrack to current match, and try to run tail bytecode. */\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            group_p[i].begin_p = saved_captures_p[i];\n          }\n\n          group_p->iterator--;\n          group_p->end_p = str_curr_p;\n        }\n\n        const lit_utf8_byte_t *const tail_match_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n        if (tail_match_p != NULL)\n        {\n          return tail_match_p;\n        }\n\n        goto fail;\n      }\n      case RE_OP_GREEDY_NON_CAPTURING_GROUP_END:\n      {\n        const uint32_t group_idx = re_get_value (&bc_p);\n        ecma_regexp_non_capture_t *const group_p = re_ctx_p->non_captures_p + group_idx;\n        const uint32_t qmin = re_get_value (&bc_p);\n\n        if (group_p->iterator < qmin)\n        {\n          /* No need to save begin_p but we have to clear nested capturing groups. */\n          group_p->begin_p = str_curr_p;\n\n          ecma_regexp_capture_t *const capture_p = re_ctx_p->captures_p + group_p->subcapture_start;\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            capture_p[i].begin_p = NULL;\n          }\n\n          group_p->iterator++;\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, group_p->bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          group_p->iterator--;\n          goto fail;\n        }\n\n        /* Empty matches are not allowed after reaching the minimum number of iterations. */\n        if (JERRY_UNLIKELY (group_p->begin_p >= str_curr_p) && (group_p->iterator > qmin))\n        {\n          goto fail;\n        }\n\n        const uint32_t qmax = re_get_value (&bc_p) - RE_QMAX_OFFSET;\n        if (JERRY_UNLIKELY (group_p->iterator >= qmax))\n        {\n          /* Reached maximum number of iterations, try to match tail bytecode. */\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          goto fail;\n        }\n\n        {\n          /* Save and clear all nested capturing groups, and try to iterate. */\n          JERRY_VLA (const lit_utf8_byte_t *, saved_captures_p, group_p->subcapture_count);\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            ecma_regexp_capture_t *const capture_p = re_ctx_p->captures_p + group_p->subcapture_start + i;\n            saved_captures_p[i] = capture_p->begin_p;\n            capture_p->begin_p = NULL;\n          }\n\n          group_p->iterator++;\n          const lit_utf8_byte_t *const saved_begin_p = group_p->begin_p;\n          group_p->begin_p = str_curr_p;\n\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, group_p->bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          /* Failed to iterate again, backtrack to current match, and try to run tail bytecode. */\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            ecma_regexp_capture_t *const capture_p = re_ctx_p->captures_p + group_p->subcapture_start + i;\n            capture_p->begin_p = saved_captures_p[i];\n          }\n\n          group_p->iterator--;\n          group_p->begin_p = saved_begin_p;\n        }\n\n        const lit_utf8_byte_t *const tail_match_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n        if (tail_match_p != NULL)\n        {\n          return tail_match_p;\n        }\n\n        goto fail;\n      }\n      case RE_OP_LAZY_CAPTURING_GROUP_END:\n      {\n        const uint32_t group_idx = re_get_value (&bc_p);\n        ecma_regexp_capture_t *const group_p = re_ctx_p->captures_p + group_idx;\n        const uint32_t qmin = re_get_value (&bc_p);\n\n        if (group_p->iterator < qmin)\n        {\n          /* No need to save begin_p but we have to clear nested capturing groups. */\n          group_p->begin_p = str_curr_p;\n          for (uint32_t i = 1; i < group_p->subcapture_count; ++i)\n          {\n            group_p[i].begin_p = NULL;\n          }\n\n          group_p->iterator++;\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, group_p->bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          group_p->iterator--;\n          goto fail;\n        }\n\n        /* Empty matches are not allowed after reaching the minimum number of iterations. */\n        if (JERRY_UNLIKELY (group_p->begin_p >= str_curr_p) && (group_p->iterator > qmin))\n        {\n          goto fail;\n        }\n\n        const uint32_t qmax = re_get_value (&bc_p) - RE_QMAX_OFFSET;\n        group_p->end_p = str_curr_p;\n\n        /* Try to match tail bytecode. */\n        const lit_utf8_byte_t *const tail_match_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n        if (tail_match_p != NULL)\n        {\n          return tail_match_p;\n        }\n\n        if (JERRY_UNLIKELY (group_p->iterator >= qmax))\n        {\n          /* Reached maximum number of iterations and tail bytecode did not match. */\n          goto fail;\n        }\n\n        {\n          /* Save and clear all nested capturing groups, and try to iterate. */\n          JERRY_VLA (const lit_utf8_byte_t *, saved_captures_p, group_p->subcapture_count);\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            saved_captures_p[i] = group_p[i].begin_p;\n            group_p[i].begin_p = NULL;\n          }\n\n          group_p->iterator++;\n          group_p->begin_p = str_curr_p;\n\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, group_p->bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          /* Backtrack to current match. */\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            group_p[i].begin_p = saved_captures_p[i];\n          }\n\n          group_p->iterator--;\n        }\n\n        goto fail;\n      }\n      case RE_OP_LAZY_NON_CAPTURING_GROUP_END:\n      {\n        const uint32_t group_idx = re_get_value (&bc_p);\n        ecma_regexp_non_capture_t *const group_p = re_ctx_p->non_captures_p + group_idx;\n        const uint32_t qmin = re_get_value (&bc_p);\n\n        if (group_p->iterator < qmin)\n        {\n          /* Clear nested captures. */\n          ecma_regexp_capture_t *const capture_p = re_ctx_p->captures_p + group_p->subcapture_start;\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            capture_p[i].begin_p = NULL;\n          }\n\n          group_p->iterator++;\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, group_p->bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          group_p->iterator--;\n          goto fail;\n        }\n\n        /* Empty matches are not allowed after reaching the minimum number of iterations. */\n        if (JERRY_UNLIKELY (group_p->begin_p >= str_curr_p) && (group_p->iterator > qmin))\n        {\n          goto fail;\n        }\n\n        const uint32_t qmax = re_get_value (&bc_p) - RE_QMAX_OFFSET;\n\n        /* Try to match tail bytecode. */\n        const lit_utf8_byte_t *const tail_match_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n        if (tail_match_p != NULL)\n        {\n          return tail_match_p;\n        }\n\n        if (JERRY_UNLIKELY (group_p->iterator >= qmax))\n        {\n          /* Reached maximum number of iterations and tail bytecode did not match. */\n          goto fail;\n        }\n\n        {\n          /* Save and clear all nested capturing groups, and try to iterate. */\n          JERRY_VLA (const lit_utf8_byte_t *, saved_captures_p, group_p->subcapture_count);\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            ecma_regexp_capture_t *const capture_p = re_ctx_p->captures_p + group_p->subcapture_start + i;\n            saved_captures_p[i] = capture_p->begin_p;\n            capture_p->begin_p = NULL;\n          }\n\n          group_p->iterator++;\n          const lit_utf8_byte_t *const saved_begin_p = group_p->begin_p;\n          group_p->begin_p = str_curr_p;\n\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, group_p->bc_p, str_curr_p);\n\n          if (matched_p != NULL)\n          {\n            return matched_p;\n          }\n\n          /* Backtrack to current match. */\n          for (uint32_t i = 0; i < group_p->subcapture_count; ++i)\n          {\n            ecma_regexp_capture_t *const capture_p = re_ctx_p->captures_p + group_p->subcapture_start + i;\n            capture_p->begin_p = saved_captures_p[i];\n          }\n\n          group_p->iterator--;\n          group_p->begin_p = saved_begin_p;\n        }\n\n        goto fail;\n      }\n      case RE_OP_GREEDY_ITERATOR:\n      {\n        const uint32_t qmin = re_get_value (&bc_p);\n        const uint32_t qmax = re_get_value (&bc_p) - RE_QMAX_OFFSET;\n        const uint32_t end_offset = re_get_value (&bc_p);\n\n        uint32_t iterator = 0;\n        while (iterator < qmin)\n        {\n          str_curr_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n          if (str_curr_p == NULL)\n          {\n            goto fail;\n          }\n\n          if (ECMA_RE_STACK_LIMIT_REACHED (str_curr_p))\n          {\n            return str_curr_p;\n          }\n\n          iterator++;\n        }\n\n        while (iterator < qmax)\n        {\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n          if (matched_p == NULL)\n          {\n            break;\n          }\n\n          if (ECMA_RE_STACK_LIMIT_REACHED (str_curr_p))\n          {\n            return str_curr_p;\n          }\n\n          str_curr_p = matched_p;\n          iterator++;\n        }\n\n        const uint8_t *const tail_bc_p = bc_p + end_offset;\n        while (true)\n        {\n          const lit_utf8_byte_t *const tail_match_p = ecma_regexp_run (re_ctx_p, tail_bc_p, str_curr_p);\n\n          if (tail_match_p != NULL)\n          {\n            return tail_match_p;\n          }\n\n          if (JERRY_UNLIKELY (iterator <= qmin))\n          {\n            goto fail;\n          }\n\n          iterator--;\n          JERRY_ASSERT (str_curr_p > re_ctx_p->input_start_p);\n          str_curr_p = ecma_regexp_step_back (re_ctx_p, str_curr_p);\n        }\n\n        JERRY_UNREACHABLE ();\n      }\n      case RE_OP_LAZY_ITERATOR:\n      {\n        const uint32_t qmin = re_get_value (&bc_p);\n        const uint32_t qmax = re_get_value (&bc_p) - RE_QMAX_OFFSET;\n        const uint32_t end_offset = re_get_value (&bc_p);\n\n        uint32_t iterator = 0;\n        while (iterator < qmin)\n        {\n          str_curr_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n          if (str_curr_p == NULL)\n          {\n            goto fail;\n          }\n\n          if (ECMA_RE_STACK_LIMIT_REACHED (str_curr_p))\n          {\n            return str_curr_p;\n          }\n\n          iterator++;\n        }\n\n        const uint8_t *const tail_bc_p = bc_p + end_offset;\n        while (true)\n        {\n          const lit_utf8_byte_t *const tail_match_p = ecma_regexp_run (re_ctx_p, tail_bc_p, str_curr_p);\n\n          if (tail_match_p != NULL)\n          {\n            return tail_match_p;\n          }\n\n          if (JERRY_UNLIKELY (iterator >= qmax))\n          {\n            goto fail;\n          }\n\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n          if (matched_p == NULL)\n          {\n            goto fail;\n          }\n\n          if (ECMA_RE_STACK_LIMIT_REACHED (matched_p))\n          {\n            return matched_p;\n          }\n\n          iterator++;\n          str_curr_p = matched_p;\n        }\n\n        JERRY_UNREACHABLE ();\n      }\n      case RE_OP_BACKREFERENCE:\n      {\n        const uint32_t backref_idx = re_get_value (&bc_p);\n        JERRY_ASSERT (backref_idx >= 1 && backref_idx < re_ctx_p->captures_count);\n        const ecma_regexp_capture_t *capture_p = re_ctx_p->captures_p + backref_idx;\n\n        if (!ECMA_RE_IS_CAPTURE_DEFINED (capture_p) || capture_p->end_p <= capture_p->begin_p)\n        {\n          /* Undefined or zero length captures always match. */\n          continue;\n        }\n\n        const lit_utf8_size_t capture_size = (lit_utf8_size_t) (capture_p->end_p - capture_p->begin_p);\n\n        if (str_curr_p + capture_size > re_ctx_p->input_end_p\n            || memcmp (str_curr_p, capture_p->begin_p, capture_size))\n        {\n          goto fail;\n        }\n\n        str_curr_p += capture_size;\n        continue;\n      }\n      case RE_OP_ASSERT_LINE_START:\n      {\n        if (str_curr_p <= re_ctx_p->input_start_p)\n        {\n          continue;\n        }\n\n        if (!(re_ctx_p->flags & RE_FLAG_MULTILINE) || !lit_char_is_line_terminator (lit_cesu8_peek_prev (str_curr_p)))\n        {\n          goto fail;\n        }\n\n        continue;\n      }\n      case RE_OP_ASSERT_LINE_END:\n      {\n        if (str_curr_p >= re_ctx_p->input_end_p)\n        {\n          continue;\n        }\n\n        if (!(re_ctx_p->flags & RE_FLAG_MULTILINE) || !lit_char_is_line_terminator (lit_cesu8_peek_next (str_curr_p)))\n        {\n          goto fail;\n        }\n\n        continue;\n      }\n      case RE_OP_ASSERT_WORD_BOUNDARY:\n      {\n        if (!ecma_regexp_is_word_boundary (re_ctx_p, str_curr_p))\n        {\n          goto fail;\n        }\n\n        continue;\n      }\n      case RE_OP_ASSERT_NOT_WORD_BOUNDARY:\n      {\n        if (ecma_regexp_is_word_boundary (re_ctx_p, str_curr_p))\n        {\n          goto fail;\n        }\n\n        continue;\n      }\n      case RE_OP_ASSERT_LOOKAHEAD_POS:\n      {\n        const uint8_t qmin = re_get_byte (&bc_p);\n        const uint32_t capture_start = re_get_value (&bc_p);\n        const uint32_t capture_count = re_get_value (&bc_p);\n        const uint32_t end_offset = re_get_value (&bc_p);\n\n        /* If qmin is zero, the assertion implicitly matches. */\n        if (qmin == 0)\n        {\n          bc_p += end_offset;\n          continue;\n        }\n\n        /* Capture end pointers might get clobbered and need to be restored after a tail match fail. */\n        JERRY_VLA (const lit_utf8_byte_t *, saved_captures_p, capture_count);\n        for (uint32_t i = 0; i < capture_count; ++i)\n        {\n          ecma_regexp_capture_t *const capture_p = re_ctx_p->captures_p + capture_start + i;\n          saved_captures_p[i] = capture_p->end_p;\n        }\n\n        /* The first iteration will decide whether the assertion matches depending on whether\n         * the iteration matched or not. */\n        const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n        if (ECMA_RE_STACK_LIMIT_REACHED (matched_p))\n        {\n          return matched_p;\n        }\n\n        if (matched_p == NULL)\n        {\n          goto fail;\n        }\n\n        const lit_utf8_byte_t *tail_match_p = ecma_regexp_run (re_ctx_p, bc_p + end_offset, str_curr_p);\n\n        if (tail_match_p == NULL)\n        {\n          for (uint32_t i = 0; i < capture_count; ++i)\n          {\n            ecma_regexp_capture_t *const capture_p = re_ctx_p->captures_p + capture_start + i;\n            capture_p->begin_p = NULL;\n            capture_p->end_p = saved_captures_p[i];\n          }\n\n          goto fail;\n        }\n\n        return tail_match_p;\n      }\n      case RE_OP_ASSERT_LOOKAHEAD_NEG:\n      {\n        const uint8_t qmin = re_get_byte (&bc_p);\n        uint32_t capture_idx = re_get_value (&bc_p);\n        const uint32_t capture_count = re_get_value (&bc_p);\n        const uint32_t end_offset = re_get_value (&bc_p);\n\n        /* If qmin is zero, the assertion implicitly matches. */\n        if (qmin > 0)\n        {\n          /* The first iteration will decide whether the assertion matches depending on whether\n           * the iteration matched or not. */\n          const lit_utf8_byte_t *const matched_p = ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n\n          if (ECMA_RE_STACK_LIMIT_REACHED (matched_p))\n          {\n            return matched_p;\n          }\n\n          if (matched_p != NULL)\n          {\n            /* Nested capturing groups inside a negative lookahead can never capture, so we clear their results. */\n            const uint32_t capture_end = capture_idx + capture_count;\n            while (capture_idx < capture_end)\n            {\n              re_ctx_p->captures_p[capture_idx++].begin_p = NULL;\n            }\n\n            goto fail;\n          }\n        }\n\n        bc_p += end_offset;\n        continue;\n      }\n      case RE_OP_CLASS_ESCAPE:\n      {\n        if (str_curr_p >= re_ctx_p->input_end_p)\n        {\n          goto fail;\n        }\n\n        const lit_code_point_t cp = ecma_regexp_advance (re_ctx_p, &str_curr_p);\n\n        const ecma_class_escape_t escape = (ecma_class_escape_t) re_get_byte (&bc_p);\n        if (!ecma_regexp_check_class_escape (cp, escape))\n        {\n          goto fail;\n        }\n\n        continue;\n      }\n      case RE_OP_CHAR_CLASS:\n      {\n        if (str_curr_p >= re_ctx_p->input_end_p)\n        {\n          goto fail;\n        }\n\n        uint8_t flags = re_get_byte (&bc_p);\n        uint32_t char_count = (flags & RE_CLASS_HAS_CHARS) ? re_get_value (&bc_p) : 0;\n        uint32_t range_count = (flags & RE_CLASS_HAS_RANGES) ? re_get_value (&bc_p) : 0;\n\n        const lit_code_point_t cp = ecma_regexp_advance (re_ctx_p, &str_curr_p);\n\n        uint8_t escape_count = flags & RE_CLASS_ESCAPE_COUNT_MASK;\n        while (escape_count > 0)\n        {\n          escape_count--;\n          const ecma_class_escape_t escape = re_get_byte (&bc_p);\n          if (ecma_regexp_check_class_escape (cp, escape))\n          {\n            goto class_found;\n          }\n        }\n\n        while (char_count > 0)\n        {\n          char_count--;\n          const lit_code_point_t curr = re_get_char (&bc_p, re_ctx_p->flags & RE_FLAG_UNICODE);\n          if (cp == curr)\n          {\n            goto class_found;\n          }\n        }\n\n        while (range_count > 0)\n        {\n          range_count--;\n          const lit_code_point_t begin = re_get_char (&bc_p, re_ctx_p->flags & RE_FLAG_UNICODE);\n\n          if (cp < begin)\n          {\n            bc_p += re_ctx_p->char_size;\n            continue;\n          }\n\n          const lit_code_point_t end = re_get_char (&bc_p, re_ctx_p->flags & RE_FLAG_UNICODE);\n          if (cp <= end)\n          {\n            goto class_found;\n          }\n        }\n\n        /* Not found */\n        if (flags & RE_CLASS_INVERT)\n        {\n          continue;\n        }\n\n        goto fail;\n\nclass_found:\n        if (flags & RE_CLASS_INVERT)\n        {\n          goto fail;\n        }\n\n        const uint32_t chars_size = char_count * re_ctx_p->char_size;\n        const uint32_t ranges_size = range_count * re_ctx_p->char_size * 2;\n        bc_p = bc_p + escape_count + chars_size + ranges_size;\n        continue;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case RE_OP_UNICODE_PERIOD:\n      {\n        if (str_curr_p >= re_ctx_p->input_end_p)\n        {\n          goto fail;\n        }\n\n        const lit_code_point_t cp = ecma_regexp_unicode_advance (&str_curr_p, re_ctx_p->input_end_p);\n\n        if (!(re_ctx_p->flags & RE_FLAG_DOTALL)\n            && JERRY_UNLIKELY (cp <= LIT_UTF16_CODE_UNIT_MAX\n                               && lit_char_is_line_terminator ((ecma_char_t) cp)))\n        {\n          goto fail;\n        }\n\n        continue;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case RE_OP_PERIOD:\n      {\n        if (str_curr_p >= re_ctx_p->input_end_p)\n        {\n          goto fail;\n        }\n\n        const ecma_char_t ch = lit_cesu8_read_next (&str_curr_p);\n#if !ENABLED (JERRY_ESNEXT)\n        bool has_dot_all_flag = false;\n#else /* ENABLED (JERRY_ESNEXT) */\n        bool has_dot_all_flag = (re_ctx_p->flags & RE_FLAG_DOTALL) != 0;\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n        if (!has_dot_all_flag && lit_char_is_line_terminator (ch))\n        {\n          goto fail;\n        }\n\n        continue;\n      }\n      case RE_OP_CHAR:\n      {\n        if (str_curr_p >= re_ctx_p->input_end_p)\n        {\n          goto fail;\n        }\n\n        const lit_code_point_t ch1 = re_get_char (&bc_p, re_ctx_p->flags & RE_FLAG_UNICODE);\n        const lit_code_point_t ch2 = ecma_regexp_advance (re_ctx_p, &str_curr_p);\n\n        if (ch1 != ch2)\n        {\n          goto fail;\n        }\n\n        continue;\n      }\n      default:\n      {\n        JERRY_ASSERT (op == RE_OP_BYTE);\n\n        if (str_curr_p >= re_ctx_p->input_end_p\n            || *bc_p++ != *str_curr_p++)\n        {\n          goto fail;\n        }\n\n        continue;\n      }\n    }\n\n    JERRY_UNREACHABLE ();\nfail:\n    bc_p = next_alternative_p;\n\n    if (bc_p == NULL || *bc_p++ != RE_OP_ALTERNATIVE_NEXT)\n    {\n      /* None of the alternatives matched. */\n      return NULL;\n    }\n\n    /* Get the end of the new alternative and continue execution. */\n    str_curr_p = str_start_p;\n    const uint32_t offset = re_get_value (&bc_p);\n    next_alternative_p = bc_p + offset;\n  }\n} /* ecma_regexp_run */\n\n/**\n * Match a RegExp at a specific position in the input string.\n *\n * @return pointer to the end of the matched sub-string\n *         NULL, if pattern did not match\n */\nstatic const lit_utf8_byte_t *\necma_regexp_match (ecma_regexp_ctx_t *re_ctx_p, /**< RegExp matcher context */\n                   const uint8_t *bc_p, /**< pointer to the current RegExp bytecode */\n                   const lit_utf8_byte_t *str_curr_p) /**< input string pointer */\n{\n  re_ctx_p->captures_p[RE_GLOBAL_CAPTURE].begin_p = str_curr_p;\n\n  for (uint32_t i = 1; i < re_ctx_p->captures_count; ++i)\n  {\n    re_ctx_p->captures_p[i].begin_p = NULL;\n  }\n\n  return ecma_regexp_run (re_ctx_p, bc_p, str_curr_p);\n} /* ecma_regexp_match */\n\n/*\n * Helper function to get the result of a capture\n *\n * @return string value, if capture is defined\n *         undefined, otherwise\n */\necma_value_t\necma_regexp_get_capture_value (const ecma_regexp_capture_t *const capture_p) /**< capture */\n{\n  if (ECMA_RE_IS_CAPTURE_DEFINED (capture_p))\n  {\n    JERRY_ASSERT (capture_p->end_p >= capture_p->begin_p);\n    const lit_utf8_size_t capture_size = (lit_utf8_size_t) (capture_p->end_p - capture_p->begin_p);\n    ecma_string_t *const capture_str_p = ecma_new_ecma_string_from_utf8 (capture_p->begin_p, capture_size);\n    return ecma_make_string_value (capture_str_p);\n  }\n\n  return ECMA_VALUE_UNDEFINED;\n} /* ecma_regexp_get_capture_value */\n\n/**\n * Helper function to create a result array from the captures in a regexp context\n *\n * @return ecma value containing the created array object\n */\nstatic ecma_value_t\necma_regexp_create_result_object (ecma_regexp_ctx_t *re_ctx_p, /**< regexp context */\n                                  ecma_string_t *input_string_p, /**< input ecma string */\n                                  uint32_t index) /**< match index */\n{\n  ecma_object_t *result_p = ecma_op_new_array_object (0);\n\n  for (uint32_t i = 0; i < re_ctx_p->captures_count; i++)\n  {\n    ecma_value_t capture_value = ecma_regexp_get_capture_value (re_ctx_p->captures_p + i);\n    ecma_builtin_helper_def_prop_by_index (result_p,\n                                           i,\n                                           capture_value,\n                                           ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n    ecma_free_value (capture_value);\n  }\n\n  ecma_builtin_helper_def_prop (result_p,\n                                ecma_get_magic_string (LIT_MAGIC_STRING_INDEX),\n                                ecma_make_uint32_value (index),\n                                ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n\n  ecma_builtin_helper_def_prop (result_p,\n                                ecma_get_magic_string (LIT_MAGIC_STRING_INPUT),\n                                ecma_make_string_value (input_string_p),\n                                ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n\n  return ecma_make_object_value (result_p);\n} /* ecma_regexp_create_result_object */\n\n/**\n * Helper function to initialize a regexp match context\n */\nstatic void\necma_regexp_initialize_context (ecma_regexp_ctx_t *ctx_p, /**< regexp context */\n                                const re_compiled_code_t *bc_p, /**< regexp bytecode */\n                                const lit_utf8_byte_t *input_start_p, /**< pointer to input string */\n                                const lit_utf8_byte_t *input_end_p) /**< pointer to end of input string */\n{\n  JERRY_ASSERT (ctx_p != NULL);\n  JERRY_ASSERT (bc_p != NULL);\n  JERRY_ASSERT (input_start_p != NULL);\n  JERRY_ASSERT (input_end_p >= input_start_p);\n\n  ctx_p->flags = bc_p->header.status_flags;\n  ctx_p->char_size = (ctx_p->flags & RE_FLAG_UNICODE) ? sizeof (lit_code_point_t) : sizeof (ecma_char_t);\n\n  ctx_p->input_start_p = input_start_p;\n  ctx_p->input_end_p = input_end_p;\n\n  ctx_p->captures_count = bc_p->captures_count;\n  ctx_p->non_captures_count = bc_p->non_captures_count;\n\n  ctx_p->captures_p = jmem_heap_alloc_block (ctx_p->captures_count * sizeof (ecma_regexp_capture_t));\n\n  if (ctx_p->non_captures_count > 0)\n  {\n    ctx_p->non_captures_p = jmem_heap_alloc_block (ctx_p->non_captures_count * sizeof (ecma_regexp_non_capture_t));\n  }\n} /* ecma_regexp_initialize_context */\n\n/**\n * Helper function to clean up a regexp context\n */\nstatic void\necma_regexp_cleanup_context (ecma_regexp_ctx_t *ctx_p) /**< regexp context */\n{\n  JERRY_ASSERT (ctx_p != NULL);\n  jmem_heap_free_block (ctx_p->captures_p, ctx_p->captures_count * sizeof (ecma_regexp_capture_t));\n\n  if (ctx_p->non_captures_count > 0)\n  {\n    jmem_heap_free_block (ctx_p->non_captures_p, ctx_p->non_captures_count * sizeof (ecma_regexp_non_capture_t));\n  }\n} /* ecma_regexp_cleanup_context */\n\n/**\n * RegExp helper function to start the recursive matching algorithm\n * and create the result Array object\n *\n * See also:\n *          ECMA-262 v5, 15.10.6.2\n *          ECMA-262 v11, 21.2.5.2.2\n *\n * @return array object - if matched\n *         null         - otherwise\n *\n *         May raise error.\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_regexp_exec_helper (ecma_object_t *regexp_object_p, /**< RegExp object */\n                         ecma_string_t *input_string_p) /**< input string */\n{\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  /* 1. */\n  JERRY_ASSERT (ecma_object_is_regexp_object (ecma_make_object_value (regexp_object_p)));\n\n  /* 9. */\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) regexp_object_p;\n  re_compiled_code_t *bc_p = ECMA_GET_INTERNAL_VALUE_ANY_POINTER (re_compiled_code_t,\n                                                                  ext_object_p->u.class_prop.u.value);\n\n  /* 3. */\n  lit_utf8_size_t input_size;\n  lit_utf8_size_t input_length;\n  uint8_t input_flags = ECMA_STRING_FLAG_IS_ASCII;\n  const lit_utf8_byte_t *input_buffer_p = ecma_string_get_chars (input_string_p,\n                                                                 &input_size,\n                                                                 &input_length,\n                                                                 NULL,\n                                                                 &input_flags);\n\n  const lit_utf8_byte_t *input_curr_p = input_buffer_p;\n  const lit_utf8_byte_t *input_end_p = input_buffer_p + input_size;\n\n  ecma_regexp_ctx_t re_ctx;\n  ecma_regexp_initialize_context (&re_ctx,\n                                  bc_p,\n                                  input_buffer_p,\n                                  input_end_p);\n\n  /* 4. */\n  ecma_length_t index = 0;\n  ecma_value_t lastindex_value = ecma_op_object_get_by_magic_id (regexp_object_p, LIT_MAGIC_STRING_LASTINDEX_UL);\n\n#if ENABLED (JERRY_ESNEXT)\n  ret_value = ecma_op_to_length (lastindex_value, &index);\n  ecma_free_value (lastindex_value);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_number_t lastindex_num = 0.0f;\n  ret_value = ecma_op_to_integer (lastindex_value, &lastindex_num);\n  ecma_free_value (lastindex_value);\n\n  /* The ToInteger operation might have thrown an error, however in that case lastindex_num will still be zero,\n   * and the error will be handled later after the uint32 coercion. */\n  if ((re_ctx.flags & RE_FLAG_GLOBAL) && lastindex_num < 0.0f)\n  {\n    JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (ret_value));\n    goto fail_put_lastindex;\n  }\n\n  index = ecma_number_to_uint32 (lastindex_num);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    goto cleanup_context;\n  }\n\n  if (re_ctx.flags & (RE_FLAG_GLOBAL | RE_FLAG_STICKY))\n  {\n    /* 12.a */\n    if (index > input_length)\n    {\n      goto fail_put_lastindex;\n    }\n\n    if (index > 0)\n    {\n      if (input_flags & ECMA_STRING_FLAG_IS_ASCII)\n      {\n        input_curr_p += index;\n      }\n      else\n      {\n        for (uint32_t i = 0; i < index; i++)\n        {\n          lit_utf8_incr (&input_curr_p);\n        }\n      }\n    }\n  }\n  /* 8. */\n  else\n  {\n    index = 0;\n  }\n\n  /* 9. */\n  uint8_t *bc_start_p = (uint8_t *) (bc_p + 1);\n\n  /* 11. */\n  const lit_utf8_byte_t *matched_p = NULL;\n\n  /* 12. */\n  JERRY_ASSERT (index <= input_length);\n  while (true)\n  {\n    matched_p = ecma_regexp_match (&re_ctx, bc_start_p, input_curr_p);\n\n    if (matched_p != NULL)\n    {\n      goto match_found;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    /* 12.c.i */\n    if (re_ctx.flags & RE_FLAG_STICKY)\n    {\n      goto fail_put_lastindex;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    /* 12.a */\n    if (input_curr_p >= input_end_p)\n    {\n      if (re_ctx.flags & RE_FLAG_GLOBAL)\n      {\n        goto fail_put_lastindex;\n      }\n\n      goto match_failed;\n    }\n\n    JERRY_ASSERT (input_curr_p < input_end_p);\n\n    /* 12.c.ii */\n    index++;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (re_ctx.flags & RE_FLAG_UNICODE)\n    {\n      const lit_code_point_t cp = ecma_regexp_unicode_advance (&input_curr_p, input_end_p);\n\n      if (cp > LIT_UTF16_CODE_UNIT_MAX)\n      {\n        index++;\n      }\n\n      continue;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    lit_utf8_incr (&input_curr_p);\n  }\n\n  JERRY_UNREACHABLE ();\n\nfail_put_lastindex:\n  /* We should only get here if the regexp is global or sticky */\n  JERRY_ASSERT ((re_ctx.flags & (RE_FLAG_GLOBAL | RE_FLAG_STICKY)) != 0);\n\n  ret_value = ecma_op_object_put (regexp_object_p,\n                                  ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                  ecma_make_integer_value (0),\n                                  true);\n\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    goto cleanup_context;\n  }\n\n  JERRY_ASSERT (ecma_is_value_boolean (ret_value));\n\nmatch_failed:\n  /* 12.a.ii */\n  ret_value = ECMA_VALUE_NULL;\n  goto cleanup_context;\n\nmatch_found:\n  JERRY_ASSERT (matched_p != NULL);\n\n  if (ECMA_RE_STACK_LIMIT_REACHED (matched_p))\n  {\n    ret_value = ecma_raise_range_error (ECMA_ERR_MSG (\"Stack limit exceeded.\"));\n    goto cleanup_context;\n  }\n\n  JERRY_ASSERT (index <= input_length);\n\n  /* 15. */\n  if (re_ctx.flags & (RE_FLAG_GLOBAL | RE_FLAG_STICKY))\n  {\n    /* 13-14. */\n    lit_utf8_size_t match_length;\n    const lit_utf8_byte_t *match_begin_p = re_ctx.captures_p[0].begin_p;\n    const lit_utf8_byte_t *match_end_p = re_ctx.captures_p[0].end_p;\n\n    if (input_flags & ECMA_STRING_FLAG_IS_ASCII)\n    {\n      match_length = (lit_utf8_size_t) (match_end_p - match_begin_p);\n    }\n    else\n    {\n      match_length = lit_utf8_string_length (match_begin_p,\n                                             (lit_utf8_size_t) (match_end_p - match_begin_p));\n    }\n\n    ret_value = ecma_op_object_put (regexp_object_p,\n                                    ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                    ecma_make_uint32_value ((uint32_t) index + match_length),\n                                    true);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      goto cleanup_context;\n    }\n\n    JERRY_ASSERT (ecma_is_value_boolean (ret_value));\n  }\n\n  /* 16-27. */\n  ret_value = ecma_regexp_create_result_object (&re_ctx, input_string_p, (uint32_t) index);\n\ncleanup_context:\n  ecma_regexp_cleanup_context (&re_ctx);\n\n  if (input_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) input_buffer_p, input_size);\n  }\n\n  return ret_value;\n} /* ecma_regexp_exec_helper */\n\n/**\n * Helper function for converting a RegExp pattern parameter to string.\n *\n * See also:\n *         RegExp.compile\n *         RegExp dispatch call\n *\n * @return empty value if success, error value otherwise\n *         Returned value must be freed with ecma_free_value.\n */\necma_string_t *\necma_regexp_read_pattern_str_helper (ecma_value_t pattern_arg) /**< the RegExp pattern */\n{\n  if (!ecma_is_value_undefined (pattern_arg))\n  {\n    ecma_string_t *pattern_string_p = ecma_op_to_string (pattern_arg);\n    if (JERRY_UNLIKELY (pattern_string_p == NULL) || !ecma_string_is_empty (pattern_string_p))\n    {\n      return pattern_string_p;\n    }\n  }\n\n  return ecma_get_magic_string (LIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP);\n} /* ecma_regexp_read_pattern_str_helper */\n\n/**\n * Helper function for RegExp based string searches\n *\n * See also:\n *          ECMA-262 v6, 21.2.5.9\n *\n * @return index of the match\n */\necma_value_t\necma_regexp_search_helper (ecma_value_t regexp_arg, /**< regexp argument */\n                           ecma_value_t string_arg) /**< string argument */\n{\n  /* 2. */\n  if (!ecma_is_value_object (regexp_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not an object.\"));\n  }\n\n  ecma_value_t result = ECMA_VALUE_ERROR;\n\n  /* 3. */\n  ecma_string_t *const string_p = ecma_op_to_string (string_arg);\n  if (string_p == NULL)\n  {\n    return result;\n  }\n\n  ecma_object_t *const regexp_object_p = ecma_get_object_from_value (regexp_arg);\n\n  /* 4. */\n  ecma_string_t *const last_index_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL);\n  const ecma_value_t prev_last_index = ecma_op_object_get (regexp_object_p, last_index_str_p);\n  if (ECMA_IS_VALUE_ERROR (prev_last_index))\n  {\n    goto cleanup_string;\n  }\n\n  /* 5. */\n  if (prev_last_index != ecma_make_uint32_value (0))\n  {\n    const ecma_value_t status = ecma_op_object_put (regexp_object_p,\n                                                    last_index_str_p,\n                                                    ecma_make_uint32_value (0),\n                                                    true);\n\n    if (ECMA_IS_VALUE_ERROR (status))\n    {\n      goto cleanup_prev_last_index;\n    }\n\n    JERRY_ASSERT (ecma_is_value_boolean (status));\n  }\n\n  /* 6. */\n  const ecma_value_t match = ecma_op_regexp_exec (regexp_arg, string_p);\n  if (ECMA_IS_VALUE_ERROR (match))\n  {\n    goto cleanup_prev_last_index;\n  }\n\n  /* 7. */\n  const ecma_value_t current_last_index = ecma_op_object_get (regexp_object_p, last_index_str_p);\n  if (ECMA_IS_VALUE_ERROR (current_last_index))\n  {\n    ecma_free_value (match);\n    goto cleanup_prev_last_index;\n  }\n\n  const bool same_value = ecma_op_same_value (prev_last_index, current_last_index);\n\n  ecma_free_value (current_last_index);\n\n  /* 8. */\n  if (!same_value)\n  {\n    result = ecma_op_object_put (regexp_object_p, last_index_str_p, prev_last_index, true);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      ecma_free_value (match);\n      goto cleanup_prev_last_index;\n    }\n\n    JERRY_ASSERT (ecma_is_value_boolean (result));\n  }\n\n  /* 9-10. */\n  if (ecma_is_value_null (match))\n  {\n    result = ecma_make_int32_value (-1);\n  }\n  else\n  {\n    ecma_object_t *const match_p = ecma_get_object_from_value (match);\n    result = ecma_op_object_get_by_magic_id (match_p, LIT_MAGIC_STRING_INDEX);\n    ecma_deref_object (match_p);\n  }\n\ncleanup_prev_last_index:\n  ecma_free_value (prev_last_index);\n\ncleanup_string:\n  ecma_deref_ecma_string (string_p);\n  return result;\n} /* ecma_regexp_search_helper */\n\n/**\n * Helper function for RegExp based string split operation\n *\n * See also:\n *          ECMA-262 v6, 21.2.5.11\n *\n * @return array of split and captured strings\n */\necma_value_t\necma_regexp_split_helper (ecma_value_t this_arg, /**< this value */\n                          ecma_value_t string_arg, /**< string value */\n                          ecma_value_t limit_arg) /**< limit value */\n{\n#if ENABLED (JERRY_ESNEXT)\n  /* 2. */\n  if (!ecma_is_value_object (this_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not an object.\"));\n  }\n\n  ecma_value_t result = ECMA_VALUE_ERROR;\n\n  /* 3-4. */\n  ecma_string_t *const string_p = ecma_op_to_string (string_arg);\n  if (string_p == NULL)\n  {\n    return result;\n  }\n\n  /* 5-6. */\n  ecma_object_t *const regexp_obj_p = ecma_get_object_from_value (this_arg);\n  ecma_value_t constructor = ecma_op_species_constructor (regexp_obj_p, ECMA_BUILTIN_ID_REGEXP);\n  if (ECMA_IS_VALUE_ERROR (constructor))\n  {\n    goto cleanup_string;\n  }\n\n  ecma_object_t *const constructor_obj_p = ecma_get_object_from_value (constructor);\n\n  /* 7-8. */\n  ecma_value_t flags = ecma_op_object_get_by_magic_id (regexp_obj_p, LIT_MAGIC_STRING_FLAGS);\n  if (ECMA_IS_VALUE_ERROR (flags))\n  {\n    ecma_deref_object (constructor_obj_p);\n    goto cleanup_string;\n  }\n\n  ecma_string_t *flags_str_p = ecma_op_to_string (flags);\n  ecma_free_value (flags);\n\n  if (JERRY_UNLIKELY (flags_str_p == NULL))\n  {\n    ecma_deref_object (constructor_obj_p);\n    goto cleanup_string;\n  }\n\n  lit_utf8_size_t flags_size;\n  uint8_t flags_str_flags = ECMA_STRING_FLAG_IS_ASCII;\n  const lit_utf8_byte_t *flags_buffer_p = ecma_string_get_chars (flags_str_p,\n                                                                 &flags_size,\n                                                                 NULL,\n                                                                 NULL,\n                                                                 &flags_str_flags);\n\n  bool unicode = false;\n  bool sticky = false;\n\n  /* 9-11. */\n  const lit_utf8_byte_t *const flags_end_p = flags_buffer_p + flags_size;\n  for (const lit_utf8_byte_t *current_p = flags_buffer_p; current_p < flags_end_p; ++current_p)\n  {\n    switch (*current_p)\n    {\n      case LIT_CHAR_LOWERCASE_U:\n      {\n        unicode = true;\n        break;\n      }\n      case LIT_CHAR_LOWERCASE_Y:\n      {\n        sticky = true;\n        break;\n      }\n    }\n  }\n\n  if (flags_str_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) flags_buffer_p, flags_size);\n  }\n\n  /* 12. */\n  if (!sticky)\n  {\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (flags_str_p);\n    ecma_stringbuilder_append_byte (&builder, LIT_CHAR_LOWERCASE_Y);\n\n    ecma_deref_ecma_string (flags_str_p);\n    flags_str_p = ecma_stringbuilder_finalize (&builder);\n  }\n\n  /* 13-14. */\n  ecma_value_t arguments[] = { this_arg, ecma_make_string_value (flags_str_p) };\n  ecma_value_t splitter = ecma_op_function_construct (constructor_obj_p, constructor_obj_p, arguments, 2);\n\n  ecma_deref_ecma_string (flags_str_p);\n  ecma_deref_object (constructor_obj_p);\n\n  if (ECMA_IS_VALUE_ERROR (splitter))\n  {\n    goto cleanup_string;\n  }\n\n  ecma_object_t *const splitter_obj_p = ecma_get_object_from_value (splitter);\n\n  /* 17. */\n  uint32_t limit = UINT32_MAX - 1;\n  if (!ecma_is_value_undefined (limit_arg))\n  {\n    /* ECMA-262 v11, 21.2.5.13 13 */\n    ecma_number_t num;\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (limit_arg, &num)))\n    {\n      goto cleanup_splitter;\n    }\n    limit = ecma_number_to_uint32 (num);\n  }\n\n  /* 15. */\n  ecma_object_t *const array_p = ecma_op_new_array_object (0);\n  ecma_value_t array = ecma_make_object_value (array_p);\n\n  /* 21. */\n  if (limit == 0)\n  {\n    result = array;\n    goto cleanup_splitter;\n  }\n\n  const lit_utf8_size_t string_length = ecma_string_get_length (string_p);\n\n  uint32_t array_length = 0;\n\n  /* 22. */\n  if (string_length == 0)\n  {\n    const ecma_value_t match = ecma_op_regexp_exec (splitter, string_p);\n\n    if (ECMA_IS_VALUE_ERROR (match))\n    {\n      goto cleanup_array;\n    }\n\n    if (ecma_is_value_null (match))\n    {\n      result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                      array_length,\n                                                      ecma_make_string_value (string_p),\n                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n      JERRY_ASSERT (ecma_is_value_true (result));\n    }\n\n    ecma_free_value (match);\n    result = array;\n    goto cleanup_splitter;\n  }\n\n  /* 23. */\n  ecma_length_t current_index = 0;\n  ecma_length_t previous_index = 0;\n\n  ecma_string_t *const lastindex_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL);\n\n  /* 24. */\n  while (current_index < string_length)\n  {\n    /* 24.a-b. */\n    ecma_value_t index_value = ecma_make_length_value (current_index);\n    result = ecma_op_object_put (splitter_obj_p,\n                                 lastindex_str_p,\n                                 index_value,\n                                 true);\n\n    ecma_free_value (index_value);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_array;\n    }\n\n    JERRY_ASSERT (ecma_is_value_true (result));\n\n    /* 24.c-d. */\n    result = ecma_op_regexp_exec (splitter, string_p);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_array;\n    }\n\n    /* 24.e. */\n    if (ecma_is_value_null (result))\n    {\n      current_index = ecma_op_advance_string_index (string_p, current_index, unicode);\n      continue;\n    }\n\n    ecma_object_t *const match_array_p = ecma_get_object_from_value (result);\n\n    /* 24.f.i. */\n    result = ecma_op_object_get (splitter_obj_p, lastindex_str_p);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      ecma_deref_object (match_array_p);\n      goto cleanup_array;\n    }\n\n    ecma_length_t end_index;\n    const ecma_value_t length_value = ecma_op_to_length (result, &end_index);\n    ecma_free_value (result);\n\n    if (ECMA_IS_VALUE_ERROR (length_value))\n    {\n      result = ECMA_VALUE_ERROR;\n      ecma_deref_object (match_array_p);\n      goto cleanup_array;\n    }\n\n    /* ECMA-262 v11, 21.2.5.11 19.d.ii */\n    if (end_index > string_length)\n    {\n      end_index = string_length;\n    }\n\n    /* 24.f.iii. */\n    if (previous_index == end_index)\n    {\n      ecma_deref_object (match_array_p);\n      current_index = ecma_op_advance_string_index (string_p, current_index, unicode);\n      continue;\n    }\n\n    /* 24.f.iv.1-4. */\n    JERRY_ASSERT (previous_index <= string_length && current_index <= string_length);\n    ecma_string_t *const split_str_p = ecma_string_substr (string_p,\n                                                           (lit_utf8_size_t) previous_index,\n                                                           (lit_utf8_size_t) current_index);\n\n    result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                    array_length++,\n                                                    ecma_make_string_value (split_str_p),\n                                                    ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n    JERRY_ASSERT (ecma_is_value_true (result));\n    ecma_deref_ecma_string (split_str_p);\n\n    /* 24.f.iv.5. */\n    if (array_length == limit)\n    {\n      ecma_deref_object (match_array_p);\n      result = array;\n      goto cleanup_splitter;\n    }\n\n    /* 24.f.iv.6. */\n    previous_index = end_index;\n\n    /* 24.f.iv.7-8. */\n    ecma_length_t match_length;\n    result = ecma_op_object_get_length (match_array_p, &match_length);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      ecma_deref_object (match_array_p);\n      goto cleanup_array;\n    }\n\n    /* 24.f.iv.9. */\n    match_length = (match_length > 0) ? match_length - 1 : match_length;\n\n    ecma_length_t match_index = 1;\n    while (match_index <= match_length)\n    {\n      /* 24.f.iv.11.a-b. */\n      result = ecma_op_object_get_by_index (match_array_p, match_index++);\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        ecma_deref_object (match_array_p);\n        goto cleanup_array;\n      }\n\n      const ecma_value_t capture = result;\n\n      /* 24.f.iv.11.c. */\n      result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                      array_length++,\n                                                      capture,\n                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n      JERRY_ASSERT (ecma_is_value_true (result));\n\n      ecma_free_value (capture);\n\n      if (array_length == limit)\n      {\n        ecma_deref_object (match_array_p);\n        result = array;\n        goto cleanup_splitter;\n      }\n    }\n\n    /* 24.f.iv.12. */\n    JERRY_ASSERT (end_index <= UINT32_MAX);\n    current_index = (uint32_t) end_index;\n\n    ecma_deref_object (match_array_p);\n  }\n\n  JERRY_ASSERT (previous_index <= string_length);\n  ecma_string_t *const end_str_p = ecma_string_substr (string_p, (lit_utf8_size_t) previous_index, string_length);\n  result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                  array_length++,\n                                                  ecma_make_string_value (end_str_p),\n                                                  ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n  JERRY_ASSERT (ecma_is_value_true (result));\n  ecma_deref_ecma_string (end_str_p);\n\n  result = array;\n  goto cleanup_splitter;\n\ncleanup_array:\n  ecma_deref_object (array_p);\ncleanup_splitter:\n  ecma_deref_object (splitter_obj_p);\ncleanup_string:\n  ecma_deref_ecma_string (string_p);\n\n  return result;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  ecma_value_t result = ECMA_VALUE_ERROR;\n\n  /* 2. */\n  ecma_string_t *string_p = ecma_op_to_string (string_arg);\n  if (JERRY_UNLIKELY (string_p == NULL))\n  {\n    return result;\n  }\n\n  /* 5. */\n  uint32_t limit = UINT32_MAX;\n  if (!ecma_is_value_undefined (limit_arg))\n  {\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_length (limit_arg, &limit)))\n    {\n      goto cleanup_string;\n    }\n  }\n\n  /* 15. */\n  ecma_object_t *const array_p = ecma_op_new_array_object (0);\n  ecma_value_t array = ecma_make_object_value (array_p);\n\n  /* 21. */\n  if (limit == 0)\n  {\n    result = array;\n    goto cleanup_string;\n  }\n\n  uint32_t array_length = 0;\n\n  ecma_object_t *const regexp_p = ecma_get_object_from_value (this_arg);\n  ecma_extended_object_t *const ext_object_p = (ecma_extended_object_t *) regexp_p;\n  re_compiled_code_t *const bc_p = ECMA_GET_INTERNAL_VALUE_ANY_POINTER (re_compiled_code_t,\n                                                                        ext_object_p->u.class_prop.u.value);\n\n  lit_utf8_size_t string_size;\n  lit_utf8_size_t string_length;\n  uint8_t string_flags = ECMA_STRING_FLAG_IS_ASCII;\n  const lit_utf8_byte_t *string_buffer_p = ecma_string_get_chars (string_p,\n                                                                  &string_size,\n                                                                  &string_length,\n                                                                  NULL,\n                                                                  &string_flags);\n\n  const lit_utf8_byte_t *current_str_p = string_buffer_p;\n  const lit_utf8_byte_t *previous_str_p = string_buffer_p;\n  const lit_utf8_byte_t *const string_end_p = string_buffer_p + string_size;\n\n  ecma_regexp_ctx_t re_ctx;\n  ecma_regexp_initialize_context (&re_ctx,\n                                  bc_p,\n                                  string_buffer_p,\n                                  string_buffer_p + string_size);\n\n  uint8_t *const bc_start_p = (uint8_t *) (bc_p + 1);\n\n  if (string_length == 0)\n  {\n    const lit_utf8_byte_t *const matched_p = ecma_regexp_match (&re_ctx, bc_start_p, current_str_p);\n\n    if (ECMA_RE_STACK_LIMIT_REACHED (matched_p))\n    {\n      result = ecma_raise_range_error (ECMA_ERR_MSG (\"Stack limit exceeded.\"));\n      goto cleanup_array;\n    }\n\n    if (matched_p == NULL)\n    {\n      result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                      array_length,\n                                                      ecma_make_string_value (string_p),\n                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n      JERRY_ASSERT (ecma_is_value_true (result));\n    }\n\n    result = array;\n    goto cleanup_context;\n  }\n\n  /* 13. */\n  while (current_str_p < string_end_p)\n  {\n    /* 13.a. */\n    const lit_utf8_byte_t *const matched_p = ecma_regexp_match (&re_ctx, bc_start_p, current_str_p);\n\n    if (ECMA_RE_STACK_LIMIT_REACHED (matched_p))\n    {\n      result = ecma_raise_range_error (ECMA_ERR_MSG (\"Stack limit exceeded.\"));\n      goto cleanup_array;\n    }\n\n    if (matched_p == NULL || matched_p == previous_str_p)\n    {\n      lit_utf8_incr (&current_str_p);\n      continue;\n    }\n\n    /* 13.c.iii.1. */\n    ecma_string_t *const str_p = ecma_new_ecma_string_from_utf8 (previous_str_p,\n                                                                 (lit_utf8_size_t) (current_str_p - previous_str_p));\n\n    result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                    array_length++,\n                                                    ecma_make_string_value (str_p),\n                                                    ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n    JERRY_ASSERT (ecma_is_value_true (result));\n    ecma_deref_ecma_string (str_p);\n\n    if (array_length == limit)\n    {\n      result = array;\n      goto cleanup_context;\n    }\n\n    /* 13.c.iii.5. */\n    previous_str_p = matched_p;\n\n    uint32_t index = 1;\n    while (index < re_ctx.captures_count)\n    {\n      const ecma_value_t capture = ecma_regexp_get_capture_value (re_ctx.captures_p + index);\n      result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                      array_length++,\n                                                      capture,\n                                                      ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n      JERRY_ASSERT (ecma_is_value_true (result));\n      ecma_free_value (capture);\n\n      if (array_length == limit)\n      {\n        result = array;\n        goto cleanup_context;\n      }\n\n      index++;\n    }\n\n    /* 13.c.iii.8. */\n    current_str_p = matched_p;\n  }\n\n  ecma_string_t *const str_p = ecma_new_ecma_string_from_utf8 (previous_str_p,\n                                                               (lit_utf8_size_t) (string_end_p - previous_str_p));\n\n  result = ecma_builtin_helper_def_prop_by_index (array_p,\n                                                  array_length++,\n                                                  ecma_make_string_value (str_p),\n                                                  ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n  JERRY_ASSERT (ecma_is_value_true (result));\n  ecma_deref_ecma_string (str_p);\n\n  result = array;\n  goto cleanup_context;\n\ncleanup_array:\n  ecma_deref_object (array_p);\ncleanup_context:\n  ecma_regexp_cleanup_context (&re_ctx);\n  if (string_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) string_buffer_p, string_size);\n  }\ncleanup_string:\n  ecma_deref_ecma_string (string_p);\n\n  return result;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* ecma_regexp_split_helper */\n\n/**\n * Fast path for RegExp based replace operation\n *\n * This method assumes the following:\n *   - The RegExp object is a built-in RegExp\n *   - The 'exec' method of the RegExp object is the built-in 'exec' method\n *   - The 'lastIndex' property is writable\n *\n * The standard would normally require us to first execute the regexp and collect the results,\n * and after that iterate over the collected results and replace them.\n * The assumptions above guarantee that during the matching phase there will be no exceptions thrown,\n * which means we can do the match/replace in a single loop, without collecting the results.\n *\n * @return string value if successful\n *         thrown value otherwise\n */\nstatic ecma_value_t\necma_regexp_replace_helper_fast (ecma_replace_context_t *ctx_p, /**<replace context */\n                                 ecma_extended_object_t *re_obj_p, /**< regexp object */\n                                 ecma_string_t *string_p, /**< source string */\n                                 ecma_value_t replace_arg) /**< replace argument */\n{\n  const re_compiled_code_t *bc_p = ECMA_GET_INTERNAL_VALUE_POINTER (re_compiled_code_t,\n                                                                    re_obj_p->u.class_prop.u.value);\n  ecma_bytecode_ref ((ecma_compiled_code_t *) bc_p);\n\n  JERRY_ASSERT (bc_p != NULL);\n  ecma_value_t result = ECMA_VALUE_EMPTY;\n\n  uint8_t string_flags = ECMA_STRING_FLAG_IS_ASCII;\n  lit_utf8_size_t string_length;\n  ctx_p->string_p = ecma_string_get_chars (string_p,\n                                           &(ctx_p->string_size),\n                                           &string_length,\n                                           NULL,\n                                           &string_flags);\n\n  const lit_utf8_byte_t *const string_end_p = ctx_p->string_p + ctx_p->string_size;\n  const uint8_t *const bc_start_p = (const uint8_t *) (bc_p + 1);\n  const lit_utf8_byte_t *matched_p = NULL;\n  const lit_utf8_byte_t *current_p = ctx_p->string_p;\n  const lit_utf8_byte_t *last_append_p = current_p;\n  ecma_length_t index;\n\n  ecma_regexp_ctx_t re_ctx;\n  ecma_regexp_initialize_context (&re_ctx,\n                                  bc_p,\n                                  ctx_p->string_p,\n                                  string_end_p);\n\n  /* lastIndex must be accessed to remain consistent with the standard, even though we may not need the value. */\n  ecma_value_t lastindex_value = ecma_op_object_get_by_magic_id ((ecma_object_t *) re_obj_p,\n                                                                 LIT_MAGIC_STRING_LASTINDEX_UL);\n  result = ecma_op_to_length (lastindex_value, &index);\n  ecma_free_value (lastindex_value);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    goto cleanup_context;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  /* Only non-global sticky matches use the lastIndex value, otherwise the starting index is 0. */\n  if (JERRY_UNLIKELY ((ctx_p->flags & RE_FLAG_GLOBAL) == 0 && (re_ctx.flags & RE_FLAG_STICKY) != 0))\n  {\n    if (index > string_length)\n    {\n      result = ecma_op_object_put ((ecma_object_t *) re_obj_p,\n                                   ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                   ecma_make_uint32_value (0),\n                                   true);\n\n      if (!ECMA_IS_VALUE_ERROR (result))\n      {\n        JERRY_ASSERT (ecma_is_value_true (result));\n        ecma_ref_ecma_string (string_p);\n        result = ecma_make_string_value (string_p);\n      }\n\n      goto cleanup_context;\n    }\n\n    if (string_flags & ECMA_STRING_FLAG_IS_ASCII)\n    {\n      current_p += index;\n    }\n    else\n    {\n      ecma_length_t counter = index;\n      while (counter--)\n      {\n        lit_utf8_incr (&current_p);\n      }\n    }\n  }\n  else\n#endif /* ENABLED (JERRY_ESNEXT) */\n  {\n    index = 0;\n  }\n\n  ctx_p->builder = ecma_stringbuilder_create ();\n  ctx_p->capture_count = re_ctx.captures_count;\n  ctx_p->u.captures_p = re_ctx.captures_p;\n\n  while (true)\n  {\n    matched_p = ecma_regexp_match (&re_ctx, bc_start_p, current_p);\n\n    if (matched_p != NULL)\n    {\n      if (ECMA_RE_STACK_LIMIT_REACHED (matched_p))\n      {\n        result = ecma_raise_range_error (ECMA_ERR_MSG (\"Stack limit exceeded.\"));\n        goto cleanup_builder;\n      }\n\n      const lit_utf8_size_t remaining_size = (lit_utf8_size_t) (current_p - last_append_p);\n      ecma_stringbuilder_append_raw (&(ctx_p->builder), last_append_p, remaining_size);\n\n      if (ctx_p->replace_str_p != NULL)\n      {\n        ctx_p->matched_p = current_p;\n        const ecma_regexp_capture_t *const global_capture_p = re_ctx.captures_p;\n        ctx_p->matched_size = (lit_utf8_size_t) (global_capture_p->end_p - global_capture_p->begin_p);\n        ctx_p->match_byte_pos = (lit_utf8_size_t) (current_p - re_ctx.input_start_p);\n\n        ecma_builtin_replace_substitute (ctx_p);\n      }\n      else\n      {\n        ecma_collection_t *arguments_p = ecma_new_collection ();\n\n        for (uint32_t i = 0; i < re_ctx.captures_count; i++)\n        {\n          ecma_value_t capture = ecma_regexp_get_capture_value (re_ctx.captures_p + i);\n          ecma_collection_push_back (arguments_p, capture);\n        }\n\n        ecma_collection_push_back (arguments_p, ecma_make_length_value (index));\n        ecma_ref_ecma_string (string_p);\n        ecma_collection_push_back (arguments_p, ecma_make_string_value (string_p));\n        ecma_object_t *function_p = ecma_get_object_from_value (replace_arg);\n\n        result = ecma_op_function_call (function_p,\n                                        ECMA_VALUE_UNDEFINED,\n                                        arguments_p->buffer_p,\n                                        arguments_p->item_count);\n\n        ecma_collection_free (arguments_p);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          goto cleanup_builder;\n        }\n\n        /* 16.m.v */\n        ecma_string_t *const replace_result_p = ecma_op_to_string (result);\n        ecma_free_value (result);\n\n        if (replace_result_p == NULL)\n        {\n          result = ECMA_VALUE_ERROR;\n          goto cleanup_builder;\n        }\n\n        ecma_stringbuilder_append (&(ctx_p->builder), replace_result_p);\n        ecma_deref_ecma_string (replace_result_p);\n      }\n\n      const ecma_regexp_capture_t *global_capture_p = re_ctx.captures_p;\n      last_append_p = global_capture_p->end_p;\n\n      const lit_utf8_size_t matched_size = (lit_utf8_size_t) (global_capture_p->end_p - global_capture_p->begin_p);\n\n      const bool is_ascii = (string_flags & ECMA_STRING_FLAG_IS_ASCII) != 0;\n      index += is_ascii ? matched_size : lit_utf8_string_length (current_p, matched_size);\n\n      if (!(ctx_p->flags & RE_FLAG_GLOBAL))\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (JERRY_UNLIKELY ((re_ctx.flags & RE_FLAG_STICKY) != 0))\n        {\n          ecma_value_t index_value = ecma_make_length_value (index);\n          result = ecma_op_object_put ((ecma_object_t *) re_obj_p,\n                                       ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                       index_value,\n                                       true);\n\n          ecma_free_value (index_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto cleanup_builder;\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        break;\n      }\n\n      if (matched_size > 0)\n      {\n        current_p = last_append_p;\n        continue;\n      }\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (JERRY_UNLIKELY ((re_ctx.flags & RE_FLAG_STICKY) != 0))\n    {\n      result = ecma_op_object_put ((ecma_object_t *) re_obj_p,\n                                   ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                   ecma_make_uint32_value (0),\n                                   true);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        goto cleanup_builder;\n      }\n\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (current_p >= string_end_p)\n    {\n      break;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if ((ctx_p->flags & RE_FLAG_UNICODE) != 0)\n    {\n      index++;\n      const lit_code_point_t cp = ecma_regexp_unicode_advance (&current_p,\n                                                               string_end_p);\n\n      if (cp > LIT_UTF16_CODE_UNIT_MAX)\n      {\n        index++;\n      }\n\n      continue;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    index++;\n    lit_utf8_incr (&current_p);\n  }\n\n  const lit_utf8_size_t trailing_size = (lit_utf8_size_t) (string_end_p - last_append_p);\n  ecma_stringbuilder_append_raw (&(ctx_p->builder), last_append_p, trailing_size);\n\n  result = ecma_make_string_value (ecma_stringbuilder_finalize (&(ctx_p->builder)));\n  goto cleanup_context;\n\ncleanup_builder:\n  ecma_stringbuilder_destroy (&(ctx_p->builder));\n\ncleanup_context:\n  ecma_regexp_cleanup_context (&re_ctx);\n  ecma_bytecode_deref ((ecma_compiled_code_t *) bc_p);\n\n  if (string_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) ctx_p->string_p, ctx_p->string_size);\n  }\n\n  return result;\n} /* ecma_regexp_replace_helper_fast */\n\n/**\n * Helper function for RegExp based replacing\n *\n * See also:\n *          String.prototype.replace\n *          RegExp.prototype[@@replace]\n *\n * @return result string of the replacement, if successful\n *         error value, otherwise\n */\necma_value_t\necma_regexp_replace_helper (ecma_value_t this_arg, /**< this argument */\n                            ecma_value_t string_arg, /**< source string */\n                            ecma_value_t replace_arg) /**< replace string */\n{\n  /* 2. */\n  if (!ecma_is_value_object (this_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not an object.\"));\n  }\n\n  ecma_object_t *this_obj_p = ecma_get_object_from_value (this_arg);\n\n  ecma_replace_context_t replace_ctx;\n  replace_ctx.flags = RE_FLAG_EMPTY;\n\n  /* 3. */\n  ecma_string_t *string_p = ecma_op_to_string (string_arg);\n  if (string_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ECMA_VALUE_ERROR;\n\n  /* 6. */\n  replace_ctx.replace_str_p = NULL;\n  if (!ecma_op_is_callable (replace_arg))\n  {\n    replace_ctx.replace_str_p = ecma_op_to_string (replace_arg);\n\n    if (replace_ctx.replace_str_p == NULL)\n    {\n      goto cleanup_string;\n    }\n  }\n\n  /* 8 */\n  result = ecma_op_object_get_by_magic_id (this_obj_p, LIT_MAGIC_STRING_GLOBAL);\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    goto cleanup_replace;\n  }\n\n  if (ecma_op_to_boolean (result))\n  {\n    replace_ctx.flags |= RE_FLAG_GLOBAL;\n  }\n\n  ecma_free_value (result);\n\n#if ENABLED (JERRY_ESNEXT)\n  const lit_utf8_size_t string_length = ecma_string_get_length (string_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* 10. */\n  if (replace_ctx.flags & RE_FLAG_GLOBAL)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    result = ecma_op_object_get_by_magic_id (this_obj_p, LIT_MAGIC_STRING_UNICODE);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_replace;\n    }\n\n    if (ecma_op_to_boolean (result))\n    {\n      replace_ctx.flags |= RE_FLAG_UNICODE;\n    }\n\n    ecma_free_value (result);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    result = ecma_op_object_put (this_obj_p,\n                                 ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                 ecma_make_uint32_value (0),\n                                 true);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_replace;\n    }\n\n    JERRY_ASSERT (ecma_is_value_boolean (result));\n  }\n\n#if !ENABLED (JERRY_ESNEXT)\n  result = ecma_regexp_replace_helper_fast (&replace_ctx,\n                                            (ecma_extended_object_t *) this_obj_p,\n                                            string_p,\n                                            replace_arg);\n\n  goto cleanup_replace;\n#else /* ENABLED (JERRY_ESNEXT) */\n  result = ecma_op_object_get_by_magic_id (this_obj_p, LIT_MAGIC_STRING_EXEC);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    goto cleanup_replace;\n  }\n\n  /* Check for fast path. */\n  if (ecma_op_is_callable (result))\n  {\n    ecma_extended_object_t *function_p = (ecma_extended_object_t *) ecma_get_object_from_value (result);\n    if (ecma_object_class_is (this_obj_p, LIT_MAGIC_STRING_REGEXP_UL)\n        && ecma_builtin_is_regexp_exec (function_p))\n    {\n      ecma_deref_object ((ecma_object_t *) function_p);\n\n      result = ecma_regexp_replace_helper_fast (&replace_ctx,\n                                                (ecma_extended_object_t *) this_obj_p,\n                                                string_p,\n                                                replace_arg);\n\n      goto cleanup_replace;\n    }\n  }\n\n  ecma_collection_t *results_p = ecma_new_collection ();\n\n  while (true)\n  {\n    /* 13.a */\n    if (ecma_op_is_callable (result))\n    {\n      ecma_object_t *const function_p = ecma_get_object_from_value (result);\n\n      ecma_value_t arguments[] = { ecma_make_string_value (string_p) };\n      result = ecma_op_function_call (function_p, this_arg, arguments, 1);\n\n      ecma_deref_object (function_p);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        goto cleanup_results;\n      }\n\n      if (!ecma_is_value_object (result) && !ecma_is_value_null (result))\n      {\n        ecma_free_value (result);\n        result = ecma_raise_type_error (ECMA_ERR_MSG (\"Return value of 'exec' must be an Object or Null\"));\n        goto cleanup_results;\n      }\n    }\n    else\n    {\n      ecma_free_value (result);\n\n      if (!ecma_object_class_is (this_obj_p, LIT_MAGIC_STRING_REGEXP_UL))\n      {\n        result = ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a valid RegExp object\"));\n        goto cleanup_results;\n      }\n\n      result = ecma_regexp_exec_helper (this_obj_p, string_p);\n    }\n\n    /* 13.c */\n    if (ecma_is_value_null (result))\n    {\n      break;\n    }\n\n    /* 13.d.i */\n    ecma_collection_push_back (results_p, result);\n\n    if ((replace_ctx.flags & RE_FLAG_GLOBAL) == 0)\n    {\n      break;\n    }\n\n    /* 13.d.iii.1 */\n    result = ecma_op_object_get_by_index (ecma_get_object_from_value (result), 0);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_results;\n    }\n\n    ecma_string_t *match_str_p = ecma_op_to_string (result);\n    ecma_free_value (result);\n\n    if (match_str_p == NULL)\n    {\n      result = ECMA_VALUE_ERROR;\n      goto cleanup_results;\n    }\n\n    const bool is_empty = ecma_string_is_empty (match_str_p);\n    ecma_deref_ecma_string (match_str_p);\n\n    /* 13.d.iii.3 */\n    if (is_empty)\n    {\n      result = ecma_op_object_get_by_magic_id (this_obj_p, LIT_MAGIC_STRING_LASTINDEX_UL);\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        goto cleanup_results;\n      }\n\n      ecma_value_t last_index = result;\n\n      ecma_length_t index;\n      result = ecma_op_to_length (last_index, &index);\n      ecma_free_value (last_index);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        goto cleanup_results;\n      }\n\n      index = ecma_op_advance_string_index (string_p, index, (replace_ctx.flags & RE_FLAG_UNICODE) != 0);\n      last_index = ecma_make_length_value (index);\n\n      /* 10.d.iii.3.c */\n      result = ecma_op_object_put (this_obj_p,\n                                   ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                   last_index,\n                                   true);\n\n      ecma_free_value (last_index);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        goto cleanup_results;\n      }\n\n      JERRY_ASSERT (ecma_is_value_boolean (result));\n    }\n\n    result = ecma_op_object_get_by_magic_id (this_obj_p, LIT_MAGIC_STRING_EXEC);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_results;\n    }\n  }\n\n  uint8_t string_flags = ECMA_STRING_FLAG_IS_ASCII;\n  replace_ctx.string_p = ecma_string_get_chars (string_p,\n                                                &(replace_ctx.string_size),\n                                                NULL,\n                                                NULL,\n                                                &string_flags);\n\n  /* 14. */\n  replace_ctx.builder = ecma_stringbuilder_create ();\n  replace_ctx.matched_p = NULL;\n  replace_ctx.capture_count = 0;\n  lit_utf8_size_t index = 0;\n\n  /* 15. */\n  const lit_utf8_byte_t *source_position_p = replace_ctx.string_p;\n  const lit_utf8_byte_t *const string_end_p = replace_ctx.string_p + replace_ctx.string_size;\n\n  /* 16. */\n  for (ecma_value_t *current_p = results_p->buffer_p;\n       current_p < results_p->buffer_p + results_p->item_count;\n       current_p++)\n  {\n    /* 16.a */\n    ecma_object_t *current_object_p = ecma_get_object_from_value (*current_p);\n\n    ecma_length_t capture_count;\n    result = ecma_op_object_get_length (current_object_p, &capture_count);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_builder;\n    }\n\n    /* 16.c */\n    capture_count = (capture_count > 0) ? capture_count - 1 : capture_count;\n\n    /* 16.d */\n    result = ecma_op_object_get_by_index (current_object_p, 0);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      goto cleanup_builder;\n    }\n\n    ecma_string_t *matched_str_p = ecma_op_to_string (result);\n    ecma_free_value (result);\n\n    /* 16.e */\n    if (matched_str_p == NULL)\n    {\n      result = ECMA_VALUE_ERROR;\n      goto cleanup_builder;\n    }\n\n    /* 16.g */\n    result = ecma_op_object_get_by_magic_id (current_object_p, LIT_MAGIC_STRING_INDEX);\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      ecma_deref_ecma_string (matched_str_p);\n      goto cleanup_builder;\n    }\n\n    const ecma_value_t index_value = result;\n\n    ecma_number_t position_num;\n    result = ecma_op_to_integer (index_value, &position_num);\n    ecma_free_value (index_value);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      ecma_deref_ecma_string (matched_str_p);\n      goto cleanup_builder;\n    }\n\n    /* 16.i */\n    lit_utf8_size_t position = JERRY_MIN ((lit_utf8_size_t) JERRY_MAX (position_num, 0.0f), string_length);\n\n    /* 16.k */\n    ecma_collection_t *arguments_p = ecma_new_collection ();\n    ecma_collection_push_back (arguments_p, ecma_make_string_value (matched_str_p));\n\n    /* 16.j, l */\n    ecma_length_t n = 1;\n    while (n <= capture_count)\n    {\n      result = ecma_op_object_get_by_index (current_object_p, n);\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        ecma_collection_free (arguments_p);\n        goto cleanup_builder;\n      }\n\n      /* 16.l.iii */\n      if (!ecma_is_value_undefined (result))\n      {\n        ecma_string_t *capture_str_p = ecma_op_to_string (result);\n        ecma_free_value (result);\n\n        if (capture_str_p == NULL)\n        {\n          ecma_collection_free (arguments_p);\n          result = ECMA_VALUE_ERROR;\n          goto cleanup_builder;\n        }\n\n        result = ecma_make_string_value (capture_str_p);\n      }\n\n      /* 16.l.iv */\n      ecma_collection_push_back (arguments_p, result);\n      n++;\n    }\n\n    const bool should_replace = (position >= index);\n    /* 16.p */\n    if (should_replace)\n    {\n      const lit_utf8_byte_t *match_position_p;\n      const lit_utf8_size_t matched_str_size = ecma_string_get_size (matched_str_p);\n      const lit_utf8_size_t matched_str_length = ecma_string_get_length (matched_str_p);\n\n      if (string_flags & ECMA_STRING_FLAG_IS_ASCII)\n      {\n        match_position_p = replace_ctx.string_p + position;\n      }\n      else\n      {\n        match_position_p = source_position_p;\n        lit_utf8_size_t distance = position - index;\n        while (distance--)\n        {\n          lit_utf8_incr (&match_position_p);\n        }\n      }\n\n      ecma_stringbuilder_append_raw (&replace_ctx.builder,\n                                    source_position_p,\n                                    (lit_utf8_size_t) (match_position_p - source_position_p));\n      replace_ctx.match_byte_pos = (lit_utf8_size_t) (match_position_p - replace_ctx.string_p);\n\n      if ((string_flags & ECMA_STRING_FLAG_IS_ASCII) && matched_str_size == matched_str_length)\n      {\n        source_position_p = JERRY_MIN (match_position_p + matched_str_size, string_end_p);\n      }\n      else\n      {\n        lit_utf8_size_t code_unit_count = matched_str_length;\n\n        while (code_unit_count-- > 0 && JERRY_LIKELY (match_position_p < string_end_p))\n        {\n          lit_utf8_incr (&match_position_p);\n        }\n\n        source_position_p = match_position_p;\n      }\n\n      index = JERRY_MIN (position + matched_str_length, string_length);\n    }\n\n    /* 16.m */\n    if (replace_ctx.replace_str_p == NULL)\n    {\n      /* 16.m.i-ii.\n       * arguments_p already contains <<Matched, cap1, cap2, ..., capN>> */\n\n      /* 16.m.iii */\n      ecma_collection_push_back (arguments_p, ecma_make_uint32_value (position));\n      ecma_ref_ecma_string (string_p);\n      ecma_collection_push_back (arguments_p, ecma_make_string_value (string_p));\n\n      result = ecma_op_function_call (ecma_get_object_from_value (replace_arg),\n                                      ECMA_VALUE_UNDEFINED,\n                                      arguments_p->buffer_p,\n                                      arguments_p->item_count);\n\n      ecma_collection_free (arguments_p);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        goto cleanup_builder;\n      }\n\n      /* 16.m.v */\n      ecma_string_t *const replace_result_p = ecma_op_to_string (result);\n      ecma_free_value (result);\n\n      if (replace_result_p == NULL)\n      {\n        result = ECMA_VALUE_ERROR;\n        goto cleanup_builder;\n      }\n\n      /* 16.m/p */\n      if (should_replace)\n      {\n        ecma_stringbuilder_append (&replace_ctx.builder, replace_result_p);\n      }\n\n      ecma_deref_ecma_string (replace_result_p);\n    }\n    else\n    {\n      /* 16.n/p */\n      if (should_replace)\n      {\n        replace_ctx.u.collection_p = arguments_p;\n        ecma_builtin_replace_substitute (&replace_ctx);\n      }\n\n      ecma_collection_free (arguments_p);\n    }\n  }\n\n  /* 18. */\n  JERRY_ASSERT (index <= string_length);\n  ecma_stringbuilder_append_raw (&(replace_ctx.builder),\n                                 source_position_p,\n                                 (lit_utf8_size_t) (string_end_p - source_position_p));\n\n  result = ecma_make_string_value (ecma_stringbuilder_finalize (&replace_ctx.builder));\n  goto cleanup_chars;\n\ncleanup_builder:\n  ecma_stringbuilder_destroy (&replace_ctx.builder);\n\ncleanup_chars:\n  if (string_flags & ECMA_STRING_FLAG_MUST_BE_FREED)\n  {\n    jmem_heap_free_block ((void *) replace_ctx.string_p, replace_ctx.string_size);\n  }\n\ncleanup_results:\n  ecma_collection_free (results_p);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\ncleanup_replace:\n  if (replace_ctx.replace_str_p != NULL)\n  {\n    ecma_deref_ecma_string (replace_ctx.replace_str_p);\n  }\n\ncleanup_string:\n  ecma_deref_ecma_string (string_p);\n\n  return result;\n} /* ecma_regexp_replace_helper */\n\n/**\n * Helper function for RegExp based matching\n *\n * See also:\n *          String.prototype.match\n *          RegExp.prototype[@@match]\n *\n * @return ecma_value_t\n */\necma_value_t\necma_regexp_match_helper (ecma_value_t this_arg, /**< this argument */\n                          ecma_value_t string_arg) /**< source string */\n{\n  if (!ecma_is_value_object (this_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not an object.\"));\n  }\n\n  ecma_string_t *str_p = ecma_op_to_string (string_arg);\n\n  if (JERRY_UNLIKELY (str_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);\n\n  ecma_value_t global_value = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_GLOBAL);\n\n  if (ECMA_IS_VALUE_ERROR (global_value))\n  {\n    ecma_deref_ecma_string (str_p);\n    return global_value;\n  }\n\n  bool global = ecma_op_to_boolean (global_value);\n\n  ecma_free_value (global_value);\n\n  if (!global)\n  {\n    ecma_value_t result = ecma_op_regexp_exec (this_arg, str_p);\n    ecma_deref_ecma_string (str_p);\n    return result;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t full_unicode_value = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_UNICODE);\n\n  if (ECMA_IS_VALUE_ERROR (full_unicode_value))\n  {\n    ecma_deref_ecma_string (str_p);\n    return full_unicode_value;\n  }\n\n  bool full_unicode = ecma_op_to_boolean (full_unicode_value);\n\n  ecma_free_value (full_unicode_value);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_value_t set_status = ecma_op_object_put (obj_p,\n                                                ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                                ecma_make_uint32_value (0),\n                                                true);\n\n  if (ECMA_IS_VALUE_ERROR (set_status))\n  {\n    ecma_deref_ecma_string (str_p);\n    return set_status;\n  }\n\n  ecma_value_t ret_value = ECMA_VALUE_ERROR;\n  ecma_object_t *result_array_p = ecma_op_new_array_object (0);\n  uint32_t n = 0;\n\n  while (true)\n  {\n    ecma_value_t result_value = ecma_op_regexp_exec (this_arg, str_p);\n\n    if (ECMA_IS_VALUE_ERROR (result_value))\n    {\n      goto result_cleanup;\n    }\n\n    if (ecma_is_value_null (result_value))\n    {\n      if (n == 0)\n      {\n        ret_value = ECMA_VALUE_NULL;\n        goto result_cleanup;\n      }\n\n      ecma_deref_ecma_string (str_p);\n      return ecma_make_object_value (result_array_p);\n    }\n\n    ecma_object_t *result_value_p = ecma_get_object_from_value (result_value);\n    ecma_value_t match_value = ecma_op_object_get_by_index (result_value_p, 0);\n\n    ecma_deref_object (result_value_p);\n\n    if (ECMA_IS_VALUE_ERROR (match_value))\n    {\n      goto result_cleanup;\n    }\n\n    ecma_string_t *match_str_p = ecma_op_to_string (match_value);\n    ecma_free_value (match_value);\n\n    if (JERRY_UNLIKELY (match_str_p == NULL))\n    {\n      goto result_cleanup;\n    }\n\n    ecma_value_t new_prop = ecma_builtin_helper_def_prop_by_index (result_array_p,\n                                                                   n,\n                                                                   ecma_make_string_value (match_str_p),\n                                                                   ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n\n    JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (new_prop));\n\n    const bool is_match_empty = ecma_string_is_empty (match_str_p);\n    ecma_deref_ecma_string (match_str_p);\n\n    if (is_match_empty)\n    {\n      ecma_value_t last_index = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_LASTINDEX_UL);\n\n      if (ECMA_IS_VALUE_ERROR (last_index))\n      {\n        goto result_cleanup;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      ecma_length_t index;\n      ecma_value_t length_value = ecma_op_to_length (last_index, &index);\n\n      ecma_free_value (last_index);\n\n      if (ECMA_IS_VALUE_ERROR (length_value))\n      {\n        goto result_cleanup;\n      }\n\n      index = ecma_op_advance_string_index (str_p, index, full_unicode);\n\n      last_index = ecma_make_length_value (index);\n      ecma_value_t next_set_status = ecma_op_object_put (obj_p,\n                                                         ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                                         ecma_make_length_value (index),\n                                                         true);\n#else /* !ENABLED (JERRY_ESNEXT) */\n      ecma_number_t index = ecma_get_number_from_value (last_index);\n      ecma_free_value (last_index);\n\n      last_index = ecma_make_number_value (index + 1);\n      ecma_value_t next_set_status = ecma_op_object_put (obj_p,\n                                                         ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),\n                                                         last_index,\n                                                         true);\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n      ecma_free_value (last_index);\n\n      if (ECMA_IS_VALUE_ERROR (next_set_status))\n      {\n        goto result_cleanup;\n      }\n    }\n\n    n++;\n  }\n\nresult_cleanup:\n  ecma_deref_ecma_string (str_p);\n  ecma_deref_object (result_array_p);\n  return ret_value;\n} /* ecma_regexp_match_helper */\n\n/**\n * RegExpExec operation\n *\n * See also:\n *          ECMA-262 v6.0, 21.2.5.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_op_regexp_exec (ecma_value_t this_arg, /**< this argument */\n                     ecma_string_t *str_p) /**< input string */\n{\n  ecma_object_t *arg_obj_p = ecma_get_object_from_value (this_arg);\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t exec = ecma_op_object_get_by_magic_id (arg_obj_p, LIT_MAGIC_STRING_EXEC);\n\n  if (ECMA_IS_VALUE_ERROR (exec))\n  {\n    return exec;\n  }\n\n  if (ecma_op_is_callable (exec))\n  {\n    ecma_object_t *function_p = ecma_get_object_from_value (exec);\n    ecma_value_t arguments[] = { ecma_make_string_value (str_p) };\n\n    ecma_value_t result = ecma_op_function_call (function_p, this_arg, arguments, 1);\n\n    ecma_deref_object (function_p);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      return result;\n    }\n\n    if (!ecma_is_value_object (result) && !ecma_is_value_null (result))\n    {\n      ecma_free_value (result);\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Return value of 'exec' must be an Object or Null\"));\n    }\n\n    return result;\n  }\n  else\n  {\n    ecma_free_value (exec);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (!ecma_object_is_regexp_object (this_arg))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"'this' is not a valid RegExp object\"));\n  }\n\n  return ecma_regexp_exec_helper (arg_obj_p, str_p);\n} /* ecma_op_regexp_exec */\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_REGEXP_OBJECT_H\n#define ECMA_REGEXP_OBJECT_H\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n#include \"ecma-globals.h\"\n#include \"re-compiler.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmaregexpobject ECMA RegExp object related routines\n * @{\n */\n\n/**\n * RegExp flags\n * Note:\n *      This enum has to be kept in sync with jerry_regexp_flags_t.\n */\ntypedef enum\n{\n  RE_FLAG_EMPTY = 0u,              /* Empty RegExp flags */\n  RE_FLAG_GLOBAL = (1u << 1),      /**< ECMA-262 v5, 15.10.7.2 */\n  RE_FLAG_IGNORE_CASE = (1u << 2), /**< ECMA-262 v5, 15.10.7.3 */\n  RE_FLAG_MULTILINE = (1u << 3),   /**< ECMA-262 v5, 15.10.7.4 */\n  RE_FLAG_STICKY = (1u << 4),      /**< ECMA-262 v6, 21.2.5.12 */\n  RE_FLAG_UNICODE = (1u << 5),     /**< ECMA-262 v6, 21.2.5.15 */\n  RE_FLAG_DOTALL = (1u << 6)       /**< ECMA-262 v9, 21.2.5.3 */\n\n  /* Bits from bit 13 is reserved for function types (see CBC_FUNCTION_TYPE_SHIFT). */\n} ecma_regexp_flags_t;\n\n/**\n * Class escapes\n */\ntypedef enum\n{\n  RE_ESCAPE__START,                   /**< escapes start */\n  RE_ESCAPE_DIGIT = RE_ESCAPE__START, /**< digit */\n  RE_ESCAPE_NOT_DIGIT,                /**< not digit */\n  RE_ESCAPE_WORD_CHAR,                /**< word char */\n  RE_ESCAPE_NOT_WORD_CHAR,            /**< not word char */\n  RE_ESCAPE_WHITESPACE,               /**< whitespace */\n  RE_ESCAPE_NOT_WHITESPACE,           /**< not whitespace */\n  RE_ESCAPE__COUNT,                   /**< escape count */\n} ecma_class_escape_t;\n\n/**\n * Character class flags escape count mask size.\n */\n#define RE_CLASS_ESCAPE_COUNT_MASK_SIZE (3u)\n\n/**\n * Character class flags escape count mask.\n */\n#define RE_CLASS_ESCAPE_COUNT_MASK ((1 << RE_CLASS_ESCAPE_COUNT_MASK_SIZE) - 1u)\n\n/**\n * Character class flags that are present in the upper bits of the class flags byte, while the 3 least significant bits\n * hold a value that contains the number of class escapes present in the character class.\n */\ntypedef enum\n{\n  RE_CLASS_HAS_CHARS = (1 << 5),    /**< contains individual characters */\n  RE_CLASS_HAS_RANGES = (1 << 6),   /**< contains character ranges */\n  RE_CLASS_INVERT = (1 << 7),       /**< inverted */\n} ecma_char_class_flags_t;\n\n/**\n * Structure for matching capturing groups and storing their result\n */\ntypedef struct\n{\n  const lit_utf8_byte_t *begin_p; /**< capture start pointer */\n  const lit_utf8_byte_t *end_p;   /**< capture end pointer */\n  const uint8_t *bc_p;            /**< group bytecode pointer */\n  uint32_t iterator;              /**< iteration counter */\n  uint32_t subcapture_count;      /**< number of nested capturing groups */\n} ecma_regexp_capture_t;\n\n/**\n * Structure for matching non-capturing groups\n */\ntypedef struct\n{\n  const lit_utf8_byte_t *begin_p; /**< substring start pointer */\n  const uint8_t *bc_p;            /**< group bytecode pointer */\n  uint32_t iterator;              /**< iteration counter */\n  uint32_t subcapture_start;      /**< first nested capturing group index */\n  uint32_t subcapture_count;      /**< number of nested capturing groups */\n} ecma_regexp_non_capture_t;\n\n/**\n * Check if an ecma_regexp_capture_t contains a defined capture\n */\n#define ECMA_RE_IS_CAPTURE_DEFINED(c) ((c)->begin_p != NULL)\n\necma_value_t\necma_regexp_get_capture_value (const ecma_regexp_capture_t *const capture_p);\n\n#if (JERRY_STACK_LIMIT != 0)\n/**\n * Value used ase result when stack limit is reached\n */\n#define ECMA_RE_OUT_OF_STACK ((const lit_utf8_byte_t *) UINTPTR_MAX)\n\n/**\n * Checks if the stack limit has been reached during regexp matching\n */\n#define ECMA_RE_STACK_LIMIT_REACHED(p) (JERRY_UNLIKELY (p == ECMA_RE_OUT_OF_STACK))\n#else /* JERRY_STACK_LIMIT == 0 */\n#define ECMA_RE_STACK_LIMIT_REACHED(p) (false)\n#endif /* JERRY_STACK_LIMIT != 0 */\n\n/**\n * Offset applied to qmax when encoded into the bytecode.\n *\n * It's common for qmax to be Infinity, which is represented a UINT32_MAX. By applying the offset we are able to store\n * it in a single byte az zero.\n */\n#define RE_QMAX_OFFSET 1\n\n/**\n * RegExp executor context\n */\ntypedef struct\n{\n  const lit_utf8_byte_t *input_start_p;        /**< start of input string */\n  const lit_utf8_byte_t *input_end_p;          /**< end of input string */\n  uint32_t captures_count;                     /**< number of capture groups */\n  uint32_t non_captures_count;                 /**< number of non-capture groups */\n  ecma_regexp_capture_t *captures_p;           /**< capturing groups */\n  ecma_regexp_non_capture_t *non_captures_p;   /**< non-capturing groups */\n  uint16_t flags;                              /**< RegExp flags */\n  uint8_t char_size;                           /**< size of encoded characters */\n} ecma_regexp_ctx_t;\n\n/**\n * RegExpStringIterator object internal slots\n *\n * See also:\n *          ECMA-262 v11, 21.2.7.2\n */\ntypedef struct\n{\n  ecma_extended_object_t header; /**< extended object part */\n  ecma_value_t iterating_regexp; /**< [[IteratingRegExp]] internal slot */\n  ecma_value_t iterated_string; /**< [[IteratedString]] internal slot */\n} ecma_regexp_string_iterator_t;\n\n#if ENABLED (JERRY_ESNEXT)\nlit_code_point_t ecma_regexp_unicode_advance (const lit_utf8_byte_t **str_p, const lit_utf8_byte_t *end_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\necma_object_t *ecma_op_regexp_alloc (ecma_object_t *new_target_obj_p);\necma_value_t ecma_regexp_exec_helper (ecma_object_t *regexp_object_p,\n                                      ecma_string_t *input_string_p);\necma_string_t *ecma_regexp_read_pattern_str_helper (ecma_value_t pattern_arg);\nlit_code_point_t ecma_regexp_canonicalize_char (lit_code_point_t ch, bool unicode);\necma_value_t ecma_regexp_parse_flags (ecma_string_t *flags_str_p, uint16_t *flags_p);\nvoid ecma_regexp_create_and_initialize_props (ecma_object_t *re_object_p,\n                                              ecma_string_t *source_p,\n                                              uint16_t flags);\necma_value_t ecma_regexp_replace_helper (ecma_value_t this_arg, ecma_value_t string_arg, ecma_value_t replace_arg);\necma_value_t ecma_regexp_search_helper (ecma_value_t regexp_arg, ecma_value_t string_arg);\necma_value_t ecma_regexp_split_helper (ecma_value_t this_arg, ecma_value_t string_arg, ecma_value_t limit_arg);\necma_value_t ecma_regexp_match_helper (ecma_value_t this_arg, ecma_value_t string_arg);\n\necma_value_t ecma_op_regexp_exec (ecma_value_t this_arg, ecma_string_t *str_p);\n\necma_value_t ecma_op_create_regexp_from_bytecode (ecma_object_t *regexp_obj_p, re_compiled_code_t *bc_p);\necma_value_t ecma_op_create_regexp_from_pattern (ecma_object_t *regexp_obj_p,\n                                                 ecma_value_t pattern_value,\n                                                 ecma_value_t flags_value);\necma_value_t ecma_op_create_regexp_with_flags (ecma_object_t *regexp_obj_p,\n                                               ecma_value_t pattern_value,\n                                               uint16_t flags);\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#endif /* !ECMA_REGEXP_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-string-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-string-object.h\"\n#include \"ecma-function-object.h\"\n#include \"jcontext.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmastringobject ECMA String object related routines\n * @{\n */\n\n/**\n * String object creation operation.\n *\n * See also: ECMA-262 v5, 15.5.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_string_object (const ecma_value_t *arguments_list_p, /**< list of arguments that\n                                                                         are passed to String constructor */\n                              uint32_t arguments_list_len) /**< length of the arguments' list */\n{\n  JERRY_ASSERT (arguments_list_len == 0\n                || arguments_list_p != NULL);\n\n  ecma_value_t prim_value = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n\n  if (arguments_list_len > 0)\n  {\n    ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]);\n\n    if (JERRY_UNLIKELY (str_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    prim_value = ecma_make_string_value (str_p);\n  }\n\n  ecma_builtin_id_t proto_id;\n#if ENABLED (JERRY_BUILTIN_STRING)\n  proto_id = ECMA_BUILTIN_ID_STRING_PROTOTYPE;\n#else /* !ENABLED (JERRY_BUILTIN_STRING) */\n  proto_id = ECMA_BUILTIN_ID_OBJECT_PROTOTYPE;\n#endif /* ENABLED (JERRY_BUILTIN_STRING) */\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (proto_id);\n#if ENABLED (JERRY_ESNEXT)\n  ecma_object_t *new_target = JERRY_CONTEXT (current_new_target_p);\n  if (new_target)\n  {\n    prototype_obj_p = ecma_op_get_prototype_from_constructor (new_target, proto_id);\n    if (JERRY_UNLIKELY (prototype_obj_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                sizeof (ecma_extended_object_t),\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_STRING_UL;\n  ext_object_p->u.class_prop.u.value = prim_value;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (new_target)\n  {\n    ecma_deref_object (prototype_obj_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  return ecma_make_object_value (object_p);\n} /* ecma_op_create_string_object */\n\n/**\n * List names of a String object's lazy instantiated properties\n *\n * @return string values collection\n */\nvoid\necma_op_string_list_lazy_property_names (ecma_object_t *obj_p, /**< a String object */\n                                         ecma_collection_t *prop_names_p, /**< prop name collection */\n                                         ecma_property_counter_t *prop_counter_p)  /**< prop counter */\n{\n  JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n  JERRY_ASSERT (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_STRING_UL);\n\n  ecma_string_t *prim_value_str_p = ecma_get_string_from_value (ext_object_p->u.class_prop.u.value);\n\n  lit_utf8_size_t length = ecma_string_get_length (prim_value_str_p);\n\n  for (lit_utf8_size_t i = 0; i < length; i++)\n  {\n    ecma_string_t *name_p = ecma_new_ecma_string_from_uint32 (i);\n\n    /* the properties are enumerable (ECMA-262 v5, 15.5.5.2.9) */\n    ecma_collection_push_back (prop_names_p, ecma_make_string_value (name_p));\n  }\n\n  prop_counter_p->array_index_named_props += length;\n\n  ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));\n  prop_counter_p->string_named_props++;\n} /* ecma_op_string_list_lazy_property_names */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-string-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_STRING_OBJECT_H\n#define ECMA_STRING_OBJECT_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmastringobject ECMA String object related routines\n * @{\n */\n\necma_value_t\necma_op_create_string_object (const ecma_value_t *arguments_list_p, uint32_t arguments_list_len);\n\nvoid\necma_op_string_list_lazy_property_names (ecma_object_t *obj_p,\n                                         ecma_collection_t *prop_names_p,\n                                         ecma_property_counter_t *prop_counter_p);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_STRING_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-symbol-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-symbol-object.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_ESNEXT)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmasymbolobject ECMA Symbol object related routines\n * @{\n */\n\n/**\n * Symbol creation operation.\n *\n * See also: ECMA-262 v6, 6.1.5.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_symbol (const ecma_value_t *arguments_list_p, /**< list of arguments */\n                       uint32_t arguments_list_len) /**< length of the arguments' list */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  ecma_value_t string_desc;\n\n  /* 1-3. */\n  if (arguments_list_len == 0 || ecma_is_value_undefined (arguments_list_p[0]))\n  {\n    string_desc = ECMA_VALUE_UNDEFINED;\n  }\n  else\n  {\n    ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]);\n\n    /* 4. */\n    if (JERRY_UNLIKELY (str_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    string_desc = ecma_make_string_value (str_p);\n  }\n\n  /* 5. */\n  return ecma_make_symbol_value (ecma_new_symbol_from_descriptor_string (string_desc));\n} /* ecma_op_create_symbol */\n\n/**\n * Symbol object creation operation.\n *\n * See also: ECMA-262 v6, 19.4.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_symbol_object (const ecma_value_t value) /**< symbol value */\n{\n  JERRY_ASSERT (ecma_is_value_symbol (value));\n\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE);\n  ecma_object_t *object_p = ecma_create_object (prototype_obj_p,\n                                                sizeof (ecma_extended_object_t),\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_SYMBOL_UL;\n  ext_object_p->u.class_prop.u.value = ecma_copy_value (value);\n\n  return ecma_make_object_value (object_p);\n} /* ecma_op_create_symbol_object */\n\n/**\n * Get the symbol descriptor ecma-string from an ecma-symbol\n *\n * @return pointer to ecma-string descriptor\n */\necma_value_t\necma_get_symbol_description (ecma_string_t *symbol_p) /**< ecma-symbol */\n{\n  JERRY_ASSERT (symbol_p != NULL);\n  JERRY_ASSERT (ecma_prop_name_is_symbol (symbol_p));\n\n  return ((ecma_extended_string_t *) symbol_p)->u.symbol_descriptor;\n} /* ecma_get_symbol_description */\n\n/**\n * Get the descriptive string of the Symbol.\n *\n * See also: ECMA-262 v6, 19.4.3.2.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_get_symbol_descriptive_string (ecma_value_t symbol_value) /**< symbol to stringify */\n{\n  /* 1. */\n  JERRY_ASSERT (ecma_is_value_symbol (symbol_value));\n\n  /* 2 - 3. */\n  ecma_string_t *symbol_p = ecma_get_symbol_from_value (symbol_value);\n  ecma_value_t string_desc = ecma_get_symbol_description (symbol_p);\n  ecma_stringbuilder_t builder = ecma_stringbuilder_create_raw ((lit_utf8_byte_t *) (\"Symbol(\"), 7);\n\n  if (!ecma_is_value_undefined (string_desc))\n  {\n    ecma_string_t *string_desc_p = ecma_get_string_from_value (string_desc);\n    ecma_stringbuilder_append (&builder, string_desc_p);\n  }\n\n  ecma_stringbuilder_append_byte (&builder, LIT_CHAR_RIGHT_PAREN);\n  return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));\n} /* ecma_get_symbol_descriptive_string */\n\n/**\n * thisSymbolValue abstract operation\n *\n * See also:\n *          ECMA-262 v11, 19.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value.\n */\necma_value_t\necma_symbol_this_value (ecma_value_t this_arg) /**< this argument value */\n{\n  /* 1. */\n  if (ecma_is_value_symbol (this_arg))\n  {\n    return this_arg;\n  }\n\n  /* 2. */\n  if (ecma_is_value_object (this_arg))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (this_arg);\n\n    if (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_CLASS)\n    {\n      ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;\n\n      if (ext_obj_p->u.class_prop.class_id == LIT_MAGIC_STRING_SYMBOL_UL)\n      {\n        return ext_obj_p->u.class_prop.u.value;\n      }\n    }\n  }\n\n  /* 3. */\n  return ecma_raise_type_error (ECMA_ERR_MSG (\"Argument 'this' must be a Symbol.\"));\n} /* ecma_symbol_this_value */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-symbol-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_SYMBOL_H\n#define ECMA_SYMBOL_H\n\n#if ENABLED (JERRY_ESNEXT)\n#include \"ecma-globals.h\"\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmasymbolobject ECMA Symbol object related routines\n * @{\n */\n\necma_value_t\necma_op_create_symbol (const ecma_value_t *arguments_list_p, uint32_t arguments_list_len);\n\necma_value_t\necma_op_create_symbol_object (const ecma_value_t value);\n\nbool\necma_prop_name_is_symbol (ecma_string_t *string_p);\n\necma_value_t\necma_get_symbol_description (ecma_string_t *symbol_p);\n\necma_value_t\necma_symbol_this_value (ecma_value_t this_arg);\n\necma_value_t\necma_get_symbol_descriptive_string (ecma_value_t symbol_value);\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n/**\n * @}\n * @}\n */\n\n#endif /* !ECMA_SYMBOL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"ecma-iterator-object.h\"\n#include \"ecma-typedarray-object.h\"\n#include \"ecma-arraybuffer-object.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-big-uint.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmatypedarrayobject ECMA TypedArray object related routines\n * @{\n */\n\n/**\n * Read and copy a number from a given buffer to a value.\n **/\n#define ECMA_TYPEDARRAY_GET_ELEMENT(src_p, num, type) \\\n    do \\\n    { \\\n      if (JERRY_LIKELY ((((uintptr_t) (src_p)) & (sizeof (type) - 1)) == 0)) \\\n      { \\\n        num = *(type *) src_p; \\\n      } \\\n      else \\\n      { \\\n        memcpy (&num, src_p, sizeof (type)); \\\n      } \\\n    } \\\n    while (0)\n\n/**\n * Copy a number from a value to the given buffer\n **/\n#define ECMA_TYPEDARRAY_SET_ELEMENT(src_p, num, type) \\\n    do \\\n    { \\\n      if (JERRY_LIKELY ((((uintptr_t) (src_p)) & (sizeof (type) - 1)) == 0)) \\\n      { \\\n        *(type *) src_p = num; \\\n      } \\\n      else \\\n      { \\\n        memcpy (src_p, &num, sizeof (type)); \\\n      } \\\n    } \\\n    while (0)\n\n/**\n * Read an int8_t value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_int8_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  int8_t num = (int8_t) *src;\n  return ecma_make_integer_value (num);\n} /* ecma_typedarray_get_int8_element */\n\n/**\n * Read an uint8_t value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_uint8_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  uint8_t num = (uint8_t) *src;\n  return ecma_make_integer_value (num);\n} /* ecma_typedarray_get_uint8_element */\n\n/**\n * Read an int16_t value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_int16_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  int16_t num;\n  ECMA_TYPEDARRAY_GET_ELEMENT (src, num, int16_t);\n  return ecma_make_integer_value (num);\n} /* ecma_typedarray_get_int16_element */\n\n/**\n * Read an uint16_t value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_uint16_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  uint16_t num;\n  ECMA_TYPEDARRAY_GET_ELEMENT (src, num, uint16_t);\n  return ecma_make_integer_value (num);\n} /* ecma_typedarray_get_uint16_element */\n\n/**\n * Read an int32_t value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_int32_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  int32_t num;\n  ECMA_TYPEDARRAY_GET_ELEMENT (src, num, int32_t);\n  return ecma_make_number_value (num);\n} /* ecma_typedarray_get_int32_element */\n\n/**\n * Read an uint32_t value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_uint32_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  uint32_t num;\n  ECMA_TYPEDARRAY_GET_ELEMENT (src, num, uint32_t);\n  return ecma_make_number_value (num);\n} /* ecma_typedarray_get_uint32_element */\n\n/**\n * Read a float value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_float_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  float num;\n  ECMA_TYPEDARRAY_GET_ELEMENT (src, num, float);\n  return ecma_make_number_value (num);\n} /* ecma_typedarray_get_float_element */\n\n/**\n * Read a double value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_double_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  double num;\n  ECMA_TYPEDARRAY_GET_ELEMENT (src, num, double);\n  return ecma_make_number_value (num);\n} /* ecma_typedarray_get_double_element */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n/**\n * Read a bigint64 value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_bigint64_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  uint64_t num;\n  ECMA_TYPEDARRAY_GET_ELEMENT (src, num, uint64_t);\n  bool sign = (num >> 63) != 0;\n\n  if (sign)\n  {\n    num = (uint64_t) (-(int64_t) num);\n  }\n\n  return ecma_bigint_create_from_digits (&num, 1, sign);\n} /* ecma_typedarray_get_bigint64_element */\n\n/**\n * Read a biguint64 value from the given arraybuffer\n */\nstatic ecma_value_t\necma_typedarray_get_biguint64_element (lit_utf8_byte_t *src) /**< the location in the internal arraybuffer */\n{\n  uint64_t num;\n  ECMA_TYPEDARRAY_GET_ELEMENT (src, num, uint64_t);\n  return ecma_bigint_create_from_digits (&num, 1, false);\n} /* ecma_typedarray_get_biguint64_element */\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/**\n * Normalize the given ecma_number_t to an uint32_t value\n */\nstatic uint32_t\necma_typedarray_setter_number_to_uint32 (ecma_number_t value) /**< the number value to normalize */\n{\n  uint32_t uint32_value = 0;\n\n  if (!ecma_number_is_nan (value) && !ecma_number_is_infinity (value))\n  {\n    bool is_negative = false;\n\n    if (value < 0)\n    {\n      is_negative = true;\n      value = -value;\n    }\n\n    if (value > ((ecma_number_t) 0xffffffff))\n    {\n      value = (ecma_number_t) (fmod (value, (ecma_number_t) 0x100000000));\n    }\n\n    uint32_value = (uint32_t) value;\n\n    if (is_negative)\n    {\n      uint32_value = (uint32_t) (-(int32_t) uint32_value);\n    }\n  }\n\n  return uint32_value;\n} /* ecma_typedarray_setter_number_to_uint32 */\n\n/**\n * Write an int8_t value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToNumber operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_int8_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                  ecma_value_t value) /**< the number value to set */\n{\n  ecma_number_t result_num;\n  ecma_value_t to_num = ecma_op_to_numeric (value, &result_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n  if (ECMA_IS_VALUE_ERROR (to_num))\n  {\n    return to_num;\n  }\n\n  int8_t num = (int8_t) ecma_typedarray_setter_number_to_uint32 (result_num);\n  *dst_p = (lit_utf8_byte_t) num;\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_int8_element */\n\n/**\n * Write an uint8_t value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToNumber operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_uint8_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                   ecma_value_t value) /**< the number value to set */\n{\n  ecma_number_t result_num;\n  ecma_value_t to_num = ecma_op_to_numeric (value, &result_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n  if (ECMA_IS_VALUE_ERROR (to_num))\n  {\n    return to_num;\n  }\n\n  uint8_t num = (uint8_t) ecma_typedarray_setter_number_to_uint32 (result_num);\n  *dst_p = (lit_utf8_byte_t) num;\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_uint8_element */\n\n/**\n * Write an uint8_t clamped value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToNumber operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_uint8_clamped_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                           ecma_value_t value) /**< the number value to set */\n{\n  ecma_number_t result_num;\n  ecma_value_t to_num = ecma_op_to_numeric (value, &result_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n  if (ECMA_IS_VALUE_ERROR (to_num))\n  {\n    return to_num;\n  }\n\n  uint8_t clamped;\n\n  if (result_num > 255)\n  {\n    clamped = 255;\n  }\n  else if (result_num <= 0)\n  {\n    clamped = 0;\n  }\n  else\n  {\n    clamped = (uint8_t) result_num;\n\n    if (clamped + 0.5 < result_num\n        || (clamped + 0.5 == result_num && (clamped % 2) == 1))\n    {\n      clamped ++;\n    }\n  }\n\n  *dst_p = (lit_utf8_byte_t) clamped;\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_uint8_clamped_element */\n\n/**\n * Write an int16_t value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToNumber operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_int16_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                   ecma_value_t value) /**< the number value to set */\n{\n  ecma_number_t resut_num;\n  ecma_value_t to_num = ecma_op_to_numeric (value, &resut_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n  if (ECMA_IS_VALUE_ERROR (to_num))\n  {\n    return to_num;\n  }\n\n  int16_t num = (int16_t) ecma_typedarray_setter_number_to_uint32 (resut_num);\n  ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, int16_t);\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_int16_element */\n\n/**\n * Write an uint8_t value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToNumber operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_uint16_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                    ecma_value_t value) /**< the number value to set */\n{\n  ecma_number_t resut_num;\n  ecma_value_t to_num = ecma_op_to_numeric (value, &resut_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n  if (ECMA_IS_VALUE_ERROR (to_num))\n  {\n    return to_num;\n  }\n\n  uint16_t num = (uint16_t) ecma_typedarray_setter_number_to_uint32 (resut_num);\n  ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, uint16_t);\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_uint16_element */\n\n/**\n * Write an int32_t value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToNumber operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_int32_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                   ecma_value_t value) /**< the number value to set */\n{\n  ecma_number_t resut_num;\n  ecma_value_t to_num = ecma_op_to_numeric (value, &resut_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n  if (ECMA_IS_VALUE_ERROR (to_num))\n  {\n    return to_num;\n  }\n\n  int32_t num = (int32_t) ecma_typedarray_setter_number_to_uint32 (resut_num);\n  ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, int32_t);\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_int32_element */\n\n/**\n * Write an uint32_t value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToNumber operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_uint32_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                    ecma_value_t value) /**< the number value to set */\n{\n  ecma_number_t resut_num;\n  ecma_value_t to_num = ecma_op_to_numeric (value, &resut_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n  if (ECMA_IS_VALUE_ERROR (to_num))\n  {\n    return to_num;\n  }\n\n  uint32_t num = (uint32_t) ecma_typedarray_setter_number_to_uint32 (resut_num);\n  ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, uint32_t);\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_uint32_element */\n\n/**\n * Write a float value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToNumber operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_float_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                   ecma_value_t value) /**< the number value to set */\n{\n  ecma_number_t result_num;\n  ecma_value_t to_num = ecma_op_to_numeric (value, &result_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n  if (ECMA_IS_VALUE_ERROR (to_num))\n  {\n    return to_num;\n  }\n\n  float num = (float) result_num;\n  ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, float);\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_float_element */\n\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n/**\n * Write a double value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToNumber operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_double_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                    ecma_value_t value) /**< the number value to set */\n{\n  ecma_number_t result_num;\n  ecma_value_t to_num = ecma_op_to_numeric (value, &result_num, ECMA_TO_NUMERIC_NO_OPTS);\n\n  if (ECMA_IS_VALUE_ERROR (to_num))\n  {\n    return to_num;\n  }\n\n  double num = (double) result_num;\n  ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, double);\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_double_element */\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n/**\n * Write a bigint64/biguint64 value into the given arraybuffer\n *\n * @return ECMA_VALUE_ERROR - if the ToBigInt operation fails\n *         ECMA_VALUE_TRUE - otherwise\n */\nstatic ecma_value_t\necma_typedarray_set_bigint_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */\n                                    ecma_value_t value) /**< the bigint value to set */\n{\n  ecma_value_t bigint = ecma_bigint_to_bigint (value, false);\n\n  if (ECMA_IS_VALUE_ERROR (bigint))\n  {\n    return bigint;\n  }\n\n  uint64_t num;\n  bool sign;\n  ecma_bigint_get_digits_and_sign (bigint, &num, 1, &sign);\n\n  if (sign)\n  {\n    num = (uint64_t) (-(int64_t) num);\n  }\n\n  ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, uint64_t);\n\n  ecma_free_value (bigint);\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_typedarray_set_bigint_element */\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/**\n * Builtin id of the first %TypedArray% builtin routine intrinsic object\n */\n#define ECMA_FIRST_TYPEDARRAY_BUILTIN_ROUTINE_ID ECMA_BUILTIN_ID_INT8ARRAY\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n/**\n * Builtin id of the last %TypedArray% builtin routine intrinsic object\n */\n#define ECMA_LAST_TYPEDARRAY_BUILTIN_ROUTINE_ID ECMA_BUILTIN_ID_BIGUINT64ARRAY\n#elif !ENABLED (JERRY_BUILTIN_BIGINT) && ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n/**\n * Builtin id of the last %TypedArray% builtin routine intrinsic object\n */\n#define ECMA_LAST_TYPEDARRAY_BUILTIN_ROUTINE_ID ECMA_BUILTIN_ID_FLOAT64ARRAY\n#else /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n/**\n * Builtin id of the last %TypedArray% builtin routine intrinsic object\n */\n#define ECMA_LAST_TYPEDARRAY_BUILTIN_ROUTINE_ID ECMA_BUILTIN_ID_FLOAT32ARRAY\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n\n/**\n * Builtin id of the first %TypedArray% builtin prototype intrinsic object\n */\n#define ECMA_FIRST_TYPEDARRAY_BUILTIN_PROTOTYPE_ID ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE\n\n/**\n * List of typedarray getters based on their builtin id\n */\nstatic const ecma_typedarray_getter_fn_t ecma_typedarray_getters[] =\n{\n  ecma_typedarray_get_int8_element,   /**< Int8Array */\n  ecma_typedarray_get_uint8_element,  /**< Uint8Array */\n  ecma_typedarray_get_uint8_element,  /**< Uint8ClampedArray */\n  ecma_typedarray_get_int16_element,  /**< Int16Array */\n  ecma_typedarray_get_uint16_element, /**< Int32Array */\n  ecma_typedarray_get_int32_element,  /**< Uint32Array */\n  ecma_typedarray_get_uint32_element, /**< Uint32Array */\n  ecma_typedarray_get_float_element,  /**< Float32Array */\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  ecma_typedarray_get_double_element, /**< Float64Array */\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  ecma_typedarray_get_bigint64_element,  /**< BigInt64Array*/\n  ecma_typedarray_get_biguint64_element, /**< BigUint64Array */\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n};\n\n/**\n * List of typedarray setters based on their builtin id\n */\nstatic const ecma_typedarray_setter_fn_t ecma_typedarray_setters[] =\n{\n  ecma_typedarray_set_int8_element,          /**< Int8Array */\n  ecma_typedarray_set_uint8_element,         /**< Uint8Array */\n  ecma_typedarray_set_uint8_clamped_element, /**< Uint8ClampedArray */\n  ecma_typedarray_set_int16_element,         /**< Int16Array */\n  ecma_typedarray_set_uint16_element,        /**< Int32Array */\n  ecma_typedarray_set_int32_element,         /**< Uint32Array */\n  ecma_typedarray_set_uint32_element,        /**< Uint32Array */\n  ecma_typedarray_set_float_element,         /**< Float32Array */\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  ecma_typedarray_set_double_element,        /**< Float64Array */\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  ecma_typedarray_set_bigint_element,      /**< BigInt64Array */\n  ecma_typedarray_set_bigint_element,     /**< BigUInt64Array */\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n};\n\n/**\n * List of typedarray element shift sizes based on their builtin id\n */\nstatic const uint8_t ecma_typedarray_element_shift_sizes[] =\n{\n  0, /**< Int8Array */\n  0, /**< Uint8Array */\n  0, /**< Uint8ClampedArray */\n  1, /**< Int16Array */\n  1, /**< Uint16Array */\n  2, /**< Int32Array */\n  2, /**< Uint32Array */\n  2, /**< Float32Array */\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  3, /**< Float64Array */\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  3, /**< BigInt64Array */\n  3, /**< BigUInt64Array */\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n};\n\n/**\n * List of typedarray class magic strings based on their builtin id\n */\nstatic const uint16_t ecma_typedarray_magic_string_list[] =\n{\n  (uint16_t) LIT_MAGIC_STRING_INT8_ARRAY_UL,          /**< Int8Array */\n  (uint16_t) LIT_MAGIC_STRING_UINT8_ARRAY_UL,         /**< Uint8Array */\n  (uint16_t) LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL, /**< Uint8ClampedArray */\n  (uint16_t) LIT_MAGIC_STRING_INT16_ARRAY_UL,         /**< Int16Array */\n  (uint16_t) LIT_MAGIC_STRING_UINT16_ARRAY_UL,        /**< Uint16Array */\n  (uint16_t) LIT_MAGIC_STRING_INT32_ARRAY_UL,         /**< Int32Array */\n  (uint16_t) LIT_MAGIC_STRING_UINT32_ARRAY_UL,        /**< Uint32Array */\n  (uint16_t) LIT_MAGIC_STRING_FLOAT32_ARRAY_UL,       /**< Float32Array */\n#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\n  (uint16_t) LIT_MAGIC_STRING_FLOAT64_ARRAY_UL,       /**< Float64Array */\n#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  (uint16_t) LIT_MAGIC_STRING_BIGINT64_ARRAY_UL,      /**< BigInt64Array */\n  (uint16_t) LIT_MAGIC_STRING_BIGUINT64_ARRAY_UL,     /**< BigUInt64Array */\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT */\n};\n\n/**\n * Get typedarray's getter function callback\n *\n * @return ecma_typedarray_getter_fn_t: the getter function for the given builtin TypedArray id\n */\nextern inline ecma_typedarray_getter_fn_t JERRY_ATTR_ALWAYS_INLINE\necma_get_typedarray_getter_fn (ecma_typedarray_type_t typedarray_id)\n{\n  return ecma_typedarray_getters[typedarray_id];\n} /* ecma_get_typedarray_getter_fn */\n\n/**\n * get typedarray's element value\n *\n * @return ecma_number_t: the value of the element\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_get_typedarray_element (lit_utf8_byte_t *src_p,\n                             ecma_typedarray_type_t typedarray_id)\n{\n  return ecma_typedarray_getters[typedarray_id](src_p);\n} /* ecma_get_typedarray_element */\n\n/**\n * Get typedarray's setter function callback\n *\n * @return ecma_typedarray_setter_fn_t: the setter function for the given builtin TypedArray id\n */\nextern inline ecma_typedarray_setter_fn_t JERRY_ATTR_ALWAYS_INLINE\necma_get_typedarray_setter_fn (ecma_typedarray_type_t typedarray_id)\n{\n  return ecma_typedarray_setters[typedarray_id];\n} /* ecma_get_typedarray_setter_fn */\n\n/**\n * set typedarray's element value\n */\nextern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE\necma_set_typedarray_element (lit_utf8_byte_t *dst_p,\n                             ecma_value_t value,\n                             ecma_typedarray_type_t typedarray_id)\n{\n  return ecma_typedarray_setters[typedarray_id](dst_p, value);\n} /* ecma_set_typedarray_element */\n\n/**\n * Get the element shift size of a TypedArray type.\n *\n * @return uint8_t\n */\nextern inline uint8_t JERRY_ATTR_ALWAYS_INLINE\necma_typedarray_helper_get_shift_size (ecma_typedarray_type_t typedarray_id)\n{\n  return ecma_typedarray_element_shift_sizes[typedarray_id];\n} /* ecma_typedarray_helper_get_shift_size */\n\n/**\n * Check if the builtin is a TypedArray type.\n *\n * @return bool: - true if based on the given id it is a TypedArray\n *               - false if based on the given id it is not a TypedArray\n */\nbool\necma_typedarray_helper_is_typedarray (ecma_builtin_id_t builtin_id) /**< the builtin id of a type **/\n{\n  return ((builtin_id >= ECMA_FIRST_TYPEDARRAY_BUILTIN_ROUTINE_ID)\n          && (builtin_id <= ECMA_LAST_TYPEDARRAY_BUILTIN_ROUTINE_ID));\n} /* ecma_typedarray_helper_is_typedarray */\n\n/**\n * Get the prototype ID of a TypedArray type.\n *\n * @return ecma_builtin_id_t\n */\necma_builtin_id_t\necma_typedarray_helper_get_prototype_id (ecma_typedarray_type_t typedarray_id) /**< the id of the typedarray **/\n{\n  return (ecma_builtin_id_t) (ECMA_FIRST_TYPEDARRAY_BUILTIN_PROTOTYPE_ID + typedarray_id);\n} /* ecma_typedarray_helper_get_prototype_id */\n\n/**\n * Get the constructor ID of a TypedArray type.\n *\n * @return ecma_builtin_id_t\n */\necma_builtin_id_t\necma_typedarray_helper_get_constructor_id (ecma_typedarray_type_t typedarray_id) /**< the id of the typedarray **/\n{\n  return (ecma_builtin_id_t) (ECMA_FIRST_TYPEDARRAY_BUILTIN_ROUTINE_ID + typedarray_id);\n} /* ecma_typedarray_helper_get_constructor_id */\n\n/**\n * Get the built-in TypedArray type of the given object.\n *\n * @return ecma_typedarray_type_t\n */\necma_typedarray_type_t\necma_get_typedarray_id (ecma_object_t *obj_p) /**< typedarray object **/\n{\n  JERRY_ASSERT (ecma_object_is_typedarray (obj_p));\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n  return (ecma_typedarray_type_t) ext_object_p->u.pseudo_array.extra_info;\n} /* ecma_get_typedarray_id */\n\n/**\n * Get the built-in TypedArray type of the given object.\n *\n * @return ecma_typedarray_type_t\n */\necma_typedarray_type_t\necma_typedarray_helper_builtin_to_typedarray_id (ecma_builtin_id_t builtin_id)\n{\n  JERRY_ASSERT (ecma_typedarray_helper_is_typedarray (builtin_id));\n\n  return (ecma_typedarray_type_t) (builtin_id - ECMA_FIRST_TYPEDARRAY_BUILTIN_ROUTINE_ID);\n} /* ecma_typedarray_helper_builtin_to_typedarray_id */\n\n/**\n * Create a TypedArray object by given array_length\n *\n * See also: ES2015 22.2.1.2.1\n *\n * @return ecma value of the new typedarray object\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_typedarray_create_object_with_length (uint32_t array_length, /**< length of the typedarray */\n                                           ecma_object_t *src_buffer_p, /**< source buffer */\n                                           ecma_object_t *proto_p, /**< prototype object */\n                                           uint8_t element_size_shift, /**< the size shift of the element length */\n                                           ecma_typedarray_type_t typedarray_id) /**< id of the typedarray */\n{\n  if (array_length > (UINT32_MAX >> element_size_shift))\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Maximum typedarray size is reached.\"));\n  }\n\n  uint32_t byte_length = array_length << element_size_shift;\n\n  if (byte_length > UINT32_MAX - sizeof (ecma_extended_object_t) - JMEM_ALIGNMENT + 1)\n  {\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Maximum typedarray size is reached.\"));\n  }\n\n  ecma_object_t *new_arraybuffer_p = NULL;\n  if (src_buffer_p == NULL)\n  {\n    new_arraybuffer_p = ecma_arraybuffer_new_object (byte_length);\n  }\n  else\n  {\n    ecma_value_t ctor_proto = ecma_op_species_constructor (src_buffer_p, ECMA_BUILTIN_ID_ARRAYBUFFER);\n    if (ECMA_IS_VALUE_ERROR (ctor_proto))\n    {\n      return ctor_proto;\n    }\n\n    ecma_object_t *ctor_proto_p = ecma_get_object_from_value (ctor_proto);\n\n    ecma_object_t *prototype_p = ecma_op_get_prototype_from_constructor (ctor_proto_p,\n                                                                         ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE);\n\n    ecma_deref_object (ctor_proto_p);\n\n    if (JERRY_UNLIKELY (prototype_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    new_arraybuffer_p = ecma_arraybuffer_new_object (byte_length);\n\n    ECMA_SET_NON_NULL_POINTER (new_arraybuffer_p->u2.prototype_cp, prototype_p);\n\n    ecma_deref_object (prototype_p);\n  }\n\n  ecma_object_t *object_p = ecma_create_object (proto_p,\n                                                sizeof (ecma_extended_object_t),\n                                                ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.pseudo_array.u1.class_id = ecma_typedarray_magic_string_list[typedarray_id];\n  ext_object_p->u.pseudo_array.type = ECMA_PSEUDO_ARRAY_TYPEDARRAY;\n  ext_object_p->u.pseudo_array.extra_info = (uint8_t) typedarray_id;\n  ext_object_p->u.pseudo_array.u2.arraybuffer = ecma_make_object_value (new_arraybuffer_p);\n\n  ecma_deref_object (new_arraybuffer_p);\n\n  return ecma_make_object_value (object_p);\n} /* ecma_typedarray_create_object_with_length */\n\n/**\n * Create a TypedArray object by given buffer, offset, and array_length\n *\n * See also: ES2015 22.2.1.5\n *\n * @return ecma value of the new typedarray object\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\necma_typedarray_create_object_with_buffer (ecma_object_t *arraybuffer_p, /**< the arraybuffer inside */\n                                           uint32_t byte_offset, /**< the byte offset of the arraybuffer */\n                                           uint32_t array_length, /**< length of the typedarray */\n                                           ecma_object_t *proto_p, /**< prototype object */\n                                           uint8_t element_size_shift, /**< the size shift of the element length */\n                                           ecma_typedarray_type_t typedarray_id) /**< id of the typedarray */\n{\n  if (ecma_arraybuffer_is_detached (arraybuffer_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"ArrayBuffer has been detached.\"));\n  }\n  uint32_t expected_length = (ecma_arraybuffer_get_length (arraybuffer_p) >> element_size_shift);\n\n  bool needs_ext_typedarray_obj = (byte_offset != 0 || array_length != expected_length);\n\n  size_t object_size = (needs_ext_typedarray_obj ? sizeof (ecma_extended_typedarray_object_t)\n                                                 : sizeof (ecma_extended_object_t));\n\n  ecma_object_t *object_p = ecma_create_object (proto_p, object_size, ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n  ext_object_p->u.pseudo_array.u1.class_id = ecma_typedarray_magic_string_list[typedarray_id];\n  ext_object_p->u.pseudo_array.type = ECMA_PSEUDO_ARRAY_TYPEDARRAY;\n  ext_object_p->u.pseudo_array.extra_info = (uint8_t) typedarray_id;\n  ext_object_p->u.pseudo_array.u2.arraybuffer = ecma_make_object_value (arraybuffer_p);\n\n  if (needs_ext_typedarray_obj)\n  {\n    ext_object_p->u.pseudo_array.type = ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO;\n\n    ecma_extended_typedarray_object_t *typedarray_info_p = (ecma_extended_typedarray_object_t *) object_p;\n    typedarray_info_p->array_length = array_length;\n    typedarray_info_p->byte_offset = byte_offset;\n  }\n\n  return ecma_make_object_value (object_p);\n} /* ecma_typedarray_create_object_with_buffer */\n\n/**\n * Create a TypedArray object by given another TypedArray object\n *\n * See also: ES2015 22.2.1.3\n *\n * @return ecma value of the new typedarray object\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\necma_typedarray_create_object_with_typedarray (ecma_object_t *typedarray_p, /**< a typedarray object */\n                                               ecma_object_t *proto_p, /**< prototype object */\n                                               uint8_t element_size_shift, /**< the size shift of the element length */\n                                               ecma_typedarray_type_t typedarray_id) /**< id of the typedarray */\n{\n  uint32_t array_length = ecma_typedarray_get_length (typedarray_p);\n  ecma_object_t *src_arraybuffer_p = ecma_typedarray_get_arraybuffer (typedarray_p);\n  if (ecma_arraybuffer_is_detached (src_arraybuffer_p))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid detached ArrayBuffer.\"));\n  }\n\n  ecma_value_t new_typedarray = ecma_typedarray_create_object_with_length (array_length,\n                                                                           src_arraybuffer_p,\n                                                                           proto_p,\n                                                                           element_size_shift,\n                                                                           typedarray_id);\n\n  if (ECMA_IS_VALUE_ERROR (new_typedarray))\n  {\n    return new_typedarray;\n  }\n\n  ecma_object_t *new_typedarray_p = ecma_get_object_from_value (new_typedarray);\n\n  lit_utf8_byte_t *src_buf_p = ecma_arraybuffer_get_buffer (src_arraybuffer_p);\n\n  ecma_object_t *dst_arraybuffer_p = ecma_typedarray_get_arraybuffer (new_typedarray_p);\n  lit_utf8_byte_t *dst_buf_p = ecma_arraybuffer_get_buffer (dst_arraybuffer_p);\n\n  src_buf_p += ecma_typedarray_get_offset (typedarray_p);\n\n  ecma_typedarray_type_t src_id = ecma_get_typedarray_id (typedarray_p);\n\n  if (src_id == typedarray_id)\n  {\n    memcpy (dst_buf_p, src_buf_p, array_length << element_size_shift);\n  }\n  else\n  {\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    if ((ECMA_TYPEDARRAY_IS_BIGINT_TYPE (src_id) ^ ECMA_TYPEDARRAY_IS_BIGINT_TYPE (typedarray_id)) == 1)\n    {\n      ecma_deref_object (new_typedarray_p);\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Incompatible typedArray types.\"));\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n    uint32_t src_element_size = 1u << ecma_typedarray_get_element_size_shift (typedarray_p);\n    uint32_t dst_element_size = 1u << element_size_shift;\n    ecma_typedarray_getter_fn_t src_typedarray_getter_cb = ecma_get_typedarray_getter_fn (src_id);\n    ecma_typedarray_setter_fn_t target_typedarray_setter_cb = ecma_get_typedarray_setter_fn (typedarray_id);\n\n    for (uint32_t i = 0; i < array_length; i++)\n    {\n      /* Convert values from source to destination format. */\n      ecma_value_t tmp = src_typedarray_getter_cb (src_buf_p);\n      ecma_value_t set_element = target_typedarray_setter_cb (dst_buf_p, tmp);\n\n      ecma_free_value (tmp);\n\n      if (ECMA_IS_VALUE_ERROR (set_element))\n      {\n        ecma_deref_object (new_typedarray_p);\n        return set_element;\n      }\n\n      src_buf_p += src_element_size;\n      dst_buf_p += dst_element_size;\n    }\n  }\n\n  return new_typedarray;\n} /* ecma_typedarray_create_object_with_typedarray */\n\n/**\n * Helper method for ecma_op_typedarray_from\n *\n * @return ECMA_VALUE_TRUE - if setting the given value to the new typedarray was successful\n *         ECMA_VALUE_ERROR - otherwise\n */\nstatic ecma_value_t\necma_op_typedarray_from_helper (ecma_value_t this_val, /**< this_arg for the above from function */\n                                ecma_value_t current_value, /**< given value to set */\n                                uint32_t index, /**< currrent index */\n                                ecma_object_t *func_object_p, /**< map function object */\n                                ecma_typedarray_info_t *info_p, /**< typedarray info */\n                                ecma_typedarray_setter_fn_t setter_cb) /**< setter callback function */\n{\n  ecma_value_t mapped_value;\n  if (func_object_p != NULL)\n  {\n    /* 17.d 17.f */\n    ecma_value_t current_index = ecma_make_uint32_value (index);\n    ecma_value_t call_args[] = { current_value, current_index };\n\n    ecma_value_t cb_value = ecma_op_function_call (func_object_p, this_val, call_args, 2);\n\n    ecma_free_value (current_index);\n    ecma_free_value (current_value);\n\n    if (ECMA_IS_VALUE_ERROR (cb_value))\n    {\n      return cb_value;\n    }\n\n    mapped_value = cb_value;\n  }\n  else\n  {\n    mapped_value = current_value;\n  }\n\n  if (index >= info_p->length)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument type.\"));\n  }\n\n  ecma_value_t set_element = setter_cb (info_p->buffer_p + (index << info_p->shift), mapped_value);\n  ecma_free_value (mapped_value);\n\n  if (ECMA_IS_VALUE_ERROR (set_element))\n  {\n    return set_element;\n  }\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_op_typedarray_from_helper */\n\n/**\n * Create a TypedArray object by transforming from an array-like object or iterable object\n *\n * See also: ES2015 22.2.2.1\n *\n * @return ecma value of the new typedarray object\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_typedarray_from (ecma_value_t items_val, /**< the source array-like object */\n                         ecma_value_t map_fn_val, /**< map function */\n                         ecma_value_t this_val, /**< this_arg for the above map function */\n                         ecma_object_t *proto_p, /**< prototype object */\n                         uint8_t element_size_shift, /**< the size shift of the element length */\n                         ecma_typedarray_type_t typedarray_id) /**< id of the typedarray */\n{\n  /* 3 */\n  JERRY_ASSERT (ecma_op_is_callable (map_fn_val) || ecma_is_value_undefined (map_fn_val));\n\n  /* 4-5 */\n  ecma_object_t *func_object_p = NULL;\n  if (!ecma_is_value_undefined (map_fn_val))\n  {\n    func_object_p = ecma_get_object_from_value (map_fn_val);\n  }\n\n  /* 6 */\n  ecma_value_t using_iterator = ecma_op_get_method_by_symbol_id (items_val, LIT_GLOBAL_SYMBOL_ITERATOR);\n\n  /* 7 */\n  if (ECMA_IS_VALUE_ERROR (using_iterator))\n  {\n    return using_iterator;\n  }\n\n  /* 8 */\n  if (!ecma_is_value_undefined (using_iterator))\n  {\n    /* 8.a */\n    ecma_value_t next_method;\n    ecma_value_t iterator = ecma_op_get_iterator (items_val, using_iterator, &next_method);\n    ecma_free_value (using_iterator);\n\n    /* 8.b */\n    if (ECMA_IS_VALUE_ERROR (iterator))\n    {\n      return iterator;\n    }\n\n    /* 8.c */\n    ecma_collection_t *values_p = ecma_new_collection ();\n    ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n    /* 8.e */\n    while (true)\n    {\n      /* 8.e.i */\n      ecma_value_t next = ecma_op_iterator_step (iterator, next_method);\n\n      /* 8.e.ii */\n      if (ECMA_IS_VALUE_ERROR (next))\n      {\n        ret_value = next;\n        break;\n      }\n\n      if (next == ECMA_VALUE_FALSE)\n      {\n        break;\n      }\n\n      /* 8.e.iii */\n      ecma_value_t next_value = ecma_op_iterator_value (next);\n      ecma_free_value (next);\n\n      if (ECMA_IS_VALUE_ERROR (next_value))\n      {\n        ret_value = next_value;\n        break;\n      }\n\n      ecma_collection_push_back (values_p, next_value);\n    }\n\n    ecma_free_value (iterator);\n    ecma_free_value (next_method);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      ecma_collection_free (values_p);\n      return ret_value;\n    }\n\n    /* 8.g */\n    ecma_value_t new_typedarray = ecma_typedarray_create_object_with_length (values_p->item_count,\n                                                                             NULL,\n                                                                             proto_p,\n                                                                             element_size_shift,\n                                                                             typedarray_id);\n\n    /* 8.h */\n    if (ECMA_IS_VALUE_ERROR (new_typedarray))\n    {\n      ecma_collection_free (values_p);\n      return new_typedarray;\n    }\n\n    ecma_object_t *new_typedarray_p = ecma_get_object_from_value (new_typedarray);\n    ecma_typedarray_info_t info = ecma_typedarray_get_info (new_typedarray_p);\n    ecma_typedarray_setter_fn_t setter_cb = ecma_get_typedarray_setter_fn (info.id);\n\n    ret_value = ecma_make_object_value (new_typedarray_p);\n\n    /* 8.j */\n    for (uint32_t index = 0; index < values_p->item_count; index++)\n    {\n      ecma_value_t set_value = ecma_op_typedarray_from_helper (this_val,\n                                                               values_p->buffer_p[index],\n                                                               index,\n                                                               func_object_p,\n                                                               &info,\n                                                               setter_cb);\n\n      if (ECMA_IS_VALUE_ERROR (set_value))\n      {\n        for (uint32_t j = index + 1; j < values_p->item_count; j++)\n        {\n          ecma_free_value (values_p->buffer_p[j]);\n        }\n\n        ret_value = set_value;\n        break;\n      }\n    }\n\n    ecma_collection_destroy (values_p);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      ecma_deref_object (new_typedarray_p);\n    }\n\n    return ret_value;\n  }\n\n  /* 10 */\n  ecma_value_t arraylike_object_val = ecma_op_to_object (items_val);\n\n  if (ECMA_IS_VALUE_ERROR (arraylike_object_val))\n  {\n    return arraylike_object_val;\n  }\n\n  ecma_object_t *arraylike_object_p = ecma_get_object_from_value (arraylike_object_val);\n\n  /* 12 */\n  ecma_length_t length_index;\n  ecma_value_t len_value = ecma_op_object_get_length (arraylike_object_p, &length_index);\n\n  if (ECMA_IS_VALUE_ERROR (len_value))\n  {\n    ecma_deref_object (arraylike_object_p);\n    return len_value;\n  }\n\n  if (length_index >= UINT32_MAX)\n  {\n    ecma_deref_object (arraylike_object_p);\n    return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid TypedArray length\"));\n  }\n\n  uint32_t len = (uint32_t) length_index;\n\n  /* 14 */\n  ecma_value_t new_typedarray = ecma_typedarray_create_object_with_length (len,\n                                                                           NULL,\n                                                                           proto_p,\n                                                                           element_size_shift,\n                                                                           typedarray_id);\n\n  if (ECMA_IS_VALUE_ERROR (new_typedarray))\n  {\n    ecma_deref_object (arraylike_object_p);\n    return new_typedarray;\n  }\n\n  ecma_object_t *new_typedarray_p = ecma_get_object_from_value (new_typedarray);\n  ecma_typedarray_info_t info = ecma_typedarray_get_info (new_typedarray_p);\n  ecma_typedarray_setter_fn_t setter_cb = ecma_get_typedarray_setter_fn (info.id);\n  ecma_value_t ret_value = ecma_make_object_value (new_typedarray_p);\n\n  /* 17 */\n  for (uint32_t index = 0; index < len; index++)\n  {\n    ecma_value_t current_value = ecma_op_object_find_by_index (arraylike_object_p, index);\n\n    if (ECMA_IS_VALUE_ERROR (current_value))\n    {\n      ret_value = current_value;\n      break;\n    }\n\n    if (ecma_is_value_found (current_value))\n    {\n      ecma_value_t set_value = ecma_op_typedarray_from_helper (this_val,\n                                                               current_value,\n                                                               index,\n                                                               func_object_p,\n                                                               &info,\n                                                               setter_cb);\n\n      if (ECMA_IS_VALUE_ERROR (set_value))\n      {\n        ret_value = set_value;\n        break;\n      }\n    }\n  }\n\n  ecma_deref_object (arraylike_object_p);\n\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    ecma_deref_object (new_typedarray_p);\n  }\n\n  return ret_value;\n} /* ecma_op_typedarray_from */\n\n/**\n * Get the arraybuffer of the typedarray object\n *\n * @return the pointer to the internal arraybuffer\n */\nextern inline ecma_object_t * JERRY_ATTR_ALWAYS_INLINE\necma_typedarray_get_arraybuffer (ecma_object_t *typedarray_p) /**< the pointer to the typedarray object */\n{\n  JERRY_ASSERT (ecma_object_is_typedarray (typedarray_p));\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) typedarray_p;\n\n  return ecma_get_object_from_value (ext_object_p->u.pseudo_array.u2.arraybuffer);\n} /* ecma_typedarray_get_arraybuffer */\n\n/**\n * Get the element size shift in the typedarray object\n *\n * @return the size shift of the element, size is 1 << shift\n */\nuint8_t\necma_typedarray_get_element_size_shift (ecma_object_t *typedarray_p) /**< the pointer to the typedarray object */\n{\n  JERRY_ASSERT (ecma_object_is_typedarray (typedarray_p));\n\n  return ecma_typedarray_helper_get_shift_size (ecma_get_typedarray_id (typedarray_p));\n} /* ecma_typedarray_get_element_size_shift */\n\n/**\n * Get the array length of the typedarray object\n *\n * @return the array length\n */\nuint32_t\necma_typedarray_get_length (ecma_object_t *typedarray_p) /**< the pointer to the typedarray object */\n{\n  JERRY_ASSERT (ecma_object_is_typedarray (typedarray_p));\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) typedarray_p;\n\n  if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY)\n  {\n    ecma_object_t *arraybuffer_p = ecma_get_object_from_value (ext_object_p->u.pseudo_array.u2.arraybuffer);\n    uint32_t buffer_length = ecma_arraybuffer_get_length (arraybuffer_p);\n    uint8_t shift = ecma_typedarray_get_element_size_shift (typedarray_p);\n\n    return buffer_length >> shift;\n  }\n\n  ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (typedarray_p);\n  if (ecma_arraybuffer_is_detached (arraybuffer_p))\n  {\n    return 0;\n  }\n\n  ecma_extended_typedarray_object_t *info_p = (ecma_extended_typedarray_object_t *) ext_object_p;\n\n  return info_p->array_length;\n} /* ecma_typedarray_get_length */\n\n/**\n * Get the offset of the internal arraybuffer\n *\n * @return the offset\n */\nuint32_t\necma_typedarray_get_offset (ecma_object_t *typedarray_p) /**< the pointer to the typedarray object */\n{\n  JERRY_ASSERT (ecma_object_is_typedarray (typedarray_p));\n\n  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) typedarray_p;\n\n  if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY)\n  {\n    return 0;\n  }\n\n  ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (typedarray_p);\n  if (ecma_arraybuffer_is_detached (arraybuffer_p))\n  {\n    return 0;\n  }\n\n  ecma_extended_typedarray_object_t *info_p = (ecma_extended_typedarray_object_t *) ext_object_p;\n\n  return info_p->byte_offset;\n} /* ecma_typedarray_get_offset */\n\n/**\n * Utility function: return the pointer of the data buffer referenced by the typed array\n *\n * @return pointer to the data buffer\n */\nlit_utf8_byte_t *\necma_typedarray_get_buffer (ecma_object_t *typedarray_p) /**< the pointer to the typed array object */\n{\n  ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (typedarray_p);\n\n  return ecma_arraybuffer_get_buffer (arraybuffer_p) + ecma_typedarray_get_offset (typedarray_p);\n} /* ecma_typedarray_get_buffer */\n\n/**\n * Create a new typedarray object.\n *\n * The struct of the typedarray object\n *   ecma_object_t\n *   extend_part\n *   typedarray_info\n *\n * @return ecma value of the new typedarray object\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\necma_op_create_typedarray (const ecma_value_t *arguments_list_p, /**< the arg list passed to typedarray construct */\n                           uint32_t arguments_list_len, /**< the length of the arguments_list_p */\n                           ecma_object_t *proto_p, /**< prototype object */\n                           uint8_t element_size_shift, /**< the size shift of the element length */\n                           ecma_typedarray_type_t typedarray_id) /**< id of the typedarray */\n{\n  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n\n  ecma_value_t ret = ECMA_VALUE_EMPTY;\n\n  if (arguments_list_len == 0)\n  {\n    /* 22.2.1.1 */\n    ret = ecma_typedarray_create_object_with_length (0, NULL, proto_p, element_size_shift, typedarray_id);\n  }\n  else if (!ecma_is_value_object (arguments_list_p[0]))\n  {\n    /* 22.2.1.2 */\n    if (ecma_is_value_undefined (arguments_list_p[0]))\n    {\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"length argument is undefined\"));\n    }\n\n    ecma_number_t num;\n\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (arguments_list_p[0], &num)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n    uint32_t length = ecma_number_to_uint32 (num);\n\n    if (num != ((ecma_number_t) length))\n    {\n      ret = ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid typedarray length.\"));\n    }\n    else\n    {\n      ret = ecma_typedarray_create_object_with_length (length,\n                                                       NULL,\n                                                       proto_p,\n                                                       element_size_shift,\n                                                       typedarray_id);\n    }\n  }\n  else if (ecma_is_value_object (arguments_list_p[0]))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (arguments_list_p[0]);\n    if (ecma_object_is_typedarray (obj_p))\n    {\n      /* 22.2.1.3 */\n      ecma_object_t *typedarray_p = obj_p;\n      ret = ecma_typedarray_create_object_with_typedarray (typedarray_p,\n                                                           proto_p,\n                                                           element_size_shift,\n                                                           typedarray_id);\n    }\n    else if (ecma_object_class_is (obj_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL))\n    {\n      /* 22.2.1.5 */\n      ecma_object_t *arraybuffer_p = obj_p;\n      ecma_value_t arg2 = ((arguments_list_len > 1) ? arguments_list_p[1]\n                                                    : ECMA_VALUE_UNDEFINED);\n\n      ecma_value_t arg3 = ((arguments_list_len > 2) ? arguments_list_p[2]\n                                                    : ECMA_VALUE_UNDEFINED);\n\n      ecma_number_t offset;\n      if (ECMA_IS_VALUE_ERROR (ecma_op_to_index (arg2, &offset)))\n      {\n        return ECMA_VALUE_ERROR;\n      }\n\n      if (ecma_number_is_negative (offset) || fmod (offset, (1 << element_size_shift)) != 0)\n      {\n        /* ES2015 22.2.1.5: 9 - 10. */\n        ret = ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid offset.\"));\n      }\n      else if (ecma_arraybuffer_is_detached (arraybuffer_p))\n      {\n        ret = ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid detached ArrayBuffer.\"));\n      }\n      else\n      {\n        uint32_t buf_byte_length = ecma_arraybuffer_get_length (arraybuffer_p);\n        uint32_t new_byte_length = 0;\n\n        if (ecma_is_value_undefined (arg3))\n        {\n          if (buf_byte_length % (uint32_t) (1 << element_size_shift) != 0)\n          {\n            ret = ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid length.\"));\n          }\n          else if (buf_byte_length < offset)\n          {\n            ret = ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid length.\"));\n          }\n          else\n          {\n            new_byte_length = (uint32_t) (buf_byte_length - offset);\n          }\n        }\n        else\n        {\n          ecma_length_t new_length;\n          if (ECMA_IS_VALUE_ERROR (ecma_op_to_length (arg3, &new_length)))\n          {\n            return ECMA_VALUE_ERROR;\n          }\n\n          if (new_length > (UINT32_MAX >> element_size_shift))\n          {\n            ret = ecma_raise_range_error (ECMA_ERR_MSG (\"Maximum typedarray size is reached.\"));\n          }\n          else\n          {\n            new_byte_length = (uint32_t) new_length << element_size_shift;\n\n            if (((ecma_number_t) new_byte_length + offset) > buf_byte_length)\n            {\n              ret = ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid length.\"));\n            }\n          }\n        }\n\n        if (ecma_is_value_empty (ret))\n        {\n          uint32_t array_length = new_byte_length >> element_size_shift;\n          ret = ecma_typedarray_create_object_with_buffer (arraybuffer_p,\n                                                           (uint32_t) offset,\n                                                           array_length,\n                                                           proto_p,\n                                                           element_size_shift,\n                                                           typedarray_id);\n        }\n      }\n    }\n    else\n    {\n      /* 22.2.1.4 */\n      ecma_value_t undef = ECMA_VALUE_UNDEFINED;\n      ret = ecma_op_typedarray_from (arguments_list_p[0],\n                                     undef,\n                                     undef,\n                                     proto_p,\n                                     element_size_shift,\n                                     typedarray_id);\n    }\n  }\n\n  return ret;\n} /* ecma_op_create_typedarray */\n\n/**\n * Helper function for typedArray.prototype object's {'keys', 'values', 'entries', '@@iterator'}\n * routines common parts.\n *\n * See also:\n *          ECMA-262 v6, 22.2.3.15\n *          ECMA-262 v6, 22.2.3.29\n *          ECMA-262 v6, 22.2.3.6\n *          ECMA-262 v6, 22.1.3.30\n *\n * Note:\n *      Returned value must be freed with ecma_free_value.\n *\n * @return iterator result object, if success\n *         error - otherwise\n */\necma_value_t\necma_typedarray_iterators_helper (ecma_value_t this_arg, /**< this argument */\n                                  ecma_iterator_kind_t kind) /**< iterator kind */\n{\n  JERRY_ASSERT (ecma_is_typedarray (this_arg));\n  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE);\n\n  return ecma_op_create_iterator_object (this_arg,\n                                         prototype_obj_p,\n                                         ECMA_PSEUDO_ARRAY_ITERATOR,\n                                         kind);\n} /* ecma_typedarray_iterators_helper */\n\n/**\n * Check if the object is typedarray\n *\n * @return true - if object is a TypedArray object\n *         false - otherwise\n */\nbool\necma_object_is_typedarray (ecma_object_t *obj_p) /**< the target object need to be checked */\n{\n  JERRY_ASSERT (!ecma_is_lexical_environment (obj_p));\n\n  if (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_PSEUDO_ARRAY)\n  {\n    ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n\n    return ((ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY)\n            || (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO));\n  }\n\n  return false;\n} /* ecma_object_is_typedarray */\n\n/**\n * Check if the value is typedarray\n *\n * @return true - if value is a TypedArray object\n *         false - otherwise\n */\nbool\necma_is_typedarray (ecma_value_t value) /**< the target need to be checked */\n{\n  if (!ecma_is_value_object (value))\n  {\n    return false;\n  }\n\n  return ecma_object_is_typedarray (ecma_get_object_from_value (value));\n} /* ecma_is_typedarray */\n\n/**\n * List names of a TypedArray object's integer indexed properties\n *\n * @return void\n */\nvoid\necma_op_typedarray_list_lazy_property_names (ecma_object_t *obj_p, /**< a TypedArray object */\n                                             ecma_collection_t *prop_names_p, /**< prop name collection */\n                                             ecma_property_counter_t *prop_counter_p)  /**< prop counter */\n{\n  JERRY_ASSERT (ecma_object_is_typedarray (obj_p));\n\n  uint32_t array_length = ecma_typedarray_get_length (obj_p);\n\n  for (uint32_t i = 0; i < array_length; i++)\n  {\n    ecma_string_t *name_p = ecma_new_ecma_string_from_uint32 (i);\n    ecma_collection_push_back (prop_names_p, ecma_make_string_value (name_p));\n  }\n\n  prop_counter_p->array_index_named_props += array_length;\n} /* ecma_op_typedarray_list_lazy_property_names */\n\n/**\n * Define the integer number property value of the typedarray\n *\n * See also: ES2015 9.4.5.3: 3.c\n *\n * @return ecma value,\n */\necma_value_t\necma_op_typedarray_define_index_prop (ecma_object_t *obj_p, /**< a TypedArray object */\n                                      uint32_t index, /**< the index number */\n                                      const ecma_property_descriptor_t *property_desc_p) /**< the description of\n                                                                                               the prop */\n{\n  JERRY_ASSERT (ecma_object_is_typedarray (obj_p));\n\n  uint32_t array_length = ecma_typedarray_get_length (obj_p);\n\n  if ((index >= array_length)\n      || (property_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))\n      || ((property_desc_p->flags & (ECMA_PROP_IS_CONFIGURABLE_DEFINED | ECMA_PROP_IS_CONFIGURABLE))\n           == (ECMA_PROP_IS_CONFIGURABLE_DEFINED | ECMA_PROP_IS_CONFIGURABLE))\n      || ((property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)\n          && !(property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE))\n      || ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)\n          && !(property_desc_p->flags & ECMA_PROP_IS_WRITABLE)))\n  {\n    return ECMA_VALUE_FALSE;\n  }\n\n  if (property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)\n  {\n    ecma_typedarray_info_t info = ecma_typedarray_get_info (obj_p);\n\n    if (index >= info.length)\n    {\n      return ECMA_VALUE_FALSE;\n    }\n\n    lit_utf8_byte_t *src_buffer = info.buffer_p + (index << info.shift);\n    ecma_value_t set_element = ecma_set_typedarray_element (src_buffer, property_desc_p->value, info.id);\n\n    if (ECMA_IS_VALUE_ERROR (set_element))\n    {\n      return set_element;\n    }\n  }\n\n  return ECMA_VALUE_TRUE;\n} /* ecma_op_typedarray_define_index_prop */\n\n/**\n * Specify the creation of a new TypedArray\n * object using a constructor function.\n *\n * See also: ES11 22.2.4.6\n *\n * Used by:\n *        - ecma_typedarray_species_create\n *\n * @return ecma_value_t function object from created from constructor_p argument\n */\n\necma_value_t\necma_typedarray_create (ecma_object_t *constructor_p, /**< constructor function */\n                        ecma_value_t *arguments_list_p, /**< argument list */\n                        uint32_t arguments_list_len) /**< length of argument list */\n{\n  ecma_value_t ret_val = ecma_op_function_construct (constructor_p,\n                                                     constructor_p,\n                                                     arguments_list_p,\n                                                     arguments_list_len);\n  if (ECMA_IS_VALUE_ERROR (ret_val))\n  {\n    return ret_val;\n  }\n\n  if (!ecma_is_typedarray (ret_val))\n  {\n    ecma_free_value (ret_val);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructed object is not TypedArray.\"));\n  }\n\n  ecma_object_t *typedarray_p = ecma_get_object_from_value (ret_val);\n\n  if ((arguments_list_len == 1) && (ecma_is_value_number (arguments_list_p[0])))\n  {\n    ecma_number_t num = ecma_get_number_from_value (arguments_list_p[0]);\n    ecma_typedarray_info_t info = ecma_typedarray_get_info (typedarray_p);\n\n    if (info.length < num)\n    {\n      ecma_free_value (ret_val);\n      return ecma_raise_type_error (ECMA_ERR_MSG (\"Constructed typedarray is smaller than filter call result\"));\n    }\n  }\n  return ret_val;\n} /* ecma_typedarray_create */\n\n/* Specify the creation of a new TypedArray object\n * using a constructor function that is derived from this_arg.\n *\n * See also: ES11 22.2.4.7\n *\n * @return ecma value of the new typedarray object, constructed by default or species constructor\n */\necma_value_t\necma_typedarray_species_create (ecma_value_t this_arg, /**< this argument */\n                                ecma_value_t *arguments_list_p, /**< the arg list passed to typedarray construct */\n                                uint32_t arguments_list_len) /**< length of the the arg list */\n{\n  ecma_object_t *typedarray_p = ecma_get_object_from_value (this_arg);\n  ecma_typedarray_info_t info = ecma_typedarray_get_info (typedarray_p);\n\n  JERRY_ASSERT (ecma_is_typedarray (this_arg));\n\n  ecma_builtin_id_t default_constructor = ecma_typedarray_helper_get_constructor_id (info.id);\n\n  ecma_value_t constructor = ecma_op_species_constructor (typedarray_p, default_constructor);\n\n  if (ECMA_IS_VALUE_ERROR (constructor))\n  {\n    return constructor;\n  }\n\n  ecma_object_t *constructor_proto_p = ecma_get_object_from_value (constructor);\n\n  ecma_value_t result = ecma_typedarray_create (constructor_proto_p, arguments_list_p, arguments_list_len);\n  ecma_deref_object (constructor_proto_p);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  ecma_object_t *result_p = ecma_get_object_from_value (result);\n  ecma_typedarray_info_t result_info = ecma_typedarray_get_info (result_p);\n  /*\n   * Check result_info.id to to be either bigint type if info.id is one\n   * or be neither of them is info.id is none of them as well.\n   */\n  if (ECMA_TYPEDARRAY_IS_BIGINT_TYPE (info.id) ^ ECMA_TYPEDARRAY_IS_BIGINT_TYPE (result_info.id))\n  {\n    ecma_free_value (result);\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Source and result array does not match in [[ContentType]]\"));\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  return result;\n} /* ecma_typedarray_species_create */\n\n/**\n * Create a typedarray object based on the \"type\" and arraylength\n * The \"type\" is same with arg1\n *\n * @return ecma_value_t\n */\necma_value_t\necma_op_create_typedarray_with_type_and_length (ecma_typedarray_type_t typedarray_id, /** TypedArray id  */\n                                                uint32_t array_length) /**< length of the typedarray */\n{\n  // TODO: assert validate typedarray_id\n  ecma_object_t *proto_p = ecma_builtin_get (ecma_typedarray_helper_get_prototype_id (typedarray_id));\n  uint8_t element_size_shift = ecma_typedarray_helper_get_shift_size (typedarray_id);\n\n  ecma_value_t new_obj = ecma_typedarray_create_object_with_length (array_length,\n                                                                    NULL,\n                                                                    proto_p,\n                                                                    element_size_shift,\n                                                                    typedarray_id);\n\n  return new_obj;\n} /* ecma_op_create_typedarray_with_type_and_length */\n\n/**\n * Method for getting the additional typedArray informations.\n */\necma_typedarray_info_t\necma_typedarray_get_info (ecma_object_t *typedarray_p)\n{\n  ecma_typedarray_info_t info;\n\n  info.id = ecma_get_typedarray_id (typedarray_p);\n  info.length = ecma_typedarray_get_length (typedarray_p);\n  info.shift = ecma_typedarray_get_element_size_shift (typedarray_p);\n  info.element_size = (uint8_t) (1 << info.shift);\n  info.offset = ecma_typedarray_get_offset (typedarray_p);\n  info.array_buffer_p = ecma_typedarray_get_arraybuffer (typedarray_p);\n  info.buffer_p = ecma_arraybuffer_get_buffer (info.array_buffer_p) + info.offset;\n\n  return info;\n} /* ecma_typedarray_get_info */\n\n/**\n * @}\n * @}\n */\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_TYPEDARRAY_OBJECT_H\n#define ECMA_TYPEDARRAY_OBJECT_H\n\n#include \"ecma-globals.h\"\n#include \"ecma-builtins.h\"\n\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\n\n/** \\addtogroup ecma ECMA\n * @{\n *\n * \\addtogroup ecmatypedarrayobject ECMA TypedArray object related routines\n * @{\n */\n\nuint8_t ecma_typedarray_helper_get_shift_size (ecma_typedarray_type_t typedarray_id);\necma_typedarray_getter_fn_t ecma_get_typedarray_getter_fn (ecma_typedarray_type_t typedarray_id);\necma_typedarray_setter_fn_t ecma_get_typedarray_setter_fn (ecma_typedarray_type_t typedarray_id);\necma_value_t ecma_get_typedarray_element (lit_utf8_byte_t *src_p,\n                                          ecma_typedarray_type_t typedarray_id);\necma_value_t ecma_set_typedarray_element (lit_utf8_byte_t *dst_p,\n                                          ecma_value_t value,\n                                          ecma_typedarray_type_t typedarray_id);\nbool ecma_typedarray_helper_is_typedarray (ecma_builtin_id_t builtin_id);\necma_typedarray_type_t ecma_get_typedarray_id (ecma_object_t *obj_p);\necma_builtin_id_t ecma_typedarray_helper_get_prototype_id (ecma_typedarray_type_t typedarray_id);\necma_builtin_id_t ecma_typedarray_helper_get_constructor_id (ecma_typedarray_type_t typedarray_id);\necma_typedarray_type_t ecma_typedarray_helper_builtin_to_typedarray_id (ecma_builtin_id_t builtin_id);\n\necma_value_t ecma_op_typedarray_from (ecma_value_t items_val,\n                                      ecma_value_t map_fn_val,\n                                      ecma_value_t this_val,\n                                      ecma_object_t *proto_p,\n                                      uint8_t element_size_shift,\n                                      ecma_typedarray_type_t typedarray_id);\nuint32_t ecma_typedarray_get_length (ecma_object_t *typedarray_p);\nuint32_t ecma_typedarray_get_offset (ecma_object_t *typedarray_p);\nlit_utf8_byte_t *ecma_typedarray_get_buffer (ecma_object_t *typedarray_p);\nuint8_t ecma_typedarray_get_element_size_shift (ecma_object_t *typedarray_p);\necma_object_t *ecma_typedarray_get_arraybuffer (ecma_object_t *typedarray_p);\necma_value_t ecma_op_create_typedarray (const ecma_value_t *arguments_list_p,\n                                        uint32_t arguments_list_len,\n                                        ecma_object_t *proto_p,\n                                        uint8_t element_size_shift,\n                                        ecma_typedarray_type_t typedarray_id);\necma_value_t\necma_typedarray_iterators_helper (ecma_value_t this_arg, ecma_iterator_kind_t kind);\n\nbool ecma_object_is_typedarray (ecma_object_t *obj_p);\nbool ecma_is_typedarray (ecma_value_t target);\nvoid ecma_op_typedarray_list_lazy_property_names (ecma_object_t *obj_p,\n                                                  ecma_collection_t *prop_names_p,\n                                                  ecma_property_counter_t *prop_counter_p);\necma_value_t ecma_op_typedarray_define_index_prop (ecma_object_t *obj_p,\n                                                   uint32_t index,\n                                                   const ecma_property_descriptor_t *property_desc_p);\necma_value_t ecma_op_create_typedarray_with_type_and_length (ecma_typedarray_type_t typedarray_id,\n                                                             uint32_t array_length);\necma_typedarray_info_t ecma_typedarray_get_info (ecma_object_t *typedarray_p);\necma_value_t ecma_typedarray_create_object_with_length (uint32_t array_length,\n                                                        ecma_object_t *src_arraybuffer_p,\n                                                        ecma_object_t *proto_p,\n                                                        uint8_t element_size_shift,\n                                                        ecma_typedarray_type_t typedarray_id);\necma_value_t ecma_typedarray_create (ecma_object_t *constructor_p, ecma_value_t *arguments_list_p,\n                                     uint32_t arguments_list_len);\necma_value_t ecma_typedarray_species_create (ecma_value_t this_arg,\n                                             ecma_value_t *length,\n                                             uint32_t arguments_list_len);\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */\n#endif /* !ECMA_TYPEDARRAY_OBJECT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/include/jerryscript-compiler.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYSCRIPT_COMPILER_H\n#define JERRYSCRIPT_COMPILER_H\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/** \\addtogroup jerry-compiler Jerry compiler compatibility components\n * @{\n */\n\n#ifdef __GNUC__\n\n/*\n * Compiler-specific macros relevant for GCC.\n */\n#define JERRY_ATTR_ALIGNED(ALIGNMENT) __attribute__((aligned(ALIGNMENT)))\n#define JERRY_ATTR_ALWAYS_INLINE __attribute__((always_inline))\n#define JERRY_ATTR_CONST __attribute__((const))\n#define JERRY_ATTR_DEPRECATED __attribute__((deprecated))\n#define JERRY_ATTR_FORMAT(...) __attribute__((format(__VA_ARGS__)))\n#define JERRY_ATTR_HOT __attribute__((hot))\n#define JERRY_ATTR_NOINLINE __attribute__((noinline))\n#define JERRY_ATTR_NORETURN __attribute__((noreturn))\n#define JERRY_ATTR_PURE __attribute__((pure))\n#define JERRY_ATTR_WARN_UNUSED_RESULT __attribute__((warn_unused_result))\n\n#define JERRY_LIKELY(x) __builtin_expect(!!(x), 1)\n#define JERRY_UNLIKELY(x) __builtin_expect(!!(x), 0)\n\n#endif /* __GNUC__ */\n\n#ifdef _MSC_VER\n\n/*\n * Compiler-specific macros relevant for Microsoft Visual C/C++ Compiler.\n */\n#define JERRY_ATTR_DEPRECATED __declspec(deprecated)\n#define JERRY_ATTR_NOINLINE __declspec(noinline)\n#define JERRY_ATTR_NORETURN __declspec(noreturn)\n\n/*\n * Microsoft Visual C/C++ Compiler doesn't support for VLA, using _alloca\n * instead.\n */\nvoid * __cdecl _alloca (size_t _Size);\n#define JERRY_VLA(type, name, size) type *name = (type *) (_alloca (sizeof (type) * size))\n\n#endif /* _MSC_VER */\n\n/*\n * Default empty definitions for all compiler-specific macros. Define any of\n * these in a guarded block above (e.g., as for GCC) to fine tune compilation\n * for your own compiler. */\n\n/**\n * Function attribute to align function to given number of bytes.\n */\n#ifndef JERRY_ATTR_ALIGNED\n#define JERRY_ATTR_ALIGNED(ALIGNMENT)\n#endif /* !JERRY_ATTR_ALIGNED */\n\n/**\n * Function attribute to inline function to all call sites.\n */\n#ifndef JERRY_ATTR_ALWAYS_INLINE\n#define JERRY_ATTR_ALWAYS_INLINE\n#endif /* !JERRY_ATTR_ALWAYS_INLINE */\n\n/**\n * Function attribute to declare that function has no effect except the return\n * value and it only depends on parameters.\n */\n#ifndef JERRY_ATTR_CONST\n#define JERRY_ATTR_CONST\n#endif /* !JERRY_ATTR_CONST */\n\n/**\n * Function attribute to trigger warning if deprecated function is called.\n */\n#ifndef JERRY_ATTR_DEPRECATED\n#define JERRY_ATTR_DEPRECATED\n#endif /* !JERRY_ATTR_DEPRECATED */\n\n/**\n * Function attribute to declare that function is variadic and takes a format\n * string and some arguments as parameters.\n */\n#ifndef JERRY_ATTR_FORMAT\n#define JERRY_ATTR_FORMAT(...)\n#endif /* !JERRY_ATTR_FORMAT */\n\n/**\n * Function attribute to predict that function is a hot spot, and therefore\n * should be optimized aggressively.\n */\n#ifndef JERRY_ATTR_HOT\n#define JERRY_ATTR_HOT\n#endif /* !JERRY_ATTR_HOT */\n\n/**\n * Function attribute not to inline function ever.\n */\n#ifndef JERRY_ATTR_NOINLINE\n#define JERRY_ATTR_NOINLINE\n#endif /* !JERRY_ATTR_NOINLINE */\n\n/**\n * Function attribute to declare that function never returns.\n */\n#ifndef JERRY_ATTR_NORETURN\n#define JERRY_ATTR_NORETURN\n#endif /* !JERRY_ATTR_NORETURN */\n\n/**\n * Function attribute to declare that function has no effect except the return\n * value and it only depends on parameters and global variables.\n */\n#ifndef JERRY_ATTR_PURE\n#define JERRY_ATTR_PURE\n#endif /* !JERRY_ATTR_PURE */\n\n/**\n * Function attribute to trigger warning if function's caller doesn't use (e.g.,\n * check) the return value.\n */\n#ifndef JERRY_ATTR_WARN_UNUSED_RESULT\n#define JERRY_ATTR_WARN_UNUSED_RESULT\n#endif /* !JERRY_ATTR_WARN_UNUSED_RESULT */\n\n/**\n * Helper to predict that a condition is likely.\n */\n#ifndef JERRY_LIKELY\n#define JERRY_LIKELY(x) (x)\n#endif /* !JERRY_LIKELY */\n\n/**\n * Helper to predict that a condition is unlikely.\n */\n#ifndef JERRY_UNLIKELY\n#define JERRY_UNLIKELY(x) (x)\n#endif /* !JERRY_UNLIKELY */\n\n/**\n * Helper to declare (or mimic) a C99 variable-length array.\n */\n#ifndef JERRY_VLA\n#define JERRY_VLA(type, name, size) type name[size]\n#endif /* !JERRY_VLA */\n\n/**\n * @}\n */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYSCRIPT_COMPILER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/include/jerryscript-core.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYSCRIPT_CORE_H\n#define JERRYSCRIPT_CORE_H\n\n#include <stdbool.h>\n#include <stddef.h>\n#include <stdint.h>\n\n#include \"jerryscript-compiler.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/** \\addtogroup jerry Jerry engine interface\n * @{\n */\n\n/**\n * Major version of JerryScript API.\n */\n#define JERRY_API_MAJOR_VERSION 2\n\n/**\n * Minor version of JerryScript API.\n */\n#define JERRY_API_MINOR_VERSION 4\n\n/**\n * Patch version of JerryScript API.\n */\n#define JERRY_API_PATCH_VERSION 0\n\n/**\n * JerryScript init flags.\n */\ntypedef enum\n{\n  JERRY_INIT_EMPTY               = (0u),      /**< empty flag set */\n  JERRY_INIT_SHOW_OPCODES        = (1u << 0), /**< dump byte-code to log after parse */\n  JERRY_INIT_SHOW_REGEXP_OPCODES = (1u << 1), /**< dump regexp byte-code to log after compilation */\n  JERRY_INIT_MEM_STATS           = (1u << 2), /**< dump memory statistics */\n  JERRY_INIT_MEM_STATS_SEPARATE  = (1u << 3), /**< deprecated, an unused placeholder now */\n  JERRY_INIT_DEBUGGER            = (1u << 4), /**< deprecated, an unused placeholder now */\n} jerry_init_flag_t;\n\n/**\n * JerryScript API Error object types.\n */\ntypedef enum\n{\n  JERRY_ERROR_NONE = 0,  /**< No Error */\n\n  JERRY_ERROR_COMMON,    /**< Error */\n  JERRY_ERROR_EVAL,      /**< EvalError */\n  JERRY_ERROR_RANGE,     /**< RangeError */\n  JERRY_ERROR_REFERENCE, /**< ReferenceError */\n  JERRY_ERROR_SYNTAX,    /**< SyntaxError */\n  JERRY_ERROR_TYPE,      /**< TypeError */\n  JERRY_ERROR_URI        /**< URIError */\n} jerry_error_t;\n\n/**\n * JerryScript feature types.\n */\ntypedef enum\n{\n  JERRY_FEATURE_CPOINTER_32_BIT, /**< 32 bit compressed pointers */\n  JERRY_FEATURE_ERROR_MESSAGES, /**< error messages */\n  JERRY_FEATURE_JS_PARSER, /**< js-parser */\n  JERRY_FEATURE_MEM_STATS, /**< memory statistics */\n  JERRY_FEATURE_PARSER_DUMP, /**< parser byte-code dumps */\n  JERRY_FEATURE_REGEXP_DUMP, /**< regexp byte-code dumps */\n  JERRY_FEATURE_SNAPSHOT_SAVE, /**< saving snapshot files */\n  JERRY_FEATURE_SNAPSHOT_EXEC, /**< executing snapshot files */\n  JERRY_FEATURE_DEBUGGER, /**< debugging */\n  JERRY_FEATURE_VM_EXEC_STOP, /**< stopping ECMAScript execution */\n  JERRY_FEATURE_JSON, /**< JSON support */\n  JERRY_FEATURE_PROMISE, /**< promise support */\n  JERRY_FEATURE_TYPEDARRAY, /**< Typedarray support */\n  JERRY_FEATURE_DATE, /**< Date support */\n  JERRY_FEATURE_REGEXP, /**< Regexp support */\n  JERRY_FEATURE_LINE_INFO, /**< line info available */\n  JERRY_FEATURE_LOGGING, /**< logging */\n  JERRY_FEATURE_SYMBOL, /**< symbol support */\n  JERRY_FEATURE_DATAVIEW, /**< DataView support */\n  JERRY_FEATURE_PROXY, /**< Proxy support */\n  JERRY_FEATURE_MAP, /**< Map support */\n  JERRY_FEATURE_SET, /**< Set support */\n  JERRY_FEATURE_WEAKMAP, /**< WeakMap support */\n  JERRY_FEATURE_WEAKSET, /**< WeakSet support */\n  JERRY_FEATURE_BIGINT, /**< BigInt support */\n  JERRY_FEATURE_REALM, /**< realm support */\n  JERRY_FEATURE__COUNT /**< number of features. NOTE: must be at the end of the list */\n} jerry_feature_t;\n\n/**\n * Option flags for jerry_parse and jerry_parse_function functions.\n */\ntypedef enum\n{\n  JERRY_PARSE_NO_OPTS = 0, /**< no options passed */\n  JERRY_PARSE_STRICT_MODE = (1 << 0), /**< enable strict mode */\n  JERRY_PARSE_MODULE = (1 << 1) /**< parse source as an ECMAScript module */\n} jerry_parse_opts_t;\n\n/**\n * GC operational modes.\n */\ntypedef enum\n{\n  JERRY_GC_PRESSURE_LOW, /**< free unused objects, but keep memory\n                          *   allocated for performance improvements\n                          *   such as property hash tables for large objects */\n  JERRY_GC_PRESSURE_HIGH /**< free as much memory as possible */\n} jerry_gc_mode_t;\n\n/**\n * Jerry regexp flags.\n */\ntypedef enum\n{\n  JERRY_REGEXP_FLAG_GLOBAL = (1u << 1),      /**< Globally scan string */\n  JERRY_REGEXP_FLAG_IGNORE_CASE = (1u << 2), /**< Ignore case */\n  JERRY_REGEXP_FLAG_MULTILINE = (1u << 3),   /**< Multiline string scan */\n  JERRY_REGEXP_FLAG_STICKY = (1u << 4),      /**< ECMAScript v11, 21.2.5.14 */\n  JERRY_REGEXP_FLAG_UNICODE = (1u << 5),     /**< ECMAScript v11, 21.2.5.17 */\n  JERRY_REGEXP_FLAG_DOTALL = (1u << 6)       /**< ECMAScript v11, 21.2.5.3 */\n} jerry_regexp_flags_t;\n\n/**\n * Character type of JerryScript.\n */\ntypedef uint8_t jerry_char_t;\n\n/**\n * Size type of JerryScript.\n */\ntypedef uint32_t jerry_size_t;\n\n/**\n * Length type of JerryScript.\n */\ntypedef uint32_t jerry_length_t;\n\n/**\n * Description of a JerryScript value.\n */\ntypedef uint32_t jerry_value_t;\n\n/**\n * Description of ECMA property descriptor.\n */\ntypedef struct\n{\n  /** Is [[Value]] defined? */\n  bool is_value_defined;\n\n  /** Is [[Get]] defined? */\n  bool is_get_defined;\n\n  /** Is [[Set]] defined? */\n  bool is_set_defined;\n\n  /** Is [[Writable]] defined? */\n  bool is_writable_defined;\n\n  /** [[Writable]] */\n  bool is_writable;\n\n  /** Is [[Enumerable]] defined? */\n  bool is_enumerable_defined;\n\n  /** [[Enumerable]] */\n  bool is_enumerable;\n\n  /** Is [[Configurable]] defined? */\n  bool is_configurable_defined;\n\n  /** [[Configurable]] */\n  bool is_configurable;\n\n  /** [[Value]] */\n  jerry_value_t value;\n\n  /** [[Get]] */\n  jerry_value_t getter;\n\n  /** [[Set]] */\n  jerry_value_t setter;\n} jerry_property_descriptor_t;\n\n/**\n * Description of JerryScript heap memory stats.\n * It is for memory profiling.\n */\ntypedef struct\n{\n  size_t version; /**< the version of the stats struct */\n  size_t size; /**< heap total size */\n  size_t allocated_bytes; /**< currently allocated bytes */\n  size_t peak_allocated_bytes; /**< peak allocated bytes */\n  size_t reserved[4]; /**< padding for future extensions */\n} jerry_heap_stats_t;\n\n/**\n * Type of an external function handler.\n */\ntypedef jerry_value_t (*jerry_external_handler_t) (const jerry_value_t function_obj,\n                                                   const jerry_value_t this_val,\n                                                   const jerry_value_t args_p[],\n                                                   const jerry_length_t args_count);\n\n/**\n * Native free callback of an object.\n */\ntypedef void (*jerry_object_native_free_callback_t) (void *native_p);\n\n/**\n * Decorator callback for Error objects. The decorator can create\n * or update any properties of the newly created Error object.\n */\ntypedef void (*jerry_error_object_created_callback_t) (const jerry_value_t error_object, void *user_p);\n\n/**\n * Callback which tells whether the ECMAScript execution should be stopped.\n *\n * As long as the function returns with undefined the execution continues.\n * When a non-undefined value is returned the execution stops and the value\n * is thrown by the engine (if the error flag is not set for the returned\n * value the engine automatically sets it).\n *\n * Note: if the function returns with a non-undefined value it\n *       must return with the same value for future calls.\n */\ntypedef jerry_value_t (*jerry_vm_exec_stop_callback_t) (void *user_p);\n\n/**\n * Function type applied for each data property of an object.\n */\ntypedef bool (*jerry_object_property_foreach_t) (const jerry_value_t property_name,\n                                                 const jerry_value_t property_value,\n                                                 void *user_data_p);\n/**\n * Function type applied for each object in the engine.\n */\ntypedef bool (*jerry_objects_foreach_t) (const jerry_value_t object,\n                                         void *user_data_p);\n\n/**\n * Function type applied for each matching object in the engine.\n */\ntypedef bool (*jerry_objects_foreach_by_native_info_t) (const jerry_value_t object,\n                                                        void *object_data_p,\n                                                        void *user_data_p);\n\n/**\n * User context item manager\n */\ntypedef struct\n{\n  /**\n   * Callback responsible for initializing a context item, or NULL to zero out the memory. This is called lazily, the\n   * first time jerry_get_context_data () is called with this manager.\n   *\n   * @param [in] data The buffer that JerryScript allocated for the manager. The buffer is zeroed out. The size is\n   * determined by the bytes_needed field. The buffer is kept alive until jerry_cleanup () is called.\n   */\n  void (*init_cb) (void *data);\n\n  /**\n   * Callback responsible for deinitializing a context item, or NULL. This is called as part of jerry_cleanup (),\n   * right *before* the VM has been cleaned up. This is a good place to release strong references to jerry_value_t's\n   * that the manager may be holding.\n   * Note: because the VM has not been fully cleaned up yet, jerry_object_native_info_t free_cb's can still get called\n   * *after* all deinit_cb's have been run. See finalize_cb for a callback that is guaranteed to run *after* all\n   * free_cb's have been run.\n   *\n   * @param [in] data The buffer that JerryScript allocated for the manager.\n   */\n  void (*deinit_cb) (void *data);\n\n  /**\n   * Callback responsible for finalizing a context item, or NULL. This is called as part of jerry_cleanup (),\n   * right *after* the VM has been cleaned up and destroyed and jerry_... APIs cannot be called any more. At this point,\n   * all values in the VM have been cleaned up. This is a good place to clean up native state that can only be cleaned\n   * up at the very end when there are no more VM values around that may need to access that state.\n   *\n   * @param [in] data The buffer that JerryScript allocated for the manager. After returning from this callback,\n   * the data pointer may no longer be used.\n   */\n  void (*finalize_cb) (void *data);\n\n  /**\n   * Number of bytes to allocate for this manager. This is the size of the buffer that JerryScript will allocate on\n   * behalf of the manager. The pointer to this buffer is passed into init_cb, deinit_cb and finalize_cb. It is also\n   * returned from the jerry_get_context_data () API.\n   */\n  size_t bytes_needed;\n} jerry_context_data_manager_t;\n\n/**\n * Function type for allocating buffer for JerryScript context.\n */\ntypedef void *(*jerry_context_alloc_t) (size_t size, void *cb_data_p);\n\n/**\n * Type information of a native pointer.\n */\ntypedef struct\n{\n  jerry_object_native_free_callback_t free_cb; /**< the free callback of the native pointer */\n} jerry_object_native_info_t;\n\n/**\n * An opaque declaration of the JerryScript context structure.\n */\ntypedef struct jerry_context_t jerry_context_t;\n\n/**\n * Enum that contains the supported binary operation types\n */\ntypedef enum\n{\n  JERRY_BIN_OP_EQUAL = 0u,    /**< equal comparison (==) */\n  JERRY_BIN_OP_STRICT_EQUAL,  /**< strict equal comparison (===) */\n  JERRY_BIN_OP_LESS,          /**< less relation (<) */\n  JERRY_BIN_OP_LESS_EQUAL,    /**< less or equal relation (<=) */\n  JERRY_BIN_OP_GREATER,       /**< greater relation (>) */\n  JERRY_BIN_OP_GREATER_EQUAL, /**< greater or equal relation (>=)*/\n  JERRY_BIN_OP_INSTANCEOF,    /**< instanceof operation */\n  JERRY_BIN_OP_ADD,           /**< addition operator (+) */\n  JERRY_BIN_OP_SUB,           /**< subtraction operator (-) */\n  JERRY_BIN_OP_MUL,           /**< multiplication operator (*) */\n  JERRY_BIN_OP_DIV,           /**< division operator (/) */\n  JERRY_BIN_OP_REM,           /**< remainder operator (%) */\n} jerry_binary_operation_t;\n\n/**\n * General engine functions.\n */\nvoid jerry_init (jerry_init_flag_t flags);\nvoid jerry_cleanup (void);\nvoid jerry_register_magic_strings (const jerry_char_t * const *ex_str_items_p,\n                                   uint32_t count,\n                                   const jerry_length_t *str_lengths_p);\nvoid jerry_gc (jerry_gc_mode_t mode);\nvoid *jerry_get_context_data (const jerry_context_data_manager_t *manager_p);\n\nbool jerry_get_memory_stats (jerry_heap_stats_t *out_stats_p);\n\n/**\n * Parser and executor functions.\n */\nbool jerry_run_simple (const jerry_char_t *script_source_p, size_t script_source_size, jerry_init_flag_t flags);\njerry_value_t jerry_parse (const jerry_char_t *resource_name_p, size_t resource_name_length,\n                           const jerry_char_t *source_p, size_t source_size, uint32_t parse_opts);\njerry_value_t jerry_parse_function (const jerry_char_t *resource_name_p, size_t resource_name_length,\n                                    const jerry_char_t *arg_list_p, size_t arg_list_size,\n                                    const jerry_char_t *source_p, size_t source_size, uint32_t parse_opts);\njerry_value_t jerry_run (const jerry_value_t func_val);\njerry_value_t jerry_eval (const jerry_char_t *source_p, size_t source_size, uint32_t parse_opts);\n\njerry_value_t jerry_run_all_enqueued_jobs (void);\n\n/**\n * Get the global context.\n */\njerry_value_t jerry_get_global_object (void);\n\n/**\n * Checker functions of 'jerry_value_t'.\n */\nbool jerry_value_is_abort (const jerry_value_t value);\nbool jerry_value_is_array (const jerry_value_t value);\nbool jerry_value_is_boolean (const jerry_value_t value);\nbool jerry_value_is_constructor (const jerry_value_t value);\nbool jerry_value_is_error (const jerry_value_t value);\nbool jerry_value_is_function (const jerry_value_t value);\nbool jerry_value_is_async_function (const jerry_value_t value);\nbool jerry_value_is_number (const jerry_value_t value);\nbool jerry_value_is_null (const jerry_value_t value);\nbool jerry_value_is_object (const jerry_value_t value);\nbool jerry_value_is_promise (const jerry_value_t value);\nbool jerry_value_is_proxy (const jerry_value_t value);\nbool jerry_value_is_string (const jerry_value_t value);\nbool jerry_value_is_symbol (const jerry_value_t value);\nbool jerry_value_is_bigint (const jerry_value_t value);\nbool jerry_value_is_undefined (const jerry_value_t value);\n\n/**\n * JerryScript API value type information.\n */\ntypedef enum\n{\n  JERRY_TYPE_NONE = 0u, /**< no type information */\n  JERRY_TYPE_UNDEFINED, /**< undefined type */\n  JERRY_TYPE_NULL,      /**< null type */\n  JERRY_TYPE_BOOLEAN,   /**< boolean type */\n  JERRY_TYPE_NUMBER,    /**< number type */\n  JERRY_TYPE_STRING,    /**< string type */\n  JERRY_TYPE_OBJECT,    /**< object type */\n  JERRY_TYPE_FUNCTION,  /**< function type */\n  JERRY_TYPE_ERROR,     /**< error/abort type */\n  JERRY_TYPE_SYMBOL,    /**< symbol type */\n  JERRY_TYPE_BIGINT,    /**< bigint type */\n} jerry_type_t;\n\n/**\n * JerryScript object type information.\n */\ntypedef enum\n{\n  JERRY_OBJECT_TYPE_NONE = 0u,    /**< Non object type */\n  JERRY_OBJECT_TYPE_GENERIC,      /**< Generic JavaScript object without any internal property */\n  JERRY_OBJECT_TYPE_ARRAY,        /**< Array object */\n  JERRY_OBJECT_TYPE_PROXY,        /**< Proxy object */\n  JERRY_OBJECT_TYPE_FUNCTION,     /**< Function object (see jerry_function_get_type) */\n  JERRY_OBJECT_TYPE_TYPEDARRAY,   /**< %TypedArray% object (see jerry_get_typedarray_type) */\n  JERRY_OBJECT_TYPE_ITERATOR,     /**< Iterator object (see jerry_iterator_get_type) */\n  JERRY_OBJECT_TYPE_CONTAINER,    /**< Container object (see jerry_container_get_type) */\n\n  JERRY_OBJECT_TYPE_ARGUMENTS,    /**< Arguments object */\n  JERRY_OBJECT_TYPE_BOOLEAN,      /**< Boolean object */\n  JERRY_OBJECT_TYPE_DATE,         /**< Date object */\n  JERRY_OBJECT_TYPE_NUMBER,       /**< Number object */\n  JERRY_OBJECT_TYPE_REGEXP,       /**< RegExp object */\n  JERRY_OBJECT_TYPE_STRING,       /**< String object */\n  JERRY_OBJECT_TYPE_SYMBOL,       /**< Symbol object */\n  JERRY_OBJECT_TYPE_GENERATOR,    /**< Generator object */\n  JERRY_OBJECT_TYPE_BIGINT,       /**< BigInt object */\n} jerry_object_type_t;\n\n/**\n * JerryScript function object type information.\n */\ntypedef enum\n{\n  JERRY_FUNCTION_TYPE_NONE = 0u,    /**< Non function type */\n  JERRY_FUNCTION_TYPE_GENERIC,      /**< Generic JavaScript function */\n  JERRY_FUNCTION_TYPE_ACCESSOR,     /**< Accessor function */\n  JERRY_FUNCTION_TYPE_BOUND,        /**< Bound function */\n  JERRY_FUNCTION_TYPE_ARROW,        /**< Arrow fuction */\n  JERRY_FUNCTION_TYPE_GENERATOR,    /**< Generator function */\n} jerry_function_type_t;\n\n/**\n * JerryScript iterator object type information.\n */\ntypedef enum\n{\n  JERRY_ITERATOR_TYPE_NONE = 0u,    /**< Non iterator type */\n  JERRY_ITERATOR_TYPE_ARRAY,        /**< Array iterator */\n  JERRY_ITERATOR_TYPE_STRING,       /**< String iterator */\n  JERRY_ITERATOR_TYPE_MAP,          /**< Map iterator */\n  JERRY_ITERATOR_TYPE_SET,          /**< Set iterator */\n} jerry_iterator_type_t;\n\n/**\n * JerryScript object property filter options.\n */\ntypedef enum\n{\n  JERRY_PROPERTY_FILTER_ALL = 0,                               /**< List all property keys independently\n                                                                *   from key type or property value attributes\n                                                                *   (equivalent to Reflect.ownKeys call)  */\n  JERRY_PROPERTY_FILTER_TRAVERSE_PROTOTYPE_CHAIN = (1 << 0),   /**< Include keys from the objects's\n                                                                *   prototype chain as well */\n  JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE = (1 << 1),   /**< Exclude property key if\n                                                                *   the property is non-configurable */\n  JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE = (1 << 2),     /**< Exclude property key if\n                                                                *   the property is non-enumerable */\n  JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE = (1 << 3),       /**< Exclude property key if\n                                                                *   the property is non-writable */\n  JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS = (1 << 4),            /**< Exclude property key if it is a string */\n  JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS = (1 << 5),            /**< Exclude property key if it is a symbol */\n  JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES = (1 << 6),    /**< Exclude property key if it is an integer index */\n  JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER = (1 << 7),  /**< By default integer index property keys are\n                                                                *   converted to string. Enabling this flags keeps\n                                                                *   integer index property keys as numbers. */\n} jerry_property_filter_t;\n\njerry_type_t jerry_value_get_type (const jerry_value_t value);\njerry_object_type_t jerry_object_get_type (const jerry_value_t value);\njerry_function_type_t jerry_function_get_type (const jerry_value_t value);\njerry_iterator_type_t jerry_iterator_get_type (const jerry_value_t value);\n\n/**\n * Checker function of whether the specified compile feature is enabled.\n */\nbool jerry_is_feature_enabled (const jerry_feature_t feature);\n\n/**\n * Binary operations\n */\njerry_value_t jerry_binary_operation (jerry_binary_operation_t op,\n                                      const jerry_value_t lhs,\n                                      const jerry_value_t rhs);\n\n/**\n * Error manipulation functions.\n */\njerry_value_t jerry_create_abort_from_value (jerry_value_t value, bool release);\njerry_value_t jerry_create_error_from_value (jerry_value_t value, bool release);\njerry_value_t jerry_get_value_from_error (jerry_value_t value, bool release);\nvoid jerry_set_error_object_created_callback (jerry_error_object_created_callback_t callback, void *user_p);\n\n/**\n * Error object function(s).\n */\njerry_error_t jerry_get_error_type (jerry_value_t value);\n\n/**\n * Getter functions of 'jerry_value_t'.\n */\nbool jerry_get_boolean_value (const jerry_value_t value);\ndouble jerry_get_number_value (const jerry_value_t value);\n\n/**\n * Functions for string values.\n */\njerry_size_t jerry_get_string_size (const jerry_value_t value);\njerry_size_t jerry_get_utf8_string_size (const jerry_value_t value);\njerry_length_t jerry_get_string_length (const jerry_value_t value);\njerry_length_t jerry_get_utf8_string_length (const jerry_value_t value);\njerry_size_t jerry_string_to_char_buffer (const jerry_value_t value, jerry_char_t *buffer_p, jerry_size_t buffer_size);\njerry_size_t jerry_string_to_utf8_char_buffer (const jerry_value_t value,\n                                               jerry_char_t *buffer_p,\n                                               jerry_size_t buffer_size);\njerry_size_t jerry_substring_to_char_buffer (const jerry_value_t value,\n                                             jerry_length_t start_pos,\n                                             jerry_length_t end_pos,\n                                             jerry_char_t *buffer_p,\n                                             jerry_size_t buffer_size);\njerry_size_t jerry_substring_to_utf8_char_buffer (const jerry_value_t value,\n                                                  jerry_length_t start_pos,\n                                                  jerry_length_t end_pos,\n                                                  jerry_char_t *buffer_p,\n                                                  jerry_size_t buffer_size);\n\n/**\n * Functions for array object values.\n */\nuint32_t jerry_get_array_length (const jerry_value_t value);\n\n/**\n * Converters of 'jerry_value_t'.\n */\nbool jerry_value_to_boolean (const jerry_value_t value);\njerry_value_t jerry_value_to_number (const jerry_value_t value);\njerry_value_t jerry_value_to_object (const jerry_value_t value);\njerry_value_t jerry_value_to_primitive (const jerry_value_t value);\njerry_value_t jerry_value_to_string (const jerry_value_t value);\njerry_value_t jerry_value_to_bigint (const jerry_value_t value);\ndouble jerry_value_as_integer (const jerry_value_t value);\nint32_t jerry_value_as_int32 (const jerry_value_t value);\nuint32_t jerry_value_as_uint32 (const jerry_value_t value);\n\n/**\n * Acquire types with reference counter (increase the references).\n */\njerry_value_t jerry_acquire_value (jerry_value_t value);\n\n/**\n * Release the referenced values.\n */\nvoid jerry_release_value (jerry_value_t value);\n\n/**\n * Create functions of API values.\n */\njerry_value_t jerry_create_array (uint32_t size);\njerry_value_t jerry_create_boolean (bool value);\njerry_value_t jerry_create_error (jerry_error_t error_type, const jerry_char_t *message_p);\njerry_value_t jerry_create_error_sz (jerry_error_t error_type, const jerry_char_t *message_p,\n                                     jerry_size_t message_size);\njerry_value_t jerry_create_external_function (jerry_external_handler_t handler_p);\njerry_value_t jerry_create_number (double value);\njerry_value_t jerry_create_number_infinity (bool sign);\njerry_value_t jerry_create_number_nan (void);\njerry_value_t jerry_create_null (void);\njerry_value_t jerry_create_object (void);\njerry_value_t jerry_create_promise (void);\njerry_value_t jerry_create_proxy (const jerry_value_t target, const jerry_value_t handler);\njerry_value_t jerry_create_regexp (const jerry_char_t *pattern, uint16_t flags);\njerry_value_t jerry_create_regexp_sz (const jerry_char_t *pattern, jerry_size_t pattern_size, uint16_t flags);\njerry_value_t jerry_create_string_from_utf8 (const jerry_char_t *str_p);\njerry_value_t jerry_create_string_sz_from_utf8 (const jerry_char_t *str_p, jerry_size_t str_size);\njerry_value_t jerry_create_string (const jerry_char_t *str_p);\njerry_value_t jerry_create_string_sz (const jerry_char_t *str_p, jerry_size_t str_size);\njerry_value_t jerry_create_external_string (const jerry_char_t *str_p,\n                                            jerry_object_native_free_callback_t free_cb);\njerry_value_t jerry_create_external_string_sz (const jerry_char_t *str_p, jerry_size_t str_size,\n                                               jerry_object_native_free_callback_t free_cb);\njerry_value_t jerry_create_symbol (const jerry_value_t value);\njerry_value_t jerry_create_bigint (const uint64_t *digits_p, uint32_t size, bool sign);\njerry_value_t jerry_create_undefined (void);\njerry_value_t jerry_create_realm (void);\n\n/**\n * General API functions of JS objects.\n */\njerry_value_t jerry_has_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);\njerry_value_t jerry_has_own_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);\nbool jerry_has_internal_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);\nbool jerry_delete_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);\nbool jerry_delete_property_by_index (const jerry_value_t obj_val, uint32_t index);\nbool jerry_delete_internal_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);\n\njerry_value_t jerry_get_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);\njerry_value_t jerry_get_property_by_index (const jerry_value_t obj_val, uint32_t index);\njerry_value_t jerry_get_internal_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);\njerry_value_t jerry_set_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val,\n                                  const jerry_value_t value_to_set);\njerry_value_t jerry_set_property_by_index (const jerry_value_t obj_val, uint32_t index,\n                                           const jerry_value_t value_to_set);\nbool jerry_set_internal_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val,\n                                  const jerry_value_t value_to_set);\n\nvoid jerry_init_property_descriptor_fields (jerry_property_descriptor_t *prop_desc_p);\njerry_value_t jerry_define_own_property (const jerry_value_t obj_val,\n                                         const jerry_value_t prop_name_val,\n                                         const jerry_property_descriptor_t *prop_desc_p);\n\nbool jerry_get_own_property_descriptor (const jerry_value_t obj_val,\n                                        const jerry_value_t prop_name_val,\n                                        jerry_property_descriptor_t *prop_desc_p);\nvoid jerry_free_property_descriptor_fields (const jerry_property_descriptor_t *prop_desc_p);\n\njerry_value_t jerry_call_function (const jerry_value_t func_obj_val, const jerry_value_t this_val,\n                                   const jerry_value_t args_p[], jerry_size_t args_count);\njerry_value_t jerry_construct_object (const jerry_value_t func_obj_val, const jerry_value_t args_p[],\n                                      jerry_size_t args_count);\n\njerry_value_t jerry_get_object_keys (const jerry_value_t obj_val);\njerry_value_t jerry_get_prototype (const jerry_value_t obj_val);\njerry_value_t jerry_set_prototype (const jerry_value_t obj_val, const jerry_value_t proto_obj_val);\n\nbool jerry_get_object_native_pointer (const jerry_value_t obj_val,\n                                      void **out_native_pointer_p,\n                                      const jerry_object_native_info_t *native_pointer_info_p);\nvoid jerry_set_object_native_pointer (const jerry_value_t obj_val,\n                                      void *native_pointer_p,\n                                      const jerry_object_native_info_t *native_info_p);\nbool jerry_delete_object_native_pointer (const jerry_value_t obj_val,\n                                         const jerry_object_native_info_t *native_info_p);\n\nbool jerry_objects_foreach (jerry_objects_foreach_t foreach_p,\n                            void *user_data);\nbool jerry_objects_foreach_by_native_info (const jerry_object_native_info_t *native_info_p,\n                                           jerry_objects_foreach_by_native_info_t foreach_p,\n                                           void *user_data_p);\n\nbool jerry_foreach_object_property (const jerry_value_t obj_val, jerry_object_property_foreach_t foreach_p,\n                                    void *user_data_p);\n\njerry_value_t jerry_object_get_property_names (const jerry_value_t obj_val, jerry_property_filter_t filter);\njerry_value_t jerry_from_property_descriptor (const jerry_property_descriptor_t *src_prop_desc_p);\njerry_value_t jerry_to_property_descriptor (jerry_value_t obj_value, jerry_property_descriptor_t *out_prop_desc_p);\n/**\n * Promise functions.\n */\njerry_value_t jerry_resolve_or_reject_promise (jerry_value_t promise, jerry_value_t argument, bool is_resolve);\n\n/**\n * Enum values representing various Promise states.\n */\ntypedef enum\n{\n  JERRY_PROMISE_STATE_NONE = 0u, /**< Invalid/Unknown state (possibly called on a non-promise object). */\n  JERRY_PROMISE_STATE_PENDING,   /**< Promise is in \"Pending\" state. */\n  JERRY_PROMISE_STATE_FULFILLED, /**< Promise is in \"Fulfilled\" state. */\n  JERRY_PROMISE_STATE_REJECTED,  /**< Promise is in \"Rejected\" state. */\n} jerry_promise_state_t;\n\njerry_value_t jerry_get_promise_result (const jerry_value_t promise);\njerry_promise_state_t jerry_get_promise_state (const jerry_value_t promise);\n\n/**\n * Symbol functions.\n */\n\n/**\n * List of well-known symbols.\n */\ntypedef enum\n{\n  JERRY_SYMBOL_ASYNC_ITERATOR,       /**< @@asyncIterator well-known symbol */\n  JERRY_SYMBOL_HAS_INSTANCE,         /**< @@hasInstance well-known symbol */\n  JERRY_SYMBOL_IS_CONCAT_SPREADABLE, /**< @@isConcatSpreadable well-known symbol */\n  JERRY_SYMBOL_ITERATOR,             /**< @@iterator well-known symbol */\n  JERRY_SYMBOL_MATCH,                /**< @@match well-known symbol */\n  JERRY_SYMBOL_REPLACE,              /**< @@replace well-known symbol */\n  JERRY_SYMBOL_SEARCH,               /**< @@search well-known symbol */\n  JERRY_SYMBOL_SPECIES,              /**< @@species well-known symbol */\n  JERRY_SYMBOL_SPLIT,                /**< @@split well-known symbol */\n  JERRY_SYMBOL_TO_PRIMITIVE,         /**< @@toPrimitive well-known symbol */\n  JERRY_SYMBOL_TO_STRING_TAG,        /**< @@toStringTag well-known symbol */\n  JERRY_SYMBOL_UNSCOPABLES,          /**< @@unscopables well-known symbol */\n  JERRY_SYMBOL_MATCH_ALL,            /**< @@matchAll well-known symbol */\n} jerry_well_known_symbol_t;\n\njerry_value_t jerry_get_well_known_symbol (jerry_well_known_symbol_t symbol);\njerry_value_t jerry_get_symbol_description (const jerry_value_t symbol);\njerry_value_t jerry_get_symbol_descriptive_string (const jerry_value_t symbol);\n\n/**\n * Realm functions.\n */\njerry_value_t jerry_set_realm (jerry_value_t realm_value);\njerry_value_t jerry_realm_get_this (jerry_value_t realm_value);\njerry_value_t jerry_realm_set_this (jerry_value_t realm_value, jerry_value_t this_value);\n\n/**\n * BigInt functions.\n */\nuint32_t jerry_get_bigint_size_in_digits (jerry_value_t value);\nvoid jerry_get_bigint_digits (jerry_value_t value, uint64_t *digits_p, uint32_t size, bool *sign_p);\n\n/**\n * Proxy functions.\n */\njerry_value_t jerry_get_proxy_target (jerry_value_t proxy_value);\n\n/**\n * Input validator functions.\n */\nbool jerry_is_valid_utf8_string (const jerry_char_t *utf8_buf_p, jerry_size_t buf_size);\nbool jerry_is_valid_cesu8_string (const jerry_char_t *cesu8_buf_p, jerry_size_t buf_size);\n\n/*\n * Dynamic memory management functions.\n */\nvoid *jerry_heap_alloc (size_t size);\nvoid jerry_heap_free (void *mem_p, size_t size);\n\n/*\n * External context functions.\n */\njerry_context_t *jerry_create_context (uint32_t heap_size, jerry_context_alloc_t alloc, void *cb_data_p);\n\n/**\n * Miscellaneous functions.\n */\nvoid jerry_set_vm_exec_stop_callback (jerry_vm_exec_stop_callback_t stop_cb, void *user_p, uint32_t frequency);\njerry_value_t jerry_get_backtrace (uint32_t max_depth);\njerry_value_t jerry_get_backtrace_from (uint32_t max_depth, jerry_value_t ignored_function);\njerry_value_t jerry_get_resource_name (const jerry_value_t value);\njerry_value_t jerry_get_new_target (void);\n\n/**\n * Array buffer components.\n */\nbool jerry_value_is_arraybuffer (const jerry_value_t value);\njerry_value_t jerry_create_arraybuffer (const jerry_length_t size);\njerry_value_t jerry_create_arraybuffer_external (const jerry_length_t size,\n                                                 uint8_t *buffer_p,\n                                                 jerry_object_native_free_callback_t free_cb);\njerry_length_t jerry_arraybuffer_write (const jerry_value_t value,\n                                        jerry_length_t offset,\n                                        const uint8_t *buf_p,\n                                        jerry_length_t buf_size);\njerry_length_t jerry_arraybuffer_read (const jerry_value_t value,\n                                       jerry_length_t offset,\n                                       uint8_t *buf_p,\n                                       jerry_length_t buf_size);\njerry_length_t jerry_get_arraybuffer_byte_length (const jerry_value_t value);\nuint8_t *jerry_get_arraybuffer_pointer (const jerry_value_t value);\njerry_value_t jerry_is_arraybuffer_detachable (const jerry_value_t value);\njerry_value_t jerry_detach_arraybuffer (const jerry_value_t value);\n\n/**\n * DataView functions.\n */\njerry_value_t\njerry_create_dataview (const jerry_value_t value,\n                       const jerry_length_t byte_offset,\n                       const jerry_length_t byte_length);\n\nbool\njerry_value_is_dataview (const jerry_value_t value);\n\njerry_value_t\njerry_get_dataview_buffer (const jerry_value_t dataview,\n                           jerry_length_t *byte_offset,\n                           jerry_length_t *byte_length);\n\n/**\n * TypedArray functions.\n */\n\n/**\n * TypedArray types.\n */\ntypedef enum\n{\n  JERRY_TYPEDARRAY_INVALID = 0,\n  JERRY_TYPEDARRAY_UINT8,\n  JERRY_TYPEDARRAY_UINT8CLAMPED,\n  JERRY_TYPEDARRAY_INT8,\n  JERRY_TYPEDARRAY_UINT16,\n  JERRY_TYPEDARRAY_INT16,\n  JERRY_TYPEDARRAY_UINT32,\n  JERRY_TYPEDARRAY_INT32,\n  JERRY_TYPEDARRAY_FLOAT32,\n  JERRY_TYPEDARRAY_FLOAT64,\n  JERRY_TYPEDARRAY_BIGINT64,\n  JERRY_TYPEDARRAY_BIGUINT64,\n} jerry_typedarray_type_t;\n\n/**\n * Container types.\n */\ntypedef enum\n{\n  JERRY_CONTAINER_TYPE_INVALID = 0, /**< Invalid container */\n  JERRY_CONTAINER_TYPE_MAP, /**< Map type */\n  JERRY_CONTAINER_TYPE_SET, /**< Set type */\n  JERRY_CONTAINER_TYPE_WEAKMAP, /**< WeakMap type */\n  JERRY_CONTAINER_TYPE_WEAKSET, /**< WeakSet type */\n} jerry_container_type_t;\n\nbool jerry_value_is_typedarray (jerry_value_t value);\njerry_value_t jerry_create_typedarray (jerry_typedarray_type_t type_name, jerry_length_t length);\njerry_value_t jerry_create_typedarray_for_arraybuffer_sz (jerry_typedarray_type_t type_name,\n                                                          const jerry_value_t arraybuffer,\n                                                          jerry_length_t byte_offset,\n                                                          jerry_length_t length);\njerry_value_t jerry_create_typedarray_for_arraybuffer (jerry_typedarray_type_t type_name,\n                                                       const jerry_value_t arraybuffer);\njerry_typedarray_type_t jerry_get_typedarray_type (jerry_value_t value);\njerry_length_t jerry_get_typedarray_length (jerry_value_t value);\njerry_value_t jerry_get_typedarray_buffer (jerry_value_t value,\n                                           jerry_length_t *byte_offset,\n                                           jerry_length_t *byte_length);\njerry_value_t jerry_json_parse (const jerry_char_t *string_p, jerry_size_t string_size);\njerry_value_t jerry_json_stringify (const jerry_value_t object_to_stringify);\njerry_value_t jerry_create_container (jerry_container_type_t container_type,\n                                      const jerry_value_t *arguments_list_p,\n                                      jerry_length_t arguments_list_len);\njerry_container_type_t jerry_get_container_type (const jerry_value_t value);\n\n/**\n * @}\n */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYSCRIPT_CORE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/include/jerryscript-debugger-transport.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYSCRIPT_DEBUGGER_TRANSPORT_H\n#define JERRYSCRIPT_DEBUGGER_TRANSPORT_H\n\n#include <stdbool.h>\n#include <stddef.h>\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/** \\addtogroup jerry-debugger-transport Jerry engine debugger interface - transport control\n * @{\n */\n\n/**\n * Maximum number of bytes transmitted or received.\n */\n#define JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE 128\n\n/**\n * Receive message context.\n */\ntypedef struct\n{\n  uint8_t *buffer_p; /**< buffer for storing the received data */\n  size_t received_length; /**< number of currently received bytes */\n  uint8_t *message_p; /**< start of the received message */\n  size_t message_length; /**< length of the received message */\n  size_t message_total_length; /**< total length for datagram protocols,\n                                *   0 for stream protocols */\n} jerry_debugger_transport_receive_context_t;\n\n/**\n * Forward definition of jerry_debugger_transport_header_t.\n */\nstruct jerry_debugger_transport_interface_t;\n\n/**\n * Close connection callback.\n */\ntypedef void (*jerry_debugger_transport_close_t) (struct jerry_debugger_transport_interface_t *header_p);\n\n/**\n * Send data callback.\n */\ntypedef bool (*jerry_debugger_transport_send_t) (struct jerry_debugger_transport_interface_t *header_p,\n                                                 uint8_t *message_p, size_t message_length);\n\n/**\n * Receive data callback.\n */\ntypedef bool (*jerry_debugger_transport_receive_t) (struct jerry_debugger_transport_interface_t *header_p,\n                                                    jerry_debugger_transport_receive_context_t *context_p);\n\n/**\n * Transport layer header.\n */\ntypedef struct jerry_debugger_transport_interface_t\n{\n  /* The following fields must be filled before calling jerry_debugger_transport_add(). */\n  jerry_debugger_transport_close_t close; /**< close connection callback */\n  jerry_debugger_transport_send_t send;  /**< send data callback */\n  jerry_debugger_transport_receive_t receive; /**< receive data callback */\n\n  /* The following fields are filled by jerry_debugger_transport_add(). */\n  struct jerry_debugger_transport_interface_t *next_p; /**< next transport layer */\n} jerry_debugger_transport_header_t;\n\nvoid jerry_debugger_transport_add (jerry_debugger_transport_header_t *header_p,\n                                   size_t send_message_header_size, size_t max_send_message_size,\n                                   size_t receive_message_header_size, size_t max_receive_message_size);\nvoid jerry_debugger_transport_start (void);\n\nbool jerry_debugger_transport_is_connected (void);\nvoid jerry_debugger_transport_close (void);\n\nbool jerry_debugger_transport_send (const uint8_t *message_p, size_t message_length);\nbool jerry_debugger_transport_receive (jerry_debugger_transport_receive_context_t *context_p);\nvoid jerry_debugger_transport_receive_completed (jerry_debugger_transport_receive_context_t *context_p);\n\nvoid jerry_debugger_transport_sleep (void);\n\n/**\n * @}\n */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYSCRIPT_DEBUGGER_TRANSPORT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/include/jerryscript-debugger.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYSCRIPT_DEBUGGER_H\n#define JERRYSCRIPT_DEBUGGER_H\n\n#include \"jerryscript-core.h\"\n#include \"jerryscript-port.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/** \\addtogroup jerry-debugger Jerry engine interface - Debugger feature\n * @{\n */\n\n/**\n * JerryScript debugger protocol version.\n */\n#define JERRY_DEBUGGER_VERSION (9)\n\n/**\n * Types for the client source wait and run method.\n */\ntypedef enum\n{\n  JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED = 0, /**< source is not received */\n  JERRY_DEBUGGER_SOURCE_RECEIVED = 1, /**< a source has been received */\n  JERRY_DEBUGGER_SOURCE_END = 2, /**< the end of the sources signal received */\n  JERRY_DEBUGGER_CONTEXT_RESET_RECEIVED, /**< the context reset request has been received */\n} jerry_debugger_wait_for_source_status_t;\n\n/**\n * Callback for jerry_debugger_wait_and_run_client_source\n *\n * The callback receives the resource name, source code and a user pointer.\n *\n * @return this value is passed back by jerry_debugger_wait_and_run_client_source\n */\ntypedef jerry_value_t (*jerry_debugger_wait_for_source_callback_t) (const jerry_char_t *resource_name_p,\n                                                                    size_t resource_name_size,\n                                                                    const jerry_char_t *source_p,\n                                                                    size_t source_size, void *user_p);\n\n/**\n * Engine debugger functions.\n */\nbool jerry_debugger_is_connected (void);\nvoid jerry_debugger_stop (void);\nvoid jerry_debugger_continue (void);\nvoid jerry_debugger_stop_at_breakpoint (bool enable_stop_at_breakpoint);\njerry_debugger_wait_for_source_status_t\njerry_debugger_wait_for_client_source (jerry_debugger_wait_for_source_callback_t callback_p,\n                                       void *user_p, jerry_value_t *return_value);\nvoid jerry_debugger_send_output (const jerry_char_t *buffer, jerry_size_t str_size);\nvoid jerry_debugger_send_log (jerry_log_level_t level, const jerry_char_t *buffer, jerry_size_t str_size);\n\n/**\n * @}\n */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYSCRIPT_DEBUGGER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/include/jerryscript-port.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYSCRIPT_PORT_H\n#define JERRYSCRIPT_PORT_H\n\n#include <stdbool.h>\n#include <stdint.h>\n#include <stdio.h>\n\n#include \"jerryscript-compiler.h\"\n#include \"jerryscript-core.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/** \\addtogroup jerry_port Jerry engine port\n * @{\n */\n\n/*\n * Termination Port API\n *\n * Note:\n *      It is questionable whether a library should be able to terminate an\n *      application. However, as of now, we only have the concept of completion\n *      code around jerry_parse and jerry_run. Most of the other API functions\n *      have no way of signaling an error. So, we keep the termination approach\n *      with this port function.\n */\n\n/**\n * Error codes\n */\ntypedef enum\n{\n  ERR_OUT_OF_MEMORY = 10,\n  ERR_REF_COUNT_LIMIT = 12,\n  ERR_DISABLED_BYTE_CODE = 13,\n  ERR_UNTERMINATED_GC_LOOPS = 14,\n  ERR_FAILED_INTERNAL_ASSERTION = 120\n} jerry_fatal_code_t;\n\n/**\n * Signal the port that jerry experienced a fatal failure from which it cannot\n * recover.\n *\n * @param code gives the cause of the error.\n *\n * Note:\n *      Jerry expects the function not to return.\n *\n * Example: a libc-based port may implement this with exit() or abort(), or both.\n */\nvoid JERRY_ATTR_NORETURN jerry_port_fatal (jerry_fatal_code_t code);\n\n/*\n *  I/O Port API\n */\n\n/**\n * Jerry log levels. The levels are in severity order\n * where the most serious levels come first.\n */\ntypedef enum\n{\n  JERRY_LOG_LEVEL_ERROR,    /**< the engine will terminate after the message is printed */\n  JERRY_LOG_LEVEL_WARNING,  /**< a request is aborted, but the engine continues its operation */\n  JERRY_LOG_LEVEL_DEBUG,    /**< debug messages from the engine, low volume */\n  JERRY_LOG_LEVEL_TRACE     /**< detailed info about engine internals, potentially high volume */\n} jerry_log_level_t;\n\n/**\n * Display or log a debug/error message. The function should implement a printf-like\n * interface, where the first argument specifies the log level\n * and the second argument specifies a format string on how to stringify the rest\n * of the parameter list.\n *\n * This function is only called with messages coming from the jerry engine as\n * the result of some abnormal operation or describing its internal operations\n * (e.g., data structure dumps or tracing info).\n *\n * It should be the port that decides whether error and debug messages are logged to\n * the console, or saved to a database or to a file.\n *\n * Example: a libc-based port may implement this with vfprintf(stderr) or\n * vfprintf(logfile), or both, depending on log level.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_LOGGING is\n *      enabled. It is also common practice though to use this function in\n *      application code.\n */\nvoid JERRY_ATTR_FORMAT (printf, 2, 3) jerry_port_log (jerry_log_level_t level, const char *format, ...);\n\n/*\n * Date Port API\n */\n\n/**\n * Get local time zone adjustment, in milliseconds, for the given timestamp.\n * The timestamp can be specified in either UTC or local time, depending on\n * the value of is_utc. Adding the value returned from this function to\n * a timestamp in UTC time should result in local time for the current time\n * zone, and subtracting it from a timestamp in local time should result in\n * UTC time.\n *\n * Ideally, this function should satisfy the stipulations applied to LocalTZA\n * in section 20.3.1.7 of the ECMAScript version 9.0 spec.\n *\n * See Also:\n *          ECMA-262 v9, 20.3.1.7\n *\n * Note:\n *      This port function is called by jerry-core when\n *      JERRY_BUILTIN_DATE is defined to 1. Otherwise this function is\n *      not used.\n *\n * @param unix_ms The unix timestamp we want an offset for, given in\n *                millisecond precision (could be now, in the future,\n *                or in the past). As with all unix timestamps, 0 refers to\n *                1970-01-01, a day is exactly 86 400 000 milliseconds, and\n *                leap seconds cause the same second to occur twice.\n * @param is_utc Is the given timestamp in UTC time? If false, it is in local\n *               time.\n *\n * @return milliseconds between local time and UTC for the given timestamp,\n *         if available\n *.        0 if not available / we are in UTC.\n */\ndouble jerry_port_get_local_time_zone_adjustment (double unix_ms, bool is_utc);\n\n/**\n * Get system time\n *\n * Note:\n *      This port function is called by jerry-core when\n *      JERRY_BUILTIN_DATE is defined to 1. It is also common practice\n *      in application code to use this function for the initialization of the\n *      random number generator.\n *\n * @return milliseconds since Unix epoch\n */\ndouble jerry_port_get_current_time (void);\n\n/**\n * Get the current context of the engine. Each port should provide its own\n * implementation of this interface.\n *\n * Note:\n *      This port function is called by jerry-core when\n *      JERRY_EXTERNAL_CONTEXT is enabled. Otherwise this function is not\n *      used.\n *\n * @return the pointer to the engine context.\n */\nstruct jerry_context_t *jerry_port_get_current_context (void);\n\n/**\n * Makes the process sleep for a given time.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_DEBUGGER is\n *      enabled (set to 1). Otherwise this function is not used.\n *\n * @param sleep_time milliseconds to sleep.\n */\nvoid jerry_port_sleep (uint32_t sleep_time);\n\n/**\n * Print a single character.\n *\n * Note:\n *      This port function is here so the jerry-ext components would have\n *      a common way to print out information.\n *      If possible do not use from the jerry-core.\n *\n * @param c the character to print.\n */\nvoid jerry_port_print_char (char c);\n\n/**\n * Open a source file and read its contents into a buffer.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_MODULE_SYSTEM\n *      is enabled. The path is specified in the import statement's 'from \"...\"'\n *      section.\n *\n * @param file_name_p Path that points to the EcmaScript file in the\n *                    filesystem.\n * @param out_size_p The opened file's size in bytes.\n *\n * @return the pointer to the buffer which contains the content of the file.\n */\nuint8_t *jerry_port_read_source (const char *file_name_p, size_t *out_size_p);\n\n/**\n * Frees the allocated buffer after the contents of the file are not needed\n * anymore.\n *\n * @param buffer_p The pointer the allocated buffer.\n */\nvoid jerry_port_release_source (uint8_t *buffer_p);\n\n/**\n * Normalize a file path string.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_MODULE_SYSTEM\n *      is enabled. The normalized path is used to uniquely identify modules.\n *\n * @param in_path_p Input path as a zero terminated string.\n * @param out_buf_p Pointer to the output buffer where the normalized path should be written.\n * @param out_buf_size Size of the output buffer.\n * @param base_file_p A file path that 'in_path_p' is relative to, usually the current module file.\n *                    A NULL value represents that 'in_path_p' is relative to the current working directory.\n *\n * @return length of the string written to the output buffer\n *         zero, if the buffer was not sufficient or an error occured\n */\nsize_t jerry_port_normalize_path (const char *in_path_p,\n                                  char *out_buf_p,\n                                  size_t out_buf_size,\n                                  char *base_file_p);\n\n/**\n * Get the module object of a native module.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_MODULE_SYSTEM\n *      is enabled.\n *\n * @param name String value of the module specifier.\n *\n * @return Undefined, if 'name' is not a native module\n *         jerry_value_t containing the module object, otherwise\n */\njerry_value_t jerry_port_get_native_module (jerry_value_t name);\n\n/**\n * HostPromiseRejectionTracker operations\n */\ntypedef enum\n{\n  JERRY_PROMISE_REJECTION_OPERATION_REJECT, /**< promise is rejected without any handlers */\n  JERRY_PROMISE_REJECTION_OPERATION_HANDLE, /**< handler is added to a rejected promise for the first time */\n} jerry_promise_rejection_operation_t;\n\n/**\n * Track unhandled promise rejections.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_BUILTIN_PROMISE\n *      is enabled.\n *\n * @param promise rejected promise\n * @param operation HostPromiseRejectionTracker operation\n */\nvoid jerry_port_track_promise_rejection (const jerry_value_t promise,\n                                         const jerry_promise_rejection_operation_t operation);\n\n/**\n * @}\n */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYSCRIPT_PORT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/include/jerryscript-snapshot.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYSCRIPT_SNAPSHOT_H\n#define JERRYSCRIPT_SNAPSHOT_H\n\n#include \"jerryscript-core.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/** \\addtogroup jerry-snapshot Jerry engine interface - Snapshot feature\n * @{\n */\n\n/**\n * Jerry snapshot format version.\n */\n#define JERRY_SNAPSHOT_VERSION (63u)\n\n/**\n * Flags for jerry_generate_snapshot and jerry_generate_function_snapshot.\n */\ntypedef enum\n{\n  JERRY_SNAPSHOT_SAVE_STATIC = (1u << 0), /**< static snapshot */\n  JERRY_SNAPSHOT_SAVE_STRICT = (1u << 1), /**< strict mode code */\n} jerry_generate_snapshot_opts_t;\n\n/**\n * Flags for jerry_exec_snapshot_at and jerry_load_function_snapshot_at.\n */\ntypedef enum\n{\n  JERRY_SNAPSHOT_EXEC_COPY_DATA = (1u << 0), /**< copy snashot data */\n  JERRY_SNAPSHOT_EXEC_ALLOW_STATIC = (1u << 1), /**< static snapshots allowed */\n} jerry_exec_snapshot_opts_t;\n\n/**\n * Snapshot functions.\n */\njerry_value_t jerry_generate_snapshot (const jerry_char_t *resource_name_p, size_t resource_name_length,\n                                       const jerry_char_t *source_p, size_t source_size,\n                                       uint32_t generate_snapshot_opts, uint32_t *buffer_p, size_t buffer_size);\njerry_value_t jerry_generate_function_snapshot (const jerry_char_t *resource_name_p, size_t resource_name_length,\n                                                const jerry_char_t *source_p, size_t source_size,\n                                                const jerry_char_t *args_p, size_t args_size,\n                                                uint32_t generate_snapshot_opts, uint32_t *buffer_p,\n                                                size_t buffer_size);\n\njerry_value_t jerry_exec_snapshot (const uint32_t *snapshot_p, size_t snapshot_size,\n                                   size_t func_index, uint32_t exec_snapshot_opts);\njerry_value_t jerry_load_function_snapshot (const uint32_t *function_snapshot_p,\n                                            const size_t function_snapshot_size,\n                                            size_t func_index, uint32_t exec_snapshot_opts);\n\nsize_t jerry_merge_snapshots (const uint32_t **inp_buffers_p, size_t *inp_buffer_sizes_p, size_t number_of_snapshots,\n                              uint32_t *out_buffer_p, size_t out_buffer_size, const char **error_p);\nsize_t jerry_get_literals_from_snapshot (const uint32_t *snapshot_p, size_t snapshot_size,\n                                         jerry_char_t *lit_buf_p, size_t lit_buf_size, bool is_c_format);\n/**\n * @}\n */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYSCRIPT_SNAPSHOT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/include/jerryscript.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYSCRIPT_H\n#define JERRYSCRIPT_H\n\n#include \"jerryscript-core.h\"\n#include \"jerryscript-debugger.h\"\n#include \"jerryscript-snapshot.h\"\n\n#endif /* !JERRYSCRIPT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jcontext/jcontext.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jcontext.h\"\n\n/** \\addtogroup context Context\n * @{\n */\n\n/**\n * Check the existence of the ECMA_STATUS_EXCEPTION flag.\n *\n * @return true - if the flag is set\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\njcontext_has_pending_exception (void)\n{\n  return JERRY_CONTEXT (status_flags) & ECMA_STATUS_EXCEPTION;\n} /* jcontext_has_pending_exception */\n\n/**\n * Check the existence of the ECMA_STATUS_ABORT flag.\n *\n * @return true - if the flag is set\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\njcontext_has_pending_abort (void)\n{\n  return JERRY_CONTEXT (status_flags) & ECMA_STATUS_ABORT;\n} /* jcontext_has_pending_abort */\n\n/**\n * Set the abort flag for the context.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\njcontext_set_abort_flag (bool is_abort) /**< true - if the abort flag should be set\n                                         *   false - if the abort flag should be removed */\n{\n  JERRY_ASSERT (jcontext_has_pending_exception ());\n\n  if (is_abort)\n  {\n    JERRY_CONTEXT (status_flags) |= ECMA_STATUS_ABORT;\n  }\n  else\n  {\n    JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_ABORT;\n  }\n} /* jcontext_set_abort_flag */\n\n/**\n * Set the exception flag for the context.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\njcontext_set_exception_flag (bool is_exception) /**< true - if the exception flag should be set\n                                                 *   false - if the exception flag should be removed */\n{\n  if (is_exception)\n  {\n    JERRY_CONTEXT (status_flags) |= ECMA_STATUS_EXCEPTION;\n  }\n  else\n  {\n    JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_EXCEPTION;\n  }\n} /* jcontext_set_exception_flag */\n\n/**\n * Raise exception from the given error value.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\njcontext_raise_exception (ecma_value_t error) /**< error to raise */\n{\n  JERRY_ASSERT (!jcontext_has_pending_exception ());\n  JERRY_ASSERT (!jcontext_has_pending_abort ());\n\n  JERRY_CONTEXT (error_value) = error;\n  jcontext_set_exception_flag (true);\n} /* jcontext_raise_exception */\n\n/**\n * Release the current exception/abort of the context.\n */\nvoid\njcontext_release_exception (void)\n{\n  JERRY_ASSERT (jcontext_has_pending_exception ());\n\n  ecma_free_value (jcontext_take_exception ());\n} /* jcontext_release_exception */\n\n/**\n * Take the current exception/abort of context.\n *\n * @return current exception as an ecma-value\n */\necma_value_t\njcontext_take_exception (void)\n{\n  JERRY_ASSERT (jcontext_has_pending_exception ());\n\n  jcontext_set_abort_flag (false);\n  jcontext_set_exception_flag (false);\n  return JERRY_CONTEXT (error_value);\n} /* jcontext_take_exception */\n\n#if !ENABLED (JERRY_EXTERNAL_CONTEXT)\n\n/**\n * Global context.\n */\njerry_context_t jerry_global_context;\n\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n\n/**\n * Check size of heap is corresponding to configuration\n */\nJERRY_STATIC_ASSERT (sizeof (jmem_heap_t) <= JMEM_HEAP_SIZE,\n                     size_of_mem_heap_must_be_less_than_or_equal_to_JMEM_HEAP_SIZE);\n\n/**\n * Global heap.\n */\njmem_heap_t jerry_global_heap JERRY_ATTR_ALIGNED (JMEM_ALIGNMENT) JERRY_ATTR_GLOBAL_HEAP;\n\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n\n#endif /* !ENABLED (JERRY_EXTERNAL_CONTEXT) */\n\n/**\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jcontext/jcontext.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Engine context for JerryScript\n */\n#ifndef JCONTEXT_H\n#define JCONTEXT_H\n\n#include \"debugger.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-jobqueue.h\"\n#include \"jerryscript-port.h\"\n#include \"jmem.h\"\n#include \"re-bytecode.h\"\n#include \"vm-defines.h\"\n#include \"jerryscript.h\"\n#include \"jerryscript-debugger-transport.h\"\n#include \"js-parser-internal.h\"\n\n/** \\addtogroup context Context\n * @{\n */\n\n/**\n * Advanced allocator configurations.\n */\n/**\n * Maximum global heap size in bytes\n */\n#define CONFIG_MEM_HEAP_SIZE (JERRY_GLOBAL_HEAP_SIZE * 1024)\n\n/**\n * Maximum stack usage size in bytes\n */\n#define CONFIG_MEM_STACK_LIMIT (JERRY_STACK_LIMIT * 1024)\n\n/**\n * Max heap usage limit\n */\n#define CONFIG_MAX_GC_LIMIT 8192\n\n/**\n * Allowed heap usage limit until next garbage collection\n *\n * Whenever the total allocated memory size reaches the current heap limit, garbage collection will be triggered\n * to try and reduce clutter from unreachable objects. If the allocated memory can't be reduced below the limit,\n * then the current limit will be incremented by CONFIG_MEM_HEAP_LIMIT.\n */\n#if defined (JERRY_GC_LIMIT) && (JERRY_GC_LIMIT != 0)\n#define CONFIG_GC_LIMIT JERRY_GC_LIMIT\n#else\n#define CONFIG_GC_LIMIT (JERRY_MIN (CONFIG_MEM_HEAP_SIZE / 32, CONFIG_MAX_GC_LIMIT))\n#endif\n\n/**\n * Amount of newly allocated objects since the last GC run, represented as a fraction of all allocated objects,\n * which when reached will trigger garbage collection to run with a low pressure setting.\n *\n * The fraction is calculated as:\n *                1.0 / CONFIG_ECMA_GC_NEW_OBJECTS_FRACTION\n */\n#define CONFIG_ECMA_GC_NEW_OBJECTS_FRACTION (16)\n\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n/**\n * Heap structure\n *\n * Memory blocks returned by the allocator must not start from the\n * beginning of the heap area because offset 0 is reserved for\n * JMEM_CP_NULL. This special constant is used in several places,\n * e.g. it marks the end of the property chain list, so it cannot\n * be eliminated from the project. Although the allocator cannot\n * use the first 8 bytes of the heap, nothing prevents to use it\n * for other purposes. Currently the free region start is stored\n * there.\n */\ntypedef struct jmem_heap_t jmem_heap_t;\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n\n/**\n * User context item\n */\ntypedef struct jerry_context_data_header\n{\n  struct jerry_context_data_header *next_p; /**< pointer to next context item */\n  const jerry_context_data_manager_t *manager_p; /**< manager responsible for deleting this item */\n} jerry_context_data_header_t;\n\n#define JERRY_CONTEXT_DATA_HEADER_USER_DATA(item_p) \\\n  ((uint8_t *) (item_p + 1))\n\n/**\n * First non-external member of the jerry context\n */\n#define JERRY_CONTEXT_FIRST_MEMBER global_object_p\n\n/**\n * JerryScript context\n *\n * The purpose of this header is storing\n * all global variables for Jerry\n */\nstruct jerry_context_t\n{\n  /* The value of external context members must be preserved across initializations and cleanups. */\n#if ENABLED (JERRY_EXTERNAL_CONTEXT)\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  jmem_heap_t *heap_p; /**< point to the heap aligned to JMEM_ALIGNMENT. */\n  uint32_t heap_size; /**< size of the heap */\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n#endif /* ENABLED (JERRY_EXTERNAL_CONTEXT) */\n\n  /* Update JERRY_CONTEXT_FIRST_MEMBER if the first non-external member changes */\n  ecma_global_object_t *global_object_p; /**< current global object */\n  jmem_heap_free_t *jmem_heap_list_skip_p; /**< improves deallocation performance */\n  jmem_pools_chunk_t *jmem_free_8_byte_chunk_p; /**< list of free eight byte pool chunks */\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  re_compiled_code_t *re_cache[RE_CACHE_SIZE]; /**< regex cache */\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  jmem_pools_chunk_t *jmem_free_16_byte_chunk_p; /**< list of free sixteen byte pool chunks */\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n  const lit_utf8_byte_t * const *lit_magic_string_ex_array; /**< array of external magic strings */\n  const lit_utf8_size_t *lit_magic_string_ex_sizes; /**< external magic string lengths */\n  jmem_cpointer_t ecma_gc_objects_cp; /**< List of currently alive objects. */\n  jmem_cpointer_t string_list_first_cp; /**< first item of the literal string list */\n#if ENABLED (JERRY_ESNEXT)\n  jmem_cpointer_t symbol_list_first_cp; /**< first item of the global symbol list */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  jmem_cpointer_t number_list_first_cp; /**< first item of the literal number list */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  jmem_cpointer_t bigint_list_first_cp; /**< first item of the literal bigint list */\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n#if ENABLED (JERRY_ESNEXT)\n  jmem_cpointer_t global_symbols_cp[ECMA_BUILTIN_GLOBAL_SYMBOL_COUNT]; /**< global symbols */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  ecma_module_t *module_list_p;         /**< current module context */\n  ecma_module_t *module_current_p;      /**< current module context */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n  vm_frame_ctx_t *vm_top_context_p; /**< top (current) interpreter context */\n  jerry_context_data_header_t *context_data_p; /**< linked list of user-provided context-specific pointers */\n  void *error_object_created_callback_user_p; /**< user pointer for error_object_update_callback_p */\n  jerry_error_object_created_callback_t error_object_created_callback_p; /**< decorator callback for Error objects */\n  size_t ecma_gc_objects_number; /**< number of currently allocated objects */\n  size_t ecma_gc_new_objects; /**< number of newly allocated objects since last GC session */\n  size_t jmem_heap_allocated_size; /**< size of allocated regions */\n  size_t jmem_heap_limit; /**< current limit of heap usage, that is upon being reached,\n                           *   causes call of \"try give memory back\" callbacks */\n  ecma_value_t error_value; /**< currently thrown error value */\n  uint32_t lit_magic_string_ex_count; /**< external magic strings count */\n  uint32_t jerry_init_flags; /**< run-time configuration flags */\n  uint32_t status_flags; /**< run-time flags (the top 8 bits are used for passing class parsing options) */\n#if (JERRY_GC_MARK_LIMIT != 0)\n  uint32_t ecma_gc_mark_recursion_limit; /**< GC mark recursion limit */\n#endif /* (JERRY_GC_MARK_LIMIT != 0) */\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  uint8_t ecma_prop_hashmap_alloc_state; /**< property hashmap allocation state: 0-4,\n                                          *   if !0 property hashmap allocation is disabled */\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  uint8_t re_cache_idx; /**< evicted item index when regex cache is full (round-robin) */\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n#if ENABLED (JERRY_BUILTIN_PROMISE)\n  ecma_job_queue_item_t *job_queue_head_p; /**< points to the head item of the job queue */\n  ecma_job_queue_item_t *job_queue_tail_p; /**< points to the tail item of the job queue */\n#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */\n\n#if ENABLED (JERRY_VM_EXEC_STOP)\n  uint32_t vm_exec_stop_frequency; /**< reset value for vm_exec_stop_counter */\n  uint32_t vm_exec_stop_counter; /**< down counter for reducing the calls of vm_exec_stop_cb */\n  void *vm_exec_stop_user_p; /**< user pointer for vm_exec_stop_cb */\n  ecma_vm_exec_stop_callback_t vm_exec_stop_cb; /**< user function which returns whether the\n                                                 *   ECMAScript execution should be stopped */\n#endif /* ENABLED (JERRY_VM_EXEC_STOP) */\n\n#if (JERRY_STACK_LIMIT != 0)\n  uintptr_t stack_base;  /**< stack base marker */\n#endif /* (JERRY_STACK_LIMIT != 0) */\n\n#if ENABLED (JERRY_DEBUGGER)\n  uint8_t debugger_send_buffer[JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE]; /**< buffer for sending messages */\n  uint8_t debugger_receive_buffer[JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE]; /**< buffer for receiving messages */\n  jerry_debugger_transport_header_t *debugger_transport_header_p; /**< head of transport protocol chain */\n  uint8_t *debugger_send_buffer_payload_p; /**< start where the outgoing message can be written */\n  vm_frame_ctx_t *debugger_stop_context; /**< stop only if the current context is equal to this context */\n  const uint8_t *debugger_exception_byte_code_p; /**< Location of the currently executed byte code if an\n                                                  *   error occours while the vm_loop is suspended */\n  jmem_cpointer_t debugger_byte_code_free_head; /**< head of byte code free linked list */\n  jmem_cpointer_t debugger_byte_code_free_tail; /**< tail of byte code free linked list */\n  uint32_t debugger_flags; /**< debugger flags */\n  uint16_t debugger_received_length; /**< length of currently received bytes */\n  uint8_t debugger_message_delay; /**< call receive message when reaches zero */\n  uint8_t debugger_max_send_size; /**< maximum amount of data that can be sent */\n  uint8_t debugger_max_receive_size; /**< maximum amount of data that can be received */\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_heap_stats_t jmem_heap_stats; /**< heap's memory usage statistics */\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  /* This must be at the end of the context for performance reasons */\n#if ENABLED (JERRY_LCACHE)\n  /** hash table for caching the last access of properties */\n  ecma_lcache_hash_entry_t lcache[ECMA_LCACHE_HASH_ROWS_COUNT][ECMA_LCACHE_HASH_ROW_LENGTH];\n#endif /* ENABLED (JERRY_LCACHE) */\n\n#if ENABLED (JERRY_ESNEXT)\n  /**\n   * Allowed values and it's meaning:\n   * * NULL (0x0): the current \"new.target\" is undefined, that is the execution is inside a normal method.\n   * * Any other valid function object pointer: the current \"new.target\" is valid and it is constructor call.\n   */\n  ecma_object_t *current_new_target_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n};\n\n#if ENABLED (JERRY_EXTERNAL_CONTEXT)\n\n/*\n * This part is for JerryScript which uses external context.\n */\n\n#define JERRY_CONTEXT_STRUCT (*jerry_port_get_current_context ())\n#define JERRY_CONTEXT(field) (jerry_port_get_current_context ()->field)\n\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n\n#define JMEM_HEAP_SIZE (JERRY_CONTEXT (heap_size))\n\n#define JMEM_HEAP_AREA_SIZE (JMEM_HEAP_SIZE - JMEM_ALIGNMENT)\n\nstruct jmem_heap_t\n{\n  jmem_heap_free_t first; /**< first node in free region list */\n  uint8_t area[]; /**< heap area */\n};\n\n#define JERRY_HEAP_CONTEXT(field) (JERRY_CONTEXT (heap_p)->field)\n\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n\n#else /* !ENABLED (JERRY_EXTERNAL_CONTEXT) */\n\n/*\n * This part is for JerryScript which uses default context.\n */\n\n/**\n * Global context.\n */\nextern jerry_context_t jerry_global_context;\n\n/**\n * Config-independent name for context.\n */\n#define JERRY_CONTEXT_STRUCT (jerry_global_context)\n\n/**\n * Provides a reference to a field in the current context.\n */\n#define JERRY_CONTEXT(field) (jerry_global_context.field)\n\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n\n/**\n* Size of heap\n*/\n#define JMEM_HEAP_SIZE ((size_t) (CONFIG_MEM_HEAP_SIZE))\n\n/**\n * Calculate heap area size, leaving space for a pointer to the free list\n */\n#define JMEM_HEAP_AREA_SIZE (JMEM_HEAP_SIZE - JMEM_ALIGNMENT)\n\nstruct jmem_heap_t\n{\n  jmem_heap_free_t first; /**< first node in free region list */\n  uint8_t area[JMEM_HEAP_AREA_SIZE]; /**< heap area */\n};\n\n/**\n * Global heap.\n */\nextern jmem_heap_t jerry_global_heap;\n\n/**\n * Provides a reference to a field of the heap.\n */\n#define JERRY_HEAP_CONTEXT(field) (jerry_global_heap.field)\n\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n\n#endif /* ENABLED (JERRY_EXTERNAL_CONTEXT) */\n\nvoid\njcontext_set_exception_flag (bool is_exception);\n\nvoid\njcontext_set_abort_flag (bool is_abort);\n\nbool\njcontext_has_pending_exception (void);\n\nbool\njcontext_has_pending_abort (void);\n\nvoid\njcontext_raise_exception (ecma_value_t error);\n\nvoid\njcontext_release_exception (void);\n\necma_value_t\njcontext_take_exception (void);\n\n/**\n * @}\n */\n\n#endif /* !JCONTEXT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jmem/jmem-allocator-internal.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JMEM_ALLOCATOR_INTERNAL_H\n#define JMEM_ALLOCATOR_INTERNAL_H\n\n#ifndef JMEM_ALLOCATOR_INTERNAL\n# error \"The header is for internal routines of memory allocator component. Please, don't use the routines directly.\"\n#endif /* !JMEM_ALLOCATOR_INTERNAL */\n\n/** \\addtogroup mem Memory allocation\n * @{\n */\n\n/**\n * @{\n * Valgrind-related options and headers\n */\n#if ENABLED (JERRY_VALGRIND)\n# include \"memcheck.h\"\n\n# define JMEM_VALGRIND_NOACCESS_SPACE(p, s)   VALGRIND_MAKE_MEM_NOACCESS((p), (s))\n# define JMEM_VALGRIND_UNDEFINED_SPACE(p, s)  VALGRIND_MAKE_MEM_UNDEFINED((p), (s))\n# define JMEM_VALGRIND_DEFINED_SPACE(p, s)    VALGRIND_MAKE_MEM_DEFINED((p), (s))\n# define JMEM_VALGRIND_MALLOCLIKE_SPACE(p, s) VALGRIND_MALLOCLIKE_BLOCK((p), (s), 0, 0)\n# define JMEM_VALGRIND_RESIZE_SPACE(p, o, n)  VALGRIND_RESIZEINPLACE_BLOCK((p), (o), (n), 0)\n# define JMEM_VALGRIND_FREELIKE_SPACE(p)      VALGRIND_FREELIKE_BLOCK((p), 0)\n#else /* !ENABLED (JERRY_VALGRIND) */\n# define JMEM_VALGRIND_NOACCESS_SPACE(p, s)\n# define JMEM_VALGRIND_UNDEFINED_SPACE(p, s)\n# define JMEM_VALGRIND_DEFINED_SPACE(p, s)\n# define JMEM_VALGRIND_MALLOCLIKE_SPACE(p, s)\n# define JMEM_VALGRIND_RESIZE_SPACE(p, o, n)\n# define JMEM_VALGRIND_FREELIKE_SPACE(p)\n#endif /* ENABLED (JERRY_VALGRIND) */\n/** @} */\n\nvoid jmem_heap_init (void);\nvoid jmem_heap_finalize (void);\nbool jmem_is_heap_pointer (const void *pointer);\nvoid *jmem_heap_alloc_block_internal (const size_t size);\nvoid jmem_heap_free_block_internal (void *ptr, const size_t size);\n\n/**\n * \\addtogroup poolman Memory pool manager\n * @{\n */\n\nvoid jmem_pools_finalize (void);\n\n/**\n * @}\n * @}\n */\n\n/**\n * @{\n * Jerry mem-stat definitions\n */\n#if ENABLED (JERRY_MEM_STATS)\nvoid jmem_heap_stat_init (void);\nvoid jmem_heap_stat_alloc (size_t num);\nvoid jmem_heap_stat_free (size_t num);\n\n#define JMEM_HEAP_STAT_INIT() jmem_heap_stat_init ()\n#define JMEM_HEAP_STAT_ALLOC(v1) jmem_heap_stat_alloc (v1)\n#define JMEM_HEAP_STAT_FREE(v1) jmem_heap_stat_free (v1)\n#else /* !ENABLED (JERRY_MEM_STATS) */\n#define JMEM_HEAP_STAT_INIT()\n#define JMEM_HEAP_STAT_ALLOC(v1) JERRY_UNUSED (v1)\n#define JMEM_HEAP_STAT_FREE(v1) JERRY_UNUSED (v1)\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n/** @} */\n\n#endif /* !JMEM_ALLOCATOR_INTERNAL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jmem/jmem-allocator.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Allocator implementation\n */\n#include \"ecma-globals.h\"\n#include \"jcontext.h\"\n#include \"jmem.h\"\n#include \"jrt-libc-includes.h\"\n\n#define JMEM_ALLOCATOR_INTERNAL\n#include \"jmem-allocator-internal.h\"\n\n#if ENABLED (JERRY_MEM_STATS)\n/**\n * Register byte code allocation.\n */\nvoid\njmem_stats_allocate_byte_code_bytes (size_t byte_code_size)\n{\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  heap_stats->byte_code_bytes += byte_code_size;\n\n  if (heap_stats->byte_code_bytes >= heap_stats->peak_byte_code_bytes)\n  {\n    heap_stats->peak_byte_code_bytes = heap_stats->byte_code_bytes;\n  }\n} /* jmem_stats_allocate_byte_code_bytes */\n\n/**\n * Register byte code free.\n */\nvoid\njmem_stats_free_byte_code_bytes (size_t byte_code_size)\n{\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  JERRY_ASSERT (heap_stats->byte_code_bytes >= byte_code_size);\n\n  heap_stats->byte_code_bytes -= byte_code_size;\n} /* jmem_stats_free_byte_code_bytes */\n\n/**\n * Register string allocation.\n */\nvoid\njmem_stats_allocate_string_bytes (size_t string_size)\n{\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  heap_stats->string_bytes += string_size;\n\n  if (heap_stats->string_bytes >= heap_stats->peak_string_bytes)\n  {\n    heap_stats->peak_string_bytes = heap_stats->string_bytes;\n  }\n} /* jmem_stats_allocate_string_bytes */\n\n/**\n * Register string free.\n */\nvoid\njmem_stats_free_string_bytes (size_t string_size)\n{\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  JERRY_ASSERT (heap_stats->string_bytes >= string_size);\n\n  heap_stats->string_bytes -= string_size;\n} /* jmem_stats_free_string_bytes */\n\n/**\n * Register object allocation.\n */\nvoid\njmem_stats_allocate_object_bytes (size_t object_size)\n{\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  heap_stats->object_bytes += object_size;\n\n  if (heap_stats->object_bytes >= heap_stats->peak_object_bytes)\n  {\n    heap_stats->peak_object_bytes = heap_stats->object_bytes;\n  }\n} /* jmem_stats_allocate_object_bytes */\n\n/**\n * Register object free.\n */\nvoid\njmem_stats_free_object_bytes (size_t object_size)\n{\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  JERRY_ASSERT (heap_stats->object_bytes >= object_size);\n\n  heap_stats->object_bytes -= object_size;\n} /* jmem_stats_free_object_bytes */\n\n/**\n * Register property allocation.\n */\nvoid\njmem_stats_allocate_property_bytes (size_t property_size)\n{\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  heap_stats->property_bytes += property_size;\n\n  if (heap_stats->property_bytes >= heap_stats->peak_property_bytes)\n  {\n    heap_stats->peak_property_bytes = heap_stats->property_bytes;\n  }\n} /* jmem_stats_allocate_property_bytes */\n\n/**\n * Register property free.\n */\nvoid\njmem_stats_free_property_bytes (size_t property_size)\n{\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  JERRY_ASSERT (heap_stats->property_bytes >= property_size);\n\n  heap_stats->property_bytes -= property_size;\n} /* jmem_stats_free_property_bytes */\n\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n/**\n * Initialize memory allocators.\n */\nvoid\njmem_init (void)\n{\n  jmem_heap_init ();\n} /* jmem_init */\n\n/**\n * Finalize memory allocators.\n */\nvoid\njmem_finalize (void)\n{\n  jmem_pools_finalize ();\n\n#if ENABLED (JERRY_MEM_STATS)\n  if (JERRY_CONTEXT (jerry_init_flags) & ECMA_INIT_MEM_STATS)\n  {\n    jmem_heap_stats_print ();\n  }\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  jmem_heap_finalize ();\n} /* jmem_finalize */\n\n/**\n * Compress pointer\n *\n * @return packed pointer\n */\nextern inline jmem_cpointer_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\njmem_compress_pointer (const void *pointer_p) /**< pointer to compress */\n{\n  JERRY_ASSERT (pointer_p != NULL);\n  JERRY_ASSERT (jmem_is_heap_pointer (pointer_p));\n\n  uintptr_t uint_ptr = (uintptr_t) pointer_p;\n\n  JERRY_ASSERT (uint_ptr % JMEM_ALIGNMENT == 0);\n\n#if defined (ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY) && ENABLED (JERRY_CPOINTER_32_BIT)\n  JERRY_ASSERT (((jmem_cpointer_t) uint_ptr) == uint_ptr);\n#else /* !ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY || !ENABLED (JERRY_CPOINTER_32_BIT) */\n  const uintptr_t heap_start = (uintptr_t) &JERRY_HEAP_CONTEXT (first);\n\n  uint_ptr -= heap_start;\n  uint_ptr >>= JMEM_ALIGNMENT_LOG;\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  JERRY_ASSERT (uint_ptr <= UINT32_MAX);\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n  JERRY_ASSERT (uint_ptr <= UINT16_MAX);\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n  JERRY_ASSERT (uint_ptr != JMEM_CP_NULL);\n#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY && ENABLED (JERRY_CPOINTER_32_BIT) */\n\n  return (jmem_cpointer_t) uint_ptr;\n} /* jmem_compress_pointer */\n\n/**\n * Decompress pointer\n *\n * @return unpacked pointer\n */\nextern inline void * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE\njmem_decompress_pointer (uintptr_t compressed_pointer) /**< pointer to decompress */\n{\n  JERRY_ASSERT (compressed_pointer != JMEM_CP_NULL);\n\n  uintptr_t uint_ptr = compressed_pointer;\n\n  JERRY_ASSERT (((jmem_cpointer_t) uint_ptr) == uint_ptr);\n\n#if defined (ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY) && ENABLED (JERRY_CPOINTER_32_BIT)\n  JERRY_ASSERT (uint_ptr % JMEM_ALIGNMENT == 0);\n#else /* !ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY || !ENABLED (JERRY_CPOINTER_32_BIT) */\n  const uintptr_t heap_start = (uintptr_t) &JERRY_HEAP_CONTEXT (first);\n\n  uint_ptr <<= JMEM_ALIGNMENT_LOG;\n  uint_ptr += heap_start;\n\n  JERRY_ASSERT (jmem_is_heap_pointer ((void *) uint_ptr));\n#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY && ENABLED (JERRY_CPOINTER_32_BIT) */\n\n  return (void *) uint_ptr;\n} /* jmem_decompress_pointer */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jmem/jmem-heap.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Heap implementation\n */\n\n#include \"ecma-gc.h\"\n#include \"jcontext.h\"\n#include \"jmem.h\"\n#include \"jrt-bit-fields.h\"\n#include \"jrt-libc-includes.h\"\n\n#define JMEM_ALLOCATOR_INTERNAL\n#include \"jmem-allocator-internal.h\"\n\n/** \\addtogroup mem Memory allocation\n * @{\n *\n * \\addtogroup heap Heap\n * @{\n */\n\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n/**\n * End of list marker.\n */\n#define JMEM_HEAP_END_OF_LIST ((uint32_t) 0xffffffff)\n\n/**\n * @{\n */\n#ifdef ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY\n/* In this case we simply store the pointer, since it fits anyway. */\n#define JMEM_HEAP_GET_OFFSET_FROM_ADDR(p) ((uint32_t) (p))\n#define JMEM_HEAP_GET_ADDR_FROM_OFFSET(u) ((jmem_heap_free_t *) (u))\n#else /* !ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n#define JMEM_HEAP_GET_OFFSET_FROM_ADDR(p) ((uint32_t) ((uint8_t *) (p) - JERRY_HEAP_CONTEXT (area)))\n#define JMEM_HEAP_GET_ADDR_FROM_OFFSET(u) ((jmem_heap_free_t *) (JERRY_HEAP_CONTEXT (area) + (u)))\n#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */\n/**\n * @}\n */\n\n/**\n * Get end of region\n *\n * @return pointer to the end of the region\n */\nstatic inline jmem_heap_free_t *  JERRY_ATTR_ALWAYS_INLINE JERRY_ATTR_PURE\njmem_heap_get_region_end (jmem_heap_free_t *curr_p) /**< current region */\n{\n  return (jmem_heap_free_t *) ((uint8_t *) curr_p + curr_p->size);\n} /* jmem_heap_get_region_end */\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n\n/**\n * Startup initialization of heap\n */\nvoid\njmem_heap_init (void)\n{\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n#if !ENABLED (JERRY_CPOINTER_32_BIT)\n  /* the maximum heap size for 16bit compressed pointers should be 512K */\n  JERRY_ASSERT (((UINT16_MAX + 1) << JMEM_ALIGNMENT_LOG) >= JMEM_HEAP_SIZE);\n#endif /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n  JERRY_ASSERT ((uintptr_t) JERRY_HEAP_CONTEXT (area) % JMEM_ALIGNMENT == 0);\n\n  JERRY_CONTEXT (jmem_heap_limit) = CONFIG_GC_LIMIT;\n\n  jmem_heap_free_t *const region_p = (jmem_heap_free_t *) JERRY_HEAP_CONTEXT (area);\n\n  region_p->size = JMEM_HEAP_AREA_SIZE;\n  region_p->next_offset = JMEM_HEAP_END_OF_LIST;\n\n  JERRY_HEAP_CONTEXT (first).size = 0;\n  JERRY_HEAP_CONTEXT (first).next_offset = JMEM_HEAP_GET_OFFSET_FROM_ADDR (region_p);\n\n  JERRY_CONTEXT (jmem_heap_list_skip_p) = &JERRY_HEAP_CONTEXT (first);\n\n  JMEM_VALGRIND_NOACCESS_SPACE (&JERRY_HEAP_CONTEXT (first), sizeof (jmem_heap_free_t));\n  JMEM_VALGRIND_NOACCESS_SPACE (JERRY_HEAP_CONTEXT (area), JMEM_HEAP_AREA_SIZE);\n\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n  JMEM_HEAP_STAT_INIT ();\n} /* jmem_heap_init */\n\n/**\n * Finalize heap\n */\nvoid\njmem_heap_finalize (void)\n{\n  JERRY_ASSERT (JERRY_CONTEXT (jmem_heap_allocated_size) == 0);\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  JMEM_VALGRIND_NOACCESS_SPACE (&JERRY_HEAP_CONTEXT (first), JMEM_HEAP_SIZE);\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n} /* jmem_heap_finalize */\n\n/**\n * Allocation of memory region.\n *\n * See also:\n *          jmem_heap_alloc_block\n *\n * @return pointer to allocated memory block - if allocation is successful,\n *         NULL - if there is not enough memory.\n */\nstatic void * JERRY_ATTR_HOT\njmem_heap_alloc (const size_t size) /**< size of requested block */\n{\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  /* Align size. */\n  const size_t required_size = ((size + JMEM_ALIGNMENT - 1) / JMEM_ALIGNMENT) * JMEM_ALIGNMENT;\n  jmem_heap_free_t *data_space_p = NULL;\n\n  JMEM_VALGRIND_DEFINED_SPACE (&JERRY_HEAP_CONTEXT (first), sizeof (jmem_heap_free_t));\n\n  /* Fast path for 8 byte chunks, first region is guaranteed to be sufficient. */\n  if (required_size == JMEM_ALIGNMENT\n      && JERRY_LIKELY (JERRY_HEAP_CONTEXT (first).next_offset != JMEM_HEAP_END_OF_LIST))\n  {\n    data_space_p = JMEM_HEAP_GET_ADDR_FROM_OFFSET (JERRY_HEAP_CONTEXT (first).next_offset);\n    JERRY_ASSERT (jmem_is_heap_pointer (data_space_p));\n\n    JMEM_VALGRIND_DEFINED_SPACE (data_space_p, sizeof (jmem_heap_free_t));\n    JERRY_CONTEXT (jmem_heap_allocated_size) += JMEM_ALIGNMENT;\n\n    if (JERRY_CONTEXT (jmem_heap_allocated_size) >= JERRY_CONTEXT (jmem_heap_limit))\n    {\n      JERRY_CONTEXT (jmem_heap_limit) += CONFIG_GC_LIMIT;\n    }\n\n    if (data_space_p->size == JMEM_ALIGNMENT)\n    {\n      JERRY_HEAP_CONTEXT (first).next_offset = data_space_p->next_offset;\n    }\n    else\n    {\n      JERRY_ASSERT (data_space_p->size > JMEM_ALIGNMENT);\n\n      jmem_heap_free_t *remaining_p;\n      remaining_p = JMEM_HEAP_GET_ADDR_FROM_OFFSET (JERRY_HEAP_CONTEXT (first).next_offset) + 1;\n\n      JMEM_VALGRIND_DEFINED_SPACE (remaining_p, sizeof (jmem_heap_free_t));\n      remaining_p->size = data_space_p->size - JMEM_ALIGNMENT;\n      remaining_p->next_offset = data_space_p->next_offset;\n      JMEM_VALGRIND_NOACCESS_SPACE (remaining_p, sizeof (jmem_heap_free_t));\n\n      JERRY_HEAP_CONTEXT (first).next_offset = JMEM_HEAP_GET_OFFSET_FROM_ADDR (remaining_p);\n    }\n\n    JMEM_VALGRIND_NOACCESS_SPACE (data_space_p, sizeof (jmem_heap_free_t));\n\n    if (JERRY_UNLIKELY (data_space_p == JERRY_CONTEXT (jmem_heap_list_skip_p)))\n    {\n      JERRY_CONTEXT (jmem_heap_list_skip_p) = JMEM_HEAP_GET_ADDR_FROM_OFFSET (JERRY_HEAP_CONTEXT (first).next_offset);\n    }\n  }\n  /* Slow path for larger regions. */\n  else\n  {\n    uint32_t current_offset = JERRY_HEAP_CONTEXT (first).next_offset;\n    jmem_heap_free_t *prev_p = &JERRY_HEAP_CONTEXT (first);\n\n    while (JERRY_LIKELY (current_offset != JMEM_HEAP_END_OF_LIST))\n    {\n      jmem_heap_free_t *current_p = JMEM_HEAP_GET_ADDR_FROM_OFFSET (current_offset);\n      JERRY_ASSERT (jmem_is_heap_pointer (current_p));\n      JMEM_VALGRIND_DEFINED_SPACE (current_p, sizeof (jmem_heap_free_t));\n\n      const uint32_t next_offset = current_p->next_offset;\n      JERRY_ASSERT (next_offset == JMEM_HEAP_END_OF_LIST\n                    || jmem_is_heap_pointer (JMEM_HEAP_GET_ADDR_FROM_OFFSET (next_offset)));\n\n      if (current_p->size >= required_size)\n      {\n        /* Region is sufficiently big, store address. */\n        data_space_p = current_p;\n\n        /* Region was larger than necessary. */\n        if (current_p->size > required_size)\n        {\n          /* Get address of remaining space. */\n          jmem_heap_free_t *const remaining_p = (jmem_heap_free_t *) ((uint8_t *) current_p + required_size);\n\n          /* Update metadata. */\n          JMEM_VALGRIND_DEFINED_SPACE (remaining_p, sizeof (jmem_heap_free_t));\n          remaining_p->size = current_p->size - (uint32_t) required_size;\n          remaining_p->next_offset = next_offset;\n          JMEM_VALGRIND_NOACCESS_SPACE (remaining_p, sizeof (jmem_heap_free_t));\n\n          /* Update list. */\n          JMEM_VALGRIND_DEFINED_SPACE (prev_p, sizeof (jmem_heap_free_t));\n          prev_p->next_offset = JMEM_HEAP_GET_OFFSET_FROM_ADDR (remaining_p);\n          JMEM_VALGRIND_NOACCESS_SPACE (prev_p, sizeof (jmem_heap_free_t));\n        }\n        /* Block is an exact fit. */\n        else\n        {\n          /* Remove the region from the list. */\n          JMEM_VALGRIND_DEFINED_SPACE (prev_p, sizeof (jmem_heap_free_t));\n          prev_p->next_offset = next_offset;\n          JMEM_VALGRIND_NOACCESS_SPACE (prev_p, sizeof (jmem_heap_free_t));\n        }\n\n        JERRY_CONTEXT (jmem_heap_list_skip_p) = prev_p;\n\n        /* Found enough space. */\n        JERRY_CONTEXT (jmem_heap_allocated_size) += required_size;\n\n        while (JERRY_CONTEXT (jmem_heap_allocated_size) >= JERRY_CONTEXT (jmem_heap_limit))\n        {\n          JERRY_CONTEXT (jmem_heap_limit) += CONFIG_GC_LIMIT;\n        }\n\n        break;\n      }\n\n      JMEM_VALGRIND_NOACCESS_SPACE (current_p, sizeof (jmem_heap_free_t));\n      /* Next in list. */\n      prev_p = current_p;\n      current_offset = next_offset;\n    }\n  }\n\n  JMEM_VALGRIND_NOACCESS_SPACE (&JERRY_HEAP_CONTEXT (first), sizeof (jmem_heap_free_t));\n\n  JERRY_ASSERT ((uintptr_t) data_space_p % JMEM_ALIGNMENT == 0);\n  JMEM_VALGRIND_MALLOCLIKE_SPACE (data_space_p, size);\n\n  return (void *) data_space_p;\n#else /* ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n  JERRY_CONTEXT (jmem_heap_allocated_size) += size;\n\n  while (JERRY_CONTEXT (jmem_heap_allocated_size) >= JERRY_CONTEXT (jmem_heap_limit))\n  {\n    JERRY_CONTEXT (jmem_heap_limit) += CONFIG_GC_LIMIT;\n  }\n\n  return malloc (size);\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n} /* jmem_heap_alloc */\n\n/**\n * Allocation of memory block, reclaiming memory if the request cannot be fulfilled.\n *\n * Note:\n *    Each failed allocation attempt tries to reclaim memory with an increasing pressure,\n *    up to 'max_pressure', or until a sufficient memory block is found. When JMEM_PRESSURE_FULL\n *    is reached, the engine is terminated with ERR_OUT_OF_MEMORY. The `max_pressure` argument\n *    can be used to limit the maximum pressure, and prevent the engine from terminating.\n *\n * @return NULL, if the required memory size is 0 or not enough memory\n *         pointer to the allocated memory block, if allocation is successful\n */\nstatic void *\njmem_heap_gc_and_alloc_block (const size_t size, /**< required memory size */\n                              jmem_pressure_t max_pressure) /**< pressure limit */\n{\n  if (JERRY_UNLIKELY (size == 0))\n  {\n    return NULL;\n  }\n\n  jmem_pressure_t pressure = JMEM_PRESSURE_NONE;\n\n#if !ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC)\n  if (JERRY_CONTEXT (jmem_heap_allocated_size) + size >= JERRY_CONTEXT (jmem_heap_limit))\n  {\n    pressure = JMEM_PRESSURE_LOW;\n    ecma_free_unused_memory (pressure);\n  }\n#else /* !ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */\n  ecma_gc_run ();\n#endif /* ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */\n\n  void *data_space_p = jmem_heap_alloc (size);\n\n  /* cppcheck-suppress memleak */\n  while (JERRY_UNLIKELY (data_space_p == NULL) && JERRY_LIKELY (pressure < max_pressure))\n  {\n    pressure++;\n    ecma_free_unused_memory (pressure);\n    data_space_p = jmem_heap_alloc (size);\n  }\n\n  return data_space_p;\n} /* jmem_heap_gc_and_alloc_block */\n\n/**\n * Internal method for allocating a memory block.\n */\nextern inline void * JERRY_ATTR_HOT JERRY_ATTR_ALWAYS_INLINE\njmem_heap_alloc_block_internal (const size_t size) /**< required memory size */\n{\n  return jmem_heap_gc_and_alloc_block (size, JMEM_PRESSURE_FULL);\n} /* jmem_heap_alloc_block_internal */\n\n/**\n * Allocation of memory block, reclaiming unused memory if there is not enough.\n *\n * Note:\n *      If a sufficiently sized block can't be found, the engine will be terminated with ERR_OUT_OF_MEMORY.\n *\n * @return NULL, if the required memory is 0\n *         pointer to allocated memory block, otherwise\n */\nextern inline void * JERRY_ATTR_HOT JERRY_ATTR_ALWAYS_INLINE\njmem_heap_alloc_block (const size_t size) /**< required memory size */\n{\n  void *block_p = jmem_heap_gc_and_alloc_block (size, JMEM_PRESSURE_FULL);\n  JMEM_HEAP_STAT_ALLOC (size);\n  return block_p;\n} /* jmem_heap_alloc_block */\n\n/**\n * Allocation of memory block, reclaiming unused memory if there is not enough.\n *\n * Note:\n *      If a sufficiently sized block can't be found, NULL will be returned.\n *\n * @return NULL, if the required memory size is 0\n *         also NULL, if the allocation has failed\n *         pointer to the allocated memory block, otherwise\n */\nextern inline void * JERRY_ATTR_HOT JERRY_ATTR_ALWAYS_INLINE\njmem_heap_alloc_block_null_on_error (const size_t size) /**< required memory size */\n{\n  void *block_p = jmem_heap_gc_and_alloc_block (size, JMEM_PRESSURE_HIGH);\n\n#if ENABLED (JERRY_MEM_STATS)\n  if (block_p != NULL)\n  {\n    JMEM_HEAP_STAT_ALLOC (size);\n  }\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  return block_p;\n} /* jmem_heap_alloc_block_null_on_error */\n\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n/**\n * Finds the block in the free block list which preceeds the argument block\n *\n * @return pointer to the preceeding block\n */\nstatic jmem_heap_free_t *\njmem_heap_find_prev (const jmem_heap_free_t * const block_p) /**< which memory block's predecessor we're looking for */\n{\n  const jmem_heap_free_t *prev_p;\n\n  if (block_p > JERRY_CONTEXT (jmem_heap_list_skip_p))\n  {\n    prev_p = JERRY_CONTEXT (jmem_heap_list_skip_p);\n  }\n  else\n  {\n    prev_p = &JERRY_HEAP_CONTEXT (first);\n  }\n\n  JERRY_ASSERT (jmem_is_heap_pointer (block_p));\n  const uint32_t block_offset = JMEM_HEAP_GET_OFFSET_FROM_ADDR (block_p);\n\n  JMEM_VALGRIND_DEFINED_SPACE (prev_p, sizeof (jmem_heap_free_t));\n  /* Find position of region in the list. */\n  while (prev_p->next_offset < block_offset)\n  {\n    const jmem_heap_free_t * const next_p = JMEM_HEAP_GET_ADDR_FROM_OFFSET (prev_p->next_offset);\n    JERRY_ASSERT (jmem_is_heap_pointer (next_p));\n\n    JMEM_VALGRIND_DEFINED_SPACE (next_p, sizeof (jmem_heap_free_t));\n    JMEM_VALGRIND_NOACCESS_SPACE (prev_p, sizeof (jmem_heap_free_t));\n    prev_p = next_p;\n  }\n\n  JMEM_VALGRIND_NOACCESS_SPACE (prev_p, sizeof (jmem_heap_free_t));\n  return (jmem_heap_free_t *) prev_p;\n} /* jmem_heap_find_prev */\n\n/**\n * Inserts the block into the free chain after a specified block.\n *\n * Note:\n *     'jmem_heap_find_prev' can and should be used to find the previous free block\n */\nstatic void\njmem_heap_insert_block (jmem_heap_free_t *block_p, /**< block to insert */\n                        jmem_heap_free_t *prev_p, /**< the free block after which to insert 'block_p' */\n                        const size_t size) /**< size of the inserted block */\n{\n  JERRY_ASSERT ((uintptr_t) block_p % JMEM_ALIGNMENT == 0);\n  JERRY_ASSERT (size % JMEM_ALIGNMENT == 0);\n\n  JMEM_VALGRIND_NOACCESS_SPACE (block_p, size);\n\n  JMEM_VALGRIND_DEFINED_SPACE (prev_p, sizeof (jmem_heap_free_t));\n  jmem_heap_free_t *next_p = JMEM_HEAP_GET_ADDR_FROM_OFFSET (prev_p->next_offset);\n  JMEM_VALGRIND_DEFINED_SPACE (block_p, sizeof (jmem_heap_free_t));\n  JMEM_VALGRIND_DEFINED_SPACE (next_p, sizeof (jmem_heap_free_t));\n\n  const uint32_t block_offset = JMEM_HEAP_GET_OFFSET_FROM_ADDR (block_p);\n\n  /* Update prev. */\n  if (jmem_heap_get_region_end (prev_p) == block_p)\n  {\n    /* Can be merged. */\n    prev_p->size += (uint32_t) size;\n    JMEM_VALGRIND_NOACCESS_SPACE (block_p, sizeof (jmem_heap_free_t));\n    block_p = prev_p;\n  }\n  else\n  {\n    block_p->size = (uint32_t) size;\n    prev_p->next_offset = block_offset;\n  }\n\n  /* Update next. */\n  if (jmem_heap_get_region_end (block_p) == next_p)\n  {\n    /* Can be merged. */\n    block_p->size += next_p->size;\n    block_p->next_offset = next_p->next_offset;\n  }\n  else\n  {\n    block_p->next_offset = JMEM_HEAP_GET_OFFSET_FROM_ADDR (next_p);\n  }\n\n  JERRY_CONTEXT (jmem_heap_list_skip_p) = prev_p;\n\n  JMEM_VALGRIND_NOACCESS_SPACE (prev_p, sizeof (jmem_heap_free_t));\n  JMEM_VALGRIND_NOACCESS_SPACE (block_p, sizeof (jmem_heap_free_t));\n  JMEM_VALGRIND_NOACCESS_SPACE (next_p, sizeof (jmem_heap_free_t));\n} /* jmem_heap_insert_block */\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n\n/**\n * Internal method for freeing a memory block.\n */\nvoid JERRY_ATTR_HOT\njmem_heap_free_block_internal (void *ptr, /**< pointer to beginning of data space of the block */\n                               const size_t size) /**< size of allocated region */\n{\n  JERRY_ASSERT (size > 0);\n  JERRY_ASSERT (JERRY_CONTEXT (jmem_heap_limit) >= JERRY_CONTEXT (jmem_heap_allocated_size));\n  JERRY_ASSERT (JERRY_CONTEXT (jmem_heap_allocated_size) > 0);\n\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  /* checking that ptr points to the heap */\n  JERRY_ASSERT (jmem_is_heap_pointer (ptr));\n  JERRY_ASSERT ((uintptr_t) ptr % JMEM_ALIGNMENT == 0);\n\n  const size_t aligned_size = (size + JMEM_ALIGNMENT - 1) / JMEM_ALIGNMENT * JMEM_ALIGNMENT;\n\n  jmem_heap_free_t *const block_p = (jmem_heap_free_t *) ptr;\n  jmem_heap_free_t *const prev_p = jmem_heap_find_prev (block_p);\n  jmem_heap_insert_block (block_p, prev_p, aligned_size);\n\n  JERRY_CONTEXT (jmem_heap_allocated_size) -= aligned_size;\n\n  JMEM_VALGRIND_FREELIKE_SPACE (ptr);\n#else /* ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n  JERRY_CONTEXT (jmem_heap_allocated_size) -= size;\n  free (ptr);\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n  while (JERRY_CONTEXT (jmem_heap_allocated_size) + CONFIG_GC_LIMIT <= JERRY_CONTEXT (jmem_heap_limit))\n  {\n    JERRY_CONTEXT (jmem_heap_limit) -= CONFIG_GC_LIMIT;\n  }\n\n  JERRY_ASSERT (JERRY_CONTEXT (jmem_heap_limit) >= JERRY_CONTEXT (jmem_heap_allocated_size));\n} /* jmem_heap_free_block_internal */\n\n/**\n * Reallocates the memory region pointed to by 'ptr', changing the size of the allocated region.\n *\n * @return pointer to the reallocated region\n */\nvoid * JERRY_ATTR_HOT\njmem_heap_realloc_block (void *ptr, /**< memory region to reallocate */\n                         const size_t old_size, /**< current size of the region */\n                         const size_t new_size) /**< desired new size */\n{\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  JERRY_ASSERT (jmem_is_heap_pointer (ptr));\n  JERRY_ASSERT ((uintptr_t) ptr % JMEM_ALIGNMENT == 0);\n  JERRY_ASSERT (old_size != 0);\n  JERRY_ASSERT (new_size != 0);\n\n  jmem_heap_free_t * const block_p = (jmem_heap_free_t *) ptr;\n  const size_t aligned_new_size = (new_size + JMEM_ALIGNMENT - 1) / JMEM_ALIGNMENT * JMEM_ALIGNMENT;\n  const size_t aligned_old_size = (old_size + JMEM_ALIGNMENT - 1) / JMEM_ALIGNMENT * JMEM_ALIGNMENT;\n\n  if (aligned_old_size == aligned_new_size)\n  {\n    JMEM_VALGRIND_RESIZE_SPACE (block_p, old_size, new_size);\n    JMEM_HEAP_STAT_FREE (old_size);\n    JMEM_HEAP_STAT_ALLOC (new_size);\n    return block_p;\n  }\n\n  if (aligned_new_size < aligned_old_size)\n  {\n    JMEM_VALGRIND_RESIZE_SPACE (block_p, old_size, new_size);\n    JMEM_HEAP_STAT_FREE (old_size);\n    JMEM_HEAP_STAT_ALLOC (new_size);\n    jmem_heap_insert_block ((jmem_heap_free_t *) ((uint8_t *) block_p + aligned_new_size),\n                            jmem_heap_find_prev (block_p),\n                            aligned_old_size - aligned_new_size);\n\n    JERRY_CONTEXT (jmem_heap_allocated_size) -= (aligned_old_size - aligned_new_size);\n    while (JERRY_CONTEXT (jmem_heap_allocated_size) + CONFIG_GC_LIMIT <= JERRY_CONTEXT (jmem_heap_limit))\n    {\n      JERRY_CONTEXT (jmem_heap_limit) -= CONFIG_GC_LIMIT;\n    }\n\n    return block_p;\n  }\n\n  void *ret_block_p = NULL;\n  const size_t required_size = aligned_new_size - aligned_old_size;\n\n#if !ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC)\n  if (JERRY_CONTEXT (jmem_heap_allocated_size) + required_size >= JERRY_CONTEXT (jmem_heap_limit))\n  {\n    ecma_free_unused_memory (JMEM_PRESSURE_LOW);\n  }\n#else /* !ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */\n  ecma_gc_run ();\n#endif /* ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */\n\n  jmem_heap_free_t *prev_p = jmem_heap_find_prev (block_p);\n  JMEM_VALGRIND_DEFINED_SPACE (prev_p, sizeof (jmem_heap_free_t));\n  jmem_heap_free_t * const next_p = JMEM_HEAP_GET_ADDR_FROM_OFFSET (prev_p->next_offset);\n\n  /* Check if block can be extended at the end */\n  if (((jmem_heap_free_t *) ((uint8_t *) block_p + aligned_old_size)) == next_p)\n  {\n    JMEM_VALGRIND_DEFINED_SPACE (next_p, sizeof (jmem_heap_free_t));\n\n    if (required_size <= next_p->size)\n    {\n      /* Block can be extended, update the list. */\n      if (required_size == next_p->size)\n      {\n        prev_p->next_offset = next_p->next_offset;\n      }\n      else\n      {\n        jmem_heap_free_t *const new_next_p = (jmem_heap_free_t *) ((uint8_t *) next_p + required_size);\n        JMEM_VALGRIND_DEFINED_SPACE (new_next_p, sizeof (jmem_heap_free_t));\n        new_next_p->next_offset = next_p->next_offset;\n        new_next_p->size = (uint32_t) (next_p->size - required_size);\n        JMEM_VALGRIND_NOACCESS_SPACE (new_next_p, sizeof (jmem_heap_free_t));\n        prev_p->next_offset = JMEM_HEAP_GET_OFFSET_FROM_ADDR (new_next_p);\n      }\n\n      /* next_p will be marked as undefined space. */\n      JMEM_VALGRIND_RESIZE_SPACE (block_p, old_size, new_size);\n      ret_block_p = block_p;\n    }\n    else\n    {\n      JMEM_VALGRIND_NOACCESS_SPACE (next_p, sizeof (jmem_heap_free_t));\n    }\n\n    JMEM_VALGRIND_NOACCESS_SPACE (prev_p, sizeof (jmem_heap_free_t));\n  }\n  /*\n   * Check if block can be extended at the front.\n   * This is less optimal because we need to copy the data, but still better than allocting a new block.\n   */\n  else if (jmem_heap_get_region_end (prev_p) == block_p)\n  {\n    if (required_size <= prev_p->size)\n    {\n      if (required_size == prev_p->size)\n      {\n        JMEM_VALGRIND_NOACCESS_SPACE (prev_p, sizeof (jmem_heap_free_t));\n        prev_p = jmem_heap_find_prev (prev_p);\n        JMEM_VALGRIND_DEFINED_SPACE (prev_p, sizeof (jmem_heap_free_t));\n        prev_p->next_offset = JMEM_HEAP_GET_OFFSET_FROM_ADDR (next_p);\n      }\n      else\n      {\n        prev_p->size = (uint32_t) (prev_p->size - required_size);\n      }\n\n      JMEM_VALGRIND_NOACCESS_SPACE (prev_p, sizeof (jmem_heap_free_t));\n\n      ret_block_p = (uint8_t *) block_p - required_size;\n\n      /* Mark the the new block as undefined so that we are able to write to it. */\n      JMEM_VALGRIND_UNDEFINED_SPACE (ret_block_p, old_size);\n      /* The blocks are likely to overlap, so mark the old block as defined memory again. */\n      JMEM_VALGRIND_DEFINED_SPACE (block_p, old_size);\n      memmove (ret_block_p, block_p, old_size);\n\n      JMEM_VALGRIND_FREELIKE_SPACE (block_p);\n      JMEM_VALGRIND_MALLOCLIKE_SPACE (ret_block_p, new_size);\n      JMEM_VALGRIND_DEFINED_SPACE (ret_block_p, old_size);\n    }\n    else\n    {\n      JMEM_VALGRIND_NOACCESS_SPACE (prev_p, sizeof (jmem_heap_free_t));\n    }\n  }\n\n  if (ret_block_p != NULL)\n  {\n    /* Managed to extend the block. Update memory usage and the skip pointer. */\n    JERRY_CONTEXT (jmem_heap_list_skip_p) = prev_p;\n    JERRY_CONTEXT (jmem_heap_allocated_size) += required_size;\n\n    while (JERRY_CONTEXT (jmem_heap_allocated_size) >= JERRY_CONTEXT (jmem_heap_limit))\n    {\n      JERRY_CONTEXT (jmem_heap_limit) += CONFIG_GC_LIMIT;\n    }\n  }\n  else\n  {\n    /* Could not extend block. Allocate new region and copy the data. */\n    /* jmem_heap_alloc_block_internal will adjust the allocated_size, but insert_block will not,\n       so we reduce it here first, so that the limit calculation remains consistent. */\n    JERRY_CONTEXT (jmem_heap_allocated_size) -= aligned_old_size;\n    ret_block_p = jmem_heap_alloc_block_internal (new_size);\n\n    /* jmem_heap_alloc_block_internal may trigger garbage collection, which can create new free blocks\n     * in the heap structure, so we need to look up the previous block again. */\n    prev_p = jmem_heap_find_prev (block_p);\n\n    memcpy (ret_block_p, block_p, old_size);\n    jmem_heap_insert_block (block_p, prev_p, aligned_old_size);\n    /* jmem_heap_alloc_block_internal will call JMEM_VALGRIND_MALLOCLIKE_SPACE */\n    JMEM_VALGRIND_FREELIKE_SPACE (block_p);\n  }\n\n  JMEM_HEAP_STAT_FREE (old_size);\n  JMEM_HEAP_STAT_ALLOC (new_size);\n  return ret_block_p;\n#else /* ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n  const size_t required_size = new_size - old_size;\n\n#if !ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC)\n  if (JERRY_CONTEXT (jmem_heap_allocated_size) + required_size >= JERRY_CONTEXT (jmem_heap_limit))\n  {\n    ecma_free_unused_memory (JMEM_PRESSURE_LOW);\n  }\n#else /* !ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */\n  ecma_gc_run ();\n#endif /* ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */\n\n  JERRY_CONTEXT (jmem_heap_allocated_size) += required_size;\n\n  while (JERRY_CONTEXT (jmem_heap_allocated_size) >= JERRY_CONTEXT (jmem_heap_limit))\n  {\n    JERRY_CONTEXT (jmem_heap_limit) += CONFIG_GC_LIMIT;\n  }\n\n  while (JERRY_CONTEXT (jmem_heap_allocated_size) + CONFIG_GC_LIMIT <= JERRY_CONTEXT (jmem_heap_limit))\n  {\n    JERRY_CONTEXT (jmem_heap_limit) -= CONFIG_GC_LIMIT;\n  }\n\n  JMEM_HEAP_STAT_FREE (old_size);\n  JMEM_HEAP_STAT_ALLOC (new_size);\n  return realloc (ptr, new_size);\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n} /* jmem_heap_realloc_block */\n\n/**\n * Free memory block\n */\nextern inline void JERRY_ATTR_HOT JERRY_ATTR_ALWAYS_INLINE\njmem_heap_free_block (void *ptr, /**< pointer to beginning of data space of the block */\n                      const size_t size) /**< size of allocated region */\n{\n  jmem_heap_free_block_internal (ptr, size);\n  JMEM_HEAP_STAT_FREE (size);\n  return;\n} /* jmem_heap_free_block */\n\n#ifndef JERRY_NDEBUG\n/**\n * Check whether the pointer points to the heap\n *\n * Note:\n *      the routine should be used only for assertion checks\n *\n * @return true - if pointer points to the heap,\n *         false - otherwise\n */\nbool\njmem_is_heap_pointer (const void *pointer) /**< pointer */\n{\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  return ((uint8_t *) pointer >= JERRY_HEAP_CONTEXT (area)\n          && (uint8_t *) pointer <= (JERRY_HEAP_CONTEXT (area) + JMEM_HEAP_AREA_SIZE));\n#else /* ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n  JERRY_UNUSED (pointer);\n  return true;\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n} /* jmem_is_heap_pointer */\n#endif /* !JERRY_NDEBUG */\n\n#if ENABLED (JERRY_MEM_STATS)\n/**\n * Get heap memory usage statistics\n */\nvoid\njmem_heap_get_stats (jmem_heap_stats_t *out_heap_stats_p) /**< [out] heap stats */\n{\n  JERRY_ASSERT (out_heap_stats_p != NULL);\n\n  *out_heap_stats_p = JERRY_CONTEXT (jmem_heap_stats);\n} /* jmem_heap_get_stats */\n\n/**\n * Print heap memory usage statistics\n */\nvoid\njmem_heap_stats_print (void)\n{\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  JERRY_DEBUG_MSG (\"Heap stats:\\n\");\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  JERRY_DEBUG_MSG (\"  Heap size = %zu bytes\\n\",\n                   heap_stats->size);\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n  JERRY_DEBUG_MSG (\"  Allocated = %zu bytes\\n\"\n                   \"  Peak allocated = %zu bytes\\n\"\n                   \"  Waste = %zu bytes\\n\"\n                   \"  Peak waste = %zu bytes\\n\"\n                   \"  Allocated byte code data = %zu bytes\\n\"\n                   \"  Peak allocated byte code data = %zu bytes\\n\"\n                   \"  Allocated string data = %zu bytes\\n\"\n                   \"  Peak allocated string data = %zu bytes\\n\"\n                   \"  Allocated object data = %zu bytes\\n\"\n                   \"  Peak allocated object data = %zu bytes\\n\"\n                   \"  Allocated property data = %zu bytes\\n\"\n                   \"  Peak allocated property data = %zu bytes\\n\",\n                   heap_stats->allocated_bytes,\n                   heap_stats->peak_allocated_bytes,\n                   heap_stats->waste_bytes,\n                   heap_stats->peak_waste_bytes,\n                   heap_stats->byte_code_bytes,\n                   heap_stats->peak_byte_code_bytes,\n                   heap_stats->string_bytes,\n                   heap_stats->peak_string_bytes,\n                   heap_stats->object_bytes,\n                   heap_stats->peak_object_bytes,\n                   heap_stats->property_bytes,\n                   heap_stats->peak_property_bytes);\n} /* jmem_heap_stats_print */\n\n/**\n * Initalize heap memory usage statistics account structure\n */\nvoid\njmem_heap_stat_init (void)\n{\n#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)\n  JERRY_CONTEXT (jmem_heap_stats).size = JMEM_HEAP_AREA_SIZE;\n#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */\n} /* jmem_heap_stat_init */\n\n/**\n * Account allocation\n */\nvoid\njmem_heap_stat_alloc (size_t size) /**< Size of allocated block */\n{\n  const size_t aligned_size = (size + JMEM_ALIGNMENT - 1) / JMEM_ALIGNMENT * JMEM_ALIGNMENT;\n  const size_t waste_bytes = aligned_size - size;\n\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  heap_stats->allocated_bytes += aligned_size;\n  heap_stats->waste_bytes += waste_bytes;\n\n  if (heap_stats->allocated_bytes > heap_stats->peak_allocated_bytes)\n  {\n    heap_stats->peak_allocated_bytes = heap_stats->allocated_bytes;\n  }\n\n  if (heap_stats->waste_bytes > heap_stats->peak_waste_bytes)\n  {\n    heap_stats->peak_waste_bytes = heap_stats->waste_bytes;\n  }\n} /* jmem_heap_stat_alloc */\n\n/**\n * Account freeing\n */\nvoid\njmem_heap_stat_free (size_t size) /**< Size of freed block */\n{\n  const size_t aligned_size = (size + JMEM_ALIGNMENT - 1) / JMEM_ALIGNMENT * JMEM_ALIGNMENT;\n  const size_t waste_bytes = aligned_size - size;\n\n  jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);\n\n  heap_stats->allocated_bytes -= aligned_size;\n  heap_stats->waste_bytes -= waste_bytes;\n} /* jmem_heap_stat_free */\n\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jmem/jmem-poolman.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Memory pool manager implementation\n */\n\n#include \"jcontext.h\"\n#include \"jmem.h\"\n#include \"jrt-libc-includes.h\"\n\n#define JMEM_ALLOCATOR_INTERNAL\n#include \"jmem-allocator-internal.h\"\n\n#if ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC)\n#include \"ecma-gc.h\"\n#endif /* ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */\n\n/** \\addtogroup mem Memory allocation\n * @{\n *\n * \\addtogroup poolman Memory pool manager\n * @{\n */\n\n/**\n * Finalize pool manager\n */\nvoid\njmem_pools_finalize (void)\n{\n  jmem_pools_collect_empty ();\n\n  JERRY_ASSERT (JERRY_CONTEXT (jmem_free_8_byte_chunk_p) == NULL);\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  JERRY_ASSERT (JERRY_CONTEXT (jmem_free_16_byte_chunk_p) == NULL);\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n} /* jmem_pools_finalize */\n\n/**\n * Allocate a chunk of specified size\n *\n * @return pointer to allocated chunk, if allocation was successful,\n *         or NULL - if not enough memory.\n */\nextern inline void * JERRY_ATTR_HOT JERRY_ATTR_ALWAYS_INLINE\njmem_pools_alloc (size_t size) /**< size of the chunk */\n{\n#if ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC)\n  ecma_gc_run ();\n#endif /* ENABLED (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  if (size <= 8)\n  {\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n    JERRY_ASSERT (size <= 8);\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n    if (JERRY_CONTEXT (jmem_free_8_byte_chunk_p) != NULL)\n    {\n      const jmem_pools_chunk_t *const chunk_p = JERRY_CONTEXT (jmem_free_8_byte_chunk_p);\n\n      JMEM_VALGRIND_DEFINED_SPACE (chunk_p, sizeof (jmem_pools_chunk_t));\n      JERRY_CONTEXT (jmem_free_8_byte_chunk_p) = chunk_p->next_p;\n      JMEM_VALGRIND_UNDEFINED_SPACE (chunk_p, sizeof (jmem_pools_chunk_t));\n\n      JMEM_HEAP_STAT_ALLOC (8);\n      return (void *) chunk_p;\n    }\n    else\n    {\n      void *chunk_p = jmem_heap_alloc_block_internal (8);\n      JMEM_HEAP_STAT_ALLOC (8);\n      return chunk_p;\n    }\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  }\n\n  JERRY_ASSERT (size <= 16);\n\n  if (JERRY_CONTEXT (jmem_free_16_byte_chunk_p) != NULL)\n  {\n    const jmem_pools_chunk_t *const chunk_p = JERRY_CONTEXT (jmem_free_16_byte_chunk_p);\n\n    JMEM_VALGRIND_DEFINED_SPACE (chunk_p, sizeof (jmem_pools_chunk_t));\n    JERRY_CONTEXT (jmem_free_16_byte_chunk_p) = chunk_p->next_p;\n    JMEM_VALGRIND_UNDEFINED_SPACE (chunk_p, sizeof (jmem_pools_chunk_t));\n\n    JMEM_HEAP_STAT_ALLOC (16);\n    return (void *) chunk_p;\n  }\n  else\n  {\n    void *chunk_p = jmem_heap_alloc_block_internal (16);\n    JMEM_HEAP_STAT_ALLOC (16);\n    return chunk_p;\n  }\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n} /* jmem_pools_alloc */\n\n/**\n * Free the chunk\n */\nextern inline void JERRY_ATTR_HOT JERRY_ATTR_ALWAYS_INLINE\njmem_pools_free (void *chunk_p, /**< pointer to the chunk */\n                 size_t size) /**< size of the chunk */\n{\n  JERRY_ASSERT (chunk_p != NULL);\n  JMEM_HEAP_STAT_FREE (size);\n\n  jmem_pools_chunk_t *const chunk_to_free_p = (jmem_pools_chunk_t *) chunk_p;\n\n  JMEM_VALGRIND_DEFINED_SPACE (chunk_to_free_p, size);\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  if (size <= 8)\n  {\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n    JERRY_ASSERT (size <= 8);\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n    chunk_to_free_p->next_p = JERRY_CONTEXT (jmem_free_8_byte_chunk_p);\n    JERRY_CONTEXT (jmem_free_8_byte_chunk_p) = chunk_to_free_p;\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  }\n  else\n  {\n    JERRY_ASSERT (size <= 16);\n\n    chunk_to_free_p->next_p = JERRY_CONTEXT (jmem_free_16_byte_chunk_p);\n    JERRY_CONTEXT (jmem_free_16_byte_chunk_p) = chunk_to_free_p;\n  }\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n  JMEM_VALGRIND_NOACCESS_SPACE (chunk_to_free_p, size);\n} /* jmem_pools_free */\n\n/**\n *  Collect empty pool chunks\n */\nvoid\njmem_pools_collect_empty (void)\n{\n  jmem_pools_chunk_t *chunk_p = JERRY_CONTEXT (jmem_free_8_byte_chunk_p);\n  JERRY_CONTEXT (jmem_free_8_byte_chunk_p) = NULL;\n\n  while (chunk_p)\n  {\n    JMEM_VALGRIND_DEFINED_SPACE (chunk_p, sizeof (jmem_pools_chunk_t));\n    jmem_pools_chunk_t *const next_p = chunk_p->next_p;\n    JMEM_VALGRIND_NOACCESS_SPACE (chunk_p, sizeof (jmem_pools_chunk_t));\n\n    jmem_heap_free_block_internal (chunk_p, 8);\n    chunk_p = next_p;\n  }\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n  chunk_p = JERRY_CONTEXT (jmem_free_16_byte_chunk_p);\n  JERRY_CONTEXT (jmem_free_16_byte_chunk_p) = NULL;\n\n  while (chunk_p)\n  {\n    JMEM_VALGRIND_DEFINED_SPACE (chunk_p, sizeof (jmem_pools_chunk_t));\n    jmem_pools_chunk_t *const next_p = chunk_p->next_p;\n    JMEM_VALGRIND_NOACCESS_SPACE (chunk_p, sizeof (jmem_pools_chunk_t));\n\n    jmem_heap_free_block_internal (chunk_p, 16);\n    chunk_p = next_p;\n  }\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n} /* jmem_pools_collect_empty */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jmem/jmem.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JMEM_H\n#define JMEM_H\n\n#include \"jrt.h\"\n\n/** \\addtogroup mem Memory allocation\n * @{\n *\n * \\addtogroup heap Heap\n * @{\n */\n\n/**\n * Logarithm of required alignment for allocated units/blocks\n */\n#define JMEM_ALIGNMENT_LOG   3\n\n/**\n * Representation of NULL value for compressed pointers\n */\n#define JMEM_CP_NULL ((jmem_cpointer_t) 0)\n\n/**\n * Required alignment for allocated units/blocks\n */\n#define JMEM_ALIGNMENT (1u << JMEM_ALIGNMENT_LOG)\n\n/**\n * Pointer value can be directly stored without compression\n */\n#if UINTPTR_MAX <= UINT32_MAX\n#define JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY\n#endif /* UINTPTR_MAX <= UINT32_MAX */\n\n/**\n * Mask for tag part in jmem_cpointer_tag_t\n */\n#define JMEM_TAG_MASK 0x7u\n\n/**\n * Shift for tag part in jmem_cpointer_tag_t\n */\n#if defined (JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY) && ENABLED (JERRY_CPOINTER_32_BIT)\n#define JMEM_TAG_SHIFT 0\n#else /* !JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY || !ENABLED (JERRY_CPOINTER_32_BIT) */\n#define JMEM_TAG_SHIFT 3\n#endif /* JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY && ENABLED (JERRY_CPOINTER_32_BIT) */\n\n/**\n * Bit mask for tag part in jmem_cpointer_tag_t\n */\nenum\n{\n  JMEM_FIRST_TAG_BIT_MASK   = (1u << 0), /**< first tag bit mask **/\n  JMEM_SECOND_TAG_BIT_MASK  = (1u << 1), /**< second tag bit mask **/\n  JMEM_THIRD_TAG_BIT_MASK   = (1u << 2), /**< third tag bit mask **/\n};\n\n/**\n * Compressed pointer representations\n *\n * 16 bit representation:\n *   The jmem_cpointer_t is defined as uint16_t\n *   and it can contain any sixteen bit value.\n *\n * 32 bit representation:\n *   The jmem_cpointer_t is defined as uint32_t.\n *   The lower JMEM_ALIGNMENT_LOG bits must be zero.\n *   The other bits can have any value.\n *\n * The 16 bit representation always encodes an offset from\n * a heap base. The 32 bit representation currently encodes\n * raw 32 bit JMEM_ALIGNMENT aligned pointers on 32 bit systems.\n * This can be extended to encode a 32 bit offset from a heap\n * base on 64 bit systems in the future. There are no plans\n * to support more than 4G address space for JerryScript.\n */\n\n/**\n * Compressed pointer\n */\n#if ENABLED (JERRY_CPOINTER_32_BIT)\ntypedef uint32_t jmem_cpointer_t;\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\ntypedef uint16_t jmem_cpointer_t;\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n/**\n * Compressed pointer with tag value\n */\ntypedef uint32_t jmem_cpointer_tag_t;\n\n/**\n * Memory usage pressure for reclaiming unused memory.\n *\n * Each failed allocation will try to reclaim memory with increasing pressure,\n * until enough memory is freed to fulfill the allocation request.\n *\n * If not enough memory is freed and JMEM_PRESSURE_FULL is reached,\n * then the engine is shut down with ERR_OUT_OF_MEMORY.\n */\ntypedef enum\n{\n  JMEM_PRESSURE_NONE, /**< no memory pressure */\n  JMEM_PRESSURE_LOW,  /**< low memory pressure */\n  JMEM_PRESSURE_HIGH, /**< high memory pressure */\n  JMEM_PRESSURE_FULL, /**< memory full */\n} jmem_pressure_t;\n\n/**\n * Node for free chunk list\n */\ntypedef struct jmem_pools_chunk_t\n{\n  struct jmem_pools_chunk_t *next_p; /**< pointer to next pool chunk */\n} jmem_pools_chunk_t;\n\n/**\n *  Free region node\n */\ntypedef struct\n{\n  uint32_t next_offset; /**< Offset of next region in list */\n  uint32_t size; /**< Size of region */\n} jmem_heap_free_t;\n\nvoid jmem_init (void);\nvoid jmem_finalize (void);\n\nvoid *jmem_heap_alloc_block (const size_t size);\nvoid *jmem_heap_alloc_block_null_on_error (const size_t size);\nvoid *jmem_heap_realloc_block (void *ptr, const size_t old_size, const size_t new_size);\nvoid jmem_heap_free_block (void *ptr, const size_t size);\n\n#if ENABLED (JERRY_MEM_STATS)\n/**\n * Heap memory usage statistics\n */\ntypedef struct\n{\n  size_t size; /**< heap total size */\n\n  size_t allocated_bytes; /**< currently allocated bytes */\n  size_t peak_allocated_bytes; /**< peak allocated bytes */\n\n  size_t waste_bytes; /**< bytes waste due to blocks filled partially */\n  size_t peak_waste_bytes; /**< peak wasted bytes */\n\n  size_t byte_code_bytes; /**< allocated memory for byte code */\n  size_t peak_byte_code_bytes; /**< peak allocated memory for byte code */\n\n  size_t string_bytes; /**< allocated memory for strings */\n  size_t peak_string_bytes; /**< peak allocated memory for strings */\n\n  size_t object_bytes; /**< allocated memory for objects */\n  size_t peak_object_bytes; /**< peak allocated memory for objects */\n\n  size_t property_bytes; /**< allocated memory for properties */\n  size_t peak_property_bytes; /**< peak allocated memory for properties */\n} jmem_heap_stats_t;\n\nvoid jmem_stats_allocate_byte_code_bytes (size_t property_size);\nvoid jmem_stats_free_byte_code_bytes (size_t property_size);\nvoid jmem_stats_allocate_string_bytes (size_t string_size);\nvoid jmem_stats_free_string_bytes (size_t string_size);\nvoid jmem_stats_allocate_object_bytes (size_t object_size);\nvoid jmem_stats_free_object_bytes (size_t string_size);\nvoid jmem_stats_allocate_property_bytes (size_t property_size);\nvoid jmem_stats_free_property_bytes (size_t property_size);\n\nvoid jmem_heap_get_stats (jmem_heap_stats_t *);\nvoid jmem_heap_stats_reset_peak (void);\nvoid jmem_heap_stats_print (void);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\njmem_cpointer_t JERRY_ATTR_PURE jmem_compress_pointer (const void *pointer_p);\nvoid * JERRY_ATTR_PURE jmem_decompress_pointer (uintptr_t compressed_pointer);\n\n/**\n * Define a local array variable and allocate memory for the array on the heap.\n *\n * If requested number of elements is zero, assign NULL to the variable.\n *\n * Warning:\n *         if there is not enough memory on the heap, shutdown engine with ERR_OUT_OF_MEMORY.\n */\n#define JMEM_DEFINE_LOCAL_ARRAY(var_name, number, type) \\\n{ \\\n  size_t var_name ## ___size = (size_t) (number) * sizeof (type); \\\n  type *var_name = (type *) (jmem_heap_alloc_block (var_name ## ___size));\n\n/**\n * Free the previously defined local array variable, freeing corresponding block on the heap,\n * if it was allocated (i.e. if the array's size was non-zero).\n */\n#define JMEM_FINALIZE_LOCAL_ARRAY(var_name) \\\n  if (var_name != NULL) \\\n  { \\\n    JERRY_ASSERT (var_name ## ___size != 0); \\\n    \\\n    jmem_heap_free_block (var_name, var_name ## ___size); \\\n  } \\\n  else \\\n  { \\\n    JERRY_ASSERT (var_name ## ___size == 0); \\\n  } \\\n}\n\n/**\n * Get value of pointer from specified non-null compressed pointer value\n */\n#define JMEM_CP_GET_NON_NULL_POINTER(type, cp_value) \\\n  ((type *) (jmem_decompress_pointer (cp_value)))\n\n/**\n * Get value of pointer from specified compressed pointer value\n */\n#define JMEM_CP_GET_POINTER(type, cp_value) \\\n  (((JERRY_UNLIKELY ((cp_value) == JMEM_CP_NULL)) ? NULL : JMEM_CP_GET_NON_NULL_POINTER (type, cp_value)))\n\n/**\n * Set value of non-null compressed pointer so that it will correspond\n * to specified non_compressed_pointer\n */\n#define JMEM_CP_SET_NON_NULL_POINTER(cp_value, non_compressed_pointer) \\\n  (cp_value) = jmem_compress_pointer (non_compressed_pointer)\n\n/**\n * Set value of compressed pointer so that it will correspond\n * to specified non_compressed_pointer\n */\n#define JMEM_CP_SET_POINTER(cp_value, non_compressed_pointer) \\\n  do \\\n  { \\\n    void *ptr_value = (void *) non_compressed_pointer; \\\n    \\\n    if (JERRY_UNLIKELY ((ptr_value) == NULL)) \\\n    { \\\n      (cp_value) = JMEM_CP_NULL; \\\n    } \\\n    else \\\n    { \\\n      JMEM_CP_SET_NON_NULL_POINTER (cp_value, ptr_value); \\\n    } \\\n  } while (false);\n\n/**\n * Set value of pointer-tag value so that it will correspond\n * to specified non_compressed_pointer along with tag\n */\n#define JMEM_CP_SET_NON_NULL_POINTER_TAG(cp_value, pointer, tag) \\\n  do \\\n  { \\\n    JERRY_ASSERT ((uintptr_t) tag < (uintptr_t) (JMEM_ALIGNMENT)); \\\n    jmem_cpointer_tag_t compressed_ptr = jmem_compress_pointer (pointer); \\\n    (cp_value) = (jmem_cpointer_tag_t) ((compressed_ptr << JMEM_TAG_SHIFT) | tag); \\\n  } while (false);\n\n/**\n * Extract value of pointer from specified pointer-tag value\n */\n#define JMEM_CP_GET_NON_NULL_POINTER_FROM_POINTER_TAG(type, cp_value) \\\n  ((type *) (jmem_decompress_pointer ((cp_value & ~JMEM_TAG_MASK) >> JMEM_TAG_SHIFT)))\n\n/**\n * Extract tag bits from pointer-tag value\n */\n#define JMEM_CP_GET_POINTER_TAG_BITS(cp_value) \\\n  (cp_value & (JMEM_FIRST_TAG_BIT_MASK | JMEM_SECOND_TAG_BIT_MASK | JMEM_THIRD_TAG_BIT_MASK))\n\n/**\n * Get value of each tag from specified pointer-tag value\n */\n#define JMEM_CP_GET_FIRST_BIT_FROM_POINTER_TAG(cp_value) \\\n  (cp_value & JMEM_FIRST_TAG_BIT_MASK) /**< get first tag bit **/\n#define JMEM_CP_GET_SECOND_BIT_FROM_POINTER_TAG(cp_value) \\\n  (cp_value & JMEM_SECOND_TAG_BIT_MASK) /**< get second tag bit **/\n#define JMEM_CP_GET_THIRD_BIT_FROM_POINTER_TAG(cp_value) \\\n  (cp_value & JMEM_THIRD_TAG_BIT_MASK) /**< get third tag bit **/\n\n/**\n * Set value of each tag to specified pointer-tag value\n */\n#define JMEM_CP_SET_FIRST_BIT_TO_POINTER_TAG(cp_value) \\\n  (cp_value) = (cp_value | JMEM_FIRST_TAG_BIT_MASK) /**< set first tag bit **/\n#define JMEM_CP_SET_SECOND_BIT_TO_POINTER_TAG(cp_value) \\\n  (cp_value) = (cp_value | JMEM_SECOND_TAG_BIT_MASK) /**< set second tag bit **/\n#define JMEM_CP_SET_THIRD_BIT_TO_POINTER_TAG(cp_value) \\\n  (cp_value) = (cp_value | JMEM_THIRD_TAG_BIT_MASK) /**< set third tag bit **/\n\n/**\n * @}\n * \\addtogroup poolman Memory pool manager\n * @{\n */\n\nvoid *jmem_pools_alloc (size_t size);\nvoid jmem_pools_free (void *chunk_p, size_t size);\nvoid jmem_pools_collect_empty (void);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !JMEM_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jrt/jrt-bit-fields.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JRT_BIT_FIELDS_H\n#define JRT_BIT_FIELDS_H\n\n/**\n * Extract a bit-field.\n *\n * @param type type of container\n * @param container container to extract bit-field from\n * @param lsb least significant bit of the value to be extracted\n * @param width width of the bit-field to be extracted\n * @return bit-field's value\n */\n#define JRT_EXTRACT_BIT_FIELD(type, container, lsb, width) \\\n  (((container) >> lsb) & ((((type) 1) << (width)) - 1))\n\n/**\n * Set a bit-field.\n *\n * @param type type of container\n * @param container container to insert bit-field to\n * @param new_bit_field_value value of bit-field to insert\n * @param lsb least significant bit of the value to be inserted\n * @param width width of the bit-field to be inserted\n * @return bit-field's value\n */\n#define JRT_SET_BIT_FIELD_VALUE(type, container, new_bit_field_value, lsb, width) \\\n  (((container) & ~(((((type) 1) << (width)) - 1) << (lsb))) | (((type) new_bit_field_value) << (lsb)))\n\n#endif /* !JRT_BIT_FIELDS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jrt/jrt-fatals.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Implementation of exit with specified status code.\n */\n\n#include \"jrt.h\"\n#include \"jrt-libc-includes.h\"\n\n/*\n * Exit with specified status code.\n *\n * If !JERRY_NDEBUG and code != 0, print status code with description\n * and call assertion fail handler.\n */\nvoid JERRY_ATTR_NORETURN\njerry_fatal (jerry_fatal_code_t code) /**< status code */\n{\n#ifndef JERRY_NDEBUG\n  switch (code)\n  {\n    case ERR_OUT_OF_MEMORY:\n    {\n      JERRY_ERROR_MSG (\"Error: ERR_OUT_OF_MEMORY\\n\");\n      break;\n    }\n    case ERR_REF_COUNT_LIMIT:\n    {\n      JERRY_ERROR_MSG (\"Error: ERR_REF_COUNT_LIMIT\\n\");\n      break;\n    }\n    case ERR_UNTERMINATED_GC_LOOPS:\n    {\n      JERRY_ERROR_MSG (\"Error: ERR_UNTERMINATED_GC_LOOPS\\n\");\n      break;\n    }\n    case ERR_DISABLED_BYTE_CODE:\n    {\n      JERRY_ERROR_MSG (\"Error: ERR_DISABLED_BYTE_CODE\\n\");\n      break;\n    }\n    case ERR_FAILED_INTERNAL_ASSERTION:\n    {\n      JERRY_ERROR_MSG (\"Error: ERR_FAILED_INTERNAL_ASSERTION\\n\");\n      break;\n    }\n  }\n#endif /* !JERRY_NDEBUG */\n\n  jerry_port_fatal (code);\n\n  /* to make compiler happy for some RTOS: 'control reaches end of non-void function' */\n  while (true)\n  {\n  }\n} /* jerry_fatal */\n\n#ifndef JERRY_NDEBUG\n/**\n * Handle failed assertion\n */\nvoid JERRY_ATTR_NORETURN\njerry_assert_fail (const char *assertion, /**< assertion condition string */\n                   const char *file, /**< file name */\n                   const char *function, /**< function name */\n                   const uint32_t line) /**< line */\n{\n  JERRY_ERROR_MSG (\"ICE: Assertion '%s' failed at %s(%s):%lu.\\n\",\n                   assertion,\n                   file,\n                   function,\n                   (unsigned long) line);\n\n  jerry_fatal (ERR_FAILED_INTERNAL_ASSERTION);\n} /* jerry_assert_fail */\n\n/**\n * Handle execution of control path that should be unreachable\n */\nvoid JERRY_ATTR_NORETURN\njerry_unreachable (const char *file, /**< file name */\n                   const char *function, /**< function name */\n                   const uint32_t line) /**< line */\n{\n  JERRY_ERROR_MSG (\"ICE: Unreachable control path at %s(%s):%lu was executed.\\n\",\n                   file,\n                   function,\n                   (unsigned long) line);\n\n  jerry_fatal (ERR_FAILED_INTERNAL_ASSERTION);\n} /* jerry_unreachable */\n#endif /* !JERRY_NDEBUG */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jrt/jrt-libc-includes.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JRT_LIBC_INCLUDES_H\n#define JRT_LIBC_INCLUDES_H\n\n#include <ctype.h>\n#include <setjmp.h>\n#include <stdarg.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#endif /* !JRT_LIBC_INCLUDES_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jrt/jrt-types.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JRT_TYPES_H\n#define JRT_TYPES_H\n\n#include <float.h>\n#include <stdbool.h>\n#include <stddef.h>\n#include <stdint.h>\n\n#endif /* !JRT_TYPES_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/jrt/jrt.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JRT_H\n#define JRT_H\n\n#include <stdio.h>\n#include <string.h>\n\n#include \"config.h\"\n#include \"jerryscript-port.h\"\n#include \"jrt-types.h\"\n\n/*\n * Constants\n */\n#define JERRY_BITSINBYTE 8\n\n/*\n * Make sure unused parameters, variables, or expressions trigger no compiler warning.\n */\n#define JERRY_UNUSED(x) ((void) (x))\n\n#define JERRY_UNUSED_1(_1)                 JERRY_UNUSED (_1)\n#define JERRY_UNUSED_2(_1, _2)             JERRY_UNUSED (_1), JERRY_UNUSED_1 (_2)\n#define JERRY_UNUSED_3(_1, _2, _3)         JERRY_UNUSED (_1), JERRY_UNUSED_2 (_2, _3)\n#define JERRY_UNUSED_4(_1, _2, _3, _4)     JERRY_UNUSED (_1), JERRY_UNUSED_3 (_2, _3, _4)\n#define JERRY_UNUSED_5(_1, _2, _3, _4, _5) JERRY_UNUSED (_1), JERRY_UNUSED_4 (_2, _3, _4, _5)\n\n#define JERRY_VA_ARGS_NUM_IMPL(_1, _2, _3, _4, _5, N, ...) N\n#define JERRY_VA_ARGS_NUM(...) JERRY_VA_ARGS_NUM_IMPL (__VA_ARGS__, 5, 4, 3, 2, 1, 0)\n\n#define JERRY_UNUSED_ALL_IMPL_(nargs) JERRY_UNUSED_ ## nargs\n#define JERRY_UNUSED_ALL_IMPL(nargs) JERRY_UNUSED_ALL_IMPL_ (nargs)\n#define JERRY_UNUSED_ALL(...) JERRY_UNUSED_ALL_IMPL (JERRY_VA_ARGS_NUM (__VA_ARGS__)) (__VA_ARGS__)\n\n/*\n * Asserts\n *\n * Warning:\n *         Don't use JERRY_STATIC_ASSERT in headers, because\n *         __LINE__ may be the same for asserts in a header\n *         and in an implementation file.\n */\n#define JERRY_STATIC_ASSERT_GLUE_(a, b, c) a ## b ## _ ## c\n#define JERRY_STATIC_ASSERT_GLUE(a, b, c) JERRY_STATIC_ASSERT_GLUE_ (a, b, c)\n#define JERRY_STATIC_ASSERT(x, msg) \\\n  enum { JERRY_STATIC_ASSERT_GLUE (static_assertion_failed_, __LINE__, msg) = 1 / (!!(x)) }\n\n#ifndef JERRY_NDEBUG\nvoid JERRY_ATTR_NORETURN\njerry_assert_fail (const char *assertion, const char *file, const char *function, const uint32_t line);\nvoid JERRY_ATTR_NORETURN\njerry_unreachable (const char *file, const char *function, const uint32_t line);\n\n#define JERRY_ASSERT(x) \\\n  do \\\n  { \\\n    if (JERRY_UNLIKELY (!(x))) \\\n    { \\\n      jerry_assert_fail (#x, __FILE__, __func__, __LINE__); \\\n    } \\\n  } while (0)\n\n#define JERRY_UNREACHABLE() \\\n  do \\\n  { \\\n    jerry_unreachable (__FILE__, __func__, __LINE__); \\\n  } while (0)\n#else /* JERRY_NDEBUG */\n#define JERRY_ASSERT(x) \\\n  do \\\n  { \\\n    if (false) \\\n    { \\\n      JERRY_UNUSED (x); \\\n    } \\\n  } while (0)\n\n#ifdef __GNUC__\n#define JERRY_UNREACHABLE() __builtin_unreachable ()\n#endif /* __GNUC__ */\n\n#ifdef _MSC_VER\n#define JERRY_UNREACHABLE()  _assume (0)\n#endif /* _MSC_VER */\n\n#ifndef JERRY_UNREACHABLE\n#define JERRY_UNREACHABLE()\n#endif /* !JERRY_UNREACHABLE */\n\n#endif /* !JERRY_NDEBUG */\n\n/**\n * Exit on fatal error\n */\nvoid JERRY_ATTR_NORETURN jerry_fatal (jerry_fatal_code_t code);\n\n/*\n * Logging\n */\n#if ENABLED (JERRY_LOGGING)\n#define JERRY_ERROR_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_ERROR, __VA_ARGS__)\n#define JERRY_WARNING_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_WARNING, __VA_ARGS__)\n#define JERRY_DEBUG_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_DEBUG, __VA_ARGS__)\n#define JERRY_TRACE_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_TRACE, __VA_ARGS__)\n#else /* !ENABLED (JERRY_LOGGING) */\n#define JERRY_ERROR_MSG(...) do { if (false) { JERRY_UNUSED_ALL (__VA_ARGS__); } } while (0)\n#define JERRY_WARNING_MSG(...) do { if (false) { JERRY_UNUSED_ALL (__VA_ARGS__); } } while (0)\n#define JERRY_DEBUG_MSG(...) do { if (false) { JERRY_UNUSED_ALL (__VA_ARGS__); } } while (0)\n#define JERRY_TRACE_MSG(...) do { if (false) { JERRY_UNUSED_ALL (__VA_ARGS__); } } while (0)\n#endif /* ENABLED (JERRY_LOGGING) */\n\n/**\n * Size of struct member\n */\n#define JERRY_SIZE_OF_STRUCT_MEMBER(struct_name, member_name) sizeof (((struct_name *) NULL)->member_name)\n\n/**\n * Aligns @a value to @a alignment. @a must be the power of 2.\n *\n * Returns minimum positive value, that divides @a alignment and is more than or equal to @a value\n */\n#define JERRY_ALIGNUP(value, alignment) (((value) + ((alignment) - 1)) & ~((alignment) - 1))\n\n/*\n * min, max\n */\n#define JERRY_MIN(v1, v2) (((v1) < (v2)) ? (v1) : (v2))\n#define JERRY_MAX(v1, v2) (((v1) < (v2)) ? (v2) : (v1))\n\n/**\n * Calculate the index of the first non-zero bit of a 32 bit integer value\n */\n#define JERRY__LOG2_1(n) (((n) >= 2) ? 1 : 0)\n#define JERRY__LOG2_2(n) (((n) >= 1 << 2) ? (2 + JERRY__LOG2_1 ((n) >> 2)) : JERRY__LOG2_1 (n))\n#define JERRY__LOG2_4(n) (((n) >= 1 << 4) ? (4 + JERRY__LOG2_2 ((n) >> 4)) : JERRY__LOG2_2 (n))\n#define JERRY__LOG2_8(n) (((n) >= 1 << 8) ? (8 + JERRY__LOG2_4 ((n) >> 8)) : JERRY__LOG2_4 (n))\n#define JERRY_LOG2(n) (((n) >= 1 << 16) ? (16 + JERRY__LOG2_8 ((n) >> 16)) : JERRY__LOG2_8 (n))\n\n#endif /* !JRT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/libjerry-core.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libjerry-core\nDescription: JerryScript: lightweight JavaScript engine (core engine library)\nURL: https://github.com/jerryscript-project/jerryscript\nVersion: @JERRY_VERSION@\nRequires.private: @JERRY_CORE_PKGCONFIG_REQUIRES@ # NOTE: libjerry-port-default is not added as a required package\nLibs: -L${libdir} -ljerry-core\nLibs.private: @JERRY_CORE_PKGCONFIG_LIBS@\nCflags: -I${includedir} @JERRY_CORE_PKGCONFIG_CFLAGS@\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-char-helpers.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"ecma-helpers.h\"\n#include \"lit-char-helpers.h\"\n#include \"lit-strings.h\"\n#include \"lit-unicode-ranges.inc.h\"\n#if ENABLED (JERRY_ESNEXT)\n#include \"lit-unicode-ranges-sup.inc.h\"\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_UNICODE_CASE_CONVERSION)\n#include \"lit-unicode-conversions.inc.h\"\n#if ENABLED (JERRY_ESNEXT)\n#include \"lit-unicode-conversions-sup.inc.h\"\n#include \"lit-unicode-folding.inc.h\"\n#endif /* ENABLED (JERRY_ESNEXT) */\n#endif /* ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n\n#define NUM_OF_ELEMENTS(array) (sizeof (array) / sizeof ((array)[0]))\n\n/**\n * Binary search algorithm that searches the a\n * character in the given char array.\n *\n * @return true - if the character is in the given array\n *         false - otherwise\n */\n#define LIT_SEARCH_CHAR_IN_ARRAY_FN(function_name, char_type, array_type) \\\nstatic bool \\\nfunction_name (char_type c,               /**< code unit */ \\\n               const array_type *array,   /**< array */ \\\n               int size_of_array)         /**< length of the array */\\\n{ \\\n  int bottom = 0; \\\n  int top = size_of_array - 1; \\\n  \\\n  while (bottom <= top) \\\n  { \\\n    int middle = (bottom + top) / 2; \\\n    char_type current = array[middle]; \\\n    \\\n    if (current == c) \\\n    { \\\n      return true; \\\n    } \\\n    \\\n    if (c < current) \\\n    { \\\n      top = middle - 1; \\\n    } \\\n    else \\\n    { \\\n      bottom = middle + 1; \\\n    } \\\n  } \\\n  \\\n  return false; \\\n} /* __function_name */\n\nLIT_SEARCH_CHAR_IN_ARRAY_FN (lit_search_char_in_array, ecma_char_t, uint16_t)\n\n#if ENABLED (JERRY_ESNEXT)\nLIT_SEARCH_CHAR_IN_ARRAY_FN (lit_search_codepoint_in_array, lit_code_point_t, uint32_t)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Binary search algorithm that searches a character in the given intervals.\n * Intervals specifed by two arrays. The first one contains the starting points\n * of the intervals, the second one contains the length of them.\n *\n * @return true - if the the character is included (inclusively) in one of the intervals in the given array\n *         false - otherwise\n */\n#define LIT_SEARCH_CHAR_IN_INTERVAL_ARRAY_FN(function_name, char_type, array_type, interval_type) \\\nstatic bool \\\nfunction_name (char_type c,                  /**< code unit */ \\\n               const array_type *array_sp,   /**< array of interval starting points */ \\\n               const interval_type *lengths, /**< array of interval lengths */ \\\n               int size_of_array)            /**< length of the array */ \\\n{ \\\n  int bottom = 0; \\\n  int top = size_of_array - 1; \\\n  \\\n  while (bottom <= top) \\\n  { \\\n    int middle = (bottom + top) / 2; \\\n    char_type current_sp = array_sp[middle]; \\\n    \\\n    if (current_sp <= c && c <= current_sp + lengths[middle]) \\\n    { \\\n      return true; \\\n    } \\\n    \\\n    if (c > current_sp) \\\n    { \\\n      bottom = middle + 1; \\\n    } \\\n    else \\\n    { \\\n      top = middle - 1; \\\n    } \\\n  } \\\n  \\\n  return false; \\\n} /* function_name */\n\nLIT_SEARCH_CHAR_IN_INTERVAL_ARRAY_FN (lit_search_char_in_interval_array, ecma_char_t, uint16_t, uint8_t)\n\n#if ENABLED (JERRY_ESNEXT)\nLIT_SEARCH_CHAR_IN_INTERVAL_ARRAY_FN (lit_search_codepoint_in_interval_array, lit_code_point_t, uint32_t, uint16_t)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Check if specified character is one of the Whitespace characters including those that fall into\n * \"Space, Separator\" (\"Zs\") Unicode character category or one of the Line Terminator characters.\n *\n * @return true - if the character is one of characters, listed in ECMA-262 v5, Table 2,\n *         false - otherwise\n */\nbool\nlit_char_is_white_space (lit_code_point_t c) /**< code point */\n{\n  if (c <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n  {\n    return (c == LIT_CHAR_SP || (c >= LIT_CHAR_TAB && c <= LIT_CHAR_CR));\n  }\n\n  if (c == LIT_CHAR_BOM\n#if !ENABLED (JERRY_ESNEXT)\n      /* Mongolian Vowel Separator (u180e) used to be a whitespace character. */\n      || c == LIT_CHAR_MVS\n#endif /* !ENABLED (JERRY_ESNEXT) */\n      || c == LIT_CHAR_LS\n      || c == LIT_CHAR_PS)\n  {\n    return true;\n  }\n\n  return (c <= LIT_UTF16_CODE_UNIT_MAX\n          && ((c >= lit_unicode_white_space_interval_starts[0]\n                 && c <= lit_unicode_white_space_interval_starts[0] + lit_unicode_white_space_interval_lengths[0])\n              || lit_search_char_in_array ((ecma_char_t) c,\n                                            lit_unicode_white_space_chars,\n                                            NUM_OF_ELEMENTS (lit_unicode_white_space_chars))));\n} /* lit_char_is_white_space */\n\n/**\n * Check if specified character is one of LineTerminator characters\n *\n * @return true - if the character is one of characters, listed in ECMA-262 v5, Table 3,\n *         false - otherwise\n */\nbool\nlit_char_is_line_terminator (ecma_char_t c) /**< code unit */\n{\n  return (c == LIT_CHAR_LF\n          || c == LIT_CHAR_CR\n          || c == LIT_CHAR_LS\n          || c == LIT_CHAR_PS);\n} /* lit_char_is_line_terminator */\n\n/**\n * Check if specified character is a Unicode ID_Start\n *\n * See also:\n *          ECMA-262 v1, 11.6: UnicodeIDStart\n *\n * @return true - if the codepoint has Unicode property \"ID_Start\"\n *         false - otherwise\n */\nstatic bool\nlit_char_is_unicode_id_start (lit_code_point_t code_point) /**< code unit */\n{\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (code_point >= LIT_UTF8_4_BYTE_CODE_POINT_MIN))\n  {\n    return (lit_search_codepoint_in_interval_array (code_point,\n                                                    lit_unicode_id_start_interval_starts_sup,\n                                                    lit_unicode_id_start_interval_lengths_sup,\n                                                    NUM_OF_ELEMENTS (lit_unicode_id_start_interval_starts_sup))\n            || lit_search_codepoint_in_array (code_point,\n                                              lit_unicode_id_start_chars_sup,\n                                              NUM_OF_ELEMENTS (lit_unicode_id_start_chars_sup)));\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_ASSERT (code_point < LIT_UTF8_4_BYTE_CODE_POINT_MIN);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_char_t c = (ecma_char_t) code_point;\n\n  return (lit_search_char_in_interval_array (c,\n                                             lit_unicode_id_start_interval_starts,\n                                             lit_unicode_id_start_interval_lengths,\n                                             NUM_OF_ELEMENTS (lit_unicode_id_start_interval_starts))\n          || lit_search_char_in_array (c, lit_unicode_id_start_chars, NUM_OF_ELEMENTS (lit_unicode_id_start_chars)));\n} /* lit_char_is_unicode_id_start */\n\n/**\n * Check if specified character is a Unicode ID_Continue\n *\n * See also:\n *          ECMA-262 v1, 11.6: UnicodeIDContinue\n *\n * @return true - if the codepoint has Unicode property \"ID_Continue\"\n *         false - otherwise\n */\nstatic bool\nlit_char_is_unicode_id_continue (lit_code_point_t code_point) /**< code unit */\n{\n  /* Each ID_Start codepoint is ID_Continue as well. */\n  if (lit_char_is_unicode_id_start (code_point))\n  {\n    return true;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (code_point >= LIT_UTF8_4_BYTE_CODE_POINT_MIN))\n  {\n    return (lit_search_codepoint_in_interval_array (code_point,\n                                                    lit_unicode_id_continue_interval_starts_sup,\n                                                    lit_unicode_id_continue_interval_lengths_sup,\n                                                    NUM_OF_ELEMENTS (lit_unicode_id_continue_interval_starts_sup))\n            || lit_search_codepoint_in_array (code_point,\n                                              lit_unicode_id_continue_chars_sup,\n                                              NUM_OF_ELEMENTS (lit_unicode_id_continue_chars_sup)));\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_ASSERT (code_point < LIT_UTF8_4_BYTE_CODE_POINT_MIN);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_char_t c = (ecma_char_t) code_point;\n\n  return (lit_search_char_in_interval_array (c,\n                                             lit_unicode_id_continue_interval_starts,\n                                             lit_unicode_id_continue_interval_lengths,\n                                             NUM_OF_ELEMENTS (lit_unicode_id_continue_interval_starts))\n          || lit_search_char_in_array (c,\n                                       lit_unicode_id_continue_chars,\n                                       NUM_OF_ELEMENTS (lit_unicode_id_continue_chars)));\n} /* lit_char_is_unicode_id_continue */\n\n/**\n * Checks whether the character is a valid identifier start.\n *\n * @return true if it is.\n */\nbool\nlit_code_point_is_identifier_start (lit_code_point_t code_point) /**< code point */\n{\n  /* Fast path for ASCII-defined letters. */\n  if (code_point <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n  {\n    return ((LEXER_TO_ASCII_LOWERCASE (code_point) >= LIT_CHAR_LOWERCASE_A\n             && LEXER_TO_ASCII_LOWERCASE (code_point) <= LIT_CHAR_LOWERCASE_Z)\n            || code_point == LIT_CHAR_DOLLAR_SIGN\n            || code_point == LIT_CHAR_UNDERSCORE);\n  }\n\n  return lit_char_is_unicode_id_start (code_point);\n} /* lit_code_point_is_identifier_start */\n\n/**\n * Checks whether the character is a valid identifier part.\n *\n * @return true if it is.\n */\nbool\nlit_code_point_is_identifier_part (lit_code_point_t code_point) /**< code point */\n{\n  /* Fast path for ASCII-defined letters. */\n  if (code_point <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n  {\n    return ((LEXER_TO_ASCII_LOWERCASE (code_point) >= LIT_CHAR_LOWERCASE_A\n             && LEXER_TO_ASCII_LOWERCASE (code_point) <= LIT_CHAR_LOWERCASE_Z)\n            || (code_point >= LIT_CHAR_0 && code_point <= LIT_CHAR_9)\n            || code_point == LIT_CHAR_DOLLAR_SIGN\n            || code_point == LIT_CHAR_UNDERSCORE);\n  }\n\n  return lit_char_is_unicode_id_continue (code_point);\n} /* lit_code_point_is_identifier_part */\n\n/**\n * Check if specified character is one of OctalDigit characters (ECMA-262 v5, B.1.2)\n *\n * @return true / false\n */\nbool\nlit_char_is_octal_digit (ecma_char_t c) /**< code unit */\n{\n  return (c >= LIT_CHAR_ASCII_OCTAL_DIGITS_BEGIN && c <= LIT_CHAR_ASCII_OCTAL_DIGITS_END);\n} /* lit_char_is_octal_digit */\n\n/**\n * Check if specified character is one of DecimalDigit characters (ECMA-262 v5, 7.8.3)\n *\n * @return true / false\n */\nbool\nlit_char_is_decimal_digit (ecma_char_t c) /**< code unit */\n{\n  return (c >= LIT_CHAR_ASCII_DIGITS_BEGIN && c <= LIT_CHAR_ASCII_DIGITS_END);\n} /* lit_char_is_decimal_digit */\n\n/**\n * Check if specified character is one of HexDigit characters (ECMA-262 v5, 7.8.3)\n *\n * @return true / false\n */\nbool\nlit_char_is_hex_digit (ecma_char_t c) /**< code unit */\n{\n  return ((c >= LIT_CHAR_ASCII_DIGITS_BEGIN && c <= LIT_CHAR_ASCII_DIGITS_END)\n          || (LEXER_TO_ASCII_LOWERCASE (c) >= LIT_CHAR_ASCII_LOWERCASE_LETTERS_HEX_BEGIN\n              && LEXER_TO_ASCII_LOWERCASE (c) <= LIT_CHAR_ASCII_LOWERCASE_LETTERS_HEX_END));\n} /* lit_char_is_hex_digit */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Check if specified character is one of BinaryDigits characters (ECMA-262 v6, 11.8.3)\n *\n * @return true / false\n */\nbool\nlit_char_is_binary_digit (ecma_char_t c) /** code unit */\n{\n  return (c == LIT_CHAR_0 || c == LIT_CHAR_1);\n} /* lit_char_is_binary_digit */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * UnicodeEscape abstract method\n *\n * See also: ECMA-262 v10, 24.5.2.3\n */\nvoid\nlit_char_unicode_escape (ecma_stringbuilder_t *builder_p, /**< stringbuilder to append */\n                         ecma_char_t c) /**< code unit to convert */\n{\n  ecma_stringbuilder_append_raw (builder_p, (lit_utf8_byte_t *) \"\\\\u\", 2);\n\n  for (int8_t i = 3; i >= 0; i--)\n  {\n    int32_t result_char = (c >> (i * 4)) & 0xF;\n    ecma_stringbuilder_append_byte (builder_p, (lit_utf8_byte_t) (result_char + (result_char <= 9\n                                                                                 ? LIT_CHAR_0\n                                                                                 : (LIT_CHAR_LOWERCASE_A - 10))));\n  }\n} /* lit_char_unicode_escape */\n\n/**\n * Convert a HexDigit character to its numeric value, as defined in ECMA-262 v5, 7.8.3\n *\n * @return digit value, corresponding to the hex char\n */\nuint32_t\nlit_char_hex_to_int (ecma_char_t c) /**< code unit, corresponding to\n                                     *    one of HexDigit characters */\n{\n  JERRY_ASSERT (lit_char_is_hex_digit (c));\n\n  if (c >= LIT_CHAR_ASCII_DIGITS_BEGIN && c <= LIT_CHAR_ASCII_DIGITS_END)\n  {\n    return (uint32_t) (c - LIT_CHAR_ASCII_DIGITS_BEGIN);\n  }\n  else if (c >= LIT_CHAR_ASCII_LOWERCASE_LETTERS_HEX_BEGIN && c <= LIT_CHAR_ASCII_LOWERCASE_LETTERS_HEX_END)\n  {\n    return (uint32_t) (c - LIT_CHAR_ASCII_LOWERCASE_LETTERS_HEX_BEGIN + 10);\n  }\n  else\n  {\n    return (uint32_t) (c - LIT_CHAR_ASCII_UPPERCASE_LETTERS_HEX_BEGIN + 10);\n  }\n} /* lit_char_hex_to_int */\n\n/**\n * Converts a character to UTF8 bytes.\n *\n * @return length of the UTF8 representation.\n */\nsize_t\nlit_code_point_to_cesu8_bytes (uint8_t *dst_p, /**< destination buffer */\n                               lit_code_point_t code_point) /**< code point */\n{\n  if (code_point < LIT_UTF8_2_BYTE_CODE_POINT_MIN)\n  {\n    /* 00000000 0xxxxxxx -> 0xxxxxxx */\n    dst_p[0] = (uint8_t) code_point;\n    return 1;\n  }\n\n  if (code_point < LIT_UTF8_3_BYTE_CODE_POINT_MIN)\n  {\n    /* 00000yyy yyxxxxxx -> 110yyyyy 10xxxxxx */\n    dst_p[0] = (uint8_t) (LIT_UTF8_2_BYTE_MARKER | ((code_point >> 6) & LIT_UTF8_LAST_5_BITS_MASK));\n    dst_p[1] = (uint8_t) (LIT_UTF8_EXTRA_BYTE_MARKER | (code_point & LIT_UTF8_LAST_6_BITS_MASK));\n    return 2;\n  }\n\n  if (code_point < LIT_UTF8_4_BYTE_CODE_POINT_MIN)\n  {\n    /* zzzzyyyy yyxxxxxx -> 1110zzzz 10yyyyyy 10xxxxxx */\n    dst_p[0] = (uint8_t) (LIT_UTF8_3_BYTE_MARKER | ((code_point >> 12) & LIT_UTF8_LAST_4_BITS_MASK));\n    dst_p[1] = (uint8_t) (LIT_UTF8_EXTRA_BYTE_MARKER | ((code_point >> 6) & LIT_UTF8_LAST_6_BITS_MASK));\n    dst_p[2] = (uint8_t) (LIT_UTF8_EXTRA_BYTE_MARKER | (code_point & LIT_UTF8_LAST_6_BITS_MASK));\n    return 3;\n  }\n\n  JERRY_ASSERT (code_point <= LIT_UNICODE_CODE_POINT_MAX);\n\n  code_point -= LIT_UTF8_4_BYTE_CODE_POINT_MIN;\n\n  dst_p[0] = (uint8_t) (LIT_UTF8_3_BYTE_MARKER | 0xd);\n  dst_p[1] = (uint8_t) (LIT_UTF8_EXTRA_BYTE_MARKER | 0x20 | ((code_point >> 16) & LIT_UTF8_LAST_4_BITS_MASK));\n  dst_p[2] = (uint8_t) (LIT_UTF8_EXTRA_BYTE_MARKER | ((code_point >> 10) & LIT_UTF8_LAST_6_BITS_MASK));\n\n  dst_p[3] = (uint8_t) (LIT_UTF8_3_BYTE_MARKER | 0xd);\n  dst_p[4] = (uint8_t) (LIT_UTF8_EXTRA_BYTE_MARKER | 0x30 | ((code_point >> 6) & LIT_UTF8_LAST_4_BITS_MASK));\n  dst_p[5] = (uint8_t) (LIT_UTF8_EXTRA_BYTE_MARKER | (code_point & LIT_UTF8_LAST_6_BITS_MASK));\n\n  return 3 * 2;\n} /* lit_code_point_to_cesu8_bytes */\n\n/**\n * Returns the length of the UTF8 representation of a character.\n *\n * @return length of the UTF8 representation.\n */\nsize_t\nlit_code_point_get_cesu8_length (lit_code_point_t code_point) /**< code point */\n{\n  if (code_point < LIT_UTF8_2_BYTE_CODE_POINT_MIN)\n  {\n    /* 00000000 0xxxxxxx */\n    return 1;\n  }\n\n  if (code_point < LIT_UTF8_3_BYTE_CODE_POINT_MIN)\n  {\n    /* 00000yyy yyxxxxxx */\n    return 2;\n  }\n\n  if (code_point < LIT_UTF8_4_BYTE_CODE_POINT_MIN)\n  {\n    /* zzzzyyyy yyxxxxxx */\n    return 3;\n  }\n\n  /* high + low surrogate */\n  return 2 * 3;\n} /* lit_code_point_get_cesu8_length */\n\n/**\n * Convert a four byte long utf8 character to two three byte long cesu8 characters\n */\nvoid\nlit_four_byte_utf8_char_to_cesu8 (uint8_t *dst_p, /**< destination buffer */\n                                  const uint8_t *source_p) /**< source buffer */\n{\n  lit_code_point_t code_point = ((((uint32_t) source_p[0]) & LIT_UTF8_LAST_3_BITS_MASK) << 18);\n  code_point |= ((((uint32_t) source_p[1]) & LIT_UTF8_LAST_6_BITS_MASK) << 12);\n  code_point |= ((((uint32_t) source_p[2]) & LIT_UTF8_LAST_6_BITS_MASK) << 6);\n  code_point |= (((uint32_t) source_p[3]) & LIT_UTF8_LAST_6_BITS_MASK);\n\n  lit_code_point_to_cesu8_bytes (dst_p, code_point);\n} /* lit_four_byte_utf8_char_to_cesu8 */\n\n/**\n * Lookup hex digits in a buffer\n *\n * @return UINT32_MAX - if next 'lookup' number of characters do not form a valid hex number\n *         value of hex number, otherwise\n */\nuint32_t\nlit_char_hex_lookup (const lit_utf8_byte_t *buf_p, /**< buffer */\n                     const lit_utf8_byte_t *const buf_end_p, /**< buffer end */\n                     uint32_t lookup) /**< size of lookup */\n{\n  JERRY_ASSERT (lookup <= 4);\n\n  if (JERRY_UNLIKELY (buf_p + lookup > buf_end_p))\n  {\n    return UINT32_MAX;\n  }\n\n  uint32_t value = 0;\n\n  while (lookup--)\n  {\n    lit_utf8_byte_t ch = *buf_p++;\n    if (!lit_char_is_hex_digit (ch))\n    {\n      return UINT32_MAX;\n    }\n\n    value <<= 4;\n    value += lit_char_hex_to_int (ch);\n  }\n\n  JERRY_ASSERT (value <= LIT_UTF16_CODE_UNIT_MAX);\n  return value;\n} /* lit_char_hex_lookup */\n\n/**\n * Parse a decimal number with the value clamped to UINT32_MAX.\n *\n * @returns uint32_t number\n */\nuint32_t\nlit_parse_decimal (const lit_utf8_byte_t **buffer_p, /**< [in/out] character buffer */\n                   const lit_utf8_byte_t *buffer_end_p) /**< buffer end */\n{\n  const lit_utf8_byte_t *current_p = *buffer_p;\n  JERRY_ASSERT (lit_char_is_decimal_digit (*current_p));\n\n  uint32_t value = (uint32_t) (*current_p++ - LIT_CHAR_0);\n\n  while (current_p < buffer_end_p && lit_char_is_decimal_digit (*current_p))\n  {\n    const uint32_t digit = (uint32_t) (*current_p++ - LIT_CHAR_0);\n    uint32_t new_value = value * 10 + digit;\n\n    if (JERRY_UNLIKELY (value > UINT32_MAX / 10) || JERRY_UNLIKELY (new_value < value))\n    {\n      value = UINT32_MAX;\n      continue;\n    }\n\n    value = new_value;\n  }\n\n  *buffer_p = current_p;\n  return value;\n} /* lit_parse_decimal */\n\n/**\n * Check if specified character is a word character (part of IsWordChar abstract operation)\n *\n * See also: ECMA-262 v5, 15.10.2.6 (IsWordChar)\n *\n * @return true - if the character is a word character\n *         false - otherwise\n */\nbool\nlit_char_is_word_char (lit_code_point_t c) /**< code point */\n{\n  return ((c >= LIT_CHAR_ASCII_LOWERCASE_LETTERS_BEGIN && c <= LIT_CHAR_ASCII_LOWERCASE_LETTERS_END)\n          || (c >= LIT_CHAR_ASCII_UPPERCASE_LETTERS_BEGIN && c <= LIT_CHAR_ASCII_UPPERCASE_LETTERS_END)\n          || (c >= LIT_CHAR_ASCII_DIGITS_BEGIN && c <= LIT_CHAR_ASCII_DIGITS_END)\n          || c == LIT_CHAR_UNDERSCORE);\n} /* lit_char_is_word_char */\n\n#if ENABLED (JERRY_UNICODE_CASE_CONVERSION)\n\n/**\n * Check if the specified character is in one of those tables which contain bidirectional conversions.\n *\n * @return codepoint of the converted character if it is found the the tables\n *         LIT_INVALID_CP - otherwise.\n */\nstatic lit_code_point_t\nlit_search_in_bidirectional_conversion_tables (lit_code_point_t cp,   /**< code point */\n                                               bool is_lowercase)     /**< is lowercase conversion */\n{\n  /* 1, Check if the specified character is part of the lit_unicode_character_case_ranges_{sup} table. */\n  int number_of_case_ranges;\n#if ENABLED (JERRY_ESNEXT)\n  bool is_supplementary = cp > LIT_UTF16_CODE_UNIT_MAX;\n  if (is_supplementary)\n  {\n    number_of_case_ranges = NUM_OF_ELEMENTS (lit_unicode_character_case_ranges_sup);\n  }\n  else\n#endif /* ENABLED (JERRY_ESNEXT) */\n  {\n    number_of_case_ranges = NUM_OF_ELEMENTS (lit_unicode_character_case_ranges);\n  }\n\n  int conv_counter = 0;\n\n  for (int i = 0; i < number_of_case_ranges; i++)\n  {\n    if (i % 2 == 0 && i > 0)\n    {\n      conv_counter++;\n    }\n\n    size_t range_length;\n    lit_code_point_t start_point;\n#if ENABLED (JERRY_ESNEXT)\n    if (is_supplementary)\n    {\n      range_length = lit_unicode_character_case_range_lengths_sup[conv_counter];\n      start_point = lit_unicode_character_case_ranges_sup[i];\n    }\n    else\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n      range_length = lit_unicode_character_case_range_lengths[conv_counter];\n      start_point = lit_unicode_character_case_ranges[i];\n    }\n\n    if (start_point > cp || cp >= start_point + range_length)\n    {\n      continue;\n    }\n\n    uint32_t char_dist = (uint32_t) cp - start_point;\n    int offset;\n    if (i % 2 == 0)\n    {\n      if (!is_lowercase)\n      {\n        return cp;\n      }\n\n      offset = i + 1;\n    }\n    else\n    {\n      if (is_lowercase)\n      {\n        return cp;\n      }\n\n      offset = i - 1;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (is_supplementary)\n    {\n      start_point = lit_unicode_character_case_ranges_sup[offset];\n    }\n    else\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n      start_point = lit_unicode_character_case_ranges[offset];\n    }\n\n    return (lit_code_point_t) (start_point + char_dist);\n  }\n\n  /* Note: After this point based on the latest unicode standard(13.0.0.6) no conversion characters are\n     defined for supplementary planes */\n#if ENABLED (JERRY_ESNEXT)\n  if (is_supplementary)\n  {\n    return cp;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* 2, Check if the specified character is part of the character_pair_ranges table. */\n  int bottom = 0;\n  int top = NUM_OF_ELEMENTS (lit_unicode_character_pair_ranges) - 1;\n\n  while (bottom <= top)\n  {\n    int middle = (bottom + top) / 2;\n    lit_code_point_t current_sp = lit_unicode_character_pair_ranges[middle];\n\n    if (current_sp <= cp && cp < current_sp + lit_unicode_character_pair_range_lengths[middle])\n    {\n      uint32_t char_dist = (uint32_t) (cp - current_sp);\n\n      if ((cp - current_sp) % 2 == 0)\n      {\n        return is_lowercase ? (lit_code_point_t) (current_sp + char_dist + 1) : cp;\n      }\n\n      return is_lowercase ? cp : (lit_code_point_t) (current_sp + char_dist - 1);\n    }\n\n    if (cp > current_sp)\n    {\n      bottom = middle + 1;\n    }\n    else\n    {\n      top = middle - 1;\n    }\n  }\n\n  /* 3, Check if the specified character is part of the character_pairs table. */\n  int number_of_character_pairs = NUM_OF_ELEMENTS (lit_unicode_character_pairs);\n\n  for (int i = 0; i < number_of_character_pairs; i++)\n  {\n    if (cp != lit_unicode_character_pairs[i])\n    {\n      continue;\n    }\n\n    if (i % 2 == 0)\n    {\n      return is_lowercase ? lit_unicode_character_pairs[i + 1] : cp;\n    }\n\n    return is_lowercase ? cp : lit_unicode_character_pairs[i - 1];\n  }\n\n  return LIT_INVALID_CP;\n} /* lit_search_in_bidirectional_conversion_tables */\n\n/**\n * Check if the specified character is in the given conversion table.\n *\n * @return LIT_MULTIPLE_CU if the converted character consist more than a single code unit\n *         converted code point - otherwise\n */\nstatic lit_code_point_t\nlit_search_in_conversion_table (ecma_char_t character,            /**< code unit */\n                                ecma_stringbuilder_t *builder_p,  /**< string builder */\n                                const ecma_char_t *array,         /**< array */\n                                const uint8_t *counters)          /**< case_values counter */\n{\n  int end_point = 0;\n\n  for (int i = 0; i < 3; i++)\n  {\n    int start_point = end_point;\n    int size_of_case_value = i + 1;\n    end_point += counters[i] * (size_of_case_value + 1);\n\n    int bottom = start_point;\n    int top = end_point - size_of_case_value;\n\n    while (bottom <= top)\n    {\n      int middle = (bottom + top) / 2;\n\n      middle -= ((middle - bottom) % (size_of_case_value + 1));\n\n      ecma_char_t current = array[middle];\n\n      if (current == character)\n      {\n        if (builder_p != NULL)\n        {\n          ecma_stringbuilder_append_char (builder_p, array[middle + 1]);\n\n          if (size_of_case_value > 1)\n          {\n            ecma_stringbuilder_append_char (builder_p, array[middle + 2]);\n          }\n          if (size_of_case_value > 2)\n          {\n            ecma_stringbuilder_append_char (builder_p, array[middle + 3]);\n          }\n        }\n\n        return size_of_case_value == 1 ? array[middle + 1]: LIT_MULTIPLE_CU;\n      }\n\n      if (character < current)\n      {\n        top = middle - (size_of_case_value + 1);\n      }\n      else\n      {\n        bottom = middle + (size_of_case_value + 1);\n      }\n    }\n  }\n\n  if (builder_p != NULL)\n  {\n    ecma_stringbuilder_append_char (builder_p, character);\n  }\n\n  return (lit_code_point_t) character;\n} /* lit_search_in_conversion_table */\n#endif /* ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n\n/**\n * Append the converted lowercase codeunit sequence of an a given codepoint into the stringbuilder if it is present.\n *\n * @return LIT_MULTIPLE_CU if the converted codepoint consist more than a single code unit\n *         converted code point - otherwise\n */\nlit_code_point_t\nlit_char_to_lower_case (lit_code_point_t cp, /**< code point */\n                        ecma_stringbuilder_t *builder_p) /**< string builder */\n{\n  if (cp <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n  {\n    if (cp >= LIT_CHAR_UPPERCASE_A && cp <= LIT_CHAR_UPPERCASE_Z)\n    {\n      cp = (lit_utf8_byte_t) (cp + (LIT_CHAR_LOWERCASE_A - LIT_CHAR_UPPERCASE_A));\n    }\n\n    if (builder_p != NULL)\n    {\n      ecma_stringbuilder_append_byte (builder_p, (lit_utf8_byte_t) cp);\n    }\n\n    return cp;\n  }\n\n#if ENABLED (JERRY_UNICODE_CASE_CONVERSION)\n  lit_code_point_t lowercase_cp = lit_search_in_bidirectional_conversion_tables (cp, true);\n\n  if (lowercase_cp != LIT_INVALID_CP)\n  {\n    if (builder_p != NULL)\n    {\n      ecma_stringbuilder_append_codepoint (builder_p, lowercase_cp);\n    }\n\n    return lowercase_cp;\n  }\n\n  JERRY_ASSERT (cp < LIT_UTF8_4_BYTE_CODE_POINT_MIN);\n\n  int num_of_lowercase_ranges = NUM_OF_ELEMENTS (lit_unicode_lower_case_ranges);\n\n  for (int i = 0, j = 0; i < num_of_lowercase_ranges; i += 2, j++)\n  {\n    JERRY_ASSERT (lit_unicode_lower_case_range_lengths[j] > 0);\n    uint32_t range_length = (uint32_t) (lit_unicode_lower_case_range_lengths[j] - 1);\n    lit_code_point_t start_point = lit_unicode_lower_case_ranges[i];\n\n    if (start_point <= cp && cp <= start_point + range_length)\n    {\n      lowercase_cp = lit_unicode_lower_case_ranges[i + 1] + (cp - start_point);\n      if (builder_p != NULL)\n      {\n        ecma_stringbuilder_append_codepoint (builder_p, lowercase_cp);\n      }\n\n      return lowercase_cp;\n    }\n  }\n\n  return lit_search_in_conversion_table ((ecma_char_t) cp,\n                                         builder_p,\n                                         lit_unicode_lower_case_conversions,\n                                         lit_unicode_lower_case_conversion_counters);\n#else /* !ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n  if (builder_p != NULL)\n  {\n    ecma_stringbuilder_append_codepoint (builder_p, cp);\n  }\n\n  return cp;\n#endif /* ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n} /* lit_char_to_lower_case */\n\n/**\n * Append the converted uppercase codeunit sequence of an a given codepoint into the stringbuilder if it is present.\n *\n * @return LIT_MULTIPLE_CU if the converted codepoint consist more than a single code unit\n *         converted code point - otherwise\n */\nlit_code_point_t\nlit_char_to_upper_case (lit_code_point_t cp, /**< code point */\n                        ecma_stringbuilder_t *builder_p) /**< string builder */\n{\n  if (cp <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n  {\n    if (cp >= LIT_CHAR_LOWERCASE_A && cp <= LIT_CHAR_LOWERCASE_Z)\n    {\n      cp = (lit_utf8_byte_t) (cp - (LIT_CHAR_LOWERCASE_A - LIT_CHAR_UPPERCASE_A));\n    }\n\n    if (builder_p != NULL)\n    {\n      ecma_stringbuilder_append_byte (builder_p, (lit_utf8_byte_t) cp);\n    }\n\n    return cp;\n  }\n\n#if ENABLED (JERRY_UNICODE_CASE_CONVERSION)\n  lit_code_point_t uppercase_cp = lit_search_in_bidirectional_conversion_tables (cp, false);\n\n  if (uppercase_cp != LIT_INVALID_CP)\n  {\n    if (builder_p != NULL)\n    {\n      ecma_stringbuilder_append_codepoint (builder_p, uppercase_cp);\n    }\n\n    return uppercase_cp;\n  }\n\n  int num_of_upper_case_special_ranges = NUM_OF_ELEMENTS (lit_unicode_upper_case_special_ranges);\n\n  for (int i = 0, j = 0; i < num_of_upper_case_special_ranges; i += 3, j++)\n  {\n    uint32_t range_length = lit_unicode_upper_case_special_range_lengths[j];\n    ecma_char_t start_point = lit_unicode_upper_case_special_ranges[i];\n\n    if (start_point <= cp && cp <= start_point + range_length)\n    {\n      if (builder_p != NULL)\n      {\n        uppercase_cp = lit_unicode_upper_case_special_ranges[i + 1] + (cp - start_point);\n        ecma_stringbuilder_append_codepoint (builder_p, uppercase_cp);\n        ecma_stringbuilder_append_codepoint (builder_p, lit_unicode_upper_case_special_ranges[i + 2]);\n      }\n\n      return LIT_MULTIPLE_CU;\n    }\n  }\n\n  return lit_search_in_conversion_table ((ecma_char_t) cp,\n                                         builder_p,\n                                         lit_unicode_upper_case_conversions,\n                                         lit_unicode_upper_case_conversion_counters);\n#else /* !ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n  if (builder_p != NULL)\n  {\n    ecma_stringbuilder_append_codepoint (builder_p, cp);\n  }\n\n  return cp;\n#endif /* ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n} /* lit_char_to_upper_case */\n\n#if ENABLED (JERRY_ESNEXT)\n/*\n * Look up whether the character should be folded to the lowercase variant.\n *\n * @return true, if character should be lowercased\n *         false, otherwise\n */\nbool\nlit_char_fold_to_lower (lit_code_point_t cp) /**< code point */\n{\n#if ENABLED (JERRY_UNICODE_CASE_CONVERSION)\n  return (cp <= LIT_UTF8_1_BYTE_CODE_POINT_MAX\n          || cp > LIT_UTF16_CODE_UNIT_MAX\n          || (!lit_search_char_in_interval_array ((ecma_char_t) cp,\n                                                  lit_unicode_folding_skip_to_lower_interval_starts,\n                                                  lit_unicode_folding_skip_to_lower_interval_lengths,\n                                                  NUM_OF_ELEMENTS (lit_unicode_folding_skip_to_lower_interval_starts))\n              && !lit_search_char_in_array ((ecma_char_t) cp,\n                                            lit_unicode_folding_skip_to_lower_chars,\n                                            NUM_OF_ELEMENTS (lit_unicode_folding_skip_to_lower_chars))));\n#else /* !ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n  return true;\n#endif /* ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n} /* lit_char_fold_to_lower */\n\n/*\n * Look up whether the character should be folded to the uppercase variant.\n *\n * @return true, if character should be uppercased\n *         false, otherwise\n */\nbool\nlit_char_fold_to_upper (lit_code_point_t cp) /**< code point */\n{\n#if ENABLED (JERRY_UNICODE_CASE_CONVERSION)\n  return (cp > LIT_UTF8_1_BYTE_CODE_POINT_MAX\n          && cp <= LIT_UTF16_CODE_UNIT_MAX\n          && (lit_search_char_in_interval_array ((ecma_char_t) cp,\n                                                  lit_unicode_folding_to_upper_interval_starts,\n                                                  lit_unicode_folding_to_upper_interval_lengths,\n                                                  NUM_OF_ELEMENTS (lit_unicode_folding_to_upper_interval_starts))\n              || lit_search_char_in_array ((ecma_char_t) cp,\n                                           lit_unicode_folding_to_upper_chars,\n                                           NUM_OF_ELEMENTS (lit_unicode_folding_to_upper_chars))));\n#else /* !ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n  return false;\n#endif /* ENABLED (JERRY_UNICODE_CASE_CONVERSION) */\n} /* lit_char_fold_to_upper */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Helper method to find a specific character in a string\n *\n * Used by:\n *         ecma_builtin_string_prototype_object_replace_helper\n *\n * @return true - if the given character is in the string\n *         false - otherwise\n */\nbool\nlit_find_char_in_string (ecma_string_t *str_p, /**< source string */\n                         lit_utf8_byte_t c) /**< character to find*/\n{\n  ECMA_STRING_TO_UTF8_STRING (str_p, start_p, start_size);\n\n  const lit_utf8_byte_t *str_curr_p = start_p;\n  const lit_utf8_byte_t *str_end_p = start_p + start_size;\n  bool have_char = false;\n\n  while (str_curr_p < str_end_p)\n  {\n    if (*str_curr_p++ == c)\n    {\n      have_char = true;\n      break;\n    }\n  }\n\n  ECMA_FINALIZE_UTF8_STRING (start_p, start_size);\n\n  return have_char;\n} /* lit_find_char_in_string */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-char-helpers.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef LIT_CHAR_HELPERS_H\n#define LIT_CHAR_HELPERS_H\n\n#include \"lit-globals.h\"\n\n/**\n * Invalid character code point\n */\n#define LIT_INVALID_CP 0xFFFFFFFF\n\n/**\n * Result of lit_char_to_lower_case/lit_char_to_upper_case consist more than of a single code unit\n */\n#define LIT_MULTIPLE_CU 0xFFFFFFFE\n\n/*\n * Format control characters (ECMA-262 v5, Table 1)\n */\n#define LIT_CHAR_ZWNJ ((ecma_char_t) 0x200C) /* zero width non-joiner */\n#define LIT_CHAR_ZWJ  ((ecma_char_t) 0x200D) /* zero width joiner */\n#define LIT_CHAR_BOM  ((ecma_char_t) 0xFEFF) /* byte order mark */\n\n/*\n * Whitespace characters (ECMA-262 v5, Table 2)\n */\n#define LIT_CHAR_TAB  ((ecma_char_t) 0x0009) /* tab */\n#define LIT_CHAR_VTAB ((ecma_char_t) 0x000B) /* vertical tab */\n#define LIT_CHAR_FF   ((ecma_char_t) 0x000C) /* form feed */\n#define LIT_CHAR_SP   ((ecma_char_t) 0x0020) /* space */\n#define LIT_CHAR_NBSP ((ecma_char_t) 0x00A0) /* no-break space */\n#define LIT_CHAR_MVS  ((ecma_char_t) 0x180E) /* mongolian vowel separator */\n/* LIT_CHAR_BOM is defined above */\n\nbool lit_char_is_white_space (lit_code_point_t c);\n\n/*\n * Line terminator characters (ECMA-262 v5, Table 3)\n */\n#define LIT_CHAR_LF ((ecma_char_t) 0x000A) /* line feed */\n#define LIT_CHAR_CR ((ecma_char_t) 0x000D) /* carriage return */\n#define LIT_CHAR_LS ((ecma_char_t) 0x2028) /* line separator */\n#define LIT_CHAR_PS ((ecma_char_t) 0x2029) /* paragraph separator */\n\nbool lit_char_is_line_terminator (ecma_char_t c);\n\n/*\n * String Single Character Escape Sequences (ECMA-262 v5, Table 4)\n */\n#define LIT_CHAR_BS           ((ecma_char_t) 0x0008) /* backspace */\n/* LIT_CHAR_TAB is defined above */\n/* LIT_CHAR_LF is defined above */\n/* LIT_CHAR_VTAB is defined above */\n/* LIT_CHAR_FF is defined above */\n/* LIT_CHAR_CR is defined above */\n#define LIT_CHAR_DOUBLE_QUOTE ((ecma_char_t) '\"') /* double quote */\n#define LIT_CHAR_SINGLE_QUOTE ((ecma_char_t) '\\'') /* single quote */\n#define LIT_CHAR_BACKSLASH    ((ecma_char_t) '\\\\') /* reverse solidus (backslash) */\n\n/*\n * Comment characters (ECMA-262 v5, 7.4)\n */\n#define LIT_CHAR_SLASH    ((ecma_char_t) '/') /* solidus */\n#define LIT_CHAR_ASTERISK ((ecma_char_t) '*') /* asterisk */\n\n/*\n * Identifier name characters (ECMA-262 v5, 7.6)\n */\n#define LIT_CHAR_DOLLAR_SIGN ((ecma_char_t) '$')  /* dollar sign */\n#define LIT_CHAR_UNDERSCORE  ((ecma_char_t) '_')  /* low line (underscore) */\n/* LIT_CHAR_BACKSLASH defined above */\n\nbool lit_code_point_is_identifier_start (lit_code_point_t code_point);\nbool lit_code_point_is_identifier_part (lit_code_point_t code_point);\n\n/*\n * Punctuator characters (ECMA-262 v5, 7.7)\n */\n#define LIT_CHAR_LEFT_BRACE   ((ecma_char_t) '{') /* left curly bracket */\n#define LIT_CHAR_RIGHT_BRACE  ((ecma_char_t) '}') /* right curly bracket */\n#define LIT_CHAR_LEFT_PAREN   ((ecma_char_t) '(') /* left parenthesis */\n#define LIT_CHAR_RIGHT_PAREN  ((ecma_char_t) ')') /* right parenthesis */\n#define LIT_CHAR_LEFT_SQUARE  ((ecma_char_t) '[') /* left square bracket */\n#define LIT_CHAR_RIGHT_SQUARE ((ecma_char_t) ']') /* right square bracket */\n#define LIT_CHAR_DOT          ((ecma_char_t) '.') /* dot */\n#define LIT_CHAR_SEMICOLON    ((ecma_char_t) ';') /* semicolon */\n#define LIT_CHAR_COMMA        ((ecma_char_t) ',') /* comma */\n#define LIT_CHAR_LESS_THAN    ((ecma_char_t) '<') /* less-than sign */\n#define LIT_CHAR_GREATER_THAN ((ecma_char_t) '>') /* greater-than sign */\n#define LIT_CHAR_EQUALS       ((ecma_char_t) '=') /* equals sign */\n#define LIT_CHAR_PLUS         ((ecma_char_t) '+') /* plus sign */\n#define LIT_CHAR_MINUS        ((ecma_char_t) '-') /* hyphen-minus */\n/* LIT_CHAR_ASTERISK is defined above */\n#define LIT_CHAR_PERCENT      ((ecma_char_t) '%') /* percent sign */\n#define LIT_CHAR_AMPERSAND    ((ecma_char_t) '&') /* ampersand */\n#define LIT_CHAR_VLINE        ((ecma_char_t) '|') /* vertical line */\n#define LIT_CHAR_CIRCUMFLEX   ((ecma_char_t) '^') /* circumflex accent */\n#define LIT_CHAR_EXCLAMATION  ((ecma_char_t) '!') /* exclamation mark */\n#define LIT_CHAR_TILDE        ((ecma_char_t) '~') /* tilde */\n#define LIT_CHAR_QUESTION     ((ecma_char_t) '?') /* question mark */\n#define LIT_CHAR_COLON        ((ecma_char_t) ':') /* colon */\n\n/*\n * Special characters for String.prototype.replace.\n */\n#define LIT_CHAR_GRAVE_ACCENT ((ecma_char_t) '`') /* grave accent */\n\n/**\n * Uppercase ASCII letters\n */\n#define LIT_CHAR_UPPERCASE_A ((ecma_char_t) 'A')\n#define LIT_CHAR_UPPERCASE_B ((ecma_char_t) 'B')\n#define LIT_CHAR_UPPERCASE_C ((ecma_char_t) 'C')\n#define LIT_CHAR_UPPERCASE_D ((ecma_char_t) 'D')\n#define LIT_CHAR_UPPERCASE_E ((ecma_char_t) 'E')\n#define LIT_CHAR_UPPERCASE_F ((ecma_char_t) 'F')\n#define LIT_CHAR_UPPERCASE_G ((ecma_char_t) 'G')\n#define LIT_CHAR_UPPERCASE_H ((ecma_char_t) 'H')\n#define LIT_CHAR_UPPERCASE_I ((ecma_char_t) 'I')\n#define LIT_CHAR_UPPERCASE_J ((ecma_char_t) 'J')\n#define LIT_CHAR_UPPERCASE_K ((ecma_char_t) 'K')\n#define LIT_CHAR_UPPERCASE_L ((ecma_char_t) 'L')\n#define LIT_CHAR_UPPERCASE_M ((ecma_char_t) 'M')\n#define LIT_CHAR_UPPERCASE_N ((ecma_char_t) 'N')\n#define LIT_CHAR_UPPERCASE_O ((ecma_char_t) 'O')\n#define LIT_CHAR_UPPERCASE_P ((ecma_char_t) 'P')\n#define LIT_CHAR_UPPERCASE_Q ((ecma_char_t) 'Q')\n#define LIT_CHAR_UPPERCASE_R ((ecma_char_t) 'R')\n#define LIT_CHAR_UPPERCASE_S ((ecma_char_t) 'S')\n#define LIT_CHAR_UPPERCASE_T ((ecma_char_t) 'T')\n#define LIT_CHAR_UPPERCASE_U ((ecma_char_t) 'U')\n#define LIT_CHAR_UPPERCASE_V ((ecma_char_t) 'V')\n#define LIT_CHAR_UPPERCASE_W ((ecma_char_t) 'W')\n#define LIT_CHAR_UPPERCASE_X ((ecma_char_t) 'X')\n#define LIT_CHAR_UPPERCASE_Y ((ecma_char_t) 'Y')\n#define LIT_CHAR_UPPERCASE_Z ((ecma_char_t) 'Z')\n\n/**\n * Lowercase ASCII letters\n */\n#define LIT_CHAR_LOWERCASE_A ((ecma_char_t) 'a')\n#define LIT_CHAR_LOWERCASE_B ((ecma_char_t) 'b')\n#define LIT_CHAR_LOWERCASE_C ((ecma_char_t) 'c')\n#define LIT_CHAR_LOWERCASE_D ((ecma_char_t) 'd')\n#define LIT_CHAR_LOWERCASE_E ((ecma_char_t) 'e')\n#define LIT_CHAR_LOWERCASE_F ((ecma_char_t) 'f')\n#define LIT_CHAR_LOWERCASE_G ((ecma_char_t) 'g')\n#define LIT_CHAR_LOWERCASE_H ((ecma_char_t) 'h')\n#define LIT_CHAR_LOWERCASE_I ((ecma_char_t) 'i')\n#define LIT_CHAR_LOWERCASE_J ((ecma_char_t) 'j')\n#define LIT_CHAR_LOWERCASE_K ((ecma_char_t) 'k')\n#define LIT_CHAR_LOWERCASE_L ((ecma_char_t) 'l')\n#define LIT_CHAR_LOWERCASE_M ((ecma_char_t) 'm')\n#define LIT_CHAR_LOWERCASE_N ((ecma_char_t) 'n')\n#define LIT_CHAR_LOWERCASE_O ((ecma_char_t) 'o')\n#define LIT_CHAR_LOWERCASE_P ((ecma_char_t) 'p')\n#define LIT_CHAR_LOWERCASE_Q ((ecma_char_t) 'q')\n#define LIT_CHAR_LOWERCASE_R ((ecma_char_t) 'r')\n#define LIT_CHAR_LOWERCASE_S ((ecma_char_t) 's')\n#define LIT_CHAR_LOWERCASE_T ((ecma_char_t) 't')\n#define LIT_CHAR_LOWERCASE_U ((ecma_char_t) 'u')\n#define LIT_CHAR_LOWERCASE_V ((ecma_char_t) 'v')\n#define LIT_CHAR_LOWERCASE_W ((ecma_char_t) 'w')\n#define LIT_CHAR_LOWERCASE_X ((ecma_char_t) 'x')\n#define LIT_CHAR_LOWERCASE_Y ((ecma_char_t) 'y')\n#define LIT_CHAR_LOWERCASE_Z ((ecma_char_t) 'z')\n\n/**\n * ASCII decimal digits\n */\n#define LIT_CHAR_0    ((ecma_char_t) '0')\n#define LIT_CHAR_1    ((ecma_char_t) '1')\n#define LIT_CHAR_2    ((ecma_char_t) '2')\n#define LIT_CHAR_3    ((ecma_char_t) '3')\n#define LIT_CHAR_4    ((ecma_char_t) '4')\n#define LIT_CHAR_5    ((ecma_char_t) '5')\n#define LIT_CHAR_6    ((ecma_char_t) '6')\n#define LIT_CHAR_7    ((ecma_char_t) '7')\n#define LIT_CHAR_8    ((ecma_char_t) '8')\n#define LIT_CHAR_9    ((ecma_char_t) '9')\n\n/**\n * ASCII character ranges\n */\n#define LIT_CHAR_ASCII_UPPERCASE_LETTERS_BEGIN      LIT_CHAR_UPPERCASE_A /* uppercase letters range */\n#define LIT_CHAR_ASCII_UPPERCASE_LETTERS_END        LIT_CHAR_UPPERCASE_Z\n\n#define LIT_CHAR_ASCII_LOWERCASE_LETTERS_BEGIN      LIT_CHAR_LOWERCASE_A /* lowercase letters range */\n#define LIT_CHAR_ASCII_LOWERCASE_LETTERS_END        LIT_CHAR_LOWERCASE_Z\n\n#define LIT_CHAR_ASCII_UPPERCASE_LETTERS_HEX_BEGIN  LIT_CHAR_UPPERCASE_A /* uppercase letters for\n                                                                          * hexadecimal digits range */\n#define LIT_CHAR_ASCII_UPPERCASE_LETTERS_HEX_END    LIT_CHAR_UPPERCASE_F\n\n#define LIT_CHAR_ASCII_LOWERCASE_LETTERS_HEX_BEGIN  LIT_CHAR_LOWERCASE_A /* lowercase letters for\n                                                                          * hexadecimal digits range */\n#define LIT_CHAR_ASCII_LOWERCASE_LETTERS_HEX_END    LIT_CHAR_LOWERCASE_F\n\n#define LIT_CHAR_ASCII_OCTAL_DIGITS_BEGIN           LIT_CHAR_0           /* octal digits range */\n#define LIT_CHAR_ASCII_OCTAL_DIGITS_END             LIT_CHAR_7\n\n#define LIT_CHAR_ASCII_DIGITS_BEGIN                 LIT_CHAR_0           /* decimal digits range */\n#define LIT_CHAR_ASCII_DIGITS_END                   LIT_CHAR_9\n\n#define LEXER_TO_ASCII_LOWERCASE(character) ((character) | LIT_CHAR_SP)\n\nbool lit_char_is_octal_digit (ecma_char_t c);\nbool lit_char_is_decimal_digit (ecma_char_t c);\nbool lit_char_is_hex_digit (ecma_char_t c);\n#if ENABLED (JERRY_ESNEXT)\nbool lit_char_is_binary_digit (ecma_char_t c);\n#endif /* ENABLED (JERRY_ESNEXT) */\nvoid lit_char_unicode_escape (ecma_stringbuilder_t *builder_p, ecma_char_t c);\nuint32_t lit_char_hex_to_int (ecma_char_t c);\nsize_t lit_code_point_to_cesu8_bytes (uint8_t *dst_p, lit_code_point_t code_point);\nsize_t lit_code_point_get_cesu8_length (lit_code_point_t code_point);\nvoid lit_four_byte_utf8_char_to_cesu8 (uint8_t *dst_p, const uint8_t *source_p);\nuint32_t lit_char_hex_lookup (const lit_utf8_byte_t *buf_p, const lit_utf8_byte_t *const buf_end_p, uint32_t lookup);\nuint32_t lit_parse_decimal (const lit_utf8_byte_t **buffer_p, const lit_utf8_byte_t *const buffer_end_p);\nbool lit_find_char_in_string (ecma_string_t *str_p, lit_utf8_byte_t c);\n\n/**\n * Null character\n */\n#define LIT_CHAR_NULL  ((ecma_char_t) '\\0')\n\n/*\n * Part of IsWordChar abstract operation (ECMA-262 v5, 15.10.2.6, step 3)\n */\nbool lit_char_is_word_char (lit_code_point_t c);\n\n/*\n * Utility functions for uppercasing / lowercasing\n */\n\nlit_code_point_t lit_char_to_lower_case (lit_code_point_t cp, ecma_stringbuilder_t *builder_p);\nlit_code_point_t lit_char_to_upper_case (lit_code_point_t cp, ecma_stringbuilder_t *builder_p);\n\n#if ENABLED (JERRY_ESNEXT)\nbool lit_char_fold_to_lower (lit_code_point_t cp);\nbool lit_char_fold_to_upper (lit_code_point_t cp);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* !LIT_CHAR_HELPERS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-globals.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef LIT_GLOBALS_H\n#define LIT_GLOBALS_H\n\n#include \"jrt.h\"\n\n/**\n * ECMAScript standard defines terms \"code unit\" and \"character\" as 16-bit unsigned value\n * used to represent 16-bit unit of text, this is the same as code unit in UTF-16 (See ECMA-262 5.1 Chapter 6).\n *\n * The term \"code point\" or \"Unicode character\" is used to refer a single Unicode scalar value (may be longer\n * than 16 bits: 0x0 - 0x10FFFFF). One code point could be represented with one ore two 16-bit code units.\n *\n * According to the standard all strings and source text are assumed to be a sequence of code units.\n * Length of a string equals to number of code units in the string, which is not the same as number of Unicode\n * characters in a string.\n *\n * Internally JerryScript engine uses UTF-8 representation of strings to reduce memory overhead. Unicode character\n * occupies from one to four bytes in UTF-8 representation.\n *\n * Unicode scalar value   | Bytes in UTF-8             | Bytes in UTF-16\n *                        | (internal representation)  |\n * ----------------------------------------------------------------------\n *  0x0     - 0x7F        |  1 byte                    |  2 bytes\n *  0x80    - 0x7FF       |  2 bytes                   |  2 bytes\n *  0x800   - 0xFFFF      |  3 bytes                   |  2 bytes\n *  0x10000 - 0x10FFFF    |  4 bytes                   |  4 bytes\n *\n * Scalar values from 0xD800 to 0xDFFF are permanently reserved by Unicode standard to encode high and low\n * surrogates in UTF-16 (Code points 0x10000 - 0x10FFFF are encoded via pair of surrogates in UTF-16).\n * Despite that the official Unicode standard says that no UTF forms can encode these code points, we allow\n * them to be encoded inside strings. The reason for that is compatibility with ECMA standard.\n *\n * For example, assume a string which consists one Unicode character: 0x1D700 (Mathematical Italic Small Epsilon).\n * It has the following representation in UTF-16: 0xD835 0xDF00.\n *\n * ECMA standard allows extracting a substring from this string:\n * > var str = String.fromCharCode (0xD835, 0xDF00); // Create a string containing one character: 0x1D700\n * > str.length; // 2\n * > var str1 = str.substring (0, 1);\n * > str1.length; // 1\n * > str1.charCodeAt (0); // 55349 (this equals to 0xD835)\n *\n * Internally original string would be represented in UTF-8 as the following byte sequence: 0xF0 0x9D 0x9C 0x80.\n * After substring extraction high surrogate 0xD835 should be encoded via UTF-8: 0xED 0xA0 0xB5.\n *\n * Pair of low and high surrogates encoded separately should never occur in internal string representation,\n * it should be encoded as any code point and occupy 4 bytes. So, when constructing a string from two surrogates,\n * it should be processed gracefully;\n * > var str1 = String.fromCharCode (0xD835); // 0xED 0xA0 0xB5 - internal representation\n * > var str2 = String.fromCharCode (0xDF00); // 0xED 0xBC 0x80 - internal representation\n * > var str = str1 + str2; // 0xF0 0x9D 0x9C 0x80 - internal representation,\n *                          // !!! not 0xED 0xA0 0xB5 0xED 0xBC 0x80\n */\n\n/**\n * Description of an ecma-character, which represents 16-bit code unit,\n * which is equal to UTF-16 character (see Chapter 6 from ECMA-262 5.1)\n */\ntypedef uint16_t ecma_char_t;\n\n/**\n * Max bytes needed to represent a code unit (utf-16 char) via utf-8 encoding\n */\n#define LIT_UTF8_MAX_BYTES_IN_CODE_UNIT (3)\n\n/**\n * Max bytes needed to represent a code point (Unicode character) via utf-8 encoding\n */\n#define LIT_UTF8_MAX_BYTES_IN_CODE_POINT (4)\n\n/**\n * Max bytes needed to represent a code unit (utf-16 char) via cesu-8 encoding\n */\n#define LIT_CESU8_MAX_BYTES_IN_CODE_UNIT (3)\n\n/**\n * Max bytes needed to represent a code point (Unicode character) via cesu-8 encoding\n */\n#define LIT_CESU8_MAX_BYTES_IN_CODE_POINT (6)\n\n/**\n * A byte of utf-8 string\n */\ntypedef uint8_t lit_utf8_byte_t;\n\n/**\n * Size of a utf-8 string in bytes\n */\ntypedef uint32_t lit_utf8_size_t;\n\n/**\n * Size of a magic string in bytes\n */\ntypedef uint8_t lit_magic_size_t;\n\n/**\n * Unicode code point\n */\ntypedef uint32_t lit_code_point_t;\n\n/**\n * ECMA string hash\n */\ntypedef uint32_t lit_string_hash_t;\n\n#endif /* !LIT_GLOBALS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-magic-strings.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jcontext.h\"\n#include \"lit-magic-strings.h\"\n#include \"lit-strings.h\"\n\n/**\n * Maximum number of external magic strings that can be registered.\n */\n#define LIT_EXTERNAL_MAGIC_STRING_LIMIT (UINT32_MAX / 2)\n\n/**\n * Get number of external magic strings\n *\n * @return number of the strings, if there were registered,\n *         zero - otherwise.\n */\nextern inline uint32_t JERRY_ATTR_ALWAYS_INLINE\nlit_get_magic_string_ex_count (void)\n{\n  return JERRY_CONTEXT (lit_magic_string_ex_count);\n} /* lit_get_magic_string_ex_count */\n\n/**\n * Get specified magic string as zero-terminated string\n *\n * @return pointer to zero-terminated magic string\n */\nconst lit_utf8_byte_t *\nlit_get_magic_string_utf8 (uint32_t id) /**< magic string id */\n{\n  static const lit_utf8_byte_t * const lit_magic_strings[] JERRY_ATTR_CONST_DATA =\n  {\n/** @cond doxygen_suppress */\n#define LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE(size, id)\n#define LIT_MAGIC_STRING_DEF(id, utf8_string) \\\n    (const lit_utf8_byte_t *) utf8_string,\n#include \"lit-magic-strings.inc.h\"\n#undef LIT_MAGIC_STRING_DEF\n#undef LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE\n/** @endcond */\n  };\n\n  JERRY_ASSERT (id < LIT_NON_INTERNAL_MAGIC_STRING__COUNT);\n\n  return lit_magic_strings[id];\n} /* lit_get_magic_string_utf8 */\n\n/**\n * Get size of specified magic string\n *\n * @return size in bytes\n */\nlit_utf8_size_t\nlit_get_magic_string_size (uint32_t id) /**< magic string id */\n{\n  static const lit_magic_size_t lit_magic_string_sizes[] JERRY_ATTR_CONST_DATA =\n  {\n/** @cond doxygen_suppress */\n#define LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE(size, id)\n#define LIT_MAGIC_STRING_DEF(id, utf8_string) \\\n    sizeof(utf8_string) - 1,\n#include \"lit-magic-strings.inc.h\"\n#undef LIT_MAGIC_STRING_DEF\n#undef LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE\n/** @endcond */\n  };\n\n  JERRY_ASSERT (id < LIT_NON_INTERNAL_MAGIC_STRING__COUNT);\n\n  return lit_magic_string_sizes[id];\n} /* lit_get_magic_string_size */\n\n/**\n * Get the block start element with the given size from\n * the list of ECMA and implementation-defined magic string constants\n *\n * @return magic string id\n */\nstatic lit_magic_string_id_t\nlit_get_magic_string_size_block_start (lit_utf8_size_t size) /**< magic string size */\n{\n  static const lit_magic_string_id_t lit_magic_string_size_block_starts[] JERRY_ATTR_CONST_DATA =\n  {\n/** @cond doxygen_suppress */\n#define LIT_MAGIC_STRING_DEF(id, utf8_string)\n#define LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE(size, id) \\\n    id,\n#include \"lit-magic-strings.inc.h\"\n    LIT_NON_INTERNAL_MAGIC_STRING__COUNT\n#undef LIT_MAGIC_STRING_DEF\n#undef LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE\n/** @endcond */\n  };\n\n  JERRY_ASSERT (size <= (sizeof (lit_magic_string_size_block_starts) / sizeof (lit_magic_string_id_t)));\n\n  return lit_magic_string_size_block_starts[size];\n} /* lit_get_magic_string_size_block_start */\n\n/**\n * Get specified magic string as zero-terminated string from external table\n *\n * @return pointer to zero-terminated magic string\n */\nconst lit_utf8_byte_t *\nlit_get_magic_string_ex_utf8 (uint32_t id) /**< extern magic string id */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (lit_magic_string_ex_array) && id < JERRY_CONTEXT (lit_magic_string_ex_count));\n\n  return JERRY_CONTEXT (lit_magic_string_ex_array)[id];\n} /* lit_get_magic_string_ex_utf8 */\n\n/**\n * Get size of specified external magic string\n *\n * @return size in bytes\n */\nlit_utf8_size_t\nlit_get_magic_string_ex_size (uint32_t id) /**< external magic string id */\n{\n  return JERRY_CONTEXT (lit_magic_string_ex_sizes)[id];\n} /* lit_get_magic_string_ex_size */\n\n/**\n * Register external magic strings\n */\nvoid\nlit_magic_strings_ex_set (const lit_utf8_byte_t * const *ex_str_items, /**< character arrays, representing\n                                                                        *   external magic strings' contents */\n                          uint32_t count,                       /**< number of the strings */\n                          const lit_utf8_size_t *ex_str_sizes)  /**< sizes of the strings */\n{\n  JERRY_ASSERT (ex_str_items != NULL);\n  JERRY_ASSERT (count > 0);\n  JERRY_ASSERT (ex_str_sizes != NULL);\n\n  JERRY_ASSERT (JERRY_CONTEXT (lit_magic_string_ex_array) == NULL);\n  JERRY_ASSERT (JERRY_CONTEXT (lit_magic_string_ex_count) == 0);\n  JERRY_ASSERT (JERRY_CONTEXT (lit_magic_string_ex_sizes) == NULL);\n\n  /* Limit the number of external magic strings */\n  if (count > LIT_EXTERNAL_MAGIC_STRING_LIMIT)\n  {\n    count = LIT_EXTERNAL_MAGIC_STRING_LIMIT;\n  }\n\n  /* Set external magic strings information */\n  JERRY_CONTEXT (lit_magic_string_ex_array) = ex_str_items;\n  JERRY_CONTEXT (lit_magic_string_ex_count) = count;\n  JERRY_CONTEXT (lit_magic_string_ex_sizes) = ex_str_sizes;\n\n#ifndef JERRY_NDEBUG\n  for (lit_magic_string_ex_id_t id = (lit_magic_string_ex_id_t) 0;\n       id < JERRY_CONTEXT (lit_magic_string_ex_count);\n       id = (lit_magic_string_ex_id_t) (id + 1))\n  {\n    lit_utf8_size_t string_size = JERRY_CONTEXT (lit_magic_string_ex_sizes)[id];\n\n    /**\n     * Check whether the strings are sorted by size and lexicographically,\n     * e.g., \"Bb\" < \"aa\" < \"aaa\" < \"xyz0\".\n     */\n    if (id > 0)\n    {\n      const lit_magic_string_ex_id_t prev_id = id - 1;\n      const lit_utf8_size_t prev_string_size = lit_get_magic_string_ex_size (prev_id);\n      JERRY_ASSERT (lit_is_valid_cesu8_string (lit_get_magic_string_ex_utf8 (id),\n                                               string_size));\n      JERRY_ASSERT (prev_string_size <= string_size);\n\n      if (prev_string_size == string_size)\n      {\n        const lit_utf8_byte_t *prev_ex_string_p = lit_get_magic_string_ex_utf8 (prev_id);\n        const lit_utf8_byte_t *curr_ex_string_p = lit_get_magic_string_ex_utf8 (id);\n        JERRY_ASSERT (memcmp (prev_ex_string_p, curr_ex_string_p, string_size) < 0);\n      }\n    }\n  }\n#endif /* !JERRY_NDEBUG */\n} /* lit_magic_strings_ex_set */\n\n/**\n * Returns the magic string id of the argument string if it is available.\n *\n * @return id - if magic string id is found,\n *         LIT_MAGIC_STRING__COUNT - otherwise.\n */\nlit_magic_string_id_t\nlit_is_utf8_string_magic (const lit_utf8_byte_t *string_p, /**< utf-8 string */\n                          lit_utf8_size_t string_size) /**< string size in bytes */\n{\n  if (string_size > lit_get_magic_string_size (LIT_NON_INTERNAL_MAGIC_STRING__COUNT - 1))\n  {\n    return LIT_MAGIC_STRING__COUNT;\n  }\n\n  /**< The string must be in this id range. */\n  lit_utf8_size_t first = lit_get_magic_string_size_block_start (string_size);\n  lit_utf8_size_t last = lit_get_magic_string_size_block_start (string_size + 1);\n\n  while (first < last)\n  {\n    lit_utf8_size_t middle = ((first + last) / 2); /**< mid point of search */\n    int compare = memcmp (lit_get_magic_string_utf8 ((lit_magic_string_id_t) middle), string_p, string_size);\n\n    if (compare == 0)\n    {\n      return (lit_magic_string_id_t) middle;\n    }\n    else if (compare > 0)\n    {\n      last = middle;\n    }\n    else\n    {\n      first = middle + 1;\n    }\n  }\n\n  return LIT_MAGIC_STRING__COUNT;\n} /* lit_is_utf8_string_magic */\n\n/**\n * Returns the magic string id of the argument string pair if it is available.\n *\n * @return id - if magic string id is found,\n *         LIT_MAGIC_STRING__COUNT - otherwise.\n */\nlit_magic_string_id_t\nlit_is_utf8_string_pair_magic (const lit_utf8_byte_t *string1_p, /**< first utf-8 string */\n                               lit_utf8_size_t string1_size, /**< first string size in bytes */\n                               const lit_utf8_byte_t *string2_p, /**< second utf-8 string */\n                               lit_utf8_size_t string2_size) /**< second string size in bytes */\n{\n  lit_utf8_size_t total_string_size = string1_size + string2_size;\n\n  if (total_string_size > lit_get_magic_string_size (LIT_NON_INTERNAL_MAGIC_STRING__COUNT - 1))\n  {\n    return LIT_MAGIC_STRING__COUNT;\n  }\n\n  /**< The string must be in this id range. */\n  lit_utf8_size_t first = lit_get_magic_string_size_block_start (total_string_size);\n  lit_utf8_size_t last = lit_get_magic_string_size_block_start (total_string_size + 1);\n\n  while (first < last)\n  {\n    lit_utf8_size_t middle = ((first + last) / 2); /**< mid point of search */\n    const lit_utf8_byte_t *middle_string_p = lit_get_magic_string_utf8 ((lit_magic_string_id_t) middle);\n\n    int compare = memcmp (middle_string_p, string1_p, string1_size);\n\n    if (compare == 0)\n    {\n      compare = memcmp (middle_string_p + string1_size, string2_p, string2_size);\n    }\n\n    if (compare == 0)\n    {\n      return (lit_magic_string_id_t) middle;\n    }\n    else if (compare > 0)\n    {\n      last = middle;\n    }\n    else\n    {\n      first = middle + 1;\n    }\n  }\n\n  return LIT_MAGIC_STRING__COUNT;\n} /* lit_is_utf8_string_pair_magic */\n\n/**\n * Returns the ex magic string id of the argument string if it is available.\n *\n * @return id - if magic string id is found,\n *         lit_get_magic_string_ex_count () - otherwise.\n */\nlit_magic_string_ex_id_t\nlit_is_ex_utf8_string_magic (const lit_utf8_byte_t *string_p, /**< utf-8 string */\n                             lit_utf8_size_t string_size) /**< string size in bytes */\n{\n  const uint32_t magic_string_ex_count = lit_get_magic_string_ex_count ();\n\n  if (magic_string_ex_count == 0\n      || string_size > lit_get_magic_string_ex_size (magic_string_ex_count - 1))\n  {\n    return (lit_magic_string_ex_id_t) magic_string_ex_count;\n  }\n\n  lit_magic_string_ex_id_t first = 0;\n  lit_magic_string_ex_id_t last = (lit_magic_string_ex_id_t) magic_string_ex_count;\n\n  while (first < last)\n  {\n    const lit_magic_string_ex_id_t middle = (first + last) / 2;\n    const lit_utf8_byte_t *ext_string_p = lit_get_magic_string_ex_utf8 (middle);\n    const lit_utf8_size_t ext_string_size = lit_get_magic_string_ex_size (middle);\n\n    if (string_size == ext_string_size)\n    {\n      const int string_compare = memcmp (ext_string_p, string_p, string_size);\n\n      if (string_compare == 0)\n      {\n        return middle;\n      }\n      else if (string_compare < 0)\n      {\n        first = middle + 1;\n      }\n      else\n      {\n        last = middle;\n      }\n    }\n    else if (string_size > ext_string_size)\n    {\n      first = middle + 1;\n    }\n    else\n    {\n      last = middle;\n    }\n  }\n\n  return (lit_magic_string_ex_id_t) magic_string_ex_count;\n} /* lit_is_ex_utf8_string_magic */\n\n/**\n * Returns the ex magic string id of the argument string pair if it is available.\n *\n * @return id - if magic string id is found,\n *         lit_get_magic_string_ex_count () - otherwise.\n */\nlit_magic_string_ex_id_t\nlit_is_ex_utf8_string_pair_magic (const lit_utf8_byte_t *string1_p, /**< first utf-8 string */\n                                  lit_utf8_size_t string1_size, /**< first string size in bytes */\n                                  const lit_utf8_byte_t *string2_p, /**< second utf-8 string */\n                                  lit_utf8_size_t string2_size) /**< second string size in bytes */\n{\n  const uint32_t magic_string_ex_count = lit_get_magic_string_ex_count ();\n  const lit_utf8_size_t total_string_size = string1_size + string2_size;\n\n  if (magic_string_ex_count == 0\n      || total_string_size > lit_get_magic_string_ex_size (magic_string_ex_count - 1))\n  {\n    return (lit_magic_string_ex_id_t) magic_string_ex_count;\n  }\n\n  lit_magic_string_ex_id_t first = 0;\n  lit_magic_string_ex_id_t last = (lit_magic_string_ex_id_t) magic_string_ex_count;\n\n  while (first < last)\n  {\n    const lit_magic_string_ex_id_t middle = (first + last) / 2;\n    const lit_utf8_byte_t *ext_string_p = lit_get_magic_string_ex_utf8 (middle);\n    const lit_utf8_size_t ext_string_size = lit_get_magic_string_ex_size (middle);\n\n    if (total_string_size == ext_string_size)\n    {\n      int string_compare = memcmp (ext_string_p, string1_p, string1_size);\n\n      if (string_compare == 0)\n      {\n        string_compare = memcmp (ext_string_p + string1_size, string2_p, string2_size);\n      }\n\n      if (string_compare == 0)\n      {\n        return middle;\n      }\n      else if (string_compare < 0)\n      {\n        first = middle + 1;\n      }\n      else\n      {\n        last = middle;\n      }\n    }\n    else if (total_string_size > ext_string_size)\n    {\n      first = middle + 1;\n    }\n    else\n    {\n      last = middle;\n    }\n  }\n\n  return (lit_magic_string_ex_id_t) magic_string_ex_count;\n} /* lit_is_ex_utf8_string_pair_magic */\n\n/**\n * Copy magic string to buffer\n *\n * Warning:\n *         the routine requires that buffer size is enough\n *\n * @return pointer to the byte next to the last copied in the buffer\n */\nlit_utf8_byte_t *\nlit_copy_magic_string_to_buffer (lit_magic_string_id_t id, /**< magic string id */\n                                 lit_utf8_byte_t *buffer_p, /**< destination buffer */\n                                 lit_utf8_size_t buffer_size) /**< size of buffer */\n{\n  const lit_utf8_byte_t *magic_string_bytes_p = lit_get_magic_string_utf8 (id);\n  lit_utf8_size_t magic_string_bytes_count = lit_get_magic_string_size (id);\n\n  const lit_utf8_byte_t *str_iter_p = magic_string_bytes_p;\n  lit_utf8_byte_t *buf_iter_p = buffer_p;\n  lit_utf8_size_t bytes_copied = 0;\n\n  while (magic_string_bytes_count--)\n  {\n    bytes_copied ++;\n    JERRY_ASSERT (bytes_copied <= buffer_size);\n\n    *buf_iter_p++ = *str_iter_p++;\n  }\n\n  return buf_iter_p;\n} /* lit_copy_magic_string_to_buffer */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-magic-strings.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef LIT_MAGIC_STRINGS_H\n#define LIT_MAGIC_STRINGS_H\n\n#include \"lit-globals.h\"\n\n/**\n * Identifiers of ECMA and implementation-defined magic string constants\n */\ntypedef enum\n{\n/** @cond doxygen_suppress */\n#define LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE(size, id)\n#define LIT_MAGIC_STRING_DEF(id, ascii_zt_string) \\\n     id,\n#include \"lit-magic-strings.inc.h\"\n#undef LIT_MAGIC_STRING_DEF\n#undef LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE\n/** @endcond */\n  LIT_NON_INTERNAL_MAGIC_STRING__COUNT, /**< number of non-internal magic strings */\n  LIT_INTERNAL_MAGIC_API_INTERNAL = LIT_NON_INTERNAL_MAGIC_STRING__COUNT, /**< Used to add non-visible JS properties\n                                                                           *   from the public API */\n  LIT_INTERNAL_MAGIC_STRING_ITERATOR_NEXT_INDEX, /**< [[%Iterator%NextIndex]] property */\n  LIT_INTERNAL_MAGIC_STRING_MAP_KEY, /**< Property key used when an object is a key in a map object */\n  LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES, /**< %ArrayProto_values% intrinsic routine */\n  LIT_INTERNAL_MAGIC_STRING_TYPEDARRAY_PROTOTYPE_VALUES, /**< %TypedArray%.prototype values and [@@iterator] routine */\n  LIT_INTERNAL_MAGIC_STRING_SET_PROTOTYPE_VALUES, /**< Set.prototype values, keys and [@@iterator] routines */\n  LIT_INTERNAL_MAGIC_STRING_MAP_PROTOTYPE_ENTRIES, /**< Map.prototype entries and [@@iterator] routines */\n  LIT_INTERNAL_MAGIC_PROMISE_CAPABILITY, /**< PromiseCapability record */\n  /* List of well known symbols */\n  LIT_GLOBAL_SYMBOL_ASYNC_ITERATOR, /**< @@asyncIterator well known symbol */\n  LIT_GLOBAL_SYMBOL__FIRST = LIT_GLOBAL_SYMBOL_ASYNC_ITERATOR, /**< first global symbol */\n  LIT_GLOBAL_SYMBOL_HAS_INSTANCE, /**< @@hasInstance well known symbol */\n  LIT_GLOBAL_SYMBOL_IS_CONCAT_SPREADABLE, /**< @@isConcatSpreadable well known symbol */\n  LIT_GLOBAL_SYMBOL_ITERATOR, /**< @@iterator well known symbol */\n  LIT_GLOBAL_SYMBOL_MATCH, /**< @@match well known symbol */\n  LIT_GLOBAL_SYMBOL_REPLACE, /**< @@replace well known symbol */\n  LIT_GLOBAL_SYMBOL_SEARCH, /**< @@search well known symbol */\n  LIT_GLOBAL_SYMBOL_SPECIES, /**< @@species well known symbol */\n  LIT_GLOBAL_SYMBOL_SPLIT, /**< @@split well known symbol */\n  LIT_GLOBAL_SYMBOL_TO_PRIMITIVE, /**< @@toPrimitive well known symbol */\n  LIT_GLOBAL_SYMBOL_TO_STRING_TAG, /**< @@toStringTag well known symbol */\n  LIT_GLOBAL_SYMBOL_UNSCOPABLES, /**< @@unscopables well known symbol */\n  LIT_GLOBAL_SYMBOL_MATCH_ALL, /**< @@matchAll well known symbol */\n  LIT_GLOBAL_SYMBOL__LAST = LIT_GLOBAL_SYMBOL_MATCH_ALL, /**< last global symbol */\n\n  LIT_INTERNAL_MAGIC_STRING_DELETED, /**< special value for deleted properties */\n  LIT_INTERNAL_MAGIC_STRING_INTERNAL_OBJECT, /**< Internal object ID for internal properties */\n  LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_INIT, /**< function which initializes properties */\n\n  LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER, /**< native pointer info associated with an object */\n  LIT_INTERNAL_MAGIC_STRING_FIRST_DATA = LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER, /**< first index of special\n                                                                                    *   data properties */\n  LIT_INTERNAL_MAGIC_STRING_ENVIRONMENT_RECORD, /**< dynamic environment record needed by class constructors */\n  LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_COMPUTED, /**< computed class field name list */\n  LIT_INTERNAL_MAGIC_STRING_WEAK_REFS, /**< Weak references to the current object */\n  LIT_MAGIC_STRING__COUNT /**< number of magic strings */\n} lit_magic_string_id_t;\n\n/**\n * Checks whether the given id corresponds to a global symbol\n */\n#define LIT_IS_GLOBAL_SYMBOL(id) ((id) >= LIT_GLOBAL_SYMBOL__FIRST && (id) <= LIT_GLOBAL_SYMBOL__LAST)\n\n/**\n * Identifiers of implementation-defined external magic string constants\n */\ntypedef uint32_t lit_magic_string_ex_id_t;\n\nuint32_t lit_get_magic_string_ex_count (void);\n\nconst lit_utf8_byte_t *lit_get_magic_string_utf8 (uint32_t id);\nlit_utf8_size_t lit_get_magic_string_size (uint32_t id);\n\nconst lit_utf8_byte_t *lit_get_magic_string_ex_utf8 (uint32_t id);\nlit_utf8_size_t lit_get_magic_string_ex_size (uint32_t id);\n\nvoid lit_magic_strings_ex_set (const lit_utf8_byte_t * const *ex_str_items,\n                               uint32_t count,\n                               const lit_utf8_size_t *ex_str_sizes);\n\nlit_magic_string_id_t lit_is_utf8_string_magic (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size);\nlit_magic_string_id_t lit_is_utf8_string_pair_magic (const lit_utf8_byte_t *string1_p, lit_utf8_size_t string1_size,\n                                                     const lit_utf8_byte_t *string2_p, lit_utf8_size_t string2_size);\n\nlit_magic_string_ex_id_t lit_is_ex_utf8_string_magic (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size);\nlit_magic_string_ex_id_t lit_is_ex_utf8_string_pair_magic (const lit_utf8_byte_t *string1_p,\n                                                           lit_utf8_size_t string1_size,\n                                                           const lit_utf8_byte_t *string2_p,\n                                                           lit_utf8_size_t string2_size);\n\nlit_utf8_byte_t *lit_copy_magic_string_to_buffer (lit_magic_string_id_t id, lit_utf8_byte_t *buffer_p,\n                                                  lit_utf8_size_t buffer_size);\n\n#endif /* !LIT_MAGIC_STRINGS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-magic-strings.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file is automatically generated by the gen-magic-strings.py script\n * from lit-magic-strings.ini. Do not edit! */\n\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING__EMPTY, \"\")\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPACE_CHAR, \" \")\n#endif\n#if ENABLED (JERRY_MODULE_SYSTEM)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASTERIX_CHAR, \"*\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COMMA_CHAR, \",\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_E_U, \"E\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LEFT_SQUARE_CHAR, \"[\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RIGHT_SQUARE_CHAR, \"]\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PI_U, \"PI\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS, \"is\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_OF, \"of\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LN2_U, \"LN2\")\n#endif\n#if ENABLED (JERRY_BUILTIN_CONTAINER) \\\n|| ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAP_UL, \"Map\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NAN, \"NaN\")\n#if ENABLED (JERRY_BUILTIN_CONTAINER) \\\n|| ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UL, \"Set\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UTC_U, \"UTC\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ABS, \"abs\")\n#endif\n#if ENABLED (JERRY_BUILTIN_CONTAINER) && ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_BUILTIN_WEAKSET)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ADD, \"add\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROMISE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ALL, \"all\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COS, \"cos\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EXP, \"exp\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FOR, \"for\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET, \"get\")\n#if ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_BUILTIN_PROXY) \\\n|| ENABLED (JERRY_BUILTIN_REFLECT) \\\n|| ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_BUILTIN_WEAKMAP) \\\n|| ENABLED (JERRY_BUILTIN_WEAKSET)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_HAS, \"has\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG, \"log\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAP, \"map\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAX, \"max\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MIN, \"min\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NOW, \"now\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_POP, \"pop\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_POW, \"pow\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RAW, \"raw\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET, \"set\")\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SIN, \"sin\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TAN, \"tan\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP, \"(?:)\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DATE_UL, \"Date\")\n#if ENABLED (JERRY_BUILTIN_JSON)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_JSON_U, \"JSON\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LN10_U, \"LN10\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MATH_UL, \"Math\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NULL_UL, \"Null\")\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ACOS, \"acos\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASIN, \"asin\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ATAN, \"atan\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BIND, \"bind\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CALL, \"call\")\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CBRT, \"cbrt\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CEIL, \"ceil\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COSH, \"cosh\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DONE, \"done\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EVAL, \"eval\")\n#if ENABLED (JERRY_BUILTIN_REGEXP)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EXEC, \"exec\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FILL, \"fill\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FIND, \"find\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLAT, \"flat\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FROM, \"from\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IMUL, \"imul\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_JOIN, \"join\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_KEYS, \"keys\")\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG2, \"log2\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NAME, \"name\")\n#if ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NEXT, \"next\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NULL, \"null\")\n#if ENABLED (JERRY_BUILTIN_ARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PUSH, \"push\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROMISE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RACE, \"race\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SEAL, \"seal\")\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SIGN, \"sign\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SINH, \"sinh\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_BUILTIN_SET)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SIZE, \"size\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SOME, \"some\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SORT, \"sort\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SQRT, \"sqrt\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TANH, \"tanh\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TEST, \"test\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROMISE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_THEN, \"then\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRIM, \"trim\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRUE, \"true\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARRAY_UL, \"Array\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ERROR_UL, \"Error\")\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG2E_U, \"LOG2E\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROXY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROXY_UL, \"Proxy\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SQRT2_U, \"SQRT2\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ACOSH, \"acosh\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_APPLY, \"apply\")\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASINH, \"asinh\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ATAN2, \"atan2\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ATANH, \"atanh\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROMISE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CATCH, \"catch\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_BUILTIN_SET)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CLEAR, \"clear\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CLZ32, \"clz32\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EVERY, \"every\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EXPM1, \"expm1\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FALSE, \"false\")\n#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLAGS, \"flags\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLOOR, \"floor\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_HYPOT, \"hypot\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INDEX, \"index\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INPUT, \"input\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_NAN, \"isNaN\")\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG10, \"log10\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG1P, \"log1p\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_BUILTIN_STRING) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MATCH, \"match\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE) \\\n|| ENABLED (JERRY_BUILTIN_JSON)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PARSE, \"parse\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROXY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROXY, \"proxy\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ROUND, \"round\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SHIFT, \"shift\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_STRING) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SLICE, \"slice\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPLIT, \"split\")\n#endif\n#if ENABLED (JERRY_LINE_INFO)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STACK, \"stack\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_THROW, \"throw\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRUNC, \"trunc\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_VALUE, \"value\")\n#if ENABLED (JERRY_PARSER)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RESOURCE_EVAL, \"<eval>\")\n#endif\n#if ENABLED (JERRY_BUILTIN_BIGINT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BIGINT_UL, \"BigInt\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG10E_U, \"LOG10E\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NUMBER_UL, \"Number\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_OBJECT_UL, \"Object\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REGEXP_UL, \"RegExp\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STRING_UL, \"String\")\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SYMBOL_UL, \"Symbol\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASSIGN, \"assign\")\n#endif\n#if ENABLED (JERRY_BUILTIN_BIGINT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BIGINT, \"bigint\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BUFFER, \"buffer\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CALLEE, \"callee\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CALLER, \"caller\")\n#if ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CHAR_AT_UL, \"charAt\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CONCAT, \"concat\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CREATE, \"create\")\n#if ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_BUILTIN_WEAKMAP) \\\n|| ENABLED (JERRY_BUILTIN_WEAKSET)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DELETE, \"delete\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DOTALL, \"dotAll\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ESCAPE, \"escape\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FILTER, \"filter\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FREEZE, \"freeze\")\n#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FROUND, \"fround\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_DAY_UL, \"getDay\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GLOBAL, \"global\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_VIEW_UL, \"isView\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_KEY_FOR, \"keyFor\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LENGTH, \"length\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NUMBER, \"number\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_OBJECT, \"object\")\n#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PAD_END, \"padEnd\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RANDOM, \"random\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REDUCE, \"reduce\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROMISE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REJECT, \"reject\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REPEAT, \"repeat\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RETURN, \"return\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROXY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REVOKE, \"revoke\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_BUILTIN_STRING) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SEARCH, \"search\")\n#endif\n#if !ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_REGEXP) \\\n|| ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_BUILTIN_REGEXP) && !(ENABLED (JERRY_ESNEXT))\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SOURCE, \"source\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPLICE, \"splice\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STICKY, \"sticky\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STRING, \"string\")\n#if ENABLED (JERRY_BUILTIN_ANNEXB) && ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SUBSTR, \"substr\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SYMBOL, \"symbol\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE) \\\n|| ENABLED (JERRY_BUILTIN_JSON)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_JSON_UL, \"toJSON\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_VALUES, \"values\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BOOLEAN_UL, \"Boolean\")\n#if ENABLED (JERRY_BUILTIN_NUMBER) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EPSILON_U, \"EPSILON\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROMISE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROMISE_UL, \"Promise\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REFLECT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REFLECT_UL, \"Reflect\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SQRT1_2_U, \"SQRT1_2\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SYMBOL_DOT_UL, \"Symbol.\")\n#endif\n#if ENABLED (JERRY_BUILTIN_CONTAINER) \\\n|| ENABLED (JERRY_BUILTIN_WEAKMAP)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_WEAKMAP_UL, \"WeakMap\")\n#endif\n#if ENABLED (JERRY_BUILTIN_CONTAINER) \\\n|| ENABLED (JERRY_BUILTIN_WEAKSET)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_WEAKSET_UL, \"WeakSet\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BOOLEAN, \"boolean\")\n#if ENABLED (JERRY_BUILTIN_ANNEXB) && ENABLED (JERRY_BUILTIN_REGEXP)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COMPILE, \"compile\")\n#endif\n#if ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_MODULE_SYSTEM)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DEFAULT, \"default\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENTRIES, \"entries\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROMISE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FINALLY, \"finally\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLATMAP, \"flatMap\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FOR_EACH_UL, \"forEach\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_DATE_UL, \"getDate\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_INT8_UL, \"getInt8\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_TIME_UL, \"getTime\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ANNEXB) && ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_YEAR_UL, \"getYear\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_STRING) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INDEX_OF_UL, \"indexOf\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_ARRAY_UL, \"isArray\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MESSAGE, \"message\")\n#if ENABLED (JERRY_BUILTIN_PROXY) \\\n|| ENABLED (JERRY_BUILTIN_REFLECT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_OWN_KEYS_UL, \"ownKeys\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_BUILTIN_STRING) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REPLACE, \"replace\")\n#endif\n#if ENABLED (JERRY_BUILTIN_PROMISE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RESOLVE, \"resolve\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REVERSE, \"reverse\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_DATE_UL, \"setDate\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_INT8_UL, \"setInt8\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_TIME_UL, \"setTime\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ANNEXB) && ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_YEAR_UL, \"setYear\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPECIES, \"species\")\n#endif\n#if ENABLED (JERRY_BUILTIN_NUMBER)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_FIXED_UL, \"toFixed\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRIM_END, \"trimEnd\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNICODE, \"unicode\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNSHIFT, \"unshift\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_VALUE_OF_UL, \"valueOf\")\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DATAVIEW_UL, \"DataView\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FUNCTION_UL, \"Function\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INFINITY_UL, \"Infinity\")\n#if ENABLED (JERRY_MODULE_SYSTEM)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RUNNABLE_UL, \"Runnable\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ERRORS)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_URI_ERROR_UL, \"URIError\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_OBJECT_TO_STRING_UL, \"[object \")\n#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENDS_WITH, \"endsWith\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FUNCTION, \"function\")\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_HOURS_UL, \"getHours\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_INT16_UL, \"getInt16\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_INT32_UL, \"getInt32\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_MONTH_UL, \"getMonth\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UINT8_UL, \"getUint8\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INCLUDES, \"includes\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_FINITE, \"isFinite\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_FROZEN_UL, \"isFrozen\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_SEALED_UL, \"isSealed\")\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ITERATOR, \"iterator\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MATCH_ALL, \"matchAll\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PAD_START, \"padStart\")\n#endif\n#if ENABLED (JERRY_ESNEXT) \\\n|| !(ENABLED (JERRY_ESNEXT))\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PARSE_INT, \"parseInt\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_HOURS_UL, \"setHours\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_INT16_UL, \"setInt16\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_INT32_UL, \"setInt32\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_MONTH_UL, \"setMonth\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UINT8_UL, \"setUint8\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SUBARRAY, \"subarray\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_STRING_UL, \"toString\")\n#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRIM_LEFT, \"trimLeft\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ANNEXB)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNESCAPE, \"unescape\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_WRITABLE, \"writable\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NEGATIVE_INFINITY_UL, \"-Infinity\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARGUMENTS_UL, \"Arguments\")\n#if ENABLED (JERRY_BUILTIN_ERRORS)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EVAL_ERROR_UL, \"EvalError\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GENERATOR_UL, \"Generator\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INT8_ARRAY_UL, \"Int8Array\")\n#endif\n#if ENABLED (JERRY_BUILTIN_NUMBER)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAX_VALUE_U, \"MAX_VALUE\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MIN_VALUE_U, \"MIN_VALUE\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ERRORS)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TYPE_ERROR_UL, \"TypeError\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNDEFINED_UL, \"Undefined\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING__PROTO__, \"__proto__\")\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ANONYMOUS, \"anonymous\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARGUMENTS, \"arguments\")\n#if ENABLED (JERRY_BUILTIN_PROXY) \\\n|| ENABLED (JERRY_BUILTIN_REFLECT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CONSTRUCT, \"construct\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DECODE_URI, \"decodeURI\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENCODE_URI, \"encodeURI\")\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FIND_INDEX, \"findIndex\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_DAY_UL, \"getUTCDay\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UINT16_UL, \"getUint16\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UINT32_UL, \"getUint32\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_INTEGER, \"isInteger\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LASTINDEX_UL, \"lastIndex\")\n#endif\n#if !ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_REGEXP) \\\n|| ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_BUILTIN_REGEXP) && !(ENABLED (JERRY_ESNEXT))\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MULTILINE, \"multiline\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROTOTYPE, \"prototype\")\n#if ENABLED (JERRY_BUILTIN_PROXY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REVOCABLE, \"revocable\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UINT16_UL, \"setUint16\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UINT32_UL, \"setUint32\")\n#endif\n#if ENABLED (JERRY_BUILTIN_JSON)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STRINGIFY, \"stringify\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SUBSTRING, \"substring\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRIM_RIGHT, \"trimRight\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRIM_START, \"trimStart\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNDEFINED, \"undefined\")\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INT16_ARRAY_UL, \"Int16Array\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INT32_ARRAY_UL, \"Int32Array\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ERRORS)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RANGE_ERROR_UL, \"RangeError\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TYPED_ARRAY_UL, \"TypedArray\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UINT8_ARRAY_UL, \"Uint8Array\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BYTE_LENGTH_UL, \"byteLength\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BYTE_OFFSET_UL, \"byteOffset\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CHAR_CODE_AT_UL, \"charCodeAt\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COPY_WITHIN, \"copyWithin\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENUMERABLE, \"enumerable\")\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_FLOAT_32_UL, \"getFloat32\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW) && ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_FLOAT_64_UL, \"getFloat64\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_MINUTES_UL, \"getMinutes\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_SECONDS_UL, \"getSeconds\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_DATE_UL, \"getUTCDate\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GLOBAL_THIS_UL, \"globalThis\")\n#endif\n#if !ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_REGEXP) \\\n|| ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_BUILTIN_REGEXP) && !(ENABLED (JERRY_ESNEXT))\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IGNORECASE_UL, \"ignoreCase\")\n#endif\n#if ENABLED (JERRY_ESNEXT) \\\n|| !(ENABLED (JERRY_ESNEXT))\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PARSE_FLOAT, \"parseFloat\")\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REPLACE_ALL, \"replaceAll\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_FLOAT_32_UL, \"setFloat32\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATAVIEW) && ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_FLOAT_64_UL, \"setFloat64\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_MINUTES_UL, \"setMinutes\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_SECONDS_UL, \"setSeconds\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_DATE_UL, \"setUTCDate\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STARTS_WITH, \"startsWith\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RESOURCE_ANON, \"<anonymous>\")\n#if ENABLED (JERRY_BUILTIN_DATAVIEW) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARRAY_BUFFER_UL, \"ArrayBuffer\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ERRORS)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SYNTAX_ERROR_UL, \"SyntaxError\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UINT16_ARRAY_UL, \"Uint16Array\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UINT32_ARRAY_UL, \"Uint32Array\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CODE_POINT_AT, \"codePointAt\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CONSTRUCTOR, \"constructor\")\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DESCRIPTION, \"description\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_OBJECT_FROM_ENTRIES, \"fromEntries\")\n#endif\n#if ENABLED (JERRY_BUILTIN_BIGINT) && ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_BIGINT64, \"getBigInt64\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_FULL_YEAR_UL, \"getFullYear\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_HOURS_UL, \"getUTCHours\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_MONTH_UL, \"getUTCMonth\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_HAS_INSTANCE, \"hasInstance\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_STRING) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LAST_INDEX_OF_UL, \"lastIndexOf\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REDUCE_RIGHT_UL, \"reduceRight\")\n#endif\n#if ENABLED (JERRY_BUILTIN_BIGINT) && ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_BIGINT64, \"setBigInt64\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_FULL_YEAR_UL, \"setFullYear\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_HOURS_UL, \"setUTCHours\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_MONTH_UL, \"setUTCMonth\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ANNEXB) && ENABLED (JERRY_BUILTIN_DATE) && ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_BUILTIN_ANNEXB) && ENABLED (JERRY_BUILTIN_DATE) && !(ENABLED (JERRY_ESNEXT))\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_GMT_STRING_UL, \"toGMTString\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_ISO_STRING_UL, \"toISOString\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_LOWER_CASE_UL, \"toLowerCase\")\n#endif\n#if ENABLED (JERRY_BUILTIN_NUMBER)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_PRECISION_UL, \"toPrecision\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_PRIMITIVE, \"toPrimitive\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_STRING_TAG, \"toStringTag\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE) && !(ENABLED (JERRY_ESNEXT)) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_UTC_STRING_UL, \"toUTCString\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_UPPER_CASE_UL, \"toUpperCase\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNSCOPABLES, \"unscopables\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLOAT32_ARRAY_UL, \"Float32Array\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY) && ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLOAT64_ARRAY_UL, \"Float64Array\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INVALID_DATE_UL, \"Invalid Date\")\n#endif\n#if ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAP_ITERATOR_UL, \"Map Iterator\")\n#endif\n#if ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_ITERATOR_UL, \"Set Iterator\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CONFIGURABLE, \"configurable\")\n#if ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FROM_CHAR_CODE_UL, \"fromCharCode\")\n#endif\n#if ENABLED (JERRY_BUILTIN_BIGINT) && ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_BIGUINT64, \"getBigUint64\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_EXTENSIBLE, \"isExtensible\")\n#if ENABLED (JERRY_BUILTIN_BIGINT) && ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_BIGUINT64, \"setBigUint64\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_DATE_STRING_UL, \"toDateString\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_TIME_STRING_UL, \"toTimeString\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASYNC_FUNCTION_UL, \"AsyncFunction\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BIGINT64_ARRAY_UL, \"BigInt64Array\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASYNC_ITERATOR, \"asyncIterator\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FROM_CODE_POINT_UL, \"fromCodePoint\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_MINUTES_UL, \"getUTCMinutes\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_SECONDS_UL, \"getUTCSeconds\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_PROTOTYPE_OF_UL, \"isPrototypeOf\")\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_SAFE_INTEGER, \"isSafeInteger\")\n#endif\n#if ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOCALE_COMPARE_UL, \"localeCompare\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_MINUTES_UL, \"setUTCMinutes\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_SECONDS_UL, \"setUTCSeconds\")\n#endif\n#if ENABLED (JERRY_BUILTIN_NUMBER)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_EXPONENTIAL_UL, \"toExponential\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARRAY_ITERATOR_UL, \"Array Iterator\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASYNC_GENERATOR_UL, \"AsyncGenerator\")\n#endif\n#if ENABLED (JERRY_BUILTIN_BIGINT) && ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BIGUINT64_ARRAY_UL, \"BigUint64Array\")\n#endif\n#if ENABLED (JERRY_BUILTIN_ERRORS)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REFERENCE_ERROR_UL, \"ReferenceError\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DEFINE_PROPERTY_UL, \"defineProperty\")\n#if ENABLED (JERRY_BUILTIN_PROXY) \\\n|| ENABLED (JERRY_BUILTIN_REFLECT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DELETE_PROPERTY_UL, \"deleteProperty\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_PROTOTYPE_OF_UL, \"getPrototypeOf\")\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_FULL_YEAR_UL, \"getUTCFullYear\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_HAS_OWN_PROPERTY_UL, \"hasOwnProperty\")\n#if ENABLED (JERRY_BUILTIN_PROXY) \\\n|| ENABLED (JERRY_BUILTIN_REFLECT) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_PROTOTYPE_OF_UL, \"setPrototypeOf\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_FULL_YEAR_UL, \"setUTCFullYear\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, \"toLocaleString\")\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STRING_ITERATOR_UL, \"String Iterator\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_MILLISECONDS_UL, \"getMilliseconds\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_MILLISECONDS_UL, \"setMilliseconds\")\n#endif\n#if ENABLED (JERRY_BUILTIN_NUMBER) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAX_SAFE_INTEGER_U, \"MAX_SAFE_INTEGER\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MIN_SAFE_INTEGER_U, \"MIN_SAFE_INTEGER\")\n#endif\n#if ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_ANNEXB)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DEFINE_GETTER, \"__defineGetter__\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DEFINE_SETTER, \"__defineSetter__\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOOKUP_GETTER, \"__lookupGetter__\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOOKUP_SETTER, \"__lookupSetter__\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL, \"defineProperties\")\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U, \"BYTES_PER_ELEMENT\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GENERATOR_FUNCTION_UL, \"GeneratorFunction\")\n#endif\n#if ENABLED (JERRY_BUILTIN_NUMBER)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NEGATIVE_INFINITY_U, \"NEGATIVE_INFINITY\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_POSITIVE_INFINITY_U, \"POSITIVE_INFINITY\")\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL, \"Uint8ClampedArray\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_TIMEZONE_OFFSET_UL, \"getTimezoneOffset\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PREVENT_EXTENSIONS_UL, \"preventExtensions\")\n#if ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_LOCALE_LOWER_CASE_UL, \"toLocaleLowerCase\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_LOCALE_UPPER_CASE_UL, \"toLocaleUpperCase\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DECODE_URI_COMPONENT, \"decodeURIComponent\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENCODE_URI_COMPONENT, \"encodeURIComponent\")\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_MILLISECONDS_UL, \"getUTCMilliseconds\")\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_CONCAT_SPREADABLE, \"isConcatSpreadable\")\n#endif\n#if ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_MILLISECONDS_UL, \"setUTCMilliseconds\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_LOCALE_DATE_STRING_UL, \"toLocaleDateString\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_LOCALE_TIME_STRING_UL, \"toLocaleTimeString\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_OWN_PROPERTY_NAMES_UL, \"getOwnPropertyNames\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROPERTY_IS_ENUMERABLE_UL, \"propertyIsEnumerable\")\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_OWN_PROPERTY_SYMBOLS_UL, \"getOwnPropertySymbols\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASYNC_GENERATOR_FUNCTION_UL, \"AsyncGeneratorFunction\")\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REGEXP_STRING_ITERATOR_UL, \"RegExp String Iterator\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL, \"getOwnPropertyDescriptor\")\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTORS_UL, \"getOwnPropertyDescriptors\")\n#endif\nLIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING__FUNCTION_TO_STRING, \"function(){/* ecmascript */}\")\n\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (0, LIT_MAGIC_STRING__EMPTY)\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_SPACE_CHAR)\n#elif ENABLED (JERRY_MODULE_SYSTEM)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_ASTERIX_CHAR)\n#elif ENABLED (JERRY_BUILTIN_ARRAY) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_COMMA_CHAR)\n#elif ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_E_U)\n#elif ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_LEFT_SQUARE_CHAR)\n#elif ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_PI_U)\n#elif ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_IS)\n#elif ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_OF)\n#elif ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_LN2_U)\n#elif ENABLED (JERRY_BUILTIN_CONTAINER) \\\n|| ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_MAP_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_NAN)\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_PI_U)\n#elif ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_IS)\n#elif ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ESNEXT) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_OF)\n#elif ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_LN2_U)\n#elif ENABLED (JERRY_BUILTIN_CONTAINER) \\\n|| ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_MAP_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_NAN)\n#endif\n#if ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (3, LIT_MAGIC_STRING_LN2_U)\n#elif ENABLED (JERRY_BUILTIN_CONTAINER) \\\n|| ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (3, LIT_MAGIC_STRING_MAP_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (3, LIT_MAGIC_STRING_NAN)\n#endif\n#if ENABLED (JERRY_BUILTIN_REGEXP)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (4, LIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (4, LIT_MAGIC_STRING_DATE_UL)\n#endif\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (5, LIT_MAGIC_STRING_ARRAY_UL)\n#if ENABLED (JERRY_PARSER)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (6, LIT_MAGIC_STRING_RESOURCE_EVAL)\n#elif ENABLED (JERRY_BUILTIN_BIGINT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (6, LIT_MAGIC_STRING_BIGINT_UL)\n#elif ENABLED (JERRY_BUILTIN_MATH)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (6, LIT_MAGIC_STRING_LOG10E_U)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (6, LIT_MAGIC_STRING_NUMBER_UL)\n#endif\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (7, LIT_MAGIC_STRING_BOOLEAN_UL)\n#if ENABLED (JERRY_BUILTIN_DATAVIEW)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (8, LIT_MAGIC_STRING_DATAVIEW_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (8, LIT_MAGIC_STRING_FUNCTION_UL)\n#endif\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (9, LIT_MAGIC_STRING_NEGATIVE_INFINITY_UL)\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_INT16_ARRAY_UL)\n#elif ENABLED (JERRY_BUILTIN_ERRORS)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_RANGE_ERROR_UL)\n#elif ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_TYPED_ARRAY_UL)\n#elif ENABLED (JERRY_BUILTIN_DATAVIEW) \\\n|| ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_BYTE_LENGTH_UL)\n#elif ENABLED (JERRY_BUILTIN_STRING)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_CHAR_CODE_AT_UL)\n#elif ENABLED (JERRY_BUILTIN_TYPEDARRAY) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_COPY_WITHIN)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_ENUMERABLE)\n#endif\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (11, LIT_MAGIC_STRING_RESOURCE_ANON)\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_FLOAT32_ARRAY_UL)\n#elif ENABLED (JERRY_BUILTIN_TYPEDARRAY) && ENABLED (JERRY_NUMBER_TYPE_FLOAT64)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_FLOAT64_ARRAY_UL)\n#elif ENABLED (JERRY_BUILTIN_DATE) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_INVALID_DATE_UL)\n#elif ENABLED (JERRY_BUILTIN_MAP) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_MAP_ITERATOR_UL)\n#elif ENABLED (JERRY_BUILTIN_SET) \\\n|| ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_SET_ITERATOR_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_CONFIGURABLE)\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (13, LIT_MAGIC_STRING_ASYNC_FUNCTION_UL)\n#elif ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (13, LIT_MAGIC_STRING_BIGINT64_ARRAY_UL)\n#elif ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (13, LIT_MAGIC_STRING_ASYNC_ITERATOR)\n#elif ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (13, LIT_MAGIC_STRING_FROM_CODE_POINT_UL)\n#elif ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (13, LIT_MAGIC_STRING_GET_UTC_MINUTES_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (13, LIT_MAGIC_STRING_IS_PROTOTYPE_OF_UL)\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (14, LIT_MAGIC_STRING_ARRAY_ITERATOR_UL)\n#elif ENABLED (JERRY_BUILTIN_BIGINT) && ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (14, LIT_MAGIC_STRING_BIGUINT64_ARRAY_UL)\n#elif ENABLED (JERRY_BUILTIN_ERRORS)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (14, LIT_MAGIC_STRING_REFERENCE_ERROR_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (14, LIT_MAGIC_STRING_DEFINE_PROPERTY_UL)\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (15, LIT_MAGIC_STRING_STRING_ITERATOR_UL)\n#elif ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (15, LIT_MAGIC_STRING_GET_MILLISECONDS_UL)\n#elif ENABLED (JERRY_BUILTIN_NUMBER) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (15, LIT_MAGIC_STRING_MAX_SAFE_INTEGER_U)\n#elif ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_ANNEXB)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (15, LIT_MAGIC_STRING_DEFINE_GETTER)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (15, LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL)\n#endif\n#if ENABLED (JERRY_BUILTIN_NUMBER) && ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (16, LIT_MAGIC_STRING_MAX_SAFE_INTEGER_U)\n#elif ENABLED (JERRY_ESNEXT) && ENABLED (JERRY_BUILTIN_ANNEXB)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (16, LIT_MAGIC_STRING_DEFINE_GETTER)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (16, LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL)\n#endif\n#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U)\n#elif ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_GENERATOR_FUNCTION_UL)\n#elif ENABLED (JERRY_BUILTIN_NUMBER)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_NEGATIVE_INFINITY_U)\n#elif ENABLED (JERRY_BUILTIN_TYPEDARRAY)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL)\n#elif ENABLED (JERRY_BUILTIN_DATE)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_GET_TIMEZONE_OFFSET_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_PREVENT_EXTENSIONS_UL)\n#endif\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (18, LIT_MAGIC_STRING_DECODE_URI_COMPONENT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (19, LIT_MAGIC_STRING_GET_OWN_PROPERTY_NAMES_UL)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (20, LIT_MAGIC_STRING_PROPERTY_IS_ENUMERABLE_UL)\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (21, LIT_MAGIC_STRING_GET_OWN_PROPERTY_SYMBOLS_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (21, LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL)\n#endif\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (22, LIT_MAGIC_STRING_ASYNC_GENERATOR_FUNCTION_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (22, LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL)\n#endif\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (23, LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (24, LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL)\n#if ENABLED (JERRY_ESNEXT)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (25, LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTORS_UL)\n#else\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (25, LIT_MAGIC_STRING__FUNCTION_TO_STRING)\n#endif\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (26, LIT_MAGIC_STRING__FUNCTION_TO_STRING)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (27, LIT_MAGIC_STRING__FUNCTION_TO_STRING)\nLIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (28, LIT_MAGIC_STRING__FUNCTION_TO_STRING)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-magic-strings.ini",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# List of ECMA magic strings\n#\n# These strings must be ascii strings. The NULL character cannot be part of\n# magic strings, because it must be the terminator character of all magic\n# strings.\n#\n# If the list is modified, tools/gen-magic-strings.py must be executed!\n\n[LIT_MAGIC_STRINGS]\n\nLIT_MAGIC_STRING__EMPTY = \"\"\nLIT_MAGIC_STRING_ASTERIX_CHAR = \"*\"\nLIT_MAGIC_STRING_SPACE_CHAR = \" \"\nLIT_MAGIC_STRING_COMMA_CHAR = \",\"\nLIT_MAGIC_STRING_E_U = \"E\"\nLIT_MAGIC_STRING_LEFT_SQUARE_CHAR = \"[\"\nLIT_MAGIC_STRING_RIGHT_SQUARE_CHAR = \"]\"\nLIT_MAGIC_STRING_PI_U = \"PI\"\nLIT_MAGIC_STRING_IS = \"is\"\nLIT_MAGIC_STRING_OF = \"of\"\nLIT_MAGIC_STRING_LN2_U = \"LN2\"\nLIT_MAGIC_STRING_MAP_UL = \"Map\"\nLIT_MAGIC_STRING_NAN = \"NaN\"\nLIT_MAGIC_STRING_SET_UL = \"Set\"\nLIT_MAGIC_STRING_UTC_U = \"UTC\"\nLIT_MAGIC_STRING_ABS = \"abs\"\nLIT_MAGIC_STRING_ADD = \"add\"\nLIT_MAGIC_STRING_ALL = \"all\"\nLIT_MAGIC_STRING_COS = \"cos\"\nLIT_MAGIC_STRING_EXP = \"exp\"\nLIT_MAGIC_STRING_FOR = \"for\"\nLIT_MAGIC_STRING_GET = \"get\"\nLIT_MAGIC_STRING_HAS = \"has\"\nLIT_MAGIC_STRING_LOG = \"log\"\nLIT_MAGIC_STRING_MAP = \"map\"\nLIT_MAGIC_STRING_MAX = \"max\"\nLIT_MAGIC_STRING_MIN = \"min\"\nLIT_MAGIC_STRING_NOW = \"now\"\nLIT_MAGIC_STRING_POP = \"pop\"\nLIT_MAGIC_STRING_POW = \"pow\"\nLIT_MAGIC_STRING_RAW = \"raw\"\nLIT_MAGIC_STRING_SET = \"set\"\nLIT_MAGIC_STRING_SIN = \"sin\"\nLIT_MAGIC_STRING_TAN = \"tan\"\nLIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP = \"(?:)\"\nLIT_MAGIC_STRING_DATE_UL = \"Date\"\nLIT_MAGIC_STRING_JSON_U = \"JSON\"\nLIT_MAGIC_STRING_LN10_U = \"LN10\"\nLIT_MAGIC_STRING_MATH_UL = \"Math\"\nLIT_MAGIC_STRING_NULL_UL = \"Null\"\nLIT_MAGIC_STRING_ACOS = \"acos\"\nLIT_MAGIC_STRING_ASIN = \"asin\"\nLIT_MAGIC_STRING_ATAN = \"atan\"\nLIT_MAGIC_STRING_BIND = \"bind\"\nLIT_MAGIC_STRING_CALL = \"call\"\nLIT_MAGIC_STRING_CBRT = \"cbrt\"\nLIT_MAGIC_STRING_CEIL = \"ceil\"\nLIT_MAGIC_STRING_COSH = \"cosh\"\nLIT_MAGIC_STRING_DONE = \"done\"\nLIT_MAGIC_STRING_EVAL = \"eval\"\nLIT_MAGIC_STRING_EXEC = \"exec\"\nLIT_MAGIC_STRING_FILL = \"fill\"\nLIT_MAGIC_STRING_FIND = \"find\"\nLIT_MAGIC_STRING_FLAT = \"flat\"\nLIT_MAGIC_STRING_FROM = \"from\"\nLIT_MAGIC_STRING_IMUL = \"imul\"\nLIT_MAGIC_STRING_JOIN = \"join\"\nLIT_MAGIC_STRING_KEYS = \"keys\"\nLIT_MAGIC_STRING_LOG2 = \"log2\"\nLIT_MAGIC_STRING_NAME = \"name\"\nLIT_MAGIC_STRING_NULL = \"null\"\nLIT_MAGIC_STRING_NEXT = \"next\"\nLIT_MAGIC_STRING_PUSH = \"push\"\nLIT_MAGIC_STRING_RACE = \"race\"\nLIT_MAGIC_STRING_SEAL = \"seal\"\nLIT_MAGIC_STRING_SIGN = \"sign\"\nLIT_MAGIC_STRING_SIZE = \"size\"\nLIT_MAGIC_STRING_SINH = \"sinh\"\nLIT_MAGIC_STRING_SOME = \"some\"\nLIT_MAGIC_STRING_SORT = \"sort\"\nLIT_MAGIC_STRING_SQRT = \"sqrt\"\nLIT_MAGIC_STRING_TANH = \"tanh\"\nLIT_MAGIC_STRING_TEST = \"test\"\nLIT_MAGIC_STRING_THEN = \"then\"\nLIT_MAGIC_STRING_TRIM = \"trim\"\nLIT_MAGIC_STRING_TRUE = \"true\"\nLIT_MAGIC_STRING_ARRAY_UL = \"Array\"\nLIT_MAGIC_STRING_ERROR_UL = \"Error\"\nLIT_MAGIC_STRING_PROXY_UL = \"Proxy\"\nLIT_MAGIC_STRING_LOG2E_U = \"LOG2E\"\nLIT_MAGIC_STRING_SQRT2_U = \"SQRT2\"\nLIT_MAGIC_STRING_ACOSH = \"acosh\"\nLIT_MAGIC_STRING_APPLY = \"apply\"\nLIT_MAGIC_STRING_ASINH = \"asinh\"\nLIT_MAGIC_STRING_ATAN2 = \"atan2\"\nLIT_MAGIC_STRING_ATANH = \"atanh\"\nLIT_MAGIC_STRING_CATCH = \"catch\"\nLIT_MAGIC_STRING_CLEAR = \"clear\"\nLIT_MAGIC_STRING_CLZ32 = \"clz32\"\nLIT_MAGIC_STRING_EVERY = \"every\"\nLIT_MAGIC_STRING_EXPM1 = \"expm1\"\nLIT_MAGIC_STRING_FALSE = \"false\"\nLIT_MAGIC_STRING_FLAGS = \"flags\"\nLIT_MAGIC_STRING_FLOOR = \"floor\"\nLIT_MAGIC_STRING_HYPOT = \"hypot\"\nLIT_MAGIC_STRING_INDEX = \"index\"\nLIT_MAGIC_STRING_INPUT = \"input\"\nLIT_MAGIC_STRING_IS_NAN = \"isNaN\"\nLIT_MAGIC_STRING_LOG1P = \"log1p\"\nLIT_MAGIC_STRING_LOG10 = \"log10\"\nLIT_MAGIC_STRING_MATCH = \"match\"\nLIT_MAGIC_STRING_PARSE = \"parse\"\nLIT_MAGIC_STRING_PROXY = \"proxy\"\nLIT_MAGIC_STRING_ROUND = \"round\"\nLIT_MAGIC_STRING_SHIFT = \"shift\"\nLIT_MAGIC_STRING_SLICE = \"slice\"\nLIT_MAGIC_STRING_SPLIT = \"split\"\nLIT_MAGIC_STRING_STACK = \"stack\"\nLIT_MAGIC_STRING_THROW = \"throw\"\nLIT_MAGIC_STRING_TRUNC = \"trunc\"\nLIT_MAGIC_STRING_VALUE = \"value\"\nLIT_MAGIC_STRING_RESOURCE_EVAL = \"<eval>\"\nLIT_MAGIC_STRING_BIGINT_UL = \"BigInt\"\nLIT_MAGIC_STRING_LOG10E_U = \"LOG10E\"\nLIT_MAGIC_STRING_NUMBER_UL = \"Number\"\nLIT_MAGIC_STRING_OBJECT_UL = \"Object\"\nLIT_MAGIC_STRING_REGEXP_UL = \"RegExp\"\nLIT_MAGIC_STRING_STRING_UL = \"String\"\nLIT_MAGIC_STRING_SYMBOL_UL = \"Symbol\"\nLIT_MAGIC_STRING_ASSIGN = \"assign\"\nLIT_MAGIC_STRING_BIGINT = \"bigint\"\nLIT_MAGIC_STRING_BUFFER = \"buffer\"\nLIT_MAGIC_STRING_CALLEE = \"callee\"\nLIT_MAGIC_STRING_CALLER = \"caller\"\nLIT_MAGIC_STRING_CHAR_AT_UL = \"charAt\"\nLIT_MAGIC_STRING_CONCAT = \"concat\"\nLIT_MAGIC_STRING_CREATE = \"create\"\nLIT_MAGIC_STRING_DELETE = \"delete\"\nLIT_MAGIC_STRING_ESCAPE = \"escape\"\nLIT_MAGIC_STRING_FILTER = \"filter\"\nLIT_MAGIC_STRING_FREEZE = \"freeze\"\nLIT_MAGIC_STRING_FROUND = \"fround\"\nLIT_MAGIC_STRING_GET_DAY_UL = \"getDay\"\nLIT_MAGIC_STRING_GLOBAL = \"global\"\nLIT_MAGIC_STRING_IS_VIEW_UL = \"isView\"\nLIT_MAGIC_STRING_KEY_FOR = \"keyFor\"\nLIT_MAGIC_STRING_LENGTH = \"length\"\nLIT_MAGIC_STRING_NUMBER = \"number\"\nLIT_MAGIC_STRING_OBJECT = \"object\"\nLIT_MAGIC_STRING_PAD_END = \"padEnd\"\nLIT_MAGIC_STRING_RANDOM = \"random\"\nLIT_MAGIC_STRING_REDUCE = \"reduce\"\nLIT_MAGIC_STRING_REJECT = \"reject\"\nLIT_MAGIC_STRING_REPEAT = \"repeat\"\nLIT_MAGIC_STRING_REVOKE = \"revoke\"\nLIT_MAGIC_STRING_RETURN = \"return\"\nLIT_MAGIC_STRING_SEARCH = \"search\"\nLIT_MAGIC_STRING_SOURCE = \"source\"\nLIT_MAGIC_STRING_SPLICE = \"splice\"\nLIT_MAGIC_STRING_STRING = \"string\"\nLIT_MAGIC_STRING_STICKY = \"sticky\"\nLIT_MAGIC_STRING_SYMBOL = \"symbol\"\nLIT_MAGIC_STRING_SUBSTR = \"substr\"\nLIT_MAGIC_STRING_ENTRIES = \"entries\"\nLIT_MAGIC_STRING_TO_JSON_UL = \"toJSON\"\nLIT_MAGIC_STRING_VALUES = \"values\"\nLIT_MAGIC_STRING_BOOLEAN_UL = \"Boolean\"\nLIT_MAGIC_STRING_FINALLY = \"finally\"\nLIT_MAGIC_STRING_PROMISE_UL = \"Promise\"\nLIT_MAGIC_STRING_REFLECT_UL = \"Reflect\"\nLIT_MAGIC_STRING_SYMBOL_DOT_UL = \"Symbol.\"\nLIT_MAGIC_STRING_SQRT1_2_U = \"SQRT1_2\"\nLIT_MAGIC_STRING_BOOLEAN = \"boolean\"\nLIT_MAGIC_STRING_COMPILE = \"compile\"\nLIT_MAGIC_STRING_DEFAULT = \"default\"\nLIT_MAGIC_STRING_DOTALL = \"dotAll\"\nLIT_MAGIC_STRING_FLATMAP = \"flatMap\"\nLIT_MAGIC_STRING_FOR_EACH_UL = \"forEach\"\nLIT_MAGIC_STRING_GET_DATE_UL = \"getDate\"\nLIT_MAGIC_STRING_GET_INT8_UL = \"getInt8\"\nLIT_MAGIC_STRING_GET_TIME_UL = \"getTime\"\nLIT_MAGIC_STRING_GET_YEAR_UL = \"getYear\"\nLIT_MAGIC_STRING_INDEX_OF_UL = \"indexOf\"\nLIT_MAGIC_STRING_IS_ARRAY_UL = \"isArray\"\nLIT_MAGIC_STRING_MESSAGE = \"message\"\nLIT_MAGIC_STRING_OWN_KEYS_UL = \"ownKeys\"\nLIT_MAGIC_STRING_PAD_START = \"padStart\"\nLIT_MAGIC_STRING_REPLACE = \"replace\"\nLIT_MAGIC_STRING_RESOLVE = \"resolve\"\nLIT_MAGIC_STRING_REVERSE = \"reverse\"\nLIT_MAGIC_STRING_SET_DATE_UL = \"setDate\"\nLIT_MAGIC_STRING_SET_TIME_UL = \"setTime\"\nLIT_MAGIC_STRING_SET_INT8_UL = \"setInt8\"\nLIT_MAGIC_STRING_SET_YEAR_UL = \"setYear\"\nLIT_MAGIC_STRING_SPECIES = \"species\"\nLIT_MAGIC_STRING_TO_FIXED_UL = \"toFixed\"\nLIT_MAGIC_STRING_TRIM_END = \"trimEnd\"\nLIT_MAGIC_STRING_UNICODE = \"unicode\"\nLIT_MAGIC_STRING_UNSHIFT = \"unshift\"\nLIT_MAGIC_STRING_VALUE_OF_UL = \"valueOf\"\nLIT_MAGIC_STRING_WEAKMAP_UL = \"WeakMap\"\nLIT_MAGIC_STRING_WEAKSET_UL = \"WeakSet\"\nLIT_MAGIC_STRING_EPSILON_U = \"EPSILON\"\nLIT_MAGIC_STRING_RUNNABLE_UL = \"Runnable\"\nLIT_MAGIC_STRING_DATAVIEW_UL = \"DataView\"\nLIT_MAGIC_STRING_FUNCTION_UL = \"Function\"\nLIT_MAGIC_STRING_INFINITY_UL = \"Infinity\"\nLIT_MAGIC_STRING_MATCH_ALL = \"matchAll\"\nLIT_MAGIC_STRING_URI_ERROR_UL = \"URIError\"\nLIT_MAGIC_STRING_ENDS_WITH = \"endsWith\"\nLIT_MAGIC_STRING_FUNCTION = \"function\"\nLIT_MAGIC_STRING_GET_HOURS_UL = \"getHours\"\nLIT_MAGIC_STRING_GET_INT16_UL = \"getInt16\"\nLIT_MAGIC_STRING_GET_INT32_UL = \"getInt32\"\nLIT_MAGIC_STRING_GET_MONTH_UL = \"getMonth\"\nLIT_MAGIC_STRING_GET_UINT8_UL = \"getUint8\"\nLIT_MAGIC_STRING_INCLUDES = \"includes\"\nLIT_MAGIC_STRING_IS_FINITE = \"isFinite\"\nLIT_MAGIC_STRING_IS_FROZEN_UL = \"isFrozen\"\nLIT_MAGIC_STRING_IS_SEALED_UL = \"isSealed\"\nLIT_MAGIC_STRING_ITERATOR = \"iterator\"\nLIT_MAGIC_STRING_PARSE_INT = \"parseInt\"\nLIT_MAGIC_STRING_SET_HOURS_UL = \"setHours\"\nLIT_MAGIC_STRING_SET_INT16_UL = \"setInt16\"\nLIT_MAGIC_STRING_SET_INT32_UL = \"setInt32\"\nLIT_MAGIC_STRING_SET_MONTH_UL = \"setMonth\"\nLIT_MAGIC_STRING_SET_UINT8_UL = \"setUint8\"\nLIT_MAGIC_STRING_SUBARRAY = \"subarray\"\nLIT_MAGIC_STRING_TO_STRING_UL = \"toString\"\nLIT_MAGIC_STRING_TRIM_LEFT = \"trimLeft\"\nLIT_MAGIC_STRING_UNESCAPE = \"unescape\"\nLIT_MAGIC_STRING_WRITABLE = \"writable\"\nLIT_MAGIC_STRING_OBJECT_TO_STRING_UL = \"[object \"\nLIT_MAGIC_STRING_NEGATIVE_INFINITY_UL = \"-Infinity\"\nLIT_MAGIC_STRING_ARGUMENTS_UL = \"Arguments\"\nLIT_MAGIC_STRING_ANONYMOUS = \"anonymous\"\nLIT_MAGIC_STRING_CONSTRUCT = \"construct\"\nLIT_MAGIC_STRING_EVAL_ERROR_UL = \"EvalError\"\nLIT_MAGIC_STRING_INT8_ARRAY_UL = \"Int8Array\"\nLIT_MAGIC_STRING_IS_INTEGER = \"isInteger\"\nLIT_MAGIC_STRING_MAX_VALUE_U = \"MAX_VALUE\"\nLIT_MAGIC_STRING_MIN_VALUE_U = \"MIN_VALUE\"\nLIT_MAGIC_STRING_TYPE_ERROR_UL = \"TypeError\"\nLIT_MAGIC_STRING_UNDEFINED_UL = \"Undefined\"\nLIT_MAGIC_STRING__PROTO__ = \"__proto__\"\nLIT_MAGIC_STRING_ARGUMENTS = \"arguments\"\nLIT_MAGIC_STRING_DECODE_URI = \"decodeURI\"\nLIT_MAGIC_STRING_ENCODE_URI = \"encodeURI\"\nLIT_MAGIC_STRING_FIND_INDEX = \"findIndex\"\nLIT_MAGIC_STRING_GENERATOR_UL = \"Generator\"\nLIT_MAGIC_STRING_GET_UTC_DAY_UL = \"getUTCDay\"\nLIT_MAGIC_STRING_GET_UINT16_UL = \"getUint16\"\nLIT_MAGIC_STRING_GET_UINT32_UL = \"getUint32\"\nLIT_MAGIC_STRING_LASTINDEX_UL = \"lastIndex\"\nLIT_MAGIC_STRING_MULTILINE = \"multiline\"\nLIT_MAGIC_STRING_PROTOTYPE = \"prototype\"\nLIT_MAGIC_STRING_REVOCABLE = \"revocable\"\nLIT_MAGIC_STRING_STRINGIFY = \"stringify\"\nLIT_MAGIC_STRING_SET_UINT16_UL = \"setUint16\"\nLIT_MAGIC_STRING_SET_UINT32_UL = \"setUint32\"\nLIT_MAGIC_STRING_SUBSTRING = \"substring\"\nLIT_MAGIC_STRING_TRIM_RIGHT = \"trimRight\"\nLIT_MAGIC_STRING_TRIM_START = \"trimStart\"\nLIT_MAGIC_STRING_UNDEFINED = \"undefined\"\nLIT_MAGIC_STRING_INT16_ARRAY_UL = \"Int16Array\"\nLIT_MAGIC_STRING_INT32_ARRAY_UL = \"Int32Array\"\nLIT_MAGIC_STRING_RANGE_ERROR_UL = \"RangeError\"\nLIT_MAGIC_STRING_TYPED_ARRAY_UL = \"TypedArray\"\nLIT_MAGIC_STRING_UINT8_ARRAY_UL = \"Uint8Array\"\nLIT_MAGIC_STRING_BYTE_LENGTH_UL = \"byteLength\"\nLIT_MAGIC_STRING_BYTE_OFFSET_UL = \"byteOffset\"\nLIT_MAGIC_STRING_CHAR_CODE_AT_UL = \"charCodeAt\"\nLIT_MAGIC_STRING_COPY_WITHIN = \"copyWithin\"\nLIT_MAGIC_STRING_ENUMERABLE = \"enumerable\"\nLIT_MAGIC_STRING_GET_FLOAT_32_UL = \"getFloat32\"\nLIT_MAGIC_STRING_GET_FLOAT_64_UL = \"getFloat64\"\nLIT_MAGIC_STRING_GET_MINUTES_UL = \"getMinutes\"\nLIT_MAGIC_STRING_GET_SECONDS_UL = \"getSeconds\"\nLIT_MAGIC_STRING_GET_UTC_DATE_UL = \"getUTCDate\"\nLIT_MAGIC_STRING_GLOBAL_THIS_UL = \"globalThis\"\nLIT_MAGIC_STRING_IGNORECASE_UL = \"ignoreCase\"\nLIT_MAGIC_STRING_PARSE_FLOAT = \"parseFloat\"\nLIT_MAGIC_STRING_REPLACE_ALL = \"replaceAll\"\nLIT_MAGIC_STRING_SET_FLOAT_32_UL = \"setFloat32\"\nLIT_MAGIC_STRING_SET_FLOAT_64_UL = \"setFloat64\"\nLIT_MAGIC_STRING_SET_MINUTES_UL = \"setMinutes\"\nLIT_MAGIC_STRING_SET_SECONDS_UL = \"setSeconds\"\nLIT_MAGIC_STRING_SET_UTC_DATE_UL = \"setUTCDate\"\nLIT_MAGIC_STRING_STARTS_WITH = \"startsWith\"\nLIT_MAGIC_STRING_RESOURCE_ANON = \"<anonymous>\"\nLIT_MAGIC_STRING_ARRAY_BUFFER_UL = \"ArrayBuffer\"\nLIT_MAGIC_STRING_DESCRIPTION = \"description\"\nLIT_MAGIC_STRING_SYNTAX_ERROR_UL = \"SyntaxError\"\nLIT_MAGIC_STRING_UINT16_ARRAY_UL = \"Uint16Array\"\nLIT_MAGIC_STRING_UINT32_ARRAY_UL = \"Uint32Array\"\nLIT_MAGIC_STRING_CONSTRUCTOR = \"constructor\"\nLIT_MAGIC_STRING_CODE_POINT_AT = \"codePointAt\"\nLIT_MAGIC_STRING_OBJECT_FROM_ENTRIES = \"fromEntries\"\nLIT_MAGIC_STRING_GET_BIGINT64 = \"getBigInt64\"\nLIT_MAGIC_STRING_GET_FULL_YEAR_UL = \"getFullYear\"\nLIT_MAGIC_STRING_GET_UTC_HOURS_UL = \"getUTCHours\"\nLIT_MAGIC_STRING_GET_UTC_MONTH_UL = \"getUTCMonth\"\nLIT_MAGIC_STRING_HAS_INSTANCE = \"hasInstance\"\nLIT_MAGIC_STRING_LAST_INDEX_OF_UL = \"lastIndexOf\"\nLIT_MAGIC_STRING_REDUCE_RIGHT_UL = \"reduceRight\"\nLIT_MAGIC_STRING_SET_BIGINT64 = \"setBigInt64\"\nLIT_MAGIC_STRING_SET_FULL_YEAR_UL = \"setFullYear\"\nLIT_MAGIC_STRING_SET_UTC_HOURS_UL = \"setUTCHours\"\nLIT_MAGIC_STRING_SET_UTC_MONTH_UL = \"setUTCMonth\"\nLIT_MAGIC_STRING_TO_GMT_STRING_UL = \"toGMTString\"\nLIT_MAGIC_STRING_TO_ISO_STRING_UL = \"toISOString\"\nLIT_MAGIC_STRING_TO_LOWER_CASE_UL = \"toLowerCase\"\nLIT_MAGIC_STRING_TO_PRECISION_UL = \"toPrecision\"\nLIT_MAGIC_STRING_TO_PRIMITIVE = \"toPrimitive\"\nLIT_MAGIC_STRING_TO_STRING_TAG = \"toStringTag\"\nLIT_MAGIC_STRING_TO_UTC_STRING_UL = \"toUTCString\"\nLIT_MAGIC_STRING_TO_UPPER_CASE_UL = \"toUpperCase\"\nLIT_MAGIC_STRING_UNSCOPABLES = \"unscopables\"\nLIT_MAGIC_STRING_FLOAT32_ARRAY_UL = \"Float32Array\"\nLIT_MAGIC_STRING_FLOAT64_ARRAY_UL = \"Float64Array\"\nLIT_MAGIC_STRING_INVALID_DATE_UL = \"Invalid Date\"\nLIT_MAGIC_STRING_SET_ITERATOR_UL = \"Set Iterator\"\nLIT_MAGIC_STRING_MAP_ITERATOR_UL = \"Map Iterator\"\nLIT_MAGIC_STRING_CONFIGURABLE = \"configurable\"\nLIT_MAGIC_STRING_FROM_CHAR_CODE_UL = \"fromCharCode\"\nLIT_MAGIC_STRING_FROM_CODE_POINT_UL = \"fromCodePoint\"\nLIT_MAGIC_STRING_GET_BIGUINT64 = \"getBigUint64\"\nLIT_MAGIC_STRING_IS_EXTENSIBLE = \"isExtensible\"\nLIT_MAGIC_STRING_SET_BIGUINT64 = \"setBigUint64\"\nLIT_MAGIC_STRING_TO_DATE_STRING_UL = \"toDateString\"\nLIT_MAGIC_STRING_TO_TIME_STRING_UL = \"toTimeString\"\nLIT_MAGIC_STRING_ASYNC_FUNCTION_UL = \"AsyncFunction\"\nLIT_MAGIC_STRING_BIGINT64_ARRAY_UL = \"BigInt64Array\"\nLIT_MAGIC_STRING_ASYNC_ITERATOR = \"asyncIterator\"\nLIT_MAGIC_STRING_GET_UTC_MINUTES_UL = \"getUTCMinutes\"\nLIT_MAGIC_STRING_GET_UTC_SECONDS_UL = \"getUTCSeconds\"\nLIT_MAGIC_STRING_IS_PROTOTYPE_OF_UL = \"isPrototypeOf\"\nLIT_MAGIC_STRING_IS_SAFE_INTEGER = \"isSafeInteger\"\nLIT_MAGIC_STRING_LOCALE_COMPARE_UL = \"localeCompare\"\nLIT_MAGIC_STRING_SET_UTC_MINUTES_UL = \"setUTCMinutes\"\nLIT_MAGIC_STRING_SET_UTC_SECONDS_UL = \"setUTCSeconds\"\nLIT_MAGIC_STRING_TO_EXPONENTIAL_UL = \"toExponential\"\nLIT_MAGIC_STRING_ARRAY_ITERATOR_UL = \"Array Iterator\"\nLIT_MAGIC_STRING_ASYNC_GENERATOR_UL = \"AsyncGenerator\"\nLIT_MAGIC_STRING_BIGUINT64_ARRAY_UL = \"BigUint64Array\"\nLIT_MAGIC_STRING_REFERENCE_ERROR_UL = \"ReferenceError\"\nLIT_MAGIC_STRING_DEFINE_PROPERTY_UL = \"defineProperty\"\nLIT_MAGIC_STRING_DELETE_PROPERTY_UL = \"deleteProperty\"\nLIT_MAGIC_STRING_GET_PROTOTYPE_OF_UL = \"getPrototypeOf\"\nLIT_MAGIC_STRING_GET_UTC_FULL_YEAR_UL = \"getUTCFullYear\"\nLIT_MAGIC_STRING_HAS_OWN_PROPERTY_UL = \"hasOwnProperty\"\nLIT_MAGIC_STRING_SET_PROTOTYPE_OF_UL = \"setPrototypeOf\"\nLIT_MAGIC_STRING_SET_UTC_FULL_YEAR_UL = \"setUTCFullYear\"\nLIT_MAGIC_STRING_TO_LOCALE_STRING_UL = \"toLocaleString\"\nLIT_MAGIC_STRING_STRING_ITERATOR_UL = \"String Iterator\"\nLIT_MAGIC_STRING_GET_MILLISECONDS_UL = \"getMilliseconds\"\nLIT_MAGIC_STRING_SET_MILLISECONDS_UL = \"setMilliseconds\"\nLIT_MAGIC_STRING_DEFINE_PROPERTIES_UL = \"defineProperties\"\nLIT_MAGIC_STRING_MAX_SAFE_INTEGER_U = \"MAX_SAFE_INTEGER\"\nLIT_MAGIC_STRING_MIN_SAFE_INTEGER_U = \"MIN_SAFE_INTEGER\"\nLIT_MAGIC_STRING_DEFINE_GETTER = \"__defineGetter__\"\nLIT_MAGIC_STRING_DEFINE_SETTER = \"__defineSetter__\"\nLIT_MAGIC_STRING_LOOKUP_GETTER = \"__lookupGetter__\"\nLIT_MAGIC_STRING_LOOKUP_SETTER = \"__lookupSetter__\"\nLIT_MAGIC_STRING_BYTES_PER_ELEMENT_U = \"BYTES_PER_ELEMENT\"\nLIT_MAGIC_STRING_NEGATIVE_INFINITY_U = \"NEGATIVE_INFINITY\"\nLIT_MAGIC_STRING_POSITIVE_INFINITY_U = \"POSITIVE_INFINITY\"\nLIT_MAGIC_STRING_GENERATOR_FUNCTION_UL = \"GeneratorFunction\"\nLIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL = \"Uint8ClampedArray\"\nLIT_MAGIC_STRING_GET_TIMEZONE_OFFSET_UL = \"getTimezoneOffset\"\nLIT_MAGIC_STRING_PREVENT_EXTENSIONS_UL = \"preventExtensions\"\nLIT_MAGIC_STRING_TO_LOCALE_LOWER_CASE_UL = \"toLocaleLowerCase\"\nLIT_MAGIC_STRING_TO_LOCALE_UPPER_CASE_UL = \"toLocaleUpperCase\"\nLIT_MAGIC_STRING_DECODE_URI_COMPONENT = \"decodeURIComponent\"\nLIT_MAGIC_STRING_ENCODE_URI_COMPONENT = \"encodeURIComponent\"\nLIT_MAGIC_STRING_GET_UTC_MILLISECONDS_UL = \"getUTCMilliseconds\"\nLIT_MAGIC_STRING_IS_CONCAT_SPREADABLE = \"isConcatSpreadable\"\nLIT_MAGIC_STRING_SET_UTC_MILLISECONDS_UL = \"setUTCMilliseconds\"\nLIT_MAGIC_STRING_TO_LOCALE_DATE_STRING_UL = \"toLocaleDateString\"\nLIT_MAGIC_STRING_TO_LOCALE_TIME_STRING_UL = \"toLocaleTimeString\"\nLIT_MAGIC_STRING_GET_OWN_PROPERTY_NAMES_UL = \"getOwnPropertyNames\"\nLIT_MAGIC_STRING_PROPERTY_IS_ENUMERABLE_UL = \"propertyIsEnumerable\"\nLIT_MAGIC_STRING_GET_OWN_PROPERTY_SYMBOLS_UL = \"getOwnPropertySymbols\"\nLIT_MAGIC_STRING_REGEXP_STRING_ITERATOR_UL = \"RegExp String Iterator\"\nLIT_MAGIC_STRING_ASYNC_GENERATOR_FUNCTION_UL = \"AsyncGeneratorFunction\"\nLIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL = \"getOwnPropertyDescriptor\"\nLIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTORS_UL = \"getOwnPropertyDescriptors\"\nLIT_MAGIC_STRING__FUNCTION_TO_STRING = \"function(){/* ecmascript */}\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-strings.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"lit-strings.h\"\n\n#include \"jrt-libc-includes.h\"\n\n/**\n * Validate utf-8 string\n *\n * NOTE:\n *   Isolated surrogates are allowed.\n *   Correct pair of surrogates is not allowed, it should be represented as 4-byte utf-8 character.\n *\n * @return true if utf-8 string is well-formed\n *         false otherwise\n */\nbool\nlit_is_valid_utf8_string (const lit_utf8_byte_t *utf8_buf_p, /**< utf-8 string */\n                          lit_utf8_size_t buf_size) /**< string size */\n{\n  lit_utf8_size_t idx = 0;\n\n  bool is_prev_code_point_high_surrogate = false;\n  while (idx < buf_size)\n  {\n    lit_utf8_byte_t c = utf8_buf_p[idx++];\n    if ((c & LIT_UTF8_1_BYTE_MASK) == LIT_UTF8_1_BYTE_MARKER)\n    {\n      is_prev_code_point_high_surrogate = false;\n      continue;\n    }\n\n    lit_code_point_t code_point = 0;\n    lit_code_point_t min_code_point = 0;\n    lit_utf8_size_t extra_bytes_count;\n    if ((c & LIT_UTF8_2_BYTE_MASK) == LIT_UTF8_2_BYTE_MARKER)\n    {\n      extra_bytes_count = 1;\n      min_code_point = LIT_UTF8_2_BYTE_CODE_POINT_MIN;\n      code_point = ((uint32_t) (c & LIT_UTF8_LAST_5_BITS_MASK));\n    }\n    else if ((c & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER)\n    {\n      extra_bytes_count = 2;\n      min_code_point = LIT_UTF8_3_BYTE_CODE_POINT_MIN;\n      code_point = ((uint32_t) (c & LIT_UTF8_LAST_4_BITS_MASK));\n    }\n    else if ((c & LIT_UTF8_4_BYTE_MASK) == LIT_UTF8_4_BYTE_MARKER)\n    {\n      extra_bytes_count = 3;\n      min_code_point = LIT_UTF8_4_BYTE_CODE_POINT_MIN;\n      code_point = ((uint32_t) (c & LIT_UTF8_LAST_3_BITS_MASK));\n    }\n    else\n    {\n      /* utf-8 string could not contain 5- and 6-byte sequences. */\n      return false;\n    }\n\n    if (idx + extra_bytes_count > buf_size)\n    {\n      /* utf-8 string breaks in the middle */\n      return false;\n    }\n\n    for (lit_utf8_size_t offset = 0; offset < extra_bytes_count; ++offset)\n    {\n      c = utf8_buf_p[idx + offset];\n      if ((c & LIT_UTF8_EXTRA_BYTE_MASK) != LIT_UTF8_EXTRA_BYTE_MARKER)\n      {\n        /* invalid continuation byte */\n        return false;\n      }\n      code_point <<= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n      code_point |= (c & LIT_UTF8_LAST_6_BITS_MASK);\n    }\n\n    if (code_point < min_code_point\n        || code_point > LIT_UNICODE_CODE_POINT_MAX)\n    {\n      /* utf-8 string doesn't encode valid unicode code point */\n      return false;\n    }\n\n    if (code_point >= LIT_UTF16_HIGH_SURROGATE_MIN\n        && code_point <= LIT_UTF16_HIGH_SURROGATE_MAX)\n    {\n      is_prev_code_point_high_surrogate = true;\n    }\n    else if (code_point >= LIT_UTF16_LOW_SURROGATE_MIN\n             && code_point <= LIT_UTF16_LOW_SURROGATE_MAX\n             && is_prev_code_point_high_surrogate)\n    {\n      /* sequence of high and low surrogate is not allowed */\n      return false;\n    }\n    else\n    {\n      is_prev_code_point_high_surrogate = false;\n    }\n\n    idx += extra_bytes_count;\n  }\n\n  return true;\n} /* lit_is_valid_utf8_string */\n\n/**\n * Validate cesu-8 string\n *\n * @return true if cesu-8 string is well-formed\n *         false otherwise\n */\nbool\nlit_is_valid_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, /**< cesu-8 string */\n                           lit_utf8_size_t buf_size) /**< string size */\n{\n  lit_utf8_size_t idx = 0;\n\n  while (idx < buf_size)\n  {\n    lit_utf8_byte_t c = cesu8_buf_p[idx++];\n    if ((c & LIT_UTF8_1_BYTE_MASK) == LIT_UTF8_1_BYTE_MARKER)\n    {\n      continue;\n    }\n\n    lit_code_point_t code_point = 0;\n    lit_code_point_t min_code_point = 0;\n    lit_utf8_size_t extra_bytes_count;\n    if ((c & LIT_UTF8_2_BYTE_MASK) == LIT_UTF8_2_BYTE_MARKER)\n    {\n      extra_bytes_count = 1;\n      min_code_point = LIT_UTF8_2_BYTE_CODE_POINT_MIN;\n      code_point = ((uint32_t) (c & LIT_UTF8_LAST_5_BITS_MASK));\n    }\n    else if ((c & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER)\n    {\n      extra_bytes_count = 2;\n      min_code_point = LIT_UTF8_3_BYTE_CODE_POINT_MIN;\n      code_point = ((uint32_t) (c & LIT_UTF8_LAST_4_BITS_MASK));\n    }\n    else\n    {\n      return false;\n    }\n\n    if (idx + extra_bytes_count > buf_size)\n    {\n      /* cesu-8 string breaks in the middle */\n      return false;\n    }\n\n    for (lit_utf8_size_t offset = 0; offset < extra_bytes_count; ++offset)\n    {\n      c = cesu8_buf_p[idx + offset];\n      if ((c & LIT_UTF8_EXTRA_BYTE_MASK) != LIT_UTF8_EXTRA_BYTE_MARKER)\n      {\n        /* invalid continuation byte */\n        return false;\n      }\n      code_point <<= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n      code_point |= (c & LIT_UTF8_LAST_6_BITS_MASK);\n    }\n\n    if (code_point < min_code_point)\n    {\n      /* cesu-8 string doesn't encode valid unicode code point */\n      return false;\n    }\n\n    idx += extra_bytes_count;\n  }\n\n  return true;\n} /* lit_is_valid_cesu8_string */\n\n/**\n * Check if the code point is UTF-16 low surrogate\n *\n * @return true / false\n */\nbool\nlit_is_code_point_utf16_low_surrogate (lit_code_point_t code_point) /**< code point */\n{\n  return LIT_UTF16_LOW_SURROGATE_MIN <= code_point && code_point <= LIT_UTF16_LOW_SURROGATE_MAX;\n} /* lit_is_code_point_utf16_low_surrogate */\n\n/**\n * Check if the code point is UTF-16 high surrogate\n *\n * @return true / false\n */\nbool\nlit_is_code_point_utf16_high_surrogate (lit_code_point_t code_point) /**< code point */\n{\n  return LIT_UTF16_HIGH_SURROGATE_MIN <= code_point && code_point <= LIT_UTF16_HIGH_SURROGATE_MAX;\n} /* lit_is_code_point_utf16_high_surrogate */\n\n/**\n * Represents code point (>0xFFFF) as surrogate pair and returns its lower part\n *\n * @return lower code_unit of the surrogate pair\n */\nstatic ecma_char_t\nconvert_code_point_to_low_surrogate (lit_code_point_t code_point) /**< code point, should be > 0xFFFF */\n{\n  JERRY_ASSERT (code_point > LIT_UTF16_CODE_UNIT_MAX);\n\n  ecma_char_t code_unit_bits;\n  code_unit_bits = (ecma_char_t) (code_point & LIT_UTF16_LAST_10_BITS_MASK);\n\n  return (ecma_char_t) (LIT_UTF16_LOW_SURROGATE_MARKER | code_unit_bits);\n} /* convert_code_point_to_low_surrogate */\n\n/**\n * Represents code point (>0xFFFF) as surrogate pair and returns its higher part\n *\n * @return higher code_unit of the surrogate pair\n */\nstatic ecma_char_t\nconvert_code_point_to_high_surrogate (lit_code_point_t code_point) /**< code point, should be > 0xFFFF */\n{\n  JERRY_ASSERT (code_point > LIT_UTF16_CODE_UNIT_MAX);\n  JERRY_ASSERT (code_point <= LIT_UNICODE_CODE_POINT_MAX);\n\n  ecma_char_t code_unit_bits;\n  code_unit_bits = (ecma_char_t) ((code_point - LIT_UTF16_FIRST_SURROGATE_CODE_POINT) >> LIT_UTF16_BITS_IN_SURROGATE);\n\n  return (LIT_UTF16_HIGH_SURROGATE_MARKER | code_unit_bits);\n} /* convert_code_point_to_high_surrogate */\n\n/**\n * UTF16 Encoding method for a code point\n *\n * See also:\n *          ECMA-262 v6, 10.1.1\n *\n * @return uint8_t, the number of returning code points\n */\nuint8_t\nlit_utf16_encode_code_point (lit_code_point_t cp, /**< the code point we encode */\n                             ecma_char_t *cu_p) /**< result of the encoding */\n{\n  if (cp <= LIT_UTF16_CODE_UNIT_MAX)\n  {\n    cu_p[0] = (ecma_char_t) cp;\n    return 1;\n  }\n\n  cu_p[0] = convert_code_point_to_high_surrogate (cp);\n  cu_p[1] = convert_code_point_to_low_surrogate (cp);\n  return 2;\n} /* lit_utf16_encode_code_point */\n\n/**\n * Calculate size of a zero-terminated utf-8 string\n *\n * NOTE:\n *   - string cannot be NULL\n *   - string should not contain zero characters in the middle\n *\n * @return size of a string\n */\nlit_utf8_size_t\nlit_zt_utf8_string_size (const lit_utf8_byte_t *utf8_str_p) /**< zero-terminated utf-8 string */\n{\n  JERRY_ASSERT (utf8_str_p != NULL);\n  return (lit_utf8_size_t) strlen ((const char *) utf8_str_p);\n} /* lit_zt_utf8_string_size */\n\n/**\n * Calculate length of a cesu-8 encoded string\n *\n * @return UTF-16 code units count\n */\nlit_utf8_size_t\nlit_utf8_string_length (const lit_utf8_byte_t *utf8_buf_p, /**< utf-8 string */\n                        lit_utf8_size_t utf8_buf_size) /**< string size */\n{\n  lit_utf8_size_t length = 0;\n  lit_utf8_size_t size = 0;\n\n  while (size < utf8_buf_size)\n  {\n    size += lit_get_unicode_char_size_by_utf8_first_byte (*(utf8_buf_p + size));\n    length++;\n  }\n\n  JERRY_ASSERT (size == utf8_buf_size);\n\n  return length;\n} /* lit_utf8_string_length */\n\n/**\n * Calculate the required size of an utf-8 encoded string from cesu-8 encoded string\n *\n * @return size of an utf-8 encoded string\n */\nlit_utf8_size_t\nlit_get_utf8_size_of_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, /**< cesu-8 string */\n                                   lit_utf8_size_t cesu8_buf_size) /**< string size */\n{\n  lit_utf8_size_t offset = 0;\n  lit_utf8_size_t utf8_buf_size = cesu8_buf_size;\n  ecma_char_t prev_ch = 0;\n\n  while (offset < cesu8_buf_size)\n  {\n    ecma_char_t ch;\n    offset += lit_read_code_unit_from_utf8 (cesu8_buf_p + offset, &ch);\n\n    if (lit_is_code_point_utf16_low_surrogate (ch) && lit_is_code_point_utf16_high_surrogate (prev_ch))\n    {\n      utf8_buf_size -= 2;\n    }\n\n    prev_ch = ch;\n  }\n\n  JERRY_ASSERT (offset == cesu8_buf_size);\n\n  return utf8_buf_size;\n} /* lit_get_utf8_size_of_cesu8_string */\n\n/**\n * Calculate length of an utf-8 encoded string from cesu-8 encoded string\n *\n * @return length of an utf-8 encoded string\n */\nlit_utf8_size_t\nlit_get_utf8_length_of_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, /**< cesu-8 string */\n                                     lit_utf8_size_t cesu8_buf_size) /**< string size */\n{\n  lit_utf8_size_t offset = 0;\n  lit_utf8_size_t utf8_length = 0;\n  ecma_char_t prev_ch = 0;\n\n  while (offset < cesu8_buf_size)\n  {\n    ecma_char_t ch;\n    offset += lit_read_code_unit_from_utf8 (cesu8_buf_p + offset, &ch);\n\n    if (!lit_is_code_point_utf16_low_surrogate (ch) || !lit_is_code_point_utf16_high_surrogate (prev_ch))\n    {\n      utf8_length++;\n    }\n\n    prev_ch = ch;\n  }\n\n  JERRY_ASSERT (offset == cesu8_buf_size);\n\n  return utf8_length;\n} /* lit_get_utf8_length_of_cesu8_string */\n\n/**\n * Decodes a unicode code point from non-empty utf-8-encoded buffer\n *\n * @return number of bytes occupied by code point in the string\n */\nlit_utf8_size_t\nlit_read_code_point_from_utf8 (const lit_utf8_byte_t *buf_p, /**< buffer with characters */\n                               lit_utf8_size_t buf_size, /**< size of the buffer in bytes */\n                               lit_code_point_t *code_point) /**< [out] code point */\n{\n  JERRY_ASSERT (buf_p && buf_size);\n\n  lit_utf8_byte_t c = buf_p[0];\n  if ((c & LIT_UTF8_1_BYTE_MASK) == LIT_UTF8_1_BYTE_MARKER)\n  {\n    *code_point = (lit_code_point_t) (c & LIT_UTF8_LAST_7_BITS_MASK);\n    return 1;\n  }\n\n  lit_code_point_t ret = LIT_UNICODE_CODE_POINT_NULL;\n  lit_utf8_size_t bytes_count = 0;\n  if ((c & LIT_UTF8_2_BYTE_MASK) == LIT_UTF8_2_BYTE_MARKER)\n  {\n    bytes_count = 2;\n    ret = ((lit_code_point_t) (c & LIT_UTF8_LAST_5_BITS_MASK));\n  }\n  else if ((c & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER)\n  {\n    bytes_count = 3;\n    ret = ((lit_code_point_t) (c & LIT_UTF8_LAST_4_BITS_MASK));\n  }\n  else\n  {\n    JERRY_ASSERT ((c & LIT_UTF8_4_BYTE_MASK) == LIT_UTF8_4_BYTE_MARKER);\n    bytes_count = 4;\n    ret = ((lit_code_point_t) (c & LIT_UTF8_LAST_3_BITS_MASK));\n  }\n\n  JERRY_ASSERT (buf_size >= bytes_count);\n\n  for (uint32_t i = 1; i < bytes_count; ++i)\n  {\n    ret <<= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n    ret |= (buf_p[i] & LIT_UTF8_LAST_6_BITS_MASK);\n  }\n\n  *code_point = ret;\n  return bytes_count;\n} /* lit_read_code_point_from_utf8 */\n\n/**\n * Decodes a unicode code unit from non-empty cesu-8-encoded buffer\n *\n * @return number of bytes occupied by code point in the string\n */\nlit_utf8_size_t\nlit_read_code_unit_from_utf8 (const lit_utf8_byte_t *buf_p, /**< buffer with characters */\n                              ecma_char_t *code_point) /**< [out] code point */\n{\n  JERRY_ASSERT (buf_p);\n\n  lit_utf8_byte_t c = buf_p[0];\n  if ((c & LIT_UTF8_1_BYTE_MASK) == LIT_UTF8_1_BYTE_MARKER)\n  {\n    *code_point = (ecma_char_t) (c & LIT_UTF8_LAST_7_BITS_MASK);\n    return 1;\n  }\n\n  lit_code_point_t ret = LIT_UNICODE_CODE_POINT_NULL;\n  lit_utf8_size_t bytes_count;\n  if ((c & LIT_UTF8_2_BYTE_MASK) == LIT_UTF8_2_BYTE_MARKER)\n  {\n    bytes_count = 2;\n    ret = ((lit_code_point_t) (c & LIT_UTF8_LAST_5_BITS_MASK));\n  }\n  else\n  {\n    JERRY_ASSERT ((c & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER);\n    bytes_count = 3;\n    ret = ((lit_code_point_t) (c & LIT_UTF8_LAST_4_BITS_MASK));\n  }\n\n  for (uint32_t i = 1; i < bytes_count; ++i)\n  {\n    ret <<= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n    ret |= (buf_p[i] & LIT_UTF8_LAST_6_BITS_MASK);\n  }\n\n  JERRY_ASSERT (ret <= LIT_UTF16_CODE_UNIT_MAX);\n  *code_point = (ecma_char_t) ret;\n  return bytes_count;\n} /* lit_read_code_unit_from_utf8 */\n\n/**\n * Decodes a unicode code unit from non-empty cesu-8-encoded buffer\n *\n * @return number of bytes occupied by code point in the string\n */\nlit_utf8_size_t\nlit_read_prev_code_unit_from_utf8 (const lit_utf8_byte_t *buf_p, /**< buffer with characters */\n                                   ecma_char_t *code_point) /**< [out] code point */\n{\n  JERRY_ASSERT (buf_p);\n\n  lit_utf8_decr (&buf_p);\n  return lit_read_code_unit_from_utf8 (buf_p, code_point);\n} /* lit_read_prev_code_unit_from_utf8 */\n\n/**\n * Decodes a unicode code unit from non-empty cesu-8-encoded buffer\n *\n * @return next code unit\n */\necma_char_t\nlit_cesu8_read_next (const lit_utf8_byte_t **buf_p) /**< [in,out] buffer with characters */\n{\n  JERRY_ASSERT (*buf_p);\n  ecma_char_t ch;\n\n  *buf_p += lit_read_code_unit_from_utf8 (*buf_p, &ch);\n\n  return ch;\n} /* lit_cesu8_read_next */\n\n/**\n * Decodes a unicode code unit from non-empty cesu-8-encoded buffer\n *\n * @return previous code unit\n */\necma_char_t\nlit_cesu8_read_prev (const lit_utf8_byte_t **buf_p) /**< [in,out] buffer with characters */\n{\n  JERRY_ASSERT (*buf_p);\n  ecma_char_t ch;\n\n  lit_utf8_decr (buf_p);\n  lit_read_code_unit_from_utf8 (*buf_p, &ch);\n\n  return ch;\n} /* lit_cesu8_read_prev */\n\n/**\n * Decodes a unicode code unit from non-empty cesu-8-encoded buffer\n *\n * @return next code unit\n */\necma_char_t JERRY_ATTR_NOINLINE\nlit_cesu8_peek_next (const lit_utf8_byte_t *buf_p) /**< [in,out] buffer with characters */\n{\n  JERRY_ASSERT (buf_p != NULL);\n  ecma_char_t ch;\n\n  lit_read_code_unit_from_utf8 (buf_p, &ch);\n\n  return ch;\n} /* lit_cesu8_peek_next */\n\n/**\n * Decodes a unicode code unit from non-empty cesu-8-encoded buffer\n *\n * @return previous code unit\n */\necma_char_t JERRY_ATTR_NOINLINE\nlit_cesu8_peek_prev (const lit_utf8_byte_t *buf_p) /**< [in,out] buffer with characters */\n{\n  JERRY_ASSERT (buf_p != NULL);\n  ecma_char_t ch;\n\n  lit_read_prev_code_unit_from_utf8 (buf_p, &ch);\n\n  return ch;\n} /* lit_cesu8_peek_prev */\n\n/**\n * Increase cesu-8 encoded string pointer by one code unit.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nlit_utf8_incr (const lit_utf8_byte_t **buf_p) /**< [in,out] buffer with characters */\n{\n  JERRY_ASSERT (*buf_p);\n\n  *buf_p += lit_get_unicode_char_size_by_utf8_first_byte (**buf_p);\n} /* lit_utf8_incr */\n\n/**\n * Decrease cesu-8 encoded string pointer by one code unit.\n */\nvoid\nlit_utf8_decr (const lit_utf8_byte_t **buf_p) /**< [in,out] buffer with characters */\n{\n  JERRY_ASSERT (*buf_p);\n  const lit_utf8_byte_t *current_p = *buf_p;\n\n  do\n  {\n    current_p--;\n  }\n  while ((*(current_p) & LIT_UTF8_EXTRA_BYTE_MASK) == LIT_UTF8_EXTRA_BYTE_MARKER);\n\n  *buf_p = current_p;\n} /* lit_utf8_decr */\n\n/**\n * Calc hash using the specified hash_basis.\n *\n * NOTE:\n *   This is implementation of FNV-1a hash function, which is released into public domain.\n *   Constants used, are carefully picked primes by the authors.\n *   More info: http://www.isthe.com/chongo/tech/comp/fnv/\n *\n * @return ecma-string's hash\n */\nextern inline lit_string_hash_t JERRY_ATTR_ALWAYS_INLINE\nlit_utf8_string_hash_combine (lit_string_hash_t hash_basis, /**< hash to be combined with */\n                              const lit_utf8_byte_t *utf8_buf_p, /**< characters buffer */\n                              lit_utf8_size_t utf8_buf_size) /**< number of characters in the buffer */\n{\n  JERRY_ASSERT (utf8_buf_p != NULL || utf8_buf_size == 0);\n\n  uint32_t hash = hash_basis;\n\n  for (uint32_t i = 0; i < utf8_buf_size; i++)\n  {\n    /* 16777619 is 32 bit FNV_prime = 2^24 + 2^8 + 0x93 = 16777619 */\n    hash = (hash ^ utf8_buf_p[i]) * 16777619;\n  }\n\n  return (lit_string_hash_t) hash;\n} /* lit_utf8_string_hash_combine */\n\n/**\n * Calculate hash from the buffer.\n *\n * @return ecma-string's hash\n */\nextern inline lit_string_hash_t JERRY_ATTR_ALWAYS_INLINE\nlit_utf8_string_calc_hash (const lit_utf8_byte_t *utf8_buf_p, /**< characters buffer */\n                           lit_utf8_size_t utf8_buf_size) /**< number of characters in the buffer */\n{\n  JERRY_ASSERT (utf8_buf_p != NULL || utf8_buf_size == 0);\n\n  /* 32 bit offset_basis for FNV = 2166136261 */\n  return lit_utf8_string_hash_combine ((lit_string_hash_t) 2166136261, utf8_buf_p, utf8_buf_size);\n} /* lit_utf8_string_calc_hash */\n\n/**\n * Return code unit at the specified position in string\n *\n * NOTE:\n *   code_unit_offset should be less then string's length\n *\n * @return code unit value\n */\necma_char_t\nlit_utf8_string_code_unit_at (const lit_utf8_byte_t *utf8_buf_p, /**< utf-8 string */\n                              lit_utf8_size_t utf8_buf_size, /**< string size in bytes */\n                              lit_utf8_size_t code_unit_offset) /**< ofset of a code_unit */\n{\n  lit_utf8_byte_t *current_p = (lit_utf8_byte_t *) utf8_buf_p;\n  ecma_char_t code_unit;\n\n  do\n  {\n    JERRY_ASSERT (current_p < utf8_buf_p + utf8_buf_size);\n    current_p += lit_read_code_unit_from_utf8 (current_p, &code_unit);\n  }\n  while (code_unit_offset--);\n\n  return code_unit;\n} /* lit_utf8_string_code_unit_at */\n\n/**\n * Get CESU-8 encoded size of character\n *\n * @return number of bytes occupied in CESU-8\n */\nextern inline lit_utf8_size_t JERRY_ATTR_ALWAYS_INLINE\nlit_get_unicode_char_size_by_utf8_first_byte (const lit_utf8_byte_t first_byte) /**< buffer with characters */\n{\n  if ((first_byte & LIT_UTF8_1_BYTE_MASK) == LIT_UTF8_1_BYTE_MARKER)\n  {\n    return 1;\n  }\n  else if ((first_byte & LIT_UTF8_2_BYTE_MASK) == LIT_UTF8_2_BYTE_MARKER)\n  {\n    return 2;\n  }\n  else\n  {\n    JERRY_ASSERT ((first_byte & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER);\n    return 3;\n  }\n} /* lit_get_unicode_char_size_by_utf8_first_byte */\n\n/**\n * Convert code unit to cesu-8 representation\n *\n * @return byte count required to represent the code unit\n */\nlit_utf8_size_t\nlit_code_unit_to_utf8 (ecma_char_t code_unit, /**< code unit */\n                       lit_utf8_byte_t *buf_p) /**< buffer where to store the result and its size\n                                                *   should be at least LIT_UTF8_MAX_BYTES_IN_CODE_UNIT */\n{\n  if (code_unit <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n  {\n    buf_p[0] = (lit_utf8_byte_t) code_unit;\n    return 1;\n  }\n  else if (code_unit <= LIT_UTF8_2_BYTE_CODE_POINT_MAX)\n  {\n    uint32_t code_unit_bits = code_unit;\n    lit_utf8_byte_t second_byte_bits = (lit_utf8_byte_t) (code_unit_bits & LIT_UTF8_LAST_6_BITS_MASK);\n    code_unit_bits >>= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n\n    lit_utf8_byte_t first_byte_bits = (lit_utf8_byte_t) (code_unit_bits & LIT_UTF8_LAST_5_BITS_MASK);\n    JERRY_ASSERT (first_byte_bits == code_unit_bits);\n\n    buf_p[0] = LIT_UTF8_2_BYTE_MARKER | first_byte_bits;\n    buf_p[1] = LIT_UTF8_EXTRA_BYTE_MARKER | second_byte_bits;\n    return 2;\n  }\n  else\n  {\n    uint32_t code_unit_bits = code_unit;\n    lit_utf8_byte_t third_byte_bits = (lit_utf8_byte_t) (code_unit_bits & LIT_UTF8_LAST_6_BITS_MASK);\n    code_unit_bits >>= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n\n    lit_utf8_byte_t second_byte_bits = (lit_utf8_byte_t) (code_unit_bits & LIT_UTF8_LAST_6_BITS_MASK);\n    code_unit_bits >>= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n\n    lit_utf8_byte_t first_byte_bits = (lit_utf8_byte_t) (code_unit_bits & LIT_UTF8_LAST_4_BITS_MASK);\n    JERRY_ASSERT (first_byte_bits == code_unit_bits);\n\n    buf_p[0] = LIT_UTF8_3_BYTE_MARKER | first_byte_bits;\n    buf_p[1] = LIT_UTF8_EXTRA_BYTE_MARKER | second_byte_bits;\n    buf_p[2] = LIT_UTF8_EXTRA_BYTE_MARKER | third_byte_bits;\n    return 3;\n  }\n} /* lit_code_unit_to_utf8 */\n\n/**\n * Convert code point to cesu-8 representation\n *\n * @return byte count required to represent the code point\n */\nlit_utf8_size_t\nlit_code_point_to_cesu8 (lit_code_point_t code_point, /**< code point */\n                         lit_utf8_byte_t *buf) /**< buffer where to store the result,\n                                                *   its size should be at least 6 bytes */\n{\n  if (code_point <= LIT_UTF16_CODE_UNIT_MAX)\n  {\n    return lit_code_unit_to_utf8 ((ecma_char_t) code_point, buf);\n  }\n  else\n  {\n    lit_utf8_size_t offset = lit_code_unit_to_utf8 (convert_code_point_to_high_surrogate (code_point), buf);\n    offset += lit_code_unit_to_utf8 (convert_code_point_to_low_surrogate (code_point), buf + offset);\n    return offset;\n  }\n} /* lit_code_point_to_cesu8 */\n\n/**\n * Convert code point to utf-8 representation\n *\n * @return byte count required to represent the code point\n */\nlit_utf8_size_t\nlit_code_point_to_utf8 (lit_code_point_t code_point, /**< code point */\n                        lit_utf8_byte_t *buf) /**< buffer where to store the result,\n                                              *   its size should be at least 4 bytes */\n{\n  if (code_point <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n  {\n    buf[0] = (lit_utf8_byte_t) code_point;\n    return 1;\n  }\n  else if (code_point <= LIT_UTF8_2_BYTE_CODE_POINT_MAX)\n  {\n    uint32_t code_point_bits = code_point;\n    lit_utf8_byte_t second_byte_bits = (lit_utf8_byte_t) (code_point_bits & LIT_UTF8_LAST_6_BITS_MASK);\n    code_point_bits >>= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n\n    lit_utf8_byte_t first_byte_bits = (lit_utf8_byte_t) (code_point_bits & LIT_UTF8_LAST_5_BITS_MASK);\n    JERRY_ASSERT (first_byte_bits == code_point_bits);\n\n    buf[0] = LIT_UTF8_2_BYTE_MARKER | first_byte_bits;\n    buf[1] = LIT_UTF8_EXTRA_BYTE_MARKER | second_byte_bits;\n    return 2;\n  }\n  else if (code_point <= LIT_UTF8_3_BYTE_CODE_POINT_MAX)\n  {\n    uint32_t code_point_bits = code_point;\n    lit_utf8_byte_t third_byte_bits = (lit_utf8_byte_t) (code_point_bits & LIT_UTF8_LAST_6_BITS_MASK);\n    code_point_bits >>= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n\n    lit_utf8_byte_t second_byte_bits = (lit_utf8_byte_t) (code_point_bits & LIT_UTF8_LAST_6_BITS_MASK);\n    code_point_bits >>= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n\n    lit_utf8_byte_t first_byte_bits = (lit_utf8_byte_t) (code_point_bits & LIT_UTF8_LAST_4_BITS_MASK);\n    JERRY_ASSERT (first_byte_bits == code_point_bits);\n\n    buf[0] = LIT_UTF8_3_BYTE_MARKER | first_byte_bits;\n    buf[1] = LIT_UTF8_EXTRA_BYTE_MARKER | second_byte_bits;\n    buf[2] = LIT_UTF8_EXTRA_BYTE_MARKER | third_byte_bits;\n    return 3;\n  }\n  else\n  {\n    JERRY_ASSERT (code_point <= LIT_UTF8_4_BYTE_CODE_POINT_MAX);\n\n    uint32_t code_point_bits = code_point;\n    lit_utf8_byte_t fourth_byte_bits = (lit_utf8_byte_t) (code_point_bits & LIT_UTF8_LAST_6_BITS_MASK);\n    code_point_bits >>= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n\n    lit_utf8_byte_t third_byte_bits = (lit_utf8_byte_t) (code_point_bits & LIT_UTF8_LAST_6_BITS_MASK);\n    code_point_bits >>= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n\n    lit_utf8_byte_t second_byte_bits = (lit_utf8_byte_t) (code_point_bits & LIT_UTF8_LAST_6_BITS_MASK);\n    code_point_bits >>= LIT_UTF8_BITS_IN_EXTRA_BYTES;\n\n    lit_utf8_byte_t first_byte_bits = (lit_utf8_byte_t) (code_point_bits & LIT_UTF8_LAST_3_BITS_MASK);\n    JERRY_ASSERT (first_byte_bits == code_point_bits);\n\n    buf[0] = LIT_UTF8_4_BYTE_MARKER | first_byte_bits;\n    buf[1] = LIT_UTF8_EXTRA_BYTE_MARKER | second_byte_bits;\n    buf[2] = LIT_UTF8_EXTRA_BYTE_MARKER | third_byte_bits;\n    buf[3] = LIT_UTF8_EXTRA_BYTE_MARKER | fourth_byte_bits;\n    return 4;\n  }\n} /* lit_code_point_to_utf8 */\n\n/**\n * Convert cesu-8 string to an utf-8 string and put it into the buffer.\n * It is the caller's responsibility to make sure that the string fits in the buffer.\n *\n * @return number of bytes copied to the buffer.\n */\nlit_utf8_size_t\nlit_convert_cesu8_string_to_utf8_string (const lit_utf8_byte_t *cesu8_string, /**< cesu-8 string */\n                                         lit_utf8_size_t cesu8_size, /**< size of cesu-8 string */\n                                         lit_utf8_byte_t *utf8_string, /**< destination utf-8 buffer pointer\n                                                                        * (can be NULL if buffer_size == 0) */\n                                         lit_utf8_size_t utf8_size) /**< size of utf-8 buffer */\n{\n  const lit_utf8_byte_t *cesu8_pos = cesu8_string;\n  const lit_utf8_byte_t *cesu8_end_pos = cesu8_string + cesu8_size;\n\n  lit_utf8_byte_t *utf8_pos = utf8_string;\n  lit_utf8_byte_t *utf8_end_pos = utf8_string + utf8_size;\n\n  lit_utf8_size_t size = 0;\n\n  ecma_char_t prev_ch = 0;\n  lit_utf8_size_t prev_ch_size = 0;\n\n  while (cesu8_pos < cesu8_end_pos)\n  {\n    ecma_char_t ch;\n    lit_utf8_size_t code_unit_size = lit_read_code_unit_from_utf8 (cesu8_pos, &ch);\n\n    if (lit_is_code_point_utf16_low_surrogate (ch) && lit_is_code_point_utf16_high_surrogate (prev_ch))\n    {\n      JERRY_ASSERT (code_unit_size == prev_ch_size);\n      utf8_pos -= prev_ch_size;\n      lit_code_point_t code_point = lit_convert_surrogate_pair_to_code_point (prev_ch, ch);\n      lit_code_point_to_utf8 (code_point, utf8_pos);\n      size++;\n    }\n    else\n    {\n      memcpy (utf8_pos, cesu8_pos, code_unit_size);\n      size += code_unit_size;\n    }\n\n    utf8_pos = utf8_string + size;\n    cesu8_pos += code_unit_size;\n    prev_ch = ch;\n    prev_ch_size = code_unit_size;\n  }\n\n  JERRY_ASSERT (cesu8_pos == cesu8_end_pos);\n  JERRY_ASSERT (utf8_pos <= utf8_end_pos);\n\n  return size;\n} /* lit_convert_cesu8_string_to_utf8_string */\n\n/**\n * Convert surrogate pair to code point\n *\n * @return code point\n */\nlit_code_point_t\nlit_convert_surrogate_pair_to_code_point (ecma_char_t high_surrogate, /**< high surrogate code point */\n                                          ecma_char_t low_surrogate) /**< low surrogate code point */\n{\n  JERRY_ASSERT (lit_is_code_point_utf16_high_surrogate (high_surrogate));\n  JERRY_ASSERT (lit_is_code_point_utf16_low_surrogate (low_surrogate));\n\n  lit_code_point_t code_point;\n  code_point = (uint16_t) (high_surrogate - LIT_UTF16_HIGH_SURROGATE_MIN);\n  code_point <<= LIT_UTF16_BITS_IN_SURROGATE;\n\n  code_point += LIT_UTF16_FIRST_SURROGATE_CODE_POINT;\n\n  code_point |= (uint16_t) (low_surrogate - LIT_UTF16_LOW_SURROGATE_MIN);\n  return code_point;\n} /* lit_convert_surrogate_pair_to_code_point */\n\n/**\n * Relational compare of cesu-8 strings\n *\n * First string is less than second string if:\n *  - strings are not equal;\n *  - first string is prefix of second or is lexicographically less than second.\n *\n * @return true - if first string is less than second string,\n *         false - otherwise\n */\nbool lit_compare_utf8_strings_relational (const lit_utf8_byte_t *string1_p, /**< utf-8 string */\n                                          lit_utf8_size_t string1_size, /**< string size */\n                                          const lit_utf8_byte_t *string2_p, /**< utf-8 string */\n                                          lit_utf8_size_t string2_size) /**< string size */\n{\n  lit_utf8_byte_t *string1_pos = (lit_utf8_byte_t *) string1_p;\n  lit_utf8_byte_t *string2_pos = (lit_utf8_byte_t *) string2_p;\n  const lit_utf8_byte_t *string1_end_p = string1_p + string1_size;\n  const lit_utf8_byte_t *string2_end_p = string2_p + string2_size;\n\n  while (string1_pos < string1_end_p && string2_pos < string2_end_p)\n  {\n    ecma_char_t ch1, ch2;\n    string1_pos += lit_read_code_unit_from_utf8 (string1_pos, &ch1);\n    string2_pos += lit_read_code_unit_from_utf8 (string2_pos, &ch2);\n\n    if (ch1 < ch2)\n    {\n      return true;\n    }\n    else if (ch1 > ch2)\n    {\n      return false;\n    }\n  }\n\n  return (string1_pos >= string1_end_p && string2_pos < string2_end_p);\n} /* lit_compare_utf8_strings_relational */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-strings.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef LIT_STRINGS_H\n#define LIT_STRINGS_H\n\n#include \"jrt.h\"\n#include \"lit-globals.h\"\n\n/**\n * Null character (used in few cases as utf-8 string end marker)\n */\n#define LIT_BYTE_NULL (0)\n\n/**\n * For the formal definition of Unicode transformation formats (UTF) see Section 3.9, Unicode Encoding Forms in The\n * Unicode Standard (http://www.unicode.org/versions/Unicode3.0.0/ch03.pdf#G7404).\n */\n#define LIT_UNICODE_CODE_POINT_NULL (0x0)\n#define LIT_UNICODE_CODE_POINT_MAX (0x10FFFF)\n\n#define LIT_UTF16_CODE_UNIT_MAX (0xFFFF)\n#define LIT_UTF16_FIRST_SURROGATE_CODE_POINT (0x10000)\n#define LIT_UTF16_LOW_SURROGATE_MARKER (0xDC00)\n#define LIT_UTF16_HIGH_SURROGATE_MARKER (0xD800)\n#define LIT_UTF16_HIGH_SURROGATE_MIN (0xD800)\n#define LIT_UTF16_HIGH_SURROGATE_MAX (0xDBFF)\n#define LIT_UTF16_LOW_SURROGATE_MIN (0xDC00)\n#define LIT_UTF16_LOW_SURROGATE_MAX (0xDFFF)\n#define LIT_UTF16_BITS_IN_SURROGATE (10)\n#define LIT_UTF16_LAST_10_BITS_MASK (0x3FF)\n\n#define LIT_UTF8_1_BYTE_MARKER (0x00)\n#define LIT_UTF8_2_BYTE_MARKER (0xC0)\n#define LIT_UTF8_3_BYTE_MARKER (0xE0)\n#define LIT_UTF8_4_BYTE_MARKER (0xF0)\n#define LIT_UTF8_EXTRA_BYTE_MARKER (0x80)\n\n#define LIT_UTF8_1_BYTE_MASK (0x80)\n#define LIT_UTF8_2_BYTE_MASK (0xE0)\n#define LIT_UTF8_3_BYTE_MASK (0xF0)\n#define LIT_UTF8_4_BYTE_MASK (0xF8)\n#define LIT_UTF8_EXTRA_BYTE_MASK (0xC0)\n\n#define LIT_UTF8_LAST_7_BITS_MASK (0x7F)\n#define LIT_UTF8_LAST_6_BITS_MASK (0x3F)\n#define LIT_UTF8_LAST_5_BITS_MASK (0x1F)\n#define LIT_UTF8_LAST_4_BITS_MASK (0x0F)\n#define LIT_UTF8_LAST_3_BITS_MASK (0x07)\n#define LIT_UTF8_LAST_2_BITS_MASK (0x03)\n#define LIT_UTF8_LAST_1_BIT_MASK  (0x01)\n\n#define LIT_UTF8_BITS_IN_EXTRA_BYTES (6)\n\n#define LIT_UTF8_1_BYTE_CODE_POINT_MAX (0x7F)\n#define LIT_UTF8_2_BYTE_CODE_POINT_MIN (0x80)\n#define LIT_UTF8_2_BYTE_CODE_POINT_MAX (0x7FF)\n#define LIT_UTF8_3_BYTE_CODE_POINT_MIN (0x800)\n#define LIT_UTF8_3_BYTE_CODE_POINT_MAX (LIT_UTF16_CODE_UNIT_MAX)\n#define LIT_UTF8_4_BYTE_CODE_POINT_MIN (0x10000)\n#define LIT_UTF8_4_BYTE_CODE_POINT_MAX (LIT_UNICODE_CODE_POINT_MAX)\n\n/**\n * Differnce between byte count needed to represent code point greater than 0xFFFF\n * in common UTF-8 (4 bytes required) and CESU-8 (6 bytes required)\n */\n#define LIT_UTF8_CESU8_SURROGATE_SIZE_DIF (2 * LIT_UTF8_MAX_BYTES_IN_CODE_UNIT - LIT_UTF8_MAX_BYTES_IN_CODE_POINT)\n\n/**\n * Byte values >= LIT_UTF8_FIRST_BYTE_MAX are not allowed in internal strings\n */\n#define LIT_UTF8_FIRST_BYTE_MAX (0xF8)\n\n/* validation */\nbool lit_is_valid_utf8_string (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t buf_size);\nbool lit_is_valid_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, lit_utf8_size_t buf_size);\n\n/* checks */\nbool lit_is_code_point_utf16_low_surrogate (lit_code_point_t code_point);\nbool lit_is_code_point_utf16_high_surrogate (lit_code_point_t code_point);\n\n/* size */\nlit_utf8_size_t lit_zt_utf8_string_size (const lit_utf8_byte_t *utf8_str_p);\nlit_utf8_size_t lit_get_utf8_size_of_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, lit_utf8_size_t cesu8_buf_size);\n\n/* length */\nlit_utf8_size_t lit_utf8_string_length (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t utf8_buf_size);\nlit_utf8_size_t lit_get_utf8_length_of_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p,\n                                                     lit_utf8_size_t cesu8_buf_size);\n\n/* hash */\nlit_string_hash_t lit_utf8_string_calc_hash (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t utf8_buf_size);\nlit_string_hash_t lit_utf8_string_hash_combine (lit_string_hash_t hash_basis, const lit_utf8_byte_t *utf8_buf_p,\n                                                lit_utf8_size_t utf8_buf_size);\n\n/* code unit access */\necma_char_t lit_utf8_string_code_unit_at (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t utf8_buf_size,\n                                          lit_utf8_size_t code_unit_offset);\nlit_utf8_size_t lit_get_unicode_char_size_by_utf8_first_byte (const lit_utf8_byte_t first_byte);\n\n/* conversion */\nlit_utf8_size_t lit_code_unit_to_utf8 (ecma_char_t code_unit, lit_utf8_byte_t *buf_p);\nlit_utf8_size_t lit_code_point_to_utf8 (lit_code_point_t code_point, lit_utf8_byte_t *buf);\nlit_utf8_size_t lit_code_point_to_cesu8 (lit_code_point_t code_point, lit_utf8_byte_t *buf);\nlit_utf8_size_t lit_convert_cesu8_string_to_utf8_string (const lit_utf8_byte_t *cesu8_string,\n                                                         lit_utf8_size_t cesu8_size,\n                                                         lit_utf8_byte_t *utf8_string,\n                                                         lit_utf8_size_t utf8_size);\nlit_code_point_t lit_convert_surrogate_pair_to_code_point (ecma_char_t high_surrogate, ecma_char_t low_surrogate);\n\nbool lit_compare_utf8_strings_relational (const lit_utf8_byte_t *string1_p, lit_utf8_size_t string1_size,\n                                          const lit_utf8_byte_t *string2_p, lit_utf8_size_t string2_size);\n\nuint8_t lit_utf16_encode_code_point (lit_code_point_t cp, ecma_char_t *cu_p);\n\n/* read code point from buffer */\nlit_utf8_size_t lit_read_code_point_from_utf8 (const lit_utf8_byte_t *buf_p, lit_utf8_size_t buf_size,\n                                               lit_code_point_t *code_point);\n\nlit_utf8_size_t lit_read_code_unit_from_utf8 (const lit_utf8_byte_t *buf_p,\n                                              ecma_char_t *code_point);\n\nlit_utf8_size_t lit_read_prev_code_unit_from_utf8 (const lit_utf8_byte_t *buf_p,\n                                                   ecma_char_t *code_point);\n\necma_char_t lit_cesu8_read_next (const lit_utf8_byte_t **buf_p);\necma_char_t lit_cesu8_read_prev (const lit_utf8_byte_t **buf_p);\necma_char_t lit_cesu8_peek_next (const lit_utf8_byte_t *buf_p);\necma_char_t lit_cesu8_peek_prev (const lit_utf8_byte_t *buf_p);\nvoid lit_utf8_incr (const lit_utf8_byte_t **buf_p);\nvoid lit_utf8_decr (const lit_utf8_byte_t **buf_p);\n\n#endif /* !LIT_STRINGS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-unicode-conversions-sup.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file is automatically generated by the gen-unicode.py script\n * from UnicodeData.txt and SpecialCasing.txt files. Do not edit! */\n\n/* Contains start points of character case ranges (these are bidirectional conversions). */\nstatic const uint32_t lit_unicode_character_case_ranges_sup[] JERRY_ATTR_CONST_DATA =\n{\n  0x010400, 0x010428, 0x0104b0, 0x0104d8, 0x010c80, 0x010cc0, 0x0118a0, 0x0118c0, 0x016e40, 0x016e60,\n  0x01e900, 0x01e922\n};\n\n/* Interval lengths of start points in `character_case_ranges` table. */\nstatic const uint16_t lit_unicode_character_case_range_lengths_sup[] JERRY_ATTR_CONST_DATA =\n{\n  0x000028, 0x000024, 0x000033, 0x000020, 0x000020, 0x000022\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-unicode-conversions.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file is automatically generated by the gen-unicode.py script\n * from UnicodeData.txt and SpecialCasing.txt files. Do not edit! */\n\n/* Contains start points of character case ranges (these are bidirectional conversions). */\nstatic const uint16_t lit_unicode_character_case_ranges[] JERRY_ATTR_CONST_DATA =\n{\n  0x00c0, 0x00e0, 0x00d8, 0x00f8, 0x0189, 0x0256, 0x01b1, 0x028a, 0x0388, 0x03ad,\n  0x038e, 0x03cd, 0x0391, 0x03b1, 0x03a3, 0x03c3, 0x03fd, 0x037b, 0x0400, 0x0450,\n  0x0410, 0x0430, 0x0531, 0x0561, 0x10a0, 0x2d00, 0x13a0, 0xab70, 0x13f0, 0x13f8,\n  0x1c90, 0x10d0, 0x1cbd, 0x10fd, 0x1f08, 0x1f00, 0x1f18, 0x1f10, 0x1f28, 0x1f20,\n  0x1f38, 0x1f30, 0x1f48, 0x1f40, 0x1f68, 0x1f60, 0x1fb8, 0x1fb0, 0x1fba, 0x1f70,\n  0x1fc8, 0x1f72, 0x1fd8, 0x1fd0, 0x1fda, 0x1f76, 0x1fe8, 0x1fe0, 0x1fea, 0x1f7a,\n  0x1ff8, 0x1f78, 0x1ffa, 0x1f7c, 0x2160, 0x2170, 0x24b6, 0x24d0, 0x2c00, 0x2c30,\n  0x2c7e, 0x023f, 0xff21, 0xff41\n};\n\n/* Interval lengths of start points in `character_case_ranges` table. */\nstatic const uint8_t lit_unicode_character_case_range_lengths[] JERRY_ATTR_CONST_DATA =\n{\n  0x0017, 0x0007, 0x0002, 0x0002, 0x0003, 0x0002, 0x0011, 0x0009, 0x0003, 0x0010,\n  0x0020, 0x0026, 0x0026, 0x0050, 0x0006, 0x002b, 0x0003, 0x0008, 0x0006, 0x0008,\n  0x0008, 0x0006, 0x0008, 0x0002, 0x0002, 0x0004, 0x0002, 0x0002, 0x0002, 0x0002,\n  0x0002, 0x0002, 0x0010, 0x001a, 0x002f, 0x0002, 0x001a\n};\n\n/* Contains the start points of bidirectional conversion ranges. */\nstatic const uint16_t lit_unicode_character_pair_ranges[] JERRY_ATTR_CONST_DATA =\n{\n  0x0100, 0x0132, 0x0139, 0x014a, 0x0179, 0x0182, 0x0187, 0x018b, 0x0191, 0x0198,\n  0x01a0, 0x01a7, 0x01ac, 0x01af, 0x01b3, 0x01b8, 0x01bc, 0x01cd, 0x01de, 0x01f4,\n  0x01f8, 0x0222, 0x023b, 0x0241, 0x0246, 0x0370, 0x0376, 0x03d8, 0x03f7, 0x03fa,\n  0x0460, 0x048a, 0x04c1, 0x04d0, 0x1e00, 0x1ea0, 0x2183, 0x2c60, 0x2c67, 0x2c72,\n  0x2c75, 0x2c80, 0x2ceb, 0x2cf2, 0xa640, 0xa680, 0xa722, 0xa732, 0xa779, 0xa77e,\n  0xa78b, 0xa790, 0xa796, 0xa7b4, 0xa7c2, 0xa7c7, 0xa7f5\n};\n\n/* Interval lengths of start points in `character_pair_ranges` table. */\nstatic const uint8_t lit_unicode_character_pair_range_lengths[] JERRY_ATTR_CONST_DATA =\n{\n  0x0030, 0x0006, 0x0010, 0x002e, 0x0006, 0x0004, 0x0002, 0x0002, 0x0002, 0x0002,\n  0x0006, 0x0002, 0x0002, 0x0002, 0x0004, 0x0002, 0x0002, 0x0010, 0x0012, 0x0002,\n  0x0028, 0x0012, 0x0002, 0x0002, 0x000a, 0x0004, 0x0002, 0x0018, 0x0002, 0x0002,\n  0x0022, 0x0036, 0x000e, 0x0060, 0x0096, 0x0060, 0x0002, 0x0002, 0x0006, 0x0002,\n  0x0002, 0x0064, 0x0004, 0x0002, 0x002e, 0x001c, 0x000e, 0x003e, 0x0004, 0x000a,\n  0x0002, 0x0004, 0x0014, 0x000c, 0x0002, 0x0004, 0x0002\n};\n\n/* Contains lower/upper case bidirectional conversion pairs. */\nstatic const uint16_t lit_unicode_character_pairs[] JERRY_ATTR_CONST_DATA =\n{\n  0x0178, 0x00ff, 0x0181, 0x0253, 0x0186, 0x0254, 0x018e, 0x01dd, 0x018f, 0x0259,\n  0x0190, 0x025b, 0x0193, 0x0260, 0x0194, 0x0263, 0x0196, 0x0269, 0x0197, 0x0268,\n  0x019c, 0x026f, 0x019d, 0x0272, 0x019f, 0x0275, 0x01a6, 0x0280, 0x01a9, 0x0283,\n  0x01ae, 0x0288, 0x01b7, 0x0292, 0x01c4, 0x01c6, 0x01c7, 0x01c9, 0x01ca, 0x01cc,\n  0x01f1, 0x01f3, 0x01f6, 0x0195, 0x01f7, 0x01bf, 0x0220, 0x019e, 0x023a, 0x2c65,\n  0x023d, 0x019a, 0x023e, 0x2c66, 0x0243, 0x0180, 0x0244, 0x0289, 0x0245, 0x028c,\n  0x037f, 0x03f3, 0x0386, 0x03ac, 0x038c, 0x03cc, 0x03cf, 0x03d7, 0x03f9, 0x03f2,\n  0x04c0, 0x04cf, 0x10c7, 0x2d27, 0x10cd, 0x2d2d, 0x1f59, 0x1f51, 0x1f5b, 0x1f53,\n  0x1f5d, 0x1f55, 0x1f5f, 0x1f57, 0x1fec, 0x1fe5, 0x2132, 0x214e, 0x2c62, 0x026b,\n  0x2c63, 0x1d7d, 0x2c64, 0x027d, 0x2c6d, 0x0251, 0x2c6e, 0x0271, 0x2c6f, 0x0250,\n  0x2c70, 0x0252, 0xa77d, 0x1d79, 0xa78d, 0x0265, 0xa7aa, 0x0266, 0xa7ab, 0x025c,\n  0xa7ac, 0x0261, 0xa7ad, 0x026c, 0xa7ae, 0x026a, 0xa7b0, 0x029e, 0xa7b1, 0x0287,\n  0xa7b2, 0x029d, 0xa7b3, 0xab53, 0xa7c4, 0xa794, 0xa7c5, 0x0282, 0xa7c6, 0x1d8e\n};\n\n/* Contains start points of one-to-two uppercase ranges where the second character\n * is always the same.\n */\nstatic const uint16_t lit_unicode_upper_case_special_ranges[] JERRY_ATTR_CONST_DATA =\n{\n  0x1f80, 0x1f08, 0x0399, 0x1f88, 0x1f08, 0x0399, 0x1f90, 0x1f28, 0x0399, 0x1f98,\n  0x1f28, 0x0399, 0x1fa0, 0x1f68, 0x0399, 0x1fa8, 0x1f68, 0x0399\n};\n\n/* Interval lengths for start points in `upper_case_special_ranges` table. */\nstatic const uint8_t lit_unicode_upper_case_special_range_lengths[] JERRY_ATTR_CONST_DATA =\n{\n  0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007\n};\n\n/* Contains start points of lowercase ranges. */\nstatic const uint16_t lit_unicode_lower_case_ranges[] JERRY_ATTR_CONST_DATA =\n{\n  0x1f88, 0x1f80, 0x1f98, 0x1f90, 0x1fa8, 0x1fa0\n};\n\n/* Interval lengths for start points in `lower_case_ranges` table. */\nstatic const uint8_t lit_unicode_lower_case_range_lengths[] JERRY_ATTR_CONST_DATA =\n{\n  0x0008, 0x0008, 0x0008\n};\n\n/* The remaining lowercase conversions. The lowercase variant can be one-to-three character long. */\nstatic const uint16_t lit_unicode_lower_case_conversions[] JERRY_ATTR_CONST_DATA =\n{\n  0x01c5, 0x01c6, 0x01c8, 0x01c9, 0x01cb, 0x01cc, 0x01f2, 0x01f3, 0x03f4, 0x03b8,\n  0x1e9e, 0x00df, 0x1fbc, 0x1fb3, 0x1fcc, 0x1fc3, 0x1ffc, 0x1ff3, 0x2126, 0x03c9,\n  0x212a, 0x006b, 0x212b, 0x00e5, 0x0130, 0x0069, 0x0307\n};\n\n/* Number of one-to-one, one-to-two, and one-to-three lowercase conversions. */\nstatic const uint8_t lit_unicode_lower_case_conversion_counters[] JERRY_ATTR_CONST_DATA =\n{\n  0x000c, 0x0001, 0x0000\n};\n\n/* The remaining uppercase conversions. The uppercase variant can be one-to-three character long. */\nstatic const uint16_t lit_unicode_upper_case_conversions[] JERRY_ATTR_CONST_DATA =\n{\n  0x00b5, 0x039c, 0x0131, 0x0049, 0x017f, 0x0053, 0x01c5, 0x01c4, 0x01c8, 0x01c7,\n  0x01cb, 0x01ca, 0x01f2, 0x01f1, 0x0345, 0x0399, 0x03c2, 0x03a3, 0x03d0, 0x0392,\n  0x03d1, 0x0398, 0x03d5, 0x03a6, 0x03d6, 0x03a0, 0x03f0, 0x039a, 0x03f1, 0x03a1,\n  0x03f5, 0x0395, 0x1c80, 0x0412, 0x1c81, 0x0414, 0x1c82, 0x041e, 0x1c83, 0x0421,\n  0x1c84, 0x0422, 0x1c85, 0x0422, 0x1c86, 0x042a, 0x1c87, 0x0462, 0x1c88, 0xa64a,\n  0x1e9b, 0x1e60, 0x1fbe, 0x0399, 0x00df, 0x0053, 0x0053, 0x0149, 0x02bc, 0x004e,\n  0x01f0, 0x004a, 0x030c, 0x0587, 0x0535, 0x0552, 0x1e96, 0x0048, 0x0331, 0x1e97,\n  0x0054, 0x0308, 0x1e98, 0x0057, 0x030a, 0x1e99, 0x0059, 0x030a, 0x1e9a, 0x0041,\n  0x02be, 0x1f50, 0x03a5, 0x0313, 0x1f87, 0x1f0f, 0x0399, 0x1f8f, 0x1f0f, 0x0399,\n  0x1f97, 0x1f2f, 0x0399, 0x1f9f, 0x1f2f, 0x0399, 0x1fa7, 0x1f6f, 0x0399, 0x1faf,\n  0x1f6f, 0x0399, 0x1fb2, 0x1fba, 0x0399, 0x1fb3, 0x0391, 0x0399, 0x1fb4, 0x0386,\n  0x0399, 0x1fb6, 0x0391, 0x0342, 0x1fbc, 0x0391, 0x0399, 0x1fc2, 0x1fca, 0x0399,\n  0x1fc3, 0x0397, 0x0399, 0x1fc4, 0x0389, 0x0399, 0x1fc6, 0x0397, 0x0342, 0x1fcc,\n  0x0397, 0x0399, 0x1fd6, 0x0399, 0x0342, 0x1fe4, 0x03a1, 0x0313, 0x1fe6, 0x03a5,\n  0x0342, 0x1ff2, 0x1ffa, 0x0399, 0x1ff3, 0x03a9, 0x0399, 0x1ff4, 0x038f, 0x0399,\n  0x1ff6, 0x03a9, 0x0342, 0x1ffc, 0x03a9, 0x0399, 0xfb00, 0x0046, 0x0046, 0xfb01,\n  0x0046, 0x0049, 0xfb02, 0x0046, 0x004c, 0xfb05, 0x0053, 0x0054, 0xfb06, 0x0053,\n  0x0054, 0xfb13, 0x0544, 0x0546, 0xfb14, 0x0544, 0x0535, 0xfb15, 0x0544, 0x053b,\n  0xfb16, 0x054e, 0x0546, 0xfb17, 0x0544, 0x053d, 0x0390, 0x0399, 0x0308, 0x0301,\n  0x03b0, 0x03a5, 0x0308, 0x0301, 0x1f52, 0x03a5, 0x0313, 0x0300, 0x1f54, 0x03a5,\n  0x0313, 0x0301, 0x1f56, 0x03a5, 0x0313, 0x0342, 0x1fb7, 0x0391, 0x0342, 0x0399,\n  0x1fc7, 0x0397, 0x0342, 0x0399, 0x1fd2, 0x0399, 0x0308, 0x0300, 0x1fd3, 0x0399,\n  0x0308, 0x0301, 0x1fd7, 0x0399, 0x0308, 0x0342, 0x1fe2, 0x03a5, 0x0308, 0x0300,\n  0x1fe3, 0x03a5, 0x0308, 0x0301, 0x1fe7, 0x03a5, 0x0308, 0x0342, 0x1ff7, 0x03a9,\n  0x0342, 0x0399, 0xfb03, 0x0046, 0x0046, 0x0049, 0xfb04, 0x0046, 0x0046, 0x004c\n};\n\n/* Number of one-to-one, one-to-two, and one-to-three uppercase conversions. */\nstatic const uint8_t lit_unicode_upper_case_conversion_counters[] JERRY_ATTR_CONST_DATA =\n{\n  0x001b, 0x002c, 0x0010\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-unicode-folding.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file is automatically generated by the gen-unicode.py script\n * from the CaseFolding.txt file. Do not edit! */\n\n/**\n * Character interval starting points for folding_skip_to_lower.\n */\nstatic const uint16_t lit_unicode_folding_skip_to_lower_interval_starts[] JERRY_ATTR_CONST_DATA =\n{\n  0x13a0, 0x13f8, 0xab70\n};\n\n/**\n * Character interval lengths for folding_skip_to_lower.\n */\nstatic const uint8_t lit_unicode_folding_skip_to_lower_interval_lengths[] JERRY_ATTR_CONST_DATA =\n{\n  0x0055, 0x0005, 0x004f\n};\n\n/**\n * Non-interval characters for folding_skip_to_lower.\n */\nstatic const uint16_t lit_unicode_folding_skip_to_lower_chars[] JERRY_ATTR_CONST_DATA =\n{\n  0x0130\n};\n\n/**\n * Character interval starting points for folding_to_upper.\n */\nstatic const uint16_t lit_unicode_folding_to_upper_interval_starts[] JERRY_ATTR_CONST_DATA =\n{\n  0x03d0, 0x03d5, 0x03f0, 0x13f8, 0x1c80, 0xab70\n};\n\n/**\n * Character interval lengths for folding_to_upper.\n */\nstatic const uint8_t lit_unicode_folding_to_upper_interval_lengths[] JERRY_ATTR_CONST_DATA =\n{\n  0x0001, 0x0001, 0x0001, 0x0005, 0x0008, 0x004f\n};\n\n/**\n * Non-interval characters for folding_to_upper.\n */\nstatic const uint16_t lit_unicode_folding_to_upper_chars[] JERRY_ATTR_CONST_DATA =\n{\n  0x00b5, 0x017f, 0x0345, 0x03c2, 0x03f5, 0x1e9b, 0x1fbe\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-unicode-ranges-sup.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file is automatically generated by the gen-unicode.py script\n * from DerivedCoreProperties.txt. Do not edit! */\n\n/**\n * Character interval starting points for ID_Start.\n */\nstatic const uint32_t lit_unicode_id_start_interval_starts_sup[] JERRY_ATTR_CONST_DATA =\n{\n  0x010000, 0x01000d, 0x010028, 0x01003c, 0x01003f, 0x010050, 0x010080, 0x010140, 0x010280, 0x0102a0,\n  0x010300, 0x01032d, 0x010350, 0x010380, 0x0103a0, 0x0103c8, 0x0103d1, 0x010400, 0x0104b0, 0x0104d8,\n  0x010500, 0x010530, 0x010600, 0x010740, 0x010760, 0x010800, 0x01080a, 0x010837, 0x01083f, 0x010860,\n  0x010880, 0x0108e0, 0x0108f4, 0x010900, 0x010920, 0x010980, 0x0109be, 0x010a10, 0x010a15, 0x010a19,\n  0x010a60, 0x010a80, 0x010ac0, 0x010ac9, 0x010b00, 0x010b40, 0x010b60, 0x010b80, 0x010c00, 0x010c80,\n  0x010cc0, 0x010d00, 0x010e80, 0x010eb0, 0x010f00, 0x010f30, 0x010fb0, 0x010fe0, 0x011003, 0x011083,\n  0x0110d0, 0x011103, 0x011150, 0x011183, 0x0111c1, 0x011200, 0x011213, 0x011280, 0x01128a, 0x01128f,\n  0x01129f, 0x0112b0, 0x011305, 0x01130f, 0x011313, 0x01132a, 0x011332, 0x011335, 0x01135d, 0x011400,\n  0x011447, 0x01145f, 0x011480, 0x0114c4, 0x011580, 0x0115d8, 0x011600, 0x011680, 0x011700, 0x011800,\n  0x0118a0, 0x0118ff, 0x01190c, 0x011915, 0x011918, 0x0119a0, 0x0119aa, 0x011a0b, 0x011a5c, 0x011ac0,\n  0x011c00, 0x011c0a, 0x011c72, 0x011d00, 0x011d08, 0x011d0b, 0x011d60, 0x011d67, 0x011d6a, 0x011ee0,\n  0x012000, 0x012400, 0x012480, 0x013000, 0x014400, 0x016800, 0x016a40, 0x016ad0, 0x016b00, 0x016b40,\n  0x016b63, 0x016b7d, 0x016e40, 0x016f00, 0x016f93, 0x016fe0, 0x017000, 0x018800, 0x018d00, 0x01b000,\n  0x01b150, 0x01b164, 0x01b170, 0x01bc00, 0x01bc70, 0x01bc80, 0x01bc90, 0x01d400, 0x01d456, 0x01d49e,\n  0x01d4a5, 0x01d4a9, 0x01d4ae, 0x01d4bd, 0x01d4c5, 0x01d507, 0x01d50d, 0x01d516, 0x01d51e, 0x01d53b,\n  0x01d540, 0x01d54a, 0x01d552, 0x01d6a8, 0x01d6c2, 0x01d6dc, 0x01d6fc, 0x01d716, 0x01d736, 0x01d750,\n  0x01d770, 0x01d78a, 0x01d7aa, 0x01d7c4, 0x01e100, 0x01e137, 0x01e2c0, 0x01e800, 0x01e900, 0x01ee00,\n  0x01ee05, 0x01ee21, 0x01ee29, 0x01ee34, 0x01ee4d, 0x01ee51, 0x01ee61, 0x01ee67, 0x01ee6c, 0x01ee74,\n  0x01ee79, 0x01ee80, 0x01ee8b, 0x01eea1, 0x01eea5, 0x01eeab, 0x020000, 0x02a700, 0x02b740, 0x02b820,\n  0x02ceb0, 0x02f800, 0x030000\n};\n\n/**\n * Character interval lengths for ID_Start.\n */\nstatic const uint16_t lit_unicode_id_start_interval_lengths_sup[] JERRY_ATTR_CONST_DATA =\n{\n  0x00000b, 0x000019, 0x000012, 0x000001, 0x00000e, 0x00000d, 0x00007a, 0x000034, 0x00001c, 0x000030,\n  0x00001f, 0x00001d, 0x000025, 0x00001d, 0x000023, 0x000007, 0x000004, 0x00009d, 0x000023, 0x000023,\n  0x000027, 0x000033, 0x000136, 0x000015, 0x000007, 0x000005, 0x00002b, 0x000001, 0x000016, 0x000016,\n  0x00001e, 0x000012, 0x000001, 0x000015, 0x000019, 0x000037, 0x000001, 0x000003, 0x000002, 0x00001c,\n  0x00001c, 0x00001c, 0x000007, 0x00001b, 0x000035, 0x000015, 0x000012, 0x000011, 0x000048, 0x000032,\n  0x000032, 0x000023, 0x000029, 0x000001, 0x00001c, 0x000015, 0x000014, 0x000016, 0x000034, 0x00002c,\n  0x000018, 0x000023, 0x000022, 0x00002f, 0x000003, 0x000011, 0x000018, 0x000006, 0x000003, 0x00000e,\n  0x000009, 0x00002e, 0x000007, 0x000001, 0x000015, 0x000006, 0x000001, 0x000004, 0x000004, 0x000034,\n  0x000003, 0x000002, 0x00002f, 0x000001, 0x00002e, 0x000003, 0x00002f, 0x00002a, 0x00001a, 0x00002b,\n  0x00003f, 0x000007, 0x000007, 0x000001, 0x000017, 0x000007, 0x000026, 0x000027, 0x00002d, 0x000038,\n  0x000008, 0x000024, 0x00001d, 0x000006, 0x000001, 0x000025, 0x000005, 0x000001, 0x00001f, 0x000012,\n  0x000399, 0x00006e, 0x0000c3, 0x00042e, 0x000246, 0x000238, 0x00001e, 0x00001d, 0x00002f, 0x000003,\n  0x000014, 0x000012, 0x00003f, 0x00004a, 0x00000c, 0x000001, 0x0017f7, 0x0004d5, 0x000008, 0x00011e,\n  0x000002, 0x000003, 0x00018b, 0x00006a, 0x00000c, 0x000008, 0x000009, 0x000054, 0x000046, 0x000001,\n  0x000001, 0x000003, 0x00000b, 0x000006, 0x000040, 0x000003, 0x000007, 0x000006, 0x00001b, 0x000003,\n  0x000004, 0x000006, 0x000153, 0x000018, 0x000018, 0x00001e, 0x000018, 0x00001e, 0x000018, 0x00001e,\n  0x000018, 0x00001e, 0x000018, 0x000007, 0x00002c, 0x000006, 0x00002b, 0x0000c4, 0x000043, 0x000003,\n  0x00001a, 0x000001, 0x000009, 0x000003, 0x000002, 0x000001, 0x000001, 0x000003, 0x000006, 0x000003,\n  0x000003, 0x000009, 0x000010, 0x000002, 0x000004, 0x000010, 0x00a6dd, 0x001034, 0x0000dd, 0x001681,\n  0x001d30, 0x00021d, 0x00134a\n};\n\n/**\n * Non-interval characters for ID_Start.\n */\nstatic const uint32_t lit_unicode_id_start_chars_sup[] JERRY_ATTR_CONST_DATA =\n{\n  0x010808, 0x01083c, 0x010a00, 0x010f27, 0x011144, 0x011147, 0x011176, 0x0111da, 0x0111dc, 0x011288,\n  0x01133d, 0x011350, 0x0114c7, 0x011644, 0x0116b8, 0x011909, 0x01193f, 0x011941, 0x0119e1, 0x0119e3,\n  0x011a00, 0x011a3a, 0x011a50, 0x011a9d, 0x011c40, 0x011d46, 0x011d98, 0x011fb0, 0x016f50, 0x016fe3,\n  0x01d4a2, 0x01d4bb, 0x01d546, 0x01e14e, 0x01e94b, 0x01ee24, 0x01ee27, 0x01ee39, 0x01ee3b, 0x01ee42,\n  0x01ee47, 0x01ee49, 0x01ee4b, 0x01ee54, 0x01ee57, 0x01ee59, 0x01ee5b, 0x01ee5d, 0x01ee5f, 0x01ee64,\n  0x01ee7e\n};\n\n/**\n * Character interval starting points for ID_Continue.\n */\nstatic const uint32_t lit_unicode_id_continue_interval_starts_sup[] JERRY_ATTR_CONST_DATA =\n{\n  0x010376, 0x0104a0, 0x010a01, 0x010a05, 0x010a0c, 0x010a38, 0x010ae5, 0x010d24, 0x010d30, 0x010eab,\n  0x010f46, 0x011000, 0x011038, 0x011066, 0x01107f, 0x0110b0, 0x0110f0, 0x011100, 0x011127, 0x011136,\n  0x011145, 0x011180, 0x0111b3, 0x0111c9, 0x0111ce, 0x01122c, 0x0112df, 0x0112f0, 0x011300, 0x01133b,\n  0x01133e, 0x011347, 0x01134b, 0x011362, 0x011366, 0x011370, 0x011435, 0x011450, 0x0114b0, 0x0114d0,\n  0x0115af, 0x0115b8, 0x0115dc, 0x011630, 0x011650, 0x0116ab, 0x0116c0, 0x01171d, 0x011730, 0x01182c,\n  0x0118e0, 0x011930, 0x011937, 0x01193b, 0x011942, 0x011950, 0x0119d1, 0x0119da, 0x011a01, 0x011a33,\n  0x011a3b, 0x011a51, 0x011a8a, 0x011c2f, 0x011c38, 0x011c50, 0x011c92, 0x011ca9, 0x011d31, 0x011d3c,\n  0x011d3f, 0x011d50, 0x011d8a, 0x011d90, 0x011d93, 0x011da0, 0x011ef3, 0x016a60, 0x016af0, 0x016b30,\n  0x016b50, 0x016f51, 0x016f8f, 0x016ff0, 0x01bc9d, 0x01d165, 0x01d16d, 0x01d17b, 0x01d185, 0x01d1aa,\n  0x01d242, 0x01d7ce, 0x01da00, 0x01da3b, 0x01da9b, 0x01daa1, 0x01e000, 0x01e008, 0x01e01b, 0x01e023,\n  0x01e026, 0x01e130, 0x01e140, 0x01e2ec, 0x01e8d0, 0x01e944, 0x01e950, 0x01fbf0, 0x0e0100\n};\n\n/**\n * Character interval lengths for ID_Continue.\n */\nstatic const uint16_t lit_unicode_id_continue_interval_lengths_sup[] JERRY_ATTR_CONST_DATA =\n{\n  0x000004, 0x000009, 0x000002, 0x000001, 0x000003, 0x000002, 0x000001, 0x000003, 0x000009, 0x000001,\n  0x00000a, 0x000002, 0x00000e, 0x000009, 0x000003, 0x00000a, 0x000009, 0x000002, 0x00000d, 0x000009,\n  0x000001, 0x000002, 0x00000d, 0x000003, 0x00000b, 0x00000b, 0x00000b, 0x000009, 0x000003, 0x000001,\n  0x000006, 0x000001, 0x000002, 0x000001, 0x000006, 0x000004, 0x000011, 0x000009, 0x000013, 0x000009,\n  0x000006, 0x000008, 0x000001, 0x000010, 0x000009, 0x00000c, 0x000009, 0x00000e, 0x000009, 0x00000e,\n  0x000009, 0x000005, 0x000001, 0x000003, 0x000001, 0x000009, 0x000006, 0x000006, 0x000009, 0x000006,\n  0x000003, 0x00000a, 0x00000f, 0x000007, 0x000007, 0x000009, 0x000015, 0x00000d, 0x000005, 0x000001,\n  0x000006, 0x000009, 0x000004, 0x000001, 0x000004, 0x000009, 0x000003, 0x000009, 0x000004, 0x000006,\n  0x000009, 0x000036, 0x000003, 0x000001, 0x000001, 0x000004, 0x000005, 0x000007, 0x000006, 0x000003,\n  0x000002, 0x000031, 0x000036, 0x000031, 0x000004, 0x00000e, 0x000006, 0x000010, 0x000006, 0x000001,\n  0x000004, 0x000006, 0x000009, 0x00000d, 0x000006, 0x000006, 0x000009, 0x000009, 0x0000ef\n};\n\n/**\n * Non-interval characters for ID_Continue.\n */\nstatic const uint32_t lit_unicode_id_continue_chars_sup[] JERRY_ATTR_CONST_DATA =\n{\n  0x0101fd, 0x0102e0, 0x010a3f, 0x011173, 0x01123e, 0x011357, 0x01145e, 0x011940, 0x0119e4, 0x011a47,\n  0x011d3a, 0x011d47, 0x016f4f, 0x016fe4, 0x01da75, 0x01da84\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/lit/lit-unicode-ranges.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file is automatically generated by the gen-unicode.py script\n * from DerivedCoreProperties.txt. Do not edit! */\n\n/**\n * Character interval starting points for ID_Start.\n */\nstatic const uint16_t lit_unicode_id_start_interval_starts[] JERRY_ATTR_CONST_DATA =\n{\n  0x00c0, 0x00d8, 0x00f8, 0x01f8, 0x02c6, 0x02e0, 0x0370, 0x0376, 0x037a, 0x0388,\n  0x038e, 0x03a3, 0x03f7, 0x048a, 0x0531, 0x0560, 0x05d0, 0x05ef, 0x0620, 0x066e,\n  0x0671, 0x06e5, 0x06ee, 0x06fa, 0x0712, 0x074d, 0x07ca, 0x07f4, 0x0800, 0x0840,\n  0x0860, 0x08a0, 0x08b6, 0x0904, 0x0958, 0x0971, 0x0985, 0x098f, 0x0993, 0x09aa,\n  0x09b6, 0x09dc, 0x09df, 0x09f0, 0x0a05, 0x0a0f, 0x0a13, 0x0a2a, 0x0a32, 0x0a35,\n  0x0a38, 0x0a59, 0x0a72, 0x0a85, 0x0a8f, 0x0a93, 0x0aaa, 0x0ab2, 0x0ab5, 0x0ae0,\n  0x0b05, 0x0b0f, 0x0b13, 0x0b2a, 0x0b32, 0x0b35, 0x0b5c, 0x0b5f, 0x0b85, 0x0b8e,\n  0x0b92, 0x0b99, 0x0b9e, 0x0ba3, 0x0ba8, 0x0bae, 0x0c05, 0x0c0e, 0x0c12, 0x0c2a,\n  0x0c58, 0x0c60, 0x0c85, 0x0c8e, 0x0c92, 0x0caa, 0x0cb5, 0x0ce0, 0x0cf1, 0x0d04,\n  0x0d0e, 0x0d12, 0x0d54, 0x0d5f, 0x0d7a, 0x0d85, 0x0d9a, 0x0db3, 0x0dc0, 0x0e01,\n  0x0e32, 0x0e40, 0x0e81, 0x0e86, 0x0e8c, 0x0ea7, 0x0eb2, 0x0ec0, 0x0edc, 0x0f40,\n  0x0f49, 0x0f88, 0x1000, 0x1050, 0x105a, 0x1065, 0x106e, 0x1075, 0x10a0, 0x10d0,\n  0x10fc, 0x11fc, 0x124a, 0x1250, 0x125a, 0x1260, 0x128a, 0x1290, 0x12b2, 0x12b8,\n  0x12c2, 0x12c8, 0x12d8, 0x1312, 0x1318, 0x1380, 0x13a0, 0x13f8, 0x1401, 0x1501,\n  0x1601, 0x166f, 0x1681, 0x16a0, 0x16ee, 0x1700, 0x170e, 0x1720, 0x1740, 0x1760,\n  0x176e, 0x1780, 0x1820, 0x1880, 0x18b0, 0x1900, 0x1950, 0x1970, 0x1980, 0x19b0,\n  0x1a00, 0x1a20, 0x1b05, 0x1b45, 0x1b83, 0x1bae, 0x1bba, 0x1c00, 0x1c4d, 0x1c5a,\n  0x1c80, 0x1c90, 0x1cbd, 0x1ce9, 0x1cee, 0x1cf5, 0x1d00, 0x1e00, 0x1f00, 0x1f18,\n  0x1f20, 0x1f48, 0x1f50, 0x1f5f, 0x1f80, 0x1fb6, 0x1fc2, 0x1fc6, 0x1fd0, 0x1fd6,\n  0x1fe0, 0x1ff2, 0x1ff6, 0x2090, 0x210a, 0x2118, 0x212a, 0x213c, 0x2145, 0x2160,\n  0x2c00, 0x2c30, 0x2c60, 0x2ceb, 0x2cf2, 0x2d00, 0x2d30, 0x2d80, 0x2da0, 0x2da8,\n  0x2db0, 0x2db8, 0x2dc0, 0x2dc8, 0x2dd0, 0x2dd8, 0x3005, 0x3021, 0x3031, 0x3038,\n  0x3041, 0x309b, 0x30a1, 0x30fc, 0x3105, 0x3131, 0x31a0, 0x31f0, 0x3400, 0x3500,\n  0x3600, 0x3700, 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00, 0x3f00,\n  0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500, 0x4600, 0x4700, 0x4800, 0x4900,\n  0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00, 0x4f00, 0x5000, 0x5100, 0x5200, 0x5300,\n  0x5400, 0x5500, 0x5600, 0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00,\n  0x5e00, 0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500, 0x6600, 0x6700,\n  0x6800, 0x6900, 0x6a00, 0x6b00, 0x6c00, 0x6d00, 0x6e00, 0x6f00, 0x7000, 0x7100,\n  0x7200, 0x7300, 0x7400, 0x7500, 0x7600, 0x7700, 0x7800, 0x7900, 0x7a00, 0x7b00,\n  0x7c00, 0x7d00, 0x7e00, 0x7f00, 0x8000, 0x8100, 0x8200, 0x8300, 0x8400, 0x8500,\n  0x8600, 0x8700, 0x8800, 0x8900, 0x8a00, 0x8b00, 0x8c00, 0x8d00, 0x8e00, 0x8f00,\n  0x9000, 0x9100, 0x9200, 0x9300, 0x9400, 0x9500, 0x9600, 0x9700, 0x9800, 0x9900,\n  0x9a00, 0x9b00, 0x9c00, 0x9d00, 0x9e00, 0x9f00, 0xa000, 0xa100, 0xa200, 0xa300,\n  0xa400, 0xa4d0, 0xa500, 0xa600, 0xa610, 0xa62a, 0xa640, 0xa67f, 0xa6a0, 0xa717,\n  0xa722, 0xa78b, 0xa7c2, 0xa7f5, 0xa803, 0xa807, 0xa80c, 0xa840, 0xa882, 0xa8f2,\n  0xa8fd, 0xa90a, 0xa930, 0xa960, 0xa984, 0xa9e0, 0xa9e6, 0xa9fa, 0xaa00, 0xaa40,\n  0xaa44, 0xaa60, 0xaa7e, 0xaab5, 0xaab9, 0xaadb, 0xaae0, 0xaaf2, 0xab01, 0xab09,\n  0xab11, 0xab20, 0xab28, 0xab30, 0xab5c, 0xab70, 0xac00, 0xad00, 0xae00, 0xaf00,\n  0xb000, 0xb100, 0xb200, 0xb300, 0xb400, 0xb500, 0xb600, 0xb700, 0xb800, 0xb900,\n  0xba00, 0xbb00, 0xbc00, 0xbd00, 0xbe00, 0xbf00, 0xc000, 0xc100, 0xc200, 0xc300,\n  0xc400, 0xc500, 0xc600, 0xc700, 0xc800, 0xc900, 0xca00, 0xcb00, 0xcc00, 0xcd00,\n  0xce00, 0xcf00, 0xd000, 0xd100, 0xd200, 0xd300, 0xd400, 0xd500, 0xd600, 0xd700,\n  0xd7b0, 0xd7cb, 0xf900, 0xfa00, 0xfa70, 0xfb00, 0xfb13, 0xfb1f, 0xfb2a, 0xfb38,\n  0xfb40, 0xfb43, 0xfb46, 0xfbd3, 0xfcd3, 0xfd50, 0xfd92, 0xfdf0, 0xfe70, 0xfe76,\n  0xff21, 0xff41, 0xff66, 0xffc2, 0xffca, 0xffd2, 0xffda\n};\n\n/**\n * Character interval lengths for ID_Start.\n */\nstatic const uint8_t lit_unicode_id_start_interval_lengths[] JERRY_ATTR_CONST_DATA =\n{\n  0x0016, 0x001e, 0x00ff, 0x00c9, 0x000b, 0x0004, 0x0004, 0x0001, 0x0003, 0x0002,\n  0x0013, 0x0052, 0x008a, 0x00a5, 0x0025, 0x0028, 0x001a, 0x0003, 0x002a, 0x0001,\n  0x0062, 0x0001, 0x0001, 0x0002, 0x001d, 0x0058, 0x0020, 0x0001, 0x0015, 0x0018,\n  0x000a, 0x0014, 0x0011, 0x0035, 0x0009, 0x000f, 0x0007, 0x0001, 0x0015, 0x0006,\n  0x0003, 0x0001, 0x0002, 0x0001, 0x0005, 0x0001, 0x0015, 0x0006, 0x0001, 0x0001,\n  0x0001, 0x0003, 0x0002, 0x0008, 0x0002, 0x0015, 0x0006, 0x0001, 0x0004, 0x0001,\n  0x0007, 0x0001, 0x0015, 0x0006, 0x0001, 0x0004, 0x0001, 0x0002, 0x0005, 0x0002,\n  0x0003, 0x0001, 0x0001, 0x0001, 0x0002, 0x000b, 0x0007, 0x0002, 0x0016, 0x000f,\n  0x0002, 0x0001, 0x0007, 0x0002, 0x0016, 0x0009, 0x0004, 0x0001, 0x0001, 0x0008,\n  0x0002, 0x0028, 0x0002, 0x0002, 0x0005, 0x0011, 0x0017, 0x0008, 0x0006, 0x002f,\n  0x0001, 0x0006, 0x0001, 0x0004, 0x0017, 0x0009, 0x0001, 0x0004, 0x0003, 0x0007,\n  0x0023, 0x0004, 0x002a, 0x0005, 0x0003, 0x0001, 0x0002, 0x000c, 0x0025, 0x002a,\n  0x00ff, 0x004c, 0x0003, 0x0006, 0x0003, 0x0028, 0x0003, 0x0020, 0x0003, 0x0006,\n  0x0003, 0x000e, 0x0038, 0x0003, 0x0042, 0x000f, 0x0055, 0x0005, 0x00ff, 0x00ff,\n  0x006b, 0x0010, 0x0019, 0x004a, 0x000a, 0x000c, 0x0003, 0x0011, 0x0011, 0x000c,\n  0x0002, 0x0033, 0x0058, 0x0028, 0x0045, 0x001e, 0x001d, 0x0004, 0x002b, 0x0019,\n  0x0016, 0x0034, 0x002e, 0x0006, 0x001d, 0x0001, 0x002b, 0x0023, 0x0002, 0x0023,\n  0x0008, 0x002a, 0x0002, 0x0003, 0x0005, 0x0001, 0x00bf, 0x00ff, 0x0015, 0x0005,\n  0x0025, 0x0005, 0x0007, 0x001e, 0x0034, 0x0006, 0x0002, 0x0006, 0x0003, 0x0005,\n  0x000c, 0x0002, 0x0006, 0x000c, 0x0009, 0x0005, 0x000f, 0x0003, 0x0004, 0x0028,\n  0x002e, 0x002e, 0x0084, 0x0003, 0x0001, 0x0025, 0x0037, 0x0016, 0x0006, 0x0006,\n  0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0002, 0x0008, 0x0004, 0x0004,\n  0x0055, 0x0004, 0x0059, 0x0003, 0x002a, 0x005d, 0x001f, 0x000f, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00bf, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00fc, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x008c, 0x002d, 0x00ff, 0x000c, 0x000f, 0x0001, 0x002e, 0x001e, 0x004f, 0x0008,\n  0x0066, 0x0034, 0x0008, 0x000c, 0x0002, 0x0003, 0x0016, 0x0033, 0x0031, 0x0005,\n  0x0001, 0x001b, 0x0016, 0x001c, 0x002e, 0x0004, 0x0009, 0x0004, 0x0028, 0x0002,\n  0x0007, 0x0016, 0x0031, 0x0001, 0x0004, 0x0002, 0x000a, 0x0002, 0x0005, 0x0005,\n  0x0005, 0x0006, 0x0006, 0x002a, 0x000d, 0x0072, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,\n  0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00a3,\n  0x0016, 0x0030, 0x00ff, 0x006d, 0x0069, 0x0006, 0x0004, 0x0009, 0x000c, 0x0004,\n  0x0001, 0x0001, 0x006b, 0x00ff, 0x006a, 0x003f, 0x0035, 0x000b, 0x0004, 0x0086,\n  0x0019, 0x0019, 0x0058, 0x0005, 0x0005, 0x0005, 0x0002\n};\n\n/**\n * Non-interval characters for ID_Start.\n */\nstatic const uint16_t lit_unicode_id_start_chars[] JERRY_ATTR_CONST_DATA =\n{\n  0x00aa, 0x00b5, 0x00ba, 0x02ec, 0x02ee, 0x037f, 0x0386, 0x038c, 0x0559, 0x06d5,\n  0x06ff, 0x0710, 0x07b1, 0x07fa, 0x081a, 0x0824, 0x0828, 0x093d, 0x0950, 0x09b2,\n  0x09bd, 0x09ce, 0x09fc, 0x0a5e, 0x0abd, 0x0ad0, 0x0af9, 0x0b3d, 0x0b71, 0x0b83,\n  0x0b9c, 0x0bd0, 0x0c3d, 0x0c80, 0x0cbd, 0x0cde, 0x0d3d, 0x0d4e, 0x0dbd, 0x0e84,\n  0x0ea5, 0x0ebd, 0x0ec6, 0x0f00, 0x103f, 0x1061, 0x108e, 0x10c7, 0x10cd, 0x1258,\n  0x12c0, 0x17d7, 0x17dc, 0x18aa, 0x1aa7, 0x1cfa, 0x1f59, 0x1f5b, 0x1f5d, 0x1fbe,\n  0x2071, 0x207f, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214e, 0x2d27,\n  0x2d2d, 0x2d6f, 0xa8fb, 0xa9cf, 0xaa7a, 0xaab1, 0xaac0, 0xaac2, 0xfb1d, 0xfb3e\n};\n\n/**\n * Character interval starting points for ID_Continue.\n */\nstatic const uint16_t lit_unicode_id_continue_interval_starts[] JERRY_ATTR_CONST_DATA =\n{\n  0x0300, 0x0483, 0x0591, 0x05c1, 0x05c4, 0x0610, 0x064b, 0x06d6, 0x06df, 0x06e7,\n  0x06ea, 0x06f0, 0x0730, 0x07a6, 0x07c0, 0x07eb, 0x0816, 0x081b, 0x0825, 0x0829,\n  0x0859, 0x08d3, 0x08e3, 0x093a, 0x093e, 0x0951, 0x0962, 0x0966, 0x0981, 0x09be,\n  0x09c7, 0x09cb, 0x09e2, 0x09e6, 0x0a01, 0x0a3e, 0x0a47, 0x0a4b, 0x0a66, 0x0a81,\n  0x0abe, 0x0ac7, 0x0acb, 0x0ae2, 0x0ae6, 0x0afa, 0x0b01, 0x0b3e, 0x0b47, 0x0b4b,\n  0x0b55, 0x0b62, 0x0b66, 0x0bbe, 0x0bc6, 0x0bca, 0x0be6, 0x0c00, 0x0c3e, 0x0c46,\n  0x0c4a, 0x0c55, 0x0c62, 0x0c66, 0x0c81, 0x0cbe, 0x0cc6, 0x0cca, 0x0cd5, 0x0ce2,\n  0x0ce6, 0x0d00, 0x0d3b, 0x0d3e, 0x0d46, 0x0d4a, 0x0d62, 0x0d66, 0x0d81, 0x0dcf,\n  0x0dd8, 0x0de6, 0x0df2, 0x0e34, 0x0e47, 0x0e50, 0x0eb4, 0x0ec8, 0x0ed0, 0x0f18,\n  0x0f20, 0x0f3e, 0x0f71, 0x0f86, 0x0f8d, 0x0f99, 0x102b, 0x1040, 0x1056, 0x105e,\n  0x1062, 0x1067, 0x1071, 0x1082, 0x108f, 0x135d, 0x1369, 0x1712, 0x1732, 0x1752,\n  0x1772, 0x17b4, 0x17e0, 0x180b, 0x1810, 0x1920, 0x1930, 0x1946, 0x19d0, 0x1a17,\n  0x1a55, 0x1a60, 0x1a7f, 0x1a90, 0x1ab0, 0x1abf, 0x1b00, 0x1b34, 0x1b50, 0x1b6b,\n  0x1b80, 0x1ba1, 0x1bb0, 0x1be6, 0x1c24, 0x1c40, 0x1c50, 0x1cd0, 0x1cd4, 0x1cf7,\n  0x1dc0, 0x1dfb, 0x200c, 0x203f, 0x20d0, 0x20e5, 0x2cef, 0x2de0, 0x302a, 0x3099,\n  0xa620, 0xa674, 0xa69e, 0xa6f0, 0xa823, 0xa880, 0xa8b4, 0xa8d0, 0xa8e0, 0xa8ff,\n  0xa926, 0xa947, 0xa980, 0xa9b3, 0xa9d0, 0xa9f0, 0xaa29, 0xaa4c, 0xaa50, 0xaa7b,\n  0xaab2, 0xaab7, 0xaabe, 0xaaeb, 0xaaf5, 0xabe3, 0xabec, 0xabf0, 0xfe00, 0xfe20,\n  0xfe33, 0xfe4d, 0xff10\n};\n\n/**\n * Character interval lengths for ID_Continue.\n */\nstatic const uint8_t lit_unicode_id_continue_interval_lengths[] JERRY_ATTR_CONST_DATA =\n{\n  0x006f, 0x0004, 0x002c, 0x0001, 0x0001, 0x000a, 0x001e, 0x0006, 0x0005, 0x0001,\n  0x0003, 0x0009, 0x001a, 0x000a, 0x0009, 0x0008, 0x0003, 0x0008, 0x0002, 0x0004,\n  0x0002, 0x000e, 0x0020, 0x0002, 0x0011, 0x0006, 0x0001, 0x0009, 0x0002, 0x0006,\n  0x0001, 0x0002, 0x0001, 0x0009, 0x0002, 0x0004, 0x0001, 0x0002, 0x000b, 0x0002,\n  0x0007, 0x0002, 0x0002, 0x0001, 0x0009, 0x0005, 0x0002, 0x0006, 0x0001, 0x0002,\n  0x0002, 0x0001, 0x0009, 0x0004, 0x0002, 0x0003, 0x0009, 0x0004, 0x0006, 0x0002,\n  0x0003, 0x0001, 0x0001, 0x0009, 0x0002, 0x0006, 0x0002, 0x0003, 0x0001, 0x0001,\n  0x0009, 0x0003, 0x0001, 0x0006, 0x0002, 0x0003, 0x0001, 0x0009, 0x0002, 0x0005,\n  0x0007, 0x0009, 0x0001, 0x0006, 0x0007, 0x0009, 0x0008, 0x0005, 0x0009, 0x0001,\n  0x0009, 0x0001, 0x0013, 0x0001, 0x000a, 0x0023, 0x0013, 0x0009, 0x0003, 0x0002,\n  0x0002, 0x0006, 0x0003, 0x000b, 0x000e, 0x0002, 0x0008, 0x0002, 0x0002, 0x0001,\n  0x0001, 0x001f, 0x0009, 0x0002, 0x0009, 0x000b, 0x000b, 0x0009, 0x000a, 0x0004,\n  0x0009, 0x001c, 0x000a, 0x0009, 0x000d, 0x0001, 0x0004, 0x0010, 0x0009, 0x0008,\n  0x0002, 0x000c, 0x0009, 0x000d, 0x0013, 0x0009, 0x0009, 0x0002, 0x0014, 0x0002,\n  0x0039, 0x0004, 0x0001, 0x0001, 0x000c, 0x000b, 0x0002, 0x001f, 0x0005, 0x0001,\n  0x0009, 0x0009, 0x0001, 0x0001, 0x0004, 0x0001, 0x0011, 0x0009, 0x0011, 0x000a,\n  0x0007, 0x000c, 0x0003, 0x000d, 0x0009, 0x0009, 0x000d, 0x0001, 0x0009, 0x0002,\n  0x0002, 0x0001, 0x0001, 0x0004, 0x0001, 0x0007, 0x0001, 0x0009, 0x000f, 0x000f,\n  0x0001, 0x0002, 0x0009\n};\n\n/**\n * Non-interval characters for ID_Continue.\n */\nstatic const uint16_t lit_unicode_id_continue_chars[] JERRY_ATTR_CONST_DATA =\n{\n  0x00b7, 0x0387, 0x05bf, 0x05c7, 0x0670, 0x0711, 0x07fd, 0x09bc, 0x09d7, 0x09fe,\n  0x0a3c, 0x0a51, 0x0a75, 0x0abc, 0x0b3c, 0x0b82, 0x0bd7, 0x0cbc, 0x0d57, 0x0dca,\n  0x0dd6, 0x0e31, 0x0eb1, 0x0f35, 0x0f37, 0x0f39, 0x0fc6, 0x17dd, 0x18a9, 0x1ced,\n  0x1cf4, 0x2054, 0x20e1, 0x2d7f, 0xa66f, 0xa802, 0xa806, 0xa80b, 0xa82c, 0xa9e5,\n  0xaa43, 0xaab0, 0xaac1, 0xfb1e, 0xff3f\n};\n\n/**\n * Character interval starting points for White_Space.\n */\nstatic const uint16_t lit_unicode_white_space_interval_starts[] JERRY_ATTR_CONST_DATA =\n{\n  0x2000\n};\n\n/**\n * Character interval lengths for White_Space.\n */\nstatic const uint8_t lit_unicode_white_space_interval_lengths[] JERRY_ATTR_CONST_DATA =\n{\n  0x000a\n};\n\n/**\n * Non-interval characters for White_Space.\n */\nstatic const uint16_t lit_unicode_white_space_chars[] JERRY_ATTR_CONST_DATA =\n{\n  0x00a0, 0x1680, 0x202f, 0x205f, 0x3000\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/byte-code.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"js-parser-internal.h\"\n\nJERRY_STATIC_ASSERT ((sizeof (cbc_uint8_arguments_t) % sizeof (jmem_cpointer_t)) == 0,\n                     sizeof_cbc_uint8_arguments_t_must_be_divisible_by_sizeof_jmem_cpointer_t);\n\nJERRY_STATIC_ASSERT ((sizeof (cbc_uint16_arguments_t) % sizeof (jmem_cpointer_t)) == 0,\n                     sizeof_cbc_uint16_arguments_t_must_be_divisible_by_sizeof_jmem_cpointer_t);\n\n/**\n * The reason of these two static asserts to notify the developer to increase the JERRY_SNAPSHOT_VERSION\n * whenever new bytecodes are introduced or existing ones have been deleted.\n */\nJERRY_STATIC_ASSERT (CBC_END == 238,\n                     number_of_cbc_opcodes_changed);\nJERRY_STATIC_ASSERT (CBC_EXT_END == 148,\n                     number_of_cbc_ext_opcodes_changed);\n\n#if ENABLED (JERRY_PARSER) || ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_bytecode Bytecode\n * @{\n */\n\n/**\n * Compact bytecode definition\n */\n#define CBC_OPCODE(arg1, arg2, arg3, arg4) \\\n  ((arg2) | (((arg3) + CBC_STACK_ADJUST_BASE) << CBC_STACK_ADJUST_SHIFT)),\n\n/**\n * Flags of the opcodes.\n */\nconst uint8_t cbc_flags[] JERRY_ATTR_CONST_DATA =\n{\n  CBC_OPCODE_LIST\n};\n\n/**\n * Flags of the extended opcodes.\n */\nconst uint8_t cbc_ext_flags[] =\n{\n  CBC_EXT_OPCODE_LIST\n};\n\n#undef CBC_OPCODE\n\n#endif /* ENABLED (JERRY_PARSER) || ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n\n#define CBC_OPCODE(arg1, arg2, arg3, arg4) #arg1,\n\n/**\n * Names of the opcodes.\n */\nconst char * const cbc_names[] =\n{\n  CBC_OPCODE_LIST\n};\n\n/**\n * Names of the extended opcodes.\n */\nconst char * const cbc_ext_names[] =\n{\n  CBC_EXT_OPCODE_LIST\n};\n\n#undef CBC_OPCODE\n\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/byte-code.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef BYTE_CODE_H\n#define BYTE_CODE_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_bytecode Bytecode\n * @{\n */\n\n/**\n * Compact byte code (CBC) is a byte code representation\n * of EcmaScript which is designed for low memory\n * environments. Most opcodes are only one or sometimes\n * two byte long so the CBC provides a small binary size.\n *\n * The execution engine of CBC is a stack machine, where\n * the maximum stack size is known in advance for each\n * function.\n */\n\n/**\n * Byte code flags. Only the lower 5 bit can be used\n * since the stack change is encoded in the upper\n * three bits for each instruction between -4 and 3\n * (except for call / construct opcodes).\n */\n#define CBC_STACK_ADJUST_BASE          4\n#define CBC_STACK_ADJUST_SHIFT         5\n#define CBC_STACK_ADJUST_VALUE(value)  \\\n  (((value) >> CBC_STACK_ADJUST_SHIFT) - CBC_STACK_ADJUST_BASE)\n\n#define CBC_NO_FLAG                    0x00u\n#define CBC_HAS_LITERAL_ARG            0x01u\n#define CBC_HAS_LITERAL_ARG2           0x02u\n#define CBC_HAS_BYTE_ARG               0x04u\n#define CBC_HAS_BRANCH_ARG             0x08u\n\n/* These flags are shared */\n#define CBC_FORWARD_BRANCH_ARG         0x10u\n#define CBC_POP_STACK_BYTE_ARG         0x10u\n\n#define CBC_ARG_TYPES (CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2 | CBC_HAS_BYTE_ARG | CBC_HAS_BRANCH_ARG)\n\n#define CBC_HAS_POP_STACK_BYTE_ARG (CBC_HAS_BYTE_ARG | CBC_POP_STACK_BYTE_ARG)\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * CBC_NO_RESULT_OPERATION for ext opcodes\n */\n#define CBC_EXT_NO_RESULT_OPERATION(opcode) \\\n  ((opcode) >= PARSER_TO_EXT_OPCODE (CBC_EXT_SUPER_CALL) \\\n    && (opcode) <= PARSER_TO_EXT_OPCODE (CBC_EXT_SPREAD_CALL_PROP_BLOCK))\n#else /* !ENABLED (JERRY_ESNEXT) */\n/**\n * CBC_NO_RESULT_OPERATION for ext opcodes\n */\n#define CBC_EXT_NO_RESULT_OPERATION(opcode) false\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Debug macro. */\n#define CBC_ARGS_EQ(op, types) \\\n  ((cbc_flags[op] & CBC_ARG_TYPES) == (types))\n\n/* Debug macro. */\n#define CBC_SAME_ARGS(op1, op2) \\\n  (CBC_EXT_NO_RESULT_OPERATION (op1) ? ((cbc_ext_flags[PARSER_GET_EXT_OPCODE (op1)] & CBC_ARG_TYPES) \\\n                                         == (cbc_ext_flags[PARSER_GET_EXT_OPCODE (op2)] & CBC_ARG_TYPES)) \\\n                                     : ((cbc_flags[op1] & CBC_ARG_TYPES) == (cbc_flags[op2] & CBC_ARG_TYPES)))\n\n#define CBC_UNARY_OPERATION(name, group) \\\n  CBC_OPCODE (name, CBC_NO_FLAG, 0, \\\n              (VM_OC_ ## group) | VM_OC_GET_STACK | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (name ## _LITERAL, CBC_HAS_LITERAL_ARG, 1, \\\n              (VM_OC_ ## group) | VM_OC_GET_LITERAL | VM_OC_PUT_STACK)\n\n#define CBC_BINARY_OPERATION(name, group) \\\n  CBC_OPCODE (name, CBC_NO_FLAG, -1, \\\n              (VM_OC_ ## group) | VM_OC_GET_STACK_STACK | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (name ## _RIGHT_LITERAL, CBC_HAS_LITERAL_ARG, 0, \\\n              (VM_OC_ ## group) | VM_OC_GET_STACK_LITERAL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (name ## _TWO_LITERALS, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 1, \\\n              (VM_OC_ ## group) | VM_OC_GET_LITERAL_LITERAL | VM_OC_PUT_STACK)\n\n#define CBC_UNARY_LVALUE_OPERATION(name, group) \\\n  CBC_OPCODE (name, CBC_NO_FLAG, -2, \\\n              (VM_OC_PROP_ ## group) | VM_OC_GET_STACK_STACK | VM_OC_PUT_REFERENCE) \\\n  CBC_OPCODE (name ## _PUSH_RESULT, CBC_NO_FLAG, -1, \\\n              (VM_OC_PROP_ ## group) | VM_OC_GET_STACK_STACK | VM_OC_PUT_REFERENCE | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (name ## _BLOCK, CBC_NO_FLAG, -2, \\\n              (VM_OC_PROP_ ## group) | VM_OC_GET_STACK_STACK | VM_OC_PUT_REFERENCE | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (name ## _IDENT, CBC_HAS_LITERAL_ARG, 0, \\\n              (VM_OC_ ## group) | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT) \\\n  CBC_OPCODE (name ## _IDENT_PUSH_RESULT, CBC_HAS_LITERAL_ARG, 1, \\\n              (VM_OC_ ## group) | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (name ## _IDENT_BLOCK, CBC_HAS_LITERAL_ARG, 0, \\\n              (VM_OC_ ## group) | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT | VM_OC_PUT_BLOCK)\n\n#define CBC_UNARY_LVALUE_WITH_IDENT 3\n\n#define CBC_BINARY_WITH_LITERAL 1\n#define CBC_BINARY_WITH_TWO_LITERALS 2\n\n/**\n * Several opcodes (mostly call and assignment opcodes) have\n * two forms: one which does not push a return value onto\n * the stack, and another which does. The reason is that\n * the return value of these opcodes are often not used\n * and the first form provides smaller byte code.\n *\n * The following rules must be kept by the code generator:\n *  - only the opcode without return value can be emitted\n *    by the code generator\n *  - the first form can be converted to the second form\n *    by adding 1 to the opcode\n *  - after the conversion the opcode must be immediately\n *    flushed, so no further changes are possible\n *\n * Hence CBC_NO_RESULT_OPERATION (context_p->last_cbc_opcode)\n * cannot be true for an opcode which has a result\n */\n#define CBC_NO_RESULT_OPERATION(opcode) \\\n  (((opcode) >= CBC_PRE_INCR && (opcode) < CBC_END) || CBC_EXT_NO_RESULT_OPERATION ((opcode)))\n\n/**\n * Branch instructions are organized in group of 8 opcodes.\n *  - 1st opcode: unused, can be used for other purpose\n *  - 2nd opcode: forward branch with 1 byte offset\n *  - 3rd opcode: forward branch with 2 byte offset\n *  - 4th opcode: forward branch with 3 byte offset\n *  - 5th opcode: unused, can be used for other purpose\n *  - 6th opcode: backward branch with 1 byte offset\n *  - 7th opcode: backward branch with 2 byte offset\n *  - 8th opcode: backward branch with 3 byte offset\n *\n * Reasons:\n *  The branch_opcode & 0x3 tells the length in bytes of the offset\n *  If branch offset & 0x4 == 0, it is a forward branch. Otherwise\n *  it is backward.\n *\n * The offset bytes are encoded in higher to lower order.\n */\n\n#define CBC_FORWARD_BRANCH(name, stack, vm_oc) \\\n  CBC_OPCODE (name, CBC_HAS_BRANCH_ARG | CBC_FORWARD_BRANCH_ARG, stack, \\\n              (vm_oc) | VM_OC_GET_BRANCH) \\\n  CBC_OPCODE (name ## _2, CBC_HAS_BRANCH_ARG | CBC_FORWARD_BRANCH_ARG, stack, \\\n              (vm_oc) | VM_OC_GET_BRANCH) \\\n  CBC_OPCODE (name ## _3, CBC_HAS_BRANCH_ARG | CBC_FORWARD_BRANCH_ARG, stack, \\\n              (vm_oc) | VM_OC_GET_BRANCH)\n\n#define CBC_BACKWARD_BRANCH(name, stack, vm_oc) \\\n  CBC_OPCODE (name, CBC_HAS_BRANCH_ARG, stack, \\\n              (vm_oc) | VM_OC_GET_BRANCH | VM_OC_BACKWARD_BRANCH) \\\n  CBC_OPCODE (name ## _2, CBC_HAS_BRANCH_ARG, stack, \\\n              (vm_oc) | VM_OC_GET_BRANCH | VM_OC_BACKWARD_BRANCH) \\\n  CBC_OPCODE (name ## _3, CBC_HAS_BRANCH_ARG, stack, \\\n              (vm_oc) | VM_OC_GET_BRANCH | VM_OC_BACKWARD_BRANCH)\n\n#define CBC_BRANCH_OFFSET_LENGTH(opcode) \\\n  ((opcode) & 0x3)\n\n#define CBC_BRANCH_IS_BACKWARD(flags) \\\n  (!((flags) & CBC_FORWARD_BRANCH_ARG))\n\n#define CBC_BRANCH_IS_FORWARD(flags) \\\n  ((flags) & CBC_FORWARD_BRANCH_ARG)\n\n/* Stack consumption of opcodes with context. */\n\n/* PARSER_TRY_CONTEXT_STACK_ALLOCATION must be <= 3 */\n#define PARSER_TRY_CONTEXT_STACK_ALLOCATION 1\n/* PARSER_FINALLY_CONTEXT_STACK_ALLOCATION must be <= 3 */\n#define PARSER_FINALLY_CONTEXT_STACK_ALLOCATION 2\n/* PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION must be <= 4 */\n#define PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION 4\n/* PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION must be <= 4 */\n#define PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION 4\n/* PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION must be <= 4 */\n#define PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION 4\n/* PARSER_WITH_CONTEXT_STACK_ALLOCATION must be <= 4 */\n#define PARSER_WITH_CONTEXT_STACK_ALLOCATION 1\n/* PARSER_BLOCK_CONTEXT_STACK_ALLOCATION must be <= 3 */\n#define PARSER_BLOCK_CONTEXT_STACK_ALLOCATION 1\n\n/**\n * Extra stack consumption for finally context.\n */\n#define PARSER_FINALLY_CONTEXT_EXTRA_STACK_ALLOCATION \\\n  (PARSER_FINALLY_CONTEXT_STACK_ALLOCATION - PARSER_TRY_CONTEXT_STACK_ALLOCATION)\n\n/**\n * Opcode definitions.\n */\n#define CBC_OPCODE_LIST \\\n  /* Branch opcodes first. Some other opcodes are mixed. */ \\\n  CBC_OPCODE (CBC_EXT_OPCODE, CBC_NO_FLAG, 0, \\\n              VM_OC_NONE) \\\n  CBC_FORWARD_BRANCH (CBC_JUMP_FORWARD, 0, \\\n                      VM_OC_JUMP) \\\n  CBC_OPCODE (CBC_POP, CBC_NO_FLAG, -1, \\\n              VM_OC_POP) \\\n  CBC_BACKWARD_BRANCH (CBC_JUMP_BACKWARD, 0, \\\n                       VM_OC_JUMP) \\\n  CBC_OPCODE (CBC_POP_BLOCK, CBC_NO_FLAG, -1, \\\n              VM_OC_POP_BLOCK | VM_OC_PUT_BLOCK) \\\n  CBC_FORWARD_BRANCH (CBC_BRANCH_IF_TRUE_FORWARD, -1, \\\n                      VM_OC_BRANCH_IF_TRUE) \\\n  CBC_OPCODE (CBC_THROW, CBC_NO_FLAG, -1, \\\n              VM_OC_THROW | VM_OC_GET_STACK) \\\n  CBC_BACKWARD_BRANCH (CBC_BRANCH_IF_TRUE_BACKWARD, -1, \\\n                       VM_OC_BRANCH_IF_TRUE) \\\n  CBC_OPCODE (CBC_CONTEXT_END, CBC_NO_FLAG, 0, \\\n              VM_OC_CONTEXT_END) \\\n  CBC_FORWARD_BRANCH (CBC_BRANCH_IF_FALSE_FORWARD, -1, \\\n                      VM_OC_BRANCH_IF_FALSE) \\\n  CBC_OPCODE (CBC_CREATE_OBJECT, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_OBJECT | VM_OC_PUT_STACK) \\\n  CBC_BACKWARD_BRANCH (CBC_BRANCH_IF_FALSE_BACKWARD, -1, \\\n                       VM_OC_BRANCH_IF_FALSE) \\\n  CBC_OPCODE (CBC_SET_PROPERTY, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_SET_PROPERTY | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_LITERAL) \\\n  CBC_FORWARD_BRANCH (CBC_JUMP_FORWARD_EXIT_CONTEXT, 0, \\\n                      VM_OC_JUMP_AND_EXIT_CONTEXT) \\\n  CBC_OPCODE (CBC_CREATE_ARRAY, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_ARRAY | VM_OC_PUT_STACK) \\\n  CBC_FORWARD_BRANCH (CBC_BRANCH_IF_LOGICAL_TRUE, -1, \\\n                      VM_OC_BRANCH_IF_LOGICAL_TRUE) \\\n  CBC_OPCODE (CBC_ARRAY_APPEND, CBC_HAS_POP_STACK_BYTE_ARG, 0, \\\n              VM_OC_APPEND_ARRAY) \\\n  CBC_FORWARD_BRANCH (CBC_BRANCH_IF_LOGICAL_FALSE, -1, \\\n                      VM_OC_BRANCH_IF_LOGICAL_FALSE) \\\n  CBC_OPCODE (CBC_PUSH_ELISION, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_ELISON | VM_OC_PUT_STACK) \\\n  CBC_FORWARD_BRANCH (CBC_BRANCH_IF_STRICT_EQUAL, -1, \\\n                      VM_OC_BRANCH_IF_STRICT_EQUAL) \\\n  CBC_OPCODE (CBC_PUSH_NULL, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_NULL | VM_OC_PUT_STACK) \\\n  CBC_FORWARD_BRANCH (CBC_BLOCK_CREATE_CONTEXT, \\\n                      PARSER_BLOCK_CONTEXT_STACK_ALLOCATION, VM_OC_BLOCK_CREATE_CONTEXT) \\\n  \\\n  /* Basic opcodes. Note: These 4 opcodes must me in this order */ \\\n  CBC_OPCODE (CBC_PUSH_LITERAL, CBC_HAS_LITERAL_ARG, 1, \\\n              VM_OC_PUSH | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_PUSH_TWO_LITERALS, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 2, \\\n              VM_OC_PUSH_TWO | VM_OC_GET_LITERAL_LITERAL) \\\n  CBC_OPCODE (CBC_PUSH_THIS_LITERAL, CBC_HAS_LITERAL_ARG, 2, \\\n              VM_OC_PUSH_TWO | VM_OC_GET_THIS_LITERAL) \\\n  CBC_OPCODE (CBC_PUSH_THREE_LITERALS, CBC_HAS_LITERAL_ARG2, 3, \\\n              VM_OC_PUSH_THREE | VM_OC_GET_LITERAL_LITERAL) \\\n  CBC_OPCODE (CBC_PUSH_UNDEFINED, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_UNDEFINED | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_TRUE, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_TRUE | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_FALSE, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_FALSE | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_THIS, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_THIS | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_NUMBER_0, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_0 | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_NUMBER_POS_BYTE, CBC_HAS_BYTE_ARG, 1, \\\n              VM_OC_PUSH_POS_BYTE | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_NUMBER_NEG_BYTE, CBC_HAS_BYTE_ARG, 1, \\\n              VM_OC_PUSH_NEG_BYTE | VM_OC_PUT_STACK) \\\n  /* Note: These 4 opcodes must me in this order */ \\\n  CBC_OPCODE (CBC_PUSH_PROP, CBC_NO_FLAG, -1, \\\n              VM_OC_PROP_GET | VM_OC_GET_STACK_STACK | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_PROP_LITERAL, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_PROP_GET | VM_OC_GET_STACK_LITERAL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_PROP_LITERAL_LITERAL, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 1, \\\n              VM_OC_PROP_GET | VM_OC_GET_LITERAL_LITERAL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_PROP_THIS_LITERAL, CBC_HAS_LITERAL_ARG, 1, \\\n              VM_OC_PROP_GET | VM_OC_GET_THIS_LITERAL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_IDENT_REFERENCE, CBC_HAS_LITERAL_ARG, 3, \\\n              VM_OC_IDENT_REFERENCE | VM_OC_PUT_STACK) \\\n  /* Note: These 4 opcodes must me in this order */ \\\n  CBC_OPCODE (CBC_PUSH_PROP_REFERENCE, CBC_NO_FLAG, 1, \\\n              VM_OC_PROP_REFERENCE | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_PROP_LITERAL_REFERENCE, CBC_HAS_LITERAL_ARG, 2, \\\n              VM_OC_PROP_REFERENCE | VM_OC_GET_LITERAL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_PROP_LITERAL_LITERAL_REFERENCE, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 3, \\\n              VM_OC_PROP_REFERENCE | VM_OC_GET_LITERAL_LITERAL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_PUSH_PROP_THIS_LITERAL_REFERENCE, CBC_HAS_LITERAL_ARG, 3, \\\n              VM_OC_PROP_REFERENCE | VM_OC_GET_THIS_LITERAL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_NEW, CBC_HAS_POP_STACK_BYTE_ARG, 0, \\\n              VM_OC_NEW | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_NEW0, CBC_NO_FLAG, 0, \\\n              VM_OC_NEW | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_NEW1, CBC_NO_FLAG, -1, \\\n              VM_OC_NEW | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EVAL, CBC_NO_FLAG, 0, \\\n              VM_OC_EVAL) \\\n  CBC_OPCODE (CBC_CHECK_VAR, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_CHECK_VAR) \\\n  CBC_OPCODE (CBC_CHECK_LET, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_CHECK_LET) \\\n  CBC_OPCODE (CBC_CREATE_VAR, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_CREATE_BINDING) \\\n  CBC_OPCODE (CBC_CREATE_LET, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_CREATE_BINDING) \\\n  CBC_OPCODE (CBC_CREATE_CONST, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_CREATE_BINDING) \\\n  CBC_OPCODE (CBC_CREATE_LOCAL, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_CREATE_BINDING) \\\n  CBC_OPCODE (CBC_INIT_ARG_OR_CATCH, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_INIT_BINDING) \\\n  CBC_OPCODE (CBC_INIT_LET, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_INIT_BINDING) \\\n  CBC_OPCODE (CBC_INIT_CONST, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_INIT_BINDING) \\\n  CBC_OPCODE (CBC_INIT_ARG_OR_FUNC, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_INIT_ARG_OR_FUNC) \\\n  CBC_OPCODE (CBC_CREATE_VAR_EVAL, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_VAR_EVAL) \\\n  CBC_OPCODE (CBC_CREATE_VAR_FUNC_EVAL, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_VAR_EVAL) \\\n  CBC_OPCODE (CBC_SET_VAR_FUNC, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_ASSIGN | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT) \\\n  CBC_OPCODE (CBC_SET_BYTECODE_PTR, CBC_NO_FLAG, 0, \\\n              VM_OC_SET_BYTECODE_PTR) \\\n  CBC_OPCODE (CBC_RETURN, CBC_NO_FLAG, -1, \\\n              VM_OC_RETURN | VM_OC_GET_STACK) \\\n  CBC_OPCODE (CBC_RETURN_WITH_BLOCK, CBC_NO_FLAG, 0, \\\n              VM_OC_RETURN) \\\n  CBC_OPCODE (CBC_RETURN_WITH_LITERAL, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_RETURN | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_SET_LITERAL_PROPERTY, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_SET_PROPERTY | VM_OC_NON_STATIC_FLAG | VM_OC_GET_LITERAL_LITERAL) \\\n  CBC_OPCODE (CBC_COPY_TO_GLOBAL, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_COPY_TO_GLOBAL | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_BREAKPOINT_ENABLED, CBC_NO_FLAG, 0, \\\n              VM_OC_BREAKPOINT_ENABLED) \\\n  CBC_OPCODE (CBC_BREAKPOINT_DISABLED, CBC_NO_FLAG, 0, \\\n              VM_OC_BREAKPOINT_DISABLED) \\\n  \\\n  /* Unary opcodes. */ \\\n  CBC_UNARY_OPERATION (CBC_PLUS, \\\n                       PLUS) \\\n  CBC_UNARY_OPERATION (CBC_NEGATE, \\\n                       MINUS) \\\n  CBC_UNARY_OPERATION (CBC_LOGICAL_NOT, \\\n                       NOT) \\\n  CBC_UNARY_OPERATION (CBC_BIT_NOT, \\\n                       BIT_NOT) \\\n  CBC_UNARY_OPERATION (CBC_VOID, \\\n                       VOID) \\\n  CBC_OPCODE (CBC_TYPEOF, CBC_NO_FLAG, 0, \\\n              VM_OC_TYPEOF | VM_OC_GET_STACK | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_TYPEOF_IDENT, CBC_HAS_LITERAL_ARG, 1, \\\n              VM_OC_TYPEOF_IDENT | VM_OC_PUT_STACK) \\\n  \\\n  /* Binary opcodes. */ \\\n  CBC_BINARY_OPERATION (CBC_BIT_OR, \\\n                        BIT_OR) \\\n  CBC_BINARY_OPERATION (CBC_BIT_XOR, \\\n                        BIT_XOR) \\\n  CBC_BINARY_OPERATION (CBC_BIT_AND, \\\n                        BIT_AND) \\\n  CBC_BINARY_OPERATION (CBC_EQUAL, \\\n                        EQUAL) \\\n  CBC_BINARY_OPERATION (CBC_NOT_EQUAL, \\\n                        NOT_EQUAL) \\\n  CBC_BINARY_OPERATION (CBC_STRICT_EQUAL, \\\n                        STRICT_EQUAL) \\\n  CBC_BINARY_OPERATION (CBC_STRICT_NOT_EQUAL, \\\n                        STRICT_NOT_EQUAL) \\\n  CBC_BINARY_OPERATION (CBC_LESS, \\\n                        LESS) \\\n  CBC_BINARY_OPERATION (CBC_GREATER, \\\n                        GREATER) \\\n  CBC_BINARY_OPERATION (CBC_LESS_EQUAL, \\\n                        LESS_EQUAL) \\\n  CBC_BINARY_OPERATION (CBC_GREATER_EQUAL, \\\n                        GREATER_EQUAL) \\\n  CBC_BINARY_OPERATION (CBC_IN, \\\n                        IN) \\\n  CBC_BINARY_OPERATION (CBC_INSTANCEOF, \\\n                        INSTANCEOF) \\\n  CBC_BINARY_OPERATION (CBC_LEFT_SHIFT, \\\n                        LEFT_SHIFT) \\\n  CBC_BINARY_OPERATION (CBC_RIGHT_SHIFT, \\\n                        RIGHT_SHIFT) \\\n  CBC_BINARY_OPERATION (CBC_UNS_RIGHT_SHIFT, \\\n                        UNS_RIGHT_SHIFT) \\\n  CBC_BINARY_OPERATION (CBC_ADD, \\\n                        ADD) \\\n  CBC_BINARY_OPERATION (CBC_SUBTRACT, \\\n                        SUB) \\\n  CBC_BINARY_OPERATION (CBC_MULTIPLY, \\\n                        MUL) \\\n  CBC_BINARY_OPERATION (CBC_DIVIDE, \\\n                        DIV) \\\n  CBC_BINARY_OPERATION (CBC_MODULO, \\\n                        MOD) \\\n  CBC_BINARY_OPERATION (CBC_EXPONENTIATION, \\\n                        EXP) \\\n  \\\n  /* Unary lvalue opcodes. */ \\\n  CBC_OPCODE (CBC_DELETE_PUSH_RESULT, CBC_NO_FLAG, -1, \\\n              VM_OC_PROP_DELETE | VM_OC_GET_STACK_STACK | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_DELETE_IDENT_PUSH_RESULT, CBC_HAS_LITERAL_ARG, 1, \\\n              VM_OC_DELETE | VM_OC_PUT_STACK) \\\n  CBC_UNARY_LVALUE_OPERATION (CBC_PRE_INCR, \\\n                              PRE_INCR) \\\n  CBC_UNARY_LVALUE_OPERATION (CBC_PRE_DECR, \\\n                              PRE_DECR) \\\n  CBC_UNARY_LVALUE_OPERATION (CBC_POST_INCR, \\\n                              POST_INCR) \\\n  CBC_UNARY_LVALUE_OPERATION (CBC_POST_DECR, \\\n                              POST_DECR) \\\n  \\\n  /* Call opcodes. */ \\\n  CBC_OPCODE (CBC_CALL, CBC_HAS_POP_STACK_BYTE_ARG, -1, \\\n              VM_OC_CALL) \\\n  CBC_OPCODE (CBC_CALL_PUSH_RESULT, CBC_HAS_POP_STACK_BYTE_ARG, 0, \\\n              VM_OC_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_CALL_BLOCK, CBC_HAS_POP_STACK_BYTE_ARG, -1, \\\n              VM_OC_CALL | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_CALL_PROP, CBC_HAS_POP_STACK_BYTE_ARG, -3, \\\n              VM_OC_CALL) \\\n  CBC_OPCODE (CBC_CALL_PROP_PUSH_RESULT, CBC_HAS_POP_STACK_BYTE_ARG, -2, \\\n              VM_OC_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_CALL_PROP_BLOCK, CBC_HAS_POP_STACK_BYTE_ARG, -3, \\\n              VM_OC_CALL | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_CALL0, CBC_NO_FLAG, -1, \\\n              VM_OC_CALL) \\\n  CBC_OPCODE (CBC_CALL0_PUSH_RESULT, CBC_NO_FLAG, 0, \\\n              VM_OC_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_CALL0_BLOCK, CBC_NO_FLAG, -1, \\\n              VM_OC_CALL | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_CALL0_PROP, CBC_NO_FLAG, -3, \\\n              VM_OC_CALL) \\\n  CBC_OPCODE (CBC_CALL0_PROP_PUSH_RESULT, CBC_NO_FLAG, -2, \\\n              VM_OC_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_CALL0_PROP_BLOCK, CBC_NO_FLAG, -3, \\\n              VM_OC_CALL | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_CALL1, CBC_NO_FLAG, -2, \\\n              VM_OC_CALL) \\\n  CBC_OPCODE (CBC_CALL1_PUSH_RESULT, CBC_NO_FLAG, -1, \\\n              VM_OC_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_CALL1_BLOCK, CBC_NO_FLAG, -2, \\\n              VM_OC_CALL | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_CALL1_PROP, CBC_NO_FLAG, -4, \\\n              VM_OC_CALL) \\\n  CBC_OPCODE (CBC_CALL1_PROP_PUSH_RESULT, CBC_NO_FLAG, -3, \\\n              VM_OC_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_CALL1_PROP_BLOCK, CBC_NO_FLAG, -4, \\\n              VM_OC_CALL | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_CALL2, CBC_NO_FLAG, -3, \\\n              VM_OC_CALL) \\\n  CBC_OPCODE (CBC_CALL2_PUSH_RESULT, CBC_NO_FLAG, -2, \\\n              VM_OC_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_CALL2_BLOCK, CBC_NO_FLAG, -3, \\\n              VM_OC_CALL | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_CALL2_PROP, CBC_NO_FLAG, -4, \\\n              VM_OC_CALL) \\\n  CBC_OPCODE (CBC_CALL2_PROP_PUSH_RESULT, CBC_NO_FLAG, -3, \\\n              VM_OC_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_CALL2_PROP_BLOCK, CBC_NO_FLAG, -4, \\\n              VM_OC_CALL | VM_OC_PUT_BLOCK) \\\n  \\\n  /* Binary assignment opcodes. */ \\\n  CBC_OPCODE (CBC_ASSIGN, CBC_NO_FLAG, -3, \\\n              VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_REFERENCE) \\\n  CBC_OPCODE (CBC_ASSIGN_PUSH_RESULT, CBC_NO_FLAG, -2, \\\n              VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_REFERENCE | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_ASSIGN_BLOCK, CBC_NO_FLAG, -3, \\\n              VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_REFERENCE | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_ASSIGN_SET_IDENT, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_IDENT) \\\n  CBC_OPCODE (CBC_ASSIGN_SET_IDENT_PUSH_RESULT, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_IDENT | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_ASSIGN_SET_IDENT_BLOCK, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_IDENT | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_ASSIGN_LITERAL_SET_IDENT, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_ASSIGN | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT) \\\n  CBC_OPCODE (CBC_ASSIGN_LITERAL_SET_IDENT_PUSH_RESULT, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 1, \\\n              VM_OC_ASSIGN | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_ASSIGN_LITERAL_SET_IDENT_BLOCK, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_ASSIGN | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_ASSIGN_PROP_LITERAL, CBC_HAS_LITERAL_ARG, -2, \\\n              VM_OC_ASSIGN_PROP | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE) \\\n  CBC_OPCODE (CBC_ASSIGN_PROP_LITERAL_PUSH_RESULT, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_ASSIGN_PROP | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_ASSIGN_PROP_LITERAL_BLOCK, CBC_HAS_LITERAL_ARG, -2, \\\n              VM_OC_ASSIGN_PROP | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_ASSIGN_PROP_THIS_LITERAL, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_ASSIGN_PROP_THIS | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE) \\\n  CBC_OPCODE (CBC_ASSIGN_PROP_THIS_LITERAL_PUSH_RESULT, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_ASSIGN_PROP_THIS | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_ASSIGN_PROP_THIS_LITERAL_BLOCK, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_ASSIGN_PROP_THIS | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_MOV_IDENT, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_MOV_IDENT | VM_OC_GET_STACK | VM_OC_PUT_IDENT) \\\n  CBC_OPCODE (CBC_ASSIGN_LET_CONST, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_ASSIGN_LET_CONST | VM_OC_GET_STACK) \\\n  CBC_OPCODE (CBC_ASSIGN_LET_CONST_LITERAL, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_ASSIGN_LET_CONST | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_ASSIGN_SUPER, CBC_NO_FLAG, -3, \\\n              VM_OC_ASSIGN_SUPER) \\\n  CBC_OPCODE (CBC_ASSIGN_SUPER_PUSH_RESULT, CBC_NO_FLAG, -2, \\\n              VM_OC_ASSIGN_SUPER | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_ASSIGN_SUPER_BLOCK, CBC_NO_FLAG, -3, \\\n              VM_OC_ASSIGN_SUPER | VM_OC_PUT_BLOCK) \\\n  \\\n  /* Last opcode (not a real opcode). */ \\\n  CBC_OPCODE (CBC_END, CBC_NO_FLAG, 0, \\\n              VM_OC_NONE)\n\n/* All EXT branches are statement block end\n * marks, so they are always forward branches. */\n\n#define CBC_EXT_OPCODE_LIST \\\n  /* Branch opcodes first. Some other opcodes are mixed. */ \\\n  CBC_OPCODE (CBC_EXT_NOP, CBC_NO_FLAG, 0, \\\n              VM_OC_NONE) \\\n  CBC_FORWARD_BRANCH (CBC_EXT_WITH_CREATE_CONTEXT, \\\n                      -1 + PARSER_WITH_CONTEXT_STACK_ALLOCATION, VM_OC_WITH) \\\n  CBC_OPCODE (CBC_EXT_FOR_IN_GET_NEXT, CBC_NO_FLAG, 1, \\\n              VM_OC_FOR_IN_GET_NEXT | VM_OC_PUT_STACK) \\\n  CBC_FORWARD_BRANCH (CBC_EXT_FOR_IN_INIT, \\\n                      -1 + PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION, VM_OC_FOR_IN_INIT) \\\n  CBC_OPCODE (CBC_EXT_SET_GETTER, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_SET_GETTER | VM_OC_NON_STATIC_FLAG | VM_OC_GET_LITERAL_LITERAL) \\\n  CBC_BACKWARD_BRANCH (CBC_EXT_BRANCH_IF_FOR_IN_HAS_NEXT, 0, \\\n                       VM_OC_FOR_IN_HAS_NEXT) \\\n  CBC_OPCODE (CBC_EXT_FOR_OF_GET_NEXT, CBC_NO_FLAG, 1, \\\n              VM_OC_FOR_OF_GET_NEXT | VM_OC_PUT_STACK) \\\n  CBC_FORWARD_BRANCH (CBC_EXT_FOR_OF_INIT, \\\n                      -1 + PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION, VM_OC_FOR_OF_INIT) \\\n  CBC_OPCODE (CBC_EXT_PUSH_NAMED_FUNC_EXPRESSION, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 1, \\\n              VM_OC_PUSH_NAMED_FUNC_EXPR | VM_OC_GET_LITERAL_LITERAL) \\\n  CBC_BACKWARD_BRANCH (CBC_EXT_BRANCH_IF_FOR_OF_HAS_NEXT, 0, \\\n                       VM_OC_FOR_OF_HAS_NEXT) \\\n  CBC_OPCODE (CBC_EXT_CLONE_CONTEXT, CBC_NO_FLAG, 0, \\\n              VM_OC_CLONE_CONTEXT) \\\n  CBC_FORWARD_BRANCH (CBC_EXT_FOR_AWAIT_OF_INIT, \\\n                      -1 + PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION, VM_OC_FOR_AWAIT_OF_INIT) \\\n  CBC_OPCODE (CBC_EXT_CLONE_FULL_CONTEXT, CBC_NO_FLAG, 0, \\\n              VM_OC_CLONE_CONTEXT) \\\n  CBC_BACKWARD_BRANCH (CBC_EXT_BRANCH_IF_FOR_AWAIT_OF_HAS_NEXT, 0, \\\n                       VM_OC_FOR_AWAIT_OF_HAS_NEXT) \\\n  CBC_OPCODE (CBC_EXT_SET_SETTER, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_SET_SETTER | VM_OC_NON_STATIC_FLAG | VM_OC_GET_LITERAL_LITERAL) \\\n  CBC_FORWARD_BRANCH (CBC_EXT_TRY_CREATE_CONTEXT, PARSER_TRY_CONTEXT_STACK_ALLOCATION, \\\n                      VM_OC_TRY) \\\n  CBC_OPCODE (CBC_EXT_TRY_CREATE_ENV, CBC_NO_FLAG, 0, \\\n              VM_OC_BLOCK_CREATE_CONTEXT) \\\n  CBC_FORWARD_BRANCH (CBC_EXT_CATCH, 1, \\\n                      VM_OC_CATCH) \\\n  CBC_OPCODE (CBC_EXT_RESOLVE_BASE, CBC_NO_FLAG, 0, \\\n              VM_OC_RESOLVE_BASE_FOR_CALL) \\\n  CBC_FORWARD_BRANCH (CBC_EXT_FINALLY, PARSER_FINALLY_CONTEXT_EXTRA_STACK_ALLOCATION, \\\n                      VM_OC_FINALLY) \\\n  CBC_OPCODE (CBC_EXT_INITIALIZER_PUSH_PROP, CBC_NO_FLAG, 0, \\\n              VM_OC_INITIALIZER_PUSH_PROP | VM_OC_GET_STACK) \\\n  CBC_FORWARD_BRANCH (CBC_EXT_DEFAULT_INITIALIZER, -1, \\\n                      VM_OC_DEFAULT_INITIALIZER) \\\n  CBC_OPCODE (CBC_EXT_ERROR, CBC_NO_FLAG, 0, \\\n              VM_OC_ERROR) \\\n  CBC_FORWARD_BRANCH (CBC_EXT_BRANCH_IF_NULLISH, -1, \\\n                      VM_OC_BRANCH_IF_NULLISH) \\\n  \\\n  /* Basic opcodes. */ \\\n  CBC_OPCODE (CBC_EXT_CREATE_ARGUMENTS, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_CREATE_ARGUMENTS) \\\n  CBC_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_0, CBC_HAS_LITERAL_ARG, 2, \\\n              VM_OC_PUSH_LIT_0 | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_POS_BYTE, CBC_HAS_LITERAL_ARG | CBC_HAS_BYTE_ARG, 2, \\\n              VM_OC_PUSH_LIT_POS_BYTE | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE, CBC_HAS_LITERAL_ARG | CBC_HAS_BYTE_ARG, 2, \\\n              VM_OC_PUSH_LIT_NEG_BYTE | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_CREATE_VAR_EVAL, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_EXT_VAR_EVAL) \\\n  CBC_OPCODE (CBC_EXT_CREATE_VAR_FUNC_EVAL, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_EXT_VAR_EVAL) \\\n  CBC_OPCODE (CBC_EXT_COPY_FROM_ARG, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_COPY_FROM_ARG) \\\n  CBC_OPCODE (CBC_EXT_PUSH_REST_OBJECT, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_REST_OBJECT) \\\n  CBC_OPCODE (CBC_EXT_STRING_CONCAT, CBC_NO_FLAG, -1, \\\n              VM_OC_STRING_CONCAT | VM_OC_GET_STACK_STACK | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_STRING_CONCAT_RIGHT_LITERAL, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_STRING_CONCAT | VM_OC_GET_STACK_LITERAL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_STRING_CONCAT_TWO_LITERALS, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 1, \\\n              VM_OC_STRING_CONCAT | VM_OC_GET_LITERAL_LITERAL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_GET_TAGGED_TEMPLATE_LITERAL, CBC_HAS_BYTE_ARG, 1, \\\n              VM_OC_GET_TEMPLATE_OBJECT | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_LINE, CBC_NO_FLAG, 0, \\\n              VM_OC_LINE) \\\n  CBC_OPCODE (CBC_EXT_THROW_REFERENCE_ERROR, CBC_NO_FLAG, 1, \\\n              VM_OC_THROW_REFERENCE_ERROR) \\\n  CBC_OPCODE (CBC_EXT_THROW_ASSIGN_CONST_ERROR, CBC_NO_FLAG, 0, \\\n              VM_OC_THROW_CONST_ERROR) \\\n  CBC_OPCODE (CBC_EXT_REQUIRE_OBJECT_COERCIBLE, CBC_NO_FLAG, 0, \\\n              VM_OC_REQUIRE_OBJECT_COERCIBLE) \\\n  CBC_OPCODE (CBC_EXT_COPY_DATA_PROPERTIES, CBC_NO_FLAG, -1, \\\n              VM_OC_COPY_DATA_PROPERTIES) \\\n  CBC_OPCODE (CBC_EXT_SET_FUNCTION_NAME, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_SET_FUNCTION_NAME | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_SET_CLASS_NAME, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_SET_FUNCTION_NAME) \\\n  CBC_OPCODE (CBC_EXT_SET_COMPUTED_FUNCTION_NAME, CBC_NO_FLAG, 0, \\\n              VM_OC_SET_FUNCTION_NAME) \\\n  CBC_OPCODE (CBC_EXT_SET_COMPUTED_GETTER_NAME, CBC_NO_FLAG, 0, \\\n              VM_OC_SET_FUNCTION_NAME) \\\n  CBC_OPCODE (CBC_EXT_SET_COMPUTED_SETTER_NAME, CBC_NO_FLAG, 0, \\\n              VM_OC_SET_FUNCTION_NAME) \\\n  \\\n  /* Computed / class property related opcodes. */ \\\n  CBC_OPCODE (CBC_EXT_SET_COMPUTED_PROPERTY, CBC_NO_FLAG, -2, \\\n              VM_OC_SET_COMPUTED_PROPERTY | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_STACK) \\\n  CBC_OPCODE (CBC_EXT_SET_COMPUTED_PROPERTY_LITERAL, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_SET_COMPUTED_PROPERTY | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_SET_COMPUTED_GETTER, CBC_NO_FLAG, -2, \\\n              VM_OC_SET_GETTER | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_STACK) \\\n  CBC_OPCODE (CBC_EXT_SET_COMPUTED_SETTER, CBC_NO_FLAG, -2, \\\n              VM_OC_SET_SETTER | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_STACK) \\\n  CBC_OPCODE (CBC_EXT_SET_STATIC_PROPERTY, CBC_HAS_LITERAL_ARG, -1, \\\n              VM_OC_SET_PROPERTY | VM_OC_GET_STACK_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_SET_STATIC_PROPERTY_LITERAL, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_SET_PROPERTY | VM_OC_GET_LITERAL_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_SET_STATIC_COMPUTED_PROPERTY, CBC_NO_FLAG, -2, \\\n              VM_OC_SET_COMPUTED_PROPERTY | VM_OC_GET_STACK_STACK) \\\n  CBC_OPCODE (CBC_EXT_SET_STATIC_GETTER, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_SET_GETTER | VM_OC_GET_LITERAL_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_SET_STATIC_SETTER, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \\\n              VM_OC_SET_SETTER | VM_OC_GET_LITERAL_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_SET_STATIC_COMPUTED_GETTER, CBC_NO_FLAG, -2, \\\n              VM_OC_SET_GETTER | VM_OC_GET_STACK_STACK) \\\n  CBC_OPCODE (CBC_EXT_SET_STATIC_COMPUTED_SETTER, CBC_NO_FLAG, -2, \\\n              VM_OC_SET_SETTER | VM_OC_GET_STACK_STACK) \\\n  CBC_OPCODE (CBC_EXT_SET__PROTO__, CBC_NO_FLAG, -1, \\\n              VM_OC_SET__PROTO__ | VM_OC_GET_STACK) \\\n  CBC_OPCODE (CBC_EXT_PUSH_STATIC_FIELD_FUNC, CBC_HAS_LITERAL_ARG, 1, \\\n              VM_OC_PUSH_STATIC_FIELD_FUNC | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_PUSH_STATIC_COMPUTED_FIELD_FUNC, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_PUSH_STATIC_FIELD_FUNC | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_ADD_COMPUTED_FIELD, CBC_NO_FLAG, -1, \\\n              VM_OC_ADD_COMPUTED_FIELD | VM_OC_GET_STACK) \\\n  CBC_OPCODE (CBC_EXT_ADD_STATIC_COMPUTED_FIELD, CBC_NO_FLAG, -1, \\\n              VM_OC_ADD_COMPUTED_FIELD | VM_OC_GET_STACK) \\\n  \\\n  /* Class related opcodes. */ \\\n  CBC_OPCODE (CBC_EXT_PUSH_NAMED_CLASS_ENV, CBC_HAS_LITERAL_ARG, 1, \\\n              VM_OC_PUSH_CLASS_ENVIRONMENT) \\\n  CBC_OPCODE (CBC_EXT_PUSH_IMPLICIT_CONSTRUCTOR, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_IMPLICIT_CTOR | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_PUSH_IMPLICIT_CONSTRUCTOR_HERITAGE, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_IMPLICIT_CTOR | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_INIT_CLASS, CBC_NO_FLAG, 0, \\\n              VM_OC_INIT_CLASS | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_FINALIZE_NAMED_CLASS, CBC_HAS_LITERAL_ARG, -2, \\\n              VM_OC_FINALIZE_CLASS) \\\n  CBC_OPCODE (CBC_EXT_FINALIZE_ANONYMOUS_CLASS, CBC_NO_FLAG, -2, \\\n              VM_OC_FINALIZE_CLASS) \\\n  CBC_OPCODE (CBC_EXT_SET_FIELD_INIT, CBC_HAS_LITERAL_ARG, 0, \\\n              VM_OC_SET_FIELD_INIT | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_RUN_FIELD_INIT, CBC_NO_FLAG, 0, \\\n              VM_OC_RUN_FIELD_INIT) \\\n  CBC_OPCODE (CBC_EXT_RUN_STATIC_FIELD_INIT, CBC_NO_FLAG, -1, \\\n              VM_OC_RUN_STATIC_FIELD_INIT) \\\n  CBC_OPCODE (CBC_EXT_SET_NEXT_COMPUTED_FIELD, CBC_NO_FLAG, -1, \\\n              VM_OC_SET_NEXT_COMPUTED_FIELD | VM_OC_PUT_REFERENCE) \\\n  CBC_OPCODE (CBC_EXT_PUSH_SUPER, CBC_NO_FLAG, 1, \\\n              VM_OC_NONE) \\\n  CBC_OPCODE (CBC_EXT_PUSH_SUPER_CONSTRUCTOR, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_SUPER_CONSTRUCTOR) \\\n  CBC_OPCODE (CBC_EXT_PUSH_SUPER_PROP, CBC_NO_FLAG, 0, \\\n              VM_OC_SUPER_REFERENCE | VM_OC_GET_STACK) \\\n  CBC_OPCODE (CBC_EXT_SUPER_PROP_REFERENCE, CBC_NO_FLAG, 2, \\\n              VM_OC_SUPER_REFERENCE | VM_OC_GET_STACK) \\\n  CBC_OPCODE (CBC_EXT_PUSH_SUPER_PROP_LITERAL, CBC_HAS_LITERAL_ARG, 1, \\\n              VM_OC_SUPER_REFERENCE | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_SUPER_PROP_LITERAL_REFERENCE, CBC_HAS_LITERAL_ARG, 3, \\\n              VM_OC_SUPER_REFERENCE | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_SUPER_PROP_ASSIGNMENT_REFERENCE, CBC_NO_FLAG, 1, \\\n              VM_OC_SUPER_REFERENCE | VM_OC_GET_STACK) \\\n  CBC_OPCODE (CBC_EXT_SUPER_PROP_LITERAL_ASSIGNMENT_REFERENCE, CBC_HAS_LITERAL_ARG, 2, \\\n              VM_OC_SUPER_REFERENCE | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_OBJECT_LITERAL_SET_HOME_OBJECT, CBC_NO_FLAG, 0, \\\n              VM_OC_SET_HOME_OBJECT) \\\n  CBC_OPCODE (CBC_EXT_OBJECT_LITERAL_SET_HOME_OBJECT_COMPUTED, CBC_NO_FLAG, 0, \\\n              VM_OC_SET_HOME_OBJECT) \\\n  CBC_OPCODE (CBC_EXT_PUSH_OBJECT_SUPER_ENVIRONMENT, CBC_NO_FLAG, 1, \\\n              VM_OC_OBJECT_LITERAL_HOME_ENV) \\\n  CBC_OPCODE (CBC_EXT_POP_OBJECT_SUPER_ENVIRONMENT, CBC_NO_FLAG, -1, \\\n              VM_OC_OBJECT_LITERAL_HOME_ENV) \\\n  CBC_OPCODE (CBC_EXT_RESOLVE_LEXICAL_THIS, CBC_NO_FLAG, 1, \\\n              VM_OC_RESOLVE_LEXICAL_THIS | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_LOCAL_EVAL, CBC_HAS_BYTE_ARG, 0, \\\n              VM_OC_LOCAL_EVAL) \\\n  CBC_OPCODE (CBC_EXT_SUPER_CALL, CBC_HAS_POP_STACK_BYTE_ARG, -1, \\\n              VM_OC_SUPER_CALL) \\\n  CBC_OPCODE (CBC_EXT_SUPER_CALL_PUSH_RESULT, CBC_HAS_POP_STACK_BYTE_ARG, 0, \\\n              VM_OC_SUPER_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_SUPER_CALL_BLOCK, CBC_HAS_POP_STACK_BYTE_ARG, -1, \\\n              VM_OC_SUPER_CALL | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_SUPER_CALL, CBC_HAS_POP_STACK_BYTE_ARG, -1, \\\n              VM_OC_SUPER_CALL) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_SUPER_CALL_PUSH_RESULT, CBC_HAS_POP_STACK_BYTE_ARG, 0, \\\n              VM_OC_SUPER_CALL | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_SUPER_CALL_BLOCK, CBC_HAS_POP_STACK_BYTE_ARG, -1, \\\n              VM_OC_SUPER_CALL | VM_OC_PUT_BLOCK) \\\n  \\\n  /* Spread / rest operation related opcodes. */ \\\n  CBC_OPCODE (CBC_EXT_SPREAD_CALL, CBC_HAS_POP_STACK_BYTE_ARG, -1, \\\n              VM_OC_SPREAD_ARGUMENTS) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_CALL_PUSH_RESULT, CBC_HAS_POP_STACK_BYTE_ARG, 0, \\\n              VM_OC_SPREAD_ARGUMENTS | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_CALL_BLOCK, CBC_HAS_POP_STACK_BYTE_ARG, -1, \\\n              VM_OC_SPREAD_ARGUMENTS | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_CALL_PROP, CBC_HAS_POP_STACK_BYTE_ARG, -3, \\\n              VM_OC_SPREAD_ARGUMENTS) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_CALL_PROP_PUSH_RESULT, CBC_HAS_POP_STACK_BYTE_ARG, -2, \\\n              VM_OC_SPREAD_ARGUMENTS | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_CALL_PROP_BLOCK, CBC_HAS_POP_STACK_BYTE_ARG, -3, \\\n              VM_OC_SPREAD_ARGUMENTS | VM_OC_PUT_BLOCK) \\\n  CBC_OPCODE (CBC_EXT_PUSH_SPREAD_ELEMENT, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_SPREAD_ELEMENT) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_ARRAY_APPEND, CBC_HAS_POP_STACK_BYTE_ARG, 0, \\\n              VM_OC_APPEND_ARRAY) \\\n  CBC_OPCODE (CBC_EXT_REST_INITIALIZER, CBC_NO_FLAG, 1, \\\n              VM_OC_REST_INITIALIZER) \\\n  CBC_OPCODE (CBC_EXT_INITIALIZER_PUSH_PROP_LITERAL, CBC_HAS_LITERAL_ARG, 1, \\\n              VM_OC_INITIALIZER_PUSH_PROP | VM_OC_GET_LITERAL) \\\n  CBC_OPCODE (CBC_EXT_SPREAD_NEW, CBC_HAS_POP_STACK_BYTE_ARG, 0, \\\n              VM_OC_SPREAD_ARGUMENTS | VM_OC_PUT_STACK) \\\n  CBC_OPCODE (CBC_EXT_MOVE, CBC_NO_FLAG, 0, \\\n              VM_OC_MOVE) \\\n  CBC_OPCODE (CBC_EXT_MOVE_2, CBC_NO_FLAG, 0, \\\n              VM_OC_MOVE) \\\n  CBC_OPCODE (CBC_EXT_MOVE_3, CBC_NO_FLAG, 0, \\\n              VM_OC_MOVE) \\\n  \\\n  /* Iterator related opcodes. */ \\\n  CBC_OPCODE (CBC_EXT_GET_ITERATOR, CBC_NO_FLAG, 1, \\\n              VM_OC_GET_ITERATOR) \\\n  CBC_OPCODE (CBC_EXT_ITERATOR_STEP, CBC_NO_FLAG, 1, \\\n              VM_OC_ITERATOR_STEP) \\\n  CBC_OPCODE (CBC_EXT_ITERATOR_CLOSE, CBC_NO_FLAG, -1, \\\n              VM_OC_ITERATOR_CLOSE | VM_OC_GET_STACK) \\\n  \\\n  /* Object initializer related opcodes. */ \\\n  CBC_OPCODE (CBC_EXT_INITIALIZER_PUSH_LIST, CBC_NO_FLAG, 1, \\\n              VM_OC_INITIALIZER_PUSH_LIST) \\\n  CBC_OPCODE (CBC_EXT_INITIALIZER_PUSH_REST, CBC_NO_FLAG, 0, \\\n              VM_OC_INITIALIZER_PUSH_REST) \\\n  CBC_OPCODE (CBC_EXT_INITIALIZER_PUSH_NAME, CBC_NO_FLAG, 0, \\\n              VM_OC_INITIALIZER_PUSH_NAME | VM_OC_GET_STACK) \\\n  CBC_OPCODE (CBC_EXT_INITIALIZER_PUSH_NAME_LITERAL, CBC_HAS_LITERAL_ARG, 1, \\\n              VM_OC_INITIALIZER_PUSH_NAME | VM_OC_GET_LITERAL) \\\n  \\\n  /* Executable object related opcodes. */ \\\n  CBC_OPCODE (CBC_EXT_CREATE_GENERATOR, CBC_NO_FLAG, 1, \\\n              VM_OC_CREATE_GENERATOR) \\\n  CBC_OPCODE (CBC_EXT_YIELD, CBC_NO_FLAG, 0, \\\n              VM_OC_YIELD) \\\n  CBC_OPCODE (CBC_EXT_YIELD_ITERATOR, CBC_NO_FLAG, 0, \\\n              VM_OC_YIELD) \\\n  CBC_OPCODE (CBC_EXT_ASYNC_YIELD, CBC_NO_FLAG, 0, \\\n              VM_OC_ASYNC_YIELD) \\\n  CBC_OPCODE (CBC_EXT_ASYNC_YIELD_ITERATOR, CBC_NO_FLAG, 0, \\\n              VM_OC_ASYNC_YIELD_ITERATOR) \\\n  CBC_OPCODE (CBC_EXT_AWAIT, CBC_NO_FLAG, 0, \\\n              VM_OC_AWAIT) \\\n  CBC_OPCODE (CBC_EXT_GENERATOR_AWAIT, CBC_NO_FLAG, 0, \\\n              VM_OC_GENERATOR_AWAIT) \\\n  CBC_OPCODE (CBC_EXT_ASYNC_EXIT, CBC_NO_FLAG, 0, \\\n              VM_OC_ASYNC_EXIT) \\\n  CBC_OPCODE (CBC_EXT_RETURN, CBC_NO_FLAG, -1, \\\n              VM_OC_EXT_RETURN | VM_OC_GET_STACK) \\\n  CBC_OPCODE (CBC_EXT_RETURN_UNDEFINED, CBC_NO_FLAG, 0, \\\n              VM_OC_EXT_RETURN) \\\n  CBC_OPCODE (CBC_EXT_PUSH_NEW_TARGET, CBC_NO_FLAG, 1, \\\n              VM_OC_PUSH_NEW_TARGET | VM_OC_PUT_STACK) \\\n  \\\n  /* Last opcode (not a real opcode). */ \\\n  CBC_OPCODE (CBC_EXT_END, CBC_NO_FLAG, 0, \\\n              VM_OC_NONE)\n\n#define CBC_MAXIMUM_BYTE_VALUE 255\n#define CBC_MAXIMUM_SMALL_VALUE 510\n#define CBC_MAXIMUM_FULL_VALUE 32767\n\n#define CBC_PUSH_NUMBER_BYTE_RANGE_END 256\n\n#define CBC_HIGHEST_BIT_MASK 0x80\n#define CBC_LOWER_SEVEN_BIT_MASK 0x7f\n\n/**\n * Literal encoding limit when full literal encoding mode is enabled\n */\n#define CBC_FULL_LITERAL_ENCODING_LIMIT 128\n\n/**\n * Literal encoding delta when full literal encoding mode is enabled\n */\n#define CBC_FULL_LITERAL_ENCODING_DELTA 0x8000\n\n/**\n * Literal encoding limit when full literal encoding mode is disabled\n */\n#define CBC_SMALL_LITERAL_ENCODING_LIMIT 255\n\n/**\n * Literal encoding delta when full literal encoding mode is disabled\n */\n#define CBC_SMALL_LITERAL_ENCODING_DELTA 0xfe01\n\n/**\n * Literal indicies belong to one of the following groups:\n *\n * 0 <= index < argument_end                    : arguments\n * argument_end <= index < register_end         : registers\n * register_end <= index < ident_end            : identifiers\n * ident_end <= index < const_literal_end       : constant literals\n * const_literal_end <= index < literal_end     : template literals\n */\n\n/**\n * Compiled byte code arguments.\n */\ntypedef struct\n{\n  ecma_compiled_code_t header;      /**< compiled code header */\n  uint8_t stack_limit;              /**< maximum number of values stored on the stack */\n  uint8_t argument_end;             /**< number of arguments expected by the function */\n  uint8_t register_end;             /**< end position of the register group */\n  uint8_t ident_end;                /**< end position of the identifier group */\n  uint8_t const_literal_end;        /**< end position of the const literal group */\n  uint8_t literal_end;              /**< end position of the literal group */\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_value_t realm_value;         /**< realm value */\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n} cbc_uint8_arguments_t;\n\n/**\n * Compiled byte code arguments.\n */\ntypedef struct\n{\n  ecma_compiled_code_t header;      /**< compiled code header */\n  uint16_t stack_limit;             /**< maximum number of values stored on the stack */\n  uint16_t argument_end;            /**< number of arguments expected by the function */\n  uint16_t register_end;            /**< end position of the register group */\n  uint16_t ident_end;               /**< end position of the identifier group */\n  uint16_t const_literal_end;       /**< end position of the const literal group */\n  uint16_t literal_end;             /**< end position of the literal group */\n  uint16_t padding;                 /**< an unused value */\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_value_t realm_value;         /**< realm value */\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n} cbc_uint16_arguments_t;\n\n/**\n * Compact byte code status flags.\n */\ntypedef enum\n{\n  CBC_CODE_FLAGS_FULL_LITERAL_ENCODING = (1u << 0), /**< full literal encoding mode is enabled */\n  CBC_CODE_FLAGS_UINT16_ARGUMENTS = (1u << 1), /**< compiled code data is cbc_uint16_arguments_t */\n  CBC_CODE_FLAGS_STRICT_MODE = (1u << 2), /**< strict mode is enabled */\n  CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED = (1u << 3), /**< mapped arguments object must be constructed */\n  CBC_CODE_FLAGS_LEXICAL_ENV_NOT_NEEDED = (1u << 4), /**< no need to create a lexical environment */\n  CBC_CODE_FLAGS_HAS_EXTENDED_INFO = (1u << 5), /**< this function has extended info block */\n  CBC_CODE_FLAGS_HAS_TAGGED_LITERALS = (1u << 6), /**< this function has tagged template literal list */\n  CBC_CODE_FLAGS_STATIC_FUNCTION = (1u << 7), /**< this function is a static snapshot function */\n  CBC_CODE_FLAGS_DEBUGGER_IGNORE = (1u << 8), /**< this function should be ignored by debugger */\n  CBC_CODE_FLAGS_LEXICAL_BLOCK_NEEDED = (1u << 9), /**< compiled code needs a lexical block */\n\n  /* Bits from bit 12 is reserved for function types (see CBC_FUNCTION_TYPE_SHIFT).\n   * Note: the last bits are used for type flags because < and >= operators can be used to\n           check a range of types without decoding the actual type. */\n} cbc_code_flags_t;\n\n/**\n * Compact byte code function types.\n */\ntypedef enum\n{\n  /* The first type must be regular expression (see CBC_IS_FUNCTION) */\n  CBC_REGULAR_EXPRESSION, /**< regular expression literal */\n  CBC_FUNCTION_NORMAL, /**< function without special properties */\n  CBC_FUNCTION_CONSTRUCTOR, /**< constructor function */\n\n  /* The following functions cannot be constructed (see CBC_FUNCTION_IS_CONSTRUCTABLE) */\n  CBC_FUNCTION_SCRIPT, /**< script (global) function */\n  CBC_FUNCTION_GENERATOR, /**< generator function */\n  CBC_FUNCTION_ASYNC, /**< async function */\n  CBC_FUNCTION_ASYNC_GENERATOR, /**< async generator function */\n\n  /* The following functions has no prototype (see CBC_FUNCTION_HAS_PROTOTYPE) */\n  CBC_FUNCTION_ACCESSOR, /**< property accessor function */\n  CBC_FUNCTION_METHOD, /**< method */\n\n  /* The following functions are arrow function (see CBC_FUNCTION_IS_ARROW) */\n  CBC_FUNCTION_ARROW, /**< arrow function */\n  CBC_FUNCTION_ASYNC_ARROW, /**< arrow function */\n} cbc_code_function_types_t;\n\n/**\n * Shift for getting / setting the function type of a byte code.\n */\n#define CBC_FUNCTION_TYPE_SHIFT 12\n\n/**\n * Compute function type bits in code flags.\n */\n#define CBC_FUNCTION_TO_TYPE_BITS(name) \\\n  ((name) << CBC_FUNCTION_TYPE_SHIFT)\n\n/**\n * Get function type from code flags.\n */\n#define CBC_FUNCTION_GET_TYPE(flags) \\\n  ((uint16_t) ((flags) >> CBC_FUNCTION_TYPE_SHIFT))\n\n/**\n * Checks whether the byte code is a function or a regular expression.\n */\n#define CBC_IS_FUNCTION(flags) \\\n  ((flags) >= (CBC_FUNCTION_NORMAL << CBC_FUNCTION_TYPE_SHIFT))\n\n/**\n * Checks whether the function can be constructed with new operator.\n */\n#define CBC_FUNCTION_IS_CONSTRUCTABLE(flags) \\\n  ((flags) < (CBC_FUNCTION_GENERATOR << CBC_FUNCTION_TYPE_SHIFT))\n\n/**\n * Checks whether the function has prototype property.\n */\n#define CBC_FUNCTION_HAS_PROTOTYPE(flags) \\\n  ((flags) < (CBC_FUNCTION_ACCESSOR << CBC_FUNCTION_TYPE_SHIFT))\n\n/**\n * Checks whether the function is an arrow function.\n */\n#define CBC_FUNCTION_IS_ARROW(flags) \\\n  ((flags) >= (CBC_FUNCTION_ARROW << CBC_FUNCTION_TYPE_SHIFT))\n\n/**\n * Get length property from extended info\n */\n#define CBC_EXTENDED_INFO_GET_LENGTH(extended_info) (extended_info)\n\n#define CBC_OPCODE(arg1, arg2, arg3, arg4) arg1,\n\n/**\n * Opcode list.\n */\ntypedef enum\n{\n  CBC_OPCODE_LIST      /**< list of opcodes */\n} cbc_opcode_t;\n\n/**\n * Extended opcode list.\n */\ntypedef enum\n{\n  CBC_EXT_OPCODE_LIST  /**< list extended opcodes */\n} cbc_ext_opcode_t;\n\n#undef CBC_OPCODE\n\n/**\n * Opcode flags.\n */\nextern const uint8_t cbc_flags[];\nextern const uint8_t cbc_ext_flags[];\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n\n/**\n * Opcode names for debugging.\n */\nextern const char * const cbc_names[];\nextern const char * const cbc_ext_names[];\n\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* !BYTE_CODE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/common.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"common.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-big-uint.h\"\n#include \"ecma-bigint.h\"\n#include \"js-parser-internal.h\"\n#include \"lit-char-helpers.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_utils Utility\n * @{\n */\n\n#if ENABLED (JERRY_PARSER)\n\n/**\n * Free literal.\n */\nvoid\nutil_free_literal (lexer_literal_t *literal_p) /**< literal */\n{\n  if (literal_p->type == LEXER_IDENT_LITERAL\n      || literal_p->type == LEXER_STRING_LITERAL)\n  {\n    if (!(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR))\n    {\n      jmem_heap_free_block ((void *) literal_p->u.char_p, literal_p->prop.length);\n    }\n  }\n  else if ((literal_p->type == LEXER_FUNCTION_LITERAL)\n           || (literal_p->type == LEXER_REGEXP_LITERAL))\n  {\n    ecma_bytecode_deref (literal_p->u.bytecode_p);\n  }\n} /* util_free_literal */\n\n#endif /* ENABLED (JERRY_PARSER) */\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n\n/**\n * Debug utility to print a character sequence.\n */\nstatic void\nutil_print_chars (const uint8_t *char_p, /**< character pointer */\n                  size_t size) /**< size */\n{\n  while (size > 0)\n  {\n    JERRY_DEBUG_MSG (\"%c\", *char_p++);\n    size--;\n  }\n} /* util_print_chars */\n\n/**\n * Debug utility to print a number.\n */\nstatic void\nutil_print_number (ecma_number_t num_p) /**< number to print */\n{\n  lit_utf8_byte_t str_buf[ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER];\n  lit_utf8_size_t str_size = ecma_number_to_utf8_string (num_p, str_buf, sizeof (str_buf));\n  str_buf[str_size] = 0;\n  JERRY_DEBUG_MSG (\"%s\", str_buf);\n} /* util_print_number */\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n\n/**\n * Debug utility to print a bigint.\n */\nstatic void\nutil_print_bigint (ecma_value_t bigint) /**< bigint to print */\n{\n  if (bigint == ECMA_BIGINT_ZERO)\n  {\n    JERRY_DEBUG_MSG (\"0\");\n    return;\n  }\n\n  ecma_extended_primitive_t *bigint_p = ecma_get_extended_primitive_from_value (bigint);\n  uint32_t char_start_p, char_size_p;\n  lit_utf8_byte_t *string_buffer_p = ecma_big_uint_to_string (bigint_p, 10, &char_start_p, &char_size_p);\n\n  if (JERRY_UNLIKELY (string_buffer_p == NULL))\n  {\n    JERRY_DEBUG_MSG (\"<out-of-memory>\");\n    return;\n  }\n\n  JERRY_ASSERT (char_start_p > 0);\n\n  if (bigint_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN)\n  {\n    string_buffer_p[--char_start_p] = LIT_CHAR_MINUS;\n  }\n\n  util_print_chars (string_buffer_p + char_start_p, char_size_p - char_start_p);\n  jmem_heap_free_block (string_buffer_p, char_size_p);\n} /* util_print_bigint */\n\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n/**\n * Print literal\n */\nvoid\nutil_print_literal (lexer_literal_t *literal_p) /**< literal */\n{\n  switch (literal_p->type)\n  {\n    case LEXER_IDENT_LITERAL:\n    {\n      JERRY_DEBUG_MSG (\"ident(\");\n      util_print_chars (literal_p->u.char_p, literal_p->prop.length);\n      break;\n    }\n    case LEXER_FUNCTION_LITERAL:\n    {\n      JERRY_DEBUG_MSG (\"function\");\n      return;\n    }\n    case LEXER_STRING_LITERAL:\n    {\n      JERRY_DEBUG_MSG (\"string(\");\n      util_print_chars (literal_p->u.char_p, literal_p->prop.length);\n      break;\n    }\n    case LEXER_NUMBER_LITERAL:\n    {\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n      if (ecma_is_value_bigint (literal_p->u.value))\n      {\n        JERRY_DEBUG_MSG (\"bigint(\");\n        util_print_bigint (literal_p->u.value);\n        break;\n      }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n      JERRY_DEBUG_MSG (\"number(\");\n      util_print_number (ecma_get_number_from_value (literal_p->u.value));\n      break;\n    }\n    case LEXER_REGEXP_LITERAL:\n    {\n      JERRY_DEBUG_MSG (\"regexp\");\n      return;\n    }\n    default:\n    {\n      JERRY_DEBUG_MSG (\"unknown\");\n      return;\n    }\n  }\n\n  JERRY_DEBUG_MSG (\")\");\n} /* util_print_literal */\n\n/**\n * Print literal.\n */\nstatic void\nutil_print_literal_value (ecma_compiled_code_t *compiled_code_p, /**< compiled code */\n                          uint16_t literal_index) /**< literal index */\n{\n  uint16_t argument_end;\n  uint16_t register_end;\n  uint16_t ident_end;\n  uint16_t const_literal_end;\n  ecma_value_t *literal_start_p;\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) compiled_code_p;\n    argument_end = args_p->argument_end;\n    register_end = args_p->register_end;\n    ident_end = args_p->ident_end;\n    const_literal_end = args_p->const_literal_end;\n    literal_start_p = (ecma_value_t *) (args_p + 1);\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) compiled_code_p;\n    argument_end = args_p->argument_end;\n    register_end = args_p->register_end;\n    ident_end = args_p->ident_end;\n    const_literal_end = args_p->const_literal_end;\n    literal_start_p = (ecma_value_t *) (args_p + 1);\n  }\n\n  if (literal_index < argument_end)\n  {\n    JERRY_DEBUG_MSG (\" arg:%d\", literal_index);\n    return;\n  }\n\n  if (literal_index < register_end)\n  {\n    JERRY_DEBUG_MSG (\" reg:%d\", literal_index);\n    return;\n  }\n\n  if (literal_index >= const_literal_end)\n  {\n    JERRY_DEBUG_MSG (\" lit:%d\", literal_index);\n    return;\n  }\n\n  if (literal_index < ident_end)\n  {\n    JERRY_DEBUG_MSG (\" ident:%d->\", literal_index);\n  }\n  else\n  {\n    JERRY_DEBUG_MSG (\" const:%d->\", literal_index);\n  }\n\n  ecma_value_t value = literal_start_p[literal_index - register_end];\n\n  if (ecma_is_value_number (value))\n  {\n    JERRY_DEBUG_MSG (\"number(\");\n    util_print_number (ecma_get_number_from_value (value));\n  }\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  else if (ecma_is_value_bigint (value))\n  {\n    JERRY_DEBUG_MSG (\"bigint(\");\n    util_print_bigint (value);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  else\n  {\n    ecma_string_t *literal_p = ecma_get_string_from_value (value);\n\n    JERRY_DEBUG_MSG (\"string(\");\n\n    ECMA_STRING_TO_UTF8_STRING (literal_p, chars_p, literal_size);\n    util_print_chars (chars_p, literal_size);\n    ECMA_FINALIZE_UTF8_STRING (chars_p, literal_size);\n  }\n\n  JERRY_DEBUG_MSG (\")\");\n} /* util_print_literal_value */\n\n#define PARSER_READ_IDENTIFIER_INDEX(name) \\\n  name = *byte_code_p++; \\\n  if (name >= encoding_limit) \\\n  { \\\n    name = (uint16_t) (((name << 8) | byte_code_p[0]) - encoding_delta); \\\n    byte_code_p++; \\\n  }\n\n/**\n * Print byte code.\n */\nvoid\nutil_print_cbc (ecma_compiled_code_t *compiled_code_p) /**< compiled code */\n{\n  uint8_t flags;\n  uint8_t *byte_code_start_p;\n  uint8_t *byte_code_end_p;\n  uint8_t *byte_code_p;\n  uint16_t encoding_limit;\n  uint16_t encoding_delta;\n  uint16_t stack_limit;\n  uint16_t argument_end;\n  uint16_t register_end;\n  uint16_t ident_end;\n  uint16_t const_literal_end;\n  uint16_t literal_end;\n  size_t size = ((size_t) compiled_code_p->size) << JMEM_ALIGNMENT_LOG;\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args = (cbc_uint16_arguments_t *) compiled_code_p;\n    stack_limit = args->stack_limit;\n    argument_end = args->argument_end;\n    register_end = args->register_end;\n    ident_end = args->ident_end;\n    const_literal_end = args->const_literal_end;\n    literal_end = args->literal_end;\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args = (cbc_uint8_arguments_t *) compiled_code_p;\n    stack_limit = args->stack_limit;\n    argument_end = args->argument_end;\n    register_end = args->register_end;\n    ident_end = args->ident_end;\n    const_literal_end = args->const_literal_end;\n    literal_end = args->literal_end;\n  }\n\n  JERRY_DEBUG_MSG (\"\\nByte code dump:\\n\\n  Maximum stack depth: %d\\n  Flags: [\",\n                   (int) (stack_limit + register_end));\n\n  if (!(compiled_code_p->status_flags & CBC_CODE_FLAGS_FULL_LITERAL_ENCODING))\n  {\n    JERRY_DEBUG_MSG (\"small_lit_enc\");\n    encoding_limit = CBC_SMALL_LITERAL_ENCODING_LIMIT;\n    encoding_delta = CBC_SMALL_LITERAL_ENCODING_DELTA;\n  }\n  else\n  {\n    JERRY_DEBUG_MSG (\"full_lit_enc\");\n    encoding_limit = CBC_FULL_LITERAL_ENCODING_LIMIT;\n    encoding_delta = CBC_FULL_LITERAL_ENCODING_DELTA;\n  }\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    JERRY_DEBUG_MSG (\",uint16_arguments\");\n  }\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE)\n  {\n    JERRY_DEBUG_MSG (\",strict_mode\");\n  }\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)\n  {\n    JERRY_DEBUG_MSG (\",mapped_arguments_needed\");\n    size -= argument_end * sizeof (ecma_value_t);\n  }\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_LEXICAL_ENV_NOT_NEEDED)\n  {\n    JERRY_DEBUG_MSG (\",no_lexical_env\");\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  switch (CBC_FUNCTION_GET_TYPE (compiled_code_p->status_flags))\n  {\n    case CBC_FUNCTION_CONSTRUCTOR:\n    {\n      JERRY_DEBUG_MSG (\",constructor\");\n      break;\n    }\n    case CBC_FUNCTION_GENERATOR:\n    {\n      JERRY_DEBUG_MSG (\",generator\");\n      break;\n    }\n    case CBC_FUNCTION_ASYNC:\n    {\n      JERRY_DEBUG_MSG (\",async\");\n      break;\n    }\n    case CBC_FUNCTION_ASYNC_GENERATOR:\n    {\n      JERRY_DEBUG_MSG (\",async_generator\");\n      break;\n    }\n    case CBC_FUNCTION_ACCESSOR:\n    {\n      JERRY_DEBUG_MSG (\",accessor\");\n      break;\n    }\n    case CBC_FUNCTION_ARROW:\n    {\n      JERRY_DEBUG_MSG (\",arrow\");\n      break;\n    }\n    case CBC_FUNCTION_ASYNC_ARROW:\n    {\n      JERRY_DEBUG_MSG (\",async_arrow\");\n      break;\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_DEBUG_MSG (\"]\\n\");\n\n  JERRY_DEBUG_MSG (\"  Argument range end: %d\\n\", (int) argument_end);\n  JERRY_DEBUG_MSG (\"  Register range end: %d\\n\", (int) register_end);\n  JERRY_DEBUG_MSG (\"  Identifier range end: %d\\n\", (int) ident_end);\n  JERRY_DEBUG_MSG (\"  Const literal range end: %d\\n\", (int) const_literal_end);\n  JERRY_DEBUG_MSG (\"  Literal range end: %d\\n\\n\", (int) literal_end);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_HAS_EXTENDED_INFO)\n  {\n    uint32_t extended_info = ecma_compiled_code_resolve_extended_info (compiled_code_p);\n\n    JERRY_DEBUG_MSG (\"  [Extended] Argument length: %d\\n\\n\", (int) CBC_EXTENDED_INFO_GET_LENGTH (extended_info));\n\n    size -= sizeof (ecma_value_t);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  byte_code_start_p = (uint8_t *) compiled_code_p;\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    byte_code_start_p += sizeof (cbc_uint16_arguments_t);\n  }\n  else\n  {\n    byte_code_start_p += sizeof (cbc_uint8_arguments_t);\n  }\n\n  byte_code_start_p += (unsigned int) (literal_end - register_end) * sizeof (ecma_value_t);\n\n  if (CBC_FUNCTION_GET_TYPE (compiled_code_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)\n  {\n    size -= sizeof (ecma_value_t);\n  }\n\n  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_HAS_TAGGED_LITERALS)\n  {\n    size -= sizeof (ecma_value_t);\n  }\n\n  byte_code_end_p = ((uint8_t *) compiled_code_p) + size;\n  byte_code_p = byte_code_start_p;\n\n  while (byte_code_p < byte_code_end_p)\n  {\n    cbc_opcode_t opcode = (cbc_opcode_t) *byte_code_p;\n    cbc_ext_opcode_t ext_opcode = CBC_EXT_NOP;\n    size_t cbc_offset = (size_t) (byte_code_p - byte_code_start_p);\n\n    if (opcode != CBC_EXT_OPCODE)\n    {\n      flags = cbc_flags[opcode];\n      JERRY_DEBUG_MSG (\" %3d : %s\", (int) cbc_offset, cbc_names[opcode]);\n      byte_code_p++;\n    }\n    else\n    {\n      if (byte_code_p + 1 >= byte_code_end_p)\n      {\n        break;\n      }\n\n      ext_opcode = (cbc_ext_opcode_t) byte_code_p[1];\n\n      if (ext_opcode == CBC_EXT_NOP)\n      {\n        break;\n      }\n\n      flags = cbc_ext_flags[ext_opcode];\n      JERRY_DEBUG_MSG (\" %3d : %s\", (int) cbc_offset, cbc_ext_names[ext_opcode]);\n      byte_code_p += 2;\n\n#if ENABLED (JERRY_LINE_INFO)\n      if (ext_opcode == CBC_EXT_LINE)\n      {\n        uint32_t value = 0;\n        uint8_t byte;\n\n        do\n        {\n          byte = *byte_code_p++;\n          value = (value << 7) | (byte & CBC_LOWER_SEVEN_BIT_MASK);\n        }\n        while (byte & CBC_HIGHEST_BIT_MASK);\n\n        JERRY_DEBUG_MSG (\" %d\\n\", (int) value);\n        continue;\n      }\n#endif /* ENABLED (JERRY_LINE_INFO) */\n    }\n\n    if (flags & (CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2))\n    {\n      uint16_t literal_index;\n\n      PARSER_READ_IDENTIFIER_INDEX (literal_index);\n      util_print_literal_value (compiled_code_p, literal_index);\n    }\n\n    if (flags & CBC_HAS_LITERAL_ARG2)\n    {\n      uint16_t literal_index;\n\n      PARSER_READ_IDENTIFIER_INDEX (literal_index);\n      util_print_literal_value (compiled_code_p, literal_index);\n\n      if (!(flags & CBC_HAS_LITERAL_ARG))\n      {\n        PARSER_READ_IDENTIFIER_INDEX (literal_index);\n        util_print_literal_value (compiled_code_p, literal_index);\n      }\n    }\n\n    if (flags & CBC_HAS_BYTE_ARG)\n    {\n      if (opcode == CBC_PUSH_NUMBER_POS_BYTE\n          || ext_opcode == CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_POS_BYTE)\n      {\n        JERRY_DEBUG_MSG (\" number:%d\", (int) *byte_code_p + 1);\n      }\n      else if (opcode == CBC_PUSH_NUMBER_NEG_BYTE\n               || ext_opcode == CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE)\n      {\n        JERRY_DEBUG_MSG (\" number:%d\", -((int) *byte_code_p + 1));\n      }\n      else\n      {\n        JERRY_DEBUG_MSG (\" byte_arg:%d\", *byte_code_p);\n      }\n      byte_code_p++;\n    }\n\n    if (flags & CBC_HAS_BRANCH_ARG)\n    {\n      size_t branch_offset_length = (opcode != CBC_EXT_OPCODE ? CBC_BRANCH_OFFSET_LENGTH (opcode)\n                                                              : CBC_BRANCH_OFFSET_LENGTH (ext_opcode));\n      size_t offset = 0;\n\n      do\n      {\n        offset = (offset << 8) | *byte_code_p++;\n      }\n      while (--branch_offset_length > 0);\n\n      JERRY_DEBUG_MSG (\" offset:%d(->%d)\",\n                       (int) offset,\n                       (int) (cbc_offset + (CBC_BRANCH_IS_FORWARD (flags) ? offset : -offset)));\n    }\n\n    JERRY_DEBUG_MSG (\"\\n\");\n  }\n} /* util_print_cbc */\n\n#undef PARSER_READ_IDENTIFIER_INDEX\n\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/common.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef COMMON_H\n#define COMMON_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <inttypes.h>\n#include <setjmp.h>\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_utils Utility\n * @{\n */\n\n#include \"config.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-regexp-object.h\"\n#include \"jmem.h\"\n\n/* Immediate management. */\n\n/**\n * Literal types.\n *\n * The LEXER_UNUSED_LITERAL type is internal and\n * used for various purposes.\n */\ntypedef enum\n{\n  /* The LEXER_IS_IDENT_OR_STRING macro must be updated if the order is changed. */\n  LEXER_IDENT_LITERAL = 0,          /**< identifier literal */\n  LEXER_STRING_LITERAL = 1,         /**< string literal */\n  LEXER_NUMBER_LITERAL = 2,         /**< number literal */\n  LEXER_FUNCTION_LITERAL = 3,       /**< function literal */\n  LEXER_REGEXP_LITERAL = 4,         /**< regexp literal */\n  LEXER_UNUSED_LITERAL = 5,         /**< unused literal, can only be\n                                         used by the byte code generator. */\n  LEXER_NEW_IDENT_LITERAL = 6,      /**< new local variable, can only be\n                                         used by the byte code generator. */\n} lexer_literal_type_t;\n\n/**\n * Checks whether the literal type is identifier or string.\n */\n#define LEXER_IS_IDENT_OR_STRING(literal_type) ((literal_type) <= LEXER_STRING_LITERAL)\n\n/**\n * Flag bits for status_flags member of lexer_literal_t.\n */\ntypedef enum\n{\n  LEXER_FLAG_USED = (1 << 0), /**< this local identifier needs to be stored in the constant pool */\n  LEXER_FLAG_FUNCTION_ARGUMENT = (1 << 1), /**< this local identifier is a function argument */\n  LEXER_FLAG_SOURCE_PTR = (1 << 2), /**< the literal is directly referenced in the source code\n                                     *   (no need to allocate memory) */\n  LEXER_FLAG_LATE_INIT = (1 << 3), /**< initialize this variable after the byte code is freed */\n#if ENABLED (JERRY_ESNEXT)\n  LEXER_FLAG_GLOBAL = (1 << 4), /**< this local identifier is not a let or const declaration */\n#endif /* ENABLED (JERRY_ESNEXT) */\n} lexer_literal_status_flags_t;\n\n/**\n * Type of property length.\n */\n#if ENABLED (JERRY_CPOINTER_32_BIT)\ntypedef uint32_t prop_length_t;\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\ntypedef uint16_t prop_length_t;\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n/**\n * Literal data.\n */\ntypedef struct\n{\n  union\n  {\n    ecma_value_t value;                  /**< literal value (not processed by the parser) */\n    const uint8_t *char_p;               /**< character value */\n    ecma_compiled_code_t *bytecode_p;    /**< compiled function or regexp pointer */\n    uint32_t source_data;                /**< encoded source literal */\n  } u;\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  struct\n#else /* !ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n  union\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n  {\n    prop_length_t length;                /**< length of ident / string literal */\n    uint16_t index;                      /**< real index during post processing */\n  } prop;\n\n  uint8_t type;                          /**< type of the literal */\n  uint8_t status_flags;                  /**< status flags */\n} lexer_literal_t;\n\nvoid util_free_literal (lexer_literal_t *literal_p);\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\nvoid util_print_literal (lexer_literal_t *);\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n/* TRY/CATCH block */\n\n#define PARSER_TRY_CONTEXT(context_name) \\\n  jmp_buf context_name\n\n#define PARSER_THROW(context_name) \\\n  longjmp (context_name, 1);\n\n#define PARSER_TRY(context_name) \\\n  { \\\n    if (!setjmp (context_name)) \\\n    { \\\n\n#define PARSER_CATCH \\\n    } \\\n    else \\\n    {\n\n#define PARSER_TRY_END \\\n    } \\\n  }\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* !COMMON_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-lexer.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-literal-storage.h\"\n#include \"js-parser-internal.h\"\n#include \"lit-char-helpers.h\"\n#include \"jcontext.h\"\n\n#if ENABLED (JERRY_PARSER)\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_lexer Lexer\n * @{\n */\n\nJERRY_STATIC_ASSERT (LEXER_NUMBER_BINARY > LEXER_NUMBER_OCTAL,\n                     lexer_number_binary_must_be_greater_than_lexer_number_octal);\n\n/**\n * Check whether the UTF-8 intermediate is an octet or not\n */\n#define IS_UTF8_INTERMEDIATE_OCTET(byte) (((byte) & LIT_UTF8_EXTRA_BYTE_MASK) == LIT_UTF8_2_BYTE_CODE_POINT_MIN)\n\n/**\n * Align column to the next tab position.\n *\n * @return aligned position\n */\nstatic parser_line_counter_t\nalign_column_to_tab (parser_line_counter_t column) /**< current column */\n{\n  /* Tab aligns to zero column start position. */\n  return (parser_line_counter_t) (((column + (8u - 1u)) & ~ECMA_STRING_CONTAINER_MASK) + 1u);\n} /* align_column_to_tab */\n\n/**\n * Parse hexadecimal character sequence\n *\n * @return character value or UINT32_MAX on error\n */\nstatic lit_code_point_t\nlexer_hex_to_code_point (const uint8_t *source_p, /**< current source position */\n                         parser_line_counter_t length) /**< source length */\n{\n  lit_code_point_t result = 0;\n\n  do\n  {\n    uint32_t byte = *source_p++;\n\n    result <<= 4;\n\n    if (byte >= LIT_CHAR_0 && byte <= LIT_CHAR_9)\n    {\n      result += byte - LIT_CHAR_0;\n    }\n    else\n    {\n      byte = LEXER_TO_ASCII_LOWERCASE (byte);\n      if (byte >= LIT_CHAR_LOWERCASE_A && byte <= LIT_CHAR_LOWERCASE_F)\n      {\n        result += byte - (LIT_CHAR_LOWERCASE_A - 10);\n      }\n      else\n      {\n        return UINT32_MAX;\n      }\n    }\n  }\n  while (--length > 0);\n\n  return result;\n} /* lexer_hex_to_code_point */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Parse hexadecimal character sequence enclosed in braces\n *\n * @return character value or UINT32_MAX on error\n */\nstatic lit_code_point_t\nlexer_hex_in_braces_to_code_point (const uint8_t *source_p, /**< current source position */\n                                   const uint8_t *source_end_p, /**< source end */\n                                   uint32_t *length_p) /**< [out] length of the sequence */\n{\n  lit_code_point_t result = 0;\n  /* Four is the size of \\u{} sequence. */\n  uint32_t length = 4;\n\n  JERRY_ASSERT (source_p[-1] == LIT_CHAR_LEFT_BRACE);\n  JERRY_ASSERT (source_p < source_end_p);\n\n  do\n  {\n    uint32_t byte = *source_p++;\n\n    result <<= 4;\n\n    if (byte >= LIT_CHAR_0 && byte <= LIT_CHAR_9)\n    {\n      result += byte - LIT_CHAR_0;\n    }\n    else\n    {\n      byte = LEXER_TO_ASCII_LOWERCASE (byte);\n      if (byte >= LIT_CHAR_LOWERCASE_A && byte <= LIT_CHAR_LOWERCASE_F)\n      {\n        result += byte - (LIT_CHAR_LOWERCASE_A - 10);\n      }\n      else\n      {\n        return UINT32_MAX;\n      }\n    }\n\n    if (result >= (LIT_UNICODE_CODE_POINT_MAX + 1) || source_p >= source_end_p)\n    {\n      return UINT32_MAX;\n    }\n    length++;\n  }\n  while (*source_p != LIT_CHAR_RIGHT_BRACE);\n\n  *length_p = length;\n  return result;\n} /* lexer_hex_in_braces_to_code_point */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Parse hexadecimal character sequence\n *\n * @return character value\n */\nstatic lit_code_point_t\nlexer_unchecked_hex_to_character (const uint8_t **source_p) /**< [in, out] current source position */\n{\n  lit_code_point_t result = 0;\n  const uint8_t *char_p = *source_p;\n  uint32_t length = (char_p[-1] == LIT_CHAR_LOWERCASE_U) ? 4 : 2;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (char_p[0] == LIT_CHAR_LEFT_BRACE)\n  {\n    length = 0;\n    char_p++;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  while (true)\n  {\n    uint32_t byte = *char_p++;\n\n    result <<= 4;\n\n    if (byte >= LIT_CHAR_0 && byte <= LIT_CHAR_9)\n    {\n      result += byte - LIT_CHAR_0;\n    }\n    else\n    {\n      JERRY_ASSERT ((byte >= LIT_CHAR_LOWERCASE_A && byte <= LIT_CHAR_LOWERCASE_F)\n                    || (byte >= LIT_CHAR_UPPERCASE_A && byte <= LIT_CHAR_UPPERCASE_F));\n\n      result += LEXER_TO_ASCII_LOWERCASE (byte) - (LIT_CHAR_LOWERCASE_A - 10);\n    }\n\n    JERRY_ASSERT (result <= LIT_UNICODE_CODE_POINT_MAX);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (length == 0)\n    {\n      if (*char_p != LIT_CHAR_RIGHT_BRACE)\n      {\n        continue;\n      }\n      *source_p = char_p + 1;\n      return result;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (--length == 0)\n    {\n      *source_p = char_p;\n      return result;\n    }\n  }\n} /* lexer_unchecked_hex_to_character */\n\n/**\n * Skip space mode\n */\ntypedef enum\n{\n  LEXER_SKIP_SPACES,                 /**< skip spaces mode */\n  LEXER_SKIP_SINGLE_LINE_COMMENT,    /**< parse single line comment */\n  LEXER_SKIP_MULTI_LINE_COMMENT,     /**< parse multi line comment */\n} skip_mode_t;\n\n/**\n * Skip spaces.\n */\nstatic void\nlexer_skip_spaces (parser_context_t *context_p) /**< context */\n{\n  skip_mode_t mode = LEXER_SKIP_SPACES;\n  const uint8_t *source_end_p = context_p->source_end_p;\n\n  if (context_p->token.flags & LEXER_NO_SKIP_SPACES)\n  {\n    context_p->token.flags &= (uint8_t) ~LEXER_NO_SKIP_SPACES;\n    return;\n  }\n\n  context_p->token.flags = 0;\n\n  while (true)\n  {\n    if (context_p->source_p >= source_end_p)\n    {\n      if (mode == LEXER_SKIP_MULTI_LINE_COMMENT)\n      {\n        parser_raise_error (context_p, PARSER_ERR_UNTERMINATED_MULTILINE_COMMENT);\n      }\n      return;\n    }\n\n    switch (context_p->source_p[0])\n    {\n      case LIT_CHAR_CR:\n      {\n        if (context_p->source_p + 1 < source_end_p\n            && context_p->source_p[1] == LIT_CHAR_LF)\n        {\n          context_p->source_p++;\n        }\n        /* FALLTHRU */\n      }\n\n      case LIT_CHAR_LF:\n      {\n        context_p->line++;\n        context_p->column = 0;\n        context_p->token.flags = LEXER_WAS_NEWLINE;\n\n        if (mode == LEXER_SKIP_SINGLE_LINE_COMMENT)\n        {\n          mode = LEXER_SKIP_SPACES;\n        }\n        /* FALLTHRU */\n      }\n\n      case LIT_CHAR_VTAB:\n      case LIT_CHAR_FF:\n      case LIT_CHAR_SP:\n      {\n        context_p->source_p++;\n        context_p->column++;\n        continue;\n      }\n\n      case LIT_CHAR_TAB:\n      {\n        context_p->column = align_column_to_tab (context_p->column);\n        context_p->source_p++;\n        continue;\n      }\n\n      case LIT_CHAR_SLASH:\n      {\n        if (mode == LEXER_SKIP_SPACES\n            && context_p->source_p + 1 < source_end_p)\n        {\n          if (context_p->source_p[1] == LIT_CHAR_SLASH)\n          {\n            mode = LEXER_SKIP_SINGLE_LINE_COMMENT;\n          }\n          else if (context_p->source_p[1] == LIT_CHAR_ASTERISK)\n          {\n            mode = LEXER_SKIP_MULTI_LINE_COMMENT;\n            context_p->token.line = context_p->line;\n            context_p->token.column = context_p->column;\n          }\n\n          if (mode != LEXER_SKIP_SPACES)\n          {\n            context_p->source_p += 2;\n            PARSER_PLUS_EQUAL_LC (context_p->column, 2);\n            continue;\n          }\n        }\n        break;\n      }\n\n      case LIT_CHAR_ASTERISK:\n      {\n        if (mode == LEXER_SKIP_MULTI_LINE_COMMENT\n            && context_p->source_p + 1 < source_end_p\n            && context_p->source_p[1] == LIT_CHAR_SLASH)\n        {\n          mode = LEXER_SKIP_SPACES;\n          context_p->source_p += 2;\n          PARSER_PLUS_EQUAL_LC (context_p->column, 2);\n          continue;\n        }\n        break;\n      }\n\n      case 0xc2:\n      {\n        if (context_p->source_p + 1 < source_end_p\n            && context_p->source_p[1] == 0xa0)\n        {\n          /* Codepoint \\u00A0 */\n          context_p->source_p += 2;\n          context_p->column++;\n          continue;\n        }\n        break;\n      }\n\n      case LEXER_NEWLINE_LS_PS_BYTE_1:\n      {\n        JERRY_ASSERT (context_p->source_p + 2 < source_end_p);\n        if (LEXER_NEWLINE_LS_PS_BYTE_23 (context_p->source_p))\n        {\n          /* Codepoint \\u2028 and \\u2029 */\n          context_p->source_p += 3;\n          context_p->line++;\n          context_p->column = 1;\n          context_p->token.flags = LEXER_WAS_NEWLINE;\n\n          if (mode == LEXER_SKIP_SINGLE_LINE_COMMENT)\n          {\n            mode = LEXER_SKIP_SPACES;\n          }\n          continue;\n        }\n        break;\n      }\n\n      case 0xef:\n      {\n        if (context_p->source_p + 2 < source_end_p\n            && context_p->source_p[1] == 0xbb\n            && context_p->source_p[2] == 0xbf)\n        {\n          /* Codepoint \\uFEFF */\n          context_p->source_p += 3;\n          context_p->column++;\n          continue;\n        }\n        break;\n      }\n\n      default:\n      {\n        break;\n      }\n    }\n\n    if (mode == LEXER_SKIP_SPACES)\n    {\n      return;\n    }\n\n    context_p->source_p++;\n\n    if (context_p->source_p < source_end_p\n        && !IS_UTF8_INTERMEDIATE_OCTET (context_p->source_p[0]))\n    {\n      context_p->column++;\n    }\n  }\n} /* lexer_skip_spaces */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Skip all the continuous empty statements.\n */\nvoid\nlexer_skip_empty_statements (parser_context_t *context_p) /**< context */\n{\n  lexer_skip_spaces (context_p);\n\n  while (context_p->source_p < context_p->source_end_p\n         && *context_p->source_p == LIT_CHAR_SEMICOLON)\n  {\n    lexer_consume_next_character (context_p);\n    lexer_skip_spaces (context_p);\n  }\n\n  context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);\n} /* lexer_skip_empty_statements */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Checks whether the keyword has escape sequences.\n */\n#define LEXER_CHECK_INVALID_KEYWORD(ident_start_p, buffer_p) \\\n  (JERRY_UNLIKELY ((ident_start_p) == (buffer_p)) \\\n   && !(context_p->global_status_flags & ECMA_PARSE_INTERNAL_PRE_SCANNING))\n#else  /* !ENABLED (JERRY_ESNEXT) */\n/**\n * Checks whether the keyword has escape sequences.\n */\n#define LEXER_CHECK_INVALID_KEYWORD(ident_start_p, buffer_p) \\\n  (JERRY_UNLIKELY ((ident_start_p) == (buffer_p)))\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Keyword data.\n */\ntypedef struct\n{\n  const uint8_t *keyword_p; /**< keyword string */\n  lexer_token_type_t type;  /**< keyword token type */\n} keyword_string_t;\n\n/**\n * @{\n * Keyword defines\n */\n#define LEXER_KEYWORD(name, type) { (const uint8_t *) (name), (type) }\n#define LEXER_KEYWORD_LIST_LENGTH(name) (const uint8_t) (sizeof ((name)) / sizeof ((name)[0]))\n/** @} */\n\n/**\n * Length of the shortest keyword.\n */\n#define LEXER_KEYWORD_MIN_LENGTH 2\n\n/**\n * Length of the longest keyword.\n */\n#define LEXER_KEYWORD_MAX_LENGTH 10\n\n/**\n * Keywords with 2 characters.\n */\nstatic const keyword_string_t keywords_with_length_2[] =\n{\n  LEXER_KEYWORD (\"do\", LEXER_KEYW_DO),\n  LEXER_KEYWORD (\"if\", LEXER_KEYW_IF),\n  LEXER_KEYWORD (\"in\", LEXER_KEYW_IN),\n};\n\n/**\n * Keywords with 3 characters.\n */\nstatic const keyword_string_t keywords_with_length_3[] =\n{\n  LEXER_KEYWORD (\"for\", LEXER_KEYW_FOR),\n  LEXER_KEYWORD (\"let\", LEXER_KEYW_LET),\n  LEXER_KEYWORD (\"new\", LEXER_KEYW_NEW),\n  LEXER_KEYWORD (\"try\", LEXER_KEYW_TRY),\n  LEXER_KEYWORD (\"var\", LEXER_KEYW_VAR),\n};\n\n/**\n * Keywords with 4 characters.\n */\nstatic const keyword_string_t keywords_with_length_4[] =\n{\n  LEXER_KEYWORD (\"case\", LEXER_KEYW_CASE),\n  LEXER_KEYWORD (\"else\", LEXER_KEYW_ELSE),\n  LEXER_KEYWORD (\"enum\", LEXER_KEYW_ENUM),\n  LEXER_KEYWORD (\"eval\", LEXER_KEYW_EVAL),\n  LEXER_KEYWORD (\"null\", LEXER_LIT_NULL),\n  LEXER_KEYWORD (\"this\", LEXER_KEYW_THIS),\n  LEXER_KEYWORD (\"true\", LEXER_LIT_TRUE),\n  LEXER_KEYWORD (\"void\", LEXER_KEYW_VOID),\n  LEXER_KEYWORD (\"with\", LEXER_KEYW_WITH),\n};\n\n/**\n * Keywords with 5 characters.\n */\nstatic const keyword_string_t keywords_with_length_5[] =\n{\n#if ENABLED (JERRY_ESNEXT)\n  LEXER_KEYWORD (\"async\", LEXER_KEYW_ASYNC),\n  LEXER_KEYWORD (\"await\", LEXER_KEYW_AWAIT),\n#endif /* ENABLED (JERRY_ESNEXT) */\n  LEXER_KEYWORD (\"break\", LEXER_KEYW_BREAK),\n  LEXER_KEYWORD (\"catch\", LEXER_KEYW_CATCH),\n  LEXER_KEYWORD (\"class\", LEXER_KEYW_CLASS),\n  LEXER_KEYWORD (\"const\", LEXER_KEYW_CONST),\n  LEXER_KEYWORD (\"false\", LEXER_LIT_FALSE),\n  LEXER_KEYWORD (\"super\", LEXER_KEYW_SUPER),\n  LEXER_KEYWORD (\"throw\", LEXER_KEYW_THROW),\n  LEXER_KEYWORD (\"while\", LEXER_KEYW_WHILE),\n  LEXER_KEYWORD (\"yield\", LEXER_KEYW_YIELD),\n};\n\n/**\n * Keywords with 6 characters.\n */\nstatic const keyword_string_t keywords_with_length_6[] =\n{\n  LEXER_KEYWORD (\"delete\", LEXER_KEYW_DELETE),\n  LEXER_KEYWORD (\"export\", LEXER_KEYW_EXPORT),\n  LEXER_KEYWORD (\"import\", LEXER_KEYW_IMPORT),\n  LEXER_KEYWORD (\"public\", LEXER_KEYW_PUBLIC),\n  LEXER_KEYWORD (\"return\", LEXER_KEYW_RETURN),\n  LEXER_KEYWORD (\"static\", LEXER_KEYW_STATIC),\n  LEXER_KEYWORD (\"switch\", LEXER_KEYW_SWITCH),\n  LEXER_KEYWORD (\"typeof\", LEXER_KEYW_TYPEOF),\n};\n\n/**\n * Keywords with 7 characters.\n */\nstatic const keyword_string_t keywords_with_length_7[] =\n{\n  LEXER_KEYWORD (\"default\", LEXER_KEYW_DEFAULT),\n  LEXER_KEYWORD (\"extends\", LEXER_KEYW_EXTENDS),\n  LEXER_KEYWORD (\"finally\", LEXER_KEYW_FINALLY),\n  LEXER_KEYWORD (\"package\", LEXER_KEYW_PACKAGE),\n  LEXER_KEYWORD (\"private\", LEXER_KEYW_PRIVATE),\n};\n\n/**\n * Keywords with 8 characters.\n */\nstatic const keyword_string_t keywords_with_length_8[] =\n{\n  LEXER_KEYWORD (\"continue\", LEXER_KEYW_CONTINUE),\n  LEXER_KEYWORD (\"debugger\", LEXER_KEYW_DEBUGGER),\n  LEXER_KEYWORD (\"function\", LEXER_KEYW_FUNCTION),\n};\n\n/**\n * Keywords with 9 characters.\n */\nstatic const keyword_string_t keywords_with_length_9[] =\n{\n  LEXER_KEYWORD (\"arguments\", LEXER_KEYW_ARGUMENTS),\n  LEXER_KEYWORD (\"interface\", LEXER_KEYW_INTERFACE),\n  LEXER_KEYWORD (\"protected\", LEXER_KEYW_PROTECTED),\n};\n\n/**\n * Keywords with 10 characters.\n */\nstatic const keyword_string_t keywords_with_length_10[] =\n{\n  LEXER_KEYWORD (\"implements\", LEXER_KEYW_IMPLEMENTS),\n  LEXER_KEYWORD (\"instanceof\", LEXER_KEYW_INSTANCEOF),\n};\n\n/**\n * List of the keyword groups.\n */\nstatic const keyword_string_t * const keyword_strings_list[] =\n{\n  keywords_with_length_2,\n  keywords_with_length_3,\n  keywords_with_length_4,\n  keywords_with_length_5,\n  keywords_with_length_6,\n  keywords_with_length_7,\n  keywords_with_length_8,\n  keywords_with_length_9,\n  keywords_with_length_10\n};\n\nJERRY_STATIC_ASSERT (sizeof (keyword_strings_list) / sizeof (const keyword_string_t *)\n                     == (LEXER_KEYWORD_MAX_LENGTH - LEXER_KEYWORD_MIN_LENGTH) + 1,\n                     keyword_strings_list_size_must_equal_to_keyword_max_length_difference);\n\n/**\n * List of the keyword groups length.\n */\nstatic const uint8_t keyword_lengths_list[] =\n{\n  LEXER_KEYWORD_LIST_LENGTH (keywords_with_length_2),\n  LEXER_KEYWORD_LIST_LENGTH (keywords_with_length_3),\n  LEXER_KEYWORD_LIST_LENGTH (keywords_with_length_4),\n  LEXER_KEYWORD_LIST_LENGTH (keywords_with_length_5),\n  LEXER_KEYWORD_LIST_LENGTH (keywords_with_length_6),\n  LEXER_KEYWORD_LIST_LENGTH (keywords_with_length_7),\n  LEXER_KEYWORD_LIST_LENGTH (keywords_with_length_8),\n  LEXER_KEYWORD_LIST_LENGTH (keywords_with_length_9),\n  LEXER_KEYWORD_LIST_LENGTH (keywords_with_length_10)\n};\n\n#undef LEXER_KEYWORD\n#undef LEXER_KEYWORD_LIST_LENGTH\n\n/**\n * Flags for lexer_parse_identifier.\n */\ntypedef enum\n{\n  LEXER_PARSE_NO_OPTS = 0, /**< no options */\n  LEXER_PARSE_CHECK_KEYWORDS = (1 << 0), /**< check keywords */\n  LEXER_PARSE_CHECK_START_AND_RETURN = (1 << 1), /**< check identifier start and return */\n  LEXER_PARSE_CHECK_PART_AND_RETURN = (1 << 2), /**< check identifier part and return */\n} lexer_parse_options_t;\n\nJERRY_STATIC_ASSERT (LEXER_FIRST_NON_RESERVED_KEYWORD < LEXER_FIRST_FUTURE_STRICT_RESERVED_WORD,\n                     lexer_first_non_reserved_keyword_must_be_before_lexer_first_future_strict_reserved_word);\n\n/**\n * Parse identifier.\n *\n * @return true, if an identifier is parsed, false otherwise\n */\nstatic bool\nlexer_parse_identifier (parser_context_t *context_p, /**< context */\n                        lexer_parse_options_t options) /**< check keywords */\n{\n  /* Only very few identifiers contains \\u escape sequences. */\n  const uint8_t *source_p = context_p->source_p;\n  /* Note: newline or tab cannot be part of an identifier. */\n  parser_line_counter_t column = context_p->column;\n  const uint8_t *source_end_p = context_p->source_end_p;\n  size_t length = 0;\n  uint8_t has_escape = false;\n\n  do\n  {\n    if (*source_p == LIT_CHAR_BACKSLASH)\n    {\n      /* After a backslash an identifier must start. */\n      lit_code_point_t code_point = UINT32_MAX;\n      uint32_t escape_length = 6;\n\n      if (options & (LEXER_PARSE_CHECK_START_AND_RETURN | LEXER_PARSE_CHECK_PART_AND_RETURN))\n      {\n        return true;\n      }\n\n      has_escape = true;\n\n#if ENABLED (JERRY_ESNEXT)\n      if (source_p + 5 <= source_end_p && source_p[1] == LIT_CHAR_LOWERCASE_U)\n      {\n        if (source_p[2] == LIT_CHAR_LEFT_BRACE)\n        {\n          code_point = lexer_hex_in_braces_to_code_point (source_p + 3, source_end_p, &escape_length);\n        }\n        else if (source_p + 6 <= source_end_p)\n        {\n          code_point = lexer_hex_to_code_point (source_p + 2, 4);\n        }\n      }\n#else /* !ENABLED (JERRY_ESNEXT) */\n      if (source_p + 6 <= source_end_p && source_p[1] == LIT_CHAR_LOWERCASE_U)\n      {\n        code_point = lexer_hex_to_code_point (source_p + 2, 4);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (code_point == UINT32_MAX)\n      {\n        context_p->source_p = source_p;\n        context_p->token.column = column;\n        parser_raise_error (context_p, PARSER_ERR_INVALID_UNICODE_ESCAPE_SEQUENCE);\n      }\n\n      if (length == 0)\n      {\n        if (!lit_code_point_is_identifier_start (code_point))\n        {\n          parser_raise_error (context_p, PARSER_ERR_INVALID_IDENTIFIER_START);\n        }\n      }\n      else\n      {\n        if (!lit_code_point_is_identifier_part (code_point))\n        {\n          parser_raise_error (context_p, PARSER_ERR_INVALID_IDENTIFIER_PART);\n        }\n      }\n\n      length += lit_code_point_get_cesu8_length (code_point);\n      source_p += escape_length;\n      PARSER_PLUS_EQUAL_LC (column, escape_length);\n      continue;\n    }\n\n    lit_code_point_t code_point = *source_p;\n    lit_utf8_size_t utf8_length = 1, decoded_length = 1, char_count = 1;\n\n    if (JERRY_UNLIKELY (code_point >= LIT_UTF8_2_BYTE_MARKER))\n    {\n#if ENABLED (JERRY_ESNEXT)\n      utf8_length = lit_read_code_point_from_utf8 (source_p,\n                                                   (lit_utf8_size_t) (source_end_p - source_p),\n                                                   &code_point);\n      decoded_length = utf8_length;\n\n      /* Only ES2015+ supports code points outside of the basic plane which can be part of an identifier. */\n      if ((code_point >= LIT_UTF16_HIGH_SURROGATE_MIN && code_point <= LIT_UTF16_HIGH_SURROGATE_MAX)\n          && source_p + 3 < source_end_p)\n      {\n        lit_code_point_t low_surrogate;\n        lit_read_code_point_from_utf8 (source_p + 3,\n                                       (lit_utf8_size_t) (source_end_p - (source_p + 3)),\n                                       &low_surrogate);\n\n        if (low_surrogate >= LIT_UTF16_LOW_SURROGATE_MIN && low_surrogate <= LIT_UTF16_LOW_SURROGATE_MAX)\n        {\n          code_point = lit_convert_surrogate_pair_to_code_point ((ecma_char_t) code_point,\n                                                                 (ecma_char_t) low_surrogate);\n          utf8_length = 2 * 3;\n          decoded_length = 2 * 3;\n          char_count = 2;\n        }\n      }\n      else if (source_p[0] >= LIT_UTF8_4_BYTE_MARKER)\n      {\n        decoded_length = 2 * 3;\n        has_escape = true;\n      }\n#else /* !ENABLED (JERRY_ESNEXT) */\n      if (code_point < LIT_UTF8_4_BYTE_MARKER)\n      {\n        utf8_length = lit_read_code_point_from_utf8 (source_p,\n                                                     (lit_utf8_size_t) (source_end_p - source_p),\n                                                     &code_point);\n        decoded_length = utf8_length;\n      }\n      else\n      {\n        code_point = 0;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n\n    if (length == 0)\n    {\n      if (JERRY_UNLIKELY (options & (LEXER_PARSE_CHECK_START_AND_RETURN | LEXER_PARSE_CHECK_PART_AND_RETURN)))\n      {\n        if (options & LEXER_PARSE_CHECK_START_AND_RETURN)\n        {\n          return lit_code_point_is_identifier_start (code_point);\n        }\n        else\n        {\n          return lit_code_point_is_identifier_part (code_point);\n        }\n      }\n\n      if (!lit_code_point_is_identifier_start (code_point))\n      {\n        return false;\n      }\n    }\n    else if (!lit_code_point_is_identifier_part (code_point))\n    {\n      break;\n    }\n\n    source_p += utf8_length;\n    length += decoded_length;\n    PARSER_PLUS_EQUAL_LC (column, char_count);\n  }\n  while (source_p < source_end_p);\n\n  JERRY_ASSERT (length > 0);\n\n  context_p->token.type = LEXER_LITERAL;\n  context_p->token.lit_location.type = LEXER_IDENT_LITERAL;\n  context_p->token.lit_location.has_escape = has_escape;\n\n  context_p->token.column = context_p->column;\n  context_p->token.lit_location.char_p = context_p->source_p;\n  context_p->token.lit_location.length = (prop_length_t) length;\n\n  if (JERRY_UNLIKELY (length > PARSER_MAXIMUM_IDENT_LENGTH))\n  {\n    parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_TOO_LONG);\n  }\n\n  /* Check keywords. */\n  if ((options & LEXER_PARSE_CHECK_KEYWORDS)\n      && (length >= LEXER_KEYWORD_MIN_LENGTH && length <= LEXER_KEYWORD_MAX_LENGTH))\n  {\n    const uint8_t *ident_start_p = context_p->source_p;\n    uint8_t buffer_p[LEXER_KEYWORD_MAX_LENGTH];\n\n    if (JERRY_UNLIKELY (context_p->token.lit_location.has_escape))\n    {\n      lexer_convert_ident_to_cesu8 (buffer_p, ident_start_p, (prop_length_t) length);\n      ident_start_p = buffer_p;\n    }\n\n    const keyword_string_t *keyword_list_p = keyword_strings_list[length - LEXER_KEYWORD_MIN_LENGTH];\n\n    int start = 0;\n    int end = keyword_lengths_list[length - LEXER_KEYWORD_MIN_LENGTH];\n    int middle = end / 2;\n\n    do\n    {\n      const keyword_string_t *keyword_p = keyword_list_p + middle;\n      int compare_result = ident_start_p[0] - keyword_p->keyword_p[0];\n\n      if (compare_result == 0)\n      {\n        compare_result = memcmp (ident_start_p, keyword_p->keyword_p, length);\n\n        if (compare_result == 0)\n        {\n          context_p->token.keyword_type = (uint8_t) keyword_p->type;\n\n          if (JERRY_LIKELY (keyword_p->type < LEXER_FIRST_NON_RESERVED_KEYWORD))\n          {\n#if ENABLED (JERRY_ESNEXT)\n            if (JERRY_UNLIKELY (keyword_p->type == LEXER_KEYW_AWAIT))\n            {\n              if (!(context_p->status_flags & PARSER_IS_ASYNC_FUNCTION)\n                  && !(context_p->global_status_flags & ECMA_PARSE_MODULE))\n              {\n                break;\n              }\n\n              if (context_p->status_flags & PARSER_DISALLOW_AWAIT_YIELD)\n              {\n                if (LEXER_CHECK_INVALID_KEYWORD (ident_start_p, buffer_p))\n                {\n                  parser_raise_error (context_p, PARSER_ERR_INVALID_KEYWORD);\n                }\n                parser_raise_error (context_p, PARSER_ERR_AWAIT_NOT_ALLOWED);\n              }\n\n              context_p->token.type = (uint8_t) LEXER_KEYW_AWAIT;\n              break;\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n            if (LEXER_CHECK_INVALID_KEYWORD (ident_start_p, buffer_p))\n            {\n              /* Escape sequences are not allowed in a keyword. */\n              parser_raise_error (context_p, PARSER_ERR_INVALID_KEYWORD);\n            }\n\n            context_p->token.type = (uint8_t) keyword_p->type;\n            break;\n          }\n\n#if ENABLED (JERRY_ESNEXT)\n          if (keyword_p->type == LEXER_KEYW_LET && (context_p->status_flags & PARSER_IS_STRICT))\n          {\n            if (LEXER_CHECK_INVALID_KEYWORD (ident_start_p, buffer_p))\n            {\n              parser_raise_error (context_p, PARSER_ERR_INVALID_KEYWORD);\n            }\n\n            context_p->token.type = (uint8_t) LEXER_KEYW_LET;\n            break;\n          }\n\n          if (keyword_p->type == LEXER_KEYW_YIELD && (context_p->status_flags & PARSER_IS_GENERATOR_FUNCTION))\n          {\n            if (context_p->status_flags & PARSER_DISALLOW_AWAIT_YIELD)\n            {\n              if (LEXER_CHECK_INVALID_KEYWORD (ident_start_p, buffer_p))\n              {\n                parser_raise_error (context_p, PARSER_ERR_INVALID_KEYWORD);\n              }\n              parser_raise_error (context_p, PARSER_ERR_YIELD_NOT_ALLOWED);\n            }\n\n            context_p->token.type = (uint8_t) LEXER_KEYW_YIELD;\n            break;\n          }\n\n          if (keyword_p->type == LEXER_KEYW_ARGUMENTS && (context_p->status_flags & PARSER_INSIDE_CLASS_FIELD))\n          {\n            parser_raise_error (context_p, PARSER_ERR_ARGUMENTS_IN_CLASS_FIELD);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          if (keyword_p->type >= LEXER_FIRST_FUTURE_STRICT_RESERVED_WORD\n              && (context_p->status_flags & PARSER_IS_STRICT))\n          {\n            parser_raise_error (context_p, PARSER_ERR_STRICT_IDENT_NOT_ALLOWED);\n          }\n          break;\n        }\n      }\n\n      if (compare_result > 0)\n      {\n        start = middle + 1;\n      }\n      else\n      {\n        JERRY_ASSERT (compare_result < 0);\n        end = middle;\n      }\n\n      middle = (start + end) / 2;\n    }\n    while (start < end);\n  }\n\n  context_p->source_p = source_p;\n  context_p->column = column;\n  return true;\n} /* lexer_parse_identifier */\n\n#undef LEXER_CHECK_INVALID_KEYWORD\n\n/**\n * Parse string.\n */\nvoid\nlexer_parse_string (parser_context_t *context_p, /**< context */\n                    lexer_string_options_t opts) /**< options */\n{\n#if ENABLED (JERRY_ESNEXT)\n  int32_t raw_length_adjust = 0;\n#else /* ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (opts);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  uint8_t str_end_character = context_p->source_p[0];\n  const uint8_t *source_p = context_p->source_p + 1;\n  const uint8_t *string_start_p = source_p;\n  const uint8_t *source_end_p = context_p->source_end_p;\n  parser_line_counter_t line = context_p->line;\n  parser_line_counter_t column = (parser_line_counter_t) (context_p->column + 1);\n  parser_line_counter_t original_line = line;\n  parser_line_counter_t original_column = column;\n  size_t length = 0;\n  uint8_t has_escape = false;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (str_end_character == LIT_CHAR_RIGHT_BRACE)\n  {\n    str_end_character = LIT_CHAR_GRAVE_ACCENT;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  while (true)\n  {\n    if (source_p >= source_end_p)\n    {\n      context_p->token.line = original_line;\n      context_p->token.column = (parser_line_counter_t) (original_column - 1);\n      parser_raise_error (context_p, PARSER_ERR_UNTERMINATED_STRING);\n    }\n\n    if (*source_p == str_end_character)\n    {\n      break;\n    }\n\n    if (*source_p == LIT_CHAR_BACKSLASH)\n    {\n      source_p++;\n      column++;\n      if (source_p >= source_end_p)\n      {\n        /* Will throw an unterminated string error. */\n        continue;\n      }\n\n      has_escape = true;\n\n      /* Newline is ignored. */\n      if (*source_p == LIT_CHAR_CR)\n      {\n        source_p++;\n        if (source_p < source_end_p\n            && *source_p == LIT_CHAR_LF)\n        {\n#if ENABLED (JERRY_ESNEXT)\n          raw_length_adjust--;\n#endif /* ENABLED (JERRY_ESNEXT) */\n          source_p++;\n        }\n\n        line++;\n        column = 1;\n        continue;\n      }\n      else if (*source_p == LIT_CHAR_LF)\n      {\n        source_p++;\n        line++;\n        column = 1;\n        continue;\n      }\n      else if (*source_p == LEXER_NEWLINE_LS_PS_BYTE_1 && LEXER_NEWLINE_LS_PS_BYTE_23 (source_p))\n      {\n        source_p += 3;\n        line++;\n        column = 1;\n        continue;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (opts & LEXER_STRING_RAW)\n      {\n        if ((*source_p == LIT_CHAR_GRAVE_ACCENT) || (*source_p == LIT_CHAR_BACKSLASH))\n        {\n          source_p++;\n          column++;\n          length++;\n        }\n        continue;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (*source_p == LIT_CHAR_0\n          && source_p + 1 < source_end_p\n          && (*(source_p + 1) < LIT_CHAR_0 || *(source_p + 1) > LIT_CHAR_9))\n      {\n        source_p++;\n        column++;\n        length++;\n        continue;\n      }\n\n      /* Except \\x, \\u, and octal numbers, everything is\n       * converted to a character which has the same byte length. */\n      if (*source_p >= LIT_CHAR_0 && *source_p <= LIT_CHAR_3)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (str_end_character == LIT_CHAR_GRAVE_ACCENT)\n        {\n          parser_raise_error (context_p, PARSER_ERR_TEMPLATE_STR_OCTAL_ESCAPE);\n        }\n#endif\n\n        if (context_p->status_flags & PARSER_IS_STRICT)\n        {\n          parser_raise_error (context_p, PARSER_ERR_OCTAL_ESCAPE_NOT_ALLOWED);\n        }\n\n        source_p++;\n        column++;\n\n        if (source_p < source_end_p && *source_p >= LIT_CHAR_0 && *source_p <= LIT_CHAR_7)\n        {\n          source_p++;\n          column++;\n\n          if (source_p < source_end_p && *source_p >= LIT_CHAR_0 && *source_p <= LIT_CHAR_7)\n          {\n            /* Numbers >= 0x200 (0x80) requires\n             * two bytes for encoding in UTF-8. */\n            if (source_p[-2] >= LIT_CHAR_2)\n            {\n              length++;\n            }\n\n            source_p++;\n            column++;\n          }\n        }\n\n        length++;\n        continue;\n      }\n\n      if (*source_p >= LIT_CHAR_4 && *source_p <= LIT_CHAR_7)\n      {\n        if (context_p->status_flags & PARSER_IS_STRICT)\n        {\n          parser_raise_error (context_p, PARSER_ERR_OCTAL_ESCAPE_NOT_ALLOWED);\n        }\n\n        source_p++;\n        column++;\n\n        if (source_p < source_end_p && *source_p >= LIT_CHAR_0 && *source_p <= LIT_CHAR_7)\n        {\n          source_p++;\n          column++;\n        }\n\n        /* The maximum number is 0x4d so the UTF-8\n         * representation is always one byte. */\n        length++;\n        continue;\n      }\n\n      if (*source_p == LIT_CHAR_LOWERCASE_X || *source_p == LIT_CHAR_LOWERCASE_U)\n      {\n        uint32_t escape_length = (*source_p == LIT_CHAR_LOWERCASE_X) ? 3 : 5;\n        lit_code_point_t code_point = UINT32_MAX;\n\n#if ENABLED (JERRY_ESNEXT)\n        if (source_p + 4 <= source_end_p\n            && source_p[0] == LIT_CHAR_LOWERCASE_U\n            && source_p[1] == LIT_CHAR_LEFT_BRACE)\n        {\n          code_point = lexer_hex_in_braces_to_code_point (source_p + 2, source_end_p, &escape_length);\n          escape_length--;\n        }\n        else\n        {\n#endif /* ENABLED (JERRY_ESNEXT) */\n          if (source_p + escape_length <= source_end_p)\n          {\n            code_point = lexer_hex_to_code_point (source_p + 1, escape_length - 1);\n          }\n#if ENABLED (JERRY_ESNEXT)\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (code_point == UINT32_MAX)\n        {\n          context_p->token.line = line;\n          context_p->token.column = (parser_line_counter_t) (column - 1);\n          parser_raise_error (context_p, PARSER_ERR_INVALID_UNICODE_ESCAPE_SEQUENCE);\n        }\n\n        length += lit_code_point_get_cesu8_length (code_point);\n\n        source_p += escape_length;\n        PARSER_PLUS_EQUAL_LC (column, escape_length);\n        continue;\n      }\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (str_end_character == LIT_CHAR_GRAVE_ACCENT &&\n             source_p[0] == LIT_CHAR_DOLLAR_SIGN &&\n             source_p + 1 < source_end_p &&\n             source_p[1] == LIT_CHAR_LEFT_BRACE)\n    {\n      raw_length_adjust--;\n      source_p++;\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (*source_p >= LIT_UTF8_4_BYTE_MARKER)\n    {\n      /* Processing 4 byte unicode sequence (even if it is\n       * after a backslash). Always converted to two 3 byte\n       * long sequence. */\n      length += 2 * 3;\n      has_escape = true;\n      source_p += 4;\n#if ENABLED (JERRY_ESNEXT)\n      raw_length_adjust += 2;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      column++;\n      continue;\n    }\n    else if (*source_p == LIT_CHAR_TAB)\n    {\n      column = align_column_to_tab (column);\n      /* Subtract -1 because column is increased below. */\n      column--;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (*source_p == LEXER_NEWLINE_LS_PS_BYTE_1 && LEXER_NEWLINE_LS_PS_BYTE_23 (source_p))\n    {\n      source_p += 3;\n      length += 3;\n      line++;\n      column = 1;\n      continue;\n    }\n    else if (str_end_character == LIT_CHAR_GRAVE_ACCENT)\n    {\n      /* Newline (without backslash) is part of the string.\n         Note: ECMAScript v6, 11.8.6.1 <CR> or <CR><LF> are both normalized to <LF> */\n      if (*source_p == LIT_CHAR_CR)\n      {\n        has_escape = true;\n        source_p++;\n        length++;\n        if (source_p < source_end_p\n            && *source_p == LIT_CHAR_LF)\n        {\n          source_p++;\n          raw_length_adjust--;\n        }\n        line++;\n        column = 1;\n        continue;\n      }\n      else if (*source_p == LIT_CHAR_LF)\n      {\n        source_p++;\n        length++;\n        line++;\n        column = 1;\n        continue;\n      }\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else if (*source_p == LIT_CHAR_CR\n#if !ENABLED (JERRY_ESNEXT)\n             || (*source_p == LEXER_NEWLINE_LS_PS_BYTE_1 && LEXER_NEWLINE_LS_PS_BYTE_23 (source_p))\n#endif /* !ENABLED (JERRY_ESNEXT) */\n             || *source_p == LIT_CHAR_LF)\n    {\n      context_p->token.line = line;\n      context_p->token.column = column;\n      parser_raise_error (context_p, PARSER_ERR_NEWLINE_NOT_ALLOWED);\n    }\n\n    source_p++;\n    column++;\n    length++;\n\n    while (source_p < source_end_p\n           && IS_UTF8_INTERMEDIATE_OCTET (*source_p))\n    {\n      source_p++;\n      length++;\n    }\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (opts & LEXER_STRING_RAW)\n  {\n    length = (size_t) ((source_p - string_start_p) + raw_length_adjust);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (length > PARSER_MAXIMUM_STRING_LENGTH)\n  {\n    parser_raise_error (context_p, PARSER_ERR_STRING_TOO_LONG);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  context_p->token.type = ((str_end_character != LIT_CHAR_GRAVE_ACCENT) ? LEXER_LITERAL\n                                                                        : LEXER_TEMPLATE_LITERAL);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  context_p->token.type = LEXER_LITERAL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* Fill literal data. */\n  context_p->token.lit_location.char_p = string_start_p;\n  context_p->token.lit_location.length = (prop_length_t) length;\n  context_p->token.lit_location.type = LEXER_STRING_LITERAL;\n  context_p->token.lit_location.has_escape = has_escape;\n\n  context_p->source_p = source_p + 1;\n  context_p->line = line;\n  context_p->column = (parser_line_counter_t) (column + 1);\n} /* lexer_parse_string */\n\n/**\n * Check number\n */\nstatic void\nlexer_check_numbers (parser_context_t *context_p, /**< context */\n                     const uint8_t **source_p, /**< source_pointer */\n                     const uint8_t *source_end_p, /**< end of the source */\n                     const ecma_char_t digit_max, /**< maximum of the number range */\n                     const bool is_legacy) /**< is legacy octal number  */\n{\n#if ENABLED (!JERRY_ESNEXT)\n  JERRY_UNUSED (context_p);\n  JERRY_UNUSED (is_legacy);\n#endif /* ENABLED (!JERRY_ESNEXT) */\n  while (true)\n  {\n    while (*source_p < source_end_p\n           && *source_p[0] >= LIT_CHAR_0\n           && *source_p[0] <= digit_max)\n    {\n      *source_p += 1;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    if (*source_p != source_end_p && *source_p[0] == LIT_CHAR_UNDERSCORE)\n    {\n      *source_p += 1;\n      if (is_legacy\n          || *source_p == source_end_p\n          || *source_p[0] == LIT_CHAR_UNDERSCORE\n          || *source_p[0] > digit_max\n          || *source_p[0] < LIT_CHAR_0)\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_UNDERSCORE_IN_NUMBER);\n      }\n      continue;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    break;\n  }\n} /* lexer_check_numbers */\n\n/**\n * Parse number.\n */\nstatic void\nlexer_parse_number (parser_context_t *context_p) /**< context */\n{\n  const uint8_t *source_p = context_p->source_p;\n  const uint8_t *source_end_p = context_p->source_end_p;\n  bool can_be_float = false;\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  bool can_be_bigint = true;\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  size_t length;\n\n  context_p->token.type = LEXER_LITERAL;\n  context_p->token.extra_value = LEXER_NUMBER_DECIMAL;\n  context_p->token.lit_location.char_p = source_p;\n  context_p->token.lit_location.type = LEXER_NUMBER_LITERAL;\n  context_p->token.lit_location.has_escape = false;\n\n  if (source_p[0] == LIT_CHAR_0\n      && source_p + 1 < source_end_p)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (source_p[1] == LIT_CHAR_UNDERSCORE)\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_UNDERSCORE_IN_NUMBER);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    if (LEXER_TO_ASCII_LOWERCASE (source_p[1]) == LIT_CHAR_LOWERCASE_X)\n    {\n      context_p->token.extra_value = LEXER_NUMBER_HEXADECIMAL;\n      source_p += 2;\n\n      if (source_p >= source_end_p\n          || !lit_char_is_hex_digit (source_p[0]))\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_HEX_DIGIT);\n      }\n\n      do\n      {\n        source_p++;\n#if ENABLED (JERRY_ESNEXT)\n        if (source_p < source_end_p && source_p[0] == LIT_CHAR_UNDERSCORE)\n        {\n          source_p++;\n          if (source_p == source_end_p || !lit_char_is_hex_digit (source_p[0]))\n          {\n            parser_raise_error (context_p, PARSER_ERR_INVALID_UNDERSCORE_IN_NUMBER);\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n      while (source_p < source_end_p\n             && lit_char_is_hex_digit (source_p[0]));\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (LEXER_TO_ASCII_LOWERCASE (source_p[1]) == LIT_CHAR_LOWERCASE_O)\n    {\n      context_p->token.extra_value = LEXER_NUMBER_OCTAL;\n      source_p += 2;\n\n      if (source_p >= source_end_p\n          || !lit_char_is_octal_digit (source_p[0]))\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_OCTAL_DIGIT);\n      }\n\n      lexer_check_numbers (context_p, &source_p, source_end_p, LIT_CHAR_7, false);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else if (source_p[1] >= LIT_CHAR_0\n             && source_p[1] <= LIT_CHAR_9)\n    {\n      context_p->token.extra_value = LEXER_NUMBER_OCTAL;\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n      can_be_bigint = false;\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n      if (context_p->status_flags & PARSER_IS_STRICT)\n      {\n        parser_raise_error (context_p, PARSER_ERR_OCTAL_NUMBER_NOT_ALLOWED);\n      }\n\n      lexer_check_numbers (context_p, &source_p, source_end_p, LIT_CHAR_7, true);\n\n      if (source_p < source_end_p\n          && source_p[0] >= LIT_CHAR_8\n          && source_p[0] <= LIT_CHAR_9)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        lexer_check_numbers (context_p, &source_p, source_end_p, LIT_CHAR_9, true);\n        context_p->token.extra_value = LEXER_NUMBER_DECIMAL;\n#else /* !ENABLED (JERRY_ESNEXT) */\n        parser_raise_error (context_p, PARSER_ERR_INVALID_NUMBER);\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (LEXER_TO_ASCII_LOWERCASE (source_p[1]) == LIT_CHAR_LOWERCASE_B)\n    {\n      context_p->token.extra_value = LEXER_NUMBER_BINARY;\n      source_p += 2;\n\n      if (source_p >= source_end_p\n          || !lit_char_is_binary_digit (source_p[0]))\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_BIN_DIGIT);\n      }\n\n      do\n      {\n        source_p++;\n        if (source_p < source_end_p && source_p[0] == LIT_CHAR_UNDERSCORE)\n        {\n          source_p++;\n          if (source_p == source_end_p\n              || source_p[0] > LIT_CHAR_9\n              || source_p[0] < LIT_CHAR_0)\n          {\n            parser_raise_error (context_p, PARSER_ERR_INVALID_UNDERSCORE_IN_NUMBER);\n          }\n        }\n      }\n      while (source_p < source_end_p\n               && lit_char_is_binary_digit (source_p[0]));\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else\n    {\n      can_be_float = true;\n      source_p++;\n    }\n  }\n  else\n  {\n    lexer_check_numbers (context_p, &source_p, source_end_p, LIT_CHAR_9, false);\n    can_be_float = true;\n  }\n\n  if (can_be_float)\n  {\n    if (source_p < source_end_p\n        && source_p[0] == LIT_CHAR_DOT)\n    {\n      source_p++;\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n      can_be_bigint = false;\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n#if ENABLED (JERRY_ESNEXT)\n      if (source_p < source_end_p && source_p[0] == LIT_CHAR_UNDERSCORE)\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_UNDERSCORE_IN_NUMBER);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      lexer_check_numbers (context_p, &source_p, source_end_p, LIT_CHAR_9, false);\n    }\n\n    if (source_p < source_end_p\n        && LEXER_TO_ASCII_LOWERCASE (source_p[0]) == LIT_CHAR_LOWERCASE_E)\n    {\n      source_p++;\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n      can_be_bigint = false;\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n      if (source_p < source_end_p\n          && (source_p[0] == LIT_CHAR_PLUS || source_p[0] == LIT_CHAR_MINUS))\n      {\n        source_p++;\n      }\n\n      if (source_p >= source_end_p\n          || source_p[0] < LIT_CHAR_0\n          || source_p[0] > LIT_CHAR_9)\n      {\n        parser_raise_error (context_p, PARSER_ERR_MISSING_EXPONENT);\n      }\n\n      lexer_check_numbers (context_p, &source_p, source_end_p, LIT_CHAR_9, false);\n    }\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (source_p < source_end_p && source_p[0] == LIT_CHAR_LOWERCASE_N)\n  {\n    if (!can_be_bigint)\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_BIGINT);\n    }\n    context_p->token.extra_value = LEXER_NUMBER_BIGINT;\n    source_p++;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  length = (size_t) (source_p - context_p->source_p);\n  if (length > PARSER_MAXIMUM_STRING_LENGTH)\n  {\n    parser_raise_error (context_p, PARSER_ERR_NUMBER_TOO_LONG);\n  }\n\n  context_p->token.lit_location.length = (prop_length_t) length;\n  PARSER_PLUS_EQUAL_LC (context_p->column, length);\n  context_p->source_p = source_p;\n\n  if (source_p < source_end_p && lexer_parse_identifier (context_p, LEXER_PARSE_CHECK_START_AND_RETURN))\n  {\n    parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_AFTER_NUMBER);\n  }\n} /* lexer_parse_number */\n\n/**\n * One character long token (e.g. comma).\n *\n * @param char1 character\n * @param type1 type\n */\n#define LEXER_TYPE_A_TOKEN(char1, type1) \\\n  case (uint8_t) (char1): \\\n  { \\\n    context_p->token.type = (type1); \\\n    length = 1; \\\n    break; \\\n  }\n\n/**\n * Token pair, where the first token is prefix of the second (e.g. % and %=).\n *\n * @param char1 first character\n * @param type1 type of the first character\n * @param char2 second character\n * @param type2 type of the second character\n */\n#define LEXER_TYPE_B_TOKEN(char1, type1, char2, type2) \\\n  case (uint8_t) (char1): \\\n  { \\\n    if (length >= 2 && context_p->source_p[1] == (uint8_t) (char2)) \\\n    { \\\n      context_p->token.type = (type2); \\\n      length = 2; \\\n      break; \\\n    } \\\n    \\\n    context_p->token.type = (type1); \\\n    length = 1; \\\n    break; \\\n  }\n\n/**\n * Three tokens, where the first is the prefix of the other two (e.g. &, &&, &=).\n *\n * @param char1 first character\n * @param type1 type of the first character\n * @param char2 second character\n * @param type2 type of the second character\n * @param char3 third character\n * @param type3 type of the third character\n */\n#define LEXER_TYPE_C_TOKEN(char1, type1, char2, type2, char3, type3) \\\n  case (uint8_t) (char1): \\\n  { \\\n    if (length >= 2) \\\n    { \\\n      if (context_p->source_p[1] == (uint8_t) (char2)) \\\n      { \\\n        context_p->token.type = (type2); \\\n        length = 2; \\\n        break; \\\n      } \\\n      \\\n      if (context_p->source_p[1] == (uint8_t) (char3)) \\\n      { \\\n        context_p->token.type = (type3); \\\n        length = 2; \\\n        break; \\\n      } \\\n    } \\\n    \\\n    context_p->token.type = (type1); \\\n    length = 1; \\\n    break; \\\n  }\n\n/**\n * Get next token.\n */\nvoid\nlexer_next_token (parser_context_t *context_p) /**< context */\n{\n  size_t length;\n\n  lexer_skip_spaces (context_p);\n\n  context_p->token.keyword_type = LEXER_EOS;\n  context_p->token.line = context_p->line;\n  context_p->token.column = context_p->column;\n\n  length = (size_t) (context_p->source_end_p - context_p->source_p);\n  if (length == 0)\n  {\n    context_p->token.type = LEXER_EOS;\n    return;\n  }\n\n  if (lexer_parse_identifier (context_p, LEXER_PARSE_CHECK_KEYWORDS))\n  {\n    return;\n  }\n\n  if (context_p->source_p[0] >= LIT_CHAR_0 && context_p->source_p[0] <= LIT_CHAR_9)\n  {\n    lexer_parse_number (context_p);\n    return;\n  }\n\n  switch (context_p->source_p[0])\n  {\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_LEFT_BRACE, LEXER_LEFT_BRACE);\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_LEFT_PAREN, LEXER_LEFT_PAREN);\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_LEFT_SQUARE, LEXER_LEFT_SQUARE);\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_RIGHT_BRACE, LEXER_RIGHT_BRACE);\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_RIGHT_PAREN, LEXER_RIGHT_PAREN);\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_RIGHT_SQUARE, LEXER_RIGHT_SQUARE);\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_SEMICOLON, LEXER_SEMICOLON);\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_COMMA, LEXER_COMMA);\n\n    case (uint8_t) LIT_CHAR_DOT:\n    {\n      if (length >= 2\n          && (context_p->source_p[1] >= LIT_CHAR_0 && context_p->source_p[1] <= LIT_CHAR_9))\n      {\n        lexer_parse_number (context_p);\n        return;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (length >= 3\n          && context_p->source_p[1] == LIT_CHAR_DOT\n          && context_p->source_p[2] == LIT_CHAR_DOT)\n      {\n        context_p->token.type = LEXER_THREE_DOTS;\n        length = 3;\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      context_p->token.type = LEXER_DOT;\n      length = 1;\n      break;\n    }\n\n    case (uint8_t) LIT_CHAR_LESS_THAN:\n    {\n      if (length >= 2)\n      {\n        if (context_p->source_p[1] == (uint8_t) LIT_CHAR_EQUALS)\n        {\n          context_p->token.type = LEXER_LESS_EQUAL;\n          length = 2;\n          break;\n        }\n\n        if (context_p->source_p[1] == (uint8_t) LIT_CHAR_LESS_THAN)\n        {\n          if (length >= 3 && context_p->source_p[2] == (uint8_t) LIT_CHAR_EQUALS)\n          {\n            context_p->token.type = LEXER_ASSIGN_LEFT_SHIFT;\n            length = 3;\n            break;\n          }\n\n          context_p->token.type = LEXER_LEFT_SHIFT;\n          length = 2;\n          break;\n        }\n      }\n\n      context_p->token.type = LEXER_LESS;\n      length = 1;\n      break;\n    }\n\n    case (uint8_t) LIT_CHAR_GREATER_THAN:\n    {\n      if (length >= 2)\n      {\n        if (context_p->source_p[1] == (uint8_t) LIT_CHAR_EQUALS)\n        {\n          context_p->token.type = LEXER_GREATER_EQUAL;\n          length = 2;\n          break;\n        }\n\n        if (context_p->source_p[1] == (uint8_t) LIT_CHAR_GREATER_THAN)\n        {\n          if (length >= 3)\n          {\n            if (context_p->source_p[2] == (uint8_t) LIT_CHAR_EQUALS)\n            {\n              context_p->token.type = LEXER_ASSIGN_RIGHT_SHIFT;\n              length = 3;\n              break;\n            }\n\n            if (context_p->source_p[2] == (uint8_t) LIT_CHAR_GREATER_THAN)\n            {\n              if (length >= 4 && context_p->source_p[3] == (uint8_t) LIT_CHAR_EQUALS)\n              {\n                context_p->token.type = LEXER_ASSIGN_UNS_RIGHT_SHIFT;\n                length = 4;\n                break;\n              }\n\n              context_p->token.type = LEXER_UNS_RIGHT_SHIFT;\n              length = 3;\n              break;\n            }\n          }\n\n          context_p->token.type = LEXER_RIGHT_SHIFT;\n          length = 2;\n          break;\n        }\n      }\n\n      context_p->token.type = LEXER_GREATER;\n      length = 1;\n      break;\n    }\n\n    case (uint8_t) LIT_CHAR_EQUALS:\n    {\n      if (length >= 2)\n      {\n        if (context_p->source_p[1] == (uint8_t) LIT_CHAR_EQUALS)\n        {\n          if (length >= 3 && context_p->source_p[2] == (uint8_t) LIT_CHAR_EQUALS)\n          {\n            context_p->token.type = LEXER_STRICT_EQUAL;\n            length = 3;\n            break;\n          }\n\n          context_p->token.type = LEXER_EQUAL;\n          length = 2;\n          break;\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->source_p[1] == (uint8_t) LIT_CHAR_GREATER_THAN)\n        {\n          context_p->token.type = LEXER_ARROW;\n          length = 2;\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n\n      context_p->token.type = LEXER_ASSIGN;\n      length = 1;\n      break;\n    }\n\n    case (uint8_t) LIT_CHAR_EXCLAMATION:\n    {\n      if (length >= 2 && context_p->source_p[1] == (uint8_t) LIT_CHAR_EQUALS)\n      {\n        if (length >= 3 && context_p->source_p[2] == (uint8_t) LIT_CHAR_EQUALS)\n        {\n          context_p->token.type = LEXER_STRICT_NOT_EQUAL;\n          length = 3;\n          break;\n        }\n\n        context_p->token.type = LEXER_NOT_EQUAL;\n        length = 2;\n        break;\n      }\n\n      context_p->token.type = LEXER_LOGICAL_NOT;\n      length = 1;\n      break;\n    }\n\n    LEXER_TYPE_C_TOKEN (LIT_CHAR_PLUS, LEXER_ADD, LIT_CHAR_EQUALS,\n                        LEXER_ASSIGN_ADD, LIT_CHAR_PLUS, LEXER_INCREASE)\n    LEXER_TYPE_C_TOKEN (LIT_CHAR_MINUS, LEXER_SUBTRACT, LIT_CHAR_EQUALS,\n                        LEXER_ASSIGN_SUBTRACT, LIT_CHAR_MINUS, LEXER_DECREASE)\n\n    case (uint8_t) LIT_CHAR_ASTERISK:\n    {\n      if (length >= 2)\n      {\n        if (context_p->source_p[1] == (uint8_t) LIT_CHAR_EQUALS)\n        {\n          context_p->token.type = LEXER_ASSIGN_MULTIPLY;\n          length = 2;\n          break;\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->source_p[1] == (uint8_t) LIT_CHAR_ASTERISK)\n        {\n          if (length >= 3 && context_p->source_p[2] == (uint8_t) LIT_CHAR_EQUALS)\n          {\n            context_p->token.type = LEXER_ASSIGN_EXPONENTIATION;\n            length = 3;\n            break;\n          }\n\n          context_p->token.type = LEXER_EXPONENTIATION;\n          length = 2;\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n\n      context_p->token.type = LEXER_MULTIPLY;\n      length = 1;\n      break;\n    }\n\n    LEXER_TYPE_B_TOKEN (LIT_CHAR_SLASH, LEXER_DIVIDE, LIT_CHAR_EQUALS,\n                        LEXER_ASSIGN_DIVIDE)\n    LEXER_TYPE_B_TOKEN (LIT_CHAR_PERCENT, LEXER_MODULO, LIT_CHAR_EQUALS,\n                        LEXER_ASSIGN_MODULO)\n\n    LEXER_TYPE_C_TOKEN (LIT_CHAR_AMPERSAND, LEXER_BIT_AND, LIT_CHAR_EQUALS,\n                        LEXER_ASSIGN_BIT_AND, LIT_CHAR_AMPERSAND, LEXER_LOGICAL_AND)\n    LEXER_TYPE_C_TOKEN (LIT_CHAR_VLINE, LEXER_BIT_OR, LIT_CHAR_EQUALS,\n                        LEXER_ASSIGN_BIT_OR, LIT_CHAR_VLINE, LEXER_LOGICAL_OR)\n\n    LEXER_TYPE_B_TOKEN (LIT_CHAR_CIRCUMFLEX, LEXER_BIT_XOR, LIT_CHAR_EQUALS,\n                        LEXER_ASSIGN_BIT_XOR)\n\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_TILDE, LEXER_BIT_NOT);\n    case (uint8_t) (LIT_CHAR_QUESTION):\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (length >= 2)\n      {\n        if (context_p->source_p[1] == (uint8_t) LIT_CHAR_QUESTION)\n        {\n          context_p->token.type = LEXER_NULLISH_COALESCING;\n          length = 2;\n          break;\n        }\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      context_p->token.type = LEXER_QUESTION_MARK;\n      length = 1;\n      break;\n    }\n\n    LEXER_TYPE_A_TOKEN (LIT_CHAR_COLON, LEXER_COLON);\n\n    case LIT_CHAR_SINGLE_QUOTE:\n    case LIT_CHAR_DOUBLE_QUOTE:\n#if ENABLED (JERRY_ESNEXT)\n    case LIT_CHAR_GRAVE_ACCENT:\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n      lexer_parse_string (context_p, LEXER_STRING_NO_OPTS);\n      return;\n    }\n\n    default:\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_CHARACTER);\n    }\n  }\n\n  context_p->source_p += length;\n  PARSER_PLUS_EQUAL_LC (context_p->column, length);\n} /* lexer_next_token */\n\n#undef LEXER_TYPE_A_TOKEN\n#undef LEXER_TYPE_B_TOKEN\n#undef LEXER_TYPE_C_TOKEN\n#undef LEXER_TYPE_D_TOKEN\n\n/**\n * Checks whether the next token starts with the specified character.\n *\n * @return true - if the next is the specified character\n *         false - otherwise\n */\nbool\nlexer_check_next_character (parser_context_t *context_p, /**< context */\n                            lit_utf8_byte_t character) /**< specified character */\n{\n  if (!(context_p->token.flags & LEXER_NO_SKIP_SPACES))\n  {\n    lexer_skip_spaces (context_p);\n    context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);\n  }\n\n  return (context_p->source_p < context_p->source_end_p\n          && context_p->source_p[0] == (uint8_t) character);\n} /* lexer_check_next_character */\n\n/**\n * Checks whether the next token starts with either specified characters.\n *\n * @return true - if the next is the specified character\n *         false - otherwise\n */\nbool\nlexer_check_next_characters (parser_context_t *context_p, /**< context */\n                             lit_utf8_byte_t character1, /**< first alternative character */\n                             lit_utf8_byte_t character2) /**< second alternative character */\n{\n  if (!(context_p->token.flags & LEXER_NO_SKIP_SPACES))\n  {\n    lexer_skip_spaces (context_p);\n    context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);\n  }\n\n  return (context_p->source_p < context_p->source_end_p\n          && (context_p->source_p[0] == (uint8_t) character1\n              || context_p->source_p[0] == (uint8_t) character2));\n} /* lexer_check_next_characters */\n\n/**\n * Consumes the next character. The character cannot be a white space.\n *\n * @return consumed character\n */\nextern inline uint8_t JERRY_ATTR_ALWAYS_INLINE\nlexer_consume_next_character (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->source_p < context_p->source_end_p);\n\n  context_p->token.flags &= (uint8_t) ~LEXER_NO_SKIP_SPACES;\n\n  PARSER_PLUS_EQUAL_LC (context_p->column, 1);\n  return *context_p->source_p++;\n} /* lexer_consume_next_character */\n\n/**\n * Checks whether the next character can be the start of a post primary expression\n *\n * Note:\n *     the result is not precise, but this inprecise result\n *     has no side effects for negating number literals\n *\n * @return true if the next character can be the start of a post primary expression\n */\nbool\nlexer_check_post_primary_exp (parser_context_t *context_p) /**< context */\n{\n  if (!(context_p->token.flags & LEXER_NO_SKIP_SPACES))\n  {\n    lexer_skip_spaces (context_p);\n    context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);\n  }\n\n  if (context_p->source_p >= context_p->source_end_p)\n  {\n    return false;\n  }\n\n  switch (context_p->source_p[0])\n  {\n    case LIT_CHAR_DOT:\n    case LIT_CHAR_LEFT_PAREN:\n    case LIT_CHAR_LEFT_SQUARE:\n#if ENABLED (JERRY_ESNEXT)\n    case LIT_CHAR_GRAVE_ACCENT:\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n      return true;\n    }\n    case LIT_CHAR_PLUS:\n    case LIT_CHAR_MINUS:\n    {\n      return (!(context_p->token.flags & LEXER_WAS_NEWLINE)\n              && context_p->source_p + 1 < context_p->source_end_p\n              && context_p->source_p[1] == context_p->source_p[0]);\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LIT_CHAR_ASTERISK:\n    {\n      return (context_p->source_p + 1 < context_p->source_end_p\n              && context_p->source_p[1] == (uint8_t) LIT_CHAR_ASTERISK);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n\n  return false;\n} /* lexer_check_post_primary_exp */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Checks whether the next token is a type used for detecting arrow functions.\n *\n * @return true if the next token is an arrow token\n */\nbool\nlexer_check_arrow (parser_context_t *context_p) /**< context */\n{\n  if (!(context_p->token.flags & LEXER_NO_SKIP_SPACES))\n  {\n    lexer_skip_spaces (context_p);\n    context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);\n  }\n\n  return (!(context_p->token.flags & LEXER_WAS_NEWLINE)\n          && context_p->source_p + 2 <= context_p->source_end_p\n          && context_p->source_p[0] == (uint8_t) LIT_CHAR_EQUALS\n          && context_p->source_p[1] == (uint8_t) LIT_CHAR_GREATER_THAN);\n} /* lexer_check_arrow */\n\n/**\n * Checks whether the next token is a comma or equal sign.\n *\n * @return true if the next token is a comma or equal sign\n */\nbool\nlexer_check_arrow_param (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.flags & LEXER_NO_SKIP_SPACES);\n\n  if (context_p->source_p >= context_p->source_end_p)\n  {\n    return false;\n  }\n\n  if (context_p->source_p[0] == LIT_CHAR_COMMA)\n  {\n    return true;\n  }\n\n  if (context_p->source_p[0] != LIT_CHAR_EQUALS)\n  {\n    return false;\n  }\n\n  return (context_p->source_p + 1 >= context_p->source_end_p\n          || context_p->source_p[1] != LIT_CHAR_EQUALS);\n} /* lexer_check_arrow_param */\n\n/**\n * Checks whether the yield expression has no argument.\n *\n * @return true if it has no argument\n */\nbool\nlexer_check_yield_no_arg (parser_context_t *context_p) /**< context */\n{\n  if (context_p->token.flags & LEXER_WAS_NEWLINE)\n  {\n    return true;\n  }\n\n  switch (context_p->token.type)\n  {\n    case LEXER_RIGHT_BRACE:\n    case LEXER_RIGHT_PAREN:\n    case LEXER_RIGHT_SQUARE:\n    case LEXER_COMMA:\n    case LEXER_COLON:\n    case LEXER_SEMICOLON:\n    case LEXER_EOS:\n    {\n      return true;\n    }\n    default:\n    {\n      return false;\n    }\n  }\n} /* lexer_check_yield_no_arg */\n\n/**\n * Checks whether the next token is a multiply and consumes it.\n *\n * @return true if the next token is a multiply\n */\nbool\nlexer_consume_generator (parser_context_t *context_p) /**< context */\n{\n  if (!(context_p->token.flags & LEXER_NO_SKIP_SPACES))\n  {\n    lexer_skip_spaces (context_p);\n    context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);\n  }\n\n  if (context_p->source_p >= context_p->source_end_p\n      || context_p->source_p[0] != LIT_CHAR_ASTERISK\n      || (context_p->source_p + 1 < context_p->source_end_p\n          && (context_p->source_p[1] == LIT_CHAR_EQUALS || context_p->source_p[1] == LIT_CHAR_ASTERISK)))\n  {\n    return false;\n  }\n\n  lexer_consume_next_character (context_p);\n  context_p->token.type = LEXER_MULTIPLY;\n  return true;\n} /* lexer_consume_generator */\n\n/**\n * Checks whether the next token is an equal sign and consumes it.\n *\n * @return true if the next token is an equal sign\n */\nbool\nlexer_consume_assign (parser_context_t *context_p) /**< context */\n{\n  if (!(context_p->token.flags & LEXER_NO_SKIP_SPACES))\n  {\n    lexer_skip_spaces (context_p);\n    context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);\n  }\n\n  if (context_p->source_p >= context_p->source_end_p\n      || context_p->source_p[0] != LIT_CHAR_EQUALS\n      || (context_p->source_p + 1 < context_p->source_end_p\n          && (context_p->source_p[1] == LIT_CHAR_EQUALS || context_p->source_p[1] == LIT_CHAR_GREATER_THAN)))\n  {\n    return false;\n  }\n\n  lexer_consume_next_character (context_p);\n  context_p->token.type = LEXER_ASSIGN;\n  return true;\n} /* lexer_consume_assign */\n\n/**\n * Update await / yield keywords after an arrow function with expression.\n */\nvoid\nlexer_update_await_yield (parser_context_t *context_p, /**< context */\n                          uint32_t status_flags) /**< parser status flags after restore */\n{\n  if (!(status_flags & PARSER_IS_STRICT))\n  {\n    if (status_flags & PARSER_IS_GENERATOR_FUNCTION)\n    {\n      if (context_p->token.type == LEXER_LITERAL\n          && context_p->token.keyword_type == LEXER_KEYW_YIELD)\n      {\n        context_p->token.type = LEXER_KEYW_YIELD;\n      }\n    }\n    else\n    {\n      if (context_p->token.type == LEXER_KEYW_YIELD)\n      {\n        JERRY_ASSERT (context_p->token.keyword_type == LEXER_KEYW_YIELD);\n        context_p->token.type = LEXER_LITERAL;\n      }\n    }\n  }\n\n  if (!(context_p->global_status_flags & ECMA_PARSE_MODULE))\n  {\n    if (status_flags & PARSER_IS_ASYNC_FUNCTION)\n    {\n      if (context_p->token.type == LEXER_LITERAL\n          && context_p->token.keyword_type == LEXER_KEYW_AWAIT)\n      {\n        context_p->token.type = LEXER_KEYW_AWAIT;\n      }\n    }\n    else\n    {\n      if (context_p->token.type == LEXER_KEYW_AWAIT)\n      {\n        JERRY_ASSERT (context_p->token.keyword_type == LEXER_KEYW_AWAIT);\n        context_p->token.type = LEXER_LITERAL;\n      }\n    }\n  }\n} /* lexer_update_await_yield */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Convert an ident with escapes to a utf8 string.\n */\nvoid\nlexer_convert_ident_to_cesu8 (uint8_t *destination_p, /**< destination string */\n                              const uint8_t *source_p, /**< source string */\n                              prop_length_t length) /**< length of destination string */\n{\n  const uint8_t *destination_end_p = destination_p + length;\n\n  JERRY_ASSERT (length <= PARSER_MAXIMUM_IDENT_LENGTH);\n\n  do\n  {\n    if (*source_p == LIT_CHAR_BACKSLASH)\n    {\n      source_p += 2;\n      destination_p += lit_code_point_to_cesu8_bytes (destination_p,\n                                                      lexer_unchecked_hex_to_character (&source_p));\n      continue;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (*source_p >= LIT_UTF8_4_BYTE_MARKER)\n    {\n      lit_four_byte_utf8_char_to_cesu8 (destination_p, source_p);\n\n      destination_p += 6;\n      source_p += 4;\n      continue;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    *destination_p++ = *source_p++;\n  }\n  while (destination_p < destination_end_p);\n} /* lexer_convert_ident_to_cesu8 */\n\n/**\n * Convert literal to character sequence\n */\nconst uint8_t *\nlexer_convert_literal_to_chars (parser_context_t *context_p, /**< context */\n                                const lexer_lit_location_t *literal_p, /**< literal location */\n                                uint8_t *local_byte_array_p, /**< local byte array to store chars */\n                                lexer_string_options_t opts) /**< options */\n{\n  JERRY_ASSERT (context_p->u.allocated_buffer_p == NULL);\n\n  if (!literal_p->has_escape)\n  {\n    return literal_p->char_p;\n  }\n\n  uint8_t *destination_start_p;\n  if (literal_p->length > LEXER_MAX_LITERAL_LOCAL_BUFFER_SIZE)\n  {\n    context_p->u.allocated_buffer_p = (uint8_t *) parser_malloc_local (context_p, literal_p->length);\n    context_p->allocated_buffer_size = literal_p->length;\n    destination_start_p = context_p->u.allocated_buffer_p;\n  }\n  else\n  {\n    destination_start_p = local_byte_array_p;\n  }\n\n  if (literal_p->type == LEXER_IDENT_LITERAL)\n  {\n    lexer_convert_ident_to_cesu8 (destination_start_p, literal_p->char_p, literal_p->length);\n    return destination_start_p;\n  }\n\n  const uint8_t *source_p = literal_p->char_p;\n  uint8_t *destination_p = destination_start_p;\n\n  uint8_t str_end_character = source_p[-1];\n\n#if ENABLED (JERRY_ESNEXT)\n  if (str_end_character == LIT_CHAR_RIGHT_BRACE)\n  {\n    str_end_character = LIT_CHAR_GRAVE_ACCENT;\n  }\n\n  bool is_raw = (opts & LEXER_STRING_RAW) != 0;\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (opts);\n  bool is_raw = false;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  while (true)\n  {\n    if (*source_p == str_end_character)\n    {\n      break;\n    }\n\n    if (*source_p == LIT_CHAR_BACKSLASH && !is_raw)\n    {\n      uint8_t conv_character;\n\n      source_p++;\n      JERRY_ASSERT (source_p < context_p->source_end_p);\n\n      /* Newline is ignored. */\n      if (*source_p == LIT_CHAR_CR)\n      {\n        source_p++;\n        JERRY_ASSERT (source_p < context_p->source_end_p);\n\n        if (*source_p == LIT_CHAR_LF)\n        {\n          source_p++;\n        }\n        continue;\n      }\n      else if (*source_p == LIT_CHAR_LF)\n      {\n        source_p++;\n        continue;\n      }\n      else if (*source_p == LEXER_NEWLINE_LS_PS_BYTE_1 && LEXER_NEWLINE_LS_PS_BYTE_23 (source_p))\n      {\n        source_p += 3;\n        continue;\n      }\n\n      if (*source_p >= LIT_CHAR_0 && *source_p <= LIT_CHAR_3)\n      {\n        lit_code_point_t octal_number = (uint32_t) (*source_p - LIT_CHAR_0);\n\n        source_p++;\n        JERRY_ASSERT (source_p < context_p->source_end_p);\n\n        if (*source_p >= LIT_CHAR_0 && *source_p <= LIT_CHAR_7)\n        {\n          octal_number = octal_number * 8 + (uint32_t) (*source_p - LIT_CHAR_0);\n          source_p++;\n          JERRY_ASSERT (source_p < context_p->source_end_p);\n\n          if (*source_p >= LIT_CHAR_0 && *source_p <= LIT_CHAR_7)\n          {\n            octal_number = octal_number * 8 + (uint32_t) (*source_p - LIT_CHAR_0);\n            source_p++;\n            JERRY_ASSERT (source_p < context_p->source_end_p);\n          }\n        }\n\n        destination_p += lit_code_point_to_cesu8_bytes (destination_p, octal_number);\n        continue;\n      }\n\n      if (*source_p >= LIT_CHAR_4 && *source_p <= LIT_CHAR_7)\n      {\n        uint32_t octal_number = (uint32_t) (*source_p - LIT_CHAR_0);\n\n        source_p++;\n        JERRY_ASSERT (source_p < context_p->source_end_p);\n\n        if (*source_p >= LIT_CHAR_0 && *source_p <= LIT_CHAR_7)\n        {\n          octal_number = octal_number * 8 + (uint32_t) (*source_p - LIT_CHAR_0);\n          source_p++;\n          JERRY_ASSERT (source_p < context_p->source_end_p);\n        }\n\n        *destination_p++ = (uint8_t) octal_number;\n        continue;\n      }\n\n      if (*source_p == LIT_CHAR_LOWERCASE_X || *source_p == LIT_CHAR_LOWERCASE_U)\n      {\n        source_p++;\n        destination_p += lit_code_point_to_cesu8_bytes (destination_p,\n                                                        lexer_unchecked_hex_to_character (&source_p));\n        continue;\n      }\n\n      conv_character = *source_p;\n      switch (*source_p)\n      {\n        case LIT_CHAR_LOWERCASE_B:\n        {\n          conv_character = 0x08;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_T:\n        {\n          conv_character = 0x09;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_N:\n        {\n          conv_character = 0x0a;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_V:\n        {\n          conv_character = 0x0b;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_F:\n        {\n          conv_character = 0x0c;\n          break;\n        }\n        case LIT_CHAR_LOWERCASE_R:\n        {\n          conv_character = 0x0d;\n          break;\n        }\n      }\n\n      if (conv_character != *source_p)\n      {\n        *destination_p++ = conv_character;\n        source_p++;\n        continue;\n      }\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (str_end_character == LIT_CHAR_GRAVE_ACCENT)\n    {\n      if (source_p[0] == LIT_CHAR_DOLLAR_SIGN\n          && source_p[1] == LIT_CHAR_LEFT_BRACE)\n      {\n        source_p++;\n        JERRY_ASSERT (source_p < context_p->source_end_p);\n        break;\n      }\n      if (*source_p == LIT_CHAR_CR)\n      {\n        *destination_p++ = LIT_CHAR_LF;\n        source_p++;\n        if (*source_p != str_end_character\n            && *source_p == LIT_CHAR_LF)\n        {\n          source_p++;\n        }\n        continue;\n      }\n      if ((*source_p == LIT_CHAR_BACKSLASH) && is_raw)\n      {\n        JERRY_ASSERT (source_p + 1 < context_p->source_end_p);\n        if ((*(source_p + 1) == LIT_CHAR_GRAVE_ACCENT) || (*(source_p + 1) == LIT_CHAR_BACKSLASH))\n        {\n          *destination_p++ = *source_p++;\n          *destination_p++ = *source_p++;\n          continue;\n        }\n      }\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (*source_p >= LIT_UTF8_4_BYTE_MARKER)\n    {\n      /* Processing 4 byte unicode sequence (even if it is\n        * after a backslash). Always converted to two 3 byte\n        * long sequence. */\n      lit_four_byte_utf8_char_to_cesu8 (destination_p, source_p);\n\n      destination_p += 6;\n      source_p += 4;\n      continue;\n    }\n\n    *destination_p++ = *source_p++;\n\n    /* There is no need to check the source_end_p\n      * since the string is terminated by a quotation mark. */\n    while (IS_UTF8_INTERMEDIATE_OCTET (*source_p))\n    {\n      *destination_p++ = *source_p++;\n    }\n  }\n\n  JERRY_ASSERT (destination_p == destination_start_p + literal_p->length);\n\n  return destination_start_p;\n} /* lexer_convert_literal_to_chars */\n\n/**\n * Construct an unused literal.\n *\n * @return a newly allocated literal\n */\nlexer_literal_t *\nlexer_construct_unused_literal (parser_context_t *context_p) /**< context */\n{\n  lexer_literal_t *literal_p;\n\n  if (context_p->literal_count >= PARSER_MAXIMUM_NUMBER_OF_LITERALS)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LITERAL_LIMIT_REACHED);\n  }\n\n  literal_p = (lexer_literal_t *) parser_list_append (context_p, &context_p->literal_pool);\n  literal_p->type = LEXER_UNUSED_LITERAL;\n  literal_p->status_flags = 0;\n  return literal_p;\n} /* lexer_construct_unused_literal */\n\n/**\n * Construct a literal object from an identifier.\n */\nvoid\nlexer_construct_literal_object (parser_context_t *context_p, /**< context */\n                                const lexer_lit_location_t *lit_location_p, /**< literal location */\n                                uint8_t literal_type) /**< final literal type */\n{\n  uint8_t local_byte_array[LEXER_MAX_LITERAL_LOCAL_BUFFER_SIZE];\n\n  const uint8_t *char_p = lexer_convert_literal_to_chars (context_p,\n                                                          lit_location_p,\n                                                          local_byte_array,\n                                                          LEXER_STRING_NO_OPTS);\n\n  size_t length = lit_location_p->length;\n  parser_list_iterator_t literal_iterator;\n  lexer_literal_t *literal_p;\n  uint32_t literal_index = 0;\n  bool search_scope_stack = (literal_type == LEXER_IDENT_LITERAL);\n\n  if (JERRY_UNLIKELY (literal_type == LEXER_NEW_IDENT_LITERAL))\n  {\n    literal_type = LEXER_IDENT_LITERAL;\n  }\n\n  JERRY_ASSERT (literal_type == LEXER_IDENT_LITERAL\n                || literal_type == LEXER_STRING_LITERAL);\n\n  JERRY_ASSERT (literal_type != LEXER_IDENT_LITERAL || length <= PARSER_MAXIMUM_IDENT_LENGTH);\n  JERRY_ASSERT (literal_type != LEXER_STRING_LITERAL || length <= PARSER_MAXIMUM_STRING_LENGTH);\n\n  parser_list_iterator_init (&context_p->literal_pool, &literal_iterator);\n\n  while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n  {\n    if (literal_p->type == literal_type\n        && literal_p->prop.length == length\n        && memcmp (literal_p->u.char_p, char_p, length) == 0)\n    {\n      context_p->lit_object.literal_p = literal_p;\n      context_p->lit_object.index = (uint16_t) literal_index;\n\n      parser_free_allocated_buffer (context_p);\n\n      if (search_scope_stack)\n      {\n        parser_scope_stack_t *scope_stack_start_p = context_p->scope_stack_p;\n        parser_scope_stack_t *scope_stack_p = scope_stack_start_p + context_p->scope_stack_top;\n\n        while (scope_stack_p > scope_stack_start_p)\n        {\n          scope_stack_p--;\n\n          if (scope_stack_p->map_from == literal_index)\n          {\n            JERRY_ASSERT (scanner_decode_map_to (scope_stack_p) >= PARSER_REGISTER_START\n                          || (literal_p->status_flags & LEXER_FLAG_USED));\n            context_p->lit_object.index = scanner_decode_map_to (scope_stack_p);\n            return;\n          }\n        }\n\n        literal_p->status_flags |= LEXER_FLAG_USED;\n      }\n      return;\n    }\n\n    literal_index++;\n  }\n\n  JERRY_ASSERT (literal_index == context_p->literal_count);\n\n  if (literal_index >= PARSER_MAXIMUM_NUMBER_OF_LITERALS)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LITERAL_LIMIT_REACHED);\n  }\n\n  literal_p = (lexer_literal_t *) parser_list_append (context_p, &context_p->literal_pool);\n  literal_p->prop.length = (prop_length_t) length;\n  literal_p->type = literal_type;\n\n  uint8_t status_flags = LEXER_FLAG_SOURCE_PTR;\n\n  if (length > 0 && char_p == local_byte_array)\n  {\n    literal_p->u.char_p = (uint8_t *) jmem_heap_alloc_block (length);\n    memcpy ((uint8_t *) literal_p->u.char_p, char_p, length);\n    status_flags = 0;\n  }\n  else\n  {\n    literal_p->u.char_p = char_p;\n\n    /* Buffer is taken over when a new literal is constructed. */\n    if (context_p->u.allocated_buffer_p != NULL)\n    {\n      JERRY_ASSERT (char_p == context_p->u.allocated_buffer_p);\n\n      context_p->u.allocated_buffer_p = NULL;\n      status_flags = 0;\n    }\n  }\n\n  if (search_scope_stack)\n  {\n    status_flags |= LEXER_FLAG_USED;\n  }\n\n  literal_p->status_flags = status_flags;\n\n  context_p->lit_object.literal_p = literal_p;\n  context_p->lit_object.index = (uint16_t) literal_index;\n  context_p->literal_count++;\n\n  JERRY_ASSERT (context_p->u.allocated_buffer_p == NULL);\n} /* lexer_construct_literal_object */\n\n/**\n * Construct a number object.\n *\n * @return true if number is small number\n */\nbool\nlexer_construct_number_object (parser_context_t *context_p, /**< context */\n                               bool is_expr, /**< expression is parsed */\n                               bool is_negative_number) /**< sign is negative */\n{\n  parser_list_iterator_t literal_iterator;\n  lexer_literal_t *literal_p;\n  ecma_value_t lit_value;\n  ecma_number_t num;\n  uint32_t literal_index = 0;\n  prop_length_t length = context_p->token.lit_location.length;\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (JERRY_LIKELY (context_p->token.extra_value != LEXER_NUMBER_BIGINT))\n  {\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    if (context_p->token.extra_value < LEXER_NUMBER_OCTAL)\n    {\n#if ENABLED (JERRY_ESNEXT)\n      num = ecma_utf8_string_to_number (context_p->token.lit_location.char_p,\n                                        length,\n                                        ECMA_CONVERSION_ALLOW_UNDERSCORE);\n#else\n      num = ecma_utf8_string_to_number (context_p->token.lit_location.char_p, length, 0);\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n    else\n    {\n      const uint8_t *src_p = context_p->token.lit_location.char_p;\n      const uint8_t *src_end_p = src_p + length - 1;\n      ecma_number_t multiplier = 8.0;\n\n      JERRY_ASSERT (src_p[0] == LIT_CHAR_0);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->token.extra_value == LEXER_NUMBER_BINARY)\n      {\n        src_p++;\n        multiplier = 2.0;\n      }\n      else if (LEXER_TO_ASCII_LOWERCASE (src_p[1]) == LIT_CHAR_LOWERCASE_O)\n      {\n        src_p++;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      num = 0;\n      do\n      {\n        if (src_p[1] == LIT_CHAR_UNDERSCORE)\n        {\n          src_p++;\n        }\n        num = num * multiplier + (ecma_number_t) (*(++src_p) - LIT_CHAR_0);\n      }\n      while (src_p < src_end_p);\n    }\n\n    if (is_expr)\n    {\n      int32_t int_num = (int32_t) num;\n\n      if (int_num == num\n          && int_num <= CBC_PUSH_NUMBER_BYTE_RANGE_END\n          && (int_num != 0 || !is_negative_number))\n      {\n        context_p->lit_object.index = (uint16_t) int_num;\n        return true;\n      }\n    }\n\n    if (is_negative_number)\n    {\n      num = -num;\n    }\n\n    lit_value = ecma_find_or_create_literal_number (num);\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  }\n  else\n  {\n    uint32_t options = (ECMA_BIGINT_PARSE_DISALLOW_SYNTAX_ERROR\n                        | ECMA_BIGINT_PARSE_DISALLOW_MEMORY_ERROR\n                        | ECMA_BIGINT_PARSE_ALLOW_UNDERSCORE);\n\n    if (is_negative_number)\n    {\n      options |= ECMA_BIGINT_PARSE_SET_NEGATIVE;\n    }\n\n    JERRY_ASSERT (length >= 2);\n    lit_value = ecma_bigint_parse_string (context_p->token.lit_location.char_p,\n                                          (lit_utf8_size_t) (length - 1),\n                                          options);\n\n    JERRY_ASSERT (lit_value != ECMA_VALUE_FALSE && !ECMA_IS_VALUE_ERROR (lit_value));\n\n    if (lit_value == ECMA_VALUE_NULL)\n    {\n      parser_raise_error (context_p, PARSER_ERR_OUT_OF_MEMORY);\n    }\n\n    lit_value = ecma_find_or_create_literal_bigint (lit_value);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  parser_list_iterator_init (&context_p->literal_pool, &literal_iterator);\n\n  while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n  {\n    if (literal_p->type == LEXER_NUMBER_LITERAL\n        && literal_p->u.value == lit_value)\n    {\n      context_p->lit_object.literal_p = literal_p;\n      context_p->lit_object.index = (uint16_t) literal_index;\n      return false;\n    }\n\n    literal_index++;\n  }\n\n  JERRY_ASSERT (literal_index == context_p->literal_count);\n\n  if (literal_index >= PARSER_MAXIMUM_NUMBER_OF_LITERALS)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LITERAL_LIMIT_REACHED);\n  }\n\n  literal_p = (lexer_literal_t *) parser_list_append (context_p, &context_p->literal_pool);\n  literal_p->u.value = lit_value;\n  literal_p->prop.length = 0; /* Unused. */\n  literal_p->type = LEXER_NUMBER_LITERAL;\n  literal_p->status_flags = 0;\n\n  context_p->lit_object.literal_p = literal_p;\n  context_p->lit_object.index = (uint16_t) literal_index;\n\n  context_p->literal_count++;\n  return false;\n} /* lexer_construct_number_object */\n\n/**\n * Convert a push number opcode to push literal opcode\n */\nvoid\nlexer_convert_push_number_to_push_literal (parser_context_t *context_p) /**< context */\n{\n  ecma_integer_value_t value;\n  bool two_literals = !PARSER_IS_BASIC_OPCODE (context_p->last_cbc_opcode);\n\n  if (context_p->last_cbc_opcode == CBC_PUSH_NUMBER_0\n      || context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_0))\n  {\n    value = 0;\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_NUMBER_POS_BYTE\n           || context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_POS_BYTE))\n  {\n    value = ((ecma_integer_value_t) context_p->last_cbc.value) + 1;\n  }\n  else\n  {\n    JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_NUMBER_NEG_BYTE\n                  || context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE));\n    value = -((ecma_integer_value_t) context_p->last_cbc.value) - 1;\n  }\n\n  ecma_value_t lit_value = ecma_make_integer_value (value);\n\n  parser_list_iterator_t literal_iterator;\n  parser_list_iterator_init (&context_p->literal_pool, &literal_iterator);\n\n  context_p->last_cbc_opcode = two_literals ? CBC_PUSH_TWO_LITERALS : CBC_PUSH_LITERAL;\n\n  uint32_t literal_index = 0;\n  lexer_literal_t *literal_p;\n\n  while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n  {\n    if (literal_p->type == LEXER_NUMBER_LITERAL\n        && literal_p->u.value == lit_value)\n    {\n      if (two_literals)\n      {\n        context_p->last_cbc.value = (uint16_t) literal_index;\n      }\n      else\n      {\n        context_p->last_cbc.literal_index = (uint16_t) literal_index;\n      }\n      return;\n    }\n\n    literal_index++;\n  }\n\n  JERRY_ASSERT (literal_index == context_p->literal_count);\n\n  if (literal_index >= PARSER_MAXIMUM_NUMBER_OF_LITERALS)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LITERAL_LIMIT_REACHED);\n  }\n\n  literal_p = (lexer_literal_t *) parser_list_append (context_p, &context_p->literal_pool);\n  literal_p->u.value = lit_value;\n  literal_p->prop.length = 0; /* Unused. */\n  literal_p->type = LEXER_NUMBER_LITERAL;\n  literal_p->status_flags = 0;\n\n  context_p->literal_count++;\n\n  if (two_literals)\n  {\n    context_p->last_cbc.value = (uint16_t) literal_index;\n  }\n  else\n  {\n    context_p->last_cbc.literal_index = (uint16_t) literal_index;\n  }\n} /* lexer_convert_push_number_to_push_literal */\n\n/**\n * Construct a function literal object.\n *\n * @return function object literal index\n */\nuint16_t\nlexer_construct_function_object (parser_context_t *context_p, /**< context */\n                                 uint32_t extra_status_flags) /**< extra status flags */\n{\n  ecma_compiled_code_t *compiled_code_p;\n  lexer_literal_t *literal_p;\n  uint16_t result_index;\n\n  if (context_p->status_flags & PARSER_INSIDE_WITH)\n  {\n    extra_status_flags |= PARSER_INSIDE_WITH;\n  }\n\n  literal_p = lexer_construct_unused_literal (context_p);\n  result_index = context_p->literal_count;\n  context_p->literal_count++;\n\n  parser_flush_cbc (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_LIKELY (!(extra_status_flags & PARSER_IS_ARROW_FUNCTION)))\n  {\n    compiled_code_p = parser_parse_function (context_p, extra_status_flags);\n  }\n  else\n  {\n    compiled_code_p = parser_parse_arrow_function (context_p, extra_status_flags);\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  compiled_code_p = parser_parse_function (context_p, extra_status_flags);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  literal_p->u.bytecode_p = compiled_code_p;\n  literal_p->type = LEXER_FUNCTION_LITERAL;\n\n  return result_index;\n} /* lexer_construct_function_object */\n\n/**\n * Construct a regular expression object.\n *\n * Note: In ESNEXT the constructed literal's type can be LEXER_STRING_LITERAL which represents\n * invalid pattern. In this case the lit_object's index contains the thrown error message literal.\n * Otherwise a new literal is appended to the end of the literal pool.\n */\nvoid\nlexer_construct_regexp_object (parser_context_t *context_p, /**< context */\n                               bool parse_only) /**< parse only */\n{\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  const uint8_t *source_p = context_p->source_p;\n  const uint8_t *regex_start_p = context_p->source_p;\n  const uint8_t *regex_end_p = regex_start_p;\n  const uint8_t *source_end_p = context_p->source_end_p;\n  parser_line_counter_t column = context_p->column;\n  bool in_class = false;\n  uint16_t current_flags;\n  lit_utf8_size_t length;\n\n  JERRY_ASSERT (context_p->token.type == LEXER_DIVIDE\n                || context_p->token.type == LEXER_ASSIGN_DIVIDE);\n\n  if (context_p->token.type == LEXER_ASSIGN_DIVIDE)\n  {\n    regex_start_p--;\n  }\n\n  while (true)\n  {\n    if (source_p >= source_end_p)\n    {\n      parser_raise_error (context_p, PARSER_ERR_UNTERMINATED_REGEXP);\n    }\n\n    if (!in_class && source_p[0] == LIT_CHAR_SLASH)\n    {\n      regex_end_p = source_p;\n      source_p++;\n      column++;\n      break;\n    }\n\n    switch (source_p[0])\n    {\n      case LIT_CHAR_CR:\n      case LIT_CHAR_LF:\n      case LEXER_NEWLINE_LS_PS_BYTE_1:\n      {\n        if (source_p[0] != LEXER_NEWLINE_LS_PS_BYTE_1\n            || LEXER_NEWLINE_LS_PS_BYTE_23 (source_p))\n        {\n          parser_raise_error (context_p, PARSER_ERR_NEWLINE_NOT_ALLOWED);\n        }\n        break;\n      }\n      case LIT_CHAR_TAB:\n      {\n        column = align_column_to_tab (column);\n         /* Subtract -1 because column is increased below. */\n        column--;\n        break;\n      }\n      case LIT_CHAR_LEFT_SQUARE:\n      {\n        in_class = true;\n        break;\n      }\n      case LIT_CHAR_RIGHT_SQUARE:\n      {\n        in_class = false;\n        break;\n      }\n      case LIT_CHAR_BACKSLASH:\n      {\n        if (source_p + 1 >= source_end_p)\n        {\n          parser_raise_error (context_p, PARSER_ERR_UNTERMINATED_REGEXP);\n        }\n\n        if (source_p[1] >= 0x20 && source_p[1] <= LIT_UTF8_1_BYTE_CODE_POINT_MAX)\n        {\n          source_p++;\n          column++;\n        }\n      }\n    }\n\n    source_p++;\n    column++;\n\n    while (source_p < source_end_p\n           && IS_UTF8_INTERMEDIATE_OCTET (source_p[0]))\n    {\n      source_p++;\n    }\n  }\n\n  current_flags = 0;\n  while (source_p < source_end_p)\n  {\n    uint32_t flag = 0;\n\n    if (source_p[0] == LIT_CHAR_LOWERCASE_G)\n    {\n      flag = RE_FLAG_GLOBAL;\n    }\n    else if (source_p[0] == LIT_CHAR_LOWERCASE_I)\n    {\n      flag = RE_FLAG_IGNORE_CASE;\n    }\n    else if (source_p[0] == LIT_CHAR_LOWERCASE_M)\n    {\n      flag = RE_FLAG_MULTILINE;\n    }\n    else if (source_p[0] == LIT_CHAR_LOWERCASE_U)\n    {\n      flag = RE_FLAG_UNICODE;\n    }\n    else if (source_p[0] == LIT_CHAR_LOWERCASE_Y)\n    {\n      flag = RE_FLAG_STICKY;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (source_p[0] == LIT_CHAR_LOWERCASE_S)\n    {\n      flag = RE_FLAG_DOTALL;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (flag == 0)\n    {\n      break;\n    }\n\n    if (current_flags & flag)\n    {\n      parser_raise_error (context_p, PARSER_ERR_DUPLICATED_REGEXP_FLAG);\n    }\n\n    current_flags = (uint16_t) (current_flags | flag);\n    source_p++;\n    column++;\n  }\n\n  context_p->source_p = source_p;\n  context_p->column = column;\n\n  if (source_p < source_end_p && lexer_parse_identifier (context_p, LEXER_PARSE_CHECK_PART_AND_RETURN))\n  {\n    parser_raise_error (context_p, PARSER_ERR_UNKNOWN_REGEXP_FLAG);\n  }\n\n  length = (lit_utf8_size_t) (regex_end_p - regex_start_p);\n  if (length > PARSER_MAXIMUM_STRING_LENGTH)\n  {\n    parser_raise_error (context_p, PARSER_ERR_REGEXP_TOO_LONG);\n  }\n\n  context_p->column = column;\n  context_p->source_p = source_p;\n\n  if (parse_only)\n  {\n    return;\n  }\n\n  if (context_p->literal_count >= PARSER_MAXIMUM_NUMBER_OF_LITERALS)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LITERAL_LIMIT_REACHED);\n  }\n\n  /* Compile the RegExp literal and store the RegExp bytecode pointer */\n  ecma_string_t *pattern_str_p = NULL;\n\n  if (lit_is_valid_cesu8_string (regex_start_p, length))\n  {\n    pattern_str_p = ecma_new_ecma_string_from_utf8 (regex_start_p, length);\n  }\n  else\n  {\n    JERRY_ASSERT (lit_is_valid_utf8_string (regex_start_p, length));\n    pattern_str_p = ecma_new_ecma_string_from_utf8_converted_to_cesu8 (regex_start_p, length);\n  }\n\n  re_compiled_code_t *re_bytecode_p = re_compile_bytecode (pattern_str_p, current_flags);\n  ecma_deref_ecma_string (pattern_str_p);\n\n  if (JERRY_UNLIKELY (re_bytecode_p == NULL))\n  {\n    parser_raise_error (context_p, PARSER_ERR_INVALID_REGEXP);\n  }\n\n  lexer_literal_t *literal_p = (lexer_literal_t *) parser_list_append (context_p, &context_p->literal_pool);\n  literal_p->u.bytecode_p = (ecma_compiled_code_t *) re_bytecode_p;\n  literal_p->type = LEXER_REGEXP_LITERAL;\n  literal_p->prop.length = (prop_length_t) length;\n  literal_p->status_flags = 0;\n\n  context_p->token.type = LEXER_LITERAL;\n  context_p->token.lit_location.type = LEXER_REGEXP_LITERAL;\n\n  context_p->lit_object.literal_p = literal_p;\n  context_p->lit_object.index = context_p->literal_count++;\n#else /* !ENABLED (JERRY_BUILTIN_REGEXP) */\n  JERRY_UNUSED (parse_only);\n  parser_raise_error (context_p, PARSER_ERR_UNSUPPORTED_REGEXP);\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n} /* lexer_construct_regexp_object */\n\n/**\n * Next token must be an identifier.\n */\nvoid\nlexer_expect_identifier (parser_context_t *context_p, /**< context */\n                         uint8_t literal_type) /**< literal type */\n{\n  JERRY_ASSERT (literal_type == LEXER_STRING_LITERAL\n                || literal_type == LEXER_IDENT_LITERAL\n                || literal_type == LEXER_NEW_IDENT_LITERAL);\n\n  lexer_skip_spaces (context_p);\n  context_p->token.keyword_type = LEXER_EOS;\n  context_p->token.line = context_p->line;\n  context_p->token.column = context_p->column;\n\n  if (context_p->source_p < context_p->source_end_p\n      && lexer_parse_identifier (context_p, (literal_type != LEXER_STRING_LITERAL ? LEXER_PARSE_CHECK_KEYWORDS\n                                                                                  : LEXER_PARSE_NO_OPTS)))\n  {\n    if (context_p->token.type == LEXER_LITERAL)\n    {\n      JERRY_ASSERT (context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n      lexer_construct_literal_object (context_p,\n                                      &context_p->token.lit_location,\n                                      literal_type);\n\n      if (literal_type != LEXER_STRING_LITERAL\n          && (context_p->status_flags & PARSER_IS_STRICT))\n      {\n        if (context_p->token.keyword_type == LEXER_KEYW_EVAL)\n        {\n          parser_raise_error (context_p, PARSER_ERR_EVAL_NOT_ALLOWED);\n        }\n        else if (context_p->token.keyword_type == LEXER_KEYW_ARGUMENTS)\n        {\n          parser_raise_error (context_p, PARSER_ERR_ARGUMENTS_NOT_ALLOWED);\n        }\n      }\n      return;\n    }\n  }\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  else if (context_p->status_flags & PARSER_MODULE_DEFAULT_CLASS_OR_FUNC)\n  {\n    /* When parsing default exports for modules, it is not required by functions or classes to have identifiers.\n     * In this case we use a synthetic name for them. */\n    context_p->token.type = LEXER_LITERAL;\n    context_p->token.lit_location = lexer_default_literal;\n    lexer_construct_literal_object (context_p, &context_p->token.lit_location, literal_type);\n    context_p->status_flags &= (uint32_t) ~(PARSER_MODULE_DEFAULT_CLASS_OR_FUNC);\n    return;\n  }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n#if ENABLED (JERRY_ESNEXT)\n  if (context_p->token.type == LEXER_KEYW_YIELD)\n  {\n    parser_raise_error (context_p, PARSER_ERR_YIELD_NOT_ALLOWED);\n  }\n  if (context_p->token.type == LEXER_KEYW_AWAIT)\n  {\n    parser_raise_error (context_p, PARSER_ERR_AWAIT_NOT_ALLOWED);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n} /* lexer_expect_identifier */\n\n/**\n * Next token must be an identifier.\n */\nvoid\nlexer_expect_object_literal_id (parser_context_t *context_p, /**< context */\n                                uint32_t ident_opts) /**< lexer_obj_ident_opts_t option bits */\n{\n  lexer_skip_spaces (context_p);\n\n  if (context_p->source_p >= context_p->source_end_p)\n  {\n    parser_raise_error (context_p, PARSER_ERR_PROPERTY_IDENTIFIER_EXPECTED);\n  }\n\n  context_p->token.keyword_type = LEXER_EOS;\n  context_p->token.line = context_p->line;\n  context_p->token.column = context_p->column;\n  bool create_literal_object = false;\n\n  JERRY_ASSERT ((ident_opts & LEXER_OBJ_IDENT_CLASS_IDENTIFIER)\n                || !(ident_opts & LEXER_OBJ_IDENT_CLASS_NO_STATIC));\n\n  if (lexer_parse_identifier (context_p, LEXER_PARSE_NO_OPTS))\n  {\n    if (!(ident_opts & (LEXER_OBJ_IDENT_ONLY_IDENTIFIERS | LEXER_OBJ_IDENT_OBJECT_PATTERN)))\n    {\n      lexer_skip_spaces (context_p);\n      context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);\n\n      if (context_p->source_p < context_p->source_end_p\n#if ENABLED (JERRY_ESNEXT)\n          && context_p->source_p[0] != LIT_CHAR_COMMA\n          && context_p->source_p[0] != LIT_CHAR_RIGHT_BRACE\n          && context_p->source_p[0] != LIT_CHAR_LEFT_PAREN\n          && context_p->source_p[0] != LIT_CHAR_SEMICOLON\n          && context_p->source_p[0] != LIT_CHAR_EQUALS\n#endif /* ENABLED (JERRY_ESNEXT) */\n          && context_p->source_p[0] != LIT_CHAR_COLON)\n      {\n        if (lexer_compare_literal_to_string (context_p, \"get\", 3))\n        {\n          context_p->token.type = LEXER_PROPERTY_GETTER;\n          return;\n        }\n\n        if (lexer_compare_literal_to_string (context_p, \"set\", 3))\n        {\n          context_p->token.type = LEXER_PROPERTY_SETTER;\n          return;\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        if (lexer_compare_literal_to_string (context_p, \"async\", 5))\n        {\n          context_p->token.type = LEXER_KEYW_ASYNC;\n          return;\n        }\n\n        if (ident_opts & LEXER_OBJ_IDENT_CLASS_NO_STATIC)\n        {\n          if (lexer_compare_literal_to_string (context_p, \"static\", 6))\n          {\n            context_p->token.type = LEXER_KEYW_STATIC;\n          }\n          return;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n    }\n\n    create_literal_object = true;\n  }\n  else\n  {\n    switch (context_p->source_p[0])\n    {\n      case LIT_CHAR_DOUBLE_QUOTE:\n      case LIT_CHAR_SINGLE_QUOTE:\n      {\n        lexer_parse_string (context_p, LEXER_STRING_NO_OPTS);\n        create_literal_object = true;\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case LIT_CHAR_LEFT_SQUARE:\n      {\n        lexer_consume_next_character (context_p);\n\n        lexer_next_token (context_p);\n        parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n        if (context_p->token.type != LEXER_RIGHT_SQUARE)\n        {\n          parser_raise_error (context_p, PARSER_ERR_RIGHT_SQUARE_EXPECTED);\n        }\n        return;\n      }\n      case LIT_CHAR_ASTERISK:\n      {\n        if (ident_opts & (LEXER_OBJ_IDENT_ONLY_IDENTIFIERS | LEXER_OBJ_IDENT_OBJECT_PATTERN))\n        {\n          break;\n        }\n\n        context_p->token.type = LEXER_MULTIPLY;\n        lexer_consume_next_character (context_p);\n        return;\n      }\n      case LIT_CHAR_DOT:\n      {\n        if ((ident_opts & ((uint32_t) ~LEXER_OBJ_IDENT_OBJECT_PATTERN))\n            || context_p->source_p + 2 >= context_p->source_end_p\n            || context_p->source_p[1] != LIT_CHAR_DOT\n            || context_p->source_p[2] != LIT_CHAR_DOT)\n        {\n          break;\n        }\n\n        context_p->token.type = LEXER_THREE_DOTS;\n        context_p->token.flags &= (uint8_t) ~LEXER_NO_SKIP_SPACES;\n        PARSER_PLUS_EQUAL_LC (context_p->column, 3);\n        context_p->source_p += 3;\n        return;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case LIT_CHAR_RIGHT_BRACE:\n      {\n        if (ident_opts & LEXER_OBJ_IDENT_ONLY_IDENTIFIERS)\n        {\n          break;\n        }\n\n        context_p->token.type = LEXER_RIGHT_BRACE;\n        lexer_consume_next_character (context_p);\n        return;\n      }\n      default:\n      {\n        const uint8_t *char_p = context_p->source_p;\n\n        if (char_p[0] == LIT_CHAR_DOT)\n        {\n          char_p++;\n        }\n\n        if (char_p < context_p->source_end_p\n            && char_p[0] >= LIT_CHAR_0\n            && char_p[0] <= LIT_CHAR_9)\n        {\n          lexer_parse_number (context_p);\n\n          if (!(ident_opts & LEXER_OBJ_IDENT_CLASS_IDENTIFIER))\n          {\n            lexer_construct_number_object (context_p, false, false);\n          }\n          return;\n        }\n        break;\n      }\n    }\n  }\n\n  if (create_literal_object)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (ident_opts & LEXER_OBJ_IDENT_CLASS_IDENTIFIER)\n    {\n      return;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    lexer_construct_literal_object (context_p,\n                                    &context_p->token.lit_location,\n                                    LEXER_STRING_LITERAL);\n    return;\n  }\n\n  parser_raise_error (context_p, PARSER_ERR_PROPERTY_IDENTIFIER_EXPECTED);\n} /* lexer_expect_object_literal_id */\n\n/**\n * Read next token without checking keywords\n *\n * @return true if the next literal is identifier, false otherwise\n */\nbool\nlexer_scan_identifier (parser_context_t *context_p) /**< context */\n{\n  lexer_skip_spaces (context_p);\n  context_p->token.keyword_type = LEXER_EOS;\n  context_p->token.line = context_p->line;\n  context_p->token.column = context_p->column;\n\n  if (context_p->source_p < context_p->source_end_p\n      && lexer_parse_identifier (context_p, LEXER_PARSE_NO_OPTS))\n  {\n    return true;\n  }\n\n  context_p->token.flags |= LEXER_NO_SKIP_SPACES;\n  lexer_next_token (context_p);\n  return false;\n} /* lexer_scan_identifier */\n\n/**\n * Check whether the identifier is a modifier in a property definition.\n */\nvoid\nlexer_check_property_modifier (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (!(context_p->token.flags & LEXER_NO_SKIP_SPACES));\n  JERRY_ASSERT (context_p->token.type = LEXER_LITERAL\n                && context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n  lexer_skip_spaces (context_p);\n  context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);\n\n  if (context_p->source_p >= context_p->source_end_p\n#if ENABLED (JERRY_ESNEXT)\n      || context_p->source_p[0] == LIT_CHAR_COMMA\n      || context_p->source_p[0] == LIT_CHAR_RIGHT_BRACE\n      || context_p->source_p[0] == LIT_CHAR_LEFT_PAREN\n      || context_p->source_p[0] == LIT_CHAR_EQUALS\n#endif /* ENABLED (JERRY_ESNEXT) */\n      || context_p->source_p[0] == LIT_CHAR_COLON)\n  {\n    return;\n  }\n\n  if (lexer_compare_literal_to_string (context_p, \"get\", 3))\n  {\n    context_p->token.type = LEXER_PROPERTY_GETTER;\n    return;\n  }\n\n  if (lexer_compare_literal_to_string (context_p, \"set\", 3))\n  {\n    context_p->token.type = LEXER_PROPERTY_SETTER;\n    return;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (lexer_compare_literal_to_string (context_p, \"async\", 5))\n  {\n    context_p->token.type = LEXER_KEYW_ASYNC;\n    return;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* lexer_check_property_modifier */\n\n/**\n * Compares two identifiers.\n *\n * Note:\n *   Escape sequences are allowed in the left identifier, but not in the right\n *\n * @return true if the two identifiers are the same\n */\nstatic bool\nlexer_compare_identifier_to_chars (const uint8_t *left_p, /**< left identifier */\n                                   const uint8_t *right_p, /**< right identifier string */\n                                   size_t size) /**< byte size of the two identifiers */\n{\n  uint8_t utf8_buf[6];\n\n  do\n  {\n    if (*left_p == *right_p)\n    {\n      left_p++;\n      right_p++;\n      size--;\n      continue;\n    }\n\n    size_t escape_size;\n\n    if (*left_p == LIT_CHAR_BACKSLASH)\n    {\n      left_p += 2;\n      lit_code_point_t code_point = lexer_unchecked_hex_to_character (&left_p);\n\n      escape_size = lit_code_point_to_cesu8_bytes (utf8_buf, code_point);\n    }\n    else if (*left_p >= LIT_UTF8_4_BYTE_MARKER)\n    {\n      lit_four_byte_utf8_char_to_cesu8 (utf8_buf, left_p);\n      escape_size = 3 * 2;\n      left_p += 4;\n    }\n    else\n    {\n      return false;\n    }\n\n    size -= escape_size;\n\n    uint8_t *utf8_p = utf8_buf;\n    do\n    {\n      if (*right_p++ != *utf8_p++)\n      {\n        return false;\n      }\n    }\n    while (--escape_size > 0);\n  }\n  while (size > 0);\n\n  return true;\n} /* lexer_compare_identifier_to_chars */\n\n/**\n * Compares an identifier to a string.\n *\n * Note:\n *   Escape sequences are allowed in the left identifier, but not in the right\n *\n * @return true if the identifier equals to string\n */\nbool\nlexer_compare_identifier_to_string (const lexer_lit_location_t *left_p, /**< left literal */\n                                    const uint8_t *right_p, /**< right identifier string */\n                                    size_t size) /**< byte size of the right identifier */\n{\n  if (left_p->length != size)\n  {\n    return false;\n  }\n\n  if (!left_p->has_escape)\n  {\n    return memcmp (left_p->char_p, right_p, size) == 0;\n  }\n\n  return lexer_compare_identifier_to_chars (left_p->char_p, right_p, size);\n} /* lexer_compare_identifier_to_string */\n\n/**\n * Compares two identifiers.\n *\n * Note:\n *   Escape sequences are allowed in both identifiers\n *\n * @return true if the two identifiers are the same\n */\nbool\nlexer_compare_identifiers (parser_context_t *context_p, /**< context */\n                           const lexer_lit_location_t *left_p, /**< left literal */\n                           const lexer_lit_location_t *right_p) /**< right literal */\n{\n  prop_length_t length = left_p->length;\n\n  if (length != right_p->length)\n  {\n    return false;\n  }\n\n  if (!left_p->has_escape)\n  {\n    return lexer_compare_identifier_to_chars (right_p->char_p, left_p->char_p, length);\n  }\n\n  if (!right_p->has_escape)\n  {\n    return lexer_compare_identifier_to_chars (left_p->char_p, right_p->char_p, length);\n  }\n\n  uint8_t buf_p[64];\n\n  if (length <= 64)\n  {\n    lexer_convert_ident_to_cesu8 (buf_p, left_p->char_p, length);\n    return lexer_compare_identifier_to_chars (right_p->char_p, buf_p, length);\n  }\n\n  uint8_t *dynamic_buf_p = parser_malloc (context_p, length);\n\n  lexer_convert_ident_to_cesu8 (dynamic_buf_p, left_p->char_p, length);\n  bool result = lexer_compare_identifier_to_chars (right_p->char_p, dynamic_buf_p, length);\n  parser_free (dynamic_buf_p, length);\n\n  return result;\n} /* lexer_compare_identifiers */\n\n/**\n * Compares the current identifier in the context to the parameter identifier\n *\n * Note:\n *   Escape sequences are allowed.\n *\n * @return true if the input identifiers are the same\n */\nbool\nlexer_current_is_literal (parser_context_t *context_p, /**< context */\n                          const lexer_lit_location_t *right_ident_p) /**< identifier */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                && context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n  lexer_lit_location_t *left_ident_p = &context_p->token.lit_location;\n\n  JERRY_ASSERT (left_ident_p->length > 0 && right_ident_p->length > 0);\n\n  if (left_ident_p->length != right_ident_p->length)\n  {\n    return false;\n  }\n\n  if (!left_ident_p->has_escape && !right_ident_p->has_escape)\n  {\n    return memcmp (left_ident_p->char_p, right_ident_p->char_p, left_ident_p->length) == 0;\n  }\n\n  return lexer_compare_identifiers (context_p, left_ident_p, right_ident_p);\n} /* lexer_current_is_literal */\n\n/**\n * Compares the current string token to \"use strict\".\n *\n * Note:\n *   Escape sequences are not allowed.\n *\n * @return true if \"use strict\" is found, false otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\nlexer_string_is_use_strict (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                && context_p->token.lit_location.type == LEXER_STRING_LITERAL);\n\n  return (context_p->token.lit_location.length == 10\n          && !context_p->token.lit_location.has_escape\n          && memcmp (context_p->token.lit_location.char_p, \"use strict\", 10) == 0);\n} /* lexer_string_is_use_strict */\n\n/**\n * Checks whether the string before the current token is a directive or a string literal.\n *\n * @return true if the string is a directive, false otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\nlexer_string_is_directive (parser_context_t *context_p) /**< context */\n{\n  return (context_p->token.type == LEXER_SEMICOLON\n          || context_p->token.type == LEXER_RIGHT_BRACE\n          || context_p->token.type == LEXER_EOS\n          || ((context_p->token.flags & LEXER_WAS_NEWLINE)\n              && !LEXER_IS_BINARY_OP_TOKEN (context_p->token.type)\n              && context_p->token.type != LEXER_LEFT_PAREN\n              && context_p->token.type != LEXER_LEFT_SQUARE\n              && context_p->token.type != LEXER_DOT));\n} /* lexer_string_is_directive */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Compares the current token to an expected identifier.\n *\n * Note:\n *   Escape sequences are not allowed.\n *\n * @return true if they are the same, false otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\nlexer_token_is_identifier (parser_context_t *context_p, /**< context */\n                           const char *identifier_p, /**< identifier */\n                           size_t identifier_length) /**< identifier length */\n{\n  /* Checking has_escape is unnecessary because memcmp will fail if escape sequences are present. */\n  return (context_p->token.type == LEXER_LITERAL\n          && context_p->token.lit_location.type == LEXER_IDENT_LITERAL\n          && context_p->token.lit_location.length == identifier_length\n          && memcmp (context_p->token.lit_location.char_p, identifier_p, identifier_length) == 0);\n} /* lexer_token_is_identifier */\n\n/**\n * Compares the current identifier token to \"let\".\n *\n * Note:\n *   Escape sequences are not allowed.\n *\n * @return true if \"let\" is found, false otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\nlexer_token_is_let (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_LITERAL);\n\n  return (context_p->token.keyword_type == LEXER_KEYW_LET\n          && !context_p->token.lit_location.has_escape);\n} /* lexer_token_is_let */\n\n/**\n * Compares the current identifier token to \"async\".\n *\n * Note:\n *   Escape sequences are not allowed.\n *\n * @return true if \"async\" is found, false otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\nlexer_token_is_async (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                || context_p->token.type == LEXER_TEMPLATE_LITERAL);\n\n  return (context_p->token.keyword_type == LEXER_KEYW_ASYNC\n          && !context_p->token.lit_location.has_escape);\n} /* lexer_token_is_async */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Compares the current identifier or string to an expected string.\n *\n * Note:\n *   Escape sequences are not allowed.\n *\n * @return true if they are the same, false otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\nlexer_compare_literal_to_string (parser_context_t *context_p, /**< context */\n                                 const char *string_p, /**< string */\n                                 size_t string_length) /**< string length */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                && (context_p->token.lit_location.type == LEXER_IDENT_LITERAL\n                    || context_p->token.lit_location.type == LEXER_STRING_LITERAL));\n\n  /* Checking has_escape is unnecessary because memcmp will fail if escape sequences are present. */\n  return (context_p->token.lit_location.length == string_length\n          && memcmp (context_p->token.lit_location.char_p, string_p, string_length) == 0);\n} /* lexer_compare_literal_to_string */\n\n/**\n * Convert binary lvalue token to binary token\n * e.g. += -> +\n *      ^= -> ^\n *\n * @return binary token\n */\nuint8_t\nlexer_convert_binary_lvalue_token_to_binary (uint8_t token) /**< binary lvalue token */\n{\n  JERRY_ASSERT (LEXER_IS_BINARY_LVALUE_OP_TOKEN (token));\n  JERRY_ASSERT (token != LEXER_ASSIGN);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (token <= LEXER_ASSIGN_EXPONENTIATION)\n  {\n    return (uint8_t) (LEXER_ADD + (token - LEXER_ASSIGN_ADD));\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  if (token <= LEXER_ASSIGN_MODULO)\n  {\n    return (uint8_t) (LEXER_ADD + (token - LEXER_ASSIGN_ADD));\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (token <= LEXER_ASSIGN_UNS_RIGHT_SHIFT)\n  {\n    return (uint8_t) (LEXER_LEFT_SHIFT + (token - LEXER_ASSIGN_LEFT_SHIFT));\n  }\n\n  switch (token)\n  {\n    case LEXER_ASSIGN_BIT_AND:\n    {\n      return LEXER_BIT_AND;\n    }\n    case LEXER_ASSIGN_BIT_OR:\n    {\n      return LEXER_BIT_OR;\n    }\n    default:\n    {\n      JERRY_ASSERT (token == LEXER_ASSIGN_BIT_XOR);\n      return LEXER_BIT_XOR;\n    }\n  }\n} /* lexer_convert_binary_lvalue_token_to_binary */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_PARSER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-lexer.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JS_LEXER_H\n#define JS_LEXER_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_lexer Lexer\n * @{\n */\n\n/**\n * Lexer token types.\n */\ntypedef enum\n{\n  LEXER_EOS,                     /**< end of source */\n\n  /* Primary expressions */\n  LEXER_LITERAL,                 /**< literal token */\n  LEXER_KEYW_THIS,               /**< this */\n  LEXER_LIT_TRUE,                /**< true (not a keyword!) */\n  LEXER_LIT_FALSE,               /**< false (not a keyword!) */\n  LEXER_LIT_NULL,                /**< null (not a keyword!) */\n#if ENABLED (JERRY_ESNEXT)\n  LEXER_TEMPLATE_LITERAL,        /**< multi segment template literal */\n  LEXER_THREE_DOTS,              /**< ... (rest or spread operator) */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* Unary operators\n   * IMPORTANT: update CBC_UNARY_OP_TOKEN_TO_OPCODE and\n   *            CBC_UNARY_LVALUE_OP_TOKEN_TO_OPCODE after changes. */\n#define LEXER_IS_UNARY_OP_TOKEN(token_type) \\\n  ((token_type) >= LEXER_PLUS && (token_type) <= LEXER_DECREASE)\n#define LEXER_IS_UNARY_LVALUE_OP_TOKEN(token_type) \\\n  ((token_type) >= LEXER_KEYW_DELETE && (token_type) <= LEXER_DECREASE)\n\n  LEXER_PLUS,                    /**< \"+\" */\n  LEXER_NEGATE,                  /**< \"-\" */\n  LEXER_LOGICAL_NOT,             /**< \"!\" */\n  LEXER_BIT_NOT,                 /**< \"~\" */\n  LEXER_KEYW_VOID,               /**< void */\n  LEXER_KEYW_TYPEOF,             /**< typeof */\n#if ENABLED (JERRY_ESNEXT)\n  LEXER_KEYW_AWAIT,              /**< await */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  LEXER_KEYW_DELETE,             /**< delete */\n  LEXER_INCREASE,                /**< \"++\" */\n  LEXER_DECREASE,                /**< \"--\" */\n\n  /* Binary operators\n   * IMPORTANT: update CBC_BINARY_OP_TOKEN_TO_OPCODE,\n   *            CBC_BINARY_LVALUE_OP_TOKEN_TO_OPCODE and\n   *            parser_binary_precedence_table after changes. */\n/**\n * Index of first binary operation opcode.\n */\n#define LEXER_FIRST_BINARY_OP LEXER_ASSIGN\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Index of last binary operation opcode.\n */\n#define LEXER_LAST_BINARY_OP LEXER_EXPONENTIATION\n#else /* !ENABLED (JERRY_ESNEXT) */\n/**\n * Index of last binary operation opcode.\n */\n#define LEXER_LAST_BINARY_OP LEXER_MODULO\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Checks whether the token is a binary operation token.\n */\n#define LEXER_IS_BINARY_OP_TOKEN(token_type) \\\n  ((token_type) >= LEXER_FIRST_BINARY_OP && (token_type) <= LEXER_LAST_BINARY_OP)\n/**\n * Checks whether the token is an lvalue (assignment) operation token.\n */\n#define LEXER_IS_BINARY_LVALUE_OP_TOKEN(token_type) \\\n  ((token_type) >= LEXER_ASSIGN && (token_type) <= LEXER_ASSIGN_BIT_XOR)\n/**\n * Checks whether the token is a non-lvalue (assignment) operation token.\n */\n#define LEXER_IS_BINARY_NON_LVALUE_OP_TOKEN(token_type) \\\n  ((token_type) >= LEXER_QUESTION_MARK && (token_type) <= LEXER_LAST_BINARY_OP)\n\n  LEXER_ASSIGN,                  /**< \"=\" (prec: 3) */\n  LEXER_ASSIGN_ADD,              /**< \"+=\" (prec: 3) */\n  LEXER_ASSIGN_SUBTRACT,         /**< \"-=\" (prec: 3) */\n  LEXER_ASSIGN_MULTIPLY,         /**< \"*=\" (prec: 3) */\n  LEXER_ASSIGN_DIVIDE,           /**< \"/=\" (prec: 3) */\n  LEXER_ASSIGN_MODULO,           /**< \"%=\" (prec: 3) */\n#if ENABLED (JERRY_ESNEXT)\n  LEXER_ASSIGN_EXPONENTIATION,   /**< \"**=\" (prec: 3) */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  LEXER_ASSIGN_LEFT_SHIFT,       /**< \"<<=\" (prec: 3) */\n  LEXER_ASSIGN_RIGHT_SHIFT,      /**< \">>=\" (prec: 3) */\n  LEXER_ASSIGN_UNS_RIGHT_SHIFT,  /**< \">>>=\" (prec: 3) */\n  LEXER_ASSIGN_BIT_AND,          /**< \"&=\" (prec: 3) */\n  LEXER_ASSIGN_BIT_OR,           /**< \"|=\" (prec: 3) */\n  LEXER_ASSIGN_BIT_XOR,          /**< \"^=\" (prec: 3) */\n  LEXER_QUESTION_MARK,           /**< \"?\" (prec: 4) */\n#if ENABLED (JERRY_ESNEXT)\n  LEXER_NULLISH_COALESCING,      /**< \"??\" (prec: 5) */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  LEXER_LOGICAL_OR,              /**< \"||\" (prec: 6) */\n  LEXER_LOGICAL_AND,             /**< \"&&\" (prec: 7) */\n  LEXER_BIT_OR,                  /**< \"|\" (prec: 8) */\n  LEXER_BIT_XOR,                 /**< \"^\" (prec: 9) */\n  LEXER_BIT_AND,                 /**< \"&\" (prec: 10) */\n  LEXER_EQUAL,                   /**< \"==\" (prec: 11) */\n  LEXER_NOT_EQUAL,               /**< \"!=\" (prec: 11) */\n  LEXER_STRICT_EQUAL,            /**< \"===\" (prec: 11) */\n  LEXER_STRICT_NOT_EQUAL,        /**< \"!==\" (prec: 11) */\n  LEXER_LESS,                    /**< \"<\" (prec: 12) */\n  LEXER_GREATER,                 /**< \">\" (prec: 12) */\n  LEXER_LESS_EQUAL,              /**< \"<=\" (prec: 12) */\n  LEXER_GREATER_EQUAL,           /**< \">=\" (prec: 12) */\n  LEXER_KEYW_IN,                 /**< in (prec: 12) */\n  LEXER_KEYW_INSTANCEOF,         /**< instanceof (prec: 12) */\n  LEXER_LEFT_SHIFT,              /**< \"<<\" (prec: 13) */\n  LEXER_RIGHT_SHIFT,             /**< \">>\" (prec: 13) */\n  LEXER_UNS_RIGHT_SHIFT,         /**< \">>>\" (prec: 13) */\n  LEXER_ADD,                     /**< \"+\" (prec: 14) */\n  LEXER_SUBTRACT,                /**< \"-\" (prec: 14) */\n  LEXER_MULTIPLY,                /**< \"*\" (prec: 15) */\n  LEXER_DIVIDE,                  /**< \"/\" (prec: 15) */\n  LEXER_MODULO,                  /**< \"%\" (prec: 15) */\n#if ENABLED (JERRY_ESNEXT)\n  LEXER_EXPONENTIATION,          /**< \"**\" (prec: 16) */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  LEXER_LEFT_BRACE,              /**< \"{\" */\n  LEXER_LEFT_PAREN,              /**< \"(\" */\n  LEXER_LEFT_SQUARE,             /**< \"[\" */\n  LEXER_RIGHT_BRACE,             /**< \"}\" */\n  LEXER_RIGHT_PAREN,             /**< \")\" */\n  LEXER_RIGHT_SQUARE,            /**< \"]\" */\n  LEXER_DOT,                     /**< \".\" */\n  LEXER_SEMICOLON,               /**< \";\" */\n  LEXER_COLON,                   /**< \":\" */\n  LEXER_COMMA,                   /**< \",\" */\n#if ENABLED (JERRY_ESNEXT)\n  LEXER_ARROW,                   /**< \"=>\" */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  LEXER_KEYW_BREAK,              /**< break */\n  LEXER_KEYW_DO,                 /**< do */\n  LEXER_KEYW_CASE,               /**< case  */\n  LEXER_KEYW_ELSE,               /**< else */\n  LEXER_KEYW_NEW,                /**< new */\n  LEXER_KEYW_VAR,                /**< var */\n  LEXER_KEYW_CATCH,              /**< catch */\n  LEXER_KEYW_FINALLY,            /**< finally */\n  LEXER_KEYW_RETURN,             /**< return */\n  LEXER_KEYW_CONTINUE,           /**< continue */\n  LEXER_KEYW_FOR,                /**< for */\n  LEXER_KEYW_SWITCH,             /**< switch */\n  LEXER_KEYW_WHILE,              /**< while */\n  LEXER_KEYW_DEBUGGER,           /**< debugger */\n  LEXER_KEYW_FUNCTION,           /**< function */\n  LEXER_KEYW_WITH,               /**< with */\n  LEXER_KEYW_DEFAULT,            /**< default */\n  LEXER_KEYW_IF,                 /**< if */\n  LEXER_KEYW_THROW,              /**< throw */\n  LEXER_KEYW_TRY,                /**< try */\n\n  LEXER_KEYW_CLASS,              /**< class */\n  LEXER_KEYW_EXTENDS,            /**< extends */\n  LEXER_KEYW_SUPER,              /**< super */\n  LEXER_KEYW_CONST,              /**< const */\n  LEXER_KEYW_EXPORT,             /**< export */\n  LEXER_KEYW_IMPORT,             /**< import */\n  LEXER_KEYW_ENUM,               /**< enum */\n\n  /* These are virtual tokens. */\n  LEXER_EXPRESSION_START,        /**< expression start */\n  LEXER_PROPERTY_GETTER,         /**< property getter function */\n  LEXER_PROPERTY_SETTER,         /**< property setter function */\n  LEXER_COMMA_SEP_LIST,          /**< comma separated bracketed expression list */\n#if ENABLED (JERRY_ESNEXT)\n  LEXER_ASSIGN_GROUP_EXPR,       /**< indetifier for the assignment is located in a group expression */\n  LEXER_ASSIGN_CONST,            /**< a const binding is reassigned */\n  LEXER_INVALID_PATTERN,         /**< special value for invalid destructuring pattern */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n  /* Keywords which are not keyword tokens. */\n#define LEXER_FIRST_NON_RESERVED_KEYWORD LEXER_KEYW_ASYNC\n  LEXER_KEYW_ASYNC,              /**< async */\n#else /* !ENABLED (JERRY_ESNEXT) */\n  /* Keywords which are not keyword tokens. */\n#define LEXER_FIRST_NON_RESERVED_KEYWORD LEXER_KEYW_EVAL\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* Keywords which cannot be assigned in strict mode. */\n#define LEXER_FIRST_NON_STRICT_ARGUMENTS LEXER_KEYW_EVAL\n  LEXER_KEYW_EVAL,               /**< eval */\n  LEXER_KEYW_ARGUMENTS,          /**< arguments */\n\n  /* Future strict reserved words: these keywords\n   * must form a group after non-reserved keywords. */\n#define LEXER_FIRST_FUTURE_STRICT_RESERVED_WORD LEXER_KEYW_IMPLEMENTS\n  LEXER_KEYW_IMPLEMENTS,         /**< implements */\n  LEXER_KEYW_PRIVATE,            /**< private */\n  LEXER_KEYW_PUBLIC,             /**< public */\n  LEXER_KEYW_INTERFACE,          /**< interface */\n  LEXER_KEYW_PACKAGE,            /**< package */\n  LEXER_KEYW_PROTECTED,          /**< protected */\n\n  /* Context dependent future strict reserved words:\n   * See also: ECMA-262 v6, 11.6.2.1 */\n  LEXER_KEYW_LET,                /**< let */\n  LEXER_KEYW_YIELD,              /**< yield */\n  LEXER_KEYW_STATIC,             /**< static */\n} lexer_token_type_t;\n\n#define LEXER_NEWLINE_LS_PS_BYTE_1 0xe2\n#define LEXER_NEWLINE_LS_PS_BYTE_23(source) \\\n  ((source)[1] == LIT_UTF8_2_BYTE_CODE_POINT_MIN && ((source)[2] | 0x1) == 0xa9)\n\n#define LEXER_IS_LEFT_BRACKET(type) \\\n  ((type) == LEXER_LEFT_BRACE || (type) == LEXER_LEFT_PAREN || (type) == LEXER_LEFT_SQUARE)\n\n#define LEXER_IS_RIGHT_BRACKET(type) \\\n  ((type) == LEXER_RIGHT_BRACE || (type) == LEXER_RIGHT_PAREN || (type) == LEXER_RIGHT_SQUARE)\n\n#define LEXER_UNARY_OP_TOKEN_TO_OPCODE(token_type) \\\n   ((((token_type) - LEXER_PLUS) * 2) + CBC_PLUS)\n\n#define LEXER_UNARY_LVALUE_OP_TOKEN_TO_OPCODE(token_type) \\\n   ((((token_type) - LEXER_INCREASE) * 6) + CBC_PRE_INCR)\n\n#define LEXER_BINARY_OP_TOKEN_TO_OPCODE(token_type) \\\n   ((cbc_opcode_t) ((((token_type) - LEXER_BIT_OR) * 3) + CBC_BIT_OR))\n\n#define LEXER_BINARY_LVALUE_OP_TOKEN_TO_OPCODE(token_type) \\\n   ((cbc_opcode_t) ((((token_type) - LEXER_ASSIGN_ADD) * 2) + CBC_ASSIGN_ADD))\n\n/**\n * Maximum local buffer size for identifiers which contains escape sequences.\n */\n#define LEXER_MAX_LITERAL_LOCAL_BUFFER_SIZE 48\n\n/**\n * Lexer newline flags.\n */\ntypedef enum\n{\n  LEXER_WAS_NEWLINE = (1u << 0),             /**< newline was seen */\n  LEXER_NO_SKIP_SPACES = (1u << 1)           /**< ignore skip spaces */\n} lexer_newline_flags_t;\n\n/**\n * Lexer object identifier parse options.\n */\ntypedef enum\n{\n  LEXER_OBJ_IDENT_NO_OPTS = 0,                  /**< no options */\n  LEXER_OBJ_IDENT_ONLY_IDENTIFIERS = (1u << 0), /**< only identifiers are accepted */\n  LEXER_OBJ_IDENT_CLASS_IDENTIFIER = (1u << 1), /**< expect identifier inside a class body */\n  LEXER_OBJ_IDENT_CLASS_NO_STATIC = (1u << 2),  /**< static keyword was not present before the identifier */\n  LEXER_OBJ_IDENT_OBJECT_PATTERN = (1u << 3),   /**< parse \"get\"/\"set\" as string literal in object pattern */\n} lexer_obj_ident_opts_t;\n\n/**\n * Lexer string options.\n */\ntypedef enum\n{\n  LEXER_STRING_NO_OPTS = (1u << 0),       /**< no options */\n  LEXER_STRING_RAW = (1u << 1),           /**< raw string ECMAScript v6, 11.8.6.1: TVR */\n} lexer_string_options_t;\n\n/**\n * Lexer number types.\n */\ntypedef enum\n{\n  LEXER_NUMBER_DECIMAL,                     /**< decimal number */\n  LEXER_NUMBER_HEXADECIMAL,                 /**< hexadecimal number */\n  LEXER_NUMBER_OCTAL,                       /**< octal number */\n  LEXER_NUMBER_BINARY,                      /**< binary number */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  LEXER_NUMBER_BIGINT,                      /**< bigint number */\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} lexer_number_type_t;\n\n/**\n * Lexer character (string / identifier) literal data.\n */\ntypedef struct\n{\n  const uint8_t *char_p;                     /**< start of identifier or string token */\n  prop_length_t length;                      /**< length or index of a literal */\n  uint8_t type;                              /**< type of the current literal */\n  uint8_t has_escape;                        /**< has escape sequences */\n} lexer_lit_location_t;\n\n/**\n * Lexer token.\n */\ntypedef struct\n{\n  uint8_t type;                              /**< token type */\n  uint8_t keyword_type;                      /**< keyword type for identifiers */\n  uint8_t extra_value;                       /**< helper value for different purposes */\n  uint8_t flags;                             /**< flag bits for the current token */\n  parser_line_counter_t line;                /**< token start line */\n  parser_line_counter_t column;              /**< token start column */\n  lexer_lit_location_t lit_location;         /**< extra data for character literals */\n} lexer_token_t;\n\n/**\n * Literal data set by lexer_construct_literal_object.\n */\ntypedef struct\n{\n  lexer_literal_t *literal_p;                /**< pointer to the literal object */\n  uint16_t index;                            /**< literal index */\n} lexer_lit_object_t;\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* !JS_LEXER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser-expr.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"js-parser-internal.h\"\n\n#if ENABLED (JERRY_PARSER)\n#include \"jcontext.h\"\n\n#include \"ecma-helpers.h\"\n#include \"lit-char-helpers.h\"\n#include \"js-parser-tagged-template-literal.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_expr Expression parser\n * @{\n */\n\n/**\n * Maximum precedence for right-to-left binary operation evaluation.\n */\n#define PARSER_RIGHT_TO_LEFT_ORDER_MAX_PRECEDENCE 7\n\n/**\n * Precedence for ternary operation.\n */\n#define PARSER_RIGHT_TO_LEFT_ORDER_TERNARY_PRECEDENCE 4\n\n/**\n * Precedence for exponentiation operation.\n */\n#define PARSER_RIGHT_TO_LEFT_ORDER_EXPONENTIATION 16\n\n/**\n * Value of grouping level increase and decrease.\n */\n#define PARSER_GROUPING_LEVEL_INCREASE 2\n\n/**\n * Precedence of the binary tokens.\n *\n * See also:\n *    lexer_token_type_t\n */\nstatic const uint8_t parser_binary_precedence_table[] =\n{\n  3, /**< \"=\" */\n  3, /**< \"+=\" */\n  3, /**< \"-=\" */\n  3, /**< \"*=\" */\n  3, /**< \"/=\" */\n  3, /**< \"=\" */\n  3, /**< \"<<=\" */\n  3, /**< \">>=\" */\n  3, /**< \">>>=\" */\n  3, /**< \"&=\" */\n  3, /**< \"|=\" */\n  3, /**< \"^=\" */\n#if ENABLED (JERRY_ESNEXT)\n  3, /**< \"**=\" */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  4, /**< \"?\"*/\n#if ENABLED (JERRY_ESNEXT)\n  5, /**< \"??\" */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  6, /**< \"||\" */\n  7, /**< \"&&\" */\n  8, /**< \"|\" */\n  9, /**< \"^\" */\n  10, /**< \"&\" */\n  11, /**< \"==\" */\n  11, /**< \"!=\" */\n  11, /**< \"===\" */\n  11, /**< \"!==\" */\n  12, /**< \"<\" */\n  12, /**< \">\" */\n  12, /**< \"<=\" */\n  12, /**< \">=\" */\n  12, /**< in */\n  12, /**< instanceof */\n  13, /**< \"<<\" */\n  13, /**< \">>\" */\n  13, /**< \">>>\" */\n  14, /**< \"+\" */\n  14, /**< \"-\" */\n  15, /**< \"*\" */\n  15, /**< \"/\" */\n  15, /**< \"%\" */\n#if ENABLED (JERRY_ESNEXT)\n  16, /**< \"**\" */\n#endif /* ENABLED (JERRY_ESNEXT) */\n};\n\n#if ENABLED (JERRY_ESNEXT)\nJERRY_STATIC_ASSERT (sizeof (parser_binary_precedence_table) == 39,\n                     parser_binary_precedence_table_should_have_39_values_in_es2015);\n#else /* !ENABLED (JERRY_ESNEXT) */\nJERRY_STATIC_ASSERT (sizeof (parser_binary_precedence_table) == 36,\n                     parser_binary_precedence_table_should_have_36_values_in_es51);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Generate byte code for operators with lvalue.\n */\nstatic inline void\nparser_push_result (parser_context_t *context_p) /**< context */\n{\n  if (CBC_NO_RESULT_OPERATION (context_p->last_cbc_opcode))\n  {\n    JERRY_ASSERT (CBC_SAME_ARGS (context_p->last_cbc_opcode, context_p->last_cbc_opcode + 1));\n\n    if ((context_p->last_cbc_opcode == CBC_POST_INCR\n         || context_p->last_cbc_opcode == CBC_POST_DECR)\n        && context_p->stack_depth >= context_p->stack_limit)\n    {\n      /* Stack limit is increased for CBC_POST_INCR_PUSH_RESULT\n       * and CBC_POST_DECR_PUSH_RESULT opcodes. Needed by vm.c. */\n      JERRY_ASSERT (context_p->stack_depth == context_p->stack_limit);\n\n      context_p->stack_limit++;\n\n      if (context_p->stack_limit > PARSER_MAXIMUM_STACK_LIMIT)\n      {\n        parser_raise_error (context_p, PARSER_ERR_STACK_LIMIT_REACHED);\n      }\n    }\n\n    context_p->last_cbc_opcode++;\n    parser_flush_cbc (context_p);\n  }\n} /* parser_push_result */\n\n/**\n * Check for invalid assignment for \"eval\" and \"arguments\"\n */\nstatic void\nparser_check_invalid_assign (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL);\n\n  if (JERRY_UNLIKELY (context_p->status_flags & PARSER_IS_STRICT))\n  {\n    if (context_p->last_cbc.literal_keyword_type == LEXER_KEYW_EVAL)\n    {\n      parser_raise_error (context_p, PARSER_ERR_EVAL_CANNOT_ASSIGNED);\n    }\n    else if (context_p->last_cbc.literal_keyword_type == LEXER_KEYW_ARGUMENTS)\n    {\n      parser_raise_error (context_p, PARSER_ERR_ARGUMENTS_CANNOT_ASSIGNED);\n    }\n  }\n} /* parser_check_invalid_assign */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Check and throw an error if the \"new.target\" is invalid as a left-hand side expression.\n */\nstatic void\nparser_check_invalid_new_target (parser_context_t *context_p, /**< parser context */\n                                 cbc_opcode_t opcode) /**< current opcode under parsing */\n{\n  /* new.target is an invalid left-hand side target */\n  if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_NEW_TARGET))\n  {\n    /* Make sure that the call side is a post/pre increment or an assignment expression.\n     * There should be no other ways the \"new.target\" expression should be here. */\n    JERRY_ASSERT ((opcode >= CBC_PRE_INCR && opcode <= CBC_POST_DECR)\n                  || (opcode == CBC_ASSIGN\n                      && (context_p->token.type == LEXER_ASSIGN\n                          || LEXER_IS_BINARY_LVALUE_OP_TOKEN (context_p->token.type))));\n\n    parser_raise_error (context_p, PARSER_ERR_NEW_TARGET_NOT_ALLOWED);\n  }\n} /* parser_check_invalid_new_target */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Emit identifier reference\n */\nstatic void\nparser_emit_ident_reference (parser_context_t *context_p, /**< context */\n                             uint16_t opcode) /* opcode */\n{\n  if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n  {\n    context_p->last_cbc_opcode = opcode;\n    return;\n  }\n\n  uint16_t literal_index;\n\n  if (context_p->last_cbc_opcode == CBC_PUSH_TWO_LITERALS)\n  {\n    context_p->last_cbc_opcode = CBC_PUSH_LITERAL;\n    literal_index = context_p->last_cbc.value;\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_THIS_LITERAL)\n  {\n    context_p->last_cbc_opcode = CBC_PUSH_THIS;\n    literal_index = context_p->last_cbc.literal_index;\n  }\n  else\n  {\n    JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_THREE_LITERALS);\n    context_p->last_cbc_opcode = CBC_PUSH_TWO_LITERALS;\n    literal_index = context_p->last_cbc.third_literal_index;\n  }\n\n  parser_emit_cbc_literal (context_p, opcode, literal_index);\n} /* parser_emit_ident_reference */\n\n/**\n * Generate byte code for operators with lvalue.\n */\nstatic void\nparser_emit_unary_lvalue_opcode (parser_context_t *context_p, /**< context */\n                                 cbc_opcode_t opcode) /**< opcode */\n{\n  if (PARSER_IS_PUSH_LITERALS_WITH_THIS (context_p->last_cbc_opcode)\n      && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL)\n  {\n    parser_check_invalid_assign (context_p);\n\n    uint16_t unary_opcode;\n\n    if (opcode == CBC_DELETE_PUSH_RESULT)\n    {\n      if (JERRY_UNLIKELY (context_p->status_flags & PARSER_IS_STRICT))\n      {\n        parser_raise_error (context_p, PARSER_ERR_DELETE_IDENT_NOT_ALLOWED);\n      }\n\n      unary_opcode = CBC_DELETE_IDENT_PUSH_RESULT;\n    }\n    else\n    {\n      JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_LITERAL, opcode + CBC_UNARY_LVALUE_WITH_IDENT));\n      unary_opcode = (uint16_t) (opcode + CBC_UNARY_LVALUE_WITH_IDENT);\n    }\n\n    parser_emit_ident_reference (context_p, unary_opcode);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (unary_opcode != CBC_DELETE_IDENT_PUSH_RESULT\n        && scanner_literal_is_const_reg (context_p, context_p->last_cbc.literal_index))\n    {\n      /* The current value must be read, but it cannot be changed. */\n      context_p->last_cbc_opcode = CBC_PUSH_LITERAL;\n      parser_emit_cbc_ext (context_p, CBC_EXT_THROW_ASSIGN_CONST_ERROR);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    return;\n  }\n\n  if (context_p->last_cbc_opcode == CBC_PUSH_PROP)\n  {\n    JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_PROP, opcode));\n    context_p->last_cbc_opcode = (uint16_t) opcode;\n    return;\n  }\n\n  if (PARSER_IS_PUSH_PROP_LITERAL (context_p->last_cbc_opcode))\n  {\n    context_p->last_cbc_opcode = PARSER_PUSH_PROP_LITERAL_TO_PUSH_LITERAL (context_p->last_cbc_opcode);\n  }\n  else\n  {\n    /* Invalid LeftHandSide expression. */\n    if (opcode == CBC_DELETE_PUSH_RESULT)\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER_PROP_LITERAL)\n          || context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER_PROP))\n      {\n        parser_emit_cbc_ext (context_p, CBC_EXT_THROW_REFERENCE_ERROR);\n        parser_emit_cbc (context_p, CBC_POP);\n        return;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      parser_emit_cbc (context_p, CBC_POP);\n      parser_emit_cbc (context_p, CBC_PUSH_TRUE);\n      return;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    parser_check_invalid_new_target (context_p, opcode);\n    parser_raise_error (context_p, PARSER_ERR_INVALID_LHS_POSTFIX_OP);\n#else /* ENABLED (JERRY_ESNEXT) */\n    parser_emit_cbc_ext (context_p, CBC_EXT_THROW_REFERENCE_ERROR);\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n\n  parser_emit_cbc (context_p, (uint16_t) opcode);\n} /* parser_emit_unary_lvalue_opcode */\n\n/**\n * Parse array literal.\n */\nstatic void\nparser_parse_array_literal (parser_context_t *context_p) /**< context */\n{\n  uint32_t pushed_items = 0;\n  uint16_t opcode = (uint16_t) CBC_ARRAY_APPEND;\n\n  JERRY_ASSERT (context_p->token.type == LEXER_LEFT_SQUARE);\n\n  parser_emit_cbc (context_p, CBC_CREATE_ARRAY);\n  lexer_next_token (context_p);\n\n  while (true)\n  {\n    if (context_p->token.type == LEXER_RIGHT_SQUARE)\n    {\n      if (pushed_items > 0)\n      {\n        parser_emit_cbc_call (context_p, opcode, pushed_items);\n      }\n      return;\n    }\n\n    pushed_items++;\n\n    if (context_p->token.type == LEXER_COMMA)\n    {\n      parser_emit_cbc (context_p, CBC_PUSH_ELISION);\n      lexer_next_token (context_p);\n    }\n    else\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->token.type == LEXER_THREE_DOTS)\n      {\n        opcode = (uint16_t) (PARSER_TO_EXT_OPCODE (CBC_EXT_SPREAD_ARRAY_APPEND));\n        pushed_items++;\n        lexer_next_token (context_p);\n        parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_SPREAD_ELEMENT);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n      if (context_p->last_cbc_opcode == CBC_PUSH_THIS)\n      {\n        parser_flush_cbc (context_p);\n      }\n\n      if (context_p->token.type == LEXER_COMMA)\n      {\n        lexer_next_token (context_p);\n      }\n      else if (context_p->token.type != LEXER_RIGHT_SQUARE)\n      {\n        parser_raise_error (context_p, PARSER_ERR_ARRAY_ITEM_SEPARATOR_EXPECTED);\n      }\n    }\n\n    if (pushed_items >= 64)\n    {\n      parser_emit_cbc_call (context_p, opcode, pushed_items);\n#if ENABLED (JERRY_ESNEXT)\n      opcode = (uint16_t) CBC_ARRAY_APPEND;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      pushed_items = 0;\n    }\n  }\n} /* parser_parse_array_literal */\n\n#if !ENABLED (JERRY_ESNEXT)\n/**\n * Object literal item types.\n */\ntypedef enum\n{\n  PARSER_OBJECT_PROPERTY_START,                /**< marks the start of the property list */\n  PARSER_OBJECT_PROPERTY_VALUE,                /**< value property */\n  PARSER_OBJECT_PROPERTY_GETTER,               /**< getter property */\n  PARSER_OBJECT_PROPERTY_SETTER,               /**< setter property */\n  PARSER_OBJECT_PROPERTY_BOTH_ACCESSORS,       /**< both getter and setter properties are set */\n} parser_object_literal_item_types_t;\n\n/**\n * Parse object literal.\n */\nstatic void\nparser_append_object_literal_item (parser_context_t *context_p, /**< context */\n                                   uint16_t item_index, /**< index of the item name */\n                                   parser_object_literal_item_types_t item_type) /**< type of the item */\n{\n  parser_stack_iterator_t iterator;\n  uint8_t *current_item_type_p;\n\n  iterator.current_p = context_p->stack.first_p;\n  iterator.current_position = context_p->stack.last_position;\n\n  while (true)\n  {\n    current_item_type_p = iterator.current_p->bytes + iterator.current_position - 1;\n\n    if (*current_item_type_p == PARSER_OBJECT_PROPERTY_START)\n    {\n      parser_stack_push_uint16 (context_p, item_index);\n      parser_stack_push_uint8 (context_p, (uint8_t) item_type);\n      return;\n    }\n\n    iterator.current_position--;\n    if (iterator.current_position == 0)\n    {\n      iterator.current_p = iterator.current_p->next_p;\n      iterator.current_position = PARSER_STACK_PAGE_SIZE;\n    }\n\n    uint32_t current_item_index = iterator.current_p->bytes[iterator.current_position - 1];\n\n    iterator.current_position--;\n    if (iterator.current_position == 0)\n    {\n      iterator.current_p = iterator.current_p->next_p;\n      iterator.current_position = PARSER_STACK_PAGE_SIZE;\n    }\n\n    current_item_index |= ((uint32_t) iterator.current_p->bytes[iterator.current_position - 1]) << 8;\n\n    iterator.current_position--;\n    if (iterator.current_position == 0)\n    {\n      iterator.current_p = iterator.current_p->next_p;\n      iterator.current_position = PARSER_STACK_PAGE_SIZE;\n    }\n\n    if (current_item_index == item_index)\n    {\n      if (item_type == PARSER_OBJECT_PROPERTY_VALUE\n          && *current_item_type_p == PARSER_OBJECT_PROPERTY_VALUE\n          && !(context_p->status_flags & PARSER_IS_STRICT))\n      {\n        return;\n      }\n\n      if (item_type == PARSER_OBJECT_PROPERTY_GETTER\n          && *current_item_type_p == PARSER_OBJECT_PROPERTY_SETTER)\n      {\n        break;\n      }\n\n      if (item_type == PARSER_OBJECT_PROPERTY_SETTER\n          && *current_item_type_p == PARSER_OBJECT_PROPERTY_GETTER)\n      {\n        break;\n      }\n\n      parser_raise_error (context_p, PARSER_ERR_OBJECT_PROPERTY_REDEFINED);\n    }\n  }\n\n  uint8_t *last_page_p = context_p->stack.first_p->bytes;\n\n  *current_item_type_p = PARSER_OBJECT_PROPERTY_BOTH_ACCESSORS;\n\n  if (current_item_type_p == (last_page_p + context_p->stack.last_position - 1))\n  {\n    context_p->stack_top_uint8 = PARSER_OBJECT_PROPERTY_BOTH_ACCESSORS;\n  }\n} /* parser_append_object_literal_item */\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n/** Forward definition of parse array initializer. */\nstatic void\nparser_parse_array_initializer (parser_context_t *context_p, parser_pattern_flags_t flags);\n\n/** Forward definition of parse object initializer. */\nstatic void\nparser_parse_object_initializer (parser_context_t *context_p, parser_pattern_flags_t flags);\n\n/**\n * Class literal parsing options.\n */\ntypedef enum\n{\n  PARSER_CLASS_LITERAL_NO_OPTS = 0,                   /**< no options are provided */\n  PARSER_CLASS_LITERAL_CTOR_PRESENT = (1 << 0),       /**< class constructor is present */\n  PARSER_CLASS_LITERAL_HERTIAGE_PRESENT = (1 << 1),   /**< class heritage is present */\n} parser_class_literal_opts_t;\n\n/**\n * Checks whether the current string or identifier literal is constructor\n *\n * @return true, if constructor and false otherwise\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\nparser_is_constructor_literal (parser_context_t *context_p) /**< context */\n{\n  return (LEXER_IS_IDENT_OR_STRING (context_p->token.lit_location.type)\n          && lexer_compare_literal_to_string (context_p, \"constructor\", 11));\n} /* parser_is_constructor_literal */\n\n/**\n * Parse class literal.\n *\n * @return true - if the class has static fields, false - otherwise\n */\nstatic bool\nparser_parse_class_body (parser_context_t *context_p, /**< context */\n                         parser_class_literal_opts_t opts) /**< class literal parsing options */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_LEFT_BRACE);\n\n  lexer_literal_t *ctor_literal_p = NULL;\n  lexer_literal_t *static_fields_literal_p = NULL;\n\n  if (opts & PARSER_CLASS_LITERAL_CTOR_PRESENT)\n  {\n    ctor_literal_p = lexer_construct_unused_literal (context_p);\n    parser_emit_cbc_literal (context_p, CBC_PUSH_LITERAL, (uint16_t) (context_p->literal_count++));\n  }\n  else if (opts & PARSER_CLASS_LITERAL_HERTIAGE_PRESENT)\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_IMPLICIT_CONSTRUCTOR_HERITAGE);\n  }\n  else\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_IMPLICIT_CONSTRUCTOR);\n  }\n\n  parser_emit_cbc_ext (context_p, CBC_EXT_INIT_CLASS);\n\n  bool is_static = false;\n  size_t fields_size = 0;\n  uint32_t computed_field_count = 0;\n\n  while (true)\n  {\n    if (!is_static)\n    {\n      lexer_skip_empty_statements (context_p);\n    }\n\n    lexer_expect_object_literal_id (context_p, (LEXER_OBJ_IDENT_CLASS_IDENTIFIER\n                                                | (is_static ? 0 : LEXER_OBJ_IDENT_CLASS_NO_STATIC)));\n\n    if (context_p->token.type == LEXER_RIGHT_BRACE)\n    {\n      JERRY_ASSERT (!is_static);\n      break;\n    }\n\n    if (context_p->token.type == LEXER_KEYW_STATIC)\n    {\n      JERRY_ASSERT (!is_static);\n      is_static = true;\n      continue;\n    }\n\n    if (!is_static && context_p->token.type == LEXER_LITERAL && parser_is_constructor_literal (context_p))\n    {\n      JERRY_ASSERT (!is_static);\n      JERRY_ASSERT (opts & PARSER_CLASS_LITERAL_CTOR_PRESENT);\n      JERRY_ASSERT (ctor_literal_p != NULL);\n\n      if (ctor_literal_p->type == LEXER_FUNCTION_LITERAL)\n      {\n        /* 14.5.1 */\n        parser_raise_error (context_p, PARSER_ERR_MULTIPLE_CLASS_CONSTRUCTORS);\n      }\n\n      uint32_t constructor_status_flags = (PARSER_FUNCTION_CLOSURE\n                                           | PARSER_ALLOW_SUPER\n                                           | PARSER_CLASS_CONSTRUCTOR\n                                           | PARSER_LEXICAL_ENV_NEEDED);\n\n      if (opts & PARSER_CLASS_LITERAL_HERTIAGE_PRESENT)\n      {\n        constructor_status_flags |= PARSER_ALLOW_SUPER_CALL;\n      }\n\n      if (context_p->status_flags & PARSER_INSIDE_WITH)\n      {\n        constructor_status_flags |= PARSER_INSIDE_WITH;\n      }\n\n      parser_flush_cbc (context_p);\n      ecma_compiled_code_t *compiled_code_p = parser_parse_function (context_p, constructor_status_flags);\n      ctor_literal_p->u.bytecode_p = compiled_code_p;\n      ctor_literal_p->type = LEXER_FUNCTION_LITERAL;\n      continue;\n    }\n\n    bool is_computed = false;\n\n    if (context_p->token.type == LEXER_PROPERTY_GETTER || context_p->token.type == LEXER_PROPERTY_SETTER)\n    {\n      uint16_t literal_index, function_literal_index;\n      bool is_getter = (context_p->token.type == LEXER_PROPERTY_GETTER);\n\n      uint32_t accessor_status_flags = PARSER_FUNCTION_CLOSURE | PARSER_ALLOW_SUPER;\n      accessor_status_flags |= (is_getter ? PARSER_IS_PROPERTY_GETTER : PARSER_IS_PROPERTY_SETTER);\n\n      lexer_expect_object_literal_id (context_p, LEXER_OBJ_IDENT_ONLY_IDENTIFIERS);\n      literal_index = context_p->lit_object.index;\n\n      if (context_p->token.type == LEXER_RIGHT_SQUARE)\n      {\n        is_computed = true;\n      }\n      else if (is_static)\n      {\n        if (LEXER_IS_IDENT_OR_STRING (context_p->token.lit_location.type)\n            && lexer_compare_identifier_to_string (&context_p->token.lit_location, (uint8_t *) \"prototype\", 9))\n        {\n          parser_raise_error (context_p, PARSER_ERR_CLASS_STATIC_PROTOTYPE);\n        }\n      }\n      else if (parser_is_constructor_literal (context_p))\n      {\n        JERRY_ASSERT (!is_static);\n        parser_raise_error (context_p, PARSER_ERR_CLASS_CONSTRUCTOR_AS_ACCESSOR);\n      }\n\n      function_literal_index = lexer_construct_function_object (context_p, accessor_status_flags);\n\n      parser_emit_cbc_literal (context_p,\n                               CBC_PUSH_LITERAL,\n                               literal_index);\n\n      JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_LITERAL);\n\n      cbc_ext_opcode_t opcode;\n\n      if (is_computed)\n      {\n        context_p->last_cbc.literal_index = function_literal_index;\n\n        if (is_getter)\n        {\n          opcode = is_static ? CBC_EXT_SET_STATIC_COMPUTED_GETTER : CBC_EXT_SET_COMPUTED_GETTER;\n        }\n        else\n        {\n          opcode = is_static ? CBC_EXT_SET_STATIC_COMPUTED_SETTER : CBC_EXT_SET_COMPUTED_SETTER;\n        }\n      }\n      else\n      {\n        context_p->last_cbc.value = function_literal_index;\n\n        if (is_getter)\n        {\n          opcode = is_static ? CBC_EXT_SET_STATIC_GETTER : CBC_EXT_SET_GETTER;\n        }\n        else\n        {\n          opcode = is_static ? CBC_EXT_SET_STATIC_SETTER : CBC_EXT_SET_SETTER;\n        }\n      }\n\n      if (is_computed)\n      {\n        parser_emit_cbc_ext (context_p, is_getter ? CBC_EXT_SET_COMPUTED_GETTER_NAME\n                                                  : CBC_EXT_SET_COMPUTED_SETTER_NAME);\n        parser_emit_cbc_ext (context_p, opcode);\n      }\n      else\n      {\n        parser_set_function_name (context_p, function_literal_index, literal_index, accessor_status_flags);\n        context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (opcode);\n      }\n\n      is_static = false;\n      continue;\n    }\n\n    uint32_t status_flags = PARSER_FUNCTION_CLOSURE | PARSER_ALLOW_SUPER;\n\n    if (context_p->token.type == LEXER_KEYW_ASYNC)\n    {\n      status_flags |= PARSER_IS_ASYNC_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n\n      if (!lexer_consume_generator (context_p))\n      {\n        lexer_expect_object_literal_id (context_p, LEXER_OBJ_IDENT_ONLY_IDENTIFIERS);\n      }\n    }\n\n    if (context_p->token.type == LEXER_MULTIPLY)\n    {\n      lexer_expect_object_literal_id (context_p, LEXER_OBJ_IDENT_ONLY_IDENTIFIERS);\n      status_flags |= PARSER_IS_GENERATOR_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n    }\n\n    if (context_p->token.type == LEXER_RIGHT_SQUARE)\n    {\n      is_computed = true;\n    }\n    else if (LEXER_IS_IDENT_OR_STRING (context_p->token.lit_location.type))\n    {\n      if (is_static)\n      {\n        if (lexer_compare_identifier_to_string (&context_p->token.lit_location, (uint8_t *) \"prototype\", 9))\n        {\n          parser_raise_error (context_p, PARSER_ERR_CLASS_STATIC_PROTOTYPE);\n        }\n      }\n      else if ((status_flags & (PARSER_IS_ASYNC_FUNCTION | PARSER_IS_GENERATOR_FUNCTION))\n               && lexer_compare_literal_to_string (context_p, \"constructor\", 11))\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_CLASS_CONSTRUCTOR);\n      }\n    }\n\n    if (!(status_flags & (PARSER_IS_ASYNC_FUNCTION | PARSER_IS_GENERATOR_FUNCTION)))\n    {\n      if (!lexer_check_next_character (context_p, LIT_CHAR_LEFT_PAREN))\n      {\n        /* Class field. */\n        if (fields_size == 0)\n        {\n          parser_stack_push_uint8 (context_p, PARSER_CLASS_FIELD_END);\n        }\n\n        scanner_range_t range;\n        uint8_t class_field_type = is_static ? PARSER_CLASS_FIELD_STATIC : 0;\n\n        if (!is_computed)\n        {\n          if (is_static && parser_is_constructor_literal (context_p))\n          {\n            parser_raise_error (context_p, PARSER_ERR_ARGUMENT_LIST_EXPECTED);\n          }\n\n          range.start_location.source_p = context_p->token.lit_location.char_p;\n          range.start_location.line = context_p->token.line;\n          range.start_location.column = context_p->token.column;\n          class_field_type |= PARSER_CLASS_FIELD_NORMAL;\n\n          if (context_p->token.lit_location.type == LEXER_STRING_LITERAL)\n          {\n            range.start_location.source_p--;\n          }\n        }\n        else\n        {\n          if (++computed_field_count > ECMA_INTEGER_NUMBER_MAX)\n          {\n            parser_raise_error (context_p, PARSER_ERR_TOO_MANY_CLASS_FIELDS);\n          }\n\n          if (is_static && static_fields_literal_p == NULL)\n          {\n            static_fields_literal_p = lexer_construct_unused_literal (context_p);\n            parser_emit_cbc_ext_literal (context_p,\n                                         CBC_EXT_PUSH_STATIC_COMPUTED_FIELD_FUNC,\n                                         (uint16_t) (context_p->literal_count++));\n          }\n          else\n          {\n            parser_emit_cbc_ext (context_p, (is_static ? CBC_EXT_ADD_STATIC_COMPUTED_FIELD\n                                                       : CBC_EXT_ADD_COMPUTED_FIELD));\n          }\n        }\n\n        if (lexer_consume_assign (context_p))\n        {\n          class_field_type |= PARSER_CLASS_FIELD_INITIALIZED;\n\n          if (context_p->next_scanner_info_p->source_p != context_p->source_p)\n          {\n            lexer_next_token (context_p);\n            parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n            parser_raise_error (context_p, PARSER_ERR_SEMICOLON_EXPECTED);\n          }\n\n          if (is_computed)\n          {\n            scanner_get_location (&range.start_location, context_p);\n          }\n\n          JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_CLASS_FIELD_INITIALIZER_END);\n          range.source_end_p = ((scanner_location_info_t *) context_p->next_scanner_info_p)->location.source_p;\n\n          scanner_set_location (context_p, &((scanner_location_info_t *) context_p->next_scanner_info_p)->location);\n          scanner_release_next (context_p, sizeof (scanner_location_info_t));\n          scanner_seek (context_p);\n\n          parser_stack_push (context_p, &range, sizeof (scanner_range_t));\n          fields_size += sizeof (scanner_range_t);\n        }\n        else\n        {\n          if (!(context_p->token.flags & LEXER_WAS_NEWLINE)\n              && !lexer_check_next_characters (context_p, LIT_CHAR_SEMICOLON, LIT_CHAR_RIGHT_BRACE))\n          {\n            lexer_next_token (context_p);\n            parser_raise_error (context_p, PARSER_ERR_SEMICOLON_EXPECTED);\n          }\n\n          if (!is_computed)\n          {\n            parser_stack_push (context_p, &range.start_location, sizeof (scanner_location_t));\n            fields_size += sizeof (scanner_location_t);\n          }\n        }\n\n        parser_stack_push_uint8 (context_p, class_field_type);\n        fields_size++;\n        is_static = false;\n        continue;\n      }\n\n      if (!is_computed)\n      {\n        if (context_p->token.lit_location.type != LEXER_NUMBER_LITERAL)\n        {\n          JERRY_ASSERT (context_p->token.lit_location.type == LEXER_IDENT_LITERAL\n                        || context_p->token.lit_location.type == LEXER_STRING_LITERAL);\n          lexer_construct_literal_object (context_p,\n                                          &context_p->token.lit_location,\n                                          LEXER_STRING_LITERAL);\n        }\n        else\n        {\n          lexer_construct_number_object (context_p, false, false);\n        }\n      }\n    }\n\n    uint16_t literal_index = context_p->lit_object.index;\n    uint16_t function_literal_index = lexer_construct_function_object (context_p, status_flags | PARSER_IS_METHOD);\n\n    parser_emit_cbc_literal (context_p,\n                             CBC_PUSH_LITERAL,\n                             function_literal_index);\n\n    if (is_computed)\n    {\n      parser_emit_cbc_ext (context_p, CBC_EXT_SET_COMPUTED_FUNCTION_NAME);\n      parser_emit_cbc_ext (context_p, is_static ? CBC_EXT_SET_STATIC_COMPUTED_PROPERTY\n                                                : CBC_EXT_SET_COMPUTED_PROPERTY);\n      is_static = false;\n      continue;\n    }\n\n    parser_set_function_name (context_p, function_literal_index, literal_index, 0);\n\n    JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_LITERAL);\n\n    context_p->last_cbc.value = literal_index;\n\n    if (is_static)\n    {\n      context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_SET_STATIC_PROPERTY_LITERAL);\n      is_static = false;\n    }\n    else\n    {\n      context_p->last_cbc_opcode = CBC_SET_LITERAL_PROPERTY;\n    }\n  }\n\n  if (fields_size == 0)\n  {\n    return false;\n  }\n\n  parser_reverse_class_fields (context_p, fields_size);\n\n  /* Since PARSER_IS_ARROW_FUNCTION and PARSER_CLASS_CONSTRUCTOR bits cannot\n   * be set at the same time, this bit combination triggers class field parsing. */\n\n  if (!(context_p->stack_top_uint8 & PARSER_CLASS_FIELD_STATIC))\n  {\n    lexer_literal_t *literal_p = lexer_construct_unused_literal (context_p);\n\n    uint16_t function_literal_index = (uint16_t) (context_p->literal_count++);\n    parser_emit_cbc_ext_literal (context_p, CBC_EXT_SET_FIELD_INIT, function_literal_index);\n    parser_flush_cbc (context_p);\n\n    literal_p->u.bytecode_p = parser_parse_class_fields (context_p);\n    literal_p->type = LEXER_FUNCTION_LITERAL;\n  }\n\n  bool has_static_field = false;\n\n  if (context_p->stack_top_uint8 & PARSER_CLASS_FIELD_STATIC)\n  {\n    if (static_fields_literal_p == NULL)\n    {\n      static_fields_literal_p = lexer_construct_unused_literal (context_p);\n      uint16_t function_literal_index = (uint16_t) (context_p->literal_count++);\n      parser_emit_cbc_ext_literal (context_p, CBC_EXT_PUSH_STATIC_FIELD_FUNC, function_literal_index);\n    }\n\n    parser_flush_cbc (context_p);\n    static_fields_literal_p->u.bytecode_p = parser_parse_class_fields (context_p);\n    static_fields_literal_p->type = LEXER_FUNCTION_LITERAL;\n\n    has_static_field = true;\n  }\n\n  parser_stack_pop_uint8 (context_p);\n  return has_static_field;\n} /* parser_parse_class_body */\n\n/**\n * Parse class statement or expression.\n */\nvoid\nparser_parse_class (parser_context_t *context_p, /**< context */\n                    bool is_statement) /**< true - if class is parsed as a statement\n                                        *   false - otherwise (as an expression) */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_CLASS);\n\n  uint16_t class_ident_index = PARSER_INVALID_LITERAL_INDEX;\n  uint16_t class_name_index = PARSER_INVALID_LITERAL_INDEX;\n  parser_class_literal_opts_t opts = PARSER_CLASS_LITERAL_NO_OPTS;\n\n  if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n  {\n    JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_CLASS_CONSTRUCTOR);\n    scanner_release_next (context_p, sizeof (scanner_info_t));\n    opts |= PARSER_CLASS_LITERAL_CTOR_PRESENT;\n  }\n\n  if (is_statement)\n  {\n    /* Class statement must contain an identifier. */\n    lexer_expect_identifier (context_p, LEXER_IDENT_LITERAL);\n    JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                  && context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n    if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n    {\n      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_ERR_REDECLARED);\n      parser_raise_error (context_p, PARSER_ERR_VARIABLE_REDECLARED);\n    }\n    class_ident_index = context_p->lit_object.index;\n\n    lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_NEW_IDENT_LITERAL);\n    context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_USED;\n    class_name_index = context_p->lit_object.index;\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    parser_module_append_export_name (context_p);\n    context_p->status_flags &= (uint32_t) ~(PARSER_MODULE_STORE_IDENT);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n    lexer_next_token (context_p);\n  }\n  else\n  {\n    lexer_next_token (context_p);\n\n    /* Class expression may contain an identifier. */\n    if (context_p->token.type == LEXER_LITERAL && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n    {\n      lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_NEW_IDENT_LITERAL);\n      context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_USED;\n      class_name_index = context_p->lit_object.index;\n      lexer_next_token (context_p);\n    }\n  }\n\n  if (class_name_index != PARSER_INVALID_LITERAL_INDEX)\n  {\n    if (JERRY_UNLIKELY (context_p->scope_stack_top >= context_p->scope_stack_size))\n    {\n      JERRY_ASSERT (context_p->scope_stack_size == PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK);\n      parser_raise_error (context_p, PARSER_ERR_SCOPE_STACK_LIMIT_REACHED);\n    }\n\n    parser_scope_stack_t *scope_stack_p = context_p->scope_stack_p + context_p->scope_stack_top;\n\n    PARSER_PLUS_EQUAL_U16 (context_p->scope_stack_top, 1);\n    scope_stack_p->map_from = class_name_index;\n    scope_stack_p->map_to = 0;\n\n    parser_emit_cbc_ext_literal (context_p, CBC_EXT_PUSH_NAMED_CLASS_ENV, class_name_index);\n  }\n  else\n  {\n    parser_emit_cbc (context_p, CBC_PUSH_UNDEFINED);\n  }\n\n  bool is_strict = (context_p->status_flags & PARSER_IS_STRICT) != 0;\n\n  /* 14.5. A ClassBody is always strict code. */\n  context_p->status_flags |= PARSER_IS_STRICT;\n\n  if (context_p->token.type == LEXER_KEYW_EXTENDS)\n  {\n    lexer_next_token (context_p);\n    parser_parse_expression (context_p, PARSE_EXPR | PARSE_EXPR_LEFT_HAND_SIDE);\n    opts |= PARSER_CLASS_LITERAL_HERTIAGE_PRESENT;\n  }\n  else\n  {\n    /* Elisions represents that the classHeritage is not present */\n    parser_emit_cbc (context_p, CBC_PUSH_ELISION);\n  }\n\n  if (context_p->token.type != LEXER_LEFT_BRACE)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_EXPECTED);\n  }\n\n  /* ClassDeclaration is parsed. Continue with class body. */\n  bool has_static_field = parser_parse_class_body (context_p, opts);\n\n  if (class_name_index != PARSER_INVALID_LITERAL_INDEX)\n  {\n    parser_emit_cbc_ext_literal (context_p, CBC_EXT_FINALIZE_NAMED_CLASS, class_name_index);\n    parser_emit_cbc_ext_literal (context_p, CBC_EXT_SET_CLASS_NAME, class_name_index);\n    PARSER_MINUS_EQUAL_U16 (context_p->scope_stack_top, 1);\n  }\n  else\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_FINALIZE_ANONYMOUS_CLASS);\n  }\n\n  if (has_static_field)\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_RUN_STATIC_FIELD_INIT);\n  }\n\n  if (is_statement)\n  {\n    cbc_opcode_t opcode = CBC_MOV_IDENT;\n\n    if (class_ident_index < PARSER_REGISTER_START)\n    {\n      opcode = (scanner_literal_is_created (context_p, class_ident_index) ? CBC_ASSIGN_LET_CONST\n                                                                          : CBC_INIT_LET);\n    }\n\n    parser_emit_cbc_literal (context_p, (uint16_t) opcode, class_ident_index);\n    parser_flush_cbc (context_p);\n  }\n\n  if (!is_strict)\n  {\n    /* Restore flag */\n    context_p->status_flags &= (uint32_t) ~PARSER_IS_STRICT;\n  }\n  context_p->status_flags &= (uint32_t) ~PARSER_ALLOW_SUPER;\n\n  lexer_next_token (context_p);\n} /* parser_parse_class */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Parse object initializer method definition.\n *\n * See also: ES2015 14.3\n */\nstatic void\nparser_parse_object_method (parser_context_t *context_p) /**< context */\n{\n  context_p->source_p--;\n  context_p->column--;\n  uint16_t function_literal_index = lexer_construct_function_object (context_p, (PARSER_FUNCTION_CLOSURE\n                                                                                 | PARSER_ALLOW_SUPER\n                                                                                 | PARSER_IS_METHOD));\n\n  parser_emit_cbc_literal (context_p,\n                           CBC_PUSH_LITERAL,\n                           function_literal_index);\n\n  context_p->last_cbc.literal_type = LEXER_FUNCTION_LITERAL;\n\n  lexer_next_token (context_p);\n} /* parser_parse_object_method */\n\n/**\n * Reparse the current literal as a common identifier.\n */\nstatic void\nparser_reparse_as_common_identifier (parser_context_t *context_p, /**< context */\n                                     parser_line_counter_t start_line, /**< start line */\n                                     parser_line_counter_t start_column) /**< start column */\n{\n  /* context_p->token.lit_location.char_p is showing the character after the string start,\n     so it is not suitable for reparsing as identifier.\n     e.g.: { 'foo' } */\n  if (context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n  {\n    parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n  }\n\n  context_p->source_p = context_p->token.lit_location.char_p;\n  context_p->line = start_line;\n  context_p->column = start_column;\n\n  lexer_next_token (context_p);\n\n  if (context_p->token.type != LEXER_LITERAL)\n  {\n    parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n  }\n\n  JERRY_ASSERT (context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n  lexer_construct_literal_object (context_p,\n                                  &context_p->token.lit_location,\n                                  LEXER_IDENT_LITERAL);\n\n} /* parser_reparse_as_common_identifier */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Parse object literal.\n */\nstatic void\nparser_parse_object_literal (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_LEFT_BRACE);\n\n  parser_emit_cbc (context_p, CBC_CREATE_OBJECT);\n\n#if !ENABLED (JERRY_ESNEXT)\n  parser_stack_push_uint8 (context_p, PARSER_OBJECT_PROPERTY_START);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n  bool proto_seen = false;\n  bool has_super_env = false;\n\n  if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n  {\n    JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS);\n\n    if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_SUPER)\n    {\n      parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_OBJECT_SUPER_ENVIRONMENT);\n      has_super_env = true;\n    }\n\n    scanner_release_next (context_p, sizeof (scanner_info_t));\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  while (true)\n  {\n    lexer_expect_object_literal_id (context_p, LEXER_OBJ_IDENT_NO_OPTS);\n\n    switch (context_p->token.type)\n    {\n      case LEXER_RIGHT_BRACE:\n      {\n        break;\n      }\n      case LEXER_PROPERTY_GETTER:\n      case LEXER_PROPERTY_SETTER:\n      {\n        uint32_t status_flags;\n        cbc_ext_opcode_t opcode;\n#if !ENABLED (JERRY_ESNEXT)\n        parser_object_literal_item_types_t item_type;\n#endif /* !ENABLED (JERRY_ESNEXT) */\n        bool is_getter = context_p->token.type == LEXER_PROPERTY_GETTER;\n\n        if (is_getter)\n        {\n          status_flags = PARSER_FUNCTION_CLOSURE | PARSER_IS_PROPERTY_GETTER;\n          opcode = CBC_EXT_SET_GETTER;\n#if !ENABLED (JERRY_ESNEXT)\n          item_type = PARSER_OBJECT_PROPERTY_GETTER;\n#endif /* !ENABLED (JERRY_ESNEXT) */\n        }\n        else\n        {\n          status_flags = PARSER_FUNCTION_CLOSURE | PARSER_IS_PROPERTY_SETTER;\n          opcode = CBC_EXT_SET_SETTER;\n#if !ENABLED (JERRY_ESNEXT)\n          item_type = PARSER_OBJECT_PROPERTY_SETTER;\n#endif /* !ENABLED (JERRY_ESNEXT) */\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        status_flags |= PARSER_ALLOW_SUPER;\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n        lexer_expect_object_literal_id (context_p, LEXER_OBJ_IDENT_ONLY_IDENTIFIERS);\n\n        /* This assignment is a nop for computed getters/setters. */\n        uint16_t literal_index = context_p->lit_object.index;\n\n#if ENABLED (JERRY_ESNEXT)\n        bool is_computed = context_p->token.type == LEXER_RIGHT_SQUARE;\n\n        if (is_computed)\n        {\n          opcode = ((opcode == CBC_EXT_SET_GETTER) ? CBC_EXT_SET_COMPUTED_GETTER\n                                                   : CBC_EXT_SET_COMPUTED_SETTER);\n        }\n#else /* !ENABLED (JERRY_ESNEXT) */\n        parser_append_object_literal_item (context_p, literal_index, item_type);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        uint16_t function_literal_index = lexer_construct_function_object (context_p, status_flags);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (opcode >= CBC_EXT_SET_COMPUTED_GETTER)\n        {\n          literal_index = function_literal_index;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        parser_emit_cbc_literal (context_p,\n                                 CBC_PUSH_LITERAL,\n                                 literal_index);\n\n        JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_LITERAL);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (is_computed)\n        {\n          parser_emit_cbc_ext (context_p, is_getter ? CBC_EXT_SET_COMPUTED_GETTER_NAME\n                                                    : CBC_EXT_SET_COMPUTED_SETTER_NAME);\n\n          if (has_super_env)\n          {\n            parser_emit_cbc_ext (context_p, CBC_EXT_OBJECT_LITERAL_SET_HOME_OBJECT_COMPUTED);\n          }\n          parser_emit_cbc_ext (context_p, opcode);\n          lexer_next_token (context_p);\n          break;\n        }\n\n        parser_set_function_name (context_p, function_literal_index, literal_index, status_flags);\n\n        if (has_super_env)\n        {\n          context_p->last_cbc_opcode = CBC_PUSH_TWO_LITERALS;\n          context_p->last_cbc.value = function_literal_index;\n          parser_emit_cbc_ext (context_p, CBC_EXT_OBJECT_LITERAL_SET_HOME_OBJECT_COMPUTED);\n          parser_emit_cbc_ext (context_p, is_getter ? CBC_EXT_SET_COMPUTED_GETTER\n                                                    : CBC_EXT_SET_COMPUTED_SETTER);\n        }\n        else\n#endif /* ENABLED (JERRY_ESNEXT) */\n        {\n          context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (opcode);\n          context_p->last_cbc.value = function_literal_index;\n        }\n\n        lexer_next_token (context_p);\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case LEXER_RIGHT_SQUARE:\n      {\n        lexer_next_token (context_p);\n\n        if (context_p->token.type == LEXER_LEFT_PAREN)\n        {\n          parser_parse_object_method (context_p);\n          JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_LITERAL);\n\n          if (parser_check_anonymous_function_declaration (context_p) < PARSER_NAMED_FUNCTION)\n          {\n            parser_emit_cbc_ext (context_p, CBC_EXT_SET_COMPUTED_FUNCTION_NAME);\n            if (has_super_env)\n            {\n              parser_emit_cbc_ext (context_p, CBC_EXT_OBJECT_LITERAL_SET_HOME_OBJECT_COMPUTED);\n            }\n            parser_emit_cbc_ext (context_p, CBC_EXT_SET_COMPUTED_PROPERTY);\n          }\n          else\n          {\n            context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_SET_COMPUTED_PROPERTY_LITERAL);\n          }\n\n          break;\n        }\n\n        if (context_p->token.type != LEXER_COLON)\n        {\n          parser_raise_error (context_p, PARSER_ERR_COLON_EXPECTED);\n        }\n\n        lexer_next_token (context_p);\n        parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n        if (parser_check_anonymous_function_declaration (context_p) < PARSER_NAMED_FUNCTION)\n        {\n          parser_emit_cbc_ext (context_p, CBC_EXT_SET_COMPUTED_FUNCTION_NAME);\n        }\n\n        if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n        {\n          context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_SET_COMPUTED_PROPERTY_LITERAL);\n        }\n        else\n        {\n          parser_emit_cbc_ext (context_p, CBC_EXT_SET_COMPUTED_PROPERTY);\n        }\n        break;\n      }\n      case LEXER_THREE_DOTS:\n      {\n        lexer_next_token (context_p);\n        parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n        parser_emit_cbc_ext (context_p, CBC_EXT_COPY_DATA_PROPERTIES);\n        break;\n      }\n      case LEXER_KEYW_ASYNC:\n      case LEXER_MULTIPLY:\n      {\n        uint32_t status_flags = PARSER_FUNCTION_CLOSURE;\n\n        if (context_p->token.type == LEXER_KEYW_ASYNC)\n        {\n          status_flags |= PARSER_IS_ASYNC_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n          lexer_consume_generator (context_p);\n        }\n\n        if (context_p->token.type == LEXER_MULTIPLY)\n        {\n          status_flags |= PARSER_IS_GENERATOR_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n        }\n\n        if (has_super_env)\n        {\n          status_flags |= PARSER_ALLOW_SUPER;\n        }\n\n        lexer_expect_object_literal_id (context_p, LEXER_OBJ_IDENT_ONLY_IDENTIFIERS);\n\n        uint16_t opcode = CBC_SET_LITERAL_PROPERTY;\n        /* This assignment is a nop for CBC_EXT_SET_COMPUTED_PROPERTY_LITERAL. */\n        uint16_t literal_index = context_p->lit_object.index;\n        bool is_computed = context_p->token.type == LEXER_RIGHT_SQUARE;\n\n        if (is_computed)\n        {\n          opcode = CBC_EXT_SET_COMPUTED_PROPERTY;\n        }\n\n        uint16_t function_literal_index = lexer_construct_function_object (context_p, status_flags);\n\n        parser_emit_cbc_literal (context_p,\n                                 CBC_PUSH_LITERAL,\n                                 function_literal_index);\n\n        JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_LITERAL);\n\n        if (is_computed)\n        {\n          parser_emit_cbc_ext (context_p, CBC_EXT_SET_COMPUTED_FUNCTION_NAME);\n          if (has_super_env)\n          {\n            parser_emit_cbc_ext (context_p, CBC_EXT_OBJECT_LITERAL_SET_HOME_OBJECT_COMPUTED);\n          }\n          parser_emit_cbc_ext (context_p, opcode);\n          lexer_next_token (context_p);\n          break;\n        }\n\n        parser_set_function_name (context_p, function_literal_index, literal_index, status_flags);\n\n        if (has_super_env)\n        {\n          parser_emit_cbc_ext (context_p, CBC_EXT_OBJECT_LITERAL_SET_HOME_OBJECT);\n          parser_emit_cbc_literal (context_p, CBC_SET_PROPERTY, literal_index);\n        }\n        else\n        {\n          context_p->last_cbc_opcode = opcode;\n          context_p->last_cbc.value = literal_index;\n        }\n\n        lexer_next_token (context_p);\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      default:\n      {\n#if ENABLED (JERRY_ESNEXT)\n        const lexer_lit_location_t *literal_p = (const lexer_lit_location_t *) context_p->lit_object.literal_p;\n        bool is_proto = ((context_p->token.lit_location.type == LEXER_IDENT_LITERAL\n                          || context_p->token.lit_location.type == LEXER_STRING_LITERAL)\n                         && lexer_compare_identifier_to_string (literal_p, (uint8_t *) \"__proto__\", 9)\n                         && lexer_check_next_character (context_p, LIT_CHAR_COLON));\n        if (is_proto)\n        {\n          if (proto_seen)\n          {\n            parser_raise_error (context_p, PARSER_ERR_DUPLICATED_PROTO);\n          }\n\n          proto_seen = true;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        uint16_t literal_index = context_p->lit_object.index;\n\n#if ENABLED (JERRY_ESNEXT)\n        parser_line_counter_t start_line = context_p->token.line;\n        parser_line_counter_t start_column = context_p->token.column;\n#else /* !ENABLED (JERRY_ESNEXT) */\n        parser_append_object_literal_item (context_p,\n                                           literal_index,\n                                           PARSER_OBJECT_PROPERTY_VALUE);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->token.type == LEXER_LEFT_PAREN && !is_proto)\n        {\n          parser_parse_object_method (context_p);\n\n          JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_LITERAL);\n          parser_set_function_name (context_p, context_p->last_cbc.literal_index, literal_index, 0);\n\n          if (has_super_env)\n          {\n            parser_emit_cbc_ext (context_p, CBC_EXT_OBJECT_LITERAL_SET_HOME_OBJECT);\n            parser_emit_cbc_literal (context_p, CBC_SET_PROPERTY, literal_index);\n            break;\n          }\n\n          context_p->last_cbc_opcode = CBC_SET_LITERAL_PROPERTY;\n          context_p->last_cbc.value = literal_index;\n          break;\n        }\n\n        if ((context_p->token.type == LEXER_RIGHT_BRACE || context_p->token.type == LEXER_COMMA)\n            && !is_proto)\n        {\n          parser_reparse_as_common_identifier (context_p, start_line, start_column);\n          parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_LITERAL);\n\n          context_p->last_cbc_opcode = CBC_SET_LITERAL_PROPERTY;\n          context_p->last_cbc.value = literal_index;\n\n          lexer_next_token (context_p);\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (context_p->token.type != LEXER_COLON)\n        {\n          parser_raise_error (context_p, PARSER_ERR_COLON_EXPECTED);\n        }\n\n        lexer_next_token (context_p);\n        parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (is_proto)\n        {\n          parser_emit_cbc_ext (context_p, CBC_EXT_SET__PROTO__);\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n        {\n#if ENABLED (JERRY_ESNEXT)\n          if (context_p->last_cbc.literal_type == LEXER_FUNCTION_LITERAL)\n          {\n            parser_set_function_name (context_p, context_p->last_cbc.literal_index, literal_index, 0);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          context_p->last_cbc_opcode = CBC_SET_LITERAL_PROPERTY;\n          context_p->last_cbc.value = literal_index;\n        }\n        else\n        {\n#if ENABLED (JERRY_ESNEXT)\n          if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_FINALIZE_ANONYMOUS_CLASS))\n          {\n            uint16_t name_index = scanner_save_literal (context_p, literal_index);\n            parser_emit_cbc_ext_literal (context_p, CBC_EXT_SET_CLASS_NAME, name_index);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          parser_emit_cbc_literal (context_p, CBC_SET_PROPERTY, literal_index);\n        }\n\n        break;\n      }\n    }\n\n    if (context_p->token.type == LEXER_RIGHT_BRACE)\n    {\n      break;\n    }\n    else if (context_p->token.type != LEXER_COMMA)\n    {\n      parser_raise_error (context_p, PARSER_ERR_OBJECT_ITEM_SEPARATOR_EXPECTED);\n    }\n  }\n\n#if !ENABLED (JERRY_ESNEXT)\n  while (context_p->stack_top_uint8 != PARSER_OBJECT_PROPERTY_START)\n  {\n    parser_stack_pop (context_p, NULL, 3);\n  }\n\n  parser_stack_pop_uint8 (context_p);\n#else /* ENABLED (JERRY_ESNEXT) */\n  if (has_super_env)\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_POP_OBJECT_SUPER_ENVIRONMENT);\n  }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n} /* parser_parse_object_literal */\n\n/**\n * Parse function literal.\n */\nstatic void\nparser_parse_function_expression (parser_context_t *context_p, /**< context */\n                                  uint32_t status_flags) /**< function status flags */\n{\n  int literals = 0;\n  uint16_t literal1 = 0;\n  uint16_t literal2 = 0;\n  uint16_t function_literal_index;\n  int32_t function_name_index = -1;\n\n#if !ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT (status_flags & PARSER_IS_FUNC_EXPRESSION);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n  if (status_flags & PARSER_IS_FUNC_EXPRESSION)\n  {\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_DEBUGGER)\n    parser_line_counter_t debugger_line = context_p->token.line;\n    parser_line_counter_t debugger_column = context_p->token.column;\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_ESNEXT)\n    uint32_t parent_status_flags = context_p->status_flags;\n\n    context_p->status_flags &= (uint32_t) ~(PARSER_IS_ASYNC_FUNCTION\n                                            | PARSER_IS_GENERATOR_FUNCTION\n                                            | PARSER_DISALLOW_AWAIT_YIELD);\n\n    if (status_flags & PARSER_IS_ASYNC_FUNCTION)\n    {\n      /* The name of the function cannot be await. */\n      context_p->status_flags |= PARSER_IS_ASYNC_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n    }\n\n    if (lexer_consume_generator (context_p))\n    {\n      /* The name of the function cannot be yield. */\n      context_p->status_flags |= PARSER_IS_GENERATOR_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n      status_flags |= PARSER_IS_GENERATOR_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (!lexer_check_next_character (context_p, LIT_CHAR_LEFT_PAREN))\n    {\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_LITERAL\n          || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n      {\n        parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n      }\n\n      parser_flush_cbc (context_p);\n\n      lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_STRING_LITERAL);\n\n#if ENABLED (JERRY_DEBUGGER)\n      if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      {\n        jerry_debugger_send_string (JERRY_DEBUGGER_FUNCTION_NAME,\n                                    JERRY_DEBUGGER_NO_SUBTYPE,\n                                    context_p->lit_object.literal_p->u.char_p,\n                                    context_p->lit_object.literal_p->prop.length);\n\n        /* Reset token position for the function. */\n        context_p->token.line = debugger_line;\n        context_p->token.column = debugger_column;\n      }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n      if (context_p->token.keyword_type >= LEXER_FIRST_NON_STRICT_ARGUMENTS)\n      {\n        status_flags |= PARSER_HAS_NON_STRICT_ARG;\n      }\n\n      function_name_index = context_p->lit_object.index;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    context_p->status_flags = parent_status_flags;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n  {\n    literals = 1;\n    literal1 = context_p->last_cbc.literal_index;\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_TWO_LITERALS)\n  {\n    literals = 2;\n    literal1 = context_p->last_cbc.literal_index;\n    literal2 = context_p->last_cbc.value;\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n  }\n\n  function_literal_index = lexer_construct_function_object (context_p, status_flags);\n\n  JERRY_ASSERT (context_p->last_cbc_opcode == PARSER_CBC_UNAVAILABLE);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (function_name_index != -1)\n  {\n    parser_set_function_name (context_p, function_literal_index, (uint16_t) function_name_index, 0);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (literals == 1)\n  {\n    context_p->last_cbc_opcode = CBC_PUSH_TWO_LITERALS;\n    context_p->last_cbc.literal_index = literal1;\n    context_p->last_cbc.value = function_literal_index;\n  }\n  else if (literals == 2)\n  {\n    context_p->last_cbc_opcode = CBC_PUSH_THREE_LITERALS;\n    context_p->last_cbc.literal_index = literal1;\n    context_p->last_cbc.value = literal2;\n    context_p->last_cbc.third_literal_index = function_literal_index;\n  }\n  else\n  {\n    parser_emit_cbc_literal (context_p,\n                             CBC_PUSH_LITERAL,\n                             function_literal_index);\n\n    if (function_name_index != -1)\n    {\n      context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_NAMED_FUNC_EXPRESSION);\n      context_p->last_cbc.value = (uint16_t) function_name_index;\n    }\n  }\n\n  context_p->last_cbc.literal_type = LEXER_FUNCTION_LITERAL;\n  context_p->last_cbc.literal_keyword_type = LEXER_EOS;\n} /* parser_parse_function_expression */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Parse template literal.\n */\nstatic void\nparser_parse_template_literal (parser_context_t *context_p) /**< context */\n{\n  bool is_empty_head = true;\n\n  if (context_p->token.lit_location.length > 0)\n  {\n    is_empty_head = false;\n\n    lexer_construct_literal_object (context_p,\n                                    &context_p->token.lit_location,\n                                    context_p->token.lit_location.type);\n\n    parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_LITERAL);\n  }\n\n  lexer_next_token (context_p);\n  parser_parse_expression (context_p, PARSE_EXPR);\n\n  if (context_p->token.type != LEXER_RIGHT_BRACE)\n  {\n    parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED);\n  }\n\n  if (!is_empty_head)\n  {\n    if (context_p->last_cbc_opcode == CBC_PUSH_TWO_LITERALS)\n    {\n      context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_STRING_CONCAT_TWO_LITERALS);\n    }\n    else if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n    {\n      context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_STRING_CONCAT_RIGHT_LITERAL);\n    }\n    else\n    {\n      parser_emit_cbc_ext (context_p, CBC_EXT_STRING_CONCAT);\n    }\n  }\n\n  context_p->source_p--;\n  context_p->column--;\n  lexer_parse_string (context_p, LEXER_STRING_NO_OPTS);\n\n  if (is_empty_head || context_p->token.lit_location.length > 0)\n  {\n    lexer_construct_literal_object (context_p,\n                                    &context_p->token.lit_location,\n                                    context_p->token.lit_location.type);\n\n    if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n    {\n      context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_STRING_CONCAT_TWO_LITERALS);\n      context_p->last_cbc.value = context_p->lit_object.index;\n      context_p->last_cbc.literal_type = context_p->token.lit_location.type;\n      context_p->last_cbc.literal_keyword_type = context_p->token.keyword_type;\n    }\n    else\n    {\n      parser_emit_cbc_ext_literal_from_token (context_p, CBC_EXT_STRING_CONCAT_RIGHT_LITERAL);\n    }\n  }\n\n  while (context_p->source_p[-1] != LIT_CHAR_GRAVE_ACCENT)\n  {\n    lexer_next_token (context_p);\n\n    parser_parse_expression (context_p, PARSE_EXPR);\n\n    if (context_p->token.type != LEXER_RIGHT_BRACE)\n    {\n      parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED);\n    }\n\n    if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n    {\n      context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_STRING_CONCAT_RIGHT_LITERAL);\n    }\n    else\n    {\n      parser_emit_cbc_ext (context_p, CBC_EXT_STRING_CONCAT);\n    }\n\n    context_p->source_p--;\n    context_p->column--;\n    lexer_parse_string (context_p, LEXER_STRING_NO_OPTS);\n\n    if (context_p->token.lit_location.length > 0)\n    {\n      lexer_construct_literal_object (context_p,\n                                      &context_p->token.lit_location,\n                                      context_p->token.lit_location.type);\n\n      parser_emit_cbc_ext_literal_from_token (context_p, CBC_EXT_STRING_CONCAT_RIGHT_LITERAL);\n    }\n  }\n} /* parser_parse_template_literal */\n\n/**\n * Parse tagged template literal.\n */\nstatic size_t\nparser_parse_tagged_template_literal (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_TEMPLATE_LITERAL);\n\n  uint32_t call_arguments = 0;\n  ecma_collection_t *collection_p;\n\n  if (context_p->tagged_template_literal_cp == JMEM_CP_NULL)\n  {\n    collection_p = ecma_new_collection ();\n    ECMA_SET_INTERNAL_VALUE_POINTER (context_p->tagged_template_literal_cp, collection_p);\n  }\n  else\n  {\n    collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t, context_p->tagged_template_literal_cp);\n    if (collection_p->item_count > CBC_MAXIMUM_BYTE_VALUE)\n    {\n      parser_raise_error (context_p, PARSER_ERR_ARGUMENT_LIMIT_REACHED);\n    }\n  }\n\n  const uint32_t tagged_id = collection_p->item_count;\n  uint32_t prop_idx = 0;\n  ecma_object_t *raw_strings_p;\n  ecma_object_t *template_obj_p = parser_new_tagged_template_literal (&raw_strings_p);\n  ecma_collection_push_back (collection_p, ecma_make_object_value (template_obj_p));\n\n  parser_tagged_template_literal_append_strings (context_p, template_obj_p, raw_strings_p, prop_idx++);\n\n  call_arguments++;\n  parser_emit_cbc_ext_call (context_p, CBC_EXT_GET_TAGGED_TEMPLATE_LITERAL, tagged_id);\n\n  while (context_p->source_p[-1] != LIT_CHAR_GRAVE_ACCENT)\n  {\n    JERRY_ASSERT (context_p->source_p[-1] == LIT_CHAR_LEFT_BRACE);\n    lexer_next_token (context_p);\n\n    if (++call_arguments > CBC_MAXIMUM_BYTE_VALUE)\n    {\n      parser_raise_error (context_p, PARSER_ERR_ARGUMENT_LIMIT_REACHED);\n    }\n\n    parser_parse_expression (context_p, PARSE_EXPR);\n\n    if (context_p->token.type != LEXER_RIGHT_BRACE)\n    {\n      parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED);\n    }\n\n    context_p->source_p--;\n    context_p->column--;\n    lexer_parse_string (context_p, LEXER_STRING_NO_OPTS);\n\n    parser_tagged_template_literal_append_strings (context_p, template_obj_p, raw_strings_p, prop_idx++);\n  }\n\n  parser_tagged_template_literal_finalize (template_obj_p, raw_strings_p);\n\n  return call_arguments;\n} /* parser_parse_tagged_template_literal */\n\n/**\n * Checks wheteher the current expression can be an assignment expression.\n *\n * @return true if the current expression can be an assignment expression, false otherwise\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\nparser_is_assignment_expr (parser_context_t *context_p)\n{\n  return (context_p->stack_top_uint8 == LEXER_EXPRESSION_START\n          || context_p->stack_top_uint8 == LEXER_LEFT_PAREN\n          || context_p->stack_top_uint8 == LEXER_COMMA_SEP_LIST\n          || LEXER_IS_BINARY_LVALUE_OP_TOKEN (context_p->stack_top_uint8));\n} /* parser_is_assignment_expr */\n\n/**\n * Throws an error if the current expression is not an assignment expression.\n */\nstatic inline void JERRY_ATTR_ALWAYS_INLINE\nparser_check_assignment_expr (parser_context_t *context_p)\n{\n  if (!parser_is_assignment_expr (context_p))\n  {\n    parser_raise_error (context_p, PARSER_ERR_ASSIGNMENT_EXPECTED);\n  }\n} /* parser_check_assignment_expr */\n\n/**\n * Checks whether the next token is a valid continuation token after an AssignmentExpression.\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\nparser_abort_parsing_after_assignment_expression (parser_context_t *context_p)\n{\n  return (context_p->token.type != LEXER_RIGHT_PAREN\n          && context_p->token.type != LEXER_COMMA);\n} /* parser_abort_parsing_after_assignment_expression */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Parse and record unary operators, and parse the primary literal.\n *\n * @return true if parsing should be aborted, true otherwise\n */\nstatic bool\nparser_parse_unary_expression (parser_context_t *context_p, /**< context */\n                               size_t *grouping_level_p) /**< grouping level */\n{\n  bool new_was_seen = false;\n\n  /* Collect unary operators. */\n  while (true)\n  {\n    /* Convert plus and minus binary operators to unary operators. */\n    switch (context_p->token.type)\n    {\n      case LEXER_ADD:\n      {\n        context_p->token.type = LEXER_PLUS;\n        break;\n      }\n      case LEXER_SUBTRACT:\n      {\n        context_p->token.type = LEXER_NEGATE;\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case LEXER_KEYW_AWAIT:\n      {\n#if ENABLED (JERRY_MODULE_SYSTEM)\n        if ((context_p->global_status_flags & ECMA_PARSE_MODULE)\n            && !(context_p->status_flags & PARSER_IS_ASYNC_FUNCTION))\n        {\n          parser_raise_error (context_p, PARSER_ERR_AWAIT_NOT_ALLOWED);\n        }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n        if (JERRY_UNLIKELY (context_p->token.lit_location.has_escape))\n        {\n          parser_raise_error (context_p, PARSER_ERR_INVALID_KEYWORD);\n        }\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n\n    /* Bracketed expressions are primary expressions. At this\n     * point their left paren is pushed onto the stack and\n     * they are processed when their closing paren is reached. */\n    if (context_p->token.type == LEXER_LEFT_PAREN)\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n      {\n        JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION);\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      (*grouping_level_p) += PARSER_GROUPING_LEVEL_INCREASE;\n      new_was_seen = false;\n    }\n    else if (context_p->token.type == LEXER_KEYW_NEW)\n    {\n      /* After 'new' unary operators are not allowed. */\n      new_was_seen = true;\n\n#if ENABLED (JERRY_ESNEXT)\n      /* Check if \"new.target\" is written here. */\n      if (scanner_try_scan_new_target (context_p))\n      {\n        if (!(context_p->status_flags & PARSER_ALLOW_NEW_TARGET))\n        {\n          parser_raise_error (context_p, PARSER_ERR_NEW_TARGET_NOT_ALLOWED);\n        }\n\n        parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_NEW_TARGET);\n        lexer_next_token (context_p);\n        /* Found \"new.target\" return here */\n        return false;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n    else if (new_was_seen\n             || (*grouping_level_p == PARSE_EXPR_LEFT_HAND_SIDE)\n             || !LEXER_IS_UNARY_OP_TOKEN (context_p->token.type))\n    {\n      break;\n    }\n\n    parser_stack_push_uint8 (context_p, context_p->token.type);\n    lexer_next_token (context_p);\n  }\n\n  /* Parse primary expression. */\n  switch (context_p->token.type)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_TEMPLATE_LITERAL:\n    {\n      if (context_p->source_p[-1] != LIT_CHAR_GRAVE_ACCENT)\n      {\n        parser_parse_template_literal (context_p);\n        break;\n      }\n\n      /* The string is a normal string literal. */\n      /* FALLTHRU */\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case LEXER_LITERAL:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (JERRY_UNLIKELY (context_p->next_scanner_info_p->source_p == context_p->source_p))\n      {\n        JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION);\n\n        uint32_t arrow_status_flags = (PARSER_IS_FUNCTION\n                                       | PARSER_IS_ARROW_FUNCTION\n                                       | (context_p->status_flags & PARSER_INSIDE_CLASS_FIELD));\n\n        if (context_p->next_scanner_info_p->u8_arg & SCANNER_FUNCTION_ASYNC)\n        {\n          JERRY_ASSERT (lexer_token_is_async (context_p));\n          JERRY_ASSERT (!(context_p->next_scanner_info_p->u8_arg & SCANNER_FUNCTION_STATEMENT));\n\n          uint32_t saved_status_flags = context_p->status_flags;\n\n          context_p->status_flags |= PARSER_IS_ASYNC_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n          lexer_next_token (context_p);\n          context_p->status_flags = saved_status_flags;\n\n          if (context_p->token.type == LEXER_KEYW_FUNCTION)\n          {\n            uint32_t status_flags = (PARSER_FUNCTION_CLOSURE\n                                     | PARSER_IS_FUNC_EXPRESSION\n                                     | PARSER_IS_ASYNC_FUNCTION\n                                     | PARSER_DISALLOW_AWAIT_YIELD);\n            parser_parse_function_expression (context_p, status_flags);\n            break;\n          }\n\n          arrow_status_flags = (PARSER_IS_FUNCTION\n                                | PARSER_IS_ARROW_FUNCTION\n                                | PARSER_IS_ASYNC_FUNCTION\n                                | PARSER_DISALLOW_AWAIT_YIELD);\n        }\n\n        parser_check_assignment_expr (context_p);\n        parser_parse_function_expression (context_p, arrow_status_flags);\n        return parser_abort_parsing_after_assignment_expression (context_p);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      uint8_t type = context_p->token.lit_location.type;\n\n      if (type == LEXER_IDENT_LITERAL || type == LEXER_STRING_LITERAL)\n      {\n        lexer_construct_literal_object (context_p,\n                                        &context_p->token.lit_location,\n                                        context_p->token.lit_location.type);\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n        if ((context_p->status_flags & PARSER_MODULE_STORE_IDENT)\n            && type == LEXER_IDENT_LITERAL)\n        {\n          context_p->module_identifier_lit_p = context_p->lit_object.literal_p;\n          context_p->status_flags &= (uint32_t) ~(PARSER_MODULE_STORE_IDENT);\n        }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n      }\n      else if (type == LEXER_NUMBER_LITERAL)\n      {\n        bool is_negative_number = false;\n\n        if ((context_p->stack_top_uint8 == LEXER_PLUS || context_p->stack_top_uint8 == LEXER_NEGATE)\n            && !lexer_check_post_primary_exp (context_p))\n        {\n          do\n          {\n            if (context_p->stack_top_uint8 == LEXER_NEGATE)\n            {\n              is_negative_number = !is_negative_number;\n            }\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n            else if (JERRY_LIKELY (context_p->token.extra_value == LEXER_NUMBER_BIGINT))\n            {\n              break;\n            }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n            parser_stack_pop_uint8 (context_p);\n          }\n          while (context_p->stack_top_uint8 == LEXER_PLUS\n                 || context_p->stack_top_uint8 == LEXER_NEGATE);\n        }\n\n        if (lexer_construct_number_object (context_p, true, is_negative_number))\n        {\n          JERRY_ASSERT (context_p->lit_object.index <= CBC_PUSH_NUMBER_BYTE_RANGE_END);\n\n          parser_emit_cbc_push_number (context_p, is_negative_number);\n          break;\n        }\n      }\n\n      cbc_opcode_t opcode = CBC_PUSH_LITERAL;\n\n      if (context_p->token.keyword_type != LEXER_KEYW_EVAL)\n      {\n        if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n        {\n          context_p->last_cbc_opcode = CBC_PUSH_TWO_LITERALS;\n          context_p->last_cbc.value = context_p->lit_object.index;\n          context_p->last_cbc.literal_type = context_p->token.lit_location.type;\n          context_p->last_cbc.literal_keyword_type = context_p->token.keyword_type;\n          break;\n        }\n\n        if (context_p->last_cbc_opcode == CBC_PUSH_TWO_LITERALS)\n        {\n          context_p->last_cbc_opcode = CBC_PUSH_THREE_LITERALS;\n          context_p->last_cbc.third_literal_index = context_p->lit_object.index;\n          context_p->last_cbc.literal_type = context_p->token.lit_location.type;\n          context_p->last_cbc.literal_keyword_type = context_p->token.keyword_type;\n          break;\n        }\n\n        if (context_p->last_cbc_opcode == CBC_PUSH_THIS)\n        {\n          context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n          opcode = CBC_PUSH_THIS_LITERAL;\n        }\n      }\n\n      parser_emit_cbc_literal_from_token (context_p, (uint16_t) opcode);\n      break;\n    }\n    case LEXER_KEYW_FUNCTION:\n    {\n      parser_parse_function_expression (context_p, PARSER_FUNCTION_CLOSURE | PARSER_IS_FUNC_EXPRESSION);\n      break;\n    }\n    case LEXER_LEFT_BRACE:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->next_scanner_info_p->source_p == context_p->source_p\n          && context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER)\n      {\n        if (parser_is_assignment_expr (context_p))\n        {\n          uint32_t flags = PARSER_PATTERN_NO_OPTS;\n\n          if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)\n          {\n            flags |= PARSER_PATTERN_HAS_REST_ELEMENT;\n          }\n\n          parser_parse_object_initializer (context_p, flags);\n          return parser_abort_parsing_after_assignment_expression (context_p);\n        }\n\n        scanner_release_next (context_p, sizeof (scanner_location_info_t));\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      parser_parse_object_literal (context_p);\n      break;\n    }\n    case LEXER_LEFT_SQUARE:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n      {\n        if (context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER)\n        {\n          if (parser_is_assignment_expr (context_p))\n          {\n            parser_parse_array_initializer (context_p, PARSER_PATTERN_NO_OPTS);\n            return parser_abort_parsing_after_assignment_expression (context_p);\n          }\n\n          scanner_release_next (context_p, sizeof (scanner_location_info_t));\n        }\n        else\n        {\n          JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS\n                        && context_p->next_scanner_info_p->u8_arg == SCANNER_LITERAL_NO_DESTRUCTURING);\n\n          scanner_release_next (context_p, sizeof (scanner_info_t));\n        }\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      parser_parse_array_literal (context_p);\n      break;\n    }\n    case LEXER_DIVIDE:\n    case LEXER_ASSIGN_DIVIDE:\n    {\n      lexer_construct_regexp_object (context_p, false);\n      uint16_t literal_index = (uint16_t) (context_p->literal_count - 1);\n\n      if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n      {\n        context_p->last_cbc_opcode = CBC_PUSH_TWO_LITERALS;\n        context_p->last_cbc.value = literal_index;\n      }\n      else if (context_p->last_cbc_opcode == CBC_PUSH_TWO_LITERALS)\n      {\n        context_p->last_cbc_opcode = CBC_PUSH_THREE_LITERALS;\n        context_p->last_cbc.third_literal_index = literal_index;\n      }\n      else\n      {\n        parser_emit_cbc_literal (context_p, CBC_PUSH_LITERAL, literal_index);\n      }\n\n      context_p->last_cbc.literal_type = LEXER_REGEXP_LITERAL;\n      context_p->last_cbc.literal_keyword_type = LEXER_EOS;\n      break;\n    }\n    case LEXER_KEYW_THIS:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->status_flags & PARSER_ALLOW_SUPER_CALL)\n      {\n        parser_emit_cbc_ext (context_p, CBC_EXT_RESOLVE_LEXICAL_THIS);\n      }\n      else\n      {\n#endif /* ENABLED (JERRY_ESNEXT) */\n        parser_emit_cbc (context_p, CBC_PUSH_THIS);\n#if ENABLED (JERRY_ESNEXT)\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      break;\n    }\n    case LEXER_LIT_TRUE:\n    {\n      parser_emit_cbc (context_p, CBC_PUSH_TRUE);\n      break;\n    }\n    case LEXER_LIT_FALSE:\n    {\n      parser_emit_cbc (context_p, CBC_PUSH_FALSE);\n      break;\n    }\n    case LEXER_LIT_NULL:\n    {\n      parser_emit_cbc (context_p, CBC_PUSH_NULL);\n      break;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_KEYW_CLASS:\n    {\n      parser_parse_class (context_p, false);\n      return false;\n    }\n    case LEXER_KEYW_SUPER:\n    {\n      if (context_p->status_flags & PARSER_ALLOW_SUPER)\n      {\n        if (lexer_check_next_characters (context_p, LIT_CHAR_DOT, LIT_CHAR_LEFT_SQUARE))\n        {\n          parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_SUPER);\n          break;\n        }\n\n        if (lexer_check_next_character (context_p, LIT_CHAR_LEFT_PAREN)\n            && (context_p->status_flags & PARSER_ALLOW_SUPER_CALL))\n        {\n          parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_SUPER_CONSTRUCTOR);\n          break;\n        }\n      }\n\n      parser_raise_error (context_p, PARSER_ERR_UNEXPECTED_SUPER_KEYWORD);\n    }\n    case LEXER_LEFT_PAREN:\n    {\n      JERRY_ASSERT (context_p->next_scanner_info_p->source_p == context_p->source_p\n                    && context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION);\n\n      parser_check_assignment_expr (context_p);\n\n      uint32_t arrow_status_flags = (PARSER_IS_FUNCTION\n                                     | PARSER_IS_ARROW_FUNCTION\n                                     | (context_p->status_flags & PARSER_INSIDE_CLASS_FIELD));\n      parser_parse_function_expression (context_p, arrow_status_flags);\n      return parser_abort_parsing_after_assignment_expression (context_p);\n    }\n    case LEXER_KEYW_YIELD:\n    {\n      JERRY_ASSERT ((context_p->status_flags & PARSER_IS_GENERATOR_FUNCTION)\n                    && !(context_p->status_flags & PARSER_DISALLOW_AWAIT_YIELD));\n\n      if (context_p->token.lit_location.has_escape)\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_KEYWORD);\n      }\n\n      parser_check_assignment_expr (context_p);\n      lexer_next_token (context_p);\n\n      cbc_ext_opcode_t opcode = ((context_p->status_flags & PARSER_IS_ASYNC_FUNCTION) ? CBC_EXT_ASYNC_YIELD\n                                                                                      : CBC_EXT_YIELD);\n      if (!lexer_check_yield_no_arg (context_p))\n      {\n        if (context_p->token.type == LEXER_MULTIPLY)\n        {\n          lexer_next_token (context_p);\n          opcode = ((context_p->status_flags & PARSER_IS_ASYNC_FUNCTION) ? CBC_EXT_ASYNC_YIELD_ITERATOR\n                                                                         : CBC_EXT_YIELD_ITERATOR);\n        }\n\n        parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n      }\n      else\n      {\n        parser_emit_cbc (context_p, CBC_PUSH_UNDEFINED);\n      }\n\n      parser_emit_cbc_ext (context_p, opcode);\n\n      return (context_p->token.type != LEXER_RIGHT_PAREN\n              && context_p->token.type != LEXER_COMMA);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      bool is_left_hand_side = (*grouping_level_p == PARSE_EXPR_LEFT_HAND_SIDE);\n      parser_raise_error (context_p, (is_left_hand_side ? PARSER_ERR_LEFT_HAND_SIDE_EXP_EXPECTED\n                                                        : PARSER_ERR_PRIMARY_EXP_EXPECTED));\n      break;\n    }\n  }\n  lexer_next_token (context_p);\n  return false;\n} /* parser_parse_unary_expression */\n\n/**\n * Parse the postfix part of unary operators, and\n * generate byte code for the whole expression.\n */\nstatic void\nparser_process_unary_expression (parser_context_t *context_p, /**< context */\n                                 size_t grouping_level) /**< grouping level */\n{\n  /* Parse postfix part of a primary expression. */\n  while (true)\n  {\n    /* Since break would only break the switch, we use\n     * continue to continue this loop. Without continue,\n     * the code abandons the loop. */\n    switch (context_p->token.type)\n    {\n      case LEXER_DOT:\n      {\n        parser_push_result (context_p);\n\n        lexer_expect_identifier (context_p, LEXER_STRING_LITERAL);\n        JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                      && context_p->lit_object.literal_p->type == LEXER_STRING_LITERAL);\n        context_p->token.lit_location.type = LEXER_STRING_LITERAL;\n\n        if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n        {\n          JERRY_ASSERT (CBC_ARGS_EQ (CBC_PUSH_PROP_LITERAL_LITERAL,\n                                     CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));\n          context_p->last_cbc_opcode = CBC_PUSH_PROP_LITERAL_LITERAL;\n          context_p->last_cbc.value = context_p->lit_object.index;\n        }\n        else if (context_p->last_cbc_opcode == CBC_PUSH_THIS)\n        {\n          context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n          parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_PROP_THIS_LITERAL);\n        }\n#if ENABLED (JERRY_ESNEXT)\n        else if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER))\n        {\n          context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER_PROP_LITERAL);\n          context_p->last_cbc.literal_index = context_p->lit_object.index;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        else\n        {\n          parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_PROP_LITERAL);\n        }\n        lexer_next_token (context_p);\n        continue;\n      }\n\n      case LEXER_LEFT_SQUARE:\n      {\n        parser_push_result (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        uint16_t last_cbc_opcode = context_p->last_cbc_opcode;\n\n        if (last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER))\n        {\n          context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        lexer_next_token (context_p);\n        parser_parse_expression (context_p, PARSE_EXPR);\n        if (context_p->token.type != LEXER_RIGHT_SQUARE)\n        {\n          parser_raise_error (context_p, PARSER_ERR_RIGHT_SQUARE_EXPECTED);\n        }\n        lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER))\n        {\n          parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_SUPER_PROP);\n          continue;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (PARSER_IS_MUTABLE_PUSH_LITERAL (context_p->last_cbc_opcode))\n        {\n          context_p->last_cbc_opcode = PARSER_PUSH_LITERAL_TO_PUSH_PROP_LITERAL (context_p->last_cbc_opcode);\n        }\n        else\n        {\n          parser_emit_cbc (context_p, CBC_PUSH_PROP);\n        }\n        continue;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      case LEXER_TEMPLATE_LITERAL:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case LEXER_LEFT_PAREN:\n      {\n        size_t call_arguments = 0;\n        uint16_t opcode = CBC_CALL;\n        bool is_eval = false;\n\n        parser_push_result (context_p);\n\n        if (context_p->stack_top_uint8 == LEXER_KEYW_NEW)\n        {\n#if ENABLED (JERRY_ESNEXT)\n          if (context_p->token.type == LEXER_LEFT_PAREN)\n#endif /* ENABLED (JERRY_ESNEXT) */\n          {\n            parser_stack_pop_uint8 (context_p);\n            opcode = CBC_NEW;\n          }\n        }\n        else\n        {\n          if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL\n              && context_p->last_cbc.literal_keyword_type == LEXER_KEYW_EVAL\n              && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL)\n          {\n            is_eval = true;\n          }\n\n          if (PARSER_IS_PUSH_PROP (context_p->last_cbc_opcode))\n          {\n            opcode = CBC_CALL_PROP;\n            context_p->last_cbc_opcode = PARSER_PUSH_PROP_TO_PUSH_PROP_REFERENCE (context_p->last_cbc_opcode);\n          }\n#if ENABLED (JERRY_ESNEXT)\n          else if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER_CONSTRUCTOR))\n          {\n            opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_SUPER_CALL);\n          }\n          else if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER_PROP_LITERAL))\n          {\n            context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_SUPER_PROP_LITERAL_REFERENCE);\n            opcode = CBC_CALL_PROP;\n          }\n          else if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER_PROP))\n          {\n            context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_SUPER_PROP_REFERENCE);\n            opcode = CBC_CALL_PROP;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          else if (JERRY_UNLIKELY (context_p->status_flags & PARSER_INSIDE_WITH)\n                   && PARSER_IS_PUSH_LITERALS_WITH_THIS (context_p->last_cbc_opcode)\n                   && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL)\n          {\n            opcode = CBC_CALL_PROP;\n            parser_emit_ident_reference (context_p, CBC_PUSH_IDENT_REFERENCE);\n            parser_emit_cbc_ext (context_p, CBC_EXT_RESOLVE_BASE);\n          }\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        bool has_spread_element = false;\n\n        if (context_p->token.type == LEXER_TEMPLATE_LITERAL)\n        {\n          call_arguments = parser_parse_tagged_template_literal (context_p);\n        }\n        else\n        {\n          lexer_next_token (context_p);\n\n          while (context_p->token.type != LEXER_RIGHT_PAREN)\n          {\n            if (++call_arguments > CBC_MAXIMUM_BYTE_VALUE)\n            {\n              parser_raise_error (context_p, PARSER_ERR_ARGUMENT_LIMIT_REACHED);\n            }\n\n            if (context_p->token.type == LEXER_THREE_DOTS)\n            {\n              has_spread_element = true;\n              call_arguments++;\n              parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_SPREAD_ELEMENT);\n              lexer_next_token (context_p);\n            }\n\n            parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n            if (context_p->token.type == LEXER_COMMA)\n            {\n              lexer_next_token (context_p);\n              continue;\n            }\n\n            if (context_p->token.type != LEXER_RIGHT_PAREN)\n            {\n              parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n            }\n\n            break;\n          }\n        }\n#else /* !ENABLED (JERRY_ESNEXT) */\n        lexer_next_token (context_p);\n\n        if (context_p->token.type != LEXER_RIGHT_PAREN)\n        {\n          while (true)\n          {\n            if (++call_arguments > CBC_MAXIMUM_BYTE_VALUE)\n            {\n              parser_raise_error (context_p, PARSER_ERR_ARGUMENT_LIMIT_REACHED);\n            }\n\n            parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n            if (context_p->token.type != LEXER_COMMA)\n            {\n              break;\n            }\n            lexer_next_token (context_p);\n          }\n\n          if (context_p->token.type != LEXER_RIGHT_PAREN)\n          {\n            parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        lexer_next_token (context_p);\n\n        if (is_eval)\n        {\n          context_p->status_flags |= PARSER_LEXICAL_ENV_NEEDED;\n\n#if ENABLED (JERRY_ESNEXT)\n          uint16_t eval_flags = PARSER_SAVE_STATUS_FLAGS (context_p->status_flags);\n          const uint32_t required_flags = PARSER_IS_FUNCTION | PARSER_LEXICAL_BLOCK_NEEDED;\n\n          if (context_p->status_flags & PARSER_FUNCTION_IS_PARSING_ARGS)\n          {\n            context_p->status_flags |= PARSER_LEXICAL_BLOCK_NEEDED;\n          }\n          else if (((context_p->status_flags & (required_flags | PARSER_IS_STRICT)) == required_flags)\n                   || ((context_p->global_status_flags & ECMA_PARSE_FUNCTION_CONTEXT)\n                       && !(context_p->status_flags & PARSER_IS_FUNCTION)))\n          {\n            eval_flags |= PARSER_GET_EVAL_FLAG (ECMA_PARSE_FUNCTION_CONTEXT);\n          }\n\n          if (eval_flags != 0)\n          {\n            parser_emit_cbc_ext_call (context_p, CBC_EXT_LOCAL_EVAL, eval_flags);\n          }\n          else\n          {\n#endif /* ENABLED (JERRY_ESNEXT) */\n            parser_emit_cbc (context_p, CBC_EVAL);\n#if ENABLED (JERRY_ESNEXT)\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        if (has_spread_element)\n        {\n          uint16_t spread_opcode;\n\n          if (opcode == CBC_CALL)\n          {\n            spread_opcode = CBC_EXT_SPREAD_CALL;\n          }\n          else if (opcode == CBC_CALL_PROP)\n          {\n            spread_opcode = CBC_EXT_SPREAD_CALL_PROP;\n          }\n          else if (opcode == CBC_NEW)\n          {\n            spread_opcode = CBC_EXT_SPREAD_NEW;\n          }\n          else\n          {\n            /* opcode is unchanged */\n            JERRY_ASSERT (opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_SUPER_CALL));\n            spread_opcode = CBC_EXT_SPREAD_SUPER_CALL;\n          }\n\n          parser_emit_cbc_ext_call (context_p, spread_opcode, call_arguments);\n          continue;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (call_arguments <= 1)\n        {\n          if (opcode == CBC_CALL)\n          {\n            parser_emit_cbc (context_p, (uint16_t) (CBC_CALL0 + (call_arguments * 6)));\n            continue;\n          }\n          if (opcode == CBC_CALL_PROP)\n          {\n            parser_emit_cbc (context_p, (uint16_t) (CBC_CALL0_PROP + (call_arguments * 6)));\n            continue;\n          }\n          if (opcode == CBC_NEW)\n          {\n            parser_emit_cbc (context_p, (uint16_t) (CBC_NEW0 + call_arguments));\n            continue;\n          }\n        }\n        else if (call_arguments == 2)\n        {\n          if (opcode == CBC_CALL)\n          {\n            parser_emit_cbc (context_p, CBC_CALL2);\n            continue;\n          }\n          if (opcode == CBC_CALL_PROP)\n          {\n            parser_flush_cbc (context_p);\n            /* Manually adjusting stack usage. */\n            JERRY_ASSERT (context_p->stack_depth > 0);\n            context_p->stack_depth--;\n            parser_emit_cbc (context_p, CBC_CALL2_PROP);\n            continue;\n          }\n        }\n\n        parser_emit_cbc_call (context_p, opcode, call_arguments);\n        continue;\n      }\n\n      default:\n      {\n        if (context_p->stack_top_uint8 == LEXER_KEYW_NEW)\n        {\n          parser_push_result (context_p);\n          parser_emit_cbc (context_p, CBC_NEW0);\n          parser_stack_pop_uint8 (context_p);\n          continue;\n        }\n\n        if (!(context_p->token.flags & LEXER_WAS_NEWLINE)\n            && (context_p->token.type == LEXER_INCREASE || context_p->token.type == LEXER_DECREASE)\n            && grouping_level != PARSE_EXPR_LEFT_HAND_SIDE)\n        {\n          cbc_opcode_t opcode = (context_p->token.type == LEXER_INCREASE) ? CBC_POST_INCR : CBC_POST_DECR;\n          parser_push_result (context_p);\n          parser_emit_unary_lvalue_opcode (context_p, opcode);\n          lexer_next_token (context_p);\n        }\n        break;\n      }\n    }\n    break;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  uint8_t last_unary_token = LEXER_INCREASE;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* Generate byte code for the unary operators. */\n  while (true)\n  {\n    uint8_t token = context_p->stack_top_uint8;\n    if (!LEXER_IS_UNARY_OP_TOKEN (token))\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->token.type == LEXER_EXPONENTIATION\n          && last_unary_token != LEXER_INCREASE\n          && last_unary_token != LEXER_DECREASE)\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_EXPONENTIATION);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      break;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    last_unary_token = token;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    parser_push_result (context_p);\n    parser_stack_pop_uint8 (context_p);\n\n    if (LEXER_IS_UNARY_LVALUE_OP_TOKEN (token))\n    {\n      if (token == LEXER_KEYW_DELETE)\n      {\n        token = CBC_DELETE_PUSH_RESULT;\n      }\n      else\n      {\n        token = (uint8_t) (LEXER_UNARY_LVALUE_OP_TOKEN_TO_OPCODE (token));\n      }\n      parser_emit_unary_lvalue_opcode (context_p, (cbc_opcode_t) token);\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (JERRY_UNLIKELY (token == LEXER_KEYW_AWAIT))\n    {\n      cbc_ext_opcode_t opcode = ((context_p->status_flags & PARSER_IS_GENERATOR_FUNCTION) ? CBC_EXT_GENERATOR_AWAIT\n                                                                                          : CBC_EXT_AWAIT);\n      parser_emit_cbc_ext (context_p, opcode);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else\n    {\n      token = (uint8_t) (LEXER_UNARY_OP_TOKEN_TO_OPCODE (token));\n\n      if (token == CBC_TYPEOF)\n      {\n        if (PARSER_IS_PUSH_LITERALS_WITH_THIS (context_p->last_cbc_opcode)\n            && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL)\n        {\n          parser_emit_ident_reference (context_p, CBC_TYPEOF_IDENT);\n        }\n        else\n        {\n          parser_emit_cbc (context_p, token);\n        }\n      }\n      else\n      {\n        if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n        {\n          /* It is not worth to combine with push multiple literals\n           * since the byte code size will not decrease. */\n          JERRY_ASSERT (CBC_SAME_ARGS (context_p->last_cbc_opcode, token + 1));\n          context_p->last_cbc_opcode = (uint16_t) (token + 1);\n        }\n        else\n        {\n          parser_emit_cbc (context_p, token);\n        }\n      }\n    }\n  }\n} /* parser_process_unary_expression */\n\n/**\n * Append a binary '=' token.\n *\n * @return - pushed assignment opcode onto the parser stack\n */\nstatic uint8_t\nparser_append_binary_single_assignment_token (parser_context_t *context_p, /**< context */\n                                              uint32_t pattern_flags) /**< pattern flags */\n{\n  JERRY_UNUSED (pattern_flags);\n\n  /* Unlike other tokens, the whole byte code is saved for binary\n   * assignment, since it has multiple forms depending on the\n   * previous instruction. */\n\n  uint8_t assign_opcode = CBC_ASSIGN;\n\n  if (PARSER_IS_PUSH_LITERALS_WITH_THIS (context_p->last_cbc_opcode)\n      && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL)\n  {\n    parser_check_invalid_assign (context_p);\n\n    uint16_t literal_index;\n\n    switch (context_p->last_cbc_opcode)\n    {\n      case CBC_PUSH_LITERAL:\n      {\n        literal_index = context_p->last_cbc.literal_index;\n        context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n        break;\n      }\n      case CBC_PUSH_TWO_LITERALS:\n      {\n        literal_index = context_p->last_cbc.value;\n        context_p->last_cbc_opcode = CBC_PUSH_LITERAL;\n        break;\n      }\n      case CBC_PUSH_THIS_LITERAL:\n      {\n        literal_index = context_p->last_cbc.literal_index;\n        context_p->last_cbc_opcode = CBC_PUSH_THIS;\n        parser_flush_cbc (context_p);\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_THREE_LITERALS);\n        literal_index = context_p->last_cbc.third_literal_index;\n        context_p->last_cbc_opcode = CBC_PUSH_TWO_LITERALS;\n        break;\n      }\n    }\n\n    assign_opcode = CBC_ASSIGN_SET_IDENT;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (!(pattern_flags & (PARSER_PATTERN_LET | PARSER_PATTERN_CONST | PARSER_PATTERN_LOCAL)))\n    {\n      if (scanner_literal_is_const_reg (context_p, literal_index))\n      {\n        parser_stack_push_uint8 (context_p, LEXER_ASSIGN_CONST);\n      }\n    }\n    else if (literal_index < PARSER_REGISTER_START)\n    {\n      assign_opcode = CBC_INIT_LET;\n\n      if (scanner_literal_is_created (context_p, literal_index))\n      {\n        assign_opcode = CBC_ASSIGN_LET_CONST;\n      }\n      else if (pattern_flags & PARSER_PATTERN_CONST)\n      {\n        assign_opcode = CBC_INIT_CONST;\n      }\n      else if (pattern_flags & PARSER_PATTERN_LOCAL)\n      {\n        assign_opcode = CBC_INIT_ARG_OR_CATCH;\n      }\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    parser_stack_push_uint16 (context_p, literal_index);\n    JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_LITERAL, assign_opcode));\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_PROP)\n  {\n    JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_PROP, CBC_ASSIGN));\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_PROP_LITERAL)\n  {\n    if (context_p->last_cbc.literal_type != LEXER_IDENT_LITERAL)\n    {\n      JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_PROP_LITERAL, CBC_ASSIGN_PROP_LITERAL));\n      parser_stack_push_uint16 (context_p, context_p->last_cbc.literal_index);\n      assign_opcode = CBC_ASSIGN_PROP_LITERAL;\n      context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n    }\n    else\n    {\n      context_p->last_cbc_opcode = CBC_PUSH_LITERAL;\n    }\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_PROP_LITERAL_LITERAL)\n  {\n    JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_PROP_LITERAL_LITERAL, CBC_PUSH_TWO_LITERALS));\n    context_p->last_cbc_opcode = CBC_PUSH_TWO_LITERALS;\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_PROP_THIS_LITERAL)\n  {\n    if (context_p->last_cbc.literal_type != LEXER_IDENT_LITERAL)\n    {\n      JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_PROP_THIS_LITERAL, CBC_ASSIGN_PROP_THIS_LITERAL));\n      parser_stack_push_uint16 (context_p, context_p->last_cbc.literal_index);\n      assign_opcode = CBC_ASSIGN_PROP_THIS_LITERAL;\n      context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n    }\n    else\n    {\n      context_p->last_cbc_opcode = CBC_PUSH_THIS_LITERAL;\n    }\n  }\n#if ENABLED (JERRY_ESNEXT)\n  else if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER_PROP_LITERAL))\n  {\n    context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_SUPER_PROP_LITERAL_ASSIGNMENT_REFERENCE);\n    assign_opcode = CBC_ASSIGN_SUPER;\n  }\n  else if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_SUPER_PROP))\n  {\n    context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_SUPER_PROP_ASSIGNMENT_REFERENCE);\n    assign_opcode = CBC_ASSIGN_SUPER;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  else\n  {\n    /* Invalid LeftHandSide expression. */ //3820, 3815\n#if ENABLED (JERRY_ESNEXT)\n    parser_check_invalid_new_target (context_p, CBC_ASSIGN);\n    parser_raise_error (context_p, PARSER_ERR_INVALID_LHS_ASSIGNMENT);\n#else /* !ENABLED (JERRY_ESNEXT) */\n    parser_emit_cbc_ext (context_p, CBC_EXT_THROW_REFERENCE_ERROR);\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n\n  parser_stack_push_uint8 (context_p, assign_opcode);\n  parser_stack_push_uint8 (context_p, LEXER_ASSIGN);\n\n  return assign_opcode;\n} /* parser_append_binary_single_assignment_token */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Check for invalid chain of logical operators\n */\nstatic void\nparser_check_invalid_logical_op (parser_context_t *context_p, /**< context */\n                                 uint8_t invalid_token1, /**< token id of first invalid token */\n                                 uint8_t invalid_token2) /**< token id of second invalid token */\n{\n  parser_stack_iterator_t iterator;\n  parser_stack_iterator_init (context_p, &iterator);\n\n  while (true)\n  {\n    uint8_t token = parser_stack_iterator_read_uint8 (&iterator);\n\n    if (!LEXER_IS_BINARY_NON_LVALUE_OP_TOKEN (token))\n    {\n      return;\n    }\n\n    if (token == invalid_token1 || token == invalid_token2)\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_NULLISH_COALESCING);\n    }\n\n    parser_stack_iterator_skip (&iterator, sizeof (uint8_t));\n  }\n} /* parser_check_invalid_logical_op */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Append a binary token.\n */\nstatic void\nparser_append_binary_token (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (LEXER_IS_BINARY_OP_TOKEN (context_p->token.type));\n  parser_push_result (context_p);\n\n  if (context_p->token.type == LEXER_ASSIGN)\n  {\n    parser_append_binary_single_assignment_token (context_p, 0);\n    return;\n  }\n\n  if (LEXER_IS_BINARY_LVALUE_OP_TOKEN (context_p->token.type))\n  {\n    if (PARSER_IS_PUSH_LITERALS_WITH_THIS (context_p->last_cbc_opcode)\n        && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL)\n    {\n      parser_check_invalid_assign (context_p);\n\n      parser_emit_ident_reference (context_p, CBC_PUSH_IDENT_REFERENCE);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (scanner_literal_is_const_reg (context_p, context_p->last_cbc.literal_index))\n      {\n        parser_stack_push_uint8 (context_p, LEXER_ASSIGN_CONST);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n    else if (PARSER_IS_PUSH_PROP (context_p->last_cbc_opcode))\n    {\n      context_p->last_cbc_opcode = PARSER_PUSH_PROP_TO_PUSH_PROP_REFERENCE (context_p->last_cbc_opcode);\n    }\n    else\n    {\n      /* Invalid LeftHandSide expression. */\n#if ENABLED (JERRY_ESNEXT)\n      parser_check_invalid_new_target (context_p, CBC_ASSIGN);\n      parser_raise_error (context_p, PARSER_ERR_INVALID_LHS_ASSIGNMENT);\n#else /* !ENABLED (JERRY_ES2015) */\n      parser_emit_cbc_ext (context_p, CBC_EXT_THROW_REFERENCE_ERROR);\n#endif /* ENABLED (JERRY_ES2015) */\n\n      parser_emit_cbc (context_p, CBC_PUSH_PROP_REFERENCE);\n    }\n  }\n  else if (context_p->token.type == LEXER_LOGICAL_OR\n           || context_p->token.type == LEXER_LOGICAL_AND)\n  {\n    parser_branch_t branch;\n    uint16_t opcode = CBC_BRANCH_IF_LOGICAL_TRUE;\n\n    if (context_p->token.type == LEXER_LOGICAL_AND)\n    {\n      opcode = CBC_BRANCH_IF_LOGICAL_FALSE;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    parser_check_invalid_logical_op (context_p, LEXER_NULLISH_COALESCING, LEXER_NULLISH_COALESCING);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    parser_emit_cbc_forward_branch (context_p, opcode, &branch);\n    parser_stack_push (context_p, &branch, sizeof (parser_branch_t));\n    parser_stack_push_uint8 (context_p, context_p->token.type);\n    return;\n  }\n#if ENABLED (JERRY_ESNEXT)\n  else if (context_p->token.type == LEXER_NULLISH_COALESCING)\n  {\n    parser_branch_t branch;\n\n    uint16_t opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_BRANCH_IF_NULLISH);\n    parser_emit_cbc_forward_branch (context_p, opcode, &branch);\n    parser_stack_push (context_p, &branch, sizeof (parser_branch_t));\n    parser_stack_push_uint8 (context_p, context_p->token.type);\n    return;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  parser_stack_push_uint8 (context_p, context_p->token.type);\n} /* parser_append_binary_token */\n\n/**\n * Emit opcode for binary computations.\n */\nstatic void\nparser_process_binary_opcodes (parser_context_t *context_p, /**< context */\n                               uint8_t min_prec_treshold) /**< minimal precedence of tokens */\n{\n  while (true)\n  {\n    uint8_t token = context_p->stack_top_uint8;\n    cbc_opcode_t opcode;\n\n    /* For left-to-right operators (all binary operators except assignment\n     * and logical operators), the byte code is flushed if the precedence\n     * of the next operator is less or equal than the current operator. For\n     * assignment and logical operators, we add 1 to the min precendence to\n     * force right-to-left evaluation order. */\n\n    if (!LEXER_IS_BINARY_OP_TOKEN (token)\n        || parser_binary_precedence_table[token - LEXER_FIRST_BINARY_OP] < min_prec_treshold)\n    {\n      return;\n    }\n\n    parser_push_result (context_p);\n    parser_stack_pop_uint8 (context_p);\n\n    if (token == LEXER_ASSIGN)\n    {\n      opcode = (cbc_opcode_t) context_p->stack_top_uint8;\n      parser_stack_pop_uint8 (context_p);\n\n      uint16_t index = PARSER_INVALID_LITERAL_INDEX;\n\n      if (cbc_flags[opcode] & CBC_HAS_LITERAL_ARG)\n      {\n        JERRY_ASSERT (opcode == CBC_ASSIGN_SET_IDENT\n                      || opcode == CBC_ASSIGN_PROP_LITERAL\n                      || opcode == CBC_ASSIGN_PROP_THIS_LITERAL\n                      || opcode == CBC_ASSIGN_LET_CONST\n                      || opcode == CBC_INIT_ARG_OR_CATCH\n                      || opcode == CBC_INIT_LET\n                      || opcode == CBC_INIT_CONST);\n\n        index = parser_stack_pop_uint16 (context_p);\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      bool group_expr_assingment = false;\n\n      if (JERRY_UNLIKELY (context_p->stack_top_uint8 == LEXER_ASSIGN_GROUP_EXPR))\n      {\n        group_expr_assingment = true;\n        parser_stack_pop_uint8 (context_p);\n      }\n\n      if (JERRY_UNLIKELY (context_p->stack_top_uint8 == LEXER_ASSIGN_CONST))\n      {\n        parser_stack_pop_uint8 (context_p);\n        parser_emit_cbc_ext (context_p, CBC_EXT_THROW_ASSIGN_CONST_ERROR);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (index != PARSER_INVALID_LITERAL_INDEX)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (!group_expr_assingment)\n        {\n          uint16_t function_literal_index = parser_check_anonymous_function_declaration (context_p);\n\n          if (function_literal_index == PARSER_ANONYMOUS_CLASS)\n          {\n            uint16_t name_index = scanner_save_literal (context_p, index);\n            parser_emit_cbc_ext_literal (context_p, CBC_EXT_SET_CLASS_NAME, name_index);\n          }\n          else if (function_literal_index < PARSER_NAMED_FUNCTION)\n          {\n            parser_set_function_name (context_p, function_literal_index, (uint16_t) index, 0);\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL\n            && opcode == CBC_ASSIGN_SET_IDENT)\n        {\n          JERRY_ASSERT (CBC_ARGS_EQ (CBC_ASSIGN_LITERAL_SET_IDENT,\n                                     CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));\n\n          context_p->last_cbc.value = index;\n          context_p->last_cbc_opcode = CBC_ASSIGN_LITERAL_SET_IDENT;\n          continue;\n        }\n\n        parser_emit_cbc_literal (context_p, (uint16_t) opcode, index);\n\n        if (opcode == CBC_ASSIGN_PROP_THIS_LITERAL\n            && (context_p->stack_depth >= context_p->stack_limit))\n        {\n          /* Stack limit is increased for VM_OC_ASSIGN_PROP_THIS. Needed by vm.c. */\n          JERRY_ASSERT (context_p->stack_depth == context_p->stack_limit);\n\n          context_p->stack_limit++;\n\n          if (context_p->stack_limit > PARSER_MAXIMUM_STACK_LIMIT)\n          {\n            parser_raise_error (context_p, PARSER_ERR_STACK_LIMIT_REACHED);\n          }\n        }\n        continue;\n      }\n    }\n    else if (LEXER_IS_BINARY_LVALUE_OP_TOKEN (token))\n    {\n      parser_stack_push_uint8 (context_p, CBC_ASSIGN);\n      parser_stack_push_uint8 (context_p, LEXER_ASSIGN);\n      parser_stack_push_uint8 (context_p, lexer_convert_binary_lvalue_token_to_binary (token));\n      continue;\n    }\n    else if (token == LEXER_LOGICAL_OR || token == LEXER_LOGICAL_AND)\n    {\n      parser_branch_t branch;\n      parser_stack_pop (context_p, &branch, sizeof (parser_branch_t));\n      parser_set_branch_to_current_position (context_p, &branch);\n      continue;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (token == LEXER_NULLISH_COALESCING)\n    {\n      parser_branch_t branch;\n      parser_stack_pop (context_p, &branch, sizeof (parser_branch_t));\n      parser_set_branch_to_current_position (context_p, &branch);\n      continue;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else\n    {\n      opcode = LEXER_BINARY_OP_TOKEN_TO_OPCODE (token);\n\n      if (PARSER_IS_PUSH_NUMBER (context_p->last_cbc_opcode))\n      {\n        lexer_convert_push_number_to_push_literal (context_p);\n      }\n\n      if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n      {\n        JERRY_ASSERT (CBC_SAME_ARGS (context_p->last_cbc_opcode, opcode + CBC_BINARY_WITH_LITERAL));\n        context_p->last_cbc_opcode = (uint16_t) (opcode + CBC_BINARY_WITH_LITERAL);\n        continue;\n      }\n      else if (context_p->last_cbc_opcode == CBC_PUSH_TWO_LITERALS)\n      {\n        JERRY_ASSERT (CBC_ARGS_EQ (opcode + CBC_BINARY_WITH_TWO_LITERALS,\n                                   CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));\n        context_p->last_cbc_opcode = (uint16_t) (opcode + CBC_BINARY_WITH_TWO_LITERALS);\n        continue;\n      }\n    }\n    parser_emit_cbc (context_p, (uint16_t) opcode);\n  }\n} /* parser_process_binary_opcodes */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * End position marker of a pattern.\n */\ntypedef struct\n{\n  scanner_location_t location; /**< end position of the pattern */\n  lexer_token_t token; /**< token at the end position */\n} parser_pattern_end_marker_t;\n\n/**\n * Literal index should not be emitted while processing rhs target value\n */\n#define PARSER_PATTERN_RHS_NO_LIT PARSER_INVALID_LITERAL_INDEX\n\n/**\n * Process the target of an initializer pattern.\n */\nstatic parser_pattern_end_marker_t\nparser_pattern_get_target (parser_context_t *context_p, /**< context */\n                           parser_pattern_flags_t flags) /**< flags */\n{\n  parser_pattern_end_marker_t end_marker;\n  end_marker.token.type = LEXER_INVALID_PATTERN;\n  parser_branch_t skip_init;\n\n  if (flags & PARSER_PATTERN_TARGET_DEFAULT)\n  {\n    JERRY_ASSERT (flags & PARSER_PATTERN_TARGET_ON_STACK);\n\n    parser_emit_cbc_ext_forward_branch (context_p, CBC_EXT_DEFAULT_INITIALIZER, &skip_init);\n  }\n\n  if ((flags & (PARSER_PATTERN_TARGET_ON_STACK | PARSER_PATTERN_TARGET_DEFAULT)) != PARSER_PATTERN_TARGET_ON_STACK)\n  {\n    scanner_location_t start_location;\n\n    if (context_p->next_scanner_info_p->source_p != context_p->source_p\n        || context_p->next_scanner_info_p->type == SCANNER_TYPE_ERR_REDECLARED\n        || (flags & PARSER_PATTERN_REST_ELEMENT))\n    {\n      /* Found invalid pattern, push null value to fake the rhs target. */\n      parser_emit_cbc (context_p, CBC_PUSH_NULL);\n    }\n    else\n    {\n      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER);\n      scanner_get_location (&start_location, context_p);\n\n      scanner_set_location (context_p, &((scanner_location_info_t *) context_p->next_scanner_info_p)->location);\n      scanner_release_next (context_p, sizeof (scanner_location_info_t));\n      scanner_seek (context_p);\n      lexer_next_token (context_p);\n\n      parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n      scanner_get_location (&(end_marker.location), context_p);\n      end_marker.token = context_p->token;\n\n      scanner_set_location (context_p, &start_location);\n      scanner_seek (context_p);\n      parser_flush_cbc (context_p);\n    }\n  }\n\n  if (flags & PARSER_PATTERN_TARGET_DEFAULT)\n  {\n    parser_set_branch_to_current_position (context_p, &skip_init);\n  }\n\n  return end_marker;\n} /* parser_pattern_get_target */\n\n/**\n * Finalize an assignment/binding pattern.\n */\nstatic void\nparser_pattern_finalize (parser_context_t *context_p, /**< context */\n                         parser_pattern_flags_t flags, /**< flags */\n                         parser_pattern_end_marker_t *end_marker_p) /**< pattern end position  */\n{\n  if ((flags & (PARSER_PATTERN_TARGET_ON_STACK | PARSER_PATTERN_TARGET_DEFAULT)) != PARSER_PATTERN_TARGET_ON_STACK)\n  {\n    if (end_marker_p->token.type == LEXER_INVALID_PATTERN)\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_DESTRUCTURING_PATTERN);\n    }\n\n    scanner_set_location (context_p, &(end_marker_p->location));\n    context_p->token = end_marker_p->token;\n  }\n  else\n  {\n    JERRY_ASSERT (!(flags & PARSER_PATTERN_TARGET_DEFAULT));\n    lexer_next_token (context_p);\n  }\n\n  if ((flags & (PARSER_PATTERN_BINDING | PARSER_PATTERN_NESTED_PATTERN)) == PARSER_PATTERN_BINDING)\n  {\n    /* Pop the result of the expression. */\n    parser_emit_cbc (context_p, CBC_POP);\n  }\n\n  parser_flush_cbc (context_p);\n} /* parser_pattern_finalize */\n\n/**\n * Emit right-hand-side target value.\n */\nstatic void\nparser_pattern_emit_rhs (parser_context_t *context_p, /**< context */\n                         uint16_t rhs_opcode, /**< opcode to process the rhs value */\n                         uint16_t literal_index) /**< literal index for object pattern */\n{\n  if (literal_index != PARSER_PATTERN_RHS_NO_LIT)\n  {\n    parser_emit_cbc_ext_literal (context_p, rhs_opcode, literal_index);\n  }\n  else\n  {\n    parser_emit_cbc_ext (context_p, rhs_opcode);\n  }\n} /* parser_pattern_emit_rhs */\n\n/**\n * Form an assignment from a pattern.\n */\nstatic void\nparser_pattern_form_assignment (parser_context_t *context_p, /**< context */\n                                parser_pattern_flags_t flags, /**< flags */\n                                uint16_t rhs_opcode, /**< opcode to process the rhs value */\n                                uint16_t literal_index, /**< literal index for object pattern */\n                                parser_line_counter_t ident_line_counter) /**< identifier line counter */\n{\n  JERRY_UNUSED (ident_line_counter);\n\n  uint16_t name_index = PARSER_INVALID_LITERAL_INDEX;\n\n  if ((flags & PARSER_PATTERN_BINDING)\n      || (context_p->last_cbc_opcode == CBC_PUSH_LITERAL\n          && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL))\n  {\n    name_index = context_p->lit_object.index;\n  }\n\n  parser_stack_push_uint8 (context_p, LEXER_EXPRESSION_START);\n  uint8_t assign_opcode = parser_append_binary_single_assignment_token (context_p, flags);\n\n  int32_t stack_adjustment = (CBC_STACK_ADJUST_BASE - (cbc_flags[assign_opcode] >> CBC_STACK_ADJUST_SHIFT));\n  JERRY_ASSERT (stack_adjustment >= 1 && stack_adjustment <= 3);\n\n  rhs_opcode = (uint16_t) (rhs_opcode + stack_adjustment - 1);\n\n  parser_pattern_emit_rhs (context_p, rhs_opcode, literal_index);\n\n  if (context_p->token.type == LEXER_ASSIGN && !(flags & PARSER_PATTERN_REST_ELEMENT))\n  {\n    parser_branch_t skip_init;\n    lexer_next_token (context_p);\n    parser_emit_cbc_ext_forward_branch (context_p, CBC_EXT_DEFAULT_INITIALIZER, &skip_init);\n\n    parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n    if (name_index != PARSER_INVALID_LITERAL_INDEX)\n    {\n      uint16_t function_literal_index = parser_check_anonymous_function_declaration (context_p);\n\n      if (function_literal_index == PARSER_ANONYMOUS_CLASS)\n      {\n        name_index = scanner_save_literal (context_p, name_index);\n        parser_emit_cbc_ext_literal (context_p, CBC_EXT_SET_CLASS_NAME, name_index);\n      }\n      else if (function_literal_index < PARSER_NAMED_FUNCTION)\n      {\n        parser_set_function_name (context_p, function_literal_index, name_index, 0);\n      }\n    }\n    parser_set_branch_to_current_position (context_p, &skip_init);\n  }\n\n  parser_process_binary_opcodes (context_p, 0);\n\n  JERRY_ASSERT (context_p->stack_top_uint8 == LEXER_EXPRESSION_START);\n  parser_stack_pop_uint8 (context_p);\n\n#if ENABLED (JERRY_DEBUGGER)\n  if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      && ident_line_counter != context_p->last_breakpoint_line)\n  {\n    parser_emit_cbc (context_p, CBC_BREAKPOINT_DISABLED);\n    parser_flush_cbc (context_p);\n\n    parser_append_breakpoint_info (context_p, JERRY_DEBUGGER_BREAKPOINT_LIST, ident_line_counter);\n\n    context_p->last_breakpoint_line = ident_line_counter;\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_LINE_INFO)\n  if (ident_line_counter != context_p->last_line_info_line)\n  {\n    parser_emit_line_info (context_p, ident_line_counter, false);\n  }\n#endif /* ENABLED (JERRY_LINE_INFO) */\n} /* parser_pattern_form_assignment */\n\n/**\n * Parse pattern inside a pattern.\n */\nstatic void\nparser_pattern_process_nested_pattern (parser_context_t *context_p, /**< context */\n                                       parser_pattern_flags_t flags, /**< flags */\n                                       uint16_t rhs_opcode, /**< opcode to process the rhs value */\n                                       uint16_t literal_index) /**< literal index for object pattern */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_LEFT_BRACE || context_p->token.type == LEXER_LEFT_SQUARE);\n\n  parser_pattern_flags_t options = (PARSER_PATTERN_NESTED_PATTERN\n                                    | PARSER_PATTERN_TARGET_ON_STACK\n                                    | (flags & (PARSER_PATTERN_BINDING\n                                                | PARSER_PATTERN_LET\n                                                | PARSER_PATTERN_CONST\n                                                | PARSER_PATTERN_LOCAL\n                                                | PARSER_PATTERN_ARGUMENTS)));\n\n  JERRY_ASSERT (context_p->next_scanner_info_p->source_p != context_p->source_p\n                || context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER\n                || context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS);\n\n  if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n  {\n    if (context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER)\n    {\n      if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)\n      {\n        options |= PARSER_PATTERN_HAS_REST_ELEMENT;\n      }\n\n      if (!(flags & PARSER_PATTERN_REST_ELEMENT))\n      {\n        options |= PARSER_PATTERN_TARGET_DEFAULT;\n      }\n      else\n      {\n        scanner_release_next (context_p, sizeof (scanner_location_info_t));\n      }\n    }\n    else\n    {\n      if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)\n      {\n        options |= PARSER_PATTERN_HAS_REST_ELEMENT;\n      }\n      scanner_release_next (context_p, sizeof (scanner_info_t));\n    }\n  }\n\n  parser_pattern_emit_rhs (context_p, rhs_opcode, literal_index);\n\n  if (context_p->token.type == LEXER_LEFT_BRACE)\n  {\n    parser_parse_object_initializer (context_p, options);\n  }\n  else\n  {\n    parser_parse_array_initializer (context_p, options);\n  }\n\n  parser_emit_cbc (context_p, CBC_POP);\n} /* parser_pattern_process_nested_pattern */\n\n/**\n * Process the current {Binding, Assignment}Property\n *\n * @return true, if a nested pattern is processed, false otherwise\n */\nstatic bool\nparser_pattern_process_assignment (parser_context_t *context_p, /**< context */\n                                   parser_pattern_flags_t flags, /**< flags */\n                                   uint16_t rhs_opcode, /**< opcode to process the rhs value */\n                                   uint16_t literal_index, /**< literal index for object pattern */\n                                   lexer_token_type_t end_type) /**< end type token */\n{\n  if ((context_p->token.type == LEXER_LEFT_BRACE || context_p->token.type == LEXER_LEFT_SQUARE)\n      && (context_p->next_scanner_info_p->source_p != context_p->source_p\n          || !(context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_NO_DESTRUCTURING)))\n  {\n    parser_pattern_process_nested_pattern (context_p, flags, rhs_opcode, literal_index);\n    return true;\n  }\n\n  parser_line_counter_t ident_line_counter = context_p->token.line;\n\n  if (flags & PARSER_PATTERN_BINDING)\n  {\n    if (context_p->token.type != LEXER_LITERAL || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n    {\n      parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n    }\n\n    lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_IDENT_LITERAL);\n\n    if (flags & (PARSER_PATTERN_LET | PARSER_PATTERN_CONST)\n        && context_p->token.keyword_type == LEXER_KEYW_LET)\n    {\n      parser_raise_error (context_p, PARSER_ERR_LEXICAL_LET_BINDING);\n    }\n\n    if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n    {\n      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_ERR_REDECLARED);\n      parser_raise_error (context_p, PARSER_ERR_VARIABLE_REDECLARED);\n    }\n\n    if (flags & PARSER_PATTERN_ARGUMENTS)\n    {\n      if (context_p->lit_object.literal_p->status_flags & LEXER_FLAG_FUNCTION_ARGUMENT)\n      {\n        parser_raise_error (context_p, PARSER_ERR_VARIABLE_REDECLARED);\n      }\n      context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_FUNCTION_ARGUMENT;\n    }\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    parser_module_append_export_name (context_p);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n    parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_LITERAL);\n    lexer_next_token (context_p);\n\n    if (context_p->token.type != end_type\n        && context_p->token.type != LEXER_ASSIGN\n        && context_p->token.type != LEXER_COMMA)\n    {\n      parser_raise_error (context_p, PARSER_ERR_ILLEGAL_PROPERTY_IN_DECLARATION);\n    }\n  }\n  else\n  {\n    /* RHS should be evaulated first */\n    parser_pattern_emit_rhs (context_p, rhs_opcode, literal_index);\n\n    parser_flush_cbc (context_p);\n    parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA | PARSE_EXPR_LEFT_HAND_SIDE);\n\n    if (!PARSER_IS_PUSH_LITERAL (context_p->last_cbc_opcode) && !PARSER_IS_PUSH_PROP (context_p->last_cbc_opcode))\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_DESTRUCTURING_PATTERN);\n    }\n\n    rhs_opcode = CBC_EXT_MOVE;\n    literal_index = PARSER_PATTERN_RHS_NO_LIT;\n  }\n\n  parser_pattern_form_assignment (context_p, flags, rhs_opcode, literal_index, ident_line_counter);\n  return false;\n} /* parser_pattern_process_assignment */\n\n/**\n * Parse array initializer.\n */\nstatic void\nparser_parse_array_initializer (parser_context_t *context_p, /**< context */\n                                parser_pattern_flags_t flags) /**< flags */\n{\n  parser_pattern_end_marker_t end_pos = parser_pattern_get_target (context_p, flags);\n\n  lexer_next_token (context_p);\n  parser_emit_cbc_ext (context_p, CBC_EXT_GET_ITERATOR);\n\n  while (context_p->token.type != LEXER_RIGHT_SQUARE)\n  {\n    uint16_t rhs_opcode = CBC_EXT_ITERATOR_STEP;\n\n    if (context_p->token.type == LEXER_COMMA)\n    {\n      parser_emit_cbc_ext (context_p, rhs_opcode);\n      parser_emit_cbc (context_p, CBC_POP);\n      lexer_next_token (context_p);\n      continue;\n    }\n\n    parser_pattern_flags_t options = flags;\n\n    if (context_p->token.type == LEXER_THREE_DOTS)\n    {\n      lexer_next_token (context_p);\n      rhs_opcode = CBC_EXT_REST_INITIALIZER;\n      options |= PARSER_PATTERN_REST_ELEMENT;\n    }\n\n    parser_pattern_process_assignment (context_p, options, rhs_opcode, PARSER_PATTERN_RHS_NO_LIT, LEXER_RIGHT_SQUARE);\n\n    if (context_p->token.type == LEXER_COMMA && rhs_opcode != CBC_EXT_REST_INITIALIZER)\n    {\n      lexer_next_token (context_p);\n    }\n    else if (context_p->token.type != LEXER_RIGHT_SQUARE)\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_DESTRUCTURING_PATTERN);\n    }\n  }\n\n  /* close the iterator */\n  parser_emit_cbc_ext (context_p, CBC_EXT_ITERATOR_CLOSE);\n\n  parser_pattern_finalize (context_p, flags, &end_pos);\n} /* parser_parse_array_initializer */\n\n/**\n * Parse object initializer.\n */\nstatic void\nparser_parse_object_initializer (parser_context_t *context_p, /**< context */\n                                 parser_pattern_flags_t flags) /**< flags */\n{\n  parser_pattern_end_marker_t end_pos = parser_pattern_get_target (context_p, flags);\n\n  /* 12.14.5.2:  ObjectAssignmentPattern : { } */\n  if (lexer_check_next_character (context_p, LIT_CHAR_RIGHT_BRACE))\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_REQUIRE_OBJECT_COERCIBLE);\n    lexer_consume_next_character (context_p);\n    parser_pattern_finalize (context_p, flags, &end_pos);\n    return;\n  }\n\n  if (flags & PARSER_PATTERN_HAS_REST_ELEMENT)\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_INITIALIZER_PUSH_LIST);\n  }\n\n  while (true)\n  {\n    lexer_expect_object_literal_id (context_p, LEXER_OBJ_IDENT_OBJECT_PATTERN);\n\n    uint16_t prop_index = context_p->lit_object.index;\n    parser_line_counter_t start_line = context_p->token.line;\n    parser_line_counter_t start_column = context_p->token.column;\n    uint16_t push_prop_opcode = CBC_EXT_INITIALIZER_PUSH_PROP_LITERAL;\n\n    if (context_p->token.type == LEXER_RIGHT_BRACE)\n    {\n      break;\n    }\n\n    if (context_p->token.type == LEXER_THREE_DOTS)\n    {\n      lexer_next_token (context_p);\n\n      flags |= PARSER_PATTERN_REST_ELEMENT;\n\n      if (parser_pattern_process_assignment (context_p,\n                                             flags,\n                                             CBC_EXT_INITIALIZER_PUSH_REST,\n                                             PARSER_PATTERN_RHS_NO_LIT,\n                                             LEXER_RIGHT_BRACE))\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_LHS_ASSIGNMENT);\n      }\n\n      if (context_p->token.type != LEXER_RIGHT_BRACE)\n      {\n        parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED);\n      }\n\n      /* Checked at the end because there might be syntax errors before. */\n      JERRY_ASSERT (flags & PARSER_PATTERN_HAS_REST_ELEMENT);\n      break;\n    }\n\n    if (context_p->token.type == LEXER_RIGHT_SQUARE)\n    {\n      prop_index = PARSER_PATTERN_RHS_NO_LIT;\n      push_prop_opcode = ((flags & PARSER_PATTERN_HAS_REST_ELEMENT) ? CBC_EXT_INITIALIZER_PUSH_NAME\n                                                                    : CBC_EXT_INITIALIZER_PUSH_PROP);\n    }\n    else if (flags & PARSER_PATTERN_HAS_REST_ELEMENT)\n    {\n      push_prop_opcode = CBC_EXT_INITIALIZER_PUSH_NAME_LITERAL;\n    }\n\n    if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n    {\n      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_ERR_REDECLARED);\n      parser_raise_error (context_p, PARSER_ERR_VARIABLE_REDECLARED);\n    }\n\n    lexer_next_token (context_p);\n\n    if (context_p->token.type == LEXER_COLON)\n    {\n      lexer_next_token (context_p);\n      parser_pattern_process_assignment (context_p, flags, push_prop_opcode, prop_index, LEXER_RIGHT_BRACE);\n    }\n    else\n    {\n      if (push_prop_opcode == CBC_EXT_INITIALIZER_PUSH_NAME\n          || push_prop_opcode == CBC_EXT_INITIALIZER_PUSH_PROP)\n      {\n        parser_raise_error (context_p, PARSER_ERR_COLON_EXPECTED);\n      }\n\n      if (context_p->token.type != LEXER_RIGHT_BRACE\n          && context_p->token.type != LEXER_ASSIGN\n          && context_p->token.type != LEXER_COMMA)\n      {\n        parser_raise_error (context_p, PARSER_ERR_OBJECT_ITEM_SEPARATOR_EXPECTED);\n      }\n\n      parser_reparse_as_common_identifier (context_p, start_line, start_column);\n\n      if (flags & PARSER_PATTERN_ARGUMENTS)\n      {\n        if (context_p->lit_object.literal_p->status_flags & LEXER_FLAG_FUNCTION_ARGUMENT)\n        {\n          parser_raise_error (context_p, PARSER_ERR_VARIABLE_REDECLARED);\n        }\n        context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_FUNCTION_ARGUMENT;\n      }\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      parser_module_append_export_name (context_p);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n      parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_LITERAL);\n\n      lexer_next_token (context_p);\n      JERRY_ASSERT (context_p->token.type == LEXER_RIGHT_BRACE\n                    || context_p->token.type == LEXER_ASSIGN\n                    || context_p->token.type == LEXER_COMMA);\n\n      parser_pattern_form_assignment (context_p, flags, push_prop_opcode, prop_index, start_line);\n    }\n\n    if (context_p->token.type == LEXER_RIGHT_BRACE)\n    {\n      break;\n    }\n    else if (context_p->token.type != LEXER_COMMA)\n    {\n      parser_raise_error (context_p, PARSER_ERR_OBJECT_ITEM_SEPARATOR_EXPECTED);\n    }\n  }\n\n  parser_pattern_finalize (context_p, flags, &end_pos);\n} /* parser_parse_object_initializer */\n\n/**\n * Parse an initializer.\n */\nvoid\nparser_parse_initializer (parser_context_t *context_p, /**< context */\n                          parser_pattern_flags_t flags) /**< flags */\n{\n  if (context_p->token.type == LEXER_LEFT_BRACE)\n  {\n    parser_parse_object_initializer (context_p, flags);\n  }\n  else\n  {\n    JERRY_ASSERT (context_p->token.type == LEXER_LEFT_SQUARE);\n    parser_parse_array_initializer (context_p, flags);\n  }\n} /* parser_parse_initializer */\n\n/**\n * Parse an initializer using the next character.\n */\nvoid\nparser_parse_initializer_by_next_char (parser_context_t *context_p, /**< context */\n                                       parser_pattern_flags_t flags) /**< flags */\n{\n  JERRY_ASSERT (lexer_check_next_characters (context_p, LIT_CHAR_LEFT_SQUARE, LIT_CHAR_LEFT_BRACE));\n\n  if (lexer_consume_next_character (context_p) == LIT_CHAR_LEFT_BRACE)\n  {\n    if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n    {\n      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER\n                    || context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS);\n\n      if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)\n      {\n        flags |= PARSER_PATTERN_HAS_REST_ELEMENT;\n      }\n\n      if (context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS)\n      {\n        scanner_release_next (context_p, sizeof (scanner_info_t));\n      }\n    }\n\n    parser_parse_object_initializer (context_p, flags);\n  }\n  else\n  {\n    parser_parse_array_initializer (context_p, flags);\n  }\n} /* parser_parse_initializer_by_next_char */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Process ternary expression.\n */\nstatic void\nparser_process_ternary_expression (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_QUESTION_MARK);\n\n  cbc_opcode_t opcode = CBC_BRANCH_IF_FALSE_FORWARD;\n  parser_branch_t cond_branch;\n  parser_branch_t uncond_branch;\n\n  parser_push_result (context_p);\n\n  if (context_p->last_cbc_opcode == CBC_LOGICAL_NOT)\n  {\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n    opcode = CBC_BRANCH_IF_TRUE_FORWARD;\n  }\n\n  parser_emit_cbc_forward_branch (context_p, (uint16_t) opcode, &cond_branch);\n\n  lexer_next_token (context_p);\n  parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n  parser_emit_cbc_forward_branch (context_p, CBC_JUMP_FORWARD, &uncond_branch);\n  parser_set_branch_to_current_position (context_p, &cond_branch);\n\n  /* Although byte code is constructed for two branches,\n   * only one of them will be executed. To reflect this\n   * the stack is manually adjusted. */\n  JERRY_ASSERT (context_p->stack_depth > 0);\n  context_p->stack_depth--;\n\n  if (context_p->token.type != LEXER_COLON)\n  {\n    parser_raise_error (context_p, PARSER_ERR_COLON_FOR_CONDITIONAL_EXPECTED);\n  }\n\n  lexer_next_token (context_p);\n\n  parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n  parser_set_branch_to_current_position (context_p, &uncond_branch);\n\n  /* Last opcode rewrite is not allowed because\n   * the result may come from the first branch. */\n  parser_flush_cbc (context_p);\n\n  parser_process_binary_opcodes (context_p, 0);\n} /* parser_process_ternary_expression */\n\n/**\n * Process expression sequence.\n */\nstatic void\nparser_process_expression_sequence (parser_context_t *context_p) /**< context */\n{\n  if (!CBC_NO_RESULT_OPERATION (context_p->last_cbc_opcode))\n  {\n    parser_emit_cbc (context_p, CBC_POP);\n  }\n\n  if (context_p->stack_top_uint8 == LEXER_LEFT_PAREN)\n  {\n    parser_mem_page_t *page_p = context_p->stack.first_p;\n\n    JERRY_ASSERT (page_p != NULL);\n\n    page_p->bytes[context_p->stack.last_position - 1] = LEXER_COMMA_SEP_LIST;\n    context_p->stack_top_uint8 = LEXER_COMMA_SEP_LIST;\n  }\n\n  lexer_next_token (context_p);\n} /* parser_process_expression_sequence */\n\n/**\n * Process group expression.\n */\nstatic void\nparser_process_group_expression (parser_context_t *context_p, /**< context */\n                                 size_t *grouping_level_p) /**< grouping level */\n{\n  JERRY_ASSERT (*grouping_level_p >= PARSER_GROUPING_LEVEL_INCREASE);\n  (*grouping_level_p) -= PARSER_GROUPING_LEVEL_INCREASE;\n\n  uint8_t token = context_p->stack_top_uint8;\n\n  if (token == LEXER_COMMA_SEP_LIST)\n  {\n    parser_push_result (context_p);\n    parser_flush_cbc (context_p);\n  }\n\n  parser_stack_pop_uint8 (context_p);\n  lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  /* Lookahead for anonymous function declaration after '=' token when the assignment base is LHS expression\n     with a single indentifier in it. e.g.: (a) = function () {} */\n  if (JERRY_UNLIKELY (context_p->token.type == LEXER_ASSIGN\n                      && PARSER_IS_PUSH_LITERALS_WITH_THIS (context_p->last_cbc_opcode)\n                      && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL\n                      && parser_is_assignment_expr (context_p)\n                      && *grouping_level_p != PARSE_EXPR_LEFT_HAND_SIDE))\n  {\n    parser_stack_push_uint8 (context_p, LEXER_ASSIGN_GROUP_EXPR);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* parser_process_group_expression */\n\n/**\n * Parse block expression.\n */\nvoid\nparser_parse_block_expression (parser_context_t *context_p, /**< context */\n                               int options) /**< option flags */\n{\n  parser_parse_expression (context_p, options | PARSE_EXPR_NO_PUSH_RESULT);\n\n  if (CBC_NO_RESULT_OPERATION (context_p->last_cbc_opcode))\n  {\n    JERRY_ASSERT (CBC_SAME_ARGS (context_p->last_cbc_opcode, context_p->last_cbc_opcode + 2));\n    PARSER_PLUS_EQUAL_U16 (context_p->last_cbc_opcode, 2);\n    parser_flush_cbc (context_p);\n  }\n  else\n  {\n    parser_emit_cbc (context_p, CBC_POP_BLOCK);\n  }\n} /* parser_parse_block_expression */\n\n/**\n * Parse expression statement.\n */\nvoid\nparser_parse_expression_statement (parser_context_t *context_p, /**< context */\n                                   int options) /**< option flags */\n{\n  parser_parse_expression (context_p, options | PARSE_EXPR_NO_PUSH_RESULT);\n\n  if (!CBC_NO_RESULT_OPERATION (context_p->last_cbc_opcode))\n  {\n    parser_emit_cbc (context_p, CBC_POP);\n  }\n} /* parser_parse_expression_statement */\n\nJERRY_STATIC_ASSERT (PARSE_EXPR_LEFT_HAND_SIDE == 0x1,\n                     value_of_parse_expr_left_hand_side_must_be_1);\n\n/**\n * Parse expression.\n */\nvoid\nparser_parse_expression (parser_context_t *context_p, /**< context */\n                         int options) /**< option flags */\n{\n  size_t grouping_level = (options & PARSE_EXPR_LEFT_HAND_SIDE);\n\n  parser_stack_push_uint8 (context_p, LEXER_EXPRESSION_START);\n\n  if (options & PARSE_EXPR_HAS_LITERAL)\n  {\n    JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_LITERAL);\n    goto process_unary_expression;\n  }\n\n  while (true)\n  {\n    if (parser_parse_unary_expression (context_p, &grouping_level))\n    {\n      parser_process_binary_opcodes (context_p, 0);\n      break;\n    }\n\n    while (true)\n    {\nprocess_unary_expression:\n      parser_process_unary_expression (context_p, grouping_level);\n\n      if (JERRY_LIKELY (grouping_level != PARSE_EXPR_LEFT_HAND_SIDE))\n      {\n        uint8_t min_prec_treshold = 0;\n\n        if (LEXER_IS_BINARY_OP_TOKEN (context_p->token.type))\n        {\n#if ENABLED (JERRY_ESNEXT)\n          if (JERRY_UNLIKELY (context_p->token.type == LEXER_NULLISH_COALESCING))\n          {\n            parser_check_invalid_logical_op (context_p, LEXER_LOGICAL_OR, LEXER_LOGICAL_AND);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          min_prec_treshold = parser_binary_precedence_table[context_p->token.type - LEXER_FIRST_BINARY_OP];\n\n#if ENABLED (JERRY_ESNEXT)\n          /* Check for BINARY_LVALUE tokens + LEXER_LOGICAL_OR + LEXER_LOGICAL_AND + LEXER_EXPONENTIATION */\n          if ((min_prec_treshold == PARSER_RIGHT_TO_LEFT_ORDER_EXPONENTIATION)\n              || (min_prec_treshold <= PARSER_RIGHT_TO_LEFT_ORDER_MAX_PRECEDENCE\n                  && min_prec_treshold != PARSER_RIGHT_TO_LEFT_ORDER_TERNARY_PRECEDENCE))\n          {\n            /* Right-to-left evaluation order. */\n            min_prec_treshold++;\n          }\n#else /* !ENABLED (JERRY_ESNEXT) */\n          /* Check for BINARY_LVALUE tokens + LEXER_LOGICAL_OR + LEXER_LOGICAL_AND */\n          if (min_prec_treshold <= PARSER_RIGHT_TO_LEFT_ORDER_MAX_PRECEDENCE\n              && min_prec_treshold != PARSER_RIGHT_TO_LEFT_ORDER_TERNARY_PRECEDENCE)\n          {\n            /* Right-to-left evaluation order. */\n            min_prec_treshold++;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        }\n\n        parser_process_binary_opcodes (context_p, min_prec_treshold);\n      }\n      if (context_p->token.type == LEXER_RIGHT_PAREN\n          && (context_p->stack_top_uint8 == LEXER_LEFT_PAREN\n              || context_p->stack_top_uint8 == LEXER_COMMA_SEP_LIST))\n      {\n        parser_process_group_expression (context_p, &grouping_level);\n        continue;\n      }\n\n      break;\n    }\n\n    if (grouping_level == PARSE_EXPR_LEFT_HAND_SIDE)\n    {\n      break;\n    }\n\n    if (JERRY_UNLIKELY (context_p->token.type == LEXER_QUESTION_MARK))\n    {\n      parser_process_ternary_expression (context_p);\n\n      if (context_p->token.type == LEXER_RIGHT_PAREN)\n      {\n        goto process_unary_expression;\n      }\n    }\n    else if (LEXER_IS_BINARY_OP_TOKEN (context_p->token.type))\n    {\n      parser_append_binary_token (context_p);\n      lexer_next_token (context_p);\n      continue;\n    }\n\n    if (JERRY_UNLIKELY (context_p->token.type == LEXER_COMMA)\n        && (!(options & PARSE_EXPR_NO_COMMA) || grouping_level >= PARSER_GROUPING_LEVEL_INCREASE))\n    {\n      parser_process_expression_sequence (context_p);\n      continue;\n    }\n\n    break;\n  }\n\n  if (grouping_level >= PARSER_GROUPING_LEVEL_INCREASE)\n  {\n    parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n  }\n\n  JERRY_ASSERT (context_p->stack_top_uint8 == LEXER_EXPRESSION_START);\n  parser_stack_pop_uint8 (context_p);\n\n  if (!(options & PARSE_EXPR_NO_PUSH_RESULT))\n  {\n    parser_push_result (context_p);\n  }\n} /* parser_parse_expression */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_PARSER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser-internal.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JS_PARSER_INTERNAL_H\n#define JS_PARSER_INTERNAL_H\n\n#include \"common.h\"\n\n#include \"byte-code.h\"\n#include \"debugger.h\"\n#include \"js-parser.h\"\n#include \"js-parser-limits.h\"\n#include \"js-lexer.h\"\n#include \"js-scanner.h\"\n\n#include \"ecma-module.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_internals Internals\n * @{\n */\n\n/**\n * General parser flags.\n */\ntypedef enum\n{\n  PARSER_IS_STRICT = (1u << 0),               /**< strict mode code */\n  PARSER_IS_FUNCTION = (1u << 1),             /**< function body is parsed */\n  PARSER_IS_CLOSURE = (1u << 2),              /**< function body is encapsulated in {} block */\n  PARSER_IS_FUNC_EXPRESSION = (1u << 3),      /**< a function expression is parsed */\n  PARSER_IS_PROPERTY_GETTER = (1u << 4),      /**< a property getter function is parsed */\n  PARSER_IS_PROPERTY_SETTER = (1u << 5),      /**< a property setter function is parsed */\n  PARSER_HAS_NON_STRICT_ARG = (1u << 6),      /**< the function has arguments which\n                                               *   are not supported in strict mode */\n  PARSER_ARGUMENTS_NEEDED = (1u << 7),        /**< arguments object must be created */\n  PARSER_LEXICAL_ENV_NEEDED = (1u << 8),      /**< lexical environment object must be created */\n  PARSER_INSIDE_WITH = (1u << 9),             /**< code block is inside a with statement */\n  PARSER_NO_END_LABEL = (1u << 10),           /**< return instruction must be inserted\n                                               *   after the last byte code */\n  PARSER_DEBUGGER_BREAKPOINT_APPENDED = (1u << 11), /**< pending (unsent) breakpoint\n                                                     *   info is available */\n#if ENABLED (JERRY_ESNEXT)\n  PARSER_LEXICAL_BLOCK_NEEDED = (1u << 12),   /**< global script: needs a lexical environment for let and const\n                                               *   function: needs a lexical environment for arguments */\n  PARSER_IS_ARROW_FUNCTION = (1u << 13),      /**< an arrow function is parsed */\n  PARSER_IS_GENERATOR_FUNCTION = (1u << 14),  /**< a generator function is parsed */\n  PARSER_IS_ASYNC_FUNCTION = (1u << 15),      /**< an async function is parsed */\n  PARSER_DISALLOW_AWAIT_YIELD = (1u << 16),   /**< throw SyntaxError for await / yield keywords */\n  PARSER_FUNCTION_IS_PARSING_ARGS = (1u << 17), /**< set when parsing function arguments */\n  PARSER_FUNCTION_HAS_COMPLEX_ARGUMENT = (1u << 18), /**< function has complex (ES2015+) argument definition */\n  PARSER_FUNCTION_HAS_REST_PARAM = (1u << 19), /**< function has rest parameter */\n  PARSER_CLASS_CONSTRUCTOR = (1u << 20),      /**< a class constructor is parsed\n                                               *   Note: PARSER_ALLOW_SUPER must be present */\n  /* These four status flags must be in this order. See PARSER_SAVED_FLAGS_OFFSET. */\n  PARSER_ALLOW_SUPER = (1u << 21),            /**< allow super property access */\n  PARSER_ALLOW_SUPER_CALL = (1u << 22),       /**< allow super constructor call\n                                               *   Note: PARSER_CLASS_CONSTRUCTOR must be present */\n  PARSER_INSIDE_CLASS_FIELD = (1u << 23),     /**< a class field is being parsed */\n  PARSER_ALLOW_NEW_TARGET = (1u << 24),       /**< allow new.target parsing in the current context */\n  PARSER_IS_METHOD = (1u << 25),              /**< method is parsed */\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  PARSER_MODULE_DEFAULT_CLASS_OR_FUNC = (1u << 26),  /**< parsing a function or class default export */\n  PARSER_MODULE_STORE_IDENT = (1u << 27),     /**< store identifier of the current export statement */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n  PARSER_HAS_LATE_LIT_INIT = (1u << 30),      /**< there are identifier or string literals which construction\n                                               *   is postponed after the local parser data is freed */\n#ifndef JERRY_NDEBUG\n  PARSER_SCANNING_SUCCESSFUL = PARSER_HAS_LATE_LIT_INIT, /**< scanning process was successful */\n#endif /* !JERRY_NDEBUG */\n} parser_general_flags_t;\n\n/**\n * Expression parsing flags.\n */\ntypedef enum\n{\n  PARSE_EXPR = 0,                             /**< parse an expression without any special flags */\n  PARSE_EXPR_LEFT_HAND_SIDE = (1u << 0),      /**< parse a left-hand-side expression */\n  PARSE_EXPR_NO_PUSH_RESULT = (1u << 1),      /**< do not push the result of the expression onto the stack */\n  PARSE_EXPR_NO_COMMA = (1u << 2),            /**< do not parse comma operator */\n  PARSE_EXPR_HAS_LITERAL = (1u << 3),         /**< a primary literal is provided by a\n                                               *   CBC_PUSH_LITERAL instruction  */\n} parser_expression_flags_t;\n\n/**\n * Pattern parsing flags.\n */\ntypedef enum\n{\n  PARSER_PATTERN_NO_OPTS = 0,                  /**< parse the expression after '=' */\n  PARSER_PATTERN_BINDING = (1u << 0),          /**< parse BindingPattern */\n  PARSER_PATTERN_TARGET_ON_STACK = (1u << 1),  /**< assignment target is the topmost element on the stack */\n  PARSER_PATTERN_TARGET_DEFAULT = (1u << 2),   /**< perform default value comparison for assignment target */\n  PARSER_PATTERN_NESTED_PATTERN = (1u << 3),   /**< parse pattern inside a pattern */\n  PARSER_PATTERN_LET = (1u << 4),              /**< pattern is a let declaration */\n  PARSER_PATTERN_CONST = (1u << 5),            /**< pattern is a const declaration */\n  PARSER_PATTERN_LOCAL = (1u << 6),            /**< pattern is a local (catch parameter) declaration */\n  PARSER_PATTERN_REST_ELEMENT = (1u << 7),     /**< parse rest array / object element */\n  PARSER_PATTERN_HAS_REST_ELEMENT = (1u << 8), /**< object literal rest element will be present */\n  PARSER_PATTERN_ARGUMENTS = (1u << 9),        /**< parse arguments binding */\n} parser_pattern_flags_t;\n\n/**\n * Check type for scanner_is_context_needed function.\n */\ntypedef enum\n{\n  PARSER_CHECK_BLOCK_CONTEXT,                  /**< check block context */\n#if ENABLED (JERRY_ESNEXT)\n  PARSER_CHECK_GLOBAL_CONTEXT,                 /**< check global context */\n  PARSER_CHECK_FUNCTION_CONTEXT,               /**< check function context */\n#endif /* ENABLED (JERRY_ESNEXT) */\n} parser_check_context_type_t;\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Class field bits.\n */\ntypedef enum\n{\n  PARSER_CLASS_FIELD_END = (1u << 0),          /**< last class field */\n  PARSER_CLASS_FIELD_NORMAL = (1u << 1),       /**< normal (non-computed) class field */\n  PARSER_CLASS_FIELD_INITIALIZED = (1u << 2),  /**< class field is initialized */\n  PARSER_CLASS_FIELD_STATIC = (1u << 3),       /**< static class field */\n} parser_class_field_type_t;\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Mask for strict mode code\n */\n#define PARSER_STRICT_MODE_MASK 0x1\n\n/**\n * Shorthand for function closure definition\n */\n#define PARSER_FUNCTION_CLOSURE (PARSER_IS_FUNCTION | PARSER_IS_CLOSURE)\n\n#if PARSER_MAXIMUM_CODE_SIZE <= UINT16_MAX\n/**\n * Maximum number of bytes for branch target.\n */\n#define PARSER_MAX_BRANCH_LENGTH 2\n#else /* PARSER_MAXIMUM_CODE_SIZE > UINT16_MAX */\n/**\n * Maximum number of bytes for branch target.\n */\n#define PARSER_MAX_BRANCH_LENGTH 3\n#endif /* PARSER_MAXIMUM_CODE_SIZE <= UINT16_MAX */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Offset of PARSER_ALLOW_SUPER\n */\n#define PARSER_SAVED_FLAGS_OFFSET \\\n  JERRY_LOG2 (PARSER_ALLOW_SUPER)\n\n/**\n * Mask of saved flags\n */\n#define PARSER_SAVED_FLAGS_MASK \\\n  ((1 << (JERRY_LOG2 (PARSER_ALLOW_NEW_TARGET) - JERRY_LOG2 (PARSER_ALLOW_SUPER) + 1)) - 1)\n\n/**\n * Get class option bits from parser_general_flags_t\n */\n#define PARSER_SAVE_STATUS_FLAGS(opts) \\\n  ((uint16_t) (((opts) >> PARSER_SAVED_FLAGS_OFFSET) & PARSER_SAVED_FLAGS_MASK))\n\n/**\n * Mask for get class option bits from ecma_parse_opts_t\n */\n#define PARSER_RESTORE_STATUS_FLAGS_MASK \\\n  (((ECMA_PARSE_ALLOW_NEW_TARGET << 1) - 1) - (ECMA_PARSE_ALLOW_SUPER - 1))\n\n/**\n * Shift for get class option bits from ecma_parse_opts_t\n */\n#define PARSER_RESTORE_STATUS_FLAGS_SHIFT \\\n  (JERRY_LOG2 (PARSER_ALLOW_SUPER) - JERRY_LOG2 (ECMA_PARSE_ALLOW_SUPER))\n\n/**\n * Get class option bits from ecma_parse_opts_t\n */\n#define PARSER_RESTORE_STATUS_FLAGS(opts) \\\n  (((opts) & PARSER_RESTORE_STATUS_FLAGS_MASK) << PARSER_RESTORE_STATUS_FLAGS_SHIFT)\n\n/**\n * All flags that affect exotic arguments object creation.\n */\n#define PARSER_ARGUMENTS_RELATED_FLAGS \\\n  (PARSER_ARGUMENTS_NEEDED | PARSER_FUNCTION_HAS_COMPLEX_ARGUMENT | PARSER_IS_STRICT)\n\n/**\n * Get the corresponding eval flag for a ecma_parse_opts_t flag\n */\n#define PARSER_GET_EVAL_FLAG(type) \\\n  ((type) >> JERRY_LOG2 (ECMA_PARSE_ALLOW_SUPER))\n\n/**\n * Check non-generator async functions\n */\n#define PARSER_IS_NORMAL_ASYNC_FUNCTION(status_flags) \\\n  (((status_flags) & (PARSER_IS_GENERATOR_FUNCTION | PARSER_IS_ASYNC_FUNCTION)) == PARSER_IS_ASYNC_FUNCTION)\n\n#else /* !ENABLED (JERRY_ESNEXT) */\n\n/**\n * All flags that affect exotic arguments object creation.\n */\n#define PARSER_ARGUMENTS_RELATED_FLAGS \\\n  (PARSER_ARGUMENTS_NEEDED | PARSER_IS_STRICT)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Checks whether unmapped arguments are needed. */\n#define PARSER_NEEDS_MAPPED_ARGUMENTS(status_flags) \\\n  (((status_flags) & PARSER_ARGUMENTS_RELATED_FLAGS) == PARSER_ARGUMENTS_NEEDED)\n\n/* The maximum of PARSER_CBC_STREAM_PAGE_SIZE is 127. */\n#define PARSER_CBC_STREAM_PAGE_SIZE \\\n  ((uint32_t) (64 - sizeof (void *)))\n\n/* Defines the size of the max page. */\n#define PARSER_STACK_PAGE_SIZE \\\n  ((uint32_t) (((sizeof (void *) > 4) ? 128 : 64) - sizeof (void *)))\n\n/* Avoid compiler warnings for += operations. */\n#define PARSER_PLUS_EQUAL_U16(base, value) (base) = (uint16_t) ((base) + (value))\n#define PARSER_MINUS_EQUAL_U16(base, value) (base) = (uint16_t) ((base) - (value))\n#define PARSER_PLUS_EQUAL_LC(base, value) (base) = (parser_line_counter_t) ((base) + (value))\n\n/**\n * Argument for a compact-byte code.\n */\ntypedef struct\n{\n  uint16_t literal_index;                     /**< literal index argument */\n  uint16_t value;                             /**< other argument (second literal or byte). */\n  uint16_t third_literal_index;               /**< literal index argument */\n  uint8_t literal_type;                       /**< last literal type */\n  uint8_t literal_keyword_type;               /**< last literal keyword type */\n} cbc_argument_t;\n\n/* Useful parser macros. */\n\n#define PARSER_CBC_UNAVAILABLE CBC_EXT_OPCODE\n\n#define PARSER_TO_EXT_OPCODE(opcode) ((uint16_t) ((opcode) + 256))\n#define PARSER_GET_EXT_OPCODE(opcode) ((opcode) - 256)\n#define PARSER_IS_BASIC_OPCODE(opcode) ((opcode) < 256)\n#define PARSER_IS_PUSH_LITERAL(opcode) \\\n  ((opcode) == CBC_PUSH_LITERAL \\\n   || (opcode) == CBC_PUSH_TWO_LITERALS \\\n   || (opcode) == CBC_PUSH_THREE_LITERALS)\n#define PARSER_IS_PUSH_NUMBER(opcode) \\\n  ((opcode) == CBC_PUSH_NUMBER_0 \\\n   || (opcode) == CBC_PUSH_NUMBER_POS_BYTE \\\n   || (opcode) == CBC_PUSH_NUMBER_NEG_BYTE \\\n   || (opcode) == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_0) \\\n   || (opcode) == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_POS_BYTE) \\\n   || (opcode) == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE))\n\n#define PARSER_IS_MUTABLE_PUSH_LITERAL(opcode) \\\n  ((opcode) >= CBC_PUSH_LITERAL && (opcode) <= CBC_PUSH_THIS_LITERAL)\n\n#define PARSER_IS_PUSH_LITERALS_WITH_THIS(opcode) \\\n  ((opcode) >= CBC_PUSH_LITERAL && (opcode) <= CBC_PUSH_THREE_LITERALS)\n\n#define PARSER_IS_PUSH_PROP(opcode) \\\n  ((opcode) >= CBC_PUSH_PROP && (opcode) <= CBC_PUSH_PROP_THIS_LITERAL)\n\n#define PARSER_IS_PUSH_PROP_LITERAL(opcode) \\\n  ((opcode) >= CBC_PUSH_PROP_LITERAL && (opcode) <= CBC_PUSH_PROP_THIS_LITERAL)\n\n#define PARSER_PUSH_LITERAL_TO_PUSH_PROP_LITERAL(opcode) \\\n  (uint16_t) ((opcode) + (CBC_PUSH_PROP_LITERAL - CBC_PUSH_LITERAL))\n\n#define PARSER_PUSH_PROP_LITERAL_TO_PUSH_LITERAL(opcode) \\\n  (uint16_t) ((opcode) - (CBC_PUSH_PROP_LITERAL - CBC_PUSH_LITERAL))\n\n#define PARSER_PUSH_PROP_TO_PUSH_PROP_REFERENCE(opcode) \\\n  (uint16_t) ((opcode) + (CBC_PUSH_PROP_REFERENCE - CBC_PUSH_PROP))\n\n#define PARSER_PUSH_PROP_REFERENCE_TO_PUSH_PROP(opcode) \\\n  (uint16_t) ((opcode) - (CBC_PUSH_PROP_REFERENCE - CBC_PUSH_PROP))\n\n#define PARSER_GET_LITERAL(literal_index) \\\n  ((lexer_literal_t *) parser_list_get (&context_p->literal_pool, (literal_index)))\n\n#define PARSER_TO_BINARY_OPERATION_WITH_RESULT(opcode) \\\n  (PARSER_TO_EXT_OPCODE(opcode) - CBC_ASSIGN_ADD + CBC_EXT_ASSIGN_ADD_PUSH_RESULT)\n\n#define PARSER_TO_BINARY_OPERATION_WITH_BLOCK(opcode) \\\n  ((uint16_t) (PARSER_TO_EXT_OPCODE(opcode) - CBC_ASSIGN_ADD + CBC_EXT_ASSIGN_ADD_BLOCK))\n\n#define PARSER_GET_FLAGS(op) \\\n  (PARSER_IS_BASIC_OPCODE (op) ? cbc_flags[(op)] : cbc_ext_flags[PARSER_GET_EXT_OPCODE (op)])\n\n#define PARSER_OPCODE_IS_RETURN(op) \\\n  ((op) == CBC_RETURN || (op) == CBC_RETURN_WITH_BLOCK || (op) == CBC_RETURN_WITH_LITERAL)\n\n#define PARSER_ARGS_EQ(op, types) \\\n  ((PARSER_GET_FLAGS (op) & CBC_ARG_TYPES) == (types))\n\n/**\n * All data allocated by the parser is\n * stored in parser_data_pages in the memory.\n */\ntypedef struct parser_mem_page_t\n{\n  struct parser_mem_page_t *next_p;           /**< next page */\n  uint8_t bytes[1];                           /**< memory bytes */\n} parser_mem_page_t;\n\n/**\n * Structure for managing parser memory.\n */\ntypedef struct\n{\n  parser_mem_page_t *first_p;                 /**< first allocated page */\n  parser_mem_page_t *last_p;                  /**< last allocated page */\n  uint32_t last_position;                     /**< position of the last allocated byte */\n} parser_mem_data_t;\n\n/**\n * Parser memory list.\n */\ntypedef struct\n{\n  parser_mem_data_t data;                     /**< storage space */\n  uint32_t page_size;                         /**< size of each page */\n  uint32_t item_size;                         /**< size of each item */\n  uint32_t item_count;                        /**< number of items on each page */\n} parser_list_t;\n\n/**\n * Iterator for parser memory list.\n */\ntypedef struct\n{\n  parser_list_t *list_p;                      /**< parser list */\n  parser_mem_page_t *current_p;               /**< currently processed page */\n  size_t current_position;                    /**< current position on the page */\n} parser_list_iterator_t;\n\n/**\n * Parser memory stack.\n */\ntypedef struct\n{\n  parser_mem_data_t data;                     /**< storage space */\n  parser_mem_page_t *free_page_p;             /**< space for fast allocation */\n} parser_stack_t;\n\n/**\n * Iterator for parser memory stack.\n */\ntypedef struct\n{\n  parser_mem_page_t *current_p;               /**< currently processed page */\n  size_t current_position;                    /**< current position on the page */\n} parser_stack_iterator_t;\n\n/**\n * Branch type.\n */\ntypedef struct\n{\n  parser_mem_page_t *page_p;                  /**< branch location page */\n  uint32_t offset;                            /**< branch location offset */\n} parser_branch_t;\n\n/**\n * Branch chain type.\n */\ntypedef struct parser_branch_node_t\n{\n  struct parser_branch_node_t *next_p;        /**< next linked list node */\n  parser_branch_t branch;                     /**< branch */\n} parser_branch_node_t;\n\n/**\n * Items of scope stack.\n */\ntypedef struct\n{\n  uint16_t map_from;                          /**< original literal index */\n  uint16_t map_to;                            /**< encoded register or literal index and flags */\n} parser_scope_stack_t;\n\n/**\n * This item represents a function literal in the scope stack.\n *\n * When map_from == PARSER_SCOPE_STACK_FUNC:\n *   map_to represents the literal reserved for a function literal\n *   Note: the name of the function is the previous value in the scope stack\n *   Note: map_to is not encoded in this case\n */\n#define PARSER_SCOPE_STACK_FUNC 0xffff\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Mask for decoding the register index of map_to\n */\n#define PARSER_SCOPE_STACK_REGISTER_MASK 0x3fff\n\n/**\n * Function statements with the name specified\n * in map_from should not be copied to global scope.\n */\n#define PARSER_SCOPE_STACK_NO_FUNCTION_COPY 0x8000\n\n/**\n * The scope stack item represents a const binding stored in register\n */\n#define PARSER_SCOPE_STACK_IS_CONST_REG 0x4000\n\n/**\n * The scope stack item represents a binding which has already created with ECMA_VALUE_UNINITIALIZED\n */\n#define PARSER_SCOPE_STACK_IS_LOCAL_CREATED (PARSER_SCOPE_STACK_IS_CONST_REG)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Starting literal index for registers.\n */\n#define PARSER_REGISTER_START 0x8000\n\n/**\n * Invalid literal index\n */\n#define PARSER_INVALID_LITERAL_INDEX UINT16_MAX\n\n/**\n * Lastly emitted opcode is not a function literal\n */\n#define PARSER_NOT_FUNCTION_LITERAL PARSER_INVALID_LITERAL_INDEX\n\n/**\n * Lastly emitted opcode is not a named function literal\n */\n#define PARSER_NAMED_FUNCTION (uint16_t) (PARSER_NOT_FUNCTION_LITERAL - 1)\n\n/**\n * Lastly emitted opcode is not an anonymous class literal\n */\n#define PARSER_ANONYMOUS_CLASS (uint16_t) (PARSER_NAMED_FUNCTION - 1)\n\n/* Forward definitions for js-scanner-internal.h. */\nstruct scanner_context_t;\ntypedef struct scanner_context_t scanner_context_t;\n\n#if ENABLED (JERRY_DEBUGGER)\n/**\n * Extra information for each breakpoint.\n */\ntypedef struct\n{\n  uint32_t value;                             /**< line or offset of the breakpoint */\n} parser_breakpoint_info_t;\n\n/**\n * Maximum number of breakpoint info.\n */\n#define PARSER_MAX_BREAKPOINT_INFO_COUNT \\\n  (JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE / sizeof (parser_breakpoint_info_t))\n\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n/**\n * Those members of a context which needs\n * to be saved when a sub-function is parsed.\n */\ntypedef struct parser_saved_context_t\n{\n  /* Parser members. */\n  uint32_t status_flags;                      /**< parsing options */\n  uint16_t stack_depth;                       /**< current stack depth */\n  uint16_t stack_limit;                       /**< maximum stack depth */\n  struct parser_saved_context_t *prev_context_p; /**< last saved context */\n  parser_stack_iterator_t last_statement;     /**< last statement position */\n\n  /* Literal types */\n  uint16_t argument_count;                    /**< number of function arguments */\n#if ENABLED (JERRY_ESNEXT)\n  uint16_t argument_length;                   /**< length property of arguments */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  uint16_t register_count;                    /**< number of registers */\n  uint16_t literal_count;                     /**< number of literals */\n\n  /* Memory storage members. */\n  parser_mem_data_t byte_code;                /**< byte code buffer */\n  uint32_t byte_code_size;                    /**< byte code size for branches */\n  parser_mem_data_t literal_pool_data;        /**< literal list */\n  parser_scope_stack_t *scope_stack_p;        /**< scope stack */\n  uint16_t scope_stack_size;                  /**< size of scope stack */\n  uint16_t scope_stack_top;                   /**< preserved top of scope stack */\n  uint16_t scope_stack_reg_top;               /**< preserved top register of scope stack */\n#if ENABLED (JERRY_ESNEXT)\n  uint16_t scope_stack_global_end;            /**< end of global declarations of a function */\n  ecma_value_t tagged_template_literal_cp;    /**< compessed pointer to the tagged template literal collection */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#ifndef JERRY_NDEBUG\n  uint16_t context_stack_depth;               /**< current context stack depth */\n#endif /* !JERRY_NDEBUG */\n} parser_saved_context_t;\n\n/**\n * Shared parser context.\n */\ntypedef struct\n{\n  PARSER_TRY_CONTEXT (try_buffer);            /**< try_buffer */\n  parser_error_t error;                       /**< error code */\n  /** Union for rarely used members. */\n  union\n  {\n    void *allocated_buffer_p;                 /**< dinamically allocated buffer\n                                               *   which needs to be freed on error */\n    scanner_context_t *scanner_context_p;     /**< scanner context for the pre-scanner */\n  } u;\n  uint32_t allocated_buffer_size;             /**< size of the dinamically allocated buffer */\n\n  /* Parser members. */\n  uint32_t status_flags;                      /**< status flags */\n  uint32_t global_status_flags;               /**< global status flags */\n  uint16_t stack_depth;                       /**< current stack depth */\n  uint16_t stack_limit;                       /**< maximum stack depth */\n  parser_saved_context_t *last_context_p;     /**< last saved context */\n  parser_stack_iterator_t last_statement;     /**< last statement position */\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  ecma_module_node_t *module_current_node_p;  /**< import / export node that is being processed */\n  lexer_literal_t *module_identifier_lit_p;   /**< the literal for the identifier of the current element */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n  /* Lexer members. */\n  lexer_token_t token;                        /**< current token */\n  lexer_lit_object_t lit_object;              /**< current literal object */\n  const uint8_t *source_p;                    /**< next source byte */\n  const uint8_t *source_end_p;                /**< last source byte */\n  parser_line_counter_t line;                 /**< current line */\n  parser_line_counter_t column;               /**< current column */\n\n  /* Scanner members. */\n  scanner_info_t *next_scanner_info_p;        /**< next scanner info block */\n  scanner_info_t *active_scanner_info_p;      /**< currently active scanner info block */\n  scanner_info_t *skipped_scanner_info_p;     /**< next scanner info block */\n  scanner_info_t *skipped_scanner_info_end_p; /**< currently active scanner info block */\n\n  /* Compact byte code members. */\n  cbc_argument_t last_cbc;                    /**< argument of the last cbc */\n  uint16_t last_cbc_opcode;                   /**< opcode of the last cbc */\n\n  /* Literal types */\n  uint16_t argument_count;                    /**< number of function arguments */\n#if ENABLED (JERRY_ESNEXT)\n  uint16_t argument_length;                   /**< length property of arguments */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  uint16_t register_count;                    /**< number of registers */\n  uint16_t literal_count;                     /**< number of literals */\n\n  /* Memory storage members. */\n  parser_mem_data_t byte_code;                /**< byte code buffer */\n  uint32_t byte_code_size;                    /**< current byte code size for branches */\n  parser_list_t literal_pool;                 /**< literal list */\n  parser_mem_data_t stack;                    /**< storage space */\n  parser_scope_stack_t *scope_stack_p;        /**< scope stack */\n  parser_mem_page_t *free_page_p;             /**< space for fast allocation */\n  uint16_t scope_stack_size;                  /**< size of scope stack */\n  uint16_t scope_stack_top;                   /**< current top of scope stack */\n  uint16_t scope_stack_reg_top;               /**< current top register of scope stack */\n#if ENABLED (JERRY_ESNEXT)\n  uint16_t scope_stack_global_end;            /**< end of global declarations of a function */\n  ecma_value_t tagged_template_literal_cp;    /**< compessed pointer to the tagged template literal collection */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  uint8_t stack_top_uint8;                    /**< top byte stored on the stack */\n\n#ifndef JERRY_NDEBUG\n  /* Variables for debugging / logging. */\n  uint16_t context_stack_depth;               /**< current context stack depth */\n#endif /* !JERRY_NDEBUG */\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  int is_show_opcodes;                        /**< show opcodes */\n  uint32_t total_byte_code_size;              /**< total byte code size */\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_DEBUGGER)\n  parser_breakpoint_info_t breakpoint_info[PARSER_MAX_BREAKPOINT_INFO_COUNT]; /**< breakpoint info list */\n  uint16_t breakpoint_info_count;             /**< current breakpoint index */\n  parser_line_counter_t last_breakpoint_line; /**< last line where breakpoint has been inserted */\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_RESOURCE_NAME)\n  ecma_value_t resource_name;                 /**< resource name */\n#endif /* ENABLED (JERRY_RESOURCE_NAME) */\n\n#if ENABLED (JERRY_LINE_INFO)\n  parser_line_counter_t last_line_info_line;  /**< last line where line info has been inserted */\n#endif /* ENABLED (JERRY_LINE_INFO) */\n} parser_context_t;\n\n/**\n * @}\n * @}\n * @}\n *\n * \\addtogroup mem Memory allocation\n * @{\n *\n * \\addtogroup mem_parser Parser memory manager\n * @{\n */\n\n/* Memory management.\n * Note: throws an error if unsuccessful. */\nvoid *parser_malloc (parser_context_t *context_p, size_t size);\nvoid parser_free (void *ptr, size_t size);\nvoid *parser_malloc_local (parser_context_t *context_p, size_t size);\nvoid parser_free_local (void *ptr, size_t size);\nvoid parser_free_allocated_buffer (parser_context_t *context_p);\n\n/* Parser byte stream. */\n\nvoid parser_cbc_stream_init (parser_mem_data_t *data_p);\nvoid parser_cbc_stream_free (parser_mem_data_t *data_p);\nvoid parser_cbc_stream_alloc_page (parser_context_t *context_p, parser_mem_data_t *data_p);\n\n/* Parser list. Ensures pointer alignment. */\n\nvoid parser_list_init (parser_list_t *list_p, uint32_t item_size, uint32_t item_count);\nvoid parser_list_free (parser_list_t *list_p);\nvoid parser_list_reset (parser_list_t *list_p);\nvoid *parser_list_append (parser_context_t *context_p, parser_list_t *list_p);\nvoid *parser_list_get (parser_list_t *list_p, size_t index);\nvoid parser_list_iterator_init (parser_list_t *list_p, parser_list_iterator_t *iterator_p);\nvoid *parser_list_iterator_next (parser_list_iterator_t *iterator_p);\n\n/* Parser stack. Optimized for pushing bytes.\n * Pop functions never throws error. */\n\nvoid parser_stack_init (parser_context_t *context_p);\nvoid parser_stack_free (parser_context_t *context_p);\nvoid parser_stack_push_uint8 (parser_context_t *context_p, uint8_t uint8_value);\nvoid parser_stack_pop_uint8 (parser_context_t *context_p);\nvoid parser_stack_change_last_uint8 (parser_context_t *context_p, uint8_t new_value);\nuint8_t *parser_stack_get_prev_uint8 (parser_context_t *context_p);\nvoid parser_stack_push_uint16 (parser_context_t *context_p, uint16_t uint16_value);\nuint16_t parser_stack_pop_uint16 (parser_context_t *context_p);\nvoid parser_stack_push (parser_context_t *context_p, const void *data_p, uint32_t length);\nvoid parser_stack_pop (parser_context_t *context_p, void *data_p, uint32_t length);\nvoid parser_stack_iterator_init (parser_context_t *context_p, parser_stack_iterator_t *iterator);\nuint8_t parser_stack_iterator_read_uint8 (parser_stack_iterator_t *iterator);\nvoid parser_stack_iterator_skip (parser_stack_iterator_t *iterator, size_t length);\nvoid parser_stack_iterator_read (parser_stack_iterator_t *iterator, void *data_p, size_t length);\nvoid parser_stack_iterator_write (parser_stack_iterator_t *iterator, const void *data_p, size_t length);\n\n/**\n * @}\n * @}\n *\n * \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_utils Utility\n * @{\n */\n\n/* Compact byte code emitting functions. */\n\nvoid parser_flush_cbc (parser_context_t *context_p);\nvoid parser_emit_cbc (parser_context_t *context_p, uint16_t opcode);\nvoid parser_emit_cbc_literal (parser_context_t *context_p, uint16_t opcode, uint16_t literal_index);\nvoid parser_emit_cbc_literal_value (parser_context_t *context_p, uint16_t opcode, uint16_t literal_index,\n                                    uint16_t value);\nvoid parser_emit_cbc_literal_from_token (parser_context_t *context_p, uint16_t opcode);\nvoid parser_emit_cbc_call (parser_context_t *context_p, uint16_t opcode, size_t call_arguments);\nvoid parser_emit_cbc_push_number (parser_context_t *context_p, bool is_negative_number);\nvoid parser_emit_cbc_forward_branch (parser_context_t *context_p, uint16_t opcode, parser_branch_t *branch_p);\nparser_branch_node_t *parser_emit_cbc_forward_branch_item (parser_context_t *context_p, uint16_t opcode,\n                                                           parser_branch_node_t *next_p);\nvoid parser_emit_cbc_backward_branch (parser_context_t *context_p, uint16_t opcode, uint32_t offset);\nvoid parser_set_branch_to_current_position (parser_context_t *context_p, parser_branch_t *branch_p);\nvoid parser_set_breaks_to_current_position (parser_context_t *context_p, parser_branch_node_t *current_p);\nvoid parser_set_continues_to_current_position (parser_context_t *context_p, parser_branch_node_t *current_p);\n\n/* Convenience macros. */\n#define parser_emit_cbc_ext(context_p, opcode) \\\n  parser_emit_cbc ((context_p), PARSER_TO_EXT_OPCODE (opcode))\n#define parser_emit_cbc_ext_literal(context_p, opcode, literal_index) \\\n  parser_emit_cbc_literal ((context_p), PARSER_TO_EXT_OPCODE (opcode), (literal_index))\n#define parser_emit_cbc_ext_literal_from_token(context_p, opcode) \\\n  parser_emit_cbc_literal_from_token ((context_p), PARSER_TO_EXT_OPCODE (opcode))\n#define parser_emit_cbc_ext_call(context_p, opcode, call_arguments) \\\n  parser_emit_cbc_call ((context_p), PARSER_TO_EXT_OPCODE (opcode), (call_arguments))\n#define parser_emit_cbc_ext_call(context_p, opcode, call_arguments) \\\n  parser_emit_cbc_call ((context_p), PARSER_TO_EXT_OPCODE (opcode), (call_arguments))\n#define parser_emit_cbc_ext_forward_branch(context_p, opcode, branch_p) \\\n  parser_emit_cbc_forward_branch ((context_p), PARSER_TO_EXT_OPCODE (opcode), (branch_p))\n#define parser_emit_cbc_ext_backward_branch(context_p, opcode, offset) \\\n  parser_emit_cbc_backward_branch ((context_p), PARSER_TO_EXT_OPCODE (opcode), (offset))\n\n#if ENABLED (JERRY_ESNEXT)\nvoid parser_reverse_class_fields (parser_context_t *context_p, size_t fields_size);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n *\n * \\addtogroup jsparser_lexer Lexer\n * @{\n */\n\n/* Lexer functions */\n\nvoid lexer_next_token (parser_context_t *context_p);\nbool lexer_check_next_character (parser_context_t *context_p, lit_utf8_byte_t character);\nbool lexer_check_next_characters (parser_context_t *context_p, lit_utf8_byte_t character1,\n                                  lit_utf8_byte_t character2);\nuint8_t lexer_consume_next_character (parser_context_t *context_p);\nbool lexer_check_post_primary_exp (parser_context_t *context_p);\n#if ENABLED (JERRY_ESNEXT)\nvoid lexer_skip_empty_statements (parser_context_t *context_p);\nbool lexer_check_arrow (parser_context_t *context_p);\nbool lexer_check_arrow_param (parser_context_t *context_p);\nbool lexer_check_yield_no_arg (parser_context_t *context_p);\nbool lexer_consume_generator (parser_context_t *context_p);\nbool lexer_consume_assign (parser_context_t *context_p);\nvoid lexer_update_await_yield (parser_context_t *context_p, uint32_t status_flags);\n#endif /* ENABLED (JERRY_ESNEXT) */\nvoid lexer_parse_string (parser_context_t *context_p, lexer_string_options_t opts);\nvoid lexer_expect_identifier (parser_context_t *context_p, uint8_t literal_type);\nbool lexer_scan_identifier (parser_context_t *context_p);\nvoid lexer_check_property_modifier (parser_context_t *context_p);\nvoid lexer_convert_ident_to_cesu8 (uint8_t *destination_p, const uint8_t *source_p, prop_length_t length);\n\nconst uint8_t *lexer_convert_literal_to_chars (parser_context_t *context_p,  const lexer_lit_location_t *literal_p,\n                                               uint8_t *local_byte_array_p, lexer_string_options_t opts);\nvoid lexer_expect_object_literal_id (parser_context_t *context_p, uint32_t ident_opts);\nlexer_literal_t *lexer_construct_unused_literal (parser_context_t *context_p);\nvoid lexer_construct_literal_object (parser_context_t *context_p, const lexer_lit_location_t *lit_location_p,\n                                     uint8_t literal_type);\nbool lexer_construct_number_object (parser_context_t *context_p, bool is_expr, bool is_negative_number);\nvoid lexer_convert_push_number_to_push_literal (parser_context_t *context_p);\nuint16_t lexer_construct_function_object (parser_context_t *context_p, uint32_t extra_status_flags);\nvoid lexer_construct_regexp_object (parser_context_t *context_p, bool parse_only);\nbool lexer_compare_identifier_to_string (const lexer_lit_location_t *left_p, const uint8_t *right_p, size_t size);\nbool lexer_compare_identifiers (parser_context_t *context_p, const lexer_lit_location_t *left_p,\n                                const lexer_lit_location_t *right_p);\nbool lexer_current_is_literal (parser_context_t *context_p, const lexer_lit_location_t *right_ident_p);\nbool lexer_string_is_use_strict (parser_context_t *context_p);\nbool lexer_string_is_directive (parser_context_t *context_p);\n#if ENABLED (JERRY_ESNEXT)\nbool lexer_token_is_identifier (parser_context_t *context_p, const char *identifier_p,\n                                size_t identifier_length);\nbool lexer_token_is_let (parser_context_t *context_p);\nbool lexer_token_is_async (parser_context_t *context_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\nbool lexer_compare_literal_to_string (parser_context_t *context_p, const char *string_p, size_t string_length);\nuint8_t lexer_convert_binary_lvalue_token_to_binary (uint8_t token);\n\n/**\n * @}\n *\n * \\addtogroup jsparser_expr Expression parser\n * @{\n */\n\n/* Parser functions. */\n\nvoid parser_parse_block_expression (parser_context_t *context_p, int options);\nvoid parser_parse_expression_statement (parser_context_t *context_p, int options);\nvoid parser_parse_expression (parser_context_t *context_p, int options);\n#if ENABLED (JERRY_ESNEXT)\nvoid parser_parse_class (parser_context_t *context_p, bool is_statement);\nvoid parser_parse_initializer (parser_context_t *context_p, parser_pattern_flags_t flags);\nvoid parser_parse_initializer_by_next_char (parser_context_t *context_p, parser_pattern_flags_t flags);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n *\n * \\addtogroup jsparser_scanner Scanner\n * @{\n */\n\nvoid scanner_release_next (parser_context_t *context_p, size_t size);\nvoid scanner_set_active (parser_context_t *context_p);\nvoid scanner_revert_active (parser_context_t *context_p);\nvoid scanner_release_active (parser_context_t *context_p, size_t size);\nvoid scanner_release_switch_cases (scanner_case_info_t *case_p);\nvoid scanner_seek (parser_context_t *context_p);\nvoid scanner_reverse_info_list (parser_context_t *context_p);\nvoid scanner_cleanup (parser_context_t *context_p);\n\nbool scanner_is_context_needed (parser_context_t *context_p, parser_check_context_type_t check_type);\n#if ENABLED (JERRY_ESNEXT)\nbool scanner_try_scan_new_target (parser_context_t *context_p);\nvoid scanner_check_variables (parser_context_t *context_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\nvoid scanner_create_variables (parser_context_t *context_p, uint32_t option_flags);\n\nvoid scanner_get_location (scanner_location_t *location_p, parser_context_t *context_p);\nvoid scanner_set_location (parser_context_t *context_p, scanner_location_t *location_p);\nuint16_t scanner_decode_map_to (parser_scope_stack_t *stack_item_p);\n#if ENABLED (JERRY_ESNEXT)\nuint16_t scanner_save_literal (parser_context_t *context_p, uint16_t ident_index);\nbool scanner_literal_is_const_reg (parser_context_t *context_p, uint16_t literal_index);\nbool scanner_literal_is_created (parser_context_t *context_p, uint16_t literal_index);\nbool scanner_literal_exists (parser_context_t *context_p, uint16_t literal_index);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\nvoid scanner_scan_all (parser_context_t *context_p, const uint8_t *arg_list_p, const uint8_t *arg_list_end_p,\n                       const uint8_t *source_p, const uint8_t *source_end_p);\n\n/**\n * @}\n *\n * \\addtogroup jsparser_stmt Statement parser\n * @{\n */\n\nvoid parser_parse_statements (parser_context_t *context_p);\nvoid parser_free_jumps (parser_stack_iterator_t iterator);\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n/**\n * @}\n *\n * \\addtogroup jsparser_stmt Module statement parser\n * @{\n */\n\nextern const lexer_lit_location_t lexer_default_literal;\nvoid parser_module_finalize_export_node (parser_context_t *context_p);\nvoid parser_module_finalize_import_node (parser_context_t *context_p);\nvoid parser_module_check_request_place (parser_context_t *context_p);\nvoid parser_module_context_init (parser_context_t *context_p);\nvoid parser_module_handle_module_specifier (parser_context_t *context_p);\nvoid parser_module_handle_requests (parser_context_t *context_p);\nvoid parser_module_parse_export_clause (parser_context_t *context_p);\nvoid parser_module_parse_import_clause (parser_context_t *context_p);\nvoid parser_module_set_default (parser_context_t *context_p);\necma_module_node_t *parser_module_create_module_node (parser_context_t *context_p);\nbool parser_module_check_duplicate_import (parser_context_t *context_p, ecma_string_t *local_name_p);\nbool parser_module_check_duplicate_export (parser_context_t *context_p, ecma_string_t *export_name_p);\nvoid parser_module_append_export_name (parser_context_t *context_p);\nvoid parser_module_add_names_to_node (parser_context_t *context_p,\n                                      ecma_string_t *imex_name_p,\n                                      ecma_string_t *local_name_p);\n\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n/**\n * @}\n *\n * \\addtogroup jsparser_parser Parser\n * @{\n */\n\necma_compiled_code_t *parser_parse_function (parser_context_t *context_p, uint32_t status_flags);\n#if ENABLED (JERRY_ESNEXT)\necma_compiled_code_t *parser_parse_arrow_function (parser_context_t *context_p, uint32_t status_flags);\necma_compiled_code_t *parser_parse_class_fields (parser_context_t *context_p);\nvoid parser_set_function_name (parser_context_t *context_p, uint16_t function_literal_index, uint16_t name_index,\n                               uint32_t status_flags);\nvoid parser_compiled_code_set_function_name (parser_context_t *context_p, ecma_compiled_code_t *bytecode_p,\n                                             uint16_t name_index, uint32_t status_flags);\nuint16_t parser_check_anonymous_function_declaration (parser_context_t *context_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Error management. */\n\nvoid parser_raise_error (parser_context_t *context_p, parser_error_t error);\n\n/* Debug functions. */\n\n#if ENABLED (JERRY_DEBUGGER)\n\nvoid parser_append_breakpoint_info (parser_context_t *context_p, jerry_debugger_header_type_t type, uint32_t value);\n\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_LINE_INFO)\n\nvoid parser_emit_line_info (parser_context_t *context_p, uint32_t line, bool flush_cbc);\n\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\nvoid util_print_cbc (ecma_compiled_code_t *compiled_code_p);\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* !JS_PARSER_INTERNAL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser-limits.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JS_PARSER_LIMITS_H\n#define JS_PARSER_LIMITS_H\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_internals Internals\n * @{\n */\n\n/**\n * Maximum identifier length accepted by the parser.\n * Limit: LEXER_MAX_STRING_LENGTH.\n */\n#ifndef PARSER_MAXIMUM_IDENT_LENGTH\n#define PARSER_MAXIMUM_IDENT_LENGTH 255\n#endif /* !PARSER_MAXIMUM_IDENT_LENGTH */\n\n/**\n * Maximum string limit.\n * Limit: 2147483647 / 65535.\n */\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n#define PARSER_MAXIMUM_STRING_LIMIT 2147483647\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n#define PARSER_MAXIMUM_STRING_LIMIT 65535\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n/**\n * Maximum string length.\n * Limit: PARSER_MAXIMUM_STRING_LIMIT.\n */\n#ifndef PARSER_MAXIMUM_STRING_LENGTH\n#define PARSER_MAXIMUM_STRING_LENGTH PARSER_MAXIMUM_STRING_LIMIT\n#endif /* !PARSER_MAXIMUM_STRING_LENGTH */\n\n/**\n * Maximum number of registers.\n * Limit: min: 256, max: min(PARSER_MAXIMUM_NUMBER_OF_LITERALS / 2, 16383)\n */\n#ifndef PARSER_MAXIMUM_NUMBER_OF_REGISTERS\n#define PARSER_MAXIMUM_NUMBER_OF_REGISTERS 256\n#endif /* !PARSER_MAXIMUM_NUMBER_OF_REGISTERS */\n\n/**\n * Maximum number of literals.\n * Limit: 32767 - PARSER_MAXIMUM_NUMBER_OF_REGISTERS. Recommended: 32767 - PARSER_MAXIMUM_NUMBER_OF_REGISTERS.\n */\n#ifndef PARSER_MAXIMUM_NUMBER_OF_LITERALS\n#define PARSER_MAXIMUM_NUMBER_OF_LITERALS (32767 - PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n#endif /* !PARSER_MAXIMUM_NUMBER_OF_LITERALS */\n\n/**\n * Maximum depth of scope stack.\n * Limit: 32767. Recommended: 32767\n */\n#ifndef PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK\n#define PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK 32767\n#endif /* !PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK */\n\n/**\n * Maximum code size.\n * Limit: 16777215. Recommended: 65535, 16777215.\n */\n#ifndef PARSER_MAXIMUM_CODE_SIZE\n#define PARSER_MAXIMUM_CODE_SIZE (65535 << (JMEM_ALIGNMENT_LOG))\n#endif /* !PARSER_MAXIMUM_CODE_SIZE */\n\n/**\n * Maximum number of values pushed onto the stack by a function.\n * Limit: 65500. Recommended: 1024.\n */\n#ifndef PARSER_MAXIMUM_STACK_LIMIT\n#define PARSER_MAXIMUM_STACK_LIMIT 1024\n\n#endif /* !PARSER_MAXIMUM_STACK_LIMIT */\n\n/* Checks. */\n\n#if (PARSER_MAXIMUM_STRING_LENGTH < 1) || (PARSER_MAXIMUM_STRING_LENGTH > PARSER_MAXIMUM_STRING_LIMIT)\n#error \"Maximum string length is not within range.\"\n#endif /* (PARSER_MAXIMUM_STRING_LENGTH < 1) || (PARSER_MAXIMUM_STRING_LENGTH > PARSER_MAXIMUM_STRING_LIMIT) */\n\n#if (PARSER_MAXIMUM_IDENT_LENGTH < 1) || (PARSER_MAXIMUM_IDENT_LENGTH > PARSER_MAXIMUM_STRING_LENGTH)\n#error \"Maximum identifier length is not within range.\"\n#endif /* (PARSER_MAXIMUM_IDENT_LENGTH < 1) || (PARSER_MAXIMUM_IDENT_LENGTH > PARSER_MAXIMUM_STRING_LENGTH) */\n\n#if ((PARSER_MAXIMUM_NUMBER_OF_LITERALS < 1) \\\n     || (PARSER_MAXIMUM_NUMBER_OF_LITERALS + PARSER_MAXIMUM_NUMBER_OF_REGISTERS > 32767))\n#error \"Maximum number of literals is not within range.\"\n#endif /* ((PARSER_MAXIMUM_NUMBER_OF_LITERALS < 1) \\\n           || (PARSER_MAXIMUM_NUMBER_OF_LITERALS > 32767)) */\n\n#if (PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK < 1) || (PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK > 32767)\n#error \"Maximum depth of scope stack is not within range.\"\n#endif /* (PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK < 1) || (PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK > 32767) */\n\n#if ((PARSER_MAXIMUM_NUMBER_OF_REGISTERS * 2) > PARSER_MAXIMUM_NUMBER_OF_LITERALS)\n#error \"Maximum number of registers is not within range.\"\n#endif /* ((PARSER_MAXIMUM_NUMBER_OF_REGISTERS * 2) > PARSER_MAXIMUM_NUMBER_OF_LITERALS) */\n\n#if (PARSER_MAXIMUM_CODE_SIZE < 4096) || (PARSER_MAXIMUM_CODE_SIZE > 16777215)\n#error \"Maximum code size is not within range.\"\n#endif /* (PARSER_MAXIMUM_CODE_SIZE < 4096) || (PARSER_MAXIMUM_CODE_SIZE > 16777215) */\n\n#if (PARSER_MAXIMUM_STACK_LIMIT < 16) || (PARSER_MAXIMUM_STACK_LIMIT > 65500)\n#error \"Maximum function stack usage is not within range.\"\n#endif /* (PARSER_MAXIMUM_STACK_LIMIT < 16) || (PARSER_MAXIMUM_STACK_LIMIT > 65500) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* !JS_PARSER_LIMITS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser-mem.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"js-parser-internal.h\"\n\n#if ENABLED (JERRY_PARSER)\n\n/** \\addtogroup mem Memory allocation\n * @{\n *\n * \\addtogroup mem_parser Parser memory manager\n * @{\n */\n\n/**********************************************************************/\n/* Memory allocation                                                  */\n/**********************************************************************/\n\n/**\n * Allocate memory.\n *\n * @return allocated memory.\n */\nvoid *\nparser_malloc (parser_context_t *context_p, /**< context */\n               size_t size) /**< size of the memory block */\n{\n  void *result;\n\n  JERRY_ASSERT (size > 0);\n  result = jmem_heap_alloc_block_null_on_error (size);\n\n  if (result == NULL)\n  {\n    parser_raise_error (context_p, PARSER_ERR_OUT_OF_MEMORY);\n  }\n  return result;\n} /* parser_malloc */\n\n/**\n * Free memory allocated by parser_malloc.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nparser_free (void *ptr, /**< pointer to free */\n             size_t size) /**< size of the memory block */\n{\n  jmem_heap_free_block (ptr, size);\n} /* parser_free */\n\n/**\n * Allocate local memory for short term use.\n *\n * @return allocated memory.\n */\nvoid *\nparser_malloc_local (parser_context_t *context_p, /**< context */\n                     size_t size) /**< size of the memory */\n{\n  void *result;\n\n  JERRY_ASSERT (size > 0);\n  result = jmem_heap_alloc_block (size);\n  if (result == 0)\n  {\n    parser_raise_error (context_p, PARSER_ERR_OUT_OF_MEMORY);\n  }\n  return result;\n} /* parser_malloc_local */\n\n/**\n * Free memory allocated by parser_malloc_local.\n */\nvoid\nparser_free_local (void *ptr, /**< pointer to free */\n                   size_t size) /**< size of the memory */\n{\n  jmem_heap_free_block (ptr, size);\n} /* parser_free_local */\n\n/**\n * Free the dynamically allocated buffer stored in the context\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nparser_free_allocated_buffer (parser_context_t *context_p) /**< context */\n{\n  if (context_p->u.allocated_buffer_p != NULL)\n  {\n    parser_free_local (context_p->u.allocated_buffer_p,\n                       context_p->allocated_buffer_size);\n    context_p->u.allocated_buffer_p = NULL;\n  }\n} /* parser_free_allocated_buffer */\n\n/**********************************************************************/\n/* Parser data management functions                                   */\n/**********************************************************************/\n\n/**\n * Initialize parse data.\n */\nstatic void\nparser_data_init (parser_mem_data_t *data_p, /**< memory manager */\n                  uint32_t page_size) /**< size of each page */\n{\n  data_p->first_p = NULL;\n  data_p->last_p = NULL;\n  data_p->last_position = page_size;\n} /* parser_data_init */\n\n/**\n * Free parse data.\n */\nstatic void\nparser_data_free (parser_mem_data_t *data_p, /**< memory manager */\n                  uint32_t page_size) /**< size of each page */\n{\n  parser_mem_page_t *page_p = data_p->first_p;\n\n  while (page_p != NULL)\n  {\n    parser_mem_page_t *next_p = page_p->next_p;\n\n    parser_free (page_p, page_size);\n    page_p = next_p;\n  }\n} /* parser_data_free */\n\n/**********************************************************************/\n/* Parser byte stream management functions                            */\n/**********************************************************************/\n\n/**\n * Initialize byte stream.\n */\nvoid\nparser_cbc_stream_init (parser_mem_data_t *data_p) /**< memory manager */\n{\n  parser_data_init (data_p, PARSER_CBC_STREAM_PAGE_SIZE);\n} /* parser_cbc_stream_init */\n\n/**\n * Free byte stream.\n */\nvoid\nparser_cbc_stream_free (parser_mem_data_t *data_p) /**< memory manager */\n{\n  parser_data_free (data_p,\n                    sizeof (parser_mem_page_t *) + PARSER_CBC_STREAM_PAGE_SIZE);\n} /* parser_cbc_stream_free */\n\n/**\n * Appends a byte at the end of the byte stream.\n */\nvoid\nparser_cbc_stream_alloc_page (parser_context_t *context_p, /**< context */\n                              parser_mem_data_t *data_p) /**< memory manager */\n{\n  size_t size = sizeof (parser_mem_page_t *) + PARSER_CBC_STREAM_PAGE_SIZE;\n  parser_mem_page_t *page_p = (parser_mem_page_t *) parser_malloc (context_p, size);\n\n  page_p->next_p = NULL;\n  data_p->last_position = 0;\n\n  if (data_p->last_p != NULL)\n  {\n    data_p->last_p->next_p = page_p;\n  }\n  else\n  {\n    data_p->first_p = page_p;\n  }\n  data_p->last_p = page_p;\n} /* parser_cbc_stream_alloc_page */\n\n/**********************************************************************/\n/* Parser list management functions                                   */\n/**********************************************************************/\n\n/**\n * Initialize parser list.\n */\nvoid\nparser_list_init (parser_list_t *list_p, /**< parser list */\n                  uint32_t item_size, /**< size for each page */\n                  uint32_t item_count) /**< number of items on each page */\n{\n  /* Align to pointer size. */\n  item_size = (uint32_t) (((item_size) + sizeof (void *) - 1) & ~(sizeof (void *) - 1));\n  parser_data_init (&list_p->data, item_size * item_count);\n  list_p->page_size = item_size * item_count;\n  list_p->item_size = item_size;\n  list_p->item_count = item_count;\n} /* parser_list_init */\n\n/**\n * Free parser list.\n */\nvoid\nparser_list_free (parser_list_t *list_p) /**< parser list */\n{\n  parser_data_free (&list_p->data,\n                    (uint32_t) (sizeof (parser_mem_page_t *) + list_p->page_size));\n} /* parser_list_free */\n\n/**\n * Reset parser list.\n */\nvoid\nparser_list_reset (parser_list_t *list_p) /**< parser list */\n{\n  parser_data_init (&list_p->data, list_p->page_size);\n} /* parser_list_reset */\n\n/**\n * Allocate space for the next item.\n *\n * @return pointer to the appended item.\n */\nvoid *\nparser_list_append (parser_context_t *context_p, /**< context */\n                    parser_list_t *list_p) /**< parser list */\n{\n  parser_mem_page_t *page_p = list_p->data.last_p;\n  void *result;\n\n  if (list_p->data.last_position + list_p->item_size > list_p->page_size)\n  {\n    size_t size = sizeof (parser_mem_page_t *) + list_p->page_size;\n\n    page_p = (parser_mem_page_t *) parser_malloc (context_p, size);\n\n    page_p->next_p = NULL;\n    list_p->data.last_position = 0;\n\n    if (list_p->data.last_p != NULL)\n    {\n      list_p->data.last_p->next_p = page_p;\n    }\n    else\n    {\n      list_p->data.first_p = page_p;\n    }\n    list_p->data.last_p = page_p;\n  }\n\n  result = page_p->bytes + list_p->data.last_position;\n  list_p->data.last_position += list_p->item_size;\n  return result;\n} /* parser_list_append */\n\n/**\n * Return the nth item of the list.\n *\n * @return pointer to the item.\n */\nvoid *\nparser_list_get (parser_list_t *list_p, /**< parser list */\n                 size_t index) /**< item index */\n{\n  size_t item_count = list_p->item_count;\n  parser_mem_page_t *page_p = list_p->data.first_p;\n\n  while (index >= item_count)\n  {\n    JERRY_ASSERT (page_p != NULL);\n    page_p = page_p->next_p;\n    index -= item_count;\n  }\n\n  JERRY_ASSERT (page_p != NULL);\n  JERRY_ASSERT (page_p != list_p->data.last_p\n                || (index * list_p->item_size < list_p->data.last_position));\n  return page_p->bytes + (index * list_p->item_size);\n} /* parser_list_get */\n\n/**\n * Initialize a parser list iterator.\n */\nvoid\nparser_list_iterator_init (parser_list_t *list_p, /**< parser list */\n                           parser_list_iterator_t *iterator_p) /**< iterator */\n{\n  iterator_p->list_p = list_p;\n  iterator_p->current_p = list_p->data.first_p;\n  iterator_p->current_position = 0;\n} /* parser_list_iterator_init */\n\n/**\n * Next iterator step.\n *\n * @return the address of the current item, or NULL at the end.\n */\nvoid *\nparser_list_iterator_next (parser_list_iterator_t *iterator_p) /**< iterator */\n{\n  void *result;\n\n  if (iterator_p->current_p == NULL)\n  {\n    return NULL;\n  }\n\n  result = iterator_p->current_p->bytes + iterator_p->current_position;\n  iterator_p->current_position += iterator_p->list_p->item_size;\n\n  if (iterator_p->current_p->next_p == NULL)\n  {\n    if (iterator_p->current_position >= iterator_p->list_p->data.last_position)\n    {\n      iterator_p->current_p = NULL;\n      iterator_p->current_position = 0;\n    }\n  }\n  else if (iterator_p->current_position >= iterator_p->list_p->page_size)\n  {\n    iterator_p->current_p = iterator_p->current_p->next_p;\n    iterator_p->current_position = 0;\n  }\n  return result;\n} /* parser_list_iterator_next */\n\n/**********************************************************************/\n/* Parser stack management functions                                  */\n/**********************************************************************/\n\n/* Stack is a reversed storage. */\n\n/**\n * Initialize parser stack.\n */\nvoid\nparser_stack_init (parser_context_t *context_p) /**< context */\n{\n  parser_data_init (&context_p->stack, PARSER_STACK_PAGE_SIZE);\n  context_p->free_page_p = NULL;\n} /* parser_stack_init */\n\n/**\n * Free parser stack.\n */\nvoid\nparser_stack_free (parser_context_t *context_p) /**< context */\n{\n  parser_data_free (&context_p->stack,\n                    sizeof (parser_mem_page_t *) + PARSER_STACK_PAGE_SIZE);\n\n  if (context_p->free_page_p != NULL)\n  {\n    parser_free (context_p->free_page_p,\n                 sizeof (parser_mem_page_t *) + PARSER_STACK_PAGE_SIZE);\n  }\n} /* parser_stack_free */\n\n/**\n * Pushes an uint8_t value onto the stack.\n */\nvoid\nparser_stack_push_uint8 (parser_context_t *context_p, /**< context */\n                         uint8_t uint8_value) /**< value pushed onto the stack */\n{\n  parser_mem_page_t *page_p = context_p->stack.first_p;\n\n  /* This assert might trigger false positive valgrind errors, when\n   * parser_stack_push() pushes not fully initialized structures.\n   * More precisely when the last byte of the structure is uninitialized. */\n  JERRY_ASSERT (page_p == NULL\n                || context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);\n\n  if (context_p->stack.last_position >= PARSER_STACK_PAGE_SIZE)\n  {\n    if (context_p->free_page_p != NULL)\n    {\n      page_p = context_p->free_page_p;\n      context_p->free_page_p = NULL;\n    }\n    else\n    {\n      size_t size = sizeof (parser_mem_page_t *) + PARSER_STACK_PAGE_SIZE;\n      page_p = (parser_mem_page_t *) parser_malloc (context_p, size);\n    }\n\n    page_p->next_p = context_p->stack.first_p;\n    context_p->stack.last_position = 0;\n    context_p->stack.first_p = page_p;\n  }\n\n  page_p->bytes[context_p->stack.last_position++] = uint8_value;\n  context_p->stack_top_uint8 = uint8_value;\n} /* parser_stack_push_uint8 */\n\n/**\n * Pops the last uint8_t value from the stack.\n */\nvoid\nparser_stack_pop_uint8 (parser_context_t *context_p) /**< context */\n{\n  parser_mem_page_t *page_p = context_p->stack.first_p;\n\n  JERRY_ASSERT (page_p != NULL\n                && context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);\n\n  context_p->stack.last_position--;\n\n  if (context_p->stack.last_position == 0)\n  {\n    context_p->stack.first_p = page_p->next_p;\n    context_p->stack.last_position = PARSER_STACK_PAGE_SIZE;\n\n    if (context_p->free_page_p == NULL)\n    {\n      context_p->free_page_p = page_p;\n    }\n    else\n    {\n      parser_free (page_p,\n                   sizeof (parser_mem_page_t *) + PARSER_STACK_PAGE_SIZE);\n    }\n\n    page_p = context_p->stack.first_p;\n\n    JERRY_ASSERT (page_p != NULL);\n  }\n\n  context_p->stack_top_uint8 = page_p->bytes[context_p->stack.last_position - 1];\n} /* parser_stack_pop_uint8 */\n\n/**\n * Change last byte of the stack.\n */\nvoid\nparser_stack_change_last_uint8 (parser_context_t *context_p, /**< context */\n                                uint8_t new_value) /**< new value */\n{\n  parser_mem_page_t *page_p = context_p->stack.first_p;\n\n  JERRY_ASSERT (page_p != NULL\n                && context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);\n\n  page_p->bytes[context_p->stack.last_position - 1] = new_value;\n  context_p->stack_top_uint8 = new_value;\n} /* parser_stack_change_last_uint8 */\n\n/**\n * Get the uint8 value before the top of the stack.\n *\n * Pointer to the uint8 value\n */\nuint8_t *\nparser_stack_get_prev_uint8 (parser_context_t *context_p) /**< context */\n{\n  parser_mem_page_t *page_p = context_p->stack.first_p;\n\n  JERRY_ASSERT (page_p != NULL && (context_p->stack.last_position >= 2 || page_p->next_p != NULL));\n\n  if (context_p->stack.last_position >= 2)\n  {\n    return page_p->bytes + (context_p->stack.last_position - 2);\n  }\n\n  return page_p->next_p->bytes + (PARSER_STACK_PAGE_SIZE - 1);\n} /* parser_stack_get_prev_uint8 */\n\n/**\n * Pushes an uint16_t value onto the stack.\n */\nvoid\nparser_stack_push_uint16 (parser_context_t *context_p, /**< context */\n                          uint16_t uint16_value) /**< value pushed onto the stack */\n{\n  if (context_p->stack.last_position + 2 <= PARSER_STACK_PAGE_SIZE)\n  {\n    parser_mem_page_t *page_p = context_p->stack.first_p;\n\n    JERRY_ASSERT (page_p != NULL\n                  && context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);\n\n    page_p->bytes[context_p->stack.last_position++] = (uint8_t) (uint16_value >> 8);\n    page_p->bytes[context_p->stack.last_position++] = (uint8_t) uint16_value;\n    context_p->stack_top_uint8 = (uint8_t) uint16_value;\n  }\n  else\n  {\n    parser_stack_push_uint8 (context_p, (uint8_t) (uint16_value >> 8));\n    parser_stack_push_uint8 (context_p, (uint8_t) uint16_value);\n  }\n} /* parser_stack_push_uint16 */\n\n/**\n * Pops the last uint16_t value from the stack.\n *\n * @return the value popped from the stack.\n */\nuint16_t\nparser_stack_pop_uint16 (parser_context_t *context_p) /**< context */\n{\n  uint32_t value = context_p->stack_top_uint8;\n\n  if (context_p->stack.last_position >= 3)\n  {\n    parser_mem_page_t *page_p = context_p->stack.first_p;\n\n    JERRY_ASSERT (page_p != NULL\n                  && context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);\n\n    value |= ((uint32_t) page_p->bytes[context_p->stack.last_position - 2]) << 8;\n    context_p->stack_top_uint8 = page_p->bytes[context_p->stack.last_position - 3];\n    context_p->stack.last_position -= 2;\n  }\n  else\n  {\n    parser_stack_pop_uint8 (context_p);\n    value |= ((uint32_t) context_p->stack_top_uint8) << 8;\n    parser_stack_pop_uint8 (context_p);\n  }\n  return (uint16_t) value;\n} /* parser_stack_pop_uint16 */\n\n/**\n * Pushes a data onto the stack.\n */\nvoid\nparser_stack_push (parser_context_t *context_p, /**< context */\n                   const void *data_p, /**< data pushed onto the stack */\n                   uint32_t length) /**< length of the data */\n{\n  uint32_t fragment_length = PARSER_STACK_PAGE_SIZE - context_p->stack.last_position;\n  const uint8_t *bytes_p = (const uint8_t *) data_p;\n  parser_mem_page_t *page_p;\n\n  JERRY_ASSERT (length < PARSER_STACK_PAGE_SIZE && length > 0);\n\n  context_p->stack_top_uint8 = bytes_p[length - 1];\n\n  if (fragment_length > 0)\n  {\n    /* Fill the remaining bytes. */\n    if (fragment_length > length)\n    {\n      fragment_length = length;\n    }\n\n    memcpy (context_p->stack.first_p->bytes + context_p->stack.last_position,\n            bytes_p,\n            fragment_length);\n\n    if (fragment_length == length)\n    {\n      context_p->stack.last_position += length;\n      return;\n    }\n\n    bytes_p += fragment_length;\n    length -= fragment_length;\n  }\n\n  if (context_p->free_page_p != NULL)\n  {\n    page_p = context_p->free_page_p;\n    context_p->free_page_p = NULL;\n  }\n  else\n  {\n    size_t size = sizeof (parser_mem_page_t *) + PARSER_STACK_PAGE_SIZE;\n\n    page_p = (parser_mem_page_t *) parser_malloc (context_p, size);\n  }\n\n  page_p->next_p = context_p->stack.first_p;\n\n  context_p->stack.first_p = page_p;\n\n  memcpy (page_p->bytes, bytes_p, length);\n  context_p->stack.last_position = length;\n} /* parser_stack_push */\n\n/**\n * Pop bytes from the top of the stack.\n */\nvoid\nparser_stack_pop (parser_context_t *context_p, /**< context */\n                  void *data_p, /**< destination buffer, can be NULL */\n                  uint32_t length) /**< length of the data */\n{\n  uint8_t *bytes_p = (uint8_t *) data_p;\n  parser_mem_page_t *page_p = context_p->stack.first_p;\n\n  JERRY_ASSERT (length < PARSER_STACK_PAGE_SIZE && length > 0);\n\n  if (context_p->stack.last_position > length)\n  {\n    context_p->stack.last_position -= length;\n    context_p->stack_top_uint8 = page_p->bytes[context_p->stack.last_position - 1];\n\n    if (bytes_p != NULL)\n    {\n      memcpy (bytes_p, context_p->stack.first_p->bytes + context_p->stack.last_position, length);\n    }\n    return;\n  }\n\n  JERRY_ASSERT (page_p->next_p != NULL);\n\n  length -= context_p->stack.last_position;\n\n  if (bytes_p != NULL)\n  {\n    memcpy (bytes_p + length, page_p->bytes, context_p->stack.last_position);\n  }\n\n  context_p->stack.first_p = page_p->next_p;\n  context_p->stack.last_position = PARSER_STACK_PAGE_SIZE - length;\n  context_p->stack_top_uint8 = page_p->next_p->bytes[context_p->stack.last_position - 1];\n\n  if (bytes_p != NULL && length > 0)\n  {\n    memcpy (bytes_p, page_p->next_p->bytes + context_p->stack.last_position, length);\n  }\n\n  JERRY_ASSERT (context_p->stack.last_position > 0);\n\n  if (context_p->free_page_p == NULL)\n  {\n    context_p->free_page_p = page_p;\n  }\n  else\n  {\n    parser_free (page_p,\n                 sizeof (parser_mem_page_t *) + PARSER_STACK_PAGE_SIZE);\n  }\n} /* parser_stack_pop */\n\n/**\n * Initialize stack iterator.\n */\nextern inline void\nparser_stack_iterator_init (parser_context_t *context_p, /**< context */\n                            parser_stack_iterator_t *iterator) /**< iterator */\n{\n  iterator->current_p = context_p->stack.first_p;\n  iterator->current_position = context_p->stack.last_position;\n} /* parser_stack_iterator_init */\n\n/**\n * Read the next byte from the stack.\n *\n * @return byte\n */\nextern inline uint8_t\nparser_stack_iterator_read_uint8 (parser_stack_iterator_t *iterator) /**< iterator */\n{\n  JERRY_ASSERT (iterator->current_position > 0 && iterator->current_position <= PARSER_STACK_PAGE_SIZE);\n  return iterator->current_p->bytes[iterator->current_position - 1];\n} /* parser_stack_iterator_read_uint8 */\n\n/**\n * Skip the next n bytes of the stack.\n */\nvoid\nparser_stack_iterator_skip (parser_stack_iterator_t *iterator, /**< iterator */\n                            size_t length) /**< number of skipped bytes */\n{\n  JERRY_ASSERT (length < PARSER_STACK_PAGE_SIZE && length > 0);\n\n  if (length < iterator->current_position)\n  {\n    iterator->current_position -= length;\n  }\n  else\n  {\n    iterator->current_position = PARSER_STACK_PAGE_SIZE - (length - iterator->current_position);\n    iterator->current_p = iterator->current_p->next_p;\n  }\n} /* parser_stack_iterator_skip */\n\n/**\n * Read bytes from the stack.\n */\nvoid\nparser_stack_iterator_read (parser_stack_iterator_t *iterator, /**< iterator */\n                            void *data_p, /**< destination buffer */\n                            size_t length) /**< length of the data */\n{\n  uint8_t *bytes_p = (uint8_t *) data_p;\n\n  JERRY_ASSERT (length < PARSER_STACK_PAGE_SIZE && length > 0);\n\n  if (length <= iterator->current_position)\n  {\n    memcpy (bytes_p,\n            iterator->current_p->bytes + iterator->current_position - length,\n            length);\n  }\n  else\n  {\n    JERRY_ASSERT (iterator->current_p->next_p != NULL);\n\n    length -= iterator->current_position;\n    memcpy (bytes_p + length,\n            iterator->current_p->bytes,\n            iterator->current_position);\n    memcpy (bytes_p,\n            iterator->current_p->next_p->bytes + PARSER_STACK_PAGE_SIZE - length,\n            length);\n  }\n} /* parser_stack_iterator_read */\n\n/**\n * Write bytes onto the stack.\n */\nvoid\nparser_stack_iterator_write (parser_stack_iterator_t *iterator, /**< iterator */\n                             const void *data_p, /**< destination buffer */\n                             size_t length) /**< length of the data */\n{\n  const uint8_t *bytes_p = (const uint8_t *) data_p;\n\n  JERRY_ASSERT (length < PARSER_STACK_PAGE_SIZE && length > 0);\n\n  if (length <= iterator->current_position)\n  {\n    memcpy (iterator->current_p->bytes + iterator->current_position - length,\n            bytes_p,\n            length);\n  }\n  else\n  {\n    JERRY_ASSERT (iterator->current_p->next_p != NULL);\n\n    length -= iterator->current_position;\n    memcpy (iterator->current_p->bytes,\n            bytes_p + length,\n            iterator->current_position);\n    memcpy (iterator->current_p->next_p->bytes + PARSER_STACK_PAGE_SIZE - length,\n            bytes_p,\n            length);\n  }\n} /* parser_stack_iterator_write */\n\n/**\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_PARSER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser-module.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"js-parser-internal.h\"\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n#include \"jcontext.h\"\n#include \"jerryscript-port.h\"\n\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-module.h\"\n\n/**\n * Description of \"*default*\" literal string.\n */\nconst lexer_lit_location_t lexer_default_literal =\n{\n  (const uint8_t *) \"*default*\", 9, LEXER_IDENT_LITERAL, false\n};\n\n/**\n * Check for duplicated imported binding names.\n *\n * @return true - if the given name is a duplicate\n *         false - otherwise\n */\nbool\nparser_module_check_duplicate_import (parser_context_t *context_p, /**< parser context */\n                                      ecma_string_t *local_name_p) /**< newly imported name */\n{\n  ecma_module_names_t *module_names_p = context_p->module_current_node_p->module_names_p;\n  while (module_names_p != NULL)\n  {\n    if (ecma_compare_ecma_strings (module_names_p->local_name_p, local_name_p))\n    {\n      return true;\n    }\n\n    module_names_p = module_names_p->next_p;\n  }\n\n  ecma_module_node_t *module_node_p = JERRY_CONTEXT (module_current_p)->imports_p;\n  while (module_node_p != NULL)\n  {\n    module_names_p = module_node_p->module_names_p;\n\n    while (module_names_p != NULL)\n    {\n      if (ecma_compare_ecma_strings (module_names_p->local_name_p, local_name_p))\n      {\n        return true;\n      }\n\n      module_names_p = module_names_p->next_p;\n    }\n\n    module_node_p = module_node_p->next_p;\n  }\n\n  return false;\n} /* parser_module_check_duplicate_import */\n\n/**\n * Append an identifier to the exported bindings.\n */\nvoid\nparser_module_append_export_name (parser_context_t *context_p) /**< parser context */\n{\n  if (!(context_p->status_flags & PARSER_MODULE_STORE_IDENT))\n  {\n    return;\n  }\n\n  context_p->module_identifier_lit_p = context_p->lit_object.literal_p;\n\n  ecma_string_t *name_p = ecma_new_ecma_string_from_utf8 (context_p->lit_object.literal_p->u.char_p,\n                                                          context_p->lit_object.literal_p->prop.length);\n\n  if (parser_module_check_duplicate_export (context_p, name_p))\n  {\n    ecma_deref_ecma_string (name_p);\n    parser_raise_error (context_p, PARSER_ERR_DUPLICATED_EXPORT_IDENTIFIER);\n  }\n\n  parser_module_add_names_to_node (context_p,\n                                   name_p,\n                                   name_p);\n  ecma_deref_ecma_string (name_p);\n} /* parser_module_append_export_name */\n\n/**\n * Check for duplicated exported bindings.\n * @return - true - if the exported name is a duplicate\n *           false - otherwise\n */\nbool\nparser_module_check_duplicate_export (parser_context_t *context_p, /**< parser context */\n                                      ecma_string_t *export_name_p) /**< exported identifier */\n{\n  /* We have to check in the currently constructed node, as well as all of the already added nodes. */\n  ecma_module_names_t *current_names_p = context_p->module_current_node_p->module_names_p;\n  while (current_names_p != NULL)\n  {\n    if (ecma_compare_ecma_strings (current_names_p->imex_name_p, export_name_p))\n    {\n      return true;\n    }\n    current_names_p = current_names_p->next_p;\n  }\n\n  ecma_module_node_t *export_node_p = JERRY_CONTEXT (module_current_p)->local_exports_p;\n  if (export_node_p != NULL)\n  {\n    JERRY_ASSERT (export_node_p->next_p == NULL);\n    ecma_module_names_t *name_p = export_node_p->module_names_p;\n\n    while (name_p != NULL)\n    {\n      if (ecma_compare_ecma_strings (name_p->imex_name_p, export_name_p))\n      {\n        return true;\n      }\n\n      name_p = name_p->next_p;\n    }\n  }\n\n  export_node_p = JERRY_CONTEXT (module_current_p)->indirect_exports_p;\n  while (export_node_p != NULL)\n  {\n    ecma_module_names_t *name_p = export_node_p->module_names_p;\n\n    while (name_p != NULL)\n    {\n      if (ecma_compare_ecma_strings (name_p->imex_name_p, export_name_p))\n      {\n        return true;\n      }\n\n      name_p = name_p->next_p;\n    }\n\n    export_node_p = export_node_p->next_p;\n  }\n\n  /* Star exports don't have any names associated with them, so no need to check those. */\n  return false;\n} /* parser_module_check_duplicate_export */\n\n/**\n * Add export node to parser context.\n */\nvoid\nparser_module_finalize_export_node (parser_context_t *context_p) /**< parser context */\n{\n  ecma_module_node_t *module_node_p = context_p->module_current_node_p;\n  context_p->module_current_node_p = NULL;\n  ecma_module_node_t **export_list_p;\n\n  /* Check which list we should add it to. */\n  if (module_node_p->module_request_p)\n  {\n    /* If the export node has a module request, that means it's either an indirect export, or a star export. */\n    if (!module_node_p->module_names_p)\n    {\n      /* If there are no names in the node, then it's a star export. */\n      export_list_p = &(JERRY_CONTEXT (module_current_p)->star_exports_p);\n    }\n    else\n    {\n      export_list_p = &(JERRY_CONTEXT (module_current_p)->indirect_exports_p);\n    }\n  }\n  else\n  {\n    /* If there is no module request, then it's a local export. */\n    export_list_p = &(JERRY_CONTEXT (module_current_p)->local_exports_p);\n  }\n\n  /* Check if we have a node with the same module request, append to it if we do. */\n  ecma_module_node_t *stored_exports_p = *export_list_p;\n  while (stored_exports_p != NULL)\n  {\n    if (stored_exports_p->module_request_p == module_node_p->module_request_p)\n    {\n      ecma_module_names_t *module_names_p = module_node_p->module_names_p;\n\n      if (module_names_p != NULL)\n      {\n        while (module_names_p->next_p != NULL)\n        {\n          module_names_p = module_names_p->next_p;\n        }\n\n        module_names_p->next_p = stored_exports_p->module_names_p;\n        stored_exports_p->module_names_p = module_node_p->module_names_p;\n        module_node_p->module_names_p = NULL;\n      }\n\n      jmem_heap_free_block (module_node_p, sizeof (ecma_module_node_t));\n      return;\n    }\n\n    stored_exports_p = stored_exports_p->next_p;\n  }\n\n  module_node_p->next_p = *export_list_p;\n  *export_list_p = module_node_p;\n} /* parser_module_finalize_export_node */\n\n/**\n * Add import node to parser context.\n */\nvoid\nparser_module_finalize_import_node (parser_context_t *context_p) /**< parser context */\n{\n  ecma_module_node_t *module_node_p = context_p->module_current_node_p;\n  context_p->module_current_node_p = NULL;\n  ecma_module_node_t *stored_imports_p = JERRY_CONTEXT (module_current_p)->imports_p;\n\n  /* Check if we have a node with the same module request, append to it if we do. */\n  while (stored_imports_p != NULL)\n  {\n    if (stored_imports_p->module_request_p == module_node_p->module_request_p)\n    {\n      ecma_module_names_t *module_names_p = module_node_p->module_names_p;\n\n      if (module_names_p != NULL)\n      {\n        while (module_names_p->next_p != NULL)\n        {\n          module_names_p = module_names_p->next_p;\n        }\n\n        module_names_p->next_p = stored_imports_p->module_names_p;\n        stored_imports_p->module_names_p = module_node_p->module_names_p;\n        module_node_p->module_names_p = NULL;\n      }\n\n      jmem_heap_free_block (module_node_p, sizeof (ecma_module_node_t));\n      return;\n    }\n\n    stored_imports_p = stored_imports_p->next_p;\n  }\n\n  module_node_p->next_p = JERRY_CONTEXT (module_current_p)->imports_p;\n  JERRY_CONTEXT (module_current_p)->imports_p = module_node_p;\n} /* parser_module_finalize_import_node */\n\n/**\n * Add module names to current module node.\n */\nvoid\nparser_module_add_names_to_node (parser_context_t *context_p, /**< parser context */\n                                 ecma_string_t *imex_name_p, /**< import/export name */\n                                 ecma_string_t *local_name_p) /**< local name */\n{\n  ecma_module_names_t *new_names_p = (ecma_module_names_t *) parser_malloc (context_p,\n                                                                            sizeof (ecma_module_names_t));\n  memset (new_names_p, 0, sizeof (ecma_module_names_t));\n\n  ecma_module_node_t *module_node_p = context_p->module_current_node_p;\n  new_names_p->next_p = module_node_p->module_names_p;\n  module_node_p->module_names_p = new_names_p;\n\n  JERRY_ASSERT (imex_name_p != NULL);\n  ecma_ref_ecma_string (imex_name_p);\n  new_names_p->imex_name_p = imex_name_p;\n\n  JERRY_ASSERT (local_name_p != NULL);\n  ecma_ref_ecma_string (local_name_p);\n  new_names_p->local_name_p = local_name_p;\n} /* parser_module_add_names_to_node */\n\n/**\n * Create a permanent import/export node from a template node.\n * @return - the copy of the template if the second parameter is not NULL.\n *         - otherwise: an empty node.\n */\necma_module_node_t *\nparser_module_create_module_node (parser_context_t *context_p) /**< parser context */\n{\n  ecma_module_node_t *node_p = (ecma_module_node_t *) parser_malloc (context_p, sizeof (ecma_module_node_t));\n  memset (node_p, 0, sizeof (ecma_module_node_t));\n\n  return node_p;\n} /* parser_module_create_module_node */\n\n/**\n * Parse an ExportClause.\n */\nvoid\nparser_module_parse_export_clause (parser_context_t *context_p) /**< parser context */\n{\n  bool has_module_specifier = false;\n\n  if (context_p->source_p == context_p->next_scanner_info_p->source_p)\n  {\n    has_module_specifier = true;\n    JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_EXPORT_MODULE_SPECIFIER);\n    scanner_release_next (context_p, sizeof (scanner_info_t));\n  }\n\n  JERRY_ASSERT (context_p->token.type == LEXER_LEFT_BRACE);\n  lexer_next_token (context_p);\n\n  while (true)\n  {\n    if (context_p->token.type == LEXER_RIGHT_BRACE)\n    {\n      lexer_next_token (context_p);\n      break;\n    }\n\n    /* 15.2.3.1 The referenced binding cannot be a reserved word. */\n    if (context_p->token.type != LEXER_LITERAL\n        || context_p->token.lit_location.type != LEXER_IDENT_LITERAL\n        || context_p->token.keyword_type >= LEXER_FIRST_FUTURE_STRICT_RESERVED_WORD)\n    {\n      parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n    }\n\n    ecma_string_t *export_name_p = NULL;\n    ecma_string_t *local_name_p = NULL;\n\n    lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_NEW_IDENT_LITERAL);\n\n    if (!has_module_specifier\n        && !scanner_literal_exists (context_p, context_p->lit_object.index))\n    {\n      parser_raise_error (context_p, PARSER_ERR_EXPORT_NOT_DEFINED);\n    }\n\n    uint16_t local_name_index = context_p->lit_object.index;\n    uint16_t export_name_index = PARSER_MAXIMUM_NUMBER_OF_LITERALS;\n\n    lexer_next_token (context_p);\n    if (lexer_token_is_identifier (context_p, \"as\", 2))\n    {\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_LITERAL\n          || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n      {\n        parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n      }\n\n      lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_NEW_IDENT_LITERAL);\n\n      export_name_index = context_p->lit_object.index;\n\n      lexer_next_token (context_p);\n    }\n\n    lexer_literal_t *literal_p = PARSER_GET_LITERAL (local_name_index);\n    local_name_p = ecma_new_ecma_string_from_utf8 (literal_p->u.char_p, literal_p->prop.length);\n\n    if (export_name_index != PARSER_MAXIMUM_NUMBER_OF_LITERALS)\n    {\n      lexer_literal_t *as_literal_p = PARSER_GET_LITERAL (export_name_index);\n      export_name_p = ecma_new_ecma_string_from_utf8 (as_literal_p->u.char_p, as_literal_p->prop.length);\n    }\n    else\n    {\n      export_name_p = local_name_p;\n      ecma_ref_ecma_string (local_name_p);\n    }\n\n    if (parser_module_check_duplicate_export (context_p, export_name_p))\n    {\n      ecma_deref_ecma_string (local_name_p);\n      ecma_deref_ecma_string (export_name_p);\n      parser_raise_error (context_p, PARSER_ERR_DUPLICATED_EXPORT_IDENTIFIER);\n    }\n\n    parser_module_add_names_to_node (context_p, export_name_p, local_name_p);\n    ecma_deref_ecma_string (local_name_p);\n    ecma_deref_ecma_string (export_name_p);\n\n    if (context_p->token.type != LEXER_COMMA\n        && context_p->token.type != LEXER_RIGHT_BRACE)\n    {\n      parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_COMMA_EXPECTED);\n    }\n    else if (context_p->token.type == LEXER_COMMA)\n    {\n      lexer_next_token (context_p);\n    }\n\n    if (lexer_token_is_identifier (context_p, \"from\", 4))\n    {\n      parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED);\n    }\n  }\n} /* parser_module_parse_export_clause */\n\n/**\n * Parse an ImportClause\n */\nvoid\nparser_module_parse_import_clause (parser_context_t *context_p) /**< parser context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_LEFT_BRACE);\n  lexer_next_token (context_p);\n\n  while (true)\n  {\n    if (context_p->token.type == LEXER_RIGHT_BRACE)\n    {\n      lexer_next_token (context_p);\n      break;\n    }\n\n    if (context_p->token.type != LEXER_LITERAL\n        || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n    {\n      parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n    }\n\n    if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n    {\n      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_ERR_REDECLARED);\n      parser_raise_error (context_p, PARSER_ERR_VARIABLE_REDECLARED);\n    }\n\n    ecma_string_t *import_name_p = NULL;\n    ecma_string_t *local_name_p = NULL;\n\n    lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_NEW_IDENT_LITERAL);\n\n    uint16_t import_name_index = context_p->lit_object.index;\n    uint16_t local_name_index = PARSER_MAXIMUM_NUMBER_OF_LITERALS;\n\n    lexer_next_token (context_p);\n    if (lexer_token_is_identifier (context_p, \"as\", 2))\n    {\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_LITERAL\n          || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n      {\n        parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n      }\n\n      if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n      {\n        JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_ERR_REDECLARED);\n        parser_raise_error (context_p, PARSER_ERR_VARIABLE_REDECLARED);\n      }\n\n      lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_NEW_IDENT_LITERAL);\n\n      local_name_index = context_p->lit_object.index;\n\n      lexer_next_token (context_p);\n    }\n\n    lexer_literal_t *literal_p = PARSER_GET_LITERAL (import_name_index);\n    import_name_p = ecma_new_ecma_string_from_utf8 (literal_p->u.char_p, literal_p->prop.length);\n\n    if (local_name_index != PARSER_MAXIMUM_NUMBER_OF_LITERALS)\n    {\n      lexer_literal_t *as_literal_p = PARSER_GET_LITERAL (local_name_index);\n      local_name_p = ecma_new_ecma_string_from_utf8 (as_literal_p->u.char_p, as_literal_p->prop.length);\n    }\n    else\n    {\n      local_name_p = import_name_p;\n      ecma_ref_ecma_string (local_name_p);\n    }\n\n    if (parser_module_check_duplicate_import (context_p, local_name_p))\n    {\n      ecma_deref_ecma_string (local_name_p);\n      ecma_deref_ecma_string (import_name_p);\n      parser_raise_error (context_p, PARSER_ERR_DUPLICATED_IMPORT_BINDING);\n    }\n\n    parser_module_add_names_to_node (context_p, import_name_p, local_name_p);\n    ecma_deref_ecma_string (local_name_p);\n    ecma_deref_ecma_string (import_name_p);\n\n    if (context_p->token.type != LEXER_COMMA\n        && (context_p->token.type != LEXER_RIGHT_BRACE))\n    {\n      parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_COMMA_EXPECTED);\n    }\n    else if (context_p->token.type == LEXER_COMMA)\n    {\n      lexer_next_token (context_p);\n    }\n\n    if (lexer_token_is_identifier (context_p, \"from\", 4))\n    {\n      parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED);\n    }\n  }\n} /* parser_module_parse_import_clause */\n\n/**\n * Raises parser error if the import or export statement is not in the global scope.\n */\nvoid\nparser_module_check_request_place (parser_context_t *context_p) /**< parser context */\n{\n  if (context_p->last_context_p != NULL\n      || context_p->stack_top_uint8 != 0\n      || (context_p->status_flags & PARSER_IS_FUNCTION)\n      || (context_p->global_status_flags & ECMA_PARSE_EVAL)\n      || (context_p->global_status_flags & ECMA_PARSE_MODULE) == 0)\n  {\n    parser_raise_error (context_p, PARSER_ERR_MODULE_UNEXPECTED);\n  }\n} /* parser_module_check_request_place */\n\n/**\n * Handle module specifier at the end of the import / export statement.\n */\nvoid\nparser_module_handle_module_specifier (parser_context_t *context_p) /**< parser context */\n{\n  ecma_module_node_t *module_node_p = context_p->module_current_node_p;\n  if (context_p->token.type != LEXER_LITERAL\n      || context_p->token.lit_location.type != LEXER_STRING_LITERAL\n      || context_p->token.lit_location.length == 0)\n  {\n    parser_raise_error (context_p, PARSER_ERR_STRING_EXPECTED);\n  }\n\n  lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_STRING_LITERAL);\n\n  ecma_string_t *name_p = ecma_new_ecma_string_from_utf8 (context_p->lit_object.literal_p->u.char_p,\n                                                          context_p->lit_object.literal_p->prop.length);\n\n  ecma_module_t *module_p = ecma_module_find_native_module (name_p);\n\n  if (module_p)\n  {\n    ecma_deref_ecma_string (name_p);\n    goto module_found;\n  }\n\n  ecma_deref_ecma_string (name_p);\n  ecma_string_t *path_p = ecma_module_create_normalized_path (context_p->lit_object.literal_p->u.char_p,\n                                                              context_p->lit_object.literal_p->prop.length,\n                                                              JERRY_CONTEXT (module_current_p)->path_p);\n\n  if (path_p == NULL)\n  {\n    parser_raise_error (context_p, PARSER_ERR_FILE_NOT_FOUND);\n  }\n\n  module_p = ecma_module_find_module (path_p);\n\nmodule_found:\n  module_node_p->module_request_p = module_p;\n  lexer_next_token (context_p);\n} /* parser_module_handle_module_specifier */\n\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser-statm.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"js-parser-internal.h\"\n\n#if ENABLED (JERRY_PARSER)\n#include \"jcontext.h\"\n\n#include \"ecma-helpers.h\"\n#include \"lit-char-helpers.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_stmt Statement parser\n * @{\n */\n\n/**\n * Parser statement types.\n *\n * When a new statement is added, the following\n * arrays must be updated as well:\n *  - statement_lengths[]\n *  - parser_statement_flags[]\n */\ntypedef enum\n{\n  PARSER_STATEMENT_START,\n  PARSER_STATEMENT_BLOCK,\n#if ENABLED (JERRY_ESNEXT)\n  PARSER_STATEMENT_BLOCK_SCOPE,\n  PARSER_STATEMENT_PRIVATE_SCOPE,\n  PARSER_STATEMENT_BLOCK_CONTEXT,\n  PARSER_STATEMENT_PRIVATE_CONTEXT,\n#endif /* ENABLED (JERRY_ESNEXT) */\n  PARSER_STATEMENT_LABEL,\n  PARSER_STATEMENT_IF,\n  PARSER_STATEMENT_ELSE,\n  PARSER_STATEMENT_SWITCH,\n  PARSER_STATEMENT_SWITCH_NO_DEFAULT,\n  PARSER_STATEMENT_DO_WHILE,\n  PARSER_STATEMENT_WHILE,\n  PARSER_STATEMENT_FOR,\n  PARSER_STATEMENT_FOR_IN,\n#if ENABLED (JERRY_ESNEXT)\n  PARSER_STATEMENT_FOR_OF,\n  PARSER_STATEMENT_FOR_AWAIT_OF,\n#endif /* ENABLED (JERRY_ESNEXT) */\n  PARSER_STATEMENT_WITH,\n  PARSER_STATEMENT_TRY,\n} parser_statement_type_t;\n\n/**\n * Parser statement type flags.\n */\ntypedef enum\n{\n  PARSER_STATM_NO_OPTS = 0, /**< no options */\n  PARSER_STATM_SINGLE_STATM = (1 << 0), /**< statment can form single statement context */\n  PARSER_STATM_HAS_BLOCK = (1 << 1), /**< statement always has a code block */\n  PARSER_STATM_BREAK_TARGET = (1 << 2), /**< break target statement */\n  PARSER_STATM_CONTINUE_TARGET = (1 << 3), /**< continue target statement */\n  PARSER_STATM_CONTEXT_BREAK = (1 << 4), /**< uses another instruction form when crosses their borders */\n} parser_statement_flags_t;\n\n/**\n * Parser statement attributes.\n * Note: the order of the attributes must be keep in sync with parser_statement_type_t\n */\nstatic const uint8_t parser_statement_flags[] =\n{\n  /* PARSER_STATEMENT_START */\n  PARSER_STATM_HAS_BLOCK,\n  /* PARSER_STATEMENT_BLOCK, */\n  PARSER_STATM_HAS_BLOCK,\n#if ENABLED (JERRY_ESNEXT)\n  /* PARSER_STATEMENT_BLOCK_SCOPE, */\n  PARSER_STATM_HAS_BLOCK,\n  /* PARSER_STATEMENT_PRIVATE_SCOPE, */\n  PARSER_STATM_NO_OPTS,\n  /* PARSER_STATEMENT_BLOCK_CONTEXT, */\n  PARSER_STATM_HAS_BLOCK | PARSER_STATM_CONTEXT_BREAK,\n  /* PARSER_STATEMENT_PRIVATE_CONTEXT, */\n  PARSER_STATM_CONTEXT_BREAK,\n#endif /* ENABLED (JERRY_ESNEXT) */\n  /* PARSER_STATEMENT_LABEL */\n  PARSER_STATM_SINGLE_STATM,\n  /* PARSER_STATEMENT_IF */\n  PARSER_STATM_SINGLE_STATM,\n  /* PARSER_STATEMENT_ELSE */\n  PARSER_STATM_SINGLE_STATM,\n  /* PARSER_STATEMENT_SWITCH */\n  PARSER_STATM_HAS_BLOCK | PARSER_STATM_BREAK_TARGET,\n  /* PARSER_STATEMENT_SWITCH_NO_DEFAULT */\n  PARSER_STATM_HAS_BLOCK | PARSER_STATM_BREAK_TARGET,\n  /* PARSER_STATEMENT_DO_WHILE */\n  PARSER_STATM_BREAK_TARGET | PARSER_STATM_CONTINUE_TARGET | PARSER_STATM_SINGLE_STATM,\n  /* PARSER_STATEMENT_WHILE */\n  PARSER_STATM_BREAK_TARGET | PARSER_STATM_CONTINUE_TARGET | PARSER_STATM_SINGLE_STATM,\n  /* PARSER_STATEMENT_FOR */\n  PARSER_STATM_BREAK_TARGET | PARSER_STATM_CONTINUE_TARGET | PARSER_STATM_SINGLE_STATM,\n  /* PARSER_STATEMENT_FOR_IN */\n  PARSER_STATM_BREAK_TARGET | PARSER_STATM_CONTINUE_TARGET | PARSER_STATM_SINGLE_STATM | PARSER_STATM_CONTEXT_BREAK,\n#if ENABLED (JERRY_ESNEXT)\n  /* PARSER_STATEMENT_FOR_OF */\n  PARSER_STATM_BREAK_TARGET | PARSER_STATM_CONTINUE_TARGET | PARSER_STATM_SINGLE_STATM | PARSER_STATM_CONTEXT_BREAK,\n  /* PARSER_STATEMENT_FOR_AWAIT_OF */\n  PARSER_STATM_BREAK_TARGET | PARSER_STATM_CONTINUE_TARGET | PARSER_STATM_SINGLE_STATM | PARSER_STATM_CONTEXT_BREAK,\n#endif /* ENABLED (JERRY_ESNEXT) */\n  /* PARSER_STATEMENT_WITH */\n  PARSER_STATM_CONTEXT_BREAK | PARSER_STATM_SINGLE_STATM,\n  /* PARSER_STATEMENT_TRY */\n  PARSER_STATM_HAS_BLOCK | PARSER_STATM_CONTEXT_BREAK\n};\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Block statement.\n */\ntypedef struct\n{\n  uint16_t scope_stack_top;               /**< preserved top of scope stack */\n  uint16_t scope_stack_reg_top;           /**< preserved top register of scope stack */\n} parser_block_statement_t;\n\n/**\n * Context of block statement.\n */\ntypedef struct\n{\n  parser_branch_t branch;                 /**< branch to the end */\n} parser_block_context_t;\n\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n/**\n * Loop statement.\n */\ntypedef struct\n{\n  parser_branch_node_t *branch_list_p;    /**< list of breaks and continues targeting this statement */\n} parser_loop_statement_t;\n\n/**\n * Label statement.\n */\ntypedef struct\n{\n  lexer_lit_location_t label_ident;       /**< name of the label */\n  parser_branch_node_t *break_list_p;     /**< list of breaks targeting this label */\n} parser_label_statement_t;\n\n/**\n * If/else statement.\n */\ntypedef struct\n{\n  parser_branch_t branch;                 /**< branch to the end */\n} parser_if_else_statement_t;\n\n/**\n * Switch statement.\n */\ntypedef struct\n{\n  parser_branch_t default_branch;         /**< branch to the default case */\n  parser_branch_node_t *branch_list_p;    /**< branches of case statements */\n} parser_switch_statement_t;\n\n/**\n * Do-while statement.\n */\ntypedef struct\n{\n  uint32_t start_offset;                  /**< start byte code offset */\n} parser_do_while_statement_t;\n\n/**\n * While statement.\n */\ntypedef struct\n{\n  parser_branch_t branch;                 /**< branch to the end */\n  scanner_location_t condition_location;  /**< condition part */\n  uint32_t start_offset;                  /**< start byte code offset */\n} parser_while_statement_t;\n\n/**\n * For statement.\n */\ntypedef struct\n{\n  parser_branch_t branch;                 /**< branch to the end */\n  scanner_location_t condition_location;  /**< condition part */\n  scanner_location_t expression_location; /**< expression part */\n  uint32_t start_offset;                  /**< start byte code offset */\n} parser_for_statement_t;\n\n/**\n * For-in statement.\n */\ntypedef struct\n{\n  parser_branch_t branch;                 /**< branch to the end */\n  uint32_t start_offset;                  /**< start byte code offset */\n} parser_for_in_of_statement_t;\n\n/**\n * With statement.\n */\ntypedef struct\n{\n  parser_branch_t branch;                 /**< branch to the end */\n} parser_with_statement_t;\n\n/**\n * Lexer token types.\n */\ntypedef enum\n{\n  parser_try_block,                       /**< try block */\n  parser_catch_block,                     /**< catch block */\n  parser_finally_block,                   /**< finally block */\n} parser_try_block_type_t;\n\n/**\n * Try statement.\n */\ntypedef struct\n{\n  parser_try_block_type_t type;           /**< current block type */\n  uint16_t scope_stack_top;               /**< current top of scope stack */\n  uint16_t scope_stack_reg_top;           /**< current top register of scope stack */\n  parser_branch_t branch;                 /**< branch to the end of the current block */\n} parser_try_statement_t;\n\n/**\n * Returns the data consumed by a statement. It can be used\n * to skip undesired frames on the stack during frame search.\n *\n * @return size consumed by a statement.\n */\nstatic inline size_t\nparser_statement_length (uint8_t type) /**< type of statement */\n{\n  static const uint8_t statement_lengths[] =\n  {\n    /* PARSER_STATEMENT_BLOCK */\n    1,\n#if ENABLED (JERRY_ESNEXT)\n    /* PARSER_STATEMENT_BLOCK_SCOPE */\n    (uint8_t) (sizeof (parser_block_statement_t) + 1),\n    /* PARSER_STATEMENT_PRIVATE_SCOPE */\n    (uint8_t) (sizeof (parser_block_statement_t) + 1),\n    /* PARSER_STATEMENT_BLOCK_CONTEXT */\n    (uint8_t) (sizeof (parser_block_statement_t) + sizeof (parser_block_context_t) + 1),\n    /* PARSER_STATEMENT_PRIVATE_CONTEXT */\n    (uint8_t) (sizeof (parser_block_statement_t) + sizeof (parser_block_context_t) + 1),\n#endif /* ENABLED (JERRY_ESNEXT) */\n    /* PARSER_STATEMENT_LABEL */\n    (uint8_t) (sizeof (parser_label_statement_t) + 1),\n    /* PARSER_STATEMENT_IF */\n    (uint8_t) (sizeof (parser_if_else_statement_t) + 1),\n    /* PARSER_STATEMENT_ELSE */\n    (uint8_t) (sizeof (parser_if_else_statement_t) + 1),\n    /* PARSER_STATEMENT_SWITCH */\n    (uint8_t) (sizeof (parser_switch_statement_t) + sizeof (parser_loop_statement_t) + 1),\n    /* PARSER_STATEMENT_SWITCH_NO_DEFAULT */\n    (uint8_t) (sizeof (parser_switch_statement_t) + sizeof (parser_loop_statement_t) + 1),\n    /* PARSER_STATEMENT_DO_WHILE */\n    (uint8_t) (sizeof (parser_do_while_statement_t) + sizeof (parser_loop_statement_t) + 1),\n    /* PARSER_STATEMENT_WHILE */\n    (uint8_t) (sizeof (parser_while_statement_t) + sizeof (parser_loop_statement_t) + 1),\n    /* PARSER_STATEMENT_FOR */\n    (uint8_t) (sizeof (parser_for_statement_t) + sizeof (parser_loop_statement_t) + 1),\n    /* PARSER_STATEMENT_FOR_IN */\n    (uint8_t) (sizeof (parser_for_in_of_statement_t) + sizeof (parser_loop_statement_t) + 1),\n#if ENABLED (JERRY_ESNEXT)\n    /* PARSER_STATEMENT_FOR_OF */\n    (uint8_t) (sizeof (parser_for_in_of_statement_t) + sizeof (parser_loop_statement_t) + 1),\n    /* PARSER_STATEMENT_FOR_AWAIT_OF */\n    (uint8_t) (sizeof (parser_for_in_of_statement_t) + sizeof (parser_loop_statement_t) + 1),\n#endif /* ENABLED (JERRY_ESNEXT) */\n    /* PARSER_STATEMENT_WITH */\n    (uint8_t) (sizeof (parser_with_statement_t) + 1 + 1),\n    /* PARSER_STATEMENT_TRY */\n    (uint8_t) (sizeof (parser_try_statement_t) + 1),\n  };\n\n  JERRY_ASSERT (type >= PARSER_STATEMENT_BLOCK && type <= PARSER_STATEMENT_TRY);\n\n  return statement_lengths[type - PARSER_STATEMENT_BLOCK];\n} /* parser_statement_length */\n/**\n * Parse expression enclosed in parens.\n */\nstatic inline void\nparser_parse_enclosed_expr (parser_context_t *context_p) /**< context */\n{\n  lexer_next_token (context_p);\n\n  if (context_p->token.type != LEXER_LEFT_PAREN)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LEFT_PAREN_EXPECTED);\n  }\n\n  lexer_next_token (context_p);\n  parser_parse_expression (context_p, PARSE_EXPR);\n\n  if (context_p->token.type != LEXER_RIGHT_PAREN)\n  {\n    parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n  }\n  lexer_next_token (context_p);\n} /* parser_parse_enclosed_expr */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Create a block context.\n *\n * @return true - when a context is created, false - otherwise\n */\nstatic bool\nparser_push_block_context (parser_context_t *context_p, /**< context */\n                           bool is_private) /**< is private (bound to a statement) context */\n{\n  JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_BLOCK);\n\n  parser_block_statement_t block_statement;\n  block_statement.scope_stack_top = context_p->scope_stack_top;\n  block_statement.scope_stack_reg_top = context_p->scope_stack_reg_top;\n\n  bool is_context_needed = false;\n\n  if (scanner_is_context_needed (context_p, PARSER_CHECK_BLOCK_CONTEXT))\n  {\n    parser_block_context_t block_context;\n\n#ifndef JERRY_NDEBUG\n    PARSER_PLUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_BLOCK_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n    parser_emit_cbc_forward_branch (context_p,\n                                    CBC_BLOCK_CREATE_CONTEXT,\n                                    &block_context.branch);\n    parser_stack_push (context_p, &block_context, sizeof (parser_block_context_t));\n    is_context_needed = true;\n  }\n\n  scanner_create_variables (context_p, SCANNER_CREATE_VARS_NO_OPTS);\n  parser_stack_push (context_p, &block_statement, sizeof (parser_block_statement_t));\n\n  uint8_t statement_type;\n\n  if (is_private)\n  {\n    statement_type = (is_context_needed ? PARSER_STATEMENT_PRIVATE_CONTEXT : PARSER_STATEMENT_PRIVATE_SCOPE);\n  }\n  else\n  {\n    statement_type = (is_context_needed ? PARSER_STATEMENT_BLOCK_CONTEXT : PARSER_STATEMENT_BLOCK_SCOPE);\n  }\n\n  parser_stack_push_uint8 (context_p, statement_type);\n\n  return is_context_needed;\n} /* parser_push_block_context */\n\n/**\n * Pop block context.\n */\nstatic void\nparser_pop_block_context (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->stack_top_uint8 == PARSER_STATEMENT_BLOCK_SCOPE\n                || context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_SCOPE\n                || context_p->stack_top_uint8 == PARSER_STATEMENT_BLOCK_CONTEXT\n                || context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_CONTEXT);\n\n  uint8_t type = context_p->stack_top_uint8;\n\n  parser_block_statement_t block_statement;\n\n  parser_stack_pop_uint8 (context_p);\n  parser_stack_pop (context_p, &block_statement, sizeof (parser_block_statement_t));\n\n  context_p->scope_stack_top = block_statement.scope_stack_top;\n  context_p->scope_stack_reg_top = block_statement.scope_stack_reg_top;\n\n  if (type == PARSER_STATEMENT_BLOCK_CONTEXT || type == PARSER_STATEMENT_PRIVATE_CONTEXT)\n  {\n    PARSER_MINUS_EQUAL_U16 (context_p->stack_depth, PARSER_BLOCK_CONTEXT_STACK_ALLOCATION);\n#ifndef JERRY_NDEBUG\n    PARSER_MINUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_BLOCK_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n    parser_block_context_t block_context;\n    parser_stack_pop (context_p, &block_context, sizeof (parser_block_context_t));\n\n    parser_emit_cbc (context_p, CBC_CONTEXT_END);\n    parser_set_branch_to_current_position (context_p, &block_context.branch);\n  }\n\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n} /* parser_pop_block_context */\n\n/**\n * Validate lexical context for a declaration.\n */\nstatic void\nparser_validate_lexical_context (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_LET\n                || context_p->token.type == LEXER_KEYW_CONST\n                || context_p->token.type == LEXER_KEYW_CLASS);\n\n  if (parser_statement_flags[context_p->stack_top_uint8] & PARSER_STATM_SINGLE_STATM)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LEXICAL_SINGLE_STATEMENT);\n  }\n} /* parser_validate_lexical_context */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Parse var statement.\n */\nstatic void\nparser_parse_var_statement (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_VAR\n                || context_p->token.type == LEXER_KEYW_LET\n                || context_p->token.type == LEXER_KEYW_CONST);\n\n#if ENABLED (JERRY_ESNEXT)\n  uint8_t declaration_type = context_p->token.type;\n\n  if (declaration_type != LEXER_KEYW_VAR)\n  {\n    parser_validate_lexical_context (context_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  while (true)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (lexer_check_next_characters (context_p, LIT_CHAR_LEFT_SQUARE, LIT_CHAR_LEFT_BRACE))\n    {\n      parser_pattern_flags_t flags = PARSER_PATTERN_BINDING;\n\n      if (declaration_type == LEXER_KEYW_LET)\n      {\n        flags |= PARSER_PATTERN_LET;\n      }\n      else if (declaration_type == LEXER_KEYW_CONST)\n      {\n        flags |= PARSER_PATTERN_CONST;\n      }\n\n      parser_parse_initializer_by_next_char (context_p, flags);\n    }\n    else\n    {\n#endif /* ENABLED (JERRY_ESNEXT) */\n      lexer_expect_identifier (context_p, LEXER_IDENT_LITERAL);\n      JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                    && context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n#if ENABLED (JERRY_DEBUGGER) || ENABLED (JERRY_LINE_INFO)\n      parser_line_counter_t ident_line_counter = context_p->token.line;\n#endif /* ENABLED (JERRY_DEBUGGER) || ENABLED (JERRY_LINE_INFO) */\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      parser_module_append_export_name (context_p);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n#if ENABLED (JERRY_ESNEXT)\n      if (declaration_type != LEXER_KEYW_VAR\n          && context_p->token.keyword_type == LEXER_KEYW_LET)\n      {\n        parser_raise_error (context_p, PARSER_ERR_LEXICAL_LET_BINDING);\n      }\n\n      if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n      {\n        JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_ERR_REDECLARED);\n        parser_raise_error (context_p, PARSER_ERR_VARIABLE_REDECLARED);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type == LEXER_ASSIGN)\n      {\n#if ENABLED (JERRY_DEBUGGER)\n        if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n            && ident_line_counter != context_p->last_breakpoint_line)\n        {\n          parser_emit_cbc (context_p, CBC_BREAKPOINT_DISABLED);\n          parser_flush_cbc (context_p);\n\n          parser_append_breakpoint_info (context_p, JERRY_DEBUGGER_BREAKPOINT_LIST, ident_line_counter);\n\n          context_p->last_breakpoint_line = ident_line_counter;\n        }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_LINE_INFO)\n        if (ident_line_counter != context_p->last_line_info_line)\n        {\n          parser_emit_line_info (context_p, ident_line_counter, false);\n        }\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n        uint16_t index = context_p->lit_object.index;\n\n        lexer_next_token (context_p);\n        parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n        cbc_opcode_t opcode = CBC_ASSIGN_SET_IDENT;\n\n#if ENABLED (JERRY_ESNEXT)\n        uint16_t function_literal_index = parser_check_anonymous_function_declaration (context_p);\n\n        if (function_literal_index == PARSER_ANONYMOUS_CLASS)\n        {\n          uint16_t name_index = scanner_save_literal (context_p, index);\n          parser_emit_cbc_ext_literal (context_p, CBC_EXT_SET_CLASS_NAME, name_index);\n        }\n        else if (function_literal_index < PARSER_NAMED_FUNCTION)\n        {\n          parser_set_function_name (context_p, function_literal_index, index, 0);\n        }\n\n        if (declaration_type != LEXER_KEYW_VAR\n            && (index < PARSER_REGISTER_START))\n        {\n          opcode = CBC_INIT_LET;\n\n          if (scanner_literal_is_created (context_p, index))\n          {\n            opcode = CBC_ASSIGN_LET_CONST;\n          }\n          else if (declaration_type == LEXER_KEYW_CONST)\n          {\n            opcode = CBC_INIT_CONST;\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        parser_emit_cbc_literal (context_p, (uint16_t) opcode, index);\n      }\n#if ENABLED (JERRY_ESNEXT)\n      else if (declaration_type == LEXER_KEYW_LET)\n      {\n        parser_emit_cbc (context_p, CBC_PUSH_UNDEFINED);\n\n        uint16_t index = context_p->lit_object.index;\n        cbc_opcode_t opcode = CBC_MOV_IDENT;\n\n        if (index < PARSER_REGISTER_START)\n        {\n          opcode = (scanner_literal_is_created (context_p, index) ? CBC_ASSIGN_LET_CONST\n                                                                  : CBC_INIT_LET);\n        }\n\n        parser_emit_cbc_literal (context_p, (uint16_t) opcode, index);\n      }\n      else if (declaration_type == LEXER_KEYW_CONST)\n      {\n        parser_raise_error (context_p, PARSER_ERR_MISSING_ASSIGN_AFTER_CONST);\n      }\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (context_p->token.type != LEXER_COMMA)\n    {\n      break;\n    }\n  }\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  context_p->status_flags &= (uint32_t) ~(PARSER_MODULE_STORE_IDENT);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n} /* parser_parse_var_statement */\n\n/**\n * Parse function statement.\n */\nstatic void\nparser_parse_function_statement (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_FUNCTION);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (parser_statement_flags[context_p->stack_top_uint8] & PARSER_STATM_SINGLE_STATM))\n  {\n    if (context_p->status_flags & PARSER_IS_STRICT)\n    {\n      parser_raise_error (context_p, PARSER_ERR_LEXICAL_SINGLE_STATEMENT);\n    }\n\n    if (context_p->stack_top_uint8 == PARSER_STATEMENT_IF\n        || context_p->stack_top_uint8 == PARSER_STATEMENT_ELSE)\n    {\n      /* There must be a parser error later if this check fails. */\n      if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n      {\n        parser_push_block_context (context_p, true);\n      }\n    }\n    else if (context_p->stack_top_uint8 == PARSER_STATEMENT_LABEL)\n    {\n      parser_stack_iterator_t iterator;\n      parser_stack_iterator_init (context_p, &iterator);\n      parser_stack_iterator_skip (&iterator, sizeof (parser_label_statement_t) + 1);\n\n      while (true)\n      {\n        uint8_t type = parser_stack_iterator_read_uint8 (&iterator);\n\n        if (type == PARSER_STATEMENT_LABEL)\n        {\n          parser_stack_iterator_skip (&iterator, sizeof (parser_label_statement_t) + 1);\n          continue;\n        }\n\n        if (parser_statement_flags[type] & PARSER_STATM_HAS_BLOCK)\n        {\n          break;\n        }\n\n        parser_raise_error (context_p, PARSER_ERR_LABELLED_FUNC_NOT_IN_BLOCK);\n      }\n    }\n    else\n    {\n      parser_raise_error (context_p, PARSER_ERR_LEXICAL_SINGLE_STATEMENT);\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_DEBUGGER)\n  parser_line_counter_t debugger_line = context_p->token.line;\n  parser_line_counter_t debugger_column = context_p->token.column;\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_ESNEXT)\n  bool is_generator_function = false;\n\n  if (lexer_consume_generator (context_p))\n  {\n    is_generator_function = true;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  lexer_expect_identifier (context_p, LEXER_NEW_IDENT_LITERAL);\n  JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                && context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (context_p->next_scanner_info_p->source_p == context_p->source_p\n      && context_p->next_scanner_info_p->type == SCANNER_TYPE_ERR_REDECLARED)\n  {\n    parser_raise_error (context_p, PARSER_ERR_VARIABLE_REDECLARED);\n  }\n\n  uint16_t function_name_index = context_p->lit_object.index;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  parser_module_append_export_name (context_p);\n  context_p->status_flags &= (uint32_t) ~(PARSER_MODULE_STORE_IDENT);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n  uint32_t status_flags = PARSER_FUNCTION_CLOSURE;\n\n  if (context_p->token.keyword_type >= LEXER_FIRST_NON_STRICT_ARGUMENTS)\n  {\n    status_flags |= PARSER_HAS_NON_STRICT_ARG;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (is_generator_function)\n  {\n    status_flags |= PARSER_IS_GENERATOR_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n  }\n\n  if (context_p->next_scanner_info_p->u8_arg & SCANNER_FUNCTION_ASYNC)\n  {\n    status_flags |= PARSER_IS_ASYNC_FUNCTION | PARSER_DISALLOW_AWAIT_YIELD;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    lexer_literal_t *name_p = context_p->lit_object.literal_p;\n    jerry_debugger_send_string (JERRY_DEBUGGER_FUNCTION_NAME,\n                                JERRY_DEBUGGER_NO_SUBTYPE,\n                                name_p->u.char_p,\n                                name_p->prop.length);\n\n    /* Reset token position for the function. */\n    context_p->token.line = debugger_line;\n    context_p->token.column = debugger_column;\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  JERRY_ASSERT (context_p->scope_stack_top >= 2);\n  parser_scope_stack_t *scope_stack_p = context_p->scope_stack_p + context_p->scope_stack_top - 2;\n\n  uint16_t literal_index = context_p->lit_object.index;\n\n  while (literal_index != scope_stack_p->map_from)\n  {\n    scope_stack_p--;\n\n    JERRY_ASSERT (scope_stack_p >= context_p->scope_stack_p);\n  }\n\n  JERRY_ASSERT (scope_stack_p[1].map_from == PARSER_SCOPE_STACK_FUNC);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (!(context_p->status_flags & PARSER_IS_STRICT)\n      && (scope_stack_p >= context_p->scope_stack_p + context_p->scope_stack_global_end))\n  {\n    bool copy_value = true;\n\n    parser_scope_stack_t *stack_p = context_p->scope_stack_p;\n\n    while (stack_p < scope_stack_p)\n    {\n      if (literal_index == stack_p->map_from\n          && (stack_p->map_to & PARSER_SCOPE_STACK_NO_FUNCTION_COPY))\n      {\n        copy_value = false;\n        break;\n      }\n      stack_p++;\n    }\n\n    if (copy_value)\n    {\n      stack_p = context_p->scope_stack_p;\n\n      while (stack_p < scope_stack_p)\n      {\n        if (literal_index == stack_p->map_from)\n        {\n          JERRY_ASSERT (!(stack_p->map_to & PARSER_SCOPE_STACK_NO_FUNCTION_COPY));\n\n          uint16_t map_to = scanner_decode_map_to (stack_p);\n          uint16_t opcode = ((map_to >= PARSER_REGISTER_START) ? CBC_ASSIGN_LITERAL_SET_IDENT\n                                                               : CBC_COPY_TO_GLOBAL);\n\n          parser_emit_cbc_literal_value (context_p,\n                                         opcode,\n                                         scanner_decode_map_to (scope_stack_p),\n                                         map_to);\n          break;\n        }\n        stack_p++;\n      }\n\n      parser_flush_cbc (context_p);\n    }\n\n    if (JERRY_UNLIKELY (context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_SCOPE\n                        || context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_CONTEXT))\n    {\n      parser_pop_block_context (context_p);\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  lexer_literal_t *literal_p = PARSER_GET_LITERAL ((size_t) scope_stack_p[1].map_to);\n\n  JERRY_ASSERT ((literal_p->type == LEXER_UNUSED_LITERAL || literal_p->type == LEXER_FUNCTION_LITERAL)\n                && literal_p->status_flags == 0);\n\n  ecma_compiled_code_t *compiled_code_p = parser_parse_function (context_p, status_flags);\n\n  if (literal_p->type == LEXER_FUNCTION_LITERAL)\n  {\n    ecma_bytecode_deref (literal_p->u.bytecode_p);\n  }\n\n  literal_p->u.bytecode_p = compiled_code_p;\n  literal_p->type = LEXER_FUNCTION_LITERAL;\n\n#if ENABLED (JERRY_ESNEXT)\n  parser_compiled_code_set_function_name (context_p, compiled_code_p, function_name_index, 0);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  lexer_next_token (context_p);\n} /* parser_parse_function_statement */\n\n/**\n * Parse if statement (starting part).\n */\nstatic void\nparser_parse_if_statement_start (parser_context_t *context_p) /**< context */\n{\n  parser_if_else_statement_t if_statement;\n\n  parser_parse_enclosed_expr (context_p);\n\n  parser_emit_cbc_forward_branch (context_p,\n                                  CBC_BRANCH_IF_FALSE_FORWARD,\n                                  &if_statement.branch);\n\n  parser_stack_push (context_p, &if_statement, sizeof (parser_if_else_statement_t));\n  parser_stack_push_uint8 (context_p, PARSER_STATEMENT_IF);\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n} /* parser_parse_if_statement_start */\n\n/**\n * Parse if statement (ending part).\n *\n * @return true  - if parsing an 'else' statement\n *         false - otherwise\n */\nstatic bool\nparser_parse_if_statement_end (parser_context_t *context_p) /**< context */\n{\n  parser_if_else_statement_t if_statement;\n  parser_if_else_statement_t else_statement;\n  parser_stack_iterator_t iterator;\n\n  JERRY_ASSERT (context_p->stack_top_uint8 == PARSER_STATEMENT_IF);\n\n  if (context_p->token.type != LEXER_KEYW_ELSE)\n  {\n    parser_stack_pop_uint8 (context_p);\n    parser_stack_pop (context_p, &if_statement, sizeof (parser_if_else_statement_t));\n    parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n    parser_set_branch_to_current_position (context_p, &if_statement.branch);\n\n    return false;\n  }\n\n  parser_stack_change_last_uint8 (context_p, PARSER_STATEMENT_ELSE);\n  parser_stack_iterator_init (context_p, &iterator);\n  parser_stack_iterator_skip (&iterator, 1);\n  parser_stack_iterator_read (&iterator, &if_statement, sizeof (parser_if_else_statement_t));\n\n  parser_emit_cbc_forward_branch (context_p,\n                                  CBC_JUMP_FORWARD,\n                                  &else_statement.branch);\n\n  parser_set_branch_to_current_position (context_p, &if_statement.branch);\n\n  parser_stack_iterator_write (&iterator, &else_statement, sizeof (parser_if_else_statement_t));\n\n  lexer_next_token (context_p);\n  return true;\n} /* parser_parse_if_statement_end */\n\n/**\n * Parse with statement (starting part).\n */\nstatic void\nparser_parse_with_statement_start (parser_context_t *context_p) /**< context */\n{\n  parser_with_statement_t with_statement;\n\n  if (context_p->status_flags & PARSER_IS_STRICT)\n  {\n    parser_raise_error (context_p, PARSER_ERR_WITH_NOT_ALLOWED);\n  }\n\n  parser_parse_enclosed_expr (context_p);\n\n#ifndef JERRY_NDEBUG\n  PARSER_PLUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_WITH_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n  uint8_t inside_with = (context_p->status_flags & PARSER_INSIDE_WITH) != 0;\n\n  context_p->status_flags |= PARSER_INSIDE_WITH;\n  parser_emit_cbc_ext_forward_branch (context_p,\n                                      CBC_EXT_WITH_CREATE_CONTEXT,\n                                      &with_statement.branch);\n\n  parser_stack_push (context_p, &with_statement, sizeof (parser_with_statement_t));\n  parser_stack_push_uint8 (context_p, inside_with);\n  parser_stack_push_uint8 (context_p, PARSER_STATEMENT_WITH);\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n} /* parser_parse_with_statement_start */\n\n/**\n * Parse with statement (ending part).\n */\nstatic void\nparser_parse_with_statement_end (parser_context_t *context_p) /**< context */\n{\n  parser_with_statement_t with_statement;\n\n  JERRY_ASSERT (context_p->status_flags & PARSER_INSIDE_WITH);\n\n  parser_stack_pop_uint8 (context_p);\n\n  if (!context_p->stack_top_uint8)\n  {\n    context_p->status_flags &= (uint32_t) ~PARSER_INSIDE_WITH;\n  }\n\n  parser_stack_pop_uint8 (context_p);\n  parser_stack_pop (context_p, &with_statement, sizeof (parser_with_statement_t));\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n  parser_flush_cbc (context_p);\n  PARSER_MINUS_EQUAL_U16 (context_p->stack_depth, PARSER_WITH_CONTEXT_STACK_ALLOCATION);\n#ifndef JERRY_NDEBUG\n  PARSER_MINUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_WITH_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n  parser_emit_cbc (context_p, CBC_CONTEXT_END);\n  parser_set_branch_to_current_position (context_p, &with_statement.branch);\n} /* parser_parse_with_statement_end */\n\n/**\n * Parse do-while statement (ending part).\n */\nstatic void\nparser_parse_do_while_statement_end (parser_context_t *context_p) /**< context */\n{\n  parser_loop_statement_t loop;\n\n  JERRY_ASSERT (context_p->stack_top_uint8 == PARSER_STATEMENT_DO_WHILE);\n\n  if (context_p->token.type != LEXER_KEYW_WHILE)\n  {\n    parser_raise_error (context_p, PARSER_ERR_WHILE_EXPECTED);\n  }\n\n  parser_stack_iterator_t iterator;\n  parser_stack_iterator_init (context_p, &iterator);\n\n  parser_stack_iterator_skip (&iterator, 1);\n  parser_stack_iterator_read (&iterator, &loop, sizeof (parser_loop_statement_t));\n\n  parser_set_continues_to_current_position (context_p, loop.branch_list_p);\n\n  JERRY_ASSERT (context_p->next_scanner_info_p->source_p != context_p->source_p);\n\n  parser_parse_enclosed_expr (context_p);\n\n  if (context_p->last_cbc_opcode != CBC_PUSH_FALSE)\n  {\n    cbc_opcode_t opcode = CBC_BRANCH_IF_TRUE_BACKWARD;\n    if (context_p->last_cbc_opcode == CBC_LOGICAL_NOT)\n    {\n      context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n      opcode = CBC_BRANCH_IF_FALSE_BACKWARD;\n    }\n    else if (context_p->last_cbc_opcode == CBC_PUSH_TRUE)\n    {\n      context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n      opcode = CBC_JUMP_BACKWARD;\n    }\n\n    parser_do_while_statement_t do_while_statement;\n    parser_stack_iterator_skip (&iterator, sizeof (parser_loop_statement_t));\n    parser_stack_iterator_read (&iterator, &do_while_statement, sizeof (parser_do_while_statement_t));\n\n    parser_emit_cbc_backward_branch (context_p, (uint16_t) opcode, do_while_statement.start_offset);\n  }\n  else\n  {\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n  }\n\n  parser_stack_pop (context_p, NULL, 1 + sizeof (parser_loop_statement_t) + sizeof (parser_do_while_statement_t));\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n  parser_set_breaks_to_current_position (context_p, loop.branch_list_p);\n} /* parser_parse_do_while_statement_end */\n\n/**\n * Parse while statement (starting part).\n */\nstatic void\nparser_parse_while_statement_start (parser_context_t *context_p) /**< context */\n{\n  parser_while_statement_t while_statement;\n  parser_loop_statement_t loop;\n\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_WHILE);\n  lexer_next_token (context_p);\n\n  if (context_p->token.type != LEXER_LEFT_PAREN)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LEFT_PAREN_EXPECTED);\n  }\n\n  JERRY_ASSERT (context_p->next_scanner_info_p->source_p != context_p->source_p\n                || context_p->next_scanner_info_p->type == SCANNER_TYPE_WHILE);\n\n  if (context_p->next_scanner_info_p->source_p != context_p->source_p)\n  {\n    /* The prescanner couldn't find the end of the while condition. */\n    lexer_next_token (context_p);\n    parser_parse_expression (context_p, PARSE_EXPR);\n\n    JERRY_ASSERT (context_p->token.type != LEXER_RIGHT_PAREN);\n    parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n  }\n\n  parser_emit_cbc_forward_branch (context_p, CBC_JUMP_FORWARD, &while_statement.branch);\n\n  JERRY_ASSERT (context_p->last_cbc_opcode == PARSER_CBC_UNAVAILABLE);\n\n  while_statement.start_offset = context_p->byte_code_size;\n  scanner_get_location (&while_statement.condition_location, context_p);\n\n  scanner_set_location (context_p, &((scanner_location_info_t *) context_p->next_scanner_info_p)->location);\n  scanner_release_next (context_p, sizeof (scanner_location_info_t));\n  scanner_seek (context_p);\n  lexer_next_token (context_p);\n\n  loop.branch_list_p = NULL;\n\n  parser_stack_push (context_p, &while_statement, sizeof (parser_while_statement_t));\n  parser_stack_push (context_p, &loop, sizeof (parser_loop_statement_t));\n  parser_stack_push_uint8 (context_p, PARSER_STATEMENT_WHILE);\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n} /* parser_parse_while_statement_start */\n\n/**\n * Parse while statement (ending part).\n */\nstatic void JERRY_ATTR_NOINLINE\nparser_parse_while_statement_end (parser_context_t *context_p) /**< context */\n{\n  parser_while_statement_t while_statement;\n  parser_loop_statement_t loop;\n  lexer_token_t current_token;\n  scanner_location_t location;\n  cbc_opcode_t opcode;\n\n  JERRY_ASSERT (context_p->stack_top_uint8 == PARSER_STATEMENT_WHILE);\n\n  parser_stack_iterator_t iterator;\n  parser_stack_iterator_init (context_p, &iterator);\n\n  parser_stack_iterator_skip (&iterator, 1);\n  parser_stack_iterator_read (&iterator, &loop, sizeof (parser_loop_statement_t));\n  parser_stack_iterator_skip (&iterator, sizeof (parser_loop_statement_t));\n  parser_stack_iterator_read (&iterator, &while_statement, sizeof (parser_while_statement_t));\n\n  scanner_get_location (&location, context_p);\n  current_token = context_p->token;\n\n  parser_set_branch_to_current_position (context_p, &while_statement.branch);\n  parser_set_continues_to_current_position (context_p, loop.branch_list_p);\n\n  scanner_set_location (context_p, &while_statement.condition_location);\n  scanner_seek (context_p);\n  lexer_next_token (context_p);\n\n  parser_parse_expression (context_p, PARSE_EXPR);\n  if (context_p->token.type != LEXER_RIGHT_PAREN)\n  {\n    parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n  }\n\n  opcode = CBC_BRANCH_IF_TRUE_BACKWARD;\n  if (context_p->last_cbc_opcode == CBC_LOGICAL_NOT)\n  {\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n    opcode = CBC_BRANCH_IF_FALSE_BACKWARD;\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_TRUE)\n  {\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n    opcode = CBC_JUMP_BACKWARD;\n  }\n\n  parser_stack_pop (context_p, NULL, 1 + sizeof (parser_loop_statement_t) + sizeof (parser_while_statement_t));\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n  parser_emit_cbc_backward_branch (context_p, (uint16_t) opcode, while_statement.start_offset);\n  parser_set_breaks_to_current_position (context_p, loop.branch_list_p);\n\n  /* Calling scanner_seek is unnecessary because all\n   * info blocks inside the while statement should be processed. */\n  scanner_set_location (context_p, &location);\n  context_p->token = current_token;\n} /* parser_parse_while_statement_end */\n\n/**\n * Check whether the opcode is a valid LeftHandSide expression\n * and convert it back to an assignment.\n *\n * @return the compatible assignment opcode\n */\nstatic uint16_t\nparser_check_left_hand_side_expression (parser_context_t *context_p, /**< context */\n                                        uint16_t opcode) /**< opcode to check */\n{\n  if (opcode == CBC_PUSH_LITERAL\n      && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL)\n  {\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n    return CBC_ASSIGN_SET_IDENT;\n  }\n  else if (opcode == CBC_PUSH_PROP)\n  {\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n    return CBC_ASSIGN;\n  }\n  else if (opcode == CBC_PUSH_PROP_LITERAL)\n  {\n    context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n    return CBC_ASSIGN_PROP_LITERAL;\n  }\n  else if (opcode == CBC_PUSH_PROP_LITERAL_LITERAL)\n  {\n    context_p->last_cbc_opcode = CBC_PUSH_TWO_LITERALS;\n    return CBC_ASSIGN;\n  }\n  else if (opcode == CBC_PUSH_PROP_THIS_LITERAL)\n  {\n    context_p->last_cbc_opcode = CBC_PUSH_THIS_LITERAL;\n    return CBC_ASSIGN;\n  }\n  else\n  {\n    /* Invalid LeftHandSide expression. */\n#if ENABLED (JERRY_ESNEXT)\n    parser_raise_error (context_p, PARSER_ERR_INVALID_LHS_FOR_LOOP);\n#else /* !ENABLED (JERRY_ESNEXT) */\n    parser_emit_cbc_ext (context_p, CBC_EXT_THROW_REFERENCE_ERROR);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    return CBC_ASSIGN;\n  }\n\n  return opcode;\n} /* parser_check_left_hand_side_expression */\n\n/**\n * Parse for statement (starting part).\n */\nstatic void\nparser_parse_for_statement_start (parser_context_t *context_p) /**< context */\n{\n  parser_loop_statement_t loop;\n\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_FOR);\n  lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  bool is_for_await = false;\n\n  if (context_p->token.type == LEXER_KEYW_AWAIT)\n  {\n    if (JERRY_UNLIKELY (context_p->token.lit_location.has_escape))\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_KEYWORD);\n    }\n    lexer_next_token (context_p);\n    is_for_await = true;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (context_p->token.type != LEXER_LEFT_PAREN)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (context_p->token.type == LEXER_LITERAL\n        && context_p->token.keyword_type == LEXER_KEYW_AWAIT\n        && !context_p->token.lit_location.has_escape)\n    {\n      parser_raise_error (context_p, PARSER_ERR_FOR_AWAIT_NO_ASYNC);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    parser_raise_error (context_p, PARSER_ERR_LEFT_PAREN_EXPECTED);\n  }\n\n  if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n  {\n    parser_for_in_of_statement_t for_in_of_statement;\n    scanner_location_t start_location, end_location;\n\n#if ENABLED (JERRY_ESNEXT)\n    JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_FOR_IN\n                  || context_p->next_scanner_info_p->type == SCANNER_TYPE_FOR_OF);\n\n    bool is_for_in = (context_p->next_scanner_info_p->type == SCANNER_TYPE_FOR_IN);\n    end_location = ((scanner_location_info_t *) context_p->next_scanner_info_p)->location;\n\n    scanner_release_next (context_p, sizeof (scanner_location_info_t));\n\n    scanner_get_location (&start_location, context_p);\n    lexer_next_token (context_p);\n\n    uint8_t token_type = LEXER_EOS;\n    bool has_context = false;\n\n    if (context_p->token.type == LEXER_KEYW_VAR\n        || context_p->token.type == LEXER_KEYW_LET\n        || context_p->token.type == LEXER_KEYW_CONST)\n    {\n      token_type = context_p->token.type;\n      has_context = context_p->next_scanner_info_p->source_p == context_p->source_p;\n      JERRY_ASSERT (!has_context || context_p->next_scanner_info_p->type == SCANNER_TYPE_BLOCK);\n      scanner_get_location (&start_location, context_p);\n\n      /* TODO: remove this after the pre-scanner supports strict mode detection. */\n      if (context_p->next_scanner_info_p->source_p == context_p->source_p\n          && context_p->next_scanner_info_p->type == SCANNER_TYPE_LET_EXPRESSION)\n      {\n        scanner_release_next (context_p, sizeof (scanner_info_t));\n      }\n    }\n    else if (context_p->token.type == LEXER_LITERAL && lexer_token_is_let (context_p))\n    {\n      if (context_p->next_scanner_info_p->source_p == context_p->source_p\n          && context_p->next_scanner_info_p->type == SCANNER_TYPE_LET_EXPRESSION)\n      {\n        scanner_release_next (context_p, sizeof (scanner_info_t));\n      }\n      else\n      {\n        token_type = LEXER_KEYW_LET;\n        has_context = (context_p->next_scanner_info_p->source_p == context_p->source_p);\n        scanner_get_location (&start_location, context_p);\n      }\n    }\n\n    if (has_context)\n    {\n      has_context = parser_push_block_context (context_p, true);\n    }\n\n    scanner_set_location (context_p, &end_location);\n#else /* !ENABLED (JERRY_ESNEXT) */\n    JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_FOR_IN);\n\n    bool is_for_in = true;\n    scanner_get_location (&start_location, context_p);\n\n    scanner_set_location (context_p, &((scanner_location_info_t *) context_p->next_scanner_info_p)->location);\n    scanner_release_next (context_p, sizeof (scanner_location_info_t));\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    /* The length of both 'in' and 'of' is two. */\n    const uint8_t *source_end_p = context_p->source_p - 2;\n\n    scanner_seek (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (is_for_in && is_for_await)\n    {\n      context_p->token.line = context_p->line;\n      context_p->token.column = context_p->column - 2;\n      parser_raise_error (context_p, PARSER_ERR_FOR_AWAIT_NO_OF);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    lexer_next_token (context_p);\n    parser_parse_expression (context_p, PARSE_EXPR);\n\n    if (context_p->token.type != LEXER_RIGHT_PAREN)\n    {\n      parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n    }\n\n#ifndef JERRY_NDEBUG\n    PARSER_PLUS_EQUAL_U16 (context_p->context_stack_depth,\n                           is_for_in ? PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION\n                                     : PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n    cbc_ext_opcode_t init_opcode = CBC_EXT_FOR_IN_INIT;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (!is_for_in)\n    {\n      init_opcode = is_for_await ? CBC_EXT_FOR_AWAIT_OF_INIT : CBC_EXT_FOR_OF_INIT;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    parser_emit_cbc_ext_forward_branch (context_p, init_opcode, &for_in_of_statement.branch);\n\n    JERRY_ASSERT (context_p->last_cbc_opcode == PARSER_CBC_UNAVAILABLE);\n    for_in_of_statement.start_offset = context_p->byte_code_size;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (has_context)\n    {\n      parser_emit_cbc_ext (context_p, CBC_EXT_CLONE_CONTEXT);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    /* The expression parser must not read the 'in' or 'of' tokens. */\n    scanner_get_location (&end_location, context_p);\n    scanner_set_location (context_p, &start_location);\n\n    const uint8_t *original_source_end_p = context_p->source_end_p;\n    context_p->source_end_p = source_end_p;\n    scanner_seek (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (token_type == LEXER_EOS)\n    {\n      lexer_next_token (context_p);\n\n      if (context_p->token.type == LEXER_LEFT_SQUARE || context_p->token.type == LEXER_LEFT_BRACE)\n      {\n        token_type = context_p->token.type;\n      }\n    }\n#else /* !ENABLED (JERRY_ESNEXT) */\n    lexer_next_token (context_p);\n\n    uint8_t token_type = context_p->token.type;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    switch (token_type)\n    {\n#if ENABLED (JERRY_ESNEXT)\n      case LEXER_KEYW_LET:\n      case LEXER_KEYW_CONST:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case LEXER_KEYW_VAR:\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (lexer_check_next_characters (context_p, LIT_CHAR_LEFT_SQUARE, LIT_CHAR_LEFT_BRACE))\n        {\n          parser_emit_cbc_ext (context_p, is_for_in ? CBC_EXT_FOR_IN_GET_NEXT\n                                                    : CBC_EXT_FOR_OF_GET_NEXT);\n\n          parser_pattern_flags_t flags = (PARSER_PATTERN_BINDING | PARSER_PATTERN_TARGET_ON_STACK);\n\n          if (context_p->next_scanner_info_p->source_p == (context_p->source_p + 1))\n          {\n            if (context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER)\n            {\n              scanner_release_next (context_p, sizeof (scanner_location_info_t));\n            }\n            else\n            {\n              JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS);\n              if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)\n              {\n                flags |= PARSER_PATTERN_HAS_REST_ELEMENT;\n              }\n\n              scanner_release_next (context_p, sizeof (scanner_info_t));\n            }\n          }\n\n          if (token_type == LEXER_KEYW_LET)\n          {\n            flags |= PARSER_PATTERN_LET;\n          }\n          else if (token_type == LEXER_KEYW_CONST)\n          {\n            flags |= PARSER_PATTERN_CONST;\n          }\n\n          parser_parse_initializer_by_next_char (context_p, flags);\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        lexer_expect_identifier (context_p, LEXER_IDENT_LITERAL);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->token.keyword_type == LEXER_KEYW_LET\n            && token_type != LEXER_KEYW_VAR)\n        {\n          parser_raise_error (context_p, PARSER_ERR_LEXICAL_LET_BINDING);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                      && context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n        uint16_t literal_index = context_p->lit_object.index;\n        lexer_next_token (context_p);\n\n        if (context_p->token.type == LEXER_ASSIGN)\n        {\n#if ENABLED (JERRY_ESNEXT)\n          if (context_p->status_flags & PARSER_IS_STRICT)\n          {\n            parser_raise_error (context_p, PARSER_ERR_FOR_IN_OF_DECLARATION);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          parser_branch_t branch;\n\n          /* Initialiser is never executed. */\n          parser_emit_cbc_forward_branch (context_p, CBC_JUMP_FORWARD, &branch);\n          lexer_next_token (context_p);\n          parser_parse_expression_statement (context_p, PARSE_EXPR_NO_COMMA);\n          parser_set_branch_to_current_position (context_p, &branch);\n        }\n\n        parser_emit_cbc_ext (context_p, is_for_in ? CBC_EXT_FOR_IN_GET_NEXT\n                                                  : CBC_EXT_FOR_OF_GET_NEXT);\n#if ENABLED (JERRY_ESNEXT)\n#ifndef JERRY_NDEBUG\n        if (literal_index < PARSER_REGISTER_START\n            && has_context\n            && !scanner_literal_is_created (context_p, literal_index))\n        {\n          context_p->global_status_flags |= ECMA_PARSE_INTERNAL_FOR_IN_OFF_CONTEXT_ERROR;\n        }\n#endif /* !JERRY_NDEBUG */\n\n        uint16_t opcode = (has_context ? CBC_ASSIGN_LET_CONST : CBC_ASSIGN_SET_IDENT);\n        parser_emit_cbc_literal (context_p, opcode, literal_index);\n#else /* !ENABLED (JERRY_ESNEXT) */\n        parser_emit_cbc_literal (context_p, CBC_ASSIGN_SET_IDENT, literal_index);\n#endif /* ENABLED (JERRY_ESNEXT) */\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case LEXER_LEFT_BRACE:\n      case LEXER_LEFT_SQUARE:\n      {\n        if (context_p->next_scanner_info_p->source_p == context_p->source_p\n            && context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS\n            && (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_DESTRUCTURING_FOR))\n        {\n          parser_emit_cbc_ext (context_p, is_for_in ? CBC_EXT_FOR_IN_GET_NEXT\n                                                    : CBC_EXT_FOR_OF_GET_NEXT);\n\n          uint32_t flags = PARSER_PATTERN_TARGET_ON_STACK;\n\n          if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)\n          {\n            flags |= PARSER_PATTERN_HAS_REST_ELEMENT;\n          }\n\n          scanner_release_next (context_p, sizeof (scanner_info_t));\n          parser_parse_initializer (context_p, flags);\n          /* Pop the value returned by GET_NEXT. */\n          parser_emit_cbc (context_p, CBC_POP);\n          break;\n        }\n        /* FALLTHRU */\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      default:\n      {\n        uint16_t opcode;\n\n        parser_parse_expression (context_p, PARSE_EXPR_LEFT_HAND_SIDE);\n\n        opcode = context_p->last_cbc_opcode;\n\n        /* The CBC_EXT_FOR_IN_CREATE_CONTEXT flushed the opcode combiner. */\n        JERRY_ASSERT (opcode != CBC_PUSH_TWO_LITERALS\n                      && opcode != CBC_PUSH_THREE_LITERALS);\n\n        opcode = parser_check_left_hand_side_expression (context_p, opcode);\n\n        parser_emit_cbc_ext (context_p, is_for_in ? CBC_EXT_FOR_IN_GET_NEXT\n                                                  : CBC_EXT_FOR_OF_GET_NEXT);\n        parser_flush_cbc (context_p);\n\n        context_p->last_cbc_opcode = opcode;\n        break;\n      }\n    }\n\n    if (context_p->token.type != LEXER_EOS)\n    {\n#if ENABLED (JERRY_ESNEXT)\n      parser_raise_error (context_p, is_for_in ? PARSER_ERR_IN_EXPECTED : PARSER_ERR_OF_EXPECTED);\n#else /* !ENABLED (JERRY_ESNEXT) */\n      parser_raise_error (context_p, PARSER_ERR_IN_EXPECTED);\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n\n    parser_flush_cbc (context_p);\n    scanner_set_location (context_p, &end_location);\n    context_p->source_end_p = original_source_end_p;\n    lexer_next_token (context_p);\n\n    loop.branch_list_p = NULL;\n\n    parser_stack_push (context_p, &for_in_of_statement, sizeof (parser_for_in_of_statement_t));\n    parser_stack_push (context_p, &loop, sizeof (parser_loop_statement_t));\n\n    uint8_t for_type = PARSER_STATEMENT_FOR_IN;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (!is_for_in)\n    {\n      for_type = is_for_await ? PARSER_STATEMENT_FOR_AWAIT_OF : PARSER_STATEMENT_FOR_OF;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    parser_stack_push_uint8 (context_p, for_type);\n    parser_stack_iterator_init (context_p, &context_p->last_statement);\n    return;\n  }\n\n  lexer_next_token (context_p);\n\n  if (context_p->token.type != LEXER_SEMICOLON)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    const uint8_t *source_p = context_p->source_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    switch (context_p->token.type)\n    {\n#if ENABLED (JERRY_ESNEXT)\n      case LEXER_LITERAL:\n      {\n        if (!lexer_token_is_let (context_p))\n        {\n          parser_parse_expression_statement (context_p, PARSE_EXPR);\n          break;\n        }\n\n        if (context_p->next_scanner_info_p->source_p == context_p->source_p\n            && context_p->next_scanner_info_p->type != SCANNER_TYPE_BLOCK)\n        {\n          if (context_p->next_scanner_info_p->type == SCANNER_TYPE_LET_EXPRESSION)\n          {\n            scanner_release_next (context_p, sizeof (scanner_info_t));\n          }\n\n          parser_parse_expression_statement (context_p, PARSE_EXPR);\n          break;\n        }\n\n        context_p->token.type = LEXER_KEYW_LET;\n        /* FALLTHRU */\n      }\n      case LEXER_KEYW_LET:\n      case LEXER_KEYW_CONST:\n      {\n        if (context_p->next_scanner_info_p->source_p == source_p)\n        {\n          parser_push_block_context (context_p, true);\n        }\n        /* FALLTHRU */\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case LEXER_KEYW_VAR:\n      {\n        parser_parse_var_statement (context_p);\n        break;\n      }\n      default:\n      {\n        parser_parse_expression_statement (context_p, PARSE_EXPR);\n        break;\n      }\n    }\n\n    if (context_p->token.type != LEXER_SEMICOLON)\n    {\n      parser_raise_error (context_p, PARSER_ERR_SEMICOLON_EXPECTED);\n    }\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (is_for_await)\n  {\n    parser_raise_error (context_p, PARSER_ERR_FOR_AWAIT_NO_OF);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (context_p->next_scanner_info_p->source_p != context_p->source_p\n                || context_p->next_scanner_info_p->type == SCANNER_TYPE_FOR);\n\n  if (context_p->next_scanner_info_p->source_p != context_p->source_p\n      || ((scanner_for_info_t *) context_p->next_scanner_info_p)->end_location.source_p == NULL)\n  {\n    if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n    {\n      /* Even though the scanning is failed, there might be valid statements\n       * inside the for statement which depend on scanner info blocks. */\n      scanner_release_next (context_p, sizeof (scanner_for_info_t));\n    }\n\n    /* The prescanner couldn't find the second semicolon or the closing paranthesis. */\n    lexer_next_token (context_p);\n    parser_parse_expression (context_p, PARSE_EXPR);\n\n    if (context_p->token.type != LEXER_SEMICOLON)\n    {\n      parser_raise_error (context_p, PARSER_ERR_SEMICOLON_EXPECTED);\n    }\n\n    lexer_next_token (context_p);\n    parser_parse_expression_statement (context_p, PARSE_EXPR);\n\n    JERRY_ASSERT (context_p->token.type != LEXER_RIGHT_PAREN);\n    parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n  }\n\n  parser_for_statement_t for_statement;\n  scanner_for_info_t *for_info_p = (scanner_for_info_t *) context_p->next_scanner_info_p;\n\n  parser_emit_cbc_forward_branch (context_p, CBC_JUMP_FORWARD, &for_statement.branch);\n\n  JERRY_ASSERT (context_p->last_cbc_opcode == PARSER_CBC_UNAVAILABLE);\n\n  for_statement.start_offset = context_p->byte_code_size;\n  scanner_get_location (&for_statement.condition_location, context_p);\n  for_statement.expression_location = for_info_p->expression_location;\n\n  scanner_set_location (context_p, &for_info_p->end_location);\n  scanner_release_next (context_p, sizeof (scanner_for_info_t));\n  scanner_seek (context_p);\n  lexer_next_token (context_p);\n\n  loop.branch_list_p = NULL;\n\n  parser_stack_push (context_p, &for_statement, sizeof (parser_for_statement_t));\n  parser_stack_push (context_p, &loop, sizeof (parser_loop_statement_t));\n  parser_stack_push_uint8 (context_p, PARSER_STATEMENT_FOR);\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n} /* parser_parse_for_statement_start */\n\n/**\n * Parse for statement (ending part).\n */\nstatic void JERRY_ATTR_NOINLINE\nparser_parse_for_statement_end (parser_context_t *context_p) /**< context */\n{\n  parser_for_statement_t for_statement;\n  parser_loop_statement_t loop;\n  lexer_token_t current_token;\n  scanner_location_t location;\n  cbc_opcode_t opcode;\n\n  JERRY_ASSERT (context_p->stack_top_uint8 == PARSER_STATEMENT_FOR);\n\n  parser_stack_iterator_t iterator;\n  parser_stack_iterator_init (context_p, &iterator);\n\n  parser_stack_iterator_skip (&iterator, 1);\n  parser_stack_iterator_read (&iterator, &loop, sizeof (parser_loop_statement_t));\n  parser_stack_iterator_skip (&iterator, sizeof (parser_loop_statement_t));\n  parser_stack_iterator_read (&iterator, &for_statement, sizeof (parser_for_statement_t));\n\n#if ENABLED (JERRY_ESNEXT)\n  bool has_block_context = false;\n  uint8_t next_statement_type;\n\n  parser_stack_iterator_skip (&iterator, sizeof (parser_for_statement_t));\n  parser_stack_iterator_read (&iterator, &next_statement_type, 1);\n\n  if (next_statement_type == PARSER_STATEMENT_PRIVATE_CONTEXT)\n  {\n    has_block_context = true;\n  }\n#endif\n\n  scanner_get_location (&location, context_p);\n  current_token = context_p->token;\n\n  scanner_set_location (context_p, &for_statement.expression_location);\n  scanner_seek (context_p);\n  lexer_next_token (context_p);\n\n  parser_set_continues_to_current_position (context_p, loop.branch_list_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (has_block_context)\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_CLONE_FULL_CONTEXT);\n  }\n#endif\n\n  if (context_p->token.type != LEXER_RIGHT_PAREN)\n  {\n    parser_parse_expression_statement (context_p, PARSE_EXPR);\n\n    if (context_p->token.type != LEXER_RIGHT_PAREN)\n    {\n      parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n    }\n  }\n\n  parser_set_branch_to_current_position (context_p, &for_statement.branch);\n\n  scanner_set_location (context_p, &for_statement.condition_location);\n  scanner_seek (context_p);\n  lexer_next_token (context_p);\n\n  if (context_p->token.type != LEXER_SEMICOLON)\n  {\n    parser_parse_expression (context_p, PARSE_EXPR);\n\n    if (context_p->token.type != LEXER_SEMICOLON)\n    {\n      parser_raise_error (context_p, PARSER_ERR_SEMICOLON_EXPECTED);\n    }\n\n    opcode = CBC_BRANCH_IF_TRUE_BACKWARD;\n    if (context_p->last_cbc_opcode == CBC_LOGICAL_NOT)\n    {\n      context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n      opcode = CBC_BRANCH_IF_FALSE_BACKWARD;\n    }\n    else if (context_p->last_cbc_opcode == CBC_PUSH_TRUE)\n    {\n      context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n      opcode = CBC_JUMP_BACKWARD;\n    }\n  }\n  else\n  {\n    opcode = CBC_JUMP_BACKWARD;\n  }\n\n  parser_stack_pop (context_p, NULL, 1 + sizeof (parser_loop_statement_t) + sizeof (parser_for_statement_t));\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n  parser_emit_cbc_backward_branch (context_p, (uint16_t) opcode, for_statement.start_offset);\n  parser_set_breaks_to_current_position (context_p, loop.branch_list_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_SCOPE\n      || context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_CONTEXT)\n  {\n    parser_pop_block_context (context_p);\n  }\n#endif\n\n  /* Calling scanner_seek is unnecessary because all\n   * info blocks inside the for statement should be processed. */\n  scanner_set_location (context_p, &location);\n  context_p->token = current_token;\n} /* parser_parse_for_statement_end */\n\n/**\n * Parse switch statement (starting part).\n */\nstatic void JERRY_ATTR_NOINLINE\nparser_parse_switch_statement_start (parser_context_t *context_p) /**< context */\n{\n  parser_switch_statement_t switch_statement;\n  parser_loop_statement_t loop;\n  parser_stack_iterator_t iterator;\n  scanner_location_t start_location;\n  bool switch_case_was_found;\n  bool default_case_was_found;\n  parser_branch_node_t *case_branches_p = NULL;\n\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_SWITCH);\n\n  parser_parse_enclosed_expr (context_p);\n\n  if (context_p->token.type != LEXER_LEFT_BRACE)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_EXPECTED);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (context_p->next_scanner_info_p->source_p == context_p->source_p - 1)\n  {\n    parser_push_block_context (context_p, true);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (context_p->next_scanner_info_p->source_p == context_p->source_p\n                && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH);\n\n  scanner_case_info_t *case_info_p = ((scanner_switch_info_t *) context_p->next_scanner_info_p)->case_p;\n  scanner_set_active (context_p);\n\n  if (case_info_p == NULL)\n  {\n    lexer_next_token (context_p);\n\n    if (context_p->token.type == LEXER_RIGHT_BRACE)\n    {\n      scanner_release_active (context_p, sizeof (scanner_switch_info_t));\n\n      parser_emit_cbc (context_p, CBC_POP);\n      parser_flush_cbc (context_p);\n\n      parser_stack_push_uint8 (context_p, PARSER_STATEMENT_BLOCK);\n      parser_stack_iterator_init (context_p, &context_p->last_statement);\n      return;\n    }\n\n    parser_raise_error (context_p, PARSER_ERR_INVALID_SWITCH);\n  }\n\n  scanner_get_location (&start_location, context_p);\n\n  /* The reason of using an iterator is error management. If an error\n   * occures, parser_free_jumps() free all data. However, the branches\n   * created by parser_emit_cbc_forward_branch_item() would not be freed.\n   * To free these branches, the current switch data is always stored\n   * on the stack. If any change happens, this data is updated. Updates\n   * are done using the iterator. */\n\n  switch_statement.branch_list_p = NULL;\n  loop.branch_list_p = NULL;\n\n  parser_stack_push (context_p, &switch_statement, sizeof (parser_switch_statement_t));\n  parser_stack_iterator_init (context_p, &iterator);\n  parser_stack_push (context_p, &loop, sizeof (parser_loop_statement_t));\n  parser_stack_push_uint8 (context_p, PARSER_STATEMENT_SWITCH);\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n  switch_case_was_found = false;\n  default_case_was_found = false;\n\n#if ENABLED (JERRY_LINE_INFO)\n  uint32_t last_line_info_line = context_p->last_line_info_line;\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n  do\n  {\n    scanner_set_location (context_p, &case_info_p->location);\n    scanner_seek (context_p);\n    case_info_p = case_info_p->next_p;\n\n    /* The last letter of case and default is 'e' and 't' respectively.  */\n    JERRY_ASSERT (context_p->source_p[-1] == LIT_CHAR_LOWERCASE_E\n                  || context_p->source_p[-1] == LIT_CHAR_LOWERCASE_T);\n\n    bool is_default = context_p->source_p[-1] == LIT_CHAR_LOWERCASE_T;\n    lexer_next_token (context_p);\n\n    if (is_default)\n    {\n      if (default_case_was_found)\n      {\n        parser_raise_error (context_p, PARSER_ERR_MULTIPLE_DEFAULTS_NOT_ALLOWED);\n      }\n\n      if (context_p->token.type != LEXER_COLON)\n      {\n        parser_raise_error (context_p, PARSER_ERR_COLON_EXPECTED);\n      }\n\n      default_case_was_found = true;\n      continue;\n    }\n\n    switch_case_was_found = true;\n\n#if ENABLED (JERRY_LINE_INFO)\n    if (context_p->token.line != context_p->last_line_info_line)\n    {\n      parser_emit_line_info (context_p, context_p->token.line, true);\n    }\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n    parser_parse_expression (context_p, PARSE_EXPR);\n\n    if (context_p->token.type != LEXER_COLON)\n    {\n      parser_raise_error (context_p, PARSER_ERR_COLON_EXPECTED);\n    }\n\n    uint16_t opcode = CBC_BRANCH_IF_STRICT_EQUAL;\n\n    if (case_info_p == NULL\n        || (case_info_p->next_p == NULL && case_info_p->location.source_p[-1] == LIT_CHAR_LOWERCASE_T))\n    {\n      /* There are no more 'case' statements in the switch. */\n      parser_emit_cbc (context_p, CBC_STRICT_EQUAL);\n      opcode = CBC_BRANCH_IF_TRUE_FORWARD;\n    }\n\n    parser_branch_node_t *new_case_p = parser_emit_cbc_forward_branch_item (context_p, opcode, NULL);\n\n    if (case_branches_p == NULL)\n    {\n      switch_statement.branch_list_p = new_case_p;\n      parser_stack_iterator_write (&iterator, &switch_statement, sizeof (parser_switch_statement_t));\n    }\n    else\n    {\n      case_branches_p->next_p = new_case_p;\n    }\n\n    case_branches_p = new_case_p;\n  }\n  while (case_info_p != NULL);\n\n  JERRY_ASSERT (switch_case_was_found || default_case_was_found);\n\n#if ENABLED (JERRY_LINE_INFO)\n  context_p->last_line_info_line = last_line_info_line;\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n  if (!switch_case_was_found)\n  {\n    /* There was no case statement, so the expression result\n     * of the switch must be popped from the stack */\n    parser_emit_cbc (context_p, CBC_POP);\n  }\n\n  parser_emit_cbc_forward_branch (context_p, CBC_JUMP_FORWARD, &switch_statement.default_branch);\n  parser_stack_iterator_write (&iterator, &switch_statement, sizeof (parser_switch_statement_t));\n\n  if (!default_case_was_found)\n  {\n    parser_stack_change_last_uint8 (context_p, PARSER_STATEMENT_SWITCH_NO_DEFAULT);\n  }\n\n  scanner_release_switch_cases (((scanner_switch_info_t *) context_p->active_scanner_info_p)->case_p);\n  scanner_release_active (context_p, sizeof (scanner_switch_info_t));\n\n  scanner_set_location (context_p, &start_location);\n  scanner_seek (context_p);\n  lexer_next_token (context_p);\n} /* parser_parse_switch_statement_start */\n\n/**\n * Parse try statement (ending part).\n */\nstatic void\nparser_parse_try_statement_end (parser_context_t *context_p) /**< context */\n{\n  parser_try_statement_t try_statement;\n  parser_stack_iterator_t iterator;\n\n  JERRY_ASSERT (context_p->stack_top_uint8 == PARSER_STATEMENT_TRY);\n\n  parser_stack_iterator_init (context_p, &iterator);\n  parser_stack_iterator_skip (&iterator, 1);\n  parser_stack_iterator_read (&iterator, &try_statement, sizeof (parser_try_statement_t));\n\n#if ENABLED (JERRY_ESNEXT)\n  context_p->scope_stack_top = try_statement.scope_stack_top;\n  context_p->scope_stack_reg_top = try_statement.scope_stack_reg_top;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  lexer_next_token (context_p);\n\n  if (try_statement.type == parser_finally_block)\n  {\n    parser_flush_cbc (context_p);\n    PARSER_MINUS_EQUAL_U16 (context_p->stack_depth, PARSER_FINALLY_CONTEXT_STACK_ALLOCATION);\n#ifndef JERRY_NDEBUG\n    PARSER_MINUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_FINALLY_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n    parser_emit_cbc (context_p, CBC_CONTEXT_END);\n    parser_set_branch_to_current_position (context_p, &try_statement.branch);\n  }\n  else\n  {\n    parser_set_branch_to_current_position (context_p, &try_statement.branch);\n\n    if (try_statement.type == parser_catch_block)\n    {\n#if !ENABLED (JERRY_ESNEXT)\n      context_p->scope_stack_top = try_statement.scope_stack_top;\n      context_p->scope_stack_reg_top = try_statement.scope_stack_reg_top;\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n      if (context_p->token.type != LEXER_KEYW_FINALLY)\n      {\n        parser_flush_cbc (context_p);\n        PARSER_MINUS_EQUAL_U16 (context_p->stack_depth, PARSER_TRY_CONTEXT_STACK_ALLOCATION);\n#ifndef JERRY_NDEBUG\n        PARSER_MINUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_TRY_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n        parser_emit_cbc (context_p, CBC_CONTEXT_END);\n        parser_flush_cbc (context_p);\n\n        try_statement.type = parser_finally_block;\n      }\n    }\n    else\n    {\n      JERRY_ASSERT (try_statement.type == parser_try_block);\n\n      if (context_p->token.type != LEXER_KEYW_CATCH\n          && context_p->token.type != LEXER_KEYW_FINALLY)\n      {\n        parser_raise_error (context_p, PARSER_ERR_CATCH_FINALLY_EXPECTED);\n      }\n    }\n  }\n\n  if (try_statement.type == parser_finally_block)\n  {\n    parser_stack_pop (context_p, NULL, (uint32_t) (sizeof (parser_try_statement_t) + 1));\n    parser_stack_iterator_init (context_p, &context_p->last_statement);\n    return;\n  }\n\n  if (context_p->token.type == LEXER_KEYW_CATCH)\n  {\n    lexer_next_token (context_p);\n\n    try_statement.type = parser_catch_block;\n    parser_emit_cbc_ext_forward_branch (context_p,\n                                        CBC_EXT_CATCH,\n                                        &try_statement.branch);\n\n    try_statement.scope_stack_top = context_p->scope_stack_top;\n    try_statement.scope_stack_reg_top = context_p->scope_stack_reg_top;\n\n#ifndef JERRY_NDEBUG\n    bool block_found = false;\n#endif /* !JERRY_NDEBUG */\n\n    if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n    {\n      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_BLOCK);\n#ifndef JERRY_NDEBUG\n      block_found = true;\n#endif /* !JERRY_NDEBUG */\n\n      if (scanner_is_context_needed (context_p, PARSER_CHECK_BLOCK_CONTEXT))\n      {\n        parser_emit_cbc_ext (context_p, CBC_EXT_TRY_CREATE_ENV);\n      }\n\n      scanner_create_variables (context_p, SCANNER_CREATE_VARS_NO_OPTS);\n    }\n\n    if (context_p->token.type == LEXER_LEFT_PAREN)\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if (lexer_check_next_characters (context_p, LIT_CHAR_LEFT_SQUARE, LIT_CHAR_LEFT_BRACE))\n      {\n        parser_pattern_flags_t flags = (PARSER_PATTERN_BINDING\n                                        | PARSER_PATTERN_TARGET_ON_STACK\n                                        | PARSER_PATTERN_LET);\n\n        parser_parse_initializer_by_next_char (context_p, flags);\n      }\n      else\n      {\n#endif /* ENABLED (JERRY_ESNEXT) */\n        lexer_expect_identifier (context_p, LEXER_IDENT_LITERAL);\n        JERRY_ASSERT (context_p->token.type == LEXER_LITERAL\n                      && context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n#if ENABLED (JERRY_ESNEXT)\n        uint16_t literal_index = context_p->lit_object.index;\n        parser_emit_cbc_literal (context_p,\n                                 (literal_index >= PARSER_REGISTER_START) ? CBC_ASSIGN_SET_IDENT : CBC_ASSIGN_LET_CONST,\n                                 literal_index);\n#else /* !ENABLED (JERRY_ESNEXT) */\n        parser_emit_cbc_literal (context_p, CBC_ASSIGN_SET_IDENT, context_p->lit_object.index);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        lexer_next_token (context_p);\n\n#ifndef JERRY_NDEBUG\n        JERRY_ASSERT (block_found);\n#endif /* !JERRY_NDEBUG */\n#if ENABLED (JERRY_ESNEXT)\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (context_p->token.type != LEXER_RIGHT_PAREN)\n      {\n        parser_raise_error (context_p, PARSER_ERR_RIGHT_PAREN_EXPECTED);\n      }\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_LEFT_BRACE)\n      {\n        parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_EXPECTED);\n      }\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (context_p->token.type == LEXER_LEFT_BRACE)\n    {\n      parser_emit_cbc (context_p, CBC_POP);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else\n    {\n      parser_raise_error (context_p, PARSER_ERR_LEFT_PAREN_EXPECTED);\n    }\n\n    parser_flush_cbc (context_p);\n  }\n  else\n  {\n    JERRY_ASSERT (context_p->token.type == LEXER_KEYW_FINALLY);\n\n    lexer_next_token (context_p);\n\n    if (context_p->token.type != LEXER_LEFT_BRACE)\n    {\n      parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_EXPECTED);\n    }\n\n#ifndef JERRY_NDEBUG\n    PARSER_PLUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_FINALLY_CONTEXT_EXTRA_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n    try_statement.type = parser_finally_block;\n    parser_emit_cbc_ext_forward_branch (context_p,\n                                        CBC_EXT_FINALLY,\n                                        &try_statement.branch);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n    {\n      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_BLOCK);\n\n      if (scanner_is_context_needed (context_p, PARSER_CHECK_BLOCK_CONTEXT))\n      {\n        parser_emit_cbc_ext (context_p, CBC_EXT_TRY_CREATE_ENV);\n      }\n\n      scanner_create_variables (context_p, SCANNER_CREATE_VARS_NO_OPTS);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n\n  lexer_next_token (context_p);\n  parser_stack_iterator_write (&iterator, &try_statement, sizeof (parser_try_statement_t));\n} /* parser_parse_try_statement_end */\n\n/**\n * Parse default statement.\n */\nstatic void\nparser_parse_default_statement (parser_context_t *context_p) /**< context */\n{\n  parser_stack_iterator_t iterator;\n  parser_switch_statement_t switch_statement;\n\n  if (context_p->stack_top_uint8 != PARSER_STATEMENT_SWITCH\n      && context_p->stack_top_uint8 != PARSER_STATEMENT_SWITCH_NO_DEFAULT)\n  {\n    parser_raise_error (context_p, PARSER_ERR_DEFAULT_NOT_IN_SWITCH);\n  }\n\n  lexer_next_token (context_p);\n  /* Already checked in parser_parse_switch_statement_start. */\n  JERRY_ASSERT (context_p->token.type == LEXER_COLON);\n  lexer_next_token (context_p);\n\n  parser_stack_iterator_init (context_p, &iterator);\n  parser_stack_iterator_skip (&iterator, 1 + sizeof (parser_loop_statement_t));\n  parser_stack_iterator_read (&iterator, &switch_statement, sizeof (parser_switch_statement_t));\n\n  parser_set_branch_to_current_position (context_p, &switch_statement.default_branch);\n} /* parser_parse_default_statement */\n\n/**\n * Parse case statement.\n */\nstatic void\nparser_parse_case_statement (parser_context_t *context_p) /**< context */\n{\n  parser_stack_iterator_t iterator;\n  parser_switch_statement_t switch_statement;\n  parser_branch_node_t *branch_p;\n\n  if (context_p->stack_top_uint8 != PARSER_STATEMENT_SWITCH\n      && context_p->stack_top_uint8 != PARSER_STATEMENT_SWITCH_NO_DEFAULT)\n  {\n    parser_raise_error (context_p, PARSER_ERR_CASE_NOT_IN_SWITCH);\n  }\n\n  if (context_p->next_scanner_info_p->source_p != context_p->source_p)\n  {\n    lexer_next_token (context_p);\n\n    parser_parse_expression (context_p, PARSE_EXPR);\n\n    JERRY_ASSERT (context_p->token.type != LEXER_COLON);\n    parser_raise_error (context_p, PARSER_ERR_COLON_EXPECTED);\n  }\n\n  JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_CASE);\n\n  scanner_set_location (context_p, &((scanner_location_info_t *) context_p->next_scanner_info_p)->location);\n  scanner_release_next (context_p, sizeof (scanner_location_info_t));\n  scanner_seek (context_p);\n  lexer_next_token (context_p);\n\n  parser_stack_iterator_init (context_p, &iterator);\n  parser_stack_iterator_skip (&iterator, 1 + sizeof (parser_loop_statement_t));\n  parser_stack_iterator_read (&iterator, &switch_statement, sizeof (parser_switch_statement_t));\n\n  /* Free memory after the case statement is found. */\n\n  branch_p = switch_statement.branch_list_p;\n  JERRY_ASSERT (branch_p != NULL);\n  switch_statement.branch_list_p = branch_p->next_p;\n  parser_stack_iterator_write (&iterator, &switch_statement, sizeof (parser_switch_statement_t));\n\n  parser_set_branch_to_current_position (context_p, &branch_p->branch);\n  parser_free (branch_p, sizeof (parser_branch_node_t));\n} /* parser_parse_case_statement */\n\n/**\n * Parse break statement.\n */\nstatic void\nparser_parse_break_statement (parser_context_t *context_p) /**< context */\n{\n  parser_stack_iterator_t iterator;\n  cbc_opcode_t opcode = CBC_JUMP_FORWARD;\n\n  lexer_next_token (context_p);\n  parser_stack_iterator_init (context_p, &iterator);\n\n  if (!(context_p->token.flags & LEXER_WAS_NEWLINE)\n      && context_p->token.type == LEXER_LITERAL\n      && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n  {\n    /* The label with the same name is searched on the stack. */\n    while (true)\n    {\n      uint8_t type = parser_stack_iterator_read_uint8 (&iterator);\n      if (type == PARSER_STATEMENT_START)\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_BREAK_LABEL);\n      }\n\n      if (parser_statement_flags[type] & PARSER_STATM_CONTEXT_BREAK)\n      {\n        opcode = CBC_JUMP_FORWARD_EXIT_CONTEXT;\n      }\n\n      if (type == PARSER_STATEMENT_LABEL)\n      {\n        parser_label_statement_t label_statement;\n\n        parser_stack_iterator_skip (&iterator, 1);\n        parser_stack_iterator_read (&iterator, &label_statement, sizeof (parser_label_statement_t));\n\n        if (lexer_current_is_literal (context_p, &label_statement.label_ident))\n        {\n          label_statement.break_list_p = parser_emit_cbc_forward_branch_item (context_p,\n                                                                              (uint16_t) opcode,\n                                                                              label_statement.break_list_p);\n          parser_stack_iterator_write (&iterator, &label_statement, sizeof (parser_label_statement_t));\n          lexer_next_token (context_p);\n          return;\n        }\n        parser_stack_iterator_skip (&iterator, sizeof (parser_label_statement_t));\n      }\n      else\n      {\n        parser_stack_iterator_skip (&iterator, parser_statement_length (type));\n      }\n    }\n  }\n\n  /* The first switch or loop statement is searched. */\n  while (true)\n  {\n    uint8_t type = parser_stack_iterator_read_uint8 (&iterator);\n    if (type == PARSER_STATEMENT_START)\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_BREAK);\n    }\n\n    if (parser_statement_flags[type] & PARSER_STATM_CONTEXT_BREAK)\n    {\n      opcode = CBC_JUMP_FORWARD_EXIT_CONTEXT;\n    }\n\n    if (parser_statement_flags[type] & PARSER_STATM_BREAK_TARGET)\n    {\n      parser_loop_statement_t loop;\n\n      parser_stack_iterator_skip (&iterator, 1);\n      parser_stack_iterator_read (&iterator, &loop, sizeof (parser_loop_statement_t));\n      loop.branch_list_p = parser_emit_cbc_forward_branch_item (context_p,\n                                                                (uint16_t) opcode,\n                                                                loop.branch_list_p);\n      parser_stack_iterator_write (&iterator, &loop, sizeof (parser_loop_statement_t));\n      return;\n    }\n\n    parser_stack_iterator_skip (&iterator, parser_statement_length (type));\n  }\n} /* parser_parse_break_statement */\n\n/**\n * Parse continue statement.\n */\nstatic void\nparser_parse_continue_statement (parser_context_t *context_p) /**< context */\n{\n  parser_stack_iterator_t iterator;\n  cbc_opcode_t opcode = CBC_JUMP_FORWARD;\n\n  lexer_next_token (context_p);\n  parser_stack_iterator_init (context_p, &iterator);\n\n  if (!(context_p->token.flags & LEXER_WAS_NEWLINE)\n      && context_p->token.type == LEXER_LITERAL\n      && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n  {\n    parser_stack_iterator_t loop_iterator;\n\n    loop_iterator.current_p = NULL;\n\n    /* The label with the same name is searched on the stack. */\n    while (true)\n    {\n      uint8_t type = parser_stack_iterator_read_uint8 (&iterator);\n\n      if (type == PARSER_STATEMENT_START)\n      {\n        parser_raise_error (context_p, PARSER_ERR_INVALID_CONTINUE_LABEL);\n      }\n\n      /* Only those labels are checked, whose are label of a loop. */\n      if (loop_iterator.current_p != NULL && type == PARSER_STATEMENT_LABEL)\n      {\n        parser_label_statement_t label_statement;\n\n        parser_stack_iterator_skip (&iterator, 1);\n        parser_stack_iterator_read (&iterator, &label_statement, sizeof (parser_label_statement_t));\n\n        if (lexer_current_is_literal (context_p, &label_statement.label_ident))\n        {\n          parser_loop_statement_t loop;\n\n          parser_stack_iterator_skip (&loop_iterator, 1);\n          parser_stack_iterator_read (&loop_iterator, &loop, sizeof (parser_loop_statement_t));\n          loop.branch_list_p = parser_emit_cbc_forward_branch_item (context_p,\n                                                                    (uint16_t) opcode,\n                                                                    loop.branch_list_p);\n          loop.branch_list_p->branch.offset |= CBC_HIGHEST_BIT_MASK;\n          parser_stack_iterator_write (&loop_iterator, &loop, sizeof (parser_loop_statement_t));\n          lexer_next_token (context_p);\n          return;\n        }\n        parser_stack_iterator_skip (&iterator, sizeof (parser_label_statement_t));\n        continue;\n      }\n\n      if (parser_statement_flags[type] & PARSER_STATM_CONTEXT_BREAK)\n      {\n        opcode = CBC_JUMP_FORWARD_EXIT_CONTEXT;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      const bool is_private_scope = (type == PARSER_STATEMENT_PRIVATE_SCOPE\n                                     || type == PARSER_STATEMENT_PRIVATE_CONTEXT);\n#else /* !ENABLED (JERRY_ESNEXT) */\n      const bool is_private_scope = false;\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n      if (parser_statement_flags[type] & PARSER_STATM_CONTINUE_TARGET)\n      {\n        loop_iterator = iterator;\n      }\n      else if (!is_private_scope)\n      {\n        loop_iterator.current_p = NULL;\n      }\n\n      parser_stack_iterator_skip (&iterator, parser_statement_length (type));\n    }\n  }\n\n  /* The first loop statement is searched. */\n  while (true)\n  {\n    uint8_t type = parser_stack_iterator_read_uint8 (&iterator);\n    if (type == PARSER_STATEMENT_START)\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_CONTINUE);\n    }\n\n    if (parser_statement_flags[type] & PARSER_STATM_CONTINUE_TARGET)\n    {\n      parser_loop_statement_t loop;\n\n      parser_stack_iterator_skip (&iterator, 1);\n      parser_stack_iterator_read (&iterator, &loop, sizeof (parser_loop_statement_t));\n      loop.branch_list_p = parser_emit_cbc_forward_branch_item (context_p,\n                                                                (uint16_t) opcode,\n                                                                loop.branch_list_p);\n      loop.branch_list_p->branch.offset |= CBC_HIGHEST_BIT_MASK;\n      parser_stack_iterator_write (&iterator, &loop, sizeof (parser_loop_statement_t));\n      return;\n    }\n\n    if (parser_statement_flags[type] & PARSER_STATM_CONTEXT_BREAK)\n    {\n      opcode = CBC_JUMP_FORWARD_EXIT_CONTEXT;\n    }\n\n    parser_stack_iterator_skip (&iterator, parser_statement_length (type));\n  }\n} /* parser_parse_continue_statement */\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n/**\n * Parse import statement.\n * Note: See 15.2.2\n */\nstatic void\nparser_parse_import_statement (parser_context_t *context_p) /**< parser context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_IMPORT);\n\n  parser_module_check_request_place (context_p);\n\n  context_p->module_current_node_p = parser_module_create_module_node (context_p);\n\n  lexer_next_token (context_p);\n\n  /* Check for a ModuleSpecifier*/\n  if (context_p->token.type != LEXER_LITERAL\n      || context_p->token.lit_location.type != LEXER_STRING_LITERAL)\n  {\n    if (!(context_p->token.type == LEXER_LEFT_BRACE\n          || context_p->token.type == LEXER_MULTIPLY\n          || (context_p->token.type == LEXER_LITERAL && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)))\n    {\n      parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_MULTIPLY_LITERAL_EXPECTED);\n    }\n\n    if (context_p->token.type == LEXER_LITERAL)\n    {\n      /* Handle ImportedDefaultBinding */\n      lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_IDENT_LITERAL);\n\n      ecma_string_t *local_name_p = ecma_new_ecma_string_from_utf8 (context_p->lit_object.literal_p->u.char_p,\n                                                                    context_p->lit_object.literal_p->prop.length);\n\n      if (parser_module_check_duplicate_import (context_p, local_name_p))\n      {\n        ecma_deref_ecma_string (local_name_p);\n        parser_raise_error (context_p, PARSER_ERR_DUPLICATED_IMPORT_BINDING);\n      }\n\n      ecma_string_t *import_name_p = ecma_get_magic_string (LIT_MAGIC_STRING_DEFAULT);\n      parser_module_add_names_to_node (context_p, import_name_p, local_name_p);\n\n      ecma_deref_ecma_string (local_name_p);\n      ecma_deref_ecma_string (import_name_p);\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type == LEXER_COMMA)\n      {\n        lexer_next_token (context_p);\n        if (context_p->token.type != LEXER_MULTIPLY\n            && context_p->token.type != LEXER_LEFT_BRACE)\n        {\n          parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_MULTIPLY_EXPECTED);\n        }\n      }\n      else if (!lexer_token_is_identifier (context_p, \"from\", 4))\n      {\n        parser_raise_error (context_p, PARSER_ERR_FROM_COMMA_EXPECTED);\n      }\n    }\n\n    if (context_p->token.type == LEXER_MULTIPLY)\n    {\n      /* NameSpaceImport*/\n      lexer_next_token (context_p);\n      if (!lexer_token_is_identifier (context_p, \"as\", 2))\n      {\n        parser_raise_error (context_p, PARSER_ERR_AS_EXPECTED);\n      }\n\n      lexer_next_token (context_p);\n      if (context_p->token.type != LEXER_LITERAL)\n      {\n        parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n      }\n\n      lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_IDENT_LITERAL);\n\n      ecma_string_t *local_name_p = ecma_new_ecma_string_from_utf8 (context_p->lit_object.literal_p->u.char_p,\n                                                                    context_p->lit_object.literal_p->prop.length);\n\n      if (parser_module_check_duplicate_import (context_p, local_name_p))\n      {\n        ecma_deref_ecma_string (local_name_p);\n        parser_raise_error (context_p, PARSER_ERR_DUPLICATED_IMPORT_BINDING);\n      }\n\n      ecma_string_t *import_name_p = ecma_get_magic_string (LIT_MAGIC_STRING_ASTERIX_CHAR);\n\n      parser_module_add_names_to_node (context_p, import_name_p, local_name_p);\n      ecma_deref_ecma_string (local_name_p);\n      ecma_deref_ecma_string (import_name_p);\n\n      lexer_next_token (context_p);\n    }\n    else if (context_p->token.type == LEXER_LEFT_BRACE)\n    {\n      /* Handle NamedImports */\n      parser_module_parse_import_clause (context_p);\n    }\n\n    if (!lexer_token_is_identifier (context_p, \"from\", 4))\n    {\n      parser_raise_error (context_p, PARSER_ERR_FROM_EXPECTED);\n    }\n    lexer_next_token (context_p);\n  }\n\n  parser_module_handle_module_specifier (context_p);\n  parser_module_finalize_import_node (context_p);\n\n  context_p->module_current_node_p = NULL;\n} /* parser_parse_import_statement */\n\n/**\n * Parse export statement.\n *\n * @return true - if function of class statement was found\n *         false - otherwise\n */\nstatic bool\nparser_parse_export_statement (parser_context_t *context_p) /**< context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_EXPORT);\n\n  parser_module_check_request_place (context_p);\n\n  context_p->module_current_node_p = parser_module_create_module_node (context_p);\n\n  bool consume_last_statement = false;\n\n  lexer_next_token (context_p);\n  switch (context_p->token.type)\n  {\n    case LEXER_KEYW_DEFAULT:\n    {\n      scanner_location_t location;\n      scanner_get_location (&location, context_p);\n\n      context_p->status_flags |= PARSER_MODULE_STORE_IDENT;\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type == LEXER_LITERAL\n          && lexer_token_is_async (context_p)\n          && context_p->next_scanner_info_p->source_p == context_p->source_p\n          && context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION)\n      {\n        lexer_next_token (context_p);\n      }\n\n      if (context_p->token.type == LEXER_KEYW_CLASS)\n      {\n        context_p->status_flags |= PARSER_MODULE_DEFAULT_CLASS_OR_FUNC;\n        parser_parse_class (context_p, true);\n        consume_last_statement = true;\n      }\n      else if (context_p->token.type == LEXER_KEYW_FUNCTION)\n      {\n        context_p->status_flags |= PARSER_MODULE_DEFAULT_CLASS_OR_FUNC;\n        parser_parse_function_statement (context_p);\n        consume_last_statement = true;\n      }\n      else\n      {\n        /* Assignment expression */\n        scanner_set_location (context_p, &location);\n\n        /* 15.2.3.5 Use the synthetic name '*default*' as the identifier. */\n        lexer_construct_literal_object (context_p, &lexer_default_literal, lexer_default_literal.type);\n\n        context_p->token.lit_location.type = LEXER_IDENT_LITERAL;\n        parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_LITERAL);\n\n        context_p->module_identifier_lit_p = context_p->lit_object.literal_p;\n\n        /* Fake an assignment to the default identifier */\n        context_p->token.type = LEXER_ASSIGN;\n\n        parser_parse_expression_statement (context_p, PARSE_EXPR_NO_COMMA | PARSE_EXPR_HAS_LITERAL);\n      }\n\n      ecma_string_t *name_p = ecma_new_ecma_string_from_utf8 (context_p->module_identifier_lit_p->u.char_p,\n                                                              context_p->module_identifier_lit_p->prop.length);\n      ecma_string_t *export_name_p = ecma_get_magic_string (LIT_MAGIC_STRING_DEFAULT);\n\n      if (parser_module_check_duplicate_export (context_p, export_name_p))\n      {\n        ecma_deref_ecma_string (name_p);\n        ecma_deref_ecma_string (export_name_p);\n        parser_raise_error (context_p, PARSER_ERR_DUPLICATED_EXPORT_IDENTIFIER);\n      }\n\n      parser_module_add_names_to_node (context_p,\n                                       export_name_p,\n                                       name_p);\n      ecma_deref_ecma_string (name_p);\n      ecma_deref_ecma_string (export_name_p);\n      break;\n    }\n    case LEXER_MULTIPLY:\n    {\n      lexer_next_token (context_p);\n      if (!lexer_token_is_identifier (context_p, \"from\", 4))\n      {\n        parser_raise_error (context_p, PARSER_ERR_FROM_EXPECTED);\n      }\n\n      lexer_next_token (context_p);\n      parser_module_handle_module_specifier (context_p);\n      break;\n    }\n    case LEXER_KEYW_VAR:\n    case LEXER_KEYW_LET:\n    case LEXER_KEYW_CONST:\n    {\n      context_p->status_flags |= PARSER_MODULE_STORE_IDENT;\n      parser_parse_var_statement (context_p);\n      break;\n    }\n    case LEXER_KEYW_CLASS:\n    {\n      context_p->status_flags |= PARSER_MODULE_STORE_IDENT;\n      parser_parse_class (context_p, true);\n      consume_last_statement = true;\n      break;\n    }\n    case LEXER_KEYW_FUNCTION:\n    {\n      context_p->status_flags |= PARSER_MODULE_STORE_IDENT;\n      parser_parse_function_statement (context_p);\n      consume_last_statement = true;\n      break;\n    }\n    case LEXER_LEFT_BRACE:\n    {\n      parser_module_parse_export_clause (context_p);\n\n      if (lexer_token_is_identifier (context_p, \"from\", 4))\n      {\n        lexer_next_token (context_p);\n        parser_module_handle_module_specifier (context_p);\n      }\n      break;\n    }\n    default:\n    {\n      parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_MULTIPLY_LITERAL_EXPECTED);\n      break;\n    }\n  }\n\n  context_p->status_flags &= (uint32_t) ~(PARSER_MODULE_DEFAULT_CLASS_OR_FUNC | PARSER_MODULE_STORE_IDENT);\n  parser_module_finalize_export_node (context_p);\n  context_p->module_current_node_p = NULL;\n\n  return consume_last_statement;\n} /* parser_parse_export_statement */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n/**\n * Parse label statement.\n */\nstatic void\nparser_parse_label (parser_context_t *context_p) /**< context */\n{\n  parser_stack_iterator_t iterator;\n  parser_label_statement_t label_statement;\n\n  parser_stack_iterator_init (context_p, &iterator);\n\n  while (true)\n  {\n    uint8_t type = parser_stack_iterator_read_uint8 (&iterator);\n    if (type == PARSER_STATEMENT_START)\n    {\n      break;\n    }\n\n    if (type == PARSER_STATEMENT_LABEL)\n    {\n      parser_stack_iterator_skip (&iterator, 1);\n      parser_stack_iterator_read (&iterator, &label_statement, sizeof (parser_label_statement_t));\n      parser_stack_iterator_skip (&iterator, sizeof (parser_label_statement_t));\n\n      if (lexer_current_is_literal (context_p, &label_statement.label_ident))\n      {\n        parser_raise_error (context_p, PARSER_ERR_DUPLICATED_LABEL);\n      }\n    }\n    else\n    {\n      parser_stack_iterator_skip (&iterator, parser_statement_length (type));\n    }\n  }\n\n  label_statement.label_ident = context_p->token.lit_location;\n  label_statement.break_list_p = NULL;\n  parser_stack_push (context_p, &label_statement, sizeof (parser_label_statement_t));\n  parser_stack_push_uint8 (context_p, PARSER_STATEMENT_LABEL);\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n} /* parser_parse_label */\n\n/**\n * Strict mode types for statement parsing.\n */\ntypedef enum\n{\n  PARSER_USE_STRICT_NOT_FOUND = 0, /**< 'use strict' directive is not found */\n  PARSER_USE_STRICT_FOUND = 1, /**< 'use strict' directive is found but strict mode has already been enabled */\n  PARSER_USE_STRICT_SET = 2, /**< strict mode is enabled after 'use strict' directive is found */\n} parser_strict_mode_type_t;\n\n/**\n * Parse statements.\n */\nvoid\nparser_parse_statements (parser_context_t *context_p) /**< context */\n{\n  /* Statement parsing cannot be nested. */\n  JERRY_ASSERT (context_p->last_statement.current_p == NULL);\n  parser_stack_push_uint8 (context_p, PARSER_STATEMENT_START);\n  parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n#if ENABLED (JERRY_DEBUGGER)\n  /* Set lexical enviroment for the debugger. */\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    context_p->status_flags |= PARSER_LEXICAL_ENV_NEEDED;\n    context_p->last_breakpoint_line = 0;\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_LINE_INFO)\n  context_p->last_line_info_line = 0;\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n  while (context_p->token.type == LEXER_LITERAL\n         && context_p->token.lit_location.type == LEXER_STRING_LITERAL)\n  {\n    lexer_lit_location_t lit_location;\n    parser_strict_mode_type_t strict_mode = PARSER_USE_STRICT_NOT_FOUND;\n\n    JERRY_ASSERT (context_p->stack_depth <= 1);\n#ifndef JERRY_NDEBUG\n    JERRY_ASSERT (context_p->context_stack_depth == context_p->stack_depth);\n#endif /* !JERRY_NDEBUG */\n\n    if (lexer_string_is_use_strict (context_p))\n    {\n      strict_mode = PARSER_USE_STRICT_FOUND;\n\n      if (!(context_p->status_flags & PARSER_IS_STRICT))\n      {\n        /* The next token should be parsed in strict mode. */\n        context_p->status_flags |= PARSER_IS_STRICT;\n        strict_mode = PARSER_USE_STRICT_SET;\n      }\n    }\n\n    lit_location = context_p->token.lit_location;\n    lexer_next_token (context_p);\n\n    if (!lexer_string_is_directive (context_p))\n    {\n      /* The string is part of an expression statement. */\n      if (strict_mode == PARSER_USE_STRICT_SET)\n      {\n        context_p->status_flags &= (uint32_t) ~PARSER_IS_STRICT;\n      }\n\n#if ENABLED (JERRY_DEBUGGER)\n      if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      {\n        JERRY_ASSERT (context_p->last_breakpoint_line == 0);\n\n        parser_emit_cbc (context_p, CBC_BREAKPOINT_DISABLED);\n        parser_flush_cbc (context_p);\n\n        parser_append_breakpoint_info (context_p, JERRY_DEBUGGER_BREAKPOINT_LIST, context_p->token.line);\n\n        context_p->last_breakpoint_line = context_p->token.line;\n      }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n#if ENABLED (JERRY_LINE_INFO)\n      parser_emit_line_info (context_p, context_p->token.line, false);\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n      lexer_construct_literal_object (context_p, &lit_location, LEXER_STRING_LITERAL);\n      parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_LITERAL);\n      /* The extra_value is used for saving the token. */\n      context_p->token.extra_value = context_p->token.type;\n      context_p->token.type = LEXER_EXPRESSION_START;\n      break;\n    }\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n    if (strict_mode == PARSER_USE_STRICT_SET && context_p->is_show_opcodes)\n    {\n      JERRY_DEBUG_MSG (\"  Note: switch to strict mode\\n\\n\");\n    }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_ESNEXT)\n    if (strict_mode != PARSER_USE_STRICT_NOT_FOUND\n        && (context_p->status_flags & PARSER_FUNCTION_HAS_COMPLEX_ARGUMENT))\n    {\n      parser_raise_error (context_p, PARSER_ERR_USE_STRICT_NOT_ALLOWED);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (context_p->token.type == LEXER_SEMICOLON)\n    {\n      lexer_next_token (context_p);\n    }\n\n    /* The last directive prologue can be the result of the script. */\n    if (!(context_p->status_flags & PARSER_IS_FUNCTION)\n        && (context_p->token.type != LEXER_LITERAL\n            || context_p->token.lit_location.type != LEXER_STRING_LITERAL))\n    {\n      lexer_construct_literal_object (context_p, &lit_location, LEXER_STRING_LITERAL);\n      parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_LITERAL);\n      parser_emit_cbc (context_p, CBC_POP_BLOCK);\n      parser_flush_cbc (context_p);\n      break;\n    }\n  }\n\n  if (context_p->status_flags & PARSER_IS_STRICT\n      && context_p->status_flags & PARSER_HAS_NON_STRICT_ARG)\n  {\n    parser_raise_error (context_p, PARSER_ERR_NON_STRICT_ARG_DEFINITION);\n  }\n\n  while (context_p->token.type != LEXER_EOS\n         || context_p->stack_top_uint8 != PARSER_STATEMENT_START)\n  {\n#ifndef JERRY_NDEBUG\n    JERRY_ASSERT (context_p->stack_depth == context_p->context_stack_depth);\n#endif /* !JERRY_NDEBUG */\n\n#if ENABLED (JERRY_ESNEXT)\n    JERRY_ASSERT (context_p->stack_top_uint8 != PARSER_STATEMENT_PRIVATE_SCOPE\n                  && context_p->stack_top_uint8 != PARSER_STATEMENT_PRIVATE_CONTEXT);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_DEBUGGER)\n    if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED\n        && context_p->token.line != context_p->last_breakpoint_line\n        && context_p->token.type != LEXER_SEMICOLON\n        && context_p->token.type != LEXER_LEFT_BRACE\n        && context_p->token.type != LEXER_RIGHT_BRACE\n        && context_p->token.type != LEXER_KEYW_VAR\n        && context_p->token.type != LEXER_KEYW_LET\n        && context_p->token.type != LEXER_KEYW_CONST\n        && context_p->token.type != LEXER_KEYW_FUNCTION\n        && context_p->token.type != LEXER_KEYW_CASE\n        && context_p->token.type != LEXER_KEYW_DEFAULT)\n    {\n      parser_emit_cbc (context_p, CBC_BREAKPOINT_DISABLED);\n      parser_flush_cbc (context_p);\n\n      parser_append_breakpoint_info (context_p, JERRY_DEBUGGER_BREAKPOINT_LIST, context_p->token.line);\n\n      context_p->last_breakpoint_line = context_p->token.line;\n    }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_LINE_INFO)\n    if (context_p->token.line != context_p->last_line_info_line\n        && context_p->token.type != LEXER_SEMICOLON\n        && context_p->token.type != LEXER_LEFT_BRACE\n        && context_p->token.type != LEXER_RIGHT_BRACE\n        && context_p->token.type != LEXER_KEYW_VAR\n        && context_p->token.type != LEXER_KEYW_LET\n        && context_p->token.type != LEXER_KEYW_CONST\n        && context_p->token.type != LEXER_KEYW_FUNCTION\n        && context_p->token.type != LEXER_KEYW_CASE\n        && context_p->token.type != LEXER_KEYW_DEFAULT)\n    {\n      parser_emit_line_info (context_p, context_p->token.line, true);\n    }\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n    switch (context_p->token.type)\n    {\n      case LEXER_SEMICOLON:\n      {\n        break;\n      }\n\n      case LEXER_RIGHT_BRACE:\n      {\n        if (parser_statement_flags[context_p->stack_top_uint8] & PARSER_STATM_SINGLE_STATM)\n        {\n          parser_raise_error (context_p, PARSER_ERR_STATEMENT_EXPECTED);\n        }\n        break;\n      }\n\n      case LEXER_LEFT_BRACE:\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n        {\n          parser_push_block_context (context_p, false);\n        }\n        else\n        {\n          parser_stack_push_uint8 (context_p, PARSER_STATEMENT_BLOCK);\n        }\n#else /* !ENABLED (JERRY_ESNEXT) */\n        parser_stack_push_uint8 (context_p, PARSER_STATEMENT_BLOCK);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        parser_stack_iterator_init (context_p, &context_p->last_statement);\n        lexer_next_token (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_VAR:\n#if ENABLED (JERRY_ESNEXT)\n      case LEXER_KEYW_LET:\n      case LEXER_KEYW_CONST:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      {\n        parser_parse_var_statement (context_p);\n        break;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      case LEXER_KEYW_CLASS:\n      {\n        parser_validate_lexical_context (context_p);\n        parser_parse_class (context_p, true);\n        goto consume_last_statement;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      case LEXER_KEYW_IMPORT:\n      {\n        parser_parse_import_statement (context_p);\n        break;\n      }\n\n      case LEXER_KEYW_EXPORT:\n      {\n        if (parser_parse_export_statement (context_p))\n        {\n          goto consume_last_statement;\n        }\n        break;\n      }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n      case LEXER_KEYW_FUNCTION:\n      {\n        parser_parse_function_statement (context_p);\n        goto consume_last_statement;\n      }\n\n      case LEXER_KEYW_IF:\n      {\n        parser_parse_if_statement_start (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_SWITCH:\n      {\n        parser_parse_switch_statement_start (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_DO:\n      {\n        parser_do_while_statement_t do_while_statement;\n        parser_loop_statement_t loop;\n\n        JERRY_ASSERT (context_p->last_cbc_opcode == PARSER_CBC_UNAVAILABLE);\n\n        do_while_statement.start_offset = context_p->byte_code_size;\n        loop.branch_list_p = NULL;\n\n        parser_stack_push (context_p, &do_while_statement, sizeof (parser_do_while_statement_t));\n        parser_stack_push (context_p, &loop, sizeof (parser_loop_statement_t));\n        parser_stack_push_uint8 (context_p, PARSER_STATEMENT_DO_WHILE);\n        parser_stack_iterator_init (context_p, &context_p->last_statement);\n        lexer_next_token (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_WHILE:\n      {\n        parser_parse_while_statement_start (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_FOR:\n      {\n        parser_parse_for_statement_start (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_WITH:\n      {\n        parser_parse_with_statement_start (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_TRY:\n      {\n        parser_try_statement_t try_statement;\n\n        lexer_next_token (context_p);\n\n        if (context_p->token.type != LEXER_LEFT_BRACE)\n        {\n          parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_EXPECTED);\n        }\n\n#ifndef JERRY_NDEBUG\n        PARSER_PLUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_TRY_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n        try_statement.type = parser_try_block;\n        parser_emit_cbc_ext_forward_branch (context_p,\n                                            CBC_EXT_TRY_CREATE_CONTEXT,\n                                            &try_statement.branch);\n\n#if ENABLED (JERRY_ESNEXT)\n        try_statement.scope_stack_top = context_p->scope_stack_top;\n        try_statement.scope_stack_reg_top = context_p->scope_stack_reg_top;\n\n        if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n        {\n          JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_BLOCK);\n\n          if (scanner_is_context_needed (context_p, PARSER_CHECK_BLOCK_CONTEXT))\n          {\n            parser_emit_cbc_ext (context_p, CBC_EXT_TRY_CREATE_ENV);\n          }\n\n          scanner_create_variables (context_p, SCANNER_CREATE_VARS_NO_OPTS);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        parser_stack_push (context_p, &try_statement, sizeof (parser_try_statement_t));\n        parser_stack_push_uint8 (context_p, PARSER_STATEMENT_TRY);\n        parser_stack_iterator_init (context_p, &context_p->last_statement);\n        lexer_next_token (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_DEFAULT:\n      {\n        parser_parse_default_statement (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_CASE:\n      {\n        parser_parse_case_statement (context_p);\n        continue;\n      }\n\n      case LEXER_KEYW_BREAK:\n      {\n        parser_parse_break_statement (context_p);\n        break;\n      }\n\n      case LEXER_KEYW_CONTINUE:\n      {\n        parser_parse_continue_statement (context_p);\n        break;\n      }\n\n      case LEXER_KEYW_THROW:\n      {\n        lexer_next_token (context_p);\n        if (context_p->token.flags & LEXER_WAS_NEWLINE)\n        {\n          parser_raise_error (context_p, PARSER_ERR_EXPRESSION_EXPECTED);\n        }\n        parser_parse_expression (context_p, PARSE_EXPR);\n        parser_emit_cbc (context_p, CBC_THROW);\n        break;\n      }\n\n      case LEXER_KEYW_RETURN:\n      {\n        if (!(context_p->status_flags & PARSER_IS_FUNCTION))\n        {\n          parser_raise_error (context_p, PARSER_ERR_INVALID_RETURN);\n        }\n\n        lexer_next_token (context_p);\n\n        if ((context_p->token.flags & LEXER_WAS_NEWLINE)\n            || context_p->token.type == LEXER_SEMICOLON\n            || context_p->token.type == LEXER_EOS\n            || context_p->token.type == LEXER_RIGHT_BRACE)\n        {\n#if ENABLED (JERRY_ESNEXT)\n          if (context_p->status_flags & PARSER_IS_ASYNC_FUNCTION)\n          {\n            parser_emit_cbc_ext (context_p, CBC_EXT_RETURN_UNDEFINED);\n            break;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          parser_emit_cbc (context_p, CBC_RETURN_WITH_BLOCK);\n          break;\n        }\n\n        parser_parse_expression (context_p, PARSE_EXPR);\n\n        if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n        {\n          context_p->last_cbc_opcode = CBC_RETURN_WITH_LITERAL;\n          break;\n        }\n\n        parser_emit_cbc (context_p, CBC_RETURN);\n        break;\n      }\n\n      case LEXER_KEYW_DEBUGGER:\n      {\n#if ENABLED (JERRY_DEBUGGER)\n        /* This breakpoint location is not reported to the\n         * debugger, so it is impossible to disable it. */\n        if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n        {\n          parser_emit_cbc (context_p, CBC_BREAKPOINT_ENABLED);\n        }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n        lexer_next_token (context_p);\n        break;\n      }\n\n      case LEXER_LITERAL:\n      {\n        if (context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n        {\n          if (JERRY_UNLIKELY (lexer_check_next_character (context_p, LIT_CHAR_COLON)))\n          {\n            parser_parse_label (context_p);\n            lexer_consume_next_character (context_p);\n            lexer_next_token (context_p);\n            continue;\n          }\n#if ENABLED (JERRY_ESNEXT)\n          if (JERRY_UNLIKELY (lexer_token_is_let (context_p)))\n          {\n            if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n            {\n              if (context_p->next_scanner_info_p->type == SCANNER_TYPE_LET_EXPRESSION)\n              {\n                scanner_release_next (context_p, sizeof (scanner_info_t));\n              }\n\n              if (context_p->status_flags & PARSER_IS_FUNCTION)\n              {\n                parser_parse_expression_statement (context_p, PARSE_EXPR);\n                break;\n              }\n\n              parser_parse_block_expression (context_p, PARSE_EXPR);\n              break;\n            }\n\n            context_p->token.type = LEXER_KEYW_LET;\n            parser_parse_var_statement (context_p);\n            break;\n          }\n\n          if (JERRY_UNLIKELY (lexer_token_is_async (context_p))\n              && context_p->next_scanner_info_p->source_p == context_p->source_p)\n          {\n            bool is_statement = true;\n\n            if (context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION)\n            {\n              is_statement = (context_p->next_scanner_info_p->u8_arg & SCANNER_FUNCTION_STATEMENT) != 0;\n\n              JERRY_ASSERT (!is_statement || (context_p->next_scanner_info_p->u8_arg & SCANNER_FUNCTION_ASYNC));\n            }\n            else\n            {\n              JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_ERR_ASYNC_FUNCTION);\n\n              scanner_release_next (context_p, sizeof (scanner_info_t));\n            }\n\n            if (is_statement)\n            {\n              if (parser_statement_flags[context_p->stack_top_uint8] & PARSER_STATM_SINGLE_STATM)\n              {\n                parser_raise_error (context_p, PARSER_ERR_LEXICAL_SINGLE_STATEMENT);\n              }\n\n              lexer_next_token (context_p);\n              JERRY_ASSERT (context_p->token.type == LEXER_KEYW_FUNCTION);\n              continue;\n            }\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        }\n        /* FALLTHRU */\n      }\n\n      default:\n      {\n        int options = PARSE_EXPR;\n\n        if (context_p->token.type == LEXER_EXPRESSION_START)\n        {\n          /* Restore the token type form the extra_value. */\n          context_p->token.type = context_p->token.extra_value;\n          options |= PARSE_EXPR_HAS_LITERAL;\n        }\n\n        if (context_p->status_flags & PARSER_IS_FUNCTION)\n        {\n          parser_parse_expression_statement (context_p, options);\n        }\n        else\n        {\n          parser_parse_block_expression (context_p, options);\n        }\n\n        break;\n      }\n    }\n\n    parser_flush_cbc (context_p);\n\n    if (context_p->token.type == LEXER_RIGHT_BRACE)\n    {\n      if (context_p->stack_top_uint8 == PARSER_STATEMENT_BLOCK)\n      {\n        parser_stack_pop_uint8 (context_p);\n        parser_stack_iterator_init (context_p, &context_p->last_statement);\n        lexer_next_token (context_p);\n      }\n#if ENABLED (JERRY_ESNEXT)\n      else if (context_p->stack_top_uint8 == PARSER_STATEMENT_BLOCK_SCOPE\n               || context_p->stack_top_uint8 == PARSER_STATEMENT_BLOCK_CONTEXT)\n      {\n        parser_pop_block_context (context_p);\n        lexer_next_token (context_p);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      else if (context_p->stack_top_uint8 == PARSER_STATEMENT_SWITCH\n               || context_p->stack_top_uint8 == PARSER_STATEMENT_SWITCH_NO_DEFAULT)\n      {\n        int has_default = (context_p->stack_top_uint8 == PARSER_STATEMENT_SWITCH);\n        parser_loop_statement_t loop;\n        parser_switch_statement_t switch_statement;\n\n        parser_stack_pop_uint8 (context_p);\n        parser_stack_pop (context_p, &loop, sizeof (parser_loop_statement_t));\n        parser_stack_pop (context_p, &switch_statement, sizeof (parser_switch_statement_t));\n        parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n        JERRY_ASSERT (switch_statement.branch_list_p == NULL);\n\n        if (!has_default)\n        {\n          parser_set_branch_to_current_position (context_p, &switch_statement.default_branch);\n        }\n\n        parser_set_breaks_to_current_position (context_p, loop.branch_list_p);\n        lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_SCOPE\n            || context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_CONTEXT)\n        {\n          parser_pop_block_context (context_p);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n      else if (context_p->stack_top_uint8 == PARSER_STATEMENT_TRY)\n      {\n        parser_parse_try_statement_end (context_p);\n      }\n      else if (context_p->stack_top_uint8 == PARSER_STATEMENT_START)\n      {\n        if (context_p->status_flags & PARSER_IS_CLOSURE)\n        {\n          parser_stack_pop_uint8 (context_p);\n          context_p->last_statement.current_p = NULL;\n          /* There is no lexer_next_token here, since the\n           * next token belongs to the parent context. */\n          return;\n        }\n        parser_raise_error (context_p, PARSER_ERR_INVALID_RIGHT_SQUARE);\n      }\n    }\n    else if (context_p->token.type == LEXER_SEMICOLON)\n    {\n      lexer_next_token (context_p);\n    }\n    else if (context_p->token.type != LEXER_EOS\n             && !(context_p->token.flags & LEXER_WAS_NEWLINE))\n    {\n      parser_raise_error (context_p, PARSER_ERR_SEMICOLON_EXPECTED);\n    }\n\nconsume_last_statement:\n    while (true)\n    {\n      switch (context_p->stack_top_uint8)\n      {\n        case PARSER_STATEMENT_LABEL:\n        {\n          parser_label_statement_t label;\n\n          parser_stack_pop_uint8 (context_p);\n          parser_stack_pop (context_p, &label, sizeof (parser_label_statement_t));\n          parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n          parser_set_breaks_to_current_position (context_p, label.break_list_p);\n          continue;\n        }\n\n        case PARSER_STATEMENT_IF:\n        {\n          if (parser_parse_if_statement_end (context_p))\n          {\n            break;\n          }\n          continue;\n        }\n\n        case PARSER_STATEMENT_ELSE:\n        {\n          parser_if_else_statement_t else_statement;\n\n          parser_stack_pop_uint8 (context_p);\n          parser_stack_pop (context_p, &else_statement, sizeof (parser_if_else_statement_t));\n          parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n          parser_set_branch_to_current_position (context_p, &else_statement.branch);\n          continue;\n        }\n\n        case PARSER_STATEMENT_DO_WHILE:\n        {\n          parser_parse_do_while_statement_end (context_p);\n          if (context_p->token.type == LEXER_SEMICOLON)\n          {\n            lexer_next_token (context_p);\n          }\n          continue;\n        }\n\n        case PARSER_STATEMENT_WHILE:\n        {\n          parser_parse_while_statement_end (context_p);\n          continue;\n        }\n\n        case PARSER_STATEMENT_FOR:\n        {\n          parser_parse_for_statement_end (context_p);\n          continue;\n        }\n\n        case PARSER_STATEMENT_FOR_IN:\n#if ENABLED (JERRY_ESNEXT)\n        case PARSER_STATEMENT_FOR_OF:\n        case PARSER_STATEMENT_FOR_AWAIT_OF:\n#endif /* ENABLED (JERRY_ESNEXT) */\n        {\n          parser_for_in_of_statement_t for_in_of_statement;\n          parser_loop_statement_t loop;\n\n#if ENABLED (JERRY_ESNEXT)\n          uint8_t for_type = context_p->stack_top_uint8;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          parser_stack_pop_uint8 (context_p);\n          parser_stack_pop (context_p, &loop, sizeof (parser_loop_statement_t));\n          parser_stack_pop (context_p, &for_in_of_statement, sizeof (parser_for_in_of_statement_t));\n          parser_stack_iterator_init (context_p, &context_p->last_statement);\n\n          parser_set_continues_to_current_position (context_p, loop.branch_list_p);\n\n          parser_flush_cbc (context_p);\n\n          uint16_t stack_allocation = PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION;\n#if ENABLED (JERRY_ESNEXT)\n          if (for_type != PARSER_STATEMENT_FOR_IN)\n          {\n            stack_allocation = (for_type == PARSER_STATEMENT_FOR_OF ? PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION\n                                                                    : PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          PARSER_MINUS_EQUAL_U16 (context_p->stack_depth, stack_allocation);\n#ifndef JERRY_NDEBUG\n          PARSER_MINUS_EQUAL_U16 (context_p->context_stack_depth, stack_allocation);\n#endif /* !JERRY_NDEBUG */\n\n          cbc_ext_opcode_t opcode = CBC_EXT_BRANCH_IF_FOR_IN_HAS_NEXT;\n\n#if ENABLED (JERRY_ESNEXT)\n          if (for_type != PARSER_STATEMENT_FOR_IN)\n          {\n            opcode = (for_type == PARSER_STATEMENT_FOR_OF ? CBC_EXT_BRANCH_IF_FOR_OF_HAS_NEXT\n                                                          : CBC_EXT_BRANCH_IF_FOR_AWAIT_OF_HAS_NEXT);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          parser_emit_cbc_ext_backward_branch (context_p, opcode, for_in_of_statement.start_offset);\n\n          parser_set_breaks_to_current_position (context_p, loop.branch_list_p);\n          parser_set_branch_to_current_position (context_p, &for_in_of_statement.branch);\n\n#if ENABLED (JERRY_ESNEXT)\n          if (context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_SCOPE\n              || context_p->stack_top_uint8 == PARSER_STATEMENT_PRIVATE_CONTEXT)\n          {\n            parser_pop_block_context (context_p);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          continue;\n        }\n\n        case PARSER_STATEMENT_WITH:\n        {\n          parser_parse_with_statement_end (context_p);\n          continue;\n        }\n\n        default:\n        {\n          break;\n        }\n      }\n      break;\n    }\n  }\n\n  parser_stack_pop_uint8 (context_p);\n  context_p->last_statement.current_p = NULL;\n\n  if (context_p->status_flags & PARSER_IS_CLOSURE)\n  {\n    parser_raise_error (context_p, PARSER_ERR_STATEMENT_EXPECTED);\n  }\n} /* parser_parse_statements */\n\n/**\n * Free jumps stored on the stack if a parse error is occured.\n */\nvoid JERRY_ATTR_NOINLINE\nparser_free_jumps (parser_stack_iterator_t iterator) /**< iterator position */\n{\n  while (true)\n  {\n    uint8_t type = parser_stack_iterator_read_uint8 (&iterator);\n    parser_branch_node_t *branch_list_p = NULL;\n\n    switch (type)\n    {\n      case PARSER_STATEMENT_START:\n      {\n        return;\n      }\n\n      case PARSER_STATEMENT_LABEL:\n      {\n        parser_label_statement_t label;\n\n        parser_stack_iterator_skip (&iterator, 1);\n        parser_stack_iterator_read (&iterator, &label, sizeof (parser_label_statement_t));\n        parser_stack_iterator_skip (&iterator, sizeof (parser_label_statement_t));\n        branch_list_p = label.break_list_p;\n        break;\n      }\n\n      case PARSER_STATEMENT_SWITCH:\n      case PARSER_STATEMENT_SWITCH_NO_DEFAULT:\n      {\n        parser_switch_statement_t switch_statement;\n        parser_loop_statement_t loop;\n\n        parser_stack_iterator_skip (&iterator, 1);\n        parser_stack_iterator_read (&iterator, &loop, sizeof (parser_loop_statement_t));\n        parser_stack_iterator_skip (&iterator, sizeof (parser_loop_statement_t));\n        parser_stack_iterator_read (&iterator, &switch_statement, sizeof (parser_switch_statement_t));\n        parser_stack_iterator_skip (&iterator, sizeof (parser_switch_statement_t));\n\n        branch_list_p = switch_statement.branch_list_p;\n        while (branch_list_p != NULL)\n        {\n          parser_branch_node_t *next_p = branch_list_p->next_p;\n          parser_free (branch_list_p, sizeof (parser_branch_node_t));\n          branch_list_p = next_p;\n        }\n        branch_list_p = loop.branch_list_p;\n        break;\n      }\n\n      case PARSER_STATEMENT_DO_WHILE:\n      case PARSER_STATEMENT_WHILE:\n      case PARSER_STATEMENT_FOR:\n      case PARSER_STATEMENT_FOR_IN:\n#if ENABLED (JERRY_ESNEXT)\n      case PARSER_STATEMENT_FOR_OF:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      {\n        parser_loop_statement_t loop;\n\n        parser_stack_iterator_skip (&iterator, 1);\n        parser_stack_iterator_read (&iterator, &loop, sizeof (parser_loop_statement_t));\n        parser_stack_iterator_skip (&iterator, parser_statement_length (type) - 1);\n        branch_list_p = loop.branch_list_p;\n        break;\n      }\n\n      default:\n      {\n        parser_stack_iterator_skip (&iterator, parser_statement_length (type));\n        continue;\n      }\n    }\n\n    while (branch_list_p != NULL)\n    {\n      parser_branch_node_t *next_p = branch_list_p->next_p;\n      parser_free (branch_list_p, sizeof (parser_branch_node_t));\n      branch_list_p = next_p;\n    }\n  }\n} /* parser_free_jumps */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_PARSER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser-tagged-template-literal.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"js-parser-tagged-template-literal.h\"\n#include \"js-lexer.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n\n/* \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_tagged_template_literal Tagged template literal\n * @{\n */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Append the cooked and raw string to the corresponding array\n */\nvoid\nparser_tagged_template_literal_append_strings (parser_context_t *context_p, /**< parser context */\n                                               ecma_object_t *template_obj_p, /**< template object */\n                                               ecma_object_t *raw_strings_p, /**< raw strings object */\n                                               uint32_t prop_idx) /**< property index to set the values */\n{\n  lexer_lit_location_t *lit_loc_p = &context_p->token.lit_location;\n\n  if (lit_loc_p->length == 0 && !lit_loc_p->has_escape)\n  {\n    ecma_builtin_helper_def_prop_by_index (template_obj_p,\n                                           prop_idx,\n                                           ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY),\n                                           ECMA_PROPERTY_FLAG_ENUMERABLE);\n\n    ecma_builtin_helper_def_prop_by_index (raw_strings_p,\n                                           prop_idx,\n                                           ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY),\n                                           ECMA_PROPERTY_FLAG_ENUMERABLE);\n    return;\n  }\n\n  uint8_t local_byte_array[LEXER_MAX_LITERAL_LOCAL_BUFFER_SIZE];\n  const uint8_t *source_p = lexer_convert_literal_to_chars (context_p,\n                                                            &context_p->token.lit_location,\n                                                            local_byte_array,\n                                                            LEXER_STRING_NO_OPTS);\n\n  ecma_string_t *raw_str_p;\n  ecma_string_t *cooked_str_p = ecma_new_ecma_string_from_utf8 (source_p, lit_loc_p->length);\n  parser_free_allocated_buffer (context_p);\n\n  if (lit_loc_p->has_escape)\n  {\n    context_p->source_p = context_p->token.lit_location.char_p - 1;\n    lexer_parse_string (context_p, LEXER_STRING_RAW);\n    source_p = lexer_convert_literal_to_chars (context_p,\n                                               &context_p->token.lit_location,\n                                               local_byte_array,\n                                               LEXER_STRING_RAW);\n\n    raw_str_p = ecma_new_ecma_string_from_utf8 (source_p, lit_loc_p->length);\n    parser_free_allocated_buffer (context_p);\n  }\n  else\n  {\n    ecma_ref_ecma_string (cooked_str_p);\n    raw_str_p = cooked_str_p;\n  }\n\n  ecma_builtin_helper_def_prop_by_index (template_obj_p,\n                                         prop_idx,\n                                         ecma_make_string_value (cooked_str_p),\n                                         ECMA_PROPERTY_FLAG_ENUMERABLE);\n\n  ecma_builtin_helper_def_prop_by_index (raw_strings_p,\n                                         prop_idx,\n                                         ecma_make_string_value (raw_str_p),\n                                         ECMA_PROPERTY_FLAG_ENUMERABLE);\n\n  ecma_deref_ecma_string (cooked_str_p);\n  ecma_deref_ecma_string (raw_str_p);\n} /* parser_tagged_template_literal_append_strings */\n\n/**\n * Create new tagged template literal object\n *\n * @return pointer to the allocated object\n */\necma_object_t *\nparser_new_tagged_template_literal (ecma_object_t **raw_strings_p) /**< [out] raw strings object */\n{\n  ecma_object_t *template_obj_p = ecma_op_new_array_object (0);\n  *raw_strings_p = ecma_op_new_array_object (0);\n\n  ecma_extended_object_t *template_ext_obj_p = (ecma_extended_object_t *) template_obj_p;\n  ecma_extended_object_t *raw_ext_obj_p = (ecma_extended_object_t *) *raw_strings_p;\n\n  const uint8_t flags = ECMA_PROPERTY_VIRTUAL | ECMA_PROPERTY_FLAG_WRITABLE | ECMA_FAST_ARRAY_FLAG;\n  JERRY_ASSERT (template_ext_obj_p->u.array.length_prop_and_hole_count == flags);\n  JERRY_ASSERT (raw_ext_obj_p->u.array.length_prop_and_hole_count == flags);\n\n  template_ext_obj_p->u.array.length_prop_and_hole_count = flags | ECMA_ARRAY_TEMPLATE_LITERAL;\n  raw_ext_obj_p->u.array.length_prop_and_hole_count = flags | ECMA_ARRAY_TEMPLATE_LITERAL;\n\n  ecma_builtin_helper_def_prop (template_obj_p,\n                                ecma_get_magic_string (LIT_MAGIC_STRING_RAW),\n                                ecma_make_object_value (*raw_strings_p),\n                                ECMA_PROPERTY_FIXED);\n\n  return template_obj_p;\n} /* parser_new_tagged_template_literal */\n\n/**\n * Set integrity level of the given template array object to \"frozen\"\n */\nstatic void\nparser_tagged_template_literal_freeze_array (ecma_object_t *obj_p)\n{\n  JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_ARRAY);\n  ecma_op_ordinary_object_prevent_extensions (obj_p);\n  ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;\n  ext_obj_p->u.array.length_prop_and_hole_count &= (uint32_t) ~ECMA_PROPERTY_FLAG_WRITABLE;\n} /* parser_tagged_template_literal_freeze_array */\n\n/**\n * Finalize the tagged template object\n */\nvoid\nparser_tagged_template_literal_finalize (ecma_object_t *template_obj_p, /**< template object */\n                                         ecma_object_t *raw_strings_p) /**< raw strings object */\n{\n  parser_tagged_template_literal_freeze_array (template_obj_p);\n  parser_tagged_template_literal_freeze_array (raw_strings_p);\n} /* parser_tagged_template_literal_finalize */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser-tagged-template-literal.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ECMA_TAGGED_TEMPLATE_LITERAL_H\n#define ECMA_TAGGED_TEMPLATE_LITERAL_H\n\n/* \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_tagged_template_literal Tagged template literal\n * @{\n */\n\n#include \"common.h\"\n#include \"ecma-globals.h\"\n#include \"js-parser-internal.h\"\n\n#if ENABLED (JERRY_ESNEXT)\necma_object_t *\nparser_new_tagged_template_literal (ecma_object_t **raw_strings_p);\n\nvoid\nparser_tagged_template_literal_append_strings (parser_context_t *context_p, ecma_object_t *template_obj_p,\n                                               ecma_object_t *raw_strings_p, uint32_t prop_index);\n\nvoid\nparser_tagged_template_literal_finalize (ecma_object_t *template_obj_p, ecma_object_t *raw_strings_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#endif /* ECMA_TAGGED_TEMPLATE_LITERAL_H */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser-util.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"js-parser-internal.h\"\n\n#if ENABLED (JERRY_PARSER)\n\n#if ENABLED (JERRY_LINE_INFO)\n#include \"jcontext.h\"\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_utils Utility\n * @{\n */\n\n/**********************************************************************/\n/* Emitting byte codes                                                */\n/**********************************************************************/\n\n/**\n * Append two bytes to the cbc stream.\n */\nstatic void\nparser_emit_two_bytes (parser_context_t *context_p, /**< context */\n                       uint8_t first_byte, /**< first byte */\n                       uint8_t second_byte) /**< second byte */\n{\n  uint32_t last_position = context_p->byte_code.last_position;\n\n  if (last_position + 2 <= PARSER_CBC_STREAM_PAGE_SIZE)\n  {\n    parser_mem_page_t *page_p = context_p->byte_code.last_p;\n\n    page_p->bytes[last_position] = first_byte;\n    page_p->bytes[last_position + 1] = second_byte;\n    context_p->byte_code.last_position = last_position + 2;\n  }\n  else if (last_position >= PARSER_CBC_STREAM_PAGE_SIZE)\n  {\n    parser_mem_page_t *page_p;\n\n    parser_cbc_stream_alloc_page (context_p, &context_p->byte_code);\n    page_p = context_p->byte_code.last_p;\n    page_p->bytes[0] = first_byte;\n    page_p->bytes[1] = second_byte;\n    context_p->byte_code.last_position = 2;\n  }\n  else\n  {\n    context_p->byte_code.last_p->bytes[PARSER_CBC_STREAM_PAGE_SIZE - 1] = first_byte;\n    parser_cbc_stream_alloc_page (context_p, &context_p->byte_code);\n    context_p->byte_code.last_p->bytes[0] = second_byte;\n    context_p->byte_code.last_position = 1;\n  }\n} /* parser_emit_two_bytes */\n\n/**\n * Append byte to the end of the current byte code stream.\n *\n * @param context_p parser context\n * @param byte byte\n */\n#define PARSER_APPEND_TO_BYTE_CODE(context_p, byte) \\\n  if ((context_p)->byte_code.last_position >= PARSER_CBC_STREAM_PAGE_SIZE) \\\n  { \\\n    parser_cbc_stream_alloc_page ((context_p), &(context_p)->byte_code); \\\n  } \\\n  (context_p)->byte_code.last_p->bytes[(context_p)->byte_code.last_position++] = (uint8_t) (byte)\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n\n/**\n * Print literal corresponding to the current index\n */\nstatic void\nparser_print_literal (parser_context_t *context_p, /**< context */\n                      uint16_t literal_index) /**< index of literal */\n{\n  parser_scope_stack_t *scope_stack_p = context_p->scope_stack_p;\n  parser_scope_stack_t *scope_stack_end_p = scope_stack_p + context_p->scope_stack_top;\n  bool in_scope_literal = false;\n\n  while (scope_stack_p < scope_stack_end_p)\n  {\n    scope_stack_end_p--;\n\n    if (scope_stack_end_p->map_from == PARSER_SCOPE_STACK_FUNC)\n    {\n      if (literal_index == scope_stack_end_p->map_to)\n      {\n        in_scope_literal = true;\n        break;\n      }\n    }\n    else if (literal_index == scanner_decode_map_to (scope_stack_end_p))\n    {\n      in_scope_literal = true;\n      break;\n    }\n  }\n\n  if (literal_index < PARSER_REGISTER_START)\n  {\n    JERRY_DEBUG_MSG (in_scope_literal ? \" IDX:%d->\" : \" idx:%d->\", literal_index);\n    lexer_literal_t *literal_p = PARSER_GET_LITERAL (literal_index);\n    util_print_literal (literal_p);\n    return;\n  }\n\n  if (!in_scope_literal)\n  {\n    JERRY_DEBUG_MSG (\" reg:%d\", (int) (literal_index - PARSER_REGISTER_START));\n    return;\n  }\n\n  JERRY_DEBUG_MSG (\" REG:%d->\", (int) (literal_index - PARSER_REGISTER_START));\n\n  lexer_literal_t *literal_p = PARSER_GET_LITERAL (scope_stack_end_p->map_from);\n  util_print_literal (literal_p);\n} /* parser_print_literal */\n\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n/**\n * Append the current byte code to the stream\n */\nvoid\nparser_flush_cbc (parser_context_t *context_p) /**< context */\n{\n  uint8_t flags;\n  uint16_t last_opcode = context_p->last_cbc_opcode;\n\n  if (last_opcode == PARSER_CBC_UNAVAILABLE)\n  {\n    return;\n  }\n\n  context_p->status_flags |= PARSER_NO_END_LABEL;\n\n  if (PARSER_IS_BASIC_OPCODE (last_opcode))\n  {\n    cbc_opcode_t opcode = (cbc_opcode_t) last_opcode;\n\n    JERRY_ASSERT (opcode < CBC_END);\n    flags = cbc_flags[opcode];\n\n    PARSER_APPEND_TO_BYTE_CODE (context_p, opcode);\n    context_p->byte_code_size++;\n  }\n  else\n  {\n    cbc_ext_opcode_t opcode = (cbc_ext_opcode_t) PARSER_GET_EXT_OPCODE (last_opcode);\n\n    JERRY_ASSERT (opcode < CBC_EXT_END);\n    flags = cbc_ext_flags[opcode];\n    parser_emit_two_bytes (context_p, CBC_EXT_OPCODE, (uint8_t) opcode);\n    context_p->byte_code_size += 2;\n  }\n\n  JERRY_ASSERT ((flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE\n                 || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth);\n  PARSER_PLUS_EQUAL_U16 (context_p->stack_depth, CBC_STACK_ADJUST_VALUE (flags));\n\n  if (flags & (CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2))\n  {\n    uint16_t literal_index = context_p->last_cbc.literal_index;\n\n    parser_emit_two_bytes (context_p,\n                           (uint8_t) (literal_index & 0xff),\n                           (uint8_t) (literal_index >> 8));\n    context_p->byte_code_size += 2;\n  }\n\n  if (flags & CBC_HAS_LITERAL_ARG2)\n  {\n    uint16_t literal_index = context_p->last_cbc.value;\n\n    parser_emit_two_bytes (context_p,\n                           (uint8_t) (literal_index & 0xff),\n                           (uint8_t) (literal_index >> 8));\n    context_p->byte_code_size += 2;\n\n    if (!(flags & CBC_HAS_LITERAL_ARG))\n    {\n      literal_index = context_p->last_cbc.third_literal_index;\n\n      parser_emit_two_bytes (context_p,\n                             (uint8_t) (literal_index & 0xff),\n                             (uint8_t) (literal_index >> 8));\n      context_p->byte_code_size += 2;\n    }\n  }\n\n  if (flags & CBC_HAS_BYTE_ARG)\n  {\n    uint8_t byte_argument = (uint8_t) context_p->last_cbc.value;\n\n    JERRY_ASSERT (context_p->last_cbc.value <= CBC_MAXIMUM_BYTE_VALUE);\n\n    if (flags & CBC_POP_STACK_BYTE_ARG)\n    {\n      JERRY_ASSERT (context_p->stack_depth >= byte_argument);\n      PARSER_MINUS_EQUAL_U16 (context_p->stack_depth, byte_argument);\n    }\n\n    PARSER_APPEND_TO_BYTE_CODE (context_p, byte_argument);\n    context_p->byte_code_size++;\n  }\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"  [%3d] %s\",\n                     (int) context_p->stack_depth,\n                     PARSER_IS_BASIC_OPCODE (last_opcode) ? cbc_names[last_opcode]\n                                                          : cbc_ext_names[PARSER_GET_EXT_OPCODE (last_opcode)]);\n\n    if (flags & (CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2))\n    {\n      parser_print_literal (context_p, context_p->last_cbc.literal_index);\n    }\n\n    if (flags & CBC_HAS_LITERAL_ARG2)\n    {\n      parser_print_literal (context_p, context_p->last_cbc.value);\n\n      if (!(flags & CBC_HAS_LITERAL_ARG))\n      {\n        parser_print_literal (context_p, context_p->last_cbc.third_literal_index);\n      }\n    }\n\n    if (flags & CBC_HAS_BYTE_ARG)\n    {\n      if ((last_opcode == CBC_PUSH_NUMBER_POS_BYTE)\n          || (last_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_POS_BYTE)))\n      {\n        JERRY_DEBUG_MSG (\" number:%d\", (int) context_p->last_cbc.value + 1);\n      }\n      else if ((last_opcode == CBC_PUSH_NUMBER_NEG_BYTE)\n               || (last_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE)))\n      {\n        JERRY_DEBUG_MSG (\" number:%d\", -((int) context_p->last_cbc.value + 1));\n      }\n      else\n      {\n        JERRY_DEBUG_MSG (\" byte_arg:%d\", (int) context_p->last_cbc.value);\n      }\n    }\n\n    JERRY_DEBUG_MSG (\"\\n\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  if (context_p->stack_depth > context_p->stack_limit)\n  {\n    context_p->stack_limit = context_p->stack_depth;\n    if (context_p->stack_limit > PARSER_MAXIMUM_STACK_LIMIT)\n    {\n      parser_raise_error (context_p, PARSER_ERR_STACK_LIMIT_REACHED);\n    }\n  }\n\n  context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n} /* parser_flush_cbc */\n\n/**\n * Append a byte code\n */\nvoid\nparser_emit_cbc (parser_context_t *context_p, /**< context */\n                 uint16_t opcode) /**< opcode */\n{\n  JERRY_ASSERT (PARSER_ARGS_EQ (opcode, 0));\n\n  if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    parser_flush_cbc (context_p);\n  }\n\n  context_p->last_cbc_opcode = opcode;\n} /* parser_emit_cbc */\n\n/**\n * Append a byte code with a literal argument\n */\nvoid\nparser_emit_cbc_literal (parser_context_t *context_p, /**< context */\n                         uint16_t opcode, /**< opcode */\n                         uint16_t literal_index) /**< literal index */\n{\n  JERRY_ASSERT (PARSER_ARGS_EQ (opcode, CBC_HAS_LITERAL_ARG));\n\n  if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    parser_flush_cbc (context_p);\n  }\n\n  context_p->last_cbc_opcode = opcode;\n  context_p->last_cbc.literal_index = literal_index;\n  context_p->last_cbc.literal_type = LEXER_UNUSED_LITERAL;\n  context_p->last_cbc.literal_keyword_type = LEXER_EOS;\n} /* parser_emit_cbc_literal */\n\n/**\n * Append a byte code with a literal and value argument\n */\nvoid\nparser_emit_cbc_literal_value (parser_context_t *context_p, /**< context */\n                               uint16_t opcode, /**< opcode */\n                               uint16_t literal_index, /**< literal index */\n                               uint16_t value) /**< value */\n{\n  JERRY_ASSERT (PARSER_ARGS_EQ (opcode, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));\n\n  if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    parser_flush_cbc (context_p);\n  }\n\n  context_p->last_cbc_opcode = opcode;\n  context_p->last_cbc.literal_index = literal_index;\n  context_p->last_cbc.literal_type = LEXER_UNUSED_LITERAL;\n  context_p->last_cbc.literal_keyword_type = LEXER_EOS;\n  context_p->last_cbc.value = value;\n} /* parser_emit_cbc_literal_value */\n\n/**\n * Append a byte code with the current literal argument\n */\nvoid\nparser_emit_cbc_literal_from_token (parser_context_t *context_p, /**< context */\n                                    uint16_t opcode) /**< opcode */\n{\n  JERRY_ASSERT (PARSER_ARGS_EQ (opcode, CBC_HAS_LITERAL_ARG));\n\n  if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    parser_flush_cbc (context_p);\n  }\n\n  context_p->last_cbc_opcode = opcode;\n  context_p->last_cbc.literal_index = context_p->lit_object.index;\n  context_p->last_cbc.literal_type = context_p->token.lit_location.type;\n  context_p->last_cbc.literal_keyword_type = context_p->token.keyword_type;\n} /* parser_emit_cbc_literal_from_token */\n\n/**\n * Append a byte code with a call argument\n */\nvoid\nparser_emit_cbc_call (parser_context_t *context_p, /**< context */\n                      uint16_t opcode, /**< opcode */\n                      size_t call_arguments) /**< number of arguments */\n{\n  JERRY_ASSERT (PARSER_ARGS_EQ (opcode, CBC_HAS_BYTE_ARG));\n  JERRY_ASSERT (call_arguments <= CBC_MAXIMUM_BYTE_VALUE);\n\n  if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    parser_flush_cbc (context_p);\n  }\n\n  context_p->last_cbc_opcode = opcode;\n  context_p->last_cbc.value = (uint16_t) call_arguments;\n} /* parser_emit_cbc_call */\n\n/**\n * Append a push number 1/2 byte code\n */\nvoid\nparser_emit_cbc_push_number (parser_context_t *context_p, /**< context */\n                             bool is_negative_number) /**< sign is negative */\n{\n  uint16_t value = context_p->lit_object.index;\n  uint16_t lit_value = PARSER_INVALID_LITERAL_INDEX;\n\n  if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n    {\n      lit_value = context_p->last_cbc.literal_index;\n    }\n    else\n    {\n      if (context_p->last_cbc_opcode == CBC_PUSH_TWO_LITERALS)\n      {\n        context_p->last_cbc_opcode = CBC_PUSH_LITERAL;\n        lit_value = context_p->last_cbc.value;\n      }\n      else if (context_p->last_cbc_opcode == CBC_PUSH_THREE_LITERALS)\n      {\n        context_p->last_cbc_opcode = CBC_PUSH_TWO_LITERALS;\n        lit_value = context_p->last_cbc.third_literal_index;\n      }\n\n      parser_flush_cbc (context_p);\n    }\n  }\n\n  if (value == 0)\n  {\n    if (lit_value == PARSER_INVALID_LITERAL_INDEX)\n    {\n      context_p->last_cbc_opcode = CBC_PUSH_NUMBER_0;\n      return;\n    }\n\n    context_p->last_cbc_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_0);\n    context_p->last_cbc.literal_index = lit_value;\n    return;\n  }\n\n  uint16_t opcode;\n\n  if (lit_value == PARSER_INVALID_LITERAL_INDEX)\n  {\n    opcode = (is_negative_number ? CBC_PUSH_NUMBER_NEG_BYTE\n                                 : CBC_PUSH_NUMBER_POS_BYTE);\n\n    JERRY_ASSERT (CBC_STACK_ADJUST_VALUE (PARSER_GET_FLAGS (opcode)) == 1);\n  }\n  else\n  {\n    opcode = PARSER_TO_EXT_OPCODE (is_negative_number ? CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE\n                                                      : CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_POS_BYTE);\n    JERRY_ASSERT (CBC_STACK_ADJUST_VALUE (PARSER_GET_FLAGS (opcode)) == 2);\n\n    context_p->last_cbc.literal_index = lit_value;\n  }\n\n  JERRY_ASSERT (value > 0 && value <= CBC_PUSH_NUMBER_BYTE_RANGE_END);\n\n  context_p->last_cbc_opcode = opcode;\n  context_p->last_cbc.value = (uint16_t) (value - 1);\n} /* parser_emit_cbc_push_number */\n\n#if ENABLED (JERRY_LINE_INFO)\n\n/**\n * Append a line info data\n */\nvoid\nparser_emit_line_info (parser_context_t *context_p, /**< context */\n                       uint32_t line, /**< current line */\n                       bool flush_cbc) /**< flush last byte code */\n{\n  if (flush_cbc && context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    parser_flush_cbc (context_p);\n  }\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"  [%3d] CBC_EXT_LINE %d\\n\", (int) context_p->stack_depth, line);\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  parser_emit_two_bytes (context_p, CBC_EXT_OPCODE, CBC_EXT_LINE);\n  context_p->byte_code_size += 2;\n\n  context_p->last_line_info_line = line;\n\n  const uint32_t max_shift_plus_7 = 7 * 5;\n  uint32_t shift = 7;\n\n  while (shift < max_shift_plus_7 && (line >> shift) > 0)\n  {\n    shift += 7;\n  }\n\n  do\n  {\n    shift -= 7;\n\n    uint8_t byte = (uint8_t) ((line >> shift) & CBC_LOWER_SEVEN_BIT_MASK);\n\n    if (shift > 0)\n    {\n      byte = (uint8_t) (byte | CBC_HIGHEST_BIT_MASK);\n    }\n\n    PARSER_APPEND_TO_BYTE_CODE (context_p, byte);\n    context_p->byte_code_size++;\n  }\n  while (shift > 0);\n} /* parser_emit_line_info */\n\n#endif /* ENABLED (JERRY_LINE_INFO) */\n\n/**\n * Append a byte code with a branch argument\n */\nvoid\nparser_emit_cbc_forward_branch (parser_context_t *context_p, /**< context */\n                                uint16_t opcode, /**< opcode */\n                                parser_branch_t *branch_p) /**< branch result */\n{\n  uint8_t flags;\n  uint32_t extra_byte_code_increase;\n\n  if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    parser_flush_cbc (context_p);\n  }\n\n  context_p->status_flags |= PARSER_NO_END_LABEL;\n\n  if (PARSER_IS_BASIC_OPCODE (opcode))\n  {\n    JERRY_ASSERT (opcode < CBC_END);\n    flags = cbc_flags[opcode];\n    extra_byte_code_increase = 0;\n  }\n  else\n  {\n    PARSER_APPEND_TO_BYTE_CODE (context_p, CBC_EXT_OPCODE);\n    opcode = (uint16_t) PARSER_GET_EXT_OPCODE (opcode);\n\n    JERRY_ASSERT (opcode < CBC_EXT_END);\n    flags = cbc_ext_flags[opcode];\n    extra_byte_code_increase = 1;\n  }\n\n  JERRY_ASSERT (flags & CBC_HAS_BRANCH_ARG);\n  JERRY_ASSERT (CBC_BRANCH_IS_FORWARD (flags));\n  JERRY_ASSERT (CBC_BRANCH_OFFSET_LENGTH (opcode) == 1);\n\n  /* Branch opcodes never push anything onto the stack. */\n  JERRY_ASSERT ((flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE\n                 || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth);\n  PARSER_PLUS_EQUAL_U16 (context_p->stack_depth, CBC_STACK_ADJUST_VALUE (flags));\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"  [%3d] %s\\n\",\n                     (int) context_p->stack_depth,\n                     extra_byte_code_increase == 0 ? cbc_names[opcode] : cbc_ext_names[opcode]);\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  PARSER_PLUS_EQUAL_U16 (opcode, PARSER_MAX_BRANCH_LENGTH - 1);\n\n  parser_emit_two_bytes (context_p, (uint8_t) opcode, 0);\n  branch_p->page_p = context_p->byte_code.last_p;\n  branch_p->offset = (context_p->byte_code.last_position - 1) | (context_p->byte_code_size << 8);\n\n  context_p->byte_code_size += extra_byte_code_increase;\n\n#if PARSER_MAXIMUM_CODE_SIZE <= UINT16_MAX\n  PARSER_APPEND_TO_BYTE_CODE (context_p, 0);\n#else /* PARSER_MAXIMUM_CODE_SIZE > UINT16_MAX */\n  parser_emit_two_bytes (context_p, 0, 0);\n#endif /* PARSER_MAXIMUM_CODE_SIZE <= UINT16_MAX */\n\n  context_p->byte_code_size += PARSER_MAX_BRANCH_LENGTH + 1;\n\n  if (context_p->stack_depth > context_p->stack_limit)\n  {\n    context_p->stack_limit = context_p->stack_depth;\n    if (context_p->stack_limit > PARSER_MAXIMUM_STACK_LIMIT)\n    {\n      parser_raise_error (context_p, PARSER_ERR_STACK_LIMIT_REACHED);\n    }\n  }\n} /* parser_emit_cbc_forward_branch */\n\n/**\n * Append a branch byte code and create an item.\n *\n * @return newly created parser branch node\n */\nparser_branch_node_t *\nparser_emit_cbc_forward_branch_item (parser_context_t *context_p, /**< context */\n                                     uint16_t opcode, /**< opcode */\n                                     parser_branch_node_t *next_p) /**< next branch */\n{\n  parser_branch_t branch;\n  parser_branch_node_t *new_item;\n\n  /* Since byte code insertion may throw an out-of-memory error,\n   * the branch is constructed locally, and copied later. */\n  parser_emit_cbc_forward_branch (context_p, opcode, &branch);\n\n  new_item = (parser_branch_node_t *) parser_malloc (context_p, sizeof (parser_branch_node_t));\n  new_item->branch = branch;\n  new_item->next_p = next_p;\n  return new_item;\n} /* parser_emit_cbc_forward_branch_item */\n\n/**\n * Append a byte code with a branch argument\n */\nvoid\nparser_emit_cbc_backward_branch (parser_context_t *context_p, /**< context */\n                                 uint16_t opcode, /**< opcode */\n                                 uint32_t offset) /**< destination offset */\n{\n  uint8_t flags;\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  const char *name;\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    parser_flush_cbc (context_p);\n  }\n\n  context_p->status_flags |= PARSER_NO_END_LABEL;\n  offset = context_p->byte_code_size - offset;\n\n  if (PARSER_IS_BASIC_OPCODE (opcode))\n  {\n    JERRY_ASSERT (opcode < CBC_END);\n    flags = cbc_flags[opcode];\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n    name = cbc_names[opcode];\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n  }\n  else\n  {\n    PARSER_APPEND_TO_BYTE_CODE (context_p, CBC_EXT_OPCODE);\n    opcode = (uint16_t) PARSER_GET_EXT_OPCODE (opcode);\n\n    JERRY_ASSERT (opcode < CBC_EXT_END);\n    flags = cbc_ext_flags[opcode];\n    context_p->byte_code_size++;\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n    name = cbc_ext_names[opcode];\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n  }\n\n  JERRY_ASSERT (flags & CBC_HAS_BRANCH_ARG);\n  JERRY_ASSERT (CBC_BRANCH_IS_BACKWARD (flags));\n  JERRY_ASSERT (CBC_BRANCH_OFFSET_LENGTH (opcode) == 1);\n  JERRY_ASSERT (offset <= context_p->byte_code_size);\n\n  /* Branch opcodes never push anything onto the stack. */\n  JERRY_ASSERT ((flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE\n                 || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth);\n  PARSER_PLUS_EQUAL_U16 (context_p->stack_depth, CBC_STACK_ADJUST_VALUE (flags));\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"  [%3d] %s\\n\", (int) context_p->stack_depth, name);\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  context_p->byte_code_size += 2;\n#if PARSER_MAXIMUM_CODE_SIZE > UINT16_MAX\n  if (offset > UINT16_MAX)\n  {\n    opcode++;\n    context_p->byte_code_size++;\n  }\n#endif /* PARSER_MAXIMUM_CODE_SIZE > UINT16_MAX */\n\n  if (offset > UINT8_MAX)\n  {\n    opcode++;\n    context_p->byte_code_size++;\n  }\n\n  PARSER_APPEND_TO_BYTE_CODE (context_p, (uint8_t) opcode);\n\n#if PARSER_MAXIMUM_CODE_SIZE > UINT16_MAX\n  if (offset > UINT16_MAX)\n  {\n    PARSER_APPEND_TO_BYTE_CODE (context_p, offset >> 16);\n  }\n#endif /* PARSER_MAXIMUM_CODE_SIZE > UINT16_MAX */\n\n  if (offset > UINT8_MAX)\n  {\n    PARSER_APPEND_TO_BYTE_CODE (context_p, (offset >> 8) & 0xff);\n  }\n\n  PARSER_APPEND_TO_BYTE_CODE (context_p, offset & 0xff);\n} /* parser_emit_cbc_backward_branch */\n\n#undef PARSER_CHECK_LAST_POSITION\n#undef PARSER_APPEND_TO_BYTE_CODE\n\n/**\n * Set a branch to the current byte code position\n */\nvoid\nparser_set_branch_to_current_position (parser_context_t *context_p, /**< context */\n                                       parser_branch_t *branch_p) /**< branch result */\n{\n  uint32_t delta;\n  size_t offset;\n  parser_mem_page_t *page_p = branch_p->page_p;\n\n  if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE)\n  {\n    parser_flush_cbc (context_p);\n  }\n\n  context_p->status_flags &= (uint32_t) ~PARSER_NO_END_LABEL;\n\n  JERRY_ASSERT (context_p->byte_code_size > (branch_p->offset >> 8));\n\n  delta = context_p->byte_code_size - (branch_p->offset >> 8);\n  offset = (branch_p->offset & CBC_LOWER_SEVEN_BIT_MASK);\n\n  JERRY_ASSERT (delta <= PARSER_MAXIMUM_CODE_SIZE);\n\n#if PARSER_MAXIMUM_CODE_SIZE <= UINT16_MAX\n  page_p->bytes[offset++] = (uint8_t) (delta >> 8);\n  if (offset >= PARSER_CBC_STREAM_PAGE_SIZE)\n  {\n    page_p = page_p->next_p;\n    offset = 0;\n  }\n#else /* PARSER_MAXIMUM_CODE_SIZE > UINT16_MAX */\n  page_p->bytes[offset++] = (uint8_t) (delta >> 16);\n  if (offset >= PARSER_CBC_STREAM_PAGE_SIZE)\n  {\n    page_p = page_p->next_p;\n    offset = 0;\n  }\n  page_p->bytes[offset++] = (uint8_t) ((delta >> 8) & 0xff);\n  if (offset >= PARSER_CBC_STREAM_PAGE_SIZE)\n  {\n    page_p = page_p->next_p;\n    offset = 0;\n  }\n#endif /* PARSER_MAXIMUM_CODE_SIZE <= UINT16_MAX */\n  page_p->bytes[offset] = delta & 0xff;\n} /* parser_set_branch_to_current_position */\n\n/**\n * Set breaks to the current byte code position\n */\nvoid\nparser_set_breaks_to_current_position (parser_context_t *context_p, /**< context */\n                                       parser_branch_node_t *current_p) /**< branch list */\n{\n  while (current_p != NULL)\n  {\n    parser_branch_node_t *next_p = current_p->next_p;\n\n    if (!(current_p->branch.offset & CBC_HIGHEST_BIT_MASK))\n    {\n      parser_set_branch_to_current_position (context_p, &current_p->branch);\n    }\n    parser_free (current_p, sizeof (parser_branch_node_t));\n    current_p = next_p;\n  }\n} /* parser_set_breaks_to_current_position */\n\n/**\n * Set continues to the current byte code position\n */\nvoid\nparser_set_continues_to_current_position (parser_context_t *context_p, /**< context */\n                                          parser_branch_node_t *current_p) /**< branch list */\n{\n  while (current_p != NULL)\n  {\n    if (current_p->branch.offset & CBC_HIGHEST_BIT_MASK)\n    {\n      parser_set_branch_to_current_position (context_p, &current_p->branch);\n    }\n    current_p = current_p->next_p;\n  }\n} /* parser_set_continues_to_current_position */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Return the size of internal record corresponding to a class field\n *\n * @return internal record size\n */\nstatic size_t\nparser_get_class_field_info_size (uint8_t class_field_type) /**< class field type */\n{\n  if (class_field_type & PARSER_CLASS_FIELD_INITIALIZED)\n  {\n    return sizeof (scanner_range_t) + 1;\n  }\n\n  if (class_field_type & PARSER_CLASS_FIELD_NORMAL)\n  {\n    return sizeof (scanner_location_t) + 1;\n  }\n\n  return 1;\n} /* parser_get_class_field_info_size */\n\n/**\n * Reverse the field list of a class\n */\nvoid\nparser_reverse_class_fields (parser_context_t *context_p, /**< context */\n                             size_t fields_size) /**< size of consumed memory */\n{\n  uint8_t *data_p = (uint8_t *) parser_malloc (context_p, fields_size);\n  uint8_t *data_end_p = data_p + fields_size;\n  uint8_t *current_p = data_p;\n  bool has_fields = false;\n  parser_stack_iterator_t iterator;\n\n  JERRY_ASSERT (!(context_p->stack_top_uint8 & PARSER_CLASS_FIELD_END));\n\n  parser_stack_iterator_init (context_p, &iterator);\n\n  do\n  {\n    uint8_t class_field_type = parser_stack_iterator_read_uint8 (&iterator);\n    size_t info_size = parser_get_class_field_info_size (class_field_type);\n\n    parser_stack_iterator_read (&iterator, current_p, info_size);\n    parser_stack_iterator_skip (&iterator, info_size);\n    current_p += info_size;\n\n    if (!(class_field_type & PARSER_CLASS_FIELD_STATIC))\n    {\n      has_fields = true;\n      context_p->stack_top_uint8 = class_field_type;\n    }\n  }\n  while (current_p < data_end_p);\n\n  parser_stack_iterator_init (context_p, &iterator);\n  current_p = data_end_p;\n\n  bool has_static_fields = false;\n\n  if (has_fields)\n  {\n    do\n    {\n      uint8_t class_field_type = current_p[-1];\n\n      size_t info_size = parser_get_class_field_info_size (class_field_type);\n\n      if (!(class_field_type & PARSER_CLASS_FIELD_STATIC))\n      {\n        current_p -= info_size;\n        parser_stack_iterator_write (&iterator, current_p, info_size);\n        parser_stack_iterator_skip (&iterator, info_size);\n        continue;\n      }\n\n      if (!has_static_fields)\n      {\n        has_static_fields = true;\n        current_p[-1] |= PARSER_CLASS_FIELD_END;\n      }\n      current_p -= info_size;\n    }\n    while (current_p > data_p);\n  }\n  else\n  {\n    /* All class fields are static. */\n    has_static_fields = true;\n    JERRY_ASSERT (data_end_p[-1] & PARSER_CLASS_FIELD_STATIC);\n    context_p->stack_top_uint8 = data_end_p[-1];\n  }\n\n  if (has_static_fields)\n  {\n    current_p = data_end_p;\n\n    do\n    {\n      uint8_t class_field_type = current_p[-1];\n\n      size_t info_size = parser_get_class_field_info_size (class_field_type);\n      current_p -= info_size;\n\n      if (class_field_type & PARSER_CLASS_FIELD_STATIC)\n      {\n        parser_stack_iterator_write (&iterator, current_p, info_size);\n        parser_stack_iterator_skip (&iterator, info_size);\n      }\n    }\n    while (current_p > data_p);\n  }\n\n  parser_free (data_p, fields_size);\n} /* parser_reverse_class_fields */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ERROR_MESSAGES)\n/**\n * Returns with the string representation of the error\n */\nconst char *\nparser_error_to_string (parser_error_t error) /**< error code */\n{\n  switch (error)\n  {\n    case PARSER_ERR_OUT_OF_MEMORY:\n    {\n      return \"Out of memory.\";\n    }\n    case PARSER_ERR_LITERAL_LIMIT_REACHED:\n    {\n      return \"Maximum number of literals reached.\";\n    }\n    case PARSER_ERR_SCOPE_STACK_LIMIT_REACHED:\n    {\n      return \"Maximum depth of scope stack reached.\";\n    }\n    case PARSER_ERR_ARGUMENT_LIMIT_REACHED:\n    {\n      return \"Maximum number of function arguments reached.\";\n    }\n    case PARSER_ERR_STACK_LIMIT_REACHED:\n    {\n      return \"Maximum function stack size reached.\";\n    }\n    case PARSER_ERR_INVALID_CHARACTER:\n    {\n      return \"Invalid (unexpected) character.\";\n    }\n    case PARSER_ERR_INVALID_OCTAL_DIGIT:\n    {\n      return \"Invalid octal digit.\";\n    }\n    case PARSER_ERR_INVALID_HEX_DIGIT:\n    {\n      return \"Invalid hexadecimal digit.\";\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case PARSER_ERR_INVALID_BIN_DIGIT:\n    {\n      return \"Invalid binary digit.\";\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case PARSER_ERR_INVALID_ESCAPE_SEQUENCE:\n    {\n      return \"Invalid escape sequence.\";\n    }\n    case PARSER_ERR_INVALID_UNICODE_ESCAPE_SEQUENCE:\n    {\n      return \"Invalid unicode escape sequence.\";\n    }\n    case PARSER_ERR_INVALID_IDENTIFIER_START:\n    {\n      return \"Character cannot be start of an identifier.\";\n    }\n    case PARSER_ERR_INVALID_IDENTIFIER_PART:\n    {\n      return \"Character cannot be part of an identifier.\";\n    }\n    case PARSER_ERR_INVALID_KEYWORD:\n    {\n      return \"Escape sequences are not allowed in keywords.\";\n    }\n    case PARSER_ERR_INVALID_NUMBER:\n    {\n      return \"Invalid number.\";\n    }\n    case PARSER_ERR_MISSING_EXPONENT:\n    {\n      return \"Missing exponent part.\";\n    }\n    case PARSER_ERR_INVALID_UNDERSCORE_IN_NUMBER:\n    {\n      return \"Invalid use of underscore character in number literals\";\n    }\n    case PARSER_ERR_IDENTIFIER_AFTER_NUMBER:\n    {\n      return \"Identifier cannot start after a number.\";\n    }\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n    case PARSER_ERR_INVALID_BIGINT:\n    {\n      return \"Number is not a valid BigInt.\";\n    }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    case PARSER_ERR_INVALID_REGEXP:\n    {\n      return \"Invalid regular expression.\";\n    }\n    case PARSER_ERR_UNKNOWN_REGEXP_FLAG:\n    {\n      return \"Unknown regexp flag.\";\n    }\n    case PARSER_ERR_DUPLICATED_REGEXP_FLAG:\n    {\n      return \"Duplicated regexp flag.\";\n    }\n    case PARSER_ERR_UNSUPPORTED_REGEXP:\n    {\n      return \"Regexp is not supported in the selected profile.\";\n    }\n    case PARSER_ERR_IDENTIFIER_TOO_LONG:\n    {\n      return \"Identifier is too long.\";\n    }\n    case PARSER_ERR_STRING_TOO_LONG:\n    {\n      return \"String is too long.\";\n    }\n    case PARSER_ERR_NUMBER_TOO_LONG:\n    {\n      return \"Number is too long.\";\n    }\n    case PARSER_ERR_REGEXP_TOO_LONG:\n    {\n      return \"Regexp is too long.\";\n    }\n    case PARSER_ERR_UNTERMINATED_MULTILINE_COMMENT:\n    {\n      return \"Unterminated multiline comment.\";\n    }\n    case PARSER_ERR_UNTERMINATED_STRING:\n    {\n      return \"Unterminated string literal.\";\n    }\n    case PARSER_ERR_UNTERMINATED_REGEXP:\n    {\n      return \"Unterminated regexp literal.\";\n    }\n    case PARSER_ERR_NEWLINE_NOT_ALLOWED:\n    {\n      return \"Newline is not allowed in strings or regexps.\";\n    }\n    case PARSER_ERR_OCTAL_NUMBER_NOT_ALLOWED:\n    {\n      return \"Octal numbers are not allowed in strict mode.\";\n    }\n    case PARSER_ERR_OCTAL_ESCAPE_NOT_ALLOWED:\n    {\n      return \"Octal escape sequences are not allowed in strict mode.\";\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case PARSER_ERR_TEMPLATE_STR_OCTAL_ESCAPE:\n    {\n      return \"Octal escape sequences are not allowed in template strings.\";\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case PARSER_ERR_STRICT_IDENT_NOT_ALLOWED:\n    {\n      return \"Identifier name is reserved in strict mode.\";\n    }\n    case PARSER_ERR_EVAL_NOT_ALLOWED:\n    {\n      return \"Eval is not allowed to be used here in strict mode.\";\n    }\n    case PARSER_ERR_ARGUMENTS_NOT_ALLOWED:\n    {\n      return \"Arguments is not allowed to be used here in strict mode.\";\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case PARSER_ERR_USE_STRICT_NOT_ALLOWED:\n    {\n      return \"The 'use strict' directive is not allowed for functions with non-simple arguments.\";\n    }\n    case PARSER_ERR_YIELD_NOT_ALLOWED:\n    {\n      return \"Yield expression is not allowed here.\";\n    }\n    case PARSER_ERR_AWAIT_NOT_ALLOWED:\n    {\n      return \"Await expression is not allowed here.\";\n    }\n    case PARSER_ERR_FOR_IN_OF_DECLARATION:\n    {\n      return \"for in-of loop variable declaration may not have an initializer.\";\n    }\n    case PARSER_ERR_FOR_AWAIT_NO_ASYNC:\n    {\n      return \"for-await-of is only allowed inside async functions and generators.\";\n    }\n    case PARSER_ERR_FOR_AWAIT_NO_OF:\n    {\n      return \"only 'of' form is allowed for for-await loops.\";\n    }\n    case PARSER_ERR_DUPLICATED_PROTO:\n    {\n      return \"Duplicate __proto__ fields are not allowed in object literals.\";\n    }\n    case PARSER_ERR_INVALID_LHS_ASSIGNMENT:\n    {\n      return \"Invalid left-hand side in assignment.\";\n    }\n    case PARSER_ERR_INVALID_LHS_POSTFIX_OP:\n    {\n      return \"Invalid left-hand side expression in postfix operation.\";\n    }\n    case PARSER_ERR_INVALID_LHS_FOR_LOOP:\n    {\n      return \"Invalid left-hand-side in for-loop.\";\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case PARSER_ERR_DELETE_IDENT_NOT_ALLOWED:\n    {\n      return \"Deleting identifier is not allowed in strict mode.\";\n    }\n    case PARSER_ERR_EVAL_CANNOT_ASSIGNED:\n    {\n      return \"Eval cannot be assigned to in strict mode.\";\n    }\n    case PARSER_ERR_ARGUMENTS_CANNOT_ASSIGNED:\n    {\n      return \"Arguments cannot be assigned to in strict mode.\";\n    }\n    case PARSER_ERR_WITH_NOT_ALLOWED:\n    {\n      return \"With statement not allowed in strict mode.\";\n    }\n    case PARSER_ERR_MULTIPLE_DEFAULTS_NOT_ALLOWED:\n    {\n      return \"Multiple default cases are not allowed.\";\n    }\n    case PARSER_ERR_DEFAULT_NOT_IN_SWITCH:\n    {\n      return \"Default statement must be in a switch block.\";\n    }\n    case PARSER_ERR_CASE_NOT_IN_SWITCH:\n    {\n      return \"Case statement must be in a switch block.\";\n    }\n    case PARSER_ERR_LEFT_PAREN_EXPECTED:\n    {\n      return \"Expected '(' token.\";\n    }\n    case PARSER_ERR_LEFT_BRACE_EXPECTED:\n    {\n      return \"Expected '{' token.\";\n    }\n    case PARSER_ERR_RIGHT_PAREN_EXPECTED:\n    {\n      return \"Expected ')' token.\";\n    }\n    case PARSER_ERR_RIGHT_SQUARE_EXPECTED:\n    {\n      return \"Expected ']' token.\";\n    }\n    case PARSER_ERR_COLON_EXPECTED:\n    {\n      return \"Expected ':' token.\";\n    }\n    case PARSER_ERR_COLON_FOR_CONDITIONAL_EXPECTED:\n    {\n      return \"Expected ':' token for ?: conditional expression.\";\n    }\n    case PARSER_ERR_SEMICOLON_EXPECTED:\n    {\n      return \"Expected ';' token.\";\n    }\n    case PARSER_ERR_IN_EXPECTED:\n    {\n      return \"Expected 'in' token.\";\n    }\n    case PARSER_ERR_WHILE_EXPECTED:\n    {\n      return \"While expected for do-while loop.\";\n    }\n    case PARSER_ERR_CATCH_FINALLY_EXPECTED:\n    {\n      return \"Catch or finally block expected.\";\n    }\n    case PARSER_ERR_ARRAY_ITEM_SEPARATOR_EXPECTED:\n    {\n      return \"Expected ',' or ']' after an array item.\";\n    }\n    case PARSER_ERR_OBJECT_ITEM_SEPARATOR_EXPECTED:\n    {\n      return \"Expected ',' or '}' after a property definition.\";\n    }\n    case PARSER_ERR_IDENTIFIER_EXPECTED:\n    {\n      return \"Identifier expected.\";\n    }\n    case PARSER_ERR_EXPRESSION_EXPECTED:\n    {\n      return \"Expression expected.\";\n    }\n    case PARSER_ERR_PRIMARY_EXP_EXPECTED:\n    {\n      return \"Primary expression expected.\";\n    }\n    case PARSER_ERR_LEFT_HAND_SIDE_EXP_EXPECTED:\n    {\n      return \"Left-hand-side expression expected.\";\n    }\n    case PARSER_ERR_STATEMENT_EXPECTED:\n    {\n      return \"Statement expected.\";\n    }\n    case PARSER_ERR_PROPERTY_IDENTIFIER_EXPECTED:\n    {\n      return \"Property identifier expected.\";\n    }\n    case PARSER_ERR_ARGUMENT_LIST_EXPECTED:\n    {\n      return \"Expected argument list.\";\n    }\n    case PARSER_ERR_NO_ARGUMENTS_EXPECTED:\n    {\n      return \"Property getters must have no arguments.\";\n    }\n    case PARSER_ERR_ONE_ARGUMENT_EXPECTED:\n    {\n      return \"Property setters must have one argument.\";\n    }\n    case PARSER_ERR_INVALID_EXPRESSION:\n    {\n      return \"Invalid expression.\";\n    }\n    case PARSER_ERR_INVALID_SWITCH:\n    {\n      return \"Invalid switch body.\";\n    }\n    case PARSER_ERR_INVALID_BREAK:\n    {\n      return \"Break statement must be inside a loop or switch.\";\n    }\n    case PARSER_ERR_INVALID_BREAK_LABEL:\n    {\n      return \"Labeled statement targeted by a break not found.\";\n    }\n    case PARSER_ERR_INVALID_CONTINUE:\n    {\n      return \"Continue statement must be inside a loop.\";\n    }\n    case PARSER_ERR_INVALID_CONTINUE_LABEL:\n    {\n      return \"Labeled statement targeted by a continue not found.\";\n    }\n    case PARSER_ERR_INVALID_RETURN:\n    {\n      return \"Return statement must be inside a function body.\";\n    }\n    case PARSER_ERR_INVALID_RIGHT_SQUARE:\n    {\n      return \"Unexpected '}' token.\";\n    }\n    case PARSER_ERR_DUPLICATED_LABEL:\n    {\n      return \"Duplicated label.\";\n    }\n    case PARSER_ERR_OBJECT_PROPERTY_REDEFINED:\n    {\n      return \"Property of object literal redefined.\";\n    }\n    case PARSER_ERR_NON_STRICT_ARG_DEFINITION:\n    {\n      return \"Non-strict argument definition.\";\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case PARSER_ERR_VARIABLE_REDECLARED:\n    {\n      return \"Local variable is redeclared.\";\n    }\n    case PARSER_ERR_LEXICAL_SINGLE_STATEMENT:\n    {\n      return \"Lexical declaration cannot appear in a single-statement context.\";\n    }\n    case PARSER_ERR_LABELLED_FUNC_NOT_IN_BLOCK:\n    {\n      return \"Labelled functions are only allowed inside blocks.\";\n    }\n    case PARSER_ERR_LEXICAL_LET_BINDING:\n    {\n      return \"Let binding cannot appear in let/const declarations.\";\n    }\n    case PARSER_ERR_MISSING_ASSIGN_AFTER_CONST:\n    {\n      return \"Value assignment is expected after a const declaration.\";\n    }\n    case PARSER_ERR_MULTIPLE_CLASS_CONSTRUCTORS:\n    {\n      return \"Multiple constructors are not allowed.\";\n    }\n    case PARSER_ERR_CLASS_CONSTRUCTOR_AS_ACCESSOR:\n    {\n      return \"Class constructor may not be an accessor.\";\n    }\n    case PARSER_ERR_INVALID_CLASS_CONSTRUCTOR:\n    {\n      return \"Class constructor may not be a generator or async function.\";\n    }\n    case PARSER_ERR_CLASS_STATIC_PROTOTYPE:\n    {\n      return \"Classes may not have a static property called 'prototype'.\";\n    }\n    case PARSER_ERR_UNEXPECTED_SUPER_KEYWORD:\n    {\n      return \"Super is not allowed to be used here.\";\n    }\n    case PARSER_ERR_TOO_MANY_CLASS_FIELDS:\n    {\n      return \"Too many computed class fields are declared.\";\n    }\n    case PARSER_ERR_ARGUMENTS_IN_CLASS_FIELD:\n    {\n      return \"In class field declarations 'arguments' is not allowed.\";\n    }\n    case PARSER_ERR_RIGHT_BRACE_EXPECTED:\n    {\n      return \"Expected '}' token.\";\n    }\n    case PARSER_ERR_OF_EXPECTED:\n    {\n      return \"Expected 'of' token.\";\n    }\n    case PARSER_ERR_ASSIGNMENT_EXPECTED:\n    {\n      return \"Unexpected arrow function or yield expression (parentheses around the expression may help).\";\n    }\n    case PARSER_ERR_DUPLICATED_ARGUMENT_NAMES:\n    {\n      return \"Duplicated function argument names are not allowed here.\";\n    }\n    case PARSER_ERR_INVALID_DESTRUCTURING_PATTERN:\n    {\n      return \"Invalid destructuring assignment target.\";\n    }\n    case PARSER_ERR_ILLEGAL_PROPERTY_IN_DECLARATION:\n    {\n      return \"Illegal property in declaration context.\";\n    }\n    case PARSER_ERR_INVALID_EXPONENTIATION:\n    {\n      return \"Left operand of ** operator cannot be unary expression.\";\n    }\n    case PARSER_ERR_INVALID_NULLISH_COALESCING:\n    {\n      return \"Cannot chain nullish with logical AND or OR.\";\n    }\n    case PARSER_ERR_FORMAL_PARAM_AFTER_REST_PARAMETER:\n    {\n      return \"Rest parameter must be the last formal parameter.\";\n    }\n    case PARSER_ERR_SETTER_REST_PARAMETER:\n    {\n      return \"Setter function argument must not be a rest parameter.\";\n    }\n    case PARSER_ERR_REST_PARAMETER_DEFAULT_INITIALIZER:\n    {\n      return \"Rest parameter may not have a default initializer.\";\n    }\n    case PARSER_ERR_NEW_TARGET_EXPECTED:\n    {\n      return \"Expected new.target expression.\";\n    }\n    case PARSER_ERR_NEW_TARGET_NOT_ALLOWED:\n    {\n      return \"new.target expression is not allowed here.\";\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    case PARSER_ERR_FILE_NOT_FOUND:\n    {\n      return \"Requested module not found.\";\n    }\n    case PARSER_ERR_FROM_EXPECTED:\n    {\n      return \"Expected 'from' token.\";\n    }\n    case PARSER_ERR_FROM_COMMA_EXPECTED:\n    {\n      return \"Expected 'from' or ',' token.\";\n    }\n    case PARSER_ERR_AS_EXPECTED:\n    {\n      return \"Expected 'as' token.\";\n    }\n    case PARSER_ERR_STRING_EXPECTED:\n    {\n      return \"Expected a string literal.\";\n    }\n    case PARSER_ERR_MODULE_UNEXPECTED:\n    {\n      return \"Unexpected import or export statement.\";\n    }\n    case PARSER_ERR_LEFT_BRACE_MULTIPLY_EXPECTED:\n    {\n      return \"Expected '{' or '*' token.\";\n    }\n    case PARSER_ERR_LEFT_BRACE_MULTIPLY_LITERAL_EXPECTED:\n    {\n      return \"Expected '{' or '*' or literal token.\";\n    }\n    case PARSER_ERR_RIGHT_BRACE_COMMA_EXPECTED:\n    {\n      return \"Expected '}' or ',' token.\";\n    }\n    case PARSER_ERR_DUPLICATED_EXPORT_IDENTIFIER:\n    {\n      return \"Duplicate exported identifier.\";\n    }\n    case PARSER_ERR_DUPLICATED_IMPORT_BINDING:\n    {\n      return \"Duplicated imported binding name.\";\n    }\n    case PARSER_ERR_EXPORT_NOT_DEFINED:\n    {\n      return \"Export not defined in module.\";\n    }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n    default:\n    {\n      JERRY_ASSERT (error == PARSER_ERR_NO_ERROR);\n      return \"No error.\";\n    }\n  }\n} /* parser_error_to_string */\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_PARSER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"debugger.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-literal-storage.h\"\n#include \"ecma-module.h\"\n#include \"jcontext.h\"\n#include \"js-parser-internal.h\"\n\n#if ENABLED (JERRY_PARSER)\n\nJERRY_STATIC_ASSERT ((int) ECMA_PARSE_STRICT_MODE == (int) PARSER_IS_STRICT,\n                     ecma_parse_strict_mode_must_be_equal_to_parser_is_strict);\n\n#if ENABLED (JERRY_ESNEXT)\nJERRY_STATIC_ASSERT (PARSER_SAVE_STATUS_FLAGS (PARSER_ALLOW_SUPER) == 0x1,\n                     incorrect_saving_of_ecma_parse_allow_super);\nJERRY_STATIC_ASSERT (PARSER_RESTORE_STATUS_FLAGS (ECMA_PARSE_ALLOW_SUPER) == PARSER_ALLOW_SUPER,\n                     incorrect_restoring_of_ecma_parse_allow_super);\n\nJERRY_STATIC_ASSERT (PARSER_RESTORE_STATUS_FLAGS (ECMA_PARSE_FUNCTION_CONTEXT) == 0,\n                     ecma_parse_function_context_must_not_be_transformed);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_parser Parser\n * @{\n */\n\n/**\n * Compute real literal indicies.\n *\n * @return length of the prefix opcodes\n */\nstatic void\nparser_compute_indicies (parser_context_t *context_p, /**< context */\n                         uint16_t *ident_end, /**< end of the identifier group */\n                         uint16_t *const_literal_end) /**< end of the const literal group */\n{\n  parser_list_iterator_t literal_iterator;\n  lexer_literal_t *literal_p;\n\n  uint16_t ident_count = 0;\n  uint16_t const_literal_count = 0;\n\n#if ENABLED (JERRY_RESOURCE_NAME)\n  /* Resource name will be stored as the last const literal. */\n  if (JERRY_UNLIKELY (context_p->literal_count >= PARSER_MAXIMUM_NUMBER_OF_LITERALS))\n  {\n    parser_raise_error (context_p, PARSER_ERR_LITERAL_LIMIT_REACHED);\n  }\n\n  const_literal_count++;\n  context_p->literal_count++;\n#endif /* ENABLED (JERRY_RESOURCE_NAME) */\n\n  uint16_t ident_index;\n  uint16_t const_literal_index;\n  uint16_t literal_index;\n\n  /* First phase: count the number of items in each group. */\n  parser_list_iterator_init (&context_p->literal_pool, &literal_iterator);\n  while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator)))\n  {\n    switch (literal_p->type)\n    {\n      case LEXER_IDENT_LITERAL:\n      {\n        if (literal_p->status_flags & LEXER_FLAG_USED)\n        {\n          ident_count++;\n          break;\n        }\n        else if (!(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR))\n        {\n          jmem_heap_free_block ((void *) literal_p->u.char_p, literal_p->prop.length);\n          /* This literal should not be freed even if an error is encountered later. */\n          literal_p->status_flags |= LEXER_FLAG_SOURCE_PTR;\n        }\n        continue;\n      }\n      case LEXER_STRING_LITERAL:\n      {\n        const_literal_count++;\n        break;\n      }\n      case LEXER_NUMBER_LITERAL:\n      {\n        const_literal_count++;\n        continue;\n      }\n      case LEXER_FUNCTION_LITERAL:\n      case LEXER_REGEXP_LITERAL:\n      {\n        continue;\n      }\n      default:\n      {\n        JERRY_ASSERT (literal_p->type == LEXER_UNUSED_LITERAL);\n        continue;\n      }\n    }\n\n    const uint8_t *char_p = literal_p->u.char_p;\n    uint32_t status_flags = context_p->status_flags;\n\n    if ((literal_p->status_flags & LEXER_FLAG_SOURCE_PTR)\n        && literal_p->prop.length < 0xfff)\n    {\n      size_t bytes_to_end = (size_t) (context_p->source_end_p - char_p);\n\n      if (bytes_to_end < 0xfffff)\n      {\n        literal_p->u.source_data = ((uint32_t) bytes_to_end) | (((uint32_t) literal_p->prop.length) << 20);\n        literal_p->status_flags |= LEXER_FLAG_LATE_INIT;\n        status_flags |= PARSER_HAS_LATE_LIT_INIT;\n        context_p->status_flags = status_flags;\n        char_p = NULL;\n      }\n    }\n\n    if (char_p != NULL)\n    {\n      literal_p->u.value = ecma_find_or_create_literal_string (char_p,\n                                                               literal_p->prop.length);\n\n      if (!(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR))\n      {\n        jmem_heap_free_block ((void *) char_p, literal_p->prop.length);\n        /* This literal should not be freed even if an error is encountered later. */\n        literal_p->status_flags |= LEXER_FLAG_SOURCE_PTR;\n      }\n    }\n  }\n\n  ident_index = context_p->register_count;\n  const_literal_index = (uint16_t) (ident_index + ident_count);\n  literal_index = (uint16_t) (const_literal_index + const_literal_count);\n\n  /* Second phase: Assign an index to each literal. */\n  parser_list_iterator_init (&context_p->literal_pool, &literal_iterator);\n\n  while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator)))\n  {\n    switch (literal_p->type)\n    {\n      case LEXER_IDENT_LITERAL:\n      {\n        if (literal_p->status_flags & LEXER_FLAG_USED)\n        {\n          literal_p->prop.index = ident_index;\n          ident_index++;\n        }\n        break;\n      }\n      case LEXER_STRING_LITERAL:\n      case LEXER_NUMBER_LITERAL:\n      {\n        JERRY_ASSERT ((literal_p->status_flags & ~(LEXER_FLAG_SOURCE_PTR | LEXER_FLAG_LATE_INIT)) == 0);\n        literal_p->prop.index = const_literal_index;\n        const_literal_index++;\n        break;\n      }\n      case LEXER_FUNCTION_LITERAL:\n      case LEXER_REGEXP_LITERAL:\n      {\n        JERRY_ASSERT (literal_p->status_flags == 0);\n\n        literal_p->prop.index = literal_index;\n        literal_index++;\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (literal_p->type == LEXER_UNUSED_LITERAL\n                      && literal_p->status_flags == LEXER_FLAG_FUNCTION_ARGUMENT);\n        break;\n      }\n    }\n  }\n\n#if ENABLED (JERRY_RESOURCE_NAME)\n  /* Resource name will be stored as the last const literal. */\n  const_literal_index++;\n#endif /* ENABLED (JERRY_RESOURCE_NAME) */\n\n  JERRY_ASSERT (ident_index == context_p->register_count + ident_count);\n  JERRY_ASSERT (const_literal_index == ident_index + const_literal_count);\n  JERRY_ASSERT (literal_index <= context_p->register_count + context_p->literal_count);\n\n  context_p->literal_count = literal_index;\n\n  *ident_end = ident_index;\n  *const_literal_end = const_literal_index;\n} /* parser_compute_indicies */\n\n/**\n * Initialize literal pool.\n */\nstatic void\nparser_init_literal_pool (parser_context_t *context_p, /**< context */\n                          ecma_value_t *literal_pool_p) /**< start of literal pool */\n{\n  parser_list_iterator_t literal_iterator;\n  lexer_literal_t *literal_p;\n\n  parser_list_iterator_init (&context_p->literal_pool, &literal_iterator);\n\n  while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator)))\n  {\n    switch (literal_p->type)\n    {\n      case LEXER_IDENT_LITERAL:\n      {\n        if (!(literal_p->status_flags & LEXER_FLAG_USED))\n        {\n          break;\n        }\n        /* FALLTHRU */\n      }\n      case LEXER_STRING_LITERAL:\n      {\n        ecma_value_t lit_value = literal_p->u.value;\n\n        JERRY_ASSERT (literal_p->prop.index >= context_p->register_count);\n        literal_pool_p[literal_p->prop.index] = lit_value;\n        break;\n      }\n      case LEXER_NUMBER_LITERAL:\n      {\n        JERRY_ASSERT (literal_p->prop.index >= context_p->register_count);\n\n        literal_pool_p[literal_p->prop.index] = literal_p->u.value;\n        break;\n      }\n      case LEXER_FUNCTION_LITERAL:\n      case LEXER_REGEXP_LITERAL:\n      {\n        JERRY_ASSERT (literal_p->prop.index >= context_p->register_count);\n\n        ECMA_SET_INTERNAL_VALUE_POINTER (literal_pool_p[literal_p->prop.index],\n                                         literal_p->u.bytecode_p);\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (literal_p->type == LEXER_UNUSED_LITERAL);\n        break;\n      }\n    }\n  }\n} /* parser_init_literal_pool */\n\n/*\n * During byte code post processing certain bytes are not\n * copied into the final byte code buffer. For example, if\n * one byte is enough for encoding a literal index, the\n * second byte is not copied. However, when a byte is skipped,\n * the offsets of those branches which crosses (jumps over)\n * that byte code should also be decreased by one. Instead\n * of finding these jumps every time when a byte is skipped,\n * all branch offset updates are computed in one step.\n *\n * Branch offset mapping example:\n *\n * Let's assume that each parser_mem_page of the byte_code\n * buffer is 8 bytes long and only 4 bytes are kept for a\n * given page:\n *\n * +---+---+---+---+---+---+---+---+\n * | X | 1 | 2 | 3 | X | 4 | X | X |\n * +---+---+---+---+---+---+---+---+\n *\n * X marks those bytes which are removed. The resulting\n * offset mapping is the following:\n *\n * +---+---+---+---+---+---+---+---+\n * | 0 | 1 | 2 | 3 | 3 | 4 | 4 | 4 |\n * +---+---+---+---+---+---+---+---+\n *\n * Each X is simply replaced by the index of the previous\n * index starting from zero. This shows the number of\n * copied bytes before a given byte including the byte\n * itself. The last byte always shows the number of bytes\n * copied from this page.\n *\n * This mapping allows recomputing all branch targets,\n * since mapping[to] - mapping[from] is the new argument\n * for forward branches. As for backward branches, the\n * equation is reversed to mapping[from] - mapping[to].\n *\n * The mapping is relative to one page, so distance\n * computation affecting multiple pages requires a loop.\n * We should also note that only argument bytes can\n * be skipped, so removed bytes cannot be targeted by\n * branches. Valid branches always target instruction\n * starts only.\n */\n\n/**\n * Recompute the argument of a forward branch.\n *\n * @return the new distance\n */\nstatic size_t\nparser_update_forward_branch (parser_mem_page_t *page_p, /**< current page */\n                              size_t full_distance, /**< full distance */\n                              uint8_t bytes_copied_before_jump) /**< bytes copied before jump */\n{\n  size_t new_distance = 0;\n\n  while (full_distance > PARSER_CBC_STREAM_PAGE_SIZE)\n  {\n    new_distance += page_p->bytes[PARSER_CBC_STREAM_PAGE_SIZE - 1] & CBC_LOWER_SEVEN_BIT_MASK;\n    full_distance -= PARSER_CBC_STREAM_PAGE_SIZE;\n    page_p = page_p->next_p;\n  }\n\n  new_distance += page_p->bytes[full_distance - 1] & CBC_LOWER_SEVEN_BIT_MASK;\n  return new_distance - bytes_copied_before_jump;\n} /* parser_update_forward_branch */\n\n/**\n * Recompute the argument of a backward branch.\n *\n * @return the new distance\n */\nstatic size_t\nparser_update_backward_branch (parser_mem_page_t *page_p, /**< current page */\n                               size_t full_distance, /**< full distance */\n                               uint8_t bytes_copied_before_jump) /**< bytes copied before jump */\n{\n  size_t new_distance = bytes_copied_before_jump;\n\n  while (full_distance >= PARSER_CBC_STREAM_PAGE_SIZE)\n  {\n    JERRY_ASSERT (page_p != NULL);\n    new_distance += page_p->bytes[PARSER_CBC_STREAM_PAGE_SIZE - 1] & CBC_LOWER_SEVEN_BIT_MASK;\n    full_distance -= PARSER_CBC_STREAM_PAGE_SIZE;\n    page_p = page_p->next_p;\n  }\n\n  if (full_distance > 0)\n  {\n    size_t offset = PARSER_CBC_STREAM_PAGE_SIZE - full_distance;\n\n    JERRY_ASSERT (page_p != NULL);\n\n    new_distance += page_p->bytes[PARSER_CBC_STREAM_PAGE_SIZE - 1] & CBC_LOWER_SEVEN_BIT_MASK;\n    new_distance -= page_p->bytes[offset - 1] & CBC_LOWER_SEVEN_BIT_MASK;\n  }\n\n  return new_distance;\n} /* parser_update_backward_branch */\n\n/**\n * Update targets of all branches in one step.\n */\nstatic void\nparse_update_branches (parser_context_t *context_p, /**< context */\n                       uint8_t *byte_code_p) /**< byte code */\n{\n  parser_mem_page_t *page_p = context_p->byte_code.first_p;\n  parser_mem_page_t *prev_page_p = NULL;\n  parser_mem_page_t *last_page_p = context_p->byte_code.last_p;\n  size_t last_position = context_p->byte_code.last_position;\n  size_t offset = 0;\n  size_t bytes_copied = 0;\n\n  if (last_position >= PARSER_CBC_STREAM_PAGE_SIZE)\n  {\n    last_page_p = NULL;\n    last_position = 0;\n  }\n\n  while (page_p != last_page_p || offset < last_position)\n  {\n    /* Branch instructions are marked to improve search speed. */\n    if (page_p->bytes[offset] & CBC_HIGHEST_BIT_MASK)\n    {\n      uint8_t *bytes_p = byte_code_p + bytes_copied;\n      uint8_t flags;\n      uint8_t bytes_copied_before_jump = 0;\n      size_t branch_argument_length;\n      size_t target_distance;\n      size_t length;\n\n      if (offset > 0)\n      {\n        bytes_copied_before_jump = page_p->bytes[offset - 1] & CBC_LOWER_SEVEN_BIT_MASK;\n      }\n      bytes_p += bytes_copied_before_jump;\n\n      if (*bytes_p == CBC_EXT_OPCODE)\n      {\n        bytes_p++;\n        flags = cbc_ext_flags[*bytes_p];\n      }\n      else\n      {\n        flags = cbc_flags[*bytes_p];\n      }\n\n      JERRY_ASSERT (flags & CBC_HAS_BRANCH_ARG);\n      branch_argument_length = CBC_BRANCH_OFFSET_LENGTH (*bytes_p);\n      bytes_p++;\n\n      /* Decoding target. */\n      length = branch_argument_length;\n      target_distance = 0;\n      do\n      {\n        target_distance = (target_distance << 8) | *bytes_p;\n        bytes_p++;\n      }\n      while (--length > 0);\n\n      if (CBC_BRANCH_IS_FORWARD (flags))\n      {\n        /* Branch target was not set. */\n        JERRY_ASSERT (target_distance > 0);\n\n        target_distance = parser_update_forward_branch (page_p,\n                                                        offset + target_distance,\n                                                        bytes_copied_before_jump);\n      }\n      else\n      {\n        if (target_distance < offset)\n        {\n          uint8_t bytes_copied_before_target = page_p->bytes[offset - target_distance - 1];\n          bytes_copied_before_target = bytes_copied_before_target & CBC_LOWER_SEVEN_BIT_MASK;\n\n          target_distance = (size_t) (bytes_copied_before_jump - bytes_copied_before_target);\n        }\n        else if (target_distance == offset)\n        {\n          target_distance = bytes_copied_before_jump;\n        }\n        else\n        {\n          target_distance = parser_update_backward_branch (prev_page_p,\n                                                           target_distance - offset,\n                                                           bytes_copied_before_jump);\n        }\n      }\n\n      /* Encoding target again. */\n      do\n      {\n        bytes_p--;\n        *bytes_p = (uint8_t) (target_distance & 0xff);\n        target_distance >>= 8;\n      }\n      while (--branch_argument_length > 0);\n    }\n\n    offset++;\n    if (offset >= PARSER_CBC_STREAM_PAGE_SIZE)\n    {\n      parser_mem_page_t *next_p = page_p->next_p;\n\n      /* We reverse the pages before the current page. */\n      page_p->next_p = prev_page_p;\n      prev_page_p = page_p;\n\n      bytes_copied += page_p->bytes[PARSER_CBC_STREAM_PAGE_SIZE - 1] & CBC_LOWER_SEVEN_BIT_MASK;\n      page_p = next_p;\n      offset = 0;\n    }\n  }\n\n  /* After this point the pages of the byte code stream are\n   * not used anymore. However, they needs to be freed during\n   * cleanup, so the first and last pointers of the stream\n   * descriptor are reversed as well. */\n  if (last_page_p != NULL)\n  {\n    JERRY_ASSERT (last_page_p == context_p->byte_code.last_p);\n    last_page_p->next_p = prev_page_p;\n  }\n  else\n  {\n    last_page_p = context_p->byte_code.last_p;\n  }\n\n  context_p->byte_code.last_p = context_p->byte_code.first_p;\n  context_p->byte_code.first_p = last_page_p;\n} /* parse_update_branches */\n\n#if ENABLED (JERRY_DEBUGGER)\n\n/**\n * Send current breakpoint list.\n */\nstatic void\nparser_send_breakpoints (parser_context_t *context_p, /**< context */\n                         jerry_debugger_header_type_t type) /**< message type */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n  JERRY_ASSERT (context_p->breakpoint_info_count > 0);\n\n  jerry_debugger_send_data (type,\n                            context_p->breakpoint_info,\n                            context_p->breakpoint_info_count * sizeof (parser_breakpoint_info_t));\n\n  context_p->breakpoint_info_count = 0;\n} /* parser_send_breakpoints */\n\n/**\n * Append a breakpoint info.\n */\nvoid\nparser_append_breakpoint_info (parser_context_t *context_p, /**< context */\n                               jerry_debugger_header_type_t type, /**< message type */\n                               uint32_t value) /**< line or offset of the breakpoint */\n{\n  JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n  context_p->status_flags |= PARSER_DEBUGGER_BREAKPOINT_APPENDED;\n\n  if (context_p->breakpoint_info_count >= JERRY_DEBUGGER_SEND_MAX (parser_breakpoint_info_t))\n  {\n    parser_send_breakpoints (context_p, type);\n  }\n\n  context_p->breakpoint_info[context_p->breakpoint_info_count].value = value;\n  context_p->breakpoint_info_count = (uint16_t) (context_p->breakpoint_info_count + 1);\n} /* parser_append_breakpoint_info */\n\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n/**\n * Forward iterator: move to the next byte code\n *\n * @param page_p page\n * @param offset offset\n */\n#define PARSER_NEXT_BYTE(page_p, offset) \\\n  do { \\\n    if (++(offset) >= PARSER_CBC_STREAM_PAGE_SIZE) \\\n    { \\\n      offset = 0; \\\n      page_p = page_p->next_p; \\\n    } \\\n  } while (0)\n\n/**\n * Forward iterator: move to the next byte code. Also updates the offset of the previous byte code.\n *\n * @param page_p page\n * @param offset offset\n * @param real_offset real offset\n */\n#define PARSER_NEXT_BYTE_UPDATE(page_p, offset, real_offset) \\\n  do { \\\n    page_p->bytes[offset] = real_offset; \\\n    if (++(offset) >= PARSER_CBC_STREAM_PAGE_SIZE) \\\n    { \\\n      offset = 0; \\\n      real_offset = 0; \\\n      page_p = page_p->next_p; \\\n    } \\\n  } while (0)\n\n/**\n * Post processing main function.\n *\n * @return compiled code\n */\nstatic ecma_compiled_code_t *\nparser_post_processing (parser_context_t *context_p) /**< context */\n{\n  uint16_t literal_one_byte_limit;\n  uint16_t ident_end;\n  uint16_t const_literal_end;\n  parser_mem_page_t *page_p;\n  parser_mem_page_t *last_page_p;\n  size_t last_position;\n  size_t offset;\n  size_t length;\n  size_t literal_length;\n  size_t total_size;\n  uint8_t real_offset;\n  uint8_t *byte_code_p;\n  bool needs_uint16_arguments;\n  cbc_opcode_t last_opcode = CBC_EXT_OPCODE;\n  ecma_compiled_code_t *compiled_code_p;\n  ecma_value_t *literal_pool_p;\n  uint8_t *dst_p;\n\n#if ENABLED (JERRY_ESNEXT)\n  if ((context_p->status_flags & (PARSER_IS_FUNCTION | PARSER_LEXICAL_BLOCK_NEEDED))\n      == (PARSER_IS_FUNCTION | PARSER_LEXICAL_BLOCK_NEEDED))\n  {\n    PARSER_MINUS_EQUAL_U16 (context_p->stack_depth, PARSER_BLOCK_CONTEXT_STACK_ALLOCATION);\n#ifndef JERRY_NDEBUG\n    PARSER_MINUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_BLOCK_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n    context_p->status_flags &= (uint32_t) ~PARSER_LEXICAL_BLOCK_NEEDED;\n\n    parser_emit_cbc (context_p, CBC_CONTEXT_END);\n\n    parser_branch_t branch;\n    parser_stack_pop (context_p, &branch, sizeof (parser_branch_t));\n    parser_set_branch_to_current_position (context_p, &branch);\n\n    JERRY_ASSERT (!(context_p->status_flags & PARSER_NO_END_LABEL));\n  }\n\n  if (PARSER_IS_NORMAL_ASYNC_FUNCTION (context_p->status_flags))\n  {\n    PARSER_MINUS_EQUAL_U16 (context_p->stack_depth, PARSER_TRY_CONTEXT_STACK_ALLOCATION);\n#ifndef JERRY_NDEBUG\n    PARSER_MINUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_TRY_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n\n    if (context_p->stack_limit < PARSER_FINALLY_CONTEXT_STACK_ALLOCATION)\n    {\n      context_p->stack_limit = PARSER_FINALLY_CONTEXT_STACK_ALLOCATION;\n    }\n\n    parser_branch_t branch;\n\n    parser_stack_pop (context_p, &branch, sizeof (parser_branch_t));\n    parser_set_branch_to_current_position (context_p, &branch);\n\n    JERRY_ASSERT (!(context_p->status_flags & PARSER_NO_END_LABEL));\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (context_p->stack_depth == 0);\n#ifndef JERRY_NDEBUG\n  JERRY_ASSERT (context_p->context_stack_depth == 0);\n#endif /* !JERRY_NDEBUG */\n\n  if ((size_t) context_p->stack_limit + (size_t) context_p->register_count > PARSER_MAXIMUM_STACK_LIMIT)\n  {\n    parser_raise_error (context_p, PARSER_ERR_STACK_LIMIT_REACHED);\n  }\n\n  JERRY_ASSERT (context_p->literal_count <= PARSER_MAXIMUM_NUMBER_OF_LITERALS);\n\n#if ENABLED (JERRY_DEBUGGER)\n  if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      && !(context_p->status_flags & PARSER_DEBUGGER_BREAKPOINT_APPENDED))\n  {\n    /* Always provide at least one breakpoint. */\n    parser_emit_cbc (context_p, CBC_BREAKPOINT_DISABLED);\n    parser_flush_cbc (context_p);\n\n    parser_append_breakpoint_info (context_p, JERRY_DEBUGGER_BREAKPOINT_LIST, context_p->token.line);\n\n    context_p->last_breakpoint_line = context_p->token.line;\n  }\n\n  if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      && context_p->breakpoint_info_count > 0)\n  {\n    parser_send_breakpoints (context_p, JERRY_DEBUGGER_BREAKPOINT_LIST);\n    JERRY_ASSERT (context_p->breakpoint_info_count == 0);\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  parser_compute_indicies (context_p, &ident_end, &const_literal_end);\n\n  if (context_p->literal_count <= CBC_MAXIMUM_SMALL_VALUE)\n  {\n    literal_one_byte_limit = CBC_MAXIMUM_BYTE_VALUE - 1;\n  }\n  else\n  {\n    literal_one_byte_limit = CBC_LOWER_SEVEN_BIT_MASK;\n  }\n\n  last_page_p = context_p->byte_code.last_p;\n  last_position = context_p->byte_code.last_position;\n\n  if (last_position >= PARSER_CBC_STREAM_PAGE_SIZE)\n  {\n    last_page_p = NULL;\n    last_position = 0;\n  }\n\n  page_p = context_p->byte_code.first_p;\n  offset = 0;\n  length = 0;\n\n  while (page_p != last_page_p || offset < last_position)\n  {\n    uint8_t *opcode_p;\n    uint8_t flags;\n    size_t branch_offset_length;\n\n    opcode_p = page_p->bytes + offset;\n    last_opcode = (cbc_opcode_t) (*opcode_p);\n    PARSER_NEXT_BYTE (page_p, offset);\n    branch_offset_length = CBC_BRANCH_OFFSET_LENGTH (last_opcode);\n    flags = cbc_flags[last_opcode];\n    length++;\n\n    switch (last_opcode)\n    {\n      case CBC_EXT_OPCODE:\n      {\n        cbc_ext_opcode_t ext_opcode;\n\n        ext_opcode = (cbc_ext_opcode_t) page_p->bytes[offset];\n        branch_offset_length = CBC_BRANCH_OFFSET_LENGTH (ext_opcode);\n        flags = cbc_ext_flags[ext_opcode];\n        PARSER_NEXT_BYTE (page_p, offset);\n        length++;\n\n#if ENABLED (JERRY_LINE_INFO)\n        if (ext_opcode == CBC_EXT_LINE)\n        {\n          uint8_t last_byte = 0;\n\n          do\n          {\n            last_byte = page_p->bytes[offset];\n            PARSER_NEXT_BYTE (page_p, offset);\n            length++;\n          }\n          while (last_byte & CBC_HIGHEST_BIT_MASK);\n\n          continue;\n        }\n#endif /* ENABLED (JERRY_LINE_INFO) */\n        break;\n      }\n      case CBC_POST_DECR:\n      {\n        *opcode_p = CBC_PRE_DECR;\n        break;\n      }\n      case CBC_POST_INCR:\n      {\n        *opcode_p = CBC_PRE_INCR;\n        break;\n      }\n      case CBC_POST_DECR_IDENT:\n      {\n        *opcode_p = CBC_PRE_DECR_IDENT;\n        break;\n      }\n      case CBC_POST_INCR_IDENT:\n      {\n        *opcode_p = CBC_PRE_INCR_IDENT;\n        break;\n      }\n      default:\n      {\n        break;\n      }\n    }\n\n    while (flags & (CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2))\n    {\n      uint8_t *first_byte = page_p->bytes + offset;\n      uint32_t literal_index = *first_byte;\n\n      PARSER_NEXT_BYTE (page_p, offset);\n      length++;\n\n      literal_index |= ((uint32_t) page_p->bytes[offset]) << 8;\n\n      if (literal_index >= PARSER_REGISTER_START)\n      {\n        literal_index -= PARSER_REGISTER_START;\n      }\n      else\n      {\n        literal_index = (PARSER_GET_LITERAL (literal_index))->prop.index;\n      }\n\n      if (literal_index <= literal_one_byte_limit)\n      {\n        *first_byte = (uint8_t) literal_index;\n      }\n      else\n      {\n        if (context_p->literal_count <= CBC_MAXIMUM_SMALL_VALUE)\n        {\n          JERRY_ASSERT (literal_index <= CBC_MAXIMUM_SMALL_VALUE);\n          *first_byte = CBC_MAXIMUM_BYTE_VALUE;\n          page_p->bytes[offset] = (uint8_t) (literal_index - CBC_MAXIMUM_BYTE_VALUE);\n          length++;\n        }\n        else\n        {\n          JERRY_ASSERT (literal_index <= CBC_MAXIMUM_FULL_VALUE);\n          *first_byte = (uint8_t) ((literal_index >> 8) | CBC_HIGHEST_BIT_MASK);\n          page_p->bytes[offset] = (uint8_t) (literal_index & 0xff);\n          length++;\n        }\n      }\n      PARSER_NEXT_BYTE (page_p, offset);\n\n      if (flags & CBC_HAS_LITERAL_ARG2)\n      {\n        if (flags & CBC_HAS_LITERAL_ARG)\n        {\n          flags = CBC_HAS_LITERAL_ARG;\n        }\n        else\n        {\n          flags = CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2;\n        }\n      }\n      else\n      {\n        break;\n      }\n    }\n\n    if (flags & CBC_HAS_BYTE_ARG)\n    {\n      /* This argument will be copied without modification. */\n      PARSER_NEXT_BYTE (page_p, offset);\n      length++;\n    }\n\n    if (flags & CBC_HAS_BRANCH_ARG)\n    {\n      bool prefix_zero = true;\n\n      /* The leading zeroes are dropped from the stream.\n       * Although dropping these zeroes for backward\n       * branches are unnecessary, we use the same\n       * code path for simplicity. */\n      JERRY_ASSERT (branch_offset_length > 0 && branch_offset_length <= 3);\n\n      while (--branch_offset_length > 0)\n      {\n        uint8_t byte = page_p->bytes[offset];\n        if (byte > 0 || !prefix_zero)\n        {\n          prefix_zero = false;\n          length++;\n        }\n        else\n        {\n          JERRY_ASSERT (CBC_BRANCH_IS_FORWARD (flags));\n        }\n        PARSER_NEXT_BYTE (page_p, offset);\n      }\n\n      if (last_opcode == (cbc_opcode_t) (CBC_JUMP_FORWARD + PARSER_MAX_BRANCH_LENGTH - 1)\n          && prefix_zero\n          && page_p->bytes[offset] == PARSER_MAX_BRANCH_LENGTH + 1)\n      {\n        /* Uncoditional jumps which jump right after the instruction\n         * are effectively NOPs. These jumps are removed from the\n         * stream. The 1 byte long CBC_JUMP_FORWARD form marks these\n         * instructions, since this form is constructed during post\n         * processing and cannot be emitted directly. */\n        *opcode_p = CBC_JUMP_FORWARD;\n        length--;\n      }\n      else\n      {\n        /* Other last bytes are always copied. */\n        length++;\n      }\n\n      PARSER_NEXT_BYTE (page_p, offset);\n    }\n  }\n\n  if (!(context_p->status_flags & PARSER_NO_END_LABEL)\n      || !(PARSER_OPCODE_IS_RETURN (last_opcode)))\n  {\n    context_p->status_flags &= (uint32_t) ~PARSER_NO_END_LABEL;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (PARSER_IS_NORMAL_ASYNC_FUNCTION (context_p->status_flags))\n    {\n      length++;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    length++;\n  }\n\n  needs_uint16_arguments = false;\n  total_size = sizeof (cbc_uint8_arguments_t);\n\n  if (context_p->stack_limit > CBC_MAXIMUM_BYTE_VALUE\n      || context_p->register_count > CBC_MAXIMUM_BYTE_VALUE\n      || context_p->literal_count > CBC_MAXIMUM_BYTE_VALUE)\n  {\n    needs_uint16_arguments = true;\n    total_size = sizeof (cbc_uint16_arguments_t);\n  }\n\n  literal_length = (size_t) (context_p->literal_count - context_p->register_count) * sizeof (ecma_value_t);\n\n  total_size += literal_length + length;\n\n  if (PARSER_NEEDS_MAPPED_ARGUMENTS (context_p->status_flags))\n  {\n    total_size += context_p->argument_count * sizeof (ecma_value_t);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  /* function.name */\n  if (!(context_p->status_flags & PARSER_CLASS_CONSTRUCTOR))\n  {\n    total_size += sizeof (ecma_value_t);\n  }\n\n  if (context_p->argument_length != UINT16_MAX)\n  {\n    total_size += sizeof (ecma_value_t);\n  }\n\n  if (context_p->tagged_template_literal_cp != JMEM_CP_NULL)\n  {\n    total_size += sizeof (ecma_value_t);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  total_size = JERRY_ALIGNUP (total_size, JMEM_ALIGNMENT);\n\n  compiled_code_p = (ecma_compiled_code_t *) parser_malloc (context_p, total_size);\n\n#if ENABLED (JERRY_SNAPSHOT_SAVE) || ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  // Avoid getting junk bytes\n  memset (compiled_code_p, 0, total_size);\n#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) || ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_MEM_STATS)\n  jmem_stats_allocate_byte_code_bytes (total_size);\n#endif /* ENABLED (JERRY_MEM_STATS) */\n\n  byte_code_p = (uint8_t *) compiled_code_p;\n  compiled_code_p->size = (uint16_t) (total_size >> JMEM_ALIGNMENT_LOG);\n  compiled_code_p->refs = 1;\n  compiled_code_p->status_flags = 0;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (context_p->status_flags & PARSER_FUNCTION_HAS_REST_PARAM)\n  {\n    JERRY_ASSERT (context_p->argument_count > 0);\n    context_p->argument_count--;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (needs_uint16_arguments)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) compiled_code_p;\n\n    args_p->stack_limit = context_p->stack_limit;\n    args_p->argument_end = context_p->argument_count;\n    args_p->register_end = context_p->register_count;\n    args_p->ident_end = ident_end;\n    args_p->const_literal_end = const_literal_end;\n    args_p->literal_end = context_p->literal_count;\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    ECMA_SET_INTERNAL_VALUE_POINTER (args_p->realm_value, JERRY_CONTEXT (global_object_p));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n    compiled_code_p->status_flags |= CBC_CODE_FLAGS_UINT16_ARGUMENTS;\n    byte_code_p += sizeof (cbc_uint16_arguments_t);\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) compiled_code_p;\n\n    args_p->stack_limit = (uint8_t) context_p->stack_limit;\n    args_p->argument_end = (uint8_t) context_p->argument_count;\n    args_p->register_end = (uint8_t) context_p->register_count;\n    args_p->ident_end = (uint8_t) ident_end;\n    args_p->const_literal_end = (uint8_t) const_literal_end;\n    args_p->literal_end = (uint8_t) context_p->literal_count;\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    ECMA_SET_INTERNAL_VALUE_POINTER (args_p->realm_value, JERRY_CONTEXT (global_object_p));\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n    byte_code_p += sizeof (cbc_uint8_arguments_t);\n  }\n\n  uint16_t encoding_limit;\n  uint16_t encoding_delta;\n\n  if (context_p->literal_count > CBC_MAXIMUM_SMALL_VALUE)\n  {\n    compiled_code_p->status_flags |= CBC_CODE_FLAGS_FULL_LITERAL_ENCODING;\n    encoding_limit = CBC_FULL_LITERAL_ENCODING_LIMIT;\n    encoding_delta = CBC_FULL_LITERAL_ENCODING_DELTA;\n  }\n  else\n  {\n    encoding_limit = CBC_SMALL_LITERAL_ENCODING_LIMIT;\n    encoding_delta = CBC_SMALL_LITERAL_ENCODING_DELTA;\n  }\n\n  if (context_p->status_flags & PARSER_IS_STRICT)\n  {\n    compiled_code_p->status_flags |= CBC_CODE_FLAGS_STRICT_MODE;\n  }\n\n  if ((context_p->status_flags & PARSER_ARGUMENTS_NEEDED)\n      && PARSER_NEEDS_MAPPED_ARGUMENTS (context_p->status_flags))\n  {\n    compiled_code_p->status_flags |= CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED;\n  }\n\n  if (!(context_p->status_flags & PARSER_LEXICAL_ENV_NEEDED))\n  {\n    compiled_code_p->status_flags |= CBC_CODE_FLAGS_LEXICAL_ENV_NOT_NEEDED;\n  }\n\n  uint16_t function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_NORMAL);\n\n  if (context_p->status_flags & (PARSER_IS_PROPERTY_GETTER | PARSER_IS_PROPERTY_SETTER))\n  {\n    function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_ACCESSOR);\n  }\n  else if (!(context_p->status_flags & PARSER_IS_FUNCTION))\n  {\n    function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_SCRIPT);\n  }\n#if ENABLED (JERRY_ESNEXT)\n  else if (context_p->status_flags & PARSER_IS_ARROW_FUNCTION)\n  {\n    if (context_p->status_flags & PARSER_IS_ASYNC_FUNCTION)\n    {\n      function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_ASYNC_ARROW);\n    }\n    else\n    {\n      function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_ARROW);\n    }\n  }\n  else if (context_p->status_flags & PARSER_IS_GENERATOR_FUNCTION)\n  {\n    if (context_p->status_flags & PARSER_IS_ASYNC_FUNCTION)\n    {\n      function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_ASYNC_GENERATOR);\n    }\n    else\n    {\n      function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_GENERATOR);\n    }\n  }\n  else if (context_p->status_flags & PARSER_IS_ASYNC_FUNCTION)\n  {\n    function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_ASYNC);\n  }\n  else if (context_p->status_flags & PARSER_CLASS_CONSTRUCTOR)\n  {\n    function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_CONSTRUCTOR);\n  }\n  else if (context_p->status_flags & PARSER_IS_METHOD)\n  {\n    function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_METHOD);\n  }\n\n  if (context_p->status_flags & PARSER_LEXICAL_BLOCK_NEEDED)\n  {\n    JERRY_ASSERT (!(context_p->status_flags & PARSER_IS_FUNCTION));\n    compiled_code_p->status_flags |= CBC_CODE_FLAGS_LEXICAL_BLOCK_NEEDED;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  compiled_code_p->status_flags |= function_type;\n\n  literal_pool_p = ((ecma_value_t *) byte_code_p) - context_p->register_count;\n  byte_code_p += literal_length;\n  dst_p = byte_code_p;\n\n  parser_init_literal_pool (context_p, literal_pool_p);\n\n#if ENABLED (JERRY_RESOURCE_NAME)\n  literal_pool_p[const_literal_end - 1] = context_p->resource_name;\n#endif /* ENABLED (JERRY_RESOURCE_NAME) */\n\n  page_p = context_p->byte_code.first_p;\n  offset = 0;\n  real_offset = 0;\n  uint8_t last_register_index = (uint8_t) JERRY_MIN (context_p->register_count,\n                                                     (PARSER_MAXIMUM_NUMBER_OF_REGISTERS - 1));\n\n  while (page_p != last_page_p || offset < last_position)\n  {\n    uint8_t flags;\n    uint8_t *opcode_p;\n    uint8_t *branch_mark_p;\n    cbc_opcode_t opcode;\n    size_t branch_offset_length;\n\n    opcode_p = dst_p;\n    branch_mark_p = page_p->bytes + offset;\n    opcode = (cbc_opcode_t) (*branch_mark_p);\n    branch_offset_length = CBC_BRANCH_OFFSET_LENGTH (opcode);\n\n    if (opcode == CBC_JUMP_FORWARD)\n    {\n      /* These opcodes are deleted from the stream. */\n      size_t counter = PARSER_MAX_BRANCH_LENGTH + 1;\n\n      do\n      {\n        PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);\n      }\n      while (--counter > 0);\n\n      continue;\n    }\n\n    /* Storing the opcode */\n    *dst_p++ = (uint8_t) opcode;\n    real_offset++;\n    PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);\n    flags = cbc_flags[opcode];\n\n#if ENABLED (JERRY_DEBUGGER)\n    if (opcode == CBC_BREAKPOINT_DISABLED)\n    {\n      uint32_t bp_offset = (uint32_t) (((uint8_t *) dst_p) - ((uint8_t *) compiled_code_p) - 1);\n      parser_append_breakpoint_info (context_p, JERRY_DEBUGGER_BREAKPOINT_OFFSET_LIST, bp_offset);\n    }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n    if (opcode == CBC_EXT_OPCODE)\n    {\n      cbc_ext_opcode_t ext_opcode;\n\n      ext_opcode = (cbc_ext_opcode_t) page_p->bytes[offset];\n      flags = cbc_ext_flags[ext_opcode];\n      branch_offset_length = CBC_BRANCH_OFFSET_LENGTH (ext_opcode);\n\n      /* Storing the extended opcode */\n      *dst_p++ = (uint8_t) ext_opcode;\n      opcode_p++;\n      real_offset++;\n      PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);\n\n#if ENABLED (JERRY_LINE_INFO)\n      if (ext_opcode == CBC_EXT_LINE)\n      {\n        uint8_t last_byte = 0;\n\n        do\n        {\n          last_byte = page_p->bytes[offset];\n          *dst_p++ = last_byte;\n\n          real_offset++;\n          PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);\n        }\n        while (last_byte & CBC_HIGHEST_BIT_MASK);\n\n        continue;\n      }\n#endif /* ENABLED (JERRY_LINE_INFO) */\n    }\n\n    /* Only literal and call arguments can be combined. */\n    JERRY_ASSERT (!(flags & CBC_HAS_BRANCH_ARG)\n                   || !(flags & (CBC_HAS_BYTE_ARG | CBC_HAS_LITERAL_ARG)));\n\n    while (flags & (CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2))\n    {\n      uint16_t first_byte = page_p->bytes[offset];\n\n      uint8_t *opcode_pos_p = dst_p - 1;\n      *dst_p++ = (uint8_t) first_byte;\n      real_offset++;\n      PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);\n\n      if (first_byte > literal_one_byte_limit)\n      {\n        *dst_p++ = page_p->bytes[offset];\n\n        if (first_byte > encoding_limit)\n        {\n          first_byte = (uint16_t) (((first_byte << 8) | dst_p[-1]) - encoding_delta);\n        }\n        real_offset++;\n      }\n      PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);\n\n      if (flags & CBC_HAS_LITERAL_ARG2)\n      {\n        if (flags & CBC_HAS_LITERAL_ARG)\n        {\n          flags = CBC_HAS_LITERAL_ARG;\n        }\n        else\n        {\n          flags = CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2;\n        }\n      }\n      else\n      {\n        if (opcode == CBC_ASSIGN_SET_IDENT && JERRY_LIKELY (first_byte < last_register_index))\n        {\n          *opcode_pos_p = CBC_MOV_IDENT;\n        }\n\n        break;\n      }\n    }\n\n    if (flags & CBC_HAS_BYTE_ARG)\n    {\n      /* This argument will be copied without modification. */\n      *dst_p++ = page_p->bytes[offset];\n      real_offset++;\n      PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);\n      continue;\n    }\n\n    if (flags & CBC_HAS_BRANCH_ARG)\n    {\n      *branch_mark_p |= CBC_HIGHEST_BIT_MASK;\n      bool prefix_zero = true;\n\n      /* The leading zeroes are dropped from the stream. */\n      JERRY_ASSERT (branch_offset_length > 0 && branch_offset_length <= 3);\n\n      while (--branch_offset_length > 0)\n      {\n        uint8_t byte = page_p->bytes[offset];\n        if (byte > 0 || !prefix_zero)\n        {\n          prefix_zero = false;\n          *dst_p++ = page_p->bytes[offset];\n          real_offset++;\n        }\n        else\n        {\n          /* When a leading zero is dropped, the branch\n           * offset length must be decreased as well. */\n          (*opcode_p)--;\n        }\n        PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);\n      }\n\n      *dst_p++ = page_p->bytes[offset];\n      real_offset++;\n      PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);\n      continue;\n    }\n  }\n\n#if ENABLED (JERRY_DEBUGGER)\n  if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      && context_p->breakpoint_info_count > 0)\n  {\n    parser_send_breakpoints (context_p, JERRY_DEBUGGER_BREAKPOINT_OFFSET_LIST);\n    JERRY_ASSERT (context_p->breakpoint_info_count == 0);\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  if (!(context_p->status_flags & PARSER_NO_END_LABEL))\n  {\n    *dst_p++ = CBC_RETURN_WITH_BLOCK;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (PARSER_IS_NORMAL_ASYNC_FUNCTION (context_p->status_flags))\n    {\n      dst_p[-1] = CBC_EXT_OPCODE;\n      dst_p[0] = CBC_EXT_ASYNC_EXIT;\n      dst_p++;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n  JERRY_ASSERT (dst_p == byte_code_p + length);\n\n  parse_update_branches (context_p, byte_code_p);\n\n  parser_cbc_stream_free (&context_p->byte_code);\n\n  if (context_p->status_flags & PARSER_HAS_LATE_LIT_INIT)\n  {\n    parser_list_iterator_t literal_iterator;\n    lexer_literal_t *literal_p;\n    uint16_t register_count = context_p->register_count;\n\n    parser_list_iterator_init (&context_p->literal_pool, &literal_iterator);\n    while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator)))\n    {\n      if ((literal_p->status_flags & LEXER_FLAG_LATE_INIT)\n          && literal_p->prop.index >= register_count)\n      {\n        uint32_t source_data = literal_p->u.source_data;\n        const uint8_t *char_p = context_p->source_end_p - (source_data & 0xfffff);\n        ecma_value_t lit_value = ecma_find_or_create_literal_string (char_p,\n                                                                     source_data >> 20);\n        literal_pool_p[literal_p->prop.index] = lit_value;\n      }\n    }\n  }\n\n  ecma_value_t *base_p = (ecma_value_t *) (((uint8_t *) compiled_code_p) + total_size);\n\n  if (PARSER_NEEDS_MAPPED_ARGUMENTS (context_p->status_flags))\n  {\n    parser_list_iterator_t literal_iterator;\n    uint16_t argument_count = 0;\n    uint16_t register_count = context_p->register_count;\n    base_p -= context_p->argument_count;\n\n    parser_list_iterator_init (&context_p->literal_pool, &literal_iterator);\n    while (argument_count < context_p->argument_count)\n    {\n      lexer_literal_t *literal_p;\n      literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator);\n\n      JERRY_ASSERT (literal_p != NULL);\n\n      if (!(literal_p->status_flags & LEXER_FLAG_FUNCTION_ARGUMENT))\n      {\n        continue;\n      }\n\n      /* All arguments must be moved to initialized registers. */\n      if (literal_p->type == LEXER_UNUSED_LITERAL)\n      {\n        base_p[argument_count] = ECMA_VALUE_EMPTY;\n        argument_count++;\n        continue;\n      }\n\n      JERRY_ASSERT (literal_p->type == LEXER_IDENT_LITERAL);\n\n      JERRY_ASSERT (literal_p->prop.index >= register_count);\n\n      base_p[argument_count] = literal_pool_p[literal_p->prop.index];\n      argument_count++;\n    }\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (!(context_p->status_flags & PARSER_CLASS_CONSTRUCTOR))\n  {\n    *(--base_p) = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);\n  }\n\n  if (context_p->argument_length != UINT16_MAX)\n  {\n    compiled_code_p->status_flags |= CBC_CODE_FLAGS_HAS_EXTENDED_INFO;\n    *(--base_p) = context_p->argument_length;\n  }\n\n  if (context_p->tagged_template_literal_cp != JMEM_CP_NULL)\n  {\n    compiled_code_p->status_flags |= CBC_CODE_FLAGS_HAS_TAGGED_LITERALS;\n    base_p[-1] = (ecma_value_t) context_p->tagged_template_literal_cp;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    util_print_cbc (compiled_code_p);\n    JERRY_DEBUG_MSG (\"\\nByte code size: %d bytes\\n\", (int) length);\n    context_p->total_byte_code_size += (uint32_t) length;\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_function_cp (JERRY_DEBUGGER_BYTE_CODE_CP, compiled_code_p);\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  return compiled_code_p;\n} /* parser_post_processing */\n\n#undef PARSER_NEXT_BYTE\n#undef PARSER_NEXT_BYTE_UPDATE\n\n/**\n * Free identifiers and literals.\n */\nstatic void\nparser_free_literals (parser_list_t *literal_pool_p) /**< literals */\n{\n  parser_list_iterator_t literal_iterator;\n  lexer_literal_t *literal_p;\n\n  parser_list_iterator_init (literal_pool_p, &literal_iterator);\n  while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n  {\n    util_free_literal (literal_p);\n  }\n\n  parser_list_free (literal_pool_p);\n} /* parser_free_literals */\n\n/**\n * Parse function arguments\n */\nstatic void\nparser_parse_function_arguments (parser_context_t *context_p, /**< context */\n                                 lexer_token_type_t end_type) /**< expected end type */\n{\n  JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION);\n\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT (context_p->status_flags & PARSER_IS_FUNCTION);\n  JERRY_ASSERT (!(context_p->status_flags & PARSER_LEXICAL_BLOCK_NEEDED));\n\n  bool has_duplicated_arg_names = false;\n\n  if (PARSER_IS_NORMAL_ASYNC_FUNCTION (context_p->status_flags))\n  {\n    parser_branch_t branch;\n    parser_emit_cbc_ext_forward_branch (context_p, CBC_EXT_TRY_CREATE_CONTEXT, &branch);\n    parser_stack_push (context_p, &branch, sizeof (parser_branch_t));\n\n#ifndef JERRY_NDEBUG\n    context_p->context_stack_depth = PARSER_TRY_CONTEXT_STACK_ALLOCATION;\n#endif /* !JERRY_NDEBUG */\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (context_p->token.type == end_type)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    context_p->status_flags &= (uint32_t) ~PARSER_DISALLOW_AWAIT_YIELD;\n\n    if (context_p->status_flags & PARSER_IS_GENERATOR_FUNCTION)\n    {\n      scanner_create_variables (context_p, SCANNER_CREATE_VARS_IS_FUNCTION_ARGS);\n      parser_emit_cbc_ext (context_p, CBC_EXT_CREATE_GENERATOR);\n      parser_emit_cbc (context_p, CBC_POP);\n      scanner_create_variables (context_p, SCANNER_CREATE_VARS_IS_FUNCTION_BODY);\n      return;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    scanner_create_variables (context_p, SCANNER_CREATE_VARS_NO_OPTS);\n    return;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  bool has_complex_argument = (context_p->next_scanner_info_p->u8_arg & SCANNER_FUNCTION_HAS_COMPLEX_ARGUMENT) != 0;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  bool is_strict = (context_p->next_scanner_info_p->u8_arg & SCANNER_FUNCTION_IS_STRICT) != 0;\n\n  scanner_create_variables (context_p, SCANNER_CREATE_VARS_IS_FUNCTION_ARGS);\n  scanner_set_active (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  context_p->status_flags |= PARSER_FUNCTION_IS_PARSING_ARGS;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  while (true)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    if (context_p->token.type == LEXER_THREE_DOTS)\n    {\n      if (context_p->status_flags & PARSER_IS_PROPERTY_SETTER)\n      {\n        parser_raise_error (context_p, PARSER_ERR_SETTER_REST_PARAMETER);\n      }\n      lexer_next_token (context_p);\n\n      if (has_duplicated_arg_names)\n      {\n        parser_raise_error (context_p, PARSER_ERR_DUPLICATED_ARGUMENT_NAMES);\n      }\n\n      context_p->status_flags |= PARSER_FUNCTION_HAS_REST_PARAM | PARSER_FUNCTION_HAS_COMPLEX_ARGUMENT;\n    }\n\n    if (context_p->token.type == LEXER_LEFT_SQUARE || context_p->token.type == LEXER_LEFT_BRACE)\n    {\n      if (has_duplicated_arg_names)\n      {\n        parser_raise_error (context_p, PARSER_ERR_DUPLICATED_ARGUMENT_NAMES);\n      }\n\n      context_p->status_flags |= PARSER_FUNCTION_HAS_COMPLEX_ARGUMENT;\n\n      if (!(context_p->status_flags & PARSER_FUNCTION_HAS_REST_PARAM))\n      {\n        parser_emit_cbc_literal (context_p,\n                                 CBC_PUSH_LITERAL,\n                                 (uint16_t) (PARSER_REGISTER_START + context_p->argument_count));\n      }\n      else\n      {\n        parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_REST_OBJECT);\n      }\n\n      uint32_t flags = (PARSER_PATTERN_BINDING\n                        | PARSER_PATTERN_TARGET_ON_STACK\n                        | PARSER_PATTERN_LOCAL\n                        | PARSER_PATTERN_ARGUMENTS);\n\n      if (context_p->next_scanner_info_p->source_p == context_p->source_p)\n      {\n        if (context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER)\n        {\n          if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)\n          {\n            flags |= PARSER_PATTERN_HAS_REST_ELEMENT;\n          }\n\n          if (context_p->status_flags & PARSER_FUNCTION_HAS_REST_PARAM)\n          {\n            parser_raise_error (context_p, PARSER_ERR_REST_PARAMETER_DEFAULT_INITIALIZER);\n          }\n\n          if (context_p->argument_length == UINT16_MAX)\n          {\n            context_p->argument_length = context_p->argument_count;\n          }\n\n          flags |= PARSER_PATTERN_TARGET_DEFAULT;\n        }\n        else if (context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS)\n        {\n          if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)\n          {\n            flags |= PARSER_PATTERN_HAS_REST_ELEMENT;\n          }\n          scanner_release_next (context_p, sizeof (scanner_info_t));\n        }\n        else\n        {\n          parser_raise_error (context_p, PARSER_ERR_INVALID_DESTRUCTURING_PATTERN);\n        }\n      }\n\n      parser_parse_initializer (context_p, flags);\n\n      context_p->argument_count++;\n      if (context_p->argument_count >= PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n      {\n        parser_raise_error (context_p, PARSER_ERR_ARGUMENT_LIMIT_REACHED);\n      }\n\n      if (context_p->token.type != LEXER_COMMA)\n      {\n        if (context_p->token.type != end_type)\n        {\n          parser_error_t error = ((end_type == LEXER_RIGHT_PAREN) ? PARSER_ERR_RIGHT_PAREN_EXPECTED\n                                                                  : PARSER_ERR_IDENTIFIER_EXPECTED);\n\n          parser_raise_error (context_p, error);\n        }\n        break;\n      }\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type == end_type)\n      {\n        break;\n      }\n      continue;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (context_p->token.type != LEXER_LITERAL\n        || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n    {\n      parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);\n    }\n\n    lexer_construct_literal_object (context_p,\n                                    &context_p->token.lit_location,\n                                    LEXER_IDENT_LITERAL);\n\n    if (context_p->token.keyword_type >= LEXER_FIRST_NON_STRICT_ARGUMENTS)\n    {\n      context_p->status_flags |= PARSER_HAS_NON_STRICT_ARG;\n    }\n\n    if (JERRY_UNLIKELY (context_p->lit_object.literal_p->status_flags & LEXER_FLAG_FUNCTION_ARGUMENT))\n    {\n#if ENABLED (JERRY_ESNEXT)\n      if ((context_p->status_flags & PARSER_FUNCTION_HAS_COMPLEX_ARGUMENT)\n          || (context_p->status_flags & PARSER_IS_ARROW_FUNCTION))\n      {\n        parser_raise_error (context_p, PARSER_ERR_DUPLICATED_ARGUMENT_NAMES);\n      }\n      has_duplicated_arg_names = true;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      context_p->status_flags |= PARSER_HAS_NON_STRICT_ARG;\n    }\n    else\n    {\n      context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_FUNCTION_ARGUMENT;\n    }\n\n    lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n    uint16_t literal_index = context_p->lit_object.index;\n\n    if (context_p->token.type == LEXER_ASSIGN)\n    {\n      JERRY_ASSERT (has_complex_argument);\n\n      if (context_p->status_flags & PARSER_FUNCTION_HAS_REST_PARAM)\n      {\n        parser_raise_error (context_p, PARSER_ERR_REST_PARAMETER_DEFAULT_INITIALIZER);\n      }\n\n      if (context_p->argument_length == UINT16_MAX)\n      {\n        context_p->argument_length = context_p->argument_count;\n      }\n\n      parser_branch_t skip_init;\n\n      if (has_duplicated_arg_names)\n      {\n        parser_raise_error (context_p, PARSER_ERR_DUPLICATED_ARGUMENT_NAMES);\n      }\n\n      context_p->status_flags |= PARSER_FUNCTION_HAS_COMPLEX_ARGUMENT;\n\n      /* LEXER_ASSIGN does not overwrite lit_object. */\n      parser_emit_cbc_literal (context_p,\n                               CBC_PUSH_LITERAL,\n                               (uint16_t) (PARSER_REGISTER_START + context_p->argument_count));\n      parser_emit_cbc_ext_forward_branch (context_p, CBC_EXT_DEFAULT_INITIALIZER, &skip_init);\n\n      lexer_next_token (context_p);\n      parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n      parser_set_branch_to_current_position (context_p, &skip_init);\n\n      uint16_t opcode = CBC_ASSIGN_LET_CONST;\n\n      if (literal_index >= PARSER_REGISTER_START)\n      {\n        opcode = CBC_MOV_IDENT;\n      }\n      else if (!scanner_literal_is_created (context_p, literal_index))\n      {\n        opcode = CBC_INIT_ARG_OR_CATCH;\n      }\n\n      parser_emit_cbc_literal (context_p, opcode, literal_index);\n    }\n    else if (context_p->status_flags & PARSER_FUNCTION_HAS_REST_PARAM)\n    {\n      parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_REST_OBJECT);\n\n      uint16_t opcode = CBC_MOV_IDENT;\n\n      if (literal_index < PARSER_REGISTER_START)\n      {\n        opcode = CBC_INIT_ARG_OR_CATCH;\n\n        if (scanner_literal_is_created (context_p, literal_index))\n        {\n          opcode = CBC_ASSIGN_LET_CONST;\n        }\n      }\n\n      parser_emit_cbc_literal (context_p, opcode, literal_index);\n    }\n    else if (has_complex_argument && literal_index < PARSER_REGISTER_START)\n    {\n      uint16_t opcode = CBC_INIT_ARG_OR_FUNC;\n\n      if (scanner_literal_is_created (context_p, literal_index))\n      {\n        opcode = CBC_ASSIGN_LET_CONST_LITERAL;\n      }\n\n      parser_emit_cbc_literal_value (context_p,\n                                     opcode,\n                                     (uint16_t) (PARSER_REGISTER_START + context_p->argument_count),\n                                     literal_index);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    context_p->argument_count++;\n    if (context_p->argument_count >= PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n    {\n      parser_raise_error (context_p, PARSER_ERR_ARGUMENT_LIMIT_REACHED);\n    }\n\n    if (context_p->token.type != LEXER_COMMA)\n    {\n      if (context_p->token.type != end_type)\n      {\n        parser_error_t error = ((end_type == LEXER_RIGHT_PAREN) ? PARSER_ERR_RIGHT_PAREN_EXPECTED\n                                                                : PARSER_ERR_IDENTIFIER_EXPECTED);\n\n        parser_raise_error (context_p, error);\n      }\n      break;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (context_p->status_flags & PARSER_FUNCTION_HAS_REST_PARAM)\n    {\n      parser_raise_error (context_p, PARSER_ERR_FORMAL_PARAM_AFTER_REST_PARAMETER);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n    if (context_p->token.type == end_type)\n    {\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n\n  scanner_revert_active (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT (has_complex_argument || !(context_p->status_flags & PARSER_FUNCTION_HAS_COMPLEX_ARGUMENT));\n\n  if (context_p->status_flags & PARSER_IS_GENERATOR_FUNCTION)\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_CREATE_GENERATOR);\n    parser_emit_cbc (context_p, CBC_POP);\n  }\n\n  if (context_p->status_flags & PARSER_LEXICAL_BLOCK_NEEDED)\n  {\n    if ((context_p->next_scanner_info_p->u8_arg & SCANNER_FUNCTION_LEXICAL_ENV_NEEDED)\n        || scanner_is_context_needed (context_p, PARSER_CHECK_FUNCTION_CONTEXT))\n    {\n      context_p->status_flags |= PARSER_LEXICAL_ENV_NEEDED;\n\n      parser_branch_t branch;\n      parser_emit_cbc_forward_branch (context_p, CBC_BLOCK_CREATE_CONTEXT, &branch);\n      parser_stack_push (context_p, &branch, sizeof (parser_branch_t));\n\n#ifndef JERRY_NDEBUG\n      PARSER_PLUS_EQUAL_U16 (context_p->context_stack_depth, PARSER_BLOCK_CONTEXT_STACK_ALLOCATION);\n#endif /* !JERRY_NDEBUG */\n    }\n    else\n    {\n      context_p->status_flags &= (uint32_t) ~PARSER_LEXICAL_BLOCK_NEEDED;\n    }\n  }\n\n  context_p->status_flags &= (uint32_t) ~(PARSER_DISALLOW_AWAIT_YIELD | PARSER_FUNCTION_IS_PARSING_ARGS);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  scanner_create_variables (context_p, SCANNER_CREATE_VARS_IS_FUNCTION_BODY);\n\n  if (is_strict)\n  {\n    context_p->status_flags |= PARSER_IS_STRICT;\n  }\n} /* parser_parse_function_arguments */\n\n#ifndef JERRY_NDEBUG\nJERRY_STATIC_ASSERT (PARSER_SCANNING_SUCCESSFUL == PARSER_HAS_LATE_LIT_INIT,\n                     parser_scanning_successful_should_share_the_bit_position_with_parser_has_late_lit_init);\n#endif /* !JERRY_NDEBUG */\n\n/**\n * Parse and compile EcmaScript source code\n *\n * Note: source must be a valid UTF-8 string\n *\n * @return compiled code\n */\nstatic ecma_compiled_code_t *\nparser_parse_source (const uint8_t *arg_list_p, /**< function argument list */\n                     size_t arg_list_size, /**< size of function argument list */\n                     const uint8_t *source_p, /**< valid UTF-8 source code */\n                     size_t source_size, /**< size of the source code */\n                     ecma_value_t resource_name, /**< resource name */\n                     uint32_t parse_opts, /**< ecma_parse_opts_t option bits */\n                     parser_error_location_t *error_location_p) /**< error location */\n{\n  parser_context_t context;\n  ecma_compiled_code_t *compiled_code_p;\n\n  context.error = PARSER_ERR_NO_ERROR;\n\n  if (error_location_p != NULL)\n  {\n    error_location_p->error = PARSER_ERR_NO_ERROR;\n  }\n\n  context.status_flags = parse_opts & PARSER_STRICT_MODE_MASK;\n  context.global_status_flags = parse_opts;\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  if (context.global_status_flags & ECMA_PARSE_MODULE)\n  {\n    context.status_flags |= PARSER_IS_STRICT;\n  }\n\n  context.module_current_node_p = NULL;\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n  if (arg_list_p != NULL)\n  {\n    context.status_flags |= PARSER_IS_FUNCTION;\n#if ENABLED (JERRY_ESNEXT)\n    if (parse_opts & ECMA_PARSE_GENERATOR_FUNCTION)\n    {\n      context.status_flags |= PARSER_IS_GENERATOR_FUNCTION;\n    }\n    if (parse_opts & ECMA_PARSE_ASYNC_FUNCTION)\n    {\n      context.status_flags |= PARSER_IS_ASYNC_FUNCTION;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  context.status_flags |= PARSER_RESTORE_STATUS_FLAGS (parse_opts);\n  context.tagged_template_literal_cp = JMEM_CP_NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  context.stack_depth = 0;\n  context.stack_limit = 0;\n  context.last_context_p = NULL;\n  context.last_statement.current_p = NULL;\n\n  context.token.flags = 0;\n  context.line = 1;\n  context.column = 1;\n#if ENABLED (JERRY_RESOURCE_NAME)\n  context.resource_name = resource_name;\n#else /* !ENABLED (JERRY_RESOURCE_NAME) */\n  JERRY_UNUSED (resource_name);\n#endif /* !ENABLED (JERRY_RESOURCE_NAME) */\n\n  scanner_info_t scanner_info_end;\n  scanner_info_end.next_p = NULL;\n  scanner_info_end.source_p = NULL;\n  scanner_info_end.type = SCANNER_TYPE_END;\n  context.next_scanner_info_p = &scanner_info_end;\n  context.active_scanner_info_p = NULL;\n  context.skipped_scanner_info_p = NULL;\n  context.skipped_scanner_info_end_p = NULL;\n\n  context.last_cbc_opcode = PARSER_CBC_UNAVAILABLE;\n\n  context.argument_count = 0;\n#if ENABLED (JERRY_ESNEXT)\n  context.argument_length = UINT16_MAX;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  context.register_count = 0;\n  context.literal_count = 0;\n\n  parser_cbc_stream_init (&context.byte_code);\n  context.byte_code_size = 0;\n  parser_list_init (&context.literal_pool,\n                    sizeof (lexer_literal_t),\n                    (uint32_t) ((128 - sizeof (void *)) / sizeof (lexer_literal_t)));\n  context.scope_stack_p = NULL;\n  context.scope_stack_size = 0;\n  context.scope_stack_top = 0;\n  context.scope_stack_reg_top = 0;\n#if ENABLED (JERRY_ESNEXT)\n  context.scope_stack_global_end = 0;\n  context.tagged_template_literal_cp = JMEM_CP_NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#ifndef JERRY_NDEBUG\n  context.context_stack_depth = 0;\n#endif /* !JERRY_NDEBUG */\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  context.is_show_opcodes = (JERRY_CONTEXT (jerry_init_flags) & ECMA_INIT_SHOW_OPCODES);\n  context.total_byte_code_size = 0;\n\n  if (context.is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"\\n--- %s parsing start ---\\n\\n\",\n                     (arg_list_p == NULL) ? \"Script\"\n                                          : \"Function\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  scanner_scan_all (&context,\n                    arg_list_p,\n                    arg_list_p + arg_list_size,\n                    source_p,\n                    source_p + source_size);\n\n  if (JERRY_UNLIKELY (context.error != PARSER_ERR_NO_ERROR))\n  {\n    JERRY_ASSERT (context.error == PARSER_ERR_OUT_OF_MEMORY);\n\n    if (error_location_p != NULL)\n    {\n      error_location_p->error = context.error;\n      error_location_p->line = context.token.line;\n      error_location_p->column = context.token.column;\n    }\n    return NULL;\n  }\n\n  if (arg_list_p == NULL)\n  {\n    context.source_p = source_p;\n    context.source_end_p = source_p + source_size;\n  }\n  else\n  {\n    context.source_p = arg_list_p;\n    context.source_end_p = arg_list_p + arg_list_size;\n  }\n\n  context.u.allocated_buffer_p = NULL;\n  context.line = 1;\n  context.column = 1;\n  context.token.flags = 0;\n\n  parser_stack_init (&context);\n\n#if ENABLED (JERRY_DEBUGGER)\n  context.breakpoint_info_count = 0;\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  JERRY_ASSERT (context.next_scanner_info_p->source_p == context.source_p);\n  JERRY_ASSERT (context.next_scanner_info_p->type == SCANNER_TYPE_FUNCTION);\n\n  if (context.next_scanner_info_p->u8_arg & SCANNER_FUNCTION_IS_STRICT)\n  {\n    context.status_flags |= PARSER_IS_STRICT;\n  }\n\n  PARSER_TRY (context.try_buffer)\n  {\n    /* Pushing a dummy value ensures the stack is never empty.\n     * This simplifies the stack management routines. */\n    parser_stack_push_uint8 (&context, CBC_MAXIMUM_BYTE_VALUE);\n    /* The next token must always be present to make decisions\n     * in the parser. Therefore when a token is consumed, the\n     * lexer_next_token() must be immediately called. */\n    lexer_next_token (&context);\n\n    if (arg_list_p != NULL)\n    {\n      parser_parse_function_arguments (&context, LEXER_EOS);\n\n      JERRY_ASSERT (context.next_scanner_info_p->type == SCANNER_TYPE_END_ARGUMENTS);\n      scanner_release_next (&context, sizeof (scanner_info_t));\n\n      context.source_p = source_p;\n      context.source_end_p = source_p + source_size;\n      context.line = 1;\n      context.column = 1;\n\n      lexer_next_token (&context);\n    }\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    else if (parse_opts & ECMA_PARSE_MODULE)\n    {\n      scanner_create_variables (&context, SCANNER_CREATE_VARS_NO_OPTS);\n    }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n    else\n    {\n      JERRY_ASSERT (context.next_scanner_info_p->source_p == source_p\n                    && context.next_scanner_info_p->type == SCANNER_TYPE_FUNCTION);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (scanner_is_context_needed (&context, PARSER_CHECK_GLOBAL_CONTEXT))\n      {\n        context.status_flags |= PARSER_LEXICAL_BLOCK_NEEDED;\n      }\n\n      if (!(parse_opts & ECMA_PARSE_EVAL))\n      {\n        scanner_check_variables (&context);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      scanner_create_variables (&context, SCANNER_CREATE_VARS_IS_SCRIPT);\n    }\n\n    parser_parse_statements (&context);\n\n    JERRY_ASSERT (context.last_statement.current_p == NULL);\n\n    JERRY_ASSERT (context.last_cbc_opcode == PARSER_CBC_UNAVAILABLE);\n    JERRY_ASSERT (context.u.allocated_buffer_p == NULL);\n\n#ifndef JERRY_NDEBUG\n    JERRY_ASSERT (context.status_flags & PARSER_SCANNING_SUCCESSFUL);\n    JERRY_ASSERT (!(context.global_status_flags & ECMA_PARSE_INTERNAL_FOR_IN_OFF_CONTEXT_ERROR));\n    context.status_flags &= (uint32_t) ~PARSER_SCANNING_SUCCESSFUL;\n#endif /* !JERRY_NDEBUG */\n\n    JERRY_ASSERT (!(context.status_flags & PARSER_HAS_LATE_LIT_INIT));\n\n    compiled_code_p = parser_post_processing (&context);\n    parser_list_free (&context.literal_pool);\n\n    /* When parsing is successful, only the dummy value can be remained on the stack. */\n    JERRY_ASSERT (context.stack_top_uint8 == CBC_MAXIMUM_BYTE_VALUE\n                  && context.stack.last_position == 1\n                  && context.stack.first_p != NULL\n                  && context.stack.first_p->next_p == NULL\n                  && context.stack.last_p == NULL);\n\n    JERRY_ASSERT (arg_list_p != NULL || !(context.status_flags & PARSER_ARGUMENTS_NEEDED));\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n    if (context.is_show_opcodes)\n    {\n      JERRY_DEBUG_MSG (\"\\n%s parsing successfully completed. Total byte code size: %d bytes\\n\",\n                       (arg_list_p == NULL) ? \"Script\"\n                                            : \"Function\",\n                       (int) context.total_byte_code_size);\n    }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n  }\n  PARSER_CATCH\n  {\n    if (context.last_statement.current_p != NULL)\n    {\n      parser_free_jumps (context.last_statement);\n    }\n\n    parser_free_allocated_buffer (&context);\n\n    scanner_cleanup (&context);\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    if (context.module_current_node_p != NULL)\n    {\n      ecma_module_release_module_nodes (context.module_current_node_p);\n    }\n#endif\n\n    if (error_location_p != NULL)\n    {\n      error_location_p->error = context.error;\n      error_location_p->line = context.token.line;\n      error_location_p->column = context.token.column;\n    }\n\n    compiled_code_p = NULL;\n    parser_free_literals (&context.literal_pool);\n    parser_cbc_stream_free (&context.byte_code);\n  }\n  PARSER_TRY_END\n\n  if (context.scope_stack_p != NULL)\n  {\n    parser_free (context.scope_stack_p, context.scope_stack_size * sizeof (parser_scope_stack_t));\n  }\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context.is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"\\n--- %s parsing end ---\\n\\n\",\n                     (arg_list_p == NULL) ? \"Script\"\n                                          : \"Function\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  parser_stack_free (&context);\n\n  return compiled_code_p;\n} /* parser_parse_source */\n\n/**\n * Save parser context before function parsing.\n */\nstatic void\nparser_save_context (parser_context_t *context_p, /**< context */\n                     parser_saved_context_t *saved_context_p) /**< target for saving the context */\n{\n  JERRY_ASSERT (context_p->last_cbc_opcode == PARSER_CBC_UNAVAILABLE);\n\n#if ENABLED (JERRY_DEBUGGER)\n  if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n      && context_p->breakpoint_info_count > 0)\n  {\n    parser_send_breakpoints (context_p, JERRY_DEBUGGER_BREAKPOINT_LIST);\n    context_p->breakpoint_info_count = 0;\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n#if ENABLED (JERRY_ESNEXT)\n  if (context_p->status_flags & PARSER_FUNCTION_IS_PARSING_ARGS)\n  {\n    context_p->status_flags |= PARSER_LEXICAL_BLOCK_NEEDED;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* Save private part of the context. */\n\n  saved_context_p->status_flags = context_p->status_flags;\n  saved_context_p->stack_depth = context_p->stack_depth;\n  saved_context_p->stack_limit = context_p->stack_limit;\n  saved_context_p->prev_context_p = context_p->last_context_p;\n  saved_context_p->last_statement = context_p->last_statement;\n\n  saved_context_p->argument_count = context_p->argument_count;\n#if ENABLED (JERRY_ESNEXT)\n  saved_context_p->argument_length = context_p->argument_length;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  saved_context_p->register_count = context_p->register_count;\n  saved_context_p->literal_count = context_p->literal_count;\n\n  saved_context_p->byte_code = context_p->byte_code;\n  saved_context_p->byte_code_size = context_p->byte_code_size;\n  saved_context_p->literal_pool_data = context_p->literal_pool.data;\n  saved_context_p->scope_stack_p = context_p->scope_stack_p;\n  saved_context_p->scope_stack_size = context_p->scope_stack_size;\n  saved_context_p->scope_stack_top = context_p->scope_stack_top;\n  saved_context_p->scope_stack_reg_top = context_p->scope_stack_reg_top;\n#if ENABLED (JERRY_ESNEXT)\n  saved_context_p->scope_stack_global_end = context_p->scope_stack_global_end;\n  saved_context_p->tagged_template_literal_cp = context_p->tagged_template_literal_cp;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#ifndef JERRY_NDEBUG\n  saved_context_p->context_stack_depth = context_p->context_stack_depth;\n#endif /* !JERRY_NDEBUG */\n\n  /* Reset private part of the context. */\n\n  context_p->status_flags &= PARSER_IS_STRICT;\n  context_p->stack_depth = 0;\n  context_p->stack_limit = 0;\n  context_p->last_context_p = saved_context_p;\n  context_p->last_statement.current_p = NULL;\n\n  context_p->argument_count = 0;\n#if ENABLED (JERRY_ESNEXT)\n  context_p->argument_length = UINT16_MAX;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  context_p->register_count = 0;\n  context_p->literal_count = 0;\n\n  parser_cbc_stream_init (&context_p->byte_code);\n  context_p->byte_code_size = 0;\n  parser_list_reset (&context_p->literal_pool);\n  context_p->scope_stack_p = NULL;\n  context_p->scope_stack_size = 0;\n  context_p->scope_stack_top = 0;\n  context_p->scope_stack_reg_top = 0;\n#if ENABLED (JERRY_ESNEXT)\n  context_p->scope_stack_global_end = 0;\n  context_p->tagged_template_literal_cp = JMEM_CP_NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#ifndef JERRY_NDEBUG\n  context_p->context_stack_depth = 0;\n#endif /* !JERRY_NDEBUG */\n} /* parser_save_context */\n\n/**\n * Restore parser context after function parsing.\n */\nstatic void\nparser_restore_context (parser_context_t *context_p, /**< context */\n                        parser_saved_context_t *saved_context_p) /**< target for saving the context */\n{\n  parser_list_free (&context_p->literal_pool);\n\n  if (context_p->scope_stack_p != NULL)\n  {\n    parser_free (context_p->scope_stack_p, context_p->scope_stack_size * sizeof (parser_scope_stack_t));\n  }\n\n  /* Restore private part of the context. */\n\n  JERRY_ASSERT (context_p->last_cbc_opcode == PARSER_CBC_UNAVAILABLE);\n\n  context_p->status_flags = saved_context_p->status_flags;\n  context_p->stack_depth = saved_context_p->stack_depth;\n  context_p->stack_limit = saved_context_p->stack_limit;\n  context_p->last_context_p = saved_context_p->prev_context_p;\n  context_p->last_statement = saved_context_p->last_statement;\n\n  context_p->argument_count = saved_context_p->argument_count;\n#if ENABLED (JERRY_ESNEXT)\n  context_p->argument_length = saved_context_p->argument_length;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  context_p->register_count = saved_context_p->register_count;\n  context_p->literal_count = saved_context_p->literal_count;\n\n  context_p->byte_code = saved_context_p->byte_code;\n  context_p->byte_code_size = saved_context_p->byte_code_size;\n  context_p->literal_pool.data = saved_context_p->literal_pool_data;\n  context_p->scope_stack_p = saved_context_p->scope_stack_p;\n  context_p->scope_stack_size = saved_context_p->scope_stack_size;\n  context_p->scope_stack_top = saved_context_p->scope_stack_top;\n  context_p->scope_stack_reg_top = saved_context_p->scope_stack_reg_top;\n#if ENABLED (JERRY_ESNEXT)\n  context_p->scope_stack_global_end = saved_context_p->scope_stack_global_end;\n  context_p->tagged_template_literal_cp = saved_context_p->tagged_template_literal_cp;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#ifndef JERRY_NDEBUG\n  context_p->context_stack_depth = saved_context_p->context_stack_depth;\n#endif /* !JERRY_NDEBUG */\n} /* parser_restore_context */\n\n/**\n * Parse function code\n *\n * @return compiled code\n */\necma_compiled_code_t *\nparser_parse_function (parser_context_t *context_p, /**< context */\n                       uint32_t status_flags) /**< extra status flags */\n{\n  parser_saved_context_t saved_context;\n  ecma_compiled_code_t *compiled_code_p;\n\n  JERRY_ASSERT (status_flags & PARSER_IS_FUNCTION);\n  parser_save_context (context_p, &saved_context);\n  context_p->status_flags |= status_flags;\n#if ENABLED (JERRY_ESNEXT)\n  context_p->status_flags |= PARSER_ALLOW_NEW_TARGET;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    JERRY_DEBUG_MSG (\"\\n--- %s parsing start ---\\n\\n\",\n                     (context_p->status_flags & PARSER_CLASS_CONSTRUCTOR) ? \"Class constructor\"\n                                                                          : \"Function\");\n#else /* !ENABLED (JERRY_ESNEXT) */\n    JERRY_DEBUG_MSG (\"\\n--- Function parsing start ---\\n\\n\");\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_parse_function (context_p->token.line, context_p->token.column);\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  lexer_next_token (context_p);\n\n  if (context_p->token.type != LEXER_LEFT_PAREN)\n  {\n    parser_raise_error (context_p, PARSER_ERR_ARGUMENT_LIST_EXPECTED);\n  }\n\n  lexer_next_token (context_p);\n\n  parser_parse_function_arguments (context_p, LEXER_RIGHT_PAREN);\n  lexer_next_token (context_p);\n\n  if ((context_p->status_flags & PARSER_IS_PROPERTY_GETTER)\n      && context_p->argument_count != 0)\n  {\n    parser_raise_error (context_p, PARSER_ERR_NO_ARGUMENTS_EXPECTED);\n  }\n\n  if ((context_p->status_flags & PARSER_IS_PROPERTY_SETTER)\n      && context_p->argument_count != 1)\n  {\n    parser_raise_error (context_p, PARSER_ERR_ONE_ARGUMENT_EXPECTED);\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if ((context_p->status_flags & (PARSER_CLASS_CONSTRUCTOR | PARSER_ALLOW_SUPER_CALL)) == PARSER_CLASS_CONSTRUCTOR)\n  {\n    parser_emit_cbc_ext (context_p, CBC_EXT_RUN_FIELD_INIT);\n    parser_flush_cbc (context_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes\n      && (context_p->status_flags & PARSER_HAS_NON_STRICT_ARG))\n  {\n    JERRY_DEBUG_MSG (\"  Note: legacy (non-strict) argument definition\\n\\n\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  if (context_p->token.type != LEXER_LEFT_BRACE)\n  {\n    parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_EXPECTED);\n  }\n\n  lexer_next_token (context_p);\n  parser_parse_statements (context_p);\n  compiled_code_p = parser_post_processing (context_p);\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n#if ENABLED (JERRY_ESNEXT)\n    JERRY_DEBUG_MSG (\"\\n--- %s parsing end ---\\n\\n\",\n                     (context_p->status_flags & PARSER_CLASS_CONSTRUCTOR) ? \"Class constructor\"\n                                                                          : \"Function\");\n#else /* !ENABLED (JERRY_ESNEXT) */\n    JERRY_DEBUG_MSG (\"\\n--- Function parsing end ---\\n\\n\");\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  parser_restore_context (context_p, &saved_context);\n\n  return compiled_code_p;\n} /* parser_parse_function */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Parse arrow function code\n *\n * @return compiled code\n */\necma_compiled_code_t *\nparser_parse_arrow_function (parser_context_t *context_p, /**< context */\n                             uint32_t status_flags) /**< extra status flags */\n{\n  parser_saved_context_t saved_context;\n  ecma_compiled_code_t *compiled_code_p;\n\n  JERRY_ASSERT (status_flags & PARSER_IS_FUNCTION);\n  JERRY_ASSERT (status_flags & PARSER_IS_ARROW_FUNCTION);\n  parser_save_context (context_p, &saved_context);\n  context_p->status_flags |= status_flags;\n  context_p->status_flags |= saved_context.status_flags & (PARSER_ALLOW_NEW_TARGET\n                                                           | PARSER_ALLOW_SUPER\n                                                           | PARSER_ALLOW_SUPER_CALL);\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"\\n--- Arrow function parsing start ---\\n\\n\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_parse_function (context_p->token.line, context_p->token.column);\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  if (context_p->token.type == LEXER_LEFT_PAREN)\n  {\n    lexer_next_token (context_p);\n    parser_parse_function_arguments (context_p, LEXER_RIGHT_PAREN);\n    lexer_next_token (context_p);\n  }\n  else\n  {\n    parser_parse_function_arguments (context_p, LEXER_ARROW);\n  }\n\n  JERRY_ASSERT (context_p->token.type == LEXER_ARROW);\n\n  lexer_next_token (context_p);\n\n  if (context_p->token.type == LEXER_LEFT_BRACE)\n  {\n    lexer_next_token (context_p);\n\n    context_p->status_flags |= PARSER_IS_CLOSURE;\n    parser_parse_statements (context_p);\n\n    /* Unlike normal function, arrow functions consume their close brace. */\n    JERRY_ASSERT (context_p->token.type == LEXER_RIGHT_BRACE);\n    lexer_next_token (context_p);\n  }\n  else\n  {\n    if (context_p->status_flags & PARSER_IS_STRICT\n        && context_p->status_flags & PARSER_HAS_NON_STRICT_ARG)\n    {\n      parser_raise_error (context_p, PARSER_ERR_NON_STRICT_ARG_DEFINITION);\n    }\n\n    parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n    if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n    {\n      context_p->last_cbc_opcode = CBC_RETURN_WITH_LITERAL;\n    }\n    else\n    {\n      parser_emit_cbc (context_p, CBC_RETURN);\n    }\n    parser_flush_cbc (context_p);\n\n    lexer_update_await_yield (context_p, saved_context.status_flags);\n  }\n\n  compiled_code_p = parser_post_processing (context_p);\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"\\n--- Arrow function parsing end ---\\n\\n\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  parser_restore_context (context_p, &saved_context);\n\n  return compiled_code_p;\n} /* parser_parse_arrow_function */\n\n/**\n * Parse class fields\n *\n * @return compiled code\n */\necma_compiled_code_t *\nparser_parse_class_fields (parser_context_t *context_p) /**< context */\n{\n  parser_saved_context_t saved_context;\n  ecma_compiled_code_t *compiled_code_p;\n\n  uint32_t extra_status_flags = context_p->status_flags & PARSER_INSIDE_WITH;\n\n  parser_save_context (context_p, &saved_context);\n  context_p->status_flags |= (PARSER_IS_FUNCTION\n                              | PARSER_ALLOW_SUPER\n                              | PARSER_INSIDE_CLASS_FIELD\n                              | PARSER_ALLOW_NEW_TARGET\n                              | extra_status_flags);\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"\\n--- Class fields parsing start ---\\n\\n\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_parse_function (context_p->token.line, context_p->token.column);\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  const uint8_t *source_end_p = context_p->source_end_p;\n  bool first_computed_class_field = true;\n  scanner_location_t end_location;\n  scanner_get_location (&end_location, context_p);\n\n  do\n  {\n    uint8_t class_field_type = context_p->stack_top_uint8;\n    parser_stack_pop_uint8 (context_p);\n\n    scanner_range_t range;\n\n    if (class_field_type & PARSER_CLASS_FIELD_INITIALIZED)\n    {\n      parser_stack_pop (context_p, &range, sizeof (scanner_range_t));\n    }\n    else if (class_field_type & PARSER_CLASS_FIELD_NORMAL)\n    {\n      parser_stack_pop (context_p, &range.start_location, sizeof (scanner_location_t));\n    }\n\n    uint16_t literal_index = 0;\n\n    if (class_field_type & PARSER_CLASS_FIELD_NORMAL)\n    {\n      scanner_set_location (context_p, &range.start_location);\n      context_p->source_end_p = source_end_p;\n      scanner_seek (context_p);\n\n      lexer_expect_object_literal_id (context_p, LEXER_OBJ_IDENT_ONLY_IDENTIFIERS);\n\n      literal_index = context_p->lit_object.index;\n\n      if (class_field_type & PARSER_CLASS_FIELD_INITIALIZED)\n      {\n        lexer_next_token (context_p);\n        JERRY_ASSERT (context_p->token.type == LEXER_ASSIGN);\n      }\n    }\n    else if (first_computed_class_field)\n    {\n      parser_emit_cbc (context_p, CBC_PUSH_NUMBER_0);\n      first_computed_class_field = false;\n    }\n\n    if (class_field_type & PARSER_CLASS_FIELD_INITIALIZED)\n    {\n      if (!(class_field_type & PARSER_CLASS_FIELD_NORMAL))\n      {\n        scanner_set_location (context_p, &range.start_location);\n        scanner_seek (context_p);\n      }\n\n      context_p->source_end_p = range.source_end_p;\n      lexer_next_token (context_p);\n      parser_parse_expression (context_p, PARSE_EXPR_NO_COMMA);\n\n      if (context_p->token.type != LEXER_EOS)\n      {\n        parser_raise_error (context_p, PARSER_ERR_SEMICOLON_EXPECTED);\n      }\n    }\n    else\n    {\n      parser_emit_cbc (context_p, CBC_PUSH_UNDEFINED);\n    }\n\n    if (class_field_type & PARSER_CLASS_FIELD_NORMAL)\n    {\n      parser_emit_cbc_literal (context_p, CBC_ASSIGN_PROP_THIS_LITERAL, literal_index);\n\n      /* Prepare stack slot for assignment property reference base. Needed by vm.c */\n      if (context_p->stack_limit == context_p->stack_depth)\n      {\n        context_p->stack_limit++;\n        JERRY_ASSERT (context_p->stack_limit <= PARSER_MAXIMUM_STACK_LIMIT);\n      }\n    }\n    else\n    {\n      parser_flush_cbc (context_p);\n\n      /* The next opcode pushes two more temporary values onto the stack */\n      if (context_p->stack_depth + 1 > context_p->stack_limit)\n      {\n        context_p->stack_limit = (uint16_t) (context_p->stack_depth + 1);\n        if (context_p->stack_limit > PARSER_MAXIMUM_STACK_LIMIT)\n        {\n          parser_raise_error (context_p, PARSER_ERR_STACK_LIMIT_REACHED);\n        }\n      }\n\n      parser_emit_cbc_ext (context_p, CBC_EXT_SET_NEXT_COMPUTED_FIELD);\n    }\n  }\n  while (!(context_p->stack_top_uint8 & PARSER_CLASS_FIELD_END));\n\n  if (!first_computed_class_field)\n  {\n    parser_emit_cbc (context_p, CBC_POP);\n  }\n\n  parser_flush_cbc (context_p);\n  context_p->source_end_p = source_end_p;\n  scanner_set_location (context_p, &end_location);\n\n  compiled_code_p = parser_post_processing (context_p);\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"\\n--- Class fields parsing end ---\\n\\n\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  parser_restore_context (context_p, &saved_context);\n\n  return compiled_code_p;\n} /* parser_parse_class_fields */\n\n/**\n * Check whether the last emitted cbc opcode was an anonymous function declaration\n *\n * @return PARSER_NOT_FUNCTION_LITERAL - if the last opcode is not a function literal\n *         PARSER_NAMED_FUNCTION - if the last opcode is not a named function declataion\n *         PARSER_ANONYMOUS_CLASS - if the last opcode is an anonymous class declaration\n *         literal index of the anonymous function literal - otherwise\n */\nuint16_t\nparser_check_anonymous_function_declaration (parser_context_t *context_p) /**< context */\n{\n  if (context_p->last_cbc_opcode == PARSER_TO_EXT_OPCODE (CBC_EXT_FINALIZE_ANONYMOUS_CLASS))\n  {\n    return PARSER_ANONYMOUS_CLASS;\n  }\n\n  if (context_p->last_cbc.literal_type != LEXER_FUNCTION_LITERAL)\n  {\n    return PARSER_NOT_FUNCTION_LITERAL;\n  }\n\n  uint16_t literal_index = PARSER_NOT_FUNCTION_LITERAL;\n\n  if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)\n  {\n    literal_index = context_p->last_cbc.literal_index;\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_TWO_LITERALS)\n  {\n    literal_index = context_p->last_cbc.value;\n  }\n  else if (context_p->last_cbc_opcode == CBC_PUSH_THREE_LITERALS)\n  {\n    literal_index = context_p->last_cbc.third_literal_index;\n  }\n  else\n  {\n    return PARSER_NOT_FUNCTION_LITERAL;\n  }\n\n  const ecma_compiled_code_t *bytecode_p;\n  bytecode_p = (const ecma_compiled_code_t *) (PARSER_GET_LITERAL (literal_index)->u.bytecode_p);\n  bool is_anon = ecma_is_value_magic_string (*ecma_compiled_code_resolve_function_name (bytecode_p),\n                                             LIT_MAGIC_STRING__EMPTY);\n\n  return (is_anon ? literal_index : PARSER_NAMED_FUNCTION);\n} /* parser_check_anonymous_function_declaration */\n\n/**\n * Set the function name of the function literal corresponds to the given function literal index\n * to the given character buffer of literal corresponds to the given name index.\n */\nvoid\nparser_set_function_name (parser_context_t *context_p, /**< context */\n                          uint16_t function_literal_index, /**< function literal index */\n                          uint16_t name_index, /**< function name literal index */\n                          uint32_t status_flags) /**< status flags */\n{\n  ecma_compiled_code_t *bytecode_p;\n  bytecode_p = (ecma_compiled_code_t *) (PARSER_GET_LITERAL (function_literal_index)->u.bytecode_p);\n\n  parser_compiled_code_set_function_name (context_p, bytecode_p, name_index, status_flags);\n} /* parser_set_function_name */\n\n/**\n * Set the function name of the given compiled code\n * to the given character buffer of literal corresponds to the given name index.\n */\nvoid\nparser_compiled_code_set_function_name (parser_context_t *context_p, /**< context */\n                                        ecma_compiled_code_t *bytecode_p, /**< function literal index */\n                                        uint16_t name_index, /**< function name literal index */\n                                        uint32_t status_flags) /**< status flags */\n{\n  ecma_value_t *func_name_start_p;\n  func_name_start_p = ecma_compiled_code_resolve_function_name ((const ecma_compiled_code_t *) bytecode_p);\n\n  if (JERRY_UNLIKELY (!ecma_is_value_magic_string (*func_name_start_p, LIT_MAGIC_STRING__EMPTY)))\n  {\n    return;\n  }\n\n  parser_scope_stack_t *scope_stack_start_p = context_p->scope_stack_p;\n  parser_scope_stack_t *scope_stack_p = scope_stack_start_p + context_p->scope_stack_top;\n\n  while (scope_stack_p > scope_stack_start_p)\n  {\n    scope_stack_p--;\n\n    if (scope_stack_p->map_from != PARSER_SCOPE_STACK_FUNC\n        && scanner_decode_map_to (scope_stack_p) == name_index)\n    {\n      name_index = scope_stack_p->map_from;\n      break;\n    }\n  }\n\n  lexer_literal_t *name_lit_p = (lexer_literal_t *) PARSER_GET_LITERAL (name_index);\n\n  if (name_lit_p->type != LEXER_IDENT_LITERAL && name_lit_p->type != LEXER_STRING_LITERAL)\n  {\n    return;\n  }\n\n  uint8_t *name_buffer_p = (uint8_t *) name_lit_p->u.char_p;\n  uint32_t name_length = name_lit_p->prop.length;\n\n  if (status_flags & (PARSER_IS_PROPERTY_GETTER | PARSER_IS_PROPERTY_SETTER))\n  {\n    name_length += 4;\n    name_buffer_p = (uint8_t *) parser_malloc (context_p, name_length * sizeof (uint8_t));\n    char *prefix_p = (status_flags & PARSER_IS_PROPERTY_GETTER) ? \"get \" : \"set \";\n    memcpy (name_buffer_p, prefix_p, 4);\n    memcpy (name_buffer_p + 4, name_lit_p->u.char_p, name_lit_p->prop.length);\n  }\n\n  *func_name_start_p = ecma_find_or_create_literal_string (name_buffer_p, name_length);\n\n  if (name_buffer_p != name_lit_p->u.char_p)\n  {\n    parser_free (name_buffer_p, name_length);\n  }\n} /* parser_compiled_code_set_function_name */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Raise a parse error.\n */\nvoid\nparser_raise_error (parser_context_t *context_p, /**< context */\n                    parser_error_t error) /**< error code */\n{\n  /* Must be compatible with the scanner because\n   * the lexer might throws errors during prescanning. */\n  parser_saved_context_t *saved_context_p = context_p->last_context_p;\n\n  while (saved_context_p != NULL)\n  {\n    parser_cbc_stream_free (&saved_context_p->byte_code);\n\n    /* First the current literal pool is freed, and then it is replaced\n     * by the literal pool coming from the saved context. Since literals\n     * are not used anymore, this is a valid replacement. The last pool\n     * is freed by parser_parse_source. */\n\n    parser_free_literals (&context_p->literal_pool);\n    context_p->literal_pool.data = saved_context_p->literal_pool_data;\n\n    if (context_p->scope_stack_p != NULL)\n    {\n      parser_free (context_p->scope_stack_p, context_p->scope_stack_size * sizeof (parser_scope_stack_t));\n    }\n    context_p->scope_stack_p = saved_context_p->scope_stack_p;\n    context_p->scope_stack_size = saved_context_p->scope_stack_size;\n\n    if (saved_context_p->last_statement.current_p != NULL)\n    {\n      parser_free_jumps (saved_context_p->last_statement);\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (saved_context_p->tagged_template_literal_cp != JMEM_CP_NULL)\n    {\n      ecma_collection_t *collection = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                       saved_context_p->tagged_template_literal_cp);\n      ecma_collection_free_template_literal (collection);\n    }\n#endif /* ENABLED (JERRY_ESNEXT)  */\n\n    saved_context_p = saved_context_p->prev_context_p;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (context_p->tagged_template_literal_cp != JMEM_CP_NULL)\n  {\n    ecma_collection_t *collection = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,\n                                                                     context_p->tagged_template_literal_cp);\n    ecma_collection_free_template_literal (collection);\n  }\n#endif /* ENABLED (JERRY_ESNEXT)  */\n\n  context_p->error = error;\n  PARSER_THROW (context_p->try_buffer);\n  /* Should never been reached. */\n  JERRY_ASSERT (0);\n} /* parser_raise_error */\n\n#endif /* ENABLED (JERRY_PARSER) */\n\n/**\n * Parse EcmaScript source code\n *\n * Note:\n *      if arg_list_p is not NULL, a function body is parsed\n *      returned value must be freed with ecma_free_value\n *\n * @return pointer to compiled byte code - if success\n *         NULL - otherwise\n */\necma_compiled_code_t *\nparser_parse_script (const uint8_t *arg_list_p, /**< function argument list */\n                     size_t arg_list_size, /**< size of function argument list */\n                     const uint8_t *source_p, /**< source code */\n                     size_t source_size, /**< size of the source code */\n                     ecma_value_t resource_name, /**< resource name */\n                     uint32_t parse_opts) /**< ecma_parse_opts_t option bits */\n{\n#if ENABLED (JERRY_PARSER)\n  parser_error_location_t parser_error;\n\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    jerry_debugger_send_string (JERRY_DEBUGGER_SOURCE_CODE,\n                                JERRY_DEBUGGER_NO_SUBTYPE,\n                                source_p,\n                                source_size);\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  ecma_compiled_code_t *bytecode_p = parser_parse_source (arg_list_p,\n                                                          arg_list_size,\n                                                          source_p,\n                                                          source_size,\n                                                          resource_name,\n                                                          parse_opts,\n                                                          &parser_error);\n\n  if (JERRY_UNLIKELY (bytecode_p == NULL))\n  {\n#if ENABLED (JERRY_DEBUGGER)\n    if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n    {\n      jerry_debugger_send_type (JERRY_DEBUGGER_PARSE_ERROR);\n    }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n    if (parser_error.error == PARSER_ERR_OUT_OF_MEMORY)\n    {\n      /* It is unlikely that memory can be allocated in an out-of-memory\n       * situation. However, a simple value can still be thrown. */\n      jcontext_raise_exception (ECMA_VALUE_NULL);\n      return NULL;\n    }\n\n#if ENABLED (JERRY_ERROR_MESSAGES)\n    ecma_string_t *err_str_p;\n\n    if (parser_error.error == PARSER_ERR_INVALID_REGEXP)\n    {\n      ecma_value_t error = jcontext_take_exception ();\n      ecma_property_t *prop_p = ecma_find_named_property (ecma_get_object_from_value (error),\n                                                          ecma_get_magic_string (LIT_MAGIC_STRING_MESSAGE));\n      ecma_free_value (error);\n      JERRY_ASSERT (prop_p);\n      err_str_p = ecma_get_string_from_value (ECMA_PROPERTY_VALUE_PTR (prop_p)->value);\n      ecma_ref_ecma_string (err_str_p);\n    }\n    else\n    {\n      const lit_utf8_byte_t *err_bytes_p = (const lit_utf8_byte_t *) parser_error_to_string (parser_error.error);\n      lit_utf8_size_t err_bytes_size = lit_zt_utf8_string_size (err_bytes_p);\n      err_str_p = ecma_new_ecma_string_from_utf8 (err_bytes_p, err_bytes_size);\n    }\n    ecma_value_t err_str_val = ecma_make_string_value (err_str_p);\n    ecma_value_t line_str_val = ecma_make_uint32_value (parser_error.line);\n    ecma_value_t col_str_val = ecma_make_uint32_value (parser_error.column);\n\n    ecma_raise_standard_error_with_format (ECMA_ERROR_SYNTAX,\n                                           \"% [%:%:%]\",\n                                           err_str_val,\n                                           resource_name,\n                                           line_str_val,\n                                           col_str_val);\n\n    ecma_free_value (col_str_val);\n    ecma_free_value (line_str_val);\n    ecma_deref_ecma_string (err_str_p);\n#else /* !ENABLED (JERRY_ERROR_MESSAGES) */\n    if (parser_error.error == PARSER_ERR_INVALID_REGEXP)\n    {\n      jcontext_release_exception ();\n    }\n\n    ecma_raise_syntax_error (\"\");\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n\n    return NULL;\n  }\n\n#if ENABLED (JERRY_DEBUGGER)\n  if ((JERRY_CONTEXT (debugger_flags) & (JERRY_DEBUGGER_CONNECTED | JERRY_DEBUGGER_PARSER_WAIT))\n      == (JERRY_DEBUGGER_CONNECTED | JERRY_DEBUGGER_PARSER_WAIT))\n  {\n    JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_PARSER_WAIT_MODE);\n    jerry_debugger_send_type (JERRY_DEBUGGER_WAITING_AFTER_PARSE);\n\n    while (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_PARSER_WAIT_MODE)\n    {\n      jerry_debugger_receive (NULL);\n\n      if (!(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED))\n      {\n        break;\n      }\n\n      jerry_debugger_transport_sleep ();\n    }\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  return bytecode_p;\n#else /* !ENABLED (JERRY_PARSER) */\n  JERRY_UNUSED (arg_list_p);\n  JERRY_UNUSED (arg_list_size);\n  JERRY_UNUSED (source_p);\n  JERRY_UNUSED (source_size);\n  JERRY_UNUSED (parse_opts);\n  JERRY_UNUSED (resource_name);\n\n  ecma_raise_syntax_error (ECMA_ERR_MSG (\"The parser has been disabled.\"));\n  return NULL;\n#endif /* ENABLED (JERRY_PARSER) */\n} /* parser_parse_script */\n\n/**\n * @}\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-parser.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JS_PARSER_H\n#define JS_PARSER_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_parser Parser\n * @{\n */\n\n/**\n * Error codes.\n */\ntypedef enum\n{\n  PARSER_ERR_NO_ERROR,                                /**< no error */\n\n  PARSER_ERR_OUT_OF_MEMORY,                           /**< out of memory */\n  PARSER_ERR_LITERAL_LIMIT_REACHED,                   /**< maximum number of literals reached */\n  PARSER_ERR_SCOPE_STACK_LIMIT_REACHED,               /**< maximum depth of scope stack reached */\n  PARSER_ERR_ARGUMENT_LIMIT_REACHED,                  /**< maximum number of function arguments reached */\n  PARSER_ERR_STACK_LIMIT_REACHED,                     /**< maximum function stack size reached */\n\n  PARSER_ERR_INVALID_CHARACTER,                       /**< unexpected character */\n  PARSER_ERR_INVALID_OCTAL_DIGIT,                     /**< invalid octal digit */\n  PARSER_ERR_INVALID_HEX_DIGIT,                       /**< invalid hexadecimal digit */\n#if ENABLED (JERRY_ESNEXT)\n  PARSER_ERR_INVALID_BIN_DIGIT,                       /**< invalid binary digit */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  PARSER_ERR_INVALID_ESCAPE_SEQUENCE,                 /**< invalid escape sequence */\n  PARSER_ERR_INVALID_UNICODE_ESCAPE_SEQUENCE,         /**< invalid unicode escape sequence */\n  PARSER_ERR_INVALID_IDENTIFIER_START,                /**< character cannot be start of an identifier */\n  PARSER_ERR_INVALID_IDENTIFIER_PART,                 /**< character cannot be part of an identifier */\n  PARSER_ERR_INVALID_KEYWORD,                         /**< escape sequences are not allowed in keywords */\n\n  PARSER_ERR_INVALID_NUMBER,                          /**< invalid number literal */\n  PARSER_ERR_MISSING_EXPONENT,                        /**< missing exponent */\n  PARSER_ERR_IDENTIFIER_AFTER_NUMBER,                 /**< identifier start after number */\n  PARSER_ERR_INVALID_UNDERSCORE_IN_NUMBER,        /**< invalid use of underscore in number */\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  PARSER_ERR_INVALID_BIGINT,                          /**< number is not a valid BigInt */\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  PARSER_ERR_INVALID_REGEXP,                          /**< invalid regular expression */\n  PARSER_ERR_UNKNOWN_REGEXP_FLAG,                     /**< unknown regexp flag */\n  PARSER_ERR_DUPLICATED_REGEXP_FLAG,                  /**< duplicated regexp flag */\n  PARSER_ERR_UNSUPPORTED_REGEXP,                      /**< regular expression is not supported */\n\n  PARSER_ERR_IDENTIFIER_TOO_LONG,                     /**< too long identifier */\n  PARSER_ERR_STRING_TOO_LONG,                         /**< too long string literal */\n  PARSER_ERR_NUMBER_TOO_LONG,                         /**< too long number literal */\n  PARSER_ERR_REGEXP_TOO_LONG,                         /**< too long regexp literal */\n\n  PARSER_ERR_UNTERMINATED_MULTILINE_COMMENT,          /**< unterminated multiline comment */\n  PARSER_ERR_UNTERMINATED_STRING,                     /**< unterminated string literal */\n  PARSER_ERR_UNTERMINATED_REGEXP,                     /**< unterminated regexp literal */\n\n  PARSER_ERR_NEWLINE_NOT_ALLOWED,                     /**< newline is not allowed */\n  PARSER_ERR_OCTAL_NUMBER_NOT_ALLOWED,                /**< octal numbers are not allowed in strict mode */\n  PARSER_ERR_OCTAL_ESCAPE_NOT_ALLOWED,                /**< octal escape sequences are not allowed in strict mode */\n#if ENABLED (JERRY_ESNEXT)\n  PARSER_ERR_TEMPLATE_STR_OCTAL_ESCAPE,               /**< octal escape sequences are not allowed in template strings */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  PARSER_ERR_STRICT_IDENT_NOT_ALLOWED,                /**< identifier name is reserved in strict mode */\n  PARSER_ERR_EVAL_NOT_ALLOWED,                        /**< eval is not allowed here in strict mode */\n  PARSER_ERR_ARGUMENTS_NOT_ALLOWED,                   /**< arguments is not allowed here in strict mode */\n#if ENABLED (JERRY_ESNEXT)\n  PARSER_ERR_USE_STRICT_NOT_ALLOWED,                  /**< use strict directive is not allowed */\n  PARSER_ERR_YIELD_NOT_ALLOWED,                       /**< yield expression is not allowed */\n  PARSER_ERR_AWAIT_NOT_ALLOWED,                       /**< await expression is not allowed */\n  PARSER_ERR_FOR_IN_OF_DECLARATION,                   /**< variable declaration in for-in or for-of loop */\n  PARSER_ERR_FOR_AWAIT_NO_ASYNC,                      /**< for-await-of is only allowed inside async functions */\n  PARSER_ERR_FOR_AWAIT_NO_OF,                         /**< only 'of' form is allowed for for-await loops */\n  PARSER_ERR_DUPLICATED_PROTO,                        /**< duplicated __proto__ fields are not allowed */\n  PARSER_ERR_INVALID_LHS_ASSIGNMENT,                  /**< invalid LeftHandSide in assignment */\n  PARSER_ERR_INVALID_LHS_POSTFIX_OP,                  /**< invalid LeftHandSide expression in postfix operation */\n  PARSER_ERR_INVALID_LHS_FOR_LOOP,                    /**< invalid LeftHandSide in for-loop */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  PARSER_ERR_DELETE_IDENT_NOT_ALLOWED,                /**< identifier delete is not allowed in strict mode */\n  PARSER_ERR_EVAL_CANNOT_ASSIGNED,                    /**< eval cannot be assigned in strict mode */\n  PARSER_ERR_ARGUMENTS_CANNOT_ASSIGNED,               /**< arguments cannot be assigned in strict mode */\n  PARSER_ERR_WITH_NOT_ALLOWED,                        /**< with statement is not allowed in strict mode */\n  PARSER_ERR_MULTIPLE_DEFAULTS_NOT_ALLOWED,           /**< multiple default cases are not allowed */\n  PARSER_ERR_DEFAULT_NOT_IN_SWITCH,                   /**< default statement is not in switch block */\n  PARSER_ERR_CASE_NOT_IN_SWITCH,                      /**< case statement is not in switch block */\n\n  PARSER_ERR_LEFT_PAREN_EXPECTED,                     /**< left paren expected */\n  PARSER_ERR_LEFT_BRACE_EXPECTED,                     /**< left brace expected */\n  PARSER_ERR_RIGHT_PAREN_EXPECTED,                    /**< right paren expected */\n  PARSER_ERR_RIGHT_SQUARE_EXPECTED,                   /**< right square expected */\n\n  PARSER_ERR_COLON_EXPECTED,                          /**< colon expected */\n  PARSER_ERR_COLON_FOR_CONDITIONAL_EXPECTED,          /**< colon expected for conditional expression */\n  PARSER_ERR_SEMICOLON_EXPECTED,                      /**< semicolon expected */\n  PARSER_ERR_IN_EXPECTED,                             /**< in keyword expected */\n  PARSER_ERR_WHILE_EXPECTED,                          /**< while expected for do-while loop */\n  PARSER_ERR_CATCH_FINALLY_EXPECTED,                  /**< catch or finally expected */\n  PARSER_ERR_ARRAY_ITEM_SEPARATOR_EXPECTED,           /**< array item separator expected */\n  PARSER_ERR_OBJECT_ITEM_SEPARATOR_EXPECTED,          /**< object item separator expected */\n  PARSER_ERR_IDENTIFIER_EXPECTED,                     /**< identifier expected */\n  PARSER_ERR_EXPRESSION_EXPECTED,                     /**< expression expected */\n  PARSER_ERR_PRIMARY_EXP_EXPECTED,                    /**< primary expression expected */\n  PARSER_ERR_LEFT_HAND_SIDE_EXP_EXPECTED,             /**< left-hand-side expression expected */\n  PARSER_ERR_STATEMENT_EXPECTED,                      /**< statement expected */\n  PARSER_ERR_PROPERTY_IDENTIFIER_EXPECTED,            /**< property identifier expected */\n  PARSER_ERR_ARGUMENT_LIST_EXPECTED,                  /**< argument list expected */\n  PARSER_ERR_NO_ARGUMENTS_EXPECTED,                   /**< property getters must have no arguments */\n  PARSER_ERR_ONE_ARGUMENT_EXPECTED,                   /**< property setters must have one argument */\n\n  PARSER_ERR_INVALID_EXPRESSION,                      /**< invalid expression */\n  PARSER_ERR_INVALID_SWITCH,                          /**< invalid switch body */\n  PARSER_ERR_INVALID_BREAK,                           /**< break must be inside a loop or switch */\n  PARSER_ERR_INVALID_BREAK_LABEL,                     /**< break target not found */\n  PARSER_ERR_INVALID_CONTINUE,                        /**< continue must be inside a loop */\n  PARSER_ERR_INVALID_CONTINUE_LABEL,                  /**< continue target not found */\n  PARSER_ERR_INVALID_RETURN,                          /**< return must be inside a function */\n  PARSER_ERR_INVALID_RIGHT_SQUARE,                    /**< right square must terminate a block */\n  PARSER_ERR_DUPLICATED_LABEL,                        /**< duplicated label */\n  PARSER_ERR_OBJECT_PROPERTY_REDEFINED,               /**< property of object literal redefined */\n#if ENABLED (JERRY_ESNEXT)\n  PARSER_ERR_VARIABLE_REDECLARED,                     /**< a variable redeclared */\n  PARSER_ERR_LEXICAL_SINGLE_STATEMENT,                /**< lexical declaration in single statement context */\n  PARSER_ERR_LABELLED_FUNC_NOT_IN_BLOCK,              /**< labelled functions are only allowed inside blocks */\n  PARSER_ERR_LEXICAL_LET_BINDING,                     /**< let binding cannot be declared in let/const */\n  PARSER_ERR_MISSING_ASSIGN_AFTER_CONST,              /**< an assignment is required after a const declaration */\n\n  PARSER_ERR_MULTIPLE_CLASS_CONSTRUCTORS,             /**< multiple class constructor */\n  PARSER_ERR_CLASS_CONSTRUCTOR_AS_ACCESSOR,           /**< class constructor cannot be an accessor */\n  PARSER_ERR_INVALID_CLASS_CONSTRUCTOR,               /**< class constructor cannot be a generator or async function */\n  PARSER_ERR_CLASS_STATIC_PROTOTYPE,                  /**< static method name 'prototype' is not allowed */\n  PARSER_ERR_UNEXPECTED_SUPER_KEYWORD,                /**< unexpected super keyword */\n  PARSER_ERR_TOO_MANY_CLASS_FIELDS,                   /**< too many computed class fields */\n  PARSER_ERR_ARGUMENTS_IN_CLASS_FIELD,                /**< arguments is not allowed in class fields */\n\n  PARSER_ERR_RIGHT_BRACE_EXPECTED,                    /**< right brace expected */\n  PARSER_ERR_OF_EXPECTED,                             /**< of keyword expected */\n\n  PARSER_ERR_ASSIGNMENT_EXPECTED,                     /**< assignment expression expected */\n  PARSER_ERR_FORMAL_PARAM_AFTER_REST_PARAMETER,       /**< formal parameter after rest parameter */\n  PARSER_ERR_SETTER_REST_PARAMETER,                   /**< setter rest parameter */\n  PARSER_ERR_REST_PARAMETER_DEFAULT_INITIALIZER,      /**< rest parameter default initializer */\n  PARSER_ERR_DUPLICATED_ARGUMENT_NAMES,               /**< duplicated argument names */\n  PARSER_ERR_INVALID_DESTRUCTURING_PATTERN,           /**< invalid destructuring pattern */\n  PARSER_ERR_ILLEGAL_PROPERTY_IN_DECLARATION,         /**< illegal property in declaration context */\n  PARSER_ERR_INVALID_EXPONENTIATION,                  /**< left operand of ** operator cannot be unary expression */\n  PARSER_ERR_INVALID_NULLISH_COALESCING,              /**< Cannot chain nullish with logical AND or OR. */\n  PARSER_ERR_NEW_TARGET_EXPECTED,                     /**< expected new.target expression */\n  PARSER_ERR_NEW_TARGET_NOT_ALLOWED,                  /**< new.target is not allowed in the given context */\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  PARSER_ERR_FILE_NOT_FOUND,                          /**< file not found*/\n  PARSER_ERR_FROM_EXPECTED,                           /**< from expected */\n  PARSER_ERR_FROM_COMMA_EXPECTED,                     /**< from or comma expected */\n  PARSER_ERR_AS_EXPECTED,                             /**< as expected */\n  PARSER_ERR_STRING_EXPECTED,                         /**< string literal expected */\n  PARSER_ERR_MODULE_UNEXPECTED,                       /**< unexpected import or export statement */\n  PARSER_ERR_LEFT_BRACE_MULTIPLY_LITERAL_EXPECTED,    /**< left brace or multiply or literal expected */\n  PARSER_ERR_LEFT_BRACE_MULTIPLY_EXPECTED,            /**< left brace or multiply expected */\n  PARSER_ERR_RIGHT_BRACE_COMMA_EXPECTED,              /**< right brace or comma expected */\n  PARSER_ERR_DUPLICATED_EXPORT_IDENTIFIER,            /**< duplicated export identifier name */\n  PARSER_ERR_DUPLICATED_IMPORT_BINDING,               /**< duplicated import binding name */\n  PARSER_ERR_EXPORT_NOT_DEFINED,                      /**< export is not defined in module */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n  PARSER_ERR_NON_STRICT_ARG_DEFINITION                /**< non-strict argument definition */\n} parser_error_t;\n\n/**\n * Source code line counter type.\n */\ntypedef uint32_t parser_line_counter_t;\n\n/**\n * Error code location.\n */\ntypedef struct\n{\n  parser_error_t error;                               /**< error code */\n  parser_line_counter_t line;                         /**< line where the error occured */\n  parser_line_counter_t column;                       /**< column where the error occured */\n} parser_error_location_t;\n\n/* Note: source must be a valid UTF-8 string */\necma_compiled_code_t *\nparser_parse_script (const uint8_t *arg_list_p,\n                     size_t arg_list_size,\n                     const uint8_t *source_p,\n                     size_t source_size,\n                     ecma_value_t resource_name,\n                     uint32_t parse_opts);\n\n#if ENABLED (JERRY_ERROR_MESSAGES)\nconst char *parser_error_to_string (parser_error_t);\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* !JS_PARSER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-scanner-internal.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JS_SCANNER_INTERNAL_H\n#define JS_SCANNER_INTERNAL_H\n\n/* \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_scanner Scanner\n * @{\n */\n\n/**\n * Scan mode types.\n */\ntypedef enum\n{\n  SCAN_MODE_PRIMARY_EXPRESSION,            /**< scanning primary expression */\n  SCAN_MODE_PRIMARY_EXPRESSION_AFTER_NEW,  /**< scanning primary expression after new */\n  SCAN_MODE_POST_PRIMARY_EXPRESSION,       /**< scanning post primary expression */\n  SCAN_MODE_PRIMARY_EXPRESSION_END,        /**< scanning primary expression end */\n  SCAN_MODE_STATEMENT,                     /**< scanning statement */\n  SCAN_MODE_STATEMENT_OR_TERMINATOR,       /**< scanning statement or statement end */\n  SCAN_MODE_STATEMENT_END,                 /**< scanning statement end */\n  SCAN_MODE_VAR_STATEMENT,                 /**< scanning var statement */\n  SCAN_MODE_PROPERTY_NAME,                 /**< scanning property name */\n  SCAN_MODE_FUNCTION_ARGUMENTS,            /**< scanning function arguments */\n#if ENABLED (JERRY_ESNEXT)\n  SCAN_MODE_CONTINUE_FUNCTION_ARGUMENTS,   /**< continue scanning function arguments */\n  SCAN_MODE_BINDING,                       /**< array or object binding */\n  SCAN_MODE_CLASS_DECLARATION,             /**< scanning class declaration */\n  SCAN_MODE_CLASS_BODY,                    /**< scanning class body */\n  SCAN_MODE_CLASS_BODY_NO_SCAN,            /**< scanning class body without calling lexer_scan_identifier */\n#endif /* ENABLED (JERRY_ESNEXT) */\n} scan_modes_t;\n\n/**\n * Scan stack mode types.\n */\ntypedef enum\n{\n  SCAN_STACK_SCRIPT,                       /**< script */\n  SCAN_STACK_SCRIPT_FUNCTION,              /**< script is a function body */\n  SCAN_STACK_BLOCK_STATEMENT,              /**< block statement group */\n  SCAN_STACK_FUNCTION_STATEMENT,           /**< function statement */\n  SCAN_STACK_FUNCTION_EXPRESSION,          /**< function expression */\n  SCAN_STACK_FUNCTION_PROPERTY,            /**< function expression in an object literal */\n#if ENABLED (JERRY_ESNEXT)\n  SCAN_STACK_FUNCTION_ARROW,               /**< arrow function expression */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCAN_STACK_SWITCH_BLOCK,                 /**< block part of \"switch\" statement */\n  SCAN_STACK_IF_STATEMENT,                 /**< statement part of \"if\" statements */\n  SCAN_STACK_WITH_STATEMENT,               /**< statement part of \"with\" statements */\n  SCAN_STACK_WITH_EXPRESSION,              /**< expression part of \"with\" statements */\n  SCAN_STACK_DO_STATEMENT,                 /**< statement part of \"do\" statements */\n  SCAN_STACK_DO_EXPRESSION,                /**< expression part of \"do\" statements */\n  SCAN_STACK_WHILE_EXPRESSION,             /**< expression part of \"while\" iterator */\n  SCAN_STACK_PAREN_EXPRESSION,             /**< expression in brackets */\n  SCAN_STACK_STATEMENT_WITH_EXPR,          /**< statement which starts with expression enclosed in brackets */\n#if ENABLED (JERRY_ESNEXT)\n  SCAN_STACK_BINDING_INIT,                 /**< post processing after a single initializer */\n  SCAN_STACK_BINDING_LIST_INIT,            /**< post processing after an initializer list */\n  SCAN_STACK_LET,                          /**< let statement */\n  SCAN_STACK_CONST,                        /**< const statement */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  /* The SCANNER_IS_FOR_START macro needs to be updated when the following constants are reordered. */\n  SCAN_STACK_VAR,                          /**< var statement */\n  SCAN_STACK_FOR_VAR_START,                /**< start of \"for\" iterator with var statement */\n#if ENABLED (JERRY_ESNEXT)\n  SCAN_STACK_FOR_LET_START,                /**< start of \"for\" iterator with let statement */\n  SCAN_STACK_FOR_CONST_START,              /**< start of \"for\" iterator with const statement */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCAN_STACK_FOR_START,                    /**< start of \"for\" iterator */\n  SCAN_STACK_FOR_CONDITION,                /**< condition part of \"for\" iterator */\n  SCAN_STACK_FOR_EXPRESSION,               /**< expression part of \"for\" iterator */\n  SCAN_STACK_SWITCH_EXPRESSION,            /**< expression part of \"switch\" statement */\n  SCAN_STACK_CASE_STATEMENT,               /**< case statement inside a switch statement */\n  SCAN_STACK_COLON_EXPRESSION,             /**< expression between a question mark and colon */\n  SCAN_STACK_TRY_STATEMENT,                /**< try statement */\n  SCAN_STACK_CATCH_STATEMENT,              /**< catch statement */\n  SCAN_STACK_ARRAY_LITERAL,                /**< array literal or destructuring assignment or binding */\n  SCAN_STACK_OBJECT_LITERAL,               /**< object literal group */\n  SCAN_STACK_PROPERTY_ACCESSOR,            /**< property accessor in square brackets */\n#if ENABLED (JERRY_ESNEXT)\n  /* These four must be in this order. */\n  SCAN_STACK_COMPUTED_PROPERTY,            /**< computed property name */\n  SCAN_STACK_COMPUTED_GENERATOR,           /**< computed generator function */\n  SCAN_STACK_COMPUTED_ASYNC,               /**< computed async function */\n  SCAN_STACK_COMPUTED_ASYNC_GENERATOR,     /**< computed async function */\n  SCAN_STACK_TEMPLATE_STRING,              /**< template string */\n  SCAN_STACK_TAGGED_TEMPLATE_LITERAL,      /**< tagged template literal */\n  SCAN_STACK_PRIVATE_BLOCK_EARLY,          /**< private block for single statements (force early declarations) */\n  SCAN_STACK_PRIVATE_BLOCK,                /**< private block for single statements */\n  SCAN_STACK_ARROW_ARGUMENTS,              /**< might be arguments of an arrow function */\n  SCAN_STACK_ARROW_EXPRESSION,             /**< expression body of an arrow function */\n  SCAN_STACK_EXPLICIT_CLASS_CONSTRUCTOR,   /**< explicit class constructor */\n  SCAN_STACK_IMPLICIT_CLASS_CONSTRUCTOR,   /**< implicit class constructor */\n  SCAN_STACK_CLASS_STATEMENT,              /**< class statement */\n  SCAN_STACK_CLASS_EXPRESSION,             /**< class expression */\n  SCAN_STACK_CLASS_EXTENDS,                /**< class extends expression */\n  SCAN_STACK_CLASS_FIELD_INITIALIZER,      /**< class field initializer */\n  SCAN_STACK_FUNCTION_PARAMETERS,          /**< function parameter initializer */\n  SCAN_STACK_FOR_START_PATTERN,            /**< possible assignment pattern for \"for\" iterator */\n  SCAN_STACK_USE_ASYNC,                    /**< an \"async\" identifier is used */\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  SCAN_STACK_EXPORT_DEFAULT,               /**< scan primary expression after export default */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n} scan_stack_modes_t;\n\n/**\n * Scanner context flag types.\n */\ntypedef enum\n{\n  SCANNER_CONTEXT_NO_FLAGS = 0, /**< no flags are set */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_CONTEXT_THROW_ERR_ASYNC_FUNCTION = (1 << 0), /**< throw async function error */\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_DEBUGGER)\n  SCANNER_CONTEXT_DEBUGGER_ENABLED = (1 << 1), /**< debugger is enabled */\n#endif /* ENABLED (JERRY_DEBUGGER) */\n} scanner_context_flags_t;\n\n/**\n * Checks whether the stack top is a for statement start.\n */\n#define SCANNER_IS_FOR_START(stack_top) \\\n  ((stack_top) >= SCAN_STACK_FOR_VAR_START && (stack_top) <= SCAN_STACK_FOR_START)\n\n/**\n * Generic descriptor which stores only the start position.\n */\ntypedef struct\n{\n  const uint8_t *source_p; /**< start source byte */\n} scanner_source_start_t;\n\n/**\n * Descriptor for storing a binding literal on stack.\n */\ntypedef struct\n{\n  lexer_lit_location_t *literal_p; /**< binding literal */\n} scanner_binding_literal_t;\n\n/**\n * Flags for type member of lexer_lit_location_t structure in the literal pool.\n */\ntypedef enum\n{\n  SCANNER_LITERAL_IS_ARG = (1 << 0), /**< literal is argument */\n  SCANNER_LITERAL_IS_VAR = (1 << 1), /**< literal is var */\n#if ENABLED (JERRY_ESNEXT)\n  /** literal is a destructured argument binding of a possible arrow function */\n  SCANNER_LITERAL_IS_ARROW_DESTRUCTURED_ARG = SCANNER_LITERAL_IS_VAR,\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCANNER_LITERAL_IS_FUNC = (1 << 2), /**< literal is function */\n  SCANNER_LITERAL_NO_REG = (1 << 3), /**< literal cannot be stored in a register */\n  SCANNER_LITERAL_IS_LET = (1 << 4), /**< literal is let */\n#if ENABLED (JERRY_ESNEXT)\n  /** literal is a function declared in this block (prevents declaring let/const with the same name) */\n  SCANNER_LITERAL_IS_FUNC_DECLARATION = SCANNER_LITERAL_IS_LET,\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCANNER_LITERAL_IS_CONST = (1 << 5), /**< literal is const */\n#if ENABLED (JERRY_ESNEXT)\n  /** literal is a destructured argument binding */\n  SCANNER_LITERAL_IS_DESTRUCTURED_ARG = SCANNER_LITERAL_IS_CONST,\n  SCANNER_LITERAL_IS_USED = (1 << 6), /**< literal is used */\n  SCANNER_LITERAL_EARLY_CREATE = (1 << 7), /**< binding should be created early with ECMA_VALUE_UNINITIALIZED */\n#endif /* ENABLED (JERRY_ESNEXT) */\n} scanner_literal_type_flags_t;\n\n/*\n * Known combinations:\n *\n *  SCANNER_LITERAL_IS_FUNC | SCANNER_LITERAL_IS_FUNC_DECLARATION :\n *         function declared in this block\n *  SCANNER_LITERAL_IS_LOCAL :\n *         module import on global scope, catch block variable otherwise\n *  SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_IS_FUNC :\n *         a function argument which is reassigned to a function later\n *  SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_IS_DESTRUCTURED_ARG :\n *         destructured binding argument\n *  SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_IS_DESTRUCTURED_ARG | SCANNER_LITERAL_IS_FUNC :\n *         destructured binding argument which is reassigned to a function later\n */\n\n/**\n * Literal is a local declration (let, const, catch variable, etc.)\n */\n#define SCANNER_LITERAL_IS_LOCAL (SCANNER_LITERAL_IS_LET | SCANNER_LITERAL_IS_CONST)\n\n/**\n * Literal is a local function declaration\n */\n#define SCANNER_LITERAL_IS_LOCAL_FUNC (SCANNER_LITERAL_IS_FUNC | SCANNER_LITERAL_IS_FUNC_DECLARATION)\n\n/**\n * For statement descriptor.\n */\ntypedef struct\n{\n  /** shared fields of for statements */\n  union\n  {\n    const uint8_t *source_p; /**< start source byte */\n    scanner_for_info_t *for_info_p; /**< for info */\n  } u;\n} scanner_for_statement_t;\n\n/**\n * Switch statement descriptor.\n */\ntypedef struct\n{\n  scanner_case_info_t **last_case_p; /**< last case info */\n} scanner_switch_statement_t;\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Types of scanner destructuring bindings.\n */\ntypedef enum\n{\n  /* Update SCANNER_NEEDS_BINDING_LIST after changing these values. */\n  SCANNER_BINDING_NONE, /**< not a destructuring binding expression */\n  SCANNER_BINDING_VAR, /**< destructuring var binding */\n  SCANNER_BINDING_LET, /**< destructuring let binding */\n  SCANNER_BINDING_CATCH, /**< destructuring catch binding */\n  SCANNER_BINDING_CONST, /**< destructuring const binding */\n  SCANNER_BINDING_ARG, /**< destructuring arg binding */\n  SCANNER_BINDING_ARROW_ARG, /**< possible destructuring arg binding of an arrow function */\n} scanner_binding_type_t;\n\n/**\n * Check whether a binding list is needed for the binding pattern.\n */\n#define SCANNER_NEEDS_BINDING_LIST(type) ((type) >= SCANNER_BINDING_LET)\n\n/**\n * Scanner binding items for destructuring binding patterns.\n */\ntypedef struct scanner_binding_item_t\n{\n  struct scanner_binding_item_t *next_p; /**< next binding in the list */\n  lexer_lit_location_t *literal_p; /**< binding literal */\n} scanner_binding_item_t;\n\n/**\n * Scanner binding lists for destructuring binding patterns.\n */\ntypedef struct scanner_binding_list_t\n{\n  struct scanner_binding_list_t *prev_p; /**< prev list */\n  scanner_binding_item_t *items_p; /**< list of bindings */\n  bool is_nested; /**< is nested binding declaration */\n} scanner_binding_list_t;\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Flags for scanner_literal_pool_t structure.\n */\ntypedef enum\n{\n  SCANNER_LITERAL_POOL_FUNCTION = (1 << 0), /**< literal pool represents a function */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_LITERAL_POOL_CLASS_NAME = (1 << 1), /**< literal pool which contains a class name */\n  SCANNER_LITERAL_POOL_CLASS_FIELD = (1 << 2), /**< literal pool is created for a class field initializer */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCANNER_LITERAL_POOL_IS_STRICT = (1 << 3), /**< literal pool represents a strict mode code block */\n  SCANNER_LITERAL_POOL_CAN_EVAL = (1 << 4), /**< prepare for executing eval in this block */\n  SCANNER_LITERAL_POOL_NO_ARGUMENTS = (1 << 5), /**< arguments object must not be constructed,\n                                                 *   or arguments cannot be stored in registers if\n                                                 *   SCANNER_LITERAL_POOL_ARGUMENTS_IN_ARGS is set */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_LITERAL_POOL_ARGUMENTS_IN_ARGS = (1 << 6), /**< arguments is referenced in function args */\n  SCANNER_LITERAL_POOL_HAS_COMPLEX_ARGUMENT = (1 << 7), /**< function has complex (ES2015+) argument definition */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCANNER_LITERAL_POOL_IN_WITH = (1 << 8), /**< literal pool is in a with statement */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_LITERAL_POOL_ARROW = (1 << 9), /**< arrow function */\n  SCANNER_LITERAL_POOL_GENERATOR = (1 << 10), /**< generator function */\n  SCANNER_LITERAL_POOL_ASYNC = (1 << 11), /**< async function */\n  SCANNER_LITERAL_POOL_FUNCTION_STATEMENT = (1 << 12), /**< function statement */\n  SCANNER_LITERAL_POOL_HAS_SUPER_REFERENCE = (1 << 13), /**< function body contains super reference */\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  SCANNER_LITERAL_POOL_IN_EXPORT = (1 << 14), /**< the declared variables are exported by the module system */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n} scanner_literal_pool_flags_t;\n\n/**\n * Define a function where no arguments are allowed.\n */\n#define SCANNER_LITERAL_POOL_ARROW_FLAGS \\\n  (SCANNER_LITERAL_POOL_FUNCTION | SCANNER_LITERAL_POOL_NO_ARGUMENTS | SCANNER_LITERAL_POOL_ARROW)\n\n/**\n * This flag represents that the bracketed expression might be an async arrow function.\n * The SCANNER_LITERAL_POOL_ARROW flag is reused for this purpose.\n */\n#define SCANNER_LITERAL_POOL_MAY_ASYNC_ARROW SCANNER_LITERAL_POOL_ARROW\n\n/**\n * Getting the generator and async properties of literal pool status flags.\n */\n#define SCANNER_FROM_LITERAL_POOL_TO_COMPUTED(status_flags) \\\n  ((uint8_t) ((((status_flags) >> 10) & 0x3) + SCAN_STACK_COMPUTED_PROPERTY))\n\n/**\n * Setting the generator and async properties of literal pool status flags.\n */\n#define SCANNER_FROM_COMPUTED_TO_LITERAL_POOL(mode) \\\n  (((mode) - SCAN_STACK_COMPUTED_PROPERTY) << 10)\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Literal pool which may contains function argument identifiers\n */\n#define SCANNER_LITERAL_POOL_MAY_HAVE_ARGUMENTS(status_flags) \\\n  (!((status_flags) & (SCANNER_LITERAL_POOL_CLASS_NAME | SCANNER_LITERAL_POOL_CLASS_FIELD)))\n\n#else /* !ENABLED (JERRY_ESNEXT) */\n\n/**\n * Literal pool which may contains function argument identifiers\n */\n#define SCANNER_LITERAL_POOL_MAY_HAVE_ARGUMENTS(status_flags) true\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Local literal pool.\n */\ntypedef struct scanner_literal_pool_t\n{\n  struct scanner_literal_pool_t *prev_p; /**< previous literal pool */\n  const uint8_t *source_p; /**< source position where the final data needs to be inserted */\n  parser_list_t literal_pool; /**< list of literal */\n  uint16_t status_flags; /**< combination of scanner_literal_pool_flags_t flags */\n  uint16_t no_declarations; /**< size of scope stack required during parsing */\n} scanner_literal_pool_t;\n\n/**\n * Scanner context.\n */\nstruct scanner_context_t\n{\n  uint32_t context_status_flags; /**< original status flags of the context */\n  uint8_t mode; /**< scanner mode */\n#if ENABLED (JERRY_ESNEXT)\n  uint8_t binding_type; /**< current destructuring binding type */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  uint16_t status_flags; /**< scanner status flags */\n#if ENABLED (JERRY_ESNEXT)\n  scanner_binding_list_t *active_binding_list_p; /**< currently active binding list */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  scanner_literal_pool_t *active_literal_pool_p; /**< currently active literal pool */\n  scanner_switch_statement_t active_switch_statement; /**< currently active switch statement */\n  scanner_info_t *end_arguments_p; /**< position of end arguments */\n#if ENABLED (JERRY_ESNEXT)\n  const uint8_t *async_source_p; /**< source position for async functions */\n#endif /* ENABLED (JERRY_ESNEXT) */\n};\n\n/* Scanner utils. */\n\nvoid scanner_raise_error (parser_context_t *context_p);\n#if ENABLED (JERRY_ESNEXT)\nvoid scanner_raise_redeclaration_error (parser_context_t *context_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\nvoid *scanner_malloc (parser_context_t *context_p, size_t size);\nvoid scanner_free (void *ptr, size_t size);\n\nsize_t scanner_get_stream_size (scanner_info_t *info_p, size_t size);\nscanner_info_t *scanner_insert_info (parser_context_t *context_p, const uint8_t *source_p, size_t size);\nscanner_info_t *scanner_insert_info_before (parser_context_t *context_p, const uint8_t *source_p,\n                                            scanner_info_t *start_info_p, size_t size);\nscanner_literal_pool_t *scanner_push_literal_pool (parser_context_t *context_p, scanner_context_t *scanner_context_p,\n                                                   uint16_t status_flags);\nvoid scanner_pop_literal_pool (parser_context_t *context_p, scanner_context_t *scanner_context_p);\n#if ENABLED (JERRY_ESNEXT)\nvoid scanner_filter_arguments (parser_context_t *context_p, scanner_context_t *scanner_context_p);\nvoid scanner_construct_global_block (parser_context_t *context_p, scanner_context_t *scanner_context_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\nlexer_lit_location_t *scanner_add_custom_literal (parser_context_t *context_p, scanner_literal_pool_t *literal_pool_p,\n                                                  const lexer_lit_location_t *literal_location_p);\nlexer_lit_location_t *scanner_add_literal (parser_context_t *context_p, scanner_context_t *scanner_context_p);\nvoid scanner_add_reference (parser_context_t *context_p, scanner_context_t *scanner_context_p);\nlexer_lit_location_t *scanner_append_argument (parser_context_t *context_p, scanner_context_t *scanner_context_p);\n#if ENABLED (JERRY_ESNEXT)\nvoid scanner_detect_invalid_var (parser_context_t *context_p, scanner_context_t *scanner_context_p,\n                                 lexer_lit_location_t *var_literal_p);\nvoid scanner_detect_invalid_let (parser_context_t *context_p, lexer_lit_location_t *let_literal_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\nvoid scanner_detect_eval_call (parser_context_t *context_p, scanner_context_t *scanner_context_p);\n\n#if ENABLED (JERRY_ESNEXT)\nlexer_lit_location_t *scanner_push_class_declaration (parser_context_t *context_p,\n                                                      scanner_context_t *scanner_context_p, uint8_t stack_mode);\nvoid scanner_push_class_field_initializer (parser_context_t *context_p, scanner_context_t *scanner_context_p);\nvoid scanner_push_destructuring_pattern (parser_context_t *context_p, scanner_context_t *scanner_context_p,\n                                         uint8_t binding_type, bool is_nested);\nvoid scanner_pop_binding_list (scanner_context_t *scanner_context_p);\nvoid scanner_append_hole (parser_context_t *context_p, scanner_context_t *scanner_context_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/* Scanner operations. */\n\n#if ENABLED (JERRY_ESNEXT)\nvoid scanner_add_async_literal (parser_context_t *context_p, scanner_context_t *scanner_context_p);\nvoid scanner_check_arrow (parser_context_t *context_p, scanner_context_t *scanner_context_p);\nvoid scanner_scan_simple_arrow (parser_context_t *context_p, scanner_context_t *scanner_context_p,\n                                const uint8_t *source_p);\nvoid scanner_check_arrow_arg (parser_context_t *context_p, scanner_context_t *scanner_context_p);\nbool scanner_check_async_function (parser_context_t *context_p, scanner_context_t *scanner_context_p);\nvoid scanner_check_function_after_if (parser_context_t *context_p, scanner_context_t *scanner_context_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\nvoid scanner_scan_bracket (parser_context_t *context_p, scanner_context_t *scanner_context_p);\nvoid scanner_check_directives (parser_context_t *context_p, scanner_context_t *scanner_context_p);\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* !JS_SCANNER_INTERNAL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-scanner-ops.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"js-parser-internal.h\"\n#include \"js-scanner-internal.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_PARSER)\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_scanner Scanner\n * @{\n */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Add the \"async\" literal to the literal pool.\n */\nvoid\nscanner_add_async_literal (parser_context_t *context_p, /**< context */\n                           scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  lexer_lit_location_t async_literal;\n\n  JERRY_ASSERT (context_p->stack_top_uint8 == SCAN_STACK_USE_ASYNC);\n\n  parser_stack_pop_uint8 (context_p);\n  parser_stack_pop (context_p, &async_literal, sizeof (lexer_lit_location_t));\n\n  lexer_lit_location_t *lit_location_p = scanner_add_custom_literal (context_p,\n                                                                     scanner_context_p->active_literal_pool_p,\n                                                                     &async_literal);\n\n  lit_location_p->type |= SCANNER_LITERAL_IS_USED;\n\n  if (scanner_context_p->active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_WITH)\n  {\n    lit_location_p->type |= SCANNER_LITERAL_NO_REG;\n  }\n} /* scanner_add_async_literal */\n\n/**\n * Init scanning the body of an arrow function.\n */\nstatic void\nscanner_check_arrow_body (parser_context_t *context_p, /**< context */\n                          scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  lexer_next_token (context_p);\n\n  scanner_context_p->active_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_ARROW;\n\n  if (context_p->token.type != LEXER_LEFT_BRACE)\n  {\n    scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n    parser_stack_push_uint8 (context_p, SCAN_STACK_ARROW_EXPRESSION);\n    return;\n  }\n\n  lexer_next_token (context_p);\n  parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_ARROW);\n  scanner_check_directives (context_p, scanner_context_p);\n} /* scanner_check_arrow_body */\n\n/**\n * Process arrow function with argument list.\n */\nvoid\nscanner_check_arrow (parser_context_t *context_p, /**< context */\n                     scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  parser_stack_pop_uint8 (context_p);\n\n  lexer_next_token (context_p);\n\n  if (context_p->token.type != LEXER_ARROW\n      || (context_p->token.flags & LEXER_WAS_NEWLINE))\n  {\n    if (context_p->stack_top_uint8 == SCAN_STACK_USE_ASYNC)\n    {\n      scanner_add_async_literal (context_p, scanner_context_p);\n    }\n\n    scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n    scanner_pop_literal_pool (context_p, scanner_context_p);\n    return;\n  }\n\n  if (context_p->stack_top_uint8 == SCAN_STACK_USE_ASYNC)\n  {\n    parser_stack_pop (context_p, NULL, sizeof (lexer_lit_location_t) + 1);\n  }\n\n  scanner_literal_pool_t *literal_pool_p = scanner_context_p->active_literal_pool_p;\n  uint16_t status_flags = literal_pool_p->status_flags;\n\n  bool is_async_arrow = (status_flags & SCANNER_LITERAL_POOL_MAY_ASYNC_ARROW) != 0;\n\n  status_flags |= SCANNER_LITERAL_POOL_ARROW_FLAGS;\n  status_flags &= (uint16_t) ~(SCANNER_LITERAL_POOL_IN_WITH\n                               | SCANNER_LITERAL_POOL_GENERATOR\n                               | SCANNER_LITERAL_POOL_ASYNC);\n\n  context_p->status_flags &= (uint32_t) ~(PARSER_IS_GENERATOR_FUNCTION | PARSER_IS_ASYNC_FUNCTION);\n\n  if (is_async_arrow)\n  {\n    status_flags |= SCANNER_LITERAL_POOL_ASYNC;\n    context_p->status_flags |= PARSER_IS_ASYNC_FUNCTION;\n  }\n\n  literal_pool_p->status_flags = status_flags;\n\n  scanner_filter_arguments (context_p, scanner_context_p);\n  scanner_check_arrow_body (context_p, scanner_context_p);\n} /* scanner_check_arrow */\n\n/**\n * Process arrow function with a single argument.\n */\nvoid\nscanner_scan_simple_arrow (parser_context_t *context_p, /**< context */\n                           scanner_context_t *scanner_context_p, /**< scanner context */\n                           const uint8_t *source_p) /**< identifier end position */\n{\n  uint16_t status_flags = SCANNER_LITERAL_POOL_ARROW_FLAGS;\n\n  context_p->status_flags &= (uint32_t) ~(PARSER_IS_GENERATOR_FUNCTION | PARSER_IS_ASYNC_FUNCTION);\n\n  if (scanner_context_p->async_source_p != NULL)\n  {\n    JERRY_ASSERT (scanner_context_p->async_source_p == source_p);\n\n    status_flags |= SCANNER_LITERAL_POOL_ASYNC;\n    context_p->status_flags |= PARSER_IS_ASYNC_FUNCTION;\n  }\n\n  scanner_literal_pool_t *literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, status_flags);\n  literal_pool_p->source_p = source_p;\n\n  lexer_lit_location_t *location_p = scanner_add_literal (context_p, scanner_context_p);\n  location_p->type |= SCANNER_LITERAL_IS_ARG;\n\n  /* Skip the => token, which size is two. */\n  context_p->source_p += 2;\n  PARSER_PLUS_EQUAL_LC (context_p->column, 2);\n  context_p->token.flags = (uint8_t) (context_p->token.flags & ~LEXER_NO_SKIP_SPACES);\n\n  scanner_check_arrow_body (context_p, scanner_context_p);\n} /* scanner_scan_simple_arrow */\n\n/**\n * Process the next argument of a might-be arrow function.\n */\nvoid\nscanner_check_arrow_arg (parser_context_t *context_p, /**< context */\n                         scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  JERRY_ASSERT (context_p->stack_top_uint8 == SCAN_STACK_ARROW_ARGUMENTS);\n\n  const uint8_t *source_p = context_p->source_p;\n  bool process_arrow = false;\n\n  scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n  if (context_p->token.type == LEXER_THREE_DOTS)\n  {\n    lexer_next_token (context_p);\n  }\n\n  switch (context_p->token.type)\n  {\n    case LEXER_RIGHT_PAREN:\n    {\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n      return;\n    }\n    case LEXER_LITERAL:\n    {\n      if (context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n      {\n        break;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n\n      if (lexer_check_arrow (context_p))\n      {\n        process_arrow = true;\n        break;\n      }\n\n      lexer_lit_location_t *argument_literal_p = scanner_append_argument (context_p, scanner_context_p);\n\n      scanner_detect_eval_call (context_p, scanner_context_p);\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type == LEXER_COMMA || context_p->token.type == LEXER_RIGHT_PAREN)\n      {\n        return;\n      }\n\n      if (context_p->token.type != LEXER_ASSIGN)\n      {\n        break;\n      }\n\n      if (argument_literal_p->type & SCANNER_LITERAL_IS_USED)\n      {\n        JERRY_ASSERT (argument_literal_p->type & SCANNER_LITERAL_EARLY_CREATE);\n        return;\n      }\n\n      scanner_binding_literal_t binding_literal;\n      binding_literal.literal_p = argument_literal_p;\n\n      parser_stack_push (context_p, &binding_literal, sizeof (scanner_binding_literal_t));\n      parser_stack_push_uint8 (context_p, SCAN_STACK_BINDING_INIT);\n      return;\n    }\n    case LEXER_LEFT_SQUARE:\n    case LEXER_LEFT_BRACE:\n    {\n      scanner_append_hole (context_p, scanner_context_p);\n      scanner_push_destructuring_pattern (context_p, scanner_context_p, SCANNER_BINDING_ARROW_ARG, false);\n\n      if (context_p->token.type == LEXER_LEFT_BRACE)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        parser_stack_push_uint8 (context_p, 0);\n#endif /* ENABLED (JERRY_ESNEXT) */\n        parser_stack_push_uint8 (context_p, SCAN_STACK_OBJECT_LITERAL);\n        scanner_context_p->mode = SCAN_MODE_PROPERTY_NAME;\n        return;\n      }\n\n      parser_stack_push_uint8 (context_p, SCAN_STACK_ARRAY_LITERAL);\n      scanner_context_p->mode = SCAN_MODE_BINDING;\n      lexer_next_token (context_p);\n      return;\n    }\n  }\n\n  scanner_pop_literal_pool (context_p, scanner_context_p);\n  parser_stack_pop_uint8 (context_p);\n\n  if (context_p->stack_top_uint8 == SCAN_STACK_USE_ASYNC)\n  {\n    scanner_add_async_literal (context_p, scanner_context_p);\n  }\n\n  parser_stack_push_uint8 (context_p, SCAN_STACK_PAREN_EXPRESSION);\n\n  if (process_arrow)\n  {\n    scanner_scan_simple_arrow (context_p, scanner_context_p, source_p);\n  }\n} /* scanner_check_arrow_arg */\n\n/**\n * Detect async functions.\n *\n * @return true, if async is followed by a function keyword, false otherwise\n */\nbool\nscanner_check_async_function (parser_context_t *context_p, /**< context */\n                              scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  JERRY_ASSERT (lexer_token_is_async (context_p));\n  JERRY_ASSERT (scanner_context_p->mode == SCAN_MODE_PRIMARY_EXPRESSION\n                || scanner_context_p->mode == SCAN_MODE_PRIMARY_EXPRESSION_AFTER_NEW);\n  JERRY_ASSERT (scanner_context_p->async_source_p != NULL);\n\n  lexer_lit_location_t async_literal = context_p->token.lit_location;\n\n  lexer_next_token (context_p);\n\n  if (!(context_p->token.flags & LEXER_WAS_NEWLINE))\n  {\n    if (context_p->token.type == LEXER_KEYW_FUNCTION)\n    {\n      return true;\n    }\n\n    if (context_p->token.type == LEXER_LITERAL\n        && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n    {\n      if (!lexer_check_arrow (context_p))\n      {\n        scanner_raise_error (context_p);\n      }\n\n      scanner_scan_simple_arrow (context_p, scanner_context_p, scanner_context_p->async_source_p);\n      scanner_context_p->async_source_p = NULL;\n      return false;\n    }\n\n    if (context_p->token.type == LEXER_LEFT_PAREN)\n    {\n      parser_stack_push (context_p, &async_literal, sizeof (lexer_lit_location_t));\n      parser_stack_push_uint8 (context_p, SCAN_STACK_USE_ASYNC);\n      return false;\n    }\n  }\n\n  lexer_lit_location_t *lit_location_p = scanner_add_custom_literal (context_p,\n                                                                     scanner_context_p->active_literal_pool_p,\n                                                                     &async_literal);\n  lit_location_p->type |= SCANNER_LITERAL_IS_USED;\n\n  if (scanner_context_p->active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_WITH)\n  {\n    lit_location_p->type |= SCANNER_LITERAL_NO_REG;\n  }\n\n  scanner_context_p->async_source_p = NULL;\n  scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n  return false;\n} /* scanner_check_async_function */\n\n/**\n * Check whether the statement of an if/else construct is a function statement.\n */\nvoid\nscanner_check_function_after_if (parser_context_t *context_p, /**< context */\n                                 scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  lexer_next_token (context_p);\n  scanner_context_p->mode = SCAN_MODE_STATEMENT;\n\n  if (JERRY_UNLIKELY (context_p->token.type == LEXER_KEYW_FUNCTION))\n  {\n    scanner_literal_pool_t *literal_pool_p;\n    literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, 0);\n\n    literal_pool_p->source_p = context_p->source_p;\n    parser_stack_push_uint8 (context_p, SCAN_STACK_PRIVATE_BLOCK);\n  }\n} /* scanner_check_function_after_if */\n\n/**\n * Arrow types for scanner_scan_bracket() function.\n */\ntypedef enum\n{\n  SCANNER_SCAN_BRACKET_NO_ARROW, /**< not an arrow function */\n  SCANNER_SCAN_BRACKET_SIMPLE_ARROW, /**< simple arrow function */\n  SCANNER_SCAN_BRACKET_ARROW_WITH_ONE_ARG, /**< arrow function with one argument */\n} scanner_scan_bracket_arrow_type_t;\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Scan bracketed expressions.\n */\nvoid\nscanner_scan_bracket (parser_context_t *context_p, /**< context */\n                      scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  size_t depth = 0;\n#if ENABLED (JERRY_ESNEXT)\n  const uint8_t *arrow_source_p;\n  const uint8_t *async_source_p = NULL;\n  scanner_scan_bracket_arrow_type_t arrow_type = SCANNER_SCAN_BRACKET_NO_ARROW;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (context_p->token.type == LEXER_LEFT_PAREN);\n\n  do\n  {\n#if ENABLED (JERRY_ESNEXT)\n    arrow_source_p = context_p->source_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n    depth++;\n    lexer_next_token (context_p);\n  }\n  while (context_p->token.type == LEXER_LEFT_PAREN);\n\n  scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n  switch (context_p->token.type)\n  {\n    case LEXER_LITERAL:\n    {\n      if (context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        arrow_source_p = NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n        break;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      const uint8_t *source_p = context_p->source_p;\n\n      if (lexer_check_arrow (context_p))\n      {\n        arrow_source_p = source_p;\n        arrow_type = SCANNER_SCAN_BRACKET_SIMPLE_ARROW;\n        break;\n      }\n\n      size_t total_depth = depth;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      while (depth > 0 && lexer_check_next_character (context_p, LIT_CHAR_RIGHT_PAREN))\n      {\n        lexer_consume_next_character (context_p);\n        depth--;\n      }\n\n      if (context_p->token.keyword_type == LEXER_KEYW_EVAL\n          && lexer_check_next_character (context_p, LIT_CHAR_LEFT_PAREN))\n      {\n#if ENABLED (JERRY_ESNEXT)\n        /* A function call cannot be an eval function. */\n        arrow_source_p = NULL;\n        const uint16_t flags = (uint16_t) (SCANNER_LITERAL_POOL_CAN_EVAL | SCANNER_LITERAL_POOL_HAS_SUPER_REFERENCE);\n#else /* !ENABLED (JERRY_ESNEXT) */\n        const uint16_t flags = SCANNER_LITERAL_POOL_CAN_EVAL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        scanner_context_p->active_literal_pool_p->status_flags |= flags;\n        break;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (total_depth == depth)\n      {\n        if (lexer_check_arrow_param (context_p))\n        {\n          JERRY_ASSERT (depth > 0);\n          depth--;\n          break;\n        }\n\n        if (JERRY_UNLIKELY (lexer_token_is_async (context_p)))\n        {\n          async_source_p = source_p;\n        }\n      }\n      else if (depth == total_depth - 1)\n      {\n        if (lexer_check_arrow (context_p))\n        {\n          arrow_type = SCANNER_SCAN_BRACKET_ARROW_WITH_ONE_ARG;\n          break;\n        }\n\n        if (context_p->stack_top_uint8 == SCAN_STACK_USE_ASYNC)\n        {\n          scanner_add_async_literal (context_p, scanner_context_p);\n        }\n      }\n\n      arrow_source_p = NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      break;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_THREE_DOTS:\n    case LEXER_LEFT_SQUARE:\n    case LEXER_LEFT_BRACE:\n    case LEXER_RIGHT_PAREN:\n    {\n      JERRY_ASSERT (depth > 0);\n      depth--;\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      arrow_source_p = NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      break;\n    }\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (scanner_context_p->async_source_p != NULL)\n      && (arrow_source_p == NULL || depth > 0))\n  {\n    scanner_context_p->async_source_p = NULL;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  while (depth > 0)\n  {\n    parser_stack_push_uint8 (context_p, SCAN_STACK_PAREN_EXPRESSION);\n    depth--;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (arrow_source_p != NULL)\n  {\n    JERRY_ASSERT (async_source_p == NULL);\n\n    if (arrow_type == SCANNER_SCAN_BRACKET_SIMPLE_ARROW)\n    {\n      scanner_scan_simple_arrow (context_p, scanner_context_p, arrow_source_p);\n      return;\n    }\n\n    parser_stack_push_uint8 (context_p, SCAN_STACK_ARROW_ARGUMENTS);\n\n    uint16_t status_flags = 0;\n\n    if (JERRY_UNLIKELY (scanner_context_p->async_source_p != NULL))\n    {\n      status_flags |= SCANNER_LITERAL_POOL_MAY_ASYNC_ARROW;\n      arrow_source_p = scanner_context_p->async_source_p;\n      scanner_context_p->async_source_p = NULL;\n    }\n\n    scanner_literal_pool_t *literal_pool_p;\n    literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, status_flags);\n    literal_pool_p->source_p = arrow_source_p;\n\n    if (arrow_type == SCANNER_SCAN_BRACKET_ARROW_WITH_ONE_ARG)\n    {\n      scanner_append_argument (context_p, scanner_context_p);\n      scanner_detect_eval_call (context_p, scanner_context_p);\n\n      context_p->token.type = LEXER_RIGHT_PAREN;\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n    }\n    else if (context_p->token.type == LEXER_RIGHT_PAREN)\n    {\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n    }\n    else\n    {\n      scanner_check_arrow_arg (context_p, scanner_context_p);\n    }\n  }\n  else if (JERRY_UNLIKELY (async_source_p != NULL))\n  {\n    scanner_context_p->async_source_p = async_source_p;\n    scanner_check_async_function (context_p, scanner_context_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* scanner_scan_bracket */\n\n/**\n * Check directives before a source block.\n */\nvoid\nscanner_check_directives (parser_context_t *context_p, /**< context */\n                          scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n\n  while (context_p->token.type == LEXER_LITERAL\n         && context_p->token.lit_location.type == LEXER_STRING_LITERAL)\n  {\n    bool is_use_strict = false;\n\n    if (lexer_string_is_use_strict (context_p)\n        && !(context_p->status_flags & PARSER_IS_STRICT))\n    {\n      is_use_strict = true;\n      context_p->status_flags |= PARSER_IS_STRICT;\n    }\n\n    lexer_next_token (context_p);\n\n    if (!lexer_string_is_directive (context_p))\n    {\n      if (is_use_strict)\n      {\n        context_p->status_flags &= (uint32_t) ~PARSER_IS_STRICT;\n      }\n\n      /* The string is part of an expression statement. */\n      scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      break;\n    }\n\n    if (is_use_strict)\n    {\n      scanner_context_p->active_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_IS_STRICT;\n    }\n\n    if (context_p->token.type == LEXER_SEMICOLON)\n    {\n      lexer_next_token (context_p);\n    }\n  }\n} /* scanner_check_directives */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_PARSER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-scanner-util.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-helpers.h\"\n#include \"ecma-lex-env.h\"\n#include \"jcontext.h\"\n#include \"js-parser-internal.h\"\n#include \"js-scanner-internal.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_PARSER)\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_scanner Scanner\n * @{\n */\n\nJERRY_STATIC_ASSERT (PARSER_MAXIMUM_NUMBER_OF_LITERALS + PARSER_MAXIMUM_NUMBER_OF_REGISTERS < PARSER_REGISTER_START,\n                     maximum_number_of_literals_plus_registers_must_be_less_than_register_start);\n\n#if ENABLED (JERRY_ESNEXT)\n\nJERRY_STATIC_ASSERT ((SCANNER_LITERAL_IS_ARROW_DESTRUCTURED_ARG & SCANNER_LITERAL_IS_LOCAL) == 0,\n                     is_arrow_arg_binding_flag_must_not_use_local_flags);\n\nJERRY_STATIC_ASSERT ((SCANNER_LITERAL_IS_LET & SCANNER_LITERAL_IS_LOCAL) != 0,\n                     is_let_flag_must_use_local_flags);\n\nJERRY_STATIC_ASSERT ((SCANNER_LITERAL_IS_CONST & SCANNER_LITERAL_IS_LOCAL) != 0,\n                     is_const_flag_must_use_local_flags);\n\nJERRY_STATIC_ASSERT ((SCANNER_LITERAL_IS_FUNC_DECLARATION & SCANNER_LITERAL_IS_LOCAL) != 0,\n                     is_func_declaration_flag_must_use_local_flags);\n\nJERRY_STATIC_ASSERT ((SCANNER_LITERAL_IS_DESTRUCTURED_ARG & SCANNER_LITERAL_IS_LOCAL) != 0,\n                     is_arg_binding_flag_must_use_local_flags);\n\nJERRY_STATIC_ASSERT (SCANNER_LITERAL_IS_FUNC_DECLARATION != SCANNER_LITERAL_IS_DESTRUCTURED_ARG,\n                     is_func_declaration_must_be_different_from_is_arg_binding);\n\nJERRY_STATIC_ASSERT (PARSER_SCOPE_STACK_IS_CONST_REG == PARSER_SCOPE_STACK_IS_LOCAL_CREATED,\n                     scope_stack_is_const_reg_and_scope_stack_is_local_created_must_be_the_same);\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Raise a scanner error.\n */\nvoid\nscanner_raise_error (parser_context_t *context_p) /**< context */\n{\n  PARSER_THROW (context_p->try_buffer);\n  /* Should never been reached. */\n  JERRY_ASSERT (0);\n} /* scanner_raise_error */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Raise a variable redeclaration error.\n */\nvoid\nscanner_raise_redeclaration_error (parser_context_t *context_p) /**< context */\n{\n  scanner_info_t *info_p = scanner_insert_info (context_p, context_p->source_p, sizeof (scanner_info_t));\n  info_p->type = SCANNER_TYPE_ERR_REDECLARED;\n\n  scanner_raise_error (context_p);\n} /* scanner_raise_redeclaration_error */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Allocate memory for scanner.\n *\n * @return allocated memory\n */\nvoid *\nscanner_malloc (parser_context_t *context_p, /**< context */\n                size_t size) /**< size of the memory block */\n{\n  void *result;\n\n  JERRY_ASSERT (size > 0);\n  result = jmem_heap_alloc_block_null_on_error (size);\n\n  if (result == NULL)\n  {\n    scanner_cleanup (context_p);\n\n    /* This is the only error which specify its reason. */\n    context_p->error = PARSER_ERR_OUT_OF_MEMORY;\n    PARSER_THROW (context_p->try_buffer);\n  }\n  return result;\n} /* scanner_malloc */\n\n/**\n * Free memory allocated by scanner_malloc.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nscanner_free (void *ptr, /**< pointer to free */\n              size_t size) /**< size of the memory block */\n{\n  jmem_heap_free_block (ptr, size);\n} /* scanner_free */\n\n/**\n * Count the size of a stream after an info block.\n *\n * @return the size in bytes\n */\nsize_t\nscanner_get_stream_size (scanner_info_t *info_p, /**< scanner info block */\n                         size_t size) /**< size excluding the stream */\n{\n  const uint8_t *data_p = ((const uint8_t *) info_p) + size;\n  const uint8_t *data_p_start = data_p;\n\n  while (data_p[0] != SCANNER_STREAM_TYPE_END)\n  {\n    switch (data_p[0] & SCANNER_STREAM_TYPE_MASK)\n    {\n      case SCANNER_STREAM_TYPE_VAR:\n#if ENABLED (JERRY_ESNEXT)\n      case SCANNER_STREAM_TYPE_LET:\n      case SCANNER_STREAM_TYPE_CONST:\n      case SCANNER_STREAM_TYPE_LOCAL:\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      case SCANNER_STREAM_TYPE_IMPORT:\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n      case SCANNER_STREAM_TYPE_ARG:\n#if ENABLED (JERRY_ESNEXT)\n      case SCANNER_STREAM_TYPE_ARG_VAR:\n      case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG:\n      case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR:\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n      case SCANNER_STREAM_TYPE_ARG_FUNC:\n#if ENABLED (JERRY_ESNEXT)\n      case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case SCANNER_STREAM_TYPE_FUNC:\n      {\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT ((data_p[0] & SCANNER_STREAM_TYPE_MASK) == SCANNER_STREAM_TYPE_HOLE\n                      || SCANNER_STREAM_TYPE_IS_ARGUMENTS (data_p[0] & SCANNER_STREAM_TYPE_MASK));\n        data_p++;\n        continue;\n      }\n    }\n\n    data_p += 3;\n\n    if (data_p[-3] & SCANNER_STREAM_UINT16_DIFF)\n    {\n      data_p++;\n    }\n    else if (data_p[-1] == 0)\n    {\n      data_p += sizeof (const uint8_t *);\n    }\n  }\n\n  return size + 1 + (size_t) (data_p - data_p_start);\n} /* scanner_get_stream_size */\n\n/**\n * Insert a scanner info block into the scanner info chain.\n *\n * @return newly allocated scanner info\n */\nscanner_info_t *\nscanner_insert_info (parser_context_t *context_p, /**< context */\n                     const uint8_t *source_p, /**< triggering position */\n                     size_t size) /**< size of the memory block */\n{\n  scanner_info_t *new_scanner_info_p = (scanner_info_t *) scanner_malloc (context_p, size);\n  scanner_info_t *scanner_info_p = context_p->next_scanner_info_p;\n  scanner_info_t *prev_scanner_info_p = NULL;\n\n  JERRY_ASSERT (scanner_info_p != NULL);\n  JERRY_ASSERT (source_p != NULL);\n\n  new_scanner_info_p->source_p = source_p;\n\n  while (source_p < scanner_info_p->source_p)\n  {\n    prev_scanner_info_p = scanner_info_p;\n    scanner_info_p = scanner_info_p->next_p;\n\n    JERRY_ASSERT (scanner_info_p != NULL);\n  }\n\n  /* Multiple scanner info blocks cannot be assigned to the same position. */\n  JERRY_ASSERT (source_p != scanner_info_p->source_p);\n\n  new_scanner_info_p->next_p = scanner_info_p;\n\n  if (JERRY_LIKELY (prev_scanner_info_p == NULL))\n  {\n    context_p->next_scanner_info_p = new_scanner_info_p;\n  }\n  else\n  {\n    prev_scanner_info_p->next_p = new_scanner_info_p;\n  }\n\n  return new_scanner_info_p;\n} /* scanner_insert_info */\n\n/**\n * Insert a scanner info block into the scanner info chain before a given info block.\n *\n * @return newly allocated scanner info\n */\nscanner_info_t *\nscanner_insert_info_before (parser_context_t *context_p, /**< context */\n                            const uint8_t *source_p, /**< triggering position */\n                            scanner_info_t *start_info_p, /**< first info position */\n                            size_t size) /**< size of the memory block */\n{\n  JERRY_ASSERT (start_info_p != NULL);\n\n  scanner_info_t *new_scanner_info_p = (scanner_info_t *) scanner_malloc (context_p, size);\n  scanner_info_t *scanner_info_p = start_info_p->next_p;\n  scanner_info_t *prev_scanner_info_p = start_info_p;\n\n  new_scanner_info_p->source_p = source_p;\n\n  while (source_p < scanner_info_p->source_p)\n  {\n    prev_scanner_info_p = scanner_info_p;\n    scanner_info_p = scanner_info_p->next_p;\n\n    JERRY_ASSERT (scanner_info_p != NULL);\n  }\n\n  /* Multiple scanner info blocks cannot be assigned to the same position. */\n  JERRY_ASSERT (source_p != scanner_info_p->source_p);\n\n  new_scanner_info_p->next_p = scanner_info_p;\n\n  prev_scanner_info_p->next_p = new_scanner_info_p;\n  return new_scanner_info_p;\n} /* scanner_insert_info_before */\n\n/**\n * Release the next scanner info.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nscanner_release_next (parser_context_t *context_p, /**< context */\n                      size_t size) /**< size of the memory block */\n{\n  scanner_info_t *next_p = context_p->next_scanner_info_p->next_p;\n\n  jmem_heap_free_block (context_p->next_scanner_info_p, size);\n  context_p->next_scanner_info_p = next_p;\n} /* scanner_release_next */\n\n/**\n * Set the active scanner info to the next scanner info.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nscanner_set_active (parser_context_t *context_p) /**< context */\n{\n  scanner_info_t *scanner_info_p = context_p->next_scanner_info_p;\n\n  context_p->next_scanner_info_p = scanner_info_p->next_p;\n  scanner_info_p->next_p = context_p->active_scanner_info_p;\n  context_p->active_scanner_info_p = scanner_info_p;\n} /* scanner_set_active */\n\n/**\n * Set the next scanner info to the active scanner info.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nscanner_revert_active (parser_context_t *context_p) /**< context */\n{\n  scanner_info_t *scanner_info_p = context_p->active_scanner_info_p;\n\n  context_p->active_scanner_info_p = scanner_info_p->next_p;\n  scanner_info_p->next_p = context_p->next_scanner_info_p;\n  context_p->next_scanner_info_p = scanner_info_p;\n} /* scanner_revert_active */\n\n/**\n * Release the active scanner info.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nscanner_release_active (parser_context_t *context_p, /**< context */\n                        size_t size) /**< size of the memory block */\n{\n  scanner_info_t *next_p = context_p->active_scanner_info_p->next_p;\n\n  jmem_heap_free_block (context_p->active_scanner_info_p, size);\n  context_p->active_scanner_info_p = next_p;\n} /* scanner_release_active */\n\n/**\n * Release switch cases.\n */\nvoid\nscanner_release_switch_cases (scanner_case_info_t *case_p) /**< case list */\n{\n  while (case_p != NULL)\n  {\n    scanner_case_info_t *next_p = case_p->next_p;\n\n    jmem_heap_free_block (case_p, sizeof (scanner_case_info_t));\n    case_p = next_p;\n  }\n} /* scanner_release_switch_cases */\n\n/**\n * Seek to correct position in the scanner info list.\n */\nvoid\nscanner_seek (parser_context_t *context_p) /**< context */\n{\n  const uint8_t *source_p = context_p->source_p;\n  scanner_info_t *prev_p;\n\n  if (context_p->skipped_scanner_info_p != NULL)\n  {\n    JERRY_ASSERT (context_p->skipped_scanner_info_p->source_p != NULL);\n\n    context_p->skipped_scanner_info_end_p->next_p = context_p->next_scanner_info_p;\n\n    if (context_p->skipped_scanner_info_end_p->source_p <= source_p)\n    {\n      prev_p = context_p->skipped_scanner_info_end_p;\n    }\n    else\n    {\n      prev_p = context_p->skipped_scanner_info_p;\n\n      if (prev_p->source_p > source_p)\n      {\n        context_p->next_scanner_info_p = prev_p;\n        context_p->skipped_scanner_info_p = NULL;\n        return;\n      }\n\n      context_p->skipped_scanner_info_p = prev_p;\n    }\n  }\n  else\n  {\n    prev_p = context_p->next_scanner_info_p;\n\n    if (prev_p->source_p == NULL || prev_p->source_p > source_p)\n    {\n      return;\n    }\n\n    context_p->skipped_scanner_info_p = prev_p;\n  }\n\n  while (prev_p->next_p->source_p != NULL && prev_p->next_p->source_p <= source_p)\n  {\n    prev_p = prev_p->next_p;\n  }\n\n  context_p->skipped_scanner_info_end_p = prev_p;\n  context_p->next_scanner_info_p = prev_p->next_p;\n} /* scanner_seek */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Find any let/const declaration of a given literal.\n *\n * @return true - if the literal is found, false - otherwise\n */\nstatic bool\nscanner_scope_find_lexical_declaration (parser_context_t *context_p, /**< context */\n                                        lexer_lit_location_t *literal_p) /**< literal */\n{\n  ecma_string_t *name_p;\n  uint32_t flags = context_p->global_status_flags;\n\n  if (!(flags & ECMA_PARSE_EVAL)\n      || (!(flags & ECMA_PARSE_DIRECT_EVAL) && (context_p->status_flags & PARSER_IS_STRICT)))\n  {\n    return false;\n  }\n\n  if (JERRY_LIKELY (!literal_p->has_escape))\n  {\n    name_p = ecma_new_ecma_string_from_utf8 (literal_p->char_p, literal_p->length);\n  }\n  else\n  {\n    uint8_t *destination_p = (uint8_t *) scanner_malloc (context_p, literal_p->length);\n\n    lexer_convert_ident_to_cesu8 (destination_p, literal_p->char_p, literal_p->length);\n\n    name_p = ecma_new_ecma_string_from_utf8 (destination_p, literal_p->length);\n    scanner_free (destination_p, literal_p->length);\n  }\n\n  ecma_object_t *lex_env_p;\n\n  if (flags & ECMA_PARSE_DIRECT_EVAL)\n  {\n    lex_env_p = JERRY_CONTEXT (vm_top_context_p)->lex_env_p;\n\n    while (lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK)\n    {\n      if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n      {\n        ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n        if (property_p != NULL && ecma_is_property_enumerable (*property_p))\n        {\n          ecma_deref_ecma_string (name_p);\n          return true;\n        }\n      }\n\n      JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n      lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n    }\n  }\n  else\n  {\n    lex_env_p = ecma_get_global_scope (ecma_builtin_get_global ());\n  }\n\n  if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n  {\n    ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n    if (property_p != NULL && ecma_is_property_enumerable (*property_p))\n    {\n      ecma_deref_ecma_string (name_p);\n      return true;\n    }\n  }\n\n  ecma_deref_ecma_string (name_p);\n  return false;\n} /* scanner_scope_find_lexical_declaration */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Push a new literal pool.\n *\n * @return the newly created literal pool\n */\nscanner_literal_pool_t *\nscanner_push_literal_pool (parser_context_t *context_p, /**< context */\n                           scanner_context_t *scanner_context_p, /**< scanner context */\n                           uint16_t status_flags) /**< combination of scanner_literal_pool_flags_t flags */\n{\n  scanner_literal_pool_t *prev_literal_pool_p = scanner_context_p->active_literal_pool_p;\n  scanner_literal_pool_t *literal_pool_p;\n\n  literal_pool_p = (scanner_literal_pool_t *) scanner_malloc (context_p, sizeof (scanner_literal_pool_t));\n\n  if (!(status_flags & SCANNER_LITERAL_POOL_FUNCTION))\n  {\n    JERRY_ASSERT (prev_literal_pool_p != NULL);\n    status_flags |= SCANNER_LITERAL_POOL_NO_ARGUMENTS;\n\n#if ENABLED (JERRY_ESNEXT)\n    const uint16_t copied_flags = (SCANNER_LITERAL_POOL_IN_WITH\n                                   | SCANNER_LITERAL_POOL_GENERATOR\n                                   | SCANNER_LITERAL_POOL_ASYNC);\n#else /* !ENABLED (JERRY_ESNEXT) */\n    const uint16_t copied_flags = SCANNER_LITERAL_POOL_IN_WITH;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    status_flags |= (uint16_t) (prev_literal_pool_p->status_flags & copied_flags);\n  }\n#if ENABLED (JERRY_ESNEXT)\n  else\n  {\n    context_p->status_flags &= (uint32_t) ~(PARSER_IS_GENERATOR_FUNCTION | PARSER_IS_ASYNC_FUNCTION);\n\n    if (status_flags & SCANNER_LITERAL_POOL_GENERATOR)\n    {\n      context_p->status_flags |= PARSER_IS_GENERATOR_FUNCTION;\n    }\n\n    if (status_flags & SCANNER_LITERAL_POOL_ASYNC)\n    {\n      context_p->status_flags |= PARSER_IS_ASYNC_FUNCTION;\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (prev_literal_pool_p != NULL)\n  {\n    const uint16_t copied_flags = SCANNER_LITERAL_POOL_IS_STRICT;\n    status_flags |= (uint16_t) (prev_literal_pool_p->status_flags & copied_flags);\n\n    /* The logical value of these flags must be the same. */\n    JERRY_ASSERT (!(status_flags & SCANNER_LITERAL_POOL_IS_STRICT) == !(context_p->status_flags & PARSER_IS_STRICT));\n  }\n\n  parser_list_init (&literal_pool_p->literal_pool,\n                    sizeof (lexer_lit_location_t),\n                    (uint32_t) ((128 - sizeof (void *)) / sizeof (lexer_lit_location_t)));\n  literal_pool_p->source_p = NULL;\n  literal_pool_p->status_flags = status_flags;\n  literal_pool_p->no_declarations = 0;\n\n  literal_pool_p->prev_p = prev_literal_pool_p;\n  scanner_context_p->active_literal_pool_p = literal_pool_p;\n\n  return literal_pool_p;\n} /* scanner_push_literal_pool */\n\nJERRY_STATIC_ASSERT (PARSER_MAXIMUM_IDENT_LENGTH <= UINT8_MAX,\n                     maximum_ident_length_must_fit_in_a_byte);\n\n/**\n * Checks whether a literal is equal to \"arguments\".\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\nscanner_literal_is_arguments (lexer_lit_location_t *literal_p) /**< literal */\n{\n  return lexer_compare_identifier_to_string (literal_p, (const uint8_t *) \"arguments\", 9);\n} /* scanner_literal_is_arguments */\n\n/**\n * Current status of arguments.\n */\ntypedef enum\n{\n  SCANNER_ARGUMENTS_NOT_PRESENT, /**< arguments object must not be created */\n  SCANNER_ARGUMENTS_MAY_PRESENT, /**< arguments object can be created */\n  SCANNER_ARGUMENTS_MAY_PRESENT_IN_EVAL, /**< arguments object must be present unless otherwise declared */\n  SCANNER_ARGUMENTS_PRESENT, /**< arguments object must be created */\n  SCANNER_ARGUMENTS_PRESENT_NO_REG, /**< arguments object must be created and cannot be stored in registers */\n} scanner_arguments_type_t;\n\n/**\n * Pop the last literal pool from the end.\n */\nvoid\nscanner_pop_literal_pool (parser_context_t *context_p, /**< context */\n                          scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  scanner_literal_pool_t *literal_pool_p = scanner_context_p->active_literal_pool_p;\n  scanner_literal_pool_t *prev_literal_pool_p = literal_pool_p->prev_p;\n\n#if ENABLED (JERRY_ESNEXT)\n  const uint32_t arrow_super_flags = (SCANNER_LITERAL_POOL_ARROW | SCANNER_LITERAL_POOL_HAS_SUPER_REFERENCE);\n  if ((literal_pool_p->status_flags & arrow_super_flags) == arrow_super_flags)\n  {\n    prev_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_HAS_SUPER_REFERENCE;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (JERRY_UNLIKELY (literal_pool_p->source_p == NULL))\n  {\n    JERRY_ASSERT (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_FUNCTION);\n    JERRY_ASSERT (literal_pool_p->literal_pool.data.first_p == NULL\n                  && literal_pool_p->literal_pool.data.last_p == NULL);\n\n    scanner_context_p->active_literal_pool_p = literal_pool_p->prev_p;\n    scanner_free (literal_pool_p, sizeof (scanner_literal_pool_t));\n    return;\n  }\n\n  uint16_t status_flags = literal_pool_p->status_flags;\n  scanner_arguments_type_t arguments_type = SCANNER_ARGUMENTS_MAY_PRESENT;\n\n  if (status_flags & SCANNER_LITERAL_POOL_NO_ARGUMENTS)\n  {\n    arguments_type = SCANNER_ARGUMENTS_NOT_PRESENT;\n  }\n  else if (status_flags & SCANNER_LITERAL_POOL_CAN_EVAL)\n  {\n    arguments_type = SCANNER_ARGUMENTS_MAY_PRESENT_IN_EVAL;\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  if (status_flags & SCANNER_LITERAL_POOL_ARGUMENTS_IN_ARGS)\n  {\n    arguments_type = SCANNER_ARGUMENTS_PRESENT;\n\n    if (status_flags & (SCANNER_LITERAL_POOL_NO_ARGUMENTS | SCANNER_LITERAL_POOL_CAN_EVAL))\n    {\n      arguments_type = SCANNER_ARGUMENTS_PRESENT_NO_REG;\n      status_flags &= (uint16_t) ~SCANNER_LITERAL_POOL_NO_ARGUMENTS;\n    }\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  uint8_t can_eval_types = 0;\n#if ENABLED (JERRY_ESNEXT)\n  if (prev_literal_pool_p == NULL && !(context_p->global_status_flags & ECMA_PARSE_DIRECT_EVAL))\n  {\n    can_eval_types |= SCANNER_LITERAL_IS_FUNC;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if ((status_flags & SCANNER_LITERAL_POOL_CAN_EVAL) && prev_literal_pool_p != NULL)\n  {\n    prev_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_CAN_EVAL;\n  }\n\n#if ENABLED (JERRY_DEBUGGER)\n  if (scanner_context_p->status_flags & SCANNER_CONTEXT_DEBUGGER_ENABLED)\n  {\n    /* When debugger is enabled, identifiers are not stored in registers. However,\n     * this does not affect 'eval' detection, so 'arguments' object is not created. */\n    status_flags |= SCANNER_LITERAL_POOL_CAN_EVAL;\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n  parser_list_iterator_t literal_iterator;\n  lexer_lit_location_t *literal_p;\n  int32_t no_declarations = literal_pool_p->no_declarations;\n\n  parser_list_iterator_init (&literal_pool_p->literal_pool, &literal_iterator);\n\n  uint8_t arguments_stream_type = SCANNER_STREAM_TYPE_ARGUMENTS;\n  const uint8_t *prev_source_p = literal_pool_p->source_p - 1;\n  lexer_lit_location_t *last_argument_p = NULL;\n  size_t compressed_size = 1;\n\n  while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n  {\n    uint8_t type = literal_p->type;\n\n    if (JERRY_UNLIKELY (no_declarations > PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK))\n    {\n      continue;\n    }\n\n    if (!(status_flags & SCANNER_LITERAL_POOL_NO_ARGUMENTS) && scanner_literal_is_arguments (literal_p))\n    {\n#if ENABLED (JERRY_ESNEXT)\n      JERRY_ASSERT (arguments_type != SCANNER_ARGUMENTS_NOT_PRESENT);\n#else /* !ENABLED (JERRY_ESNEXT) */\n      JERRY_ASSERT (arguments_type == SCANNER_ARGUMENTS_MAY_PRESENT\n                    || arguments_type == SCANNER_ARGUMENTS_MAY_PRESENT_IN_EVAL);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      status_flags |= SCANNER_LITERAL_POOL_NO_ARGUMENTS;\n\n      if (type & SCANNER_LITERAL_IS_ARG)\n      {\n        JERRY_ASSERT (arguments_type != SCANNER_ARGUMENTS_PRESENT\n                      && arguments_type != SCANNER_ARGUMENTS_PRESENT_NO_REG);\n        arguments_type = SCANNER_ARGUMENTS_NOT_PRESENT;\n        last_argument_p = literal_p;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      else if (type & SCANNER_LITERAL_IS_LOCAL)\n      {\n        if (arguments_type == SCANNER_ARGUMENTS_MAY_PRESENT || arguments_type == SCANNER_ARGUMENTS_MAY_PRESENT_IN_EVAL)\n        {\n          arguments_type = SCANNER_ARGUMENTS_NOT_PRESENT;\n        }\n        else\n        {\n          if (arguments_type == SCANNER_ARGUMENTS_PRESENT_NO_REG)\n          {\n            type |= SCANNER_LITERAL_NO_REG;\n          }\n          else if (type & (SCANNER_LITERAL_NO_REG | SCANNER_LITERAL_EARLY_CREATE))\n          {\n            arguments_type = SCANNER_ARGUMENTS_PRESENT_NO_REG;\n          }\n\n          if ((type & SCANNER_LITERAL_IS_LOCAL_FUNC) == SCANNER_LITERAL_IS_LOCAL_FUNC)\n          {\n            type |= SCANNER_LITERAL_IS_ARG;\n            literal_p->type = type;\n            no_declarations--;\n            arguments_stream_type = SCANNER_STREAM_TYPE_ARGUMENTS_FUNC;\n          }\n          else\n          {\n            arguments_stream_type |= SCANNER_STREAM_LOCAL_ARGUMENTS;\n          }\n        }\n      }\n#else /* !ENABLED (JERRY_ESNEXT) */\n      else if (type & SCANNER_LITERAL_IS_FUNC)\n      {\n        arguments_type = SCANNER_ARGUMENTS_NOT_PRESENT;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      else\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if ((type & SCANNER_LITERAL_IS_VAR)\n            && (arguments_type == SCANNER_ARGUMENTS_PRESENT || arguments_type == SCANNER_ARGUMENTS_PRESENT_NO_REG))\n        {\n          if (arguments_type == SCANNER_ARGUMENTS_PRESENT_NO_REG)\n          {\n            type |= SCANNER_LITERAL_NO_REG;\n          }\n          else if (type & (SCANNER_LITERAL_NO_REG | SCANNER_LITERAL_EARLY_CREATE))\n          {\n            arguments_type = SCANNER_ARGUMENTS_PRESENT_NO_REG;\n          }\n\n          type |= SCANNER_LITERAL_IS_ARG;\n          literal_p->type = type;\n          no_declarations--;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if ((type & SCANNER_LITERAL_NO_REG) || arguments_type == SCANNER_ARGUMENTS_MAY_PRESENT_IN_EVAL)\n        {\n          arguments_type = SCANNER_ARGUMENTS_PRESENT_NO_REG;\n        }\n        else if (arguments_type == SCANNER_ARGUMENTS_MAY_PRESENT)\n        {\n          arguments_type = SCANNER_ARGUMENTS_PRESENT;\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        /* The SCANNER_LITERAL_IS_ARG may be set above. */\n        if (!(type & SCANNER_LITERAL_IS_ARG))\n        {\n          literal_p->type = 0;\n          continue;\n        }\n#else /* !ENABLED (JERRY_ESNEXT) */\n        literal_p->type = 0;\n        continue;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n    }\n    else if (type & SCANNER_LITERAL_IS_ARG)\n    {\n      last_argument_p = literal_p;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if ((status_flags & SCANNER_LITERAL_POOL_FUNCTION)\n        && (type & SCANNER_LITERAL_IS_LOCAL_FUNC) == SCANNER_LITERAL_IS_FUNC)\n    {\n      if (prev_literal_pool_p == NULL && scanner_scope_find_lexical_declaration (context_p, literal_p))\n      {\n        literal_p->type = 0;\n        continue;\n      }\n\n      if (!(type & SCANNER_LITERAL_IS_ARG))\n      {\n        type |= SCANNER_LITERAL_IS_VAR;\n      }\n\n      type &= (uint8_t) ~SCANNER_LITERAL_IS_FUNC;\n      literal_p->type = type;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if ((type & SCANNER_LITERAL_IS_LOCAL)\n        || ((type & (SCANNER_LITERAL_IS_VAR | SCANNER_LITERAL_IS_ARG))\n            && (status_flags & SCANNER_LITERAL_POOL_FUNCTION)))\n    {\n      JERRY_ASSERT ((status_flags & SCANNER_LITERAL_POOL_FUNCTION)\n                    || !(literal_p->type & SCANNER_LITERAL_IS_ARG));\n\n      if (literal_p->length == 0)\n      {\n        compressed_size += 1;\n        continue;\n      }\n\n      no_declarations++;\n\n      if ((status_flags & SCANNER_LITERAL_POOL_CAN_EVAL) || (type & can_eval_types))\n      {\n        type |= SCANNER_LITERAL_NO_REG;\n        literal_p->type = type;\n      }\n\n      if (type & SCANNER_LITERAL_IS_FUNC)\n      {\n        no_declarations++;\n\n#if ENABLED (JERRY_ESNEXT)\n        if ((type & (SCANNER_LITERAL_IS_CONST | SCANNER_LITERAL_IS_ARG)) == SCANNER_LITERAL_IS_CONST)\n        {\n          JERRY_ASSERT (type & SCANNER_LITERAL_IS_LET);\n\n          /* Catch parameters cannot be functions. */\n          literal_p->type = (uint8_t) (type & ~SCANNER_LITERAL_IS_FUNC);\n          no_declarations--;\n        }\n#else /* !ENABLED (JERRY_ESNEXT) */\n        if (type & SCANNER_LITERAL_IS_LOCAL)\n        {\n          /* Catch parameters cannot be functions. */\n          literal_p->type = (uint8_t) (type & ~SCANNER_LITERAL_IS_FUNC);\n          no_declarations--;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n\n      intptr_t diff = (intptr_t) (literal_p->char_p - prev_source_p);\n\n      if (diff >= 1 && diff <= (intptr_t) UINT8_MAX)\n      {\n        compressed_size += 2 + 1;\n      }\n      else if (diff >= -(intptr_t) UINT8_MAX && diff <= (intptr_t) UINT16_MAX)\n      {\n        compressed_size += 2 + 2;\n      }\n      else\n      {\n        compressed_size += 2 + 1 + sizeof (const uint8_t *);\n      }\n\n      prev_source_p = literal_p->char_p + literal_p->length;\n\n      if ((status_flags & SCANNER_LITERAL_POOL_FUNCTION)\n#if ENABLED (JERRY_ESNEXT)\n          || ((type & SCANNER_LITERAL_IS_FUNC) && (status_flags & SCANNER_LITERAL_POOL_IS_STRICT))\n#endif /* ENABLED (JERRY_ESNEXT) */\n          || !(type & (SCANNER_LITERAL_IS_VAR | SCANNER_LITERAL_IS_FUNC)))\n      {\n        continue;\n      }\n    }\n\n    if (prev_literal_pool_p != NULL && literal_p->length > 0)\n    {\n      /* Propagate literal to upper level. */\n      lexer_lit_location_t *literal_location_p = scanner_add_custom_literal (context_p,\n                                                                             prev_literal_pool_p,\n                                                                             literal_p);\n      uint8_t extended_type = literal_location_p->type;\n\n#if ENABLED (JERRY_ESNEXT)\n      const uint16_t no_reg_flags = (SCANNER_LITERAL_POOL_FUNCTION | SCANNER_LITERAL_POOL_CLASS_FIELD);\n#else /* !ENABLED (JERRY_ESNEXT) */\n      const uint16_t no_reg_flags = SCANNER_LITERAL_POOL_FUNCTION;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if ((status_flags & no_reg_flags) || (type & SCANNER_LITERAL_NO_REG))\n      {\n        extended_type |= SCANNER_LITERAL_NO_REG;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      extended_type |= SCANNER_LITERAL_IS_USED;\n\n      if (status_flags & SCANNER_LITERAL_POOL_FUNCTION_STATEMENT)\n      {\n        extended_type |= SCANNER_LITERAL_EARLY_CREATE;\n      }\n\n      const uint8_t mask = (SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_IS_LOCAL);\n\n      if ((type & SCANNER_LITERAL_IS_ARG)\n          || (literal_location_p->type & mask) == SCANNER_LITERAL_IS_LET\n          || (literal_location_p->type & mask) == SCANNER_LITERAL_IS_CONST)\n      {\n        /* Clears the SCANNER_LITERAL_IS_VAR and SCANNER_LITERAL_IS_FUNC flags\n         * for speculative arrow parameters and local (non-var) functions. */\n        type = 0;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      type = (uint8_t) (type & (SCANNER_LITERAL_IS_VAR | SCANNER_LITERAL_IS_FUNC));\n      JERRY_ASSERT (type == 0 || !(status_flags & SCANNER_LITERAL_POOL_FUNCTION));\n\n      literal_location_p->type = (uint8_t) (extended_type | type);\n    }\n  }\n\n  if ((status_flags & SCANNER_LITERAL_POOL_FUNCTION) || (compressed_size > 1))\n  {\n    if (arguments_type == SCANNER_ARGUMENTS_MAY_PRESENT)\n    {\n      arguments_type = SCANNER_ARGUMENTS_NOT_PRESENT;\n    }\n    else if (arguments_type == SCANNER_ARGUMENTS_MAY_PRESENT_IN_EVAL)\n    {\n      arguments_type = SCANNER_ARGUMENTS_PRESENT_NO_REG;\n    }\n\n    if (arguments_type != SCANNER_ARGUMENTS_NOT_PRESENT)\n    {\n      compressed_size++;\n    }\n\n    compressed_size += sizeof (scanner_info_t);\n\n    scanner_info_t *info_p;\n\n    if (prev_literal_pool_p != NULL || scanner_context_p->end_arguments_p == NULL)\n    {\n      info_p = scanner_insert_info (context_p, literal_pool_p->source_p, compressed_size);\n    }\n    else\n    {\n      scanner_info_t *start_info_p = scanner_context_p->end_arguments_p;\n      info_p = scanner_insert_info_before (context_p, literal_pool_p->source_p, start_info_p, compressed_size);\n    }\n\n    if (no_declarations > PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK)\n    {\n      no_declarations = PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK;\n    }\n\n    uint8_t *data_p = (uint8_t *) (info_p + 1);\n    bool mapped_arguments = false;\n\n    if (status_flags & SCANNER_LITERAL_POOL_FUNCTION)\n    {\n      info_p->type = SCANNER_TYPE_FUNCTION;\n\n      uint8_t u8_arg = 0;\n\n      if (arguments_type != SCANNER_ARGUMENTS_NOT_PRESENT)\n      {\n        u8_arg |= SCANNER_FUNCTION_ARGUMENTS_NEEDED;\n\n        if (no_declarations < PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK)\n        {\n          no_declarations++;\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        const uint16_t is_unmapped = SCANNER_LITERAL_POOL_IS_STRICT | SCANNER_LITERAL_POOL_HAS_COMPLEX_ARGUMENT;\n#else /* !ENABLED (JERRY_ESNEXT) */\n        const uint16_t is_unmapped = SCANNER_LITERAL_POOL_IS_STRICT;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (!(status_flags & is_unmapped))\n        {\n          mapped_arguments = true;\n        }\n\n        if (arguments_type == SCANNER_ARGUMENTS_PRESENT_NO_REG)\n        {\n          arguments_stream_type |= SCANNER_STREAM_NO_REG;\n        }\n\n        if (last_argument_p == NULL)\n        {\n          *data_p++ = arguments_stream_type;\n        }\n      }\n      else\n      {\n        last_argument_p = NULL;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (status_flags & (SCANNER_LITERAL_POOL_HAS_COMPLEX_ARGUMENT | SCANNER_LITERAL_POOL_ARROW))\n      {\n        u8_arg |= SCANNER_FUNCTION_HAS_COMPLEX_ARGUMENT;\n      }\n\n      if (status_flags & SCANNER_LITERAL_POOL_ASYNC)\n      {\n        u8_arg |= SCANNER_FUNCTION_ASYNC;\n\n        if (status_flags & SCANNER_LITERAL_POOL_FUNCTION_STATEMENT)\n        {\n          u8_arg |= SCANNER_FUNCTION_STATEMENT;\n        }\n      }\n\n      if (status_flags & SCANNER_LITERAL_POOL_CAN_EVAL)\n      {\n        u8_arg |= SCANNER_FUNCTION_LEXICAL_ENV_NEEDED;\n      }\n\n      if (status_flags & SCANNER_LITERAL_POOL_IS_STRICT)\n      {\n        u8_arg |= SCANNER_FUNCTION_IS_STRICT;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      info_p->u8_arg = u8_arg;\n      info_p->u16_arg = (uint16_t) no_declarations;\n    }\n    else\n    {\n      info_p->type = SCANNER_TYPE_BLOCK;\n\n      JERRY_ASSERT (prev_literal_pool_p != NULL);\n    }\n\n    parser_list_iterator_init (&literal_pool_p->literal_pool, &literal_iterator);\n    prev_source_p = literal_pool_p->source_p - 1;\n    no_declarations = literal_pool_p->no_declarations;\n\n    while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n    {\n      if (JERRY_UNLIKELY (no_declarations > PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK)\n          || (!(literal_p->type & SCANNER_LITERAL_IS_LOCAL)\n              && (!(literal_p->type & (SCANNER_LITERAL_IS_VAR | SCANNER_LITERAL_IS_ARG))\n                  || !(status_flags & SCANNER_LITERAL_POOL_FUNCTION))))\n      {\n        continue;\n      }\n\n      if (literal_p->length == 0)\n      {\n        *data_p++ = SCANNER_STREAM_TYPE_HOLE;\n\n        if (literal_p == last_argument_p)\n        {\n          *data_p++ = arguments_stream_type;\n        }\n        continue;\n      }\n\n      no_declarations++;\n\n      uint8_t type = SCANNER_STREAM_TYPE_VAR;\n\n      if (literal_p->type & SCANNER_LITERAL_IS_FUNC)\n      {\n        no_declarations++;\n        type = SCANNER_STREAM_TYPE_FUNC;\n\n        if (literal_p->type & SCANNER_LITERAL_IS_ARG)\n        {\n          type = SCANNER_STREAM_TYPE_ARG_FUNC;\n\n#if ENABLED (JERRY_ESNEXT)\n          if (literal_p->type & SCANNER_LITERAL_IS_DESTRUCTURED_ARG)\n          {\n            type = SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        }\n      }\n      else if (literal_p->type & SCANNER_LITERAL_IS_ARG)\n      {\n        type = SCANNER_STREAM_TYPE_ARG;\n\n#if ENABLED (JERRY_ESNEXT)\n        if (literal_p->type & SCANNER_LITERAL_IS_DESTRUCTURED_ARG)\n        {\n          type = SCANNER_STREAM_TYPE_DESTRUCTURED_ARG;\n        }\n\n        if (literal_p->type & SCANNER_LITERAL_IS_VAR)\n        {\n          type = (uint8_t) (type + 1);\n\n          JERRY_ASSERT (type == SCANNER_STREAM_TYPE_ARG_VAR\n                        || type == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n#if ENABLED (JERRY_ESNEXT)\n      else if (literal_p->type & SCANNER_LITERAL_IS_LET)\n      {\n        if (!(literal_p->type & SCANNER_LITERAL_IS_CONST))\n        {\n          type = SCANNER_STREAM_TYPE_LET;\n\n          if ((status_flags & SCANNER_LITERAL_POOL_CAN_EVAL) && (literal_p->type & SCANNER_LITERAL_NO_REG))\n          {\n            literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n          }\n        }\n#if ENABLED (JERRY_MODULE_SYSTEM)\n        else if (prev_literal_pool_p == NULL)\n        {\n          type = SCANNER_STREAM_TYPE_IMPORT;\n        }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n        else\n        {\n          type = SCANNER_STREAM_TYPE_LOCAL;\n        }\n      }\n      else if (literal_p->type & SCANNER_LITERAL_IS_CONST)\n      {\n        type = SCANNER_STREAM_TYPE_CONST;\n\n        if ((status_flags & SCANNER_LITERAL_POOL_CAN_EVAL) && (literal_p->type & SCANNER_LITERAL_NO_REG))\n        {\n          literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n        }\n      }\n\n      if (literal_p->type & SCANNER_LITERAL_EARLY_CREATE)\n      {\n        type |= SCANNER_STREAM_NO_REG | SCANNER_STREAM_EARLY_CREATE;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (literal_p->has_escape)\n      {\n        type |= SCANNER_STREAM_HAS_ESCAPE;\n      }\n\n      if ((literal_p->type & SCANNER_LITERAL_NO_REG)\n          || (mapped_arguments && (literal_p->type & SCANNER_LITERAL_IS_ARG)))\n      {\n        type |= SCANNER_STREAM_NO_REG;\n      }\n\n      data_p[0] = type;\n      data_p[1] = (uint8_t) literal_p->length;\n      data_p += 3;\n\n      intptr_t diff = (intptr_t) (literal_p->char_p - prev_source_p);\n\n      if (diff >= 1 && diff <= (intptr_t) UINT8_MAX)\n      {\n        data_p[-1] = (uint8_t) diff;\n      }\n      else if (diff >= -(intptr_t) UINT8_MAX && diff <= (intptr_t) UINT16_MAX)\n      {\n        if (diff < 0)\n        {\n          diff = -diff;\n        }\n\n        data_p[-3] |= SCANNER_STREAM_UINT16_DIFF;\n        data_p[-1] = (uint8_t) diff;\n        data_p[0] = (uint8_t) (diff >> 8);\n        data_p += 1;\n      }\n      else\n      {\n        data_p[-1] = 0;\n        memcpy (data_p, &literal_p->char_p, sizeof (const uint8_t *));\n        data_p += sizeof (const uint8_t *);\n      }\n\n      if (literal_p == last_argument_p)\n      {\n        *data_p++ = arguments_stream_type;\n      }\n\n      prev_source_p = literal_p->char_p + literal_p->length;\n    }\n\n    data_p[0] = SCANNER_STREAM_TYPE_END;\n\n    JERRY_ASSERT (((uint8_t *) info_p) + compressed_size == data_p + 1);\n  }\n\n  if (!(status_flags & SCANNER_LITERAL_POOL_FUNCTION)\n      && (int32_t) prev_literal_pool_p->no_declarations < no_declarations)\n  {\n    prev_literal_pool_p->no_declarations = (uint16_t) no_declarations;\n  }\n\n  if ((status_flags & SCANNER_LITERAL_POOL_FUNCTION) && prev_literal_pool_p != NULL)\n  {\n    if (prev_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IS_STRICT)\n    {\n      context_p->status_flags |= PARSER_IS_STRICT;\n    }\n    else\n    {\n      context_p->status_flags &= (uint32_t) ~PARSER_IS_STRICT;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (prev_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_GENERATOR)\n    {\n      context_p->status_flags |= PARSER_IS_GENERATOR_FUNCTION;\n    }\n    else\n    {\n      context_p->status_flags &= (uint32_t) ~PARSER_IS_GENERATOR_FUNCTION;\n    }\n\n    if (prev_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_ASYNC)\n    {\n      context_p->status_flags |= PARSER_IS_ASYNC_FUNCTION;\n    }\n    else\n    {\n      context_p->status_flags &= (uint32_t) ~PARSER_IS_ASYNC_FUNCTION;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n\n  scanner_context_p->active_literal_pool_p = literal_pool_p->prev_p;\n\n  parser_list_free (&literal_pool_p->literal_pool);\n  scanner_free (literal_pool_p, sizeof (scanner_literal_pool_t));\n} /* scanner_pop_literal_pool */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Filter out the arguments from a literal pool.\n */\nvoid\nscanner_filter_arguments (parser_context_t *context_p, /**< context */\n                          scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  /* Fast case: check whether all literals are arguments. */\n  scanner_literal_pool_t *literal_pool_p = scanner_context_p->active_literal_pool_p;\n  scanner_literal_pool_t *prev_literal_pool_p = literal_pool_p->prev_p;\n  parser_list_iterator_t literal_iterator;\n  lexer_lit_location_t *literal_p;\n  bool can_eval = (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_CAN_EVAL) != 0;\n  bool has_arguments = (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_NO_ARGUMENTS) == 0;\n\n  JERRY_ASSERT (SCANNER_LITERAL_POOL_MAY_HAVE_ARGUMENTS (literal_pool_p->status_flags));\n\n  if (can_eval)\n  {\n    if (prev_literal_pool_p != NULL)\n    {\n      prev_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_CAN_EVAL;\n    }\n\n    if (has_arguments)\n    {\n      literal_pool_p->status_flags |= (SCANNER_LITERAL_POOL_ARGUMENTS_IN_ARGS | SCANNER_LITERAL_POOL_NO_ARGUMENTS);\n    }\n  }\n\n  literal_pool_p->status_flags &= (uint16_t) ~SCANNER_LITERAL_POOL_CAN_EVAL;\n\n  parser_list_iterator_init (&literal_pool_p->literal_pool, &literal_iterator);\n\n  while (true)\n  {\n    literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator);\n\n    if (literal_p == NULL)\n    {\n      return;\n    }\n\n    if (can_eval || (literal_p->type & SCANNER_LITERAL_EARLY_CREATE))\n    {\n      literal_p->type |= SCANNER_LITERAL_NO_REG | SCANNER_LITERAL_EARLY_CREATE;\n    }\n\n    uint8_t type = literal_p->type;\n    const uint8_t mask = (SCANNER_LITERAL_IS_ARG\n                          | SCANNER_LITERAL_IS_DESTRUCTURED_ARG\n                          | SCANNER_LITERAL_IS_ARROW_DESTRUCTURED_ARG);\n\n    if ((type & mask) != SCANNER_LITERAL_IS_ARG)\n    {\n      break;\n    }\n  }\n\n  /* Destructured args are placed after the other arguments because of register assignments. */\n  bool has_destructured_arg = false;\n  scanner_literal_pool_t *new_literal_pool_p;\n\n  new_literal_pool_p = (scanner_literal_pool_t *) scanner_malloc (context_p, sizeof (scanner_literal_pool_t));\n\n  new_literal_pool_p->prev_p = literal_pool_p;\n  scanner_context_p->active_literal_pool_p = new_literal_pool_p;\n\n  *new_literal_pool_p = *literal_pool_p;\n  parser_list_init (&new_literal_pool_p->literal_pool,\n                    sizeof (lexer_lit_location_t),\n                    (uint32_t) ((128 - sizeof (void *)) / sizeof (lexer_lit_location_t)));\n\n  parser_list_iterator_init (&literal_pool_p->literal_pool, &literal_iterator);\n\n  while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n  {\n    uint8_t type = literal_p->type;\n\n    if (type & SCANNER_LITERAL_IS_ARG)\n    {\n      if (can_eval || (literal_p->type & SCANNER_LITERAL_EARLY_CREATE))\n      {\n        type |= SCANNER_LITERAL_NO_REG | SCANNER_LITERAL_EARLY_CREATE;\n        literal_p->type = type;\n      }\n\n      if (type & (SCANNER_LITERAL_IS_DESTRUCTURED_ARG | SCANNER_LITERAL_IS_ARROW_DESTRUCTURED_ARG))\n      {\n        has_destructured_arg = true;\n\n        if (type & SCANNER_LITERAL_IS_DESTRUCTURED_ARG)\n        {\n          continue;\n        }\n\n        type &= (uint8_t) ~SCANNER_LITERAL_IS_ARROW_DESTRUCTURED_ARG;\n        type |= SCANNER_LITERAL_IS_DESTRUCTURED_ARG;\n\n        literal_p->type = type;\n        continue;\n      }\n\n      lexer_lit_location_t *new_literal_p;\n      new_literal_p = (lexer_lit_location_t *) parser_list_append (context_p, &new_literal_pool_p->literal_pool);\n      *new_literal_p = *literal_p;\n    }\n    else if (has_arguments && scanner_literal_is_arguments (literal_p))\n    {\n      new_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_ARGUMENTS_IN_ARGS;\n\n      if (type & SCANNER_LITERAL_NO_REG)\n      {\n        new_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_NO_ARGUMENTS;\n      }\n    }\n    else if (prev_literal_pool_p != NULL)\n    {\n      /* Propagate literal to upper level. */\n      lexer_lit_location_t *literal_location_p = scanner_add_custom_literal (context_p,\n                                                                             prev_literal_pool_p,\n                                                                             literal_p);\n      type |= SCANNER_LITERAL_NO_REG | SCANNER_LITERAL_IS_USED;\n      literal_location_p->type |= type;\n    }\n  }\n\n  if (has_destructured_arg)\n  {\n    parser_list_iterator_init (&literal_pool_p->literal_pool, &literal_iterator);\n\n    while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n    {\n      const uint8_t expected_flags = SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_IS_DESTRUCTURED_ARG;\n\n      if ((literal_p->type & expected_flags) == expected_flags)\n      {\n        lexer_lit_location_t *new_literal_p;\n        new_literal_p = (lexer_lit_location_t *) parser_list_append (context_p, &new_literal_pool_p->literal_pool);\n        *new_literal_p = *literal_p;\n      }\n    }\n  }\n\n  new_literal_pool_p->prev_p = prev_literal_pool_p;\n\n  parser_list_free (&literal_pool_p->literal_pool);\n  scanner_free (literal_pool_p, sizeof (scanner_literal_pool_t));\n} /* scanner_filter_arguments */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Add any literal to the specified literal pool.\n *\n * @return pointer to the literal\n */\nlexer_lit_location_t *\nscanner_add_custom_literal (parser_context_t *context_p, /**< context */\n                            scanner_literal_pool_t *literal_pool_p, /**< literal pool */\n                            const lexer_lit_location_t *literal_location_p) /**< literal */\n{\n  while (true)\n  {\n    parser_list_iterator_t literal_iterator;\n    parser_list_iterator_init (&literal_pool_p->literal_pool, &literal_iterator);\n    lexer_lit_location_t *literal_p;\n\n    const uint8_t *char_p = literal_location_p->char_p;\n    prop_length_t length = literal_location_p->length;\n\n    if (JERRY_LIKELY (!literal_location_p->has_escape))\n    {\n      while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n      {\n        if (literal_p->length == length)\n        {\n          if (JERRY_LIKELY (!literal_p->has_escape))\n          {\n            if (memcmp (literal_p->char_p, char_p, length) == 0)\n            {\n              return literal_p;\n            }\n          }\n          else if (lexer_compare_identifier_to_string (literal_p, char_p, length))\n          {\n            /* The non-escaped version is preferred. */\n            literal_p->char_p = char_p;\n            literal_p->has_escape = 0;\n            return literal_p;\n          }\n        }\n      }\n    }\n    else\n    {\n      while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n      {\n        if (lexer_compare_identifiers (context_p, literal_p, literal_location_p))\n        {\n          return literal_p;\n        }\n      }\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (JERRY_UNLIKELY (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_CLASS_NAME))\n    {\n      literal_pool_p = literal_pool_p->prev_p;\n      continue;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    literal_p = (lexer_lit_location_t *) parser_list_append (context_p, &literal_pool_p->literal_pool);\n    *literal_p = *literal_location_p;\n\n    literal_p->type = 0;\n\n    return literal_p;\n  }\n} /* scanner_add_custom_literal */\n\n/**\n * Add the current literal token to the current literal pool.\n *\n * @return pointer to the literal\n */\nextern inline lexer_lit_location_t * JERRY_ATTR_ALWAYS_INLINE\nscanner_add_literal (parser_context_t *context_p, /**< context */\n                     scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  return scanner_add_custom_literal (context_p,\n                                     scanner_context_p->active_literal_pool_p,\n                                     &context_p->token.lit_location);\n} /* scanner_add_literal */\n\n/**\n * Add the current literal token to the current literal pool and\n * set SCANNER_LITERAL_NO_REG if it is inside a with statement.\n *\n * @return pointer to the literal\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nscanner_add_reference (parser_context_t *context_p, /**< context */\n                       scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  lexer_lit_location_t *lit_location_p = scanner_add_custom_literal (context_p,\n                                                                     scanner_context_p->active_literal_pool_p,\n                                                                     &context_p->token.lit_location);\n#if ENABLED (JERRY_ESNEXT)\n  lit_location_p->type |= SCANNER_LITERAL_IS_USED;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (scanner_context_p->active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_WITH)\n  {\n    lit_location_p->type |= SCANNER_LITERAL_NO_REG;\n  }\n\n  scanner_detect_eval_call (context_p, scanner_context_p);\n} /* scanner_add_reference */\n\n/**\n * Append an argument to the literal pool. If the argument is already present, make it a \"hole\".\n *\n * @return newly created literal\n */\nlexer_lit_location_t *\nscanner_append_argument (parser_context_t *context_p, /**< context */\n                         scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  scanner_literal_pool_t *literal_pool_p = scanner_context_p->active_literal_pool_p;\n  parser_list_iterator_t literal_iterator;\n  parser_list_iterator_init (&literal_pool_p->literal_pool, &literal_iterator);\n  lexer_lit_location_t *literal_location_p = &context_p->token.lit_location;\n  lexer_lit_location_t *literal_p;\n\n  const uint8_t *char_p = literal_location_p->char_p;\n  prop_length_t length = literal_location_p->length;\n\n  JERRY_ASSERT (SCANNER_LITERAL_POOL_MAY_HAVE_ARGUMENTS (literal_pool_p->status_flags));\n\n  if (JERRY_LIKELY (!context_p->token.lit_location.has_escape))\n  {\n    while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n    {\n      if (literal_p->length == length)\n      {\n        if (JERRY_LIKELY (!literal_p->has_escape))\n        {\n          if (memcmp (literal_p->char_p, char_p, length) == 0)\n          {\n            break;\n          }\n        }\n        else if (lexer_compare_identifier_to_string (literal_p, char_p, length))\n        {\n          break;\n        }\n      }\n    }\n  }\n  else\n  {\n    while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n    {\n      if (lexer_compare_identifiers (context_p, literal_p, literal_location_p))\n      {\n        break;\n      }\n    }\n  }\n\n  uint8_t literal_type = SCANNER_LITERAL_IS_ARG;\n\n  if (literal_p != NULL)\n  {\n    literal_p->length = 0;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (literal_p->type & SCANNER_LITERAL_IS_USED)\n    {\n      literal_type = SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_EARLY_CREATE;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n  }\n\n  literal_p = (lexer_lit_location_t *) parser_list_append (context_p, &literal_pool_p->literal_pool);\n\n  *literal_p = context_p->token.lit_location;\n  literal_p->type = literal_type;\n\n  return literal_p;\n} /* scanner_append_argument */\n\n/**\n * Check whether an eval call is performed and update the status flags accordingly.\n */\nvoid\nscanner_detect_eval_call (parser_context_t *context_p, /**< context */\n                          scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  if (context_p->token.keyword_type == LEXER_KEYW_EVAL\n      && lexer_check_next_character (context_p, LIT_CHAR_LEFT_PAREN))\n  {\n#if ENABLED (JERRY_ESNEXT)\n    const uint16_t flags = (uint16_t) (SCANNER_LITERAL_POOL_CAN_EVAL | SCANNER_LITERAL_POOL_HAS_SUPER_REFERENCE);\n#else /* !ENABLED (JERRY_ESNEXT) */\n    const uint16_t flags = SCANNER_LITERAL_POOL_CAN_EVAL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    scanner_context_p->active_literal_pool_p->status_flags |= flags;\n  }\n} /* scanner_detect_eval_call */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Throws an error for invalid var statements.\n */\nvoid\nscanner_detect_invalid_var (parser_context_t *context_p, /**< context */\n                            scanner_context_t *scanner_context_p, /**< scanner context */\n                            lexer_lit_location_t *var_literal_p) /**< var literal */\n{\n  if (var_literal_p->type & SCANNER_LITERAL_IS_LOCAL\n      && !(var_literal_p->type & (SCANNER_LITERAL_IS_FUNC | SCANNER_LITERAL_IS_ARG))\n      && (var_literal_p->type & SCANNER_LITERAL_IS_LOCAL) != SCANNER_LITERAL_IS_LOCAL)\n  {\n    scanner_raise_redeclaration_error (context_p);\n  }\n\n  scanner_literal_pool_t *literal_pool_p = scanner_context_p->active_literal_pool_p;\n\n  if (!(literal_pool_p->status_flags & SCANNER_LITERAL_POOL_FUNCTION)\n      && ((var_literal_p->type & SCANNER_LITERAL_IS_LOCAL_FUNC) == SCANNER_LITERAL_IS_LOCAL_FUNC))\n  {\n    scanner_raise_redeclaration_error (context_p);\n  }\n\n  const uint8_t *char_p = var_literal_p->char_p;\n  prop_length_t length = var_literal_p->length;\n\n  while (!(literal_pool_p->status_flags & SCANNER_LITERAL_POOL_FUNCTION))\n  {\n    literal_pool_p = literal_pool_p->prev_p;\n\n    parser_list_iterator_t literal_iterator;\n    parser_list_iterator_init (&literal_pool_p->literal_pool, &literal_iterator);\n    lexer_lit_location_t *literal_p;\n\n    if (JERRY_LIKELY (!context_p->token.lit_location.has_escape))\n    {\n      while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n      {\n        if ((literal_p->type & SCANNER_LITERAL_IS_LOCAL)\n            && !(literal_p->type & SCANNER_LITERAL_IS_ARG)\n            && !((literal_p->type & SCANNER_LITERAL_IS_FUNC)\n                 && (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_FUNCTION))\n            && (literal_p->type & SCANNER_LITERAL_IS_LOCAL) != SCANNER_LITERAL_IS_LOCAL\n            && literal_p->length == length)\n        {\n          if (JERRY_LIKELY (!literal_p->has_escape))\n          {\n            if (memcmp (literal_p->char_p, char_p, length) == 0)\n            {\n              scanner_raise_redeclaration_error (context_p);\n              return;\n            }\n          }\n          else if (lexer_compare_identifier_to_string (literal_p, char_p, length))\n          {\n            scanner_raise_redeclaration_error (context_p);\n            return;\n          }\n        }\n      }\n    }\n    else\n    {\n      while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n      {\n        if ((literal_p->type & SCANNER_LITERAL_IS_LOCAL)\n            && !(literal_p->type & SCANNER_LITERAL_IS_ARG)\n            && !((literal_p->type & SCANNER_LITERAL_IS_FUNC)\n                 && (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_FUNCTION))\n            && (literal_p->type & SCANNER_LITERAL_IS_LOCAL) != SCANNER_LITERAL_IS_LOCAL\n            && lexer_compare_identifiers (context_p, literal_p, var_literal_p))\n        {\n          scanner_raise_redeclaration_error (context_p);\n          return;\n        }\n      }\n    }\n  }\n\n  if (scanner_scope_find_lexical_declaration (context_p, var_literal_p))\n  {\n    scanner_raise_redeclaration_error (context_p);\n  }\n} /* scanner_detect_invalid_var */\n\n/**\n * Throws an error for invalid let statements.\n */\nvoid\nscanner_detect_invalid_let (parser_context_t *context_p, /**< context */\n                            lexer_lit_location_t *let_literal_p) /**< let literal */\n{\n  if (let_literal_p->type & (SCANNER_LITERAL_IS_ARG\n                             | SCANNER_LITERAL_IS_VAR\n                             | SCANNER_LITERAL_IS_LOCAL))\n  {\n    scanner_raise_redeclaration_error (context_p);\n  }\n\n  if (let_literal_p->type & SCANNER_LITERAL_IS_FUNC)\n  {\n    let_literal_p->type &= (uint8_t) ~SCANNER_LITERAL_IS_FUNC;\n  }\n} /* scanner_detect_invalid_let */\n\n/**\n * Push the values required for class declaration parsing.\n *\n * @return literal reference created for class statements, NULL otherwise\n */\nlexer_lit_location_t *\nscanner_push_class_declaration (parser_context_t *context_p, /**< context */\n                                scanner_context_t *scanner_context_p, /* scanner context */\n                                uint8_t stack_mode) /**< stack mode */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_CLASS);\n\n  const uint8_t *source_p = context_p->source_p;\n  lexer_lit_location_t *literal_p = NULL;\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  bool is_export_default = context_p->stack_top_uint8 == SCAN_STACK_EXPORT_DEFAULT;\n  JERRY_ASSERT (!is_export_default || stack_mode == SCAN_STACK_CLASS_EXPRESSION);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n  parser_stack_push_uint8 (context_p, stack_mode);\n  lexer_next_token (context_p);\n\n  bool class_has_name = (context_p->token.type == LEXER_LITERAL\n                         && context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n  if (class_has_name)\n  {\n    if (stack_mode == SCAN_STACK_CLASS_STATEMENT)\n    {\n      literal_p = scanner_add_literal (context_p, scanner_context_p);\n      scanner_context_p->active_literal_pool_p->no_declarations++;\n    }\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    else if (is_export_default)\n    {\n      literal_p = scanner_add_literal (context_p, scanner_context_p);\n      scanner_context_p->active_literal_pool_p->no_declarations++;\n\n      scanner_detect_invalid_let (context_p, literal_p);\n\n      if (literal_p->type & SCANNER_LITERAL_IS_USED)\n      {\n        literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n      }\n\n      literal_p->type |= SCANNER_LITERAL_IS_LET | SCANNER_LITERAL_NO_REG;\n    }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n  }\n\n  scanner_literal_pool_t *literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, 0);\n\n  if (class_has_name)\n  {\n    scanner_add_literal (context_p, scanner_context_p);\n    scanner_context_p->active_literal_pool_p->no_declarations++;\n  }\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  else if (is_export_default)\n  {\n    lexer_lit_location_t *name_literal_p;\n    name_literal_p = scanner_add_custom_literal (context_p,\n                                                 scanner_context_p->active_literal_pool_p->prev_p,\n                                                 &lexer_default_literal);\n\n    name_literal_p->type |= SCANNER_LITERAL_IS_LET | SCANNER_LITERAL_NO_REG;\n    scanner_context_p->active_literal_pool_p->no_declarations++;\n  }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n  literal_pool_p->source_p = source_p;\n  literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_CLASS_NAME;\n\n  parser_stack_push_uint8 (context_p, SCAN_STACK_IMPLICIT_CLASS_CONSTRUCTOR);\n  scanner_context_p->mode = SCAN_MODE_CLASS_DECLARATION;\n\n  return literal_p;\n} /* scanner_push_class_declaration */\n\n/**\n * Push the start of a class field initializer.\n */\nvoid\nscanner_push_class_field_initializer (parser_context_t *context_p, /**< context */\n                                      scanner_context_t *scanner_context_p) /* scanner context */\n{\n  scanner_source_start_t source_start;\n  source_start.source_p = context_p->source_p;\n\n  parser_stack_push (context_p, &source_start, sizeof (scanner_source_start_t));\n  parser_stack_push_uint8 (context_p, SCAN_STACK_CLASS_FIELD_INITIALIZER);\n\n  scanner_literal_pool_t *literal_pool_p;\n  literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, SCANNER_LITERAL_POOL_CLASS_FIELD);\n  literal_pool_p->source_p = context_p->source_p;\n\n  scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n} /* scanner_push_class_field_initializer */\n\n/**\n * Push the values required for destructuring assignment or binding parsing.\n */\nvoid\nscanner_push_destructuring_pattern (parser_context_t *context_p, /**< context */\n                                    scanner_context_t *scanner_context_p, /**< scanner context */\n                                    uint8_t binding_type, /**< type of destructuring binding pattern */\n                                    bool is_nested) /**< nested declaration */\n{\n  JERRY_ASSERT (binding_type != SCANNER_BINDING_NONE || !is_nested);\n\n  scanner_source_start_t source_start;\n  source_start.source_p = context_p->source_p;\n\n  parser_stack_push (context_p, &source_start, sizeof (scanner_source_start_t));\n  parser_stack_push_uint8 (context_p, scanner_context_p->binding_type);\n  scanner_context_p->binding_type = binding_type;\n\n  if (SCANNER_NEEDS_BINDING_LIST (binding_type))\n  {\n    scanner_binding_list_t *binding_list_p;\n    binding_list_p = (scanner_binding_list_t *) scanner_malloc (context_p, sizeof (scanner_binding_list_t));\n\n    binding_list_p->prev_p = scanner_context_p->active_binding_list_p;\n    binding_list_p->items_p = NULL;\n    binding_list_p->is_nested = is_nested;\n\n    scanner_context_p->active_binding_list_p = binding_list_p;\n  }\n} /* scanner_push_destructuring_pattern */\n\n/**\n * Pop binding list.\n */\nvoid\nscanner_pop_binding_list (scanner_context_t *scanner_context_p) /**< scanner context */\n{\n  scanner_binding_list_t *binding_list_p = scanner_context_p->active_binding_list_p;\n  scanner_binding_item_t *item_p = binding_list_p->items_p;\n  scanner_binding_list_t *prev_binding_list_p = binding_list_p->prev_p;\n  bool is_nested = binding_list_p->is_nested;\n\n  scanner_free (binding_list_p, sizeof (scanner_binding_list_t));\n  scanner_context_p->active_binding_list_p = prev_binding_list_p;\n\n  JERRY_ASSERT (binding_list_p != NULL);\n\n  if (!is_nested)\n  {\n    while (item_p != NULL)\n    {\n      scanner_binding_item_t *next_p = item_p->next_p;\n\n      JERRY_ASSERT (item_p->literal_p->type & (SCANNER_LITERAL_IS_LOCAL | SCANNER_LITERAL_IS_ARG));\n\n      scanner_free (item_p, sizeof (scanner_binding_item_t));\n      item_p = next_p;\n    }\n    return;\n  }\n\n  JERRY_ASSERT (prev_binding_list_p != NULL);\n\n  while (item_p != NULL)\n  {\n    scanner_binding_item_t *next_p = item_p->next_p;\n\n    item_p->next_p = prev_binding_list_p->items_p;\n    prev_binding_list_p->items_p = item_p;\n\n    item_p = next_p;\n  }\n} /* scanner_pop_binding_list */\n\n/**\n * Append a hole into the literal pool.\n */\nvoid\nscanner_append_hole (parser_context_t *context_p, scanner_context_t *scanner_context_p)\n{\n  scanner_literal_pool_t *literal_pool_p = scanner_context_p->active_literal_pool_p;\n\n  lexer_lit_location_t *literal_p;\n  literal_p = (lexer_lit_location_t *) parser_list_append (context_p, &literal_pool_p->literal_pool);\n\n  literal_p->char_p = NULL;\n  literal_p->length = 0;\n  literal_p->type = SCANNER_LITERAL_IS_ARG;\n  literal_p->has_escape = 0;\n} /* scanner_append_hole */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Reverse the scanner info chain after the scanning is completed.\n */\nvoid\nscanner_reverse_info_list (parser_context_t *context_p) /**< context */\n{\n  scanner_info_t *scanner_info_p = context_p->next_scanner_info_p;\n  scanner_info_t *last_scanner_info_p = NULL;\n\n  if (scanner_info_p->type == SCANNER_TYPE_END)\n  {\n    return;\n  }\n\n  do\n  {\n    scanner_info_t *next_scanner_info_p = scanner_info_p->next_p;\n    scanner_info_p->next_p = last_scanner_info_p;\n\n    last_scanner_info_p = scanner_info_p;\n    scanner_info_p = next_scanner_info_p;\n  }\n  while (scanner_info_p->type != SCANNER_TYPE_END);\n\n  context_p->next_scanner_info_p->next_p = scanner_info_p;\n  context_p->next_scanner_info_p = last_scanner_info_p;\n} /* scanner_reverse_info_list */\n\n/**\n * Release unused scanner info blocks.\n * This should happen only if an error is occured.\n */\nvoid\nscanner_cleanup (parser_context_t *context_p) /**< context */\n{\n  if (context_p->skipped_scanner_info_p != NULL)\n  {\n    context_p->skipped_scanner_info_end_p->next_p = context_p->next_scanner_info_p;\n    context_p->next_scanner_info_p = context_p->skipped_scanner_info_p;\n    context_p->skipped_scanner_info_p = NULL;\n  }\n\n  scanner_info_t *scanner_info_p = context_p->next_scanner_info_p;\n\n  while (scanner_info_p != NULL)\n  {\n    scanner_info_t *next_scanner_info_p = scanner_info_p->next_p;\n\n    size_t size = sizeof (scanner_info_t);\n\n    switch (scanner_info_p->type)\n    {\n      case SCANNER_TYPE_END:\n      {\n        scanner_info_p = context_p->active_scanner_info_p;\n        continue;\n      }\n      case SCANNER_TYPE_FUNCTION:\n      case SCANNER_TYPE_BLOCK:\n      {\n        size = scanner_get_stream_size (scanner_info_p, sizeof (scanner_info_t));\n        break;\n      }\n      case SCANNER_TYPE_WHILE:\n      case SCANNER_TYPE_FOR_IN:\n#if ENABLED (JERRY_ESNEXT)\n      case SCANNER_TYPE_FOR_OF:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case SCANNER_TYPE_CASE:\n#if ENABLED (JERRY_ESNEXT)\n      case SCANNER_TYPE_INITIALIZER:\n      case SCANNER_TYPE_CLASS_FIELD_INITIALIZER_END:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      {\n        size = sizeof (scanner_location_info_t);\n        break;\n      }\n      case SCANNER_TYPE_FOR:\n      {\n        size = sizeof (scanner_for_info_t);\n        break;\n      }\n      case SCANNER_TYPE_SWITCH:\n      {\n        scanner_release_switch_cases (((scanner_switch_info_t *) scanner_info_p)->case_p);\n        size = sizeof (scanner_switch_info_t);\n        break;\n      }\n      default:\n      {\n#if ENABLED (JERRY_ESNEXT)\n        JERRY_ASSERT (scanner_info_p->type == SCANNER_TYPE_END_ARGUMENTS\n                      || scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS\n                      || scanner_info_p->type == SCANNER_TYPE_CLASS_CONSTRUCTOR\n                      || scanner_info_p->type == SCANNER_TYPE_LET_EXPRESSION\n                      || scanner_info_p->type == SCANNER_TYPE_ERR_REDECLARED\n                      || scanner_info_p->type == SCANNER_TYPE_ERR_ASYNC_FUNCTION\n                      || scanner_info_p->type == SCANNER_TYPE_EXPORT_MODULE_SPECIFIER);\n#else /* !ENABLED (JERRY_ESNEXT) */\n        JERRY_ASSERT (scanner_info_p->type == SCANNER_TYPE_END_ARGUMENTS);\n#endif /* ENABLED (JERRY_ESNEXT) */\n        break;\n      }\n    }\n\n    scanner_free (scanner_info_p, size);\n    scanner_info_p = next_scanner_info_p;\n  }\n\n  context_p->next_scanner_info_p = NULL;\n  context_p->active_scanner_info_p = NULL;\n} /* scanner_cleanup */\n\n/**\n * Checks whether a context needs to be created for a block.\n *\n * @return true - if context is needed,\n *         false - otherwise\n */\nbool\nscanner_is_context_needed (parser_context_t *context_p, /**< context */\n                           parser_check_context_type_t check_type) /**< context type */\n{\n  scanner_info_t *info_p = context_p->next_scanner_info_p;\n  const uint8_t *data_p = (const uint8_t *) (info_p + 1);\n\n  JERRY_UNUSED (check_type);\n\n#if ENABLED (JERRY_ESNEXT)\n  JERRY_ASSERT ((check_type == PARSER_CHECK_BLOCK_CONTEXT ? info_p->type == SCANNER_TYPE_BLOCK\n                                                          : info_p->type == SCANNER_TYPE_FUNCTION));\n\n  uint32_t scope_stack_reg_top = (check_type != PARSER_CHECK_GLOBAL_CONTEXT ? context_p->scope_stack_reg_top\n                                                                            : 0);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_ASSERT (check_type == PARSER_CHECK_BLOCK_CONTEXT);\n  JERRY_ASSERT (info_p->type == SCANNER_TYPE_BLOCK);\n\n  uint32_t scope_stack_reg_top = context_p->scope_stack_reg_top;\n#endif /* !JERRY_NDEBUG */\n\n  while (data_p[0] != SCANNER_STREAM_TYPE_END)\n  {\n    uint8_t data = data_p[0];\n\n#if ENABLED (JERRY_ESNEXT)\n    uint32_t type = data & SCANNER_STREAM_TYPE_MASK;\n\n    if (JERRY_UNLIKELY (check_type == PARSER_CHECK_FUNCTION_CONTEXT))\n    {\n      if (JERRY_UNLIKELY (type == SCANNER_STREAM_TYPE_HOLE))\n      {\n        data_p++;\n        continue;\n      }\n\n      if (JERRY_UNLIKELY (SCANNER_STREAM_TYPE_IS_ARGUMENTS (type)))\n      {\n        if ((data & SCANNER_STREAM_NO_REG)\n            || scope_stack_reg_top >= PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n        {\n          return true;\n        }\n\n        scope_stack_reg_top++;\n        data_p++;\n        continue;\n      }\n    }\n\n#ifndef JERRY_NDEBUG\n    if (check_type == PARSER_CHECK_BLOCK_CONTEXT)\n    {\n      JERRY_ASSERT (type == SCANNER_STREAM_TYPE_VAR\n                    || type == SCANNER_STREAM_TYPE_LET\n                    || type == SCANNER_STREAM_TYPE_CONST\n                    || type == SCANNER_STREAM_TYPE_LOCAL\n                    || type == SCANNER_STREAM_TYPE_FUNC);\n    }\n    else if (check_type == PARSER_CHECK_GLOBAL_CONTEXT)\n    {\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      const bool is_import = (type == SCANNER_STREAM_TYPE_IMPORT);\n#else\n      const bool is_import = true;\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n      /* FIXME: a private declarative lexical environment should always be present\n       * for modules. Remove SCANNER_STREAM_TYPE_IMPORT after it is implemented. */\n      JERRY_ASSERT (type == SCANNER_STREAM_TYPE_VAR\n                    || type == SCANNER_STREAM_TYPE_LET\n                    || type == SCANNER_STREAM_TYPE_CONST\n                    || type == SCANNER_STREAM_TYPE_FUNC\n                    || is_import);\n\n      /* Only let/const can be stored in registers */\n      JERRY_ASSERT ((data & SCANNER_STREAM_NO_REG)\n                    || (type == SCANNER_STREAM_TYPE_FUNC && (context_p->global_status_flags & ECMA_PARSE_DIRECT_EVAL))\n                    || type == SCANNER_STREAM_TYPE_LET\n                    || type == SCANNER_STREAM_TYPE_CONST);\n    }\n    else\n    {\n      JERRY_ASSERT (check_type == PARSER_CHECK_FUNCTION_CONTEXT);\n\n      JERRY_ASSERT (type == SCANNER_STREAM_TYPE_VAR\n                    || type == SCANNER_STREAM_TYPE_LET\n                    || type == SCANNER_STREAM_TYPE_CONST\n                    || type == SCANNER_STREAM_TYPE_LOCAL\n                    || type == SCANNER_STREAM_TYPE_ARG\n                    || type == SCANNER_STREAM_TYPE_ARG_VAR\n                    || type == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG\n                    || type == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR\n                    || type == SCANNER_STREAM_TYPE_ARG_FUNC\n                    || type == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC\n                    || type == SCANNER_STREAM_TYPE_FUNC);\n    }\n#endif /* !JERRY_NDEBUG */\n\n#else /* !ENABLED (JERRY_ESNEXT) */\n    JERRY_ASSERT ((data & SCANNER_STREAM_TYPE_MASK) == SCANNER_STREAM_TYPE_VAR);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (!(data & SCANNER_STREAM_UINT16_DIFF))\n    {\n      if (data_p[2] != 0)\n      {\n        data_p += 2 + 1;\n      }\n      else\n      {\n        data_p += 2 + 1 + sizeof (const uint8_t *);\n      }\n    }\n    else\n    {\n      data_p += 2 + 2;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    const bool is_import = (type == SCANNER_STREAM_TYPE_IMPORT);\n#else /* !ENABLED (JERRY_MODULE_SYSTEM) */\n    const bool is_import = false;\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n    if (JERRY_UNLIKELY (check_type == PARSER_CHECK_GLOBAL_CONTEXT)\n        && (type == SCANNER_STREAM_TYPE_VAR\n            || (type == SCANNER_STREAM_TYPE_FUNC && !(context_p->global_status_flags & ECMA_PARSE_EVAL))\n            || is_import))\n    {\n      continue;\n    }\n\n    if (JERRY_UNLIKELY (check_type == PARSER_CHECK_FUNCTION_CONTEXT))\n    {\n      if (SCANNER_STREAM_TYPE_IS_ARG_FUNC (type)\n          || type == SCANNER_STREAM_TYPE_ARG_VAR\n          || type == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR)\n      {\n        /* The return value is true, if the variable is stored in the lexical environment\n         * or all registers have already been used for function arguments. This can be\n         * inprecise in the latter case, but this is a very rare corner case. A more\n         * sophisticated check would require to decode the literal. */\n        if ((data & SCANNER_STREAM_NO_REG)\n            || scope_stack_reg_top >= PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n        {\n          return true;\n        }\n        continue;\n      }\n\n      if (SCANNER_STREAM_TYPE_IS_ARG (type))\n      {\n        continue;\n      }\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if ((data & SCANNER_STREAM_NO_REG)\n        || scope_stack_reg_top >= PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n    {\n      return true;\n    }\n\n    scope_stack_reg_top++;\n  }\n\n  return false;\n} /* scanner_is_context_needed */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Try to scan/parse the \".target\" part in the \"new.target\" expression.\n *\n * Upon exiting with \"true\" the current token will point to the \"target\"\n * literal.\n *\n * If the \"target\" literal is not after the \"new.\" then a scanner/parser\n * error will be raised.\n *\n * @returns true if the \".target\" part was found\n *          false if there is no \".\" after the new.\n */\nbool\nscanner_try_scan_new_target (parser_context_t *context_p) /**< parser/scanner context */\n{\n  JERRY_ASSERT (context_p->token.type == LEXER_KEYW_NEW);\n\n  if (lexer_check_next_character (context_p, LIT_CHAR_DOT))\n  {\n    lexer_next_token (context_p);\n    if (context_p->token.type != LEXER_DOT)\n    {\n      parser_raise_error (context_p, PARSER_ERR_INVALID_CHARACTER);\n    }\n\n    lexer_next_token (context_p);\n    if (!lexer_token_is_identifier (context_p, \"target\", 6))\n    {\n      parser_raise_error (context_p, PARSER_ERR_NEW_TARGET_EXPECTED);\n    }\n\n    return true;\n  }\n  return false;\n} /* scanner_try_scan_new_target */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Description of \"arguments\" literal string.\n */\nconst lexer_lit_location_t lexer_arguments_literal =\n{\n  (const uint8_t *) \"arguments\", 9, LEXER_IDENT_LITERAL, false\n};\n\n/**\n * Create an unused literal.\n */\nstatic void\nscanner_create_unused_literal (parser_context_t *context_p, /**< context */\n                               uint8_t status_flags) /**< initial status flags */\n{\n  if (JERRY_UNLIKELY (context_p->literal_count >= PARSER_MAXIMUM_NUMBER_OF_LITERALS))\n  {\n    parser_raise_error (context_p, PARSER_ERR_LITERAL_LIMIT_REACHED);\n  }\n\n  lexer_literal_t *literal_p = (lexer_literal_t *) parser_list_append (context_p, &context_p->literal_pool);\n\n  literal_p->type = LEXER_UNUSED_LITERAL;\n  literal_p->status_flags = status_flags;\n\n  context_p->literal_count++;\n} /* scanner_create_unused_literal */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Emit checks for redeclared bindings in the global lexical scope.\n */\nvoid\nscanner_check_variables (parser_context_t *context_p) /**< context */\n{\n  scanner_info_t *info_p = context_p->next_scanner_info_p;\n  const uint8_t *next_data_p = (const uint8_t *) (info_p + 1);\n  lexer_lit_location_t literal;\n\n  JERRY_ASSERT (info_p->type == SCANNER_TYPE_FUNCTION);\n\n  literal.char_p = info_p->source_p - 1;\n\n  while (next_data_p[0] != SCANNER_STREAM_TYPE_END)\n  {\n    uint32_t type = next_data_p[0] & SCANNER_STREAM_TYPE_MASK;\n    const uint8_t *data_p = next_data_p;\n\n    JERRY_ASSERT (type != SCANNER_STREAM_TYPE_HOLE\n                  && !SCANNER_STREAM_TYPE_IS_ARG (type)\n                  && !SCANNER_STREAM_TYPE_IS_ARG_FUNC (type));\n    JERRY_ASSERT (data_p[0] & SCANNER_STREAM_NO_REG);\n\n    if (!(data_p[0] & SCANNER_STREAM_UINT16_DIFF))\n    {\n      if (data_p[2] != 0)\n      {\n        literal.char_p += data_p[2];\n        next_data_p += 2 + 1;\n      }\n      else\n      {\n        memcpy (&literal.char_p, data_p + 2 + 1, sizeof (const uint8_t *));\n        next_data_p += 2 + 1 + sizeof (const uint8_t *);\n      }\n    }\n    else\n    {\n      int32_t diff = ((int32_t) data_p[2]) | ((int32_t) data_p[3]) << 8;\n\n      if (diff <= (intptr_t) UINT8_MAX)\n      {\n        diff = -diff;\n      }\n\n      literal.char_p += diff;\n      next_data_p += 2 + 2;\n    }\n\n    literal.length = data_p[1];\n    literal.type = LEXER_IDENT_LITERAL;\n    literal.has_escape = (data_p[0] & SCANNER_STREAM_HAS_ESCAPE) ? 1 : 0;\n\n    lexer_construct_literal_object (context_p, &literal, LEXER_NEW_IDENT_LITERAL);\n    literal.char_p += data_p[1];\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    if (type == SCANNER_STREAM_TYPE_IMPORT)\n    {\n      continue;\n    }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n    context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_USED;\n\n    uint16_t opcode;\n    if (type == SCANNER_STREAM_TYPE_VAR || type == SCANNER_STREAM_TYPE_FUNC)\n    {\n      opcode = CBC_CHECK_VAR;\n    }\n    else\n    {\n      opcode = CBC_CHECK_LET;\n    }\n\n    parser_emit_cbc_literal (context_p, opcode, context_p->lit_object.index);\n  }\n\n  parser_flush_cbc (context_p);\n} /* scanner_check_variables */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Create and/or initialize var/let/const/function/etc. variables.\n */\nvoid\nscanner_create_variables (parser_context_t *context_p, /**< context */\n                          uint32_t option_flags) /**< combination of scanner_create_variables_flags_t bits */\n{\n  scanner_info_t *info_p = context_p->next_scanner_info_p;\n  const uint8_t *next_data_p = (const uint8_t *) (info_p + 1);\n  uint8_t info_type = info_p->type;\n  uint8_t info_u8_arg = info_p->u8_arg;\n  lexer_lit_location_t literal;\n  parser_scope_stack_t *scope_stack_p;\n  parser_scope_stack_t *scope_stack_end_p;\n\n  JERRY_ASSERT (info_type == SCANNER_TYPE_FUNCTION || info_type == SCANNER_TYPE_BLOCK);\n  JERRY_ASSERT (!(option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_ARGS)\n                || !(option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_BODY));\n  JERRY_ASSERT (info_type == SCANNER_TYPE_FUNCTION\n                || !(option_flags & (SCANNER_CREATE_VARS_IS_FUNCTION_ARGS | SCANNER_CREATE_VARS_IS_FUNCTION_BODY)));\n\n  if (info_type == SCANNER_TYPE_FUNCTION && !(option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_BODY))\n  {\n    JERRY_ASSERT (context_p->scope_stack_p == NULL);\n\n    size_t stack_size = info_p->u16_arg * sizeof (parser_scope_stack_t);\n    context_p->scope_stack_size = info_p->u16_arg;\n\n    scope_stack_p = NULL;\n\n    if (stack_size > 0)\n    {\n      scope_stack_p = (parser_scope_stack_t *) parser_malloc (context_p, stack_size);\n    }\n\n    context_p->scope_stack_p = scope_stack_p;\n    scope_stack_end_p = scope_stack_p + context_p->scope_stack_size;\n  }\n  else\n  {\n    JERRY_ASSERT (context_p->scope_stack_p != NULL || context_p->scope_stack_size == 0);\n\n    scope_stack_p = context_p->scope_stack_p;\n    scope_stack_end_p = scope_stack_p + context_p->scope_stack_size;\n    scope_stack_p += context_p->scope_stack_top;\n  }\n\n  uint32_t scope_stack_reg_top = context_p->scope_stack_reg_top;\n\n  literal.char_p = info_p->source_p - 1;\n\n  while (next_data_p[0] != SCANNER_STREAM_TYPE_END)\n  {\n    uint32_t type = next_data_p[0] & SCANNER_STREAM_TYPE_MASK;\n    const uint8_t *data_p = next_data_p;\n\n    JERRY_ASSERT ((option_flags & (SCANNER_CREATE_VARS_IS_FUNCTION_BODY | SCANNER_CREATE_VARS_IS_FUNCTION_ARGS))\n                  || (type != SCANNER_STREAM_TYPE_HOLE\n                      && !SCANNER_STREAM_TYPE_IS_ARG (type)\n                      && !SCANNER_STREAM_TYPE_IS_ARG_FUNC (type)));\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    JERRY_ASSERT (type != SCANNER_STREAM_TYPE_IMPORT || (data_p[0] & SCANNER_STREAM_NO_REG));\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n    if (JERRY_UNLIKELY (type == SCANNER_STREAM_TYPE_HOLE))\n    {\n      JERRY_ASSERT (info_type == SCANNER_TYPE_FUNCTION);\n      next_data_p++;\n\n      if (option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_BODY)\n      {\n        continue;\n      }\n\n      uint8_t mask = SCANNER_FUNCTION_ARGUMENTS_NEEDED | SCANNER_FUNCTION_HAS_COMPLEX_ARGUMENT;\n\n      if (!(context_p->status_flags & PARSER_IS_STRICT)\n          && (info_u8_arg & mask) == SCANNER_FUNCTION_ARGUMENTS_NEEDED)\n      {\n        scanner_create_unused_literal (context_p, LEXER_FLAG_FUNCTION_ARGUMENT);\n      }\n\n      if (scope_stack_reg_top < PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n      {\n        scope_stack_reg_top++;\n      }\n      continue;\n    }\n\n    if (JERRY_UNLIKELY (SCANNER_STREAM_TYPE_IS_ARGUMENTS (type)))\n    {\n      JERRY_ASSERT (info_type == SCANNER_TYPE_FUNCTION);\n      next_data_p++;\n\n      if (option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_BODY)\n      {\n        continue;\n      }\n\n      context_p->status_flags |= PARSER_ARGUMENTS_NEEDED;\n\n      if (JERRY_UNLIKELY (scope_stack_p >= scope_stack_end_p))\n      {\n        JERRY_ASSERT (context_p->scope_stack_size == PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK);\n        parser_raise_error (context_p, PARSER_ERR_SCOPE_STACK_LIMIT_REACHED);\n      }\n\n      lexer_construct_literal_object (context_p, &lexer_arguments_literal, LEXER_NEW_IDENT_LITERAL);\n      scope_stack_p->map_from = context_p->lit_object.index;\n\n      uint16_t map_to;\n\n      if (!(data_p[0] & SCANNER_STREAM_NO_REG)\n          && scope_stack_reg_top < PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n      {\n        map_to = (uint16_t) (PARSER_REGISTER_START + scope_stack_reg_top);\n\n#if ENABLED (JERRY_ESNEXT)\n        scope_stack_p->map_to = (uint16_t) (scope_stack_reg_top + 1);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        scope_stack_reg_top++;\n      }\n      else\n      {\n        context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_USED;\n        map_to = context_p->lit_object.index;\n\n        context_p->status_flags |= PARSER_LEXICAL_ENV_NEEDED;\n\n#if ENABLED (JERRY_ESNEXT)\n        if (data_p[0] & SCANNER_STREAM_LOCAL_ARGUMENTS)\n        {\n          context_p->status_flags |= PARSER_LEXICAL_BLOCK_NEEDED;\n        }\n\n        scope_stack_p->map_to = 0;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n\n#if !ENABLED (JERRY_ESNEXT)\n      scope_stack_p->map_to = map_to;\n#endif /* !ENABLED (JERRY_ESNEXT) */\n      scope_stack_p++;\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n      context_p->scope_stack_top = (uint16_t) (scope_stack_p - context_p->scope_stack_p);\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n      parser_emit_cbc_ext_literal (context_p, CBC_EXT_CREATE_ARGUMENTS, map_to);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (type == SCANNER_STREAM_TYPE_ARGUMENTS_FUNC)\n      {\n        if (JERRY_UNLIKELY (scope_stack_p >= scope_stack_end_p))\n        {\n          JERRY_ASSERT (context_p->scope_stack_size == PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK);\n          parser_raise_error (context_p, PARSER_ERR_SCOPE_STACK_LIMIT_REACHED);\n        }\n\n        scope_stack_p->map_from = PARSER_SCOPE_STACK_FUNC;\n        scope_stack_p->map_to = context_p->literal_count;\n        scope_stack_p++;\n\n        scanner_create_unused_literal (context_p, 0);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_ARGS)\n      {\n        break;\n      }\n      continue;\n    }\n\n    JERRY_ASSERT (context_p->scope_stack_size != 0);\n\n    if (!(data_p[0] & SCANNER_STREAM_UINT16_DIFF))\n    {\n      if (data_p[2] != 0)\n      {\n        literal.char_p += data_p[2];\n        next_data_p += 2 + 1;\n      }\n      else\n      {\n        memcpy (&literal.char_p, data_p + 2 + 1, sizeof (const uint8_t *));\n        next_data_p += 2 + 1 + sizeof (const uint8_t *);\n      }\n    }\n    else\n    {\n      int32_t diff = ((int32_t) data_p[2]) | ((int32_t) data_p[3]) << 8;\n\n      if (diff <= (intptr_t) UINT8_MAX)\n      {\n        diff = -diff;\n      }\n\n      literal.char_p += diff;\n      next_data_p += 2 + 2;\n    }\n\n    if (SCANNER_STREAM_TYPE_IS_ARG (type))\n    {\n      if (option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_BODY)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if ((context_p->status_flags & PARSER_LEXICAL_BLOCK_NEEDED)\n            && (type == SCANNER_STREAM_TYPE_ARG_VAR || type == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR))\n        {\n          literal.length = data_p[1];\n          literal.type = LEXER_IDENT_LITERAL;\n          literal.has_escape = (data_p[0] & SCANNER_STREAM_HAS_ESCAPE) ? 1 : 0;\n\n          /* Literal must be exists. */\n          lexer_construct_literal_object (context_p, &literal, LEXER_IDENT_LITERAL);\n\n          if (context_p->lit_object.index < PARSER_REGISTER_START)\n          {\n            parser_emit_cbc_ext_literal_from_token (context_p, CBC_EXT_COPY_FROM_ARG);\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        literal.char_p += data_p[1];\n        continue;\n      }\n    }\n    else if ((option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_ARGS)\n             && !SCANNER_STREAM_TYPE_IS_ARG_FUNC (type))\n    {\n      /* Function arguments must come first. */\n      break;\n    }\n\n    literal.length = data_p[1];\n    literal.type = LEXER_IDENT_LITERAL;\n    literal.has_escape = (data_p[0] & SCANNER_STREAM_HAS_ESCAPE) ? 1 : 0;\n\n    lexer_construct_literal_object (context_p, &literal, LEXER_NEW_IDENT_LITERAL);\n    literal.char_p += data_p[1];\n\n    if (SCANNER_STREAM_TYPE_IS_ARG_FUNC (type) && (option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_BODY))\n    {\n      JERRY_ASSERT (scope_stack_p >= context_p->scope_stack_p + 2);\n      JERRY_ASSERT (context_p->status_flags & PARSER_IS_FUNCTION);\n#if ENABLED (JERRY_ESNEXT)\n      JERRY_ASSERT (!(context_p->status_flags & PARSER_FUNCTION_IS_PARSING_ARGS));\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      parser_scope_stack_t *function_map_p = scope_stack_p - 2;\n      uint16_t literal_index = context_p->lit_object.index;\n\n      while (literal_index != function_map_p->map_from)\n      {\n        function_map_p--;\n\n        JERRY_ASSERT (function_map_p >= context_p->scope_stack_p);\n      }\n\n      JERRY_ASSERT (function_map_p[1].map_from == PARSER_SCOPE_STACK_FUNC);\n\n      cbc_opcode_t opcode = CBC_SET_VAR_FUNC;\n\n#if ENABLED (JERRY_ESNEXT)\n      if (JERRY_UNLIKELY (context_p->status_flags & PARSER_LEXICAL_BLOCK_NEEDED)\n          && (function_map_p[0].map_to & PARSER_SCOPE_STACK_REGISTER_MASK) == 0)\n      {\n        opcode = CBC_INIT_ARG_OR_FUNC;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      parser_emit_cbc_literal_value (context_p,\n                                     (uint16_t) opcode,\n                                     function_map_p[1].map_to,\n                                     scanner_decode_map_to (function_map_p));\n      continue;\n    }\n\n    if (JERRY_UNLIKELY (scope_stack_p >= scope_stack_end_p))\n    {\n      JERRY_ASSERT (context_p->scope_stack_size == PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK);\n      parser_raise_error (context_p, PARSER_ERR_SCOPE_STACK_LIMIT_REACHED);\n    }\n\n    scope_stack_p->map_from = context_p->lit_object.index;\n\n#if ENABLED (JERRY_ESNEXT)\n    if (info_type == SCANNER_TYPE_FUNCTION)\n    {\n      if (type != SCANNER_STREAM_TYPE_LET\n#if ENABLED (JERRY_MODULE_SYSTEM)\n          && type != SCANNER_STREAM_TYPE_IMPORT\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n          && type != SCANNER_STREAM_TYPE_CONST)\n      {\n        context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_GLOBAL;\n      }\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    uint16_t map_to;\n    uint16_t func_init_opcode = CBC_INIT_ARG_OR_FUNC;\n\n    if (!(data_p[0] & SCANNER_STREAM_NO_REG)\n        && scope_stack_reg_top < PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n    {\n      map_to = (uint16_t) (PARSER_REGISTER_START + scope_stack_reg_top);\n\n#if ENABLED (JERRY_ESNEXT)\n      scope_stack_p->map_to = (uint16_t) (scope_stack_reg_top + 1);\n#else /* !ENABLED (JERRY_ESNEXT) */\n      scope_stack_p->map_to = map_to;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      scope_stack_reg_top++;\n#if ENABLED (JERRY_ESNEXT)\n      switch (type)\n      {\n        case SCANNER_STREAM_TYPE_CONST:\n        {\n          scope_stack_p->map_to |= PARSER_SCOPE_STACK_IS_CONST_REG;\n          /* FALLTHRU */\n        }\n        case SCANNER_STREAM_TYPE_LET:\n        case SCANNER_STREAM_TYPE_ARG:\n        case SCANNER_STREAM_TYPE_ARG_VAR:\n        case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG:\n        case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR:\n        case SCANNER_STREAM_TYPE_ARG_FUNC:\n        case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC:\n        {\n          scope_stack_p->map_to |= PARSER_SCOPE_STACK_NO_FUNCTION_COPY;\n          break;\n        }\n      }\n\n      func_init_opcode = CBC_SET_VAR_FUNC;\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n    else\n    {\n      context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_USED;\n      map_to = context_p->lit_object.index;\n\n#if ENABLED (JERRY_ESNEXT)\n      uint16_t scope_stack_map_to = 0;\n#else /* !ENABLED (JERRY_ESNEXT) */\n      scope_stack_p->map_to = map_to;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (info_type == SCANNER_TYPE_FUNCTION)\n      {\n        context_p->status_flags |= PARSER_LEXICAL_ENV_NEEDED;\n      }\n\n      switch (type)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        case SCANNER_STREAM_TYPE_LET:\n        case SCANNER_STREAM_TYPE_CONST:\n        case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG:\n        case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR:\n        case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC:\n        {\n          scope_stack_map_to |= PARSER_SCOPE_STACK_NO_FUNCTION_COPY;\n\n          if (!(data_p[0] & SCANNER_STREAM_EARLY_CREATE))\n          {\n            break;\n          }\n          scope_stack_map_to |= PARSER_SCOPE_STACK_IS_LOCAL_CREATED;\n          /* FALLTHRU */\n        }\n        case SCANNER_STREAM_TYPE_LOCAL:\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case SCANNER_STREAM_TYPE_VAR:\n        {\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n          context_p->scope_stack_top = (uint16_t) (scope_stack_p - context_p->scope_stack_p);\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_ESNEXT)\n          uint16_t opcode;\n\n          switch (type)\n          {\n            case SCANNER_STREAM_TYPE_LET:\n            {\n              opcode = CBC_CREATE_LET;\n              break;\n            }\n            case SCANNER_STREAM_TYPE_CONST:\n            {\n              opcode = CBC_CREATE_CONST;\n              break;\n            }\n            case SCANNER_STREAM_TYPE_VAR:\n            {\n              opcode = CBC_CREATE_VAR;\n\n              if (option_flags & SCANNER_CREATE_VARS_IS_SCRIPT)\n              {\n                opcode = CBC_CREATE_VAR_EVAL;\n\n                if ((context_p->global_status_flags & ECMA_PARSE_FUNCTION_CONTEXT)\n                    && !(context_p->status_flags & PARSER_IS_STRICT))\n                {\n                  opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_CREATE_VAR_EVAL);\n                }\n              }\n              break;\n            }\n            default:\n            {\n              JERRY_ASSERT (type == SCANNER_STREAM_TYPE_LOCAL\n                            || type == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG\n                            || type == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR\n                            || type == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC);\n\n              opcode = CBC_CREATE_LOCAL;\n              break;\n            }\n          }\n#else /* !ENABLED (JERRY_ESNEXT) */\n          uint16_t opcode = ((option_flags & SCANNER_CREATE_VARS_IS_SCRIPT) ? CBC_CREATE_VAR_EVAL\n                                                                            : CBC_CREATE_VAR);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          parser_emit_cbc_literal (context_p, opcode, map_to);\n          break;\n        }\n        case SCANNER_STREAM_TYPE_ARG:\n#if ENABLED (JERRY_ESNEXT)\n        case SCANNER_STREAM_TYPE_ARG_VAR:\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case SCANNER_STREAM_TYPE_ARG_FUNC:\n        {\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n          context_p->scope_stack_top = (uint16_t) (scope_stack_p - context_p->scope_stack_p);\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n#if ENABLED (JERRY_ESNEXT)\n          scope_stack_map_to |= PARSER_SCOPE_STACK_NO_FUNCTION_COPY;\n\n          /* Argument initializers of functions with simple arguments (e.g. function f(a,b,a) {}) are\n           * generated here. The other initializers are handled by parser_parse_function_arguments(). */\n          if (!(info_u8_arg & SCANNER_FUNCTION_HAS_COMPLEX_ARGUMENT))\n          {\n#endif /* ENABLED (JERRY_ESNEXT) */\n            parser_emit_cbc_literal_value (context_p,\n                                           CBC_INIT_ARG_OR_FUNC,\n                                           (uint16_t) (PARSER_REGISTER_START + scope_stack_reg_top),\n                                           map_to);\n#if ENABLED (JERRY_ESNEXT)\n          }\n          else if (data_p[0] & SCANNER_STREAM_EARLY_CREATE)\n          {\n            parser_emit_cbc_literal (context_p, CBC_CREATE_LOCAL, map_to);\n            scope_stack_map_to |= PARSER_SCOPE_STACK_IS_LOCAL_CREATED;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          if (scope_stack_reg_top < PARSER_MAXIMUM_NUMBER_OF_REGISTERS)\n          {\n            scope_stack_reg_top++;\n          }\n          break;\n        }\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      scope_stack_p->map_to = scope_stack_map_to;\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n\n    scope_stack_p++;\n\n    if (!SCANNER_STREAM_TYPE_IS_FUNCTION (type))\n    {\n      continue;\n    }\n\n    if (JERRY_UNLIKELY (scope_stack_p >= scope_stack_end_p))\n    {\n      JERRY_ASSERT (context_p->scope_stack_size == PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK);\n      parser_raise_error (context_p, PARSER_ERR_SCOPE_STACK_LIMIT_REACHED);\n    }\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n    context_p->scope_stack_top = (uint16_t) (scope_stack_p - context_p->scope_stack_p);\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n    if (!SCANNER_STREAM_TYPE_IS_ARG_FUNC (type))\n    {\n      if (func_init_opcode == CBC_INIT_ARG_OR_FUNC && (option_flags & SCANNER_CREATE_VARS_IS_SCRIPT))\n      {\n#if ENABLED (JERRY_ESNEXT)\n        literal.char_p -= data_p[1];\n\n        if (!scanner_scope_find_lexical_declaration (context_p, &literal))\n        {\n          func_init_opcode = CBC_CREATE_VAR_FUNC_EVAL;\n\n          if (context_p->global_status_flags & ECMA_PARSE_FUNCTION_CONTEXT)\n          {\n            func_init_opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_CREATE_VAR_FUNC_EVAL);\n          }\n        }\n        literal.char_p += data_p[1];\n#else /* !ENABLED (JERRY_ESNEXT) */\n        func_init_opcode = CBC_CREATE_VAR_FUNC_EVAL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n\n      parser_emit_cbc_literal_value (context_p, func_init_opcode, context_p->literal_count, map_to);\n    }\n\n    scope_stack_p->map_from = PARSER_SCOPE_STACK_FUNC;\n    scope_stack_p->map_to = context_p->literal_count;\n    scope_stack_p++;\n\n    scanner_create_unused_literal (context_p, 0);\n  }\n\n  context_p->scope_stack_top = (uint16_t) (scope_stack_p - context_p->scope_stack_p);\n  context_p->scope_stack_reg_top = (uint16_t) scope_stack_reg_top;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (info_type == SCANNER_TYPE_FUNCTION)\n  {\n    context_p->scope_stack_global_end = context_p->scope_stack_top;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (context_p->register_count < scope_stack_reg_top)\n  {\n    context_p->register_count = (uint16_t) scope_stack_reg_top;\n  }\n\n  if (!(option_flags & SCANNER_CREATE_VARS_IS_FUNCTION_ARGS))\n  {\n    scanner_release_next (context_p, (size_t) (next_data_p + 1 - ((const uint8_t *) info_p)));\n  }\n  parser_flush_cbc (context_p);\n} /* scanner_create_variables */\n\n/**\n * Get location from context.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nscanner_get_location (scanner_location_t *location_p, /**< location */\n                      parser_context_t *context_p) /**< context */\n{\n  location_p->source_p = context_p->source_p;\n  location_p->line = context_p->line;\n  location_p->column = context_p->column;\n} /* scanner_get_location */\n\n/**\n * Set context location.\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nscanner_set_location (parser_context_t *context_p, /**< context */\n                      scanner_location_t *location_p) /**< location */\n{\n  context_p->source_p = location_p->source_p;\n  context_p->line = location_p->line;\n  context_p->column = location_p->column;\n} /* scanner_set_location */\n\n/**\n * Get the real map_to value.\n */\nextern inline uint16_t JERRY_ATTR_ALWAYS_INLINE\nscanner_decode_map_to (parser_scope_stack_t *stack_item_p) /**< scope stack item */\n{\n  JERRY_ASSERT (stack_item_p->map_from != PARSER_SCOPE_STACK_FUNC);\n\n#if ENABLED (JERRY_ESNEXT)\n  uint16_t value = (stack_item_p->map_to & PARSER_SCOPE_STACK_REGISTER_MASK);\n  return (value == 0) ? stack_item_p->map_from : (uint16_t) (value + (PARSER_REGISTER_START - 1));\n#else /* !ENABLED (JERRY_ESNEXT) */\n  return stack_item_p->map_to;\n#endif /* ENABLED (JERRY_ESNEXT) */\n} /* scanner_decode_map_to */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Find the given literal index in the scope stack\n * and save it the constant literal pool if the literal is register stored\n *\n * @return given literal index - if literal corresponds to this index is not register stored\n *         literal index on which literal index has been mapped - otherwise\n */\nuint16_t\nscanner_save_literal (parser_context_t *context_p, /**< context */\n                      uint16_t literal_index) /**< literal index */\n{\n  if (literal_index >= PARSER_REGISTER_START)\n  {\n    literal_index = (uint16_t) (literal_index - (PARSER_REGISTER_START - 1));\n\n    parser_scope_stack_t *scope_stack_p = context_p->scope_stack_p + context_p->scope_stack_top;\n\n    do\n    {\n      /* Registers must be found in the scope stack. */\n      JERRY_ASSERT (scope_stack_p > context_p->scope_stack_p);\n      scope_stack_p--;\n    }\n    while (scope_stack_p->map_from == PARSER_SCOPE_STACK_FUNC\n           || literal_index != (scope_stack_p->map_to & PARSER_SCOPE_STACK_REGISTER_MASK));\n\n    literal_index = scope_stack_p->map_from;\n    PARSER_GET_LITERAL (literal_index)->status_flags |= LEXER_FLAG_USED;\n  }\n\n  return literal_index;\n} /* scanner_save_literal */\n\n/**\n * Checks whether the literal is a const in the current scope.\n *\n * @return true if the literal is a const, false otherwise\n */\nbool\nscanner_literal_is_const_reg (parser_context_t *context_p, /**< context */\n                              uint16_t literal_index) /**< literal index */\n{\n  if (literal_index < PARSER_REGISTER_START)\n  {\n    /* Re-assignment of non-register const bindings are detected elsewhere. */\n    return false;\n  }\n\n  parser_scope_stack_t *scope_stack_p = context_p->scope_stack_p + context_p->scope_stack_top;\n\n  literal_index = (uint16_t) (literal_index - (PARSER_REGISTER_START - 1));\n\n  do\n  {\n    /* Registers must be found in the scope stack. */\n    JERRY_ASSERT (scope_stack_p > context_p->scope_stack_p);\n    scope_stack_p--;\n  }\n  while (scope_stack_p->map_from == PARSER_SCOPE_STACK_FUNC\n         || literal_index != (scope_stack_p->map_to & PARSER_SCOPE_STACK_REGISTER_MASK));\n\n  return (scope_stack_p->map_to & PARSER_SCOPE_STACK_IS_CONST_REG) != 0;\n} /* scanner_literal_is_const_reg */\n\n/**\n * Checks whether the literal is created before.\n *\n * @return true if the literal is created before, false otherwise\n */\nbool\nscanner_literal_is_created (parser_context_t *context_p, /**< context */\n                            uint16_t literal_index) /**< literal index */\n{\n  JERRY_ASSERT (literal_index < PARSER_REGISTER_START);\n\n  parser_scope_stack_t *scope_stack_p = context_p->scope_stack_p + context_p->scope_stack_top;\n\n  do\n  {\n    /* These literals must be found in the scope stack. */\n    JERRY_ASSERT (scope_stack_p > context_p->scope_stack_p);\n    scope_stack_p--;\n  }\n  while (literal_index != scope_stack_p->map_from);\n\n  JERRY_ASSERT ((scope_stack_p->map_to & PARSER_SCOPE_STACK_REGISTER_MASK) == 0);\n\n  return (scope_stack_p->map_to & PARSER_SCOPE_STACK_IS_LOCAL_CREATED) != 0;\n} /* scanner_literal_is_created */\n\n/**\n * Checks whether the literal exists.\n *\n * @return true if the literal exists, false otherwise\n */\nbool\nscanner_literal_exists (parser_context_t *context_p, /**< context */\n                        uint16_t literal_index) /**< literal index */\n{\n  JERRY_ASSERT (literal_index < PARSER_REGISTER_START);\n\n  parser_scope_stack_t *scope_stack_p = context_p->scope_stack_p + context_p->scope_stack_top;\n\n  while (scope_stack_p-- > context_p->scope_stack_p)\n  {\n    if (scope_stack_p->map_from != PARSER_SCOPE_STACK_FUNC\n        && scanner_decode_map_to (scope_stack_p) == literal_index)\n    {\n      return true;\n    }\n  }\n\n  return false;\n} /* scanner_literal_exists */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_PARSER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-scanner.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jcontext.h\"\n#include \"js-parser-internal.h\"\n#include \"js-scanner-internal.h\"\n#include \"lit-char-helpers.h\"\n\n#if ENABLED (JERRY_PARSER)\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_scanner Scanner\n * @{\n */\n\n/**\n * Scan return types.\n */\ntypedef enum\n{\n  SCAN_NEXT_TOKEN, /**< get next token after return */\n  SCAN_KEEP_TOKEN, /**< keep the current token after return */\n} scan_return_types_t;\n\n/**\n * Checks whether token type is \"of\".\n */\n#if ENABLED (JERRY_ESNEXT)\n#define SCANNER_IDENTIFIER_IS_OF() (lexer_token_is_identifier (context_p, \"of\", 2))\n#else\n#define SCANNER_IDENTIFIER_IS_OF() (false)\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_ESNEXT)\n\nJERRY_STATIC_ASSERT (SCANNER_FROM_LITERAL_POOL_TO_COMPUTED (SCANNER_LITERAL_POOL_GENERATOR)\n                     == SCAN_STACK_COMPUTED_GENERATOR,\n                     scanner_invalid_conversion_from_literal_pool_generator_to_computed_generator);\nJERRY_STATIC_ASSERT (SCANNER_FROM_LITERAL_POOL_TO_COMPUTED (SCANNER_LITERAL_POOL_ASYNC)\n                     == SCAN_STACK_COMPUTED_ASYNC,\n                     scanner_invalid_conversion_from_literal_pool_async_to_computed_async);\n\nJERRY_STATIC_ASSERT (SCANNER_FROM_COMPUTED_TO_LITERAL_POOL (SCAN_STACK_COMPUTED_GENERATOR)\n                     == SCANNER_LITERAL_POOL_GENERATOR,\n                     scanner_invalid_conversion_from_computed_generator_to_literal_pool_generator);\nJERRY_STATIC_ASSERT (SCANNER_FROM_COMPUTED_TO_LITERAL_POOL (SCAN_STACK_COMPUTED_ASYNC)\n                     == SCANNER_LITERAL_POOL_ASYNC,\n                     scanner_invalid_conversion_from_computed_async_to_literal_pool_async);\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Scan primary expression.\n *\n * @return SCAN_NEXT_TOKEN to read the next token, or SCAN_KEEP_TOKEN to do nothing\n */\nstatic scan_return_types_t\nscanner_scan_primary_expression (parser_context_t *context_p, /**< context */\n                                 scanner_context_t *scanner_context_p, /* scanner context */\n                                 lexer_token_type_t type, /**< current token type */\n                                 scan_stack_modes_t stack_top) /**< current stack top */\n{\n  switch (type)\n  {\n    case LEXER_KEYW_NEW:\n    {\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_AFTER_NEW;\n\n#if ENABLED (JERRY_ESNEXT)\n      if (scanner_try_scan_new_target (context_p))\n      {\n        scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      break;\n    }\n    case LEXER_DIVIDE:\n    case LEXER_ASSIGN_DIVIDE:\n    {\n      lexer_construct_regexp_object (context_p, true);\n      scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      break;\n    }\n    case LEXER_KEYW_FUNCTION:\n    {\n      uint16_t status_flags = SCANNER_LITERAL_POOL_FUNCTION;\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      bool is_export_default = stack_top == SCAN_STACK_EXPORT_DEFAULT;\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n#if ENABLED (JERRY_ESNEXT)\n      if (scanner_context_p->async_source_p != NULL)\n      {\n        status_flags |= SCANNER_LITERAL_POOL_ASYNC;\n      }\n\n      if (lexer_consume_generator (context_p))\n      {\n        status_flags |= SCANNER_LITERAL_POOL_GENERATOR;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      scanner_push_literal_pool (context_p, scanner_context_p, status_flags);\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type == LEXER_LITERAL\n          && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n      {\n#if ENABLED (JERRY_MODULE_SYSTEM)\n        if (is_export_default)\n        {\n          lexer_lit_location_t *location_p;\n          location_p = scanner_add_custom_literal (context_p,\n                                                   scanner_context_p->active_literal_pool_p->prev_p,\n                                                   &context_p->token.lit_location);\n\n          scanner_detect_invalid_let (context_p, location_p);\n          location_p->type |= SCANNER_LITERAL_IS_FUNC | SCANNER_LITERAL_IS_LET;\n        }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n        lexer_next_token (context_p);\n      }\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      else if (is_export_default)\n      {\n        lexer_lit_location_t *location_p;\n        location_p = scanner_add_custom_literal (context_p,\n                                                 scanner_context_p->active_literal_pool_p->prev_p,\n                                                 &lexer_default_literal);\n        location_p->type |= SCANNER_LITERAL_IS_FUNC | SCANNER_LITERAL_IS_LET;\n      }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n      parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_EXPRESSION);\n      scanner_context_p->mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n      return SCAN_KEEP_TOKEN;\n    }\n    case LEXER_LEFT_PAREN:\n    {\n      scanner_scan_bracket (context_p, scanner_context_p);\n      return SCAN_KEEP_TOKEN;\n    }\n    case LEXER_LEFT_SQUARE:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      scanner_push_destructuring_pattern (context_p, scanner_context_p, SCANNER_BINDING_NONE, false);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      parser_stack_push_uint8 (context_p, SCAN_STACK_ARRAY_LITERAL);\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      break;\n    }\n    case LEXER_LEFT_BRACE:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      scanner_push_destructuring_pattern (context_p, scanner_context_p, SCANNER_BINDING_NONE, false);\n      parser_stack_push_uint8 (context_p, 0);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      parser_stack_push_uint8 (context_p, SCAN_STACK_OBJECT_LITERAL);\n      scanner_context_p->mode = SCAN_MODE_PROPERTY_NAME;\n      return SCAN_KEEP_TOKEN;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_TEMPLATE_LITERAL:\n    {\n      if (context_p->source_p[-1] != LIT_CHAR_GRAVE_ACCENT)\n      {\n        parser_stack_push_uint8 (context_p, SCAN_STACK_TEMPLATE_STRING);\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n        break;\n      }\n\n      /* The string is a normal string literal. */\n      /* FALLTHRU */\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case LEXER_LITERAL:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      const uint8_t *source_p = context_p->source_p;\n\n      if (context_p->token.lit_location.type == LEXER_IDENT_LITERAL\n          && lexer_check_arrow (context_p))\n      {\n        scanner_scan_simple_arrow (context_p, scanner_context_p, source_p);\n        return SCAN_KEEP_TOKEN;\n      }\n\n      if (JERRY_UNLIKELY (lexer_token_is_async (context_p)))\n      {\n        scanner_context_p->async_source_p = source_p;\n        scanner_check_async_function (context_p, scanner_context_p);\n        return SCAN_KEEP_TOKEN;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n      {\n#if ENABLED (JERRY_MODULE_SYSTEM)\n        if (stack_top == SCAN_STACK_EXPORT_DEFAULT)\n        {\n          lexer_lit_location_t *location_p = scanner_add_literal (context_p, scanner_context_p);\n          location_p->type |= (SCANNER_LITERAL_IS_USED | SCANNER_LITERAL_IS_VAR);\n          scanner_detect_eval_call (context_p, scanner_context_p);\n          scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n          break;\n        }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n        scanner_add_reference (context_p, scanner_context_p);\n      }\n      /* FALLTHRU */\n    }\n    case LEXER_KEYW_THIS:\n    case LEXER_LIT_TRUE:\n    case LEXER_LIT_FALSE:\n    case LEXER_LIT_NULL:\n    {\n      scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      break;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_KEYW_SUPER:\n    {\n      scanner_context_p->active_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_HAS_SUPER_REFERENCE;\n      scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      break;\n    }\n    case LEXER_KEYW_CLASS:\n    {\n      scanner_push_class_declaration (context_p, scanner_context_p, SCAN_STACK_CLASS_EXPRESSION);\n\n      if (context_p->token.type != LEXER_LITERAL || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n      {\n        return SCAN_KEEP_TOKEN;\n      }\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case LEXER_RIGHT_SQUARE:\n    {\n      if (stack_top != SCAN_STACK_ARRAY_LITERAL)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n      return SCAN_KEEP_TOKEN;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_THREE_DOTS:\n    {\n      /* Elision or spread arguments */\n      if (stack_top != SCAN_STACK_PAREN_EXPRESSION && stack_top != SCAN_STACK_ARRAY_LITERAL)\n      {\n        scanner_raise_error (context_p);\n      }\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case LEXER_COMMA:\n    {\n      if (stack_top != SCAN_STACK_ARRAY_LITERAL)\n      {\n        scanner_raise_error (context_p);\n      }\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n#if ENABLED (JERRY_ESNEXT)\n      if (scanner_context_p->binding_type != SCANNER_BINDING_NONE)\n      {\n        scanner_context_p->mode = SCAN_MODE_BINDING;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      break;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_KEYW_YIELD:\n    {\n      lexer_next_token (context_p);\n\n      if (lexer_check_yield_no_arg (context_p))\n      {\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n      }\n\n      if (context_p->token.type == LEXER_MULTIPLY)\n      {\n        return SCAN_NEXT_TOKEN;\n      }\n      return SCAN_KEEP_TOKEN;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case LEXER_RIGHT_PAREN:\n    {\n      if (stack_top == SCAN_STACK_PAREN_EXPRESSION)\n      {\n        parser_stack_pop_uint8 (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->stack_top_uint8 == SCAN_STACK_USE_ASYNC)\n        {\n          scanner_add_async_literal (context_p, scanner_context_p);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n        break;\n      }\n      /* FALLTHRU */\n    }\n    default:\n    {\n      scanner_raise_error (context_p);\n    }\n  }\n  return SCAN_NEXT_TOKEN;\n} /* scanner_scan_primary_expression */\n\n/**\n * Scan the tokens after the primary expression.\n *\n * @return true for break, false for fall through\n */\nstatic bool\nscanner_scan_post_primary_expression (parser_context_t *context_p, /**< context */\n                                      scanner_context_t *scanner_context_p, /**< scanner context */\n                                      lexer_token_type_t type, /**< current token type */\n                                      scan_stack_modes_t stack_top) /**< current stack top */\n{\n  switch (type)\n  {\n    case LEXER_DOT:\n    {\n      lexer_scan_identifier (context_p);\n\n      if (context_p->token.type != LEXER_LITERAL\n          || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      return true;\n    }\n    case LEXER_LEFT_PAREN:\n    {\n      parser_stack_push_uint8 (context_p, SCAN_STACK_PAREN_EXPRESSION);\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      return true;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_TEMPLATE_LITERAL:\n    {\n      if (JERRY_UNLIKELY (context_p->source_p[-1] != LIT_CHAR_GRAVE_ACCENT))\n      {\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n        parser_stack_push_uint8 (context_p, SCAN_STACK_TAGGED_TEMPLATE_LITERAL);\n      }\n      return true;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case LEXER_LEFT_SQUARE:\n    {\n      parser_stack_push_uint8 (context_p, SCAN_STACK_PROPERTY_ACCESSOR);\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      return true;\n    }\n    case LEXER_INCREASE:\n    case LEXER_DECREASE:\n    {\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n\n      if (context_p->token.flags & LEXER_WAS_NEWLINE)\n      {\n        return false;\n      }\n\n      lexer_next_token (context_p);\n      type = (lexer_token_type_t) context_p->token.type;\n\n      if (type != LEXER_QUESTION_MARK)\n      {\n        break;\n      }\n      /* FALLTHRU */\n    }\n    case LEXER_QUESTION_MARK:\n    {\n      parser_stack_push_uint8 (context_p, SCAN_STACK_COLON_EXPRESSION);\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      return true;\n    }\n    default:\n    {\n      break;\n    }\n  }\n\n  if (LEXER_IS_BINARY_OP_TOKEN (type)\n      && (type != LEXER_KEYW_IN || !SCANNER_IS_FOR_START (stack_top)))\n  {\n    scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n    return true;\n  }\n\n  return false;\n} /* scanner_scan_post_primary_expression */\n\n/**\n * Scan the tokens after the primary expression.\n *\n * @return SCAN_NEXT_TOKEN to read the next token, or SCAN_KEEP_TOKEN to do nothing\n */\nstatic scan_return_types_t\nscanner_scan_primary_expression_end (parser_context_t *context_p, /**< context */\n                                     scanner_context_t *scanner_context_p, /**< scanner context */\n                                     lexer_token_type_t type, /**< current token type */\n                                     scan_stack_modes_t stack_top) /**< current stack top */\n{\n  if (type == LEXER_COMMA)\n  {\n    switch (stack_top)\n    {\n      case SCAN_STACK_VAR:\n#if ENABLED (JERRY_ESNEXT)\n      case SCAN_STACK_LET:\n      case SCAN_STACK_CONST:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case SCAN_STACK_FOR_VAR_START:\n#if ENABLED (JERRY_ESNEXT)\n      case SCAN_STACK_FOR_LET_START:\n      case SCAN_STACK_FOR_CONST_START:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      {\n        scanner_context_p->mode = SCAN_MODE_VAR_STATEMENT;\n        return SCAN_NEXT_TOKEN;\n      }\n      case SCAN_STACK_COLON_EXPRESSION:\n      {\n        scanner_raise_error (context_p);\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case SCAN_STACK_BINDING_INIT:\n      case SCAN_STACK_BINDING_LIST_INIT:\n      {\n        break;\n      }\n      case SCAN_STACK_ARROW_ARGUMENTS:\n      {\n        lexer_next_token (context_p);\n        scanner_check_arrow_arg (context_p, scanner_context_p);\n        return SCAN_KEEP_TOKEN;\n      }\n      case SCAN_STACK_ARROW_EXPRESSION:\n      {\n        break;\n      }\n      case SCAN_STACK_CLASS_FIELD_INITIALIZER:\n      {\n        scanner_raise_error (context_p);\n        break;\n      }\n      case SCAN_STACK_FUNCTION_PARAMETERS:\n      {\n        scanner_context_p->mode = SCAN_MODE_CONTINUE_FUNCTION_ARGUMENTS;\n        parser_stack_pop_uint8 (context_p);\n        return SCAN_NEXT_TOKEN;\n      }\n      case SCAN_STACK_ARRAY_LITERAL:\n      {\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n        if (scanner_context_p->binding_type != SCANNER_BINDING_NONE)\n        {\n          scanner_context_p->mode = SCAN_MODE_BINDING;\n        }\n\n        return SCAN_NEXT_TOKEN;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case SCAN_STACK_OBJECT_LITERAL:\n      {\n        scanner_context_p->mode = SCAN_MODE_PROPERTY_NAME;\n        return SCAN_KEEP_TOKEN;\n      }\n      default:\n      {\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n        return SCAN_NEXT_TOKEN;\n      }\n    }\n  }\n\n  switch (stack_top)\n  {\n    case SCAN_STACK_WITH_EXPRESSION:\n    {\n      if (type != LEXER_RIGHT_PAREN)\n      {\n        break;\n      }\n\n      parser_stack_pop_uint8 (context_p);\n\n      uint16_t status_flags = scanner_context_p->active_literal_pool_p->status_flags;\n      parser_stack_push_uint8 (context_p, (status_flags & SCANNER_LITERAL_POOL_IN_WITH) ? 1 : 0);\n      parser_stack_push_uint8 (context_p, SCAN_STACK_WITH_STATEMENT);\n      status_flags |= SCANNER_LITERAL_POOL_IN_WITH;\n      scanner_context_p->active_literal_pool_p->status_flags = status_flags;\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT;\n      return SCAN_NEXT_TOKEN;\n    }\n    case SCAN_STACK_DO_EXPRESSION:\n    {\n      if (type != LEXER_RIGHT_PAREN)\n      {\n        break;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_END;\n      return SCAN_NEXT_TOKEN;\n    }\n    case SCAN_STACK_WHILE_EXPRESSION:\n    {\n      if (type != LEXER_RIGHT_PAREN)\n      {\n        break;\n      }\n\n      scanner_source_start_t source_start;\n\n      parser_stack_pop_uint8 (context_p);\n      parser_stack_pop (context_p, &source_start, sizeof (scanner_source_start_t));\n\n      scanner_location_info_t *location_info_p;\n      location_info_p = (scanner_location_info_t *) scanner_insert_info (context_p,\n                                                                         source_start.source_p,\n                                                                         sizeof (scanner_location_info_t));\n      location_info_p->info.type = SCANNER_TYPE_WHILE;\n\n      scanner_get_location (&location_info_p->location, context_p);\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT;\n      return SCAN_NEXT_TOKEN;\n    }\n    case SCAN_STACK_PAREN_EXPRESSION:\n    {\n      if (type != LEXER_RIGHT_PAREN)\n      {\n        break;\n      }\n\n      parser_stack_pop_uint8 (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->stack_top_uint8 == SCAN_STACK_USE_ASYNC)\n      {\n        scanner_add_async_literal (context_p, scanner_context_p);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      return SCAN_NEXT_TOKEN;\n    }\n    case SCAN_STACK_STATEMENT_WITH_EXPR:\n    {\n      if (type != LEXER_RIGHT_PAREN)\n      {\n        break;\n      }\n\n      parser_stack_pop_uint8 (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->stack_top_uint8 == SCAN_STACK_IF_STATEMENT)\n      {\n        scanner_check_function_after_if (context_p, scanner_context_p);\n        return SCAN_KEEP_TOKEN;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT;\n      return SCAN_NEXT_TOKEN;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case SCAN_STACK_BINDING_LIST_INIT:\n    {\n      parser_stack_pop_uint8 (context_p);\n\n      JERRY_ASSERT (context_p->stack_top_uint8 == SCAN_STACK_ARRAY_LITERAL\n                    || context_p->stack_top_uint8 == SCAN_STACK_OBJECT_LITERAL\n                    || context_p->stack_top_uint8 == SCAN_STACK_LET\n                    || context_p->stack_top_uint8 == SCAN_STACK_CONST\n                    || context_p->stack_top_uint8 == SCAN_STACK_FOR_LET_START\n                    || context_p->stack_top_uint8 == SCAN_STACK_FOR_CONST_START\n                    || context_p->stack_top_uint8 == SCAN_STACK_FUNCTION_PARAMETERS\n                    || context_p->stack_top_uint8 == SCAN_STACK_ARROW_ARGUMENTS);\n\n      scanner_binding_item_t *item_p = scanner_context_p->active_binding_list_p->items_p;\n\n      while (item_p != NULL)\n      {\n        if (item_p->literal_p->type & SCANNER_LITERAL_IS_USED)\n        {\n          item_p->literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n        }\n        item_p = item_p->next_p;\n      }\n\n      scanner_pop_binding_list (scanner_context_p);\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n      return SCAN_KEEP_TOKEN;\n    }\n    case SCAN_STACK_BINDING_INIT:\n    {\n      scanner_binding_literal_t binding_literal;\n\n      parser_stack_pop_uint8 (context_p);\n      parser_stack_pop (context_p, &binding_literal, sizeof (scanner_binding_literal_t));\n\n      JERRY_ASSERT (context_p->stack_top_uint8 == SCAN_STACK_ARRAY_LITERAL\n                    || context_p->stack_top_uint8 == SCAN_STACK_OBJECT_LITERAL\n                    || context_p->stack_top_uint8 == SCAN_STACK_LET\n                    || context_p->stack_top_uint8 == SCAN_STACK_CONST\n                    || context_p->stack_top_uint8 == SCAN_STACK_FOR_LET_START\n                    || context_p->stack_top_uint8 == SCAN_STACK_FOR_CONST_START\n                    || context_p->stack_top_uint8 == SCAN_STACK_FUNCTION_PARAMETERS\n                    || context_p->stack_top_uint8 == SCAN_STACK_ARROW_ARGUMENTS);\n\n      JERRY_ASSERT (SCANNER_NEEDS_BINDING_LIST (scanner_context_p->binding_type)\n                    || (stack_top != SCAN_STACK_ARRAY_LITERAL && stack_top != SCAN_STACK_OBJECT_LITERAL));\n\n      if (binding_literal.literal_p->type & SCANNER_LITERAL_IS_USED)\n      {\n        binding_literal.literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n      return SCAN_KEEP_TOKEN;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case SCAN_STACK_VAR:\n#if ENABLED (JERRY_ESNEXT)\n    case SCAN_STACK_LET:\n    case SCAN_STACK_CONST:\n#endif /* ENABLED (JERRY_ESNEXT) */\n    {\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      scanner_context_p->active_literal_pool_p->status_flags &= (uint16_t) ~SCANNER_LITERAL_POOL_IN_EXPORT;\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n      parser_stack_pop_uint8 (context_p);\n      return SCAN_KEEP_TOKEN;\n    }\n    case SCAN_STACK_FOR_VAR_START:\n#if ENABLED (JERRY_ESNEXT)\n    case SCAN_STACK_FOR_LET_START:\n    case SCAN_STACK_FOR_CONST_START:\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case SCAN_STACK_FOR_START:\n    {\n      if (type == LEXER_KEYW_IN || SCANNER_IDENTIFIER_IS_OF ())\n      {\n        scanner_for_statement_t for_statement;\n\n        parser_stack_pop_uint8 (context_p);\n        parser_stack_pop (context_p, &for_statement, sizeof (scanner_for_statement_t));\n\n        scanner_location_info_t *location_info;\n        location_info = (scanner_location_info_t *) scanner_insert_info (context_p,\n                                                                         for_statement.u.source_p,\n                                                                         sizeof (scanner_location_info_t));\n#if ENABLED (JERRY_ESNEXT)\n        location_info->info.type = (type == LEXER_KEYW_IN) ? SCANNER_TYPE_FOR_IN : SCANNER_TYPE_FOR_OF;\n\n        if (stack_top == SCAN_STACK_FOR_LET_START || stack_top == SCAN_STACK_FOR_CONST_START)\n        {\n          parser_stack_push_uint8 (context_p, SCAN_STACK_PRIVATE_BLOCK_EARLY);\n        }\n#else /* !ENABLED (JERRY_ESNEXT) */\n        location_info->info.type = SCANNER_TYPE_FOR_IN;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        scanner_get_location (&location_info->location, context_p);\n\n        parser_stack_push_uint8 (context_p, SCAN_STACK_STATEMENT_WITH_EXPR);\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n        return SCAN_NEXT_TOKEN;\n      }\n\n      if (type != LEXER_SEMICOLON)\n      {\n        break;\n      }\n\n      scanner_for_statement_t for_statement;\n\n      parser_stack_pop_uint8 (context_p);\n      parser_stack_pop (context_p, NULL, sizeof (scanner_for_statement_t));\n\n#if ENABLED (JERRY_ESNEXT)\n      if (stack_top == SCAN_STACK_FOR_LET_START || stack_top == SCAN_STACK_FOR_CONST_START)\n      {\n        parser_stack_push_uint8 (context_p, SCAN_STACK_PRIVATE_BLOCK);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      for_statement.u.source_p = context_p->source_p;\n      parser_stack_push (context_p, &for_statement, sizeof (scanner_for_statement_t));\n      parser_stack_push_uint8 (context_p, SCAN_STACK_FOR_CONDITION);\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_SEMICOLON)\n      {\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n        return SCAN_KEEP_TOKEN;\n      }\n\n      type = LEXER_SEMICOLON;\n      /* FALLTHRU */\n    }\n    case SCAN_STACK_FOR_CONDITION:\n    {\n      if (type != LEXER_SEMICOLON)\n      {\n        break;\n      }\n\n      scanner_for_statement_t for_statement;\n\n      parser_stack_pop_uint8 (context_p);\n      parser_stack_pop (context_p, &for_statement, sizeof (scanner_for_statement_t));\n\n      scanner_for_info_t *for_info_p;\n      for_info_p = (scanner_for_info_t *) scanner_insert_info (context_p,\n                                                               for_statement.u.source_p,\n                                                               sizeof (scanner_for_info_t));\n      for_info_p->info.type = SCANNER_TYPE_FOR;\n\n      scanner_get_location (&for_info_p->expression_location, context_p);\n      for_info_p->end_location.source_p = NULL;\n\n      for_statement.u.for_info_p = for_info_p;\n\n      parser_stack_push (context_p, &for_statement, sizeof (scanner_for_statement_t));\n      parser_stack_push_uint8 (context_p, SCAN_STACK_FOR_EXPRESSION);\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_RIGHT_PAREN)\n      {\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n        return SCAN_KEEP_TOKEN;\n      }\n\n      type = LEXER_RIGHT_PAREN;\n      /* FALLTHRU */\n    }\n    case SCAN_STACK_FOR_EXPRESSION:\n    {\n      if (type != LEXER_RIGHT_PAREN)\n      {\n        break;\n      }\n\n      scanner_for_statement_t for_statement;\n\n      parser_stack_pop_uint8 (context_p);\n      parser_stack_pop (context_p, &for_statement, sizeof (scanner_for_statement_t));\n\n      scanner_get_location (&for_statement.u.for_info_p->end_location, context_p);\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT;\n      return SCAN_NEXT_TOKEN;\n    }\n    case SCAN_STACK_SWITCH_EXPRESSION:\n    {\n      if (type != LEXER_RIGHT_PAREN)\n      {\n        break;\n      }\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_LEFT_BRACE)\n      {\n        break;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      scanner_literal_pool_t *literal_pool_p;\n      literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, 0);\n      literal_pool_p->source_p = context_p->source_p - 1;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      parser_stack_pop_uint8 (context_p);\n\n      scanner_switch_statement_t switch_statement = scanner_context_p->active_switch_statement;\n      parser_stack_push (context_p, &switch_statement, sizeof (scanner_switch_statement_t));\n      parser_stack_push_uint8 (context_p, SCAN_STACK_SWITCH_BLOCK);\n\n      scanner_switch_info_t *switch_info_p;\n      switch_info_p = (scanner_switch_info_t *) scanner_insert_info (context_p,\n                                                                     context_p->source_p,\n                                                                     sizeof (scanner_switch_info_t));\n      switch_info_p->info.type = SCANNER_TYPE_SWITCH;\n      switch_info_p->case_p = NULL;\n      scanner_context_p->active_switch_statement.last_case_p = &switch_info_p->case_p;\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_RIGHT_BRACE\n          && context_p->token.type != LEXER_KEYW_CASE\n          && context_p->token.type != LEXER_KEYW_DEFAULT)\n      {\n        break;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n      return SCAN_KEEP_TOKEN;\n    }\n    case SCAN_STACK_CASE_STATEMENT:\n    {\n      if (type != LEXER_COLON)\n      {\n        break;\n      }\n\n      scanner_source_start_t source_start;\n\n      parser_stack_pop_uint8 (context_p);\n      parser_stack_pop (context_p, &source_start, sizeof (scanner_source_start_t));\n\n      scanner_location_info_t *location_info_p;\n      location_info_p = (scanner_location_info_t *) scanner_insert_info (context_p,\n                                                                         source_start.source_p,\n                                                                         sizeof (scanner_location_info_t));\n      location_info_p->info.type = SCANNER_TYPE_CASE;\n\n      scanner_get_location (&location_info_p->location, context_p);\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n      return SCAN_NEXT_TOKEN;\n    }\n    case SCAN_STACK_COLON_EXPRESSION:\n    {\n      if (type != LEXER_COLON)\n      {\n        break;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      parser_stack_pop_uint8 (context_p);\n      return SCAN_NEXT_TOKEN;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case SCAN_STACK_ARRAY_LITERAL:\n    case SCAN_STACK_OBJECT_LITERAL:\n    {\n      if ((stack_top == SCAN_STACK_ARRAY_LITERAL && type != LEXER_RIGHT_SQUARE)\n          || (stack_top == SCAN_STACK_OBJECT_LITERAL && type != LEXER_RIGHT_BRACE))\n      {\n        break;\n      }\n\n      scanner_source_start_t source_start;\n      uint8_t binding_type = scanner_context_p->binding_type;\n      uint8_t object_literal_flags = 0;\n\n      parser_stack_pop_uint8 (context_p);\n\n      if (stack_top == SCAN_STACK_OBJECT_LITERAL)\n      {\n        object_literal_flags = context_p->stack_top_uint8;\n        parser_stack_pop_uint8 (context_p);\n      }\n\n      scanner_context_p->binding_type = context_p->stack_top_uint8;\n      parser_stack_pop_uint8 (context_p);\n      parser_stack_pop (context_p, &source_start, sizeof (scanner_source_start_t));\n\n      lexer_next_token (context_p);\n\n      stack_top = (scan_stack_modes_t) context_p->stack_top_uint8;\n\n      if (binding_type == SCANNER_BINDING_CATCH && stack_top == SCAN_STACK_CATCH_STATEMENT)\n      {\n        scanner_pop_binding_list (scanner_context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (object_literal_flags != 0)\n        {\n          scanner_info_t *info_p = scanner_insert_info (context_p, source_start.source_p, sizeof (scanner_info_t));\n          info_p->type = SCANNER_TYPE_LITERAL_FLAGS;\n          info_p->u8_arg = object_literal_flags;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (context_p->token.type != LEXER_RIGHT_PAREN)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        lexer_next_token (context_p);\n\n        if (context_p->token.type != LEXER_LEFT_BRACE)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n        return SCAN_NEXT_TOKEN;\n      }\n\n      if (stack_top == SCAN_STACK_FOR_START_PATTERN)\n      {\n        JERRY_ASSERT (binding_type == SCANNER_BINDING_NONE);\n\n        parser_stack_change_last_uint8 (context_p, SCAN_STACK_FOR_START);\n\n        if (context_p->token.type == LEXER_KEYW_IN || SCANNER_IDENTIFIER_IS_OF ())\n        {\n          scanner_info_t *info_p = scanner_insert_info (context_p, source_start.source_p, sizeof (scanner_info_t));\n          info_p->type = SCANNER_TYPE_LITERAL_FLAGS;\n          info_p->u8_arg = object_literal_flags | SCANNER_LITERAL_DESTRUCTURING_FOR;\n          return SCAN_KEEP_TOKEN;\n        }\n      }\n\n      if (context_p->token.type != LEXER_ASSIGN)\n      {\n        if (SCANNER_NEEDS_BINDING_LIST (binding_type))\n        {\n          scanner_pop_binding_list (scanner_context_p);\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        if ((stack_top == SCAN_STACK_ARRAY_LITERAL || stack_top == SCAN_STACK_OBJECT_LITERAL)\n            && (binding_type == SCANNER_BINDING_NONE || binding_type == SCANNER_BINDING_ARROW_ARG)\n            && context_p->token.type != LEXER_EOS\n            && context_p->token.type != LEXER_COMMA\n            && context_p->token.type != LEXER_RIGHT_BRACE\n            && context_p->token.type != LEXER_RIGHT_SQUARE)\n        {\n          object_literal_flags |= SCANNER_LITERAL_NO_DESTRUCTURING;\n        }\n\n        if (object_literal_flags != 0)\n        {\n          scanner_info_t *info_p = scanner_insert_info (context_p, source_start.source_p, sizeof (scanner_info_t));\n          info_p->type = SCANNER_TYPE_LITERAL_FLAGS;\n          info_p->u8_arg = object_literal_flags;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n        return SCAN_KEEP_TOKEN;\n      }\n\n      scanner_location_info_t *location_info_p;\n      location_info_p = (scanner_location_info_t *) scanner_insert_info (context_p,\n                                                                         source_start.source_p,\n                                                                         sizeof (scanner_location_info_t));\n      location_info_p->info.type = SCANNER_TYPE_INITIALIZER;\n      location_info_p->info.u8_arg = object_literal_flags;\n      scanner_get_location (&location_info_p->location, context_p);\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n      if (SCANNER_NEEDS_BINDING_LIST (binding_type))\n      {\n        scanner_binding_item_t *item_p = scanner_context_p->active_binding_list_p->items_p;\n\n        while (item_p != NULL)\n        {\n          item_p->literal_p->type &= (uint8_t) ~SCANNER_LITERAL_IS_USED;\n          item_p = item_p->next_p;\n        }\n\n        parser_stack_push_uint8 (context_p, SCAN_STACK_BINDING_LIST_INIT);\n      }\n      return SCAN_NEXT_TOKEN;\n    }\n#else /* !ENABLED (JERRY_ESNEXT) */\n    case SCAN_STACK_OBJECT_LITERAL:\n    {\n      if (type != LEXER_RIGHT_BRACE)\n      {\n        break;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      parser_stack_pop_uint8 (context_p);\n      return SCAN_NEXT_TOKEN;\n    }\n    case SCAN_STACK_ARRAY_LITERAL:\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case SCAN_STACK_PROPERTY_ACCESSOR:\n    {\n      if (type != LEXER_RIGHT_SQUARE)\n      {\n        break;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      parser_stack_pop_uint8 (context_p);\n      return SCAN_NEXT_TOKEN;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case SCAN_STACK_COMPUTED_PROPERTY:\n    {\n      if (type != LEXER_RIGHT_SQUARE)\n      {\n        break;\n      }\n\n      lexer_scan_identifier (context_p);\n\n      parser_stack_pop_uint8 (context_p);\n      stack_top = (scan_stack_modes_t) context_p->stack_top_uint8;\n\n      if (stack_top == SCAN_STACK_FUNCTION_PROPERTY)\n      {\n        scanner_push_literal_pool (context_p, scanner_context_p, SCANNER_LITERAL_POOL_FUNCTION);\n        scanner_context_p->mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n        return SCAN_KEEP_TOKEN;\n      }\n\n      if (stack_top == SCAN_STACK_EXPLICIT_CLASS_CONSTRUCTOR\n          || stack_top == SCAN_STACK_IMPLICIT_CLASS_CONSTRUCTOR)\n      {\n        JERRY_ASSERT (scanner_context_p->active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_CLASS_NAME);\n\n        if (context_p->token.type == LEXER_LEFT_PAREN)\n        {\n          scanner_push_literal_pool (context_p, scanner_context_p, SCANNER_LITERAL_POOL_FUNCTION);\n\n          parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PROPERTY);\n          scanner_context_p->mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n          return SCAN_KEEP_TOKEN;\n        }\n\n        if (context_p->token.type == LEXER_ASSIGN)\n        {\n          scanner_push_class_field_initializer (context_p, scanner_context_p);\n          return SCAN_NEXT_TOKEN;\n        }\n\n        scanner_context_p->mode = (context_p->token.type != LEXER_SEMICOLON ? SCAN_MODE_CLASS_BODY_NO_SCAN\n                                                                            : SCAN_MODE_CLASS_BODY);\n        return SCAN_KEEP_TOKEN;\n      }\n\n      JERRY_ASSERT (stack_top == SCAN_STACK_OBJECT_LITERAL);\n\n      if (context_p->token.type == LEXER_LEFT_PAREN)\n      {\n        scanner_push_literal_pool (context_p, scanner_context_p, SCANNER_LITERAL_POOL_FUNCTION);\n\n        parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PROPERTY);\n        scanner_context_p->mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n        return SCAN_KEEP_TOKEN;\n      }\n\n      if (context_p->token.type != LEXER_COLON)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n      if (scanner_context_p->binding_type != SCANNER_BINDING_NONE)\n      {\n        scanner_context_p->mode = SCAN_MODE_BINDING;\n      }\n      return SCAN_NEXT_TOKEN;\n    }\n    case SCAN_STACK_COMPUTED_GENERATOR:\n    case SCAN_STACK_COMPUTED_ASYNC:\n    case SCAN_STACK_COMPUTED_ASYNC_GENERATOR:\n    {\n      if (type != LEXER_RIGHT_SQUARE)\n      {\n        break;\n      }\n\n      lexer_next_token (context_p);\n      parser_stack_pop_uint8 (context_p);\n\n      JERRY_ASSERT (context_p->stack_top_uint8 == SCAN_STACK_OBJECT_LITERAL\n                    || context_p->stack_top_uint8 == SCAN_STACK_FUNCTION_PROPERTY);\n\n      uint16_t status_flags = (uint16_t) (SCANNER_LITERAL_POOL_FUNCTION\n                                          | SCANNER_LITERAL_POOL_GENERATOR\n                                          | SCANNER_FROM_COMPUTED_TO_LITERAL_POOL (stack_top));\n\n      scanner_push_literal_pool (context_p, scanner_context_p, status_flags);\n\n      scanner_context_p->mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n      return SCAN_KEEP_TOKEN;\n    }\n    case SCAN_STACK_TEMPLATE_STRING:\n    case SCAN_STACK_TAGGED_TEMPLATE_LITERAL:\n    {\n      if (type != LEXER_RIGHT_BRACE)\n      {\n        break;\n      }\n\n      context_p->source_p--;\n      context_p->column--;\n      lexer_parse_string (context_p, LEXER_STRING_NO_OPTS);\n\n      if (context_p->source_p[-1] != LIT_CHAR_GRAVE_ACCENT)\n      {\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      }\n      else\n      {\n        parser_stack_pop_uint8 (context_p);\n        scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      }\n      return SCAN_NEXT_TOKEN;\n    }\n    case SCAN_STACK_ARROW_ARGUMENTS:\n    {\n      if (type != LEXER_RIGHT_PAREN)\n      {\n        break;\n      }\n\n      scanner_check_arrow (context_p, scanner_context_p);\n      return SCAN_KEEP_TOKEN;\n    }\n    case SCAN_STACK_ARROW_EXPRESSION:\n    {\n      scanner_pop_literal_pool (context_p, scanner_context_p);\n      parser_stack_pop_uint8 (context_p);\n      lexer_update_await_yield (context_p, context_p->status_flags);\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n      return SCAN_KEEP_TOKEN;\n    }\n    case SCAN_STACK_CLASS_EXTENDS:\n    {\n      if (type != LEXER_LEFT_BRACE)\n      {\n        break;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_CLASS_BODY;\n      parser_stack_pop_uint8 (context_p);\n\n      return SCAN_KEEP_TOKEN;\n    }\n    case SCAN_STACK_CLASS_FIELD_INITIALIZER:\n    {\n      scanner_source_start_t source_start;\n      const uint8_t *source_p = NULL;\n\n      parser_stack_pop_uint8 (context_p);\n      parser_stack_pop (context_p, &source_start, sizeof (scanner_source_start_t));\n      scanner_pop_literal_pool (context_p, scanner_context_p);\n      scanner_context_p->mode = SCAN_MODE_CLASS_BODY_NO_SCAN;\n\n      switch (type)\n      {\n        case LEXER_SEMICOLON:\n        {\n          source_p = context_p->source_p - 1;\n          scanner_context_p->mode = SCAN_MODE_CLASS_BODY;\n          break;\n        }\n        case LEXER_RIGHT_BRACE:\n        {\n          source_p = context_p->source_p - 1;\n          break;\n        }\n        default:\n        {\n          if (!(context_p->token.flags & LEXER_WAS_NEWLINE))\n          {\n            break;\n          }\n\n          if (type == LEXER_LEFT_SQUARE)\n          {\n            source_p = context_p->source_p - 1;\n            break;\n          }\n\n          if (type == LEXER_LITERAL)\n          {\n            if (context_p->token.lit_location.type == LEXER_IDENT_LITERAL\n                || context_p->token.lit_location.type == LEXER_NUMBER_LITERAL)\n            {\n              source_p = context_p->token.lit_location.char_p;\n            }\n            else if (context_p->token.lit_location.type == LEXER_STRING_LITERAL)\n            {\n              source_p = context_p->token.lit_location.char_p - 1;\n            }\n            break;\n          }\n\n          if (type == context_p->token.keyword_type && type != LEXER_EOS)\n          {\n            /* Convert keyword to literal. */\n            source_p = context_p->token.lit_location.char_p;\n            context_p->token.type = LEXER_LITERAL;\n          }\n          break;\n        }\n      }\n\n      if (JERRY_UNLIKELY (source_p == NULL))\n      {\n        scanner_raise_error (context_p);\n      }\n\n      scanner_location_info_t *location_info_p;\n      location_info_p = (scanner_location_info_t *) scanner_insert_info (context_p,\n                                                                         source_start.source_p,\n                                                                         sizeof (scanner_location_info_t));\n      location_info_p->info.type = SCANNER_TYPE_CLASS_FIELD_INITIALIZER_END;\n      location_info_p->location.source_p = source_p;\n      location_info_p->location.line = context_p->token.line;\n      location_info_p->location.column = context_p->token.column;\n      return SCAN_KEEP_TOKEN;\n    }\n    case SCAN_STACK_FUNCTION_PARAMETERS:\n    {\n      parser_stack_pop_uint8 (context_p);\n\n      if (type != LEXER_RIGHT_PAREN\n          && (type != LEXER_EOS || context_p->stack_top_uint8 != SCAN_STACK_SCRIPT_FUNCTION))\n      {\n        break;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_CONTINUE_FUNCTION_ARGUMENTS;\n      return SCAN_KEEP_TOKEN;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_END;\n      return SCAN_KEEP_TOKEN;\n    }\n  }\n\n  scanner_raise_error (context_p);\n  return SCAN_NEXT_TOKEN;\n} /* scanner_scan_primary_expression_end */\n\n/**\n * Scan statements.\n *\n * @return SCAN_NEXT_TOKEN to read the next token, or SCAN_KEEP_TOKEN to do nothing\n */\nstatic scan_return_types_t\nscanner_scan_statement (parser_context_t *context_p, /**< context */\n                        scanner_context_t *scanner_context_p, /**< scanner context */\n                        lexer_token_type_t type, /**< current token type */\n                        scan_stack_modes_t stack_top) /**< current stack top */\n{\n  switch (type)\n  {\n    case LEXER_SEMICOLON:\n    {\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_END;\n      return SCAN_KEEP_TOKEN;\n    }\n    case LEXER_LEFT_BRACE:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      scanner_literal_pool_t *literal_pool_p;\n      literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, 0);\n      literal_pool_p->source_p = context_p->source_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n      parser_stack_push_uint8 (context_p, SCAN_STACK_BLOCK_STATEMENT);\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_DO:\n    {\n      scanner_context_p->mode = SCAN_MODE_STATEMENT;\n      parser_stack_push_uint8 (context_p, SCAN_STACK_DO_STATEMENT);\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_TRY:\n    {\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_LEFT_BRACE)\n      {\n        scanner_raise_error (context_p);\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      scanner_literal_pool_t *literal_pool_p;\n      literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, 0);\n      literal_pool_p->source_p = context_p->source_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n      parser_stack_push_uint8 (context_p, SCAN_STACK_TRY_STATEMENT);\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_DEBUGGER:\n    {\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_END;\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_IF:\n    case LEXER_KEYW_WITH:\n    case LEXER_KEYW_SWITCH:\n    {\n      lexer_next_token (context_p);\n      if (context_p->token.type != LEXER_LEFT_PAREN)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      uint8_t mode = SCAN_STACK_STATEMENT_WITH_EXPR;\n\n      if (type == LEXER_KEYW_IF)\n      {\n        parser_stack_push_uint8 (context_p, SCAN_STACK_IF_STATEMENT);\n      }\n      else if (type == LEXER_KEYW_WITH)\n      {\n        mode = SCAN_STACK_WITH_EXPRESSION;\n      }\n      else if (type == LEXER_KEYW_SWITCH)\n      {\n        mode = SCAN_STACK_SWITCH_EXPRESSION;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      parser_stack_push_uint8 (context_p, mode);\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_WHILE:\n    {\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_LEFT_PAREN)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n      scanner_source_start_t source_start;\n      source_start.source_p = context_p->source_p;\n\n      parser_stack_push (context_p, &source_start, sizeof (scanner_source_start_t));\n      parser_stack_push_uint8 (context_p, SCAN_STACK_WHILE_EXPRESSION);\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_FOR:\n    {\n      lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->token.type == LEXER_KEYW_AWAIT)\n      {\n        lexer_next_token (context_p);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (context_p->token.type != LEXER_LEFT_PAREN)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      scanner_for_statement_t for_statement;\n      for_statement.u.source_p = context_p->source_p;\n      uint8_t stack_mode = SCAN_STACK_FOR_START;\n      scan_return_types_t return_type = SCAN_KEEP_TOKEN;\n\n      lexer_next_token (context_p);\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n#if ENABLED (JERRY_ESNEXT)\n      const uint8_t *source_p = context_p->source_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      switch (context_p->token.type)\n      {\n        case LEXER_SEMICOLON:\n        {\n          scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n          break;\n        }\n        case LEXER_KEYW_VAR:\n        {\n          scanner_context_p->mode = SCAN_MODE_VAR_STATEMENT;\n          stack_mode = SCAN_STACK_FOR_VAR_START;\n          return_type = SCAN_NEXT_TOKEN;\n          break;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case LEXER_LEFT_BRACE:\n        case LEXER_LEFT_SQUARE:\n        {\n          stack_mode = SCAN_STACK_FOR_START_PATTERN;\n          break;\n        }\n        case LEXER_LITERAL:\n        {\n          if (!lexer_token_is_let (context_p))\n          {\n            break;\n          }\n\n          parser_line_counter_t line = context_p->line;\n          parser_line_counter_t column = context_p->column;\n\n          if (lexer_check_arrow (context_p))\n          {\n            context_p->source_p = source_p;\n            context_p->line = line;\n            context_p->column = column;\n            context_p->token.flags &= (uint8_t) ~LEXER_NO_SKIP_SPACES;\n            break;\n          }\n\n          lexer_next_token (context_p);\n\n          type = (lexer_token_type_t) context_p->token.type;\n\n          if (type != LEXER_LEFT_SQUARE\n              && type != LEXER_LEFT_BRACE\n              && (type != LEXER_LITERAL || context_p->token.lit_location.type != LEXER_IDENT_LITERAL))\n          {\n            scanner_info_t *info_p = scanner_insert_info (context_p, source_p, sizeof (scanner_info_t));\n            info_p->type = SCANNER_TYPE_LET_EXPRESSION;\n\n            scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n            break;\n          }\n\n          scanner_context_p->mode = SCAN_MODE_VAR_STATEMENT;\n          /* FALLTHRU */\n        }\n        case LEXER_KEYW_LET:\n        case LEXER_KEYW_CONST:\n        {\n          scanner_literal_pool_t *literal_pool_p;\n          literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, 0);\n          literal_pool_p->source_p = source_p;\n\n          if (scanner_context_p->mode == SCAN_MODE_PRIMARY_EXPRESSION)\n          {\n            scanner_context_p->mode = SCAN_MODE_VAR_STATEMENT;\n            return_type = SCAN_NEXT_TOKEN;\n          }\n\n          stack_mode = ((context_p->token.type == LEXER_KEYW_CONST) ? SCAN_STACK_FOR_CONST_START\n                                                                    : SCAN_STACK_FOR_LET_START);\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n\n      parser_stack_push (context_p, &for_statement, sizeof (scanner_for_statement_t));\n      parser_stack_push_uint8 (context_p, stack_mode);\n      return return_type;\n    }\n    case LEXER_KEYW_VAR:\n    {\n      scanner_context_p->mode = SCAN_MODE_VAR_STATEMENT;\n      parser_stack_push_uint8 (context_p, SCAN_STACK_VAR);\n      return SCAN_NEXT_TOKEN;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_KEYW_LET:\n    {\n      scanner_context_p->mode = SCAN_MODE_VAR_STATEMENT;\n      parser_stack_push_uint8 (context_p, SCAN_STACK_LET);\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_CONST:\n    {\n      scanner_context_p->mode = SCAN_MODE_VAR_STATEMENT;\n      parser_stack_push_uint8 (context_p, SCAN_STACK_CONST);\n      return SCAN_NEXT_TOKEN;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case LEXER_KEYW_THROW:\n    {\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_RETURN:\n    {\n      lexer_next_token (context_p);\n\n      if (!(context_p->token.flags & LEXER_WAS_NEWLINE)\n          && context_p->token.type != LEXER_SEMICOLON\n          && context_p->token.type != LEXER_EOS\n          && context_p->token.type != LEXER_RIGHT_BRACE)\n      {\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n        return SCAN_KEEP_TOKEN;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_END;\n      return SCAN_KEEP_TOKEN;\n    }\n    case LEXER_KEYW_BREAK:\n    case LEXER_KEYW_CONTINUE:\n    {\n      lexer_next_token (context_p);\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_END;\n\n      if (!(context_p->token.flags & LEXER_WAS_NEWLINE)\n          && context_p->token.type == LEXER_LITERAL\n          && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n      {\n        return SCAN_NEXT_TOKEN;\n      }\n      return SCAN_KEEP_TOKEN;\n    }\n    case LEXER_KEYW_CASE:\n    case LEXER_KEYW_DEFAULT:\n    {\n      if (stack_top != SCAN_STACK_SWITCH_BLOCK)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      scanner_case_info_t *case_info_p;\n      case_info_p = (scanner_case_info_t *) scanner_malloc (context_p, sizeof (scanner_case_info_t));\n\n      *(scanner_context_p->active_switch_statement.last_case_p) = case_info_p;\n      scanner_context_p->active_switch_statement.last_case_p = &case_info_p->next_p;\n\n      case_info_p->next_p = NULL;\n      scanner_get_location (&case_info_p->location, context_p);\n\n      if (type == LEXER_KEYW_DEFAULT)\n      {\n        lexer_next_token (context_p);\n\n        if (context_p->token.type != LEXER_COLON)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n        return SCAN_NEXT_TOKEN;\n      }\n\n      scanner_source_start_t source_start;\n      source_start.source_p = context_p->source_p;\n\n      parser_stack_push (context_p, &source_start, sizeof (scanner_source_start_t));\n      parser_stack_push_uint8 (context_p, SCAN_STACK_CASE_STATEMENT);\n\n      scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_FUNCTION:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      uint16_t status_flags = SCANNER_LITERAL_POOL_FUNCTION | SCANNER_LITERAL_POOL_FUNCTION_STATEMENT;\n\n      if (scanner_context_p->async_source_p != NULL)\n      {\n        scanner_context_p->status_flags |= SCANNER_CONTEXT_THROW_ERR_ASYNC_FUNCTION;\n        status_flags |= SCANNER_LITERAL_POOL_ASYNC;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->token.type == LEXER_MULTIPLY)\n      {\n        status_flags |= SCANNER_LITERAL_POOL_GENERATOR;\n        lexer_next_token (context_p);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (context_p->token.type != LEXER_LITERAL\n          || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      lexer_lit_location_t *literal_p = scanner_add_literal (context_p, scanner_context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n      const uint8_t mask = (SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_IS_FUNC | SCANNER_LITERAL_IS_LOCAL);\n\n      if ((literal_p->type & SCANNER_LITERAL_IS_LOCAL)\n          && (literal_p->type & mask) != (SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_IS_DESTRUCTURED_ARG)\n          && (literal_p->type & mask) != SCANNER_LITERAL_IS_LOCAL_FUNC)\n      {\n        scanner_raise_redeclaration_error (context_p);\n      }\n\n      scanner_literal_pool_t *literal_pool_p = scanner_context_p->active_literal_pool_p;\n\n      if (!(literal_pool_p->status_flags & SCANNER_LITERAL_POOL_FUNCTION)\n          && (literal_p->type & (SCANNER_LITERAL_IS_VAR)))\n      {\n        scanner_raise_redeclaration_error (context_p);\n      }\n\n      literal_p->type |= SCANNER_LITERAL_IS_LOCAL_FUNC;\n\n      scanner_context_p->status_flags &= (uint16_t) ~SCANNER_CONTEXT_THROW_ERR_ASYNC_FUNCTION;\n#else\n      literal_p->type |= SCANNER_LITERAL_IS_VAR | SCANNER_LITERAL_IS_FUNC;\n\n      uint16_t status_flags = SCANNER_LITERAL_POOL_FUNCTION;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      scanner_push_literal_pool (context_p, scanner_context_p, status_flags);\n\n      scanner_context_p->mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n      parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_STATEMENT);\n      return SCAN_NEXT_TOKEN;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LEXER_KEYW_CLASS:\n    {\n      lexer_lit_location_t *literal_p;\n      literal_p = scanner_push_class_declaration (context_p, scanner_context_p, SCAN_STACK_CLASS_STATEMENT);\n\n      if (literal_p == NULL)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      scanner_detect_invalid_let (context_p, literal_p);\n      literal_p->type |= SCANNER_LITERAL_IS_LET;\n\n      if (literal_p->type & SCANNER_LITERAL_IS_USED)\n      {\n        literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n      }\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      if (scanner_context_p->active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_EXPORT)\n      {\n        literal_p->type |= SCANNER_LITERAL_NO_REG;\n        scanner_context_p->active_literal_pool_p->status_flags &= (uint16_t) ~SCANNER_LITERAL_POOL_IN_EXPORT;\n      }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n      return SCAN_NEXT_TOKEN;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n    case LEXER_KEYW_IMPORT:\n    {\n      if (stack_top != SCAN_STACK_SCRIPT)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_END;\n      lexer_next_token (context_p);\n\n      if (context_p->token.type == LEXER_LITERAL\n          && context_p->token.lit_location.type == LEXER_STRING_LITERAL)\n      {\n        return SCAN_NEXT_TOKEN;\n      }\n\n      bool parse_imports = true;\n\n      if (context_p->token.type == LEXER_LITERAL\n          && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n      {\n        lexer_lit_location_t *literal_p = scanner_add_literal (context_p, scanner_context_p);\n\n        scanner_detect_invalid_let (context_p, literal_p);\n        literal_p->type |= SCANNER_LITERAL_IS_LOCAL | SCANNER_LITERAL_NO_REG;\n\n        lexer_next_token (context_p);\n\n        if (context_p->token.type == LEXER_COMMA)\n        {\n          lexer_next_token (context_p);\n        }\n        else\n        {\n          parse_imports = false;\n        }\n      }\n\n      if (parse_imports)\n      {\n        if (context_p->token.type == LEXER_MULTIPLY)\n        {\n          lexer_next_token (context_p);\n          if (!lexer_token_is_identifier (context_p, \"as\", 2))\n          {\n            scanner_raise_error (context_p);\n          }\n\n          lexer_next_token (context_p);\n\n          if (context_p->token.type != LEXER_LITERAL\n              && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n          {\n            scanner_raise_error (context_p);\n          }\n\n          lexer_lit_location_t *literal_p = scanner_add_literal (context_p, scanner_context_p);\n\n          scanner_detect_invalid_let (context_p, literal_p);\n          literal_p->type |= SCANNER_LITERAL_IS_LOCAL | SCANNER_LITERAL_NO_REG;\n\n          lexer_next_token (context_p);\n        }\n        else if (context_p->token.type == LEXER_LEFT_BRACE)\n        {\n          lexer_next_token (context_p);\n\n          while (context_p->token.type != LEXER_RIGHT_BRACE)\n          {\n            if (context_p->token.type != LEXER_LITERAL\n                || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n            {\n              scanner_raise_error (context_p);\n            }\n\n            const uint8_t *source_p = context_p->source_p;\n\n            if (lexer_check_next_character (context_p, LIT_CHAR_LOWERCASE_A))\n            {\n              lexer_next_token (context_p);\n\n              if (!lexer_token_is_identifier (context_p, \"as\", 2))\n              {\n                scanner_raise_error (context_p);\n              }\n\n              lexer_next_token (context_p);\n\n              if (context_p->token.type != LEXER_LITERAL\n                  && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n              {\n                scanner_raise_error (context_p);\n              }\n\n              source_p = context_p->source_p;\n            }\n\n            lexer_lit_location_t *literal_p = scanner_add_literal (context_p, scanner_context_p);\n\n            if (literal_p->type & (SCANNER_LITERAL_IS_ARG\n                                   | SCANNER_LITERAL_IS_VAR\n                                   | SCANNER_LITERAL_IS_LOCAL))\n            {\n              context_p->source_p = source_p;\n              scanner_raise_redeclaration_error (context_p);\n            }\n\n            if (literal_p->type & SCANNER_LITERAL_IS_FUNC)\n            {\n              literal_p->type &= (uint8_t) ~SCANNER_LITERAL_IS_FUNC;\n            }\n\n            literal_p->type |= SCANNER_LITERAL_IS_LOCAL | SCANNER_LITERAL_NO_REG;\n\n            lexer_next_token (context_p);\n\n            if (context_p->token.type != LEXER_RIGHT_BRACE)\n            {\n              if (context_p->token.type != LEXER_COMMA)\n              {\n                scanner_raise_error (context_p);\n              }\n\n              lexer_next_token (context_p);\n            }\n          }\n\n          lexer_next_token (context_p);\n        }\n        else\n        {\n          scanner_raise_error (context_p);\n        }\n      }\n\n      if (!lexer_token_is_identifier (context_p, \"from\", 4))\n      {\n        scanner_raise_error (context_p);\n      }\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type != LEXER_LITERAL\n          && context_p->token.lit_location.type != LEXER_STRING_LITERAL)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      return SCAN_NEXT_TOKEN;\n    }\n    case LEXER_KEYW_EXPORT:\n    {\n      if (stack_top != SCAN_STACK_SCRIPT)\n      {\n        scanner_raise_error (context_p);\n      }\n\n      lexer_next_token (context_p);\n\n      if (context_p->token.type == LEXER_KEYW_DEFAULT)\n      {\n        lexer_next_token (context_p);\n        parser_stack_push_uint8 (context_p, SCAN_STACK_EXPORT_DEFAULT);\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n        return SCAN_KEEP_TOKEN;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT_END;\n\n      if (context_p->token.type == LEXER_MULTIPLY)\n      {\n        lexer_next_token (context_p);\n        if (!lexer_token_is_identifier (context_p, \"from\", 4))\n        {\n          scanner_raise_error (context_p);\n        }\n\n        lexer_next_token (context_p);\n\n        if (context_p->token.type != LEXER_LITERAL\n            && context_p->token.lit_location.type == LEXER_STRING_LITERAL)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        return SCAN_NEXT_TOKEN;\n      }\n\n      scanner_source_start_t source_start;\n      source_start.source_p = context_p->source_p;\n\n      if (context_p->token.type == LEXER_LEFT_BRACE)\n      {\n        lexer_next_token (context_p);\n\n        while (context_p->token.type != LEXER_RIGHT_BRACE)\n        {\n          if (context_p->token.type != LEXER_LITERAL\n              || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n          {\n            scanner_raise_error (context_p);\n          }\n\n          lexer_next_token (context_p);\n\n          if (lexer_token_is_identifier (context_p, \"as\", 2))\n          {\n            lexer_next_token (context_p);\n\n            if (context_p->token.type != LEXER_LITERAL\n                && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n            {\n              scanner_raise_error (context_p);\n            }\n\n            lexer_next_token (context_p);\n          }\n\n          if (context_p->token.type != LEXER_RIGHT_BRACE)\n          {\n            if (context_p->token.type != LEXER_COMMA)\n            {\n              scanner_raise_error (context_p);\n            }\n\n            lexer_next_token (context_p);\n          }\n        }\n\n        lexer_next_token (context_p);\n\n        if (!lexer_token_is_identifier (context_p, \"from\", 4))\n        {\n          return SCAN_KEEP_TOKEN;\n        }\n\n        scanner_info_t *info_p = scanner_insert_info (context_p, source_start.source_p, sizeof (scanner_info_t));\n        info_p->type = SCANNER_TYPE_EXPORT_MODULE_SPECIFIER;\n\n        lexer_next_token (context_p);\n\n        if (context_p->token.type != LEXER_LITERAL\n            && context_p->token.lit_location.type == LEXER_STRING_LITERAL)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        return SCAN_NEXT_TOKEN;\n      }\n\n      switch (context_p->token.type)\n      {\n        case LEXER_KEYW_CLASS:\n        case LEXER_KEYW_LET:\n        case LEXER_KEYW_CONST:\n        case LEXER_KEYW_VAR:\n        {\n          scanner_context_p->active_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_IN_EXPORT;\n          break;\n        }\n      }\n\n      scanner_context_p->mode = SCAN_MODE_STATEMENT;\n      return SCAN_KEEP_TOKEN;\n    }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n    default:\n    {\n      break;\n    }\n  }\n\n  scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n  if (type == LEXER_LITERAL\n      && context_p->token.lit_location.type == LEXER_IDENT_LITERAL)\n  {\n    if (JERRY_UNLIKELY (lexer_check_next_character (context_p, LIT_CHAR_COLON)))\n    {\n      lexer_consume_next_character (context_p);\n      scanner_context_p->mode = SCAN_MODE_STATEMENT;\n      return SCAN_NEXT_TOKEN;\n    }\n\n    JERRY_ASSERT (context_p->token.flags & LEXER_NO_SKIP_SPACES);\n\n#if ENABLED (JERRY_ESNEXT)\n    /* The colon needs to be checked first because the parser also checks\n     * it first, and this check skips the spaces which affects source_p. */\n    if (JERRY_UNLIKELY (lexer_check_arrow (context_p)))\n    {\n      scanner_scan_simple_arrow (context_p, scanner_context_p, context_p->source_p);\n      return SCAN_KEEP_TOKEN;\n    }\n\n    if (JERRY_UNLIKELY (lexer_token_is_let (context_p)))\n    {\n      lexer_lit_location_t let_literal = context_p->token.lit_location;\n      const uint8_t *source_p = context_p->source_p;\n\n      lexer_next_token (context_p);\n\n      type = (lexer_token_type_t) context_p->token.type;\n\n      if (type == LEXER_LEFT_SQUARE\n          || type == LEXER_LEFT_BRACE\n          || (type == LEXER_LITERAL && context_p->token.lit_location.type == LEXER_IDENT_LITERAL))\n      {\n        scanner_context_p->mode = SCAN_MODE_VAR_STATEMENT;\n        parser_stack_push_uint8 (context_p, SCAN_STACK_LET);\n        return SCAN_KEEP_TOKEN;\n      }\n\n      scanner_info_t *info_p = scanner_insert_info (context_p, source_p, sizeof (scanner_info_t));\n      info_p->type = SCANNER_TYPE_LET_EXPRESSION;\n\n      lexer_lit_location_t *lit_location_p = scanner_add_custom_literal (context_p,\n                                                                         scanner_context_p->active_literal_pool_p,\n                                                                         &let_literal);\n      lit_location_p->type |= SCANNER_LITERAL_IS_USED;\n\n      if (scanner_context_p->active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_WITH)\n      {\n        lit_location_p->type |= SCANNER_LITERAL_NO_REG;\n      }\n\n      scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n      return SCAN_KEEP_TOKEN;\n    }\n\n    if (JERRY_UNLIKELY (lexer_token_is_async (context_p)))\n    {\n      scanner_context_p->async_source_p = context_p->source_p;\n\n      if (scanner_check_async_function (context_p, scanner_context_p))\n      {\n        scanner_context_p->mode = SCAN_MODE_STATEMENT;\n      }\n      return SCAN_KEEP_TOKEN;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    scanner_add_reference (context_p, scanner_context_p);\n\n    scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n    return SCAN_NEXT_TOKEN;\n  }\n\n  return SCAN_KEEP_TOKEN;\n} /* scanner_scan_statement */\n\n/**\n * Scan statement terminator.\n *\n * @return SCAN_NEXT_TOKEN to read the next token, or SCAN_KEEP_TOKEN to do nothing\n */\nstatic scan_return_types_t\nscanner_scan_statement_end (parser_context_t *context_p, /**< context */\n                            scanner_context_t *scanner_context_p, /**< scanner context */\n                            lexer_token_type_t type) /**< current token type */\n{\n  bool terminator_found = false;\n\n  if (type == LEXER_SEMICOLON)\n  {\n    lexer_next_token (context_p);\n    terminator_found = true;\n  }\n\n  while (true)\n  {\n    type = (lexer_token_type_t) context_p->token.type;\n\n    switch (context_p->stack_top_uint8)\n    {\n      case SCAN_STACK_SCRIPT:\n      case SCAN_STACK_SCRIPT_FUNCTION:\n      {\n        if (type == LEXER_EOS)\n        {\n          return SCAN_NEXT_TOKEN;\n        }\n        break;\n      }\n      case SCAN_STACK_BLOCK_STATEMENT:\n#if ENABLED (JERRY_ESNEXT)\n      case SCAN_STACK_CLASS_STATEMENT:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case SCAN_STACK_FUNCTION_STATEMENT:\n      {\n        if (type != LEXER_RIGHT_BRACE)\n        {\n          break;\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->stack_top_uint8 != SCAN_STACK_CLASS_STATEMENT)\n        {\n          scanner_pop_literal_pool (context_p, scanner_context_p);\n        }\n#else /* !ENABLED (JERRY_ESNEXT) */\n        if (context_p->stack_top_uint8 == SCAN_STACK_FUNCTION_STATEMENT)\n        {\n          scanner_pop_literal_pool (context_p, scanner_context_p);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        terminator_found = true;\n        parser_stack_pop_uint8 (context_p);\n#if ENABLED (JERRY_MODULE_SYSTEM)\n        scanner_context_p->active_literal_pool_p->status_flags &= (uint16_t) ~SCANNER_LITERAL_POOL_IN_EXPORT;\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n        lexer_next_token (context_p);\n        continue;\n      }\n      case SCAN_STACK_FUNCTION_EXPRESSION:\n#if ENABLED (JERRY_ESNEXT)\n      case SCAN_STACK_FUNCTION_ARROW:\n#endif /* ENABLED (JERRY_ESNEXT) */\n      {\n        if (type != LEXER_RIGHT_BRACE)\n        {\n          break;\n        }\n\n        scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->stack_top_uint8 == SCAN_STACK_FUNCTION_ARROW)\n        {\n          scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        scanner_pop_literal_pool (context_p, scanner_context_p);\n        parser_stack_pop_uint8 (context_p);\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n        if (context_p->stack_top_uint8 == SCAN_STACK_EXPORT_DEFAULT)\n        {\n          terminator_found = true;\n          parser_stack_pop_uint8 (context_p);\n          lexer_next_token (context_p);\n          continue;\n        }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n        return SCAN_NEXT_TOKEN;\n      }\n      case SCAN_STACK_FUNCTION_PROPERTY:\n      {\n        if (type != LEXER_RIGHT_BRACE)\n        {\n          break;\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        bool has_super_reference = (scanner_context_p->active_literal_pool_p->status_flags\n                                    & SCANNER_LITERAL_POOL_HAS_SUPER_REFERENCE) != 0;\n#endif /* ENABLED (JERRY_ESNEXT) */\n        scanner_pop_literal_pool (context_p, scanner_context_p);\n        parser_stack_pop_uint8 (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->stack_top_uint8 == SCAN_STACK_EXPLICIT_CLASS_CONSTRUCTOR\n            || context_p->stack_top_uint8 == SCAN_STACK_IMPLICIT_CLASS_CONSTRUCTOR)\n        {\n          scanner_context_p->mode = SCAN_MODE_CLASS_BODY;\n          return SCAN_KEEP_TOKEN;\n        }\n\n        if (has_super_reference && context_p->stack_top_uint8 == SCAN_STACK_OBJECT_LITERAL)\n        {\n          *parser_stack_get_prev_uint8 (context_p) |= SCANNER_LITERAL_OBJECT_HAS_SUPER;\n        }\n#else /* ENABLED (JERRY_ESNEXT) */\n        JERRY_ASSERT (context_p->stack_top_uint8 == SCAN_STACK_OBJECT_LITERAL);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        lexer_next_token (context_p);\n\n        if (context_p->token.type == LEXER_RIGHT_BRACE)\n        {\n          scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n          return SCAN_KEEP_TOKEN;\n        }\n\n        if (context_p->token.type != LEXER_COMMA)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        scanner_context_p->mode = SCAN_MODE_PROPERTY_NAME;\n        return SCAN_KEEP_TOKEN;\n      }\n      case SCAN_STACK_SWITCH_BLOCK:\n      {\n        if (type != LEXER_RIGHT_BRACE)\n        {\n          break;\n        }\n\n        scanner_switch_statement_t switch_statement;\n\n        parser_stack_pop_uint8 (context_p);\n        parser_stack_pop (context_p, &switch_statement, sizeof (scanner_switch_statement_t));\n\n        scanner_context_p->active_switch_statement = switch_statement;\n\n#if ENABLED (JERRY_ESNEXT)\n        scanner_pop_literal_pool (context_p, scanner_context_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        terminator_found = true;\n        lexer_next_token (context_p);\n        continue;\n      }\n      case SCAN_STACK_IF_STATEMENT:\n      {\n        parser_stack_pop_uint8 (context_p);\n\n        if (type == LEXER_KEYW_ELSE\n            && (terminator_found || (context_p->token.flags & LEXER_WAS_NEWLINE)))\n        {\n#if ENABLED (JERRY_ESNEXT)\n          scanner_check_function_after_if (context_p, scanner_context_p);\n          return SCAN_KEEP_TOKEN;\n#else /* !ENABLED (JERRY_ESNEXT) */\n          scanner_context_p->mode = SCAN_MODE_STATEMENT;\n          return SCAN_NEXT_TOKEN;\n#endif /* ENABLED (JERRY_ESNEXT) */\n        }\n        continue;\n      }\n      case SCAN_STACK_WITH_STATEMENT:\n      {\n        scanner_literal_pool_t *literal_pool_p = scanner_context_p->active_literal_pool_p;\n\n        JERRY_ASSERT (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_WITH);\n\n        parser_stack_pop_uint8 (context_p);\n\n        if (context_p->stack_top_uint8 == 0)\n        {\n          literal_pool_p->status_flags &= (uint16_t) ~SCANNER_LITERAL_POOL_IN_WITH;\n        }\n\n        parser_stack_pop_uint8 (context_p);\n        continue;\n      }\n      case SCAN_STACK_DO_STATEMENT:\n      {\n        parser_stack_pop_uint8 (context_p);\n\n        if (type != LEXER_KEYW_WHILE\n            || (!terminator_found && !(context_p->token.flags & LEXER_WAS_NEWLINE)))\n        {\n          scanner_raise_error (context_p);\n        }\n\n        lexer_next_token (context_p);\n        if (context_p->token.type != LEXER_LEFT_PAREN)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        parser_stack_push_uint8 (context_p, SCAN_STACK_DO_EXPRESSION);\n        scanner_context_p->mode = SCAN_MODE_PRIMARY_EXPRESSION;\n        return SCAN_NEXT_TOKEN;\n      }\n      case SCAN_STACK_DO_EXPRESSION:\n      {\n        parser_stack_pop_uint8 (context_p);\n        terminator_found = true;\n        continue;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case SCAN_STACK_PRIVATE_BLOCK_EARLY:\n      {\n        parser_list_iterator_t literal_iterator;\n        lexer_lit_location_t *literal_p;\n\n        parser_list_iterator_init (&scanner_context_p->active_literal_pool_p->literal_pool, &literal_iterator);\n\n        while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NULL)\n        {\n          if ((literal_p->type & (SCANNER_LITERAL_IS_LET | SCANNER_LITERAL_IS_CONST))\n              && (literal_p->type & SCANNER_LITERAL_IS_USED))\n          {\n            literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n          }\n        }\n        /* FALLTHRU */\n      }\n      case SCAN_STACK_PRIVATE_BLOCK:\n      {\n        parser_stack_pop_uint8 (context_p);\n        scanner_pop_literal_pool (context_p, scanner_context_p);\n        continue;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n      case SCAN_STACK_EXPORT_DEFAULT:\n      {\n        parser_stack_pop_uint8 (context_p);\n        lexer_lit_location_t *location_p = scanner_add_custom_literal (context_p,\n                                                                       scanner_context_p->active_literal_pool_p,\n                                                                       &lexer_default_literal);\n        location_p->type |= SCANNER_LITERAL_IS_VAR;\n        continue;\n      }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n      default:\n      {\n        JERRY_ASSERT (context_p->stack_top_uint8 == SCAN_STACK_TRY_STATEMENT\n                      || context_p->stack_top_uint8 == SCAN_STACK_CATCH_STATEMENT);\n\n        if (type != LEXER_RIGHT_BRACE)\n        {\n          break;\n        }\n\n        uint8_t stack_top = context_p->stack_top_uint8;\n        parser_stack_pop_uint8 (context_p);\n        lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        scanner_pop_literal_pool (context_p, scanner_context_p);\n#else /* !ENABLED (JERRY_ESNEXT) */\n        if (stack_top == SCAN_STACK_CATCH_STATEMENT)\n        {\n          scanner_pop_literal_pool (context_p, scanner_context_p);\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        /* A finally statement is optional after a try or catch statement. */\n        if (context_p->token.type == LEXER_KEYW_FINALLY)\n        {\n          lexer_next_token (context_p);\n\n          if (context_p->token.type != LEXER_LEFT_BRACE)\n          {\n            scanner_raise_error (context_p);\n          }\n\n#if ENABLED (JERRY_ESNEXT)\n          scanner_literal_pool_t *literal_pool_p;\n          literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, 0);\n          literal_pool_p->source_p = context_p->source_p;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          parser_stack_push_uint8 (context_p, SCAN_STACK_BLOCK_STATEMENT);\n          scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n          return SCAN_NEXT_TOKEN;\n        }\n\n        if (stack_top == SCAN_STACK_CATCH_STATEMENT)\n        {\n          terminator_found = true;\n          continue;\n        }\n\n        /* A catch statement must be present after a try statement unless a finally is provided. */\n        if (context_p->token.type != LEXER_KEYW_CATCH)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        lexer_next_token (context_p);\n\n        scanner_literal_pool_t *literal_pool_p;\n        literal_pool_p = scanner_push_literal_pool (context_p, scanner_context_p, 0);\n        literal_pool_p->source_p = context_p->source_p;\n        parser_stack_push_uint8 (context_p, SCAN_STACK_CATCH_STATEMENT);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->token.type == LEXER_LEFT_BRACE)\n        {\n          scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n          return SCAN_NEXT_TOKEN;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (context_p->token.type != LEXER_LEFT_PAREN)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n        if (context_p->token.type == LEXER_LEFT_SQUARE || context_p->token.type == LEXER_LEFT_BRACE)\n        {\n          scanner_push_destructuring_pattern (context_p, scanner_context_p, SCANNER_BINDING_CATCH, false);\n\n          if (context_p->token.type == LEXER_LEFT_SQUARE)\n          {\n            parser_stack_push_uint8 (context_p, SCAN_STACK_ARRAY_LITERAL);\n            scanner_context_p->mode = SCAN_MODE_BINDING;\n            return SCAN_NEXT_TOKEN;\n          }\n\n          parser_stack_push_uint8 (context_p, 0);\n          parser_stack_push_uint8 (context_p, SCAN_STACK_OBJECT_LITERAL);\n          scanner_context_p->mode = SCAN_MODE_PROPERTY_NAME;\n          return SCAN_KEEP_TOKEN;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        if (context_p->token.type != LEXER_LITERAL\n            || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        lexer_lit_location_t *lit_location_p = scanner_add_literal (context_p, scanner_context_p);\n        lit_location_p->type |= SCANNER_LITERAL_IS_LOCAL;\n\n        lexer_next_token (context_p);\n\n        if (context_p->token.type != LEXER_RIGHT_PAREN)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        lexer_next_token (context_p);\n\n        if (context_p->token.type != LEXER_LEFT_BRACE)\n        {\n          scanner_raise_error (context_p);\n        }\n\n        scanner_context_p->mode = SCAN_MODE_STATEMENT_OR_TERMINATOR;\n        return SCAN_NEXT_TOKEN;\n      }\n    }\n\n    if (!terminator_found && !(context_p->token.flags & LEXER_WAS_NEWLINE))\n    {\n      scanner_raise_error (context_p);\n    }\n\n    scanner_context_p->mode = SCAN_MODE_STATEMENT;\n    return SCAN_KEEP_TOKEN;\n  }\n} /* scanner_scan_statement_end */\n\n/**\n * Scan the whole source code.\n */\nvoid JERRY_ATTR_NOINLINE\nscanner_scan_all (parser_context_t *context_p, /**< context */\n                  const uint8_t *arg_list_p, /**< function argument list */\n                  const uint8_t *arg_list_end_p, /**< end of argument list */\n                  const uint8_t *source_p, /**< valid UTF-8 source code */\n                  const uint8_t *source_end_p) /**< end of source code */\n{\n  scanner_context_t scanner_context;\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    JERRY_DEBUG_MSG (\"\\n--- Scanning start ---\\n\\n\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  scanner_context.context_status_flags = context_p->status_flags;\n  scanner_context.status_flags = SCANNER_CONTEXT_NO_FLAGS;\n#if ENABLED (JERRY_DEBUGGER)\n  if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n  {\n    scanner_context.status_flags |= SCANNER_CONTEXT_DEBUGGER_ENABLED;\n  }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n#if ENABLED (JERRY_ESNEXT)\n  scanner_context.binding_type = SCANNER_BINDING_NONE;\n  scanner_context.active_binding_list_p = NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  scanner_context.active_literal_pool_p = NULL;\n  scanner_context.active_switch_statement.last_case_p = NULL;\n  scanner_context.end_arguments_p = NULL;\n#if ENABLED (JERRY_ESNEXT)\n  scanner_context.async_source_p = NULL;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* This assignment must be here because of Apple compilers. */\n  context_p->u.scanner_context_p = &scanner_context;\n#if ENABLED (JERRY_ESNEXT)\n  context_p->global_status_flags |= ECMA_PARSE_INTERNAL_PRE_SCANNING;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  parser_stack_init (context_p);\n\n  PARSER_TRY (context_p->try_buffer)\n  {\n    context_p->line = 1;\n    context_p->column = 1;\n\n    if (arg_list_p == NULL)\n    {\n      context_p->source_p = source_p;\n      context_p->source_end_p = source_end_p;\n\n      uint16_t status_flags = (SCANNER_LITERAL_POOL_FUNCTION\n                               | SCANNER_LITERAL_POOL_NO_ARGUMENTS\n                               | SCANNER_LITERAL_POOL_CAN_EVAL);\n\n      if (context_p->status_flags & PARSER_IS_STRICT)\n      {\n        status_flags |= SCANNER_LITERAL_POOL_IS_STRICT;\n      }\n\n      scanner_literal_pool_t *literal_pool_p = scanner_push_literal_pool (context_p, &scanner_context, status_flags);\n      literal_pool_p->source_p = source_p;\n\n      parser_stack_push_uint8 (context_p, SCAN_STACK_SCRIPT);\n\n      lexer_next_token (context_p);\n      scanner_check_directives (context_p, &scanner_context);\n    }\n    else\n    {\n      context_p->source_p = arg_list_p;\n      context_p->source_end_p = arg_list_end_p;\n\n      uint16_t status_flags = SCANNER_LITERAL_POOL_FUNCTION;\n\n      if (context_p->status_flags & PARSER_IS_STRICT)\n      {\n        status_flags |= SCANNER_LITERAL_POOL_IS_STRICT;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (context_p->status_flags & PARSER_IS_GENERATOR_FUNCTION)\n      {\n        status_flags |= SCANNER_LITERAL_POOL_GENERATOR;\n      }\n      if (context_p->status_flags & PARSER_IS_ASYNC_FUNCTION)\n      {\n        status_flags |= SCANNER_LITERAL_POOL_ASYNC;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      scanner_push_literal_pool (context_p, &scanner_context, status_flags);\n      scanner_context.mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n      parser_stack_push_uint8 (context_p, SCAN_STACK_SCRIPT_FUNCTION);\n\n      /* Faking the first token. */\n      context_p->token.type = LEXER_LEFT_PAREN;\n    }\n\n    while (true)\n    {\n      lexer_token_type_t type = (lexer_token_type_t) context_p->token.type;\n      scan_stack_modes_t stack_top = (scan_stack_modes_t) context_p->stack_top_uint8;\n\n      switch (scanner_context.mode)\n      {\n        case SCAN_MODE_PRIMARY_EXPRESSION:\n        {\n          if (type == LEXER_ADD\n              || type == LEXER_SUBTRACT\n              || LEXER_IS_UNARY_OP_TOKEN (type))\n          {\n            break;\n          }\n          /* FALLTHRU */\n        }\n        case SCAN_MODE_PRIMARY_EXPRESSION_AFTER_NEW:\n        {\n          if (scanner_scan_primary_expression (context_p, &scanner_context, type, stack_top) != SCAN_NEXT_TOKEN)\n          {\n            continue;\n          }\n          break;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case SCAN_MODE_CLASS_DECLARATION:\n        {\n          if (context_p->token.type == LEXER_KEYW_EXTENDS)\n          {\n            parser_stack_push_uint8 (context_p, SCAN_STACK_CLASS_EXTENDS);\n            scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n            break;\n          }\n          else if (context_p->token.type != LEXER_LEFT_BRACE)\n          {\n            scanner_raise_error (context_p);\n          }\n\n          scanner_context.mode = SCAN_MODE_CLASS_BODY;\n          /* FALLTHRU */\n        }\n        case SCAN_MODE_CLASS_BODY:\n        {\n          lexer_skip_empty_statements (context_p);\n          lexer_scan_identifier (context_p);\n          /* FALLTHRU */\n        }\n        case SCAN_MODE_CLASS_BODY_NO_SCAN:\n        {\n          JERRY_ASSERT (stack_top == SCAN_STACK_IMPLICIT_CLASS_CONSTRUCTOR\n                        || stack_top == SCAN_STACK_EXPLICIT_CLASS_CONSTRUCTOR);\n          JERRY_ASSERT (scanner_context.active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_CLASS_NAME);\n\n          if (context_p->token.type == LEXER_RIGHT_BRACE)\n          {\n            parser_stack_pop_uint8 (context_p);\n            stack_top = context_p->stack_top_uint8;\n\n            scanner_pop_literal_pool (context_p, &scanner_context);\n\n            JERRY_ASSERT (stack_top == SCAN_STACK_CLASS_STATEMENT || stack_top == SCAN_STACK_CLASS_EXPRESSION);\n\n            if (stack_top == SCAN_STACK_CLASS_STATEMENT)\n            {\n              /* The token is kept to disallow consuming a semicolon after it. */\n              scanner_context.mode = SCAN_MODE_STATEMENT_END;\n              continue;\n            }\n\n            scanner_context.mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n            parser_stack_pop_uint8 (context_p);\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n            if (context_p->stack_top_uint8 == SCAN_STACK_EXPORT_DEFAULT)\n            {\n              /* The token is kept to disallow consuming a semicolon after it. */\n              parser_stack_change_last_uint8 (context_p, SCAN_STACK_CLASS_STATEMENT);\n              scanner_context.mode = SCAN_MODE_STATEMENT_END;\n              continue;\n            }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n            break;\n          }\n\n          bool identifier_found = false;\n\n          if (context_p->token.type == LEXER_LITERAL\n              && LEXER_IS_IDENT_OR_STRING (context_p->token.lit_location.type)\n              && lexer_compare_literal_to_string (context_p, \"constructor\", 11))\n          {\n            if (stack_top == SCAN_STACK_IMPLICIT_CLASS_CONSTRUCTOR)\n            {\n              const uint8_t *class_source_p = scanner_context.active_literal_pool_p->source_p;\n              scanner_info_t *info_p = scanner_insert_info (context_p, class_source_p, sizeof (scanner_info_t));\n\n              info_p->type = SCANNER_TYPE_CLASS_CONSTRUCTOR;\n              parser_stack_change_last_uint8 (context_p, SCAN_STACK_EXPLICIT_CLASS_CONSTRUCTOR);\n            }\n          }\n          else if (lexer_token_is_identifier (context_p, \"static\", 6))\n          {\n            lexer_scan_identifier (context_p);\n            identifier_found = true;\n          }\n\n          scanner_context.mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n\n          uint16_t literal_pool_flags = SCANNER_LITERAL_POOL_FUNCTION;\n\n          if (lexer_token_is_identifier (context_p, \"get\", 3)\n              || lexer_token_is_identifier (context_p, \"set\", 3))\n          {\n            lexer_scan_identifier (context_p);\n            identifier_found = true;\n\n            if (context_p->token.type == LEXER_LEFT_PAREN)\n            {\n              parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PROPERTY);\n              scanner_push_literal_pool (context_p, &scanner_context, SCANNER_LITERAL_POOL_FUNCTION);\n              continue;\n            }\n          }\n          else if (lexer_token_is_identifier (context_p, \"async\", 5))\n          {\n            lexer_scan_identifier (context_p);\n            identifier_found = true;\n\n            if (!(context_p->token.flags & LEXER_WAS_NEWLINE))\n            {\n              if (context_p->token.type == LEXER_LEFT_PAREN)\n              {\n                parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PROPERTY);\n                scanner_push_literal_pool (context_p, &scanner_context, SCANNER_LITERAL_POOL_FUNCTION);\n                continue;\n              }\n\n              literal_pool_flags |= SCANNER_LITERAL_POOL_ASYNC;\n\n              if (context_p->token.type == LEXER_MULTIPLY)\n              {\n                lexer_scan_identifier (context_p);\n                literal_pool_flags |= SCANNER_LITERAL_POOL_GENERATOR;\n              }\n            }\n          }\n          else if (context_p->token.type == LEXER_MULTIPLY)\n          {\n            lexer_scan_identifier (context_p);\n            literal_pool_flags |= SCANNER_LITERAL_POOL_GENERATOR;\n          }\n\n          if (context_p->token.type == LEXER_LEFT_SQUARE)\n          {\n            if (literal_pool_flags != SCANNER_LITERAL_POOL_FUNCTION)\n            {\n              parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PROPERTY);\n            }\n\n            parser_stack_push_uint8 (context_p, SCANNER_FROM_LITERAL_POOL_TO_COMPUTED (literal_pool_flags));\n            scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n            break;\n          }\n\n          if (context_p->token.type == LEXER_LITERAL)\n          {\n            lexer_scan_identifier (context_p);\n            identifier_found = true;\n          }\n\n          if (!identifier_found)\n          {\n            scanner_raise_error (context_p);\n          }\n\n          if (context_p->token.type == LEXER_LEFT_PAREN)\n          {\n            if (literal_pool_flags & SCANNER_LITERAL_POOL_GENERATOR)\n            {\n              context_p->status_flags |= PARSER_IS_GENERATOR_FUNCTION;\n            }\n\n            parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PROPERTY);\n            scanner_push_literal_pool (context_p, &scanner_context, literal_pool_flags);\n            continue;\n          }\n\n          if (literal_pool_flags != SCANNER_LITERAL_POOL_FUNCTION)\n          {\n            scanner_raise_error (context_p);\n          }\n\n          if (context_p->token.type == LEXER_ASSIGN)\n          {\n            scanner_push_class_field_initializer (context_p, &scanner_context);\n            break;\n          }\n\n          if (context_p->token.type == LEXER_SEMICOLON)\n          {\n            scanner_context.mode = SCAN_MODE_CLASS_BODY;\n            continue;\n          }\n\n          if (context_p->token.type != LEXER_RIGHT_BRACE\n              && !(context_p->token.flags & LEXER_WAS_NEWLINE))\n          {\n            scanner_raise_error (context_p);\n          }\n\n          scanner_context.mode = SCAN_MODE_CLASS_BODY_NO_SCAN;\n          continue;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case SCAN_MODE_POST_PRIMARY_EXPRESSION:\n        {\n          if (scanner_scan_post_primary_expression (context_p, &scanner_context, type, stack_top))\n          {\n            break;\n          }\n          type = (lexer_token_type_t) context_p->token.type;\n          /* FALLTHRU */\n        }\n        case SCAN_MODE_PRIMARY_EXPRESSION_END:\n        {\n          if (scanner_scan_primary_expression_end (context_p, &scanner_context, type, stack_top) != SCAN_NEXT_TOKEN)\n          {\n            continue;\n          }\n          break;\n        }\n        case SCAN_MODE_STATEMENT_OR_TERMINATOR:\n        {\n          if (type == LEXER_RIGHT_BRACE || type == LEXER_EOS)\n          {\n            scanner_context.mode = SCAN_MODE_STATEMENT_END;\n            continue;\n          }\n          /* FALLTHRU */\n        }\n        case SCAN_MODE_STATEMENT:\n        {\n          if (scanner_scan_statement (context_p, &scanner_context, type, stack_top) != SCAN_NEXT_TOKEN)\n          {\n            continue;\n          }\n          break;\n        }\n        case SCAN_MODE_STATEMENT_END:\n        {\n          if (scanner_scan_statement_end (context_p, &scanner_context, type) != SCAN_NEXT_TOKEN)\n          {\n            continue;\n          }\n\n          if (context_p->token.type == LEXER_EOS)\n          {\n            goto scan_completed;\n          }\n\n          break;\n        }\n        case SCAN_MODE_VAR_STATEMENT:\n        {\n#if ENABLED (JERRY_ESNEXT)\n          if (type == LEXER_LEFT_SQUARE || type == LEXER_LEFT_BRACE)\n          {\n            uint8_t binding_type = SCANNER_BINDING_VAR;\n\n            if (stack_top == SCAN_STACK_LET || stack_top == SCAN_STACK_FOR_LET_START)\n            {\n              binding_type = SCANNER_BINDING_LET;\n            }\n            else if (stack_top == SCAN_STACK_CONST || stack_top == SCAN_STACK_FOR_CONST_START)\n            {\n              binding_type = SCANNER_BINDING_CONST;\n            }\n\n            scanner_push_destructuring_pattern (context_p, &scanner_context, binding_type, false);\n\n            if (type == LEXER_LEFT_SQUARE)\n            {\n              parser_stack_push_uint8 (context_p, SCAN_STACK_ARRAY_LITERAL);\n              scanner_context.mode = SCAN_MODE_BINDING;\n              break;\n            }\n\n            parser_stack_push_uint8 (context_p, 0);\n            parser_stack_push_uint8 (context_p, SCAN_STACK_OBJECT_LITERAL);\n            scanner_context.mode = SCAN_MODE_PROPERTY_NAME;\n            continue;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          if (type != LEXER_LITERAL\n              || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n          {\n            scanner_raise_error (context_p);\n          }\n\n          lexer_lit_location_t *literal_p = scanner_add_literal (context_p, &scanner_context);\n\n#if ENABLED (JERRY_ESNEXT)\n          if (stack_top != SCAN_STACK_VAR && stack_top != SCAN_STACK_FOR_VAR_START)\n          {\n            scanner_detect_invalid_let (context_p, literal_p);\n\n            if (stack_top == SCAN_STACK_LET || stack_top == SCAN_STACK_FOR_LET_START)\n            {\n              literal_p->type |= SCANNER_LITERAL_IS_LET;\n            }\n            else\n            {\n              JERRY_ASSERT (stack_top == SCAN_STACK_CONST || stack_top == SCAN_STACK_FOR_CONST_START);\n              literal_p->type |= SCANNER_LITERAL_IS_CONST;\n            }\n\n            lexer_next_token (context_p);\n\n            if (literal_p->type & SCANNER_LITERAL_IS_USED)\n            {\n              literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n            }\n            else if (context_p->token.type == LEXER_ASSIGN)\n            {\n              scanner_binding_literal_t binding_literal;\n              binding_literal.literal_p = literal_p;\n\n              parser_stack_push (context_p, &binding_literal, sizeof (scanner_binding_literal_t));\n              parser_stack_push_uint8 (context_p, SCAN_STACK_BINDING_INIT);\n            }\n          }\n          else\n          {\n            if (!(literal_p->type & SCANNER_LITERAL_IS_VAR))\n            {\n              scanner_detect_invalid_var (context_p, &scanner_context, literal_p);\n              literal_p->type |= SCANNER_LITERAL_IS_VAR;\n\n              if (scanner_context.active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_WITH)\n              {\n                literal_p->type |= SCANNER_LITERAL_NO_REG;\n              }\n            }\n\n            lexer_next_token (context_p);\n          }\n#else /* !ENABLED (JERRY_ESNEXT) */\n          literal_p->type |= SCANNER_LITERAL_IS_VAR;\n\n          if (scanner_context.active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_WITH)\n          {\n            literal_p->type |= SCANNER_LITERAL_NO_REG;\n          }\n\n          lexer_next_token (context_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n          if (scanner_context.active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_EXPORT)\n          {\n            literal_p->type |= SCANNER_LITERAL_NO_REG;\n          }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n          switch (context_p->token.type)\n          {\n            case LEXER_ASSIGN:\n            {\n              scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n              /* FALLTHRU */\n            }\n            case LEXER_COMMA:\n            {\n              lexer_next_token (context_p);\n              continue;\n            }\n          }\n\n          if (SCANNER_IS_FOR_START (stack_top))\n          {\n#if ENABLED (JERRY_MODULE_SYSTEM)\n            JERRY_ASSERT (!(scanner_context.active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_EXPORT));\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n            if (context_p->token.type != LEXER_SEMICOLON\n                && context_p->token.type != LEXER_KEYW_IN\n                && !SCANNER_IDENTIFIER_IS_OF ())\n            {\n              scanner_raise_error (context_p);\n            }\n\n            scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n            continue;\n          }\n\n#if ENABLED (JERRY_ESNEXT)\n          JERRY_ASSERT (stack_top == SCAN_STACK_VAR || stack_top == SCAN_STACK_LET || stack_top == SCAN_STACK_CONST);\n#else /* !ENABLED (JERRY_ESNEXT) */\n          JERRY_ASSERT (stack_top == SCAN_STACK_VAR);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n          scanner_context.active_literal_pool_p->status_flags &= (uint16_t) ~SCANNER_LITERAL_POOL_IN_EXPORT;\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n          scanner_context.mode = SCAN_MODE_STATEMENT_END;\n          parser_stack_pop_uint8 (context_p);\n          continue;\n        }\n        case SCAN_MODE_FUNCTION_ARGUMENTS:\n        {\n          JERRY_ASSERT (stack_top == SCAN_STACK_SCRIPT_FUNCTION\n                        || stack_top == SCAN_STACK_FUNCTION_STATEMENT\n                        || stack_top == SCAN_STACK_FUNCTION_EXPRESSION\n                        || stack_top == SCAN_STACK_FUNCTION_PROPERTY);\n\n          scanner_literal_pool_t *literal_pool_p = scanner_context.active_literal_pool_p;\n\n          JERRY_ASSERT (literal_pool_p != NULL && (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_FUNCTION));\n\n          literal_pool_p->source_p = context_p->source_p;\n\n#if ENABLED (JERRY_ESNEXT)\n          if (JERRY_UNLIKELY (scanner_context.async_source_p != NULL))\n          {\n            literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_ASYNC;\n            literal_pool_p->source_p = scanner_context.async_source_p;\n            scanner_context.async_source_p = NULL;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          if (type != LEXER_LEFT_PAREN)\n          {\n            scanner_raise_error (context_p);\n          }\n          lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n          /* FALLTHRU */\n        }\n        case SCAN_MODE_CONTINUE_FUNCTION_ARGUMENTS:\n        {\n          if (context_p->token.type != LEXER_RIGHT_PAREN && context_p->token.type != LEXER_EOS)\n          {\n            lexer_lit_location_t *argument_literal_p;\n\n            do\n            {\n              if (context_p->token.type == LEXER_THREE_DOTS)\n              {\n                scanner_context.active_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_HAS_COMPLEX_ARGUMENT;\n                lexer_next_token (context_p);\n              }\n\n              if (context_p->token.type == LEXER_LEFT_SQUARE || context_p->token.type == LEXER_LEFT_BRACE)\n              {\n                argument_literal_p = NULL;\n                break;\n              }\n\n              if (context_p->token.type != LEXER_LITERAL\n                  || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n              {\n                scanner_raise_error (context_p);\n              }\n\n              argument_literal_p = scanner_append_argument (context_p, &scanner_context);\n              lexer_next_token (context_p);\n\n              if (context_p->token.type != LEXER_COMMA)\n              {\n                break;\n              }\n\n              lexer_next_token (context_p);\n            }\n            while (context_p->token.type != LEXER_RIGHT_PAREN && context_p->token.type != LEXER_EOS);\n\n            if (argument_literal_p == NULL)\n            {\n              scanner_context.active_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_HAS_COMPLEX_ARGUMENT;\n\n              parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PARAMETERS);\n              scanner_append_hole (context_p, &scanner_context);\n              scanner_push_destructuring_pattern (context_p, &scanner_context, SCANNER_BINDING_ARG, false);\n\n              if (context_p->token.type == LEXER_LEFT_SQUARE)\n              {\n                parser_stack_push_uint8 (context_p, SCAN_STACK_ARRAY_LITERAL);\n                scanner_context.mode = SCAN_MODE_BINDING;\n                break;\n              }\n\n              parser_stack_push_uint8 (context_p, 0);\n              parser_stack_push_uint8 (context_p, SCAN_STACK_OBJECT_LITERAL);\n              scanner_context.mode = SCAN_MODE_PROPERTY_NAME;\n              continue;\n            }\n\n            if (context_p->token.type == LEXER_ASSIGN)\n            {\n              scanner_context.active_literal_pool_p->status_flags |= SCANNER_LITERAL_POOL_HAS_COMPLEX_ARGUMENT;\n\n              parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PARAMETERS);\n              scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n              if (argument_literal_p->type & SCANNER_LITERAL_IS_USED)\n              {\n                JERRY_ASSERT (argument_literal_p->type & SCANNER_LITERAL_EARLY_CREATE);\n                break;\n              }\n\n              scanner_binding_literal_t binding_literal;\n              binding_literal.literal_p = argument_literal_p;\n\n              parser_stack_push (context_p, &binding_literal, sizeof (scanner_binding_literal_t));\n              parser_stack_push_uint8 (context_p, SCAN_STACK_BINDING_INIT);\n              break;\n            }\n          }\n#else /* !ENABLED (JERRY_ESNEXT) */\n          if (context_p->token.type != LEXER_RIGHT_PAREN && context_p->token.type != LEXER_EOS)\n          {\n            while (true)\n            {\n              if (context_p->token.type != LEXER_LITERAL\n                  || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n              {\n                scanner_raise_error (context_p);\n              }\n\n              scanner_append_argument (context_p, &scanner_context);\n              lexer_next_token (context_p);\n\n              if (context_p->token.type != LEXER_COMMA)\n              {\n                break;\n              }\n\n              lexer_next_token (context_p);\n            }\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          if (context_p->token.type == LEXER_EOS && stack_top == SCAN_STACK_SCRIPT_FUNCTION)\n          {\n            /* End of argument parsing. */\n            scanner_info_t *scanner_info_p = (scanner_info_t *) scanner_malloc (context_p, sizeof (scanner_info_t));\n            scanner_info_p->next_p = context_p->next_scanner_info_p;\n            scanner_info_p->source_p = NULL;\n            scanner_info_p->type = SCANNER_TYPE_END_ARGUMENTS;\n            scanner_context.end_arguments_p = scanner_info_p;\n\n            context_p->next_scanner_info_p = scanner_info_p;\n            context_p->source_p = source_p;\n            context_p->source_end_p = source_end_p;\n            context_p->line = 1;\n            context_p->column = 1;\n\n#if ENABLED (JERRY_ESNEXT)\n            scanner_filter_arguments (context_p, &scanner_context);\n#endif /* ENABLED (JERRY_ESNEXT) */\n            lexer_next_token (context_p);\n            scanner_check_directives (context_p, &scanner_context);\n            continue;\n          }\n\n          if (context_p->token.type != LEXER_RIGHT_PAREN)\n          {\n            scanner_raise_error (context_p);\n          }\n\n          lexer_next_token (context_p);\n\n          if (context_p->token.type != LEXER_LEFT_BRACE)\n          {\n            scanner_raise_error (context_p);\n          }\n\n#if ENABLED (JERRY_ESNEXT)\n          scanner_filter_arguments (context_p, &scanner_context);\n#endif /* ENABLED (JERRY_ESNEXT) */\n          lexer_next_token (context_p);\n          scanner_check_directives (context_p, &scanner_context);\n          continue;\n        }\n        case SCAN_MODE_PROPERTY_NAME:\n        {\n          JERRY_ASSERT (stack_top == SCAN_STACK_OBJECT_LITERAL);\n\n          if (lexer_scan_identifier (context_p))\n          {\n            lexer_check_property_modifier (context_p);\n          }\n\n#if ENABLED (JERRY_ESNEXT)\n          if (context_p->token.type == LEXER_LEFT_SQUARE)\n          {\n            parser_stack_push_uint8 (context_p, SCAN_STACK_COMPUTED_PROPERTY);\n            scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n            break;\n          }\n\n          if (context_p->token.type == LEXER_THREE_DOTS)\n          {\n            *parser_stack_get_prev_uint8 (context_p) |= SCANNER_LITERAL_OBJECT_HAS_REST;\n            scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n            if (scanner_context.binding_type != SCANNER_BINDING_NONE)\n            {\n              scanner_context.mode = SCAN_MODE_BINDING;\n            }\n            break;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          if (context_p->token.type == LEXER_RIGHT_BRACE)\n          {\n            scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n            continue;\n          }\n\n          if (context_p->token.type == LEXER_PROPERTY_GETTER\n#if ENABLED (JERRY_ESNEXT)\n              || context_p->token.type == LEXER_KEYW_ASYNC\n              || context_p->token.type == LEXER_MULTIPLY\n#endif /* ENABLED (JERRY_ESNEXT) */\n              || context_p->token.type == LEXER_PROPERTY_SETTER)\n          {\n            uint16_t literal_pool_flags = SCANNER_LITERAL_POOL_FUNCTION;\n\n#if ENABLED (JERRY_ESNEXT)\n            if (context_p->token.type == LEXER_MULTIPLY)\n            {\n              literal_pool_flags |= SCANNER_LITERAL_POOL_GENERATOR;\n            }\n            else if (context_p->token.type == LEXER_KEYW_ASYNC)\n            {\n              literal_pool_flags |= SCANNER_LITERAL_POOL_ASYNC;\n\n              if (lexer_consume_generator (context_p))\n              {\n                literal_pool_flags |= SCANNER_LITERAL_POOL_GENERATOR;\n              }\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n            parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PROPERTY);\n            lexer_scan_identifier (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n            if (context_p->token.type == LEXER_LEFT_SQUARE)\n            {\n              parser_stack_push_uint8 (context_p, SCANNER_FROM_LITERAL_POOL_TO_COMPUTED (literal_pool_flags));\n              scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n              break;\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n            if (context_p->token.type != LEXER_LITERAL)\n            {\n              scanner_raise_error (context_p);\n            }\n\n            scanner_push_literal_pool (context_p, &scanner_context, literal_pool_flags);\n            scanner_context.mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n            break;\n          }\n\n          if (context_p->token.type != LEXER_LITERAL)\n          {\n            scanner_raise_error (context_p);\n          }\n\n#if ENABLED (JERRY_ESNEXT)\n          parser_line_counter_t start_line = context_p->token.line;\n          parser_line_counter_t start_column = context_p->token.column;\n          bool is_ident = (context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          lexer_next_token (context_p);\n\n#if ENABLED (JERRY_ESNEXT)\n          if (context_p->token.type == LEXER_LEFT_PAREN)\n          {\n            scanner_push_literal_pool (context_p, &scanner_context, SCANNER_LITERAL_POOL_FUNCTION);\n\n            parser_stack_push_uint8 (context_p, SCAN_STACK_FUNCTION_PROPERTY);\n            scanner_context.mode = SCAN_MODE_FUNCTION_ARGUMENTS;\n            continue;\n          }\n\n          if (is_ident\n              && (context_p->token.type == LEXER_COMMA\n                  || context_p->token.type == LEXER_RIGHT_BRACE\n                  || context_p->token.type == LEXER_ASSIGN))\n          {\n            context_p->source_p = context_p->token.lit_location.char_p;\n            context_p->line = start_line;\n            context_p->column = start_column;\n\n            lexer_next_token (context_p);\n\n            JERRY_ASSERT (context_p->token.type != LEXER_LITERAL\n                          || context_p->token.lit_location.type == LEXER_IDENT_LITERAL);\n\n            if (context_p->token.type != LEXER_LITERAL)\n            {\n              scanner_raise_error (context_p);\n            }\n\n            if (scanner_context.binding_type != SCANNER_BINDING_NONE)\n            {\n              scanner_context.mode = SCAN_MODE_BINDING;\n              continue;\n            }\n\n            scanner_add_reference (context_p, &scanner_context);\n\n            lexer_next_token (context_p);\n\n            if (context_p->token.type == LEXER_ASSIGN)\n            {\n              scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n              break;\n            }\n\n            scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION_END;\n            continue;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          if (context_p->token.type != LEXER_COLON)\n          {\n            scanner_raise_error (context_p);\n          }\n\n          scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n\n#if ENABLED (JERRY_ESNEXT)\n          if (scanner_context.binding_type != SCANNER_BINDING_NONE)\n          {\n            scanner_context.mode = SCAN_MODE_BINDING;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          break;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case SCAN_MODE_BINDING:\n        {\n          JERRY_ASSERT (scanner_context.binding_type == SCANNER_BINDING_VAR\n                        || scanner_context.binding_type == SCANNER_BINDING_LET\n                        || scanner_context.binding_type == SCANNER_BINDING_CATCH\n                        || scanner_context.binding_type == SCANNER_BINDING_CONST\n                        || scanner_context.binding_type == SCANNER_BINDING_ARG\n                        || scanner_context.binding_type == SCANNER_BINDING_ARROW_ARG);\n\n          if (type == LEXER_THREE_DOTS)\n          {\n            lexer_next_token (context_p);\n            type = (lexer_token_type_t) context_p->token.type;\n          }\n\n          if (type == LEXER_LEFT_SQUARE || type == LEXER_LEFT_BRACE)\n          {\n            scanner_push_destructuring_pattern (context_p, &scanner_context, scanner_context.binding_type, true);\n\n            if (type == LEXER_LEFT_SQUARE)\n            {\n              parser_stack_push_uint8 (context_p, SCAN_STACK_ARRAY_LITERAL);\n              break;\n            }\n\n            parser_stack_push_uint8 (context_p, 0);\n            parser_stack_push_uint8 (context_p, SCAN_STACK_OBJECT_LITERAL);\n            scanner_context.mode = SCAN_MODE_PROPERTY_NAME;\n            continue;\n          }\n\n          if (type != LEXER_LITERAL || context_p->token.lit_location.type != LEXER_IDENT_LITERAL)\n          {\n            scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n            continue;\n          }\n\n          lexer_lit_location_t *literal_p = scanner_add_literal (context_p, &scanner_context);\n\n          scanner_context.mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;\n\n          if (scanner_context.binding_type == SCANNER_BINDING_VAR)\n          {\n            if (!(literal_p->type & SCANNER_LITERAL_IS_VAR))\n            {\n              scanner_detect_invalid_var (context_p, &scanner_context, literal_p);\n              literal_p->type |= SCANNER_LITERAL_IS_VAR;\n\n              if (scanner_context.active_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_WITH)\n              {\n                literal_p->type |= SCANNER_LITERAL_NO_REG;\n              }\n            }\n            break;\n          }\n\n          if (scanner_context.binding_type == SCANNER_BINDING_ARROW_ARG)\n          {\n            literal_p->type |= SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_IS_ARROW_DESTRUCTURED_ARG;\n\n            if (literal_p->type & SCANNER_LITERAL_IS_USED)\n            {\n              literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n              break;\n            }\n          }\n          else\n          {\n            scanner_detect_invalid_let (context_p, literal_p);\n\n            if (scanner_context.binding_type <= SCANNER_BINDING_CATCH)\n            {\n              JERRY_ASSERT ((scanner_context.binding_type == SCANNER_BINDING_LET)\n                            || (scanner_context.binding_type == SCANNER_BINDING_CATCH));\n\n              literal_p->type |= SCANNER_LITERAL_IS_LET;\n            }\n            else\n            {\n              literal_p->type |= SCANNER_LITERAL_IS_CONST;\n\n              if (scanner_context.binding_type == SCANNER_BINDING_ARG)\n              {\n                literal_p->type |= SCANNER_LITERAL_IS_ARG;\n\n                if (literal_p->type & SCANNER_LITERAL_IS_USED)\n                {\n                  literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n                  break;\n                }\n              }\n            }\n\n            if (literal_p->type & SCANNER_LITERAL_IS_USED)\n            {\n              literal_p->type |= SCANNER_LITERAL_EARLY_CREATE;\n              break;\n            }\n          }\n\n          scanner_binding_item_t *binding_item_p;\n          binding_item_p = (scanner_binding_item_t *) scanner_malloc (context_p, sizeof (scanner_binding_item_t));\n\n          binding_item_p->next_p = scanner_context.active_binding_list_p->items_p;\n          binding_item_p->literal_p = literal_p;\n\n          scanner_context.active_binding_list_p->items_p = binding_item_p;\n\n          lexer_next_token (context_p);\n          if (context_p->token.type != LEXER_ASSIGN)\n          {\n            continue;\n          }\n\n          scanner_binding_literal_t binding_literal;\n          binding_literal.literal_p = literal_p;\n\n          parser_stack_push (context_p, &binding_literal, sizeof (scanner_binding_literal_t));\n          parser_stack_push_uint8 (context_p, SCAN_STACK_BINDING_INIT);\n\n          scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n\n      lexer_next_token (context_p);\n    }\n\nscan_completed:\n    if (context_p->stack_top_uint8 != SCAN_STACK_SCRIPT\n        && context_p->stack_top_uint8 != SCAN_STACK_SCRIPT_FUNCTION)\n    {\n      scanner_raise_error (context_p);\n    }\n\n    scanner_pop_literal_pool (context_p, &scanner_context);\n\n#if ENABLED (JERRY_ESNEXT)\n    JERRY_ASSERT (scanner_context.active_binding_list_p == NULL);\n#endif /* ENABLED (JERRY_ESNEXT) */\n    JERRY_ASSERT (scanner_context.active_literal_pool_p == NULL);\n\n#ifndef JERRY_NDEBUG\n    scanner_context.context_status_flags |= PARSER_SCANNING_SUCCESSFUL;\n#endif /* !JERRY_NDEBUG */\n  }\n  PARSER_CATCH\n  {\n#if ENABLED (JERRY_ESNEXT)\n    while (scanner_context.active_binding_list_p != NULL)\n    {\n      scanner_pop_binding_list (&scanner_context);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (JERRY_UNLIKELY (context_p->error != PARSER_ERR_OUT_OF_MEMORY))\n    {\n      /* Ignore the errors thrown by the lexer. */\n      context_p->error = PARSER_ERR_NO_ERROR;\n\n      /* The following code may allocate memory, so it is enclosed in a try/catch. */\n      PARSER_TRY (context_p->try_buffer)\n      {\n#if ENABLED (JERRY_ESNEXT)\n        if (scanner_context.status_flags & SCANNER_CONTEXT_THROW_ERR_ASYNC_FUNCTION)\n        {\n          JERRY_ASSERT (scanner_context.async_source_p != NULL);\n\n          scanner_info_t *info_p;\n          info_p = scanner_insert_info (context_p, scanner_context.async_source_p, sizeof (scanner_info_t));\n          info_p->type = SCANNER_TYPE_ERR_ASYNC_FUNCTION;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        while (scanner_context.active_literal_pool_p != NULL)\n        {\n          scanner_pop_literal_pool (context_p, &scanner_context);\n        }\n      }\n      PARSER_CATCH\n      {\n        JERRY_ASSERT (context_p->error == PARSER_ERR_OUT_OF_MEMORY);\n      }\n      PARSER_TRY_END\n    }\n\n    JERRY_ASSERT (context_p->error == PARSER_ERR_NO_ERROR || context_p->error == PARSER_ERR_OUT_OF_MEMORY);\n\n    if (context_p->error == PARSER_ERR_OUT_OF_MEMORY)\n    {\n      while (scanner_context.active_literal_pool_p != NULL)\n      {\n        scanner_literal_pool_t *literal_pool_p = scanner_context.active_literal_pool_p;\n\n        scanner_context.active_literal_pool_p = literal_pool_p->prev_p;\n\n        parser_list_free (&literal_pool_p->literal_pool);\n        scanner_free (literal_pool_p, sizeof (scanner_literal_pool_t));\n      }\n\n      parser_stack_free (context_p);\n      return;\n    }\n  }\n  PARSER_TRY_END\n\n  context_p->status_flags = scanner_context.context_status_flags;\n#if ENABLED (JERRY_ESNEXT)\n  context_p->global_status_flags &= (uint32_t) ~ECMA_PARSE_INTERNAL_PRE_SCANNING;\n#endif /* ENABLED (JERRY_ESNEXT) */\n  scanner_reverse_info_list (context_p);\n\n#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)\n  if (context_p->is_show_opcodes)\n  {\n    scanner_info_t *info_p = context_p->next_scanner_info_p;\n    const uint8_t *source_start_p = (arg_list_p == NULL) ? source_p : arg_list_p;\n\n    while (info_p->type != SCANNER_TYPE_END)\n    {\n      const char *name_p = NULL;\n      bool print_location = false;\n\n      switch (info_p->type)\n      {\n        case SCANNER_TYPE_END_ARGUMENTS:\n        {\n          JERRY_DEBUG_MSG (\"  END_ARGUMENTS\\n\");\n          source_start_p = source_p;\n          break;\n        }\n        case SCANNER_TYPE_FUNCTION:\n        case SCANNER_TYPE_BLOCK:\n        {\n          const uint8_t *prev_source_p = info_p->source_p - 1;\n          const uint8_t *data_p;\n\n          if (info_p->type == SCANNER_TYPE_FUNCTION)\n          {\n            data_p = (const uint8_t *) (info_p + 1);\n\n            JERRY_DEBUG_MSG (\"  FUNCTION: flags: 0x%x declarations: %d\",\n                             (int) info_p->u8_arg,\n                             (int) info_p->u16_arg);\n          }\n          else\n          {\n            data_p = (const uint8_t *) (info_p + 1);\n\n            JERRY_DEBUG_MSG (\"  BLOCK:\");\n          }\n\n          JERRY_DEBUG_MSG (\" source:%d\\n\", (int) (info_p->source_p - source_start_p));\n\n          while (data_p[0] != SCANNER_STREAM_TYPE_END)\n          {\n            switch (data_p[0] & SCANNER_STREAM_TYPE_MASK)\n            {\n              case SCANNER_STREAM_TYPE_HOLE:\n              {\n                JERRY_DEBUG_MSG (\"    HOLE\\n\");\n                data_p++;\n                continue;\n              }\n#if ENABLED (JERRY_ESNEXT)\n              case SCANNER_STREAM_TYPE_ARGUMENTS:\n              {\n                JERRY_DEBUG_MSG (\"    ARGUMENTS%s%s\\n\",\n                                 (data_p[0] & SCANNER_STREAM_NO_REG) ? \" *\" : \"\",\n                                 (data_p[0] & SCANNER_STREAM_LOCAL_ARGUMENTS) ? \" L\" : \"\");\n                data_p++;\n                continue;\n              }\n              case SCANNER_STREAM_TYPE_ARGUMENTS_FUNC:\n              {\n                JERRY_DEBUG_MSG (\"    ARGUMENTS_FUNC%s%s\\n\",\n                                 (data_p[0] & SCANNER_STREAM_NO_REG) ? \" *\" : \"\",\n                                 (data_p[0] & SCANNER_STREAM_LOCAL_ARGUMENTS) ? \" L\" : \"\");\n                data_p++;\n                continue;\n              }\n#else /* !ENABLED (JERRY_ESNEXT) */\n              case SCANNER_STREAM_TYPE_ARGUMENTS:\n              {\n                JERRY_DEBUG_MSG (\"    ARGUMENTS%s\\n\",\n                                 (data_p[0] & SCANNER_STREAM_NO_REG) ? \" *\" : \"\");\n                data_p++;\n                continue;\n              }\n#endif /* ENABLED (JERRY_ESNEXT) */\n              case SCANNER_STREAM_TYPE_VAR:\n              {\n                JERRY_DEBUG_MSG (\"    VAR \");\n                break;\n              }\n#if ENABLED (JERRY_ESNEXT)\n              case SCANNER_STREAM_TYPE_LET:\n              {\n                JERRY_DEBUG_MSG (\"    LET \");\n                break;\n              }\n              case SCANNER_STREAM_TYPE_CONST:\n              {\n                JERRY_DEBUG_MSG (\"    CONST \");\n                break;\n              }\n              case SCANNER_STREAM_TYPE_LOCAL:\n              {\n                JERRY_DEBUG_MSG (\"    LOCAL \");\n                break;\n              }\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n              case SCANNER_STREAM_TYPE_IMPORT:\n              {\n                JERRY_DEBUG_MSG (\"    IMPORT \");\n                break;\n              }\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n              case SCANNER_STREAM_TYPE_ARG:\n              {\n                JERRY_DEBUG_MSG (\"    ARG \");\n                break;\n              }\n#if ENABLED (JERRY_ESNEXT)\n              case SCANNER_STREAM_TYPE_ARG_VAR:\n              {\n                JERRY_DEBUG_MSG (\"    ARG_VAR \");\n                break;\n              }\n              case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG:\n              {\n                JERRY_DEBUG_MSG (\"    DESTRUCTURED_ARG \");\n                break;\n              }\n              case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR:\n              {\n                JERRY_DEBUG_MSG (\"    DESTRUCTURED_ARG_VAR \");\n                break;\n              }\n#endif /* ENABLED (JERRY_ESNEXT) */\n              case SCANNER_STREAM_TYPE_ARG_FUNC:\n              {\n                JERRY_DEBUG_MSG (\"    ARG_FUNC \");\n                break;\n              }\n#if ENABLED (JERRY_ESNEXT)\n              case SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC:\n              {\n                JERRY_DEBUG_MSG (\"    DESTRUCTURED_ARG_FUNC \");\n                break;\n              }\n#endif /* ENABLED (JERRY_ESNEXT) */\n              case SCANNER_STREAM_TYPE_FUNC:\n              {\n                JERRY_DEBUG_MSG (\"    FUNC \");\n                break;\n              }\n              default:\n              {\n                JERRY_UNREACHABLE ();\n                data_p++;\n                continue;\n              }\n            }\n\n            size_t length;\n\n            if (!(data_p[0] & SCANNER_STREAM_UINT16_DIFF))\n            {\n              if (data_p[2] != 0)\n              {\n                prev_source_p += data_p[2];\n                length = 2 + 1;\n              }\n              else\n              {\n                memcpy (&prev_source_p, data_p + 2 + 1, sizeof (const uint8_t *));\n                length = 2 + 1 + sizeof (const uint8_t *);\n              }\n            }\n            else\n            {\n              int32_t diff = ((int32_t) data_p[2]) | ((int32_t) data_p[3]) << 8;\n\n              if (diff <= UINT8_MAX)\n              {\n                diff = -diff;\n              }\n\n              prev_source_p += diff;\n              length = 2 + 2;\n            }\n\n#if ENABLED (JERRY_ESNEXT)\n            if (data_p[0] & SCANNER_STREAM_EARLY_CREATE)\n            {\n              JERRY_ASSERT (data_p[0] & SCANNER_STREAM_NO_REG);\n              JERRY_DEBUG_MSG (\"*\");\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n            if (data_p[0] & SCANNER_STREAM_NO_REG)\n            {\n              JERRY_DEBUG_MSG (\"* \");\n            }\n\n            JERRY_DEBUG_MSG (\"'%.*s'\\n\", data_p[1], (char *) prev_source_p);\n            prev_source_p += data_p[1];\n            data_p += length;\n          }\n          break;\n        }\n        case SCANNER_TYPE_WHILE:\n        {\n          name_p = \"WHILE\";\n          print_location = true;\n          break;\n        }\n        case SCANNER_TYPE_FOR:\n        {\n          scanner_for_info_t *for_info_p = (scanner_for_info_t *) info_p;\n          JERRY_DEBUG_MSG (\"  FOR: source:%d expression:%d[%d:%d] end:%d[%d:%d]\\n\",\n                           (int) (for_info_p->info.source_p - source_start_p),\n                           (int) (for_info_p->expression_location.source_p - source_start_p),\n                           (int) for_info_p->expression_location.line,\n                           (int) for_info_p->expression_location.column,\n                           (int) (for_info_p->end_location.source_p - source_start_p),\n                           (int) for_info_p->end_location.line,\n                           (int) for_info_p->end_location.column);\n          break;\n        }\n        case SCANNER_TYPE_FOR_IN:\n        {\n          name_p = \"FOR-IN\";\n          print_location = true;\n          break;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case SCANNER_TYPE_FOR_OF:\n        {\n          name_p = \"FOR-OF\";\n          print_location = true;\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case SCANNER_TYPE_SWITCH:\n        {\n          JERRY_DEBUG_MSG (\"  SWITCH: source:%d\\n\",\n                           (int) (info_p->source_p - source_start_p));\n\n          scanner_case_info_t *current_case_p = ((scanner_switch_info_t *) info_p)->case_p;\n\n          while (current_case_p != NULL)\n          {\n            JERRY_DEBUG_MSG (\"    CASE: location:%d[%d:%d]\\n\",\n                             (int) (current_case_p->location.source_p - source_start_p),\n                             (int) current_case_p->location.line,\n                             (int) current_case_p->location.column);\n\n            current_case_p = current_case_p->next_p;\n          }\n          break;\n        }\n        case SCANNER_TYPE_CASE:\n        {\n          name_p = \"CASE\";\n          print_location = true;\n          break;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case SCANNER_TYPE_INITIALIZER:\n        {\n          scanner_location_info_t *location_info_p = (scanner_location_info_t *) info_p;\n          JERRY_DEBUG_MSG (\"  INITIALIZER: flags: 0x%x source:%d location:%d[%d:%d]\\n\",\n                           (int) info_p->u8_arg,\n                           (int) (location_info_p->info.source_p - source_start_p),\n                           (int) (location_info_p->location.source_p - source_start_p),\n                           (int) location_info_p->location.line,\n                           (int) location_info_p->location.column);\n          break;\n        }\n        case SCANNER_TYPE_CLASS_CONSTRUCTOR:\n        {\n          JERRY_DEBUG_MSG (\"  CLASS_CONSTRUCTOR: source:%d\\n\",\n                           (int) (info_p->source_p - source_start_p));\n          print_location = false;\n          break;\n        }\n        case SCANNER_TYPE_CLASS_FIELD_INITIALIZER_END:\n        {\n          name_p = \"SCANNER_TYPE_CLASS_FIELD_INITIALIZER_END\";\n          print_location = true;\n          break;\n        }\n        case SCANNER_TYPE_LET_EXPRESSION:\n        {\n          JERRY_DEBUG_MSG (\"  LET_EXPRESSION: source:%d\\n\",\n                           (int) (info_p->source_p - source_start_p));\n          break;\n        }\n        case SCANNER_TYPE_ERR_REDECLARED:\n        {\n          JERRY_DEBUG_MSG (\"  ERR_REDECLARED: source:%d\\n\",\n                           (int) (info_p->source_p - source_start_p));\n          break;\n        }\n        case SCANNER_TYPE_ERR_ASYNC_FUNCTION:\n        {\n          JERRY_DEBUG_MSG (\"  ERR_ASYNC_FUNCTION: source:%d\\n\",\n                           (int) (info_p->source_p - source_start_p));\n          break;\n        }\n        case SCANNER_TYPE_LITERAL_FLAGS:\n        {\n          JERRY_DEBUG_MSG (\"  SCANNER_TYPE_LITERAL_FLAGS: flags: 0x%x source:%d\\n\",\n                           (int) info_p->u8_arg,\n                           (int) (info_p->source_p - source_start_p));\n          print_location = false;\n          break;\n        }\n        case SCANNER_TYPE_EXPORT_MODULE_SPECIFIER:\n        {\n          JERRY_DEBUG_MSG (\"  EXPORT_WITH_MODULE_SPECIFIER: source:%d\\n\",\n                           (int) (info_p->source_p - source_start_p));\n          print_location = false;\n          break;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      }\n\n      if (print_location)\n      {\n        scanner_location_info_t *location_info_p = (scanner_location_info_t *) info_p;\n        JERRY_DEBUG_MSG (\"  %s: source:%d location:%d[%d:%d]\\n\",\n                         name_p,\n                         (int) (location_info_p->info.source_p - source_start_p),\n                         (int) (location_info_p->location.source_p - source_start_p),\n                         (int) location_info_p->location.line,\n                         (int) location_info_p->location.column);\n      }\n\n      info_p = info_p->next_p;\n    }\n\n    JERRY_DEBUG_MSG (\"\\n--- Scanning end ---\\n\\n\");\n  }\n#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */\n\n  parser_stack_free (context_p);\n} /* scanner_scan_all */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_PARSER) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/js/js-scanner.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JS_SCANNER_H\n#define JS_SCANNER_H\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup jsparser JavaScript\n * @{\n *\n * \\addtogroup jsparser_scanner Scanner\n * @{\n */\n\n/**\n * Allowed types for scanner_info_t structures.\n */\ntypedef enum\n{\n  SCANNER_TYPE_END, /**< mark the last info block */\n  SCANNER_TYPE_END_ARGUMENTS, /**< mark the end of function arguments\n                               *   (only present if a function script is parsed) */\n  SCANNER_TYPE_FUNCTION, /**< declarations in a function */\n  SCANNER_TYPE_BLOCK, /**< declarations in a code block (usually enclosed in {}) */\n  SCANNER_TYPE_WHILE, /**< while statement */\n  SCANNER_TYPE_FOR, /**< for statement */\n  SCANNER_TYPE_FOR_IN, /**< for-in statement */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_TYPE_FOR_OF, /**< for-of statement */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCANNER_TYPE_SWITCH, /**< switch statement */\n  SCANNER_TYPE_CASE, /**< case statement */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_TYPE_INITIALIZER, /**< destructuring binding or assignment pattern with initializer */\n  SCANNER_TYPE_LITERAL_FLAGS, /**< object or array literal with non-zero flags (stored in u8_arg) */\n  SCANNER_TYPE_CLASS_CONSTRUCTOR, /**< class constructor */\n  SCANNER_TYPE_CLASS_FIELD_INITIALIZER_END, /**< class field initializer end */\n  SCANNER_TYPE_LET_EXPRESSION, /**< let expression */\n  SCANNER_TYPE_ERR_REDECLARED, /**< syntax error: a variable is redeclared */\n  SCANNER_TYPE_ERR_ASYNC_FUNCTION, /**< an invalid async function follows */\n  SCANNER_TYPE_EXPORT_MODULE_SPECIFIER, /**< export with module specifier */\n#endif /* ENABLED (JERRY_ESNEXT) */\n} scanner_info_type_t;\n\n/**\n * Source code location which can be used to change the position of parsing.\n */\ntypedef struct\n{\n  const uint8_t *source_p; /**< next source byte */\n  parser_line_counter_t line; /**< token start line */\n  parser_line_counter_t column; /**< token start column */\n} scanner_location_t;\n\n/**\n * Source code range with its start and end position.\n */\ntypedef struct\n{\n  const uint8_t *source_end_p; /**< end position */\n  scanner_location_t start_location; /**< start location */\n} scanner_range_t;\n\n/**\n * Scanner info blocks which provides information for the parser.\n */\ntypedef struct scanner_info_t\n{\n  struct scanner_info_t *next_p; /**< next info structure */\n  const uint8_t *source_p; /**< triggering position of this scanner info */\n  uint8_t type; /**< type of the scanner info */\n  uint8_t u8_arg; /**< custom 8-bit value */\n  uint16_t u16_arg; /**< custom 16-bit value */\n} scanner_info_t;\n\n/**\n * Scanner info extended with a location.\n */\ntypedef struct\n{\n  scanner_info_t info; /**< header */\n  scanner_location_t location; /**< location */\n} scanner_location_info_t;\n\n/**\n * Scanner info for \"for\" statements.\n */\ntypedef struct\n{\n  scanner_info_t info; /**< header */\n  scanner_location_t expression_location; /**< location of expression start */\n  scanner_location_t end_location; /**< location of expression end */\n} scanner_for_info_t;\n\n/**\n * Case statement list for scanner_switch_info_t structure.\n */\ntypedef struct scanner_case_info_t\n{\n  struct scanner_case_info_t *next_p; /**< next case statement info */\n  scanner_location_t location; /**< location of case statement */\n} scanner_case_info_t;\n\n/**\n * Scanner info for \"switch\" statements.\n */\ntypedef struct\n{\n  scanner_info_t info; /**< header */\n  scanner_case_info_t *case_p; /**< list of switch cases */\n} scanner_switch_info_t;\n\n/*\n * Description of compressed streams.\n *\n * The stream is a sequence of commands which encoded as bytes. The first byte\n * contains the type of the command (see scanner_function_compressed_stream_types_t).\n *\n * The variable declaration commands has two arguments:\n *   - The first represents the length of the declared identifier\n *   - The second contains the relative distance from the end of the previous declaration\n *     Usually the distance is between 1 and 255, and represented as a single byte\n *     Distances between -256 and 65535 are encoded as two bytes\n *     Larger distances are encoded as pointers\n */\n\n/**\n * Constants for compressed streams.\n */\ntypedef enum\n{\n  SCANNER_STREAM_UINT16_DIFF = (1 << 7), /**< relative distance is between -256 and 65535 */\n  SCANNER_STREAM_HAS_ESCAPE = (1 << 6), /**< binding has escape */\n  SCANNER_STREAM_NO_REG = (1 << 5), /**< binding cannot be stored in register */\n  SCANNER_STREAM_EARLY_CREATE = (1 << 4), /**< binding must be created with ECMA_VALUE_UNINITIALIZED */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_STREAM_LOCAL_ARGUMENTS = SCANNER_STREAM_EARLY_CREATE, /**< arguments is redeclared\n                                                                 *   as let/const binding later */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  /* Update SCANNER_STREAM_TYPE_MASK macro if more bits are added. */\n} scanner_compressed_stream_flags_t;\n\n/**\n * Types for compressed streams.\n */\ntypedef enum\n{\n  SCANNER_STREAM_TYPE_END, /**< end of scanner data */\n  SCANNER_STREAM_TYPE_HOLE, /**< no name is assigned to this argument */\n  SCANNER_STREAM_TYPE_ARGUMENTS, /**< arguments object should be created */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_STREAM_TYPE_ARGUMENTS_FUNC, /**< arguments object should be created which\n                                       *   is later initialized with a function */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCANNER_STREAM_TYPE_VAR, /**< var declaration */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_STREAM_TYPE_LET, /**< let declaration */\n  SCANNER_STREAM_TYPE_CONST, /**< const declaration */\n  SCANNER_STREAM_TYPE_LOCAL, /**< local declaration (e.g. catch block) */\n#endif /* ENABLED (JERRY_ESNEXT) */\n#if ENABLED (JERRY_MODULE_SYSTEM)\n  SCANNER_STREAM_TYPE_IMPORT, /**< module import */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n  /* The next four types must be in this order (see SCANNER_STREAM_TYPE_IS_ARG). */\n  SCANNER_STREAM_TYPE_ARG, /**< argument declaration */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_STREAM_TYPE_ARG_VAR, /**< argument declaration which is later copied\n                                *   into a variable declared by var statement */\n  SCANNER_STREAM_TYPE_DESTRUCTURED_ARG, /**< destructuring argument declaration */\n  SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR, /**< destructuring argument declaration which is later\n                                             *   copied into a variable declared by var statement */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  /* Function types should be at the end. See the SCANNER_STREAM_TYPE_IS_FUNCTION macro. */\n  SCANNER_STREAM_TYPE_ARG_FUNC, /**< argument declaration which\n                                 *   is later initialized with a function */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC, /**< destructuring argument declaration which\n                                              *   is later initialized with a function */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCANNER_STREAM_TYPE_FUNC, /**< function declaration */\n} scanner_compressed_stream_types_t;\n\n/**\n * Mask for decoding the type from the compressed stream.\n */\n#define SCANNER_STREAM_TYPE_MASK 0xf\n\n/**\n * Checks whether the decoded type represents a function declaration.\n */\n#define SCANNER_STREAM_TYPE_IS_FUNCTION(type) ((type) >= SCANNER_STREAM_TYPE_ARG_FUNC)\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Checks whether the decoded type represents a function argument.\n */\n#define SCANNER_STREAM_TYPE_IS_ARG(type) \\\n  ((type) >= SCANNER_STREAM_TYPE_ARG && (type) <= SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR)\n\n/**\n * Checks whether the decoded type represents both a function argument and a function declaration.\n */\n#define SCANNER_STREAM_TYPE_IS_ARG_FUNC(type) \\\n  ((type) == SCANNER_STREAM_TYPE_ARG_FUNC || (type) == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC)\n\n/**\n * Checks whether the decoded type represents an arguments declaration\n */\n#define SCANNER_STREAM_TYPE_IS_ARGUMENTS(type) \\\n  ((type) == SCANNER_STREAM_TYPE_ARGUMENTS || (type) == SCANNER_STREAM_TYPE_ARGUMENTS_FUNC)\n\n#else /* !ENABLED (JERRY_ESNEXT) */\n\n/**\n * Checks whether the decoded type represents a function argument.\n */\n#define SCANNER_STREAM_TYPE_IS_ARG(type) ((type) == SCANNER_STREAM_TYPE_ARG)\n\n/**\n * Checks whether the decoded type represents both a function argument and a function declaration.\n */\n#define SCANNER_STREAM_TYPE_IS_ARG_FUNC(type) ((type) == SCANNER_STREAM_TYPE_ARG_FUNC)\n\n/**\n * Checks whether the decoded type represents an arguments declaration\n */\n#define SCANNER_STREAM_TYPE_IS_ARGUMENTS(type) \\\n  ((type) == SCANNER_STREAM_TYPE_ARGUMENTS)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Constants for u8_arg flags in scanner_function_info_t.\n */\ntypedef enum\n{\n  SCANNER_FUNCTION_ARGUMENTS_NEEDED = (1 << 0), /**< arguments object needs to be created */\n  SCANNER_FUNCTION_HAS_COMPLEX_ARGUMENT = (1 << 1), /**< function has complex (ES2015+) argument definition */\n#if ENABLED (JERRY_ESNEXT)\n  SCANNER_FUNCTION_LEXICAL_ENV_NEEDED = (1 << 2), /**< lexical environment is needed for the function body */\n  SCANNER_FUNCTION_STATEMENT = (1 << 3), /**< function is function statement (not arrow expression)\n                                          *   this flag must be combined with the type of function (e.g. async) */\n  SCANNER_FUNCTION_ASYNC = (1 << 4), /**< function is async function */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  SCANNER_FUNCTION_IS_STRICT = (1 << 5), /**< function is strict */\n} scanner_function_flags_t;\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Object or array literal constants for u8_arg flags in scanner_info_t.\n */\ntypedef enum\n{\n  /* These flags affects both array and object literals */\n  SCANNER_LITERAL_DESTRUCTURING_FOR = (1 << 0), /**< for loop with destructuring pattern */\n  SCANNER_LITERAL_NO_DESTRUCTURING = (1 << 1), /**< this literal cannot be a destructuring pattern */\n  /* These flags affects only object literals */\n  SCANNER_LITERAL_OBJECT_HAS_SUPER = (1 << 2), /**< super keyword is used in the object literal */\n  SCANNER_LITERAL_OBJECT_HAS_REST = (1 << 3), /**< the object literal has a member prefixed with three dots */\n} scanner_literal_flags_t;\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Option bits for scanner_create_variables function.\n */\ntypedef enum\n{\n  SCANNER_CREATE_VARS_NO_OPTS = 0, /**< no options */\n  SCANNER_CREATE_VARS_IS_SCRIPT = (1 << 0), /**< create variables for script or direct eval */\n  SCANNER_CREATE_VARS_IS_FUNCTION_ARGS = (1 << 1), /**< create variables for function arguments */\n  SCANNER_CREATE_VARS_IS_FUNCTION_BODY = (1 << 2), /**< create variables for function body */\n} scanner_create_variables_flags_t;\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* !JS_SCANNER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/regexp/re-bytecode.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-regexp-object.h\"\n#include \"lit-strings.h\"\n#include \"re-bytecode.h\"\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup regexparser Regular expression\n * @{\n *\n * \\addtogroup regexparser_bytecode Bytecode\n * @{\n */\n\nvoid\nre_initialize_regexp_bytecode (re_compiler_ctx_t *re_ctx_p) /**< RegExp bytecode context */\n{\n  const size_t initial_size = sizeof (re_compiled_code_t);\n  re_ctx_p->bytecode_start_p = jmem_heap_alloc_block (initial_size);\n  re_ctx_p->bytecode_size = initial_size;\n} /* re_initialize_regexp_bytecode */\n\nextern inline uint32_t JERRY_ATTR_ALWAYS_INLINE\nre_bytecode_size (re_compiler_ctx_t *re_ctx_p) /**< RegExp bytecode context */\n{\n  return (uint32_t) re_ctx_p->bytecode_size;\n} /* re_bytecode_size */\n\n/**\n * Append a new bytecode to the and of the bytecode container\n */\nstatic uint8_t *\nre_bytecode_reserve (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                     const size_t size) /**< size */\n{\n  const size_t old_size = re_ctx_p->bytecode_size;\n  const size_t new_size = old_size + size;\n  re_ctx_p->bytecode_start_p = jmem_heap_realloc_block (re_ctx_p->bytecode_start_p, old_size, new_size);\n  re_ctx_p->bytecode_size = new_size;\n  return re_ctx_p->bytecode_start_p + old_size;\n} /* re_bytecode_reserve */\n\n/**\n * Insert a new bytecode to the bytecode container\n */\nstatic uint8_t *\nre_bytecode_insert (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                    const size_t offset, /**< distance from the start of the container */\n                    const size_t size) /**< size */\n{\n  const size_t tail_size = re_ctx_p->bytecode_size - offset;\n  re_bytecode_reserve (re_ctx_p, size);\n\n  uint8_t *dest_p = re_ctx_p->bytecode_start_p + offset;\n  memmove (dest_p + size, dest_p, tail_size);\n\n  return dest_p;\n} /* re_bytecode_insert */\n\n/**\n * Append a byte\n */\nvoid\nre_append_byte (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                const uint8_t byte) /**< byte value */\n{\n  uint8_t *dest_p = re_bytecode_reserve (re_ctx_p, sizeof (uint8_t));\n  *dest_p = byte;\n} /* re_append_byte */\n\n/**\n * Insert a byte value\n */\nvoid\nre_insert_byte (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                const uint32_t offset, /**< distance from the start of the container */\n                const uint8_t byte) /**< byte value */\n{\n  uint8_t *dest_p = re_bytecode_insert (re_ctx_p, offset, sizeof (uint8_t));\n  *dest_p = byte;\n} /* re_insert_byte */\n\n/**\n * Get a single byte and icnrease bytecode position.\n */\nextern inline uint8_t JERRY_ATTR_ALWAYS_INLINE\nre_get_byte (const uint8_t **bc_p) /**< pointer to bytecode start */\n{\n  return *((*bc_p)++);\n} /* re_get_byte */\n\n/**\n * Append a RegExp opcode\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nre_append_opcode (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                  const re_opcode_t opcode) /**< input opcode */\n{\n  re_append_byte (re_ctx_p, (uint8_t) opcode);\n} /* re_append_opcode */\n\n/**\n * Insert a RegExp opcode\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nre_insert_opcode (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                  const uint32_t offset, /**< distance from the start of the container */\n                  const re_opcode_t opcode) /**< input opcode */\n{\n  re_insert_byte (re_ctx_p, offset, (uint8_t) opcode);\n} /* re_insert_opcode */\n\n/**\n * Get a RegExp opcode and increase the bytecode position\n *\n * @return current RegExp opcode\n */\nextern inline re_opcode_t JERRY_ATTR_ALWAYS_INLINE\nre_get_opcode (const uint8_t **bc_p) /**< pointer to bytecode start */\n{\n  return (re_opcode_t) re_get_byte (bc_p);\n} /* re_get_opcode */\n\n/**\n * Encode 2 byte unsigned integer into the bytecode\n */\nstatic void\nre_encode_u16 (uint8_t *dest_p, /**< destination */\n               const uint16_t value) /**< value */\n{\n  *dest_p++ = (uint8_t) ((value >> 8) & 0xFF);\n  *dest_p = (uint8_t) (value & 0xFF);\n} /* re_encode_u16 */\n\n/**\n * Encode 4 byte unsigned integer into the bytecode\n */\nstatic void\nre_encode_u32 (uint8_t *dest_p, /**< destination */\n              const uint32_t value) /**< value */\n{\n  *dest_p++ = (uint8_t) ((value >> 24) & 0xFF);\n  *dest_p++ = (uint8_t) ((value >> 16) & 0xFF);\n  *dest_p++ = (uint8_t) ((value >> 8) & 0xFF);\n  *dest_p = (uint8_t) (value & 0xFF);\n} /* re_encode_u32 */\n\n/**\n * Decode 2 byte unsigned integer from bytecode\n *\n * @return uint16_t value\n */\nstatic uint16_t\nre_decode_u16 (const uint8_t *src_p) /**< source */\n{\n  uint16_t value = (uint16_t) (((uint16_t) *src_p++) << 8);\n  value = (uint16_t) (value + *src_p++);\n  return value;\n} /* re_decode_u16 */\n\n/**\n * Decode 4 byte unsigned integer from bytecode\n *\n * @return uint32_t value\n */\nstatic uint32_t JERRY_ATTR_NOINLINE\nre_decode_u32 (const uint8_t *src_p) /**< source */\n{\n  uint32_t value = (uint32_t) (((uint32_t) *src_p++) << 24);\n  value += (uint32_t) (((uint32_t) *src_p++) << 16);\n  value += (uint32_t) (((uint32_t) *src_p++) << 8);\n  value += (uint32_t) (*src_p++);\n  return value;\n} /* re_decode_u32 */\n\n/**\n * Get the encoded size of an uint32_t value.\n *\n * @return encoded value size\n */\nstatic inline size_t JERRY_ATTR_ALWAYS_INLINE\nre_get_encoded_value_size (uint32_t value) /**< value */\n{\n  if (JERRY_LIKELY (value <= RE_VALUE_1BYTE_MAX))\n  {\n    return 1;\n  }\n\n  return 5;\n} /* re_get_encoded_value_size */\n\n/*\n * Encode a value to the specified position in the bytecode.\n */\nstatic void\nre_encode_value (uint8_t *dest_p, /**< position in bytecode */\n                 const uint32_t value) /**< value */\n{\n  if (JERRY_LIKELY (value <= RE_VALUE_1BYTE_MAX))\n  {\n    *dest_p = (uint8_t) value;\n    return;\n  }\n\n  *dest_p++ = (uint8_t) (RE_VALUE_4BYTE_MARKER);\n  re_encode_u32 (dest_p, value);\n} /* re_encode_value */\n\n/**\n * Append a value to the end of the bytecode.\n */\nvoid\nre_append_value (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                 const uint32_t value) /**< value */\n{\n  const size_t size = re_get_encoded_value_size (value);\n  uint8_t *dest_p = re_bytecode_reserve (re_ctx_p, size);\n  re_encode_value (dest_p, value);\n} /* re_append_value */\n\n/**\n * Insert a value into the bytecode at a specific offset.\n */\nvoid\nre_insert_value (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                 const uint32_t offset, /**< bytecode offset */\n                 const uint32_t value) /**< value */\n{\n  const size_t size = re_get_encoded_value_size (value);\n  uint8_t *dest_p = re_bytecode_insert (re_ctx_p, offset, size);\n  re_encode_value (dest_p, value);\n} /* re_insert_value */\n\n/**\n * Read an encoded value from the bytecode.\n *\n * @return decoded value\n */\nextern inline uint32_t JERRY_ATTR_ALWAYS_INLINE\nre_get_value (const uint8_t **bc_p) /** refence to bytecode pointer */\n{\n  uint32_t value = *(*bc_p)++;\n  if (JERRY_LIKELY (value <= RE_VALUE_1BYTE_MAX))\n  {\n    return value;\n  }\n\n  value = re_decode_u32 (*bc_p);\n  *bc_p += sizeof (uint32_t);\n  return value;\n} /* re_get_value */\n\n/**\n * Append a character to the RegExp bytecode\n */\nvoid\nre_append_char (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                const lit_code_point_t cp) /**< code point */\n{\n#if ENABLED (JERRY_ESNEXT)\n  const size_t size = (re_ctx_p->flags & RE_FLAG_UNICODE) ? sizeof (lit_code_point_t) : sizeof (ecma_char_t);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (re_ctx_p);\n  const size_t size = sizeof (ecma_char_t);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  uint8_t *dest_p = re_bytecode_reserve (re_ctx_p, size);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (re_ctx_p->flags & RE_FLAG_UNICODE)\n  {\n    re_encode_u32 (dest_p, cp);\n    return;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (cp <= LIT_UTF16_CODE_UNIT_MAX);\n  re_encode_u16 (dest_p, (ecma_char_t) cp);\n} /* re_append_char */\n\n/**\n * Append a character to the RegExp bytecode\n */\nvoid\nre_insert_char (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */\n                const uint32_t offset, /**< bytecode offset */\n                const lit_code_point_t cp) /**< code point*/\n{\n#if ENABLED (JERRY_ESNEXT)\n  const size_t size = (re_ctx_p->flags & RE_FLAG_UNICODE) ? sizeof (lit_code_point_t) : sizeof (ecma_char_t);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  JERRY_UNUSED (re_ctx_p);\n  const size_t size = sizeof (ecma_char_t);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  uint8_t *dest_p = re_bytecode_insert (re_ctx_p, offset, size);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (re_ctx_p->flags & RE_FLAG_UNICODE)\n  {\n    re_encode_u32 (dest_p, cp);\n    return;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  JERRY_ASSERT (cp <= LIT_UTF16_CODE_UNIT_MAX);\n  re_encode_u16 (dest_p, (ecma_char_t) cp);\n} /* re_insert_char */\n\n/**\n * Decode a character from the bytecode.\n *\n * @return decoded character\n */\nextern inline lit_code_point_t JERRY_ATTR_ALWAYS_INLINE\nre_get_char (const uint8_t **bc_p, /**< reference to bytecode pointer */\n             bool unicode) /**< full unicode mode */\n{\n  lit_code_point_t cp;\n\n#if !ENABLED (JERRY_ESNEXT)\n  JERRY_UNUSED (unicode);\n#else /* ENABLED (JERRY_ESNEXT) */\n  if (unicode)\n  {\n    cp = re_decode_u32 (*bc_p);\n    *bc_p += sizeof (lit_code_point_t);\n  }\n  else\n#endif /* ENABLED (JERRY_ESNEXT) */\n  {\n    cp = re_decode_u16 (*bc_p);\n    *bc_p += sizeof (ecma_char_t);\n  }\n\n  return cp;\n} /* re_get_char */\n\n#if ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE)\nstatic uint32_t\nre_get_bytecode_offset (const uint8_t *start_p, /**< bytecode start pointer */\n                        const uint8_t *current_p) /**< current bytecode pointer */\n{\n  return (uint32_t) ((uintptr_t) current_p - (uintptr_t) start_p);\n} /* re_get_bytecode_offset */\n\n/**\n * RegExp bytecode dumper\n */\nvoid\nre_dump_bytecode (re_compiler_ctx_t *re_ctx_p) /**< RegExp bytecode context */\n{\n  static const char escape_chars[] = {'d', 'D', 'w', 'W', 's', 'S'};\n\n  re_compiled_code_t *compiled_code_p = (re_compiled_code_t *) re_ctx_p->bytecode_start_p;\n  JERRY_DEBUG_MSG (\"Flags: 0x%x \", compiled_code_p->header.status_flags);\n  JERRY_DEBUG_MSG (\"Capturing groups: %d \", compiled_code_p->captures_count);\n  JERRY_DEBUG_MSG (\"Non-capturing groups: %d\\n\", compiled_code_p->non_captures_count);\n\n  const uint8_t *bytecode_start_p = (const uint8_t *) (compiled_code_p + 1);\n  const uint8_t *bytecode_p = bytecode_start_p;\n\n  while (true)\n  {\n    JERRY_DEBUG_MSG (\"[%3u] \", (uint32_t) ((uintptr_t) bytecode_p - (uintptr_t) bytecode_start_p));\n    re_opcode_t op = *bytecode_p++;\n    switch (op)\n    {\n      case RE_OP_ALTERNATIVE_START:\n      {\n        JERRY_DEBUG_MSG (\"ALTERNATIVE_START \");\n        const uint32_t offset = re_get_value (&bytecode_p) + re_get_bytecode_offset (bytecode_start_p, bytecode_p);\n        JERRY_DEBUG_MSG (\"tail offset: [%3u]\\n\", offset);\n        break;\n      }\n      case RE_OP_ALTERNATIVE_NEXT:\n      {\n        JERRY_DEBUG_MSG (\"ALTERNATIVE_NEXT \");\n        const uint32_t offset = re_get_value (&bytecode_p) + re_get_bytecode_offset (bytecode_start_p, bytecode_p);\n        JERRY_DEBUG_MSG (\"tail offset: [%3u]\\n\", offset);\n        break;\n      }\n      case RE_OP_NO_ALTERNATIVE:\n      {\n        JERRY_DEBUG_MSG (\"NO_ALTERNATIVES\\n\");\n        break;\n      }\n      case RE_OP_CAPTURING_GROUP_START:\n      {\n        JERRY_DEBUG_MSG (\"CAPTURING_GROUP_START \");\n        JERRY_DEBUG_MSG (\"idx: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"capture count: %u, \", re_get_value (&bytecode_p));\n\n        const uint32_t qmin = re_get_value (&bytecode_p);\n        JERRY_DEBUG_MSG (\"qmin: %u\", qmin);\n        if (qmin == 0)\n        {\n          const uint32_t offset = re_get_value (&bytecode_p) + re_get_bytecode_offset (bytecode_start_p, bytecode_p);\n          JERRY_DEBUG_MSG (\", tail offset: [%3u]\\n\", offset);\n        }\n        else\n        {\n          JERRY_DEBUG_MSG (\"\\n\");\n        }\n\n        break;\n      }\n      case RE_OP_NON_CAPTURING_GROUP_START:\n      {\n        JERRY_DEBUG_MSG (\"NON_CAPTURING_GROUP_START \");\n        JERRY_DEBUG_MSG (\"idx: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"capture start: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"capture count: %u, \", re_get_value (&bytecode_p));\n\n        const uint32_t qmin = re_get_value (&bytecode_p);\n        JERRY_DEBUG_MSG (\"qmin: %u\", qmin);\n        if (qmin == 0)\n        {\n          const uint32_t offset = re_get_value (&bytecode_p) + re_get_bytecode_offset (bytecode_start_p, bytecode_p);\n          JERRY_DEBUG_MSG (\", tail offset: [%3u]\\n\", offset);\n        }\n        else\n        {\n          JERRY_DEBUG_MSG (\"\\n\");\n        }\n\n        break;\n      }\n      case RE_OP_GREEDY_CAPTURING_GROUP_END:\n      {\n        JERRY_DEBUG_MSG (\"GREEDY_CAPTURING_GROUP_END \");\n        JERRY_DEBUG_MSG (\"idx: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmin: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmax: %u\\n\", re_get_value (&bytecode_p) - RE_QMAX_OFFSET);\n        break;\n      }\n      case RE_OP_LAZY_CAPTURING_GROUP_END:\n      {\n        JERRY_DEBUG_MSG (\"LAZY_CAPTURING_GROUP_END \");\n        JERRY_DEBUG_MSG (\"idx: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmin: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmax: %u\\n\", re_get_value (&bytecode_p) - RE_QMAX_OFFSET);\n        break;\n      }\n      case RE_OP_GREEDY_NON_CAPTURING_GROUP_END:\n      {\n        JERRY_DEBUG_MSG (\"GREEDY_NON_CAPTURING_GROUP_END \");\n        JERRY_DEBUG_MSG (\"idx: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmin: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmax: %u\\n\", re_get_value (&bytecode_p) - RE_QMAX_OFFSET);\n        break;\n      }\n      case RE_OP_LAZY_NON_CAPTURING_GROUP_END:\n      {\n        JERRY_DEBUG_MSG (\"LAZY_NON_CAPTURING_GROUP_END \");\n        JERRY_DEBUG_MSG (\"idx: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmin: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmax: %u\\n\", re_get_value (&bytecode_p) - RE_QMAX_OFFSET);\n        break;\n      }\n      case RE_OP_GREEDY_ITERATOR:\n      {\n        JERRY_DEBUG_MSG (\"GREEDY_ITERATOR \");\n        JERRY_DEBUG_MSG (\"qmin: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmax: %u, \", re_get_value (&bytecode_p) - RE_QMAX_OFFSET);\n        const uint32_t offset = re_get_value (&bytecode_p) + re_get_bytecode_offset (bytecode_start_p, bytecode_p);\n        JERRY_DEBUG_MSG (\"tail offset: [%3u]\\n\", offset);\n        break;\n      }\n      case RE_OP_LAZY_ITERATOR:\n      {\n        JERRY_DEBUG_MSG (\"LAZY_ITERATOR \");\n        JERRY_DEBUG_MSG (\"qmin: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"qmax: %u, \", re_get_value (&bytecode_p) - RE_QMAX_OFFSET);\n        const uint32_t offset = re_get_value (&bytecode_p) + re_get_bytecode_offset (bytecode_start_p, bytecode_p);\n        JERRY_DEBUG_MSG (\"tail offset: [%3u]\\n\", offset);\n        break;\n      }\n      case RE_OP_ITERATOR_END:\n      {\n        JERRY_DEBUG_MSG (\"ITERATOR_END\\n\");\n        break;\n      }\n      case RE_OP_BACKREFERENCE:\n      {\n        JERRY_DEBUG_MSG (\"BACKREFERENCE \");\n        JERRY_DEBUG_MSG (\"idx: %d\\n\", re_get_value (&bytecode_p));\n        break;\n      }\n      case RE_OP_ASSERT_LINE_START:\n      {\n        JERRY_DEBUG_MSG (\"ASSERT_LINE_START\\n\");\n        break;\n      }\n      case RE_OP_ASSERT_LINE_END:\n      {\n        JERRY_DEBUG_MSG (\"ASSERT_LINE_END\\n\");\n        break;\n      }\n      case RE_OP_ASSERT_LOOKAHEAD_POS:\n      {\n        JERRY_DEBUG_MSG (\"ASSERT_LOOKAHEAD_POS \");\n        JERRY_DEBUG_MSG (\"qmin: %u, \", *bytecode_p++);\n        JERRY_DEBUG_MSG (\"capture start: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"capture count: %u, \", re_get_value (&bytecode_p));\n        const uint32_t offset = re_get_value (&bytecode_p) + re_get_bytecode_offset (bytecode_start_p, bytecode_p);\n        JERRY_DEBUG_MSG (\"tail offset: [%3u]\\n\", offset);\n        break;\n      }\n      case RE_OP_ASSERT_LOOKAHEAD_NEG:\n      {\n        JERRY_DEBUG_MSG (\"ASSERT_LOOKAHEAD_NEG \");\n        JERRY_DEBUG_MSG (\"qmin: %u, \", *bytecode_p++);\n        JERRY_DEBUG_MSG (\"capture start: %u, \", re_get_value (&bytecode_p));\n        JERRY_DEBUG_MSG (\"capture count: %u, \", re_get_value (&bytecode_p));\n        const uint32_t offset = re_get_value (&bytecode_p) + re_get_bytecode_offset (bytecode_start_p, bytecode_p);\n        JERRY_DEBUG_MSG (\"tail offset: [%3u]\\n\", offset);\n        break;\n      }\n      case RE_OP_ASSERT_END:\n      {\n        JERRY_DEBUG_MSG (\"ASSERT_END\\n\");\n        break;\n      }\n      case RE_OP_ASSERT_WORD_BOUNDARY:\n      {\n        JERRY_DEBUG_MSG (\"ASSERT_WORD_BOUNDARY\\n\");\n        break;\n      }\n      case RE_OP_ASSERT_NOT_WORD_BOUNDARY:\n      {\n        JERRY_DEBUG_MSG (\"ASSERT_NOT_WORD_BOUNDARY\\n\");\n        break;\n      }\n      case RE_OP_CLASS_ESCAPE:\n      {\n        ecma_class_escape_t escape = (ecma_class_escape_t) *bytecode_p++;\n        JERRY_DEBUG_MSG (\"CLASS_ESCAPE \\\\%c\\n\", escape_chars[escape]);\n        break;\n      }\n      case RE_OP_CHAR_CLASS:\n      {\n        JERRY_DEBUG_MSG (\"CHAR_CLASS \");\n        uint8_t flags = *bytecode_p++;\n        uint32_t char_count = (flags & RE_CLASS_HAS_CHARS) ? re_get_value (&bytecode_p) : 0;\n        uint32_t range_count = (flags & RE_CLASS_HAS_RANGES) ? re_get_value (&bytecode_p) : 0;\n\n        if (flags & RE_CLASS_INVERT)\n        {\n          JERRY_DEBUG_MSG (\"inverted \");\n        }\n\n        JERRY_DEBUG_MSG (\"escapes: \");\n        uint8_t escape_count = flags & RE_CLASS_ESCAPE_COUNT_MASK;\n        while (escape_count--)\n        {\n          JERRY_DEBUG_MSG (\"\\\\%c, \", escape_chars[*bytecode_p++]);\n        }\n\n        JERRY_DEBUG_MSG (\"chars: \");\n        while (char_count--)\n        {\n          JERRY_DEBUG_MSG (\"\\\\u%04x, \", re_get_char (&bytecode_p, re_ctx_p->flags & RE_FLAG_UNICODE));\n        }\n\n        JERRY_DEBUG_MSG (\"ranges: \");\n        while (range_count--)\n        {\n          const lit_code_point_t begin = re_get_char (&bytecode_p, re_ctx_p->flags & RE_FLAG_UNICODE);\n          const lit_code_point_t end = re_get_char (&bytecode_p, re_ctx_p->flags & RE_FLAG_UNICODE);\n          JERRY_DEBUG_MSG (\"\\\\u%04x-\\\\u%04x, \", begin, end);\n        }\n\n        JERRY_DEBUG_MSG (\"\\n\");\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case RE_OP_UNICODE_PERIOD:\n      {\n        JERRY_DEBUG_MSG (\"UNICODE_PERIOD\\n\");\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case RE_OP_PERIOD:\n      {\n        JERRY_DEBUG_MSG (\"PERIOD\\n\");\n        break;\n      }\n      case RE_OP_CHAR:\n      {\n        JERRY_DEBUG_MSG (\"CHAR \\\\u%04x\\n\", re_get_char (&bytecode_p, re_ctx_p->flags & RE_FLAG_UNICODE));\n        break;\n      }\n      case RE_OP_BYTE:\n      {\n        const uint8_t ch = *bytecode_p++;\n        JERRY_DEBUG_MSG (\"BYTE \\\\u%04x '%c'\\n\", ch, (char) ch);\n        break;\n      }\n      case RE_OP_EOF:\n      {\n        JERRY_DEBUG_MSG (\"EOF\\n\");\n        return;\n      }\n      default:\n      {\n        JERRY_DEBUG_MSG (\"UNKNOWN(%d)\\n\", (uint32_t) op);\n        break;\n      }\n    }\n  }\n} /* re_dump_bytecode */\n#endif /* ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/regexp/re-bytecode.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef RE_BYTECODE_H\n#define RE_BYTECODE_H\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n#include \"ecma-globals.h\"\n#include \"re-compiler-context.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup regexparser Regular expression\n * @{\n *\n * \\addtogroup regexparser_bytecode Bytecode\n * @{\n */\n\n/**\n  * Size of the RegExp bytecode cache\n  */\n#define RE_CACHE_SIZE 8u\n\n/**\n * Maximum value that can be encoded in the RegExp bytecode as a single byte.\n */\n#define RE_VALUE_1BYTE_MAX 0xFE\n\n/**\n * Marker that signals that the actual value is enocded in the following 4 bytes in the bytecode.\n */\n#define RE_VALUE_4BYTE_MARKER 0xFF\n\n/**\n * RegExp opcodes\n */\ntypedef enum\n{\n  RE_OP_EOF,                                      /**< end of pattern */\n\n  RE_OP_ALTERNATIVE_START,                        /**< start of alternatives */\n  RE_OP_ALTERNATIVE_NEXT,                         /**< next alternative */\n  RE_OP_NO_ALTERNATIVE,                           /**< no alternative */\n\n  RE_OP_CAPTURING_GROUP_START,                    /**< start of a capturing group */\n  RE_OP_NON_CAPTURING_GROUP_START,                /**< start of a non-capturing group */\n\n  RE_OP_GREEDY_CAPTURING_GROUP_END,               /**< end of a greedy capturing group */\n  RE_OP_GREEDY_NON_CAPTURING_GROUP_END,           /**< end of a greedy non-capturing group */\n  RE_OP_LAZY_CAPTURING_GROUP_END,                 /**< end of a lazy capturing group */\n  RE_OP_LAZY_NON_CAPTURING_GROUP_END,             /**< end of a lazy non-capturing group */\n\n  RE_OP_GREEDY_ITERATOR,                          /**< greedy iterator */\n  RE_OP_LAZY_ITERATOR,                            /**< lazy iterator */\n  RE_OP_ITERATOR_END,                             /*** end of an iterator */\n\n  RE_OP_BACKREFERENCE,                            /**< backreference */\n\n  RE_OP_ASSERT_LINE_START,                        /**< line start assertion */\n  RE_OP_ASSERT_LINE_END,                          /**< line end assertion */\n  RE_OP_ASSERT_WORD_BOUNDARY,                     /**< word boundary assertion */\n  RE_OP_ASSERT_NOT_WORD_BOUNDARY,                 /**< not word boundary assertion */\n  RE_OP_ASSERT_LOOKAHEAD_POS,                     /**< positive lookahead assertion */\n  RE_OP_ASSERT_LOOKAHEAD_NEG,                     /**< negative lookahead assertion */\n  RE_OP_ASSERT_END,                               /**< end of an assertion */\n\n  RE_OP_CLASS_ESCAPE,                             /**< class escape */\n  RE_OP_CHAR_CLASS,                               /**< character class */\n#if ENABLED (JERRY_ESNEXT)\n  RE_OP_UNICODE_PERIOD,                           /**< period in full unicode mode */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  RE_OP_PERIOD,                                   /**< period in non-unicode mode */\n  RE_OP_CHAR,                                     /**< any code point */\n  RE_OP_BYTE,                                     /**< 1-byte utf8 character */\n} re_opcode_t;\n\n/**\n * Compiled byte code data.\n */\ntypedef struct\n{\n  ecma_compiled_code_t header;       /**< compiled code header */\n  uint32_t captures_count;           /**< number of capturing groups */\n  uint32_t non_captures_count;       /**< number of non-capturing groups */\n  ecma_value_t source;               /**< original RegExp pattern */\n} re_compiled_code_t;\n\nvoid re_initialize_regexp_bytecode (re_compiler_ctx_t *re_ctx_p);\nuint32_t re_bytecode_size (re_compiler_ctx_t *re_ctx_p);\n\nvoid re_append_opcode (re_compiler_ctx_t *re_ctx_p, const re_opcode_t opcode);\nvoid re_append_byte (re_compiler_ctx_t *re_ctx_p, const uint8_t byte);\nvoid re_append_char (re_compiler_ctx_t *re_ctx_p, const lit_code_point_t cp);\nvoid re_append_value (re_compiler_ctx_t *re_ctx_p, const uint32_t value);\n\nvoid re_insert_opcode (re_compiler_ctx_t *re_ctx_p, const uint32_t offset, const re_opcode_t opcode);\nvoid re_insert_byte (re_compiler_ctx_t *re_ctx_p, const uint32_t offset, const uint8_t byte);\nvoid re_insert_char (re_compiler_ctx_t *re_ctx_p,  const uint32_t offset, const lit_code_point_t cp);\nvoid re_insert_value (re_compiler_ctx_t *re_ctx_p, const uint32_t offset, const uint32_t value);\n\nre_opcode_t re_get_opcode (const uint8_t **bc_p);\nuint8_t re_get_byte (const uint8_t **bc_p);\nlit_code_point_t re_get_char (const uint8_t **bc_p, bool unicode);\nuint32_t re_get_value (const uint8_t **bc_p);\n\n#if ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE)\nvoid re_dump_bytecode (re_compiler_ctx_t *bc_ctx);\n#endif /* ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE) */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#endif /* !RE_BYTECODE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/regexp/re-compiler-context.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef RE_COMPILER_CONTEXT_H\n#define RE_COMPILER_CONTEXT_H\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n#include \"re-token.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup regexparser Regular expression\n * @{\n *\n * \\addtogroup regexparser_compiler Compiler\n * @{\n */\n\n/**\n * RegExp compiler context\n */\ntypedef struct\n{\n  const lit_utf8_byte_t *input_start_p; /**< start of input pattern */\n  const lit_utf8_byte_t *input_curr_p;  /**< current position in input pattern */\n  const lit_utf8_byte_t *input_end_p;   /**< end of input pattern */\n\n  uint8_t *bytecode_start_p;            /**< start of bytecode block */\n  size_t bytecode_size;                 /**< size of bytecode */\n\n  uint32_t captures_count;              /**< number of capture groups */\n  uint32_t non_captures_count;          /**< number of non-capture groups */\n\n  int groups_count;                     /**< number of groups */\n  uint16_t flags;                       /**< RegExp flags */\n  re_token_t token;                     /**< current token */\n} re_compiler_ctx_t;\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#endif /* !RE_COMPILER_CONTEXT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/regexp/re-compiler.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-exceptions.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-regexp-object.h\"\n#include \"lit-char-helpers.h\"\n#include \"jcontext.h\"\n#include \"jrt-libc-includes.h\"\n#include \"jmem.h\"\n#include \"re-bytecode.h\"\n#include \"re-compiler.h\"\n#include \"re-compiler-context.h\"\n#include \"re-parser.h\"\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup regexparser Regular expression\n * @{\n *\n * \\addtogroup regexparser_compiler Compiler\n * @{\n */\n\n/**\n * Search for the given pattern in the RegExp cache.\n *\n * @return pointer to bytecode if found\n *         NULL - otherwise\n */\nstatic re_compiled_code_t *\nre_cache_lookup (ecma_string_t *pattern_str_p, /**< pattern string */\n                 uint16_t flags) /**< flags */\n{\n  re_compiled_code_t **cache_p = JERRY_CONTEXT (re_cache);\n\n  for (uint8_t idx = 0u; idx < RE_CACHE_SIZE; idx++)\n  {\n    re_compiled_code_t *cached_bytecode_p = cache_p[idx];\n\n    if (cached_bytecode_p == NULL)\n    {\n      break;\n    }\n\n    ecma_string_t *cached_pattern_str_p = ecma_get_string_from_value (cached_bytecode_p->source);\n\n    if (cached_bytecode_p->header.status_flags == flags\n        && ecma_compare_ecma_strings (cached_pattern_str_p, pattern_str_p))\n    {\n      return cached_bytecode_p;\n    }\n  }\n\n  return NULL;\n} /* re_cache_lookup */\n\n/**\n * Run garbage collection in RegExp cache.\n */\nvoid\nre_cache_gc (void)\n{\n  re_compiled_code_t **cache_p = JERRY_CONTEXT (re_cache);\n\n  for (uint32_t i = 0u; i < RE_CACHE_SIZE; i++)\n  {\n    const re_compiled_code_t *cached_bytecode_p = cache_p[i];\n\n    if (cached_bytecode_p == NULL)\n    {\n      break;\n    }\n\n    ecma_bytecode_deref ((ecma_compiled_code_t *) cached_bytecode_p);\n    cache_p[i] = NULL;\n  }\n\n  JERRY_CONTEXT (re_cache_idx) = 0;\n} /* re_cache_gc */\n\n/**\n * Compilation of RegExp bytecode\n *\n * @return pointer to bytecode if compilation was successful\n *         NULL - otherwise\n */\nre_compiled_code_t *\nre_compile_bytecode (ecma_string_t *pattern_str_p, /**< pattern */\n                     uint16_t flags) /**< flags */\n{\n  re_compiled_code_t *cached_bytecode_p = re_cache_lookup (pattern_str_p, flags);\n\n  if (cached_bytecode_p != NULL)\n  {\n    ecma_bytecode_ref ((ecma_compiled_code_t *) cached_bytecode_p);\n    return cached_bytecode_p;\n  }\n\n  re_compiler_ctx_t re_ctx;\n  re_ctx.flags = flags;\n  re_ctx.captures_count = 1;\n  re_ctx.non_captures_count = 0;\n\n  re_initialize_regexp_bytecode (&re_ctx);\n\n  ECMA_STRING_TO_UTF8_STRING (pattern_str_p, pattern_start_p, pattern_start_size);\n\n  re_ctx.input_start_p = pattern_start_p;\n  re_ctx.input_curr_p = (lit_utf8_byte_t *) pattern_start_p;\n  re_ctx.input_end_p = pattern_start_p + pattern_start_size;\n  re_ctx.groups_count = -1;\n\n  /* Parse RegExp pattern */\n  ecma_value_t result = re_parse_alternative (&re_ctx, true);\n\n  ECMA_FINALIZE_UTF8_STRING (pattern_start_p, pattern_start_size);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    /* Compilation failed, free bytecode. */\n    jmem_heap_free_block (re_ctx.bytecode_start_p, re_ctx.bytecode_size);\n    return NULL;\n  }\n\n  /* Align bytecode size to JMEM_ALIGNMENT so that it can be stored in the bytecode header. */\n  const uint32_t final_size = JERRY_ALIGNUP (re_ctx.bytecode_size, JMEM_ALIGNMENT);\n  re_compiled_code_t *re_compiled_code_p = (re_compiled_code_t *) jmem_heap_realloc_block (re_ctx.bytecode_start_p,\n                                                                                           re_ctx.bytecode_size,\n                                                                                           final_size);\n\n  /* Bytecoded will be inserted into the cache and returned to the caller, so refcount is implicitly set to 2. */\n  re_compiled_code_p->header.refs = 2;\n  re_compiled_code_p->header.size = (uint16_t) (final_size >> JMEM_ALIGNMENT_LOG);\n  re_compiled_code_p->header.status_flags = re_ctx.flags;\n\n  ecma_ref_ecma_string (pattern_str_p);\n  re_compiled_code_p->source = ecma_make_string_value (pattern_str_p);\n  re_compiled_code_p->captures_count = re_ctx.captures_count;\n  re_compiled_code_p->non_captures_count = re_ctx.non_captures_count;\n\n#if ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE)\n  if (JERRY_CONTEXT (jerry_init_flags) & ECMA_INIT_SHOW_REGEXP_OPCODES)\n  {\n    re_dump_bytecode (&re_ctx);\n  }\n#endif /* ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE) */\n\n  uint8_t cache_idx = JERRY_CONTEXT (re_cache_idx);\n\n  if (JERRY_CONTEXT (re_cache)[cache_idx] != NULL)\n  {\n    ecma_bytecode_deref ((ecma_compiled_code_t *) JERRY_CONTEXT (re_cache)[cache_idx]);\n  }\n\n  JERRY_CONTEXT (re_cache)[cache_idx] = re_compiled_code_p;\n  JERRY_CONTEXT (re_cache_idx) = (uint8_t) (cache_idx + 1) % RE_CACHE_SIZE;\n\n  return re_compiled_code_p;\n} /* re_compile_bytecode */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/regexp/re-compiler.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef RE_COMPILER_H\n#define RE_COMPILER_H\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n#include \"ecma-globals.h\"\n#include \"re-bytecode.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup regexparser Regular expression\n * @{\n *\n * \\addtogroup regexparser_compiler Compiler\n * @{\n */\n\nre_compiled_code_t *\nre_compile_bytecode (ecma_string_t *pattern_str_p, uint16_t flags);\n\nvoid re_cache_gc (void);\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#endif /* !RE_COMPILER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/regexp/re-parser.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-exceptions.h\"\n#include \"ecma-globals.h\"\n#include \"jcontext.h\"\n#include \"jrt-libc-includes.h\"\n#include \"lit-char-helpers.h\"\n#include \"re-compiler.h\"\n#include \"re-parser.h\"\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup regexparser Regular expression\n * @{\n *\n * \\addtogroup regexparser_parser Parser\n * @{\n */\n\n/**\n * Get the start opcode for the current group.\n *\n * @return RegExp opcode\n */\nstatic re_opcode_t\nre_get_group_start_opcode (bool is_capturing) /**< is capturing group */\n{\n  return (is_capturing) ? RE_OP_CAPTURING_GROUP_START : RE_OP_NON_CAPTURING_GROUP_START;\n} /* re_get_group_start_opcode*/\n\n/**\n * Get the end opcode for the current group.\n *\n * @return RegExp opcode\n */\nstatic re_opcode_t\nre_get_group_end_opcode (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context */\n                         bool is_capturing) /**< is capturing group */\n{\n  if (is_capturing)\n  {\n    if (re_ctx_p->token.greedy)\n    {\n      return RE_OP_GREEDY_CAPTURING_GROUP_END;\n    }\n\n    return RE_OP_LAZY_CAPTURING_GROUP_END;\n  }\n\n  if (re_ctx_p->token.greedy)\n  {\n    return RE_OP_GREEDY_NON_CAPTURING_GROUP_END;\n  }\n\n  return RE_OP_LAZY_NON_CAPTURING_GROUP_END;\n} /* re_get_group_end_opcode */\n\n/**\n * Enclose the given bytecode to a group.\n */\nstatic void\nre_insert_into_group (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context */\n                      uint32_t group_start_offset, /**< offset of group start */\n                      uint32_t idx, /**< index of group */\n                      uint32_t capture_start, /**< index of first nested capture */\n                      bool is_capturing) /**< is capturing group */\n{\n  uint32_t qmin = re_ctx_p->token.qmin;\n  uint32_t qmax = re_ctx_p->token.qmax;\n\n  if (JERRY_UNLIKELY (!is_capturing && re_bytecode_size (re_ctx_p) == group_start_offset))\n  {\n    return;\n  }\n\n  if (qmin == 0)\n  {\n    re_insert_value (re_ctx_p,\n                     group_start_offset,\n                     re_bytecode_size (re_ctx_p) - group_start_offset);\n  }\n\n  re_insert_value (re_ctx_p, group_start_offset, qmin);\n  re_insert_value (re_ctx_p, group_start_offset, re_ctx_p->captures_count - capture_start);\n\n  if (!is_capturing)\n  {\n    re_insert_value (re_ctx_p, group_start_offset, capture_start);\n  }\n  else\n  {\n    JERRY_ASSERT (idx == capture_start);\n  }\n\n  re_insert_value (re_ctx_p, group_start_offset, idx);\n  re_insert_opcode (re_ctx_p, group_start_offset, re_get_group_start_opcode (is_capturing));\n\n  re_append_opcode (re_ctx_p, re_get_group_end_opcode (re_ctx_p, is_capturing));\n  re_append_value (re_ctx_p, idx);\n  re_append_value (re_ctx_p, qmin);\n  re_append_value (re_ctx_p, qmax + RE_QMAX_OFFSET);\n} /* re_insert_into_group */\n\n/**\n * Insert simple atom iterator.\n */\nstatic void\nre_insert_atom_iterator (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context */\n                         uint32_t start_offset) /**< atom start offset */\n{\n  const uint32_t qmin = re_ctx_p->token.qmin;\n  const uint32_t qmax = re_ctx_p->token.qmax;\n\n  if (qmin == 1 && qmax == 1)\n  {\n    return;\n  }\n\n  re_append_opcode (re_ctx_p, RE_OP_ITERATOR_END);\n  re_insert_value (re_ctx_p, start_offset, re_bytecode_size (re_ctx_p) - start_offset);\n  re_insert_value (re_ctx_p, start_offset, qmax + RE_QMAX_OFFSET);\n  re_insert_value (re_ctx_p, start_offset, qmin);\n  re_insert_opcode (re_ctx_p, start_offset, re_ctx_p->token.greedy ? RE_OP_GREEDY_ITERATOR : RE_OP_LAZY_ITERATOR);\n} /* re_insert_atom_iterator */\n\n/**\n * Insert a lookahead assertion.\n */\nstatic void\nre_insert_assertion_lookahead (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context */\n                               uint32_t start_offset, /**< atom start offset */\n                               uint32_t capture_start, /**< index of first nested capture */\n                               bool negative) /** lookahead type */\n{\n  const uint32_t qmin = re_ctx_p->token.qmin;\n\n  re_append_opcode (re_ctx_p, RE_OP_ASSERT_END);\n  re_insert_value (re_ctx_p, start_offset, re_bytecode_size (re_ctx_p) - start_offset);\n\n  /* We need to clear nested capturing group results when a negative assertion or the tail after a positive assertion\n   * does not match, so we store the begin and end index of nested capturing groups. */\n  re_insert_value (re_ctx_p, start_offset, re_ctx_p->captures_count - capture_start);\n  re_insert_value (re_ctx_p, start_offset, capture_start);\n\n  /* Lookaheads always result in zero length matches, which means iterations will always stop on the first match.\n   * This allows us to not have to deal with iterations beyond one. Either qmin == 0 which will implicitly match,\n   * or qmin > 0, in which case the first iteration will decide whether the assertion matches depending on whether\n   * the iteration matched or not. This also allows us to ignore qmax entirely. */\n  re_insert_byte (re_ctx_p, start_offset, (uint8_t) JERRY_MIN (qmin, 1));\n\n  const re_opcode_t opcode = (negative) ? RE_OP_ASSERT_LOOKAHEAD_NEG : RE_OP_ASSERT_LOOKAHEAD_POS;\n  re_insert_opcode (re_ctx_p, start_offset, opcode);\n} /* re_insert_assertion_lookahead */\n\n/**\n * Consume non greedy (question mark) character if present.\n */\nstatic void\nre_parse_lazy_char (re_compiler_ctx_t *re_ctx_p) /**< RegExp parser context */\n{\n  if (re_ctx_p->input_curr_p < re_ctx_p->input_end_p\n      && *re_ctx_p->input_curr_p == LIT_CHAR_QUESTION)\n  {\n    re_ctx_p->input_curr_p++;\n    re_ctx_p->token.greedy = false;\n    return;\n  }\n\n  re_ctx_p->token.greedy = true;\n} /* re_parse_lazy_char */\n\n/**\n * Parse a max 3 digit long octal number from the input string, with a decimal value less than 256.\n *\n * @return value of the octal number\n */\nstatic uint32_t\nre_parse_octal (re_compiler_ctx_t *re_ctx_p) /**< RegExp parser context */\n{\n  JERRY_ASSERT (re_ctx_p->input_curr_p < re_ctx_p->input_end_p);\n  JERRY_ASSERT (lit_char_is_octal_digit (*re_ctx_p->input_curr_p));\n\n  uint32_t value = (uint32_t) (*re_ctx_p->input_curr_p++) - LIT_CHAR_0;\n\n  if (re_ctx_p->input_curr_p < re_ctx_p->input_end_p\n      && lit_char_is_octal_digit (*re_ctx_p->input_curr_p))\n  {\n    value = value * 8 + (*re_ctx_p->input_curr_p++) - LIT_CHAR_0;\n  }\n\n  if (re_ctx_p->input_curr_p < re_ctx_p->input_end_p\n      && lit_char_is_octal_digit (*re_ctx_p->input_curr_p))\n  {\n    const uint32_t new_value = value * 8 + (*re_ctx_p->input_curr_p) - LIT_CHAR_0;\n\n    if (new_value <= RE_MAX_OCTAL_VALUE)\n    {\n      value = new_value;\n      re_ctx_p->input_curr_p++;\n    }\n  }\n\n  return value;\n} /* re_parse_octal */\n\n/**\n * Check that the currently parsed quantifier is valid.\n *\n * @return ECMA_VALUE_ERROR, if quantifier is invalid\n *         ECMA_VALUE_EMPTY, otherwise\n */\nstatic ecma_value_t\nre_check_quantifier (re_compiler_ctx_t *re_ctx_p)\n{\n  if (re_ctx_p->token.qmin > re_ctx_p->token.qmax)\n  {\n    /* ECMA-262 v5.1 15.10.2.5 */\n    return ecma_raise_syntax_error (ECMA_ERR_MSG (\"quantifier error: min > max.\"));\n  }\n\n  return ECMA_VALUE_EMPTY;\n} /* re_check_quantifier */\n\n/**\n * Parse RegExp quantifier.\n *\n * @return ECMA_VALUE_TRUE - if parsed successfully\n *         ECMA_VALUE_FALSE - otherwise\n */\nstatic ecma_value_t\nre_parse_quantifier (re_compiler_ctx_t *re_ctx_p) /**< RegExp compiler context */\n{\n  if (re_ctx_p->input_curr_p < re_ctx_p->input_end_p)\n  {\n    switch (*re_ctx_p->input_curr_p)\n    {\n      case LIT_CHAR_QUESTION:\n      {\n        re_ctx_p->input_curr_p++;\n        re_ctx_p->token.qmin = 0;\n        re_ctx_p->token.qmax = 1;\n\n        re_parse_lazy_char (re_ctx_p);\n        return ECMA_VALUE_TRUE;\n      }\n      case LIT_CHAR_ASTERISK:\n      {\n        re_ctx_p->input_curr_p++;\n        re_ctx_p->token.qmin = 0;\n        re_ctx_p->token.qmax = RE_INFINITY;\n\n        re_parse_lazy_char (re_ctx_p);\n        return ECMA_VALUE_TRUE;\n      }\n      case LIT_CHAR_PLUS:\n      {\n        re_ctx_p->input_curr_p++;\n        re_ctx_p->token.qmin = 1;\n        re_ctx_p->token.qmax = RE_INFINITY;\n\n        re_parse_lazy_char (re_ctx_p);\n        return ECMA_VALUE_TRUE;\n      }\n      case LIT_CHAR_LEFT_BRACE:\n      {\n        const lit_utf8_byte_t *current_p = re_ctx_p->input_curr_p + 1;\n        uint32_t qmin = 0;\n        uint32_t qmax = RE_INFINITY;\n\n        if (current_p >= re_ctx_p->input_end_p)\n        {\n          break;\n        }\n\n        if (!lit_char_is_decimal_digit (*current_p))\n        {\n          break;\n        }\n\n        qmin = lit_parse_decimal (&current_p, re_ctx_p->input_end_p);\n\n        if (current_p >= re_ctx_p->input_end_p)\n        {\n          break;\n        }\n\n        lit_utf8_byte_t ch = *current_p++;\n        if (ch == LIT_CHAR_RIGHT_BRACE)\n        {\n          qmax = qmin;\n        }\n        else if (ch == LIT_CHAR_COMMA)\n        {\n          if (current_p >= re_ctx_p->input_end_p)\n          {\n            break;\n          }\n\n          if (lit_char_is_decimal_digit (*current_p))\n          {\n            qmax = lit_parse_decimal (&current_p, re_ctx_p->input_end_p);\n          }\n\n          if (current_p >= re_ctx_p->input_end_p || *current_p++ != LIT_CHAR_RIGHT_BRACE)\n          {\n            break;\n          }\n        }\n        else\n        {\n          break;\n        }\n\n        re_ctx_p->token.qmin = qmin;\n        re_ctx_p->token.qmax = qmax;\n        re_ctx_p->input_curr_p = current_p;\n        re_parse_lazy_char (re_ctx_p);\n        return ECMA_VALUE_TRUE;\n      }\n      default:\n      {\n        break;\n      }\n    }\n  }\n\n  re_ctx_p->token.qmin = 1;\n  re_ctx_p->token.qmax = 1;\n  re_ctx_p->token.greedy = true;\n\n  return ECMA_VALUE_FALSE;\n} /* re_parse_quantifier */\n\n/**\n * Count the number of groups in the current pattern.\n */\nstatic void\nre_count_groups (re_compiler_ctx_t *re_ctx_p) /**< RegExp compiler context */\n{\n  bool is_char_class = 0;\n  re_ctx_p->groups_count = 0;\n  const lit_utf8_byte_t *curr_p = re_ctx_p->input_start_p;\n\n  while (curr_p < re_ctx_p->input_end_p)\n  {\n    switch (*curr_p++)\n    {\n      case LIT_CHAR_BACKSLASH:\n      {\n        if (curr_p < re_ctx_p->input_end_p)\n        {\n          lit_utf8_incr (&curr_p);\n        }\n        break;\n      }\n      case LIT_CHAR_LEFT_SQUARE:\n      {\n        is_char_class = true;\n        break;\n      }\n      case LIT_CHAR_RIGHT_SQUARE:\n      {\n        is_char_class = false;\n        break;\n      }\n      case LIT_CHAR_LEFT_PAREN:\n      {\n        if (curr_p < re_ctx_p->input_end_p\n            && *curr_p != LIT_CHAR_QUESTION\n            && !is_char_class)\n        {\n          re_ctx_p->groups_count++;\n        }\n        break;\n      }\n    }\n  }\n} /* re_count_groups */\n\n#if ENABLED (JERRY_ESNEXT)\n/**\n * Check if a code point is a Syntax character\n *\n * @return true, if syntax character\n *         false, otherwise\n */\nstatic bool\nre_is_syntax_char (lit_code_point_t cp) /**< code point */\n{\n  return (cp == LIT_CHAR_CIRCUMFLEX\n          || cp == LIT_CHAR_DOLLAR_SIGN\n          || cp == LIT_CHAR_BACKSLASH\n          || cp == LIT_CHAR_DOT\n          || cp == LIT_CHAR_ASTERISK\n          || cp == LIT_CHAR_PLUS\n          || cp == LIT_CHAR_QUESTION\n          || cp == LIT_CHAR_LEFT_PAREN\n          || cp == LIT_CHAR_RIGHT_PAREN\n          || cp == LIT_CHAR_LEFT_SQUARE\n          || cp == LIT_CHAR_RIGHT_SQUARE\n          || cp == LIT_CHAR_LEFT_BRACE\n          || cp == LIT_CHAR_RIGHT_BRACE\n          || cp == LIT_CHAR_VLINE);\n} /* re_is_syntax_char */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Parse a Character Escape or a Character Class Escape.\n *\n * @return ECMA_VALUE_EMPTY, if parsed successfully\n *         ECMA_VALUE_ERROR, otherwise\n */\nstatic ecma_value_t\nre_parse_char_escape (re_compiler_ctx_t *re_ctx_p) /**< RegExp compiler context */\n{\n  JERRY_ASSERT (re_ctx_p->input_curr_p < re_ctx_p->input_end_p);\n  re_ctx_p->token.type = RE_TOK_CHAR;\n\n  if (lit_char_is_decimal_digit (*re_ctx_p->input_curr_p))\n  {\n    /* NULL code point escape, only valid if there are no following digits. */\n    if (*re_ctx_p->input_curr_p == LIT_CHAR_0\n        && (re_ctx_p->input_curr_p + 1 >= re_ctx_p->input_end_p\n            || !lit_char_is_decimal_digit (re_ctx_p->input_curr_p[1])))\n    {\n      re_ctx_p->input_curr_p++;\n      re_ctx_p->token.value = LIT_UNICODE_CODE_POINT_NULL;\n      return ECMA_VALUE_EMPTY;\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (re_ctx_p->flags & RE_FLAG_UNICODE)\n    {\n      return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid escape sequence\"));\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    /* Legacy octal escape sequence */\n    if (lit_char_is_octal_digit (*re_ctx_p->input_curr_p))\n    {\n      re_ctx_p->token.value = re_parse_octal (re_ctx_p);\n      return ECMA_VALUE_EMPTY;\n    }\n\n    /* Identity escape */\n    re_ctx_p->token.value = *re_ctx_p->input_curr_p++;\n    return ECMA_VALUE_EMPTY;\n  }\n\n  lit_code_point_t ch = lit_cesu8_read_next (&re_ctx_p->input_curr_p);\n  switch (ch)\n  {\n    /* Character Class escapes */\n    case LIT_CHAR_LOWERCASE_D:\n    {\n      re_ctx_p->token.type = RE_TOK_CLASS_ESCAPE;\n      re_ctx_p->token.value = RE_ESCAPE_DIGIT;\n      break;\n    }\n    case LIT_CHAR_UPPERCASE_D:\n    {\n      re_ctx_p->token.type = RE_TOK_CLASS_ESCAPE;\n      re_ctx_p->token.value = RE_ESCAPE_NOT_DIGIT;\n      break;\n    }\n    case LIT_CHAR_LOWERCASE_S:\n    {\n      re_ctx_p->token.type = RE_TOK_CLASS_ESCAPE;\n      re_ctx_p->token.value = RE_ESCAPE_WHITESPACE;\n      break;\n    }\n    case LIT_CHAR_UPPERCASE_S:\n    {\n      re_ctx_p->token.type = RE_TOK_CLASS_ESCAPE;\n      re_ctx_p->token.value = RE_ESCAPE_NOT_WHITESPACE;\n      break;\n    }\n    case LIT_CHAR_LOWERCASE_W:\n    {\n      re_ctx_p->token.type = RE_TOK_CLASS_ESCAPE;\n      re_ctx_p->token.value = RE_ESCAPE_WORD_CHAR;\n      break;\n    }\n    case LIT_CHAR_UPPERCASE_W:\n    {\n      re_ctx_p->token.type = RE_TOK_CLASS_ESCAPE;\n      re_ctx_p->token.value = RE_ESCAPE_NOT_WORD_CHAR;\n      break;\n    }\n    /* Control escapes */\n    case LIT_CHAR_LOWERCASE_F:\n    {\n      re_ctx_p->token.value = LIT_CHAR_FF;\n      break;\n    }\n    case LIT_CHAR_LOWERCASE_N:\n    {\n      re_ctx_p->token.value = LIT_CHAR_LF;\n      break;\n    }\n    case LIT_CHAR_LOWERCASE_R:\n    {\n      re_ctx_p->token.value = LIT_CHAR_CR;\n      break;\n    }\n    case LIT_CHAR_LOWERCASE_T:\n    {\n      re_ctx_p->token.value = LIT_CHAR_TAB;\n      break;\n    }\n    case LIT_CHAR_LOWERCASE_V:\n    {\n      re_ctx_p->token.value = LIT_CHAR_VTAB;\n      break;\n    }\n    /* Control letter */\n    case LIT_CHAR_LOWERCASE_C:\n    {\n      if (re_ctx_p->input_curr_p < re_ctx_p->input_end_p)\n      {\n        ch = *re_ctx_p->input_curr_p;\n\n        if ((ch >= LIT_CHAR_ASCII_UPPERCASE_LETTERS_BEGIN && ch <= LIT_CHAR_ASCII_UPPERCASE_LETTERS_END)\n            || (ch >= LIT_CHAR_ASCII_LOWERCASE_LETTERS_BEGIN && ch <= LIT_CHAR_ASCII_LOWERCASE_LETTERS_END))\n        {\n          re_ctx_p->token.value = (ch % 32);\n          re_ctx_p->input_curr_p++;\n\n          break;\n        }\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (re_ctx_p->flags & RE_FLAG_UNICODE)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid control escape sequence\"));\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      re_ctx_p->token.value = LIT_CHAR_BACKSLASH;\n      re_ctx_p->input_curr_p--;\n\n      break;\n    }\n    /* Hex escape */\n    case LIT_CHAR_LOWERCASE_X:\n    {\n      uint32_t hex_value = lit_char_hex_lookup (re_ctx_p->input_curr_p, re_ctx_p->input_end_p, 2);\n      if (hex_value != UINT32_MAX)\n      {\n        re_ctx_p->token.value = hex_value;\n        re_ctx_p->input_curr_p += 2;\n        break;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (re_ctx_p->flags & RE_FLAG_UNICODE)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid hex escape sequence\"));\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      re_ctx_p->token.value = LIT_CHAR_LOWERCASE_X;\n      break;\n    }\n    /* Unicode escape */\n    case LIT_CHAR_LOWERCASE_U:\n    {\n      uint32_t hex_value = lit_char_hex_lookup (re_ctx_p->input_curr_p, re_ctx_p->input_end_p, 4);\n      if (hex_value != UINT32_MAX)\n      {\n        re_ctx_p->token.value = hex_value;\n        re_ctx_p->input_curr_p += 4;\n\n#if ENABLED (JERRY_ESNEXT)\n        if (re_ctx_p->flags & RE_FLAG_UNICODE\n            && lit_is_code_point_utf16_high_surrogate (re_ctx_p->token.value)\n            && re_ctx_p->input_curr_p + 6 <= re_ctx_p->input_end_p\n            && re_ctx_p->input_curr_p[0] == '\\\\'\n            && re_ctx_p->input_curr_p[1] == 'u')\n        {\n          hex_value = lit_char_hex_lookup (re_ctx_p->input_curr_p + 2, re_ctx_p->input_end_p, 4);\n          if (lit_is_code_point_utf16_low_surrogate (hex_value))\n          {\n            re_ctx_p->token.value = lit_convert_surrogate_pair_to_code_point ((ecma_char_t) re_ctx_p->token.value,\n                                                                              (ecma_char_t) hex_value);\n            re_ctx_p->input_curr_p += 6;\n          }\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n        break;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (re_ctx_p->flags & RE_FLAG_UNICODE)\n      {\n        if (re_ctx_p->input_curr_p + 1 < re_ctx_p->input_end_p\n            && re_ctx_p->input_curr_p[0] == LIT_CHAR_LEFT_BRACE\n            && lit_char_is_hex_digit (re_ctx_p->input_curr_p[1]))\n        {\n          lit_code_point_t cp = lit_char_hex_to_int (re_ctx_p->input_curr_p[1]);\n          re_ctx_p->input_curr_p += 2;\n\n          while (re_ctx_p->input_curr_p < re_ctx_p->input_end_p && lit_char_is_hex_digit (*re_ctx_p->input_curr_p))\n          {\n            cp = cp * 16 + lit_char_hex_to_int (*re_ctx_p->input_curr_p++);\n\n            if (JERRY_UNLIKELY (cp > LIT_UNICODE_CODE_POINT_MAX))\n            {\n              return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid unicode escape sequence\"));\n            }\n          }\n\n          if (re_ctx_p->input_curr_p < re_ctx_p->input_end_p && *re_ctx_p->input_curr_p == LIT_CHAR_RIGHT_BRACE)\n          {\n            re_ctx_p->input_curr_p++;\n            re_ctx_p->token.value = cp;\n            break;\n          }\n        }\n\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid unicode escape sequence\"));\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      re_ctx_p->token.value = LIT_CHAR_LOWERCASE_U;\n      break;\n    }\n    /* Identity escape */\n    default:\n    {\n#if ENABLED (JERRY_ESNEXT)\n      /* Must be '/', or one of SyntaxCharacter */\n      if (re_ctx_p->flags & RE_FLAG_UNICODE\n          && ch != LIT_CHAR_SLASH\n          && !re_is_syntax_char (ch))\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid escape\"));\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      re_ctx_p->token.value = ch;\n    }\n  }\n\n  return ECMA_VALUE_EMPTY;\n} /* re_parse_char_escape */\n\n/**\n * Read the input pattern and parse the next token for the RegExp compiler\n *\n * @return empty ecma value - if parsed successfully\n *         error ecma value - otherwise\n *\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\nre_parse_next_token (re_compiler_ctx_t *re_ctx_p) /**< RegExp compiler context */\n{\n  if (re_ctx_p->input_curr_p >= re_ctx_p->input_end_p)\n  {\n    re_ctx_p->token.type = RE_TOK_EOF;\n    return ECMA_VALUE_EMPTY;\n  }\n\n  ecma_char_t ch = lit_cesu8_read_next (&re_ctx_p->input_curr_p);\n\n  switch (ch)\n  {\n    case LIT_CHAR_CIRCUMFLEX:\n    {\n      re_ctx_p->token.type = RE_TOK_ASSERT_START;\n      return ECMA_VALUE_EMPTY;\n    }\n    case LIT_CHAR_DOLLAR_SIGN:\n    {\n      re_ctx_p->token.type = RE_TOK_ASSERT_END;\n      return ECMA_VALUE_EMPTY;\n    }\n    case LIT_CHAR_VLINE:\n    {\n      re_ctx_p->token.type = RE_TOK_ALTERNATIVE;\n      return ECMA_VALUE_EMPTY;\n    }\n    case LIT_CHAR_DOT:\n    {\n      re_ctx_p->token.type = RE_TOK_PERIOD;\n      /* Check quantifier */\n      break;\n    }\n    case LIT_CHAR_BACKSLASH:\n    {\n      if (re_ctx_p->input_curr_p >= re_ctx_p->input_end_p)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid escape\"));\n      }\n\n      /* DecimalEscape, Backreferences cannot start with a zero digit. */\n      if (*re_ctx_p->input_curr_p > LIT_CHAR_0 && *re_ctx_p->input_curr_p <= LIT_CHAR_9)\n      {\n        const lit_utf8_byte_t *digits_p = re_ctx_p->input_curr_p;\n        const uint32_t value = lit_parse_decimal (&digits_p, re_ctx_p->input_end_p);\n\n        if (re_ctx_p->groups_count < 0)\n        {\n          re_count_groups (re_ctx_p);\n        }\n\n        if (value <= (uint32_t) re_ctx_p->groups_count)\n        {\n          /* Valid backreference */\n          re_ctx_p->input_curr_p = digits_p;\n          re_ctx_p->token.type = RE_TOK_BACKREFERENCE;\n          re_ctx_p->token.value = value;\n\n          /* Check quantifier */\n          break;\n        }\n      }\n\n      if (*re_ctx_p->input_curr_p == LIT_CHAR_LOWERCASE_B)\n      {\n        re_ctx_p->input_curr_p++;\n        re_ctx_p->token.type = RE_TOK_ASSERT_WORD_BOUNDARY;\n        return ECMA_VALUE_EMPTY;\n      }\n      else if (*re_ctx_p->input_curr_p == LIT_CHAR_UPPERCASE_B)\n      {\n        re_ctx_p->input_curr_p++;\n        re_ctx_p->token.type = RE_TOK_ASSERT_NOT_WORD_BOUNDARY;\n        return ECMA_VALUE_EMPTY;\n      }\n\n      const ecma_value_t parse_result = re_parse_char_escape (re_ctx_p);\n\n      if (ECMA_IS_VALUE_ERROR (parse_result))\n      {\n        return parse_result;\n      }\n\n      /* Check quantifier */\n      break;\n    }\n    case LIT_CHAR_LEFT_PAREN:\n    {\n      if (re_ctx_p->input_curr_p >= re_ctx_p->input_end_p)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Unterminated group\"));\n      }\n\n      if (*re_ctx_p->input_curr_p == LIT_CHAR_QUESTION)\n      {\n        re_ctx_p->input_curr_p++;\n        if (re_ctx_p->input_curr_p >= re_ctx_p->input_end_p)\n        {\n          return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid group\"));\n        }\n\n        ch = *re_ctx_p->input_curr_p++;\n\n        if (ch == LIT_CHAR_EQUALS)\n        {\n          re_ctx_p->token.type = RE_TOK_ASSERT_LOOKAHEAD;\n          re_ctx_p->token.value = false;\n        }\n        else if (ch == LIT_CHAR_EXCLAMATION)\n        {\n          re_ctx_p->token.type = RE_TOK_ASSERT_LOOKAHEAD;\n          re_ctx_p->token.value = true;\n        }\n        else if (ch == LIT_CHAR_COLON)\n        {\n          re_ctx_p->token.type = RE_TOK_START_NON_CAPTURE_GROUP;\n        }\n        else\n        {\n          return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid group\"));\n        }\n      }\n      else\n      {\n        re_ctx_p->token.type = RE_TOK_START_CAPTURE_GROUP;\n      }\n\n      return ECMA_VALUE_EMPTY;\n    }\n    case LIT_CHAR_RIGHT_PAREN:\n    {\n      re_ctx_p->token.type = RE_TOK_END_GROUP;\n\n      return ECMA_VALUE_EMPTY;\n    }\n    case LIT_CHAR_LEFT_SQUARE:\n    {\n      re_ctx_p->token.type = RE_TOK_CHAR_CLASS;\n\n      if (re_ctx_p->input_curr_p >= re_ctx_p->input_end_p)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Unterminated character class.\"));\n      }\n\n      return ECMA_VALUE_EMPTY;\n    }\n    case LIT_CHAR_QUESTION:\n    case LIT_CHAR_ASTERISK:\n    case LIT_CHAR_PLUS:\n    {\n      return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid quantifier.\"));\n    }\n    case LIT_CHAR_LEFT_BRACE:\n    {\n      re_ctx_p->input_curr_p--;\n      if (ecma_is_value_true (re_parse_quantifier (re_ctx_p)))\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Nothing to repeat.\"));\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (re_ctx_p->flags & RE_FLAG_UNICODE)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Lone quantifier bracket.\"));\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      re_ctx_p->input_curr_p++;\n      re_ctx_p->token.type = RE_TOK_CHAR;\n      re_ctx_p->token.value = ch;\n\n      /* Check quantifier */\n      break;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case LIT_CHAR_RIGHT_SQUARE:\n    case LIT_CHAR_RIGHT_BRACE:\n    {\n      if (re_ctx_p->flags & RE_FLAG_UNICODE)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Lone quantifier bracket.\"));\n      }\n\n      /* FALLTHRU */\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      re_ctx_p->token.type = RE_TOK_CHAR;\n      re_ctx_p->token.value = ch;\n\n#if ENABLED (JERRY_ESNEXT)\n      if (re_ctx_p->flags & RE_FLAG_UNICODE\n          && lit_is_code_point_utf16_high_surrogate (ch)\n          && re_ctx_p->input_curr_p < re_ctx_p->input_end_p)\n      {\n        const ecma_char_t next = lit_cesu8_peek_next (re_ctx_p->input_curr_p);\n        if (lit_is_code_point_utf16_low_surrogate (next))\n        {\n          re_ctx_p->token.value = lit_convert_surrogate_pair_to_code_point (ch, next);\n          re_ctx_p->input_curr_p += LIT_UTF8_MAX_BYTES_IN_CODE_UNIT;\n        }\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      /* Check quantifier */\n      break;\n    }\n  }\n\n  re_parse_quantifier (re_ctx_p);\n  return re_check_quantifier (re_ctx_p);\n} /* re_parse_next_token */\n\n/**\n * Append a character class range to the bytecode.\n */\nstatic void\nre_class_add_range (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context */\n                    lit_code_point_t start, /**< range begin */\n                    lit_code_point_t end) /**< range end */\n{\n  if (re_ctx_p->flags & RE_FLAG_IGNORE_CASE)\n  {\n    start = ecma_regexp_canonicalize_char (start, re_ctx_p->flags & RE_FLAG_UNICODE);\n    end = ecma_regexp_canonicalize_char (end, re_ctx_p->flags & RE_FLAG_UNICODE);\n  }\n\n  re_append_char (re_ctx_p, start);\n  re_append_char (re_ctx_p, end);\n} /* re_class_add_range */\n\n/**\n * Add a single character to the character class\n */\nstatic void\nre_class_add_char (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context */\n                    uint32_t class_offset, /**< character class bytecode offset*/\n                    lit_code_point_t cp) /**< code point */\n{\n  if (re_ctx_p->flags & RE_FLAG_IGNORE_CASE)\n  {\n    cp = ecma_regexp_canonicalize_char (cp, re_ctx_p->flags & RE_FLAG_UNICODE);\n  }\n\n  re_insert_char (re_ctx_p, class_offset, cp);\n} /* re_class_add_char */\n\n/**\n * Invalid character code point\n */\n#define RE_INVALID_CP 0xFFFFFFFF\n\n/**\n * Read the input pattern and parse the range of character class\n *\n * @return empty ecma value - if parsed successfully\n *         error ecma value - otherwise\n *\n *         Returned value must be freed with ecma_free_value\n */\nstatic ecma_value_t\nre_parse_char_class (re_compiler_ctx_t *re_ctx_p) /**< RegExp compiler context */\n{\n  static const uint8_t escape_flags[] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20};\n  const uint32_t class_offset = re_bytecode_size (re_ctx_p);\n\n  uint8_t found_escape_flags = 0;\n  uint8_t out_class_flags = 0;\n\n  uint32_t range_count = 0;\n  uint32_t char_count = 0;\n  bool is_range = false;\n\n  JERRY_ASSERT (re_ctx_p->input_curr_p < re_ctx_p->input_end_p);\n  if (*re_ctx_p->input_curr_p == LIT_CHAR_CIRCUMFLEX)\n  {\n    re_ctx_p->input_curr_p++;\n    out_class_flags |= RE_CLASS_INVERT;\n  }\n\n  lit_code_point_t start = RE_INVALID_CP;\n\n  while (true)\n  {\n    if (re_ctx_p->input_curr_p >= re_ctx_p->input_end_p)\n    {\n      return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Unterminated character class.\"));\n    }\n\n    if (*re_ctx_p->input_curr_p == LIT_CHAR_RIGHT_SQUARE)\n    {\n      if (is_range)\n      {\n        if (start != RE_INVALID_CP)\n        {\n          re_class_add_char (re_ctx_p, class_offset, start);\n          char_count++;\n        }\n\n        re_class_add_char (re_ctx_p, class_offset, LIT_CHAR_MINUS);\n        char_count++;\n      }\n\n      re_ctx_p->input_curr_p++;\n      break;\n    }\n\n    JERRY_ASSERT (re_ctx_p->input_curr_p < re_ctx_p->input_end_p);\n    lit_code_point_t current;\n\n    if (*re_ctx_p->input_curr_p == LIT_CHAR_BACKSLASH)\n    {\n      re_ctx_p->input_curr_p++;\n      if (re_ctx_p->input_curr_p >= re_ctx_p->input_end_p)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid escape\"));\n      }\n\n      if (*re_ctx_p->input_curr_p == LIT_CHAR_LOWERCASE_B)\n      {\n        re_ctx_p->input_curr_p++;\n        current = LIT_CHAR_BS;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      else if (*re_ctx_p->input_curr_p == LIT_CHAR_MINUS)\n      {\n        re_ctx_p->input_curr_p++;\n        current = LIT_CHAR_MINUS;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      else if ((re_ctx_p->flags & RE_FLAG_UNICODE) == 0\n               && *re_ctx_p->input_curr_p == LIT_CHAR_LOWERCASE_C\n               && re_ctx_p->input_curr_p + 1 < re_ctx_p->input_end_p\n               && (lit_char_is_decimal_digit (*(re_ctx_p->input_curr_p + 1))\n                   || *(re_ctx_p->input_curr_p + 1) == LIT_CHAR_UNDERSCORE))\n      {\n        current = ((uint8_t) *(re_ctx_p->input_curr_p + 1) % 32);\n        re_ctx_p->input_curr_p += 2;\n      }\n      else\n      {\n        if (ECMA_IS_VALUE_ERROR (re_parse_char_escape (re_ctx_p)))\n        {\n          return ECMA_VALUE_ERROR;\n        }\n\n        if (re_ctx_p->token.type == RE_TOK_CLASS_ESCAPE)\n        {\n          const uint8_t escape = (uint8_t) re_ctx_p->token.value;\n          found_escape_flags |= escape_flags[escape];\n          current = RE_INVALID_CP;\n        }\n        else\n        {\n          JERRY_ASSERT (re_ctx_p->token.type == RE_TOK_CHAR);\n          current = re_ctx_p->token.value;\n        }\n      }\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (re_ctx_p->flags & RE_FLAG_UNICODE)\n    {\n      current = ecma_regexp_unicode_advance (&re_ctx_p->input_curr_p, re_ctx_p->input_end_p);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    else\n    {\n      current = lit_cesu8_read_next (&re_ctx_p->input_curr_p);\n    }\n\n    if (is_range)\n    {\n      is_range = false;\n\n      if (start != RE_INVALID_CP && current != RE_INVALID_CP)\n      {\n        if (start > current)\n        {\n          return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Range out of order in character class\"));\n        }\n\n        re_class_add_range (re_ctx_p, start, current);\n        range_count++;\n        continue;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (re_ctx_p->flags & RE_FLAG_UNICODE)\n      {\n        return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Invalid character class\"));\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      if (start != RE_INVALID_CP)\n      {\n        re_class_add_char (re_ctx_p, class_offset, start);\n        char_count++;\n      }\n      else if (current != RE_INVALID_CP)\n      {\n        re_class_add_char (re_ctx_p, class_offset, current);\n        char_count++;\n      }\n\n      re_class_add_char (re_ctx_p, class_offset, LIT_CHAR_MINUS);\n      char_count++;\n      continue;\n    }\n\n    if (re_ctx_p->input_curr_p < re_ctx_p->input_end_p\n        && *re_ctx_p->input_curr_p == LIT_CHAR_MINUS)\n    {\n      re_ctx_p->input_curr_p++;\n      start = current;\n      is_range = true;\n      continue;\n    }\n\n    if (current != RE_INVALID_CP)\n    {\n      re_class_add_char (re_ctx_p, class_offset, current);\n      char_count++;\n    }\n  }\n\n  uint8_t escape_count = 0;\n  for (ecma_class_escape_t escape = RE_ESCAPE__START; escape < RE_ESCAPE__COUNT; ++escape)\n  {\n    if (found_escape_flags & escape_flags[escape])\n    {\n      re_insert_byte (re_ctx_p, class_offset, (uint8_t) escape);\n      escape_count++;\n    }\n  }\n\n  if (range_count > 0)\n  {\n    re_insert_value (re_ctx_p, class_offset, range_count);\n    out_class_flags |= RE_CLASS_HAS_RANGES;\n  }\n\n  if (char_count > 0)\n  {\n    re_insert_value (re_ctx_p, class_offset, char_count);\n    out_class_flags |= RE_CLASS_HAS_CHARS;\n  }\n\n  JERRY_ASSERT (escape_count <= RE_CLASS_ESCAPE_COUNT_MASK);\n  out_class_flags |= escape_count;\n\n  re_insert_byte (re_ctx_p, class_offset, out_class_flags);\n  re_insert_opcode (re_ctx_p, class_offset, RE_OP_CHAR_CLASS);\n\n  re_parse_quantifier (re_ctx_p);\n  return re_check_quantifier (re_ctx_p);\n} /* re_parse_char_class */\n\n/**\n * Parse alternatives\n *\n * @return empty ecma value - if alternative was successfully parsed\n *         error ecma value - otherwise\n *\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\nre_parse_alternative (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context */\n                      bool expect_eof) /**< expect end of file */\n{\n  ECMA_CHECK_STACK_USAGE ();\n  uint32_t alternative_offset = re_bytecode_size (re_ctx_p);\n  bool first_alternative = true;\n\n  while (true)\n  {\n    ecma_value_t next_token_result = re_parse_next_token (re_ctx_p);\n    if (ECMA_IS_VALUE_ERROR (next_token_result))\n    {\n      return next_token_result;\n    }\n\n    JERRY_ASSERT (ecma_is_value_empty (next_token_result));\n\n    uint32_t atom_offset = re_bytecode_size (re_ctx_p);\n\n    switch (re_ctx_p->token.type)\n    {\n      case RE_TOK_START_CAPTURE_GROUP:\n      {\n        const uint32_t idx = re_ctx_p->captures_count++;\n        const uint32_t capture_start = idx;\n\n        ecma_value_t result = re_parse_alternative (re_ctx_p, false);\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          return result;\n        }\n\n        re_parse_quantifier (re_ctx_p);\n\n        if (ECMA_IS_VALUE_ERROR (re_check_quantifier (re_ctx_p)))\n        {\n          return ECMA_VALUE_ERROR;\n        }\n\n        re_insert_into_group (re_ctx_p, atom_offset, idx, capture_start, true);\n        break;\n      }\n      case RE_TOK_START_NON_CAPTURE_GROUP:\n      {\n        const uint32_t idx = re_ctx_p->non_captures_count++;\n        const uint32_t capture_start = re_ctx_p->captures_count;\n\n        ecma_value_t result = re_parse_alternative (re_ctx_p, false);\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          return result;\n        }\n\n        re_parse_quantifier (re_ctx_p);\n\n        if (ECMA_IS_VALUE_ERROR (re_check_quantifier (re_ctx_p)))\n        {\n          return ECMA_VALUE_ERROR;\n        }\n\n        re_insert_into_group (re_ctx_p, atom_offset, idx, capture_start, false);\n        break;\n      }\n      case RE_TOK_PERIOD:\n      {\n#if ENABLED (JERRY_ESNEXT)\n        re_append_opcode (re_ctx_p, (re_ctx_p->flags & RE_FLAG_UNICODE) ? RE_OP_UNICODE_PERIOD : RE_OP_PERIOD);\n#else /* !ENABLED (JERRY_ESNEXT) */\n        re_append_opcode (re_ctx_p, RE_OP_PERIOD);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n        re_insert_atom_iterator (re_ctx_p, atom_offset);\n        break;\n      }\n      case RE_TOK_ALTERNATIVE:\n      {\n        re_insert_value (re_ctx_p, alternative_offset, re_bytecode_size (re_ctx_p) - alternative_offset);\n        re_insert_opcode (re_ctx_p, alternative_offset, first_alternative ? RE_OP_ALTERNATIVE_START\n                                                                          : RE_OP_ALTERNATIVE_NEXT);\n\n        alternative_offset = re_bytecode_size (re_ctx_p);\n        first_alternative = false;\n        break;\n      }\n      case RE_TOK_ASSERT_START:\n      {\n        re_append_opcode (re_ctx_p, RE_OP_ASSERT_LINE_START);\n        break;\n      }\n      case RE_TOK_ASSERT_END:\n      {\n        re_append_opcode (re_ctx_p, RE_OP_ASSERT_LINE_END);\n        break;\n      }\n      case RE_TOK_ASSERT_WORD_BOUNDARY:\n      {\n        re_append_opcode (re_ctx_p, RE_OP_ASSERT_WORD_BOUNDARY);\n        break;\n      }\n      case RE_TOK_ASSERT_NOT_WORD_BOUNDARY:\n      {\n        re_append_opcode (re_ctx_p, RE_OP_ASSERT_NOT_WORD_BOUNDARY);\n        break;\n      }\n      case RE_TOK_ASSERT_LOOKAHEAD:\n      {\n        const uint32_t start_capture_count = re_ctx_p->captures_count;\n        const bool is_negative = !!re_ctx_p->token.value;\n\n        ecma_value_t result = re_parse_alternative (re_ctx_p, false);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          return result;\n        }\n\n#if ENABLED (JERRY_ESNEXT)\n        if (re_ctx_p->flags & RE_FLAG_UNICODE)\n        {\n          re_ctx_p->token.qmin = 1;\n          re_ctx_p->token.qmax = 1;\n          re_ctx_p->token.greedy = true;\n        }\n        else\n#endif /* ENABLED (JERRY_ESNEXT) */\n        {\n          re_parse_quantifier (re_ctx_p);\n\n          if (ECMA_IS_VALUE_ERROR (re_check_quantifier (re_ctx_p)))\n          {\n            return ECMA_VALUE_ERROR;\n          }\n        }\n\n        re_insert_assertion_lookahead (re_ctx_p, atom_offset, start_capture_count, is_negative);\n        break;\n      }\n      case RE_TOK_BACKREFERENCE:\n      {\n        const uint32_t backref_idx = re_ctx_p->token.value;\n        re_append_opcode (re_ctx_p, RE_OP_BACKREFERENCE);\n        re_append_value (re_ctx_p, backref_idx);\n\n        if (re_ctx_p->token.qmin != 1 || re_ctx_p->token.qmax != 1)\n        {\n          const uint32_t group_idx = re_ctx_p->non_captures_count++;\n          re_insert_into_group (re_ctx_p, atom_offset, group_idx, re_ctx_p->captures_count, false);\n        }\n\n        break;\n      }\n      case RE_TOK_CLASS_ESCAPE:\n      {\n        const ecma_class_escape_t escape = (ecma_class_escape_t) re_ctx_p->token.value;\n        re_append_opcode (re_ctx_p, RE_OP_CLASS_ESCAPE);\n        re_append_byte (re_ctx_p, (uint8_t) escape);\n\n        re_insert_atom_iterator (re_ctx_p, atom_offset);\n        break;\n      }\n      case RE_TOK_CHAR_CLASS:\n      {\n        ecma_value_t result = re_parse_char_class (re_ctx_p);\n\n        if (ECMA_IS_VALUE_ERROR (result))\n        {\n          return result;\n        }\n\n        re_insert_atom_iterator (re_ctx_p, atom_offset);\n        break;\n      }\n      case RE_TOK_END_GROUP:\n      {\n        if (expect_eof)\n        {\n          return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Unmatched ')'\"));\n        }\n\n        if (!first_alternative)\n        {\n          re_insert_value (re_ctx_p, alternative_offset, re_bytecode_size (re_ctx_p) - alternative_offset);\n          re_insert_opcode (re_ctx_p, alternative_offset, RE_OP_ALTERNATIVE_NEXT);\n        }\n\n        return ECMA_VALUE_EMPTY;\n      }\n      case RE_TOK_EOF:\n      {\n        if (!expect_eof)\n        {\n          return ecma_raise_syntax_error (ECMA_ERR_MSG (\"Unexpected end of pattern.\"));\n        }\n\n        if (!first_alternative)\n        {\n          re_insert_value (re_ctx_p, alternative_offset, re_bytecode_size (re_ctx_p) - alternative_offset);\n          re_insert_opcode (re_ctx_p, alternative_offset, RE_OP_ALTERNATIVE_NEXT);\n        }\n\n        re_append_opcode (re_ctx_p, RE_OP_EOF);\n        return ECMA_VALUE_EMPTY;\n      }\n      default:\n      {\n        JERRY_ASSERT (re_ctx_p->token.type == RE_TOK_CHAR);\n\n        lit_code_point_t ch = re_ctx_p->token.value;\n\n        if (ch <= LIT_UTF8_1_BYTE_CODE_POINT_MAX && (re_ctx_p->flags & RE_FLAG_IGNORE_CASE) == 0)\n        {\n          re_append_opcode (re_ctx_p, RE_OP_BYTE);\n          re_append_byte (re_ctx_p, (uint8_t) ch);\n\n          re_insert_atom_iterator (re_ctx_p, atom_offset);\n          break;\n        }\n\n        if (re_ctx_p->flags & RE_FLAG_IGNORE_CASE)\n        {\n          ch = ecma_regexp_canonicalize_char (ch, re_ctx_p->flags & RE_FLAG_UNICODE);\n        }\n\n        re_append_opcode (re_ctx_p, RE_OP_CHAR);\n        re_append_char (re_ctx_p, ch);\n\n        re_insert_atom_iterator (re_ctx_p, atom_offset);\n        break;\n      }\n    }\n  }\n\n  return ECMA_VALUE_EMPTY;\n} /* re_parse_alternative */\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/regexp/re-parser.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef RE_PARSER_H\n#define RE_PARSER_H\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n#include \"re-compiler-context.h\"\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup regexparser Regular expression\n * @{\n *\n * \\addtogroup regexparser_parser Parser\n * @{\n */\n\n/**\n * @}\n *\n * \\addtogroup regexparser_parser Parser\n * @{\n */\n\n/**\n * Value used for infinite quantifier.\n */\n#define RE_INFINITY UINT32_MAX\n\n/**\n * Maximum decimal value of an octal escape\n */\n#define RE_MAX_OCTAL_VALUE 0xff\n\necma_value_t re_parse_alternative (re_compiler_ctx_t *re_ctx_p, bool expect_eof);\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#endif /* !RE_PARSER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/parser/regexp/re-token.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef RE_TOKEN_H\n#define RE_TOKEN_H\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n\n/** \\addtogroup parser Parser\n * @{\n *\n * \\addtogroup regexparser Regular expression\n * @{\n *\n * \\addtogroup regexparser_parser Parser\n * @{\n */\n\n/**\n * RegExp token type definitions\n */\ntypedef enum\n{\n  RE_TOK_EOF,                        /**< EOF */\n  RE_TOK_BACKREFERENCE,              /**< \"\\[0..9]\" */\n  RE_TOK_ALTERNATIVE,                /**< \"|\" */\n  RE_TOK_ASSERT_START,               /**< \"^\" */\n  RE_TOK_ASSERT_END,                 /**< \"$\" */\n  RE_TOK_PERIOD,                     /**< \".\" */\n  RE_TOK_START_CAPTURE_GROUP,        /**< \"(\" */\n  RE_TOK_START_NON_CAPTURE_GROUP,    /**< \"(?:\" */\n  RE_TOK_END_GROUP,                  /**< \")\" */\n  RE_TOK_ASSERT_LOOKAHEAD,           /**< \"(?=\" */\n  RE_TOK_ASSERT_WORD_BOUNDARY,       /**< \"\\b\" */\n  RE_TOK_ASSERT_NOT_WORD_BOUNDARY,   /**< \"\\B\" */\n  RE_TOK_CLASS_ESCAPE,               /**< \"\\d \\D \\w \\W \\s \\S\" */\n  RE_TOK_CHAR_CLASS,                 /**< \"[ ]\" */\n  RE_TOK_CHAR,                       /**< any character */\n} re_token_type_t;\n\n/**\n * RegExp token\n */\ntypedef struct\n{\n  uint32_t value;         /**< value of the token */\n  uint32_t qmin;          /**< minimum number of token iterations */\n  uint32_t qmax;          /**< maximum number of token iterations */\n  re_token_type_t type;   /**< type of the token */\n  bool greedy;            /**< type of iteration */\n} re_token_t;\n\n/**\n * @}\n * @}\n * @}\n */\n\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n#endif /* !RE_TOKEN_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/profiles/README.md",
    "content": "### About profile files\n\nSpecify compile definitions in profile files to use when compiling the `jerry-core` target.\n\nThe default profile is ``es.next`` which enables all of the currently implemented features.\n\n### Using profiles with the build system\n\nYou can specify the profile for the build system in the following ways:\n  * with absolute path\n  * with a name (this options selects profiles/$(name).profile file)\n\n#### Restrictions\nOnly single line options are allowed in the profile file. Any line starting with hash-mark is ignored. Semicolon character is not allowed.\n\n\n### Example usage\n\n#### 1. Using the build script\n\nIf you want to use a predefined profile, run the build script as follows\n(assuming that you are in the project root folder):\n\n```\n./tools/build.py --profile=minimal\n```\n\nAlternatively, if you want to use a custom profile at\n`/absolute/path/to/my.profile`:\n\n```\n# Disable not needed features\nJERRY_BUILTIN_DATAVIEW=0\nJERRY_BUILTIN_MAP=0\nJERRY_BUILTIN_PROMISE=0\nJERRY_BUILTIN_SET=0\nJERRY_BUILTIN_TYPEDARRAY=0\n```\n\nRun the build script as follows (assuming that you are in the project root\nfolder):\n\n```\n./tools/build.py --profile=/absolute/path/to/my.profile\n```\n\n\n#### 2. Using only CMake build system\n\nSet FEATURE_PROFILE option to one of the following values:\n* the profile with absolute path\n* name of the profile (which needs to exist in the `profiles` folder)\n\n\n### Configurations\n\nIn JerryScript all of the features are enabled by default, so an empty profile file turns on all of the available ECMA features.\nThe defines can have a value of `0` or `1`. If for whatever reason one of them are not defined, it is treated as if it were\ndefined to `1`.\n\n#### ES 5.1 features\n\n* `JERRY_BUILTIN_ANNEXB`:\n  Enables or disables the [Annex B](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-B) of the ECMA5.1 standard.\n* `JERRY_BUILTIN_ARRAY`:\n  Enables or disable the [Array](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.4) built-in.\n* `JERRY_BUILTIN_BOOLEAN`:\n  Enables or disables the [Boolean](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.6) built-in.\n* `JERRY_BUILTIN_DATE`:\n  Enables or disables the [Date](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.9) built-in.\n* `JERRY_BUILTIN_ERRORS`:\n  Enables or disables the [Native Error Types](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.11.6) (EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError).\n  **Note**: The [Error](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.11.2) object remains available.\n* `JERRY_BUILTIN_JSON`:\n  Enables or disables the [JSON](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.12) built-in.\n* `JERRY_BUILTIN_MATH`:\n  Enables or disables the [Math](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.8) built-in.\n* `JERRY_BUILTIN_NUMBER`:\n  Enables or disables the [Number](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.7) built-in.\n* `JERRY_BUILTIN_REGEXP`:\n  Enables or disables the [RegExp](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.10) built-in.\n* `JERRY_BUILTIN_STRING`:\n  Enables or disables the [String](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.5) built-in.\n* `JERRY_BUILTINS`:\n  Enables or disable all of the [Standard Built-in ECMAScript 5.1 Objects](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15)\n  This option is evaulated first, any other `JERRY_BUILTIN_<name>` defines will override that specific builtin config.\n  Equivalent with setting the following defines to the `JERRY_BUILTINS` value:\n    * `JERRY_BUILTIN_ANNEXB`\n    * `JERRY_BUILTIN_ARRAY`\n    * `JERRY_BUILTIN_BOOLEAN`\n    * `JERRY_BUILTIN_DATE`\n    * `JERRY_BUILTIN_ERRORS`\n    * `JERRY_BUILTIN_JSON`\n    * `JERRY_BUILTIN_MATH`\n    * `JERRY_BUILTIN_NUMBER`\n    * `JERRY_BUILTIN_REGEXP`\n    * `JERRY_BUILTIN_STRING`\n\n#### ES2015+ features\n\n* `JERRY_BUILTIN_BIGINT`:\n  Enables or disables the [BigInt](https://262.ecma-international.org/11.0/#sec-ecmascript-language-types-bigint-type) syntax and built-in.\n* `JERRY_BUILTIN_DATAVIEW`:\n  Enables or disables the [DataView](https://www.ecma-international.org/ecma-262/6.0/#sec-dataview-objects) built-in.\n* `JERRY_BUILTIN_MAP`:\n  Enables or disables the [Map](http://www.ecma-international.org/ecma-262/6.0/#sec-keyed-collection) built-ins.\n* `JERRY_BUILTIN_PROMISE`:\n  Enables or disables the [Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects) built-in.\n* `JERRY_BUILTIN_PROXY`:\n  Enables or disables the [Proxy](https://262.ecma-international.org/11.0/#sec-proxy-object-internal-methods-and-internal-slots) related internal workings and built-in.\n* `JERRY_BUILTIN_REALMS`:\n  Enables or disables the [Realms](https://262.ecma-international.org/11.0/#sec-code-realms) support in the engine.\n* `JERRY_BUILTIN_REFLECT`:\n  Enables or disables the [Reflext](https://262.ecma-international.org/11.0/#sec-reflect-object) built-in.\n* `JERRY_BUILTIN_SET`:\n  Enables or disables the [Set](https://www.ecma-international.org/ecma-262/6.0/#sec-set-objects) built-in.\n* `JERRY_BUILTIN_TYPEDARRAY`:\n  Enables or disables the [ArrayBuffer](http://www.ecma-international.org/ecma-262/6.0/#sec-arraybuffer-objects) and [TypedArray](http://www.ecma-international.org/ecma-262/6.0/#sec-typedarray-objects) built-ins.\n* `JERRY_BUILTIN_WEAKMAP`:\n  Enables or disables the [WeakMap](https://262.ecma-international.org/11.0/#sec-weakmap-objects) built-in.\n* `JERRY_BUILTIN_WEAKSET`:\n  Enables or disables the [WeakSet](https://262.ecma-international.org/11.0/#sec-weakmap-objects) built-in.\n* `JERRY_MODULE_SYSTEM`:\n  Enables or disable the [module system](http://www.ecma-international.org/ecma-262/6.0/#sec-modules) language element.\n* `JERRY_ESNEXT`: Enables or disables all of the implemented [ECMAScript2015+ features](http://www.ecma-international.org/ecma-262/10.0/) above.\n  * [arrow functions](http://www.ecma-international.org/ecma-262/6.0/#sec-arrow-function-definitions) language element.\n  * [async functions](https://262.ecma-international.org/11.0/#sec-async-function-definitions) language element.\n  * [class](https://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions) language element.\n  * [default value](http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions) for formal parameters.\n  * [destructuring assignment](http://www.ecma-international.org/ecma-262/6.0/#sec-destructuring-assignment) language element.\n  * [destructuring binding pattern](http://www.ecma-international.org/ecma-262/6.0/#sec-destructuring-binding-patterns) declarations.\n  * [enhanced object initializer](http://www.ecma-international.org/ecma-262/6.0/#sec-object-initializer) language element.\n  * [for-of](https://www.ecma-international.org/ecma-262/6.0/#sec-for-in-and-for-of-statements) language element.\n  * [for-await-of](https://262.ecma-international.org/11.0/#sec-for-in-and-for-of-statements) language element.\n  * [generator functions](http://www.ecma-international.org/ecma-262/6.0/#sec-generator-function-definitions) language element.\n  * [iterator](https://www.ecma-international.org/ecma-262/6.0/#sec-iterator-interface) built-in.\n  * [nullish coalescing](https://262.ecma-international.org/11.0/#prod-CoalesceExpression) built-in.\n  * [numeric separator](https://github.com/tc39/proposal-numeric-separator) language element.\n  * [rest parameter](http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions) language element.\n  * [rest operator with object destructuring](https://262.ecma-international.org/11.0/#prod-ObjectBindingPattern) language element.\n  * [spread](https://262.ecma-international.org/11.0/#prod-SpreadElement) syntax.\n  * [symbol](https://www.ecma-international.org/ecma-262/6.0/#sec-symbol-objects) language element.\n  * [template strings](http://www.ecma-international.org/ecma-262/6.0/#sec-static-semantics-templatestrings) language element.\n\n  Furthermore all builtins follow the latest ECMAScript specification including those which behave differently in ES5.1.\n  This option is evaulated first, any other `JERRY_<name>` defines will override that specific entry.\n  Equivalent with setting the following defines to the `JERRY_ESNEXT` value:\n    * `JERRY_BUILTIN_BIGINT`\n    * `JERRY_BUILTIN_DATAVIEW`\n    * `JERRY_BUILTIN_MAP`\n    * `JERRY_BUILTIN_PROMISE`\n    * `JERRY_BUILTIN_PROXY`\n    * `JERRY_BUILTIN_REALMS`\n    * `JERRY_BUILTIN_REFLECT`\n    * `JERRY_BUILTIN_SET`\n    * `JERRY_BUILTIN_TYPEDARRAY`\n    * `JERRY_BUILTIN_WEAKMAP`\n    * `JERRY_BUILTIN_WEAKSET`\n    * `JERRY_MODULE_SYSTEM`\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/profiles/es.next.profile",
    "content": "# All features are enabled by default.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/profiles/es2015-subset.profile",
    "content": "# Currently an empty profile.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/profiles/es5.1.profile",
    "content": "JERRY_ESNEXT=0\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/profiles/minimal.profile",
    "content": "JERRY_BUILTINS=0\nJERRY_ESNEXT=0\nJERRY_UNICODE_CASE_CONVERSION=0\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/opcodes-ecma-arithmetics.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-number-arithmetic.h\"\n#include \"ecma-objects.h\"\n#include \"opcodes.h\"\n#include \"jrt-libc-includes.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup vm_opcodes Opcodes\n * @{\n */\n\n/**\n * Perform ECMA number arithmetic operation.\n *\n * The algorithm of the operation is following:\n *   leftNum = ToNumber (leftValue);\n *   rightNum = ToNumber (rightValue);\n *   result = leftNum ArithmeticOp rightNum;\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\ndo_number_arithmetic (number_arithmetic_op op, /**< number arithmetic operation */\n                      ecma_value_t left_value, /**< left value */\n                      ecma_value_t right_value) /**< right value */\n{\n  ecma_number_t left_number;\n  left_value = ecma_op_to_numeric (left_value, &left_number, ECMA_TO_NUMERIC_ALLOW_BIGINT);\n\n  if (ECMA_IS_VALUE_ERROR (left_value))\n  {\n    return left_value;\n  }\n\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (JERRY_LIKELY (!ecma_is_value_bigint (left_value)))\n  {\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n    ecma_number_t right_number;\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (right_value, &right_number)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_number_t result = ECMA_NUMBER_ZERO;\n\n    switch (op)\n    {\n      case NUMBER_ARITHMETIC_SUBTRACTION:\n      {\n        result = left_number - right_number;\n        break;\n      }\n      case NUMBER_ARITHMETIC_MULTIPLICATION:\n      {\n        result = left_number * right_number;\n        break;\n      }\n      case NUMBER_ARITHMETIC_DIVISION:\n      {\n        result = left_number / right_number;\n        break;\n      }\n      case NUMBER_ARITHMETIC_REMAINDER:\n      {\n        result = ecma_op_number_remainder (left_number, right_number);\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case NUMBER_ARITHMETIC_EXPONENTIATION:\n      {\n        result = ecma_number_pow (left_number, right_number);\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n\n    ret_value = ecma_make_number_value (result);\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  }\n  else\n  {\n    bool free_right_value;\n    right_value = ecma_bigint_get_bigint (right_value, &free_right_value);\n\n    if (ECMA_IS_VALUE_ERROR (right_value))\n    {\n      ecma_free_value (left_value);\n      return right_value;\n    }\n\n    switch (op)\n    {\n      case NUMBER_ARITHMETIC_SUBTRACTION:\n      {\n        ret_value = ecma_bigint_add_sub (left_value, right_value, false);\n        break;\n      }\n      case NUMBER_ARITHMETIC_MULTIPLICATION:\n      {\n        ret_value = ecma_bigint_mul (left_value, right_value);\n        break;\n      }\n      case NUMBER_ARITHMETIC_DIVISION:\n      {\n        ret_value = ecma_bigint_div_mod (left_value, right_value, false);\n        break;\n      }\n      case NUMBER_ARITHMETIC_REMAINDER:\n      {\n        ret_value = ecma_bigint_div_mod (left_value, right_value, true);\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case NUMBER_ARITHMETIC_EXPONENTIATION:\n      {\n        ret_value = ecma_bigint_pow (left_value, right_value);\n        break;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    }\n\n    ecma_free_value (left_value);\n    if (free_right_value)\n    {\n      ecma_free_value (right_value);\n    }\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  return ret_value;\n} /* do_number_arithmetic */\n\n/**\n * 'Addition' opcode handler.\n *\n * See also: ECMA-262 v5, 11.6.1\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\nopfunc_addition (ecma_value_t left_value, /**< left value */\n                 ecma_value_t right_value) /**< right value */\n{\n  bool free_left_value = false;\n  bool free_right_value = false;\n\n  if (ecma_is_value_object (left_value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (left_value);\n    left_value = ecma_op_object_default_value (obj_p, ECMA_PREFERRED_TYPE_NO);\n    free_left_value = true;\n\n    if (ECMA_IS_VALUE_ERROR (left_value))\n    {\n      return left_value;\n    }\n  }\n\n  if (ecma_is_value_object (right_value))\n  {\n    ecma_object_t *obj_p = ecma_get_object_from_value (right_value);\n    right_value = ecma_op_object_default_value (obj_p, ECMA_PREFERRED_TYPE_NO);\n    free_right_value = true;\n\n    if (ECMA_IS_VALUE_ERROR (right_value))\n    {\n      if (free_left_value)\n      {\n        ecma_free_value (left_value);\n      }\n      return right_value;\n    }\n  }\n\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n  if (ecma_is_value_string (left_value)\n      || ecma_is_value_string (right_value))\n  {\n    ecma_string_t *string1_p = ecma_op_to_string (left_value);\n\n    if (JERRY_UNLIKELY (string1_p == NULL))\n    {\n      if (free_left_value)\n      {\n        ecma_free_value (left_value);\n      }\n      if (free_right_value)\n      {\n        ecma_free_value (right_value);\n      }\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_string_t *string2_p = ecma_op_to_string (right_value);\n\n    if (JERRY_UNLIKELY (string2_p == NULL))\n    {\n      if (free_right_value)\n      {\n        ecma_free_value (right_value);\n      }\n      if (free_left_value)\n      {\n        ecma_free_value (left_value);\n      }\n      ecma_deref_ecma_string (string1_p);\n      return ECMA_VALUE_ERROR;\n    }\n\n    string1_p = ecma_concat_ecma_strings (string1_p, string2_p);\n    ret_value = ecma_make_string_value (string1_p);\n\n    ecma_deref_ecma_string (string2_p);\n  }\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  else if (JERRY_UNLIKELY (ecma_is_value_bigint (left_value))\n           && JERRY_UNLIKELY (ecma_is_value_bigint (right_value)))\n  {\n    ret_value = ecma_bigint_add_sub (left_value, right_value, true);\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n  else\n  {\n    ecma_number_t num_left;\n    ecma_number_t num_right;\n    if (!ECMA_IS_VALUE_ERROR (ecma_op_to_number (left_value, &num_left))\n        && !ECMA_IS_VALUE_ERROR (ecma_op_to_number (right_value, &num_right)))\n    {\n      ret_value = ecma_make_number_value (num_left + num_right);\n    }\n    else\n    {\n      ret_value = ECMA_VALUE_ERROR;\n    }\n  }\n\n  if (free_left_value)\n  {\n    ecma_free_value (left_value);\n  }\n\n  if (free_right_value)\n  {\n    ecma_free_value (right_value);\n  }\n\n  return ret_value;\n} /* opfunc_addition */\n\n/**\n * Unary operation opcode handler.\n *\n * See also: ECMA-262 v5, 11.4, 11.4.6, 11.4.7\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\nopfunc_unary_operation (ecma_value_t left_value, /**< left value */\n                        bool is_plus) /**< unary plus flag */\n{\n  ecma_number_t left_number;\n  left_value = ecma_op_to_numeric (left_value, &left_number, ECMA_TO_NUMERIC_ALLOW_BIGINT);\n\n  if (ECMA_IS_VALUE_ERROR (left_value))\n  {\n    return left_value;\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (JERRY_LIKELY (!ecma_is_value_bigint (left_value)))\n  {\n    return ecma_make_number_value (is_plus ? left_number : -left_number);\n  }\n\n  ecma_value_t ret_value;\n\n  if (is_plus)\n  {\n    ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Unary operation plus is not allowed for BigInt numbers\"));\n  }\n  else\n  {\n    ret_value = left_value;\n\n    if (left_value != ECMA_BIGINT_ZERO)\n    {\n      ret_value = ecma_bigint_negate (ecma_get_extended_primitive_from_value (left_value));\n    }\n  }\n\n  ecma_free_value (left_value);\n  return ret_value;\n#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */\n  return ecma_make_number_value (is_plus ? left_number : -left_number);\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* opfunc_unary_operation */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/opcodes-ecma-bitwise.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"opcodes.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup vm_opcodes Opcodes\n * @{\n */\n\n/**\n * Perform ECMA number logic operation.\n *\n * The algorithm of the operation is following:\n *   leftNum = ToNumber (leftValue);\n *   rightNum = ToNumber (rightValue);\n *   result = leftNum BitwiseLogicOp rightNum;\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\ndo_number_bitwise_logic (number_bitwise_logic_op op, /**< number bitwise logic operation */\n                         ecma_value_t left_value, /**< left value */\n                         ecma_value_t right_value) /**< right value */\n{\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (left_value)\n                && !ECMA_IS_VALUE_ERROR (right_value));\n\n  ecma_number_t left_number;\n  left_value = ecma_op_to_numeric (left_value, &left_number, ECMA_TO_NUMERIC_ALLOW_BIGINT);\n\n  if (ECMA_IS_VALUE_ERROR (left_value))\n  {\n    return left_value;\n  }\n\n  ecma_value_t ret_value = ECMA_VALUE_EMPTY;\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (JERRY_LIKELY (!ecma_is_value_bigint (left_value)))\n  {\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    ecma_number_t right_number;\n\n    if (ECMA_IS_VALUE_ERROR (ecma_op_to_number (right_value, &right_number)))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    ecma_number_t result = ECMA_NUMBER_ZERO;\n    uint32_t right_uint32 = ecma_number_to_uint32 (right_number);\n\n    switch (op)\n    {\n      case NUMBER_BITWISE_LOGIC_AND:\n      {\n        uint32_t left_uint32 = ecma_number_to_uint32 (left_number);\n        result = (ecma_number_t) ((int32_t) (left_uint32 & right_uint32));\n        break;\n      }\n      case NUMBER_BITWISE_LOGIC_OR:\n      {\n        uint32_t left_uint32 = ecma_number_to_uint32 (left_number);\n        result = (ecma_number_t) ((int32_t) (left_uint32 | right_uint32));\n        break;\n      }\n      case NUMBER_BITWISE_LOGIC_XOR:\n      {\n        uint32_t left_uint32 = ecma_number_to_uint32 (left_number);\n        result = (ecma_number_t) ((int32_t) (left_uint32 ^ right_uint32));\n        break;\n      }\n      case NUMBER_BITWISE_SHIFT_LEFT:\n      {\n        result = (ecma_number_t) (ecma_number_to_int32 (left_number) << (right_uint32 & 0x1F));\n        break;\n      }\n      case NUMBER_BITWISE_SHIFT_RIGHT:\n      {\n        result = (ecma_number_t) (ecma_number_to_int32 (left_number) >> (right_uint32 & 0x1F));\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (op == NUMBER_BITWISE_SHIFT_URIGHT);\n\n        uint32_t left_uint32 = ecma_number_to_uint32 (left_number);\n        result = (ecma_number_t) (left_uint32 >> (right_uint32 & 0x1F));\n        break;\n      }\n    }\n\n    ret_value = ecma_make_number_value (result);\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  }\n  else\n  {\n    bool free_right_value;\n    right_value = ecma_bigint_get_bigint (right_value, &free_right_value);\n\n    if (ECMA_IS_VALUE_ERROR (right_value))\n    {\n      ecma_free_value (left_value);\n      return right_value;\n    }\n\n    switch (op)\n    {\n      case NUMBER_BITWISE_LOGIC_AND:\n      {\n        ret_value = ecma_bigint_and (left_value, right_value);\n        break;\n      }\n      case NUMBER_BITWISE_LOGIC_OR:\n      {\n        ret_value = ecma_bigint_or (left_value, right_value);\n        break;\n      }\n      case NUMBER_BITWISE_LOGIC_XOR:\n      {\n        ret_value = ecma_bigint_xor (left_value, right_value);\n        break;\n      }\n      case NUMBER_BITWISE_SHIFT_LEFT:\n      {\n        ret_value = ecma_bigint_shift (left_value, right_value, true);\n        break;\n      }\n      case NUMBER_BITWISE_SHIFT_RIGHT:\n      {\n        ret_value = ecma_bigint_shift (left_value, right_value, false);\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (op == NUMBER_BITWISE_SHIFT_URIGHT);\n\n        ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Unsigned right shift is not allowed for BigInts\"));\n        break;\n      }\n    }\n\n    ecma_free_value (left_value);\n    if (free_right_value)\n    {\n      ecma_free_value (right_value);\n    }\n  }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n  return ret_value;\n} /* do_number_bitwise_logic */\n\n/**\n * Perform ECMA number bitwise not operation.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\ndo_number_bitwise_not (ecma_value_t value) /**< value */\n{\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (value));\n\n  ecma_number_t number;\n  value = ecma_op_to_numeric (value, &number, ECMA_TO_NUMERIC_ALLOW_BIGINT);\n\n  if (ECMA_IS_VALUE_ERROR (value))\n  {\n    return value;\n  }\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  if (JERRY_LIKELY (!ecma_is_value_bigint (value)))\n  {\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n    return ecma_make_number_value ((ecma_number_t) ((int32_t) ~ecma_number_to_uint32 (number)));\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n  }\n\n  ecma_value_t ret_value = ecma_bigint_unary (value, ECMA_BIGINT_UNARY_BITWISE_NOT);\n  ecma_free_value (value);\n  return ret_value;\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n} /* do_number_bitwise_not */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/opcodes-ecma-relational-equality.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-comparison.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-objects.h\"\n#include \"opcodes.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup vm_opcodes Opcodes\n * @{\n */\n\n/**\n* Equality opcode handler.\n*\n* See also: ECMA-262 v5, 11.9.1, 11.9.2\n*\n* @return ecma value\n*         Returned value must be freed with ecma_free_value\n*/\necma_value_t\nopfunc_equality (ecma_value_t left_value, /**< left value */\n                 ecma_value_t right_value) /**< right value */\n{\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (left_value)\n                && !ECMA_IS_VALUE_ERROR (right_value));\n\n  ecma_value_t compare_result = ecma_op_abstract_equality_compare (left_value, right_value);\n\n  JERRY_ASSERT (ecma_is_value_boolean (compare_result)\n                || ECMA_IS_VALUE_ERROR (compare_result));\n\n  return compare_result;\n} /* opfunc_equality */\n\n/**\n * Relation opcode handler.\n *\n * See also: ECMA-262 v5, 11.8.1, 11.8.2, 11.8.3, 11.8.4\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\nopfunc_relation (ecma_value_t left_value, /**< left value */\n                 ecma_value_t right_value, /**< right value */\n                 bool left_first, /**< 'LeftFirst' flag */\n                 bool is_invert) /**< is invert */\n{\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (left_value)\n                && !ECMA_IS_VALUE_ERROR (right_value));\n\n  ecma_value_t ret_value = ecma_op_abstract_relational_compare (left_value, right_value, left_first);\n\n  if (ECMA_IS_VALUE_ERROR (ret_value))\n  {\n    return ret_value;\n  }\n\n  if (ecma_is_value_undefined (ret_value))\n  {\n    ret_value = ECMA_VALUE_FALSE;\n  }\n  else\n  {\n    JERRY_ASSERT (ecma_is_value_boolean (ret_value));\n\n    if (is_invert)\n    {\n      ret_value = ecma_invert_boolean_value (ret_value);\n    }\n  }\n\n  return ret_value;\n} /* opfunc_relation */\n\n/**\n * 'instanceof' opcode handler.\n *\n * See also: ECMA-262 v5, 11.8.6\n *\n * @return ecma value\n *         returned value must be freed with ecma_free_value.\n */\necma_value_t\nopfunc_instanceof (ecma_value_t left_value, /**< left value */\n                   ecma_value_t right_value) /**< right value */\n{\n  if (!ecma_is_value_object (right_value))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Expected an object in 'instanceof' check.\"));\n  }\n\n#if ENABLED (JERRY_ESNEXT)\n  ecma_value_t has_instance_method = ecma_op_get_method_by_symbol_id (right_value, LIT_GLOBAL_SYMBOL_HAS_INSTANCE);\n  if (ECMA_IS_VALUE_ERROR (has_instance_method))\n  {\n    return has_instance_method;\n  }\n\n  if (JERRY_UNLIKELY (!ecma_is_value_undefined (has_instance_method)))\n  {\n    ecma_object_t *method_obj_p = ecma_get_object_from_value (has_instance_method);\n    ecma_value_t has_instance_result = ecma_op_function_call (method_obj_p, right_value, &left_value, 1);\n\n    ecma_free_value (has_instance_method);\n\n    if (ECMA_IS_VALUE_ERROR (has_instance_result))\n    {\n      return has_instance_result;\n    }\n\n    bool has_instance = ecma_op_to_boolean (has_instance_result);\n    ecma_free_value (has_instance_result);\n\n    return ecma_make_boolean_value (has_instance);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *right_value_obj_p = ecma_get_object_from_value (right_value);\n  return ecma_op_object_has_instance (right_value_obj_p, left_value);\n} /* opfunc_instanceof */\n\n/**\n * 'in' opcode handler.\n *\n * See also:\n *  * ECMA-262 v5, 11.8.7\n *  * ECAM-262 v6, 12.9.3\n *\n * @return ecma value\n *         returned value must be freed with ecma_free_value.\n */\necma_value_t\nopfunc_in (ecma_value_t left_value, /**< left value */\n           ecma_value_t right_value) /**< right value */\n{\n  if (!ecma_is_value_object (right_value))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Expected an object in 'in' check.\"));\n  }\n\n  ecma_string_t *property_name_p = ecma_op_to_property_key (left_value);\n\n  if (JERRY_UNLIKELY (property_name_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_object_t *right_value_obj_p = ecma_get_object_from_value (right_value);\n  ecma_value_t result = ecma_op_object_has_property (right_value_obj_p, property_name_p);\n  ecma_deref_ecma_string (property_name_p);\n  return result;\n} /* opfunc_in */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/opcodes.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-promise-object.h\"\n#include \"ecma-proxy-object.h\"\n#include \"jcontext.h\"\n#include \"opcodes.h\"\n#include \"vm-defines.h\"\n#include \"vm-stack.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup vm_opcodes Opcodes\n * @{\n */\n\n/**\n * 'typeof' opcode handler.\n *\n * See also: ECMA-262 v5, 11.4.3\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\nopfunc_typeof (ecma_value_t left_value) /**< left value */\n{\n  return ecma_make_magic_string_value (ecma_get_typeof_lit_id (left_value));\n} /* opfunc_typeof */\n\n/**\n * Update data property for object literals.\n */\nvoid\nopfunc_set_data_property (ecma_object_t *object_p, /**< object */\n                          ecma_string_t *prop_name_p, /**< data property name */\n                          ecma_value_t value) /**< new value */\n{\n  JERRY_ASSERT (!ecma_op_object_is_fast_array (object_p));\n\n  ecma_property_t *property_p = ecma_find_named_property (object_p, prop_name_p);\n  ecma_property_value_t *prop_value_p;\n\n  if (property_p == NULL)\n  {\n    prop_value_p = ecma_create_named_data_property (object_p,\n                                                    prop_name_p,\n                                                    ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                    NULL);\n  }\n  else\n  {\n    JERRY_ASSERT (ECMA_PROPERTY_IS_RAW (*property_p));\n\n    prop_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n    if (!(*property_p & ECMA_PROPERTY_FLAG_DATA))\n    {\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n      ecma_getter_setter_pointers_t *getter_setter_pair_p;\n      getter_setter_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t,\n                                                        ECMA_PROPERTY_VALUE_PTR (property_p)->getter_setter_pair_cp);\n      jmem_pools_free (getter_setter_pair_p, sizeof (ecma_getter_setter_pointers_t));\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n      *property_p |= ECMA_PROPERTY_FLAG_DATA | ECMA_PROPERTY_FLAG_WRITABLE;\n      prop_value_p->value = ecma_copy_value_if_not_object (value);\n      return;\n    }\n  }\n\n  ecma_named_data_property_assign_value (object_p, prop_value_p, value);\n} /* opfunc_set_data_property */\n\n/**\n * Update getter or setter for object literals.\n */\nvoid\nopfunc_set_accessor (bool is_getter, /**< is getter accessor */\n                     ecma_value_t object, /**< object value */\n                     ecma_string_t *accessor_name_p, /**< accessor name */\n                     ecma_value_t accessor) /**< accessor value */\n{\n  ecma_object_t *object_p = ecma_get_object_from_value (object);\n\n  JERRY_ASSERT (!ecma_op_object_is_fast_array (object_p));\n\n  ecma_property_t *property_p = ecma_find_named_property (object_p, accessor_name_p);\n  ecma_object_t *accessor_p = ecma_get_object_from_value (accessor);\n\n  ecma_object_t *getter_func_p = NULL;\n  ecma_object_t *setter_func_p = NULL;\n\n  if (is_getter)\n  {\n    getter_func_p = accessor_p;\n  }\n  else\n  {\n    setter_func_p = accessor_p;\n  }\n\n  if (property_p == NULL)\n  {\n    ecma_create_named_accessor_property (object_p,\n                                         accessor_name_p,\n                                         getter_func_p,\n                                         setter_func_p,\n                                         ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE,\n                                         NULL);\n  }\n  else\n  {\n    JERRY_ASSERT (ECMA_PROPERTY_IS_RAW (*property_p));\n\n    ecma_property_value_t *prop_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n\n    if (*property_p & ECMA_PROPERTY_FLAG_DATA)\n    {\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n      ecma_getter_setter_pointers_t *getter_setter_pair_p;\n      getter_setter_pair_p = jmem_pools_alloc (sizeof (ecma_getter_setter_pointers_t));\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n\n      ecma_free_value_if_not_object (prop_value_p->value);\n      *property_p = (uint8_t) (*property_p & ~(ECMA_PROPERTY_FLAG_DATA | ECMA_PROPERTY_FLAG_WRITABLE));\n\n#if ENABLED (JERRY_CPOINTER_32_BIT)\n      ECMA_SET_POINTER (getter_setter_pair_p->getter_cp, getter_func_p);\n      ECMA_SET_POINTER (getter_setter_pair_p->setter_cp, setter_func_p);\n      ECMA_SET_NON_NULL_POINTER (prop_value_p->getter_setter_pair_cp, getter_setter_pair_p);\n#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */\n      ECMA_SET_POINTER (prop_value_p->getter_setter_pair.getter_cp, getter_func_p);\n      ECMA_SET_POINTER (prop_value_p->getter_setter_pair.setter_cp, setter_func_p);\n#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */\n      return;\n    }\n\n    if (is_getter)\n    {\n      ecma_set_named_accessor_property_getter (object_p, prop_value_p, accessor_p);\n    }\n    else\n    {\n      ecma_set_named_accessor_property_setter (object_p, prop_value_p, accessor_p);\n    }\n  }\n} /* opfunc_set_accessor */\n\n/**\n * Deletes an object property.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\nvm_op_delete_prop (ecma_value_t object, /**< base object */\n                   ecma_value_t property, /**< property name */\n                   bool is_strict) /**< strict mode */\n{\n#if !ENABLED (JERRY_ESNEXT)\n  if (ecma_is_value_undefined (object))\n  {\n    return ECMA_VALUE_TRUE;\n  }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  if (!ecma_op_require_object_coercible (object))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_string_t *name_string_p = ecma_op_to_property_key (property);\n\n  if (JERRY_UNLIKELY (name_string_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t obj_value = ecma_op_to_object (object);\n  /* The ecma_op_require_object_coercible call already checked the op_to_object error cases. */\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (obj_value));\n  JERRY_ASSERT (ecma_is_value_object (obj_value));\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_value);\n  JERRY_ASSERT (!ecma_is_lexical_environment (obj_p));\n\n  ecma_value_t delete_op_ret = ecma_op_object_delete (obj_p, name_string_p, is_strict);\n  JERRY_ASSERT (ecma_is_value_boolean (delete_op_ret) || ECMA_IS_VALUE_ERROR (delete_op_ret));\n  ecma_deref_object (obj_p);\n  ecma_deref_ecma_string (name_string_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (is_strict && ecma_is_value_false (delete_op_ret))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"delete returned false in strict mode.\"));\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return delete_op_ret;\n} /* vm_op_delete_prop */\n\n/**\n * Deletes a variable.\n *\n * @return ecma value\n *         Returned value must be freed with ecma_free_value\n */\necma_value_t\nvm_op_delete_var (ecma_value_t name_literal, /**< name literal */\n                  ecma_object_t *lex_env_p) /**< lexical environment */\n{\n  ecma_value_t completion_value = ECMA_VALUE_EMPTY;\n\n  ecma_string_t *var_name_str_p = ecma_get_string_from_value (name_literal);\n\n  ecma_object_t *ref_base_lex_env_p = ecma_op_resolve_reference_base (lex_env_p, var_name_str_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (JERRY_UNLIKELY (ref_base_lex_env_p == ECMA_OBJECT_POINTER_ERROR))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  if (ref_base_lex_env_p == NULL)\n  {\n    completion_value = ECMA_VALUE_TRUE;\n  }\n  else\n  {\n    JERRY_ASSERT (ecma_is_lexical_environment (ref_base_lex_env_p));\n\n    completion_value = ecma_op_delete_binding (ref_base_lex_env_p, var_name_str_p);\n  }\n\n  return completion_value;\n} /* vm_op_delete_var */\n\n/**\n * 'for-in' opcode handler\n *\n *  Note: from ES2015 (ES6) the for-in can trigger error when\n *        the property names are not available (ex.: via Proxy ownKeys).\n *        In these cases an error must be returned.\n *\n *        This error is returned as the `result_obj_p` and the\n *        function's return value is NULL.\n *\n * See also:\n *          ECMA-262 v5, 12.6.4\n *\n * @return - chain list of property names\n *         - In case of error: NULL is returned and the `result_obj_p`\n *           must be checked.\n */\necma_collection_t *\nopfunc_for_in (ecma_value_t iterable_value, /**< ideally an iterable value */\n               ecma_value_t *result_obj_p) /**< expression object */\n{\n  /* 3. */\n  if (ecma_is_value_undefined (iterable_value)\n      || ecma_is_value_null (iterable_value))\n  {\n    return NULL;\n  }\n\n  /* 4. */\n  ecma_value_t obj_expr_value = ecma_op_to_object (iterable_value);\n  /* ecma_op_to_object will only raise error on null/undefined values but those are handled above. */\n  JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (obj_expr_value));\n  ecma_object_t *obj_p = ecma_get_object_from_value (obj_expr_value);\n  ecma_collection_t *prop_names_p = ecma_op_object_enumerate (obj_p);\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (prop_names_p == NULL))\n  {\n    ecma_deref_object (obj_p);\n    *result_obj_p = ECMA_VALUE_ERROR;\n    return NULL;\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  if (prop_names_p->item_count != 0)\n  {\n    *result_obj_p = ecma_make_object_value (obj_p);\n    return prop_names_p;\n  }\n\n  ecma_deref_object (obj_p);\n  ecma_collection_destroy (prop_names_p);\n\n  return NULL;\n} /* opfunc_for_in */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * 'VM_OC_APPEND_ARRAY' opcode handler specialized for spread objects\n *\n * @return ECMA_VALUE_ERROR - if the operation failed\n *         ECMA_VALUE_EMPTY, otherwise\n */\nstatic ecma_value_t JERRY_ATTR_NOINLINE\nopfunc_append_to_spread_array (ecma_value_t *stack_top_p, /**< current stack top */\n                               uint16_t values_length) /**< number of elements to set */\n{\n  JERRY_ASSERT (!(values_length & OPFUNC_HAS_SPREAD_ELEMENT));\n\n  ecma_object_t *array_obj_p = ecma_get_object_from_value (stack_top_p[-1]);\n  JERRY_ASSERT (ecma_get_object_type (array_obj_p) == ECMA_OBJECT_TYPE_ARRAY);\n\n  ecma_extended_object_t *ext_array_obj_p = (ecma_extended_object_t *) array_obj_p;\n  uint32_t old_length = ext_array_obj_p->u.array.length;\n\n  for (uint32_t i = 0, idx = old_length; i < values_length; i++, idx++)\n  {\n    if (ecma_is_value_array_hole (stack_top_p[i]))\n    {\n      continue;\n    }\n\n    if (stack_top_p[i] == ECMA_VALUE_SPREAD_ELEMENT)\n    {\n      i++;\n      ecma_value_t ret_value = ECMA_VALUE_ERROR;\n      ecma_value_t spread_value = stack_top_p[i];\n\n      ecma_value_t next_method;\n      ecma_value_t iterator = ecma_op_get_iterator (spread_value, ECMA_VALUE_SYNC_ITERATOR, &next_method);\n\n      if (!ECMA_IS_VALUE_ERROR (iterator))\n      {\n        while (true)\n        {\n          ecma_value_t next_value = ecma_op_iterator_step (iterator, next_method);\n\n          if (ECMA_IS_VALUE_ERROR (next_value))\n          {\n            break;\n          }\n\n          if (ecma_is_value_false (next_value))\n          {\n            idx--;\n            ret_value = ECMA_VALUE_EMPTY;\n            break;\n          }\n\n          ecma_value_t value = ecma_op_iterator_value (next_value);\n\n          ecma_free_value (next_value);\n\n          if (ECMA_IS_VALUE_ERROR (value))\n          {\n            break;\n          }\n\n          ecma_value_t put_comp;\n          put_comp = ecma_builtin_helper_def_prop_by_index (array_obj_p,\n                                                            idx++,\n                                                            value,\n                                                            ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n\n          JERRY_ASSERT (ecma_is_value_true (put_comp));\n          ecma_free_value (value);\n        }\n      }\n\n      ecma_free_value (iterator);\n      ecma_free_value (next_method);\n      ecma_free_value (spread_value);\n\n      if (ECMA_IS_VALUE_ERROR (ret_value))\n      {\n        for (uint32_t k = i + 1; k < values_length; k++)\n        {\n          ecma_free_value (stack_top_p[k]);\n        }\n\n        return ret_value;\n      }\n    }\n    else\n    {\n      ecma_value_t put_comp = ecma_builtin_helper_def_prop_by_index (array_obj_p,\n                                                                     idx,\n                                                                     stack_top_p[i],\n                                                                     ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);\n      JERRY_ASSERT (ecma_is_value_true (put_comp));\n      ecma_free_value (stack_top_p[i]);\n    }\n  }\n\n  return ECMA_VALUE_EMPTY;\n} /* opfunc_append_to_spread_array */\n\n/**\n * Spread function call/construct arguments into an ecma-collection\n *\n * @return NULL - if the operation failed\n *         pointer to the ecma-collection with the spreaded arguments, otherwise\n */\nJERRY_ATTR_NOINLINE ecma_collection_t *\nopfunc_spread_arguments (ecma_value_t *stack_top_p, /**< pointer to the current stack top */\n                         uint8_t arguments_list_len) /**< number of arguments */\n{\n  ecma_collection_t *buff_p = ecma_new_collection ();\n\n  for (uint32_t i = 0; i < arguments_list_len; i++)\n  {\n    ecma_value_t arg = *stack_top_p++;\n\n    if (arg != ECMA_VALUE_SPREAD_ELEMENT)\n    {\n      ecma_collection_push_back (buff_p, arg);\n      continue;\n    }\n\n    ecma_value_t ret_value = ECMA_VALUE_ERROR;\n    ecma_value_t spread_value = *stack_top_p++;\n    i++;\n\n    ecma_value_t next_method;\n    ecma_value_t iterator = ecma_op_get_iterator (spread_value, ECMA_VALUE_SYNC_ITERATOR, &next_method);\n\n    if (!ECMA_IS_VALUE_ERROR (iterator))\n    {\n      while (true)\n      {\n        ecma_value_t next_value = ecma_op_iterator_step (iterator, next_method);\n\n        if (ECMA_IS_VALUE_ERROR (next_value))\n        {\n          break;\n        }\n\n        if (ecma_is_value_false (next_value))\n        {\n          ret_value = ECMA_VALUE_EMPTY;\n          break;\n        }\n\n        ecma_value_t value = ecma_op_iterator_value (next_value);\n\n        ecma_free_value (next_value);\n\n        if (ECMA_IS_VALUE_ERROR (value))\n        {\n          break;\n        }\n\n        ecma_collection_push_back (buff_p, value);\n      }\n    }\n\n    ecma_free_value (iterator);\n    ecma_free_value (next_method);\n    ecma_free_value (spread_value);\n\n    if (ECMA_IS_VALUE_ERROR (ret_value))\n    {\n      for (uint32_t k = i + 1; k < arguments_list_len; k++)\n      {\n        ecma_free_value (*stack_top_p++);\n      }\n\n      ecma_collection_free (buff_p);\n      buff_p = NULL;\n      break;\n    }\n  }\n\n  return buff_p;\n} /* opfunc_spread_arguments */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * 'VM_OC_APPEND_ARRAY' opcode handler, for setting array object properties\n *\n * @return ECMA_VALUE_ERROR - if the operation failed\n *         ECMA_VALUE_EMPTY, otherwise\n */\necma_value_t JERRY_ATTR_NOINLINE\nopfunc_append_array (ecma_value_t *stack_top_p, /**< current stack top */\n                     uint16_t values_length) /**< number of elements to set\n                                              *   with potential OPFUNC_HAS_SPREAD_ELEMENT flag */\n{\n#if ENABLED (JERRY_ESNEXT)\n  if (values_length >= OPFUNC_HAS_SPREAD_ELEMENT)\n  {\n    return opfunc_append_to_spread_array (stack_top_p, (uint16_t) (values_length & ~OPFUNC_HAS_SPREAD_ELEMENT));\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *array_obj_p = ecma_get_object_from_value (stack_top_p[-1]);\n  JERRY_ASSERT (ecma_get_object_type (array_obj_p) == ECMA_OBJECT_TYPE_ARRAY);\n\n  ecma_extended_object_t *ext_array_obj_p = (ecma_extended_object_t *) array_obj_p;\n  uint32_t old_length = ext_array_obj_p->u.array.length;\n\n  if (JERRY_LIKELY (ecma_op_array_is_fast_array (ext_array_obj_p)))\n  {\n    uint32_t filled_holes = 0;\n    ecma_value_t *values_p = ecma_fast_array_extend (array_obj_p, old_length + values_length);\n\n    for (uint32_t i = 0; i < values_length; i++)\n    {\n      values_p[old_length + i] = stack_top_p[i];\n\n      if (!ecma_is_value_array_hole (stack_top_p[i]))\n      {\n        filled_holes++;\n\n        ecma_deref_if_object (stack_top_p[i]);\n      }\n    }\n\n    ext_array_obj_p->u.array.length_prop_and_hole_count -= filled_holes * ECMA_FAST_ARRAY_HOLE_ONE;\n\n    if (JERRY_UNLIKELY ((values_length - filled_holes) > ECMA_FAST_ARRAY_MAX_NEW_HOLES_COUNT))\n    {\n      ecma_fast_array_convert_to_normal (array_obj_p);\n    }\n  }\n  else\n  {\n    for (uint32_t i = 0; i < values_length; i++)\n    {\n      if (!ecma_is_value_array_hole (stack_top_p[i]))\n      {\n        ecma_string_t *index_str_p = ecma_new_ecma_string_from_uint32 (old_length + i);\n\n        ecma_property_value_t *prop_value_p;\n\n        prop_value_p = ecma_create_named_data_property (array_obj_p,\n                                                        index_str_p,\n                                                        ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,\n                                                        NULL);\n\n        ecma_deref_ecma_string (index_str_p);\n        prop_value_p->value = stack_top_p[i];\n        ecma_deref_if_object (stack_top_p[i]);\n      }\n    }\n    ext_array_obj_p->u.array.length = old_length + values_length;\n  }\n\n  return ECMA_VALUE_EMPTY;\n} /* opfunc_append_array */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Create an executable object using the current frame context\n *\n * @return executable object\n */\nvm_executable_object_t *\nopfunc_create_executable_object (vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                                 vm_create_executable_object_type_t type) /**< executable object type */\n{\n  const ecma_compiled_code_t *bytecode_header_p = frame_ctx_p->shared_p->bytecode_header_p;\n  size_t size, register_end;\n\n  ecma_bytecode_ref ((ecma_compiled_code_t *) bytecode_header_p);\n\n  if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_header_p;\n    register_end = (size_t) args_p->register_end;\n    size = (register_end + (size_t) args_p->stack_limit) * sizeof (ecma_value_t);\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_header_p;\n    register_end = (size_t) args_p->register_end;\n    size = (register_end + (size_t) args_p->stack_limit) * sizeof (ecma_value_t);\n  }\n\n  size_t total_size = JERRY_ALIGNUP (sizeof (vm_executable_object_t) + size, sizeof (uintptr_t));\n\n  ecma_object_t *proto_p = NULL;\n  /* Async function objects are not accessible, so their class_id is not relevant. */\n  uint16_t class_id = LIT_MAGIC_STRING_GENERATOR_UL;\n\n  if (type == VM_CREATE_EXECUTABLE_OBJECT_GENERATOR)\n  {\n    ecma_builtin_id_t default_proto_id = ECMA_BUILTIN_ID_GENERATOR_PROTOTYPE;\n\n    if (CBC_FUNCTION_GET_TYPE (bytecode_header_p->status_flags) == CBC_FUNCTION_ASYNC_GENERATOR)\n    {\n      default_proto_id = ECMA_BUILTIN_ID_ASYNC_GENERATOR_PROTOTYPE;\n      class_id = LIT_MAGIC_STRING_ASYNC_GENERATOR_UL;\n    }\n\n    JERRY_ASSERT (frame_ctx_p->shared_p->status_flags & VM_FRAME_CTX_SHARED_NON_ARROW_FUNC);\n    proto_p = ecma_op_get_prototype_from_constructor (VM_FRAME_CTX_GET_FUNCTION_OBJECT (frame_ctx_p),\n                                                      default_proto_id);\n  }\n\n  ecma_object_t *object_p = ecma_create_object (proto_p,\n                                                total_size,\n                                                ECMA_OBJECT_TYPE_CLASS);\n\n  vm_executable_object_t *executable_object_p = (vm_executable_object_t *) object_p;\n\n  if (type == VM_CREATE_EXECUTABLE_OBJECT_GENERATOR)\n  {\n    ecma_deref_object (proto_p);\n  }\n\n  executable_object_p->extended_object.u.class_prop.class_id = class_id;\n  executable_object_p->extended_object.u.class_prop.extra_info = 0;\n  ECMA_SET_INTERNAL_VALUE_ANY_POINTER (executable_object_p->extended_object.u.class_prop.u.head, NULL);\n\n  JERRY_ASSERT (!(frame_ctx_p->status_flags & VM_FRAME_CTX_DIRECT_EVAL));\n\n  /* Copy shared data and frame context. */\n  vm_frame_ctx_shared_t *new_shared_p = &(executable_object_p->shared);\n  *new_shared_p = *(frame_ctx_p->shared_p);\n\n  vm_frame_ctx_t *new_frame_ctx_p = &(executable_object_p->frame_ctx);\n  *new_frame_ctx_p = *frame_ctx_p;\n  new_frame_ctx_p->shared_p = new_shared_p;\n\n  /* The old register values are discarded. */\n  ecma_value_t *new_registers_p = VM_GET_REGISTERS (new_frame_ctx_p);\n  memcpy (new_registers_p, VM_GET_REGISTERS (frame_ctx_p), size);\n\n  size_t stack_top = (size_t) (frame_ctx_p->stack_top_p - VM_GET_REGISTERS (frame_ctx_p));\n  ecma_value_t *new_stack_top_p = new_registers_p + stack_top;\n\n  new_frame_ctx_p->stack_top_p = new_stack_top_p;\n\n  /* Initial state is \"not running\", so all object references are released. */\n\n  if (frame_ctx_p->context_depth > 0)\n  {\n    JERRY_ASSERT (type != VM_CREATE_EXECUTABLE_OBJECT_GENERATOR);\n\n    ecma_value_t *register_end_p = new_registers_p + register_end;\n\n    JERRY_ASSERT (register_end_p <= new_stack_top_p);\n\n    while (new_registers_p < register_end_p)\n    {\n      ecma_deref_if_object (*new_registers_p++);\n    }\n\n    vm_ref_lex_env_chain (frame_ctx_p->lex_env_p,\n                          frame_ctx_p->context_depth,\n                          new_registers_p,\n                          false);\n\n    new_registers_p += frame_ctx_p->context_depth;\n\n    JERRY_ASSERT (new_registers_p <= new_stack_top_p);\n  }\n\n  while (new_registers_p < new_stack_top_p)\n  {\n    ecma_deref_if_object (*new_registers_p++);\n  }\n\n  JERRY_ASSERT (new_frame_ctx_p->block_result == ECMA_VALUE_UNDEFINED);\n\n  new_frame_ctx_p->this_binding = ecma_copy_value_if_not_object (new_frame_ctx_p->this_binding);\n\n  JERRY_CONTEXT (vm_top_context_p) = new_frame_ctx_p->prev_context_p;\n\n  return executable_object_p;\n} /* opfunc_create_executable_object */\n\n/**\n * Byte code which resumes an executable object with throw\n */\nconst uint8_t opfunc_resume_executable_object_with_throw[1] =\n{\n  CBC_THROW\n};\n\n/**\n * Byte code which resumes an executable object with return\n */\nconst uint8_t opfunc_resume_executable_object_with_return[2] =\n{\n  CBC_EXT_OPCODE, CBC_EXT_RETURN\n};\n\n/**\n * Resume the execution of an inactive executable object\n *\n * @return value provided by the execution\n */\necma_value_t\nopfunc_resume_executable_object (vm_executable_object_t *executable_object_p, /**< executable object */\n                                 ecma_value_t value) /**< value pushed onto the stack (takes the reference) */\n{\n  const ecma_compiled_code_t *bytecode_header_p = executable_object_p->shared.bytecode_header_p;\n  ecma_value_t *register_p = VM_GET_REGISTERS (&executable_object_p->frame_ctx);\n  ecma_value_t *register_end_p;\n\n  if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_header_p;\n    register_end_p = register_p + args_p->register_end;\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_header_p;\n    register_end_p = register_p + args_p->register_end;\n  }\n\n  ecma_value_t *stack_top_p = executable_object_p->frame_ctx.stack_top_p;\n\n  if (value != ECMA_VALUE_EMPTY)\n  {\n    *stack_top_p = value;\n    executable_object_p->frame_ctx.stack_top_p = stack_top_p + 1;\n  }\n\n  if (executable_object_p->frame_ctx.context_depth > 0)\n  {\n    while (register_p < register_end_p)\n    {\n      ecma_ref_if_object (*register_p++);\n    }\n\n    vm_ref_lex_env_chain (executable_object_p->frame_ctx.lex_env_p,\n                          executable_object_p->frame_ctx.context_depth,\n                          register_p,\n                          true);\n\n    register_p += executable_object_p->frame_ctx.context_depth;\n  }\n\n  while (register_p < stack_top_p)\n  {\n    ecma_ref_if_object (*register_p++);\n  }\n\n  ecma_ref_if_object (executable_object_p->frame_ctx.block_result);\n\n  JERRY_ASSERT (ECMA_EXECUTABLE_OBJECT_IS_SUSPENDED (executable_object_p->extended_object.u.class_prop.extra_info));\n\n  executable_object_p->extended_object.u.class_prop.extra_info |= ECMA_EXECUTABLE_OBJECT_RUNNING;\n\n  executable_object_p->frame_ctx.prev_context_p = JERRY_CONTEXT (vm_top_context_p);\n  JERRY_CONTEXT (vm_top_context_p) = &executable_object_p->frame_ctx;\n\n  /* inside the generators the \"new.target\" is always \"undefined\" as it can't be invoked with \"new\" */\n  ecma_object_t *old_new_target = JERRY_CONTEXT (current_new_target_p);\n  JERRY_CONTEXT (current_new_target_p) = NULL;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_global_object_t *saved_global_object_p = JERRY_CONTEXT (global_object_p);\n  JERRY_CONTEXT (global_object_p) = ecma_op_function_get_realm (bytecode_header_p);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  ecma_value_t result = vm_execute (&executable_object_p->frame_ctx);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  JERRY_CONTEXT (global_object_p) = saved_global_object_p;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  JERRY_CONTEXT (current_new_target_p) = old_new_target;\n  executable_object_p->extended_object.u.class_prop.extra_info &= (uint16_t) ~ECMA_EXECUTABLE_OBJECT_RUNNING;\n\n  if (executable_object_p->frame_ctx.call_operation != VM_EXEC_RETURN)\n  {\n    JERRY_ASSERT (executable_object_p->frame_ctx.call_operation == VM_NO_EXEC_OP);\n\n    /* All resources are released. */\n    executable_object_p->extended_object.u.class_prop.extra_info |= ECMA_EXECUTABLE_OBJECT_COMPLETED;\n    return result;\n  }\n\n  JERRY_CONTEXT (vm_top_context_p) = executable_object_p->frame_ctx.prev_context_p;\n\n  register_p = VM_GET_REGISTERS (&executable_object_p->frame_ctx);\n  stack_top_p = executable_object_p->frame_ctx.stack_top_p;\n\n  if (executable_object_p->frame_ctx.context_depth > 0)\n  {\n    while (register_p < register_end_p)\n    {\n      ecma_deref_if_object (*register_p++);\n    }\n\n    vm_ref_lex_env_chain (executable_object_p->frame_ctx.lex_env_p,\n                          executable_object_p->frame_ctx.context_depth,\n                          register_p,\n                          false);\n\n    register_p += executable_object_p->frame_ctx.context_depth;\n  }\n\n  while (register_p < stack_top_p)\n  {\n    ecma_deref_if_object (*register_p++);\n  }\n\n  ecma_deref_if_object (executable_object_p->frame_ctx.block_result);\n\n  return result;\n} /* opfunc_resume_executable_object */\n\n/**\n * Fulfill the next promise of the async generator with the value\n */\nvoid\nopfunc_async_generator_yield (ecma_extended_object_t *async_generator_object_p, /**< async generator object */\n                              ecma_value_t value) /**< value (takes the reference) */\n{\n  ecma_async_generator_task_t *task_p;\n  task_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_async_generator_task_t,\n                                            async_generator_object_p->u.class_prop.u.head);\n\n  ecma_value_t iter_result = ecma_create_iter_result_object (value, ECMA_VALUE_FALSE);\n  ecma_fulfill_promise (task_p->promise, iter_result);\n\n  ecma_free_value (iter_result);\n  ecma_free_value (value);\n\n  ecma_value_t next = task_p->next;\n  async_generator_object_p->u.class_prop.u.head = next;\n\n  JERRY_ASSERT (task_p->operation_value == ECMA_VALUE_UNDEFINED);\n  jmem_heap_free_block (task_p, sizeof (ecma_async_generator_task_t));\n\n  if (!ECMA_IS_INTERNAL_VALUE_NULL (next))\n  {\n    ecma_value_t executable_object = ecma_make_object_value ((ecma_object_t *) async_generator_object_p);\n    ecma_enqueue_promise_async_generator_job (executable_object);\n  }\n} /* opfunc_async_generator_yield */\n\n/**\n * Creates a new executable object and awaits for the value\n *\n * Note:\n *   extra_flags can be used to set additional extra_info flags\n *\n * @return a new Promise object on success, error otherwise\n */\necma_value_t\nopfunc_async_create_and_await (vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                               ecma_value_t value, /**< awaited value (takes reference) */\n                               uint16_t extra_flags) /**< extra flags */\n{\n  JERRY_ASSERT (frame_ctx_p->block_result == ECMA_VALUE_UNDEFINED);\n  JERRY_ASSERT (CBC_FUNCTION_GET_TYPE (frame_ctx_p->shared_p->bytecode_header_p->status_flags) == CBC_FUNCTION_ASYNC\n                || (CBC_FUNCTION_GET_TYPE (frame_ctx_p->shared_p->bytecode_header_p->status_flags)\n                    == CBC_FUNCTION_ASYNC_ARROW));\n\n  ecma_object_t *promise_p = ecma_builtin_get (ECMA_BUILTIN_ID_PROMISE);\n  ecma_value_t result = ecma_promise_reject_or_resolve (ecma_make_object_value (promise_p), value, true);\n  ecma_free_value (value);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  vm_executable_object_t *executable_object_p;\n  executable_object_p = opfunc_create_executable_object (frame_ctx_p, VM_CREATE_EXECUTABLE_OBJECT_ASYNC);\n\n  executable_object_p->extended_object.u.class_prop.extra_info |= extra_flags;\n\n  ecma_promise_async_then (result, ecma_make_object_value ((ecma_object_t *) executable_object_p));\n  ecma_deref_object ((ecma_object_t *) executable_object_p);\n  ecma_free_value (result);\n\n  ecma_object_t *old_new_target_p = JERRY_CONTEXT (current_new_target_p);\n  JERRY_CONTEXT (current_new_target_p) = promise_p;\n\n  result = ecma_op_create_promise_object (ECMA_VALUE_EMPTY, ECMA_PROMISE_EXECUTOR_EMPTY);\n\n  JERRY_ASSERT (ecma_is_value_object (result));\n  executable_object_p->frame_ctx.block_result = result;\n\n  JERRY_CONTEXT (current_new_target_p) = old_new_target_p;\n  return result;\n} /* opfunc_async_create_and_await */\n\n/**\n * Initialize class fields.\n *\n * @return ECMA_VALUE_ERROR - initialization fails\n *         ECMA_VALUE_UNDEFINED - otherwise\n */\necma_value_t\nopfunc_init_class_fields (ecma_value_t class_object, /**< the function itself */\n                          ecma_value_t this_val) /**< this_arg of the function */\n{\n  JERRY_ASSERT (ecma_is_value_object (class_object));\n  JERRY_ASSERT (ecma_is_value_object (this_val));\n\n  ecma_string_t *name_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_INIT);\n  ecma_object_t *class_object_p = ecma_get_object_from_value (class_object);\n  ecma_property_t *property_p = ecma_find_named_property (class_object_p, name_p);\n\n  if (property_p == NULL)\n  {\n    return ECMA_VALUE_UNDEFINED;\n  }\n\n  vm_frame_ctx_shared_class_fields_t shared_class_fields;\n  shared_class_fields.header.status_flags = VM_FRAME_CTX_SHARED_HAS_CLASS_FIELDS;\n  shared_class_fields.computed_class_fields_p = NULL;\n\n  name_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_COMPUTED);\n  ecma_property_t *class_field_property_p = ecma_find_named_property (class_object_p, name_p);\n\n  if (class_field_property_p != NULL)\n  {\n    ecma_value_t value = ECMA_PROPERTY_VALUE_PTR (class_field_property_p)->value;\n    shared_class_fields.computed_class_fields_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_value_t, value);\n  }\n\n  ecma_property_value_t *property_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n  JERRY_ASSERT (ecma_op_is_callable (property_value_p->value));\n\n  ecma_extended_object_t *ext_function_p;\n  ext_function_p = (ecma_extended_object_t *) ecma_get_object_from_value (property_value_p->value);\n  shared_class_fields.header.bytecode_header_p = ecma_op_function_get_compiled_code (ext_function_p);\n\n  ecma_object_t *scope_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                                       ext_function_p->u.function.scope_cp);\n\n  ecma_value_t result = vm_run (&shared_class_fields.header, this_val, scope_p);\n\n  JERRY_ASSERT (ECMA_IS_VALUE_ERROR (result) || result == ECMA_VALUE_UNDEFINED);\n  return result;\n} /* opfunc_init_class_fields */\n\n/**\n * Initialize static class fields.\n *\n * @return ECMA_VALUE_ERROR - initialization fails\n *         ECMA_VALUE_UNDEFINED - otherwise\n */\necma_value_t\nopfunc_init_static_class_fields (ecma_value_t function_object, /**< the function itself */\n                                 ecma_value_t this_val) /**< this_arg of the function */\n{\n  JERRY_ASSERT (ecma_op_is_callable (function_object));\n  JERRY_ASSERT (ecma_is_value_object (this_val));\n\n  vm_frame_ctx_shared_class_fields_t shared_class_fields;\n  shared_class_fields.header.status_flags = VM_FRAME_CTX_SHARED_HAS_CLASS_FIELDS;\n  shared_class_fields.computed_class_fields_p = NULL;\n\n  ecma_string_t *name_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_COMPUTED);\n  ecma_object_t *function_object_p = ecma_get_object_from_value (function_object);\n  ecma_property_t *class_field_property_p = ecma_find_named_property (function_object_p, name_p);\n\n  if (class_field_property_p != NULL)\n  {\n    ecma_value_t value = ECMA_PROPERTY_VALUE_PTR (class_field_property_p)->value;\n    shared_class_fields.computed_class_fields_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_value_t, value);\n  }\n\n  ecma_extended_object_t *ext_function_p;\n  ext_function_p = (ecma_extended_object_t *) ecma_get_object_from_value (function_object);\n  shared_class_fields.header.bytecode_header_p = ecma_op_function_get_compiled_code (ext_function_p);\n\n  ecma_object_t *scope_p = ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,\n                                                                       ext_function_p->u.function.scope_cp);\n\n  ecma_value_t result = vm_run (&shared_class_fields.header, this_val, scope_p);\n\n  JERRY_ASSERT (ECMA_IS_VALUE_ERROR (result) || result == ECMA_VALUE_UNDEFINED);\n  return result;\n} /* opfunc_init_static_class_fields */\n\n/**\n * Add the name of a computed field to a name list\n *\n * @return ECMA_VALUE_ERROR - name is not a valid property name\n *         ECMA_VALUE_UNDEFINED - otherwise\n */\necma_value_t\nopfunc_add_computed_field (ecma_value_t class_object, /**< class object */\n                           ecma_value_t name) /**< name of the property */\n{\n  ecma_string_t *prop_name_p = ecma_op_to_property_key (name);\n\n  if (JERRY_UNLIKELY (prop_name_p == NULL))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  if (ecma_prop_name_is_symbol (prop_name_p))\n  {\n    name = ecma_make_symbol_value (prop_name_p);\n  }\n  else\n  {\n    name = ecma_make_string_value (prop_name_p);\n  }\n\n  ecma_string_t *name_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_COMPUTED);\n  ecma_object_t *class_object_p = ecma_get_object_from_value (class_object);\n\n  ecma_property_t *property_p = ecma_find_named_property (class_object_p, name_p);\n  ecma_value_t *compact_collection_p;\n  ecma_property_value_t *property_value_p;\n\n  if (property_p == NULL)\n  {\n    ECMA_CREATE_INTERNAL_PROPERTY (class_object_p, name_p, property_p, property_value_p);\n    compact_collection_p = ecma_new_compact_collection ();\n  }\n  else\n  {\n    property_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n    compact_collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_value_t, property_value_p->value);\n  }\n\n  compact_collection_p = ecma_compact_collection_push_back (compact_collection_p, name);\n  ECMA_SET_INTERNAL_VALUE_POINTER (property_value_p->value, compact_collection_p);\n  return ECMA_VALUE_UNDEFINED;\n} /* opfunc_add_computed_field */\n\n/**\n * Implicit class constructor handler when the classHeritage is not present.\n *\n * See also: ECMAScript v6, 14.5.14.10.b.i\n *\n * @return ECMA_VALUE_ERROR - if the function was invoked without 'new'\n *         ECMA_VALUE_UNDEFINED - otherwise\n */\nstatic ecma_value_t\necma_op_implicit_constructor_handler_cb (const ecma_value_t function_obj, /**< the function itself */\n                                         const ecma_value_t this_val, /**< this_arg of the function */\n                                         const ecma_value_t args_p[], /**< argument list */\n                                         const uint32_t args_count) /**< argument number */\n{\n  JERRY_UNUSED_2 (args_p, args_count);\n\n  if (JERRY_CONTEXT (current_new_target_p) == NULL)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Class constructor cannot be invoked without 'new'.\"));\n  }\n\n  return opfunc_init_class_fields (function_obj, this_val);\n} /* ecma_op_implicit_constructor_handler_cb */\n\n/**\n * Implicit class constructor handler when the classHeritage is present.\n *\n * See also: ECMAScript v6, 14.5.14.10.a.i\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         result of the super call - otherwise\n */\nstatic ecma_value_t\necma_op_implicit_constructor_handler_heritage_cb (const ecma_value_t function_obj, /**< the function itself */\n                                                  const ecma_value_t this_val, /**< this_arg of the function */\n                                                  const ecma_value_t args_p[], /**< argument list */\n                                                  const uint32_t args_count) /**< argument number */\n{\n  JERRY_UNUSED (this_val);\n\n  if (JERRY_CONTEXT (current_new_target_p) == NULL)\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Class constructor cannot be invoked without 'new'.\"));\n  }\n\n  ecma_object_t *func_obj_p = ecma_get_object_from_value (function_obj);\n  ecma_value_t super_ctor = ecma_op_function_get_super_constructor (func_obj_p);\n\n  if (ECMA_IS_VALUE_ERROR (super_ctor))\n  {\n    return super_ctor;\n  }\n\n  ecma_object_t *super_ctor_p = ecma_get_object_from_value (super_ctor);\n\n  ecma_value_t result = ecma_op_function_construct (super_ctor_p,\n                                                    JERRY_CONTEXT (current_new_target_p),\n                                                    args_p,\n                                                    args_count);\n\n  if (ecma_is_value_object (result))\n  {\n    ecma_value_t fields_value = opfunc_init_class_fields (function_obj, result);\n\n    if (ECMA_IS_VALUE_ERROR (fields_value))\n    {\n      ecma_free_value (result);\n      result = ECMA_VALUE_ERROR;\n    }\n  }\n\n  ecma_deref_object (super_ctor_p);\n\n  return result;\n} /* ecma_op_implicit_constructor_handler_heritage_cb */\n\n/**\n * Create implicit class constructor\n *\n * See also: ECMAScript v6, 14.5.14\n *\n * @return - new external function ecma-object\n */\necma_value_t\nopfunc_create_implicit_class_constructor (uint8_t opcode) /**< current cbc opcode */\n{\n  /* 8. */\n  ecma_object_t *function_obj_p = ecma_create_object (ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE),\n                                                      sizeof (ecma_native_function_t),\n                                                      ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n  ecma_native_function_t *native_function_p = (ecma_native_function_t *) function_obj_p;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ECMA_SET_INTERNAL_VALUE_POINTER (native_function_p->realm_value,\n                                   ecma_builtin_get_global ());\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  /* 10.a.i */\n  if (opcode == CBC_EXT_PUSH_IMPLICIT_CONSTRUCTOR_HERITAGE)\n  {\n    native_function_p->native_handler_cb = ecma_op_implicit_constructor_handler_heritage_cb;\n  }\n  /* 10.b.i */\n  else\n  {\n    native_function_p->native_handler_cb = ecma_op_implicit_constructor_handler_cb;\n  }\n\n  ecma_property_value_t *prop_value_p;\n  prop_value_p = ecma_create_named_data_property (function_obj_p,\n                                                  ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),\n                                                  ECMA_PROPERTY_FLAG_CONFIGURABLE,\n                                                  NULL);\n\n  prop_value_p->value = ecma_make_uint32_value (0);\n\n  return ecma_make_object_value (function_obj_p);\n} /* opfunc_create_implicit_class_constructor */\n\n/**\n * Set the [[HomeObject]] attribute of the given functon object\n */\nextern inline void JERRY_ATTR_ALWAYS_INLINE\nopfunc_set_home_object (ecma_object_t *func_p, /**< function object */\n                        ecma_object_t *parent_env_p) /**< parent environment */\n{\n  JERRY_ASSERT (ecma_is_lexical_environment (parent_env_p));\n\n  if (ecma_get_object_type (func_p) == ECMA_OBJECT_TYPE_FUNCTION)\n  {\n    JERRY_ASSERT (!ecma_get_object_is_builtin (func_p));\n\n    ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) func_p;\n    ECMA_SET_NON_NULL_POINTER_TAG (ext_func_p->u.function.scope_cp,\n                                   parent_env_p,\n                                   JMEM_CP_GET_POINTER_TAG_BITS (ext_func_p->u.function.scope_cp));\n  }\n} /* opfunc_set_home_object */\n\n/**\n * ClassDefinitionEvaluation environment initialization part\n *\n * See also: ECMAScript v6, 14.5.14\n *\n * @return - ECMA_VALUE_ERROR - if the operation fails\n *           ECMA_VALUE_EMPTY - otherwise\n */\nvoid\nopfunc_push_class_environment (vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                               ecma_value_t **vm_stack_top, /**< VM stack top */\n                               ecma_value_t class_name) /**< class name */\n{\n  JERRY_ASSERT (ecma_is_value_string (class_name));\n  ecma_object_t *class_env_p = ecma_create_decl_lex_env (frame_ctx_p->lex_env_p);\n\n  /* 4.a */\n  ecma_property_value_t *property_value_p;\n  property_value_p = ecma_create_named_data_property (class_env_p,\n                                                      ecma_get_string_from_value (class_name),\n                                                      ECMA_PROPERTY_FLAG_ENUMERABLE,\n                                                      NULL);\n\n  property_value_p->value = ECMA_VALUE_UNINITIALIZED;\n  frame_ctx_p->lex_env_p = class_env_p;\n\n  *(*vm_stack_top)++ = ECMA_VALUE_RELEASE_LEX_ENV;\n} /* opfunc_push_class_environment */\n\n/**\n * ClassDefinitionEvaluation object initialization part\n *\n * See also: ECMAScript v6, 14.5.14\n *\n * @return - ECMA_VALUE_ERROR - if the operation fails\n *           ECMA_VALUE_EMPTY - otherwise\n */\necma_value_t\nopfunc_init_class (vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                   ecma_value_t *stack_top_p) /**< stack top */\n{\n  /* 5.b, 6.e.ii */\n  ecma_object_t *ctor_parent_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);\n  ecma_object_t *proto_parent_p = NULL;\n  bool free_proto_parent = false;\n\n  ecma_value_t super_class = stack_top_p[-2];\n  ecma_object_t *ctor_p = ecma_get_object_from_value (stack_top_p[-1]);\n\n  bool heritage_present = !ecma_is_value_array_hole (super_class);\n\n  /* 5. ClassHeritage opt is not present */\n  if (!heritage_present)\n  {\n    /* 5.a */\n    proto_parent_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n  }\n  else if (!ecma_is_value_null (super_class))\n  {\n    /* 6.f, 6.g.i */\n    if (!ecma_is_constructor (super_class))\n    {\n      return ecma_raise_type_error (\"Class extends value is not a constructor or null\");\n    }\n\n    ecma_object_t *parent_p = ecma_get_object_from_value (super_class);\n\n    /* 6.g.ii */\n    ecma_value_t proto_parent = ecma_op_object_get_by_magic_id (parent_p, LIT_MAGIC_STRING_PROTOTYPE);\n\n    /* 6.g.iii */\n    if (ECMA_IS_VALUE_ERROR (proto_parent))\n    {\n      return proto_parent;\n    }\n\n    /* 6.g.iv */\n    if (ecma_is_value_object (proto_parent))\n    {\n      proto_parent_p = ecma_get_object_from_value (proto_parent);\n      free_proto_parent = true;\n    }\n    else if (ecma_is_value_null (proto_parent))\n    {\n      proto_parent_p = NULL;\n    }\n    else\n    {\n      ecma_free_value (proto_parent);\n      return ecma_raise_type_error (\"Property 'prototype' is not an object or null\");\n    }\n\n    /* 6.g.v */\n    ctor_parent_p = parent_p;\n  }\n\n  /* 7. */\n  ecma_object_t *proto_p = ecma_create_object (proto_parent_p, 0, ECMA_OBJECT_TYPE_GENERAL);\n  ecma_value_t proto = ecma_make_object_value (proto_p);\n\n  ECMA_SET_POINTER (ctor_p->u2.prototype_cp, ctor_parent_p);\n\n  if (free_proto_parent)\n  {\n    ecma_deref_object (proto_parent_p);\n  }\n  ecma_free_value (super_class);\n\n  /* 16. */\n  ecma_property_value_t *property_value_p;\n  property_value_p = ecma_create_named_data_property (ctor_p,\n                                                      ecma_get_magic_string (LIT_MAGIC_STRING_PROTOTYPE),\n                                                      ECMA_PROPERTY_FIXED,\n                                                      NULL);\n  property_value_p->value = proto;\n\n  /* 18. */\n  property_value_p = ecma_create_named_data_property (proto_p,\n                                                      ecma_get_magic_string (LIT_MAGIC_STRING_CONSTRUCTOR),\n                                                      ECMA_PROPERTY_CONFIGURABLE_WRITABLE,\n                                                      NULL);\n  property_value_p->value = ecma_make_object_value (ctor_p);\n\n  if (ecma_get_object_type (ctor_p) == ECMA_OBJECT_TYPE_FUNCTION)\n  {\n    ecma_object_t *proto_env_p = ecma_create_object_lex_env (frame_ctx_p->lex_env_p,\n                                                             proto_p,\n                                                             ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND);\n\n    ECMA_SET_NON_NULL_POINTER_TAG (((ecma_extended_object_t *) ctor_p)->u.function.scope_cp, proto_env_p, 0);\n\n    /* 15. set F’s [[ConstructorKind]] internal slot to \"derived\". */\n    if (heritage_present)\n    {\n      ECMA_SET_THIRD_BIT_TO_POINTER_TAG (((ecma_extended_object_t *) ctor_p)->u.function.scope_cp);\n    }\n\n    ecma_deref_object (proto_env_p);\n  }\n\n  stack_top_p[-2] = stack_top_p[-1];\n  stack_top_p[-1] = proto;\n\n  return ECMA_VALUE_EMPTY;\n} /* opfunc_init_class */\n\n/**\n * Set [[Enumerable]] and [[HomeObject]] attributes for all class method\n */\nstatic void\nopfunc_set_class_attributes (ecma_object_t *obj_p, /**< object */\n                             ecma_object_t *parent_env_p) /**< parent environment */\n{\n  jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp;\n\n#if ENABLED (JERRY_PROPRETY_HASHMAP)\n  if (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    if (prop_iter_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)\n    {\n      prop_iter_cp = prop_iter_p->next_property_cp;\n    }\n  }\n#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */\n\n  while (prop_iter_cp != JMEM_CP_NULL)\n  {\n    ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);\n    JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));\n\n    ecma_property_pair_t *property_pair_p = (ecma_property_pair_t *) prop_iter_p;\n\n    for (uint32_t index = 0; index < ECMA_PROPERTY_PAIR_ITEM_COUNT; index++)\n    {\n      uint8_t property = property_pair_p->header.types[index];\n\n      if (!ECMA_PROPERTY_IS_RAW (property))\n      {\n        JERRY_ASSERT (property == ECMA_PROPERTY_TYPE_DELETED\n                      || (ECMA_PROPERTY_IS_INTERNAL (property)\n                          && property_pair_p->names_cp[index] == LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_COMPUTED));\n        continue;\n      }\n\n      if (property & ECMA_PROPERTY_FLAG_DATA)\n      {\n        if (ecma_is_value_object (property_pair_p->values[index].value)\n            && ecma_is_property_enumerable (property))\n        {\n          property_pair_p->header.types[index] = (uint8_t) (property & ~ECMA_PROPERTY_FLAG_ENUMERABLE);\n          opfunc_set_home_object (ecma_get_object_from_value (property_pair_p->values[index].value), parent_env_p);\n        }\n        continue;\n      }\n\n      property_pair_p->header.types[index] = (uint8_t) (property & ~ECMA_PROPERTY_FLAG_ENUMERABLE);\n      ecma_property_value_t *accessor_objs_p = property_pair_p->values + index;\n\n      ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (accessor_objs_p);\n\n      if (get_set_pair_p->getter_cp != JMEM_CP_NULL)\n      {\n        opfunc_set_home_object (ECMA_GET_NON_NULL_POINTER (ecma_object_t, get_set_pair_p->getter_cp), parent_env_p);\n      }\n\n      if (get_set_pair_p->setter_cp != JMEM_CP_NULL)\n      {\n        opfunc_set_home_object (ECMA_GET_NON_NULL_POINTER (ecma_object_t, get_set_pair_p->setter_cp), parent_env_p);\n      }\n    }\n\n    prop_iter_cp = prop_iter_p->next_property_cp;\n  }\n} /* opfunc_set_class_attributes */\n\n/**\n * Pop the current lexical environment referenced by the frame context\n */\nvoid\nopfunc_pop_lexical_environment (vm_frame_ctx_t *frame_ctx_p) /**< frame context */\n{\n  ecma_object_t *outer_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, frame_ctx_p->lex_env_p->u2.outer_reference_cp);\n  ecma_deref_object (frame_ctx_p->lex_env_p);\n  frame_ctx_p->lex_env_p = outer_env_p;\n} /* opfunc_pop_lexical_environment */\n\n/**\n * ClassDefinitionEvaluation finalization part\n *\n * See also: ECMAScript v6, 14.5.14\n */\nvoid\nopfunc_finalize_class (vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                       ecma_value_t **vm_stack_top_p, /**< current vm stack top */\n                       ecma_value_t class_name) /**< class name */\n{\n  JERRY_ASSERT (ecma_is_value_undefined (class_name) || ecma_is_value_string (class_name));\n  ecma_value_t *stack_top_p = *vm_stack_top_p;\n\n  ecma_object_t *ctor_p = ecma_get_object_from_value (stack_top_p[-2]);\n  ecma_object_t *proto_p = ecma_get_object_from_value (stack_top_p[-1]);\n\n  ecma_object_t *class_env_p = frame_ctx_p->lex_env_p;\n\n  /* 23.a */\n  if (!ecma_is_value_undefined (class_name))\n  {\n    ecma_op_initialize_binding (class_env_p, ecma_get_string_from_value (class_name), stack_top_p[-2]);\n  }\n\n  ecma_object_t *ctor_env_p = ecma_create_object_lex_env (class_env_p,\n                                                          ctor_p,\n                                                          ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND);\n  ecma_object_t *proto_env_p = ecma_create_object_lex_env (class_env_p,\n                                                           proto_p,\n                                                           ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND);\n\n  opfunc_set_class_attributes (ctor_p, ctor_env_p);\n  opfunc_set_class_attributes (proto_p, proto_env_p);\n\n  ecma_deref_object (proto_env_p);\n  ecma_deref_object (ctor_env_p);\n  ecma_deref_object (proto_p);\n\n  JERRY_ASSERT ((ecma_is_value_undefined (class_name) ? stack_top_p[-3] == ECMA_VALUE_UNDEFINED\n                                                      : stack_top_p[-3] == ECMA_VALUE_RELEASE_LEX_ENV));\n\n  /* only the current class remains on the stack */\n  if (stack_top_p[-3] == ECMA_VALUE_RELEASE_LEX_ENV)\n  {\n    opfunc_pop_lexical_environment (frame_ctx_p);\n  }\n\n  stack_top_p[-3] = stack_top_p[-2];\n  *vm_stack_top_p -= 2;\n} /* opfunc_finalize_class */\n\n/**\n * MakeSuperPropertyReference operation\n *\n * See also: ECMAScript v6, 12.3.5.3\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_EMPTY - otherwise\n */\necma_value_t\nopfunc_form_super_reference (ecma_value_t **vm_stack_top_p, /**< current vm stack top */\n                             vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                             ecma_value_t prop_name, /**< property name to resolve */\n                             uint8_t opcode) /**< current cbc opcode */\n{\n  if (CBC_FUNCTION_GET_TYPE (frame_ctx_p->shared_p->bytecode_header_p->status_flags) == CBC_FUNCTION_CONSTRUCTOR)\n  {\n    ecma_environment_record_t *environment_record_p = ecma_op_get_environment_record (frame_ctx_p->lex_env_p);\n\n    if (!ecma_op_this_binding_is_initialized (environment_record_p))\n    {\n      return ecma_raise_reference_error (ECMA_ERR_MSG (\"Must call super constructor in derived class before \"\n                                                       \"accessing 'this' or returning from it.\"));\n    }\n  }\n\n  ecma_value_t parent = ecma_op_resolve_super_base (frame_ctx_p->lex_env_p);\n\n  if (ECMA_IS_VALUE_ERROR (parent))\n  {\n    return ecma_raise_type_error (ECMA_ERR_MSG (\"Cannot invoke nullable super method.\"));\n  }\n\n  if (!ecma_op_require_object_coercible (parent))\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t *stack_top_p = *vm_stack_top_p;\n\n  if (opcode >= CBC_EXT_SUPER_PROP_ASSIGNMENT_REFERENCE)\n  {\n    JERRY_ASSERT (opcode == CBC_EXT_SUPER_PROP_ASSIGNMENT_REFERENCE\n                  || opcode == CBC_EXT_SUPER_PROP_LITERAL_ASSIGNMENT_REFERENCE);\n    *stack_top_p++ = parent;\n    *stack_top_p++ = ecma_copy_value (prop_name);\n    *vm_stack_top_p = stack_top_p;\n\n    return ECMA_VALUE_EMPTY;\n  }\n\n  ecma_object_t *parent_p = ecma_get_object_from_value (parent);\n  ecma_string_t *prop_name_p = ecma_op_to_property_key (prop_name);\n\n  if (prop_name_p == NULL)\n  {\n    ecma_deref_object (parent_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t result = ecma_op_object_get_with_receiver (parent_p, prop_name_p, frame_ctx_p->this_binding);\n  ecma_deref_ecma_string (prop_name_p);\n  ecma_deref_object (parent_p);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  if (opcode == CBC_EXT_SUPER_PROP_LITERAL_REFERENCE || opcode == CBC_EXT_SUPER_PROP_REFERENCE)\n  {\n    *stack_top_p++ = ecma_copy_value (frame_ctx_p->this_binding);\n    *stack_top_p++ = ECMA_VALUE_UNDEFINED;\n  }\n\n  *stack_top_p++ = result;\n  *vm_stack_top_p = stack_top_p;\n\n  return ECMA_VALUE_EMPTY;\n} /* opfunc_form_super_reference */\n\n/**\n * Assignment operation for SuperRefence base\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_EMPTY - otherwise\n */\necma_value_t\nopfunc_assign_super_reference (ecma_value_t **vm_stack_top_p, /**< vm stack top */\n                               vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                               uint32_t opcode_data) /**< opcode data to store the result */\n{\n  ecma_value_t *stack_top_p = *vm_stack_top_p;\n\n  ecma_value_t base_obj = ecma_op_to_object (stack_top_p[-3]);\n\n  if (ECMA_IS_VALUE_ERROR (base_obj))\n  {\n    return base_obj;\n  }\n\n  ecma_object_t *base_obj_p = ecma_get_object_from_value (base_obj);\n  ecma_string_t *prop_name_p = ecma_op_to_property_key (stack_top_p[-2]);\n\n  if (prop_name_p == NULL)\n  {\n    ecma_deref_object (base_obj_p);\n    return ECMA_VALUE_ERROR;\n  }\n\n  bool is_strict = (frame_ctx_p->status_flags & VM_FRAME_CTX_IS_STRICT) != 0;\n\n  ecma_value_t result = ecma_op_object_put_with_receiver (base_obj_p,\n                                                          prop_name_p,\n                                                          stack_top_p[-1],\n                                                          frame_ctx_p->this_binding,\n                                                          is_strict);\n\n  ecma_deref_ecma_string (prop_name_p);\n  ecma_deref_object (base_obj_p);\n\n  if (ECMA_IS_VALUE_ERROR (result))\n  {\n    return result;\n  }\n\n  for (int32_t i = 1; i <= 3; i++)\n  {\n    ecma_free_value (stack_top_p[-i]);\n  }\n\n  stack_top_p -= 3;\n\n  if (opcode_data & VM_OC_PUT_STACK)\n  {\n    *stack_top_p++ = result;\n  }\n  else if (opcode_data & VM_OC_PUT_BLOCK)\n  {\n    ecma_fast_free_value (frame_ctx_p->block_result);\n    frame_ctx_p->block_result = result;\n  }\n\n  *vm_stack_top_p = stack_top_p;\n\n  return result;\n} /* opfunc_assign_super_reference */\n\n/**\n * Copy data properties of an object\n *\n * @return ECMA_VALUE_ERROR - if the operation fails\n *         ECMA_VALUE_EMPTY - otherwise\n */\necma_value_t\nopfunc_copy_data_properties (ecma_value_t target_object, /**< target object */\n                             ecma_value_t source_object, /**< source object */\n                             ecma_value_t filter_array) /**< filter array */\n{\n  bool source_to_object = false;\n\n  if (!ecma_is_value_object (source_object))\n  {\n    source_object = ecma_op_to_object (source_object);\n\n    if (ECMA_IS_VALUE_ERROR (source_object))\n    {\n      return source_object;\n    }\n\n    source_to_object = true;\n  }\n\n  ecma_object_t *source_object_p = ecma_get_object_from_value (source_object);\n  ecma_collection_t *names_p = ecma_op_object_own_property_keys (source_object_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n  if (names_p == NULL)\n  {\n    JERRY_ASSERT (!source_to_object);\n    return ECMA_VALUE_ERROR;\n  }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n  ecma_object_t *target_object_p = ecma_get_object_from_value (target_object);\n  ecma_value_t *buffer_p = names_p->buffer_p;\n  ecma_value_t *buffer_end_p = buffer_p + names_p->item_count;\n  ecma_value_t *filter_start_p = NULL;\n  ecma_value_t *filter_end_p = NULL;\n  ecma_value_t result = ECMA_VALUE_EMPTY;\n\n  if (filter_array != ECMA_VALUE_UNDEFINED)\n  {\n    ecma_object_t *filter_array_p = ecma_get_object_from_value (filter_array);\n\n    JERRY_ASSERT (ecma_get_object_type (filter_array_p) == ECMA_OBJECT_TYPE_ARRAY);\n    JERRY_ASSERT (ecma_op_object_is_fast_array (filter_array_p));\n\n    if (filter_array_p->u1.property_list_cp != JMEM_CP_NULL)\n    {\n      filter_start_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, filter_array_p->u1.property_list_cp);\n      filter_end_p = filter_start_p + ((ecma_extended_object_t *) filter_array_p)->u.array.length;\n    }\n  }\n\n  while (buffer_p < buffer_end_p)\n  {\n    ecma_string_t *property_name_p = ecma_get_prop_name_from_value (*buffer_p++);\n\n    if (filter_start_p != NULL)\n    {\n      ecma_value_t *filter_p = filter_start_p;\n\n      do\n      {\n        if (ecma_compare_ecma_strings (property_name_p, ecma_get_prop_name_from_value (*filter_p)))\n        {\n          break;\n        }\n      }\n      while (++filter_p < filter_end_p);\n\n      if (filter_p != filter_end_p)\n      {\n        continue;\n      }\n    }\n\n    ecma_property_descriptor_t descriptor;\n    result = ecma_op_object_get_own_property_descriptor (source_object_p, property_name_p, &descriptor);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      break;\n    }\n\n    if (result == ECMA_VALUE_FALSE)\n    {\n      continue;\n    }\n\n    if (!(descriptor.flags & ECMA_PROP_IS_ENUMERABLE))\n    {\n      ecma_free_property_descriptor (&descriptor);\n      continue;\n    }\n\n    if ((descriptor.flags & ECMA_PROP_IS_VALUE_DEFINED) && !ECMA_OBJECT_IS_PROXY (source_object_p))\n    {\n      result = descriptor.value;\n    }\n    else\n    {\n      ecma_free_property_descriptor (&descriptor);\n\n      result = ecma_op_object_get (source_object_p, property_name_p);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        break;\n      }\n    }\n\n    opfunc_set_data_property (target_object_p, property_name_p, result);\n    ecma_free_value (result);\n\n    result = ECMA_VALUE_EMPTY;\n  }\n\n  if (JERRY_UNLIKELY (source_to_object))\n  {\n    ecma_deref_object (source_object_p);\n  }\n\n  ecma_collection_free (names_p);\n  return result;\n} /* opfunc_copy_data_properties */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/opcodes.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef OPCODES_H\n#define OPCODES_H\n\n#include \"ecma-globals.h\"\n#include \"vm-defines.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup vm_opcodes Opcodes\n * @{\n */\n\n/**\n * Number arithmetic operations.\n */\ntypedef enum\n{\n  NUMBER_ARITHMETIC_SUBTRACTION, /**< subtraction */\n  NUMBER_ARITHMETIC_MULTIPLICATION, /**< multiplication */\n  NUMBER_ARITHMETIC_DIVISION, /**< division */\n  NUMBER_ARITHMETIC_REMAINDER, /**< remainder calculation */\n#if ENABLED (JERRY_ESNEXT)\n  NUMBER_ARITHMETIC_EXPONENTIATION, /**< exponentiation */\n#endif /* ENABLED (JERRY_ESNEXT) */\n} number_arithmetic_op;\n\n/**\n * Number bitwise logic operations.\n */\ntypedef enum\n{\n  NUMBER_BITWISE_LOGIC_AND, /**< bitwise AND calculation */\n  NUMBER_BITWISE_LOGIC_OR, /**< bitwise OR calculation */\n  NUMBER_BITWISE_LOGIC_XOR, /**< bitwise XOR calculation */\n  NUMBER_BITWISE_SHIFT_LEFT, /**< bitwise LEFT SHIFT calculation */\n  NUMBER_BITWISE_SHIFT_RIGHT, /**< bitwise RIGHT_SHIFT calculation */\n  NUMBER_BITWISE_SHIFT_URIGHT, /**< bitwise UNSIGNED RIGHT SHIFT calculation */\n} number_bitwise_logic_op;\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Types for opfunc_create_executable_object.\n */\ntypedef enum\n{\n  VM_CREATE_EXECUTABLE_OBJECT_GENERATOR, /**< create a generator function */\n  VM_CREATE_EXECUTABLE_OBJECT_ASYNC, /**< create an async function */\n} vm_create_executable_object_type_t;\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * The stack contains spread object during the upcoming APPEND_ARRAY operation\n */\n#define OPFUNC_HAS_SPREAD_ELEMENT (1 << 8)\n\necma_value_t\nopfunc_equality (ecma_value_t left_value, ecma_value_t right_value);\n\necma_value_t\ndo_number_arithmetic (number_arithmetic_op op, ecma_value_t left_value, ecma_value_t right_value);\n\necma_value_t\nopfunc_unary_operation (ecma_value_t left_value, bool is_plus);\n\necma_value_t\ndo_number_bitwise_logic (number_bitwise_logic_op op, ecma_value_t left_value, ecma_value_t right_value);\n\necma_value_t\ndo_number_bitwise_not (ecma_value_t value);\n\necma_value_t\nopfunc_addition (ecma_value_t left_value, ecma_value_t right_value);\n\necma_value_t\nopfunc_relation (ecma_value_t left_value, ecma_value_t right_value, bool left_first, bool is_invert);\n\necma_value_t\nopfunc_in (ecma_value_t left_value, ecma_value_t right_value);\n\necma_value_t\nopfunc_instanceof (ecma_value_t left_value, ecma_value_t right_value);\n\necma_value_t\nopfunc_typeof (ecma_value_t left_value);\n\nvoid\nopfunc_set_data_property (ecma_object_t *object_p, ecma_string_t *prop_name_p, ecma_value_t value);\n\nvoid\nopfunc_set_accessor (bool is_getter, ecma_value_t object, ecma_string_t *accessor_name_p, ecma_value_t accessor);\n\necma_value_t\nvm_op_delete_prop (ecma_value_t object, ecma_value_t property, bool is_strict);\n\necma_value_t\nvm_op_delete_var (ecma_value_t name_literal, ecma_object_t *lex_env_p);\n\necma_collection_t *\nopfunc_for_in (ecma_value_t left_value, ecma_value_t *result_obj_p);\n\n#if ENABLED (JERRY_ESNEXT)\necma_collection_t *\nopfunc_spread_arguments (ecma_value_t *stack_top_p, uint8_t argument_list_len);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\necma_value_t\nopfunc_append_array (ecma_value_t *stack_top_p, uint16_t values_length);\n\n#if ENABLED (JERRY_ESNEXT)\n\nvm_executable_object_t *\nopfunc_create_executable_object (vm_frame_ctx_t *frame_ctx_p, vm_create_executable_object_type_t type);\n\nextern const uint8_t opfunc_resume_executable_object_with_throw[];\nextern const uint8_t opfunc_resume_executable_object_with_return[];\n\necma_value_t\nopfunc_resume_executable_object (vm_executable_object_t *executable_object_p, ecma_value_t value);\n\nvoid\nopfunc_async_generator_yield (ecma_extended_object_t *async_generator_object_p, ecma_value_t value);\n\necma_value_t\nopfunc_async_create_and_await (vm_frame_ctx_t *frame_ctx_p, ecma_value_t value, uint16_t extra_flags);\n\necma_value_t\nopfunc_init_class_fields (ecma_value_t class_object, ecma_value_t this_val);\n\necma_value_t\nopfunc_init_static_class_fields (ecma_value_t function_object, ecma_value_t this_val);\n\necma_value_t\nopfunc_add_computed_field (ecma_value_t class_object, ecma_value_t name);\n\necma_value_t\nopfunc_create_implicit_class_constructor (uint8_t opcode);\n\nvoid\nopfunc_set_home_object (ecma_object_t *func_p, ecma_object_t *parent_env_p);\n\nvoid\nopfunc_push_class_environment (vm_frame_ctx_t *frame_ctx_p,  ecma_value_t **vm_stack_top, ecma_value_t class_name);\n\necma_value_t\nopfunc_init_class (vm_frame_ctx_t *frame_context_p, ecma_value_t *stack_top_p);\n\nvoid\nopfunc_pop_lexical_environment (vm_frame_ctx_t *frame_ctx_p);\n\nvoid\nopfunc_finalize_class (vm_frame_ctx_t *frame_ctx_p, ecma_value_t **vm_stack_top_p, ecma_value_t class_name);\n\necma_value_t\nopfunc_form_super_reference (ecma_value_t **vm_stack_top_p, vm_frame_ctx_t *frame_ctx_p, ecma_value_t prop_name,\n                             uint8_t opcode);\n\necma_value_t\nopfunc_assign_super_reference (ecma_value_t **vm_stack_top_p, vm_frame_ctx_t *frame_ctx_p, uint32_t opcode_data);\n\necma_value_t\nopfunc_copy_data_properties (ecma_value_t target_object, ecma_value_t source_object, ecma_value_t filter_array);\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n\n#endif /* !OPCODES_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/vm-defines.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef VM_DEFINES_H\n#define VM_DEFINES_H\n\n#include \"byte-code.h\"\n#include \"ecma-globals.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup vm_executor Executor\n * @{\n */\n\n/**\n * Helper for += on uint16_t values.\n */\n#define VM_PLUS_EQUAL_U16(base, value) (base) = (uint16_t) ((base) + (value))\n\n/**\n * Helper for -= on uint16_t values.\n */\n#define VM_MINUS_EQUAL_U16(base, value) (base) = (uint16_t) ((base) - (value))\n\n/**\n * Flag bits of vm_frame_ctx_shared_t\n */\ntypedef enum\n{\n  VM_FRAME_CTX_SHARED_HAS_ARG_LIST = (1 << 0),        /**< has argument list */\n  VM_FRAME_CTX_SHARED_DIRECT_EVAL = (1 << 1),         /**< direct eval call */\n  VM_FRAME_CTX_SHARED_FREE_THIS = (1 << 2),           /**< free this binding */\n  VM_FRAME_CTX_SHARED_FREE_LOCAL_ENV = (1 << 3),      /**< free local environment */\n#if ENABLED (JERRY_ESNEXT)\n  VM_FRAME_CTX_SHARED_NON_ARROW_FUNC = (1 << 4),      /**< non-arrow function */\n  VM_FRAME_CTX_SHARED_HERITAGE_PRESENT = (1 << 5),    /**< class heritage present */\n  VM_FRAME_CTX_SHARED_HAS_CLASS_FIELDS = (1 << 6),    /**< has class fields */\n#endif /* ENABLED (JERRY_ESNEXT) */\n} vm_frame_ctx_shared_flags_t;\n\n/**\n * Shared data between the interpreter and the caller\n */\ntypedef struct\n{\n  const ecma_compiled_code_t *bytecode_header_p;      /**< currently executed byte-code data */\n  uint32_t status_flags;                              /**< combination of vm_frame_ctx_shared_flags_t bits */\n} vm_frame_ctx_shared_t;\n\n/**\n * Shared data extended with arguments\n */\ntypedef struct\n{\n  vm_frame_ctx_shared_t header;                       /**< shared data header */\n  ecma_object_t *function_object_p;                   /**< function obj */\n  const ecma_value_t *arg_list_p;                     /**< arguments list */\n  uint32_t arg_list_len;                              /**< arguments list length */\n} vm_frame_ctx_shared_args_t;\n\n#if ENABLED (JERRY_ESNEXT)\n\n#define VM_FRAME_CTX_GET_FUNCTION_OBJECT(frame_ctx_p) \\\n  (((vm_frame_ctx_shared_args_t *) (frame_ctx_p)->shared_p)->function_object_p)\n\n/**\n * Shared data extended with computed class fields\n */\ntypedef struct\n{\n  vm_frame_ctx_shared_t header;                       /**< shared data header */\n  ecma_value_t *computed_class_fields_p;              /**< names of the computed class fields */\n} vm_frame_ctx_shared_class_fields_t;\n\n/**\n * Get the computed class field\n */\n#define VM_GET_COMPUTED_CLASS_FIELDS(frame_ctx_p) \\\n  (((vm_frame_ctx_shared_class_fields_t *) ((frame_ctx_p)->shared_p))->computed_class_fields_p)\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Flag bits of vm_frame_ctx_t\n */\ntypedef enum\n{\n  VM_FRAME_CTX_DIRECT_EVAL = (1 << 1),                /**< direct eval call */\n  VM_FRAME_CTX_IS_STRICT = (1 << 2),                  /**< strict mode */\n} vm_frame_ctx_flags_t;\n\n/**\n * Context of interpreter, related to a JS stack frame\n */\ntypedef struct vm_frame_ctx_t\n{\n  vm_frame_ctx_shared_t *shared_p;                    /**< shared information */\n  const uint8_t *byte_code_p;                         /**< current byte code pointer */\n  const uint8_t *byte_code_start_p;                   /**< byte code start pointer */\n  ecma_value_t *stack_top_p;                          /**< stack top pointer */\n  ecma_value_t *literal_start_p;                      /**< literal list start pointer */\n  ecma_object_t *lex_env_p;                           /**< current lexical environment */\n  struct vm_frame_ctx_t *prev_context_p;              /**< previous context */\n  ecma_value_t this_binding;                          /**< this binding */\n  ecma_value_t block_result;                          /**< block result */\n#if ENABLED (JERRY_LINE_INFO)\n  uint32_t current_line;                              /**< currently executed line */\n#endif /* ENABLED (JERRY_LINE_INFO) */\n  uint16_t context_depth;                             /**< current context depth */\n  uint8_t status_flags;                               /**< combination of vm_frame_ctx_flags_t bits */\n  uint8_t call_operation;                             /**< perform a call or construct operation */\n  /* Registers start immediately after the frame context. */\n} vm_frame_ctx_t;\n\n/**\n * Get register list corresponding to the frame context.\n */\n#define VM_GET_REGISTERS(frame_ctx_p) ((ecma_value_t *) ((frame_ctx_p) + 1))\n\n/**\n * Read or write a specific register.\n */\n#define VM_GET_REGISTER(frame_ctx_p, i) (((ecma_value_t *) ((frame_ctx_p) + 1))[i])\n\n/**\n * Get the executable object.\n */\n#define VM_GET_EXECUTABLE_OBJECT(frame_ctx_p) \\\n  ((ecma_extended_object_t *) ((uintptr_t) (frame_ctx_p) - (uintptr_t) offsetof (vm_executable_object_t, frame_ctx)))\n\n/**\n * Generator frame context.\n */\ntypedef struct\n{\n  ecma_extended_object_t extended_object; /**< extended object part */\n  vm_frame_ctx_shared_t shared; /**< shared part */\n  vm_frame_ctx_t frame_ctx; /**< frame context part */\n} vm_executable_object_t;\n\n/**\n * @}\n * @}\n */\n\n#endif /* !VM_DEFINES_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/vm-stack.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-alloc.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-promise-object.h\"\n#include \"jcontext.h\"\n#include \"vm-defines.h\"\n#include \"vm-stack.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup stack VM stack\n * @{\n */\n\nJERRY_STATIC_ASSERT (PARSER_WITH_CONTEXT_STACK_ALLOCATION == PARSER_BLOCK_CONTEXT_STACK_ALLOCATION,\n                     with_context_stack_allocation_must_be_equal_to_block_context_stack_allocation);\n\nJERRY_STATIC_ASSERT (PARSER_WITH_CONTEXT_STACK_ALLOCATION == PARSER_TRY_CONTEXT_STACK_ALLOCATION,\n                     with_context_stack_allocation_must_be_equal_to_block_context_stack_allocation);\n\nJERRY_STATIC_ASSERT (PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION == PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION,\n                     for_of_context_stack_allocation_must_be_equal_to_for_await_of_context_stack_allocation);\n\n/**\n * Abort (finalize) the current stack context, and remove it.\n *\n * @return new stack top\n */\necma_value_t *\nvm_stack_context_abort (vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                        ecma_value_t *vm_stack_top_p) /**< current stack top */\n{\n  ecma_value_t context_info = vm_stack_top_p[-1];\n\n  if (context_info & VM_CONTEXT_HAS_LEX_ENV)\n  {\n    ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n    JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n    frame_ctx_p->lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n    ecma_deref_object (lex_env_p);\n  }\n\n  switch (VM_GET_CONTEXT_TYPE (context_info))\n  {\n    case VM_CONTEXT_FINALLY_THROW:\n    case VM_CONTEXT_FINALLY_RETURN:\n    {\n      ecma_free_value (vm_stack_top_p[-2]);\n      /* FALLTHRU */\n    }\n    case VM_CONTEXT_FINALLY_JUMP:\n    {\n      VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FINALLY_CONTEXT_STACK_ALLOCATION);\n      vm_stack_top_p -= PARSER_FINALLY_CONTEXT_STACK_ALLOCATION;\n      break;\n    }\n    case VM_CONTEXT_TRY:\n    case VM_CONTEXT_CATCH:\n#if ENABLED (JERRY_ESNEXT)\n    case VM_CONTEXT_BLOCK:\n#endif /* ENABLED (JERRY_ESNEXT) */\n    case VM_CONTEXT_WITH:\n    {\n      VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_WITH_CONTEXT_STACK_ALLOCATION);\n      vm_stack_top_p -= PARSER_WITH_CONTEXT_STACK_ALLOCATION;\n      break;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    case VM_CONTEXT_FOR_OF:\n    case VM_CONTEXT_FOR_AWAIT_OF:\n    {\n      ecma_free_value (vm_stack_top_p[-2]);\n      ecma_free_value (vm_stack_top_p[-3]);\n      ecma_free_value (vm_stack_top_p[-4]);\n\n      VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION);\n      vm_stack_top_p -= PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION;\n      break;\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n    default:\n    {\n      JERRY_ASSERT (VM_GET_CONTEXT_TYPE (vm_stack_top_p[-1]) == VM_CONTEXT_FOR_IN);\n\n      ecma_collection_t *collection_p;\n      collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t, vm_stack_top_p[-2]);\n\n      ecma_value_t *buffer_p = collection_p->buffer_p;\n\n      for (uint32_t index = vm_stack_top_p[-3]; index < collection_p->item_count; index++)\n      {\n        ecma_free_value (buffer_p[index]);\n      }\n\n      ecma_collection_destroy (collection_p);\n\n      ecma_free_value (vm_stack_top_p[-4]);\n\n      VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION);\n      vm_stack_top_p -= PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION;\n      break;\n    }\n  }\n\n  return vm_stack_top_p;\n} /* vm_stack_context_abort */\n\n/**\n * Decode branch offset.\n *\n * @return branch offset\n */\nstatic uint32_t\nvm_decode_branch_offset (const uint8_t *branch_offset_p, /**< start offset of byte code */\n                         uint32_t length) /**< length of the branch */\n{\n  uint32_t branch_offset = *branch_offset_p;\n\n  JERRY_ASSERT (length >= 1 && length <= 3);\n\n  switch (length)\n  {\n    case 3:\n    {\n      branch_offset <<= 8;\n      branch_offset |= *(++branch_offset_p);\n      /* FALLTHRU */\n    }\n    case 2:\n    {\n      branch_offset <<= 8;\n      branch_offset |= *(++branch_offset_p);\n      break;\n    }\n  }\n\n  return branch_offset;\n} /* vm_decode_branch_offset */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Byte code which resumes an executable object with throw\n */\nstatic const uint8_t vm_stack_resume_executable_object_with_context_end[1] =\n{\n  CBC_CONTEXT_END\n};\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * Find a finally up to the end position.\n *\n * @return value specified in vm_stack_found_type\n */\nvm_stack_found_type\nvm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                       ecma_value_t *stack_top_p, /**< current stack top */\n                       vm_stack_context_type_t finally_type, /**< searching this finally */\n                       uint32_t search_limit) /**< search up-to this byte code */\n{\n  JERRY_ASSERT (finally_type <= VM_CONTEXT_FINALLY_RETURN);\n\n  if (finally_type != VM_CONTEXT_FINALLY_JUMP)\n  {\n    search_limit = 0xffffffffu;\n  }\n\n  while (frame_ctx_p->context_depth > 0)\n  {\n    vm_stack_context_type_t context_type;\n    uint32_t context_end = VM_GET_CONTEXT_END (stack_top_p[-1]);\n\n    if (search_limit < context_end)\n    {\n      frame_ctx_p->stack_top_p = stack_top_p;\n      return VM_CONTEXT_FOUND_EXPECTED;\n    }\n\n    context_type = VM_GET_CONTEXT_TYPE (stack_top_p[-1]);\n    if (context_type == VM_CONTEXT_TRY || context_type == VM_CONTEXT_CATCH)\n    {\n      const uint8_t *byte_code_p;\n      uint32_t branch_offset_length;\n      uint32_t branch_offset;\n\n      if (search_limit == context_end)\n      {\n        frame_ctx_p->stack_top_p = stack_top_p;\n        return VM_CONTEXT_FOUND_EXPECTED;\n      }\n\n#if ENABLED (JERRY_ESNEXT)\n      if (stack_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV)\n      {\n        ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n        JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n        frame_ctx_p->lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n        ecma_deref_object (lex_env_p);\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      byte_code_p = frame_ctx_p->byte_code_start_p + context_end;\n\n      if (context_type == VM_CONTEXT_TRY)\n      {\n        JERRY_ASSERT (byte_code_p[0] == CBC_EXT_OPCODE);\n\n        if (byte_code_p[1] >= CBC_EXT_CATCH\n            && byte_code_p[1] <= CBC_EXT_CATCH_3)\n        {\n          branch_offset_length = CBC_BRANCH_OFFSET_LENGTH (byte_code_p[1]);\n          branch_offset = vm_decode_branch_offset (byte_code_p + 2,\n                                                   branch_offset_length);\n\n          if (finally_type == VM_CONTEXT_FINALLY_THROW)\n          {\n            branch_offset += (uint32_t) (byte_code_p - frame_ctx_p->byte_code_start_p);\n\n            stack_top_p[-1] = VM_CREATE_CONTEXT (VM_CONTEXT_CATCH, branch_offset);\n\n            byte_code_p += 2 + branch_offset_length;\n            frame_ctx_p->byte_code_p = byte_code_p;\n            frame_ctx_p->stack_top_p = stack_top_p;\n            return VM_CONTEXT_FOUND_FINALLY;\n          }\n\n          byte_code_p += branch_offset;\n\n          if (*byte_code_p == CBC_CONTEXT_END)\n          {\n            VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_TRY_CONTEXT_STACK_ALLOCATION);\n            stack_top_p -= PARSER_TRY_CONTEXT_STACK_ALLOCATION;\n            continue;\n          }\n        }\n      }\n      else\n      {\n        JERRY_ASSERT (context_type == VM_CONTEXT_CATCH);\n\n#if !ENABLED (JERRY_ESNEXT)\n        if (stack_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV)\n        {\n          ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n          JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n          frame_ctx_p->lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n          ecma_deref_object (lex_env_p);\n        }\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n        if (byte_code_p[0] == CBC_CONTEXT_END)\n        {\n          VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_TRY_CONTEXT_STACK_ALLOCATION);\n          stack_top_p -= PARSER_TRY_CONTEXT_STACK_ALLOCATION;\n          continue;\n        }\n      }\n\n      JERRY_ASSERT (byte_code_p[0] == CBC_EXT_OPCODE);\n\n      VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FINALLY_CONTEXT_EXTRA_STACK_ALLOCATION);\n      stack_top_p += PARSER_FINALLY_CONTEXT_EXTRA_STACK_ALLOCATION;\n\n#if ENABLED (JERRY_ESNEXT)\n      if (JERRY_UNLIKELY (byte_code_p[1] == CBC_EXT_ASYNC_EXIT))\n      {\n        branch_offset = (uint32_t) (byte_code_p - frame_ctx_p->byte_code_start_p);\n        stack_top_p[-1] = VM_CREATE_CONTEXT ((uint32_t) finally_type, branch_offset);\n\n        frame_ctx_p->byte_code_p = byte_code_p;\n        frame_ctx_p->stack_top_p = stack_top_p;\n        return VM_CONTEXT_FOUND_FINALLY;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n      JERRY_ASSERT (byte_code_p[1] >= CBC_EXT_FINALLY\n                    && byte_code_p[1] <= CBC_EXT_FINALLY_3);\n\n      branch_offset_length = CBC_BRANCH_OFFSET_LENGTH (byte_code_p[1]);\n      branch_offset = vm_decode_branch_offset (byte_code_p + 2,\n                                               branch_offset_length);\n\n      branch_offset += (uint32_t) (byte_code_p - frame_ctx_p->byte_code_start_p);\n\n      stack_top_p[-1] = VM_CREATE_CONTEXT ((uint32_t) finally_type, branch_offset);\n\n      byte_code_p += 2 + branch_offset_length;\n      frame_ctx_p->byte_code_p = byte_code_p;\n      frame_ctx_p->stack_top_p = stack_top_p;\n      return VM_CONTEXT_FOUND_FINALLY;\n    }\n#if ENABLED (JERRY_ESNEXT)\n    else if (stack_top_p[-1] & VM_CONTEXT_CLOSE_ITERATOR)\n    {\n      JERRY_ASSERT (context_type == VM_CONTEXT_FOR_OF || context_type == VM_CONTEXT_FOR_AWAIT_OF);\n      JERRY_ASSERT (finally_type == VM_CONTEXT_FINALLY_THROW || !jcontext_has_pending_exception ());\n\n      ecma_value_t exception = ECMA_VALUE_UNDEFINED;\n      if (finally_type == VM_CONTEXT_FINALLY_THROW)\n      {\n        exception = jcontext_take_exception ();\n      }\n\n      ecma_value_t iterator = stack_top_p[-3];\n      ecma_value_t result = ecma_op_get_method_by_magic_id (iterator, LIT_MAGIC_STRING_RETURN);\n\n      if (!ECMA_IS_VALUE_ERROR (result) && !ecma_is_value_undefined (result))\n      {\n        if (!ecma_is_value_object (result) || !ecma_op_is_callable (result))\n        {\n          ecma_free_value (result);\n          result = ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator return() is not callable\"));\n        }\n        else\n        {\n          ecma_object_t *return_obj_p = ecma_get_object_from_value (result);\n          result = ecma_op_function_call (return_obj_p, iterator, NULL, 0);\n          ecma_deref_object (return_obj_p);\n\n          if (context_type == VM_CONTEXT_FOR_AWAIT_OF && !ECMA_IS_VALUE_ERROR (result))\n          {\n            ecma_extended_object_t *async_generator_object_p = VM_GET_EXECUTABLE_OBJECT (frame_ctx_p);\n\n            result = ecma_promise_async_await (async_generator_object_p, result);\n\n            if (!ECMA_IS_VALUE_ERROR (result))\n            {\n              uint16_t extra_flags = (ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD\n                                      | (ECMA_AWAIT_FOR_CLOSE << ECMA_AWAIT_STATE_SHIFT));\n              async_generator_object_p->u.class_prop.extra_info |= extra_flags;\n\n              stack_top_p = vm_stack_context_abort (frame_ctx_p, stack_top_p);\n\n              VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FINALLY_CONTEXT_STACK_ALLOCATION);\n              stack_top_p += PARSER_FINALLY_CONTEXT_STACK_ALLOCATION;\n\n              stack_top_p[-1] = VM_CREATE_CONTEXT ((uint32_t) finally_type, context_end);\n              if (finally_type == VM_CONTEXT_FINALLY_THROW)\n              {\n                stack_top_p[-2] = exception;\n              }\n\n              frame_ctx_p->call_operation = VM_EXEC_RETURN;\n              frame_ctx_p->byte_code_p = vm_stack_resume_executable_object_with_context_end;\n              frame_ctx_p->stack_top_p = stack_top_p;\n              return VM_CONTEXT_FOUND_AWAIT;\n            }\n          }\n\n          if (!ECMA_IS_VALUE_ERROR (result))\n          {\n            bool is_object = ecma_is_value_object (result);\n\n            ecma_free_value (result);\n            result = ECMA_VALUE_UNDEFINED;\n\n            if (!is_object)\n            {\n              result = ecma_raise_type_error (ECMA_ERR_MSG (\"Iterator return() result is not object\"));\n            }\n          }\n        }\n      }\n\n      JERRY_ASSERT (ECMA_IS_VALUE_ERROR (result) || result == ECMA_VALUE_UNDEFINED);\n\n      if (ECMA_IS_VALUE_ERROR (result))\n      {\n        if (finally_type != VM_CONTEXT_FINALLY_THROW)\n        {\n          frame_ctx_p->stack_top_p = vm_stack_context_abort (frame_ctx_p, stack_top_p);\n          return VM_CONTEXT_FOUND_ERROR;\n        }\n\n        ecma_free_value (jcontext_take_exception ());\n        jcontext_raise_exception (exception);\n      }\n      else if (finally_type == VM_CONTEXT_FINALLY_THROW)\n      {\n        jcontext_raise_exception (exception);\n      }\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    stack_top_p = vm_stack_context_abort (frame_ctx_p, stack_top_p);\n  }\n\n  frame_ctx_p->stack_top_p = stack_top_p;\n  return VM_CONTEXT_FOUND_EXPECTED;\n} /* vm_stack_find_finally */\n\n#if ENABLED (JERRY_ESNEXT)\n\n/**\n * Get the offsets of ecma values corresponding to the passed context.\n *\n * @return array of offsets, last item represents the size of the context item\n */\nuint32_t\nvm_get_context_value_offsets (ecma_value_t *context_item_p) /**< any item of a context */\n{\n  switch (VM_GET_CONTEXT_TYPE (context_item_p[-1]))\n  {\n    case VM_CONTEXT_FINALLY_THROW:\n    case VM_CONTEXT_FINALLY_RETURN:\n    {\n      return (PARSER_FINALLY_CONTEXT_STACK_ALLOCATION << VM_CONTEXT_OFFSET_SHIFT) | 2;\n    }\n    case VM_CONTEXT_FINALLY_JUMP:\n    {\n      return PARSER_FINALLY_CONTEXT_STACK_ALLOCATION;\n    }\n    case VM_CONTEXT_TRY:\n    case VM_CONTEXT_CATCH:\n    case VM_CONTEXT_BLOCK:\n    case VM_CONTEXT_WITH:\n    {\n      return PARSER_WITH_CONTEXT_STACK_ALLOCATION;\n    }\n    case VM_CONTEXT_FOR_IN:\n    {\n      return (PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION << VM_CONTEXT_OFFSET_SHIFT) | 4;\n    }\n    default:\n    {\n      JERRY_ASSERT (VM_GET_CONTEXT_TYPE (context_item_p[-1]) == VM_CONTEXT_FOR_OF\n                    || VM_GET_CONTEXT_TYPE (context_item_p[-1]) == VM_CONTEXT_FOR_AWAIT_OF);\n\n      return ((PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION << (VM_CONTEXT_OFFSET_SHIFT * 3))\n              | (4 << (VM_CONTEXT_OFFSET_SHIFT * 2))\n              | (3 << VM_CONTEXT_OFFSET_SHIFT)\n              | 2);\n    }\n  }\n} /* vm_get_context_value_offsets */\n\n/**\n * Ref / deref lexical environments in the chain using the current context.\n */\nvoid\nvm_ref_lex_env_chain (ecma_object_t *lex_env_p, /**< top of lexical environment */\n                      uint16_t context_depth, /**< depth of function context */\n                      ecma_value_t *context_end_p, /**< end of function context */\n                      bool do_ref) /**< ref or deref lexical environments */\n{\n  ecma_value_t *context_top_p = context_end_p + context_depth;\n  JERRY_ASSERT (context_top_p > context_end_p);\n\n  do\n  {\n    if (context_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV)\n    {\n      JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n      ecma_object_t *next_lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n\n      if (do_ref)\n      {\n        ecma_ref_object (lex_env_p);\n      }\n      else\n      {\n        ecma_deref_object (lex_env_p);\n      }\n\n      lex_env_p = next_lex_env_p;\n    }\n\n    uint32_t offsets = vm_get_context_value_offsets (context_top_p);\n\n    while (VM_CONTEXT_HAS_NEXT_OFFSET (offsets))\n    {\n      int32_t offset = VM_CONTEXT_GET_NEXT_OFFSET (offsets);\n\n      if (do_ref)\n      {\n        ecma_ref_if_object (context_top_p[offset]);\n      }\n      else\n      {\n        ecma_deref_if_object (context_top_p[offset]);\n      }\n\n      offsets >>= VM_CONTEXT_OFFSET_SHIFT;\n    }\n\n    JERRY_ASSERT (context_top_p >= context_end_p + offsets);\n    context_top_p -= offsets;\n  }\n  while (context_top_p > context_end_p);\n} /* vm_ref_lex_env_chain */\n\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/vm-stack.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef VM_STACK_H\n#define VM_STACK_H\n\n#include \"ecma-globals.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup stack VM stack\n * @{\n */\n\n/**\n * Create context on the vm stack.\n */\n#define VM_CREATE_CONTEXT(type, end_offset) ((ecma_value_t) ((type) | ((end_offset) << 7)))\n\n/**\n * Create context on the vm stack with environment.\n */\n#define VM_CREATE_CONTEXT_WITH_ENV(type, end_offset) \\\n  (VM_CREATE_CONTEXT ((type),(end_offset)) | VM_CONTEXT_HAS_LEX_ENV)\n\n/**\n * Get type of a vm context.\n */\n#define VM_GET_CONTEXT_TYPE(value) ((vm_stack_context_type_t) ((value) & 0x1f))\n\n/**\n * Get the end position of a vm context.\n */\n#define VM_GET_CONTEXT_END(value) ((value) >> 7)\n\n/**\n * This flag is set if the context has a lexical environment.\n */\n#define VM_CONTEXT_HAS_LEX_ENV 0x20\n\n/**\n * This flag is set if the iterator close operation should be invoked during a for-of context break.\n */\n#define VM_CONTEXT_CLOSE_ITERATOR 0x40\n\n/**\n * Context types for the vm stack.\n */\ntypedef enum\n{\n  /* Update VM_CONTEXT_IS_FINALLY macro if the following three values are changed. */\n  VM_CONTEXT_FINALLY_JUMP,                    /**< finally context with a jump */\n  VM_CONTEXT_FINALLY_THROW,                   /**< finally context with a throw */\n  VM_CONTEXT_FINALLY_RETURN,                  /**< finally context with a return */\n  VM_CONTEXT_TRY,                             /**< try context */\n  VM_CONTEXT_CATCH,                           /**< catch context */\n#if ENABLED (JERRY_ESNEXT)\n  VM_CONTEXT_BLOCK,                           /**< block context */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  VM_CONTEXT_WITH,                            /**< with context */\n  VM_CONTEXT_FOR_IN,                          /**< for-in context */\n#if ENABLED (JERRY_ESNEXT)\n  VM_CONTEXT_FOR_OF,                          /**< for-of context */\n  VM_CONTEXT_FOR_AWAIT_OF,                    /**< for-await-of context */\n#endif /* ENABLED (JERRY_ESNEXT) */\n} vm_stack_context_type_t;\n\n/**\n * Return types for vm_stack_find_finally.\n */\ntypedef enum\n{\n  VM_CONTEXT_FOUND_FINALLY,                   /**< found finally */\n#if ENABLED (JERRY_ESNEXT)\n  VM_CONTEXT_FOUND_ERROR,                     /**< found an error */\n  VM_CONTEXT_FOUND_AWAIT,                     /**< found an await operation */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  VM_CONTEXT_FOUND_EXPECTED,                  /**< found the type specified in finally_type */\n} vm_stack_found_type;\n\n/**\n * Checks whether the context type is a finally type.\n */\n#define VM_CONTEXT_IS_FINALLY(context_type) \\\n  ((context_type) <= VM_CONTEXT_FINALLY_RETURN)\n\n/**\n * Shift needs to be applied to get the next item of the offset array.\n */\n#define VM_CONTEXT_OFFSET_SHIFT 4\n\n/**\n * Checks whether an offset is available.\n */\n#define VM_CONTEXT_HAS_NEXT_OFFSET(offsets) ((offsets) >= (1 << VM_CONTEXT_OFFSET_SHIFT))\n\n/**\n * Get the next offset from the offset array.\n */\n#define VM_CONTEXT_GET_NEXT_OFFSET(offsets) (-((int32_t) ((offsets) & ((1 << VM_CONTEXT_OFFSET_SHIFT) - 1))))\n\necma_value_t *vm_stack_context_abort (vm_frame_ctx_t *frame_ctx_p, ecma_value_t *vm_stack_top_p);\nvm_stack_found_type vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, ecma_value_t *stack_top_p,\n                                           vm_stack_context_type_t finally_type, uint32_t search_limit);\nuint32_t vm_get_context_value_offsets (ecma_value_t *context_item_p);\nvoid vm_ref_lex_env_chain (ecma_object_t *lex_env_p, uint16_t context_depth,\n                           ecma_value_t *context_end_p, bool do_ref);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !VM_STACK_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/vm-utils.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-array-object.h\"\n#include \"ecma-helpers.h\"\n#include \"jcontext.h\"\n#include \"lit-char-helpers.h\"\n#include \"vm.h\"\n\n/**\n * Check whether currently executed code is strict mode code\n *\n * @return true - current code is executed in strict mode,\n *         false - otherwise\n */\nbool\nvm_is_strict_mode (void)\n{\n  JERRY_ASSERT (JERRY_CONTEXT (vm_top_context_p) != NULL);\n\n  return JERRY_CONTEXT (vm_top_context_p)->status_flags & VM_FRAME_CTX_IS_STRICT;\n} /* vm_is_strict_mode */\n\n/**\n * Check whether currently performed call (on top of call-stack) is performed in form,\n * meeting conditions of 'Direct Call to Eval' (see also: ECMA-262 v5, 15.1.2.1.1)\n *\n * Warning:\n *         the function should only be called from implementation\n *         of built-in 'eval' routine of Global object\n *\n * @return true - currently performed call is performed through 'eval' identifier,\n *                without 'this' argument,\n *         false - otherwise\n */\nextern inline bool JERRY_ATTR_ALWAYS_INLINE\nvm_is_direct_eval_form_call (void)\n{\n  return (JERRY_CONTEXT (status_flags) & ECMA_STATUS_DIRECT_EVAL) != 0;\n} /* vm_is_direct_eval_form_call */\n\n/**\n * Get backtrace. The backtrace is an array of strings where\n * each string contains the position of the corresponding frame.\n * The array length is zero if the backtrace is not available.\n *\n * @return array ecma value\n */\necma_value_t\nvm_get_backtrace (uint32_t max_depth, /**< maximum backtrace depth, 0 = unlimited */\n                  ecma_object_t *ignored_function_p) /**< ignore functions up to this function */\n{\n#if ENABLED (JERRY_LINE_INFO)\n  vm_frame_ctx_t *context_p = JERRY_CONTEXT (vm_top_context_p);\n\n  if (ignored_function_p != NULL)\n  {\n    JERRY_ASSERT (ecma_get_object_type (ignored_function_p) == ECMA_OBJECT_TYPE_FUNCTION\n                  || ecma_get_object_type (ignored_function_p) == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);\n\n    while (true)\n    {\n      if (context_p == NULL)\n      {\n        context_p = JERRY_CONTEXT (vm_top_context_p);\n        break;\n      }\n\n      if (context_p->shared_p->status_flags & VM_FRAME_CTX_SHARED_HAS_ARG_LIST)\n      {\n        vm_frame_ctx_shared_args_t *shared_args_p = (vm_frame_ctx_shared_args_t *) context_p->shared_p;\n\n        if (shared_args_p->function_object_p == ignored_function_p)\n        {\n          context_p = context_p->prev_context_p;\n          break;\n        }\n      }\n\n      context_p = context_p->prev_context_p;\n    }\n  }\n\n  if (max_depth == 0)\n  {\n    max_depth = UINT32_MAX;\n  }\n\n  ecma_object_t *array_p = ecma_op_new_array_object (0);\n  JERRY_ASSERT (ecma_op_object_is_fast_array (array_p));\n  uint32_t index = 0;\n\n  while (context_p != NULL)\n  {\n    ecma_value_t resource_name = ecma_get_resource_name (context_p->shared_p->bytecode_header_p);\n    ecma_string_t *str_p = ecma_get_string_from_value (resource_name);\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n\n    if (ecma_string_is_empty (str_p))\n    {\n      ecma_stringbuilder_append_raw (&builder, (const lit_utf8_byte_t *)\"<unknown>:\", 10);\n    }\n    else\n    {\n      ecma_stringbuilder_append (&builder, str_p);\n      ecma_stringbuilder_append_byte (&builder, LIT_CHAR_COLON);\n    }\n\n    ecma_string_t *line_str_p = ecma_new_ecma_string_from_uint32 (context_p->current_line);\n    ecma_stringbuilder_append (&builder, line_str_p);\n    ecma_deref_ecma_string (line_str_p);\n\n    ecma_string_t *builder_str_p = ecma_stringbuilder_finalize (&builder);\n    ecma_fast_array_set_property (array_p, index, ecma_make_string_value (builder_str_p));\n    ecma_deref_ecma_string (builder_str_p);\n\n    context_p = context_p->prev_context_p;\n    index++;\n\n    if (index >= max_depth)\n    {\n      break;\n    }\n  }\n\n  return ecma_make_object_value (array_p);\n#else /* !ENABLED (JERRY_LINE_INFO) */\n  JERRY_UNUSED (max_depth);\n  JERRY_UNUSED (ignored_function_p);\n\n  return ecma_make_object_value (ecma_op_new_array_object (0));\n#endif /* ENABLED (JERRY_LINE_INFO) */\n} /* vm_get_backtrace */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/vm.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"common.h\"\n\n#include \"ecma-alloc.h\"\n#include \"ecma-arguments-object.h\"\n#include \"ecma-array-object.h\"\n#include \"ecma-bigint.h\"\n#include \"ecma-builtins.h\"\n#include \"ecma-builtin-object.h\"\n#include \"ecma-comparison.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-exceptions.h\"\n#include \"ecma-function-object.h\"\n#include \"ecma-gc.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-iterator-object.h\"\n#include \"ecma-lcache.h\"\n#include \"ecma-lex-env.h\"\n#include \"ecma-objects.h\"\n#include \"ecma-objects-general.h\"\n#include \"ecma-promise-object.h\"\n#include \"ecma-regexp-object.h\"\n#include \"jcontext.h\"\n#include \"opcodes.h\"\n#include \"vm.h\"\n#include \"vm-stack.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup vm_executor Executor\n * @{\n */\n\n/**\n * Get the value of object[property].\n *\n * @return ecma value\n */\nstatic ecma_value_t\nvm_op_get_value (ecma_value_t object, /**< base object */\n                 ecma_value_t property) /**< property name */\n{\n  if (ecma_is_value_object (object))\n  {\n    ecma_object_t *object_p = ecma_get_object_from_value (object);\n    ecma_string_t *property_name_p = NULL;\n\n    if (ecma_is_value_integer_number (property))\n    {\n      ecma_integer_value_t int_value = ecma_get_integer_from_value (property);\n\n      if (int_value >= 0 && int_value <= ECMA_DIRECT_STRING_MAX_IMM)\n      {\n        if (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_ARRAY)\n        {\n          ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n\n          if (JERRY_LIKELY (ecma_op_array_is_fast_array (ext_object_p)\n                            && (uint32_t) int_value < ext_object_p->u.array.length))\n          {\n            ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);\n\n            if (JERRY_LIKELY (!ecma_is_value_array_hole (values_p[int_value])))\n            {\n              return ecma_fast_copy_value (values_p[int_value]);\n            }\n          }\n        }\n\n        property_name_p = (ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_UINT,\n                                                                       (uintptr_t) int_value);\n      }\n    }\n    else if (ecma_is_value_string (property))\n    {\n      property_name_p = ecma_get_string_from_value (property);\n    }\n\n#if ENABLED (JERRY_ESNEXT)\n    if (ecma_is_value_symbol (property))\n    {\n      property_name_p = ecma_get_symbol_from_value (property);\n    }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n    if (property_name_p != NULL)\n    {\n#if ENABLED (JERRY_LCACHE)\n      ecma_property_t *property_p = ecma_lcache_lookup (object_p, property_name_p);\n\n      if (property_p != NULL && (*property_p & ECMA_PROPERTY_FLAG_DATA))\n      {\n        JERRY_ASSERT (!ECMA_PROPERTY_IS_INTERNAL (*property_p));\n        return ecma_fast_copy_value (ECMA_PROPERTY_VALUE_PTR (property_p)->value);\n      }\n#endif /* ENABLED (JERRY_LCACHE) */\n\n      /* There is no need to free the name. */\n      return ecma_op_object_get (object_p, property_name_p);\n    }\n  }\n\n  if (JERRY_UNLIKELY (ecma_is_value_undefined (object) || ecma_is_value_null (object)))\n  {\n#if ENABLED (JERRY_ERROR_MESSAGES)\n    ecma_value_t error_value = ecma_raise_standard_error_with_format (ECMA_ERROR_TYPE,\n                                                                      \"Cannot read property '%' of %\",\n                                                                      property,\n                                                                      object);\n#else /* !ENABLED (JERRY_ERROR_MESSAGES) */\n    ecma_value_t error_value = ecma_raise_type_error (NULL);\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n    return error_value;\n  }\n\n  ecma_string_t *property_name_p = ecma_op_to_property_key (property);\n\n  if (property_name_p == NULL)\n  {\n    return ECMA_VALUE_ERROR;\n  }\n\n  ecma_value_t get_value_result = ecma_op_get_value_object_base (object, property_name_p);\n\n  ecma_deref_ecma_string (property_name_p);\n  return get_value_result;\n} /* vm_op_get_value */\n\n/**\n * Set the value of object[property].\n *\n * Note:\n *  this function frees its object and property arguments\n *\n * @return an ecma value which contains an error\n *         if the property setting is unsuccessful\n */\nstatic ecma_value_t\nvm_op_set_value (ecma_value_t base, /**< base object */\n                 ecma_value_t property, /**< property name */\n                 ecma_value_t value, /**< ecma value */\n                 bool is_strict) /**< strict mode */\n{\n  ecma_value_t result = ECMA_VALUE_EMPTY;\n  ecma_object_t *object_p;\n  ecma_string_t *property_p;\n\n  if (JERRY_UNLIKELY (!ecma_is_value_object (base)))\n  {\n    if (JERRY_UNLIKELY (ecma_is_value_null (base) || ecma_is_value_undefined (base)))\n    {\n#if ENABLED (JERRY_ERROR_MESSAGES)\n      result = ecma_raise_standard_error_with_format (ECMA_ERROR_TYPE,\n                                                      \"Cannot set property '%' of %\",\n                                                      property,\n                                                      base);\n#else /* !ENABLED (JERRY_ERROR_MESSAGES) */\n      result = ecma_raise_type_error (NULL);\n#endif /* ENABLED (JERRY_ERROR_MESSAGES) */\n      ecma_free_value (property);\n      return result;\n    }\n\n    if (JERRY_UNLIKELY (!ecma_is_value_prop_name (property)))\n    {\n      property_p = ecma_op_to_string (property);\n      ecma_fast_free_value (property);\n\n      if (JERRY_UNLIKELY (property_p == NULL))\n      {\n        ecma_free_value (base);\n        return ECMA_VALUE_ERROR;\n      }\n    }\n    else\n    {\n      property_p = ecma_get_prop_name_from_value (property);\n    }\n\n    ecma_value_t object = ecma_op_to_object (base);\n    JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (object));\n\n    object_p = ecma_get_object_from_value (object);\n    ecma_op_ordinary_object_prevent_extensions (object_p);\n\n    result = ecma_op_object_put_with_receiver (object_p,\n                                               property_p,\n                                               value,\n                                               base,\n                                               is_strict);\n\n    ecma_free_value (base);\n  }\n  else\n  {\n    object_p = ecma_get_object_from_value (base);\n\n    if (JERRY_UNLIKELY (!ecma_is_value_prop_name (property)))\n    {\n      property_p = ecma_op_to_string (property);\n      ecma_fast_free_value (property);\n\n      if (JERRY_UNLIKELY (property_p == NULL))\n      {\n        ecma_deref_object (object_p);\n        return ECMA_VALUE_ERROR;\n      }\n    }\n    else\n    {\n      property_p = ecma_get_prop_name_from_value (property);\n    }\n\n    if (!ecma_is_lexical_environment (object_p))\n    {\n      result = ecma_op_object_put_with_receiver (object_p,\n                                                 property_p,\n                                                 value,\n                                                 base,\n                                                 is_strict);\n    }\n    else\n    {\n      result = ecma_op_set_mutable_binding (object_p,\n                                            property_p,\n                                            value,\n                                            is_strict);\n    }\n  }\n\n  ecma_deref_object (object_p);\n  ecma_deref_ecma_string (property_p);\n  return result;\n} /* vm_op_set_value */\n\n/** Compact bytecode define */\n#define CBC_OPCODE(arg1, arg2, arg3, arg4) arg4,\n\n/**\n * Decode table for both opcodes and extended opcodes.\n */\nstatic const uint16_t vm_decode_table[] JERRY_ATTR_CONST_DATA =\n{\n  CBC_OPCODE_LIST\n  CBC_EXT_OPCODE_LIST\n};\n\n#undef CBC_OPCODE\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\n/**\n * Run module code\n *\n * Note:\n *      returned value must be freed with ecma_free_value, when it is no longer needed.\n *\n * @return ecma value\n */\necma_value_t\nvm_run_module (ecma_module_t *module_p) /**< module to be executed */\n{\n  const ecma_value_t module_init_result = ecma_module_initialize (module_p);\n\n  if (ECMA_IS_VALUE_ERROR (module_init_result))\n  {\n    return module_init_result;\n  }\n\n  vm_frame_ctx_shared_t shared;\n  shared.bytecode_header_p = module_p->compiled_code_p;\n  shared.status_flags = 0;\n\n  return vm_run (&shared, ECMA_VALUE_UNDEFINED, module_p->scope_p);\n} /* vm_run_module */\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\n/**\n * Run global code\n *\n * Note:\n *      returned value must be freed with ecma_free_value, when it is no longer needed.\n *\n * @return ecma value\n */\necma_value_t\nvm_run_global (const ecma_compiled_code_t *bytecode_p) /**< pointer to bytecode to run */\n{\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_object_t *global_obj_p = (ecma_object_t *) ecma_op_function_get_realm (bytecode_p);\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  ecma_object_t *global_obj_p = ecma_builtin_get_global ();\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n#if ENABLED (JERRY_ESNEXT)\n  if (bytecode_p->status_flags & CBC_CODE_FLAGS_LEXICAL_BLOCK_NEEDED)\n  {\n    ecma_create_global_lexical_block (global_obj_p);\n  }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  ecma_object_t *const global_scope_p = ecma_get_global_scope (global_obj_p);\n\n  vm_frame_ctx_shared_t shared;\n  shared.bytecode_header_p = bytecode_p;\n  shared.status_flags = 0;\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  ecma_value_t this_binding = ((ecma_global_object_t *) global_obj_p)->this_binding;\n\n  ecma_global_object_t *saved_global_object_p = JERRY_CONTEXT (global_object_p);\n  JERRY_CONTEXT (global_object_p) = (ecma_global_object_t *) global_obj_p;\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n  ecma_value_t this_binding = ecma_make_object_value (global_obj_p);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  ecma_value_t result = vm_run (&shared, this_binding, global_scope_p);\n\n#if ENABLED (JERRY_BUILTIN_REALMS)\n  JERRY_CONTEXT (global_object_p) = saved_global_object_p;\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n\n  return result;\n} /* vm_run_global */\n\n/**\n * Run specified eval-mode bytecode\n *\n * @return ecma value\n */\necma_value_t\nvm_run_eval (ecma_compiled_code_t *bytecode_data_p, /**< byte-code data */\n             uint32_t parse_opts) /**< ecma_parse_opts_t option bits */\n{\n  ecma_value_t this_binding;\n  ecma_object_t *lex_env_p;\n\n  /* ECMA-262 v5, 10.4.2 */\n  if (parse_opts & ECMA_PARSE_DIRECT_EVAL)\n  {\n    this_binding = ecma_copy_value (JERRY_CONTEXT (vm_top_context_p)->this_binding);\n    lex_env_p = JERRY_CONTEXT (vm_top_context_p)->lex_env_p;\n\n#if ENABLED (JERRY_DEBUGGER)\n    uint32_t chain_index = parse_opts >> ECMA_PARSE_CHAIN_INDEX_SHIFT;\n    parse_opts &= (1 << ECMA_PARSE_CHAIN_INDEX_SHIFT) - 1;\n\n    while (chain_index != 0)\n    {\n      if (JERRY_UNLIKELY (lex_env_p->u2.outer_reference_cp == JMEM_CP_NULL))\n      {\n        return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid scope chain index for eval\"));\n      }\n\n      lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n\n      if ((ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND)\n          || (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE))\n      {\n        chain_index--;\n      }\n    }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n  }\n  else\n  {\n#if ENABLED (JERRY_BUILTIN_REALMS)\n    ecma_object_t *global_obj_p = (ecma_object_t *) ecma_op_function_get_realm (bytecode_data_p);\n    this_binding = ((ecma_global_object_t *) global_obj_p)->this_binding;\n    ecma_ref_object (ecma_get_object_from_value (this_binding));\n#else /* !ENABLED (JERRY_BUILTIN_REALMS) */\n    ecma_object_t *global_obj_p = ecma_builtin_get_global ();\n    ecma_ref_object (global_obj_p);\n    this_binding = ecma_make_object_value (global_obj_p);\n#endif /* ENABLED (JERRY_BUILTIN_REALMS) */\n    lex_env_p = ecma_get_global_scope (global_obj_p);\n  }\n\n  ecma_ref_object (lex_env_p);\n\n  if ((bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE) != 0)\n  {\n    ecma_object_t *strict_lex_env_p = ecma_create_decl_lex_env (lex_env_p);\n\n    ecma_deref_object (lex_env_p);\n    lex_env_p = strict_lex_env_p;\n  }\n\n  if ((bytecode_data_p->status_flags & CBC_CODE_FLAGS_LEXICAL_BLOCK_NEEDED) != 0)\n  {\n    ecma_object_t *lex_block_p = ecma_create_decl_lex_env (lex_env_p);\n    lex_block_p->type_flags_refs |= (uint16_t) ECMA_OBJECT_FLAG_BLOCK;\n\n    ecma_deref_object (lex_env_p);\n    lex_env_p = lex_block_p;\n  }\n\n  vm_frame_ctx_shared_t shared;\n  shared.bytecode_header_p = bytecode_data_p;\n  shared.status_flags = (parse_opts & ECMA_PARSE_DIRECT_EVAL) ? VM_FRAME_CTX_SHARED_DIRECT_EVAL : 0;\n\n  ecma_value_t completion_value = vm_run (&shared, this_binding, lex_env_p);\n\n  ecma_deref_object (lex_env_p);\n  ecma_free_value (this_binding);\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  if (!(bytecode_data_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION))\n  {\n    ecma_bytecode_deref (bytecode_data_p);\n  }\n#else /* !ENABLED (JERRY_SNAPSHOT_EXEC) */\n  ecma_bytecode_deref (bytecode_data_p);\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n  return completion_value;\n} /* vm_run_eval */\n\n/**\n * Construct object\n *\n * @return object value\n */\nstatic ecma_value_t\nvm_construct_literal_object (vm_frame_ctx_t *frame_ctx_p, /**< frame context */\n                             ecma_value_t lit_value) /**< literal */\n{\n  ecma_compiled_code_t *bytecode_p;\n\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  if (JERRY_LIKELY (!(frame_ctx_p->shared_p->bytecode_header_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION)))\n  {\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n    bytecode_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t,\n                                                  lit_value);\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n  }\n  else\n  {\n    uint8_t *byte_p = ((uint8_t *) frame_ctx_p->shared_p->bytecode_header_p) + lit_value;\n    bytecode_p = (ecma_compiled_code_t *) byte_p;\n  }\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n\n#if ENABLED (JERRY_BUILTIN_REGEXP)\n  if (JERRY_UNLIKELY (!CBC_IS_FUNCTION (bytecode_p->status_flags)))\n  {\n    ecma_object_t *regexp_obj_p = ecma_op_regexp_alloc (NULL);\n\n    if (JERRY_UNLIKELY (regexp_obj_p == NULL))\n    {\n      return ECMA_VALUE_ERROR;\n    }\n\n    return ecma_op_create_regexp_from_bytecode (regexp_obj_p, (re_compiled_code_t *) bytecode_p);\n  }\n#else /* !ENABLED (JERRY_BUILTIN_REGEXP) */\n  JERRY_ASSERT (CBC_IS_FUNCTION (bytecode_p->status_flags));\n#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */\n\n  ecma_object_t *func_obj_p;\n\n#if ENABLED (JERRY_ESNEXT)\n  if (JERRY_UNLIKELY (CBC_FUNCTION_IS_ARROW (bytecode_p->status_flags)))\n  {\n    func_obj_p = ecma_op_create_arrow_function_object (frame_ctx_p->lex_env_p,\n                                                       bytecode_p,\n                                                       frame_ctx_p->this_binding);\n  }\n  else\n  {\n    func_obj_p = ecma_op_create_any_function_object (frame_ctx_p->lex_env_p, bytecode_p);\n  }\n#else /* !ENABLED (JERRY_ESNEXT) */\n  func_obj_p = ecma_op_create_simple_function_object (frame_ctx_p->lex_env_p, bytecode_p);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  return ecma_make_object_value (func_obj_p);\n} /* vm_construct_literal_object */\n\n/**\n * Get implicit this value\n *\n * @return true - if the implicit 'this' value is updated,\n *         false - otherwise\n */\nstatic inline bool JERRY_ATTR_ALWAYS_INLINE\nvm_get_implicit_this_value (ecma_value_t *this_value_p) /**< [in,out] this value */\n{\n  if (ecma_is_value_object (*this_value_p))\n  {\n    ecma_object_t *this_obj_p = ecma_get_object_from_value (*this_value_p);\n\n    if (ecma_is_lexical_environment (this_obj_p))\n    {\n      ecma_value_t completion_value = ecma_op_implicit_this_value (this_obj_p);\n\n      JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (completion_value));\n\n      *this_value_p = completion_value;\n      return true;\n    }\n  }\n  return false;\n} /* vm_get_implicit_this_value */\n\n/**\n * Special bytecode sequence for error handling while the vm_loop\n * is preserved for an execute operation\n */\nstatic const uint8_t vm_error_byte_code_p[] =\n{\n  CBC_EXT_OPCODE, CBC_EXT_ERROR\n};\n\n#if ENABLED (JERRY_ESNEXT)\n\nstatic ecma_object_t *\nvm_get_class_function (vm_frame_ctx_t *frame_ctx_p) /**< frame context */\n{\n  JERRY_ASSERT (frame_ctx_p != NULL);\n\n  if (frame_ctx_p->shared_p->status_flags & VM_FRAME_CTX_SHARED_NON_ARROW_FUNC)\n  {\n    return VM_FRAME_CTX_GET_FUNCTION_OBJECT (frame_ctx_p);\n  }\n\n  ecma_environment_record_t *environment_record_p = ecma_op_get_environment_record (frame_ctx_p->lex_env_p);\n\n  JERRY_ASSERT (environment_record_p != NULL);\n  return ecma_get_object_from_value (environment_record_p->function_object);\n} /* vm_get_class_function */\n\n/**\n * 'super(...)' function call handler.\n */\nstatic void\nvm_super_call (vm_frame_ctx_t *frame_ctx_p) /**< frame context */\n{\n  JERRY_ASSERT (frame_ctx_p->call_operation == VM_EXEC_SUPER_CALL);\n  JERRY_ASSERT (frame_ctx_p->byte_code_p[0] == CBC_EXT_OPCODE);\n\n  const uint8_t *byte_code_p = frame_ctx_p->byte_code_p + 3;\n  uint8_t opcode = byte_code_p[-2];\n  uint32_t arguments_list_len;\n\n  bool spread_arguments = opcode >= CBC_EXT_SPREAD_SUPER_CALL;\n\n  ecma_collection_t *collection_p = NULL;\n  ecma_value_t *arguments_p;\n\n  if (spread_arguments)\n  {\n    ecma_value_t collection = *(--frame_ctx_p->stack_top_p);\n    collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t, collection);\n    arguments_p = collection_p->buffer_p;\n    arguments_list_len = collection_p->item_count;\n  }\n  else\n  {\n    arguments_list_len = byte_code_p[-1];\n    arguments_p = frame_ctx_p->stack_top_p;\n  }\n\n  ecma_value_t func_value = *(--frame_ctx_p->stack_top_p);\n  ecma_value_t completion_value;\n\n  ecma_environment_record_t *environment_record_p = ecma_op_get_environment_record (frame_ctx_p->lex_env_p);\n\n  if (!ecma_is_constructor (func_value))\n  {\n    completion_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Class extends value is not a constructor.\"));\n  }\n  else\n  {\n    ecma_object_t *func_obj_p = ecma_get_object_from_value (func_value);\n    completion_value = ecma_op_function_construct (func_obj_p,\n                                                   JERRY_CONTEXT (current_new_target_p),\n                                                   arguments_p,\n                                                   arguments_list_len);\n\n    if (!ECMA_IS_VALUE_ERROR (completion_value) && ecma_op_this_binding_is_initialized (environment_record_p))\n    {\n      ecma_free_value (completion_value);\n      completion_value = ecma_raise_reference_error (ECMA_ERR_MSG (\"Super constructor may only be called once\"));\n    }\n  }\n\n  /* Free registers. */\n  for (uint32_t i = 0; i < arguments_list_len; i++)\n  {\n    ecma_fast_free_value (arguments_p[i]);\n  }\n\n  if (collection_p != NULL)\n  {\n    ecma_collection_destroy (collection_p);\n  }\n\n  if (ecma_is_value_object (completion_value))\n  {\n    ecma_value_t current_function = ecma_make_object_value (vm_get_class_function (frame_ctx_p));\n    ecma_value_t fields_value = opfunc_init_class_fields (current_function, completion_value);\n\n    if (ECMA_IS_VALUE_ERROR (fields_value))\n    {\n      ecma_free_value (completion_value);\n      completion_value = ECMA_VALUE_ERROR;\n    }\n  }\n\n  ecma_free_value (func_value);\n\n  if (JERRY_UNLIKELY (ECMA_IS_VALUE_ERROR (completion_value)))\n  {\n#if ENABLED (JERRY_DEBUGGER)\n    JERRY_CONTEXT (debugger_exception_byte_code_p) = frame_ctx_p->byte_code_p;\n#endif /* ENABLED (JERRY_DEBUGGER) */\n    frame_ctx_p->byte_code_p = (uint8_t *) vm_error_byte_code_p;\n  }\n  else\n  {\n    ecma_op_bind_this_value (environment_record_p, completion_value);\n    frame_ctx_p->this_binding = completion_value;\n\n    frame_ctx_p->byte_code_p = byte_code_p;\n    uint32_t opcode_data = vm_decode_table[(CBC_END + 1) + opcode];\n\n    if (!(opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK)))\n    {\n      ecma_fast_free_value (completion_value);\n    }\n    else if (opcode_data & VM_OC_PUT_STACK)\n    {\n      *frame_ctx_p->stack_top_p++ = completion_value;\n    }\n    else\n    {\n      ecma_fast_free_value (frame_ctx_p->block_result);\n      frame_ctx_p->block_result = completion_value;\n    }\n  }\n} /* vm_super_call */\n\n/**\n * Perform one of the following call/construct operation with spreaded argument list\n *   - f(...args)\n *   - o.f(...args)\n *   - new O(...args)\n */\nstatic void\nvm_spread_operation (vm_frame_ctx_t *frame_ctx_p) /**< frame context */\n{\n  JERRY_ASSERT (frame_ctx_p->byte_code_p[0] == CBC_EXT_OPCODE);\n\n  uint8_t opcode = frame_ctx_p->byte_code_p[1];\n  ecma_value_t completion_value;\n  ecma_value_t collection = *(--frame_ctx_p->stack_top_p);\n\n  ecma_collection_t *collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t, collection);\n  ecma_value_t func_value = *(--frame_ctx_p->stack_top_p);\n  bool is_call_prop = opcode >= CBC_EXT_SPREAD_CALL_PROP;\n\n  if (frame_ctx_p->byte_code_p[1] == CBC_EXT_SPREAD_NEW)\n  {\n    const char *constructor_message_p = ecma_check_constructor (func_value);\n    if (constructor_message_p != ECMA_IS_VALID_CONSTRUCTOR)\n    {\n      completion_value = ecma_raise_type_error (constructor_message_p);\n    }\n    else\n    {\n      ecma_object_t *constructor_obj_p = ecma_get_object_from_value (func_value);\n\n      completion_value = ecma_op_function_construct (constructor_obj_p,\n                                                     constructor_obj_p,\n                                                     collection_p->buffer_p,\n                                                     collection_p->item_count);\n    }\n  }\n  else\n  {\n    ecma_value_t this_value = is_call_prop ? frame_ctx_p->stack_top_p[-2] : ECMA_VALUE_UNDEFINED;\n\n    if (!ecma_is_value_object (func_value)\n        || !ecma_op_object_is_callable (ecma_get_object_from_value (func_value)))\n    {\n      completion_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Expected a function.\"));\n    }\n    else\n    {\n      ecma_object_t *func_obj_p = ecma_get_object_from_value (func_value);\n\n      completion_value = ecma_op_function_call (func_obj_p,\n                                                this_value,\n                                                collection_p->buffer_p,\n                                                collection_p->item_count);\n    }\n\n    if (is_call_prop)\n    {\n      ecma_free_value (*(--frame_ctx_p->stack_top_p));\n      ecma_free_value (*(--frame_ctx_p->stack_top_p));\n    }\n  }\n\n  ecma_collection_free (collection_p);\n  ecma_free_value (func_value);\n\n  if (JERRY_UNLIKELY (ECMA_IS_VALUE_ERROR (completion_value)))\n  {\n#if ENABLED (JERRY_DEBUGGER)\n    JERRY_CONTEXT (debugger_exception_byte_code_p) = frame_ctx_p->byte_code_p;\n#endif /* ENABLED (JERRY_DEBUGGER) */\n    frame_ctx_p->byte_code_p = (uint8_t *) vm_error_byte_code_p;\n  }\n  else\n  {\n    uint32_t opcode_data = vm_decode_table[(CBC_END + 1) + opcode];\n\n    if (!(opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK)))\n    {\n      ecma_fast_free_value (completion_value);\n    }\n    else if (opcode_data & VM_OC_PUT_STACK)\n    {\n      *frame_ctx_p->stack_top_p++ = completion_value;\n    }\n    else\n    {\n      ecma_fast_free_value (frame_ctx_p->block_result);\n      frame_ctx_p->block_result = completion_value;\n    }\n\n    /* EXT_OPCODE, SPREAD_OPCODE, BYTE_ARG */\n    frame_ctx_p->byte_code_p += 3;\n  }\n} /* vm_spread_operation */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n/**\n * 'Function call' opcode handler.\n *\n * See also: ECMA-262 v5, 11.2.3\n */\nstatic void\nopfunc_call (vm_frame_ctx_t *frame_ctx_p) /**< frame context */\n{\n  const uint8_t *byte_code_p = frame_ctx_p->byte_code_p + 1;\n  uint8_t opcode = byte_code_p[-1];\n  uint32_t arguments_list_len;\n\n  if (opcode >= CBC_CALL0)\n  {\n    arguments_list_len = (unsigned int) ((opcode - CBC_CALL0) / 6);\n  }\n  else\n  {\n    arguments_list_len = *byte_code_p++;\n  }\n\n  bool is_call_prop = ((opcode - CBC_CALL) % 6) >= 3;\n\n  ecma_value_t *stack_top_p = frame_ctx_p->stack_top_p - arguments_list_len;\n  ecma_value_t this_value = is_call_prop ? stack_top_p[-3] : ECMA_VALUE_UNDEFINED;\n  ecma_value_t func_value = stack_top_p[-1];\n  ecma_value_t completion_value;\n\n  if (!ecma_is_value_object (func_value)\n      || !ecma_op_object_is_callable (ecma_get_object_from_value (func_value)))\n  {\n    completion_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Expected a function.\"));\n  }\n  else\n  {\n    ecma_object_t *func_obj_p = ecma_get_object_from_value (func_value);\n\n    completion_value = ecma_op_function_call (func_obj_p,\n                                              this_value,\n                                              stack_top_p,\n                                              arguments_list_len);\n  }\n\n  JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_DIRECT_EVAL;\n\n  /* Free registers. */\n  for (uint32_t i = 0; i < arguments_list_len; i++)\n  {\n    ecma_fast_free_value (stack_top_p[i]);\n  }\n\n  if (is_call_prop)\n  {\n    ecma_free_value (*(--stack_top_p));\n    ecma_free_value (*(--stack_top_p));\n  }\n\n  if (JERRY_UNLIKELY (ECMA_IS_VALUE_ERROR (completion_value)))\n  {\n#if ENABLED (JERRY_DEBUGGER)\n    JERRY_CONTEXT (debugger_exception_byte_code_p) = frame_ctx_p->byte_code_p;\n#endif /* ENABLED (JERRY_DEBUGGER) */\n    frame_ctx_p->byte_code_p = (uint8_t *) vm_error_byte_code_p;\n  }\n  else\n  {\n    frame_ctx_p->byte_code_p = byte_code_p;\n    ecma_free_value (*(--stack_top_p));\n    uint32_t opcode_data = vm_decode_table[opcode];\n\n    if (!(opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK)))\n    {\n      ecma_fast_free_value (completion_value);\n    }\n    else if (opcode_data & VM_OC_PUT_STACK)\n    {\n      *stack_top_p++ = completion_value;\n    }\n    else\n    {\n      ecma_fast_free_value (frame_ctx_p->block_result);\n      frame_ctx_p->block_result = completion_value;\n    }\n  }\n\n  frame_ctx_p->stack_top_p = stack_top_p;\n} /* opfunc_call */\n\n/**\n * 'Constructor call' opcode handler.\n *\n * See also: ECMA-262 v5, 11.2.2\n */\nstatic void\nopfunc_construct (vm_frame_ctx_t *frame_ctx_p) /**< frame context */\n{\n  const uint8_t *byte_code_p = frame_ctx_p->byte_code_p + 1;\n  uint8_t opcode = byte_code_p[-1];\n  unsigned int arguments_list_len;\n\n  if (opcode >= CBC_NEW0)\n  {\n    arguments_list_len = (unsigned int) (opcode - CBC_NEW0);\n  }\n  else\n  {\n    arguments_list_len = *byte_code_p++;\n  }\n\n  ecma_value_t *stack_top_p = frame_ctx_p->stack_top_p - arguments_list_len;\n  ecma_value_t constructor_value = stack_top_p[-1];\n  ecma_value_t completion_value;\n\n  const char *constructor_message_p = ecma_check_constructor (constructor_value);\n  if (constructor_message_p != ECMA_IS_VALID_CONSTRUCTOR)\n  {\n    completion_value = ecma_raise_type_error (constructor_message_p);\n  }\n  else\n  {\n    ecma_object_t *constructor_obj_p = ecma_get_object_from_value (constructor_value);\n\n    completion_value = ecma_op_function_construct (constructor_obj_p,\n                                                   constructor_obj_p,\n                                                   stack_top_p,\n                                                   arguments_list_len);\n  }\n\n  /* Free registers. */\n  for (uint32_t i = 0; i < arguments_list_len; i++)\n  {\n    ecma_fast_free_value (stack_top_p[i]);\n  }\n\n  if (JERRY_UNLIKELY (ECMA_IS_VALUE_ERROR (completion_value)))\n  {\n#if ENABLED (JERRY_DEBUGGER)\n    JERRY_CONTEXT (debugger_exception_byte_code_p) = frame_ctx_p->byte_code_p;\n#endif /* ENABLED (JERRY_DEBUGGER) */\n    frame_ctx_p->byte_code_p = (uint8_t *) vm_error_byte_code_p;\n  }\n  else\n  {\n    ecma_free_value (stack_top_p[-1]);\n    frame_ctx_p->byte_code_p = byte_code_p;\n    stack_top_p[-1] = completion_value;\n  }\n\n  frame_ctx_p->stack_top_p = stack_top_p;\n} /* opfunc_construct */\n\n/**\n * Read literal index from the byte code stream into destination.\n *\n * @param destination destination\n */\n#define READ_LITERAL_INDEX(destination) \\\n  do \\\n  { \\\n    (destination) = *byte_code_p++; \\\n    if ((destination) >= encoding_limit) \\\n    { \\\n      (destination) = (uint16_t) ((((destination) << 8) | *byte_code_p++) - encoding_delta); \\\n    } \\\n  } \\\n  while (0)\n\n/**\n * Get literal value by literal index.\n *\n * @param literal_index literal index\n * @param target_value target value\n *\n * TODO: For performance reasons, we define this as a macro.\n * When we are able to construct a function with similar speed,\n * we can remove this macro.\n */\n#define READ_LITERAL(literal_index, target_value) \\\n  do \\\n  { \\\n    if ((literal_index) < ident_end) \\\n    { \\\n      if ((literal_index) < register_end) \\\n      { \\\n        /* Note: There should be no specialization for arguments. */ \\\n        (target_value) = ecma_fast_copy_value (VM_GET_REGISTER (frame_ctx_p, literal_index)); \\\n      } \\\n      else \\\n      { \\\n        ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]); \\\n        \\\n        result = ecma_op_resolve_reference_value (frame_ctx_p->lex_env_p, \\\n                                                  name_p); \\\n        \\\n        if (ECMA_IS_VALUE_ERROR (result)) \\\n        { \\\n          goto error; \\\n        } \\\n        (target_value) = result; \\\n      } \\\n    } \\\n    else if (literal_index < const_literal_end) \\\n    { \\\n      (target_value) = ecma_fast_copy_value (literal_start_p[literal_index]); \\\n    } \\\n    else \\\n    { \\\n      /* Object construction. */ \\\n      (target_value) = vm_construct_literal_object (frame_ctx_p, \\\n                                                    literal_start_p[literal_index]); \\\n    } \\\n  } \\\n  while (0)\n\n/**\n * Store the original value for post increase/decrease operators\n *\n * @param value original value\n */\n#define POST_INCREASE_DECREASE_PUT_RESULT(value) \\\n  if (opcode_data & VM_OC_PUT_STACK) \\\n  { \\\n    if (opcode_flags & VM_OC_IDENT_INCR_DECR_OPERATOR_FLAG) \\\n    { \\\n      JERRY_ASSERT (opcode == CBC_POST_INCR_IDENT_PUSH_RESULT \\\n                    || opcode == CBC_POST_DECR_IDENT_PUSH_RESULT); \\\n      *stack_top_p++ = (value); \\\n    } \\\n    else \\\n    { \\\n      /* The parser ensures there is enough space for the \\\n       * extra value on the stack. See js-parser-expr.c. */ \\\n      JERRY_ASSERT (opcode == CBC_POST_INCR_PUSH_RESULT \\\n                    || opcode == CBC_POST_DECR_PUSH_RESULT); \\\n      stack_top_p++; \\\n      stack_top_p[-1] = stack_top_p[-2]; \\\n      stack_top_p[-2] = stack_top_p[-3]; \\\n      stack_top_p[-3] = (value); \\\n    } \\\n    opcode_data &= (uint32_t) ~VM_OC_PUT_STACK; \\\n  } \\\n  else \\\n  { \\\n    JERRY_ASSERT (opcode_data & VM_OC_PUT_BLOCK); \\\n    ecma_free_value (frame_ctx_p->block_result); \\\n    frame_ctx_p->block_result = (value); \\\n    opcode_data &= (uint32_t) ~VM_OC_PUT_BLOCK; \\\n  }\n\n/**\n * Run generic byte code.\n *\n * @return ecma value\n */\nstatic ecma_value_t JERRY_ATTR_NOINLINE\nvm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */\n{\n  const ecma_compiled_code_t *bytecode_header_p = frame_ctx_p->shared_p->bytecode_header_p;\n  const uint8_t *byte_code_p = frame_ctx_p->byte_code_p;\n  ecma_value_t *literal_start_p = frame_ctx_p->literal_start_p;\n\n  ecma_value_t *stack_top_p;\n  uint16_t encoding_limit;\n  uint16_t encoding_delta;\n  uint16_t register_end;\n  uint16_t ident_end;\n  uint16_t const_literal_end;\n  int32_t branch_offset = 0;\n  uint8_t branch_offset_length = 0;\n  ecma_value_t left_value;\n  ecma_value_t right_value;\n  ecma_value_t result = ECMA_VALUE_EMPTY;\n  bool is_strict = ((bytecode_header_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE) != 0);\n\n  /* Prepare for byte code execution. */\n  if (!(bytecode_header_p->status_flags & CBC_CODE_FLAGS_FULL_LITERAL_ENCODING))\n  {\n    encoding_limit = CBC_SMALL_LITERAL_ENCODING_LIMIT;\n    encoding_delta = CBC_SMALL_LITERAL_ENCODING_DELTA;\n  }\n  else\n  {\n    encoding_limit = CBC_FULL_LITERAL_ENCODING_LIMIT;\n    encoding_delta = CBC_FULL_LITERAL_ENCODING_DELTA;\n  }\n\n  if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) (bytecode_header_p);\n    register_end = args_p->register_end;\n    ident_end = args_p->ident_end;\n    const_literal_end = args_p->const_literal_end;\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) (bytecode_header_p);\n    register_end = args_p->register_end;\n    ident_end = args_p->ident_end;\n    const_literal_end = args_p->const_literal_end;\n  }\n\n  stack_top_p = frame_ctx_p->stack_top_p;\n\n  /* Outer loop for exception handling. */\n  while (true)\n  {\n    /* Internal loop for byte code execution. */\n    while (true)\n    {\n      const uint8_t *byte_code_start_p = byte_code_p;\n      uint8_t opcode = *byte_code_p++;\n      uint32_t opcode_data = opcode;\n\n      if (opcode == CBC_EXT_OPCODE)\n      {\n        opcode = *byte_code_p++;\n        opcode_data = (uint32_t) ((CBC_END + 1) + opcode);\n      }\n\n      opcode_data = vm_decode_table[opcode_data];\n\n      left_value = ECMA_VALUE_UNDEFINED;\n      right_value = ECMA_VALUE_UNDEFINED;\n\n      uint32_t operands = VM_OC_GET_ARGS_INDEX (opcode_data);\n\n      if (operands >= VM_OC_GET_LITERAL)\n      {\n        uint16_t literal_index;\n        READ_LITERAL_INDEX (literal_index);\n        READ_LITERAL (literal_index, left_value);\n\n        if (operands != VM_OC_GET_LITERAL)\n        {\n          switch (operands)\n          {\n            case VM_OC_GET_LITERAL_LITERAL:\n            {\n              uint16_t second_literal_index;\n              READ_LITERAL_INDEX (second_literal_index);\n              READ_LITERAL (second_literal_index, right_value);\n              break;\n            }\n            case VM_OC_GET_STACK_LITERAL:\n            {\n              JERRY_ASSERT (stack_top_p > VM_GET_REGISTERS (frame_ctx_p) + register_end);\n              right_value = left_value;\n              left_value = *(--stack_top_p);\n              break;\n            }\n            default:\n            {\n              JERRY_ASSERT (operands == VM_OC_GET_THIS_LITERAL);\n\n              right_value = left_value;\n              left_value = ecma_copy_value (frame_ctx_p->this_binding);\n              break;\n            }\n          }\n        }\n      }\n      else if (operands >= VM_OC_GET_STACK)\n      {\n        JERRY_ASSERT (operands == VM_OC_GET_STACK\n                      || operands == VM_OC_GET_STACK_STACK);\n\n        JERRY_ASSERT (stack_top_p > VM_GET_REGISTERS (frame_ctx_p) + register_end);\n        left_value = *(--stack_top_p);\n\n        if (operands == VM_OC_GET_STACK_STACK)\n        {\n          JERRY_ASSERT (stack_top_p > VM_GET_REGISTERS (frame_ctx_p) + register_end);\n          right_value = left_value;\n          left_value = *(--stack_top_p);\n        }\n      }\n      else if (operands == VM_OC_GET_BRANCH)\n      {\n        branch_offset_length = CBC_BRANCH_OFFSET_LENGTH (opcode);\n        JERRY_ASSERT (branch_offset_length >= 1 && branch_offset_length <= 3);\n\n        branch_offset = *(byte_code_p++);\n\n        if (JERRY_UNLIKELY (branch_offset_length != 1))\n        {\n          branch_offset <<= 8;\n          branch_offset |= *(byte_code_p++);\n\n          if (JERRY_UNLIKELY (branch_offset_length == 3))\n          {\n            branch_offset <<= 8;\n            branch_offset |= *(byte_code_p++);\n          }\n        }\n\n        if (opcode_data & VM_OC_BACKWARD_BRANCH)\n        {\n#if ENABLED (JERRY_VM_EXEC_STOP)\n          if (JERRY_CONTEXT (vm_exec_stop_cb) != NULL\n              && --JERRY_CONTEXT (vm_exec_stop_counter) == 0)\n          {\n            result = JERRY_CONTEXT (vm_exec_stop_cb) (JERRY_CONTEXT (vm_exec_stop_user_p));\n\n            if (ecma_is_value_undefined (result))\n            {\n              JERRY_CONTEXT (vm_exec_stop_counter) = JERRY_CONTEXT (vm_exec_stop_frequency);\n            }\n            else\n            {\n              JERRY_CONTEXT (vm_exec_stop_counter) = 1;\n\n              if (ecma_is_value_error_reference (result))\n              {\n                ecma_raise_error_from_error_reference (result);\n              }\n              else\n              {\n                jcontext_raise_exception (result);\n              }\n\n              JERRY_ASSERT (jcontext_has_pending_exception ());\n              jcontext_set_abort_flag (true);\n              result = ECMA_VALUE_ERROR;\n              goto error;\n            }\n          }\n#endif /* ENABLED (JERRY_VM_EXEC_STOP) */\n\n          branch_offset = -branch_offset;\n        }\n      }\n\n      switch (VM_OC_GROUP_GET_INDEX (opcode_data))\n      {\n        case VM_OC_POP:\n        {\n          JERRY_ASSERT (stack_top_p > VM_GET_REGISTERS (frame_ctx_p) + register_end);\n          ecma_free_value (*(--stack_top_p));\n          continue;\n        }\n        case VM_OC_POP_BLOCK:\n        {\n          ecma_fast_free_value (frame_ctx_p->block_result);\n          frame_ctx_p->block_result = *(--stack_top_p);\n          continue;\n        }\n        case VM_OC_PUSH:\n        {\n          *stack_top_p++ = left_value;\n          continue;\n        }\n        case VM_OC_PUSH_TWO:\n        {\n          *stack_top_p++ = left_value;\n          *stack_top_p++ = right_value;\n          continue;\n        }\n        case VM_OC_PUSH_THREE:\n        {\n          uint16_t literal_index;\n\n          *stack_top_p++ = left_value;\n          left_value = ECMA_VALUE_UNDEFINED;\n\n          READ_LITERAL_INDEX (literal_index);\n          READ_LITERAL (literal_index, left_value);\n\n          *stack_top_p++ = right_value;\n          *stack_top_p++ = left_value;\n          continue;\n        }\n        case VM_OC_PUSH_UNDEFINED:\n        {\n          *stack_top_p++ = ECMA_VALUE_UNDEFINED;\n          continue;\n        }\n        case VM_OC_PUSH_TRUE:\n        {\n          *stack_top_p++ = ECMA_VALUE_TRUE;\n          continue;\n        }\n        case VM_OC_PUSH_FALSE:\n        {\n          *stack_top_p++ = ECMA_VALUE_FALSE;\n          continue;\n        }\n        case VM_OC_PUSH_NULL:\n        {\n          *stack_top_p++ = ECMA_VALUE_NULL;\n          continue;\n        }\n        case VM_OC_PUSH_THIS:\n        {\n          *stack_top_p++ = ecma_copy_value (frame_ctx_p->this_binding);\n          continue;\n        }\n        case VM_OC_PUSH_0:\n        {\n          *stack_top_p++ = ecma_make_integer_value (0);\n          continue;\n        }\n        case VM_OC_PUSH_POS_BYTE:\n        {\n          ecma_integer_value_t number = *byte_code_p++;\n          *stack_top_p++ = ecma_make_integer_value (number + 1);\n          continue;\n        }\n        case VM_OC_PUSH_NEG_BYTE:\n        {\n          ecma_integer_value_t number = *byte_code_p++;\n          *stack_top_p++ = ecma_make_integer_value (-(number + 1));\n          continue;\n        }\n        case VM_OC_PUSH_LIT_0:\n        {\n          stack_top_p[0] = left_value;\n          stack_top_p[1] = ecma_make_integer_value (0);\n          stack_top_p += 2;\n          continue;\n        }\n        case VM_OC_PUSH_LIT_POS_BYTE:\n        {\n          ecma_integer_value_t number = *byte_code_p++;\n          stack_top_p[0] = left_value;\n          stack_top_p[1] = ecma_make_integer_value (number + 1);\n          stack_top_p += 2;\n          continue;\n        }\n        case VM_OC_PUSH_LIT_NEG_BYTE:\n        {\n          ecma_integer_value_t number = *byte_code_p++;\n          stack_top_p[0] = left_value;\n          stack_top_p[1] = ecma_make_integer_value (-(number + 1));\n          stack_top_p += 2;\n          continue;\n        }\n        case VM_OC_PUSH_OBJECT:\n        {\n          ecma_object_t *obj_p = ecma_create_object (ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE),\n                                                     0,\n                                                     ECMA_OBJECT_TYPE_GENERAL);\n\n          *stack_top_p++ = ecma_make_object_value (obj_p);\n          continue;\n        }\n        case VM_OC_PUSH_NAMED_FUNC_EXPR:\n        {\n          ecma_object_t *func_p = ecma_get_object_from_value (left_value);\n\n          JERRY_ASSERT (ecma_get_object_type (func_p) == ECMA_OBJECT_TYPE_FUNCTION);\n\n          ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) func_p;\n\n          JERRY_ASSERT (frame_ctx_p->lex_env_p ==\n                        ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t, ext_func_p->u.function.scope_cp));\n\n          ecma_object_t *name_lex_env = ecma_create_decl_lex_env (frame_ctx_p->lex_env_p);\n\n          ecma_op_create_immutable_binding (name_lex_env, ecma_get_string_from_value (right_value), left_value);\n\n          ECMA_SET_NON_NULL_POINTER_TAG (ext_func_p->u.function.scope_cp, name_lex_env, 0);\n\n          ecma_free_value (right_value);\n          ecma_deref_object (name_lex_env);\n          *stack_top_p++ = left_value;\n          continue;\n        }\n        case VM_OC_CREATE_BINDING:\n        {\n#if !ENABLED (JERRY_ESNEXT)\n          JERRY_ASSERT (opcode == CBC_CREATE_VAR);\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n          uint32_t literal_index;\n\n          READ_LITERAL_INDEX (literal_index);\n\n          ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n\n          JERRY_ASSERT (ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n          JERRY_ASSERT (ecma_find_named_property (frame_ctx_p->lex_env_p, name_p) == NULL);\n\n          uint8_t prop_attributes = ECMA_PROPERTY_FLAG_WRITABLE;\n\n#if ENABLED (JERRY_ESNEXT)\n          if (opcode == CBC_CREATE_LET)\n          {\n            prop_attributes = ECMA_PROPERTY_ENUMERABLE_WRITABLE;\n          }\n          else if (opcode == CBC_CREATE_CONST)\n          {\n            prop_attributes = ECMA_PROPERTY_FLAG_ENUMERABLE;\n          }\n\n          ecma_property_value_t *property_value_p;\n          property_value_p = ecma_create_named_data_property (frame_ctx_p->lex_env_p, name_p, prop_attributes, NULL);\n\n          if (opcode != CBC_CREATE_VAR)\n          {\n            property_value_p->value = ECMA_VALUE_UNINITIALIZED;\n          }\n#else /* !ENABLED (JERRY_ESNEXT) */\n          ecma_create_named_data_property (frame_ctx_p->lex_env_p, name_p, prop_attributes, NULL);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          continue;\n        }\n        case VM_OC_VAR_EVAL:\n        {\n          uint32_t literal_index;\n          ecma_value_t lit_value = ECMA_VALUE_UNDEFINED;\n\n          if (opcode == CBC_CREATE_VAR_FUNC_EVAL)\n          {\n            uint32_t value_index;\n            READ_LITERAL_INDEX (value_index);\n            JERRY_ASSERT (value_index >= const_literal_end);\n\n            lit_value = vm_construct_literal_object (frame_ctx_p,\n                                                     literal_start_p[value_index]);\n          }\n\n          READ_LITERAL_INDEX (literal_index);\n          JERRY_ASSERT (literal_index >= register_end);\n\n          ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n          ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n\n          while (lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK)\n          {\n#if ENABLED (JERRY_ESNEXT) && !(defined JERRY_NDEBUG)\n            if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n            {\n              ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n              JERRY_ASSERT (property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE));\n            }\n#endif /* ENABLED (JERRY_ESNEXT) && !JERRY_NDEBUG */\n\n            JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n            lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n          }\n\n#if ENABLED (JERRY_ESNEXT) && !(defined JERRY_NDEBUG)\n          if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n          {\n            ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n            JERRY_ASSERT (property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE));\n          }\n#endif /* ENABLED (JERRY_ESNEXT) && !JERRY_NDEBUG */\n\n          /* 'Variable declaration' */\n          result = ecma_op_has_binding (lex_env_p, name_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n          ecma_property_t *prop_p = NULL;\n\n          if (ecma_is_value_false (result))\n          {\n            bool is_configurable = (frame_ctx_p->status_flags & VM_FRAME_CTX_DIRECT_EVAL) != 0;\n            prop_p = ecma_op_create_mutable_binding (lex_env_p, name_p, is_configurable);\n\n            if (JERRY_UNLIKELY (prop_p == ECMA_PROPERTY_POINTER_ERROR))\n            {\n              result = ECMA_VALUE_ERROR;\n              goto error;\n            }\n          }\n\n          if (lit_value != ECMA_VALUE_UNDEFINED)\n          {\n            JERRY_ASSERT (ecma_is_value_object (lit_value));\n\n            if (prop_p != NULL)\n            {\n              JERRY_ASSERT (ecma_is_value_undefined (ECMA_PROPERTY_VALUE_PTR (prop_p)->value));\n              JERRY_ASSERT (ecma_is_property_writable (*prop_p));\n              ECMA_PROPERTY_VALUE_PTR (prop_p)->value = lit_value;\n              ecma_free_object (lit_value);\n            }\n            else\n            {\n              result = ecma_op_put_value_lex_env_base (lex_env_p, name_p, is_strict, lit_value);\n              ecma_free_object (lit_value);\n\n              if (ECMA_IS_VALUE_ERROR (result))\n              {\n                goto error;\n              }\n            }\n          }\n          continue;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case VM_OC_EXT_VAR_EVAL:\n        {\n          uint32_t literal_index;\n          ecma_value_t lit_value = ECMA_VALUE_UNDEFINED;\n\n          JERRY_ASSERT (byte_code_start_p[0] == CBC_EXT_OPCODE);\n\n          if (opcode == CBC_EXT_CREATE_VAR_FUNC_EVAL)\n          {\n            uint32_t value_index;\n            READ_LITERAL_INDEX (value_index);\n            JERRY_ASSERT (value_index >= const_literal_end);\n\n            lit_value = vm_construct_literal_object (frame_ctx_p,\n                                                     literal_start_p[value_index]);\n          }\n\n          READ_LITERAL_INDEX (literal_index);\n          JERRY_ASSERT (literal_index >= register_end);\n\n          ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n          ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n          ecma_object_t *prev_lex_env_p = NULL;\n\n          while (lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK)\n          {\n#if !(defined JERRY_NDEBUG)\n            if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n            {\n              ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n              JERRY_ASSERT (property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE));\n            }\n#endif /* !JERRY_NDEBUG */\n\n            JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n            prev_lex_env_p = lex_env_p;\n            lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n          }\n\n          JERRY_ASSERT (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n          JERRY_ASSERT (prev_lex_env_p != NULL\n                        && ecma_get_lex_env_type (prev_lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n\n          ecma_property_t *property_p = ecma_find_named_property (prev_lex_env_p, name_p);\n          ecma_property_value_t *property_value_p;\n\n          if (property_p == NULL)\n          {\n            property_value_p = ecma_create_named_data_property (prev_lex_env_p,\n                                                                name_p,\n                                                                ECMA_PROPERTY_CONFIGURABLE_WRITABLE,\n                                                                NULL);\n\n            if (lit_value == ECMA_VALUE_UNDEFINED)\n            {\n              continue;\n            }\n          }\n          else\n          {\n            if (lit_value == ECMA_VALUE_UNDEFINED)\n            {\n              continue;\n            }\n\n            property_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n            ecma_free_value_if_not_object (property_value_p->value);\n          }\n\n          property_value_p->value = lit_value;\n          ecma_deref_object (ecma_get_object_from_value (lit_value));\n          continue;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case VM_OC_CREATE_ARGUMENTS:\n        {\n          uint32_t literal_index;\n          READ_LITERAL_INDEX (literal_index);\n\n          JERRY_ASSERT (frame_ctx_p->shared_p->status_flags & VM_FRAME_CTX_SHARED_HAS_ARG_LIST);\n\n          result = ecma_op_create_arguments_object ((vm_frame_ctx_shared_args_t *) (frame_ctx_p->shared_p),\n                                                    frame_ctx_p->lex_env_p);\n\n          if (literal_index < register_end)\n          {\n            JERRY_ASSERT (VM_GET_REGISTER (frame_ctx_p, literal_index) == ECMA_VALUE_UNDEFINED);\n            VM_GET_REGISTER (frame_ctx_p, literal_index) = result;\n            continue;\n          }\n\n          ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n\n          JERRY_ASSERT (ecma_find_named_property (frame_ctx_p->lex_env_p, name_p) == NULL);\n\n          uint8_t prop_attributes = ECMA_PROPERTY_FLAG_WRITABLE;\n          ecma_property_value_t *property_value_p;\n\n          property_value_p = ecma_create_named_data_property (frame_ctx_p->lex_env_p, name_p, prop_attributes, NULL);\n          property_value_p->value = result;\n\n          ecma_deref_object (ecma_get_object_from_value (result));\n          continue;\n        }\n#if ENABLED (JERRY_SNAPSHOT_EXEC)\n        case VM_OC_SET_BYTECODE_PTR:\n        {\n          memcpy (&byte_code_p, byte_code_p++, sizeof (uint8_t *));\n          frame_ctx_p->byte_code_start_p = byte_code_p;\n          continue;\n        }\n#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */\n        case VM_OC_INIT_ARG_OR_FUNC:\n        {\n          uint32_t literal_index, value_index;\n          ecma_value_t lit_value;\n\n          READ_LITERAL_INDEX (value_index);\n          READ_LITERAL_INDEX (literal_index);\n\n          JERRY_ASSERT (value_index != literal_index);\n          JERRY_ASSERT (value_index >= register_end || literal_index >= register_end);\n\n          if (value_index < register_end)\n          {\n            /* Take (not copy) the reference. */\n            lit_value = ecma_copy_value_if_not_object (VM_GET_REGISTER (frame_ctx_p, value_index));\n          }\n          else\n          {\n            lit_value = vm_construct_literal_object (frame_ctx_p,\n                                                     literal_start_p[value_index]);\n          }\n\n          if (literal_index < register_end)\n          {\n            ecma_fast_free_value (VM_GET_REGISTER (frame_ctx_p, literal_index));\n            VM_GET_REGISTER (frame_ctx_p, literal_index) = lit_value;\n            continue;\n          }\n\n          ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n\n          JERRY_ASSERT (ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n          JERRY_ASSERT (ecma_find_named_property (frame_ctx_p->lex_env_p, name_p) == NULL);\n\n          ecma_property_value_t *property_value_p;\n          property_value_p = ecma_create_named_data_property (frame_ctx_p->lex_env_p,\n                                                              name_p,\n                                                              ECMA_PROPERTY_FLAG_WRITABLE,\n                                                              NULL);\n\n          JERRY_ASSERT (property_value_p->value == ECMA_VALUE_UNDEFINED);\n          property_value_p->value = lit_value;\n\n          if (value_index >= register_end)\n          {\n            ecma_free_value (lit_value);\n          }\n\n          continue;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case VM_OC_CHECK_VAR:\n        {\n          JERRY_ASSERT (CBC_FUNCTION_GET_TYPE (frame_ctx_p->shared_p->bytecode_header_p->status_flags)\n                        == CBC_FUNCTION_SCRIPT);\n\n          uint32_t literal_index;\n          READ_LITERAL_INDEX (literal_index);\n\n          if ((frame_ctx_p->lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK) == 0)\n          {\n            continue;\n          }\n\n          ecma_string_t *const literal_name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n          ecma_property_t *const binding_p = ecma_find_named_property (frame_ctx_p->lex_env_p, literal_name_p);\n\n          if (binding_p != NULL)\n          {\n            result = ecma_raise_syntax_error (ECMA_ERR_MSG (\"Local variable is redeclared.\"));\n            goto error;\n          }\n\n          continue;\n        }\n        case VM_OC_CHECK_LET:\n        {\n          JERRY_ASSERT (CBC_FUNCTION_GET_TYPE (frame_ctx_p->shared_p->bytecode_header_p->status_flags)\n                        == CBC_FUNCTION_SCRIPT);\n\n          uint32_t literal_index;\n          READ_LITERAL_INDEX (literal_index);\n\n          ecma_string_t *literal_name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n          ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n          ecma_property_t *binding_p = NULL;\n\n          if (lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK)\n          {\n            binding_p = ecma_find_named_property (lex_env_p, literal_name_p);\n\n            JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n            lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n          }\n\n          if (binding_p != NULL)\n          {\n            result = ecma_raise_syntax_error (ECMA_ERR_MSG (\"Local variable is redeclared.\"));\n            goto error;\n          }\n\n          result = ecma_op_has_binding (lex_env_p, literal_name_p);\n\n#if ENABLED (JERRY_BUILTIN_PROXY)\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n#endif /* ENABLED (JERRY_BUILTIN_PROXY) */\n\n          if (ecma_is_value_true (result))\n          {\n            result = ecma_raise_syntax_error (ECMA_ERR_MSG (\"Local variable is redeclared.\"));\n            goto error;\n          }\n\n          continue;\n        }\n        case VM_OC_ASSIGN_LET_CONST:\n        {\n          uint32_t literal_index;\n          READ_LITERAL_INDEX (literal_index);\n\n          JERRY_ASSERT (literal_index >= register_end);\n          JERRY_ASSERT (ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n\n          ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n          ecma_property_t *property_p = ecma_find_named_property (frame_ctx_p->lex_env_p, name_p);\n\n          JERRY_ASSERT (property_p != NULL && ECMA_PROPERTY_IS_RAW_DATA (*property_p));\n          JERRY_ASSERT (ECMA_PROPERTY_VALUE_PTR (property_p)->value == ECMA_VALUE_UNINITIALIZED);\n\n          ECMA_PROPERTY_VALUE_PTR (property_p)->value = left_value;\n\n          if (ecma_is_value_object (left_value))\n          {\n            ecma_deref_object (ecma_get_object_from_value (left_value));\n          }\n          continue;\n        }\n        case VM_OC_INIT_BINDING:\n        {\n          uint32_t literal_index;\n\n          READ_LITERAL_INDEX (literal_index);\n\n          JERRY_ASSERT (literal_index >= register_end);\n\n          ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n\n          JERRY_ASSERT (ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n          JERRY_ASSERT (ecma_find_named_property (frame_ctx_p->lex_env_p, name_p) == NULL);\n\n          uint8_t prop_attributes = ECMA_PROPERTY_FLAG_WRITABLE;\n\n          if (opcode == CBC_INIT_LET)\n          {\n            prop_attributes = ECMA_PROPERTY_ENUMERABLE_WRITABLE;\n          }\n          else if (opcode == CBC_INIT_CONST)\n          {\n            prop_attributes = ECMA_PROPERTY_FLAG_ENUMERABLE;\n          }\n\n          ecma_property_value_t *property_value_p;\n          property_value_p = ecma_create_named_data_property (frame_ctx_p->lex_env_p,\n                                                              name_p,\n                                                              prop_attributes,\n                                                              NULL);\n\n          JERRY_ASSERT (property_value_p->value == ECMA_VALUE_UNDEFINED);\n\n          ecma_value_t value = *(--stack_top_p);\n\n          property_value_p->value = value;\n          ecma_deref_if_object (value);\n          continue;\n        }\n        case VM_OC_THROW_CONST_ERROR:\n        {\n          result = ecma_raise_type_error (ECMA_ERR_MSG (\"Constant bindings cannot be reassigned.\"));\n          goto error;\n        }\n        case VM_OC_COPY_TO_GLOBAL:\n        {\n          uint32_t literal_index;\n          READ_LITERAL_INDEX (literal_index);\n\n          ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n          ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n\n          while (lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK)\n          {\n#ifndef JERRY_NDEBUG\n            if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n            {\n              ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n\n              JERRY_ASSERT (property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE));\n            }\n#endif /* !JERRY_NDEBUG */\n\n            JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n            lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n          }\n\n          if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)\n          {\n            ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);\n            ecma_property_value_t *prop_value_p;\n\n            if (property_p == NULL)\n            {\n              prop_value_p = ecma_create_named_data_property (lex_env_p,\n                                                              name_p,\n                                                              ECMA_PROPERTY_FLAG_WRITABLE,\n                                                              NULL);\n            }\n            else\n            {\n#ifndef JERRY_NDEBUG\n              JERRY_ASSERT (!(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE));\n#endif /* !JERRY_NDEBUG */\n              prop_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n            }\n\n            ecma_named_data_property_assign_value (lex_env_p, prop_value_p, left_value);\n          }\n          else\n          {\n            result = ecma_op_set_mutable_binding (lex_env_p, name_p, left_value, is_strict);\n\n            if (ECMA_IS_VALUE_ERROR (result))\n            {\n              goto error;\n            }\n          }\n\n          goto free_left_value;\n        }\n        case VM_OC_COPY_FROM_ARG:\n        {\n          uint32_t literal_index;\n          READ_LITERAL_INDEX (literal_index);\n          JERRY_ASSERT (literal_index >= register_end);\n\n          ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n          ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n          ecma_object_t *arg_lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n\n          JERRY_ASSERT ((lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK)\n                        && ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n          JERRY_ASSERT (arg_lex_env_p != NULL\n                        && !(arg_lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK)\n                        && ecma_get_lex_env_type (arg_lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);\n\n          ecma_property_value_t *property_value_p;\n          property_value_p = ecma_create_named_data_property (lex_env_p,\n                                                              name_p,\n                                                              ECMA_PROPERTY_FLAG_WRITABLE,\n                                                              NULL);\n\n          ecma_property_t *property_p = ecma_find_named_property (arg_lex_env_p, name_p);\n          JERRY_ASSERT (property_p != NULL);\n\n          ecma_property_value_t *arg_prop_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n          property_value_p->value = ecma_copy_value_if_not_object (arg_prop_value_p->value);\n          continue;\n        }\n        case VM_OC_CLONE_CONTEXT:\n        {\n          JERRY_ASSERT (byte_code_start_p[0] == CBC_EXT_OPCODE);\n\n          bool copy_values = (byte_code_start_p[1] == CBC_EXT_CLONE_FULL_CONTEXT);\n          frame_ctx_p->lex_env_p = ecma_clone_decl_lexical_environment (frame_ctx_p->lex_env_p, copy_values);\n          continue;\n        }\n        case VM_OC_SET__PROTO__:\n        {\n          result = ecma_builtin_object_object_set_proto (stack_top_p[-1], left_value);\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n          goto free_left_value;\n        }\n        case VM_OC_PUSH_STATIC_FIELD_FUNC:\n        {\n          JERRY_ASSERT (byte_code_start_p[0] == CBC_EXT_OPCODE\n                        && (byte_code_start_p[1] == CBC_EXT_PUSH_STATIC_FIELD_FUNC\n                            || byte_code_start_p[1] == CBC_EXT_PUSH_STATIC_COMPUTED_FIELD_FUNC));\n\n          bool push_computed = (byte_code_start_p[1] == CBC_EXT_PUSH_STATIC_COMPUTED_FIELD_FUNC);\n          ecma_value_t value = stack_top_p[-1];\n\n          if (!push_computed)\n          {\n            stack_top_p++;\n          }\n\n          memmove (stack_top_p - 3, stack_top_p - 4, 3 * sizeof (ecma_value_t));\n          stack_top_p[-4] = left_value;\n\n          if (!push_computed)\n          {\n            continue;\n          }\n\n          left_value = value;\n          /* FALLTHRU */\n        }\n        case VM_OC_ADD_COMPUTED_FIELD:\n        {\n          JERRY_ASSERT (byte_code_start_p[0] == CBC_EXT_OPCODE\n                        && (byte_code_start_p[1] == CBC_EXT_PUSH_STATIC_COMPUTED_FIELD_FUNC\n                            || byte_code_start_p[1] == CBC_EXT_ADD_COMPUTED_FIELD\n                            || byte_code_start_p[1] == CBC_EXT_ADD_STATIC_COMPUTED_FIELD));\n\n          int index = (byte_code_start_p[1] == CBC_EXT_ADD_COMPUTED_FIELD) ? -2 : -4;\n          result = opfunc_add_computed_field (stack_top_p[index], left_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n          goto free_left_value;\n        }\n        case VM_OC_COPY_DATA_PROPERTIES:\n        {\n          left_value = *(--stack_top_p);\n\n          if (ecma_is_value_undefined (left_value) || ecma_is_value_null (left_value))\n          {\n            continue;\n          }\n\n          result = opfunc_copy_data_properties (stack_top_p[-1], left_value, ECMA_VALUE_UNDEFINED);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          goto free_left_value;\n        }\n        case VM_OC_SET_COMPUTED_PROPERTY:\n        {\n          /* Swap values. */\n          left_value ^= right_value;\n          right_value ^= left_value;\n          left_value ^= right_value;\n          /* FALLTHRU */\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case VM_OC_SET_PROPERTY:\n        {\n          JERRY_STATIC_ASSERT (VM_OC_NON_STATIC_FLAG == VM_OC_BACKWARD_BRANCH,\n                               vm_oc_non_static_flag_must_be_equal_to_vm_oc_backward_branch);\n\n          JERRY_ASSERT ((opcode_data >> VM_OC_NON_STATIC_SHIFT) <= 0x1);\n\n          ecma_string_t *prop_name_p = ecma_op_to_property_key (right_value);\n\n          if (JERRY_UNLIKELY (prop_name_p == NULL))\n          {\n            result = ECMA_VALUE_ERROR;\n            goto error;\n          }\n\n#if ENABLED (JERRY_ESNEXT)\n          if (JERRY_UNLIKELY (ecma_compare_ecma_string_to_magic_id (prop_name_p, LIT_MAGIC_STRING_PROTOTYPE))\n              && !(opcode_data & VM_OC_NON_STATIC_FLAG))\n          {\n            result = ecma_raise_type_error (ECMA_ERR_MSG (\"prototype property of a class is non-configurable\"));\n            goto error;\n          }\n\n          const int index = (int) (opcode_data >> VM_OC_NON_STATIC_SHIFT) - 2;\n#else /* !ENABLED (JERRY_ESNEXT) */\n          const int index = -1;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          ecma_object_t *object_p = ecma_get_object_from_value (stack_top_p[index]);\n\n          opfunc_set_data_property (object_p, prop_name_p, left_value);\n          ecma_deref_ecma_string (prop_name_p);\n\n          goto free_both_values;\n        }\n        case VM_OC_SET_GETTER:\n        case VM_OC_SET_SETTER:\n        {\n          JERRY_ASSERT ((opcode_data >> VM_OC_NON_STATIC_SHIFT) <= 0x1);\n\n          ecma_string_t *prop_name_p = ecma_op_to_property_key (left_value);\n\n          if (JERRY_UNLIKELY (prop_name_p == NULL))\n          {\n            result = ECMA_VALUE_ERROR;\n            goto error;\n          }\n\n#if ENABLED (JERRY_ESNEXT)\n          if (JERRY_UNLIKELY (ecma_compare_ecma_string_to_magic_id (prop_name_p, LIT_MAGIC_STRING_PROTOTYPE))\n              && !(opcode_data & VM_OC_NON_STATIC_FLAG))\n          {\n            result = ecma_raise_type_error (ECMA_ERR_MSG (\"prototype property of a class is non-configurable\"));\n            goto error;\n          }\n\n          const int index = (int) (opcode_data >> VM_OC_NON_STATIC_SHIFT) - 2;\n#else /* !ENABLED (JERRY_ESNEXT) */\n          const int index = -1;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          opfunc_set_accessor (VM_OC_GROUP_GET_INDEX (opcode_data) == VM_OC_SET_GETTER,\n                               stack_top_p[index],\n                               prop_name_p,\n                               right_value);\n\n          ecma_deref_ecma_string (prop_name_p);\n\n          goto free_both_values;\n        }\n        case VM_OC_PUSH_ARRAY:\n        {\n          /* Note: this operation cannot throw an exception */\n          *stack_top_p++ = ecma_make_object_value (ecma_op_new_array_object (0));\n          continue;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case VM_OC_LOCAL_EVAL:\n        {\n          ECMA_CLEAR_LOCAL_PARSE_OPTS ();\n          uint8_t parse_opts = *byte_code_p++;\n          ECMA_SET_LOCAL_PARSE_OPTS (parse_opts);\n          continue;\n        }\n        case VM_OC_SUPER_CALL:\n        {\n          uint8_t arguments_list_len = *byte_code_p++;\n\n          if (opcode >= CBC_EXT_SPREAD_SUPER_CALL)\n          {\n            stack_top_p -= arguments_list_len;\n            ecma_collection_t *arguments_p = opfunc_spread_arguments (stack_top_p, arguments_list_len);\n\n            if (JERRY_UNLIKELY (arguments_p == NULL))\n            {\n              result = ECMA_VALUE_ERROR;\n              goto error;\n            }\n\n            stack_top_p++;\n            ECMA_SET_INTERNAL_VALUE_POINTER (stack_top_p[-1], arguments_p);\n          }\n          else\n          {\n            stack_top_p -= arguments_list_len;\n          }\n\n          frame_ctx_p->call_operation = VM_EXEC_SUPER_CALL;\n          frame_ctx_p->byte_code_p = byte_code_start_p;\n          frame_ctx_p->stack_top_p = stack_top_p;\n          return ECMA_VALUE_UNDEFINED;\n        }\n        case VM_OC_PUSH_CLASS_ENVIRONMENT:\n        {\n          uint16_t literal_index;\n\n          READ_LITERAL_INDEX (literal_index);\n          opfunc_push_class_environment (frame_ctx_p, &stack_top_p, literal_start_p[literal_index]);\n          continue;\n        }\n        case VM_OC_PUSH_IMPLICIT_CTOR:\n        {\n          *stack_top_p++ = opfunc_create_implicit_class_constructor (opcode);\n          continue;\n        }\n        case VM_OC_INIT_CLASS:\n        {\n          result = opfunc_init_class (frame_ctx_p, stack_top_p);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n          continue;\n        }\n        case VM_OC_FINALIZE_CLASS:\n        {\n          JERRY_ASSERT (opcode == CBC_EXT_FINALIZE_NAMED_CLASS || opcode == CBC_EXT_FINALIZE_ANONYMOUS_CLASS);\n\n          if (opcode == CBC_EXT_FINALIZE_NAMED_CLASS)\n          {\n            uint16_t literal_index;\n            READ_LITERAL_INDEX (literal_index);\n            left_value = literal_start_p[literal_index];\n          }\n\n          opfunc_finalize_class (frame_ctx_p, &stack_top_p, left_value);\n          continue;\n        }\n        case VM_OC_SET_FIELD_INIT:\n        {\n          ecma_string_t *property_name_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_INIT);\n          ecma_object_t *object_p = ecma_get_object_from_value (stack_top_p[-2]);\n\n          ecma_property_value_t *property_value_p = ecma_create_named_data_property (object_p,\n                                                                                     property_name_p,\n                                                                                     ECMA_PROPERTY_FIXED,\n                                                                                     NULL);\n          property_value_p->value = left_value;\n\n          property_name_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_COMPUTED);\n          ecma_property_t *property_p = ecma_find_named_property (object_p, property_name_p);\n\n          if (property_p != NULL)\n          {\n            property_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);\n            ecma_value_t *compact_collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_value_t,\n                                                                                  property_value_p->value);\n            compact_collection_p = ecma_compact_collection_shrink (compact_collection_p);\n            ECMA_SET_INTERNAL_VALUE_POINTER (property_value_p->value, compact_collection_p);\n          }\n\n          goto free_left_value;\n        }\n        case VM_OC_RUN_FIELD_INIT:\n        {\n          JERRY_ASSERT (frame_ctx_p->shared_p->status_flags & VM_FRAME_CTX_SHARED_NON_ARROW_FUNC);\n          result = opfunc_init_class_fields (ecma_make_object_value (VM_FRAME_CTX_GET_FUNCTION_OBJECT (frame_ctx_p)),\n                                             frame_ctx_p->this_binding);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n          continue;\n        }\n        case VM_OC_RUN_STATIC_FIELD_INIT:\n        {\n          left_value = stack_top_p[-2];\n          stack_top_p[-2] = stack_top_p[-1];\n          stack_top_p--;\n\n          result = opfunc_init_static_class_fields (left_value, stack_top_p[-1]);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n          goto free_left_value;\n        }\n        case VM_OC_SET_NEXT_COMPUTED_FIELD:\n        {\n          ecma_integer_value_t next_index = ecma_get_integer_from_value (stack_top_p[-2]) + 1;\n          stack_top_p[-2] = ecma_make_integer_value (next_index);\n          stack_top_p++;\n\n          JERRY_ASSERT (frame_ctx_p->shared_p->status_flags & VM_FRAME_CTX_SHARED_HAS_CLASS_FIELDS);\n\n          ecma_value_t *computed_class_fields_p = VM_GET_COMPUTED_CLASS_FIELDS (frame_ctx_p);\n          JERRY_ASSERT ((ecma_value_t) next_index < ECMA_COMPACT_COLLECTION_GET_SIZE (computed_class_fields_p));\n\n          result = stack_top_p[-2];\n          stack_top_p[-1] = ecma_copy_value (computed_class_fields_p[next_index]);\n          stack_top_p[-2] = ecma_copy_value (frame_ctx_p->this_binding);\n          break;\n        }\n        case VM_OC_PUSH_SUPER_CONSTRUCTOR:\n        {\n          result = ecma_op_function_get_super_constructor (vm_get_class_function (frame_ctx_p));\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          continue;\n        }\n        case VM_OC_RESOLVE_LEXICAL_THIS:\n        {\n          result = ecma_op_get_this_binding (frame_ctx_p->lex_env_p);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          continue;\n        }\n        case VM_OC_OBJECT_LITERAL_HOME_ENV:\n        {\n          if (opcode == CBC_EXT_PUSH_OBJECT_SUPER_ENVIRONMENT)\n          {\n            ecma_value_t obj_value = stack_top_p[-1];\n            ecma_object_t *obj_env_p = ecma_create_object_lex_env (frame_ctx_p->lex_env_p,\n                                                                  ecma_get_object_from_value (obj_value),\n                                                                  ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND);\n\n            stack_top_p[-1] = ecma_make_object_value (obj_env_p);\n            *stack_top_p++ = obj_value;\n          }\n          else\n          {\n            JERRY_ASSERT (opcode == CBC_EXT_POP_OBJECT_SUPER_ENVIRONMENT);\n            ecma_deref_object (ecma_get_object_from_value (stack_top_p[-2]));\n            stack_top_p[-2] = stack_top_p[-1];\n            stack_top_p--;\n          }\n          continue;\n        }\n        case VM_OC_SET_HOME_OBJECT:\n        {\n          int offset = opcode == CBC_EXT_OBJECT_LITERAL_SET_HOME_OBJECT_COMPUTED ? -1 : 0;\n          opfunc_set_home_object (ecma_get_object_from_value (stack_top_p[-1]),\n                                  ecma_get_object_from_value (stack_top_p[-3 + offset]));\n          continue;\n        }\n        case VM_OC_SUPER_REFERENCE:\n        {\n          result = opfunc_form_super_reference (&stack_top_p, frame_ctx_p, left_value, opcode);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          goto free_left_value;\n        }\n        case VM_OC_SET_FUNCTION_NAME:\n        {\n          char *prefix_p = NULL;\n          lit_utf8_size_t prefix_size = 0;\n\n          if (opcode != CBC_EXT_SET_FUNCTION_NAME)\n          {\n            ecma_value_t prop_name_value;\n\n            if (opcode == CBC_EXT_SET_CLASS_NAME)\n            {\n              uint16_t literal_index;\n              READ_LITERAL_INDEX (literal_index);\n              prop_name_value = literal_start_p[literal_index];\n            }\n            else\n            {\n              prop_name_value = stack_top_p[-2];\n            }\n\n            ecma_string_t *prop_name_p = ecma_op_to_property_key (prop_name_value);\n\n            if (JERRY_UNLIKELY (prop_name_p == NULL))\n            {\n              result = ECMA_VALUE_ERROR;\n              goto error;\n            }\n\n            left_value = ecma_make_prop_name_value (prop_name_p);\n\n            if (opcode != CBC_EXT_SET_CLASS_NAME)\n            {\n              ecma_ref_ecma_string (prop_name_p);\n              ecma_free_value (stack_top_p[-2]);\n              stack_top_p[-2] = left_value;\n            }\n\n            if (opcode == CBC_EXT_SET_COMPUTED_GETTER_NAME || opcode == CBC_EXT_SET_COMPUTED_SETTER_NAME)\n            {\n              prefix_p = (opcode == CBC_EXT_SET_COMPUTED_GETTER_NAME) ? \"get \" : \"set \";\n              prefix_size = 4;\n            }\n          }\n\n          ecma_object_t *func_obj_p = ecma_get_object_from_value (stack_top_p[-1]);\n\n          if (ecma_find_named_property (func_obj_p, ecma_get_magic_string (LIT_MAGIC_STRING_NAME)) != NULL)\n          {\n            ecma_free_value (left_value);\n            continue;\n          }\n\n          ecma_property_value_t *value_p;\n          value_p = ecma_create_named_data_property (func_obj_p,\n                                                     ecma_get_magic_string (LIT_MAGIC_STRING_NAME),\n                                                     ECMA_PROPERTY_FLAG_CONFIGURABLE,\n                                                     NULL);\n\n          if (ecma_get_object_type (func_obj_p) != ECMA_OBJECT_TYPE_NATIVE_FUNCTION)\n          {\n            ECMA_SET_SECOND_BIT_TO_POINTER_TAG (((ecma_extended_object_t *) func_obj_p)->u.function.scope_cp);\n          }\n\n          value_p->value = ecma_op_function_form_name (ecma_get_prop_name_from_value (left_value),\n                                                       prefix_p,\n                                                       prefix_size);\n          ecma_free_value (left_value);\n          continue;\n        }\n        case VM_OC_PUSH_SPREAD_ELEMENT:\n        {\n          *stack_top_p++ = ECMA_VALUE_SPREAD_ELEMENT;\n          continue;\n        }\n        case VM_OC_PUSH_REST_OBJECT:\n        {\n          vm_frame_ctx_shared_t *shared_p = frame_ctx_p->shared_p;\n\n          JERRY_ASSERT (shared_p->status_flags & VM_FRAME_CTX_SHARED_HAS_ARG_LIST);\n\n          const ecma_value_t *arg_list_p = ((vm_frame_ctx_shared_args_t *) shared_p)->arg_list_p;\n          uint32_t arg_list_len = ((vm_frame_ctx_shared_args_t *) shared_p)->arg_list_len;\n          uint16_t argument_end;\n\n          if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n          {\n            argument_end = ((cbc_uint16_arguments_t *) bytecode_header_p)->argument_end;\n          }\n          else\n          {\n            argument_end = ((cbc_uint8_arguments_t *) bytecode_header_p)->argument_end;\n          }\n\n          if (arg_list_len < argument_end)\n          {\n            arg_list_len = argument_end;\n          }\n\n          result = ecma_op_new_array_object_from_buffer (arg_list_p + argument_end,\n                                                         arg_list_len - argument_end);\n\n          JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n          *stack_top_p++ = result;\n          continue;\n        }\n        case VM_OC_GET_ITERATOR:\n        {\n          result = ecma_op_get_iterator (stack_top_p[-1], ECMA_VALUE_SYNC_ITERATOR, NULL);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          continue;\n        }\n        case VM_OC_ITERATOR_STEP:\n        {\n          result = ecma_op_iterator_step (stack_top_p[-1], ECMA_VALUE_EMPTY);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          ecma_value_t value = ECMA_VALUE_UNDEFINED;\n\n          if (!ecma_is_value_false (result))\n          {\n            value = ecma_op_iterator_value (result);\n            ecma_free_value (result);\n\n            if (ECMA_IS_VALUE_ERROR (value))\n            {\n              result = value;\n              goto error;\n            }\n          }\n\n          *stack_top_p++ = value;\n          continue;\n        }\n        case VM_OC_ITERATOR_CLOSE:\n        {\n          result = ecma_op_iterator_close (left_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          goto free_left_value;\n        }\n        case VM_OC_DEFAULT_INITIALIZER:\n        {\n          JERRY_ASSERT (stack_top_p > VM_GET_REGISTERS (frame_ctx_p) + register_end);\n\n          if (stack_top_p[-1] != ECMA_VALUE_UNDEFINED)\n          {\n            byte_code_p = byte_code_start_p + branch_offset;\n            continue;\n          }\n\n          stack_top_p--;\n          continue;\n        }\n        case VM_OC_REST_INITIALIZER:\n        {\n          ecma_object_t *array_p = ecma_op_new_array_object (0);\n          JERRY_ASSERT (ecma_op_object_is_fast_array (array_p));\n          ecma_value_t iterator = stack_top_p[-1];\n          uint32_t index = 0;\n\n          while (true)\n          {\n            result = ecma_op_iterator_step (iterator, ECMA_VALUE_EMPTY);\n\n            if (ECMA_IS_VALUE_ERROR (result))\n            {\n              ecma_deref_object (array_p);\n              goto error;\n            }\n\n            if (ecma_is_value_false (result))\n            {\n              break;\n            }\n\n            ecma_value_t value = ecma_op_iterator_value (result);\n            ecma_free_value (result);\n\n            if (ECMA_IS_VALUE_ERROR (value))\n            {\n              ecma_deref_object (array_p);\n              result = value;\n              goto error;\n            }\n\n            bool set_result = ecma_fast_array_set_property (array_p, index++, value);\n            JERRY_ASSERT (set_result);\n            ecma_free_value (value);\n          }\n\n          *stack_top_p++ = ecma_make_object_value (array_p);\n          continue;\n        }\n        case VM_OC_INITIALIZER_PUSH_LIST:\n        {\n          stack_top_p++;\n          stack_top_p[-1] = stack_top_p[-2];\n          stack_top_p[-2] = ecma_make_object_value (ecma_op_new_array_object (0));\n          continue;\n        }\n        case VM_OC_INITIALIZER_PUSH_REST:\n        {\n          if (!ecma_op_require_object_coercible (stack_top_p[-1]))\n          {\n            result = ECMA_VALUE_ERROR;\n            goto error;\n          }\n\n          ecma_object_t *prototype_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n          ecma_object_t *result_object_p = ecma_create_object (prototype_p, 0, ECMA_OBJECT_TYPE_GENERAL);\n\n          left_value = ecma_make_object_value (result_object_p);\n          result = opfunc_copy_data_properties (left_value, stack_top_p[-1], stack_top_p[-2]);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          ecma_free_value (stack_top_p[-2]);\n          stack_top_p[-2] = stack_top_p[-1];\n          stack_top_p[-1] = left_value;\n          continue;\n        }\n        case VM_OC_INITIALIZER_PUSH_NAME:\n        {\n          if (JERRY_UNLIKELY (!ecma_is_value_prop_name (left_value)))\n          {\n            ecma_string_t *property_key = ecma_op_to_property_key (left_value);\n\n            if (property_key == NULL)\n            {\n              result = ECMA_VALUE_ERROR;\n              goto error;\n            }\n\n            ecma_free_value (left_value);\n            left_value = ecma_make_string_value (property_key);\n          }\n\n          ecma_object_t *array_obj_p = ecma_get_object_from_value (stack_top_p[-2]);\n          JERRY_ASSERT (ecma_get_object_type (array_obj_p) == ECMA_OBJECT_TYPE_ARRAY);\n\n          ecma_extended_object_t *ext_array_obj_p = (ecma_extended_object_t *) array_obj_p;\n          ecma_fast_array_set_property (array_obj_p, ext_array_obj_p->u.array.length, left_value);\n          /* FALLTHRU */\n        }\n        case VM_OC_INITIALIZER_PUSH_PROP:\n        {\n          result = vm_op_get_value (stack_top_p[-1], left_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_left_value;\n        }\n        case VM_OC_MOVE:\n        {\n          JERRY_ASSERT (opcode >= CBC_EXT_MOVE && opcode <= CBC_EXT_MOVE_3);\n          const uint8_t index = (uint8_t) (1 + (opcode - CBC_EXT_MOVE));\n\n          ecma_value_t element = stack_top_p[-index];\n\n          for (int32_t i = -index; i < -1; i++)\n          {\n            stack_top_p[i] = stack_top_p[i + 1];\n          }\n\n          stack_top_p[-1] = element;\n          continue;\n        }\n        case VM_OC_SPREAD_ARGUMENTS:\n        {\n          uint8_t arguments_list_len = *byte_code_p++;\n          stack_top_p -= arguments_list_len;\n\n          ecma_collection_t *arguments_p = opfunc_spread_arguments (stack_top_p, arguments_list_len);\n\n          if (JERRY_UNLIKELY (arguments_p == NULL))\n          {\n            result = ECMA_VALUE_ERROR;\n            goto error;\n          }\n\n          stack_top_p++;\n          ECMA_SET_INTERNAL_VALUE_POINTER (stack_top_p[-1], arguments_p);\n\n          frame_ctx_p->call_operation = VM_EXEC_SPREAD_OP;\n          frame_ctx_p->byte_code_p = byte_code_start_p;\n          frame_ctx_p->stack_top_p = stack_top_p;\n          return ECMA_VALUE_UNDEFINED;\n        }\n        case VM_OC_CREATE_GENERATOR:\n        {\n          frame_ctx_p->call_operation = VM_EXEC_RETURN;\n          frame_ctx_p->byte_code_p = byte_code_p;\n          frame_ctx_p->stack_top_p = stack_top_p;\n\n          vm_executable_object_t *executable_object_p;\n          executable_object_p = opfunc_create_executable_object (frame_ctx_p, VM_CREATE_EXECUTABLE_OBJECT_GENERATOR);\n\n          return ecma_make_object_value ((ecma_object_t *) executable_object_p);\n        }\n        case VM_OC_YIELD:\n        {\n          frame_ctx_p->call_operation = VM_EXEC_RETURN;\n          frame_ctx_p->byte_code_p = byte_code_p;\n          frame_ctx_p->stack_top_p = --stack_top_p;\n          return *stack_top_p;\n        }\n        case VM_OC_ASYNC_YIELD:\n        {\n          ecma_extended_object_t *async_generator_object_p = VM_GET_EXECUTABLE_OBJECT (frame_ctx_p);\n\n          opfunc_async_generator_yield (async_generator_object_p, stack_top_p[-1]);\n\n          frame_ctx_p->call_operation = VM_EXEC_RETURN;\n          frame_ctx_p->byte_code_p = byte_code_p;\n          frame_ctx_p->stack_top_p = --stack_top_p;\n          return ECMA_VALUE_UNDEFINED;\n        }\n        case VM_OC_ASYNC_YIELD_ITERATOR:\n        {\n          ecma_extended_object_t *async_generator_object_p = VM_GET_EXECUTABLE_OBJECT (frame_ctx_p);\n\n          JERRY_ASSERT (!(async_generator_object_p->u.class_prop.extra_info\n                          & ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD));\n\n          /* Byte code is executed at the first time. */\n          left_value = stack_top_p[-1];\n          result = ecma_op_get_iterator (left_value, ECMA_VALUE_ASYNC_ITERATOR, stack_top_p - 1);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          ecma_free_value (left_value);\n          left_value = result;\n          result = ecma_op_iterator_next (left_value, stack_top_p[-1], ECMA_VALUE_UNDEFINED);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          result = ecma_promise_async_await (async_generator_object_p, result);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          async_generator_object_p->u.class_prop.extra_info |= ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD;\n          frame_ctx_p->block_result = left_value;\n\n          frame_ctx_p->call_operation = VM_EXEC_RETURN;\n          frame_ctx_p->byte_code_p = byte_code_p;\n          frame_ctx_p->stack_top_p = stack_top_p;\n          return ECMA_VALUE_UNDEFINED;\n        }\n        case VM_OC_AWAIT:\n        {\n          if (JERRY_UNLIKELY (frame_ctx_p->block_result == ECMA_VALUE_UNDEFINED))\n          {\n            frame_ctx_p->call_operation = VM_EXEC_RETURN;\n            frame_ctx_p->byte_code_p = byte_code_p;\n            frame_ctx_p->stack_top_p = --stack_top_p;\n\n            result = opfunc_async_create_and_await (frame_ctx_p, *stack_top_p, 0);\n\n            if (ECMA_IS_VALUE_ERROR (result))\n            {\n              goto error;\n            }\n            return result;\n          }\n          /* FALLTHRU */\n        }\n        case VM_OC_GENERATOR_AWAIT:\n        {\n          ecma_extended_object_t *async_generator_object_p = VM_GET_EXECUTABLE_OBJECT (frame_ctx_p);\n\n          result = ecma_promise_async_await (async_generator_object_p, *(--stack_top_p));\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          frame_ctx_p->call_operation = VM_EXEC_RETURN;\n          frame_ctx_p->byte_code_p = byte_code_p;\n          frame_ctx_p->stack_top_p = stack_top_p;\n          return ECMA_VALUE_UNDEFINED;\n        }\n        case VM_OC_EXT_RETURN:\n        {\n          result = left_value;\n          left_value = ECMA_VALUE_UNDEFINED;\n\n          ecma_value_t *stack_bottom_p = VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth;\n\n          while (stack_top_p > stack_bottom_p)\n          {\n            ecma_fast_free_value (*(--stack_top_p));\n          }\n\n          goto error;\n        }\n        case VM_OC_ASYNC_EXIT:\n        {\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n          result = frame_ctx_p->block_result;\n          frame_ctx_p->block_result = ECMA_VALUE_UNDEFINED;\n\n          if (result == ECMA_VALUE_UNDEFINED)\n          {\n            ecma_object_t *old_new_target_p = JERRY_CONTEXT (current_new_target_p);\n            JERRY_CONTEXT (current_new_target_p) = ecma_builtin_get (ECMA_BUILTIN_ID_PROMISE);\n\n            result = ecma_op_create_promise_object (ECMA_VALUE_EMPTY, ECMA_PROMISE_EXECUTOR_EMPTY);\n\n            JERRY_CONTEXT (current_new_target_p) = old_new_target_p;\n          }\n\n          vm_stack_context_type_t context_type = VM_GET_CONTEXT_TYPE (stack_top_p[-1]);\n\n          if (context_type == VM_CONTEXT_TRY)\n          {\n            JERRY_ASSERT (frame_ctx_p->context_depth == PARSER_TRY_CONTEXT_STACK_ALLOCATION);\n            left_value = ECMA_VALUE_UNDEFINED;\n          }\n          else\n          {\n            JERRY_ASSERT (frame_ctx_p->context_depth == PARSER_FINALLY_CONTEXT_STACK_ALLOCATION);\n            left_value = stack_top_p[-2];\n          }\n\n          if (context_type == VM_CONTEXT_FINALLY_THROW)\n          {\n            ecma_reject_promise (result, left_value);\n          }\n          else\n          {\n            JERRY_ASSERT (context_type == VM_CONTEXT_TRY || context_type == VM_CONTEXT_FINALLY_RETURN);\n            ecma_fulfill_promise (result, left_value);\n          }\n\n          ecma_free_value (left_value);\n\n          frame_ctx_p->context_depth = 0;\n          frame_ctx_p->call_operation = VM_NO_EXEC_OP;\n          return result;\n        }\n        case VM_OC_STRING_CONCAT:\n        {\n          ecma_string_t *left_str_p = ecma_op_to_string (left_value);\n\n          if (JERRY_UNLIKELY (left_str_p == NULL))\n          {\n            result = ECMA_VALUE_ERROR;\n            goto error;\n          }\n          ecma_string_t *right_str_p = ecma_op_to_string (right_value);\n\n          if (JERRY_UNLIKELY (right_str_p == NULL))\n          {\n            ecma_deref_ecma_string (left_str_p);\n            result = ECMA_VALUE_ERROR;\n            goto error;\n          }\n\n          ecma_string_t *result_str_p = ecma_concat_ecma_strings (left_str_p, right_str_p);\n          ecma_deref_ecma_string (right_str_p);\n\n          *stack_top_p++ = ecma_make_string_value (result_str_p);\n          goto free_both_values;\n        }\n        case VM_OC_GET_TEMPLATE_OBJECT:\n        {\n          uint8_t tagged_idx = *byte_code_p++;\n          ecma_collection_t *collection_p = ecma_compiled_code_get_tagged_template_collection (bytecode_header_p);\n          JERRY_ASSERT (tagged_idx < collection_p->item_count);\n\n          *stack_top_p++ = ecma_copy_value (collection_p->buffer_p[tagged_idx]);\n          continue;\n        }\n        case VM_OC_PUSH_NEW_TARGET:\n        {\n          ecma_object_t *new_target_object_p = JERRY_CONTEXT (current_new_target_p);\n          if (new_target_object_p == NULL)\n          {\n            *stack_top_p++ = ECMA_VALUE_UNDEFINED;\n          }\n          else\n          {\n            ecma_ref_object (new_target_object_p);\n            *stack_top_p++ = ecma_make_object_value (new_target_object_p);\n          }\n          continue;\n        }\n        case VM_OC_REQUIRE_OBJECT_COERCIBLE:\n        {\n          if (!ecma_op_require_object_coercible (stack_top_p[-1]))\n          {\n            result = ECMA_VALUE_ERROR;\n            goto error;\n          }\n          continue;\n        }\n        case VM_OC_ASSIGN_SUPER:\n        {\n          result = opfunc_assign_super_reference (&stack_top_p, frame_ctx_p, opcode_data);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n          continue;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case VM_OC_PUSH_ELISON:\n        {\n          *stack_top_p++ = ECMA_VALUE_ARRAY_HOLE;\n          continue;\n        }\n        case VM_OC_APPEND_ARRAY:\n        {\n          uint16_t values_length = *byte_code_p++;\n          stack_top_p -= values_length;\n\n#if ENABLED (JERRY_ESNEXT)\n          if (*byte_code_start_p == CBC_EXT_OPCODE)\n          {\n            values_length = (uint16_t) (values_length | OPFUNC_HAS_SPREAD_ELEMENT);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          result = opfunc_append_array (stack_top_p, values_length);\n\n#if ENABLED (JERRY_ESNEXT)\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n#else /* !ENABLED (JERRY_ESNEXT) */\n          JERRY_ASSERT (ecma_is_value_empty (result));\n#endif /* ENABLED (JERRY_ESNEXT) */\n          continue;\n        }\n        case VM_OC_IDENT_REFERENCE:\n        {\n          uint16_t literal_index;\n\n          READ_LITERAL_INDEX (literal_index);\n\n          JERRY_ASSERT (literal_index < ident_end);\n\n          if (literal_index < register_end)\n          {\n            *stack_top_p++ = ECMA_VALUE_REGISTER_REF;\n            *stack_top_p++ = ecma_make_integer_value (literal_index);\n            *stack_top_p++ = ecma_fast_copy_value (VM_GET_REGISTER (frame_ctx_p, literal_index));\n          }\n          else\n          {\n            ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n\n            ecma_object_t *ref_base_lex_env_p;\n\n            result = ecma_op_get_value_lex_env_base (frame_ctx_p->lex_env_p,\n                                                     &ref_base_lex_env_p,\n                                                     name_p);\n\n            if (ECMA_IS_VALUE_ERROR (result))\n            {\n              goto error;\n            }\n\n            ecma_ref_object (ref_base_lex_env_p);\n            ecma_ref_ecma_string (name_p);\n            *stack_top_p++ = ecma_make_object_value (ref_base_lex_env_p);\n            *stack_top_p++ = ecma_make_string_value (name_p);\n            *stack_top_p++ = result;\n          }\n          continue;\n        }\n        case VM_OC_PROP_GET:\n        {\n          result = vm_op_get_value (left_value, right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_PROP_REFERENCE:\n        {\n          /* Forms with reference requires preserving the base and offset. */\n\n          if (opcode == CBC_PUSH_PROP_REFERENCE)\n          {\n            left_value = stack_top_p[-2];\n            right_value = stack_top_p[-1];\n          }\n          else if (opcode == CBC_PUSH_PROP_LITERAL_REFERENCE)\n          {\n            *stack_top_p++ = left_value;\n            right_value = left_value;\n            left_value = stack_top_p[-2];\n          }\n          else\n          {\n            JERRY_ASSERT (opcode == CBC_PUSH_PROP_LITERAL_LITERAL_REFERENCE\n                          || opcode == CBC_PUSH_PROP_THIS_LITERAL_REFERENCE);\n            *stack_top_p++ = left_value;\n            *stack_top_p++ = right_value;\n          }\n          /* FALLTHRU */\n        }\n        case VM_OC_PROP_PRE_INCR:\n        case VM_OC_PROP_PRE_DECR:\n        case VM_OC_PROP_POST_INCR:\n        case VM_OC_PROP_POST_DECR:\n        {\n          result = vm_op_get_value (left_value,\n                                    right_value);\n\n          if (opcode < CBC_PRE_INCR)\n          {\n            left_value = ECMA_VALUE_UNDEFINED;\n            right_value = ECMA_VALUE_UNDEFINED;\n          }\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          if (opcode < CBC_PRE_INCR)\n          {\n            break;\n          }\n\n          stack_top_p += 2;\n          left_value = result;\n          right_value = ECMA_VALUE_UNDEFINED;\n          /* FALLTHRU */\n        }\n        case VM_OC_PRE_INCR:\n        case VM_OC_PRE_DECR:\n        case VM_OC_POST_INCR:\n        case VM_OC_POST_DECR:\n        {\n          uint32_t opcode_flags = VM_OC_GROUP_GET_INDEX (opcode_data) - VM_OC_PROP_PRE_INCR;\n          ecma_number_t result_number;\n\n          byte_code_p = byte_code_start_p + 1;\n\n          if (ecma_is_value_integer_number (left_value))\n          {\n            result = left_value;\n            left_value = ECMA_VALUE_UNDEFINED;\n\n            ecma_integer_value_t int_value = (ecma_integer_value_t) result;\n            ecma_integer_value_t int_increase = 0;\n\n            if (opcode_flags & VM_OC_DECREMENT_OPERATOR_FLAG)\n            {\n              if (int_value > ECMA_INTEGER_NUMBER_MIN_SHIFTED)\n              {\n                int_increase = -(1 << ECMA_DIRECT_SHIFT);\n              }\n            }\n            else if (int_value < ECMA_INTEGER_NUMBER_MAX_SHIFTED)\n            {\n              int_increase = 1 << ECMA_DIRECT_SHIFT;\n            }\n\n            if (JERRY_LIKELY (int_increase != 0))\n            {\n              /* Postfix operators require the unmodifed number value. */\n              if (opcode_flags & VM_OC_POST_INCR_DECR_OPERATOR_FLAG)\n              {\n                POST_INCREASE_DECREASE_PUT_RESULT (result);\n              }\n\n              result = (ecma_value_t) (int_value + int_increase);\n              break;\n            }\n            result_number = (ecma_number_t) ecma_get_integer_from_value (result);\n          }\n          else if (ecma_is_value_float_number (left_value))\n          {\n            result = left_value;\n            left_value = ECMA_VALUE_UNDEFINED;\n            result_number = ecma_get_number_from_value (result);\n          }\n          else\n          {\n            result = ecma_op_to_numeric (left_value, &result_number, ECMA_TO_NUMERIC_ALLOW_BIGINT);\n\n            if (ECMA_IS_VALUE_ERROR (result))\n            {\n              goto error;\n            }\n\n            ecma_free_value (left_value);\n            left_value = ECMA_VALUE_UNDEFINED;\n\n#if ENABLED (JERRY_BUILTIN_BIGINT)\n            if (JERRY_UNLIKELY (ecma_is_value_bigint (result)))\n            {\n              ecma_bigint_unary_operation_type operation_type = ECMA_BIGINT_UNARY_INCREASE;\n\n              if (opcode_flags & VM_OC_DECREMENT_OPERATOR_FLAG)\n              {\n                operation_type = ECMA_BIGINT_UNARY_DECREASE;\n              }\n\n              /* Postfix operators require the unmodifed number value. */\n              if (opcode_flags & VM_OC_POST_INCR_DECR_OPERATOR_FLAG)\n              {\n                POST_INCREASE_DECREASE_PUT_RESULT (result);\n\n                result = ecma_bigint_unary (result, operation_type);\n              }\n              else\n              {\n                ecma_value_t original_value = result;\n                result = ecma_bigint_unary (original_value, operation_type);\n                ecma_free_value (original_value);\n              }\n\n              if (ECMA_IS_VALUE_ERROR (result))\n              {\n                goto error;\n              }\n              break;\n            }\n#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */\n\n            result = ecma_make_number_value (result_number);\n          }\n\n          ecma_number_t increase = ECMA_NUMBER_ONE;\n\n          if (opcode_flags & VM_OC_DECREMENT_OPERATOR_FLAG)\n          {\n            /* For decrement operators */\n            increase = ECMA_NUMBER_MINUS_ONE;\n          }\n\n          /* Postfix operators require the unmodifed number value. */\n          if (opcode_flags & VM_OC_POST_INCR_DECR_OPERATOR_FLAG)\n          {\n            POST_INCREASE_DECREASE_PUT_RESULT (result);\n\n            result = ecma_make_number_value (result_number + increase);\n            break;\n          }\n\n          if (ecma_is_value_integer_number (result))\n          {\n            result = ecma_make_number_value (result_number + increase);\n          }\n          else\n          {\n            result = ecma_update_float_number (result, result_number + increase);\n          }\n          break;\n        }\n        case VM_OC_ASSIGN:\n        {\n          result = left_value;\n          left_value = ECMA_VALUE_UNDEFINED;\n          break;\n        }\n        case VM_OC_MOV_IDENT:\n        {\n          uint32_t literal_index;\n\n          READ_LITERAL_INDEX (literal_index);\n\n          JERRY_ASSERT (literal_index < register_end);\n          JERRY_ASSERT (!(opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK)));\n\n          ecma_fast_free_value (VM_GET_REGISTER (frame_ctx_p, literal_index));\n          VM_GET_REGISTER (frame_ctx_p, literal_index) = left_value;\n          continue;\n        }\n        case VM_OC_ASSIGN_PROP:\n        {\n          result = stack_top_p[-1];\n          stack_top_p[-1] = left_value;\n          left_value = ECMA_VALUE_UNDEFINED;\n          break;\n        }\n        case VM_OC_ASSIGN_PROP_THIS:\n        {\n          result = stack_top_p[-1];\n          stack_top_p[-1] = ecma_copy_value (frame_ctx_p->this_binding);\n          *stack_top_p++ = left_value;\n          left_value = ECMA_VALUE_UNDEFINED;\n          break;\n        }\n        case VM_OC_RETURN:\n        {\n          JERRY_ASSERT (opcode == CBC_RETURN\n                        || opcode == CBC_RETURN_WITH_BLOCK\n                        || opcode == CBC_RETURN_WITH_LITERAL);\n\n          if (opcode == CBC_RETURN_WITH_BLOCK)\n          {\n            left_value = frame_ctx_p->block_result;\n            frame_ctx_p->block_result = ECMA_VALUE_UNDEFINED;\n          }\n\n          result = left_value;\n          left_value = ECMA_VALUE_UNDEFINED;\n          goto error;\n        }\n        case VM_OC_THROW:\n        {\n          jcontext_raise_exception (left_value);\n\n          result = ECMA_VALUE_ERROR;\n          left_value = ECMA_VALUE_UNDEFINED;\n          goto error;\n        }\n        case VM_OC_THROW_REFERENCE_ERROR:\n        {\n          result = ecma_raise_reference_error (ECMA_ERR_MSG (\"Undefined reference.\"));\n          goto error;\n        }\n        case VM_OC_EVAL:\n        {\n          JERRY_CONTEXT (status_flags) |= ECMA_STATUS_DIRECT_EVAL;\n          JERRY_ASSERT ((*byte_code_p >= CBC_CALL && *byte_code_p <= CBC_CALL2_PROP_BLOCK)\n                        || (*byte_code_p == CBC_EXT_OPCODE\n                            && byte_code_p[1] >= CBC_EXT_SPREAD_CALL\n                            && byte_code_p[1] <= CBC_EXT_SPREAD_CALL_PROP_BLOCK));\n          continue;\n        }\n        case VM_OC_CALL:\n        {\n          frame_ctx_p->call_operation = VM_EXEC_CALL;\n          frame_ctx_p->byte_code_p = byte_code_start_p;\n          frame_ctx_p->stack_top_p = stack_top_p;\n          return ECMA_VALUE_UNDEFINED;\n        }\n        case VM_OC_NEW:\n        {\n          frame_ctx_p->call_operation = VM_EXEC_CONSTRUCT;\n          frame_ctx_p->byte_code_p = byte_code_start_p;\n          frame_ctx_p->stack_top_p = stack_top_p;\n          return ECMA_VALUE_UNDEFINED;\n        }\n        case VM_OC_ERROR:\n        {\n          JERRY_ASSERT (frame_ctx_p->byte_code_p[1] == CBC_EXT_ERROR);\n#if ENABLED (JERRY_DEBUGGER)\n          frame_ctx_p->byte_code_p = JERRY_CONTEXT (debugger_exception_byte_code_p);\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n          result = ECMA_VALUE_ERROR;\n          goto error;\n        }\n        case VM_OC_RESOLVE_BASE_FOR_CALL:\n        {\n          ecma_value_t this_value = stack_top_p[-3];\n\n          if (this_value == ECMA_VALUE_REGISTER_REF)\n          {\n            /* Lexical environment cannot be 'this' value. */\n            stack_top_p[-2] = ECMA_VALUE_UNDEFINED;\n            stack_top_p[-3] = ECMA_VALUE_UNDEFINED;\n          }\n          else if (vm_get_implicit_this_value (&this_value))\n          {\n            ecma_free_value (stack_top_p[-3]);\n            stack_top_p[-3] = this_value;\n          }\n\n          continue;\n        }\n        case VM_OC_PROP_DELETE:\n        {\n          result = vm_op_delete_prop (left_value, right_value, is_strict);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          JERRY_ASSERT (ecma_is_value_boolean (result));\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_DELETE:\n        {\n          uint16_t literal_index;\n\n          READ_LITERAL_INDEX (literal_index);\n\n          if (literal_index < register_end)\n          {\n            *stack_top_p++ = ECMA_VALUE_FALSE;\n            continue;\n          }\n\n          result = vm_op_delete_var (literal_start_p[literal_index],\n                                     frame_ctx_p->lex_env_p);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          JERRY_ASSERT (ecma_is_value_boolean (result));\n\n          *stack_top_p++ = result;\n          continue;\n        }\n        case VM_OC_JUMP:\n        {\n          byte_code_p = byte_code_start_p + branch_offset;\n          continue;\n        }\n        case VM_OC_BRANCH_IF_STRICT_EQUAL:\n        {\n          ecma_value_t value = *(--stack_top_p);\n\n          JERRY_ASSERT (stack_top_p > VM_GET_REGISTERS (frame_ctx_p) + register_end);\n\n          if (ecma_op_strict_equality_compare (value, stack_top_p[-1]))\n          {\n            byte_code_p = byte_code_start_p + branch_offset;\n            ecma_free_value (*--stack_top_p);\n          }\n          ecma_free_value (value);\n          continue;\n        }\n        case VM_OC_BRANCH_IF_TRUE:\n        case VM_OC_BRANCH_IF_FALSE:\n        case VM_OC_BRANCH_IF_LOGICAL_TRUE:\n        case VM_OC_BRANCH_IF_LOGICAL_FALSE:\n        {\n          uint32_t opcode_flags = VM_OC_GROUP_GET_INDEX (opcode_data) - VM_OC_BRANCH_IF_TRUE;\n          ecma_value_t value = *(--stack_top_p);\n\n          bool boolean_value = ecma_op_to_boolean (value);\n\n          if (opcode_flags & VM_OC_BRANCH_IF_FALSE_FLAG)\n          {\n            boolean_value = !boolean_value;\n          }\n\n          if (boolean_value)\n          {\n            byte_code_p = byte_code_start_p + branch_offset;\n            if (opcode_flags & VM_OC_LOGICAL_BRANCH_FLAG)\n            {\n              /* \"Push\" the value back to the stack. */\n              ++stack_top_p;\n              continue;\n            }\n          }\n\n          ecma_fast_free_value (value);\n          continue;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case VM_OC_BRANCH_IF_NULLISH:\n        {\n          left_value = stack_top_p[-1];\n\n          if (!ecma_is_value_null (left_value) && !ecma_is_value_undefined (left_value))\n          {\n            byte_code_p = byte_code_start_p + branch_offset;\n            continue;\n          }\n          --stack_top_p;\n          continue;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case VM_OC_PLUS:\n        case VM_OC_MINUS:\n        {\n          result = opfunc_unary_operation (left_value, VM_OC_GROUP_GET_INDEX (opcode_data) == VM_OC_PLUS);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_left_value;\n        }\n        case VM_OC_NOT:\n        {\n          *stack_top_p++ = ecma_make_boolean_value (!ecma_op_to_boolean (left_value));\n          JERRY_ASSERT (ecma_is_value_boolean (stack_top_p[-1]));\n          goto free_left_value;\n        }\n        case VM_OC_BIT_NOT:\n        {\n          JERRY_STATIC_ASSERT (ECMA_DIRECT_TYPE_MASK == ((1 << ECMA_DIRECT_SHIFT) - 1),\n                               direct_type_mask_must_fill_all_bits_before_the_value_starts);\n\n          if (ecma_is_value_integer_number (left_value))\n          {\n            *stack_top_p++ = (~left_value) & (ecma_value_t) (~ECMA_DIRECT_TYPE_MASK);\n            goto free_left_value;\n          }\n\n          result = do_number_bitwise_not (left_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_left_value;\n        }\n        case VM_OC_VOID:\n        {\n          *stack_top_p++ = ECMA_VALUE_UNDEFINED;\n          goto free_left_value;\n        }\n        case VM_OC_TYPEOF_IDENT:\n        {\n          uint16_t literal_index;\n\n          READ_LITERAL_INDEX (literal_index);\n\n          JERRY_ASSERT (literal_index < ident_end);\n\n          if (literal_index < register_end)\n          {\n            left_value = ecma_copy_value (VM_GET_REGISTER (frame_ctx_p, literal_index));\n          }\n          else\n          {\n            ecma_string_t *name_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n\n            ecma_object_t *ref_base_lex_env_p;\n\n            result = ecma_op_get_value_lex_env_base (frame_ctx_p->lex_env_p,\n                                                     &ref_base_lex_env_p,\n                                                     name_p);\n\n            if (ref_base_lex_env_p == NULL)\n            {\n              jcontext_release_exception ();\n              result = ECMA_VALUE_UNDEFINED;\n            }\n            else if (ECMA_IS_VALUE_ERROR (result))\n            {\n              goto error;\n            }\n\n            left_value = result;\n          }\n          /* FALLTHRU */\n        }\n        case VM_OC_TYPEOF:\n        {\n          result = opfunc_typeof (left_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_left_value;\n        }\n        case VM_OC_ADD:\n        {\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            ecma_integer_value_t left_integer = ecma_get_integer_from_value (left_value);\n            ecma_integer_value_t right_integer = ecma_get_integer_from_value (right_value);\n            *stack_top_p++ = ecma_make_int32_value ((int32_t) (left_integer + right_integer));\n            continue;\n          }\n\n          if (ecma_is_value_float_number (left_value)\n              && ecma_is_value_number (right_value))\n          {\n            ecma_number_t new_value = (ecma_get_float_from_value (left_value) +\n                                       ecma_get_number_from_value (right_value));\n\n            *stack_top_p++ = ecma_update_float_number (left_value, new_value);\n            ecma_free_number (right_value);\n            continue;\n          }\n\n          if (ecma_is_value_float_number (right_value)\n              && ecma_is_value_integer_number (left_value))\n          {\n            ecma_number_t new_value = ((ecma_number_t) ecma_get_integer_from_value (left_value) +\n                                       ecma_get_float_from_value (right_value));\n\n            *stack_top_p++ = ecma_update_float_number (right_value, new_value);\n            continue;\n          }\n\n          result = opfunc_addition (left_value, right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_SUB:\n        {\n          JERRY_STATIC_ASSERT (ECMA_INTEGER_NUMBER_MAX * 2 <= INT32_MAX\n                               && ECMA_INTEGER_NUMBER_MIN * 2 >= INT32_MIN,\n                               doubled_ecma_numbers_must_fit_into_int32_range);\n\n          JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (left_value)\n                        && !ECMA_IS_VALUE_ERROR (right_value));\n\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            ecma_integer_value_t left_integer = ecma_get_integer_from_value (left_value);\n            ecma_integer_value_t right_integer = ecma_get_integer_from_value (right_value);\n            *stack_top_p++ = ecma_make_int32_value ((int32_t) (left_integer - right_integer));\n            continue;\n          }\n\n          if (ecma_is_value_float_number (left_value)\n              && ecma_is_value_number (right_value))\n          {\n            ecma_number_t new_value = (ecma_get_float_from_value (left_value) -\n                                       ecma_get_number_from_value (right_value));\n\n            *stack_top_p++ = ecma_update_float_number (left_value, new_value);\n            ecma_free_number (right_value);\n            continue;\n          }\n\n          if (ecma_is_value_float_number (right_value)\n              && ecma_is_value_integer_number (left_value))\n          {\n            ecma_number_t new_value = ((ecma_number_t) ecma_get_integer_from_value (left_value) -\n                                       ecma_get_float_from_value (right_value));\n\n            *stack_top_p++ = ecma_update_float_number (right_value, new_value);\n            continue;\n          }\n\n          result = do_number_arithmetic (NUMBER_ARITHMETIC_SUBTRACTION,\n                                         left_value,\n                                         right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_MUL:\n        {\n          JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (left_value)\n                        && !ECMA_IS_VALUE_ERROR (right_value));\n\n          JERRY_STATIC_ASSERT (ECMA_INTEGER_MULTIPLY_MAX * ECMA_INTEGER_MULTIPLY_MAX <= ECMA_INTEGER_NUMBER_MAX\n                               && -(ECMA_INTEGER_MULTIPLY_MAX * ECMA_INTEGER_MULTIPLY_MAX) >= ECMA_INTEGER_NUMBER_MIN,\n                               square_of_integer_multiply_max_must_fit_into_integer_value_range);\n\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            ecma_integer_value_t left_integer = ecma_get_integer_from_value (left_value);\n            ecma_integer_value_t right_integer = ecma_get_integer_from_value (right_value);\n\n            if (-ECMA_INTEGER_MULTIPLY_MAX <= left_integer\n                && left_integer <= ECMA_INTEGER_MULTIPLY_MAX\n                && -ECMA_INTEGER_MULTIPLY_MAX <= right_integer\n                && right_integer <= ECMA_INTEGER_MULTIPLY_MAX\n                && left_value != 0\n                && right_value != 0)\n            {\n              *stack_top_p++ = ecma_integer_multiply (left_integer, right_integer);\n              continue;\n            }\n\n            ecma_number_t multiply = (ecma_number_t) left_integer * (ecma_number_t) right_integer;\n            *stack_top_p++ = ecma_make_number_value (multiply);\n            continue;\n          }\n\n          if (ecma_is_value_float_number (left_value)\n              && ecma_is_value_number (right_value))\n          {\n            ecma_number_t new_value = (ecma_get_float_from_value (left_value) *\n                                       ecma_get_number_from_value (right_value));\n\n            *stack_top_p++ = ecma_update_float_number (left_value, new_value);\n            ecma_free_number (right_value);\n            continue;\n          }\n\n          if (ecma_is_value_float_number (right_value)\n              && ecma_is_value_integer_number (left_value))\n          {\n            ecma_number_t new_value = ((ecma_number_t) ecma_get_integer_from_value (left_value) *\n                                       ecma_get_float_from_value (right_value));\n\n            *stack_top_p++ = ecma_update_float_number (right_value, new_value);\n            continue;\n          }\n\n          result = do_number_arithmetic (NUMBER_ARITHMETIC_MULTIPLICATION,\n                                         left_value,\n                                         right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_DIV:\n        {\n          JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (left_value)\n                        && !ECMA_IS_VALUE_ERROR (right_value));\n\n          result = do_number_arithmetic (NUMBER_ARITHMETIC_DIVISION,\n                                         left_value,\n                                         right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_MOD:\n        {\n          JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (left_value)\n                        && !ECMA_IS_VALUE_ERROR (right_value));\n\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            ecma_integer_value_t left_integer = ecma_get_integer_from_value (left_value);\n            ecma_integer_value_t right_integer = ecma_get_integer_from_value (right_value);\n\n            if (right_integer != 0)\n            {\n              ecma_integer_value_t mod_result = left_integer % right_integer;\n\n              if (mod_result != 0 || left_integer >= 0)\n              {\n                *stack_top_p++ = ecma_make_integer_value (mod_result);\n                continue;\n              }\n            }\n          }\n\n          result = do_number_arithmetic (NUMBER_ARITHMETIC_REMAINDER,\n                                         left_value,\n                                         right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case VM_OC_EXP:\n        {\n          result = do_number_arithmetic (NUMBER_ARITHMETIC_EXPONENTIATION,\n                                         left_value,\n                                         right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case VM_OC_EQUAL:\n        {\n          result = opfunc_equality (left_value, right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_NOT_EQUAL:\n        {\n          result = opfunc_equality (left_value, right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = ecma_invert_boolean_value (result);\n          goto free_both_values;\n        }\n        case VM_OC_STRICT_EQUAL:\n        {\n          bool is_equal = ecma_op_strict_equality_compare (left_value, right_value);\n\n          result = ecma_make_boolean_value (is_equal);\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_STRICT_NOT_EQUAL:\n        {\n          bool is_equal = ecma_op_strict_equality_compare (left_value, right_value);\n\n          result = ecma_make_boolean_value (!is_equal);\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_BIT_OR:\n        {\n          JERRY_STATIC_ASSERT (ECMA_DIRECT_TYPE_MASK == ((1 << ECMA_DIRECT_SHIFT) - 1),\n                               direct_type_mask_must_fill_all_bits_before_the_value_starts);\n\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            *stack_top_p++ = left_value | right_value;\n            continue;\n          }\n\n          result = do_number_bitwise_logic (NUMBER_BITWISE_LOGIC_OR,\n                                            left_value,\n                                            right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_BIT_XOR:\n        {\n          JERRY_STATIC_ASSERT (ECMA_DIRECT_TYPE_MASK == ((1 << ECMA_DIRECT_SHIFT) - 1),\n                               direct_type_mask_must_fill_all_bits_before_the_value_starts);\n\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            *stack_top_p++ = (left_value ^ right_value) & (ecma_value_t) (~ECMA_DIRECT_TYPE_MASK);\n            continue;\n          }\n\n          result = do_number_bitwise_logic (NUMBER_BITWISE_LOGIC_XOR,\n                                            left_value,\n                                            right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_BIT_AND:\n        {\n          JERRY_STATIC_ASSERT (ECMA_DIRECT_TYPE_MASK == ((1 << ECMA_DIRECT_SHIFT) - 1),\n                               direct_type_mask_must_fill_all_bits_before_the_value_starts);\n\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            *stack_top_p++ = left_value & right_value;\n            continue;\n          }\n\n          result = do_number_bitwise_logic (NUMBER_BITWISE_LOGIC_AND,\n                                            left_value,\n                                            right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_LEFT_SHIFT:\n        {\n          JERRY_STATIC_ASSERT (ECMA_DIRECT_TYPE_MASK == ((1 << ECMA_DIRECT_SHIFT) - 1),\n                               direct_type_mask_must_fill_all_bits_before_the_value_starts);\n\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            ecma_integer_value_t left_integer = ecma_get_integer_from_value (left_value);\n            ecma_integer_value_t right_integer = ecma_get_integer_from_value (right_value);\n            *stack_top_p++ = ecma_make_int32_value ((int32_t) (left_integer << (right_integer & 0x1f)));\n            continue;\n          }\n\n          result = do_number_bitwise_logic (NUMBER_BITWISE_SHIFT_LEFT,\n                                            left_value,\n                                            right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_RIGHT_SHIFT:\n        {\n          JERRY_STATIC_ASSERT (ECMA_DIRECT_TYPE_MASK == ((1 << ECMA_DIRECT_SHIFT) - 1),\n                               direct_type_mask_must_fill_all_bits_before_the_value_starts);\n\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            ecma_integer_value_t left_integer = ecma_get_integer_from_value (left_value);\n            ecma_integer_value_t right_integer = ecma_get_integer_from_value (right_value);\n            *stack_top_p++ = ecma_make_integer_value (left_integer >> (right_integer & 0x1f));\n            continue;\n          }\n\n          result = do_number_bitwise_logic (NUMBER_BITWISE_SHIFT_RIGHT,\n                                            left_value,\n                                            right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_UNS_RIGHT_SHIFT:\n        {\n          JERRY_STATIC_ASSERT (ECMA_DIRECT_TYPE_MASK == ((1 << ECMA_DIRECT_SHIFT) - 1),\n                               direct_type_mask_must_fill_all_bits_before_the_value_starts);\n\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            uint32_t left_uint32 = (uint32_t) ecma_get_integer_from_value (left_value);\n            ecma_integer_value_t right_integer = ecma_get_integer_from_value (right_value);\n            *stack_top_p++ = ecma_make_uint32_value (left_uint32 >> (right_integer & 0x1f));\n            continue;\n          }\n\n          result = do_number_bitwise_logic (NUMBER_BITWISE_SHIFT_URIGHT,\n                                            left_value,\n                                            right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_LESS:\n        {\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            bool is_less = (ecma_integer_value_t) left_value < (ecma_integer_value_t) right_value;\n#if !ENABLED (JERRY_VM_EXEC_STOP)\n            /* This is a lookahead to the next opcode to improve performance.\n             * If it is CBC_BRANCH_IF_TRUE_BACKWARD, execute it. */\n            if (*byte_code_p <= CBC_BRANCH_IF_TRUE_BACKWARD_3 && *byte_code_p >= CBC_BRANCH_IF_TRUE_BACKWARD)\n            {\n              byte_code_start_p = byte_code_p++;\n              branch_offset_length = CBC_BRANCH_OFFSET_LENGTH (*byte_code_start_p);\n              JERRY_ASSERT (branch_offset_length >= 1 && branch_offset_length <= 3);\n\n              if (is_less)\n              {\n                branch_offset = *(byte_code_p++);\n\n                if (JERRY_UNLIKELY (branch_offset_length != 1))\n                {\n                  branch_offset <<= 8;\n                  branch_offset |= *(byte_code_p++);\n                  if (JERRY_UNLIKELY (branch_offset_length == 3))\n                  {\n                    branch_offset <<= 8;\n                    branch_offset |= *(byte_code_p++);\n                  }\n                }\n\n                /* Note: The opcode is a backward branch. */\n                byte_code_p = byte_code_start_p - branch_offset;\n              }\n              else\n              {\n                byte_code_p += branch_offset_length;\n              }\n\n              continue;\n            }\n#endif /* !ENABLED (JERRY_VM_EXEC_STOP) */\n            *stack_top_p++ = ecma_make_boolean_value (is_less);\n            continue;\n          }\n\n          if (ecma_is_value_number (left_value) && ecma_is_value_number (right_value))\n          {\n            ecma_number_t left_number = ecma_get_number_from_value (left_value);\n            ecma_number_t right_number = ecma_get_number_from_value (right_value);\n\n            *stack_top_p++ = ecma_make_boolean_value (left_number < right_number);\n            goto free_both_values;\n          }\n\n          result = opfunc_relation (left_value, right_value, true, false);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_GREATER:\n        {\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            ecma_integer_value_t left_integer = (ecma_integer_value_t) left_value;\n            ecma_integer_value_t right_integer = (ecma_integer_value_t) right_value;\n\n            *stack_top_p++ = ecma_make_boolean_value (left_integer > right_integer);\n            continue;\n          }\n\n          if (ecma_is_value_number (left_value) && ecma_is_value_number (right_value))\n          {\n            ecma_number_t left_number = ecma_get_number_from_value (left_value);\n            ecma_number_t right_number = ecma_get_number_from_value (right_value);\n\n            *stack_top_p++ = ecma_make_boolean_value (left_number > right_number);\n            goto free_both_values;\n          }\n\n          result = opfunc_relation (left_value, right_value, false, false);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_LESS_EQUAL:\n        {\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            ecma_integer_value_t left_integer = (ecma_integer_value_t) left_value;\n            ecma_integer_value_t right_integer = (ecma_integer_value_t) right_value;\n\n            *stack_top_p++ = ecma_make_boolean_value (left_integer <= right_integer);\n            continue;\n          }\n\n          if (ecma_is_value_number (left_value) && ecma_is_value_number (right_value))\n          {\n            ecma_number_t left_number = ecma_get_number_from_value (left_value);\n            ecma_number_t right_number = ecma_get_number_from_value (right_value);\n\n            *stack_top_p++ = ecma_make_boolean_value (left_number <= right_number);\n            goto free_both_values;\n          }\n\n          result = opfunc_relation (left_value, right_value, false, true);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_GREATER_EQUAL:\n        {\n          if (ecma_are_values_integer_numbers (left_value, right_value))\n          {\n            ecma_integer_value_t left_integer = (ecma_integer_value_t) left_value;\n            ecma_integer_value_t right_integer = (ecma_integer_value_t) right_value;\n\n            *stack_top_p++ = ecma_make_boolean_value (left_integer >= right_integer);\n            continue;\n          }\n\n          if (ecma_is_value_number (left_value) && ecma_is_value_number (right_value))\n          {\n            ecma_number_t left_number = ecma_get_number_from_value (left_value);\n            ecma_number_t right_number = ecma_get_number_from_value (right_value);\n\n            *stack_top_p++ = ecma_make_boolean_value (left_number >= right_number);\n            goto free_both_values;\n          }\n\n          result = opfunc_relation (left_value, right_value, true, true);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_IN:\n        {\n          result = opfunc_in (left_value, right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_INSTANCEOF:\n        {\n          result = opfunc_instanceof (left_value, right_value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          *stack_top_p++ = result;\n          goto free_both_values;\n        }\n        case VM_OC_BLOCK_CREATE_CONTEXT:\n        {\n#if ENABLED (JERRY_ESNEXT)\n          ecma_value_t *stack_context_top_p;\n          stack_context_top_p = VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth;\n\n          JERRY_ASSERT (stack_context_top_p == stack_top_p || stack_context_top_p == stack_top_p - 1);\n\n          if (byte_code_start_p[0] != CBC_EXT_OPCODE)\n          {\n            branch_offset += (int32_t) (byte_code_start_p - frame_ctx_p->byte_code_start_p);\n\n            if (stack_context_top_p != stack_top_p)\n            {\n               /* Preserve the value of switch statement. */\n              stack_context_top_p[1] = stack_context_top_p[0];\n            }\n\n            stack_context_top_p[0] = VM_CREATE_CONTEXT_WITH_ENV (VM_CONTEXT_BLOCK, branch_offset);\n\n            VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_BLOCK_CONTEXT_STACK_ALLOCATION);\n            stack_top_p += PARSER_BLOCK_CONTEXT_STACK_ALLOCATION;\n          }\n          else\n          {\n            JERRY_ASSERT (byte_code_start_p[1] == CBC_EXT_TRY_CREATE_ENV);\n\n            JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_context_top_p[-1]) == VM_CONTEXT_TRY\n                          || VM_GET_CONTEXT_TYPE (stack_context_top_p[-1]) == VM_CONTEXT_CATCH\n                          || VM_GET_CONTEXT_TYPE (stack_context_top_p[-1]) == VM_CONTEXT_FINALLY_JUMP\n                          || VM_GET_CONTEXT_TYPE (stack_context_top_p[-1]) == VM_CONTEXT_FINALLY_THROW\n                          || VM_GET_CONTEXT_TYPE (stack_context_top_p[-1]) == VM_CONTEXT_FINALLY_RETURN);\n\n            JERRY_ASSERT (!(stack_context_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV));\n\n            stack_context_top_p[-1] |= VM_CONTEXT_HAS_LEX_ENV;\n          }\n#else /* !ENABLED (JERRY_ESNEXT) */\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-2]) == VM_CONTEXT_CATCH\n                        && !(stack_top_p[-2] & VM_CONTEXT_HAS_LEX_ENV));\n\n          stack_top_p[-2] |= VM_CONTEXT_HAS_LEX_ENV;\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          frame_ctx_p->lex_env_p = ecma_create_decl_lex_env (frame_ctx_p->lex_env_p);\n          frame_ctx_p->lex_env_p->type_flags_refs |= (uint16_t) ECMA_OBJECT_FLAG_BLOCK;\n\n          continue;\n        }\n        case VM_OC_WITH:\n        {\n          ecma_value_t value = *(--stack_top_p);\n          ecma_object_t *object_p;\n          ecma_object_t *with_env_p;\n\n          branch_offset += (int32_t) (byte_code_start_p - frame_ctx_p->byte_code_start_p);\n\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n          result = ecma_op_to_object (value);\n          ecma_free_value (value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          object_p = ecma_get_object_from_value (result);\n\n          with_env_p = ecma_create_object_lex_env (frame_ctx_p->lex_env_p,\n                                                   object_p,\n                                                   ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);\n          ecma_deref_object (object_p);\n\n          VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_WITH_CONTEXT_STACK_ALLOCATION);\n          stack_top_p += PARSER_WITH_CONTEXT_STACK_ALLOCATION;\n\n          stack_top_p[-1] = VM_CREATE_CONTEXT_WITH_ENV (VM_CONTEXT_WITH, branch_offset);\n\n          with_env_p->type_flags_refs |= (uint16_t) ECMA_OBJECT_FLAG_BLOCK;\n          frame_ctx_p->lex_env_p = with_env_p;\n          continue;\n        }\n        case VM_OC_FOR_IN_INIT:\n        {\n          ecma_value_t value = *(--stack_top_p);\n\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n          ecma_value_t expr_obj_value = ECMA_VALUE_UNDEFINED;\n          ecma_collection_t *prop_names_p = opfunc_for_in (value, &expr_obj_value);\n          ecma_free_value (value);\n\n          if (prop_names_p == NULL)\n          {\n#if ENABLED (JERRY_ESNEXT)\n            if (JERRY_UNLIKELY (ECMA_IS_VALUE_ERROR (expr_obj_value)))\n            {\n              result = expr_obj_value;\n              goto error;\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n            /* The collection is already released */\n            byte_code_p = byte_code_start_p + branch_offset;\n            continue;\n          }\n\n          branch_offset += (int32_t) (byte_code_start_p - frame_ctx_p->byte_code_start_p);\n\n          VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION);\n          stack_top_p += PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION;\n          stack_top_p[-1] = VM_CREATE_CONTEXT (VM_CONTEXT_FOR_IN, branch_offset);\n          ECMA_SET_INTERNAL_VALUE_ANY_POINTER (stack_top_p[-2], prop_names_p);\n          stack_top_p[-3] = 0;\n          stack_top_p[-4] = expr_obj_value;\n\n#if ENABLED (JERRY_ESNEXT)\n          if (byte_code_p[0] == CBC_EXT_OPCODE && byte_code_p[1] == CBC_EXT_CLONE_CONTEXT)\n          {\n            /* No need to duplicate the first context. */\n            byte_code_p += 2;\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n          continue;\n        }\n        case VM_OC_FOR_IN_GET_NEXT:\n        {\n          ecma_value_t *context_top_p = VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth;\n\n          ecma_collection_t *collection_p;\n          collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t, context_top_p[-2]);\n\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (context_top_p[-1]) == VM_CONTEXT_FOR_IN);\n\n          uint32_t index = context_top_p[-3];\n          ecma_value_t *buffer_p = collection_p->buffer_p;\n\n          *stack_top_p++ = buffer_p[index];\n          context_top_p[-3]++;\n          continue;\n        }\n        case VM_OC_FOR_IN_HAS_NEXT:\n        {\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n          ecma_collection_t *collection_p;\n          collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t, stack_top_p[-2]);\n\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FOR_IN);\n\n          ecma_value_t *buffer_p = collection_p->buffer_p;\n          ecma_object_t *object_p = ecma_get_object_from_value (stack_top_p[-4]);\n          uint32_t index = stack_top_p[-3];\n\n          while (index < collection_p->item_count)\n          {\n            ecma_string_t *prop_name_p = ecma_get_prop_name_from_value (buffer_p[index]);\n\n            result = ecma_op_object_has_property (object_p, prop_name_p);\n\n            if (ECMA_IS_VALUE_ERROR (result))\n            {\n              goto error;\n            }\n\n            if (JERRY_LIKELY (ecma_is_value_true (result)))\n            {\n              byte_code_p = byte_code_start_p + branch_offset;\n              break;\n            }\n\n            ecma_deref_ecma_string (prop_name_p);\n            index++;\n          }\n\n          if (index == collection_p->item_count)\n          {\n            ecma_deref_object (object_p);\n            ecma_collection_destroy (collection_p);\n            VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION);\n            stack_top_p -= PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION;\n          }\n          else\n          {\n            stack_top_p[-3] = index;\n          }\n          continue;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case VM_OC_FOR_OF_INIT:\n        {\n          ecma_value_t value = *(--stack_top_p);\n\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n          ecma_value_t next_method;\n          ecma_value_t iterator = ecma_op_get_iterator (value, ECMA_VALUE_SYNC_ITERATOR, &next_method);\n\n          ecma_free_value (value);\n\n          if (ECMA_IS_VALUE_ERROR (iterator))\n          {\n            result = iterator;\n            goto error;\n          }\n\n          result = ecma_op_iterator_step (iterator, next_method);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            ecma_free_value (iterator);\n            ecma_free_value (next_method);\n            goto error;\n          }\n\n          if (ecma_is_value_false (result))\n          {\n            ecma_free_value (iterator);\n            ecma_free_value (next_method);\n            byte_code_p = byte_code_start_p + branch_offset;\n            continue;\n          }\n\n          ecma_value_t next_value = ecma_op_iterator_value (result);\n          ecma_free_value (result);\n\n          if (ECMA_IS_VALUE_ERROR (next_value))\n          {\n            result = next_value;\n            ecma_free_value (iterator);\n            ecma_free_value (next_method);\n            goto error;\n          }\n\n          branch_offset += (int32_t) (byte_code_start_p - frame_ctx_p->byte_code_start_p);\n\n          VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION);\n          stack_top_p += PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION;\n          stack_top_p[-1] = VM_CREATE_CONTEXT (VM_CONTEXT_FOR_OF, branch_offset) | VM_CONTEXT_CLOSE_ITERATOR;\n          stack_top_p[-2] = next_value;\n          stack_top_p[-3] = iterator;\n          stack_top_p[-4] = next_method;\n\n          if (byte_code_p[0] == CBC_EXT_OPCODE && byte_code_p[1] == CBC_EXT_CLONE_CONTEXT)\n          {\n            /* No need to duplicate the first context. */\n            byte_code_p += 2;\n          }\n          continue;\n        }\n        case VM_OC_FOR_OF_GET_NEXT:\n        {\n          ecma_value_t *context_top_p = VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth;\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (context_top_p[-1]) == VM_CONTEXT_FOR_OF\n                        || VM_GET_CONTEXT_TYPE (context_top_p[-1]) == VM_CONTEXT_FOR_AWAIT_OF);\n          JERRY_ASSERT (context_top_p[-1] & VM_CONTEXT_CLOSE_ITERATOR);\n\n          *stack_top_p++ = context_top_p[-2];\n          context_top_p[-2] = ECMA_VALUE_UNDEFINED;\n          continue;\n        }\n        case VM_OC_FOR_OF_HAS_NEXT:\n        {\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FOR_OF);\n          JERRY_ASSERT (stack_top_p[-1] & VM_CONTEXT_CLOSE_ITERATOR);\n\n          stack_top_p[-1] &= (uint32_t) ~VM_CONTEXT_CLOSE_ITERATOR;\n          result = ecma_op_iterator_step (stack_top_p[-3], stack_top_p[-4]);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          if (ecma_is_value_false (result))\n          {\n            ecma_free_value (stack_top_p[-2]);\n            ecma_free_value (stack_top_p[-3]);\n            ecma_free_value (stack_top_p[-4]);\n            VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION);\n            stack_top_p -= PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION;\n            continue;\n          }\n\n          ecma_value_t next_value = ecma_op_iterator_value (result);\n          ecma_free_value (result);\n\n          if (ECMA_IS_VALUE_ERROR (next_value))\n          {\n            result = next_value;\n            goto error;\n          }\n\n          JERRY_ASSERT (stack_top_p[-2] == ECMA_VALUE_UNDEFINED);\n          stack_top_p[-1] |= VM_CONTEXT_CLOSE_ITERATOR;\n          stack_top_p[-2] = next_value;\n          byte_code_p = byte_code_start_p + branch_offset;\n          continue;\n        }\n        case VM_OC_FOR_AWAIT_OF_INIT:\n        {\n          ecma_value_t value = *(--stack_top_p);\n\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n          ecma_value_t next_method;\n          result = ecma_op_get_iterator (value, ECMA_VALUE_ASYNC_ITERATOR, &next_method);\n\n          ecma_free_value (value);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          ecma_value_t iterator = result;\n          result = ecma_op_iterator_next (result, next_method, ECMA_VALUE_EMPTY);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            ecma_free_value (iterator);\n            ecma_free_value (next_method);\n            goto error;\n          }\n\n          branch_offset += (int32_t) (byte_code_start_p - frame_ctx_p->byte_code_start_p);\n\n          VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION);\n          stack_top_p += PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION;\n          stack_top_p[-1] = VM_CREATE_CONTEXT (VM_CONTEXT_FOR_AWAIT_OF, branch_offset);\n          stack_top_p[-2] = ECMA_VALUE_UNDEFINED;\n          stack_top_p[-3] = iterator;\n          stack_top_p[-4] = next_method;\n\n          if (byte_code_p[0] == CBC_EXT_OPCODE && byte_code_p[1] == CBC_EXT_CLONE_CONTEXT)\n          {\n            /* No need to duplicate the first context. */\n            byte_code_p += 2;\n          }\n\n          frame_ctx_p->call_operation = VM_EXEC_RETURN;\n          frame_ctx_p->byte_code_p = byte_code_p;\n          frame_ctx_p->stack_top_p = stack_top_p;\n\n          uint16_t extra_flags = (ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD\n                                 | (ECMA_AWAIT_FOR_NEXT << ECMA_AWAIT_STATE_SHIFT));\n\n          if (CBC_FUNCTION_GET_TYPE (bytecode_header_p->status_flags) == CBC_FUNCTION_ASYNC_GENERATOR\n              || frame_ctx_p->block_result != ECMA_VALUE_UNDEFINED)\n          {\n            ecma_extended_object_t *executable_object_p = VM_GET_EXECUTABLE_OBJECT (frame_ctx_p);\n            result = ecma_promise_async_await (executable_object_p, result);\n\n            if (ECMA_IS_VALUE_ERROR (result))\n            {\n              goto error;\n            }\n\n            executable_object_p->u.class_prop.extra_info |= extra_flags;\n            return ECMA_VALUE_UNDEFINED;\n          }\n\n          result = opfunc_async_create_and_await (frame_ctx_p, result, extra_flags);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n          return result;\n        }\n        case VM_OC_FOR_AWAIT_OF_HAS_NEXT:\n        {\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FOR_AWAIT_OF);\n          JERRY_ASSERT (stack_top_p[-1] & VM_CONTEXT_CLOSE_ITERATOR);\n\n          stack_top_p[-1] &= (uint32_t) ~VM_CONTEXT_CLOSE_ITERATOR;\n          result = ecma_op_iterator_next (stack_top_p[-3], stack_top_p[-4], ECMA_VALUE_EMPTY);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          ecma_extended_object_t *executable_object_p = VM_GET_EXECUTABLE_OBJECT (frame_ctx_p);\n          result = ecma_promise_async_await (executable_object_p, result);\n\n          if (ECMA_IS_VALUE_ERROR (result))\n          {\n            goto error;\n          }\n\n          uint16_t extra_flags = (ECMA_EXECUTABLE_OBJECT_DO_AWAIT_OR_YIELD\n                                 | (ECMA_AWAIT_FOR_NEXT << ECMA_AWAIT_STATE_SHIFT));\n          executable_object_p->u.class_prop.extra_info |= extra_flags;\n\n          frame_ctx_p->call_operation = VM_EXEC_RETURN;\n          frame_ctx_p->byte_code_p = byte_code_start_p + branch_offset;\n          frame_ctx_p->stack_top_p = stack_top_p;\n          return ECMA_VALUE_UNDEFINED;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        case VM_OC_TRY:\n        {\n          /* Try opcode simply creates the try context. */\n          branch_offset += (int32_t) (byte_code_start_p - frame_ctx_p->byte_code_start_p);\n\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n          VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_TRY_CONTEXT_STACK_ALLOCATION);\n          stack_top_p += PARSER_TRY_CONTEXT_STACK_ALLOCATION;\n\n          stack_top_p[-1] = VM_CREATE_CONTEXT (VM_CONTEXT_TRY, branch_offset);\n          continue;\n        }\n        case VM_OC_CATCH:\n        {\n          /* Catches are ignored and turned to jumps. */\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_TRY);\n\n          byte_code_p = byte_code_start_p + branch_offset;\n          continue;\n        }\n        case VM_OC_FINALLY:\n        {\n          branch_offset += (int32_t) (byte_code_start_p - frame_ctx_p->byte_code_start_p);\n\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_TRY\n                        || VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_CATCH);\n\n          if (stack_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV)\n          {\n            ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n            JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n            frame_ctx_p->lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n            ecma_deref_object (lex_env_p);\n          }\n\n          VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FINALLY_CONTEXT_EXTRA_STACK_ALLOCATION);\n          stack_top_p += PARSER_FINALLY_CONTEXT_EXTRA_STACK_ALLOCATION;\n\n          stack_top_p[-1] = VM_CREATE_CONTEXT (VM_CONTEXT_FINALLY_JUMP, branch_offset);\n          stack_top_p[-2] = (ecma_value_t) branch_offset;\n          continue;\n        }\n        case VM_OC_CONTEXT_END:\n        {\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n          JERRY_ASSERT (!(stack_top_p[-1] & VM_CONTEXT_CLOSE_ITERATOR));\n\n          ecma_value_t context_type = VM_GET_CONTEXT_TYPE (stack_top_p[-1]);\n\n          if (!VM_CONTEXT_IS_FINALLY (context_type))\n          {\n            stack_top_p = vm_stack_context_abort (frame_ctx_p, stack_top_p);\n\n            JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n            continue;\n          }\n\n#if ENABLED (JERRY_ESNEXT)\n          if (stack_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV)\n          {\n            ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;\n            JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);\n            frame_ctx_p->lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);\n            ecma_deref_object (lex_env_p);\n          }\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n          VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth,\n                              PARSER_FINALLY_CONTEXT_STACK_ALLOCATION);\n          stack_top_p -= PARSER_FINALLY_CONTEXT_STACK_ALLOCATION;\n\n          if (context_type == VM_CONTEXT_FINALLY_RETURN)\n          {\n            result = *stack_top_p;\n            goto error;\n          }\n\n          if (context_type == VM_CONTEXT_FINALLY_THROW)\n          {\n            jcontext_raise_exception (*stack_top_p);\n            result = ECMA_VALUE_ERROR;\n\n#if ENABLED (JERRY_DEBUGGER)\n            JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_EXCEPTION_THROWN);\n#endif /* ENABLED (JERRY_DEBUGGER) */\n            goto error;\n          }\n\n          JERRY_ASSERT (context_type == VM_CONTEXT_FINALLY_JUMP);\n\n          uint32_t jump_target = *stack_top_p;\n\n          vm_stack_found_type type = vm_stack_find_finally (frame_ctx_p,\n                                                            stack_top_p,\n                                                            VM_CONTEXT_FINALLY_JUMP,\n                                                            jump_target);\n          stack_top_p = frame_ctx_p->stack_top_p;\n          switch (type)\n          {\n            case VM_CONTEXT_FOUND_FINALLY:\n            {\n              byte_code_p = frame_ctx_p->byte_code_p;\n\n              JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FINALLY_JUMP);\n              stack_top_p[-2] = jump_target;\n              break;\n            }\n#if ENABLED (JERRY_ESNEXT)\n            case VM_CONTEXT_FOUND_ERROR:\n            {\n              JERRY_ASSERT (jcontext_has_pending_exception ());\n              result = ECMA_VALUE_ERROR;\n              goto error;\n            }\n            case VM_CONTEXT_FOUND_AWAIT:\n            {\n              JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FINALLY_JUMP);\n              stack_top_p[-2] = jump_target;\n              return ECMA_VALUE_UNDEFINED;\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n            default:\n            {\n              byte_code_p = frame_ctx_p->byte_code_start_p + jump_target;\n              break;\n            }\n          }\n\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n          continue;\n        }\n        case VM_OC_JUMP_AND_EXIT_CONTEXT:\n        {\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n          JERRY_ASSERT (!jcontext_has_pending_exception ());\n\n          branch_offset += (int32_t) (byte_code_start_p - frame_ctx_p->byte_code_start_p);\n\n          vm_stack_found_type type = vm_stack_find_finally (frame_ctx_p,\n                                                            stack_top_p,\n                                                            VM_CONTEXT_FINALLY_JUMP,\n                                                            (uint32_t) branch_offset);\n          stack_top_p = frame_ctx_p->stack_top_p;\n          switch (type)\n          {\n            case VM_CONTEXT_FOUND_FINALLY:\n            {\n              byte_code_p = frame_ctx_p->byte_code_p;\n\n              JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FINALLY_JUMP);\n              stack_top_p[-2] = (uint32_t) branch_offset;\n              break;\n            }\n#if ENABLED (JERRY_ESNEXT)\n            case VM_CONTEXT_FOUND_ERROR:\n            {\n              JERRY_ASSERT (jcontext_has_pending_exception ());\n              result = ECMA_VALUE_ERROR;\n              goto error;\n            }\n            case VM_CONTEXT_FOUND_AWAIT:\n            {\n              JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FINALLY_JUMP);\n              stack_top_p[-2] = (uint32_t) branch_offset;\n              return ECMA_VALUE_UNDEFINED;\n            }\n#endif /* ENABLED (JERRY_ESNEXT) */\n            default:\n            {\n              byte_code_p = frame_ctx_p->byte_code_start_p + branch_offset;\n              break;\n            }\n          }\n\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n          continue;\n        }\n#if ENABLED (JERRY_DEBUGGER)\n        case VM_OC_BREAKPOINT_ENABLED:\n        {\n          if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_IGNORE)\n          {\n            continue;\n          }\n\n          JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n          JERRY_ASSERT (!(frame_ctx_p->shared_p->bytecode_header_p->status_flags & CBC_CODE_FLAGS_DEBUGGER_IGNORE));\n\n          frame_ctx_p->byte_code_p = byte_code_start_p;\n\n          jerry_debugger_breakpoint_hit (JERRY_DEBUGGER_BREAKPOINT_HIT);\n          if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_EXCEPTION_THROWN)\n          {\n            result = ECMA_VALUE_ERROR;\n            goto error;\n          }\n          continue;\n        }\n        case VM_OC_BREAKPOINT_DISABLED:\n        {\n          if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_IGNORE)\n          {\n            continue;\n          }\n\n          JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED);\n\n          JERRY_ASSERT (!(frame_ctx_p->shared_p->bytecode_header_p->status_flags & CBC_CODE_FLAGS_DEBUGGER_IGNORE));\n\n          frame_ctx_p->byte_code_p = byte_code_start_p;\n\n          if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_STOP)\n              && (JERRY_CONTEXT (debugger_stop_context) == NULL\n                  || JERRY_CONTEXT (debugger_stop_context) == JERRY_CONTEXT (vm_top_context_p)))\n          {\n            jerry_debugger_breakpoint_hit (JERRY_DEBUGGER_BREAKPOINT_HIT);\n            if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_EXCEPTION_THROWN)\n            {\n              result = ECMA_VALUE_ERROR;\n              goto error;\n            }\n            continue;\n          }\n\n          if (JERRY_CONTEXT (debugger_message_delay) > 0)\n          {\n            JERRY_CONTEXT (debugger_message_delay)--;\n            continue;\n          }\n\n          JERRY_CONTEXT (debugger_message_delay) = JERRY_DEBUGGER_MESSAGE_FREQUENCY;\n\n          if (jerry_debugger_receive (NULL))\n          {\n            continue;\n          }\n\n          if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_STOP)\n              && (JERRY_CONTEXT (debugger_stop_context) == NULL\n                  || JERRY_CONTEXT (debugger_stop_context) == JERRY_CONTEXT (vm_top_context_p)))\n          {\n            jerry_debugger_breakpoint_hit (JERRY_DEBUGGER_BREAKPOINT_HIT);\n            if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_EXCEPTION_THROWN)\n            {\n              result = ECMA_VALUE_ERROR;\n              goto error;\n            }\n          }\n          continue;\n        }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n#if ENABLED (JERRY_LINE_INFO)\n        case VM_OC_LINE:\n        {\n          uint32_t value = 0;\n          uint8_t byte;\n\n          do\n          {\n            byte = *byte_code_p++;\n            value = (value << 7) | (byte & CBC_LOWER_SEVEN_BIT_MASK);\n          }\n          while (byte & CBC_HIGHEST_BIT_MASK);\n\n          frame_ctx_p->current_line = value;\n          continue;\n        }\n#endif /* ENABLED (JERRY_LINE_INFO) */\n        case VM_OC_NONE:\n        default:\n        {\n          JERRY_ASSERT (VM_OC_GROUP_GET_INDEX (opcode_data) == VM_OC_NONE);\n\n          jerry_fatal (ERR_DISABLED_BYTE_CODE);\n        }\n      }\n\n      JERRY_ASSERT (VM_OC_HAS_PUT_RESULT (opcode_data));\n\n      if (opcode_data & VM_OC_PUT_IDENT)\n      {\n        uint16_t literal_index;\n\n        READ_LITERAL_INDEX (literal_index);\n\n        if (literal_index < register_end)\n        {\n          ecma_fast_free_value (VM_GET_REGISTER (frame_ctx_p, literal_index));\n          VM_GET_REGISTER (frame_ctx_p, literal_index) = result;\n\n          if (opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK))\n          {\n            result = ecma_fast_copy_value (result);\n          }\n        }\n        else\n        {\n          ecma_string_t *var_name_str_p = ecma_get_string_from_value (literal_start_p[literal_index]);\n\n          ecma_value_t put_value_result = ecma_op_put_value_lex_env_base (frame_ctx_p->lex_env_p,\n                                                                          var_name_str_p,\n                                                                          is_strict,\n                                                                          result);\n\n          if (ECMA_IS_VALUE_ERROR (put_value_result))\n          {\n            ecma_free_value (result);\n            result = put_value_result;\n            goto error;\n          }\n\n          if (!(opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK)))\n          {\n            ecma_fast_free_value (result);\n          }\n        }\n      }\n      else if (opcode_data & VM_OC_PUT_REFERENCE)\n      {\n        ecma_value_t property = *(--stack_top_p);\n        ecma_value_t base = *(--stack_top_p);\n\n        if (base == ECMA_VALUE_REGISTER_REF)\n        {\n          property = (ecma_value_t) ecma_get_integer_from_value (property);\n          ecma_fast_free_value (VM_GET_REGISTER (frame_ctx_p, property));\n          VM_GET_REGISTER (frame_ctx_p, property) = result;\n\n          if (!(opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK)))\n          {\n            goto free_both_values;\n          }\n          result = ecma_fast_copy_value (result);\n        }\n        else\n        {\n          ecma_value_t set_value_result = vm_op_set_value (base,\n                                                           property,\n                                                           result,\n                                                           is_strict);\n\n          if (ECMA_IS_VALUE_ERROR (set_value_result))\n          {\n            ecma_free_value (result);\n            result = set_value_result;\n            goto error;\n          }\n\n          if (!(opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK)))\n          {\n            ecma_fast_free_value (result);\n            goto free_both_values;\n          }\n        }\n      }\n\n      if (opcode_data & VM_OC_PUT_STACK)\n      {\n        *stack_top_p++ = result;\n      }\n      else if (opcode_data & VM_OC_PUT_BLOCK)\n      {\n        ecma_fast_free_value (frame_ctx_p->block_result);\n        frame_ctx_p->block_result = result;\n      }\n\nfree_both_values:\n      ecma_fast_free_value (right_value);\nfree_left_value:\n      ecma_fast_free_value (left_value);\n    }\n\nerror:\n    ecma_fast_free_value (left_value);\n    ecma_fast_free_value (right_value);\n\n    if (ECMA_IS_VALUE_ERROR (result))\n    {\n      JERRY_ASSERT (jcontext_has_pending_exception ());\n      ecma_value_t *stack_bottom_p = VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth;\n\n      while (stack_top_p > stack_bottom_p)\n      {\n        ecma_value_t stack_item = *(--stack_top_p);\n#if ENABLED (JERRY_ESNEXT)\n        if (stack_item == ECMA_VALUE_RELEASE_LEX_ENV)\n        {\n          opfunc_pop_lexical_environment (frame_ctx_p);\n          continue;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        ecma_fast_free_value (stack_item);\n      }\n\n#if ENABLED (JERRY_DEBUGGER)\n      const uint32_t dont_stop = (JERRY_DEBUGGER_VM_IGNORE_EXCEPTION\n                                  | JERRY_DEBUGGER_VM_IGNORE\n                                  | JERRY_DEBUGGER_VM_EXCEPTION_THROWN);\n\n      if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)\n          && !(frame_ctx_p->shared_p->bytecode_header_p->status_flags\n               & (CBC_CODE_FLAGS_DEBUGGER_IGNORE | CBC_CODE_FLAGS_STATIC_FUNCTION))\n          && !(JERRY_CONTEXT (debugger_flags) & dont_stop))\n      {\n        /* Save the error to a local value, because the engine enters breakpoint mode after,\n           therefore an evaluation error, or user-created error throw would overwrite it. */\n        ecma_value_t current_error_value = JERRY_CONTEXT (error_value);\n\n        if (jerry_debugger_send_exception_string (current_error_value))\n        {\n          jerry_debugger_breakpoint_hit (JERRY_DEBUGGER_EXCEPTION_HIT);\n\n          if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_EXCEPTION_THROWN)\n          {\n            ecma_free_value (current_error_value);\n          }\n          else\n          {\n            JERRY_CONTEXT (error_value) = current_error_value;\n          }\n\n          JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_EXCEPTION_THROWN);\n        }\n      }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n    }\n\n    JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n    if (frame_ctx_p->context_depth == 0)\n    {\n      /* In most cases there is no context. */\n      ecma_fast_free_value (frame_ctx_p->block_result);\n      frame_ctx_p->call_operation = VM_NO_EXEC_OP;\n      return result;\n    }\n\n    if (!ECMA_IS_VALUE_ERROR (result))\n    {\n      switch (vm_stack_find_finally (frame_ctx_p,\n                                     stack_top_p,\n                                     VM_CONTEXT_FINALLY_RETURN,\n                                     0))\n      {\n        case VM_CONTEXT_FOUND_FINALLY:\n        {\n          stack_top_p = frame_ctx_p->stack_top_p;\n          byte_code_p = frame_ctx_p->byte_code_p;\n\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FINALLY_RETURN);\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n          stack_top_p[-2] = result;\n          continue;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case VM_CONTEXT_FOUND_ERROR:\n        {\n          JERRY_ASSERT (jcontext_has_pending_exception ());\n\n          ecma_free_value (result);\n          stack_top_p = frame_ctx_p->stack_top_p;\n          result = ECMA_VALUE_ERROR;\n          break;\n        }\n        case VM_CONTEXT_FOUND_AWAIT:\n        {\n          stack_top_p = frame_ctx_p->stack_top_p;\n\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FINALLY_RETURN);\n          stack_top_p[-2] = result;\n          return ECMA_VALUE_UNDEFINED;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        default:\n        {\n          goto finish;\n        }\n      }\n    }\n\n    JERRY_ASSERT (jcontext_has_pending_exception ());\n\n    if (!jcontext_has_pending_abort ())\n    {\n      switch (vm_stack_find_finally (frame_ctx_p,\n                                     stack_top_p,\n                                     VM_CONTEXT_FINALLY_THROW,\n                                     0))\n      {\n        case VM_CONTEXT_FOUND_FINALLY:\n        {\n          stack_top_p = frame_ctx_p->stack_top_p;\n          byte_code_p = frame_ctx_p->byte_code_p;\n\n          JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n          JERRY_ASSERT (!(stack_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV));\n\n#if ENABLED (JERRY_DEBUGGER)\n          JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_EXCEPTION_THROWN);\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n          result = jcontext_take_exception ();\n\n          if (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_FINALLY_THROW)\n          {\n            stack_top_p[-2] = result;\n            continue;\n          }\n\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-1]) == VM_CONTEXT_CATCH);\n\n          *stack_top_p++ = result;\n          continue;\n        }\n#if ENABLED (JERRY_ESNEXT)\n        case VM_CONTEXT_FOUND_AWAIT:\n        {\n          JERRY_ASSERT (VM_GET_CONTEXT_TYPE (frame_ctx_p->stack_top_p[-1]) == VM_CONTEXT_FINALLY_THROW);\n          return ECMA_VALUE_UNDEFINED;\n        }\n#endif /* ENABLED (JERRY_ESNEXT) */\n        default:\n        {\n          break;\n        }\n      }\n    }\n    else\n    {\n      do\n      {\n        JERRY_ASSERT (VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth == stack_top_p);\n\n        stack_top_p = vm_stack_context_abort (frame_ctx_p, stack_top_p);\n      }\n      while (frame_ctx_p->context_depth > 0);\n    }\n\nfinish:\n    ecma_free_value (frame_ctx_p->block_result);\n    frame_ctx_p->call_operation = VM_NO_EXEC_OP;\n    return result;\n  }\n} /* vm_loop */\n\n#undef READ_LITERAL\n#undef READ_LITERAL_INDEX\n\nJERRY_STATIC_ASSERT ((int) VM_FRAME_CTX_SHARED_DIRECT_EVAL == (int) VM_FRAME_CTX_DIRECT_EVAL,\n                     vm_frame_ctx_shared_direct_eval_must_be_equal_to_frame_ctx_direct_eval);\n\nJERRY_STATIC_ASSERT ((int) CBC_CODE_FLAGS_STRICT_MODE == (int) VM_FRAME_CTX_IS_STRICT,\n                     cbc_code_flags_strict_mode_must_be_equal_to_vm_frame_ctx_is_strict);\n\n/**\n * Initialize code block execution\n *\n * @return ECMA_VALUE_ERROR - if the initialization fails\n *         ECMA_VALUE_EMPTY - otherwise\n */\nstatic void JERRY_ATTR_NOINLINE\nvm_init_exec (vm_frame_ctx_t *frame_ctx_p) /**< frame context */\n{\n  vm_frame_ctx_shared_t *shared_p = frame_ctx_p->shared_p;\n  const ecma_compiled_code_t *bytecode_header_p = shared_p->bytecode_header_p;\n\n  frame_ctx_p->prev_context_p = JERRY_CONTEXT (vm_top_context_p);\n  frame_ctx_p->block_result = ECMA_VALUE_UNDEFINED;\n#if ENABLED (JERRY_LINE_INFO)\n  frame_ctx_p->current_line = 0;\n#endif /* ENABLED (JERRY_LINE_INFO) */\n  frame_ctx_p->context_depth = 0;\n  frame_ctx_p->status_flags = (uint8_t) ((shared_p->status_flags & VM_FRAME_CTX_DIRECT_EVAL)\n                                         | (bytecode_header_p->status_flags & VM_FRAME_CTX_IS_STRICT));\n\n  uint16_t argument_end, register_end;\n  ecma_value_t *literal_p;\n\n  if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_header_p;\n\n    argument_end = args_p->argument_end;\n    register_end = args_p->register_end;\n\n    literal_p = (ecma_value_t *) (args_p + 1);\n    literal_p -= register_end;\n    frame_ctx_p->literal_start_p = literal_p;\n    literal_p += args_p->literal_end;\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_header_p;\n\n    argument_end = args_p->argument_end;\n    register_end = args_p->register_end;\n\n    literal_p = (ecma_value_t *) (args_p + 1);\n    literal_p -= register_end;\n    frame_ctx_p->literal_start_p = literal_p;\n    literal_p += args_p->literal_end;\n  }\n\n  frame_ctx_p->byte_code_p = (uint8_t *) literal_p;\n  frame_ctx_p->byte_code_start_p = (uint8_t *) literal_p;\n  frame_ctx_p->stack_top_p = VM_GET_REGISTERS (frame_ctx_p) + register_end;\n\n  uint32_t arg_list_len = 0;\n\n  if (argument_end > 0)\n  {\n    JERRY_ASSERT (shared_p->status_flags & VM_FRAME_CTX_SHARED_HAS_ARG_LIST);\n\n    const ecma_value_t *arg_list_p = ((vm_frame_ctx_shared_args_t *) shared_p)->arg_list_p;\n    arg_list_len = ((vm_frame_ctx_shared_args_t *) shared_p)->arg_list_len;\n\n    if (arg_list_len > argument_end)\n    {\n      arg_list_len = argument_end;\n    }\n\n    for (uint32_t i = 0; i < arg_list_len; i++)\n    {\n      VM_GET_REGISTER (frame_ctx_p, i) = ecma_fast_copy_value (arg_list_p[i]);\n    }\n  }\n\n  /* The arg_list_len contains the end of the copied arguments.\n   * Fill everything else with undefined. */\n  if (register_end > arg_list_len)\n  {\n    ecma_value_t *stack_p = VM_GET_REGISTERS (frame_ctx_p) + arg_list_len;\n\n    for (uint32_t i = arg_list_len; i < register_end; i++)\n    {\n      *stack_p++ = ECMA_VALUE_UNDEFINED;\n    }\n  }\n\n  JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_DIRECT_EVAL;\n  JERRY_CONTEXT (vm_top_context_p) = frame_ctx_p;\n} /* vm_init_exec */\n\n/**\n * Resume execution of a code block.\n *\n * @return ecma value\n */\necma_value_t JERRY_ATTR_NOINLINE\nvm_execute (vm_frame_ctx_t *frame_ctx_p) /**< frame context */\n{\n  while (true)\n  {\n    ecma_value_t completion_value = vm_loop (frame_ctx_p);\n\n    switch (frame_ctx_p->call_operation)\n    {\n      case VM_EXEC_CALL:\n      {\n        opfunc_call (frame_ctx_p);\n        break;\n      }\n#if ENABLED (JERRY_ESNEXT)\n      case VM_EXEC_SUPER_CALL:\n      {\n        vm_super_call (frame_ctx_p);\n        break;\n      }\n      case VM_EXEC_SPREAD_OP:\n      {\n        vm_spread_operation (frame_ctx_p);\n        break;\n      }\n      case VM_EXEC_RETURN:\n      {\n        return completion_value;\n      }\n#endif /* ENABLED (JERRY_ESNEXT) */\n      case VM_EXEC_CONSTRUCT:\n      {\n        opfunc_construct (frame_ctx_p);\n        break;\n      }\n      default:\n      {\n        JERRY_ASSERT (frame_ctx_p->call_operation == VM_NO_EXEC_OP);\n\n        const ecma_compiled_code_t *bytecode_header_p = frame_ctx_p->shared_p->bytecode_header_p;\n        uint32_t register_end;\n\n        if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n        {\n          register_end = ((cbc_uint16_arguments_t *) bytecode_header_p)->register_end;\n        }\n        else\n        {\n          register_end = ((cbc_uint8_arguments_t *) bytecode_header_p)->register_end;\n        }\n\n        /* Free arguments and registers */\n        ecma_value_t *registers_p = VM_GET_REGISTERS (frame_ctx_p);\n        for (uint32_t i = 0; i < register_end; i++)\n        {\n          ecma_fast_free_value (registers_p[i]);\n        }\n\n#if ENABLED (JERRY_DEBUGGER)\n        if (JERRY_CONTEXT (debugger_stop_context) == JERRY_CONTEXT (vm_top_context_p))\n        {\n          /* The engine will stop when the next breakpoint is reached. */\n          JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_STOP);\n          JERRY_CONTEXT (debugger_stop_context) = NULL;\n        }\n#endif /* ENABLED (JERRY_DEBUGGER) */\n\n        JERRY_CONTEXT (vm_top_context_p) = frame_ctx_p->prev_context_p;\n        return completion_value;\n      }\n    }\n  }\n} /* vm_execute */\n\n/**\n * Run the code.\n *\n * @return ecma value\n */\necma_value_t\nvm_run (vm_frame_ctx_shared_t *shared_p, /**< shared data */\n        ecma_value_t this_binding_value, /**< value of 'ThisBinding' */\n        ecma_object_t *lex_env_p) /**< lexical environment to use */\n{\n  const ecma_compiled_code_t *bytecode_header_p = shared_p->bytecode_header_p;\n  vm_frame_ctx_t *frame_ctx_p;\n  size_t frame_size;\n\n  if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)\n  {\n    cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_header_p;\n    frame_size = (size_t) (args_p->register_end + args_p->stack_limit);\n  }\n  else\n  {\n    cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_header_p;\n    frame_size = (size_t) (args_p->register_end + args_p->stack_limit);\n  }\n\n  frame_size = frame_size * sizeof (ecma_value_t) + sizeof (vm_frame_ctx_t);\n  frame_size = (frame_size + sizeof (uintptr_t) - 1) / sizeof (uintptr_t);\n\n  /* Use JERRY_MAX() to avoid array declaration with size 0. */\n  JERRY_VLA (uintptr_t, stack, frame_size);\n\n  frame_ctx_p = (vm_frame_ctx_t *) stack;\n\n  frame_ctx_p->shared_p = shared_p;\n  frame_ctx_p->lex_env_p = lex_env_p;\n  frame_ctx_p->this_binding = this_binding_value;\n\n  vm_init_exec (frame_ctx_p);\n  return vm_execute (frame_ctx_p);\n} /* vm_run */\n\n/**\n * @}\n * @}\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-core/vm/vm.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef VM_H\n#define VM_H\n\n#include \"ecma-globals.h\"\n#include \"ecma-module.h\"\n#include \"jrt.h\"\n#include \"vm-defines.h\"\n\n/** \\addtogroup vm Virtual machine\n * @{\n *\n * \\addtogroup vm_executor Executor\n * @{\n */\n\n/**\n * Each CBC opcode is transformed to three vm opcodes:\n *\n *  - first opcode is a \"get arguments\" opcode which specifies\n *    the type (register, literal, stack, etc.) and number\n *    (from 0 to 2) of input arguments\n *  - second opcode is a \"group\" opcode which specifies\n *    the actual operation (add, increment, call, etc.)\n *  - third opcode is a \"put result\" opcode which specifies\n *    the destination where the result is stored (register,\n *    stack, etc.)\n */\n\n/**\n * If VM_OC_GET_ARGS_INDEX(opcode) == VM_OC_GET_BRANCH,\n * this flag signals that the branch is a backward branch.\n */\n#define VM_OC_BACKWARD_BRANCH (1 << 15)\n\n/**\n * Position of \"get arguments\" opcode.\n */\n#define VM_OC_GET_ARGS_SHIFT 8\n\n/**\n * Mask of \"get arguments\" opcode.\n */\n#define VM_OC_GET_ARGS_MASK 0x7\n\n/**\n * Generate the binary representation of a \"get arguments\" opcode.\n */\n#define VM_OC_GET_ARGS_CREATE_INDEX(V) (((V) & VM_OC_GET_ARGS_MASK) << VM_OC_GET_ARGS_SHIFT)\n\n/**\n * Extract the \"get arguments\" opcode.\n */\n#define VM_OC_GET_ARGS_INDEX(O) ((O) & (VM_OC_GET_ARGS_MASK << VM_OC_GET_ARGS_SHIFT))\n\n/**\n * Checks whether the result is stored somewhere.\n */\n#define VM_OC_HAS_GET_ARGS(V) ((V) & (VM_OC_GET_ARGS_MASK << VM_OC_GET_ARGS_SHIFT))\n\n/**\n * Argument getters that are part of the opcodes.\n */\ntypedef enum\n{\n  VM_OC_GET_NONE = VM_OC_GET_ARGS_CREATE_INDEX (0),             /**< do nothing */\n  VM_OC_GET_BRANCH = VM_OC_GET_ARGS_CREATE_INDEX (1),           /**< branch argument */\n  VM_OC_GET_STACK = VM_OC_GET_ARGS_CREATE_INDEX (2),            /**< pop one element from the stack */\n  VM_OC_GET_STACK_STACK = VM_OC_GET_ARGS_CREATE_INDEX (3),      /**< pop two elements from the stack */\n\n  VM_OC_GET_LITERAL = VM_OC_GET_ARGS_CREATE_INDEX (4),          /**< resolve literal */\n  VM_OC_GET_LITERAL_LITERAL = VM_OC_GET_ARGS_CREATE_INDEX (5),  /**< resolve two literals */\n  VM_OC_GET_STACK_LITERAL = VM_OC_GET_ARGS_CREATE_INDEX (6),    /**< pop one element from the stack\n                                                                 *   and resolve a literal */\n  VM_OC_GET_THIS_LITERAL = VM_OC_GET_ARGS_CREATE_INDEX (7),     /**< get this and resolve a literal */\n} vm_oc_get_types;\n\n/**\n * Mask of \"group\" opcode.\n */\n#define VM_OC_GROUP_MASK 0xff\n\n/**\n * Extract the \"group\" opcode.\n */\n#define VM_OC_GROUP_GET_INDEX(O) ((O) & VM_OC_GROUP_MASK)\n\n/**\n * Opcodes.\n */\ntypedef enum\n{\n  VM_OC_POP,                     /**< pop from stack */\n  VM_OC_POP_BLOCK,               /**< pop block */\n  VM_OC_PUSH,                    /**< push one literal  */\n  VM_OC_PUSH_TWO,                /**< push two literals */\n  VM_OC_PUSH_THREE,              /**< push three literals */\n  VM_OC_PUSH_UNDEFINED,          /**< push undefined value */\n  VM_OC_PUSH_TRUE,               /**< push true value */\n  VM_OC_PUSH_FALSE,              /**< push false value */\n  VM_OC_PUSH_NULL,               /**< push null value */\n  VM_OC_PUSH_THIS,               /**< push this */\n  VM_OC_PUSH_0,                  /**< push number zero */\n  VM_OC_PUSH_POS_BYTE,           /**< push number between 1 and 256 */\n  VM_OC_PUSH_NEG_BYTE,           /**< push number between -1 and -256 */\n  VM_OC_PUSH_LIT_0,              /**< push literal and number zero */\n  VM_OC_PUSH_LIT_POS_BYTE,       /**< push literal and number between 1 and 256 */\n  VM_OC_PUSH_LIT_NEG_BYTE,       /**< push literal and number between -1 and -256 */\n  VM_OC_PUSH_OBJECT,             /**< push object */\n  VM_OC_PUSH_NAMED_FUNC_EXPR,    /**< push named function expression */\n  VM_OC_SET_PROPERTY,            /**< set property */\n\n  VM_OC_SET_GETTER,              /**< set getter */\n  VM_OC_SET_SETTER,              /**< set setter */\n  VM_OC_PUSH_ARRAY,              /**< push array */\n  VM_OC_PUSH_ELISON,             /**< push elison */\n  VM_OC_APPEND_ARRAY,            /**< append array */\n  VM_OC_IDENT_REFERENCE,         /**< ident reference */\n  VM_OC_PROP_REFERENCE,          /**< prop reference */\n  VM_OC_PROP_GET,                /**< prop get */\n\n  /* These eight opcodes must be in this order. */\n  VM_OC_PROP_PRE_INCR,           /**< prefix increment of a property */\n  VM_OC_PROP_PRE_DECR,           /**< prop prefix decrement of a property */\n  VM_OC_PROP_POST_INCR,          /**< prop postfix increment of a property */\n  VM_OC_PROP_POST_DECR,          /**< prop postfix decrement of a property */\n  VM_OC_PRE_INCR,                /**< prefix increment  */\n  VM_OC_PRE_DECR,                /**< prefix decrement */\n  VM_OC_POST_INCR,               /**< postfix increment */\n  VM_OC_POST_DECR,               /**< postfix decrement */\n\n  VM_OC_PROP_DELETE,             /**< delete property */\n  VM_OC_DELETE,                  /**< delete */\n\n  VM_OC_MOV_IDENT,               /**< move identifier register reference */\n  VM_OC_ASSIGN,                  /**< assign */\n  VM_OC_ASSIGN_PROP,             /**< assign property */\n  VM_OC_ASSIGN_PROP_THIS,        /**< assign prop this */\n\n  VM_OC_RETURN,                  /**< return */\n  VM_OC_THROW,                   /**< throw */\n  VM_OC_THROW_REFERENCE_ERROR,   /**< throw reference error */\n\n  VM_OC_EVAL,                    /**< eval */\n  VM_OC_CALL,                    /**< call */\n  VM_OC_NEW,                     /**< new */\n  VM_OC_RESOLVE_BASE_FOR_CALL,   /**< resolve base value before call */\n  VM_OC_ERROR,                   /**< error while the vm_loop is suspended */\n\n  VM_OC_JUMP,                    /**< jump */\n#if ENABLED (JERRY_ESNEXT)\n  VM_OC_BRANCH_IF_NULLISH,       /** branch if undefined or null */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  VM_OC_BRANCH_IF_STRICT_EQUAL,  /**< branch if strict equal */\n\n  /* These four opcodes must be in this order. */\n  VM_OC_BRANCH_IF_TRUE,          /**< branch if true */\n  VM_OC_BRANCH_IF_FALSE,         /**< branch if false */\n  VM_OC_BRANCH_IF_LOGICAL_TRUE,  /**< branch if logical true */\n  VM_OC_BRANCH_IF_LOGICAL_FALSE, /**< branch if logical false */\n\n  VM_OC_PLUS,                    /**< unary plus */\n  VM_OC_MINUS,                   /**< unary minus */\n  VM_OC_NOT,                     /**< not */\n  VM_OC_BIT_NOT,                 /**< bitwise not */\n  VM_OC_VOID,                    /**< void */\n  VM_OC_TYPEOF_IDENT,            /**< typeof identifier */\n  VM_OC_TYPEOF,                  /**< typeof */\n\n  VM_OC_ADD,                     /**< binary add */\n  VM_OC_SUB,                     /**< binary sub */\n  VM_OC_MUL,                     /**< mul */\n  VM_OC_DIV,                     /**< div */\n  VM_OC_MOD,                     /**< mod */\n#if ENABLED (JERRY_ESNEXT)\n  VM_OC_EXP,                     /**< exponentiation */\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  VM_OC_EQUAL,                   /**< equal */\n  VM_OC_NOT_EQUAL,               /**< not equal */\n  VM_OC_STRICT_EQUAL,            /**< strict equal */\n  VM_OC_STRICT_NOT_EQUAL,        /**< strict not equal */\n  VM_OC_LESS,                    /**< less */\n  VM_OC_GREATER,                 /**< greater */\n  VM_OC_LESS_EQUAL,              /**< less equal */\n  VM_OC_GREATER_EQUAL,           /**< greater equal */\n  VM_OC_IN,                      /**< in */\n  VM_OC_INSTANCEOF,              /**< instanceof */\n\n  VM_OC_BIT_OR,                  /**< bitwise or */\n  VM_OC_BIT_XOR,                 /**< bitwise xor */\n  VM_OC_BIT_AND,                 /**< bitwise and */\n  VM_OC_LEFT_SHIFT,              /**< left shift */\n  VM_OC_RIGHT_SHIFT,             /**< right shift */\n  VM_OC_UNS_RIGHT_SHIFT,         /**< unsigned right shift */\n\n  VM_OC_BLOCK_CREATE_CONTEXT,    /**< create lexical environment for blocks enclosed in braces */\n  VM_OC_WITH,                    /**< with */\n  VM_OC_FOR_IN_INIT,             /**< for-in init context */\n  VM_OC_FOR_IN_GET_NEXT,         /**< get next */\n  VM_OC_FOR_IN_HAS_NEXT,         /**< has next */\n\n  VM_OC_TRY,                     /**< try */\n  VM_OC_CATCH,                   /**< catch */\n  VM_OC_FINALLY,                 /**< finally */\n  VM_OC_CONTEXT_END,             /**< context end */\n  VM_OC_JUMP_AND_EXIT_CONTEXT,   /**< jump and exit context */\n\n  VM_OC_CREATE_BINDING,          /**< create variables */\n  VM_OC_CREATE_ARGUMENTS,        /**< create arguments object */\n  VM_OC_SET_BYTECODE_PTR,        /**< setting bytecode pointer */\n  VM_OC_VAR_EVAL,                /**< variable and function evaluation */\n#if ENABLED (JERRY_ESNEXT)\n  VM_OC_EXT_VAR_EVAL,            /**< variable and function evaluation for\n                                  *   functions with separate argument context */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  VM_OC_INIT_ARG_OR_FUNC,        /**< create and init a function or argument binding */\n\n#if ENABLED (JERRY_DEBUGGER)\n  VM_OC_BREAKPOINT_ENABLED,      /**< enabled breakpoint for debugger */\n  VM_OC_BREAKPOINT_DISABLED,     /**< disabled breakpoint for debugger */\n#endif /* ENABLED (JERRY_DEBUGGER) */\n#if ENABLED (JERRY_LINE_INFO)\n  VM_OC_LINE,                    /**< line number of the next statement */\n#endif /* ENABLED (JERRY_LINE_INFO) */\n#if ENABLED (JERRY_ESNEXT)\n  VM_OC_CHECK_VAR,               /**< check redeclared vars in the global scope */\n  VM_OC_CHECK_LET,               /**< check redeclared lets in the global scope */\n  VM_OC_ASSIGN_LET_CONST,        /**< assign values to let/const declarations */\n  VM_OC_INIT_BINDING,            /**< create and intialize a binding */\n  VM_OC_THROW_CONST_ERROR,       /**< throw invalid assignment to const variable error */\n  VM_OC_COPY_TO_GLOBAL,          /**< copy value to global lex env */\n  VM_OC_COPY_FROM_ARG,           /**< copy value from arg lex env */\n  VM_OC_CLONE_CONTEXT,           /**< clone lexical environment with let/const declarations */\n  VM_OC_COPY_DATA_PROPERTIES,    /**< copy data properties of an object */\n  VM_OC_SET_COMPUTED_PROPERTY,   /**< set computed property */\n\n  VM_OC_FOR_OF_INIT,             /**< for-of init context */\n  VM_OC_FOR_OF_GET_NEXT,         /**< for-of get next */\n  VM_OC_FOR_OF_HAS_NEXT,         /**< for-of has next */\n  VM_OC_FOR_AWAIT_OF_INIT,       /**< for-await-of init context */\n  VM_OC_FOR_AWAIT_OF_HAS_NEXT,   /**< for-await-of has next */\n\n  VM_OC_LOCAL_EVAL,              /**< eval in local context */\n  VM_OC_SUPER_CALL,              /**< call the 'super' constructor */\n  VM_OC_PUSH_CLASS_ENVIRONMENT,  /**< push class environment */\n  VM_OC_PUSH_IMPLICIT_CTOR,      /**< create implicit class constructor */\n  VM_OC_INIT_CLASS,              /**< initialize class */\n  VM_OC_FINALIZE_CLASS,          /**< finalize class */\n  VM_OC_SET_FIELD_INIT,          /**< store the class field initializer function */\n  VM_OC_SET_STATIC_FIELD_INIT,   /**< store the static class field initializer function */\n  VM_OC_RUN_FIELD_INIT,          /**< run the class field initializer function */\n  VM_OC_RUN_STATIC_FIELD_INIT,   /**< run the static class field initializer function */\n  VM_OC_SET_NEXT_COMPUTED_FIELD, /**< set the next computed field of a class */\n  VM_OC_PUSH_SUPER_CONSTRUCTOR,  /**< getSuperConstructor operation */\n  VM_OC_RESOLVE_LEXICAL_THIS,    /**< resolve this_binding from from the lexical environment */\n  VM_OC_SUPER_REFERENCE,         /**< push super reference */\n  VM_OC_SET_HOME_OBJECT,         /**< set the [[HomeObject]] environment in an object literal */\n  VM_OC_OBJECT_LITERAL_HOME_ENV, /**< create/destroy [[HomeObject]] environment of an object literal */\n  VM_OC_SET_FUNCTION_NAME,       /**< set function name property */\n\n  VM_OC_PUSH_SPREAD_ELEMENT,     /**< push spread element */\n  VM_OC_PUSH_REST_OBJECT,        /**< push rest object */\n  VM_OC_GET_ITERATOR,            /**< GetIterator abstract operation */\n  VM_OC_ITERATOR_STEP,           /**< IteratorStep abstract operation */\n  VM_OC_ITERATOR_CLOSE,          /**< IteratorClose abstract operation */\n  VM_OC_INITIALIZER_PUSH_LIST,   /**< push name list array */\n  VM_OC_INITIALIZER_PUSH_REST,   /**< push the object with the rest properties */\n  VM_OC_INITIALIZER_PUSH_NAME,   /**< append string to name list array and push the string */\n  VM_OC_DEFAULT_INITIALIZER,     /**< default initializer inside a pattern */\n  VM_OC_REST_INITIALIZER,        /**< create rest object inside an array pattern */\n  VM_OC_INITIALIZER_PUSH_PROP,   /**< push property for object initializer */\n  VM_OC_MOVE,                    /**< move element to the stack-top */\n  VM_OC_SPREAD_ARGUMENTS,        /**< perform function call/construct with spreaded arguments */\n  VM_OC_CREATE_GENERATOR,        /**< create a generator object */\n  VM_OC_YIELD,                   /**< yield operation */\n  VM_OC_ASYNC_YIELD,             /**< async yield operation */\n  VM_OC_ASYNC_YIELD_ITERATOR,    /**< async yield iterator operation */\n  VM_OC_AWAIT,                   /**< await operation */\n  VM_OC_GENERATOR_AWAIT,         /**< generator await operation */\n  VM_OC_EXT_RETURN,              /**< return which also clears the stack */\n  VM_OC_ASYNC_EXIT,              /**< return from async function */\n  VM_OC_STRING_CONCAT,           /**< string concatenation */\n  VM_OC_GET_TEMPLATE_OBJECT,     /**< GetTemplateObject operation */\n  VM_OC_PUSH_NEW_TARGET,         /**< push new.target onto the stack */\n  VM_OC_REQUIRE_OBJECT_COERCIBLE,/**< RequireObjectCoercible opretaion */\n  VM_OC_ASSIGN_SUPER,            /**< assign super reference */\n  VM_OC_SET__PROTO__,            /**< set prototype when __proto__: form is used */\n  VM_OC_PUSH_STATIC_FIELD_FUNC,  /**< push static field initializer function */\n  VM_OC_ADD_COMPUTED_FIELD,      /**< add computed field name */\n#endif /* ENABLED (JERRY_ESNEXT) */\n  VM_OC_NONE,                    /**< a special opcode for unsupported byte codes */\n} vm_oc_types;\n\n/**\n * Unused opcodes, but required by byte-code types.\n */\ntypedef enum\n{\n#if !ENABLED (JERRY_ESNEXT)\n  VM_OC_EXP = VM_OC_NONE,                     /**< exponentiation */\n  VM_OC_BRANCH_IF_NULLISH = VM_OC_NONE,       /** branch if undefined or null */\n#endif /* !ENABLED (JERRY_ESNEXT) */\n#if !ENABLED (JERRY_DEBUGGER)\n  VM_OC_BREAKPOINT_ENABLED = VM_OC_NONE,      /**< enabled breakpoint for debugger is unused */\n  VM_OC_BREAKPOINT_DISABLED = VM_OC_NONE,     /**< disabled breakpoint for debugger is unused */\n#endif /* !ENABLED (JERRY_DEBUGGER) */\n#if !ENABLED (JERRY_LINE_INFO)\n  VM_OC_LINE = VM_OC_NONE,                    /**< line number of the next statement is unused */\n#endif /* !ENABLED (JERRY_LINE_INFO) */\n#if !ENABLED (JERRY_ESNEXT)\n  VM_OC_EXT_VAR_EVAL = VM_OC_NONE,            /**< variable and function evaluation for\n                                               *   functions with separate argument context */\n  VM_OC_CHECK_VAR = VM_OC_NONE,               /**< check redeclared vars in the global scope */\n  VM_OC_CHECK_LET = VM_OC_NONE,               /**< check redeclared lets in the global scope */\n  VM_OC_ASSIGN_LET_CONST = VM_OC_NONE,        /**< assign values to let/const declarations */\n  VM_OC_INIT_BINDING = VM_OC_NONE,            /**< create and intialize a binding */\n  VM_OC_THROW_CONST_ERROR = VM_OC_NONE,       /**< throw invalid assignment to const variable error */\n  VM_OC_COPY_TO_GLOBAL = VM_OC_NONE,          /**< copy value to global lex env */\n  VM_OC_COPY_FROM_ARG = VM_OC_NONE,           /**< copy value from arg lex env */\n  VM_OC_CLONE_CONTEXT = VM_OC_NONE,           /**< clone lexical environment with let/const declarations */\n  VM_OC_COPY_DATA_PROPERTIES = VM_OC_NONE,    /**< copy data properties of an object */\n  VM_OC_SET_COMPUTED_PROPERTY = VM_OC_NONE,   /**< set computed property is unused */\n\n  VM_OC_FOR_OF_INIT = VM_OC_NONE,             /**< for-of init context */\n  VM_OC_FOR_OF_GET_NEXT = VM_OC_NONE,         /**< for-of get next */\n  VM_OC_FOR_OF_HAS_NEXT = VM_OC_NONE,         /**< for-of has next */\n  VM_OC_FOR_AWAIT_OF_INIT = VM_OC_NONE,       /**< for-await-of init context */\n  VM_OC_FOR_AWAIT_OF_HAS_NEXT = VM_OC_NONE,   /**< for-await-of has next */\n\n  VM_OC_LOCAL_EVAL = VM_OC_NONE,              /**< eval in local context */\n  VM_OC_SUPER_CALL = VM_OC_NONE,              /**< call the 'super' constructor */\n  VM_OC_PUSH_CLASS_ENVIRONMENT = VM_OC_NONE,  /**< push class environment */\n  VM_OC_PUSH_IMPLICIT_CTOR = VM_OC_NONE,      /**< create implicit class constructor */\n  VM_OC_INIT_CLASS = VM_OC_NONE,              /**< initialize class */\n  VM_OC_FINALIZE_CLASS = VM_OC_NONE,          /**< finalize class */\n  VM_OC_SET_FIELD_INIT = VM_OC_NONE,          /**< store the class field initializer function */\n  VM_OC_SET_STATIC_FIELD_INIT = VM_OC_NONE,   /**< store the static class field initializer function */\n  VM_OC_RUN_FIELD_INIT = VM_OC_NONE,          /**< run the class field initializer function */\n  VM_OC_RUN_STATIC_FIELD_INIT = VM_OC_NONE,   /**< run the static class field initializer function */\n  VM_OC_SET_NEXT_COMPUTED_FIELD = VM_OC_NONE, /**< set the next computed field of a class */\n  VM_OC_PUSH_SUPER_CONSTRUCTOR = VM_OC_NONE,  /**< getSuperConstructor operation */\n  VM_OC_RESOLVE_LEXICAL_THIS = VM_OC_NONE,    /**< resolve this_binding from from the lexical environment */\n  VM_OC_SUPER_REFERENCE = VM_OC_NONE,         /**< push super reference */\n  VM_OC_SET_HOME_OBJECT = VM_OC_NONE,         /**< set the [[HomeObject]] internal property in an object literal */\n  VM_OC_OBJECT_LITERAL_HOME_ENV = VM_OC_NONE, /**< create/destroy [[HomeObject]] environment of an object literal */\n  VM_OC_SET_FUNCTION_NAME = VM_OC_NONE,       /**< set function name property */\n\n  VM_OC_PUSH_SPREAD_ELEMENT = VM_OC_NONE,     /**< push spread element */\n  VM_OC_PUSH_REST_OBJECT = VM_OC_NONE,        /**< push rest object */\n  VM_OC_GET_ITERATOR = VM_OC_NONE,            /**< GetIterator abstract operation */\n  VM_OC_ITERATOR_STEP = VM_OC_NONE,           /**< IteratorStep abstract operation */\n  VM_OC_ITERATOR_CLOSE = VM_OC_NONE,          /**< IteratorClose abstract operation */\n  VM_OC_INITIALIZER_PUSH_LIST = VM_OC_NONE,   /**< push name list array */\n  VM_OC_INITIALIZER_PUSH_REST = VM_OC_NONE,   /**< push the object with the rest properties */\n  VM_OC_INITIALIZER_PUSH_NAME = VM_OC_NONE,   /**< append string to name list array and push the string */\n  VM_OC_DEFAULT_INITIALIZER = VM_OC_NONE,     /**< default initializer inside a pattern */\n  VM_OC_REST_INITIALIZER = VM_OC_NONE,        /**< create rest object inside an array pattern */\n  VM_OC_INITIALIZER_PUSH_PROP = VM_OC_NONE,   /**< push property for object initializer */\n  VM_OC_MOVE = VM_OC_NONE,                    /**< move element to the stack-top */\n  VM_OC_SPREAD_ARGUMENTS = VM_OC_NONE,        /**< perform function call/construct with spreaded arguments */\n  VM_OC_CREATE_GENERATOR = VM_OC_NONE,        /**< create a generator object */\n  VM_OC_YIELD = VM_OC_NONE,                   /**< yield operation */\n  VM_OC_ASYNC_YIELD = VM_OC_NONE,             /**< async yield operation */\n  VM_OC_ASYNC_YIELD_ITERATOR = VM_OC_NONE,    /**< async yield iterator operation */\n  VM_OC_AWAIT = VM_OC_NONE,                   /**< await operation */\n  VM_OC_GENERATOR_AWAIT = VM_OC_NONE,         /**< generator await operation */\n  VM_OC_EXT_RETURN = VM_OC_NONE,              /**< return which also clears the stack */\n  VM_OC_ASYNC_EXIT = VM_OC_NONE,              /**< return from async function */\n  VM_OC_STRING_CONCAT = VM_OC_NONE,           /**< string concatenation */\n  VM_OC_GET_TEMPLATE_OBJECT = VM_OC_NONE,     /**< GetTemplateObject operation */\n  VM_OC_PUSH_NEW_TARGET = VM_OC_NONE,         /**< push new.target onto the stack */\n  VM_OC_REQUIRE_OBJECT_COERCIBLE = VM_OC_NONE,/**< RequireObjectCoercible opretaion */\n  VM_OC_ASSIGN_SUPER = VM_OC_NONE,            /**< assign super reference */\n  VM_OC_SET__PROTO__ = VM_OC_NONE,            /**< set prototype when __proto__: form is used */\n  VM_OC_PUSH_STATIC_FIELD_FUNC = VM_OC_NONE,  /**< push static field initializer function */\n  VM_OC_ADD_COMPUTED_FIELD = VM_OC_NONE,      /**< add computed field name */\n#endif /* !ENABLED (JERRY_ESNEXT) */\n\n  VM_OC_UNUSED = VM_OC_NONE                   /**< placeholder if the list is empty */\n} vm_oc_unused_types;\n\n/**\n * Decrement operator.\n */\n#define VM_OC_DECREMENT_OPERATOR_FLAG 0x1\n\n/**\n * Postfix increment/decrement operator.\n */\n#define VM_OC_POST_INCR_DECR_OPERATOR_FLAG 0x2\n\n/**\n * An named variable is updated by the increment/decrement operator.\n */\n#define VM_OC_IDENT_INCR_DECR_OPERATOR_FLAG 0x4\n\n/**\n * Jump to target offset if input value is logical false.\n */\n#define VM_OC_BRANCH_IF_FALSE_FLAG 0x1\n\n/**\n * Branch optimized for logical and/or opcodes.\n */\n#define VM_OC_LOGICAL_BRANCH_FLAG 0x2\n\n/**\n * Bit index shift for non-static property initializers.\n */\n#define VM_OC_NON_STATIC_SHIFT 15\n\n/**\n * This flag is set for static property initializers.\n */\n#define VM_OC_NON_STATIC_FLAG (0x1 << VM_OC_NON_STATIC_SHIFT)\n\n/**\n * Position of \"put result\" opcode.\n */\n#define VM_OC_PUT_RESULT_SHIFT 11\n\n/**\n * Mask of \"put result\" opcode.\n */\n#define VM_OC_PUT_RESULT_MASK 0xf\n\n/**\n * Generate a \"put result\" opcode flag bit.\n */\n#define VM_OC_PUT_RESULT_CREATE_FLAG(V) (((V) & VM_OC_PUT_RESULT_MASK) << VM_OC_PUT_RESULT_SHIFT)\n\n/**\n * Checks whether the result is stored somewhere.\n */\n#define VM_OC_HAS_PUT_RESULT(V) ((V) & (VM_OC_PUT_RESULT_MASK << VM_OC_PUT_RESULT_SHIFT))\n\n/**\n * Specify where the result is stored\n */\ntypedef enum\n{\n  VM_OC_PUT_IDENT = VM_OC_PUT_RESULT_CREATE_FLAG (0x1),\n  VM_OC_PUT_REFERENCE = VM_OC_PUT_RESULT_CREATE_FLAG (0x2),\n  VM_OC_PUT_STACK = VM_OC_PUT_RESULT_CREATE_FLAG (0x4),\n  VM_OC_PUT_BLOCK = VM_OC_PUT_RESULT_CREATE_FLAG (0x8),\n} vm_oc_put_types;\n\n/**\n * Non-recursive vm_loop: the vm_loop can be suspended\n * to execute a call /construct operation. These return\n * types of the vm_loop tells whether a call operation\n * is in progress or the vm_loop is finished.\n */\ntypedef enum\n{\n  VM_NO_EXEC_OP,                 /**< do nothing */\n  VM_EXEC_CALL,                  /**< invoke a function */\n  VM_EXEC_SUPER_CALL,            /**< invoke a function through 'super' keyword */\n  VM_EXEC_SPREAD_OP,             /**< call/construct operation with spreaded argument list */\n  VM_EXEC_RETURN,                /**< return with the completion value without freeing registers */\n  VM_EXEC_CONSTRUCT,             /**< construct a new object */\n} vm_call_operation;\n\necma_value_t vm_run_global (const ecma_compiled_code_t *bytecode_p);\necma_value_t vm_run_eval (ecma_compiled_code_t *bytecode_data_p, uint32_t parse_opts);\n\n#if ENABLED (JERRY_MODULE_SYSTEM)\necma_value_t vm_run_module (ecma_module_t *module_p);\n#endif /* ENABLED (JERRY_MODULE_SYSTEM) */\n\necma_value_t vm_run (vm_frame_ctx_shared_t *shared_p, ecma_value_t this_binding_value, ecma_object_t *lex_env_p);\necma_value_t vm_execute (vm_frame_ctx_t *frame_ctx_p);\n\nbool vm_is_strict_mode (void);\nbool vm_is_direct_eval_form_call (void);\n\necma_value_t vm_get_backtrace (uint32_t max_depth, ecma_object_t *ignored_function_p);\n\n/**\n * @}\n * @}\n */\n\n#endif /* !VM_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-debugger/README.md",
    "content": "# Available JerryScript debugger tools\n\n  - JerryScript console debugger client ( jerry_client.py )\n  - IoT.js Code ( https://github.com/jerryscript-project/iotjscode )\n  - JerryScript debugger Chrome webtool ( https://github.com/jerryscript-project/jerryscript-debugger-ts )\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-debugger/jerry_client.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\nfrom cmd import Cmd\nfrom pprint import pprint\nimport math\nimport socket\nimport sys\nimport logging\nimport time\nimport jerry_client_main\n\nfrom jerry_client_websocket import WebSocket\nfrom jerry_client_rawpacket import RawPacket\nfrom jerry_client_tcp import Socket\n\ndef write(string):\n    print(string, end='')\n\nclass DebuggerPrompt(Cmd):\n    # pylint: disable=too-many-instance-attributes,too-many-arguments\n    def __init__(self, debugger):\n        Cmd.__init__(self)\n        self.debugger = debugger\n        self.stop = False\n        self.quit = False\n\n    def precmd(self, line):\n        self.stop = False\n        if self.debugger.non_interactive:\n            print(\"%s\" % line)\n        return line\n\n    def postcmd(self, stop, line):\n        return self.stop\n\n    def do_quit(self, _):\n        \"\"\" Exit JerryScript debugger \"\"\"\n        self.debugger.quit()\n        self.quit = True\n        self.stop = True\n\n    def do_display(self, args):\n        \"\"\" Toggle source code display after breakpoints \"\"\"\n        if args:\n            line_num = src_check_args(args)\n            if line_num >= 0:\n                self.debugger.display = line_num\n        else:\n            print(\"Non-negative integer number expected, 0 turns off this function\")\n\n    def do_break(self, args):\n        \"\"\" Insert breakpoints on the given lines or functions \"\"\"\n        write(self.debugger.set_break(args))\n    do_b = do_break\n\n    def do_list(self, _):\n        \"\"\" Lists the available breakpoints \"\"\"\n        write(self.debugger.breakpoint_list())\n\n    def do_delete(self, args):\n        \"\"\" Delete the given breakpoint, use 'delete all|active|pending' to clear all the given breakpoints \"\"\"\n        write(self.debugger.delete(args))\n\n    def do_exception(self, args):\n        \"\"\" Config the exception handler module \"\"\"\n        write(self.debugger.exception(args))\n\n    def do_next(self, args):\n        \"\"\" Next breakpoint in the same code block \"\"\"\n        self.stop = True\n        if not args:\n            args = 0\n            self.debugger.next()\n            return\n\n        try:\n            args = int(args)\n            if args <= 0:\n                raise ValueError(args)\n\n            while args > 0:\n                self.debugger.next()\n                time.sleep(0.1)\n\n                while True:\n                    result = self.debugger.process_messages()\n                    res_type = result.get_type()\n\n                    if res_type == result.END:\n                        self.quit = True\n                        return\n                    elif res_type == result.TEXT:\n                        write(result.get_text())\n                    elif res_type == result.PROMPT:\n                        break\n\n                args -= 1\n        except ValueError as val_errno:\n            print(\"Error: expected a positive integer: %s\" % val_errno)\n    do_n = do_next\n\n    def do_step(self, _):\n        \"\"\" Next breakpoint, step into functions \"\"\"\n        self.debugger.step()\n        self.stop = True\n    do_s = do_step\n\n    def do_continue(self, _):\n        \"\"\" Continue execution \"\"\"\n        self.debugger.do_continue()\n        self.stop = True\n        if not self.debugger.non_interactive:\n            print(\"Press enter to stop JavaScript execution.\")\n    do_c = do_continue\n\n    def do_finish(self, _):\n        \"\"\" Continue running until the current function returns \"\"\"\n        self.debugger.finish()\n        self.stop = True\n    do_f = do_finish\n\n    def do_backtrace(self, args):\n        \"\"\" Get backtrace data from debugger \"\"\"\n        write(self.debugger.backtrace(args))\n        self.stop = True\n    do_bt = do_backtrace\n\n    def do_src(self, args):\n        \"\"\" Get current source code \"\"\"\n        if args:\n            line_num = src_check_args(args)\n            if line_num >= 0:\n                write(self.debugger.print_source(line_num, 0))\n        else:\n            write(self.debugger.print_source(0, 0))\n    do_source = do_src\n\n    def do_scroll(self, _):\n        \"\"\" Scroll the source up or down \"\"\"\n        while True:\n            key = sys.stdin.readline()\n            if key == 'w\\n':\n                _scroll_direction(self.debugger, \"up\")\n            elif key == 's\\n':\n                _scroll_direction(self.debugger, \"down\")\n            elif key == 'q\\n':\n                break\n            else:\n                print(\"Invalid key\")\n\n    def do_eval(self, args):\n        \"\"\" Evaluate JavaScript source code \"\"\"\n        self.debugger.eval(args)\n        self.stop = True\n    do_e = do_eval\n    do_print = do_eval\n    do_p = do_eval\n\n    def do_eval_at(self, args):\n        \"\"\" Evaluate JavaScript source code at a scope chain level \"\"\"\n\n        code = ''\n        index = 0\n        try:\n            args = args.split(\" \", 1)\n\n            index = int(args[0])\n\n            if len(args) == 2:\n                code = args[1]\n\n            if index < 0 or index > 65535:\n                raise ValueError(\"Invalid scope chain index: %d (must be between 0 and 65535)\" % index)\n\n        except ValueError as val_errno:\n            print(\"Error: %s\" % (val_errno))\n            return\n\n        self.debugger.eval_at(code, index)\n        self.stop = True\n\n    def do_throw(self, args):\n        \"\"\" Throw an exception \"\"\"\n        self.debugger.throw(args)\n        self.stop = True\n\n    def do_abort(self, args):\n        \"\"\" Throw an exception which cannot be caught \"\"\"\n        self.debugger.abort(args)\n        self.stop = True\n\n    def do_restart(self, _):\n        \"\"\" Restart the engine's debug session \"\"\"\n        self.debugger.restart()\n        self.stop = True\n    do_res = do_restart\n\n    def do_scope(self, _):\n        \"\"\" Get lexical environment chain \"\"\"\n        self.debugger.scope_chain()\n        self.stop = True\n\n    def do_variables(self, args):\n        \"\"\" Get scope variables from debugger \"\"\"\n        write(self.debugger.scope_variables(args))\n        self.stop = True\n\n    def do_memstats(self, _):\n        \"\"\" Memory statistics \"\"\"\n        self.debugger.memstats()\n        self.stop = True\n    do_ms = do_memstats\n\n    def do_dump(self, args):\n        \"\"\" Dump all of the debugger data \"\"\"\n        if args:\n            print(\"Error: No argument expected\")\n        else:\n            pprint(self.debugger.function_list)\n\n    # pylint: disable=invalid-name\n    def do_EOF(self, _):\n        \"\"\" Exit JerryScript debugger \"\"\"\n        print(\"Unexpected end of input. Connection closed.\")\n        self.debugger.quit()\n        self.quit = True\n        self.stop = True\n\ndef _scroll_direction(debugger, direction):\n    \"\"\" Helper function for do_scroll \"\"\"\n    debugger.src_offset_diff = int(max(math.floor(debugger.display / 3), 1))\n    if direction == \"up\":\n        debugger.src_offset -= debugger.src_offset_diff\n    else:\n        debugger.src_offset += debugger.src_offset_diff\n    print(debugger.print_source(debugger.display, debugger.src_offset)['value'])\n\ndef src_check_args(args):\n    try:\n        line_num = int(args)\n        if line_num < 0:\n            print(\"Error: Non-negative integer number expected\")\n            return -1\n\n        return line_num\n    except ValueError as val_errno:\n        print(\"Error: Non-negative integer number expected: %s\" % (val_errno))\n        return -1\n\n# pylint: disable=too-many-branches,too-many-locals,too-many-statements\ndef main():\n    args = jerry_client_main.arguments_parse()\n\n    channel = None\n    protocol = None\n\n    if args.protocol == \"tcp\":\n        address = None\n        if \":\" not in args.address:\n            address = (args.address, 5001) # use default port\n        else:\n            host, port = args.address.split(\":\")\n            address = (host, int(port))\n\n        protocol = Socket(address)\n    elif args.protocol == \"serial\":\n        from jerry_client_serial import Serial\n        protocol = Serial(args.serial_config)\n    else:\n        print(\"Unsupported transmission protocol\")\n        return -1\n\n    if args.channel == \"websocket\":\n        channel = WebSocket(protocol=protocol)\n    elif args.channel == \"rawpacket\":\n        channel = RawPacket(protocol=protocol)\n    else:\n        print(\"Unsupported communication channel\")\n        return -1\n\n    debugger = jerry_client_main.JerryDebugger(channel)\n    debugger.non_interactive = args.non_interactive\n\n    logging.debug(\"Connected to JerryScript\")\n\n    prompt = DebuggerPrompt(debugger)\n    prompt.prompt = \"(jerry-debugger) \"\n\n    if args.color:\n        debugger.set_colors()\n\n    if args.display:\n        debugger.display = args.display\n        prompt.do_display(args.display)\n    else:\n        prompt.stop = False\n\n    if args.exception is not None:\n        prompt.do_exception(str(args.exception))\n\n    if args.client_source:\n        debugger.store_client_sources(args.client_source)\n\n    while True:\n        if prompt.quit:\n            break\n\n        result = debugger.process_messages()\n        res_type = result.get_type()\n\n        if res_type == result.END:\n            break\n        elif res_type == result.PROMPT:\n            prompt.cmdloop()\n        elif res_type == result.TEXT:\n            write(result.get_text())\n        continue\n\nif __name__ == \"__main__\":\n    try:\n        main()\n    except socket.error as error_msg:\n        ERRNO = error_msg.errno\n        MSG = str(error_msg)\n        if ERRNO == 111:\n            sys.exit(\"Failed to connect to the JerryScript debugger.\")\n        elif ERRNO == 32 or ERRNO == 104:\n            sys.exit(\"Connection closed.\")\n        else:\n            sys.exit(\"Failed to connect to the JerryScript debugger.\\nError: %s\" % (MSG))\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-debugger/jerry_client_main.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\nimport argparse\nimport logging\nimport re\nimport select\nimport struct\nimport sys\n\n# Expected debugger protocol version.\nJERRY_DEBUGGER_VERSION = 9\n\n# Messages sent by the server to client.\nJERRY_DEBUGGER_CONFIGURATION = 1\nJERRY_DEBUGGER_PARSE_ERROR = 2\nJERRY_DEBUGGER_BYTE_CODE_CP = 3\nJERRY_DEBUGGER_PARSE_FUNCTION = 4\nJERRY_DEBUGGER_BREAKPOINT_LIST = 5\nJERRY_DEBUGGER_BREAKPOINT_OFFSET_LIST = 6\nJERRY_DEBUGGER_SOURCE_CODE = 7\nJERRY_DEBUGGER_SOURCE_CODE_END = 8\nJERRY_DEBUGGER_SOURCE_CODE_NAME = 9\nJERRY_DEBUGGER_SOURCE_CODE_NAME_END = 10\nJERRY_DEBUGGER_FUNCTION_NAME = 11\nJERRY_DEBUGGER_FUNCTION_NAME_END = 12\nJERRY_DEBUGGER_WAITING_AFTER_PARSE = 13\nJERRY_DEBUGGER_RELEASE_BYTE_CODE_CP = 14\nJERRY_DEBUGGER_MEMSTATS_RECEIVE = 15\nJERRY_DEBUGGER_BREAKPOINT_HIT = 16\nJERRY_DEBUGGER_EXCEPTION_HIT = 17\nJERRY_DEBUGGER_EXCEPTION_STR = 18\nJERRY_DEBUGGER_EXCEPTION_STR_END = 19\nJERRY_DEBUGGER_BACKTRACE_TOTAL = 20\nJERRY_DEBUGGER_BACKTRACE = 21\nJERRY_DEBUGGER_BACKTRACE_END = 22\nJERRY_DEBUGGER_EVAL_RESULT = 23\nJERRY_DEBUGGER_EVAL_RESULT_END = 24\nJERRY_DEBUGGER_WAIT_FOR_SOURCE = 25\nJERRY_DEBUGGER_OUTPUT_RESULT = 26\nJERRY_DEBUGGER_OUTPUT_RESULT_END = 27\nJERRY_DEBUGGER_SCOPE_CHAIN = 28\nJERRY_DEBUGGER_SCOPE_CHAIN_END = 29\nJERRY_DEBUGGER_SCOPE_VARIABLES = 30\nJERRY_DEBUGGER_SCOPE_VARIABLES_END = 31\nJERRY_DEBUGGER_CLOSE_CONNECTION = 32\n\n# Debugger option flags\nJERRY_DEBUGGER_LITTLE_ENDIAN = 0x1\n\n# Subtypes of eval\nJERRY_DEBUGGER_EVAL_EVAL = \"\\0\"\nJERRY_DEBUGGER_EVAL_THROW = \"\\1\"\nJERRY_DEBUGGER_EVAL_ABORT = \"\\2\"\n\n# Subtypes of eval result\nJERRY_DEBUGGER_EVAL_OK = 1\nJERRY_DEBUGGER_EVAL_ERROR = 2\n\n# Subtypes of output\nJERRY_DEBUGGER_OUTPUT_OK = 1\nJERRY_DEBUGGER_OUTPUT_ERROR = 2\nJERRY_DEBUGGER_OUTPUT_WARNING = 3\nJERRY_DEBUGGER_OUTPUT_DEBUG = 4\nJERRY_DEBUGGER_OUTPUT_TRACE = 5\n\n\n# Messages sent by the client to server.\nJERRY_DEBUGGER_FREE_BYTE_CODE_CP = 1\nJERRY_DEBUGGER_UPDATE_BREAKPOINT = 2\nJERRY_DEBUGGER_EXCEPTION_CONFIG = 3\nJERRY_DEBUGGER_PARSER_CONFIG = 4\nJERRY_DEBUGGER_MEMSTATS = 5\nJERRY_DEBUGGER_STOP = 6\nJERRY_DEBUGGER_PARSER_RESUME = 7\nJERRY_DEBUGGER_CLIENT_SOURCE = 8\nJERRY_DEBUGGER_CLIENT_SOURCE_PART = 9\nJERRY_DEBUGGER_NO_MORE_SOURCES = 10\nJERRY_DEBUGGER_CONTEXT_RESET = 11\nJERRY_DEBUGGER_CONTINUE = 12\nJERRY_DEBUGGER_STEP = 13\nJERRY_DEBUGGER_NEXT = 14\nJERRY_DEBUGGER_FINISH = 15\nJERRY_DEBUGGER_GET_BACKTRACE = 16\nJERRY_DEBUGGER_EVAL = 17\nJERRY_DEBUGGER_EVAL_PART = 18\nJERRY_DEBUGGER_GET_SCOPE_CHAIN = 19\nJERRY_DEBUGGER_GET_SCOPE_VARIABLES = 20\n\nJERRY_DEBUGGER_SCOPE_WITH = 1\nJERRY_DEBUGGER_SCOPE_LOCAL = 2\nJERRY_DEBUGGER_SCOPE_CLOSURE = 3\nJERRY_DEBUGGER_SCOPE_GLOBAL = 4\nJERRY_DEBUGGER_SCOPE_NON_CLOSURE = 5\n\nJERRY_DEBUGGER_VALUE_NONE = 1\nJERRY_DEBUGGER_VALUE_UNDEFINED = 2\nJERRY_DEBUGGER_VALUE_NULL = 3\nJERRY_DEBUGGER_VALUE_BOOLEAN = 4\nJERRY_DEBUGGER_VALUE_NUMBER = 5\nJERRY_DEBUGGER_VALUE_STRING = 6\nJERRY_DEBUGGER_VALUE_FUNCTION = 7\nJERRY_DEBUGGER_VALUE_ARRAY = 8\nJERRY_DEBUGGER_VALUE_OBJECT = 9\n\ndef arguments_parse():\n    parser = argparse.ArgumentParser(description=\"JerryScript debugger client\")\n\n    parser.add_argument(\"address\", action=\"store\", nargs=\"?\", default=\"localhost:5001\",\n                        help=\"specify a unique network address for tcp connection (default: %(default)s)\")\n    parser.add_argument(\"-v\", \"--verbose\", action=\"store_true\", default=False,\n                        help=\"increase verbosity (default: %(default)s)\")\n    parser.add_argument(\"--non-interactive\", action=\"store_true\", default=False,\n                        help=\"disable stop when newline is pressed (default: %(default)s)\")\n    parser.add_argument(\"--color\", action=\"store_true\", default=False,\n                        help=\"enable color highlighting on source commands (default: %(default)s)\")\n    parser.add_argument(\"--display\", action=\"store\", default=None, type=int,\n                        help=\"set display range\")\n    parser.add_argument(\"--exception\", action=\"store\", default=None, type=int, choices=[0, 1],\n                        help=\"set exception config, usage 1: [Enable] or 0: [Disable]\")\n    parser.add_argument(\"--client-source\", action=\"store\", default=[], type=str, nargs=\"+\",\n                        help=\"specify a javascript source file to execute\")\n    parser.add_argument(\"--channel\", choices=[\"websocket\", \"rawpacket\"], default=\"websocket\",\n                        help=\"specify the communication channel (default: %(default)s)\")\n    parser.add_argument(\"--protocol\", choices=[\"tcp\", \"serial\"], default=\"tcp\",\n                        help=\"specify the transmission protocol over the communication channel (default: %(default)s)\")\n    parser.add_argument(\"--serial-config\", metavar=\"CONFIG_STRING\", default=\"/dev/ttyUSB0,115200,8,N,1\",\n                        help=\"Configure parameters for serial port (default: %(default)s)\")\n    args = parser.parse_args()\n\n    if args.verbose:\n        logging.basicConfig(format=\"%(levelname)s: %(message)s\", level=logging.DEBUG)\n        logging.debug(\"Debug logging mode: ON\")\n\n    return args\n\n\nclass JerryBreakpoint(object):\n\n    def __init__(self, line, offset, function):\n        self.line = line\n        self.offset = offset\n        self.function = function\n        self.active_index = -1\n\n    def __str__(self):\n        result = self.function.source_name or \"<unknown>\"\n        result += \":%d\" % (self.line)\n\n        if self.function.is_func:\n            result += \" (in \"\n            result += self.function.name or \"function\"\n            result += \"() at line:%d, col:%d)\" % (self.function.line, self.function.column)\n        return result\n\n    def __repr__(self):\n        return (\"Breakpoint(line:%d, offset:%d, active_index:%d)\"\n                % (self.line, self.offset, self.active_index))\n\nclass JerryPendingBreakpoint(object):\n    def __init__(self, line=None, source_name=None, function=None):\n        self.function = function\n        self.line = line\n        self.source_name = source_name or \"\"\n\n        self.index = -1\n\n    def __str__(self):\n        result = self.source_name\n        if self.line:\n            result += \":%d\" % (self.line)\n        else:\n            result += \"%s()\" % (self.function)\n        return result\n\n\nclass JerryFunction(object):\n    # pylint: disable=too-many-instance-attributes,too-many-arguments\n    def __init__(self, is_func, byte_code_cp, source, source_name, line, column, name, lines, offsets):\n        self.is_func = bool(is_func)\n        self.byte_code_cp = byte_code_cp\n        self.source = re.split(\"\\r\\n|[\\r\\n]\", source)\n        self.source_name = source_name\n        self.name = name\n        self.lines = {}\n        self.offsets = {}\n        self.line = line\n        self.column = column\n        self.first_breakpoint_line = lines[0]\n        self.first_breakpoint_offset = offsets[0]\n\n        if len(self.source) > 1 and not self.source[-1]:\n            self.source.pop()\n\n        for i, _line in enumerate(lines):\n            offset = offsets[i]\n            breakpoint = JerryBreakpoint(_line, offset, self)\n            self.lines[_line] = breakpoint\n            self.offsets[offset] = breakpoint\n\n    def __repr__(self):\n        result = (\"Function(byte_code_cp:0x%x, source_name:%r, name:%r, line:%d, column:%d { \"\n                  % (self.byte_code_cp, self.source_name, self.name, self.line, self.column))\n\n        result += ','.join([str(breakpoint) for breakpoint in self.lines.values()])\n\n        return result + \" })\"\n\n\nclass Multimap(object):\n\n    def __init__(self):\n        self.map = {}\n\n    def get(self, key):\n        if key in self.map:\n            return self.map[key]\n        return []\n\n    def insert(self, key, value):\n        if key in self.map:\n            self.map[key].append(value)\n        else:\n            self.map[key] = [value]\n\n    def delete(self, key, value):\n        items = self.map[key]\n\n        if len(items) == 1:\n            del self.map[key]\n        else:\n            del items[items.index(value)]\n\n    def __repr__(self):\n        return \"Multimap(%r)\" % (self.map)\n\n\nclass DebuggerAction(object):\n    END = 0\n    WAIT = 1\n    TEXT = 2\n    PROMPT = 3\n\n    def __init__(self, action_type, action_text):\n        self.action_type = action_type\n        self.action_text = action_text\n\n    def get_type(self):\n        return self.action_type\n\n    def get_text(self):\n        return self.action_text\n\n\nclass JerryDebugger(object):\n    # pylint: disable=too-many-instance-attributes,too-many-statements,too-many-public-methods,no-self-use\n    def __init__(self, channel):\n        self.prompt = False\n        self.function_list = {}\n        self.source = ''\n        self.source_name = ''\n        self.exception_string = ''\n        self.frame_index = 0\n        self.scope_vars = \"\"\n        self.scope_data = \"\"\n        self.client_sources = []\n        self.last_breakpoint_hit = None\n        self.next_breakpoint_index = 0\n        self.active_breakpoint_list = {}\n        self.pending_breakpoint_list = {}\n        self.line_list = Multimap()\n        self.display = 0\n        self.green = ''\n        self.red = ''\n        self.yellow = ''\n        self.green_bg = ''\n        self.yellow_bg = ''\n        self.blue = ''\n        self.nocolor = ''\n        self.src_offset = 0\n        self.src_offset_diff = 0\n        self.non_interactive = False\n        self.current_out = b\"\"\n        self.current_log = b\"\"\n        self.channel = channel\n\n        config_size = 8\n        # The server will send the configuration message after connection established\n        # type [1]\n        # configuration [1]\n        # version [4]\n        # max_message_size [1]\n        # cpointer_size [1]\n        result = self.channel.connect(config_size)\n\n        if len(result) != config_size or ord(result[0]) != JERRY_DEBUGGER_CONFIGURATION:\n            raise Exception(\"Unexpected configuration\")\n\n        self.little_endian = ord(result[1]) & JERRY_DEBUGGER_LITTLE_ENDIAN\n        self.max_message_size = ord(result[6])\n        self.cp_size = ord(result[7])\n\n        if self.little_endian:\n            self.byte_order = \"<\"\n            logging.debug(\"Little-endian machine\")\n        else:\n            self.byte_order = \">\"\n            logging.debug(\"Big-endian machine\")\n\n        if self.cp_size == 2:\n            self.cp_format = \"H\"\n        else:\n            self.cp_format = \"I\"\n\n        self.idx_format = \"I\"\n\n        self.version = struct.unpack(self.byte_order + self.idx_format, result[2:6])[0]\n        if self.version != JERRY_DEBUGGER_VERSION:\n            raise Exception(\"Incorrect debugger version from target: %d expected: %d\" %\n                            (self.version, JERRY_DEBUGGER_VERSION))\n\n        logging.debug(\"Compressed pointer size: %d\", self.cp_size)\n\n    def __del__(self):\n        if self.channel is not None:\n            self.channel.close()\n\n    def _exec_command(self, command_id):\n        message = struct.pack(self.byte_order + \"BB\",\n                              1,\n                              command_id)\n        self.channel.send_message(self.byte_order, message)\n\n    def quit(self):\n        self.prompt = False\n        self._exec_command(JERRY_DEBUGGER_CONTINUE)\n\n    def set_colors(self):\n        self.nocolor = '\\033[0m'\n        self.green = '\\033[92m'\n        self.red = '\\033[31m'\n        self.yellow = '\\033[93m'\n        self.green_bg = '\\033[42m\\033[30m'\n        self.yellow_bg = '\\033[43m\\033[30m'\n        self.blue = '\\033[94m'\n\n    def stop(self):\n        self._exec_command(JERRY_DEBUGGER_STOP)\n\n    def set_break(self, args):\n        if not args:\n            return \"Error: Breakpoint index expected\"\n\n        if ':' in args:\n            try:\n                if int(args.split(':', 1)[1]) <= 0:\n                    return \"Error: Positive breakpoint index expected\"\n\n                return self._set_breakpoint(args, False)\n\n            except ValueError as val_errno:\n                return \"Error: Positive breakpoint index expected: %s\" % (val_errno)\n\n        return self._set_breakpoint(args, False)\n\n    def breakpoint_list(self):\n        result = ''\n        if self.active_breakpoint_list:\n            result += \"=== %sActive breakpoints %s ===\\n\" % (self.green_bg, self.nocolor)\n            for breakpoint in self.active_breakpoint_list.values():\n                result += \" %d: %s\\n\" % (breakpoint.active_index, breakpoint)\n        if self.pending_breakpoint_list:\n            result += \"=== %sPending breakpoints%s ===\\n\" % (self.yellow_bg, self.nocolor)\n            for breakpoint in self.pending_breakpoint_list.values():\n                result += \" %d: %s (pending)\\n\" % (breakpoint.index, breakpoint)\n\n        if not self.active_breakpoint_list and not self.pending_breakpoint_list:\n            result += \"No breakpoints\\n\"\n\n        return result\n\n    def delete(self, args):\n        if not args:\n            return \"Error: Breakpoint index expected\\n\" \\\n                   \"Delete the given breakpoint, use 'delete all|active|pending' \" \\\n                   \"to clear all the given breakpoints\\n \"\n        elif args in ['all', 'pending', 'active']:\n            if args != \"pending\":\n                for i in self.active_breakpoint_list.values():\n                    breakpoint = self.active_breakpoint_list[i.active_index]\n                    del self.active_breakpoint_list[i.active_index]\n                    breakpoint.active_index = -1\n                    self._send_breakpoint(breakpoint)\n\n            if args != \"active\":\n                if self.pending_breakpoint_list:\n                    self.pending_breakpoint_list.clear()\n                    self._send_parser_config(0)\n            return \"\"\n\n        try:\n            breakpoint_index = int(args)\n        except ValueError as val_errno:\n            return \"Error: Integer number expected, %s\\n\" % (val_errno)\n\n        if breakpoint_index in self.active_breakpoint_list:\n            breakpoint = self.active_breakpoint_list[breakpoint_index]\n            del self.active_breakpoint_list[breakpoint_index]\n            breakpoint.active_index = -1\n            self._send_breakpoint(breakpoint)\n            return \"Breakpoint %d deleted\\n\" % (breakpoint_index)\n        elif breakpoint_index in self.pending_breakpoint_list:\n            del self.pending_breakpoint_list[breakpoint_index]\n            if not self.pending_breakpoint_list:\n                self._send_parser_config(0)\n            return \"Pending breakpoint %d deleted\\n\" % (breakpoint_index)\n        else:\n            return \"Error: Breakpoint %d not found\\n\" % (breakpoint_index)\n\n    def next(self):\n        self.prompt = False\n        self._exec_command(JERRY_DEBUGGER_NEXT)\n\n    def step(self):\n        self.prompt = False\n        self._exec_command(JERRY_DEBUGGER_STEP)\n\n    def do_continue(self):\n        self.prompt = False\n        self._exec_command(JERRY_DEBUGGER_CONTINUE)\n\n    def finish(self):\n        self.prompt = False\n        self._exec_command(JERRY_DEBUGGER_FINISH)\n\n    def backtrace(self, args):\n        max_depth = 0\n        min_depth = 0\n        get_total = 0\n\n        if args:\n            args = args.split(\" \")\n            try:\n                if \"t\" in args:\n                    get_total = 1\n                    args.remove(\"t\")\n\n                if len(args) >= 2:\n                    min_depth = int(args[0])\n                    max_depth = int(args[1])\n                    if max_depth <= 0 or min_depth < 0:\n                        return \"Error: Positive integer number expected\\n\"\n                    if min_depth > max_depth:\n                        return \"Error: Start depth needs to be lower than or equal to max depth\\n\"\n                elif len(args) >= 1:\n                    max_depth = int(args[0])\n                    if max_depth <= 0:\n                        return \"Error: Positive integer number expected\\n\"\n\n            except ValueError as val_errno:\n                return \"Error: Positive integer number expected, %s\\n\" % (val_errno)\n\n        self.frame_index = min_depth\n\n        message = struct.pack(self.byte_order + \"BB\" + self.idx_format + self.idx_format + \"B\",\n                              1 + 4 + 4 + 1,\n                              JERRY_DEBUGGER_GET_BACKTRACE,\n                              min_depth,\n                              max_depth,\n                              get_total)\n\n        self.channel.send_message(self.byte_order, message)\n\n        self.prompt = False\n        return \"\"\n\n    def eval(self, code):\n        self._send_string(JERRY_DEBUGGER_EVAL_EVAL + code, JERRY_DEBUGGER_EVAL)\n        self.prompt = False\n\n    def eval_at(self, code, index):\n        self._send_string(JERRY_DEBUGGER_EVAL_EVAL + code, JERRY_DEBUGGER_EVAL, index)\n        self.prompt = False\n\n    def throw(self, code):\n        self._send_string(JERRY_DEBUGGER_EVAL_THROW + code, JERRY_DEBUGGER_EVAL)\n        self.prompt = False\n\n    def abort(self, args):\n        self.delete(\"all\")\n        self.exception(\"0\")  # disable the exception handler\n        self._send_string(JERRY_DEBUGGER_EVAL_ABORT + args, JERRY_DEBUGGER_EVAL)\n        self.prompt = False\n\n    def restart(self):\n        self._send_string(JERRY_DEBUGGER_EVAL_ABORT + \"\\\"r353t\\\"\", JERRY_DEBUGGER_EVAL)\n        self.prompt = False\n\n    def exception(self, args):\n        try:\n            enabled = int(args)\n        except (ValueError, TypeError):\n            enabled = -1\n\n        if enabled not in [0, 1]:\n            return \"Error: Invalid input! Usage 1: [Enable] or 0: [Disable]\\n\"\n\n        if enabled:\n            logging.debug(\"Stop at exception enabled\")\n            self._send_exception_config(enabled)\n\n            return \"Stop at exception enabled\\n\"\n\n        logging.debug(\"Stop at exception disabled\")\n        self._send_exception_config(enabled)\n\n        return \"Stop at exception disabled\\n\"\n\n    def scope_chain(self):\n        self.prompt = False\n        self._exec_command(JERRY_DEBUGGER_GET_SCOPE_CHAIN)\n\n    def scope_variables(self, args):\n        index = 0\n        if args:\n            try:\n                index = int(args)\n                if index < 0:\n                    print(\"Error: A non negative integer number expected\")\n                    return \"\"\n\n            except ValueError as val_errno:\n                return \"Error: Non negative integer number expected, %s\\n\" % (val_errno)\n\n        message = struct.pack(self.byte_order + \"BB\" + self.idx_format,\n                              1 + 4,\n                              JERRY_DEBUGGER_GET_SCOPE_VARIABLES,\n                              index)\n\n        self.channel.send_message(self.byte_order, message)\n\n        self.prompt = False\n        return \"\"\n\n    def memstats(self):\n        self.prompt = False\n        self._exec_command(JERRY_DEBUGGER_MEMSTATS)\n\n    def _send_string(self, args, message_type, index=0):\n\n        # 1: length of type byte\n        # 4: length of an uint32 value\n        message_header = 1 + 4\n\n        # Add scope chain index\n        if message_type == JERRY_DEBUGGER_EVAL:\n            args = struct.pack(self.byte_order + \"I\", index) + args\n\n        size = len(args)\n\n        max_fragment = min(self.max_message_size - message_header, size)\n\n        message = struct.pack(self.byte_order + \"BBI\",\n                              max_fragment + message_header,\n                              message_type,\n                              size)\n\n        if size == max_fragment:\n            self.channel.send_message(self.byte_order, message + args)\n            return\n\n        self.channel.send_message(self.byte_order, message + args[0:max_fragment])\n        offset = max_fragment\n\n        if message_type == JERRY_DEBUGGER_EVAL:\n            message_type = JERRY_DEBUGGER_EVAL_PART\n        else:\n            message_type = JERRY_DEBUGGER_CLIENT_SOURCE_PART\n\n        # 1: length of type byte\n        message_header = 1\n\n        max_fragment = self.max_message_size - message_header\n        while offset < size:\n            next_fragment = min(max_fragment, size - offset)\n\n            message = struct.pack(self.byte_order + \"BB\",\n                                  next_fragment + message_header,\n                                  message_type)\n\n            prev_offset = offset\n            offset += next_fragment\n\n            self.channel.send_message(self.byte_order, message + args[prev_offset:offset])\n\n    def _breakpoint_pending_exists(self, breakpoint):\n        for existing_bp in self.pending_breakpoint_list.values():\n            if (breakpoint.line and existing_bp.source_name == breakpoint.source_name and \\\n                  existing_bp.line == breakpoint.line) \\\n               or (not breakpoint.line and existing_bp.function == breakpoint.function):\n                return True\n\n        return False\n\n    def _send_breakpoint(self, breakpoint):\n        message = struct.pack(self.byte_order + \"BBB\" + self.cp_format + self.idx_format,\n                              1 + 1 + self.cp_size + 4,\n                              JERRY_DEBUGGER_UPDATE_BREAKPOINT,\n                              int(breakpoint.active_index >= 0),\n                              breakpoint.function.byte_code_cp,\n                              breakpoint.offset)\n        self.channel.send_message(self.byte_order, message)\n\n    def _send_bytecode_cp(self, byte_code_cp):\n        message = struct.pack(self.byte_order + \"BB\" + self.cp_format,\n                              1 + self.cp_size,\n                              JERRY_DEBUGGER_FREE_BYTE_CODE_CP,\n                              byte_code_cp)\n        self.channel.send_message(self.byte_order, message)\n\n    def _send_exception_config(self, enable):\n        message = struct.pack(self.byte_order + \"BBB\",\n                              1 + 1,\n                              JERRY_DEBUGGER_EXCEPTION_CONFIG,\n                              enable)\n        self.channel.send_message(self.byte_order, message)\n\n    def _send_parser_config(self, enable):\n        message = struct.pack(self.byte_order + \"BBB\",\n                              1 + 1,\n                              JERRY_DEBUGGER_PARSER_CONFIG,\n                              enable)\n        self.channel.send_message(self.byte_order, message)\n\n    def store_client_sources(self, args):\n        self.client_sources = args\n\n    def send_client_source(self):\n        # Send no more source message if there is no source\n        if not self.client_sources:\n            self.send_no_more_source()\n            return\n\n        path = self.client_sources.pop(0)\n        if not path.lower().endswith('.js'):\n            sys.exit(\"Error: Javascript file expected!\")\n            return\n\n        with open(path, 'r') as src_file:\n            content = path + \"\\0\" + src_file.read()\n            self._send_string(content, JERRY_DEBUGGER_CLIENT_SOURCE)\n\n    def send_no_more_source(self):\n        self._exec_command(JERRY_DEBUGGER_NO_MORE_SOURCES)\n\n    # pylint: disable=too-many-branches,too-many-locals,too-many-statements,too-many-return-statements\n    def process_messages(self):\n        result = \"\"\n        while True:\n            data = self.channel.get_message(False)\n            if not self.non_interactive:\n                if sys.stdin in select.select([sys.stdin], [], [], 0)[0]:\n                    sys.stdin.readline()\n                    self.stop()\n\n            if data == b'':\n                action_type = DebuggerAction.PROMPT if self.prompt else DebuggerAction.WAIT\n                return DebuggerAction(action_type, \"\")\n\n            if not data:  # Break the while loop if there is no more data.\n                return DebuggerAction(DebuggerAction.END, \"\")\n\n            buffer_type = ord(data[0])\n            buffer_size = len(data) -1\n\n            logging.debug(\"Main buffer type: %d, message size: %d\", buffer_type, buffer_size)\n\n            if buffer_type in [JERRY_DEBUGGER_PARSE_ERROR,\n                               JERRY_DEBUGGER_BYTE_CODE_CP,\n                               JERRY_DEBUGGER_PARSE_FUNCTION,\n                               JERRY_DEBUGGER_BREAKPOINT_LIST,\n                               JERRY_DEBUGGER_SOURCE_CODE,\n                               JERRY_DEBUGGER_SOURCE_CODE_END,\n                               JERRY_DEBUGGER_SOURCE_CODE_NAME,\n                               JERRY_DEBUGGER_SOURCE_CODE_NAME_END,\n                               JERRY_DEBUGGER_FUNCTION_NAME,\n                               JERRY_DEBUGGER_FUNCTION_NAME_END]:\n                result = self._parse_source(data)\n                if result:\n                    return DebuggerAction(DebuggerAction.TEXT, result)\n\n            elif buffer_type == JERRY_DEBUGGER_WAITING_AFTER_PARSE:\n                self._exec_command(JERRY_DEBUGGER_PARSER_RESUME)\n\n            elif buffer_type == JERRY_DEBUGGER_RELEASE_BYTE_CODE_CP:\n                self._release_function(data)\n\n            elif buffer_type in [JERRY_DEBUGGER_BREAKPOINT_HIT, JERRY_DEBUGGER_EXCEPTION_HIT]:\n                breakpoint_data = struct.unpack(self.byte_order + self.cp_format + self.idx_format, data[1:])\n\n                breakpoint = self._get_breakpoint(breakpoint_data)\n                self.last_breakpoint_hit = breakpoint[0]\n\n                if buffer_type == JERRY_DEBUGGER_EXCEPTION_HIT:\n                    result += \"Exception throw detected (to disable automatic stop type exception 0)\\n\"\n                    if self.exception_string:\n                        result += \"Exception hint: %s\\n\" % (self.exception_string)\n                        self.exception_string = \"\"\n\n                if breakpoint[1]:\n                    breakpoint_info = \"at\"\n                else:\n                    breakpoint_info = \"around\"\n\n                if breakpoint[0].active_index >= 0:\n                    breakpoint_info += \" breakpoint:%s%d%s\" % (self.red, breakpoint[0].active_index, self.nocolor)\n\n                result += \"Stopped %s %s\\n\" % (breakpoint_info, breakpoint[0])\n\n                if self.display > 0:\n                    result += self.print_source(self.display, self.src_offset)\n\n                self.prompt = True\n                return DebuggerAction(DebuggerAction.TEXT, result)\n\n            elif buffer_type == JERRY_DEBUGGER_EXCEPTION_STR:\n                self.exception_string += data[1:]\n\n            elif buffer_type == JERRY_DEBUGGER_EXCEPTION_STR_END:\n                self.exception_string += data[1:]\n\n            elif buffer_type == JERRY_DEBUGGER_BACKTRACE_TOTAL:\n                total = struct.unpack(self.byte_order + self.idx_format, data[1:])[0]\n                result += \"Total number of frames: %d\\n\" % (total)\n                return DebuggerAction(DebuggerAction.TEXT, result)\n\n            elif buffer_type in [JERRY_DEBUGGER_BACKTRACE, JERRY_DEBUGGER_BACKTRACE_END]:\n                frame_index = self.frame_index\n\n                buffer_pos = 1\n                while buffer_size > 0:\n                    breakpoint_data = struct.unpack(self.byte_order + self.cp_format + self.idx_format,\n                                                    data[buffer_pos: buffer_pos + self.cp_size + 4])\n\n                    breakpoint = self._get_breakpoint(breakpoint_data)\n\n                    result += \"Frame %d: %s\\n\" % (frame_index, breakpoint[0])\n\n                    frame_index += 1\n                    buffer_pos += self.cp_size + 4\n                    buffer_size -= self.cp_size + 4\n\n                if buffer_type == JERRY_DEBUGGER_BACKTRACE_END:\n                    self.prompt = True\n                else:\n                    self.frame_index = frame_index\n\n                return DebuggerAction(DebuggerAction.TEXT, result)\n\n            elif buffer_type in [JERRY_DEBUGGER_EVAL_RESULT,\n                                 JERRY_DEBUGGER_EVAL_RESULT_END,\n                                 JERRY_DEBUGGER_OUTPUT_RESULT,\n                                 JERRY_DEBUGGER_OUTPUT_RESULT_END]:\n\n                result = self._process_incoming_text(buffer_type, data)\n                return DebuggerAction(DebuggerAction.TEXT, result)\n\n            elif buffer_type == JERRY_DEBUGGER_MEMSTATS_RECEIVE:\n\n                memory_stats = struct.unpack(self.byte_order + self.idx_format * 5,\n                                             data[1: 1 + 4 * 5])\n\n                result += \"Allocated bytes: %s\\n\" % memory_stats[0]\n                result += \"Byte code bytes: %s\\n\" % memory_stats[1]\n                result += \"String bytes: %s\\n\" % memory_stats[2]\n                result += \"Object bytes: %s\\n\" % memory_stats[3]\n                result += \"Property bytes: %s\\n\" % memory_stats[4]\n\n                self.prompt = True\n                return DebuggerAction(DebuggerAction.TEXT, result)\n\n            elif buffer_type == JERRY_DEBUGGER_WAIT_FOR_SOURCE:\n                self.send_client_source()\n\n            elif buffer_type in [JERRY_DEBUGGER_SCOPE_CHAIN, JERRY_DEBUGGER_SCOPE_CHAIN_END]:\n                self.scope_data = data[1:]\n\n                if buffer_type == JERRY_DEBUGGER_SCOPE_CHAIN_END:\n                    result = self._process_scope()\n                    self.scope_data = \"\"\n\n                    self.prompt = True\n\n                return DebuggerAction(DebuggerAction.TEXT, result)\n\n            elif buffer_type in [JERRY_DEBUGGER_SCOPE_VARIABLES, JERRY_DEBUGGER_SCOPE_VARIABLES_END]:\n                self.scope_vars += \"\".join(data[1:])\n\n                if buffer_type == JERRY_DEBUGGER_SCOPE_VARIABLES_END:\n                    result = self._process_scope_variables()\n                    self.scope_vars = \"\"\n\n                    self.prompt = True\n\n                return DebuggerAction(DebuggerAction.TEXT, result)\n\n            elif JERRY_DEBUGGER_CLOSE_CONNECTION:\n                return DebuggerAction(DebuggerAction.END, \"\")\n\n            else:\n                raise Exception(\"Unknown message\")\n\n    def print_source(self, line_num, offset):\n        msg = \"\"\n        last_bp = self.last_breakpoint_hit\n\n        if not last_bp:\n            return \"\"\n\n        lines = last_bp.function.source\n        if last_bp.function.source_name:\n            msg += \"Source: %s\\n\" % (last_bp.function.source_name)\n\n        if line_num == 0:\n            start = 0\n            end = len(last_bp.function.source)\n        else:\n            start = max(last_bp.line - line_num, 0)\n            end = min(last_bp.line + line_num - 1, len(last_bp.function.source))\n            if offset:\n                if start + offset < 0:\n                    self.src_offset += self.src_offset_diff\n                    offset += self.src_offset_diff\n                elif end + offset > len(last_bp.function.source):\n                    self.src_offset -= self.src_offset_diff\n                    offset -= self.src_offset_diff\n\n                start = max(start + offset, 0)\n                end = min(end + offset, len(last_bp.function.source))\n\n        for i in range(start, end):\n            if i == last_bp.line - 1:\n                msg += \"%s%4d%s %s>%s %s\\n\" % (self.green, i + 1, self.nocolor, self.red, \\\n                                                         self.nocolor, lines[i])\n            else:\n                msg += \"%s%4d%s   %s\\n\" % (self.green, i + 1, self.nocolor, lines[i])\n\n        return msg\n\n\n    # pylint: disable=too-many-branches,too-many-locals,too-many-statements\n    def _parse_source(self, data):\n        source_code = \"\"\n        source_code_name = \"\"\n        function_name = \"\"\n        stack = [{\"line\": 1,\n                  \"column\": 1,\n                  \"name\": \"\",\n                  \"lines\": [],\n                  \"offsets\": []}]\n        new_function_list = {}\n        result = \"\"\n\n        while True:\n            if data is None:\n                return \"Error: connection lost during source code receiving\"\n\n            buffer_type = ord(data[0])\n            buffer_size = len(data) - 1\n\n            logging.debug(\"Parser buffer type: %d, message size: %d\", buffer_type, buffer_size)\n\n            if buffer_type == JERRY_DEBUGGER_PARSE_ERROR:\n                logging.error(\"Syntax error found\")\n                return \"\"\n\n            elif buffer_type in [JERRY_DEBUGGER_SOURCE_CODE, JERRY_DEBUGGER_SOURCE_CODE_END]:\n                source_code += data[1:]\n\n            elif buffer_type in [JERRY_DEBUGGER_SOURCE_CODE_NAME, JERRY_DEBUGGER_SOURCE_CODE_NAME_END]:\n                source_code_name += data[1:]\n\n            elif buffer_type in [JERRY_DEBUGGER_FUNCTION_NAME, JERRY_DEBUGGER_FUNCTION_NAME_END]:\n                function_name += data[1:]\n\n            elif buffer_type == JERRY_DEBUGGER_PARSE_FUNCTION:\n                logging.debug(\"Source name: %s, function name: %s\", source_code_name, function_name)\n\n                position = struct.unpack(self.byte_order + self.idx_format + self.idx_format,\n                                         data[1: 1 + 4 + 4])\n\n                stack.append({\"source\": source_code,\n                              \"source_name\": source_code_name,\n                              \"line\": position[0],\n                              \"column\": position[1],\n                              \"name\": function_name,\n                              \"lines\": [],\n                              \"offsets\": []})\n                function_name = \"\"\n\n            elif buffer_type in [JERRY_DEBUGGER_BREAKPOINT_LIST, JERRY_DEBUGGER_BREAKPOINT_OFFSET_LIST]:\n                name = \"lines\"\n                if buffer_type == JERRY_DEBUGGER_BREAKPOINT_OFFSET_LIST:\n                    name = \"offsets\"\n\n                logging.debug(\"Breakpoint %s received\", name)\n\n                buffer_pos = 1\n                while buffer_size > 0:\n                    line = struct.unpack(self.byte_order + self.idx_format,\n                                         data[buffer_pos: buffer_pos + 4])\n                    stack[-1][name].append(line[0])\n                    buffer_pos += 4\n                    buffer_size -= 4\n\n            elif buffer_type == JERRY_DEBUGGER_BYTE_CODE_CP:\n                byte_code_cp = struct.unpack(self.byte_order + self.cp_format,\n                                             data[1: 1 + self.cp_size])[0]\n\n                logging.debug(\"Byte code cptr received: {0x%x}\", byte_code_cp)\n\n                func_desc = stack.pop()\n\n                # We know the last item in the list is the general byte code.\n                if not stack:\n                    func_desc[\"source\"] = source_code\n                    func_desc[\"source_name\"] = source_code_name\n\n                function = JerryFunction(stack,\n                                         byte_code_cp,\n                                         func_desc[\"source\"],\n                                         func_desc[\"source_name\"],\n                                         func_desc[\"line\"],\n                                         func_desc[\"column\"],\n                                         func_desc[\"name\"],\n                                         func_desc[\"lines\"],\n                                         func_desc[\"offsets\"])\n\n                new_function_list[byte_code_cp] = function\n\n                if not stack:\n                    logging.debug(\"Parse completed.\")\n                    break\n\n            elif buffer_type == JERRY_DEBUGGER_RELEASE_BYTE_CODE_CP:\n                # Redefined functions are dropped during parsing.\n                byte_code_cp = struct.unpack(self.byte_order + self.cp_format,\n                                             data[1: 1 + self.cp_size])[0]\n\n                if byte_code_cp in new_function_list:\n                    del new_function_list[byte_code_cp]\n                    self._send_bytecode_cp(byte_code_cp)\n                else:\n                    self._release_function(data)\n\n            elif buffer_type in [JERRY_DEBUGGER_OUTPUT_RESULT,\n                                 JERRY_DEBUGGER_OUTPUT_RESULT_END]:\n                result += self._process_incoming_text(buffer_type, data)\n\n            else:\n                logging.error(\"Parser error!\")\n                raise Exception(\"Unexpected message\")\n\n            data = self.channel.get_message(True)\n\n        # Copy the ready list to the global storage.\n        self.function_list.update(new_function_list)\n\n        for function in new_function_list.values():\n            for line, breakpoint in function.lines.items():\n                self.line_list.insert(line, breakpoint)\n\n        # Try to set the pending breakpoints\n        if self.pending_breakpoint_list:\n            logging.debug(\"Pending breakpoints available\")\n            bp_list = self.pending_breakpoint_list\n\n            for breakpoint_index, breakpoint in bp_list.items():\n                source_lines = 0\n                for src in new_function_list.values():\n                    if (src.source_name == breakpoint.source_name or\n                            src.source_name.endswith(\"/\" + breakpoint.source_name) or\n                            src.source_name.endswith(\"\\\\\" + breakpoint.source_name)):\n                        source_lines = len(src.source)\n                        break\n\n                if breakpoint.line:\n                    if breakpoint.line <= source_lines:\n                        command = breakpoint.source_name + \":\" + str(breakpoint.line)\n                        set_result = self._set_breakpoint(command, True)\n\n                        if set_result:\n                            result += set_result\n                            del bp_list[breakpoint_index]\n                elif breakpoint.function:\n                    command = breakpoint.function\n                    set_result = self._set_breakpoint(command, True)\n\n                    if set_result:\n                        result += set_result\n                        del bp_list[breakpoint_index]\n\n            if not bp_list:\n                self._send_parser_config(0)\n            return result\n\n        logging.debug(\"No pending breakpoints\")\n        return result\n\n\n    def _release_function(self, data):\n        byte_code_cp = struct.unpack(self.byte_order + self.cp_format,\n                                     data[1: 1 + self.cp_size])[0]\n\n        function = self.function_list[byte_code_cp]\n\n        for line, breakpoint in function.lines.items():\n            self.line_list.delete(line, breakpoint)\n            if breakpoint.active_index >= 0:\n                del self.active_breakpoint_list[breakpoint.active_index]\n\n        del self.function_list[byte_code_cp]\n        self._send_bytecode_cp(byte_code_cp)\n        logging.debug(\"Function {0x%x} byte-code released\", byte_code_cp)\n\n\n    def _enable_breakpoint(self, breakpoint):\n        if isinstance(breakpoint, JerryPendingBreakpoint):\n            if self._breakpoint_pending_exists(breakpoint):\n                return \"%sPending breakpoint%s already exists\\n\" % (self.yellow, self.nocolor)\n\n            self.next_breakpoint_index += 1\n            breakpoint.index = self.next_breakpoint_index\n            self.pending_breakpoint_list[self.next_breakpoint_index] = breakpoint\n            return (\"%sPending breakpoint %d%s at %s\\n\" % (self.yellow,\n                                                           breakpoint.index,\n                                                           self.nocolor,\n                                                           breakpoint))\n\n        if breakpoint.active_index < 0:\n            self.next_breakpoint_index += 1\n            self.active_breakpoint_list[self.next_breakpoint_index] = breakpoint\n            breakpoint.active_index = self.next_breakpoint_index\n            self._send_breakpoint(breakpoint)\n\n        return \"%sBreakpoint %d%s at %s\\n\" % (self.green,\n                                              breakpoint.active_index,\n                                              self.nocolor,\n                                              breakpoint)\n\n\n    def _set_breakpoint(self, string, pending):\n        line = re.match(\"(.*):(\\\\d+)$\", string)\n        result = \"\"\n\n        if line:\n            source_name = line.group(1)\n            new_line = int(line.group(2))\n\n            for breakpoint in self.line_list.get(new_line):\n                func_source = breakpoint.function.source_name\n                if (source_name == func_source or\n                        func_source.endswith(\"/\" + source_name) or\n                        func_source.endswith(\"\\\\\" + source_name)):\n\n                    result += self._enable_breakpoint(breakpoint)\n\n        else:\n            functions_to_enable = []\n            for function in self.function_list.values():\n                if function.name == string:\n                    functions_to_enable.append(function)\n\n            functions_to_enable.sort(key=lambda x: x.line)\n\n            for function in functions_to_enable:\n                result += self._enable_breakpoint(function.lines[function.first_breakpoint_line])\n\n        if not result and not pending:\n            print(\"No breakpoint found, do you want to add a %spending breakpoint%s? (y or [n]) \" % \\\n                  (self.yellow, self.nocolor), end='')\n\n            ans = sys.stdin.readline()\n            if ans in ['yes\\n', 'y\\n']:\n                if not self.pending_breakpoint_list:\n                    self._send_parser_config(1)\n\n                if line:\n                    breakpoint = JerryPendingBreakpoint(int(line.group(2)), line.group(1))\n                else:\n                    breakpoint = JerryPendingBreakpoint(function=string)\n                result += self._enable_breakpoint(breakpoint)\n\n        return result\n\n\n    def _get_breakpoint(self, breakpoint_data):\n        function = self.function_list[breakpoint_data[0]]\n        offset = breakpoint_data[1]\n\n        if offset in function.offsets:\n            return (function.offsets[offset], True)\n\n        if offset < function.first_breakpoint_offset:\n            return (function.offsets[function.first_breakpoint_offset], False)\n\n        nearest_offset = -1\n\n        for current_offset in function.offsets:\n            if current_offset <= offset and current_offset > nearest_offset:\n                nearest_offset = current_offset\n\n        return (function.offsets[nearest_offset], False)\n\n    def _process_incoming_text(self, buffer_type, data):\n        message = b\"\"\n        msg_type = buffer_type\n        while True:\n            if buffer_type in [JERRY_DEBUGGER_EVAL_RESULT_END,\n                               JERRY_DEBUGGER_OUTPUT_RESULT_END]:\n                subtype = ord(data[-1])\n                message += data[1:-1]\n                break\n            else:\n                message += data[1:]\n\n            data = self.channel.get_message(True)\n            buffer_type = ord(data[0])\n            # Checks if the next frame would be an invalid data frame.\n            # If it is not the message type, or the end type of it, an exception is thrown.\n            if buffer_type not in [msg_type, msg_type + 1]:\n                raise Exception(\"Invalid data caught\")\n\n        # Subtypes of output\n        if buffer_type == JERRY_DEBUGGER_OUTPUT_RESULT_END:\n            if subtype == JERRY_DEBUGGER_OUTPUT_OK:\n                log_type = \"%sout:%s \" % (self.blue, self.nocolor)\n\n                message = self.current_out + message\n                lines = message.split(\"\\n\")\n                self.current_out = lines.pop()\n\n                return \"\".join([\"%s%s\\n\" % (log_type, line) for line in lines])\n\n            if subtype == JERRY_DEBUGGER_OUTPUT_DEBUG:\n                log_type = \"%slog:%s \" % (self.yellow, self.nocolor)\n\n                message = self.current_log + message\n                lines = message.split(\"\\n\")\n                self.current_log = lines.pop()\n\n                return \"\".join([\"%s%s\\n\" % (log_type, line) for line in lines])\n\n            if not message.endswith(\"\\n\"):\n                message += \"\\n\"\n\n            if subtype == JERRY_DEBUGGER_OUTPUT_WARNING:\n                return \"%swarning: %s%s\" % (self.yellow, self.nocolor, message)\n            elif subtype == JERRY_DEBUGGER_OUTPUT_ERROR:\n                return \"%serr: %s%s\" % (self.red, self.nocolor, message)\n            elif subtype == JERRY_DEBUGGER_OUTPUT_TRACE:\n                return \"%strace: %s%s\" % (self.blue, self.nocolor, message)\n\n        # Subtypes of eval\n        self.prompt = True\n\n        if not message.endswith(\"\\n\"):\n            message += \"\\n\"\n\n        if subtype == JERRY_DEBUGGER_EVAL_ERROR:\n            return \"Uncaught exception: %s\" % (message)\n        return message\n\n    def _process_scope_variables(self):\n        buff_size = len(self.scope_vars)\n        buff_pos = 0\n\n        table = [['name', 'type', 'value']]\n\n        while buff_pos != buff_size:\n            # Process name\n            name_length = ord(self.scope_vars[buff_pos:buff_pos + 1])\n            buff_pos += 1\n            name = self.scope_vars[buff_pos:buff_pos + name_length]\n            buff_pos += name_length\n\n            # Process type\n            value_type = ord(self.scope_vars[buff_pos:buff_pos + 1])\n\n            buff_pos += 1\n\n            value_length = ord(self.scope_vars[buff_pos:buff_pos + 1])\n            buff_pos += 1\n            value = self.scope_vars[buff_pos: buff_pos + value_length]\n            buff_pos += value_length\n\n            if value_type == JERRY_DEBUGGER_VALUE_UNDEFINED:\n                table.append([name, 'undefined', value])\n            elif value_type == JERRY_DEBUGGER_VALUE_NULL:\n                table.append([name, 'Null', value])\n            elif value_type == JERRY_DEBUGGER_VALUE_BOOLEAN:\n                table.append([name, 'Boolean', value])\n            elif value_type == JERRY_DEBUGGER_VALUE_NUMBER:\n                table.append([name, 'Number', value])\n            elif value_type == JERRY_DEBUGGER_VALUE_STRING:\n                table.append([name, 'String', value])\n            elif value_type == JERRY_DEBUGGER_VALUE_FUNCTION:\n                table.append([name, 'Function', value])\n            elif value_type == JERRY_DEBUGGER_VALUE_ARRAY:\n                table.append([name, 'Array', '[' + value + ']'])\n            elif value_type == JERRY_DEBUGGER_VALUE_OBJECT:\n                table.append([name, 'Object', value])\n\n        result = self._form_table(table)\n\n        return result\n\n    def _process_scope(self):\n        result = \"\"\n        table = [['level', 'type']]\n\n        for i, level in enumerate(self.scope_data):\n            if ord(level) == JERRY_DEBUGGER_SCOPE_WITH:\n                table.append([str(i), 'with'])\n            elif ord(level) == JERRY_DEBUGGER_SCOPE_GLOBAL:\n                table.append([str(i), 'global'])\n            elif ord(level) == JERRY_DEBUGGER_SCOPE_NON_CLOSURE:\n                # Currently it is only marks the catch closure.\n                table.append([str(i), 'catch'])\n            elif ord(level) == JERRY_DEBUGGER_SCOPE_LOCAL:\n                table.append([str(i), 'local'])\n            elif ord(level) == JERRY_DEBUGGER_SCOPE_CLOSURE:\n                table.append([str(i), 'closure'])\n            else:\n                raise Exception(\"Unexpected scope chain element\")\n\n        result = self._form_table(table)\n\n        return result\n\n    def _form_table(self, table):\n        result = \"\"\n        col_width = [max(len(x) for x in col) for col in zip(*table)]\n        for line in table:\n            result += \" | \".join(\"{:{}}\".format(x, col_width[i])\n                                 for i, x in enumerate(line)) + \" \\n\"\n\n        return result\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-debugger/jerry_client_rawpacket.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport struct\n\nMAX_BUFFER_SIZE = 256\n\nclass RawPacket(object):\n    \"\"\" Simplified transmission layer. \"\"\"\n    def __init__(self, protocol):\n        self.protocol = protocol\n        self.data_buffer = b\"\"\n\n    def connect(self, config_size):\n        \"\"\"  Create connection. \"\"\"\n        self.protocol.connect()\n        self.data_buffer = b\"\"\n\n        # It will return with the Network configurations, which has the following struct:\n        # header [1] - size[1]\n        # configuration [config_size]\n        len_expected = config_size + 1\n\n        while len(self.data_buffer) < len_expected:\n            self.data_buffer += self.protocol.receive_data()\n\n        expected = struct.pack(\"B\", config_size)\n\n        if self.data_buffer[0:1] != expected:\n            raise Exception(\"Unexpected configuration\")\n\n        result = self.data_buffer[1:len_expected]\n        self.data_buffer = self.data_buffer[len_expected:]\n\n        return result\n\n    def close(self):\n        \"\"\" Close connection. \"\"\"\n        self.protocol.close()\n\n    def send_message(self, _, data):\n        \"\"\" Send message. \"\"\"\n        msg_size = len(data)\n\n        while msg_size > 0:\n            bytes_send = self.protocol.send_data(data)\n            if bytes_send < msg_size:\n                data = data[bytes_send:]\n            msg_size -= bytes_send\n\n    def get_message(self, blocking):\n        \"\"\" Receive message. \"\"\"\n\n        # Connection was closed\n        if self.data_buffer is None:\n            return None\n\n        while True:\n            if len(self.data_buffer) >= 1:\n                size = ord(self.data_buffer[0])\n                if size == 0:\n                    raise Exception(\"Unexpected data frame\")\n\n                if len(self.data_buffer) >= size + 1:\n                    result = self.data_buffer[1:size + 1]\n                    self.data_buffer = self.data_buffer[size + 1:]\n                    return result\n\n            if not blocking and not self.protocol.ready():\n                return b''\n\n            received_data = self.protocol.receive_data(MAX_BUFFER_SIZE)\n\n            if not received_data:\n                return None\n\n            self.data_buffer += received_data\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-debugger/jerry_client_serial.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport select\nimport serial\n\nclass Serial(object):\n    \"\"\" Create a new socket using the given address family, socket type and protocol number. \"\"\"\n    def __init__(self, serial_config):\n        config = serial_config.split(',')\n        config_size = len(config)\n\n        port = config[0] if config_size > 0 else \"/dev/ttyUSB0\"\n        baudrate = config[1] if config_size > 1 else 115200\n        bytesize = int(config[2]) if config_size > 2 else 8\n        parity = config[3] if config_size > 3 else 'N'\n        stopbits = int(config[4]) if config_size > 4 else 1\n\n        self.ser = serial.Serial(port=port, baudrate=baudrate, parity=parity,\n                                 stopbits=stopbits, bytesize=bytesize, timeout=1)\n\n    def connect(self):\n        \"\"\" Connect to the server, write a 'c' to the serial port \"\"\"\n        self.send_data('c')\n\n    def close(self):\n        \"\"\"\"  close the serial port. \"\"\"\n        self.ser.close()\n\n    def receive_data(self, max_size=1024):\n        \"\"\" The maximum amount of data to be received at once is specified by max_size. \"\"\"\n        return self.ser.read(max_size)\n\n    def send_data(self, data):\n        \"\"\" Write data to the serial port. \"\"\"\n        return self.ser.write(data)\n\n    def ready(self):\n        \"\"\" Monitor the file descriptor. \"\"\"\n        result = select.select([self.ser.fileno()], [], [], 0)[0]\n\n        return self.ser.fileno() in result\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-debugger/jerry_client_tcp.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport socket\nimport select\n\n# pylint: disable=too-many-arguments,superfluous-parens\nclass Socket(object):\n    \"\"\" Create a new socket using the given address family, socket type and protocol number. \"\"\"\n    def __init__(self, address, socket_family=socket.AF_INET, socket_type=socket.SOCK_STREAM, proto=0, fileno=None):\n        self.address = address\n        self.socket = socket.socket(socket_family, socket_type, proto, fileno)\n\n    def connect(self):\n        \"\"\"\n        Connect to a remote socket at address (host, port).\n        The format of address depends on the address family.\n        \"\"\"\n        print(\"Connecting to: %s:%s\" % (self.address[0], self.address[1]))\n        self.socket.connect(self.address)\n\n    def close(self):\n        \"\"\"\" Mark the socket closed. \"\"\"\n        self.socket.close()\n\n    def receive_data(self, max_size=1024):\n        \"\"\" The maximum amount of data to be received at once is specified by max_size. \"\"\"\n        return self.socket.recv(max_size)\n\n    def send_data(self, data):\n        \"\"\" Send data to the socket. The socket must be connected to a remote socket. \"\"\"\n        return self.socket.send(data)\n\n    def ready(self):\n        \"\"\" Monitor the file descriptor. \"\"\"\n        result = select.select([self.socket], [], [], 0)[0]\n\n        return self.socket in result\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-debugger/jerry_client_websocket.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport struct\n\nMAX_BUFFER_SIZE = 128\nWEBSOCKET_BINARY_FRAME = 2\nWEBSOCKET_FIN_BIT = 0x80\n\nclass WebSocket(object):\n    def __init__(self, protocol):\n\n        self.data_buffer = b\"\"\n        self.protocol = protocol\n\n    def __handshake(self):\n        \"\"\" Client Handshake Request. \"\"\"\n        self.__send_data(b\"GET /jerry-debugger HTTP/1.1\\r\\n\" +\n                         b\"Upgrade: websocket\\r\\n\" +\n                         b\"Connection: Upgrade\\r\\n\" +\n                         b\"Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\\r\\n\\r\\n\")\n\n        # Expected answer from the handshake.\n        expected = (b\"HTTP/1.1 101 Switching Protocols\\r\\n\" +\n                    b\"Upgrade: websocket\\r\\n\" +\n                    b\"Connection: Upgrade\\r\\n\" +\n                    b\"Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\\r\\n\\r\\n\")\n\n        len_expected = len(expected)\n\n        while len(self.data_buffer) < len_expected:\n            self.data_buffer += self.protocol.receive_data()\n\n        if self.data_buffer[0:len_expected] != expected:\n            raise Exception(\"Unexpected handshake\")\n\n        if len(self.data_buffer) > len_expected:\n            self.data_buffer = self.data_buffer[len_expected:]\n        else:\n            self.data_buffer = b\"\"\n\n    def connect(self, config_size):\n        \"\"\"  WebSockets connection. \"\"\"\n        self.protocol.connect()\n        self.data_buffer = b\"\"\n        self.__handshake()\n\n        # It will return with the Network configurations, which has the following struct:\n        # header [2] - opcode[1], size[1]\n        # configuration [config_size]\n        len_expected = config_size + 2\n\n        while len(self.data_buffer) < len_expected:\n            self.data_buffer += self.protocol.receive_data()\n\n        expected = struct.pack(\"BB\",\n                               WEBSOCKET_BINARY_FRAME | WEBSOCKET_FIN_BIT,\n                               config_size)\n\n        if self.data_buffer[0:2] != expected:\n            raise Exception(\"Unexpected configuration\")\n\n        result = self.data_buffer[2:len_expected]\n        self.data_buffer = self.data_buffer[len_expected:]\n\n        return result\n\n    def __send_data(self, data):\n        \"\"\" Private function to send data using the given protocol. \"\"\"\n        size = len(data)\n\n        while size > 0:\n            bytes_send = self.protocol.send_data(data)\n            if bytes_send < size:\n                data = data[bytes_send:]\n            size -= bytes_send\n\n    def send_message(self, byte_order, packed_data):\n        \"\"\" Send message. \"\"\"\n        message = struct.pack(byte_order + \"BBI\",\n                              WEBSOCKET_BINARY_FRAME | WEBSOCKET_FIN_BIT,\n                              WEBSOCKET_FIN_BIT + struct.unpack(byte_order + \"B\", packed_data[0])[0],\n                              0) + packed_data[1:]\n\n        self.__send_data(message)\n\n    def close(self):\n        \"\"\" Close the WebSockets connection. \"\"\"\n        self.protocol.close()\n\n    def get_message(self, blocking):\n        \"\"\" Receive message. \"\"\"\n\n        # Connection was closed\n        if self.data_buffer is None:\n            return None\n\n        while True:\n            if len(self.data_buffer) >= 2:\n                if ord(self.data_buffer[0]) != WEBSOCKET_BINARY_FRAME | WEBSOCKET_FIN_BIT:\n                    raise Exception(\"Unexpected data frame\")\n\n                size = ord(self.data_buffer[1])\n                if size == 0 or size >= 126:\n                    raise Exception(\"Unexpected data frame\")\n\n                if len(self.data_buffer) >= size + 2:\n                    result = self.data_buffer[2:size + 2]\n                    self.data_buffer = self.data_buffer[size + 2:]\n                    return result\n\n            if not blocking and not self.protocol.ready():\n                return b''\n\n            data = self.protocol.receive_data(MAX_BUFFER_SIZE)\n\n            if not data:\n                self.data_buffer = None\n                return None\n            self.data_buffer += data\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nset(JERRY_EXT_NAME jerry-ext)\nproject (${JERRY_EXT_NAME} C)\n\n# Optional features\nset(FEATURE_INIT_FINI OFF CACHE BOOL \"Enable library constructor/destructor support?\")\n\n# Status messages\nmessage(STATUS \"FEATURE_INIT_FINI              \" ${FEATURE_INIT_FINI})\n\n# Include directories\nset(INCLUDE_EXT_PUBLIC \"${CMAKE_CURRENT_SOURCE_DIR}/include\")\nset(INCLUDE_EXT_PRIVATE \"${CMAKE_CURRENT_SOURCE_DIR}/common\")\n\nset(INCLUDE_EXT_PUBLIC ${INCLUDE_EXT_PUBLIC} PARENT_SCOPE) # for jerry-port\n\nif(FEATURE_INIT_FINI)\n  set(DEFINES_EXT ${DEFINES_EXT} ENABLE_INIT_FINI)\nendif()\n\n# Source directories\nset(SOURCE_EXT\n  arg/arg-js-iterator-helper.c\n  arg/arg-transform-functions.c\n  arg/arg.c\n  debugger/debugger-common.c\n  debugger/debugger-rp.c\n  debugger/debugger-serial.c\n  debugger/debugger-sha1.c\n  debugger/debugger-tcp.c\n  debugger/debugger-ws.c\n  handle-scope/handle-scope-allocator.c\n  handle-scope/handle-scope.c\n  handler/handler-assert.c\n  handler/handler-gc.c\n  handler/handler-print.c\n  handler/handler-register.c\n  handler/handler-resource-name.c\n  module/module.c\n)\n\nadd_library(${JERRY_EXT_NAME} ${SOURCE_EXT})\n\ntarget_include_directories(${JERRY_EXT_NAME} PUBLIC ${INCLUDE_EXT_PUBLIC})\ntarget_include_directories(${JERRY_EXT_NAME} PRIVATE ${INCLUDE_EXT_PRIVATE})\ntarget_compile_definitions(${JERRY_EXT_NAME} PUBLIC ${DEFINES_EXT})\ntarget_link_libraries(${JERRY_EXT_NAME} jerry-core)\n\nset(JERRY_EXT_PKGCONFIG_LIBS)\n\nif(USING_MSVC AND JERRY_DEBUGGER)\n  target_link_libraries(${JERRY_EXT_NAME} ws2_32)\n  set(JERRY_EXT_PKGCONFIG_LIBS -lws2_32)\nendif()\n\nconfigure_file(libjerry-ext.pc.in libjerry-ext.pc @ONLY)\n\ninstall(TARGETS ${JERRY_EXT_NAME} DESTINATION lib)\ninstall(FILES ${CMAKE_CURRENT_BINARY_DIR}/libjerry-ext.pc DESTINATION lib/pkgconfig)\ninstall(DIRECTORY ${INCLUDE_EXT_PUBLIC}/ DESTINATION include)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/arg/arg-internal.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_ARG_INTERNAL_H\n#define JERRYX_ARG_INTERNAL_H\n\n#include \"jerryscript.h\"\n\n/**\n * The iterator structor for JS arguments.\n */\nstruct jerryx_arg_js_iterator_t\n{\n  const jerry_value_t *js_arg_p; /**< the JS arguments */\n  const jerry_length_t js_arg_cnt; /**< the total num of JS arguments */\n  jerry_length_t js_arg_idx; /**< current index of JS argument */\n};\n\n#endif /* !JERRYX_ARG_INTERNAL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/arg/arg-js-iterator-helper.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"arg-internal.h\"\n#include \"jerryscript-ext/arg.h\"\n#include \"jerryscript.h\"\n\n/**\n * Pop the current JS argument from the iterator.\n * It will change the index and js_arg_p value in the iterator.\n *\n * @return the current JS argument.\n */\njerry_value_t\njerryx_arg_js_iterator_pop (jerryx_arg_js_iterator_t *js_arg_iter_p) /**< the JS arg iterator */\n{\n  return (js_arg_iter_p->js_arg_idx++ < js_arg_iter_p->js_arg_cnt ? *js_arg_iter_p->js_arg_p++\n                                                                  : jerry_create_undefined ());\n} /* jerryx_arg_js_iterator_pop */\n\n/**\n * Restore the previous JS argument from the iterator.\n * It will change the index and js_arg_p value in the iterator.\n *\n * @return the restored (now current) JS argument.\n */\njerry_value_t\njerryx_arg_js_iterator_restore (jerryx_arg_js_iterator_t *js_arg_iter_p) /**< the JS arg iterator */\n{\n  if (js_arg_iter_p->js_arg_idx == 0)\n  {\n    return jerry_create_undefined ();\n  }\n\n  --js_arg_iter_p->js_arg_idx;\n  --js_arg_iter_p->js_arg_p;\n\n  return *js_arg_iter_p->js_arg_p;\n} /* jerryx_arg_js_iterator_restore */\n\n/**\n * Get the current JS argument from the iterator.\n *\n * Note:\n *     Unlike jerryx_arg_js_iterator_pop, it will not change index and\n *     js_arg_p value in the iterator.\n *\n * @return the current JS argument.\n */\njerry_value_t\njerryx_arg_js_iterator_peek (jerryx_arg_js_iterator_t *js_arg_iter_p) /**< the JS arg iterator */\n{\n  return (js_arg_iter_p->js_arg_idx < js_arg_iter_p->js_arg_cnt ? *js_arg_iter_p->js_arg_p\n                                                                : jerry_create_undefined ());\n} /* jerryx_arg_js_iterator_peek */\n\n/**\n * Get the index of the current JS argument\n *\n * @return the index\n */\njerry_length_t\njerryx_arg_js_iterator_index (jerryx_arg_js_iterator_t *js_arg_iter_p) /**< the JS arg iterator */\n{\n  return js_arg_iter_p->js_arg_idx;\n} /* jerryx_arg_js_iterator_index */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/arg/arg-transform-functions.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"jerryscript-ext/arg.h\"\n#include \"jerryscript.h\"\n\n/**\n * The common function to deal with optional arguments.\n * The core transform function is provided by argument `func`.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_optional (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                               const jerryx_arg_t *c_arg_p, /**< native arg */\n                               jerryx_arg_transform_func_t func) /**< the core transform function */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_peek (js_arg_iter_p);\n\n  if (jerry_value_is_undefined (js_arg))\n  {\n    return jerryx_arg_js_iterator_pop (js_arg_iter_p);\n  }\n\n  return func (js_arg_iter_p, c_arg_p);\n} /* jerryx_arg_transform_optional */\n\n/**\n * The common part in transforming a JS argument to a number (double or certain int) type.\n * Type coercion is not allowed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\nstatic jerry_value_t\njerryx_arg_transform_number_strict_common (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                           double *number_p) /**< [out] the number in JS arg */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  if (!jerry_value_is_number (js_arg))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"It is not a number.\");\n  }\n\n  *number_p = jerry_get_number_value (js_arg);\n\n  return jerry_create_undefined ();\n} /* jerryx_arg_transform_number_strict_common */\n\n/**\n * The common part in transforming a JS argument to a number (double or certain int) type.\n * Type coercion is allowed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\nstatic jerry_value_t\njerryx_arg_transform_number_common (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                    double *number_p) /**< [out] the number in JS arg */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  jerry_value_t to_number = jerry_value_to_number (js_arg);\n\n  if (jerry_value_is_error (to_number))\n  {\n    jerry_release_value (to_number);\n\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"It can not be converted to a number.\");\n  }\n\n  *number_p = jerry_get_number_value (to_number);\n  jerry_release_value (to_number);\n\n  return jerry_create_undefined ();\n} /* jerryx_arg_transform_number_common */\n\n/**\n * Transform a JS argument to a double. Type coercion is not allowed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_number_strict (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                    const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  return jerryx_arg_transform_number_strict_common (js_arg_iter_p, c_arg_p->dest);\n} /* jerryx_arg_transform_number_strict */\n\n/**\n * Transform a JS argument to a double. Type coercion is allowed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_number (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                             const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  return jerryx_arg_transform_number_common (js_arg_iter_p, c_arg_p->dest);\n} /* jerryx_arg_transform_number */\n\n/**\n * Helper function to process a double number before converting it\n * to an integer.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\nstatic jerry_value_t\njerryx_arg_helper_process_double (double *d, /**< [in, out] the number to be processed */\n                                  double min, /**< the min value for clamping */\n                                  double max, /**< the max value for clamping */\n                                  jerryx_arg_int_option_t option) /**< the converting policies */\n{\n  if (*d != *d) /* isnan (*d) triggers conversion warning on clang<9 */\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"The number is NaN.\");\n  }\n\n  if (option.clamp == JERRYX_ARG_NO_CLAMP)\n  {\n    if (*d > max || *d < min)\n    {\n      return jerry_create_error (JERRY_ERROR_TYPE,\n                                 (jerry_char_t *) \"The number is out of range.\");\n    }\n  }\n  else\n  {\n    *d = *d < min ? min : *d;\n    *d = *d > max ? max : *d;\n  }\n\n  if (option.round == JERRYX_ARG_ROUND)\n  {\n    *d = (*d >= 0.0) ? floor (*d + 0.5) : ceil (*d - 0.5);\n  }\n  else if (option.round == JERRYX_ARG_FLOOR)\n  {\n    *d = floor (*d);\n  }\n  else\n  {\n    *d = ceil (*d);\n  }\n\n  return jerry_create_undefined ();\n} /* jerryx_arg_helper_process_double */\n\n/**\n * Use the macro to define thr transform functions for int type.\n */\n#define JERRYX_ARG_TRANSFORM_FUNC_FOR_INT_TEMPLATE(type, suffix, min, max) \\\n  jerry_value_t jerryx_arg_transform_ ## type ## suffix (jerryx_arg_js_iterator_t *js_arg_iter_p, \\\n                                                         const jerryx_arg_t *c_arg_p) \\\n  { \\\n    double tmp = 0.0; \\\n    jerry_value_t rv = jerryx_arg_transform_number ## suffix ## _common (js_arg_iter_p, &tmp); \\\n    if (jerry_value_is_error (rv)) \\\n    { \\\n      return rv; \\\n    } \\\n    jerry_release_value (rv); \\\n    union \\\n    { \\\n      jerryx_arg_int_option_t int_option; \\\n      uintptr_t extra_info; \\\n    } u = { .extra_info = c_arg_p->extra_info }; \\\n    rv = jerryx_arg_helper_process_double (&tmp, min, max, u.int_option); \\\n    if (jerry_value_is_error (rv)) \\\n    { \\\n      return rv; \\\n    } \\\n    *(type ## _t *) c_arg_p->dest = (type ## _t) tmp; \\\n    return rv; \\\n  }\n\n#define JERRYX_ARG_TRANSFORM_FUNC_FOR_INT(type, min, max) \\\n  JERRYX_ARG_TRANSFORM_FUNC_FOR_INT_TEMPLATE (type, _strict, min, max) \\\n  JERRYX_ARG_TRANSFORM_FUNC_FOR_INT_TEMPLATE (type, , min, max)\n\nJERRYX_ARG_TRANSFORM_FUNC_FOR_INT (uint8, 0, UINT8_MAX)\nJERRYX_ARG_TRANSFORM_FUNC_FOR_INT (int8, INT8_MIN, INT8_MAX)\nJERRYX_ARG_TRANSFORM_FUNC_FOR_INT (uint16, 0, UINT16_MAX)\nJERRYX_ARG_TRANSFORM_FUNC_FOR_INT (int16, INT16_MIN, INT16_MAX)\nJERRYX_ARG_TRANSFORM_FUNC_FOR_INT (uint32, 0, UINT32_MAX)\nJERRYX_ARG_TRANSFORM_FUNC_FOR_INT (int32, INT32_MIN, INT32_MAX)\n\n#undef JERRYX_ARG_TRANSFORM_FUNC_FOR_INT_TEMPLATE\n#undef JERRYX_ARG_TRANSFORM_FUNC_FOR_INT\n/**\n * Transform a JS argument to a boolean. Type coercion is not allowed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_boolean_strict (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                     const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  if (!jerry_value_is_boolean (js_arg))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"It is not a boolean.\");\n  }\n\n  bool *dest = c_arg_p->dest;\n  *dest = jerry_get_boolean_value (js_arg);\n\n  return jerry_create_undefined ();\n} /* jerryx_arg_transform_boolean_strict */\n\n/**\n * Transform a JS argument to a boolean. Type coercion is allowed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_boolean (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                              const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  bool to_boolean = jerry_value_to_boolean (js_arg);\n\n  bool *dest = c_arg_p->dest;\n  *dest = to_boolean;\n\n  return jerry_create_undefined ();\n} /* jerryx_arg_transform_boolean */\n\n/**\n * The common routine for string transformer.\n * It works for both CESU-8 and UTF-8 string.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\nstatic jerry_value_t\njerryx_arg_string_to_buffer_common_routine (jerry_value_t js_arg, /**< JS arg */\n                                            const jerryx_arg_t *c_arg_p, /**< native arg */\n                                            bool is_utf8) /**< whether it is UTF-8 string */\n{\n  jerry_char_t *target_p = (jerry_char_t *) c_arg_p->dest;\n  jerry_size_t target_buf_size = (jerry_size_t) c_arg_p->extra_info;\n  jerry_size_t size;\n  jerry_length_t len;\n\n  if (!is_utf8)\n  {\n    size = jerry_string_to_char_buffer (js_arg,\n                                        target_p,\n                                        target_buf_size);\n    len = jerry_get_string_length (js_arg);\n  }\n  else\n  {\n    size = jerry_string_to_utf8_char_buffer (js_arg,\n                                             target_p,\n                                             target_buf_size);\n    len = jerry_get_utf8_string_length (js_arg);\n  }\n\n  if ((size == target_buf_size) || (size == 0 && len != 0))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"Buffer size is not large enough.\");\n  }\n\n  target_p[size] = '\\0';\n\n  return jerry_create_undefined ();\n} /* jerryx_arg_string_to_buffer_common_routine */\n\n/**\n * Transform a JS argument to a UTF-8/CESU-8 char array. Type coercion is not allowed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\nstatic jerry_value_t\njerryx_arg_transform_string_strict_common (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                           const jerryx_arg_t *c_arg_p, /**< the native arg */\n                                           bool is_utf8) /**< whether it is a UTF-8 string */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  if (!jerry_value_is_string (js_arg))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"It is not a string.\");\n  }\n\n  return jerryx_arg_string_to_buffer_common_routine (js_arg, c_arg_p, is_utf8);\n} /* jerryx_arg_transform_string_strict_common */\n\n/**\n * Transform a JS argument to a UTF-8/CESU-8 char array. Type coercion is allowed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\nstatic jerry_value_t\njerryx_arg_transform_string_common (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                    const jerryx_arg_t *c_arg_p, /**< the native arg */\n                                    bool is_utf8) /**< whether it is a UTF-8 string */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  jerry_value_t to_string = jerry_value_to_string (js_arg);\n\n  if (jerry_value_is_error (to_string))\n  {\n    jerry_release_value (to_string);\n\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"It can not be converted to a string.\");\n  }\n\n  jerry_value_t ret = jerryx_arg_string_to_buffer_common_routine (to_string, c_arg_p, is_utf8);\n  jerry_release_value (to_string);\n\n  return ret;\n} /* jerryx_arg_transform_string_common */\n\n/**\n * Transform a JS argument to a cesu8 char array. Type coercion is not allowed.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_string_strict (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                    const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  return jerryx_arg_transform_string_strict_common (js_arg_iter_p, c_arg_p, false);\n} /* jerryx_arg_transform_string_strict */\n\n/**\n * Transform a JS argument to a utf8 char array. Type coercion is not allowed.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_utf8_string_strict (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                         const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  return jerryx_arg_transform_string_strict_common (js_arg_iter_p, c_arg_p, true);\n} /* jerryx_arg_transform_utf8_string_strict */\n\n/**\n * Transform a JS argument to a cesu8 char array. Type coercion is allowed.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_string (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                             const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  return jerryx_arg_transform_string_common (js_arg_iter_p, c_arg_p, false);\n} /* jerryx_arg_transform_string */\n\n/**\n * Transform a JS argument to a utf8 char array. Type coercion is allowed.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_utf8_string (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                  const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  return jerryx_arg_transform_string_common (js_arg_iter_p, c_arg_p, true);\n} /* jerryx_arg_transform_utf8_string */\n\n/**\n * Check whether the JS argument is jerry function, if so, assign to the native argument.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_function (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                               const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  if (!jerry_value_is_function (js_arg))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"It is not a function.\");\n  }\n\n  jerry_value_t *func_p = c_arg_p->dest;\n  *func_p = jerry_acquire_value (js_arg);\n\n  return jerry_create_undefined ();\n} /* jerryx_arg_transform_function */\n\n/**\n * Check whether the native pointer has the expected type info.\n * If so, assign it to the native argument.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_native_pointer (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                     const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  if (!jerry_value_is_object (js_arg))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"It is not an object.\");\n  }\n\n  const jerry_object_native_info_t *expected_info_p;\n  expected_info_p = (const jerry_object_native_info_t *) c_arg_p->extra_info;\n  void **ptr_p = (void **) c_arg_p->dest;\n  bool is_ok = jerry_get_object_native_pointer (js_arg, ptr_p, expected_info_p);\n\n  if (!is_ok)\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"The object has no native pointer or type does not match.\");\n  }\n\n  return jerry_create_undefined ();\n} /* jerryx_arg_transform_native_pointer */\n\n/**\n * Check whether the JS object's properties have expected types, and transform them into native args.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_object_props (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                   const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  const jerryx_arg_object_props_t *object_props = (const jerryx_arg_object_props_t *) c_arg_p->extra_info;\n\n  return jerryx_arg_transform_object_properties (js_arg,\n                                                 object_props->name_p,\n                                                 object_props->name_cnt,\n                                                 object_props->c_arg_p,\n                                                 object_props->c_arg_cnt);\n} /* jerryx_arg_transform_object_props */\n\n/**\n * Check whether the JS array's items have expected types, and transform them into native args.\n *\n * @return jerry undefined: the transformer passes,\n *         jerry error: the transformer fails.\n */\njerry_value_t\njerryx_arg_transform_array_items (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                  const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n\n  const jerryx_arg_array_items_t *array_items_p = (const jerryx_arg_array_items_t *) c_arg_p->extra_info;\n\n  return jerryx_arg_transform_array (js_arg,\n                                     array_items_p->c_arg_p,\n                                     array_items_p->c_arg_cnt);\n} /* jerryx_arg_transform_array_items */\n\n/**\n * Define transformer for optional argument.\n */\n#define JERRYX_ARG_TRANSFORM_OPTIONAL(type) \\\n  jerry_value_t \\\n  jerryx_arg_transform_ ## type ## _optional (jerryx_arg_js_iterator_t *js_arg_iter_p, \\\n                                              const jerryx_arg_t *c_arg_p) \\\n  { \\\n    return jerryx_arg_transform_optional (js_arg_iter_p, c_arg_p, jerryx_arg_transform_ ## type); \\\n  }\n\nJERRYX_ARG_TRANSFORM_OPTIONAL (number)\nJERRYX_ARG_TRANSFORM_OPTIONAL (number_strict)\nJERRYX_ARG_TRANSFORM_OPTIONAL (boolean)\nJERRYX_ARG_TRANSFORM_OPTIONAL (boolean_strict)\nJERRYX_ARG_TRANSFORM_OPTIONAL (string)\nJERRYX_ARG_TRANSFORM_OPTIONAL (string_strict)\nJERRYX_ARG_TRANSFORM_OPTIONAL (utf8_string)\nJERRYX_ARG_TRANSFORM_OPTIONAL (utf8_string_strict)\nJERRYX_ARG_TRANSFORM_OPTIONAL (function)\nJERRYX_ARG_TRANSFORM_OPTIONAL (native_pointer)\nJERRYX_ARG_TRANSFORM_OPTIONAL (object_props)\nJERRYX_ARG_TRANSFORM_OPTIONAL (array_items)\n\nJERRYX_ARG_TRANSFORM_OPTIONAL (uint8)\nJERRYX_ARG_TRANSFORM_OPTIONAL (uint16)\nJERRYX_ARG_TRANSFORM_OPTIONAL (uint32)\nJERRYX_ARG_TRANSFORM_OPTIONAL (int8)\nJERRYX_ARG_TRANSFORM_OPTIONAL (int16)\nJERRYX_ARG_TRANSFORM_OPTIONAL (int32)\nJERRYX_ARG_TRANSFORM_OPTIONAL (int8_strict)\nJERRYX_ARG_TRANSFORM_OPTIONAL (int16_strict)\nJERRYX_ARG_TRANSFORM_OPTIONAL (int32_strict)\nJERRYX_ARG_TRANSFORM_OPTIONAL (uint8_strict)\nJERRYX_ARG_TRANSFORM_OPTIONAL (uint16_strict)\nJERRYX_ARG_TRANSFORM_OPTIONAL (uint32_strict)\n\n#undef JERRYX_ARG_TRANSFORM_OPTIONAL\n\n/**\n * Ignore the JS argument.\n *\n * @return jerry undefined\n */\njerry_value_t\njerryx_arg_transform_ignore (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                             const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  (void) js_arg_iter_p; /* unused */\n  (void) c_arg_p; /* unused */\n\n  return jerry_create_undefined ();\n} /* jerryx_arg_transform_ignore */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/arg/arg.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-ext/arg.h\"\n#include \"jerryscript.h\"\n#include \"arg-internal.h\"\n#include \"jext-common.h\"\n\nJERRYX_STATIC_ASSERT (sizeof (jerryx_arg_int_option_t) <= sizeof (((jerryx_arg_t *) 0)->extra_info),\n                      jerryx_arg_number_options_t_must_fit_into_extra_info);\n\n/**\n * Validate the JS arguments and assign them to the native arguments.\n *\n * @return jerry undefined: all validators passed,\n *         jerry error: a validator failed.\n */\njerry_value_t\njerryx_arg_transform_args (const jerry_value_t *js_arg_p, /**< points to the array with JS arguments */\n                           const jerry_length_t js_arg_cnt, /**< the count of the `js_arg_p` array */\n                           const jerryx_arg_t *c_arg_p, /**< points to the array of validation/transformation steps */\n                           jerry_length_t c_arg_cnt) /**< the count of the `c_arg_p` array */\n{\n  jerry_value_t ret = jerry_create_undefined ();\n\n  jerryx_arg_js_iterator_t iterator =\n  {\n    .js_arg_p = js_arg_p,\n    .js_arg_cnt = js_arg_cnt,\n    .js_arg_idx = 0\n  };\n\n  for (; c_arg_cnt != 0 && !jerry_value_is_error (ret); c_arg_cnt--, c_arg_p++)\n  {\n    ret = c_arg_p->func (&iterator, c_arg_p);\n  }\n\n  return ret;\n} /* jerryx_arg_transform_args */\n\n/**\n * Validate the this value and the JS arguments,\n * and assign them to the native arguments.\n * This function is useful to perform input validation inside external\n * function handlers (see jerry_external_handler_t).\n * @note this_val is processed as the first value, before the array of arguments.\n *\n * @return jerry undefined: all validators passed,\n *         jerry error: a validator failed.\n */\njerry_value_t\njerryx_arg_transform_this_and_args (const jerry_value_t this_val, /**< the this_val for the external function */\n                                    const jerry_value_t *js_arg_p, /**< points to the array with JS arguments */\n                                    const jerry_length_t js_arg_cnt, /**< the count of the `js_arg_p` array */\n                                    const jerryx_arg_t *c_arg_p, /**< points to the array of transformation steps */\n                                    jerry_length_t c_arg_cnt) /**< the count of the `c_arg_p` array */\n{\n  if (c_arg_cnt == 0)\n  {\n    return jerry_create_undefined ();\n  }\n\n  jerryx_arg_js_iterator_t iterator =\n  {\n    .js_arg_p = &this_val,\n    .js_arg_cnt = 1,\n    .js_arg_idx = 0\n  };\n\n  jerry_value_t ret = c_arg_p->func (&iterator, c_arg_p);\n\n  if (jerry_value_is_error (ret))\n  {\n    jerry_release_value (ret);\n\n    return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) \"'this' validation failed.\");\n  }\n\n  return jerryx_arg_transform_args (js_arg_p, js_arg_cnt, c_arg_p + 1, c_arg_cnt - 1);\n} /* jerryx_arg_transform_this_and_args */\n\n/**\n * Validate the `obj_val`'s properties,\n * and assign them to the native arguments.\n *\n * @return jerry undefined: all validators passed,\n *         jerry error: a validator failed.\n */\njerry_value_t\njerryx_arg_transform_object_properties (const jerry_value_t obj_val,/**< the JS object */\n                                        const jerry_char_t **name_p, /**< property name list of the JS object */\n                                        const jerry_length_t name_cnt, /**< count of the name list */\n                                        const jerryx_arg_t *c_arg_p, /**< points to the array of transformation steps */\n                                        jerry_length_t c_arg_cnt) /**< the count of the `c_arg_p` array */\n{\n  if (!jerry_value_is_object (obj_val))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) \"Not an object.\");\n  }\n\n  JERRY_VLA (jerry_value_t, prop, name_cnt);\n\n  for (jerry_length_t i = 0; i < name_cnt; i++, name_p++)\n  {\n    const jerry_value_t name_str = jerry_create_string (*name_p);\n    prop[i] = jerry_get_property (obj_val, name_str);\n    jerry_release_value (name_str);\n\n    if (jerry_value_is_error (prop[i]))\n    {\n      for (jerry_length_t j = 0; j < i; j++)\n      {\n        jerry_release_value (prop[j]);\n      }\n\n      return prop[i];\n    }\n  }\n\n  const jerry_value_t ret = jerryx_arg_transform_args (prop, name_cnt, c_arg_p, c_arg_cnt);\n\n  for (jerry_length_t i = 0; i < name_cnt; i++)\n  {\n    jerry_release_value (prop[i]);\n  }\n\n  return ret;\n} /* jerryx_arg_transform_object_properties */\n\n/**\n * Validate the items in the JS array and assign them to the native arguments.\n *\n * @return jerry undefined: all validators passed,\n *         jerry error: a validator failed.\n */\njerry_value_t\njerryx_arg_transform_array (const jerry_value_t array_val, /**< points to the JS array */\n                            const jerryx_arg_t *c_arg_p, /**< points to the array of validation/transformation steps */\n                            jerry_length_t c_arg_cnt) /**< the count of the `c_arg_p` array */\n{\n  if (!jerry_value_is_array (array_val))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) \"Not an array.\");\n  }\n\n  JERRY_VLA (jerry_value_t, arr, c_arg_cnt);\n\n  for (jerry_length_t i = 0; i < c_arg_cnt; i++)\n  {\n    arr[i] = jerry_get_property_by_index (array_val, i);\n\n    if (jerry_value_is_error (arr[i]))\n    {\n      for (jerry_length_t j = 0; j < i; j++)\n      {\n        jerry_release_value (arr[j]);\n      }\n\n      return arr[i];\n    }\n  }\n\n  const jerry_value_t ret = jerryx_arg_transform_args (arr, c_arg_cnt, c_arg_p, c_arg_cnt);\n\n  for (jerry_length_t i = 0; i < c_arg_cnt; i++)\n  {\n    jerry_release_value (arr[i]);\n  }\n\n  return ret;\n} /* jerryx_arg_transform_array */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/common/jext-common.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JEXT_COMMON_H\n#define JEXT_COMMON_H\n\n#include <stdio.h>\n#include <string.h>\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n\n/*\n * Make sure unused parameters, variables, or expressions trigger no compiler warning.\n */\n#define JERRYX_UNUSED(x) ((void) (x))\n\n/*\n * Asserts\n *\n * Warning:\n *         Don't use JERRY_STATIC_ASSERT in headers, because\n *         __LINE__ may be the same for asserts in a header\n *         and in an implementation file.\n */\n#define JERRYX_STATIC_ASSERT_GLUE_(a, b, c) a ## b ## _ ## c\n#define JERRYX_STATIC_ASSERT_GLUE(a, b, c) JERRYX_STATIC_ASSERT_GLUE_ (a, b, c)\n#define JERRYX_STATIC_ASSERT(x, msg) \\\n  enum { JERRYX_STATIC_ASSERT_GLUE (static_assertion_failed_, __LINE__, msg) = 1 / (!!(x)) }\n\n#ifndef JERRY_NDEBUG\nvoid JERRY_ATTR_NORETURN\njerry_assert_fail (const char *assertion, const char *file, const char *function, const uint32_t line);\nvoid JERRY_ATTR_NORETURN\njerry_unreachable (const char *file, const char *function, const uint32_t line);\n\n#define JERRYX_ASSERT(x) \\\n  do \\\n  { \\\n    if (JERRY_UNLIKELY (!(x))) \\\n    { \\\n      jerry_assert_fail (#x, __FILE__, __func__, __LINE__); \\\n    } \\\n  } while (0)\n\n#define JERRYX_UNREACHABLE() \\\n  do \\\n  { \\\n    jerry_unreachable (__FILE__, __func__, __LINE__); \\\n  } while (0)\n#else /* JERRY_NDEBUG */\n#define JERRYX_ASSERT(x) \\\n  do \\\n  { \\\n    if (false) \\\n    { \\\n      JERRYX_UNUSED (x); \\\n    } \\\n  } while (0)\n\n#ifdef __GNUC__\n#define JERRYX_UNREACHABLE() __builtin_unreachable ()\n#endif /* __GNUC__ */\n\n#ifdef _MSC_VER\n#define JERRYX_UNREACHABLE()  _assume (0)\n#endif /* _MSC_VER */\n\n#ifndef JERRYX_UNREACHABLE\n#define JERRYX_UNREACHABLE()\n#endif /* !JERRYX_UNREACHABLE */\n\n#endif /* !JERRY_NDEBUG */\n\n/*\n * Logging\n */\n#define JERRYX_ERROR_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_ERROR, __VA_ARGS__)\n#define JERRYX_WARNING_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_WARNING, __VA_ARGS__)\n#define JERRYX_DEBUG_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_DEBUG, __VA_ARGS__)\n#define JERRYX_TRACE_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_TRACE, __VA_ARGS__)\n\n#endif /* !JEXT_COMMON_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/debugger/debugger-common.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-ext/debugger.h\"\n#include \"jext-common.h\"\n\n/**\n * Must be called after the connection has been initialized.\n */\nvoid\njerryx_debugger_after_connect (bool success) /**< tells whether the connection\n                                              *   has been successfully established */\n{\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n  if (success)\n  {\n    jerry_debugger_transport_start ();\n  }\n  else\n  {\n    jerry_debugger_transport_close ();\n  }\n#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) */\n  JERRYX_UNUSED (success);\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n} /* jerryx_debugger_after_connect */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/debugger/debugger-rp.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-ext/debugger.h\"\n#include \"jext-common.h\"\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n\n/* A simplified transmission layer. */\n\n/**\n * Size of the raw packet header.\n */\n#define JERRYX_DEBUGGER_RAWPACKET_HEADER_SIZE 1\n/**\n * Maximum message size with 1 byte size field.\n */\n#define JERRYX_DEBUGGER_RAWPACKET_ONE_BYTE_LEN_MAX 255\n\n/**\n * Header for incoming packets.\n */\ntypedef struct\n{\n  uint8_t size; /**< size of the message */\n} jerryx_rawpacket_receive_header_t;\n\n/**\n * Close a tcp connection.\n */\nstatic void\njerryx_debugger_rp_close (jerry_debugger_transport_header_t *header_p) /**< header for the transport interface */\n{\n  JERRYX_ASSERT (!jerry_debugger_transport_is_connected ());\n\n  jerry_heap_free ((void *) header_p, sizeof (jerry_debugger_transport_header_t));\n} /* jerryx_debugger_rp_close */\n\n/**\n * Send data over a simple raw packet connection.\n *\n * @return true - if the data has been sent successfully\n *         false - otherwise\n */\nstatic bool\njerryx_debugger_rp_send (jerry_debugger_transport_header_t *header_p, /**< header for the transport interface */\n                         uint8_t *message_p, /**< message to be sent */\n                         size_t message_length) /**< message length in bytes */\n{\n  JERRYX_ASSERT (message_length <= JERRYX_DEBUGGER_RAWPACKET_ONE_BYTE_LEN_MAX);\n\n  message_p[-1] = (uint8_t) message_length;\n\n  return header_p->next_p->send (header_p->next_p, message_p - 1, message_length + 1);\n} /* jerryx_debugger_rp_send */\n\n/**\n * Receive data from a rawpacket connection.\n *\n * @return true - if data has been received successfully\n *         false - otherwise\n */\nstatic bool\njerryx_debugger_rp_receive (jerry_debugger_transport_header_t *header_p, /**< header for the transport interface */\n                            jerry_debugger_transport_receive_context_t *receive_context_p) /**< receive context */\n{\n  if (!header_p->next_p->receive (header_p->next_p, receive_context_p))\n  {\n    return false;\n  }\n\n  if (receive_context_p->message_p == NULL)\n  {\n    return true;\n  }\n\n  size_t message_total_length = receive_context_p->message_total_length;\n\n  if (message_total_length == 0)\n  {\n    /* Byte stream. */\n    if (receive_context_p->message_length < sizeof (jerryx_rawpacket_receive_header_t))\n    {\n      receive_context_p->message_p = NULL;\n      return true;\n    }\n  }\n  else\n  {\n    /* Datagram packet. */\n    JERRYX_ASSERT (receive_context_p->message_length >= sizeof (jerryx_rawpacket_receive_header_t));\n  }\n\n  uint8_t *message_p = receive_context_p->message_p;\n  size_t message_length = (size_t) (message_p[0]);\n\n  if (message_total_length == 0)\n  {\n    size_t new_total_length = message_length + sizeof (jerryx_rawpacket_receive_header_t);\n\n    /* Byte stream. */\n    if (receive_context_p->message_length < new_total_length)\n    {\n      receive_context_p->message_p = NULL;\n      return true;\n    }\n\n    receive_context_p->message_total_length = new_total_length;\n  }\n  else\n  {\n    /* Datagram packet. */\n    JERRYX_ASSERT (receive_context_p->message_length == (message_length + sizeof (jerryx_rawpacket_receive_header_t)));\n  }\n\n  receive_context_p->message_p = message_p + sizeof (jerryx_rawpacket_receive_header_t);\n  receive_context_p->message_length = message_length;\n\n  return true;\n} /* jerryx_debugger_rp_receive */\n\n/**\n * Initialize a simple raw packet transmission layer.\n *\n * @return true - if the connection succeeded\n *         false - otherwise\n */\nbool\njerryx_debugger_rp_create (void)\n{\n  const size_t interface_size = sizeof (jerry_debugger_transport_header_t);\n  jerry_debugger_transport_header_t *header_p;\n  header_p = (jerry_debugger_transport_header_t *) jerry_heap_alloc (interface_size);\n\n  if (!header_p)\n  {\n    return false;\n  }\n\n  header_p->close = jerryx_debugger_rp_close;\n  header_p->send = jerryx_debugger_rp_send;\n  header_p->receive = jerryx_debugger_rp_receive;\n\n  jerry_debugger_transport_add (header_p,\n                                JERRYX_DEBUGGER_RAWPACKET_HEADER_SIZE,\n                                JERRYX_DEBUGGER_RAWPACKET_ONE_BYTE_LEN_MAX,\n                                JERRYX_DEBUGGER_RAWPACKET_HEADER_SIZE,\n                                JERRYX_DEBUGGER_RAWPACKET_ONE_BYTE_LEN_MAX);\n\n  return true;\n} /* jerryx_debugger_rp_create */\n\n#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) */\n\n/**\n * Dummy function when debugger is disabled.\n *\n * @return false\n */\nbool\njerryx_debugger_rp_create (void)\n{\n  return false;\n} /* jerryx_debugger_rp_create */\n\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/debugger/debugger-serial.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-debugger-transport.h\"\n#include \"jerryscript-ext/debugger.h\"\n#include \"jext-common.h\"\n\n#if (defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) && !defined _WIN32\n\n#include <errno.h>\n#include <fcntl.h>\n#include <unistd.h>\n#include <termios.h>\n#include <stdlib.h>\n\n/* Max size of configuration string */\n#define CONFIG_SIZE (255)\n\n/**\n * Implementation of transport over serial connection.\n */\ntypedef struct\n{\n  jerry_debugger_transport_header_t header; /**< transport header */\n  int fd; /**< file descriptor */\n} jerryx_debugger_transport_serial_t;\n\n/**\n * Configure parameters for a serial port.\n */\ntypedef struct\n{\n  char *device_id;\n  uint32_t baud_rate; /**< specify the rate at which bits are transmitted for the serial interface */\n  uint32_t data_bits; /**< specify the number of data bits to transmit over the serial interface */\n  char parity; /**< specify how you want to check parity bits in the data bits transmitted via the serial port */\n  uint32_t stop_bits; /**< specify the number of bits used to indicate the end of a byte. */\n} jerryx_debugger_transport_serial_config_t;\n\n/**\n * Correctly close a file descriptor.\n */\nstatic inline void\njerryx_debugger_serial_close_fd (int fd) /**< file descriptor to close */\n{\n  if (close (fd) != 0)\n  {\n    JERRYX_ERROR_MSG (\"Error while closing the file descriptor: %d\\n\", errno);\n  }\n} /* jerryx_debugger_serial_close_fd */\n\n/**\n * Set a file descriptor to blocking or non-blocking mode.\n *\n * @return true if everything is ok\n *         false if there was an error\n **/\nstatic bool\njerryx_debugger_serial_set_blocking (int fd, bool blocking)\n{\n  /* Save the current flags */\n  int flags = fcntl (fd, F_GETFL, 0);\n  if (flags == -1)\n  {\n    JERRYX_ERROR_MSG (\"Error %d during get flags from file descriptor\\n\", errno);\n    return false;\n  }\n\n  if (blocking)\n  {\n    flags &= ~O_NONBLOCK;\n  }\n  else\n  {\n    flags |= O_NONBLOCK;\n  }\n\n  if (fcntl (fd, F_SETFL, flags) == -1)\n  {\n    JERRYX_ERROR_MSG (\"Error %d during set flags from file descriptor\\n\", errno);\n    return false;\n  }\n\n  return true;\n} /* jerryx_debugger_serial_set_blocking */\n\n/**\n * Configure the file descriptor used by the serial communcation.\n *\n * @return true if everything is ok\n *         false if there was an error\n */\nstatic inline bool\njerryx_debugger_serial_configure_attributes (int fd, jerryx_debugger_transport_serial_config_t serial_config)\n{\n  struct termios options;\n  memset (&options, 0, sizeof (options));\n\n  /* Get the parameters associated with the file descriptor */\n  if (tcgetattr (fd, &options) != 0)\n  {\n    JERRYX_ERROR_MSG (\"Error %d from tggetattr\\n\", errno);\n    return false;\n  }\n\n  /* Set the input and output baud rates */\n  cfsetispeed (&options, serial_config.baud_rate);\n  cfsetospeed (&options, serial_config.baud_rate);\n\n  /* Set the control modes */\n  options.c_cflag &= (uint32_t) ~CSIZE; // character size mask\n  options.c_cflag |= (CLOCAL | CREAD); // ignore modem control lines and enable the receiver\n\n  switch (serial_config.data_bits)\n  {\n    case 5:\n    {\n      options.c_cflag |= CS5; // set character size mask to 5-bit chars\n      break;\n    }\n    case 6:\n    {\n      options.c_cflag |= CS6; // set character size mask to 6-bit chars\n      break;\n    }\n    case 7:\n    {\n      options.c_cflag |= CS7; // set character size mask to 7-bit chars\n      break;\n    }\n    case 8:\n    {\n      options.c_cflag |= CS8; // set character size mask to 8-bit chars\n      break;\n    }\n    default:\n    {\n      JERRYX_ERROR_MSG (\"Unsupported data bits: %d\\n\", serial_config.data_bits);\n      return false;\n    }\n  }\n\n  switch (serial_config.parity)\n  {\n    case 'N':\n    {\n      options.c_cflag &= (unsigned int) ~(PARENB | PARODD);\n      break;\n    }\n    case 'O':\n    {\n      options.c_cflag |= PARENB;\n      options.c_cflag |= PARODD;\n      break;\n    }\n    case 'E':\n    {\n      options.c_cflag |= PARENB;\n      options.c_cflag |= PARODD;\n      break;\n    }\n    default:\n    {\n      JERRYX_ERROR_MSG (\"Unsupported parity: %c\\n\", serial_config.parity);\n      return false;\n    }\n  }\n\n  switch (serial_config.stop_bits)\n  {\n    case 1:\n    {\n      options.c_cflag &= (uint32_t) ~CSTOPB; // set 1 stop bits\n      break;\n    }\n    case 2:\n    {\n      options.c_cflag |= CSTOPB; // set 2 stop bits\n      break;\n    }\n    default:\n    {\n      JERRYX_ERROR_MSG (\"Unsupported stop bits: %d\\n\", serial_config.stop_bits);\n      return false;\n    }\n  }\n\n  /* Set the input modes */\n  options.c_iflag &= (uint32_t) ~IGNBRK; // disable break processing\n  options.c_iflag &= (uint32_t) ~(IXON | IXOFF | IXANY); // disable xon/xoff ctrl\n\n  /* Set the output modes: no remapping, no delays */\n  options.c_oflag = 0;\n\n  /* Set the local modes: no signaling chars, no echo, no canoncial processing */\n  options.c_lflag = 0;\n\n  /* Read returns when at least one byte of data is available. */\n  options.c_cc[VMIN]  = 1; // read block\n  options.c_cc[VTIME] = 5; // 0.5 seconds read timeout\n\n  /* Set the parameters associated with the file descriptor */\n  if (tcsetattr (fd, TCSANOW, &options) != 0)\n  {\n    JERRYX_ERROR_MSG (\"Error %d from tcsetattr\", errno);\n    return false;\n  }\n\n  /* Flushes both data received but not read, and data written but not transmitted */\n  if (tcflush (fd, TCIOFLUSH) != 0)\n  {\n    JERRYX_ERROR_MSG (\"Error %d in tcflush() :%s\\n\", errno, strerror (errno));\n    jerryx_debugger_serial_close_fd (fd);\n    return false;\n  }\n\n  return true;\n} /* jerryx_debugger_serial_configure_attributes */\n\n/**\n * Close a serial connection.\n */\nstatic void\njerryx_debugger_serial_close (jerry_debugger_transport_header_t *header_p) /**< serial implementation */\n{\n  JERRYX_ASSERT (!jerry_debugger_transport_is_connected ());\n\n  jerryx_debugger_transport_serial_t *serial_p = (jerryx_debugger_transport_serial_t *) header_p;\n\n  JERRYX_DEBUG_MSG (\"Serial connection closed.\\n\");\n\n  jerryx_debugger_serial_close_fd (serial_p->fd);\n\n  jerry_heap_free ((void *) header_p, sizeof (jerryx_debugger_transport_serial_t));\n} /* jerryx_debugger_serial_close */\n\n/**\n * Send data over a serial connection.\n *\n * @return true - if the data has been sent successfully\n *         false - otherwise\n */\nstatic bool\njerryx_debugger_serial_send (jerry_debugger_transport_header_t *header_p, /**< serial implementation */\n                             uint8_t *message_p, /**< message to be sent */\n                             size_t message_length) /**< message length in bytes */\n{\n  JERRYX_ASSERT (jerry_debugger_transport_is_connected ());\n\n  jerryx_debugger_transport_serial_t *serial_p = (jerryx_debugger_transport_serial_t *) header_p;\n\n  do\n  {\n    ssize_t sent_bytes = write (serial_p->fd, message_p, message_length);\n\n    if (sent_bytes < 0)\n    {\n      if (errno == EWOULDBLOCK)\n      {\n        continue;\n      }\n\n      JERRYX_ERROR_MSG (\"Error: write to file descriptor: %d\\n\", errno);\n      jerry_debugger_transport_close ();\n      return false;\n    }\n\n    message_p += sent_bytes;\n    message_length -= (size_t) sent_bytes;\n  }\n  while (message_length > 0);\n\n  return true;\n} /* jerryx_debugger_serial_send */\n\n/**\n * Receive data from a serial connection.\n */\nstatic bool\njerryx_debugger_serial_receive (jerry_debugger_transport_header_t *header_p, /**< serial implementation */\n                                jerry_debugger_transport_receive_context_t *receive_context_p) /**< receive context */\n{\n  jerryx_debugger_transport_serial_t *serial_p = (jerryx_debugger_transport_serial_t *) header_p;\n\n  uint8_t *buffer_p = receive_context_p->buffer_p + receive_context_p->received_length;\n  size_t buffer_size = JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE - receive_context_p->received_length;\n\n  ssize_t length = read (serial_p->fd, buffer_p, buffer_size);\n\n  if (length <= 0)\n  {\n    if (errno != EWOULDBLOCK || length == 0)\n    {\n      jerry_debugger_transport_close ();\n      return false;\n    }\n    length = 0;\n  }\n\n  receive_context_p->received_length += (size_t) length;\n\n  if (receive_context_p->received_length > 0)\n  {\n    receive_context_p->message_p = receive_context_p->buffer_p;\n    receive_context_p->message_length = receive_context_p->received_length;\n  }\n\n  return true;\n} /* jerryx_debugger_serial_receive */\n\n/**\n * Create a serial connection.\n *\n * @return true if successful,\n *         false otherwise\n */\nbool\njerryx_debugger_serial_create (const char *config) /**< specify the configuration */\n{\n  /* Parse the configuration string */\n  char tmp_config[CONFIG_SIZE];\n  strncpy (tmp_config, config, CONFIG_SIZE);\n  jerryx_debugger_transport_serial_config_t serial_config;\n\n  char *token = strtok (tmp_config, \",\");\n  serial_config.device_id = token ? token : \"/dev/ttyS0\";\n  serial_config.baud_rate = (token = strtok (NULL, \",\")) ? (uint32_t) strtoul (token, NULL, 10) : 115200;\n  serial_config.data_bits = (token = strtok (NULL, \",\")) ? (uint32_t) strtoul (token, NULL, 10) : 8;\n  serial_config.parity = (token = strtok (NULL, \",\")) ? token[0] : 'N';\n  serial_config.stop_bits = (token = strtok (NULL, \",\")) ? (uint32_t) strtoul (token, NULL, 10) : 1;\n\n  int fd = open (serial_config.device_id, O_RDWR);\n\n  if (fd < 0)\n  {\n    JERRYX_ERROR_MSG (\"Error %d opening %s: %s\", errno, serial_config.device_id, strerror (errno));\n    return false;\n  }\n\n  if (!jerryx_debugger_serial_configure_attributes (fd, serial_config))\n  {\n    jerryx_debugger_serial_close_fd (fd);\n    return false;\n  }\n\n  JERRYX_DEBUG_MSG (\"Waiting for client connection\\n\");\n\n  /* Client will sent a 'c' char to initiate the connection. */\n  uint8_t conn_char;\n  ssize_t t = read (fd, &conn_char, 1);\n  if (t != 1 || conn_char != 'c' || !jerryx_debugger_serial_set_blocking (fd, false))\n  {\n    return false;\n  }\n\n  JERRYX_DEBUG_MSG (\"Client connected\\n\");\n\n  size_t size = sizeof (jerryx_debugger_transport_serial_t);\n\n  jerry_debugger_transport_header_t *header_p;\n  header_p = (jerry_debugger_transport_header_t *) jerry_heap_alloc (size);\n\n  if (!header_p)\n  {\n    jerryx_debugger_serial_close_fd (fd);\n    return false;\n  }\n\n  header_p->close = jerryx_debugger_serial_close;\n  header_p->send = jerryx_debugger_serial_send;\n  header_p->receive = jerryx_debugger_serial_receive;\n\n  ((jerryx_debugger_transport_serial_t *) header_p)->fd = fd;\n\n  jerry_debugger_transport_add (header_p,\n                                0,\n                                JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE,\n                                0,\n                                JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE);\n\n  return true;\n} /* jerryx_debugger_serial_create */\n\n#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) || _WIN32 */\n/**\n * Dummy function when debugger is disabled.\n *\n * @return false\n */\nbool\njerryx_debugger_serial_create (const char *config)\n{\n  JERRYX_UNUSED (config);\n  return false;\n} /* jerryx_debugger_serial_create */\n\n#endif /* (defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) && !defined _WIN32 */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/debugger/debugger-sha1.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n *  FIPS-180-1 compliant SHA-1 implementation\n *\n *  Copyright (C) 2006-2015, ARM Limited, All Rights Reserved\n *  SPDX-License-Identifier: Apache-2.0\n *\n *  Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n *  not use this file except in compliance with the License.\n *  You may obtain a copy of the License at\n *\n *  http://www.apache.org/licenses/LICENSE-2.0\n *\n *  Unless required by applicable law or agreed to in writing, software\n *  distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *  See the License for the specific language governing permissions and\n *  limitations under the License.\n *\n *  This file is part of mbed TLS (https://tls.mbed.org)\n */\n\n/*\n *  The SHA-1 standard was published by NIST in 1993.\n *\n *  http://www.itl.nist.gov/fipspubs/fip180-1.htm\n */\n\n#include \"debugger-sha1.h\"\n#include \"jext-common.h\"\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n\n/**\n * SHA-1 context structure.\n */\ntypedef struct\n{\n  uint32_t total[2]; /**< number of bytes processed */\n  uint32_t state[5]; /**< intermediate digest state */\n  uint8_t buffer[64]; /**< data block being processed */\n} jerryx_sha1_context;\n\n/* 32-bit integer manipulation macros (big endian). */\n\n#define JERRYX_SHA1_GET_UINT32_BE(n, b, i) \\\n{ \\\n  (n) = (((uint32_t) (b)[(i) + 0]) << 24) \\\n        | (((uint32_t) (b)[(i) + 1]) << 16) \\\n        | (((uint32_t) (b)[(i) + 2]) << 8) \\\n        | ((uint32_t) (b)[(i) + 3]); \\\n}\n\n#define JERRYX_SHA1_PUT_UINT32_BE(n, b, i) \\\n{ \\\n  (b)[(i) + 0] = (uint8_t) ((n) >> 24); \\\n  (b)[(i) + 1] = (uint8_t) ((n) >> 16); \\\n  (b)[(i) + 2] = (uint8_t) ((n) >> 8); \\\n  (b)[(i) + 3] = (uint8_t) ((n)); \\\n}\n\n/**\n * Initialize SHA-1 context.\n */\nstatic void\njerryx_sha1_init (jerryx_sha1_context *sha1_context_p) /**< SHA-1 context */\n{\n  memset (sha1_context_p, 0, sizeof (jerryx_sha1_context));\n\n  sha1_context_p->total[0] = 0;\n  sha1_context_p->total[1] = 0;\n\n  sha1_context_p->state[0] = 0x67452301;\n  sha1_context_p->state[1] = 0xEFCDAB89;\n  sha1_context_p->state[2] = 0x98BADCFE;\n  sha1_context_p->state[3] = 0x10325476;\n  sha1_context_p->state[4] = 0xC3D2E1F0;\n} /* jerryx_sha1_init */\n\n#define JERRYX_SHA1_P(a, b, c, d, e, x) \\\ndo { \\\n  e += JERRYX_SHA1_SHIFT (a, 5) + JERRYX_SHA1_F (b, c, d) + K + x; \\\n  b = JERRYX_SHA1_SHIFT (b, 30); \\\n} while (0)\n\n/**\n * Update SHA-1 internal buffer status.\n */\nstatic void\njerryx_sha1_process (jerryx_sha1_context *sha1_context_p, /**< SHA-1 context */\n                     const uint8_t data[64]) /**< data buffer */\n{\n  uint32_t temp, W[16], A, B, C, D, E;\n\n  JERRYX_SHA1_GET_UINT32_BE (W[0], data, 0);\n  JERRYX_SHA1_GET_UINT32_BE (W[1], data, 4);\n  JERRYX_SHA1_GET_UINT32_BE (W[2], data, 8);\n  JERRYX_SHA1_GET_UINT32_BE (W[3], data, 12);\n  JERRYX_SHA1_GET_UINT32_BE (W[4], data, 16);\n  JERRYX_SHA1_GET_UINT32_BE (W[5], data, 20);\n  JERRYX_SHA1_GET_UINT32_BE (W[6], data, 24);\n  JERRYX_SHA1_GET_UINT32_BE (W[7], data, 28);\n  JERRYX_SHA1_GET_UINT32_BE (W[8], data, 32);\n  JERRYX_SHA1_GET_UINT32_BE (W[9], data, 36);\n  JERRYX_SHA1_GET_UINT32_BE (W[10], data, 40);\n  JERRYX_SHA1_GET_UINT32_BE (W[11], data, 44);\n  JERRYX_SHA1_GET_UINT32_BE (W[12], data, 48);\n  JERRYX_SHA1_GET_UINT32_BE (W[13], data, 52);\n  JERRYX_SHA1_GET_UINT32_BE (W[14], data, 56);\n  JERRYX_SHA1_GET_UINT32_BE (W[15], data, 60);\n\n#define JERRYX_SHA1_SHIFT(x, n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))\n\n#define JERRYX_SHA1_R(t) \\\n( \\\n  temp = W[(t - 3) & 0x0F] ^ W[(t - 8) & 0x0F] ^ W[(t - 14) & 0x0F] ^ W[t & 0x0F], \\\n  W[t & 0x0F] = JERRYX_SHA1_SHIFT (temp, 1) \\\n)\n\n  A = sha1_context_p->state[0];\n  B = sha1_context_p->state[1];\n  C = sha1_context_p->state[2];\n  D = sha1_context_p->state[3];\n  E = sha1_context_p->state[4];\n\n  uint32_t K = 0x5A827999;\n\n#define JERRYX_SHA1_F(x, y, z) (z ^ (x & (y ^ z)))\n\n  JERRYX_SHA1_P (A, B, C, D, E, W[0]);\n  JERRYX_SHA1_P (E, A, B, C, D, W[1]);\n  JERRYX_SHA1_P (D, E, A, B, C, W[2]);\n  JERRYX_SHA1_P (C, D, E, A, B, W[3]);\n  JERRYX_SHA1_P (B, C, D, E, A, W[4]);\n  JERRYX_SHA1_P (A, B, C, D, E, W[5]);\n  JERRYX_SHA1_P (E, A, B, C, D, W[6]);\n  JERRYX_SHA1_P (D, E, A, B, C, W[7]);\n  JERRYX_SHA1_P (C, D, E, A, B, W[8]);\n  JERRYX_SHA1_P (B, C, D, E, A, W[9]);\n  JERRYX_SHA1_P (A, B, C, D, E, W[10]);\n  JERRYX_SHA1_P (E, A, B, C, D, W[11]);\n  JERRYX_SHA1_P (D, E, A, B, C, W[12]);\n  JERRYX_SHA1_P (C, D, E, A, B, W[13]);\n  JERRYX_SHA1_P (B, C, D, E, A, W[14]);\n  JERRYX_SHA1_P (A, B, C, D, E, W[15]);\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (16));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (17));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (18));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (19));\n\n#undef JERRYX_SHA1_F\n\n  K = 0x6ED9EBA1;\n\n#define JERRYX_SHA1_F(x, y, z) (x ^ y ^ z)\n\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (20));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (21));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (22));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (23));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (24));\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (25));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (26));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (27));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (28));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (29));\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (30));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (31));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (32));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (33));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (34));\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (35));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (36));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (37));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (38));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (39));\n\n#undef JERRYX_SHA1_F\n\n  K = 0x8F1BBCDC;\n\n#define JERRYX_SHA1_F(x, y, z) ((x & y) | (z & (x | y)))\n\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (40));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (41));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (42));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (43));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (44));\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (45));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (46));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (47));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (48));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (49));\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (50));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (51));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (52));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (53));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (54));\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (55));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (56));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (57));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (58));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (59));\n\n#undef JERRYX_SHA1_F\n\n  K = 0xCA62C1D6;\n\n#define JERRYX_SHA1_F(x, y, z) (x ^ y ^ z)\n\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (60));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (61));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (62));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (63));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (64));\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (65));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (66));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (67));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (68));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (69));\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (70));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (71));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (72));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (73));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (74));\n  JERRYX_SHA1_P (A, B, C, D, E, JERRYX_SHA1_R (75));\n  JERRYX_SHA1_P (E, A, B, C, D, JERRYX_SHA1_R (76));\n  JERRYX_SHA1_P (D, E, A, B, C, JERRYX_SHA1_R (77));\n  JERRYX_SHA1_P (C, D, E, A, B, JERRYX_SHA1_R (78));\n  JERRYX_SHA1_P (B, C, D, E, A, JERRYX_SHA1_R (79));\n\n#undef JERRYX_SHA1_F\n\n  sha1_context_p->state[0] += A;\n  sha1_context_p->state[1] += B;\n  sha1_context_p->state[2] += C;\n  sha1_context_p->state[3] += D;\n  sha1_context_p->state[4] += E;\n\n#undef JERRYX_SHA1_SHIFT\n#undef JERRYX_SHA1_R\n} /* jerryx_sha1_process */\n\n#undef JERRYX_SHA1_P\n\n/**\n * SHA-1 update buffer.\n */\nstatic void\njerryx_sha1_update (jerryx_sha1_context *sha1_context_p, /**< SHA-1 context */\n                    const uint8_t *source_p, /**< source buffer */\n                    size_t source_length) /**< length of source buffer */\n{\n  size_t fill;\n  uint32_t left;\n\n  if (source_length == 0)\n  {\n    return;\n  }\n\n  left = sha1_context_p->total[0] & 0x3F;\n  fill = 64 - left;\n\n  sha1_context_p->total[0] += (uint32_t) source_length;\n\n  /* Check overflow. */\n  if (sha1_context_p->total[0] < (uint32_t) source_length)\n  {\n    sha1_context_p->total[1]++;\n  }\n\n  if (left && source_length >= fill)\n  {\n    memcpy ((void *) (sha1_context_p->buffer + left), source_p, fill);\n    jerryx_sha1_process (sha1_context_p, sha1_context_p->buffer);\n    source_p += fill;\n    source_length -= fill;\n    left = 0;\n  }\n\n  while (source_length >= 64)\n  {\n    jerryx_sha1_process (sha1_context_p, source_p);\n    source_p += 64;\n    source_length -= 64;\n  }\n\n  if (source_length > 0)\n  {\n    memcpy ((void *) (sha1_context_p->buffer + left), source_p, source_length);\n  }\n} /* jerryx_sha1_update */\n\n/**\n * SHA-1 final digest.\n */\nstatic void\njerryx_sha1_finish (jerryx_sha1_context *sha1_context_p, /**< SHA-1 context */\n                    uint8_t destination_p[20]) /**< result */\n{\n  uint8_t buffer[16];\n\n  uint32_t high = (sha1_context_p->total[0] >> 29) | (sha1_context_p->total[1] << 3);\n  uint32_t low = (sha1_context_p->total[0] << 3);\n\n  uint32_t last = sha1_context_p->total[0] & 0x3F;\n  uint32_t padn = (last < 56) ? (56 - last) : (120 - last);\n\n  memset (buffer, 0, sizeof (buffer));\n  buffer[0] = 0x80;\n\n  while (padn > sizeof (buffer))\n  {\n    jerryx_sha1_update (sha1_context_p, buffer, sizeof (buffer));\n    buffer[0] = 0;\n    padn -= (uint32_t) sizeof (buffer);\n  }\n\n  jerryx_sha1_update (sha1_context_p, buffer, padn);\n\n  JERRYX_SHA1_PUT_UINT32_BE (high, buffer, 0);\n  JERRYX_SHA1_PUT_UINT32_BE (low, buffer, 4);\n\n  jerryx_sha1_update (sha1_context_p, buffer, 8);\n\n  JERRYX_SHA1_PUT_UINT32_BE (sha1_context_p->state[0], destination_p, 0);\n  JERRYX_SHA1_PUT_UINT32_BE (sha1_context_p->state[1], destination_p, 4);\n  JERRYX_SHA1_PUT_UINT32_BE (sha1_context_p->state[2], destination_p, 8);\n  JERRYX_SHA1_PUT_UINT32_BE (sha1_context_p->state[3], destination_p, 12);\n  JERRYX_SHA1_PUT_UINT32_BE (sha1_context_p->state[4], destination_p, 16);\n} /* jerryx_sha1_finish */\n\n#undef JERRYX_SHA1_GET_UINT32_BE\n#undef JERRYX_SHA1_PUT_UINT32_BE\n\n/**\n * Computes the SHA-1 value of the combination of the two input buffers.\n */\nvoid\njerryx_debugger_compute_sha1 (const uint8_t *source1_p, /**< first part of the input */\n                              size_t source1_length, /**< length of the first part */\n                              const uint8_t *source2_p, /**< second part of the input */\n                              size_t source2_length, /**< length of the second part */\n                              uint8_t destination_p[20]) /**< result */\n{\n  jerryx_sha1_context sha1_context;\n\n  jerryx_sha1_init (&sha1_context);\n  jerryx_sha1_update (&sha1_context, source1_p, source1_length);\n  jerryx_sha1_update (&sha1_context, source2_p, source2_length);\n  jerryx_sha1_finish (&sha1_context, destination_p);\n} /* jerryx_debugger_compute_sha1 */\n\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/debugger/debugger-sha1.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef DEBUGGER_SHA1_H\n#define DEBUGGER_SHA1_H\n\n#include \"jerryscript-debugger-transport.h\"\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n\n/* JerryScript debugger protocol is a simplified version of RFC-6455 (WebSockets). */\n\nvoid jerryx_debugger_compute_sha1 (const uint8_t *input1, size_t input1_len,\n                                   const uint8_t *input2, size_t input2_len,\n                                   uint8_t output[20]);\n\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n\n#endif /* !DEBUGGER_SHA1_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/debugger/debugger-tcp.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-debugger-transport.h\"\n#include \"jerryscript-ext/debugger.h\"\n#include \"jext-common.h\"\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n\n#include <errno.h>\n\n#ifdef _WIN32\n#include <BaseTsd.h>\ntypedef SSIZE_T ssize_t;\n#include <WS2tcpip.h>\n#include <winsock2.h>\n\n/* On Windows the WSAEWOULDBLOCK value can be returned for non-blocking operations */\n#define JERRYX_EWOULDBLOCK WSAEWOULDBLOCK\n\n/* On Windows the invalid socket's value of INVALID_SOCKET */\n#define JERRYX_SOCKET_INVALID INVALID_SOCKET\n\n/* On Windows sockets have a SOCKET typedef */\ntypedef SOCKET jerryx_socket;\n\n#else /* !_WIN32 */\n\n#include <arpa/inet.h>\n#include <fcntl.h>\n#include <sys/socket.h>\n#include <unistd.h>\n\n/* On *nix the EWOULDBLOCK errno value can be returned for non-blocking operations */\n#define JERRYX_EWOULDBLOCK EWOULDBLOCK\n\n/* On *nix the invalid socket has a value of -1 */\n#define JERRYX_SOCKET_INVALID (-1)\n\n/* On *nix the sockets are integer identifiers */\ntypedef int jerryx_socket;\n#endif /* _WIN32 */\n\n/**\n * Implementation of transport over tcp/ip.\n */\ntypedef struct\n{\n  jerry_debugger_transport_header_t header; /**< transport header */\n  jerryx_socket tcp_socket; /**< tcp socket */\n} jerryx_debugger_transport_tcp_t;\n\n/**\n * Get the network error value.\n *\n * On Windows this returns the result of the `WSAGetLastError ()` call and\n * on any other system the `errno` value.\n *\n *\n * @return last error value.\n */\nstatic inline int\njerryx_debugger_tcp_get_errno (void)\n{\n#ifdef _WIN32\n  return WSAGetLastError ();\n#else /* !_WIN32 */\n  return errno;\n#endif /* _WIN32 */\n} /* jerryx_debugger_tcp_get_errno */\n\n/**\n * Correctly close a single socket.\n */\nstatic inline void\njerryx_debugger_tcp_close_socket (jerryx_socket socket_id) /**< socket to close */\n{\n#ifdef _WIN32\n  closesocket (socket_id);\n#else /* !_WIN32 */\n  close (socket_id);\n#endif /* _WIN32 */\n} /* jerryx_debugger_tcp_close_socket */\n\n/**\n * Log tcp error message.\n */\nstatic void\njerryx_debugger_tcp_log_error (int errno_value) /**< error value to log */\n{\n  if (errno_value == 0)\n  {\n    return;\n  }\n\n#ifdef _WIN32\n  char *error_message = NULL;\n  FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,\n                 NULL,\n                 errno_value,\n                 MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),\n                 (LPTSTR) &error_message,\n                 0,\n                 NULL);\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"TCP Error: %s\\n\", error_message);\n  LocalFree (error_message);\n#else /* !_WIN32 */\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"TCP Error: %s\\n\", strerror (errno_value));\n#endif /* _WIN32 */\n} /* jerryx_debugger_tcp_log_error */\n\n/**\n * Close a tcp connection.\n */\nstatic void\njerryx_debugger_tcp_close (jerry_debugger_transport_header_t *header_p) /**< tcp implementation */\n{\n  JERRYX_ASSERT (!jerry_debugger_transport_is_connected ());\n\n  jerryx_debugger_transport_tcp_t *tcp_p = (jerryx_debugger_transport_tcp_t *) header_p;\n\n  JERRYX_DEBUG_MSG (\"TCP connection closed.\\n\");\n\n  jerryx_debugger_tcp_close_socket (tcp_p->tcp_socket);\n\n  jerry_heap_free ((void *) header_p, sizeof (jerryx_debugger_transport_tcp_t));\n} /* jerryx_debugger_tcp_close */\n\n/**\n * Send data over a tcp connection.\n *\n * @return true - if the data has been sent successfully\n *         false - otherwise\n */\nstatic bool\njerryx_debugger_tcp_send (jerry_debugger_transport_header_t *header_p, /**< tcp implementation */\n                          uint8_t *message_p, /**< message to be sent */\n                          size_t message_length) /**< message length in bytes */\n{\n  JERRYX_ASSERT (jerry_debugger_transport_is_connected ());\n\n  jerryx_debugger_transport_tcp_t *tcp_p = (jerryx_debugger_transport_tcp_t *) header_p;\n\n  do\n  {\n#ifdef __linux__\n    ssize_t is_err = recv (tcp_p->tcp_socket, NULL, 0, MSG_PEEK);\n\n    if (is_err == 0 && errno != JERRYX_EWOULDBLOCK)\n    {\n      int err_val = errno;\n      jerry_debugger_transport_close ();\n      jerryx_debugger_tcp_log_error (err_val);\n      return false;\n    }\n#endif /* __linux__ */\n\n    ssize_t sent_bytes = send (tcp_p->tcp_socket, message_p, message_length, 0);\n\n    if (sent_bytes < 0)\n    {\n      int err_val = jerryx_debugger_tcp_get_errno ();\n\n      if (err_val == JERRYX_EWOULDBLOCK)\n      {\n        continue;\n      }\n\n      jerry_debugger_transport_close ();\n      jerryx_debugger_tcp_log_error (err_val);\n      return false;\n    }\n\n    message_p += sent_bytes;\n    message_length -= (size_t) sent_bytes;\n  }\n  while (message_length > 0);\n\n  return true;\n} /* jerryx_debugger_tcp_send */\n\n/**\n * Receive data from a tcp connection.\n */\nstatic bool\njerryx_debugger_tcp_receive (jerry_debugger_transport_header_t *header_p, /**< tcp implementation */\n                             jerry_debugger_transport_receive_context_t *receive_context_p) /**< receive context */\n{\n  jerryx_debugger_transport_tcp_t *tcp_p = (jerryx_debugger_transport_tcp_t *) header_p;\n\n  uint8_t *buffer_p = receive_context_p->buffer_p + receive_context_p->received_length;\n  size_t buffer_size = JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE - receive_context_p->received_length;\n\n  ssize_t length = recv (tcp_p->tcp_socket, buffer_p, buffer_size, 0);\n\n  if (length <= 0)\n  {\n    int err_val = jerryx_debugger_tcp_get_errno ();\n\n    if (err_val != JERRYX_EWOULDBLOCK || length == 0)\n    {\n      jerry_debugger_transport_close ();\n      jerryx_debugger_tcp_log_error (err_val);\n      return false;\n    }\n    length = 0;\n  }\n\n  receive_context_p->received_length += (size_t) length;\n\n  if (receive_context_p->received_length > 0)\n  {\n    receive_context_p->message_p = receive_context_p->buffer_p;\n    receive_context_p->message_length = receive_context_p->received_length;\n  }\n\n  return true;\n} /* jerryx_debugger_tcp_receive */\n\n/**\n * Utility method to prepare the server socket to accept connections.\n *\n * The following steps are performed:\n *  * Configure address re-use.\n *  * Bind the socket to the given port\n *  * Start listening on the socket.\n *\n * @return true if everything is ok\n *         false if there was an error\n */\nstatic bool\njerryx_debugger_tcp_configure_socket (jerryx_socket server_socket, /** < socket to configure */\n                                      uint16_t port) /** < port number to be used for the socket */\n{\n  struct sockaddr_in addr;\n\n  addr.sin_family = AF_INET;\n  addr.sin_port = htons (port);\n  addr.sin_addr.s_addr = INADDR_ANY;\n\n  int opt_value = 1;\n\n  if (setsockopt (server_socket, SOL_SOCKET, SO_REUSEADDR, &opt_value, sizeof (int)) != 0)\n  {\n    return false;\n  }\n\n  if (bind (server_socket, (struct sockaddr *) &addr, sizeof (struct sockaddr_in)) != 0)\n  {\n    return false;\n  }\n\n  if (listen (server_socket, 1) != 0)\n  {\n    return false;\n  }\n\n  return true;\n} /* jerryx_debugger_tcp_configure_socket */\n\n/**\n * Create a tcp connection.\n *\n * @return true if successful,\n *         false otherwise\n */\nbool\njerryx_debugger_tcp_create (uint16_t port) /**< listening port */\n{\n#ifdef _WIN32\n  WSADATA wsaData;\n  int wsa_init_status = WSAStartup (MAKEWORD (2, 2), &wsaData);\n  if (wsa_init_status != NO_ERROR)\n  {\n    JERRYX_ERROR_MSG (\"WSA Error: %d\\n\", wsa_init_status);\n    return false;\n  }\n#endif /* _WIN32*/\n\n  jerryx_socket server_socket = socket (AF_INET, SOCK_STREAM, 0);\n  if (server_socket == JERRYX_SOCKET_INVALID)\n  {\n    jerryx_debugger_tcp_log_error (jerryx_debugger_tcp_get_errno ());\n    return false;\n  }\n\n  if (!jerryx_debugger_tcp_configure_socket (server_socket, port))\n  {\n    int error = jerryx_debugger_tcp_get_errno ();\n    jerryx_debugger_tcp_close_socket (server_socket);\n    jerryx_debugger_tcp_log_error (error);\n    return false;\n  }\n\n  JERRYX_DEBUG_MSG (\"Waiting for client connection\\n\");\n\n  struct sockaddr_in addr;\n  socklen_t sin_size = sizeof (struct sockaddr_in);\n\n  jerryx_socket tcp_socket = accept (server_socket, (struct sockaddr *) &addr, &sin_size);\n\n  jerryx_debugger_tcp_close_socket (server_socket);\n\n  if (tcp_socket == JERRYX_SOCKET_INVALID)\n  {\n    jerryx_debugger_tcp_log_error (jerryx_debugger_tcp_get_errno ());\n    return false;\n  }\n\n  /* Set non-blocking mode. */\n#ifdef _WIN32\n  u_long nonblocking_enabled = 1;\n  if (ioctlsocket (tcp_socket, FIONBIO, &nonblocking_enabled) != NO_ERROR)\n  {\n    jerryx_debugger_tcp_close_socket (tcp_socket);\n    return false;\n  }\n#else /* !_WIN32 */\n  int socket_flags = fcntl (tcp_socket, F_GETFL, 0);\n\n  if (socket_flags < 0)\n  {\n    close (tcp_socket);\n    return false;\n  }\n\n  if (fcntl (tcp_socket, F_SETFL, socket_flags | O_NONBLOCK) == -1)\n  {\n    close (tcp_socket);\n    return false;\n  }\n#endif /* _WIN32 */\n\n  JERRYX_DEBUG_MSG (\"Connected from: %s\\n\", inet_ntoa (addr.sin_addr));\n\n  size_t size = sizeof (jerryx_debugger_transport_tcp_t);\n\n  jerry_debugger_transport_header_t *header_p;\n  header_p = (jerry_debugger_transport_header_t *) jerry_heap_alloc (size);\n\n  if (!header_p)\n  {\n    jerryx_debugger_tcp_close_socket (tcp_socket);\n    return false;\n  }\n\n  header_p->close = jerryx_debugger_tcp_close;\n  header_p->send = jerryx_debugger_tcp_send;\n  header_p->receive = jerryx_debugger_tcp_receive;\n\n  ((jerryx_debugger_transport_tcp_t *) header_p)->tcp_socket = tcp_socket;\n\n  jerry_debugger_transport_add (header_p,\n                                0,\n                                JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE,\n                                0,\n                                JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE);\n\n  return true;\n} /* jerryx_debugger_tcp_create */\n\n#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) */\n\n/**\n * Dummy function when debugger is disabled.\n *\n * @return false\n */\nbool\njerryx_debugger_tcp_create (uint16_t port)\n{\n  JERRYX_UNUSED (port);\n  return false;\n} /* jerryx_debugger_tcp_create */\n\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/debugger/debugger-ws.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"debugger-sha1.h\"\n#include \"jerryscript-ext/debugger.h\"\n#include \"jext-common.h\"\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n\n/* JerryScript debugger protocol is a simplified version of RFC-6455 (WebSockets). */\n\n/**\n * Last fragment of a Websocket package.\n */\n#define JERRYX_DEBUGGER_WEBSOCKET_FIN_BIT 0x80\n\n/**\n * Masking-key is available.\n */\n#define JERRYX_DEBUGGER_WEBSOCKET_MASK_BIT 0x80\n\n/**\n * Opcode type mask.\n */\n#define JERRYX_DEBUGGER_WEBSOCKET_OPCODE_MASK 0x0fu\n\n/**\n * Packet length mask.\n */\n#define JERRYX_DEBUGGER_WEBSOCKET_LENGTH_MASK 0x7fu\n\n/**\n * Size of websocket header size.\n */\n#define JERRYX_DEBUGGER_WEBSOCKET_HEADER_SIZE 2\n\n/**\n * Payload mask size in bytes of a websocket package.\n */\n#define JERRYX_DEBUGGER_WEBSOCKET_MASK_SIZE 4\n\n/**\n * Maximum message size with 1 byte size field.\n */\n#define JERRYX_DEBUGGER_WEBSOCKET_ONE_BYTE_LEN_MAX 125\n\n/**\n * WebSocket opcode types.\n */\ntypedef enum\n{\n  JERRYX_DEBUGGER_WEBSOCKET_TEXT_FRAME = 1, /**< text frame */\n  JERRYX_DEBUGGER_WEBSOCKET_BINARY_FRAME = 2, /**< binary frame */\n  JERRYX_DEBUGGER_WEBSOCKET_CLOSE_CONNECTION = 8, /**< close connection */\n  JERRYX_DEBUGGER_WEBSOCKET_PING = 9, /**< ping (keep alive) frame */\n  JERRYX_DEBUGGER_WEBSOCKET_PONG = 10, /**< reply to ping frame */\n} jerryx_websocket_opcode_type_t;\n\n/**\n * Header for incoming packets.\n */\ntypedef struct\n{\n  uint8_t ws_opcode; /**< websocket opcode */\n  uint8_t size; /**< size of the message */\n  uint8_t mask[4]; /**< mask bytes */\n} jerryx_websocket_receive_header_t;\n\n/**\n * Convert a 6-bit value to a Base64 character.\n *\n * @return Base64 character\n */\nstatic uint8_t\njerryx_to_base64_character (uint8_t value) /**< 6-bit value */\n{\n  if (value < 26)\n  {\n    return (uint8_t) (value + 'A');\n  }\n\n  if (value < 52)\n  {\n    return (uint8_t) (value - 26 + 'a');\n  }\n\n  if (value < 62)\n  {\n    return (uint8_t) (value - 52 + '0');\n  }\n\n  if (value == 62)\n  {\n    return (uint8_t) '+';\n  }\n\n  return (uint8_t) '/';\n} /* jerryx_to_base64_character */\n\n/**\n * Encode a byte sequence into Base64 string.\n */\nstatic void\njerryx_to_base64 (const uint8_t *source_p, /**< source data */\n                 uint8_t *destination_p, /**< destination buffer */\n                 size_t length) /**< length of source, must be divisible by 3 */\n{\n  while (length >= 3)\n  {\n    uint8_t value = (source_p[0] >> 2);\n    destination_p[0] = jerryx_to_base64_character (value);\n\n    value = (uint8_t) (((source_p[0] << 4) | (source_p[1] >> 4)) & 0x3f);\n    destination_p[1] = jerryx_to_base64_character (value);\n\n    value = (uint8_t) (((source_p[1] << 2) | (source_p[2] >> 6)) & 0x3f);\n    destination_p[2] = jerryx_to_base64_character (value);\n\n    value = (uint8_t) (source_p[2] & 0x3f);\n    destination_p[3] = jerryx_to_base64_character (value);\n\n    source_p += 3;\n    destination_p += 4;\n    length -= 3;\n  }\n} /* jerryx_to_base64 */\n\n/**\n * Process WebSocket handshake.\n *\n * @return true - if the handshake was completed successfully\n *         false - otherwise\n */\nstatic bool\njerryx_process_handshake (uint8_t *request_buffer_p) /**< temporary buffer */\n{\n  size_t request_buffer_size = 1024;\n  uint8_t *request_end_p = request_buffer_p;\n\n  /* Buffer request text until the double newlines are received. */\n  while (true)\n  {\n    jerry_debugger_transport_receive_context_t context;\n    if (!jerry_debugger_transport_receive (&context))\n    {\n      JERRYX_ASSERT (!jerry_debugger_transport_is_connected ());\n      return false;\n    }\n\n    if (context.message_p == NULL)\n    {\n      jerry_debugger_transport_sleep ();\n      continue;\n    }\n\n    size_t length = request_buffer_size - 1u - (size_t) (request_end_p - request_buffer_p);\n\n    if (length < context.message_length)\n    {\n      JERRYX_ERROR_MSG (\"Handshake buffer too small.\\n\");\n      return false;\n    }\n\n    /* Both stream and datagram packets are supported. */\n    memcpy (request_end_p, context.message_p, context.message_length);\n\n    jerry_debugger_transport_receive_completed (&context);\n\n    request_end_p += (size_t) context.message_length;\n    *request_end_p = 0;\n\n    if (request_end_p > request_buffer_p + 4\n        && memcmp (request_end_p - 4, \"\\r\\n\\r\\n\", 4) == 0)\n    {\n      break;\n    }\n  }\n\n  /* Check protocol. */\n  const char get_text[] = \"GET /jerry-debugger\";\n  size_t text_len = sizeof (get_text) - 1;\n\n  if ((size_t) (request_end_p - request_buffer_p) < text_len\n      || memcmp (request_buffer_p, get_text, text_len) != 0)\n  {\n    JERRYX_ERROR_MSG (\"Invalid handshake format.\\n\");\n    return false;\n  }\n\n  uint8_t *websocket_key_p = request_buffer_p + text_len;\n\n  const char key_text[] = \"Sec-WebSocket-Key:\";\n  text_len = sizeof (key_text) - 1;\n\n  while (true)\n  {\n    if ((size_t) (request_end_p - websocket_key_p) < text_len)\n    {\n      JERRYX_ERROR_MSG (\"Sec-WebSocket-Key not found.\\n\");\n      return false;\n    }\n\n    if (websocket_key_p[0] == 'S'\n        && websocket_key_p[-1] == '\\n'\n        && websocket_key_p[-2] == '\\r'\n        && memcmp (websocket_key_p, key_text, text_len) == 0)\n    {\n      websocket_key_p += text_len;\n      break;\n    }\n\n    websocket_key_p++;\n  }\n\n  /* String terminated by double newlines. */\n\n  while (*websocket_key_p == ' ')\n  {\n    websocket_key_p++;\n  }\n\n  uint8_t *websocket_key_end_p = websocket_key_p;\n\n  while (*websocket_key_end_p > ' ')\n  {\n    websocket_key_end_p++;\n  }\n\n  /* Since the request_buffer_p is not needed anymore it can\n   * be reused for storing the SHA-1 key and Base64 string. */\n\n  const size_t sha1_length = 20;\n\n  jerryx_debugger_compute_sha1 (websocket_key_p,\n                               (size_t) (websocket_key_end_p - websocket_key_p),\n                               (const uint8_t *) \"258EAFA5-E914-47DA-95CA-C5AB0DC85B11\",\n                               36,\n                               request_buffer_p);\n\n  /* The SHA-1 key is 20 bytes long but jerryx_to_base64 expects\n   * a length divisible by 3 so an extra 0 is appended at the end. */\n  request_buffer_p[sha1_length] = 0;\n\n  jerryx_to_base64 (request_buffer_p, request_buffer_p + sha1_length + 1, sha1_length + 1);\n\n  /* Last value must be replaced by equal sign. */\n\n  const uint8_t response_prefix[] =\n  \"HTTP/1.1 101 Switching Protocols\\r\\nUpgrade: websocket\\r\\nConnection: Upgrade\\r\\nSec-WebSocket-Accept: \";\n\n  if (!jerry_debugger_transport_send (response_prefix, sizeof (response_prefix) - 1)\n      || !jerry_debugger_transport_send (request_buffer_p + sha1_length + 1, 27))\n  {\n    return false;\n  }\n\n  const uint8_t response_suffix[] = \"=\\r\\n\\r\\n\";\n  return jerry_debugger_transport_send (response_suffix, sizeof (response_suffix) - 1);\n} /* jerryx_process_handshake */\n\n/**\n * Close a tcp connection.\n */\nstatic void\njerryx_debugger_ws_close (jerry_debugger_transport_header_t *header_p) /**< tcp implementation */\n{\n  JERRYX_ASSERT (!jerry_debugger_transport_is_connected ());\n\n  jerry_heap_free ((void *) header_p, sizeof (jerry_debugger_transport_header_t));\n} /* jerryx_debugger_ws_close */\n\n/**\n * Send data over a websocket connection.\n *\n * @return true - if the data has been sent successfully\n *         false - otherwise\n */\nstatic bool\njerryx_debugger_ws_send (jerry_debugger_transport_header_t *header_p, /**< tcp implementation */\n                         uint8_t *message_p, /**< message to be sent */\n                         size_t message_length) /**< message length in bytes */\n{\n  JERRYX_ASSERT (message_length <= JERRYX_DEBUGGER_WEBSOCKET_ONE_BYTE_LEN_MAX);\n\n  message_p[-2] = JERRYX_DEBUGGER_WEBSOCKET_FIN_BIT | JERRYX_DEBUGGER_WEBSOCKET_BINARY_FRAME;\n  message_p[-1] = (uint8_t) message_length;\n\n  return header_p->next_p->send (header_p->next_p, message_p - 2, message_length + 2);\n} /* jerryx_debugger_ws_send */\n\n/**\n * Receive data from a websocket connection.\n */\nstatic bool\njerryx_debugger_ws_receive (jerry_debugger_transport_header_t *header_p, /**< tcp implementation */\n                            jerry_debugger_transport_receive_context_t *receive_context_p) /**< receive context */\n{\n  if (!header_p->next_p->receive (header_p->next_p, receive_context_p))\n  {\n    return false;\n  }\n\n  if (receive_context_p->message_p == NULL)\n  {\n    return true;\n  }\n\n  size_t message_total_length = receive_context_p->message_total_length;\n\n  if (message_total_length == 0)\n  {\n    /* Byte stream. */\n    if (receive_context_p->message_length < sizeof (jerryx_websocket_receive_header_t))\n    {\n      receive_context_p->message_p = NULL;\n      return true;\n    }\n  }\n  else\n  {\n    /* Datagram packet. */\n    JERRYX_ASSERT (receive_context_p->message_length >= sizeof (jerryx_websocket_receive_header_t));\n  }\n\n  uint8_t *message_p = receive_context_p->message_p;\n\n  if ((message_p[0] & ~JERRYX_DEBUGGER_WEBSOCKET_OPCODE_MASK) != JERRYX_DEBUGGER_WEBSOCKET_FIN_BIT\n      || (message_p[1] & JERRYX_DEBUGGER_WEBSOCKET_LENGTH_MASK) > JERRYX_DEBUGGER_WEBSOCKET_ONE_BYTE_LEN_MAX\n      || !(message_p[1] & JERRYX_DEBUGGER_WEBSOCKET_MASK_BIT))\n  {\n    JERRYX_ERROR_MSG (\"Unsupported Websocket message.\\n\");\n    jerry_debugger_transport_close ();\n    return false;\n  }\n\n  if ((message_p[0] & JERRYX_DEBUGGER_WEBSOCKET_OPCODE_MASK) != JERRYX_DEBUGGER_WEBSOCKET_BINARY_FRAME)\n  {\n    JERRYX_ERROR_MSG (\"Unsupported Websocket opcode.\\n\");\n    jerry_debugger_transport_close ();\n    return false;\n  }\n\n  size_t message_length = (size_t) (message_p[1] & JERRYX_DEBUGGER_WEBSOCKET_LENGTH_MASK);\n\n  if (message_total_length == 0)\n  {\n    size_t new_total_length = message_length + sizeof (jerryx_websocket_receive_header_t);\n\n    /* Byte stream. */\n    if (receive_context_p->message_length < new_total_length)\n    {\n      receive_context_p->message_p = NULL;\n      return true;\n    }\n\n    receive_context_p->message_total_length = new_total_length;\n  }\n  else\n  {\n    /* Datagram packet. */\n    JERRYX_ASSERT (receive_context_p->message_length == (message_length + sizeof (jerryx_websocket_receive_header_t)));\n  }\n\n  message_p += sizeof (jerryx_websocket_receive_header_t);\n\n  receive_context_p->message_p = message_p;\n  receive_context_p->message_length = message_length;\n\n  /* Unmask data bytes. */\n  const uint8_t *mask_p = message_p - JERRYX_DEBUGGER_WEBSOCKET_MASK_SIZE;\n  const uint8_t *mask_end_p = message_p;\n  const uint8_t *message_end_p = message_p + message_length;\n\n  while (message_p < message_end_p)\n  {\n    /* Invert certain bits with xor operation. */\n    *message_p = *message_p ^ *mask_p;\n\n    message_p++;\n    mask_p++;\n\n    if (JERRY_UNLIKELY (mask_p >= mask_end_p))\n    {\n      mask_p -= JERRYX_DEBUGGER_WEBSOCKET_MASK_SIZE;\n    }\n  }\n\n  return true;\n} /* jerryx_debugger_ws_receive */\n\n/**\n * Initialize the websocket transportation layer.\n *\n * @return true - if the connection succeeded\n *         false - otherwise\n */\nbool\njerryx_debugger_ws_create (void)\n{\n  bool is_handshake_ok = false;\n\n  const size_t buffer_size = 1024;\n  uint8_t *request_buffer_p = (uint8_t *) jerry_heap_alloc (buffer_size);\n\n  if (!request_buffer_p)\n  {\n    return false;\n  }\n\n  is_handshake_ok = jerryx_process_handshake (request_buffer_p);\n\n  jerry_heap_free ((void *) request_buffer_p, buffer_size);\n\n  if (!is_handshake_ok && jerry_debugger_transport_is_connected ())\n  {\n    return false;\n  }\n\n  const size_t interface_size = sizeof (jerry_debugger_transport_header_t);\n  jerry_debugger_transport_header_t *header_p;\n  header_p = (jerry_debugger_transport_header_t *) jerry_heap_alloc (interface_size);\n\n  if (!header_p)\n  {\n    return false;\n  }\n\n  header_p->close = jerryx_debugger_ws_close;\n  header_p->send = jerryx_debugger_ws_send;\n  header_p->receive = jerryx_debugger_ws_receive;\n\n  jerry_debugger_transport_add (header_p,\n                                JERRYX_DEBUGGER_WEBSOCKET_HEADER_SIZE,\n                                JERRYX_DEBUGGER_WEBSOCKET_ONE_BYTE_LEN_MAX,\n                                JERRYX_DEBUGGER_WEBSOCKET_HEADER_SIZE + JERRYX_DEBUGGER_WEBSOCKET_MASK_SIZE,\n                                JERRYX_DEBUGGER_WEBSOCKET_ONE_BYTE_LEN_MAX);\n\n  return true;\n} /* jerryx_debugger_ws_create */\n\n#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) */\n\n/**\n * Dummy function when debugger is disabled.\n *\n * @return false\n */\nbool\njerryx_debugger_ws_create (void)\n{\n  return false;\n} /* jerryx_debugger_ws_create */\n\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/handle-scope/handle-scope-allocator.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdlib.h>\n#include \"handle-scope-internal.h\"\n#include \"jext-common.h\"\n\nstatic jerryx_handle_scope_t jerryx_handle_scope_root =\n{\n  .prelist_handle_count = 0,\n  .handle_ptr = NULL,\n};\nstatic jerryx_handle_scope_t *jerryx_handle_scope_current = &jerryx_handle_scope_root;\nstatic jerryx_handle_scope_pool_t jerryx_handle_scope_pool =\n{\n  .count = 0,\n  .start = NULL,\n};\n\n#define JERRYX_HANDLE_SCOPE_POOL_PRELIST_LAST \\\n  jerryx_handle_scope_pool.prelist + JERRYX_SCOPE_PRELIST_SIZE - 1\n\n#define JERRYX_HANDLE_SCOPE_PRELIST_IDX(scope) (scope - jerryx_handle_scope_pool.prelist)\n\n/**\n * Get current handle scope top of stack.\n */\njerryx_handle_scope_t *\njerryx_handle_scope_get_current (void)\n{\n  return jerryx_handle_scope_current;\n} /* jerryx_handle_scope_get_current */\n\n/**\n * Get root handle scope.\n */\njerryx_handle_scope_t *\njerryx_handle_scope_get_root (void)\n{\n  return &jerryx_handle_scope_root;\n} /* jerryx_handle_scope_get_root */\n\n/**\n * Determines if given handle scope is located in pre-allocated list.\n *\n * @param scope - the one to be determined.\n */\nstatic bool\njerryx_handle_scope_is_in_prelist (jerryx_handle_scope_t *scope)\n{\n  return (jerryx_handle_scope_pool.prelist <= scope)\n  && (scope <= (jerryx_handle_scope_pool.prelist + JERRYX_SCOPE_PRELIST_SIZE - 1));\n} /** jerryx_handle_scope_is_in_prelist */\n\n/**\n * Get the parent of given handle scope.\n * If given handle scope is in prelist, the parent must be in prelist too;\n * if given is the first item of heap chain list, the parent must be the last one of prelist;\n * the parent must be in chain list otherwise.\n *\n * @param scope - the one to be permformed on.\n * @returns - the parent of the given scope.\n */\njerryx_handle_scope_t *\njerryx_handle_scope_get_parent (jerryx_handle_scope_t *scope)\n{\n  if (scope == &jerryx_handle_scope_root)\n  {\n    return NULL;\n  }\n  if (!jerryx_handle_scope_is_in_prelist (scope))\n  {\n    jerryx_handle_scope_dynamic_t *dy_scope = (jerryx_handle_scope_dynamic_t *) scope;\n    if (dy_scope == jerryx_handle_scope_pool.start)\n    {\n      return JERRYX_HANDLE_SCOPE_POOL_PRELIST_LAST;\n    }\n    jerryx_handle_scope_dynamic_t *parent = dy_scope->parent;\n    return (jerryx_handle_scope_t *) parent;\n  }\n  if (scope == jerryx_handle_scope_pool.prelist)\n  {\n    return &jerryx_handle_scope_root;\n  }\n  return jerryx_handle_scope_pool.prelist + JERRYX_HANDLE_SCOPE_PRELIST_IDX (scope) - 1;\n} /** jerryx_handle_scope_get_parent */\n\n/**\n * Get the child of given handle scope.\n * If the given handle scope is in heap chain list, its child must be in heap chain list too;\n * if the given handle scope is the last one of prelist, its child must be the first item of chain list;\n * the children are in prelist otherwise.\n *\n * @param scope - the one to be permformed on.\n * @returns the child of the given scope.\n */\njerryx_handle_scope_t *\njerryx_handle_scope_get_child (jerryx_handle_scope_t *scope)\n{\n  if (scope == &jerryx_handle_scope_root)\n  {\n    if (jerryx_handle_scope_pool.count > 0)\n    {\n      return jerryx_handle_scope_pool.prelist;\n    }\n    return NULL;\n  }\n  if (!jerryx_handle_scope_is_in_prelist (scope))\n  {\n    jerryx_handle_scope_dynamic_t *child = ((jerryx_handle_scope_dynamic_t *) scope)->child;\n    return (jerryx_handle_scope_t *) child;\n  }\n  if (scope == JERRYX_HANDLE_SCOPE_POOL_PRELIST_LAST)\n  {\n    return (jerryx_handle_scope_t *) jerryx_handle_scope_pool.start;\n  }\n  long idx = JERRYX_HANDLE_SCOPE_PRELIST_IDX (scope);\n  if (idx < 0)\n  {\n    return NULL;\n  }\n  if ((unsigned long) idx >= jerryx_handle_scope_pool.count - 1)\n  {\n    return NULL;\n  }\n  return jerryx_handle_scope_pool.prelist + idx + 1;\n} /** jerryx_handle_scope_get_child */\n\n/**\n * Claims a handle scope either from prelist or allocating a new memory block,\n * and increment pool's scope count by 1, and set current scope to the newly claimed one.\n * If there are still available spaces in prelist, claims a block in prelist;\n * otherwise allocates a new memory block from heap and sets its fields to default values,\n * and link it to previously dynamically allocated scope, or link it to pool's start pointer.\n *\n * @returns the newly claimed handle scope pointer.\n */\njerryx_handle_scope_t *\njerryx_handle_scope_alloc (void)\n{\n  jerryx_handle_scope_t *scope;\n  if (jerryx_handle_scope_pool.count < JERRYX_SCOPE_PRELIST_SIZE)\n  {\n    scope = jerryx_handle_scope_pool.prelist + jerryx_handle_scope_pool.count;\n  }\n  else\n  {\n    jerryx_handle_scope_dynamic_t *dy_scope;\n    dy_scope = (jerryx_handle_scope_dynamic_t *) jerry_heap_alloc (sizeof (jerryx_handle_scope_dynamic_t));\n    JERRYX_ASSERT (dy_scope != NULL);\n    dy_scope->child = NULL;\n\n    if (jerryx_handle_scope_pool.count != JERRYX_SCOPE_PRELIST_SIZE)\n    {\n      jerryx_handle_scope_dynamic_t *dy_current = (jerryx_handle_scope_dynamic_t *) jerryx_handle_scope_current;\n      dy_scope->parent = dy_current;\n      dy_current->child = dy_scope;\n    }\n    else\n    {\n      jerryx_handle_scope_pool.start = dy_scope;\n      dy_scope->parent = NULL;\n    }\n\n    scope = (jerryx_handle_scope_t *) dy_scope;\n  }\n\n  scope->prelist_handle_count = 0;\n  scope->escaped = false;\n  scope->handle_ptr = NULL;\n\n  jerryx_handle_scope_current = scope;\n  ++jerryx_handle_scope_pool.count;\n  return (jerryx_handle_scope_t *) scope;\n} /** jerryx_handle_scope_alloc */\n\n/**\n * Deannounce a previously claimed handle scope, return it to pool\n * or free the allocated memory block.\n *\n * @param scope - the one to be freed.\n */\nvoid\njerryx_handle_scope_free (jerryx_handle_scope_t *scope)\n{\n  if (scope == &jerryx_handle_scope_root)\n  {\n    return;\n  }\n\n  --jerryx_handle_scope_pool.count;\n  if (scope == jerryx_handle_scope_current)\n  {\n    jerryx_handle_scope_current = jerryx_handle_scope_get_parent (scope);\n  }\n\n  if (!jerryx_handle_scope_is_in_prelist (scope))\n  {\n    jerryx_handle_scope_dynamic_t *dy_scope = (jerryx_handle_scope_dynamic_t *) scope;\n    if (dy_scope == jerryx_handle_scope_pool.start)\n    {\n      jerryx_handle_scope_pool.start = dy_scope->child;\n    }\n    else if (dy_scope->parent != NULL)\n    {\n      dy_scope->parent->child = dy_scope->child;\n    }\n    jerry_heap_free (dy_scope, sizeof (jerryx_handle_scope_dynamic_t));\n    return;\n  }\n  /**\n   * Nothing to do with scopes in prelist\n   */\n} /** jerryx_handle_scope_free */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/handle-scope/handle-scope-internal.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_HANDLE_SCOPE_INTERNAL_H\n#define JERRYX_HANDLE_SCOPE_INTERNAL_H\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/** MARK: - handle-scope-allocator.c */\ntypedef struct jerryx_handle_scope_pool_s jerryx_handle_scope_pool_t;\n/**\n * A linear allocating memory pool for type jerryx_handle_scope_t,\n * in which allocated item shall be released in reversed order of allocation\n */\nstruct jerryx_handle_scope_pool_s\n{\n  jerryx_handle_scope_t prelist[JERRYX_SCOPE_PRELIST_SIZE]; /**< inlined handle scopes in the pool */\n  size_t count; /**< number of handle scopes in the pool */\n  jerryx_handle_scope_dynamic_t *start; /**< start address of dynamically allocated handle scope list */\n};\n\njerryx_handle_scope_t *\njerryx_handle_scope_get_parent (jerryx_handle_scope_t *scope);\n\njerryx_handle_scope_t *\njerryx_handle_scope_get_child (jerryx_handle_scope_t *scope);\n\njerryx_handle_scope_t *\njerryx_handle_scope_alloc (void);\n\nvoid\njerryx_handle_scope_free (jerryx_handle_scope_t *scope);\n/** MARK: - END handle-scope-allocator.c */\n\n/** MARK: - handle-scope.c */\nvoid\njerryx_handle_scope_release_handles (jerryx_handle_scope scope);\n\njerry_value_t\njerryx_hand_scope_escape_handle_from_prelist (jerryx_handle_scope scope, size_t idx);\n\njerry_value_t\njerryx_handle_scope_add_handle_to (jerryx_handle_t *handle, jerryx_handle_scope scope);\n\njerryx_handle_scope_status\njerryx_escape_handle_internal (jerryx_escapable_handle_scope scope,\n                               jerry_value_t escapee,\n                               jerry_value_t *result,\n                               bool should_promote);\n/** MARK: - END handle-scope.c */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYX_HANDLE_SCOPE_INTERNAL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/handle-scope/handle-scope.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdlib.h>\n#include \"handle-scope-internal.h\"\n#include \"jext-common.h\"\n\nJERRYX_STATIC_ASSERT (JERRYX_SCOPE_PRELIST_SIZE < 32, JERRYX_SCOPE_PRELIST_SIZE_MUST_BE_LESS_THAN_SIZE_OF_UINT8_T);\n\n/**\n * Opens a new handle scope and attach it to current global scope as a child scope.\n *\n * @param result - [out value] opened scope.\n * @return status code, jerryx_handle_scope_ok if success.\n */\njerryx_handle_scope_status\njerryx_open_handle_scope (jerryx_handle_scope *result)\n{\n  *result = jerryx_handle_scope_alloc ();\n  return jerryx_handle_scope_ok;\n} /** jerryx_open_handle_scope */\n\n/**\n * Release all jerry values attached to given scope\n *\n * @param scope - the scope of handles to be released.\n */\nvoid\njerryx_handle_scope_release_handles (jerryx_handle_scope scope)\n{\n  size_t prelist_handle_count = scope->prelist_handle_count;\n  if (prelist_handle_count == JERRYX_HANDLE_PRELIST_SIZE && scope->handle_ptr != NULL)\n  {\n    jerryx_handle_t *a_handle = scope->handle_ptr;\n    while (a_handle != NULL)\n    {\n      jerry_release_value (a_handle->jval);\n      jerryx_handle_t *sibling = a_handle->sibling;\n      jerry_heap_free (a_handle, sizeof (jerryx_handle_t));\n      a_handle = sibling;\n    }\n    scope->handle_ptr = NULL;\n    prelist_handle_count = JERRYX_HANDLE_PRELIST_SIZE;\n  }\n\n  for (size_t idx = 0; idx < prelist_handle_count; idx++)\n  {\n    jerry_release_value (scope->handle_prelist[idx]);\n  }\n  scope->prelist_handle_count = 0;\n} /** jerryx_handle_scope_release_handles */\n\n/**\n * Close the scope and its child scopes and release all jerry values that\n * resides in the scopes.\n * Scopes must be closed in the reverse order from which they were created.\n *\n * @param scope - the scope closed.\n * @return status code, jerryx_handle_scope_ok if success.\n */\njerryx_handle_scope_status\njerryx_close_handle_scope (jerryx_handle_scope scope)\n{\n  /**\n   * Release all handles related to given scope and its child scopes\n   */\n  jerryx_handle_scope a_scope = scope;\n  do\n  {\n    jerryx_handle_scope_release_handles (a_scope);\n    jerryx_handle_scope child = jerryx_handle_scope_get_child (a_scope);\n    jerryx_handle_scope_free (a_scope);\n    a_scope = child;\n  }\n  while (a_scope != NULL);\n\n  return jerryx_handle_scope_ok;\n} /** jerryx_close_handle_scope */\n\n/**\n * Opens a new handle scope from which one object can be promoted to the outer scope\n * and attach it to current global scope as a child scope.\n *\n * @param result - [out value] opened escapable handle scope.\n * @return status code, jerryx_handle_scope_ok if success.\n */\njerryx_handle_scope_status\njerryx_open_escapable_handle_scope (jerryx_handle_scope *result)\n{\n  return jerryx_open_handle_scope (result);\n} /** jerryx_open_escapable_handle_scope */\n\n/**\n * Close the scope and its child scopes and release all jerry values that\n * resides in the scopes.\n * Scopes must be closed in the reverse order from which they were created.\n *\n * @param scope - the one to be closed.\n * @return status code, jerryx_handle_scope_ok if success.\n */\njerryx_handle_scope_status\njerryx_close_escapable_handle_scope (jerryx_handle_scope scope)\n{\n  return jerryx_close_handle_scope (scope);\n} /** jerryx_close_escapable_handle_scope */\n\n/**\n * Internal helper.\n * Escape a jerry value from the scope, yet did not promote it to outer scope.\n * An assertion of if parent exists shall be made before invoking this function.\n *\n * @param scope - scope of the handle added to.\n * @param idx - expected index of the handle in the scope's prelist.\n * @returns escaped jerry value id\n */\njerry_value_t\njerryx_hand_scope_escape_handle_from_prelist (jerryx_handle_scope scope, size_t idx)\n{\n  jerry_value_t jval = scope->handle_prelist[idx];\n  if (scope->prelist_handle_count == JERRYX_HANDLE_PRELIST_SIZE && scope->handle_ptr != NULL)\n  {\n    jerryx_handle_t *handle = scope->handle_ptr;\n    scope->handle_ptr = handle->sibling;\n    scope->handle_prelist[idx] = handle->jval;\n    jerry_heap_free (handle, sizeof (jerryx_handle_t));\n    return jval;\n  }\n\n  if (idx < JERRYX_HANDLE_PRELIST_SIZE - 1)\n  {\n    scope->handle_prelist[idx] = scope->handle_prelist[scope->prelist_handle_count - 1];\n  }\n  return jval;\n} /** jerryx_hand_scope_escape_handle_from_prelist */\n\n/**\n * Internal helper.\n * Escape a jerry value from the given escapable handle scope.\n *\n * @param scope - the expected scope to be escaped from.\n * @param escapee - the jerry value to be escaped.\n * @param result - [out value] escaped jerry value result.\n * @param should_promote - true if the escaped value should be added to parent\n *                         scope after escaped from the given handle scope.\n * @return status code, jerryx_handle_scope_ok if success.\n */\njerryx_handle_scope_status\njerryx_escape_handle_internal (jerryx_escapable_handle_scope scope,\n                               jerry_value_t escapee,\n                               jerry_value_t *result,\n                               bool should_promote)\n{\n  if (scope->escaped)\n  {\n    return jerryx_escape_called_twice;\n  }\n\n  jerryx_handle_scope parent = jerryx_handle_scope_get_parent (scope);\n  if (parent == NULL)\n  {\n    return jerryx_handle_scope_mismatch;\n  }\n\n  bool found = false;\n  {\n    size_t found_idx = 0;\n    size_t prelist_count = scope->prelist_handle_count;\n    /**\n     * Search prelist in a reversed order since last added handle\n     * is possible the one to be escaped\n     */\n    for (size_t idx_plus_1 = prelist_count; idx_plus_1 > 0; --idx_plus_1)\n    {\n      if (escapee == scope->handle_prelist[idx_plus_1 - 1])\n      {\n        found = true;\n        found_idx = idx_plus_1 - 1;\n        break;\n      }\n    }\n\n    if (found)\n    {\n      *result = jerryx_hand_scope_escape_handle_from_prelist (scope, found_idx);\n\n      --scope->prelist_handle_count;\n      if (should_promote)\n      {\n        scope->escaped = true;\n        /**\n         * Escape handle to parent scope\n         */\n        jerryx_create_handle_in_scope (*result, jerryx_handle_scope_get_parent (scope));\n      }\n      return jerryx_handle_scope_ok;\n    }\n  };\n\n  if (scope->prelist_handle_count <= JERRYX_HANDLE_PRELIST_SIZE && scope->handle_ptr == NULL)\n  {\n    return jerryx_handle_scope_mismatch;\n  }\n\n  /**\n   * Handle chain list is already in an reversed order,\n   * search through it as it is\n   */\n  jerryx_handle_t *handle = scope->handle_ptr;\n  jerryx_handle_t *memo_handle = NULL;\n  jerryx_handle_t *found_handle = NULL;\n  while (!found)\n  {\n    if (handle == NULL)\n    {\n      return jerryx_handle_scope_mismatch;\n    }\n    if (handle->jval != escapee)\n    {\n      memo_handle = handle;\n      handle = handle->sibling;\n      continue;\n    }\n    /**\n     * Remove found handle from current scope's handle chain\n     */\n    found = true;\n    found_handle = handle;\n    if (memo_handle == NULL)\n    {\n      // found handle is the first handle in heap\n      scope->handle_ptr = found_handle->sibling;\n    }\n    else\n    {\n      memo_handle->sibling = found_handle->sibling;\n    }\n  }\n\n  if (should_promote)\n  {\n    /**\n     * Escape handle to parent scope\n     */\n    *result = jerryx_handle_scope_add_handle_to (found_handle, parent);\n  }\n\n  if (should_promote)\n  {\n    scope->escaped = true;\n  }\n  return jerryx_handle_scope_ok;\n} /** jerryx_escape_handle_internal */\n\n/**\n * Promotes the handle to the JavaScript object so that it is valid for the lifetime of\n * the outer scope. It can only be called once per scope. If it is called more than\n * once an error will be returned.\n *\n * @param scope - the expected scope to be escaped from.\n * @param escapee - the jerry value to be escaped.\n * @param result - [out value] escaped jerry value result.\n * @return status code, jerryx_handle_scope_ok if success.\n */\njerryx_handle_scope_status\njerryx_escape_handle (jerryx_escapable_handle_scope scope,\n                      jerry_value_t escapee,\n                      jerry_value_t *result)\n{\n  return jerryx_escape_handle_internal (scope, escapee, result, true);\n} /** jerryx_escape_handle */\n\n/**\n * Escape a handle from scope yet do not promote it to the outer scope.\n * Leave the handle's life time management up to user.\n *\n * @param scope - the expected scope to be removed from.\n * @param escapee - the jerry value to be removed.\n * @param result - [out value] removed jerry value result.\n * @return status code, jerryx_handle_scope_ok if success.\n */\njerryx_handle_scope_status\njerryx_remove_handle (jerryx_escapable_handle_scope scope,\n                      jerry_value_t escapee,\n                      jerry_value_t *result)\n{\n  return jerryx_escape_handle_internal (scope, escapee, result, false);\n} /** jerryx_remove_handle */\n\n/**\n * Try to reuse given handle if possible while adding to the scope.\n *\n * @param handle - the one to be added to the scope.\n * @param scope - the scope of handle to be added to.\n * @returns the jerry value id wrapped by given handle.\n */\njerry_value_t\njerryx_handle_scope_add_handle_to (jerryx_handle_t *handle, jerryx_handle_scope scope)\n{\n  size_t prelist_handle_count = scope->prelist_handle_count;\n  if (prelist_handle_count < JERRYX_HANDLE_PRELIST_SIZE)\n  {\n    ++scope->prelist_handle_count;\n    jerry_value_t jval = handle->jval;\n    jerry_heap_free (handle, sizeof (jerryx_handle_t));\n    scope->handle_prelist[prelist_handle_count] = jval;\n    return jval;\n  }\n\n  handle->sibling = scope->handle_ptr;\n  scope->handle_ptr = handle;\n  return handle->jval;\n} /** jerryx_handle_scope_add_handle_to */\n\n/**\n * Add given jerry value to the scope.\n *\n * @param jval - jerry value to be added to scope.\n * @param scope - the scope of the jerry value been expected to be added to.\n * @return jerry value that added to scope.\n */\njerry_value_t\njerryx_create_handle_in_scope (jerry_value_t jval, jerryx_handle_scope scope)\n{\n  size_t prelist_handle_count = scope->prelist_handle_count;\n  if (prelist_handle_count < JERRYX_HANDLE_PRELIST_SIZE)\n  {\n    scope->handle_prelist[prelist_handle_count] = jval;\n\n    ++scope->prelist_handle_count;\n    return jval;\n  }\n  jerryx_handle_t *handle = (jerryx_handle_t *) jerry_heap_alloc (sizeof (jerryx_handle_t));\n  JERRYX_ASSERT (handle != NULL);\n  handle->jval = jval;\n\n  handle->sibling = scope->handle_ptr;\n  scope->handle_ptr = handle;\n\n  return jval;\n} /** jerryx_create_handle_in_scope */\n\n/**\n * Add given jerry value to current top scope.\n *\n * @param jval - jerry value to be added to scope.\n * @return jerry value that added to scope.\n */\njerry_value_t\njerryx_create_handle (jerry_value_t jval)\n{\n  return jerryx_create_handle_in_scope (jval, jerryx_handle_scope_get_current ());\n} /** jerryx_create_handle */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/handler/handler-assert.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-ext/handler.h\"\n#include \"jerryscript-port.h\"\n\n#include <inttypes.h>\n\n/**\n * Hard assert for scripts. The routine calls jerry_port_fatal on assertion failure.\n *\n * Notes:\n *  * If the `JERRY_FEATURE_LINE_INFO` runtime feature is enabled (build option: `JERRY_LINE_INFO`)\n *    a backtrace is also printed out.\n *\n * @return true - if only one argument was passed and that argument was a boolean true.\n *         Note that the function does not return otherwise.\n */\njerry_value_t\njerryx_handler_assert_fatal (const jerry_value_t func_obj_val, /**< function object */\n                             const jerry_value_t this_p, /**< this arg */\n                             const jerry_value_t args_p[], /**< function arguments */\n                             const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  (void) func_obj_val; /* unused */\n  (void) this_p; /* unused */\n\n  if (args_cnt == 1\n      && jerry_value_is_boolean (args_p[0])\n      && jerry_get_boolean_value (args_p[0]))\n  {\n    return jerry_create_boolean (true);\n  }\n\n  /* Assert failed, print a bit of JS backtrace */\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Script Error: assertion failed\\n\");\n\n  if (jerry_is_feature_enabled (JERRY_FEATURE_LINE_INFO))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Script backtrace (top 5):\\n\");\n\n    /* If the line info feature is disabled an empty array will be returned. */\n    jerry_value_t backtrace_array = jerry_get_backtrace (5);\n    uint32_t array_length = jerry_get_array_length (backtrace_array);\n\n    for (uint32_t idx = 0; idx < array_length; idx++)\n    {\n      jerry_value_t property = jerry_get_property_by_index (backtrace_array, idx);\n\n      jerry_length_t total_size = jerry_get_utf8_string_size (property);\n      jerry_length_t current_size = 0;\n      jerry_char_t string_buffer[64];\n      const jerry_length_t copy_size = (jerry_length_t) (sizeof (string_buffer) - 1);\n\n      /* On some systems the uint32_t values can't be printed with \"%u\" and\n       * on some systems it can be printed. To avoid differences in the uint32_t typdef\n       * The \"PRIu32\" macro is used to correctly add the formatter.\n       */\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \" %\"PRIu32\": \", idx);\n      do\n      {\n        jerry_size_t copied_bytes = jerry_substring_to_utf8_char_buffer (property,\n                                                                         current_size,\n                                                                         current_size + copy_size,\n                                                                         string_buffer,\n                                                                         copy_size);\n        string_buffer[copied_bytes] = '\\0';\n        jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"%s\", string_buffer);\n\n        current_size += copied_bytes;\n      }\n      while (total_size != current_size);\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"\\n\");\n\n      jerry_release_value (property);\n    }\n\n    jerry_release_value (backtrace_array);\n  }\n\n  jerry_port_fatal (ERR_FAILED_INTERNAL_ASSERTION);\n} /* jerryx_handler_assert_fatal */\n\n/**\n * Soft assert for scripts. The routine throws an error on assertion failure.\n *\n * @return true - if only one argument was passed and that argument was a boolean true.\n *         error - otherwise.\n */\njerry_value_t\njerryx_handler_assert_throw (const jerry_value_t func_obj_val, /**< function object */\n                             const jerry_value_t this_p, /**< this arg */\n                             const jerry_value_t args_p[], /**< function arguments */\n                             const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  (void) func_obj_val; /* unused */\n  (void) this_p; /* unused */\n\n  if (args_cnt == 1\n      && jerry_value_is_boolean (args_p[0])\n      && jerry_get_boolean_value (args_p[0]))\n  {\n    return jerry_create_boolean (true);\n  }\n\n  return jerry_create_error (JERRY_ERROR_COMMON, (jerry_char_t *) \"assertion failed\");\n} /* jerryx_handler_assert_throw */\n\n/**\n * An alias to `jerryx_handler_assert_fatal`.\n *\n * @return true - if only one argument was passed and that argument was a boolean true.\n *         Note that the function does not return otherwise.\n */\njerry_value_t\njerryx_handler_assert (const jerry_value_t func_obj_val, /**< function object */\n                       const jerry_value_t this_p, /**< this arg */\n                       const jerry_value_t args_p[], /**< function arguments */\n                       const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  return jerryx_handler_assert_fatal (func_obj_val, this_p, args_p, args_cnt);\n} /* jerryx_handler_assert */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/handler/handler-gc.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-ext/handler.h\"\n\n/**\n * Expose garbage collector to scripts.\n *\n * @return undefined.\n */\njerry_value_t\njerryx_handler_gc (const jerry_value_t func_obj_val, /**< function object */\n                   const jerry_value_t this_p, /**< this arg */\n                   const jerry_value_t args_p[], /**< function arguments */\n                   const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  (void) func_obj_val; /* unused */\n  (void) this_p; /* unused */\n\n  jerry_gc_mode_t mode = ((args_cnt > 0 && jerry_value_to_boolean (args_p[0])) ? JERRY_GC_PRESSURE_HIGH\n                                                                               : JERRY_GC_PRESSURE_LOW);\n\n  jerry_gc (mode);\n  return jerry_create_undefined ();\n} /* jerryx_handler_gc */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/handler/handler-print.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-ext/handler.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-debugger.h\"\n\n/**\n * Provide a 'print' implementation for scripts.\n *\n * The routine converts all of its arguments to strings and outputs them\n * char-by-char using jerry_port_print_char.\n *\n * The NUL character is output as \"\\u0000\", other characters are output\n * bytewise.\n *\n * Note:\n *      This implementation does not use standard C `printf` to print its\n *      output. This allows more flexibility but also extends the core\n *      JerryScript engine port API. Applications that want to use\n *      `jerryx_handler_print` must ensure that their port implementation also\n *      provides `jerry_port_print_char`.\n *\n * @return undefined - if all arguments could be converted to strings,\n *         error - otherwise.\n */\njerry_value_t\njerryx_handler_print (const jerry_value_t func_obj_val, /**< function object */\n                      const jerry_value_t this_p, /**< this arg */\n                      const jerry_value_t args_p[], /**< function arguments */\n                      const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  (void) func_obj_val; /* unused */\n  (void) this_p; /* unused */\n\n  const char * const null_str = \"\\\\u0000\";\n\n  jerry_value_t ret_val = jerry_create_undefined ();\n\n  for (jerry_length_t arg_index = 0; arg_index < args_cnt; arg_index++)\n  {\n    jerry_value_t str_val;\n\n    if (jerry_value_is_symbol (args_p[arg_index]))\n    {\n      str_val = jerry_get_symbol_descriptive_string (args_p[arg_index]);\n    }\n    else\n    {\n      str_val = jerry_value_to_string (args_p[arg_index]);\n    }\n\n    if (jerry_value_is_error (str_val))\n    {\n      /* There is no need to free the undefined value. */\n      ret_val = str_val;\n      break;\n    }\n\n    jerry_length_t length = jerry_get_utf8_string_length (str_val);\n    jerry_length_t substr_pos = 0;\n    jerry_char_t substr_buf[256];\n\n    do\n    {\n      jerry_size_t substr_size = jerry_substring_to_utf8_char_buffer (str_val,\n                                                                      substr_pos,\n                                                                      length,\n                                                                      substr_buf,\n                                                                      256 - 1);\n\n      jerry_char_t *buf_end_p = substr_buf + substr_size;\n\n      /* Update start position by the number of utf-8 characters. */\n      for (jerry_char_t *buf_p = substr_buf; buf_p < buf_end_p; buf_p++)\n      {\n        /* Skip intermediate utf-8 octets. */\n        if ((*buf_p & 0xc0) != 0x80)\n        {\n          substr_pos++;\n        }\n      }\n\n      if (substr_pos == length)\n      {\n        *buf_end_p++ = (arg_index < args_cnt - 1) ? ' ' : '\\n';\n      }\n\n      for (jerry_char_t *buf_p = substr_buf; buf_p < buf_end_p; buf_p++)\n      {\n        char chr = (char) *buf_p;\n\n        if (chr != '\\0')\n        {\n          jerry_port_print_char (chr);\n          continue;\n        }\n\n        for (jerry_size_t null_index = 0; null_str[null_index] != '\\0'; null_index++)\n        {\n          jerry_port_print_char (null_str[null_index]);\n        }\n      }\n    }\n    while (substr_pos < length);\n\n    jerry_release_value (str_val);\n  }\n\n  if (args_cnt == 0 || jerry_value_is_error (ret_val))\n  {\n    jerry_port_print_char ('\\n');\n  }\n\n  return ret_val;\n} /* jerryx_handler_print */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/handler/handler-register.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-ext/handler.h\"\n\n/**\n * Register a JavaScript function in the global object.\n *\n * Note:\n *      returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return true value - if the operation was successful,\n *         error - otherwise.\n */\njerry_value_t\njerryx_handler_register_global (const jerry_char_t *name_p, /**< name of the function */\n                                jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n  jerry_value_t function_name_val = jerry_create_string (name_p);\n  jerry_value_t function_val = jerry_create_external_function (handler_p);\n\n  jerry_value_t result_val = jerry_set_property (global_obj_val, function_name_val, function_val);\n\n  jerry_release_value (function_val);\n  jerry_release_value (function_name_val);\n  jerry_release_value (global_obj_val);\n\n  return result_val;\n} /* jerryx_handler_register_global */\n\n/**\n * Set multiple properties on a target object.\n *\n * The properties are an array of (name, property value) pairs and\n * this list must end with a (NULL, 0) entry.\n *\n * Notes:\n *  - Each property value in the input array is released after a successful property registration.\n *  - The property name must be a zero terminated UTF-8 string.\n *  - There should be no '\\0' (NULL) character in the name excluding the string terminator.\n *  - The method `jerryx_release_property_entry` must be called if there is any failed registration\n *    to release the values in the entries array.\n *\n * @return `jerryx_register_result` struct - if everything is ok with the (undefined, property entry count) values.\n *         In case of error the (error object, registered property count) pair.\n */\njerryx_register_result\njerryx_set_properties (const jerry_value_t target_object, /**< target object */\n                       const jerryx_property_entry entries[]) /**< array of method entries */\n{\n#define JERRYX_SET_PROPERTIES_RESULT(VALUE, IDX) ((jerryx_register_result) { VALUE, IDX })\n  uint32_t idx = 0;\n\n  if (entries == NULL)\n  {\n    return JERRYX_SET_PROPERTIES_RESULT (jerry_create_undefined (), 0);\n  }\n\n  for (; (entries[idx].name != NULL); idx++)\n  {\n    const jerryx_property_entry *entry = &entries[idx];\n\n    jerry_value_t prop_name = jerry_create_string_from_utf8 ((const jerry_char_t *) entry->name);\n    jerry_value_t result = jerry_set_property (target_object, prop_name, entry->value);\n\n    jerry_release_value (prop_name);\n\n    // By API definition:\n    // The jerry_set_property returns TRUE if there is no problem\n    // and error object if there is any problem.\n    // Thus there is no need to check if the boolean value is false or not.\n    if (!jerry_value_is_boolean (result))\n    {\n      return JERRYX_SET_PROPERTIES_RESULT (result, idx);\n    }\n\n    jerry_release_value (entry->value);\n    jerry_release_value (result);\n  }\n\n  return JERRYX_SET_PROPERTIES_RESULT (jerry_create_undefined (), idx);\n#undef JERRYX_SET_PROPERTIES_RESULT\n} /* jerryx_set_properties */\n\n/**\n * Release all jerry_value_t in a jerryx_property_entry array based on\n * a previous jerryx_set_properties call.\n *\n * In case of a successful registration it is safe to call this method.\n */\nvoid\njerryx_release_property_entry (const jerryx_property_entry entries[], /**< list of property entries */\n                               const jerryx_register_result register_result) /**< previous result of registration */\n{\n  if (entries == NULL)\n  {\n    return;\n  }\n\n  for (uint32_t idx = register_result.registered; entries[idx].name != NULL; idx++)\n  {\n    jerry_release_value (entries[idx].value);\n  }\n} /* jerryx_release_property_entry */\n\n/**\n * Set a property to a specified value with a given name.\n *\n * Notes:\n *   - The operation performed is the same as what the `jerry_set_property` method.\n *   - The property name must be a zero terminated UTF-8 string.\n *   - There should be no '\\0' (NULL) character in the name excluding the string terminator.\n *   - Returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return true value - if the operation was successful\n *         thrown error - otherwise\n */\njerry_value_t\njerryx_set_property_str (const jerry_value_t target_object, /**< target object */\n                         const char *name, /**< property name */\n                         const jerry_value_t value) /**< value to set */\n{\n  jerry_value_t property_name_val = jerry_create_string_from_utf8 ((const jerry_char_t *) name);\n  jerry_value_t result_val = jerry_set_property (target_object, property_name_val, value);\n\n  jerry_release_value (property_name_val);\n\n  return result_val;\n} /* jerryx_set_property_str */\n\n/**\n * Get a property value of a specified object.\n *\n * Notes:\n *   - The operation performed is the same as what the `jerry_get_property` method.\n *   - The property name must be a zero terminated UTF-8 string.\n *   - There should be no '\\0' (NULL) character in the name excluding the string terminator.\n *   - Returned value must be freed with jerry_release_value, when it is no longer needed.\n *\n * @return jerry_value_t - the property value\n */\njerry_value_t\njerryx_get_property_str (const jerry_value_t target_object, /**< target object */\n                         const char *name) /**< property name */\n{\n  jerry_value_t prop_name = jerry_create_string_from_utf8 ((const jerry_char_t *) name);\n  jerry_value_t result_val = jerry_get_property (target_object, prop_name);\n  jerry_release_value (prop_name);\n\n  return result_val;\n} /* jerryx_get_property_str */\n\n/**\n * Check if a property exists on an object.\n *\n * Notes:\n *   - The operation performed is the same as what the `jerry_has_property` method.\n *   - The property name must be a zero terminated UTF-8 string.\n *   - There should be no '\\0' (NULL) character in the name excluding the string terminator.\n *\n * @return true - if the property exists on the given object.\n *         false - if there is no such property or there was an error accessing the property.\n */\nbool\njerryx_has_property_str (const jerry_value_t target_object, /**< target object */\n                         const char *name) /**< property name */\n{\n  bool has_property = false;\n\n  jerry_value_t prop_name = jerry_create_string_from_utf8 ((const jerry_char_t *) name);\n  jerry_value_t has_prop_val = jerry_has_property (target_object, prop_name);\n\n  if (!jerry_value_is_error (has_prop_val))\n  {\n    has_property = jerry_get_boolean_value (has_prop_val);\n  }\n\n  jerry_release_value (has_prop_val);\n  jerry_release_value (prop_name);\n\n  return has_property;\n} /* jerryx_has_property_str */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/handler/handler-resource-name.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-ext/handler.h\"\n\n/**\n * Get the resource name (usually a file name) of the currently executed script or the given function object\n *\n * Note: returned value must be freed with jerry_release_value, when it is no longer needed\n *\n * @return JS string constructed from\n *         - the currently executed function object's resource name, if the given value is undefined\n *         - resource name of the function object, if the given value is a function object\n *         - \"<anonymous>\", otherwise\n */\njerry_value_t\njerryx_handler_resource_name (const jerry_value_t func_obj_val, /**< function object */\n                              const jerry_value_t this_p, /**< this arg */\n                              const jerry_value_t args_p[], /**< function arguments */\n                              const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  (void) func_obj_val; /* unused */\n  (void) this_p; /* unused */\n\n  jerry_value_t undefined_value = jerry_create_undefined ();\n  jerry_value_t resource_name = jerry_get_resource_name (args_cnt > 0 ? args_p[0] : undefined_value);\n  jerry_release_value (undefined_value);\n\n  return resource_name;\n} /* jerryx_handler_resource_name */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/include/jerryscript-ext/arg.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_ARG_H\n#define JERRYX_ARG_H\n\n#include <stdbool.h>\n#include <stddef.h>\n#include <stdint.h>\n#include \"jerryscript.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/**\n * The forward declaration of jerryx_arg_t.\n */\ntypedef struct jerryx_arg_t jerryx_arg_t;\n\n/**\n * The forward declaration of jerryx_arg_js_iterator_t\n */\ntypedef struct jerryx_arg_js_iterator_t jerryx_arg_js_iterator_t;\n\n/**\n * Signature of the transform function.\n */\ntypedef jerry_value_t (*jerryx_arg_transform_func_t) (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                                                      const jerryx_arg_t *c_arg_p); /**< native arg */\n\n/**\n * The structure used in jerryx_arg_object_properties\n */\ntypedef struct\n{\n  const jerry_char_t **name_p; /**< property name list of the JS object */\n  jerry_length_t name_cnt; /**< count of the name list */\n  const jerryx_arg_t *c_arg_p; /**< points to the array of transformation steps */\n  jerry_length_t c_arg_cnt; /**< the count of the `c_arg_p` array */\n} jerryx_arg_object_props_t;\n\n/**\n * The structure used in jerryx_arg_array\n */\ntypedef struct\n{\n  const jerryx_arg_t *c_arg_p; /**< points to the array of transformation steps */\n  jerry_length_t c_arg_cnt; /**< the count of the `c_arg_p` array */\n} jerryx_arg_array_items_t;\n\n/**\n * The structure defining a single validation & transformation step.\n */\nstruct jerryx_arg_t\n{\n  jerryx_arg_transform_func_t func; /**< the transform function */\n  void *dest; /**< pointer to destination where func should store the result */\n  uintptr_t extra_info; /**< extra information, specific to func */\n};\n\njerry_value_t jerryx_arg_transform_this_and_args (const jerry_value_t this_val,\n                                                  const jerry_value_t *js_arg_p,\n                                                  const jerry_length_t js_arg_cnt,\n                                                  const jerryx_arg_t *c_arg_p,\n                                                  jerry_length_t c_arg_cnt);\n\njerry_value_t jerryx_arg_transform_args (const jerry_value_t *js_arg_p,\n                                         const jerry_length_t js_arg_cnt,\n                                         const jerryx_arg_t *c_arg_p,\n                                         jerry_length_t c_arg_cnt);\n\njerry_value_t jerryx_arg_transform_object_properties (const jerry_value_t obj_val,\n                                                      const jerry_char_t **name_p,\n                                                      const jerry_length_t name_cnt,\n                                                      const jerryx_arg_t *c_arg_p,\n                                                      jerry_length_t c_arg_cnt);\njerry_value_t jerryx_arg_transform_array (const jerry_value_t array_val,\n                                          const jerryx_arg_t *c_arg_p,\n                                          jerry_length_t c_arg_cnt);\n\n/**\n * Indicates whether an argument is allowed to be coerced into the expected JS type.\n */\ntypedef enum\n{\n  JERRYX_ARG_COERCE, /**< the transform inside will invoke toNumber, toBoolean or toString */\n  JERRYX_ARG_NO_COERCE /**< the type coercion is not allowed. */\n} jerryx_arg_coerce_t;\n\n/**\n * Indicates whether an argument is optional or required.\n */\ntypedef enum\n{\n  /**\n   * The argument is optional. If the argument is `undefined` the transform is\n   * successful and `c_arg_p->dest` remains untouched.\n   */\n  JERRYX_ARG_OPTIONAL,\n  /**\n   * The argument is required. If the argument is `undefined` the transform\n   * will fail and `c_arg_p->dest` remains untouched.\n   */\n  JERRYX_ARG_REQUIRED\n} jerryx_arg_optional_t;\n\n/**\n * Indicates the rounding policy which will be chosen to transform an integer.\n */\ntypedef enum\n{\n  JERRYX_ARG_ROUND, /**< round */\n  JERRYX_ARG_FLOOR, /**< floor */\n  JERRYX_ARG_CEIL /**< ceil */\n} jerryx_arg_round_t;\n\n/**\n * Indicates the clamping policy which will be chosen to transform an integer.\n * If the policy is NO_CLAMP, and the number is out of range,\n * then the transformer will throw a range error.\n */\ntypedef enum\n{\n  JERRYX_ARG_CLAMP,/**< clamp the number when it is out of range */\n  JERRYX_ARG_NO_CLAMP /**< throw a range error */\n} jerryx_arg_clamp_t;\n\n/* Inline functions for initializing jerryx_arg_t */\n\n#define JERRYX_ARG_INTEGER(type) \\\n  static inline jerryx_arg_t \\\n  jerryx_arg_ ## type (type ## _t *dest, \\\n                       jerryx_arg_round_t round_flag, \\\n                       jerryx_arg_clamp_t clamp_flag, \\\n                       jerryx_arg_coerce_t coerce_flag, \\\n                       jerryx_arg_optional_t opt_flag);\n\nJERRYX_ARG_INTEGER (uint8)\nJERRYX_ARG_INTEGER (int8)\nJERRYX_ARG_INTEGER (uint16)\nJERRYX_ARG_INTEGER (int16)\nJERRYX_ARG_INTEGER (uint32)\nJERRYX_ARG_INTEGER (int32)\n\n#undef JERRYX_ARG_INTEGER\n\nstatic inline jerryx_arg_t\njerryx_arg_number (double *dest, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);\nstatic inline jerryx_arg_t\njerryx_arg_boolean (bool *dest, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);\nstatic inline jerryx_arg_t\njerryx_arg_string (char *dest, uint32_t size, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);\nstatic inline jerryx_arg_t\njerryx_arg_utf8_string (char *dest, uint32_t size, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);\nstatic inline jerryx_arg_t\njerryx_arg_function (jerry_value_t *dest, jerryx_arg_optional_t opt_flag);\nstatic inline jerryx_arg_t\njerryx_arg_native_pointer (void **dest, const jerry_object_native_info_t *info_p, jerryx_arg_optional_t opt_flag);\nstatic inline jerryx_arg_t\njerryx_arg_ignore (void);\nstatic inline jerryx_arg_t\njerryx_arg_custom (void *dest, uintptr_t extra_info, jerryx_arg_transform_func_t func);\nstatic inline jerryx_arg_t\njerryx_arg_object_properties (const jerryx_arg_object_props_t *object_props_p, jerryx_arg_optional_t opt_flag);\nstatic inline jerryx_arg_t\njerryx_arg_array (const jerryx_arg_array_items_t *array_items_p, jerryx_arg_optional_t opt_flag);\n\njerry_value_t\njerryx_arg_transform_optional (jerryx_arg_js_iterator_t *js_arg_iter_p,\n                               const jerryx_arg_t *c_arg_p,\n                               jerryx_arg_transform_func_t func);\n\n/* Helper functions for transform functions. */\njerry_value_t jerryx_arg_js_iterator_pop (jerryx_arg_js_iterator_t *js_arg_iter_p);\njerry_value_t jerryx_arg_js_iterator_restore (jerryx_arg_js_iterator_t *js_arg_iter_p);\njerry_value_t jerryx_arg_js_iterator_peek (jerryx_arg_js_iterator_t *js_arg_iter_p);\njerry_length_t jerryx_arg_js_iterator_index (jerryx_arg_js_iterator_t *js_arg_iter_p);\n\n#include \"arg.impl.h\"\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYX_ARG_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/include/jerryscript-ext/arg.impl.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_ARG_IMPL_H\n#define JERRYX_ARG_IMPL_H\n\n/* transform functions for each type. */\n\n#define JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL(type) \\\n  jerry_value_t jerryx_arg_transform_ ## type (jerryx_arg_js_iterator_t *js_arg_iter_p, \\\n                                               const jerryx_arg_t *c_arg_p); \\\n  jerry_value_t jerryx_arg_transform_ ## type ## _optional (jerryx_arg_js_iterator_t *js_arg_iter_p, \\\n                                                            const jerryx_arg_t *c_arg_p);\n\n#define JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT(type) \\\n  JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (type) \\\n  JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (type ## _strict)\n\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (uint8)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (int8)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (uint16)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (int16)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (uint32)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (int32)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (number)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (string)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (utf8_string)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (boolean)\n\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (function)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (native_pointer)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (object_props)\nJERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (array_items)\n\njerry_value_t jerryx_arg_transform_ignore (jerryx_arg_js_iterator_t *js_arg_iter_p,\n                                           const jerryx_arg_t *c_arg_p);\n\n#undef JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL\n#undef JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT\n\n/**\n * The structure indicates the options used to transform integer argument.\n * It will be passed into jerryx_arg_t's  extra_info field.\n */\ntypedef struct\n{\n  uint8_t round; /**< rounding policy */\n  uint8_t clamp; /**< clamping policy */\n} jerryx_arg_int_option_t;\n\n/**\n * The macro used to generate jerryx_arg_xxx for int type.\n */\n#define JERRYX_ARG_INT(type) \\\n  static inline jerryx_arg_t \\\n  jerryx_arg_ ## type (type ## _t *dest, \\\n                       jerryx_arg_round_t round_flag, \\\n                       jerryx_arg_clamp_t clamp_flag, \\\n                       jerryx_arg_coerce_t coerce_flag, \\\n                       jerryx_arg_optional_t opt_flag) \\\n  { \\\n    jerryx_arg_transform_func_t func; \\\n    if (coerce_flag == JERRYX_ARG_NO_COERCE) \\\n    { \\\n      if (opt_flag == JERRYX_ARG_OPTIONAL) \\\n      { \\\n        func = jerryx_arg_transform_ ## type ## _strict_optional; \\\n      } \\\n      else \\\n      { \\\n        func = jerryx_arg_transform_ ## type ## _strict; \\\n      } \\\n    } \\\n    else \\\n    { \\\n      if (opt_flag == JERRYX_ARG_OPTIONAL) \\\n      { \\\n        func = jerryx_arg_transform_ ## type ## _optional; \\\n      } \\\n      else \\\n      { \\\n        func = jerryx_arg_transform_ ## type; \\\n      } \\\n    } \\\n    union \\\n    { \\\n      jerryx_arg_int_option_t int_option; \\\n      uintptr_t extra_info; \\\n    } u = { .int_option = { .round = (uint8_t) round_flag, .clamp = (uint8_t) clamp_flag } }; \\\n    return (jerryx_arg_t) \\\n    { \\\n      .func = func, \\\n      .dest = (void *) dest, \\\n      .extra_info = u.extra_info \\\n    }; \\\n  }\n\nJERRYX_ARG_INT (uint8)\nJERRYX_ARG_INT (int8)\nJERRYX_ARG_INT (uint16)\nJERRYX_ARG_INT (int16)\nJERRYX_ARG_INT (uint32)\nJERRYX_ARG_INT (int32)\n\n#undef JERRYX_ARG_INT\n\n/**\n * Create a validation/transformation step (`jerryx_arg_t`) that expects to\n * consume one `number` JS argument and stores it into a C `double`.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_number (double *dest, /**< pointer to the double where the result should be stored */\n                   jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */\n                   jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */\n{\n  jerryx_arg_transform_func_t func;\n\n  if (coerce_flag == JERRYX_ARG_NO_COERCE)\n  {\n    if (opt_flag == JERRYX_ARG_OPTIONAL)\n    {\n      func = jerryx_arg_transform_number_strict_optional;\n    }\n    else\n    {\n      func = jerryx_arg_transform_number_strict;\n    }\n  }\n  else\n  {\n    if (opt_flag == JERRYX_ARG_OPTIONAL)\n    {\n      func = jerryx_arg_transform_number_optional;\n    }\n    else\n    {\n      func = jerryx_arg_transform_number;\n    }\n  }\n\n  return (jerryx_arg_t)\n  {\n    .func = func,\n    .dest = (void *) dest\n  };\n} /* jerryx_arg_number */\n\n/**\n * Create a validation/transformation step (`jerryx_arg_t`) that expects to\n * consume one `boolean` JS argument and stores it into a C `bool`.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_boolean (bool *dest, /**< points to the native bool */\n                    jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */\n                    jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */\n{\n  jerryx_arg_transform_func_t func;\n\n  if (coerce_flag == JERRYX_ARG_NO_COERCE)\n  {\n    if (opt_flag == JERRYX_ARG_OPTIONAL)\n    {\n      func = jerryx_arg_transform_boolean_strict_optional;\n    }\n    else\n    {\n      func = jerryx_arg_transform_boolean_strict;\n    }\n  }\n  else\n  {\n    if (opt_flag == JERRYX_ARG_OPTIONAL)\n    {\n      func = jerryx_arg_transform_boolean_optional;\n    }\n    else\n    {\n      func = jerryx_arg_transform_boolean;\n    }\n  }\n\n  return (jerryx_arg_t)\n  {\n    .func = func,\n    .dest = (void *) dest\n  };\n} /* jerryx_arg_boolean */\n\n/**\n * Create a validation/transformation step (`jerryx_arg_t`) that expects to\n * consume one `string` JS argument and stores it into a C `char` array.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_string (char *dest, /**< pointer to the native char array where the result should be stored */\n                   uint32_t size, /**< the size of native char array */\n                   jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */\n                   jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */\n{\n  jerryx_arg_transform_func_t func;\n\n  if (coerce_flag == JERRYX_ARG_NO_COERCE)\n  {\n    if (opt_flag == JERRYX_ARG_OPTIONAL)\n    {\n      func = jerryx_arg_transform_string_strict_optional;\n    }\n    else\n    {\n      func = jerryx_arg_transform_string_strict;\n    }\n  }\n  else\n  {\n    if (opt_flag == JERRYX_ARG_OPTIONAL)\n    {\n      func = jerryx_arg_transform_string_optional;\n    }\n    else\n    {\n      func = jerryx_arg_transform_string;\n    }\n  }\n\n  return (jerryx_arg_t)\n  {\n    .func = func,\n    .dest = (void *) dest,\n    .extra_info = (uintptr_t) size\n  };\n} /* jerryx_arg_string */\n\n/**\n * Create a validation/transformation step (`jerryx_arg_t`) that expects to\n * consume one `string` JS argument and stores it into a C utf8 `char` array.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_utf8_string (char *dest, /**< [out] pointer to the native char array where the result should be stored */\n                        uint32_t size, /**< the size of native char array */\n                        jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */\n                        jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */\n{\n  jerryx_arg_transform_func_t func;\n\n  if (coerce_flag == JERRYX_ARG_NO_COERCE)\n  {\n    if (opt_flag == JERRYX_ARG_OPTIONAL)\n    {\n      func = jerryx_arg_transform_utf8_string_strict_optional;\n    }\n    else\n    {\n      func = jerryx_arg_transform_utf8_string_strict;\n    }\n  }\n  else\n  {\n    if (opt_flag == JERRYX_ARG_OPTIONAL)\n    {\n      func = jerryx_arg_transform_utf8_string_optional;\n    }\n    else\n    {\n      func = jerryx_arg_transform_utf8_string;\n    }\n  }\n\n  return (jerryx_arg_t)\n  {\n    .func = func,\n    .dest = (void *) dest,\n    .extra_info = (uintptr_t) size\n  };\n} /* jerryx_arg_utf8_string */\n\n/**\n * Create a validation/transformation step (`jerryx_arg_t`) that expects to\n * consume one `function` JS argument and stores it into a C `jerry_value_t`.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_function (jerry_value_t *dest, /**< pointer to the jerry_value_t where the result should be stored */\n                     jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */\n{\n  jerryx_arg_transform_func_t func;\n\n  if (opt_flag == JERRYX_ARG_OPTIONAL)\n  {\n    func = jerryx_arg_transform_function_optional;\n  }\n  else\n  {\n    func = jerryx_arg_transform_function;\n  }\n\n  return (jerryx_arg_t)\n  {\n    .func = func,\n    .dest = (void *) dest\n  };\n} /* jerryx_arg_function */\n\n/**\n * Create a validation/transformation step (`jerryx_arg_t`) that expects to\n * consume one `object` JS argument that is 'backed' with a native pointer with\n * a given type info. In case the native pointer info matches, the transform\n * will succeed and the object's native pointer will be assigned to *dest.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_native_pointer (void **dest, /**< pointer to where the resulting native pointer should be stored */\n                           const jerry_object_native_info_t *info_p, /**< expected the type info */\n                           jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */\n{\n  jerryx_arg_transform_func_t func;\n\n  if (opt_flag == JERRYX_ARG_OPTIONAL)\n  {\n    func = jerryx_arg_transform_native_pointer_optional;\n  }\n  else\n  {\n    func = jerryx_arg_transform_native_pointer;\n  }\n\n  return (jerryx_arg_t)\n  {\n    .func = func,\n    .dest = (void *) dest,\n    .extra_info = (uintptr_t) info_p\n  };\n} /* jerryx_arg_native_pointer */\n\n/**\n * Create a jerryx_arg_t instance for ignored argument.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_ignore (void)\n{\n  return (jerryx_arg_t)\n  {\n    .func = jerryx_arg_transform_ignore\n  };\n} /* jerryx_arg_ignore */\n\n/**\n * Create a jerryx_arg_t instance with custom transform.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_custom (void *dest, /**< pointer to the native argument where the result should be stored */\n                   uintptr_t extra_info, /**< the extra parameter, specific to the transform function */\n                   jerryx_arg_transform_func_t func) /**< the custom transform function */\n{\n  return (jerryx_arg_t)\n  {\n    .func = func,\n    .dest = dest,\n    .extra_info = extra_info\n  };\n} /* jerryx_arg_custom */\n\n/**\n * Create a jerryx_arg_t instance for object properties.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_object_properties (const jerryx_arg_object_props_t *object_props, /**< pointer to object property mapping */\n                              jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */\n{\n  jerryx_arg_transform_func_t func;\n\n  if (opt_flag == JERRYX_ARG_OPTIONAL)\n  {\n    func = jerryx_arg_transform_object_props_optional;\n  }\n  else\n  {\n    func = jerryx_arg_transform_object_props;\n  }\n\n  return (jerryx_arg_t)\n  {\n    .func = func,\n    .dest = NULL,\n    .extra_info = (uintptr_t) object_props\n  };\n} /* jerryx_arg_object_properties */\n\n/**\n * Create a jerryx_arg_t instance for array.\n *\n * @return a jerryx_arg_t instance.\n */\nstatic inline jerryx_arg_t\njerryx_arg_array (const jerryx_arg_array_items_t *array_items_p, /**< pointer to array items mapping */\n                  jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */\n{\n  jerryx_arg_transform_func_t func;\n\n  if (opt_flag == JERRYX_ARG_OPTIONAL)\n  {\n    func = jerryx_arg_transform_array_items_optional;\n  }\n  else\n  {\n    func = jerryx_arg_transform_array_items;\n  }\n\n  return (jerryx_arg_t)\n  {\n    .func = func,\n    .dest = NULL,\n    .extra_info = (uintptr_t) array_items_p\n  };\n} /* jerryx_arg_array */\n\n#endif /* !JERRYX_ARG_IMPL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/include/jerryscript-ext/autorelease.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_AUTORELEASE_H\n#define JERRYX_AUTORELEASE_H\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n#include \"autorelease.impl.h\"\n\n/*\n * Macro for `const jerry_value_t` for which jerry_release_value () is\n * automatically called when the variable goes out of scope.\n *\n * Example usage:\n * static void foo (bool enable)\n * {\n *   JERRYX_AR_VALUE_T bar = jerry_create_string (...);\n *\n *   if (enable) {\n *     JERRYX_AR_VALUE_T baz = jerry_get_global_object ();\n *\n *     // ...\n *\n *     // jerry_release_value (baz) and jerry_release_value (bar) is called automatically before\n *     // returning, because `baz` and `bar` go out of scope.\n *     return;\n *   }\n *\n *   // jerry_release_value (bar) is called automatically when the function returns,\n *   // because `bar` goes out of scope.\n * }\n */\n#define JERRYX_AR_VALUE_T __JERRYX_AR_VALUE_T_IMPL\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYX_AUTORELEASE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/include/jerryscript-ext/autorelease.impl.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_AUTORELEASE_IMPL_H\n#define JERRYX_AUTORELEASE_IMPL_H\n\n#include \"jerryscript.h\"\n\n#ifdef __GNUC__\n/*\n * Calls jerry_release_value (*value).\n * The GCC __cleanup__ function must take a pointer to the variable to clean up.\n *\n * @return void\n */\nstatic inline void\njerryx_autorelease_cleanup (const jerry_value_t *value) /**< jerry value */\n{\n  jerry_release_value (*value);\n} /* jerryx_autorelease_cleanup */\n\n#define __JERRYX_AR_VALUE_T_IMPL const jerry_value_t __attribute__ ((__cleanup__(jerryx_autorelease_cleanup)))\n#else /* !__GNUC__ */\n/* TODO: for other compilers */\n#error \"No autorelease implementation for your compiler!\"\n#endif /* __GNUC__ */\n\n#endif /* !JERRYX_AUTORELEASE_IMPL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/include/jerryscript-ext/debugger.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_DEBUGGER_H\n#define JERRYX_DEBUGGER_H\n\n#include \"jerryscript.h\"\n#include \"jerryscript-debugger-transport.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\nvoid jerryx_debugger_after_connect (bool success);\n\n/*\n * Message transmission interfaces.\n */\nbool jerryx_debugger_tcp_create (uint16_t port);\nbool jerryx_debugger_serial_create (const char *config);\n\n/*\n * Message encoding interfaces.\n */\nbool jerryx_debugger_ws_create (void);\nbool jerryx_debugger_rp_create (void);\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYX_HANDLER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/include/jerryscript-ext/handle-scope.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_HANDLE_SCOPE_H\n#define JERRYX_HANDLE_SCOPE_H\n\n#include \"jerryscript.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n#ifndef JERRYX_HANDLE_PRELIST_SIZE\n#define JERRYX_HANDLE_PRELIST_SIZE 20\n#endif\n\n#ifndef JERRYX_SCOPE_PRELIST_SIZE\n#define JERRYX_SCOPE_PRELIST_SIZE 20\n#endif\n\ntypedef struct jerryx_handle_t jerryx_handle_t;\n/**\n * Dynamically allocated handle in the scopes.\n * Scopes has it's own size-limited linear storage of handles. Still there\n * might be not enough space left for new handles, dynamically allocated\n * `jerryx_handle_t` could ease the pre-allocated linear memory burden.\n */\nstruct jerryx_handle_t\n{\n  jerry_value_t jval; /**< jerry value of the handle bound to */\n  jerryx_handle_t *sibling; /**< next sibling the the handle */\n};\n\n#define JERRYX_HANDLE_SCOPE_FIELDS                          \\\n  jerry_value_t handle_prelist[JERRYX_HANDLE_PRELIST_SIZE]; \\\n  uint8_t prelist_handle_count;                             \\\n  bool escaped;                                             \\\n  jerryx_handle_t *handle_ptr\n\ntypedef struct jerryx_handle_scope_s jerryx_handle_scope_t;\ntypedef jerryx_handle_scope_t *jerryx_handle_scope;\ntypedef jerryx_handle_scope_t *jerryx_escapable_handle_scope;\n/**\n * Inlined simple handle scope type.\n */\nstruct jerryx_handle_scope_s\n{\n  JERRYX_HANDLE_SCOPE_FIELDS; /**< common handle scope fields */\n};\n\ntypedef struct jerryx_handle_scope_dynamic_s jerryx_handle_scope_dynamic_t;\n/**\n * Dynamically allocated handle scope type.\n */\nstruct jerryx_handle_scope_dynamic_s\n{\n  JERRYX_HANDLE_SCOPE_FIELDS; /**< common handle scope fields */\n  jerryx_handle_scope_dynamic_t *child; /**< child dynamically allocated handle scope */\n  jerryx_handle_scope_dynamic_t *parent; /**< parent dynamically allocated handle scope */\n};\n\n#undef JERRYX_HANDLE_SCOPE_FIELDS\n\ntypedef enum\n{\n  jerryx_handle_scope_ok = 0,\n\n  jerryx_escape_called_twice,\n  jerryx_handle_scope_mismatch,\n} jerryx_handle_scope_status;\n\njerryx_handle_scope_status\njerryx_open_handle_scope (jerryx_handle_scope *result);\n\njerryx_handle_scope_status\njerryx_close_handle_scope (jerryx_handle_scope scope);\n\njerryx_handle_scope_status\njerryx_open_escapable_handle_scope (jerryx_handle_scope *result);\n\njerryx_handle_scope_status\njerryx_close_escapable_handle_scope (jerryx_handle_scope scope);\n\njerryx_handle_scope_status\njerryx_escape_handle (jerryx_escapable_handle_scope scope,\n                      jerry_value_t escapee,\n                      jerry_value_t *result);\n\n/**\n * Completely escape a handle from handle scope,\n * leave life time management totally up to user.\n */\njerryx_handle_scope_status\njerryx_remove_handle (jerryx_escapable_handle_scope scope,\n                      jerry_value_t escapee,\n                      jerry_value_t *result);\n\njerry_value_t\njerryx_create_handle (jerry_value_t jval);\n\njerry_value_t\njerryx_create_handle_in_scope (jerry_value_t jval, jerryx_handle_scope scope);\n\n/** MARK: - handle-scope-allocator.c */\njerryx_handle_scope_t *\njerryx_handle_scope_get_current (void);\n\njerryx_handle_scope_t *\njerryx_handle_scope_get_root (void);\n/** MARK: - END handle-scope-allocator.c */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYX_HANDLE_SCOPE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/include/jerryscript-ext/handler.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_HANDLER_H\n#define JERRYX_HANDLER_H\n\n#include \"jerryscript.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/*\n * Handler registration helper\n */\n\njerry_value_t jerryx_handler_register_global (const jerry_char_t *name_p,\n                                              jerry_external_handler_t handler_p);\n\n/*\n * Common external function handlers\n */\n\njerry_value_t jerryx_handler_assert_fatal (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                                           const jerry_value_t args_p[], const jerry_length_t args_cnt);\njerry_value_t jerryx_handler_assert_throw (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                                           const jerry_value_t args_p[], const jerry_length_t args_cnt);\njerry_value_t jerryx_handler_assert (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                                     const jerry_value_t args_p[], const jerry_length_t args_cnt);\njerry_value_t jerryx_handler_gc (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                                 const jerry_value_t args_p[], const jerry_length_t args_cnt);\njerry_value_t jerryx_handler_print (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                                    const jerry_value_t args_p[], const jerry_length_t args_cnt);\njerry_value_t jerryx_handler_resource_name (const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                                            const jerry_value_t args_p[], const jerry_length_t args_cnt);\n\n/**\n * Struct used by the `jerryx_set_functions` method to\n * register multiple methods for a given object.\n */\ntypedef struct\n{\n  const char *name; /**< name of the property to add */\n  jerry_value_t value; /**< value of the property */\n} jerryx_property_entry;\n\n#define JERRYX_PROPERTY_NUMBER(NAME, NUMBER) (jerryx_property_entry) { NAME, jerry_create_number (NUMBER) }\n#define JERRYX_PROPERTY_STRING(NAME, STR) \\\n  (jerryx_property_entry) { NAME, jerry_create_string_from_utf8 ((const jerry_char_t *) STR) }\n#define JERRYX_PROPERTY_STRING_SZ(NAME, STR, SIZE) \\\n  (jerryx_property_entry) { NAME, jerry_create_string_sz_from_utf8 ((const jerry_char_t *) STR, SIZE) }\n#define JERRYX_PROPERTY_BOOLEAN(NAME, VALUE) (jerryx_property_entry) { NAME, jerry_create_boolean (VALUE) }\n#define JERRYX_PROPERTY_FUNCTION(NAME, FUNC) (jerryx_property_entry) { NAME, jerry_create_external_function (FUNC) }\n#define JERRYX_PROPERTY_UNDEFINED(NAME) (jerryx_property_entry) { NAME, jerry_create_undefined() }\n#define JERRYX_PROPERTY_LIST_END() (jerryx_property_entry) { NULL, 0 }\n\n/**\n * Stores the result of property register operation.\n */\ntypedef struct\n{\n  jerry_value_t result; /**< result of property registraion (undefined or error object) */\n  uint32_t registered; /**< number of successfully registered methods */\n} jerryx_register_result;\n\njerryx_register_result\njerryx_set_properties (const jerry_value_t target_object,\n                       const jerryx_property_entry entries[]);\n\nvoid\njerryx_release_property_entry (const jerryx_property_entry entries[],\n                               const jerryx_register_result register_result);\n\njerry_value_t\njerryx_set_property_str (const jerry_value_t target_object,\n                         const char *name,\n                         const jerry_value_t value);\n\njerry_value_t\njerryx_get_property_str (const jerry_value_t target_object,\n                         const char *name);\n\nbool\njerryx_has_property_str (const jerry_value_t target_object,\n                         const char *name);\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYX_HANDLER_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/include/jerryscript-ext/module.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYX_MODULE_H\n#define JERRYX_MODULE_H\n\n#include \"jerryscript.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/**\n * Declare the signature for the module initialization function.\n */\ntypedef jerry_value_t (*jerryx_native_module_on_resolve_t) (void);\n\n/**\n * Declare the structure used to define a module. One should only make use of this structure via the\n * JERRYX_NATIVE_MODULE macro declared below.\n */\ntypedef struct jerryx_native_module_t\n{\n  const jerry_char_t *name_p; /**< name of the module */\n  const jerryx_native_module_on_resolve_t on_resolve_p; /**< function that returns a new instance of the module */\n  struct jerryx_native_module_t *next_p; /**< pointer to next module in the list */\n} jerryx_native_module_t;\n\n/**\n * Declare the constructor and destructor attributes. These evaluate to nothing if this extension is built without\n * library constructor/destructor support.\n */\n#ifdef ENABLE_INIT_FINI\n#ifdef _MSC_VER\n#error \"`FEATURE_INIT_FINI` build flag isn't supported on Windows, because Microsoft Visual C/C++ Compiler \\\ndoesn't support library constructors and destructors.\"\n#endif\n#define JERRYX_MODULE_CONSTRUCTOR_ATTRIBUTE __attribute__((constructor))\n#define JERRYX_MODULE_DESTRUCTOR_ATTRIBUTE __attribute__((destructor))\n#define JERRYX_MODULE_REGISTRATION_QUALIFIER static\n#else /* !ENABLE_INIT_FINI */\n#define JERRYX_MODULE_CONSTRUCTOR_ATTRIBUTE\n#define JERRYX_MODULE_DESTRUCTOR_ATTRIBUTE\n#define JERRYX_MODULE_REGISTRATION_QUALIFIER\n#endif /* ENABLE_INIT_FINI */\n\n/**\n * Having two levels of macros allows strings to be used unquoted.\n */\n#define JERRYX_NATIVE_MODULE(module_name, on_resolve_cb)  \\\n  JERRYX_NATIVE_MODULE_IMPLEM(module_name, on_resolve_cb)\n\n#define JERRYX_NATIVE_MODULE_IMPLEM(module_name, on_resolve_cb)        \\\n  static jerryx_native_module_t _ ## module_name ## _definition =      \\\n  {                                                                    \\\n    .name_p = (jerry_char_t *) #module_name,                           \\\n    .on_resolve_p = (on_resolve_cb),                                   \\\n    .next_p = NULL                                                     \\\n  };                                                                   \\\n                                                                       \\\n  JERRYX_MODULE_REGISTRATION_QUALIFIER void                            \\\n  module_name ## _register (void) JERRYX_MODULE_CONSTRUCTOR_ATTRIBUTE; \\\n  JERRYX_MODULE_REGISTRATION_QUALIFIER void                            \\\n  module_name ## _register (void)                                      \\\n  {                                                                    \\\n    jerryx_native_module_register(&_##module_name##_definition);       \\\n  }                                                                    \\\n                                                                       \\\n  JERRYX_MODULE_REGISTRATION_QUALIFIER void                            \\\n  module_name ## _unregister (void)                                    \\\n  JERRYX_MODULE_DESTRUCTOR_ATTRIBUTE;                                  \\\n  JERRYX_MODULE_REGISTRATION_QUALIFIER void                            \\\n  module_name ## _unregister (void)                                    \\\n  {                                                                    \\\n    jerryx_native_module_unregister(&_##module_name##_definition);     \\\n  }\n\n/**\n * Register a native module. This makes it available for loading via jerryx_module_resolve, when\n * jerryx_module_native_resolver is passed in as a possible resolver.\n */\nvoid jerryx_native_module_register (jerryx_native_module_t *module_p);\n\n/**\n * Unregister a native module. This removes the module from the list of available native modules, meaning that\n * subsequent calls to jerryx_module_resolve with jerryx_module_native_resolver will not be able to find it.\n */\nvoid jerryx_native_module_unregister (jerryx_native_module_t *module_p);\n\n/**\n * Declare the function pointer type for canonical name resolution.\n */\ntypedef jerry_value_t (*jerryx_module_get_canonical_name_t) (const jerry_value_t name); /**< The name for which to\n                                                                                         *   compute the canonical\n                                                                                         *   name */\n\n/**\n * Declare the function pointer type for module resolution.\n */\ntypedef bool (*jerryx_module_resolve_t) (const jerry_value_t canonical_name, /**< The module's canonical name */\n                                         jerry_value_t *result); /**< The resulting module, if the function returns\n                                                                  *   true */\n\n/**\n * Declare the structure for module resolvers.\n */\ntypedef struct\n{\n  jerryx_module_get_canonical_name_t get_canonical_name_p; /**< function pointer to establish the canonical name of a\n                                                            *   module */\n  jerryx_module_resolve_t resolve_p; /**< function pointer to resolve a module */\n} jerryx_module_resolver_t;\n\n/**\n * Declare the JerryScript module resolver so that it may be added to an array of jerryx_module_resolver_t items and\n * thus passed to jerryx_module_resolve.\n */\nextern jerryx_module_resolver_t jerryx_module_native_resolver;\n\n/**\n * Load a copy of a module into the current context using the provided module resolvers, or return one that was already\n * loaded if it is found.\n */\njerry_value_t jerryx_module_resolve (const jerry_value_t name,\n                                     const jerryx_module_resolver_t **resolvers,\n                                     size_t count);\n\n/**\n * Delete a module from the cache or, if name has the JavaScript value of undefined, clear the entire cache.\n */\nvoid jerryx_module_clear_cache (const jerry_value_t name,\n                                const jerryx_module_resolver_t **resolvers,\n                                size_t count);\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYX_MODULE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/libjerry-ext.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libjerry-ext\nDescription: JerryScript: lightweight JavaScript engine (extensions library)\nURL: https://github.com/jerryscript-project/jerryscript\nVersion: @JERRY_VERSION@\nRequires.private: libjerry-core\nLibs: -L${libdir} -ljerry-ext\nLibs.private: @JERRY_EXT_PKGCONFIG_LIBS@\nCflags: -I${includedir}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-ext/module/module.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <string.h>\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/module.h\"\n\nstatic const jerry_char_t *module_name_property_name = (jerry_char_t *) \"moduleName\";\nstatic const jerry_char_t *module_not_found = (jerry_char_t *) \"Module not found\";\nstatic const jerry_char_t *module_name_not_string = (jerry_char_t *) \"Module name is not a string\";\n\n/**\n * Create an error related to modules\n *\n * Creates an error object of the requested type with the additional property \"moduleName\" the value of which is a\n * string containing the name of the module that was requested when the error occurred.\n *\n * @return the error\n */\nstatic jerry_value_t\njerryx_module_create_error (jerry_error_t error_type, /**< the type of error to create */\n                            const jerry_char_t *message, /**< the error message */\n                            const jerry_value_t module_name) /**< the module name */\n{\n  jerry_value_t ret = jerry_create_error (error_type, message);\n\n  jerry_value_t error_object = jerry_get_value_from_error (ret, false);\n  jerry_value_t property_name = jerry_create_string (module_name_property_name);\n\n  jerry_release_value (jerry_set_property (error_object, property_name, module_name));\n\n  jerry_release_value (property_name);\n  jerry_release_value (error_object);\n  return ret;\n} /* jerryx_module_create_error */\n\n/**\n * Initialize the module manager extension.\n */\nstatic void\njerryx_module_manager_init (void *user_data_p)\n{\n  *((jerry_value_t *) user_data_p) = jerry_create_object ();\n} /* jerryx_module_manager_init */\n\n/**\n * Deinitialize the module manager extension.\n */\nstatic void\njerryx_module_manager_deinit (void *user_data_p) /**< context pointer to deinitialize */\n{\n  jerry_release_value (*(jerry_value_t *) user_data_p);\n} /* jerryx_module_manager_deinit */\n\n/**\n * Declare the context data manager for modules.\n */\nstatic const jerry_context_data_manager_t jerryx_module_manager =\n{\n  .init_cb = jerryx_module_manager_init,\n  .deinit_cb = jerryx_module_manager_deinit,\n  .bytes_needed = sizeof (jerry_value_t)\n};\n\n/**\n * Global static entry point to the linked list of available modules.\n */\nstatic jerryx_native_module_t *first_module_p = NULL;\n\nvoid jerryx_native_module_register (jerryx_native_module_t *module_p)\n{\n  module_p->next_p = first_module_p;\n  first_module_p = module_p;\n} /* jerryx_native_module_register */\n\nvoid jerryx_native_module_unregister (jerryx_native_module_t *module_p)\n{\n  jerryx_native_module_t *parent_p = NULL, *iter_p = NULL;\n\n  for (iter_p = first_module_p; iter_p != NULL; parent_p = iter_p, iter_p = iter_p->next_p)\n  {\n    if (iter_p == module_p)\n    {\n      if (parent_p)\n      {\n        parent_p->next_p = module_p->next_p;\n      }\n      else\n      {\n        first_module_p = module_p->next_p;\n      }\n      module_p->next_p = NULL;\n    }\n  }\n} /* jerryx_native_module_unregister */\n\n/**\n * Attempt to retrieve a module by name from a cache, and return false if not found.\n */\nstatic bool\njerryx_module_check_cache (jerry_value_t cache, /**< cache from which to attempt to retrieve the module by name */\n                           jerry_value_t module_name, /**< JerryScript string value holding the module name */\n                           jerry_value_t *result) /**< Resulting value */\n{\n  bool ret = false;\n\n  /* Check if the cache has the module. */\n  jerry_value_t js_has_property = jerry_has_property (cache, module_name);\n\n  /* If we succeed in getting an answer, we examine the answer. */\n  if (!jerry_value_is_error (js_has_property))\n  {\n    bool has_property = jerry_get_boolean_value (js_has_property);\n\n    /* If the module is indeed in the cache, we return it. */\n    if (has_property)\n    {\n      if (result != NULL)\n      {\n        (*result) = jerry_get_property (cache, module_name);\n      }\n      ret = true;\n    }\n  }\n\n  jerry_release_value (js_has_property);\n\n  return ret;\n} /* jerryx_module_check_cache */\n\n/**\n * Attempt to cache a loaded module.\n *\n * @return the module on success, otherwise the error encountered when attempting to cache. In the latter case, the\n * @p module is released.\n */\nstatic jerry_value_t\njerryx_module_add_to_cache (jerry_value_t cache, /**< cache to which to add the module */\n                            jerry_value_t module_name, /**< key at which to cache the module */\n                            jerry_value_t module) /**< the module to cache */\n{\n  jerry_value_t ret = jerry_set_property (cache, module_name, module);\n\n  if (jerry_value_is_error (ret))\n  {\n    jerry_release_value (module);\n  }\n  else\n  {\n    jerry_release_value (ret);\n    ret = module;\n  }\n\n  return ret;\n} /* jerryx_module_add_to_cache */\n\nstatic const jerry_char_t *on_resolve_absent = (jerry_char_t *) \"Module on_resolve () must not be NULL\";\n\n/**\n * Declare and define the default module resolver - one which examines what modules are defined in the above linker\n * section and loads one that matches the requested name, caching the result for subsequent requests using the context\n * data mechanism.\n */\nstatic bool\njerryx_resolve_native_module (const jerry_value_t canonical_name, /**< canonical name of the module */\n                              jerry_value_t *result) /**< [out] where to put the resulting module instance */\n{\n  const jerryx_native_module_t *module_p = NULL;\n\n  jerry_size_t name_size = jerry_get_utf8_string_size (canonical_name);\n  JERRY_VLA (jerry_char_t, name_string, name_size);\n  jerry_string_to_utf8_char_buffer (canonical_name, name_string, name_size);\n\n  /* Look for the module by its name in the list of module definitions. */\n  for (module_p = first_module_p; module_p != NULL; module_p = module_p->next_p)\n  {\n    if (module_p->name_p != NULL\n        && strlen ((char *) module_p->name_p) == name_size\n        && !strncmp ((char *) module_p->name_p, (char *) name_string, name_size))\n    {\n      /* If we find the module by its name we load it and cache it if it has an on_resolve () and complain otherwise. */\n      (*result) = ((module_p->on_resolve_p) ? module_p->on_resolve_p ()\n                                            : jerryx_module_create_error (JERRY_ERROR_TYPE,\n                                                                          on_resolve_absent,\n                                                                          canonical_name));\n      return true;\n    }\n  }\n\n  return false;\n} /* jerryx_resolve_native_module */\n\njerryx_module_resolver_t jerryx_module_native_resolver =\n{\n  .get_canonical_name_p = NULL,\n  .resolve_p = jerryx_resolve_native_module\n};\n\nstatic void\njerryx_module_resolve_local (const jerry_value_t name, /**< name of the module to load */\n                             const jerryx_module_resolver_t **resolvers_p, /**< list of resolvers */\n                             size_t resolver_count, /**< number of resolvers in @p resolvers */\n                             jerry_value_t *result) /**< location to store the result, or NULL to remove the module */\n{\n  size_t index;\n  size_t canonical_names_used = 0;\n  jerry_value_t instances;\n  JERRY_VLA (jerry_value_t, canonical_names, resolver_count);\n  jerry_value_t (*get_canonical_name_p) (const jerry_value_t name);\n  bool (*resolve_p) (const jerry_value_t canonical_name,\n                     jerry_value_t *result);\n\n  if (!jerry_value_is_string (name))\n  {\n    if (result != NULL)\n    {\n      *result = jerryx_module_create_error (JERRY_ERROR_COMMON, module_name_not_string, name);\n    }\n    goto done;\n  }\n\n  instances = *(jerry_value_t *) jerry_get_context_data (&jerryx_module_manager);\n\n  /**\n   * Establish the canonical name for the requested module. Each resolver presents its own canonical name. If one of\n   * the canonical names matches a cached module, it is returned as the result.\n   */\n  for (index = 0; index < resolver_count; index++)\n  {\n    get_canonical_name_p = (resolvers_p[index] == NULL ? NULL : resolvers_p[index]->get_canonical_name_p);\n    canonical_names[index] = ((get_canonical_name_p == NULL) ? jerry_acquire_value (name)\n                                                             : get_canonical_name_p (name));\n    canonical_names_used++;\n    if (jerryx_module_check_cache (instances, canonical_names[index], result))\n    {\n      /* A NULL for result indicates that we are to delete the module from the cache if found. Let's do that here.*/\n      if (result == NULL)\n      {\n        jerry_delete_property (instances, canonical_names[index]);\n      }\n      goto done;\n    }\n  }\n\n  if (result == NULL)\n  {\n    goto done;\n  }\n\n  /**\n   * Past this point we assume a module is wanted, and therefore result is not NULL. So, we try each resolver until one\n   * manages to resolve the module.\n   */\n  for (index = 0; index < resolver_count; index++)\n  {\n    resolve_p = (resolvers_p[index] == NULL ? NULL : resolvers_p[index]->resolve_p);\n    if (resolve_p != NULL && resolve_p (canonical_names[index], result))\n    {\n      if (!jerry_value_is_error (*result))\n      {\n        *result = jerryx_module_add_to_cache (instances, canonical_names[index], *result);\n      }\n      goto done;\n    }\n  }\n\n  /* If none of the resolvers manage to find the module, complain with \"Module not found\" */\n  *result = jerryx_module_create_error (JERRY_ERROR_COMMON, module_not_found, name);\n\ndone:\n  /* Release the canonical names as returned by the various resolvers. */\n  for (index = 0; index < canonical_names_used; index++)\n  {\n    jerry_release_value (canonical_names[index]);\n  }\n} /* jerryx_module_resolve_local */\n\n/**\n * Resolve a single module using the module resolvers available in the section declared above and load it into the\n * current context.\n *\n * @p name - name of the module to resolve\n * @p resolvers - list of resolvers to invoke\n * @p count - number of resolvers in the list\n *\n * @return a jerry_value_t containing one of the followings:\n *   - the result of having loaded the module named @p name, or\n *   - the result of a previous successful load, or\n *   - an error indicating that something went wrong during the attempt to load the module.\n */\njerry_value_t\njerryx_module_resolve (const jerry_value_t name, /**< name of the module to load */\n                       const jerryx_module_resolver_t **resolvers_p, /**< list of resolvers */\n                       size_t resolver_count) /**< number of resolvers in @p resolvers */\n{\n  /* Set to zero to circumvent fatal warning. */\n  jerry_value_t ret = 0;\n  jerryx_module_resolve_local (name, resolvers_p, resolver_count, &ret);\n  return ret;\n} /* jerryx_module_resolve */\n\nvoid\njerryx_module_clear_cache (const jerry_value_t name, /**< name of the module to remove, or undefined */\n                           const jerryx_module_resolver_t **resolvers_p, /**< list of resolvers */\n                           size_t resolver_count) /**< number of resolvers in @p resolvers */\n{\n  void *instances_p = jerry_get_context_data (&jerryx_module_manager);\n\n  if (jerry_value_is_undefined (name))\n  {\n    /* We were requested to clear the entire cache, so we bounce the context data in the most agnostic way possible. */\n    jerryx_module_manager.deinit_cb (instances_p);\n    jerryx_module_manager.init_cb (instances_p);\n    return;\n  }\n\n  /* Delete the requested module from the cache if it's there. */\n  jerryx_module_resolve_local (name, resolvers_p, resolver_count, NULL);\n} /* jerryx_module_clear_cache */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nproject (jerry-main C)\n\n# Optional build settings\nset(ENABLE_LINK_MAP           OFF CACHE BOOL \"Enable generating a link map file?\")\nset(JERRY_TEST_STACK_MEASURE  OFF CACHE BOOL \"Enable stack measurement for the jerry-test binary?\")\n\n# Status messages\nmessage(STATUS \"ENABLE_LINK_MAP                \" ${ENABLE_LINK_MAP})\nmessage(STATUS \"JERRY_TEST_STACK_MEASURE       \" ${JERRY_TEST_STACK_MEASURE})\n\n# Generate map file\nif(ENABLE_LINK_MAP)\n  if(\"${PLATFORM}\" STREQUAL \"DARWIN\")\n    set(LINKER_FLAGS_COMMON \"${LINKER_FLAGS_COMMON} -Xlinker -map -Xlinker jerry.map\")\n  else()\n    set(LINKER_FLAGS_COMMON \"${LINKER_FLAGS_COMMON} -Xlinker -Map -Xlinker jerry.map\")\n  endif()\nendif()\n\n# Get version information from git\nif(IS_DIRECTORY \"${CMAKE_SOURCE_DIR}/.git\")\n  execute_process(COMMAND git rev-parse --short HEAD\n                  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}\n                  OUTPUT_VARIABLE JERRY_COMMIT_HASH\n                  OUTPUT_STRIP_TRAILING_WHITESPACE)\n  set(JERRY_COMMIT_HASH \" (${JERRY_COMMIT_HASH})\")\nelse()\n  set(JERRY_COMMIT_HASH \"\")\nendif()\n\nset(DEFINES_JERRY ${DEFINES_JERRY} JERRY_COMMIT_HASH=\"${JERRY_COMMIT_HASH}\")\n\nmacro(jerry_create_executable JERRY_NAME)\n  add_executable(${JERRY_NAME} ${ARGN})\n  set_property(TARGET ${JERRY_NAME}\n               PROPERTY LINK_FLAGS \"${LINKER_FLAGS_COMMON}\")\n  target_compile_definitions(${JERRY_NAME} PRIVATE ${DEFINES_JERRY})\n\n  target_link_libraries(${JERRY_NAME} jerry-core)\n\n  install(TARGETS ${JERRY_NAME} DESTINATION bin)\nendmacro()\n\n# Jerry with libfuzzer support\nif(JERRY_LIBFUZZER)\n  jerry_create_executable(\"jerry-libfuzzer\" \"libfuzzer.c\")\n  target_link_libraries(\"jerry-libfuzzer\" jerry-port-default -fsanitize=fuzzer)\nendif()\n\n# Jerry standalones\nif(JERRY_CMDLINE)\n  jerry_create_executable(\"jerry\" \"main-unix.c\" \"main-utils.c\" \"main-options.c\" \"cli.c\")\n  target_link_libraries(\"jerry\" jerry-ext jerry-port-default)\nendif()\n\nif(JERRY_CMDLINE_TEST)\n  jerry_create_executable(\"jerry-test\" \"main-unix-test.c\" \"benchmarking.c\")\n  target_link_libraries(\"jerry-test\" jerry-port-default)\n  if (JERRY_TEST_STACK_MEASURE)\n    target_compile_definitions(\"jerry-test\" PRIVATE -DJERRY_TEST_STACK_MEASURE=1)\n  endif()\nendif()\n\nif(JERRY_CMDLINE_SNAPSHOT)\n  jerry_create_executable(\"jerry-snapshot\" \"main-unix-snapshot.c\" \"cli.c\")\n  target_link_libraries(\"jerry-snapshot\" jerry-port-default)\nendif()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/benchmarking.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * This source contains libc overrides for the sake of stable benchmarking. If\n * building a binary for the purpose of benchmarking, the object compiled from\n * this source is to be injected into the list of objects-to-be-linked before\n * the list of libraries-to-be-linked to ensure that the linker picks up these\n * implementations.\n */\n\n#ifdef __GNUC__\n/*\n * Note:\n *      This is nasty and dangerous. However, we only need the timeval structure\n *      from sys/time.h. Unfortunately, the same header also declares\n *      gettimeofday, which has different declarations on different platforms\n *      (e.g., macOS, Linux). So, instead of #ifdef'ing for platforms, we simply\n *      tweak the header to declare another function. Don't try this at home.\n */\n#define gettimeofday __prevent_conflicting_gettimeofday_declarations__\n#include <sys/time.h>\n#undef gettimeofday\n\nint gettimeofday (struct timeval *, void *);\n\n/**\n * Useless but stable gettimeofday implementation. Returns Epoch. Ensures that\n * test cases relying on \"now\" yield stable results.\n */\nint gettimeofday (struct timeval *tv,\n                  void *tz)\n{\n  (void) tz;\n  tv->tv_sec = 0;\n  tv->tv_usec = 0;\n  return 0;\n} /* gettimeofday */\n#endif /* __GNUC__ */\n\nint rand (void);\n\n/**\n * Useless but stable rand implementation. Returns 4. Ensures that test cases\n * relying on randomness yield stable results.\n */\nint rand (void)\n{\n  return 4; /* Chosen by fair dice roll. Guaranteed to be random. */\n} /* rand */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/cli.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"cli.h\"\n\n/*\n * Fixed layout settings\n */\n\n/**\n * Wrap lines at:\n */\n#define CLI_LINE_LENGTH 80\n\n/**\n * Indent various lines with:\n */\n#define CLI_LINE_INDENT 2\n\n/**\n * Tab stop (for multi-column display) at:\n */\n#define CLI_LINE_TAB 24\n\n/**\n * Declare a char VLA and concatenate a program name and a sub-command name\n * (separated by a single space) into the new array. Useful for printing command\n * line option usage summary for sub-commands.\n *\n * @param CMDNAME name of the new array variable.\n * @param PROGNAME string containing the name of the program.\n * @param CMD string continaing the name of the sub-command.\n */\n#define CLI_CMD_NAME(CMDNAME, PROGNAME, CMD) \\\n  char CMDNAME[strlen ((PROGNAME)) + strlen ((CMD)) + 2]; \\\n  strncpy (CMDNAME, (PROGNAME), strlen ((PROGNAME))); \\\n  CMDNAME[strlen ((PROGNAME))] = ' '; \\\n  strncpy (CMDNAME + strlen ((PROGNAME)) + 1, (CMD), strlen ((CMD)) + 1)\n\n/*\n * Command line option handling\n */\n\n/**\n * Initialize a command line option processor.\n *\n * @return the state that should be passed to other cli_ functions.\n */\ncli_state_t\ncli_init (const cli_opt_t *options_p, /**< array of option definitions, terminated by CLI_OPT_DEFAULT */\n          int argc, /**< number of command line arguments */\n          char **argv) /**< array of command line arguments */\n{\n  return (cli_state_t)\n  {\n    .error = NULL,\n    .arg = NULL,\n    .index = 1,\n    .argc = argc,\n    .argv = argv,\n    .opts = options_p\n  };\n} /* cli_init */\n\n/**\n * Use another option list.\n */\nvoid\ncli_change_opts (cli_state_t *state_p, /**< state of the command line option processor */\n                 const cli_opt_t *options_p) /**< array of option definitions, terminated by CLI_OPT_DEFAULT */\n{\n  state_p->opts = options_p;\n} /* cli_change_opts */\n\n/**\n * Checks whether the current argument is an option.\n *\n * Note:\n *   The state_p->error is not NULL on error and it contains the error message.\n *\n * @return the ID of the option that was found or a CLI_OPT_ constant otherwise.\n */\nint\ncli_consume_option (cli_state_t *state_p) /**< state of the command line option processor */\n{\n  if (state_p->error != NULL)\n  {\n    return CLI_OPT_END;\n  }\n\n  if (state_p->index >= state_p->argc)\n  {\n    state_p->arg = NULL;\n    return CLI_OPT_END;\n  }\n\n  const char *arg = state_p->argv[state_p->index];\n\n  state_p->arg = arg;\n\n  if (arg[0] != '-')\n  {\n    return CLI_OPT_DEFAULT;\n  }\n\n  if (arg[1] == '-')\n  {\n    arg += 2;\n\n    for (const cli_opt_t *opt = state_p->opts; opt->id != CLI_OPT_DEFAULT; opt++)\n    {\n      if (opt->longopt != NULL && strcmp (arg, opt->longopt) == 0)\n      {\n        state_p->index++;\n        return opt->id;\n      }\n    }\n\n    state_p->error = \"Unknown long option\";\n    return CLI_OPT_END;\n  }\n\n  arg++;\n\n  for (const cli_opt_t *opt = state_p->opts; opt->id != CLI_OPT_DEFAULT; opt++)\n  {\n    if (opt->opt != NULL && strcmp (arg, opt->opt) == 0)\n    {\n      state_p->index++;\n      return opt->id;\n    }\n  }\n\n  state_p->error = \"Unknown option\";\n  return CLI_OPT_END;\n} /* cli_consume_option */\n\n/**\n * Returns the next argument as string.\n *\n * Note:\n *   The state_p->error is not NULL on error and it contains the error message.\n *\n * @return argument string\n */\nconst char *\ncli_consume_string (cli_state_t *state_p) /**< state of the command line option processor */\n{\n  if (state_p->error != NULL)\n  {\n    return NULL;\n  }\n\n  if (state_p->index >= state_p->argc)\n  {\n    state_p->error = \"Expected string argument\";\n    state_p->arg = NULL;\n    return NULL;\n  }\n\n  state_p->arg = state_p->argv[state_p->index];\n\n  state_p->index++;\n  return state_p->arg;\n} /* cli_consume_string */\n\n/**\n * Returns the next argument as integer.\n *\n * Note:\n *   The state_p->error is not NULL on error and it contains the error message.\n *\n * @return argument integer\n */\nint\ncli_consume_int (cli_state_t *state_p) /**< state of the command line option processor */\n{\n  if (state_p->error != NULL)\n  {\n    return 0;\n  }\n\n  state_p->error = \"Expected integer argument\";\n\n  if (state_p->index >= state_p->argc)\n  {\n    state_p->arg = NULL;\n    return 0;\n  }\n\n  state_p->arg = state_p->argv[state_p->index];\n\n  char *endptr;\n  long int value = strtol (state_p->arg, &endptr, 10);\n\n  if (*endptr != '\\0')\n  {\n    return 0;\n  }\n\n  state_p->error = NULL;\n  state_p->index++;\n  return (int) value;\n} /* cli_consume_int */\n\n/**\n * Return next agument as path index.\n *\n * @return path index\n */\nuint32_t\ncli_consume_path (cli_state_t *state_p) /**< state of the command line option processor */\n{\n  if (state_p->error != NULL)\n  {\n    return 0;\n  }\n\n  uint32_t path_index = (uint32_t) state_p->index;\n  cli_consume_string (state_p);\n\n  return path_index;\n} /* cli_consume_path */\n\n/*\n * Print helper functions\n */\n\n/**\n * Pad with spaces.\n */\nstatic void\ncli_print_pad (int cnt) /**< number of spaces to print */\n{\n  for (int i = 0; i < cnt; i++)\n  {\n    printf (\" \");\n  }\n} /* cli_print_pad */\n\n/**\n * Print the prefix of a string.\n */\nstatic void\ncli_print_prefix (const char *str, /**< string to print */\n                  int len) /**< length of the prefix to print */\n{\n  for (int i = 0; i < len; i++)\n  {\n    printf (\"%c\", *str++);\n  }\n} /* cli_print_prefix */\n\n/**\n * Print usage summary of options.\n */\nstatic void\ncli_opt_usage (const char *prog_name_p, /**< program name, typically argv[0] */\n               const char *command_name_p, /**< command name if available */\n               const cli_opt_t *opts_p) /**< array of command line option definitions, terminated by CLI_OPT_DEFAULT */\n{\n  int length = (int) strlen (prog_name_p);\n  const cli_opt_t *current_opt_p = opts_p;\n\n  printf (\"%s\", prog_name_p);\n\n  if (command_name_p != NULL)\n  {\n    int command_length = (int) strlen (command_name_p);\n\n    if (length + 1 + command_length > CLI_LINE_LENGTH)\n    {\n      length = CLI_LINE_INDENT - 1;\n      printf (\"\\n\");\n      cli_print_pad (length);\n    }\n\n    printf (\" %s\", command_name_p);\n  }\n\n  while (current_opt_p->id != CLI_OPT_DEFAULT)\n  {\n    const char *opt_p = current_opt_p->opt;\n    int opt_length = 2 + 1;\n\n    if (opt_p == NULL)\n    {\n      opt_p = current_opt_p->longopt;\n      opt_length++;\n    }\n\n    opt_length += (int) strlen (opt_p);\n\n    if (length + 1 + opt_length >= CLI_LINE_LENGTH)\n    {\n      length = CLI_LINE_INDENT - 1;\n      printf (\"\\n\");\n      cli_print_pad (length);\n    }\n    length += opt_length;\n\n    printf (\" [\");\n\n    if (current_opt_p->opt != NULL)\n    {\n      printf (\"-%s\", opt_p);\n    }\n    else\n    {\n      printf (\"--%s\", opt_p);\n    }\n\n    if (current_opt_p->meta != NULL)\n    {\n      printf (\" %s\", current_opt_p->meta);\n    }\n\n    printf (\"]\");\n\n    current_opt_p++;\n  }\n\n  if (current_opt_p->meta != NULL)\n  {\n    const char *opt_p = current_opt_p->meta;\n    int opt_length = (int) (2 + strlen (opt_p));\n\n    if (length + 1 + opt_length >= CLI_LINE_LENGTH)\n    {\n      length = CLI_LINE_INDENT - 1;\n      printf (\"\\n\");\n      cli_print_pad (length);\n    }\n\n    printf (\" [%s]\", opt_p);\n  }\n\n  printf (\"\\n\\n\");\n} /* cli_opt_usage */\n\n/**\n * Print a help message wrapped into the second column.\n */\nstatic void\ncli_print_help (const char *help) /**< the help message to print */\n{\n  while (help != NULL && *help != 0)\n  {\n    int length = -1;\n    int i = 0;\n    for (; i < CLI_LINE_LENGTH - CLI_LINE_TAB && help[i] != 0; i++)\n    {\n      if (help[i] == ' ')\n      {\n        length = i;\n      }\n    }\n    if (length < 0 || i < CLI_LINE_LENGTH - CLI_LINE_TAB)\n    {\n      length = i;\n    }\n\n    cli_print_prefix (help, length);\n\n    help += length;\n    while (*help == ' ')\n    {\n      help++;\n    }\n\n    if (*help != 0)\n    {\n      printf (\"\\n\");\n      cli_print_pad (CLI_LINE_TAB);\n    }\n  }\n} /* cli_print_help */\n\n/**\n * Print detailed help for options.\n */\nvoid\ncli_help (const char *prog_name_p, /**< program name, typically argv[0] */\n          const char *command_name_p, /**< command name if available */\n          const cli_opt_t *options_p) /**< array of command line option definitions, terminated by CLI_OPT_DEFAULT */\n{\n  cli_opt_usage (prog_name_p, command_name_p, options_p);\n\n  const cli_opt_t *opt_p = options_p;\n\n  while (opt_p->id != CLI_OPT_DEFAULT)\n  {\n    int length = CLI_LINE_INDENT;\n    cli_print_pad (CLI_LINE_INDENT);\n\n    if (opt_p->opt != NULL)\n    {\n      printf (\"-%s\", opt_p->opt);\n      length += (int) (strlen (opt_p->opt) + 1);\n    }\n\n    if (opt_p->opt != NULL && opt_p->longopt != NULL)\n    {\n      printf (\", \");\n      length += 2;\n    }\n\n    if (opt_p->longopt != NULL)\n    {\n      printf (\"--%s\", opt_p->longopt);\n      length += (int) (strlen (opt_p->longopt) + 2);\n    }\n\n    if (opt_p->meta != NULL)\n    {\n      printf (\" %s\", opt_p->meta);\n      length += 1 + (int) strlen (opt_p->meta);\n    }\n\n    if (opt_p->help != NULL)\n    {\n      if (length >= CLI_LINE_TAB)\n      {\n        printf (\"\\n\");\n        length = 0;\n      }\n      cli_print_pad (CLI_LINE_TAB - length);\n      length = CLI_LINE_TAB;\n\n      cli_print_help (opt_p->help);\n    }\n\n    printf (\"\\n\");\n    opt_p++;\n  }\n\n  if (opt_p->help != NULL)\n  {\n    int length = 0;\n\n    if (opt_p->meta != NULL)\n    {\n      length = (int) (CLI_LINE_INDENT + strlen (opt_p->meta));\n\n      cli_print_pad (CLI_LINE_INDENT);\n      printf (\"%s\", opt_p->meta);\n    }\n\n    if (length >= CLI_LINE_TAB)\n    {\n      printf (\"\\n\");\n      length = 0;\n    }\n\n    cli_print_pad (CLI_LINE_TAB - length);\n\n    cli_print_help (opt_p->help);\n    printf (\"\\n\");\n  }\n} /* cli_help */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/cli.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef CLI_H\n#define CLI_H\n\n#include <string.h>\n#include <stdint.h>\n\n/**\n * Command line option definition.\n */\ntypedef struct\n{\n  int id; /**< unique ID of the option (CLI_OPT_DEFAULT, or anything >= 0) */\n  const char *opt; /**< short option variant (in the form of \"x\" without dashes) */\n  const char *longopt; /**< long option variant (in the form of \"xxx\" without dashes) */\n  const char *meta; /**< name(s) of the argument(s) of the option, for display only */\n  const char *help; /**< descriptive help message of the option */\n} cli_opt_t;\n\n/**\n * Special marker for default option which also marks the end of the option list.\n */\n#define CLI_OPT_DEFAULT -1\n\n/**\n * Returned by cli_consume_option () when no more options are available\n * or an error occured.\n */\n#define CLI_OPT_END -2\n\n/**\n * State of the sub-command processor.\n * No fields should be accessed other than error and arg.\n */\ntypedef struct\n{\n  /* Public fields. */\n  const char *error; /**< public field for error message */\n  const char *arg; /**< last processed argument as string */\n\n  /* Private fields. */\n  int index; /**< current argument index */\n  int argc; /**< remaining number of arguments */\n  char **argv; /**< remaining arguments */\n  const cli_opt_t *opts; /**< options */\n} cli_state_t;\n\n/**\n * Macro for writing command line option definition struct literals.\n */\n#define CLI_OPT_DEF(...) /*(cli_opt_t)*/ { __VA_ARGS__ }\n\n/*\n * Functions for CLI.\n */\n\ncli_state_t cli_init (const cli_opt_t *options_p, int argc, char **argv);\nvoid cli_change_opts (cli_state_t *state_p, const cli_opt_t *options_p);\nint cli_consume_option (cli_state_t *state_p);\nconst char * cli_consume_string (cli_state_t *state_p);\nint cli_consume_int (cli_state_t *state_p);\nuint32_t cli_consume_path (cli_state_t *state_p);\nvoid cli_help (const char *prog_name_p, const char *command_name_p, const cli_opt_t *options_p);\n\n#endif /* !CLI_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/libfuzzer.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdlib.h>\n\n#include \"jerryscript.h\"\n\nint LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)\n{\n  srand (0);\n  jerry_init (JERRY_INIT_EMPTY);\n\n  if (jerry_is_valid_utf8_string ((jerry_char_t *) data, (jerry_size_t) size))\n  {\n    jerry_value_t parse_value = jerry_parse (NULL, 0, (jerry_char_t *) data, size, JERRY_PARSE_NO_OPTS);\n\n    if (!jerry_value_is_error (parse_value))\n    {\n      jerry_value_t run_value = jerry_run (parse_value);\n      jerry_release_value (run_value);\n\n      jerry_value_t run_queue_value = jerry_run_all_enqueued_jobs ();\n      jerry_release_value (run_queue_value);\n    }\n\n    jerry_release_value (parse_value);\n  }\n\n  jerry_cleanup ();\n\n  return 0;\n} /* LLVMFuzzerTestOneInput */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/main-options.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdbool.h>\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n#include \"cli.h\"\n#include \"main-utils.h\"\n#include \"main-options.h\"\n\n/**\n * Command line option IDs\n */\ntypedef enum\n{\n  OPT_HELP,\n  OPT_VERSION,\n  OPT_MEM_STATS,\n  OPT_TEST262_OBJECT,\n  OPT_PARSE_ONLY,\n  OPT_SHOW_OP,\n  OPT_SHOW_RE_OP,\n  OPT_DEBUG_SERVER,\n  OPT_DEBUG_PORT,\n  OPT_DEBUG_CHANNEL,\n  OPT_DEBUG_PROTOCOL,\n  OPT_DEBUG_SERIAL_CONFIG,\n  OPT_DEBUGGER_WAIT_SOURCE,\n  OPT_EXEC_SNAP,\n  OPT_EXEC_SNAP_FUNC,\n  OPT_MODULE,\n  OPT_LOG_LEVEL,\n  OPT_NO_PROMPT,\n  OPT_CALL_ON_EXIT,\n  OPT_USE_STDIN,\n} main_opt_id_t;\n\n/**\n * Command line options\n */\nstatic const cli_opt_t main_opts[] =\n{\n  CLI_OPT_DEF (.id = OPT_HELP, .opt = \"h\", .longopt = \"help\",\n               .help = \"print this help and exit\"),\n  CLI_OPT_DEF (.id = OPT_VERSION, .opt = \"v\", .longopt = \"version\",\n               .help = \"print tool and library version and exit\"),\n  CLI_OPT_DEF (.id = OPT_MEM_STATS, .longopt = \"mem-stats\",\n               .help = \"dump memory statistics\"),\n  CLI_OPT_DEF (.id = OPT_TEST262_OBJECT, .longopt = \"test262-object\",\n               .help = \"create test262 object\"),\n  CLI_OPT_DEF (.id = OPT_PARSE_ONLY, .longopt = \"parse-only\",\n               .help = \"don't execute JS input\"),\n  CLI_OPT_DEF (.id = OPT_SHOW_OP, .longopt = \"show-opcodes\",\n               .help = \"dump parser byte-code\"),\n  CLI_OPT_DEF (.id = OPT_SHOW_RE_OP, .longopt = \"show-regexp-opcodes\",\n               .help = \"dump regexp byte-code\"),\n  CLI_OPT_DEF (.id = OPT_DEBUG_SERVER, .longopt = \"start-debug-server\",\n               .help = \"start debug server and wait for a connecting client\"),\n  CLI_OPT_DEF (.id = OPT_DEBUG_PORT, .longopt = \"debug-port\", .meta = \"NUM\",\n               .help = \"debug server port (default: 5001)\"),\n  CLI_OPT_DEF (.id = OPT_DEBUG_CHANNEL, .longopt = \"debug-channel\", .meta = \"[websocket|rawpacket]\",\n               .help = \"Specify the debugger transmission channel (default: websocket)\"),\n  CLI_OPT_DEF (.id = OPT_DEBUG_PROTOCOL, .longopt = \"debug-protocol\", .meta = \"PROTOCOL\",\n               .help = \"Specify the transmission protocol over the communication channel (tcp|serial, default: tcp)\"),\n  CLI_OPT_DEF (.id = OPT_DEBUG_SERIAL_CONFIG, .longopt = \"serial-config\", .meta = \"OPTIONS_STRING\",\n               .help = \"Configure parameters for serial port (default: /dev/ttyS0,115200,8,N,1)\"),\n  CLI_OPT_DEF (.id = OPT_DEBUGGER_WAIT_SOURCE, .longopt = \"debugger-wait-source\",\n               .help = \"wait for an executable source from the client\"),\n  CLI_OPT_DEF (.id = OPT_EXEC_SNAP, .longopt = \"exec-snapshot\", .meta = \"FILE\",\n               .help = \"execute input snapshot file(s)\"),\n  CLI_OPT_DEF (.id = OPT_EXEC_SNAP_FUNC, .longopt = \"exec-snapshot-func\", .meta = \"FILE NUM\",\n               .help = \"execute specific function from input snapshot file(s)\"),\n  CLI_OPT_DEF (.id = OPT_MODULE, .opt = \"m\", .longopt = \"module\", .meta = \"FILE\",\n               .help = \"execute module file\"),\n  CLI_OPT_DEF (.id = OPT_LOG_LEVEL, .longopt = \"log-level\", .meta = \"NUM\",\n               .help = \"set log level (0-3)\"),\n  CLI_OPT_DEF (.id = OPT_NO_PROMPT, .longopt = \"no-prompt\",\n               .help = \"don't print prompt in REPL mode\"),\n  CLI_OPT_DEF (.id = OPT_CALL_ON_EXIT, .longopt = \"call-on-exit\", .meta = \"STRING\",\n               .help = \"invoke the specified function when the process is just about to exit\"),\n  CLI_OPT_DEF (.id = OPT_USE_STDIN, .opt = \"\", .help = \"read from standard input\"),\n  CLI_OPT_DEF (.id = CLI_OPT_DEFAULT, .meta = \"FILE\",\n               .help = \"input JS file(s)\")\n};\n\n/**\n * Check whether a usage-related condition holds. If not, print an error\n * message, print the usage, and terminate the application.\n */\nstatic void\ncheck_usage (bool condition, /**< the condition that must hold */\n             const char *name, /**< name of the application (argv[0]) */\n             const char *msg, /**< error message to print if condition does not hold */\n             const char *opt) /**< optional part of the error message */\n{\n  if (!condition)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"%s: %s%s\\n\", name, msg, opt != NULL ? opt : \"\");\n    exit (JERRY_STANDALONE_EXIT_CODE_FAIL);\n  }\n} /* check_usage */\n\n/**\n * Check whether JerryScript has a requested feature enabled or not. If not,\n * print a warning message.\n *\n * @return the status of the feature.\n */\nstatic bool\ncheck_feature (jerry_feature_t feature, /**< feature to check */\n               const char *option) /**< command line option that triggered this check */\n{\n  if (!jerry_is_feature_enabled (feature))\n  {\n    jerry_port_default_set_log_level (JERRY_LOG_LEVEL_WARNING);\n    jerry_port_log (JERRY_LOG_LEVEL_WARNING, \"Ignoring '%s' option because this feature is disabled!\\n\", option);\n    return false;\n  }\n  return true;\n} /* check_feature */\n\n/**\n * parse input arguments\n */\nvoid\nmain_parse_args (int argc, /**< argc */\n                 char **argv, /**< argv */\n                 main_args_t *arguments_p) /**< [in/out] arguments reference */\n{\n  arguments_p->source_count = 0;\n\n  arguments_p->debug_channel = \"websocket\";\n  arguments_p->debug_protocol = \"tcp\";\n  arguments_p->debug_serial_config = \"/dev/ttyS0,115200,8,N,1\";\n  arguments_p->debug_port = 5001;\n\n  arguments_p->exit_cb_name_p = NULL;\n  arguments_p->init_flags = JERRY_INIT_EMPTY;\n  arguments_p->option_flags = OPT_FLAG_EMPTY;\n\n  cli_state_t cli_state = cli_init (main_opts, argc, argv);\n  for (int id = cli_consume_option (&cli_state); id != CLI_OPT_END; id = cli_consume_option (&cli_state))\n  {\n    switch (id)\n    {\n      case OPT_HELP:\n      {\n        cli_help (argv[0], NULL, main_opts);\n        exit (JERRY_STANDALONE_EXIT_CODE_OK);\n\n        break;\n      }\n      case OPT_VERSION:\n      {\n        printf (\"Version: %d.%d.%d%s\\n\",\n                JERRY_API_MAJOR_VERSION,\n                JERRY_API_MINOR_VERSION,\n                JERRY_API_PATCH_VERSION,\n                JERRY_COMMIT_HASH);\n        exit (JERRY_STANDALONE_EXIT_CODE_OK);\n\n        break;\n      }\n      case OPT_MEM_STATS:\n      {\n        if (check_feature (JERRY_FEATURE_MEM_STATS, cli_state.arg))\n        {\n          jerry_port_default_set_log_level (JERRY_LOG_LEVEL_DEBUG);\n          arguments_p->init_flags |= JERRY_INIT_MEM_STATS;\n        }\n        break;\n      }\n      case OPT_TEST262_OBJECT:\n      {\n        arguments_p->option_flags |= OPT_FLAG_TEST262_OBJECT;\n        break;\n      }\n      case OPT_PARSE_ONLY:\n      {\n        arguments_p->option_flags |= OPT_FLAG_PARSE_ONLY;\n        break;\n      }\n      case OPT_SHOW_OP:\n      {\n        if (check_feature (JERRY_FEATURE_PARSER_DUMP, cli_state.arg))\n        {\n          jerry_port_default_set_log_level (JERRY_LOG_LEVEL_DEBUG);\n          arguments_p->init_flags |= JERRY_INIT_SHOW_OPCODES;\n        }\n        break;\n      }\n      case OPT_CALL_ON_EXIT:\n      {\n        arguments_p->exit_cb_name_p = cli_consume_string (&cli_state);\n        break;\n      }\n      case OPT_SHOW_RE_OP:\n      {\n        if (check_feature (JERRY_FEATURE_REGEXP_DUMP, cli_state.arg))\n        {\n          jerry_port_default_set_log_level (JERRY_LOG_LEVEL_DEBUG);\n          arguments_p->init_flags |= JERRY_INIT_SHOW_REGEXP_OPCODES;\n        }\n        break;\n      }\n      case OPT_DEBUG_SERVER:\n      {\n        if (check_feature (JERRY_FEATURE_DEBUGGER, cli_state.arg))\n        {\n          arguments_p->option_flags |= OPT_FLAG_DEBUG_SERVER;\n        }\n        break;\n      }\n      case OPT_DEBUG_PORT:\n      {\n        if (check_feature (JERRY_FEATURE_DEBUGGER, cli_state.arg))\n        {\n          arguments_p->debug_port = (uint16_t) cli_consume_int (&cli_state);\n        }\n        break;\n      }\n      case OPT_DEBUG_CHANNEL:\n      {\n        if (check_feature (JERRY_FEATURE_DEBUGGER, cli_state.arg))\n        {\n          const char *debug_channel = cli_consume_string (&cli_state);\n          check_usage (!strcmp (debug_channel, \"websocket\") || !strcmp (debug_channel, \"rawpacket\"),\n                       argv[0], \"Error: invalid value for --debug-channel: \", cli_state.arg);\n\n          arguments_p->debug_channel = debug_channel;\n        }\n        break;\n      }\n      case OPT_DEBUG_PROTOCOL:\n      {\n        if (check_feature (JERRY_FEATURE_DEBUGGER, cli_state.arg))\n        {\n          const char *debug_protocol = cli_consume_string (&cli_state);\n          check_usage (!strcmp (debug_protocol, \"tcp\") || !strcmp (debug_protocol, \"serial\"),\n                       argv[0], \"Error: invalid value for --debug-protocol: \", cli_state.arg);\n\n          arguments_p->debug_protocol = debug_protocol;\n        }\n        break;\n      }\n      case OPT_DEBUG_SERIAL_CONFIG:\n      {\n        if (check_feature (JERRY_FEATURE_DEBUGGER, cli_state.arg))\n        {\n          arguments_p->debug_serial_config = cli_consume_string (&cli_state);\n        }\n        break;\n      }\n      case OPT_DEBUGGER_WAIT_SOURCE:\n      {\n        if (check_feature (JERRY_FEATURE_DEBUGGER, cli_state.arg))\n        {\n          arguments_p->option_flags |= OPT_FLAG_WAIT_SOURCE;\n        }\n        break;\n      }\n      case OPT_EXEC_SNAP:\n      {\n        const bool is_enabled = check_feature (JERRY_FEATURE_SNAPSHOT_EXEC, cli_state.arg);\n        const uint32_t path_index = cli_consume_path (&cli_state);\n\n        if (is_enabled)\n        {\n          main_source_t *source_p = arguments_p->sources_p + arguments_p->source_count;\n          arguments_p->source_count++;\n\n          source_p->type = SOURCE_SNAPSHOT;\n          source_p->path_index = path_index;\n          source_p->snapshot_index = 0;\n        }\n\n        break;\n      }\n      case OPT_EXEC_SNAP_FUNC:\n      {\n        const bool is_enabled = check_feature (JERRY_FEATURE_SNAPSHOT_EXEC, cli_state.arg);\n        const uint32_t path_index = cli_consume_path (&cli_state);\n        const uint16_t snapshot_index = (uint16_t) cli_consume_int (&cli_state);\n\n        if (is_enabled)\n        {\n          main_source_t *source_p = arguments_p->sources_p + arguments_p->source_count;\n          arguments_p->source_count++;\n\n          source_p->type = SOURCE_SNAPSHOT;\n          source_p->path_index = path_index;\n          source_p->snapshot_index = snapshot_index;\n        }\n\n        break;\n      }\n      case OPT_MODULE:\n      {\n        const uint32_t path_index = cli_consume_path (&cli_state);\n\n        main_source_t *source_p = arguments_p->sources_p + arguments_p->source_count;\n        arguments_p->source_count++;\n\n        source_p->type = SOURCE_MODULE;\n        source_p->path_index = path_index;\n        source_p->snapshot_index = 0;\n\n        break;\n      }\n      case OPT_LOG_LEVEL:\n      {\n        long int log_level = cli_consume_int (&cli_state);\n        check_usage (log_level >= 0 && log_level <= 3,\n                     argv[0], \"Error: invalid value for --log-level: \", cli_state.arg);\n\n        jerry_port_default_set_log_level ((jerry_log_level_t) log_level);\n        break;\n      }\n      case OPT_NO_PROMPT:\n      {\n        arguments_p->option_flags |= OPT_FLAG_NO_PROMPT;\n        break;\n      }\n      case OPT_USE_STDIN:\n      {\n        arguments_p->option_flags |= OPT_FLAG_USE_STDIN;\n        break;\n      }\n      case CLI_OPT_DEFAULT:\n      {\n        main_source_t *source_p = arguments_p->sources_p + arguments_p->source_count;\n        arguments_p->source_count++;\n\n        source_p->type = SOURCE_SCRIPT;\n        source_p->path_index = cli_consume_path (&cli_state);\n        break;\n      }\n      default:\n      {\n        cli_state.error = \"Internal error\";\n        break;\n      }\n    }\n  }\n\n  if (cli_state.error != NULL)\n  {\n    if (cli_state.arg != NULL)\n    {\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: %s %s\\n\", cli_state.error, cli_state.arg);\n    }\n    else\n    {\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: %s\\n\", cli_state.error);\n    }\n\n    exit (JERRY_STANDALONE_EXIT_CODE_FAIL);\n  }\n} /* main_parse_args */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/main-options.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef MAIN_OPTIONS_H\n#define MAIN_OPTIONS_H\n\n#include <stdint.h>\n\n/**\n * Argument option flags.\n */\ntypedef enum\n{\n  OPT_FLAG_EMPTY          = 0,\n  OPT_FLAG_PARSE_ONLY     = (1 << 0),\n  OPT_FLAG_DEBUG_SERVER   = (1 << 1),\n  OPT_FLAG_WAIT_SOURCE    = (1 << 2),\n  OPT_FLAG_NO_PROMPT      = (1 << 3),\n  OPT_FLAG_USE_STDIN      = (1 << 4),\n  OPT_FLAG_TEST262_OBJECT = (1u << 5),\n} main_option_flags_t;\n\n/**\n * Source types\n */\ntypedef enum\n{\n  SOURCE_SNAPSHOT,\n  SOURCE_MODULE,\n  SOURCE_SCRIPT,\n} main_source_type_t;\n\n/**\n * Input source file.\n */\ntypedef struct\n{\n  uint32_t path_index;\n  uint16_t snapshot_index;\n  uint16_t type;\n} main_source_t;\n\n/**\n * Arguments struct to store parsed command line arguments.\n */\ntypedef struct\n{\n  main_source_t *sources_p;\n  uint32_t source_count;\n\n  const char *debug_channel;\n  const char *debug_protocol;\n  const char *debug_serial_config;\n  uint16_t debug_port;\n\n  const char *exit_cb_name_p;\n\n  uint16_t option_flags;\n  uint16_t init_flags;\n} main_args_t;\n\nvoid\nmain_parse_args (int argc, char **argv, main_args_t *arguments_p);\n\n#endif /* !MAIN_OPTIONS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/main-unix-snapshot.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <assert.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n#include \"cli.h\"\n\n/**\n * Maximum size for loaded snapshots\n */\n#define JERRY_BUFFER_SIZE (1048576)\n\n/**\n * Maximum number of loaded literals\n */\n#define JERRY_LITERAL_LENGTH (4096)\n\n/**\n * Standalone Jerry exit codes\n */\n#define JERRY_STANDALONE_EXIT_CODE_OK   (0)\n#define JERRY_STANDALONE_EXIT_CODE_FAIL (1)\n\nstatic uint8_t input_buffer[JERRY_BUFFER_SIZE];\nstatic uint32_t output_buffer[JERRY_BUFFER_SIZE / 4];\nstatic jerry_char_t literal_buffer[JERRY_BUFFER_SIZE];\nstatic const char *output_file_name_p = \"js.snapshot\";\nstatic jerry_length_t magic_string_lengths[JERRY_LITERAL_LENGTH];\nstatic const jerry_char_t *magic_string_items[JERRY_LITERAL_LENGTH];\n\n#if defined (JERRY_EXTERNAL_CONTEXT) && (JERRY_EXTERNAL_CONTEXT == 1)\n/**\n * The alloc function passed to jerry_create_context\n */\nstatic void *\ncontext_alloc (size_t size,\n               void *cb_data_p)\n{\n  (void) cb_data_p; /* unused */\n  return malloc (size);\n} /* context_alloc */\n\n/**\n * Create and set the default external context.\n */\nstatic void\ncontext_init (void)\n{\n  jerry_context_t *context_p = jerry_create_context (JERRY_GLOBAL_HEAP_SIZE * 1024, context_alloc, NULL);\n  jerry_port_default_set_current_context (context_p);\n} /* context_init */\n\n#endif /* defined (JERRY_EXTERNAL_CONTEXT) && (JERRY_EXTERNAL_CONTEXT == 1) */\n\n/**\n * Check whether JerryScript has a requested feature enabled or not. If not,\n * print a warning message.\n *\n * @return the status of the feature.\n */\nstatic bool\ncheck_feature (jerry_feature_t feature, /**< feature to check */\n               const char *option) /**< command line option that triggered this check */\n{\n  if (!jerry_is_feature_enabled (feature))\n  {\n    jerry_port_default_set_log_level (JERRY_LOG_LEVEL_WARNING);\n    jerry_port_log (JERRY_LOG_LEVEL_WARNING, \"Ignoring '%s' option because this feature is disabled!\\n\", option);\n    return false;\n  }\n  return true;\n} /* check_feature */\n\n/**\n * Utility method to check and print error in the given cli state.\n *\n * @return true - if any error is detected\n *         false - if there is no error in the cli state\n */\nstatic bool\ncheck_cli_error (const cli_state_t *const cli_state_p)\n{\n  if (cli_state_p->error != NULL)\n  {\n    if (cli_state_p->arg != NULL)\n    {\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: %s %s\\n\", cli_state_p->error, cli_state_p->arg);\n    }\n    else\n    {\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: %s\\n\", cli_state_p->error);\n    }\n\n    return true;\n  }\n\n  return false;\n} /* check_cli_error */\n\n/**\n * Loading a single file into the memory.\n *\n * @return size of file - if loading is successful\n *         0 - otherwise\n */\nstatic size_t\nread_file (uint8_t *input_pos_p, /**< next position in the input buffer */\n           const char *file_name) /**< file name */\n{\n  FILE *file = fopen (file_name, \"rb\");\n\n  if (file == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: failed to open file: %s\\n\", file_name);\n    return 0;\n  }\n\n  size_t max_size = (size_t) (input_buffer + JERRY_BUFFER_SIZE - input_pos_p);\n\n  size_t bytes_read = fread (input_pos_p, 1u, max_size, file);\n  fclose (file);\n\n  if (bytes_read == 0)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: failed to read file: %s\\n\", file_name);\n    return 0;\n  }\n\n  if (bytes_read == max_size)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: file too large: %s\\n\", file_name);\n    return 0;\n  }\n\n  printf (\"Input file '%s' (%zu bytes) loaded.\\n\", file_name, bytes_read);\n  return bytes_read;\n} /* read_file */\n\n/**\n * Print error value\n */\nstatic void\nprint_unhandled_exception (jerry_value_t error_value) /**< error value */\n{\n  assert (!jerry_value_is_error (error_value));\n\n  jerry_value_t err_str_val = jerry_value_to_string (error_value);\n\n  if (jerry_value_is_error (err_str_val))\n  {\n    /* Avoid recursive error throws. */\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Snapshot error: [value cannot be converted to string]\\n\");\n    jerry_release_value (err_str_val);\n    return;\n  }\n\n  jerry_size_t err_str_size = jerry_get_utf8_string_size (err_str_val);\n\n  if (err_str_size >= 256)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Snapshot error: [value cannot be converted to string]\\n\");\n    jerry_release_value (err_str_val);\n    return;\n  }\n\n  jerry_char_t err_str_buf[256];\n  jerry_size_t string_end = jerry_string_to_utf8_char_buffer (err_str_val, err_str_buf, err_str_size);\n  assert (string_end == err_str_size);\n  err_str_buf[string_end] = 0;\n\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Snapshot error: %s\\n\", (char *) err_str_buf);\n  jerry_release_value (err_str_val);\n} /* print_unhandled_exception */\n\n/**\n * Generate command line option IDs\n */\ntypedef enum\n{\n  OPT_GENERATE_HELP,\n  OPT_GENERATE_STATIC,\n  OPT_GENERATE_SHOW_OP,\n  OPT_GENERATE_FUNCTION,\n  OPT_GENERATE_OUT,\n  OPT_IMPORT_LITERAL_LIST\n} generate_opt_id_t;\n\n/**\n * Generate command line options\n */\nstatic const cli_opt_t generate_opts[] =\n{\n  CLI_OPT_DEF (.id = OPT_GENERATE_HELP, .opt = \"h\", .longopt = \"help\",\n               .help = \"print this help and exit\"),\n  CLI_OPT_DEF (.id = OPT_GENERATE_STATIC, .opt = \"s\", .longopt = \"static\",\n               .help = \"generate static snapshot\"),\n  CLI_OPT_DEF (.id = OPT_GENERATE_FUNCTION, .opt = \"f\", .longopt = \"generate-function-snapshot\",\n               .meta = \"ARGUMENTS\",\n               .help = \"generate function snapshot with given arguments\"),\n  CLI_OPT_DEF (.id = OPT_IMPORT_LITERAL_LIST, .longopt = \"load-literals-list-format\",\n               .meta = \"FILE\",\n               .help = \"import literals from list format (for static snapshots)\"),\n  CLI_OPT_DEF (.id = OPT_GENERATE_SHOW_OP, .longopt = \"show-opcodes\",\n               .help = \"print generated opcodes\"),\n  CLI_OPT_DEF (.id = OPT_GENERATE_OUT, .opt = \"o\",  .meta=\"FILE\",\n               .help = \"specify output file name (default: js.snapshot)\"),\n  CLI_OPT_DEF (.id = CLI_OPT_DEFAULT, .meta = \"FILE\",\n               .help = \"input source file\")\n};\n\n/**\n * Process 'generate' command.\n *\n * @return error code (0 - no error)\n */\nstatic int\nprocess_generate (cli_state_t *cli_state_p, /**< cli state */\n                  int argc, /**< number of arguments */\n                  char *prog_name_p) /**< program name */\n{\n  (void) argc;\n\n  uint32_t snapshot_flags = 0;\n  jerry_init_flag_t flags = JERRY_INIT_EMPTY;\n\n  const char *file_name_p = NULL;\n  uint8_t *source_p = input_buffer;\n  size_t source_length = 0;\n  const char *literals_file_name_p = NULL;\n  const char *function_args_p = NULL;\n\n  cli_change_opts (cli_state_p, generate_opts);\n\n  for (int id = cli_consume_option (cli_state_p); id != CLI_OPT_END; id = cli_consume_option (cli_state_p))\n  {\n    switch (id)\n    {\n      case OPT_GENERATE_HELP:\n      {\n        cli_help (prog_name_p, \"generate\", generate_opts);\n        return JERRY_STANDALONE_EXIT_CODE_OK;\n      }\n      case OPT_GENERATE_STATIC:\n      {\n        snapshot_flags |= JERRY_SNAPSHOT_SAVE_STATIC;\n        break;\n      }\n      case OPT_GENERATE_FUNCTION:\n      {\n        function_args_p = cli_consume_string (cli_state_p);\n        break;\n      }\n      case OPT_IMPORT_LITERAL_LIST:\n      {\n        literals_file_name_p = cli_consume_string (cli_state_p);\n        break;\n      }\n      case OPT_GENERATE_SHOW_OP:\n      {\n        if (check_feature (JERRY_FEATURE_PARSER_DUMP, cli_state_p->arg))\n        {\n          jerry_port_default_set_log_level (JERRY_LOG_LEVEL_DEBUG);\n          flags |= JERRY_INIT_SHOW_OPCODES;\n        }\n        break;\n      }\n      case OPT_GENERATE_OUT:\n      {\n        output_file_name_p = cli_consume_string (cli_state_p);\n        break;\n      }\n      case CLI_OPT_DEFAULT:\n      {\n        if (file_name_p != NULL)\n        {\n          jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Exactly one input file must be specified\\n\");\n          return JERRY_STANDALONE_EXIT_CODE_FAIL;\n        }\n\n        file_name_p = cli_consume_string (cli_state_p);\n\n        if (cli_state_p->error == NULL)\n        {\n          source_length = read_file (source_p, file_name_p);\n\n          if (source_length == 0)\n          {\n            jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Input file is empty\\n\");\n            return JERRY_STANDALONE_EXIT_CODE_FAIL;\n          }\n        }\n        break;\n      }\n      default:\n      {\n        cli_state_p->error = \"Internal error\";\n        break;\n      }\n    }\n  }\n\n  if (check_cli_error (cli_state_p))\n  {\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  if (file_name_p == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Exactly one input file must be specified\\n\");\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n#if defined (JERRY_EXTERNAL_CONTEXT) && (JERRY_EXTERNAL_CONTEXT == 1)\n  context_init ();\n#endif /* defined (JERRY_EXTERNAL_CONTEXT) && (JERRY_EXTERNAL_CONTEXT == 1) */\n\n  jerry_init (flags);\n\n  if (!jerry_is_valid_utf8_string (source_p, (jerry_size_t) source_length))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Input must be a valid UTF-8 string.\\n\");\n    jerry_cleanup ();\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  if (literals_file_name_p != NULL)\n  {\n    /* Import literal list */\n    uint8_t *sp_buffer_start_p = source_p + source_length + 1;\n    size_t sp_buffer_size = read_file (sp_buffer_start_p, literals_file_name_p);\n\n    if (sp_buffer_size > 0)\n    {\n      const char *sp_buffer_p = (const char *) sp_buffer_start_p;\n      uint32_t num_of_lit = 0;\n\n      do\n      {\n        char *sp_buffer_end_p = NULL;\n        jerry_length_t mstr_size = (jerry_length_t) strtol (sp_buffer_p, &sp_buffer_end_p, 10);\n        if (mstr_size > 0)\n        {\n          magic_string_items[num_of_lit] = (jerry_char_t *) (sp_buffer_end_p + 1);\n          magic_string_lengths[num_of_lit] = mstr_size;\n          num_of_lit++;\n        }\n        sp_buffer_p = sp_buffer_end_p + mstr_size + 1;\n      }\n      while ((size_t) (sp_buffer_p - (char *) sp_buffer_start_p) < sp_buffer_size);\n\n      if (num_of_lit > 0)\n      {\n        jerry_register_magic_strings (magic_string_items, num_of_lit,\n                                      magic_string_lengths);\n      }\n    }\n  }\n\n  jerry_value_t snapshot_result;\n\n  if (function_args_p != NULL)\n  {\n    snapshot_result = jerry_generate_function_snapshot ((jerry_char_t *) file_name_p,\n                                                        (size_t) strlen (file_name_p),\n                                                        (jerry_char_t *) source_p,\n                                                        source_length,\n                                                        (const jerry_char_t *) function_args_p,\n                                                        strlen (function_args_p),\n                                                        snapshot_flags,\n                                                        output_buffer,\n                                                        sizeof (output_buffer) / sizeof (uint32_t));\n  }\n  else\n  {\n    snapshot_result = jerry_generate_snapshot ((jerry_char_t *) file_name_p,\n                                               (size_t) strlen (file_name_p),\n                                               (jerry_char_t *) source_p,\n                                               source_length,\n                                               snapshot_flags,\n                                               output_buffer,\n                                               sizeof (output_buffer) / sizeof (uint32_t));\n  }\n\n  if (jerry_value_is_error (snapshot_result))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Generating snapshot failed!\\n\");\n\n    snapshot_result = jerry_get_value_from_error (snapshot_result, true);\n\n    print_unhandled_exception (snapshot_result);\n\n    jerry_release_value (snapshot_result);\n    jerry_cleanup ();\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  size_t snapshot_size = (size_t) jerry_get_number_value (snapshot_result);\n  jerry_release_value (snapshot_result);\n\n  FILE *snapshot_file_p = fopen (output_file_name_p, \"wb\");\n  if (snapshot_file_p == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Unable to write snapshot file: '%s'\\n\", output_file_name_p);\n    jerry_cleanup ();\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  fwrite (output_buffer, sizeof (uint8_t), snapshot_size, snapshot_file_p);\n  fclose (snapshot_file_p);\n\n  printf (\"Created snapshot file: '%s' (%zu bytes)\\n\", output_file_name_p, snapshot_size);\n\n  jerry_cleanup ();\n  return JERRY_STANDALONE_EXIT_CODE_OK;\n} /* process_generate */\n\n/**\n * Literal dump command line option IDs\n */\ntypedef enum\n{\n  OPT_LITERAL_DUMP_HELP,\n  OPT_LITERAL_DUMP_FORMAT,\n  OPT_LITERAL_DUMP_OUT,\n} literal_dump_opt_id_t;\n\n/**\n * Literal dump command line options\n */\nstatic const cli_opt_t literal_dump_opts[] =\n{\n  CLI_OPT_DEF (.id = OPT_LITERAL_DUMP_HELP, .opt = \"h\", .longopt = \"help\",\n               .help = \"print this help and exit\"),\n  CLI_OPT_DEF (.id = OPT_LITERAL_DUMP_FORMAT, .longopt = \"format\",\n               .meta = \"[c|list]\",\n               .help = \"specify output format (default: list)\"),\n  CLI_OPT_DEF (.id = OPT_LITERAL_DUMP_OUT, .opt = \"o\",\n               .help = \"specify output file name (default: literals.[h|list])\"),\n  CLI_OPT_DEF (.id = CLI_OPT_DEFAULT, .meta = \"FILE(S)\",\n               .help = \"input snapshot files\")\n};\n\n/**\n * Process 'litdump' command.\n *\n * @return error code (0 - no error)\n */\nstatic int\nprocess_literal_dump (cli_state_t *cli_state_p, /**< cli state */\n                      int argc, /**< number of arguments */\n                      char *prog_name_p) /**< program name */\n{\n  uint8_t *input_pos_p = input_buffer;\n\n  cli_change_opts (cli_state_p, literal_dump_opts);\n\n  JERRY_VLA (const uint32_t *, snapshot_buffers, argc);\n  JERRY_VLA (size_t, snapshot_buffer_sizes, argc);\n  uint32_t number_of_files = 0;\n  const char *literals_file_name_p = NULL;\n  bool is_c_format = false;\n\n  for (int id = cli_consume_option (cli_state_p); id != CLI_OPT_END; id = cli_consume_option (cli_state_p))\n  {\n    switch (id)\n    {\n      case OPT_LITERAL_DUMP_HELP:\n      {\n        cli_help (prog_name_p, \"litdump\", literal_dump_opts);\n        return JERRY_STANDALONE_EXIT_CODE_OK;\n      }\n      case OPT_LITERAL_DUMP_FORMAT:\n      {\n        const char *fromat_str_p = cli_consume_string (cli_state_p);\n        if (!strcmp (\"c\", fromat_str_p))\n        {\n          is_c_format = true;\n        }\n        else if (!strcmp (\"list\", fromat_str_p))\n        {\n          is_c_format = false;\n        }\n        else\n        {\n          jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Unsupported literal dump format.\");\n          return JERRY_STANDALONE_EXIT_CODE_FAIL;\n        }\n        break;\n      }\n      case OPT_LITERAL_DUMP_OUT:\n      {\n        literals_file_name_p = cli_consume_string (cli_state_p);\n        break;\n      }\n      case CLI_OPT_DEFAULT:\n      {\n        const char *file_name_p = cli_consume_string (cli_state_p);\n\n        if (cli_state_p->error == NULL)\n        {\n          size_t size = read_file (input_pos_p, file_name_p);\n\n          if (size == 0)\n          {\n            return JERRY_STANDALONE_EXIT_CODE_FAIL;\n          }\n\n          snapshot_buffers[number_of_files] = (const uint32_t *) input_pos_p;\n          snapshot_buffer_sizes[number_of_files] = size;\n\n          number_of_files++;\n          const uintptr_t mask = sizeof (uint32_t) - 1;\n          input_pos_p = (uint8_t *) ((((uintptr_t) input_pos_p) + size + mask) & ~mask);\n        }\n        break;\n      }\n      default:\n      {\n        cli_state_p->error = \"Internal error\";\n        break;\n      }\n    }\n  }\n\n  if (check_cli_error (cli_state_p))\n  {\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  if (number_of_files < 1)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: at least one input file must be specified.\\n\");\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n#if defined (JERRY_EXTERNAL_CONTEXT) && (JERRY_EXTERNAL_CONTEXT == 1)\n  context_init ();\n#endif /* defined (JERRY_EXTERNAL_CONTEXT) && (JERRY_EXTERNAL_CONTEXT == 1) */\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  size_t lit_buf_sz = 0;\n  if (number_of_files == 1)\n  {\n    lit_buf_sz = jerry_get_literals_from_snapshot (snapshot_buffers[0],\n                                                   snapshot_buffer_sizes[0],\n                                                   literal_buffer,\n                                                   JERRY_BUFFER_SIZE,\n                                                   is_c_format);\n  }\n  else\n  {\n    /* The input contains more than one input snapshot file, so we must merge them first. */\n    const char *error_p = NULL;\n    size_t merged_snapshot_size = jerry_merge_snapshots (snapshot_buffers,\n                                                         snapshot_buffer_sizes,\n                                                         number_of_files,\n                                                         output_buffer,\n                                                         JERRY_BUFFER_SIZE,\n                                                         &error_p);\n\n    if (merged_snapshot_size == 0)\n    {\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: %s\\n\", error_p);\n      jerry_cleanup ();\n      return JERRY_STANDALONE_EXIT_CODE_FAIL;\n    }\n\n    printf (\"Successfully merged the input snapshots (%zu bytes).\\n\", merged_snapshot_size);\n\n    lit_buf_sz = jerry_get_literals_from_snapshot (output_buffer,\n                                                   merged_snapshot_size,\n                                                   literal_buffer,\n                                                   JERRY_BUFFER_SIZE,\n                                                   is_c_format);\n  }\n\n  if (lit_buf_sz == 0)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR,\n                    \"Error: Literal saving failed! No literals were found in the input snapshot(s).\\n\");\n    jerry_cleanup ();\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  if (literals_file_name_p == NULL)\n  {\n    literals_file_name_p = is_c_format ? \"literals.h\" : \"literals.list\";\n  }\n\n  FILE *file_p = fopen (literals_file_name_p, \"wb\");\n\n  if (file_p == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: cannot open file: '%s'\\n\", literals_file_name_p);\n    jerry_cleanup ();\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  fwrite (literal_buffer, sizeof (uint8_t), lit_buf_sz, file_p);\n  fclose (file_p);\n\n  printf (\"Literals are saved into '%s' (%zu bytes).\\n\", literals_file_name_p, lit_buf_sz);\n\n  jerry_cleanup ();\n  return JERRY_STANDALONE_EXIT_CODE_OK;\n} /* process_literal_dump */\n\n/**\n * Merge command line option IDs\n */\ntypedef enum\n{\n  OPT_MERGE_HELP,\n  OPT_MERGE_OUT,\n} merge_opt_id_t;\n\n/**\n * Merge command line options\n */\nstatic const cli_opt_t merge_opts[] =\n{\n  CLI_OPT_DEF (.id = OPT_MERGE_HELP, .opt = \"h\", .longopt = \"help\",\n               .help = \"print this help and exit\"),\n  CLI_OPT_DEF (.id = OPT_MERGE_OUT, .opt = \"o\",\n               .help = \"specify output file name (default: js.snapshot)\"),\n  CLI_OPT_DEF (.id = CLI_OPT_DEFAULT, .meta = \"FILE\",\n               .help = \"input snapshot files, minimum two\")\n};\n\n/**\n * Process 'merge' command.\n *\n * @return error code (0 - no error)\n */\nstatic int\nprocess_merge (cli_state_t *cli_state_p, /**< cli state */\n               int argc, /**< number of arguments */\n               char *prog_name_p) /**< program name */\n{\n  uint8_t *input_pos_p = input_buffer;\n\n  cli_change_opts (cli_state_p, merge_opts);\n\n  JERRY_VLA (const uint32_t *, merge_buffers, argc);\n  JERRY_VLA (size_t, merge_buffer_sizes, argc);\n  uint32_t number_of_files = 0;\n\n  for (int id = cli_consume_option (cli_state_p); id != CLI_OPT_END; id = cli_consume_option (cli_state_p))\n  {\n    switch (id)\n    {\n      case OPT_MERGE_HELP:\n      {\n        cli_help (prog_name_p, \"merge\", merge_opts);\n        return JERRY_STANDALONE_EXIT_CODE_OK;\n      }\n      case OPT_MERGE_OUT:\n      {\n        output_file_name_p = cli_consume_string (cli_state_p);\n        break;\n      }\n      case CLI_OPT_DEFAULT:\n      {\n        const char *file_name_p = cli_consume_string (cli_state_p);\n\n        if (cli_state_p->error == NULL)\n        {\n          size_t size = read_file (input_pos_p, file_name_p);\n\n          if (size == 0)\n          {\n            return JERRY_STANDALONE_EXIT_CODE_FAIL;\n          }\n\n          merge_buffers[number_of_files] = (const uint32_t *) input_pos_p;\n          merge_buffer_sizes[number_of_files] = size;\n\n          number_of_files++;\n          const uintptr_t mask = sizeof (uint32_t) - 1;\n          input_pos_p = (uint8_t *) ((((uintptr_t) input_pos_p) + size + mask) & ~mask);\n        }\n        break;\n      }\n      default:\n      {\n        cli_state_p->error = \"Internal error\";\n        break;\n      }\n    }\n  }\n\n  if (check_cli_error (cli_state_p))\n  {\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  if (number_of_files < 2)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: at least two input files must be passed.\\n\");\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n#if defined (JERRY_EXTERNAL_CONTEXT) && (JERRY_EXTERNAL_CONTEXT == 1)\n  context_init ();\n#endif /* defined (JERRY_EXTERNAL_CONTEXT) && (JERRY_EXTERNAL_CONTEXT == 1) */\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const char *error_p = NULL;\n  size_t merged_snapshot_size = jerry_merge_snapshots (merge_buffers,\n                                                       merge_buffer_sizes,\n                                                       number_of_files,\n                                                       output_buffer,\n                                                       JERRY_BUFFER_SIZE,\n                                                       &error_p);\n\n  if (merged_snapshot_size == 0)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: %s\\n\", error_p);\n    jerry_cleanup ();\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  FILE *file_p = fopen (output_file_name_p, \"wb\");\n\n  if (file_p == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: cannot open file: '%s'\\n\", output_file_name_p);\n    jerry_cleanup ();\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  fwrite (output_buffer, 1u, merged_snapshot_size, file_p);\n  fclose (file_p);\n\n  printf (\"Merge is completed. Merged snapshot is saved into '%s' (%zu bytes).\\n\",\n          output_file_name_p,\n          merged_snapshot_size);\n\n  jerry_cleanup ();\n  return JERRY_STANDALONE_EXIT_CODE_OK;\n} /* process_merge */\n\n/**\n * Command line option IDs\n */\ntypedef enum\n{\n  OPT_HELP,\n} main_opt_id_t;\n\n/**\n * Command line options\n */\nstatic const cli_opt_t main_opts[] =\n{\n  CLI_OPT_DEF (.id = OPT_HELP, .opt = \"h\", .longopt = \"help\",\n               .help = \"print this help and exit\"),\n  CLI_OPT_DEF (.id = CLI_OPT_DEFAULT, .meta = \"COMMAND\",\n               .help = \"specify the command\")\n};\n\n/**\n * Print available commands.\n */\nstatic void\nprint_commands (char *prog_name_p) /**< program name */\n{\n  cli_help (prog_name_p, NULL, main_opts);\n\n  printf (\"\\nAvailable commands:\\n\"\n          \"  generate\\n\"\n          \"  litdump\\n\"\n          \"  merge\\n\"\n          \"\\nPassing -h or --help after a command displays its help.\\n\");\n} /* print_commands */\n\n/**\n * Main function.\n *\n * @return error code (0 - no error)\n */\nint\nmain (int argc, /**< number of arguments */\n      char **argv) /**< argument list */\n{\n  cli_state_t cli_state = cli_init (main_opts, argc, argv);\n\n  for (int id = cli_consume_option (&cli_state); id != CLI_OPT_END; id = cli_consume_option (&cli_state))\n  {\n    switch (id)\n    {\n      case OPT_MERGE_HELP:\n      {\n        /* Help is always printed if no command is provided. */\n        break;\n      }\n      case CLI_OPT_DEFAULT:\n      {\n        const char *command_p = cli_consume_string (&cli_state);\n\n        if (cli_state.error != NULL)\n        {\n          break;\n        }\n\n        if (!strcmp (\"merge\", command_p))\n        {\n          return process_merge (&cli_state, argc, argv[0]);\n        }\n        else if (!strcmp (\"litdump\", command_p))\n        {\n          return process_literal_dump (&cli_state, argc, argv[0]);\n        }\n        else if (!strcmp (\"generate\", command_p))\n        {\n          return process_generate (&cli_state, argc, argv[0]);\n        }\n\n        jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: unknown command: %s\\n\\n\", command_p);\n        print_commands (argv[0]);\n\n        return JERRY_STANDALONE_EXIT_CODE_FAIL;\n      }\n      default:\n      {\n        cli_state.error = \"Internal error\";\n        break;\n      }\n    }\n  }\n\n  if (check_cli_error (&cli_state))\n  {\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  print_commands (argv[0]);\n  return JERRY_STANDALONE_EXIT_CODE_OK;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/main-unix-test.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdlib.h>\n#include <string.h>\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n\n/**\n * Maximum size of source code / snapshots buffer\n */\n#define JERRY_BUFFER_SIZE (1048576)\n\n/**\n * Standalone Jerry exit codes\n */\n#define JERRY_STANDALONE_EXIT_CODE_OK   (0)\n#define JERRY_STANDALONE_EXIT_CODE_FAIL (1)\n\nstatic uint8_t buffer[ JERRY_BUFFER_SIZE ];\n\nstatic const uint8_t *\nread_file (const char *file_name,\n           size_t *out_size_p)\n{\n  FILE *file = fopen (file_name, \"rb\");\n  if (file == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: failed to open file: %s\\n\", file_name);\n    return NULL;\n  }\n\n  size_t bytes_read = fread (buffer, 1u, sizeof (buffer), file);\n  if (!bytes_read)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: failed to read file: %s\\n\", file_name);\n    fclose (file);\n    return NULL;\n  }\n\n  fclose (file);\n\n  *out_size_p = bytes_read;\n  return (const uint8_t *) buffer;\n} /* read_file */\n\nstatic void\nprint_help (char *name)\n{\n  printf (\"Usage: %s [OPTION]... [FILE]...\\n\"\n          \"\\n\"\n          \"Options:\\n\"\n          \"  -h, --help\\n\"\n          \"\\n\",\n          name);\n} /* print_help */\n\n/* Global \"argc\" and \"argv\" used to avoid argument passing via stack. */\nstatic int argc;\nstatic char **argv;\n\nstatic JERRY_ATTR_NOINLINE int\nrun (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n  jerry_value_t ret_value = jerry_create_undefined ();\n\n  for (int i = 1; i < argc; i++)\n  {\n    const char *file_name = argv[i];\n    size_t source_size;\n\n    const jerry_char_t *source_p = read_file (file_name, &source_size);\n\n    if (source_p == NULL)\n    {\n      ret_value = jerry_create_error (JERRY_ERROR_COMMON, (jerry_char_t *) \"\");\n      break;\n    }\n    else\n    {\n      ret_value = jerry_parse (NULL, 0, source_p, source_size, JERRY_PARSE_NO_OPTS);\n\n      if (!jerry_value_is_error (ret_value))\n      {\n        jerry_value_t func_val = ret_value;\n        ret_value = jerry_run (func_val);\n        jerry_release_value (func_val);\n      }\n    }\n\n    if (jerry_value_is_error (ret_value))\n    {\n      break;\n    }\n\n    jerry_release_value (ret_value);\n    ret_value = jerry_create_undefined ();\n  }\n\n  int ret_code = !jerry_value_is_error (ret_value) ? JERRY_STANDALONE_EXIT_CODE_OK : JERRY_STANDALONE_EXIT_CODE_FAIL;\n\n  jerry_release_value (ret_value);\n  jerry_cleanup ();\n\n  return ret_code;\n} /* run */\n\n#if defined (JERRY_TEST_STACK_MEASURE) && (JERRY_TEST_STACK_MEASURE)\n\n/**\n * How this stack measuring works:\n *\n * 1) Get the current stack pointer before doing the test execution.\n *    This will be the \"Stack bottom\".\n * 2) Fill the stack towards lower addresses with a placeholder 32 bit value.\n *    A \"STACK_MEASURE_RANGE\" big area will be filled with the value starting\n *    from \"Stack bottom\".\n *    The \"Stack bottom\" + \"STACK_MEASURE_RANGE\" will be the \"Stack top\".\n * 3) Run the tests.\n * 4) Check the stack backwards from \"Stack top\" to see where the 32 bit placeholder\n *    value is not present. The point where the 32 bit value is not found is\n *    considered to be the \"Stack max\". The \"Stack bottom\" - \"Stack max\" substraction\n *    will give the stack usage in bytes.\n *\n *\n * Based on this the expected stack layout is:\n * The stack is expected to \"grow\" towards lower address.\n *\n * |-------|\n * |       |    <- low address - \"Stack top\"\n * |-------|\n * |       |\n * |-------|\n *    ....\n * |-------|\n * |       |    <- \"Stack max\"\n * |-------|\n *    ....\n * |-------|\n * |       |    <- high address - \"Stack bottom\"\n * |-------|\n *\n */\n\n#if !(defined (__linux__) && __linux__)\n#error \"Unsupported stack measurement platform!\"\n#endif /* !(defined ( __linux__) && __linux__) */\n\n#if defined (__x86_64__)\n#define STACK_SAVE(TARGET) { __asm volatile (\"mov %%rsp, %0\" : \"=m\" (TARGET)); }\n#elif defined (__i386__)\n#define STACK_SAVE(TARGET) { __asm volatile (\"mov %%esp, %0\" : \"=m\" (TARGET)); }\n#elif defined (__arm__)\n#define STACK_SAVE(TARGET) { __asm volatile (\"mov %0, sp\" : \"=r\" (TARGET)); }\n#else /* !defined (__x86_64__) && !defined (__i386__) && !defined (__arm__) */\n#error \"Unsupported stack measurement target!\"\n#endif /* !defined (__x86_64__) && !defined (__i386__) && !defined (__arm__) */\n\nstatic void *g_stack_bottom = 0x0;\n\n#define STACK_MEASURE_RANGE ((2 * 1024 * 1024))\n#define STACK_PATTERN (0xDEADBEEF)\n#define STACK_INIT(TARGET, SIZE) do                               \\\n  {                                                               \\\n    for (size_t idx = 0; idx < (SIZE / sizeof (uint32_t)); idx++) \\\n    {                                                             \\\n      ((uint32_t*)(TARGET))[idx] = STACK_PATTERN;                 \\\n    }                                                             \\\n  } while (0)\n\n#define STACK_USAGE(TARGET, SIZE) stack_usage (TARGET, SIZE)\n#define STACK_TOP_PTR(TARGET, SIZE) (uint32_t *) (((uint8_t *) TARGET) - SIZE)\n\nstatic void\nstack_usage (uint32_t *stack_top_p, size_t length_in_bytes)\n{\n  uint32_t *stack_bottom_p = stack_top_p + (length_in_bytes / sizeof (uint32_t));\n  uint32_t *stack_p = stack_top_p;\n\n  while (stack_p < stack_bottom_p)\n  {\n    if (*stack_p != STACK_PATTERN)\n    {\n      break;\n    }\n    stack_p++;\n  }\n\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Used stack: %d\\n\", (int) ((uint8_t *) stack_bottom_p - (uint8_t *) stack_p));\n} /* stack_usage */\n\n#else /* (JERRY_TEST_STACK_MEASURE) && (JERRY_TEST_STACK_MEASURE) */\n#define STACK_SAVE(TARGET)\n#define STACK_INIT(TARGET, SIZE)\n#define STACK_USAGE(TARGET, SIZE)\n#endif /* #if defined (JERRY_TEST_STACK_MEASURE) && (JERRY_TEST_STACK_MEASURE) */\n\nint main (int main_argc,\n          char **main_argv)\n{\n  union\n  {\n    double d;\n    unsigned u;\n  } now = { .d = jerry_port_get_current_time () };\n  srand (now.u);\n\n  argc = main_argc;\n  argv = main_argv;\n\n  if (argc <= 1 || (argc == 2 && (!strcmp (\"-h\", argv[1]) || !strcmp (\"--help\", argv[1]))))\n  {\n    print_help (argv[0]);\n    return JERRY_STANDALONE_EXIT_CODE_OK;\n  }\n\n  STACK_SAVE (g_stack_bottom);\n  STACK_INIT (STACK_TOP_PTR (g_stack_bottom, STACK_MEASURE_RANGE), STACK_MEASURE_RANGE);\n\n  int result = run ();\n\n  STACK_USAGE (STACK_TOP_PTR (g_stack_bottom, STACK_MEASURE_RANGE), STACK_MEASURE_RANGE);\n\n  if (result == JERRY_STANDALONE_EXIT_CODE_FAIL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Unhandled exception: Script Error!\\n\");\n  }\n\n  return result;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/main-unix.c",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"jerryscript.h\"\n\ntypedef struct\n{\n\tchar* data_p;\n\tunsigned int length;\n} buffer_native_object_t;\n\ntypedef struct\n{\n\tint area;\n\tint perimeter;\n} shape_native_object_t;\n\n#define SECRET_INFO ((void *) 42)\n\nstatic void\nbuffer_native_freecb(void* native_p,\n\t\t\t\t\t jerry_object_native_info_t* info_p)\n{\n\t(void)info_p;\n\n\tchar* data_p = ((buffer_native_object_t*)native_p)->data_p;\n\n\tif (data_p != NULL)\n\t{\n\t\tfree(data_p);\n\t}\n\n\tfree(native_p);\n}\n\nstatic void\nshape_native_freecb(void* native_p,\n\t\t\t\t\tjerry_object_native_info_t* info_p)\n{\n\t(void)info_p;\n\n\tfree(native_p);\n}\n\nstatic void\ndestructor_freecb(void* native_p,\n\t\t\t\t  jerry_object_native_info_t* info_p)\n{\n\t(void)native_p;\n\t(void)info_p;\n\n\tprintf(\"Note: the object has been freed\\n\");\n}\n\n// NOTE: The address (!) of type_info acts as a way to uniquely \"identify\" the\n// C type `buffer_native_object_t *`.\nstatic const jerry_object_native_info_t buffer_obj_type_info =\n{\n  .free_cb = buffer_native_freecb\n};\n\n// NOTE: The address (!) of type_info acts as a way to uniquely \"identify\" the\n// C type `shape_native_object_t *`.\nstatic const jerry_object_native_info_t shape_obj_type_info =\n{\n  .free_cb = shape_native_freecb\n};\n\n// NOTE: The address (!) of type_info is the unique \"identifier\"\nstatic const jerry_object_native_info_t destructor_obj_type_info =\n{\n  .free_cb = destructor_freecb\n};\n\nstatic void\nprint_buffer(char* data_p,\n\t\t\t unsigned int length)\n{\n\tfor (unsigned int i = 0; i < length; ++i)\n\t{\n\t\tprintf(\"%c\", data_p[i]);\n\t}\n\n\tprintf(\"\\n\");\n}\n\nstatic void\ndo_stuff(jerry_value_t object)\n{\n\tvoid* native_p;\n\tbool has_p = jerry_get_object_native_pointer(object, &native_p, &buffer_obj_type_info);\n\n\tif (!has_p)\n\t{\n\t\t// Process the error\n\t\treturn;\n\t}\n\n\t// It is safe to cast to buffer_native_object_t * and dereference the pointer:\n\tbuffer_native_object_t* buffer_p = (buffer_native_object_t*)native_p;\n\tprint_buffer(buffer_p->data_p, buffer_p->length); // Usage of buffer_p\n\n\tbool need_shape_info = true; // implementation dependent\n\n\tif (need_shape_info)\n\t{\n\t\thas_p = jerry_get_object_native_pointer(object, &native_p, &shape_obj_type_info);\n\n\t\tif (!has_p)\n\t\t{\n\t\t\t// Process the error\n\t\t\treturn;\n\t\t}\n\n\t\t// It is safe to cast to shape_native_object_t * and dereference the pointer:\n\t\tshape_native_object_t* shape_p = (shape_native_object_t*)native_p;\n\n\t\tprintf(\"Area: %d\\tPerimeter: %d\\n\", shape_p->area, shape_p->perimeter); // Usage of shape_p\n\t}\n\n\tbool need_secret_info = true; // implementation dependent\n\n\tif (need_secret_info)\n\t{\n\t\thas_p = jerry_get_object_native_pointer(object, &native_p, NULL);\n\n\t\tif (!has_p)\n\t\t{\n\t\t\t// Process the error\n\t\t\treturn;\n\t\t}\n\n\t\tprintf(\"Secret: %d\\n\", (int)((uintptr_t)native_p)); // Usage of native_p\n\n\t\tbool deleted = jerry_delete_object_native_pointer(object, NULL);\n\n\t\tif (deleted)\n\t\t{\n\t\t\tprintf(\"The secret is no longer available\\n\");\n\t\t}\n\t}\n}\n\nint\nmain(void)\n{\n\tjerry_init(JERRY_INIT_EMPTY);\n\n\tjerry_value_t object = jerry_create_object();\n\tbuffer_native_object_t* buffer_p = (buffer_native_object_t*)malloc(sizeof(buffer_native_object_t));\n\tbuffer_p->length = 14;\n\tbuffer_p->data_p = (char*)malloc(buffer_p->length * sizeof(char));\n\tmemcpy(buffer_p->data_p, \"My buffer data\", buffer_p->length);\n\tjerry_set_object_native_pointer(object, buffer_p, &buffer_obj_type_info);\n\n\tshape_native_object_t* shape_p = (shape_native_object_t*)malloc(sizeof(shape_native_object_t));\n\tshape_p->area = 6;\n\tshape_p->perimeter = 12;\n\tjerry_set_object_native_pointer(object, shape_p, &shape_obj_type_info);\n\n\t// The native pointer can be NULL. This gives possibly to get notified via the native type info's\n\t// free callback when the object has been freed by the GC.\n\tjerry_set_object_native_pointer(object, NULL, &destructor_obj_type_info);\n\n\t// The native type info can be NULL as well. In this case the registered property is simply freed\n\t// when the object is freed by the GC.\n\tjerry_set_object_native_pointer(object, SECRET_INFO, NULL);\n\n\tdo_stuff(object);\n\n\tjerry_release_value(object);\n\tjerry_cleanup();\n\n\treturn 0;\n}"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/main-utils.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <assert.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/debugger.h\"\n#include \"jerryscript-ext/handler.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n#include \"main-utils.h\"\n#include \"main-options.h\"\n\n/**\n * Max line size that will be printed on a Syntax Error\n */\n#define SYNTAX_ERROR_MAX_LINE_LENGTH 256\n\n/**\n * Register a JavaScript function in the global object.\n */\nstatic void\nmain_register_global_function (const char *name_p, /**< name of the function */\n                               jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t result_val = jerryx_handler_register_global ((const jerry_char_t *) name_p, handler_p);\n  assert (!jerry_value_is_error (result_val));\n  jerry_release_value (result_val);\n} /* main_register_global_function */\n\nstatic jerry_value_t\nmain_create_realm (const jerry_value_t func_obj_val, /**< function object */\n                   const jerry_value_t this_p, /**< this arg */\n                   const jerry_value_t args_p[], /**< function arguments */\n                   const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  (void) func_obj_val; /* unused */\n  (void) this_p; /* unused */\n  (void) args_p; /* unused */\n  (void) args_cnt; /* unused */\n  return jerry_create_realm ();\n} /* main_create_realm */\n\n/**\n * Register a method for the $262 object.\n */\nstatic void\ntest262_register_function (jerry_value_t test262_obj, /** $262 object */\n                           const char *name_p, /**< name of the function */\n                           jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t function_name_val = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t function_val = jerry_create_external_function (handler_p);\n\n  jerry_value_t result_val = jerry_set_property (test262_obj, function_name_val, function_val);\n\n  jerry_release_value (function_val);\n  jerry_release_value (function_name_val);\n\n  assert (!jerry_value_is_error (result_val));\n  jerry_release_value (result_val);\n} /* test262_register_function */\n\n/**\n * $262.detachArrayBuffer\n *\n * A function which implements the DetachArrayBuffer abstract operation\n *\n * @return null value - if success\n *         value marked with error flag - otherwise\n */\nstatic jerry_value_t\ntest262_detach_array_buffer (const jerry_value_t func_obj_val, /**< function object */\n                             const jerry_value_t this_p, /**< this arg */\n                             const jerry_value_t args_p[], /**< function arguments */\n                             const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  (void) func_obj_val; /* unused */\n  (void) this_p; /* unused */\n\n  if (args_cnt < 1 || !jerry_value_is_arraybuffer (args_p[0]))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) \"Expected an ArrayBuffer object\");\n  }\n\n  /* TODO: support the optional 'key' argument */\n\n  return jerry_detach_arraybuffer (args_p[0]);\n} /* test262_detach_array_buffer */\n\n/**\n * $262.evalScript\n *\n * A function which accepts a string value as its first argument and executes it\n *\n * @return completion of the script parsing and execution.\n */\nstatic jerry_value_t\ntest262_eval_script (const jerry_value_t func_obj_val, /**< function object */\n                     const jerry_value_t this_p, /**< this arg */\n                     const jerry_value_t args_p[], /**< function arguments */\n                     const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  (void) func_obj_val; /* unused */\n  (void) this_p; /* unused */\n\n  if (args_cnt < 1 || !jerry_value_is_string (args_p[0]))\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) \"Expected a string\");\n  }\n\n  jerry_size_t str_size = jerry_get_utf8_string_size (args_p[0]);\n  jerry_char_t *str_buf_p = malloc (str_size * sizeof (jerry_char_t));\n\n  if (str_buf_p == NULL || jerry_string_to_utf8_char_buffer (args_p[0], str_buf_p, str_size) != str_size)\n  {\n    free (str_buf_p);\n    return jerry_create_error (JERRY_ERROR_RANGE, (jerry_char_t *) \"Internal error\");\n  }\n\n  jerry_value_t ret_value = jerry_parse (NULL, 0, str_buf_p, str_size, JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (ret_value))\n  {\n    jerry_value_t func_val = ret_value;\n    ret_value = jerry_run (func_val);\n    jerry_release_value (func_val);\n  }\n\n  free (str_buf_p);\n\n  return ret_value;\n} /* test262_eval_script */\n\nstatic jerry_value_t\ncreate_test262 (jerry_value_t global_obj);\n\n/**\n * $262.createRealm\n *\n * A function which creates a new realm object, and returns a newly created $262 object\n *\n * @return a new $262 object\n */\nstatic jerry_value_t\ntest262_create_realm (const jerry_value_t func_obj_val, /**< function object */\n                      const jerry_value_t this_p, /**< this arg */\n                      const jerry_value_t args_p[], /**< function arguments */\n                      const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  (void) func_obj_val; /* unused */\n  (void) this_p; /* unused */\n  (void) args_p; /* unused */\n  (void) args_cnt; /* unused */\n\n  jerry_value_t realm_object = jerry_create_realm ();\n  jerry_value_t previous_realm = jerry_set_realm (realm_object);\n  assert (!jerry_value_is_error (previous_realm));\n  jerry_value_t test262_object = create_test262 (realm_object);\n  jerry_set_realm (previous_realm);\n  jerry_release_value (realm_object);\n\n  return test262_object;\n} /* test262_create_realm */\n\n/**\n * Create a new $262 object\n *\n * @return a new $262 object\n */\nstatic jerry_value_t\ncreate_test262 (jerry_value_t global_obj) /**< global object */\n{\n  jerry_value_t test262_object = jerry_create_object ();\n\n  test262_register_function (test262_object, \"detachArrayBuffer\", test262_detach_array_buffer);\n  test262_register_function (test262_object, \"evalScript\", test262_eval_script);\n  test262_register_function (test262_object, \"createRealm\", test262_create_realm);\n  test262_register_function (test262_object, \"gc\", jerryx_handler_gc);\n\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"global\");\n  jerry_value_t result = jerry_set_property (test262_object, prop_name, global_obj);\n  assert (!jerry_value_is_error (result));\n  jerry_release_value (prop_name);\n  jerry_release_value (result);\n  prop_name = jerry_create_string ((const jerry_char_t *) \"$262\");\n  result = jerry_set_property (global_obj, prop_name, test262_object);\n\n  jerry_release_value (prop_name);\n  assert (!jerry_value_is_error (result));\n  jerry_release_value (result);\n\n  return test262_object;\n} /* create_test262 */\n\n/**\n * Inits the engine and the debugger\n */\nvoid\nmain_init_engine (main_args_t *arguments_p) /**< main arguments */\n{\n  jerry_init (arguments_p->init_flags);\n\n  if (arguments_p->option_flags & OPT_FLAG_DEBUG_SERVER)\n  {\n    bool protocol = false;\n\n    if (!strcmp (arguments_p->debug_protocol, \"tcp\"))\n    {\n      protocol = jerryx_debugger_tcp_create (arguments_p->debug_port);\n    }\n    else\n    {\n      assert (!strcmp (arguments_p->debug_protocol, \"serial\"));\n      protocol = jerryx_debugger_serial_create (arguments_p->debug_serial_config);\n    }\n\n    if (!strcmp (arguments_p->debug_channel, \"rawpacket\"))\n    {\n      jerryx_debugger_after_connect (protocol && jerryx_debugger_rp_create ());\n    }\n    else\n    {\n      assert (!strcmp (arguments_p->debug_channel, \"websocket\"));\n      jerryx_debugger_after_connect (protocol && jerryx_debugger_ws_create ());\n    }\n  }\n  if (arguments_p->option_flags & OPT_FLAG_TEST262_OBJECT)\n  {\n    jerry_value_t global_obj = jerry_get_global_object ();\n    jerry_value_t test262_object = create_test262 (global_obj);\n    jerry_release_value (test262_object);\n    jerry_release_value (global_obj);\n  }\n  main_register_global_function (\"assert\", jerryx_handler_assert);\n  main_register_global_function (\"gc\", jerryx_handler_gc);\n  main_register_global_function (\"print\", jerryx_handler_print);\n  main_register_global_function (\"resourceName\", jerryx_handler_resource_name);\n  main_register_global_function (\"createRealm\", main_create_realm);\n} /* main_init_engine */\n\n/**\n * Print an error value.\n *\n * Note: the error value will be released.\n */\nvoid\nmain_print_unhandled_exception (jerry_value_t error_value) /**< error value */\n{\n  assert (jerry_value_is_error (error_value));\n  error_value = jerry_get_value_from_error (error_value, true);\n\n  jerry_char_t err_str_buf[256];\n\n  jerry_value_t err_str_val = jerry_value_to_string (error_value);\n  jerry_size_t err_str_size = jerry_get_utf8_string_size (err_str_val);\n\n  if (err_str_size >= 256)\n  {\n    const char msg[] = \"[Error message too long]\";\n    err_str_size = sizeof (msg) / sizeof (char) - 1;\n    memcpy (err_str_buf, msg, err_str_size + 1);\n  }\n  else\n  {\n    jerry_size_t string_end = jerry_string_to_utf8_char_buffer (err_str_val, err_str_buf, err_str_size);\n    assert (string_end == err_str_size);\n    err_str_buf[string_end] = 0;\n\n    if (jerry_is_feature_enabled (JERRY_FEATURE_ERROR_MESSAGES)\n        && jerry_get_error_type (error_value) == JERRY_ERROR_SYNTAX)\n    {\n      jerry_char_t *string_end_p = err_str_buf + string_end;\n      unsigned int err_line = 0;\n      unsigned int err_col = 0;\n      char *path_str_p = NULL;\n      char *path_str_end_p = NULL;\n\n      /* 1. parse column and line information */\n      for (jerry_char_t *current_p = err_str_buf; current_p < string_end_p; current_p++)\n      {\n        if (*current_p == '[')\n        {\n          current_p++;\n\n          if (*current_p == '<')\n          {\n            break;\n          }\n\n          path_str_p = (char *) current_p;\n          while (current_p < string_end_p && *current_p != ':')\n          {\n            current_p++;\n          }\n\n          path_str_end_p = (char *) current_p++;\n\n          err_line = (unsigned int) strtol ((char *) current_p, (char **) &current_p, 10);\n\n          current_p++;\n\n          err_col = (unsigned int) strtol ((char *) current_p, NULL, 10);\n          break;\n        }\n      } /* for */\n\n      if (err_line != 0 && err_col > 0 && err_col < SYNTAX_ERROR_MAX_LINE_LENGTH)\n      {\n        /* Temporarily modify the error message, so we can use the path. */\n        *path_str_end_p = '\\0';\n\n        size_t source_size;\n        uint8_t *source_p = jerry_port_read_source (path_str_p, &source_size);\n\n        /* Revert the error message. */\n        *path_str_end_p = ':';\n\n        if (source_p != NULL)\n        {\n          uint32_t curr_line = 1;\n          uint32_t pos = 0;\n\n          /* 2. seek and print */\n          while (pos < source_size && curr_line < err_line)\n          {\n            if (source_p[pos] == '\\n')\n            {\n              curr_line++;\n            }\n\n            pos++;\n          }\n\n          /* Print character if:\n          * - The max line length is not reached.\n          * - The current position is valid (it is not the end of the source).\n          * - The current character is not a newline.\n          **/\n          for (uint32_t char_count = 0;\n              (char_count < SYNTAX_ERROR_MAX_LINE_LENGTH) && (pos < source_size) && (source_p[pos] != '\\n');\n              char_count++, pos++)\n          {\n            jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"%c\", source_p[pos]);\n          }\n          jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"\\n\");\n\n          jerry_port_release_source (source_p);\n\n          while (--err_col)\n          {\n            jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"~\");\n          }\n\n          jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"^\\n\\n\");\n        }\n      }\n    }\n  }\n\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"%s\\n\", err_str_buf);\n  jerry_release_value (err_str_val);\n\n  if (jerry_value_is_object (error_value))\n  {\n    jerry_value_t stack_str = jerry_create_string ((const jerry_char_t *) \"stack\");\n    jerry_value_t backtrace_val = jerry_get_property (error_value, stack_str);\n    jerry_release_value (stack_str);\n\n    if (jerry_value_is_array (backtrace_val))\n    {\n      uint32_t length = jerry_get_array_length (backtrace_val);\n\n      /* This length should be enough. */\n      if (length > 32)\n      {\n        length = 32;\n      }\n\n      for (uint32_t i = 0; i < length; i++)\n      {\n        jerry_value_t item_val = jerry_get_property_by_index (backtrace_val, i);\n\n        if (jerry_value_is_string (item_val))\n        {\n          jerry_size_t str_size = jerry_get_utf8_string_size (item_val);\n\n          if (str_size >= 256)\n          {\n            printf (\"%6u: [Backtrace string too long]\\n\", i);\n          }\n          else\n          {\n            jerry_size_t string_end = jerry_string_to_utf8_char_buffer (item_val, err_str_buf, str_size);\n            assert (string_end == str_size);\n            err_str_buf[string_end] = 0;\n\n            printf (\"%6u: %s\\n\", i, err_str_buf);\n          }\n        }\n\n        jerry_release_value (item_val);\n      }\n    }\n\n    jerry_release_value (backtrace_val);\n  }\n\n  jerry_release_value (error_value);\n} /* main_print_unhandled_exception */\n\n/**\n * Runs the source code received by jerry_debugger_wait_for_client_source.\n *\n * @return result fo the source code execution\n */\njerry_value_t\nmain_wait_for_source_callback (const jerry_char_t *resource_name_p, /**< resource name */\n                               size_t resource_name_size, /**< size of resource name */\n                               const jerry_char_t *source_p, /**< source code */\n                               size_t source_size, /**< source code size */\n                               void *user_p) /**< user pointer */\n{\n  (void) user_p; /* unused */\n  jerry_value_t ret_val = jerry_parse (resource_name_p,\n                                       resource_name_size,\n                                       source_p,\n                                       source_size,\n                                       JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (ret_val))\n  {\n    jerry_value_t func_val = ret_val;\n    ret_val = jerry_run (func_val);\n    jerry_release_value (func_val);\n  }\n\n  return ret_val;\n} /* main_wait_for_source_callback */\n\n/**\n * Check that value contains the reset abort value.\n *\n * Note: if the value is the reset abort value, the value is release.\n *\n * return true, if reset abort\n *        false, otherwise\n */\nbool\nmain_is_value_reset (jerry_value_t value) /**< jerry value */\n{\n  if (!jerry_value_is_abort (value))\n  {\n    return false;\n  }\n\n  jerry_value_t abort_value = jerry_get_value_from_error (value, false);\n\n  if (!jerry_value_is_string (abort_value))\n  {\n    jerry_release_value (abort_value);\n    return false;\n  }\n\n  static const char restart_str[] = \"r353t\";\n\n  jerry_size_t str_size = jerry_get_string_size (abort_value);\n  bool is_reset = false;\n\n  if (str_size == sizeof (restart_str) - 1)\n  {\n    JERRY_VLA (jerry_char_t, str_buf, str_size);\n    jerry_string_to_char_buffer (abort_value, str_buf, str_size);\n\n    is_reset = memcmp (restart_str, (char *) (str_buf), str_size) == 0;\n\n    if (is_reset)\n    {\n      jerry_release_value (value);\n    }\n  }\n\n  jerry_release_value (abort_value);\n  return is_reset;\n} /* main_is_value_reset */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-main/main-utils.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef MAIN_UTILS_H\n#define MAIN_UTILS_H\n\n#include \"main-options.h\"\n\n/**\n * Standalone Jerry exit codes\n */\n#define JERRY_STANDALONE_EXIT_CODE_OK   (0)\n#define JERRY_STANDALONE_EXIT_CODE_FAIL (1)\n\nvoid\nmain_init_engine (main_args_t *arguments_p);\nvoid\nmain_print_unhandled_exception (jerry_value_t error_value);\n\njerry_value_t\nmain_wait_for_source_callback (const jerry_char_t *resource_name_p,\n                               size_t resource_name_size,\n                               const jerry_char_t *source_p,\n                               size_t source_size,\n                               void *user_p);\n\nbool\nmain_is_value_reset (jerry_value_t value);\n\n#endif /* !MAIN_UTILS_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nset(JERRY_MATH_NAME jerry-math)\nproject (${JERRY_MATH_NAME} C)\n\n# Compiler / linker flags\n# TODO: Reduce the below list of warning/error disablings as much as possible\nset(COMPILE_FLAGS_MATH \"${COMPILE_FLAGS_MATH} -Wno-error=sign-compare\")\nset(COMPILE_FLAGS_MATH \"${COMPILE_FLAGS_MATH} -Wno-error=sign-conversion\")\nset(COMPILE_FLAGS_MATH \"${COMPILE_FLAGS_MATH} -Wno-sign-conversion\")\nset(COMPILE_FLAGS_MATH \"${COMPILE_FLAGS_MATH} -Wno-sign-compare\")\nset(COMPILE_FLAGS_MATH \"${COMPILE_FLAGS_MATH} -Wno-strict-aliasing\")\n\n# Include directories\nset(INCLUDE_MATH \"${CMAKE_CURRENT_SOURCE_DIR}/include\")\n\n# Source directories\nset(SOURCE_MATH\n  acos.c\n  acosh.c\n  asin.c\n  asinh.c\n  atan.c\n  atan2.c\n  atanh.c\n  cbrt.c\n  ceil.c\n  copysign.c\n  cosh.c\n  exp.c\n  expm1.c\n  fabs.c\n  floor.c\n  fmod.c\n  log.c\n  log10.c\n  log1p.c\n  log2.c\n  nextafter.c\n  pow.c\n  scalbn.c\n  sinh.c\n  sqrt.c\n  tanh.c\n  trig.c\n)\n\n# Amalgamated JerryScript source/header build.\n#  The process will create the following files:\n#   * jerryscript-math.c\n#   * math.h\nif(ENABLE_AMALGAM)\n  set(HEADER_MATH\n    include/math.h\n    jerry-math-internal.h\n  )\n  set(AMALGAM_MATH_C \"${CMAKE_BINARY_DIR}/amalgam/jerryscript-math.c\")\n  set(AMALGAM_MATH_H \"${CMAKE_BINARY_DIR}/amalgam/math.h\")\n\n  add_custom_command(OUTPUT ${AMALGAM_MATH_C} ${AMALGAM_MATH_H}\n                     COMMAND python ${CMAKE_SOURCE_DIR}/tools/amalgam.py\n                             --jerry-math\n                             --output-dir ${CMAKE_BINARY_DIR}/amalgam\n                     DEPENDS ${SOURCE_MATH}\n                             ${HEADER_MATH}\n                             ${CMAKE_SOURCE_DIR}/tools/amalgam.py\n  )\n  add_custom_target(amalgam-math DEPENDS ${AMALGAM_MATH_C} ${AMALGAM_MATH_H})\n  add_dependencies(amalgam amalgam-math)\n\n  set(SOURCE_MATH ${AMALGAM_MATH_C} ${AMALGAM_MATH_H})\nendif()\n\nadd_library(${JERRY_MATH_NAME} ${SOURCE_MATH})\nset_property(TARGET ${JERRY_MATH_NAME}\n             PROPERTY COMPILE_FLAGS \"${COMPILE_FLAGS_MATH}\")\n\ntarget_include_directories(${JERRY_MATH_NAME} PUBLIC ${INCLUDE_MATH})\n\nconfigure_file(libjerry-math.pc.in libjerry-math.pc @ONLY)\n\ninstall(TARGETS ${JERRY_MATH_NAME} DESTINATION lib)\ninstall(FILES ${CMAKE_CURRENT_BINARY_DIR}/libjerry-math.pc DESTINATION lib/pkgconfig)\ninstall(DIRECTORY ${INCLUDE_MATH}/ DESTINATION include/jerryscript-math)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/acos.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_acos.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* acos(x)\n *\n * Method:\n *      acos(x)  = pi/2 - asin(x)\n *      acos(-x) = pi/2 + asin(x)\n * For |x|<=0.5\n *      acos(x) = pi/2 - (x + x*x^2*R(x^2))     (see asin.c)\n * For x>0.5\n *      acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2)))\n *              = 2asin(sqrt((1-x)/2))\n *              = 2s + 2s*z*R(z)        ...z=(1-x)/2, s=sqrt(z)\n *              = 2f + (2c + 2s*z*R(z))\n *     where f=hi part of s, and c = (z-f*f)/(s+f) is the correction term\n *     for f so that f+c ~ sqrt(z).\n * For x<-0.5\n *      acos(x) = pi - 2asin(sqrt((1-|x|)/2))\n *              = pi - 0.5*(s+s*z*R(z)), where z=(1-|x|)/2,s=sqrt(z)\n *\n * Special cases:\n *      if x is NaN, return x itself;\n *      if |x|>1, return NaN with invalid signal.\n *\n * Function needed: sqrt\n */\n\n#define one      1.00000000000000000000e+00 /* 0x3FF00000, 0x00000000 */\n#define pi       3.14159265358979311600e+00 /* 0x400921FB, 0x54442D18 */\n#define pio2_hi  1.57079632679489655800e+00 /* 0x3FF921FB, 0x54442D18 */\n#define pio2_lo  6.12323399573676603587e-17 /* 0x3C91A626, 0x33145C07 */\n#define pS0      1.66666666666666657415e-01 /* 0x3FC55555, 0x55555555 */\n#define pS1     -3.25565818622400915405e-01 /* 0xBFD4D612, 0x03EB6F7D */\n#define pS2      2.01212532134862925881e-01 /* 0x3FC9C155, 0x0E884455 */\n#define pS3     -4.00555345006794114027e-02 /* 0xBFA48228, 0xB5688F3B */\n#define pS4      7.91534994289814532176e-04 /* 0x3F49EFE0, 0x7501B288 */\n#define pS5      3.47933107596021167570e-05 /* 0x3F023DE1, 0x0DFDF709 */\n#define qS1     -2.40339491173441421878e+00 /* 0xC0033A27, 0x1C8A2D4B */\n#define qS2      2.02094576023350569471e+00 /* 0x40002AE5, 0x9C598AC8 */\n#define qS3     -6.88283971605453293030e-01 /* 0xBFE6066C, 0x1B8D0159 */\n#define qS4      7.70381505559019352791e-02 /* 0x3FB3B8C5, 0xB12E9282 */\n\ndouble\nacos (double x)\n{\n  double z, p, q, r, w, s, c;\n  int hx, ix;\n\n  hx = __HI (x);\n  ix = hx & 0x7fffffff;\n  if (ix >= 0x3ff00000) /* |x| >= 1 */\n  {\n    if (((ix - 0x3ff00000) | __LO (x)) == 0) /* |x| == 1 */\n    {\n      if (hx > 0) /* acos(1) = 0  */\n      {\n        return 0.0;\n      }\n      else /* acos(-1) = pi */\n      {\n        return pi + 2.0 * pio2_lo;\n      }\n    }\n    return NAN; /* acos(|x|>1) is NaN */\n  }\n  if (ix < 0x3fe00000) /* |x| < 0.5 */\n  {\n    if (ix <= 0x3c600000) /* if |x| < 2**-57 */\n    {\n      return pio2_hi + pio2_lo;\n    }\n    z = x * x;\n    p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5)))));\n    q = one + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4)));\n    r = p / q;\n    return pio2_hi - (x - (pio2_lo - x * r));\n  }\n  else if (hx < 0) /* x < -0.5 */\n  {\n    z = (one + x) * 0.5;\n    p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5)))));\n    q = one + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4)));\n    s = sqrt (z);\n    r = p / q;\n    w = r * s - pio2_lo;\n    return pi - 2.0 * (s + w);\n  }\n  else /* x > 0.5 */\n  {\n    double_accessor df;\n    z = (one - x) * 0.5;\n    s = sqrt (z);\n    df.dbl = s;\n    df.as_int.lo = 0;\n    c = (z - df.dbl * df.dbl) / (s + df.dbl);\n    p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5)))));\n    q = one + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4)));\n    r = p / q;\n    w = r * s + c;\n    return 2.0 * (df.dbl + w);\n  }\n} /* acos */\n\n#undef one\n#undef pi\n#undef pio2_hi\n#undef pio2_lo\n#undef pS0\n#undef pS1\n#undef pS2\n#undef pS3\n#undef pS4\n#undef pS5\n#undef qS1\n#undef qS2\n#undef qS3\n#undef qS4\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/acosh.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_acosh.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* acosh(x)\n * Method :\n *  Based on\n *    acosh(x) = log [ x + sqrt(x * x - 1) ]\n *  we have\n *    acosh(x) := log(x) + ln2, if x is large; else\n *    acosh(x) := log(2x - 1 / (sqrt(x * x - 1) + x)), if x > 2; else\n *    acosh(x) := log1p(t + sqrt(2.0 * t + t * t)); where t = x - 1.\n *\n * Special cases:\n *  acosh(x) is NaN with signal if x < 1.\n *  acosh(NaN) is NaN without signal.\n */\n\n#define one 1.0\n#define ln2 6.93147180559945286227e-01 /* 0x3FE62E42, 0xFEFA39EF */\n\ndouble\nacosh (double x)\n{\n  double t;\n  int hx;\n  hx = __HI (x);\n  if (hx < 0x3ff00000)\n  {\n    /* x < 1 */\n    return NAN;\n  }\n  else if (hx >= 0x41b00000)\n  {\n    /* x > 2**28 */\n    if (hx >= 0x7ff00000)\n    {\n      /* x is inf of NaN */\n      return x + x;\n    }\n    else\n    {\n      /* acosh(huge) = log(2x) */\n      return log (x) + ln2;\n    }\n  }\n  else if (((hx - 0x3ff00000) | __LO (x)) == 0)\n  {\n    /* acosh(1) = 0 */\n    return 0.0;\n  }\n  else if (hx > 0x40000000)\n  {\n    /* 2**28 > x > 2 */\n    t = x * x;\n    return log (2.0 * x - one / (x + sqrt (t - one)));\n  }\n  else\n  {\n    /* 1 < x < 2 */\n    t = x - one;\n    return log1p (t + sqrt (2.0 * t + t * t));\n  }\n} /* acosh */\n\n#undef one\n#undef ln2\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/asin.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_asin.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* asin(x)\n *\n * Method:\n *      Since  asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...\n *      we approximate asin(x) on [0,0.5] by\n *              asin(x) = x + x*x^2*R(x^2)\n *      where\n *              R(x^2) is a rational approximation of (asin(x)-x)/x^3\n *      and its remez error is bounded by\n *              |(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75)\n *\n *      For x in [0.5,1]\n *              asin(x) = pi/2-2*asin(sqrt((1-x)/2))\n *      Let y = (1-x), z = y/2, s := sqrt(z), and pio2_hi+pio2_lo=pi/2;\n *      then for x>0.98\n *              asin(x) = pi/2 - 2*(s+s*z*R(z))\n *                      = pio2_hi - (2*(s+s*z*R(z)) - pio2_lo)\n *      For x<=0.98, let pio4_hi = pio2_hi/2, then\n *              f = hi part of s;\n *              c = sqrt(z) - f = (z-f*f)/(s+f)         ...f+c=sqrt(z)\n *      and\n *              asin(x) = pi/2 - 2*(s+s*z*R(z))\n *                      = pio4_hi+(pio4-2s)-(2s*z*R(z)-pio2_lo)\n *                      = pio4_hi+(pio4-2f)-(2s*z*R(z)-(pio2_lo+2c))\n *\n * Special cases:\n *      if x is NaN, return x itself;\n *      if |x|>1, return NaN with invalid signal.\n */\n\n#define one      1.00000000000000000000e+00 /* 0x3FF00000, 0x00000000 */\n#define huge     1.000e+300\n#define pio2_hi  1.57079632679489655800e+00 /* 0x3FF921FB, 0x54442D18 */\n#define pio2_lo  6.12323399573676603587e-17 /* 0x3C91A626, 0x33145C07 */\n#define pio4_hi  7.85398163397448278999e-01 /* 0x3FE921FB, 0x54442D18 */\n/* coefficient for R(x^2) */\n#define pS0      1.66666666666666657415e-01 /* 0x3FC55555, 0x55555555 */\n#define pS1     -3.25565818622400915405e-01 /* 0xBFD4D612, 0x03EB6F7D */\n#define pS2      2.01212532134862925881e-01 /* 0x3FC9C155, 0x0E884455 */\n#define pS3     -4.00555345006794114027e-02 /* 0xBFA48228, 0xB5688F3B */\n#define pS4      7.91534994289814532176e-04 /* 0x3F49EFE0, 0x7501B288 */\n#define pS5      3.47933107596021167570e-05 /* 0x3F023DE1, 0x0DFDF709 */\n#define qS1     -2.40339491173441421878e+00 /* 0xC0033A27, 0x1C8A2D4B */\n#define qS2      2.02094576023350569471e+00 /* 0x40002AE5, 0x9C598AC8 */\n#define qS3     -6.88283971605453293030e-01 /* 0xBFE6066C, 0x1B8D0159 */\n#define qS4      7.70381505559019352791e-02 /* 0x3FB3B8C5, 0xB12E9282 */\n\ndouble\nasin (double x)\n{\n  double t, p, q, c, r, s;\n  double_accessor w;\n  int hx, ix;\n\n  hx = __HI (x);\n  ix = hx & 0x7fffffff;\n  if (ix >= 0x3ff00000) /* |x| >= 1 */\n  {\n    if (((ix - 0x3ff00000) | __LO (x)) == 0) /* asin(1) = +-pi/2 with inexact */\n    {\n      return x * pio2_hi + x * pio2_lo;\n    }\n    return NAN; /* asin(|x|>1) is NaN */\n  }\n  else if (ix < 0x3fe00000) /* |x| < 0.5 */\n  {\n    if (ix < 0x3e400000) /* if |x| < 2**-27 */\n    {\n      if (huge + x > one) /* return x with inexact if x != 0 */\n      {\n        return x;\n      }\n    }\n    t = x * x;\n    p = t * (pS0 + t * (pS1 + t * (pS2 + t * (pS3 + t * (pS4 + t * pS5)))));\n    q = one + t * (qS1 + t * (qS2 + t * (qS3 + t * qS4)));\n    w.dbl = p / q;\n    return x + x * w.dbl;\n  }\n  /* 1 > |x| >= 0.5 */\n  w.dbl = one - fabs (x);\n  t = w.dbl * 0.5;\n  p = t * (pS0 + t * (pS1 + t * (pS2 + t * (pS3 + t * (pS4 + t * pS5)))));\n  q = one + t * (qS1 + t * (qS2 + t * (qS3 + t * qS4)));\n  s = sqrt (t);\n  if (ix >= 0x3FEF3333) /* if |x| > 0.975 */\n  {\n    w.dbl = p / q;\n    t = pio2_hi - (2.0 * (s + s * w.dbl) - pio2_lo);\n  }\n  else\n  {\n    w.dbl = s;\n    w.as_int.lo = 0;\n    c = (t - w.dbl * w.dbl) / (s + w.dbl);\n    r = p / q;\n    p = 2.0 * s * r - (pio2_lo - 2.0 * c);\n    q = pio4_hi - 2.0 * w.dbl;\n    t = pio4_hi - (p - q);\n  }\n  if (hx > 0)\n  {\n    return t;\n  }\n  else\n  {\n    return -t;\n  }\n} /* asin */\n\n#undef one\n#undef huge\n#undef pio2_hi\n#undef pio2_lo\n#undef pio4_hi\n#undef pS0\n#undef pS1\n#undef pS2\n#undef pS3\n#undef pS4\n#undef pS5\n#undef qS1\n#undef qS2\n#undef qS3\n#undef qS4\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/asinh.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_asinh.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* asinh(x)\n * Method :\n *  Based on\n *    asinh(x) = sign(x) * log [ |x| + sqrt(x*x+1) ]\n *  we have\n *  asinh(x) := x  if  1 + x * x = 1,\n *           := sign(x) * (log(x)+ln2)) for large |x|, else\n *           := sign(x) * log(2|x| + 1 / (|x| + sqrt(x * x + 1))) if|x| > 2, else\n *           := sign(x) * log1p(|x| + x^2 / (1 + sqrt(1 + x^2)))\n */\n\n#define one 1.0\n#define ln2 6.93147180559945286227e-01 /* 0x3FE62E42, 0xFEFA39EF */\n#define huge 1.0e+300\n\ndouble\nasinh (double x)\n{\n  double t, w;\n  int hx, ix;\n  hx = __HI (x);\n  ix = hx & 0x7fffffff;\n  if (ix >= 0x7ff00000)\n  {\n    /* x is inf or NaN */\n    return x + x;\n  }\n  if (ix < 0x3e300000)\n  {\n    /* |x| < 2**-28 */\n    if (huge + x > one)\n    {\n      /* return x inexact except 0 */\n      return x;\n    }\n  }\n  if (ix > 0x41b00000)\n  {\n    /* |x| > 2**28 */\n    w = log (fabs (x)) + ln2;\n  }\n  else if (ix > 0x40000000)\n  {\n    /* 2**28 > |x| > 2.0 */\n    t = fabs (x);\n    w = log (2.0 * t + one / (sqrt (x * x + one) + t));\n  }\n  else\n  {\n    /* 2.0 > |x| > 2**-28 */\n    t = x * x;\n    w = log1p (fabs (x) + t / (one + sqrt (one + t)));\n  }\n  if (hx > 0)\n  {\n    return w;\n  }\n  else\n  {\n    return -w;\n  }\n} /* asinh */\n\n#undef one\n#undef ln2\n#undef huge\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/atan.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_atan.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* atan(x)\n *\n * Method:\n *   1. Reduce x to positive by atan(x) = -atan(-x).\n *   2. According to the integer k=4t+0.25 chopped, t=x, the argument\n *      is further reduced to one of the following intervals and the\n *      arctangent of t is evaluated by the corresponding formula:\n *\n *      [0,7/16]      atan(x) = t-t^3*(a1+t^2*(a2+...(a10+t^2*a11)...)\n *      [7/16,11/16]  atan(x) = atan(1/2) + atan( (t-0.5)/(1+t/2) )\n *      [11/16.19/16] atan(x) = atan( 1 ) + atan( (t-1)/(1+t) )\n *      [19/16,39/16] atan(x) = atan(3/2) + atan( (t-1.5)/(1+1.5t) )\n *      [39/16,INF]   atan(x) = atan(INF) + atan( -1/t )\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following\n * constants. The decimal values may be used, provided that the\n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n */\n\nstatic const double atanhi[] =\n{\n  4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */\n  7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */\n  9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */\n  1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */\n};\n\nstatic const double atanlo[] =\n{\n  2.26987774529616870924e-17, /* atan(0.5)lo 0x3C7A2B7F, 0x222F65E2 */\n  3.06161699786838301793e-17, /* atan(1.0)lo 0x3C81A626, 0x33145C07 */\n  1.39033110312309984516e-17, /* atan(1.5)lo 0x3C700788, 0x7AF0CBBD */\n  6.12323399573676603587e-17, /* atan(inf)lo 0x3C91A626, 0x33145C07 */\n};\n\n#define aT0   3.33333333333329318027e-01 /* 0x3FD55555, 0x5555550D */\n#define aT1  -1.99999999998764832476e-01 /* 0xBFC99999, 0x9998EBC4 */\n#define aT2   1.42857142725034663711e-01 /* 0x3FC24924, 0x920083FF */\n#define aT3  -1.11111104054623557880e-01 /* 0xBFBC71C6, 0xFE231671 */\n#define aT4   9.09088713343650656196e-02 /* 0x3FB745CD, 0xC54C206E */\n#define aT5  -7.69187620504482999495e-02 /* 0xBFB3B0F2, 0xAF749A6D */\n#define aT6   6.66107313738753120669e-02 /* 0x3FB10D66, 0xA0D03D51 */\n#define aT7  -5.83357013379057348645e-02 /* 0xBFADDE2D, 0x52DEFD9A */\n#define aT8   4.97687799461593236017e-02 /* 0x3FA97B4B, 0x24760DEB */\n#define aT9  -3.65315727442169155270e-02 /* 0xBFA2B444, 0x2C6A6C2F */\n#define aT10  1.62858201153657823623e-02 /* 0x3F90AD3A, 0xE322DA11 */\n\n#define one  1.0\n#define huge 1.0e300\n\ndouble\natan (double x)\n{\n  double w, s1, s2, z;\n  int ix, hx, id;\n\n  hx = __HI (x);\n  ix = hx & 0x7fffffff;\n  if (ix >= 0x44100000) /* if |x| >= 2^66 */\n  {\n    if (ix > 0x7ff00000 || (ix == 0x7ff00000 && (__LO (x) != 0)))\n    {\n      return x + x; /* NaN */\n    }\n    if (hx > 0)\n    {\n      return atanhi[3] + atanlo[3];\n    }\n    else\n    {\n      return -atanhi[3] - atanlo[3];\n    }\n  }\n  if (ix < 0x3fdc0000) /* |x| < 0.4375 */\n  {\n    if (ix < 0x3e200000) /* |x| < 2^-29 */\n    {\n      if (huge + x > one) /* raise inexact */\n      {\n        return x;\n      }\n    }\n    id = -1;\n  }\n  else\n  {\n    x = fabs (x);\n    if (ix < 0x3ff30000) /* |x| < 1.1875 */\n    {\n      if (ix < 0x3fe60000) /* 7/16 <= |x| < 11/16 */\n      {\n        id = 0;\n        x = (2.0 * x - one) / (2.0 + x);\n      }\n      else /* 11/16 <= |x| < 19/16 */\n      {\n        id = 1;\n        x = (x - one) / (x + one);\n      }\n    }\n    else\n    {\n      if (ix < 0x40038000) /* |x| < 2.4375 */\n      {\n        id = 2;\n        x = (x - 1.5) / (one + 1.5 * x);\n      }\n      else /* 2.4375 <= |x| < 2^66 */\n      {\n        id = 3;\n        x = -1.0 / x;\n      }\n    }\n  }\n  /* end of argument reduction */\n  z = x * x;\n  w = z * z;\n  /* break sum from i=0 to 10 aT[i] z**(i+1) into odd and even poly */\n  s1 = z * (aT0 + w * (aT2 + w * (aT4 + w * (aT6 + w * (aT8 + w * aT10)))));\n  s2 = w * (aT1 + w * (aT3 + w * (aT5 + w * (aT7 + w * aT9))));\n  if (id < 0)\n  {\n    return x - x * (s1 + s2);\n  }\n  else\n  {\n    z = atanhi[id] - ((x * (s1 + s2) - atanlo[id]) - x);\n    return (hx < 0) ? -z : z;\n  }\n} /* atan */\n\n#undef aT0\n#undef aT1\n#undef aT2\n#undef aT3\n#undef aT4\n#undef aT5\n#undef aT6\n#undef aT7\n#undef aT8\n#undef aT9\n#undef aT10\n#undef one\n#undef huge\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/atan2.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_atan2.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* atan2(y,x)\n *\n * Method:\n *      1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).\n *      2. Reduce x to positive by (if x and y are unexceptional):\n *              ARG (x+iy) = arctan(y/x)           ... if x > 0,\n *              ARG (x+iy) = pi - arctan[y/(-x)]   ... if x < 0,\n *\n * Special cases:\n *      ATAN2((anything), NaN ) is NaN;\n *      ATAN2(NAN , (anything) ) is NaN;\n *      ATAN2(+-0, +(anything but NaN)) is +-0  ;\n *      ATAN2(+-0, -(anything but NaN)) is +-pi ;\n *      ATAN2(+-(anything but 0 and NaN), 0) is +-pi/2;\n *      ATAN2(+-(anything but INF and NaN), +INF) is +-0 ;\n *      ATAN2(+-(anything but INF and NaN), -INF) is +-pi;\n *      ATAN2(+-INF,+INF ) is +-pi/4 ;\n *      ATAN2(+-INF,-INF ) is +-3pi/4;\n *      ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2;\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following\n * constants. The decimal values may be used, provided that the\n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n */\n\n#define tiny   1.0e-300\n#define zero   0.0\n#define pi_o_4 7.8539816339744827900E-01 /* 0x3FE921FB, 0x54442D18 */\n#define pi_o_2 1.5707963267948965580E+00 /* 0x3FF921FB, 0x54442D18 */\n#define pi     3.1415926535897931160E+00 /* 0x400921FB, 0x54442D18 */\n#define pi_lo  1.2246467991473531772E-16 /* 0x3CA1A626, 0x33145C07 */\n\ndouble\natan2 (double y, double x)\n{\n  double_accessor z;\n  int k, m, hx, hy, ix, iy;\n  unsigned lx, ly;\n\n  hx = __HI (x);\n  ix = hx & 0x7fffffff;\n  lx = __LO (x);\n  hy = __HI (y);\n  iy = hy & 0x7fffffff;\n  ly = __LO (y);\n  if (((ix | ((lx | -lx) >> 31)) > 0x7ff00000) || ((iy | ((ly | -ly) >> 31)) > 0x7ff00000)) /* x or y is NaN */\n  {\n    return x + y;\n  }\n  if (((hx - 0x3ff00000) | lx) == 0) /* x = 1.0 */\n  {\n    return atan (y);\n  }\n  m = ((hy < 0) ? 1 : 0) + ((hx < 0) ? 2 : 0); /* 2 * sign(x) + sign(y) */\n\n  /* when y = 0 */\n  if ((iy | ly) == 0)\n  {\n    switch (m)\n    {\n      case 0:\n      case 1:\n      {\n        return y; /* atan(+-0,+anything) = +-0 */\n      }\n      case 2:\n      {\n        return pi + tiny; /* atan(+0,-anything) = pi */\n      }\n      case 3:\n      {\n        return -pi - tiny; /* atan(-0,-anything) = -pi */\n      }\n    }\n  }\n  /* when x = 0 */\n  if ((ix | lx) == 0)\n  {\n    return (hy < 0) ? -pi_o_2 - tiny : pi_o_2 + tiny;\n  }\n\n  /* when x is INF */\n  if (ix == 0x7ff00000)\n  {\n    if (iy == 0x7ff00000)\n    {\n      switch (m)\n      {\n        case 0: /* atan(+INF,+INF) */\n        {\n          return pi_o_4 + tiny;\n        }\n        case 1: /* atan(-INF,+INF) */\n        {\n          return -pi_o_4 - tiny;\n        }\n        case 2: /* atan(+INF,-INF) */\n        {\n          return 3.0 * pi_o_4 + tiny;\n        }\n        case 3: /* atan(-INF,-INF) */\n        {\n          return -3.0 * pi_o_4 - tiny;\n        }\n      }\n    }\n    else\n    {\n      switch (m)\n      {\n        case 0: /* atan(+...,+INF) */\n        {\n          return zero;\n        }\n        case 1: /* atan(-...,+INF) */\n        {\n          return -zero;\n        }\n        case 2: /* atan(+...,-INF) */\n        {\n          return pi + tiny;\n        }\n        case 3: /* atan(-...,-INF) */\n        {\n          return -pi - tiny;\n        }\n      }\n    }\n  }\n  /* when y is INF */\n  if (iy == 0x7ff00000)\n  {\n    return (hy < 0) ? -pi_o_2 - tiny : pi_o_2 + tiny;\n  }\n\n  /* compute y / x */\n  k = (iy - ix) >> 20;\n  if (k > 60) /* |y / x| > 2**60 */\n  {\n    z.dbl = pi_o_2 + 0.5 * pi_lo;\n  }\n  else if (hx < 0 && k < -60) /* |y| / x < -2**60 */\n  {\n    z.dbl = 0.0;\n  }\n  else /* safe to do y / x */\n  {\n    z.dbl = atan (fabs (y / x));\n  }\n  switch (m)\n  {\n    case 0: /* atan(+,+) */\n    {\n      return z.dbl;\n    }\n    case 1: /* atan(-,+) */\n    {\n      z.as_int.hi ^= 0x80000000;\n      return z.dbl;\n    }\n    case 2: /* atan(+,-) */\n    {\n      return pi - (z.dbl - pi_lo);\n    }\n    /* case 3: */\n    default: /* atan(-,-) */\n    {\n      return (z.dbl - pi_lo) - pi;\n    }\n  }\n} /* atan2 */\n\n#undef tiny\n#undef zero\n#undef pi_o_4\n#undef pi_o_2\n#undef pi\n#undef pi_lo\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/atanh.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_atanh.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* atanh(x)\n * Method :\n *    1.Reduced x to positive by atanh(-x) = -atanh(x)\n *    2.For x >= 0.5\n *              1              2x                          x\n *  atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)\n *              2             1 - x                      1 - x\n *\n *   For x < 0.5\n*    atanh(x) = 0.5 * log1p(2x + 2x * x / (1 - x))\n *\n * Special cases:\n *  atanh(x) is NaN if |x| > 1 with signal;\n *  atanh(NaN) is that NaN with no signal;\n *  atanh(+-1) is +-INF with signal.\n *\n */\n\n#define zero 0.0\n#define one 1.0\n#define huge 1.0e+300\n\ndouble\natanh (double x)\n{\n  double t;\n  int hx, ix;\n  double_accessor temp;\n  temp.dbl = x;\n  hx = temp.as_int.hi;\n  ix = hx & 0x7fffffff;\n\n  /* |x| > 1 */\n  if ((ix | ((unsigned int) (temp.as_int.lo | (-temp.as_int.lo)) >> 31)) > 0x3ff00000)\n  {\n    return NAN;\n  }\n  if (ix == 0x3ff00000)\n  {\n    return x / zero;\n  }\n  if (ix < 0x3e300000 && (huge + x) > zero)\n  {\n    return x; /* x<2**-28 */\n  }\n\n  /* x <- |x| */\n  temp.as_int.hi = ix;\n  if (ix < 0x3fe00000)\n  {\n    /* x < 0.5 */\n    t = temp.dbl + temp.dbl;\n    t = 0.5 * log1p (t + t * temp.dbl / (one - temp.dbl));\n  }\n  else\n  {\n    t = 0.5 * log1p ((temp.dbl + temp.dbl) / (one - temp.dbl));\n  }\n  if (hx >= 0)\n  {\n    return t;\n  }\n  else\n  {\n    return -t;\n  }\n} /* atanh */\n\n#undef zero\n#undef one\n#undef huge\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/cbrt.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_cbrt.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* cbrt(x)\n * Return cube root of x\n */\n\n#define B1 715094163 /* B1 = (682 - 0.03306235651) * 2**20 */\n#define B2 696219795 /* B2 = (664 - 0.03306235651) * 2**20 */\n#define C 5.42857142857142815906e-01  /* 19/35     = 0x3FE15F15, 0xF15F15F1 */\n#define D -7.05306122448979611050e-01 /* -864/1225 = 0xBFE691DE, 0x2532C834 */\n#define E 1.41428571428571436819e+00  /* 99/70     = 0x3FF6A0EA, 0x0EA0EA0F */\n#define F 1.60714285714285720630e+00  /* 45/28     = 0x3FF9B6DB, 0x6DB6DB6E */\n#define G 3.57142857142857150787e-01  /* 5/14      = 0x3FD6DB6D, 0xB6DB6DB7 */\n\ndouble\ncbrt (double x)\n{\n  double r, s, w;\n  double_accessor t, temp;\n  unsigned int sign;\n  t.dbl = 0.0;\n  temp.dbl = x;\n\n  sign = temp.as_int.hi & 0x80000000; /* sign = sign(x) */\n  temp.as_int.hi ^= sign;\n\n  if (temp.as_int.hi >= 0x7ff00000)\n  {\n    /* cbrt(NaN, INF) is itself */\n    return (x + x);\n  }\n  if ((temp.as_int.hi | temp.as_int.lo) == 0)\n  {\n    /* cbrt(0) is itself */\n    return (x);\n  }\n  /* rough cbrt to 5 bits */\n  if (temp.as_int.hi < 0x00100000) /* subnormal number */\n  {\n    t.as_int.hi = 0x43500000; /* set t= 2**54 */\n    t.dbl *= temp.dbl;\n    t.as_int.hi = t.as_int.hi / 3 + B2;\n  }\n  else\n  {\n    t.as_int.hi = temp.as_int.hi / 3 + B1;\n  }\n\n  /* new cbrt to 23 bits, may be implemented in single precision */\n  r = t.dbl * t.dbl / temp.dbl;\n  s = C + r * t.dbl;\n  t.dbl *= G + F / (s + E + D / s);\n\n  /* chopped to 20 bits and make it larger than cbrt(x) */\n  t.as_int.lo = 0;\n  t.as_int.hi += 0x00000001;\n\n  /* one step newton iteration to 53 bits with error less than 0.667 ulps */\n  s = t.dbl * t.dbl; /* t*t is exact */\n  r = temp.dbl / s;\n  w = t.dbl + t.dbl;\n  r = (r - t.dbl) / (w + r); /* r-s is exact */\n  t.dbl = t.dbl + (t.dbl * r);\n\n  /* retore the sign bit */\n  t.as_int.hi |= sign;\n  return (t.dbl);\n} /* cbrt */\n\n#undef B1\n#undef B2\n#undef C\n#undef D\n#undef E\n#undef F\n#undef G\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/ceil.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_ceil.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* ceil(x)\n * Return x rounded toward -inf to integral value\n *\n * Method:\n *      Bit twiddling.\n *\n * Exception:\n *      Inexact flag raised if x not equal to ceil(x).\n */\n\n#define huge 1.0e300\n\ndouble\nceil (double x)\n{\n  int i0, i1, j0;\n  unsigned i, j;\n\n  i0 = __HI (x);\n  i1 = __LO (x);\n  j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;\n  if (j0 < 20)\n  {\n    if (j0 < 0) /* raise inexact if x != 0 */\n    {\n      if (huge + x > 0.0) /* return 0 * sign(x) if |x| < 1 */\n      {\n        if (i0 < 0)\n        {\n          i0 = 0x80000000;\n          i1 = 0;\n        }\n        else if ((i0 | i1) != 0)\n        {\n          i0 = 0x3ff00000;\n          i1 = 0;\n        }\n      }\n    }\n    else\n    {\n      i = (0x000fffff) >> j0;\n      if (((i0 & i) | i1) == 0) /* x is integral */\n      {\n        return x;\n      }\n      if (huge + x > 0.0) /* raise inexact flag */\n      {\n        if (i0 > 0)\n        {\n          i0 += (0x00100000) >> j0;\n        }\n        i0 &= (~i);\n        i1 = 0;\n      }\n    }\n  }\n  else if (j0 > 51)\n  {\n    if (j0 == 0x400) /* inf or NaN */\n    {\n      return x + x;\n    }\n    else /* x is integral */\n    {\n      return x;\n    }\n  }\n  else\n  {\n    i = ((unsigned) (0xffffffff)) >> (j0 - 20);\n    if ((i1 & i) == 0) /* x is integral */\n    {\n      return x;\n    }\n    if (huge + x > 0.0) /* raise inexact flag */\n    {\n      if (i0 > 0)\n      {\n        if (j0 == 20)\n        {\n          i0 += 1;\n        }\n        else\n        {\n          j = i1 + (1 << (52 - j0));\n          if (j < i1) /* got a carry */\n          {\n            i0 += 1;\n          }\n          i1 = j;\n        }\n      }\n      i1 &= (~i);\n    }\n  }\n\n  double_accessor ret;\n  ret.as_int.hi = i0;\n  ret.as_int.lo = i1;\n  return ret.dbl;\n} /* ceil */\n\n#undef huge\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/copysign.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_copysign.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* copysign(x,y) returns a value with the magnitude of x and\n * with the sign bit of y.\n */\n\ndouble\ncopysign (double x, double y)\n{\n  double_accessor ret;\n  ret.dbl = x;\n  ret.as_int.hi = (__HI (x) & 0x7fffffff) | (__HI (y) & 0x80000000);\n  return ret.dbl;\n} /* copysign */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/cosh.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_cosh.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* cosh(x)\n * Method:\n * mathematically cosh(x) if defined to be (exp(x) + exp(-x)) / 2\n *  1. Replace x by |x| (cosh(x) = cosh(-x)).\n *  2.\n *                                                 [ exp(x) - 1 ]^2\n *      0        <= x <= ln2/2  :  cosh(x) := 1 + -------------------\n *                                                     2*exp(x)\n *\n *                                             exp(x) +  1/exp(x)\n *      ln2/2    <= x <= 22     :  cosh(x) := -------------------\n *                                                    2\n *\n *      22       <= x <= lnovft :  cosh(x) := exp(x)/2\n *      lnovft   <= x <= ln2ovft:  cosh(x) := exp(x/2)/2 * exp(x/2)\n *      ln2ovft  <  x           :  cosh(x) := huge * huge (overflow)\n *\n * Special cases:\n *  cosh(x) is |x| if x is +INF, -INF, or NaN.\n *  only cosh(0) = 1 is exact for finite x.\n */\n\n#define one 1.0\n#define half 0.5\n#define huge 1.0e300\n\ndouble\ncosh (double x)\n{\n  double t, w;\n  int ix;\n  unsigned lx;\n\n  /* High word of |x|. */\n  ix = __HI (x);\n  ix &= 0x7fffffff;\n\n  /* x is INF or NaN */\n  if (ix >= 0x7ff00000)\n  {\n    return x * x;\n  }\n  /* |x| in [0, 0.5 * ln2], return 1 + expm1(|x|)^2 / (2 * exp(|x|)) */\n  if (ix < 0x3fd62e43)\n  {\n    t = expm1 (fabs (x));\n    w = one + t;\n    if (ix < 0x3c800000)\n    {\n      /* cosh(tiny) = 1 */\n      return w;\n    }\n    return one + (t * t) / (w + w);\n  }\n\n  /* |x| in [0.5 * ln2, 22], return (exp(|x|) + 1 / exp(|x|) / 2; */\n  if (ix < 0x40360000)\n  {\n    t = exp (fabs (x));\n    return half * t + half / t;\n  }\n\n  /* |x| in [22, log(maxdouble)] return half * exp(|x|) */\n  if (ix < 0x40862E42)\n  {\n    return half * exp (fabs (x));\n  }\n  /* |x| in [log(maxdouble), overflowthresold] */\n  lx = ((1 >> 29) + (unsigned int) x);\n  if ((ix < 0x408633CE) ||\n      ((ix == 0x408633ce) && (lx <= (unsigned) 0x8fb9f87d)))\n  {\n    w = exp (half * fabs (x));\n    t = half * w;\n    return t * w;\n  }\n\n  /* |x| > overflowthresold, cosh(x) overflow */\n  return huge * huge;\n} /* cosh */\n\n#undef one\n#undef half\n#undef huge\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/exp.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_exp.c 1.6 04/04/22\n */\n\n#include \"jerry-math-internal.h\"\n\n/* exp(x)\n * Returns the exponential of x.\n *\n * Method:\n *   1. Argument reduction:\n *      Reduce x to an r so that |r| <= 0.5*ln2 ~ 0.34658.\n *      Given x, find r and integer k such that\n *\n *               x = k*ln2 + r,  |r| <= 0.5*ln2.\n *\n *      Here r will be represented as r = hi-lo for better\n *      accuracy.\n *\n *   2. Approximation of exp(r) by a special rational function on\n *      the interval [0,0.34658]:\n *      Write\n *          R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...\n *      We use a special Remes algorithm on [0,0.34658] to generate\n *      a polynomial of degree 5 to approximate R. The maximum error\n *      of this polynomial approximation is bounded by 2**-59. In\n *      other words,\n *          R(z) ~ 2.0 + P1*z + P2*z**2 + P3*z**3 + P4*z**4 + P5*z**5\n *      (where z=r*r, and the values of P1 to P5 are listed below)\n *      and\n *          |                  5          |     -59\n *          | 2.0+P1*z+...+P5*z   -  R(z) | <= 2\n *          |                             |\n *      The computation of exp(r) thus becomes\n *                             2*r\n *              exp(r) = 1 + -------\n *                            R - r\n *                                 r*R1(r)\n *                     = 1 + r + ----------- (for better accuracy)\n *                                2 - R1(r)\n *      where\n *                               2       4             10\n *              R1(r) = r - (P1*r  + P2*r  + ... + P5*r   ).\n *\n *   3. Scale back to obtain exp(x):\n *      From step 1, we have\n *         exp(x) = 2^k * exp(r)\n *\n * Special cases:\n *      exp(INF) is INF, exp(NaN) is NaN;\n *      exp(-INF) is 0, and\n *      for finite argument, only exp(0)=1 is exact.\n *\n * Accuracy:\n *      according to an error analysis, the error is always less than\n *      1 ulp (unit in the last place).\n *\n * Misc. info:\n *      For IEEE double\n *          if x >  7.09782712893383973096e+02 then exp(x) overflow\n *          if x < -7.45133219101941108420e+02 then exp(x) underflow\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following\n * constants. The decimal values may be used, provided that the\n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n */\n\nstatic const double halF[2] =\n{\n  0.5,\n  -0.5,\n};\nstatic const double ln2HI[2] =\n{\n  6.93147180369123816490e-01, /* 0x3fe62e42, 0xfee00000 */\n  -6.93147180369123816490e-01, /* 0xbfe62e42, 0xfee00000 */\n};\nstatic const double ln2LO[2] =\n{\n  1.90821492927058770002e-10, /* 0x3dea39ef, 0x35793c76 */\n  -1.90821492927058770002e-10, /* 0xbdea39ef, 0x35793c76 */\n};\n\n#define one          1.0\n#define huge         1.0e+300\n#define twom1000     9.33263618503218878990e-302 /* 2**-1000=0x01700000,0 */\n#define o_threshold  7.09782712893383973096e+02 /* 0x40862E42, 0xFEFA39EF */\n#define u_threshold -7.45133219101941108420e+02 /* 0xc0874910, 0xD52D3051 */\n#define invln2       1.44269504088896338700e+00 /* 0x3ff71547, 0x652b82fe */\n#define P1           1.66666666666666019037e-01 /* 0x3FC55555, 0x5555553E */\n#define P2          -2.77777777770155933842e-03 /* 0xBF66C16C, 0x16BEBD93 */\n#define P3           6.61375632143793436117e-05 /* 0x3F11566A, 0xAF25DE2C */\n#define P4          -1.65339022054652515390e-06 /* 0xBEBBBD41, 0xC5D26BF1 */\n#define P5           4.13813679705723846039e-08 /* 0x3E663769, 0x72BEA4D0 */\n\ndouble\nexp (double x) /* default IEEE double exp */\n{\n  double hi, lo, c, t;\n  int k = 0, xsb;\n  unsigned hx;\n\n  hx = __HI (x); /* high word of x */\n  xsb = (hx >> 31) & 1; /* sign bit of x */\n  hx &= 0x7fffffff; /* high word of |x| */\n\n  /* filter out non-finite argument */\n  if (hx >= 0x40862E42) /* if |x| >= 709.78... */\n  {\n    if (hx >= 0x7ff00000)\n    {\n      if (((hx & 0xfffff) | __LO (x)) != 0) /* NaN */\n      {\n        return x + x;\n      }\n      else /* exp(+-inf) = {inf,0} */\n      {\n        return (xsb == 0) ? x : 0.0;\n      }\n    }\n    if (x > o_threshold) /* overflow */\n    {\n      return huge * huge;\n    }\n    if (x < u_threshold) /* underflow */\n    {\n      return twom1000 * twom1000;\n    }\n  }\n\n  /* argument reduction */\n  if (hx > 0x3fd62e42) /* if  |x| > 0.5 ln2 */\n  {\n    if (hx < 0x3FF0A2B2) /* and |x| < 1.5 ln2 */\n    {\n      hi = x - ln2HI[xsb];\n      lo = ln2LO[xsb];\n      k = 1 - xsb - xsb;\n    }\n    else\n    {\n      k = (int) (invln2 * x + halF[xsb]);\n      t = k;\n      hi = x - t * ln2HI[0]; /* t * ln2HI is exact here */\n      lo = t * ln2LO[0];\n    }\n    x = hi - lo;\n  }\n  else if (hx < 0x3e300000) /* when |x| < 2**-28 */\n  {\n    if (huge + x > one) /* trigger inexact */\n    {\n      return one + x;\n    }\n  }\n  else\n  {\n    k = 0;\n  }\n\n  double_accessor ret;\n\n  /* x is now in primary range */\n  t = x * x;\n  c = x - t * (P1 + t * (P2 + t * (P3 + t * (P4 + t * P5))));\n  if (k == 0)\n  {\n    return one - ((x * c) / (c - 2.0) - x);\n  }\n  else\n  {\n    ret.dbl = one - ((lo - (x * c) / (2.0 - c)) - hi);\n  }\n  if (k >= -1021)\n  {\n    ret.as_int.hi += (((unsigned int) k) << 20); /* add k to y's exponent */\n    return ret.dbl;\n  }\n  else\n  {\n    ret.as_int.hi += ((k + 1000) << 20); /* add k to y's exponent */\n    return ret.dbl * twom1000;\n  }\n} /* exp */\n\n#undef one\n#undef huge\n#undef twom1000\n#undef o_threshold\n#undef u_threshold\n#undef invln2\n#undef P1\n#undef P2\n#undef P3\n#undef P4\n#undef P5\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/expm1.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_expm1.c 5.1 93/09/24\n */\n\n#include \"jerry-math-internal.h\"\n\n/* expm1(x)\n * Returns exp(x)-1, the exponential of x minus 1.\n *\n * Method\n *   1. Argument reduction:\n *  Given x, find r and integer k such that\n *\n *               x = k*ln2 + r,  |r| <= 0.5*ln2 ~ 0.34658\n *\n *      Here a correction term c will be computed to compensate\n *  the error in r when rounded to a floating-point number.\n *\n *   2. Approximating expm1(r) by a special rational function on\n *  the interval [0,0.34658]:\n *  Since\n *      r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 - r^4/360 + ...\n *  we define R1(r*r) by\n *      r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 * R1(r*r)\n *  That is,\n *      R1(r**2) = 6/r *((exp(r)+1)/(exp(r)-1) - 2/r)\n *         = 6/r * ( 1 + 2.0*(1/(exp(r)-1) - 1/r))\n *         = 1 - r^2/60 + r^4/2520 - r^6/100800 + ...\n *      We use a special Reme algorithm on [0,0.347] to generate\n *   a polynomial of degree 5 in r*r to approximate R1. The\n *  maximum error of this polynomial approximation is bounded\n *  by 2**-61. In other words,\n *      R1(z) ~ 1.0 + Q1*z + Q2*z**2 + Q3*z**3 + Q4*z**4 + Q5*z**5\n *  where   Q1  =  -1.6666666666666567384E-2,\n *     Q2  =   3.9682539681370365873E-4,\n *     Q3  =  -9.9206344733435987357E-6,\n *     Q4  =   2.5051361420808517002E-7,\n *     Q5  =  -6.2843505682382617102E-9;\n *    z   =  r*r,\n *  with error bounded by\n *      |                  5           |     -61\n *      | 1.0+Q1*z+...+Q5*z   -  R1(z) | <= 2\n *      |                              |\n *\n *  expm1(r) = exp(r)-1 is then computed by the following\n *   specific way which minimize the accumulation rounding error:\n *                        2     3\n *                        r     r    [ 3 - (R1 + R1*r/2)  ]\n *        expm1(r) = r + --- + --- * [--------------------]\n *                        2     2    [ 6 - r*(3 - R1*r/2) ]\n *\n *  To compensate the error in the argument reduction, we use\n *    expm1(r+c) = expm1(r) + c + expm1(r)*c\n *         ~ expm1(r) + c + r*c\n *  Thus c+r*c will be added in as the correction terms for\n *  expm1(r+c). Now rearrange the term to avoid optimization\n *   screw up:\n *                  (      2                                    2 )\n *                  ({  ( r    [ R1 -  (3 - R1*r/2) ]  )  }    r  )\n *   expm1(r+c)~r - ({r*(--- * [--------------------]-c)-c} - --- )\n *                  ({  ( 2    [ 6 - r*(3 - R1*r/2) ]  )  }    2  )\n *                  (                                             )\n *\n *       = r - E\n *   3. Scale back to obtain expm1(x):\n *  From step 1, we have\n *     expm1(x) = either 2^k*[expm1(r)+1] - 1\n *              = or     2^k*[expm1(r) + (1-2^-k)]\n *   4. Implementation notes:\n *  (A). To save one multiplication, we scale the coefficient Qi\n *       to Qi*2^i, and replace z by (x^2)/2.\n *  (B). To achieve maximum accuracy, we compute expm1(x) by\n *    (i)   if x < -56*ln2, return -1.0, (raise inexact if x!=inf)\n *    (ii)  if k=0, return r-E\n *    (iii) if k=-1, return 0.5*(r-E)-0.5\n *    (iv)  if k=1 if r < -0.25, return 2*((r+0.5)- E)\n *                  else       return  1.0+2.0*(r-E);\n *    (v)   if (k<-2||k>56) return 2^k(1-(E-r)) - 1 (or exp(x)-1)\n *    (vi)  if k <= 20, return 2^k((1-2^-k)-(E-r)), else\n *    (vii) return 2^k(1-((E+2^-k)-r))\n *\n * Special cases:\n *  expm1(INF) is INF, expm1(NaN) is NaN;\n *  expm1(-INF) is -1, and\n *  for finite argument, only expm1(0)=0 is exact.\n *\n * Accuracy:\n *  according to an error analysis, the error is always less than\n *  1 ulp (unit in the last place).\n *\n * Misc. info.\n *  For IEEE double\n *      if x >  7.09782712893383973096e+02 then expm1(x) overflow\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following\n * constants. The decimal values may be used, provided that the\n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n */\n\n#define one 1.0\n#define huge 1.0e+300\n#define tiny 1.0e-300\n#define o_threshold 7.09782712893383973096e+02 /* 0x40862E42, 0xFEFA39EF */\n#define ln2_hi 6.93147180369123816490e-01      /* 0x3fe62e42, 0xfee00000 */\n#define ln2_lo 1.90821492927058770002e-10      /* 0x3dea39ef, 0x35793c76 */\n#define invln2 1.44269504088896338700e+00      /* 0x3ff71547, 0x652b82fe */\n\n/* Scaled Q's: Qn_here = 2**n * Qn_above, for R(2*z) where z = hxs = x*x/2: */\n#define Q1 -3.33333333333331316428e-02 /* BFA11111 111110F4 */\n#define Q2 1.58730158725481460165e-03  /* 3F5A01A0 19FE5585 */\n#define Q3 -7.93650757867487942473e-05 /* BF14CE19 9EAADBB7 */\n#define Q4 4.00821782732936239552e-06  /* 3ED0CFCA 86E65239 */\n#define Q5 -2.01099218183624371326e-07 /* BE8AFDB7 6E09C32D */\n\ndouble\nexpm1 (double x)\n{\n  double y, hi, lo, c, e, hxs, hfx, r1;\n  double_accessor t, twopk;\n  int k, xsb;\n  unsigned int hx;\n\n  hx = __HI (x);\n  xsb = hx & 0x80000000; /* sign bit of x */\n  hx &= 0x7fffffff;      /* high word of |x| */\n\n  /* filter out huge and non-finite argument */\n  if (hx >= 0x4043687A)\n  {\n    /* if |x|>=56*ln2 */\n    if (hx >= 0x40862E42)\n    {\n      /* if |x|>=709.78... */\n      if (hx >= 0x7ff00000)\n      {\n        unsigned int low;\n        low = __LO (x);\n        if (((hx & 0xfffff) | low) != 0)\n        {\n          /* NaN */\n          return x + x;\n        }\n        else\n        {\n          /* exp(+-inf)-1={inf,-1} */\n          return (xsb == 0) ? x : -1.0;\n        }\n      }\n      if (x > o_threshold)\n      {\n        /* overflow */\n        return huge * huge;\n      }\n    }\n    if (xsb != 0)\n    {\n      /* x < -56*ln2, return -1.0 with inexact */\n      if (x + tiny < 0.0) /* raise inexact */\n      {\n        /* return -1 */\n        return tiny - one;\n      }\n    }\n  }\n\n  /* argument reduction */\n  if (hx > 0x3fd62e42)\n  {\n    /* if  |x| > 0.5 ln2 */\n    if (hx < 0x3FF0A2B2)\n    {\n      /* and |x| < 1.5 ln2 */\n      if (xsb == 0)\n      {\n        hi = x - ln2_hi;\n        lo = ln2_lo;\n        k = 1;\n      }\n      else\n      {\n        hi = x + ln2_hi;\n        lo = -ln2_lo;\n        k = -1;\n      }\n    }\n    else\n    {\n      k = (int) (invln2 * x + ((xsb == 0) ? 0.5 : -0.5));\n      t.dbl = k;\n      hi = x - t.dbl * ln2_hi; /* t*ln2_hi is exact here */\n      lo = t.dbl * ln2_lo;\n    }\n    x = hi - lo;\n    c = (hi - x) - lo;\n  }\n  else if (hx < 0x3c900000)\n  {\n    /* when |x|<2**-54, return x */\n    return x;\n  }\n  else\n  {\n    k = 0;\n  }\n\n  /* x is now in primary range */\n  hfx = 0.5 * x;\n  hxs = x * hfx;\n  r1 = one + hxs * (Q1 + hxs * (Q2 + hxs * (Q3 + hxs * (Q4 + hxs * Q5))));\n  t.dbl = 3.0 - r1 * hfx;\n  e = hxs * ((r1 - t.dbl) / (6.0 - x * t.dbl));\n  if (k == 0)\n  {\n    /* c is 0 */\n    return x - (x * e - hxs);\n  }\n  else\n  {\n    twopk.as_int.hi = 0x3ff00000 + ((unsigned int) k << 20); /* 2^k */\n    twopk.as_int.lo = 0;\n    e = (x * (e - c) - c);\n    e -= hxs;\n    if (k == -1)\n    {\n      return 0.5 * (x - e) - 0.5;\n    }\n    if (k == 1)\n    {\n      if (x < -0.25)\n      {\n        return -2.0 * (e - (x + 0.5));\n      }\n      else\n      {\n        return one + 2.0 * (x - e);\n      }\n    }\n    if ((k <= -2) || (k > 56))\n    {\n      /* suffice to return exp(x)-1 */\n      y = one - (e - x);\n      if (k == 1024)\n      {\n        y = y * 2.0 * 0x1p1023;\n      }\n      else\n      {\n        y = y * twopk.dbl;\n      }\n      return y - one;\n    }\n    t.dbl = one;\n    if (k < 20)\n    {\n      t.as_int.hi = (0x3ff00000 - (0x200000 >> k)); /* t=1-2^-k */\n      y = t.dbl - (e - x);\n      y = y * twopk.dbl;\n    }\n    else\n    {\n      t.as_int.hi = ((0x3ff - k) << 20); /* 2^-k */\n      y = x - (e + t.dbl);\n      y += one;\n      y = y * twopk.dbl;\n    }\n  }\n  return y;\n} /* expm1 */\n\n#undef one\n#undef huge\n#undef tiny\n#undef o_threshold\n#undef ln2_hi\n#undef ln2_lo\n#undef invln2\n#undef Q1\n#undef Q2\n#undef Q3\n#undef Q4\n#undef Q5\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/fabs.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_fabs.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* fabs(x) returns the absolute value of x.\n */\n\ndouble\nfabs (double x)\n{\n  double_accessor ret;\n  ret.dbl = x;\n  ret.as_int.hi &= 0x7fffffff;\n  return ret.dbl;\n} /* fabs */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/floor.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_floor.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* floor(x)\n * Return x rounded toward -inf to integral value\n *\n * Method:\n *      Bit twiddling.\n *\n * Exception:\n *      Inexact flag raised if x not equal to floor(x).\n */\n\n#define huge 1.0e300\n\ndouble\nfloor (double x)\n{\n  int i0, i1, j0;\n  unsigned i, j;\n\n  i0 = __HI (x);\n  i1 = __LO (x);\n  j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;\n  if (j0 < 20)\n  {\n    if (j0 < 0) /* raise inexact if x != 0 */\n    {\n      if (huge + x > 0.0) /* return 0 * sign(x) if |x| < 1 */\n      {\n        if (i0 >= 0)\n        {\n          i0 = i1 = 0;\n        }\n        else if (((i0 & 0x7fffffff) | i1) != 0)\n        {\n          i0 = 0xbff00000;\n          i1 = 0;\n        }\n      }\n    }\n    else\n    {\n      i = (0x000fffff) >> j0;\n      if (((i0 & i) | i1) == 0) /* x is integral */\n      {\n        return x;\n      }\n      if (huge + x > 0.0) /* raise inexact flag */\n      {\n        if (i0 < 0)\n        {\n          i0 += (0x00100000) >> j0;\n        }\n        i0 &= (~i);\n        i1 = 0;\n      }\n    }\n  }\n  else if (j0 > 51)\n  {\n    if (j0 == 0x400) /* inf or NaN */\n    {\n      return x + x;\n    }\n    else /* x is integral */\n    {\n      return x;\n    }\n  }\n  else\n  {\n    i = ((unsigned) (0xffffffff)) >> (j0 - 20);\n    if ((i1 & i) == 0) /* x is integral */\n    {\n      return x;\n    }\n    if (huge + x > 0.0) /* raise inexact flag */\n    {\n      if (i0 < 0)\n      {\n        if (j0 == 20)\n        {\n          i0 += 1;\n        }\n        else\n        {\n          j = i1 + (1 << (52 - j0));\n          if (j < i1) /* got a carry */\n          {\n            i0 += 1;\n          }\n          i1 = j;\n        }\n      }\n      i1 &= (~i);\n    }\n  }\n\n  double_accessor ret;\n  ret.as_int.hi = i0;\n  ret.as_int.lo = i1;\n  return ret.dbl;\n} /* floor */\n\n#undef huge\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/fmod.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_fmod.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* fmod(x,y)\n * Return x mod y in exact arithmetic\n *\n * Method: shift and subtract\n */\n\nstatic const double Zero[] = { 0.0, -0.0, };\n\ndouble\nfmod (double x, double y)\n{\n  int n, hx, hy, hz, ix, iy, sx, i;\n  unsigned lx, ly, lz;\n\n  hx = __HI (x); /* high word of x */\n  lx = __LO (x); /* low  word of x */\n  hy = __HI (y); /* high word of y */\n  ly = __LO (y); /* low  word of y */\n  sx = hx & 0x80000000; /* sign of x */\n  hx ^= sx; /* |x| */\n  hy &= 0x7fffffff; /* |y| */\n\n  /* purge off exception values */\n  if ((hy | ly) == 0 || (hx >= 0x7ff00000) || /* y = 0, or x not finite */\n      ((hy | ((ly | -ly) >> 31)) > 0x7ff00000)) /* or y is NaN */\n  {\n    return NAN;\n  }\n  if (hx <= hy)\n  {\n    if ((hx < hy) || (lx < ly)) /* |x| < |y| return x */\n    {\n      return x;\n    }\n    if (lx == ly) /* |x| = |y| return x * 0 */\n    {\n      return Zero[(unsigned) sx >> 31];\n    }\n  }\n\n  /* determine ix = ilogb(x) */\n  if (hx < 0x00100000) /* subnormal x */\n  {\n    if (hx == 0)\n    {\n      for (ix = -1043, i = lx; i > 0; i <<= 1)\n      {\n        ix -= 1;\n      }\n    }\n    else\n    {\n      for (ix = -1022, i = (hx << 11); i > 0; i <<= 1)\n      {\n        ix -= 1;\n      }\n    }\n  }\n  else\n  {\n    ix = (hx >> 20) - 1023;\n  }\n\n  /* determine iy = ilogb(y) */\n  if (hy < 0x00100000) /* subnormal y */\n  {\n    if (hy == 0)\n    {\n      for (iy = -1043, i = ly; i > 0; i <<= 1)\n      {\n        iy -= 1;\n      }\n    }\n    else\n    {\n      for (iy = -1022, i = (hy << 11); i > 0; i <<= 1)\n      {\n        iy -= 1;\n      }\n    }\n  }\n  else\n  {\n    iy = (hy >> 20) - 1023;\n  }\n\n  /* set up {hx,lx}, {hy,ly} and align y to x */\n  if (ix >= -1022)\n  {\n    hx = 0x00100000 | (0x000fffff & hx);\n  }\n  else /* subnormal x, shift x to normal */\n  {\n    n = -1022 - ix;\n    if (n <= 31)\n    {\n      hx = (((unsigned int) hx) << n) | (lx >> (32 - n));\n      lx <<= n;\n    }\n    else\n    {\n      hx = lx << (n - 32);\n      lx = 0;\n    }\n  }\n  if (iy >= -1022)\n  {\n    hy = 0x00100000 | (0x000fffff & hy);\n  }\n  else /* subnormal y, shift y to normal */\n  {\n    n = -1022 - iy;\n    if (n <= 31)\n    {\n      hy = (((unsigned int) hy) << n) | (ly >> (32 - n));\n      ly <<= n;\n    }\n    else\n    {\n      hy = ly << (n - 32);\n      ly = 0;\n    }\n  }\n\n  /* fix point fmod */\n  n = ix - iy;\n  while (n--)\n  {\n    hz = hx - hy;\n    lz = lx - ly;\n    if (lx < ly)\n    {\n      hz -= 1;\n    }\n    if (hz < 0)\n    {\n      hx = hx + hx + (lx >> 31);\n      lx = lx + lx;\n    }\n    else\n    {\n      if ((hz | lz) == 0) /* return sign(x) * 0 */\n      {\n        return Zero[(unsigned) sx >> 31];\n      }\n      hx = hz + hz + (lz >> 31);\n      lx = lz + lz;\n    }\n  }\n  hz = hx - hy;\n  lz = lx - ly;\n  if (lx < ly)\n  {\n    hz -= 1;\n  }\n  if (hz >= 0)\n  {\n    hx = hz;\n    lx = lz;\n  }\n\n  /* convert back to floating value and restore the sign */\n  if ((hx | lx) == 0) /* return sign(x) * 0 */\n  {\n    return Zero[(unsigned) sx >> 31];\n  }\n  while (hx < 0x00100000) /* normalize x */\n  {\n    hx = hx + hx + (lx >> 31);\n    lx = lx + lx;\n    iy -= 1;\n  }\n\n  double_accessor ret;\n  if (iy >= -1022) /* normalize output */\n  {\n    hx = ((hx - 0x00100000) | ((iy + 1023) << 20));\n    ret.as_int.hi = hx | sx;\n    ret.as_int.lo = lx;\n  }\n  else /* subnormal output */\n  {\n    n = -1022 - iy;\n    if (n <= 20)\n    {\n      lx = (lx >> n) | ((unsigned) hx << (32 - n));\n      hx >>= n;\n    }\n    else if (n <= 31)\n    {\n      lx = (hx << (32 - n)) | (lx >> n);\n      hx = sx;\n    }\n    else\n    {\n      lx = hx >> (n - 32);\n      hx = sx;\n    }\n    ret.as_int.hi = hx | sx;\n    ret.as_int.lo = lx;\n  }\n  return ret.dbl; /* exact output */\n} /* fmod */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/include/math.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRY_MATH_H\n#define JERRY_MATH_H\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/* General Constants. */\n#define INFINITY    (1.0/0.0)\n#define NAN         (0.0/0.0)\n#define HUGE_VAL    INFINITY\n\n#define isnan(x)    ((x) != (x))\n#define isinf(x)    ((x) == INFINITY ? 1 : (x) == -INFINITY ? -1 : 0)\n#define isfinite(x) (!isinf(x) && !isnan(x))\n\n/* Exponential and Logarithmic constants. */\n#define M_E        2.7182818284590452353602874713526625\n#define M_SQRT2    1.4142135623730950488016887242096981\n#define M_SQRT1_2  0.7071067811865475244008443621048490\n#define M_LOG2E    1.4426950408889634073599246810018921\n#define M_LOG10E   0.4342944819032518276511289189166051\n#define M_LN2      0.6931471805599453094172321214581765\n#define M_LN10     2.3025850929940456840179914546843642\n\n/* Trigonometric Constants. */\n#define M_PI       3.1415926535897932384626433832795029\n#define M_PI_2     1.5707963267948966192313216916397514\n#define M_PI_4     0.7853981633974483096156608458198757\n#define M_1_PI     0.3183098861837906715377675267450287\n#define M_2_PI     0.6366197723675813430755350534900574\n#define M_2_SQRTPI 1.1283791670955125738961589031215452\n\n/* Trigonometric functions. */\ndouble cos (double);\ndouble sin (double);\ndouble tan (double);\ndouble acos (double);\ndouble asin (double);\ndouble atan (double);\ndouble atan2 (double, double);\n\n/* Hyperbolic functions. */\ndouble cosh (double x);\ndouble sinh (double x);\ndouble tanh (double x);\n\n/* Inverse hyperbolic functions */\ndouble acosh (double);\ndouble asinh (double);\ndouble atanh (double);\n\n/* Exponential and logarithmic functions. */\ndouble exp (double);\ndouble expm1 (double);\ndouble log (double);\ndouble log1p (double);\ndouble log2 (double);\ndouble log10 (double);\n\n/* Power functions. */\ndouble pow (double, double);\ndouble sqrt (double);\ndouble cbrt (double);\n\n/* Rounding and remainder functions. */\ndouble ceil (double);\ndouble floor (double);\n\n/* Other functions. */\ndouble fabs (double);\ndouble fmod (double, double);\n\ndouble nextafter (double, double);\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRY_MATH_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/jerry-math-internal.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)fdlibm.h 1.5 04/04/22\n */\n\n#ifndef JERRY_MATH_INTERNAL_H\n#define JERRY_MATH_INTERNAL_H\n\n/* Sometimes it's necessary to define __LITTLE_ENDIAN explicitly\n   but these catch some common cases. */\n\n#ifndef __LITTLE_ENDIAN\n/* Check if compiler has byte order macro. Some older versions do not.\n * If byte order is supported and set to little or target is among common\n * cases checked define __LITTLE_ENDIAN.\n */\n#if (defined (i386) || defined (__i386) || defined (__i386__) || \\\n     defined (i486) || defined (__i486) || defined (__i486__) || \\\n     defined (intel) || defined (x86) || defined (i86pc) || \\\n     defined (__alpha) || defined (__osf__) || \\\n     defined (__x86_64__) || defined (__arm__) || defined (__aarch64__) || \\\n     defined (__xtensa__) || defined (__MIPSEL)) || \\\n(defined (__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))\n#define __LITTLE_ENDIAN\n#endif\n#endif /* !__LITTLE_ENDIAN */\n\n#ifdef __LITTLE_ENDIAN\n#define __HI(x) *(1 + (const int *) &x)\n#define __LO(x) *(const int *) &x\ntypedef union\n{\n  double dbl;\n  struct\n  {\n    int lo;\n    int hi;\n  } as_int;\n} double_accessor;\n#else /* !__LITTLE_ENDIAN */\n#define __HI(x) *(const int *) &x\n#define __LO(x) *(1 + (const int *) &x)\n\ntypedef union\n{\n  double dbl;\n  struct\n  {\n    int hi;\n    int lo;\n  } as_int;\n} double_accessor;\n#endif /* __LITTLE_ENDIAN */\n\n#ifndef NAN\n#define NAN (0.0/0.0)\n#endif\n\n/*\n * ANSI/POSIX\n */\ndouble acos (double x);\ndouble asin (double x);\ndouble atan (double x);\ndouble atan2 (double y, double x);\ndouble cos (double x);\ndouble sin (double x);\ndouble tan (double x);\n\ndouble cosh (double x);\ndouble sinh (double x);\ndouble tanh (double x);\n\ndouble acosh (double x);\ndouble asinh (double x);\ndouble atanh (double x);\n\ndouble exp (double x);\ndouble expm1 (double x);\ndouble log (double x);\ndouble log1p (double x);\ndouble log2 (double x);\ndouble log10 (double);\n\ndouble pow (double x, double y);\ndouble sqrt (double x);\ndouble cbrt (double);\n\ndouble ceil (double x);\ndouble fabs (double x);\ndouble floor (double x);\ndouble fmod (double x, double y);\n\ndouble nextafter (double x, double y);\n\n/*\n * Functions callable from C, intended to support IEEE arithmetic.\n */\ndouble copysign (double x, double y);\ndouble scalbn (double x, int n);\n\n#endif /* !JERRY_MATH_INTERNAL_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/libjerry-math.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nlibdir=${prefix}/lib\nincludedir=${prefix}/include/jerryscript-math\n\nName: libjerry-math\nDescription: JerryScript: lightweight JavaScript engine (minimal math library)\nURL: https://github.com/jerryscript-project/jerryscript\nVersion: @JERRY_VERSION@\nLibs: -L${libdir} -ljerry-math\nCflags: -I${includedir}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/log.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_log.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* log(x)\n * Return the logrithm of x\n *\n * Method :\n *   1. Argument Reduction: find k and f such that\n *                      x = 2^k * (1+f),\n *         where  sqrt(2)/2 < 1+f < sqrt(2) .\n *\n *   2. Approximation of log(1+f).\n *      Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)\n *               = 2s + 2/3 s**3 + 2/5 s**5 + .....,\n *               = 2s + s*R\n *      We use a special Reme algorithm on [0,0.1716] to generate\n *      a polynomial of degree 14 to approximate R The maximum error\n *      of this polynomial approximation is bounded by 2**-58.45. In\n *      other words,\n *                      2      4      6      8      10      12      14\n *          R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s +Lg5*s  +Lg6*s  +Lg7*s\n *      (the values of Lg1 to Lg7 are listed in the program)\n *      and\n *          |      2          14          |     -58.45\n *          | Lg1*s +...+Lg7*s    -  R(z) | <= 2\n *          |                             |\n *      Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.\n *      In order to guarantee error in log below 1ulp, we compute log\n *      by\n *              log(1+f) = f - s*(f - R)                (if f is not too large)\n *              log(1+f) = f - (hfsq - s*(hfsq+R)).     (better accuracy)\n *\n *      3. Finally,  log(x) = k*ln2 + log(1+f).\n *                          = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))\n *         Here ln2 is split into two floating point number:\n *                      ln2_hi + ln2_lo,\n *         where n*ln2_hi is always exact for |n| < 2000.\n *\n * Special cases:\n *      log(x) is NaN with signal if x < 0 (including -INF) ;\n *      log(+INF) is +INF; log(0) is -INF with signal;\n *      log(NaN) is that NaN with no signal.\n *\n * Accuracy:\n *      according to an error analysis, the error is always less than\n *      1 ulp (unit in the last place).\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following\n * constants. The decimal values may be used, provided that the\n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n */\n\n#define zero   0.0\n#define ln2_hi 6.93147180369123816490e-01 /* 3fe62e42 fee00000 */\n#define ln2_lo 1.90821492927058770002e-10 /* 3dea39ef 35793c76 */\n#define two54  1.80143985094819840000e+16 /* 43500000 00000000 */\n#define Lg1    6.666666666666735130e-01 /* 3FE55555 55555593 */\n#define Lg2    3.999999999940941908e-01 /* 3FD99999 9997FA04 */\n#define Lg3    2.857142874366239149e-01 /* 3FD24924 94229359 */\n#define Lg4    2.222219843214978396e-01 /* 3FCC71C5 1D8E78AF */\n#define Lg5    1.818357216161805012e-01 /* 3FC74664 96CB03DE */\n#define Lg6    1.531383769920937332e-01 /* 3FC39A09 D078C69F */\n#define Lg7    1.479819860511658591e-01 /* 3FC2F112 DF3E5244 */\n\ndouble\nlog (double x)\n{\n  double hfsq, f, s, z, R, w, t1, t2, dk;\n  int k, hx, i, j;\n  unsigned lx;\n\n  hx = __HI (x); /* high word of x */\n  lx = __LO (x); /* low  word of x */\n\n  k = 0;\n  if (hx < 0x00100000) /* x < 2**-1022  */\n  {\n    if (((hx & 0x7fffffff) | lx) == 0) /* log(+-0) = -inf */\n    {\n      return -two54 / zero;\n    }\n    if (hx < 0) /* log(-#) = NaN */\n    {\n      return (x - x) / zero;\n    }\n    k -= 54;\n    x *= two54; /* subnormal number, scale up x */\n    hx = __HI (x); /* high word of x */\n  }\n  if (hx >= 0x7ff00000)\n  {\n    return x + x;\n  }\n  k += (hx >> 20) - 1023;\n  hx &= 0x000fffff;\n  i = (hx + 0x95f64) & 0x100000;\n\n  double_accessor temp;\n  temp.dbl = x;\n  temp.as_int.hi = hx | (i ^ 0x3ff00000); /* normalize x or x / 2 */\n  k += (i >> 20);\n  f = temp.dbl - 1.0;\n\n  if ((0x000fffff & (2 + hx)) < 3) /* |f| < 2**-20 */\n  {\n    if (f == zero)\n    {\n      if (k == 0)\n      {\n        return zero;\n      }\n      else\n      {\n        dk = (double) k;\n        return dk * ln2_hi + dk * ln2_lo;\n      }\n    }\n    R = f * f * (0.5 - 0.33333333333333333 * f);\n    if (k == 0)\n    {\n      return f - R;\n    }\n    else\n    {\n      dk = (double) k;\n      return dk * ln2_hi - ((R - dk * ln2_lo) - f);\n    }\n  }\n  s = f / (2.0 + f);\n  dk = (double) k;\n  z = s * s;\n  i = hx - 0x6147a;\n  w = z * z;\n  j = 0x6b851 - hx;\n  t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n  t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n  i |= j;\n  R = t2 + t1;\n  if (i > 0)\n  {\n    hfsq = 0.5 * f * f;\n    if (k == 0)\n    {\n      return f - (hfsq - s * (hfsq + R));\n    }\n    else\n    {\n      return dk * ln2_hi - ((hfsq - (s * (hfsq + R) + dk * ln2_lo)) - f);\n    }\n  }\n  else\n  {\n    if (k == 0)\n    {\n      return f - s * (f - R);\n    }\n    else\n    {\n      return dk * ln2_hi - ((s * (f - R) - dk * ln2_lo) - f);\n    }\n  }\n} /* log */\n\n#undef zero\n#undef ln2_hi\n#undef ln2_lo\n#undef two54\n#undef Lg1\n#undef Lg2\n#undef Lg3\n#undef Lg4\n#undef Lg5\n#undef Lg6\n#undef Lg7\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/log10.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_log10.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* log10(x)\n * Return the base 10 logarithm of x\n *\n * Method :\n *  Let log10_2hi = leading 40 bits of log10(2) and\n *      log10_2lo = log10(2) - log10_2hi,\n *      ivln10   = 1/log(10) rounded.\n *  Then\n *    n = ilogb(x),\n *    if(n<0)  n = n+1;\n *    x = scalbn(x,-n);\n *    log10(x) := n*log10_2hi + (n*log10_2lo + ivln10*log(x))\n *\n * Note 1:\n *  To guarantee log10(10**n)=n, where 10**n is normal, the rounding\n *  mode must set to Round-to-Nearest.\n * Note 2:\n *  [1/log(10)] rounded to 53 bits has error  .198   ulps;\n *  log10 is monotonic at all binary break points.\n *\n * Special cases:\n *  log10(x) is NaN with signal if x < 0;\n *  log10(+INF) is +INF with no signal; log10(0) is -INF with signal;\n *  log10(NaN) is that NaN with no signal;\n *  log10(10**N) = N  for N=0,1,...,22.\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following constants.\n * The decimal values may be used, provided that the compiler will convert\n * from decimal to binary accurately enough to produce the hexadecimal values\n * shown.\n */\n\n#define zero 0.0\n#define two54 1.80143985094819840000e+16     /* 0x43500000, 0x00000000 */\n#define ivln10 4.34294481903251816668e-01    /* 0x3FDBCB7B, 0x1526E50E */\n#define log10_2hi 3.01029995663611771306e-01 /* 0x3FD34413, 0x509F6000 */\n#define log10_2lo 3.69423907715893078616e-13 /* 0x3D59FEF3, 0x11F12B36 */\n\ndouble\nlog10 (double x)\n{\n  double y, z;\n  int i, k, hx;\n  unsigned lx;\n  double_accessor temp;\n\n  hx = __HI (x); /* high word of x */\n  lx = __LO (x); /* low word of x */\n\n  k = 0;\n  if (hx < 0x00100000)\n  {\n    /* x < 2**-1022  */\n    if (((hx & 0x7fffffff) | lx) == 0)\n    {\n      /* log(+-0)=-inf */\n      return -two54 / zero;\n    }\n    if (hx < 0)\n    {\n      /* log(-#) = NaN */\n      return (x - x) / zero;\n    }\n    k -= 54;\n    x *= two54;    /* subnormal number, scale up x */\n    hx = __HI (x); /* high word of x */\n  }\n  if (hx >= 0x7ff00000)\n  {\n    return x + x;\n  }\n  k += (hx >> 20) - 1023;\n  i = ((unsigned) k & 0x80000000) >> 31;\n  hx = (hx & 0x000fffff) | ((0x3ff - i) << 20);\n  y = (double) (k + i);\n  temp.dbl = x;\n  temp.as_int.hi = hx;\n  z = y * log10_2lo + ivln10 * log (temp.dbl);\n  return z + y * log10_2hi;\n} /* log10 */\n\n#undef zero\n#undef two54\n#undef ivln10\n#undef log10_2hi\n#undef log10_2lo\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/log1p.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_log1p.c 5.1 93/09/24\n */\n\n#include \"jerry-math-internal.h\"\n\n/* log1p(x)\n * Method :\n *   1. Argument Reduction: find k and f such that\n *      1+x = 2^k * (1+f),\n *     where  sqrt(2)/2 < 1+f < sqrt(2) .\n *\n *      Note. If k=0, then f=x is exact. However, if k!=0, then f\n *  may not be representable exactly. In that case, a correction\n *  term is need. Let u=1+x rounded. Let c = (1+x)-u, then\n *  log(1+x) - log(u) ~ c/u. Thus, we proceed to compute log(u),\n *  and add back the correction term c/u.\n *  (Note: when x > 2**53, one can simply return log(x))\n *\n *   2. Approximation of log1p(f).\n *  Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)\n *     = 2s + 2/3 s**3 + 2/5 s**5 + .....,\n *          = 2s + s*R\n *      We use a special Reme algorithm on [0,0.1716] to generate\n *   a polynomial of degree 14 to approximate R The maximum error\n *  of this polynomial approximation is bounded by 2**-58.45. In\n *  other words,\n *            2      4      6      8      10      12      14\n *      R(z) ~ Lp1*s +Lp2*s +Lp3*s +Lp4*s +Lp5*s  +Lp6*s  +Lp7*s\n *    (the values of Lp1 to Lp7 are listed in the program)\n *  and\n *      |      2          14          |     -58.45\n *      | Lp1*s +...+Lp7*s    -  R(z) | <= 2\n *      |                             |\n *  Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.\n *  In order to guarantee error in log below 1ulp, we compute log\n *  by\n *    log1p(f) = f - (hfsq - s*(hfsq+R)).\n *\n *  3. Finally, log1p(x) = k*ln2 + log1p(f).\n *            = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))\n *     Here ln2 is split into two floating point number:\n *      ln2_hi + ln2_lo,\n *     where n*ln2_hi is always exact for |n| < 2000.\n *\n * Special cases:\n *  log1p(x) is NaN with signal if x < -1 (including -INF) ;\n *  log1p(+INF) is +INF; log1p(-1) is -INF with signal;\n *  log1p(NaN) is that NaN with no signal.\n *\n * Accuracy:\n *  according to an error analysis, the error is always less than\n *  1 ulp (unit in the last place).\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following\n * constants. The decimal values may be used, provided that the\n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n *\n * Note: Assuming log() return accurate answer, the following\n *    algorithm can be used to compute log1p(x) to within a few ULP:\n *\n *    u = 1+x;\n *    if(u==1.0) return x ; else\n *         return log(u)*(x/(u-1.0));\n *\n *   See HP-15C Advanced Functions Handbook, p.193.\n */\n\n#define zero 0.0\n#define ln2_hi 6.93147180369123816490e-01 /* 3fe62e42 fee00000 */\n#define ln2_lo 1.90821492927058770002e-10 /* 3dea39ef 35793c76 */\n#define two54 1.80143985094819840000e+16  /* 43500000 00000000 */\n#define Lp1 6.666666666666735130e-01      /* 3FE55555 55555593 */\n#define Lp2 3.999999999940941908e-01      /* 3FD99999 9997FA04 */\n#define Lp3 2.857142874366239149e-01      /* 3FD24924 94229359 */\n#define Lp4 2.222219843214978396e-01      /* 3FCC71C5 1D8E78AF */\n#define Lp5 1.818357216161805012e-01      /* 3FC74664 96CB03DE */\n#define Lp6 1.531383769920937332e-01      /* 3FC39A09 D078C69F */\n#define Lp7 1.479819860511658591e-01      /* 3FC2F112 DF3E5244 */\n\ndouble\nlog1p (double x)\n{\n  double hfsq, f, c, s, z, R;\n  double_accessor u;\n  int k, hx, hu, ax;\n\n  hx = __HI (x);\n  ax = hx & 0x7fffffff;\n  c = 0;\n  k = 1;\n  if (hx < 0x3FDA827A)\n  {\n    /* 1+x < sqrt(2)+ */\n    if (ax >= 0x3ff00000)\n    {\n      /* x <= -1.0 */\n      if (x == -1.0)\n      {\n        /* log1p(-1) = -inf */\n        return -two54 / zero;\n      }\n      else\n      {\n        /* log1p(x<-1) = NaN */\n        return NAN;\n      }\n    }\n    if (ax < 0x3e200000)\n    {                         /* |x| < 2**-29 */\n      if ((two54 + x > zero)    /* raise inexact */\n          && (ax < 0x3c900000)) /* |x| < 2**-54 */\n      {\n        return x;\n      }\n      else\n      {\n        return x - x * x * 0.5;\n      }\n    }\n    if ((hx > 0) || hx <= ((int) 0xbfd2bec4))\n    {\n      /* sqrt(2)/2- <= 1+x < sqrt(2)+ */\n      k = 0;\n      f = x;\n      hu = 1;\n    }\n  }\n  if (hx >= 0x7ff00000)\n  {\n    return x + x;\n  }\n  if (k != 0)\n  {\n    if (hx < 0x43400000)\n    {\n      u.dbl = 1.0 + x;\n      hu = u.as_int.hi;\n      k = (hu >> 20) - 1023;\n      c = (k > 0) ? 1.0 - (u.dbl - x) : x - (u.dbl - 1.0); /* correction term */\n      c /= u.dbl;\n    }\n    else\n    {\n      u.dbl = x;\n      hu = u.as_int.hi;\n      k = (hu >> 20) - 1023;\n      c = 0;\n    }\n    hu &= 0x000fffff;\n    /*\n     * The approximation to sqrt(2) used in thresholds is not\n     * critical.  However, the ones used above must give less\n     * strict bounds than the one here so that the k==0 case is\n     * never reached from here, since here we have committed to\n     * using the correction term but don't use it if k==0.\n     */\n    if (hu < 0x6a09e)\n    {\n      /* u ~< sqrt(2) */\n      u.as_int.hi = hu | 0x3ff00000; /* normalize u */\n    }\n    else\n    {\n      k += 1;\n      u.as_int.hi = hu | 0x3fe00000; /* normalize u/2 */\n      hu = (0x00100000 - hu) >> 2;\n    }\n    f = u.dbl - 1.0;\n  }\n  hfsq = 0.5 * f * f;\n  if (hu == 0)\n  {\n    /* |f| < 2**-20 */\n    if (f == zero)\n    {\n      if (k == 0)\n      {\n        return zero;\n      }\n      else\n      {\n        c += k * ln2_lo;\n        return k * ln2_hi + c;\n      }\n    }\n    R = hfsq * (1.0 - 0.66666666666666666 * f);\n    if (k == 0)\n    {\n      return f - R;\n    }\n    else\n    {\n      return k * ln2_hi - ((R - (k * ln2_lo + c)) - f);\n    }\n  }\n  s = f / (2.0 + f);\n  z = s * s;\n  R = z * (Lp1 +\n           z * (Lp2 + z * (Lp3 + z * (Lp4 + z * (Lp5 + z * (Lp6 + z * Lp7))))));\n  if (k == 0)\n  {\n    return f - (hfsq - s * (hfsq + R));\n  }\n  else\n  {\n    return k * ln2_hi - ((hfsq - (s * (hfsq + R) + (k * ln2_lo + c))) - f);\n  }\n} /* log1p */\n\n#undef zero\n#undef ln2_hi\n#undef ln2_lo\n#undef two54\n#undef Lp1\n#undef Lp2\n#undef Lp3\n#undef Lp4\n#undef Lp5\n#undef Lp6\n#undef Lp7\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/log2.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_log2.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* log2(x)\n * Return the base 2 logarithm of x.  See e_log.c and k_log.h for most\n * comments.\n *\n * This reduces x to {k, 1+f} exactly as in e_log.c, then calls the kernel,\n * then does the combining and scaling steps\n *    log2(x) = (f - 0.5*f*f + k_log1p(f)) / ln2 + k\n * in not-quite-routine extra precision.\n */\n\n#define zero 0.0\n#define two54 1.80143985094819840000e+16   /* 0x43500000, 0x00000000 */\n#define ivln2hi 1.44269504072144627571e+00 /* 0x3FF71547, 0x65200000 */\n#define ivln2lo 1.67517131648865118353e-10 /* 0x3DE705FC, 0x2EEFA200 */\n#define Lg1 6.666666666666735130e-01       /* 0x3FE55555, 0x55555593 */\n#define Lg2 3.999999999940941908e-01       /* 0x3FD99999, 0x9997FA04 */\n#define Lg3 2.857142874366239149e-01       /* 0x3FD24924, 0x94229359 */\n#define Lg4 2.222219843214978396e-01       /* 0x3FCC71C5, 0x1D8E78AF */\n#define Lg5 1.818357216161805012e-01       /* 0x3FC74664, 0x96CB03DE */\n#define Lg6 1.531383769920937332e-01       /* 0x3FC39A09, 0xD078C69F */\n#define Lg7 1.479819860511658591e-01       /* 0x3FC2F112, 0xDF3E5244 */\n\ndouble\nlog2 (double x)\n{\n  double f, hfsq, hi, lo, r, val_hi, val_lo, w, y;\n  int i, k, hx;\n  unsigned int lx;\n  double_accessor temp;\n\n  hx = __HI (x); /* high word of x */\n  lx = __LO (x); /* low word of x */\n\n  k = 0;\n  if (hx < 0x00100000)\n  { /* x < 2**-1022  */\n    if (((hx & 0x7fffffff) | lx) == 0)\n    {\n      return -two54 / zero; /* log(+-0)=-inf */\n    }\n    if (hx < 0)\n    {\n      return (x - x) / zero; /* log(-#) = NaN */\n    }\n    k -= 54;\n    x *= two54;    /* subnormal number, scale up x */\n    hx = __HI (x); /* high word of x */\n  }\n  if (hx >= 0x7ff00000)\n  {\n    return x + x;\n  }\n  if (hx == 0x3ff00000 && lx == 0)\n  {\n    return zero; /* log(1) = +0 */\n  }\n  k += (hx >> 20) - 1023;\n  hx &= 0x000fffff;\n  i = (hx + 0x95f64) & 0x100000;\n  temp.dbl = x;\n  temp.as_int.hi = hx | (i ^ 0x3ff00000); /* normalize x or x/2 */\n  k += (i >> 20);\n  y = (double) k;\n  f = temp.dbl - 1.0;\n  hfsq = 0.5 * f * f;\n  double s, z, R, t1, t2;\n\n  s = f / (2.0 + f);\n  z = s * s;\n  w = z * z;\n  t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n  t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n  R = t2 + t1;\n  r = s * (hfsq + R);\n  /*\n   * f-hfsq must (for args near 1) be evaluated in extra precision\n   * to avoid a large cancellation when x is near sqrt(2) or 1/sqrt(2).\n   * This is fairly efficient since f-hfsq only depends on f, so can\n   * be evaluated in parallel with R.  Not combining hfsq with R also\n   * keeps R small (though not as small as a true `lo' term would be),\n   * so that extra precision is not needed for terms involving R.\n   *\n   * Compiler bugs involving extra precision used to break Dekker's\n   * theorem for spitting f-hfsq as hi+lo, unless double_t was used\n   * or the multi-precision calculations were avoided when double_t\n   * has extra precision.  These problems are now automatically\n   * avoided as a side effect of the optimization of combining the\n   * Dekker splitting step with the clear-low-bits step.\n   *\n   * y must (for args near sqrt(2) and 1/sqrt(2)) be added in extra\n   * precision to avoid a very large cancellation when x is very near\n   * these values.  Unlike the above cancellations, this problem is\n   * specific to base 2.  It is strange that adding +-1 is so much\n   * harder than adding +-ln2 or +-log10_2.\n   *\n   * This uses Dekker's theorem to normalize y+val_hi, so the\n   * compiler bugs are back in some configurations, sigh.  And I\n   * don't want to used double_t to avoid them, since that gives a\n   * pessimization and the support for avoiding the pessimization\n   * is not yet available.\n   *\n   * The multi-precision calculations for the multiplications are\n   * routine.\n   */\n  hi = f - hfsq;\n  temp.dbl = hi;\n  temp.as_int.lo = 0;\n\n  lo = (f - hi) - hfsq + r;\n  val_hi = hi * ivln2hi;\n  val_lo = (lo + hi) * ivln2lo + lo * ivln2hi;\n\n  /* spadd(val_hi, val_lo, y), except for not using double_t: */\n  w = y + val_hi;\n  val_lo += (y - w) + val_hi;\n  val_hi = w;\n\n  return val_lo + val_hi;\n} /* log2 */\n\n#undef zero\n#undef two54\n#undef ivln2hi\n#undef ivln2lo\n#undef Lg1\n#undef Lg2\n#undef Lg3\n#undef Lg4\n#undef Lg5\n#undef Lg6\n#undef Lg7\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/nextafter.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_nextafter.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\ndouble\nnextafter (double x,\n           double y)\n{\n  int hx, hy, ix, iy;\n  unsigned lx, ly;\n  double_accessor ret;\n\n  hx = __HI (x); /* high word of x */\n  lx = __LO (x); /* low  word of x */\n  hy = __HI (y); /* high word of y */\n  ly = __LO (y); /* low  word of y */\n  ix = hx & 0x7fffffff; /* |x| */\n  iy = hy & 0x7fffffff; /* |y| */\n\n  if (((ix >= 0x7ff00000) && ((ix - 0x7ff00000) | lx) != 0)     /* x is nan */\n      || ((iy >= 0x7ff00000) && ((iy - 0x7ff00000) | ly) != 0)) /* y is nan */\n  {\n    return x + y;\n  }\n\n  if (x == y)\n  {\n    return x; /* x=y, return x */\n  }\n\n  if ((ix | lx) == 0)\n  { /* x == 0 */\n    ret.as_int.hi = hy & 0x80000000; /* return +-minsubnormal */\n    ret.as_int.lo = 1;\n    y = ret.dbl * ret.dbl;\n    if (y == ret.dbl)\n    {\n      return y;\n    }\n    else\n    {\n      return ret.dbl; /* raise underflow flag */\n    }\n  }\n\n  if (hx >= 0)\n  { /* x > 0 */\n    if (hx > hy || ((hx == hy) && (lx > ly)))\n    { /* x > y, x -= ulp */\n      if (lx == 0)\n      {\n        hx -= 1;\n      }\n\n      lx -= 1;\n    }\n    else\n    { /* x < y, x += ulp */\n      lx += 1;\n\n      if (lx == 0)\n      {\n        hx += 1;\n      }\n    }\n  }\n  else\n  { /* x < 0 */\n    if (hy >= 0 || hx > hy || ((hx == hy) && (lx > ly)))\n    { /* x < y, x -= ulp */\n      if (lx == 0)\n      {\n        hx -= 1;\n      }\n\n      lx -= 1;\n    }\n    else\n    { /* x > y, x += ulp */\n      lx += 1;\n\n      if (lx == 0)\n      {\n        hx += 1;\n      }\n    }\n  }\n\n  hy = hx & 0x7ff00000;\n\n  if (hy >= 0x7ff00000)\n  {\n    return x + x; /* overflow */\n  }\n\n  if (hy < 0x00100000)\n  { /* underflow */\n    y = x * x;\n    if (y != x)\n    { /* raise underflow flag */\n      ret.as_int.hi = hx;\n      ret.as_int.lo = lx;\n      return ret.dbl;\n    }\n  }\n\n  ret.as_int.hi = hx;\n  ret.as_int.lo = lx;\n  return ret.dbl;\n} /* nextafter */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/pow.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_pow.c 1.5 04/04/22\n */\n\n#include \"jerry-math-internal.h\"\n\n/* pow(x,y) return x**y\n *\n *                    n\n * Method:  Let x =  2   * (1+f)\n *      1. Compute and return log2(x) in two pieces:\n *              log2(x) = w1 + w2,\n *         where w1 has 53-24 = 29 bit trailing zeros.\n *      2. Perform y*log2(x) = n+y' by simulating muti-precision\n *         arithmetic, where |y'|<=0.5.\n *      3. Return x**y = 2**n*exp(y'*log2)\n *\n * Special cases:\n *      0.  +1 ** (anything) is 1\n *      1.  (anything) ** 0  is 1\n *      2.  (anything) ** 1  is itself\n *      3.  (anything) ** NAN is NAN\n *      4.  NAN ** (anything except 0) is NAN\n *      5.  +-(|x| > 1) **  +INF is +INF\n *      6.  +-(|x| > 1) **  -INF is +0\n *      7.  +-(|x| < 1) **  +INF is +0\n *      8.  +-(|x| < 1) **  -INF is +INF\n *      9.  -1          ** +-INF is 1\n *      10. +0 ** (+anything except 0, NAN)               is +0\n *      11. -0 ** (+anything except 0, NAN, odd integer)  is +0\n *      12. +0 ** (-anything except 0, NAN)               is +INF\n *      13. -0 ** (-anything except 0, NAN, odd integer)  is +INF\n *      14. -0 ** (odd integer) = -( +0 ** (odd integer) )\n *      15. +INF ** (+anything except 0,NAN) is +INF\n *      16. +INF ** (-anything except 0,NAN) is +0\n *      17. -INF ** (anything)  = -0 ** (-anything)\n *      18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer)\n *      19. (-anything except 0 and inf) ** (non-integer) is NAN\n *\n * Accuracy:\n *      pow(x,y) returns x**y nearly rounded. In particular\n *                      pow(integer,integer)\n *      always returns the correct integer provided it is\n *      representable.\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following\n * constants. The decimal values may be used, provided that the\n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n */\n\nstatic const double bp[] =\n{\n  1.0,\n  1.5,\n};\nstatic const double dp_h[] =\n{\n  0.0,\n  5.84962487220764160156e-01, /* 0x3FE2B803, 0x40000000 */\n};\nstatic const double dp_l[] =\n{\n  0.0,\n  1.35003920212974897128e-08, /* 0x3E4CFDEB, 0x43CFD006 */\n};\n\n#define zero     0.0\n#define one      1.0\n#define two      2.0\n#define two53    9007199254740992.0 /* 0x43400000, 0x00000000 */\n#define huge     1.0e300\n#define tiny     1.0e-300\n/* poly coefs for (3/2) * (log(x) - 2s - 2/3 * s**3 */\n#define L1       5.99999999999994648725e-01 /* 0x3FE33333, 0x33333303 */\n#define L2       4.28571428578550184252e-01 /* 0x3FDB6DB6, 0xDB6FABFF */\n#define L3       3.33333329818377432918e-01 /* 0x3FD55555, 0x518F264D */\n#define L4       2.72728123808534006489e-01 /* 0x3FD17460, 0xA91D4101 */\n#define L5       2.30660745775561754067e-01 /* 0x3FCD864A, 0x93C9DB65 */\n#define L6       2.06975017800338417784e-01 /* 0x3FCA7E28, 0x4A454EEF */\n#define P1       1.66666666666666019037e-01 /* 0x3FC55555, 0x5555553E */\n#define P2      -2.77777777770155933842e-03 /* 0xBF66C16C, 0x16BEBD93 */\n#define P3       6.61375632143793436117e-05 /* 0x3F11566A, 0xAF25DE2C */\n#define P4      -1.65339022054652515390e-06 /* 0xBEBBBD41, 0xC5D26BF1 */\n#define P5       4.13813679705723846039e-08 /* 0x3E663769, 0x72BEA4D0 */\n#define lg2      6.93147180559945286227e-01 /* 0x3FE62E42, 0xFEFA39EF */\n#define lg2_h    6.93147182464599609375e-01 /* 0x3FE62E43, 0x00000000 */\n#define lg2_l   -1.90465429995776804525e-09 /* 0xBE205C61, 0x0CA86C39 */\n#define ovt      8.0085662595372944372e-0017 /* -(1024-log2(ovfl+.5ulp)) */\n#define cp       9.61796693925975554329e-01 /* 0x3FEEC709, 0xDC3A03FD = 2 / (3 ln2) */\n#define cp_h     9.61796700954437255859e-01 /* 0x3FEEC709, 0xE0000000 = (float) cp */\n#define cp_l    -7.02846165095275826516e-09 /* 0xBE3E2FE0, 0x145B01F5 = tail of cp_h */\n#define ivln2    1.44269504088896338700e+00 /* 0x3FF71547, 0x652B82FE = 1 / ln2 */\n#define ivln2_h  1.44269502162933349609e+00 /* 0x3FF71547, 0x60000000 = 24b 1 / ln2 */\n#define ivln2_l  1.92596299112661746887e-08 /* 0x3E54AE0B, 0xF85DDF44 = 1 / ln2 tail */\n\ndouble\npow (double x, double y)\n{\n  double_accessor t1, ax, p_h, y1, t, z;\n  double z_h, z_l, p_l;\n  double t2, r, s, u, v, w;\n  int i, j, k, yisint, n;\n  int hx, hy, ix, iy;\n  unsigned lx, ly;\n\n  hx = __HI (x);\n  lx = __LO (x);\n  hy = __HI (y);\n  ly = __LO (y);\n  ix = hx & 0x7fffffff;\n  iy = hy & 0x7fffffff;\n\n  /* x == one: 1**y = 1 */\n  if (((hx - 0x3ff00000) | lx) == 0)\n  {\n    return one;\n  }\n\n  /* y == zero: x**0 = 1 */\n  if ((iy | ly) == 0)\n  {\n    return one;\n  }\n\n  /* +-NaN return x + y */\n  if (ix > 0x7ff00000 || ((ix == 0x7ff00000) && (lx != 0)) || iy > 0x7ff00000 || ((iy == 0x7ff00000) && (ly != 0)))\n  {\n    return x + y;\n  }\n\n  /* determine if y is an odd int when x < 0\n   * yisint = 0 ... y is not an integer\n   * yisint = 1 ... y is an odd int\n   * yisint = 2 ... y is an even int\n   */\n  yisint = 0;\n  if (hx < 0)\n  {\n    if (iy >= 0x43400000) /* even integer y */\n    {\n      yisint = 2;\n    }\n    else if (iy >= 0x3ff00000)\n    {\n      k = (iy >> 20) - 0x3ff; /* exponent */\n      if (k > 20)\n      {\n        j = ly >> (52 - k);\n        if ((j << (52 - k)) == ly)\n        {\n          yisint = 2 - (j & 1);\n        }\n      }\n      else if (ly == 0)\n      {\n        j = iy >> (20 - k);\n        if ((j << (20 - k)) == iy)\n        {\n          yisint = 2 - (j & 1);\n        }\n      }\n    }\n  }\n\n  /* special value of y */\n  if (ly == 0)\n  {\n    if (iy == 0x7ff00000) /* y is +-inf */\n    {\n      if (((ix - 0x3ff00000) | lx) == 0) /* +-1**+-inf is 1 */\n      {\n        return one;\n      }\n      else if (ix >= 0x3ff00000) /* (|x|>1)**+-inf = inf,0 */\n      {\n        return (hy >= 0) ? y : zero;\n      }\n      else /* (|x|<1)**-,+inf = inf,0 */\n      {\n        return (hy < 0) ? -y : zero;\n      }\n    }\n    if (iy == 0x3ff00000) /* y is +-1 */\n    {\n      if (hy < 0)\n      {\n        return one / x;\n      }\n      else\n      {\n        return x;\n      }\n    }\n    if (hy == 0x40000000) /* y is 2 */\n    {\n      return x * x;\n    }\n    if (hy == 0x3fe00000) /* y is 0.5 */\n    {\n      if (hx >= 0) /* x >= +0 */\n      {\n        return sqrt (x);\n      }\n    }\n  }\n\n  ax.dbl = fabs (x);\n  /* special value of x */\n  if (lx == 0)\n  {\n    if (ix == 0x7ff00000 || ix == 0 || ix == 0x3ff00000)\n    {\n      z.dbl = ax.dbl; /* x is +-0,+-inf,+-1 */\n      if (hy < 0)\n      {\n        z.dbl = one / z.dbl; /* z = (1 / |x|) */\n      }\n      if (hx < 0)\n      {\n        if (((ix - 0x3ff00000) | yisint) == 0)\n        {\n          z.dbl = NAN; /* (-1)**non-int is NaN */\n        }\n        else if (yisint == 1)\n        {\n          z.dbl = -z.dbl; /* (x<0)**odd = -(|x|**odd) */\n        }\n      }\n      return z.dbl;\n    }\n  }\n\n  n = (hx < 0) ? 0 : 1;\n\n  /* (x<0)**(non-int) is NaN */\n  if ((n | yisint) == 0)\n  {\n    return NAN;\n  }\n\n  s = one; /* s (sign of result -ve**odd) = -1 else = 1 */\n  if ((n | (yisint - 1)) == 0)\n  {\n    s = -one; /* (-ve)**(odd int) */\n  }\n\n  /* |y| is huge */\n  if (iy > 0x41e00000) /* if |y| > 2**31 */\n  {\n    if (iy > 0x43f00000) /* if |y| > 2**64, must o/uflow */\n    {\n      if (ix <= 0x3fefffff)\n      {\n        return (hy < 0) ? huge * huge : tiny * tiny;\n      }\n      if (ix >= 0x3ff00000)\n      {\n        return (hy > 0) ? huge * huge : tiny * tiny;\n      }\n    }\n    /* over/underflow if x is not close to one */\n    if (ix < 0x3fefffff)\n    {\n      return (hy < 0) ? s * huge * huge : s * tiny * tiny;\n    }\n    if (ix > 0x3ff00000)\n    {\n      return (hy > 0) ? s * huge * huge : s * tiny * tiny;\n    }\n    /* now |1 - x| is tiny <= 2**-20, suffice to compute\n       log(x) by x - x^2 / 2 + x^3 / 3 - x^4 / 4 */\n    t.dbl = ax.dbl - one; /* t has 20 trailing zeros */\n    w = (t.dbl * t.dbl) * (0.5 - t.dbl * (0.3333333333333333333333 - t.dbl * 0.25));\n    u = ivln2_h * t.dbl; /* ivln2_h has 21 sig. bits */\n    v = t.dbl * ivln2_l - w * ivln2;\n    t1.dbl = u + v;\n    t1.as_int.lo = 0;\n    t2 = v - (t1.dbl - u);\n  }\n  else\n  {\n    double_accessor s_h, t_h;\n    double ss, s2, s_l, t_l;\n\n    n = 0;\n    /* take care subnormal number */\n    if (ix < 0x00100000)\n    {\n      ax.dbl *= two53;\n      n -= 53;\n      ix = ax.as_int.hi;\n    }\n    n += ((ix) >> 20) - 0x3ff;\n    j = ix & 0x000fffff;\n    /* determine interval */\n    ix = j | 0x3ff00000; /* normalize ix */\n    if (j <= 0x3988E) /* |x| < sqrt(3/2) */\n    {\n      k = 0;\n    }\n    else if (j < 0xBB67A) /* |x| < sqrt(3) */\n    {\n      k = 1;\n    }\n    else\n    {\n      k = 0;\n      n += 1;\n      ix -= 0x00100000;\n    }\n    ax.as_int.hi = ix;\n\n    /* compute ss = s_h + s_l = (x - 1) / (x + 1) or (x - 1.5) / (x + 1.5) */\n    u = ax.dbl - bp[k]; /* bp[0] = 1.0, bp[1] = 1.5 */\n    v = one / (ax.dbl + bp[k]);\n    ss = u * v;\n    s_h.dbl = ss;\n    s_h.as_int.lo = 0;\n    /* t_h = ax + bp[k] High */\n    t_h.dbl = zero;\n    t_h.as_int.hi = ((ix >> 1) | 0x20000000) + 0x00080000 + (k << 18);\n    t_l = ax.dbl - (t_h.dbl - bp[k]);\n    s_l = v * ((u - s_h.dbl * t_h.dbl) - s_h.dbl * t_l);\n    /* compute log(ax) */\n    s2 = ss * ss;\n    r = s2 * s2 * (L1 + s2 * (L2 + s2 * (L3 + s2 * (L4 + s2 * (L5 + s2 * L6)))));\n    r += s_l * (s_h.dbl + ss);\n    s2 = s_h.dbl * s_h.dbl;\n    t_h.dbl = 3.0 + s2 + r;\n    t_h.as_int.lo = 0;\n    t_l = r - ((t_h.dbl - 3.0) - s2);\n    /* u + v = ss * (1 + ...) */\n    u = s_h.dbl * t_h.dbl;\n    v = s_l * t_h.dbl + t_l * ss;\n    /* 2 / (3 * log2) * (ss + ...) */\n    p_h.dbl = u + v;\n    p_h.as_int.lo = 0;\n    p_l = v - (p_h.dbl - u);\n    z_h = cp_h * p_h.dbl; /* cp_h + cp_l = 2 / (3 * log2) */\n    z_l = cp_l * p_h.dbl + p_l * cp + dp_l[k];\n    /* log2(ax) = (ss + ...) * 2 / (3 * log2) = n + dp_h + z_h + z_l */\n    t.dbl = (double) n;\n    t1.dbl = (((z_h + z_l) + dp_h[k]) + t.dbl);\n    t1.as_int.lo = 0;\n    t2 = z_l - (((t1.dbl - t.dbl) - dp_h[k]) - z_h);\n  }\n\n  /* split up y into y1 + y2 and compute (y1 + y2) * (t1 + t2) */\n  y1.dbl = y;\n  y1.as_int.lo = 0;\n  p_l = (y - y1.dbl) * t1.dbl + y * t2;\n  p_h.dbl = y1.dbl * t1.dbl;\n  z.dbl = p_l + p_h.dbl;\n  j = z.as_int.hi;\n  i = z.as_int.lo;\n  if (j >= 0x40900000) /* z >= 1024 */\n  {\n    if (((j - 0x40900000) | i) != 0) /* if z > 1024 */\n    {\n      return s * huge * huge; /* overflow */\n    }\n    else\n    {\n      if (p_l + ovt > z.dbl - p_h.dbl)\n      {\n        return s * huge * huge; /* overflow */\n      }\n    }\n  }\n  else if ((j & 0x7fffffff) >= 0x4090cc00) /* z <= -1075 */\n  {\n    if (((j - 0xc090cc00) | i) != 0) /* z < -1075 */\n    {\n      return s * tiny * tiny; /* underflow */\n    }\n    else\n    {\n      if (p_l <= z.dbl - p_h.dbl)\n      {\n        return s * tiny * tiny; /* underflow */\n      }\n    }\n  }\n  /*\n   * compute 2**(p_h + p_l)\n   */\n  i = j & 0x7fffffff;\n  k = (i >> 20) - 0x3ff;\n  n = 0;\n  if (i > 0x3fe00000) /* if |z| > 0.5, set n = [z + 0.5] */\n  {\n    n = j + (0x00100000 >> (k + 1));\n    k = ((n & 0x7fffffff) >> 20) - 0x3ff; /* new k for n */\n    t.dbl = zero;\n    t.as_int.hi = (n & ~(0x000fffff >> k));\n    n = ((n & 0x000fffff) | 0x00100000) >> (20 - k);\n    if (j < 0)\n    {\n      n = -n;\n    }\n    p_h.dbl -= t.dbl;\n  }\n  t.dbl = p_l + p_h.dbl;\n  t.as_int.lo = 0;\n  u = t.dbl * lg2_h;\n  v = (p_l - (t.dbl - p_h.dbl)) * lg2 + t.dbl * lg2_l;\n  z.dbl = u + v;\n  w = v - (z.dbl - u);\n  t.dbl = z.dbl * z.dbl;\n  t1.dbl = z.dbl - t.dbl * (P1 + t.dbl * (P2 + t.dbl * (P3 + t.dbl * (P4 + t.dbl * P5))));\n  r = (z.dbl * t1.dbl) / (t1.dbl - two) - (w + z.dbl * w);\n  z.dbl = one - (r - z.dbl);\n  j = z.as_int.hi;\n  j += (n << 20);\n  if ((j >> 20) <= 0) /* subnormal output */\n  {\n    z.dbl = scalbn (z.dbl, n);\n  }\n  else\n  {\n    z.as_int.hi += (n << 20);\n  }\n  return s * z.dbl;\n} /* pow */\n\n#undef zero\n#undef one\n#undef two\n#undef two53\n#undef huge\n#undef tiny\n#undef L1\n#undef L2\n#undef L3\n#undef L4\n#undef L5\n#undef L6\n#undef P1\n#undef P2\n#undef P3\n#undef P4\n#undef P5\n#undef lg2\n#undef lg2_h\n#undef lg2_l\n#undef ovt\n#undef cp\n#undef cp_h\n#undef cp_l\n#undef ivln2\n#undef ivln2_h\n#undef ivln2_l\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/scalbn.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_scalbn.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* scalbn(x,n) returns x* 2**n  computed by  exponent\n * manipulation rather than by actually performing an\n * exponentiation or a multiplication.\n */\n\n#define two54  1.80143985094819840000e+16 /* 0x43500000, 0x00000000 */\n#define twom54 5.55111512312578270212e-17 /* 0x3C900000, 0x00000000 */\n#define huge   1.0e+300\n#define tiny   1.0e-300\n\ndouble\nscalbn (double x, int n)\n{\n  int k, hx, lx;\n\n  hx = __HI (x);\n  lx = __LO (x);\n  k = (hx & 0x7ff00000) >> 20; /* extract exponent */\n  if (k == 0) /* 0 or subnormal x */\n  {\n    if ((lx | (hx & 0x7fffffff)) == 0) /* +-0 */\n    {\n      return x;\n    }\n    x *= two54;\n    hx = __HI (x);\n    k = ((hx & 0x7ff00000) >> 20) - 54;\n    if (n < -50000) /*underflow */\n    {\n      return tiny * x;\n    }\n  }\n  if (k == 0x7ff) /* NaN or Inf */\n  {\n    return x + x;\n  }\n  k = k + n;\n  if (k > 0x7fe) /* overflow  */\n  {\n    return huge * copysign (huge, x);\n  }\n  if (k > 0) /* normal result */\n  {\n    double_accessor ret;\n    ret.dbl = x;\n    ret.as_int.hi = (hx & 0x800fffff) | (k << 20);\n    return ret.dbl;\n  }\n  if (k <= -54)\n  {\n    if (n > 50000) /* in case integer overflow in n + k */\n    {\n      return huge * copysign (huge, x); /*overflow */\n    }\n    else\n    {\n      return tiny * copysign (tiny, x); /*underflow */\n    }\n  }\n  k += 54; /* subnormal result */\n  double_accessor ret;\n  ret.dbl = x;\n  ret.as_int.hi = (hx & 0x800fffff) | (k << 20);\n  return ret.dbl * twom54;\n} /* scalbn */\n\n#undef two54\n#undef twom54\n#undef huge\n#undef tiny\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/sinh.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_sinh.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* __sinh(x)\n * Method:\n * mathematically sinh(x) if defined to be (exp(x) - exp(-x)) / 2\n *  1. Replace x by |x| (sinh(-x) = -sinh(x)).\n *  2.\n *                                             E + E/(E+1)\n *      0        <= x <= 22     :  sinh(x) := -------------, E = expm1(x)\n *                                                  2\n *\n *      22       <= x <= lnovft :  sinh(x) := exp(x) / 2\n *      lnovft   <= x <= ln2ovft:  sinh(x) := exp(x / 2) / 2 * exp(x / 2)\n *      ln2ovft  <  x           :  sinh(x) := x * shuge (overflow)\n *\n * Special cases:\n *  sinh(x) is |x| if x is +INF, -INF, or NaN.\n *  only sinh(0) = 0 is exact for finite x.\n */\n\n#define one 1.0\n#define half 0.5\n#define shuge 1.0e307\n\ndouble\nsinh (double x)\n{\n  double t, w, h;\n  int ix, jx;\n  unsigned lx;\n\n  /* High word of |x|. */\n  jx = __HI (x);\n  ix = jx & 0x7fffffff;\n\n  /* x is INF or NaN */\n  if (ix >= 0x7ff00000)\n  {\n    return x + x;\n  }\n\n  h = 0.5;\n  if (jx < 0)\n  {\n    h = -h;\n  }\n  /* |x| in [0,22], return sign(x) * 0.5 * (E + E / (E + 1))) */\n  if (ix < 0x40360000)\n  {\n    /* |x| < 22 */\n    if (ix < 0x3e300000)\n    {\n      /* |x| < 2**-28 */\n      if (shuge + x > one)\n      {\n        /* sinh(tiny) = tiny with inexact */\n        return x;\n      }\n    }\n    t = expm1 (fabs (x));\n    if (ix < 0x3ff00000)\n    {\n      return h * (2.0 * t - t * t / (t + one));\n    }\n    return h * (t + t / (t + one));\n  }\n\n  /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */\n  if (ix < 0x40862E42)\n  {\n    return h * exp (fabs (x));\n  }\n  /* |x| in [log(maxdouble), overflowthresold] */\n  lx = ((1 >> 29) + (unsigned int) x);\n  if (ix < 0x408633CE || ((ix == 0x408633ce) && (lx <= (unsigned) 0x8fb9f87d)))\n  {\n    w = exp (0.5 * fabs (x));\n    t = h * w;\n    return t * w;\n  }\n\n  /* |x| > overflowthresold, sinh(x) overflow */\n  return x * shuge;\n} /* sinh */\n\n#undef one\n#undef half\n#undef huge\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/sqrt.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)e_sqrt.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* sqrt(x)\n * Return correctly rounded sqrt.\n *\n *           ------------------------------------------\n *           |  Use the hardware sqrt if you have one |\n *           ------------------------------------------\n *\n * Method:\n *   Bit by bit method using integer arithmetic. (Slow, but portable)\n *   1. Normalization\n *      Scale x to y in [1,4) with even powers of 2:\n *      find an integer k such that  1 <= (y=x*2^(2k)) < 4, then\n *              sqrt(x) = 2^k * sqrt(y)\n *   2. Bit by bit computation\n *      Let q  = sqrt(y) truncated to i bit after binary point (q = 1),\n *           i                                                   0\n *                                     i+1         2\n *          s  = 2*q , and      y  =  2   * ( y - q  ).         (1)\n *           i      i            i                 i\n *\n *      To compute q    from q , one checks whether\n *                  i+1       i\n *\n *                            -(i+1) 2\n *                      (q + 2      ) <= y.                     (2)\n *                        i\n *                                                            -(i+1)\n *      If (2) is false, then q   = q ; otherwise q   = q  + 2      .\n *                             i+1   i             i+1   i\n *\n *      With some algebric manipulation, it is not difficult to see\n *      that (2) is equivalent to\n *                             -(i+1)\n *                      s  +  2       <= y                      (3)\n *                       i                i\n *\n *      The advantage of (3) is that s  and y  can be computed by\n *                                    i      i\n *      the following recurrence formula:\n *          if (3) is false\n *\n *          s     =  s  ,       y    = y   ;                    (4)\n *           i+1      i          i+1    i\n *\n *          otherwise,\n *                         -i                     -(i+1)\n *          s     =  s  + 2  ,  y    = y  -  s  - 2             (5)\n *           i+1      i          i+1    i     i\n *\n *      One may easily use induction to prove (4) and (5).\n *      Note. Since the left hand side of (3) contain only i+2 bits,\n *            it does not necessary to do a full (53-bit) comparison\n *            in (3).\n *   3. Final rounding\n *      After generating the 53 bits result, we compute one more bit.\n *      Together with the remainder, we can decide whether the\n *      result is exact, bigger than 1/2ulp, or less than 1/2ulp\n *      (it will never equal to 1/2ulp).\n *      The rounding mode can be detected by checking whether\n *      huge + tiny is equal to huge, and whether huge - tiny is\n *      equal to huge for some floating point number \"huge\" and \"tiny\".\n *\n * Special cases:\n *      sqrt(+-0) = +-0         ... exact\n *      sqrt(inf) = inf\n *      sqrt(-ve) = NaN         ... with invalid signal\n *      sqrt(NaN) = NaN         ... with invalid signal for signaling NaN\n *\n * Other methods: see the appended file at the end of the program below.\n */\n\n#define one  1.0\n#define tiny 1.0e-300\n\ndouble\nsqrt (double x)\n{\n  int sign = (int) 0x80000000;\n  unsigned r, t1, s1, ix1, q1;\n  int ix0, s0, q, m, t, i;\n\n  ix0 = __HI (x); /* high word of x */\n  ix1 = __LO (x); /* low word of x */\n\n  /* take care of Inf and NaN */\n  if ((ix0 & 0x7ff00000) == 0x7ff00000)\n  {\n    return x * x + x; /* sqrt(NaN) = NaN, sqrt(+inf) = +inf, sqrt(-inf) = sNaN */\n  }\n  /* take care of zero */\n  if (ix0 <= 0)\n  {\n    if (((ix0 & (~sign)) | ix1) == 0) /* sqrt(+-0) = +-0 */\n    {\n      return x;\n    }\n    else if (ix0 < 0) /* sqrt(-ve) = sNaN */\n    {\n      return NAN;\n    }\n  }\n  /* normalize x */\n  m = (ix0 >> 20);\n  if (m == 0) /* subnormal x */\n  {\n    while (ix0 == 0)\n    {\n      m -= 21;\n      ix0 |= (ix1 >> 11);\n      ix1 <<= 21;\n    }\n    for (i = 0; (ix0 & 0x00100000) == 0; i++)\n    {\n      ix0 <<= 1;\n    }\n    m -= i - 1;\n    ix0 |= (ix1 >> (32 - i));\n    ix1 <<= i;\n  }\n  m -= 1023; /* unbias exponent */\n  ix0 = (ix0 & 0x000fffff) | 0x00100000;\n  if (m & 1) /* odd m, double x to make it even */\n  {\n    ix0 += ix0 + ((ix1 & sign) >> 31);\n    ix1 += ix1;\n  }\n  m >>= 1; /* m = [m / 2] */\n\n  /* generate sqrt(x) bit by bit */\n  ix0 += ix0 + ((ix1 & sign) >> 31);\n  ix1 += ix1;\n  q = q1 = s0 = s1 = 0; /* [q,q1] = sqrt(x) */\n  r = 0x00200000; /* r = moving bit from right to left */\n\n  while (r != 0)\n  {\n    t = s0 + r;\n    if (t <= ix0)\n    {\n      s0 = t + r;\n      ix0 -= t;\n      q += r;\n    }\n    ix0 += ix0 + ((ix1 & sign) >> 31);\n    ix1 += ix1;\n    r >>= 1;\n  }\n\n  r = sign;\n  while (r != 0)\n  {\n    t1 = s1 + r;\n    t = s0;\n    if ((t < ix0) || ((t == ix0) && (t1 <= ix1)))\n    {\n      s1 = t1 + r;\n      if (((t1 & sign) == sign) && (s1 & sign) == 0)\n      {\n        s0 += 1;\n      }\n      ix0 -= t;\n      if (ix1 < t1)\n      {\n        ix0 -= 1;\n      }\n      ix1 -= t1;\n      q1 += r;\n    }\n    ix0 += ix0 + ((ix1 & sign) >> 31);\n    ix1 += ix1;\n    r >>= 1;\n  }\n\n  double_accessor ret;\n\n  /* use floating add to find out rounding direction */\n  if ((ix0 | ix1) != 0)\n  {\n    ret.dbl = one - tiny; /* trigger inexact flag */\n    if (ret.dbl >= one)\n    {\n      ret.dbl = one + tiny;\n      if (q1 == (unsigned) 0xffffffff)\n      {\n        q1 = 0;\n        q += 1;\n      }\n      else if (ret.dbl > one)\n      {\n        if (q1 == (unsigned) 0xfffffffe)\n        {\n          q += 1;\n        }\n        q1 += 2;\n      }\n      else\n      {\n        q1 += (q1 & 1);\n      }\n    }\n  }\n  ix0 = (q >> 1) + 0x3fe00000;\n  ix1 = q1 >> 1;\n  if ((q & 1) == 1)\n  {\n    ix1 |= sign;\n  }\n  ix0 += (m << 20);\n  ret.as_int.hi = ix0;\n  ret.as_int.lo = ix1;\n  return ret.dbl;\n} /* sqrt */\n\n#undef one\n#undef tiny\n\n/*\nOther methods  (use floating-point arithmetic)\n-------------\n(This is a copy of a drafted paper by Prof W. Kahan\nand K.C. Ng, written in May, 1986)\n\n        Two algorithms are given here to implement sqrt(x)\n        (IEEE double precision arithmetic) in software.\n        Both supply sqrt(x) correctly rounded. The first algorithm (in\n        Section A) uses newton iterations and involves four divisions.\n        The second one uses reciproot iterations to avoid division, but\n        requires more multiplications. Both algorithms need the ability\n        to chop results of arithmetic operations instead of round them,\n        and the INEXACT flag to indicate when an arithmetic operation\n        is executed exactly with no roundoff error, all part of the\n        standard (IEEE 754-1985). The ability to perform shift, add,\n        subtract and logical AND operations upon 32-bit words is needed\n        too, though not part of the standard.\n\nA.  sqrt(x) by Newton Iteration\n\n   (1)  Initial approximation\n\n        Let x0 and x1 be the leading and the trailing 32-bit words of\n        a floating point number x (in IEEE double format) respectively\n\n            1    11                  52                           ...widths\n           ------------------------------------------------------\n        x: |s|    e     |             f                         |\n           ------------------------------------------------------\n              msb    lsb  msb                                 lsb ...order\n\n             ------------------------        ------------------------\n        x0:  |s|   e    |    f1     |    x1: |          f2           |\n             ------------------------        ------------------------\n\n        By performing shifts and subtracts on x0 and x1 (both regarded\n        as integers), we obtain an 8-bit approximation of sqrt(x) as\n        follows.\n\n                k  := (x0>>1) + 0x1ff80000;\n                y0 := k - T1[31&(k>>15)].       ... y ~ sqrt(x) to 8 bits\n        Here k is a 32-bit integer and T1[] is an integer array containing\n        correction terms. Now magically the floating value of y (y's\n        leading 32-bit word is y0, the value of its trailing word is 0)\n        approximates sqrt(x) to almost 8-bit.\n\n        Value of T1:\n        static int T1[32]= {\n        0,      1024,   3062,   5746,   9193,   13348,  18162,  23592,\n        29598,  36145,  43202,  50740,  58733,  67158,  75992,  85215,\n        83599,  71378,  60428,  50647,  41945,  34246,  27478,  21581,\n        16499,  12183,  8588,   5674,   3403,   1742,   661,    130,};\n\n    (2) Iterative refinement\n\n        Apply Heron's rule three times to y, we have y approximates\n        sqrt(x) to within 1 ulp (Unit in the Last Place):\n\n                y := (y+x/y)/2          ... almost 17 sig. bits\n                y := (y+x/y)/2          ... almost 35 sig. bits\n                y := y-(y-x/y)/2        ... within 1 ulp\n\n        Remark 1.\n            Another way to improve y to within 1 ulp is:\n\n                y := (y+x/y)            ... almost 17 sig. bits to 2*sqrt(x)\n                y := y - 0x00100006     ... almost 18 sig. bits to sqrt(x)\n\n                                2\n                            (x-y )*y\n                y := y + 2* ----------  ...within 1 ulp\n                               2\n                             3y  + x\n\n        This formula has one division fewer than the one above; however,\n        it requires more multiplications and additions. Also x must be\n        scaled in advance to avoid spurious overflow in evaluating the\n        expression 3y*y+x. Hence it is not recommended uless division\n        is slow. If division is very slow, then one should use the\n        reciproot algorithm given in section B.\n\n    (3) Final adjustment\n\n        By twiddling y's last bit it is possible to force y to be\n        correctly rounded according to the prevailing rounding mode\n        as follows. Let r and i be copies of the rounding mode and\n        inexact flag before entering the square root program. Also we\n        use the expression y+-ulp for the next representable floating\n        numbers (up and down) of y. Note that y+-ulp = either fixed\n        point y+-1, or multiply y by nextafter(1,+-inf) in chopped\n        mode.\n\n        I := FALSE;     ... reset INEXACT flag I\n        R := RZ;        ... set rounding mode to round-toward-zero\n                z := x/y;       ... chopped quotient, possibly inexact\n                If(not I) then {        ... if the quotient is exact\n                    if(z=y) {\n                        I := i;  ... restore inexact flag\n                        R := r;  ... restore rounded mode\n                        return sqrt(x):=y.\n                    } else {\n                        z := z - ulp;   ... special rounding\n                    }\n                }\n                i := TRUE;              ... sqrt(x) is inexact\n                If (r=RN) then z=z+ulp  ... rounded-to-nearest\n                If (r=RP) then {        ... round-toward-+inf\n                    y = y+ulp; z=z+ulp;\n                }\n                y := y+z;               ... chopped sum\n                y0:=y0-0x00100000;      ... y := y/2 is correctly rounded.\n                I := i;                 ... restore inexact flag\n                R := r;                 ... restore rounded mode\n                return sqrt(x):=y.\n\n    (4) Special cases\n\n        Square root of +inf, +-0, or NaN is itself;\n        Square root of a negative number is NaN with invalid signal.\n\nB.  sqrt(x) by Reciproot Iteration\n\n   (1)  Initial approximation\n\n        Let x0 and x1 be the leading and the trailing 32-bit words of\n        a floating point number x (in IEEE double format) respectively\n        (see section A). By performing shifs and subtracts on x0 and y0,\n        we obtain a 7.8-bit approximation of 1/sqrt(x) as follows.\n\n            k := 0x5fe80000 - (x0>>1);\n            y0:= k - T2[63&(k>>14)].    ... y ~ 1/sqrt(x) to 7.8 bits\n\n        Here k is a 32-bit integer and T2[] is an integer array\n        containing correction terms. Now magically the floating\n        value of y (y's leading 32-bit word is y0, the value of\n        its trailing word y1 is set to zero) approximates 1/sqrt(x)\n        to almost 7.8-bit.\n\n        Value of T2:\n        static int T2[64]= {\n        0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866,\n        0xf14a, 0x1091b,0x11fcd,0x13552,0x14999,0x15c98,0x16e34,0x17e5f,\n        0x18d03,0x19a01,0x1a545,0x1ae8a,0x1b5c4,0x1bb01,0x1bfde,0x1c28d,\n        0x1c2de,0x1c0db,0x1ba73,0x1b11c,0x1a4b5,0x1953d,0x18266,0x16be0,\n        0x1683e,0x179d8,0x18a4d,0x19992,0x1a789,0x1b445,0x1bf61,0x1c989,\n        0x1d16d,0x1d77b,0x1dddf,0x1e2ad,0x1e5bf,0x1e6e8,0x1e654,0x1e3cd,\n        0x1df2a,0x1d635,0x1cb16,0x1be2c,0x1ae4e,0x19bde,0x1868e,0x16e2e,\n        0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd,};\n\n    (2) Iterative refinement\n\n        Apply Reciproot iteration three times to y and multiply the\n        result by x to get an approximation z that matches sqrt(x)\n        to about 1 ulp. To be exact, we will have\n                -1ulp < sqrt(x)-z<1.0625ulp.\n\n        ... set rounding mode to Round-to-nearest\n           y := y*(1.5-0.5*x*y*y)       ... almost 15 sig. bits to 1/sqrt(x)\n           y := y*((1.5-2^-30)+0.5*x*y*y)... about 29 sig. bits to 1/sqrt(x)\n        ... special arrangement for better accuracy\n           z := x*y                     ... 29 bits to sqrt(x), with z*y<1\n           z := z + 0.5*z*(1-z*y)       ... about 1 ulp to sqrt(x)\n\n        Remark 2. The constant 1.5-2^-30 is chosen to bias the error so that\n        (a) the term z*y in the final iteration is always less than 1;\n        (b) the error in the final result is biased upward so that\n                -1 ulp < sqrt(x) - z < 1.0625 ulp\n            instead of |sqrt(x)-z|<1.03125ulp.\n\n    (3) Final adjustment\n\n        By twiddling y's last bit it is possible to force y to be\n        correctly rounded according to the prevailing rounding mode\n        as follows. Let r and i be copies of the rounding mode and\n        inexact flag before entering the square root program. Also we\n        use the expression y+-ulp for the next representable floating\n        numbers (up and down) of y. Note that y+-ulp = either fixed\n        point y+-1, or multiply y by nextafter(1,+-inf) in chopped\n        mode.\n\n        R := RZ;                ... set rounding mode to round-toward-zero\n        switch(r) {\n            case RN:            ... round-to-nearest\n               if(x<= z*(z-ulp)...chopped) z = z - ulp; else\n               if(x<= z*(z+ulp)...chopped) z = z; else z = z+ulp;\n               break;\n            case RZ:case RM:    ... round-to-zero or round-to--inf\n               R:=RP;           ... reset rounding mod to round-to-+inf\n               if(x<z*z ... rounded up) z = z - ulp; else\n               if(x>=(z+ulp)*(z+ulp) ...rounded up) z = z+ulp;\n               break;\n            case RP:            ... round-to-+inf\n               if(x>(z+ulp)*(z+ulp)...chopped) z = z+2*ulp; else\n               if(x>z*z ...chopped) z = z+ulp;\n               break;\n        }\n\n        Remark 3. The above comparisons can be done in fixed point. For\n        example, to compare x and w=z*z chopped, it suffices to compare\n        x1 and w1 (the trailing parts of x and w), regarding them as\n        two's complement integers.\n\n        ...Is z an exact square root?\n        To determine whether z is an exact square root of x, let z1 be the\n        trailing part of z, and also let x0 and x1 be the leading and\n        trailing parts of x.\n\n        If ((z1&0x03ffffff)!=0) ... not exact if trailing 26 bits of z!=0\n            I := 1;             ... Raise Inexact flag: z is not exact\n        else {\n            j := 1 - [(x0>>20)&1]       ... j = logb(x) mod 2\n            k := z1 >> 26;              ... get z's 25-th and 26-th\n                                            fraction bits\n            I := i or (k&j) or ((k&(j+j+1))!=(x1&3));\n        }\n        R:= r           ... restore rounded mode\n        return sqrt(x):=z.\n\n        If multiplication is cheaper then the foregoing red tape, the\n        Inexact flag can be evaluated by\n\n            I := i;\n            I := (z*z!=x) or I.\n\n        Note that z*z can overwrite I; this value must be sensed if it is\n        True.\n\n        Remark 4. If z*z = x exactly, then bit 25 to bit 0 of z1 must be\n        zero.\n\n                    --------------------\n                z1: |        f2        |\n                    --------------------\n                bit 31             bit 0\n\n        Further more, bit 27 and 26 of z1, bit 0 and 1 of x1, and the odd\n        or even of logb(x) have the following relations:\n\n        -------------------------------------------------\n        bit 27,26 of z1         bit 1,0 of x1   logb(x)\n        -------------------------------------------------\n        00                      00              odd and even\n        01                      01              even\n        10                      10              odd\n        10                      00              even\n        11                      01              even\n        -------------------------------------------------\n\n    (4) Special cases (see (4) of Section A).\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/tanh.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)s_tanh.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n/* tanh(x)\n * Return the Hyperbolic Tangent of x\n *\n * Method:\n *                                 x   -x\n *                                e -  e\n *  0. tanh(x) is defined to be -----------\n *                                 x    -x\n *                                e  +  e\n *\n *  1. reduce x to non-negative by tanh(-x) = -tanh(x).\n *  2.  0      <= x <= 2**-55 : tanh(x) := x * (one + x)\n *\n *                                          -t\n *      2**-55 <  x <=  1     : tanh(x) := -----; t = expm1(-2x)\n *                                         t + 2\n *\n *                                               2\n *      1      <= x <=  22.0  : tanh(x) := 1-  ----- ; t = expm1(2x)\n *                                             t + 2\n *\n *      22.0   <  x <= INF    : tanh(x) := 1.\n *\n * Special cases:\n *  tanh(NaN) is NaN;\n *  only tanh(0) = 0 is exact for finite x.\n */\n#define one 1.0\n#define two 2.0\n#define tiny 1.0e-300\n\ndouble\ntanh (double x)\n{\n  double t, z;\n  int jx, ix;\n\n  /* High word of |x|. */\n  jx = __HI (x);\n  ix = jx & 0x7fffffff;\n\n  /* x is INF or NaN */\n  if (ix >= 0x7ff00000)\n  {\n    if (jx >= 0)\n    {\n      /* tanh(+-inf) = +-1 */\n      return one / x + one;\n    }\n    else\n    {\n      /* tanh(NaN) = NaN */\n      return one / x - one;\n    }\n  }\n\n  /* |x| < 22 */\n  if (ix < 0x40360000)\n  {\n    /* |x| < 2**-55 */\n    if (ix < 0x3c800000)\n    {\n      /* tanh(small) = small */\n      return x * (one + x);\n    }\n    if (ix >= 0x3ff00000)\n    {\n      /* |x| >= 1  */\n      t = expm1 (two * fabs (x));\n      z = one - two / (t + two);\n    }\n    else\n    {\n      t = expm1 (-two * fabs (x));\n      z = -t / (t + two);\n    }\n  }\n  else\n  {\n    /* |x| > 22, return +-1 */\n    z = one - tiny; /* raised inexact flag */\n  }\n  return (jx >= 0) ? z : -z;\n} /* tanh */\n\n#undef one\n#undef two\n#undef tiny\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-math/trig.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is based on work under the following copyright and permission\n * notice:\n *\n *     Copyright (C) 1993, 2004 by Sun Microsystems, Inc. All rights reserved.\n *\n *     Developed at SunSoft, a Sun Microsystems, Inc. business.\n *     Permission to use, copy, modify, and distribute this\n *     software is freely granted, provided that this notice\n *     is preserved.\n *\n *     @(#)k_rem_pio2.c 1.3 95/01/18\n *     @(#)e_rem_pio2.c 1.4 95/01/18\n *     @(#)k_sin.c 1.3 95/01/18\n *     @(#)k_cos.c 1.3 95/01/18\n *     @(#)k_tan.c 1.5 04/04/22\n *     @(#)s_sin.c 1.3 95/01/18\n *     @(#)s_cos.c 1.3 95/01/18\n *     @(#)s_tan.c 1.3 95/01/18\n */\n\n#include \"jerry-math-internal.h\"\n\n#define zero    0.00000000000000000000e+00 /* 0x00000000, 0x00000000 */\n#define half    5.00000000000000000000e-01 /* 0x3FE00000, 0x00000000 */\n#define one     1.00000000000000000000e+00 /* 0x3FF00000, 0x00000000 */\n#define two24   1.67772160000000000000e+07 /* 0x41700000, 0x00000000 */\n#define twon24  5.96046447753906250000e-08 /* 0x3E700000, 0x00000000 */\n\n/* __kernel_rem_pio2(x,y,e0,nx,prec)\n * double x[],y[]; int e0,nx,prec;\n *\n * __kernel_rem_pio2 return the last three digits of N with\n *              y = x - N*pi/2\n * so that |y| < pi/2.\n *\n * The method is to compute the integer (mod 8) and fraction parts of\n * (2/pi)*x without doing the full multiplication. In general we\n * skip the part of the product that are known to be a huge integer (\n * more accurately, = 0 mod 8 ). Thus the number of operations are\n * independent of the exponent of the input.\n *\n * (2/pi) is represented by an array of 24-bit integers in ipio2[].\n *\n * Input parameters:\n *      x[]     The input value (must be positive) is broken into nx\n *              pieces of 24-bit integers in double precision format.\n *              x[i] will be the i-th 24 bit of x. The scaled exponent\n *              of x[0] is given in input parameter e0 (i.e., x[0]*2^e0\n *              match x's up to 24 bits.\n *\n *              Example of breaking a double positive z into x[0]+x[1]+x[2]:\n *                      e0 = ilogb(z)-23\n *                      z  = scalbn(z,-e0)\n *              for i = 0,1,2\n *                      x[i] = floor(z)\n *                      z    = (z-x[i])*2**24\n *\n *      y[]     ouput result in an array of double precision numbers.\n *              The dimension of y[] is:\n *                      24-bit  precision       1\n *                      53-bit  precision       2\n *                      64-bit  precision       2\n *                      113-bit precision       3\n *              The actual value is the sum of them. Thus for 113-bit\n *              precison, one may have to do something like:\n *\n *              long double t,w,r_head, r_tail;\n *              t = (long double)y[2] + (long double)y[1];\n *              w = (long double)y[0];\n *              r_head = t+w;\n *              r_tail = w - (r_head - t);\n *\n *      e0      The exponent of x[0]\n *\n *      nx      dimension of x[]\n *\n *      prec    an integer indicating the precision:\n *                      0       24  bits (single)\n *                      1       53  bits (double)\n *                      2       64  bits (extended)\n *                      3       113 bits (quad)\n *\n * External function:\n *      double scalbn(), floor();\n *\n * Here is the description of some local variables:\n *\n *      ipio2[] integer array, contains the (24*i)-th to (24*i+23)-th\n *              bit of 2/pi after binary point. The corresponding\n *              floating value is\n *\n *                      ipio2[i] * 2^(-24(i+1)).\n *\n *      jk      jk+1 is the initial number of terms of ipio2[] needed\n *              in the computation. The recommended value is 2,3,4,\n *              6 for single, double, extended,and quad.\n *\n *      jz      local integer variable indicating the number of\n *              terms of ipio2[] used.\n *\n *      jx      nx - 1\n *\n *      jv      index for pointing to the suitable ipio2[] for the\n *              computation. In general, we want\n *                      ( 2^e0*x[0] * ipio2[jv-1]*2^(-24jv) )/8\n *              is an integer. Thus\n *                      e0-3-24*jv >= 0 or (e0-3)/24 >= jv\n *              Hence jv = max(0,(e0-3)/24).\n *\n *      jp      jp+1 is the number of terms in PIo2[] needed, jp = jk.\n *\n *      q[]     double array with integral value, representing the\n *              24-bits chunk of the product of x and 2/pi.\n *\n *      q0      the corresponding exponent of q[0]. Note that the\n *              exponent for q[i] would be q0-24*i.\n *\n *      PIo2[]  double precision array, obtained by cutting pi/2\n *              into 24 bits chunks.\n *\n *      f[]     ipio2[] in floating point\n *\n *      iq[]    integer array by breaking up q[] in 24-bits chunk.\n *\n *      fq[]    final product of x*(2/pi) in fq[0],..,fq[jk]\n *\n *      ih      integer. If >0 it indicates q[] is >= 0.5, hence\n *              it also indicates the *sign* of the result.\n */\n\n/*\n * Constants:\n * The hexadecimal values are the intended ones for the following\n * constants. The decimal values may be used, provided that the\n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n */\n\n/* initial value for jk */\nstatic const int init_jk[] =\n{\n  2, 3, 4, 6\n};\n\nstatic const double PIo2[] =\n{\n  1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */\n  7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */\n  5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */\n  3.28200341580791294123e-22, /* 0x3B78CC51, 0x60000000 */\n  1.27065575308067607349e-29, /* 0x39F01B83, 0x80000000 */\n  1.22933308981111328932e-36, /* 0x387A2520, 0x40000000 */\n  2.73370053816464559624e-44, /* 0x36E38222, 0x80000000 */\n  2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */\n};\n\n/*\n * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi\n */\nstatic const int ipio2[] =\n{\n  0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,\n  0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,\n  0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,\n  0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,\n  0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,\n  0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,\n  0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,\n  0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,\n  0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,\n  0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,\n  0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,\n};\n\nstatic int\n__kernel_rem_pio2 (double *x, double *y, int e0, int nx, int prec)\n{\n  int jz, jx, jv, jp, jk, carry, n, iq[20], i, j, k, m, q0, ih;\n  double z, fw, f[20], fq[20], q[20];\n\n  /* initialize jk */\n  jk = init_jk[prec];\n  jp = jk;\n\n  /* determine jx, jv, q0, note that 3 > q0 */\n  jx = nx - 1;\n  jv = (e0 - 3) / 24;\n  if (jv < 0)\n  {\n    jv = 0;\n  }\n  q0 = e0 - 24 * (jv + 1);\n\n  /* set up f[0] to f[jx + jk] where f[jx + jk] = ipio2[jv + jk] */\n  j = jv - jx;\n  m = jx + jk;\n  for (i = 0; i <= m; i++, j++)\n  {\n    f[i] = (j < 0) ? zero : (double) ipio2[j];\n  }\n\n  /* compute q[0], q[1], ... q[jk] */\n  for (i = 0; i <= jk; i++)\n  {\n    for (j = 0, fw = 0.0; j <= jx; j++)\n    {\n      fw += x[j] * f[jx + i - j];\n    }\n    q[i] = fw;\n  }\n\n  jz = jk;\nrecompute:\n  /* distill q[] into iq[] reversingly */\n  for (i = 0, j = jz, z = q[jz]; j > 0; i++, j--)\n  {\n    fw = (double) ((int) (twon24 * z));\n    iq[i] = (int) (z - two24 * fw);\n    z = q[j - 1] + fw;\n  }\n\n  /* compute n */\n  z = scalbn (z, q0); /* actual value of z */\n  z -= 8.0 * floor (z * 0.125); /* trim off integer >= 8 */\n  n = (int) z;\n  z -= (double) n;\n  ih = 0;\n  if (q0 > 0) /* need iq[jz - 1] to determine n */\n  {\n    i = (iq[jz - 1] >> (24 - q0));\n    n += i;\n    iq[jz - 1] -= i << (24 - q0);\n    ih = iq[jz - 1] >> (23 - q0);\n  }\n  else if (q0 == 0)\n  {\n    ih = iq[jz - 1] >> 23;\n  }\n  else if (z >= 0.5)\n  {\n    ih = 2;\n  }\n\n  if (ih > 0) /* q > 0.5 */\n  {\n    n += 1;\n    carry = 0;\n    for (i = 0; i < jz; i++) /* compute 1 - q */\n    {\n      j = iq[i];\n      if (carry == 0)\n      {\n        if (j != 0)\n        {\n          carry = 1;\n          iq[i] = 0x1000000 - j;\n        }\n      }\n      else\n      {\n        iq[i] = 0xffffff - j;\n      }\n    }\n    if (q0 > 0) /* rare case: chance is 1 in 12 */\n    {\n      switch (q0)\n      {\n        case 1:\n        {\n          iq[jz - 1] &= 0x7fffff;\n          break;\n        }\n        case 2:\n        {\n          iq[jz - 1] &= 0x3fffff;\n          break;\n        }\n      }\n    }\n    if (ih == 2)\n    {\n      z = one - z;\n      if (carry != 0)\n      {\n        z -= scalbn (one, q0);\n      }\n    }\n  }\n\n  /* check if recomputation is needed */\n  if (z == zero)\n  {\n    j = 0;\n    for (i = jz - 1; i >= jk; i--)\n    {\n      j |= iq[i];\n    }\n    if (j == 0) /* need recomputation */\n    {\n      for (k = 1; iq[jk - k] == 0; k++) /* k = no. of terms needed */\n      {\n      }\n\n      for (i = jz + 1; i <= jz + k; i++) /* add q[jz + 1] to q[jz + k] */\n      {\n        f[jx + i] = (double) ipio2[jv + i];\n        for (j = 0, fw = 0.0; j <= jx; j++)\n        {\n          fw += x[j] * f[jx + i - j];\n        }\n        q[i] = fw;\n      }\n      jz += k;\n      goto recompute;\n    }\n  }\n\n  /* chop off zero terms */\n  if (z == 0.0)\n  {\n    jz -= 1;\n    q0 -= 24;\n    while (iq[jz] == 0)\n    {\n      jz--;\n      q0 -= 24;\n    }\n  }\n  else\n  { /* break z into 24-bit if necessary */\n    z = scalbn (z, -q0);\n    if (z >= two24)\n    {\n      fw = (double) ((int) (twon24 * z));\n      iq[jz] = (int) (z - two24 * fw);\n      jz += 1;\n      q0 += 24;\n      iq[jz] = (int) fw;\n    }\n    else\n    {\n      iq[jz] = (int) z;\n    }\n  }\n\n  /* convert integer \"bit\" chunk to floating-point value */\n  fw = scalbn (one, q0);\n  for (i = jz; i >= 0; i--)\n  {\n    q[i] = fw * (double) iq[i];\n    fw *= twon24;\n  }\n\n  /* compute PIo2[0, ..., jp] * q[jz, ..., 0] */\n  for (i = jz; i >= 0; i--)\n  {\n    for (fw = 0.0, k = 0; k <= jp && k <= jz - i; k++)\n    {\n      fw += PIo2[k] * q[i + k];\n    }\n    fq[jz - i] = fw;\n  }\n\n  /* compress fq[] into y[] */\n  switch (prec)\n  {\n    case 0:\n    {\n      fw = 0.0;\n      for (i = jz; i >= 0; i--)\n      {\n        fw += fq[i];\n      }\n      y[0] = (ih == 0) ? fw : -fw;\n      break;\n    }\n    case 1:\n    case 2:\n    {\n      fw = 0.0;\n      for (i = jz; i >= 0; i--)\n      {\n        fw += fq[i];\n      }\n      y[0] = (ih == 0) ? fw : -fw;\n      fw = fq[0] - fw;\n      for (i = 1; i <= jz; i++)\n      {\n        fw += fq[i];\n      }\n      y[1] = (ih == 0) ? fw : -fw;\n      break;\n    }\n    case 3: /* painful */\n    {\n      for (i = jz; i > 0; i--)\n      {\n        fw = fq[i - 1] + fq[i];\n        fq[i] += fq[i - 1] - fw;\n        fq[i - 1] = fw;\n      }\n      for (i = jz; i > 1; i--)\n      {\n        fw = fq[i - 1] + fq[i];\n        fq[i] += fq[i - 1] - fw;\n        fq[i - 1] = fw;\n      }\n      for (fw = 0.0, i = jz; i >= 2; i--)\n      {\n        fw += fq[i];\n      }\n      if (ih == 0)\n      {\n        y[0] = fq[0];\n        y[1] = fq[1];\n        y[2] = fw;\n      }\n      else\n      {\n        y[0] = -fq[0];\n        y[1] = -fq[1];\n        y[2] = -fw;\n      }\n    }\n  }\n  return n & 7;\n} /* __kernel_rem_pio2 */\n\n/* __ieee754_rem_pio2(x,y)\n * return the remainder of x rem pi/2 in y[0]+y[1]\n * use __kernel_rem_pio2()\n */\n\nstatic const int npio2_hw[] =\n{\n  0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C,\n  0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C,\n  0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,\n  0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,\n  0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB,\n  0x404858EB, 0x404921FB,\n};\n\n/*\n * invpio2:  53 bits of 2/pi\n * pio2_1:   first  33 bit of pi/2\n * pio2_1t:  pi/2 - pio2_1\n * pio2_2:   second 33 bit of pi/2\n * pio2_2t:  pi/2 - (pio2_1 + pio2_2)\n * pio2_3:   third  33 bit of pi/2\n * pio2_3t:  pi/2 - (pio2_1 + pio2_2 + pio2_3)\n */\n#define invpio2 6.36619772367581382433e-01 /* 0x3FE45F30, 0x6DC9C883 */\n#define pio2_1  1.57079632673412561417e+00 /* 0x3FF921FB, 0x54400000 */\n#define pio2_1t 6.07710050650619224932e-11 /* 0x3DD0B461, 0x1A626331 */\n#define pio2_2  6.07710050630396597660e-11 /* 0x3DD0B461, 0x1A600000 */\n#define pio2_2t 2.02226624879595063154e-21 /* 0x3BA3198A, 0x2E037073 */\n#define pio2_3  2.02226624871116645580e-21 /* 0x3BA3198A, 0x2E000000 */\n#define pio2_3t 8.47842766036889956997e-32 /* 0x397B839A, 0x252049C1 */\n\nstatic int\n__ieee754_rem_pio2 (double x, double *y)\n{\n  double_accessor z;\n  double w, t, r, fn;\n  double tx[3];\n  int e0, i, j, nx, n, ix, hx;\n\n  hx = __HI (x); /* high word of x */\n  ix = hx & 0x7fffffff;\n  if (ix <= 0x3fe921fb) /* |x| ~<= pi/4 , no need for reduction */\n  {\n    y[0] = x;\n    y[1] = 0;\n    return 0;\n  }\n  if (ix < 0x4002d97c) /* |x| < 3pi/4, special case with n = +-1 */\n  {\n    if (hx > 0)\n    {\n      z.dbl = x - pio2_1;\n      if (ix != 0x3ff921fb) /* 33 + 53 bit pi is good enough */\n      {\n        y[0] = z.dbl - pio2_1t;\n        y[1] = (z.dbl - y[0]) - pio2_1t;\n      }\n      else /* near pi/2, use 33 + 33 + 53 bit pi */\n      {\n        z.dbl -= pio2_2;\n        y[0] = z.dbl - pio2_2t;\n        y[1] = (z.dbl - y[0]) - pio2_2t;\n      }\n      return 1;\n    }\n    else /* negative x */\n    {\n      z.dbl = x + pio2_1;\n      if (ix != 0x3ff921fb) /* 33 + 53 bit pi is good enough */\n      {\n        y[0] = z.dbl + pio2_1t;\n        y[1] = (z.dbl - y[0]) + pio2_1t;\n      }\n      else /* near pi/2, use 33 + 33 + 53 bit pi */\n      {\n        z.dbl += pio2_2;\n        y[0] = z.dbl + pio2_2t;\n        y[1] = (z.dbl - y[0]) + pio2_2t;\n      }\n      return -1;\n    }\n  }\n  if (ix <= 0x413921fb) /* |x| ~<= 2^19 * (pi/2), medium size */\n  {\n    t = fabs (x);\n    n = (int) (t * invpio2 + half);\n    fn = (double) n;\n    r = t - fn * pio2_1;\n    w = fn * pio2_1t; /* 1st round good to 85 bit */\n    if (n < 32 && ix != npio2_hw[n - 1])\n    {\n      y[0] = r - w; /* quick check no cancellation */\n    }\n    else\n    {\n      j = ix >> 20;\n      y[0] = r - w;\n      i = j - (((__HI (y[0])) >> 20) & 0x7ff);\n      if (i > 16) /* 2nd iteration needed, good to 118 */\n      {\n        t = r;\n        w = fn * pio2_2;\n        r = t - w;\n        w = fn * pio2_2t - ((t - r) - w);\n        y[0] = r - w;\n        i = j - (((__HI (y[0])) >> 20) & 0x7ff);\n        if (i > 49) /* 3rd iteration need, 151 bits acc, will cover all possible cases */\n        {\n          t = r;\n          w = fn * pio2_3;\n          r = t - w;\n          w = fn * pio2_3t - ((t - r) - w);\n          y[0] = r - w;\n        }\n      }\n    }\n    y[1] = (r - y[0]) - w;\n    if (hx < 0)\n    {\n      y[0] = -y[0];\n      y[1] = -y[1];\n      return -n;\n    }\n    else\n    {\n      return n;\n    }\n  }\n  /*\n   * all other (large) arguments\n   */\n  if (ix >= 0x7ff00000) /* x is inf or NaN */\n  {\n    y[0] = y[1] = x - x;\n    return 0;\n  }\n  /* set z = scalbn(|x|, ilogb(x) - 23) */\n  z.as_int.lo = __LO (x);\n  e0 = (ix >> 20) - 1046; /* e0 = ilogb(z) - 23; */\n  z.as_int.hi = ix - (e0 << 20);\n  for (i = 0; i < 2; i++)\n  {\n    tx[i] = (double) ((int) (z.dbl));\n    z.dbl = (z.dbl - tx[i]) * two24;\n  }\n  tx[2] = z.dbl;\n  nx = 3;\n  while (tx[nx - 1] == zero) /* skip zero term */\n  {\n    nx--;\n  }\n  n = __kernel_rem_pio2 (tx, y, e0, nx, 2);\n  if (hx < 0)\n  {\n    y[0] = -y[0];\n    y[1] = -y[1];\n    return -n;\n  }\n  return n;\n} /* __ieee754_rem_pio2 */\n\n/* __kernel_sin( x, y, iy)\n * kernel sin function on [-pi/4, pi/4], pi/4 ~ 0.7854\n * Input x is assumed to be bounded by ~pi/4 in magnitude.\n * Input y is the tail of x.\n * Input iy indicates whether y is 0. (if iy=0, y assume to be 0).\n *\n * Algorithm\n *      1. Since sin(-x) = -sin(x), we need only to consider positive x.\n *      2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0.\n *      3. sin(x) is approximated by a polynomial of degree 13 on\n *         [0,pi/4]\n *                               3            13\n *              sin(x) ~ x + S1*x + ... + S6*x\n *         where\n *\n *      |sin(x)         2     4     6     8     10     12  |     -58\n *      |----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x  +S6*x   )| <= 2\n *      |  x                                               |\n *\n *      4. sin(x+y) = sin(x) + sin'(x')*y\n *                  ~ sin(x) + (1-x*x/2)*y\n *         For better accuracy, let\n *                   3      2      2      2      2\n *              r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6))))\n *         then                   3    2\n *              sin(x) = x + (S1*x + (x *(r-y/2)+y))\n */\n\n#define S1   -1.66666666666666324348e-01 /* 0xBFC55555, 0x55555549 */\n#define S2    8.33333333332248946124e-03 /* 0x3F811111, 0x1110F8A6 */\n#define S3   -1.98412698298579493134e-04 /* 0xBF2A01A0, 0x19C161D5 */\n#define S4    2.75573137070700676789e-06 /* 0x3EC71DE3, 0x57B1FE7D */\n#define S5   -2.50507602534068634195e-08 /* 0xBE5AE5E6, 0x8A2B9CEB */\n#define S6    1.58969099521155010221e-10 /* 0x3DE5D93A, 0x5ACFD57C */\n\nstatic double\n__kernel_sin (double x, double y, int iy)\n{\n  double z, r, v;\n  int ix;\n\n  ix = __HI (x) & 0x7fffffff; /* high word of x */\n  if (ix < 0x3e400000) /* |x| < 2**-27 */\n  {\n    if ((int) x == 0)\n    {\n      return x; /* generate inexact */\n    }\n  }\n  z = x * x;\n  v = z * x;\n  r = S2 + z * (S3 + z * (S4 + z * (S5 + z * S6)));\n  if (iy == 0)\n  {\n    return x + v * (S1 + z * r);\n  }\n  else\n  {\n    return x - ((z * (half * y - v * r) - y) - v * S1);\n  }\n} /* __kernel_sin */\n\n/*\n * __kernel_cos( x,  y )\n * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164\n * Input x is assumed to be bounded by ~pi/4 in magnitude.\n * Input y is the tail of x.\n *\n * Algorithm\n *      1. Since cos(-x) = cos(x), we need only to consider positive x.\n *      2. if x < 2^-27 (hx<0x3e400000 0), return 1 with inexact if x!=0.\n *      3. cos(x) is approximated by a polynomial of degree 14 on\n *         [0,pi/4]\n *                                       4            14\n *              cos(x) ~ 1 - x*x/2 + C1*x + ... + C6*x\n *         where the remez error is\n *\n *      |              2     4     6     8     10    12     14 |     -58\n *      |cos(x)-(1-.5*x +C1*x +C2*x +C3*x +C4*x +C5*x  +C6*x  )| <= 2\n *      |                                                      |\n *\n *                     4     6     8     10    12     14\n *      4. let r = C1*x +C2*x +C3*x +C4*x +C5*x  +C6*x  , then\n *             cos(x) = 1 - x*x/2 + r\n *         since cos(x+y) ~ cos(x) - sin(x)*y\n *                        ~ cos(x) - x*y,\n *         a correction term is necessary in cos(x) and hence\n *              cos(x+y) = 1 - (x*x/2 - (r - x*y))\n *         For better accuracy when x > 0.3, let qx = |x|/4 with\n *         the last 32 bits mask off, and if x > 0.78125, let qx = 0.28125.\n *         Then\n *              cos(x+y) = (1-qx) - ((x*x/2-qx) - (r-x*y)).\n *         Note that 1-qx and (x*x/2-qx) is EXACT here, and the\n *         magnitude of the latter is at least a quarter of x*x/2,\n *         thus, reducing the rounding error in the subtraction.\n */\n\n#define C1   4.16666666666666019037e-02 /* 0x3FA55555, 0x5555554C */\n#define C2  -1.38888888888741095749e-03 /* 0xBF56C16C, 0x16C15177 */\n#define C3   2.48015872894767294178e-05 /* 0x3EFA01A0, 0x19CB1590 */\n#define C4  -2.75573143513906633035e-07 /* 0xBE927E4F, 0x809C52AD */\n#define C5   2.08757232129817482790e-09 /* 0x3E21EE9E, 0xBDB4B1C4 */\n#define C6  -1.13596475577881948265e-11 /* 0xBDA8FAE9, 0xBE8838D4 */\n\nstatic double\n__kernel_cos (double x, double y)\n{\n  double a, hz, z, r;\n  int ix;\n\n  ix = __HI (x) & 0x7fffffff; /* ix = |x|'s high word */\n  if (ix < 0x3e400000) /* if x < 2**27 */\n  {\n    if (((int) x) == 0)\n    {\n      return one; /* generate inexact */\n    }\n  }\n  z = x * x;\n  r = z * (C1 + z * (C2 + z * (C3 + z * (C4 + z * (C5 + z * C6)))));\n  if (ix < 0x3FD33333) /* if |x| < 0.3 */\n  {\n    return one - (0.5 * z - (z * r - x * y));\n  }\n  else\n  {\n    double_accessor qx;\n    if (ix > 0x3fe90000) /* x > 0.78125 */\n    {\n      qx.dbl = 0.28125;\n    }\n    else\n    {\n      qx.as_int.hi = ix - 0x00200000; /* x / 4 */\n      qx.as_int.lo = 0;\n    }\n    hz = 0.5 * z - qx.dbl;\n    a = one - qx.dbl;\n    return a - (hz - (z * r - x * y));\n  }\n} /* __kernel_cos */\n\n/* __kernel_tan( x, y, k )\n * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854\n * Input x is assumed to be bounded by ~pi/4 in magnitude.\n * Input y is the tail of x.\n * Input k indicates whether tan (if k = 1) or -1/tan (if k = -1) is returned.\n *\n * Algorithm\n *      1. Since tan(-x) = -tan(x), we need only to consider positive x.\n *      2. if x < 2^-28 (hx<0x3e300000 0), return x with inexact if x!=0.\n *      3. tan(x) is approximated by a odd polynomial of degree 27 on\n *         [0,0.67434]\n *                               3             27\n *              tan(x) ~ x + T1*x + ... + T13*x\n *         where\n *\n *              |tan(x)         2     4            26   |     -59.2\n *              |----- - (1+T1*x +T2*x +.... +T13*x    )| <= 2\n *              |  x                                    |\n *\n *         Note: tan(x+y) = tan(x) + tan'(x)*y\n *                        ~ tan(x) + (1+x*x)*y\n *         Therefore, for better accuracy in computing tan(x+y), let\n *                   3      2      2       2       2\n *              r = x *(T2+x *(T3+x *(...+x *(T12+x *T13))))\n *         then\n *                                  3    2\n *              tan(x+y) = x + (T1*x + (x *(r+y)+y))\n *\n *      4. For x in [0.67434,pi/4],  let y = pi/4 - x, then\n *              tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y))\n *                     = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))\n */\n\n#define T0      3.33333333333334091986e-01 /* 3FD55555, 55555563 */\n#define T1      1.33333333333201242699e-01 /* 3FC11111, 1110FE7A */\n#define T2      5.39682539762260521377e-02 /* 3FABA1BA, 1BB341FE */\n#define T3      2.18694882948595424599e-02 /* 3F9664F4, 8406D637 */\n#define T4      8.86323982359930005737e-03 /* 3F8226E3, E96E8493 */\n#define T5      3.59207910759131235356e-03 /* 3F6D6D22, C9560328 */\n#define T6      1.45620945432529025516e-03 /* 3F57DBC8, FEE08315 */\n#define T7      5.88041240820264096874e-04 /* 3F4344D8, F2F26501 */\n#define T8      2.46463134818469906812e-04 /* 3F3026F7, 1A8D1068 */\n#define T9      7.81794442939557092300e-05 /* 3F147E88, A03792A6 */\n#define T10     7.14072491382608190305e-05 /* 3F12B80F, 32F0A7E9 */\n#define T11    -1.85586374855275456654e-05 /* BEF375CB, DB605373 */\n#define T12     2.59073051863633712884e-05 /* 3EFB2A70, 74BF7AD4 */\n#define pio4    7.85398163397448278999e-01 /* 3FE921FB, 54442D18 */\n#define pio4lo  3.06161699786838301793e-17 /* 3C81A626, 33145C07 */\n\nstatic double\n__kernel_tan (double x, double y, int iy)\n{\n  double_accessor z;\n  double r, v, w, s;\n  int ix, hx;\n\n  hx = __HI (x); /* high word of x */\n  ix = hx & 0x7fffffff; /* high word of |x| */\n  if (ix < 0x3e300000) /* x < 2**-28 */\n  {\n    if ((int) x == 0) /* generate inexact */\n    {\n      if (((ix | __LO (x)) | (iy + 1)) == 0)\n      {\n        return one / fabs (x);\n      }\n      else\n      {\n        if (iy == 1)\n        {\n          return x;\n        }\n        else /* compute -1 / (x + y) carefully */\n        {\n          double a;\n          double_accessor t;\n\n          z.dbl = w = x + y;\n          z.as_int.lo = 0;\n          v = y - (z.dbl - x);\n          t.dbl = a = -one / w;\n          t.as_int.lo = 0;\n          s = one + t.dbl * z.dbl;\n          return t.dbl + a * (s + t.dbl * v);\n        }\n      }\n    }\n  }\n  if (ix >= 0x3FE59428) /* |x| >= 0.6744 */\n  {\n    if (hx < 0)\n    {\n      x = -x;\n      y = -y;\n    }\n    z.dbl = pio4 - x;\n    w = pio4lo - y;\n    x = z.dbl + w;\n    y = 0.0;\n  }\n  z.dbl = x * x;\n  w = z.dbl * z.dbl;\n  /*\n   * Break x^5 * (T[1] + x^2 * T[2] + ...) into\n   * x^5 (T[1] + x^4 * T[3] + ... + x^20 * T[11]) +\n   * x^5 (x^2 * (T[2] + x^4 * T[4] + ... + x^22 * [T12]))\n   */\n  r = T1 + w * (T3 + w * (T5 + w * (T7 + w * (T9 + w * T11))));\n  v = z.dbl * (T2 + w * (T4 + w * (T6 + w * (T8 + w * (T10 + w * T12)))));\n  s = z.dbl * x;\n  r = y + z.dbl * (s * (r + v) + y);\n  r += T0 * s;\n  w = x + r;\n  if (ix >= 0x3FE59428)\n  {\n    v = (double) iy;\n    return (double) (1 - ((hx >> 30) & 2)) * (v - 2.0 * (x - (w * w / (w + v) - r)));\n  }\n  if (iy == 1)\n  {\n    return w;\n  }\n  else\n  {\n    /*\n     * if allow error up to 2 ulp, simply return\n     * -1.0 / (x + r) here\n     */\n    /* compute -1.0 / (x + r) accurately */\n    double a;\n    double_accessor t;\n\n    z.dbl = w;\n    z.as_int.lo = 0;\n    v = r - (z.dbl - x); /* z + v = r + x */\n    t.dbl = a = -1.0 / w; /* a = -1.0 / w */\n    t.as_int.lo = 0;\n    s = 1.0 + t.dbl * z.dbl;\n    return t.dbl + a * (s + t.dbl * v);\n  }\n} /* __kernel_tan */\n\n/* Method:\n *      Let S,C and T denote the sin, cos and tan respectively on\n *      [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2\n *      in [-pi/4 , +pi/4], and let n = k mod 4.\n *      We have\n *\n *          n        sin(x)      cos(x)        tan(x)\n *     ----------------------------------------------------------\n *          0          S           C             T\n *          1          C          -S            -1/T\n *          2         -S          -C             T\n *          3         -C           S            -1/T\n *     ----------------------------------------------------------\n *\n * Special cases:\n *      Let trig be any of sin, cos, or tan.\n *      trig(+-INF)  is NaN, with signals;\n *      trig(NaN)    is that NaN;\n *\n * Accuracy:\n *      TRIG(x) returns trig(x) nearly rounded\n */\n\n/* sin(x)\n * Return sine function of x.\n *\n * kernel function:\n *      __kernel_sin            ... sine function on [-pi/4,pi/4]\n *      __kernel_cos            ... cose function on [-pi/4,pi/4]\n *      __ieee754_rem_pio2      ... argument reduction routine\n */\ndouble\nsin (double x)\n{\n  double y[2], z = 0.0;\n  int n, ix;\n\n  /* High word of x. */\n  ix = __HI (x);\n\n  /* |x| ~< pi/4 */\n  ix &= 0x7fffffff;\n  if (ix <= 0x3fe921fb)\n  {\n    return __kernel_sin (x, z, 0);\n  }\n\n  /* sin(Inf or NaN) is NaN */\n  else if (ix >= 0x7ff00000)\n  {\n    return x - x;\n  }\n\n  /* argument reduction needed */\n  else\n  {\n    n = __ieee754_rem_pio2 (x, y);\n    switch (n & 3)\n    {\n      case 0:\n      {\n        return __kernel_sin (y[0], y[1], 1);\n      }\n      case 1:\n      {\n        return __kernel_cos (y[0], y[1]);\n      }\n      case 2:\n      {\n        return -__kernel_sin (y[0], y[1], 1);\n      }\n      default:\n      {\n        return -__kernel_cos (y[0], y[1]);\n      }\n    }\n  }\n} /* sin */\n\n/* cos(x)\n * Return cosine function of x.\n *\n * kernel function:\n *      __kernel_sin            ... sine function on [-pi/4,pi/4]\n *      __kernel_cos            ... cosine function on [-pi/4,pi/4]\n *      __ieee754_rem_pio2      ... argument reduction routine\n */\n\ndouble\ncos (double x)\n{\n  double y[2], z = 0.0;\n  int n, ix;\n\n  /* High word of x. */\n  ix = __HI (x);\n\n  /* |x| ~< pi/4 */\n  ix &= 0x7fffffff;\n  if (ix <= 0x3fe921fb)\n  {\n    return __kernel_cos (x, z);\n  }\n\n  /* cos(Inf or NaN) is NaN */\n  else if (ix >= 0x7ff00000)\n  {\n    return x - x;\n  }\n\n  /* argument reduction needed */\n  else\n  {\n    n = __ieee754_rem_pio2 (x, y);\n    switch (n & 3)\n    {\n      case 0:\n      {\n        return __kernel_cos (y[0], y[1]);\n      }\n      case 1:\n      {\n        return -__kernel_sin (y[0], y[1], 1);\n      }\n      case 2:\n      {\n        return -__kernel_cos (y[0], y[1]);\n      }\n      default:\n      {\n        return __kernel_sin (y[0], y[1], 1);\n      }\n    }\n  }\n} /* cos */\n\n/* tan(x)\n * Return tangent function of x.\n *\n * kernel function:\n *      __kernel_tan            ... tangent function on [-pi/4,pi/4]\n *      __ieee754_rem_pio2      ... argument reduction routine\n */\n\ndouble\ntan (double x)\n{\n  double y[2], z = 0.0;\n  int n, ix;\n\n  /* High word of x. */\n  ix = __HI (x);\n\n  /* |x| ~< pi/4 */\n  ix &= 0x7fffffff;\n  if (ix <= 0x3fe921fb)\n  {\n    return __kernel_tan (x, z, 1);\n  }\n\n  /* tan(Inf or NaN) is NaN */\n  else if (ix >= 0x7ff00000)\n  {\n    return x - x; /* NaN */\n  }\n\n  /* argument reduction needed */\n  else\n  {\n    n = __ieee754_rem_pio2 (x, y);\n    return __kernel_tan (y[0], y[1], 1 - ((n & 1) << 1)); /*   1 -- n even, -1 -- n odd */\n  }\n} /* tan */\n\n#undef zero\n#undef half\n#undef one\n#undef two24\n#undef twon24\n#undef invpio2\n#undef pio2_1\n#undef pio2_1t\n#undef pio2_2\n#undef pio2_2t\n#undef pio2_3\n#undef pio2_3t\n#undef S1\n#undef S2\n#undef S3\n#undef S4\n#undef S5\n#undef S6\n#undef C1\n#undef C2\n#undef C3\n#undef C4\n#undef C5\n#undef C6\n#undef T0\n#undef T1\n#undef T2\n#undef T3\n#undef T4\n#undef T5\n#undef T6\n#undef T7\n#undef T8\n#undef T9\n#undef T10\n#undef T11\n#undef T12\n#undef pio4\n#undef pio4lo\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nset(JERRY_PORT_DEFAULT_NAME jerry-port-default)\nproject (${JERRY_PORT_DEFAULT_NAME} C)\n\n# Include directories\nset(INCLUDE_PORT_DEFAULT \"${CMAKE_CURRENT_SOURCE_DIR}/include\")\n\n# Source directories\nset(SOURCE_PORT_DEFAULT\n  default-date.c\n  default-debugger.c\n  default-external-context.c\n  default-fatal.c\n  default-io.c\n  default-module.c\n  default-promise.c\n)\n\n# Amalgamated JerryScript source/header build.\n#  The process will create the following files:\n#   * jerryscript-port-default.c\n#   * jerryscript-port-default.h\nif(ENABLE_AMALGAM)\n  set(HEADER_PORT_DEFAULT\n    include/jerryscript-port-default.h\n  )\n  set(AMALGAM_PORT_C \"${CMAKE_BINARY_DIR}/amalgam/jerryscript-port-default.c\")\n  set(AMALGAM_PORT_H \"${CMAKE_BINARY_DIR}/amalgam/jerryscript-port-default.h\")\n\n  add_custom_command(OUTPUT ${AMALGAM_PORT_C} ${AMALGAM_PORT_H}\n                     COMMAND python ${CMAKE_SOURCE_DIR}/tools/amalgam.py\n                             --jerry-port-default\n                             --output-dir ${CMAKE_BINARY_DIR}/amalgam\n                     DEPENDS ${SOURCE_PORT_DEFAULT}\n                             ${HEADER_PORT_DEFAULT}\n                             ${CMAKE_SOURCE_DIR}/tools/amalgam.py\n  )\n  add_custom_target(amalgam-port DEPENDS ${AMALGAM_PORT_C} ${AMALGAM_PORT_H})\n  add_dependencies(amalgam amalgam-port)\n\n  set(SOURCE_PORT_DEFAULT ${AMALGAM_PORT_C} ${AMALGAM_PORT_H})\nendif()\n\n# Define _BSD_SOURCE and _DEFAULT_SOURCE\n# (should only be necessary if we used compiler default libc but not checking that)\nset(DEFINES_PORT_DEFAULT _BSD_SOURCE _DEFAULT_SOURCE)\n\nINCLUDE (CheckStructHasMember)\n# CHECK_STRUCT_HAS_MEMBER works by trying to compile some C code that accesses the\n# given field of the given struct. However, our default compiler options break this\n# C code, so turn a couple of them off for this.\nif(USING_GCC OR USING_CLANG)\n  set(CMAKE_REQUIRED_FLAGS \"-Wno-error=strict-prototypes -Wno-error=old-style-definition -Wno-error=unused-value\")\nendif()\n# tm.tm_gmtoff is non-standard, so glibc doesn't expose it in c99 mode\n# (our default). Define some macros to expose it anyway.\nset(CMAKE_REQUIRED_DEFINITIONS \"-D_BSD_SOURCE -D_DEFAULT_SOURCE\")\nCHECK_STRUCT_HAS_MEMBER (\"struct tm\" tm_gmtoff time.h HAVE_TM_GMTOFF)\nif(HAVE_TM_GMTOFF)\n  set(DEFINES_PORT_DEFAULT ${DEFINES_PORT_DEFAULT} HAVE_TM_GMTOFF)\nendif()\n\n# Sleep function availability check\nINCLUDE (CheckIncludeFiles)\nCHECK_INCLUDE_FILES (time.h HAVE_TIME_H)\nCHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H)\nif(HAVE_TIME_H)\n  set(DEFINES_PORT_DEFAULT ${DEFINES_PORT_DEFAULT} HAVE_TIME_H)\nelseif(HAVE_UNISTD_H)\n  set(DEFINES_PORT_DEFAULT ${DEFINES_PORT_DEFAULT} HAVE_UNISTD_H)\nendif()\n\n# Default Jerry port implementation library\nadd_library(${JERRY_PORT_DEFAULT_NAME} ${SOURCE_PORT_DEFAULT})\ntarget_include_directories(${JERRY_PORT_DEFAULT_NAME} PUBLIC ${INCLUDE_PORT_DEFAULT})\ntarget_include_directories(${JERRY_PORT_DEFAULT_NAME} PRIVATE ${INCLUDE_CORE_PUBLIC})\ntarget_include_directories(${JERRY_PORT_DEFAULT_NAME} PRIVATE ${INCLUDE_EXT_PUBLIC})\ntarget_compile_definitions(${JERRY_PORT_DEFAULT_NAME} PRIVATE ${DEFINES_PORT_DEFAULT})\ntarget_link_libraries(${JERRY_PORT_DEFAULT_NAME} jerry-core) # FIXME: remove this dependency as soon as possible\n\n# Installation\nconfigure_file(libjerry-port-default.pc.in libjerry-port-default.pc @ONLY)\n\ninstall(TARGETS ${JERRY_PORT_DEFAULT_NAME} DESTINATION lib)\ninstall(FILES ${CMAKE_CURRENT_BINARY_DIR}/libjerry-port-default.pc DESTINATION lib/pkgconfig)\ninstall(DIRECTORY ${INCLUDE_PORT_DEFAULT}/ DESTINATION include)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/default-date.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifdef HAVE_TM_GMTOFF\n#include <time.h>\n#endif /* HAVE_TM_GMTOFF */\n\n#ifdef _WIN32\n#include <windows.h>\n#include <winbase.h>\n#include <winnt.h>\n#include <time.h>\n#endif /* _WIN32 */\n\n#ifdef __GNUC__\n#include <sys/time.h>\n#endif /* __GNUC__ */\n\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n#ifdef _WIN32\nstatic const LONGLONG UnixEpochInTicks = 116444736000000000; /* difference between 1970 and 1601 */\nstatic const LONGLONG TicksPerMs = 10000; /* 1 tick is 100 nanoseconds */\n\n/* https://support.microsoft.com/en-us/help/167296/how-to-convert-a-unix-time-t-to-a-win32-filetime-or-systemtime */\nstatic void UnixTimeMsToFileTime (double t, LPFILETIME pft)\n{\n  LONGLONG ll = (LONGLONG) t * TicksPerMs + UnixEpochInTicks;\n  pft->dwLowDateTime = (DWORD) ll;\n  pft->dwHighDateTime = (DWORD) (ll >> 32);\n} /* UnixTimeMsToFileTime */\n\nstatic double FileTimeToUnixTimeMs (FILETIME ft)\n{\n  ULARGE_INTEGER date;\n  date.HighPart = ft.dwHighDateTime;\n  date.LowPart = ft.dwLowDateTime;\n  return (double) (((LONGLONG) date.QuadPart - UnixEpochInTicks) / TicksPerMs);\n} /* FileTimeToUnixTimeMs */\n\n#endif /* _WIN32 */\n\n/**\n * Default implementation of jerry_port_get_local_time_zone_adjustment. Uses the 'tm_gmtoff' field\n * of 'struct tm' (a GNU extension) filled by 'localtime_r' if available on the\n * system, does nothing otherwise.\n *\n * @return offset between UTC and local time at the given unix timestamp, if\n *         available. Otherwise, returns 0, assuming UTC time.\n */\ndouble jerry_port_get_local_time_zone_adjustment (double unix_ms,  /**< ms since unix epoch */\n                                                  bool is_utc)  /**< is the time above in UTC? */\n{\n#ifdef HAVE_TM_GMTOFF\n  struct tm tm;\n  time_t now = (time_t) (unix_ms / 1000);\n  localtime_r (&now, &tm);\n  if (!is_utc)\n  {\n    now -= tm.tm_gmtoff;\n    localtime_r (&now, &tm);\n  }\n  return ((double) tm.tm_gmtoff) * 1000;\n#else /* !HAVE_TM_GMTOFF */\n  (void) unix_ms;\n  (void) is_utc;\n#ifdef _WIN32\n  FILETIME fileTime, localFileTime;\n  SYSTEMTIME systemTime, localSystemTime;\n  ULARGE_INTEGER time, localTime;\n\n  UnixTimeMsToFileTime (unix_ms, &fileTime);\n\n  if (FileTimeToSystemTime (&fileTime, &systemTime)\n      && SystemTimeToTzSpecificLocalTime (0, &systemTime, &localSystemTime)\n      && SystemTimeToFileTime (&localSystemTime, &localFileTime))\n  {\n    time.LowPart = fileTime.dwLowDateTime;\n    time.HighPart = fileTime.dwHighDateTime;\n    localTime.LowPart = localFileTime.dwLowDateTime;\n    localTime.HighPart = localFileTime.dwHighDateTime;\n    return (double) (((LONGLONG) localTime.QuadPart - (LONGLONG) time.QuadPart) / TicksPerMs);\n  }\n#endif /* _WIN32 */\n  return 0.0;\n#endif /* HAVE_TM_GMTOFF */\n} /* jerry_port_get_local_time_zone_adjustment */\n\n/**\n * Default implementation of jerry_port_get_current_time. Uses 'gettimeofday' if\n * available on the system, does nothing otherwise.\n *\n * @return milliseconds since Unix epoch - if 'gettimeofday' is available and\n *                                         executed successfully,\n *         0 - otherwise.\n */\ndouble jerry_port_get_current_time (void)\n{\n#ifdef _WIN32\n  FILETIME ft;\n  GetSystemTimeAsFileTime (&ft);\n  return FileTimeToUnixTimeMs (ft);\n#elif __GNUC__\n  struct timeval tv;\n\n  if (gettimeofday (&tv, NULL) == 0)\n  {\n    return ((double) tv.tv_sec) * 1000.0 + ((double) tv.tv_usec) / 1000.0;\n  }\n#endif /* _WIN32 */\n\n  return 0.0;\n} /* jerry_port_get_current_time */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/default-debugger.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#if !defined (_XOPEN_SOURCE) || _XOPEN_SOURCE < 500\n#undef _XOPEN_SOURCE\n/* Required macro for sleep functions (nanosleep or usleep) */\n#define _XOPEN_SOURCE 500\n#endif\n\n#ifdef _WIN32\n#include <windows.h>\n#elif defined (HAVE_TIME_H)\n#include <time.h>\n#elif defined (HAVE_UNISTD_H)\n#include <unistd.h>\n#endif /* _WIN32 */\n\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n/**\n * Default implementation of jerry_port_sleep. Uses 'nanosleep' or 'usleep' if\n * available on the system, does nothing otherwise.\n */\nvoid jerry_port_sleep (uint32_t sleep_time) /**< milliseconds to sleep */\n{\n#ifdef _WIN32\n  Sleep (sleep_time);\n#elif defined (HAVE_TIME_H)\n  struct timespec sleep_timespec;\n  sleep_timespec.tv_sec = (time_t) sleep_time / 1000;\n  sleep_timespec.tv_nsec = ((long int) sleep_time % 1000) * 1000000L;\n\n  nanosleep (&sleep_timespec, NULL);\n#elif defined (HAVE_UNISTD_H)\n  usleep ((useconds_t) sleep_time * 1000);\n#else\n  (void) sleep_time;\n#endif /* HAVE_TIME_H */\n} /* jerry_port_sleep */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/default-external-context.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n/**\n * Pointer to the current context.\n * Note that it is a global variable, and is not a thread safe implementation.\n */\nstatic jerry_context_t *current_context_p = NULL;\n\n/**\n * Set the current_context_p as the passed pointer.\n */\nvoid\njerry_port_default_set_current_context (jerry_context_t *context_p) /**< points to the created context */\n{\n  current_context_p = context_p;\n} /* jerry_port_default_set_current_context */\n\n/**\n * Get the current context.\n *\n * @return the pointer to the current context\n */\njerry_context_t *\njerry_port_get_current_context (void)\n{\n  return current_context_p;\n} /* jerry_port_get_current_context */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/default-fatal.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdlib.h>\n\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n/**\n * Default implementation of jerry_port_fatal. Calls 'abort' if exit code is\n * non-zero, 'exit' otherwise.\n */\nvoid jerry_port_fatal (jerry_fatal_code_t code) /**< cause of error */\n{\n  if (code != 0\n      && code != ERR_OUT_OF_MEMORY)\n  {\n    abort ();\n  }\n\n  exit ((int) code);\n} /* jerry_port_fatal */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/default-io.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdarg.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"jerryscript-debugger.h\"\n\n/**\n * Actual log level\n */\nstatic jerry_log_level_t jerry_port_default_log_level = JERRY_LOG_LEVEL_ERROR;\n\n/**\n * Get the log level\n *\n * @return current log level\n */\njerry_log_level_t\njerry_port_default_get_log_level (void)\n{\n  return jerry_port_default_log_level;\n} /* jerry_port_default_get_log_level */\n\n/**\n * Set the log level\n */\nvoid\njerry_port_default_set_log_level (jerry_log_level_t level) /**< log level */\n{\n  jerry_port_default_log_level = level;\n} /* jerry_port_default_set_log_level */\n\n/**\n * Default implementation of jerry_port_log. Prints log message to the standard\n * error with 'vfprintf' if message log level is less than or equal to the\n * current log level.\n *\n * If debugger support is enabled, printing happens first to an in-memory buffer,\n * which is then sent both to the standard error and to the debugger client.\n */\nvoid\njerry_port_log (jerry_log_level_t level, /**< message log level */\n                const char *format, /**< format string */\n                ...)  /**< parameters */\n{\n  if (level <= jerry_port_default_log_level)\n  {\n    va_list args;\n    va_start (args, format);\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n    int length = vsnprintf (NULL, 0, format, args);\n    va_end (args);\n    va_start (args, format);\n\n    JERRY_VLA (char, buffer, length + 1);\n    vsnprintf (buffer, (size_t) length + 1, format, args);\n\n    fprintf (stderr, \"%s\", buffer);\n    jerry_debugger_send_log (level, (jerry_char_t *) buffer, (jerry_size_t) length);\n#else /* If jerry-debugger isn't defined, libc is turned on */\n    vfprintf (stderr, format, args);\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n    va_end (args);\n  }\n} /* jerry_port_log */\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n\n#define DEBUG_BUFFER_SIZE (256)\nstatic char debug_buffer[DEBUG_BUFFER_SIZE];\nstatic int debug_buffer_index = 0;\n\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n\n/**\n * Default implementation of jerry_port_print_char. Uses 'putchar' to\n * print a single character to standard output.\n */\nvoid\njerry_port_print_char (char c) /**< the character to print */\n{\n  putchar (c);\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n  debug_buffer[debug_buffer_index++] = c;\n\n  if ((debug_buffer_index == DEBUG_BUFFER_SIZE) || (c == '\\n'))\n  {\n    jerry_debugger_send_output ((jerry_char_t *) debug_buffer, (jerry_size_t) debug_buffer_index);\n    debug_buffer_index = 0;\n  }\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n} /* jerry_port_print_char */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/default-module.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#if !defined (_WIN32)\n#include <libgen.h>\n#endif /* !defined (_WIN32) */\n#include <limits.h>\n#include <stdarg.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sys/stat.h>\n\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n\n#ifndef S_ISDIR\n#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)\n#endif\n\n/**\n * Determines the size of the given file.\n * @return size of the file\n */\nstatic size_t\njerry_port_get_file_size (FILE *file_p) /**< opened file */\n{\n  fseek (file_p, 0, SEEK_END);\n  long size = ftell (file_p);\n  fseek (file_p, 0, SEEK_SET);\n\n  return (size_t) size;\n} /* jerry_port_get_file_size */\n\n/**\n * Opens file with the given path and reads its source.\n * @return the source of the file\n */\nuint8_t *\njerry_port_read_source (const char *file_name_p, /**< file name */\n                        size_t *out_size_p) /**< [out] read bytes */\n{\n  struct stat stat_buffer;\n  if (stat (file_name_p, &stat_buffer) == -1 || S_ISDIR (stat_buffer.st_mode))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Failed to open file: %s\\n\", file_name_p);\n    return NULL;\n  }\n\n  FILE *file_p = fopen (file_name_p, \"rb\");\n\n  if (file_p == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Failed to open file: %s\\n\", file_name_p);\n    return NULL;\n  }\n\n  size_t file_size = jerry_port_get_file_size (file_p);\n  uint8_t *buffer_p = (uint8_t *) malloc (file_size);\n\n  if (buffer_p == NULL)\n  {\n    fclose (file_p);\n\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Failed to allocate memory for file: %s\\n\", file_name_p);\n    return NULL;\n  }\n\n  size_t bytes_read = fread (buffer_p, 1u, file_size, file_p);\n\n  if (bytes_read != file_size)\n  {\n    fclose (file_p);\n    free (buffer_p);\n\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Failed to read file: %s\\n\", file_name_p);\n    return NULL;\n  }\n\n  fclose (file_p);\n  *out_size_p = bytes_read;\n\n  return buffer_p;\n} /* jerry_port_read_source */\n\n/**\n * Release the previously opened file's content.\n */\nvoid\njerry_port_release_source (uint8_t *buffer_p) /**< buffer to free */\n{\n  free (buffer_p);\n} /* jerry_port_release_source */\n\n/**\n * Normalize a file path\n *\n * @return length of the path written to the output buffer\n */\nsize_t\njerry_port_normalize_path (const char *in_path_p,   /**< input file path */\n                           char *out_buf_p,         /**< output buffer */\n                           size_t out_buf_size,     /**< size of output buffer */\n                           char *base_file_p)       /**< base file path */\n{\n  size_t ret = 0;\n\n#if defined (_WIN32)\n  size_t base_drive_dir_len;\n  const size_t in_path_len = strnlen (in_path_p, _MAX_PATH);\n  char *path_p;\n\n  if (base_file_p != NULL)\n  {\n    char drive[_MAX_DRIVE];\n    char *dir_p = (char *) malloc (_MAX_DIR);\n\n    _splitpath_s (base_file_p, drive, _MAX_DRIVE, dir_p, _MAX_DIR, NULL, 0, NULL, 0);\n    const size_t drive_len = strnlen (&drive, _MAX_DRIVE);\n    const size_t dir_len = strnlen (dir_p, _MAX_DIR);\n    base_drive_dir_len = drive_len + dir_len;\n    path_p = (char *) malloc (base_drive_dir_len + in_path_len + 1);\n\n    memcpy (path_p, &drive, drive_len);\n    memcpy (path_p + drive_len, dir_p, dir_len);\n\n    free (dir_p);\n  }\n  else\n  {\n    base_drive_dir_len = 0;\n    path_p = (char *) malloc (in_path_len + 1);\n  }\n\n  memcpy (path_p + base_drive_dir_len, in_path_p, in_path_len + 1);\n\n  char *norm_p = _fullpath (out_buf_p, path_p, out_buf_size);\n  free (path_p);\n\n  if (norm_p != NULL)\n  {\n    ret = strnlen (norm_p, out_buf_size);\n  }\n#elif defined (__unix__) || defined (__APPLE__)\n  char *base_dir_p = dirname (base_file_p);\n  const size_t base_dir_len = strnlen (base_dir_p, PATH_MAX);\n  const size_t in_path_len = strnlen (in_path_p, PATH_MAX);\n  char *path_p = (char *) malloc (base_dir_len + 1 + in_path_len + 1);\n\n  memcpy (path_p, base_dir_p, base_dir_len);\n  memcpy (path_p + base_dir_len, \"/\", 1);\n  memcpy (path_p + base_dir_len + 1, in_path_p, in_path_len + 1);\n\n  char *norm_p = realpath (path_p, NULL);\n  free (path_p);\n\n  if (norm_p != NULL)\n  {\n    const size_t norm_len = strnlen (norm_p, out_buf_size);\n    if (norm_len < out_buf_size)\n    {\n      memcpy (out_buf_p, norm_p, norm_len + 1);\n      ret = norm_len;\n    }\n\n    free (norm_p);\n  }\n#else\n  (void) base_file_p; /* unused */\n\n  /* Do nothing, just copy the input. */\n  const size_t in_path_len = strnlen (in_path_p, out_buf_size);\n  if (in_path_len < out_buf_size)\n  {\n    memcpy (out_buf_p, in_path_p, in_path_len + 1);\n    ret = in_path_len;\n  }\n#endif\n\n  return ret;\n} /* jerry_port_normalize_path */\n\n/**\n * Get the module object of a native module.\n *\n * @return Undefined, if 'name' is not a native module\n *         jerry_value_t containing the module object, otherwise\n */\njerry_value_t\njerry_port_get_native_module (jerry_value_t name) /**< module specifier */\n{\n  (void) name;\n  return jerry_create_undefined ();\n} /* jerry_port_get_native_module */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/default-promise.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-port.h\"\n\n/**\n * Default implementation of jerry_port_track_promise_rejection.\n * Prints the reason of the unhandled rejections.\n */\nvoid\njerry_port_track_promise_rejection (const jerry_value_t promise, /**< rejected promise */\n                                    const jerry_promise_rejection_operation_t operation) /**< operation */\n{\n  (void) operation; /* unused */\n\n  jerry_value_t reason = jerry_get_promise_result (promise);\n  jerry_value_t reason_to_string = jerry_value_to_string (reason);\n  jerry_size_t req_sz = jerry_get_utf8_string_size (reason_to_string);\n  JERRY_VLA (jerry_char_t, str_buf_p, req_sz + 1);\n  jerry_string_to_utf8_char_buffer (reason_to_string, str_buf_p, req_sz);\n  str_buf_p[req_sz] = '\\0';\n\n  jerry_release_value (reason_to_string);\n  jerry_release_value (reason);\n\n  jerry_port_log (JERRY_LOG_LEVEL_WARNING, \"Uncaught (in promise) %s\\n\", str_buf_p);\n} /* jerry_port_track_promise_rejection */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/include/jerryscript-port-default.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef JERRYSCRIPT_PORT_DEFAULT_H\n#define JERRYSCRIPT_PORT_DEFAULT_H\n\n#include <stdbool.h>\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/** \\addtogroup jerry_port_default Default Jerry engine port API\n * These functions are only available if the default port of Jerry is used.\n * @{\n */\n\njerry_log_level_t jerry_port_default_get_log_level (void);\nvoid jerry_port_default_set_log_level (jerry_log_level_t level);\n\nvoid jerry_port_default_set_current_context (jerry_context_t *context_p);\n\n/**\n * @}\n */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* !JERRYSCRIPT_PORT_DEFAULT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/jerry-port/default/libjerry-port-default.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libjerry-port-default\nDescription: JerryScript: lightweight JavaScript engine (default port library)\nURL: https://github.com/jerryscript-project/jerryscript\nVersion: @JERRY_VERSION@\nLibs: -L${libdir} -ljerry-port-default\nCflags: -I${includedir}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/sonar-project.properties",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nsonar.projectName=JerryScript\nsonar.projectKey=jerryscript-project_jerryscript\nsonar.sources=jerry-core,jerry-ext,jerry-main,jerry-port\nsonar.cfamily.build-wrapper-output=bw-output\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/README.md",
    "content": "### About Curie BSP port\n[Intel® Curie BSP](https://github.com/CurieBSP/main/blob/master/README.rst) is the SDK that will help you developing software on Curie based boards, for example with the [Arduino 101 board (AKA Genuino 101)](https://www.arduino.cc/en/Main/ArduinoBoard101).\n\nThis folder contains necessary files to integrate JerryScript with Intel® Curie BSP, so that JavaScript can run on Arduino 101 board (AKA Genuino 101).\n\n### How to build\n#### 1. Preface\n\nCurie BSP only support Ubuntu GNU/Linux as host OS envirenment.\n\nNecessary hardwares\n* [FlySwatter2 JTAG debugger](https://www.tincantools.com/wiki/Flyswatter2)\n* [ARM-JTAG-20-10](https://www.amazon.com/PACK-ARM-JTAG-20-10-Micro-JTAG-adapter/dp/B010ATK9OC/ref=sr_1_1?ie=UTF8&qid=1469635131&sr=8-1&keywords=ARM+Micro+JTAG+Connector)\n* [USB to TTL Serial Cable](https://www.adafruit.com/products/954)\n\n#### 2. Prepare Curie BSP\n\nYou can refer to a detailed document [Curie BSP](https://github.com/CurieBSP/main/releases). But, we summary the main steps below:\n\n##### 1. Get repo:\n```\nmkdir ~/bin\nwget http://commondatastorage.googleapis.com/git-repo-downloads/repo -O ~/bin/repo\nchmod a+x ~/bin/repo\n```\n\n##### 2. In ``~/.bashrc`` add:\n```\nPATH=$PATH:~/bin\n```\n\n##### 3. Create your directory for CurieBSP (eg. Curie_BSP):\n```\nmkdir Curie_BSP && cd $_\n```\n\n##### 4. Initialize your repo:\n```\nrepo init -u https://github.com/CurieBSP/manifest\n```\n\n##### 5. Download the sources files:\n```\nrepo sync -j 5 -d\n```\n\n##### 6. Get toolchain (compilation/debug):\nDownload [issm-toolchain-linux-2016-05-12.tar.gz](https://software.intel.com/en-us/articles/issm-toolchain-only-download), and uncompress it.\n**TOOLCHAIN_DIR** environment variable needs to match the toolchain destination folder\nYou can use the command:``export TOOLCHAIN_DIR='path to files of the toolchain'``\n\nOr you can just uncompress the toolchain tarball and copy the contents (`licensing readme.txt tools  version.txt`) into `wearable_device_sw/external/toolchain`.\n\n##### 7. Get BLE firmware:\nDownload [curie-ble-v3.1.1.tar.gz]( https://registrationcenter.intel.com/en/forms/?productid=2783) and uncompress the retrieved package into ``wearable_device_sw/packages`` folder\n\nYou will first register in the web page. Then you will receive an email where is a download link. Click the link in the mail, choose the `curie-ble-v3.1.1.tar.gz (118 KB)` and download.\n\n##### 8. Get tools to flash the device:\n[https://01.org/android-ia/downloads/intel-platform-flash-tool-lite](https://01.org/android-ia/downloads/intel-platform-flash-tool-lite)\n\n\n#### 3. Build JerryScript and Curie BSP\n##### 1. Generate makefiles\nRun the Python script ``setup.py`` in ``jerryscript/targets/curie_bsp/`` with the full path or relative path of the ``Curie_BSP``:\n```\npython setup.py <path of Curie_BSP>\n```\n\n##### 2. One time setup. It will check/download/install the necessary tools, and must be run only once.\nIn the directory ``Curie_BSP``\n```\nmake -C wearable_device_sw/projects/curie_bsp_jerry/ one_time_setup\n```\n\n##### 3. In the directory ``Curie_BSP``\n```\nmkdir out && cd $_\nmake -f ../wearable_device_sw/projects/curie_bsp_jerry/Makefile setup\nmake image\n```\n\n##### 4. Connect JTAG Debugger and TTL Serial Cable to Arduino 101 as below:\n![](./image/connect.png)\n\n##### 5. Flash the firmware\n```\nmake flash FLASH_CONFIG=jtag_full\n```\n\n\n#### 4. Serial terminal\nAssume the serial port is ``ttyUSB0`` in ``/dev`` directory, we can type command ``screen ttyUSB0 115200`` to open a serial terminal.\n\nAfter the board boot successfully, you should see something like this:\n```\nQuark SE ID 16 Rev 0 A0\nARC Core state: 0000400\nBOOT TARGET: 0\n  6135|QRK| CFW| INFO| GPIO service init in progress..\n  6307|ARC|MAIN| INFO| BSP init done\n  6315|ARC| CFW| INFO| ADC service init in progress..\n  6315|ARC| CFW| INFO| GPIO service init in progress...\n  6315|ARC| CFW| INFO| GPIO service init in progress...\n  6315|ARC|MAIN| INFO| CFW init done\n```\nTo test the JavaScript command, you should add characters ``js e `` to the beginning of the JavaScript command, like this:\n``js e print ('Hello World!');``\n\nIt is the uart command format of Curie BSP. `js` is cmd group, `e` is cmd name, which is short for eval,  and `print ('Hello World!');` is the cmd parameters, which is the JavaScript code we want to run.\n\nYou can see the result through the screen:\n```\njs e print ('Hello World!');js e 1 ACK\nHello World!\nundefined\njs e 1 OK\n```\n\n`js e 1 ACK` and `js e 1 OK` are debug info of Curie BSP uart commands, which mean it receive and execute the command sucessfully. `Hello World!` is the printed content. `undefined` is the return value of the statement `print ('Hello World!')`.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/include/inttypes.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef INTTYPES_H\n#define INTTYPES_H\n\n#endif /* !INTTYPES_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/include/setjmp.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef SETJMP_H\n#define SETJMP_H\n\n#include <stdint.h>\n\ntypedef uint64_t jmp_buf[14];\n\nint setjmp (jmp_buf env);\nvoid longjmp (jmp_buf env, int val);\n\n#endif /* !SETJMP_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/jerry_app/arc/defconfig",
    "content": "CONFIG_AUTO_SERVICE_INIT=y\nCONFIG_CFW_PROXY=y\nCONFIG_CFW_QUARK_SE_HELPERS=y\nCONFIG_LOG_SLAVE=y\nCONFIG_MEM_POOL_DEF_PATH=\"$(PROJECT_PATH)/arc\"\nCONFIG_OS_ZEPHYR=y\nCONFIG_SERVICES_QUARK_SE_ADC_IMPL=y\nCONFIG_SERVICES_QUARK_SE_GPIO_IMPL=y\nCONFIG_SOC_GPIO_AON=y\nCONFIG_SOC_GPIO=y\nCONFIG_SS_ADC=y\nCONFIG_SS_GPIO=y\nCONFIG_TCMD_SLAVE=y\nCONFIG_TCMD=y\nCONFIG_ZEPHYR_BOARD=\"arduino_101_sss\"\nCONFIG_CONSOLE_HANDLER_SHELL=y\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/jerry_app/arc/main.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* infra */\n#include \"infra/log.h\"\n#include \"infra/bsp.h\"\n#include \"infra/xloop.h\"\n#include \"cfw/cfw.h\"\n\nstatic xloop_t loop;\n\nvoid main (void)\n{\n  T_QUEUE queue = bsp_init ();\n\n  pr_info (LOG_MODULE_MAIN, \"BSP init done\");\n\n  cfw_init (queue);\n  pr_info (LOG_MODULE_MAIN, \"CFW init done\");\n\n  xloop_init_from_queue (&loop, queue);\n\n  xloop_run (&loop);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/jerry_app/arc/memory_pool_list.def",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Definition of the memory pools used by balloc/bfree:\n *  DECLARE_MEMORY_POOL( <index>, <size>, <count>, <align> )\n *  <index> : must start at 0 and be of consecutive values *\n *  <size>  : size in bytes of each block from the pool\n *  <count> : number of blocks in the pool\n *\n *  * Pool definitions must be sorted according the block size\n *  value: pool with <index> 0 must have the smallest <size>.\n */\n\nDECLARE_MEMORY_POOL(0,8,32)\nDECLARE_MEMORY_POOL(1,16,32)\nDECLARE_MEMORY_POOL(2,32,48)\nDECLARE_MEMORY_POOL(3,64,16)\nDECLARE_MEMORY_POOL(4,96,24)\nDECLARE_MEMORY_POOL(5,128,6)\nDECLARE_MEMORY_POOL(6,256,5)\nDECLARE_MEMORY_POOL(7,512,1)\n\n#undef DECLARE_MEMORY_POOL\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/jerry_app/include/project_mapping.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Allow project to override this partition scheme\n * The following variables are allowed to be defined:\n *\n * QUARK_START_PAGE the first page where the QUARK code is located\n * QUARK_NB_PAGE the number of pages reserved for the QUARK. The ARC gets the\n *               remaining pages (out of 148).\n */\n#ifndef PROJECT_MAPPING_H\n#define PROJECT_MAPPING_H\n\n#define QUARK_NB_PAGE 125\n#include \"machine/soc/intel/quark_se/quark_se_mapping.h\"\n\n#endif /* !PROJECT_MAPPING_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/jerry_app/quark/defconfig",
    "content": "CONFIG_AUTO_SERVICE_INIT=y\nCONFIG_CFW_QUARK_SE_HELPERS=y\nCONFIG_CONSOLE_MANAGER=y\nCONFIG_DEBUG_PANIC_TCMD=y\nCONFIG_FACTORY_DATA_WRITE=y\nCONFIG_FACTORY_DATA=y\nCONFIG_INTEL_QRK_AON_PT=y\nCONFIG_INTEL_QRK_RTC=y\nCONFIG_INTEL_QRK_SPI=y\nCONFIG_INTEL_QRK_WDT=y\nCONFIG_LOG_CBUFFER_SIZE=2048\nCONFIG_LOG_CBUFFER=y\nCONFIG_MEMORY_POOLS_BALLOC_STATISTICS=y\nCONFIG_MEMORY_POOLS_BALLOC_TRACK_OWNER=y\nCONFIG_MEM_POOL_DEF_PATH=\"$(PROJECT_PATH)/quark\"\nCONFIG_OS_ZEPHYR=y\nCONFIG_PANIC_ON_BUS_ERROR=y\nCONFIG_QUARK_SE_PROPERTIES_STORAGE=y\nCONFIG_QUARK=y\nCONFIG_SERVICES_QUARK_SE_ADC=y\nCONFIG_SERVICES_QUARK_SE_GPIO_IMPL=y\nCONFIG_SERVICES_QUARK_SE_GPIO=y\nCONFIG_SOC_FLASH=y\nCONFIG_SOC_GPIO_32=y\nCONFIG_SOC_GPIO=y\nCONFIG_SOC_ROM=y\nCONFIG_SPI_FLASH_W25Q16DV=y\nCONFIG_STORAGE_TASK=y\nCONFIG_TCMD_CONSOLE=y\nCONFIG_TCMD_MASTER=y\nCONFIG_TCMD=y\nCONFIG_UART_NS16550=y\nCONFIG_UART_PM_NS16550=y\nCONFIG_ZEPHYR_BOARD=\"arduino_101\"\nCONFIG_CONSOLE_HANDLER_SHELL=y\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/jerry_app/quark/main.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdio.h>\n#include <stdint.h>\n#include <string.h>\n\n/* Infra */\n#include \"infra/bsp.h\"\n#include \"infra/reboot.h\"\n#include \"infra/log.h\"\n#include \"infra/time.h\"\n#include \"infra/system_events.h\"\n#include \"infra/tcmd/handler.h\"\n\n#include \"cfw/cfw.h\"\n/* Watchdog helper */\n#include \"infra/wdt_helper.h\"\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"string.h\"\n\n#include \"zephyr.h\"\n#include \"microkernel/task.h\"\n#include \"os/os.h\"\n#include \"misc/printk.h\"\n\nstatic T_QUEUE queue;\n\njerry_value_t print_function;\n\nvoid jerry_resolve_error (jerry_value_t ret_value)\n{\n  if (jerry_value_is_error (ret_value))\n  {\n    ret_value = jerry_get_value_from_error (ret_value, true);\n    jerry_value_t err_str_val = jerry_value_to_string (ret_value);\n    jerry_size_t err_str_size = jerry_get_utf8_string_size (err_str_val);\n    jerry_char_t *err_str_buf = (jerry_char_t *) balloc (err_str_size, NULL);\n    jerry_size_t sz = jerry_string_to_utf8_char_buffer (err_str_val, err_str_buf, err_str_size);\n    err_str_buf[sz] = 0;\n    printk (\"Script Error: unhandled exception: %s\\n\", err_str_buf);\n    bfree(err_str_buf);\n    jerry_release_value (err_str_val);\n  }\n}\n\nvoid help ()\n{\n  printk (\"Usage:\\n\");\n  printk (\"js e 'JavaScript Command'\\n\");\n  printk (\"eg. js e print ('Hello World');\\n\");\n}\n\nvoid eval_jerry_script (int argc, char *argv[], struct tcmd_handler_ctx *ctx)\n{\n  if (argc < 3)\n  {\n    TCMD_RSP_ERROR (ctx, NULL);\n    help ();\n    return;\n  }\n  else\n  {\n    OS_ERR_TYPE err;\n    size_t str_total_length = 0;\n    size_t *str_lens = (size_t *) balloc ((argc - 2) * sizeof(size_t), &err);\n    if (str_lens == NULL || err != E_OS_OK)\n    {\n      printk (\"%s: allocate memory failed!\", __func__);\n      TCMD_RSP_ERROR (ctx, NULL);\n      return;\n    }\n    for (int i = 2; i < argc; ++i)\n    {\n      str_lens[i - 2] = strlen (argv[i]);\n      str_total_length += str_lens[i - 2] + 1;\n    }\n    err = E_OS_OK;\n    char *buffer = (char *) balloc (str_total_length, &err);\n    if (buffer == NULL || err != E_OS_OK)\n    {\n      printk (\"%s: allocate memory failed!\", __func__);\n      TCMD_RSP_ERROR (ctx, NULL);\n      return;\n    }\n\n    char *p = buffer;\n    for (int i = 2; i < argc; ++i)\n    {\n      for (int j =0; j < str_lens[i - 2]; ++j)\n      {\n        *p = argv[i][j];\n        ++p;\n      }\n      *p = ' ';\n      ++p;\n    }\n    *p = '\\0';\n\n    jerry_value_t eval_ret = jerry_eval (buffer, str_total_length - 1, JERRY_PARSE_NO_OPTS);\n\n    if (jerry_value_is_error (eval_ret))\n    {\n      jerry_resolve_error (eval_ret);\n      TCMD_RSP_ERROR (ctx, NULL);\n    }\n    else\n    {\n      jerry_value_t args[] = {eval_ret};\n      jerry_value_t ret_val_print = jerry_call_function (print_function,\n                                                         jerry_create_undefined (),\n                                                         args,\n                                                         1);\n      jerry_release_value (ret_val_print);\n      TCMD_RSP_FINAL (ctx, NULL);\n    }\n    jerry_release_value (eval_ret);\n    bfree (buffer);\n    bfree (str_lens);\n  }\n}\n\nvoid jerry_start ()\n{\n  union { double d; unsigned u; } now = { .d = jerry_port_get_current_time () };\n  srand (now.u);\n  jerry_init (JERRY_INIT_EMPTY);\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n  jerry_value_t print_func_name_val = jerry_create_string ((jerry_char_t *) \"print\");\n  print_function = jerry_get_property (global_obj_val, print_func_name_val);\n  jerry_release_value (print_func_name_val);\n  jerry_release_value (global_obj_val);\n}\n\n/* Application main entry point */\nvoid main_task (void *param)\n{\n  /* Init BSP (also init BSP on ARC core) */\n  queue = bsp_init ();\n  /* start Quark watchdog */\n  wdt_start (WDT_MAX_TIMEOUT_MS);\n  /* Init the CFW */\n  cfw_init (queue);\n  jerry_start ();\n  /* Loop to process message queue */\n  while (1)\n  {\n    OS_ERR_TYPE err = E_OS_OK;\n    /* Process message with a given timeout */\n    queue_process_message_wait (queue, 5000, &err);\n    /* Acknowledge the system watchdog to prevent panic and reset */\n    wdt_keepalive ();\n  }\n}\n\nDECLARE_TEST_COMMAND (js, e, eval_jerry_script);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/jerry_app/quark/memory_pool_list.def",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Definition of the memory pools used by balloc/bfree:\n *  DECLARE_MEMORY_POOL( <index>, <size>, <count>, <align> )\n *  <index> : must start at 0 and be of consecutive values *\n *  <size>  : size in bytes of each block from the pool\n *  <count> : number of blocks in the pool\n *\n *  * Pool definitions must be sorted according the block size\n *  value: pool with <index> 0 must have the smallest <size>.\n */\n\nDECLARE_MEMORY_POOL(0,8,32)\nDECLARE_MEMORY_POOL(1,16,64)\nDECLARE_MEMORY_POOL(2,32,64)\nDECLARE_MEMORY_POOL(3,64,48)\nDECLARE_MEMORY_POOL(4,128,8)\nDECLARE_MEMORY_POOL(5,256,4)\nDECLARE_MEMORY_POOL(6,512,3)\nDECLARE_MEMORY_POOL(7,4096,1)\n\n#undef DECLARE_MEMORY_POOL\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/setup.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nimport fnmatch\nimport os\n\ndef build_soft_links(project_path, jerry_path):\n    \"\"\" Creates soft links into the @project_path. \"\"\"\n\n    if not os.path.exists(project_path):\n        os.makedirs(project_path)\n\n    links = [\n        { # arc\n            'src': os.path.join('targets', 'curie_bsp', 'jerry_app', 'arc'),\n            'link_name': 'arc'\n        },\n        { # include\n            'src': os.path.join('targets', 'curie_bsp', 'jerry_app', 'include'),\n            'link_name': 'include'\n        },\n        { # quark\n            'src': os.path.join('targets', 'curie_bsp', 'jerry_app', 'quark'),\n            'link_name': 'quark'\n        },\n        { # quark/jerryscript\n            'src': jerry_path,\n            'link_name': os.path.join('quark', 'jerryscript')\n        }\n    ]\n\n    for link in links:\n        src = os.path.join(jerry_path, link['src'])\n        link_name = os.path.join(project_path, link['link_name'])\n        if not os.path.islink(link_name):\n            os.symlink(src, link_name)\n            print(\"Created symlink '{link_name}' -> '{src}'\".format(src=src, link_name=link_name))\n\n\ndef find_sources(root_dir, sub_dir):\n    \"\"\"\n    Find .c and .S files inside the @root_dir/@sub_dir directory.\n    Note: the returned paths will be relative to the @root_dir directory.\n    \"\"\"\n    src_dir = os.path.join(root_dir, sub_dir)\n\n    matches = []\n    for root, dirnames, filenames in os.walk(src_dir):\n        for filename in fnmatch.filter(filenames, '*.[c|S]'):\n            file_path = os.path.join(root, filename)\n            relative_path = os.path.relpath(file_path, root_dir)\n            matches.append(relative_path)\n\n    return matches\n\n\ndef build_jerry_data(jerry_path):\n    \"\"\"\n    Build up a dictionary which contains the following items:\n     - sources: list of JerryScript sources which should be built.\n     - dirs: list of JerryScript dirs used.\n     - cflags: CFLAGS for the build.\n    \"\"\"\n    jerry_sources = []\n    jerry_dirs = set()\n    for sub_dir in ['jerry-core', 'jerry-math', os.path.join('targets', 'curie_bsp', 'source')]:\n        for file in find_sources(os.path.normpath(jerry_path), sub_dir):\n            path = os.path.join('jerryscript', file)\n            jerry_sources.append(path)\n            jerry_dirs.add(os.path.split(path)[0])\n\n    jerry_cflags = [\n        '-DJERRY_GLOBAL_HEAP_SIZE=10',\n        '-DJERRY_NDEBUG',\n        '-DJERRY_DISABLE_HEAVY_DEBUG',\n        '-DJERRY_BUILTIN_NUMBER=0',\n        '-DJERRY_BUILTIN_STRING=0',\n        '-DJERRY_BUILTIN_BOOLEAN=0',\n        #'-DJERRY_BUILTIN_ERRORS=0',\n        '-DJERRY_BUILTIN_ARRAY=0',\n        '-DJERRY_BUILTIN_MATH=0',\n        '-DJERRY_BUILTIN_JSON=0',\n        '-DJERRY_BUILTIN_DATE=0',\n        '-DJERRY_BUILTIN_REGEXP=0',\n        '-DJERRY_BUILTIN_ANNEXB=0',\n        '-DJERRY_ESNEXT=0',\n        '-DJERRY_LCACHE=0',\n        '-DJERRY_PROPRETY_HASHMAP=0',\n    ]\n\n    return {\n        'sources': jerry_sources,\n        'dirs': jerry_dirs,\n        'cflags': jerry_cflags,\n    }\n\n\ndef write_file(path, content):\n    \"\"\" Writes @content into the file at specified by the @path. \"\"\"\n    norm_path = os.path.normpath(path)\n    with open(norm_path, \"w+\") as f:\n        f.write(content)\n    print(\"Wrote file '{0}'\".format(norm_path))\n\n\ndef build_obj_y(source_list):\n    \"\"\"\n    Build obj-y additions from the @source_list.\n    Note: the input sources should have their file extensions.\n    \"\"\"\n    return '\\n'.join(['obj-y += {0}.o'.format(os.path.splitext(fname)[0]) for fname in source_list])\n\n\ndef build_cflags_y(cflags_list):\n    \"\"\"\n    Build cflags-y additions from the @cflags_list.\n    Note: the input sources should have their file extensions.\n    \"\"\"\n    return '\\n'.join(['cflags-y += {0}'.format(cflag) for cflag in cflags_list])\n\n\ndef build_mkdir(dir_list):\n    \"\"\" Build mkdir calls for each dir in the @dir_list. \"\"\"\n    return '\\n'.join(['\\t$(AT)mkdir -p {0}'.format(os.path.join('$(OUT_SRC)', path)) for path in dir_list])\n\n\ndef create_root_kbuild(project_path):\n    \"\"\" Creates @project_path/Kbuild.mk file. \"\"\"\n\n    root_kbuild_path = os.path.join(project_path, 'Kbuild.mk')\n    root_kbuild_content = '''\nobj-$(CONFIG_QUARK_SE_ARC) += arc/\nobj-$(CONFIG_QUARK_SE_QUARK) += quark/\n'''\n    write_file(root_kbuild_path, root_kbuild_content)\n\n\ndef create_root_makefile(project_path):\n    \"\"\" Creates @project_path/Makefile file. \"\"\"\n\n    root_makefile_path = os.path.join(project_path, 'Makefile')\n    root_makefile_content = '''\nTHIS_DIR   := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))\nT          := $(abspath $(THIS_DIR)/../..)\nPROJECT    := {project_name}\nBOARD        := curie_101\nifeq ($(filter curie_101, $(BOARD)),)\n$(error The curie jerry sample application can only run on the curie_101 Board)\nendif\nBUILDVARIANT ?= debug\nquark_DEFCONFIG = $(PROJECT_PATH)/quark/defconfig\narc_DEFCONFIG = $(PROJECT_PATH)/arc/defconfig\n\n# Optional: set the default version\nVERSION_MAJOR  := 1\nVERSION_MINOR  := 0\nVERSION_PATCH  := 0\ninclude $(T)/build/project.mk\n'''.format(project_name=project_name)\n\n    write_file(root_makefile_path, root_makefile_content)\n\n\ndef create_arc_kbuild(project_path):\n    \"\"\" Creates @project_path/arc/Kbuild.mk file. \"\"\"\n\n    arc_path = os.path.join(project_path, 'arc')\n    arc_kbuild_path = os.path.join(arc_path, 'Kbuild.mk')\n    arc_sources = find_sources(arc_path, '.')\n    arc_kbuild_content = build_obj_y(arc_sources)\n\n    write_file(arc_kbuild_path, arc_kbuild_content)\n\n\ndef create_quark_kbuild(project_path, jerry_path):\n    \"\"\" Creates @project_path/quark/Kbuild.mk file. \"\"\"\n    quark_kbuild_path = os.path.join(project_path, 'quark', 'Kbuild.mk')\n\n    # Extract a few JerryScript related data\n    jerry_data = build_jerry_data(jerry_path)\n    jerry_objects = build_obj_y(jerry_data['sources'])\n    jerry_defines = jerry_data['cflags']\n    jerry_build_dirs = build_mkdir(jerry_data['dirs'])\n\n    quark_include_paths = [\n        'include',\n        'jerryscript',\n        os.path.join('jerryscript', 'jerry-math', 'include'),\n        os.path.join('jerryscript', 'targets' ,'curie_bsp', 'include')\n    ] + list(jerry_data['dirs'])\n\n    quark_includes = [\n        '-Wno-error',\n    ] + ['-I%s' % os.path.join(project_path, 'quark', path) for path in quark_include_paths]\n\n    quark_cflags = build_cflags_y(jerry_defines + quark_includes)\n\n    quark_kbuild_content = '''\n{cflags}\n\nobj-y += main.o\n{objects}\n\nbuild_dirs:\n{dirs}\n\n$(OUT_SRC): build_dirs\n'''.format(objects=jerry_objects, cflags=quark_cflags, dirs=jerry_build_dirs)\n\n    write_file(quark_kbuild_path, quark_kbuild_content)\n\n\ndef main(curie_path, project_name, jerry_path):\n    project_path = os.path.join(curie_path, 'wearable_device_sw', 'projects', project_name)\n\n    build_soft_links(project_path, jerry_path)\n\n    create_root_kbuild(project_path)\n    create_root_makefile(project_path)\n    create_arc_kbuild(project_path)\n    create_quark_kbuild(project_path, jerry_path)\n\n\nif __name__ == '__main__':\n    import sys\n\n    if len(sys.argv) != 2:\n        print('Usage:')\n        print('{script_name} [full or relative path of Curie_BSP]'.format(script_name=sys.argv[0]))\n        sys.exit(1)\n\n    project_name = 'curie_bsp_jerry'\n\n    file_dir = os.path.dirname(os.path.abspath(__file__))\n    jerry_path = os.path.join(file_dir, \"..\", \"..\")\n    curie_path = os.path.join(os.getcwd(), sys.argv[1])\n\n    main(curie_path, project_name, jerry_path)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/source/curie-bsp-port.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <infra/time.h>\n#include <misc/printk.h>\n#include <stdint.h>\n#include <stdbool.h>\n#include <stddef.h>\n#include \"jerryscript-port.h\"\n\n/**\n * Provide log message implementation for the engine.\n * Curie BSP implementation\n */\nvoid\njerry_port_log (jerry_log_level_t level, /**< log level */\n                const char *format, /**< format string */\n                ...)  /**< parameters */\n{\n  if (level <= JERRY_LOG_LEVEL_ERROR)\n  {\n    char buf[256];\n    int length = 0;\n    va_list args;\n    va_start (args, format);\n    length = vsnprintf (buf, 256, format, args);\n    buf[length] = '\\0';\n    printk (\"%s\", buf);\n    va_end (args);\n  }\n} /* jerry_port_log */\n\n/**\n * Curie BSP implementation of jerry_port_fatal.\n */\nvoid jerry_port_fatal (jerry_fatal_code_t code)\n{\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Jerry Fatal Error!\\n\");\n  while (true);\n} /* jerry_port_fatal */\n\n/**\n * Curie BSP implementation of jerry_port_get_local_time_zone_adjustment.\n */\ndouble jerry_port_get_local_time_zone_adjustment (double unix_ms, bool is_utc)\n{\n  //EMPTY implementation\n  return 0;\n} /* jerry_port_get_local_time_zone_adjustment */\n\n/**\n * Curie BSP implementation of jerry_port_get_current_time.\n */\ndouble jerry_port_get_current_time (void)\n{\n  uint32_t uptime_ms = get_uptime_ms ();\n  uint32_t epoch_time = uptime_to_epoch (uptime_ms);\n\n  return ((double) epoch_time) * 1000.0;\n} /* jerry_port_get_current_time */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/curie_bsp/source/setjmp.S",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.macro func _name\n.global \\_name\n.type \\_name, %function\n\\_name:\n.endm\n.macro endfunc _name\n.size \\_name, .-\\_name\n.endm\n\n/**\n * setjmp (jmp_buf env)\n *\n * See also:\n *          longjmp\n *\n * @return 0 - if returns from direct call,\n *         nonzero - if returns after longjmp.\n */\nfunc setjmp\n  mov    %eax,(%eax);\n  mov    %ebx,0x4(%eax);\n  mov    %ecx,0x8(%eax);\n  mov    %edx,0xc(%eax);\n  mov    %esi,0x10(%eax);\n  mov    %edi,0x14(%eax);\n  mov    %ebp,0x18(%eax);\n  mov    %esp,0x1c(%eax);\n  push   %edx;\n  mov    0x4(%esp),%edx;\n  mov    %edx,0x20(%eax);\n  pop    %edx;\n  xor    %eax,%eax;\n  ret\nendfunc setjmp\n\n/**\n * longjmp (jmp_buf env, int val)\n *\n * Note:\n *      if val is not 0, then it would be returned from setjmp,\n *      otherwise - 0 would be returned.\n *\n * See also:\n *          setjmp\n */\nfunc longjmp\n  test   %edx, %edx;\n  jne    . + 0x3;\n  inc    %edx;\n  mov    0x4(%eax),%ebx;\n  mov    0x8(%eax),%ecx;\n  mov    0x10(%eax),%esi;\n  mov    0x14(%eax),%edi;\n  mov    0x18(%eax),%ebp;\n  mov    0x1c(%eax),%esp;\n  push   %edx;\n  mov    0x20(%eax),%edx;\n  mov    %edx,0x4(%esp);\n  mov    0xc(%eax),%edx;\n  pop    %eax;\n  ret\nendfunc longjmp\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp-idf/CMakeLists.txt.example",
    "content": "# assumes there is a component with this the following \n# - set the JERRY_DIR wherever the jerryscript source code (the include files) is\n# - a \"lib\" directory with the 2 libraries below\n\nset(JERRY_DIR ${PROJECT_DIR}/../../jerryscript/)\n\nidf_component_register(\n\tSRC_DIRS ${JERRY_DIR}/targets/esp-idf\n\tINCLUDE_DIRS ${JERRY_DIR}/jerry-core/include ${JERRY_DIR}/jerry-ext/include\n)\n\nadd_prebuilt_library(libjerry-core lib/libjerry-core.a REQUIRES newlib PRIV_REQUIRES ${COMPONENT_NAME})\nadd_prebuilt_library(libjerry-ext  lib/libjerry-ext.a PRIV_REQUIRES ${COMPONENT_NAME})\n\ntarget_link_libraries(${COMPONENT_LIB} INTERFACE libjerry-core)\ntarget_link_libraries(${COMPONENT_LIB} INTERFACE libjerry-ext)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp-idf/README.md",
    "content": "This is a port for espressif's esp-idf (esp32). The MATH, LTO and STRIP options should be disabled, so to build under the IDF toolchain, just run the following command\n\n```\npython tools\\build.py --toolchain=cmake/toolchain-esp32.cmake --cmake-param \"-GUnix Makefiles\" --jerry-cmdline=OFF --jerry-port-default=OFF --lto=OFF --strip=OFF\n```\n\nNB: the MATH, STRIP and LTO might be disabled by platform as well. I strongly suggest limiting heap memorry with '--mem-heap=128' but that really depends on the SRAM avaiulable on your esp32.\n\nThen copy the artefacts 'build/lib/\\*.a' in an esp-idf component named 'jerryscript' (eg) and use a 'CMakeLists.txt' like this one\n\n```\n# assumes there is a component with this the following\n# - set the JERRY_DIR wherever the jerryscript source code (the include files) is\n# - a \"lib\" directory with the 2 libraries below\n\nset(JERRY_DIR ${PROJECT_DIR}/../../jerryscript/)\n\nidf_component_register(\n\tSRC_DIRS ${JERRY_DIR}/targets/esp-idf\n\tINCLUDE_DIRS ${JERRY_DIR}/jerry-core/include ${JERRY_DIR}/jerry-ext/include\n)\n\nadd_prebuilt_library(libjerry-core lib/libjerry-core.a REQUIRES newlib PRIV_REQUIRES ${COMPONENT_NAME})\nadd_prebuilt_library(libjerry-ext  lib/libjerry-ext.a PRIV_REQUIRES ${COMPONENT_NAME})\n\ntarget_link_libraries(${COMPONENT_LIB} INTERFACE libjerry-core)\ntarget_link_libraries(${COMPONENT_LIB} INTERFACE libjerry-ext)\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp-idf/date.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdlib.h>\n#include <sys/time.h>\n\n#include \"jerryscript-port.h\"\n\n/**\n * Default implementation of jerry_port_get_local_time_zone_adjustment. Uses the 'tm_gmtoff' field\n * of 'struct tm' (a GNU extension) filled by 'localtime_r' if available on the\n * system, does nothing otherwise.\n *\n * @return offset between UTC and local time at the given unix timestamp, if\n *         available. Otherwise, returns 0, assuming UTC time.\n */\ndouble jerry_port_get_local_time_zone_adjustment (double unix_ms,  /**< ms since unix epoch */\n                                                  bool is_utc)  /**< is the time above in UTC? */\n{\n  struct tm tm;\n  char buf[8];   \n  time_t now = (time_t) (unix_ms / 1000);\n  \n  localtime_r (&now, &tm);\n  \n  if (!is_utc)\n  {\n    strftime(buf, 8, \"%z\", &tm);\n    now -= -atof(buf) * 3600 * 1000 / 100;\n    localtime_r (&now, &tm);\n  }\n  \n  strftime(buf, 8, \"%z\", &tm);\n  \n  return -atof(buf) * 3600 * 1000 / 100;\n} /* jerry_port_get_local_time_zone_adjustment */\n\n/**\n * Default implementation of jerry_port_get_current_time. Uses 'gettimeofday' if\n * available on the system, does nothing otherwise.\n *\n * @return milliseconds since Unix epoch - if 'gettimeofday' is available and\n *                                         executed successfully,\n *         0 - otherwise.\n */\ndouble jerry_port_get_current_time (void)\n{\n  struct timeval tv;\n\n  if (gettimeofday (&tv, NULL) == 0)\n  {\n    return ((double) tv.tv_sec) * 1000.0 + ((double) tv.tv_usec) / 1000.0;\n  } \n  return 0.0;\n} /* jerry_port_get_current_time */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp-idf/debugger.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"freertos/FreeRTOS.h\"\n#include \"freertos/task.h\"\n\n#include \"jerryscript-port.h\"\n\n/**\n * Default implementation of jerry_port_sleep. Uses 'nanosleep' or 'usleep' if\n * available on the system, does nothing otherwise.\n */\nvoid jerry_port_sleep (uint32_t sleep_time) /**< milliseconds to sleep */\n{\n  vTaskDelay( sleep_time / portTICK_PERIOD_MS);\n} /* jerry_port_sleep */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp-idf/external-context.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n \n#include \"jerryscript-port.h\"\n\n/**\n * Pointer to the current context.\n * Note that it is a global variable, and is not a thread safe implementation.\n * But I don't see how jerryscript can make that thread-safe, only the appication can\n */\nstatic jerry_context_t *current_context_p = NULL;\n\n/**\n * Set the current_context_p as the passed pointer.\n */\nvoid\njerry_port_default_set_current_context (jerry_context_t *context_p) /**< points to the created context */\n{\n  current_context_p = context_p;\n} /* jerry_port_default_set_current_context */\n\n/**\n * Get the current context.\n *\n * @return the pointer to the current context\n */\njerry_context_t *\njerry_port_get_current_context (void)\n{\n  return current_context_p;\n} /* jerry_port_get_current_context */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp-idf/fatal.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"freertos/FreeRTOS.h\"\n#include \"freertos/task.h\"\n#include \"esp_system.h\"\n#include \"esp_log.h\"\n\n#include \"jerryscript-port.h\"\n\nstatic const char TAG[] = \"JS\";\n\n/**\n * Default implementation of jerry_port_fatal. Calls 'abort' if exit code is\n * non-zero, 'exit' otherwise.\n */\nvoid jerry_port_fatal (jerry_fatal_code_t code) /**< cause of error */\n{\n  ESP_LOGE(TAG, \"Fatal error %d\", code);\t\n  vTaskSuspend(NULL);\n  abort();\n} /* jerry_port_fatal */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp-idf/io.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdarg.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"esp_log.h\"\n\n#include \"jerryscript-port.h\"\n#include \"jerryscript-debugger.h\"\n\nstatic const char TAG[] = \"JS\";\n\nstatic esp_log_level_t crosslog(jerry_log_level_t level)\n{\n  switch(level)\n  {\n    case JERRY_LOG_LEVEL_ERROR: return ESP_LOG_ERROR;\n    case JERRY_LOG_LEVEL_WARNING: return ESP_LOG_WARN;\n    case JERRY_LOG_LEVEL_DEBUG: return ESP_LOG_DEBUG;\n    case JERRY_LOG_LEVEL_TRACE: return ESP_LOG_VERBOSE;\n  }\n\n return ESP_LOG_NONE;\n}\n\n/**\n * Actual log level\n */\nstatic jerry_log_level_t jerry_port_default_log_level = JERRY_LOG_LEVEL_ERROR;\n\n/**\n * Get the log level\n *\n * @return current log level\n */\njerry_log_level_t\njerry_port_default_get_log_level (void)\n{\n  return jerry_port_default_log_level;\n} /* jerry_port_default_get_log_level */\n\n/**\n * Set the log level\n */\nvoid\njerry_port_default_set_log_level (jerry_log_level_t level) /**< log level */\n{\n  jerry_port_default_log_level = level;\n} /* jerry_port_default_set_log_level */\n\n/**\n * Default implementation of jerry_port_log. Prints log message to the standard\n * error with 'vfprintf' if message log level is less than or equal to the\n * current log level.\n *\n * If debugger support is enabled, printing happens first to an in-memory buffer,\n * which is then sent both to the standard error and to the debugger client.\n */\nvoid\njerry_port_log (jerry_log_level_t level, /**< message log level */\n                const char *format, /**< format string */\n                ...)  /**< parameters */\n{\n  if (level <= jerry_port_default_log_level)\n  {\n    va_list args;\n    va_start (args, format);\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n    int length = vsnprintf (NULL, 0, format, args);\n    va_end (args);\n    va_start (args, format);\n\n    JERRY_VLA (char, buffer, length + 1);\n    vsnprintf (buffer, (size_t) length + 1, format, args);\n\n    esp_log_write(crosslog(level), TAG, buffer);\n    jerry_debugger_send_log (level, (jerry_char_t *) buffer, (jerry_size_t) length);\n#else /* If jerry-debugger isn't defined, libc is turned on */\n    esp_log_writev(crosslog(level), TAG, format, args);\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n    va_end (args);\n  }\n} /* jerry_port_log */\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n\n#define DEBUG_BUFFER_SIZE (256)\nstatic char debug_buffer[DEBUG_BUFFER_SIZE];\nstatic int debug_buffer_index = 0;\n\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n\n/**\n * Default implementation of jerry_port_print_char. Uses 'putchar' to\n * print a single character to standard output.\n */\nvoid\njerry_port_print_char (char c) /**< the character to print */\n{\n  putchar(c);\n\n#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)\n  debug_buffer[debug_buffer_index++] = c;\n\n  if ((debug_buffer_index == DEBUG_BUFFER_SIZE) || (c == '\\n'))\n  {\n    jerry_debugger_send_output ((jerry_char_t *) debug_buffer, (jerry_size_t) debug_buffer_index);\n    debug_buffer_index = 0;\n  }\n#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */\n} /* jerry_port_print_char */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp-idf/module.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <limits.h>\n#include <stdarg.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\n#include \"jerryscript-port.h\"\n\n/**\n * Opens file with the given path and reads its source.\n * @return the source of the file\n */\nuint8_t *\njerry_port_read_source (const char *file_name_p, /**< file name */\n                        size_t *out_size_p) /**< [out] read bytes */\n{\n  FILE *file_p = fopen (file_name_p, \"rb\");\n\n  if (file_p == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Failed to open file: %s\\n\", file_name_p);\n    return NULL;\n  }\n\n  struct stat info = { };\n  fstat(fileno(file_p), &info);\t\n  uint8_t *buffer_p = (uint8_t *) malloc (info.st_size);\n\n  if (buffer_p == NULL)\n  {\n    fclose (file_p);\n\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Failed to allocate memory for file: %s\\n\", file_name_p);\n    return NULL;\n  }\n\n  size_t bytes_read = fread (buffer_p, 1u, info.st_size, file_p);\n  if (bytes_read != info.st_size)\n  {\n    fclose (file_p);\n    free (buffer_p);\n\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: Failed to read file: %s\\n\", file_name_p);\n    return NULL;\n  }\n\n  fclose (file_p);\n  *out_size_p = bytes_read;\n\n  return buffer_p;\n} /* jerry_port_read_source */\n\n/**\n * Release the previously opened file's content.\n */\nvoid\njerry_port_release_source (uint8_t *buffer_p) /**< buffer to free */\n{\n  free (buffer_p);\n} /* jerry_port_release_source */\n\n/**\n * Normalize a file path\n *\n * @return length of the path written to the output buffer\n */\nsize_t\njerry_port_normalize_path (const char *in_path_p,   /**< input file path */\n                           char *out_buf_p,         /**< output buffer */\n                           size_t out_buf_size,     /**< size of output buffer */\n                           char *base_file_p)       /**< base file path */\n{\n  size_t ret = strlen(base_file_p) + strlen(in_path_p) + 1;\n\n  if (ret < out_buf_size) {\n    strcpy (out_buf_p, base_file_p);\n    strcat (out_buf_p, \"/\");\n    strcat (out_buf_p, in_path_p);\n    return ret;\n  }\n\n  return 0; \n} /* jerry_port_normalize_path */\n\n/**\n * Get the module object of a native module.\n *\n * @return Undefined, if 'name' is not a native module\n *         jerry_value_t containing the module object, otherwise\n */\njerry_value_t\njerry_port_get_native_module (jerry_value_t name) /**< module specifier */\n{\n  (void) name;\n  return jerry_create_undefined ();\n} /* jerry_port_get_native_module */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp-idf/promise.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript-port.h\"\n\n/**\n * Track unhandled promise rejections.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_BUILTIN_PROMISE\n *      is enabled.\n *\n * @param promise rejected promise\n * @param operation HostPromiseRejectionTracker operation\n */\nvoid\njerry_port_track_promise_rejection (const jerry_value_t promise,\n                                    const jerry_promise_rejection_operation_t operation)\n{\n  (void) operation; /* unused */\n\n  jerry_value_t reason = jerry_get_promise_result (promise);\n  jerry_value_t reason_to_string = jerry_value_to_string (reason);\n  jerry_size_t req_sz = jerry_get_utf8_string_size (reason_to_string);\n  jerry_char_t str_buf_p[req_sz + 1];\n  jerry_string_to_utf8_char_buffer (reason_to_string, str_buf_p, req_sz);\n  str_buf_p[req_sz] = '\\0';\n\n  jerry_release_value (reason_to_string);\n  jerry_release_value (reason);\n\n  jerry_port_log (JERRY_LOG_LEVEL_WARNING, \"Uncaught (in promise) %s\\n\", str_buf_p);\n} /* jerry_port_track_promise_rejection */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/LICENSE",
    "content": "Copyright 2015 Samsung Electronics Co., Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\n\nESPRSSIF MIT License\n\nCopyright (c) 2015 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>\n\nPermission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only, in which case,\nit is free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the ¡°Software¡±), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge, publish, distribute,\nsublicense, and/or sell copies of the Software, and to permit persons to whom the Software\nis furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or\nsubstantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED ¡°AS IS¡±, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE\nFOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\n\nÀÖöÎ MIT Ðí¿ÉÖ¤\n\n°æÈ¨ (c) 2015  <ÀÖöÎÐÅÏ¢¿Æ¼¼£¨ÉÏº££©ÓÐÏÞ¹«Ë¾>\n\n¸ÃÐí¿ÉÖ¤ÊÚÈ¨½öÏÞÓÚÀÖöÎÐÅÏ¢¿Æ¼¼ ESP8266 ²úÆ·µÄÓ¦ÓÃ¿ª·¢¡£ÔÚ´ËÇé¿öÏÂ£¬¸ÃÐí¿ÉÖ¤Ãâ·ÑÊÚÈ¨ÈÎºÎ»ñµÃ¸Ã\nÈí¼þ¼°ÆäÏà¹ØÎÄµµ£¨Í³³ÆÎª¡°Èí¼þ¡±£©µÄÈËÎÞÏÞÖÆµØ¾­Óª¸ÃÈí¼þ£¬°üÀ¨ÎÞÏÞÖÆµÄÊ¹ÓÃ¡¢¸´ÖÆ¡¢ÐÞ¸Ä¡¢ºÏ²¢¡¢\n³ö°æ·¢ÐÐ¡¢É¢²¼¡¢ÔÙÊÚÈ¨¡¢¼°··ÊÛÈí¼þ¼°Èí¼þ¸±±¾µÄÈ¨Àû¡£±»ÊÚÈ¨ÈËÔÚÏíÊÜÕâÐ©È¨ÀûµÄÍ¬Ê±£¬Ðè·þ´ÓÏÂÃæ\nµÄÌõ¼þ£º\n\nÔÚÈí¼þºÍÈí¼þµÄËùÓÐ¸±±¾ÖÐ¶¼±ØÐë°üº¬ÒÔÉÏµÄ°æÈ¨ÉùÃ÷ºÍÊÚÈ¨ÉùÃ÷¡£\n\n¸ÃÈí¼þ°´±¾À´µÄÑù×ÓÌá¹©£¬Ã»ÓÐÈÎºÎÃ÷È·»ò°µº¬µÄµ£±££¬°üÀ¨µ«²»½öÏÞÓÚ¹ØÓÚÊÔÏúÐÔ¡¢ÊÊºÏÄ³Ò»ÌØ¶¨ÓÃÍ¾\nºÍ·ÇÇÖÈ¨µÄ±£Ö¤¡£×÷ÕßºÍ°æÈ¨³ÖÓÐÈËÔÚÈÎºÎÇé¿öÏÂ¾ù²»¾ÍÓÉÈí¼þ»òÈí¼þÊ¹ÓÃÒýÆðµÄÒÔºÏÍ¬ÐÎÊ½¡¢ÃñÊÂÇÖÈ¨\n»òÆäËü·½Ê½Ìá³öµÄÈÎºÎË÷Åâ¡¢Ëðº¦»òÆäËüÔðÈÎ¸ºÔð¡£\n\n\n\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/Makefile",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n#############################################################\n# Required variables for each makefile\n# Discard this section from all parent makefiles\n# Expected variables (with automatic defaults):\n#   CSRCS (all \"C\" files in the dir)\n#   SUBDIRS (all subdirs with a Makefile)\n#   GEN_LIBS - list of libs to be generated ()\n#   GEN_IMAGES - list of object file images to be generated ()\n#   GEN_BINS - list of binaries to be generated ()\n#   COMPONENTS_xxx - a list of libs/objs in the form\n#     subdir/lib to be extracted and rolled up into\n#     a generated lib/image xxx.a ()\n#\n# Tabsize : 8\n#\nTARGET = eagle\nFLAVOR = release\n#FLAVOR = debug\n\n#EXTRA_CCFLAGS += -u\n\nifndef PDIR # {\nGEN_IMAGES= eagle.app.v6.out\nGEN_BINS= eagle.app.v6.bin\nSPECIAL_MKTARGETS=$(APP_MKTARGETS)\nSUBDIRS= user\nendif # } PDIR\n\n# path to the JERRYSCRIPT directory\nJERRYDIR ?= $(CURDIR)/../../..\n\nLDDIR = $(SDK_PATH)/ld\n\n#############################################################\n# JerryScript requires a modified linker script with specified alignments\n# \tso we use it instead of the original one from SDK.\nJERRY_LD_FILE = $(CURDIR)/ld/eagle.app.v6.ld\n\nCCFLAGS += -Os -std=c99\n#CCFLAGS += -O0\n\nTARGET_LDFLAGS =\t\t\t\t\t\\\n\t-nostdlib\t\t\t\t\t\\\n\t-Wl,-EL\t\t\t\t\t\t\\\n\t--longcalls\t\t\t\t\t\\\n\t--text-section-literals\n\nifeq ($(FLAVOR),debug)\n\tTARGET_LDFLAGS += -O0 -g\nendif\n\nifeq ($(FLAVOR),release)\n\tTARGET_LDFLAGS += -Os\nendif\n\nCOMPONENTS_eagle.app.v6 =\t\t\t\t\\\n\tuser/libuser.a\n\nLINKFLAGS_eagle.app.v6 =\t\t\t\t\\\n\t-L$(SDK_PATH)/lib\t\t\t\t\\\n\t-Wl,--gc-sections\t\t\t\t\\\n\t-Wl,-Map,output.map\t\t\t\t\\\n\t-nostdlib\t\t\t\t\t\\\n\t-T$(JERRY_LD_FILE)\t\t\t\t\\\n\t-Wl,--no-check-sections\t\t\t\t\\\n\t-u call_user_start\t\t\t\t\\\n\t-Wl,-static\t\t\t\t\t\\\n\t-Wl,--start-group\t\t\t\t\\\n\t-lcirom\t\t\t\t\t\t\\\n\t-lcrypto\t\t\t\t\t\\\n\t-lespconn\t\t\t\t\t\\\n\t-lespnow\t\t\t\t\t\\\n\t-lfreertos\t\t\t\t\t\\\n\t-lgcc\t\t\t\t\t\t\\\n\t-lhal\t\t\t\t\t\t\\\n\t-ljson\t\t\t\t\t\t\\\n\t-llwip\t\t\t\t\t\t\\\n\t-ldriver\t\t\t\t\t\\\n\t-lmain\t\t\t\t\t\t\\\n\t-lmirom\t\t\t\t\t\t\\\n\t-lnet80211\t\t\t\t\t\\\n\t-lnopoll\t\t\t\t\t\\\n\t-lphy\t\t\t\t\t\t\\\n\t-lpp\t\t\t\t\t\t\\\n\t-lpwm\t\t\t\t\t\t\\\n\t-lsmartconfig\t\t\t\t\t\\\n\t-lspiffs\t\t\t\t\t\\\n\t-lssl\t\t\t\t\t\t\\\n\t-lwpa\t\t\t\t\t\t\\\n\t-lwps\t\t\t\t\t\t\\\n\t-L./libs\t\t\t\t\t\\\n\t-ljerry-core\t\t\t\t\t\\\n\t-ljerry-math\t\t\t\t\t\\\n\t$(DEP_LIBS_eagle.app.v6)\t\t\t\\\n\t-Wl,--end-group\n\nDEPENDS_eagle.app.v6 =\t\t\t\t\t\\\n\t$(JERRY_LD_FILE)\t\t\t\t\\\n\t$(LDDIR)/eagle.rom.addr.v6.ld\t\t\t\\\n\t./include/jerry-targetjs.h\t\t\t\\\n\t./libs/libjerry-core.a\t\t\t\t\\\n\t./libs/libjerry-math.a\n\n\n#############################################################\n# Configuration i.e. compile options etc.\n# Target specific stuff (defines etc.) goes in here!\n# Generally values applying to a tree are captured in the\n#   makefile at its root level - these are then overridden\n#   for a subtree within the makefile rooted therein\n#\n\n#UNIVERSAL_TARGET_DEFINES =    \\\n\n# Other potential configuration flags include:\n#  -DTXRX_TXBUF_DEBUG\n#  -DTXRX_RXBUF_DEBUG\n#  -DWLAN_CONFIG_CCX\nCONFIGURATION_DEFINES = -DICACHE_FLASH\n\nDEFINES += \\\n\t$(UNIVERSAL_TARGET_DEFINES) \\\n\t$(CONFIGURATION_DEFINES)\n\nDDEFINES += \\\n\t$(UNIVERSAL_TARGET_DEFINES) \\\n\t$(CONFIGURATION_DEFINES)\n\n\n#############################################################\n# Recursion Magic - Don't touch this!!\n#\n# Each subtree potentially has an include directory\n#   corresponding to the common APIs applicable to modules\n#   rooted at that subtree. Accordingly, the INCLUDE PATH\n#   of a module can only contain the include directories up\n#   its parent path, and not its siblings\n#\n# Required for each makefile to inherit from the parent\n#\n\nINCLUDES := -I $(JERRYDIR)/jerry-core/include\nINCLUDES := $(INCLUDES) -I $(PDIR)include -I $(PDIR)source\nsinclude $(SDK_PATH)/Makefile\n\n.PHONY: FORCE\n\nFORCE:\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/Makefile.esp8266",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nCURDIR     = `pwd`\nESP_LIB    = $(SDK_PATH)/lib\nBUILD_DIR  = build/obj-esp8266\nCOPYTARGET = targets/esp8266/libs\nUSBDEVICE  ?= /dev/ttyUSB0\nJERRYHEAP  ?= 20\nESPTOOL    ?= $(ESPTOOL_PATH)/esptool.py\n\n# compile flags\nESP_CFLAGS := -D__TARGET_ESP8266 -D__attr_always_inline___=\n\nMFORCE32 = $(shell xtensa-lx106-elf-gcc --help=target | grep mforce-l32)\n\nifneq ($(MFORCE32),)\n    # Your compiler supports the -mforce-l32 flag which means that\n    # constants can be placed in ROM to free additional RAM\n    ESP_CFLAGS += -DJERRY_ATTR_CONST_DATA=\"__attribute__((aligned(4))) __attribute__((section(\\\".irom.text\\\")))\"\n    ESP_CFLAGS += -mforce-l32\nendif\n\nESP_CFLAGS += -Wl,-EL -fno-inline-functions\nESP_CFLAGS += -ffunction-sections -fdata-sections\nESP_CFLAGS += -mlongcalls -mtext-section-literals -mno-serialize-volatile\n\n.PHONY: jerry js2c mkbin check-env flash clean\n\nall: check-env jerry js2c mkbin\n\njerry:\n\tmkdir -p $(BUILD_DIR)\n\tmkdir -p $(COPYTARGET)\n\tcmake -B$(BUILD_DIR) -H./ \\\n\t -DCMAKE_SYSTEM_NAME=MCU \\\n\t -DCMAKE_SYSTEM_PROCESSOR=xtensia-lx106 \\\n\t -DCMAKE_C_COMPILER=xtensa-lx106-elf-gcc \\\n\t -DCMAKE_C_COMPILER_WORKS=TRUE \\\n\t -DENABLE_LTO=OFF \\\n\t -DENABLE_AMALGAM=ON \\\n\t -DJERRY_MATH=ON \\\n\t -DJERRY_CMDLINE=OFF \\\n\t -DJERRY_PROFILE=\"es5.1\" \\\n\t -DEXTERNAL_COMPILE_FLAGS=\"$(ESP_CFLAGS)\" \\\n\t -DJERRY_GLOBAL_HEAP_SIZE=$(JERRYHEAP)\n\n\tmake -C$(BUILD_DIR) jerry-core jerry-math\n\tcp $(BUILD_DIR)/lib/libjerry-core.a $(COPYTARGET)/\n\tcp $(BUILD_DIR)/lib/libjerry-math.a $(COPYTARGET)/\n\njs2c:\n\ttools/js2c.py --dest targets/esp8266/include --js-source targets/esp8266/js\n\nmkbin:\n\tmake -Ctargets/esp8266 clean\n\tmake -Ctargets/esp8266 BOOT=new APP=0 SPI_SPEED=40 SPI_MODE=DIO SPI_SIZE_MAP=4\n\ncheck-env:\nifndef SDK_PATH\n\t$(error SDK_PATH is undefined for ESP8266)\nendif\nifndef BIN_PATH\n\t$(error BIN_PATH is undefined for ESP8266)\nendif\n\nflash:\n\t$(ESPTOOL) --port $(USBDEVICE) write_flash \\\n\t0x00000 $(BIN_PATH)/eagle.flash.bin \\\n\t0x20000 $(BIN_PATH)/eagle.irom0text.bin \\\n\t0x3FC000 $(SDK_PATH)/bin/esp_init_data_default.bin\n\nerase_flash:\n\t$(ESPTOOL) --port $(USBDEVICE) erase_flash\n\nclean:\n\trm -rf $(BUILD_DIR)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/Makefile.travis",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# Default target for running the build test outside the Travis CI environment.\nall:\n\t$(MAKE) install\n\t$(MAKE) script\n\n\n## Targets for installing build dependencies of the ESP8266 JerryScript target.\n\n# Install tools via apt.\ninstall-apt-get-deps:\n\tsudo apt-get install -q -y wget\n\n# Fetch and build crosstool-NG with support for Xtensa.\ninstall-xtensa-kx106-gcc:\n\twget https://dl.espressif.com/dl/xtensa-lx106-elf-linux64-1.22.0-88-gde0bdc1-4.8.5.tar.gz -O ../xtensa-lx106-elf-linux64-1.22.0-88-gde0bdc1-4.8.5.tar.gz --no-check-certificate\n\tcd .. && tar xvfz xtensa-lx106-elf-linux64-1.22.0-88-gde0bdc1-4.8.5.tar.gz\n\n# Fetch Espressif SDK and Xtensa libraries.\ninstall-espressif-sdk:\n\tgit clone https://github.com/espressif/ESP8266_RTOS_SDK.git ../ESP8266_RTOS_SDK -b v2.1.0\n\n# Perform all the necessary (JerryScript-independent) installation steps.\ninstall-noapt: install-xtensa-kx106-gcc install-espressif-sdk\ninstall: install-apt-get-deps install-noapt\n\n\n## Targets for building ESP8266 with JerryScript.\n\n# Build the firmware (ESP8266 with JerryScript).\nscript:\n\tPATH=$(CURDIR)/../xtensa-lx106-elf/bin:$$PATH $(MAKE) -f ./targets/esp8266/Makefile.esp8266 BIN_PATH=build/obj-esp8266 SDK_PATH=$(CURDIR)/../ESP8266_RTOS_SDK\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/docs/ESP-PREREQUISITES.md",
    "content": "#### Preparation\n\n##### Accessories\n\nYou need,\n* 3.3V power supply. You can use bread board power (+5V, +3.3V). I used LM317 like this;\n  * Use [LM317](http://www.ti.com/lit/ds/symlink/lm317.pdf)\n  * R1 = 330 Ohm, R2 = 545 Ohm (1K + 1.2K in parallel)\n  * 5V 2A adaptor\n* USB to RS-232 Serial + RS-232 Serial to Digital or USB-to-RS232 TTL converter\n\n#### Tools\n\nThe rest of this document will assume that you download all necessary tools into\na common directory structure. For the sake of simplicity, `$HOME/Espressif` will\nbe used as the root of this structure. Feel free to deviate from this but then\nadapt all the paths accordingly.\n\n```\nmkdir $HOME/Espressif\n```\n\n##### Toolchain\n\nDownload the [toolchain](https://github.com/espressif/ESP8266_RTOS_SDK/tree/v3.0.1#get-toolchain)\npre-built for your development platform to `$HOME/Espressif` and untar it. E.g.,\non Linux/x86-64:\n\n```\ncd $HOME/Espressif\ntar xvfz xtensa-lx106-elf-linux64-1.22.0-88-gde0bdc1-4.8.5.tar.gz\n```\n\n##### Espressif SDK: use Espressif official\n\n```\ncd $HOME/Esprissif\ngit clone https://github.com/espressif/ESP8266_RTOS_SDK.git -b v2.1.0\n```\n\nThis version is tested and works properly.\n\n##### ESP image tool\n```\ncd $HOME/Espressif\nwget -O esptool_0.0.2-1_i386.deb https://github.com/esp8266/esp8266-wiki/raw/master/deb/esptool_0.0.2-1_i386.deb\nsudo dpkg -i esptool_0.0.2-1_i386.deb\n```\n\n##### ESP upload tool\n```\ncd $HOME/Espressif\ngit clone https://github.com/themadinventor/esptool\n```\n\n##### Set environment variables\n\nSet environment variables, might also go in your `.profile`:\n```\nexport PATH=$HOME/Espressif/xtensa-lx106-elf/bin:$PATH\nexport SDK_PATH=$HOME/Espressif/ESP8266_RTOS_SDK\nexport ESPTOOL_PATH=$HOME/Espressif/esptool\nexport BIN_PATH=(to output folder path)\n```\n\n#### Test writing with Blinky example\n\n##### Get the source\n\nfound one example that works with SDK V1.2 (which is based on FreeRTOS, as of writing)\n\n* https://github.com/mattcallow/esp8266-sdk/tree/master/rtos_apps/01blinky\n\n\n##### Compile\n\nRead `2A-ESP8266__IOT_SDK_User_Manual_EN` document in\n[this](http://bbs.espressif.com/viewtopic.php?f=51&t=1024) link.\n\nIt's configured 2048KB flash\n```\nBOOT=new APP=1 SPI_SPEED=80 SPI_MODE=QIO SPI_SIZE_MAP=5 make\nBOOT=new APP=2 SPI_SPEED=80 SPI_MODE=QIO SPI_SIZE_MAP=5 make\n```\n\nor old way... this works not sure this is ok.\n```\nmake BOOT=new APP=0 SPI_SPEED=80 SPI_MODE=QIO SPI_SIZE_MAP=2\n```\n\n##### Flashing\n\n* power off ESP8266 board\n* connect GPIO0 to GND, connect GPIO2 to VCC\n* power on\n* write\n\n```\nsudo $HOME/Espressif/esptool/esptool.py \\\n  --port /dev/ttyUSB0 write_flash \\\n  0x00000 $SDK_PATH/bin/\"boot_v1.7.bin\" \\\n  0x01000 $BIN_PATH/upgrade/user1.2048.new.5.bin \\\n  0x101000 $BIN_PATH/upgrade/user2.2048.new.5.bin \\\n  0x3FE000 $SDK_PATH/bin/blank.bin \\\n  0x3FC000 $SDK_PATH/bin/esp_init_data_default.bin\n```\n_change `/dev/ttyUSB1` to whatever you have._\n\nor the old way...this works not sure this is ok.\n```\ncd $BIN_PATH\nsudo $HOME/Espressif/esptool/esptool.py \\\n--port /dev/ttyUSB0 write_flash \\\n0x00000 eagle.flash.bin 0x40000 eagle.irom0text.bin\n```\n\n* power off\n* disconnect GPIO0 so that it is floating\n* connect GPIO2 with serial of 470 Ohm + LED and to GND\n* power On\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/include/jerry_extapi.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef __JERRY_EXTAPI_H__\n#define __JERRY_EXTAPI_H__\n\n#define JERRY_STANDALONE_EXIT_CODE_OK   (0)\n#define JERRY_STANDALONE_EXIT_CODE_FAIL (1)\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\nvoid js_register_functions (void);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/include/jerry_run.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef __JERRY_RUN_H__\n#define __JERRY_RUN_H__\n\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\nvoid js_entry (void);\nint js_eval (const char *source_p, const size_t source_size);\nint js_loop (uint32_t ticknow);\nvoid js_exit (void);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/include/user_config.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef __USER_CONFIG_H__\n#define __USER_CONFIG_H__\n\n\n/* number of stack items, x4 for bytes */\n#define JERRY_STACK_SIZE 2000\n\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/js/blink.js",
    "content": "var check = 1;\n\nfunction blink() {\n  var inp = gpio_get(0);\n  var blk = (check > 8) ? 1 - inp : inp;\n  gpio_set(2, blk);\n  check = check >= 10 ? 1 : check+1;\n}\n\n// GPIO 0 as input\n// GPIO 2 as output\ngpio_dir(0, 0);\ngpio_dir(2, 1);\n\nprint(\"blink js OK\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/js/main.js",
    "content": "function sysloop(ticknow) {\n  blink();\n};\nprint(\"Random generated number: \", Math.random());\nprint(\"main js OK\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/ld/eagle.app.v6.ld",
    "content": "/* eagle.flash.bin     @ 0x00000 */\n/* eagle.irom0text.bin @ 0x20000 */\n\n/* Flash Map, support 512KB/1MB/2MB/4MB SPI Flash */\n/* |......|..............................|..........................|.....|....|                       */\n/* ^      ^                              ^                          ^     ^                            */\n/* |_flash.bin start(0x00000)             |_irom0text.bin start(0x20000)   |                            */\n/*        |_flash.bin end                                           |_irom0text.bin end                */\n/*                                                                        |_system param area(0x7b000) */\n\n/* NOTICE: */\n/* 1. You can change irom0 org, but MUST make sure irom0text.bin start not overlap flash.bin end.   */\n/* 2. You can change irom0 len, but MUST make sure irom0text.bin end not overlap system param area. */\n/* 3. Space between flash.bin end and irom0text.bin start can be used as user param area.           */\n/* 4. Space between irom0text.bin end and system param area can be used as user param area.         */\n/* 5. Make sure irom0text.bin end < 0x100000                                                        */\n/* 6. system param area:                                                                            */\n/*    1>. 512KB--->0x07b000                                                                         */\n/*    2>. 1MB----->0x0fb000                                                                         */\n/*    3>. 2MB----->0x1fb000                                                                         */\n/*    4>. 4MB----->0x3fb000                                                                         */\n/* 7. Don't change any other seg.                                                                   */\n\nMEMORY\n{\n  dport0_0_seg :                      \torg = 0x3FF00000, len = 0x10\n  dram0_0_seg :                       \torg = 0x3FFE8000, len = 0x18000\n  iram1_0_seg :                       \torg = 0x40100000, len = 0x8000\n  irom0_0_seg :                       \torg = 0x40220000, len = 0x7C000\n}\n\nINCLUDE ../ld/eagle.app.v6.common.ld\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/readme.md",
    "content": "### About\n\nFiles in this folder (targets/esp8266) are copied from\n`examples/project_template` of `esp_iot_rtos_sdk` and modified for JerryScript.\nYou can view online from\n[this](https://github.com/espressif/esp_iot_rtos_sdk/tree/master/examples/project_template) page.\n\n\n### How to build JerryScript for ESP8266\n\n#### 1. SDK\n\nFollow [this](./docs/ESP-PREREQUISITES.md) page to setup build environment\n\n\n#### 2. Building JerryScript\n\n```\n# assume you are in jerryscript folder\nmake -f ./targets/esp8266/Makefile.esp8266\n```\n\nOutput files should be placed at $BIN_PATH\n\n#### 3. Flashing for ESP8266 12E\nFollow\n[this](http://www.kloppenborg.net/images/blog/esp8266/esp8266-esp12e-specs.pdf) page to get details about this board.\n\n```\nmake -f ./targets/esp8266/Makefile.esp8266 flash\n```\n\nDefault USB device is `/dev/ttyUSB0`. If you have different one, give with `USBDEVICE`, like;\n\n```\nUSBDEVICE=/dev/ttyUSB1 make -f ./targets/esp8266/Makefile.esp8266 flash\n```\n\n### 4. Running\n\n* power off\n* connect GPIO2 with serial of 470 Ohm + LED and to GND\n* power On\n\nLED should blink on and off every second\n\n#### 5. Cleaning\n\nTo clean the build result:\n\n```\nmake -f ./targets/esp8266/Makefile.esp8266 clean\n```\n\nTo clean the board's flash memory:\n```\nmake -f ./targets/esp8266/Makefile.esp8266 erase_flash\n```\n\n\n### 6. Optimizing initial RAM usage (ESP8266 specific)\nThe existing open source gcc compiler with Xtensa support stores const(ants) in\nthe same limited RAM where our code needs to run.\n\nIt is possible to force the compiler to store a constant into ROM and also read it from there thus saving RAM.\nThe only requirement is to add `JERRY_ATTR_CONST_DATA` attribute to your constant.\n\nFor example:\n\n```C\nstatic const lit_magic_size_t lit_magic_string_sizes[] =\n```\n\ncan be modified to\n\n```C\nstatic const lit_magic_size_t lit_magic_string_sizes[] JERRY_ATTR_CONST_DATA =\n```\n\nThat is already done to some constants in jerry-core. E.g.:\n\n- vm_decode_table\n- ecma_property_hashmap_steps\n- lit_magic_string_sizes\n- unicode_letter_interv_sps\n- unicode_letter_interv_len\n- unicode_non_letter_ident_\n- unicode_letter_chars\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/user/Makefile",
    "content": "\n#############################################################\n# Required variables for each makefile\n# Discard this section from all parent makefiles\n# Expected variables (with automatic defaults):\n#   CSRCS (all \"C\" files in the dir)\n#   SUBDIRS (all subdirs with a Makefile)\n#   GEN_LIBS - list of libs to be generated ()\n#   GEN_IMAGES - list of images to be generated ()\n#   COMPONENTS_xxx - a list of libs/objs in the form\n#     subdir/lib to be extracted and rolled up into\n#     a generated lib/image xxx.a ()\n#\nifndef PDIR\nGEN_LIBS = libuser.a\nendif\n\n\n#############################################################\n# Configuration i.e. compile options etc.\n# Target specific stuff (defines etc.) goes in here!\n# Generally values applying to a tree are captured in the\n#   makefile at its root level - these are then overridden\n#   for a subtree within the makefile rooted therein\n#\n#DEFINES +=\n\n#############################################################\n# Recursion Magic - Don't touch this!!\n#\n# Each subtree potentially has an include directory\n#   corresponding to the common APIs applicable to modules\n#   rooted at that subtree. Accordingly, the INCLUDE PATH\n#   of a module can only contain the include directories up\n#   its parent path, and not its siblings\n#\n# Required for each makefile to inherit from the parent\n#\n\n\nINCLUDES := $(INCLUDES) -I $(PDIR)include\nINCLUDES += -I ./\nPDIR := ../$(PDIR)\nsinclude $(PDIR)Makefile\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/user/jerry_extapi.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n\n#include \"c_types.h\"\n#include \"gpio.h\"\n\n#include \"jerryscript.h\"\n#include \"jerry_extapi.h\"\n\n#define __UNUSED__ __attribute__((unused))\n\n#define DELCARE_HANDLER(NAME) \\\nstatic jerry_value_t \\\nNAME ## _handler (const jerry_value_t  function_obj_val __UNUSED__, \\\n                  const jerry_value_t  this_val __UNUSED__, \\\n                  const jerry_value_t  args_p[], \\\n                  const jerry_length_t  args_cnt)\n\n#define REGISTER_HANDLER(NAME) \\\n  register_native_function ( # NAME, NAME ## _handler)\n\nDELCARE_HANDLER(assert) {\n  if (args_cnt == 1\n      && jerry_value_is_boolean (args_p[0])\n      && jerry_get_boolean_value (args_p[0]))\n  {\n    printf (\">> Jerry assert true\\r\\n\");\n    return jerry_create_boolean (true);\n  }\n  printf (\"Script assertion failed\\n\");\n  exit (JERRY_STANDALONE_EXIT_CODE_FAIL);\n  return jerry_create_boolean (false);\n} /* assert */\n\n\nDELCARE_HANDLER(print) {\n  if (args_cnt)\n  {\n    for (jerry_length_t cc = 0; cc < args_cnt; cc++)\n    {\n      if (jerry_value_is_string (args_p[cc]))\n      {\n        jerry_size_t size = jerry_get_utf8_string_size (args_p[0]);\n        char *buffer;\n        buffer = (char *) malloc(size + 1);\n\n        if(!buffer)\n        {\n            // not enough memory for this string.\n            printf(\"[<too-long-string>]\");\n            continue;\n        }\n\n        jerry_string_to_utf8_char_buffer (args_p[cc],\n                                          (jerry_char_t *) buffer,\n                                          size);\n        *(buffer + size) = 0;\n        printf(\"%s \", buffer);\n        free (buffer);\n      }\n      else if (jerry_value_is_number (args_p[cc]))\n      {\n        double number = jerry_get_number_value (args_p[cc]);\n        if ((int) number == number)\n        {\n          printf (\"%d\", (int) number);\n        }\n        else\n        {\n          char buff[50];\n          sprintf(buff, \"%.10f\", number);\n          printf(\"%s\", buff);\n        }\n\n      }\n    }\n    printf (\"\\r\\n\");\n  }\n  return jerry_create_boolean (true);\n} /* print */\n\nDELCARE_HANDLER(gpio_dir) {\n  if (args_cnt < 2)\n  {\n    return jerry_create_boolean (false);\n  }\n\n  int port = (int) jerry_get_number_value (args_p[0]);\n  int value = (int) jerry_get_number_value (args_p[1]);\n\n  if (value)\n  {\n    GPIO_AS_OUTPUT(1 << port);\n  }\n  else\n  {\n    GPIO_AS_INPUT(1 << port);\n  }\n\n  return jerry_create_boolean (true);\n} /* gpio_dir */\n\nDELCARE_HANDLER(gpio_set) {\n  if (args_cnt < 2)\n  {\n    return jerry_create_boolean (false);\n  }\n\n  int port = (int) jerry_get_number_value (args_p[0]);\n  int value = (int) jerry_get_number_value (args_p[1]);\n\n  GPIO_OUTPUT_SET(port, value);\n\n  return jerry_create_boolean (true);\n} /* gpio_set */\n\n\nDELCARE_HANDLER(gpio_get) {\n  if (args_cnt < 1)\n  {\n    return jerry_create_boolean (false);\n  }\n\n  int port = (int) jerry_get_number_value (args_p[0]);\n  int value = GPIO_INPUT_GET(port) ? 1 : 0;\n\n  return jerry_create_number ((double) value);\n} /* gpio_get */\n\nstatic bool\nregister_native_function (const char* name,\n                          jerry_external_handler_t handler)\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n  jerry_value_t reg_func_val = jerry_create_external_function (handler);\n  bool bok = true;\n\n  if (!(jerry_value_is_function (reg_func_val)\n        && jerry_value_is_constructor (reg_func_val)))\n  {\n    printf (\"!!! create_external_function failed !!!\\r\\n\");\n    jerry_release_value (reg_func_val);\n    jerry_release_value (global_obj_val);\n    return false;\n  }\n\n  jerry_value_t prop_name_val = jerry_create_string ((const jerry_char_t *) name);\n  jerry_value_t res = jerry_set_property (global_obj_val, prop_name_val, reg_func_val);\n\n  jerry_release_value (reg_func_val);\n  jerry_release_value (global_obj_val);\n  jerry_release_value (prop_name_val);\n\n  if (jerry_value_is_error (res))\n  {\n    printf (\"!!! register_native_function failed: [%s]\\r\\n\", name);\n    jerry_release_value (res);\n    return false;\n  }\n\n  jerry_release_value (res);\n\n  return true;\n} /* register_native_function */\n\nvoid js_register_functions (void)\n{\n  REGISTER_HANDLER(assert);\n  REGISTER_HANDLER(print);\n  REGISTER_HANDLER(gpio_dir);\n  REGISTER_HANDLER(gpio_set);\n  REGISTER_HANDLER(gpio_get);\n} /* js_register_functions */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/user/jerry_port.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n#include <stdio.h>\n#include <stdarg.h>\n#include <sys/time.h>\n\n#include \"esp_common.h\"\n\n#include \"jerryscript-port.h\"\n\n/**\n * Provide log message implementation for the engine.\n */\nvoid\njerry_port_log (jerry_log_level_t level, /**< log level */\n                const char *format, /**< format string */\n                ...)  /**< parameters */\n{\n  (void) level; /* ignore log level */\n\n  va_list args;\n  va_start (args, format);\n  vfprintf (stderr, format, args);\n  va_end (args);\n} /* jerry_port_log */\n\n/**\n * Provide fatal message implementation for the engine.\n */\nvoid\njerry_port_fatal (jerry_fatal_code_t code)\n{\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Jerry Fatal Error!\\n\");\n  while (true);\n} /* jerry_port_fatal */\n\n/**\n * Implementation of jerry_port_get_current_time.\n *\n * @return current timer's counter value in milliseconds\n */\ndouble\njerry_port_get_current_time (void)\n{\n  uint32_t rtc_time = system_rtc_clock_cali_proc();\n  return (double) rtc_time;\n} /* jerry_port_get_current_time */\n\n/**\n * Dummy function to get the time zone adjustment.\n *\n * @return 0\n */\ndouble\njerry_port_get_local_time_zone_adjustment (double unix_ms, bool is_utc)\n{\n  /* We live in UTC. */\n  return 0;\n} /* jerry_port_get_local_time_zone_adjustment */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/user/jerry_run.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n\n#include \"jerry_extapi.h\"\n#include \"jerry_run.h\"\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n\nstatic const char* fn_sys_loop_name = \"sysloop\";\n\nvoid js_entry ()\n{\n  union { double d; unsigned u; } now = { .d = jerry_port_get_current_time () };\n  srand (now.u);\n\n  jerry_init (JERRY_INIT_EMPTY);\n  js_register_functions ();\n}\n\nint js_eval (const char *source_p, const size_t source_size)\n{\n  jerry_value_t res = jerry_eval ((jerry_char_t *) source_p,\n                                  source_size,\n                                  JERRY_PARSE_NO_OPTS);\n  if (jerry_value_is_error (res)) {\n    jerry_release_value (res);\n    return -1;\n  }\n\n  jerry_release_value (res);\n\n  return 0;\n}\n\nint js_loop (uint32_t ticknow)\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n  jerry_value_t prop_name_val = jerry_create_string ((const jerry_char_t *) fn_sys_loop_name);\n  jerry_value_t sysloop_func = jerry_get_property (global_obj_val, prop_name_val);\n  jerry_release_value (prop_name_val);\n\n  if (jerry_value_is_error (sysloop_func)) {\n    printf (\"Error: '%s' not defined!!!\\r\\n\", fn_sys_loop_name);\n    jerry_release_value (sysloop_func);\n    jerry_release_value (global_obj_val);\n    return -1;\n  }\n\n  if (!jerry_value_is_function (sysloop_func)) {\n    printf (\"Error: '%s' is not a function!!!\\r\\n\", fn_sys_loop_name);\n    jerry_release_value (sysloop_func);\n    jerry_release_value (global_obj_val);\n    return -2;\n  }\n\n  jerry_value_t val_args[] = { jerry_create_number (ticknow) };\n  uint16_t val_argv = sizeof (val_args) / sizeof (jerry_value_t);\n\n  jerry_value_t res = jerry_call_function (sysloop_func,\n                                           global_obj_val,\n                                           val_args,\n                                           val_argv);\n\n  for (uint16_t i = 0; i < val_argv; i++) {\n    jerry_release_value (val_args[i]);\n  }\n\n  jerry_release_value (sysloop_func);\n  jerry_release_value (global_obj_val);\n\n  if (jerry_value_is_error (res)) {\n    jerry_release_value (res);\n    return -3;\n  }\n\n  jerry_release_value (res);\n\n  return 0;\n}\n\nvoid js_exit (void)\n{\n  jerry_cleanup ();\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/esp8266/user/user_main.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/******************************************************************************\n * Copyright 2013-2014 Espressif Systems (Wuxi)\n *\n * FileName: user_main.c\n *\n * Description: entry file of user application\n *\n * Modification history:\n *     2014/12/1, v1.0 create this file.\n*******************************************************************************/\n\n#include \"esp_common.h\"\n#include \"freertos/FreeRTOS.h\"\n#include \"freertos/task.h\"\n#include \"uart.h\"\n\n#include \"user_config.h\"\n#include \"jerry_run.h\"\n#include \"jerry-targetjs.h\"\n\nstatic void show_free_mem(int idx) {\n  size_t res = xPortGetFreeHeapSize();\n  printf(\"dbg free memory(%d): %d\\r\\n\", idx, res);\n}\n\nstatic int jerry_task_init(void) {\n  DECLARE_JS_CODES;\n\n  js_entry();\n\n  /* run rest of the js files first */\n  show_free_mem(2);\n  for (int src = 1; js_codes[src].source; src++) {\n    int retcode = js_eval(js_codes[src].source, js_codes[src].length);\n    if (retcode != 0) {\n      printf(\"js_eval failed code(%d) [%s]\\r\\n\", retcode, js_codes[src].name);\n      return -1;\n    }\n  }\n\n  /* run main.js */\n  int retcode = js_eval(js_codes[0].source, js_codes[0].length);\n  if (retcode != 0) {\n    printf(\"js_eval failed code(%d) [%s]\\r\\n\", retcode, js_codes[0].name);\n    return -2;\n  }\n  show_free_mem(3);\n  return 0;\n}\n\nstatic void jerry_task(void *pvParameters) {\n  if (jerry_task_init() == 0) {\n    const portTickType xDelay = 100 / portTICK_RATE_MS;\n    uint32_t ticknow = 0;\n\n    for (;;) {\n      vTaskDelay(xDelay);\n      js_loop(ticknow);\n      if (!ticknow) {\n        show_free_mem(4);\n      }\n      ticknow++;\n    }\n  }\n  js_exit();\n}\n\n/*\n * This is entry point for user code\n */\nvoid ICACHE_FLASH_ATTR user_init(void)\n{\n  UART_SetBaudrate(UART0, BIT_RATE_115200);\n\n  show_free_mem(0);\n  wifi_softap_dhcps_stop();\n  show_free_mem(1);\n\n  PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0);    // GPIO 0\n  PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);    // GPIO 2\n\n  xTaskCreate(jerry_task, \"jerry\", JERRY_STACK_SIZE, NULL, 2, NULL);\n}\n\n/*\n * FunctionName : user_rf_cal_sector_set\n * Description  : SDK just reserved 4 sectors, used for rf init data and Parameters.\n *                We add this function to force users to set rf cal sector, since\n *                we don't know which sector is free in user's application.\n *                sector map for last several sectors : ABCCC\n *                A : rf cal\n *                B : rf init data\n *                C : sdk parameters\n * Parameters   : none\n * Returns      : rf cal sector\n */\nuint32 user_rf_cal_sector_set(void)\n{\n    flash_size_map size_map = system_get_flash_size_map();\n    uint32 rf_cal_sec = 0;\n\n    switch (size_map) {\n        case FLASH_SIZE_4M_MAP_256_256:\n            rf_cal_sec = 128 - 5;\n            break;\n\n        case FLASH_SIZE_8M_MAP_512_512:\n            rf_cal_sec = 256 - 5;\n            break;\n\n        case FLASH_SIZE_16M_MAP_512_512:\n        case FLASH_SIZE_16M_MAP_1024_1024:\n            rf_cal_sec = 512 - 5;\n            break;\n\n        case FLASH_SIZE_32M_MAP_512_512:\n        case FLASH_SIZE_32M_MAP_1024_1024:\n            rf_cal_sec = 1024 - 5;\n            break;\n        case FLASH_SIZE_64M_MAP_1024_1024:\n            rf_cal_sec = 2048 - 5;\n            break;\n        case FLASH_SIZE_128M_MAP_1024_1024:\n            rf_cal_sec = 4096 - 5;\n            break;\n        default:\n            rf_cal_sec = 0;\n            break;\n    }\n\n    return rf_cal_sec;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/.gitignore",
    "content": "mbed-os\nmbed-events\n.build\n.mbed\n.temp/\nmbed_settings.py\njs/pins.js\nsource/pins.cpp\nsource/jerry-targetjs.h\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/Makefile",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# USAGE:\n# specify the board using the command line:\n# make BOARD=[mbed board name]\n\nBOARD=$(subst [mbed] ,,$(shell mbed target))\nHEAPSIZE=16\n\nDEBUG?=0\nNO_JS?=0\nMBED_VERBOSE?=0\n\nMBED_CLI_FLAGS=-j0 --source . --source ../../\n\nEXTRA_SRC=\n\nifneq ($(EXTRA_SRC),)\nEXTRA_SRC_MOD=--source $(subst :, --source ,$(EXTRA_SRC))\nMBED_CLI_FLAGS += $(EXTRA_SRC_MOD)\nendif\n\nEXTERN_BUILD_DIR=\n\nifneq ($(EXTERN_BUILD_DIR),)\nMBED_CLI_FLAGS += --build $(EXTERN_BUILD_DIR)\nendif\n\nifeq ($(DEBUG), 1)\nMBED_CLI_FLAGS += --profile ./mbed-os/tools/profiles/debug.json\nendif\n\nifeq ($(MBED_VERBOSE), 1)\nMBED_CLI_FLAGS += -v\nelse ifeq ($(MBED_VERBOSE), 2)\nMBED_CLI_FLAGS += -vv\nendif\n\nMBED_CLI_FLAGS += -D \"JERRY_GLOBAL_HEAP_SIZE=$(HEAPSIZE)\"\nMBED_CLI_FLAGS += -t GCC_ARM\n\n.PHONY: all js2c getlibs rebuild library\nall: source/jerry-targetjs.h source/pins.cpp .mbed ../../.mbedignore\n\tmbed target $(BOARD)\n\tmbed compile $(MBED_CLI_FLAGS)\n\nlibrary: .mbed ../../.mbedignore\n\t# delete encoded js code if it exists\n\trm -f source/jerry-targetjs.h\n\tmbed target $(BOARD)\n\tmbed compile $(MBED_CLI_FLAGS) --library\n\nclean:\n\trm -rf ./BUILD/$(BOARD)\n\njs2c: js/main.js js/flash_leds.js\n\tpython ../../tools/js2c.py --ignore pins.js\n\nsource/pins.cpp:\n\tpython tools/generate_pins.py ${BOARD}\n\nifeq ($(NO_JS),0)\nsource/jerry-targetjs.h: js2c\nelse\nsource/jerry-targetjs.h: ;\nendif\n\ngetlibs: .mbed\n\n.mbed:\n\techo 'ROOT=.' > .mbed\n\tmbed config root .\n\tmbed toolchain GCC_ARM\n\tmbed target $(BOARD)\n\tmbed deploy\n\n../../.mbedignore:\nifeq ($(OS),Windows_NT)\n\tcopy template-mbedignore.txt ..\\..\\.mbedignore\nelse\n\tcp ./template-mbedignore.txt ../../.mbedignore\nendif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/Makefile.travis",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# Default target for running the build test outside the Travis CI environment.\nall:\n\t$(MAKE) install\n\t$(MAKE) script\n\n\n## Targets for installing build dependencies of the Mbed OS 5 JerryScript target.\n\n# Deploy Mbed and install Mbed Python dependencies.\ninstall:\n\tpip install mbed-cli\n\tcd targets/mbedos5 && mbed deploy\n\tpip install idna==2.5 # FIXME: workaround\n\tpip install -r targets/mbedos5/mbed-os/requirements.txt\n\tpip install -r targets/mbedos5/tools/requirements.txt\n\n\n## Targets for building Mbed OS 5 with JerryScript.\n\n# Build the firmware (Mbed OS 5 with JerryScript).\nscript:\n\t# HACK: `EXTRA_SRC[_MOD]` are abused to pass `--library` to `mbed compile` in the `all` make target that builds an app\n\t# HACK: this is needed because the Mbed OS 5 target code does not contain any `main` function, so the `all` make target does not link\n\t# HACK: but the `library` make target does not build either because the launcher sources require `jerry-targetjs.h` that are explicitly not generated for libraries\n\t$(MAKE) -C targets/mbedos5 BOARD=K64F EXTRA_SRC=dummy EXTRA_SRC_MOD=--library\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/README.md",
    "content": "# JerryScript with mbed OS 5\n\nTL;DR? jump straight to [quickstart](#quick-start)\n\n## Introduction\n\nThis directory contains the necessary code to build JerryScript for devices\ncapable of running mbed OS 5. It has been tested with the following boards\nso far:\n\n- [Nordic Semiconductor NRF52 Development Kit](https://developer.mbed.org/platforms/Nordic-nRF52-DK/)\n- [NXP Freedom K64F](https://developer.mbed.org/platforms/FRDM-K64F/)\n- [STM NUCLEO F401RE](https://developer.mbed.org/platforms/ST-Nucleo-F401RE/)\n- [Silicon Labs EFM32 Giant Gecko](https://developer.mbed.org/platforms/EFM32-Giant-Gecko/)\n\n## Features\n\n### Peripheral Drivers\n\nPeripheral Drivers are intended as a 1-to-1 mapping to mbed C++ APIs, with a few\ndifferences (due to differences between JavaScript and C++ like lack of operator\noverloading).\n\n- [DigitalOut](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.1/APIs/io/DigitalOut/)\n- [InterruptIn](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.1/APIs/io/InterruptIn/)\n- [I2C](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.1/APIs/interfaces/digital/I2C/)\n- setInterval and setTimeout using [mbed-event](https://github.com/ARMmbed/mbed-events)\n\n## Dependencies\n\n### mbed CLI\n\nmbed CLI is used as the build tool for mbed OS 5. You can find out how to install\nit in the [official documentation](https://docs.mbed.com/docs/mbed-os-handbook/en/5.1/dev_tools/cli/#installing-mbed-cli).\n\n### arm-none-eabi-gcc\n\narm-none-eabi-gcc is the only currently tested compiler for jerryscript on mbed,\nand instructions for building can be found as part of the mbed-cli installation\ninstructions above.\n\n### make\n\nmake is used to automate the process of fetching dependencies, and making sure that\nmbed-cli is called with the correct arguments.\n\n### nodejs\n\nnpm is used to install the dependencies in the local node_modules folder.\n\n### gulp\n\ngulp is used to automate tasks, like cloning repositories or generate source files.\nIf you create an own project, for more info see [mbed-js-gulp](https://github.com/ARMmbed/mbed-js-gulp).\n\n### (optional) jshint\n\njshint is used to statically check your JavaScript code, as part of the build process.\nThis ensures that pins you are using in your code are available on your chosen target\nplatform.\n\n## Quick Start\n\nOnce you have all of your dependencies installed, you can build the example project as follows:\n\n```bash\ngit clone https://github.com/ARMmbed/mbed-js-example\ncd mbed-js-example\nnpm install\ngulp --target=YOUR_TARGET_NAME\n```\n\nThe produced file (in build/out/YOUR_TARGET_NAME) can then be uploaded to your board, and will\nrun when you press reset.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/AnalogIn-js.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_DRIVERS_ANALOGIN_H\n#define _JERRYSCRIPT_MBED_DRIVERS_ANALOGIN_H\n\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\nDECLARE_CLASS_CONSTRUCTOR(AnalogIn);\n\n#endif  // _JERRYSCRIPT_MBED_DRIVERS_ANALOGIN_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/DigitalOut-js.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_DRIVERS_DIGITALOUT_H\n#define _JERRYSCRIPT_MBED_DRIVERS_DIGITALOUT_H\n\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\nDECLARE_CLASS_CONSTRUCTOR(DigitalOut);\n\n#endif  // _JERRYSCRIPT_MBED_DRIVERS_DIGITALOUT_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/I2C-js.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_DRIVERS_I2C_H\n#define _JERRYSCRIPT_MBED_DRIVERS_I2C_H\n\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\nDECLARE_CLASS_CONSTRUCTOR(I2C);\n\n#endif  // _JERRYSCRIPT_MBED_DRIVERS_I2C_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/InterruptIn-js.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_DRIVERS_INTERRUPTIN_H\n#define _JERRYSCRIPT_MBED_DRIVERS_INTERRUPTIN_H\n\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\nDECLARE_CLASS_CONSTRUCTOR(InterruptIn);\n\n#endif  // _JERRYSCRIPT_MBED_DRIVERS_INTERRUPTIN_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/PwmOut-js.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_DRIVERS_PWMOUT_H\n#define _JERRYSCRIPT_MBED_DRIVERS_PWMOUT_H\n\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\nDECLARE_CLASS_CONSTRUCTOR(PwmOut);\n\n#endif  // _JERRYSCRIPT_MBED_DRIVERS_PWMOUT_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/lib_drivers.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_DRIVERS_LIB_DRIVERS_H\n#define _JERRYSCRIPT_MBED_DRIVERS_LIB_DRIVERS_H\n\n#include \"jerryscript-ext/handler.h\"\n#include \"jerryscript-mbed-drivers/InterruptIn-js.h\"\n#include \"jerryscript-mbed-drivers/DigitalOut-js.h\"\n#include \"jerryscript-mbed-drivers/setInterval-js.h\"\n#include \"jerryscript-mbed-drivers/setTimeout-js.h\"\n#include \"jerryscript-mbed-drivers/I2C-js.h\"\n#include \"jerryscript-mbed-drivers/AnalogIn-js.h\"\n#include \"jerryscript-mbed-drivers/PwmOut-js.h\"\n\nDECLARE_JS_WRAPPER_REGISTRATION (base) {\n    REGISTER_GLOBAL_FUNCTION_WITH_HANDLER(assert, jerryx_handler_assert);\n    REGISTER_GLOBAL_FUNCTION_WITH_HANDLER(gc, jerryx_handler_gc);\n    REGISTER_GLOBAL_FUNCTION_WITH_HANDLER(print, jerryx_handler_print);\n    REGISTER_GLOBAL_FUNCTION(setInterval);\n    REGISTER_GLOBAL_FUNCTION(setTimeout);\n    REGISTER_GLOBAL_FUNCTION(clearInterval);\n    REGISTER_GLOBAL_FUNCTION(clearTimeout);\n    REGISTER_CLASS_CONSTRUCTOR(DigitalOut);\n    REGISTER_CLASS_CONSTRUCTOR(I2C);\n    REGISTER_CLASS_CONSTRUCTOR(InterruptIn);\n    REGISTER_CLASS_CONSTRUCTOR(AnalogIn);\n    REGISTER_CLASS_CONSTRUCTOR(PwmOut);\n}\n\n#endif  // _JERRYSCRIPT_MBED_DRIVERS_LIB_DRIVERS_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/setInterval-js.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_DRIVERS_SET_INTERVAL_H\n#define _JERRYSCRIPT_MBED_DRIVERS_SET_INTERVAL_H\n\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\nDECLARE_GLOBAL_FUNCTION(setInterval);\nDECLARE_GLOBAL_FUNCTION(clearInterval);\n\n#endif  // _JERRYSCRIPT_MBED_DRIVERS_SET_INTERVAL_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/setTimeout-js.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_DRIVERS_SET_TIMEOUT_H\n#define _JERRYSCRIPT_MBED_DRIVERS_SET_TIMEOUT_H\n\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\nDECLARE_GLOBAL_FUNCTION(setTimeout);\nDECLARE_GLOBAL_FUNCTION(clearTimeout);\n\n#endif  // _JERRYSCRIPT_MBED_DRIVERS_SET_TIMEOUT_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/source/AnalogIn-js.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jerryscript-mbed-util/logging.h\"\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\n#include \"mbed.h\"\n\n/**\n * AnalogIn#destructor\n *\n * Called if/when the AnalogIn is GC'ed.\n */\nvoid NAME_FOR_CLASS_NATIVE_DESTRUCTOR(AnalogIn)(void* void_ptr) {\n    delete static_cast<AnalogIn*>(void_ptr);\n}\n\n/**\n * Type infomation of the native AnalogIn pointer\n *\n * Set AnalogIn#destructor as the free callback.\n */\nstatic const jerry_object_native_info_t native_obj_type_info = {\n    .free_cb = NAME_FOR_CLASS_NATIVE_DESTRUCTOR(AnalogIn)\n};\n\n/**\n * AnalogIn#read (native JavaScript method)\n *\n * Read the input voltage, represented as a float in the range [0.0, 1.0]\n *\n * @returns A floating-point value representing the current input voltage, measured as a percentage\n */\nDECLARE_CLASS_FUNCTION(AnalogIn, read) {\n    CHECK_ARGUMENT_COUNT(AnalogIn, read, (args_count == 0));\n\n    // Extract native AnalogIn pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native AnalogIn pointer\");\n    }\n\n    AnalogIn* native_ptr = static_cast<AnalogIn*>(void_ptr);\n\n    float result = native_ptr->read();\n    return jerry_create_number(result);\n}\n\n/**\n * AnalogIn#read_u16 (native JavaScript method)\n *\n * Read the input voltage, represented as an unsigned short in the range [0x0, 0xFFFF]\n *\n * @returns 16-bit unsigned short representing the current input voltage, normalised to a 16-bit value\n */\nDECLARE_CLASS_FUNCTION(AnalogIn, read_u16) {\n    CHECK_ARGUMENT_COUNT(AnalogIn, read_u16, (args_count == 0));\n\n    // Extract native AnalogIn pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native AnalogIn pointer\");\n    }\n\n    AnalogIn* native_ptr = static_cast<AnalogIn*>(void_ptr);\n\n    uint16_t result = native_ptr->read_u16();\n    return jerry_create_number(result);\n}\n\n/**\n * AnalogIn (native JavaScript constructor)\n *\n * @param pin_name mbed pin to connect the AnalogIn to.\n * @returns a JavaScript object representing a AnalogIn.\n */\nDECLARE_CLASS_CONSTRUCTOR(AnalogIn) {\n    CHECK_ARGUMENT_COUNT(AnalogIn, __constructor, args_count == 1);\n    CHECK_ARGUMENT_TYPE_ALWAYS(AnalogIn, __constructor, 0, number);\n\n    PinName pin_name = PinName(jerry_get_number_value(args[0]));\n\n    // create native object\n    AnalogIn* native_ptr = new AnalogIn(pin_name);\n\n    // create the jerryscript object\n    jerry_value_t js_object = jerry_create_object();\n    jerry_set_object_native_pointer(js_object, native_ptr, &native_obj_type_info);\n\n    // attach methods\n    ATTACH_CLASS_FUNCTION(js_object, AnalogIn, read);\n    ATTACH_CLASS_FUNCTION(js_object, AnalogIn, read_u16);\n\n    return js_object;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/source/DigitalOut-js.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jerryscript-mbed-util/logging.h\"\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\n#include \"mbed.h\"\n\n/**\n * DigitalOut#destructor\n *\n * Called if/when the DigitalOut is GC'ed.\n */\nvoid NAME_FOR_CLASS_NATIVE_DESTRUCTOR(DigitalOut)(void* void_ptr) {\n    delete static_cast<DigitalOut*>(void_ptr);\n}\n\n/**\n * Type infomation of the native DigitalOut pointer\n *\n * Set DigitalOut#destructor as the free callback.\n */\nstatic const jerry_object_native_info_t native_obj_type_info = {\n    .free_cb = NAME_FOR_CLASS_NATIVE_DESTRUCTOR(DigitalOut)\n};\n\n/**\n * DigitalOut#write (native JavaScript method)\n *\n * Writes a binary value to a DigitalOut.\n *\n * @param value 1 or 0, specifying whether the output pin is high or low,\n *      respectively\n * @returns undefined, or an error if invalid arguments are provided.\n */\nDECLARE_CLASS_FUNCTION(DigitalOut, write) {\n    CHECK_ARGUMENT_COUNT(DigitalOut, write, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(DigitalOut, write, 0, number);\n\n    // Extract native DigitalOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native DigitalOut pointer\");\n    }\n\n    DigitalOut* native_ptr = static_cast<DigitalOut*>(void_ptr);\n\n    int arg0 = jerry_get_number_value(args[0]);\n    native_ptr->write(arg0);\n\n    return jerry_create_undefined();\n}\n\n/**\n * DigitalOut#read (native JavaScript method)\n *\n * Reads the current status of a DigitalOut\n *\n * @returns 1 if the pin is currently high, or 0 if the pin is currently low.\n */\nDECLARE_CLASS_FUNCTION(DigitalOut, read) {\n    CHECK_ARGUMENT_COUNT(DigitalOut, read, (args_count == 0));\n\n    // Extract native DigitalOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native DigitalOut pointer\");\n    }\n\n    DigitalOut* native_ptr = static_cast<DigitalOut*>(void_ptr);\n\n    int result = native_ptr->read();\n    return jerry_create_number(result);\n}\n\n/**\n * DigitalOut#is_connected (native JavaScript method)\n *\n * @returns 0 if the DigitalOut is set to NC, or 1 if it is connected to an\n *  actual pin\n */\nDECLARE_CLASS_FUNCTION(DigitalOut, is_connected) {\n    CHECK_ARGUMENT_COUNT(DigitalOut, is_connected, (args_count == 0));\n\n    // Extract native DigitalOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native DigitalOut pointer\");\n    }\n\n    DigitalOut* native_ptr = static_cast<DigitalOut*>(void_ptr);\n\n    int result = native_ptr->is_connected();\n    return jerry_create_number(result);\n}\n\n/**\n * DigitalOut (native JavaScript constructor)\n *\n * @param pin_name mbed pin to connect the DigitalOut to.\n * @param value (optional) Initial value of the DigitalOut.\n * @returns a JavaScript object representing a DigitalOut.\n */\nDECLARE_CLASS_CONSTRUCTOR(DigitalOut) {\n    CHECK_ARGUMENT_COUNT(DigitalOut, __constructor, (args_count == 1 || args_count == 2));\n    CHECK_ARGUMENT_TYPE_ALWAYS(DigitalOut, __constructor, 0, number);\n    CHECK_ARGUMENT_TYPE_ON_CONDITION(DigitalOut, __constructor, 1, number, (args_count == 2));\n\n    DigitalOut* native_ptr;\n\n    // Call correct overload of DigitalOut::DigitalOut depending on the\n    // arguments passed.\n    PinName pin_name = PinName(jerry_get_number_value(args[0]));\n\n    switch (args_count) {\n        case 1:\n            native_ptr = new DigitalOut(pin_name);\n            break;\n        case 2:\n            int value = static_cast<int>(jerry_get_number_value(args[1]));\n            native_ptr = new DigitalOut(pin_name, value);\n            break;\n    }\n\n    // create the jerryscript object\n    jerry_value_t js_object = jerry_create_object();\n    jerry_set_object_native_pointer(js_object, native_ptr, &native_obj_type_info);\n\n    // attach methods\n    ATTACH_CLASS_FUNCTION(js_object, DigitalOut, write);\n    ATTACH_CLASS_FUNCTION(js_object, DigitalOut, read);\n    ATTACH_CLASS_FUNCTION(js_object, DigitalOut, is_connected);\n\n    return js_object;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/source/I2C-js.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jerryscript-mbed-util/logging.h\"\n#include \"jerryscript-mbed-drivers/I2C-js.h\"\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\n#include \"mbed.h\"\n\n/**\n * I2C#destructor\n *\n * Called if/when the I2C object is GC'ed.\n */\nvoid NAME_FOR_CLASS_NATIVE_DESTRUCTOR(I2C) (void *void_ptr) {\n    delete static_cast<I2C*>(void_ptr);\n}\n\n/**\n * Type infomation of the native I2C pointer\n *\n * Set I2C#destructor as the free callback.\n */\nstatic const jerry_object_native_info_t native_obj_type_info = {\n    .free_cb = NAME_FOR_CLASS_NATIVE_DESTRUCTOR(I2C)\n};\n\n/**\n * I2C#frequency (native JavaScript method)\n *\n * Set the frequency of the I2C bus.\n *\n * @param frequency New I2C Frequency\n */\nDECLARE_CLASS_FUNCTION(I2C, frequency) {\n    CHECK_ARGUMENT_COUNT(I2C, frequency, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(I2C, frequency, 0, number);\n\n    // Unwrap native I2C object\n    void *void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native I2C pointer\");\n    }\n\n    I2C *native_ptr = static_cast<I2C*>(void_ptr);\n\n    int hz = jerry_get_number_value(args[0]);\n    native_ptr->frequency(hz);\n\n    return jerry_create_undefined();\n}\n\n/**\n * I2C#read (native JavaScript method)\n *\n * Read data from the I2C bus.\n *\n * @overload I2C#read(int)\n * Read a single byte from the I2C bus\n *\n * @param ack indicates if the byte is to be acknowledged (1 => acknowledge)\n *\n * @returns array: Data read from the I2C bus\n *\n * @overload I2C#read(int, array, int)\n * Read a series of bytes from the I2C bus\n *\n * @param address I2C address to read from\n * @param data Array to read into\n * @param length Length of data to read\n *\n * @returns array: Data read from the I2C bus\n */\nDECLARE_CLASS_FUNCTION(I2C, read) {\n    CHECK_ARGUMENT_COUNT(I2C, read, (args_count == 1 || args_count == 3 || args_count == 4));\n\n    if (args_count == 1) {\n        CHECK_ARGUMENT_TYPE_ALWAYS(I2C, read, 0, number);\n        void *void_ptr;\n        bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n        if (!has_ptr) {\n            return jerry_create_error(JERRY_ERROR_TYPE,\n                                      (const jerry_char_t *) \"Failed to get native I2C pointer\");\n        }\n\n        I2C *native_ptr = static_cast<I2C*>(void_ptr);\n\n        int data = jerry_get_number_value(args[0]);\n        int result = native_ptr->read(data);\n\n        return jerry_create_number(result);\n    } else {\n        CHECK_ARGUMENT_TYPE_ALWAYS(I2C, read, 0, number);\n        CHECK_ARGUMENT_TYPE_ALWAYS(I2C, read, 1, array);\n        CHECK_ARGUMENT_TYPE_ALWAYS(I2C, read, 2, number);\n\n        CHECK_ARGUMENT_TYPE_ON_CONDITION(I2C, read, 3, boolean, (args_count == 4));\n\n        void *void_ptr;\n        bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n        if (!has_ptr) {\n            return jerry_create_error(JERRY_ERROR_TYPE,\n                                      (const jerry_char_t *) \"Failed to get native I2C pointer\");\n        }\n\n        I2C *native_ptr = static_cast<I2C*>(void_ptr);\n\n        const uint32_t data_len = jerry_get_array_length(args[1]);\n\n        int address = jerry_get_number_value(args[0]);\n        int length = jerry_get_number_value(args[2]);\n\n        char *data = new char[data_len];\n\n        bool repeated = false;\n        if (args_count == 4) {\n            repeated = jerry_get_boolean_value(args[3]);\n        }\n\n        int result = native_ptr->read(address, data, length, repeated);\n\n        jerry_value_t out_array = jerry_create_array(data_len);\n\n        for (uint32_t i = 0; i < data_len; i++) {\n            jerry_value_t val = jerry_create_number(double(data[i]));\n            jerry_release_value(jerry_set_property_by_index(out_array, i, val));\n            jerry_release_value(val);\n        }\n\n        delete[] data;\n\n        if (result == 0) {\n            // ACK\n            return out_array;\n        } else {\n            // NACK\n            const char *error_msg = \"NACK received from I2C bus\";\n\n            jerry_release_value(out_array);\n            return jerry_create_error(JERRY_ERROR_COMMON, reinterpret_cast<const jerry_char_t *>(error_msg));\n        }\n    }\n}\n\n/**\n * I2C#write (native JavaScript method)\n *\n * @overload I2C#write(int)\n * Write a single byte to the I2C bus\n *\n * @param data Data byte to write to the I2C bus\n *\n * @returns 1 on success, 0 on failure\n *\n * @overload I2C#write(int, array, int, bool)\n * Write an array of data to a certain address on the I2C bus\n *\n * @param address 8-bit I2C slave address\n * @param data Array of bytes to send\n * @param length Length of data to write\n * @param repeated (optional) If true, do not send stop at end.\n *\n * @returns 0 on success, non-0 on failure\n */\nDECLARE_CLASS_FUNCTION(I2C, write) {\n    CHECK_ARGUMENT_COUNT(I2C, write, (args_count == 1 || args_count == 3 || args_count == 4));\n\n    if (args_count == 1) {\n        CHECK_ARGUMENT_TYPE_ALWAYS(I2C, write, 0, number);\n\n        // Extract native I2C object\n        void *void_ptr;\n        bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n        if (!has_ptr) {\n            return jerry_create_error(JERRY_ERROR_TYPE,\n                                      (const jerry_char_t *) \"Failed to get native I2C pointer\");\n        }\n\n        I2C *native_ptr = static_cast<I2C*>(void_ptr);\n\n        // Unwrap arguments\n        int data = jerry_get_number_value(args[0]);\n\n        int result = native_ptr->write(data);\n        return jerry_create_number(result);\n    } else {\n        // 3 or 4\n        CHECK_ARGUMENT_TYPE_ALWAYS(I2C, write, 0, number);\n        CHECK_ARGUMENT_TYPE_ALWAYS(I2C, write, 1, array);\n        CHECK_ARGUMENT_TYPE_ALWAYS(I2C, write, 2, number);\n        CHECK_ARGUMENT_TYPE_ON_CONDITION(I2C, write, 3, boolean, (args_count == 4));\n\n        // Extract native I2C object\n        void *void_ptr;\n        bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n        if (!has_ptr) {\n            return jerry_create_error(JERRY_ERROR_TYPE,\n                                      (const jerry_char_t *) \"Failed to get native I2C pointer\");\n        }\n\n        I2C *native_ptr = static_cast<I2C*>(void_ptr);\n\n        // Unwrap arguments\n        int address = jerry_get_number_value(args[0]);\n        const uint32_t data_len = jerry_get_array_length(args[1]);\n        int length = jerry_get_number_value(args[2]);\n        bool repeated = args_count == 4 && jerry_get_boolean_value(args[3]);\n\n        // Construct data byte array\n        char *data = new char[data_len];\n        for (uint32_t i = 0; i < data_len; i++) {\n            data[i] = jerry_get_number_value(jerry_get_property_by_index(args[1], i));\n        }\n\n        int result = native_ptr->write(address, data, length, repeated);\n\n        // free dynamically allocated resources\n        delete[] data;\n\n        return jerry_create_number(result);\n    }\n}\n\n/**\n * I2C#start (native JavaScript method)\n *\n * Creates a start condition on the I2C bus.\n */\nDECLARE_CLASS_FUNCTION(I2C, start) {\n    CHECK_ARGUMENT_COUNT(I2C, start, (args_count == 0));\n\n    // Extract native I2C object\n    void *void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native I2C pointer\");\n    }\n\n    I2C *native_ptr = static_cast<I2C*>(void_ptr);\n\n    native_ptr->start();\n    return jerry_create_undefined();\n}\n\n/**\n * I2C#stop (native JavaScript method)\n *\n * Creates a stop condition on the I2C bus.\n */\nDECLARE_CLASS_FUNCTION(I2C, stop) {\n    CHECK_ARGUMENT_COUNT(I2C, stop, (args_count == 0));\n\n    // Extract native I2C object\n    void *void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native I2C pointer\");\n    }\n\n    I2C *native_ptr = static_cast<I2C*>(void_ptr);\n\n    native_ptr->stop();\n    return jerry_create_undefined();\n}\n\n/**\n * I2C (native JavaScript constructor)\n *\n * @param sda mbed pin for I2C data\n * @param scl mbed pin for I2C clock\n * @returns a JavaScript object representing the I2C bus.\n */\nDECLARE_CLASS_CONSTRUCTOR(I2C) {\n    CHECK_ARGUMENT_COUNT(I2C, __constructor, (args_count == 2));\n    CHECK_ARGUMENT_TYPE_ALWAYS(I2C, __constructor, 0, number);\n    CHECK_ARGUMENT_TYPE_ALWAYS(I2C, __constructor, 1, number);\n\n    int sda = jerry_get_number_value(args[0]);\n    int scl = jerry_get_number_value(args[1]);\n\n    I2C *native_ptr = new I2C((PinName)sda, (PinName)scl);\n\n    jerry_value_t js_object = jerry_create_object();\n    jerry_set_object_native_pointer(js_object, native_ptr, &native_obj_type_info);\n\n    ATTACH_CLASS_FUNCTION(js_object, I2C, frequency);\n    ATTACH_CLASS_FUNCTION(js_object, I2C, read);\n    ATTACH_CLASS_FUNCTION(js_object, I2C, write);\n    ATTACH_CLASS_FUNCTION(js_object, I2C, start);\n    ATTACH_CLASS_FUNCTION(js_object, I2C, stop);\n\n    return js_object;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/source/InterruptIn-js.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jerryscript-mbed-util/logging.h\"\n#include \"jerryscript-mbed-event-loop/EventLoop.h\"\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\n#include \"mbed.h\"\n\n/**\n * InterruptIn#destructor\n *\n * Called if/when the InterruptIn object is GC'ed.\n */\nvoid NAME_FOR_CLASS_NATIVE_DESTRUCTOR(InterruptIn) (void *void_ptr) {\n    InterruptIn *native_ptr = static_cast<InterruptIn*>(void_ptr);\n\n    native_ptr->rise(0);\n    native_ptr->fall(0);\n    delete native_ptr;\n}\n\n/**\n * Type infomation of the native InterruptIn pointer\n *\n * Set InterruptIn#destructor as the free callback.\n */\nstatic const jerry_object_native_info_t native_obj_type_info = {\n    .free_cb = NAME_FOR_CLASS_NATIVE_DESTRUCTOR(InterruptIn)\n};\n\n/**\n * InterruptIn#rise (native JavaScript method)\n *\n * Register a rise callback for an InterruptIn\n *\n * @param cb Callback function, or null to detach previously attached callback.\n */\nDECLARE_CLASS_FUNCTION(InterruptIn, rise) {\n    CHECK_ARGUMENT_COUNT(InterruptIn, rise, (args_count == 1));\n\n    // Detach the rise callback when InterruptIn::rise(null) is called\n    if (jerry_value_is_null(args[0])) {\n        void *void_ptr;\n        bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n        if (!has_ptr) {\n            return jerry_create_error(JERRY_ERROR_TYPE,\n                                      (const jerry_char_t *) \"Failed to get native InterruptIn pointer\");\n        }\n\n        InterruptIn *native_ptr = static_cast<InterruptIn*>(void_ptr);\n\n        jerry_value_t property_name = jerry_create_string((const jerry_char_t*)\"cb_rise\");\n        jerry_value_t cb_func = jerry_get_property(this_obj, property_name);\n        jerry_release_value(property_name);\n\n        // Only drop the callback if it exists\n        if (jerry_value_is_function(cb_func)) {\n            // Ensure that the EventLoop frees memory used by the callback.\n            mbed::js::EventLoop::getInstance().dropCallback(cb_func);\n        }\n        jerry_release_value(cb_func);\n\n        native_ptr->rise(0);\n\n        return jerry_create_undefined();\n    }\n\n    // Assuming we actually have a callback now...\n    CHECK_ARGUMENT_TYPE_ALWAYS(InterruptIn, rise, 0, function);\n\n    void *void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native InterruptIn pointer\");\n    }\n\n    InterruptIn *native_ptr = static_cast<InterruptIn*>(void_ptr);\n\n    jerry_value_t f = args[0];\n\n    // Pass the function to EventLoop.\n    mbed::Callback<void()> cb = mbed::js::EventLoop::getInstance().wrapFunction(f);\n    native_ptr->rise(cb);\n\n    // Keep track of our callback internally.\n    jerry_value_t property_name = jerry_create_string((const jerry_char_t*)\"cb_rise\");\n    jerry_release_value(jerry_set_property(this_obj, property_name, f));\n    jerry_release_value(property_name);\n\n    return jerry_create_undefined();\n}\n\n/**\n * InterruptIn#fall (native JavaScript method)\n *\n * Register a fall callback for an InterruptIn\n *\n * @param cb Callback function, or null to detach previously attached callback.\n */\nDECLARE_CLASS_FUNCTION(InterruptIn, fall) {\n    CHECK_ARGUMENT_COUNT(InterruptIn, fall, (args_count == 1));\n\n    // Detach the fall callback when InterruptIn::fall(null) is called\n    if (jerry_value_is_null(args[0])) {\n        void *void_ptr;\n        bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n        if (!has_ptr) {\n            return jerry_create_error(JERRY_ERROR_TYPE,\n                                      (const jerry_char_t *) \"Failed to get native InterruptIn pointer\");\n        }\n\n        InterruptIn *native_ptr = static_cast<InterruptIn*>(void_ptr);\n\n        jerry_value_t property_name = jerry_create_string((const jerry_char_t*)\"cb_fall\");\n        jerry_value_t cb_func = jerry_get_property(this_obj, property_name);\n        jerry_release_value(property_name);\n\n        // Only drop the callback if it exists\n        if (jerry_value_is_function(cb_func)) {\n            // Ensure that the EventLoop frees memory used by the callback.\n            mbed::js::EventLoop::getInstance().dropCallback(cb_func);\n        }\n        jerry_release_value(cb_func);\n\n        native_ptr->fall(0);\n\n        return jerry_create_undefined();\n    }\n\n    // Assuming we actually have a callback now...\n    CHECK_ARGUMENT_TYPE_ALWAYS(InterruptIn, fall, 0, function);\n\n    void *void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native InterruptIn pointer\");\n    }\n\n    InterruptIn *native_ptr = static_cast<InterruptIn*>(void_ptr);\n\n    jerry_value_t f = args[0];\n\n    // Pass the function to EventLoop.\n    mbed::Callback<void()> cb = mbed::js::EventLoop::getInstance().wrapFunction(f);\n    native_ptr->fall(cb);\n\n    // Keep track of our callback internally.\n    jerry_value_t property_name = jerry_create_string((const jerry_char_t*)\"cb_fall\");\n    jerry_release_value(jerry_set_property(this_obj, property_name, f));\n    jerry_release_value(property_name);\n\n    return jerry_create_undefined();\n}\n\n/**\n * InterruptIn#mode (native JavaScript method)\n *\n * Set the mode of the InterruptIn pin.\n *\n * @param mode PullUp, PullDown, PullNone\n */\nDECLARE_CLASS_FUNCTION(InterruptIn, mode) {\n    CHECK_ARGUMENT_COUNT(InterruptIn, mode, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(InterruptIn, mode, 0, number);\n\n    void *void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native InterruptIn pointer\");\n    }\n\n    InterruptIn *native_ptr = static_cast<InterruptIn*>(void_ptr);\n\n    int pull = jerry_get_number_value(args[0]);\n    native_ptr->mode((PinMode)pull);\n\n    return jerry_create_undefined();\n}\n\n/**\n * InterruptIn#disable_irq (native JavaScript method)\n *\n * Disable IRQ. See InterruptIn.h in mbed-os sources for more details.\n */\nDECLARE_CLASS_FUNCTION(InterruptIn, disable_irq) {\n    CHECK_ARGUMENT_COUNT(InterruptIn, disable_irq, (args_count == 0));\n\n    void *void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native InterruptIn pointer\");\n    }\n\n    InterruptIn *native_ptr = static_cast<InterruptIn*>(void_ptr);\n\n    native_ptr->disable_irq();\n    return jerry_create_undefined();\n}\n\n/**\n * InterruptIn#enable_irq (native JavaScript method)\n *\n * Enable IRQ. See InterruptIn.h in mbed-os sources for more details.\n */\nDECLARE_CLASS_FUNCTION(InterruptIn, enable_irq) {\n    CHECK_ARGUMENT_COUNT(InterruptIn, enable_irq, (args_count == 0));\n\n    void *void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native InterruptIn pointer\");\n    }\n\n    InterruptIn *native_ptr = static_cast<InterruptIn*>(void_ptr);\n\n    native_ptr->enable_irq();\n    return jerry_create_undefined();\n}\n\n/**\n * InterruptIn (native JavaScript constructor)\n *\n * @param pin PinName\n *\n * @returns JavaScript object wrapping InterruptIn native object\n */\nDECLARE_CLASS_CONSTRUCTOR(InterruptIn) {\n    CHECK_ARGUMENT_COUNT(InterruptIn, __constructor, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(InterruptIn, __constructor, 0, number);\n    int pin = jerry_get_number_value(args[0]);\n\n    InterruptIn *native_ptr = new InterruptIn((PinName)pin);\n    jerry_value_t js_object = jerry_create_object();\n\n    jerry_set_object_native_pointer(js_object, native_ptr, &native_obj_type_info);\n\n    ATTACH_CLASS_FUNCTION(js_object, InterruptIn, rise);\n    ATTACH_CLASS_FUNCTION(js_object, InterruptIn, fall);\n    ATTACH_CLASS_FUNCTION(js_object, InterruptIn, mode);\n    ATTACH_CLASS_FUNCTION(js_object, InterruptIn, enable_irq);\n    ATTACH_CLASS_FUNCTION(js_object, InterruptIn, disable_irq);\n\n    return js_object;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/source/PwmOut-js.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jerryscript-mbed-util/logging.h\"\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\n#include \"mbed.h\"\n\n/**\n * PwmOut#destructor\n *\n * Called if/when the PwmOut is GC'ed.\n */\nvoid NAME_FOR_CLASS_NATIVE_DESTRUCTOR(PwmOut)(void* void_ptr) {\n    delete static_cast<PwmOut*>(void_ptr);\n}\n\n/**\n * Type infomation of the native PwmOut pointer\n *\n * Set PwmOut#destructor as the free callback.\n */\nstatic const jerry_object_native_info_t native_obj_type_info = {\n    .free_cb = NAME_FOR_CLASS_NATIVE_DESTRUCTOR(PwmOut)\n};\n\n/**\n * PwmOut#write (native JavaScript method)\n *\n * Set the ouput duty-cycle, specified as a percentage (float)\n *\n * @param value A floating-point value representing the output duty-cycle,\n *    specified as a percentage. The value should lie between\n *    0.0 (representing on 0%) and 1.0 (representing on 100%).\n *    Values outside this range will be saturated to 0.0f or 1.0f\n * @returns undefined\n */\nDECLARE_CLASS_FUNCTION(PwmOut, write) {\n    CHECK_ARGUMENT_COUNT(PwmOut, write, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(PwmOut, write, 0, number);\n\n    // Extract native PwmOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native PwmOut pointer\");\n    }\n\n    PwmOut* native_ptr = static_cast<PwmOut*>(void_ptr);\n\n    double arg0 = jerry_get_number_value(args[0]);\n    native_ptr->write(static_cast<float>(arg0));\n\n    return jerry_create_undefined();\n}\n\n/**\n * PwmOut#read (native JavaScript method)\n *\n * Return the current output duty-cycle setting, measured as a percentage (float)\n *\n * @returns\n *    A floating-point value representing the current duty-cycle being output on the pin,\n *    measured as a percentage. The returned value will lie between\n *    0.0 (representing on 0%) and 1.0 (representing on 100%).\n *\n * @note\n * This value may not match exactly the value set by a previous <write>.\n */\nDECLARE_CLASS_FUNCTION(PwmOut, read) {\n    CHECK_ARGUMENT_COUNT(PwmOut, read, (args_count == 0));\n\n    // Extract native PwmOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native PwmOut pointer\");\n    }\n\n    PwmOut* native_ptr = static_cast<PwmOut*>(void_ptr);\n\n    float result = native_ptr->read();\n    return jerry_create_number(result);\n}\n\n/**\n * PwmOut#period (native JavaScript method)\n *\n * Set the PWM period, specified in seconds (float), keeping the duty cycle the same.\n *\n * @note\n *   The resolution is currently in microseconds; periods smaller than this\n *   will be set to zero.\n */\nDECLARE_CLASS_FUNCTION(PwmOut, period) {\n    CHECK_ARGUMENT_COUNT(PwmOut, period, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(PwmOut, period, 0, number);\n\n    // Extract native PwmOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native PwmOut pointer\");\n    }\n\n    PwmOut* native_ptr = static_cast<PwmOut*>(void_ptr);\n\n    double arg0 = jerry_get_number_value(args[0]);\n    native_ptr->period(static_cast<float>(arg0));\n\n    return jerry_create_undefined();\n}\n\n/**\n * PwmOut#period_ms (native JavaScript method)\n *\n * Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same.\n */\nDECLARE_CLASS_FUNCTION(PwmOut, period_ms) {\n    CHECK_ARGUMENT_COUNT(PwmOut, period_ms, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(PwmOut, period_ms, 0, number);\n\n    // Extract native PwmOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native PwmOut pointer\");\n    }\n\n    PwmOut* native_ptr = static_cast<PwmOut*>(void_ptr);\n\n    double arg0 = jerry_get_number_value(args[0]);\n    native_ptr->period_ms(static_cast<int>(arg0));\n\n    return jerry_create_undefined();\n}\n\n/**\n * PwmOut#period_us (native JavaScript method)\n *\n * Set the PWM period, specified in micro-seconds (int), keeping the duty cycle the same.\n */\nDECLARE_CLASS_FUNCTION(PwmOut, period_us) {\n    CHECK_ARGUMENT_COUNT(PwmOut, period_us, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(PwmOut, period_us, 0, number);\n\n    // Extract native PwmOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native PwmOut pointer\");\n    }\n\n    PwmOut* native_ptr = static_cast<PwmOut*>(void_ptr);\n\n    double arg0 = jerry_get_number_value(args[0]);\n    native_ptr->period_us(static_cast<int>(arg0));\n\n    return jerry_create_undefined();\n}\n\n/**\n * PwmOut#pulsewidth (native JavaScript method)\n *\n * Set the PWM pulsewidth, specified in seconds (float), keeping the period the same.\n */\nDECLARE_CLASS_FUNCTION(PwmOut, pulsewidth) {\n    CHECK_ARGUMENT_COUNT(PwmOut, pulsewidth, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(PwmOut, pulsewidth, 0, number);\n\n    // Extract native PwmOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native PwmOut pointer\");\n    }\n\n    PwmOut* native_ptr = static_cast<PwmOut*>(void_ptr);\n\n    double arg0 = jerry_get_number_value(args[0]);\n    native_ptr->pulsewidth(static_cast<float>(arg0));\n\n    return jerry_create_undefined();\n}\n\n/**\n * PwmOut#pulsewidth_ms (native JavaScript method)\n *\n * Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same.\n */\nDECLARE_CLASS_FUNCTION(PwmOut, pulsewidth_ms) {\n    CHECK_ARGUMENT_COUNT(PwmOut, pulsewidth_ms, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(PwmOut, pulsewidth_ms, 0, number);\n\n    // Extract native PwmOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native PwmOut pointer\");\n    }\n\n    PwmOut* native_ptr = static_cast<PwmOut*>(void_ptr);\n\n    double arg0 = jerry_get_number_value(args[0]);\n    native_ptr->pulsewidth_ms(static_cast<int>(arg0));\n\n    return jerry_create_undefined();\n}\n\n/**\n * PwmOut#pulsewidth_us (native JavaScript method)\n *\n * Set the PWM pulsewidth, specified in micro-seconds (int), keeping the period the same.\n */\nDECLARE_CLASS_FUNCTION(PwmOut, pulsewidth_us) {\n    CHECK_ARGUMENT_COUNT(PwmOut, pulsewidth_us, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(PwmOut, pulsewidth_us, 0, number);\n\n    // Extract native PwmOut pointer\n    void* void_ptr;\n    bool has_ptr = jerry_get_object_native_pointer(this_obj, &void_ptr, &native_obj_type_info);\n\n    if (!has_ptr) {\n        return jerry_create_error(JERRY_ERROR_TYPE,\n                                  (const jerry_char_t *) \"Failed to get native PwmOut pointer\");\n    }\n\n    PwmOut* native_ptr = static_cast<PwmOut*>(void_ptr);\n\n    double arg0 = jerry_get_number_value(args[0]);\n    native_ptr->pulsewidth_us(static_cast<int>(arg0));\n\n    return jerry_create_undefined();\n}\n\n/**\n * PwmOut (native JavaScript constructor)\n *\n * @param pin_name mbed pin to connect the PwmOut to.\n * @returns a JavaScript object representing a PwmOut.\n */\nDECLARE_CLASS_CONSTRUCTOR(PwmOut) {\n    CHECK_ARGUMENT_COUNT(PwmOut, __constructor, args_count == 1);\n    CHECK_ARGUMENT_TYPE_ALWAYS(PwmOut, __constructor, 0, number);\n\n    PinName pin_name = PinName(jerry_get_number_value(args[0]));\n\n    // Create the native object\n    PwmOut* native_ptr = new PwmOut(pin_name);\n\n    // create the jerryscript object\n    jerry_value_t js_object = jerry_create_object();\n    jerry_set_object_native_pointer(js_object, native_ptr, &native_obj_type_info);\n\n    // attach methods\n    ATTACH_CLASS_FUNCTION(js_object, PwmOut, write);\n    ATTACH_CLASS_FUNCTION(js_object, PwmOut, read);\n    ATTACH_CLASS_FUNCTION(js_object, PwmOut, period);\n    ATTACH_CLASS_FUNCTION(js_object, PwmOut, period_ms);\n    ATTACH_CLASS_FUNCTION(js_object, PwmOut, period_us);\n    ATTACH_CLASS_FUNCTION(js_object, PwmOut, pulsewidth);\n    ATTACH_CLASS_FUNCTION(js_object, PwmOut, pulsewidth_ms);\n    ATTACH_CLASS_FUNCTION(js_object, PwmOut, pulsewidth_us);\n\n    return js_object;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/source/setInterval-js.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jerryscript-mbed-drivers/setInterval-js.h\"\n#include \"jerryscript-mbed-event-loop/EventLoop.h\"\n\n/**\n * setInterval (native JavaScript function)\n *\n * Call a JavaScript function at fixed intervals.\n *\n * @param function Function to call\n * @param interval Time between function calls, in ms.\n */\nDECLARE_GLOBAL_FUNCTION(setInterval) {\n    CHECK_ARGUMENT_COUNT(global, setInterval, (args_count == 2));\n    CHECK_ARGUMENT_TYPE_ALWAYS(global, setInterval, 0, function);\n    CHECK_ARGUMENT_TYPE_ALWAYS(global, setInterval, 1, number);\n\n    int interval = int(jerry_get_number_value(args[1]));\n\n    int id = mbed::js::EventLoop::getInstance().getQueue().call_every(interval, jerry_call_function, args[0], jerry_create_null(), (jerry_value_t*)NULL, 0);\n\n    jerry_value_t result = jerry_set_property_by_index(function_obj_p, id, args[0]);\n\n    if (jerry_value_is_error(result)) {\n        jerry_release_value(result);\n        mbed::js::EventLoop::getInstance().getQueue().cancel(id);\n\n        return jerry_create_error(JERRY_ERROR_TYPE, (const jerry_char_t *) \"Failed to run setInterval\");\n    }\n\n    jerry_release_value(result);\n    return jerry_create_number(id);\n}\n\n/**\n * clearInterval (native JavaScript function)\n *\n * Cancel an event that was previously scheduled via setInterval.\n *\n * @param id ID of the timeout event, returned by setInterval.\n */\nDECLARE_GLOBAL_FUNCTION(clearInterval) {\n    CHECK_ARGUMENT_COUNT(global, clearInterval, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(global, clearInterval, 0, number);\n\n    int id = int(jerry_get_number_value(args[0]));\n\n    mbed::js::EventLoop::getInstance().getQueue().cancel(id);\n\n    jerry_value_t global_obj = jerry_get_global_object();\n    jerry_value_t prop_name = jerry_create_string((const jerry_char_t*)\"setInterval\");\n    jerry_value_t func_obj = jerry_get_property(global_obj, prop_name);\n    jerry_release_value(prop_name);\n\n    jerry_delete_property_by_index(func_obj, id);\n    jerry_release_value(func_obj);\n    jerry_release_value(global_obj);\n\n    return jerry_create_undefined();\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-drivers/source/setTimeout-js.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jerryscript-mbed-drivers/setTimeout-js.h\"\n#include \"jerryscript-mbed-event-loop/EventLoop.h\"\n\n/**\n * setTimeout (native JavaScript function)\n *\n * Call a JavaScript function once, after a fixed time period.\n *\n * @param function Function to call\n * @param wait_time Time before function is called, in ms.\n */\nDECLARE_GLOBAL_FUNCTION(setTimeout) {\n    CHECK_ARGUMENT_COUNT(global, setTimeout, (args_count == 2));\n    CHECK_ARGUMENT_TYPE_ALWAYS(global, setTimeout, 0, function);\n    CHECK_ARGUMENT_TYPE_ALWAYS(global, setTimeout, 1, number);\n\n    int interval = int(jerry_get_number_value(args[1]));\n\n    int id = mbed::js::EventLoop::getInstance().getQueue().call_in(interval, jerry_call_function, args[0], jerry_create_null(), (jerry_value_t*)NULL, 0);\n\n    jerry_value_t result = jerry_set_property_by_index(function_obj_p, id, args[0]);\n\n    if (jerry_value_is_error(result)) {\n        jerry_release_value(result);\n        mbed::js::EventLoop::getInstance().getQueue().cancel(id);\n\n        return jerry_create_error(JERRY_ERROR_TYPE, (const jerry_char_t *) \"Failed to run setTimeout\");\n    }\n\n    jerry_release_value(result);\n    return jerry_create_number(id);\n}\n\n/**\n * clearTimeout (native JavaScript function)\n *\n * Cancel an event that was previously scheduled via setTimeout.\n *\n * @param id ID of the timeout event, returned by setTimeout.\n */\nDECLARE_GLOBAL_FUNCTION(clearTimeout) {\n    CHECK_ARGUMENT_COUNT(global, clearTimeout, (args_count == 1));\n    CHECK_ARGUMENT_TYPE_ALWAYS(global, clearTimeout, 0, number);\n\n    int id = int(jerry_get_number_value(args[0]));\n\n    mbed::js::EventLoop::getInstance().getQueue().cancel(id);\n\n    jerry_value_t global_obj = jerry_get_global_object();\n    jerry_value_t prop_name = jerry_create_string((const jerry_char_t*)\"setTimeout\");\n    jerry_value_t func_obj = jerry_get_property(global_obj, prop_name);\n    jerry_release_value(prop_name);\n\n    jerry_delete_property_by_index(func_obj, id);\n    jerry_release_value(func_obj);\n    jerry_release_value(global_obj);\n\n    return jerry_create_undefined();\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-event-loop/BoundCallback.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_EVENT_LOOP_BOUND_CALLBACK_H\n#define _JERRYSCRIPT_MBED_EVENT_LOOP_BOUND_CALLBACK_H\n\n#include \"Callback.h\"\n\nnamespace mbed {\nnamespace js {\n\ntemplate<typename T>\nclass BoundCallback;\n\ntemplate<typename R, typename A0>\nclass BoundCallback<R(A0)> {\n public:\n    BoundCallback(Callback<R(A0)> cb, A0 a0) : a0(a0), cb(cb) { }\n\n    void call() {\n        cb(a0);\n    }\n\n    operator Callback<void()>() {\n        Callback<void()> cb(this, &BoundCallback::call);\n        return cb;\n    }\n\n private:\n    A0 a0;\n    Callback<R(A0)> cb;\n};\n\ntemplate<typename R, typename A0, typename A1>\nclass BoundCallback<R(A0, A1)> {\n public:\n    BoundCallback(Callback<R(A0, A1)> cb, A0 a0, A1 a1) : a0(a0), a1(a1), cb(cb) { }\n\n    void call() {\n        cb(a0, a1);\n    }\n\n    operator Callback<void()>() {\n        Callback<void()> cb(this, &BoundCallback::call);\n        return cb;\n    }\n\n private:\n    A0 a0;\n    A0 a1;\n\n    Callback<R(A0, A1)> cb;\n};\n\ntemplate<typename R, typename A0, typename A1, typename A2>\nclass BoundCallback<R(A0, A1, A2)> {\n public:\n    BoundCallback(Callback<R(A0, A1, A2)> cb, A0 a0, A1 a1, A2 a2) : a0(a0), a1(a1), a2(a2), cb(cb) { }\n\n    void call() {\n        cb(a0, a1, a2);\n    }\n\n    operator Callback<void()>() {\n        Callback<void()> cb(this, &BoundCallback::call);\n        return cb;\n    }\n\n private:\n    A0 a0;\n    A1 a1;\n    A2 a2;\n\n    Callback<R(A0, A1, A2)> cb;\n};\n\ntemplate<typename R, typename A0, typename A1, typename A2, typename A3>\nclass BoundCallback<R(A0, A1, A2, A3)> {\n public:\n    BoundCallback(Callback<R(A0, A1, A2, A3)> cb, A0 a0, A1 a1, A2 a2, A3 a3) : a0(a0), a1(a1), a2(a2), a3(a3), cb(cb) { }\n\n    void call() {\n        cb(a0, a1, a2, a3);\n    }\n\n    operator Callback<void()>() {\n        Callback<void()> cb(this, &BoundCallback::call);\n        return cb;\n    }\n\n private:\n    A0 a0;\n    A1 a1;\n    A2 a2;\n    A3 a3;\n\n    Callback<R(A0, A1, A2, A3)> cb;\n};\n\n}  // namespace js\n}  // namespace mbed\n\n#endif  // _JERRYSCRIPT_MBED_EVENT_LOOP_BOUND_CALLBACK_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-event-loop/EventLoop.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_EVENT_LOOP_EVENT_LOOP_H\n#define _JERRYSCRIPT_MBED_EVENT_LOOP_EVENT_LOOP_H\n\n#include <vector>\n\n#include \"jerry-core/include/jerryscript.h\"\n\n#include \"Callback.h\"\n#include \"mbed_assert.h\"\n\n#include \"events/EventQueue.h\"\n\n#include \"jerryscript-mbed-util/logging.h\"\n#include \"jerryscript-mbed-event-loop/BoundCallback.h\"\n\nextern \"C\" void exit(int return_code);\n\nnamespace mbed {\nnamespace js {\n\nstatic const uint32_t EVENT_INTERVAL_MS = 1;\n\nclass EventLoop {\n private:\n    static EventLoop instance;\n\n public:\n    static EventLoop& getInstance() {\n        return instance;\n    }\n\n    void go() {\n        while (true) {\n            queue.dispatch();\n        }\n    }\n\n    Callback<void()> wrapFunction(jerry_value_t f) {\n        MBED_ASSERT(jerry_value_is_function(f));\n\n        // we need to return a callback that'll schedule this\n        Callback<void(uint32_t)> cb_raw(this, &EventLoop::callback);\n        BoundCallback<void(uint32_t)> *cb = new BoundCallback<void(uint32_t)>(cb_raw, f);\n\n        bound_callbacks.push_back(std::make_pair(f, cb));\n\n        return *cb;\n    }\n\n    void dropCallback(jerry_value_t f) {\n        for (std::vector<std::pair<jerry_value_t, BoundCallback<void(uint32_t)>*> >::iterator it = bound_callbacks.begin(); it != bound_callbacks.end(); it++) {\n            std::pair<jerry_value_t, BoundCallback<void(uint32_t)>*> element = *it;\n\n            if (element.first == f) {\n                delete element.second;\n                break;\n            }\n        }\n    }\n\n    void callback(jerry_value_t f) {\n        queue.call(jerry_call_function, f, jerry_create_null(), (const jerry_value_t*)NULL, 0);\n    }\n\n    void nativeCallback(Callback<void()> cb) {\n        queue.call(cb);\n    }\n\n    events::EventQueue& getQueue() {\n        return queue;\n    }\n\n private:\n    EventLoop() {}\n\n    std::vector<std::pair<jerry_value_t, BoundCallback<void(uint32_t)>*> > bound_callbacks;\n    events::EventQueue queue;\n};\n\nvoid event_loop();\n\n}  // namespace js\n}  // namespace mbed\n\n#endif  // _JERRYSCRIPT_MBED_EVENT_LOOP_EVENT_LOOP_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-event-loop/source/EventLoop.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jerryscript-mbed-event-loop/EventLoop.h\"\n\nnamespace mbed {\nnamespace js {\n\nEventLoop EventLoop::instance;\n\nvoid event_loop() {\n    EventLoop::getInstance().go();\n}\n\n}  // namespace js\n}  // namespace mbed\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-launcher/launcher.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_LAUNCHER_LAUNCHER_H\n#define _JERRYSCRIPT_MBED_LAUNCHER_LAUNCHER_H\n\nvoid jsmbed_js_launch(void);\nvoid jsmbed_js_exit(void);\n\n#endif  // _JERRYSCRIPT_MBED_LAUNCHER_LAUNCHER_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-launcher/setup.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_LAUNCHER_SETUP_H\n#define _JERRYSCRIPT_MBED_LAUNCHER_SETUP_H\n\n#include \"jerry-core/include/jerryscript.h\"\n\nvoid jsmbed_js_load_magic_strings(void);\n\n#endif  // _JERRYSCRIPT_MBED_LAUNCHER_SETUP_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-launcher/source/launcher.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"mbed.h\"\n#include \"rtos.h\"\n\n#include \"jerry-core/include/jerryscript.h\"\n#include \"jerry-core/include/jerryscript-port.h\"\n\n#include \"jerryscript-mbed-event-loop/EventLoop.h\"\n\n#include \"jerryscript-mbed-util/js_source.h\"\n#include \"jerryscript-mbed-library-registry/registry.h\"\n\n#include \"jerryscript-mbed-launcher/launcher.h\"\n#include \"jerryscript-mbed-launcher/setup.h\"\n\n#include \"jerry-targetjs.h\"\n\nDECLARE_JS_CODES;\n\n/**\n * load_javascript\n *\n * Parse and run javascript files specified in jerry-targetjs.h\n */\nstatic int load_javascript() {\n    for (int src = 0; js_codes[src].source; src++) {\n        LOG_PRINT(\"running js file %s\\r\\n\", js_codes[src].name);\n\n        const jerry_char_t* code = reinterpret_cast<const jerry_char_t*>(js_codes[src].source);\n        const size_t length = js_codes[src].length;\n\n        jerry_value_t parsed_code = jerry_parse(NULL, 0, code, length, JERRY_PARSE_NO_OPTS);\n\n        if (jerry_value_is_error(parsed_code)) {\n            LOG_PRINT_ALWAYS(\"jerry_parse failed [%s]\\r\\n\", js_codes[src].name);\n            jerry_release_value(parsed_code);\n            jsmbed_js_exit();\n            return -1;\n        }\n\n        jerry_value_t returned_value = jerry_run(parsed_code);\n        jerry_release_value(parsed_code);\n\n        if (jerry_value_is_error(returned_value)) {\n            LOG_PRINT_ALWAYS(\"jerry_run failed [%s]\\r\\n\", js_codes[src].name);\n            jerry_release_value(returned_value);\n            jsmbed_js_exit();\n            return -1;\n        }\n\n        jerry_release_value(returned_value);\n    }\n\n    return 0;\n}\n\nint jsmbed_js_init() {\n    union { double d; unsigned u; } now = { .d = jerry_port_get_current_time () };\n    srand (now.u);\n    jerry_init_flag_t flags = JERRY_INIT_EMPTY;\n    jerry_init(flags);\n\n    jsmbed_js_load_magic_strings();\n    mbed::js::LibraryRegistry::getInstance().register_all();\n\n    return 0;\n}\n\nvoid jsmbed_js_exit() {\n    jerry_cleanup();\n}\n\nvoid jsmbed_js_launch() {\n    jsmbed_js_init();\n\n    puts(\"   JerryScript in mbed\\r\\n\");\n    puts(\"   build date:  \" __DATE__ \" \\r\\n\");\n\n    if (load_javascript() == 0) {\n        mbed::js::event_loop();\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-launcher/source/setup.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include <stdlib.h>\n#include <stdio.h>\n\n#include \"jerryscript-mbed-launcher/setup.h\"\n#include \"jerryscript-mbed-util/logging.h\"\n\nextern uint32_t jsmbed_js_magic_string_count;\nextern uint32_t jsmbed_js_magic_string_values[];\n\nextern const jerry_char_t *jsmbed_js_magic_strings[];\nextern const jerry_length_t jsmbed_js_magic_string_lengths[];\n\nvoid jsmbed_js_load_magic_strings() {\n    if (jsmbed_js_magic_string_count == 0) {\n        return;\n    }\n\n    jerry_register_magic_strings(jsmbed_js_magic_strings,\n                                 jsmbed_js_magic_string_count,\n                                 jsmbed_js_magic_string_lengths);\n\n    jerry_value_t global = jerry_get_global_object();\n\n    for (unsigned int idx = 0; idx < jsmbed_js_magic_string_count; idx++) {\n        jerry_value_t constant_value = jerry_create_number(jsmbed_js_magic_string_values[idx]);\n        jerry_value_t magic_string = jerry_create_string(jsmbed_js_magic_strings[idx]);\n\n        jerry_release_value(jerry_set_property(global, magic_string, constant_value));\n\n        jerry_release_value(constant_value);\n        jerry_release_value(magic_string);\n    }\n\n    jerry_release_value(global);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-library-registry/registry.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_LIBRARY_REGISTRY_REGISTRY_H\n#define _JERRYSCRIPT_MBED_LIBRARY_REGISTRY_REGISTRY_H\n\n#include <vector>\n#include \"stdint.h\"\n\n#define JERRY_USE_MBED_LIBRARY(NAME) \\\n    mbed::js::LibraryRegistry::getInstance().add(jsmbed_wrap_registry_entry__ ## NAME)\n\nnamespace mbed {\nnamespace js {\n\ntypedef void (*library_registration_function_t)(void);\n\nclass LibraryRegistry {\n private:\n    static LibraryRegistry instance;\n\n public:\n    static LibraryRegistry& getInstance() {\n        return instance;\n    }\n\n    void add(library_registration_function_t lib_func) {\n        funcs.push_back(lib_func);\n    }\n\n    void register_all() {\n        for (std::size_t i = 0; i < funcs.size(); i++) {\n            funcs[i]();\n        }\n    }\n\n private:\n    LibraryRegistry() {}\n\n    std::vector<library_registration_function_t> funcs;\n};\n\n}  // namespace js\n}  // namespace mbed\n\n#endif  // _JERRYSCRIPT_MBED_LIBRARY_REGISTRY_REGISTRY_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-library-registry/source/registry.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"jerryscript-mbed-library-registry/registry.h\"\n\nmbed::js::LibraryRegistry mbed::js::LibraryRegistry::instance;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-library-registry/source/wrap_tools.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include <stdlib.h>\n#include <stdio.h>\n\n#include \"jerryscript-mbed-library-registry/wrap_tools.h\"\n\nbool jsmbed_wrap_register_global_function(const char* name, jerry_external_handler_t handler) {\n    jerry_value_t global_object_val = jerry_get_global_object();\n    jerry_value_t reg_function = jerry_create_external_function(handler);\n\n    bool is_ok = true;\n\n    if (!(jerry_value_is_function(reg_function)\n        && jerry_value_is_constructor(reg_function))) {\n        is_ok = false;\n        LOG_PRINT_ALWAYS(\"Error: jerry_create_external_function failed!\\r\\n\");\n        jerry_release_value(global_object_val);\n        jerry_release_value(reg_function);\n        return is_ok;\n    }\n\n    if (jerry_value_is_error(reg_function)) {\n        is_ok = false;\n        LOG_PRINT_ALWAYS(\"Error: jerry_create_external_function has error flag! \\r\\n\");\n        jerry_release_value(global_object_val);\n        jerry_release_value(reg_function);\n        return is_ok;\n    }\n\n    jerry_value_t jerry_name = jerry_create_string((jerry_char_t *) name);\n\n    jerry_value_t set_result = jerry_set_property(global_object_val, jerry_name, reg_function);\n\n\n    if (jerry_value_is_error(set_result)) {\n        is_ok = false;\n        LOG_PRINT_ALWAYS(\"Error: jerry_create_external_function failed: [%s]\\r\\n\", name);\n    }\n\n    jerry_release_value(jerry_name);\n    jerry_release_value(global_object_val);\n    jerry_release_value(reg_function);\n    jerry_release_value(set_result);\n\n    return is_ok;\n}\n\nbool jsmbed_wrap_register_class_constructor(const char* name, jerry_external_handler_t handler) {\n    // Register class constructor as a global function\n    return jsmbed_wrap_register_global_function(name, handler);\n}\n\nbool jsmbed_wrap_register_class_function(jerry_value_t this_obj, const char* name, jerry_external_handler_t handler) {\n    jerry_value_t property_name = jerry_create_string(reinterpret_cast<const jerry_char_t *>(name));\n    jerry_value_t handler_obj = jerry_create_external_function(handler);\n\n    jerry_release_value(jerry_set_property(this_obj, property_name, handler_obj));\n\n    jerry_release_value(handler_obj);\n    jerry_release_value(property_name);\n\n    // TODO: check for errors, and return false in the case of errors\n    return true;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-library-registry/wrap_tools.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_LIBRARY_REGISTRY_WRAP_TOOLS_H\n#define _JERRYSCRIPT_MBED_LIBRARY_REGISTRY_WRAP_TOOLS_H\n\n#include <stdlib.h>\n\n#include \"jerry-core/include/jerryscript.h\"\n\n#include \"jerryscript-mbed-util/logging.h\"\n#include \"jerryscript-mbed-util/wrappers.h\"\n\n\n//\n// Functions used by the wrapper registration API.\n//\n\nbool\njsmbed_wrap_register_global_function (const char* name,\n                          jerry_external_handler_t handler);\n\nbool\njsmbed_wrap_register_class_constructor (const char* name,\n                            jerry_external_handler_t handler);\n\nbool\njsmbed_wrap_register_class_function (jerry_value_t this_obj_p,\n                         const char* name,\n                         jerry_external_handler_t handler);\n\n#endif  // _JERRYSCRIPT_MBED_LIBRARY_REGISTRY_WRAP_TOOLS_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-util/js_source.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_UTIL_JS_SOURCE_H\n#define _JERRYSCRIPT_MBED_UTIL_JS_SOURCE_H\n\nstruct jsmbed_js_source_t {\n    const char* name;\n    const char* source;\n    const int length;\n};\n\n#endif  // _JERRYSCRIPT_MBED_UTIL_JS_SOURCE_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-util/logging.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_UTIL_LOGGING_H\n#define _JERRYSCRIPT_MBED_UTIL_LOGGING_H\n\n#include \"mbed.h\"\n\n#ifdef DEBUG_WRAPPER\n#define LOG_PRINT(...) printf(__VA_ARGS__)\n#else\n#define LOG_PRINT(...) while(0) { }\n#endif\n\n#define LOG_PRINT_ALWAYS(...) printf(__VA_ARGS__)\n\n#endif  // _JERRYSCRIPT_MBED_UTIL_LOGGING_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/jerryscript-mbed/jerryscript-mbed-util/wrappers.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef _JERRYSCRIPT_MBED_UTIL_WRAPPERS_H\n#define _JERRYSCRIPT_MBED_UTIL_WRAPPERS_H\n\n/*\n * Used in header/source files for wrappers, to declare the signature of the\n * registration function.\n */\n#define DECLARE_JS_WRAPPER_REGISTRATION(NAME) \\\n  void jsmbed_wrap_registry_entry__ ## NAME (void)\n\n//\n// 2. Wrapper function declaration/use macros\n//\n\n// Global functions\n#define DECLARE_GLOBAL_FUNCTION(NAME) \\\njerry_value_t \\\nNAME_FOR_GLOBAL_FUNCTION(NAME) (const jerry_value_t function_obj_p, \\\n                  const jerry_value_t  this_obj, \\\n                  const jerry_value_t    args[], \\\n                  const jerry_length_t   args_count)\n\n#define REGISTER_GLOBAL_FUNCTION(NAME) \\\n  jsmbed_wrap_register_global_function ( # NAME, NAME_FOR_GLOBAL_FUNCTION(NAME) )\n\n#define REGISTER_GLOBAL_FUNCTION_WITH_HANDLER(NAME, HANDLER) \\\n  jsmbed_wrap_register_global_function ( # NAME, HANDLER )\n\n// Class constructors\n#define DECLARE_CLASS_CONSTRUCTOR(CLASS) \\\njerry_value_t \\\nNAME_FOR_CLASS_CONSTRUCTOR(CLASS) (const jerry_value_t function_obj, \\\n                  const jerry_value_t    this_obj, \\\n                  const jerry_value_t    args[], \\\n                  const jerry_length_t   args_count)\n\n#define REGISTER_CLASS_CONSTRUCTOR(CLASS) \\\n  jsmbed_wrap_register_class_constructor ( # CLASS, NAME_FOR_CLASS_CONSTRUCTOR(CLASS) )\n\n// Class functions\n#define DECLARE_CLASS_FUNCTION(CLASS, NAME) \\\njerry_value_t \\\nNAME_FOR_CLASS_FUNCTION(CLASS, NAME) (const jerry_value_t function_obj, \\\n                  const jerry_value_t  this_obj, \\\n                  const jerry_value_t    args[], \\\n                  const jerry_length_t   args_count)\n\n#define ATTACH_CLASS_FUNCTION(OBJECT, CLASS, NAME) \\\n  jsmbed_wrap_register_class_function (OBJECT, # NAME, NAME_FOR_CLASS_FUNCTION(CLASS, NAME) )\n\n//\n// 3. Argument checking macros\n//\n#define CHECK_ARGUMENT_COUNT(CLASS, NAME, EXPR) \\\n    if (!(EXPR)) { \\\n        const char* error_msg = \"ERROR: wrong argument count for \" # CLASS \".\" # NAME \", expected \" # EXPR \".\"; \\\n        return jerry_create_error(JERRY_ERROR_TYPE, reinterpret_cast<const jerry_char_t*>(error_msg)); \\\n    }\n\n#define CHECK_ARGUMENT_TYPE_ALWAYS(CLASS, NAME, INDEX, TYPE) \\\n    if (!jerry_value_is_ ## TYPE (args[INDEX])) { \\\n        const char* error_msg = \"ERROR: wrong argument type for \" # CLASS \".\" # NAME \", expected argument \" # INDEX \" to be a \" # TYPE \".\\n\"; \\\n        return jerry_create_error(JERRY_ERROR_TYPE, reinterpret_cast<const jerry_char_t*>(error_msg)); \\\n    }\n\n#define CHECK_ARGUMENT_TYPE_ON_CONDITION(CLASS, NAME, INDEX, TYPE, EXPR) \\\n    if ((EXPR)) { \\\n        if (!jerry_value_is_ ## TYPE (args[INDEX])) { \\\n            const char* error_msg = \"ERROR: wrong argument type for \" # CLASS \".\" # NAME \", expected argument \" # INDEX \" to be a \" # TYPE \".\\n\"; \\\n            return jerry_create_error(JERRY_ERROR_TYPE, reinterpret_cast<const jerry_char_t*>(error_msg)); \\\n        } \\\n    }\n\n#define NAME_FOR_GLOBAL_FUNCTION(NAME) __gen_jsmbed_global_func_ ## NAME\n#define NAME_FOR_CLASS_CONSTRUCTOR(CLASS) __gen_jsmbed_class_constructor_ ## CLASS\n#define NAME_FOR_CLASS_FUNCTION(CLASS, NAME) __gen_jsmbed_func_c_ ## CLASS ## _f_ ## NAME\n\n#define NAME_FOR_CLASS_NATIVE_CONSTRUCTOR(CLASS, TYPELIST) __gen_native_jsmbed_ ## CLASS ## __Special_create_ ## TYPELIST\n#define NAME_FOR_CLASS_NATIVE_DESTRUCTOR(CLASS) __gen_native_jsmbed_ ## CLASS ## __Special_destroy\n#define NAME_FOR_CLASS_NATIVE_FUNCTION(CLASS, NAME) __gen_native_jsmbed_ ## CLASS ## _ ## NAME\n\n#endif  // _JERRYSCRIPT_MBED_UTIL_WRAPPERS_H\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/js/flash_leds.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar led = 0;\n\n// Setting the pin to 0 turns the LED on\nvar led_off = 1;\nvar led_on = 0;\n\nvar digital_outs = [];\n\nvar leds = [LED1, LED2, LED3, LED4];\n\nfunction connect_pins() {\n    print(\"Creating new DigitalOuts\");\n    digital_outs = [];\n    for (var i = 0; i < 4; i++) {\n        digital_outs.push(DigitalOut(leds[i], led_off));\n        if (digital_outs[i].is_connected()) {\n            print(\"LED \" + i + \" is connected.\");\n        }\n        else {\n            print(\"LED \" + i + \" is not connected.\");\n        }\n    }\n}\n\nconnect_pins();\n\nfunction blink() {\n    digital_outs[0].write(led_off);\n    digital_outs[1].write(led_off);\n    digital_outs[2].write(led_off);\n    digital_outs[3].write(led_off);\n\n    digital_outs[led].write(led_on);\n\n    print(\"Finished with LED \" + led);\n    led = (led + 1) % 4;\n}\n\n// BUTTON2 on NRF52\n// USER_BUTTON on NUCLEO\n// SW2 on the K64F\n// BTN0 on EFM32GG\nvar button;\n\n/* global BUTTON2, SW2, USER_BUTTON, BTN0 */\nif (typeof BUTTON2 !== 'undefined') {\n        button = InterruptIn(BUTTON2);\n} else if (typeof SW2 !== 'undefined') {\n        button = InterruptIn(SW2);\n} else if (typeof USER_BUTTON !== 'undefined') {\n        button = InterruptIn(USER_BUTTON);  \n} else if (typeof BTN0 !== 'undefined') {\n        button = InterruptIn(BTN0);    \n} else {\n        print(\"no button specified\");\n}\nbutton.fall(function() {\n    print(\"YOU PUSHED THE BUTTON!\");\n});\n\nprint(\"flash_leds.js has finished executing.\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/js/main.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nsetInterval(function() {\n    blink();\n}, 1000);\n\nprint(\"main.js has finished executing.\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/mbed-os.lib",
    "content": "https://github.com/ARMmbed/mbed-os/#e4b81f67f939a0c0b11c147ce74aa367271e1279\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/mbed_app.json",
    "content": "{\n    \"target_overrides\": {\n        \"NRF52_DK\": {\n            \"target.uart_hwfc\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/source/jerry_port_mbed.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#define _BSD_SOURCE\n#include <stdarg.h>\n#include <stdlib.h>\n#include <sys/time.h>\n\n#include \"jerry-core/include/jerryscript-port.h\"\n\n#include \"us_ticker_api.h\"\n\n#ifndef JSMBED_OVERRIDE_JERRY_PORT_LOG\n/**\n * Provide log message implementation for the engine.\n */\nvoid\njerry_port_log (jerry_log_level_t level, /**< log level */\n                const char *format, /**< format string */\n                ...)  /**< parameters */\n{\n  (void) level; /* ignore log level */\n\n  va_list args;\n  va_start (args, format);\n  vfprintf (stderr, format, args);\n  va_end (args);\n\n  if (strlen (format) == 1 && format[0] == 0x0a) /* line feed (\\n) */\n  {\n    printf (\"\\r\"); /* add CR for proper display in serial monitors */\n  }\n} /* jerry_port_log */\n#endif /* JSMBED_OVERRIDE_JERRY_PORT_LOG */\n\n/**\n * Implementation of jerry_port_get_local_time_zone_adjustment.\n *\n * @return 0, as we live in UTC.\n */\ndouble\njerry_port_get_local_time_zone_adjustment (double unix_ms, bool is_utc)\n{\n  return 0;\n} /* jerry_port_get_local_time_zone_adjustment */\n\n/**\n * Implementation of jerry_port_get_current_time.\n *\n * @return current timer's counter value in milliseconds\n */\ndouble\njerry_port_get_current_time (void)\n{\n  static uint64_t last_tick = 0;\n  static time_t last_time = 0;\n  static uint32_t skew = 0;\n\n  uint64_t curr_tick = us_ticker_read (); /* The value is in microseconds. */\n  time_t curr_time = time(NULL); /*  The value is in seconds. */\n  double result = curr_time * 1000;\n\n  /* The us_ticker_read () has an overflow for each UINT_MAX microseconds\n   * (~71 mins). For each overflow event the ticker-based clock is about 33\n   * milliseconds fast. Without a timer thread the milliseconds part of the\n   * time can be corrected if the difference of two get_current_time calls\n   * are within the mentioned 71 mins. Above that interval we can assume\n   * that the milliseconds part of the time is negligibe.\n   */\n  if (curr_time - last_time > (time_t) (((uint32_t) - 1) / 1000000)) {\n    skew = 0;\n  } else if (last_tick > curr_tick) {\n    skew = (skew + 33) % 1000;\n  }\n  result += (curr_tick / 1000 - skew) % 1000;\n\n  last_tick = curr_tick;\n  last_time = curr_time;\n  return result;\n} /* jerry_port_get_current_time */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/template-mbedignore.txt",
    "content": "cmake/*\ndocs/*\njerry-main/*\njerry-math/*\njerry-port/default/default-date.c\njerry-port/default/default-io.c\ntargets/*\ntests/*\nthird-party/*\ntools/*\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/tools/check_pins.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# If we're checking only for global variable definitions of pins, then\n# file ordering doesn't matter. This is because:\n#\n# var a = b;\n# var b = 7;\n#\n# will be accepted by jshint, just 'a' will evaluate to 'undefined'.\n# Awkward, but at least it means we can have pins.js included at any\n# point in the clump of files and it won't give us false positives.\n\ncat js/*.js | jshint -c tools/jshint.conf - | grep \"not defined\"\nif [ \"$?\" == 0 ]; then\n    exit 1\nfi\nexit 0\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/tools/cmsis.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is intentionally blank, and is used as a dummy cmsis.h file\n * when preprocessing generate_pins.py.\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/tools/generate_pins.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"\nGenerate pins.cpp for a specified target, using target definitions from the\nmbed OS source tree.\n\nIt's expecting to be run from the targets/mbedos5 directory.\n\"\"\"\n\nfrom __future__ import print_function\n\nimport argparse\nimport ast\n\nimport sys\nimport os\n\nfrom pycparserext.ext_c_parser import GnuCParser\nfrom pycparser import parse_file, c_ast\n\n# import mbed tools\nsys.path.append(os.path.join(os.path.dirname(__file__), '..', 'mbed-os'))\nfrom tools.targets import Target\n\nLICENSE = '''/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is generated by generate_pins.py. Please do not modify.\n */\n    '''\n\n\ndef find_file(root_dir, directories, name):\n    \"\"\"\n    Find the first instance of file with name 'name' in the directory tree\n    starting with 'root_dir'.\n\n    Filter out directories that are not in directories, or do not start with\n    TARGET_.\n\n    Since this looks in (essentially )the same directories as the compiler would\n    when compiling mbed OS, we should only find one PinNames.h.\n    \"\"\"\n\n    for root, dirs, files in os.walk(root_dir, topdown=True):\n        # modify dirs in place\n        dirs[:] = [directory for directory in dirs if directory in directories or not directory.startswith('TARGET_')]\n\n        if name in files:\n            return os.path.join(root, name)\n\n\ndef enumerate_includes(root_dir, directories):\n    \"\"\"\n    Walk through the directory tree, starting at root_dir, and enumerate all\n    valid include directories.\n    \"\"\"\n    for root, dirs, _ in os.walk(root_dir, topdown=True):\n        # modify dirs in place\n        dirs[:] = [dir_label for dir_label in dirs\n                   if dir_label in directories\n                   or (not dir_label.startswith('TARGET_')\n                       and not dir_label.startswith('TOOLCHAIN_'))]\n        yield root\n\n\nclass TypeDeclVisitor(c_ast.NodeVisitor):\n    \"\"\"\n    A TypeDecl visitor class that walks the ast and calls a visitor function for every node found.\n    \"\"\"\n    def __init__(self, filter_names=None):\n        self.names = filter_names or []\n\n    def visit(self, node):\n        value = None\n\n        if node.__class__.__name__ == \"TypeDecl\":\n            value = self.visit_typedecl(node)\n\n        if value is None:\n            for _, child_node in node.children():\n                value = value or self.visit(child_node)\n\n        return value\n\n    def visit_typedecl(self, node):\n        \"\"\"\n        Visit a node.\n        \"\"\"\n        if node.declname in self.names:\n            return [pin.name for pin in node.type.values.enumerators]\n\n\ndef enumerate_pins(c_source_file, include_dirs, definitions):\n    \"\"\"\n    Enumerate pins specified in PinNames.h, by looking for a PinName enum\n    typedef somewhere in the file.\n    \"\"\"\n    definitions += ['__attribute(x)__=', '__extension__(x)=', 'register=', '__IO=', 'uint32_t=unsigned int']\n\n    gcc_args = ['-E', '-fmerge-all-constants']\n    gcc_args += ['-I' + directory for directory in include_dirs]\n\n    gcc_args += ['-D' + definition for definition in definitions]\n    parsed_ast = parse_file(c_source_file,\n                            use_cpp=True,\n                            cpp_path='arm-none-eabi-gcc',\n                            cpp_args=gcc_args,\n                            parser=GnuCParser())\n\n    # now, walk the AST\n    visitor = TypeDeclVisitor(['PinName'])\n    return visitor.visit(parsed_ast)\n\n\ndef write_pins_to_file(pins, pins_file, out_cpp_file):\n    \"\"\"\n    Write the generated pins for a specified mbed board into the output C++ file.\n    \"\"\"\n\n    include = '\\n#include \"../{}\"'.format(pins_file)\n\n    count = '''\nunsigned int jsmbed_js_magic_string_count = {};\n    '''.format(len(pins))\n\n    lengths = ',\\n    '.join(str(len(pin)) for pin in pins)\n    lenghts_source = '''\nunsigned int jsmbed_js_magic_string_lengths[] = {\n    %s\n};\n    ''' % lengths\n\n    magic_values = ',\\n    '.join(pins)\n    magic_source = '''\nint jsmbed_js_magic_string_values[] = {\n    %s\n};\n    ''' % magic_values\n\n    magic_strings = ',\\n    '.join('\"' + pin + '\"' for pin in pins)\n    magic_string_source = '''\nconst char * jsmbed_js_magic_strings[] = {\n    %s\n};\n    ''' % magic_strings\n\n    out_cpp_file.write(LICENSE + include + count + lenghts_source + magic_source + magic_string_source)\n\n\ndef main():\n    \"\"\"\n    Perform the main function of this program\n    \"\"\"\n    if not os.path.exists('./mbed-os'):\n        print(\"Fatal: mbed-os directory does not exist.\")\n        print(\"Try running 'make getlibs'\")\n        sys.exit(1)\n\n    description = \"\"\"\n    Generate pins.cpp for a specified mbed board, using target definitions from the\n    mbed OS source tree.\n    \"\"\"\n\n    parser = argparse.ArgumentParser(description=description)\n\n    parser.add_argument('board', help='mbed board name')\n    parser.add_argument('-c',\n                        help='Output C++ file (default: %(default)s)',\n                        default='source/pins.cpp',\n                        type=argparse.FileType('w'))\n\n    args = parser.parse_args()\n    board_name = args.board.upper()\n\n    target = Target.get_target(board_name)\n\n    directory_labels = ['TARGET_' + label for label in target.labels] + target.macros\n\n    targets_dir = os.path.join('.', 'mbed-os', 'targets')\n\n    pins_file = find_file(targets_dir, directory_labels, 'PinNames.h')\n\n    includes = enumerate_includes(targets_dir, directory_labels)\n    defines = list(directory_labels)\n\n    # enumerate pins from PinNames.h\n    pins = enumerate_pins(pins_file, ['./tools'] + list(includes), defines)\n\n    # first sort alphabetically, then by length.\n    pins = sorted(pins, key=lambda x: (len(x), x.lower()))\n\n    write_pins_to_file(pins, pins_file, args.c)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/tools/jshint.conf",
    "content": "{\n  \"undef\": true,\n  \"predef\": [\"print\", \"BLEDevice\", \"BLEService\", \"BLECharacteristic\", \"DigitalOut\", \"I2C\", \"setInterval\", \"setTimeout\", \"InterruptIn\", \"LWIPInterface\", \"SimpleMbedClient\", \"M2MBase\"]\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/mbedos5/tools/requirements.txt",
    "content": "pycparserext\nsimpleeval\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/.gitignore",
    "content": "# Files generated / copied by the NuttX build\n.built\n.depend\nMake.dep\n*.c.obj\n*.o\n*.a\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/Kconfig",
    "content": "#\n# For a description of the syntax of this configuration file,\n# see the file kconfig-language.txt in the NuttX tools repository.\n#\n\nconfig JERRYSCRIPT\n\tbool \"Jerryscript\"\n\tdefault n\n\t---help---\n\t\tEnable Jerryscript ECMAScript 5.1 interpreter\n\nif JERRYSCRIPT\n\nconfig JERRYSCRIPT_PROGNAME\n\tstring \"Program name\"\n\tdefault \"jerry\"\n\tdepends on BUILD_KERNEL\n\t---help---\n\t\tThis is the name of the program that will be\n\t\t use when the NSH ELF program is installed.\n\nconfig JERRYSCRIPT_PRIORITY\n\tint \"Jerryscript task priority\"\n\tdefault 100\n\nconfig JERRYSCRIPT_STACKSIZE\n\tint \"Jerryscript stack size\"\n\tdefault 16384\n\nendif # JERRYSCRIPT\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/Make.defs",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nifeq ($(CONFIG_JERRYSCRIPT),y)\nCONFIGURED_APPS += interpreters/jerryscript\nendif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/Makefile",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n-include $(TOPDIR)/Make.defs\n\n# Jerryscript built-in application information.\nCONFIG_JERRYSCRIPT_PRIORITY ?= SCHED_PRIORITY_DEFAULT\nCONFIG_JERRYSCRIPT_PROGNAME ?= jerry$(EXEEXT)\nCONFIG_JERRYSCRIPT_STACKSIZE ?= 16384\n\nPROGNAME = $(CONFIG_JERRYSCRIPT_PROGNAME)\nPRIORITY = $(CONFIG_JERRYSCRIPT_PRIORITY)\nSTACKSIZE = $(CONFIG_JERRYSCRIPT_STACKSIZE)\n\n# Path to the JerryScript project. If not specified, it is supposed\n# that JerryScript is located next to the nuttx-apps folder.\nJERRYSCRIPT_ROOT_DIR ?= ../../../jerryscript\n\nCFLAGS += -std=c99\nCFLAGS += -I$(JERRYSCRIPT_ROOT_DIR)/jerry-core/include\nCFLAGS += -I$(JERRYSCRIPT_ROOT_DIR)/jerry-ext/include\nCFLAGS += -I$(JERRYSCRIPT_ROOT_DIR)/jerry-math/include\n\n# These libs should be copied from the JerryScript project.\nLIBS = libjerry-core.a libjerry-ext.a libjerry-math.a\n\nAPPNAME = jerry\nASRCS = setjmp.S\nCSRCS = jerry_port.c\nMAINSRC = jerry_main.c\n\n.PHONY: copylibs\ncopylibs:\n\tcp $(JERRYSCRIPT_ROOT_DIR)/build/lib/lib*.a .\n\n$(LIBS): copylibs\n\t$(firstword $(AR)) x $@\n\n.PHONY: updateobjs\nupdateobjs:\n\t$(eval OBJS += $(shell find . -name \"*.obj\"))\n\n.PHONY: cleanlibs\ncleanlibs: updateobjs\n\trm -f $(OBJS)\n\nclean:: cleanlibs\n\n.built: $(LIBS) updateobjs\n\ninclude $(APPDIR)/Application.mk\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/Makefile.travis",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# Default target for running the build test outside the Travis CI environment.\nall:\n\t$(MAKE) install\n\t$(MAKE) script\n\n\n## Targets for installing build dependencies of the NuttX JerryScript target.\n\n# Install cross-compiler and tools via apt.\ninstall-apt-get-deps:\n\tsudo apt-get install -q -y gcc-arm-none-eabi gperf\n\n# Fetch and build kconfig-frontends (kconfig-conf) from nuttx/tools.\nLOCAL_INSTALL:=$(CURDIR)/../local/\n\ninstall-kconfig:\n\tgit clone https://bitbucket.org/nuttx/tools.git ../tools\n\tmkdir -p $(LOCAL_INSTALL)\n\t# FIXME: 'autoreconf --force --install' is a workaround after\n\t#        https://bitbucket.org/nuttx/tools/commits/164450f982b404fdc2b3233db51dc3eaa1f08b7f\n\tcd ../tools/kconfig-frontends && autoreconf --force --install && ./configure --disable-mconf --disable-nconf --disable-gconf --disable-qconf --disable-shared --enable-static --prefix=$(LOCAL_INSTALL)\n\t$(MAKE) -C ../tools/kconfig-frontends\n\t$(MAKE) -C ../tools/kconfig-frontends install\n\n# Fetch nuttx/{apps,nuttx} repositories.\ninstall-clone-nuttx:\n\tgit clone https://github.com/apache/incubator-nuttx-apps.git ../apps -b releases/9.0\n\tgit clone https://github.com/apache/incubator-nuttx.git ../nuttx -b releases/9.0\n\n# Perform all the necessary (JerryScript-independent) installation steps.\ninstall-noapt: install-kconfig install-clone-nuttx\ninstall: install-apt-get-deps install-noapt\n\n\n## Targets for building NuttX with JerryScript.\n\n# Build JerryScript.\nscript-build-jerryscript:\n\ttools/build.py --clean --toolchain cmake/toolchain_mcu_stm32f4.cmake --profile=es.next --jerry-cmdline OFF --lto OFF --jerry-math ON --amalgam ON --jerry-port-default OFF --mem-heap 70 --compile-flag='--sysroot=../nuttx'\n\n# Link in the NuttX JerryScript target directory under the NuttX apps tree.\nscript-add-jerryscript-app:\n\tln -s ../../jerryscript/targets/nuttx-stm32f4 ../apps/interpreters/jerryscript\n\n# Configure USB shell.\nscript-configure-usbnsh:\n\tcd ../nuttx/tools && PATH=$(LOCAL_INSTALL)/bin:$$PATH ./configure.sh stm32f4discovery/usbnsh\n\n# Configure and build the firmware (NuttX with JerryScript).\nscript: script-build-jerryscript script-add-jerryscript-app script-configure-usbnsh\n\techo 'CONFIG_HOST_LINUX=y' >> ../nuttx/.config\n\techo 'CONFIG_ARCH_FPU=y' >> ../nuttx/.config\n\techo 'CONFIG_JERRYSCRIPT=y'>> ../nuttx/.config\n\tPATH=$(LOCAL_INSTALL)/bin:$$PATH $(MAKE) -C ../nuttx olddefconfig\n\tPATH=$(LOCAL_INSTALL)/bin:$$PATH $(MAKE) -C ../nuttx\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/README.md",
    "content": "### About\n\nThis folder contains files to run JerryScript on\n[STM32F4-Discovery board](http://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-discovery-kits/stm32f4discovery.html) with [NuttX](http://nuttx.org/)\n\n### How to build\n\n#### 1. Setup the build environment for STM32F4-Discovery board\n\nClone the necessary projects into a `jerry-nuttx` directory. The last tested working version of NuttX is 9.0.\n\n```sh\n# Create a base folder for all the projects.\nmkdir jerry-nuttx && cd jerry-nuttx\n\ngit clone https://github.com/jerryscript-project/jerryscript.git\ngit clone https://bitbucket.org/nuttx/nuttx.git -b releases/9.0\ngit clone https://bitbucket.org/nuttx/apps.git -b releases/9.0\ngit clone https://github.com/texane/stlink.git -b v1.5.1-patch\n```\n\nThe following directory structure is created after these commands:\n\n```\njerry-nuttx\n  + apps\n  + jerryscript\n  |  + targets\n  |      + nuttx-stm32f4\n  + nuttx\n  + stlink\n```\n\n#### 2. Build JerryScript for NuttX\n\nBuild JerryScript as a static library using the NuttX folder as sysroot. The created static libraries will be used later by NuttX.\n\n```sh\n# Assuming you are in jerry-nuttx folder.\njerryscript/tools/build.py \\\n    --clean \\\n    --lto=OFF \\\n    --jerry-cmdline=OFF \\\n    --jerry-math=ON \\\n    --amalgam=ON \\\n    --mem-heap=70 \\\n    --profile=es.next \\\n    --compile-flag=\"--sysroot=${PWD}/nuttx\" \\\n    --toolchain=${PWD}/jerryscript/cmake/toolchain_mcu_stm32f4.cmake\n```\n\n#### 3. Copy JerryScript's application files to NuttX\n\nAfter creating the static libs (see previous step), it is needed to move the JerryScript application files to the NuttX's interpreter path.\n\n```sh\n# Assuming you are in jerry-nuttx folder.\nmkdir -p apps/interpreters/jerryscript\ncp jerryscript/targets/nuttx-stm32f4/* apps/interpreters/jerryscript/\n\n# Or more simply:\n# ln -s jerryscript/targets/nuttx-stm32f4 apps/interpreters/jerryscript\n```\n\n#### 4. Configure NuttX\n\nNuttX requires configuration first. The configuration creates a `.config` file in the root folder of NuttX that has all the necessary options for the build.\n\n```sh\n# Assuming you are in jerry-nuttx folder.\ncd nuttx/tools\n\n# Configure NuttX to use USB console shell.\n./configure.sh stm32f4discovery/usbnsh\n```\n\nBy default, JerryScript is not enabled, so it is needed to modify the configuration file.\n\n##### 4.1 Enable JerryScript without user interaction\n\n```sh\n# Assuming you are in jerry-nuttx folder.\nsed --in-place \"s/CONFIG_HOST_WINDOWS/# CONFIG_HOST_WINDOWS/g\" nuttx/.config\nsed --in-place \"s/CONFIG_WINDOWS_CYGWIN/# CONFIG_WINDOWS_CYGWIN/g\" nuttx/.config\nsed --in-place \"s/CONFIG_TOOLCHAIN_WINDOWS/# CONFIG_TOOLCHAIN_WINDOWS/g\" nuttx/.config\n\ncat >> nuttx/.config << EOL\nCONFIG_HOST_LINUX=y\nCONFIG_ARCH_FPU=y\nCONFIG_JERRYSCRIPT=y\nCONFIG_JERRYSCRIPT_PRIORITY=100\nCONFIG_JERRYSCRIPT_STACKSIZE=16384\nEOL\n```\n\n##### 4.2 Enable JerryScript using kconfig-frontend\n\n`kconfig-frontend` could be useful if there are another options that should be enabled or disabled in NuttX.\n\n###### 4.2.1 Install kconfig-frontend\n\n```sh\n# Assuming you are in jerry-nuttx folder.\ngit clone https://bitbucket.org/nuttx/tools.git nuttx-tools\ncd nuttx-tools/kconfig-frontends\n\n./configure \\\n    --disable-nconf \\\n    --disable-gconf \\\n    --disable-qconf \\\n    --disable-shared \\\n    --enable-static \\\n    --prefix=${PWD}/install\n\nmake\nsudo make install\n\n# Add the install folder to PATH\nPATH=$PATH:${PWD}/install/bin\n```\n\n###### 4.2.2 Enable JerryScript\n```sh\n# Assuming you are in jerry-nuttx folder.\n# Might be required to run `make menuconfig` twice.\nmake -C nuttx menuconfig\n```\n\n* Change `Build Setup -> Build Host Platform` to Linux\n* Enable `System Type -> FPU support`\n* Enable JerryScript `Application Configuration -> Interpreters -> JerryScript`\n\n#### 5. Build NuttX\n\n```sh\n# Assuming you are in jerry-nuttx folder.\nmake -C nuttx\n```\n\n#### 6. Flash the device\n\nConnect Mini-USB for power supply and connect Micro-USB for `NSH` console.\n\n```sh\n# Assuming you are in jerry-nuttx folder.\nmake -C stlink release\n\nsudo stlink/build/Release/st-flash write nuttx/nuttx.bin 0x8000000\n```\n\n### Running JerryScript\n\nYou can use `minicom` for terminal program, or any other you may like, but set\nbaud rate to `115200`.\n\n```sh\nsudo minicom --device=/dev/ttyACM0 --baud=115200\n```\n\nYou may have to press `RESET` on the board and press `Enter` keys on the console\nseveral times to make `nsh` prompt to appear.\n\nIf the prompt shows like this,\n```\nNuttShell (NSH)\n               nsh>\n                    nsh>\n                         nsh>\n```\nplease set `Add Carriage Ret` option by `CTRL-A` > `Z` > `U` at the console,\nif you're using `minicom`.\n\n\nRun `jerry` with javascript file(s)\n\n```\nNuttShell (NSH)\nnsh> jerry full_path/any.js\n```\n\nWithout argument it prints:\n```\nnsh> jerry\nNo input files, running a hello world demo:\nHello world 5 times from JerryScript\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/jerry_main.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/debugger.h\"\n#include \"jerryscript-ext/handler.h\"\n#include \"jerryscript-port.h\"\n#include \"setjmp.h\"\n\n/**\n * Maximum command line arguments number.\n */\n#define JERRY_MAX_COMMAND_LINE_ARGS (16)\n\n/**\n * Standalone Jerry exit codes.\n */\n#define JERRY_STANDALONE_EXIT_CODE_OK   (0)\n#define JERRY_STANDALONE_EXIT_CODE_FAIL (1)\n\n/**\n * Context size of the SYNTAX_ERROR\n */\n#define SYNTAX_ERROR_CONTEXT_SIZE 2\n\nvoid set_log_level (jerry_log_level_t level);\n\n/**\n * Print usage and available options\n */\nstatic void\nprint_help (char *name)\n{\n  printf (\"Usage: %s [OPTION]... [FILE]...\\n\"\n          \"\\n\"\n          \"Options:\\n\"\n          \"  --log-level [0-3]\\n\"\n          \"  --mem-stats\\n\"\n          \"  --mem-stats-separate\\n\"\n          \"  --show-opcodes\\n\"\n          \"  --start-debug-server\\n\"\n          \"  --debug-server-port [port]\\n\"\n          \"\\n\",\n          name);\n} /* print_help */\n\n/**\n * Read source code into buffer.\n *\n * Returned value must be freed with jmem_heap_free_block if it's not NULL.\n * @return NULL, if read or allocation has failed\n *         pointer to the allocated memory block, otherwise\n */\nstatic const uint8_t *\nread_file (const char *file_name, /**< source code */\n           size_t *out_size_p) /**< [out] number of bytes successfully read from source */\n{\n  FILE *file = fopen (file_name, \"r\");\n  if (file == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: cannot open file: %s\\n\", file_name);\n    return NULL;\n  }\n\n  int fseek_status = fseek (file, 0, SEEK_END);\n  if (fseek_status != 0)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Failed to seek (error: %d)\\n\", fseek_status);\n    fclose (file);\n    return NULL;\n  }\n\n  long script_len = ftell (file);\n  if (script_len < 0)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Failed to get the file size(error %ld)\\n\", script_len);\n    fclose (file);\n    return NULL;\n  }\n\n  rewind (file);\n\n  uint8_t *buffer = (uint8_t *) malloc (script_len);\n\n  if (buffer == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Out of memory error\\n\");\n    fclose (file);\n    return NULL;\n  }\n\n  size_t bytes_read = fread (buffer, 1u, script_len, file);\n\n  if (!bytes_read || bytes_read != script_len)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: failed to read file: %s\\n\", file_name);\n    free ((void*) buffer);\n\n    fclose (file);\n    return NULL;\n  }\n\n  fclose (file);\n\n  *out_size_p = bytes_read;\n  return (const uint8_t *) buffer;\n} /* read_file */\n\n/**\n * Convert string into unsigned integer\n *\n * @return converted number\n */\nstatic uint32_t\nstr_to_uint (const char *num_str_p, /**< string to convert */\n             char **out_p) /**< [out] end of the number */\n{\n  assert (jerry_is_feature_enabled (JERRY_FEATURE_ERROR_MESSAGES));\n\n  uint32_t result = 0;\n\n  while (*num_str_p >= '0' && *num_str_p <= '9')\n  {\n    result *= 10;\n    result += (uint32_t) (*num_str_p - '0');\n    num_str_p++;\n  }\n\n  if (out_p != NULL)\n  {\n    *out_p = num_str_p;\n  }\n\n  return result;\n} /* str_to_uint */\n\n/**\n * Print error value\n */\nstatic void\nprint_unhandled_exception (jerry_value_t error_value) /**< error value */\n{\n  assert (jerry_value_is_error (error_value));\n\n  error_value = jerry_get_value_from_error (error_value, false);\n  jerry_value_t err_str_val = jerry_value_to_string (error_value);\n  jerry_size_t err_str_size = jerry_get_utf8_string_size (err_str_val);\n  jerry_char_t err_str_buf[256];\n\n  jerry_release_value (error_value);\n\n  if (err_str_size >= 256)\n  {\n    const char msg[] = \"[Error message too long]\";\n    err_str_size = sizeof (msg) / sizeof (char) - 1;\n    memcpy (err_str_buf, msg, err_str_size);\n  }\n  else\n  {\n    jerry_size_t sz = jerry_string_to_utf8_char_buffer (err_str_val, err_str_buf, err_str_size);\n    assert (sz == err_str_size);\n    err_str_buf[err_str_size] = 0;\n\n    if (jerry_is_feature_enabled (JERRY_FEATURE_ERROR_MESSAGES)\n        && jerry_get_error_type (error_value) == JERRY_ERROR_SYNTAX)\n    {\n      jerry_char_t *string_end_p = err_str_buf + sz;\n      uint32_t err_line = 0;\n      uint32_t err_col = 0;\n      char *path_str_p = NULL;\n      char *path_str_end_p = NULL;\n\n      /* 1. parse column and line information */\n      for (jerry_char_t *current_p = err_str_buf; current_p < string_end_p; current_p++)\n      {\n        if (*current_p == '[')\n        {\n          current_p++;\n\n          if (*current_p == '<')\n          {\n            break;\n          }\n\n          path_str_p = (char *) current_p;\n          while (current_p < string_end_p && *current_p != ':')\n          {\n            current_p++;\n          }\n\n          path_str_end_p = (char *) current_p++;\n\n          err_line = str_to_uint ((char *) current_p, (char **) &current_p);\n\n          current_p++;\n\n          err_col = str_to_uint ((char *) current_p, NULL);\n          break;\n        }\n      } /* for */\n\n      if (err_line != 0 && err_col != 0)\n      {\n        uint32_t curr_line = 1;\n\n        bool is_printing_context = false;\n        uint32_t pos = 0;\n\n        /* Temporarily modify the error message, so we can use the path. */\n        *path_str_end_p = '\\0';\n\n        size_t source_size;\n        const jerry_char_t *source_p = read_file (path_str_p, &source_size);\n\n        /* Revert the error message. */\n        *path_str_end_p = ':';\n\n        /* 2. seek and print */\n        while (source_p[pos] != '\\0')\n        {\n          if (source_p[pos] == '\\n')\n          {\n            curr_line++;\n          }\n\n          if (err_line < SYNTAX_ERROR_CONTEXT_SIZE\n              || (err_line >= curr_line\n                  && (err_line - curr_line) <= SYNTAX_ERROR_CONTEXT_SIZE))\n          {\n            /* context must be printed */\n            is_printing_context = true;\n          }\n\n          if (curr_line > err_line)\n          {\n            break;\n          }\n\n          if (is_printing_context)\n          {\n            jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"%c\", source_p[pos]);\n          }\n\n          pos++;\n        }\n\n        jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"\\n\");\n\n        while (--err_col)\n        {\n          jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"~\");\n        }\n\n        jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"^\\n\");\n      }\n    }\n  }\n\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Script Error: %s\\n\", err_str_buf);\n  jerry_release_value (err_str_val);\n} /* print_unhandled_exception */\n\n/**\n * Register a JavaScript function in the global object.\n */\nstatic void\nregister_js_function (const char *name_p, /**< name of the function */\n                      jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t result_val = jerryx_handler_register_global ((const jerry_char_t *) name_p, handler_p);\n\n  if (jerry_value_is_error (result_val))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_WARNING, \"Warning: failed to register '%s' method.\", name_p);\n  }\n\n  jerry_release_value (result_val);\n} /* register_js_function */\n\n\n/**\n * Main program.\n *\n * @return 0 if success, error code otherwise\n */\n#ifdef CONFIG_BUILD_KERNEL\nint main (int argc, FAR char *argv[])\n#else\nint jerry_main (int argc, char *argv[])\n#endif\n{\n  if (argc > JERRY_MAX_COMMAND_LINE_ARGS)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR,\n                    \"Too many command line arguments. Current maximum is %d\\n\",\n                    JERRY_MAX_COMMAND_LINE_ARGS);\n\n    return JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  const char *file_names[JERRY_MAX_COMMAND_LINE_ARGS];\n  int i;\n  int files_counter = 0;\n  bool start_debug_server = false;\n  uint16_t debug_port = 5001;\n\n  jerry_init_flag_t flags = JERRY_INIT_EMPTY;\n\n  for (i = 1; i < argc; i++)\n  {\n    if (!strcmp (\"-h\", argv[i]) || !strcmp (\"--help\", argv[i]))\n    {\n      print_help (argv[0]);\n      return JERRY_STANDALONE_EXIT_CODE_OK;\n    }\n    else if (!strcmp (\"--mem-stats\", argv[i]))\n    {\n      flags |= JERRY_INIT_MEM_STATS;\n      set_log_level (JERRY_LOG_LEVEL_DEBUG);\n    }\n    else if (!strcmp (\"--mem-stats-separate\", argv[i]))\n    {\n      flags |= JERRY_INIT_MEM_STATS_SEPARATE;\n      set_log_level (JERRY_LOG_LEVEL_DEBUG);\n    }\n    else if (!strcmp (\"--show-opcodes\", argv[i]))\n    {\n      flags |= JERRY_INIT_SHOW_OPCODES | JERRY_INIT_SHOW_REGEXP_OPCODES;\n      set_log_level (JERRY_LOG_LEVEL_DEBUG);\n    }\n    else if (!strcmp (\"--log-level\", argv[i]))\n    {\n      if (++i < argc && strlen (argv[i]) == 1 && argv[i][0] >='0' && argv[i][0] <= '3')\n      {\n        set_log_level (argv[i][0] - '0');\n      }\n      else\n      {\n        jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: wrong format or invalid argument\\n\");\n        return JERRY_STANDALONE_EXIT_CODE_FAIL;\n      }\n    }\n    else if (!strcmp (\"--start-debug-server\", argv[i]))\n    {\n      start_debug_server = true;\n    }\n    else if (!strcmp (\"--debug-server-port\", argv[i]))\n    {\n      if (++i < argc)\n      {\n        debug_port = str_to_uint (argv[i], NULL);\n      }\n      else\n      {\n        jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: wrong format or invalid argument\\n\");\n        return JERRY_STANDALONE_EXIT_CODE_FAIL;\n      }\n    }\n    else\n    {\n      file_names[files_counter++] = argv[i];\n    }\n  }\n\n  jerry_init (flags);\n\n  if (start_debug_server)\n  {\n    jerryx_debugger_after_connect (jerryx_debugger_tcp_create (debug_port)\n                                   && jerryx_debugger_ws_create ());\n  }\n\n  register_js_function (\"assert\", jerryx_handler_assert);\n  register_js_function (\"gc\", jerryx_handler_gc);\n  register_js_function (\"print\", jerryx_handler_print);\n\n  jerry_value_t ret_value = jerry_create_undefined ();\n\n  if (files_counter == 0)\n  {\n    printf (\"No input files, running a hello world demo:\\n\");\n    const jerry_char_t script[] = \"var str = 'Hello World'; print(str + ' from JerryScript')\";\n\n    ret_value = jerry_parse (NULL, 0, script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n    if (!jerry_value_is_error (ret_value))\n    {\n      ret_value = jerry_run (ret_value);\n    }\n  }\n  else\n  {\n    for (i = 0; i < files_counter; i++)\n    {\n      size_t source_size;\n      const jerry_char_t *source_p = read_file (file_names[i], &source_size);\n\n      if (source_p == NULL)\n      {\n        jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Source file load error\\n\");\n        return JERRY_STANDALONE_EXIT_CODE_FAIL;\n      }\n\n      ret_value = jerry_parse ((jerry_char_t *) file_names[i],\n                               strlen (file_names[i]),\n                               source_p,\n                               source_size,\n                               JERRY_PARSE_NO_OPTS);\n      free ((void*) source_p);\n\n      if (!jerry_value_is_error (ret_value))\n      {\n        jerry_value_t func_val = ret_value;\n        ret_value = jerry_run (func_val);\n        jerry_release_value (func_val);\n      }\n\n      if (jerry_value_is_error (ret_value))\n      {\n        print_unhandled_exception (ret_value);\n        break;\n      }\n\n      jerry_release_value (ret_value);\n      ret_value = jerry_create_undefined ();\n    }\n  }\n\n  int ret_code = JERRY_STANDALONE_EXIT_CODE_OK;\n\n  if (jerry_value_is_error (ret_value))\n  {\n    ret_code = JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  jerry_release_value (ret_value);\n\n  ret_value = jerry_run_all_enqueued_jobs ();\n\n  if (jerry_value_is_error (ret_value))\n  {\n    ret_code = JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  jerry_release_value (ret_value);\n  jerry_cleanup ();\n\n  return ret_code;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/jerry_port.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n#include <unistd.h>\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n\n/**\n * JerryScript log level\n */\nstatic jerry_log_level_t jerry_log_level = JERRY_LOG_LEVEL_ERROR;\n\n/**\n * Sets log level.\n */\nvoid set_log_level (jerry_log_level_t level)\n{\n  jerry_log_level = level;\n} /* set_log_level */\n\n/**\n * Aborts the program.\n */\nvoid jerry_port_fatal (jerry_fatal_code_t code)\n{\n  exit (1);\n} /* jerry_port_fatal */\n\n/**\n * Provide log message implementation for the engine.\n */\nvoid\njerry_port_log (jerry_log_level_t level, /**< log level */\n                const char *format, /**< format string */\n                ...)  /**< parameters */\n{\n  if (level <= jerry_log_level)\n  {\n    va_list args;\n    va_start (args, format);\n    vfprintf (stderr, format, args);\n    va_end (args);\n  }\n} /* jerry_port_log */\n\n/**\n * Determines the size of the given file.\n * @return size of the file\n */\nstatic size_t\njerry_port_get_file_size (FILE *file_p) /**< opened file */\n{\n  fseek (file_p, 0, SEEK_END);\n  long size = ftell (file_p);\n  fseek (file_p, 0, SEEK_SET);\n\n  return (size_t) size;\n} /* jerry_port_get_file_size */\n\n/**\n * Opens file with the given path and reads its source.\n * @return the source of the file\n */\nuint8_t *\njerry_port_read_source (const char *file_name_p, /**< file name */\n                        size_t *out_size_p) /**< [out] read bytes */\n{\n  FILE *file_p = fopen (file_name_p, \"rb\");\n\n  if (file_p == NULL)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: failed to open file: %s\\n\", file_name_p);\n    return NULL;\n  }\n\n  size_t file_size = jerry_port_get_file_size (file_p);\n  uint8_t *buffer_p = (uint8_t *) malloc (file_size);\n\n  if (buffer_p == NULL)\n  {\n    fclose (file_p);\n\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: failed to allocate memory for module\");\n    return NULL;\n  }\n\n  size_t bytes_read = fread (buffer_p, 1u, file_size, file_p);\n\n  if (!bytes_read)\n  {\n    fclose (file_p);\n    free (buffer_p);\n\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Error: failed to read file: %s\\n\", file_name_p);\n    return NULL;\n  }\n\n  fclose (file_p);\n  *out_size_p = bytes_read;\n\n  return buffer_p;\n} /* jerry_port_read_source */\n\n/**\n * Release the previously opened file's content.\n */\nvoid\njerry_port_release_source (uint8_t *buffer_p) /**< buffer to free */\n{\n  free (buffer_p);\n} /* jerry_port_release_source */\n\n/**\n * Normalize a file path\n *\n * @return length of the path written to the output buffer\n */\nsize_t\njerry_port_normalize_path (const char *in_path_p,   /**< input file path */\n                           char *out_buf_p,         /**< output buffer */\n                           size_t out_buf_size,     /**< size of output buffer */\n                           char *base_file_p) /**< base file path */\n{\n  (void) base_file_p;\n\n  size_t len = strlen (in_path_p);\n  if (len + 1 > out_buf_size)\n  {\n    return 0;\n  }\n\n  /* Return the original string. */\n  strcpy (out_buf_p, in_path_p);\n  return len;\n} /* jerry_port_normalize_path */\n\n/**\n * Get the module object of a native module.\n *\n * @return undefined\n */\njerry_value_t\njerry_port_get_native_module (jerry_value_t name) /**< module specifier */\n{\n  (void) name;\n  return jerry_create_undefined ();\n} /* jerry_port_get_native_module */\n\n/**\n * Dummy function to get the time zone adjustment.\n *\n * @return 0\n */\ndouble\njerry_port_get_local_time_zone_adjustment (double unix_ms, bool is_utc)\n{\n  /* We live in UTC. */\n  return 0;\n} /* jerry_port_get_local_time_zone_adjustment */\n\n/**\n * Dummy function to get the current time.\n *\n * @return 0\n */\ndouble\njerry_port_get_current_time (void)\n{\n  return 0;\n} /* jerry_port_get_current_time */\n\n/**\n * Provide the implementation of jerry_port_print_char.\n * Uses 'printf' to print a single character to standard output.\n */\nvoid\njerry_port_print_char (char c) /**< the character to print */\n{\n  printf (\"%c\", c);\n} /* jerry_port_print_char */\n\n/**\n * Provide implementation of jerry_port_sleep.\n */\nvoid jerry_port_sleep (uint32_t sleep_time) /**< milliseconds to sleep */\n{\n  usleep ((useconds_t) sleep_time * 1000);\n} /* jerry_port_sleep */\n\n/**\n * Pointer to the current context.\n */\nstatic jerry_context_t *current_context_p = NULL;\n\n/**\n * Set the current_context_p as the passed pointer.\n */\nvoid\njerry_port_default_set_current_context (jerry_context_t *context_p) /**< points to the created context */\n{\n  current_context_p = context_p;\n} /* jerry_port_default_set_current_context */\n\n/**\n * Get the current context.\n *\n * @return the pointer to the current context\n */\njerry_context_t *\njerry_port_get_current_context (void)\n{\n  return current_context_p;\n} /* jerry_port_get_current_context */\n\n/**\n * Track unhandled promise rejections.\n *\n * Note:\n *      This port function is called by jerry-core when JERRY_BUILTIN_PROMISE\n *      is enabled.\n *\n * @param promise rejected promise\n * @param operation HostPromiseRejectionTracker operation\n */\nvoid\njerry_port_track_promise_rejection (const jerry_value_t promise,\n                                    const jerry_promise_rejection_operation_t operation)\n{\n  (void) operation; /* unused */\n\n  jerry_value_t reason = jerry_get_promise_result (promise);\n  jerry_value_t reason_to_string = jerry_value_to_string (reason);\n  jerry_size_t req_sz = jerry_get_utf8_string_size (reason_to_string);\n  jerry_char_t str_buf_p[req_sz + 1];\n  jerry_string_to_utf8_char_buffer (reason_to_string, str_buf_p, req_sz);\n  str_buf_p[req_sz] = '\\0';\n\n  jerry_release_value (reason_to_string);\n  jerry_release_value (reason);\n\n  jerry_port_log (JERRY_LOG_LEVEL_WARNING, \"Uncaught (in promise) %s\\n\", str_buf_p);\n} /* jerry_port_track_promise_rejection */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/setjmp.S",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.syntax unified\n\n.macro func _name\n.global \\_name\n.type \\_name, %function\n\\_name:\n.endm\n.macro endfunc _name\n.size \\_name, .-\\_name\n.endm\n\n/**\n * setjmp (jmp_buf env)\n *\n * See also:\n *          longjmp\n *\n * @return 0 - if returns from direct call,\n *         nonzero - if returns after longjmp.\n */\nfunc setjmp\n  stmia r0!, {r4 - r11, lr}\n  str sp, [r0], #4\n  vstm r0, {s16 - s31}\n  mov r0, #0\n  bx lr\nendfunc setjmp\n\n/**\n * longjmp (jmp_buf env, int val)\n *\n * Note:\n *      if val is not 0, then it would be returned from setjmp,\n *      otherwise - 0 would be returned.\n *\n * See also:\n *          setjmp\n */\nfunc longjmp\n  ldmia r0!, {r4 - r11, lr}\n  ldr sp, [r0]\n  add r0, r0, #4\n  vldm r0, {s16 - s31}\n  mov r0, r1\n  cmp r0, #0\n  bne 1f\n  mov r0, #1\n  1:\n  bx lr\nendfunc longjmp\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/nuttx-stm32f4/setjmp.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef SETJMP_H\n#define SETJMP_H\n\n#include <stdint.h>\n\ntypedef uint64_t jmp_buf[14];\n\nint setjmp (jmp_buf env);\nvoid longjmp (jmp_buf env, int val);\n\n#endif /* !SETJMP_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/openwrt/readme.md",
    "content": "# JerryScript for OpenWrt build guide\n\nThis document describes the steps required to compile the JerryScript\nfor OpenWrt. For target device the TP-Link WR1043ND v1.x router is\nused. Please be advised, that if you have a different one minor\nmodifications to this document could be required.\n\nIMPORTANT!\n\nAs the TP-Link WR1043ND is a mips based device and mips is a big-endian\narchitecture a JerryScipt snapshot which was built on an little-endian\nsystem will not work correctly. Thus it is advised that the\nsnapshot functionally should be used with caution, that is\nDO NOT run snapshots generated on little-endian system(s) on\na big-endian system.\n\n## OpenWrt notes\n\nIn 2018 ~January the OpenWrt and LEDE project merged into one\nand thus the old OpenWrt parts are now usable only from\nan archived repository: https://github.com/openwrt/archive\n\n## OpenWrt toolchain setup\n\nTo build the JerryScript for OpenWrt a toolchain is required for\nthe target router/device. The toolchain setup in this document was\ntested on an Ubuntu 16.04.3 LTS Linux.\n\nSteps required for toolchain creation:\n\n### 0. Install OpenWrt build requirements\n```sh\n$ sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev subversion mercurial\n```\n\n### 1. Clone OpenWrt (Chaos Calmer version)\n\n```sh\n$ git clone https://github.com/openwrt/archive openwrt -b chaos_calmer\n$ cd openwrt\n```\n\n### 2. Run Menuconfig and configure the OpenWrt\n\n```sh\n$ make menuconfig\n```\n\nOptions which should be set:\n* Set \"Target System\" to \"Atheros AR7xxx/AR9xxx\".\n* Set \"Target Profile\" to \"TP-LINK TL-WR1043N/ND\".\n\nSave the configuration (as .config) and exit from the menuconfig.\n\n### 3. Configure the environment variables\n\n```sh\n$ export BUILDROOT=$(pwd) # where the openwrt root dir is\n$ export STAGING_DIR=${BUILDROOT}/staging_dir/ # required by the compiler\n$ export PATH=$PATH:${STAGING_DIR}/host/bin:${STAGING_DIR}/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/\n```\n\nThe name `toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2` is created based on the menuconfig.\nThis changes depending on the target device!\n\n### 4. Build the OpenWrt\n\n```sh\n$ make\n```\n\n### 5. Check if the compiler was built\n\n```sh\n$ mips-openwrt-linux-gcc --version # running this should print out the version information\n```\n\nAt this point we have the required compiler for OpenWrt.\n\n## Build JerryScript for OpenWrt\n\n### 0. Check environment\n\nPlease check if the `STAGING_DIR` is configured correctly and that the toolchain binary is on the `PATH`.\n\n### 1. Run the build with the OpenWrt toolchain file\n\n```\n$ ./tools/build.py --toolchain cmake/toolchain_openwrt_mips.cmake \\\n                   --lto OFF\n```\n\n### 2. Copy the binary\n\nAfter a successful build the `build/bin/jerry` binary file can be copied to the target device.\nOn how to copy a binary file to an OpenWrt target device please see the OpenWrt manual(s).\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/particle/Makefile.particle",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nPARTICLE_FIRMWARE := $(CURDIR)/../particle/firmware\n\nJERRYDIR ?= $(CURDIR)\nJERRYHEAP  ?= 16\n\nBUILD_DIR  ?= $(JERRYDIR)/build/particle\n\nEXT_CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4\nEXT_CFLAGS += -Wno-error=format=\n\n.PHONY: jerrycore jerry-main flash clean\n\nPARTICLE_BUILD_CONFIG = \\\n\t INCLUDE_DIRS=$(JERRYDIR)/jerry-core/include \\\n\t LIBS=jerry-core \\\n\t PLATFORM=photon \\\n\t LIB_DIRS=$(BUILD_DIR)/lib \\\n\t APPDIR=$(JERRYDIR)/targets/particle/source \\\n\t TARGET_FILE=jerry_main \\\n\t TARGET_DIR=$(BUILD_DIR) \\\n\t LDFLAGS=--specs=nano.specs\n\nall: jerrycore jerry-main\n\njerrycore:\n\tmkdir -p $(BUILD_DIR)\n\tcmake -B$(BUILD_DIR) -H./ \\\n\t -DCMAKE_SYSTEM_NAME=MCU \\\n\t -DCMAKE_SYSTEM_PROCESSOR=armv7l \\\n\t -DCMAKE_C_COMPILER=arm-none-eabi-gcc \\\n\t -DCMAKE_C_COMPILER_WORKS=TRUE \\\n\t -DENABLE_LTO=ON \\\n\t -DJERRY_CMDLINE=OFF \\\n\t -DJERRY_PROFILE=minimal \\\n\t -DENABLE_STRIP=OFF \\\n\t -DEXTERNAL_COMPILE_FLAGS=\"$(EXT_CFLAGS)\" \\\n\t -DJERRY_GLOBAL_HEAP_SIZE=$(JERRYHEAP)\n\n\tmake -C$(BUILD_DIR) jerry-core\n\njerry-main: jerrycore\n\t$(PARTICLE_BUILD_CONFIG) make -C$(PARTICLE_FIRMWARE) -f $(PARTICLE_FIRMWARE)/makefile\n\nflash:\n\t$(PARTICLE_BUILD_CONFIG) make -C$(PARTICLE_FIRMWARE)/main -f $(PARTICLE_FIRMWARE)/main/makefile program-dfu\n\nclean:\n\t$(PARTICLE_BUILD_CONFIG) make -C$(PARTICLE_FIRMWARE) -f $(PARTICLE_FIRMWARE)/makefile clean\n\trm -rf $(BUILD_DIR)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/particle/README.md",
    "content": "### About\n\nThis folder contains files to run JerryScript beside Particle Device Firmware on Photon board.\nIt  runs a mini example, blinking an LED which is the \"Hello World\" example of the microcontroller universe.\n\n### How to build\n\n#### 1. Preface / Directory structure\n\nAssume `root` as the path to the projects to build.\nThe folder tree related would look like this.\n\n```\nroot\n  + jerryscript\n  |  + targets\n  |      + particle\n  + particle\n  |  + firmware\n```\n\n\n#### 2, Update/Install the Particle Firmware\n\nFor detailed descriptions please visit the official website of the firmware: https://www.particle.io/\n\nYou can checkout the firmware with the following command:\n\n```\n# assume you are in root folder\ngit clone https://github.com/spark/firmware.git particle/firmware\n````\n\nThe Photon’s latest firmware release is hosted in the latest branch of the firmware repo.\n\n```\n# assume you are in root folder\ncd particle/firmware\ngit checkout latest\n```\n\nBefore you type any commands, put your Photon in DFU mode: hold down both the SETUP and RESET buttons. Then release RESET, but hold SETUP until you see the RGB blink yellow. That means the Photon is in DFU mode. To verify that the Photon is in DFU mode and dfu-util is installed properly, try the dfu-util -l command. You should see the device, and the important parts there are the hex values inside the braces – the USB VID and PID, which should be 2b04 and d006 for the Photon.\n\nTo build and flash the firmware: switch to the modules directory then call make with a few parameters to build and upload the firmware:\n\n```\ncd modules\nmake PLATFORM=photon clean all program-dfu\n```\n\n#### 3. Build JerryScript\n\n```\n# assume you are in root folder\ncd jerryscript\nmake -f ./targets/particle/Makefile.particle\n```\n\nThis will create a binary file in the `/build/particle/` folder:\n```\njerry_main.bin\n```\n\nThat’s the binary what we’ll be flashing with dfu-util.\n\n\n#### 4. Flashing\n\nMake sure you put your Photon in DFU mode.\nAlternatively, you can make your life a bit easier by using the make command to invoke dfu-util:\n\n```\nmake -f targets/particle/Makefile.particle flash\n```\n\nYou can also use this dfu-util command directly to upload your BIN file to the Photon’s application memory:\n\n```\ndfu-util -d 2b04:d006 -a 0 -i 0 -s 0x80A0000:leave -D build/particle/jerry_main.bin\n```\n\n#### 5. Cleaning\n\nTo clean the build result:\n```\nmake -f targets/particle/Makefile.particle clean\n```\n\n### Running the example\n\nThe example program will blinks the D7 led periodically after the flash."
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/particle/source/main.cpp",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"application.h\"\n#include \"jerryscript.h\"\n\nSYSTEM_MODE (MANUAL);\n\n/**\n * Set led value\n */\nstatic jerry_value_t\nset_led  (const jerry_value_t func_value, /**< function object */\n          const jerry_value_t this_value, /**< this arg */\n          const jerry_value_t *args_p, /**< function arguments */\n          const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  if (args_cnt != 2)\n  {\n    Serial.println (\"Wrong arguments count in 'test.setLed' function.\");\n    return jerry_create_boolean (false);\n  }\n\n  int ledPin = jerry_get_number_value (args_p[0]);\n  bool value = jerry_get_boolean_value (args_p[1]);\n\n  pinMode (ledPin, OUTPUT);\n  digitalWrite (ledPin, value);\n\n  return jerry_create_boolean (true);\n} /* set_led */\n\n/**\n * Delay function\n */\nstatic jerry_value_t\njs_delay (const jerry_value_t func_value, /**< function object */\n          const jerry_value_t this_value, /**< this arg */\n          const jerry_value_t *args_p, /**< function arguments */\n          const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  if (args_cnt != 1)\n  {\n    Serial.println (\"Wrong arguments count in 'test.delay' function.\");\n    return jerry_create_boolean (false);\n  }\n\n  int millisec = jerry_get_number_value (args_p[0]);\n\n  delay (millisec);\n\n  return jerry_create_boolean (true);\n} /* js_delay */\n\n/*\n * Init available js functions\n */\nstatic void\ninit_jerry ()\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Create an empty JS object */\n  jerry_value_t object = jerry_create_object ();\n\n  jerry_value_t func_obj;\n  jerry_value_t prop_name;\n\n  func_obj = jerry_create_external_function (set_led);\n  prop_name = jerry_create_string ((const jerry_char_t *) \"setLed\");\n  jerry_release_value (jerry_set_property (object, prop_name, func_obj));\n  jerry_release_value (prop_name);\n  jerry_release_value (func_obj);\n\n  func_obj = jerry_create_external_function (js_delay);\n  prop_name = jerry_create_string ((const jerry_char_t *) \"delay\");\n  jerry_release_value (jerry_set_property (object, prop_name, func_obj));\n  jerry_release_value (prop_name);\n  jerry_release_value (func_obj);\n\n  /* Wrap the JS object (not empty anymore) into a jerry api value */\n  jerry_value_t global_object = jerry_get_global_object ();\n\n  /* Add the JS object to the global context */\n  prop_name = jerry_create_string ((const jerry_char_t *) \"test\");\n  jerry_release_value (jerry_set_property (global_object, prop_name, object));\n  jerry_release_value (prop_name);\n  jerry_release_value (object);\n  jerry_release_value (global_object);\n} /* init_jerry */\n\n/**\n * Jerryscript simple test\n */\nstatic void\ntest_jerry ()\n{\n  const jerry_char_t script[] = \" \\\n    test.setLed(7, true); \\\n    test.delay(250); \\\n    test.setLed(7, false); \\\n    test.delay(250); \\\n  \";\n\n  jerry_value_t eval_ret = jerry_eval (script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  /* Free JavaScript value, returned by eval */\n  jerry_release_value (eval_ret);\n} /* test_jerry */\n\n/**\n * Setup code for particle firmware\n */\nvoid\nsetup ()\n{\n  Serial.begin (9600);\n  delay (2000);\n  Serial.println (\"Beginning Listening mode test!\");\n} /* setup */\n\n/**\n * Loop code for particle firmware\n */\nvoid\nloop ()\n{\n  init_jerry ();\n\n  /* Turn on and off the D7 LED */\n  test_jerry ();\n\n  jerry_cleanup ();\n} /* loop */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/riot-stm32f4/Makefile",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# application name\nAPPLICATION = riot_jerry\n\n# default BOARD enviroment\nBOARD ?= stm32f4discovery\n\n# LLVM/Clang-based toolchain\nTOOLCHAIN ?= llvm\n\n# path to the RIOT base directory\nRIOTBASE ?= $(CURDIR)/../RIOT\n# path to the JERRYSCRIPT directory\nJERRYDIR ?= $(CURDIR)\n\n# path to the application directory\nAPPDIR ?= $(JERRYDIR)/targets/riot-stm32f4/source\n\n# path to the binary directory\nBINDIR ?= $(JERRYDIR)/targets/riot-stm32f4/bin/\n\n# Change this to 0 show compiler invocation lines by default:\nQUIET ?= 1\n\nINCLUDES += -I$(JERRYDIR)/jerry-core/include -I$(JERRYDIR)/jerry-ext/include\n\n# Add the shell and some shell commands\nUSEMODULE += shell\nUSEMODULE += shell_commands\n\n# Add the jerry libs\nUSEMODULE += libjerry-core libjerry-port-default libjerry-ext\n\n\ninclude $(RIOTBASE)/Makefile.include\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/riot-stm32f4/Makefile.riot",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Build and output directories\nBUILD_DIR  ?= build/riotstm32f4\nCOPYTARGET ?= targets/riot-stm32f4/bin\n\n# JerryScript configuration\nJERRYHEAP  ?= 16\n\n# To be defined on the command line of make if Clang is available via a\n# different name (e.g., clang-N.M)\nCC ?= clang\n\n# Cross-compilation settings for Clang\nEXT_CFLAGS := -target arm-none-eabi\nEXT_CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4\nEXT_CFLAGS += -isystem /usr/arm-none-eabi/include\nEXT_CFLAGS += $(addprefix -isystem $(lastword $(sort $(wildcard /usr/lib/gcc/arm-none-eabi/*/))), include include-fixed)\nEXT_CFLAGS += -nostdinc\n\n# For ABI compatibility with RIOT-OS\nEXT_CFLAGS += -fshort-enums\n\n\n.PHONY: libjerry riot-jerry flash clean\n\nall: libjerry riot-jerry\n\nlibjerry:\n\tmkdir -p $(BUILD_DIR)\n\tcmake -B$(BUILD_DIR) -H./ \\\n\t -DCMAKE_SYSTEM_NAME=RIOT \\\n\t -DCMAKE_SYSTEM_PROCESSOR=armv7l \\\n\t -DCMAKE_C_COMPILER=$(CC) \\\n\t -DCMAKE_C_COMPILER_WORKS=TRUE \\\n\t -DENABLE_LTO=OFF \\\n\t -DJERRY_CMDLINE=OFF \\\n\t -DJERRY_PROFILE=\"es5.1\" \\\n\t -DEXTERNAL_COMPILE_FLAGS=\"$(EXT_CFLAGS)\" \\\n\t -DJERRY_GLOBAL_HEAP_SIZE=$(JERRYHEAP)\n\tmake -C$(BUILD_DIR) jerry-core jerry-port-default jerry-ext\n\n\tmkdir -p $(COPYTARGET)\n\tcp $(BUILD_DIR)/lib/libjerry-core.a $(COPYTARGET)\n\tcp $(BUILD_DIR)/lib/libjerry-port-default.a $(COPYTARGET)\n\tcp $(BUILD_DIR)/lib/libjerry-ext.a $(COPYTARGET)\n\nriot-jerry: libjerry\n\tmake -f ./targets/riot-stm32f4/Makefile\n\nflash: libjerry\n\tmake -f ./targets/riot-stm32f4/Makefile flash\n\nclean:\n\trm -rf $(COPYTARGET)\n\trm -rf $(BUILD_DIR)\n\tmake -f ./targets/riot-stm32f4/Makefile clean\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/riot-stm32f4/Makefile.travis",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# Default target for running the build test outside the Travis CI environment.\nall:\n\t$(MAKE) install\n\t$(MAKE) script\n\n\n## Targets for installing build dependencies of the RIOT JerryScript target.\n\n# Install cross-compiler via apt.\ninstall-apt-get-deps:\n\tsudo apt-get install -q -y clang gcc-arm-embedded gcc-multilib\n\n# Fetch RIOT OS repository.\ninstall-clone-riot:\n\tgit clone git://github.com/RIOT-OS/RIOT.git ../RIOT -b 2020.01\n\n# Perform all the necessary (JerryScript-independent) installation steps.\ninstall-noapt: install-clone-riot\ninstall: install-apt-get-deps install-noapt\n\n\n## Targets for building RIOT with JerryScript.\n\n# Build the firmware (RIOT with JerryScript).\nscript:\n\t$(MAKE) -f ./targets/riot-stm32f4/Makefile.riot\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/riot-stm32f4/README.md",
    "content": "### About\n\nThis folder contains files to run JerryScript on RIOT-OS with STM32F4-Discovery board.\n\n### How to build\n\n#### 1. Preface\n\n1, Directory structure\n\nAssume `harmony` as the path to the projects to build.\nThe folder tree related would look like this.\n\n```\nharmony\n  + jerryscript\n  |  + targets\n  |      + riot-stm32f4\n  + RIOT\n```\n\n2, Target board\n\nAssume [STM32F4-Discovery with BB](http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/LN1199/PF255417)\nas the target board.\n\n#### 2. Prepare RIOT-OS\n\nFollow [this](https://www.riot-os.org/#download) page to get the RIOT-OS source.\n\nFollow the [Inroduction](https://github.com/RIOT-OS/RIOT/wiki/Introduction) wiki site and also check that you can flash the stm32f4-board.\n\n\n#### 3. Build JerryScript for RIOT-OS\n\n```\n# assume you are in harmony folder\ncd jerryscript\nmake -f ./targets/riot-stm32f4/Makefile.riot\n```\n\nThis will generate the following libraries:\n```\n/build/bin/release.riotstm32f4/librelease.jerry-core.a\n/build/bin/release.riotstm32f4/librelease.jerry-math.lib.a\n```\n\nThis will copy one library files to `targets/riot-stm32f4/bin` folder:\n```\nlibjerrycore.a\n```\n\nThis will create a hex file in the `targets/riot-stm32f4/bin` folder:\n```\nriot_jerry.elf\n```\n\n#### 4. Flashing\n\n```\nmake -f ./targets/riot-stm32f4/Makefile.riot flash\n```\n\nFor how to flash the image with other alternative way can be found here:\n[Alternative way to flash](https://github.com/RIOT-OS/RIOT/wiki/Board:-STM32F4discovery#alternative-way-to-flash)\n\n#### 5. Cleaning\n\nTo clean the build result:\n```\nmake -f ./targets/riot-stm32f4/Makefile.riot clean\n```\n\n\n### 5. Running JerryScript Hello World! example\n\nYou may have to press `RESET` on the board after the flash.\n\nYou can use `minicom` for terminal program, and if the prompt shows like this:\n```\nmain(): This is RIOT! (Version: ****)\n                                     You are running RIOT on a(n) stm32f4discovery board.\n                                                                                         This board features a(n) stm32f4 MCU.\n```\nplease set `Add Carriage Ret` option by `CTRL-A` > `Z` > `U` at the console, if you're using `minicom`.\n\n\nHelp will provide a list of commands:\n```\n> help\n```\n\nThe `test` command will run the test example, which contains the following script code:\n```\nprint ('Hello, World!');\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/riot-stm32f4/source/main-riotos.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"shell.h\"\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n#include \"jerryscript-port.h\"\n\n/**\n * Standalone Jerry exit codes\n */\n#define JERRY_STANDALONE_EXIT_CODE_OK   (0)\n#define JERRY_STANDALONE_EXIT_CODE_FAIL (1)\n\n/**\n * Register a JavaScript function in the global object.\n */\nstatic void\nregister_js_function (const char *name_p, /**< name of the function */\n                      jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t result_val = jerryx_handler_register_global ((const jerry_char_t *) name_p, handler_p);\n\n  if (jerry_value_is_error (result_val))\n  {\n    printf (\"Warning: failed to register '%s' method.\", name_p);\n  }\n\n  jerry_release_value (result_val);\n} /* register_js_function */\n\n/**\n * Jerryscript simple test\n */\nint test_jerry (int argc, char **argv)\n{\n  /* Suppress compiler errors */\n  (void) argc;\n  (void) argv;\n\n  jerry_value_t ret_value = jerry_create_undefined ();\n\n  const jerry_char_t script[] = \"print ('Hello, World!');\";\n  printf (\"This test run the following script code: [%s]\\n\\n\", script);\n\n  /* Initialize engine */\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Register the print function in the global object. */\n  register_js_function (\"print\", jerryx_handler_print);\n\n  /* Setup Global scope code */\n  ret_value = jerry_parse (NULL, 0, script, sizeof (script) - 1, JERRY_PARSE_NO_OPTS);\n\n  if (!jerry_value_is_error (ret_value))\n  {\n    /* Execute the parsed source code in the Global scope */\n    ret_value = jerry_run (ret_value);\n  }\n\n  int ret_code = JERRY_STANDALONE_EXIT_CODE_OK;\n\n  if (jerry_value_is_error (ret_value))\n  {\n    printf (\"Script Error!\");\n\n    ret_code = JERRY_STANDALONE_EXIT_CODE_FAIL;\n  }\n\n  jerry_release_value (ret_value);\n\n  /* Cleanup engine */\n  jerry_cleanup ();\n\n  return ret_code;\n\n} /* test_jerry */\n\nconst shell_command_t shell_commands[] = {\n  { \"test\", \"Jerryscript Hello World test\", test_jerry },\n  { NULL, NULL, NULL }\n};\n\nint main (void)\n{\n  union { double d; unsigned u; } now = { .d = jerry_port_get_current_time () };\n  srand (now.u);\n  printf (\"You are running RIOT on a(n) %s board.\\n\", RIOT_BOARD);\n  printf (\"This board features a(n) %s MCU.\\n\", RIOT_MCU);\n\n  /* start the shell */\n  char line_buf[SHELL_DEFAULT_BUFSIZE];\n  shell_run (shell_commands, line_buf, SHELL_DEFAULT_BUFSIZE);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\ncmake_minimum_required(VERSION 3.8)\n\ninclude($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)\nproject(NONE)\n\ntarget_sources(app PRIVATE src/main-zephyr.c src/jerry-port.c src/getline-zephyr.c)\n\nadd_library(jerry-core STATIC IMPORTED)\nadd_library(jerry-ext STATIC IMPORTED)\nset_target_properties(jerry-core PROPERTIES IMPORTED_LOCATION\n                      ${CMAKE_CURRENT_BINARY_DIR}/../obj/lib/libjerry-core.a)\nset_target_properties(jerry-core PROPERTIES INTERFACE_INCLUDE_DIRECTORIES\n                      ${CMAKE_CURRENT_SOURCE_DIR}/../../jerry-core/include)\nset_target_properties(jerry-ext PROPERTIES IMPORTED_LOCATION\n                      ${CMAKE_CURRENT_BINARY_DIR}/../obj/lib/libjerry-ext.a)\nset_target_properties(jerry-ext PROPERTIES INTERFACE_INCLUDE_DIRECTORIES\n                      ${CMAKE_CURRENT_SOURCE_DIR}/../../jerry-ext/include)\ntarget_link_libraries(app PUBLIC jerry-core jerry-ext)\n\nzephyr_get_include_directories_for_lang_as_string(C includes)\nzephyr_get_system_include_directories_for_lang_as_string(C system_includes)\nzephyr_get_compile_definitions_for_lang_as_string(C definitions)\nzephyr_get_compile_options_for_lang_as_string(C options)\n\nadd_custom_target(\n  outputexports\n  COMMAND echo CC=\"${CMAKE_C_COMPILER}\"\n  COMMAND echo Z_CFLAGS=${system_includes} ${includes} ${definitions} ${options}\n  COMMAND echo NOSTDINC_FLAGS=${system_includes}\n  COMMAND echo ZEPHYRINCLUDE=${includes}\n  COMMAND echo KBUILD_CFLAGS=${definitions} ${options}\n  VERBATIM\n  USES_TERMINAL\n)\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/Makefile.travis",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# Default target for running the build test outside the Travis CI environment.\nall:\n\t$(MAKE) install\n\t$(MAKE) script\n\n\n## Targets for installing build dependencies of the Zephyr JerryScript target.\n\n# Install tools via apt.\ninstall-apt-get-deps:\n\tsudo apt-get install -q -y gperf dfu-util device-tree-compiler\n\n# Install Zephyr SDK.\ninstall-zephyr-sdk:\n\twget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.0/zephyr-sdk-0.10.0-setup.run -O ../zephyr-sdk-0.10.0-setup.run\n\tsh ../zephyr-sdk-0.10.0-setup.run -- -y -d $(CURDIR)/../zephyr-sdk-0.10.0\n\n# Fetch Zephyr Project repository and install python dependencies.\ninstall-zephyr:\n\tgit clone https://github.com/zephyrproject-rtos/zephyr.git ../zephyr -b v1.14-branch\n\tpip3 install -U pip\n\tpip3 install -U setuptools\n\tpip3 install -r ../zephyr/scripts/requirements.txt\n\n# Install recent CMake\ninstall-cmake:\n\tpip install cmake\n\tcmake --version\n\n# Perform all the necessary (JerryScript-independent) installation steps.\ninstall-noapt: install-zephyr-sdk install-zephyr install-cmake\ninstall: install-apt-get-deps install-noapt\n\n\n## Targets for building Zephyr with JerryScript.\n\n# Build the firmware (Zephyr with JerryScript).\nSHELL=bash\nscript:\n\texport ZEPHYR_TOOLCHAIN_VARIANT=zephyr && \\\n\texport ZEPHYR_SDK_INSTALL_DIR=$(CURDIR)/../zephyr-sdk-0.10.0 && \\\n\tsource ../zephyr/zephyr-env.sh && \\\n\t$(MAKE) -f ./targets/zephyr/Makefile.zephyr BOARD=arduino_101\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/Makefile.zephyr",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n.DEFAULT_GOAL := all\n\nifeq ($(.DEFAULT_GOAL),)\n  $(warning no default goal is set)\nendif\n\nBOARD ?= qemu_x86\nCONF_FILE = prj.conf\nexport BOARD\n\nTARGET_ZEPHYR ?= ./targets/zephyr\nTARGET_ZEPHYR_SRC_DIR = $(TARGET_ZEPHYR)/src\n\nCOMPONENTS  ?= jerry-core jerry-ext\nJERRYHEAP ?= 16\nJERRYPROFILE ?= minimal\n\n# Include functionality like regular expressions\n# check Jerry script documentation\n#\n# -cp\n# -cp_minimal\n# -cp_minimal-mem_stats\n# -mem_stats\n# -mem_stress_test\n\nifndef ZEPHYR_BASE\n$(error Missing Zephyr base, did you source zephyr-env.sh? )\nendif\n\nINTERM     = build/$(BOARD)/obj\nOUTPUT     = build/$(BOARD)/zephyr\n\ninclude $(OUTPUT)/Makefile.export\n\nEXT_CFLAGS := -fno-asynchronous-unwind-tables -fno-omit-frame-pointer\nEXT_CFLAGS += -fno-stack-protector -fno-strict-overflow -ffreestanding\nEXT_CFLAGS += -fno-reorder-functions -fno-defer-pop -fdata-sections\nEXT_CFLAGS += -ffunction-sections -fno-inline-functions\n\nEXT_CFLAGS += $(KBUILD_CFLAGS) $(NOSTDINC_FLAGS) $(subst -I,-isystem,$(ZEPHYRINCLUDE))\n\nEXT_CFLAGS += -Wall -Wno-format-zero-length -Wno-pointer-sign\nEXT_CFLAGS += -Werror=format -Werror=implicit-int -Wno-unused-but-set-variable\nEXT_CFLAGS += -Wno-main -Wno-strict-aliasing -Wno-old-style-declaration\nEXT_CFLAGS += -Wno-error=format=\nEXT_CFLAGS += -D_XOPEN_SOURCE=700\n\nEXT_CFLAGS += -Wno-error=conversion\n\nEXTERNAL_LIB = $(INTERM)/lib/libjerry-core.a $(INTERM)/lib/libjerry-ext.a\n\nLIBS = jerry-core jerry-ext\n\nBUILD_CONFIG = O=\"$(OUTPUT)\" V=$(V) USER_LIBS=\"$(LIBS)\" USER_LIB_INCLUDE_DIR=\"-L $(CURDIR)/$(INTERM)/lib\" TARGET_ZEPHYR=$(TARGET_ZEPHYR)\n\n.PHONY: all\nall: zephyr\n\n$(EXTERNAL_LIB):\nifdef V\n\t@echo \"- JERRY SCRIPT -------------------------------------------------\"\nendif\n\tmkdir -p $(INTERM)\n\tmkdir -p $(OUTPUT)\n\tcmake -B$(INTERM) -H./ \\\n\t -DCMAKE_SYSTEM_NAME=Zephyr \\\n\t -DCMAKE_C_COMPILER=\"$(subst ccache ,,$(CC))\" \\\n\t -DCMAKE_C_COMPILER_WORKS=TRUE \\\n\t -DENABLE_LTO=OFF \\\n\t -DJERRY_CMDLINE=OFF \\\n\t -DJERRY_PROFILE=$(JERRYPROFILE) \\\n\t -DJERRY_ERROR_MESSAGES=ON \\\n\t -DCMAKE_BUILD_TYPE=MinSizeRel \\\n\t -DCMAKE_VERBOSE_MAKEFILE=$(V) \\\n\t -DJERRY_GLOBAL_HEAP_SIZE=$(JERRYHEAP) \\\n\t -DEXTERNAL_COMPILE_FLAGS=\"$(EXT_CFLAGS)\" \\\n\t $(EXT_JERRY_FLAGS)\n\n\tmake -C $(INTERM) $(COMPONENTS) V=1\n\n$(OUTPUT)/Makefile.export: $(OUTPUT)/Makefile\n\tmake --no-print-directory -C $(OUTPUT) outputexports CMAKE_COMMAND=: >$@\n\n$(OUTPUT)/Makefile:\n\tmkdir -p $(OUTPUT) && cmake -DBOARD=$(BOARD) -DCONF_FILE=$(CONF_FILE) -B$(OUTPUT) -Htargets/zephyr/\n\nzephyr: jerry\nifdef V\n\t@echo \"- ZEPHYR -------------------------------------------------------\"\nendif\n\t+make -C $(OUTPUT)\n\t@echo \"Finished\"\n\t@size $(OUTPUT)/zephyr/zephyr.elf\n\njerry: $(EXTERNAL_LIB)\n\t@touch $(EXTERNAL_LIB)\n\nGENERIC_TARGETS = run qemugdb flash debug debugserver\nKCONFIG_TARGETS = \\\n\tinitconfig config nconfig menuconfig xconfig gconfig \\\n\toldconfig silentoldconfig defconfig savedefconfig \\\n\tallnoconfig allyesconfig alldefconfig randconfig \\\n\tlistnewconfig olddefconfig\nCLEAN_TARGETS = mrproper\n\n$(GENERIC_TARGETS): jerry\n$(CLEAN_TARGETS): clean\n\n$(GENERIC_TARGETS) $(KCONFIG_TARGETS) $(CLEAN_TARGETS):\nifdef V\n\t@echo \"- ZEPHYR -------------------------------------------------------\"\nendif\n\tmake -C $(OUTPUT) $@\n\ndfu-x86: all\n\t@- dfu-util -a x86_app -D build/$(BOARD)/zephyr/zephyr.bin; \\\n\tif [ $$? -eq 0 ] ; then echo \"\\nYour program will launch in 5 seconds.\" ; \\\n\telse echo \"\\nProgram didn't flash, try pressing the reset buttons \\nand wait a second for the bootloader to load, \\nor flash again the factory bootloader.\"; fi\n\nusage:\nhelp:\n\t@echo Usage:\n\t@echo showconfig\t Show parameters and configuration\n\t@echo flash\t         Flash into board\n\t@echo all\t         Compile jerryscript and zephyr\n\nshowconfig:\n\t@echo \"- CONFIGURATION ------------------------------------------------\"\n\t@echo \"INTERM           = $(INTERM)\"\n\t@echo \"OUTPUT           = $(OUTPUT)\"\n\t@echo \"CC               = $(CC) \"\n\t@echo \"BOARD            = $(ZEPHYR_BASE)/boards/$(BOARD)/Makefile.board \"\n\t@echo \"TOOLCHAIN        = $(ZEPHYR_BASE)/scripts/Makefile.toolchain.$(ZEPHYR_GCC_VARIANT) \"\n\t@echo \"TOOLCHAIN_CFLAGS = $(TOOLCHAIN_CFLAGS) \"\n\t@echo \"CROSS_COMPILE    = $(CROSS_COMPILE) \"\n\t@echo \"TOOLCHAIN_LIBS   = $(TOOLCHAIN_LIBS) \"\n\t@echo \"LIBS             = $(LIBS) \"\n\t@echo \"BUILD_CONFIG     = $(BUILD_CONFIG) \"\n\tmake -f $(TARGET_ZEPHYR)/Makefile $(BUILD_CONFIG) showconfig\n\nclean:\nifdef V\n\t@echo \"- CLEANING JERRY SCRIPT ----------------------------------------\"\nendif\n\trm -rf $(INTERM) $(TARGET_ZEPHYR_SRC_DIR)/*.o\nifdef V\n\t@echo \"- CLEANING ZEPHYR ----------------------------------------------\"\nendif\n\tmake -f $(TARGET_ZEPHYR)/Makefile $(BUILD_CONFIG) clean\n\npristine: clean\nifdef V\n\t@echo \"- CLEANING BUILD DIRECTORY -------------------------------------\"\nendif\n\trm -rf build/\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/README.md",
    "content": "### About\n\nThis folder contains files to integrate JerryScript with Zephyr RTOS to\nrun on a number of supported boards (like\n[Arduino 101 / Genuino 101](https://www.arduino.cc/en/Main/ArduinoBoard101),\n[Zephyr Arduino 101](https://www.zephyrproject.org/doc/board/arduino_101.html)).\n\n### How to build\n\n#### 1. Preface\n\n1. Directory structure\n\nAssume `harmony` as the path to the projects to build.\nThe folder tree related would look like this.\n\n```\nharmony\n  + jerryscript\n  |  + targets\n  |      + zephyr\n  + zephyr-project\n```\n\n\n2. Target boards/emulations\n\nFollowing Zephyr boards were tested: qemu_x86, qemu_cortex_m3, arduino_101,\nfrdm_k64f.\n\n\n#### 2. Prepare Zephyr\n\nFollow [this](https://www.zephyrproject.org/doc/getting_started/getting_started.html) page to get\nthe Zephyr source and configure the environment.\n\nIf you just start with Zephyr, you may want to follow \"Building a Sample\nApplication\" section in the doc above and check that you can flash your\ntarget board.\n\nRemember to source the Zephyr environment as explained in the zephyr documenation:\n\n```\ncd zephyr-project\nsource zephyr-env.sh\n\nexport ZEPHYR_GCC_VARIANT=zephyr\nexport ZEPHYR_SDK_INSTALL_DIR=<sdk installation directory>\n```\n\n#### 3. Build JerryScript for Zephyr\n\nThe easiest way is to build and run on a QEMU emulator:\n\nFor x86 architecture:\n\n```\nmake -f ./targets/zephyr/Makefile.zephyr BOARD=qemu_x86 run\n```\n\nFor ARM (Cortex-M) architecture:\n\n```\nmake -f ./targets/zephyr/Makefile.zephyr BOARD=qemu_cortex_m3 run\n```\n\n#### 4. Build for Arduino 101\n\n```\n# assume you are in harmony folder\ncd jerryscript\nmake -f ./targets/zephyr/Makefile.zephyr BOARD=arduino_101\n```\n\nThis will generate the following libraries:\n```\n./build/arduino_101/librelease-cp_minimal.jerry-core.a\n./build/arduino_101/librelease-cp_minimal.jerry-math.lib.a\n./build/arduino_101/librelease.external-cp_minimal-entry.a\n```\n\nThe final Zephyr image will be located here:\n```\n./build/arduino_101/zephyr/zephyr.strip\n```\n\n#### 5. Flashing\n\nDetails on how to flash the image can be found here:\n[Flashing image](https://www.zephyrproject.org/doc/board/arduino_101.html)\n(or similar page for other supported boards).\n\nTo be able to use this demo in hardware you will need the serial console\nwhich will be generating output to Pins 0 & 1.\n\nYou will need a 3.3v TTL to RS232, please follow the zephyr documentation on it.\n\nSome examples of building the software\n\n```\nmake -f ./targets/zephyr/Makefile.zephyr BOARD=<board> clean\n```\n\n- Not using a Jtag and having a factory stock Arduino 101.\nYou can follow the Zephyr instructions to flash using the dfu-util command\nor use this helper:\n\n```\nmake -f ./targets/zephyr/Makefile.zephyr BOARD=arduino_101 dfu-x86\n```\n\nMake sure you have the factory bootloader in your device to use this method or it will not flash.\n\n- Using JTAG\n\nThere is a helper function to flash using the JTAG and Flywatter2\n\n![alt tag](docs/arduino_101.jpg?raw=true \"Example\")\n\n```\nmake -f ./targets/zephyr/Makefile.zephyr BOARD=arduino_101 flash\n```\n\n<warning> Careful if you flash the BOARD arduino_101, you will lose the bootloader\nand you will have to follow the zephyr documentation to get it back from\nthe backup we all know you did at the setup. </warning>\n\n#### 6. Serial terminal\n\nTest command line in a serial terminal.\n\n\nYou should see something similar to this:\n```\nJerryScript build: Aug 12 2016 17:12:55\nJerryScript API 1.0\nZephyr version 1.4.0\njs>\n```\n\n\nRun the example javascript command test function\n```\njs> var test=0; for (t=100; t<1000; t++) test+=t; print ('Hi JS World! '+test);\nHi JS World! 494550\n```\n\n\nTry a more complex function:\n```\njs> function hello(t) {t=t*10;return t}; print(\"result\"+hello(10.5));\n```\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/prj.conf",
    "content": "CONFIG_BUILD_OUTPUT_BIN=y\nCONFIG_STDOUT_CONSOLE=y\nCONFIG_NEWLIB_LIBC=y\nCONFIG_FLOAT=y\nCONFIG_MAIN_STACK_SIZE=2048\nCONFIG_CONSOLE_HANDLER=y\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/src/Makefile",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n#     http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nifdef V\n$(info Compiling application)\nendif\n\n# Adding path for jerry script APIs\nZEPHYRINCLUDE += $(JERRY_INCLUDE)\n\nobj-y += main-zephyr.o getline-zephyr.o jerry-port.o\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/src/getline-zephyr.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <zephyr.h>\n#include <uart.h>\n#include <drivers/console/console.h>\n#include <drivers/console/uart_console.h>\n#include \"getline-zephyr.h\"\n\n/* While app processes one input line, Zephyr will have another line\n   buffer to accumulate more console input. */\nstatic struct console_input line_bufs[2];\n\nstatic struct k_fifo free_queue;\nstatic struct k_fifo used_queue;\n\nchar *zephyr_getline(void)\n{\n  static struct console_input *cmd;\n\n  /* Recycle cmd buffer returned previous time */\n  if (cmd != NULL)\n  {\n    k_fifo_put(&free_queue, cmd);\n  }\n\n  cmd = k_fifo_get(&used_queue, K_FOREVER);\n  return cmd->line;\n}\n\nvoid zephyr_getline_init(void)\n{\n  int i;\n\n  k_fifo_init(&used_queue);\n  k_fifo_init(&free_queue);\n  for (i = 0; i < sizeof(line_bufs) / sizeof(*line_bufs); i++)\n  {\n    k_fifo_put(&free_queue, &line_bufs[i]);\n  }\n\n  /* Zephyr UART handler takes an empty buffer from free_queue,\n     stores UART input in it until EOL, and then puts it into\n     used_queue. */\n  uart_register_input(&free_queue, &used_queue, NULL);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/src/getline-zephyr.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvoid zephyr_getline_init(void);\nchar *zephyr_getline(void);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/src/jerry-port.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdarg.h>\n\n#include <zephyr.h>\n\n#include \"jerryscript-port.h\"\n\n\n/**\n * Provide log message implementation for the engine.\n */\nvoid\njerry_port_log (jerry_log_level_t level, /**< log level */\n                const char *format, /**< format string */\n                ...)  /**< parameters */\n{\n  (void) level; /* ignore log level */\n\n  va_list args;\n  va_start (args, format);\n  vfprintf (stderr, format, args);\n  va_end (args);\n} /* jerry_port_log */\n\n\n/**\n * Provide fatal message implementation for the engine.\n */\nvoid jerry_port_fatal (jerry_fatal_code_t code)\n{\n  jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Jerry Fatal Error!\\n\");\n  while (true);\n} /* jerry_port_fatal */\n\n/**\n * Implementation of jerry_port_get_current_time.\n *\n * @return current timer's counter value in milliseconds\n */\ndouble\njerry_port_get_current_time (void)\n{\n  int64_t ms = k_uptime_get();\n  return (double) ms;\n} /* jerry_port_get_current_time */\n\n/**\n * Dummy function to get the time zone adjustment.\n *\n * @return 0\n */\ndouble\njerry_port_get_local_time_zone_adjustment (double unix_ms, bool is_utc)\n{\n  /* We live in UTC. */\n  return 0;\n} /* jerry_port_get_local_time_zone_adjustment */\n\n/**\n * Provide the implementation of jerry_port_print_char.\n * Uses 'printf' to print a single character to standard output.\n */\nvoid\njerry_port_print_char (char c) /**< the character to print */\n{\n  printf (\"%c\", c);\n} /* jerry_port_print_char */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/targets/zephyr/src/main-zephyr.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include <zephyr.h>\n#include <misc/printk.h>\n#include \"getline-zephyr.h\"\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-ext/handler.h\"\n\nstatic jerry_value_t print_function;\n\n/**\n * Register a JavaScript function in the global object.\n */\nstatic void\nregister_js_function (const char *name_p, /**< name of the function */\n                      jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t result_val = jerryx_handler_register_global ((const jerry_char_t *) name_p, handler_p);\n\n  if (jerry_value_is_error (result_val))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_WARNING, \"Warning: failed to register '%s' method.\", name_p);\n  }\n\n  jerry_release_value (result_val);\n} /* register_js_function */\n\nstatic int shell_cmd_handler (char *source_buffer)\n{\n  jerry_value_t ret_val;\n\n  ret_val = jerry_eval ((jerry_char_t *) source_buffer,\n    strlen (source_buffer),\n    JERRY_PARSE_NO_OPTS);\n\n  if (jerry_value_is_error (ret_val))\n  {\n    /* User-friendly error messages require at least \"cp\" JerryScript\n       profile. Include a message prefix in case \"cp_minimal\" profile\n       is used. */\n    printf (\"Error executing statement: \");\n    /* Clear error flag, otherwise print call below won't produce any\n       output. */\n    ret_val = jerry_get_value_from_error (ret_val, true);\n  }\n\n  if (!jerry_value_is_error (print_function))\n  {\n    jerry_value_t ret_val_print = jerry_call_function (print_function,\n      jerry_create_undefined (),\n      &ret_val,\n      1);\n    jerry_release_value (ret_val_print);\n  }\n\n  jerry_release_value (ret_val);\n\n  return 0;\n} /* shell_cmd_handler */\n\nvoid main (void)\n{\n  union { double d; unsigned u; } now = { .d = jerry_port_get_current_time () };\n  srand (now.u);\n  uint32_t zephyr_ver = sys_kernel_version_get ();\n  printf (\"JerryScript build: \" __DATE__ \" \" __TIME__ \"\\n\");\n  printf (\"JerryScript API %d.%d.%d\\n\", JERRY_API_MAJOR_VERSION, JERRY_API_MINOR_VERSION, JERRY_API_PATCH_VERSION);\n  printf (\"Zephyr version %d.%d.%d\\n\", (int)SYS_KERNEL_VER_MAJOR (zephyr_ver),\n    (int)SYS_KERNEL_VER_MINOR (zephyr_ver),\n    (int)SYS_KERNEL_VER_PATCHLEVEL (zephyr_ver));\n\n  zephyr_getline_init ();\n  jerry_init (JERRY_INIT_EMPTY);\n  register_js_function (\"print\", jerryx_handler_print);\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  jerry_value_t print_func_name_val = jerry_create_string ((jerry_char_t *) \"print\");\n  print_function = jerry_get_property (global_obj_val, print_func_name_val);\n  jerry_release_value (print_func_name_val);\n  jerry_release_value (global_obj_val);\n  if (jerry_value_is_error (print_function))\n  {\n    printf (\"Error: could not look up print function, expression results won't be printed\\n\");\n  }\n\n  while (1)\n  {\n    char *s;\n    printf(\"js> \");\n    fflush(stdout);\n    s = zephyr_getline ();\n    if (*s)\n    {\n      shell_cmd_handler (s);\n    }\n  }\n\n  /* As we never retturn from REPL above, don't call jerry_cleanup() here. */\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/.gitattributes",
    "content": "*.js text eol=lf\njerry/windows-line-ending.js text eol=crlf\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/benchmarks/jerry/fill-array-with-numbers-3-times-5000-elements.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor (i = 0; i < 3; i++)\n{\n  a = [];\n\n  for (j = 0; j < 5000; j++)\n  {\n    a[j] = j;\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/benchmarks/jerry/function_loop.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar x = 7;\nvar y = 3;\nvar count = 1000000;\n\nfunction cse_opt(x, y)\n{\n    var tmp1 = x * x;\n    var tmp2 = y * y;\n    var tmp3 = tmp1 * tmp1;\n    var tmp4 = tmp2 * tmp2;\n    \n    for (var i = 0; i < count; i++) {\n        var cached1 = tmp3 * x\n        var cached2 = tmp4 * y;\n        var cached_n_cached = cached1 + cached2;\n        var ret_val = cached_n_cached + cached_n_cached;\n    }\n    \n    return ret_val + ret_val;\n};\n\ncse_opt(x, y);"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/benchmarks/jerry/gc.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f (o, i) {\n  if (--i > 0) {\n    f ({a:o, b:o}, i);\n  }\n}\n\nfor (var i = 0; i < 100; i++)\n{\n  ({} + f ({}, 12));\n}\n\nfor(var i = 0; i < 100; i++)\n{\n  var obj = {}, obj_l;\n  obj_l = obj;\n\n  for (var k = 0; k < 1500; k++)\n  {\n    obj_l.prop = {};\n    obj_l = obj_l.prop;\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/benchmarks/jerry/loop_arithmetics_10kk.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar count = 10000000;\nvar x = 7;\nvar y = 3;\n\nvar tmp1;\nvar tmp2;\nvar tmp3;\nvar tmp4;\n\nfor (var i = 0; i < count; i++)\n{\n  tmp1 = x * x;\n  tmp2 = y * y;\n  tmp3 = tmp1 * tmp1;\n  tmp4 = tmp2 * tmp2;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/benchmarks/jerry/loop_arithmetics_1kk.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar count = 1000000;\nvar x = 7;\nvar y = 3;\n\nvar tmp1;\nvar tmp2;\nvar tmp3;\nvar tmp4;\n\nfor (var i = 0; i < count; i++)\n{\n  tmp1 = x * x;\n  tmp2 = y * y;\n  tmp3 = tmp1 * tmp1;\n  tmp4 = tmp2 * tmp2;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/client_source.cmd",
    "content": "s\ns\ns\ncontinue\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/client_source.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/client_source.js:15\n(jerry-debugger) s\nout: client-source-test\nStopped at tests/debugger/client_source.js:40\n(jerry-debugger) s\nStopped at tests/debugger/client_source.js:35 (in test() at line:33, col:1)\n(jerry-debugger) s\nout: function test\nStopped at tests/debugger/client_source.js:36 (in test() at line:33, col:1)\n(jerry-debugger) continue\nout: function foo\nout: function bar\nout: function finish\nout: finish: test-foo-bar\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/client_source.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"client-source-test\");\n\nfunction finish(z) {\n  print(\"function finish\");\n  print(\"finish: \" + z);\n}\n\nfunction bar(y) {\n  print(\"function bar\");\n  finish(y + \"-bar\");\n}\n\nfunction foo(x)\n{\n  print(\"function foo\");\n  bar(x + \"-foo\");\n}\n\nfunction test()\n{\n  print(\"function test\");\n  var x = \"test\";\n  foo(x);\n}\n\ntest();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/client_source_multiple.cmd",
    "content": "n\nn\ns\ns\ns\ns\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/client_source_multiple.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/client_source_multiple_2.js:15\n(jerry-debugger) n\nout: multiple-client-source-test-file-2\nStopped at tests/debugger/client_source_multiple_1.js:15\n(jerry-debugger) n\nout: multiple-client-source-test-file-1\nStopped at tests/debugger/client_source_multiple_1.js:27\n(jerry-debugger) s\nStopped at tests/debugger/client_source_multiple_1.js:18 (in foo() at line:17, col:1)\n(jerry-debugger) s\nout: foo\nStopped at tests/debugger/client_source_multiple_1.js:19 (in foo() at line:17, col:1)\n(jerry-debugger) s\nStopped at tests/debugger/client_source_multiple_2.js:18 (in bar() at line:17, col:1)\n(jerry-debugger) s\nout: bar\nStopped at tests/debugger/client_source_multiple_2.js:19 (in bar() at line:17, col:1)\n(jerry-debugger) c\nout: str-argument: called-from-test-file-1\nout: crossFoo\nout: str-argument: called-from-test-file-2\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/client_source_multiple_1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"multiple-client-source-test-file-1\");\n\nfunction foo() {\n  print(\"foo\");\n  bar(\"called-from-test-file-1\");\n}\n\nfunction crossFoo(str) {\n  print(\"crossFoo\");\n  print(\"str-argument: \" + str);\n}\n\nfoo();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/client_source_multiple_2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"multiple-client-source-test-file-2\");\n\nfunction bar(str) {\n  print(\"bar\");\n  print(\"str-argument: \" + str);\n  crossFoo(\"called-from-test-file-2\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_abort.cmd",
    "content": "s\ns\ns\ns\nabort new Error('Fatal error :)')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_abort.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_abort.js:24\n(jerry-debugger) s\nStopped at tests/debugger/do_abort.js:25\n(jerry-debugger) s\nStopped at tests/debugger/do_abort.js:26\n(jerry-debugger) s\nStopped at tests/debugger/do_abort.js:20 (in g() at line:19, col:1)\n(jerry-debugger) s\nStopped at tests/debugger/do_abort.js:16 (in f() at line:15, col:1)\n(jerry-debugger) abort new Error('Fatal error :)')\nerr: Error: Fatal error :)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_abort.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() {\n  return 32;\n}\n\nfunction g() {\n  f();\n}\n\n// In regular JS, it is not possible to escape from this loop\nwhile (true) {\n  try {\n    g();\n  } catch (e) {\n    var s = \"Don't stop here\";\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_backtrace.cmd",
    "content": "next\nn\nnext\nstep\nnext\ns\nbt 1 2 t\nbt 1 2\nbt 0 3 t\nbt\nbt 2\nbt 2 t\nn\nn\ns\nbacktrace\nbt 4 4\nbt 600 919\nbt 3 500\nbt 42\nbt 4 3\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_backtrace.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_backtrace.js:15\n(jerry-debugger) next\nout: backtrace-test\nStopped at tests/debugger/do_backtrace.js:28\n(jerry-debugger) n\nStopped at tests/debugger/do_backtrace.js:37\n(jerry-debugger) next\nStopped at tests/debugger/do_backtrace.js:40\n(jerry-debugger) step\nStopped at tests/debugger/do_backtrace.js:32 (in test() at line:30, col:1)\n(jerry-debugger) next\nout: function test\nStopped at tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)\n(jerry-debugger) s\nStopped at tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)\n(jerry-debugger) bt 1 2 t\nTotal number of frames: 3\nFrame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)\n(jerry-debugger) bt 1 2\nFrame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)\n(jerry-debugger) bt 0 3 t\nTotal number of frames: 3\nFrame 0: tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)\nFrame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)\nFrame 2: tests/debugger/do_backtrace.js:40\n(jerry-debugger) bt\nFrame 0: tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)\nFrame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)\nFrame 2: tests/debugger/do_backtrace.js:40\n(jerry-debugger) bt 2\nFrame 0: tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)\nFrame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)\n(jerry-debugger) bt 2 t\nTotal number of frames: 3\nFrame 0: tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)\nFrame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)\n(jerry-debugger) n\nout: function foo\nStopped at tests/debugger/do_backtrace.js:24 (in foo() at line:21, col:1)\n(jerry-debugger) n\nStopped at tests/debugger/do_backtrace.js:25 (in foo() at line:21, col:1)\n(jerry-debugger) s\nStopped at tests/debugger/do_backtrace.js:18 (in f4() at line:17, col:1)\n(jerry-debugger) backtrace\nFrame 0: tests/debugger/do_backtrace.js:18 (in f4() at line:17, col:1)\nFrame 1: tests/debugger/do_backtrace.js:25 (in foo() at line:21, col:1)\nFrame 2: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)\nFrame 3: tests/debugger/do_backtrace.js:40\n(jerry-debugger) bt 4 4\n(jerry-debugger) bt 600 919\n(jerry-debugger) bt 3 500\nFrame 3: tests/debugger/do_backtrace.js:40\n(jerry-debugger) bt 42\nFrame 0: tests/debugger/do_backtrace.js:18 (in f4() at line:17, col:1)\nFrame 1: tests/debugger/do_backtrace.js:25 (in foo() at line:21, col:1)\nFrame 2: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)\nFrame 3: tests/debugger/do_backtrace.js:40\n(jerry-debugger) bt 4 3\nError: Start depth needs to be lower than or equal to max depth\n(jerry-debugger) c\nout: function f4\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_backtrace.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"backtrace-test\");\n\nfunction f4() {\n\tprint(\"function f4\");\n}\n\nfunction foo()\n{\n  print(\"function foo\");\n  var tmp = 4;\n  f4();\n}\n\nvar cat = 'cat';\n\nfunction test()\n{\n\tprint(\"function test\");\n\tfoo();\n}\n\nvar\n\tx =\n\t  1;\n\ntest();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_break.cmd",
    "content": "break do_break.js:51\nb do_break.js:36\nbreak f\nlist\nc\ndelete 1\nlist\nc\ncontinue\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_break.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_break.js:15\n(jerry-debugger) break do_break.js:51\nBreakpoint 1 at tests/debugger/do_break.js:51\n(jerry-debugger) b do_break.js:36\nBreakpoint 2 at tests/debugger/do_break.js:36 (in test() at line:20, col:1)\n(jerry-debugger) break f\nBreakpoint 3 at tests/debugger/do_break.js:33 (in f() at line:31, col:3)\nBreakpoint 4 at tests/debugger/do_break.js:45 (in f() at line:43, col:1)\n(jerry-debugger) list\n=== Active breakpoints  ===\n 1: tests/debugger/do_break.js:51\n 2: tests/debugger/do_break.js:36 (in test() at line:20, col:1)\n 3: tests/debugger/do_break.js:33 (in f() at line:31, col:3)\n 4: tests/debugger/do_break.js:45 (in f() at line:43, col:1)\n(jerry-debugger) c\nout: break test\nout: var cat\nStopped at breakpoint:1 tests/debugger/do_break.js:51\n(jerry-debugger) delete 1\nBreakpoint 1 deleted\n(jerry-debugger) list\n=== Active breakpoints  ===\n 2: tests/debugger/do_break.js:36 (in test() at line:20, col:1)\n 3: tests/debugger/do_break.js:33 (in f() at line:31, col:3)\n 4: tests/debugger/do_break.js:45 (in f() at line:43, col:1)\n(jerry-debugger) c\nStopped at breakpoint:2 tests/debugger/do_break.js:36 (in test() at line:20, col:1)\n(jerry-debugger) continue\nout: function test\nStopped at breakpoint:3 tests/debugger/do_break.js:33 (in f() at line:31, col:3)\n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_break.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"break test\");\n\nprint (\"var cat\");\nvar cat = 'cat';\n\nfunction test(x)\n{\n  function f() {\n    return 0;\n  }\n\n  function f() {\n    /* Again. */\n    return 1;\n  }\n\n  function f() {\n    /* And again. */\n    return 2;\n  }\n\n  print(\"function test\");\n  var a = 3;\n  var b = 5, c = a + b;\n  global_var = f();\n  return c;\n}\n\nfunction f() {\n  /* And again. */\n}\n\nvar\n  x =\n    1;\n\ntest(x);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_continue.cmd",
    "content": "continue\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_continue.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_continue.js:16\n(jerry-debugger) continue\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_continue.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Empty file. */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_delete.cmd",
    "content": "next\nb do_delete.js:17\nb do_delete.js:21\ny\nb do_delete.js:19\nb do_delete.js:18\nlist\ndelete 2\ndelete 3\nlist\nc\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_delete.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_delete.js:15\n(jerry-debugger) next\nout: delete tests\nStopped at tests/debugger/do_delete.js:17\n(jerry-debugger) b do_delete.js:17\nBreakpoint 1 at tests/debugger/do_delete.js:17\n(jerry-debugger) b do_delete.js:21\nNo breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 2 at do_delete.js:21\n(jerry-debugger) b do_delete.js:19\nBreakpoint 3 at tests/debugger/do_delete.js:19\n(jerry-debugger) b do_delete.js:18\nBreakpoint 4 at tests/debugger/do_delete.js:18\n(jerry-debugger) list\n=== Active breakpoints  ===\n 1: tests/debugger/do_delete.js:17\n 3: tests/debugger/do_delete.js:19\n 4: tests/debugger/do_delete.js:18\n=== Pending breakpoints ===\n 2: do_delete.js:21 (pending)\n(jerry-debugger) delete 2\nPending breakpoint 2 deleted\n(jerry-debugger) delete 3\nBreakpoint 3 deleted\n(jerry-debugger) list\n=== Active breakpoints  ===\n 1: tests/debugger/do_delete.js:17\n 4: tests/debugger/do_delete.js:18\n(jerry-debugger) c\nStopped at breakpoint:4 tests/debugger/do_delete.js:18\n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_delete.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"delete tests\");\n\nvar x = 10;\nvar y = 10;\nvar pi = 3.14;\n\nfunction delete_test(x,y) {\n\tvar sum = x + y;\n\treturn\n}\n\ndelete_test(x, y);\n\nvar z = 0;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_delete_all.cmd",
    "content": "break do_delete_all.js:17\nb do_delete_all.js:18\nb do_delete_all.js:21\nb do_delete_all:350\ny\nb do_delete_all:37\ny\nlist\ndelete all\nnext\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_delete_all.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_delete_all.js:15\n(jerry-debugger) break do_delete_all.js:17\nBreakpoint 1 at tests/debugger/do_delete_all.js:17\n(jerry-debugger) b do_delete_all.js:18\nBreakpoint 2 at tests/debugger/do_delete_all.js:18\n(jerry-debugger) b do_delete_all.js:21\nBreakpoint 3 at tests/debugger/do_delete_all.js:21 (in delete_test() at line:20, col:1)\n(jerry-debugger) b do_delete_all:350\nNo breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 4 at do_delete_all:350\n(jerry-debugger) b do_delete_all:37\nNo breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 5 at do_delete_all:37\n(jerry-debugger) list\n=== Active breakpoints  ===\n 1: tests/debugger/do_delete_all.js:17\n 2: tests/debugger/do_delete_all.js:18\n 3: tests/debugger/do_delete_all.js:21 (in delete_test() at line:20, col:1)\n=== Pending breakpoints ===\n 4: do_delete_all:350 (pending)\n 5: do_delete_all:37 (pending)\n(jerry-debugger) delete all\n(jerry-debugger) next\nStopped at tests/debugger/do_delete_all.js:16\n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_delete_all.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = \"Delete all breakpoints\";\nvar patt = new RegExp(\"e\");\nvar res = patt.test(str);\nvar pi = Math.PI;\n\nfunction delete_test(x,y) {\n\tvar sum = x + y;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_display.cmd",
    "content": "b a\nb b\nb c\nb d\ndisplay\nc\ndisplay 2\nc\ndisplay 5435\nc\ndisplay 0\nc\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_display.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_display.js:20\n(jerry-debugger) b a\nBreakpoint 1 at tests/debugger/do_display.js:15 (in a() at line:15, col:1)\n(jerry-debugger) b b\nBreakpoint 2 at tests/debugger/do_display.js:16 (in b() at line:16, col:1)\n(jerry-debugger) b c\nBreakpoint 3 at tests/debugger/do_display.js:17 (in c() at line:17, col:1)\n(jerry-debugger) b d\nBreakpoint 4 at tests/debugger/do_display.js:18 (in d() at line:18, col:1)\n(jerry-debugger) display\nNon-negative integer number expected, 0 turns off this function\n(jerry-debugger) c\nStopped at breakpoint:1 tests/debugger/do_display.js:15 (in a() at line:15, col:1)\n(jerry-debugger) display 2\n(jerry-debugger) c\nout: hi\nStopped at breakpoint:2 tests/debugger/do_display.js:16 (in b() at line:16, col:1)\nSource: tests/debugger/do_display.js\n  15   function a() { print(\"hi\"); }\n  16 > function b() { print(\"welcome\"); }\n  17   function c() { print(\"hello\"); }\n(jerry-debugger) display 5435\n(jerry-debugger) c\nout: welcome\nStopped at breakpoint:3 tests/debugger/do_display.js:17 (in c() at line:17, col:1)\nSource: tests/debugger/do_display.js\n   1   // Copyright JS Foundation and other contributors, http://js.foundation\n   2   //\n   3   // Licensed under the Apache License, Version 2.0 (the \"License\");\n   4   // you may not use this file except in compliance with the License.\n   5   // You may obtain a copy of the License at\n   6   //\n   7   //     http://www.apache.org/licenses/LICENSE-2.0\n   8   //\n   9   // Unless required by applicable law or agreed to in writing, software\n  10   // distributed under the License is distributed on an \"AS IS\" BASIS\n  11   // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  12   // See the License for the specific language governing permissions and\n  13   // limitations under the License.\n  14   \n  15   function a() { print(\"hi\"); }\n  16   function b() { print(\"welcome\"); }\n  17 > function c() { print(\"hello\"); }\n  18   function d() { print(\"goodbye\"); }\n  19   \n  20   a();\n  21   b();\n  22   c();\n  23   d();\n(jerry-debugger) display 0\n(jerry-debugger) c\nout: hello\nStopped at breakpoint:4 tests/debugger/do_display.js:18 (in d() at line:18, col:1)\n(jerry-debugger) c\nout: goodbye\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_display.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction a() { print(\"hi\"); }\nfunction b() { print(\"welcome\"); }\nfunction c() { print(\"hello\"); }\nfunction d() { print(\"goodbye\"); }\n\na();\nb();\nc();\nd();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_eval.cmd",
    "content": "e a\nn\neval a\nbreak f\nn\np b\nnext\nprint b\ne \"1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 XXX 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 YYY 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 ZZZ \" + 123\ne b = 8\nn\ne a\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_eval.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_eval.js:15\n(jerry-debugger) e a\nundefined\n(jerry-debugger) n\nStopped at tests/debugger/do_eval.js:23\n(jerry-debugger) eval a\n5\n(jerry-debugger) break f\nBreakpoint 1 at tests/debugger/do_eval.js:19 (in f() at line:17, col:1)\n(jerry-debugger) n\nStopped at breakpoint:1 tests/debugger/do_eval.js:19 (in f() at line:17, col:1)\n(jerry-debugger) p b\nundefined\n(jerry-debugger) next\nStopped at tests/debugger/do_eval.js:20 (in f() at line:17, col:1)\n(jerry-debugger) print b\n6\n(jerry-debugger) e \"1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 XXX 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 YYY 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 ZZZ \" + 123\n1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 XXX 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 YYY 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 ZZZ 123\n(jerry-debugger) e b = 8\n8\n(jerry-debugger) n\nStopped at tests/debugger/do_eval.js:24\n(jerry-debugger) e a\n11.3\n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_eval.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = 5;\n\nfunction f(a)\n{\n  var b = 6;\n  return a + b;\n}\n\na = f(3.3);\nnull;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_eval_at.cmd",
    "content": "eval_at 0\neval_at 0 b\nn\neval_at 0 b\nb do_eval_at.js:20\nn\nscope\neval_at 0 b\neval_at 1 b\neval_at 0 b=20\neval_at 1 b=100\nn\neval_at 0 a\nscope\neval_at 0 b\neval_at -1 b\neval_at 65536 b\neval_at b\neval_at 200\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_eval_at.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_eval_at.js:15\n(jerry-debugger) eval_at 0\nundefined\n(jerry-debugger) eval_at 0 b\nundefined\n(jerry-debugger) n\nStopped at tests/debugger/do_eval_at.js:23\n(jerry-debugger) eval_at 0 b\n2\n(jerry-debugger) b do_eval_at.js:20\nBreakpoint 1 at tests/debugger/do_eval_at.js:20 (in f() at line:17, col:1)\n(jerry-debugger) n\nStopped at breakpoint:1 tests/debugger/do_eval_at.js:20 (in f() at line:17, col:1)\n(jerry-debugger) scope\nlevel | type   \n0     | local  \n1     | global \n(jerry-debugger) eval_at 0 b\n6\n(jerry-debugger) eval_at 1 b\n2\n(jerry-debugger) eval_at 0 b=20\n20\n(jerry-debugger) eval_at 1 b=100\n100\n(jerry-debugger) n\nStopped at tests/debugger/do_eval_at.js:25\n(jerry-debugger) eval_at 0 a\n23\n(jerry-debugger) scope\nlevel | type   \n0     | global \n(jerry-debugger) eval_at 0 b\n100\n(jerry-debugger) eval_at -1 b\nError: Invalid scope chain index: -1 (must be between 0 and 65535)\n(jerry-debugger) eval_at 65536 b\nError: Invalid scope chain index: 65536 (must be between 0 and 65535)\n(jerry-debugger) eval_at b\nError: invalid literal for int() with base 10: 'b'\n(jerry-debugger) eval_at 200\nUncaught exception: Error\n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_eval_at.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar b = 2;\n\nfunction f(a)\n{\n  var b = 6;\n  return a + b;\n}\n\nvar a = f(3);\n\nnull;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_eval_syntax.cmd",
    "content": "n\neval loop\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_eval_syntax.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_eval_syntax.js:24\n(jerry-debugger) n\nStopped at tests/debugger/do_eval_syntax.js:26\n(jerry-debugger) eval loop\nUncaught exception: Error\n(jerry-debugger) c\nout: bar function\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_eval_syntax.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction foo(loop)\n{\n    while(loop)\n    {\n        print(\"eval\");\n        print(\"syntax\");\n    }\n}\n\nvar a = 10;\n\neval(\"bar = function bar() {\\nprint('bar function') }\");\nbar();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_exception.cmd",
    "content": "c\nc\nc\nc\nquit\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_exception.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_exception.js:15\n(jerry-debugger) c\nout: exception handler configuration test\nException throw detected (to disable automatic stop type exception 0)\nException hint: TypeError\nStopped around tests/debugger/do_exception.js:19 (in foo() at line:17, col:1)\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: ReferenceError\nStopped at tests/debugger/do_exception.js:24 (in foo() at line:17, col:1)\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: 456\nStopped at tests/debugger/do_exception.js:29 (in foo() at line:17, col:1)\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: RangeError: Bad range!\nStopped around tests/debugger/do_exception.js:34 (in foo() at line:17, col:1)\n(jerry-debugger) quit\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_exception.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"exception handler configuration test\")\n\nfunction foo() {\n  try {\n    undefined();\n  } catch (e) {\n  }\n\n  try {\n    xxx();\n  } catch (e) {\n  }\n\n  try {\n    throw 456;\n  } catch (e) {\n  }\n\n  try {\n    throw new RangeError(\"Bad range!\");\n  } catch (e) {\n  }\n}\n\nfoo()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_finish.cmd",
    "content": "finish\nfinish\nfinish\nstep\nfinish\ncontinue\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_finish.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_finish.js:15\n(jerry-debugger) finish\nout: finish-test\nStopped at tests/debugger/do_finish.js:26\n(jerry-debugger) finish\nStopped at tests/debugger/do_finish.js:18 (in foo() at line:17, col:1)\n(jerry-debugger) finish\nout: foo\nout: bar\nStopped at tests/debugger/do_finish.js:42\n(jerry-debugger) step\nStopped at tests/debugger/do_finish.js:29 (in dog() at line:28, col:1)\n(jerry-debugger) finish\nout: *bark*\nout: *sit*\nout: *bark*\nStopped at tests/debugger/do_finish.js:44\n(jerry-debugger) continue\nout: END: finish-test\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_finish.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"finish-test\");\n\nfunction foo() {\n  print(\"foo\");\n  return bar();\n}\n\nfunction bar() {\n  return \"bar\";\n}\n\nprint(foo());\n\nfunction dog() {\n  bark();\n  sit();\n  bark();\n}\n\nfunction bark() {\n  print(\"*bark*\");\n}\n\nfunction sit() {\n  print(\"*sit*\");\n}\n\ndog();\n\nprint(\"END: finish-test\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_help.cmd",
    "content": "help\nquit\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_help.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_help.js:15\n(jerry-debugger) help\n\nDocumented commands (type help <topic>):\n========================================\nEOF        bt        dump       f         ms     quit     scroll  variables\nabort      c         e          finish    n      res      source\nb          continue  eval       help      next   restart  src   \nbacktrace  delete    eval_at    list      p      s        step  \nbreak      display   exception  memstats  print  scope    throw \n\n(jerry-debugger) quit\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_help.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"help tests\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_list.cmd",
    "content": "b do_list.js:18\nb do_list.js:19\nlist\nquit\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_list.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_list.js:15\n(jerry-debugger) b do_list.js:18\nBreakpoint 1 at tests/debugger/do_list.js:18\n(jerry-debugger) b do_list.js:19\nBreakpoint 2 at tests/debugger/do_list.js:19\n(jerry-debugger) list\n=== Active breakpoints  ===\n 1: tests/debugger/do_list.js:18\n 2: tests/debugger/do_list.js:19\n(jerry-debugger) quit\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_list.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"list tests\");\n\nvar x = 10;\nvar y = 10;\nvar pi = 3.14;\nvar z = x + y;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_next.cmd",
    "content": "next\nnext\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_next.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_next.js:15\n(jerry-debugger) next\nout: next test\nStopped at tests/debugger/do_next.js:17\n(jerry-debugger) next\nout: var cat\nStopped at tests/debugger/do_next.js:18\n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_next.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"next test\");\n\nprint (\"var cat\");\nvar cat = 'cat';\n\nfunction test()\n{\n  function f()\n  {\n    return 0;\n  }\n}\n\ntest();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_pending_breakpoints.cmd",
    "content": "break :1\ny\nbreak f\ny\nlist\nc\nlist\nc\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_pending_breakpoints.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_pending_breakpoints.js:15\n(jerry-debugger) break :1\nNo breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 1 at :1\n(jerry-debugger) break f\nNo breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 2 at f()\n(jerry-debugger) list\n=== Pending breakpoints ===\n 1: :1 (pending)\n 2: f() (pending)\n(jerry-debugger) c\nout: pending-breakpoints\nBreakpoint 3 at <unknown>:1\nBreakpoint 4 at <unknown>:3 (in f() at line:2, col:1)\nStopped at breakpoint:3 <unknown>:1\n(jerry-debugger) list\n=== Active breakpoints  ===\n 3: <unknown>:1\n 4: <unknown>:3 (in f() at line:2, col:1)\n(jerry-debugger) c\nStopped at breakpoint:4 <unknown>:3 (in f() at line:2, col:1)\n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_pending_breakpoints.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"pending-breakpoints\");\n\neval(\"1;\\nfunction f()\\n{ return 5 }\");\n\nvar bird = \"colibri\";\nf();\nvar a = 234;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_print.cmd",
    "content": "c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_print.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_print.js:15\n(jerry-debugger) c\nout: Hello world!\nout: A [  ] 110 null true undefined\nout: \nout: [A\nout: B C\nout: D E\nout: F\nout: G]\nout: 1: Az élet gyönyörű.\nout: 2: Az élet gyönyörű.\nout: 3: Az élet gyönyörű.\nout: 4: Az élet gyönyörű.\nout: 5: Az élet gyönyörű.\nout: 6: Az élet gyönyörű.\nout: 7: Az élet gyönyörű.\nout: 8: Az élet gyönyörű.\nout: 9: Az élet gyönyörű.\nout: 10: Az élet gyönyörű.\nout: 11: Az élet gyönyörű.\nout: 12: Az élet gyönyörű.\nout: 13: Az élet gyönyörű.\nout: 14: Az élet gyönyörű.\nout: 15: Az élet gyönyörű.\nout: 16: Az élet gyönyörű.\nout: 17: Az élet gyönyörű.\nout: 18: Az élet gyönyörű.\nout: 19: Az élet gyönyörű.\nout: 20: Az élet gyönyörű.\nout: 21: Az élet gyönyörű.\nout: 22: Az élet gyönyörű.\nout: 23: Az élet gyönyörű.\nout: 24: Az élet gyönyörű.\nout: 25: Az élet gyönyörű.\nout: 26: Az élet gyönyörű.\nout: 27: Az élet gyönyörű.\nout: 28: Az élet gyönyörű.\nout: 29: Az élet gyönyörű.\nout: 30: Az élet gyönyörű.\nout: 31: Az élet gyönyörű.\nout: 32: Az élet gyönyörű.\nout: 33: Az élet gyönyörű.\nout: 34: Az élet gyönyörű.\nout: 35: Az élet gyönyörű.\nout: 36: Az élet gyönyörű.\nout: 37: Az élet gyönyörű.\nout: 38: Az élet gyönyörű.\nout: 39: Az élet gyönyörű.\nout: 40: Az élet gyönyörű.\nout: 41: Az élet gyönyörű.\nout: 42: Az élet gyönyörű.\nout: 43: Az élet gyönyörű.\nout: 44: Az élet gyönyörű.\nout: 45: Az élet gyönyörű.\nout: 46: Az élet gyönyörű.\nout: 47: Az élet gyönyörű.\nout: 48: Az élet gyönyörű.\nout: 49: Az élet gyönyörű.\nout: 50: Az élet gyönyörű.\nout: 51: Az élet gyönyörű.\nout: 52: Az élet gyönyörű.\nout: 53: Az élet gyönyörű.\nout: 54: Az élet gyönyörű.\nout: 55: Az élet gyönyörű.\nout: 56: Az élet gyönyörű.\nout: 57: Az élet gyönyörű.\nout: 58: Az élet gyönyörű.\nout: 59: Az élet gyönyörű.\nout: 60: Az élet gyönyörű.\nout: 61: Az élet gyönyörű.\nout: 62: Az élet gyönyörű.\nout: 63: Az élet gyönyörű.\nout: 64: Az élet gyönyörű.\nout: 65: Az élet gyönyörű.\nout: 66: Az élet gyönyörű.\nout: 67: Az élet gyönyörű.\nout: 68: Az élet gyönyörű.\nout: 69: Az élet gyönyörű.\nout: 70: Az élet gyönyörű.\nout: 71: Az élet gyönyörű.\nout: 72: Az élet gyönyörű.\nout: 73: Az élet gyönyörű.\nout: 74: Az élet gyönyörű.\nout: 75: Az élet gyönyörű.\nout: 76: Az élet gyönyörű.\nout: 77: Az élet gyönyörű.\nout: 78: Az élet gyönyörű.\nout: 79: Az élet gyönyörű.\nout: 80: Az élet gyönyörű.\nout: 81: Az élet gyönyörű.\nout: 82: Az élet gyönyörű.\nout: 83: Az élet gyönyörű.\nout: 84: Az élet gyönyörű.\nout: 85: Az élet gyönyörű.\nout: 86: Az élet gyönyörű.\nout: 87: Az élet gyönyörű.\nout: 88: Az élet gyönyörű.\nout: 89: Az élet gyönyörű.\nout: 90: Az élet gyönyörű.\nout: 91: Az élet gyönyörű.\nout: 92: Az élet gyönyörű.\nout: 93: Az élet gyönyörű.\nout: 94: Az élet gyönyörű.\nout: 95: Az élet gyönyörű.\nout: 96: Az élet gyönyörű.\nout: 97: Az élet gyönyörű.\nout: 98: Az élet gyönyörű.\nout: 99: Az élet gyönyörű.\nout: 100: Az élet gyönyörű.\nout: \n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_print.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"Hello world!\");\nprint(\"A\", \"[\", \"\", \"]\", 1.1e2, null, true, undefined);\nprint();\nprint(\"[A\\nB\", \"C\\nD\", \"E\\nF\\nG]\");\n\nvar s = \"\";\n\nfor (i = 1; i <= 100; i++) {\n  /* Translated from hungarian: life is beautiful */\n  s += i + \": Az élet gyönyörű.\\n\";\n}\n\n/* Long string with non-ascii characters. */\nprint(s);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_quit.cmd",
    "content": "quit\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_quit.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_quit.js:15\n(jerry-debugger) quit\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_quit.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint(\"quit test\");\n\nfunction func() {\n  'use strict';\n  'use stri' + 'ct';\n}\n\n{\n  {\n    print(\"quit\");\n  }\n}\n\n;\n;\n\nvar\n  x =\n    1,\n  y =\n    2\n\ntest = function\n(\n)\n{\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_restart.cmd",
    "content": "n\nn\nn\nrestart\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_restart.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_restart.js:23\n(jerry-debugger) n\nStopped at tests/debugger/do_restart.js:24\n(jerry-debugger) n\nout: foo\nStopped at tests/debugger/do_restart.js:25\n(jerry-debugger) n\nout: bar\nStopped at tests/debugger/do_restart.js:24\n(jerry-debugger) restart\nConnecting to: localhost:5001\nStopped at tests/debugger/do_restart.js:23\n(jerry-debugger) continue\nout: foo\nout: bar\nout: foo\nout: bar\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_restart.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction foo() {\n  print(\"foo\");\n}\n\nfunction bar() {\n  print(\"bar\");\n}\n\nfor (var i = 0; i < 2; i++) {\n  foo();\n  bar();\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_scope.cmd",
    "content": "scope\nb do_scope.js:22\nc\nscope\nc\nscope\nb do_scope.js:28\nc\nscope\nb do_scope.js:31\nc\nscope\nb do_scope.js:33\nc\nscope\nb do_scope.js:35\nc\nscope\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_scope.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_scope.js:15\n(jerry-debugger) scope\nlevel | type   \n0     | global \n(jerry-debugger) b do_scope.js:22\nBreakpoint 1 at tests/debugger/do_scope.js:22 (in f() at line:17, col:1)\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: error\nStopped at tests/debugger/do_scope.js:19 (in f() at line:17, col:1)\n(jerry-debugger) scope\nlevel | type   \n0     | local  \n1     | global \n(jerry-debugger) c\nStopped at breakpoint:1 tests/debugger/do_scope.js:22 (in f() at line:17, col:1)\n(jerry-debugger) scope\nlevel | type   \n0     | catch  \n1     | local  \n2     | global \n(jerry-debugger) b do_scope.js:28\nBreakpoint 2 at tests/debugger/do_scope.js:28 (in function() at line:27, col:4)\n(jerry-debugger) c\nStopped at breakpoint:2 tests/debugger/do_scope.js:28 (in function() at line:27, col:4)\n(jerry-debugger) scope\nlevel | type    \n0     | local   \n1     | closure \n2     | global  \n(jerry-debugger) b do_scope.js:31\nBreakpoint 3 at tests/debugger/do_scope.js:31 (in function() at line:27, col:4)\n(jerry-debugger) c\nStopped at breakpoint:3 tests/debugger/do_scope.js:31 (in function() at line:27, col:4)\n(jerry-debugger) scope\nlevel | type    \n0     | with    \n1     | local   \n2     | closure \n3     | global  \n(jerry-debugger) b do_scope.js:33\nBreakpoint 4 at tests/debugger/do_scope.js:33 (in function() at line:27, col:4)\n(jerry-debugger) c\nStopped at breakpoint:4 tests/debugger/do_scope.js:33 (in function() at line:27, col:4)\n(jerry-debugger) scope\nlevel | type    \n0     | with    \n1     | with    \n2     | local   \n3     | closure \n4     | global  \n(jerry-debugger) b do_scope.js:35\nBreakpoint 5 at tests/debugger/do_scope.js:35 (in function() at line:27, col:4)\n(jerry-debugger) c\nStopped at breakpoint:5 tests/debugger/do_scope.js:35 (in function() at line:27, col:4)\n(jerry-debugger) scope\nlevel | type    \n0     | with    \n1     | local   \n2     | closure \n3     | global  \n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_scope.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar c = 4;\n\nfunction f() {\n  try {\n    throw \"error\";\n  }\n  catch (err) {\n    var c = 10;\n  }\n\n  var z = true;\n  var g = 0;\n  (function() {\n    var a = [1,2,3]\n    a.y = \"abc\";\n    with (a) {\n      var h = [4,5,6]\n      with (h) {\n        h.d = \"dfg\"\n      }\n      a.d = g + c;\n    }\n  })();\n}\n\nf();\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_src.cmd",
    "content": "b f\nn\nnext\ns\nsource 0\nn\nstep\nsrc\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_src.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_src.js:19\n(jerry-debugger) b f\nBreakpoint 1 at tests/debugger/do_src.js:16 (in f() at line:15, col:1)\n(jerry-debugger) n\nStopped at breakpoint:1 tests/debugger/do_src.js:16 (in f() at line:15, col:1)\n(jerry-debugger) next\nout: F1\nStopped at tests/debugger/do_src.js:20\n(jerry-debugger) s\nStopped at <unknown>:1\n(jerry-debugger) source 0\n   1 > f = function f() {\n   2   print('F2') }\n(jerry-debugger) n\nStopped at tests/debugger/do_src.js:21\n(jerry-debugger) step\nStopped at <unknown>:2 (in f() at line:1, col:5)\n(jerry-debugger) src\n   1   f = function f() {\n   2 > print('F2') }\n(jerry-debugger) c\nout: F2\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_src.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() {\n  print(\"F1\");\n}\n\nf();\neval(\"f = function f() {\\nprint('F2') }\");\nf();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_step.cmd",
    "content": "step\nstep\nbacktrace\nnext\nbt\nnext\ns\nn\nbt\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_step.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_step.js:32\n(jerry-debugger) step\nStopped at tests/debugger/do_step.js:22 (in f1() at line:15, col:1)\n(jerry-debugger) step\nStopped at tests/debugger/do_step.js:19 (in g() at line:17, col:3)\n(jerry-debugger) backtrace\nFrame 0: tests/debugger/do_step.js:19 (in g() at line:17, col:3)\nFrame 1: tests/debugger/do_step.js:22 (in f1() at line:15, col:1)\nFrame 2: tests/debugger/do_step.js:32\n(jerry-debugger) next\nStopped at tests/debugger/do_step.js:23 (in f1() at line:15, col:1)\n(jerry-debugger) bt\nFrame 0: tests/debugger/do_step.js:23 (in f1() at line:15, col:1)\nFrame 1: tests/debugger/do_step.js:32\n(jerry-debugger) next\nStopped at tests/debugger/do_step.js:33\n(jerry-debugger) s\nStopped at tests/debugger/do_step.js:28 (in f2() at line:26, col:1)\n(jerry-debugger) n\nStopped at tests/debugger/do_step.js:29 (in f2() at line:26, col:1)\n(jerry-debugger) bt\nFrame 0: tests/debugger/do_step.js:29 (in f2() at line:26, col:1)\nFrame 1: tests/debugger/do_step.js:33\n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_step.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f1()\n{\n  function g()\n  {\n    return 6;\n  }\n\n  var i = g();\n  g();\n}\n\nfunction f2()\n{\n  f1();\n  return 7;\n}\n\nf1();\nf2();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_throw.cmd",
    "content": "s\ns\ns\ns\ns\nthrow new Error('Escape')\nthrow new Error('Once upon a time there lived in a certain village a little country girl, the prettiest creature who was ever seen. Her mother was excessively fond of her; and her grandmother doted on her still more. This good woman had a little red riding hood made for her. It suited the girl so extremely well that everybody called her Little Red Riding Hood. One day her mother, having made some cakes, said to her, \"Go, my dear, and see how your grandmother is doing, for I hear she has been very ill. Take her a cake, and this little pot of butter.\"')\neval e.message.length\nthrow new Error('Exit')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_throw.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_throw.js:23\n(jerry-debugger) s\nStopped at tests/debugger/do_throw.js:24\n(jerry-debugger) s\nStopped at tests/debugger/do_throw.js:26\n(jerry-debugger) s\nStopped at tests/debugger/do_throw.js:27\n(jerry-debugger) s\nStopped at tests/debugger/do_throw.js:20 (in g() at line:19, col:1)\n(jerry-debugger) s\nStopped at tests/debugger/do_throw.js:16 (in f() at line:15, col:1)\n(jerry-debugger) throw new Error('Escape')\nStopped at tests/debugger/do_throw.js:31\n(jerry-debugger) throw new Error('Once upon a time there lived in a certain village a little country girl, the prettiest creature who was ever seen. Her mother was excessively fond of her; and her grandmother doted on her still more. This good woman had a little red riding hood made for her. It suited the girl so extremely well that everybody called her Little Red Riding Hood. One day her mother, having made some cakes, said to her, \"Go, my dear, and see how your grandmother is doing, for I hear she has been very ill. Take her a cake, and this little pot of butter.\"')\nStopped at tests/debugger/do_throw.js:34\n(jerry-debugger) eval e.message.length\n538\n(jerry-debugger) throw new Error('Exit')\nerr: Error: Exit\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_throw.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() {\n  return 32;\n}\n\nfunction g() {\n  f();\n}\n\ntry {\n  try {\n\n    while (true) {\n      g();\n    }\n\n  } catch (e) {\n    var s = \"Stop here\";\n  }\n} catch (e) {\n  var s = \"Stop here again\";\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_throw_adv.cmd",
    "content": "c\ns\nc\nc\nc\nc\nc\nc\nc\nc\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_throw_adv.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_throw_adv.js:15\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: 2\nStopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)\n(jerry-debugger) s\nStopped at tests/debugger/do_throw_adv.js:32\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: 4\nStopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: Catch again\nStopped at tests/debugger/do_throw_adv.js:41\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: 7\nStopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: 10\nStopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: Replace the other error\nStopped at tests/debugger/do_throw_adv.js:63\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: 13\nStopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: Should be caught\nStopped at tests/debugger/do_throw_adv.js:76\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: 16\nStopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)\n(jerry-debugger) c\nerr: 16\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_throw_adv.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = 1;\n\nfunction f() {\n  throw ++a;\n}\n\nfunction g() {\n  f();\n}\n\nfunction h() {\n  g();\n}\n\ntry {\n  h();\n} catch (e) {\n  ++a;\n}\n\ntry {\n  h();\n} catch (e) {\n  ++a;\n\n  try {\n    throw \"Catch again\";\n  } catch (e) {\n    ++a;\n  }\n}\n\ntry {\n  try {\n    h();\n  } finally {\n    ++a;\n  }\n  ++a; /* Should not happen. */\n} catch (e) {\n  ++a;\n}\n\ntry {\n  try {\n    h();\n  } finally {\n    ++a;\n    throw \"Replace the other error\";\n  }\n} catch (e) {\n  ++a;\n}\n\ntry {\n  break_try_label: try {\n    h();\n  } finally {\n    ++a;\n    break break_try_label;\n  }\n  throw \"Should be caught\";\n} catch (e) {\n  ++a;\n}\n\nh();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_variables.cmd",
    "content": "scope\nvariables\nvariables 1\nvariables 0\nb tests/debugger/do_variables.js:20\nc\nscope\nvariables 0\nvariables 1\nvariables 2\nb tests/debugger/do_variables.js:30\nc\nscope\nvariables 1\nvariables 0\nb tests/debugger/do_variables.js:33\nc\nc\nscope\nvariables 0\nvariables 1\nb tests/debugger/do_variables.js:50\nc\nscope\nvariables 0\nvariables 1\nvariables 2\nc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_variables.expected",
    "content": "Connecting to: localhost:5001\nStopped at tests/debugger/do_variables.js:15\n(jerry-debugger) scope\nlevel | type   \n0     | global \n(jerry-debugger) variables\nname         | type      | value     \nf            | Function  |           \naddX         | Function  |           \nz            | undefined | undefined \nc            | undefined | undefined \ncreateRealm  | Function  |           \nresourceName | Function  |           \nprint        | Function  |           \ngc           | Function  |           \nassert       | Function  |           \n(jerry-debugger) variables 1\nname | type | value \n(jerry-debugger) variables 0\nname         | type      | value     \nf            | Function  |           \naddX         | Function  |           \nz            | undefined | undefined \nc            | undefined | undefined \ncreateRealm  | Function  |           \nresourceName | Function  |           \nprint        | Function  |           \ngc           | Function  |           \nassert       | Function  |           \n(jerry-debugger) b tests/debugger/do_variables.js:20\nBreakpoint 1 at tests/debugger/do_variables.js:20 (in function() at line:19, col:10)\n(jerry-debugger) c\nStopped at breakpoint:1 tests/debugger/do_variables.js:20 (in function() at line:19, col:10)\n(jerry-debugger) scope\nlevel | type    \n0     | local   \n1     | closure \n2     | global  \n(jerry-debugger) variables 0\nname | type      | value     \nb    | undefined | undefined \nn    | Number    | 9         \n(jerry-debugger) variables 1\nname | type   | value \nx    | Number | 3     \n(jerry-debugger) variables 2\nname         | type     | value \naddThree     | Function |       \nf            | Function |       \naddX         | Function |       \nz            | Number   | 5     \nc            | Number   | 4     \ncreateRealm  | Function |       \nresourceName | Function |       \nprint        | Function |       \ngc           | Function |       \nassert       | Function |       \n(jerry-debugger) b tests/debugger/do_variables.js:30\nBreakpoint 2 at tests/debugger/do_variables.js:30 (in f() at line:28, col:1)\n(jerry-debugger) c\nStopped at breakpoint:2 tests/debugger/do_variables.js:30 (in f() at line:28, col:1)\n(jerry-debugger) scope\nlevel | type   \n0     | local  \n1     | global \n(jerry-debugger) variables 1\nname         | type     | value \nd            | Number   | 12    \naddThree     | Function |       \nf            | Function |       \naddX         | Function |       \nz            | Number   | 5     \nc            | Number   | 4     \ncreateRealm  | Function |       \nresourceName | Function |       \nprint        | Function |       \ngc           | Function |       \nassert       | Function |       \n(jerry-debugger) variables 0\nname | type      | value     \nb    | undefined | undefined \nx    | undefined | undefined \nuser | undefined | undefined \nm    | undefined | undefined \nc    | undefined | undefined \n(jerry-debugger) b tests/debugger/do_variables.js:33\nBreakpoint 3 at tests/debugger/do_variables.js:33 (in f() at line:28, col:1)\n(jerry-debugger) c\nException throw detected (to disable automatic stop type exception 0)\nException hint: error\nStopped at breakpoint:2 tests/debugger/do_variables.js:30 (in f() at line:28, col:1)\n(jerry-debugger) c\nStopped at breakpoint:3 tests/debugger/do_variables.js:33 (in f() at line:28, col:1)\n(jerry-debugger) scope\nlevel | type   \n0     | catch  \n1     | local  \n2     | global \n(jerry-debugger) variables 0\nname | type   | value \nerr  | String | error \n(jerry-debugger) variables 1\nname | type      | value     \nb    | undefined | undefined \nx    | undefined | undefined \nuser | undefined | undefined \nm    | undefined | undefined \nc    | undefined | undefined \n(jerry-debugger) b tests/debugger/do_variables.js:50\nBreakpoint 4 at tests/debugger/do_variables.js:50 (in function() at line:46, col:4)\n(jerry-debugger) c\nStopped at breakpoint:4 tests/debugger/do_variables.js:50 (in function() at line:46, col:4)\n(jerry-debugger) scope\nlevel | type    \n0     | with    \n1     | local   \n2     | closure \n3     | global  \n(jerry-debugger) variables 0\nname | type   | value \ny    | String | abc   \n0    | Number | 1     \n1    | Number | 2     \n2    | Number | 3     \n(jerry-debugger) variables 1\nname | type      | value     \nh    | undefined | undefined \na    | Array     | [1,2,3]   \n(jerry-debugger) variables 2\nname | type    | value           \nb    | Number  | 10              \nx    | Boolean | true            \nuser | Object  | [object Object] \nm    | Null    | null            \nc    | Number  | 10              \n(jerry-debugger) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/debugger/do_variables.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar c = 4;\nvar z = 5;\n\nfunction addX(x) {\n  return function(n) {\n    var b = 2;\n    return n + x;\n  }\n}\n\naddThree = addX(3);\nd = addThree(c+z);\n\nfunction f() {\n  try {\n    throw \"error\";\n  }\n  catch (err) {\n    var c = 10;\n  }\n\n  var m = null;\n\n  var user = {\n    name: \"John\",\n    age: 30\n  };\n\n  var x = true;\n  var b = 10;\n\n  (function() {\n    var a = [1,2,3]\n    a.y = \"abc\";\n    with (a) {\n      var h = [4,5,6]\n      with (h) {\n        h.d = \"dfg\"\n      }\n      a.d = x;\n    }\n  })();\n}\n\nf();\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/hello.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint (\"Hello JerryScript!\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/and-or.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction fail() {\n  assert (0);\n  return true;\n}\n\nif (false && fail()) {\n  assert (0);\n}\n\nif (true && false && fail()) {\n  assert (0);\n}\n\nif (true || fail()) {\n} else {\n  assert (0);\n}\n\nif (false || true || fail()) {\n} else {\n  assert (0);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/arguments-parse.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_parse_error (txt) {\n  try {\n    eval (txt)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\nfunction f_args (a,b,c) {\n  return arguments;\n}\n\ncheck_parse_error (\"f_args (1 2 3)\");\ncheck_parse_error (\"f_args (1; 2; 3)\");\ncheck_parse_error (\"f_args (())\");\ncheck_parse_error (\"f_args (1, 2, 3\");\ncheck_parse_error (\"f_args 1, 2, 3)\");\ncheck_parse_error (\"f_args 1, 2, 3\");\ncheck_parse_error (\"f_args 1; 2; 3\");\ncheck_parse_error (\"f_args{1, 2, 3}\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/arguments.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f_arg (arguments)\n{\n  return arguments;\n}\nassert (f_arg (1) === 1);\n\nfunction f (a, b, c)\n{\n  return arguments;\n}\n\nargs = f();\nassert (args[0] === undefined);\n\nargs = f (1, 2, 3, 4, 5);\nassert (args[0] === 1);\nassert (args[1] === 2);\nassert (args[2] === 3);\nassert (args[3] === 4);\nassert (args[4] === 5);\nassert (args[5] === undefined);\n\nassert (args.callee === f);\nassert (typeof args.caller === 'undefined');\n\nfunction g (a, b, c)\n{\n  assert (arguments[0] === 1);\n  assert (arguments[1] === undefined);\n  assert (arguments[2] === undefined);\n\n  a = 'a';\n  b = 'b';\n  c = 'c';\n\n  assert (arguments[0] === 'a');\n  assert (arguments[1] === 'b');\n  assert (arguments[2] === 'c');\n\n  arguments [0] = 1;\n  arguments [1] = 2;\n  arguments [2] = 3;\n\n  assert (a === 1);\n  assert (b === 2);\n  assert (c === 3);\n\n  delete arguments [0];\n  arguments[0] = 'new value';\n  assert (a === 1);\n\n  a = 'a';\n  b = 'b';\n  c = 'c';\n\n  assert (arguments[0] === 'new value');\n  assert (arguments[1] === 'b');\n  assert (arguments[2] === 'c');\n}\n\ng (1);\n\nfn_expr = function (a, b, c)\n{\n  'use strict';\n\n  assert (arguments[0] === 1);\n  assert (arguments[1] === undefined);\n  assert (arguments[2] === undefined);\n\n  a = 'a';\n  b = 'b';\n  c = 'c';\n\n  assert (arguments[0] === 1);\n  assert (arguments[1] === undefined);\n  assert (arguments[2] === undefined);\n\n  arguments [0] = 1;\n  arguments [1] = 'p';\n  arguments [2] = 'q';\n\n  assert (a === 'a');\n  assert (b === 'b');\n  assert (c === 'c');\n\n  delete arguments [0];\n  arguments[0] = 'new value';\n  assert (a === 'a');\n\n  a = 'a';\n  b = 'b';\n  c = 'c';\n\n  assert (arguments[0] === 'new value');\n  assert (arguments[1] === 'p');\n  assert (arguments[2] === 'q');\n\n  function check_type_error_for_property (obj, prop) {\n    try {\n      var v = obj[prop];\n      assert (false);\n    }\n    catch (e) {\n      assert (e instanceof TypeError);\n    }\n  }\n\n  check_type_error_for_property (arguments, 'callee');\n}\n\nfn_expr (1);\n\n(function () {\n var a = [arguments];\n})();\n\nfunction nested_args()\n{\n  var a;\n  for (var i = 0; i < 1; i++)\n  {\n    if (i == 0)\n    {\n      a = arguments[i];\n    }\n  }\n  assert(a === 3);\n}\nnested_args(3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/arithmetics-bignums.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar big = 2147483646;\n\nbig++;\nassert(big == 2147483647);\n\nbig += 1;\nassert(big == 2147483648); // overflow on 32bit numbers\n\nbig++;\nassert(big == 2147483649); // overflow on 32bit numbers\n\nassert ((1152921504606846976).toString() === \"1152921504606847000\");\n\nassert (1.797693134862315808e+308 === Infinity);\n\nassert (9999999999999999 == 10000000000000000);\n\nassert((9007199254740993).toString() === \"9007199254740992\");\n\nassert((9007199254740992).toString() === \"9007199254740992\");\n\nassert((9007199254740994).toString() === \"9007199254740994\");\n\nassert((1.00517e+21).toString() === \"1.0051699999999999e+21\");\n\nassert((1.00001e+21).toString() === \"1.0000099999999999e+21\");\n\nassert((9007199254740995).toString() === \"9007199254740996\");\n\nassert((18014398509481989).toString() === \"18014398509481988\");\n\nassert((18014398509481990).toString() === \"18014398509481992\");\n\nassert((18014398509481991).toString() === \"18014398509481992\");\n\nassert((18014398509481993).toString() === \"18014398509481992\");\n\nassert((18014398509481994).toString() === \"18014398509481992\");\n\nassert((18014398509481997).toString() === \"18014398509481996\");\n\nassert((18014398509481998).toString() === \"18014398509482000\");\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/arithmetics.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((1 + 2) == 3);\nassert((2 + 1) == 3);\nassert((2 + 1) != 4);\n\nassert((7 + 7) == 14);\nassert((7 - 7) == 0);\nassert((7 * 7) == 49);\nassert((7 / 7) == 1);\nassert((7 + 7) == 14);\nassert((7 % 7) == 0);\n\nvar number = 81;\nassert((number + 9) == 90);\nassert((number - 9) == 72);\nassert((number * 10) == 810);\nassert((number / 9) == 9);\nassert((number % 79) == 2);\n\nvar num1 = 1234567, num2 = 1234000;\nassert((num1 % num2) == 567);\n\nassert (1 / (-1 % -1) < 0);\nassert (1 / (-1 % 1) < 0);\nassert (1 / (1 % -1) > 0);\nassert (1 / (1 % 1) > 0);\n\nassert (eval (\"x\\n\\n=\\n\\n6\\n\\n/\\n\\n3\") === 2)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-concat.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [\"foo\", [], Infinity, 4]\nvar new_arr = array.concat();\n\nassert(new_arr.length === array.length)\nfor (i = 0; i < array.length; i++) {\n  assert(array[i] === new_arr[i]);\n}\n\nvar obj = { concat : Array.prototype.concat };\nvar arr1 = [\"Apple\", 6, \"Peach\"];\nvar arr2 = [obj, \"Cherry\", \"Grape\"];\n\nvar new_array = obj.concat(arr1);\nassert(new_array.length === 4);\nassert(new_array[0] === obj);\nassert(new_array[1] === \"Apple\");\nassert(new_array[2] === 6);\nassert(new_array[3] === \"Peach\");\n\nvar new_array = arr1.concat(arr2, obj, 1);\n\nassert(new_array.length === 8);\nassert(new_array[0] === \"Apple\");\nassert(new_array[1] === 6);\nassert(new_array[2] === \"Peach\");\nassert(new_array[3] === obj);\nassert(new_array[4] === \"Cherry\");\nassert(new_array[5] === \"Grape\");\nassert(new_array[6] === obj);\nassert(new_array[7] === 1);\n\nvar arr1 = [1,2];\nvar arr2 = [4,5,6,7,8];\nvar arr3 = [,,9,10];\nvar arr4 = [];\nvar expected = [1,2,4,5,6,7,8,,,9,10];\n\nvar result = arr1.concat(arr2, arr3, arr4);\n\nassert(result.length === expected.length)\nfor (i = 0; i < result.length; i++) {\n  assert(result[i] === expected[i]);\n}\n\nvar arr1 = [];\narr1.length = 2;\nvar arr2 = [];\narr2.length = 3;\nassert(arr1.concat(arr2).length === arr1.length + arr2.length);\n\n// Checking behavior when unable to get element\nvar arr = []\nObject.defineProperty(arr, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\narr.length = 1;\n\ntry {\n  arr.concat();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n/* ES v5.1 15.4.4.4.5.\n   Checking behavior when unable to get element from a given array */\narr1 = [];\narr2 = [];\narr3 = [];\nObject.defineProperty(arr2, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  arr1.concat(arr2, arr3);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-every.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [\"foo\", [], Infinity, 4];\n\nfunction f(arg1, arg2, arg3) {\n  assert(arg1 === array[arg2]);\n  assert(arg3 === array);\n  return true;\n}\n\nassert(array.every(f) === true);\n\nfunction g(arg1, arg2, arg3) {\n  if (arg1 === 1) {\n    return true;\n  } else {\n    return false;\n  }\n}\n\nvar arr1 = [1, 1, 1, 1, 1, 2];\nassert(arr1.every(g) === false);\n\nvar arr2 = [1, 1, 1, 1, 1, 1];\nassert(arr2.every(g) === true);\n\n// Checking behavior when unable to get length\nvar obj = { every : Array.prototype.every };\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.every(f);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = { every : Array.prototype.every, length : 1};\nObject.defineProperty(obj, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.every(f);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-filter.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [\"foo\", [], Infinity, 4]\n\nfunction f(arg1, arg2, arg3) {\n  assert(arg1 === array[arg2]);\n  assert(arg3 === array);\n  return true;\n}\n\nvar filtered = array.filter(f);\nassert(filtered.length === array.length);\nfor (i = 0; i < filtered.length; i++) {\n  assert(filtered[i] === array[i]);\n}\n\nvar array = [1, 2, 3, 4, 5, 6, 7, 8];\n\nfunction g (arg1, arg2, arg3) {\n  if (arg2 % 2 === 0) {\n    return true;\n  } else {\n    return false;\n  }\n}\n\nfiltered = array.filter(g)\nassert(filtered.length === 4);\nassert(filtered[0] === 1);\nassert(filtered[1] === 3);\nassert(filtered[2] === 5);\nassert(filtered[3] === 7);\n\nvar arr = [1,2];\nArray.prototype[0] = 3;\nvar newArr = arr.filter(function() { return true; });\ndelete Array.prototype[0];\nassert(newArr.hasOwnProperty(\"0\"));\nassert(newArr[0] === 1);\n\n// Checking behavior when unable to get length\nvar obj = {};\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\nobj.filter = Array.prototype.filter;\n\ntry {\n  obj.filter(f);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = {}\nobj.length = 1;\nObject.defineProperty(obj, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\nobj.filter = Array.prototype.filter\n\ntry {\n  obj.filter(f);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-foreach.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [\"foo\", [], Infinity, 4]\n\nfunction f(arg1, arg2, arg3) {\n  assert(arg1 === array[arg2]);\n  assert(arg3 === array);\n}\n\narray.forEach(f);\n\n// Checking behavior when unable to get length\nvar obj = {};\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\nobj.forEach = Array.prototype.forEach;\n\ntry {\n  obj.forEach(f);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = {}\nobj.length = 1;\nObject.defineProperty(obj, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\nobj.forEach = Array.prototype.forEach\n\ntry {\n  obj.forEach(f);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-indexof.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {};\nvar array = [\"foo\", 19, \"bar\", obj, \"foo\", 29, \"baz\"];\n\nvar index = array.indexOf(\"foo\");\nassert(index === 0);\nassert(array[index] === \"foo\");\n\nassert(array.indexOf(\"foo\", 1) === 4);\nassert(array.indexOf(\"foo\", 5) === -1);\n\nvar index = array.indexOf(\"baz\");\nassert(index === 6);\nassert(array[index] === \"baz\");\n\nassert(array.indexOf(\"baz\", 7) === -1);\n\nvar index = array.indexOf(obj);\nassert(index === 3);\nassert(array[index] === obj);\n\nassert(array.indexOf(\"foo\", NaN) === 0);\nassert(array.indexOf(\"foo\", Infinity) === -1);\nassert(array.indexOf(\"foo\", -Infinity) === 0);\n\nassert([true].indexOf(true, -0) === 0);\n\n// Checking behavior when length is zero\nvar obj = { indexOf : Array.prototype.indexOf, length : 0 };\nassert(obj.indexOf(\"foo\") === -1);\n\n// Checking behavior when start index >= length\nvar arr = [11, 22, 33, 44];\nassert(arr.indexOf(44, 4) === -1);\n\nvar fromIndex = {\n  toString: function () {\n    return {};\n  },\n\n  valueOf: function () {\n    return {};\n  }\n};\n\ntry {\n  [0, 1].indexOf(1, fromIndex);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Checking behavior when unable to get length\nvar obj = { indexOf : Array.prototype.indexOf}\nObject.defineProperty(obj, 'length', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.indexOf(\"bar\");\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = { indexOf : Array.prototype.indexOf, length : 1}\nObject.defineProperty(obj, '0', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.indexOf(\"bar\");\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Remove the buffer\nvar array = [1, 2, 3, 4, 5];\nvar value = array.indexOf(4, {\n    valueOf: function() {\n        array.length = 0;\n    }\n})\n\nassert(value === -1);\n\n// Extend the buffer\nvar array = [1, 2, 3];\nvar value = array.indexOf(2, {\n    valueOf: function() {\n        array.length = 5;\n    }\n})\n\nassert(value === 1);\n\n// Reduce the buffer\nvar array = [1, 2, 3, 4, 5, 6, 7];\nvar value = array.indexOf(6, {\n    valueOf: function() {\n        array.length = 5;\n    }\n})\n\nassert(value === -1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-join.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert ([].join() === \"\");\nassert ([1].join() === \"1\");\nassert ([1, 2].join() === \"1,2\");\n\n\nassert ([].join('--') === \"\");\nassert ([1].join(\"--\") === \"1\");\nassert ([1, 2].join('--') === \"1--2\");\n\nassert ([1,2,3].join({toString: function() { return \"--\"; }}) === \"1--2--3\");\n\n\n// Join should use 'length' to as the number of elements int the array.\nvar lst = [1,2,3,4];\nlst.length = 3;\nassert (lst.join() === [1,2,3].join());\n\n// Checking behavior when unable to get length.\nvar obj = {};\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\nobj.join = Array.prototype.join;\n\ntry {\n  obj.join();\n  // Should not be reached.\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Check join argument fail.\ntry {\n  [1,2,3].join({toString: function() { throw new ReferenceError (\"foo\"); }});\n  // Should not be reached.\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Check single join element fail.\ntry {\n  [1, 2, {toString: function() { throw new ReferenceError (\"foo\"); }}, 4].join();\n  // Should not be reached.\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Check join on different object.\nvar obj_2 = {};\nobj_2.length = 3;\nobj_2[0] = 1;\nobj_2[1] = 2;\nobj_2[2] = 3;\nobj_2[3] = 4;\n\nobj_2.join = Array.prototype.join;\n\nassert (obj_2.join() === \"1,2,3\");\n\n/* ES v5.1 15.4.4.5.7.\n   Checking behavior when an element throws error */\ntry {\n  var f = function () { throw new TypeError(\"ooo\");};\n  var arr = [0, 1, 2, 3];\n  Object.defineProperty(arr, '0', { 'get' : f });\n  Array.prototype.join.call(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n  assert(e.message == \"ooo\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-lastindexof.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This test will not pass on FLOAT32 due to precision issues\n\nvar obj = {};\nvar array = [\"foo\", 19, \"bar\", obj, \"foo\", 29, \"baz\"];\n\nvar index = array.lastIndexOf(\"foo\");\nassert(index === 4);\nassert(array[index] === \"foo\");\n\nassert(array.lastIndexOf(\"foo\", 3) === 0);\nassert(array.lastIndexOf(\"foo\", -8) === -1);\n\nvar index = array.lastIndexOf(\"baz\");\nassert(index === 6);\nassert(array[index] === \"baz\");\n\nassert(array.lastIndexOf(\"baz\", -2) === -1);\n\nvar index = array.lastIndexOf(obj);\nassert(index === 3);\nassert(array[index] === obj);\n\nassert(array.lastIndexOf(\"foo\", NaN) === 0);\nassert(array.lastIndexOf(\"foo\", Infinity) === 4);\nassert(array.lastIndexOf(\"foo\", -Infinity) === -1);\n\nvar arr = [];\narr[4294967294] = \"foo\";\nassert(arr.lastIndexOf(\"foo\", -1) === 4294967294)\n\nvar arr = [1,2];\nassert(arr.lastIndexOf(2, undefined) === -1);\nassert(arr.lastIndexOf(2) === 1);\n\n// Checking behavior when unable to get length\nvar obj = { lastIndexOf : Array.prototype.lastIndexOf}\nObject.defineProperty(obj, 'length', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.lastIndexOf(\"bar\");\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = { lastIndexOf : Array.prototype.lastIndexOf, length : 1}\nObject.defineProperty(obj, '0', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.lastIndexOf(\"bar\");\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Remove the buffer\nvar array = [1, 2, 3, 4, 5];\nvar value = array.lastIndexOf(4, {\n    valueOf: function() {\n        array.length = 0;\n    }\n})\n\nassert(value === -1);\n\n// Extend the buffer\nvar array = [1, 2, 3];\nvar value = array.lastIndexOf(1, {\n    valueOf: function() {\n        array.length = 5;\n    }\n})\n\nassert(value === 0);\n\n// Reduce the buffer\nvar array = [1, 2, 3, 4, 5, 6, 7];\nvar value = array.indexOf(5, {\n    valueOf: function() {\n        array.length = 2;\n    }\n})\n\nassert(value === -1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-map.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// helper function - simple implementation\nArray.prototype.equals = function (array) {\n  if (this.length != array.length)\n    return false;\n\n  for (var i = 0; i < this.length; i++) {\n    if (this[i] instanceof Array && array[i] instanceof Array) {\n      if (!this[i].equals(array[i]))\n        return false;\n      }\n      else if (this[i] != array[i]) {\n        return false;\n    }\n  }\n\n  return true;\n}\n\n// check function type\ntry {\n  [0].map(new Object());\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// various checks\nassert ([1, 4, 9].map(Math.sqrt).equals([1, 2, 3]));\n\nassert (isNaN([1, 4, \"X\"].map(Number)[2]));\n\nvar func = function(val, idx) {\n  return val + idx;\n};\n\nassert ([1, 4, 9].map(func).equals([1,5,11]));\n\nassert ([1, \"X\", 10].map(func).equals([1, \"X1\", 12]));\n\nvar arr = [1,2,3];\narr.length = 5;\nassert(arr.map(func).length === arr.length);\n\nvar long_array = [0, 1];\nassert (long_array.map(func).equals([0,2]));\n\nlong_array[100] = 1;\nassert (long_array.map(func).equals([0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,101]));\n\nvar arr = [1,2];\nArray.prototype[0] = 3;\nvar newArr = arr.map(function(value) { return value; });\ndelete Array.prototype[0];\nassert(newArr.hasOwnProperty(\"0\"));\nassert(newArr[0] === 1);\n\n// check behavior when unable to get length\nvar obj = {};\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\nobj.map = Array.prototype.map;\n\ntry {\n  obj.map(func);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// check behavior when unable to get element\nvar obj = {}\nobj.length = 1;\nObject.defineProperty(obj, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\nobj.map = Array.prototype.map\n\ntry {\n  obj.map(func);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// check thisArg\nvar thisArg = {add: 10};\nvar func2 = function(value) {\n  return this.add + value;\n}\nassert([1,2].map(func2, thisArg).equals([11, 12]));\n\n// check passed Object\nvar array_example = [1,2];\nObject.defineProperty(array_example, 'const', { 'get' : function () {return \"CT\";} });\nvar func3 = function(value, idx, thisobj) {\n  return value * idx + thisobj.const;\n}\nassert(array_example.map(func3).equals([\"0CT\", \"2CT\"]));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-pop.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [\"foo\", [], Infinity, 4]\nassert(array.length === 4);\n\nassert(array.pop() === 4)\nassert(array.length === 3);\n\nassert(array.pop() === Infinity);\nassert(array.length === 2);\n\nvar a = array.pop()\nassert(a instanceof Array);\nassert(array.length === 1);\n\nassert(array.pop() === \"foo\");\nassert(array.length === 0);\n\nassert(array.pop() === undefined);\nassert(array.length === 0);\n\n// Checking behavior when unable to get length\nvar obj = { pop : Array.prototype.pop };\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.pop();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to set length\nvar obj = { pop : Array.prototype.pop };\nObject.defineProperty(obj, 'length', { 'set' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.pop();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when no length property defined\nvar obj = { pop : Array.prototype.pop };\nassert(obj.length === undefined)\nassert(obj.pop() === undefined)\nassert(obj.length === 0)\n\n// Checking behavior when unable to get element\nvar obj = { pop : Array.prototype.pop, length : 1 };\nObject.defineProperty(obj, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.pop();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n/* ES v5.1 15.4.4.6.5.c\n   Checking behavior when unable to delete property */\nvar obj = {pop : Array.prototype.pop, length : 2};\nObject.defineProperty(obj, '1', function () {});\n\ntry {\n  obj.pop();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.6.5.d\n   Checking behavior when array is not modifiable */\nvar obj = {pop : Array.prototype.pop, length : 2};\nObject.freeze(obj);\n\ntry {\n  obj.pop();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-push.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This test will not pass on FLOAT32 due to precision issues\n\nvar len;\nvar d = [];\nassert (d.length === 0);\nlen = d.push();\nassert (d.length === 0);\nassert (d.length === len);\nlen = d.push(1);\nassert (d.length === 1);\nassert (d.length === len);\nlen = d.push(2);\nassert (d.length === 2);\nassert (d.length === len);\nlen = d.push('a');\nassert (d.length === 3);\nassert (d.length === len);\nlen = d.push('b', 'c', 3);\nassert (d.length == 6);\nassert (d.length === len);\nassert (d[0] === 1);\nassert (d[1] === 2);\nassert (d[2] === 'a');\nassert (d[3] === 'b');\nassert (d[4] === 'c');\nassert (d[5] === 3);\n\nvar a = [];\na.length = 4294967294;\nassert(a.push(\"x\") === 4294967295);\nassert(a.length === 4294967295);\nassert(a[4294967294] === \"x\");\n\ntry {\n  a.push(\"y\");\n  assert(false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\nassert(a.length === 4294967295)\n\nvar o = { length : 4294967294, push : Array.prototype.push };\nassert(o.push(\"x\") === 4294967295);\nassert(o.length === 4294967295);\nassert(o[4294967294] === \"x\");\n\ntry {\n  assert(o.push(\"y\") === 4294967296);\n} catch (e) {\n  assert(false);\n}\nassert(o.length === 4294967296);\nassert(o[4294967295] === \"y\");\n\n/* ES v5.1 15.4.4.7.5.\n   Checking behavior when array is non-extensible while pushing */\nvar arr = [];\nObject.freeze(arr);\n\ntry {\n  arr.push(1, 2);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-reduce-right.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This test will not pass on FLOAT32 due to precision issues\n\nvar func = function(a, b) {\n  return a + b;\n}\n\n// check function type\ntry {\n  [0].reduceRight(new Object());\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check for init value\ntry {\n  [].reduceRight(func);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  var a = new Array();\n  a.length = 10;\n  a.reduceRight(func);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError)\n}\n\n// various checks\nassert([].reduceRight(func, 1) === 1);\n\nassert([].reduceRight(func, undefined) === undefined);\n\nassert([0].reduceRight(func) === 0);\n\nassert([0, 1].reduceRight(func) === 1);\n\nassert([0, 1].reduceRight(func, 1) === 2);\n\nassert([0, 1, 2, 3].reduceRight(func, 1) === 7);\n\nassert ([\"A\",\"B\"].reduceRight(func) === \"BA\");\n\nassert ([\"A\",\"B\"].reduceRight(func, \"Init:\") === \"Init:BA\");\n\nassert ([0, 1].reduceRight(func, 3.2) === 4.2);\n\nassert ([0, \"x\", 1].reduceRight(func) === \"1x0\");\n\nassert ([0, \"x\", 1].reduceRight(func, 3.2) === \"4.2x0\");\n\nvar long_array = [0, 1];\nassert (long_array.reduceRight(func,10) === 11);\n\nlong_array[10000] = 1;\nassert (long_array.reduceRight(func,10) === 12);\n\nvar accessed = false;\nfunction callbackfn(prevVal, curVal, idx, obj) {\n    accessed = true;\n    return typeof prevVal === \"undefined\";\n}\n\nvar obj = { 0: 11, length: 1 };\n\nassert (Array.prototype.reduceRight.call(obj, callbackfn, undefined) === true && accessed);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-reduce.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This test will not pass on FLOAT32 due to precision issues\n\nvar func = function(a, b) {\n  return a + b;\n}\n\n// check function type\ntry {\n  [0].reduce(new Object());\n  assert(false);\n}\ncatch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check for init value\ntry {\n  [].reduce(func);\n  assert(false);\n}\ncatch(e) {\n  assert(e instanceof TypeError);\n}\n\n// various checks\nassert ([].reduce(func, 1) === 1);\n\nassert ([].reduce(func, undefined) === undefined);\n\nassert ([0].reduce(func) === 0);\n\nassert ([0, 1].reduce(func) === 1);\n\nassert ([0, 1].reduce(func, 1) === 2);\n\nassert ([0, 1, 2, 3].reduce(func, 1) === 7);\n\nassert ([\"A\",\"B\"].reduce(func) === \"AB\");\n\nassert ([\"A\",\"B\"].reduce(func, \"Init:\") === \"Init:AB\");\n\nassert ([0, 1].reduce(func, 3.2) === 4.2);\n\nassert ([0, \"x\", 1].reduce(func) === \"0x1\");\n\nassert ([0, \"x\", 1].reduce(func, 3.2) === \"3.2x1\");\n\nvar long_array = [0, 1];\nassert (long_array.reduce(func,10) === 11);\n\nlong_array[10000] = 1;\nassert (long_array.reduce(func,10) === 12);\n\nvar accessed = false;\nfunction callbackfn(prevVal, curVal, idx, obj) {\n    accessed = true;\n    return typeof prevVal === \"undefined\";\n}\n\nvar obj = { 0: 11, length: 1 };\n\nassert (Array.prototype.reduce.call(obj, callbackfn, undefined) === true && accessed);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-reverse.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [4, 3, 2, 1, 0]\n\narray.reverse();\n\nfor (i = 0; i < array.length; i++) {\n  assert(array[i] === i);\n}\n\n// Checking behavior when unable to get length\nvar obj = { reverse : Array.prototype.reverse };\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.reverse();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = { reverse : Array.prototype.reverse, length : 3 };\nObject.defineProperty(obj, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.reverse();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n/* ES v5.1 15.4.4.8.6.e.\n   Checking behavior when unable to get the last element */\nvar obj = { reverse : Array.prototype.reverse, length : 4 };\nObject.defineProperty(obj, '3', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.reverse();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n/* ES v5.1 15.4.4.8.6.h.i.\n   Checking behavior when first 3 elements are not writable */\ntry {\n  var arr = [,,, 3, 4, 5, 6,,,,,,,,,0, 1, 2, 3, 4, 5, 6];\n  Object.defineProperty(arr, '0', {});\n  Object.defineProperty(arr, '1', {});\n  Object.defineProperty(arr, '2', {});\n  Array.prototype.reverse.call(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.8.6.h.ii.\n   Checking behavior when last 3 elements are not writable */\ntry {\n  var arr = [0, 1, 2, 3, 4, 5, 6,,,,,,,,,0, 1, 2, 3,,,];\n  Object.defineProperty(arr, '19', {});\n  Object.defineProperty(arr, '20', {});\n  Object.defineProperty(arr, '21', {});\n  Array.prototype.reverse.call(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.8.6.i.i.\n   Checking behavior when first elements do not exist and the array is freezed */\ntry {\n  var arr = [,,,,,,,,,,,,,,,,0, 1, 2, 3, 4, 5, 6];\n  arr = Object.freeze(arr);\n  Array.prototype.reverse.call(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.8.6.i.ii.\n   Checking behavior when unable to get the first 2 elements */\nvar obj = { reverse : Array.prototype.reverse, length : 4 };\nObject.defineProperty(obj, '2', { value : 0 });\nObject.defineProperty(obj, '3', { value : 0 });\ntry {\n  obj.reverse();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.8.6.j.i.\n   Checking behavior when unable to get the last 2 elements */\nvar obj = { reverse : Array.prototype.reverse, length : 4 };\nObject.defineProperty(obj, '0', { value : 0 });\nObject.defineProperty(obj, '1', { value : 0 });\ntry {\n  obj.reverse();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-shift.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [\"foo\", [], Infinity, 4]\n\nassert(array.length === 4);\n\nassert(array.shift() === \"foo\");\nassert(array.length === 3);\n\nvar a = array.shift();\nassert(a instanceof Array);\nassert(array.length === 2);\n\nassert(array.shift() === Infinity);\nassert(array.length === 1);\n\nassert(array.shift() === 4);\nassert(array.length === 0);\n\nassert(array.shift() === undefined);\nassert(array.length === 0);\n\nvar referenceErrorThrower = function () {\n  throw new ReferenceError (\"foo\");\n}\n\n// Checking behavior when unable to get length\nvar obj = { shift : Array.prototype.shift };\nObject.defineProperty(obj, 'length', { 'get' : referenceErrorThrower });\n\ntry {\n  obj.shift();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to set length\nvar obj = { shift : Array.prototype.shift };\nObject.defineProperty(obj, 'length', { 'set' : referenceErrorThrower });\n\ntry {\n  obj.shift();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when no length property defined\nvar obj = { shift : Array.prototype.shift };\nassert (obj.length === undefined)\nassert (obj.shift() === undefined)\nassert (obj.length === 0)\n\n// Checking behavior when unable to get element\nvar obj = { shift : Array.prototype.shift, length : 1 };\nObject.defineProperty(obj, '0', { 'get' : referenceErrorThrower });\n\ntry {\n  obj.shift();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n/* ES v5.1 15.4.4.9.7.c.\n   Checking behavior when the array is freezed */\ntry {\n  f = function () { throw new ReferenceError(\"getter\"); };\n  arr =  { length : 9 };\n  Object.defineProperty(arr, '8', { 'get' : f });\n  Array.prototype.shift.call(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n  assert(e.message == \"getter\");\n}\n\n/* ES v5.1 15.4.4.9.7.d.ii.\n   Checking behavior when the array is freezed */\ntry {\n  arr =  { length : 9 };\n  Object.defineProperty(arr, '8', { value : 8 });\n  Object.defineProperty(arr, '7', { value : 7 });\n  Array.prototype.shift.call(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.9.7.e.i.\n   Checking behavior when the first element is null */\ntry {\n  arr = { length : 9 };\n  Object.defineProperty(arr, '0', { value : null });\n  Array.prototype.shift.call(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.9.8.\n   Checking behavior when last element is not writable */\ntry {\n  arr = { length : 9 };\n  Object.defineProperty(arr, '8', { writable : false });\n  Array.prototype.shift.call(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.9.9.\n   Checking behavior when the array is freezed */\ntry {\n  arr = { length : 9 };\n  Object.freeze(arr);\n  Array.prototype.shift.call(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-slice.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This test will not pass on FLOAT32 due to precision issues\n\nvar array = [54, undefined, \"Lemon\", -127];\n\nvar array1 = array.slice();\nvar array2 = array.slice(\"a\", \"3\");\nvar array3 = array.slice(-2);\nvar array4 = array.slice(-12, undefined);\nvar array5 = array.slice(undefined, -3);\nvar array6 = array.slice(Infinity, NaN);\nvar array7 = array.slice(-Infinity, Infinity);\nvar array8 = array.slice(NaN, -Infinity);\n\nassert (array1.length == 4);\nassert (array1[0] == 54);\nassert (array1[1] == undefined);\nassert (array1[2] == \"Lemon\");\nassert (array1[3] == -127);\n\nassert (array2.length == 3);\nassert (array2[0] == 54);\nassert (array2[1] == undefined);\nassert (array2[2] == \"Lemon\");\n\nassert (array3.length == 2);\nassert (array3[0] == \"Lemon\");\nassert (array3[1] == -127);\n\nassert (array4.length == 4);\nassert (array4[0] == 54);\nassert (array4[1] == undefined);\nassert (array4[2] == \"Lemon\");\nassert (array4[3] == -127);\n\nassert (array5.length == 1);\nassert (array5[0] == 54);\n\nassert (array6.length == 0);\n\nassert (array7.length == 4);\nassert (array7[0] == 54);\nassert (array7[1] == undefined);\nassert (array7[2] == \"Lemon\");\nassert (array7[3] == -127);\n\nassert (array8.length == 0);\n\nvar array = [];\narray[4294967293] = \"foo\";\narray.length = 4294967295;\nvar result = array.slice(4294967293, -1)\nassert(result.length === 1)\nassert(result[0] === \"foo\")\n\narray[0] = \"bar\";\nvar result = array.slice(-4294967295, -4294967294)\nassert(result.length === 1)\nassert(result[0] === \"bar\")\n\nvar array = [];\narray[0] = \"foo\";\nvar result = array.slice(4294967296, 4294967297);\nassert(result.length === 0);\n\narray[4294967293] = \"bar\";\nvar result = array.slice(-4294967297, -4294967296);\nassert(result.length === 0);\n\nvar arr = [1,2];\nArray.prototype[0] = 3;\nvar newArr = arr.slice(0, 1);\ndelete Array.prototype[0];\nassert(newArr.hasOwnProperty(\"0\"));\nassert(newArr[0] === 1);\n\n// Checking behavior when unable to get length\nvar obj = { slice : Array.prototype.slice };\nObject.defineProperty(obj, 'length', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.slice(1, 2);\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = { length : 1, slice : Array.prototype.slice };\nObject.defineProperty(obj, '0', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.slice(0, 1);\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n/* ES v5.1 15.4.4.10.5.\n   Checking behavior when start value throws exception */\nvar arg1 = { };\nObject.defineProperty(arg1, 'valueOf', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\nvar obj = { slice : Array.prototype.slice };\n\ntry {\n  obj.slice(arg1);\n  assert(false);\n} catch (e) {\n  assert(e.message === 'foo');\n  assert(e instanceof ReferenceError);\n}\n\n/* ES v5.1 15.4.4.10.7.\n   Checking behavior when end value throws exception */\nvar arg2 = { };\nObject.defineProperty(arg2, 'valueOf', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\nvar obj = { slice : Array.prototype.slice };\n\ntry {\n  obj.slice(0, arg2);\n  assert(false);\n} catch (e) {\n  assert(e.message === 'foo');\n  assert(e instanceof ReferenceError);\n}\n\n/* ES v5.1 15.4.4.10.10.\n   Checking behavior when unable to get element */\nvar obj = { length : 3, slice : Array.prototype.slice };\nObject.defineProperty(obj, '1', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.slice(0, 3);\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\nfunction array_check(result_array, expected_array) {\n  assert(result_array instanceof Array);\n  assert(result_array.length === expected_array.length);\n  for (var idx = 0; idx < expected_array.length; idx++) {\n    assert(result_array[idx] === expected_array[idx]);\n  }\n}\n\n// Remove the buffer\nvar array = [1, 2, 3, 4, 5];\nvar value = array.slice(4, {\n    valueOf: function() {\n        array.length = 0;\n    }\n})\n\narray_check(value, []);\n\n// Extend the buffer\nvar array = [1, 2, 3, 4, 5];\nvar value = array.slice(6, {\n    valueOf: function() {\n        array.length = 10;\n    }\n})\n\narray_check(value, []);\n\n// Reduce the buffer\nvar array = [1, 2, 3, 4, 5];\nvar value = array.slice(1, {\n    valueOf: function() {\n        array.length = 3;\n    }\n})\n\narray_check(value, []);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-some.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [\"foo\", [], Infinity, 4];\n\nfunction f(arg1, arg2, arg3) {\n  assert(arg1 === array[arg2]);\n  assert(arg3 === array);\n  return false;\n}\n\nassert(array.some(f) === false);\n\nfunction g(arg1, arg2, arg3) {\n  if (arg1 === 1) {\n    return true;\n  } else {\n    return false;\n  }\n}\n\nvar arr1 = [2, 2, 2, 2, 2, 2];\nassert(arr1.some(g) === false);\n\nvar arr2 = [2, 2, 2, 2, 2, 1];\nassert(arr2.some(g) === true);\n\n// Checking behavior when unable to get length\nvar obj = { some : Array.prototype.some };\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.some(f);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = { some : Array.prototype.some, length : 1};\nObject.defineProperty(obj, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.some(f);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-sort.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [\"Peach\", \"Apple\", \"Orange\", \"Grape\", \"Cherry\", \"Apricot\", \"Grapefruit\"];\narray.sort();\n\nassert(array[0] === \"Apple\");\nassert(array[1] === \"Apricot\");\nassert(array[2] === \"Cherry\");\nassert(array[3] === \"Grape\");\nassert(array[4] === \"Grapefruit\");\nassert(array[5] === \"Orange\");\nassert(array[6] === \"Peach\");\n\nvar array = [6, 4, 5, 1, 2, 9, 7, 3, 0, 8];\n\n// Default comparison\narray.sort();\nfor (i = 0; i < array.length; i++) {\n  assert(array[i] === i);\n}\n\n// Using custom comparison function\nfunction f(arg1, arg2) {\n  if (arg1 < arg2) {\n    return 1;\n  } else if (arg1 > arg2) {\n    return -1;\n  } else {\n    return 0;\n  }\n}\n\narray.sort(f);\nfor (i = 0; i < array.length; i++) {\n  assert(array[array.length - i - 1] === i);\n}\n\n// Sorting sparse array\nvar array = [1,,2,,3,,4,undefined,5];\nvar expected = [1,2,3,4,5,undefined,,,,];\n\narray.sort();\n\nassert(array.length === expected.length);\nfor (i = 0; i < array.length; i++) {\n  assert(expected.hasOwnProperty (i) === array.hasOwnProperty (i));\n  assert(array[i] === expected[i]);\n}\n\n// Checking behavior when provided comparefn is not callable\nvar obj = {};\nvar arr = [];\ntry {\n  arr.sort(obj);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Checking behavior when unable to get length\nvar obj = { sort : Array.prototype.sort}\nObject.defineProperty(obj, 'length', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.sort();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = { sort : Array.prototype.sort, length : 1}\nObject.defineProperty(obj, '0', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.sort();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get elements\nvar obj = { sort : Array.prototype.sort, length : 2};\nObject.defineProperty(obj, '0', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\nObject.defineProperty(obj, '1', { 'get' : function () { throw new ReferenceError (\"bar\"); } });\n\ntry {\n  obj.sort();\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when array is non-extensible while sorting\nvar arr = [1, 0];\n\ntry {\n  arr.sort(function () { Object.freeze(arr) });\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Checking behavior when unable to delete property\nvar obj = {sort : Array.prototype.sort, '0' : 2, '1' : 1, length : 4};\nObject.defineProperty(obj, '3', function () {});\n\ntry {\n  obj.sort();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Checking behavior when unable to get the last element\nvar arr = [1, 2, ];\nObject.defineProperty(arr, '2', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  arr.sort();\n  assert(false);\n} catch (e) {\n  assert(e.message === 'foo');\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when lhs_value throws exception at comparefn\nf = function () { throw new ReferenceError('foo'); };\nobj = { 'toString' : f };\narr = [obj, 1];\n\ntry {\n  arr.sort();\n  assert(false);\n} catch (e) {\n  assert(e.message === 'foo');\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when rhs_value throws exception at comparefn\nf = function () { throw new ReferenceError('foo'); };\nobj = { 'toString' : f };\narr = [1, obj];\n\ntry {\n  arr.sort();\n  assert(false);\n} catch (e) {\n  assert(e.message === 'foo');\n  assert(e instanceof ReferenceError);\n}\n\n// Sorting when array elements are the same string\narr = ['foo', 'foo'];\narr.sort();\n\nassert(arr[0] === 'foo');\nassert(arr[1] === 'foo');\n\n// Checking behavior when comparefn's call value cannot be converted to number\nobj = { };\nObject.defineProperty(obj, 'toString', function () { });\nf = function () { return obj };\narr = [1, 2];\n\ntry {\n  arr.sort(f);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-splice.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This test will not pass on FLOAT32 due to precision issues\n\nfunction setDefaultValues()\n{\n  return [54, undefined, -127, \"sunshine\"];\n}\n\nvar array = setDefaultValues();\nvar array1 = array.splice();\n\nassert (array.length == 4);\nassert (array[0] == 54);\nassert (array[1] == undefined);\nassert (array[2] == -127);\nassert (array[3] == \"sunshine\");\nassert (array1.length == 0);\n\n// --------------------------------------------------------\narray = setDefaultValues(); // 54, undefined, -127, \"sunshine\"\nvar array2 = array.splice(2);\n\nassert (array.length == 2);\nassert (array[0] == 54);\nassert (array[1] == undefined);\nassert (array2.length == 2);\nassert (array2[0] == -127);\nassert (array2[1] == \"sunshine\");\n\n// --------------------------------------------------------\narray = setDefaultValues(); // 54, undefined, -127, \"sunshine\"\nvar array3 = array.splice(2, 1);\n\nassert (array.length == 3);\nassert (array[0] == 54);\nassert (array[1] == undefined);\nassert (array[2] == \"sunshine\");\nassert (array3.length == 1);\nassert (array3[0] == -127);\n\n// --------------------------------------------------------\narray = setDefaultValues(); // 54, undefined, -127, \"sunshine\"\nvar array4 = array.splice(0, 3, 6720, \"Szeged\");\n\nassert (array.length == 3);\nassert (array[0] == 6720);\nassert (array[1] == \"Szeged\");\nassert (array[2] == \"sunshine\");\nassert (array4.length == 3);\nassert (array4[0] == 54);\nassert (array4[1] == undefined);\nassert (array4[2] == -127);\n\n// --------------------------------------------------------\narray = setDefaultValues(); // 54, undefined, -127, \"sunshine\"\nvar array5 = array.splice(-2, -2, 6720, \"Szeged\");\n\nassert (array.length == 6);\nassert (array[0] == 54);\nassert (array[1] == undefined);\nassert (array[2] == 6720);\nassert (array[3] == \"Szeged\");\nassert (array[4] == -127);\nassert (array[5] == \"sunshine\");\nassert (array5.length == 0);\n\n// --------------------------------------------------------\narray = setDefaultValues(); // 54, undefined, -127, \"sunshine\"\nvar array6 = array.splice(undefined, undefined, undefined);\n\nassert (array.length == 5);\nassert (array[0] == undefined);\nassert (array[1] == 54);\nassert (array[2] == undefined);\nassert (array[3] == -127);\nassert (array[4] == \"sunshine\");\nassert (array6.length == 0);\n\n// --------------------------------------------------------\narray = setDefaultValues(); // 54, undefined, -127, \"sunshine\"\nvar array7 = array.splice(Infinity, NaN);\nassert (array.length == 4);\nassert (array[0] == 54);\nassert (array[1] == undefined);\nassert (array[2] == -127);\nassert (array[3] == \"sunshine\");\nassert (array7.length == 0);\n\n// --------------------------------------------------------\narray = setDefaultValues(); // 54, undefined, -127, \"sunshine\"\nvar array8 = array.splice(-Infinity, Infinity);\n\nassert (array.length == 0);\nassert (array8.length == 4);\nassert (array8[0] == 54);\nassert (array8[1] == undefined);\nassert (array8[2] == -127);\nassert (array8[3] == \"sunshine\");\n\n// --------------------------------------------------------\narray = setDefaultValues(); // 54, undefined, -127, \"sunshine\"\nvar array9 = array.splice(NaN, -Infinity);\nassert (array.length == 4);\nassert (array[0] == 54);\nassert (array[1] == undefined);\nassert (array[2] == -127);\nassert (array[3] == \"sunshine\");\nassert (array9.length == 0);\n\n// --------------------------------------------------------\narray = setDefaultValues(); // 54, undefined, -127, \"sunshine\"\nvar array10 = array.splice(-3, 4, Infinity, \"university\");\nassert (array.length == 3);\nassert (array[0] == 54);\nassert (array[1] == Infinity);\nassert (array[2] == \"university\");\nassert (array10.length == 3);\nassert (array10[0] == undefined);\nassert (array10[1] == -127);\nassert (array10[2] == \"sunshine\");\n\nvar array = [];\narray[4294967294] = \"foo\";\nvar result = array.splice(4294967294, 1, \"x\")\nassert(result.length === 1)\nassert(result[0] === \"foo\")\nassert(array[4294967294] === \"x\")\n\narray[0] = \"bar\";\nvar result = array.splice(-4294967295, 1, \"y\");\nassert(result.length === 1)\nassert(result[0] === \"bar\")\nassert(array[0] === \"y\")\n\nvar arr = [1,2];\nArray.prototype[0] = 3;\nvar newArr = arr.splice(0, 1);\ndelete Array.prototype[0];\nassert(newArr.hasOwnProperty(\"0\"));\nassert(newArr[0] === 1);\n\n// Checking behavior when unable to get length\nvar obj = {splice : Array.prototype.splice};\nObject.defineProperty(obj, 'length', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.splice(1, 2, \"item1\", \"item2\");\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = {length : 1, splice : Array.prototype.splice};\nObject.defineProperty(obj, '0', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.splice(0, 1, \"item1\", \"item2\");\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n/* ES v5.1 15.4.4.12.5.\n   Checking behavior when the first argument of the function is an object, which throws error */\ntry {\n  var o = {};\n  Object.defineProperty(o, 'toString', { 'get' : function() { throw new ReferenceError(\"1\"); } });\n  [1, 2].splice(o);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n  assert(e.message == \"1\");\n}\n\n/* ES v5.1 15.4.4.12.7.\n   Checking behavior when the second argument of the function is an object, which throws error */\ntry {\n  var o = {};\n  Object.defineProperty(o, 'toString', { 'get' : function() { throw new ReferenceError(\"2\"); } });\n  [1, 2].splice(1, o);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n  assert(e.message == \"2\");\n}\n\n/* ES v5.1 15.4.4.12.9.b\n   Checking behavior when the first element throws error */\ntry {\n  var a = [1, 5, 6, 7, 8, 5];\n  Object.defineProperty(a, '0', { 'get' : function() { throw new ReferenceError(\"foo0\"); } });\n  Array.prototype.splice.call(a, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n  assert(e.message == \"foo0\");\n}\n\n/* ES v5.1 15.4.4.12.12.b.iii.\n   Checking behavior when an element of the array throws error */\nfunction f0() { throw new TypeError(\"4\"); };\n\ntry {\n  obj = {get: f0, valueOf : f0, toString: f0};\n  arr = [1, 2, obj, 4, 5];\n  Object.defineProperty(arr, '4', { 'get' : f0 });\n  arr.splice(1, 3, obj);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n  assert(e.message == \"4\");\n}\n\n/* ES v5.1 15.4.4.12 12.b.iv.\n   Checking behavior when a modified object is an element of the array */\nfunction f() {\n  delete arr[3];\n  arr.length = 13;\n  Object.defineProperty(arr, '5', function() { });\n};\n\ntry {\n  obj = {get: f, valueOf : f, toString: f};\n  arr = [1, 2, obj, 4, 5];\n  Object.defineProperty(arr, '2',{ 'get' : f } );\n  for(var i = 0; i < arr.length; i++) {\n    var a = arr[i];\n  }\n  arr.splice(1, 4, obj);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.12.12.b.v.\n   Checking behavior when elements are getting deleted by an element which only has a get function */\nfunction f1() {\n  for(var i = 0; i < arr.length; i++) {\n    delete arr[i];\n  }\n};\n\ntry{\n  arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n  delete arr[2];\n  Object.defineProperty(arr, '2', { 'get' : f1 });\n  arr.splice(1, 7, 5);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.12.12.d.i.\n   Checking behavior when a modified object is an element of the array and deletes the elements */\nfunction f2() {\n  for(var i = 0; i < arr.length; i++) {\n    delete arr[i];\n  }\n};\n\ntry {\n  obj = {get: f2, valueOf : f2, toString: f2 };\n  arr = [1, 2, obj, 4, 5];\n  for(var i = 0; i < 6; i++) {\n    Object.defineProperty(arr, i, { 'get' : f2 });\n  }\n  arr.splice(1, 3, obj);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.12.13.b.iii.\n   Checking behavior when a yet non existing element will throw an error */\nfunction f3() { throw new TypeError(\"6\");};\n\ntry {\n  arr = [1, 2, 4, 5];\n  Object.defineProperty(arr, '4',{ 'get' : f3 });\n  arr.splice(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n  assert(e.message == \"6\");\n}\n\n/* ES v5.1 15.4.4.12.13.b.iv.2.\n   Checking behavior when the last element gets deleted */\nfunction f4() { delete arr[23]; };\n\ntry {\n  arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24];\n  delete arr[23];\n  Object.defineProperty(arr, '23', { 'get' : f4 });\n  arr.splice(1, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.12.13.b.v.1.\n   Checking behavior when the last element throws error */\nfunction f5() {\n  for(var i = 0; i < arr.length; i++) {\n    delete arr[i];\n  }\n};\n\ntry {\n  arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24];\n  delete arr[23];\n  Object.defineProperty(arr, '23', { 'get' : f5 });\n  arr.splice(1, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.12.15.b.\n   Checking behavior when the issue is the same as above, but splice has more arguments */\nfunction f6() {\n  for(var i = 0; i < arr.length; i++) {\n    delete arr[i];\n  }\n};\n\ntry {\n  arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  delete arr[2];\n  Object.defineProperty(arr, '2', { 'get' : f6 });\n  arr.splice(1, 7, 5, 5, 5, 5);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.12.16.\n   Checking behavior when the array is empty, large, and not writable */\ntry {\n  arr = [];\n  Object.defineProperty(arr, 'length', { value : 999, writable: false });\n  arr.splice(1, 2, 4, 5);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-tolocalestring.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert ([].toLocaleString() === \"\");\nassert ([1].toLocaleString() === \"1\");\nassert ([1,2].toLocaleString() === \"1,2\");\nassert ([1,2,3].toLocaleString() === \"1,2,3\");\n\nvar test_ok = {\n  length: 1,\n  toLocaleString: function() { return \"1\"; }\n};\n\nassert ([3, test_ok, 4, test_ok].toLocaleString() === \"3,1,4,1\");\n\n\nvar obj = { toLocaleString: function() {} };\nvar test_non_str_locale = [undefined, obj, null, obj, obj];\n\nassert(test_non_str_locale.toLocaleString() === \",undefined,,undefined,undefined\");\n\nvar test_fail = {\n  toLocaleString: \"FAIL\"\n};\n\ntry {\n  [test_fail].toLocaleString();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n\nvar test_fail_call = {\n  toLocaleString: function() { throw new ReferenceError(\"foo\"); }\n};\n\n\ntry {\n  [1, 2, test_fail_call].toLocaleString();\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-tostring.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Our own join method if the internal join is not implemented.\nfunction join(sep)\n{\n  sep = sep ? sep : \",\";\n  var result = \"\";\n\n  for (var i = 0; i < this.length; ++i) {\n    result += this[i];\n    if (i + 1 < this.length) {\n      result += sep;\n    }\n  }\n\n  return result;\n}\n\n// Force fallback to object.prototype.toString()\nArray.prototype.join = 1;\n\nassert ([1].toString() === \"[object Array]\");\n\nArray.prototype.join = join;\n\nassert ([1, 2].toString() === \"1,2\");\n\nvar test = [1,2,3];\ntest.join = function() { throw ReferenceError (\"foo\"); };\n\ntry {\n  test.toString();\n\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n\n// Test if the join returns a ReferenceError\nvar arr = [1,2]\nObject.defineProperty(arr, 'join', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\ntry {\n  arr.toString();\n\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array-prototype-unshift.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = []\n\nassert(array.length === 0);\n\narray.unshift(\"foo\");\nassert(array.length === 1);\nassert(array[0] === \"foo\");\n\narray.unshift(new Array())\nassert(array.length === 2);\nassert(array[0] instanceof Array);\nassert(array[1] === \"foo\")\n\narray.unshift(Infinity);\nassert(array.length === 3);\nassert(array[0] === Infinity);\nassert(array[1] instanceof Array);\nassert(array[2] === \"foo\")\n\narray.unshift(\"bar\", 0);\nassert(array.length === 5);\nassert(array[0] === \"bar\");\nassert(array[1] === 0);\nassert(array[2] === Infinity);\nassert(array[3] instanceof Array);\nassert(array[4] === \"foo\")\n\n\n// Checking behavior when no length property defined\nvar obj = { unshift : Array.prototype.unshift };\n\nassert(obj.length === undefined);\nobj.unshift(1,2,3);\nassert(obj.length === 3);\n\n// Checking behavior when unable to get length\nvar obj = { unshift : Array.prototype.unshift };\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.unshift(1);\n  assert(false)\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to set length\nvar obj = { unshift : Array.prototype.unshift };\nObject.defineProperty(obj, 'length', { 'set' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.unshift(2);\n  assert(false)\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable shift elements\nvar obj = { unshift : Array.prototype.unshift, length : 1 };\nObject.defineProperty(obj, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.unshift(3);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\nvar obj = { unshift : Array.prototype.unshift, length : 1 };\nObject.defineProperty(obj, '0', { 'set' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.unshift(4);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when a property is not defined\nvar obj = { '0' : \"foo\", '2' : \"bar\", length : 3, unshift : Array.prototype.unshift };\nassert(obj.unshift(\"baz\") === 4);\nassert(obj[0] === \"baz\");\nassert(obj[1] === \"foo\");\nassert(obj[2] === undefined);\nassert(obj[3] === \"bar\");\n\n/* ES v5.1 15.4.4.13.6.d.ii.\n   Checking behavior when the array is freezed */\ntry {\n  var arr = [0, 1];\n  Object.freeze(arr);\n  Array.prototype.unshift.call(arr, 2, 3);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* ES v5.1 15.4.4.13.6.e.i.\n   Checking behavior when the array has only one property and bigger length */\ntry {\n  var arr = { length : 9 };\n  Object.defineProperty(arr, '6', { value : 2 });\n  Array.prototype.unshift.call(arr, 2, 3);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/array.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar cars = [\"Saab\", \"Volvo\", \"BMW\"];\n\nassert (cars[0] === \"Saab\");\nassert (cars[1] === \"Volvo\");\nassert (cars[2] === \"BMW\");\n\nvar cars1 = new Array(\"Saab\", \"Volvo\", \"BMW\");\nassert (cars[0] === cars1[0]);\nassert (cars[1] === cars1[1]);\nassert (cars[2] === cars1[2]);\n\nvar a = new Array();\nassert (typeof (a) === \"object\");\nassert (Array.isArray (a));\nassert (Array.isArray ([1, 2, 3]));\n\nvar b = new Array (30000);\nassert(b.length === 30000);\nassert (b[20000] === undefined);\nb[20000] = 1;\nassert (b[20000] === 1);\nb[20000] = 10;\nassert (b[20000] === 10);\n\nassert(b.length === 30000);\nassert(b[10000] === undefined);\nObject.defineProperty (b, '10000', {value : 25, writable : false});\nassert(b[10000] === 25);\nb[10000] = 30;\nassert(b[10000] === 25);\n\nassert(b.length === 30000);\nassert(b[50000] === undefined);\nassert(b.length === 30000);\nb[50000] = 5;\nassert(b.length === 50001);\nassert(b[50000] === 5);\nb[50000] = 10;\nassert(b[50000] === 10);\nObject.defineProperty (b, '50000', {writable : false});\nassert(b[50000] === 10);\nb[50000] = 20;\nassert(b[50000] === 10);\n\nObject.defineProperty (b, '50000', {writable : true});\nassert(b[50000] === 10);\nb[50000] = 30;\nassert(b[50000] === 30);\n\nb.length = 5;\nassert(b[50000] === undefined);\n\nassert(([1, 2, 3]).length === 3);\n\nassert(Array.prototype.constructor === Array);\nassert(Array.prototype.length === 0);\nArray.prototype[0] = 'string value';\nassert(Array.prototype.length === 1);\nassert(Array.prototype[0] === 'string value');\n\nvar c = [0,,,'3'];\nassert (c[0] === 0);\nassert (c[1] === undefined);\nassert (c[2] === undefined);\nassert (c[3] === '3');\n\nb[0] = 1;\nc[0] += b[0];\nassert (c[0] == 1);\n\nvar arr = [\n  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,\n  17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,\n  33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,\n  49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,\n  65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,\n  81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,\n  97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,\n  113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,\n  129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,\n  145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,\n  161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,\n  177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,\n  193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,\n  209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,\n  225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,\n  241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,\n  257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,\n  273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,\n  289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,\n  305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,\n  321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,\n  337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,\n  353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,\n  369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,\n  385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,\n  401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,\n  417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,\n  433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,\n  449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,\n  465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,\n  481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,\n  497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,\n  513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,\n  529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,\n  545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,\n  561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,\n  577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,\n  593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,\n  609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,\n  625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,\n  641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,\n  657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,\n  673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688,\n  689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,\n  705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,\n  721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,\n  737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,\n  753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768,\n  769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784,\n  785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800,\n  801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816,\n  817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832,\n  833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848,\n  849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864,\n  865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880,\n  881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896,\n  897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912,\n  913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928,\n  929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944,\n  945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960,\n  961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976,\n  977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992,\n  993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008,\n  1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024 ];\n\nfor (i = 0; i < 1024; i++)\n{\n  assert (arr[i] === i + 1);\n}\n\nvar elision = [0,,2 ,3];\nassert (elision.hasOwnProperty(1) == false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/assignments.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar b = 5;\n\nassert((b += 10) == 15);\nassert((b -= 3) == 12);\nassert((b *= 10) == 120);\nassert((b /= 10) == 12);\nassert((b %= 10) == 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/bitwise-logic.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((5 & 2) === 0);\nassert((2 & 2) === 2);\nassert((5 | 2) === 7);\nassert((5 | 5) === 5);\nassert((5 ^ 2) === 7);\nassert((5 ^ 5) === 0);\nassert((~5) == -6);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/break-continue-nested-to-try-with-blocks.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* with */\n\nfor (var i = 0; i < 10; i++)\n{\n  with ({})\n  {\n    break;\n\n    assert (false);\n  }\n}\nassert (i === 0);\n\nfor (var i = 0; i < 10; i++)\n{\n  with ({})\n  {\n    continue;\n\n    assert (false);\n  }\n}\nassert (i === 10);\n\n/* try */\nfor (var i = 0; i < 10; i++)\n{\n  try\n  {\n    break;\n\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n}\nassert (i === 0);\n\nfor (var i = 0; i < 10; i++)\n{\n  try\n  {\n    continue;\n\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n}\nassert (i === 10);\n\n/* catch */\nfor (var i = 0; i < 10; i++)\n{\n  try\n  {\n    throw new TypeError ();\n    assert (false);\n  }\n  catch (e)\n  {\n    break;\n    assert (false);\n  }\n}\nassert (i === 0);\n\nfor (var i = 0; i < 10; i++)\n{\n  try\n  {\n    throw new TypeError ();\n    assert (false);\n  }\n  catch (e)\n  {\n    continue;\n    assert (false);\n  }\n}\nassert (i === 10);\n\n\n/* finally */\nfor (var i = 0; i < 10; i++)\n{\n  try\n  {\n    throw new TypeError ();\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n  finally\n  {\n    break;\n    assert (false);\n  }\n}\nassert (i === 0);\n\nfor (var i = 0; i < 10; i++)\n{\n  try\n  {\n    throw new TypeError ();\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n  finally\n  {\n    continue;\n    assert (false);\n  }\n}\nassert (i === 10);\n\n\n/* with - switch */\n\nstr = '';\nfor (var i = 0; i < 10; i++)\n{\n  with ({})\n  {\n    switch (i)\n    {\n      case 0:\n        str += 'A';\n        break;\n      default:\n        str += 'B';\n        continue;\n    }\n\n    str += 'C';\n  }\n}\nassert (str === 'ACBBBBBBBBB');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/builtin-constructor-class.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nFunction.prototype.toString = Object.prototype.toString;\nassert(Array.toString() === \"[object Function]\");\nassert(Number.toString() === \"[object Function]\");\nassert(String.toString() === \"[object Function]\");\nassert(Boolean.toString() === \"[object Function]\");\nassert(Object.toString() === \"[object Function]\");\nassert(Function.toString() === \"[object Function]\");\nassert(Date.toString() === \"[object Function]\");\nassert(RegExp.toString() === \"[object Function]\");\n\nassert(Math.toString() === \"[object Math]\");\nassert(JSON.toString() === \"[object JSON]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/builtin-prototypes.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nassert (Object.prototype.toString.call (String.prototype) === '[object String]');\nassert (String.prototype.toString() === \"\");\n\nassert (Object.prototype.toString.call (Boolean.prototype) === '[object Boolean]');\nassert (Boolean.prototype.valueOf() === false);\n\nassert (Object.prototype.toString.call (Number.prototype) === '[object Number]');\nassert (Number.prototype.valueOf() === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/date-annexb.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar d = new Date(1999, 1, 1);\nassert (d.getYear() === 99);\nd = new Date(1874, 4, 9);\nassert (d.getYear() === -26);\nd = new Date(2015, 8, 17);\nassert (d.getYear() === 115);\nd = new Date(NaN);\nassert (isNaN (d.getYear()));\n\nvar d = new Date();\nd.setYear(91);\nassert (d.getFullYear() === 1991 && d.getYear() === 91);\n\nd = new Date();\nd.setYear(NaN);\nassert (isNaN(d.valueOf()));\n\nd = new Date();\nd.setYear(2015);\nassert (d.getFullYear() === 2015);\n\nd = new Date(2000, 1, 29);\nd.setYear(2004);\nassert (d.getFullYear() === 2004 && d.getMonth() === 1 && d.getDate() === 29);\nd.setYear(2015);\nassert (d.getFullYear() === 2015 && d.getMonth() === 2 && d.getDate() === 1);\n\nassert (/Thu, 17 Sep 2015 \\d{2}:\\d{2}:\\d{2} GMT/.test (new Date(\"2015-09-17\").toGMTString()));\n\nd = new Date(NaN);\nassert (d.toGMTString() === \"Invalid Date\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/date-construct.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (Date.length == 7);\n\nvar d;\n\ntry\n{\n  d = new Date({toString: function() { throw new Error(\"foo\"); }});\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof Error);\n  assert (e.message === \"foo\");\n}\n\nd = new Date(\"abcd\");\nassert (isNaN(d.valueOf()));\n\nd = new Date();\nassert (!isNaN(d.valueOf()));\n\nd = new Date(\"2015-01-01\");\nassert (d.valueOf() == 1420070400000);\n\nd = new Date(1420070400000);\nassert (d.valueOf() == 1420070400000);\n\nd = new Date(2015,0,1,0,0,0,0);\nassert (d.valueOf() - (d.getTimezoneOffset() * 60000) == 1420070400000);\n\nd = new Date(8.64e+15);\nassert (d.valueOf() == 8.64e+15);\n\nd = new Date(8.64e+15 + 1);\nassert (isNaN(d.valueOf()));\n\nd = new Date(20000000, 0, 1);\nassert (isNaN(d.valueOf()));\n\nd = new Date(0, 20000000, 1);\nassert (isNaN(d.valueOf()));\n\nvar Obj = function (val)\n{\n  this.value = val;\n  this.valueOf = function () { throw new ReferenceError (\"valueOf-\" + this.value); };\n  this.toString = function () { throw new ReferenceError (\"toString-\"+ this.value); };\n};\n\ntry\n{\n  d = new Date (new Obj (1), new Obj (2));\n  // Should not be reached.\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n  assert (e.message === \"valueOf-1\");\n}\n\nassert (typeof Date (2015) == \"string\");\nassert (typeof Date() != typeof (new Date ()));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/date-getters.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* 1. test case */\nvar d = new Date(2015, 6, 9, 12, 13, 14, 121);\n\nassert (d.getFullYear() == 2015);\nassert (d.getUTCFullYear() == 2015);\nassert (d.getMonth() == 6);\nassert (d.getUTCMonth() == 6);\nassert (d.getDate() == 9);\nassert (d.getUTCDate() == 9);\nassert (d.getDay() == 4);\nassert (d.getUTCDay() == 4);\nassert (d.getHours() == 12);\nassert (d.getUTCHours() == (12 + d.getTimezoneOffset() / 60));\nassert (d.getMinutes() == 13);\nassert (d.getUTCMinutes() == 13);\nassert (d.getSeconds() == 14);\nassert (d.getUTCSeconds() == 14);\nassert (d.getMilliseconds() == 121);\nassert (d.getUTCMilliseconds() == 121);\n\n/* 2. test case */\nvar d = new Date(\"2015-07-09T12:13:14.121+01:30\");\n\nassert (d.getFullYear() == 2015);\nassert (d.getUTCFullYear() == 2015);\nassert (d.getMonth() == 6);\nassert (d.getUTCMonth() == 6);\nassert (d.getDate() == 9);\nassert (d.getUTCDate() == 9);\nassert (d.getDay() == 4);\nassert (d.getUTCDay() == 4);\nassert (d.getHours() == Math.floor(12 - 1.5 + d.getTimezoneOffset() / 60));\nassert (d.getUTCHours() == Math.floor(12 - 1.5));\nassert (d.getMinutes() == 43);\nassert (d.getUTCMinutes() == 43);\nassert (d.getSeconds() == 14);\nassert (d.getUTCSeconds() == 14);\nassert (d.getMilliseconds() == 121);\nassert (d.getUTCMilliseconds() == 121);\n\n/* 3. test case */\nvar d = new Date(0);\n\nassert (d.getFullYear() == 1970);\nassert (d.getUTCFullYear() == 1970);\nassert (d.getMonth() == 0);\nassert (d.getUTCMonth() == 0);\nassert (d.getDate() == 1);\nassert (d.getUTCDate() == 1);\nassert (d.getDay() == 4);\nassert (d.getUTCDay() == 4);\nassert (d.getHours() == 0 - (d.getTimezoneOffset() / 60));\nassert (d.getUTCHours() == 0);\nassert (d.getMinutes() == 0);\nassert (d.getUTCMinutes() == 0);\nassert (d.getSeconds() == 0);\nassert (d.getUTCSeconds() == 0);\nassert (d.getMilliseconds() == 0);\nassert (d.getUTCMilliseconds() == 0);\n\n/* 4. test case */\nvar d = new Date(\"abcd\");\nassert (isNaN (d));\n\nassert (isNaN (d.getFullYear()));\nassert (isNaN (d.getUTCFullYear()));\nassert (isNaN (d.getMonth()));\nassert (isNaN (d.getUTCMonth()));\nassert (isNaN (d.getDate()));\nassert (isNaN (d.getUTCDate()));\nassert (isNaN (d.getDay()));\nassert (isNaN (d.getUTCDay()));\nassert (isNaN (d.getHours()));\nassert (isNaN (d.getUTCHours()));\nassert (isNaN (d.getMinutes()));\nassert (isNaN (d.getUTCMinutes()));\nassert (isNaN (d.getSeconds()));\nassert (isNaN (d.getUTCSeconds()));\nassert (isNaN (d.getMilliseconds()));\nassert (isNaN (d.getUTCMilliseconds()));\nassert (isNaN (d.getTimezoneOffset()));\n\n/* 5. test case */\nassert (new Date(2013, -1).getMonth() === 11);\nassert (new Date(-2, -2).getFullYear() === -3);\nassert (new Date(-1, -1).getFullYear() === -2);\nassert (new Date(-1, -1, -1).getMonth() === 10);\nassert (new Date(-1, -1, -1, -1).getDate() === 28);\nassert (new Date(-1, -1, -1, -1, -1).getHours() === 22);\nassert (new Date(-1, -1, -1, -1, -1, -1).getMinutes() === 58);\nassert (new Date(-1, -1, -1, -1, -1, -1, -1).getSeconds() === 58);\nassert (new Date(-1, -1, -1, -1, -1, -1, -1, -1).getMilliseconds() === 999);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/date-parse.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar wrongFormats = [\"\",\n                    \"2\",\n                    \"20\",\n                    \"201\",\n                    \"2015-\",\n                    \"2015-01-\",\n                    \"2015-01-01-\",\n                    \"qwerty\",\n                    \"2015-01-01T\",\n                    \"2015-01-01T1:1\",\n                    \"2015-01-01T01\",\n                    \"2015-01-01T01\",\n                    \"2015-01-01T01:01F\",\n                    \"T2015\",\n                    \"2015-01-01Z\",\n                    \"2015-01-01+01:00\",\n                    \"2015-01-01T00:00+01\",\n                    \"2015-01-01T00:00+1\",\n                    \"2015-01-01T00:00-01\",\n                    \"2015-01-01T00:00.000\",\n                    \"2015-01-01T00:00:\",\n                    \"2015-01-01T00:\",\n                    \"2015-01-01T00:00:00.1\",\n                    \"2015-01-01T00:00:00.01\",\n                    \"2015-01-01T24:01:00.000\",\n                    \"2015-01-01T24:00:01.000\",\n                    \"2015-01-01T24:00:00.001\",\n                    \"2015-01-01T00:00+01:00Z\",\n                    \"2015/01/01\",\n                    \"2015-01-32\",\n                    \"2015--1\",\n                    \"2015-13\",\n                    \"2015-01--1\",\n                    \"-215\",\n                    \"-215-01-01\",\n                    \"2015-01-00\",\n                    \"2015-01-01T25:00\",\n                    \"2015-01-01T00:60\",\n                    \"2015-01-01T-1:00\",\n                    \"2015-01-01T00:-1\",\n                    \"2e+3\",\n                    \"+2015-01-01\",\n                    \"-2015-01-01\",\n                    \"+02015-01-01\",\n                    \"-02015-01-01\",\n                    \"002015-01-01\",\n                    \"+0002015-01-01\",\n                    \"-0002015-01-01\",\n                    \"2015-01T00:00:00.000-03X00\",\n                    \"2015-01-01T00-03:00\",\n                    \"Fri Jan 01 1 00:00:00 GMT+0000\",\n                    \"Fri Jan 01 11 00:00:00 GMT+0000\",\n                    \"Fri Jan 01 111 00:00:00 GMT+0000\",\n                    \"Fri Jan 01 1234567 00:00:00 GMT+0000\",\n                    \"Fri Jan 01 +1000 00:00:00 GMT+0000\",\n                    \"Fri Jan 01 -1 00:00:00 GMT+0000\",\n                    \"Fri Jan 01 -11 00:00:00 GMT+0000\",\n                    \"Fri Jan 01 -111 00:00:00 GMT+0000\",\n                    \"Fri Jan 01 -1234567 00:00:00 GMT+0000\",\n                    \"Thu Apr 10 1997\"];\n\nfor (i in wrongFormats) {\n  var d = Date.parse(wrongFormats[i]);\n  assert (isNaN(d));\n}\n\nvar d;\n\nd = Date.parse(undefined);\nassert (isNaN(d));\n\nd = Date.parse({});\nassert (isNaN(d));\n\nd = Date.parse(2000 + 15);\nassert (d == 1420070400000);\n\nd = Date.parse(\"2015\");\nassert (d == 1420070400000);\n\nd = Date.parse(\"2015-01\");\nassert (d == 1420070400000);\n\nd = Date.parse(\"2015-01-01\");\nassert (d == 1420070400000);\n\nvar timezoneOffsetMS = new Date(0).getTimezoneOffset() * 60000;\n\nd = Date.parse(\"2015-01T00:00\");\nassert (d == 1420070400000 + timezoneOffsetMS);\n\nd = Date.parse(\"2015-01T00:00:00\");\nassert (d == 1420070400000 + timezoneOffsetMS);\n\nd = Date.parse(\"2015-01T00:00:00.000\");\nassert (d == 1420070400000 + timezoneOffsetMS);\n\nd = Date.parse(\"2015-01T24:00:00.000\");\nassert (d == 1420156800000 + timezoneOffsetMS);\n\nd = Date.parse(\"2015-01T00:00:00.000+03:00\");\nassert (d == 1420059600000);\n\nd = Date.parse(\"2015-01T00:00:00.000-03:00\");\nassert (d == 1420081200000);\n\nd = Date.parse(\"2015-07-03T14:35:43.123+01:30\");\nassert (d == 1435928743123);\n\nassert (isNaN(Date.parse(\"-271821-04-19T23:59:59.999Z\"))) // -8640000000000001 - out of range\nassert (Date.parse(\"-271821-04-20T00:00:00.000Z\") == -8640000000000000)\nassert (Date.parse(\"-000001-12-31T23:59:59.999Z\") == -62167219200001)\nassert (Date.parse(\"0000-01-01T00:00:00.000Z\") == -62167219200000)\nassert (Date.parse(\"0009-12-31T23:59:59.999Z\") == -61851600000001)\nassert (Date.parse(\"0010-01-01T00:00:00.000Z\") == -61851600000000)\nassert (Date.parse(\"0099-12-31T23:59:59.999Z\") == -59011459200001)\nassert (Date.parse(\"0100-01-01T00:00:00.000Z\") == -59011459200000)\nassert (Date.parse(\"0999-12-31T23:59:59.999Z\") == -30610224000001)\nassert (Date.parse(\"1000-01-01T00:00:00.000Z\") == -30610224000000)\nassert (Date.parse(\"1969-12-31T23:59:59.999Z\") == -1)\nassert (Date.parse(\"1970-01-01T00:00:00.000Z\") == 0)\nassert (Date.parse(\"1970-01-01T00:00:00.001Z\") == 1)\nassert (Date.parse(\"9999-12-31T23:59:59.999Z\") == 253402300799999)\nassert (Date.parse(\"+010000-01-01T00:00:00.000Z\") == 253402300800000)\nassert (Date.parse(\"+275760-09-13T00:00:00.000Z\") == 8640000000000000)\nassert (isNaN(Date.parse(\"+275760-09-13T00:00:00.001Z\"))) // 8640000000000001 - out of range\n\n// Date.toString() format\nassert (isNaN(Date.parse(\"Mon Apr 19 -271821 23:59:59 GMT+0000\"))) // -8640000000001000 - out of range\nassert (Date.parse(\"Tue Apr 20 -271821 00:00:00 GMT+0000\") == -8640000000000000)\nassert (Date.parse(\"Fri Dec 31 -0001 23:59:59 GMT+0000\") == -62167219201000)\nassert (Date.parse(\"Sat Jan 01 0000 00:00:00 GMT+0000\") == -62167219200000)\nassert (Date.parse(\"Thu Dec 31 0009 23:59:59 GMT+0000\") == -61851600001000)\nassert (Date.parse(\"Fri Jan 01 0010 00:00:00 GMT+0000\") == -61851600000000)\nassert (Date.parse(\"Thu Dec 31 0099 23:59:59 GMT+0000\") == -59011459201000)\nassert (Date.parse(\"Fri Jan 01 0100 00:00:00 GMT+0000\") == -59011459200000)\nassert (Date.parse(\"Tue Dec 31 0999 23:59:59 GMT+0000\") == -30610224001000)\nassert (Date.parse(\"Wed Jan 01 1000 00:00:00 GMT+0000\") == -30610224000000)\nassert (Date.parse(\"Wed Dec 31 1969 23:59:59 GMT+0000\") == -1000)\nassert (Date.parse(\"Thu Jan 01 1970 00:00:00 GMT+0000\") == 0)\nassert (Date.parse(\"Thu Jan 01 1970 00:00:01 GMT+0000\") == 1000)\nassert (Date.parse(\"Fri Dec 31 9999 23:59:59 GMT+0000\") == 253402300799000)\nassert (Date.parse(\"Sat Jan 01 10000 00:00:00 GMT+0000\") == 253402300800000)\nassert (Date.parse(\"Sat Sep 13 275760 00:00:00 GMT+0000\") == 8640000000000000)\nassert (isNaN(Date.parse(\"Sat Sep 13 275760 00:00:01 GMT+0000\"))) // 8640000000001000 - out of range\n\n// Date.toUTCString() format\nassert (isNaN(Date.parse(\"Mon, 19 Apr -271821 23:59:59 GMT\"))) // -8640000000001000 - out of range\nassert (Date.parse(\"Tue, 20 Apr -271821 00:00:00 GMT\") == -8640000000000000)\nassert (Date.parse(\"Fri, 31 Dec -0001 23:59:59 GMT\") == -62167219201000)\nassert (Date.parse(\"Sat, 01 Jan 0000 00:00:00 GMT\") == -62167219200000)\nassert (Date.parse(\"Thu, 31 Dec 0009 23:59:59 GMT\") == -61851600001000)\nassert (Date.parse(\"Fri, 01 Jan 0010 00:00:00 GMT\") == -61851600000000)\nassert (Date.parse(\"Thu, 31 Dec 0099 23:59:59 GMT\") == -59011459201000)\nassert (Date.parse(\"Fri, 01 Jan 0100 00:00:00 GMT\") == -59011459200000)\nassert (Date.parse(\"Tue, 31 Dec 0999 23:59:59 GMT\") == -30610224001000)\nassert (Date.parse(\"Wed, 01 Jan 1000 00:00:00 GMT\") == -30610224000000)\nassert (Date.parse(\"Wed, 31 Dec 1969 23:59:59 GMT\") == -1000)\nassert (Date.parse(\"Thu, 01 Jan 1970 00:00:00 GMT\") == 0)\nassert (Date.parse(\"Thu, 01 Jan 1970 00:00:01 GMT\") == 1000)\nassert (Date.parse(\"Fri, 31 Dec 9999 23:59:59 GMT\") == 253402300799000)\nassert (Date.parse(\"Sat, 01 Jan 10000 00:00:00 GMT\") == 253402300800000)\nassert (Date.parse(\"Sat, 13 Sep 275760 00:00:00 GMT\") == 8640000000000000)\nassert (isNaN(Date.parse(\"Sat, 13 Sep 275760 00:00:01 GMT\"))) // 8640000000001000 - out of range\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/date-setters.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar ms = 1;\nvar sec = 1000 * ms;\nvar min = 60 * sec;\nvar hour = 60 * min;\nvar day = 24 * hour; /* 86400000 */\nvar d = new Date();\n\n/* 15.9.5.27 Date.prototype.setTime (time) */\nassert (d.setTime(0) == 0);\nd.setTime(0);\nassert (d.setTime(day) == day);\nassert (d.getDate() == 2);\n\n/* 15.9.5.28 Date.prototype.setMilliseconds (ms) */\nd.setTime(0);\nassert (d.setMilliseconds(1) == ms);\nassert (d.getMilliseconds() == 1);\n\n/* 15.9.5.29 Date.prototype.setUTCMilliseconds (ms) */\nd.setTime(0);\nassert (d.setUTCMilliseconds(1) == ms);\nassert (d.getUTCMilliseconds() == 1);\n\n/* 15.9.5.30 Date.prototype.setSeconds (sec [, ms ] ) */\nd.setTime(0);\nassert (d.setSeconds(1) == sec);\nassert (d.getSeconds() == 1);\nd.setTime(0);\nassert (d.setSeconds(1, 1) == sec + ms);\nassert (d.getSeconds() == 1);\nassert (d.getMilliseconds() == 1);\n\n/* 15.9.5.31 Date.prototype.setUTCSeconds (sec [, ms ] ) */\nd.setTime(0);\nassert (d.setUTCSeconds(1) == sec);\nassert (d.getUTCSeconds() == 1);\nd.setTime(0);\nassert (d.setUTCSeconds(1, 1) == sec + ms);\nassert (d.getUTCSeconds() == 1);\nassert (d.getUTCMilliseconds() == 1);\n\n/* 15.9.5.32 Date.prototype.setMinutes (min [, sec [, ms ] ] ) */\nd.setTime(0);\nassert (d.setMinutes(1) == min);\nassert (d.getMinutes() == 1);\nd.setTime(0);\nassert (d.setMinutes(1, 1) == min + sec);\nassert (d.getMinutes() == 1);\nassert (d.getSeconds() == 1);\nd.setTime(0);\nassert (d.setMinutes(1, 1, 1) == min + sec + ms);\nassert (d.getMinutes() == 1);\nassert (d.getSeconds() == 1);\nassert (d.getMilliseconds() == 1);\n\n/* 15.9.5.33 Date.prototype.setUTCMinutes (min [, sec [, ms ] ] ) */\nd.setTime(0);\nassert (d.setUTCMinutes(1) == min);\nassert (d.getUTCMinutes() == 1);\nd.setTime(0);\nassert (d.setUTCMinutes(1, 1) == min + sec);\nassert (d.getUTCMinutes() == 1);\nassert (d.getUTCSeconds() == 1);\nd.setTime(0);\nassert (d.setUTCMinutes(1, 1, 1) == min + sec + ms);\nassert (d.getUTCMinutes() == 1);\nassert (d.getUTCSeconds() == 1);\nassert (d.getUTCMilliseconds() == 1);\n\n/* 15.9.5.34 Date.prototype.setHours (hour [, min [, sec [, ms ] ] ] ) */\nd.setTime(0);\nassert (d.setHours(1) == hour + d.getTimezoneOffset() * 60000);\nassert (d.getHours() == 1);\nd.setTime(0);\nassert (d.setHours(1, 1) == hour + min + d.getTimezoneOffset() * 60000);\nassert (d.getHours() == 1);\nassert (d.getMinutes() == 1);\nd.setTime(0);\nassert (d.setHours(1, 1, 1) == hour + min + sec + d.getTimezoneOffset() * 60000);\nassert (d.getHours() == 1);\nassert (d.getMinutes() == 1);\nassert (d.getSeconds() == 1);\nd.setTime(0);\nassert (d.setHours(1, 1, 1, 1) == hour + min + sec + ms + d.getTimezoneOffset() * 60000);\nassert (d.getHours() == 1);\nassert (d.getMinutes() == 1);\nassert (d.getSeconds() == 1);\nassert (d.getMilliseconds() == 1);\n\n/* 15.9.5.35 Date.prototype.setUTCHours (hour [, min [, sec [, ms ] ] ] ) */\nd.setTime(0);\nassert (d.setUTCHours(1) == hour);\nassert (d.getUTCHours() == 1);\nd.setTime(0);\nassert (d.setUTCHours(1, 1) == hour + min);\nassert (d.getUTCHours() == 1);\nassert (d.getUTCMinutes() == 1);\nd.setTime(0);\nassert (d.setUTCHours(1, 1, 1) == hour + min + sec);\nassert (d.getUTCHours() == 1);\nassert (d.getUTCMinutes() == 1);\nassert (d.getUTCSeconds() == 1);\nd.setTime(0);\nassert (d.setUTCHours(1, 1, 1, 1) == hour + min + sec + ms);\nassert (d.getUTCHours() == 1);\nassert (d.getUTCMinutes() == 1);\nassert (d.getUTCSeconds() == 1);\nassert (d.getUTCMilliseconds() == 1);\n\n/* 15.9.5.36 Date.prototype.setDate (date) */\nd.setTime(0);\nassert (d.setDate(0) == -day);\nassert (d.getDate() == 31);\nd.setTime(0);\nassert (d.setDate(1) == 0);\nassert (d.getDate() == 1);\n\n/* 15.9.5.37 Date.prototype.setUTCDate (date) */\nd.setTime(0);\nassert (d.setUTCDate(0) == -day);\nassert (d.getUTCDate() == 31);\nd.setTime(0);\nassert (d.setUTCDate(1) == 0);\nassert (d.getUTCDate() == 1);\n\n/* 15.9.5.38 Date.prototype.setMonth (month [, date ] ) */\nd.setTime(0);\nassert (d.setMonth(0) == 0);\nassert (d.getMonth() == 0);\nd.setTime(0);\nassert (d.setMonth(0, 0) == -day);\nassert (d.getMonth() == 11);\nassert (d.getDate() == 31);\nd.setTime(0);\nassert (d.setMonth(1) == 31 * day);\nassert (d.getMonth() == 1);\nd.setTime(0);\nassert (d.setMonth(12) == 365 * day);\nassert (d.getMonth() == 0);\nd.setTime(0);\nassert (d.setMonth(13) == (365 + 31) * day);\nassert (d.getMonth() == 1);\n\n/* 15.9.5.39 Date.prototype.setUTCMonth (month [, date ] ) */\nd.setTime(0);\nassert (d.setUTCMonth(0) == 0);\nassert (d.getUTCMonth() == 0);\nd.setTime(0);\nassert (d.setUTCMonth(0, 0) == -day);\nassert (d.getUTCMonth() == 11);\nassert (d.getUTCDate() == 31);\nd.setTime(0);\nassert (d.setUTCMonth(1) == 31 * day);\nassert (d.getUTCMonth() == 1);\nd.setTime(0);\nassert (d.setUTCMonth(12) == 365 * day);\nassert (d.getUTCMonth() == 0);\nd.setTime(0);\nassert (d.setUTCMonth(13) == (365 + 31) * day);\nassert (d.getUTCMonth() == 1);\n\n/* 15.9.5.40 Date.prototype.setFullYear (year [, month [, date ] ] ) */\nd.setTime(0);\nassert (d.setFullYear(0) == -62167219200000);\nassert (d.getFullYear() == 0);\nd.setTime(0);\nassert (d.setFullYear(0, 0) == -62167219200000);\nassert (d.getFullYear() == 0);\nassert (d.getMonth() == 0);\nd.setTime(0);\nassert (d.setFullYear(0, 0, 0) == -62167219200000 - day);\nassert (d.getFullYear() == -1);\nassert (d.getMonth() == 11);\nassert (d.getDate() == 31);\nd.setTime(0);\nassert (d.setFullYear(1970) == 0);\nassert (d.getFullYear() == 1970);\n\n/* 15.9.5.41 Date.prototype.setUTCFullYear (year [, month [, date ] ] ) */\nd.setTime(0);\nassert (d.setUTCFullYear(0) == -62167219200000);\nassert (d.getUTCFullYear() == 0);\nd.setTime(0);\nassert (d.setUTCFullYear(0, 0) == -62167219200000);\nassert (d.getUTCFullYear() == 0);\nassert (d.getUTCMonth() == 0);\nd.setTime(0);\nassert (d.setUTCFullYear(0, 0, 0) == -62167219200000 - day);\nassert (d.getUTCFullYear() == -1);\nassert (d.getUTCMonth() == 11);\nassert (d.getUTCDate() == 31);\nd.setTime(0);\nassert (d.setUTCFullYear(1970) == 0);\nassert (d.getUTCFullYear() == 1970);\n\n/* ECMA262 v11 20.4.1.2 Day Number and Time within Day\n   msPerDay = 86400000\n   TimeWithinDay(t) = t modulo msPerDay\n\n   ECMA262 v11 5.2.5 Mathematical Operations\n   The notation “x modulo y” (y must be finite and nonzero) computes a value k of the same sign as y (or zero).\n\n   Consequently TimeWithinDay(t) >= 0. It can be tested properly with dates close to 1970.\n*/\nd = new Date(\"1969-12-01T01:00:00.000Z\");\nd.setFullYear(1968);\nassert (d.toISOString() == \"1968-12-01T01:00:00.000Z\");\n\nd = new Date(\"1970-01-31T01:00:00.000Z\");\nd.setFullYear(1971);\nassert (d.toISOString() == \"1971-01-31T01:00:00.000Z\");\n\n/* Without argument */\nd = new Date();\nassert (isNaN (d.setTime()));\nassert (isNaN (d.setMilliseconds()));\nassert (isNaN (d.setUTCMilliseconds()));\nassert (isNaN (d.setSeconds()));\nassert (isNaN (d.setUTCSeconds()));\nassert (isNaN (d.setMinutes()));\nassert (isNaN (d.setUTCMinutes()));\nassert (isNaN (d.setHours()));\nassert (isNaN (d.setUTCHours()));\nassert (isNaN (d.setDate()));\nassert (isNaN (d.getUTCDate()));\nassert (isNaN (d.setMonth()));\nassert (isNaN (d.setUTCMonth()));\nassert (isNaN (d.setFullYear()));\nassert (isNaN (d.setUTCFullYear()));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/date-toisostring.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    d = new Date (-8640000000000001)\n    assert (d == \"Invalid Date\")\n    d.toISOString()\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError)\n}\n\nassert (new Date (-8640000000000000).toISOString() == \"-271821-04-20T00:00:00.000Z\")\n\nassert (new Date(-62167219200001).toISOString() == \"-000001-12-31T23:59:59.999Z\")\nassert (new Date(-62167219200000).toISOString() == \"0000-01-01T00:00:00.000Z\")\n\nassert (new Date(-61851600000001).toISOString() == \"0009-12-31T23:59:59.999Z\")\nassert (new Date(-61851600000000).toISOString() == \"0010-01-01T00:00:00.000Z\")\n\nassert (new Date(-59011459200001).toISOString() == \"0099-12-31T23:59:59.999Z\")\nassert (new Date(-59011459200000).toISOString() == \"0100-01-01T00:00:00.000Z\")\n\nassert (new Date(-30610224000001).toISOString() == \"0999-12-31T23:59:59.999Z\")\nassert (new Date(-30610224000000).toISOString() == \"1000-01-01T00:00:00.000Z\")\n\nassert (new Date(-1).toISOString() == \"1969-12-31T23:59:59.999Z\")\nassert (new Date(0).toISOString() == \"1970-01-01T00:00:00.000Z\")\nassert (new Date(1).toISOString() == \"1970-01-01T00:00:00.001Z\")\n\nassert (new Date(253402300799999).toISOString() == \"9999-12-31T23:59:59.999Z\")\nassert (new Date(253402300800000).toISOString() == \"+010000-01-01T00:00:00.000Z\")\n\nassert (new Date (8640000000000000).toISOString() == \"+275760-09-13T00:00:00.000Z\")\n\ntry {\n    d = new Date (8640000000000001)\n    assert (d == \"Invalid Date\")\n    d.toISOString()\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/date-tojson.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {\n    toISOString: function() { return \"RESULT-ToISOString\"; },\n    valueOf: function() { return \"RESULT-valueOf\"; }\n};\n\nvar result = Date.prototype.toJSON.call(obj);\n\nassert(result === \"RESULT-ToISOString\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/date-tostring.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (new Date (NaN) == \"Invalid Date\");\nassert (new Date (Infinity, 1, 1, 0, 0, 0) == \"Invalid Date\");\nassert (new Date (2015, Infinity, 1, 0, 0, 0) == \"Invalid Date\");\nassert (new Date (2015, 7, 1, 0, Infinity, 0) == \"Invalid Date\");\nassert (new Date (NaN, 1, 1, 0, 0, 0) == \"Invalid Date\");\nassert (new Date (2015, NaN, 1, 0, 0, 0) == \"Invalid Date\");\nassert (new Date (2015, 7, 1, 0, NaN, 0) == \"Invalid Date\");\nassert (/Fri Feb 13 2015 \\d{2}:\\d{2}:\\d{2} GMT\\+\\d{2}\\d{2}/.test (new Date (\"2015-02-13\")));\nassert (/Wed Jul 08 2015 \\d{2}:\\d{2}:\\d{2} GMT\\+\\d{2}\\d{2}/.test (new Date (\"2015-07-08T11:29:05.023\")));\n\ntry\n{\n  Date.prototype.toString.call(-1);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nvar date = new Date(0);\nassert (/Thu Jan 01 1970 \\d{2}:\\d{2}:\\d{2} GMT\\+\\d{2}\\d{2}/.test (date.toString()));\nassert (date.toUTCString() === \"Thu, 01 Jan 1970 00:00:00 GMT\");\nassert (date.toISOString() === \"1970-01-01T00:00:00.000Z\");\n\ndate = new Date(\"2015-08-12T09:40:20.000Z\")\nassert (/Wed Aug 12 2015 \\d{2}:\\d{2}:\\d{2} GMT\\+\\d{2}\\d{2}/.test (date.toString()));\nassert (date.toUTCString() === \"Wed, 12 Aug 2015 09:40:20 GMT\");\nassert (date.toISOString() === \"2015-08-12T09:40:20.000Z\");\n\nassert (new Date (NaN).toDateString () == \"Invalid Date\");\nassert (new Date (\"2015-02-13\").toDateString () == \"2015-02-13\");\nassert (new Date (\"2015-07-08T11:29:05.023\").toDateString () == \"2015-07-08\");\n\ntry\n{\n  Date.prototype.toDateString.call(-1);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nassert (new Date (NaN).toTimeString () == \"Invalid Date\");\nassert (new Date (Number.POSITIVE_INFINITY).toString () === \"Invalid Date\");\nassert (new Date (\"2015-02-13\").toTimeString () == \"00:00:00.000\");\nassert (new Date (\"2015-07-08T11:29:05.023\").toTimeString () == \"11:29:05.023\");\n\ntry\n{\n  Date.prototype.toTimeString.call(-1);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nassert (new Date (\"2015-07-16\").toISOString () == \"2015-07-16T00:00:00.000Z\");\nassert (new Date (\"2015-07-16T11:29:05.023\").toISOString () == \"2015-07-16T11:29:05.023Z\");\n\ntry\n{\n  new Date (NaN).toISOString ();\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof RangeError);\n}\n\ntry\n{\n  new Date (Number.POSITIVE_INFINITY).toISOString ();\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof RangeError);\n}\n\ntry\n{\n  Date.prototype.toISOString.call(-1);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nassert (new Date (NaN).toUTCString () == \"Invalid Date\");\nassert (new Date (\"2015-07-16\").toUTCString () == \"Thu, 16 Jul 2015 00:00:00 GMT\");\nassert (new Date (\"2015-07-16T11:29:05.023\").toUTCString () == \"Thu, 16 Jul 2015 11:29:05 GMT\");\n\ntry\n{\n  Date.prototype.toUTCString.call(-1);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nassert (new Date (NaN).toJSON () == null);\nassert (new Date (\"2015-07-16\").toJSON () == \"2015-07-16T00:00:00.000Z\");\nassert (new Date (\"2015-07-16T11:29:05.023\").toJSON () == \"2015-07-16T11:29:05.023Z\");\n\ntry\n{\n  Date.prototype.toJSON.call(-1);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\ndate_time = new Date (\"2015-07-08T11:29:05.023\").toJSON ();\nassert (new Date (date_time).toISOString () == \"2015-07-08T11:29:05.023Z\");\n\nassert (typeof Date (2015) == \"string\");\nassert (typeof Date() != typeof (new Date ()));\nassert (Date () == (new Date ()).toString ());\nassert (Date (2015, 1, 1) == (new Date ()).toString ());\nassert (Date (Number.NaN) == Date ());\n\nassert (new Date (\"2015-07-08T11:29:05.023Z\").toISOString() == \"2015-07-08T11:29:05.023Z\");\n\n// corner cases\nassert (new Date (-8640000000000001).toString() == \"Invalid Date\")\nassert (new Date (-8640000000000000).toString() == \"Tue Apr 20 -271821 00:00:00 GMT+0000\")\n\nassert (new Date(-62167219200001).toString() == \"Fri Dec 31 -0001 23:59:59 GMT+0000\")\nassert (new Date(-62167219200000).toString() == \"Sat Jan 01 0000 00:00:00 GMT+0000\")\n\nassert (new Date(-61851600000001).toString() == \"Thu Dec 31 0009 23:59:59 GMT+0000\")\nassert (new Date(-61851600000000).toString() == \"Fri Jan 01 0010 00:00:00 GMT+0000\")\n\nassert (new Date(-59011459200001).toString() == \"Thu Dec 31 0099 23:59:59 GMT+0000\")\nassert (new Date(-59011459200000).toString() == \"Fri Jan 01 0100 00:00:00 GMT+0000\")\n\nassert (new Date(-30610224000001).toString() == \"Tue Dec 31 0999 23:59:59 GMT+0000\")\nassert (new Date(-30610224000000).toString() == \"Wed Jan 01 1000 00:00:00 GMT+0000\")\n\nassert (new Date(-1).toString() == \"Wed Dec 31 1969 23:59:59 GMT+0000\")\nassert (new Date(0).toString() == \"Thu Jan 01 1970 00:00:00 GMT+0000\")\nassert (new Date(1).toString() == \"Thu Jan 01 1970 00:00:00 GMT+0000\")\n\nassert (new Date(253402300799999).toString() == \"Fri Dec 31 9999 23:59:59 GMT+0000\")\nassert (new Date(253402300800000).toString() == \"Sat Jan 01 10000 00:00:00 GMT+0000\")\n\nassert (new Date (8640000000000000).toString() == \"Sat Sep 13 275760 00:00:00 GMT+0000\")\nassert (new Date (8640000000000001).toString() == \"Invalid Date\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/date-utc.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar d;\n\nd = Date.UTC(undefined);\nassert (isNaN(d));\n\nd = Date.UTC({});\nassert (isNaN(d));\n\nd = Date.UTC(2000 + 15, 0);\nassert (d == 1420070400000);\n\nd = Date.UTC(2015, 0);\nassert (d == 1420070400000);\n\nd = Date.UTC(2015, 0, 1);\nassert (d == 1420070400000);\n\nd = Date.UTC(2015, 0, 1, 0);\nassert (d == 1420070400000);\n\nd = Date.UTC(2015, 0, 1, 0, 0);\nassert (d == 1420070400000);\n\nd = Date.UTC(2015, 0, 1, 0, 0, 0);\nassert (d == 1420070400000);\n\nd = Date.UTC(2015, 0, 1, 0, 0, 0, 0);\nassert (d == 1420070400000);\n\nd = Date.UTC(2015, 6, 3, 14, 35, 43, 123);\nassert (d == 1435934143123);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/delete.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* argument is not reference */\nassert (delete 0 === true);\nassert (delete \"0\" === true);\nassert (delete (a = 1) === true);\nassert (delete delete a === true);\n\n/* argument is unresolvable reference */\nassert (delete undefined_variable === true);\n\n/* argument is object-based reference */\nvar a = [1];\nassert (a[0] === 1);\nassert (delete a[0] === true);\nassert (a[0] == undefined);\n\nvar b = {c:0};\nassert (b.c === 0);\nassert (delete b.c === true);\nassert (b.c === undefined);\n\n/* argument is lexical environment-based reference */\nvar a = 1;\nassert (a === 1);\nassert (delete a === false);\nassert (a === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/do-while.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = 0;\n\ndo a++\nwhile (false)\n\ndo { a++ } while (false)\n\ntry {\n  eval(\"do a++ while (false)\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/empty-varg.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = Object();"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/equality.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((5 == 5) == true);\nassert((7 != 2) == true);\n\nvar num = 0;\nvar obj = new String(\"0\");\nvar str = \"0\";\nvar b = false;\n\nassert(num === num);\nassert(obj === obj);\nassert(str === str);\n\nassert((num === obj) == false);\nassert((num === str) == false);\nassert((obj === str) == false);\nassert((null === undefined) == false);\nassert((obj === null) == false);\nassert((obj === undefined) == false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/error.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar e;\n\n/* Error */\ne = new Error ();\nassert (e.name === \"Error\");\nassert (e.message === \"\");\nassert (e.toString() === \"Error\");\n\ne = new Error(\"some message\");\nassert (e.name === \"Error\");\nassert (e.message === \"some message\");\nassert (e.toString() === \"Error: some message\");\n\ne.name = \"\";\nassert (e.toString() === \"some message\");\ne.message = \"\";\nassert (e.toString() === \"\");\n\nassert (Error.prototype.toString !== Object.prototype.toString);\nassert (Error.prototype.constructor === Error);\nassert (Error.prototype.name === \"Error\");\nassert (Error.prototype.message === \"\");\nassert (Error.prototype.toString() === \"Error\");\n\n/* TypeError */\ne = new TypeError ();\nassert (e.name === \"TypeError\");\nassert (e.message === \"\");\nassert (e.toString() === \"TypeError\");\n\ne = new TypeError(\"some message\");\nassert (e.name === \"TypeError\");\nassert (e.message === \"some message\");\nassert (e.toString() === \"TypeError: some message\");\n\ne.name = \"\";\nassert (e.toString() === \"some message\");\ne.message = \"\";\nassert (e.toString() === \"\");\n\nassert (TypeError.prototype.toString === Error.prototype.toString);\nassert (TypeError.prototype.constructor === TypeError);\nassert (TypeError.prototype.name === \"TypeError\");\nassert (TypeError.prototype.message === \"\");\nassert (TypeError.prototype.toString() === \"TypeError\");\n\ntry\n{\n  null[1] = 'abcd';\n\n  assert (false);\n}\ncatch (e)\n{\n  assert(e instanceof TypeError);\n  assert(e instanceof Error);\n  assert(e instanceof Object);\n\n  assert(!(e instanceof Function));\n}\n\n\n/* ReferenceError */\ne = new ReferenceError ();\nassert (e.name === \"ReferenceError\");\nassert (e.message === \"\");\nassert (e.toString() === \"ReferenceError\");\n\ne = new ReferenceError(\"some message\");\nassert (e.name === \"ReferenceError\");\nassert (e.message === \"some message\");\nassert (e.toString() === \"ReferenceError: some message\");\n\ne.name = \"\";\nassert (e.toString() === \"some message\");\ne.message = \"\";\nassert (e.toString() === \"\");\n\nassert (ReferenceError.prototype.toString === Error.prototype.toString);\nassert (ReferenceError.prototype.constructor === ReferenceError);\nassert (ReferenceError.prototype.name === \"ReferenceError\");\nassert (ReferenceError.prototype.message === \"\");\nassert (ReferenceError.prototype.toString() === \"ReferenceError\");\n\ntry\n{\n  var a = non_existing_variable;\n\n  assert (false);\n}\ncatch (e)\n{\n  assert(e instanceof ReferenceError);\n  assert(e instanceof Error);\n  assert(e instanceof Object);\n\n  assert(!(e instanceof Function));\n}\n\n/* EvalError */\ne = new EvalError ();\nassert (e.name === \"EvalError\");\nassert (e.message === \"\");\nassert (e.toString() === \"EvalError\");\n\ne = new EvalError(\"some message\");\nassert (e.name === \"EvalError\");\nassert (e.message === \"some message\");\nassert (e.toString() === \"EvalError: some message\");\n\ne.name = \"\";\nassert (e.toString() === \"some message\");\ne.message = \"\";\nassert (e.toString() === \"\");\n\nassert (EvalError.prototype.toString === Error.prototype.toString);\nassert (EvalError.prototype.constructor === EvalError);\nassert (EvalError.prototype.name === \"EvalError\");\nassert (EvalError.prototype.message === \"\");\nassert (EvalError.prototype.toString() === \"EvalError\");\n\n/* RangeError */\ne = new RangeError ();\nassert (e.name === \"RangeError\");\nassert (e.message === \"\");\nassert (e.toString() === \"RangeError\");\n\ne = new RangeError(\"some message\");\nassert (e.name === \"RangeError\");\nassert (e.message === \"some message\");\nassert (e.toString() === \"RangeError: some message\");\n\ne.name = \"\";\nassert (e.toString() === \"some message\");\ne.message = \"\";\nassert (e.toString() === \"\");\n\nassert (RangeError.prototype.toString === Error.prototype.toString);\nassert (RangeError.prototype.constructor === RangeError);\nassert (RangeError.prototype.name === \"RangeError\");\nassert (RangeError.prototype.message === \"\");\nassert (RangeError.prototype.toString() === \"RangeError\");\n\n/* SyntaxError */\ne = new SyntaxError ();\nassert (e.name === \"SyntaxError\");\nassert (e.message === \"\");\nassert (e.toString() === \"SyntaxError\");\n\ne = new SyntaxError(\"some message\");\nassert (e.name === \"SyntaxError\");\nassert (e.message === \"some message\");\nassert (e.toString() === \"SyntaxError: some message\");\n\ne.name = \"\";\nassert (e.toString() === \"some message\");\ne.message = \"\";\nassert (e.toString() === \"\");\n\nassert (SyntaxError.prototype.toString === Error.prototype.toString);\nassert (SyntaxError.prototype.constructor === SyntaxError);\nassert (SyntaxError.prototype.name === \"SyntaxError\");\nassert (SyntaxError.prototype.message === \"\");\nassert (SyntaxError.prototype.toString() === \"SyntaxError\");\n\n/* URIError */\ne = new URIError ();\nassert (e.name === \"URIError\");\nassert (e.message === \"\");\nassert (e.toString() === \"URIError\");\n\ne = new URIError(\"some message\");\nassert (e.name === \"URIError\");\nassert (e.message === \"some message\");\nassert (e.toString() === \"URIError: some message\");\n\ne.name = \"\";\nassert (e.toString() === \"some message\");\ne.message = \"\";\nassert (e.toString() === \"\");\n\nassert (URIError.prototype.toString === Error.prototype.toString);\nassert (URIError.prototype.constructor === URIError);\nassert (URIError.prototype.name === \"URIError\");\nassert (URIError.prototype.message === \"\");\nassert (URIError.prototype.toString() === \"URIError\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/argument-spread.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax\n\nfunction mustThrow(str) {\n  try {\n    eval(str);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n}\n\nfunction assertArrayEqual(actual, expected) {\n  assert(actual.length === expected.length);\n\n  for (var i = 0; i < actual.length; i++) {\n    assert(actual[i] === expected[i]);\n  }\n}\n\n// Spread syntax\nfunction sum(x, y, z) {\n  return x + y + z;\n}\n\nconst numbers = [1, 2, 3];\n\nassert(sum(...numbers) === 6);\n\n// Replace apply()\nfunction myFunction (v, w, x, y, z) {\n  return v + w + x + y + z;\n}\nvar args = [0, 1];\n\nassert(myFunction (-1, ...args, 2, ...[3]) == 5);\n\n// Apply for new\nvar dateFields = [1970, 0, 1];\nvar d = new Date(...dateFields);\n\nassert(d.toString().substring(0, 24) === \"Thu Jan 01 1970 00:00:00\");\n\nfunction applyAndNew(constructor, args) {\n   function partial () {\n      return constructor.apply (this, args);\n   };\n   if (typeof constructor.prototype === \"object\") {\n      partial.prototype = Object.create(constructor.prototype);\n   }\n   return partial;\n}\n\nfunction myConstructor () {\n   assertArrayEqual(arguments, myArguments);\n   this.prop1 = \"val1\";\n   this.prop2 = \"val2\";\n};\n\nvar myArguments = [\"hi\", \"how\", \"are\", \"you\", \"mr\", null];\nvar myConstructorWithArguments = applyAndNew(myConstructor, myArguments);\n\nvar obj = new myConstructorWithArguments;\nassert(Object.keys(obj).length === 2);\nassert(obj.prop1 === \"val1\");\nassert(obj.prop2 === \"val2\");\n\n// Test spread prop call\nvar o = { f(a,b,c) { return a + b + c },\n          g(a,b) { throw new TypeError (\"5\") }\n        };\n\nassert (o.f(...[\"a\", \"b\", \"c\"]) === \"abc\");\n\nmustThrow (\"o.g (...[1,2])\")\n\n// Test spread super call\nclass MyArray extends Array {\n  constructor(...args) {\n    super(...args);\n  }\n}\n\nvar array = new MyArray(1, 2, 3);\nassertArrayEqual(array, [1,2,3]);\nassert(array instanceof MyArray);\nassert(array instanceof Array);\n\nfunction argumentOrderTest() {\n  var result = []\n  for (i = 0; i < arguments.length; i++) {\n      result.push(arguments[i]);\n  }\n\n  return result;\n}\n\nassertArrayEqual(argumentOrderTest(1, 2, ...[3, 4]), [1, 2, 3, 4]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arguments-iterator.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrayPrototypeValues = Array.prototype.values;\n\nfunction f_mapped() {\n  assert(typeof arguments[Symbol.iterator] === 'function');\n  assert(arguments[Symbol.iterator] === arrayPrototypeValues);\n  assert(Object.hasOwnProperty.call(arguments, Symbol.iterator));\n\n  let sum = 0;\n  for (a of arguments) {\n    sum += a;\n  }\n  return sum;\n};\n\nfunction f_unmapped(b = 2) {\n  assert(typeof arguments[Symbol.iterator] === 'function');\n  assert(arguments[Symbol.iterator] === arrayPrototypeValues);\n  assert(Object.hasOwnProperty.call(arguments, Symbol.iterator));\n\n  let sum = 0;\n  for (a of arguments) {\n    sum += a;\n  }\n  return sum;\n};\n\nassert(f_mapped(1, 2, 3, 4, 5) === 15);\nassert(f_unmapped(1, 2, 3, 4, 5) === 15);\n\nObject.defineProperty(Array.prototype, \"values\", { get : function () {\n  /* should not be executed */\n  assert(false);\n}});\n\nassert(f_mapped(1, 2, 3, 4, 5) === 15);\nassert(f_unmapped(1, 2, 3, 4, 5) === 15);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arguments.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f1(a, b, c)\n{\n  'use strict';\n  assert(!Object.hasOwnProperty(arguments,'caller'));\n}\n\nf1(1, 2, 3);\n\n// Normal arguments access\n\nfunction f2(a = arguments)\n{\n  assert(arguments[1] === 2)\n  var arguments = 1\n  assert(arguments === 1)\n  assert(a[1] === 2)\n}\nf2(undefined, 2)\n\nfunction f3(a = arguments)\n{\n  assert(arguments() === \"X\")\n  function arguments() { return \"X\" }\n  assert(arguments() === \"X\")\n  assert(a[1] === \"R\")\n}\nf3(undefined, \"R\")\n\nfunction f4(a = arguments)\n{\n  const arguments = 3.25\n  assert(arguments === 3.25)\n  assert(a[1] === -1.5)\n}\nf4(undefined, -1.5)\n\n// Normal arguments access with eval\n\nfunction f5(a = arguments)\n{\n  assert(arguments[1] === 2)\n  var arguments = 1\n  assert(arguments === 1)\n  assert(a[1] === 2)\n  eval()\n}\nf5(undefined, 2)\n\nfunction f6(a = arguments)\n{\n  assert(arguments() === \"X\")\n  function arguments() { return \"X\" }\n  assert(arguments() === \"X\")\n  assert(a[1] === \"R\")\n  eval()\n}\nf6(undefined, \"R\")\n\nfunction f7(a = arguments)\n{\n  const arguments = 3.25\n  assert(arguments === 3.25)\n  assert(a[1] === -1.5)\n  eval()\n}\nf7(undefined, -1.5)\n\n// Argument access through a function\n\nfunction f8(a = () => arguments)\n{\n  assert(arguments[1] === 2)\n  var arguments = 1\n  assert(arguments === 1)\n  assert(a()[1] === 2)\n}\nf8(undefined, 2)\n\nfunction f9(a = () => arguments)\n{\n  assert(arguments() === \"X\")\n  function arguments() { return \"X\" }\n  assert(arguments() === \"X\")\n  assert(a()[1] === \"R\")\n}\nf9(undefined, \"R\")\n\nfunction f10(a = () => arguments)\n{\n  let arguments = 3.25\n  assert(arguments === 3.25)\n  assert(a()[1] === -1.5)\n}\nf10(undefined, -1.5)\n\n// Argument access through an eval\n\nfunction f11(a = eval(\"() => arguments\"))\n{\n  assert(arguments[1] === 2)\n  var arguments = 1\n  assert(arguments === 1)\n  assert(a()[1] === 2)\n}\nf11(undefined, 2)\n\nfunction f12(a = eval(\"() => arguments\"))\n{\n  assert(arguments() === \"X\")\n  function arguments() { return \"X\" }\n  assert(arguments() === \"X\")\n  assert(a()[1] === \"R\")\n}\nf12(undefined, \"R\")\n\nfunction f13(a = eval(\"() => arguments\"))\n{\n  const arguments = 3.25\n  assert(arguments === 3.25)\n  assert(a()[1] === -1.5)\n}\nf13(undefined, -1.5)\n\n// Other cases\n\ntry {\n  function f14(a = arguments)\n  {\n    assert(a[1] === 6)\n    arguments;\n    let arguments = 1;\n  }\n  f14(undefined, 6)\n  assert(false)\n} catch (e) {\n  assert(e instanceof ReferenceError)\n}\n\ntry {\n  eval(\"'use strict'; function f(a = arguments) { arguments = 5; eval() }\");\n  assert(false)\n} catch (e) {\n  assert(e instanceof SyntaxError)\n}\n\nfunction f15()\n{\n  assert(arguments[0] === \"A\")\n  var arguments = 1\n  assert(arguments === 1)\n}\nf15(\"A\")\n\nfunction f16()\n{\n  assert(arguments() === \"W\")\n  function arguments() { return \"W\" }\n  assert(arguments() === \"W\")\n}\nf16(\"A\")\n\nfunction f17(a = arguments = \"Val\")\n{\n  assert(arguments === \"Val\")\n}\nf17();\n\nfunction f18(s = (v) => arguments = v, g = () => arguments)\n{\n  const arguments = -3.25\n  s(\"X\")\n\n  assert(g() === \"X\")\n  assert(arguments === -3.25)\n}\nf18()\n\nfunction f19(e = (v) => eval(v))\n{\n  var arguments = -12.5\n  e(\"arguments[0] = 4.5\")\n\n  assert(e(\"arguments[0]\") === 4.5)\n  assert(e(\"arguments[1]\") === \"A\")\n  assert(arguments === -12.5)\n}\nf19(undefined, \"A\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arithmetic-parse.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (txt) {\n  try {\n    eval (txt)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\nvar a = 21;\nvar b = 10;\nvar c;\n\ncheck_syntax_error (\"c =  a++b\");\ncheck_syntax_error (\"c =  a--b\");\n\ncheck_syntax_error (\"c = a +* b\");\ncheck_syntax_error (\"c = a -* b\");\ncheck_syntax_error (\"c = a +/ b\");\ncheck_syntax_error (\"c = a -/ b\");\ncheck_syntax_error (\"c = a +% b\");\ncheck_syntax_error (\"c = a -% b\");\n\ncheck_syntax_error (\"a =* b\");\ncheck_syntax_error (\"a =/ b\");\ncheck_syntax_error (\"a =% b\");\n\ncheck_syntax_error (\"c = a+\");\ncheck_syntax_error (\"c = a-\");\n\ncheck_syntax_error(\"a++\\n()\");\ncheck_syntax_error(\"a--\\n.b\");\n\nassert((-2 .toString()) === -2);\n\nNumber.prototype[0] = 123;\nassert(-2[0] === -123);\n\nfunction f() {\n  var a = 0;\n  function g() {}\n\n  try {\n    eval (\"g(this, 'a' = 1)\");\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n\n  try {\n    eval (\"g(this, 'a' += 1)\");\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n\n  assert (a === 0);\n}\nf();\n\nfunction g(a, b)\n{\n  assert(b === \"undefined\");\n}\ng(this, typeof undeclared_var)\n\nfunction h()\n{\n  var done = false;\n  var o = { a: function () { done = (this === o) } }\n  function f() {}\n\n  with (o) {\n    f(this, a());\n  }\n  assert(done);\n}\nh();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arithmetics-2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = 21;\nvar b = 10;\nvar c;\n\nc = a + b;\nassert(c == 31);\n\nc = a - b;\nassert(c == 11);\n\nc = a * b;\nassert(c == 210);\n\nc = a / b;\nassert(c >= 2.1 - 0.000001 && c <= 2.1 + 0.000001);\n\nc = a % b;\nassert(c == 1);\n\nc = a++;\nassert(c == 21);\n\nc = a--;\nassert(c == 22);\n\nvar o = { p : 1 };\n\nassert (++o.p === 2);\nassert (o.p === 2);\nassert (--o.p === 1);\nassert (o.p === 1);\n\ntry {\n  eval ('++ ++ a');\n  assert (false);\n}\ncatch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (0.1 + 0.2 != 0.3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arithmetics-3.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar o1 = { valueOf() { return Symbol() } }\nvar o2 = { valueOf() { throw \"Should not reach here\" } }\n\nfunction check_type_error(code) {\n  try {\n    eval(code)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof TypeError)\n  }\n}\n\ncheck_type_error(\"o1 - o2\")\ncheck_type_error(\"o1 * o2\")\ncheck_type_error(\"o1 / o2\")\ncheck_type_error(\"o1 % o2\")\ncheck_type_error(\"o1 ** o2\")\ncheck_type_error(\"o1 | o2\")\ncheck_type_error(\"o1 & o2\")\ncheck_type_error(\"o1 ^ o2\")\ncheck_type_error(\"o1 << o2\")\ncheck_type_error(\"o1 >> o2\")\ncheck_type_error(\"o1 >>> o2\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-from.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2014 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Some methods are taken from v8/test/mjsunit/mjsunit.js\n\nfunction classOf(object) {\n  // Argument must not be null or undefined.\n  var string = Object.prototype.toString.call(object);\n  // String has format [object <ClassName>].\n  return string.substring(8, string.length - 1);\n}\n\n/**\n * Compares two objects for key/value equality.\n * Returns true if they are equal, false otherwise.\n */\nfunction deepObjectEquals(a, b) {\n  var aProps = Object.keys(a);\n  aProps.sort();\n  var bProps = Object.keys(b);\n  bProps.sort();\n  if (!deepEquals(aProps, bProps)) {\n    return false;\n  }\n  for (var i = 0; i < aProps.length; i++) {\n    if (!deepEquals(a[aProps[i]], b[aProps[i]])) {\n      return false;\n    }\n  }\n  return true;\n}\n\nvar assertInstanceof = function assertInstanceof(obj, type) {\n  if (!(obj instanceof type)) {\n    var actualTypeName = null;\n    var actualConstructor = Object.getPrototypeOf(obj).constructor;\n    if (typeof actualConstructor == \"function\") {\n      actualTypeName = actualConstructor.name || String(actualConstructor);\n    } print(\"Object <\" + obj + \"> is not an instance of <\" + (type.name || type) + \">\" + (actualTypeName ? \" but of < \" + actualTypeName + \">\" : \"\"));\n  }\n};\n\nfunction deepEquals(a, b) {\n  if (a === b) {\n    if (a === 0) return (1 / a) === (1 / b);\n    return true;\n  }\n  if (typeof a != typeof b) return false;\n  if (typeof a == \"number\") return isNaN(a) && isNaN(b);\n  if (typeof a !== \"object\" && typeof a !== \"function\") return false;\n  var objectClass = classOf(a);\n  if (objectClass !== classOf(b)) return false;\n  if (objectClass === \"RegExp\") {\n    return (a.toString() === b.toString());\n  }\n  if (objectClass === \"Function\") return false;\n  if (objectClass === \"Array\") {\n    var elementCount = 0;\n    if (a.length != b.length) {\n      return false;\n    }\n    for (var i = 0; i < a.length; i++) {\n      if (!deepEquals(a[i], b[i]))\n      return false;\n    }\n    return true;\n  }\n  if (objectClass == \"String\" || objectClass == \"Number\" || objectClass == \"Boolean\" || objectClass == \"Date\") {\n    if (a.valueOf() !== b.valueOf()) return false;\n  }\n  return deepObjectEquals(a, b);\n}\n\nvar assertEquals = function assertEquals(expected, found, name_opt) {\n  if (!deepEquals(found, expected)) {\n    assert(false);\n  }\n};\n\nfunction assertArrayLikeEquals(value, expected, type) {\n  assertInstanceof(value, type);\n  assert(expected.length === value.length);\n  for (var i=0; i<value.length; ++i) {\n    assertEquals(expected[i], value[i]);\n  }\n}\n\nassert(1 === Array.from.length);\n\n// Assert that constructor is called with \"length\" for array-like objects\n\nvar myCollectionCalled = false;\nfunction MyCollection(length) {\n  myCollectionCalled = true;\n  assert(1 === arguments.length);\n\n  assert(5 === length);\n}\n\nArray.from.call(MyCollection, {length: 5});\nassert(myCollectionCalled === true);\n// Assert that calling mapfn with / without thisArg in sloppy and strict modes\n// works as expected.\n\nvar global = this;\nfunction non_strict(){ assert(global === this); }\nfunction strict(){ \"use strict\"; assert(void 0 === this); }\nfunction strict_null(){ \"use strict\"; assert(null === this); }\nArray.from([1], non_strict);\nArray.from([1], non_strict, void 0);\nArray.from([1], strict);\nArray.from([1], strict, void 0);\n\nfunction testArrayFrom(thisArg, constructor) {\n  assertArrayLikeEquals(Array.from.call(thisArg, [], undefined), [], constructor);\n  assertArrayLikeEquals(Array.from.call(thisArg, NaN), [], constructor);\n  assertArrayLikeEquals(Array.from.call(thisArg, Infinity), [], constructor);\n  assertArrayLikeEquals(Array.from.call(thisArg, 10000000), [], constructor);\n  assertArrayLikeEquals(Array.from.call(thisArg, 'test'), ['t', 'e', 's', 't'], constructor);\n\n  assertArrayLikeEquals(Array.from.call(thisArg,\n    { length: 1, '0': { 'foo': 'bar' } }), [{'foo': 'bar'}], constructor);\n  assertArrayLikeEquals(Array.from.call(thisArg, { length: -1, '0': { 'foo': 'bar' } }), [], constructor);\n  assertArrayLikeEquals(Array.from.call(thisArg,\n    [ 'foo', 'bar', 'baz' ]), ['foo', 'bar', 'baz'], constructor);\n  var kSet = new Set(['foo', 'bar', 'baz']);\n  assertArrayLikeEquals(Array.from.call(thisArg, kSet), ['foo', 'bar', 'baz'], constructor);\n  var kMap = new Map(['foo', 'bar', 'baz'].entries());\n  assertArrayLikeEquals(Array.from.call(thisArg, kMap), [[0, 'foo'], [1, 'bar'], [2, 'baz']], constructor);\n  assertArrayLikeEquals(Array.from.call(thisArg, 'test', function(x) {\n    return this.filter(x);\n  }, {\n    filter: function(x) { return x.toUpperCase(); }\n  }), ['T', 'E', 'S', 'T'], constructor);\n  assertArrayLikeEquals(Array.from.call(thisArg, 'test', function(x) {\n    return x.toUpperCase();\n  }), ['T', 'E', 'S', 'T'], constructor);\n\n  try {\n    Array.from.call(thisArg, null);\n    assert(false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Array.from.call(thisArg, undefined);\n    assert(false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Array.from.call(thisArg, [], null);\n    assert(false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Array.from.call(thisArg, [], \"noncallable\");\n    assert(false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  var nullIterator = {};\n  nullIterator[Symbol.iterator] = null;\n  assertArrayLikeEquals(Array.from.call(thisArg, nullIterator), [],\n  constructor);\n\n  var nonObjIterator = {};\n  nonObjIterator[Symbol.iterator] = function() { return \"nonObject\"; };\n\n  try {\n    Array.from.call(thisArg, nonObjIterator);\n    assert(false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Array.from.call(thisArg, [], null);\n    assert(false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  // Ensure iterator is only accessed once, and only invoked once\n  var called = false;\n  var arr = [1, 2, 3];\n  var obj = {};\n\n  // Test order --- only get iterator method once\n  function testIterator() {\n    assert(called !== \"@@iterator should be called only once\");\n    called = true;\n    assert(obj === this);\n    return arr[Symbol.iterator]();\n  }\n  var getCalled = false;\n  Object.defineProperty(obj, Symbol.iterator, {\n    get: function() {\n      assert(getCalled !== \"@@iterator should be accessed only once\");\n      getCalled = true;\n      return testIterator;\n    },\n    set: function() {\n      // \"@@iterator should not be set\"\n      assert(false);\n    }\n  });\n  assertArrayLikeEquals(Array.from.call(thisArg, obj), [1, 2, 3], constructor);\n}\n\nfunction Other() {}\n\nvar boundFn = (function() {}).bind(Array, 27);\n\ntestArrayFrom(Array, Array);\ntestArrayFrom(null, Array);\ntestArrayFrom({}, Array);\ntestArrayFrom(Object, Object);\ntestArrayFrom(Other, Other);\ntestArrayFrom(Math.cos, Array);\ntestArrayFrom(boundFn, boundFn);\n\n// Assert that [[DefineOwnProperty]] is used in ArrayFrom, meaning a\n// setter isn't called, and a failed [[DefineOwnProperty]] will throw.\nvar setterCalled = 0;\nfunction exotic() {\n  Object.defineProperty(this,  '0', {\n    get: function() { return 2; },\n    set: function() { setterCalled++; }\n  });\n}\n\n// Non-configurable properties can't be overwritten with DefineOwnProperty\n// The setter wasn't called\ntry {\n  Array.from.call(exotic, [1]);\n  assert(false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert( 0 === setterCalled);\n\n// Non-callable iterators should cause a TypeError before calling the target\n// constructor.\nitems = {};\nitems[Symbol.iterator] = 7;\nfunction TestError() {}\nfunction ArrayLike() { throw new TestError() }\n\ntry {\n  Array.from.call(ArrayLike, items);\n  assert(false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Check that array properties defined are writable, enumerable, configurable\nfunction ordinary() { }\nvar x = Array.from.call(ordinary, [2]);\nvar xlength = Object.getOwnPropertyDescriptor(x, 'length');\nassert(1 === xlength.value);\nassert(true === xlength.writable);\nassert(true === xlength.enumerable);\nassert(true === xlength.configurable);\nvar x0 = Object.getOwnPropertyDescriptor(x, 0);\nassert(2 === x0.value);\nassert(true === xlength.writable);\nassert(true === xlength.enumerable);\nassert(true === xlength.configurable);\n\n/* Test iterator close */\nfunction __createIterableObject (arr, methods) {\n  methods = methods || {};\n  if (typeof Symbol !== 'function' || !Symbol.iterator) {\n    return {};\n  }\n  arr.length++;\n  var iterator = {\n    next: function() {\n      return { value: arr.shift(), done: arr.length <= 0 };\n    },\n    'return': methods['return'],\n    'throw': methods['throw']\n  };\n  var iterable = {};\n  iterable[Symbol.iterator] = function () { return iterator; };\n  return iterable;\n};\n\nfunction close1() {\n  var closed = false;\n  var iter = __createIterableObject([1, 2, 3], {\n      'return': function() { closed = true; return {}; }\n  });\n\n  try {\n    Array.from(iter, x => { throw 5 });\n    assert(false);\n  } catch (e) {\n    assert(e === 5);\n  }\n\n  return closed;\n}\nassert(close1());\n\nfunction close2() {\n  var closed = false;\n  var iter = __createIterableObject([1, 2, 3], {\n      'return': function() { closed = true; throw 6 }\n  });\n\n  try {\n    Array.from(iter, x => { throw 5 });\n    assert(false);\n  } catch (e) {\n    assert(e === 5);\n  }\n\n  return closed;\n}\nassert(close2());\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-isarray.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Array.isArray([]) === true);\nassert(Array.isArray([1]) === true);\nassert(Array.isArray(new Array()) === true);\nassert(Array.isArray(new Array('a', 'b', 'c', 'd')) === true);\nassert(Array.isArray(new Array(3)) === true);\nassert(Array.isArray(Array.prototype) === true);\nassert(Array.isArray(new Proxy([], {})) === true);\n\nassert(Array.isArray() === false);\nassert(Array.isArray({}) === false);\nassert(Array.isArray(null) === false);\nassert(Array.isArray(undefined) === false);\nassert(Array.isArray(17) === false);\nassert(Array.isArray('Array') === false);\nassert(Array.isArray(true) === false);\nassert(Array.isArray(false) === false);\nassert(Array.isArray(new Uint8Array(32)) === false);\nassert(Array.isArray({ __proto__: Array.prototype }) === false);\n\nvar revocable = Proxy.revocable ({}, {});\nvar proxy = revocable.proxy;\nrevocable.revoke();\n\ntry {\n  Array.isArray(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar revocable = Proxy.revocable ([], {});\nvar proxy = revocable.proxy;\n\nassert(Array.isArray(proxy) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-new-target-support.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction F (){}\nvar obj = Reflect.construct (Array, [], F);\nobj[2] = 'foo';\nassert (obj.length === 3 && obj instanceof F);\n\ntry {\n  Reflect.construct (Array, [-1], F);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\nvar o = new Proxy (function f () {}, { get (t,p,r) { if (p == \"prototype\") { throw \"Kitten\" } Reflect.get (...arguments) }})\n\ntry {\n  Reflect.construct (Array, [], o)\n} catch (e) {\n  assert (e === \"Kitten\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-of.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test with regular inputs\nvar array1 = Array.of(1, 2, 3, 4, 5);\nassert(array1.length === 5);\nassert(array1[2] === 3);\n\n// Test with no input\nvar array2 = Array.of();\nassert(array2.length === 0);\nassert(array2[0] === undefined);\n\n// Test when an input is another array\nvar array3 = Array.of(array1, 6, 7);\nassert(array3.length === 3);\nassert(array3[0] instanceof Array);\nassert(array3[0][3] === 4);\nassert(array3[2] === 7);\n\n// Test with undefined\nvar array4 = Array.of(undefined);\nassert(array4.length === 1);\nassert(array4[0] === undefined);\n\n// Test when input is an object\nvar obj = {\n  0: 0,\n  1: 1\n};\n\nvar array5 = Array.of(obj, 2, 3);\nassert(array5[0] instanceof Object);\nassert(array5[0][0] === 0);\nassert(array5[0][1] === 1);\nassert(array5[2] === 3);\n\n// Test with array holes\nvar array6 = Array.of.apply(null, [,,undefined]);\nassert(array6.length === 3);\nassert(array6[0] === undefined);\n\n// Test with another class\nvar hits = 0;\nfunction Test() {\n    hits++;\n}\nTest.of = Array.of;\n\nhits = 0;\nvar array6 = Test.of(1, 2);\nassert(hits === 1);\nassert(array6.length === 2);\nassert(array6[1] === 2);\n\n// Test with bounded builtin function\nvar boundedBuiltinFn = Array.of.bind(Array);\nvar array7 = Array.of.call(boundedBuiltinFn, boundedBuiltinFn);\nassert(array7.length === 1);\nassert(array7[0] === boundedBuiltinFn);\n\n// Test superficial features\nvar desc = Object.getOwnPropertyDescriptor(Array, \"of\");\nassert(desc.configurable === true);\nassert(desc.writable === true);\nassert(desc.enumerable === false);\nassert(Array.of.length === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-pattern.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction checkSyntax (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\nfunction assertArrayEqual (actual, expected) {\n  assert (actual.length === expected.length);\n\n  for (var i = 0; i < actual.length; i++) {\n    assert (actual[i] === expected[i]);\n  }\n}\n\nfunction mustThrow (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n}\n\ncheckSyntax (\"var [a]\");\ncheckSyntax (\"var [a, o.a]\");\ncheckSyntax (\"var [a, ...b,]\");\ncheckSyntax (\"var [a, ...b = 4]\");\ncheckSyntax (\"var [a, ...[b] = 4]\");\ncheckSyntax (\"var [let]\");\ncheckSyntax (\"var [get = []\");\ncheckSyntax (\"var [get : 5]\");\ncheckSyntax (\"var [[a = {},]\");\ncheckSyntax (\"let [a,a] = []\");\ncheckSyntax (\"let [a, ...a] = []\");\ncheckSyntax (\"const [a,a] = []\");\ncheckSyntax (\"const [a, ...a] = []\");\ncheckSyntax (\"[new Object()] = []\");\ncheckSyntax (\"[Object()] = []\");\ncheckSyntax (\"[(a, b, d, c)] = []\");\ncheckSyntax (\"[super] = []\");\ncheckSyntax (\"[this] = []\");\ncheckSyntax (\"[()] = []\");\ncheckSyntax (\"try { let [$] = $;\");\ncheckSyntax (\"let a, [ b.c ] = [6];\");\ncheckSyntax (\"let [(a)] = [1]\");\ncheckSyntax (\"[...a = []] = [1]\");\ncheckSyntax (\"[...[a] = []] = [1]\");\ncheckSyntax (\"[...[a, [...b] = []] = []] = [1]\");\n\nmustThrow (\"var [a] = 4\");\nmustThrow (\"var [a] = 5\");\nmustThrow (\"var [a] = {}\");\nmustThrow (\"var [a] = { get [Symbol.iterator] () { throw new TypeError } }\");\nmustThrow (\"var [a] = { [Symbol.iterator] () {} }\");\nmustThrow (\"var [a] = { [Symbol.iterator] () { return {} } }\");\nmustThrow (\"var [a] = { [Symbol.iterator] () { return { next: 5 } } }\");\nmustThrow (\"var [a] = { [Symbol.iterator] () { return { next: 5 } } }\");\nmustThrow (\"var [a] = { [Symbol.iterator] () { return { get next() { throw new TypeError } } } }\");\nmustThrow (\"var [a] = { [Symbol.iterator] () { return { next () { } } } }\");\nmustThrow (\"var [a] = { [Symbol.iterator] () { return { next () { } } } }\");\nmustThrow (\"var [a] = { [Symbol.iterator] () { return { next () { return { get value () { throw new TypeError }}}}}}\");\nmustThrow (\"var [a] = { [Symbol.iterator] () { return { next () { return { get done () { throw new TypeError }}}}}}\");\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment\n\n// Basic variable assignment\n(function () {\n  var foo = [\"one\", \"two\", \"three\"];\n\n  var [red, yellow, green] = foo;\n  assert (red === \"one\");\n  assert (yellow === \"two\");\n  assert (green === \"three\");\n}) ();\n\n// Assignment separate from declaration\n(function () {\n  var a, b;\n\n  [a, b] = [1, 2];\n  assert (a === 1);\n  assert (b === 2);\n}) ();\n\n// Default values\n(function () {\n  var a, b;\n  [a = 5, b = 7] = [1];\n\n  assert (a === 1);\n  assert (b === 7);\n}) ();\n\n// Swapping variables\n(function () {\n  var a = 1;\n  var b = 3;\n\n  [a, b] = [b, a];\n  assert (a === 3);\n  assert (b === 1);\n\n  var arr = [1,2,3];\n  [arr[2], arr[1]] = [arr[1], arr[2]];\n  assertArrayEqual (arr, [1, 3, 2]);\n}) ();\n\n// Parsing an array returned from a function\n(function () {\n  function f() {\n    return [1, 2];\n  }\n\n  var a, b;\n  [a, b] = f();\n  assert (a === 1);\n  assert (b === 2);\n}) ();\n\n// Ignoring some returned values\n(function () {\n  function f() {\n    return [1, 2, 3];\n  }\n\n  var a, b;\n  [a, ,b] = f();\n  assert (a === 1);\n  assert (b === 3);\n}) ();\n\n// Ignoring some returned values\n(function () {\n  var [a, ...b] = [1, 2, 3];\n  assert (a === 1);\n  assertArrayEqual (b, [2, 3]);\n}) ();\n\n// Unpacking values from a regular expression match\n(function () {\n  function parseProtocol(url) {\n    var parsedURL = /^(\\w+)\\:\\/\\/([^\\/]+)\\/(.*)$/.exec(url);\n    if (!parsedURL) {\n      return false;\n    }\n\n    var [, protocol, fullhost, fullpath] = parsedURL;\n    return protocol;\n  }\n\n  assert (parseProtocol(\"https://developer.mozilla.org/en-US/Web/JavaScript\") === \"https\");\n}) ();\n\n// Test inner patterns I.\n(function () {\n  let [a, [b, [c = 4, d = 5]], [e] = [6]] = [1, [2, [3,undefined]]];\n\n  assert (a === 1);\n  assert (b === 2);\n  assert (c === 3);\n  assert (d === 5);\n  assert (e === 6);\n}) ();\n\n// Test inner patterns II.\n(function () {\n  var o = {};\n  [a, b, c, o.a = 4, o.b, o.c = 3] = [\"1\", \"2\", \"3\", undefined, \"8\", \"6\"];\n\n  assert (a === \"1\");\n  assert (b === \"2\");\n  assert (c === \"3\");\n  assert (o.a === 4);\n  assert (o.b === \"8\");\n  assert (o.c === \"6\");\n}) ();\n\n// Test rest element I.\n(function () {\n  var o = {};\n  [...o.a] = [\"1\", \"2\", \"3\"];\n\n  assertArrayEqual (o.a, [\"1\", \"2\", \"3\"]);\n}) ();\n\n// Test rest element II.\n(function () {\n  [...[a,b,c]] = [\"1\", \"2\", \"3\"];\n\n  assert (a === \"1\");\n  assert (b === \"2\");\n  assert (c === \"3\");\n}) ();\n\n// Test inner object pattern I.\n(function () {\n  [{f : a, g : b}, , , ...[c, d, e]] = [{ f : \"1\", g : \"2\"}, 3, 4, 5, 6, 7];\n\n  assert (a === \"1\");\n  assert (b === \"2\");\n  assert (c === 5);\n  assert (d === 6);\n  assert (e === 7);\n}) ();\n\n// Multiple declaration\n(function () {\n  var [a] = [1], [b] = [2];\n\n  assert (a === 1);\n  assert (b === 2);\n}) ();\n\n// Force the creation of lexical environment I.\n(function () {\n  const [a] = [1];\n  eval();\n\n  assert (a === 1);\n}) ();\n\n// Force the creation of lexical environment II.\n(function () {\n  let [a] = [1];\n  eval();\n\n  assert (a === 1);\n}) ();\n\n// Check the parsing of AssignmentElement\n(function () {\n  var a = 6;\n  [((a))] = [7];\n  assert (a === 7);\n}) ();\n\n// Test iterator closing\nfunction __createIterableObject (arr, methods) {\n  methods = methods || {};\n  if (typeof Symbol !== 'function' || !Symbol.iterator) {\n    return {};\n  }\n  arr.length++;\n  var iterator = {\n    next: function() {\n      return { value: arr.shift(), done: arr.length <= 0 };\n    },\n    'return': methods['return'],\n    'throw': methods['throw']\n  };\n  var iterable = {};\n  iterable[Symbol.iterator] = function () { return iterator; };\n  return iterable;\n};\n\n(function () {\n  var closed = false;\n  var iter = __createIterableObject([1, 2, 3], {\n    'return': function() { closed = true; return {}; }\n  });\n  var [a, b] = iter;\n  assert (closed === true);\n  assert (a === 1);\n  assert (b === 2);\n}) ();\n\n(function () {\n  var value = { y: \"42\" };\n  var x = {};\n  var assignmentResult, iterationResult, iter;\n\n  iter = (function*() {\n    assignmentResult = { y: x[yield] } = value;\n  }());\n\n  iterationResult = iter.next();\n\n  assert (assignmentResult === undefined);\n  assert (iterationResult.value === undefined);\n  assert (iterationResult.done === false);\n  assert (x.prop === undefined);\n\n  iterationResult = iter.next('prop');\n\n  assert (assignmentResult === value);\n  assert (iterationResult.value === undefined);\n  assert (iterationResult.done === true);\n  assert (x.prop === \"42\");\n}) ();\n\n(function () {\n  var value = { foo: \"42\" };\n  var x = {};\n  var assignmentResult, iterationResult, iter;\n\n  iter = (function*() {\n    assignmentResult = { ['f' + 'o' + 'o']: x[yield] } = value;\n  }());\n\n  iterationResult = iter.next();\n\n  assert (assignmentResult === undefined);\n  assert (iterationResult.value === undefined);\n  assert (iterationResult.done === false);\n  assert (x.prop === undefined);\n\n  iterationResult = iter.next('prop');\n\n  assert (assignmentResult === value);\n  assert (iterationResult.value === undefined);\n  assert (iterationResult.done === true);\n  assert (x.prop === \"42\");\n}) ();\n\nmustThrow (\"var iter = __createIterableObject([], \"\n           + \"{ get 'return'() { throw new TypeError() }});\"\n           + \"var [a] = iter\");\n\nmustThrow (\"var iter = __createIterableObject([], \"\n           + \"{ 'return': 5 });\"\n           + \"var [a] = iter\");\n\nmustThrow (\"var iter = __createIterableObject([], \"\n           + \"{ 'return': function() { return 5; }});\"\n           + \"var [a] = iter\");\n\nmustThrow (\"try { throw 5 } catch (e) {\"\n           + \"var iter = __createIterableObject([], \"\n           + \"{ get 'return'() { throw new TypeError() }});\"\n           + \"var [a] = iter }\");\n\nmustThrow (\"try { throw 5 } catch (e) {\"\n           + \"var iter = __createIterableObject([], \"\n           + \"{ 'return': 5 });\"\n           + \"var [a] = iter }\");\n\nmustThrow (\"try { throw 5 } catch (e) {\"\n           + \"var iter = __createIterableObject([], \"\n           + \"{ 'return': function() { return 5; }});\"\n           + \"var [a] = iter }\");\n\ntry {\n  eval (\"var a = 0; 1 + [a] = [1]\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-copywithin.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {};\n\n// Checking behavior with normal inputs\nvar array = [\"foo\", 1, \"bar\", obj, 2, \"baz\"];\nassert(array.copyWithin(2,0,6).toString() === \"foo,1,foo,1,bar,[object Object]\");\nassert(array.copyWithin(0,1,3).toString() === \"1,foo,foo,1,bar,[object Object]\");\nassert(array.copyWithin(3,0,4).toString() === \"1,foo,foo,1,foo,foo\");\n\n// Checking behavior with default inputs\nvar array = [\"foo\", 1, \"bar\", obj, 2, \"baz\"];\nassert(array.copyWithin().toString() === \"foo,1,bar,[object Object],2,baz\");\nassert(array.copyWithin(2).toString() === \"foo,1,foo,1,bar,[object Object]\");\nassert(array.copyWithin(1,4).toString() === \"foo,bar,[object Object],1,bar,[object Object]\");\n\n// Checking behavior when argument is negative or bigger then length\nvar array = [\"foo\", 1, \"bar\", obj, 2, \"baz\"];\nassert(array.copyWithin(12,3,-3).toString() === \"foo,1,bar,[object Object],2,baz\");\nassert(array.copyWithin(-2,-4,3).toString() === \"foo,1,bar,[object Object],bar,baz\");\nassert(array.copyWithin(1,-5,30).toString() === \"foo,1,bar,[object Object],bar,baz\");\n\n// Checking behavior with undefined, NaN, +/- Infinity\nvar array = [\"foo\", 1, \"bar\", obj, 2, \"baz\"];\nassert(array.copyWithin(undefined).toString() === \"foo,1,bar,[object Object],2,baz\");\nassert(array.copyWithin(2, NaN).toString()=== \"foo,1,foo,1,bar,[object Object]\");\nassert(array.copyWithin(2,undefined,5).toString() === \"foo,1,foo,1,foo,1\");\n\nvar array = [\"foo\", 1, \"bar\", obj, 2, \"baz\"];\nassert(array.copyWithin(Infinity,2,NaN).toString() === \"foo,1,bar,[object Object],2,baz\");\nassert(array.copyWithin(Infinity,-Infinity,4).toString()=== \"foo,1,bar,[object Object],2,baz\");\nassert(array.copyWithin(NaN,0,3).toString() === \"foo,1,bar,[object Object],2,baz\");\n\n// Checking behavior when no length property defined\nvar obj = { copyWithin : Array.prototype.copyWithin };\n\nobj.copyWithin();\nassert(obj.length === undefined);\n\n// Checking behavior when unable to get length\nvar obj = { copyWithin : Array.prototype.copyWithin };\nObject.defineProperty(obj, 'length', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.copyWithin(1);\n  assert(false)\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when unable to get element\nvar obj = { copyWithin : Array.prototype.copyWithin, length : 5 };\nObject.defineProperty(obj, '2', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj.copyWithin(2);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// Checking behavior when a property is not defined\nvar obj = { '0' : 2, '2' : \"foo\", length : 3, copyWithin : Array.prototype.copyWithin };\n\nobj.copyWithin(1);\nassert(obj[0] === 2);\nassert(obj[1] === 2);\n\nfunction array_check(result_array, expected_array) {\n  assert(result_array instanceof Array);\n  assert(result_array.length === expected_array.length);\n  for (var idx = 0; idx < expected_array.length; idx++) {\n    assert(result_array[idx] === expected_array[idx]);\n  }\n}\n\n// Remove the buffer\nvar array = [1, 2, 3];\nvar value = array.copyWithin(0, {\n    valueOf: function() {\n        array.length = 0;\n    }\n})\narray_check(value, []);\n\n// Extend the buffer\nvar array = [1, 2, 3];\nvar value = array.copyWithin(1, {\n    valueOf: function() {\n        array.length = 6;\n    }\n})\narray_check(value, [1, 1, 2, undefined, undefined, undefined]);\n\n// Reduce the buffer\nvar array = [1, 2, 3, 4, 5, 6, 7];\nvar value = array.copyWithin(4, 2, {\n    valueOf: function() {\n        array.length = 3;\n    }\n})\narray_check(value, [1, 2, 3]);\n\n// Reduce the buffer and extend the buffer\nvar array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nvar value = array.copyWithin(7, {\n    valueOf: function() {\n        array.length = 5;\n    }\n})\narray_check(value, [1, 2, 3, 4, 5, , , 1, 2, 3]);\n\n// Copy with overlapping (backward copy)\nvar array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nvar value = array.copyWithin(0, 2, 8)\narray_check(value, [3, 4, 5, 6, 7, 8, 7, 8, 9, 10]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-entries.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Array.prototype.entries.call (undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError)\n}\n\nvar array = ['a', \"foo\", 1, 1.5, true, {} ,[], function f () { }];\n\nvar iterator = array.entries ();\n\nvar current_item = iterator.next ();\n\nfor (var i = 0; i < array.length; i++) {\n  assert (current_item.value[0] === i);\n  assert (current_item.value[1] === array[i]);\n  assert (current_item.done === false);\n\n  current_item = iterator.next ();\n}\n\nassert (current_item.value === undefined);\nassert (current_item.done === true);\n\nfunction foo_error () {\n  throw new ReferenceError (\"foo\");\n}\n\narray = [1, 2, 3, 4, 5, 6, 7];\n\n['0', '3', '5'].forEach (function (e) {\n  Object.defineProperty (array, e, { 'get' : foo_error });\n})\n\niterator = array.entries ();\n\nvar expected_values = [2, 3, 5, 7];\nvar expected_indices = [1, 2, 4, 6];\nvar expected_values_idx = 0;\n\nfor (var i = 0; i < array.length; i++) {\n  try {\n    current_item = iterator.next ();\n    assert (current_item.value[0] === expected_indices[expected_values_idx]);\n    assert (current_item.value[1] === expected_values[expected_values_idx]);\n    assert (current_item.done === false);\n    expected_values_idx++;\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n    assert (e.message === \"foo\");\n  }\n}\n\ncurrent_item = iterator.next ();\nassert (current_item.value === undefined);\nassert (current_item.done === true);\n\n/* Test empty array */\narray = [];\n\niterator = array.entries ();\ncurrent_item = iterator.next ();\n\nassert (current_item.value === undefined);\nassert (current_item.done === true);\n\n/* Test delete elements after the iterator has been constructed */\n\narray = [0, 1, 2, 3, 4, 5];\niterator = array.entries ();\n\nfor (var i = 0; i < array.length; i++) {\n  current_item = iterator.next ();\n  assert (current_item.value[0] === i);\n  assert (current_item.value[1] === array[i]);\n  assert (current_item.done === false);\n  array.pop();\n}\n\nassert ([].entries ().toString () === \"[object Array Iterator]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-fill.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2014 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nfunction assertArrayEquals (array1, array2) {\n  if (array1.length !== array2.length) {\n    return false;\n  }\n\n  for (var i = 0; i < array1.length; i++) {\n    if (array1[i] !== array2[i]) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nassert (1 === Array.prototype.fill.length);\n\nassert (assertArrayEquals ([].fill (8), []));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (), [undefined, undefined, undefined, undefined, undefined]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8), [8, 8, 8, 8, 8]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, 1), [0, 8, 8, 8, 8]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, 10), [0, 0, 0, 0, 0]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, -5), [8, 8, 8, 8, 8]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, 1, 4), [0, 8, 8, 8, 0]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, 1, -1), [0, 8, 8, 8, 0]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, 1, 42), [0, 8, 8, 8, 8]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, -3, 42), [0, 0, 8, 8, 8]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, -3, 4), [0, 0, 8, 8, 0]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, -2, -1), [0, 0, 0, 8, 0]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, -1, -3), [0, 0, 0, 0, 0]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (8, undefined, 4), [8, 8, 8, 8, 0]));\nassert (assertArrayEquals ([ ,  ,  ,  , 0].fill (8, 1, 3), [, 8, 8, , 0]));\nassert (assertArrayEquals ([0, 0, 0, 0, 0].fill (7.8), [7.8, 7.8, 7.8, 7.8, 7.8]));\nassert (assertArrayEquals ([\"foo\", \"bar\", \"baz\"].fill (1), [1, 1, 1]));\n\n\n// If the range is empty, the array is not actually modified and\n// should not throw, even when applied to a frozen object.\nassert (assertArrayEquals (Object.freeze ([1, 2, 3]).fill (0, 0, 0), [1, 2, 3]));\n\n// Test exceptions\ntry {\n  Object.freeze ([0]).fill ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\ntry {\n  Array.prototype.fill.call (null)\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\ntry {\n  Array.prototype.fill.call (undefined)\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nfunction TestFillObjectWithAccessors () {\n  var kLength = 5;\n\n  var log = [];\n\n  var object = {\n    length: kLength,\n    get 1 () {\n      log.push (\"get 1\");\n      return this.foo;\n    },\n\n    set 1 (val) {\n      log.push (\"set 1 \" + val);\n      this.foo = val;\n    }\n  };\n\n  Array.prototype.fill.call (object, 42);\n\n  assert (kLength === object.length);\n  assert (assertArrayEquals ([\"set 1 42\"], log));\n\n  for  (var i = 0; i < kLength; ++i) {\n    assert (42 === object[i]);\n  }\n}\nTestFillObjectWithAccessors ();\n\nfunction TestFillObjectWithMaxNumberLength () {\n  var kMaxSafeInt = Math.pow (2, 32) - 1;\n  var object = {};\n  object.length = kMaxSafeInt;\n\n  Array.prototype.fill.call (object, 42, Math.pow (2, 32) - 4);\n\n  assert (kMaxSafeInt === object.length);\n  assert (42 === object[kMaxSafeInt - 3]);\n  assert (42 === object[kMaxSafeInt - 2]);\n  assert (42 === object[kMaxSafeInt - 1]);\n}\nTestFillObjectWithMaxNumberLength ();\n\nfunction TestFillObjectWithPrototypeAccessors () {\n  var kLength = 5;\n  var log = [];\n  var proto = {\n    get 1 () {\n      log.push (\"get 0\");\n      return this.foo;\n    },\n\n    set 1 (val) {\n      log.push (\"set 1 \" + val);\n      this.foo = val;\n    }\n  };\n\n  var object = { 0:0, 2:2, length: kLength};\n  Object.setPrototypeOf (object, proto);\n\n  Array.prototype.fill.call (object, \"42\");\n\n  assert (kLength === object.length);\n  assert (assertArrayEquals ([\"set 1 42\"], log));\n  assert (object.hasOwnProperty (0) == true);\n  assert (object.hasOwnProperty (1) == false);\n  assert (object.hasOwnProperty (2) == true);\n  assert (object.hasOwnProperty (3) == true);\n  assert (object.hasOwnProperty (4) == true);\n\n  for (var i = 0; i < kLength; ++i) {\n    assert (\"42\" === object[i]);\n  }\n}\nTestFillObjectWithPrototypeAccessors ();\n\nfunction TestFillSealedObject () {\n  var object = { length: 42 };\n  Object.seal (object);\n\n  try {\n    Array.prototype.fill.call (object);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n}\nTestFillSealedObject ();\n\nfunction TestFillFrozenObject () {\n  var object = { length: 42 };\n  Object.freeze (object);\n\n  try {\n    Array.prototype.fill.call (object);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n}\nTestFillFrozenObject ();\n\nfunction array_check(result_array, expected_array) {\n  assert(result_array instanceof Array);\n  assert(result_array.length === expected_array.length);\n  for (var idx = 0; idx < expected_array.length; idx++) {\n    assert(result_array[idx] === expected_array[idx]);\n  }\n}\n\n\n// Remove the buffer\nvar array = [1, 2, 3, 4, 5];\nvar value = array.fill(2, 0, {\n    valueOf: function() {\n        array.length = 0;\n    }\n})\n\narray_check(value, []);\n\n// Extend the buffer\nvar array = [1, 2, 3];\nvar value = array.fill(1, {\n    valueOf: function() {\n        array.length = 6;\n    }\n})\n\narray_check(value, [1, 1, 1, undefined, undefined, undefined]);\n\n// Reduce the buffer\nvar array = [1, 2, 3, 4, 5, 6, 7];\nvar value = array.fill(4, {\n    valueOf: function() {\n        array.length = 3;\n    }\n})\n\narray_check(value, [4, 4, 4]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-find-index.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrow_is_available = false;\n\ntry {\n  assert (eval (\"(f => 5) ()\") === 5);\n  arrow_is_available = true;\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nvar array1 = [5, 12, 0, 8, 130, 44];\n\nfunction bigger_than_10 (element) {\n  return element > 10;\n}\n\nassert (array1.findIndex (bigger_than_10) === 1);\n\nfunction less_than_0 (element) {\n  if (element == 0) {\n    throw new Error (\"zero\");\n  }\n  return element < 0;\n}\n\ntry {\n  array1.findIndex (less_than_0);\n  assert (false);\n} catch (e) {\n  assert (e instanceof Error);\n  assert (e.message === \"zero\");\n}\n\nvar inventory = [\n    {name: 'apples', quantity: 2},\n    {name: 'bananas', quantity: 0},\n    {name: 'cherries', quantity: 5}\n];\n\nfunction isCherries (fruit) {\n    return fruit.name === 'cherries';\n}\n\nassert (JSON.stringify (inventory.findIndex (isCherries)) === \"2\");\n\nif (arrow_is_available) {\n  assert (eval (\"inventory.findIndex (fruit => fruit.name === 'bananas')\") === 1);\n}\n\n/* Test the callback function arguments */\nvar src_array = [4, 6, 8, 12];\nvar array_index = 0;\n\nfunction isPrime (element, index, array) {\n  assert (array_index++ === index);\n  assert (array === src_array)\n  assert (element === array[index]);\n\n  var start = 2;\n  while (start <= Math.sqrt (element)) {\n    if (element % start++ < 1) {\n      return false;\n    }\n  }\n  return element > 1;\n}\n\nassert (src_array.findIndex (isPrime) === -1);\n\nsrc_array = [4, 5, 8, 12];\narray_index = 0;\nassert (src_array.findIndex (isPrime) === 1);\n\n// Checking behavior when the given object is not %Array%\ntry {\n  Array.prototype.findIndex.call (5);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Checking behavior when unable to get length\nvar obj = {};\nObject.defineProperty (obj, 'length', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\nobj.findIndex = Array.prototype.findIndex;\n\ntry {\n  obj.findIndex ();\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\nvar data = { 0: 1, 2: -3, 3: \"string\" }\nassert (Array.prototype.findIndex.call (data, function (e) { return e < 5; }) === -1);\n\n// Checking behavior when unable to get element\nvar obj = {}\nobj.length = 1;\nObject.defineProperty (obj, '0', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\nobj.findIndex = Array.prototype.findIndex;\n\ntry {\n  obj.findIndex (function () { return undefined; });\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Checking behavior when the first argument is not a callback\nvar array = [1, 2, 3];\n\ntry {\n  array.findIndex (5);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Checking behavior when the first argument does not exist\ntry {\n  array.findIndex ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Checking behavior when there are more than 2 arguments\nassert (array.findIndex (function (e) { return e < 2 }, {}, 8, 4, 5, 6, 6) === 0);\n\nfunction func (element) {\n  return element > 8;\n}\n\n/* ES v6.0 22.1.3.9.8.c\n   Checking behavior when the first element deletes the second */\nfunction f() { delete arr[1]; };\nvar arr = [0, 1, 2, 3];\nObject.defineProperty(arr, '0', { 'get' : f });\nArray.prototype.findIndex.call(arr, func);\n\n/* ES v6.0 22.1.3.9.8\n   Checking whether predicate is called also for empty elements */\nvar count = 0;\n\n[,,,].findIndex(function() { count++; return false; });\nassert (count == 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-find.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrow_is_available = false;\n\ntry {\n  assert (eval (\"(f => 5) ()\") === 5);\n  arrow_is_available = true;\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nvar array1 = [5, 12, 0, 8, 130, 44];\n\nfunction bigger_than_10 (element) {\n  return element > 10;\n}\n\nassert (array1.find (bigger_than_10) === 12);\n\nfunction less_than_0 (element) {\n  if (element == 0) {\n    throw new Error (\"zero\");\n  }\n  return element < 0;\n}\n\ntry {\n  array1.find (less_than_0);\n  assert (false);\n} catch (e) {\n  assert (e instanceof Error);\n  assert (e.message === \"zero\");\n}\n\nvar inventory = [\n    {name: 'apples', quantity: 2},\n    {name: 'bananas', quantity: 0},\n    {name: 'cherries', quantity: 5}\n];\n\nfunction isCherries (fruit) {\n    return fruit.name === 'cherries';\n}\n\nassert (JSON.stringify (inventory.find (isCherries)) === '{\"name\":\"cherries\",\"quantity\":5}');\n\nif (arrow_is_available) {\n  assert (eval (\"inventory.find (fruit => fruit.name === 'bananas')\") === inventory[1]);\n}\n\n/* Test the callback function arguments */\nvar src_array = [4, 6, 8, 12];\nvar array_index = 0;\n\nfunction isPrime (element, index, array) {\n  assert (array_index++ === index);\n  assert (array === src_array)\n  assert (element === array[index]);\n\n  var start = 2;\n  while (start <= Math.sqrt (element)) {\n    if (element % start++ < 1) {\n      return false;\n    }\n  }\n  return element > 1;\n}\n\nassert (src_array.find (isPrime) === undefined);\n\nsrc_array = [4, 5, 8, 12];\narray_index = 0;\nassert (src_array.find (isPrime) === 5);\n\n\n// Checking behavior when unable to get length\nvar obj = {};\nObject.defineProperty (obj, 'length', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\nobj.find = Array.prototype.find;\n\ntry {\n  obj.find ();\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\nvar data = { 0: 1, 2: -3, 3: \"string\" }\nassert (Array.prototype.find.call (data, function (e) { return e < 5; }) === undefined);\n\n// Checking behavior when unable to get element\nvar obj = {}\nobj.length = 1;\nObject.defineProperty (obj, '0', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\nobj.find = Array.prototype.find\n\ntry {\n  obj.find (function () { return undefined; });\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Checking behavior when the first argument is not a callback\nvar array = [1, 2, 3];\n\ntry {\n  array.find (5);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Checking behavior when the first argument does not exist\ntry {\n  array.find ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Checking behavior when the there are more than 2 arguments\nassert (array.find (function (e) { return e < 2 }, {}, 8, 4, 5, 6, 6) === 1);\n\nfunction func (element) {\n  return element > 8;\n}\n\n/* ES v6.0 22.1.3.8.8.c\n   Checking behavior when the first element deletes the second */\nfunction f() { delete arr[1]; };\nvar arr = [0, 1, 2, 3];\nObject.defineProperty(arr, '0', { 'get' : f });\nArray.prototype.find.call(arr, func);\n\n/* ES v6.0 22.1.3.8.8\n   Checking whether predicate is called also for empty elements */\nvar count = 0;\n\n[,,,].find(function() { count++; return false; });\nassert (count == 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-flat-flatMap.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// helper function - simple implementation\nArray.prototype.equals = function (array) {\n  if (this.length != array.length)\n    return false;\n\n  for (var i = 0; i < this.length; i++) {\n    if (this[i] instanceof Array && array[i] instanceof Array) {\n      if (!this[i].equals(array[i]))\n        return false;\n      }\n      else if (this[i] != array[i]) {\n        return false;\n    }\n  }\n\n  return true;\n}\n// various checks on flat prototype\nassert ([1, 4, 9].flat(2).equals([1, 4, 9]))\nassert ([[4,9]].flat(0).equals([[4,9]]))\nassert ([[4,9]].flat(1).equals([4,9]))\nassert ([1, 4, [9,3,[2,4,[3,4]]]].flat(5).equals([1, 4, 9, 3, 2, 4, 3, 4]));\n\nvar array1 = [1,3,4]\nvar array2 = [array1,array1]\nassert(array2.flat(1).equals([1,3,4,1,3,4]))\nassert(array2.flat(0).equals([[1,3,4],[1,3,4]]))\n\nvar array3 = [array2]\nassert(array3.flat(0).equals([[[1,3,4],[1,3,4]]]))\nassert(array3.flat(1).equals([[1,3,4],[1,3,4]]))\nassert(array3.flat(2).equals([1,3,4,1,3,4]))\n\nvar array4 = []\nassert(array4.flat(10).equals([]))\n\nvar array5 = [null, array4]\nassert(array5.flat(10).equals([null]))\n\n// various checks on flatMap Prototype\nassert([1, 2, 3, 4].flatMap(x => [x, x * 2]).equals([1,2,2,4,3,6,4,8]))\nassert([1, 2, 3, 4].flatMap(x => [x, x * x]).equals([1,1,2,4,3,9,4,16]))\nassert(array1.flatMap(x => [x, x * 2]).equals([1,2,3,6,4,8]))\nassert(array4.flatMap(x => [x, x * 2]).equals([]))\n\nfunction check_flat (map, depth)\n{\n  try {\n    map.flat (depth)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n}\n\nfunction check_flat_map (map, mapper)\n{\n  try {\n    map.flatMap (mapper)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n}\n\n// invalid depth\ncheck_flat ([1,2], Symbol())\n\n// constructor is null\nvar a = new Array();\na.constructor = null;\ncheck_flat (a,1)\n\n// callback is not object\ncheck_flat_map ([1,2], null)\n\n// constructor is null\ncheck_flat_map (a,x => [x, x * x])\n\n// \"0\" get is a TypeError\nvar array_2 = [1,2]\nObject.defineProperty (array_2, '0', { 'get' : function () { throw new TypeError (); } });\ncheck_flat (array_2, 1)\ncheck_flat_map (array_2,x => [x, x * x])\n\n// \"0\" is not Array and throw error\nvar revocable = Proxy.revocable ({}, {});\nvar proxy = revocable.proxy;\nrevocable.revoke();\nvar array_3 = [proxy,2]\ncheck_flat (array_3, 1)\n\n// second call of FlattenIntoArray return with a error\nvar array_4_1 = [1,2]\nObject.defineProperty (array_4_1, '0', { 'get' : function () { throw new TypeError (); } });\nvar array_4 = [array_4_1,1,2]\ncheck_flat (array_4, 1)\n\n// unable to add new property\nvar array_5 = [array_2,1,2]\ncheck_flat (array_2, 1)\n\nvar A = function(_length) {\n  Object.defineProperty(this, \"0\", {\n    writable: true,\n    configurable: false,\n  });\n};\n\nvar arr = [1];\narr.constructor = {};\narr.constructor[Symbol.species] = A;\n\ncheck_flat_map (arr, A)\n\n// element value is not found\nvar array_6 = []\narray_6.length = 2\narray_6.flat()\n\n// mapped function is error\nvar array_7 = [1,2]\nvar f = function () {\n  throw new TypeError()\n}\ncheck_flat_map (array_7, f)\n\nvar obj = new Proxy ([], { get(t, p, r) {\n  if (p === 'length') {\n    throw new TypeError();\n  }\n}})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-includes.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Array.prototype.includes.length === 1);\nassert(Array.prototype.includes.name === \"includes\");\n\nvar num_arr = [1, 2, 3,,4, 5];\nvar str_arr = ['foo', 'bar', 'baz', NaN, 'foo'];\nvar obj = {};\nvar obj_arr = [1, obj, 2];\nvar empry_arr = [];\n\nassert(num_arr.includes(3) === true);\nassert(num_arr.includes(3, 4) === false);\nassert(num_arr.includes(3, -5) === true);\nassert(num_arr.includes(undefined) === true);\nassert(num_arr.includes(3, Infinity) === false);\nassert(num_arr.includes(3, -0) === true);\nassert(str_arr.includes(NaN) === true);\nassert(str_arr.includes('foo', 4) === true);\nassert(str_arr.includes('f') === false);\nassert(obj_arr.includes(obj) === true);\nassert(obj_arr.includes({}) === false);\nassert(empry_arr.includes() === false);\nassert(empry_arr.includes(3) === false);\nassert([undefined].includes() === true);\n\nObject.defineProperty(num_arr, \"1\", { get: function() {throw 42}});\n\ntry {\n  num_arr.includes(4);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\nvar sym = Symbol('foo');\n\ntry {\n  num_arr.includes(3, sym);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Remove the buffer\nvar array = [1, 2, 3, 4, 5];\nvar found = array.includes(4, {\n    valueOf: function() {\n        array.length = 0;\n    }\n})\n\nassert(found === false);\n\n// Extend the buffer\nvar array = [1, 2, 3];\nvar found = array.includes(2, {\n    valueOf: function() {\n        array.length = 5;\n    }\n})\n\nassert(found === true);\n\n// Reduce the buffer\nvar array = [1, 2, 3, 4, 5, 6, 7];\nvar found = array.includes(6, {\n    valueOf: function() {\n        array.length = 5;\n    }\n})\n\nassert(found === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-keys.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Array.prototype.keys.call (undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError)\n}\n\nvar array = ['a', \"foo\", 1, 1.5, true, {} ,[], function f () { }];\n\nvar iterator = array.keys ();\n\nvar current_item = iterator.next ();\n\nfor (var i = 0; i < array.length; i++) {\n  assert (current_item.value === i);\n  assert (current_item.done === false);\n\n  current_item = iterator.next ();\n}\n\nassert (current_item.value === undefined);\nassert (current_item.done === true);\n\nfunction foo_error () {\n  throw new ReferenceError (\"foo\");\n}\n\narray = [1, 2, 3, 4, 5, 6, 7];\n\n['0', '3', '5'].forEach (function (e) {\n  Object.defineProperty (array, e, { 'get' : foo_error });\n})\n\niterator = array.keys ();\n\nfor (var i = 0; i < array.length; i++) {\n  try {\n    current_item = iterator.next ();\n    assert (current_item.value === i);\n    assert (current_item.done === false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n    assert (e.message === \"foo\");\n  }\n}\n\ncurrent_item = iterator.next ();\nassert (current_item.value === undefined);\nassert (current_item.done === true);\n\n/* Test empty array */\narray = [];\n\niterator = array.keys ();\ncurrent_item = iterator.next ();\n\nassert (current_item.value === undefined);\nassert (current_item.done === true);\n\n/* Test delete elements after the iterator has been constructed */\n\narray = [0, 1, 2, 3, 4, 5];\niterator = array.keys ();\n\nfor (var i = 0; i < array.length; i++) {\n  current_item = iterator.next ();\n  assert (current_item.value === i);\n  assert (current_item.done === false);\n  array.pop();\n}\n\nassert ([].keys ().toString () === \"[object Array Iterator]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-slice.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Constructor creates longer array than expected.\nclass LongArray extends Array {\n    constructor(len) {\n        super (42);\n        this.fill (\"foo\");\n    }\n}\n\nvar a = new LongArray (5);\na.length = 5;\nvar sliced = a.slice ();\nassert (sliced.length == 5);\nassert (JSON.stringify (sliced) == '[\"foo\",\"foo\",\"foo\",\"foo\",\"foo\"]')\n\n// Constructor creates shorter array than expected.\nclass ShortArray extends Array {\n    constructor(len) {\n        super (2);\n        this.fill (\"bar\");\n    }\n}\n\nvar b = new ShortArray (8);\nb.length = 8;\nb.fill (\"asd\", 2);\nvar sliced2 = b.slice ();\nassert (sliced2.length == 8);\nassert (JSON.stringify (sliced2) == '[\"bar\",\"bar\",\"asd\",\"asd\",\"asd\",\"asd\",\"asd\",\"asd\"]');\n\n// Constructor creates array of the expected size.\nclass ExactArray extends Array {\n    constructor(len) {\n        super (len);\n        this.fill (\"baz\");\n    }\n}\n\nvar c = new ExactArray (5);\nvar sliced3 = c.slice();\nassert (sliced3.length == 5);\nassert (JSON.stringify (sliced3) == '[\"baz\",\"baz\",\"baz\",\"baz\",\"baz\"]');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-sort.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar proxy = new Proxy({length: 5}, {\n  getOwnPropertyDescriptor() { throw 42.5; }\n})\n\ntry {\n  Array.prototype.sort.call(proxy);\n  assert(false);\n} catch (e) {\n  assert(e === 42.5);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-unshift.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrayLike = {get 5() { throw \"shouldn't throw\"; }};\narrayLike.length = 10;\nArray.prototype.unshift.call(arrayLike);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-prototype-values.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Array.prototype.values.call (undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError)\n}\n\nvar array = ['a', \"foo\", 1, 1.5, true, {} ,[], function f () { }];\n\nvar iterator = array.values ();\n\n/* The initial value of the @@iterator property is the same function object\n   as the initial value of the Array.prototype.values property. */\nvar symbol_iterator = array[Symbol.iterator] ();\n\nvar current_item = iterator.next ();\nvar symbol_current_item = symbol_iterator.next ();\n\nfor (var i = 0; i < array.length; i++) {\n  assert (current_item.value === array[i]);\n  assert (current_item.done === false);\n\n  assert (current_item.value === symbol_current_item.value);\n  assert (current_item.done === symbol_current_item.done);\n\n  current_item = iterator.next ();\n  symbol_current_item = symbol_iterator.next ();\n}\n\nassert (current_item.value === undefined);\nassert (current_item.done === true);\nassert (current_item.value === symbol_current_item.value);\nassert (current_item.done === symbol_current_item.done);\n\nfunction foo_error () {\n  throw new ReferenceError (\"foo\");\n}\n\narray = [1, 2, 3, 4, 5, 6, 7];\n\n['0', '3', '5'].forEach (function (e) {\n  Object.defineProperty (array, e, { 'get' : foo_error });\n})\n\niterator = array.values ();\n\nvar expected_values = [2, 3, 5, 7];\nvar expected_values_idx = 0;\n\nfor (var i = 0; i < array.length; i++) {\n  try {\n    current_item = iterator.next ();\n    assert (current_item.value === expected_values[expected_values_idx++]);\n    assert (current_item.done === false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n    assert (e.message === \"foo\");\n  }\n}\n\ncurrent_item = iterator.next ();\nassert (current_item.value === undefined);\nassert (current_item.done === true);\n\n/* Test empty array */\narray = [];\n\niterator = array.values ();\ncurrent_item = iterator.next ();\n\nassert (current_item.value === undefined);\nassert (current_item.done === true);\n\n/* Test delete elements after the iterator has been constructed */\n\narray = [0, 1, 2, 3, 4, 5];\niterator = array.values ();\n\nfor (var i = 0; i < array.length; i++) {\n  current_item = iterator.next ();\n  assert (current_item.value === array[i]);\n  assert (current_item.done === false);\n  array.pop();\n}\n\nassert ([].values ().toString () === \"[object Array Iterator]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-species.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Test the ES2015 @@species feature\n\n'use strict';\n\n// Subclasses of Array construct themselves under map, etc\n\nclass MyArray extends Array { }\n\nfunction assertEquals(a, b) {\n  assert(a === b);\n}\n\nassertEquals(MyArray, new MyArray().map(()=>{}).constructor);\nassertEquals(MyArray, new MyArray().filter(()=>{}).constructor);\nassertEquals(MyArray, new MyArray().slice().constructor);\nassertEquals(MyArray, new MyArray().splice().constructor);\nassertEquals(MyArray, new MyArray().concat([1]).constructor);\nassertEquals(1, new MyArray().concat([1])[0]);\n\n// Subclasses can override @@species to return the another class\n\nclass MyOtherArray extends Array {\n  static get [Symbol.species]() { return MyArray; }\n}\n\nassertEquals(MyArray, new MyOtherArray().map(()=>{}).constructor);\nassertEquals(MyArray, new MyOtherArray().filter(()=>{}).constructor);\nassertEquals(MyArray, new MyOtherArray().slice().constructor);\nassertEquals(MyArray, new MyOtherArray().splice().constructor);\nassertEquals(MyArray, new MyOtherArray().concat().constructor);\n\n// Array  methods on non-arrays return arrays\n\nclass MyNonArray extends Array {\n  static get [Symbol.species]() { return MyObject; }\n}\n\nclass MyObject { }\n\nassertEquals(MyObject,\n             Array.prototype.map.call(new MyNonArray(), ()=>{}).constructor);\nassertEquals(MyObject,\n             Array.prototype.filter.call(new MyNonArray(), ()=>{}).constructor);\nassertEquals(MyObject,\n             Array.prototype.slice.call(new MyNonArray()).constructor);\nassertEquals(MyObject,\n             Array.prototype.splice.call(new MyNonArray()).constructor);\nassertEquals(MyObject,\n             Array.prototype.concat.call(new MyNonArray()).constructor);\n\nassertEquals(undefined,\n             Array.prototype.map.call(new MyNonArray(), ()=>{}).length);\nassertEquals(undefined,\n             Array.prototype.filter.call(new MyNonArray(), ()=>{}).length);\n// slice, splice, and concat actually do explicitly define the length.\nassertEquals(0, Array.prototype.slice.call(new MyNonArray()).length);\nassertEquals(0, Array.prototype.splice.call(new MyNonArray()).length);\nassertEquals(1, Array.prototype.concat.call(new MyNonArray(), ()=>{}).length);\n\n// Defaults when constructor or @@species is missing or non-constructor\n\nclass MyDefaultArray extends Array {\n  static get [Symbol.species]() { return undefined; }\n}\nassertEquals(Array, new MyDefaultArray().map(()=>{}).constructor);\n\nclass MyOtherDefaultArray extends Array { }\nassertEquals(MyOtherDefaultArray,\n             new MyOtherDefaultArray().map(()=>{}).constructor);\nMyOtherDefaultArray.prototype.constructor = undefined;\nassertEquals(Array, new MyOtherDefaultArray().map(()=>{}).constructor);\nassertEquals(Array, new MyOtherDefaultArray().concat().constructor);\n\n// Exceptions propagated when getting constructor @@species throws\n\nclass SpeciesError extends Error { }\nclass ConstructorError extends Error { }\nclass MyThrowingArray extends Array {\n  static get [Symbol.species]() { throw new SpeciesError; }\n}\n\nfunction assertThrows (a, b) {\n  try {\n    a();\n  } catch (e) {\n    assert(e instanceof b);\n  }\n}\n\nassertThrows(() => new MyThrowingArray().map(()=>{}), SpeciesError);\nObject.defineProperty(MyThrowingArray.prototype, 'constructor', {\n    get() { throw new ConstructorError; }\n});\nassertThrows(() => new MyThrowingArray().map(()=>{}), ConstructorError);\n\n// Previously unexpected errors from setting properties in arrays throw\n\nclass FrozenArray extends Array {\n  constructor(...args) {\n    super(...args);\n    Object.freeze(this);\n  }\n}\nassertThrows(() => new FrozenArray([1]).map(()=>0), TypeError);\nassertThrows(() => new FrozenArray([1]).filter(()=>true), TypeError);\nassertThrows(() => new FrozenArray([1]).slice(0, 1), TypeError);\nassertThrows(() => new FrozenArray([1]).splice(0, 1), TypeError);\nassertThrows(() => new FrozenArray([]).concat([1]), TypeError);\n\n// Verify call counts and constructor parameters\n\nvar count;\nvar params;\nclass MyObservedArray extends Array {\n  constructor(...args) {\n    super(...args);\n    params = args;\n  }\n  static get [Symbol.species]() {\n    count++\n    return this;\n  }\n}\n\nfunction assertArrayEquals(value, expected, type) {\n  assert(expected.length === value.length);\n  for (var i=0; i<value.length; ++i) {\n    assertEquals(expected[i], value[i]);\n  }\n}\n\ncount = 0;\nparams = undefined;\nassertEquals(MyObservedArray,\n             new MyObservedArray().map(()=>{}).constructor);\nassertEquals(1, count);\nassertArrayEquals([0], params);\n\ncount = 0;\nparams = undefined;\nassertEquals(MyObservedArray,\n             new MyObservedArray().filter(()=>{}).constructor);\nassertEquals(1, count);\nassertArrayEquals([0], params);\n\ncount = 0;\nparams = undefined;\nassertEquals(MyObservedArray,\n             new MyObservedArray().concat().constructor);\nassertEquals(1, count);\nassertArrayEquals([0], params);\n\ncount = 0;\nparams = undefined;\nassertEquals(MyObservedArray,\n             new MyObservedArray().slice().constructor);\nassertEquals(1, count);\nassertArrayEquals([0], params);\n\ncount = 0;\nparams = undefined;\nassertEquals(MyObservedArray,\n             new MyObservedArray().splice().constructor);\nassertEquals(1, count);\nassertArrayEquals([0], params);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/array-spread.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction assertArrayEqual (actual, expected) {\n  assert (actual.length === expected.length);\n\n  for (var i = 0; i < actual.length; i++) {\n    assert (actual[i] === expected[i]);\n  }\n}\n\nfunction checkSyntax (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\nfunction mustThrow (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n}\n\ncheckSyntax (\"{...a}\");\ncheckSyntax (\"...a\");\ncheckSyntax (\"[...]\");\ncheckSyntax (\"[...(...)]\");\ncheckSyntax (\"[......]\");\n\nmustThrow (\"[...5]\");\nmustThrow (\"[...5, 'foo', 'bar']\");\nmustThrow (\"[...{}]\");\nmustThrow (\"[...{ get [Symbol.iterator] () { throw new TypeError } }]\");\nmustThrow (\"[...{ [Symbol.iterator] () {} }, 'foo']\");\nmustThrow (\"[...{ [Symbol.iterator] () { return {} } }]\");\nmustThrow (\"[...{ [Symbol.iterator] () { return { next: 5 } } }]\");\nmustThrow (\"[...{ [Symbol.iterator] () { return { next: 5 } } }], 'foo'\");\nmustThrow (\"[...{ [Symbol.iterator] () { return { get next() { throw new TypeError } } } }]\");\nmustThrow (\"[...{ [Symbol.iterator] () { return { next () { } } } }]\");\nmustThrow (\"[...{ [Symbol.iterator] () { return { next () { } } } }, 'foo']\");\nmustThrow (\"[...{ [Symbol.iterator] () { return { next () { return { get value () { throw new TypeError } } } } } } ]\");\nmustThrow (\"[...{ [Symbol.iterator] () { return { next () { return { get done () { throw new TypeError } } } } } } ]\");\n\nvar arr1 = [0, 1, 2];\nvar arr2 = [3, 4, 5];\nvar arr3 = [{}, {}, {}];\nvar expected = [0, 1, 2, 3 ,4, 5];\n\nassertArrayEqual ([...arr1, ...arr2], [0, 1, 2, 3 ,4, 5]);\nassertArrayEqual ([...arr2, ...arr1], [3 ,4, 5, 0, 1, 2]);\nassertArrayEqual ([...arr1, 9, 9, 9, ...arr2], [0, 1, 2, 9, 9, 9, 3 ,4, 5]);\nassertArrayEqual ([...arr1, ...[...arr2]], [0, 1, 2, 3 ,4, 5]);\nassertArrayEqual ([\"0\" , \"1\", ...arr1, ...[...arr2]], [\"0\", \"1\", 0, 1, 2, 3 ,4, 5]);\nassertArrayEqual ([...arr3], arr3);\nassertArrayEqual ([...\"foobar\"], [\"f\", \"o\", \"o\", \"b\", \"a\" ,\"r\"]);\nassertArrayEqual ([...(new Set([1, \"foo\", arr3]))], [1, \"foo\", arr3]);\n\nvar holyArray = [,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,...arr1];\nassert (holyArray.length === 83);\nassert (holyArray[82] === 2);\nassert (holyArray[81] === 1);\nassert (holyArray[80] === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arraybuffer-isview.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nassert(ArrayBuffer.isView() === false);\nassert(ArrayBuffer.isView([]) === false);\nassert(ArrayBuffer.isView({}) === false);\nassert(ArrayBuffer.isView(null) === false);\nassert(ArrayBuffer.isView(undefined) === false);\nassert(ArrayBuffer.isView(new ArrayBuffer(10)) === false);\n\nassert(ArrayBuffer.isView(new Int8Array()) === true);\nassert(ArrayBuffer.isView(new Uint8Array()) === true);\nassert(ArrayBuffer.isView(new Uint8ClampedArray()) === true);\nassert(ArrayBuffer.isView(new Int16Array()) === true);\nassert(ArrayBuffer.isView(new Uint16Array()) === true);\nassert(ArrayBuffer.isView(new Int32Array()) === true);\nassert(ArrayBuffer.isView(new Uint32Array()) === true);\nassert(ArrayBuffer.isView(new Float32Array()) === true);\nassert(ArrayBuffer.isView(new Float64Array()) === true);\n\nassert(ArrayBuffer.isView(new Int8Array(10).subarray(0, 3)) === true);\n\nvar buffer = new ArrayBuffer(2);\nvar dv = new DataView(buffer);\nassert(ArrayBuffer.isView(dv) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arrow-assignment.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar y = 0\nvar prot = Object.getPrototypeOf(/ /)\n\nprot.setY = function (v) { y = v }\n\nassert(y === 0)\n// Since arrow function is an assignment expression, this affects certain constructs\nvar f = x => {}\n/ /.setY(5)\nassert(y === 5)\n\nvar s\n// This is not a function call\nassert(eval(\"s = x => { return 1 }\\n(3)\") === 3)\nassert(typeof s === \"function\")\n\n// This is a function call\nassert(eval(\"s = function () { return 1 }\\n(3)\") === 1)\nassert(s === 1)\n\nvar f = 5 ? x => 1 : x => 2\nassert(f() === 1)\n\nvar f = [x => 2][0]\nassert(f() === 2)\n\nvar f = 123; f += x => y\nassert(typeof f === \"string\")\n\n// Comma operator\nassert(eval(\"x => {}, 5\") === 5)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arrow-eval.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet a = 4\n\nvar f = () => {\n  eval(\"var a = 5\")\n  assert(a === 5)\n}\nf()\n\nassert(a === 4)\n\nfunction g() {\n  eval(\"var b = 6\")\n\n  assert(b === 6)\n\n  var h = () => delete b\n  h()\n\n  try {\n    b\n    assert(false)\n  } catch (e) {\n    assert(e instanceof ReferenceError)\n  }\n}\ng()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arrow-function.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction must_throw (str)\n{\n  try\n  {\n    eval (\"switch (1) { default: \" + str + \"}\");\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n\n  try\n  {\n    eval (str);\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n}\n\nfunction must_throw_strict (str)\n{\n  try\n  {\n    eval (\"'use strict'; switch (1) { default: \" + str + \"}\");\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n\n  try\n  {\n    eval (\"'use strict'; \" + str);\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n}\n\nswitch (1)\n{\ndefault:\n\n  var func = x => { return x + 3 }\n  assert (func(5) == 8);\n\n  a => 5 /* no semicolon after */\n\n  assert (((x =>\n    x + 1))(4) == 5)\n\n  assert ((a => a += 3, b => b -= 3)(4) == 1);\n\n  func = true ? x=>x+2:y=>y-2\n  assert (func(10) == 12);\n\n  func = arguments =>\n    { return arguments + 4; }\n  assert (func(2) == 6);\n\n  func = (\n          ) => { return typeof\n    arguments\n  }\n  assert (func() === \"undefined\");\n\n  if (a => 0)\n  {\n  }\n  else\n  {\n    assert (false);\n  }\n\n  assert ((\n    (\n    static\n    ,\n    package\n    ) => static + package\n  ) (2, 12) == 14);\n\n  var global_var = 7;\n\n  assert ((\n    (\n    static\n    ,\n    package\n    ) => { global_var = 5; return static + package }\n  )(4, 5) == 9);\n\n  assert (global_var == 5);\n\n  func = (x , y) => {}\n  assert (func() === undefined)\n\n  assert ((x => y => z => 6)()()() == 6)\n\n  func = x => x - 6\n  var func2 = y => func(y)\n  assert (func2 (17) == 11)\n\n  func = (m) => m++\n  assert (func (4) == 4)\n\n  func = () =>\n    ((([0,0,0])))\n  assert (func ().length == 3);\n\n  func = (a = 5, b = 7 * 2) => a + b;\n  assert (func() == 19);\n  assert (func(1) == 15);\n\n  func = (a = Math.cos(0)) => a;\n  assert (func() == 1);\n}\n\nmust_throw (\"var x => x;\");\nmust_throw (\"(()) => 0\");\nmust_throw (\"((x)) => 0\");\nmust_throw (\"(((x))) => 0\");\nmust_throw (\"(x==6) => 0\");\nmust_throw (\"(x y) => 0\");\nmust_throw (\"x\\n => 0\");\nmust_throw (\"this => 0\");\nmust_throw (\"(true) => 0\");\nmust_throw (\"()\\n=>5\");\nmust_throw (\"3 + x => 3\");\nmust_throw (\"3 || x => 3\");\nmust_throw (\"a = 3 || (x,y) => 3\");\nmust_throw (\"x => {} (4)\");\nmust_throw (\"!x => 4\");\nmust_throw (\"x => {} = 1\");\nmust_throw (\"x => {} a = 1\");\nmust_throw (\"x => {} ? 1 : 0\");\nmust_throw (\"(x,x,x) => 0\");\nmust_throw (\"(x,x,x) => { }\");\nmust_throw_strict (\"(package) => 0\");\nmust_throw_strict (\"(package) => { return 5 }\");\nmust_throw_strict (\"(x,x,x) => 0\");\nmust_throw_strict (\"(x,x,x) => { }\");\n\nvar f = (a) => 1;\nassert(f() === 1);\n\nvar f = (a => 2);\nassert(f() === 2);\n\nvar f = ((((a => ((3))))));\nassert(f() === 3);\n\nvar f = (((a) => 4));\nassert(f() === 4);\n\nvar f = (a,b) => 5;\nassert(f() === 5);\n\nvar f = (((a,b) => 6));\nassert(f() === 6);\n\nvar f = ((a,b) => x => (a) => 7);\nassert(f()()() === 7);\n\nvar f = (((a=1,b=2) => ((x => (((a) => 8))))));\nassert(f()()() === 8);\n\nvar f = () => {};\n\nassert(f.hasOwnProperty('caller') === false);\nassert(f.hasOwnProperty('arguments') === false);\n\nmust_throw(\"var f = () => {}; f.caller\")\nmust_throw(\"var f = () => {}; f.arguments\")\nmust_throw(\"var f = () => {}; f.caller = 1\")\nmust_throw(\"var f = () => {}; f.arguments = 2\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/arrow-this.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar o = {\n  x: 13,\n\n  f: function()\n  {\n    return () => this.x + 1\n  },\n\n  g: function()\n  {\n    return function() {\n      return this.x + 1\n    }\n  }\n}\n\nassert(o.f().call(o) === 14);\nassert(o.g().call(o) === 14);\n\nassert(o.f()() === 14);\n\nvar o2 = { x:4, f:o.f(), g:o.g() }\n\nassert(o2.f() === 14);\nassert(o2.g() === 5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint-typedarray-prototype-filter.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction arrayEquals(result, expected) {\n  assert(result.length === expected.length);\n\n  for (var idx = 0; idx < result.length; idx++) {\n    assert(result[idx] === expected[idx]);\n  }\n}\n\nvar bigint64_array = new BigInt64Array([1n, 2n, 3n, -4n, 5n]);\n\nfunction positive(element, index, array) {\n  return element > 0n;\n}\n\nvar bigint64_filter = bigint64_array.filter(positive);\narrayEquals(bigint64_filter, [1n, 2n, 3n, 5n]);\n\nvar biguint64_array = new BigUint64Array([1n, 2n, 3n, -4n, 5n]);\nvar biguint64_filter = biguint64_array.filter(positive);\nassert(biguint64_filter.length === 5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint-typedarray-prototype-reduce.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar bigint64_array = new BigInt64Array([1n, 2n, 3n, -4n, 5n]);\n\nfunction sum(prev, current) {\n  return prev + current;\n}\n\nvar bigint64_reduce_result = bigint64_array.reduce(sum, 7n);\nassert(bigint64_reduce_result === 14n);\n\nvar biguint64_array = new BigUint64Array([1n, 2n, 3n, -4n, 5n]);\nvar biguint64_reduce_result = biguint64_array.reduce(sum, 7n);\nassert(biguint64_reduce_result === 18446744073709551630n);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_result(bigint, expected)\n{\n  assert(bigint.toString() === expected)\n}\n\nfunction check_result16(bigint, expected)\n{\n  assert(bigint.toString(16) === expected)\n}\n\nfunction check_syntax_error(code)\n{\n  try {\n    eval(code)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof SyntaxError)\n  }\n}\n\nassert(typeof BigInt(\"0\") == \"bigint\")\n\n// Test BigInt string parsing and toString\n\ncheck_syntax_error(\"BigInt('-0x5')\");\ncheck_syntax_error(\"BigInt('-')\");\ncheck_syntax_error(\"BigInt('00x5')\");\ncheck_syntax_error(\"BigInt('11a')\");\ncheck_syntax_error(\"BigInt('0b2')\");\ncheck_syntax_error(\"BigInt('1n')\");\n\ncheck_result(BigInt(\"0\"), \"0\")\ncheck_result(BigInt(\"-0\"), \"0\")\ncheck_result(BigInt(\"100000000000000000000000000000000000000\"), \"100000000000000000000000000000000000000\")\ncheck_result(BigInt(\"-1234567890123456789012345678901234567890\"), \"-1234567890123456789012345678901234567890\")\ncheck_result(BigInt(\"+1\"), \"1\")\ncheck_result(BigInt(\"+000000000000000000001\"), \"1\")\ncheck_result(BigInt(\"-000000000000000000000\"), \"0\")\ncheck_result(BigInt(\"0x00abcdefABCDEF0123456789000000000000000\"), \"239460437713606077082343926293727858623774720\")\ncheck_result(BigInt(\"0b00100000000000010000000000010000000000010\"), \"274911469570\")\n\nassert(BigInt(\"100000000000000000000000000000000000000\").toString(22) === \"2ci67fiek1bkhec5fig7aiii9hf8c\")\ncheck_result16(BigInt(\"239460437713606077082343926293727858623774720\"), \"abcdefabcdef0123456789000000000000000\")\n\n// Test negate\n\ncheck_result(-BigInt(\"0\"), \"0\")\ncheck_result(-BigInt(\"100\"), \"-100\")\ncheck_result(-BigInt(\"-100\"), \"100\")\ncheck_result(-BigInt(\"100000000000000000000000000000000000000000000\"), \"-100000000000000000000000000000000000000000000\")\ncheck_result(-BigInt(\"-100000000000000000000000000000000000000000000\"), \"100000000000000000000000000000000000000000000\")\n\n// Test addition\n\ncheck_result(BigInt(\"0\") + BigInt(\"0\"), \"0\")\ncheck_result(BigInt(\"1\") + BigInt(\"1\"), \"2\")\ncheck_result(BigInt(\"0\") + BigInt(\"100\"), \"100\")\ncheck_result(BigInt(\"0\") + BigInt(\"-100\"), \"-100\")\ncheck_result(BigInt(\"100\") + BigInt(\"0\"), \"100\")\ncheck_result(BigInt(\"-100\") + BigInt(\"0\"), \"-100\")\n\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") + BigInt(\"100000000000000000000000000000000000000\"),\n             \"200000000000000000000000000000000000000\");\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") + BigInt(\"-100000000000000000000000000000000000000\"),\n             \"-200000000000000000000000000000000000000\");\ncheck_result(BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3\") + BigInt(\"0xd\"),\n             \"115792089237316195423570985008687907853269984665640564039457584007913129639936\");\ncheck_result(BigInt(\"0xd\") + BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3\"),\n             \"115792089237316195423570985008687907853269984665640564039457584007913129639936\");\n\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") + BigInt(\"-100000000000000000000000000000000000000\"), \"0\")\ncheck_result(BigInt(\"100000000000000000000000000000000000001\") + BigInt(\"-100000000000000000000000000000000000000\"), \"1\")\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") + BigInt(\"-100000000000000000000000000000000000001\"), \"-1\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") + BigInt(\"100000000000000000000000000000000000000\"), \"0\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000001\") + BigInt(\"100000000000000000000000000000000000000\"), \"-1\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") + BigInt(\"100000000000000000000000000000000000001\"), \"1\")\n\n// Test substraction\n\ncheck_result(BigInt(\"0\") - BigInt(\"0\"), \"0\")\ncheck_result(BigInt(\"2\") - BigInt(\"1\"), \"1\")\ncheck_result(BigInt(\"0\") - BigInt(\"100\"), \"-100\")\ncheck_result(BigInt(\"0\") - BigInt(\"-100\"), \"100\")\ncheck_result(BigInt(\"100\") - BigInt(\"0\"), \"100\")\ncheck_result(BigInt(\"-100\") - BigInt(\"0\"), \"-100\")\n\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") - BigInt(\"-100000000000000000000000000000000000000\"),\n             \"200000000000000000000000000000000000000\");\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") - BigInt(\"100000000000000000000000000000000000000\"),\n             \"-200000000000000000000000000000000000000\");\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") - BigInt(\"-1\"),\n             \"100000000000000000000000000000000000001\");\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") - BigInt(\"1\"),\n             \"-100000000000000000000000000000000000001\");\ncheck_result(BigInt(\"1\") - BigInt(\"-100000000000000000000000000000000000000\"),\n             \"100000000000000000000000000000000000001\");\ncheck_result(BigInt(\"-1\") - BigInt(\"100000000000000000000000000000000000000\"),\n             \"-100000000000000000000000000000000000001\");\n\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") - BigInt(\"100000000000000000000000000000000000000\"), \"0\")\ncheck_result(BigInt(\"100000000000000000000000000000000000001\") - BigInt(\"100000000000000000000000000000000000000\"), \"1\")\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") - BigInt(\"100000000000000000000000000000000000001\"), \"-1\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") - BigInt(\"-100000000000000000000000000000000000000\"), \"0\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000001\") - BigInt(\"-100000000000000000000000000000000000000\"), \"-1\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") - BigInt(\"-100000000000000000000000000000000000001\"), \"1\")\n\n// Test multiplication\n\ncheck_result(BigInt(\"0\") * BigInt(\"0\"), \"0\")\ncheck_result(BigInt(\"1000\") * BigInt(\"0\"), \"0\")\ncheck_result(BigInt(\"0\") * BigInt(\"1000\"), \"0\")\ncheck_result(BigInt(\"1\") * BigInt(\"100000000000000000000000000000000000000\"), \"100000000000000000000000000000000000000\")\ncheck_result(BigInt(\"1\") * BigInt(\"-100000000000000000000000000000000000000\"), \"-100000000000000000000000000000000000000\")\ncheck_result(BigInt(\"-1\") * BigInt(\"100000000000000000000000000000000000000\"), \"-100000000000000000000000000000000000000\")\ncheck_result(BigInt(\"-1\") * BigInt(\"-100000000000000000000000000000000000000\"), \"100000000000000000000000000000000000000\")\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") * BigInt(\"1\"), \"100000000000000000000000000000000000000\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") * BigInt(\"1\"), \"-100000000000000000000000000000000000000\")\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") * BigInt(\"-1\"), \"-100000000000000000000000000000000000000\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") * BigInt(\"-1\"), \"100000000000000000000000000000000000000\")\n\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") * BigInt(\"100000000000000000000000000000000000000\"),\n             \"10000000000000000000000000000000000000000000000000000000000000000000000000000\")\ncheck_result(BigInt(\"100000000000000000000000000000000000000\") * BigInt(\"-100000000000000000000000000000000000000\"),\n             \"-10000000000000000000000000000000000000000000000000000000000000000000000000000\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") * BigInt(\"100000000000000000000000000000000000000\"),\n             \"-10000000000000000000000000000000000000000000000000000000000000000000000000000\")\ncheck_result(BigInt(\"-100000000000000000000000000000000000000\") * BigInt(\"-100000000000000000000000000000000000000\"),\n             \"10000000000000000000000000000000000000000000000000000000000000000000000000000\")\n\n// Test divide\n\ntry {\n  BigInt(\"32\") / BigInt(\"0\")\n  assert(false)\n} catch (e) {\n  assert(e instanceof RangeError)\n}\n\ntry {\n  BigInt(\"32\") % BigInt(\"0\")\n  assert(false)\n} catch (e) {\n  assert(e instanceof RangeError)\n}\n\ncheck_result(BigInt(\"0\") / BigInt(\"1234\"), \"0\")\ncheck_result(BigInt(\"0\") % BigInt(\"1234\"), \"0\")\n\ncheck_result(BigInt(\"100\") / BigInt(\"70\"), \"1\")\ncheck_result(BigInt(\"100\") % BigInt(\"70\"), \"30\")\ncheck_result(BigInt(\"-100\") / BigInt(\"70\"), \"-1\")\ncheck_result(BigInt(\"-100\") % BigInt(\"70\"), \"-30\")\ncheck_result(BigInt(\"100\") / BigInt(\"-70\"), \"-1\")\ncheck_result(BigInt(\"100\") % BigInt(\"-70\"), \"30\")\ncheck_result(BigInt(\"-100\") / BigInt(\"-70\"), \"1\")\ncheck_result(BigInt(\"-100\") % BigInt(\"-70\"), \"-30\")\n\ncheck_result(BigInt(\"100\") / BigInt(\"100\"), \"1\")\ncheck_result(BigInt(\"100\") % BigInt(\"100\"), \"0\")\ncheck_result(BigInt(\"-100\") / BigInt(\"100\"), \"-1\")\ncheck_result(BigInt(\"-100\") % BigInt(\"100\"), \"0\")\ncheck_result(BigInt(\"100\") / BigInt(\"-100\"), \"-1\")\ncheck_result(BigInt(\"100\") % BigInt(\"-100\"), \"0\")\ncheck_result(BigInt(\"-100\") / BigInt(\"-100\"), \"1\")\ncheck_result(BigInt(\"-100\") % BigInt(\"-100\"), \"0\")\n\n/* Division by small value. */\ncheck_result(BigInt(\"100000000000000000000\") / BigInt(\"1000000\"), \"100000000000000\")\ncheck_result(BigInt(\"100000000000000000000\") % BigInt(\"1000000\"), \"0\")\ncheck_result(BigInt(\"12345678901234567890\") / BigInt(\"1000000\"), \"12345678901234\")\ncheck_result(BigInt(\"12345678901234567890\") % BigInt(\"1000000\"), \"567890\")\n\n/* Division by large value. */\ncheck_result(BigInt(\"100000000000000000000\") / BigInt(\"100000000000000000\"), \"1000\")\ncheck_result(BigInt(\"100000000000000000000\") % BigInt(\"100000000000000000\"), \"0\")\ncheck_result(BigInt(\"12345678901234567890123456789012345678901234567890123456789012345678901234567890\") / BigInt(\"10000000000000000000000000000000000000\"),\n                    \"1234567890123456789012345678901234567890123\")\ncheck_result(BigInt(\"12345678901234567890123456789012345678901234567890123456789012345678901234567890\") % BigInt(\"10000000000000000000000000000000000000\"),\n                    \"4567890123456789012345678901234567890\")\ncheck_result16(BigInt(\"0xffffffffffffffffffffffff\") / BigInt(\"0x100000000\"), \"ffffffffffffffff\")\ncheck_result16(BigInt(\"0xffffffffffffffffffffffff\") % BigInt(\"0x100000000\"), \"ffffffff\")\n\n/* Triggers a corner case. */\ncheck_result(BigInt(\"170141183420855150493001878992821682176\") / BigInt(\"39614081266355540842216685573\"), \"4294967293\")\ncheck_result(BigInt(\"170141183420855150493001878992821682176\") % BigInt(\"39614081266355540842216685573\"), \"39614081266355540837921718287\")\n\n// Test shift\n\ncheck_result(BigInt(\"0\") << BigInt(\"10000000\"), \"0\")\ncheck_result(BigInt(\"0\") >> BigInt(\"10000000\"), \"0\")\ncheck_result(BigInt(\"10000000\") << BigInt(\"0\"), \"10000000\")\ncheck_result(BigInt(\"10000000\") >> BigInt(\"0\"), \"10000000\")\n\ncheck_result(BigInt(\"4096\") << BigInt(\"2\"), \"16384\")\ncheck_result(BigInt(\"4096\") << BigInt(\"-2\"), \"1024\")\ncheck_result(BigInt(\"4096\") >> BigInt(\"2\"), \"1024\")\ncheck_result(BigInt(\"4096\") >> BigInt(\"-2\"), \"16384\")\n\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") << BigInt(\"1\"), \"11fdebf9fffdebf9fffdebf9fffdebf9fe\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") << BigInt(\"19\"), \"47f7afe7fff7afe7fff7afe7fff7afe7f80000\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") << BigInt(\"31\"), \"47f7afe7fff7afe7fff7afe7fff7afe7f80000000\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") << BigInt(\"32\"), \"8fef5fcfffef5fcfffef5fcfffef5fcff00000000\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") << BigInt(\"51\"), \"47f7afe7fff7afe7fff7afe7fff7afe7f8000000000000\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") << BigInt(\"63\"), \"47f7afe7fff7afe7fff7afe7fff7afe7f8000000000000000\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") << BigInt(\"64\"), \"8fef5fcfffef5fcfffef5fcfffef5fcff0000000000000000\")\n\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") >> BigInt(\"1\"), \"47f7afe7fff7afe7fff7afe7fff7afe7f\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") >> BigInt(\"19\"), \"11fdebf9fffdebf9fffdebf9fffde\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") >> BigInt(\"31\"), \"11fdebf9fffdebf9fffdebf9ff\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") >> BigInt(\"32\"), \"8fef5fcfffef5fcfffef5fcff\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") >> BigInt(\"51\"), \"11fdebf9fffdebf9fffde\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") >> BigInt(\"63\"), \"11fdebf9fffdebf9ff\")\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") >> BigInt(\"64\"), \"8fef5fcfffef5fcff\")\n\ncheck_result16(-BigInt(\"0xff\") >> BigInt(\"8\"), \"-1\")\ncheck_result16(-BigInt(\"0xff\") >> BigInt(\"1000\"), \"-1\")\ncheck_result16(-BigInt(\"0xff\") >> BigInt(\"7\"), \"-2\")\ncheck_result16(-BigInt(\"0xff00000000\") >> BigInt(\"32\"), \"-ff\")\ncheck_result16(-BigInt(\"0xff80000000\") >> BigInt(\"32\"), \"-100\")\ncheck_result16(-BigInt(\"0xff00000000000000000000000000000000\") >> BigInt(\"128\"), \"-ff\")\ncheck_result16(-BigInt(\"0xff80000000000000000000000000000000\") >> BigInt(\"128\"), \"-100\")\ncheck_result16(-BigInt(\"0xfe00000000000000000000000000000000\") >> BigInt(\"129\"), \"-7f\")\ncheck_result16(-BigInt(\"0xff00000000000000000000000000000000\") >> BigInt(\"129\"), \"-80\")\n\ncheck_result16(BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") >> BigInt(\"10000000000000000000000000\"), \"0\")\n\ntry {\n  BigInt(\"0x8fef5fcfffef5fcfffef5fcfffef5fcff\") << BigInt(\"10000000000000000000000000\");\n  assert(false)\n} catch (e) {\n  assert(e instanceof RangeError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ntry {\n  new BigInt(\"1\")\n  assert(false)\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n\nfunction check_type_error (code)\n{\n  try {\n    eval(code)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof TypeError)\n  }\n}\n\ncheck_type_error(\"+BigInt('0')\")\n\ncheck_type_error(\"BigInt('1') + 1\")\ncheck_type_error(\"BigInt('2') - 2\")\ncheck_type_error(\"BigInt('3') * 3\")\ncheck_type_error(\"BigInt('4') / 4\")\ncheck_type_error(\"BigInt('5') % 5\")\ncheck_type_error(\"BigInt('6') ** 6\")\n\ncheck_type_error(\"1 + BigInt('1')\")\ncheck_type_error(\"2 - BigInt('2')\")\ncheck_type_error(\"3 * BigInt('3')\")\ncheck_type_error(\"4 / BigInt('4')\")\ncheck_type_error(\"5 % BigInt('5')\")\ncheck_type_error(\"6 ** BigInt('6')\")\n\ncheck_type_error(\"BigInt('1') & 1\")\ncheck_type_error(\"BigInt('2') | 2\")\ncheck_type_error(\"BigInt('3') ^ 3\")\ncheck_type_error(\"BigInt('4') << 4\")\ncheck_type_error(\"BigInt('5') >> 5\")\ncheck_type_error(\"BigInt('6') >>> 6\")\n\ncheck_type_error(\"1 & BigInt('1')\")\ncheck_type_error(\"2 | BigInt('2')\")\ncheck_type_error(\"3 ^ BigInt('3')\")\ncheck_type_error(\"4 << BigInt('4')\")\ncheck_type_error(\"5 >> BigInt('5')\")\ncheck_type_error(\"6 >>> BigInt('6')\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint3.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_result(bigint, expected)\n{\n  assert(bigint.toString() === expected)\n}\n\nfunction check_error (code, error_type)\n{\n  try {\n    eval(code)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof error_type)\n  }\n}\n\ncheck_error(\"BigInt(undefined)\", TypeError)\ncheck_error(\"BigInt(null)\", TypeError)\ncheck_error(\"BigInt(Symbol())\", TypeError)\n\ncheck_error(\"BigInt(0.25)\", RangeError)\ncheck_error(\"BigInt(-0.25)\", RangeError)\ncheck_error(\"BigInt(-10000000.25)\", RangeError)\ncheck_error(\"BigInt(4503599627370495.5)\", RangeError)\ncheck_error(\"BigInt(NaN)\", RangeError)\ncheck_error(\"BigInt(Infinity)\", RangeError)\n\ncheck_result(BigInt(true), \"1\")\ncheck_result(BigInt(false), \"0\")\ncheck_result(BigInt({ valueOf() { return \"0x100\" } }), \"256\")\n\ncheck_result(BigInt(0), \"0\")\ncheck_result(BigInt(-0), \"0\")\ncheck_result(BigInt(8192), \"8192\")\ncheck_result(BigInt(-0xffffffffff), \"-1099511627775\")\ncheck_result(BigInt(0x1fffffffffffff), \"9007199254740991\")\ncheck_result(BigInt(-4503599627370496), \"-4503599627370496\")\ncheck_result(BigInt(4503599627370496.5), \"4503599627370496\")\ncheck_result(BigInt(9007199254740991.5), \"9007199254740992\")\ncheck_result(BigInt(0x1fffffffffffff * (2 ** 70)), \"10633823966279325802638835764831453184\")\ncheck_result(BigInt(-0x1fffffffffffff * (2 ** 128)), \"-3064991081731777376434327133362154903862870812598992896\")\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint4.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Boolean. */\n\nassert(!BigInt(\"0\") === true)\nassert(!BigInt(\"1\") === false)\nassert(!BigInt(\"-1\") === false)\n\n/* Strict equal. */\n\nassert(BigInt(\"0\") === BigInt(\"0\"))\nassert(BigInt(\"-77\") === BigInt(\"-77\"))\nassert(!(BigInt(\"-77\") !== BigInt(\"-77\")))\n\nassert(!(Object(BigInt(\"-77\")) === BigInt(\"-77\")))\nassert(BigInt(\"-77\") !== Object(BigInt(\"-77\")))\n\nassert(BigInt(\"0xffffffffffffffffffffffffffffffff\") === BigInt(\"0xffffffffffffffffffffffffffffffff\"))\nassert(!(BigInt(\"0xfffffffffffffffffffffffffffffffe\") === BigInt(\"0xffffffffffffffffffffffffffffffff\")))\nassert(BigInt(\"0x100000000000000000000000000000000\") !== BigInt(\"0xffffffffffffffffffffffffffffffff\"))\nassert(!(BigInt(\"1234\") === 1234))\nassert(-4567 !== BigInt(\"-4567\"))\n\n/* Equal. */\n\nassert(BigInt(\"0x100\") == BigInt(\"256\"))\nassert(BigInt(\"-77\") == \"-77\")\nassert(\"168\" == BigInt(\"168\"))\nassert(!(\"0xffffffffffffffffffffffffffffffff\" != BigInt(\"0xffffffffffffffffffffffffffffffff\")))\n\nassert(BigInt(\"0x1000\") == 0x1000)\nassert(468123 == BigInt(\"468123\"))\n\nassert(!(BigInt(\"100000000\") == 100000000.5))\nassert(-0.125 != BigInt(\"0\"))\nassert(!(\"InvalidBigIntString\" == BigInt(\"100000000\")))\nassert(BigInt(\"100000000\") != \"10000 0000\")\n\nassert(BigInt(\"0\") == 0)\nassert(!(-0 != BigInt(\"0\")))\nassert(!(BigInt(\"0\") == 0.0000152587890625))\nassert(0.0000152587890625 != BigInt(\"0\"))\n\nassert(!(BigInt(\"100000000\") == NaN))\nassert(NaN != BigInt(\"-100000000\"))\nassert(!(BigInt(\"100000000000000000000000000\") == Infinity))\nassert(Infinity != BigInt(\"100000000000000000000000000\"))\n\n/* Relational. */\n\nassert(!(BigInt(\"1234\") < BigInt(\"1234\")))\nassert(BigInt(\"1234\") >= BigInt(\"1234\"))\nassert(BigInt(\"1234\") <= BigInt(\"1234\"))\nassert(!(BigInt(\"1234\") > BigInt(\"1234\")))\n\nassert(BigInt(\"1234\") < BigInt(\"1235\"))\nassert(!(BigInt(\"1234\") >= BigInt(\"1235\")))\nassert(BigInt(\"1234\") <= BigInt(\"1235\"))\nassert(!(BigInt(\"1234\") > BigInt(\"1235\")))\n\nassert(!(BigInt(\"123456789012345678901234567890\") < \"123456789012345678901234567890\"))\nassert(BigInt(\"123456789012345678901234567890\") >= \"123456789012345678901234567890\")\nassert(BigInt(\"123456789012345678901234567890\") <= \"123456789012345678901234567890\")\nassert(!(BigInt(\"123456789012345678901234567890\") > \"123456789012345678901234567890\"))\n\nassert(!(\"0x1234567890abcdef1234567890abcdef\" < BigInt(\"0x1234567890abcdef1234567890abcdef\")))\nassert(\"0x1234567890abcdef1234567890abcdef\" >= BigInt(\"0x1234567890abcdef1234567890abcdef\"))\nassert(\"0x1234567890abcdef1234567890abcdef\" <= BigInt(\"0x1234567890abcdef1234567890abcdef\"))\nassert(!(\"0x1234567890abcdef1234567890abcdef\" > BigInt(\"0x1234567890abcdef1234567890abcdef\")))\n\nassert(!(\"Invalid\" < BigInt(\"100\")))\nassert(!(\"Invalid\" >= BigInt(\"100\")))\nassert(!(\"Invalid\" <= BigInt(\"100\")))\nassert(!(\"Invalid\" > BigInt(\"100\")))\n\nassert(!(BigInt(\"0\") < \"NotABigInt\"))\nassert(!(BigInt(\"0\") >= \"NotABigInt\"))\nassert(!(BigInt(\"0\") <= \"NotABigInt\"))\nassert(!(BigInt(\"0\") > \"NotABigInt\"))\n\nassert(!(BigInt(\"0\") < 0))\nassert(BigInt(\"0\") >= 0)\nassert(BigInt(\"0\") <= 0)\nassert(!(BigInt(\"0\") > 0))\n\nassert(!(-0 < BigInt(\"0\")))\nassert(-0 >= BigInt(\"0\"))\nassert(-0 <= BigInt(\"0\"))\nassert(!(-0 > BigInt(\"0\")))\n\nassert(BigInt(\"0\") < 67)\nassert(!(BigInt(\"0\") > 67))\nassert(!(BigInt(\"0\") < -0.125))\nassert(BigInt(\"0\") > -0.125)\n\nassert(!(BigInt(\"7\") < NaN))\nassert(!(BigInt(\"7\") >= NaN))\nassert(!(BigInt(\"7\") <= NaN))\nassert(!(BigInt(\"7\") > NaN))\n\nassert(!(Infinity < BigInt(\"1000000000000000000000000000000\")))\nassert(!(Infinity <= BigInt(\"1000000000000000000000000000000\")))\nassert(Infinity >= BigInt(\"1000000000000000000000000000000\"))\nassert(Infinity > BigInt(\"1000000000000000000000000000000\"))\n\nassert(-Infinity < BigInt(\"1000000000000000000000000000000\"))\nassert(-Infinity <= BigInt(\"1000000000000000000000000000000\"))\nassert(!(-Infinity >= BigInt(\"1000000000000000000000000000000\")))\nassert(!(-Infinity > BigInt(\"1000000000000000000000000000000\")))\n\nassert(BigInt(\"-10000\") < 1)\nassert(BigInt(\"-10000\") <= 1)\nassert(!(BigInt(\"-10000\") >= 1))\nassert(!(BigInt(\"-10000\") > 1))\n\nassert(!(1 < BigInt(\"-12345678\")))\nassert(!(1 <= BigInt(\"-12345678\")))\nassert(1 >= BigInt(\"-12345678\"))\nassert(1 > BigInt(\"-12345678\"))\n\nassert(!(BigInt(\"1\") < 0.5))\nassert(!(BigInt(\"1\") <= 0.5))\nassert(BigInt(\"1\") >= 0.5)\nassert(BigInt(\"1\") > 0.5)\n\nassert(!(-0.5 < BigInt(\"-1\")))\nassert(!(-0.5 <= BigInt(\"-1\")))\nassert(-0.5 >= BigInt(\"-1\"))\nassert(-0.5 > BigInt(\"-1\"))\n\nassert(!(BigInt(\"0x1000000000000000000000000000000\") < 0x100000))\nassert(!(BigInt(\"0x1000000000000000000000000000000\") <= 0x100000))\nassert(BigInt(\"0x1000000000000000000000000000000\") >= 0x100000)\nassert(BigInt(\"0x1000000000000000000000000000000\") > 0x100000)\n\nassert(-0x1000000000000000000000000000000 < BigInt(\"-1234\"))\nassert(-0x1000000000000000000000000000000 <= BigInt(\"-1234\"))\nassert(!(-0x1000000000000000000000000000000 >= BigInt(\"-1234\")))\nassert(!(-0x1000000000000000000000000000000 > BigInt(\"-1234\")))\n\nassert(0x1234567880000000000000000000000 < BigInt(\"0x1234567890000000000000000000000\"))\nassert(0x1234567880000000000000000000000 <= BigInt(\"0x1234567890000000000000000000000\"))\nassert(!(0x1234567880000000000000000000000 > BigInt(\"0x1234567890000000000000000000000\")))\nassert(!(0x1234567880000000000000000000000 >= BigInt(\"0x1234567890000000000000000000000\")))\n\nassert(-BigInt(\"0x1234567890000000000000000000000\") < -0x1234567880000000000000000000000)\nassert(-BigInt(\"0x1234567890000000000000000000000\") <= -0x1234567880000000000000000000000)\nassert(!(-BigInt(\"0x1234567890000000000000000000000\") >= -0x1234567880000000000000000000000))\nassert(!(-BigInt(\"0x1234567890000000000000000000000\") > -0x1234567880000000000000000000000))\n\n// True because of rounding\nassert(0x1234567890000000000000000000001 < BigInt(\"0x1234567890000000000000000000001\"))\nassert(0x1234567890000000000000000000001 <= BigInt(\"0x1234567890000000000000000000001\"))\nassert(!(0x1234567890000000000000000000001 >= BigInt(\"0x1234567890000000000000000000001\")))\nassert(!(0x1234567890000000000000000000001 > BigInt(\"0x1234567890000000000000000000001\")))\n\nassert(-BigInt(\"0x1234567890000000000000000000001\") < -0x1234567890000000000000000000001)\nassert(-BigInt(\"0x1234567890000000000000000000001\") <= -0x1234567890000000000000000000001)\nassert(!(-BigInt(\"0x1234567890000000000000000000001\") >= -0x1234567890000000000000000000001))\nassert(!(-BigInt(\"0x1234567890000000000000000000001\") > -0x1234567890000000000000000000001))\n\nassert(!(1.0000152587890625 < BigInt(\"1\")))\nassert(!(1.0000152587890625 <= BigInt(\"1\")))\nassert(1.0000152587890625 >= BigInt(\"1\"))\nassert(1.0000152587890625 > BigInt(\"1\"))\n\nassert(!(BigInt(\"-1\") < -1.0000152587890625))\nassert(!(BigInt(\"-1\") <= -1.0000152587890625))\nassert(BigInt(\"-1\") >= -1.0000152587890625)\nassert(BigInt(\"-1\") > -1.0000152587890625)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint5.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_syntax_error(code)\n{\n  try {\n    eval(code)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof SyntaxError)\n  }\n}\n\ncheck_syntax_error(\"1N\")\ncheck_syntax_error(\"3.5n\")\ncheck_syntax_error(\"3e10n\")\ncheck_syntax_error(\"3e+10n\")\ncheck_syntax_error(\"0xn\")\ncheck_syntax_error(\"0on\")\ncheck_syntax_error(\"0bn\")\ncheck_syntax_error(\"0777n\")\ncheck_syntax_error(\"00777n\")\ncheck_syntax_error(\"0x1 n\")\n\nassert(0n == 0n)\nassert(0n == -0n)\nassert(12n == 12n)\nassert(123456789012345678901234567890123456789012345678901234567890n == 123456789012345678901234567890123456789012345678901234567890n)\nassert(12n != -12n)\nassert(123456789012345678901234567890123456789012345678901234567890n != -123456789012345678901234567890123456789012345678901234567890n)\n\nassert(0xffn == 255n)\nassert(0o77777n == 0x7fffn)\nassert(255n.toString(16) == \"ff\")\n\nvar o = { 12n : \"data\" }\nassert(o[12] === \"data\")\n\nvar c = class C { static 19n () { return \"BigInt\" } }\nassert(c[19]() === \"BigInt\")\n\nfunction f(p, q) {\n  assert(p + q === 5000n)\n}\nf(-1000n, 6000n)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint6.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Test bitwise 'and' operation\n\nassert((0n & 0n) === 0n)\nassert((0x12345678n & 0n) === 0n)\nassert((0n & 0x12345678n) === 0n)\nassert((0xff00ff00ff00ff00ff00n & 0xff00ff00ff00ff00ffn) === 0n)\nassert((0x12345678ffffffff12345678ffffffffn & 0xffff87654321n) === 0x567887654321n)\nassert((0xf56cd2479efcdn & 0x56cdf23bc02134e3bdc56f43297be4c27n) === 0x6540004384c05n)\nassert((0x45c308bd83cf279n & -0x100000000n) === 0x45c308b00000000n)\nassert((-0x10000000000000000n & 0xffffffffffffffffn) === 0n)\nassert((-0x11234567890abcdefn & 0xffffffffffffffffffffn) === 0xfffeedcba9876f543211n)\nassert((-0x10000000000000n & -0x10000000000000n) === -0x10000000000000n)\nassert((-0x100000000000000001n & -0x1n) === -0x100000000000000001n)\n\n// Test bitwise 'or' operation\n\nassert((0n | 0n) === 0n)\nassert((0x123456789abcdefn | 0n) === 0x123456789abcdefn)\nassert((0n | 0x123456789abcdefn) === 0x123456789abcdefn)\nassert((0xaa00bb00cc00dd00ee00n | 0xff00ee00dd00cc00bbn) === 0xaaffbbeeccddddcceebbn);\nassert((0xfedcba09876543210fedcba09876543210n | 0x7n) === 0xfedcba09876543210fedcba09876543217n)\nassert((0x8n | 0xfedcba09876543210fedcba09876543210n) === 0xfedcba09876543210fedcba09876543218n)\nassert((-0xc34bd5f946c7a92b69b3a96cd7c2a12n | 0xfcbacfbn) === -0xc34bd5f946c7a92b69b3a96c0340201n)\nassert((-0xb314c297ba3n | 0xfeacb00000000n) === -0x1304c297ba3n)\nassert((-0x74b186cd308b377cb23n | -0x5cba7935b213cd657d937c42975de63802a7b92cd49an) === -0x74900280200b124c001n)\nassert((-0x10000000000000000n | -0x100000000000000000000000000000000n) === -0x10000000000000000n)\n\n// Test bitwise 'xor' operation\n\nassert((0n ^ 0n) === 0n)\nassert((0x123456789abcdefn ^ 0n) === 0x123456789abcdefn)\nassert((0n ^ 0x123456789abcdefn) === 0x123456789abcdefn)\nassert((0x74b186cd308b355cb23cd28cd75n ^ 0x74b186cd308b355cb23cd28cd75n) === 0n)\nassert((0xff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ffn ^ 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0fn) === 0xff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0n)\nassert((0x31988644a57e18n ^ 0xb2303b6f2efcb4de7761c01622440f9d985d07dbfe03c9f1n) === 0xb2303b6f2efcb4de7761c01622440f9d986c9f5dbaa6b7e9n)\nassert((-0xd858541b8eb3e6ae247b1f84dbd8cc2db66n ^ 0x0811a0e70710fcf965n) === -0xd858541b8eb3e6ae24fa058aaba9c3e2201n)\nassert((0x38d00faa3f33n ^ -0x89c40cdc4a064dcd8b3663feb322026dn) === -0x89c40cdc4a064dcd8b365b2ebc883d60n)\nassert((-0x66cb3001b88361a25b8715922n ^ -0x66cb3001b88361a25b8715922n) === 0n)\nassert((-0x893bff556397300afe6411d8727c0aaffn ^ -0xef69f24dfcd1447397d62217c6ad2n) === 0x893b103c91daccdbba17860e506bcc02fn)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint7.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Bitwise not\n\nassert(~BigInt(\"0\") === -1n)\nassert(~BigInt(\"-1\") === 0n)\n\nassert(~BigInt(\"0xffffffff\") === -0x100000000n)\nassert(~BigInt(\"0x100000000\") === -0x100000001n)\nassert(~BigInt(\"0x10000ffff\") === -0x100010000n)\nassert(~(-BigInt(\"0xffffffff\")) === 0xfffffffen)\nassert(~(-BigInt(\"0x100000000\")) === 0xffffffffn)\nassert(~(-BigInt(\"0x10000ffff\")) === 0x10000fffen)\n\nassert(~BigInt(\"0xffffffffffffffff\") === -0x10000000000000000n)\nassert(~BigInt(\"0xffffffffffffffffffffffffffffffff\") === -0x100000000000000000000000000000000n)\nassert(~BigInt(\"0x100000000000000000000000000000000\") === -0x100000000000000000000000000000001n)\nassert(~BigInt(\"0x100000000000000ffffffffffffffffff\") === -0x100000000000001000000000000000000n)\nassert(~(-BigInt(\"0xffffffffffffffff\")) === 0xfffffffffffffffen)\nassert(~(-BigInt(\"0xffffffffffffffffffffffffffffffff\")) === 0xfffffffffffffffffffffffffffffffen)\nassert(~(-BigInt(\"0x100000000000000000000000000000000\")) === 0xffffffffffffffffffffffffffffffffn)\nassert(~(-BigInt(\"0xffffffffffffff000000000000000000\")) === 0xfffffffffffffeffffffffffffffffffn)\n\n// Increase\n\nvar a = 0n\nassert(++a === 1n)\nassert(a === 1n)\n\na = -1n\nassert(++a === 0n)\nassert(a === 0n)\n\na = 1n\nassert(++a === 2n)\nassert(a === 2n)\n\na = 0xffffffffn\nassert(++a === 0x100000000n)\nassert(a === 0x100000000n)\n\na = { b:0xffffffffffffffffn }\nassert(++a.b === 0x10000000000000000n)\nassert(a.b === 0x10000000000000000n)\n\na = 0xffffffffffffffffffffffffffffffffn\nassert(a++ === 0xffffffffffffffffffffffffffffffffn)\nassert(a === 0x100000000000000000000000000000000n)\n\na = { b:0x100000000000000ffffffffffffffffffn }\nassert(a.b++ === 0x100000000000000ffffffffffffffffffn)\nassert(a.b === 0x100000000000001000000000000000000n)\n\na = -0x10000000000000001n;\nfor (var i = 0; i < 1; i++, a++) ;\nassert(a === -0x10000000000000000n)\n\na = { b:-0x100000000000001000000000000000000n }\nfor (var i = 0; i < 1; i++, ++a.b) ;\nassert(a.b === -0x100000000000000ffffffffffffffffffn)\n\n// Decrease\n\na = 0n\nassert(--a === -1n)\nassert(a === -1n)\n\na = 1n\nassert(--a === 0n)\nassert(a === 0n)\n\na = -1n\nassert(--a === -2n)\nassert(a === -2n)\n\na = 0x100000000n\nassert(--a === 0xffffffffn)\nassert(a === 0xffffffffn)\n\na = -0xffffffffffffffffn\nassert(a-- === -0xffffffffffffffffn)\nassert(a === -0x10000000000000000n)\n\na = { b:0x10000000000000000n }\nassert(--a.b === 0xffffffffffffffffn)\nassert(a.b === 0xffffffffffffffffn)\n\na = 0x100000000000000000000000000000000n\nassert(a-- === 0x100000000000000000000000000000000n)\nassert(a === 0xffffffffffffffffffffffffffffffffn)\n\na = { b:0x100000000000001000000000000000000n }\nassert(a.b-- === 0x100000000000001000000000000000000n)\nassert(a.b === 0x100000000000000ffffffffffffffffffn)\n\na = 0x10000000000000001n;\nfor (var i = 0; i < 1; i++, a--) ;\nassert(a === 0x10000000000000000n)\n\na = { b:-0x100000000000000ffffffffffffffffffn }\nfor (var i = 0; i < 1; i++, --a.b) ;\nassert(a.b === -0x100000000000001000000000000000000n)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint8.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Exponentiation\n\ntry {\n  12n ** -7n\n  assert(false)\n} catch (e) {\n  assert(e instanceof RangeError)\n}\n\nassert((0n ** 0n) === 1n)\nassert((1n ** 0n) === 1n)\nassert(((-2n) ** 0n) === 1n)\nassert((1000000000000000000000000000000000n ** 0n) === 1n)\nassert(((-1000000000000000000000000000000000n) ** 0n) === 1n)\n\nassert((1n ** 1n) === 1n)\nassert((1n ** 10000000000000000000000000000000n) === 1n)\nassert(((-1n) ** 1n) === -1n)\nassert(((-1n) ** 10000000000000000000000000000000n) === 1n)\nassert(((-1n) ** 10000000000000000000000000000001n) === -1n)\n\nassert((2n ** 10n) === 1024n)\nassert((2n ** 11n) === 2048n)\nassert(((-2n) ** 10n) === 1024n)\nassert(((-2n) ** 11n) === -2048n)\nassert((2n ** 64n) === 0x10000000000000000n)\nassert((2n ** 65n) === 0x20000000000000000n)\nassert(((-2n) ** 64n) === 0x10000000000000000n)\nassert(((-2n) ** 65n) === -0x20000000000000000n)\n\nassert((2n ** 190n) === 0x400000000000000000000000000000000000000000000000n)\nassert((2n ** 191n) === 0x800000000000000000000000000000000000000000000000n)\nassert(((-2n) ** 190n) === 0x400000000000000000000000000000000000000000000000n)\nassert(((-2n) ** 191n) === -0x800000000000000000000000000000000000000000000000n)\n\nassert((103n ** 32n) === 25750827556851106532658069028441289322166445432839581773436522241n)\nassert((103n ** 31n) === 250008034532535014880175427460595041962781023619801764790645847n)\nassert(((-79n) ** 32n) === 5297450670659957549009604563595170759963655420038456036451841n)\nassert(((-79n) ** 31n) === -67056337603290601886197526121457857721058929367575392866479n)\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/bigint9.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nassert(Number(0n) === 0)\nassert(Number(1n) === 1)\nassert(Number(2n) === 2)\nassert(Number(0x100n) === 256)\nassert(Number(-1n) === -1)\nassert(Number(-2n) === -2)\nassert(Number(-0x100n) === -256)\n\nassert(Number(0x1fffffffffffffn) === 0x1fffffffffffff)\nassert(Number(-0x3fffffffffffffn) === -0x40000000000000)\nassert(Number(1000n ** 1000n) === Number.POSITIVE_INFINITY)\nassert(Number((-1000n) ** 1001n) === Number.NEGATIVE_INFINITY)\n\n// Rounding to even\n\nassert(Number(0x80000000000004n) === 0x80000000000000)\nassert(Number(0x80000000000008n) === 0x80000000000008)\nassert(Number(0x8000000000000cn) === 0x80000000000010)\nassert(Number(0x80000000000004n) === 0x80000000000000)\nassert(Number(0x80000000000006n) === 0x80000000000008)\nassert(Number(0x800000000000f400000000000000000000000000000000n) === 0x800000000000f000000000000000000000000000000000)\nassert(Number(0x800000000000f400000000000000000000000000000001n) === 0x800000000000f800000000000000000000000000000000)\n\n// Construct\n\nassert((new Number(0n)).valueOf() === 0)\nassert((new Number(-3256n)).valueOf() == -3256)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/binary-literal.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction checkSyntaxError (str) {\n  try {\n    eval(str);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n\n// Test with invalid literals\ncheckSyntaxError(\"0c\");\ncheckSyntaxError(\"0b\");\ncheckSyntaxError(\"0b0123456\");\ncheckSyntaxError(\"0b2\");\n\ncheckSyntaxError(\"0C\");\ncheckSyntaxError(\"0B\");\ncheckSyntaxError(\"0B2\");\n\ncheckSyntaxError(\"000b01010101\");\ncheckSyntaxError(\"010b01010101\");\ncheckSyntaxError(\"11 0b01010101\");\n\n// Test with valid literals\nassert(0b111 === 7);\nassert(0b111110111 === 503);\nassert(0b111101010101 === 3925);\nassert(0b00000000000001 === 1);\nassert(0b00000000000000 === 0);\nassert(0b1101001 === parseInt (\"1101001\", 2));\n\nassert(0B111 === 7);\nassert(0B111110111 === 503);\nassert(0B111101010101 === 3925);\nassert(0B00000000000001 === 1);\nassert(0B00000000000000 === 0);\nassert(0B1101001 === parseInt (\"1101001\", 2));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/block-var-redecl.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (script)\n{\n  try\n  {\n    eval (script);\n    assert (false);\n  }\n  catch (e)\n  {\n    assert (e instanceof SyntaxError);\n  }\n}\n\neval(\"function f(){}; var f;\");\neval(\"var f; function f(){};\");\n\neval(\"function f(){}; { var f; }\")\neval(\"{ var f; } function f(){};\")\n\neval(\"{ function f(){}; } var f;\")\neval(\"var f; { function f(){}; }\")\n\ncheck_syntax_error (\"{ function f(){}; var f; }\");\ncheck_syntax_error (\"{ var f; function f(){}; }\");\n\neval(\"{ { function f(){}; } var f; }\")\neval(\"{ var f; { function f(){}; } }\")\n\ncheck_syntax_error (\"{ function f(){}; { var f; } }\")\ncheck_syntax_error (\"{ { var f; } function f(){}; }\")\n\neval(\"{ { function f(){}; } { var f; } }\")\neval(\"{ { var f; } { function f(){}; } }\")\n\neval(\"function g(){ function f(){}; var f; }\")\neval(\"function g(){ var f; function f(){}; }\")\n\neval(\"function g(){ function f(){}; { var f; } }\")\neval(\"function g(){ { var f; } function f(){}; }\")\n\neval(\"function g(){ { function f(){}; } var f; }\")\neval(\"function g(){ var f; { function f(){}; } }\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/builtin-objects-accessor-property-configurable.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar test_failed = false;\n\nfunction verifyConfigurableAccessor (obj, name, string) {\n  let prop = Object.getOwnPropertyDescriptor (obj, name);\n  if (prop.get && !prop.configurable) {\n    print (string + \" should be configurable, but wasn't\");\n    test_failed = true;\n  }\n}\n\nfor (let builtin_name of Reflect.ownKeys (this)) {\n  let builtin_obj = this[builtin_name];\n  if (builtin_name[0] === builtin_name[0].toUpperCase () && typeof builtin_obj == \"function\") {\n    for (let prop of Reflect.ownKeys (builtin_obj)) {\n      verifyConfigurableAccessor (builtin_obj, prop, builtin_name + \".\" + prop.toString ());\n    }\n\n    let builtin_proto = builtin_obj.prototype;\n    if (builtin_proto) {\n      for (let prop of Reflect.ownKeys (builtin_proto)) {\n        verifyConfigurableAccessor (builtin_proto, prop, builtin_name + \".prototype.\" + prop.toString ());\n      }\n    }\n\n    builtin_proto = Reflect.getPrototypeOf (builtin_obj);\n    if (builtin_proto !== Function.prototype) {\n      for (let prop of Reflect.ownKeys (builtin_proto.prototype)) {\n        verifyConfigurableAccessor (builtin_proto.prototype, prop, builtin_name + \".[[Prototype]].prototype.\" + prop.toString ());\n      }\n    }\n  }\n}\n\nassert (!test_failed);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/builtin-prototypes.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar prototypes = [\n  Date.prototype,\n  RegExp.prototype,\n  Error.prototype,\n  EvalError.prototype,\n  RangeError.prototype,\n  ReferenceError.prototype,\n  SyntaxError.prototype,\n  TypeError.prototype,\n  URIError.prototype\n]\n\nfor (proto of prototypes) {\n  assert (Object.prototype.toString.call (proto) === '[object Object]');\n}\n\ntry {\n  Date.prototype.valueOf();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  RegExp.prototype.exec(\"\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  RegExp.prototype.compile(\"a\", \"u\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (RegExp.prototype.source === '(?:)');\nassert (RegExp.prototype.global === undefined);\nassert (RegExp.prototype.ignoreCase === undefined);\nassert (RegExp.prototype.multiline === undefined);\nassert (RegExp.prototype.sticky === undefined);\nassert (RegExp.prototype.unicode === undefined);\nassert (RegExp.prototype.dotAll === undefined);\nassert (RegExp.prototype.flags === '');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-fields1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error(code)\n{\n  try {\n    eval(code)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof SyntaxError)\n  }\n}\n\nfunction check_property(obj, name, value)\n{\n  property = Object.getOwnPropertyDescriptor(obj, name)\n  assert(typeof property === \"object\")\n  assert(property.value === value)\n}\n\ncheck_syntax_error(\"class C { get a = 5 }\");\ncheck_syntax_error(\"class C { id1 id2 }\");\ncheck_syntax_error(\"class C { a = 5,6 }\");\ncheck_syntax_error(\"class C { set\\na = 6 }\");\ncheck_syntax_error(\"class C { constructor }\");\ncheck_syntax_error(\"class C { static constructor }\");\ncheck_syntax_error(\"class C { constructor = 1 }\");\ncheck_syntax_error(\"class C { static constructor = 1 }\");\ncheck_syntax_error(\"class C { f = arguments }\");\ncheck_syntax_error(\"class C { static f = a\\\\u0072guments }\");\ncheck_syntax_error(\"class C { f = () => arguments }\");\ncheck_syntax_error(\"class C { f = arguments => 1 }\");\ncheck_syntax_error(\"class C { f = ([arguments]) => 1 }\");\ncheck_syntax_error(\"new class { f = eval('arguments') }\");\ncheck_syntax_error(\"new class { f = eval('arguments => 1') }\");\n\nvar res = 10\nvar counter = 0\n\nfunction f1() {\n  counter++\n  return 5\n}\n\nvar C1 = class {\n  get = \"a\" + f1()\n  static; set; a = () => Math.cos(0)\n  v\\u0061r\n  f\\u006fr = () => this\n  arguments = this\n}\n\nres = new C1\ncheck_property(res, \"get\", \"a5\")\ncheck_property(res, \"static\", undefined)\ncheck_property(res, \"set\", undefined)\nassert(res.a() === 1)\ncheck_property(res, \"var\", undefined)\nassert(res.for() === res)\nassert(res.arguments === res)\n\nclass C2 {\n  constructor(a = this.x, b = this.y) {\n    assert(a === undefined)\n    assert(b === undefined)\n    check_property(this, 'x', 11)\n    check_property(this, 'y', \"ab\")\n  }\n  x = 5 + 6\n  y = \"a\" + 'b'\n}\n\nres = new C2\n\nclass C3 {\n  constructor() {\n    assert(this.x === 1)\n    return { z:\"zz\" }\n  }\n  x = 1\n}\n\nclass C4 extends C3 {\n  constructor() {\n    super()\n    assert(Object.getOwnPropertyDescriptor(this, \"x\") === undefined)\n    check_property(this, \"y\", 2)\n    check_property(this, \"z\", \"zz\")\n  }\n  y = 2\n}\nnew C4\n\nvar o = {}\nclass C5 extends C3 {\n  'pr op' = o\n  3 = true\n}\nres = new C5\nassert(Object.getOwnPropertyDescriptor(res, \"x\") === undefined)\ncheck_property(res, \"pr op\", o)\ncheck_property(res, \"3\", true)\ncheck_property(res, \"z\", \"zz\")\n\nclass C6 {\n  a= () => this\n  b= this\n}\n\nclass C7 extends C6 {\n  c= () => this\n  d= this\n}\n\ncount = 0\nclass C8 extends C7 {\n  constructor() {\n    count++\n    super()\n  }\n\n  e= () => this\n  f= this\n}\n\nvar res = new C8\nassert(res.a() === res)\nassert(res.b === res)\nassert(res.c() === res)\nassert(res.d === res)\nassert(res.e() === res)\nassert(res.f === res)\n\ncount = 0\nclass C9 {\n  a=assert(++count === 5)\n  a=assert(++count === 6)\n  a=assert(++count === 7)\n  a=assert(++count === 8)\n  static a=assert(++count === 1)\n  static a=assert(++count === 2)\n  static a=assert(++count === 3)\n  static a=assert(++count === 4)\n}\n\nassert(count === 4)\nnew C9\nassert(count === 8)\n\ncount = 0\nclass C10 {\n  [(assert(++count == 1), \"aa\")] = assert(++count == 5);\n  [(assert(++count == 2), \"bb\")] = assert(++count == 6);\n  cc = assert(++count == 7);\n  [(assert(++count == 3), \"aa\")] = assert(++count == 8);\n  [(assert(++count == 4), \"bb\")] = assert(++count == 9);\n}\n\nassert(count == 4)\nassert(Reflect.ownKeys(new C10).toString() === \"aa,bb,cc\");\nassert(count == 9)\n\nres = \"p\"\nclass C11 {\n  p1 = assert(Reflect.ownKeys(this).toString() === \"\");\n  [res + 2] = assert(Reflect.ownKeys(this).toString() === \"p1\");\n  [res + 1] = assert(Reflect.ownKeys(this).toString() === \"p1,p2\");\n  p3 = assert(Reflect.ownKeys(this).toString() === \"p1,p2\");\n  [res + 4] = assert(Reflect.ownKeys(this).toString() === \"p1,p2,p3\");\n}\nnew C11\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-fields2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar count = 0\nclass C1 {\n  error = assert(++count === 1)\n  error = function() { throw 40.5 }()\n}\n\ntry {\n  new C1\n  assert(false)\n} catch(e) {\n  assert(e === 40.5)\n  assert(count === 1)\n}\n\ncount = 0\nclass C2 {\n  constructor(a = assert(++count === 1)) {}\n  error = function() { throw \"Err\" }()\n  error = assert(false)\n}\n\ntry {\n  new C2\n  assert(false)\n} catch(e) {\n  assert(e === \"Err\")\n  assert(count === 1)\n}\n\ncount = 0\nvar o = {}\n\nclass C3 extends class {\n  error = function() { throw o }()\n} {\n  constructor() {\n    assert(++count === 1)\n    super()\n    assert(false)\n  }\n}\n\ntry {\n  new C3\n  assert(false)\n} catch (e) {\n  assert(e === o)\n  assert(count === 1)\n}\n\ncount = 0\nclass C4 {\n  constructor() {\n    assert(++count === 2)\n  }\n  a = assert(++count === 1)\n}\n\nclass C5 extends C4 {\n  ok = assert(++count === 3)\n  error = function() { assert(++count === 4); throw \"Except\" }()\n  never = assert(false)\n}\n\ntry {\n  new C5\n  assert(false)\n} catch (e) {\n  assert(e === \"Except\")\n  assert(count === 4)\n}\n\ncount = 0\no = []\nclass C6 {\n  a = assert(++count === 2)\n}\n\nclass C7 extends C6 {\n  constructor() {\n    assert(++count === 1)\n    eval('super()')\n    assert(false)\n  }\n  ok = assert(++count === 3)\n  error = function() { assert(++count === 4); throw o }()\n  never = assert(false)\n}\n\ntry {\n  new C7\n  assert(false)\n} catch (e) {\n  assert(e === o)\n  assert(count === 4)\n}\n\nvar res\nclass C8 {\n  /* Create a non-configurable accessor */\n  a = (res = this, Object.defineProperty(this, \"b\", { get() {} }));\n  b = 6\n}\n\ntry {\n  new C8\n  assert(false)\n} catch(e) {\n  assert(e instanceof TypeError)\n  assert(Reflect.ownKeys(res).toString() === \"b,a\")\n}\n\nclass C9 {\n  [\"p\" + 1]\n  [\"p\" + 2] = (res = this, Object.freeze(this));\n  p3\n}\n\ntry {\n  new C9\n  assert(false)\n} catch(e) {\n  assert(e instanceof TypeError)\n  assert(Reflect.ownKeys(res).toString() === \"p1\")\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-fields3.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_property(obj, name, value)\n{\n  property = Object.getOwnPropertyDescriptor(obj, name)\n  assert(typeof property === \"object\")\n  assert(property.value === value)\n}\n\nvar o = {}\nvar name = \"Pro\"\nvar res = 0\nvar counter = 0\n\nfunction f1() {\n  counter++\n}\n\nclass C1 {\n  static\n    v\\u0061r\n  static Prop =\n    res\n    =\n    \"msg\"\n  static\n    Prop\n    =\n    f1()\n  static [name + \"p\"] = (f1(), o)\n  static 22 = 3 * 4  ;static 23 = 5 + 6\n  static 'a b'\n}\n\ncheck_property(C1, \"var\", undefined)\ncheck_property(C1, \"Prop\", o)\ncheck_property(C1, 22, 12)\ncheck_property(C1, 23, 11)\ncheck_property(C1, \"a b\", undefined)\nassert(res === \"msg\")\nassert(counter === 2)\n\ncounter = 0\nclass C2 {\n  static a = (assert(++counter === 6), \"x\")\n  static [(assert(++counter === 1), \"b\")]\n  static [(assert(++counter === 2), \"f\")]() {}\n  static [(assert(++counter === 3), \"c\")] = (assert(++counter === 7), this);\n  [(assert(++counter === 4), \"a\")]\n  static [(assert(++counter === 5), \"d\")];static e = (assert(++counter === 8), C2)\n}\n\nassert(counter === 8)\ncheck_property(C2, \"a\", \"x\")\ncheck_property(C2, \"b\", undefined)\ncheck_property(C2, \"c\", C2)\ncheck_property(C2, \"d\", undefined)\ncheck_property(C2, \"e\", C2)\n\nres = new C2\ncheck_property(res, \"a\", undefined)\n\nlet C3 = class C4 {\n  static f() {}\n  static xx = C4\n  static yy = this\n}\n\nassert(Reflect.ownKeys(C3).toString() === \"length,prototype,f,name,xx,yy\")\ncheck_property(C3, \"xx\", C3)\ncheck_property(C3, \"yy\", C3)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-fields4.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  {\n    A;\n    class A { }\n  }\n  assert(false)\n} catch (e) {\n  assert(e instanceof ReferenceError)\n}\n\ntry {\n  {\n    class A { [A] () {} }\n  }\n  assert(false)\n} catch (e) {\n  assert(e instanceof ReferenceError)\n}\n\ntry {\n  {\n    var a = class A { [A] () {} }\n  }\n  assert(false)\n} catch (e) {\n  assert(e instanceof ReferenceError)\n}\n\n{\n  class C {\n    a = C\n    static b = C\n  }\n\n  var X = C\n  C = 6\n  var c = new X\n\n  assert(X.b === X)\n  assert(c.a === X)\n}\n\n{\n  let a = 6\n  let b = 7\n  class C {\n    p = a + b\n  }\n  assert((new C).p === 13)\n}\n\ntry {\n  {\n    class C { static a = C = 5  }\n  }\n  assert(false)\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n\ntry {\n  {\n    class C { static [C = 5] = 6 }\n  }\n  assert(false)\n} catch (e) {\n  assert(e instanceof ReferenceError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-fields5.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar count = 0\n\nclass C1 {\n  constructor() {\n    assert(++count === 3)\n  }\n\n  a = (assert(++count === 2), 1.1)\n}\n\nclass C2 extends C1 {\n  constructor() {\n    var s = () => super()\n\n    function g() {\n      assert(++count === 1)\n      eval(\"s()\");\n    }\n\n    g();\n    assert(++count === 5)\n  }\n\n  b = (assert(++count === 4), \"prop\")\n}\n\nvar c = new C2\nassert(count === 5)\nassert(c.a === 1.1)\nassert(c.b === \"prop\")\n\nvar o = {}\ncount = 0\n\nclass C3 extends C1 {\n  constructor() {\n    var s = () => () => eval(\"() => eval('super()')\")\n\n    function g() {\n      assert(++count === 1)\n      s()()()\n    }\n\n    g();\n    assert(++count === 5)\n  }\n\n  b = (assert(++count === 4), o)\n}\n\nc = new C3\nassert(count === 5)\nassert(c.a === 1.1)\nassert(c.b === o)\n\nvar f\nclass C4 extends Array {\n  a = 6.6\n\n  constructor() {\n    f = () => super()\n    super()\n  }\n}\nc = new C4\nassert(c.a === 6.6)\n\ntry {\n  f()\n  assert(false)\n} catch(e) {\n  assert(e instanceof ReferenceError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-get-set-as-method.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nclass A {\n  // Test skipping spaces\n  get     (a, b, c) {\n    return a + b + c;\n  }\n\n  // Test skipping spaces\n  static get(a, b, c) {\n    return a - b - c;\n  }\n\n  set (a, b) {\n    return a * b;\n  }\n\n  static set (a, b) {\n    return a / b;\n  }\n}\n\nassert(A.get(1, 2, 3) === -4);\nassert(A.set(2, 1) === 2);\n\nvar a = new A;\n\nassert(a.get(1, 2, 3) === 6);\nassert(a.set(2, 2) === 4);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-bound.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar g = Array.bind (0, 1, 2, 3)\ng.prototype = Array.prototype;\n\nclass C extends g {}\n\nclass D extends C {\n  constructor () {\n    super (4, 5);\n  }\n}\n\nvar d = new D;\nassert (Object.getPrototypeOf (d) == D.prototype);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-builtin-array.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n function isInstanceofArray (instance) {\n   assert (instance instanceof C);\n   assert (instance instanceof B);\n   assert (instance instanceof A);\n   assert (instance instanceof Array);\n }\n\n class A extends Array {\n   f () {\n     return 5;\n   }\n }\n\n class B extends A {\n   g () {\n     return eval (\"eval ('super.f ()')\");\n   }\n }\n\n class C extends B {\n   h () {\n     return eval ('super.g ()');\n   }\n }\n\n var c = new C (1, 2, 3, 4, 5, 6);\n\n isInstanceofArray (c);\n c.push (7);\n assert (c.length === 7);\n assert (c.f () === 5);\n assert (c.g () === 5);\n assert (c.h () === 5);\n\n // Test built-in Array prototype methods\n var mapped = c.map ((x) => x * 2);\n isInstanceofArray (mapped);\n\n for (var i = 0; i < mapped.length; i++) {\n   assert (mapped[i] == c[i] * 2);\n }\n\n var concated = c.concat (c);\n isInstanceofArray (concated);\n\n for (var i = 0; i < concated.length; i++) {\n   assert (concated[i] == c[i % (concated.length / 2)]);\n }\n\n var sliced = c.slice (c);\n isInstanceofArray (sliced);\n\n for (var i = 0; i < sliced.length; i++) {\n   assert (sliced[i] == c[i]);\n }\n\n var filtered = c.filter ((x) => x > 100);\n isInstanceofArray (sliced);\n assert (filtered.length === 0);\n\n var spliced = c.splice (c.length - 1);\n isInstanceofArray (spliced);\n assert (spliced.length === 1);\n assert (spliced[0] === 7);\n\n c.constructor = 5;\n\n try {\n   mapped = c.map ((x) => x * 2);\n   assert (false);\n } catch (e) {\n   assert (e instanceof TypeError);\n }\n\n try {\n   concated = c.concat (c);\n   assert (false);\n } catch (e) {\n   assert (e instanceof TypeError);\n }\n\n try {\n   sliced = c.slice (c);\n   assert (false);\n } catch (e) {\n   assert (e instanceof TypeError);\n }\n\n try {\n   filtered = c.filter ((x) => x > 100);\n   assert (false);\n } catch (e) {\n   assert (e instanceof TypeError);\n }\n\n try {\n   spliced = c.splice (0);\n   assert (false);\n } catch (e) {\n   assert (e instanceof TypeError);\n }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-builtin-typedarray.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n function isInstanceofTypedArray (instance) {\n   assert (instance instanceof C);\n   assert (instance instanceof B);\n   assert (instance instanceof A);\n   assert (instance instanceof Uint8Array);\n }\n\n class A extends Uint8Array {\n   f () {\n     return 5;\n   }\n }\n\n class B extends A {\n   g () {\n     return super.f ();\n   }\n }\n\n class C extends B {\n   h () {\n     return super.g ();\n   }\n }\n\n var c = new C ([1, 2, 3, 4, 5, 6]);\n\n isInstanceofTypedArray (c);\n assert (c.length === 6);\n assert (c.f () === 5)\n assert (c.g () === 5)\n assert (c.h () === 5)\n\n/* TODO: Enable these tests after Symbol has been implemented\n var mapped = c.map ((x) => x * 2);\n isInstanceofTypedArray (mapped);\n\n for (var i = 0; i < mapped.length; i++) {\n   assert (mapped[i] == c[i] * 2);\n }\n\n var filtered = c.filter ((x) => x > 100);\n isInstanceofTypedArray (filtered);\n assert (filtered.length === 0);\n\n c.constructor = 5;\n\n try {\n   mapped = c.map ((x) => x * 2);\n   assert (false);\n } catch (e) {\n   assert (e instanceof TypeError)\n }\n\n try {\n   filtered = c.filter ((x) => x > 100);\n   assert (false);\n } catch (e) {\n   assert (e instanceof TypeError)\n }\n*/\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass Animal {\n  constructor (name) {\n    this.name = name;\n  }\n\n  hello () {\n    return \"Hello I am \" + this.name;\n  }\n\n  static speak () {\n    return \"Animals roar.\";\n  }\n\n  static explain () {\n    return \"I can walk,\";\n  }\n\n  whoAmI () {\n    return \"I am an Animal.\";\n  }\n\n  breath () {\n    return \"I am breathing.\";\n  }\n\n  get myName () {\n    return this.name;\n  }\n\n  set rename (name) {\n    this.name = name;\n  }\n}\n\nclass Dog extends Animal {\n  constructor (name, barks) {\n    super (name);\n    this.barks = barks;\n  }\n\n  hello () {\n    return super.hello () + \" and I can \" + (this.barks ? \"bark\" : \"not bark\");\n  }\n\n  whoAmI () {\n    return \"I am a Dog.\";\n  }\n\n  static speak () {\n    return \"Dogs bark.\";\n  }\n\n  static explain () {\n    return super.explain () + \" jump,\";\n  }\n\n  bark () {\n    return this.barks ? \"Woof\" : \"----\";\n  }\n}\n\nclass Doge extends Dog {\n  constructor (name, barks, awesomeness) {\n    super (name, barks);\n    this.awesomeness = awesomeness;\n  }\n\n  hello () {\n    return super.hello () + \" and I'm \" + (this.awesomeness > 9000 ? \"super awesome\" : \"awesome\") + \".\";\n  }\n\n  whoAmI ( ) {\n    return \"I am a Doge.\";\n  }\n\n  static speak () {\n    return \"Doges wow.\";\n  }\n\n  static explain () {\n    return super.explain () + \" dance.\";\n  }\n}\n\nvar doge = new Doge (\"doggoe\", true, 10000);\nassert (doge.name === \"doggoe\");\ndoge.rename = \"doggo\";\nassert (doge.myName === \"doggo\");\nassert (doge.barks === true);\nassert (doge.awesomeness === 10000);\nassert (doge.hello () === \"Hello I am doggo and I can bark and I'm super awesome.\");\nassert (doge.whoAmI () === \"I am a Doge.\");\nassert (doge.breath () === \"I am breathing.\");\nassert (doge.bark () === \"Woof\");\nassert (Doge.speak () === \"Doges wow.\");\nassert (Doge.explain () === \"I can walk, jump, dance.\");\nassert (doge instanceof Animal);\nassert (doge instanceof Dog);\nassert (doge instanceof Doge);\nassert (Dog.prototype.constructor === Dog)\nassert (Doge.prototype.constructor === Doge)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-10.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class A extends Array {\n   constructor () {\n     return null;\n   }\n }\n\n class B extends A { }\n\n try {\n   new B;\n   assert (false);\n } catch (e) {\n   assert (e instanceof TypeError);\n }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-11.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class A extends Array {\n   constructor () {\n     assert (false);\n     return null;\n   }\n }\n\n class B extends A {\n   constructor () {\n     return { o : 10 };\n   }\n }\n\n var b = new B;\n assert (b.o === 10);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-12.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class A extends Array {\n   constructor (a, b, c) {\n     eval (\"eval ('super (a, b, c)')\");\n     eval (\"eval ('this.f = 5;')\");\n     assert (this.h ()()() === 5);\n\n     return { o : 4 };\n   }\n\n   g () {\n     return function () {\n       return 5;\n     }\n   }\n }\n\n class B extends A {\n   constructor (a, b, c) {\n     eval (\"eval ('super (a, b, c)')\");\n     assert (this.f === undefined)\n     assert (this.o === 4)\n     this.k = 5;\n     return { o : 7 };\n   }\n\n   h () {\n     return super[\"g\"];\n   }\n }\n\n var b = new B (1, 2, 3, 4);\n assert (b.k === undefined);\n assert (b.o === 7);\n assert (b.h === undefined);\n assert (b.g === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-13.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class C extends Array {\n   constructor (a, b) {\n     var a = eval ('super (arguments);');\n   }\n }\n\n class D extends C {\n   constructor () {\n      var a = eval (\"eval ('super (1, 2);')\");\n      return\n   }\n }\n\n var d = new D;\n assert (JSON.stringify (d) === '[{\"0\":1,\"1\":2}]');\n assert (d + \"\" === \"[object Arguments]\");\n assert (d.length === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-14.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass A {\n  constructor () {\n    this.a = 5;\n  }\n\n  f () {\n    return 10;\n  }\n\n  super () {\n    this.super = 10;\n    return 15;\n  }\n}\n\nclass B extends A {\n  constructor () {\n    super ();\n    assert (super.f === A.prototype.f);\n    super.f = 8;\n    assert (this.f === 8);\n    assert (super.f === A.prototype.f);\n\n    assert (this.a === 5);\n    super.a = 10;\n    assert (this.a === 10);\n\n    assert (super.super () === 15);\n    assert (this.super === 10);\n    super.super = 20;\n    assert (this.super === 20);\n    assert (super.super () === 15);\n  }\n}\n\nvar b = new B;\nassert (b.f === 8);\nassert (b.a === 10);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-15.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class A extends Array {\n   constructor () {\n     super ();\n     return;\n   }\n };\n\n var a = new A;\n assert (a.length === 0);\n assert (a instanceof Array);\n assert (a instanceof A);\n assert (JSON.stringify (a) === \"[]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class C {\n   static a () {\n     return 5;\n   }\n }\n\n class D extends C {\n   constructor () {\n     super ();\n   }\n }\n\n assert (D.a () === 5);\n\n C.a = function () {\n   return 6;\n }\n\n assert (D.a () === 6);\n\n C = 5;\n\n assert (D.a () === 6);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-3.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass A extends Array {\n  constructor (a, b, c) {\n    super (a, b);\n    this.f = 5;\n  }\n}\n\nclass B extends A { }\n\nvar b = new B (1, 2, 3, 4);\nassert (b.f === 5);\nassert (b.length === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-4.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class A extends Array {\n   constructor (a, b, c) {\n     super (a, b);\n     this.f = 5;\n   }\n }\n\n class B extends A {\n   constructor (a, b, c) {\n     super (a, b);\n     this.g = super.f;\n     this.h = this.f;\n   }\n }\n\n var b = new B (1, 2, 3, 4);\n assert (b.g === undefined);\n assert (b.h === 5);\n assert (b.length === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-5.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class A extends Array {\n   constructor (a, b, c) {\n     eval (\"eval ('super (a, b, c)')\");\n     eval (\"eval ('this.f = 5;')\");\n   }\n }\n\n class B extends A { }\n\n var b = new B (1, 2, 3, 4);\n assert (b.f === 5);\n assert (b.length === 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-6.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class A extends Array {\n   constructor (a, b, c, d, e) {\n     eval (\"eval ('super (a, b, c)')\");\n     this.a = 6;\n     return new String (\"foo\");\n   }\n\n   f () {\n     return 5;\n   }\n }\n\n class B extends A {\n   constructor (a, b, c, d) {\n    eval (\"eval ('super (a, b, c, d)')\");\n    assert (super.f () === 5);\n   }\n }\n\n var a = new B (1, 2, 3, 4, 5, 6);\n assert (a.a === undefined);\n assert (a[0] + a[1] + a[2] === \"foo\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-7.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n class C extends Array {\n   constructor () {\n     var a = eval ('super (1, 2); 5');\n     assert (a === 5);\n   }\n }\n\n class D extends C {\n   constructor () {\n      var a = eval (\"eval ('super (1, 2); 3')\");\n      assert (a === 3);\n   }\n }\n\n var d = new D;\n\n assert (JSON.stringify (d) === \"[1,2]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-8.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n var A = Array;\n var order = 0;\n\n function f () {\n   order++;\n\n   return function () {\n     return A;\n   }\n }\n\n var B = class extends f ()() {\n   constructor () {\n     assert (++order === 2);\n     eval (\"eval ('super (1, 2, 3, 4)')\");\n     try {\n       super (1, 2, 3, 4, 5)\n       assert (false);\n     } catch (e) {\n       assert (e instanceof ReferenceError)\n     }\n\n     assert (this.g ()()()() === 10);\n     assert (eval (\"eval ('this.g ()')()\")()() === 10);\n     assert (eval (\"eval ('this.g ()')\")()()() === 10);\n     assert (eval (\"eval ('this.g ()()()')\")() === 10);\n     assert (eval (\"eval ('this.g')\")()()()() === 10);\n     this.push (5);\n     assert (this.length === 5)\n     eval ('this.push (6)');\n     assert (this.length === 6);\n     eval (\"eval ('this.push (7)')\");\n     this.j = 6;\n     return;\n   }\n }\n\n var C = class extends B {\n   g () {\n     return function () {\n       return () => {\n         return 10;\n       }\n     }\n   }\n }\n\n var D = class D extends C {\n    constructor () {\n      super ();\n      this.k = 5;\n      return\n    }\n\n    g () {\n      return eval ('super[\"g\"]');\n    }\n }\n\n assert (order === 1);\n\n var d = new D;\n assert (d.length === 7);\n assert (d.k === 5);\n assert (d.j === 6);\n assert (d instanceof D);\n assert (d instanceof C);\n assert (d instanceof B);\n assert (d instanceof f ()());\n assert (JSON.stringify (d) === \"[1,2,3,4,5,6,7]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-core-9.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n var order = 0;\n\n try {\n   var A = class extends null {\n     constructor () {\n       order++;\n     }\n   }\n\n   new A;\n } catch (e) {\n   assert (order === 1);\n   assert (e instanceof ReferenceError);\n }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-early-semantics.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction must_throw (str) {\n  try {\n    eval (\"switch (1) { default: \" + str + \"}\");\n    assert (false);\n  } catch (e) { }\n\n  try {\n    eval (str);\n    assert (false);\n  }\n  catch (e) { }\n\n  try {\n    eval (\"'use strict'; switch (1) { default: \" + str + \"}\");\n    assert (false);\n  } catch (e) { }\n\n  try {\n    eval (\"'use strict'; \" + str);\n    assert (false);\n  } catch (e) { }\n}\n\nclass A {\n  constructor (a) {\n    this.a = a;\n  }\n\n  f () {\n    return 5;\n  }\n}\n\nmust_throw (\"class B extends 5 + 6 + 5 { constructor (a, b) { super (a) } }\");\n\nmust_throw (\"class B extends null { constructor () { super () } }; new B\");\n\nmust_throw (\"var o = { a : 5 }; \\\n             class B extends Object.keys (o)[0] { constructor (a, b) { super (a) } } \\\n             var b = new B (1, 2);\");\n\nmust_throw (\"class B extends A { constructor (a, b) { this.b = b} } \\\n             var b = new B (1, 2);\");\n\nmust_throw (\"class B extends A { constructor (a, b) { super.f () } } \\\n             var b = new B (1, 2);\");\n\nmust_throw (\"class B extends A { constructor (a, b) { eval ('this.b = b') } } \\\n             var b = new B (1, 2);\");\n\nmust_throw (\"class B extends A { constructor (a, b) { eval ('super.f ()') } } \\\n             var b = new B (1, 2);\");\n\nmust_throw (\"class B extends A { constructor (a, b) { super (a); super (a); } } \\\n             var b = new B (1, 2);\");\n\nmust_throw (\"class B extends A { constructor (a, b) { eval ('super (a)'); eval ('super (a)'); } } \\\n             var b = new B (1, 2);\");\n\nmust_throw (\"class B extends A { constructor (a, b) { super (a) } g () { super (a) } } \\\n             var b = new B (1, 2);\");\n\nmust_throw (\"class B extends A { constructor (a, b) { super (a) } g () { eval ('super (a)') } } \\\n             var b = new B (1, 2); \\\n             b.g ();\");\n\nmust_throw (\"class B extends A { constructor (a, b) { super (a) } g () { return function () { return super.f () } } } \\\n             var b = new B (1, 2); \\\n             b.g ()();\");\n\nmust_throw (\"class B extends A { constructor (a, b) { super (a) } \\\n                                 g () { return function () { return eval ('super.f ()') } } } \\\n             var b = new B (1, 2); \\\n             b.g ()();\");\n\nmust_throw (\"class B extends A { constructor (a, b) { super (a) } \\\n                                 g () { return function () { return eval (\\\"eval ('super.f ();')\\\") } } } \\\n             var b = new B (1, 2); \\\n             b.g ()();\");\n\nmust_throw (\"class A extends Array { constructor () { return 5; } }; new A\");\n\nmust_throw (\"class A extends Array { constructor () { return undefined; } }; new A\");\n\nmust_throw (\"class B extends undefined { }; new B;\");\n\nmust_throw (\"var A = class extends Array { . }\");\n\nmust_throw (\"class Array extends Array { }\");\n\nmust_throw (\"class A extends A { }\");\n\nmust_throw (\"class A extends { constructor () { super () } }\");\n\nmust_throw (\"class A extends a * b {}\");\n\nmust_throw (\"class A extends a = b {}\");\n\nmust_throw (\"class A extends a++ {}\");\n\nmust_throw (\"class A extends -a {}\");\n\nclass B extends A {\n  constructor (a, b) {\n    super (a);\n    assert (super.f () === 5);\n  }\n\n  g () {\n    return () => {\n      return super.f ();\n    }\n  }\n\n  h () {\n    return () => {\n      return () => {\n        return eval ('super.f ()');\n      }\n    }\n  }\n}\n\nvar b = new B (1, 2);\nassert (b.g ()() === 5);\nassert (b.h ()()() === 5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-has-instance.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Create bound implicit class constructor */\nclass myArray extends Array { };\n\nvar array = new myArray (1);\narray.push (2);\nassert (array.length === 2);\nassert (array instanceof myArray);\nassert (array instanceof Array);\nassert (!([] instanceof myArray));\n\n/* Add a new element to the bound function chain */\nclass mySecretArray extends myArray { };\n\nvar secretArray = new mySecretArray (1, 2);\nsecretArray.push (3);\nassert (secretArray.length === 3);\nassert (secretArray instanceof mySecretArray);\nassert (secretArray instanceof myArray);\nassert (secretArray instanceof Array);\nassert (!([] instanceof mySecretArray));\n\n/* Add a new element to the bound function chain */\nclass myEpicSecretArray extends mySecretArray { };\n\nvar epicSecretArray = new myEpicSecretArray (1, 2, 3);\nepicSecretArray.push (4);\nassert (epicSecretArray.length === 4);\nassert (epicSecretArray instanceof myEpicSecretArray);\nassert (epicSecretArray instanceof mySecretArray);\nassert (epicSecretArray instanceof myArray);\nassert (epicSecretArray instanceof Array);\nassert (!([] instanceof myEpicSecretArray));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-inner-class.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// TODO: enable this test when super keyword is supported for normal functions\n/*\nvar console = { assert : assert };\n\nclass C1 {\n  f () {\n    return 5;\n  }\n}\n\nclass C2 extends C1 {\n  f () {\n    assert (super.f () === 5);\n\n    class G {\n      g () {\n        assert (super.f === undefined);\n        assert (super.toString () === \"[object Object]\");\n        var a = super.valueOf ();\n        try {\n          a ();\n          assert (false);\n        } catch (e) {\n          assert (e instanceof TypeError);\n        }\n      }\n\n      constructor () {\n        // Test to overwrite the current lit-object\n        console.assert (Object.getPrototypeOf (this) === G.prototype);\n\n        try {\n          eval (\"super ()\");\n          assert (false);\n        } catch (e) {\n          assert (e instanceof SyntaxError);\n        }\n      }\n    }\n\n    var g = new G ();\n    g.g ();\n  }\n}\n\n(new C2).f ();\n*/\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-mixins-1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar calculatorMixin = Base => class extends Base {\n  f () {\n    return 1;\n  }\n};\n\nvar randomizerMixin = Base => class extends Base {\n  g () {\n    return 2;\n  }\n};\n\nclass A {\n  constructor () { }\n}\n\nclass B extends calculatorMixin (randomizerMixin (A)) {\n\n}\n\nvar b = new B ();\nassert (b.f () === 1)\nassert (b.g () === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-inheritance-mixins-2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n order = 0;\n\n var Mixin1 = (superclass) => class extends superclass {\n   foo () {\n     assert (order++ == 1)\n     if (super.foo) {\n       super.foo ();\n     }\n   }\n };\n\n var Mixin2 = (superclass) => class extends superclass {\n   foo () {\n     assert (order++ == 2)\n     if (super.foo) {\n       assert (super.foo () === 5);\n     }\n   }\n };\n\n class S {\n   foo () {\n     assert (order++ == 3)\n     return 5;\n   }\n }\n\n class C extends Mixin1 (Mixin2 (S)) {\n   foo () {\n     assert (order++ == 0)\n     super.foo ();\n   }\n }\n\n new C ().foo ()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-super-access-direct.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass Base {\n  constructor () {\n    this.parent_value = 100;\n  }\n\n  parent_value () {\n    return this.parent_value;\n  }\n\n  parent_value_arg (a, b, c) {\n    if (c) {\n      return this.parent_value + a + b + c;\n    } else if (b) {\n      return this.parent_value + a + b;\n    } else {\n      return this.parent_value + a;\n    }\n  }\n\n  method () {\n    return {\n      method: function (a, b, c, d, e) { return -50 + a + b + c + d + e; }\n    }\n  }\n}\n\nclass Target extends Base {\n  constructor () {\n    super ();\n    this.parent_value = -10;\n  }\n\n  parent_value () {\n    throw new Error ('(parent_value)');\n  }\n\n  parent_value_direct () {\n    return super.parent_value ();\n  }\n\n  parent_value_direct_arg (a, b, c) {\n    if (c) {\n      return super.parent_value_arg (a, b, c);\n    } else if (b) {\n      return super.parent_value_arg (a, b);\n    } else {\n      return super.parent_value_arg (a);\n    }\n  }\n\n  method () {\n    throw new Error (\"(method)\");\n  }\n\n  parent_method_dot () {\n    return super.method ().method (1, 2, 3, 4, 5)\n  }\n\n  parent_method_index () {\n    return super['method']()['method'](1, 2, 3, 4, 5);\n  }\n}\n\n\nvar obj = new Target ();\n\nassert (obj.parent_value_direct () === -10);\nassert (obj.parent_value_direct_arg (1) === -9);\nassert (obj.parent_value_direct_arg (1, 2) === -7);\nassert (obj.parent_value_direct_arg (1, 2, 3) === -4);\n\ntry {\n  obj.parent_value();\n  assert (false)\n} catch (ex) {\n  /* 'obj.parent_value is a number! */\n  assert (ex instanceof TypeError);\n}\n\nassert (obj.parent_method_dot () === -35);\nassert (obj.parent_method_index () === -35);\n\ntry {\n  obj.method ();\n  assert (false);\n} catch (ex) {\n  assert (ex.message === '(method)');\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-super-access-indirect.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass Base {\n  constructor () {\n    this.parent_value = 100;\n  }\n\n  parent_value () {\n    return this.parent_value;\n  }\n\n  parent_value_arg (a, b, c) {\n    if (c) {\n      return this.parent_value + a + b + c;\n    } else if (b) {\n      return this.parent_value + a + b;\n    } else {\n      return this.parent_value + a;\n    }\n  }\n\n  method () {\n    return {\n      method: function (a, b, c, d, e) { return -50 + a + b + c + d + e; }\n    }\n  }\n}\n\nclass Target extends Base {\n  constructor () {\n    super ();\n    this.parent_value = -10;\n  }\n\n  parent_value () {\n    throw new Error ('(parent_value)');\n  }\n\n  parent_value_indirect () {\n    return super.parent_value.call (this);\n  }\n\n  parent_value_indirect_arg (a, b, c) {\n    if (c) {\n      return super.parent_value_arg.call (this, a, b, c);\n    } else if (b) {\n      return super.parent_value_arg.call (this, a, b);\n    } else {\n      return super.parent_value_arg.call (this, a);\n    }\n  }\n\n  method () {\n    throw new Error (\"(method)\");\n  }\n\n  parent_method_dot () {\n    return super.method.call (this).method (1, 2, 3, 4, 5)\n  }\n\n  parent_method_index() {\n    return super['method'].call (this)['method'] (1, 2, 3, 4, 5);\n  }\n}\n\n\nvar obj = new Target();\n\nassert (obj.parent_value_indirect () === -10);\nassert (obj.parent_value_indirect_arg (1) === -9);\nassert (obj.parent_value_indirect_arg (1, 2) === -7);\nassert (obj.parent_value_indirect_arg (1, 2, 3) === -4);\n\ntry {\n  obj.parent_value ();\n  assert (false);\n} catch (ex) {\n  /* 'obj.parent_value is a number! */\n  assert (ex instanceof TypeError);\n}\n\nassert (obj.parent_method_dot () === -35);\nassert (obj.parent_method_index () === -35);\n\ntry {\n  obj.method();\n  assert (false);\n} catch (ex) {\n  assert (ex.message === '(method)');\n}\n\nvar demo_object = {\n  parent_value: 1000,\n  method: function () {\n    throw new Error ('Very bad!');\n  }\n}\n\nassert (obj.parent_value_indirect_arg.call (demo_object, 1) === 1001);\nassert (obj.parent_value_indirect_arg.call (demo_object, 1, 2) === 1003);\n\nassert (obj.parent_method_dot.call (demo_object) === -35);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class-with.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar called = false\nvar obj = { f() { assert(this === obj); called = true } }\n\nfunction f() {\n  assert(false)\n}\n\nwith (obj) {\n  new class {\n    constructor() {\n      f()\n    }\n  }\n}\n\nassert(called)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/class.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction must_throw(str) {\n  try {\n    eval(\"switch (1) { default: \" + str + \"}\");\n    assert(false);\n  } catch (e) {\n  }\n\n  try {\n    eval(str);\n    assert(false);\n  }\n  catch (e) {\n  }\n\n  must_throw_strict(str);\n}\n\nfunction must_throw_strict(str) {\n  try {\n    eval (\"'use strict'; switch (1) { default: \" + str + \"}\");\n    assert (false);\n  } catch (e) {\n  }\n\n  try {\n    eval(\"'use strict'; \" + str);\n    assert(false);\n  } catch (e) {\n  }\n}\n\nmust_throw(\"class {}\");\nmust_throw(\"class class {}\");\nmust_throw(\"class A { constructor() {} this.a = 5 }\");\nmust_throw(\"class A { constructor() {} constructor() {} }\");\nmust_throw(\"class A { static prototype() {} }\");\nmust_throw(\"class A { static get prototype() {} }\");\nmust_throw(\"class A { static set prototype() {} }\");\nmust_throw(\"class A { static prototyp\\u{0065}() {} }\");\nmust_throw(\"class A { static get prototyp\\u{0065}() {} }\");\nmust_throw(\"class A { static set prototyp\\u{0065}() {} }\");\nmust_throw(\"class A { static 'prototype'() {} }\");\nmust_throw(\"class A { static get 'prototype'() {} }\");\nmust_throw(\"class A { static set 'prototype'() {} }\");\nmust_throw(\"class A { static 'prototyp\\u{0065}'() {} }\");\nmust_throw(\"class A { static get 'prototyp\\u{0065}'() {} }\");\nmust_throw(\"class A { static set 'prototyp\\u{0065}'() {} }\");\nmust_throw(\"class A { get constructor() {} }\");\nmust_throw(\"class A { set constructor() {} }\");\nmust_throw(\"class A {}; A()\");\nmust_throw(\"class X {}; var o = {}; Object.defineProperty(o, 'p', { get: X, set: X }); o.p;\");\nmust_throw(\"var a = new A; class A {};\");\nmust_throw(\"class A { g\\\\u0065t e() {} }\");\nmust_throw('class A { \"static\" e() {} }');\nmust_throw('class A { *constructor() {} }');\n\nassert(eval(\"class A {}\") === undefined);\nassert(eval(\"var a = class A {}\") === undefined);\nassert(eval(\"var a = class {}\") === undefined);\nassert(eval(\"class A { ; ; ; ;;;;;;;;;;;; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;; }\") === undefined);\nassert(eval('class A {\"constructor\"() {} }') === undefined);\nassert(isNaN (eval('switch(1) { default: (class A{} % 1) }')));\n\nclass A1 {\n  [\"constructor\"]() {\n    return 5;\n  }\n}\n\nassert ((new A1).constructor() === 5);\n\nclass A2 {\n  *[\"constructor\"]() {\n    yield 5;\n  }\n}\n\nassert ((new A2).constructor().next().value === 5);\n\nclass B {\n}\n\nvar b = new B;\nassert (typeof B  === \"function\");\nassert (typeof b === \"object\");\nassert (b.constructor === B);\n\nclass C {\n  c1() {\n    return 5;\n  }\n\n  c2() {\n    return this._c;\n  }\n  3() {\n    return 3;\n  }\n\n  super() {\n    return 42;\n  }\n  return() {\n    return 43;\n  }\n\n  static *constructor() {\n    return 44;\n  }\n}\n\nvar c = new C;\nassert (c.c1() === 5);\nassert (c.c2() === undefined);\nassert (c[\"3\"]() === 3);\nassert (c.super() === 42);\nassert (c.return() === 43);\nassert (c.constructor === C);\nassert (C.constructor().next().value === 44);\n\nclass D {\n  constructor(d) {\n    this._d = d;\n  }\n\n  d1() {\n    return this._d;\n  }\n}\nvar d = new D(5);\nassert (d.d1() === 5);\nassert (d.constructor === D);\n\nclass E {\n  constructor(e) {\n    this._e = e;\n  }\n\n  get e() {\n    return this._e;\n  }\n\n  set e(e) {\n    this._e = e;\n  }\n\n  get () {\n    return 11;\n  }\n\n  set () {\n    return 12;\n  }\n}\nvar e = new E (5);\nassert (e.e === 5);\ne.e = 10;\nassert (e.e === 10);\nassert (e.get() === 11);\nassert (e.set() === 12);\nassert (e.constructor === E);\n\nvar F = class ClassF {\n  constructor(f) {\n    this._f = f;\n  }\n\n  static f1() {\n    return this;\n  }\n\n  static f2() {\n    return this._f;\n  }\n\n  static f3(a, b) {\n    return a + b;\n  }\n\n  static constructor(a) {\n    return a;\n  }\n\n  static static(a) {\n    return a;\n  }\n\n  static 2 (a) {\n    return 2 * a;\n  }\n\n  static function(a) {\n    return 3 * a;\n  }\n}\n\nvar f = new F(5);\n\nassert (f.f1 === undefined);\nassert (f.f2 === undefined);\nassert (F.f1() === F);\nassert (F.f2() === undefined);\nassert (F.f3(1, 1) === 2);\nassert (F.constructor(5) === 5);\nassert (F.static(5) === 5);\nassert (F[\"2\"](5) === 10);\nassert (F.function(5) === 15);\nassert (f.constructor === F);\n\nvar G = class {\n  static set a(a) {\n    this._a = a;\n  }\n  static get a() {\n    return this._a;\n  }\n  static set 1(a) {\n    this._a = a;\n  }\n  static get 1() {\n    return this._a;\n  }\n\n  static get() {\n    return 11;\n  }\n\n  static set() {\n    return 12;\n  }\n\n  static set constructor(a) {\n    this._a = a;\n  }\n  static get constructor() {\n    return this._a;\n  }\n\n  static g1() {\n    return 5;\n  }\n\n  static g1() {\n    return 10;\n  }\n}\n\nG.a = 10;\nassert (G.a === 10);\nassert (G.g1() === 10);\nG[\"1\"] = 20;\nassert (G[\"1\"] === 20);\nassert (G.get() == 11);\nassert (G.set() == 12);\nG.constructor = 30;\nassert (G.constructor === 30);\n\nclass H {\n  method() { assert (typeof H === 'function'); return H; }\n}\n\nlet H_original = H;\nvar H_method = H.prototype.method;\nC = undefined;\nassert(C === undefined);\nC = H_method();\nassert(C === H_original);\n\nvar I = class C {\n  method() { assert(typeof C === 'function'); return C; }\n}\n\nlet I_original = I;\nvar I_method = I.prototype.method;\nI = undefined;\nassert(I === undefined);\nI = I_method();\nassert(I == I_original);\n\nvar J_method;\nclass J {\n  static [(J_method = eval('(function() { return J; })'), \"X\")]() {}\n}\nvar J_original = J;\nJ = 6;\nassert (J_method() == J_original);\n\nvar K_method;\nclass K {\n  constructor () {\n    K_method = function() { return K; }\n  }\n}\nvar K_original = K;\nnew K;\nK = 6;\nassert (K_method() == K_original);\n\nvar L_method;\nclass L extends (L_method = function() { return L; }) {\n}\nvar L_original = L;\nL = 6;\nassert (L_method() == L_original);\n\n/* Test cleanup class environment */\ntry {\n  class A {\n    [d]() {}\n  }\n  let d;\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n\ntry {\n  class A extends d {}\n  let d;\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\ntry {\n  var a = 1 + 2 * 3 >> class A extends d {};\n  let d;\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/const1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst a = 6\nassert(!delete a)\nassert(a === 6)\n\ntry {\n  eval(\"a = 7\")\n  assert(false)\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n\nfunction check_type_error(code) {\n  try {\n    eval(code)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof TypeError)\n  }\n}\n\n// Register cases\ncheck_type_error(\"{ const a = 0; a = 1 }\");\ncheck_type_error(\"{ const a = 0; a += 1 }\");\ncheck_type_error(\"{ const a = 0; a -= 1 }\");\ncheck_type_error(\"{ const a = 0; a *= 1 }\");\ncheck_type_error(\"{ const a = 0; a %= 1 }\");\ncheck_type_error(\"{ const a = 0; a /= 1 }\");\ncheck_type_error(\"{ const a = 0; a <<= 1 }\");\ncheck_type_error(\"{ const a = 0; a >>= 1 }\");\ncheck_type_error(\"{ const a = 0; a >>>= 1 }\");\ncheck_type_error(\"{ const a = 0; a &= 1 }\");\ncheck_type_error(\"{ const a = 0; a |= 1 }\");\ncheck_type_error(\"{ const a = 0; a ^= 1 }\");\ncheck_type_error(\"{ const a = 0; a++ }\");\ncheck_type_error(\"{ const a = 0; a-- }\");\ncheck_type_error(\"{ const a = 0; ++a }\");\ncheck_type_error(\"{ const a = 0; --a }\");\ncheck_type_error(\"{ const a = 0; [a] = [1] }\");\ncheck_type_error(\"{ const a = 0; ({a} = { a:1 }) }\");\n\n// Non-register cases\ncheck_type_error(\"{ const a = 0; (function (){ a = 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a += 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a -= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a *= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a %= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a /= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a <<= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a >>= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a >>>= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a &= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a |= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a ^= 1 })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a++ })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ a-- })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ ++a })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ --a })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ [a] = [1] })() }\");\ncheck_type_error(\"{ const a = 0; (function (){ ({a} = { a:1 }) })() }\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/continue.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfor (var i = 0; i < 1000; i++)\n{\n  switch (1)\n  {\n  default:\n    /* This block must not be enclosed in braces. */\n    let j = eval();\n    continue;\n  }\n}\n\nnext:\nfor (var i = 0; i < 1000; i++)\n{\n  for (let j = eval(); true; )\n  {\n    continue next;\n  }\n}\n\nnext:\nfor (var i = 0; i < 1000; i++)\n{\n  for (let j in {a:1})\n  {\n    eval()\n    continue next;\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/dataview.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* ES11 24.3.2.1.1 */\ntry {\n  DataView ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n/* ES11 24.3.2.1.2 (not object) */\ntry {\n  new DataView (5);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n/* ES11 24.3.2.1.2 (no [[ArrayBufferData]] internal slot) */\ntry {\n  new DataView ({});\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar buffer = new ArrayBuffer (16);\n\n/* ES11 24.3.2.1.3 (offset < 0)*/\ntry {\n  new DataView (buffer, -1);\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\n/* ES11 24.3.2.1.3 (offset > 2^53) */\ntry {\n  new DataView (buffer, Number.MAX_SAFE_INTEGER + 1);\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\n/* ES11 24.3.2.1.3 (ToInteger throws ReferenceError) */\ntry {\n  new DataView (buffer, { toString: function () { throw new ReferenceError ('foo') } });\n  assert (false);\n} catch (e) {\n  assert (e instanceof ReferenceError);\n  assert (e.message === 'foo');\n}\n\n\n/* ES11 24.3.2.1.6 */\ntry {\n  new DataView (buffer, 17);\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\n/* ES11 24.3.2.1.8.a */\ntry {\n  new DataView (buffer, 0, { toString: function () { throw new ReferenceError ('bar') } });\n  assert (false);\n} catch (e) {\n  assert (e instanceof ReferenceError);\n  assert (e.message === 'bar');\n}\n\n/* ES11 24.3.2.1.8.a */\ntry {\n  new DataView (buffer, 0, Infinity);\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\n/* ES11 24.3.2.1.8.b */\ntry {\n  new DataView (buffer, 4, 13);\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\n/* Tests accessors: ES11 24.3.4.{1, 2, 3}.2 */\nvar accessorList = ['buffer', 'byteLength', 'byteOffset'];\n\naccessorList.forEach (function (prop) {\n  try {\n    var obj = {};\n    Object.setPrototypeOf (obj, DataView.prototype);\n    obj[prop];\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n});\n\nbuffer = new ArrayBuffer (32);\nvar view1 = new DataView (buffer);\n\nassert (view1.buffer === buffer);\nassert (view1.byteOffset === 0);\nassert (view1.byteLength === buffer.byteLength);\n\nvar view2 = new DataView (buffer, 8);\nassert (view2.buffer === buffer);\nassert (view2.byteOffset === 8);\nassert (view2.byteLength === buffer.byteLength - view2.byteOffset);\n\nvar view3 = new DataView (buffer, 8, 16);\nassert (view3.buffer === buffer);\nassert (view3.byteOffset === 8);\nassert (view3.byteLength === 16);\n\n/* Test get/set routines */\nvar getters = ['getInt8', 'getUint8', 'getInt16', 'getUint16', 'getInt32', 'getUint32', 'getFloat32', 'getFloat64'];\nvar setters = ['setInt8', 'setUint8', 'setInt16', 'setUint16', 'setInt32', 'setUint32', 'setFloat32', 'setFloat64'];\nvar gettersSetters = getters.concat (setters);\n\ngettersSetters.forEach (function (propName) {\n  /* ES11 24.3.1.{1, 2}.1 */\n  var routine = DataView.prototype[propName];\n  try {\n    DataView.prototype[propName].call (5);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  /* ES11 24.3.1.{1, 2}.1 */\n  try {\n    DataView.prototype[propName].call ({});\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  /* ES11 24.3.1.{1, 2}.3 (ToInteger throws ReferenceError) */\n  try {\n    var buffer = new ArrayBuffer (16);\n    var view = new DataView (buffer)\n    view[propName] ({ toString : function () { throw new ReferenceError ('fooBar') } });\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n    assert (e.message == 'fooBar');\n  }\n\n  var buffer = new ArrayBuffer (16);\n  var view = new DataView (buffer)\n\n  /* ES11 24.3.1.{1, 2}.3 (getIndex < 0) */\n  try {\n    view[propName] (-1);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof RangeError);\n  }\n\n  /* ES11 24.3.1.1.10, 24.3.1.2.12 */\n  try {\n    view[propName] (20);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof RangeError);\n  }\n});\n\n/* Test the endianness */\nfunction validateResult (view, offset, isLitteEndian, results) {\n  for (var i = 0; i < getters.length; i++) {\n    assert (results[i] === view[getters[i]](offset, isLitteEndian));\n  }\n}\n\nbuffer = new ArrayBuffer (24);\nview1 = new DataView (buffer);\nview2 = new DataView (buffer, 4, 12);\nview3 = new DataView (buffer, 6, 18);\nview4 = new DataView (buffer);\nview5 = new DataView (buffer);\n\nview1.setUint8 (0, 255);\nvalidateResult(view1, 0, false, [-1, 255, -256, 65280, -16777216, 4278190080, -1.7014118346046924e+38, -5.486124068793689e+303]);\nvalidateResult(view1, 0, true, [-1, 255, 255, 255, 255, 255, 3.5733110840282835e-43, 1.26e-321]);\nvalidateResult(view1, 2, false, [0, 0, 0, 0, 0, 0, 0, 0]);\nvalidateResult(view1, 2, true, [0, 0, 0, 0, 0, 0, 0, 0]);\n\nview1.setInt16 (4, 40000);\nvalidateResult(view1, 4, false, [-100, 156, -25536, 40000, -1673527296, 2621440000, -6.352747104407253e-22, -1.2938158758247024e-172]);\nvalidateResult(view2, 0, false, [-100, 156, -25536, 40000, -1673527296, 2621440000, -6.352747104407253e-22, -1.2938158758247024e-172]);\nvalidateResult(view1, 4, true, [-100, 156, 16540, 16540, 16540, 16540, 2.3177476599932474e-41, 8.172e-320]);\nvalidateResult(view2, 0, true, [-100, 156, 16540, 16540, 16540, 16540, 2.3177476599932474e-41, 8.172e-320]);\n\nview2.setUint32 (2, 3000000000, true);\nvalidateResult(view2, 2, false, [0, 0, 94, 94, 6213810, 6213810, 8.707402410606192e-39, 6.856613170926581e-307]);\nvalidateResult(view3, 0, false, [0, 0, 94, 94, 6213810, 6213810, 8.707402410606192e-39, 6.856613170926581e-307]);\nvalidateResult(view2, 2, true, [0, 0, 24064, 24064, -1294967296, 3000000000, -2.425713319098577e-8, 1.4821969375e-314]);\nvalidateResult(view3, 0, true, [0, 0, 24064, 24064, -1294967296, 3000000000, -2.425713319098577e-8, 1.4821969375e-314]);\n\nview3.setFloat32 (4, 8.5);\nvalidateResult(view3, 4, false, [65, 65, 16648, 16648, 1091043328, 1091043328, 8.5, 196608]);\nvalidateResult(view3, 4, true, [65, 65, 2113, 2113, 2113, 2113, 2.9609436551183385e-42, 1.044e-320]);\nvalidateResult(view2, 4, false, [-48, 208, -12110, 53426, -793624312, 3501342984, -23924850688, -5.411000515087672e+80]);\nvalidateResult(view2, 4, true, [-48, 208, -19760, 45776, 138523344, 138523344, 5.828901796903399e-34, 6.84396254e-316]);\n\nview4.setBigInt64 (0, 2n);\nassert(view4.getBigInt64(0) === 2n);\nview4.setBigInt64 (1, -2n);\nassert(view4.getBigInt64(1) === -2n);\nassert(view4.getBigUint64(1) === 18446744073709551614n);\n\nview5.setBigUint64 (0, 2n);\nassert(view5.getBigUint64(0) === 2n);\nview5.setBigUint64 (1, -2n);\nassert(view5.getBigUint64(1) === 18446744073709551614n);\nassert(view5.getBigInt64(1) === -2n);\n\n/* Second and third arguments can be \"undefined\" and there should be no error. */\nvar arrayBufferOk = new ArrayBuffer (12);\n\nvar dtviewA = new DataView (arrayBufferOk, 0, undefined);\nassert (dtviewA.byteLength === 12);\nassert (dtviewA.byteOffset === 0);\n\nvar dtviewB = new DataView (arrayBufferOk, 1, undefined);\nassert (dtviewB.byteLength === 11);\nassert (dtviewB.byteOffset === 1);\n\nvar dtviewC = new DataView (arrayBufferOk, null, undefined);\nassert (dtviewC.byteLength === 12);\nassert (dtviewC.byteOffset === 0);\n\nvar dtviewD = new DataView (arrayBufferOk, 0, null);\nassert (dtviewD.byteLength === 0);\nassert (dtviewD.byteOffset === 0);\n\nvar dtviewE = new DataView (arrayBufferOk, null, null);\nassert (dtviewE.byteLength === 0);\nassert (dtviewE.byteOffset === 0);\n\nvar dtviewF = new DataView (arrayBufferOk, null, 1);\nassert (dtviewF.byteLength === 1);\nassert (dtviewF.byteOffset === 0);\n\nvar dtviewF = new DataView (arrayBufferOk, undefined, 1);\nassert(dtviewF.byteLength === 1);\nassert(dtviewF.byteOffset === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/date-construct.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar sym = Symbol();\nvar date;\n\ntry {\n  date = new Date(sym, 11, 17, 3, 24, 0);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  date = new Date(1997, sym, 17, 3, 24, 0);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  date = new Date(1997, 11, sym, 3, 24, 0);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  date = new Date(1997, 11, 17, sym, 24, 0);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  date = new Date(1997, 11, 17, 3, sym, 0);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  date = new Date(1997, 11, 17, 3, 24, sym);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  date = new Date(1997, 11, 17, 3, 24, 0, sym);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/date-prototype-toprimitive.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar dateObj = new Date(\"1997-04-10\");\nvar dateNaN = new Date(NaN);\n\n// Test with default hint\nvar result = dateObj[Symbol.toPrimitive](\"default\");\nassert(result.toString().substring(0,15) === \"Thu Apr 10 1997\");\nresult = dateNaN[Symbol.toPrimitive](\"default\");\nassert(dateNaN == \"Invalid Date\");\n\n// Test with number hint\nresult = dateObj[Symbol.toPrimitive](\"number\");\nassert(result.toString() === \"860630400000\");\nresult = dateNaN[Symbol.toPrimitive](\"number\");\nassert(isNaN(result) === true);\n\n// Test with string hint\nresult = dateObj[Symbol.toPrimitive](\"string\");\nassert(result.toString().substring(0,15) === \"Thu Apr 10 1997\");\nresult = dateNaN[Symbol.toPrimitive](\"string\");\nassert(result == \"Invalid Date\");\n\n// Test with invalid hint\ntry {\n  result = dateObj[Symbol.toPrimitive](90);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Test with invalid hint value\ntry {\n  dateObj[Symbol.toPrimitive]('error');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Test when unable to call toPrimitive\ntry {\n  Date.prototype[Symbol.toPrimitive].call(undefined);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/decimal-with-leading-zero.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// valid decimal with leading zero\nassert (01239 === 1239)\nassert (0999 === 999)\nassert (0000000000009 === 9)\n\nfunction invalid_strict_cases (string)\n{\n  \"use strict\"\n  try {\n    eval (string)\n    assert (false)\n  } catch (e) {\n    assert (true)\n  }\n}\n\n// invalid strict test-cases\ninvalid_strict_cases (\"09\")\ninvalid_strict_cases (\"01239\")\n\n// invalid to create bigint with decimal with leading zero\nfunction invalid_cases (string)\n{\n  try {\n    eval (string)\n    assert (false)\n  } catch (e) {\n    assert (true)\n  }\n}\n\ninvalid_cases (\"09n\")\ninvalid_cases (\"01239n\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/directive.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\neval(\"function f(a, b = 4) { }\")\ncheck_syntax_error (\"function f(a, b = 4) { 'use strict' }\")\n\neval('function f(...a) { }')\ncheck_syntax_error ('function f(...a) { \"use strict\" }')\n\neval(\"({ f([a,b]) { } })\")\ncheck_syntax_error (\"({ f([a,b]) { 'use strict' } })\")\n\neval(\"function f(a, b = 4) { 'directive1'\\n'directive2'\\n }\")\ncheck_syntax_error (\"function f(a, b = 4) { 'directive1'\\n'directive2'\\n'use strict' }\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/error-names.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar items = [\n  [TypeError, \"TypeError\"],\n  [SyntaxError, \"SyntaxError\"],\n  [URIError, \"URIError\"],\n  [EvalError, \"EvalError\"],\n  [RangeError, \"RangeError\"],\n  [ReferenceError, \"ReferenceError\"],\n];\n\nfor (var idx = 0; idx < items.length; idx++) {\n  var type = items[idx][0];\n  var expected_name = items[idx][1];\n  assert (type.name === expected_name);\n\n  assert ((new type).name === expected_name);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/error.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Prototype of NativeErrors should be Error */\nassert(Object.getPrototypeOf(EvalError) === Error);\nassert(Object.getPrototypeOf(RangeError) === Error);\nassert(Object.getPrototypeOf(ReferenceError) === Error);\nassert(Object.getPrototypeOf(SyntaxError) === Error);\nassert(Object.getPrototypeOf(TypeError) === Error);\nassert(Object.getPrototypeOf(URIError) === Error);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/exponentiation.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar two = 2\nvar three = 3\n\n// Precedence (right-to-left) tests\nassert(2 ** 3 ** 2 === 512)\nassert((2 ** 3) ** 2 === 64)\nassert(2 ** (3 ** 2) === 512)\nassert(two ** three ** two === 512)\nassert((two ** three) ** two === 64)\nassert(two ** (three ** two) === 512)\n\nassert(2 ** 2 * 3 ** 3 === 4 * 27)\nassert(two ** two * three ** three === 4 * 27)\n\nvar a = 3\nassert((a **= 3) === 27)\nassert(a === 27)\n\na = 2\nassert((a **= a **= 2) === 16)\nassert(a === 16)\n\nfunction assertThrows(src) {\n  try {\n    eval(src)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof SyntaxError)\n  }\n}\n\nassertThrows(\"-2 ** 2\")\nassertThrows(\"+a ** 2\")\nassertThrows(\"!a ** 2\")\nassertThrows(\"~a ** 2\")\nassertThrows(\"void a ** 2\")\nassertThrows(\"typeof a ** 2\")\nassertThrows(\"delete a ** 2\")\nassertThrows(\"!(-a) ** 2\")\n\nassert((-2) ** 2 === 4)\n\na = 3\nassert((-+-a) ** 3 === 27)\n\na = 0\nassert((!a) ** 2 === 1)\n\na = 0\nassert(isNaN((void a) ** 3))\n\na = -4\nassert(++a ** 2 === 9)\nassert(a === -3)\n\na = -2\nassert(a-- ** 2 === 4)\nassert(a === -3)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/for-await-of-iterator-close.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar successCount = 0;\n\n// Test 1\n\nvar asyncIter1 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        assert(++idx === 1)\n        return Promise.resolve({ value: \"Val\", done: false })\n      }\n      /* No return() function */\n    }\n  }\n}\n\nasync function f1() {\n  for await (var v of asyncIter1) {\n    assert(v === \"Val\")\n    break\n  }\n  successCount++\n\nexit:\n  for await (var v of asyncIter1) {\n    for await (var v of asyncIter1) {\n      assert(v === \"Val\")\n      break exit\n    }\n    assert(false)\n  }\n  successCount++\n\n  try {\n    for await (var v of asyncIter1) {\n      assert(v === \"Val\")\n      throw 3.75\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === 3.75)\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter1) {\n      assert(v === \"Val\")\n      return {}\n    }\n    assert(false)\n  } finally {\n    successCount++\n  }\n  assert(false)\n}\n\nf1()\n\n// Test 2\n\nvar o2 = {}\nvar returnCount2 = 0\nvar asyncIter2 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        assert(++idx === 1)\n        return Promise.resolve({ value: o2, done: false })\n      },\n      return(...v) {\n        assert(v.length === 0)\n        returnCount2++\n        return Promise.resolve({})\n      }\n    }\n  }\n}\n\nasync function f2() {\n  for await (var v of asyncIter2) {\n    assert(v === o2)\n    break\n  }\n  successCount++\n\nexit:\n  for await (var v of asyncIter2) {\n    for await (var v of asyncIter2) {\n      assert(v === o2)\n      break exit\n    }\n    assert(false)\n  }\n  successCount++\n\n  try {\n    for await (var v of asyncIter2) {\n      assert(v === o2)\n      throw o2\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === o2)\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter2) {\n      assert(v === o2)\n      return \"Ret\"\n    }\n    assert(false)\n  } finally {\n    successCount++\n  }\n  assert(false)\n  print(\"OK\")\n}\n\nf2()\n\n// Test 3\n\nvar asyncIter3 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        assert(++idx === 1)\n        return Promise.resolve({ value: -4.5, done: false })\n      },\n      return() {\n        throw \"Error\"\n      }\n    }\n  }\n}\n\nasync function *f3() {\n  try {\n    for await (var v of asyncIter3) {\n      assert(v === -4.5)\n      break\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Error\")\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter3) {\n      assert(v === -4.5)\n      return\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Error\")\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter3) {\n      assert(v === -4.5)\n      throw \"Exit\"\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Exit\")\n    successCount++\n  }\n}\n\nf3().next()\n\n// Test 4\n\nvar o4 = {}\nvar asyncIter4 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        assert(++idx === 1)\n        return Promise.resolve({ value: -4.5, done: false })\n      },\n      get return() {\n        throw o4\n      }\n    }\n  }\n}\n\nasync function *f4() {\n  try {\n    for await (var v of asyncIter4) {\n      assert(v === -4.5)\n      break\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === o4)\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter4) {\n      assert(v === -4.5)\n      return\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === o4)\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter4) {\n      assert(v === -4.5)\n      throw 9.25\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === 9.25)\n    successCount++\n  }\n}\n\nf4().next()\n\n// Test 5\n\nvar asyncIter5 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        assert(++idx === 1)\n        return Promise.resolve({ value: -4.5, done: false })\n      },\n      get return() {\n        return \"Not callable\"\n      }\n    }\n  }\n}\n\nasync function f5() {\n  try {\n    for await (var v of asyncIter5) {\n      assert(v === -4.5)\n      break\n    }\n    assert(false)\n  } catch (e) {\n    assert(e instanceof TypeError)\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter5) {\n      assert(v === -4.5)\n      return\n    }\n    assert(false)\n  } catch (e) {\n    assert(e instanceof TypeError)\n    successCount++\n  }\n\n  var o = {}\n  try {\n    for await (var v of asyncIter5) {\n      assert(v === -4.5)\n      throw o\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === o)\n    successCount++\n  }\n}\n\nf5()\n\n// Test 6\n\nvar asyncIter6 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        assert(++idx === 1)\n        return Promise.resolve({ value: -4.5, done: false })\n      },\n      return() {\n        return Promise.resolve(4.5)\n      }\n    }\n  }\n}\n\nasync function f6() {\n  try {\n    for await (var v of asyncIter6) {\n      assert(v === -4.5)\n      break\n    }\n    assert(false)\n  } catch (e) {\n    assert(e instanceof TypeError)\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter6) {\n      assert(v === -4.5)\n      return\n    }\n    assert(false)\n  } catch (e) {\n    assert(e instanceof TypeError)\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter6) {\n      assert(v === -4.5)\n      throw true\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === true)\n    successCount++\n  }\n}\n\nf6()\n\n// Test 7\n\nvar asyncIter7 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        assert(++idx === 1)\n        return Promise.resolve({ value: -4.5, done: false })\n      },\n      return() {\n        return Promise.reject(\"Rejected\")\n      }\n    }\n  }\n}\n\nasync function f7() {\n  try {\n    for await (var v of asyncIter7) {\n      assert(v === -4.5)\n      break\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Rejected\")\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter7) {\n      assert(v === -4.5)\n      return\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Rejected\")\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter7) {\n      assert(v === -4.5)\n      throw true\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === true)\n    successCount++\n  }\n}\n\nf7()\n\n// Test 8\n\nvar asyncIter8 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        assert(++idx === 1)\n        return Promise.resolve({ value: -4.5, done: false })\n      },\n      return() {\n        return {}\n      }\n    }\n  }\n}\n\nasync function f8() {\n  for await (var v of asyncIter8) {\n    assert(v === -4.5)\n    break\n  }\n  successCount++\n\n  try {\n    for await (var v of asyncIter8) {\n      assert(v === -4.5)\n      throw null\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === null)\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter8) {\n      assert(v === -4.5)\n      return\n    }\n    assert(false)\n  } finally {\n    successCount++\n  }\n}\n\nf8()\n\n// Test 9\n\nvar asyncIter9 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        assert(++idx === 1)\n        return Promise.resolve({ value: -4.5, done: false })\n      },\n      return() {\n        throw \"Except\"\n      }\n    }\n  }\n}\n\nasync function f9() {\n  try {\n    for await (var v of asyncIter9) {\n      assert(v === -4.5)\n      break\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Except\")\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter9) {\n      assert(v === -4.5)\n      throw 7.5\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === 7.5)\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter9) {\n      assert(v === -4.5)\n      for await (var v of asyncIter9) {\n        assert(v === -4.5)\n        for await (var v of asyncIter9) {\n          assert(v === -4.5)\n          throw \"Leave\"\n        }\n        assert(false)\n      }\n      assert(false)\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Leave\")\n    successCount++\n  }\n\n  try {\n    for await (var v of asyncIter9) {\n      assert(v === -4.5)\n      return\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Except\")\n    successCount++\n  }\n}\n\nf9()\n\n// Test 10\n\nvar asyncIter10 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        throw \"NoNext\"\n      },\n      return() {\n        assert(false)\n      },\n      throw() {\n        assert(false)\n      }\n    }\n  }\n}\n\nasync function f10() {\n  try {\n    try {\n      for await (var v of asyncIter10) {\n        assert(false)\n      }\n      assert(false)\n    } finally {\n      successCount++\n    }\n  } catch (e) {\n    assert(e === \"NoNext\")\n    successCount++\n  }\n}\n\nf10()\n\n// Test 11\n\nvar asyncIter11 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    return {\n      next() {\n        if (++idx < 3)\n          return Promise.resolve({ value: -4.5, done: false })\n        throw \"NoNext\"\n      },\n      return() {\n        assert(false)\n      },\n      throw() {\n        assert(false)\n      }\n    }\n  }\n}\n\nasync function f11() {\n  try {\n    try {\n      for await (var v of asyncIter11) {\n        assert(v === -4.5)\n      }\n      assert(false)\n    } finally {\n      successCount++\n    }\n  } catch (e) {\n    assert(e === \"NoNext\")\n    successCount++\n  }\n}\n\nf11()\n\n// Test 12\n\nvar o12 = {}\nasync function *gen12()\n{\n  try {\n    yield 9.5\n    assert(false)\n  } finally {\n    successCount++\n  }\n  assert(false)\n}\n\nasync function f12()\n{\n  for await (var v of gen12())\n  {\n    assert(v === 9.5)\n    break;\n  }\n  successCount++\n}\n\nf12()\n\n// END\n\nfunction __checkAsync() {\n  assert(returnCount2 === 5)\n  assert(successCount === 36)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/for-await-of.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\ncheck_syntax_error (\"for await (a of b)\");\ncheck_syntax_error (\"async function f() { for await (a in b) ; }\");\ncheck_syntax_error (\"async function f() { for await ( ; ; ) ; }\");\ncheck_syntax_error (\"async function f() { for await (let a = 0; a < 4; a++) ; }\");\n\nvar successCount = 0;\n\n// Test 1\n\nvar promise1 = Promise.resolve(\"Resolved\");\n\nvar asyncIter1 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n\n    function next() {\n      idx++;\n      if (idx == 1) {\n        return { value:\"Val\", done: false }\n      } else if (idx == 2) {\n        return { value:promise1, done: false }\n      } else if (idx == 3) {\n        return { value:4.5, done: false }\n      }\n      return { value:promise1, done: true }\n    }\n\n    successCount++\n    return { next }\n  }\n}\n\nfunction checkAsyncIter1(v, idx)\n{\n  if (idx === 1) {\n    assert(v === \"Val\")\n  } else if (idx === 2) {\n    assert(v === promise1)\n  } else if (idx === 3) {\n    assert(v === 4.5)\n  } else {\n    assert(false)\n  }\n}\n\nasync function f1a() {\n  var idx = 0;\n  for await (var v of asyncIter1) {\n    checkAsyncIter1(v, ++idx);\n    successCount++;\n  }\n  successCount++;\n}\n\nf1a()\n\nasync function f1b() {\n  await promise1\n\n  var idx = 0;\n  for await (var v of asyncIter1) {\n    checkAsyncIter1(v, ++idx);\n    successCount++;\n  }\n  successCount++;\n}\n\nf1b()\n\nasync function *f1c() {\n  var idx = 0;\n  for await (var v of asyncIter1) {\n    checkAsyncIter1(v, ++idx);\n    successCount++;\n  }\n  successCount++;\n}\n\nf1c().next()\n\nasync function *f1d() {\n  await promise1\n\n  var idx = 0;\n  for await (var v of asyncIter1) {\n    checkAsyncIter1(v, ++idx);\n    successCount++;\n  }\n  successCount++;\n}\n\nf1d().next()\n\n// Test 2\n\nvar state2 = 0\nvar promise2 = Promise.reject(\"Rejected\");\n\nvar asyncIter2 = {\n  [Symbol.asyncIterator]() {\n    var idx = 0;\n    assert(++state2 === 1)\n\n    function next() {\n      idx++;\n      if (idx == 1) {\n        assert(++state2 === 2)\n        return { value:\"Str\", done: false }\n      } else if (idx == 2) {\n        assert(++state2 === 4)\n        return { value:promise2, done: false }\n      } else if (idx == 3) {\n        assert(++state2 === 6)\n        return { value:-3.5, done: false }\n      }\n      assert(++state2 === 8)\n      return { value:promise2, done: true }\n    }\n\n    successCount++\n    return { next }\n  }\n}\n\nfunction checkAsyncIter2(v, idx)\n{\n  if (idx === 1) {\n    assert(v === \"Str\")\n  } else if (idx === 2) {\n    assert(v === promise2)\n  } else if (idx === 3) {\n    assert(v === -3.5)\n  } else {\n    assert(false)\n  }\n}\n\nasync function *f2a() {\n  var idx = 0;\n  for await (var v of asyncIter2) {\n    checkAsyncIter2(v, ++idx)\n    yield v\n  }\n  successCount++;\n}\n\nasync function f2b() {\n  var idx = 0;\n  var g = f2a();\n  var v;\n\n  while (true) {\n    v = await g.next()\n\n    if (v.done) {\n      break;\n    }\n\n    checkAsyncIter2(v.value, ++idx)\n    ++state2\n    assert(state2 === 3 || state2 === 5 || state2 === 7)\n  }\n\n  successCount++;\n}\n\nf2b();\n\n// Test 3\n\nvar o3 = {}\nasync function* gen3()\n{\n  yield o3\n  yield \"Res\"\n}\n\nasync function f3()\n{\n  var idx = 0\n\n  for await (var v of gen3())\n  {\n    idx++\n\n    if (idx === 1)\n    {\n      assert(v === o3)\n    }\n    else\n    {\n      assert(idx === 2)\n      assert(v === \"Res\")\n    }\n  }\n  successCount++\n}\n\nf3()\n\n// END\n\nfunction __checkAsync() {\n  assert(state2 === 8)\n  assert(successCount === 24)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/for-let-reference-error.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nfunction check_reference_error (code)\n{\n  try {\n    eval (code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof ReferenceError)\n  }\n}\n\ncheck_reference_error(\"for (let x of [x]) {}\")\ncheck_reference_error(\"for (const x of [x]) {}\")\n\ncheck_reference_error(\"for (let x in {x}) {}\")\ncheck_reference_error(\"for (const x in {x}) {}\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/for-let.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arr = [];\nfor (let i = 0, j = 0; i < 10; j++)\n{\n  arr[i] = function() { return i + j; }\n  i++;\n}\n\nfor (let i = 0; i < 10; i++)\n  assert(arr[i]() === (i * 2 + 1));\n\nvar j = 0, k = 0;\nfor (let i = 0; j = i, i < 10; i++)\n{\n  let i = -3;\n  assert(i === -3);\n  assert(j === k);\n  k++;\n}\n\nvar j = 0, k = 0;\nfor (let i = 0; eval(\"j = i\"), i < 10; i++)\n{\n  let i = -3;\n  assert(i === -3);\n  assert(j === k);\n  k++;\n}\n\nvar arr = [];\nfor (let i in { x:1, y:1, z:1 })\n{\n  let str = \"P\";\n  arr.push(function () { return str + i; });\n}\n\nassert(arr[0]() === \"Px\");\nassert(arr[1]() === \"Py\");\nassert(arr[2]() === \"Pz\");\n\ntry {\n  for (let i in (function() { return i; })()) {}\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n\ntry {\n  for (let i = 0, j = 0; i < 5; i++, j++)\n  {\n    if (i === 3)\n    {\n      eval(\"throw -42\")\n    }\n  }\n  assert(false);\n} catch (e) {\n  assert(e === -42);\n}\n\nexit: {\n  for (let i = 0, j = 0; i < 5; i++, j++)\n  {\n    if (eval(\"i === 3\")) {\n      assert(i === 3);\n      break exit;\n    }\n  }\n  assert(false);\n}\n\nvar f = null, g = null, h = null;\n\nfor (let i = 0;\n     f = function() { return i }, i < 1;\n     i++, g = function() { return i })\n{\n  h = function() { return i };\n}\nassert(f() === 1);\nassert(g() === 1);\nassert(h() === 0);\n\nvar arr = [];\nfor (const i in { aa:4, bb:5, cc:6 })\n{\n  arr.push(function () { return i });\n}\n\nassert(arr[0]() === \"aa\");\nassert(arr[1]() === \"bb\");\nassert(arr[2]() === \"cc\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/for-of-iterator-close.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction createIterable(arr, methods = {}) {\n  let iterable = function *() {\n    let idx = 0;\n    while (idx < arr.length) {\n      yield arr[idx];\n      idx++;\n    }\n  }();\n  iterable['return'] = methods['return'];\n  iterable['throw'] = methods['throw'];\n\n  return iterable;\n};\n\nfunction close1() {\n  var closed = false;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed = true; return {}; }\n  });\n  for (var it of iter) break;\n  return closed;\n}\n\nassert(close1());\n\nfunction close2() {\n  var closed = false;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed = true; return {}; }\n  });\n  try {\n    for (var it of iter) throw 0;\n    assert(false);\n  } catch(e){\n    assert(e === 0);\n  }\n  return closed;\n}\n\nassert(close2());\n\nfunction close3() {\n  var closed = false;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed = true; return {}; }\n  });\n  for (var it of iter) continue;\n  return closed;\n}\n\nassert(!close3());\n\nfunction close4() {\n  var closed = false;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed = true; throw 6; }\n  });\n  try {\n    for (var it of iter) throw 5;\n    assert(false);\n  } catch(e) {\n    assert(e === 5);\n  }\n  return closed;\n}\n\nassert(close4());\n\nfunction close5() {\n  var closed_called = 0;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed_called++; throw 6; }\n  });\n  try {\n    for (var it of iter) {\n      for (var it of iter) {\n        throw 5;\n      }\n      assert(false);\n    }\n    assert(false);\n  } catch(e) {\n    assert(e === 5);\n  }\n  return closed_called === 2;\n}\n\nassert(close5());\n\nfunction close6() {\n  var closed = false;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed = true; return {}; }\n  });\n  for (var it of iter) {};\n\n  return closed;\n}\n\nassert(!close6());\n\nvar close7_result = false;\nfunction close7() {\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { close7_result = true; throw \"5\"; }\n  });\n\n  for (var it of iter) {\n    return \"foo\";\n  }\n}\n\ntry {\n  close7();\n  assert(false);\n} catch (e) {\n  assert(close7_result);\n  assert(e === \"5\");\n}\n\nfunction close8() {\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { close8_result = true; throw \"5\"; }\n  });\n\n  for (var it of iter) {\n    throw \"foo\";\n  }\n}\n\nvar close8_result = false;\ntry {\n  close8();\n  assert(false);\n} catch (e) {\n  assert(e === \"foo\");\n  assert(close8_result);\n}\n\nfunction close9() {\n  var closed = false;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed = true; throw \"5\"; }\n  });\n\n  try {\n    for (var it of iter) {\n      break;\n    }\n  } finally {\n    assert(closed);\n    throw \"foo\"\n  }\n}\n\ntry {\n  close9();\n  assert(false);\n} catch (e) {\n  assert(e === \"foo\");\n}\n\nfunction close10() {\n  var closed = false;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed = true; return {}; }\n  });\n\n  try {\n    for (var it of iter) {\n      return \"foo\";\n    }\n  } finally {\n    assert(closed);\n    throw \"bar\";\n  }\n}\n\ntry {\n  close10();\n  assert(false);\n} catch (e) {\n  assert(e === \"bar\");\n}\n\nfunction close11() {\n  var closed = false;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed = true; throw \"5\"; }\n  });\n\n  try {\n    for (var it of iter) {\n      return \"foo\";\n    }\n  } finally {\n    assert(closed);\n    throw \"bar\";\n  }\n}\n\ntry {\n  close11();\n  assert(false);\n} catch (e) {\n  assert(e === \"bar\");\n}\n\nfunction close12() {\n  var closed = false;\n  var iter = createIterable([1, 2, 3], {\n    'return': function() { closed = true; throw \"5\"; }\n  });\n\n  try {\n    for (var it of iter) {\n      throw \"foo\";\n    }\n  } finally {\n    assert(closed);\n    throw \"bar\";\n  }\n}\n\ntry {\n  close12();\n  assert(false);\n} catch (e) {\n  assert(e === \"bar\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/for-of.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction parse (txt) {\n  try {\n    eval (txt)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\nfunction checkError (obj) {\n  try {\n    for (var a of obj);\n    assert (false)\n  } catch (e) {\n    assert (e instanceof TypeError)\n  }\n}\n\nvar arr = [1,2,3,4]\n\nvar forOf =\n  \"for var prop of obj\" +\n  \"   obj [prop] += 4\"\nparse (forOf)\n\nvar forOf =\n  \"for [var prop of obj]\" +\n  \"   obj[prop] += 4;\"\nparse (forOf)\n\nvar forOf =\n  \"for (var prop obj)\" +\n  \"   obj[prop] += 4;\"\nparse (forOf)\n\nvar forOf =\n  \"foreach (var prop of obj)\" +\n  \"   obj[prop] += 4;\"\nparse (forOf)\n\nvar forOf =\n  \"for (var a \\\"of\\\" []) {}\"\nparse (forOf)\n\ncheckError(5)\n\nvar obj = {}\nObject.defineProperty(obj, Symbol.iterator, { get : function () { throw TypeError ('foo');}});\ncheckError (obj);\n\nvar obj = {\n  [Symbol.iterator] : 5\n}\n\ncheckError (obj);\n\nvar obj = {\n  [Symbol.iterator] () {\n    return 5\n  }\n}\n\ncheckError(obj);\n\nvar obj = {\n  [Symbol.iterator] () {\n    return {}\n  }\n}\ncheckError(obj);\n\nvar obj = {\n  [Symbol.iterator] () {\n    return {\n      next() {\n        return 5;\n      }\n    }\n  }\n}\ncheckError(obj);\n\nvar array = [0, 1, 2, 3, 4, 5];\n\nvar i = 0;\nfor (var a of array) {\n  assert (a === i++);\n}\n\nvar obj = {\n  [Symbol.iterator]() {\n    return {\n      counter : 0,\n      next () {\n        if (this.counter == 10) {\n          return { done : true, value : undefined };\n        }\n        return { done: false, value: this.counter++ };\n      }\n    }\n  }\n}\n\nvar i = 0;\nfor (var a of obj) {\n  assert (a === i++);\n}\n\nvar status = 0;\ni = 0;\n\nfunction yieldNext() {\n  ++status\n  assert(status === 3 || status === 6 || status === 9)\n  return {\n    get value() {\n      ++status\n      assert(status === 4 || status === 7)\n      return \"Res\"\n    },\n    done: ++i >= 3\n  }\n}\n\nobj = {\n  [Symbol.iterator]() {\n    assert(++status === 1)\n    return {\n      get next() {\n        assert(++status === 2)\n        return yieldNext\n      }\n    }\n  }\n}\n\nfunction getX() {\n  ++status\n  assert(status === 5 || status === 8)\n  return { x:0 }\n}\n\nfor (getX().x of obj)\n  ;\nassert(status == 9)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/for-pattern.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\nvar idx = 0;\nfor (var [a,b] of [[1,2], [3,4]])\n{\n  if (idx == 0)\n  {\n    assert(a === 1);\n    assert(b === 2);\n    idx = 1;\n  }\n  else\n  {\n    assert(a === 3);\n    assert(b === 4);\n  }\n}\n\nassert(a === 3);\nassert(b === 4);\n\nidx = 0;\nfor (let [a,b] of [[5,6], [7,8]])\n{\n  if (idx == 0)\n  {\n    assert(a === 5);\n    assert(b === 6);\n    idx = 1;\n  }\n  else\n  {\n    assert(a === 7);\n    assert(b === 8);\n  }\n}\n\nassert(a === 3);\nassert(b === 4);\n\nidx = 0;\nfor (let [a,b] of [[11,12], [13,14]])\n{\n  if (idx == 0)\n  {\n    eval(\"assert(a === 11)\");\n    eval(\"assert(b === 12)\");\n    idx = 1;\n  }\n  else\n  {\n    eval(\"assert(a === 13)\");\n    eval(\"assert(b === 14)\");\n  }\n}\n\nassert(a === 3);\nassert(b === 4);\n\ncheck_syntax_error(\"for (let [a,b] = [1,2] of [[3,4]]) {}\")\n\nidx = 0;\nfor ([a,b] of [[10,true], [\"x\",null]])\n{\n  if (idx == 0)\n  {\n    assert(a === 10);\n    assert(b === true);\n    idx = 1;\n  }\n  else\n  {\n    assert(a === \"x\");\n    assert(b === null);\n  }\n}\n\nassert(a === \"x\");\nassert(b === null);\n\ncheck_syntax_error(\"for ([a,b] = [1,2] of [[3,4]]) {}\")\n\nvar o = {}\nfor ([a, b] = [o,false]; false; )\n{\n  assert(false);\n}\n\nassert(a === o);\nassert(b === false);\n\nfor ([a, b] + [a, b]; false; )\n{\n  assert(false);\n}\n\ncheck_syntax_error(\"for ([a,b] + 1 of [[3,4]]) {}\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/forin-header-strict.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use strict';\ntry {\n  eval('for (var i = 0 in {}) {}');\n  assert(false);\n} catch(e) {\n  assert(e instanceof SyntaxError);\n}\n\ntry {\n  eval('for (var = i of {}) {}');\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\nvar reached = false;\n\nfor (var i in {}) {\n  reached = true;\n}\nassert(!reached);\n\nfor (var i of []) {\n  reached = true;\n}\nassert(!reached);\n\nfor (let i in {}) {\n  reached = true;\n}\nassert(!reached);\n\nfor (let i of []) {\n  reached = true;\n}\nassert(!reached);\n\nfor (const i in {}) {\n  reached = true;\n}\nassert(!reached);\n\nfor (const i of []) {\n  reached = true;\n}\nassert(!reached);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-accessor.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar g = (Object.getOwnPropertyDescriptor({get a(){}}, 'a')).get;\n\ntry {\n  new g;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar s = (Object.getOwnPropertyDescriptor({set a(value){}}, 'a')).set;\n\ntry {\n  new s;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-arguments-caller.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f_simple () {\n}\n\nfunction f_strict () {\n  \"use strict\";\n}\n\ntry {\n  Function.prototype[\"arguments\"];\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(f_simple[\"arguments\"] === null);\n\ntry {\n  f_strict[\"arguments\"];\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nlet desc = Object.getOwnPropertyDescriptor(f_simple, \"arguments\");\nassert(desc.value === null);\nassert(desc.writable === false);\nassert(desc.enumerable === false);\nassert(desc.configurable === false);\nassert(Object.getOwnPropertyDescriptor(f_strict, \"arguments\") === undefined);\n\ntry {\n  Function.prototype[\"caller\"];\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(f_simple[\"caller\"] === undefined);\n\ntry {\n  f_strict[\"caller\"];\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ndesc = Object.getOwnPropertyDescriptor(f_simple, \"caller\");\nassert(desc.value === undefined);\nassert(desc.writable === false);\nassert(desc.enumerable === false);\nassert(desc.configurable === false);\nassert(Object.getOwnPropertyDescriptor(f_strict, \"arguments\") === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-async-gen1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar successCount = 0\n\nfunction check_fulfilled(p, value, done)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(v.value === value)\n    assert(v.done === done)\n    successCount++\n  }, function() {\n    assert(false)\n  })\n}\n\nfunction check_rejected(p, value)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(false)\n  }, function(v) {\n    assert(v === value)\n    successCount++\n  })\n}\n\n// Test 1\n\nvar gen, r, o\n\nasync function *f1(p, o) {\n  assert((yield \"Test1\") === \"Test2\")\n  await p\n\n  assert((yield 1.5) === 2.5)\n  await \"String\"\n\n  return o\n}\n\nassert(Object.prototype.toString.call(f1) === \"[object AsyncGeneratorFunction]\")\n\no = {}\ngen = f1(new Promise(function(resolve, reject) { r = resolve }), o)\n\nassert(Object.prototype.toString.call(gen) === \"[object AsyncGenerator]\")\n\ncheck_fulfilled(gen.next(), \"Test1\", false)\ncheck_fulfilled(gen.next(\"Test2\"), 1.5, false)\ncheck_fulfilled(gen.next(2.5), o, true)\ncheck_fulfilled(gen.next(), undefined, true)\ncheck_fulfilled(gen.next(), undefined, true)\n\nr(1)\n\n// Test 2\n\nasync function *f2(o) {\n  try {\n    await {}\n    yield o\n    assert(false)\n  } catch (e) {\n    assert(e === \"Throw\")\n  }\n\n  try {\n    await \"String\"\n    yield 12\n    assert(false)\n  } catch (e) {\n    assert(e === o)\n\n    throw o\n  }\n}\n\no = {}\ngen = f2(o)\ncheck_fulfilled(gen.next(), o, false)\ncheck_fulfilled(gen.throw(\"Throw\"), 12, false)\ncheck_rejected(gen.throw(o), o)\n\ncheck_fulfilled(gen.next(), undefined, true)\ncheck_rejected(gen.throw(), undefined)\ncheck_fulfilled(gen.return(), undefined, true)\n\n// Test 3\n\nasync function *f3() {\n  throw \"Msg\"\n}\n\ngen = f3()\ncheck_rejected(gen.next(), \"Msg\")\ngen = f3()\ncheck_rejected(gen.throw(\"End\"), \"End\")\n\n// Test 4\n\nasync function *f4() {\n  assert(++state === 1)\n  await 1\n  assert(++state === 4)\n}\n\nvar state = 0\ngen = f4()\ngen.next()\n\nassert(++state === 2)\ngen.next()\nassert(++state === 3)\n\n// Test 5\n\nasync function *f5() {\n  assert(++state2 === 1)\n  yield 1\n  assert(++state2 === 4)\n}\n\nvar state2 = 0\ngen = f5()\ngen.next()\n\nassert(++state2 === 2)\ngen.next()\nassert(++state2 === 3)\n\n// Test 6\n\nasync function *f6() {\n  return \"Res\"\n}\n\nvar genLate = f6()\nvar p = genLate.next()\n\nassert(p instanceof Promise)\n\np.then(function(v) {\n  assert(v.value === \"Res\")\n  assert(v.done === true)\n  successCount++\n\n  check_fulfilled(genLate.next(), undefined, true)\n  var o = {}\n  check_rejected(genLate.throw(o), o)\n  check_fulfilled(genLate.return(), undefined, true)\n}, function() {\n  assert(false)\n})\n\n// Test 7\n\nvar AsyncGeneratorFun = Object.getPrototypeOf(async function *() {}).constructor;\n\no = {}\ngen = AsyncGeneratorFun(\"p, o, x = 5.5\", \"assert((await p) === 'P'); yield o; return x\")\ngen = gen(new Promise(function(resolve, reject) { r = resolve }), o)\n\ncheck_fulfilled(gen.next(), o, false)\ncheck_fulfilled(gen.next(), 5.5, true)\ncheck_fulfilled(gen.next(), undefined, true)\ncheck_fulfilled(gen.next(), undefined, true)\n\nr(\"P\")\n\n// Test 8\n\nasync function *f8() {\n  var o = {}\n  function f() {}\n\n  check_fulfilled(selfGen.next(), o, false)\n  check_fulfilled(selfGen.next(), f, true)\n  check_fulfilled(selfGen.next(), undefined, true)\n\n  yield \"Str\"\n  yield o\n  return f\n}\n\nvar selfGen = f8();\ncheck_fulfilled(selfGen.next(), \"Str\", false)\n\n// Test 9\n\nasync function *f9() {\n  try {\n    yield \"X\"\n  } finally {\n    successCount++;\n  }\n  yield \"Y\"\n  return 1;\n}\n\ngen = f9()\ncheck_fulfilled(gen.next(), \"X\", false)\ncheck_fulfilled(gen.return(\"Ret\"), \"Ret\", true)\ncheck_fulfilled(gen.next(), undefined, true)\n\n// END\n\nfunction __checkAsync() {\n  assert(successCount === 29)\n  assert(state === 4)\n  assert(state2 === 4)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-async-gen2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar successCount = 0\n\nfunction check_fulfilled(p, value, done)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(v.value === value)\n    assert(v.done === done)\n    successCount++\n  }, function() {\n    assert(false)\n  })\n}\n\nfunction check_rejected(p, value)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(false)\n  }, function(v) {\n    assert(v === value)\n    successCount++\n  })\n}\n\n// Test 1\n\nvar o1 = {}\nvar arr1 = []\nvar async1 = {\n  [Symbol.asyncIterator]() {\n    arr1 = []\n    var i = 0\n    return {\n      next(v) {\n        var res\n\n        if (i == 0) {\n          assert(v === undefined)\n          res = { value:\"Res\", done:false }\n        } else if (i == 1) {\n          assert(v === \"B\")\n          res = { value:{}, done:false }\n        } else if (i == 2) {\n          assert(v === o1)\n          res = Promise.resolve(\"Nested\")\n          res = { value:res, done:false }\n        } else {\n          assert(v === -1.5)\n          res = { value:3.5, done:true }\n        }\n        i++\n\n        arr1.push(res)\n        return Promise.resolve(res)\n      }\n    }\n  }\n}\n\nasync function *f1() {\n  successCount++\n  assert((yield *async1) === 3.5)\n  successCount++\n  return \"End\"\n}\n\nasync function f1_run() {\n  var gen = f1()\n\n  var res = await gen.next(\"A\")\n  assert(res != arr1[0])\n  assert(res.value === \"Res\")\n  assert(arr1[0].value === \"Res\")\n  assert(res.done === false)\n  assert(arr1[0].done === false)\n  successCount++\n\n  var res = await gen.next(\"B\")\n  assert(res != arr1[1])\n  assert(res.value === arr1[1].value)\n  assert(res.done === false)\n  assert(arr1[1].done === false)\n  successCount++\n\n  var res = await gen.next(o1)\n  assert(res != arr1[2])\n  assert(res.value === \"Nested\")\n  assert(arr1[2].value instanceof Promise)\n  assert(res.done === false)\n  assert(arr1[2].done === false)\n  successCount++\n\n  var res = await gen.next(-1.5)\n  assert(res.value === \"End\")\n  assert(res.done === true)\n  successCount++\n}\n\nf1_run()\n\n// Test 2\n\nvar o2 = {}\nvar async2 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next() {\n        throw \"Except\"\n      }\n    }\n  }\n}\n\nasync function *f2() {\n  successCount++\n  try {\n    try {\n      yield *async2\n      assert(false)\n    } finally {\n      successCount++\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Except\")\n    successCount++\n    throw o2\n  }\n  assert(false)\n}\n\nvar gen = f2()\ncheck_rejected(gen.next(), o2)\n\n// Test 3\n\nvar o3 = {}\nvar async3 = {\n  [Symbol.asyncIterator]() {\n    var i = 0\n    return {\n      next() {\n        if (i == 0) {\n          i++\n          return { value:6.25, done:false }\n        }\n        throw o3\n      }\n    }\n  }\n}\n\nasync function *f3() {\n  successCount++\n  try {\n    try {\n      yield *async3\n      assert(false)\n    } finally {\n      successCount++\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === o3)\n    successCount++\n    return o3\n  }\n  assert(false)\n}\n\nvar gen = f3()\ncheck_fulfilled(gen.next(), 6.25, false)\ncheck_fulfilled(gen.next(), o3, true)\n\n// Test 4\n\nvar async4 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next() {\n        /* Returns with a promise which fails. */\n        return { value:Promise.reject(\"Failed!\"), done:false }\n      }\n    }\n  }\n}\n\nasync function *f4() {\n  successCount++\n  try {\n    try {\n      yield *async4\n      assert(false)\n    } finally {\n      successCount++\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === \"Failed!\")\n    successCount++\n    return\n  }\n  assert(false)\n}\n\nvar gen = f4()\ncheck_fulfilled(gen.next(), undefined, true)\n\n// Test 5\n\nvar async5 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next() {\n        /* Returns with a promise which fails. */\n        return { value:Promise.reject(\"FailedAndDone!\"), done:true }\n      }\n    }\n  }\n}\n\nasync function *f5() {\n  successCount++\n  try {\n    var p = yield *async5\n    assert(p instanceof Promise)\n    check_rejected(p, \"FailedAndDone!\")\n    successCount++\n  } catch (e) {\n    assert(false)\n  }\n}\n\nvar gen = f5()\ncheck_fulfilled(gen.next(), undefined, true)\n\n// Test 6\n\nvar state = 0\n\nvar o6 = {}\nvar async6 = {\n  [Symbol.asyncIterator]() {\n    var i = 0\n    assert(++state === 2)\n\n    return {\n      next() {\n        i++\n        if (i == 1) {\n          assert(++state === 3)\n          return { value:5.75, done:false }\n        } else if (i == 2) {\n          assert(++state === 7)\n          return { value:o6, done:false }\n        } else if (i == 3) {\n          assert(++state === 8)\n          return { value:\"Val\", done:true }\n        }\n      }\n    }\n  }\n}\n\nasync function *f6() {\n  assert(++state === 1)\n\n  assert((yield *async6) === \"Val\")\n\n  assert(++state === 9)\n  return \"End\"\n}\n\nvar gen = f6()\ncheck_fulfilled(gen.next(), 5.75, false)\nassert(++state === 4)\ncheck_fulfilled(gen.next(), o6, false)\nassert(++state === 5)\ncheck_fulfilled(gen.next(), \"End\", true)\nassert(++state === 6)\n\n// END\n\nfunction __checkAsync() {\n  assert(successCount === 26)\n  assert(state === 9)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-async-gen3.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar successCount = 0\n\nfunction check_fulfilled(p, value, done)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(v.value === value)\n    assert(v.done === done)\n    successCount++\n  }, function() {\n    assert(false)\n  })\n}\n\nfunction check_rejected(p, value)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(false)\n  }, function(v) {\n    assert(v === value)\n    successCount++\n  })\n}\n\n// Test 1\n\nvar o1 = Promise.reject(\"Err\")\nvar async1 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:0, done:false }\n      },\n      throw(v) {\n        assert(v === \"Except\")\n        /* Failed result result. */\n        throw o1\n      }\n    }\n  }\n}\n\nasync function *f1() {\n  successCount++\n  try {\n    try {\n      yield *async1\n      assert(false)\n    } finally {\n      successCount++\n    }\n    assert(false)\n  } catch (e) {\n    assert(e === o1)\n    successCount++\n    return\n  }\n  assert(false)\n}\n\nvar gen = f1()\ncheck_fulfilled(gen.next(), 0, false)\ncheck_fulfilled(gen.throw(\"Except\"), undefined, true)\n\n// Test 2\n\nvar o2 = Promise.resolve(\"Message\")\nvar async2 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:1, done:false }\n      },\n      throw(v) {\n        assert(v === o2)\n        /* Successful result. */\n        return { value:o2, done:false }\n      }\n    }\n  }\n}\n\nasync function *f2() {\n  successCount++\n  try {\n    yield *async2\n  } finally {\n    /* Never completes. */\n    assert(false)\n  }\n}\n\nvar gen = f2()\ncheck_fulfilled(gen.next(), 1, false)\ncheck_fulfilled(gen.throw(o2), \"Message\", false)\n\n// Test 3\n\nvar o3 = Promise.resolve(\"Message\")\nvar async3 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:2, done:false }\n      },\n      throw(v) {\n        assert(v === -2.5)\n        /* Successful result. */\n        return { value:o3, done:true }\n      }\n    }\n  }\n}\n\nasync function *f3() {\n  successCount++\n  assert((yield *async3) === o3)\n  successCount++\n  return -4.25\n}\n\nvar gen = f3()\ncheck_fulfilled(gen.next(), 2, false)\ncheck_fulfilled(gen.throw(-2.5), -4.25, true)\n\n// Test 4\n\nvar async4 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:3, done:false }\n      }\n    }\n  }\n}\n\nasync function *f4() {\n  successCount++\n  try {\n    yield *async4\n    assert(false)\n  } catch (e) {\n    assert(e instanceof TypeError)\n    successCount++\n  }\n}\n\nvar gen = f4()\ncheck_fulfilled(gen.next(), 3, false)\ncheck_fulfilled(gen.throw(), undefined, true)\n\n// Test 5\n\nvar async5 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:4, done:false }\n      },\n      return(v) {\n        assert(v === undefined)\n        throw \"Close!\"\n      }\n    }\n  }\n}\n\nasync function *f5() {\n  successCount++\n  try {\n    yield *async5\n    assert(false)\n  } catch (e) {\n    assert(e === \"Close!\")\n    successCount++\n  }\n}\n\nvar gen = f5()\ncheck_fulfilled(gen.next(), 4, false)\ncheck_fulfilled(gen.throw(1), undefined, true)\n\n// Test 6\n\nvar o6 = Promise.resolve(\"Return!\")\nvar async6 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:5, done:false }\n      }\n    }\n  }\n}\n\nasync function *f6() {\n  successCount++\n  try {\n    yield *async6\n    assert(false)\n  } finally {\n    successCount++\n  }\n}\n\nvar gen = f6()\ncheck_fulfilled(gen.next(), 5, false)\ncheck_fulfilled(gen.return(o6), \"Return!\", true)\n\n// Test 7\n\nvar arr = []\nvar o7 = Promise.resolve(arr)\nvar async7 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:6, done:false }\n      },\n      return(v) {\n        assert(v === arr)\n        /* Successful result. */\n        return { value:o7, done:false }\n      }\n    }\n  }\n}\n\nasync function *f7() {\n  successCount++\n  try {\n    yield *async7\n  } finally {\n    /* Never completes. */\n    assert(false)\n  }\n}\n\nvar gen = f7()\ncheck_fulfilled(gen.next(), 6, false)\ncheck_fulfilled(gen.return(o7), arr, false)\n\n// Test 8\n\nvar o8 = Promise.resolve(6.75)\nvar async8 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:7, done:false }\n      },\n      return(v) {\n        assert(v === 6.75)\n        /* Successful result. */\n        return { value:o8, done:true }\n      }\n    }\n  }\n}\n\nasync function *f8() {\n  successCount++\n  try {\n    yield *async8\n  } finally {\n    successCount++\n  }\n  /* Return skips this code path. */\n  assert(false)\n}\n\nvar gen = f8()\ncheck_fulfilled(gen.next(), 7, false)\ncheck_fulfilled(gen.return(o8), o8, true)\n\n// Test 9\n\nvar o9 = Promise.reject(\"reject\")\nvar async9 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:8, done:false }\n      },\n      throw(v) {\n        assert(v === \"reject\")\n        throw \"End\"\n      },\n      get return() {\n        assert(false)\n      }\n    }\n  }\n}\n\nasync function *f9() {\n  successCount++\n  try {\n    yield *async9\n  } catch (e) {\n    successCount++\n    assert(e === \"End\")\n    throw e\n  }\n  /* Throw skips this code path. */\n  assert(false)\n}\n\nvar gen = f9()\ncheck_fulfilled(gen.next(), 8, false)\ncheck_rejected(gen.return(o9), \"End\")\n\n// Test 10\n\nvar o10 = Promise.reject(arr)\nvar async10 = {\n  [Symbol.asyncIterator]() {\n    return {\n      next(v) {\n        assert(v === undefined)\n        return { value:9, done:false }\n      },\n      get return() {\n        successCount++\n        return function() {\n          /* Only called during iterator close. */\n          assert(arguments.length === 0)\n          successCount++\n        }\n      }\n    }\n  }\n}\n\nasync function *f10() {\n  successCount++\n  try {\n    yield *async10\n  } catch (e) {\n    successCount++\n    assert(e instanceof TypeError)\n    throw -3.25\n  }\n  assert(false)\n}\n\nvar gen = f10()\ncheck_fulfilled(gen.next(), 9, false)\ncheck_rejected(gen.return(o10), -3.25)\n\n// END\n\nfunction __checkAsync() {\n  assert(successCount == 41)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-async-gen4.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar successCount = 0\n\nfunction check_fulfilled(p, value, done)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(v.value === value)\n    assert(v.done === done)\n    successCount++\n  }, function() {\n    assert(false)\n  })\n}\n\nfunction check_rejected(p, value)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(false)\n  }, function(v) {\n    assert(v === value)\n    successCount++\n  })\n}\n\n// Test 1\n\nvar o1 = {}\nvar state1 = 0\nvar async1 = {\n  [Symbol.asyncIterator]() {\n    return {\n      get next() {\n        assert(++state1 === 2)\n        return function () {\n          return { value:\"Res\", done:false }\n        }\n      },\n      get throw() {\n        ++state1\n        assert(state1 === 5 || state1 === 7 || state1 == 9)\n        return function (v) {\n          assert(v === \"Input\")\n          return { value:o1, done:false }\n        }\n      },\n      get return() {\n        ++state1\n        assert(state1 === 6 || state1 === 8 || state1 == 10)\n        return function (v) {\n          assert(v === o1)\n          return { value:4.5, done:false }\n        }\n      }\n    }\n  }\n}\n\nasync function *f1() {\n  assert(++state1 === 1)\n  yield *async1\n  assert(false)\n}\n\nvar gen = f1()\ncheck_fulfilled(gen.next(), \"Res\", false)\nassert(++state1 === 3)\ncheck_fulfilled(gen.throw(\"Input\"), o1, false)\ncheck_fulfilled(gen.return(o1), 4.5, false)\n\ncheck_fulfilled(gen.next(), \"Res\", false)\ncheck_fulfilled(gen.throw(\"Input\"), o1, false)\ncheck_fulfilled(gen.return(o1), 4.5, false)\n\ncheck_fulfilled(gen.next(), \"Res\", false)\ncheck_fulfilled(gen.throw(\"Input\"), o1, false)\ncheck_fulfilled(gen.return(o1), 4.5, false)\nassert(++state1 === 4)\n\n// Test 2\n\nvar state2 = 0\nvar async2 = {\n  [Symbol.asyncIterator]() {\n    return {\n      get next() {\n        assert(++state2 === 2)\n        return \"Not callable\"\n      }\n    }\n  }\n}\n\nasync function *f2() {\n  assert(++state2 === 1)\n  try {\n    yield *async2\n    assert(false)\n  } catch (e) {\n    assert(e instanceof TypeError)\n  }\n  return \"End\"\n}\n\ngen = f2()\ncheck_fulfilled(gen.next(), \"End\", true)\n\n// END\n\nfunction __checkAsync() {\n  assert(state1 == 10)\n  assert(state2 == 2)\n  assert(successCount == 10)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-async1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* This test checks async modifiers (nothing else). */\n\nfunction check_promise(p, value)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(v === value)\n  })\n}\n\n/* Async functions */\n\nasync function f(a) {\n  return a\n}\n\ncheck_promise(f(1), 1)\n\nf = async function (a) { return a }\ncheck_promise(f(2), 2)\n\nf = (async function (a) { return a })\ncheck_promise(f(3), 3)\n\nf = [async function (a) { return a }]\ncheck_promise(f[0](4), 4)\n\n/* These four are parser tests. */\nasync => {}\nasync async => {}\n(async => {})\n(async async => {})\n\nf = async => async;\nassert(f(5) === 5)\n\nf = async async => async;\ncheck_promise(f(6), 6)\n\nf = (async => async)\nassert(f(7) === 7)\n\nf = (async async => async)\ncheck_promise(f(8), 8)\n\nf = [async => async]\nassert(f[0](9) === 9)\n\nf = [async async => async]\ncheck_promise(f[0](10), 10)\n\nf = async (a, b) => a + b;\ncheck_promise(f(10, 1), 11)\n\nf = (async (a, b) => a + b);\ncheck_promise(f(10, 2), 12)\n\nf = [async (a, b) => a + b];\ncheck_promise(f[0](10, 3), 13)\n\nf = true ? async () => 14 : 0;\ncheck_promise(f(), 14)\n\nf = (1, async async => async)\ncheck_promise(f(15), 15)\n\n/* Functions contain async references */\n\nfunction f1() {\n  var async = 1;\n\n  /* The arrow function after the newline should be ignored. */\n  var v1 = async\n  async => async\n\n  /* The function statement after the newline should not be an async function. */\n  var v2 = async\n  function g() { return 2 }\n\n  async\n  function h() { return 3 }\n\n  assert(v1 === 1)\n  assert(v2 === 1)\n  assert(g() === 2)\n  assert(h() === 3)\n}\nf1();\n\nfunction f2() {\n  var async = 1;\n\n  function g() { async = 2; }\n  g();\n\n  assert(async == 2);\n}\nf2();\n\nfunction f3() {\n  var v = 3;\n  var async = () => v = 4;\n\n  function g() { async(); }\n  g();\n\n  assert(v === 4);\n}\nf3();\n\nfunction f4() {\n  var v = 5;\n  var async = (a, b) => v = a + b;\n\n  function g() { async(((v)), ((v))); }\n  g();\n\n  assert(v === 10);\n}\nf4();\n\nfunction f5() {\n  var v = 0;\n  var async = (a, b) => v = a + b;\n\n  function g() { async((async(1,2)), ((async(3,4)))); }\n  g();\n\n  assert(v === 10);\n}\nf5();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-async2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* This test checks async modifiers (nothing else). */\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\ncheck_syntax_error(\"function async f() {}\")\ncheck_syntax_error(\"(a,b) async => 1\")\n/* SyntaxError because arrow declaration is an assignment expression. */\ncheck_syntax_error(\"async * (a,b) => 1\")\ncheck_syntax_error(\"({ *async f() {} })\")\ncheck_syntax_error(\"class C { async static f() {} }\")\ncheck_syntax_error(\"class C { * async f() {} }\")\ncheck_syntax_error(\"class C { static * async f() {} }\")\n\n\nfunction check_promise(p, value)\n{\n  assert(p instanceof Promise)\n\n  p.then(function(v) {\n    assert(v === value)\n  })\n}\n\nvar o = {\n  async f() { return 1 },\n  async() { return 2 },\n  async *x() {}, /* Parser test, async iterators are needed to work. */\n}\n\ncheck_promise(o.f(), 1)\nassert(o.async() === 2)\n\nclass C {\n  async f() { return 3 }\n  async *x() {} /* Parser test, async iterators are needed to work. */\n  static async f() { return 4 }\n  static async *y() {} /* Parser test, async iterators are needed to work. */\n  async() { return 5 }\n  static async() { return 6 }\n}\n\nvar c = new C\n\ncheck_promise(c.f(), 3)\ncheck_promise(C.f(), 4)\nassert(c.async() === 5)\nassert(C.async() === 6)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-async3.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* This test async prototype. */\n\nvar proto1 = Object.getPrototypeOf(async () => {})\nvar proto2 = Object.getPrototypeOf(async function () {})\n\nassert(proto1 === proto2)\nassert(typeof proto1 === \"object\")\nassert(proto1[Symbol.toStringTag] === \"AsyncFunction\")\nassert(typeof proto1.constructor === \"function\")\nassert(proto1.constructor.name === \"AsyncFunction\")\n\nvar successCount = 0\nvar f = proto1.constructor(\"p\", \"assert(await p === 'Res'); successCount++\")\nf(Promise.resolve(\"Res\"))\n\nfunction __checkAsync() {\n  assert(successCount === 1)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-await1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* This test checks await expressions (nothing else). */\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\ncheck_syntax_error(\"(async function await() {})\")\ncheck_syntax_error(\"(async function *await() {})\")\ncheck_syntax_error(\"async function f(await) {}\")\ncheck_syntax_error(\"(async function f(await) {})\")\ncheck_syntax_error(\"async function f(a = await new Promise) {}\")\ncheck_syntax_error(\"async function f() { function await() {} }\")\ncheck_syntax_error(\"async await => 0\");\ncheck_syntax_error(\"async (await) => 0\");\ncheck_syntax_error(\"async function f() { await () => 0 }\");\ncheck_syntax_error(\"async (a) => a\\\\u0077ait a\");\ncheck_syntax_error(\"async (a) => { () => 0\\na\\\\u0077ait a }\");\n\n// Valid uses of await\n\nasync a => await a\nasync a => { await a }\nasync (a) => await a\nasync(a) => { await a }\n\n// Nested async and non-async functions\n\nasync (a) => {\n  () => await\n  await a\n}\n\n(a) => {\n  await\n  async (a) => await a\n  await\n  async (a) => await a\n  a\\u0077ait\n}\n\nasync function f1(a) {\n  await a\n  (function () { await ? async function(a) { await a } : await })\n  await a\n}\n\nasync (a) => {\n  await a;\n  () => await ? async (a) => await a : await\n  await a\n}\n\nasync (a) => {\n  (a = () => await, [b] = (c))\n  await a\n  (a, b = () => await)\n  await a\n}\n\n// Object initializers\n\nvar o = {\n  async await(a) {\n    await a;\n    () => await\n    await a\n  },\n\n  f(a) {\n    await\n    async (a) => await a\n    await\n    async (a) => await a\n    a\\u0077ait\n  },\n\n  async [\"g\"] () {\n    await a;\n    () => await\n    await a\n  }\n}\n\nasync function f2(a) {\n  var o = {\n    [await a]() { await % await }\n  }\n  await a;\n}\n\nclass C {\n  async await(a) {\n    await a;\n    () => await\n    await a\n  }\n\n  f(a) {\n    await\n    async (a) => await a\n    await\n    async (a) => await a\n    a\\u0077ait\n  }\n\n  async [\"g\"] () {\n    await a;\n    () => await\n    await a\n  }\n}\n\nasync function f3(a) {\n  class C {\n    [await a]() { await % await }\n  }\n  await a;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-await2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar successCount = 0\nvar p, r\n\n// Test 1\n\nasync function f1(p)\n{\n  assert(await p === 1)\n  return 2\n}\n\np = new Promise(function(resolve, reject) { r = resolve })\n\nf1(p).then(function (v) {\n  assert(v === 2)\n  successCount++\n})\n\nr(1)\n\n// Test 2\n\nvar f2 = async(p) =>\n{\n  assert(await p === 3)\n}\n\np = new Promise(function(resolve, reject) { r = resolve })\n\nf2(p).then(function (v) {\n  assert(v === undefined)\n  successCount++\n})\n\nr(3)\n\n// Test 3\n\nvar thenableCounter = 0\n\nasync function f3()\n{\n  return new Promise(function(resolve) { resolve(f3) })\n}\n\nf3.then = function(resolve) {\n  // Repeating resolve with 'then'\n  if (++thenableCounter < 5) {\n    resolve(f3)\n  } else {\n    successCount++\n  }\n}\n\nf3()\n\n// Test 4\n\nasync function f4(p)\n{\n  try {\n    throw 4\n  } catch (e) {\n    throw 5\n  }\n}\n\np = new Promise(function(resolve, reject) { r = resolve })\n\nf4(p).then(undefined, function (v) {\n  assert(v === 5)\n  successCount++\n})\n\nr(1)\n\n// Test 5\n\nasync function f5(p)\n{\n  try {\n    return 6\n  } finally {\n    throw 7\n  }\n}\n\np = new Promise(function(resolve, reject) { r = resolve })\n\nf5(p).then(undefined, function (v) {\n  assert(v === 7)\n  successCount++\n})\n\nr(1)\n\n// Test 6\n\np = new Promise(function(resolve, reject) { r = resolve })\n\nasync function f6(p)\n{\n  await p\n  return self\n}\n\nvar self = f6()\n\nself.then(undefined, function (v) {\n  assert(v instanceof TypeError)\n  successCount++\n})\n\nr(1)\n\n// Test 7\n\nasync function f7(p)\n{\n  var x = {}\n  assert((await x) === x)\n\n  x = 3.14\n  assert((await x) === x)\n\n  x = \"Test string\"\n  assert((await x) === x)\n\n  successCount++\n}\nf7();\n\n// Test 8\n\nasync function f8() {\n  var p = new Promise(function() {});\n  Object.defineProperty(p, 'constructor', { get() { throw \"Error!\" } });\n\n  await p\n}\n\nf8().then(undefined, function (v) {\n  assert(v === \"Error!\")\n  successCount++\n})\n\n// END\n\nfunction __checkAsync() {\n  assert(successCount === 8)\n  assert(thenableCounter === 5)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-await3.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar successCount = 0\n\nasync function f1()\n{\n  throw 1\n}\n\nasync function f2()\n{\n  try {\n    assert(await f1() && false)\n  } catch (e) {\n    assert(e === 1)\n    return 2\n  } finally {\n    return 3\n  }\n}\n\nasync function f3()\n{\n  return await f2() + 1\n}\n\nasync function f4()\n{\n  return await f1()\n}\n\nasync function f5()\n{\n  var o = { a:f2, b:f2, c:f2, d:f2 }\n\n  for (i in o) {\n    var p1 = f3()\n    var p2 = f4()\n\n    assert(await o[i]() === 3)\n    assert(await p1 === 4)\n\n    try {\n      assert(await p2 && false)\n    } catch (e) {\n      assert(e === 1)\n    }\n\n    successCount++\n  }\n}\n\nf5()\n\nfunction __checkAsync() {\n  assert(successCount === 4)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-call.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\nfunction f(...a)\n{\n  return a.length\n}\n\ncheck_syntax_error (\"f(,)\")\ncheck_syntax_error (\"f(,1)\")\ncheck_syntax_error (\"f(1,,)\")\ncheck_syntax_error (\"f(1,,2)\")\n\nassert(f(10) === 1)\nassert(f(10,) === 1)\nassert(f(10,11) === 2)\nassert(f(10,11,) === 2)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-decl.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\ncheck_syntax_error (\"function f(,) {}\")\ncheck_syntax_error (\"function f(...a,) {}\")\ncheck_syntax_error (\"function f(a = 1 + 1,,) {}\")\ncheck_syntax_error (\"function f(a,,b) {}\")\ncheck_syntax_error (\"function f(,a) {}\")\n\nfunction f1(a,) {}\nassert(f1.length === 1)\n\nfunction f2(a = 1,) {}\nassert(f2.length === 0)\n\nfunction f3(a = 1, b = 1 + 1, c,) {}\nassert(f3.length === 0)\n\nvar f4 = async(a,) => {}\nassert(f4.length === 1)\n\nvar f5 = async(a = 1,b,) => {}\nassert(f5.length === 0)\n\nassert(((a, b = 1 + 1, c,) => {}).length === 1)\n\nassert(((a = 1, b, c = 1 + 1,) => {}).length === 0)\n\nfunction f6([a=1, b], [c, [d = 5] = []], e, [{f} = {}, g],) {}\nassert(f6.length === 4)\n\nfunction f7([a, {b = 1, 4 : c = 2} = {}], {'cc' : d = 5, e}, f, {g, h} = a = {},) {}\nassert(f7.length === 3)\n\nfunction f8(a, [b] = [], ...e) {}\nassert(f8.length === 1)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-if.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\ncheck_syntax_error (\"'use strict'; if (true) function f() {}\")\ncheck_syntax_error (\"'use strict'; if (true) ; else function f() {}\")\ncheck_syntax_error (\"'use strict'; a: function f() {}\")\ncheck_syntax_error (\"if (true) async function f() {}\")\ncheck_syntax_error (\"if (true) ; else async function f() {}\")\ncheck_syntax_error (\"if (true) a: function f() {}\")\ncheck_syntax_error (\"if (true) ; else a: function f() {}\")\n\nvar g = 1\nvar h = 1\n\nfunction f1(p)\n{\n  assert(g === undefined)\n  assert(h === undefined)\n\n  if (p)\n    // Same as: { function g() { return 3 } }\n    function g() { return 3 }\n  else\n    // Same as: { function h() { return 4 } }\n    function h() { return 4 }\n\n  if (p) {\n    assert(g() === 3)\n    assert(h === undefined)\n  } else {\n    assert(g === undefined)\n    assert(h() === 4)\n  }\n}\n\nf1(true)\nf1(false)\n\nfunction f2()\n{\n  assert(g() === 2)\n  a: b: c: d: function g() { return 2 }\n\n  assert(h === undefined)\n\n  {\n    assert(h() === 3)\n    a: b: c: d: function h() { return 3 }\n  }\n\n  assert(h() === 3)\n\n  try {\n    assert(h() === 4)\n    a: b: c: d: function h() { return 4 }\n    throw 1\n  } catch (e) {\n    assert(h() === 5)\n    a: b: c: d: function h() { return 5 }\n  } finally {\n    assert(h() === 6)\n    a: b: c: d: function h() { return 6 }\n  }\n\n  assert(h() === 6)\n\n  switch (1) {\n  default:\n    assert(h() === 7)\n    a: b: c: d: function h() { return 7 }\n  }\n\n  assert(h() === 7)\n}\nf2()\n\nfunction f3()\n{\n  assert(h === undefined)\n\n  {\n    let a = eval(\"1\")\n    assert(a === 1)\n    assert(h() === 1)\n    a: b: c: d: function h() { return 1 }\n  }\n\n  assert(h() === 1)\n\n  {\n    eval(\"a: b: c: d: function h() { return 2 }\")\n    assert(h() === 2)\n  }\n\n  assert(h() === 2)\n}\nf3()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-name.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction assertNameExists(func) {\n  assert(func.hasOwnProperty('name') === true);\n}\nfunction assertNameNotExists(func) {\n  assert(func.hasOwnProperty('name') === false);\n  assert(Function.prototype.name === '');\n  assert(func.name === '');\n}\n\nfunction assertConfigurableOnlyMethod(func) {\n  let desc = Object.getOwnPropertyDescriptor(func, 'name');\n  assert(desc.configurable === true);\n  assert(desc.writable === false);\n  assert(desc.enumerable === false);\n\n  delete func.name;\n  assertNameNotExists(func);\n\n  Object.defineProperty(func, 'name', {value: 'newName', configurable: true});\n  assert (Object.getOwnPropertyDescriptor(func, 'name').value === 'newName');\n  assertNameExists(func);\n\n  delete func.name;\n  assertNameNotExists(func);\n  Object.defineProperty(func, 'name', desc);\n}\n\nfunction assertConfigurableOnlyAccessor(func, name, method) {\n  let accessor = Object.getOwnPropertyDescriptor(func, name)[method];\n  assertConfigurableOnlyMethod(accessor);\n}\n\nfunction assertMethodName(func, name, functionName = name) {\n  assertNameExists(func);\n  assertConfigurableOnlyMethod(func)\n  assert(Object.getOwnPropertyDescriptor(func, 'name').value === functionName)\n}\n\nfunction assertGetterName(obj, name, functionName = name) {\n  assertConfigurableOnlyAccessor(obj, name, 'get');\n  assert(Object.getOwnPropertyDescriptor(obj, name).get['name'] === 'get ' + functionName)\n}\n\nfunction assertSetterName(obj, name, functionName = name) {\n  assertConfigurableOnlyAccessor(obj, name, 'set');\n  assert(Object.getOwnPropertyDescriptor(obj, name).set['name'] === 'set ' + functionName)\n}\n\nvar func1 = function () {};\nassertMethodName(func1, 'func1');\n\nvar func2 = function bar() {};\nassertMethodName(func2, 'bar');\n\nvar func3 = (function () {}).prototype.constructor;\nassert(typeof func3 === 'function');\nassertMethodName(func3, '');\n\nvar func4;\nfunc4 = function () {}\nassertMethodName(func4, 'func4');\n\nvar func5;\nfunc5 = function bar () {}\nassertMethodName(func5, 'bar');\n\nvar func6;\n(func6) = function () {}\nassertMethodName(func6, '');\n\nvar func7;\n(func7) = function bar () {}\nassertMethodName(func7, 'bar');\n\nlet emptySymbolMethod = Symbol();\nlet namedSymbolMethod = Symbol('foo');\nlet emptySymbolGetter = Symbol();\nlet namedSymbolGetter = Symbol('foo');\nlet emptySymbolSetter = Symbol();\nlet namedSymbolSetter = Symbol('foo');\n\nvar o = {\n  func1() {},\n  func2: function () {},\n  func3: function bar() {},\n  func4: () => {},\n  func5: class {},\n  func6: class A {},\n  func7: class name { static name () {} },\n  ['func' + '8']() {},\n  ['func' + '9']: function () {},\n  ['func' + '10']: function bar() {},\n  ['func' + '11']: () => {},\n  ['func' + '12']: class {},\n  ['func' + '13']: class A {},\n  ['func' + '14']: class name { static name () {} },\n  get func15() {},\n  get ['func' + '16']() {},\n  set func17(a) {},\n  set ['func' + '18'](a) {},\n  [emptySymbolMethod]() {},\n  [namedSymbolMethod]() {},\n  get [emptySymbolGetter]() {},\n  get [namedSymbolGetter]() {},\n  set [emptySymbolSetter](a) {},\n  set [namedSymbolSetter](a) {},\n}\n\nassertMethodName(o.func1, 'func1');\nassertMethodName(o.func2, 'func2');\nassertMethodName(o.func3, 'bar');\nassertMethodName(o.func4, 'func4');\nassertMethodName(o.func5, 'func5');\nassertMethodName(o.func6, 'A');\nassert(typeof o.func7 === 'function');\n\nassertMethodName(o.func8, 'func8');\nassertMethodName(o.func9, 'func9');\nassertMethodName(o.func10, 'bar');\nassertMethodName(o.func11, 'func11');\nassertMethodName(o.func12, 'func12');\nassertMethodName(o.func13, 'A');\nassert(typeof o.func14 === 'function');\n\nassertGetterName(o, 'func15');\nassertGetterName(o, 'func16');\nassertSetterName(o, 'func17');\nassertSetterName(o, 'func17');\n\nassertMethodName(o[emptySymbolMethod], '');\nassertMethodName(o[namedSymbolMethod], '[foo]');\nassertGetterName(o, emptySymbolGetter, '');\nassertGetterName(o, namedSymbolGetter, '[foo]');\nassertSetterName(o, emptySymbolSetter, '');\nassertSetterName(o, namedSymbolSetter, '[foo]');\n\nclass A  {\n  constructor () {}\n  func1() {}\n  get func2() {}\n  set func3(a) {}\n\n  static func4() {}\n  static get func5() {}\n  static set func6(a) {}\n\n  ['func' + '7']() {}\n  get ['func' + '8']() {}\n  set ['func' + '9'](a) {}\n\n  static ['func' + '10']() {}\n  static get ['func' + '11']() {}\n  static set ['func' + '12'](a) {}\n\n  [emptySymbolMethod]() {}\n  [namedSymbolMethod]() {}\n  get [emptySymbolGetter]() {}\n  get [namedSymbolGetter]() {}\n  set [emptySymbolSetter](a) {}\n  set [namedSymbolSetter](a) {}\n\n  static [emptySymbolMethod]() {}\n  static [namedSymbolMethod]() {}\n  static get [emptySymbolGetter]() {}\n  static get [namedSymbolGetter]() {}\n  static set [emptySymbolSetter](a) {}\n  static set [namedSymbolSetter](a) {}\n}\n\nassertMethodName(A.prototype.func1, 'func1');\nassertGetterName(A.prototype, 'func2');\nassertSetterName(A.prototype, 'func3');\n\nassertMethodName(A.func4, 'func4');\nassertGetterName(A, 'func5');\nassertSetterName(A, 'func6');\n\nassertMethodName(A.prototype.func7, 'func7');\nassertGetterName(A.prototype, 'func8');\nassertSetterName(A.prototype, 'func9');\n\nassertMethodName(A.func10, 'func10');\nassertGetterName(A, 'func11');\nassertSetterName(A, 'func12');\n\nassertMethodName(A[emptySymbolMethod], '');\nassertMethodName(A[namedSymbolMethod], '[foo]');\nassertGetterName(A, emptySymbolGetter, '');\nassertGetterName(A, namedSymbolGetter, '[foo]');\nassertSetterName(A, emptySymbolSetter, '');\nassertSetterName(A, namedSymbolSetter, '[foo]');\n\nassertMethodName(A.prototype[emptySymbolMethod], '');\nassertMethodName(A.prototype[namedSymbolMethod], '[foo]');\nassertGetterName(A.prototype, emptySymbolGetter, '');\nassertGetterName(A.prototype, namedSymbolGetter, '[foo]');\nassertSetterName(A.prototype, emptySymbolSetter, '');\nassertSetterName(A.prototype, namedSymbolSetter, '[foo]');\n\nclass B  {\n  func1() {}\n  get func2() {}\n  set func3(a) {}\n\n  static func4() {}\n  static get func5() {}\n  static set func6(a) {}\n\n  ['func' + '7']() {}\n  get ['func' + '8']() {}\n  set ['func' + '9'](a) {}\n\n  static ['func' + '10']() {}\n  static get ['func' + '11']() {}\n  static set ['func' + '12'](a) {}\n\n  [emptySymbolMethod]() {}\n  [namedSymbolMethod]() {}\n  get [emptySymbolGetter]() {}\n  get [namedSymbolGetter]() {}\n  set [emptySymbolSetter](a) {}\n  set [namedSymbolSetter](a) {}\n\n  static [emptySymbolMethod]() {}\n  static [namedSymbolMethod]() {}\n  static get [emptySymbolGetter]() {}\n  static get [namedSymbolGetter]() {}\n  static set [emptySymbolSetter](a) {}\n  static set [namedSymbolSetter](a) {}\n}\n\nassertMethodName(B.prototype.func1, 'func1');\nassertGetterName(B.prototype, 'func2');\nassertSetterName(B.prototype, 'func3');\n\nassertMethodName(B.func4, 'func4');\nassertGetterName(B, 'func5');\nassertSetterName(B, 'func6');\n\nassertMethodName(B.prototype.func7, 'func7');\nassertGetterName(B.prototype, 'func8');\nassertSetterName(B.prototype, 'func9');\n\nassertMethodName(B.func10, 'func10');\nassertGetterName(B, 'func11');\nassertSetterName(B, 'func12');\n\nassertMethodName(B[emptySymbolMethod], '');\nassertMethodName(B[namedSymbolMethod], '[foo]');\nassertGetterName(B, emptySymbolGetter, '');\nassertGetterName(B, namedSymbolGetter, '[foo]');\nassertSetterName(B, emptySymbolSetter, '');\nassertSetterName(B, namedSymbolSetter, '[foo]');\n\nassertMethodName(B.prototype[emptySymbolMethod], '');\nassertMethodName(B.prototype[namedSymbolMethod], '[foo]');\nassertGetterName(B.prototype, emptySymbolGetter, '');\nassertGetterName(B.prototype, namedSymbolGetter, '[foo]');\nassertSetterName(B.prototype, emptySymbolSetter, '');\nassertSetterName(B.prototype, namedSymbolSetter, '[foo]');\n\nlet names = ['push', 'pop', 'reduce', 'reduceRight'];\n\nfor (let n of names) {\n  assert(Array.prototype[n].name === n);\n}\n\nassert(Array.prototype[Symbol.iterator].name === 'values');\nassert(Array.prototype.values.name === 'values');\nassert(Object.getOwnPropertyDescriptor(Array, Symbol.species).get.name === 'get [Symbol.species]');\nassert(Object.getOwnPropertyDescriptor(String.prototype, Symbol.iterator).value.name === '[Symbol.iterator]');\nassert(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').get.name === 'get __proto__');\nassert(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set.name === 'set __proto__');\n\nlet arFunc;\nlet array = [];\narray['original'] = array;\narray['original'][arFunc = ()=>{ }]=function(){}\nassertMethodName(array[arFunc], '');\n\nvar o = { 0 : class {} };\n\nassertMethodName(o['0'], '0');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-new-target.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar get = [];\nvar p = new Proxy(Function, { get: function(o, k) { get.push(k); return o[k]; }});\nnew p;\n\nassert(get + '' === \"prototype\");\n\nvar func = function() {}\nvar reflect = Reflect.construct(Function, ['a','b','return a+b'], func);\nassert(Object.getPrototypeOf(reflect) == func.prototype);\n\nvar o = new Proxy (function f () {}, { get(t,p,r) { if (p == \"prototype\") { throw 42 }}})\n\ntry {\n  Reflect.construct(Function, [], o);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-param-init.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar local = 0;\n\nswitch(0) { /* This switch forces a pre-scanner run. */\ndefault:\n\n  function f(a = (5, local = 6),\n             b = ((5 + function(a = 6) { return a }() * 3)),\n             c,\n             d = true ? 1 : 2)\n  {\n    return \"\" + a + \", \" + b + \", \" + c + \", \" + d;\n  }\n\n  assert(f() === \"6, 23, undefined, 1\");\n  assert(local === 6);\n\n  var obj = {\n    f: function(a = [10,,20],\n                b,\n                c = Math.cos(0),\n                d)\n    {\n      return \"\" + a + \", \" + b + \", \" + c + \", \" + d;\n    }\n  };\n\n  assert(obj.f() === \"10,,20, undefined, 1, undefined\");\n\n  function g(a, b = (local = 7)) { }\n\n  local = 0;\n  g();\n  assert(local === 7);\n\n  local = 0;\n  g(0);\n  assert(local === 7);\n\n  local = 0;\n  g(0, undefined);\n  assert(local === 7);\n\n  local = 0;\n  g(0, null);\n  assert(local === 0);\n\n  local = 0;\n  g(0, false);\n  assert(local === 0);\n  break;\n}\n\nfunction CheckSyntaxError(str)\n{\n  try {\n    eval(str);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n\nCheckSyntaxError('function x(a += 5) {}');\nCheckSyntaxError('function x(a =, b) {}');\nCheckSyntaxError('function x(a = (b) {}');\nCheckSyntaxError('function x(a, a = 5) {}');\nCheckSyntaxError('function x(a = 5, a) {}');\n\n// Pre-scanner tests.\nvar str = \"a = 5, b, c = function() { for (var a = 0; a < 4; a++) ; return a; } ()\"\n\nvar f = new Function (str, str);\nf();\n\nvar f = new Function (str, \"return (a + c) * (b == undefined ? 1 : 0)\");\nassert (f() == 9);\n\nfunction duplicatedArg (a = c, b = d, c) {\n  assert(a === 1);\n  assert(b === 2);\n  assert(c === 3);\n}\n\nduplicatedArg(1, 2, 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-param-init2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f(a, b = a)\n{\n  function a() { return 2; }\n\n  assert(a() === 2);\n  assert(b === 1)\n}\nf(1);\n\nfunction g(a, b = a)\n{\n  function a() { return 2; }\n\n  eval(\"assert(a() === 2)\");\n  eval(\"assert(b === 1)\");\n}\ng(1);\n\nvar x = 1;\nfunction h(a = x) {\n  assert(x === undefined);\n  var x = 2;\n  assert(a === 1);\n  assert(x === 2);\n}\nh();\n\nx = function() { return 4; }\nlet y = 6;\n\nfunction i(a = x() / 2, b = (y) + 2, c = typeof z) {\n  let y = 10;\n  let z = 11;\n\n  function x() { return 5; }\n\n  assert(a === 2);\n  assert(x() === 5);\n  assert(b === 8);\n  assert(c === \"undefined\");\n  assert(y === 10);\n  assert(z === 11);\n}\ni();\n\nvar arguments = 10;\nfunction j(a = arguments[1])\n{\n  assert(a === 2);\n  a = 3;\n  assert(arguments[0] === undefined)\n}\nj(undefined,2);\n\nfunction k(a = 2)\n{\n  let d = 5;\n  assert(d === 5);\n  eval(\"assert(a === 2)\");\n}\nk();\n\nfunction l(a = 3)\n{\n  const d = 6;\n  assert(d === 6);\n  eval(\"assert(a === 3)\");\n}\nl();\n\nfunction m(a, b = 2)\n{\n  assert(a === 1);\n  assert(arguments[0] === 1);\n  assert(b === 2);\n  assert(arguments[1] === undefined);\n\n  a = 8;\n  b = 9;\n\n  assert(a === 8);\n  assert(arguments[0] === 1);\n  assert(b === 9);\n  assert(arguments[1] === undefined);\n}\nm(1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-param-init3.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar d = 1\nfunction f(a = function () { return d })\n{\n  var d = 2\n  assert(d === 2)\n  assert(a() === 1)\n}\nf()\n\nvar g = (a = () => d) => {\n  var d = 2\n  assert(d === 2)\n  assert(a() === 1)\n}\ng()\n\nvar h = ([{a}] = [{a: function () { return d }}]) => {\n  var d = 2\n  assert(d === 2)\n  assert(a() === 1)\n}\nh()\n\nfunction i(a = ((eval))(\"(function () { return d })\"))\n{\n  var d = 2\n  assert(d === 2)\n  assert(a() === 1)\n}\ni()\n\nfunction j(a = (([1, ((() => d))])[1]))\n{\n  var d = 2\n  assert(d === 2)\n  assert(a() === 1)\n}\nj()\n\nvar m = 0\nfunction l(a)\n{\n  m = a\n  return m\n}\n\nfunction k(a = l(() => d))\n{\n  var d = 2\n  assert(d === 2)\n  assert(a() === 1)\n  assert(m() === 1)\n}\nk()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-param-init4.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_reference_error(code)\n{\n  try {\n    eval(code);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof ReferenceError);\n  }\n}\n\nfunction f1(a = a)\n{\n  assert(a === 1)\n}\nf1(1)\ncheck_reference_error(\"f1()\");\n\nfunction f2([a] = 1 + a)\n{\n  assert(a === 2)\n}\nf2([2])\ncheck_reference_error(\"f2()\");\n\nfunction f3([a = !a])\n{\n  assert(a === 2)\n}\nf3([2])\ncheck_reference_error(\"f3([])\");\n\nfunction f4([[a]] = a)\n{\n  assert(a === 3)\n}\nf4([[3]])\ncheck_reference_error(\"f4()\");\n\nfunction f5([[a], b = a] = a)\n{\n  assert(a === 4 && b === 4)\n}\nf5([[4]])\ncheck_reference_error(\"f5()\")\n\nfunction f6(a = 3 - ((b)), b)\n{\n  assert(a === 1 && b === 2)\n}\nf6(1, 2)\ncheck_reference_error(\"f6(undefined, 2)\");\n\nfunction f7(a = b(), [b])\n{\n  assert(a === 3 && b === 4)\n}\nf7(3, [4])\ncheck_reference_error(\"f7(undefined, [4])\");\n\nfunction f8(a = (function () { return a * 2 })())\n{\n  assert(a === 1)\n}\nf8(1)\ncheck_reference_error(\"f8()\");\n\nfunction f9({a = b, b:{b}})\n{\n  assert(a === 2 && b === 3)\n}\nf9({a:2, b:{b:3}})\ncheck_reference_error(\"f9({b:{b:3}})\");\n\nfunction f10(a = eval(\"a\"))\n{\n  assert(a === 1)\n}\nf10(1)\ncheck_reference_error(\"f10()\");\n\nfunction f11([a] = eval(\"a\"))\n{\n  assert(a === 2)\n}\nf11([2])\ncheck_reference_error(\"f11()\");\n\nfunction f12({a} = eval(\"a\"))\n{\n  assert(a === 3)\n}\nf12({a:3})\ncheck_reference_error(\"f12()\");\n\nfunction f13(a = arguments)\n{\n  assert(a[0] === undefined)\n  assert(a[1] === 4)\n  arguments[0] = 5\n  assert(a[0] === 5)\n}\nf13(undefined, 4)\n\nfunction f14(a, b = function() { return a; }(), c = (() => a)())\n{\n  assert(a === 6 && b === 6 && c === 6)\n}\nf14(6)\n\nfunction f15(a = (() => b)(), b)\n{\n  assert(a === 1 && b === 2)\n}\nf15(1, 2)\ncheck_reference_error(\"f15(undefined, 2)\");\n\nvar f16 = (a = a) =>\n{\n  assert(a === 1)\n}\nf16(1)\ncheck_reference_error(\"f16()\");\n\nvar f17 = ([[a]] = a) =>\n{\n  assert(a === 2)\n}\nf17([[2]])\ncheck_reference_error(\"f17()\");\n\nvar f18 = ({a = b, b:{b}}) =>\n{\n  assert(a === 3 && b === 4)\n}\nf18({a:3, b:{b:4}})\ncheck_reference_error(\"f18({b:{b:4}})\");\n\nvar f19 = (a = eval(\"a\")) =>\n{\n  assert(a === 5)\n}\nf19(5)\ncheck_reference_error(\"f19()\");\n\nvar f20 = ([a] = eval(\"a\")) =>\n{\n  assert(a === 6)\n}\nf20([6])\ncheck_reference_error(\"f20()\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-pattern1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction must_throw (str, type = SyntaxError)\n{\n  try\n  {\n    eval (str);\n    assert (false);\n  }\n  catch (e)\n  {\n    assert (e instanceof type)\n  }\n}\n\nmust_throw (\"function f(a, [a]) {}\");\nmust_throw (\"function f([a], a) {}\");\nmust_throw (\"function f(a = b, [b]) {}; f()\", ReferenceError);\nmust_throw (\"function f([a+b]) {}\");\nmust_throw (\"function f([a().b]) {}\");\nmust_throw (\"function f(...[a] = [1]) {}\");\n\nfunction a1([a,b]) {\n  var a, b;\n\n  assert(a === 1);\n  assert(b === undefined);\n\n  var a = 3;\n  assert(a === 3);\n}\na1([1]);\n\nfunction a2([a,b]) {\n  eval(\"var a, b\");\n  assert(a === 1);\n  assert(b === undefined);\n\n  eval(\"var a = 3\");\n  assert(a === 3);\n}\na2([1]);\n\nfunction f1(a, [b], c, [d], e)\n{\n  assert (a === 1);\n  assert (b === 2);\n  assert (c === 3);\n  assert (d === 4);\n  assert (e === 5);\n}\nf1(1, [2], 3, [4], 5)\n\nfunction f2(a, [b], c, [d], e)\n{\n  eval(\"\");\n  assert (a === 1);\n  assert (b === 2);\n  assert (c === 3);\n  assert (d === 4);\n  assert (e === 5);\n}\nf2(1, [2], 3, [4], 5)\n\nvar g1 = (a, [b], c, [d], e) => {\n  assert (a === 1);\n  assert (b === 2);\n  assert (c === 3);\n  assert (d === 4);\n  assert (e === 5);\n}\ng1(1, [2], 3, [4], 5)\n\nvar g2 = (a, [b], c, [d], e) => {\n  eval(\"\");\n  assert (a === 1);\n  assert (b === 2);\n  assert (c === 3);\n  assert (d === 4);\n  assert (e === 5);\n}\ng2(1, [2], 3, [4], 5)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-pattern2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((function([a], b, {c}) {}).length === 3);\n\nfunction f([a = \"x\", b = \"y\", c = \"z\"])\n{\n  assert(a === \"a\");\n  assert(b === \"b\");\n  assert(c === \"z\");\n}\nf(\"ab\")\n\nfunction g({ [\"x\" + \"y\"]: { a = 4, b = 5 }, })\n{\n  assert(a === 1);\n  assert(b === 5);\n}\ng({ xy: { a:1 } });\n\nfunction h([,,a,,b,,])\n{\n  assert(a === 3);\n  assert(b === 5);\n}\nh([1,2,3,4,5,6,7,8])\n\nfunction i([a] = [42], b = a)\n{\n  assert(a === 42);\n  assert(b === 42);\n}\ni();\n\nfunction j(a, [[b = a, [c] = [b], { d } = { d:eval(\"c\") }], e = d + 1] = [[]])\n{\n  assert(a === 8);\n  assert(b === 8);\n  assert(c === 8);\n  assert(d === 8);\n  assert(e === 9);\n}\nj(8);\n\nfunction k([a = function() { return a; }])\n{\n  assert(typeof a === \"function\");\n  assert(a() === a);\n}\nk([]);\n\nfunction l(a = 0, ...[b, c = 1, d = 4])\n{\n  assert(a === 1);\n  assert(b === 2);\n  assert(c === 3);\n  assert(d === 4);\n}\nl(1,2,3);\n\nFunction(\"{a, x:b}\",\"[c]\", \"{ 'dd':d, e = Math.cos(0)}\",\n  \"assert(a === 1);\" +\n  \"assert(b === undefined);\" +\n  \"assert(c === 3);\" +\n  \"assert(d === 4);\" +\n  \"assert(e === 1);\"\n)({a:1, b:3}, [3], {a:1, b:2, dd:4});\n\nfunction m()\n{\n  var prop_name = \"x\";\n  var def_val = 123;\n\n  function g({[prop_name]: a, b = def_val })\n  {\n    assert(a === 12);\n    assert(b === 123);\n  }\n\n  g({ x:12 })\n}\nm();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-properties.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction getProperties(obj)\n{\n  var str = \"\";\n  for (name in obj)\n  {\n    if (str)\n    {\n      str += \" \" + name;\n    }\n    else\n    {\n      str = name;\n    }\n  }\n  return str;\n}\n\nvar prototype_obj = { dummy:1, length:1, caller:null,\n                      arguments:null, prototype:null };\n\nvar func = function() {};\n\nObject.setPrototypeOf(func, prototype_obj);\nassert(getProperties(func) == \"dummy\");\n\nvar bound_func = (function() {}).bind(null);\nObject.setPrototypeOf(bound_func, prototype_obj);\nassert(getProperties(bound_func) == \"dummy caller arguments prototype\");\n\n// 'print' is an external function\nObject.setPrototypeOf(print, prototype_obj);\nassert(getProperties(print) == \"dummy length caller arguments\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-prototype-bind.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* extended class */\n(function() {\n  class C extends Function {}\n  var c = new C(\"x\", \"y\", \"return this.foo + x + y;\").bind({foo : 1}, 2);\n  assert(c(3) === 6);\n  assert(c instanceof C);\n})();\n\nfunction boundPrototypeChecker(f, proto) {\n  Object.setPrototypeOf(f, proto);\n\n  var boundFunc = Function.prototype.bind.call(f, null);\n  assert(Object.getPrototypeOf(boundFunc) === proto);\n}\n\n/* generator function */\n(function() {\n  var f = function*(){};\n  boundPrototypeChecker(f, Function.prototype)\n  boundPrototypeChecker(f, {})\n  boundPrototypeChecker(f, null);\n})();\n\n/* arrow function */\n(function() {\n  var f = () => 5;\n  boundPrototypeChecker(f, Function.prototype)\n  boundPrototypeChecker(f, {})\n  boundPrototypeChecker(f, null);\n})();\n\n/* simple class */\n(function() {\n  class C {};\n  boundPrototypeChecker(C, Function.prototype)\n  boundPrototypeChecker(C, {})\n  boundPrototypeChecker(C, null);\n})();\n\n/* subclasses */\n(function() {\n  function boundPrototypeChecker(superclass) {\n    class C extends superclass {\n      constructor() {\n        return Object.create(null);\n      }\n    }\n    var boundF = Function.prototype.bind.call(C, null);\n    assert(Object.getPrototypeOf(boundF) === Object.getPrototypeOf(C));\n  }\n\n  boundPrototypeChecker(function(){});\n  boundPrototypeChecker(Array);\n  boundPrototypeChecker(null);\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-prototype-hasinstance-class.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass base {\n  constructor (value) {\n    this.member = value;\n  }\n\n  method () {\n    return this.member;\n  }\n}\n\nclass sub {\n  constructor (value) {\n    this.member = value;\n  }\n}\n\nvar obj_base = new base (3);\nvar obj_sub = new sub (4);\n\nassert (base[Symbol.hasInstance](obj_base) === true);\nassert (base[Symbol.hasInstance](obj_sub) === false);\n\nassert (sub[Symbol.hasInstance](obj_base) === false);\nassert (sub[Symbol.hasInstance](obj_sub) === true);\n\n\nclass sub_c extends base {\n  constructor (value) {\n    super(value);\n    this.member = value;\n  }\n}\n\nvar obj_sub_c = new sub_c (5);\n\nassert (base[Symbol.hasInstance](obj_sub_c) === true);\n\nassert (sub_c[Symbol.hasInstance](obj_base) === false);\nassert (sub_c[Symbol.hasInstance](obj_sub_c) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-prototype-hasinstance.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction base (value) {\n  this.member = value;\n}\n\nbase.prototype.method = function () { return this.member; }\n\nfunction sub (value) {\n  this.member = value;\n}\n\nsub.prototype = base;\n\n\nvar obj_base = new base (3);\nvar obj_sub = new sub (4);\n\nassert (base[Symbol.hasInstance] (obj_base) === true);\nassert (base[Symbol.hasInstance] (obj_sub) === false);\nassert (Object[Symbol.hasInstance] (obj_base) === true);\nassert (Object[Symbol.hasInstance] (obj_sub) === true);\nassert (obj_base.method () === 3);\n\nassert (sub[Symbol.hasInstance] (obj_base) === false);\nassert (sub[Symbol.hasInstance] (obj_sub) === true);\nassert (obj_sub.method === undefined);\n\nfunction sub_c (value) {\n  this.member = value;\n}\n\nsub_c.prototype = Object.create (base.prototype)\nsub_c.prototype.constructor = sub_c\n\nvar obj_sub_c = new sub_c (5);\n\nassert (base[Symbol.hasInstance] (obj_sub_c) === true);\n\nassert (sub_c[Symbol.hasInstance] (obj_base) === false);\nassert (sub_c[Symbol.hasInstance] (obj_sub_c) === true);\nassert (Object[Symbol.hasInstance] (obj_sub_c) === true);\nassert (Function.prototype[Symbol.hasInstance].call (sub_c, obj_sub_c) === true);\n\nassert (obj_sub_c.method () === 5);\n\nassert (base[Symbol.hasInstance] (3) === false);\nassert (Number[Symbol.hasInstance] (33) === false);\nassert (Number[Symbol.hasInstance] (new Number (33)) === true);\nassert (Object[Symbol.hasInstance] (44) === false);\nassert (Object[Symbol.hasInstance] (new Number (22)) === true);\n\nassert (base[Symbol.hasInstance] ('demo') === false);\nassert (String[Symbol.hasInstance] ('demo') === false);\nassert (String[Symbol.hasInstance] (new String ('demo')) === true);\nassert (Object[Symbol.hasInstance] ('demo') === false);\nassert (Object[Symbol.hasInstance] (new String ('demo')) === true);\n\nassert (base[Symbol.hasInstance] ([]) === false);\nassert (base[Symbol.hasInstance] ([1, 2]) === false);\nassert (Array[Symbol.hasInstance] ([1, 2]) === true);\nassert (Array[Symbol.hasInstance] (new Array(1, 2)) === true);\nassert (Object[Symbol.hasInstance] ([]) === true);\nassert (Object[Symbol.hasInstance] (new Array()) === true);\n\nassert (base[Symbol.hasInstance] (new RegExp('abc')) === false);\nassert (RegExp[Symbol.hasInstance] (/abc/) === true);\nassert (RegExp[Symbol.hasInstance] (new RegExp('abc')) === true);\nassert (Object[Symbol.hasInstance] (/abc/) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-rest-parameter.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction CheckSyntaxError (str)\n{\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n\n  /* force the pre-scanner */\n  try {\n    eval ('switch (1) { default: ' + str + '}');\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\nCheckSyntaxError ('function x (a, b, ...c, d) {}');\nCheckSyntaxError ('function x (... c = 5) {}');\nCheckSyntaxError ('function x (...) {}');\nCheckSyntaxError ('function x (a, a, ...a) {}');\nCheckSyntaxError ('\"use strict\" function x (...arguments) {}');\nCheckSyntaxError ('var o = { set e (...args) { } }');\n\nrest_params = ['hello', true, 7, {}, [], function () {}];\n\nfunction f (x, y, ...a) {\n  for (var i = 0; i < a.length; i++) {\n    assert (a[i] == rest_params[i]);\n  }\n  return (x + y) * a.length;\n}\n\nassert (f (1, 2, rest_params[0], rest_params[1], rest_params[2]) === 9);\nassert (f.length === 2);\n\nfunction g (...a) {\n  return a.reduce (function (accumulator, currentValue) { return accumulator + currentValue });\n}\n\nassert (g (1, 2, 3, 4) === 10);\n\nfunction h (...arguments) {\n  return arguments.length;\n}\n\nassert (h (1, 2, 3, 4) === 4);\n\nfunction f2 (a = 1, b = 1, c = 1, ...d) {\n  assert (JSON.stringify (d) === '[]');\n  return a + b + c;\n}\n\nassert (f2 () === 3);\nassert (f2 (2) === 4);\nassert (f2 (2, 3) === 6);\nassert (f2 (2, 3, 4) === 9);\n\nfunction g2 (a = 5, b = a + 1, ...c) {\n  return a + b + c.length;\n}\n\nassert (g2 () === 11);\nassert (g2 (1) === 3);\nassert (g2 (1, 2) === 3);\nassert (g2 (1, 2, 3) === 4);\n\nfunction args(a, ...b)\n{\n  assert(a === 1);\n  assert(arguments[0] === 1);\n\n  a = 5;\n\n  assert(a === 5);\n  assert(arguments[0] === 1);\n\n  assert(arguments[1] === 2);\n  assert(b[0] === 2)\n}\nargs(1, 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-scope.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f1(a)\n{\n  assert(a === 2)\n  {\n    assert(a() === 1)\n    function a() { return 1 }\n  }\n  assert(a === 2)\n}\nf1(2)\n\nfunction f2([a])\n{\n  assert(a === 4)\n  {\n    assert(a() === 3)\n    function a() { return 3 }\n  }\n  assert(a === 4)\n}\nf2([4])\n\nfunction f3(a)\n{\n  assert(a() === 5)\n  {\n    assert(a() === 6)\n    function a() { return 6 }\n  }\n  assert(a() === 5)\n\n  function a() { return 5 }\n}\nf3(7)\n\nfunction f4(a)\n{\n  assert(a === 8)\n  {\n    eval(\"function a() { return 9 }\")\n    assert(a() === 9)\n  }\n  assert(a() === 9)\n}\nf4(8)\n\nfunction f5(a, b = function() { return a }) {\n  function a() { return 9 }\n\n  assert(a() === 9)\n  assert(b() === 10)\n}\nf5(10)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/function-scope2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = 1;\nvar b = 2;\n\nfunction f(x = eval(\"eval('var a = 3; function b() { return 4 } () => a')\"), y = b) {\n  eval(\"eval('var a = 5; function b() { return 6 }')\");\n\n  assert(a === 5);\n  assert(b() === 6);\n\n  assert(x() === 3);\n  assert(y() === 4);\n\n  delete a;\n  delete b;\n\n  assert(a === 3);\n  assert(b() === 4);\n\n  assert(x() === 3);\n  assert(y() === 4);\n\n  delete a;\n  delete b;\n\n  assert(a === 1);\n  assert(b === 2);\n\n  assert(x() === 1);\n  assert(y() === 4);\n}\nf()\n\nfunction g() {\n  'use strict'\n\n  function h(x, y = function() { return x }) {\n    var x = 2;\n\n    /* This should not overwrite y. */\n    eval(\"var y = 3; assert (y === 3)\");\n\n    assert(x === 2);\n    assert(typeof y === \"function\");\n    assert(y() === 1);\n  }\n  h(1);\n}\ng();\n\nfunction h(a, get = () => a, set = (v) => a = v) {\n  assert(a === 1);\n\n  var a = 2;\n\n  assert(a === 2);\n  assert(get() === 1);\n\n  set(3)\n  a = 4;\n\n  assert(a === 4);\n  assert(get() === 3);\n}\nh(1);\n\nfunction i([a], get = () => a, set = (v) => a = v) {\n  assert(a === 1);\n\n  var a;\n  assert(a === 1);\n\n  a = 2;\n\n  assert(a === 2);\n  assert(get() === 1);\n\n  set(3)\n  a = 4;\n\n  assert(a === 4);\n  assert(get() === 3);\n}\ni([1]);\n\nfunction j(a = eval()) {\n  var a = 3.14;\n\n  try {\n    eval(\"throw 1; function a() { return 8; }\")\n    assert(false)\n  } catch (e) {\n    assert(e === 1)\n  }\n\n  assert(a() === 8)\n}\nj()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/generator-function.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\n// Test %GeneratorPrototype%\n(function () {\n  function* generatorFn(){}\n  var ownProto = Object.getPrototypeOf(generatorFn());\n  var sharedProto = Object.getPrototypeOf(ownProto);\n\n  assert(ownProto === generatorFn.prototype);\n  assert(sharedProto !== Object.prototype);\n  assert(sharedProto === Object.getPrototypeOf(function*(){}.prototype));\n  assert(sharedProto.hasOwnProperty('next'));\n})();\n\n// Test %GeneratorPrototype% prototype chain\n(function () {\n  function* generatorFn(){}\n  var g = generatorFn();\n  var ownProto = Object.getPrototypeOf(g);\n  var sharedProto = Object.getPrototypeOf(ownProto);\n  var iterProto = Object.getPrototypeOf(sharedProto);\n\n  assert(ownProto === generatorFn.prototype);\n  assert(iterProto.hasOwnProperty(Symbol.iterator));\n  assert(!sharedProto.hasOwnProperty(Symbol.iterator));\n  assert(!ownProto.hasOwnProperty(Symbol.iterator));\n  assert(g[Symbol.iterator]() === g);\n})();\n\n// Test %GeneratorPrototype% prototype chain\n(function () {\n  function* g(){}\n  var iterator = new g.constructor(\"a\",\"b\",\"c\",\"() => yield\\n yield a; yield b; yield c;\")(1,2,3);\n\n  var item = iterator.next();\n  assert(item.value === 1);\n  assert(item.done === false);\n\n  item = iterator.next();\n  assert(item.value === 2);\n  assert(item.done === false);\n\n  item = iterator.next();\n  assert(item.value === 3);\n  assert(item.done === false);\n\n  item = iterator.next();\n  assert(item.value === undefined);\n  assert(item.done === true);\n\n  assert(g.constructor === (function*(){}).constructor);\n})();\n\n// Test GeneratorFunction parsing\n(function () {\n  function *f() {};\n\n  try {\n    Object.getPrototypeOf(f).constructor(\"yield\", \"\");\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n})();\n\n// Test correct property membership\n(function () {\n  function *f() {};\n\n  Object.getPrototypeOf(f).xx = 5;\n  assert(Object.getPrototypeOf(f).prototype.constructor.xx === 5);\n})();\n\n// Test GetPrototypeFromConstructor\n(function () {\n  function *f() {};\n\n  var originalProto = f.prototype;\n  f.prototype = 5;\n  assert(Object.getPrototypeOf(f()) === Object.getPrototypeOf(originalProto));\n  var fakeProto = { x : 6 };\n  f.prototype = fakeProto;\n  assert(Object.getPrototypeOf(f()) === fakeProto);\n  assert(f.next === undefined);\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/generator-initializer.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file checks core generator operations. */\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\ncheck_syntax_error (\"({ * })\")\ncheck_syntax_error (\"({ *, b:4 })\")\ncheck_syntax_error (\"({ *a:4 })\")\ncheck_syntax_error (\"({ *['a']:4 })\")\ncheck_syntax_error (\"({ *a(yield) {} })\")\ncheck_syntax_error (\"({ get *a() {} })\")\ncheck_syntax_error (\"({ set *b(v) {} })\")\n\ncheck_syntax_error (\"class C { * }\")\ncheck_syntax_error (\"class C { static * }\")\ncheck_syntax_error (\"class C { *() {} }\")\ncheck_syntax_error (\"class C { static * () {} }\")\ncheck_syntax_error (\"class C { *['a'] {} }\")\n\nfunction check_result(result, value, done)\n{\n  assert(result.value === value)\n  assert(result.done === done)\n}\n\nfunction postfix(a) { return a + \"b\" }\n\nvar o = {\n  * a () {\n    yield 1\n    return 2\n  },\n  *2(x) {\n    yield x + 1\n    return x + 2\n  },\n  *[postfix(\"a\")]() {\n    var o = { get yield() { return 3 + 2 } }\n\n    yield o.yield\n    return 6\n  },\n  *yield() {\n    var o = { yield:7 }\n\n    yield o.yield\n    return 8\n  }\n}\n\nvar f = o.a()\ncheck_result(f.next(), 1, false)\ncheck_result(f.next(), 2, true)\n\nvar f = o[2](2)\ncheck_result(f.next(), 3, false)\ncheck_result(f.next(), 4, true)\n\nvar f = o.ab()\ncheck_result(f.next(), 5, false)\ncheck_result(f.next(), 6, true)\n\nvar f = o.yield()\ncheck_result(f.next(), 7, false)\ncheck_result(f.next(), 8, true)\n\nclass C {\n  * a () {\n    yield 1\n    return 2\n  }\n\n  *3(x) {\n    yield x + 1\n    return x + 2\n  }\n\n  *[postfix(\"a\")]() {\n    var o = { get yield() { return 3 + 2 } }\n\n    yield o.yield\n    return 6\n  }\n\n  static *yield() {\n    var o = { yield:7 }\n\n    yield o.yield\n    return 8\n  }\n\n  static * [postfix(\"b\") ] (v = 9) {\n    return v\n  }\n}\n\nvar c = new C\n\nvar f = c.a()\ncheck_result(f.next(), 1, false)\ncheck_result(f.next(), 2, true)\n\nvar f = c[3](2)\ncheck_result(f.next(), 3, false)\ncheck_result(f.next(), 4, true)\n\nvar f = c.ab()\ncheck_result(f.next(), 5, false)\ncheck_result(f.next(), 6, true)\n\nvar f = C.yield()\ncheck_result(f.next(), 7, false)\ncheck_result(f.next(), 8, true)\n\nvar f = C.bb()\ncheck_result(f.next(), 9, true)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/generator-return.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_result(result, value, done)\n{\n  assert(result.value === value)\n  assert(result.done === done)\n}\n\nfunction * gen1(a) {\n  return \"a: \" + (yield a.p)\n}\n\nvar f = gen1({})\ncheck_result(f.return(4), 4, true)\ncheck_result(f.next(), undefined, true)\n\nf = gen1({ p:\"x\" })\ncheck_result(f.next(), \"x\", false)\ncheck_result(f.return(10), 10, true)\ncheck_result(f.next(), undefined, true)\n\nf = gen1({ p:\"b\" })\ncheck_result(f.next(), \"b\", false)\ncheck_result(f.next(), \"a: undefined\", true)\ncheck_result(f.next(), undefined, true)\n\nfunction*gen2() {\n  try {\n    for (let i in { x:1, y:2 })\n    {\n      assert((yield i) === \"33\")\n    }\n    assert(false)\n  } catch (e) {\n    assert(false)\n  } finally {\n    yield \"z\"\n  }\n}\n\nf = gen2()\ncheck_result(f.return(\"ret\"), \"ret\", true)\ncheck_result(f.next(), undefined, true)\n\nf = gen2()\ncheck_result(f.next(), \"x\", false)\ncheck_result(f.return(\"ret\"), \"z\", false)\ncheck_result(f.next(), \"ret\", true)\ncheck_result(f.next(), undefined, true)\n\nfunction* gen3() {\n  try {\n    return 8\n  } finally {\n    yield 1\n  }\n}\n\nf = gen3()\ncheck_result(f.next(), 1, false)\ncheck_result(f.return(2), 2, true)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/generator-throw.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_result(result, value, done)\n{\n  assert(result.value === value)\n  assert(result.done === done)\n}\n\nfunction check_throw(str, expected)\n{\n  try {\n    eval(str)\n    assert(false);\n  } catch (e) {\n    assert(e === expected);\n  }\n}\n\nfunction * gen1(a) {\n  return \"a: \" + (yield a.p)\n}\n\nvar f = gen1({})\ncheck_throw(\"f.throw(4)\", 4)\ncheck_result(f.next(), undefined, true)\n\nf = gen1({ p:\"x\" })\ncheck_result(f.next(), \"x\", false)\ncheck_throw(\"f.throw(10)\", 10)\ncheck_result(f.next(), undefined, true)\n\nf = gen1({ p:\"b\" })\ncheck_result(f.next(), \"b\", false)\ncheck_result(f.next(), \"a: undefined\", true)\ncheck_result(f.next(), undefined, true)\n\nfunction*gen2() {\n  try {\n    for (let i in { x:1, y:2 })\n    {\n      assert((yield i) === \"33\")\n    }\n    assert(false)\n  } finally {\n    yield \"z\"\n  }\n}\n\nf = gen2()\ncheck_throw(\"f.throw('throw')\", \"throw\")\ncheck_result(f.next(), undefined, true)\n\nf = gen2()\ncheck_result(f.next(), \"x\", false)\ncheck_result(f.throw(\"throw\"), \"z\", false)\ncheck_throw(\"f.next()\", \"throw\")\ncheck_result(f.next(), undefined, true)\n\nfunction/* generator */*/* generator */gen3() {\n  try {\n    return 8\n  } finally {\n    yield 1\n  }\n}\n\nf = gen3()\ncheck_result(f.next(), 1, false)\ncheck_throw(\"f.throw(2)\", 2)\n\nfunction\n  /* generator */\n  *\n  /* generator */\n  gen4()\n{\n}\n\nf = gen4()\ncheck_result(f.next(), undefined, true)\ncheck_throw(\"f.throw('Str')\", \"Str\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/generator-yield-iterator.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_result(result, value, done)\n{\n  assert(result.value === value)\n  assert(result.done === done)\n}\n\nfunction *gen1() {\n  yield 1\n  yield *[2,3,4]\n  yield 5\n}\n\nvar g = gen1()\ncheck_result(g.next(), 1, false)\ncheck_result(g.next(), 2, false)\ncheck_result(g.next(), 3, false)\ncheck_result(g.next(), 4, false)\ncheck_result(g.next(), 5, false)\ncheck_result(g.next(), undefined, true)\n\nfunction *gen2() {\n  yield * true\n}\n\ntry {\n  g = gen2()\n  g.next()\n  assert(false)\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n\nvar t0 = 0, t1 = 0\n\nfunction *gen3() {\n  function *f() {\n    try {\n      yield 5\n    } finally {\n      t0 = 1\n    }\n  }\n\n  try {\n    yield *f()\n  } finally {\n    t1 = 1\n  }\n}\n\ng = gen3()\ncheck_result(g.next(), 5, false)\ncheck_result(g.return(13), 13, true)\nassert(t0 === 1)\nassert(t1 === 1)\n\nt0 = -1\nt1 = 0\n\nfunction *gen4() {\n  function next(arg)\n  {\n    t0++;\n\n    if (t0 === 0)\n    {\n      assert(arg === undefined);\n      return { value:2, done:false }\n    }\n    if (t0 === 1)\n    {\n      assert(arg === -3);\n      return { value:3, done:false }\n    }\n    assert(arg === -4);\n    return { value:4, done:true }\n  }\n\n  var o = { [Symbol.iterator]() { return { next } } }\n  assert((yield *o) === 4)\n  return 5;\n}\n\ng = gen4()\ncheck_result(g.next(-2), 2, false)\ncheck_result(g.next(-3), 3, false)\ncheck_result(g.next(-4), 5, true)\n\nfunction *gen5() {\n  function *f() {\n    try {\n      yield 1\n      assert(false)\n    } catch (e) {\n      assert(e === 10)\n    }\n    return 2\n  }\n\n  assert((yield *f()) === 2)\n  yield 3\n}\n\ng = gen5()\ncheck_result(g.next(), 1, false)\ncheck_result(g.throw(10), 3, false)\n\nvar o = {}\nvar state = 0\nvar iter6 = {\n  [Symbol.iterator]() {\n    return {\n      get next() {\n        assert(++state === 2)\n        return function () {\n          return { value:\"Res\", done:false }\n        }\n      },\n      get throw() {\n        ++state\n        assert(state === 4 || state === 9 || state == 14)\n        return function (v) {\n          assert(v === \"Input\")\n          return { value:o, done:false }\n        }\n      },\n      get return() {\n        ++state\n        assert(state === 6 || state === 11 || state == 16)\n        return function (v) {\n          assert(v === o)\n          return { value:4.5, done:false }\n        }\n      }\n    }\n  }\n}\n\nfunction *gen6() {\n  assert(++state === 1)\n  yield *iter6\n  assert(false)\n}\n\ng = gen6()\ncheck_result(g.next(), \"Res\", false)\nassert(++state === 3)\ncheck_result(g.throw(\"Input\"), o, false)\nassert(++state === 5)\ncheck_result(g.return(o), 4.5, false)\nassert(++state === 7)\n\ncheck_result(g.next(), \"Res\", false)\nassert(++state === 8)\ncheck_result(g.throw(\"Input\"), o, false)\nassert(++state === 10)\ncheck_result(g.return(o), 4.5, false)\nassert(++state === 12)\n\ncheck_result(g.next(), \"Res\", false)\nassert(++state === 13)\ncheck_result(g.throw(\"Input\"), o, false)\nassert(++state === 15)\ncheck_result(g.return(o), 4.5, false)\nassert(++state === 17)\n\nstate = 0\nvar iter7 = {\n  [Symbol.iterator]() {\n    return {\n      get next() {\n        assert(++state === 2)\n        return \"Not callable\"\n      }\n    }\n  }\n}\n\nfunction *gen7() {\n  assert(++state === 1)\n  yield *iter7\n  assert(false)\n}\n\ng = gen7()\ntry {\n  g.next()\n  assert(false)\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/generator-yield.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file checks yield syntax errors. */\n\nfunction check_syntax_error(str)\n{\n  try {\n    eval(str);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n\nfunction  *  gen()\n{\n  yield , yield\n\n  yield\n     , yield\n\n  (yield\n  )\n\n  yield[\n  1]\n}\n\nfunction*gen2()\n{\n  1 ?\n    yield\n  :\n    yield\n}\n\nvar gen3 = function*(){\n  (yield)/[yield]\n}\n\ncheck_syntax_error(\"function *gen(){ yield % yield }\");\ncheck_syntax_error(\"function *gen(){ (yield) % yield }\");\ncheck_syntax_error(\"function *gen(){ yield % (yield) }\");\ncheck_syntax_error(\"function *gen(){ (yield\\n1) }\");\ncheck_syntax_error(\"function *gen(){ function yield() {} }\");\ncheck_syntax_error(\"function *gen(){ (yield)=>1 }\");\ncheck_syntax_error(\"function *gen(){ yield => 1 }\");\ncheck_syntax_error(\"function *gen(){ yi\\\\u0065ld 1 }\");\n\nfunction *gen4() {\n  var f = function yield(i) {\n    if (i = 0)\n      return yield(i + 1)\n\n    return 39\n  }\n\n  return f(0)\n}\n\nassert(gen4().next().value === 39);\n\n(function *() {\n  () => yield\n  yield 1;\n})\n\nfunction *gen5() {\n  var o = {\n    [\"f\"]() { yield % yield }\n  }\n  yield 1;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/generator.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file checks core generator operations. */\n\nfunction check_result(result, value, done)\n{\n  assert(result.value === value)\n  assert(result.done === done)\n}\n\nfunction * gen1(a = (t = 8)) {\n  var o = { p: 2 }\n  var x = 3.25\n\n  assert((o.p + (yield 10)) === 23)\n  assert((o.p + (yield 11)) === 24)\n  return x\n}\n\n/* Cannot be invoked with new. */\ntry {\n  new gen1\n  assert(false)\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n\n/* Fully read values. */\nvar t = 0\nvar g = gen1()\nassert(t === 8)\n\ncheck_result(g.next(20), 10, false)\ncheck_result(g.next(21), 11, false)\ncheck_result(g.next(22), 3.25, true)\ncheck_result(g.next(23), undefined, true)\n\n/* Partly read values (gc needs to free a suspended generator). */\nt = 0\ng = gen1()\nassert(t === 8)\n\ncheck_result(g.next(20), 10, false)\n\nfunction * gen2() {\n  for (i in { x:0, y:1, z:2 })\n  {\n    let a = eval(\"'s'\")\n\n    var b = yield a + i\n    assert (b === ++t)\n  }\n}\n\n/* Fully read values. */\nt = 0\nf = gen2()\n\ncheck_result(f.next(0), \"sx\", false)\ncheck_result(f.next(1), \"sy\", false)\ncheck_result(f.next(2), \"sz\", false)\ncheck_result(f.next(3), undefined, true)\ncheck_result(f.next(4), undefined, true)\n\n/* Partly read values (gc needs to free a suspended generator). */\nf = gen2()\n\nt = 0\ncheck_result(f.next(0), \"sx\", false)\n\nfunction *gen3() {\n  function f(yield) {\n    return -yield * 2\n  }\n\n  var g = (v) => {\n    assert(v === 6)\n  }\n\n  g(yield yield f(++t))\n\n  return 77\n}\n\n/* Fully read values. */\nt = 0\nf = gen3()\n\ncheck_result(f.next(0), -2, false)\ncheck_result(f.next(88), 88, false)\ncheck_result(f.next(6), 77, true)\n\n/* Partly read values (gc needs to free a suspended generator). */\nt = 0\nf = gen3()\n\ncheck_result(f.next(0), -2, false)\n\nfunction\n      /* generator: */ *\n      /* name: */ gen4() {\n\n  let a = eval(\"5\")\n  with ({a})\n  {\n    let a = eval(\"6\")\n\n    for (let a = 10; a < 11; a++)\n    {\n      let a = eval(\"7\")\n      yield (a)\n    }\n\n    yield a, !assert(a === 6)\n  }\n  assert((yield a) === undefined)\n}\n\n/* Fully read values. */\nf = gen4()\n\ncheck_result(f.next(), 7, false)\ncheck_result(f.next(), 6, false)\ncheck_result(f.next(), 5, false)\ncheck_result(f.next(), undefined, true)\n\n/* Partly read values (gc needs to free a suspended generator). */\nf = gen4()\n\ncheck_result(f.next(), 7, false)\n\nfunction*gen5(a,b,c,d) {\n  yield a\n  yield b\n  yield c\n  yield d\n}\n\n/* Fully read values. */\nt = []\nfor(let i of gen5(1,3,5,7)) {\n  t.push(i)\n}\n\nassert(t.length === 4)\nassert(t[0] === 1)\nassert(t[1] === 3)\nassert(t[2] === 5)\nassert(t[3] === 7)\n\n/* Partly read values (gc needs to free a suspended generator). */\nt = []\nfor(let i of gen5(1,3,5,7)) {\n  t.push(i)\n  if (i === 3) {\n    break\n  }\n}\n\nassert(t.length === 2)\nassert(t[0] === 1)\nassert(t[1] === 3)\n\n/* Recursive generator call. */\nfunction* gen6(a,b,c,d) {\n  yield f.next()\n}\n\nf = gen6()\n\ntry {\n  f.next()\n  assert(false)\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n\n/* Parameterless yield. */\nfunction* gen7() {\n  yield\n}\n\nf = gen7()\ncheck_result(f.next(), undefined, false)\ncheck_result(f.next(), undefined, true)\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/global-this.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(this === globalThis)\nassert(this.globalThis === globalThis)\n\nglobalThis = \"X\"\nassert(globalThis === \"X\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/global-unescape.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright (C) 2016 the V8 project authors. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n\nassert(unescape('%U0000') === '%U0000');\nassert(unescape('%t0000') === '%t0000');\nassert(unescape('%v0000') ==='%v0000');\nassert(unescape('%%0000') === '%\\x0000');\n\n// tests for two hexa unescape\nassert(unescape('%0%0000') === '%0\\x0000');\nassert(unescape('%0%0100') === '%0\\x0100');\n\nassert(unescape('%0%2900') === '%0)00');\nassert(unescape('%0%2a00') === '%0*00');\nassert(unescape('%0%2A00') === '%0*00');\nassert(unescape('%0%2b00') === '%0+00');\nassert(unescape('%0%2B00') === '%0+00');\nassert(unescape('%0%2c00') === '%0,00');\nassert(unescape('%0%2C00') === '%0,00');\nassert(unescape('%0%2d00') === '%0-00');\nassert(unescape('%0%2D00') === '%0-00');\n\nassert(unescape('%0%3900') === '%0900');\nassert(unescape('%0%3a00') === '%0:00');\nassert(unescape('%0%3A00') === '%0:00');\n\nassert(unescape('%0%3f00') === '%0?00');\nassert(unescape('%0%3F00') === '%0?00');\nassert(unescape('%0%4000') === '%0@00');\n\nassert(unescape('%0%5a00') === '%0Z00');\nassert(unescape('%0%5A00') === '%0Z00');\nassert(unescape('%0%5b00') === '%0[00');\nassert(unescape('%0%5B00') === '%0[00');\n\nassert(unescape('%0%5e00') === '%0^00');\nassert(unescape('%0%5E00') === '%0^00');\nassert(unescape('%0%5f00') === '%0_00');\nassert(unescape('%0%5F00') === '%0_00');\nassert(unescape('%0%6000') === '%0`00');\nassert(unescape('%0%6100') === '%0a00');\n\nassert(unescape('%0%7a00') === '%0z00');\nassert(unescape('%0%7A00') === '%0z00');\nassert(unescape('%0%7b00') === '%0{00');\nassert(unescape('%0%7B00') === '%0{00');\n\nassert(unescape('%0%fe00') === '%0\\xfe00');\nassert(unescape('%0%Fe00') === '%0\\xfe00');\nassert(unescape('%0%fE00') === '%0\\xfe00');\nassert(unescape('%0%FE00') === '%0\\xfe00');\n\nassert(unescape('%0%ff00') === '%0\\xff00');\nassert(unescape('%0%Ff00') === '%0\\xff00');\nassert(unescape('%0%fF00') === '%0\\xff00');\nassert(unescape('%0%FF00') === '%0\\xff00');\n\n// tests for unicode unescape\nassert(unescape('%0%u00290') === '%0)0');\nassert(unescape('%0%u002a0') === '%0*0');\nassert(unescape('%0%u002A0') === '%0*0');\nassert(unescape('%0%u002b0') === '%0+0');\nassert(unescape('%0%u002B0') === '%0+0');\nassert(unescape('%0%u002c0') === '%0,0');\nassert(unescape('%0%u002C0') === '%0,0');\nassert(unescape('%0%u002d0') === '%0-0');\nassert(unescape('%0%u002D0') === '%0-0');\n\nassert(unescape('%0%u00390') === '%090');\nassert(unescape('%0%u003a0') === '%0:0');\nassert(unescape('%0%u003A0') === '%0:0');\n\nassert(unescape('%0%u003f0') === '%0?0');\nassert(unescape('%0%u003F0') === '%0?0');\nassert(unescape('%0%u00400') === '%0@0');\n\nassert(unescape('%0%u005a0') === '%0Z0');\nassert(unescape('%0%u005A0') === '%0Z0');\nassert(unescape('%0%u005b0') === '%0[0');\nassert(unescape('%0%u005B0') === '%0[0');\n\nassert(unescape('%0%u005e0') === '%0^0');\nassert(unescape('%0%u005E0') === '%0^0');\nassert(unescape('%0%u005f0') === '%0_0');\nassert(unescape('%0%u005F0') === '%0_0');\nassert(unescape('%0%u00600') === '%0`0');\nassert(unescape('%0%u00610') === '%0a0');\n\nassert(unescape('%0%u007a0') === '%0z0');\nassert(unescape('%0%u007A0') === '%0z0');\nassert(unescape('%0%u007b0') === '%0{0');\nassert(unescape('%0%u007B0') === '%0{0');\n\nassert(unescape('%0%ufffe0') === '%0\\ufffe0');\nassert(unescape('%0%uFffe0') === '%0\\ufffe0');\nassert(unescape('%0%ufFfe0') === '%0\\ufffe0');\nassert(unescape('%0%uffFe0') === '%0\\ufffe0');\nassert(unescape('%0%ufffE0') === '%0\\ufffe0');\nassert(unescape('%0%uFFFE0') === '%0\\ufffe0');\n\nassert(unescape('%0%uffff0') === '%0\\uffff0');\nassert(unescape('%0%uFfff0') === '%0\\uffff0');\nassert(unescape('%0%ufFff0') === '%0\\uffff0');\nassert(unescape('%0%uffFf0') === '%0\\uffff0');\nassert(unescape('%0%ufffF0') === '%0\\uffff0');\nassert(unescape('%0%uFFFF0') === '%0\\uffff0');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/identifier-escape.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_syntax_error (code) {\n  try {\n    eval(code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\neval(\"\\u{000010C80}: break \\ud803\\udc80\")\neval(\"\\\\u{10C80}: break \\ud803\\udc80\")\neval(\"$\\u{000010C80}$: break $\\ud803\\udc80$\")\neval(\"$\\\\u{10C82}$: break $\\ud803\\udc82$\")\n\nassert(\"\\u{000010C80}\".length === 2)\nassert(\"x\\u{010C80}y\".length === 4)\nassert(\"\\u{10C80}\" === \"\\ud803\\u{dc80}\")\nassert(\"\\u{0}\\x01\" === \"\\u0000\\u0001\")\n\n/* Surrogate pairs are not combined if they passed as \\u sequences. */\ncheck_syntax_error(\"\\\\u{10C80}: break \\\\ud803\\\\udc80\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/instanceof-symbol-hasinstance-class.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass NoParent {\n  static [Symbol.hasInstance] (arg) {\n    return false;\n  }\n}\n\nvar obj = new NoParent ();\n\nassert ((obj instanceof NoParent) === false);\n\nclass PositiveNumber {\n  static [Symbol.hasInstance] (arg) {\n    return (arg instanceof Number) && (arg >= 0);\n  }\n}\n\nvar num_a = new Number (33);\nvar num_b = new Number (-50);\n\nassert ((num_a instanceof PositiveNumber) === true);\nassert ((num_b instanceof PositiveNumber) === false);\n\n\nclass ErrorAlways {\n  static [Symbol.hasInstance] (arg) {\n    throw new URIError(\"ErrorAlways\");\n  }\n}\n\ntry {\n  (new Object ()) instanceof ErrorAlways;\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof URIError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/instanceof-symbol-hasinstance.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction NoParent () { }\n\nObject.defineProperty (NoParent, Symbol.hasInstance, {\n    value: function (arg) { return false; }\n});\n\nvar obj = new NoParent ();\n\nassert ((obj instanceof NoParent) === false);\n\ntry {\n  Object.defineProperty (NoParent, Symbol.hasInstance, {\n    value: function (arg) { return true; }\n  });\n  assert (false)\n} catch (ex) {\n  assert (ex instanceof TypeError);\n}\n\n\nfunction PositiveNumber () { }\n\nObject.defineProperty (PositiveNumber, Symbol.hasInstance, {\n    value: function (arg) { return (arg instanceof Number) && (arg >= 0); }\n})\n\nvar num_a = new Number (33);\nvar num_b = new Number (-50);\n\nassert ((num_a instanceof PositiveNumber) === true);\nassert ((num_b instanceof PositiveNumber) === false);\n\n\nfunction ErrorAlways () { }\n\nObject.defineProperty (ErrorAlways, Symbol.hasInstance, {\n    value: function (arg) { throw new URIError (\"ErrorAlways\"); }\n})\n\ntry {\n  (new Object ()) instanceof ErrorAlways;\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof URIError);\n}\n\n\nfunction NonCallable () { }\n\nObject.defineProperty (NonCallable, Symbol.hasInstance, { value: 11 });\n\ntry {\n  (new Object ()) instanceof NonCallable;\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof TypeError);\n}\n\n\nfunction ErrorGenerator () { }\n\nObject.defineProperty (ErrorGenerator, Symbol.hasInstance, {\n    get: function () { throw new URIError (\"ErrorGenerator\"); }\n});\n\ntry {\n  (new Object ()) instanceof ErrorGenerator;\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof URIError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/intrinsic-properties.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Array.prototype.values === Array.prototype[Symbol.iterator]);\nassert(Set.prototype.values === Set.prototype[Symbol.iterator]);\nassert(Set.prototype.keys === Set.prototype[Symbol.iterator]);\nassert(Map.prototype.entries === Map.prototype[Symbol.iterator]);\nassert(Date.prototype.toGMTString === Date.prototype.toUTCString);\nassert(Number.parseInt === parseInt);\nassert(Number.parseFloat === parseFloat);\n\nvar typedarrays = [Uint8Array, Uint16Array, Uint32Array, Int8Array, Int16Array, Int32Array, Float32Array, Float64Array];\nfor (ta1 of typedarrays) {\n  for (ta2 of typedarrays) {\n    assert(ta1.prototype.values === ta2.prototype[Symbol.iterator]);\n  }\n\n  assert(ta1.prototype.toString === Array.prototype.toString);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/iterator-prototype.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [];\nvar array_iterator = array[Symbol.iterator]();\nvar array_iterator_prototype = Object.getPrototypeOf (array_iterator);\nvar iterator_prototype = Object.getPrototypeOf (array_iterator_prototype);\nvar iterator_prototype_iterator = iterator_prototype[Symbol.iterator]();\n\nassert (iterator_prototype === iterator_prototype_iterator);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/json-parse-proxy.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Test JSON parse [[delete]] with Array */\nvar badDeleteArray = new Proxy([0], {\n  deleteProperty: function() {\n    throw \"My Super Error A\";\n  }\n});\n\ntry {\n  JSON.parse('[0,0]', function() { this[1] = badDeleteArray; });\n} catch (ex) {\n  assert(ex === \"My Super Error A\");\n}\n\n/* Test JSON parse [[delete]] with Objects */\nvar badDeleteObj = new Proxy([0], {\n  deleteProperty: function() {\n    throw \"My Super Error B\";\n  }\n});\n\ntry {\n  JSON.parse('[0,0]', function() { this[1] = badDeleteObj; });\n} catch (ex) {\n  assert(ex === \"My Super Error B\");\n}\n\n/* Test JSON parse property define with Array */\nvar badDefineArray = new Proxy([null], {\n  defineProperty: function(_, name) {\n    throw \"My Super Error C\";\n  }\n});\n\ntry {\n  JSON.parse('[\"first\", null]', function(_, value) {\n    if (value === 'first') {\n      this[1] = badDefineArray;\n    }\n    return value;\n  });\n} catch (ex) {\n  assert(ex === \"My Super Error C\");\n}\n\n/* Test JSON parse property define with Object */\nvar badDefineObj = new Proxy({0: null}, {\n  defineProperty: function(_, name) {\n    throw \"My Super Error D\";\n  }\n});\n\ntry {\n  JSON.parse('[\"first\", null]', function(_, value) {\n    if (value === 'first') {\n      this[1] = badDefineObj;\n    }\n    return value;\n  });\n} catch (ex) {\n  assert(ex === \"My Super Error D\");\n}\n\n/* Test JSON parse keys call */\nvar badKeys = new Proxy({}, {\n  ownKeys: function() {\n    throw \"My Super Error E\";\n  }\n});\n\ntry {\n  JSON.parse('[0,0]', function() { this[1] = badKeys; });\n} catch (ex) {\n  assert(ex === \"My Super Error E\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/json-stringify.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test with proxy\nassert(JSON.stringify(new Proxy(['foo'], {})) === '[\"foo\"]');\nassert(JSON.stringify(new Proxy({0:\"foo\"}, {})) === '{\"0\":\"foo\"}');\n\nvar target = [1,2,3];\nvar handler = {\n  get(target, prop) {\n    if (prop == \"length\")\n    {\n      throw 42;\n    }\n  }\n}\n\ntry {\n  JSON.stringify(new Proxy(target,handler));\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\nvar revocable = Proxy.revocable (target, { get (t, p , r) {\n  if (p == \"toJSON\") {\n    revocable.revoke();\n  }\n}});\nvar proxy = revocable.proxy;\n\ntry {\n  JSON.stringify(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Checking quoting strings\nassert(JSON.stringify(\"ab𬄕\u001fc\") === '\"ab𬄕\\\\u001fc\"');\nassert(JSON.stringify(\"ab\\uDC01c\u001fd\") === '\"ab\\\\udc01c\\\\u001fd\"');\nassert(JSON.stringify(\"ab\\uDC01c\u001fd\\uD8331e\") === '\"ab\\\\udc01c\\\\u001fd\\\\ud8331e\"');\n\n// Test case where the proxy is already revoked\nvar handle = Proxy.revocable([], {});\nhandle.revoke();\n\ntry {\n  JSON.stringify(handle.proxy);\n  assert(false);\n} catch (ex) {\n  assert(ex instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/json-superset.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(eval(\"'\\u2028'\") === \"\\u2028\");\nassert(eval(\"'\\u2029'\") === \"\\u2029\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/length-property.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar builtin_objects = [\n  Array,\n  ArrayBuffer,\n  Boolean,\n  DataView,\n  Date,\n  Error,\n  EvalError,\n  Function,\n  Map,\n  Number,\n  Object,\n  Promise,\n  RangeError,\n  ReferenceError,\n  RegExp,\n  Set,\n  String,\n  Symbol,\n  SyntaxError,\n  TypeError,\n  URIError,\n  WeakMap,\n  WeakSet,\n];\n\nvar builtin_typedArrays = [\n  Float32Array,\n  Float64Array,\n  Int16Array,\n  Int32Array,\n  Int8Array,\n  Uint16Array,\n  Uint32Array,\n  Uint8Array,\n  Uint8ClampedArray,\n];\n\n\n(function () {\n  /* each length property is configurable */\n  var desc;\n  \n  for (obj of builtin_objects) {\n    desc = Object.getOwnPropertyDescriptor(obj, 'length');                                                                                                                    \n    assert(desc.writable === false);\n    assert(desc.enumerable === false);\n    assert(desc.configurable === true);\n  }\n  \n  for (ta of builtin_typedArrays) {\n    desc = Object.getOwnPropertyDescriptor(ta, 'length');                                                                                                                    \n    assert(desc.writable === false);\n    assert(desc.enumerable === false);\n    assert(desc.configurable === true);\n  }\n})();\n\n(function () {\n  /* each length property can be deleted */\n  for (obj of builtin_objects) {\n    assert(obj.hasOwnProperty('length') === true);\n    assert(delete obj.length);\n    assert(obj.hasOwnProperty('length') === false);\n  }\n\n  for (ta of builtin_typedArrays) {\n    assert(ta.hasOwnProperty('length') === true);\n    assert(delete ta.length);\n    assert(ta.hasOwnProperty('length') === false);\n  }\n})();\n\n(function () {\n  /* test length property of builtin function */\n  for (obj of builtin_objects) {\n    var property_names = Object.getOwnPropertyNames(obj);\n    for (var name of property_names) {\n      if (typeof obj[name] == 'function') {\n        var func = obj[name];\n        var desc = Object.getOwnPropertyDescriptor(func, 'length');\n        assert(desc.writable === false);\n        assert(desc.enumerable === false);\n        assert(desc.configurable === true);\n\n        assert(func.hasOwnProperty('length') === true);\n        assert(delete func.length);\n        assert(func.hasOwnProperty('length') === false);\n      }\n    }\n  }\n})();\n\n(function () {\n  /* test length property of function objects */\n  var normal_func = function () {};\n  var arrow_func = () => {};\n  var bound_func = normal_func.bind({});\n  var nested_bound_func = arrow_func.bind().bind(1);\n\n  var functions = [normal_func, arrow_func, bound_func, nested_bound_func];\n\n  for (func of functions) {\n    var desc = Object.getOwnPropertyDescriptor(func, 'length');\n    assert(desc.writable === false);\n    assert(desc.enumerable === false);\n    assert(desc.configurable === true);\n  }\n\n  for (func of functions) {\n    assert(func.hasOwnProperty('length') === true);\n    assert(delete func.length);\n    assert(func.hasOwnProperty('length') === false);\n  }\n})();\n\n(function() {\n  /* changing the length of f affects the bound function */\n  function f(a,b,c) {}\n  Object.defineProperty(f, \"length\", { value: 30 });\n  var g = f.bind(1,2)\n  assert(g.length === 29);\n})();\n\n(function() {\n  /* changing the length of f does not affect the bound function */\n  function f(a,b,c) {}\n  var g = f.bind(1,2)\n  Object.defineProperty(f, \"length\", { value: 30 });\n  assert(g.length === 2);\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar a = 5;\nvar a = 6;\nlet b = 7;\n\nassert (a === 6);\nassert (this.a === 6);\nassert (b === 7);\nassert (this.b === undefined);\n\n{\n  let c;\n  c = 8;\n\n  {\n    let c = 9;\n    assert (c === 9);\n  }\n\n  {\n    function c() { return 10 }\n    assert (c() === 10);\n  }\n\n  assert (c === 8);\n}\nassert (typeof c === \"undefined\");\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let10.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_reference_error (code)\n{\n  try {\n    eval (code);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n  }\n}\n\ncheck_reference_error (\"let b = a, a;\");\ncheck_reference_error (\"const b = b;\");\ncheck_reference_error (\"a; let b, a;\");\ncheck_reference_error (\"a = 1; let b, a;\");\n\nfunction f() {\n  return x + y.a;\n}\n\ncheck_reference_error (\"x\");\ncheck_reference_error (\"y\");\ncheck_reference_error (\"x = 1\");\ncheck_reference_error (\"y = 1\");\n\nlet x = 6;\nassert (x === 6);\nlet y = { a: 7 };\nassert (y.a === 7);\n\nassert (f() === 13);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let11.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet b = 5;\neval('function b() { return 8; }; assert(b() === 8);');\nassert(b === 5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let12.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction checkSyntax (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\ncheckSyntax (\"if (5) let a;\");\ncheckSyntax (\"if (5) const a;\");\ncheckSyntax (\"if (0) {} else let a;\");\ncheckSyntax (\"if (0) {} else const a;\");\ncheckSyntax (\"while (5) let a;\");\ncheckSyntax (\"while (5) const a;\");\ncheckSyntax (\"do let a; while (5)\");\ncheckSyntax (\"do const a; while (5)\");\ncheckSyntax (\"for (a in b) let c;\");\ncheckSyntax (\"for (a in b) const c;\");\ncheckSyntax (\"for (a of b) let c;\");\ncheckSyntax (\"for (a of b) const c;\");\ncheckSyntax (\"for (;;) let c;\");\ncheckSyntax (\"for (;;) const c;\");\ncheckSyntax (\"with ({}) let c;\");\ncheckSyntax (\"with ({}) const c;\");\ncheckSyntax (\"a: let c;\");\ncheckSyntax (\"a: const c;\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let13.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Declaring let */\n\n/* Note: l\\u0065t is let */\n\nfunction check_syntax_error (code) {\n  try {\n    eval(code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\nfunction check_strict_syntax_error (code) {\n  \"use strict\"\n\n  try {\n    eval(code)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\ncheck_syntax_error(\"let let = 5\")\ncheck_syntax_error(\"const [let] = [1]\")\ncheck_syntax_error(\"const l\\u0065t = 6\")\ncheck_syntax_error(\"let [l\\u0065t] = [2]\")\ncheck_syntax_error(\"l\\\\u0065t a\")\ncheck_strict_syntax_error(\"var let = 5\")\ncheck_strict_syntax_error(\"function let() {}\")\ncheck_strict_syntax_error(\"for (let in []) ;\")\ncheck_strict_syntax_error(\"l\\\\u0065t;\")\n\nvar let = 1\nassert(let === 1)\n\nvar [let] = [2]\nassert(let === 2)\n\nvar x = 0;\nlet = [ () => x = 1 ]\n\nl\\u0065t[0]()\nassert(x === 1)\n\nfunction f1()\n{\n  var a = 0\n\n  function let(l\\u0065t) {\n    a = let\n  }\n\n  let(3)\n\n  assert(a === 3)\n}\nf1()\n\nfunction f2()\n{\n  var let = [1]\n\n  /* First: destructuring pattern definition */\n  let\n  [a] = [2]\n\n  assert(a === 2)\n\n  a = 0\n\n  /* Second: property access */\n  l\\u0065t\n  [a] = [3]\n\n  assert(let[0][0] === 3)\n}\nf2()\n\nvar arr = []\n\nfor (let in [\"x\",\"y\"])\n  arr.push(let)\n\nassert(arr[0] === \"0\")\nassert(arr[1] === \"1\")\n\n/* Let and arrow */\n\nfor (let => 4; false ; ) ;\n\nlet => 5\n\n/* Let label */\nlet: break let\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let14.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() { return 4 }\n\nexit: {\n  assert(f() === 6);\n  break exit;\n  function f() { return 6; }\n}\nassert(f() === 4);\n\n{\n  assert(f() === 6);\n  f = 1;\n  assert(f === 1);\n  function f() { return 6; }\n  f = 2;\n  assert(f === 2);\n}\nassert(f === 1);\n\nfunction g() { return 3 }\nexit: {\n  assert(g() === 5);\n  function g() { return 4; }\n  break exit;\n  function g() { return 5; }\n}\nassert(g() === 5);\n\nfunction h() {\n  try {\n    x;\n    assert(false);\n  } catch (e) {\n    assert(e instanceof ReferenceError);\n  }\n\n  eval(\"exit: { assert(x() === 8); x = 4; break exit; function x() { return 8; } }\");\n  assert(x === undefined);\n}\nh();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let15.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n{\n  try {\n    f()\n    assert(false)\n  } catch (e) {\n    assert(e instanceof ReferenceError)\n  }\n\n  let a = 1;\n\n  try {\n    f()\n    assert(false)\n  } catch (e) {\n    assert(e instanceof ReferenceError)\n  }\n\n  let [b] = [2];\n\n  try {\n    f()\n    assert(false)\n  } catch (e) {\n    assert(e instanceof ReferenceError)\n  }\n\n  const {c} = { c:3 };\n\n  f();\n  function f() { assert(a + b + c === 6) }\n}\n\n{\n  let a = 3;\n  let [b] = [4];\n  const {c} = { c:5 };\n\n  let f = (function () { assert(a + b + c === 12) })\n  f();\n\n  {\n    function g() { assert(a + b + c === 12) }\n    g();\n  }\n}\n\n{\n  class C {}\n\n  assert(function () { return C } () === C);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_syntax_error (code)\n{\n  try {\n    eval (code);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\ncheck_syntax_error (\"let a; let b; let a\");\ncheck_syntax_error (\"let a, b, a\");\ncheck_syntax_error (\"var a; let a;\");\ncheck_syntax_error (\"var a; const a = 3;\");\ncheck_syntax_error (\"let a; var a;\");\ncheck_syntax_error (\"const a = 3; var x, y, a;\");\ncheck_syntax_error (\"const a\");\ncheck_syntax_error (\"{ const a }\");\ncheck_syntax_error (\"const a, b\");\ncheck_syntax_error (\"let a; { let b; { var a; } }\");\ncheck_syntax_error (\"{ { var a = 4; } }; let a = 3\");\ncheck_syntax_error (\"function a() {}; let a;\");\ncheck_syntax_error (\"let a; function a() {};\");\ncheck_syntax_error (\"{ { function a() {}; let a; } }\");\ncheck_syntax_error (\"{ { let a; function a() {}; } }\");\ncheck_syntax_error (\"let a = 1; const b = 5; const a = 2;\");\ncheck_syntax_error (\"try {} catch (e) { let e; }\");\ncheck_syntax_error (\"try {} catch (e) { const e = 1; }\");\ncheck_syntax_error (\"let A; class A {}\");\ncheck_syntax_error (\"const A; class A {}\");\ncheck_syntax_error (\"class A {}; let A\");\ncheck_syntax_error (\"class A {}; const A = 1\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let3.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar g = -1;\n\nfunction f1() {\n  /* Function copied to var. */\n  assert (g === undefined);\n\n  {\n    assert (g() === 1);\n    function g() { return 1 };\n\n    {\n      assert (g() === 2);\n      function g() { return 2 };\n    }\n\n    assert (g() === 1);\n  }\n\n  assert (g() === 2);\n}\nf1();\n\nfunction f2() {\n  /* Function is not copied to var. */\n  'use strict'\n  assert (g === -1);\n\n  {\n    assert (g() === 1);\n    function g() { return 1 };\n\n    {\n      assert (g() === 2);\n      function g() { return 2 };\n    }\n\n    assert (g() === 1);\n  }\n\n  assert (g === -1);\n}\nf2();\n\nfunction f3() {\n  /* Function hoisted as let. */\n  assert (g === -1);\n\n  {\n    let g = 1;\n\n    {\n      if (true)\n      {\n        assert (g() === 2);\n\n        if (true)\n        {\n          assert (g() === 2);\n        }\n\n        function g() { return 2 };\n      }\n\n      assert (g === 1);\n    }\n\n    assert (g === 1);\n  }\n\n  assert (g === -1);\n}\nf3();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let4.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar g = -1;\n\nfunction f1() {\n  /* Function copied to var. */\n  assert (g === undefined);\n\n  {\n    assert (g() === 1);\n    function g() { return 1 };\n\n    {\n      eval(\"assert (g() === 2)\");\n      function g() { return 2 };\n    }\n\n    assert (g() === 1);\n  }\n\n  assert (g() === 2);\n}\nf1();\n\nfunction f2() {\n  /* Function is not copied to var. */\n  'use strict'\n  assert (g === -1);\n\n  {\n    assert (g() === 1);\n    function g() { return 1 };\n\n    {\n      eval(\"assert (g() === 2)\");\n      function g() { return 2 };\n    }\n\n    assert (g() === 1);\n  }\n\n  assert (g === -1);\n}\nf2();\n\nfunction f3() {\n  /* Function hoisted as let. */\n  assert (g === -1);\n\n  {\n    let g = 1;\n\n    {\n      if (true)\n      {\n        assert (g() === 2);\n\n        if (true)\n        {\n          eval(\"assert (g() === 2)\");\n        }\n\n        function g() { return 2 };\n      }\n\n      assert (g === 1);\n    }\n\n    assert (g === 1);\n  }\n\n  assert (g === -1);\n}\nf3();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let5.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet arr = [];\n\nfor (var a = 0; a < 10; a++)\n{\n  let j = a;\n  var f;\n\n  {\n    f = function () { return j; }\n\n    let j = (a & 0x1) ? a + 10 : a + 100;\n  }\n\n  arr[j] = f;\n}\n\nfor (var a = 0; a < 10; a++)\n{\n  assert (arr[a]() == ((a & 0x1) ? a + 10 : a + 100))\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let6.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ntry {\n  let a = 1;\n  eval (\"assert(a === 1)\");\n} catch (e) {\n  assert (false);\n}\n\nassert (typeof a === \"undefined\");\n\ntry {\n  let a = 2;\n  eval (\"assert(a === 2)\");\n\n  assert (typeof b === \"undefined\");\n  throw 3;\n} catch (e) {\n  let b = e;\n  eval (\"assert(b === 3)\");\n\n  assert (typeof a === \"undefined\");\n}\n\nassert (typeof a === \"undefined\");\nassert (typeof b === \"undefined\");\n\ntry {\n  let a = 4;\n  eval (\"assert(a === 4)\");\n\n  assert (typeof b === \"undefined\");\n} finally {\n  let b = 5;\n  eval (\"assert(b === 5)\");\n\n  assert (typeof a === \"undefined\");\n}\n\nassert (typeof a === \"undefined\");\nassert (typeof b === \"undefined\");\n\ntry {\n  let a = 6;\n  eval (\"assert(a === 6)\");\n\n  assert (typeof b === \"undefined\");\n  assert (typeof c === \"undefined\");\n  throw 7;\n} catch (e) {\n  let b = e;\n  eval (\"assert(b === 7)\");\n\n  assert (typeof a === \"undefined\");\n  assert (typeof c === \"undefined\");\n} finally {\n  let c = 8;\n  eval (\"assert(c === 8)\");\n\n  assert (typeof a === \"undefined\");\n  assert (typeof b === \"undefined\");\n}\n\nassert (typeof a === \"undefined\");\nassert (typeof b === \"undefined\");\nassert (typeof c === \"undefined\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let7.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nassert (typeof f === \"undefined\");\n\nfunction g() { return 6; }\n\nswitch (g()) {\ncase f():\n\n  let g = 9;\n\n  assert (g === 9);\n\n  function f() { return 6; }\n  break;\n\ndefault:\n  assert (false);\n}\n\nassert (f() === 6);\n\nswitch (g()) {\ncase f() - 2:\n\n  let g = 9;\n\n  assert ((function() { return g + f(); })() === 17);\n\n  function f() { return 8; }\n  break;\n\ndefault:\n  assert (false);\n}\n\nassert (f() === 8);\n\nswitch (g()) {\ncase g() + 5:\n  {\n    let g = 4;\n    assert (g == 4);\n  }\n  break;\n\ndefault:\n  /* If the declaration is not \"executed\", it has no effect */\n  function g() { return 1; }\n  assert (false);\n}\n\nassert (g() === 6);\n\nswitch (g()) {\ncase g() * 2:\n  {\n    let g = 4;\n    assert (g == 4);\n    eval();\n  }\n\n  function g() { return 3; }\n  break;\n\ndefault:\n  assert (false);\n}\n\nassert (g() === 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let8.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nassert (typeof A === \"undefined\");\n\n{\n  class A {};\n\n  {\n    let A = 6;\n\n    assert (A === 6);\n  }\n\n  assert (typeof A === \"function\");\n}\n\nassert (typeof A === \"undefined\");\n\n{\n  let A = 5;\n  {\n    {\n      class A {};\n\n      assert (typeof A === \"function\");\n    }\n\n    assert (A === 5);\n  }\n}\n\nassert (typeof A === \"undefined\");\n\n{\n  let A = 5;\n  {\n    {\n      class A {};\n\n      eval ('assert (typeof A === \"function\")');\n    }\n\n    eval ('assert (A === 5)');\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/let9.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction f() {\n  try {\n    a;\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n  }\n\n  eval (\"assert (a === undefined); { function a() { return 5; } }\");\n  assert (a() === 5);\n\n  /* Variables created by eval can be deleted. */\n  delete a;\n\n  try {\n    a;\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n  }\n}\nf();\n\nfunction g() {\n  let a = 1;\n\n  eval (\"assert (a === 1);\"\n        + \"{ function a() { return 2; } assert (a() === 2) }\"\n        + \"assert (a === 1);\");\n\n  assert (a === 1);\n}\ng();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/map-iterators.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar methods = ['entries', 'keys', 'values', Symbol.iterator];\n\nmethods.forEach(function (method) {\n  try {\n    Map.prototype[method].call(5);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\nmethods.forEach(function (method) {\n  try {\n    Map.prototype[method].call({});\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\nvar testArray = [{0: '0', 1: 0},\n                 {0: '1', 1: 1},\n                 {0: '2', 1: 2},\n                 {0: '3', 1: 3},\n                 {0: '4', 1: 4},\n                 {0: '5', 1: 5},\n                 {0: '6', 1: 6}];\n\nvar m = new Map(testArray);\n\nmethods.forEach(function(method) {\n  assert(m[method]().toString() === '[object Map Iterator]');\n});\n\nmethods.forEach(function (method) {\n  try {\n    m[method].next.call(5);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\nmethods.forEach(function (method) {\n  try {\n    m[method].next.call({});\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\nvar entryIterators = [m.entries(), m[Symbol.iterator]()];\nvar keyIterator = m.keys();\nvar valueIterator = m.values();\nvar elementCount = m.size;\n\nfor (var i = 0; i < elementCount; i++) {\n  entryIterators.forEach(function(element) {\n    var next = element.next();\n    assert(next.done === false);\n    assert(next.value[0] === '' + i);\n    assert(next.value[1] === i);\n  });\n\n  var next = keyIterator.next();\n  assert(next.done === false);\n  assert(next.value === '' + i);\n\n  var next = valueIterator.next();\n  assert(next.done === false);\n  assert(next.value === i);\n}\n\nentryIterators.forEach(function(element) {\n  var next = element.next();\n  assert(next.done === true);\n  assert(next.value === undefined);\n});\n\nvar next = keyIterator.next();\nassert(next.done === true);\nassert(next.value === undefined);\n\nnext = valueIterator.next();\nassert(next.done === true);\nassert(next.value === undefined);\n\nvar entryIterators = [m.entries(), m[Symbol.iterator]()];\nvar keyIterator = m.keys();\nvar valueIterator = m.values();\nvar elementCount = m.size;\n\nfor (var i = 0; i < elementCount; i++) {\n  entryIterators.forEach(function(element) {\n    var next = element.next();\n    assert(next.done === false);\n    assert(next.value[0] === '' + i);\n    assert(next.value[1] === i);\n  });\n\n  var next = keyIterator.next();\n  assert(next.done === false);\n  assert(next.value === '' + i);\n\n  var next = valueIterator.next();\n  assert(next.done === false);\n  assert(next.value === i);\n  m.delete('' + i);\n}\n\nassert(m.size === 0);\n\nm = new Map(testArray);\nvar loopCount = 0;\nvar expected = [{0: '0', 1: 0},\n                {0: '2', 1: 2},\n                {0: '4', 1: 4},\n                {0: '6', 1: 6},\n                {0: '1', 1: 1},\n                {0: '3', 1: 3},\n                {0: '5', 1: 5}]\n\nm.forEach(function(value, key) {\n  if (loopCount === 0) {\n    for (i = 0; i < testArray.length; i++) {\n      if (i % 2) {\n        m.delete(testArray[i][0]);\n        m.set(testArray[i][0], testArray[i][1]);\n      }\n    }\n  }\n\n  assert (key === expected[loopCount][0]);\n  assert (value === expected[loopCount][1]);\n\n  loopCount++;\n});\n\nassert(loopCount === expected.length);\n\nloopCount = 0;\nexpected = [{0: '0', 1: 0},\n            {0: '1', 1: 1}];\n\nfor (var [key, value] of m) {\n  if (loopCount === 0) {\n    m.clear();\n    m.set('1', 1);\n  }\n\n  assert(key === expected[loopCount][0]);\n  assert(value === expected[loopCount][1]);\n\n  loopCount++;\n}\n\nm = new Map(testArray);\nloopCount = 0;\n\nfor (var [key, value] of m) {\n  if (loopCount === 0) {\n    m.delete('' + testArray.length - 1);\n  }\n\n  assert(key === '' + loopCount);\n  assert(value === loopCount);\n\n  loopCount++;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/map-prototype-foreach.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar map = new Map();\n\n/* Test when the map object keys are strings */\nfor (var i = 0; i < 15; i++) {\n  map.set (\"foo\" + i, i);\n  assert (map.size === i + 1);\n}\n\nvar counter = 0;\n\nmap.forEach (function (value, key) {\n  assert (typeof key === \"string\");\n  assert (key === \"foo\" + counter);\n  assert (typeof value === \"number\");\n  assert (value === counter);\n  counter++;\n});\n\nmap.clear ();\nassert (map.size === 0);\ncounter = 0;\n\n/* Test when the map object keys are numbers */\nfor (var i = 0; i < 15; i++) {\n  map.set (i + 0.5, \"foo\" + i);\n  assert (map.size === i + 1);\n}\n\nmap.forEach (function (value, key) {\n  assert (typeof key === \"number\");\n  assert (key === counter + 0.5);\n  assert (typeof value === \"string\");\n  assert (value === \"foo\" + counter);\n  counter++;\n});\n\nmap.clear ();\nassert (map.size === 0);\ncounter = 0;\n\nvar objectList = [];\n\n/* Test when the map object keys are objects */\nfor (var i = 0; i < 15; i++) {\n  objectList[i] = { index : i };\n  map.set (objectList[i], \"foo\" + i);\n  assert (map.size === i + 1);\n}\n\nmap.forEach (function (value, key) {\n  assert (typeof key === \"object\");\n  assert (key === objectList[counter]);\n  assert (key.index === objectList[counter].index);\n  assert (typeof value === \"string\");\n  assert (value === \"foo\" + counter);\n  counter++;\n});\n\n/* Test when the this argument is not a map object */\ntry {\n  Map.prototype.forEach.call ({});\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n/* Test when the 1st argument is not callable */\ntry {\n  map.forEach (5);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n/* Test when the the callback function throws error */\ntry {\n  map.forEach (function (value, key) {\n    throw new ReferenceError (\"foo\");\n  });\n  assert (false);\n} catch (e) {\n  assert (e instanceof ReferenceError);\n  assert (e.message === \"foo\");\n}\n\n/* Test when the 2nd optional argument is present */\nvar object = {\n  _secret : 42\n}\n\nmap.forEach (function (value, key) {\n  assert (this._secret === 42);\n}, object);\n\n/* Test third argument of callback */\nmap = new Map();\nmap.set('foo', 42);\nmap.set('bar', 84);\n\nmap.forEach(function(value, key, thisArg) {\n  assert (typeof thisArg === \"object\");\n  assert (thisArg === map);\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/map.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar m = new Map();\nassert(m.size == 0);\nassert(m.set(1, 1) === m);\nassert(m.has(1));\nassert(m.size == 1);\n\nassert(m.set(undefined, 123) === m);\nassert(m.size == 2);\nassert(m.has(undefined));\nassert(m.get(undefined) === 123);\n\nassert(m.set(null, 456) === m);\nassert(m.size == 3);\nassert(m.has(null));\nassert(m.get(null) === 456);\n\nassert(m.set(\"strItem\", { x:789 }) === m);\nassert(m.size == 4);\nassert(m.has(\"str\" + \"Item\"));\nassert(m.get(\"st\" + \"rItem\").x === 789);\n\nassert(m.set(12.25, 12.25) === m);\nassert(m.size == 5);\nassert(m.has(12 + (function() { return 0.25 })()));\nassert(m.get(13 - (function() { return 0.75 })()) === 12.25);\n\nassert(m.delete(1))\nassert(m.size == 4);\nassert(!m.has(1));\nassert(m.get(1) === undefined);\n\nassert(!m.delete(2));\n\nassert(m.delete(12 + (function() { return 0.25 })()));\nassert(m.size == 3);\nassert(!m.has(12.25));\nassert(m.get(12.25) === undefined);\n\nassert(m.delete(\"strI\" + \"tem\"))\nassert(m.delete(undefined))\nassert(m.size == 1);\n\nassert(m.delete(null))\nassert(m.size == 0);\n\nm.set(1,1)\nm.set(2,2)\nm.set(3,3)\nm.set(1,7)\nm.set(1,8)\nm.set(2,7)\nm.set(2,8)\nm.set(3,7)\nm.set(3,8)\n\nassert(m.size == 3);\nassert(m.get(1) === 8);\nassert(m.get(2) === 8);\nassert(m.get(3) === 8);\n\nm.set(NaN, \"not a number\");\nassert(m.size === 4);\nassert(m.get(NaN) === \"not a number\");\nassert(m.get(Number(\"foo\")) === \"not a number\")\n\nm.set(0, \"PosZero\");\nassert(m.size === 5);\nm.set(-0, \"NegZero\");\nassert(m.size === 5);\nassert(m.get (0) === \"NegZero\");\nassert(m.get (-0) === \"NegZero\");\n\nvar symbolFoo = Symbol (\"foo\");\nm.set (symbolFoo, \"SymbolFoo\");\nassert(m.size === 6);\nassert(m.get(symbolFoo) === \"SymbolFoo\");\n\nvar object = {};\nm.set (object, \"object\");\nassert(m.size === 7);\nassert(m.get(object) === \"object\");\nassert(m.get({}) === undefined);\n\nvar myObj = { o : 4 };\nm.set(\"foo\", myObj);\nassert(m.size === 8);\nassert(m.get (\"foo\") === myObj);\nassert(m.get (\"foo\").o === 4);\n\nm.clear();\nassert(m.size === 0);\n\nm.set(\"foo\", myObj);\nassert(m.size === 1);\nassert(m.get (\"foo\") === myObj);\nassert(m.get (\"foo\").o === 4);\n\nvar mapNameDesc = Object.getOwnPropertyDescriptor (Map, 'name');\nassert(mapNameDesc.value === \"Map\");\nassert(mapNameDesc.writable === false);\nassert(mapNameDesc.enumerable === false);\nassert(mapNameDesc.configurable === true);\n\nassert(Map.prototype.name === undefined);\n\nm = new Map([{0: \"foo\", 1: 3}, {0 : \"bar\", 1 : 2}]);\n\nassert (m.size === 2);\nassert (m.get(\"foo\") === 3);\nassert (m.get(\"bar\") === 2);\n\nfunction createIterable(arr, methods = {}) {\n  let iterable = function *() {\n    let idx = 0;\n    while (idx < arr.length) {\n      yield arr[idx];\n      idx++;\n    }\n  }();\n  iterable['return'] = methods['return'];\n  iterable['throw'] = methods['throw'];\n\n  return iterable;\n};\n\nvar closed = false;\nvar iter = createIterable([1, 2, 3], {\n  'return': function(){ closed = true; return {}; }\n});\ntry {\n  new Map(iter);\n} catch(e){}\n\nassert(closed === true);\n\nvar map = new Map();\nmap.set(-0, \"foo\");\nvar k;\nmap.forEach(function (value, key) {\n  k = 1 / key;\n});\n\nassert(k === Infinity);\nassert(map.get(+0) === \"foo\");\n\n[Symbol.iterator, Symbol.toStringTag].forEach(e => assert (Reflect.ownKeys(Map.prototype).includes(e)));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-acosh.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar nan = NaN;\nvar p_zero = 0.0;\nvar m_zero = -p_zero;\n\nfunction isSameZero (x, y)\n{\n  return x === 0 && (1 / x) === (1 / y);\n}\n\nassert(isNaN(Math.acosh(NaN)));\nassert(isNaN(Math.acosh(0)));\nassert(isNaN(Math.acosh(Number.NEGATIVE_INFINITY)));\nassert(isSameZero(Math.acosh(1), p_zero));\nassert(Math.acosh(Number.POSITIVE_INFINITY) === Number.POSITIVE_INFINITY);\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-asinh.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar nan = NaN;\nvar p_zero = 0.0;\nvar m_zero = -p_zero;\n\nfunction isSameZero (x, y)\n{\n  return x === 0 && (1 / x) === (1 / y);\n}\n\nassert(isNaN(Math.asinh(NaN)));\nassert(isSameZero(Math.asinh(p_zero), p_zero));\nassert(isSameZero(Math.asinh(m_zero), m_zero));\nassert(Math.asinh(Number.POSITIVE_INFINITY) === Number.POSITIVE_INFINITY);\nassert(Math.asinh(Number.NEGATIVE_INFINITY) === Number.NEGATIVE_INFINITY);\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-atanh.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar nan = NaN;\nvar p_zero = 0.0;\nvar m_zero = -p_zero;\n\nfunction isSameZero (x, y)\n{\n  return x === 0 && (1 / x) === (1 / y);\n}\n\nassert(isNaN(Math.atanh(NaN)));\nassert(isNaN(Math.atanh(2)));\nassert(isNaN(Math.atanh(44)));\nassert(isNaN(Math.atanh(-2)));\nassert(isNaN(Math.atanh(-13)));\nassert(isSameZero(Math.atanh(p_zero), p_zero));\nassert(isSameZero(Math.atanh(m_zero), m_zero));\nassert(Math.atanh(-1) === Number.NEGATIVE_INFINITY);\nassert(Math.atanh(1) === Number.POSITIVE_INFINITY);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-cbrt.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar p_zero = 0.0;\nvar n_zero = -p_zero;\n\nfunction isSameZero (x, y)\n{\n  return x === 0 && (1 / x) === (1 / y);\n}\n\nfunction approxEq (x, y)\n{\n  return Math.abs(x - y) <= Number.EPSILON * 2\n}\n\nassert(isNaN(Math.cbrt(NaN)));\nassert(isSameZero(Math.cbrt(p_zero), p_zero));\nassert(isSameZero(Math.cbrt(n_zero), n_zero));\nassert(Math.cbrt(Number.POSITIVE_INFINITY) === Number.POSITIVE_INFINITY);\nassert(Math.cbrt(Number.NEGATIVE_INFINITY) === Number.NEGATIVE_INFINITY);\n\nassert(Math.cbrt(1.0) === 1.0);\nassert(Math.cbrt(-1.0) === -1.0);\n\nassert(approxEq(Math.cbrt(27.0), 3.0));\nassert(approxEq(Math.cbrt(0.001), 0.1));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-cosh.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar p_zero = 0.0;\nvar n_zero = -p_zero;\n\nassert(isNaN(Math.cosh(NaN)));\nassert(Math.cosh(p_zero) === 1);\nassert(Math.cosh(n_zero) === 1);\nassert(Math.cosh(Number.POSITIVE_INFINITY) === Number.POSITIVE_INFINITY);\nassert(Math.cosh(Number.NEGATIVE_INFINITY) === Number.POSITIVE_INFINITY);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-expm1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar p_zero = 0.0;\nvar n_zero = -p_zero;\n\nfunction isSameZero (x, y)\n{\n  return x === 0 && (1 / x) === (1 / y);\n}\n\nassert(isNaN(Math.expm1(NaN)));\nassert(isSameZero(Math.expm1(p_zero), p_zero));\nassert(isSameZero(Math.expm1(n_zero), n_zero));\nassert(Math.expm1(Number.POSITIVE_INFINITY) === Number.POSITIVE_INFINITY);\nassert(Math.expm1(Number.NEGATIVE_INFINITY) === -1);\nassert(1/Math.expm1(-0) === Number.NEGATIVE_INFINITY)\nassert(1/Math.expm1(0) === Number.POSITIVE_INFINITY)\nassert(Math.expm1(1) <= 1.00000001 * (Math.E - 1));\nassert(Math.expm1(1) >= 0.99999999 * (Math.E - 1));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-functions-tonumber-rule2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = \"\";\nvar a = {valueOf: function() { str += \"a\"; return 1;}};\nvar b = {valueOf: function() { str += \"b\"; return NaN;}};\nvar c = {valueOf: function() { str += \"c\"; return 2;}};\nvar d = {valueOf: function() { str += \"d\"; return Infinity;}};\nvar e = {valueOf: function() { str += \"e\"; return 3;}};\n\nMath.hypot (a, b, c, d, e);\nassert (str === \"abcde\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-log10.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar p_zero = 0.0;\nvar n_zero = -p_zero;\n\nassert(isNaN(Math.log10(NaN)));\nassert(isNaN(Math.log10(-42)));\nassert(isNaN(Math.log10(-3.0)));\nassert(Math.log10(n_zero) === Number.NEGATIVE_INFINITY);\nassert(Math.log10(p_zero) === Number.NEGATIVE_INFINITY);\nassert(Math.log10(1) === p_zero);\nassert(Math.log10(Number.POSITIVE_INFINITY) === Number.POSITIVE_INFINITY);\nassert(Math.log10(10.0) === 1);\nassert(Math.log10(100.0) === 2)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-log1p.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar p_zero = 0.0;\nvar n_zero = -p_zero;\n\nfunction isSameZero (x, y)\n{\n  return x === 0 && (1 / x) === (1 / y);\n}\n\nassert(isNaN(Math.log1p(NaN)));\nassert(isNaN(Math.log1p(-42)));\nassert(isNaN(Math.log1p(-3.0)));\nassert(isSameZero(Math.log1p(n_zero), n_zero));\nassert(isSameZero(Math.log1p(p_zero), p_zero));\nassert(Math.log1p(-1) === Number.NEGATIVE_INFINITY);\nassert(Math.log1p(Number.POSITIVE_INFINITY) === Number.POSITIVE_INFINITY);\nassert(Math.log1p(Math.E - 1) === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-log2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar p_zero = 0.0;\nvar n_zero = -p_zero;\n\nassert(isNaN(Math.log2(NaN)));\nassert(isNaN(Math.log2(-42)));\nassert(isNaN(Math.log2(-3.0)));\nassert(Math.log2(n_zero) === Number.NEGATIVE_INFINITY);\nassert(Math.log2(p_zero) === Number.NEGATIVE_INFINITY);\nassert(Math.log2(1) === p_zero);\nassert(Math.log2(Number.POSITIVE_INFINITY) === Number.POSITIVE_INFINITY);\nassert(Math.log2(2.0) === 1);\nassert(Math.log2(4.0) === 2)\nassert(Math.log2(1024.0) === 10)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-sign.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar nan = NaN;\nvar p_zero = 0.0;\nvar m_zero = -p_zero;\n\nassert (isNaN(Math['sign'](NaN)));\nassert (Math['sign'](p_zero) === p_zero);\nassert (Math['sign'](m_zero) === m_zero);\nassert (Math['sign'](-5) === -1);\nassert (Math['sign'](5) === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-sinh.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar p_zero = 0.0;\nvar n_zero = -p_zero;\n\nfunction isSameZero (x, y)\n{\n  return x === 0 && (1 / x) === (1 / y);\n}\n\nassert(isNaN(Math.sinh(NaN)));\nassert(isSameZero(Math.sinh(p_zero), p_zero));\nassert(isSameZero(Math.sinh(n_zero), n_zero));\nassert(Math.sinh(Number.POSITIVE_INFINITY) === Number.POSITIVE_INFINITY);\nassert(Math.sinh(Number.NEGATIVE_INFINITY) === Number.NEGATIVE_INFINITY);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-tanh.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar p_zero = 0.0;\nvar n_zero = -p_zero;\n\nfunction isSameZero (x, y)\n{\n  return x === 0 && (1 / x) === (1 / y);\n}\n\nassert(isNaN(Math.tanh(NaN)));\nassert(isSameZero(Math.tanh(p_zero), p_zero));\nassert(isSameZero(Math.tanh(n_zero), n_zero));\nassert(Math.tanh(Number.POSITIVE_INFINITY) === 1);\nassert(Math.tanh(Number.NEGATIVE_INFINITY) === -1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/math-trunc.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar nan = NaN;\nvar p_zero = 0.0;\nvar m_zero = -p_zero;\nvar p_inf = Infinity;\nvar m_inf = -p_inf;\n\nfunction isSameZero (x, y)\n{\n  return x === 0 && (1 / x) === (1 / y);\n}\n\nassert (isNaN(Math['trunc'](NaN)));\nassert (isSameZero (Math['trunc'](p_zero), p_zero));\nassert (isSameZero (Math['trunc'](m_zero), m_zero));\nassert (Math['trunc'](p_inf) === p_inf);\nassert (Math['trunc'](m_inf) === m_inf);\nassert (isSameZero (Math['trunc'](0.5), p_zero));\nassert (isSameZero (Math['trunc'](-0.5), m_zero));\nassert (Math['trunc'](1.2) === 1);\nassert (Math['trunc'](-1.5) === -1);\nassert (Math['trunc'](65.7) === 65);\nassert (Math['trunc'](-24.9) === -24);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-01.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport {};\nexport {a as aa,};\nexport {b as bb, c as cc};\nexport {d};\nexport var x = 40;\nexport function f(a) {return a;} x++; /* test auto semicolon insertion */\nexport class Dog {\n  constructor (name) {\n    this.name = name;\n  }\n\n  speak() {\n    return this.name + \" barks.\"\n  }\n} x++; /* test auto semicolon insertion */\nexport default \"default\";\n\nvar a = \"a\";\nvar b = 5;\nvar c = function(a) { return 2 * a;}\nvar d = [1,2,3];\n\nassert (x === 42);\nassert (f(1) === 1);\nvar dog = new Dog(\"Pluto\")\nassert(dog.speak() === \"Pluto barks.\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-02.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport {} from \"module-export-01.mjs\";\nexport {aa,} from \"module-export-01.mjs\";\nexport {bb as b_, cc as c_} from \"module-export-01.mjs\";\nexport * from \"module-export-01.mjs\";\nexport default function () {return \"default\"};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-03.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default class {\n  constructor(num) {\n    this.num = num\n  }\n\n  incr() {\n    return ++(this.num);\n  }\n}\n\nexport * from \"module-export-02.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-04.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport var x = 41\nexport default a = \"str\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-05.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"module-export-01.mjs\";\nexport * from \"module-export-04.mjs\";\nexport default a = \"str\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-06.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport {}\nexport {} from \"module-export-01.mjs\";\nexport {};\nexport {} from \"module-export-04.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-07.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar y, z;\nexport default x = y = z = \"default\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-08.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./module-export-04.mjs\";\nexport let c = 5;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-1.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlet counter = 0.1;\nexport default function* g() { return \"foo1\"; } counter++; /* test auto semicolon insertion */\nexport {counter};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-2.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlet counter = 1.1;\nexport default async function* g() { return \"foo2\"; } counter++; /* test auto semicolon insertion */\nexport {counter};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-3.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlet counter = 2.1;\nexport default async function g() { return \"foo3\"; } counter++; /* test auto semicolon insertion */\nexport {counter};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-4.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar async = \"foo4\";\n\nexport default async;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-5.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport default _ => \"foo5\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-6.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport default async _ => \"foo6\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-7.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport default async (a, b) => a + b;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-8.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlet counter = 7.1;\nexport default class A { static x = \"foo8\" } counter++; /* test auto semicolon insertion */\nexport {counter};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-9.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlet counter = 8.1;\nexport default class { static x = \"foo9\" } counter++; /* test auto semicolon insertion */\nexport {counter};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-default-main.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport foo1, { counter as bar1 } from \"./module-export-default-1.mjs\"\nimport foo2, { counter as bar2 } from \"./module-export-default-2.mjs\"\nimport foo3, { counter as bar3 } from \"./module-export-default-3.mjs\"\nimport foo4 from \"./module-export-default-4.mjs\"\nimport foo5 from \"./module-export-default-5.mjs\"\nimport foo6 from \"./module-export-default-6.mjs\"\nimport foo7 from \"./module-export-default-7.mjs\"\nimport foo8, { counter as bar8 } from \"./module-export-default-8.mjs\"\nimport foo9, { counter as bar9 } from \"./module-export-default-9.mjs\"\n\nlet async_queue_expected = [\"foo2\", \"foo3\", \"foo6\", \"foo7\"];\nlet async_queue = [];\n\n(function() {\n  assert(foo1().next().value === \"foo1\");\n  assert(bar1 === 1.1);\n})();\n\n(async function() {\n  async_queue.push((await foo2().next()).value);\n  assert(bar2 === 2.1);\n})();\n\n(async function() {\n  async_queue.push(await foo3());\n  assert(bar3 === 3.1);\n})();\n\n(function() {\n  assert(foo4 === \"foo4\");\n})();\n\n(function() {\n  assert(foo5() === \"foo5\");\n})();\n\n(async function() {\n  async_queue.push(await foo6());\n})();\n\n(async function() {\n  async_queue.push(await foo7(\"foo\", \"7\"));\n})();\n\n(function() {\n  assert(foo8.x === \"foo8\");\n  assert(bar8 === 8.1);\n})();\n\n(function() {\n  assert(foo9.x === \"foo9\");\n  assert(bar9 === 9.1);\n})();\n\nArray.prototype.assertArrayEqual = function(expected) {\n  assert(this.length === expected.length);\n  print(this);\n  print(expected);\n\n  for (var i = 0; i < this.length; i++) {\n    assert(this[i] === expected[i]);\n  }\n}\n\nlet global = new Function('return this;')();\n\nglobal.__checkAsync = function() {\n  async_queue.assertArrayEqual(async_queue_expected);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-export-fail-test.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This module is imported by failing tests. */\nexport let a;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-import-01.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport \"./module-export-01.mjs\";\nimport def from \"module-export-01.mjs\";\nimport {} from \"module-export-01.mjs\";\nimport {aa as a,} from \"module-export-01.mjs\";\nimport {bb as b, cc as c} from \"module-export-01.mjs\";\nimport {x} from \"module-export-01.mjs\";\nimport * as mod from \"module-export-01.mjs\";\n\nassert (def === \"default\");\nassert (a === \"a\");\nassert (b === 5);\nassert (c(b) === 10);\nassert (Array.isArray(mod.d))\nassert (x === 42)\nassert (mod.f(\"str\") === \"str\")\n\nvar dog = new mod.Dog(\"Oddie\")\nassert (dog.speak() === \"Oddie barks.\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-import-02.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport def, * as mod from \"module-export-02.mjs\";\nimport {b_, c_,} from \"module-export-02.mjs\";\n\nassert (def() === \"default\")\nassert (mod.aa === \"a\")\nassert (b_ === 5)\nassert (c_(b_) === 10)\nassert (mod.x === 42)\nassert (Array.isArray(mod.d))\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-import-03.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport incrementer, {aa, c_, x,} from \"module-export-03.mjs\"\nvar i = new incrementer(3);\nassert(i.incr() === 4);\nassert(i.incr() === 5);\nassert(i.incr() === 6);\n\nassert (aa === \"a\");\nassert (x === 42);\nassert (c_(x) == 84);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-import-04.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport \"module-import-01.mjs\";\nimport \"module-export-05.mjs\";\nimport \"module-export-06.mjs\";\nimport \"module-export-07.mjs\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-import-05.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as f from \"./module-export-08.mjs\";\n\nassert (f.c === 5)\nassert (f.x === 41)\nassert (!Object.hasOwnProperty(f, \"default\"));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-resource-name-export.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport function getName() {\n  return resourceName();\n}\n\nexport function getNamePromise(collector) {\n  return new Promise((resolve) => { collector[\"start\"] = resourceName(); resolve(); })\n    .then(() => { collector[\"middle\"] = resourceName(); });\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/module-resource-name.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { getName, getNamePromise } from \"./module-resource-name-export.mjs\"\n\nassert(getName().endsWith(\"module-resource-name-export.mjs\"));\n\nvar collector = {};\ngetNamePromise(collector).then(() => { collector[\"end\"] = resourceName(); });\n\nfunction __checkAsync() {\n  assert(collector[\"start\"].endsWith(\"module-resource-name-export.mjs\"));\n  assert(collector[\"middle\"].endsWith(\"module-resource-name-export.mjs\"));\n  assert(collector[\"end\"].endsWith(\"module-resource-name.mjs\"));\n  assert(Object.keys(collector).length === 3);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-async.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nasync function async_method () {\n    assert (new.target === undefined);\n}\n\nasync_method ();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-class.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass Simple {\n  constructor () {\n    assert (new.target === Simple);\n    this.called = 0;\n  }\n\n  get getter () {\n    this.called++;\n    return new.target;\n  }\n\n  set setter (val) {\n    assert (new.target === undefined);\n    this.called++;\n  }\n}\n\nvar smp = new Simple ();\nassert (smp.getter === undefined);\nassert (smp.called === 1);\nsmp.setter = -1;\nassert (smp.called === 2);\n\nclass BaseA {\n  constructor () {\n    assert (new.target === SubA);\n  }\n}\n\nclass SubA extends BaseA {\n  constructor () {\n    super ();\n    assert (new.target === SubA);\n  }\n}\n\nnew SubA ();\n\n/* TODO: enable if there is class name support. */\n/*\nclass Named {\n  constructor () {\n    assert(new.target.name == \"Named\");\n  }\n}\n\nnew Named ();\n*/\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-error.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction F (){}\nvar obj = Reflect.construct (Error, [], F);\nobj[2] = 'foo';\nassert (obj instanceof F);\n\ntry {\n  Reflect.construct (Error, [-1], F);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\nvar o = new Proxy (function f () {}, { get (t,p,r) { if (p == \"prototype\") { throw \"34\" } Reflect.get (...arguments) }})\n\ntry {\n  Reflect.construct (Error, [], o)\n} catch (e) {\n  assert (e === \"34\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-for-boolean.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Reflect.construct (Boolean, true);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.construct (Boolean, false);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nclass MyBoolean extends Boolean {};\nvar b1= new MyBoolean();\nassert(Object.getPrototypeOf(b1) == MyBoolean.prototype)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-for-containers.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar o = new Proxy (function f () {}, { get(t,p,r) { if (p == \"prototype\") { throw 42.1 } Reflect.get(...arguments) }})\n\ntry {\n  Reflect.construct (Map, [], o);\n  assert (false);\n} catch (e) {\n  assert(e == 42.1)\n}\n\ntry {\n  Reflect.construct (Set, [], o);\n  assert (false);\n} catch (e) {\n  assert(e == 42.1)\n}\n\ntry {\n  Reflect.construct (WeakMap, [], o);\n  assert (false);\n} catch (e) {\n  assert(e == 42.1)\n}\n\ntry {\n  Reflect.construct (WeakSet, [], o);\n  assert (false);\n} catch (e) {\n  assert(e == 42.1)\n}\n\ntry {\n  Reflect.construct (Map);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.construct (Set);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.construct (WeakMap);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.construct (WeakSet);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nclass MyMap extends Map {};\nclass MySet extends Set {};\nclass MyWeakMap extends WeakMap {};\nclass MyWeakSet extends WeakSet {};\nvar m1= new MyMap();\nvar s1= new MySet();\nvar wm1= new MyWeakMap();\nvar ws1= new MyWeakSet();\n\nassert(Object.getPrototypeOf(m1) == MyMap.prototype)\nassert(Object.getPrototypeOf(s1) == MySet.prototype)\nassert(Object.getPrototypeOf(wm1) == MyWeakMap.prototype)\nassert(Object.getPrototypeOf(ws1) == MyWeakSet.prototype)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-for-dataview.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n//\nvar buffer = new ArrayBuffer (16);\ntry {\n Reflect.construct (DataView, [buffer], 4, 13);\n assert (false);\n} catch (e) {\n assert (e instanceof TypeError);\n}\n\ntry {\n Reflect.construct (DataView, [buffer], 1);\n assert (false);\n} catch (e) {\n assert (e instanceof TypeError);\n}\nclass MyDataView extends DataView {};\nvar d1 = new MyDataView(buffer);\n\nassert(Object.getPrototypeOf(d1) == MyDataView.prototype)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-for-date-object.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\ntry {\n Reflect.construct (Date,);\n assert (false);\n} catch (e) {\n assert (e instanceof TypeError);\n}\n\ntry {\n Reflect.construct (Date, \"2015-01-01\");\n assert (false);\n} catch (e) {\n assert (e instanceof TypeError);\n}\n\ntry {\n Reflect.construct (Date, 1420070400000);\n assert (false);\n} catch (e) {\n assert (e instanceof TypeError);\n}\n\nclass MyDate extends Date {};\nvar d1= new MyDate();\n\nassert(Object.getPrototypeOf(d1) == MyDate.prototype)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-for-number.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Reflect.construct (Number);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.construct (Number, 1);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nclass MyNumber extends Number {};\nvar n1= new MyNumber();\n\nassert(Object.getPrototypeOf(n1) == MyNumber.prototype)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-for-string.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n try {\n  Reflect.construct (String, \"\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.construct (String, \"randomText\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nclass MyString extends String {};\nvar s1= new MyString();\n\nassert(Object.getPrototypeOf(s1) == MyString.prototype)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-for-typedarray-and-arraybuffer.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass MyInt32Array extends Int32Array {};\nvar t1= new MyInt32Array([1,2]);\n\nassert(Object.getPrototypeOf(t1) == MyInt32Array.prototype)\n\n\nclass MyArrayBuffer extends ArrayBuffer {};\nvar t2= new MyArrayBuffer(8);\n\nassert(Object.getPrototypeOf(t2) == MyArrayBuffer.prototype)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target-generator.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction *demo_gen () {\n    for (var idx = 0; idx < 3; idx++)\n    {\n      assert (new.target === undefined);\n      yield idx;\n      assert (new.target === undefined);\n    }\n}\n\nvar gen = demo_gen ();\n\nvar value = 0;\nfor (var item of gen)\n{\n  value = item;\n}\n\nassert (value === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/new-target.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction null_target () {\n  assert (new.target === undefined);\n}\n\nfunction demo () {\n  null_target ();\n  return new.target;\n}\n\nassert (demo () === undefined);\nassert ((new demo ()) === demo);\n\n/* new.target is only valid inside functions */\ntry {\n  eval (\"new.target\");\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof SyntaxError);\n}\n\ntry {\n  var eval_other = eval;\n  eval_other (\"new.target\");\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof SyntaxError);\n}\n\n/* test with arrow function */\nvar arrow_called = false;\nfunction arrow () {\n    assert (new.target === arrow);\n    var mth = () => { return new.target; }\n    assert (mth () === arrow);\n    arrow_called = true;\n}\n\nnew arrow ();\nassert (arrow_called === true);\n\n/* test unary operation */\nvar f_called = false;\nfunction f () {\n  assert (isNaN (-new.target));\n  f_called = true;\n}\n\nnew f ();\nassert (f_called === true);\n\n/* test property access */\nfunction fg (callback_object) {\n  callback_object.value = new.target.value;\n}\n\nfg.value = 22;\n\nvar test_obj = {};\nnew fg (test_obj);\n\nassert (test_obj.value === 22);\n\n\n/* test new.target with eval */\nfunction eval_test () {\n  var target = eval (\"new.target\");\n  assert (target === eval_test);\n}\n\nnew eval_test ();\n\nfunction eval_eval_test () {\n  var target = eval ('eval(\"new.target\")');\n  assert (target === eval_eval_test);\n}\n\nnew eval_eval_test ();\n\n/* new.target is only valid in direct eval */\nfunction eval_test_2 () {\n  var ev = eval;\n  try {\n    ev (\"new.target\");\n    assert (false);\n  } catch (ex) {\n    assert (ex instanceof SyntaxError);\n  }\n}\n\nnew eval_test_2 ();\n\nfunction eval_test_3 () {\n  var ev = eval;\n  try {\n    eval (\"ev ('new.target')\");\n    assert (false);\n  } catch (ex) {\n    assert (ex instanceof SyntaxError);\n  }\n}\n\nnew eval_test_3 ();\n\n/* test assignment of the \"new.target\" */\nfunction expect_syntax_error (src)\n{\n  try {\n    eval (src);\n    assert (false);\n  } catch (ex) {\n    assert (ex instanceof SyntaxError);\n  }\n}\n\nexpect_syntax_error (\"function assign () { new.target = 3; }\");\nexpect_syntax_error (\"function assign () { new.target += 3; }\");\nexpect_syntax_error (\"function assign () { new.target *= 3; }\");\nexpect_syntax_error (\"function assign () { new.target -= 3; }\");\nexpect_syntax_error (\"function assign () { new.target |= 3; }\");\nexpect_syntax_error (\"function assign () { new.target &= 3; }\");\n\nexpect_syntax_error (\"function assign () { new.target++; }\");\nexpect_syntax_error (\"function assign () { ++new.target; }\");\nexpect_syntax_error (\"function assign () { new.target--; }\");\nexpect_syntax_error (\"function assign () { --new.target; }\");\n\nexpect_syntax_error (\"function synt () { new....target; }\");\n\nfunction delete_test () {\n  assert ((delete new.target) === true);\n}\n\nnew delete_test ();\n\nfunction binary_test_1 () {\n    /*/ new.target is converted to string */\n    assert ((new.target + 1) === \"function(){/* ecmascript */}1\");\n}\nfunction binary_test_2 () { assert (isNaN (new.target - 3)); }\nfunction binary_test_3 () { assert (isNaN (new.target * 2)); }\nfunction binary_test_4 () { assert (isNaN (new.target / 4)); }\n\nnew binary_test_1 ();\nnew binary_test_2 ();\nnew binary_test_3 ();\nnew binary_test_4 ();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/nullish-coalescing.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//basic valid cases with logical operator\nassert((1 ?? 2) == 1)\nassert((0 ?? 2) == 0)\nassert(null ?? 2 == 2)\nassert(null ?? undefined == undefined)\nassert(null ?? undefined ?? 2 == 2)\nassert(null ?? undefined ?? null ?? 10  == 10)\nassert(null ?? (undefined || null) ?? 10  == 10)\nassert(null ?? (undefined && null) ?? 10  == 10)\nassert((null ?? true) && (true ?? null) == true)\n\n//cannot evulate the right expression if left is not null or undefined\nfunction poison () {\n  throw 23;\n}\nassert(true ?? poison ())\nassert(null ?? null ?? true ?? poison ())\n\nfunction checkSyntax (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\n// invalid use cases\nvar headNullish1 = \"(null ?? null || null )\";\nvar headNullish2 = \"(null ?? null && null )\";\nvar tailNullish1 = \"(null || null ?? null )\";\nvar tailNullish2 = \"(null || null ?? null )\";\n\ncheckSyntax (headNullish1);\ncheckSyntax (headNullish2);\ncheckSyntax (tailNullish1);\ncheckSyntax (tailNullish2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/number-constants.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//This test will not pass on FLOAT32 due to precision issues\n\nassert(Number.MAX_SAFE_INTEGER === 9007199254740991);\nassert(Number.MIN_SAFE_INTEGER === -9007199254740991);\nassert(Number.EPSILON === 2.2204460492503130808472633361816e-16);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/number-isfinite.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Number['isFinite'] (Infinity) === false);\nassert(Number['isFinite'] (-Infinity) === false);\nassert(Number['isFinite'] (NaN) === false);\nassert(Number['isFinite'] (0) === true);\nassert(Number['isFinite'] (2e64) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/number-isinteger.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Number['isInteger'] ('valami') === false);\nassert(Number['isInteger'] (NaN) === false);\nassert(Number['isInteger'] (Infinity) === false);\nassert(Number['isInteger'] (-Infinity) === false);\nassert(Number['isInteger'] (3.5) === false);\nassert(Number['isInteger'] (-100000) === true);\nassert(Number['isInteger'] (5.0000000000000001) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/number-isnan.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Number['isNaN'] ('valami') === false);\nassert(Number['isNaN'] (NaN) === true);\nassert(Number['isNaN'] (1) === false);\nassert(Number['isNaN'] (Number.NaN) === true);\nassert(Number['isNaN'] (0 / 0) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/number-issafeinteger.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Number['isSafeInteger'] (Math.pow(2, 53)) === false);\nassert(Number['isSafeInteger'] (Math.pow(2, 53) - 1) === true);\nassert(Number['isSafeInteger'] (NaN) === false);\nassert(Number['isSafeInteger'] (-3.0) === true);\nassert(Number['isSafeInteger'] (Infinity) === false);\nassert(Number['isSafeInteger'] (3.5) === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/number-methods.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (Number.parseInt ('18528769') === 18528769);\nassert (Number.parseFloat ('1.2e3') === 1.2e3);\nassert (parseInt ('18528769') === 18528769);\nassert (parseFloat ('1.2e3') === 1.2e3);\n\nassert(Number.parseInt === parseInt);\n\nassert(Number.parseFloat === parseFloat);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/numeric-separator.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\n// few valid numeric separators\nassert (1_1 == 11)\nassert (0x11_11 == 4369)\nassert (0b11_11 == 15)\nassert (0o11_11 == 585)\nassert (1_1n == 11n)\nassert (100_001.11_00 == 100001.11)\nassert (0x11_11n == 4369n)\n\n// checker functions\n\nfunction invalid_numeric_separator (expression)\n{\n  try {\n    var a = eval (expression)\n    assert (false)\n  } catch (e) {\n    assert (true)\n  }\n}\n\n// few invalid numeric separators\ninvalid_numeric_separator (\"_1_1\")\ninvalid_numeric_separator (\"1__1\")\ninvalid_numeric_separator (\"1_1_n\")\ninvalid_numeric_separator (\"1_1n_\")\ninvalid_numeric_separator (\"0b_11\")\ninvalid_numeric_separator (\"0x_11\")\ninvalid_numeric_separator (\"0o_11\")\ninvalid_numeric_separator (\"0_0.123\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-assign.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar object1 = {\n  a: 1,\n  b: 2,\n  c: 3\n};\n\nvar object2 = Object.assign ({c: 4, d: 5}, object1);\n\nassert (JSON.stringify (object2) === '{\"c\":3,\"d\":5,\"a\":1,\"b\":2}');\nassert (object2.c === 3);\nassert (object2.d === 5);\n\n// Cloning an object\nvar obj = { a: 1 };\nvar copy = Object.assign ({}, obj);\nassert (JSON.stringify (copy) === '{\"a\":1}'); // { a: 1 }\n\n// Warning for Deep Clone\nfunction deepClone() {\n  'use strict';\n\n  var obj1 = { a: 0 , b: { c: 0}};\n  var obj2 = Object.assign ({}, obj1);\n  assert (JSON.stringify (obj2) === '{\"a\":0,\"b\":{\"c\":0}}');\n\n  obj1.a = 1;\n  assert (JSON.stringify (obj1) === '{\"a\":1,\"b\":{\"c\":0}}');\n  assert (JSON.stringify (obj2) === '{\"a\":0,\"b\":{\"c\":0}}');\n\n  obj2.a = 2;\n  assert (JSON.stringify (obj1) === '{\"a\":1,\"b\":{\"c\":0}}');\n  assert (JSON.stringify (obj2) === '{\"a\":2,\"b\":{\"c\":0}}');\n\n  obj2.b.c = 3;\n  assert (JSON.stringify (obj1) === '{\"a\":1,\"b\":{\"c\":3}}');\n  assert (JSON.stringify (obj2) === '{\"a\":2,\"b\":{\"c\":3}}');\n\n  // Deep Clone\n  obj1 = { a: 0 , b: { c: 0}};\n  var obj3 = JSON.parse (JSON.stringify (obj1));\n  obj1.a = 4;\n  obj1.b.c = 4;\n  assert (JSON.stringify (obj3) === '{\"a\":0,\"b\":{\"c\":0}}');\n}\n\ndeepClone();\n\n// Merging objects\nvar o1 = { a: 1 };\nvar o2 = { b: 2 };\nvar o3 = { c: 3 };\n\nvar obj = Object.assign (o1, o2, o3);\nassert (JSON.stringify (obj) === '{\"a\":1,\"b\":2,\"c\":3}');\nassert (JSON.stringify (o1) === '{\"a\":1,\"b\":2,\"c\":3}');  //target object itself is changed.\n\n//Merging objects with same properties\nvar o1 = { a: 1, b: 1, c: 1 };\nvar o2 = { b: 2, c: 2 };\nvar o3 = { c: 3 };\n\nvar obj = Object.assign ({}, o1, o2, o3);\nassert (JSON.stringify (obj) === '{\"a\":1,\"b\":2,\"c\":3}');\n\n// Properties on the prototype chain and non-enumerable properties cannot be copied\nvar obj = Object.create({ foo: 1 }, { // foo is on obj's prototype chain.\n  bar: {\n    value: 2  // bar is a non-enumerable property.\n  },\n  baz: {\n    value: 3,\n    enumerable: true  // baz is an own enumerable property.\n  }\n});\n\nvar copy = Object.assign ({}, obj);\nassert (JSON.stringify (copy) === '{\"baz\":3}');\n\n// Primitives will be wrapped to objects\nvar v1 = 'abc';\nvar v2 = true;\nvar v3 = 10;\n\nvar obj = Object.assign ({}, v1, null, v2, undefined, v3);\n// Primitives will be wrapped, null and undefined will be ignored.\n// Note, only string wrappers can have own enumerable properties.\nassert (JSON.stringify (obj) === '{\"0\":\"a\",\"1\":\"b\",\"2\":\"c\"}');\n\n//Exceptions will interrupt the ongoing copying task\nvar target = Object.defineProperty ({}, 'foo', {\n  value: 1,\n  writable: false\n}); // target.foo is a read-only property\n\ntry {\n  // TypeError: \"foo\" is read-only,the Exception is thrown when assigning target.foo\n  Object.assign (target, { bar: 2 }, { foo2: 3, foo: 3, foo3: 3 }, { baz: 4 });\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (target.bar === 2);  // the first source was copied successfully.\nassert (target.foo2 === 3); // the first property of the second source was copied successfully.\nassert (target.foo === 1);  // exception is thrown here.\nassert (target.foo3 === undefined); // assign method has finished, foo3 will not be copied.\nassert (target.baz === undefined);  // the third source will not be copied either.\n\n// Copying accessors\nvar obj = {\n  foo: 1,\n  get bar() {\n    return 2;\n  }\n};\n\nvar copy = Object.assign ({}, obj);\nassert (JSON.stringify (copy) === '{\"foo\":1,\"bar\":2}');\nassert (copy.bar === 2); // the value of copy.bar is obj.bar's getter's return value.\n\n// This is an assign function that copies full descriptors\nfunction completeAssign (target, sources) {\n  sources.forEach (source => {\n    var descriptors = Object.keys (source).reduce ((descriptors, key) => {\n      descriptors[key] = Object.getOwnPropertyDescriptor (source, key);\n      return descriptors;\n    }, {});\n\n    Object.defineProperties (target, descriptors);\n  });\n  return target;\n}\n\nvar copy = completeAssign ({}, [obj]);\nassert (JSON.stringify (copy) === '{\"foo\":1,\"bar\":2}');\nassert (copy.bar === 2);\n\n// Test when target is not coercible to object\ntry {\n  Object.assign.call (undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError)\n}\n\nvar asd = Symbol (\"asd\");\nvar foo = Symbol (\"foo\");\nvar bar = Symbol (\"bar\");\nvar obj = {1: 5, \"a\": 6, [foo]: 7, [asd]: 8, [bar]: 9};\nvar result = Object.assign ({}, obj);\nassert (result[foo] == 7);\nassert (result[asd] == 8);\nassert (result[bar] == 9);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-computed-prescanner.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction member_str() {\n  return \"member\";\n}\n\nswitch (true) {\ndefault:\n  var obj = {\n    [\"val\" + \"ue\"]: 0,\n    set[member_str()](x) {\n      // Multiple statements.\n      this.value = x + 4;\n      this.value += 2;\n    },\n    get[member_str() ? member_str() : \"\"]() {\n      // Multiple statements.\n      this.value = this.value + 1;\n      return this.value;\n    },\n    get\n      [1 + 2]\n      ()\n    {\n      return 3;\n    },\n    [false ? member_str()\n           : \"\"]\n     :8\n  }\n}\n\nobj[\"member\"] = 10;\nassert(obj.member === 17);\nassert(obj.member === 18);\n\nassert(obj[3] === 3);\nassert(obj[\"3\"] === 3);\n\nassert(obj[\"\"] === 8);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-computed.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Test object literals. */\n\nvar local = 0;\n\nfunction f(x)\n{\n  return x + \"et\";\n}\n\nvar o = {\n  a: 5,\n  [\n    \"pr\" +\n    \"op\"]  : 6,\n\n  [f\n   (\"g\")\n   ]\n   : 7,\n\n  [f(\n   \"s\"\n   )  ]: 8,\n\n  get    [f\n    (\"res\")\n    ]\n    () { return 9 },\n\n  set\n  [f(\"res\")](\n   value) { local = value },\n};\n\nassert(o.a === 5);\nassert(o.prop === 6);\nassert(o.get === 7);\nassert(o.set === 8);\n\nlocal = 0;\no.reset = 10;\nassert(local === 10);\nassert(o.reset === 9);\n\n/* Test classes. */\n\nfunction fxy() {\n  return \"xy\";\n}\n\nclass C {\n  [fxy()] () {\n    return 6;\n  }\n\n  static [fxy()]() {\n    return 7;\n  }\n\n  get [\"a\" + 1]() {\n    return 8;\n  }\n\n  set [\"a\" + 1](x) {\n    local = x;\n  }\n\n  static get [\"a\" + 1]() {\n    return 10;\n  }\n\n  static set [\"a\" + 1](x) {\n    local = x;\n  }\n};\n\nvar c = new C;\nassert(c.xy() === 6);\nassert(C.xy() === 7);\n\nlocal = 0;\nc.a1 = 9;\nassert(local === 9);\nassert(c.a1 === 8);\n\nlocal = 0;\nC.a1 = 11;\nassert(local === 11);\nassert(C.a1 === 10);\n\nclass D {\n  [(() => \"const\" + \"ructor\")()] (arg) {\n    this.a = arg;\n  }\n}\n\nvar d = new D;\nassert(d.a === undefined);\nd.constructor(7);\nassert(d.a === 7);\n\nclass E {\n  get [\"_constructor_\".substring(1,12)]() {\n    return this.a;\n  }\n}\n\nvar e = new E;\nassert(e.constructor === undefined);\ne.a = 8;\nassert(e.constructor === 8);\n\nfunction throw_error(snippet)\n{\n  try {\n    eval(snippet);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n}\n\nthrow_error(\"new class { static ['proto' + 'type'] () {} }\");\nthrow_error(\"new class { static get ['proto' + 'type'] () {} }\");\nthrow_error(\"new class { static set ['proto' + 'type'] (x) {} }\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-copy-data.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction checkOwnProperties(obj, propList)\n{\n  names = Object.getOwnPropertyNames(obj)\n  assert(names.length === propList.length)\n\n  for (var i = 0; i < propList.length; ++i)\n  {\n    assert(names[i] === propList[i])\n\n    var descriptor = Object.getOwnPropertyDescriptor(obj, names[i])\n    assert(descriptor.writable == true && descriptor.get === undefined && descriptor.set === undefined);\n  }\n}\n\nvar o = {...\"a\" + \"bc\"}\n\nassert(o[0] === \"a\")\nassert(o[1] === \"b\")\nassert(o[2] === \"c\")\ncheckOwnProperties(o, [\"0\", \"1\", \"2\"])\n\ns = { a:3.5, b() {}, get c() { return \"Prop\" } }\no = {...null, ...undefined, ...s}\n\nassert(o.a === 3.5)\nassert(o.b === s.b)\nassert(o.c === \"Prop\")\ncheckOwnProperties(o, [\"a\", \"b\", \"c\"])\n\ns = { a:\"X\", b:-1.25, c:\"Str\" }\no = { get a() {}, set b(v) {}, ...s, c() { return 1 }}\n\nassert(o.a === \"X\")\nassert(o.b === -1.25)\nassert(o.c() === 1)\ncheckOwnProperties(o, [\"a\", \"b\", \"c\"])\n\ns = { p1:[1,2], \"(a)\":\"Msg\" }\nObject.defineProperty(s, 'nonEnumerable', { value: 8.75, writable: true, enumerable:false });\nassert(s.nonEnumerable === 8.75)\n\no = { ...s, \"p!\":5, ...s, ...s }\nassert(o.p1 === s.p1)\nassert(o[\"(a)\"] === \"Msg\")\nassert(o[\"p!\"] === 5)\ncheckOwnProperties(o, [\"p1\", \"(a)\", \"p!\"])\n\nvar sym = Symbol('Any')\ns = [ { [sym]:5, a:6 } ]\no = { ...((s))[0] }\n\nassert(o[sym] === 5)\nassert(o.a === 6)\ncheckOwnProperties(o, [\"a\"])\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-define-properties.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar object = {};\nvar symbol = Symbol(\"symbol\");\n\nObject.defineProperties(object, {\n  \"foo\": {\n    value: true,\n    writable: true\n  },\n  [symbol]: {\n    value: \"a symbol\",\n    configurable: true\n  }\n});\n\nassert (object.foo === true);\nassert (object[symbol] === \"a symbol\");\n\ntry {\n  Object.defineProperties(undefined, {\n    [symbol]: {\n      value: \"a symbol\",\n      writable: true\n    }\n  });\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// If one of the properties is wrong than it shouldn't update the object.\nvar obj2 = {\n  a: 5\n};\ntry {\n  Object.defineProperties(obj2, {\n    \"foo\": {\n      value: true,\n      writable: true\n    },\n    [symbol]: {\n      value: \"a symbol\",\n      set: 3\n    }\n  });\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n  assert (obj2.foo === undefined);\n  assert (obj2[symbol] === undefined);\n  assert (obj2.a === 5);\n}\n\n// Define accessors\nvar object = {};\nObject.defineProperties(object, {\n  \"foo\": {\n    value: 42,\n    writable: true,\n  },\n  [symbol]: {\n    get: function() { return this.foo },\n    set: function(v) { this.foo = v }\n  }\n});\n\nassert (object[symbol] === 42);\nobject[symbol] = \"baz\";\nassert (object[symbol] === \"baz\");\n\n// Define get method which throws error\nvar object = {};\nvar props = {\n  [symbol]: {\n    value: 3,\n    writable: true\n  },\n  get bar() {\n    throw new TypeError(\"foo\");\n    return { value : 2, writable : true };\n  },\n};\n\ntry {\n  Object.defineProperties(object, props);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n  assert (e.message === \"foo\");\n}\n// Define get method which deletes a property\nvar object = {};\nObject.defineProperties(object, {\n  \"foo\": {\n    value: 42,\n    writable: true,\n  },\n  [symbol]: {\n    value: \"a symbol\",\n    configurable: true\n  },\n  \"bar\": {\n    get: function() {\n      delete this[symbol];\n      return this.foo;\n    },\n  }\n});\n\nassert (object[symbol] === \"a symbol\");\nassert (object.bar === 42);\nassert (object[symbol] === undefined);\n\nvar object = {};\nvar props = {\n  [symbol]: {\n    value: \"a symbol\",\n    configurable: true\n  },\n  get bar() {\n    delete props[symbol];\n    delete props.prop1;\n    return { value : 2, writable : true };\n  },\n  prop1: {\n    value: 3,\n    writable: true,\n  },\n};\n\nObject.defineProperties(object, props);\nvar bar_desc = Object.getOwnPropertyDescriptor(object, 'bar');\nassert(bar_desc.value === 2);\nassert(bar_desc.writable === true);\nassert(object.prop1 === undefined);\nassert(object[symbol] === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-entries.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar object = {};\nvar symbol = Symbol(\"symbol\");\n\nObject.defineProperties(object, {\n  a: {\n    value: 42,\n    enumerable: true\n  },\n  b: {\n    value: \"foo\",\n    enumerable: false\n  },\n  [symbol]: {\n    value: \"symbol\",\n    enumerable: true\n  }\n});\n\n// Object.keys and Object.entries should have the same keys\nvar keys = Object.keys(object);\nvar entries = Object.entries(object);\n\nassert(keys.length === entries.length);\nfor (let i = 0; i < keys.length; i++) {\n  assert(keys[i] === entries[i][0]);\n}\n\n// Test object entries\nvar entries = Object.entries(object);\nassert(entries instanceof Array);\nassert(entries.length === 1);\nassert(entries[0].length === 2);\nassert(entries[0][0] === \"a\");\nassert(entries[0][1] === 42);\n\n// Test array entries\nvar array = [1, 2, \"three\"];\nvar entries = Object.entries(array);\n\nassert(entries instanceof Array);\nassert(entries.length === array.length);\n\nfor (let i = 0; i < entries.length; i++) {\n  assert(entries[i][0] === i + \"\");\n  assert(entries[i][1] === array[i]);\n}\n\n// Test prototype chain\nfunction Parent() {}\nParent.prototype.inheritedMethod = function() {};\n\nfunction method() {};\nfunction Child() {\n  this.prop = 5;\n  this.method = method;\n}\n\nChild.prototype = new Parent;\nChild.prototype.prototypeMethod = function() {};\n\nvar entries = Object.entries (new Child());\nassert(entries.length === 2);\nassert(entries[0][0] === \"prop\");\nassert(entries[0][1] === 5);\nassert(entries[1][0] === \"method\");\nassert(entries[1][1] === method);\n\n// Test with primitive values\nvar entries = Object.entries(true);\nassert(entries instanceof Array);\nassert(entries.length === 0);\n\ntry {\n  Object.entries(undefined);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n\ntry {\n  Object.entries(null);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n\n// Test proxy object\nvar object = {};\n\nObject.defineProperties(object, {\n  a: {\n    value: \"foo\",\n    enumerable: false\n  },\n  b: {\n    value: \"bar\",\n    enumerable: true,\n    writable: false\n  }\n});\n\nvar proxy = new Proxy(object, {\n  getOwnPropertyDescriptor: function(o, v) {\n    handlers.push(\"D\");\n    return Object.getOwnPropertyDescriptor(o, v);\n  },\n  get: function(o, v) {\n    handlers.push(\"G\");\n    return o[v];\n  }\n});\n\nvar handlers = [];\nvar entries = Object.entries(proxy);\n\nassert(entries.length === 1);\nassert(entries[0][0] === \"b\");\nassert(entries[0][1] === \"bar\");\nassert(handlers.length === 3);\nassert(handlers.toString() === \"D,D,G\");\n\n// exception during enumeration\nvar obj = {\n  get a() { throw \"error\" },\n  get b() { throw \"shouldn't run\" }\n};\n\ntry {\n  Object.entries(obj);\n} catch (err) {\n  assert(err == \"error\")\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-freeze-with-symbol.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar s1 = Symbol();\nvar s2 = Symbol();\nvar obj = {};\n\nobj[s1] = 1;\nObject.freeze(obj);\n\nobj[s1] = 2;\nobj[s2] = 3\n\nassert(obj[s1] === 1);\nassert(obj[s2] === undefined);\nassert(delete obj[s1] === false);\n\nassert(Object.isFrozen(obj));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-fromEntries.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// helper function - simple implementation\nArray.prototype.equals = function (array) {\n  if (this.length != array.length)\n    return false;\n\n  for (var i = 0; i < this.length; i++) {\n    if (this[i] instanceof Array && array[i] instanceof Array) {\n      if (!this[i].equals (array[i]))\n        return false;\n      }\n      else if (this[i] != array[i]) {\n        return false;\n    }\n  }\n\n  return true;\n}\n\n// converting map to object\nconst map = new Map ([ ['foo', 'bar'], ['baz', 42] ]);\nconst obj_map = Object.fromEntries (map);\nassert (Object.values (obj_map).equals ([\"bar\", 42]));\nassert (Object.keys (obj_map).equals ([\"foo\", 'baz']));\n\n// converting array to object\nconst arr = [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ];\nconst obj_arr = Object.fromEntries (arr);\nassert (Object.values (obj_arr).equals ([\"a\", \"b\", \"c\"]));\nassert (Object.keys (obj_arr).equals ([\"0\", '1', '2']));\n\n// transfrom object to other object\nconst object1 = { a: 1, b: 2, c: 3 };\nconst object2 = Object.fromEntries (\n  Object.entries (object1)\n  .map (([ key, val ]) => [ key, val * 2 ])\n);\nassert (Object.keys (object2).equals ([\"a\", \"b\", \"c\"]));\nassert (Object.values (object2).equals ([2, 4, 6]));\n\n// map with undefined or null member\nconst map2 = new Map ([ ['foo', undefined], ['baz', null] ]);\nconst obj_map2 = Object.fromEntries (map2);\nassert (Object.values (obj_map2).equals ([undefined, null]));\nassert (Object.keys(obj_map2).equals ([\"foo\", 'baz']))\n\n// don't have a value\nconst map3 = new Map ([ ['foo'], ['baz'] ]);\nconst obj_map3 = Object.fromEntries (map3);\nassert (Object.values(obj_map3).equals ([undefined, undefined]));\nassert (Object.keys(obj_map3).equals ([\"foo\", 'baz']));\n\n// empty map\nconst map4 = new Map ([]);\nconst obj_map4 = Object.fromEntries (map4);\nassert (Object.values(obj_map4).equals ([]));\nassert (Object.keys(obj_map4).equals ([]));\n\n// few invalid argument\nfunction check_iterator (iterator) {\n  try {\n    Object.fromEntries (iterator);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n}\n\ncheck_iterator (null);\ncheck_iterator (undefined);\ncheck_iterator (5);\ncheck_iterator ()\n\n// closed iterator\nvar returned = false;\nvar closed_iterable = {\n  [Symbol.iterator]: function () {\n    var advanced = false;\n    return {\n      next: function () {\n        if (advanced) {\n          throw 42 // meaning of life;\n        }\n        advanced = true;\n        return {\n          done: false,\n          value: 'ab',\n        };\n      },\n      return: function () {\n        if (returned) {\n          throw 42 // meaning of life;\n        }\n        returned = true;\n      },\n    };\n  },\n};\n\ncheck_iterator (closed_iterable)\nassert (returned);\n\nvar next_iterable = {\n  [Symbol.iterator]: function () {\n    return {\n      next: function () {\n        return null;\n      },\n      return: function () {\n        throw 42 // meaning of life;\n      },\n    };\n  },\n};\n\ncheck_iterator (next_iterable)\n\n// uncallable next\nvar next_iterable_2 = {\n  [Symbol.iterator]: function () {\n    return {\n      next: null,\n      return: function () {\n        throw 42 // meaning of life;\n      },\n    };\n  },\n};\n\ncheck_iterator (next_iterable_2)\n\n// get '0' error\nreturned = false;\nvar iterable_0 = {\n  [Symbol.iterator]: function () {\n    var advanced = false;\n    return {\n      next: function () {\n        if (advanced) {\n          throw 42 // meaning of life;\n        }\n        advanced = true;\n        return {\n          done: false,\n          value: {\n            get '0' () {\n              throw new TypeError ();\n            },\n            get '1' () {\n              return \"value\";\n            },\n          },\n        };\n      },\n      return: function () {\n        if (returned) {\n          throw 42 // meaning of life;\n        }\n        returned = true;\n      },\n    };\n  },\n};\n\ncheck_iterator (iterable_0)\nassert (returned);\n\n// error in toPropertyKey\nreturned = false;\nvar iterable = {\n  [Symbol.iterator]: function () {\n    var advanced = false;\n    return {\n      next: function () {\n        if (advanced) {\n          throw 42 // meaning of life;\n        }\n        advanced = true;\n        return {\n          done: false,\n          value: {\n            0: {\n              get toString () { throw new TypeError }\n            },\n            get '1' () {\n              return \"value\";\n            },\n          },\n        };\n      },\n      return: function () {\n        if (returned) {\n          throw 42 // meaning of life;\n        }\n        returned = true;\n      },\n    };\n  },\n};\n\ncheck_iterator (iterable)\nassert (returned);\n\n// get '1' error\nreturned = false;\nvar iterable = {\n  [Symbol.iterator]: function () {\n    var advanced = false;\n    return {\n      next: function () {\n        if (advanced) {\n          throw 42 // meaning of life;\n        }\n        advanced = true;\n        return {\n          done: false,\n          value: {\n            get '0' () {\n              return 'key';\n            },\n            get '1' () {\n              throw new TypeError;\n            },\n          },\n        };\n      },\n      return: function () {\n        if (returned) {\n          throw 42 // meaning of life;\n        }\n        returned = true;\n      },\n    };\n  },\n};\n\ncheck_iterator (iterable)\nassert (returned);\n\n// next value is error\nvar iterable = {\n  [Symbol.iterator] () {\n    return {\n      next () {\n        return {\n          get value () {\n            throw new TypeError }\n          }\n        }\n      }\n    }\n  }\n\ncheck_iterator (iterable)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-get-own-property-descriptors.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar object = {};\nvar symbol = Symbol(\"symbol\");\n\nfunction getter() { return 2; }\nfunction setter(value) {}\n\n// Append a symbol property.\nobject[symbol] = \"symbol\";\n\nObject.defineProperties(object, {\n  \"foo\" : {\n    get: getter,\n    set: setter,\n    enumerable: true,\n    configurable: true,\n  },\n  \"bar\": {\n    value: \"bar\",\n    writable: true,\n    enumerable: false,\n    configurable: true,\n  },\n  \"baz\": {\n    value: undefined,\n    writable: false,\n    enumerable: true,\n    configurable: false,\n  },\n});\n\nvar descriptors = Object.getOwnPropertyDescriptors(object);\n\n// All the descriptor keys should be enumerable.\nvar keys = Object.keys(descriptors);\nvar names = Object.getOwnPropertyNames(descriptors);\nvar symbols = Object.getOwnPropertySymbols(descriptors);\n\nassert(keys.length === names.length);\nassert(symbols.length === 1);\n\nfor (var idx = 0; idx < keys.length; idx++) {\n  assert(keys[idx] === names[idx]);\n}\n\nassert(descriptors[symbol].value === \"symbol\");\n\nassert(descriptors[\"foo\"].get === getter);\nassert(descriptors[\"foo\"].set === setter);\nassert(descriptors[\"foo\"].enumerable === true);\nassert(descriptors[\"foo\"].configurable === true);\n\nassert(descriptors[\"bar\"].value === \"bar\");\nassert(descriptors[\"bar\"].writable === true);\nassert(descriptors[\"bar\"].enumerable === false);\nassert(descriptors[\"bar\"].configurable === true);\n\nassert(descriptors[\"baz\"].value === undefined);\nassert(descriptors[\"baz\"].writable === false);\nassert(descriptors[\"baz\"].enumerable === true);\nassert(descriptors[\"baz\"].configurable === false);\n\n// Compare getOwnPropertyDescriptor and getOwnPropertyDescriptors.\nfor (let i of Object.getOwnPropertyNames(object)) {\n  let lhs = JSON.stringify(Object.getOwnPropertyDescriptor(object, i));\n  let rhs = JSON.stringify(descriptors[i]);\n\n  assert(lhs === rhs);\n}\n\nvar array_desc = Object.getOwnPropertyDescriptors(Array);\nassert(array_desc.prototype.value === Array.prototype);\nassert(array_desc.prototype.writable === false);\nassert(array_desc.prototype.configurable === false);\nassert(array_desc.prototype.enumerable === false);\n\ntry {\n  Object.getOwnPropertyDescriptors(undefined);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\nvar proxy_get_desc_handler = new Proxy(object, {\n  getOwnPropertyDescriptor(target, prop) {\n    throw new Error(\"Error\");\n  }\n});\n\nvar proxy_own_keys_handler = new Proxy(object, {\n  ownKeys: 42,\n});\n\ntry {\n  Object.getOwnPropertyDescriptors(proxy_get_desc_handler);\n  assert(false);\n} catch(e) {\n  assert(e instanceof Error);\n}\n\ntry {\n  Object.getOwnPropertyDescriptors(proxy_own_keys_handler);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-get-own-property-names.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Check that Object.getOwnPropertyNames does NOT include Symbols by default.\nvar asd = Symbol (\"asd\");\nvar foo = Symbol (\"foo\");\nvar bar = Symbol (\"bar\");\nvar result = Object.getOwnPropertyNames ({1: 5, \"a\": 6, [foo]: 7, [asd]: 8, [bar]: 9});\nassert (!Object.hasOwnProperty (result, foo));\nassert (!Object.hasOwnProperty (result, asd));\nassert (!Object.hasOwnProperty (result, bar));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-get-own-property-symbols.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Test array\nvar a = Symbol ('a');\nvar b = Symbol ('b');\nvar c = Symbol ('c');\nvar d = Symbol ();\n\nvar arr = [a, b, c, d];\nvar props = Object.getOwnPropertySymbols (arr);\n// props should not contain: a, b, c, d\nassert (props.indexOf ('0') === -1);\nassert (props.indexOf ('1') === -1);\nassert (props.indexOf ('2') === -1);\nassert (props.indexOf ('length') === -1);\nassert (props.length === 0);\n\n// Test object\nvar obj = {};\nobj[a] = 'a';\nobj[b] = 'b';\nobj[c] = 'c';\nobj[d] = 'd';\nprops = Object.getOwnPropertySymbols (obj);\n// props should contain: a, b, c, d and the order is not defined!\nassert (props.indexOf(a) !== -1);\nassert (props.indexOf(b) !== -1);\nassert (props.indexOf(c) !== -1);\nassert (props.indexOf(d) !== -1);\nassert (props.length === 4);\n\n// Test same descriptions\nvar fooSymbol1 = Symbol ('foo');\nvar fooSymbol2 = Symbol ('foo');\nvar fooSymbol3 = Symbol ('foo');\nvar fooSymbol4 = Symbol ('foo');\n\nvar obj = {}\nobj[fooSymbol1] = 'foo';\nobj[fooSymbol2] = 'bar';\nobj[fooSymbol3] = 'foobar';\nobj[fooSymbol4] = 'barfoo';\n\nprops = Object.getOwnPropertySymbols (obj);\nassert (props.indexOf (fooSymbol1) !== -1);\nassert (props.indexOf (fooSymbol2) !== -1);\nassert (props.indexOf (fooSymbol3) !== -1);\nassert (props.indexOf (fooSymbol4) !== -1);\nassert (props.length === 4);\n\nvar mixed_object = {};\nvar foo = Symbol ('foo');\nvar bar = Symbol.for ('bar');\n\nmixed_object[foo] = 'localSymbol';\nmixed_object[bar] = 'globalSymbol';\nmixed_object['foo'] = 'string';\n\nvar props = Object.getOwnPropertySymbols (mixed_object);\n\nassert (typeof props[0] === 'symbol')\nassert (props.indexOf(foo) !== -1);\nassert (props.indexOf(bar) !== -1);\nassert (props.indexOf('foo') === -1);\nassert (props.length === 2)\n\n// Test prototype chain\nfunction Parent() {}\nParent.prototype.inheritedMethod = function() {};\n\nfunction Child() {\n  this[a] = 5;\n  this[b] = function() {};\n}\nChild.prototype = new Parent;\nChild.prototype.prototypeMethod = function() {};\n\nprops = Object.getOwnPropertySymbols (new Child());\n// props should contain: a, b and the order is not defined!\nassert (props.indexOf(a) !== -1);\nassert (props.indexOf(b) !== -1);\n\nassert (props.length === 2);\n\n// Test non-emumerable symbols\nvar object = {};\nvar foo = Symbol ('foo');\nvar foo2 = Symbol ('foo2');\nobject[foo] = 'EnumerableSymbolProp';\nObject.defineProperty(object, foo2, { value : 'NonEnumerableSymbolProp' });\n\nprops = Object.getOwnPropertySymbols (object);\n\nassert (props.indexOf(foo) !== -1);\nassert (props.indexOf(foo2) !== -1);\nassert (props.length === 2);\nassert (Object.getOwnPropertyDescriptor (object, foo).enumerable === true);\nassert (Object.getOwnPropertyDescriptor (object, foo2).enumerable === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-getprototypeof.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = true;\nobj = Object.getPrototypeOf(a);\nassert (obj == Boolean.prototype);\n\na = 5;\nobj = Object.getPrototypeOf(a);\nassert (obj == Number.prototype);\n\na = \"string\";\nobj = Object.getPrototypeOf(a);\nassert (obj == String.prototype);\n\na = [1,2,3];\nobj = Object.getPrototypeOf(a);\nassert (obj == Array.prototype);\n\ntry {\n  a = null;\n  obj = Object.getPrototypeOf(a);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-initializer.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nswitch (1) {\ndefault:\n  var o = {\n    value: 10,\n    func() {\n      return 234 + this.value;\n    },\n    [\"a\" + \"b\"]() {\n      return 456 - this.value;\n    }\n  }\n}\n\nassert(o.func() === 244);\nassert(o.ab() === 446);\n\nswitch (1) {\ndefault:\n  var ab = 5;\n  var cd = 6;\n  o = {\n    ab,\n    cd: 8,\n    cd\n  }\n}\n\nassert(o.ab === 5);\nassert(o.cd === 6);\n\nfunction exception_expected(str) {\n  try {\n    eval(str);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n\n// These forms are invalid.\nexception_expected('({ true })');\nexception_expected('({ 13 })');\nexception_expected('({ \"x\" })');\n\nswitch (1) {\ndefault:\n  // These forms are valid.\n  ({ true: true });\n  ({ 13: 13 });\n  ({ \"x\": \"x\" });\n\n  var get = 8;\n  var set = 12;\n  var o = ({ get, set });\n\n  assert(o.get == 8);\n  assert(o.set == 12);\n}\n\nvar obj = { get() { return 5; }, set() { return 6; } };\n\nassert (obj.get() === 5);\nassert (obj.set() === 6);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-is.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Object.is(2, \"foo\") === false);\nassert(Object.is(null, 2) === false);\n\nvar x;\nassert(Object.is(x, 2) === false);\n\nassert(Object.is(null, null) === true);\n\nassert(Object.is(2, 8) === false);\nassert(Object.is(8, 8) === true);\n\nassert(Object.is(3.14, 6.28) === false);\nassert(Object.is(3.14, 3.14) === true);\n\nassert(Object.is('foo', 'foo') === true);\nassert(Object.is('foo', 'bar') === false);\nassert(Object.is(new String('foo'), 'foo') === false);\n\nassert(Object.is([], []) === false);\n\nassert(Object.is(true, true) === true);\nassert(Object.is(false, false) === true);\nassert(Object.is(true, false) === false);\nassert(Object.is(false, true) === false);\nassert(Object.is(\"\", false) === false);\nassert(Object.is(0, false) === false);\n\nsym1 = Symbol.for('foo');\nsym2 = Symbol.for('foo');\nassert(Object.is(sym1, sym2) === true);\nassert(Object.is(Symbol('foo'), Symbol('foo')) === false);\n\nvar foo = { a: 1 };\nvar bar = { a: 1 };\nvar zoo = foo;\nassert(Object.is(foo, foo) === true);\nassert(Object.is(foo, bar) === false);\nassert(Object.is(foo, zoo) === true);\n\n// Special Cases\nassert(Object.is(+0, -0) === false);\nassert(Object.is(+0, 0) === true);\nassert(Object.is(-0, -0) === true);\nassert(Object.is(-0, 0) === false);\nassert(Object.is(NaN, 0/0) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-keys.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar object = {};\n\nObject.defineProperties(object, {\n  a: {\n    value: \"foo\",\n    enumerable: false\n  },\n  b: {\n    value: \"bar\",\n    enumerable: true,\n    writable: false\n  }\n});\n\nvar proxy = new Proxy(object, {\n  getOwnPropertyDescriptor: function(o, v) {\n    handlers.push(\"D\");\n    return Object.getOwnPropertyDescriptor(o, v);\n  },\n  get: function(o, v) {\n    handlers.push(\"G\");\n    return o[v];\n  }\n});\n\nvar handlers = [];\nvar keys = Object.keys(proxy);\n\nassert(keys.length === 1);\nassert(keys[0] === \"b\");\nassert(handlers.length === 2);\nassert(handlers.toString() === \"D,D\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-literal-super.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar setter1_called = false;\nvar setter2_called = false;\n\nvar obj1 = {\n  method1() {\n    return 1;\n  },\n  ['method2']() {\n    return 2;\n  },\n  *method3() {\n    return 3;\n  },\n  *['method4']() {\n    return 4;\n  },\n  get getter1() {\n    return 5;\n  },\n  get ['getter2']() {\n    return 6;\n  },\n  set setter1(rhs) {\n    setter1_called = true;\n    assert(rhs === 7);\n  },\n  set ['setter2'](rhs) {\n    setter2_called = true;\n    assert(rhs === 8);\n  },\n}\n\nvar obj2 = {\n  method1() {\n    return super.method1();\n  },\n  ['method2']() {\n    return super.method2();\n  },\n  *method3() {\n    return super.method3();\n  },\n  *['method4']() {\n    return super.method4();\n  },\n  get getter1() {\n    return super.getter1;\n  },\n  get ['getter2']() {\n    return super.getter2;\n  },\n  set setter1(rhs) {\n    super.setter1 = rhs;\n  },\n  set ['setter2'](rhs) {\n    super.setter2 = rhs;\n  },\n  __proto__: obj1,\n}\n\nassert(obj2.method1() === 1);\nassert(obj2.method2() === 2);\nassert(obj2.method3().next().value.next().value === 3);\nassert(obj2.method4().next().value.next().value === 4);\n\nassert(obj2.getter1 === 5);\nassert(obj2.getter2 === 6);\n\nobj2.setter1 = 7;\nassert(setter1_called);\nobj2.setter2 = 8;\nassert(setter2_called);\n\nlet obj3 = {\n  a() {\n    return 9;\n  }\n}\n\nlet obj4 = {\n  a() {\n    return eval('super.a()');\n  },\n  __proto__: obj3,\n}\n\nassert(obj4.a() === 9);\n\nlet obj5 = {\n  a() {\n    return (_ => super.a())();\n  },\n  __proto__: obj3,\n}\n\nassert(obj5.a() === 9);\n\nlet obj6 = {\n  a() {\n    return (_ => _ => super.a())()();\n  },\n  __proto__: obj3,\n}\n\nassert(obj6.a() === 9);\n\n\nfunction checkSyntax(src) {\n  try {\n    eval(src);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n\ncheckSyntax('({ a : function () { super.a }})')\ncheckSyntax('({ [\\'a\\'] : function () { super.a }})')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-methods.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (JSON.stringify (Object.getOwnPropertyNames(\"hello\")) === '[\"0\",\"1\",\"2\",\"3\",\"4\",\"length\"]');\n\nvar n = Object.assign(42, {a: \"str\"});\nassert (n instanceof Number);\nassert (n.valueOf() === 42);\nassert (n.a === \"str\");\n\nassert (JSON.stringify (Object.getOwnPropertySymbols(\"hello\")) === '[]');\n\nassert (JSON.stringify (Object.keys(\"str\")) === '[\"0\",\"1\",\"2\"]');\n\nvar d = Object.getOwnPropertyDescriptor(\"hello\", '1');\nassert (d.value === \"e\");\nassert (d.writable === false);\nassert (d.enumerable === true);\nassert (d.configurable === false);\n\nassert (Object.seal(42) === 42);\nassert (Object.seal(\"a\") === \"a\");\nassert (Object.seal(undefined) === undefined);\nassert (Object.seal() === undefined);\n\nassert (Object.isSealed(42) === true);\nassert (Object.isSealed(\"a\") === true);\nassert (Object.isSealed(undefined) === true);\nassert (Object.isSealed() === true);\n\nassert (Object.freeze(42) === 42);\nassert (Object.freeze(\"a\") === \"a\");\nassert (Object.freeze(undefined) === undefined);\nassert (Object.freeze() === undefined);\n\nassert (Object.isFrozen(42) === true);\nassert (Object.isFrozen(\"a\") === true);\nassert (Object.isFrozen(undefined) === true);\nassert (Object.isFrozen() === true);\n\nassert (Object.preventExtensions(42) === 42);\nassert (Object.preventExtensions(\"a\") === \"a\");\nassert (Object.preventExtensions(undefined) === undefined);\nassert (Object.preventExtensions() === undefined);\n\nassert (Object.isExtensible(42) === false);\nassert (Object.isExtensible(\"a\") === false);\nassert (Object.isExtensible(undefined) === false);\nassert (Object.isExtensible() === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-pattern.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction checkSyntax (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\nfunction mustThrow (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n}\n\ncheckSyntax (\"var {a}\");\ncheckSyntax (\"var {a, o.a}\");\ncheckSyntax (\"var {a,,} = 4\");\ncheckSyntax (\"var {a :} = 4\");\ncheckSyntax (\"var {a : ,} = 4\");\ncheckSyntax (\"var {a : ['foobar']} = 4\");\ncheckSyntax (\"var {let}\");\ncheckSyntax (\"var {get = []\");\ncheckSyntax (\"var {get : 5}\");\ncheckSyntax (\"var {[a = {},}\");\ncheckSyntax (\"let {a,a} = []\");\ncheckSyntax (\"let {a : b, b} = []\");\ncheckSyntax (\"const {a,a} = []\");\ncheckSyntax (\"const {a : b, b} = []\");\ncheckSyntax (\"try { let {$} = $;\");\ncheckSyntax (\"let a, { 'x': a } = {x : 4};\");\ncheckSyntax (\"let a, { x: b.c } = {x : 6};\");\ncheckSyntax (\"let {a:(a)} = {a:1}\");\n\nmustThrow (\"var {a} = null\");\nmustThrow (\"var {a} = undefined\");\nmustThrow (\"function f ({a : {}}) {}; f({});\");\nmustThrow (\"function f ({}) {}; f();\");\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment\n\n// Basic assignment\n(function () {\n  var o = {p: 42, q: true};\n  var {p, q} = o;\n\n  assert (p === 42);\n  assert (q === true);\n}) ();\n\n// Assignment without declaration\n(function () {\n  var a, b;\n  ({a, b} = {a: 1, b: 2});\n\n  assert (a === 1);\n  assert (b === 2);\n}) ();\n\n// Assigning to new variable names\n(function () {\n  var o = {p: 42, q: true};\n  var {p: foo, q: bar} = o;\n\n  assert (foo === 42);\n  assert (bar === true);\n}) ();\n\n// Default values\n(function () {\n  var {a = 10, b = 5} = {a: 3};\n\n  assert (a === 3);\n  assert (b === 5);\n}) ();\n\n\n// Assigning to new variables names and providing default values\n(function () {\n  var {a: aa = 10, b: bb = 5} = {a: 3};\n\n  assert (aa === 3);\n  assert (bb === 5);\n}) ();\n\n// Nested object and array destructuring\n(function () {\n  const metadata = {\n    title: 'Scratchpad',\n    translations: [\n      {\n        locale: 'de',\n        localization_tags: [],\n        last_edit: '2014-04-14T08:43:37',\n        url: '/de/docs/Tools/Scratchpad',\n        title: 'JavaScript-Umgebung'\n      }\n    ],\n    url: '/en-US/docs/Tools/Scratchpad'\n  };\n\n  let {\n    title: englishTitle, // rename\n    translations: [\n      {\n         title: localeTitle, // rename\n      },\n    ],\n  } = metadata;\n\n  assert (englishTitle === \"Scratchpad\");\n  assert (localeTitle === \"JavaScript-Umgebung\");\n}) ();\n\n// Computed object property names and destructuring\n(function () {\n  let key = 'z';\n  let {[key]: foo} = {z: 'bar'};\n\n  assert (foo === \"bar\");\n}) ();\n\n// Invalid JavaScript identifier as a property name\n(function () {\n  const foo = { 'fizz-buzz': true };\n  const { 'fizz-buzz': fizzBuzz } = foo;\n\n  assert (fizzBuzz === true);\n}) ();\n\n// Combined Array and Object Destructuring\n(function () {\n  const props = [\n    { id: 1, name: 'Fizz'},\n    { id: 2, name: 'Buzz'},\n    { id: 3, name: 'FizzBuzz'}\n  ];\n\n  const [,, { name }] = props;\n\n  assert (name === \"FizzBuzz\");\n}) ();\n\n// The prototype chain is looked up when the object is deconstructed\n(function () {\n  var obj = {self: '123'};\n  Object.getPrototypeOf(obj).prot = '456';\n  const {self, prot} = obj;\n  assert (self === '123');\n  assert (prot === '456');\n}) ();\n\n// Test inner patterns I.\n(function () {\n  var a,b,c,d,e;\n  var o = { a : { b: 2 }, c: 1, d: { e: undefined } };\n  var { e: { b : a } = { b : 2, a : 1}, d: { e: { b : e = 2} = { b } } } = o;\n  assert (a === 2);\n  assert (b === undefined);\n  assert (c === undefined);\n  assert (d === undefined);\n  assert (e === 2);\n}) ();\n\n// Test inner patterns II.\n(function () {\n  var a,b,c,d,e;\n  var o = { a : [{ b : 2 ,}, d], e : 5 };\n\n  var { a: [{b, c  = 3}, d = 4], e } = o;\n  assert (a === undefined);\n  assert (b === 2);\n  assert (c === 3);\n  assert (d === 4);\n  assert (e === 5);\n}) ();\n\n// Multiple declaration\n(function () {\n  var {a} = {a : 1}, {b} = {b : 2};\n\n  assert (a === 1);\n  assert (b === 2);\n}) ();\n\n// Force the creation of lexical environment I.\n(function () {\n  const {a} = {a : 1};\n  eval();\n\n  assert (a === 1);\n}) ();\n\n// Force the creation of lexical environment II.\n(function () {\n  let {a} = {a : 1};\n  eval();\n\n  assert (a === 1);\n}) ();\n\n// Check the parsing of AssignmentElement\n(function () {\n  var a = 6;\n  ({\"a\": ((a)) } = {a : 7});\n  assert (a === 7);\n}) ();\n\n(function () {\n  var o = {};\n\n  ({ a : o.c } = { get a() { return 5.2 }})\n\n  assert(o.c == 5.2);\n}) ();\n\ntry {\n  eval (\"var a = 0; -{a} = {a:1}\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-pattern2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction checkSyntax (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\ncheckSyntax (\"var {a, ...b, a} = {}\")\ncheckSyntax (\"var {a, ...b = 6} = {}\")\ncheckSyntax (\"var {a, ...[b]} = {}\")\ncheckSyntax (\"function f({a, ...a}) {}\")\ncheckSyntax (\"let {a, ...a} = {}\")\ncheckSyntax (\"let {a, ...(b)} = {}\")\ncheckSyntax (\"({a, ...{b}} = {})\")\ncheckSyntax (\"({a, ...([b])} = {})\")\ncheckSyntax (\"({a, ...b().a = 6} = {})\")\ncheckSyntax (\"try {} catch ({ ...a } = {}) {}\")\ncheckSyntax (\"for ({ ...a } = {} of []) {}\")\n\nvar sym1 = Symbol(\"sym1\")\nvar sym2 = Symbol(\"sym2\")\n\nfunction rest_compare(rest, values)\n{\n  var keys = Reflect.ownKeys(rest);\n\n  assert(keys.length * 2 === values.length)\n\n  for (var i = 0; i < keys.length; i++) {\n    key = keys[i]\n    assert(key === values[i * 2])\n    assert(rest[key] === values[i * 2 + 1])\n  }\n}\n\nfunction f1() {\n  var { bb, ...rest } = { a:true, bb:6.25, [sym1]:\"X\" }\n\n  assert(bb === 6.25)\n  rest_compare(rest, [\"a\", true, sym1, \"X\"])\n}\nf1()\n\nfunction f2() {\n  var a, b, rest = {};\n\n  ({ a, \"+\": b, ...rest.c } = { \"+\": -3.75, [sym1]:6.25, [sym2]: sym2 })\n\n  assert(a === undefined)\n  assert(b === -3.75)\n  rest_compare(rest.c, [sym1, 6.25, sym2, sym2])\n}\nf2()\n\nfunction f3() {\n  var a, rest1, rest2;\n\n  ({ A:{ [sym2]: a, ...rest1 }, B:{ ...rest2 } = { X:null, 7:\"A\" } } = { A:{ [sym1]: 7.5, [sym2]: 3.5, S:-5.5 } })\n\n  assert(a === 3.5)\n  rest_compare(rest1, [\"S\", -5.5, sym1, 7.5])\n  rest_compare(rest2, [\"7\", \"A\", \"X\", null])\n}\nf3()\n\nfunction f4() {\n  try {\n    throw { A:5, [sym1]:6, [sym2]:7, b:8 }\n    assert(false)\n  } catch({ b, c, ...rest }) {\n    assert(b === 8)\n    assert(c === undefined)\n    rest_compare(rest, [\"A\", 5, sym1, 6, sym2, 7])\n  }\n}\nf4()\n\nfunction f5() {\n  var a = {}, b = {}, c = {}, d = () => c\n\n  for ({ A:a.x, B:b.y, ...d().z } of [ { B:\"AA\", C:6.25, [sym1]:-4.5 } ]) {\n    assert(a.x === undefined)\n    assert(typeof Object.getOwnPropertyDescriptor(a, \"x\") === \"object\")\n    assert(b.y === \"AA\")\n    rest_compare(c.z, [\"C\", 6.25, sym1, -4.5])\n  }\n}\nf5()\n\nfunction f6({ [(() => \"A\")() + \"A\"]:a, ...b },\n            { A:c, [sym1]:d, [sym2]:e, ...f } = { A:\"X\", [sym2]: 5.5 }) {\n  assert(a === 6)\n  rest_compare(b, [\"B\", 7, sym1, 8.25])\n  assert(c === \"X\")\n  assert(d === undefined)\n  assert(e === 5.5)\n  rest_compare(f, [])\n}\nf6({ [sym1]:8.25, B:7, AA:6 })\n\nfunction f7() {\n  var b, o = {}, rest\n\n  ({ [\"A\" + \"A\"]:b, ...{o}.o.rest } = { [sym1]:5.5, A:\"X\", AA:-0.25 })\n\n  assert(b === -0.25)\n  rest_compare(o.rest, [ \"A\", \"X\", sym1, 5.5])\n}\nf7()\n\nfunction f8() {\n  var a, b;\n\n  ({ ...(b) } = { })\n  rest_compare(b, []);\n\n  [a,a,...{ ...b  }] = [\"A\", \"B\", \"C\", \"D\"]\n  rest_compare(b, [\"0\", \"C\", \"1\", \"D\"])\n}\nf8()\n\nfunction f9() {\n  var counter = 0;\n\n  for (const { ...rest} in { B: \"AA\", C: 6.25 }) {\n    switch (counter) {\n      case 0: {\n        /* rest === { '0': 'B' } */\n        assert(rest['0'] === 'B');\n        break;\n        }\n      case 1: {\n        /* rest === { '0': 'C' } */\n        assert(rest['0'] == 'C');\n        break;\n      }\n    }\n    counter++;\n  }\n  assert(counter === 2);\n}\nf9()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-property-redefiniton.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction checkOwnProperties(obj, propList)\n{\n  names = Object.getOwnPropertyNames(obj)\n  assert(names.length === propList.length)\n\n  for (var i = 0; i < propList.length; ++i)\n  {\n    assert(names[i] === propList[i])\n\n    var descriptor = Object.getOwnPropertyDescriptor(obj, names[i])\n    if (i % 2 == 0) {\n      assert(descriptor.writable == true);\n      assert(descriptor.enumerable == true);\n      assert(descriptor.configurable == true);\n      assert(descriptor.get === undefined);\n      assert(descriptor.set === undefined);\n    } else {\n      assert(descriptor.writable == undefined);\n      assert(descriptor.enumerable == true);\n      assert(descriptor.configurable == true);\n      assert(descriptor.get !== undefined || descriptor.set !== undefined);\n    }\n  }\n}\n\nvar o = {\n  get a() {},\n  b:6,\n  set c(_) {\n  },\n  d:10,\n  a: 11,\n  get b () {},\n  c: 12,\n  set d (_) {}\n}\n\ncheckOwnProperties(o, ['a', 'b', 'c', 'd']);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-prototype-define-getter.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar o = {};\no.__defineGetter__('foo', function() { return 5; });\nassert(o.foo === 5);\n\nvar obj = {};\nfunction bar() { return \"bar\"; }\nObject.prototype.__defineGetter__.call(obj, \"foo\", bar);\nvar prop = Object.getOwnPropertyDescriptor(obj, \"foo\");\nassert(prop.get == bar);\nassert(!prop.writable);\nassert(prop.configurable);\nassert(prop.enumerable);\n\nvar obj = {};\nvar sym = Symbol();\nfunction bar() { return \"bar\"; }\nObject.prototype.__defineGetter__.call(obj, sym, bar);\nvar prop = Object.getOwnPropertyDescriptor(obj, sym);\nassert(prop.get == bar);\nassert(!prop.writable);\nassert(prop.configurable);\nassert(prop.enumerable);;\n\nvar key = '__accessors_test__';\nObject.prototype.__defineGetter__.call(1, key, function(){});\n\ntry {\n  Object.prototype.__defineGetter__.call(null, key, function(){});\n  assert(false);\n} catch(e){\n  assert(e instanceof TypeError);\n}\n\nvar def = [];\nvar p = new Proxy({}, { defineProperty: function(o, v, desc) { def.push(v); Object.defineProperty(o, v, desc); return true; }});\nObject.prototype.__defineGetter__.call(p, \"foo\", Object);\nassert(def + '' === \"foo\");\n\nvar func = function() {};\nvar subject = Object.defineProperty(\n  {}, 'foo', { value: 1, configurable: false }\n);\n\ntry {\n  subject.__defineGetter__('foo', func);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar subject = Object.preventExtensions({ existing: null });\n\nsubject.__defineGetter__('existing', func);\n\ntry {\n  subject.__defineGetter__('brand new', func);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar __defineGetter__ = Object.prototype.__defineGetter__;\nvar counter = 0;\nvar key = {\n  toString: function() {\n    counter += 1;\n  }\n};\n\ntry {\n  __defineGetter__.call(undefined, key, func);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  __defineGetter__.call(null, key, func);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(counter === 0);\n\nvar subject = {};\nvar symbol = Symbol('');\nvar counter = 0;\nvar key = {\n  toString: function() {\n    counter += 1;\n  }\n};\n\ntry {\n  subject.__defineGetter__(key, '');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  subject.__defineGetter__(key, 23);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  subject.__defineGetter__(key, true);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  subject.__defineGetter__(key, symbol);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  subject.__defineGetter__(key, {});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(counter === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-prototype-define-setter.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar o = {};\no.__defineSetter__('foo', function(val) { this.bar = val; });\no.foo = 5;\nassert(o.foo === undefined); // undefined\nassert(o.bar === 5); \n\nvar obj = {};\nfunction bar() {}\nObject.prototype.__defineSetter__.call(obj, \"foo\", bar);\nvar prop = Object.getOwnPropertyDescriptor(obj, \"foo\");\nassert(prop.set === bar);\nassert(!prop.writable);\nassert(prop.configurable);\nassert(prop.enumerable);\n\nvar obj = {};\nvar sym = Symbol();\nfunction bar(baz) {}\nObject.prototype.__defineSetter__.call(obj, sym, bar);\nvar prop = Object.getOwnPropertyDescriptor(obj, sym);\nassert(prop.set === bar);\nassert(!prop.writable);\nassert(prop.configurable);\nassert(prop.enumerable);\n\nvar key = '__accessors_test__';\nObject.prototype.__defineSetter__.call(1, key, function(){});\n\ntry {\n  Object.prototype.__defineSetter__.call(null, key, function(){});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar def = [];\nvar p = new Proxy({}, { defineProperty: function(o, v, desc) { def.push(v); Object.defineProperty(o, v, desc); return true; }});\nObject.prototype.__defineSetter__.call(p, \"foo\", Object);\nassert(def + '' === \"foo\");\n\nvar func = function() {};\nvar subject = Object.defineProperty(\n  {}, 'attr', { value: 1, configurable: false }\n);\n\ntry {\n  subject.__defineSetter__('attr', func);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar subject = Object.preventExtensions({ existing: null });\n\nsubject.__defineSetter__('existing', func);\n\ntry {\n  subject.__defineSetter__('brand new', func);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar __defineSetter__ = Object.prototype.__defineSetter__;\nvar counter = 0;\nvar key = {\n  toString: function() {\n    counter += 1;\n  }\n};\n\ntry {\n  __defineSetter__.call(undefined, key, func);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  __defineSetter__.call(null, key, func);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(counter === 0);\n\nvar subject = {};\nvar symbol = Symbol('');\nvar counter = 0;\nvar key = {\n  toString: function() {\n    counter += 1;\n  }\n};\n\ntry {\n  subject.__defineSetter__(key, '');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  subject.__defineSetter__(key, 23);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  subject.__defineSetter__(key, true);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  subject.__defineSetter__(key, symbol);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  subject.__defineSetter__(key, {});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(counter === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-prototype-lookup-getter.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {\n  get foo() { return \"bar\" },\n  qux: 1,\n  set bar(value) { this.x = value }\n};\n\nvar foo = Object.prototype.__lookupGetter__.call(obj, \"foo\");\nassert(foo() === \"bar\");\nassert(Object.prototype.__lookupGetter__.call(obj, \"qux\") === undefined);\nassert(Object.prototype.__lookupGetter__.call(obj, \"baz\") === undefined);\nassert(Object.prototype.__lookupGetter__.call(obj, \"bar\") === undefined);\n\nvar foo = Object.prototype.__lookupGetter__.call(Object.create(obj), \"foo\");\nassert(foo() === \"bar\");\nassert(Object.prototype.__lookupGetter__.call(obj, \"qux\") === undefined);\nassert(Object.prototype.__lookupGetter__.call(obj, \"baz\") === undefined);\nassert(Object.prototype.__lookupGetter__.call(obj, \"bar\") === undefined);\n\nvar sym = Symbol();\nvar sym2 = Symbol();\nvar obj = {};\nObject.defineProperty(obj, sym, { get: function() { return \"bar\"; }});\nObject.defineProperty(obj, sym2, { value: 1 });\nvar foo = Object.prototype.__lookupGetter__.call(obj, sym);\n\nassert(foo() === \"bar\");\nassert(Object.prototype.__lookupGetter__.call(obj, sym2) === undefined);\nassert(Object.prototype.__lookupGetter__.call(obj, Symbol()) === undefined);\n\nObject.prototype.__lookupGetter__.call(1, 'key');\n\ntry {\n  Object.prototype.__lookupGetter__.call(null, 'key');\n  assert(false);\n} catch(e){\n  assert(e instanceof TypeError);\n}\n\nvar a = {};\nvar b = Object.create(a);\nb.foo = 1;\nObject.defineProperty(a, \"foo\", {function () {}})\nassert(b.__lookupGetter__(\"foo\") === undefined);\n\nvar gopd = [];\nvar gpo = false;\nvar p = new Proxy({}, {\n  getPrototypeOf: function(o) { gpo = true; return Object.getPrototypeOf(o); },\n  getOwnPropertyDescriptor: function(o, v) { gopd.push(v); return Object.getOwnPropertyDescriptor(o, v); }\n});\n\nObject.prototype.__lookupGetter__.call(p, \"foo\");\nassert(gopd + '' === \"foo\");\nassert(gpo === true);\n\nvar __lookupGetter__ = Object.prototype.__lookupGetter__;\nvar counter = 0;\nvar key = {\n  toString: function() {\n    counter += 1;\n  }\n};\n\ntry {\n  __lookupGetter__.call(undefined, key);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  __lookupGetter__.call(null, key);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(counter === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-prototype-lookup-setter.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {\n  set foo(value) { return \"bar\" },\n  qux: 1,\n  get bar() {}\n};\n  \nvar foo = Object.prototype.__lookupSetter__.call(obj, \"foo\");\nassert(foo() === \"bar\");\nassert(Object.prototype.__lookupSetter__.call(obj, \"qux\") === undefined);\nassert(Object.prototype.__lookupSetter__.call(obj, \"baz\") === undefined);\nassert(Object.prototype.__lookupSetter__.call(obj, \"bar\") === undefined);\n\nvar foo = Object.prototype.__lookupSetter__.call(Object.create(obj), \"foo\");\nassert(foo() === \"bar\");\nassert(Object.prototype.__lookupSetter__.call(obj, \"qux\") === undefined);\nassert(Object.prototype.__lookupSetter__.call(obj, \"baz\") === undefined);\nassert(Object.prototype.__lookupSetter__.call(obj, \"bar\") === undefined);\n\nvar sym = Symbol();\nvar sym2 = Symbol();\nvar obj = {};\nObject.defineProperty(obj, sym, { set: function(value) { return \"bar\"; }});\nObject.defineProperty(obj, sym2, { value: 1 });\nvar foo = Object.prototype.__lookupSetter__.call(obj, sym);\n\nassert(foo() === \"bar\");\nassert(Object.prototype.__lookupSetter__.call(obj, sym2) === undefined);\nassert(Object.prototype.__lookupSetter__.call(obj, Symbol()) === undefined);\n\nObject.prototype.__lookupSetter__.call(1, 'key');\n\ntry {\n  Object.prototype.__lookupSetter__.call(null, 'key');\n  assert(false);\n} catch(e){\n  assert(e instanceof TypeError);\n}\n\nvar a = {};\nvar b = Object.create(a);\nb.foo = 1;\nObject.defineProperty(a, \"foo\", {function () {}})\nassert(b.__lookupSetter__(\"foo\") === undefined);\n\nvar gopd = [];\nvar gpo = false;\nvar p = new Proxy({}, {\n  getPrototypeOf: function(o) { gpo = true; return Object.getPrototypeOf(o); },\n  getOwnPropertyDescriptor: function(o, v) { gopd.push(v); return Object.getOwnPropertyDescriptor(o, v); }\n});\n\nObject.prototype.__lookupSetter__.call(p, \"foo\");\nassert(gopd + '' === \"foo\");\nassert(gpo);\n\nvar __lookupSetter__ = Object.prototype.__lookupSetter__;\nvar counter = 0;\nvar key = {\n  toString: function() {\n    counter += 1;\n  }\n};\n\ntry {\n  __lookupSetter__.call(undefined, key);  \n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  __lookupSetter__.call(null, key);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError); \n}\n\nassert(counter === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-prototype-proto.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('var o = { __proto__ : 5, __proto__ : 5 }');\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\nvar f = function(){};\nassert((new f()).__proto__ === f.prototype);\n\nvar o = {};\no.__proto__ = Array.prototype;\nassert(o instanceof Array);\n\nvar obj = Object.create(null)\np = {};\nobj.__proto__ = p;\nassert(Object.getPrototypeOf(obj) !== p);\n\nvar Circle = function () {};\nvar shape = {};\nvar circle = new Circle();\n\nshape.__proto__ = circle;\n\nassert(Object.getPrototypeOf(shape) === circle);\nassert(shape.__proto__ === circle);\n\nassert(Object.prototype.hasOwnProperty('__proto__') === true);\n\nvar desc = Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\");\nassert((desc && \"get\" in desc && \"set\" in desc && desc.configurable && !desc.enumerable) === true);\n\nassert((Object.getOwnPropertyNames(Object.prototype).indexOf('__proto__') > -1) === true);\n\ntry {\n  shape.__proto__ = shape;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar o2 = { [\"__proto__\"] : null };\nassert(o2.__proto__ === null);\nassert(Object.getPrototypeOf(o2) === Object.prototype);\n\nvar o3 = { __proto__ : null };\nassert(o3.__proto__ === undefined);\nassert(Object.getPrototypeOf(o3) === null);\n\nvar o4 = { \"__proto__\" : null };\nassert(o4.__proto__ === undefined);\nassert(Object.getPrototypeOf(o4) === null);\n\nvar __proto__ = [];\nvar o5 = { __proto__ };\nassert(o5.__proto__ === __proto__);\nassert(Object.getPrototypeOf(o5) === Object.prototype);\n\nvar o6 = { __proto__() { return \"42\" } };\nassert(o6.__proto__() === \"42\");\nassert(Object.getPrototypeOf(o6) === Object.prototype);\n\nvar o7 = { __\\u0070r\\u006ft\\u006f__: null };\nassert(o7.__proto__ === undefined);\nassert(Object.getPrototypeOf(o7) === null);\n\nvar o8 = { };\no8.__proto__ = Array.prototype;\nassert(Object.getPrototypeOf(o8) === Array.prototype);\n\nvar str1 = '{\"__proto__\": [] }';\nvar obj1 = JSON.parse(str1);\nassert(Object.getPrototypeOf(obj1) === Object.prototype);\nassert(Array.isArray(obj1.__proto__));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-prototype-tostring.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Symbol prototype @@toStringTag */\nassert (Symbol.prototype[Symbol.toStringTag] === \"Symbol\");\nassert (Object.prototype.toString.call (Symbol ()) === \"[object Symbol]\");\n\nassert (delete Symbol.prototype[Symbol.toStringTag]);\nassert (Symbol.prototype[Symbol.toStringTag] === undefined);\nSymbol.prototype[Symbol.toStringTag] = \"myStringTag1\";\nassert (Object.prototype.toString.call (Symbol ()) === \"[object myStringTag1]\");\nSymbol.prototype[Symbol.toStringTag] = {};\nassert (Object.prototype.toString.call (Symbol ()) === \"[object Object]\");\n\n/* Math @@toStringTag */\nassert (Math[Symbol.toStringTag] === \"Math\");\nassert (Object.prototype.toString.call (Math) === \"[object Math]\");\n\nassert (delete Math[Symbol.toStringTag]);\nassert (Math[Symbol.toStringTag] === undefined);\nMath[Symbol.toStringTag] = \"myStringTag2\";\nassert (Object.prototype.toString.call (Math) === \"[object myStringTag2]\");\nMath[Symbol.toStringTag] = {};\nassert (Object.prototype.toString.call (Math) === \"[object Object]\");\n\n/* ArrayBuffer.prototype @@toStringTag */\nassert (ArrayBuffer.prototype[Symbol.toStringTag] === \"ArrayBuffer\");\nassert (Object.prototype.toString.call (new ArrayBuffer ()) === \"[object ArrayBuffer]\");\n\nassert (delete ArrayBuffer.prototype[Symbol.toStringTag]);\nassert (ArrayBuffer.prototype[Symbol.toStringTag] === undefined);\nArrayBuffer.prototype[Symbol.toStringTag] = \"myStringTag3\";\nassert (Object.prototype.toString.call (new ArrayBuffer ()) === \"[object myStringTag3]\");\nArrayBuffer.prototype[Symbol.toStringTag] = {};\nassert (ArrayBuffer.prototype.toString.call (new ArrayBuffer ()) === \"[object Object]\");\n\n/* Promise.prototype @@toStringTag */\nassert (Promise.prototype[Symbol.toStringTag] === \"Promise\");\nassert (Object.prototype.toString.call (new Promise (function () {})) === \"[object Promise]\");\n\nassert (delete Promise.prototype[Symbol.toStringTag]);\nassert (Promise.prototype[Symbol.toStringTag] === undefined);\nPromise.prototype[Symbol.toStringTag] = \"myStringTag4\";\nassert (Object.prototype.toString.call (new Promise (function () {})) === \"[object myStringTag4]\");\nPromise.prototype[Symbol.toStringTag] = {};\nassert (Promise.prototype.toString.call (new Promise (function () {})) === \"[object Object]\");\n\n/* Map.prototype @@toStringTag */\nassert (Map.prototype[Symbol.toStringTag] === \"Map\");\nassert (Object.prototype.toString.call (new Map ()) === \"[object Map]\");\nassert (Object.prototype.toString.call (Map) === \"[object Function]\");\n\nassert (delete Map.prototype[Symbol.toStringTag]);\nassert (Map.prototype[Symbol.toStringTag] === undefined);\nMap.prototype[Symbol.toStringTag] = \"myStringTag5\";\nassert (Map.prototype.toString.call (new Map ()) === \"[object myStringTag5]\");\nassert (Object.prototype.toString.call (Map) === \"[object Function]\");\nMap.prototype[Symbol.toStringTag] = {};\nassert (Map.prototype.toString.call (new Map) === \"[object Object]\");\n\n/* JSON @@toStringTag */\nassert (JSON[Symbol.toStringTag] === \"JSON\");\nassert (Object.prototype.toString.call (JSON) === \"[object JSON]\");\n\nassert (delete JSON[Symbol.toStringTag]);\nassert (JSON[Symbol.toStringTag] === undefined);\nJSON[Symbol.toStringTag] = \"myStringTag6\";\nassert (Map.prototype.toString.call (JSON) === \"[object myStringTag6]\");\nJSON[Symbol.toStringTag] = {};\nassert (Object.prototype.toString.call (JSON) === \"[object Object]\");\n\nvar typedArrayTypes = [\"Int8Array\",\n                       \"Uint8Array\",\n                       \"Uint8ClampedArray\",\n                       \"Int16Array\",\n                       \"Uint16Array\",\n                       \"Int32Array\",\n                       \"Uint32Array\",\n                       \"Float32Array\",\n                       \"Float64Array\"];\n\nfor (var i = 0; i < typedArrayTypes.length; i++) {\n  var typedArray = this[typedArrayTypes[i]];\n  assert (typedArray.prototype[Symbol.toStringTag] === undefined);\n  assert (Object.prototype.toString.call (typedArray) === \"[object Function]\");\n  assert (Object.prototype.toString.call (typedArray.prototype) === \"[object Object]\");\n\n  var newArray = new typedArray ();\n  assert (newArray[Symbol.toStringTag] === typedArrayTypes[i]);\n  assert (Object.prototype.toString.call (newArray) === \"[object \" + typedArrayTypes[i] + \"]\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-seal-with-symbol.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar s1 = Symbol();\nvar s2 = Symbol();\nvar obj = {};\n\nobj[s1] = 1;\nObject.seal(obj);\n\nobj[s1] = 2;\nobj[s2] = 3\n\nassert(obj[s1] === 2);\nassert(obj[s2] === undefined);\nassert(delete obj[s1] === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/object-values.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test array\nvar arr = [\"a\", \"b\", \"c\"];\nvar values = Object.values(arr);\n\nassert(values.indexOf(\"a\") === 0);\nassert(values.indexOf(\"b\") === 1);\nassert(values.indexOf(\"c\") === 2);\nassert(values.length === 3);\n\n// Test object\nvar obj = {key1: \"a\", key3: \"b\", key2: \"c\", key4: \"d\", key5: \"e\"};\nvar values = Object.values(obj);\n\nassert(values.indexOf(\"a\") === 0);\nassert(values.indexOf(\"b\") === 1);\nassert(values.indexOf(\"c\") === 2);\nassert(values.indexOf(\"d\") === 3);\nassert(values.indexOf(\"e\") === 4);\nassert(values.length === 5);\n\nvar obj2 = {};\nObject.defineProperties(obj2, {\n    key_one: {enumerable: true, value: \"one\"},\n    key_two: {enumerable: false, value: \"two\"},\n});\n\nvar values = Object.values(obj2);\n// values should contain: key_one\nassert(values.indexOf(\"one\") === 0);\nassert(values.indexOf(\"two\") === -1);\nassert(values.length === 1);\n\n// Test prototype chain\nfunction Parent() {}\nParent.prototype.inheritedMethod = function() {};\n\nfunction method() {};\nfunction Child() {\n  this.prop = 5;\n  this.method = method;\n}\n\nChild.prototype = new Parent;\nChild.prototype.prototypeMethod = function() {};\n\nvar values = Object.values(new Child());\n\nassert(values.indexOf(5) === 0);\nassert(values.indexOf(method) === 1);\nassert(values.length === 2);\n\n// Check enumerable properties\nvar o = {};\n\nObject.defineProperty(o, \"a\", {\n  value: \"OK a\",\n  writable: true,\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(o, \"b\", {\n  value: \"NOT_OK\",\n  writable: true,\n  enumerable: false,\n  configurable: true\n});\n\nObject.defineProperty(o, \"c\", {\n  value: \"OK c\",\n  writable: true,\n  enumerable: true,\n  configurable: true\n});\n\nvar values = Object.values(o);\nassert(values.length === 2);\nassert(values[0] === \"OK a\");\nassert(values[1] === \"OK c\");\n\n// Test proxy object\nvar object = {};\n\nObject.defineProperties(object, {\n  a: {\n    value: \"foo\",\n    enumerable: false\n  },\n  b: {\n    value: \"bar\",\n    enumerable: true,\n    writable: false\n  }\n});\n\nvar proxy = new Proxy(object, {\n  getOwnPropertyDescriptor: function(o, v) {\n    handlers.push(\"D\");\n    return Object.getOwnPropertyDescriptor(o, v);\n  },\n  get: function(o, v) {\n    handlers.push(\"G\");\n    return o[v];\n  }\n});\n\nvar handlers = [];\nvar values = Object.values(proxy);\n\nassert(values.length === 1);\nassert(values[0] === \"bar\")\nassert(handlers.length === 3);\nassert(handlers.toString() === \"D,D,G\");\n\n// exception during enumeration\nvar obj = {\n  get a() { throw \"error\" },\n  get b() { throw \"shouldn't run\" }\n};\n\ntry {\n  Object.values(obj);\n} catch (err) {\n  assert(err == \"error\")\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/octal-literal.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction checkSyntaxError (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\ncheckSyntaxError (\"0p\");\ncheckSyntaxError (\"0o\");\ncheckSyntaxError (\"0o0123456789\");\ncheckSyntaxError (\"0o9\");\n\ncheckSyntaxError (\"0p\");\ncheckSyntaxError (\"0O\");\ncheckSyntaxError (\"0O9\");\n\n// Check strict mode\ncheckSyntaxError (\"'use strict'; 0777\");\nassert (eval (\"'use strict'; 0o777\") === 511);\n\nassert (0o123 === 83);\nassert (0o77777777 === 16777215);\nassert (0o767 === parseInt (\"767\", 8));\nassert (0767 === 0o767);\n\nassert (0O123 === 83);\nassert (0O77777777 === 16777215);\nassert (0O767 === parseInt (\"767\", 8));\nassert (0767 === 0O767);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-additive-op-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.7.2\n\nvar tests = [\n  // this\n  'this + this = 42',\n  'this + null = 42',\n  'this + undefined = 42',\n  'this + true = 42',\n  'this + 12 = 42',\n  'this + \"foo\" = 42',\n  'this + [12] = 42',\n  'this + {} = 42',\n  'this + class a {} = 42',\n  'this + function a(){} = 42',\n  'this + /[a]/ = 42',\n  'this + `foo` = 42',\n  'this - this = 42',\n  'this - null = 42',\n  'this - undefined = 42',\n  'this - true = 42',\n  'this - 12 = 42',\n  'this - \"foo\" = 42',\n  'this - [12] = 42',\n  'this - {} = 42',\n  'this - class a {} = 42',\n  'this - function a(){} = 42',\n  'this - /[a]/ = 42',\n  'this - `foo` = 42',\n  // undefined\n  'undefined + null = 42',\n  'undefined + undefined = 42',\n  'undefined + true = 42',\n  'undefined + 12 = 42',\n  'undefined + \"foo\" = 42',\n  'undefined + [12] = 42',\n  'undefined + {} = 42',\n  'undefined + class a {} = 42',\n  'undefined + function a(){} = 42',\n  'undefined + /[a]/ = 42',\n  'undefined + `foo` = 42',\n  'undefined - null = 42',\n  'undefined - undefined = 42',\n  'undefined - true = 42',\n  'undefined - 12 = 42',\n  'undefined - \"foo\" = 42',\n  'undefined - [12] = 42',\n  'undefined - {} = 42',\n  'undefined - class a {} = 42',\n  'undefined - function a(){} = 42',\n  'undefined - /[a]/ = 42',\n  'undefined - `foo` = 42',\n  // NullLiteral\n  'null + null = 42',\n  'null + true = 42',\n  'null + 12 = 42',\n  'null + \"foo\" = 42',\n  'null + [12] = 42',\n  'null + {} = 42',\n  'null + class a {} = 42',\n  'null + function a(){} = 42',\n  'null + /[a]/ = 42',\n  'null + `foo` = 42',\n  'null - null = 42',\n  'null - true = 42',\n  'null - 12 = 42',\n  'null - \"foo\" = 42',\n  'null - [12] = 42',\n  'null - {} = 42',\n  'null - class a {} = 42',\n  'null - function a(){} = 42',\n  'null - /[a]/ = 42',\n  'null - `foo` = 42',\n  // BooleanLiteral \n  'true + true = 42',\n  'true + 12 = 42',\n  'true + \"foo\" = 42',\n  'true + [12] = 42',\n  'true + {} = 42',\n  'true + class a {} = 42',\n  'true + function a(){} = 42',\n  'true + /[a]/ = 42',\n  'true + `foo` = 42',\n  'true - true = 42',\n  'true - 12 = 42',\n  'true - \"foo\" = 42',\n  'true - [12] = 42',\n  'true - {} = 42',\n  'true - class a {} = 42',\n  'true - function a(){} = 42',\n  'true - /[a]/ = 42',\n  'true - `foo` = 42',\n  // DecimalLiteral \n  '5 + 12 = 42',\n  '5 + \"foo\" = 42',\n  '5 + [12] = 42',\n  '5 + {} = 42',\n  '5 + class a {} = 42',\n  '5 + function a(){} = 42',\n  '5 + /[a]/ = 42',\n  '5 + `foo` = 42',\n  '5 - 12 = 42',\n  '5 - \"foo\" = 42',\n  '5 - [12] = 42',\n  '5 - {} = 42',\n  '5 - class a {} = 42',\n  '5 - function a(){} = 42',\n  '5 - /[a]/ = 42',\n  '5 - `foo` = 42',\n  // StringLiteral\n  '\"foo\" + \"foo\" = 42',\n  '\"foo\" + [12] = 42',\n  '\"foo\" + {} = 42',\n  '\"foo\" + class a {} = 42',\n  '\"foo\" + function a(){} = 42',\n  '\"foo\" + /[a]/ = 42',\n  '\"foo\" + `foo` = 42',\n  '\"foo\" - \"foo\" = 42',\n  '\"foo\" - [12] = 42',\n  '\"foo\" - {} = 42',\n  '\"foo\" - class a {} = 42',\n  '\"foo\" - function a(){} = 42',\n  '\"foo\" - /[a]/ = 42',\n  '\"foo\" - `foo` = 42',\n  // ArrayLiteral\n  '[12] + [12] = 42',\n  '[12] + {} = 42',\n  '[12] + class a {} = 42',\n  '[12] + function a(){} = 42',\n  '[12] + /[a]/ = 42',\n  '[12] + `foo` = 42',\n  '[12] - [12] = 42',\n  '[12] - {} = 42',\n  '[12] - class a {} = 42',\n  '[12] - function a(){} = 42',\n  '[12] - /[a]/ = 42',\n  '[12] - `foo` = 42',\n  // ObjectLiteral\n  '{} + {} = 42',\n  '{} + class a {} = 42',\n  '{} + function a(){} = 42',\n  '{} + /[a]/ = 42',\n  '{} + `foo` = 42',\n  '{} - {} = 42',\n  '{} - class a {} = 42',\n  '{} - function a(){} = 42',\n  '{} - /[a]/ = 42',\n  '{} - `foo` = 42',\n  // ClassExpression\n  'class a {} + class b {} = 42',\n  'class a {} + function a(){} = 42',\n  'class a {} + /[a]/ = 42',\n  'class a {} + `foo` = 42',\n  'class a {} - class b {} = 42',\n  'class a {} - function a(){} = 42',\n  'class a {} - /[a]/ = 42',\n  'class a {} - `foo` = 42',\n  // RegularExpressionLiteral\n  '/[a]/ + function a(){} = 42',\n  '/[a]/ + /[a]/ = 42',\n  '/[a]/ + `foo` = 42',\n  '/[a]/ - function a(){} = 42',\n  '/[a]/ - /[a]/ = 42',\n  '/[a]/ - `foo` = 42',\n  // TemplateLiteral\n  '`foo` + function a(){} = 42',\n  '`foo` + `foo` = 42',\n  '`foo` - function a(){} = 42',\n  '`foo` - `foo` = 42',\n  // combining with MultiplicativeExpression\n  '6 * 6 + !4 / 7 = 42',\n  '-6 * !6 - ~4 / \"foo\" = 42',\n  '~\"foo\" * void 12 % 6 = 42',\n  'typeof [] * 8 * [] / !function a(){} = 42',\n  '+[2] % /foo/ + !undefined - +\"[1,2]\" = 42',\n  'var a = 5; ++a * \"foo\" + function a(){} = 42',\n  '+/(?:)/ % 25 + void 6 / typeof class a {} = 42',\n  'function a(){}; var b = new a(); ++a / !23 - !a = 42',\n  'var a = {\"foo\": function(){}}; void \"foo\" % 12 - typeof a.foo = 42',\n  'var a = {\"foo\": function(){}}; void \"foo\" % 12 + typeof a.foo() = 42',\n  'var a = [1,2,3]; !a[0] % /[A]/ + delete 12 = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-binary-bitwise-op-assign-1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.11.2 & operation\n\nvar tests = [\n  // this\n  'this & this = 42',\n  'this & null = 42',\n  'this & undefined = 42',\n  'this & true = 42',\n  'this & 12 = 42',\n  'this & \"foo\" = 42',\n  'this & [12] = 42',\n  'this & class a {} = 42',\n  'this & function a(){} = 42',\n  'this & /[a]/ = 42',\n  'this & `foo` = 42',\n  // undefined\n  'undefined & null = 42',\n  'undefined & undefined = 42',\n  'undefined & true = 42',\n  'undefined & 12 = 42',\n  'undefined & \"foo\" = 42',\n  'undefined & [12] = 42',\n  'undefined & class a {} = 42',\n  'undefined & function a(){} = 42',\n  'undefined & /[a]/ = 42',\n  'undefined & `foo` = 42',\n  // NullLiteral\n  'null & null = 42',\n  'null & true = 42',\n  'null & 12 = 42',\n  'null & \"foo\" = 42',\n  'null & [12] = 42',\n  'null & class a {} = 42',\n  'null & function a(){} = 42',\n  'null & /[a]/ = 42',\n  'null & `foo` = 42',\n  // BooleanLiteral \n  'true & true = 42',\n  'true & 12 = 42',\n  'true & \"foo\" = 42',\n  'true & [12] = 42',\n  'true & class a {} = 42',\n  'true & function a(){} = 42',\n  'true & /[a]/ = 42',\n  'true & `foo` = 42',\n  // DecimalLiteral \n  '5 & 12 = 42',\n  '5 & \"foo\" = 42',\n  '5 & [12] = 42',\n  '5 & class a {} = 42',\n  '5 & function a(){} = 42',\n  '5 & /[a]/ = 42',\n  '5 & `foo` = 42',\n  // StringLiteral\n  '\"foo\" & \"foo\" = 42',\n  '\"foo\" & [12] = 42',\n  '\"foo\" & class a {} = 42',\n  '\"foo\" & function a(){} = 42',\n  '\"foo\" & /[a]/ = 42',\n  '\"foo\" & `foo` = 42',\n  // ArrayLiteral\n  '[12] & [12] = 42',\n  '[12] & class a {} = 42',\n  '[12] & function a(){} = 42',\n  '[12] & /[a]/ = 42',\n  '[12] & `foo` = 42',\n  // ObjectLiteral\n  'this & {} = 42',\n  'undefined & {} = 42',\n  'null & {} = 42',\n  'true & {} = 42',\n  '5 & {} = 42',\n  '\"foo\" & {} = 42',\n  '[12] & {} = 42',\n  '/[a]/ & {} = 42',\n  '`foo` & {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ & class a{} = 42',\n  '/[a]/ & function a(){} = 42',\n  '/[a]/ & /[a]/ = 42',\n  '/[a]/ & `foo` = 42',\n  // TemplateLiteral\n  '`foo` & class a{} = 42',\n  '`foo` & function a(){} = 42',\n  '`foo` & `foo` = 42',\n  // combining with EqualityExpression\n  '[] << !5 * function a(){} & \"foo\" == !\"foo\" % 6 + !4 / 7 = 42',\n  'void function a(){} & +6 << /[A]/ + !6 - ~4 / \"foo\" = 42',\n  'var a = 5; 5 << [] * 12 != [1,2,3] & ++a  * typeof \"foo\" & function a(){} = 42',\n  '`foo` === \"foo\" & +/(?:)/ % 25 + void 6 % delete class a {} = 42',\n  'function a(){}; var b = new a(); 5 & ++a / !23 & !a >> 12 * [] == /foo/ = 42',\n  'var a = {\"foo\": function(){}}; void \"foo\" % 12 & /[A-Z]/ + 12 >> typeof a.foo != a.foo() = 42',\n  '4 % [1,2] - class a{} << typeof \"foo\" == !25 & [] != 13 >> \"foo\" + delete 3 / /(?:)/ = 42',\n  'var a = [1,2,3]; a[2] == \"foo\" >> [] << typeof class a{} * 12 + void [] / [] != !a[0] % /[A]/ - delete `` & ++a[1] - a[2]-- = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-binary-bitwise-op-assign-2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.11.2 ^ operation\n\nvar tests = [\n  // this\n  'this ^ this = 42',\n  'this ^ null = 42',\n  'this ^ undefined = 42',\n  'this ^ true = 42',\n  'this ^ 12 = 42',\n  'this ^ \"foo\" = 42',\n  'this ^ [12] = 42',\n  'this ^ class a {} = 42',\n  'this ^ function a(){} = 42',\n  'this ^ /[a]/ = 42',\n  'this ^ `foo` = 42',\n  // undefined\n  'undefined ^ null = 42',\n  'undefined ^ undefined = 42',\n  'undefined ^ true = 42',\n  'undefined ^ 12 = 42',\n  'undefined ^ \"foo\" = 42',\n  'undefined ^ [12] = 42',\n  'undefined ^ class a {} = 42',\n  'undefined ^ function a(){} = 42',\n  'undefined ^ /[a]/ = 42',\n  'undefined ^ `foo` = 42',\n  // NullLiteral\n  'null ^ null = 42',\n  'null ^ true = 42',\n  'null ^ 12 = 42',\n  'null ^ \"foo\" = 42',\n  'null ^ [12] = 42',\n  'null ^ class a {} = 42',\n  'null ^ function a(){} = 42',\n  'null ^ /[a]/ = 42',\n  'null ^ `foo` = 42',\n  // BooleanLiteral \n  'true ^ true = 42',\n  'true ^ 12 = 42',\n  'true ^ \"foo\" = 42',\n  'true ^ [12] = 42',\n  'true ^ class a {} = 42',\n  'true ^ function a(){} = 42',\n  'true ^ /[a]/ = 42',\n  'true ^ `foo` = 42',\n  // DecimalLiteral \n  '5 ^ 12 = 42',\n  '5 ^ \"foo\" = 42',\n  '5 ^ [12] = 42',\n  '5 ^ class a {} = 42',\n  '5 ^ function a(){} = 42',\n  '5 ^ /[a]/ = 42',\n  '5 ^ `foo` = 42',\n  // StringLiteral\n  '\"foo\" ^ \"foo\" = 42',\n  '\"foo\" ^ [12] = 42',\n  '\"foo\" ^ class a {} = 42',\n  '\"foo\" ^ function a(){} = 42',\n  '\"foo\" ^ /[a]/ = 42',\n  '\"foo\" ^ `foo` = 42',\n  // ArrayLiteral\n  '[12] ^ [12] = 42',\n  '[12] ^ class a {} = 42',\n  '[12] ^ function a(){} = 42',\n  '[12] ^ /[a]/ = 42',\n  '[12] ^ `foo` = 42',\n  // ObjectLiteral\n  'this ^ {} = 42',\n  'undefined ^ {} = 42',\n  'null ^ {} = 42',\n  'true ^ {} = 42',\n  '5 ^ {} = 42',\n  '\"foo\" ^ {} = 42',\n  '[12] ^ {} = 42',\n  '/[a]/ ^ {} = 42',\n  '`foo` ^ {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ ^ class a{} = 42',\n  '/[a]/ ^ function a(){} = 42',\n  '/[a]/ ^ /[a]/ = 42',\n  '/[a]/ ^ `foo` = 42',\n  // TemplateLiteral\n  '`foo` ^ class a{} = 42',\n  '`foo` ^ function a(){} = 42',\n  '`foo` ^ `foo` = 42',\n  // combining with EqualityExpression\n  '[] << !5 * function a(){} ^ \"foo\" == !\"foo\" % 6 + !4 / 7 = 42',\n  'void function a(){} ^ +6 << /[A]/ + !6 - ~4 / \"foo\" = 42',\n  'var a = 5; 5 << [] * 12 != [1,2,3] ^ ++a  * typeof \"foo\" ^ function a(){} = 42',\n  '`foo` === \"foo\" ^ +/(?:)/ % 25 + void 6 % delete class a {} = 42',\n  'function a(){}; var b = new a(); 5 ^ ++a / !23 ^ !a >> 12 * [] == /foo/ = 42',\n  'var a = {\"foo\": function(){}}; void \"foo\" % 12 ^ /[A-Z]/ + 12 >> typeof a.foo != a.foo() = 42',\n  '4 % [1,2] - class a{} << typeof \"foo\" == !25 ^ [] != 13 >> \"foo\" + delete 3 / /(?:)/ = 42',\n  'var a = [1,2,3]; a[2] == \"foo\" >> [] << typeof class a{} * 12 + void [] / [] != !a[0] % /[A]/ - delete `` ^ ++a[1] - a[2]-- = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-binary-bitwise-op-assign-3.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.11.2 | operation\n\nvar tests = [\n  // this\n  'this | this = 42',\n  'this | null = 42',\n  'this | undefined = 42',\n  'this | true = 42',\n  'this | 12 = 42',\n  'this | \"foo\" = 42',\n  'this | [12] = 42',\n  'this | class a {} = 42',\n  'this | function a(){} = 42',\n  'this | /[a]/ = 42',\n  'this | `foo` = 42',\n  // undefined\n  'undefined | null = 42',\n  'undefined | undefined = 42',\n  'undefined | true = 42',\n  'undefined | 12 = 42',\n  'undefined | \"foo\" = 42',\n  'undefined | [12] = 42',\n  'undefined | class a {} = 42',\n  'undefined | function a(){} = 42',\n  'undefined | /[a]/ = 42',\n  'undefined | `foo` = 42',\n  // NullLiteral\n  'null | null = 42',\n  'null | true = 42',\n  'null | 12 = 42',\n  'null | \"foo\" = 42',\n  'null | [12] = 42',\n  'null | class a {} = 42',\n  'null | function a(){} = 42',\n  'null | /[a]/ = 42',\n  'null | `foo` = 42',\n  // BooleanLiteral \n  'true | true = 42',\n  'true | 12 = 42',\n  'true | \"foo\" = 42',\n  'true | [12] = 42',\n  'true | class a {} = 42',\n  'true | function a(){} = 42',\n  'true | /[a]/ = 42',\n  'true | `foo` = 42',\n  // DecimalLiteral \n  '5 | 12 = 42',\n  '5 | \"foo\" = 42',\n  '5 | [12] = 42',\n  '5 | class a {} = 42',\n  '5 | function a(){} = 42',\n  '5 | /[a]/ = 42',\n  '5 | `foo` = 42',\n  // StringLiteral\n  '\"foo\" | \"foo\" = 42',\n  '\"foo\" | [12] = 42',\n  '\"foo\" | class a {} = 42',\n  '\"foo\" | function a(){} = 42',\n  '\"foo\" | /[a]/ = 42',\n  '\"foo\" | `foo` = 42',\n  // ArrayLiteral\n  '[12] | [12] = 42',\n  '[12] | class a {} = 42',\n  '[12] | function a(){} = 42',\n  '[12] | /[a]/ = 42',\n  '[12] | `foo` = 42',\n  // ObjectLiteral\n  'this | {} = 42',\n  'undefined | {} = 42',\n  'null | {} = 42',\n  'true | {} = 42',\n  '5 | {} = 42',\n  '\"foo\" | {} = 42',\n  '[12] | {} = 42',\n  '/[a]/ | {} = 42',\n  '`foo` | {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ | class a{} = 42',\n  '/[a]/ | function a(){} = 42',\n  '/[a]/ | /[a]/ = 42',\n  '/[a]/ | `foo` = 42',\n  // TemplateLiteral\n  '`foo` | class a{} = 42',\n  '`foo` | function a(){} = 42',\n  '`foo` | `foo` = 42',\n  // combining with EqualityExpression\n  '[] << !5 * function a(){} | \"foo\" == !\"foo\" % 6 + !4 / 7 = 42',\n  'void function a(){} | +6 << /[A]/ + !6 - ~4 / \"foo\" = 42',\n  'var a = 5; 5 << [] * 12 != [1,2,3] | ++a  * typeof \"foo\" | function a(){} = 42',\n  '`foo` === \"foo\" | +/(?:)/ % 25 + void 6 % delete class a {} = 42',\n  'function a(){}; var b = new a(); 5 | ++a / !23 | !a >> 12 * [] == /foo/ = 42',\n  'var a = {\"foo\": function(){}}; void \"foo\" % 12 | /[A-Z]/ + 12 >> typeof a.foo != a.foo() = 42',\n  '4 % [1,2] - class a{} << typeof \"foo\" == !25 | [] != 13 >> \"foo\" + delete 3 / /(?:)/ = 42',\n  'var a = [1,2,3]; a[2] == \"foo\" >> [] << typeof class a{} * 12 + void [] / [] != !a[0] % /[A]/ - delete `` | ++a[1] - a[2]-- = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-binary-logical-op-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.12.1\n\nvar tests = [\n  // this\n  'this && this = 42',\n  'this && null = 42',\n  'this && undefined = 42',\n  'this && true = 42',\n  'this && 12 = 42',\n  'this && \"foo\" = 42',\n  'this && [12] = 42',\n  'this && class a {} = 42',\n  'this && function a(){} = 42',\n  'this && /[a]/ = 42',\n  'this && `foo` = 42',\n  'this || this = 42',\n  'this || null = 42',\n  'this || undefined = 42',\n  'this || true = 42',\n  'this || 12 = 42',\n  'this || \"foo\" = 42',\n  'this || [12] = 42',\n  'this || class a {} = 42',\n  'this || function a(){} = 42',\n  'this || /[a]/ = 42',\n  'this || `foo` = 42',\n  // undefined\n  'undefined && null = 42',\n  'undefined && undefined = 42',\n  'undefined && true = 42',\n  'undefined && 12 = 42',\n  'undefined && \"foo\" = 42',\n  'undefined && [12] = 42',\n  'undefined && class a {} = 42',\n  'undefined && function a(){} = 42',\n  'undefined && /[a]/ = 42',\n  'undefined && `foo` = 42',\n  'undefined || null = 42',\n  'undefined || undefined = 42',\n  'undefined || true = 42',\n  'undefined || 12 = 42',\n  'undefined || \"foo\" = 42',\n  'undefined || [12] = 42',\n  'undefined || class a {} = 42',\n  'undefined || function a(){} = 42',\n  'undefined || /[a]/ = 42',\n  'undefined || `foo` = 42',\n  // NullLiteral\n  'null && null = 42',\n  'null && true = 42',\n  'null && 12 = 42',\n  'null && \"foo\" = 42',\n  'null && [12] = 42',\n  'null && class a {} = 42',\n  'null && function a(){} = 42',\n  'null && /[a]/ = 42',\n  'null && `foo` = 42',\n  'null || null = 42',\n  'null || true = 42',\n  'null || 12 = 42',\n  'null || \"foo\" = 42',\n  'null || [12] = 42',\n  'null || class a {} = 42',\n  'null || function a(){} = 42',\n  'null || /[a]/ = 42',\n  'null || `foo` = 42',\n  // BooleanLiteral \n  'true && true = 42',\n  'true && 12 = 42',\n  'true && \"foo\" = 42',\n  'true && [12] = 42',\n  'true && class a {} = 42',\n  'true && function a(){} = 42',\n  'true && /[a]/ = 42',\n  'true && `foo` = 42',\n  'true || true = 42',\n  'true || 12 = 42',\n  'true || \"foo\" = 42',\n  'true || [12] = 42',\n  'true || class a {} = 42',\n  'true || function a(){} = 42',\n  'true || /[a]/ = 42',\n  'true || `foo` = 42',\n  // DecimalLiteral \n  '5 && 12 = 42',\n  '5 && \"foo\" = 42',\n  '5 && [12] = 42',\n  '5 && class a {} = 42',\n  '5 && function a(){} = 42',\n  '5 && /[a]/ = 42',\n  '5 && `foo` = 42',\n  '5 || 12 = 42',\n  '5 || \"foo\" = 42',\n  '5 || [12] = 42',\n  '5 || class a {} = 42',\n  '5 || function a(){} = 42',\n  '5 || /[a]/ = 42',\n  '5 || `foo` = 42',\n  // StringLiteral\n  '\"foo\" && \"foo\" = 42',\n  '\"foo\" && [12] = 42',\n  '\"foo\" && class a {} = 42',\n  '\"foo\" && function a(){} = 42',\n  '\"foo\" && /[a]/ = 42',\n  '\"foo\" && `foo` = 42',\n  '\"foo\" || \"foo\" = 42',\n  '\"foo\" || [12] = 42',\n  '\"foo\" || class a {} = 42',\n  '\"foo\" || function a(){} = 42',\n  '\"foo\" || /[a]/ = 42',\n  '\"foo\" || `foo` = 42',\n  // ArrayLiteral\n  '[12] && [12] = 42',\n  '[12] && class a {} = 42',\n  '[12] && function a(){} = 42',\n  '[12] && /[a]/ = 42',\n  '[12] && `foo` = 42',\n  '[12] || [12] = 42',\n  '[12] || class a {} = 42',\n  '[12] || function a(){} = 42',\n  '[12] || /[a]/ = 42',\n  '[12] || `foo` = 42',\n  // ObjectLiteral\n  'this && {} = 42',\n  'this || {} = 42',\n  'undefined && {} = 42',\n  'undefined || {} = 42',\n  'null && {} = 42',\n  'null || {} = 42',\n  'true && {} = 42',\n  'true || {} = 42',\n  '5 && {} = 42',\n  '5 || {} = 42',\n  '\"foo\" && {} = 42',\n  '\"foo\" || {} = 42',\n  '[12] && {} = 42',\n  '[12] || {} = 42',\n  '/[a]/ && {} = 42',\n  '`foo` && {} = 42',\n  '/[a]/ || {} = 42',\n  '`foo` || {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ && class a{} = 42',\n  '/[a]/ && function a(){} = 42',\n  '/[a]/ && /[a]/ = 42',\n  '/[a]/ && `foo` = 42',\n  '/[a]/ || class a{} = 42',\n  '/[a]/ || function a(){} = 42',\n  '/[a]/ || /[a]/ = 42',\n  '/[a]/ || `foo` = 42',\n  // TemplateLiteral\n  '`foo` && class a{} = 42',\n  '`foo` && function a(){} = 42',\n  '`foo` && `foo` = 42',\n  '`foo` || class a{} = 42',\n  '`foo` || function a(){} = 42',\n  '`foo` || `foo` = 42',\n  // combining with BitwiseORExpression and LogicalANDExpression\n  '[] << !5 * function a(){} | \"foo\" == !\"foo\" % 6 + !4 / 7 || 23 & +[] >> 4 * delete 12 = 42',\n  '[] << !5 * function a(){} | \"foo\" == !\"foo\" % 6 + !4 / 7 && 23 & +[] >> 4 * delete 12 = 42',\n  '4 % [1,2] - class a{} << typeof \"foo\" == !25 | [] != 13 >> \"foo\" + delete 3 / /(?:)/ || ++a * \"foo\" + function a(){} = 42',\n  '4 % [1,2] - class a{} << typeof \"foo\" == !25 | [] != 13 >> \"foo\" + delete 3 / /(?:)/ && ++a * \"foo\" + function a(){} = 42',\n  '`foo` === \"foo\" | +/(?:)/ % 25 + void 6 % delete class a {} || 5 >> void function a(){} !== +6 * !6 - ~4 / \"foo\" = 42',\n  '`foo` === \"foo\" | +/(?:)/ % 25 + void 6 % delete class a {} && 5 >> void function a(){} !== +6 * !6 - ~4 / \"foo\" = 42',\n  'var a = 5; 5 + class a{} << typeof \"foo\" == !25 | [] != 13 >> \"foo\" + delete 3 || 5 << [] * 12 != [1,2,3] ^ ++a  * typeof \"foo\" ^ function a(){} = 42',\n  'var a = 5; 5 + class a{} << typeof \"foo\" == !25 | [] != 13 >> \"foo\" + delete 3 && 5 << [] * 12 != [1,2,3] ^ ++a  * typeof \"foo\" ^ function a(){} = 42',\n  '[1,2] >> +5 * function a(){} ^ !\"foo\" == !\"foo\" % ~6 + !4 / void /foo/ || [3] << !5 * function a(){} ^ \"foo\" == !\"foo\" % 6 + !0b11 / 0xFF = 42',\n  '[1,2] >> +5 * function a(){} ^ !\"foo\" == !\"foo\" % ~6 + !4 / void /foo/ && [3] << !5 * function a(){} ^ \"foo\" == !\"foo\" % 6 + !0b11 / 0xFF = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-covered-parenthesized-exp-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA-262 v6 12.2.1.5 and 12.2.10.3\n\nvar tests = [\n  // this\n  '(this) = 42;',\n  // NullLiteral\n  '(null) = 42;',\n  // BooleanLiteral\n  '(false) = 42;',\n  '(true) = 42;',\n  // DecimalLiteral\n  '(12) = 42;',\n  '(0.12) = 42;',\n  '(.12) = 42;',\n  '(1.23e4) = 42;',\n  '(.23e-2) = 42;',\n  // BinaryIntegerLiteral\n  '(0b11) = 42; ',\n  '(0B11) = 42;',\n  // OctalIntegerLiteral\n  '(0o67) = 42;',\n  '(0O67) = 42;',\n  // HexIntegerLiteral\n  '(0xDD) = 42;',\n  '(0XDD) = 42;',\n  // StringLiteral\n  '(\"foo\") = 42;',\n  '(\\'foo\\') = 42;',\n  '(\"\\\\n\") = 42;',\n  '(\\'\\\\n\\') = 42;',\n  '(\"\\\\0\") = 42;',\n  '(\\'\\\\0\\') = 42;',\n  '(\"\\\\x0F\") = 42;',\n  '(\\'\\\\x0F\\') = 42;',\n  '(\"\\\\uFFFF\") = 42;',\n  '(\\'\\\\uFFFF\\') = 42;',\n  '(\"\\\\u{F}\") = 42;',\n  '(\\'\\\\u{F}\\') = 42;',\n  '(\"\\\\d\") = 42;',\n  '(\\'\\\\d\\') = 42;',\n  '(\"\\\\u000A\") = 42;',\n  '(\\'\\\\u000A\\') = 42;',\n  // ArrayLiteral\n  '([]) = 42;',\n  '([1]) = 42;',\n  '([1,,]) = 42;',\n  '([1,a=5]) = 42;',\n  // ObjectLiteral\n  '({}) = 42;',\n  '({yield}) = 42;',\n  '({$a}) = 42;',\n  '({a}) = 42;',\n  '({a : 5}) = 42;',\n  '({5 : 5}) = 42;',\n  '({\"foo\" : 5}) = 42;',\n  '({[key] : 5}) = 42;',\n  '({func(){}}) = 42;',\n  '({get(){}}) = 42;',\n  '({set(prop){}}) = 42;',\n  '({*func(){}}) = 42;',\n  // FunctionExpression\n  '(function(){}) = 42;',\n  '(function(...a){}) = 42;',\n  '(function a(){}) = 42;',\n  '(function a(...a){}) = 42;',\n  '(function (a){}) = 42;',\n  '(function a(a){}) = 42;',\n  // ClassExpression\n  '(class a {}) = 42;',\n  'class b {}; (class a extends b {}) = 42;',\n  '(class a {function(){}}) = 42;',\n  // GeneratorExpression\n  '(function *a (){}) = 42;',\n  // RegularExpressionLiteral\n  '(/(?:)/) = 42;',\n  '(/a/) = 42;',\n  '(/\\\\a/) = 42;',\n  '(/[a]/) = 42;',\n  '(/a/g) = 42;',\n  '(/a/i) = 42;',\n  '(/a/m) = 42;',\n  '(/a/u) = 42;',\n  '(/a/y) = 42;',\n  // TemplateLiteral\n  '(``) = 42;',\n  'a = 5; (`${a}`) = 42;',\n  '(`\\\\a`) = 42;',\n  '(`\\\\0`) = 42;',\n  '(`\\\\xFF`) = 42;',\n  '(`\\\\uFFFF`) = 42;',\n  '(`\\\\u{F}`) = 42;',\n  '(`foo`) = 42;',\n  '(`\\\\u000A`) = 42;',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-delete-op-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA-262 v6 12.5.3 delete UnaryExpression\n\nvar tests = [\n  // IdentifierReference\n  'var obj = {a : 10, ret : function(params) {delete a = 42;}}',\n  // NullLiteral\n  'var a = null; delete a = 42',\n  // BooleanLiteral \n  'var a = true; delete a = 42',\n  'var a = false; delete a = 42',\n  // DecimalLiteral \n  'var a = 5; delete a = 42',\n  'var a = 1.23e4; delete a = 42',\n  // BinaryIntegerLiteral \n  'var a = 0b11; delete a = 42',\n  'var a = 0B11; delete a = 42',\n  // OctalIntegerLiteral \n  'var a = 0o66; delete a = 42',\n  'var a = 0O66; delete a = 42',\n  // HexIntegerLiteral \n  'var a = 0xFF; delete a = 42',\n  'var a = 0xFF; delete a = 42',\n  // StringLiteral\n  'var a = \"foo\"; delete a = 42',\n  'var a = \"\\\\n\"; delete a = 42',\n  'var a = \"\\\\uFFFF\"; delete a = 42',\n  'var a =\"\\\\u{F}\"; delete a = 42',\n  // ArrayLiteral\n  'var a = []; delete a = 42',\n  'var a = [1,a=5]; delete a = 42',\n  // ObjectLiteral\n  'var a = {}; delete a = 42',\n  'var a = {\"foo\" : 5}; delete a = 42',\n  'var a = {5 : 5}; delete a = 42',\n  'var a = {a : 5}; delete a = 42',\n  'var a = {[key] : 5}; delete a = 42',\n  'var a = {func(){}}; delete a = 42',\n  'var a = {get(){}}; delete a = 42',\n  'var a = {set(prop){}}; delete a = 42',\n  'var a = {*func(){}}; delete a = 42',\n  // ClassExpression\n  'class a {}; delete a = 42',\n  'class a {}; class b extends a {}; delete b = 42',\n  'class a {function(){}}; delete a = 42',\n  // GeneratorExpression\n  'function *a (){}; delete a = 42',\n  // RegularExpressionLiteral\n  'var a = /(?:)/; delete a = 42',\n  'var a = /a/; delete a = 42',\n  'var a = /[a]/; delete a = 42',\n  'var a = /a/g; delete a = 42',\n  // TemplateLiteral\n  'var a = ``; delete a = 42',\n  'a = 5; var b = (`${a}`); delete b = 42',\n  'var a = `foo`; delete a = 42',\n  'var a = `\\\\uFFFF`; delete a = 42',\n  // MemberExpression\n  'var a = [1,2,3]; delete a[0] = 42',\n  'var a = {0:12}; delete a[0] = 42',\n  'var a = {\"foo\":12}; delete a.foo = 42',\n  'var a = {func: function(){}}; delete a.func = 42',\n  // SuperProperty\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {delete super.foo = 42;}}',\n  // NewExpression\n  'function a() {}; var b = new a(); delete b = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); delete a = 42',\n  'class a {}; var n = new a(); delete a = 42',\n  // CallExpression\n  'function a(prop){return prop}; var b = a(12); delete b = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-equality-exp-assign-1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.10.1 == and != operations\n\nvar tests = [\n  // this\n  'this == this = 42',\n  'this == null = 42',\n  'this == undefined = 42',\n  'this == true = 42',\n  'this == 12 = 42',\n  'this == \"foo\" = 42',\n  'this == [12] = 42',\n  'this == class a {} = 42',\n  'this == function a(){} = 42',\n  'this == /[a]/ = 42',\n  'this == `foo` = 42',\n  'this != this = 42',\n  'this != null = 42',\n  'this != undefined = 42',\n  'this != true = 42',\n  'this != 12 = 42',\n  'this != \"foo\" = 42',\n  'this != [12] = 42',\n  'this != class a {} = 42',\n  'this != function a(){} = 42',\n  'this != /[a]/ = 42',\n  'this != `foo` = 42',\n  // undefined\n  'undefined == null = 42',\n  'undefined == undefined = 42',\n  'undefined == true = 42',\n  'undefined == 12 = 42',\n  'undefined == \"foo\" = 42',\n  'undefined == [12] = 42',\n  'undefined == class a {} = 42',\n  'undefined == function a(){} = 42',\n  'undefined == /[a]/ = 42',\n  'undefined == `foo` = 42',\n  'undefined != null = 42',\n  'undefined != undefined = 42',\n  'undefined != true = 42',\n  'undefined != 12 = 42',\n  'undefined != \"foo\" = 42',\n  'undefined != [12] = 42',\n  'undefined != class a {} = 42',\n  'undefined != function a(){} = 42',\n  'undefined != /[a]/ = 42',\n  'undefined != `foo` = 42',\n  // NullLiteral\n  'null == null = 42',\n  'null == true = 42',\n  'null == 12 = 42',\n  'null == \"foo\" = 42',\n  'null == [12] = 42',\n  'null == class a {} = 42',\n  'null == function a(){} = 42',\n  'null == /[a]/ = 42',\n  'null == `foo` = 42',\n  'null != null = 42',\n  'null != true = 42',\n  'null != 12 = 42',\n  'null != \"foo\" = 42',\n  'null != [12] = 42',\n  'null != class a {} = 42',\n  'null != function a(){} = 42',\n  'null != /[a]/ = 42',\n  'null != `foo` = 42',\n  // BooleanLiteral \n  'true == true = 42',\n  'true == 12 = 42',\n  'true == \"foo\" = 42',\n  'true == [12] = 42',\n  'true == class a {} = 42',\n  'true == function a(){} = 42',\n  'true == /[a]/ = 42',\n  'true == `foo` = 42',\n  'true != true = 42',\n  'true != 12 = 42',\n  'true != \"foo\" = 42',\n  'true != [12] = 42',\n  'true != class a {} = 42',\n  'true != function a(){} = 42',\n  'true != /[a]/ = 42',\n  'true != `foo` = 42',\n  // DecimalLiteral \n  '5 == 12 = 42',\n  '5 == \"foo\" = 42',\n  '5 == [12] = 42',\n  '5 == class a {} = 42',\n  '5 == function a(){} = 42',\n  '5 == /[a]/ = 42',\n  '5 == `foo` = 42',\n  '5 != 12 = 42',\n  '5 != \"foo\" = 42',\n  '5 != [12] = 42',\n  '5 != class a {} = 42',\n  '5 != function a(){} = 42',\n  '5 != /[a]/ = 42',\n  '5 != `foo` = 42',\n  // StringLiteral\n  '\"foo\" == \"foo\" = 42',\n  '\"foo\" == [12] = 42',\n  '\"foo\" == class a {} = 42',\n  '\"foo\" == function a(){} = 42',\n  '\"foo\" == /[a]/ = 42',\n  '\"foo\" == `foo` = 42',\n  '\"foo\" != \"foo\" = 42',\n  '\"foo\" != [12] = 42',\n  '\"foo\" != class a {} = 42',\n  '\"foo\" != function a(){} = 42',\n  '\"foo\" != /[a]/ = 42',\n  '\"foo\" != `foo` = 42',\n  // ArrayLiteral\n  '[12] == [12] = 42',\n  '[12] == class a {} = 42',\n  '[12] == function a(){} = 42',\n  '[12] == /[a]/ = 42',\n  '[12] == `foo` = 42',\n  '[12] != [12] = 42',\n  '[12] != class a {} = 42',\n  '[12] != function a(){} = 42',\n  '[12] != /[a]/ = 42',\n  '[12] != `foo` = 42',\n  // ObjectLiteral\n  'this == {} = 42',\n  'this != {} = 42',\n  'undefined == {} = 42',\n  'undefined != {} = 42',\n  'null == {} = 42',\n  'null != {} = 42',\n  'true == {} = 42',\n  'true != {} = 42',\n  '5 == {} = 42',\n  '5 != {} = 42',\n  '\"foo\" == {} = 42',\n  '\"foo\" != {} = 42',\n  '[12] == {} = 42',\n  '[12] != {} = 42',\n  '/[a]/ == {} = 42',\n  '`foo` == {} = 42',\n  '/[a]/ != {} = 42',\n  '`foo` != {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ == class a{} = 42',\n  '/[a]/ == function a(){} = 42',\n  '/[a]/ == /[a]/ = 42',\n  '/[a]/ == `foo` = 42',\n  '/[a]/ != class a{} = 42',\n  '/[a]/ != function a(){} = 42',\n  '/[a]/ != /[a]/ = 42',\n  '/[a]/ != `foo` = 42',\n  // TemplateLiteral\n  '`foo` == class a{} = 42',\n  '`foo` == function a(){} = 42',\n  '`foo` == `foo` = 42',\n  '`foo` != class a{} = 42',\n  '`foo` != function a(){} = 42',\n  '`foo` != `foo` = 42',\n  // combining with RelationalExpression\n  '\"foo\" == 6 * 6 + !4 / 7 = 42',\n  '5 >> void function a(){} != +6 * !6 - ~4 / \"foo\" = 42',\n  'var a = 5; \"foo\" >> 5 >= 12 != --a / \"foo\" << function a(){} = 42',\n  '~`foo` << !5 == /(?:)/ >> \"foo\" + void 6 / typeof class a {} = 42',\n  'function a(){}; var b = new a(); 6 + 3 == +/[A]/ / \"foo\" + 2 << 12 == 5 >> b / !23 + ++b = 42',\n  'var a = {\"foo\": function(){}}; !4 * delete a != 3 >> void \"foo\" % 12 != ++a.foo = 42',\n  'var a = {\"foo\": function(){}}; [1,2,3] / 5 >> void \"foo\" == 5 << -\"foo\" % 12 == typeof a.foo() = 42',\n  'var a = [1,2,3]; a[2] == !a[0] % /[A]/ - delete 12 = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-equality-exp-assign-2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.10.1 === and !== operations\n\nvar tests = [\n  // this\n  'this === this = 42',\n  'this === null = 42',\n  'this === undefined = 42',\n  'this === true = 42',\n  'this === 12 = 42',\n  'this === \"foo\" = 42',\n  'this === [12] = 42',\n  'this === class a {} = 42',\n  'this === function a(){} = 42',\n  'this === /[a]/ = 42',\n  'this === `foo` = 42',\n  'this !== this = 42',\n  'this !== null = 42',\n  'this !== undefined = 42',\n  'this !== true = 42',\n  'this !== 12 = 42',\n  'this !== \"foo\" = 42',\n  'this !== [12] = 42',\n  'this !== class a {} = 42',\n  'this !== function a(){} = 42',\n  'this !== /[a]/ = 42',\n  'this !== `foo` = 42',\n  // undefined\n  'undefined === null = 42',\n  'undefined === undefined = 42',\n  'undefined === true = 42',\n  'undefined === 12 = 42',\n  'undefined === \"foo\" = 42',\n  'undefined === [12] = 42',\n  'undefined === class a {} = 42',\n  'undefined === function a(){} = 42',\n  'undefined === /[a]/ = 42',\n  'undefined === `foo` = 42',\n  'undefined !== null = 42',\n  'undefined !== undefined = 42',\n  'undefined !== true = 42',\n  'undefined !== 12 = 42',\n  'undefined !== \"foo\" = 42',\n  'undefined !== [12] = 42',\n  'undefined !== class a {} = 42',\n  'undefined !== function a(){} = 42',\n  'undefined !== /[a]/ = 42',\n  'undefined !== `foo` = 42',\n  // NullLiteral\n  'null === null = 42',\n  'null === true = 42',\n  'null === 12 = 42',\n  'null === \"foo\" = 42',\n  'null === [12] = 42',\n  'null === class a {} = 42',\n  'null === function a(){} = 42',\n  'null === /[a]/ = 42',\n  'null === `foo` = 42',\n  'null !== null = 42',\n  'null !== true = 42',\n  'null !== 12 = 42',\n  'null !== \"foo\" = 42',\n  'null !== [12] = 42',\n  'null !== class a {} = 42',\n  'null !== function a(){} = 42',\n  'null !== /[a]/ = 42',\n  'null !== `foo` = 42',\n  // BooleanLiteral \n  'true === true = 42',\n  'true === 12 = 42',\n  'true === \"foo\" = 42',\n  'true === [12] = 42',\n  'true === class a {} = 42',\n  'true === function a(){} = 42',\n  'true === /[a]/ = 42',\n  'true === `foo` = 42',\n  'true !== true = 42',\n  'true !== 12 = 42',\n  'true !== \"foo\" = 42',\n  'true !== [12] = 42',\n  'true !== class a {} = 42',\n  'true !== function a(){} = 42',\n  'true !== /[a]/ = 42',\n  'true !== `foo` = 42',\n  // DecimalLiteral \n  '5 === 12 = 42',\n  '5 === \"foo\" = 42',\n  '5 === [12] = 42',\n  '5 === class a {} = 42',\n  '5 === function a(){} = 42',\n  '5 === /[a]/ = 42',\n  '5 === `foo` = 42',\n  '5 !== 12 = 42',\n  '5 !== \"foo\" = 42',\n  '5 !== [12] = 42',\n  '5 !== class a {} = 42',\n  '5 !== function a(){} = 42',\n  '5 !== /[a]/ = 42',\n  '5 !== `foo` = 42',\n  // StringLiteral\n  '\"foo\" === \"foo\" = 42',\n  '\"foo\" === [12] = 42',\n  '\"foo\" === class a {} = 42',\n  '\"foo\" === function a(){} = 42',\n  '\"foo\" === /[a]/ = 42',\n  '\"foo\" === `foo` = 42',\n  '\"foo\" !== \"foo\" = 42',\n  '\"foo\" !== [12] = 42',\n  '\"foo\" !== class a {} = 42',\n  '\"foo\" !== function a(){} = 42',\n  '\"foo\" !== /[a]/ = 42',\n  '\"foo\" !== `foo` = 42',\n  // ArrayLiteral\n  '[12] === [12] = 42',\n  '[12] === class a {} = 42',\n  '[12] === function a(){} = 42',\n  '[12] === /[a]/ = 42',\n  '[12] === `foo` = 42',\n  '[12] !== [12] = 42',\n  '[12] !== class a {} = 42',\n  '[12] !== function a(){} = 42',\n  '[12] !== /[a]/ = 42',\n  '[12] !== `foo` = 42',\n  // ObjectLiteral\n  'this === {} = 42',\n  'this !== {} = 42',\n  'undefined === {} = 42',\n  'undefined !== {} = 42',\n  'null === {} = 42',\n  'null !== {} = 42',\n  'true === {} = 42',\n  'true !== {} = 42',\n  '5 === {} = 42',\n  '5 !== {} = 42',\n  '\"foo\" === {} = 42',\n  '\"foo\" !== {} = 42',\n  '[12] === {} = 42',\n  '[12] !== {} = 42',\n  '/[a]/ === {} = 42',\n  '`foo` === {} = 42',\n  '/[a]/ !== {} = 42',\n  '`foo` !== {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ === class a{} = 42',\n  '/[a]/ === function a(){} = 42',\n  '/[a]/ === /[a]/ = 42',\n  '/[a]/ === `foo` = 42',\n  '/[a]/ !== class a{} = 42',\n  '/[a]/ !== function a(){} = 42',\n  '/[a]/ !== /[a]/ = 42',\n  '/[a]/ !== `foo` = 42',\n  // TemplateLiteral\n  '`foo` === class a{} = 42',\n  '`foo` === function a(){} = 42',\n  '`foo` === `foo` = 42',\n  '`foo` !== class a{} = 42',\n  '`foo` !== function a(){} = 42',\n  '`foo` !== `foo` = 42',\n  // combining with RelationalExpression\n  '\"foo\" === 6 * 6 + !4 / 7 = 42',\n  '5 >> void function a(){} !== +6 * !6 - ~4 / \"foo\" = 42',\n  'var a == 5; \"foo\" >> 5 >== 12 !== --a / \"foo\" << function a(){} = 42',\n  '~`foo` << !5 === /(?:)/ >> \"foo\" + void 6 / typeof class a {} = 42',\n  'function a(){}; var b == new a(); 6 + 3 === +/[A]/ / \"foo\" + 2 << 12 === 5 >> b / !23 + ++b = 42',\n  'var a == {\"foo\": function(){}}; !4 * delete a !== 3 >> void \"foo\" % 12 !== ++a.foo = 42',\n  'var a == {\"foo\": function(){}}; [1,2,3] / 5 >> void \"foo\" === 5 << -\"foo\" % 12 === typeof a.foo() = 42',\n  'var a == [1,2,3]; a[2] === !a[0] % /[A]/ - delete 12 = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-mult-op-assign-1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.6.2 * operator\n\nvar tests = [\n  // this\n  'this * this = 42',\n  'this * null = 42',\n  'this * undefined = 42',\n  'this * true = 42',\n  'this * 12 = 42',\n  'this * \"foo\" = 42',\n  'this * [12] = 42',\n  'this * class a {} = 42',\n  'this * function a(){} = 42',\n  'this * /[a]/ = 42',\n  'this * `foo` = 42',\n  // undefined\n  'undefined * null = 42',\n  'undefined * undefined = 42',\n  'undefined * true = 42',\n  'undefined * 12 = 42',\n  'undefined * \"foo\" = 42',\n  'undefined * [12] = 42',\n  'undefined * class a {} = 42',\n  'undefined * function a(){} = 42',\n  'undefined * /[a]/ = 42',\n  'undefined * `foo` = 42',\n  // NullLiteral\n  'null * null = 42',\n  'null * true = 42',\n  'null * 12 = 42',\n  'null * \"foo\" = 42',\n  'null * [12] = 42',\n  'null * class a {} = 42',\n  'null * function a(){} = 42',\n  'null * /[a]/ = 42',\n  'null * `foo` = 42',\n  // BooleanLiteral \n  'true * true = 42',\n  'true * 12 = 42',\n  'true * \"foo\" = 42',\n  'true * [12] = 42',\n  'true * class a {} = 42',\n  'true * function a(){} = 42',\n  'true * /[a]/ = 42',\n  'true * `foo` = 42',\n  // DecimalLiteral \n  '5 * 12 = 42',\n  '5 * \"foo\" = 42',\n  '5 * [12] = 42',\n  '5 * class a {} = 42',\n  '5 * function a(){} = 42',\n  '5 * /[a]/ = 42',\n  '5 * `foo` = 42',\n  // StringLiteral\n  '\"foo\" * \"foo\" = 42',\n  '\"foo\" * [12] = 42',\n  '\"foo\" * class a {} = 42',\n  '\"foo\" * function a(){} = 42',\n  '\"foo\" * /[a]/ = 42',\n  '\"foo\" * `foo` = 42',\n  // ArrayLiteral\n  '[12] * [12] = 42',\n  '[12] * class a {} = 42',\n  '[12] * function a(){} = 42',\n  '[12] * /[a]/ = 42',\n  '[12] * `foo` = 42',\n  // ObjectLiteral\n  'this * {} = 42',\n  'undefined * {} = 42',\n  'null * {} = 42',\n  'true * {} = 42',\n  '5 * {} = 42',\n  '\"foo\" * {} = 42',\n  '[12] * {} = 42',\n  '/[a]/ * {} = 42',\n  '`foo` * {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ * class a{} = 42',\n  '/[a]/ * function a(){} = 42',\n  '/[a]/ * /[a]/ = 42',\n  '/[a]/ * `foo` = 42',\n  // TemplateLiteral\n  '`foo` * class a{} = 42',\n  '`foo` * function a(){} = 42',\n  '`foo` * `foo` = 42',\n  // combining with UnaryExpression\n  '6 * +6 = 42',\n  '6 * -6 = 42',\n  '6 * !6 = 42',\n  '6 * ~6 = 42',\n  'typeof 6 * ~6 = 42',\n  'var a = 6; 6 * ++a = 42',\n  'var a = 6; 6 * --a = 42',\n  'function a(){}; var b = new a(); \"foo\" * ++a = 42',\n  'class a {}; var b = new a(); ++b * function c(){} = 42',\n  'var a = [1,2,3]; var b = {\"foo\" : function(){}}; !a[0] * b.foo = 42',\n  'var a = [1,2,3]; var b = {\"foo\" : function(){}}; !a[0] * b.foo() = 42',\n  'var a = [1]; var b = {\"foo\" : function(){}}; ++a[0] * void b.foo() = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n    "
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-mult-op-assign-2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.6.2 / operator\n\nvar tests = [\n  // this\n  'this / this = 42',\n  'this / null = 42',\n  'this / undefined = 42',\n  'this / true = 42',\n  'this / 12 = 42',\n  'this / \"foo\" = 42',\n  'this / [12] = 42',\n  'this / class a {} = 42',\n  'this / function a(){} = 42',\n  'this / /[a]/ = 42',\n  'this / `foo` = 42',\n  // undefined\n  'undefined / null = 42',\n  'undefined / undefined = 42',\n  'undefined / true = 42',\n  'undefined / 12 = 42',\n  'undefined / \"foo\" = 42',\n  'undefined / [12] = 42',\n  'undefined / class a {} = 42',\n  'undefined / function a(){} = 42',\n  'undefined / /[a]/ = 42',\n  'undefined / `foo` = 42',\n  // NullLiteral\n  'null / null = 42',\n  'null / true = 42',\n  'null / 12 = 42',\n  'null / \"foo\" = 42',\n  'null / [12] = 42',\n  'null / class a {} = 42',\n  'null / function a(){} = 42',\n  'null / /[a]/ = 42',\n  'null / `foo` = 42',\n  // BooleanLiteral \n  'true / true = 42',\n  'true / 12 = 42',\n  'true / \"foo\" = 42',\n  'true / [12] = 42',\n  'true / class a {} = 42',\n  'true / function a(){} = 42',\n  'true / /[a]/ = 42',\n  'true / `foo` = 42',\n  // DecimalLiteral \n  '5 / 12 = 42',\n  '5 / \"foo\" = 42',\n  '5 / [12] = 42',\n  '5 / class a {} = 42',\n  '5 / function a(){} = 42',\n  '5 / /[a]/ = 42',\n  '5 / `foo` = 42',\n  // StringLiteral\n  '\"foo\" / \"foo\" = 42',\n  '\"foo\" / [12] = 42',\n  '\"foo\" / class a {} = 42',\n  '\"foo\" / function a(){} = 42',\n  '\"foo\" / /[a]/ = 42',\n  '\"foo\" / `foo` = 42',\n  // ArrayLiteral\n  '[12] / [12] = 42',\n  '[12] / class a {} = 42',\n  '[12] / function a(){} = 42',\n  '[12] / /[a]/ = 42',\n  '[12] / `foo` = 42',\n  // ObjectLiteral\n  'this / {} = 42',\n  'undefined / {} = 42',\n  'null / {} = 42',\n  'true / {} = 42',\n  '5 / {} = 42',\n  '\"foo\" / {} = 42',\n  '[12] / {} = 42',\n  '/[a]/ / {} = 42',\n  '`foo` / {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ / class a{} = 42',\n  '/[a]/ / function a(){} = 42',\n  '/[a]/ / /[a]/ = 42',\n  '/[a]/ / `foo` = 42',\n  // TemplateLiteral\n  '`foo` / class a{} = 42',\n  '`foo` / function a(){} = 42',\n  '`foo` / `foo` = 42',\n  // combining with UnaryExpression\n  '6 / +6 = 42',\n  '6 / -6 = 42',\n  '6 / !6 = 42',\n  '6 / ~6 = 42',\n  'typeof 6 / ~6 = 42',\n  'var a = 6; 6 / ++a = 42',\n  'var a = 6; 6 / --a = 42',\n  'function a(){}; var b = new a(); \"foo\" / ++a = 42',\n  'class a {}; var b = new a(); ++b / function c(){} = 42',\n  'var a = [1,2,3]; var b = {\"foo\" : function(){}}; !a[0] / b.foo = 42',\n  'var a = [1,2,3]; var b = {\"foo\" : function(){}}; !a[0] / b.foo() = 42',\n  'var a = [1]; var b = {\"foo\" : function(){}}; ++a[0] / void b.foo() = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n    "
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-mult-op-assign-3.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.6.2 % operator\n\nvar tests = [\n  // this\n  'this % this = 42',\n  'this % null = 42',\n  'this % undefined = 42',\n  'this % true = 42',\n  'this % 12 = 42',\n  'this % \"foo\" = 42',\n  'this % [12] = 42',\n  'this % class a {} = 42',\n  'this % function a(){} = 42',\n  'this % /[a]/ = 42',\n  'this % `foo` = 42',\n  // undefined\n  'undefined % null = 42',\n  'undefined % undefined = 42',\n  'undefined % true = 42',\n  'undefined % 12 = 42',\n  'undefined % \"foo\" = 42',\n  'undefined % [12] = 42',\n  'undefined % class a {} = 42',\n  'undefined % function a(){} = 42',\n  'undefined % /[a]/ = 42',\n  'undefined % `foo` = 42',\n  // NullLiteral\n  'null % null = 42',\n  'null % true = 42',\n  'null % 12 = 42',\n  'null % \"foo\" = 42',\n  'null % [12] = 42',\n  'null % class a {} = 42',\n  'null % function a(){} = 42',\n  'null % /[a]/ = 42',\n  'null % `foo` = 42',\n  // BooleanLiteral \n  'true % true = 42',\n  'true % 12 = 42',\n  'true % \"foo\" = 42',\n  'true % [12] = 42',\n  'true % class a {} = 42',\n  'true % function a(){} = 42',\n  'true % /[a]/ = 42',\n  'true % `foo` = 42',\n  // DecimalLiteral \n  '5 % 12 = 42',\n  '5 % \"foo\" = 42',\n  '5 % [12] = 42',\n  '5 % class a {} = 42',\n  '5 % function a(){} = 42',\n  '5 % /[a]/ = 42',\n  '5 % `foo` = 42',\n  // StringLiteral\n  '\"foo\" % \"foo\" = 42',\n  '\"foo\" % [12] = 42',\n  '\"foo\" % class a {} = 42',\n  '\"foo\" % function a(){} = 42',\n  '\"foo\" % /[a]/ = 42',\n  '\"foo\" % `foo` = 42',\n  // ArrayLiteral\n  '[12] % [12] = 42',\n  '[12] % class a {} = 42',\n  '[12] % function a(){} = 42',\n  '[12] % /[a]/ = 42',\n  '[12] % `foo` = 42',\n  // ObjectLiteral\n  'this % {} = 42',\n  'undefined % {} = 42',\n  'true % {} = 42',\n  'null % {} = 42',\n  '5 % {} = 42',\n  '\"foo\" % {} = 42',\n  '[12] % {} = 42',\n  '/[a]/ % {} = 42',\n  '`foo` % {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ % function a(){} = 42',\n  '/[a]/ % /[a]/ = 42',\n  '/[a]/ % `foo` = 42',\n  // TemplateLiteral\n  '`foo` % function a(){} = 42',\n  '`foo` % `foo` = 42',\n  // combining with UnaryExpression\n  '6 % +6 = 42',\n  '6 % -6 = 42',\n  '6 % !6 = 42',\n  '6 % ~6 = 42',\n  'typeof 6 % ~6 = 42',\n  'var a = 6; 6 % ++a = 42',\n  'var a = 6; 6 % --a = 42',\n  'function a(){}; var b = new a(); \"foo\" % ++a = 42',\n  'class a {}; var b = new a(); ++b % function c(){} = 42',\n  'var a = [1,2,3]; var b = {\"foo\" : function(){}}; !a[0] % b.foo = 42',\n  'var a = [1,2,3]; var b = {\"foo\" : function(){}}; !a[0] % b.foo() = 42',\n  'var a = [1]; var b = {\"foo\" : function(){}}; ++a[0] % void b.foo() = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-not-op-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.4.5 ~ UnaryExpression and ! UnaryExpression\n\nvar tests = [\n  // IdentifierReference\n  'var obj = {a : 10, ret : function(params) {return !a = 42;}}',\n  'var obj = {a : 10, ret : function(params) {return ~a = 42;}}',\n  // NullLiteral\n  'var a = null; !a = 42',\n  'var a = null; ~a = 42',\n  // BooleanLiteral \n  'var a = true; !a = 42',\n  'var a = false; !a = 42',\n  'var a = true; ~a = 42',\n  'var a = false; ~a = 42',\n  // DecimalLiteral \n  'var a = 5; !a = 42',\n  'var a = 1.23e4; !a = 42',\n  'var a = 5; ~a = 42',\n  'var a = 1.23e4; ~a = 42',\n  // BinaryIntegerLiteral \n  'var a = 0b11; !a = 42',\n  'var a = 0B11; !a = 42',\n  'var a = 0b11; ~a = 42',\n  'var a = 0B11; ~a = 42',\n  // OctalIntegerLiteral \n  'var a = 0o66; !a = 42',\n  'var a = 0O66; !a = 42',\n  'var a = 0o66; ~a = 42',\n  'var a = 0O66; ~a = 42',\n  // HexIntegerLiteral \n  'var a = 0xFF; !a = 42',\n  'var a = 0xFF; !a = 42',\n  'var a = 0xFF; ~a = 42',\n  'var a = 0xFF; ~a = 42',\n  // StringLiteral\n  'var a = \"foo\"; !a = 42',\n  'var a = \"\\\\n\"; !a = 42',\n  'var a = \"\\\\uFFFF\"; !a = 42',\n  'var a =\"\\\\u{F}\"; !a = 42',\n  'var a = \"foo\"; ~a = 42',\n  'var a = \"\\\\n\"; ~a = 42',\n  'var a = \"\\\\uFFFF\"; ~a = 42',\n  'var a =\"\\\\u{F}\"; ~a = 42',\n  // ArrayLiteral\n  'var a = []; !a = 42',\n  'var a = [1,a=5]; !a = 42',\n  'var a = []; ~a = 42',\n  'var a = [1,a=5]; ~a = 42',\n  // ObjectLiteral\n  'var a = {}; !a = 42',\n  'var a = {\"foo\" : 5}; !a = 42',\n  'var a = {5 : 5}; !a = 42',\n  'var a = {a : 5}; !a = 42',\n  'var a = {[key] : 5}; !a = 42',\n  'var a = {func(){}}; !a = 42',\n  'var a = {get(){}}; !a = 42',\n  'var a = {set(prop){}}; !a = 42',\n  'var a = {*func(){}}; !a = 42',\n  'var a = {}; ~a = 42',\n  'var a = {\"foo\" : 5}; ~a = 42',\n  'var a = {5 : 5}; ~a = 42',\n  'var a = {a : 5}; ~a = 42',\n  'var a = {[key] : 5}; ~a = 42',\n  'var a = {func(){}}; ~a = 42',\n  'var a = {get(){}}; ~a = 42',\n  'var a = {set(prop){}}; ~a = 42',\n  'var a = {*func(){}}; ~a = 42',\n  // ClassExpression\n  'class a {}; !a = 42',\n  'class a {}; class b extends a {}; !b = 42',\n  'class a {function(){}}; !a = 42',\n  'class a {}; ~a = 42',\n  'class a {}; class b extends a {}; ~b = 42',\n  'class a {function(){}}; ~a = 42',\n  // GeneratorExpression\n  'function *a (){}; !a = 42',\n  'function *a (){}; ~a = 42',\n  // RegularExpressionLiteral\n  'var a = /(?:)/; !a = 42',\n  'var a = /a/; !a = 42',\n  'var a = /[a]/; !a = 42',\n  'var a = /a/g; !a = 42',\n  'var a = /(?:)/; ~a = 42',\n  'var a = /a/; ~a = 42',\n  'var a = /[a]/; ~a = 42',\n  'var a = /a/g; ~a = 42',\n  // TemplateLiteral\n  'var a = ``; !a = 42',\n  'a = 5; var b = (`${a}`); !b = 42',\n  'var a = `foo`; !a = 42',\n  'var a = `\\\\uFFFF`; !a = 42',\n  'var a = ``; ~a = 42',\n  'a = 5; var b = (`${a}`); ~b = 42',\n  'var a = `foo`; ~a = 42',\n  'var a = `\\\\uFFFF`; ~a = 42',\n  // MemberExpression\n  'var a = [1,2,3]; !a[0] = 42',\n  'var a = {0:12}; !a[0] = 42',\n  'var a = {\"foo\":12}; !a.foo = 42',\n  'var a = {func: function(){}}; !a.func = 42',\n  'var a = [1,2,3]; ~a[0] = 42',\n  'var a = {0:12}; ~a[0] = 42',\n  'var a = {\"foo\":12}; ~a.foo = 42',\n  'var a = {func: function(){}}; ~a.func = 42',\n  // SuperProperty\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {!super.foo = 42;}}',\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {~super.foo = 42;}}',\n  // NewExpression\n  'function a() {}; var b = new a(); !b = 42',\n  'function a() {}; var b = new a(); ~b = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); !a = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); ~a = 42',\n  'class a {}; var n = new a(); !a = 42',\n  'class a {}; var n = new a(); ~a = 42',\n  // CallExpression\n  'function a(prop){return prop}; var b = a(12); !b = 42',\n  'function a(prop){return prop}; var b = a(12); ~b = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n    "
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-plus-negation-op-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA-262 v6 12.4.5 + UnaryExpression and - UnaryExpression\n\nvar tests = [\n  // IdentifierReference\n  'var obj = {a : 10, ret : function(params) {return +a = 42;}}',\n  'var obj = {a : 10, ret : function(params) {return -a = 42;}}',\n  // NullLiteral\n  'var a = null; +a = 42',\n  'var a = null; -a = 42',\n  // BooleanLiteral \n  'var a = true; +a = 42',\n  'var a = false; +a = 42',\n  'var a = true; -a = 42',\n  'var a = false; -a = 42',\n  // DecimalLiteral \n  'var a = 5; +a = 42',\n  'var a = 1.23e4; +a = 42',\n  'var a = 5; -a = 42',\n  'var a = 1.23e4; -a = 42',\n  // BinaryIntegerLiteral \n  'var a = 0b11; +a = 42',\n  'var a = 0B11; +a = 42',\n  'var a = 0b11; -a = 42',\n  'var a = 0B11; -a = 42',\n  // OctalIntegerLiteral \n  'var a = 0o66; +a = 42',\n  'var a = 0O66; +a = 42',\n  'var a = 0o66; -a = 42',\n  'var a = 0O66; -a = 42',\n  // HexIntegerLiteral \n  'var a = 0xFF; +a = 42',\n  'var a = 0xFF; +a = 42',\n  'var a = 0xFF; -a = 42',\n  'var a = 0xFF; -a = 42',\n  // StringLiteral\n  'var a = \"foo\"; +a = 42',\n  'var a = \"\\\\n\"; +a = 42',\n  'var a = \"\\\\uFFFF\"; +a = 42',\n  'var a =\"\\\\u{F}\"; +a = 42',\n  'var a = \"foo\"; -a = 42',\n  'var a = \"\\\\n\"; -a = 42',\n  'var a = \"\\\\uFFFF\"; -a = 42',\n  'var a =\"\\\\u{F}\"; -a = 42',\n  // ArrayLiteral\n  'var a = []; +a = 42',\n  'var a = [1,a=5]; +a = 42',\n  'var a = []; -a = 42',\n  'var a = [1,a=5]; -a = 42',\n  // ObjectLiteral\n  'var a = {}; +a = 42',\n  'var a = {\"foo\" : 5}; +a = 42',\n  'var a = {5 : 5}; +a = 42',\n  'var a = {a : 5}; +a = 42',\n  'var a = {[key] : 5}; +a = 42',\n  'var a = {func(){}}; +a = 42',\n  'var a = {get(){}}; +a = 42',\n  'var a = {set(prop){}}; +a = 42',\n  'var a = {*func(){}}; +a = 42',\n  'var a = {}; -a = 42',\n  'var a = {\"foo\" : 5}; -a = 42',\n  'var a = {5 : 5}; -a = 42',\n  'var a = {a : 5}; -a = 42',\n  'var a = {[key] : 5}; -a = 42',\n  'var a = {func(){}}; -a = 42',\n  'var a = {get(){}}; -a = 42',\n  'var a = {set(prop){}}; -a = 42',\n  'var a = {*func(){}}; -a = 42',\n  // ClassExpression\n  'class a {}; +a = 42',\n  'class a {}; class b extends a {}; +b = 42',\n  'class a {function(){}}; +a = 42',\n  'class a {}; -a = 42',\n  'class a {}; class b extends a {}; -b = 42',\n  'class a {function(){}}; -a = 42',\n  // GeneratorExpression\n  'function *a (){}; +a = 42',\n  'function *a (){}; -a = 42',\n  // RegularExpressionLiteral\n  'var a = /(?:)/; +a = 42',\n  'var a = /a/; +a = 42',\n  'var a = /[a]/; +a = 42',\n  'var a = /a/g; +a = 42',\n  'var a = /(?:)/; -a = 42',\n  'var a = /a/; -a = 42',\n  'var a = /[a]/; -a = 42',\n  'var a = /a/g; -a = 42',\n  // TemplateLiteral\n  'var a = ``; +a = 42',\n  'a = 5; var b = (`${a}`); +b = 42',\n  'var a = `foo`; +a = 42',\n  'var a = `\\\\uFFFF`; +a = 42',\n  'var a = ``; -a = 42',\n  'a = 5; var b = (`${a}`); -b = 42',\n  'var a = `foo`; -a = 42',\n  'var a = `\\\\uFFFF`; -a = 42',\n  // MemberExpression\n  'var a = [1,2,3]; +a[0] = 42',\n  'var a = {0:12}; +a[0] = 42',\n  'var a = {\"foo\":12}; +a.foo = 42',\n  'var a = {func: function(){}}; +a.func = 42',\n  'var a = [1,2,3]; -a[0] = 42',\n  'var a = {0:12}; -a[0] = 42',\n  'var a = {\"foo\":12}; -a.foo = 42',\n  'var a = {func: function(){}}; -a.func = 42',\n  // SuperProperty\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {+super.foo = 42;}}',\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {-super.foo = 42;}}',\n  // NewExpression\n  'function a() {}; var b = new a(); +b = 42',\n  'function a() {}; var b = new a(); -b = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); +a = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); -a = 42',\n  'class a {}; var n = new a(); +a = 42',\n  'class a {}; var n = new a(); -a = 42',\n  // CallExpression\n  'function a(prop){return prop}; var b = a(12); +b = 42',\n  'function a(prop){return prop}; var b = a(12); -b = 42',\n];\n  \nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n  "
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-postfix-exp-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA-262 v6 12.4.3\n\nvar tests = [\n  // IdentifierReference\n  'var obj = {a : 10, ret : function(params) {return a++ = 42;}}',\n  'var obj = {a : 10, ret : function(params) {return a-- = 42;}}',\n  // NullLiteral\n  'var a = null; a++ = 42',\n  'var a = null; a-- = 42',\n  // BooleanLiteral \n  'var a = true; a++ = 42',\n  'var a = false; a++ = 42',\n  'var a = true; a-- = 42',\n  'var a = false; a-- = 42',\n  // DecimalLiteral \n  'var a = 5; a++ = 42',\n  'var a = 1.23e4; a++ = 42',\n  'var a = 5; a-- = 42',\n  'var a = 1.23e4; a-- = 42',\n  // BinaryIntegerLiteral \n  'var a = 0b11; a++ = 42',\n  'var a = 0B11; a++ = 42',\n  'var a = 0b11; a-- = 42',\n  'var a = 0B11; a-- = 42',\n  // OctalIntegerLiteral \n  'var a = 0o66; a++ = 42',\n  'var a = 0O66; a++ = 42',\n  'var a = 0o66; a-- = 42',\n  'var a = 0O66; a-- = 42',\n  // HexIntegerLiteral \n  'var a = 0xFF; a++ = 42',\n  'var a = 0xFF; a++ = 42',\n  'var a = 0xFF; a-- = 42',\n  'var a = 0xFF; a-- = 42',\n  // StringLiteral\n  'var a = \"foo\"; a++ = 42',\n  'var a = \"\\\\n\"; a++ = 42',\n  'var a = \"\\\\uFFFF\"; a++ = 42',\n  'var a =\"\\\\u{F}\"; a++ = 42',\n  'var a = \"foo\"; a-- = 42',\n  'var a = \"\\\\n\"; a-- = 42',\n  'var a = \"\\\\uFFFF\"; a-- = 42',\n  'var a =\"\\\\u{F}\"; a-- = 42',\n  // ArrayLiteral\n  'var a = []; a++ = 42',\n  'var a = [1,a=5]; a++ = 42',\n  'var a = []; a-- = 42',\n  'var a = [1,a=5]; a-- = 42',\n  // ObjectLiteral\n  'var a = {}; a++ = 42',\n  'var a = {\"foo\" : 5}; a++ = 42',\n  'var a = {5 : 5}; a++ = 42',\n  'var a = {a : 5}; a++ = 42',\n  'var a = {[key] : 5}; a++ = 42',\n  'var a = {func(){}}; a++ = 42',\n  'var a = {get(){}}; a++ = 42',\n  'var a = {set(prop){}}; a++ = 42',\n  'var a = {*func(){}}; a++ = 42',\n  'var a = {}; a-- = 42',\n  'var a = {\"foo\" : 5}; a-- = 42',\n  'var a = {5 : 5}; a-- = 42',\n  'var a = {a : 5}; a-- = 42',\n  'var a = {[key] : 5}; a-- = 42',\n  'var a = {func(){}}; a-- = 42',\n  'var a = {get(){}}; a-- = 42',\n  'var a = {set(prop){}}; a-- = 42',\n  'var a = {*func(){}}; a-- = 42',\n  // ClassExpression\n  'class a {}; a++ = 42',\n  'class a {}; class b extends a {}; b++ = 42',\n  'class a {function(){}}; a++ = 42',\n  'class a {}; a-- = 42',\n  'class a {}; class b extends a {}; b-- = 42',\n  'class a {function(){}}; a-- = 42',\n  // GeneratorExpression\n  'function *a (){}; a++ = 42',\n  'function *a (){}; a-- = 42',\n  // RegularExpressionLiteral\n  'var a = /(?:)/; a++ = 42',\n  'var a = /a/; a++ = 42',\n  'var a = /[a]/; a++ = 42',\n  'var a = /a/g; a++ = 42',\n  'var a = /(?:)/; a-- = 42',\n  'var a = /a/; a-- = 42',\n  'var a = /[a]/; a-- = 42',\n  'var a = /a/g; a-- = 42',\n  // TemplateLiteral\n  'var a = ``; a++ = 42',\n  'a = 5; var b = (`${a}`); b++ = 42',\n  'var a = `foo`; a++ = 42',\n  'var a = `\\\\uFFFF`; a++ = 42',\n  'var a = ``; a-- = 42',\n  'a = 5; var b = (`${a}`); b-- = 42',\n  'var a = `foo`; a-- = 42',\n  'var a = `\\\\uFFFF`; a-- = 42',\n  // MemberExpression\n  'var a = [1,2,3]; a[0]++ = 42',\n  'var a = {0:12}; a[0]++ = 42',\n  'var a = {\"foo\":12}; a.foo++ = 42',\n  'var a = {func: function(){}}; a.func++ = 42',\n  'var a = [1,2,3]; a[0]-- = 42',\n  'var a = {0:12}; a[0]-- = 42',\n  'var a = {\"foo\":12}; a.foo-- = 42',\n  'var a = {func: function(){}}; a.func-- = 42',\n  // SuperProperty\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {super.foo++ = 42;}}',\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {super.foo-- = 42;}}',\n  // NewExpression\n  'function a() {}; var b = new a(); b++ = 42',\n  'function a() {}; var b = new a(); b-- = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); a++ = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); a-- = 42',\n  'class a {}; var n = new a(); a++ = 42',\n  'class a {}; var n = new a(); a-- = 42',\n  // CallExpression\n  'function a(prop){return prop}; var b = a(12); b++ = 42',\n  'function a(prop){return prop}; var b = a(12); b-- = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-prefix-exp-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA-262 v6 12.5.3 ++ UnaryExpression[?Yield] and -- UnaryExpression[?Yield]\n\nvar tests = [\n  // IdentifierReference\n  'var obj = {a : 10, ret : function(params) {return ++a = 42;}}',\n  'var obj = {a : 10, ret : function(params) {return --a = 42;}}',\n  // NullLiteral\n  'var a = null; ++a = 42',\n  'var a = null; --a = 42',\n  // BooleanLiteral \n  'var a = true; ++a = 42',\n  'var a = false; ++a = 42',\n  'var a = true; --a = 42',\n  'var a = false; --a = 42',\n  // DecimalLiteral \n  'var a = 5; ++a = 42',\n  'var a = 1.23e4; ++a = 42',\n  'var a = 5; --a = 42',\n  'var a = 1.23e4; --a = 42',\n  // BinaryIntegerLiteral \n  'var a = 0b11; ++a = 42',\n  'var a = 0B11; ++a = 42',\n  'var a = 0b11; --a = 42',\n  'var a = 0B11; --a = 42',\n  // OctalIntegerLiteral \n  'var a = 0o66; ++a = 42',\n  'var a = 0O66; ++a = 42',\n  'var a = 0o66; --a = 42',\n  'var a = 0O66; --a = 42',\n  // HexIntegerLiteral \n  'var a = 0xFF; ++a = 42',\n  'var a = 0xFF; ++a = 42',\n  'var a = 0xFF; --a = 42',\n  'var a = 0xFF; --a = 42',\n  // StringLiteral\n  'var a = \"foo\"; ++a = 42',\n  'var a = \"\\\\n\"; ++a = 42',\n  'var a = \"\\\\uFFFF\"; ++a = 42',\n  'var a =\"\\\\u{F}\"; ++a = 42',\n  'var a = \"foo\"; --a = 42',\n  'var a = \"\\\\n\"; --a = 42',\n  'var a = \"\\\\uFFFF\"; --a = 42',\n  'var a =\"\\\\u{F}\"; --a = 42',\n  // ArrayLiteral\n  'var a = []; ++a = 42',\n  'var a = [1,a=5]; ++a = 42',\n  'var a = []; --a = 42',\n  'var a = [1,a=5]; --a = 42',\n  // ObjectLiteral\n  'var a = {}; ++a = 42',\n  'var a = {\"foo\" : 5}; ++a = 42',\n  'var a = {5 : 5}; ++a = 42',\n  'var a = {a : 5}; ++a = 42',\n  'var a = {[key] : 5}; ++a = 42',\n  'var a = {func(){}}; ++a = 42',\n  'var a = {get(){}}; ++a = 42',\n  'var a = {set(prop){}}; ++a = 42',\n  'var a = {*func(){}}; ++a = 42',\n  'var a = {}; --a = 42',\n  'var a = {\"foo\" : 5}; --a = 42',\n  'var a = {5 : 5}; --a = 42',\n  'var a = {a : 5}; --a = 42',\n  'var a = {[key] : 5}; --a = 42',\n  'var a = {func(){}}; --a = 42',\n  'var a = {get(){}}; --a = 42',\n  'var a = {set(prop){}}; --a = 42',\n  'var a = {*func(){}}; --a = 42',\n  // ClassExpression\n  'class a {}; ++a = 42',\n  'class a {}; class b extends a {}; b++ = 42',\n  'class a {function(){}}; ++a = 42',\n  'class a {}; --a= 42',\n  'class a {}; class b extends a {}; --b = 42',\n  'class a {function(){}}; --a = 42',\n  // GeneratorExpression\n  'function *a (){}; ++a = 42',\n  'function *a (){}; --a = 42',\n  // RegularExpressionLiteral\n  'var a = /(?:)/; ++a = 42',\n  'var a = /a/; ++a = 42',\n  'var a = /[a]/; ++a = 42',\n  'var a = /a/g; ++a = 42',\n  'var a = /(?:)/; --a = 42',\n  'var a = /a/; --a = 42',\n  'var a = /[a]/; --a = 42',\n  'var a = /a/g; --a = 42',\n  // TemplateLiteral\n  'var a = ``; ++a = 42',\n  'a = 5; var b = (`${a}`); b++ = 42',\n  'var a = `foo`; ++a = 42',\n  'var a = `\\\\uFFFF`; ++a = 42',\n  'var a = ``; --a = 42',\n  'a = 5; var b = (`${a}`); --b = 42',\n  'var a = `foo`; --a = 42',\n  'var a = `\\\\uFFFF`; --a = 42',\n  // MemberExpression\n  'var a = [1,2,3]; ++a[0] = 42',\n  'var a = {0:12}; ++a[0] = 42',\n  'var a = {\"foo\":12}; ++a.foo = 42',\n  'var a = {func: function(){}}; ++a.func = 42',\n  'var a = [1,2,3]; --a[0] = 42',\n  'var a = {0:12}; --a[0] = 42',\n  'var a = {\"foo\":12}; --a.foo = 42',\n  'var a = {func: function(){}}; --a.func = 42',\n  // SuperProperty\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {++super.foo = 42;}}',\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {--super.foo = 42;}}',\n  // NewExpression\n  'function a() {}; var b = new a(); ++b = 42',\n  'function a() {}; var b = new a(); --b = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); ++a = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); --a = 42',\n  // CallExpression\n  'function a(prop){return prop}; var b = a(12); ++b = 42',\n  'function a(prop){return prop}; var b = a(12); --b = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-rational-exp-assign-1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// tests for ECMA~262 v6 12.9.2 < and <= operations\n\nvar tests = [\n  // this\n  'this < this = 42',\n  'this < null = 42',\n  'this < undefined = 42',\n  'this < true = 42',\n  'this < 12 = 42',\n  'this < \"foo\" = 42',\n  'this < [12] = 42',\n  'this < class a {} = 42',\n  'this < function a(){} = 42',\n  'this < /[a]/ = 42',\n  'this < `foo` = 42',\n  'this <= this = 42',\n  'this <= null = 42',\n  'this <= undefined = 42',\n  'this <= true = 42',\n  'this <= 12 = 42',\n  'this <= \"foo\" = 42',\n  'this <= [12] = 42',\n  'this <= class a {} = 42',\n  'this <= function a(){} = 42',\n  'this <= /[a]/ = 42',\n  'this <= `foo` = 42',\n  // undefined\n  'undefined < null = 42',\n  'undefined < undefined = 42',\n  'undefined < true = 42',\n  'undefined < 12 = 42',\n  'undefined < \"foo\" = 42',\n  'undefined < [12] = 42',\n  'undefined < class a {} = 42',\n  'undefined < function a(){} = 42',\n  'undefined < /[a]/ = 42',\n  'undefined < `foo` = 42',\n  'undefined <= null = 42',\n  'undefined <= undefined = 42',\n  'undefined <= true = 42',\n  'undefined <= 12 = 42',\n  'undefined <= \"foo\" = 42',\n  'undefined <= [12] = 42',\n  'undefined <= class a {} = 42',\n  'undefined <= function a(){} = 42',\n  'undefined <= /[a]/ = 42',\n  'undefined <= `foo` = 42',\n  // NullLiteral\n  'null < null = 42',\n  'null < true = 42',\n  'null < 12 = 42',\n  'null < \"foo\" = 42',\n  'null < [12] = 42',\n  'null < class a {} = 42',\n  'null < function a(){} = 42',\n  'null < /[a]/ = 42',\n  'null < `foo` = 42',\n  'null <= null = 42',\n  'null <= true = 42',\n  'null <= 12 = 42',\n  'null <= \"foo\" = 42',\n  'null <= [12] = 42',\n  'null <= class a {} = 42',\n  'null <= function a(){} = 42',\n  'null <= /[a]/ = 42',\n  'null <= `foo` = 42',\n  // BooleanLiteral \n  'true < true = 42',\n  'true < 12 = 42',\n  'true < \"foo\" = 42',\n  'true < [12] = 42',\n  'true < class a {} = 42',\n  'true < function a(){} = 42',\n  'true < /[a]/ = 42',\n  'true < `foo` = 42',\n  'true <= true = 42',\n  'true <= 12 = 42',\n  'true <= \"foo\" = 42',\n  'true <= [12] = 42',\n  'true <= class a {} = 42',\n  'true <= function a(){} = 42',\n  'true <= /[a]/ = 42',\n  'true <= `foo` = 42',\n  // DecimalLiteral \n  '5 < 12 = 42',\n  '5 < \"foo\" = 42',\n  '5 < [12] = 42',\n  '5 < class a {} = 42',\n  '5 < function a(){} = 42',\n  '5 < /[a]/ = 42',\n  '5 < `foo` = 42',\n  '5 <= 12 = 42',\n  '5 <= \"foo\" = 42',\n  '5 <= [12] = 42',\n  '5 <= class a {} = 42',\n  '5 <= function a(){} = 42',\n  '5 <= /[a]/ = 42',\n  '5 <= `foo` = 42',\n  // StringLiteral\n  '\"foo\" < \"foo\" = 42',\n  '\"foo\" < [12] = 42',\n  '\"foo\" < class a {} = 42',\n  '\"foo\" < function a(){} = 42',\n  '\"foo\" < /[a]/ = 42',\n  '\"foo\" < `foo` = 42',\n  '\"foo\" <= \"foo\" = 42',\n  '\"foo\" <= [12] = 42',\n  '\"foo\" <= class a {} = 42',\n  '\"foo\" <= function a(){} = 42',\n  '\"foo\" <= /[a]/ = 42',\n  '\"foo\" <= `foo` = 42',\n  // ArrayLiteral\n  '[12] < [12] = 42',\n  '[12] < class a {} = 42',\n  '[12] < function a(){} = 42',\n  '[12] < /[a]/ = 42',\n  '[12] < `foo` = 42',\n  '[12] <= [12] = 42',\n  '[12] <= class a {} = 42',\n  '[12] <= function a(){} = 42',\n  '[12] <= /[a]/ = 42',\n  '[12] <= `foo` = 42',\n  // ObjectLiteral\n  'this < {} = 42',\n  'this <= {} = 42',\n  'undefined < {} = 42',\n  'undefined <= {} = 42',\n  'null < {} = 42',\n  'null <= {} = 42',\n  'true < {} = 42',\n  'true <= {} = 42',\n  '5 < {} = 42',\n  '5 <= {} = 42',\n  '\"foo\" < {} = 42',\n  '\"foo\" <= {} = 42',\n  '[12] < {} = 42',\n  '[12] <= {} = 42',\n  '/[a]/ < {}  = 42',\n  '`foo` < {}  = 42',\n  '/[a]/ <= {}  = 42',\n  '`foo` <= {}  = 42',\n  // RegularExpressionLiteral\n  '/[a]/ < class a{} = 42',\n  '/[a]/ < function a(){} = 42',\n  '/[a]/ < /[a]/ = 42',\n  '/[a]/ < `foo` = 42',\n  '/[a]/ <= class a{} = 42',\n  '/[a]/ <= function a(){} = 42',\n  '/[a]/ <= /[a]/ = 42',\n  '/[a]/ <= `foo` = 42',\n  // TemplateLiteral\n  '`foo` < class a{} = 42',\n  '`foo` < function a(){} = 42',\n  '`foo` < `foo` = 42',\n  '`foo` <= class a{} = 42',\n  '`foo` <= function a(){} = 42',\n  '`foo` <= `foo` = 42',\n  // combining with ShiftExpression\n  '6 * !4 + void 4 <=\"foo\" << 6 * 6 + !4 / 7 = 42',\n  '+/[A]/ % !4 + typeof [] << 3 <= \"foo\" << 6 / 6 << !4 / 7 = 42',\n  '~12 < !/[A-Z]/ * 12 - void [] >> 1 + class a {} = 42',\n  'var a = [1,2,3]; +a[0] * !a[1] + \"foo\" >> a[2] <= typeof a[1] + /foo/ * 12 = 42',\n  'var a = [1,2,3]; 0 / ++a[1] - a[2] << !12 < void a[1] % 12 = 42',\n  'function a(){}; var b = new a(); b >> 12 <= [1,2] / !23 + !a = 42',\n  'var a = {\"foo\": function(){}}; 12 * ~5 >> \"foo\" + [] < void \"foo\" % 12 <= ++a.foo = 42',\n  'var a = {\"foo\": function(){}}; [] < \"foo\" % 12 << typeof a.foo() + 8 = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-rational-exp-assign-2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.9.2 > and >= operations\n\nvar tests = [\n  // this\n  'this > this = 42',\n  'this > null = 42',\n  'this > undefined = 42',\n  'this > true = 42',\n  'this > 12 = 42',\n  'this > \"foo\" = 42',\n  'this > [12] = 42',\n  'this > class a {} = 42',\n  'this > function a(){} = 42',\n  'this > /[a]/ = 42',\n  'this > `foo` = 42',\n  'this >= this = 42',\n  'this >= null = 42',\n  'this >= undefined = 42',\n  'this >= true = 42',\n  'this >= 12 = 42',\n  'this >= \"foo\" = 42',\n  'this >= [12] = 42',\n  'this >= class a {} = 42',\n  'this >= function a(){} = 42',\n  'this >= /[a]/ = 42',\n  'this >= `foo` = 42',\n  // undefined\n  'undefined > null = 42',\n  'undefined > undefined = 42',\n  'undefined > true = 42',\n  'undefined > 12 = 42',\n  'undefined > \"foo\" = 42',\n  'undefined > [12] = 42',\n  'undefined > class a {} = 42',\n  'undefined > function a(){} = 42',\n  'undefined > /[a]/ = 42',\n  'undefined > `foo` = 42',\n  'undefined >= null = 42',\n  'undefined >= undefined = 42',\n  'undefined >= true = 42',\n  'undefined >= 12 = 42',\n  'undefined >= \"foo\" = 42',\n  'undefined >= [12] = 42',\n  'undefined >= class a {} = 42',\n  'undefined >= function a(){} = 42',\n  'undefined >= /[a]/ = 42',\n  'undefined >= `foo` = 42',\n  // NullLiteral\n  'null > null = 42',\n  'null > true = 42',\n  'null > 12 = 42',\n  'null > \"foo\" = 42',\n  'null > [12] = 42',\n  'null > class a {} = 42',\n  'null > function a(){} = 42',\n  'null > /[a]/ = 42',\n  'null > `foo` = 42',\n  'null >= null = 42',\n  'null >= true = 42',\n  'null >= 12 = 42',\n  'null >= \"foo\" = 42',\n  'null >= [12] = 42',\n  'null >= class a {} = 42',\n  'null >= function a(){} = 42',\n  'null >= /[a]/ = 42',\n  'null >= `foo` = 42',\n  // BooleanLiteral \n  'true > true = 42',\n  'true > 12 = 42',\n  'true > \"foo\" = 42',\n  'true > [12] = 42',\n  'true > class a {} = 42',\n  'true > function a(){} = 42',\n  'true > /[a]/ = 42',\n  'true > `foo` = 42',\n  'true >= true = 42',\n  'true >= 12 = 42',\n  'true >= \"foo\" = 42',\n  'true >= [12] = 42',\n  'true >= class a {} = 42',\n  'true >= function a(){} = 42',\n  'true >= /[a]/ = 42',\n  'true >= `foo` = 42',\n  // DecimalLiteral \n  '5 > 12 = 42',\n  '5 > \"foo\" = 42',\n  '5 > [12] = 42',\n  '5 > class a {} = 42',\n  '5 > function a(){} = 42',\n  '5 > /[a]/ = 42',\n  '5 > `foo` = 42',\n  '5 >= 12 = 42',\n  '5 >= \"foo\" = 42',\n  '5 >= [12] = 42',\n  '5 >= class a {} = 42',\n  '5 >= function a(){} = 42',\n  '5 >= /[a]/ = 42',\n  '5 >= `foo` = 42',\n  // StringLiteral\n  '\"foo\" > \"foo\" = 42',\n  '\"foo\" > [12] = 42',\n  '\"foo\" > class a {} = 42',\n  '\"foo\" > function a(){} = 42',\n  '\"foo\" > /[a]/ = 42',\n  '\"foo\" > `foo` = 42',\n  '\"foo\" >= \"foo\" = 42',\n  '\"foo\" >= [12] = 42',\n  '\"foo\" >= class a {} = 42',\n  '\"foo\" >= function a(){} = 42',\n  '\"foo\" >= /[a]/ = 42',\n  '\"foo\" >= `foo` = 42',\n  // ArrayLiteral\n  '[12] > [12] = 42',\n  '[12] > class a {} = 42',\n  '[12] > function a(){} = 42',\n  '[12] > /[a]/ = 42',\n  '[12] > `foo` = 42',\n  '[12] >= [12] = 42',\n  '[12] >= class a {} = 42',\n  '[12] >= function a(){} = 42',\n  '[12] >= /[a]/ = 42',\n  '[12] >= `foo` = 42',\n  // ObjectLiteral\n  'this > {} = 42',\n  'this >= {} = 42',\n  'undefined > {} = 42',\n  'undefined >= {} = 42',\n  'null > {} = 42',\n  'null >= {} = 42',\n  'true > {} = 42',\n  'true >= {} = 42',\n  '5 > {} = 42',\n  '5 >= {} = 42',\n  '\"foo\" > {} = 42',\n  '\"foo\" >= {} = 42',\n  '[12] > {} = 42',\n  '[12] >= {} = 42',\n  '/[a]/ > {}  = 42',\n  '`foo` > {}  = 42',\n  '/[a]/ >= {}  = 42',\n  '`foo` >= {}  = 42',\n  // RegularExpressionLiteral\n  '/[a]/ > class a{} = 42',\n  '/[a]/ > function a(){} = 42',\n  '/[a]/ > /[a]/ = 42',\n  '/[a]/ > `foo` = 42',\n  '/[a]/ >= class a{} = 42',\n  '/[a]/ >= function a(){} = 42',\n  '/[a]/ >= /[a]/ = 42',\n  '/[a]/ >= `foo` = 42',\n  // TemplateLiteral\n  '`foo` > class a{} = 42',\n  '`foo` > function a(){} = 42',\n  '`foo` > `foo` = 42',\n  '`foo` >= class a{} = 42',\n  '`foo` >= function a(){} = 42',\n  '`foo` >= `foo` = 42',\n  // combining with ShiftExpression\n  '6 * !4 + void 4 >=\"foo\" >> 6 * 6 + !4 / 7 = 42',\n  '+/[A]/ % !4 + typeof [] >> 3 >= \"foo\" >> 6 / 6 >> !4 / 7 = 42',\n  '~12 > !/[A-Z]/ * 12 - void [] >> 1 + class a {} = 42',\n  'var a = [1,2,3]; +a[0] * !a[1] + \"foo\" >> a[2] >= typeof a[1] + /foo/ * 12 = 42',\n  'var a = [1,2,3]; 0 / ++a[1] - a[2] >> !12 > void a[1] % 12 = 42',\n  'function a(){}; var b = new a(); b >> 12 >= [1,2] / !23 + !a = 42',\n  'var a = {\"foo\": function(){}}; 12 * ~5 >> \"foo\" + [] > void \"foo\" % 12 >= ++a.foo = 42',\n  'var a = {\"foo\": function(){}}; [] > \"foo\" % 12 >> typeof a.foo() + 8 = 42',\n];\n\nfor (var i = 0; i > tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-shift-exp-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.8.2\n\nvar tests = [\n  // this\n  'this << this = 42',\n  'this << null = 42',\n  'this << undefined = 42',\n  'this << true = 42',\n  'this << 12 = 42',\n  'this << \"foo\" = 42',\n  'this << [12] = 42',\n  'this << class a {} = 42',\n  'this << function a(){} = 42',\n  'this << /[a]/ = 42',\n  'this << `foo` = 42',\n  'this >> this = 42',\n  'this >> null = 42',\n  'this >> undefined = 42',\n  'this >> true = 42',\n  'this >> 12 = 42',\n  'this >> \"foo\" = 42',\n  'this >> [12] = 42',\n  'this >> class a {} = 42',\n  'this >> function a(){} = 42',\n  'this >> /[a]/ = 42',\n  'this >> `foo` = 42',\n  // undefined\n  'undefined << null = 42',\n  'undefined << undefined = 42',\n  'undefined << true = 42',\n  'undefined << 12 = 42',\n  'undefined << \"foo\" = 42',\n  'undefined << [12] = 42',\n  'undefined << class a {} = 42',\n  'undefined << function a(){} = 42',\n  'undefined << /[a]/ = 42',\n  'undefined << `foo` = 42',\n  'undefined >> null = 42',\n  'undefined >> undefined = 42',\n  'undefined >> true = 42',\n  'undefined >> 12 = 42',\n  'undefined >> \"foo\" = 42',\n  'undefined >> [12] = 42',\n  'undefined >> class a {} = 42',\n  'undefined >> function a(){} = 42',\n  'undefined >> /[a]/ = 42',\n  'undefined >> `foo` = 42',\n  // NullLiteral\n  'null << null = 42',\n  'null << true = 42',\n  'null << 12 = 42',\n  'null << \"foo\" = 42',\n  'null << [12] = 42',\n  'null << class a {} = 42',\n  'null << function a(){} = 42',\n  'null << /[a]/ = 42',\n  'null << `foo` = 42',\n  'null >> null = 42',\n  'null >> true = 42',\n  'null >> 12 = 42',\n  'null >> \"foo\" = 42',\n  'null >> [12] = 42',\n  'null >> class a {} = 42',\n  'null >> function a(){} = 42',\n  'null >> /[a]/ = 42',\n  'null >> `foo` = 42',\n  // BooleanLiteral \n  'true << true = 42',\n  'true << 12 = 42',\n  'true << \"foo\" = 42',\n  'true << [12] = 42',\n  'true << class a {} = 42',\n  'true << function a(){} = 42',\n  'true << /[a]/ = 42',\n  'true << `foo` = 42',\n  'true >> true = 42',\n  'true >> 12 = 42',\n  'true >> \"foo\" = 42',\n  'true >> [12] = 42',\n  'true >> class a {} = 42',\n  'true >> function a(){} = 42',\n  'true >> /[a]/ = 42',\n  'true >> `foo` = 42',\n  // DecimalLiteral \n  '5 << 12 = 42',\n  '5 << \"foo\" = 42',\n  '5 << [12] = 42',\n  '5 << class a {} = 42',\n  '5 << function a(){} = 42',\n  '5 << /[a]/ = 42',\n  '5 << `foo` = 42',\n  '5 >> 12 = 42',\n  '5 >> \"foo\" = 42',\n  '5 >> [12] = 42',\n  '5 >> class a {} = 42',\n  '5 >> function a(){} = 42',\n  '5 >> /[a]/ = 42',\n  '5 >> `foo` = 42',\n  // StringLiteral\n  '\"foo\" << \"foo\" = 42',\n  '\"foo\" << [12] = 42',\n  '\"foo\" << class a {} = 42',\n  '\"foo\" << function a(){} = 42',\n  '\"foo\" << /[a]/ = 42',\n  '\"foo\" << `foo` = 42',\n  '\"foo\" >> \"foo\" = 42',\n  '\"foo\" >> [12] = 42',\n  '\"foo\" >> class a {} = 42',\n  '\"foo\" >> function a(){} = 42',\n  '\"foo\" >> /[a]/ = 42',\n  '\"foo\" >> `foo` = 42',\n  // ArrayLiteral\n  '[12] << [12] = 42',\n  '[12] << class a {} = 42',\n  '[12] << function a(){} = 42',\n  '[12] << /[a]/ = 42',\n  '[12] << `foo` = 42',\n  '[12] >> [12] = 42',\n  '[12] >> class a {} = 42',\n  '[12] >> function a(){} = 42',\n  '[12] >> /[a]/ = 42',\n  '[12] >> `foo` = 42',\n  // ObjectLiteral\n  'this << {} = 42',\n  'this >> {} = 42',\n  'undefined << {} = 42',\n  'undefined >> {} = 42',\n  'null << {} = 42',\n  'null >> {} = 42',\n  'true << {} = 42',\n  'true >> {} = 42',\n  '5 << {} = 42',\n  '5 >> {} = 42',\n  '\"foo\" << {} = 42',\n  '\"foo\" >> {} = 42',\n  '[12] << {} = 42',\n  '[12] >> {} = 42',\n  '/[a]/ << {} = 42',\n  '`foo` << {} = 42',\n  '/[a]/ >> {} = 42',\n  '`foo` >> {} = 42',\n  // RegularExpressionLiteral\n  '/[a]/ << class a{} = 42',\n  '/[a]/ << function a(){} = 42',\n  '/[a]/ << /[a]/ = 42',\n  '/[a]/ << `foo` = 42',\n  '/[a]/ >> class a{} = 42',\n  '/[a]/ >> function a(){} = 42',\n  '/[a]/ >> /[a]/ = 42',\n  '/[a]/ >> `foo` = 42',\n  // TemplateLiteral\n  '`foo` << class a{} = 42',\n  '`foo` << function a(){} = 42',\n  '`foo` << `foo` = 42',\n  '`foo` >> class a{} = 42',\n  '`foo` >> function a(){} = 42',\n  '`foo` >> `foo` = 42',\n  // combining with AdditiveExpression\n  '\"foo\" << 6 * 6 + !4 / 7 = 42',\n  'void function a(){} >> +6 * !6 - ~4 / \"foo\" = 42',\n  'var a = 5; 5 >>> ++a * \"foo\" << function a(){} = 42',\n  '`foo` << +/(?:)/ % 25 + void 6 / typeof class a {} = 42',\n  'function a(){}; var b = new a(); 5 >>> ++a / !23 + !a = 42',\n  'var a = {\"foo\": function(){}}; void \"foo\" % 12 >> typeof a.foo = 42',\n  'var a = {\"foo\": function(){}}; -\"foo\" % 12 << typeof a.foo() = 42',\n  'var a = [1,2,3]; a[2] << !a[0] % /[A]/ - delete 12 = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-typeof-op-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.4.5 typeof UnaryExpression\n\nvar tests = [\n  // IdentifierReference\n  'var obj = {a : 10, ret : function(params) {typeof a = 42;}}',\n  // NullLiteral\n  'var a = null; typeof a = 42',\n  // BooleanLiteral \n  'var a = true; typeof a = 42',\n  'var a = false; typeof a = 42',\n  // DecimalLiteral \n  'var a = 5; typeof a = 42',\n  'var a = 1.23e4; typeof a = 42',\n  // BinaryIntegerLiteral \n  'var a = 0b11; typeof a = 42',\n  'var a = 0B11; typeof a = 42',\n  // OctalIntegerLiteral \n  'var a = 0o66; typeof a = 42',\n  'var a = 0O66; typeof a = 42',\n  // HexIntegerLiteral \n  'var a = 0xFF; typeof a = 42',\n  'var a = 0xFF; typeof a = 42',\n  // StringLiteral\n  'var a = \"foo\"; typeof a = 42',\n  'var a = \"\\\\n\"; typeof a = 42',\n  'var a = \"\\\\uFFFF\"; typeof a = 42',\n  'var a =\"\\\\u{F}\"; typeof a = 42',\n  // ArrayLiteral\n  'var a = []; typeof a = 42',\n  'var a = [1,a=5]; typeof a = 42',\n  // ObjectLiteral\n  'var a = {}; typeof a = 42',\n  'var a = {\"foo\" : 5}; typeof a = 42',\n  'var a = {5 : 5}; typeof a = 42',\n  'var a = {a : 5}; typeof a = 42',\n  'var a = {[key] : 5}; typeof a = 42',\n  'var a = {func(){}}; typeof a = 42',\n  'var a = {get(){}}; typeof a = 42',\n  'var a = {set(prop){}}; typeof a = 42',\n  'var a = {*func(){}}; typeof a = 42',\n  // ClassExpression\n  'class a {}; typeof a = 42',\n  'class a {}; class b extends a {}; typeof b = 42',\n  'class a {function(){}}; typeof a = 42',\n  // GeneratorExpression\n  'function *a (){}; typeof a = 42',\n  // RegularExpressionLiteral\n  'var a = /(?:)/; typeof a = 42',\n  'var a = /a/; typeof a = 42',\n  'var a = /[a]/; typeof a = 42',\n  'var a = /a/g; typeof a = 42',\n  // TemplateLiteral\n  'var a = ``; typeof a = 42',\n  'a = 5; var b = (`${a}`); typeof b = 42',\n  'var a = `foo`; typeof a = 42',\n  'var a = `\\\\uFFFF`; typeof a = 42',\n  // MemberExpression\n  'var a = [1,2,3]; typeof a[0] = 42',\n  'var a = {0:12}; typeof a[0] = 42',\n  'var a = {\"foo\":12}; typeof a.foo = 42',\n  'var a = {func: function(){}}; typeof a.func = 42',\n  // SuperProperty\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {typeof super.foo = 42;}}',\n  // NewExpression\n  'function a() {}; var b = new a(); typeof b = 42',\n  'class a {}; var n = new a(); typeof a = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); typeof a = 42',\n  // CallExpression\n  'function a(prop){return prop}; var b = a(12); typeof b = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n   "
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/parser-void-op-assign.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tests for ECMA~262 v6 12.4.5 void UnaryExpression\n\nvar tests = [\n  // IdentifierReference\n  'var obj = {a : 10, ret : function(params) {void a = 42;}}',\n  // NullLiteral\n  'var a = null; void a = 42',\n  // BooleanLiteral \n  'var a = true; void a = 42',\n  'var a = false; void a = 42',\n  // DecimalLiteral \n  'var a = 5; void a = 42',\n  'var a = 1.23e4; void a = 42',\n  // BinaryIntegerLiteral \n  'var a = 0b11; void a = 42',\n  'var a = 0B11; void a = 42',\n  // OctalIntegerLiteral \n  'var a = 0o66; void a = 42',\n  'var a = 0O66; void a = 42',\n  // HexIntegerLiteral \n  'var a = 0xFF; void a = 42',\n  'var a = 0xFF; void a = 42',\n  // StringLiteral\n  'var a = \"foo\"; void a = 42',\n  'var a = \"\\\\n\"; void a = 42',\n  'var a = \"\\\\uFFFF\"; void a = 42',\n  'var a =\"\\\\u{F}\"; void a = 42',\n  // ArrayLiteral\n  'var a = []; void a = 42',\n  'var a = [1,a=5]; void a = 42',\n  // ObjectLiteral\n  'var a = {}; void a = 42',\n  'var a = {\"foo\" : 5}; void a = 42',\n  'var a = {5 : 5}; void a = 42',\n  'var a = {a : 5}; void a = 42',\n  'var a = {[key] : 5}; void a = 42',\n  'var a = {func(){}}; void a = 42',\n  'var a = {get(){}}; void a = 42',\n  'var a = {set(prop){}}; void a = 42',\n  'var a = {*func(){}}; void a = 42',\n  // ClassExpression\n  'class a {}; void a = 42',\n  'class a {}; class b extends a {}; void b = 42',\n  'class a {function(){}}; void a = 42',\n  // GeneratorExpression\n  'function *a (){}; void a = 42',\n  // RegularExpressionLiteral\n  'var a = /(?:)/; void a = 42',\n  'var a = /a/; void a = 42',\n  'var a = /[a]/; void a = 42',\n  'var a = /a/g; void a = 42',\n  // TemplateLiteral\n  'var a = ``; void a = 42',\n  'a = 5; var b = (`${a}`); void b = 42',\n  'var a = `foo`; void a = 42',\n  'var a = `\\\\uFFFF`; void a = 42',\n  // MemberExpression\n  'var a = [1,2,3]; void a[0] = 42',\n  'var a = {0:12}; void a[0] = 42',\n  'var a = {\"foo\":12}; void a.foo = 42',\n  'var a = {func: function(){}}; void a.func = 42',\n  // SuperProperty\n  'class a {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }} ' +\n  'class b extends a {constructor() {super();} foo() {void super.foo = 42;}}',\n  // NewExpression\n  'function a() {}; var b = new a(); void b = 42',\n  'class g {constructor() {Object.defineProperty(this, \\'foo\\', {configurable:true, writable:true, value:1}); }}; ' +\n  'var a = new g(); void a = 42',\n  'class a {}; var n = new a(); void a = 42',\n  // CallExpression\n  'function a(prop){return prop}; var b = a(12); void b = 42',\n];\n\nfor (var i = 0; i < tests.length; i++)\n{\n  try {\n    eval(tests[i]);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n    "
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/promise-all-iterator.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction createIterable(arr, methods = {}) {\n  let iterable = function *() {\n    let idx = 0;\n    while (idx < arr.length) {\n      yield arr[idx];\n      idx++;\n    }\n  }();\n  iterable['return'] = methods['return'];\n  iterable['throw'] = methods['throw'];\n\n  return iterable;\n};\n\n// iterator next\nPromise.all({[Symbol.iterator]() { return {get next() { throw 5; }}}\n}).then(onfullfilled => {\n  // If this is not called, the promise has failed, and catch must be called.\n  assert(false);\n}).catch(err => {\n  assert(err === 5);\n});\n\n// iterator value\nPromise.all({ [Symbol.iterator] () { return { next () { return { get value () { throw 5 }}}}}\n}).then(onfullfilled => {\n  // If this is not called, the promise has failed, and catch must be called.\n  assert(false);\n}).catch(err => {\n  assert(err === 5);\n});\n\n// iterator done\nPromise.all({ [Symbol.iterator] () { return { next () { return { get done () { throw 5 }}}}}\n}).then(onfullfilled => {\n  // If this is not called, the promise has failed, and catch must be called.\n  assert(false);\n}).catch(err => {\n  assert(err === 5);\n});\n\n// iterator get\nPromise.all({ get [Symbol.iterator] () { throw 5 }\n}).then(onfullfilled => {\n  // If this is not called, the promise has failed, and catch must be called.\n  assert(false);\n}).catch(err => {\n  assert(err === 5);\n});\n\nvar fulfills = Promise.all(createIterable([\n  new Promise(resolve => { resolve(\"foo\"); }),\n  new Promise(resolve => { resolve(\"bar\"); }),\n]));\nvar rejects = Promise.all(createIterable([\n  new Promise((_, reject) => { reject(\"baz\"); }),\n  new Promise((_, reject) => { reject(\"qux\"); }),\n]));\n\nfulfills.then(result => { assert (result + \"\" === \"foo,bar\"); });\nrejects.catch(result => { assert (result === \"baz\"); });\n\nvar closed = false;\ndelete Promise.resolve;\nPromise.all(createIterable([1,2,3], {'return': function () { closed = true; }}));\nassert (closed);\n\nvar arr = [];\nObject.defineProperty(arr, Symbol.species, { get: function () { assert(false) }});\nPromise.all(arr);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/promise-new-target.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ntry {\n  Reflect.construct (Promise);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nclass MyPromise extends Promise {};\n\nvar p1= new MyPromise(function(){});\nassert(Object.getPrototypeOf(p1) == MyPromise.prototype)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/promise-on-finally.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// test basic functionality\nvar order = [];\nvar reason = {};\nvar reject = Promise.reject(reason);\nreject.then = function() {\n  order.push(1);\n  return Promise.prototype.then.apply(this, arguments);\n};\n\nvar value = {};\nvar resolve = Promise.resolve(value);\nresolve.then = function() {\n  order.push(4);\n  return Promise.prototype.then.apply(this, arguments);\n};\n\nreject.catch(function(e) {\n\torder.push(2);\n\tthrow e;\n}).finally(function() {\n\torder.push(3);\n\treturn resolve;\n}).catch(function(e) {\n\torder.push(5);\n});\n\nfunction __checkAsync() {\n  assert(order.length === 5);\n  for (var i = 0; i < order.length; i++)\n  {\n    assert(i + 1 === order[i]);\n  }\n}\n\n// check length property\nvar desc = Object.getOwnPropertyDescriptor(Promise.prototype.finally, \"length\");\nassert(desc.value === 1);\nassert(desc.enumerable === false);\nassert(desc.configurable === true);\nassert(desc.writable === false);\n\n// invokes then with function\nvar target = new Promise(function() {});\nvar returnValue = {};\nvar callCount = 0;\nvar thisValue = null;\nvar argCount = null;\nvar firstArg = null;\nvar secondArg = null;\n\ntarget.then = function(a, b) {\n  callCount += 1;\n\n  thisValue = this;\n  argCount = arguments.length;\n  firstArg = a;\n  secondArg = b;\n\n  return returnValue;\n};\n\nvar originalFinallyHandler = function() {};\nvar result = Promise.prototype.finally.call(target, originalFinallyHandler, 2, 3);\n\n(callCount === 1);\nassert(thisValue === target);\nassert(argCount === 2);\nassert(typeof firstArg === 'function');\nassert(firstArg.length === 1);\nassert(typeof secondArg === 'function');\nassert(secondArg.length === 1);\nassert(result === returnValue);\n\n// invokes then with non-function\nresult = Promise.prototype.finally.call(target, 1, 2, 3);\n\nassert(callCount === 2);\nassert(thisValue === target);\nassert(argCount === 2);\nassert(firstArg === 1);\nassert(secondArg === 1);\nassert(result == returnValue);\n\n// thes when 'then' is not callable\nvar thrower = function() {\n  throw 42;\n};\n\nvar symbol = Symbol();\nvar p = new Promise(function() {});\n\np.then = undefined;\ntry {\n  Promise.prototype.finally.call(p, thrower);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\np.then = null;\ntry {\n  Promise.prototype.finally.call(p, thrower);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\np.then = 1;\ntry {\n  Promise.prototype.finally.call(p, thrower);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\np.then = symbol;\ntry {\n  Promise.prototype.finally.call(p, thrower);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\np.then = {};\ntry {\n  Promise.prototype.finally.call(p, thrower);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/promise-race-iterator.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction createIterable(arr, methods = {}) {\n  let iterable = function *() {\n    let idx = 0;\n    while (idx < arr.length) {\n      yield arr[idx];\n      idx++;\n    }\n  }();\n  iterable['return'] = methods['return'];\n  iterable['throw'] = methods['throw'];\n\n  return iterable;\n};\n\n// iterator next\nPromise.race({[Symbol.iterator]() { return {get next() { throw 5; }}}\n}).catch(err => {\n  assert(err === 5);\n});\n\n// iterator value\nPromise.race({ [Symbol.iterator] () { return { next () { return { get value () { throw 5 }}}}}\n}).catch(err => {\n  assert(err === 5);\n});\n\n// iterator done\nPromise.race({ [Symbol.iterator] () { return { next () { return { get done () { throw 5 }}}}}\n}).catch(err => {\n  assert(err === 5);\n});\n\n// iterator get\nPromise.race({ get [Symbol.iterator] () { throw 5 }\n}).catch(err => {\n  assert(err === 5);\n});\n\nvar fulfills = Promise.race(createIterable([\n  new Promise(resolve => { resolve(\"foo\"); }),\n  new Promise(resolve => { resolve(\"bar\"); }),\n]));\nvar rejects = Promise.race(createIterable([\n  new Promise((_, reject) => { reject(\"baz\"); }),\n  new Promise((_, reject) => { reject(\"qux\"); }),\n]));\n\nfulfills.then(result => { assert (result + \"\" === \"foo\"); });\nrejects.catch(result => { assert (result === \"baz\"); });\n\nvar closed = false;\ndelete Promise.resolve;\nPromise.race(createIterable([1,2,3], {'return': function () { closed = true; }}));\nassert (closed);\n\nvar arr = [];\nObject.defineProperty(arr, Symbol.species, { get: function () { assert(false) }});\nPromise.race(arr);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/promise-species.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Test that Promises use @@species appropriately\n\n// Another constructor with no species will not be instantiated\n\nvar test = new Promise(function(){});\nvar bogoCount = 0;\nfunction bogusConstructor() { bogoCount++; }\ntest.constructor = bogusConstructor;\nassert(Promise.resolve(test) instanceof Promise);\nassert(!(Promise.resolve(test) instanceof bogusConstructor));\n\n// If there is a species, it will be instantiated\n// @@species will be read exactly once, and the constructor is called with a\n// function\nvar count = 0;\nvar params;\n\nclass MyPromise extends Promise {\n  constructor(...args) {\n    super(...args);\n    params = args;\n  }\n  static get [Symbol.species]() {\n    count++\n    return this;\n  }\n}\n\nvar myPromise = MyPromise.resolve().then();\nassert(1 === count);\nassert(1 === params.length);\nassert('function' === typeof(params[0]));\nassert(myPromise instanceof MyPromise);\nassert(myPromise instanceof Promise);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/promise-thenable.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar counter = 0;\n\nfunction f() { }\n\nf.then = function(resolve) {\n  if (++counter < 10) {\n    resolve(f)\n  }\n}\n\nnew Promise(function(resolve) {\n  resolve(f)\n})\n\nfunction __checkAsync() {\n  assert(counter == 10)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy-date-prototype-json.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Test the Date.prototype.toJSON method's internal operation order\n * by creating a Proxy to catch the method invokations.\n */\nvar found = [];\n\nvar target = {\n  toString: function() { return \"TARGET_toString\"; },\n  toISOString: function() { return \"TARGET_toISOString\"; }\n};\n\nvar prox = new Proxy(target, {\n  get: function(trg, key) {\n    found.push(key);\n    return trg[key];\n  }\n});\n\n/* Date.prototype.toJSON -> ... -> <target>.toISOString() */\nvar json_result = Date.prototype.toJSON.call(prox);\nassert(json_result === \"TARGET_toISOString\");\n\n/* Data.prototype.toJSON -> toPrimitive -> Get -> [[Get]]\n * The first element in the \"found\" properties should be the \"@@toPrimitive\" well-known Symbol.\n */\nassert(found[0] === Symbol.toPrimitive);\n\n/* Date.prototype.toJSON -> Invoke -> GetMethod -> GetV -> [[Get]]\n * All other elements are \"methods\" and there should be no duplicates.\n */\nvar methods = found.slice(1);\nassert(methods.toString() === \"valueOf,toString,toISOString\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy-extension.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nvar target = Object.create(null);\nvar p = new Proxy(target, {\n  defineProperty: function() {\n    return true;\n  }\n});\n\nObject.preventExtensions(p);\n\ntry {\n  p.prop = null;\n  assert(false)\n}\ncatch(e)\n{\n  assert(e instanceof TypeError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy-for-in.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar handlerBoolean = {\n  ownKeys: function() { return true; },\n}\nvar boolProxy = new Proxy({}, handlerBoolean);\n\ntry {\n  for (var a in boolProxy) {\n    // This should never be called.\n    assert (false);\n  }\n\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof TypeError);\n}\n\n\nvar handlerSymbol = {\n  ownKeys: function() { return Symbol(\"alma\"); },\n}\nvar symbolProxy = new Proxy({}, handlerSymbol);\n\ntry {\n  for (var a in symbolProxy) {\n    // This should never be called.\n    assert (false);\n  }\n\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof TypeError);\n}\n\n\nvar handlerNumber = {\n  ownKeys: function() { return 1; },\n}\nvar numberProxy = new Proxy({}, handlerNumber);\n\ntry {\n  for (var a in numberProxy) {\n    // This should never be called.\n    assert (false);\n  }\n\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof TypeError);\n}\n\n\nvar handlerObject = {\n  ownKeys: function() { return {}; },\n}\nvar objectProxy = new Proxy({}, handlerObject);\n\nfor (var a in objectProxy) {\n  // This should never be called.\n  assert (false);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_call.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = function () {};\nvar handler = { apply (target) {\n  throw 42;\n}};\n\nvar proxy = new Proxy (target, handler);\n\ntry {\n  // opfunc_call\n  proxy (5)\n  assert (false);\n} catch (e) {\n  assert (e == 42);\n}\n\ntry {\n  var revocable = Proxy.revokable (function () {}, {});\n  proxy = new Proxy(revocable.proxy, {})\n  revocable.revoke();\n  proxy (5)\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nfunction sum (a, b) {\n  return a + b;\n}\n\nvar handler = {\n  apply: function (target, thisArg, argumentsList) {\n    return target (argumentsList[0], argumentsList[1]) * 10;\n  }\n};\n\nvar proxy1 = new Proxy(sum, handler);\n\nassert (sum (1, 2) === 3);\nassert (proxy1 (1, 2) === 30);\n\n// Non Callable tests\nvar proxy = new Proxy ({},{});\ntry {\n  proxy()\n  assert (false)\n} catch (e) {\n  assert (e instanceof TypeError)\n}\n\nvar proxy2 = new Proxy(proxy, {});\ntry {\n  proxy2()\n  assert (false)\n} catch (e) {\n  assert (e instanceof TypeError)\n}\n\n// No arguments\nvar called = false;\nvar target = function () {\n  called = true;\n}\nvar proxy = new Proxy (target, {});\nassert (!called);\nproxy();\nassert (called);\n\ncalled = false;\nvar proxy2 = new Proxy (proxy, {});\nassert (!called);\nproxy2();\nassert (called);\n\n//1 Argument\nvar called = false;\nvar target = function (a) {\n  called = true;\n  assert ('1' === a);\n}\nvar proxy = new Proxy (target, {});\nassert (!called);\nproxy ('1');\nassert (called);\n\n// 2 Arguments\nvar called = false;\nvar target = function (a, b) {\n  called = true;\n  assert ('1' === a);\n  assert ('2' === b);\n}\nvar proxy = new Proxy (target, {});\nassert (!called);\nproxy ('1', '2');\nassert (called);\n\n// Changed receiver\nvar apply_receiver = {receiver:true};\nvar seen_receiver = undefined;\nvar target = function () {\n  seen_receiver = this;\n}\nvar proxy = new Proxy (target, {});\nassert (undefined === seen_receiver);\nReflect.apply (proxy, apply_receiver, [1,2,3,4]);\nassert (apply_receiver === seen_receiver);\n\n// Trap\nvar called_target = false;\nvar called_handler = false;\nvar target = function (a, b) {\n  called_target = true;\n  assert (1 === a);\n  assert (2 === b);\n}\nvar handler = {\n  apply: function (target, this_arg, args) {\n    target.apply (this_arg, args);\n    called_handler = true;\n  }\n}\nvar proxy = new Proxy (target, handler);\nassert (!called_target);\nassert (!called_handler);\nReflect.apply (proxy, {rec:1}, [1,2]);\nassert (called_target);\nassert (called_handler);\n\n// Trap array arg\nvar called_target = false;\nvar called_handler = false;\nvar target = function (a, b) {\n  called_target = true;\n  var arg = [1, 2];\n  assert (arg[0] === a[0]);\n  assert (arg[1] === a[1]);\n  assert (3 === b);\n}\nvar handler = {\n  apply: function (target, this_arg, args) {\n    target.apply (this_arg, args);\n    called_handler = true;\n  }\n}\nvar proxy = new Proxy (target, handler);\nassert (!called_target);\nassert (!called_handler);\nproxy ([1,2], 3);\nassert (called_target);\nassert (called_handler);\n\n// Trap object arg\nvar called_target = false;\nvar called_handler = false;\nvar target = function (o) {\n  called_target = true;\n  var obj = {a: 1, b: 2}\n  assert (obj.a === o.a);\n  assert (obj.b === o.b)\n}\nvar handler = {\n  apply: function (target, this_arg, args) {\n    target.apply (this_arg, args);\n    called_handler = true;\n  }\n}\nvar proxy = new Proxy (target, handler);\nassert (!called_target);\nassert (!called_handler);\nproxy ({a: 1, b: 2});\nassert (called_target);\nassert (called_handler);\n\n// Trap generator arg\nfunction* gen () {\n  yield 1;\n  yield 2;\n  yield 3;\n}\nvar called_target = false;\nvar called_handler = false;\nvar target = function (g) {\n  called_target = true;\n  var arr = [1, 2, 3];\n  var arr2 = [...g];\n  assert (arr[0] === arr2[0]);\n  assert (arr[1] === arr2[1]);\n  assert (arr[2] === arr2[2]);\n}\nvar handler = {\n  apply: function (target, this_arg, args) {\n    target.apply (this_arg, args);\n    called_handler = true;\n  }\n}\nvar proxy = new Proxy (target, handler);\nassert (!called_target);\nassert (!called_handler);\nproxy (gen());\nassert (called_target);\nassert (called_handler);\n\n// Noncallable Trap\nvar called_target = false;\nvar target = function () {\n  called_target = true;\n};\nvar handler = {\n  apply: 'non callable trap'\n};\n\nvar proxy = new Proxy(target, handler);\ntry {\n  proxy ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (!called_target);\n\n// Null trap\nvar _args;\nvar target = function (a, b) {\n  _args = [a, b];\n  return a + b;\n};\nvar handler = {\n  apply: null\n};\n\nvar proxy = new Proxy (target, handler);\nvar result = proxy (1, 2);\n\nassert (result === 3);\nassert (_args.length === 2);\nassert (_args[0] === 1);\nassert (_args[1] === 2);\n\nvar values = [NaN, 1.5, 100, /RegExp/, \"string\", {}, [], Symbol(),\n                new Map(), new Set(), new WeakMap(), new WeakSet()];\nvalues.forEach(target => {\n  target = Object (target);\n  var proxy = new Proxy(target, { apply() { assert (false) } });\n  try {\n    proxy();\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    ({ proxy }).proxy();\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Reflect.apply(proxy, null, []);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Reflect.apply(proxy, { proxy }, []);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Reflect.apply(proxy, { proxy }, []);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Function.prototype.call.apply (proxy, [null]);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Function.prototype.apply.apply (proxy, [null, []]);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  var proxy_to_proxy = new Proxy (proxy, { apply() { assert (false); } });\n\n  try {\n    proxy_to_proxy ();\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    ({ proxy_to_proxy }).proxy_to_proxy();\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Reflect.apply (proxy_to_proxy, null, []);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Reflect.apply (proxy_to_proxy, { proxy }, []);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Function.prototype.call.apply (proxy_to_proxy, [null]);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    Function.prototype.apply.apply (proxy_to_proxy, [null, []]);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_construct.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = function () {};\nvar handler = { construct (target) {\n  throw 42;\n}};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  // opfunc_call\n  new proxy(5)\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // 22.1.2.3.4.a\n  Array.of.call(proxy);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test basic functionality\nvar proxy = new Proxy({},{});\n\ntry {\n  new proxy();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar proxy2 = new Proxy(proxy, {});\n\ntry {\n  new proxy2();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar called = false;\n\nfunction Target() {\n  called = true;\n  this.property1 = 'value1';\n};\n\nTarget.prototype = {};\nvar proxy = new Proxy(Target, {});\n\nassert(called === false);\n\nvar instance = new proxy();\n\nassert(called === true);\nassert('value1' === instance.property1);\nassert(Target.prototype === Object.getPrototypeOf(instance));\n\nvar proxy2 = new Proxy(proxy, {});\ncalled = false;\nvar instance2 = new proxy2();\n\nassert(called === true);\nassert('value1' === instance2.property1);\nassert(Target.prototype === Object.getPrototypeOf(instance));\n\nfunction Target2(a, b) {\n  this.sum = a + b;\n};\nvar handler = {\n  construct(t, c, args) {\n      return { sum: 42 };\n  }\n};\nvar proxy = new Proxy(Target2, handler);\nassert((new proxy(1, 2)).sum === 42);\n\nfunction Target3(arg1, arg2) {\n  this.arg1 = arg1;\n  this.arg2 = arg2;\n}\nvar seen_target, seen_arguments, seen_new_target;\nvar handler = {\n  construct(target, args, new_target) {\n    seen_target = target;\n    seen_arguments = args;\n    seen_new_target = new_target;\n    return Reflect.construct(target, args, new_target);\n  }\n}\nvar proxy = new Proxy(Target3, handler);\nvar instance = new proxy('a', 'b');\n\nassert(Target3 === seen_target);\nassert(JSON.stringify(seen_arguments) === '[\"a\",\"b\"]');\nassert(proxy === seen_new_target);\nassert('a' === instance.arg1);\nassert('b' === instance.arg2);\n\nvar instance2 = Reflect.construct(proxy, ['a1', 'b1'], Array);\nassert(Target3 === seen_target);\nassert(JSON.stringify(seen_arguments) === '[\"a1\",\"b1\"]');\nassert(Array === seen_new_target);\nassert('a1'=== instance2.arg1);\nassert('b1' === instance2.arg2);\n\nvar p = new Proxy(function() {}, {\n  construct: function(target, argumentsList, newTarget) {\n    throw 42;\n  }\n});\n\ntry {\n  new p();\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when invariants gets violated\nvar p = new Proxy(function() {}, {\n  construct: function(target, argumentsList, newTarget) {\n    return 1;\n  }\n});\n\ntry {\n  new p();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError); \n}\n\nvar p = new Proxy({}, {\n  construct: function(target, argumentsList, newTarget) {\n    return {};\n  }\n});\n\ntry {\n  new p();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError); \n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_create.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar target = {}\nvar handler = {};\nvar proxy = new Proxy(target, handler);\n\nvar revocable = Proxy.revocable(target, handler);\nrevocable.revoke();\nvar rev_proxy = revocable.proxy;\n\ntry {\n  Proxy(target, handler);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  new Proxy(undefined, undefined);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  new Proxy(rev_proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* In ES11+ the standard changed revoked proxy is a valid input for a new Proxy */\nvar proxy_rev_handler = new Proxy({}, rev_proxy);\nvar proxy_rev_target_Br = new Proxy(rev_proxy, {});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_define_own_property.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = function () {};\nvar handler = { defineProperty (target) {\n  throw 42;\n}, construct () {\n  return {};\n}};\n\nvar proxy = new Proxy(target, handler);\n\n// 22.1.2.3.8.c\nArray.of.call(proxy, 5)\n\n// test basic functionality\nvar g_target, g_name;\n\nvar handler = {\n  defineProperty: function(target, name, desc) {\n    g_target = target;\n    g_name = name;\n    return true;\n  }\n}\n\nvar target = {};\nvar proxy = new Proxy(target, handler);\nvar desc = { value: 1, writable: true, configurable: true };\n\nObject.defineProperty(proxy, \"foo\", desc);\n\nassert(target === g_target);\nassert(\"foo\" === g_name);\n\nvar handler = {\n  defineProperty: function(target, name, desc) {\n    Object.defineProperty(target, name, desc);\n  }\n}\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.defineProperty(proxy, \"bar\", desc);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar bar = Object.getOwnPropertyDescriptor(proxy, \"bar\");\nassert(bar.value === 1);\nassert(bar.writable);\nassert(bar.configurable);\n\ntry {\n  Object.defineProperty(proxy, \"name\", {});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n\n// test when trap is not callable\nvar target = {};\nvar handler = {\n  defineProperty: 1\n}\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.defineProperty(proxy, \"foo\", {value: \"foo\"});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when trap is undefined\nvar target = {};\nvar handler = {\n  defineProperty: undefined\n}\n\nvar proxy = new Proxy(target, handler);\nvar desc = { value: 1 };\n\nObject.defineProperty(proxy, \"prop1\", desc);\nassert(proxy.prop1 === 1);\n\nvar target2 = {};\nvar proxy2 = new Proxy(target2, {});\n\nObject.defineProperty(proxy2, \"prop2\", desc);\nassert(proxy2.prop2 === 1);\n\n// test when invariants gets violated\nvar target = {};\nvar handler = {\n  defineProperty: function(target, name, desc) {\n    return true;\n  }\n}\n\nvar proxy = new Proxy(target, handler);\n\nObject.preventExtensions(target);\n\ntry {\n  Object.defineProperty(proxy, \"foo\", {value: 1});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar target = {};\nvar desc = {value: 1, writable: true, configurable: false, enumerable: true};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.defineProperty(proxy, \"foo\", desc);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar target = {};\nvar handler = {\n  defineProperty: function(target, name, desc) {\n    return true;\n  }\n}\n\nvar proxy = new Proxy(target, handler);\n\nObject.defineProperty(target, \"foo\", {value: 1, writable: false, configurable: false});\n\ntry {\n  Object.defineProperty(proxy, 'foo', {value: 2});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntarget.bar = \"baz\";\n\ntry {\n  Object.defineProperty(proxy, 'bar', {value: 2, configurable: false});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar trapCalls = 0;\nvar p = new Proxy({}, {\n  defineProperty: function(t, prop, desc) {\n    Object.defineProperty(t, prop, {\n      configurable: false,\n      writable: true,\n    });\n\n    trapCalls++;\n    return true;\n  },\n});\n\ntry {\n  Reflect.defineProperty (p, \"prop\", {\n    writable: false,\n  });\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (trapCalls == 1)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_delete.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = {};\nvar handler = { deleteProperty (target) {\n  throw 42;\n}, get (object, propName) {\n  if (propName == \"length\") {\n    return 5;\n  }\n}};\n\nvar proxy = new Proxy(target, handler);\n\nvar a = 5;\n\n// ecma_op_delete_binding\nwith (proxy) {\n  delete a\n}\n\ntry {\n  // 22.1.3.16.6.e\n  Array.prototype.pop.call(proxy);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test basic functionality\nvar target = {foo: \"bar\"};\nvar handler = {\n  deleteProperty(obj, prop) {\n    delete obj[prop];\n  }\n}\n\nvar proxy = new Proxy(target, handler);\n\nassert(target.foo === \"bar\")\nassert(proxy.foo === \"bar\");\n\nassert(delete proxy.foo === false);\n\nassert(target.foo === undefined);\nassert(proxy.foo === undefined);\n\nassert(target.bar === undefined);\nassert(delete proxy.bar == false);\nassert(target.bar === undefined);\n\nvar handler2 = {\n  deleteProperty(obj, prop) {\n    delete obj[prop];\n    return true;\n  }\n}\n\nvar proxy = new Proxy(target, handler2);\n\nassert(target.bar === undefined);\nassert(delete proxy.bar == true);\nassert(target.bar === undefined);\n\n// test with no trap\nvar target = {1: 42};\nvar handler = {};\nvar proxy = new Proxy(target, handler);\n\nassert(target[1] === 42)\nassert(delete proxy[1] === true)\nassert(target[1] === undefined);\n\n// test with undefined trap\nvar target = {2: 52};\nvar handler = { deleteProperty: null};\nvar proxy = new Proxy(target, handler);\n\nassert(target[2] === 52)\nassert(delete proxy[2] === true)\nassert(target[2] === undefined);\n\n// test when trap is invalid\nvar target = {};\nvar handler = { deleteProperty: true };\nvar proxy = new Proxy(target, handler);\n\ntry {\n  delete proxy[0];\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when handler is null\nvar revocable = Proxy.revocable ({}, {});\nvar proxy = revocable.proxy;\nrevocable.revoke();\n\ntry {\n  delete proxy.foo;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when target is proxy\nvar target = {prop: \"foo\"};\nvar handler = {\n  deleteProperty(obj, prop) {\n    delete obj[prop];\n  }\n};\n\nvar proxy1 = new Proxy(target, handler);\nvar proxy2 = new Proxy(proxy1, handler);\n\nassert(target.prop === \"foo\");\nassert(proxy1.prop === \"foo\");\nassert(proxy2.prop === \"foo\");\n\ndelete proxy2.prop;\n\nassert(target.prop === undefined);\nassert(proxy1.prop === undefined);\nassert(proxy2.prop === undefined);\n\n// tests when invariants gets violated\nvar target = {};\nvar handler = {\n  deleteProperty(obj, prop) {\n    delete obj[prop];\n    return true;\n  }\n};\n\nObject.defineProperty(target, \"foo\", {\n  configurable: false,\n  value: \"foo\"\n});\n\nvar proxy = new Proxy (target, handler);\n\ntry {\n  delete proxy.foo;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar trapCalls = 0;\nvar p = new Proxy({prop: 1}, {\n  deleteProperty: function(t, prop) {\n    Object.preventExtensions(t);\n    trapCalls++;\n    return true;\n  },\n});\n\ntry {\n  Reflect.deleteProperty (p, \"prop\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (trapCalls == 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_flags.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar target_called = 0;\nfunction target_method() {\n  target_called++;\n}\n\nvar proxy_revocable_function = Proxy.revocable(target_method, {})\nvar proxy_function = proxy_revocable_function.proxy;\n\n/* Test Proxy IsCallable(target) */\n/* The proxy target should have a function type. */\nassert(typeof(proxy_function) === \"function\");\n\n/* The proxy can be called with new */\nvar new_obj = new proxy_function()\nassert(new_obj instanceof target_method);\nassert(target_called === 1);\n\n/* Test Proxy IsConstructor(target) */\n/* Array.from tries to use the \"this\" value as constructor. */\nvar array_result = Array.from.call(proxy_function, [1, 2, 3]);\nassert(Array.isArray(array_result) === false);\nassert(target_called === 2);\n\nproxy_revocable_function.revoke();\n\n/* Test Proxy IsCallable(target) if the proxy is revoked. */\n/* After the proxy was revoked the type is still function. */\nassert(typeof(proxy_function) === \"function\");\n\n/* After the proxy was revoked the constructor should not be called\n * and an error should be reported\n */\ntry {\n  new proxy_function();\n  assert(false);\n} catch (ex) {\n  assert(ex instanceof TypeError);\n}\n\nassert(target_called === 2);\n\n/* Test Proxy IsConstructor(target) if the proxy is revoked. */\n/* Array.from tries to use the \"this\" value as constructor and as the\n * proxy is revoked the constructor call should fail.\n * The IsConstructor(proxy_function) is still true.\n */\ntry {\n  Array.from.call(proxy_function, [1, 2, 3]);\n  assert(false);\n} catch (ex) {\n  assert(ex instanceof TypeError);\n}\n\nassert(target_called === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_get.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = {};\nvar handler = { get (target) {\n  throw 42;\n}};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  // vm_op_get_value\n  proxy.a\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // ecma_op_get_value_object_base\n  proxy[2];\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // @@toPrimitive symbol\n  proxy + \"foo\";\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test basic funcionality\nvar target = {\n  target_one: 1,\n  prop: \"value\"\n};\n\nvar handler = {handler: 1};\nvar proxy = new Proxy(target, handler);\n\nassert(proxy.prop === \"value\");\nassert(proxy.nothing === undefined);\nassert(proxy.handler === undefined);\n\nhandler.get = function () {return \"value 2\"};\n\nassert(proxy.prop === \"value 2\");\nassert(proxy.nothing === \"value 2\");\nassert(proxy.handler === \"value 2\");\n\nvar handler2 = new Proxy({get: function() {return \"value 3\"}}, {});\nvar proxy2 = new Proxy(target, handler2);\n\nassert(proxy2.prop === \"value 3\");\nassert(proxy2.nothing === \"value 3\");\nassert(proxy2.handler === \"value 3\");\n\nvar get = [];\nvar p = new Proxy([0,,2,,4,,], { get: function(o, k) { get.push(k); return o[k]; }});\nArray.prototype.reverse.call(p);\n\nassert(get + '' === \"length,0,4,2\");\n\n// test when get throws an error\nvar handler = new Proxy({}, {get: function() {throw 42;}});\nvar proxy = new Proxy ({}, handler);\n\ntry {\n  proxy.prop;\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when trap is undefined\nvar handler = new Proxy({}, {get: function() {return undefined}});\nvar target = {prop: \"value\"};\nvar proxy = new Proxy(target, handler);\nassert(proxy.prop === \"value\");\nassert(proxy.prop2 === undefined);\n\n// test when invariants gets violated\nvar target = {};\nvar handler = {get: function(r, p){if (p != \"key4\") return \"value\"}}\nvar proxy = new Proxy(target, handler);\n\nassert(proxy.key === \"value\");\nassert(proxy.key2 === \"value\");\nassert(proxy.key3 === \"value\");\nassert(proxy.key4 === undefined);\n\nObject.defineProperty(target, \"key\", {\n  configurable: false,\n  writable: false,\n  value: \"different value\"\n});\n\ntry {\n  proxy.key;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n\nObject.defineProperty(target, \"key2\", {\n  configurable: false,\n  get: function() {return \"different value\"}\n});\n\nassert(proxy.key2 === \"value\");\n\nObject.defineProperty(target, \"key3\", {\n  configurable: false,\n  set: function() {}\n});\n\ntry {\n  proxy.key3;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_get_own_property_descriptor.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = {};\nvar handler = { getOwnPropertyDescriptor (target) {\n  throw \"cat\";\n}};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  // 19.1.3.2.5\n  Object.prototype.hasOwnProperty.call(proxy);\n  assert(false);\n} catch(e) {\n  assert(e == \"cat\");\n}\n\ntry {\n  // 19.1.3.4\n  Object.prototype.propertyIsEnumerable.call(proxy)\n  assert(false);\n} catch(e) {\n  assert(e == \"cat\");\n}\n\ntry {\n  // 19.1.2.6.5\n  Object.getOwnPropertyDescriptor(proxy)\n  assert(false);\n} catch(e) {\n  assert(e == \"cat\");\n}\n\nvar target = {};\nvar configurable_desc = {\n  value: 123,\n  configurable: true,\n  writable: true,\n  enumerable: false,\n};\nObject.defineProperty(target, \"configurable\", configurable_desc);\n\nvar nonconfigurable_desc = {\n  value: 234,\n  configurable: false,\n  writable: false,\n  enumerable: true\n}\nObject.defineProperty(target, \"nonconfigurable\", nonconfigurable_desc);\n\nvar proxied_desc = {\n  value: 345,\n  configurable: true\n};\n\nvar proxied_desc = {\n  value: 345,\n  configurable: true\n};\n\nvar handler = {\n  \"getOwnPropertyDescriptor\": function(target, name) {\n    if (name === \"proxied\") {\n      return proxied_desc;\n    }\n    if (name === \"return_null\") {\n      return null;\n    }\n    return Object.getOwnPropertyDescriptor(target, name);\n  }\n};\n\nvar proxy = new Proxy(target, handler);\nvar proxy_without_handler = new Proxy(target, {});\n\n// Checking basic functionality:\n\nvar configurable_obj = Object.getOwnPropertyDescriptor(proxy, \"configurable\");\n\nassert(configurable_desc.value == configurable_obj.value);\nassert(configurable_desc.configurable == configurable_obj.configurable);\nassert(configurable_desc.writable == configurable_obj.writable);\nassert(configurable_desc.enumerable == configurable_obj.enumerable);\n\nvar nonconfigurable_obj = Object.getOwnPropertyDescriptor(proxy, \"nonconfigurable\");\nassert(nonconfigurable_obj.value == nonconfigurable_desc.value);\nassert(nonconfigurable_obj.configurable == nonconfigurable_desc.configurable);\nassert(nonconfigurable_obj.writable == nonconfigurable_desc.writable);\nassert(nonconfigurable_obj.enumerable == nonconfigurable_desc.enumerable);\n\nvar other_obj = { value: proxied_desc.value,\n                  configurable: proxied_desc.configurable,\n                  enumerable: false,\n                  writable: false }\nvar proxied_obj = Object.getOwnPropertyDescriptor(proxy, \"proxied\");\n\nassert(other_obj.value == proxied_obj.value);\nassert(other_obj.configurable == proxied_obj.configurable);\nassert(other_obj.writable == proxied_obj.writable);\nassert(other_obj.enumerable == proxied_obj.enumerable);\n\nvar other_obj2 = Object.getOwnPropertyDescriptor(proxy_without_handler, \"configurable\");\n\nassert(other_obj2.value == configurable_desc.value);\nassert(other_obj2.configurable == configurable_desc.configurable);\nassert(other_obj2.writable == configurable_desc.writable);\nassert(other_obj2.enumerable == configurable_desc.enumerable);\n\nvar other_obj3 = Object.getOwnPropertyDescriptor(proxy_without_handler, \"nonconfigurable\");\n\nassert(other_obj3.value == nonconfigurable_desc.value);\nassert(other_obj3.configurable == nonconfigurable_desc.configurable);\nassert(other_obj3.writable == nonconfigurable_desc.writable);\nassert(other_obj3.enumerable == nonconfigurable_desc.enumerable);\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"return_null\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// Checking invariants mentioned explicitly by the ES spec:\n\n// (Inv-1) \"A property cannot be reported as non-existent, if it exists as a\n// non-configurable own property of the target object.\"\nhandler.getOwnPropertyDescriptor = function(target, name) { return undefined; };\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"nonconfigurable\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\nassert(Object.getOwnPropertyDescriptor(proxy, \"configurable\") == undefined)\n\n// (Inv-2) \"A property cannot be reported as non-configurable, if it does not\n// exist as an own property of the target object or if it exists as a\n// configurable own property of the target object.\"\nhandler.getOwnPropertyDescriptor = function(target, name) {\n  return {value: 234, configurable: false, enumerable: true};\n};\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"nonexistent\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"configurable\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\nassert(!Object.getOwnPropertyDescriptor(proxy, \"nonconfigurable\").configurable);\n\n// (Inv-3) \"A property cannot be reported as non-existent, if it exists as an\n// own property of the target object and the target object is not extensible.\"\nObject.seal(target);\nhandler.getOwnPropertyDescriptor = function(target, name) { return undefined; };\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"configurable\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"nonconfigurable\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\nassert(undefined == Object.getOwnPropertyDescriptor(proxy, \"nonexistent\"));\n\n// (Inv-4) \"A property cannot be reported as existent, if it does not exist as\n// an own property of the target object and the target object is not\n// extensible.\"\nvar existent_desc = {value: \"yes\"};\nhandler.getOwnPropertyDescriptor = function() { return existent_desc; };\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"nonexistent\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\nvar new_obj =  {  value: \"yes\",\n                  writable: false,\n                  enumerable: false,\n                  configurable: false };\nvar conf_proxied = Object.getOwnPropertyDescriptor(proxy, \"configurable\");\n\nassert(new_obj.value == conf_proxied.value);\nassert(new_obj.configurable == conf_proxied.configurable);\nassert(new_obj.writable == conf_proxied.writable);\nassert(new_obj.enumerable == conf_proxied.enumerable);\n\n// Checking individual bailout points in the implementation:\n\n// Step 6: Trap is not callable.\nhandler.getOwnPropertyDescriptor = {};\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"configurable\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// Step 8: Trap throws.\nhandler.getOwnPropertyDescriptor = function() { throw \"unicorn\"; };\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"configurable\");\n  assert(false);\n} catch(e) {\n  assert(e == \"unicorn\");\n}\n\n// Step 9: Trap result is neither undefined nor an object.\nhandler.getOwnPropertyDescriptor = function() { return 1; }\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"configurable\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// Step 11b: See (Inv-1) above.\n// Step 11e: See (Inv-3) above.\n\n// Step 16: Incompatible PropertyDescriptor; a non-configurable property\n// cannot be reported as configurable. (Inv-4) above checks more cases.\nhandler.getOwnPropertyDescriptor = function(target, name) {\n  return {value: 456, configurable: true, writable: true}\n};\n\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"nonconfigurable\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// Step 17: See (Inv-2) above.\n\nvar result = [];\nvar proxy = new Proxy({foo: 1, bar: 2}, {\n  getOwnPropertyDescriptor: function(o, v) {\n    result.push(v);\n    return Object.getOwnPropertyDescriptor(o, v);\n  }\n});\n\nObject.assign({}, proxy);\n\nassert(result.length === 2);\nassert(result[0] === \"foo\");\nassert(result[1] === \"bar\");\n\n\nvar trapCalls = 0;\nvar p = new Proxy({}, {\n  getOwnPropertyDescriptor: function(t, prop) {\n    Object.defineProperty(t, prop, {\n      configurable: false,\n      writable: true,\n    });\n\n    trapCalls++;\n    return {\n      configurable: false,\n      writable: false,\n    };\n  },\n});\n\ntry\n{\n  Object.getOwnPropertyDescriptor(p, \"prop\");\n  assert (false)\n}\ncatch (e)\n{\n  assert(e instanceof TypeError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_get_prototoype_of.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = {};\nvar handler = { getPrototypeOf (target) {\n  throw 42;\n}};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  // 19.1.2.9.2\n  Object.getPrototypeOf(proxy);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // 19.1.3.3\n  Object.prototype.isPrototypeOf(proxy);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n(function () {\n  class e extends Array {};\n  function f () {};\n  function g () {};\n\n  Object.setPrototypeOf(g, proxy);\n\n  // 7.3.19.7.b\n  try {\n    g instanceof f;\n    assert(false);\n  } catch (e) {\n    assert(e === 42);\n  }\n\n  // ecma_op_implicit_class_constructor_has_instance [[GetPrototypeOf]]\n  try {\n    g instanceof e;\n    assert(false);\n  } catch (e) {\n    assert(e === 42);\n  }\n})();\n\ntry {\n  // 9.4.1.3.3\n  Function.prototype.bind.call(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test basic functionality\nvar target = {};\nvar handler = {\n  getPrototypeOf(target) {\n    return Array.prototype;\n  }\n}\nvar proxy = new Proxy(target, handler);\n\nassert(Object.getPrototypeOf(proxy) === Array.prototype);\nassert(Reflect.getPrototypeOf(proxy) === Array.prototype);\nassert(Array.prototype.isPrototypeOf(proxy));\nassert(proxy instanceof Array);\n\nvar obj = Object.preventExtensions({});\nassert(Object.getPrototypeOf(obj) === Object.prototype);\n\nvar handler = {\n  getPrototypeOf(target) {\n    return Object.prototype;\n  }\n}\nvar proxy = new Proxy(target, handler);\nassert(Object.getPrototypeOf(proxy) === Object.prototype);\n\n// test with no trap\nvar target = {};\nvar handler = {};\nvar proxy = new Proxy(target, handler);\n\nassert(Object.getPrototypeOf(proxy) === Object.prototype);\n\n// test with \"undefined\" trap\nvar target = {};\nvar handler = { getPrototypeOf: null };\nvar proxy = new Proxy(target, handler);\n\nassert(Object.getPrototypeOf(proxy) === Object.prototype);\n\n// test with invalid trap\nvar target = {};\nvar handler = { getPrototypeOf: 42 };\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.getPrototypeOf(proxy)\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when target is proxy\nvar target = {};\nvar handler = {};\nvar proxy = new Proxy(target, handler);\n\nvar target_prototype = {};\nhandler.getPrototypeOf = function() {\n  return target_prototype ;\n}\n\nvar proxy2 = new Proxy(proxy, handler);\nassert(Object.getPrototypeOf(proxy2) === target_prototype);\n\n// test when invariants gets violated\nvar target = {};\nvar handler = {\n  getPrototypeOf(target) {\n    return 'foo';\n  }\n}\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.getPrototypeOf(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar target = Object.preventExtensions({});\nvar handler = {\n  getPrototypeOf(target) {\n    return {};\n  }\n}\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.getPrototypeOf(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_has.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = {};\nvar handler = { has (target) {\n  throw 42;\n}};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  // 12.9.3\n  \"foo\" in proxy;\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // 8.1.1.2.1\n  with (proxy) {\n    p;\n    assert(false);\n  }\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // ecma_op_put_value_lex_env_base/[[HasProperty]]\n  with (proxy) {\n    function a (){}\n    assert(false);\n  }\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test basic functionality\nvar target = {\n  \"target_one\": 1\n};\n\nvar handler = {\n  has: function(target, prop) {\n    return prop == \"present\";\n  }\n}\n\nvar proxy = new Proxy(target, handler);\n\nassert(\"present\" in proxy === true);\nassert(\"non_present\" in proxy === false);\n\nvar target = {\n  foo: 5,\n  bar: 10\n};\n\nvar handler = {\n  has: function(target, prop) {\n    if (prop[0] === 'f') {\n      return false;\n    }\n    return prop in target;\n  }\n};\n\nvar proxy = new Proxy(target, handler);\n\nassert(\"foo\" in proxy === false);\nassert(\"bar\" in proxy === true);\n\n// test with no trap\nvar target = {\n  foo: \"foo\"\n};\nvar handler = {};\nvar proxy = new Proxy(target, handler);\n\nassert(\"foo\" in proxy === true);\n\n// test with \"undefined\" trap\nvar target = {\n  foo: \"foo\"\n};\nvar handler = {has: null};\nvar proxy = new Proxy(target, handler);\n\nassert(\"foo\" in proxy === true);\n\n// test with invalid trap\nvar target = {\n  foo: \"foo\"\n};\nvar handler = {has: 42};\nvar proxy = new Proxy(target, handler);\n\ntry {\n  \"foo\" in proxy;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when target is proxy\nvar target = {\n  foo: \"foo\"\n};\n\nvar handler = {\n  has: function(target, prop) {\n    return prop in target;\n  }\n}\n\nvar proxy1 = new Proxy(target, handler);\nvar proxy2 = new Proxy(proxy1, handler);\n\nassert(\"foo\" in proxy2 === true);\n\n// test when invariants gets violated\nvar target = {};\n\nObject.defineProperty(target, \"prop\", {\n  configurable: false,\n  value: 10\n})\n\nvar handler = {\n  has: function(target, prop) {\n    return false;\n  }\n}\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  'prop' in proxy;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar target = { a: 10 };\nObject.preventExtensions(target);\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  'a' in proxy;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_is_extensible.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// error checks\nvar target = {};\nvar handler = { isExtensible (target) {\n  throw 42;\n}};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  // 7.3.15\n  Object.isFrozen(proxy)\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // 7.3.15\n  Object.isSealed(proxy)\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // 7.2.5\n  Object.isExtensible(proxy)\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// no trap\nvar target = {};\nvar handler = {};\nvar proxy = new Proxy(target, handler);\nassert(Object.isExtensible(target) === true)\nassert(Object.isExtensible(proxy) === true);\nObject.preventExtensions(target);\nassert(Object.isExtensible(target) === false);\nassert(Object.isExtensible(proxy) === false);\n\n// undefined trap\nvar target = {};\nvar handler =  { isExtensible: null };\nvar proxy = new Proxy(target, handler);\nassert(Object.isExtensible(target) === true)\nassert(Object.isExtensible(proxy) === true);\nObject.preventExtensions(target);\nassert(Object.isExtensible(target) === false);\nassert(Object.isExtensible(proxy) === false);\n\n// invalid trap\nvar target = {};\nvar handler =  { isExtensible: true };\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.isExtensible(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError); \n}\n\n// valid trap\nvar target = { prop1: true };\nvar handler = {\n  isExtensible(target) {\n    target.prop1 = false;\n    return Object.isExtensible(target);\n  }\n};\n\nvar proxy = new Proxy(target, handler);\nassert(Object.isExtensible(proxy) === true);\nassert(target.prop1 === false);\nObject.preventExtensions(target);\nassert(Object.isExtensible(target) === false);\nassert(Object.isExtensible(proxy) === false);\n\n// trap result is invalid\nvar target = {};\nvar handler = {\n  isExtensible(target) {\n    return false;\n  }\n};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.isExtensible(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// handler is null\nvar target = {};\nvar handler = { \n  isExtensible (target) {\n    return Object.isExtensible(target);\n  }\n};\n\nvar revocable = Proxy.revocable (target, {});\nvar proxy = revocable.proxy;\nrevocable.revoke();\n\ntry {\n  Object.isExtensible(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// proxy within proxy\nvar target = {};\nvar handler1 = {\n  isExtensible(target) {\n    return Object.isExtensible(target);\n  }\n};\n\nvar handler2 = {\n  isExtensible(target) {\n    return false;\n  }\n};\n\nvar proxy = new Proxy(target, handler1);\nvar proxy2 = new Proxy(proxy, handler1);\nassert(Object.isExtensible(proxy2) === true);\n\nvar proxy3 = new Proxy(proxy, handler2);\n\ntry {\n  Object.isExtensible(proxy3);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar proxy4 = new Proxy(proxy2, handler1);\nObject.preventExtensions(target);\nassert(Object.isExtensible(proxy4) === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_own_keys.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nfunction array_check(result_array, expected_array) {\n  assert(result_array instanceof Array);\n  assert(result_array.length === expected_array.length);\n  for (var idx = 0; idx < expected_array.length; idx++) {\n    assert(result_array[idx] === expected_array[idx]);\n  }\n}\n\nvar target = {};\nvar handler = { ownKeys (target) {\n  throw 42;\n}};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  // 19.1.2.14.4\n  Object.keys(proxy);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // 19.1.2.7.1\n  Object.getOwnPropertyNames(proxy);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // 19.1.2.8.1\n  Object.getOwnPropertySymbols(proxy);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\nvar handler = { ownKeys (target) {\n  return [\"a\"];\n}};\n\nvar proxy = new Proxy(target, handler);\nvar sort_result = Array.prototype.sort.call(proxy);\nassert(Object.keys(sort_result).length === 0);\n\n// test basic functionality\nvar symA = Symbol(\"smA\");\nvar symB = Symbol(\"smB\");\nvar target = { prop1: \"prop1\", prop2: \"prop2\"};\ntarget[symB] = \"s3\";\nvar handler = {\n  ownKeys: function(target) {\n    return [\"foo\", \"bar\", symA];\n  }\n}\n\nvar proxy = new Proxy(target, handler);\n\narray_check(Reflect.ownKeys(proxy), [\"foo\", \"bar\", symA]);\narray_check(Object.getOwnPropertyNames(proxy), [\"foo\", \"bar\"]);\narray_check(Object.keys(proxy), []);\narray_check(Object.getOwnPropertySymbols(proxy), [symA]);\n\nhandler.ownKeys = function(target) {return Object.getOwnPropertyNames(target);};\n\narray_check(Reflect.ownKeys(proxy), [\"prop1\", \"prop2\"]);\narray_check(Object.getOwnPropertyNames(proxy), [\"prop1\", \"prop2\"]);\narray_check(Object.keys(proxy), [\"prop1\", \"prop2\"]);\narray_check(Object.getOwnPropertySymbols(proxy), []);\n\n// test with no trap\nvar target = { prop1: \"prop1\", prop2: \"prop2\"};\nvar handler = {};\nvar proxy = new Proxy(target, handler);\n\nassert(JSON.stringify(Object.getOwnPropertyNames(proxy)) === '[\"prop1\",\"prop2\"]');\n\n// test wtih \"undefined\" trap\nvar target = { prop1: \"prop1\", prop2: \"prop2\"};\nvar handler = {ownKeys: null};\nvar proxy = new Proxy(target, handler);\n\nassert(JSON.stringify(Object.getOwnPropertyNames(proxy)) === '[\"prop1\",\"prop2\"]');\n\n// test with invalid trap\nvar target = { prop1: \"prop1\", prop2: \"prop2\"};\nvar handler = {ownKeys: 42};\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.getOwnPropertyNames(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when CreateListFromArrayLike called on non-object\nvar target = { prop1: \"prop1\", prop2: \"prop2\"};\nvar handler = {\n\townKeys: function(target) {\n      return \"foo\";\n    }\n};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.getOwnPropertyNames(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test with invalid property key\nvar target = {};\nvar handler = {\n\townKeys: function(target) {\n      return [5];\n    }\n};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.getOwnPropertyNames(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test with duplicated keys\nvar p = new Proxy({}, {\n\townKeys: function(target) {\n\t  return [\"foo\", \"foo\"];\n\t}\n});\n\ntry {\n  Object.keys(p);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test with lots of keys\nvar keyslist = [];\n\nvar handler = {\n\townKeys: function(target) {\n      for (var idx = 0; idx < 30; idx++) {\n        keyslist.push(\"K\" + idx);\n      }\n      return keyslist;\n    }\n};\n\nvar proxy = new Proxy(target, handler);\nassert(JSON.stringify(Object.getOwnPropertyNames(proxy)) === JSON.stringify(keyslist));\n\n// test when invariants gets violated\nvar target = {\n  \"target_one\": 1\n};\nObject.defineProperty(target, \"nonconf\", {value: 1, configurable: false});\n\nvar keys = [\"foo\"];\n\nvar handler = {\n\townKeys: function(target) {\n      return keys;\n    }\n};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.getOwnPropertyNames(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nkeys = [\"nonconf\"];\nassert(JSON.stringify(Object.getOwnPropertyNames(proxy)) === '[\"nonconf\"]');\n\nObject.preventExtensions(target);\nkeys = [\"foo\", \"nonconf\"];\n\ntry {\n  Object.getOwnPropertyNames(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nkeys = [\"target_one\", \"nonconf\"];\n\nassert(JSON.stringify(Object.getOwnPropertyNames(proxy)) === '[\"target_one\",\"nonconf\"]');\n\nkeys = [\"target_one\", \"nonconf\", \"foo\"];\n\ntry {\n  Object.getOwnPropertyNames(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar object = {};\nObject.defineProperties(object, {\n  a: { value: 42, enumerable: false },\n  b: { value: \"foo\", enumerable: true },\n  c: { value: \"bar\", enumerable: false }\n});\n\nvar handler = {\n  ownKeys(target) {\n    return Reflect.ownKeys(target);\n  }\n};\n\nvar proxy = new Proxy(object, handler);\n\nassert(Object.keys(proxy).length === 1);\nassert(Object.keys(proxy)[0] === \"b\");"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_prevent_extensions.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = {};\nvar handler = { preventExtensions (target) {\n  throw 42;\n}};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  // 7.3.14\n  Object.freeze(proxy)\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\ntry {\n  // 7.3.14\n  Object.seal(proxy)\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test with no trap\nvar target = {};\nvar handler = {};\nvar proxy = new Proxy(target, handler);\n\nassert(Object.isExtensible(target) === true);\nassert(Object.isExtensible(proxy) === true);\nObject.preventExtensions(proxy);\nassert(Object.isExtensible(target) === false);\nassert(Object.isExtensible(proxy) === false);\n\n// test with \"undefined\" trap\nvar target = {};\nvar handler = { preventExtensions: null };\nvar proxy = new Proxy(target, handler);\n\nassert(Object.isExtensible(target) === true);\nassert(Object.isExtensible(proxy) === true);\nObject.preventExtensions(proxy);\nassert(Object.isExtensible(target) === false);\nassert(Object.isExtensible(proxy) === false);\n\n// test with invalid trap\nvar target = {};\nvar handler = { preventExtensions: 42 };\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.preventExtensions(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test with valid trap\nvar target = { foo: \"bar\" };\nvar handler = {\n  preventExtensions(target) {\n    target.foo = \"foo\"\n    Object.preventExtensions(target);\n    return true;\n  }\n}\n\nvar proxy = new Proxy(target, handler);\nassert(Object.isExtensible(target) === true);\nassert(Object.isExtensible(proxy) === true);\nassert(target.foo === \"bar\");\nObject.preventExtensions(proxy);\nassert(Object.isExtensible(target) === false);\nassert(Object.isExtensible(proxy) === false);\nassert(target.foo === \"foo\");\n\n// test when invariants gets violated\nvar target = {};\nvar handler = {\n  preventExtensions(target) {\n    return true;\n  }\n}\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.preventExtensions(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when target is proxy\nvar target = {};\nvar handler = {\n  preventExtensions(target) {\n    Object.preventExtensions(target);\n    return true;\n  }\n}\n\nvar proxy1 = new Proxy(target, handler);\nvar proxy2 = new Proxy(proxy1, handler);\n\nassert(Object.isExtensible(target) === true);\nassert(Object.isExtensible(proxy1) === true);\nassert(Object.isExtensible(proxy2) === true);\nObject.preventExtensions(proxy2);\nassert(Object.isExtensible(target) === false);\nassert(Object.isExtensible(proxy1) === false);\nassert(Object.isExtensible(proxy2) === false);\n\nvar target = {};\nvar handler = {\n  preventExtensions(target) {\n    return true;\n  }\n}\n\nvar proxy1 = new Proxy(target, handler);\nvar proxy2 = new Proxy(proxy1, handler);\n\ntry {\n  Object.preventExtensions(proxy2);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_revocable.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar target = function () {};\nvar handler = { get (name) {\n  return 5;\n}};\n\nvar revocable = Proxy.revocable(target, handler);\n\nvar proxy = revocable.proxy;\n\nassert(proxy.a === 5);\n\nrevocable.revoke();\n\ntry {\n  proxy.a;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Proxy.revocable();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Proxy.revocable(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar p1 = Proxy.revocable({}, proxy);\np1.a = 3;\nassert(p1.a == 3);\n\nvar p2 = Proxy.revocable(proxy, {});\np2.b = 43;\nassert(p2.b == 43);\n\nassert(typeof(target.a) === \"undefined\");\nassert(typeof(target.b) === \"undefined\");\n\n// Try accessing the \"a\" property again, it should fail\ntry {\n  proxy.a;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_set.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// test basic funcionality\nfunction Monster() {\n  this.eyeCount = 4;\n}\n\nvar handler = {\n  set(obj, prop, value) {\n    if (prop == 'eyeCount') {\n      obj[prop] = value;\n    } else {\n      obj[prop] = \"foo\";\n    }\n  }\n};\n\nvar monster = new Monster();\nvar proxy = new Proxy(monster, handler);\n\nproxy.eyeCount = 1;\nproxy.foo = \"bar\";\n\nassert(monster.eyeCount === 1);\nassert(monster.foo === \"foo\");\n\nvar target = { foo: \"foo\"};\nvar handler = {\n  set: function(obj, prop, value) {\n    obj[prop] = \"\";\n  }\n};\nvar proxy = new Proxy(target, handler);\n\nproxy.foo = 12;\nassert(target.foo === \"\");\n\nvar properties = [\"bla\", \"0\", 1, Symbol(), {[Symbol.toPrimitive]() {return \"a\"}}];\n\nvar target = {};\nvar handler = {};\nvar proxy = new Proxy(target, handler);\n\n// test when property does not exist on target\n/* TODO: Enable these tests when Proxy.[[GetOwnProperty]] has been implemented\nfor (var p of properties) {\n  proxy.p = 42;\n  assert(target.p === 42);\n}\n\n// test when property exists as writable data on target\nfor (var p of properties) {\n  Object.defineProperty(target, p, {\n    writable: true,\n    value: 24\n  });\n\n  proxy.p = 42;\n  assert(target.p === 42);\n}\n*/\n// test when target is a proxy\nvar target = {};\nvar handler = {\n  set(obj, prop, value) {\n    obj[prop] = value;\n  }\n};\n\nvar proxy = new Proxy(target, handler);\nvar proxy2 = new Proxy(proxy, handler);\n\nproxy2.prop = \"foo\";\n\nassert(target.prop === \"foo\");\n\n// test when handler is null\nvar target = {};\nvar handler = {\n  set(obj, prop, value) {\n    obj[prop] = value;\n  }\n};\n\nvar revocable = Proxy.revocable (target, {});\nvar proxy = revocable.proxy;\nrevocable.revoke();\n\ntry {\n  proxy.prop = 42;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when invariants gets violated\nvar target = {};\nvar handler = { set() {return 42} };\nvar proxy = new Proxy(target, handler);\n\nObject.defineProperty(target, \"key\", {\n  configurable: false,\n  writable: false,\n  value: 0\n});\n\ntry {\n  proxy.key = 600;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nObject.defineProperty(target, \"key2\", {\n  configurable: false,\n  set: undefined\n});\n\ntry {\n  proxy.key2 = 500;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n/* Setting a new property should be configurable, enumerable, and writable by default\n * over a proxy.\n */\nvar setPropProxy = new Proxy({}, {});\nsetPropProxy[\"alma\"] = 3;\n\nvar desc = Object.getOwnPropertyDescriptor(setPropProxy, \"alma\");\n\nassert(desc.writable === true);\nassert(desc.enumerable === true);\nassert(desc.configurable === true);\nassert(desc.value === 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_set_apply_receiver.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar get = [];\nvar p = new Proxy({\n  exec: function() {\n    return null;\n  }\n}, {\n  get: function(o, k) {\n    get.push(k);\n    return o[k];\n  }\n});\nRegExp.prototype[Symbol.match].call(p);\np.global = true;\nRegExp.prototype[Symbol.match].call(p);\n\nassert(get + '' === \"global,exec,global,unicode,exec\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/proxy_set_prototoype_of.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar target = {};\nvar handler = { setPrototypeOf (target) {\n  throw 42;\n}};\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  // 19.1.2.18\n  Object.setPrototypeOf(proxy, {});\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test basic funcionality\nvar targetProto = {};\nvar target = {\n  foo: false\n};\n\nvar handler = {\n  setPrototypeOf(target, targetrProto) {\n    target.foo = true;\n    return false;\n  }\n};\n\nvar proxy = new Proxy(target, handler);\n\nassert(Reflect.setPrototypeOf(proxy, targetProto) === false);\nassert(target.foo === true);\n\ntry {\n  Object.setPrototypeOf(proxy, targetProto);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Object.setPrototypeOf(proxy, undefined);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Object.setPrototypeOf(proxy, 1);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar target = {};\nvar handler = {};\nvar prototype = [];\n\nvar proxy = new Proxy(target, handler);\n\nObject.setPrototypeOf(proxy, prototype);\nassert(Object.getPrototypeOf(target) === prototype);\n\nhandler.setPrototypeOf = function(target, proto) {\n  return false;\n};\n\ntry {\n  Object.setPrototypeOf(proxy, {});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nhandler.setPrototypeOf = function(target, proto) {\n  return undefined;\n};\n\ntry {\n  Object.setPrototypeOf(proxy, {});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nhandler.setPrototypeOf = function(proto) {};\n\ntry {\n  Object.setPrototypeOf(proxy, {});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar proto = {};\nObject.setPrototypeOf(proto, Function.prototype);\n\nvar seen_prototype;\nvar seen_target;\n\nhandler.setPrototypeOf = function(target, proto) {\n  seen_target = target;\n  seen_prototype = proto;\n  return true;\n}\n\nObject.setPrototypeOf(proxy, proto);\nassert(target === seen_target);\nassert(proto === seen_prototype);\n\n// test when target is proxy\nvar target = {};\nvar handler = {};\nvar handler2 = {};\nvar target2 = new Proxy(target, handler2);\nvar proxy2 = new Proxy(target2, handler);\nvar prototype = [2,3];\n\nObject.setPrototypeOf(proxy2, prototype);\n\nassert(prototype === Object.getPrototypeOf(target));\n\n// test when invariants gets violated\nvar target = {};\nvar handler = {\n    setPrototypeOf(target, proto) {\n        Object.setPrototypeOf(target, Function.prototype);\n        Object.preventExtensions(target);\n        return true;\n    }\n}\n\nvar proxy = new Proxy(target, handler);\n\ntry {\n  Object.setPrototypeOf(proxy, Array.prototype);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/realms1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar realm = createRealm()\nvar ev = realm.eval\n\nassert(realm.Math != Math)\nassert(typeof realm.Math === \"object\")\nassert(realm.Object != Object)\nassert(typeof realm.Object === \"function\")\nassert(realm.eval != eval)\nassert(typeof realm.eval === \"function\")\n\n// Share our 'assert' function with the realm\nrealm.assert = assert\n\n// Test1: var1 and var2 must be different properties\n\nrealm.var1 = 3.5\nassert(realm.var2 === undefined)\n\nvar var1 = \"X\"\nvar var2 = \"Y\"\n\nev(\"assert(var1 === 3.5); \\\n    try { realm; assert(false) } catch (e) { assert(e instanceof ReferenceError) } \\\n    assert(this === globalThis); \\\n    var var2 = this\")\nassert(realm.var2 === realm)\n\nassert(var1 === \"X\")\nassert(var2 === \"Y\")\n\n// Test2: constructing any objects (including errors) must use the realm\n\nassert (realm.RangeError != RangeError)\nassert (realm.RangeError.prototype != RangeError.prototype)\n\nrealm.RangeError.prototype.myProperty = \"XY\"\nassert(RangeError.prototype.myProperty === undefined)\n\ntry {\n  var NumberToString = realm.Number.prototype.toString;\n  NumberToString.call(0, 0)\n  assert(false)\n} catch (e) {\n  assert(e instanceof realm.RangeError)\n  assert(!(e instanceof RangeError))\n  assert(e.myProperty === \"XY\")\n}\n\nassert (realm.SyntaxError != SyntaxError)\nassert (realm.SyntaxError.prototype != SyntaxError.prototype)\n\nrealm.SyntaxError.prototype.myProperty = \"AB\"\nassert(SyntaxError.prototype.myProperty === undefined)\n\ntry {\n  ev(\"5 +\")\n  assert(false)\n} catch (e) {\n  assert(e instanceof realm.SyntaxError)\n  assert(!(e instanceof SyntaxError))\n  assert(e.myProperty === \"AB\")\n}\n\n// Test3: only the realm corresponding to the function matters\n\nrealm.Boolean.prototype.valueOf.a = Function.prototype.apply\nBoolean.prototype.valueOf.a = realm.Function.prototype.apply\n\ntry {\n  realm.Boolean.prototype.valueOf.a()\n} catch (e) {\n  assert(e instanceof realm.TypeError)\n  assert(!(e instanceof TypeError))\n}\n\ntry {\n  Boolean.prototype.valueOf.a()\n} catch (e) {\n  assert(e instanceof TypeError)\n  assert(!(e instanceof realm.TypeError))\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/realms2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test1: realm cannot be gc-ed until it is referenced\n\nfunction f1() {\n  var ev = createRealm().eval\n\n  gc()\n\n  try {\n    ev(\"5 +\")\n  } catch (e) {\n    assert(e instanceof ev(\"this\").SyntaxError)\n    assert(!(e instanceof SyntaxError))\n  }\n}\nf1()\n\n// Test2: built-ins cannot be gc-ed until the realm exists\n\nfunction f2() {\n  var realm = createRealm()\n\n  var str = new realm.String(\"A\");\n  // Assign a property to String.prototype\n  Object.getPrototypeOf(str).myProperty = \"XY\"\n\n  str = null\n  // No reference to String.prototype\n  gc()\n\n  str = new realm.String(\"A\")\n  assert(Object.getPrototypeOf(str).myProperty === \"XY\")\n  assert(realm.String.prototype.myProperty === \"XY\")\n}\nf2()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/realms3.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test1: reading global values from other realms\n\nvar a = 4.5\n\nfunction f1()\n{\n  var realm = createRealm()\n  var f = realm.eval(\"function g() { return a } g\")\n\n  realm.a = -6.25\n  assert(f() === -6.25)\n  assert(a === 4.5)\n  assert(realm.g === f)\n\n  realm.eval(\"var v1 = 6; eval('var v2 = 7.5')\")\n  assert(realm.v1 === 6)\n  assert(realm.v2 === 7.5)\n\n  var e = realm.eval\n\n  eval(\"e('var v3 = -5.25'); var v3 = 1.5; e('v3++')\")\n  assert(realm.v3 === -4.25)\n  assert(v3 === 1.5)\n}\nf1()\n\n// Test2: recursive calls\n\nvar b = \"S\"\n\nfunction f2()\n{\n  function f(fun) {\n    return fun() + b;\n  }\n\n  var realm = createRealm()\n\n  realm.eval(\"function h() { return b }\")\n\n  var g = realm.Function(\"fun\", \"return fun(h) + b\")\n\n  realm.b = \"X\"\n  assert(g(f) === \"XSX\")\n  assert(b === \"S\")\n}\nf2()\n\n// Test3: built-in functions\n\nfunction f3()\n{\n  var realm = createRealm()\n\n  realm.f = function () { return eval(\"/a/\") }\n\n  var res = realm.eval(\"[f(), /a/, f(), /b/]\")\n\n  assert(Object.getPrototypeOf(res[0]) === RegExp.prototype)\n  assert(Object.getPrototypeOf(res[1]) === realm.RegExp.prototype)\n  assert(Object.getPrototypeOf(res[2]) === RegExp.prototype)\n  assert(Object.getPrototypeOf(res[3]) === realm.RegExp.prototype)\n\n  realm.g = function () { return non_existent }\n\n  try {\n    realm.eval(\"g()\")\n    assert(false)\n  } catch (e) {\n    assert(e instanceof ReferenceError)\n    assert(!(e instanceof realm.ReferenceError))\n  }\n\n  try {\n    realm.eval(\"non_existent\")\n    assert(false)\n  } catch (e) {\n    assert(e instanceof realm.ReferenceError)\n    assert(!(e instanceof ReferenceError))\n  }\n}\nf3()\n\n// Test4: generator functions\n\nfunction f4()\n{\n  function f() {\n    return b;\n  }\n\n  var realm = createRealm()\n\n  function check_gen_result(result, value, done)\n  {\n    assert(Object.getPrototypeOf(result) === realm.Object.prototype)\n    assert(result.value === value)\n    assert(result.done === done)\n  }\n\n  realm.eval(\"var a = 'P', b = 'Q'\")\n\n  var gen = realm.eval(\"function* gen(f) { yield f() + a; yield f() + b; return a + b + f() }\")\n\n  var it = realm.gen(f)\n\n  check_gen_result(it.next(), \"SP\", false)\n  check_gen_result(it.next(), \"SQ\", false)\n  check_gen_result(it.next(), \"PQS\", true)\n}\nf4()\n\n// Test5: async functions\n\nvar successCount = 0\n\nfunction f5()\n{\n  function f() {\n    return b;\n  }\n\n  var r, p = new Promise(function(resolve, reject) { r = resolve })\n\n  var realm = createRealm()\n\n  realm.assert = assert\n  realm.eval(\"async function asy(p, f) { assert(f() === 'S'); assert(await p === 4.5); return f() + b }\")\n\n  realm.b = \"X\"\n\n  realm.asy(p, f).then(function(v) {\n    assert(v === \"SX\")\n    successCount++\n  }, function() {\n    assert(false)\n  })\n  r(4.5)\n}\nf5()\n\n// Test6: async generator functions\n\nfunction f6()\n{\n  function f() {\n    return b;\n  }\n\n  var r, p = new Promise(function(resolve, reject) { r = resolve })\n\n  var realm = createRealm()\n\n  function check_fulfilled(p, value, done)\n  {\n    assert(p instanceof realm.Promise)\n\n    p.then(function(v) {\n      assert(v.value === value)\n      assert(v.done === done)\n      successCount++\n    }, function() {\n      assert(false)\n    })\n  }\n\n  realm.assert = assert\n  realm.eval(\"async function *asygen(p, f) { assert(f() === 'S'); assert(await p === -1.5); yield f() + a; return f() + b }\")\n\n  realm.a = \"X\"\n  realm.b = \"Y\"\n\n  var gen = realm.asygen(p, f)\n\n  check_fulfilled(gen.next(), \"SX\", false)\n  check_fulfilled(gen.next(), \"SY\", true)\n\n  r(-1.5)\n}\nf6()\n\nfunction __checkAsync() {\n  assert(successCount === 3)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/realms4.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar realm = createRealm()\n\nfunction compare(a, b)\n{\n  assert (a === b)\n  assert (typeof a === \"symbol\")\n  assert (typeof b === \"symbol\")\n}\n\ncompare(Symbol.asyncIterator, realm.Symbol.asyncIterator)\ncompare(Symbol.hasInstance, realm.Symbol.hasInstance)\ncompare(Symbol.isConcatSpreadable, realm.Symbol.isConcatSpreadable)\ncompare(Symbol.iterator, realm.Symbol.iterator)\ncompare(Symbol.match, realm.Symbol.match)\ncompare(Symbol.replace, realm.Symbol.replace)\ncompare(Symbol.search, realm.Symbol.search)\ncompare(Symbol.species, realm.Symbol.species)\ncompare(Symbol.split, realm.Symbol.split)\ncompare(Symbol.toPrimitive, realm.Symbol.toPrimitive)\ncompare(Symbol.toStringTag, realm.Symbol.toStringTag)\ncompare(Symbol.unscopables, realm.Symbol.unscopables)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-apply.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (Reflect['apply'](Math.floor, undefined, [1.75]) === 1);\nassert (Reflect['apply'](String.fromCharCode, undefined, [104, 101, 108, 108, 111]) === \"hello\");\nassert (Reflect['apply'](RegExp.prototype.exec, /ab/, ['confabulation']).index === 4);\nassert (Reflect['apply'](''.charAt, 'ponies', [3]) === \"i\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-construct.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Reflect.construct ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.construct (Date);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar d = Reflect.construct (Date, [1776, 6, 4]);\nassert (d instanceof Date);\nassert (d.getFullYear () === 1776);\n\nfunction func1 (a, b, c) {\n  this.sum = a + b + c;\n}\n\nvar args = [1, 2, 3];\nvar object1 = new func1 (...args);\nvar object2 = Reflect.construct (func1, args);\n\nassert (object2.sum === 6);\nassert (object1.sum === 6);\n\nfunction CatClass () {\n  this.name = 'Cat';\n}\n\nfunction DogClass () {\n  this.name = 'Dog';\n}\n\nvar obj1 = Reflect.construct (CatClass, args, DogClass);\nassert (obj1.name === 'Cat');\nassert (!(obj1 instanceof CatClass));\nassert (obj1 instanceof DogClass);\n\ntry {\n  Reflect.construct (func1, 5, 5);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.construct (5, 5);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nfunction func2 () {\n  throw 5;\n}\n\ntry {\n  Reflect.construct (func2, {});\n  assert (false);\n} catch (e) {\n  assert (e === 5);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-define-Property.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {};\nassert(Reflect['defineProperty'](obj, 'x', {value: 7}) === true);\nassert(Reflect['defineProperty'](obj, 'y', {value: function() {throw 5}}) === true);\ntry {\n    Reflect['defineProperty'](obj, {toString: function() {throw new TypeError(5)}}, {value: 8});\n    assert(false);\n} catch (e) {\n    assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-deleteproperty.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2014 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar object = {\n  property: 'Batcat'\n};\n\nReflect.deleteProperty (object, 'property');\n\nassert (object.property === undefined);\n\nassert (2 === Reflect.deleteProperty.length);\n\ntry {\n  Reflect.deleteProperty ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.deleteProperty (42, 'bat');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.deleteProperty (null, 'bat');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar target = {bat: 42};\nvar a = { [Symbol.toPrimitive]: function() { return 'bat' } };\nvar b = { [Symbol.toPrimitive]: function() { throw 'cat' } };\n\nassert (Reflect.deleteProperty (target, a));\n\ntry {\n  Reflect.deleteProperty (target, b);\n  assert (false);\n} catch (e) {\n  assert (e === 'cat');\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-get-own-property-description.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar object1 = {\n    property1: 42\n};\n\nassert(Reflect.getOwnPropertyDescriptor(object1, 'property1').value === 42);\nassert(Reflect.getOwnPropertyDescriptor(object1, 'property2') === undefined);\nassert(Reflect.getOwnPropertyDescriptor(object1, 'property1').writable === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-get.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2017 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar object1 = {\n  x: \"Bat\",\n  y: \"Cat\"\n};\n\nassert (Reflect.get (object1, 'y') === \"Cat\");\n\ntry {\n  Reflect.get ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (Reflect.get ({}) === undefined);\n\nvar o = {x: 10};\nfunction foo () {\n  try {\n    return Reflect.get (o, \"x\");\n  } catch (e) {\n    return 1;\n  }\n}\n\nassert (10 === foo());\n\nvar c = {};\nfunction foo2 (a) {\n  try {\n    return Reflect.get (c, a);\n  } catch (e) {\n    return 1;\n  }\n}\n\nassert (1 === foo2 ({[Symbol.toPrimitive]() { throw new Error(); }}));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-getPrototypeOf.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (Reflect['getPrototypeOf']({}) === Object.prototype);\nassert (Reflect['getPrototypeOf'](Object.create(null)) === null);\nassert (Reflect['getPrototypeOf'](Object.prototype) === null);\n\ntry {\n  Reflect.getPrototypeOf();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.getPrototypeOf(\"str\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-has.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2014 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nassert (Reflect.has ({x: 0}, 'x') === true);\nassert (Reflect.has ({x: 0}, 'y') === false);\n\nassert (Reflect.has ({x: 0}, 'toString') === true);\n\nvar object = {\n  prop: 'Apple'\n};\n\nassert (Reflect.has (object, 'prop') === true);\n\nassert (2 === Reflect.has.length);\n\ntry {\n  Reflect.has ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.has (42, 'batcat');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.has (null, 'bat');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar target = {bat: 42};\nvar a = { [Symbol.toPrimitive]: function () { return 'bat' } };\nvar b = { [Symbol.toPrimitive]: function () { throw 'cat' } };\n\nassert (Reflect.has (target, a) === true);\n\ntry {\n  Reflect.has (target, b);\n  assert (false);\n} catch (e) {\n  assert (e === 'cat');\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-isextensible.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar empty = {};\nassert (Reflect['isExtensible'](empty) === true);\n\nReflect.preventExtensions(empty);\nassert (Reflect['isExtensible'](empty) === false);\n\nvar sealed = Object.seal({});\nassert (Reflect['isExtensible'](sealed) === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-own-keys.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n//       notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n//       copyright notice, this list of conditions and the following\n//       disclaimer in the documentation and/or other materials provided\n//       with the distribution.\n//     * Neither the name of Google Inc. nor the names of its\n//       contributors may be used to endorse or promote products derived\n//       from this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nvar object1 = {\n  property1: 42,\n  property2: 13\n};\n\nvar array1 = [];\n\nassert (Reflect.ownKeys (object1)[0] === \"property1\");\nassert (Reflect.ownKeys (object1)[1] === \"property2\");\nassert (Reflect.ownKeys (object1).length === 2);\n\nvar obj = { a: 1, b: 2};\nvar keys = Reflect.ownKeys (obj);\nassert (2 === keys.length);\nassert (\"a\" === keys[0]);\nassert (\"b\" === keys[1]);\n\nvar obj = { a: function(){}, b: function(){} };\nvar keys = Reflect.ownKeys (obj);\nassert (2 === keys.length);\nassert (\"a\" === keys[0]);\nassert (\"b\" === keys[1]);\n\n// Check slow case\nvar obj = { a: 1, b: 2, c: 3 };\ndelete obj.b;\nvar keys = Reflect.ownKeys (obj)\nassert (2 === keys.length);\nassert (\"a\" === keys[0]);\nassert (\"c\" === keys[1]);\n\n// Check that non-enumerable properties are being returned.\nvar keys = Reflect.ownKeys ([1, 2]);\nassert (3 === keys.length);\nassert (\"0\" === keys[0]);\nassert (\"1\" === keys[1]);\nassert (\"string\" === typeof keys[0]);\nassert (\"string\" === typeof keys[1]);\nassert (\"length\" === keys[2]);\n\n// Check that no proto properties are returned.\nvar obj = { foo: \"foo\" };\nvar obj2 = { bar: \"bar\" };\nObject.setPrototypeOf (obj, obj2)\nkeys = Reflect.ownKeys (obj);\nassert (1 === keys.length);\nassert (\"foo\" === keys[0]);\n\n// Check that getter properties are returned.\nvar obj = {};\nObject.defineProperty (obj, \"getter\", function() {})\n//obj.__defineGetter__(\"getter\", function() {});\nkeys = Reflect.ownKeys (obj);\nassert (1 === keys.length);\nassert (\"getter\" === keys[0]);\n\n// Check that implementation does not access Array.prototype.\nvar savedConcat = Array.prototype.concat;\nArray.prototype.concat = function() { return []; }\nkeys = Reflect.ownKeys ({0: 'foo', bar: 'baz'});\nassert (2 === keys.length);\nassert ('0' === keys[0]);\nassert ('bar'=== keys[1]);\nassert (Array.prototype === Object.getPrototypeOf (keys))\nArray.prototype.concat = savedConcat;\n\ntry {\n  Reflect.ownKeys (4);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.ownKeys(\"cica\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.ownKeys(true);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (Reflect.ownKeys (Object (4)) !== [])\nassert (Reflect.ownKeys (Object (\"foo\")) !== [\"0\", \"1\", \"2\", \"length\"])\nassert (Reflect.ownKeys (Object (4)) !== []);\nassert (Reflect.ownKeys (Object (\"foo\")) !== [0, 1, 2, \"length\"]);\nassert (Reflect.ownKeys (Object (true)) !== []);\n\nvar id = Symbol(\"my kitten\");\nvar user = {\n  name: \"Bob\",\n  age:  30,\n  [id]: \"is batcat\"\n}\n\nassert (Reflect.ownKeys (user)[0] === \"name\");\nassert (Reflect.ownKeys (user)[1] === \"age\");\nassert (Reflect.ownKeys (user)[2] === id);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-preventextensions.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar object1 = {};\n\nassert (Reflect['isExtensible'](object1) === true);\n\nReflect.preventExtensions(object1);\nassert (Reflect['isExtensible'](object1) === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-set.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2014 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar object = {};\nReflect.set (object, 'property', 'batcat');\n\nassert (object.property === 'batcat');\n\nvar array = ['cat', 'cat', 'cat'];\nReflect.set (array, 2, 'bat');\n\nassert (array[2] === 'bat');\n\nassert (3 === Reflect.set.length);\n\ntry {\n  Reflect.set ();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.set (42, 'bat');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Reflect.set (null, 'bat');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar target = {};\nvar a = { [Symbol.toPrimitive]: function () { return 'bat' } };\nvar b = { [Symbol.toPrimitive]: function () { throw 'cat' } };\nassert (Reflect.set (target, a, 42) === true);\nassert (42 === target.bat);\n\ntry {\n  Reflect.set (null, 'bat');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar y = [];\nObject.defineProperty (y, 0, {value: 42, configurable: false});\nassert (Reflect.set (y, 'length', 0) === false);\nassert (Reflect.set (y, 'length', 2) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/reflect-setPrototypeOf.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar object1 = {};\n\nassert(Reflect.setPrototypeOf(object1, Object.prototype) === true);\nassert(Reflect.setPrototypeOf(object1, null) === true);\n\nvar object2 = {};\nassert(Reflect.setPrototypeOf(Object.freeze(object2), null) === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-accessors-descriptors.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar accessors = [ 'flags', 'global', 'ignoreCase', 'multiline', 'source', 'sticky', 'unicode' ]\n\naccessors.forEach(function(attr) {\n    var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, attr);\n    assert(typeof desc.get === 'function')\n    assert(desc.set === undefined)\n    assert(desc.enumerable === false)\n    assert(desc.configurable === true)\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-construct.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r = RegExp (\"a\",\"gim\");\nvar r2 = RegExp (r,\"gim\");\nvar r3 = RegExp (r);\n\nassert(r2.source === 'a');\nassert(r2.global === true);\nassert(r2.ignoreCase === true);\nassert(r2.multiline === true);\n\nassert(r3.source === 'a');\nassert(r3.global === true);\nassert(r3.ignoreCase === true);\nassert(r3.multiline === true);\n\nvar obj = { get source() { throw 5 }, [Symbol.match] : true }\n\ntry {\n  new RegExp (obj);\n  assert(false)\n} catch (e) {\n  assert(e === 5);\n}\n\nr = new RegExp (\"a\",\"gimuy\");\nassert (r.global === true);\nassert (r.ignoreCase === true);\nassert (r.multiline === true);\nassert (r.unicode === true);\nassert (r.sticky === true);\n\ntry {\n  new RegExp (\"a\", \"uu\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp (\"a\", \"yy\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-dotAll.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str1 = 'bar\\nexample foo example';\nvar str2 = 'bare\\nxample foo example';\nvar regex_with_dotAll_flag = new RegExp ('bar.example','s');\nvar regex_without_dotAll_flag = new RegExp ('bar.example');\n\n// testing regexp.prototype.dotAll\nassert (regex_with_dotAll_flag.dotAll == true);\nassert (regex_without_dotAll_flag.dotAll == false);\n\n// basic dotAll flag test\nassert (str1.replace (regex_with_dotAll_flag,'') == \" foo example\");\nassert (str1.replace (regex_without_dotAll_flag,'') == str1);\nassert (str2.replace (regex_with_dotAll_flag, \"\") == str2);\n\n// testing dotAll with other flag\nfor (let re of [/^.$/su, /^.$/sum]) {\n  assert (re.test(\"a\"));\n  assert (re.test(\"3\"));\n  assert (re.test(\"π\"));\n  assert (re.test(\"\\u2027\"));\n  assert (re.test(\"\\u0085\"));\n  assert (re.test(\"\\v\"));\n  assert (re.test(\"\\f\"));\n  assert (re.test(\"\\u180E\"));\n  assert (re.test(\"\\u{10300}\"));\n  assert (re.test(\"\\n\"));\n  assert (re.test(\"\\r\"));\n  assert (re.test(\"\\u2028\"));\n  assert (re.test(\"\\u2029\"));\n  assert (re.test(\"\\uD800\"));\n  assert (re.test(\"\\uDFFF\"));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-flags.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r = /[𐲡-𐲱𐲟]/u;\n\nvar m = r.exec(\"𐲬\");\nassert(m !== null);\nassert(m[0] === \"𐲬\");\n\nr = /[𐲡E]/ug;\nassert (r.exec(\"E𐲡E\")[0] === 'E');\nassert (r.exec(\"E𐲡E\")[0] === '𐲡');\nassert (r.exec(\"E𐲡E\")[0] === 'E');\n\ntry {\n  eval(\"/[𐲡-𐲱𐲟]/\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/\\udc96/.exec(\"\\ud803\\udc96\")[0] === '\\udc96');\nassert (/\\udc96/u.exec(\"\\ud803\\udc96\") === null);\nassert (/\\udc96/u.exec(\"\\udc96\")[0] === '\\udc96');\n\nassert (/\\ud803/.exec(\"\\ud803\\udc96\")[0] === '\\ud803');\nassert (/\\ud803/u.exec(\"\\ud803\\udc96\") === null);\nassert (/\\ud803/u.exec(\"\\ud803\")[0] === '\\ud803');\n\nassert (/./u.exec(\"\\ud803\\udc96\")[0] === '𐲖');\nassert (/./.exec(\"\\ud803\\udc96\")[0] === '\\ud803');\nassert (/./u.exec(\"\\ud803\\ud803\")[0] === '\\ud803');\nassert (/./u.exec(\"\\udc96\\udc96\")[0] === '\\udc96');\nassert (/./u.exec(\"\\ud803\")[0] === '\\ud803');\n\nvar r = /abc/y;\nm = r.exec (\"strabcstr\");\nassert (m === null);\n\nr.lastIndex = 3;\nm = r.exec (\"strabcstr\");\nassert (m[0] === \"abc\");\nassert (r.lastIndex === 6);\n\nm = r.exec (\"strabcstr\");\nassert (m === null);\nassert (r.lastIndex === 0);\n\nvar r = /abc/yg;\nm = r.exec (\"strabcstr\");\nassert (m === null);\n\nassert (RegExp.prototype.flags === \"\");\n\nvar flagsProp = Object.getOwnPropertyDescriptor (RegExp.prototype, \"flags\");\nassert(flagsProp.get.call({}) === '');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-lastindex.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar t = /abc/g;\nt.lastIndex = -12.5;\nresult = t.exec(\"abc   abc\");\nassert(result[0] === \"abc\");\nassert(result.index === 0);\nassert(t.lastIndex === 3);\n\nassert(RegExp.prototype.lastIndex === undefined)\n\nvar r = /./y\nr.lastIndex = -1;\nassert (JSON.stringify(r.exec(\"abca\")) === '[\"a\"]');\nassert (r.lastIndex === 1);\nassert (JSON.stringify(r.exec(\"abca\")) === '[\"b\"]');\nassert (r.lastIndex === 2);\n\nr.lastIndex = 5;\nassert (JSON.stringify(r.exec(\"abca\")) === 'null');\nassert (r.lastIndex === 0);\n\nvar r = /a/y\nassert (JSON.stringify(r.exec(\"abca\")) === '[\"a\"]');\nassert (r.lastIndex === 1);\nassert (JSON.stringify(r.exec(\"abca\")) === 'null');\nassert (r.lastIndex === 0);\n\nvar r = /./g\nr.lastIndex = -1;\nassert (JSON.stringify(r.exec(\"abca\")) === '[\"a\"]');\nassert (r.lastIndex === 1);\nassert (JSON.stringify(r.exec(\"abca\")) === '[\"b\"]');\nassert (r.lastIndex === 2);\n\nr.lastIndex = 5;\nassert (JSON.stringify(r.exec(\"abca\")) === 'null');\nassert (r.lastIndex === 0);\n\nvar r = /a/g\nassert (JSON.stringify(r.exec(\"abca\")) === '[\"a\"]');\nassert (r.lastIndex === 1);\nassert (JSON.stringify(r.exec(\"abca\")) === '[\"a\"]');\nassert (r.lastIndex === 4);\nassert (JSON.stringify(r.exec(\"abca\")) === 'null');\nassert (r.lastIndex === 0);\n\nvar r = /./uim\nr.lastIndex = 2;\nassert (JSON.stringify(r.exec(\"abcd\")) === '[\"a\"]');\nassert (r.lastIndex === 2);\n\nr.lastIndex = \"lastIndex\";\nassert (JSON.stringify(r.exec(\"abcd\")) === '[\"a\"]');\nassert (r.lastIndex === \"lastIndex\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-new-target.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction F(){}\nvar obj = Reflect.construct(RegExp, [\"baz\",\"g\"], F);\nassert(RegExp.prototype.exec.call(obj, \"foobarbaz\")[0] === \"baz\")\nassert(obj.lastIndex === 9)\nassert(obj instanceof F);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-prototype-match-all.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(RegExp.prototype[Symbol.matchAll].length === 1);\nvar desc = Object.getOwnPropertyDescriptor(RegExp.prototype[Symbol.matchAll], \"length\");\nassert(!desc.enumerable);\nassert(!desc.writable);\nassert(desc.configurable);\n\nassert(RegExp.prototype[Symbol.matchAll].name === \"[Symbol.matchAll]\");\nvar desc = Object.getOwnPropertyDescriptor(RegExp.prototype[Symbol.matchAll], \"name\");\nassert(!desc.enumerable);\nassert(!desc.writable);\nassert(desc.configurable);\n\n// test basic functionality\nvar re = /[0-9]+/g;\nvar str = '2016-01-02';\nvar result = re[Symbol.matchAll](str);\nassert(Array.from(result, x => x[0]).toString() === \"2016,01,02\");\n\nclass MyRegExp extends RegExp {\n  [Symbol.matchAll](str) {\n    const result = RegExp.prototype[Symbol.matchAll].call(this, str);\n    if (!result) {\n      return null;\n    }\n    return Array.from(result);\n  }\n}\n  \nvar regexp = new MyRegExp('-[0-9]+', 'g');\nvar result = re[Symbol.matchAll](\"2016-01-02|2019-03-07\");\nassert(Array.from(result, x => x[0]).toString() === \"2016,01,02,2019,03,07\");\n\nvar counter = 0;\nvar callArgs;\nvar regexp = /\\d/u;\nregexp.constructor = {\n  [Symbol.species]: function(){\n    counter++;\n    callArgs = arguments;\n    return /\\w/g;\n  }\n};\n\nvar str = 'a*b';\nvar result = regexp[Symbol.matchAll](str);\n\nassert(counter === 1);\nassert(callArgs.length === 2);\nassert(callArgs[0] === regexp);\nassert(callArgs[1] === 'u');\nassert(Array.from(result, x => x[0]).toString() === \"a\");\n\n// test when flags throws error\nvar regexp = /a/g;\nObject.defineProperty(regexp, 'flags', { get () { throw 42; }});\n\ntry {\n  regexp[Symbol.matchAll](\"foo\");\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when flags value is symbol\nvar regexp = /a/g;\nvar sym = Symbol(\"foo\")\nObject.defineProperty(regexp, 'flags', { value: sym });\n\ntry {\n  regexp[Symbol.matchAll](\"foo\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when match Symbol throws error\nvar regexp = /[A-Z]/g;\nObject.defineProperty (regexp, Symbol.match, { get () { throw 42; }});\n\ntry {\n  regexp[Symbol.matchAll](\"foo\");\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when can't create RegExp\nvar obj = {\n  toString() {\n     throw 42;\n   }\n};\n\ntry {\n  RegExp.prototype[Symbol.matchAll].call(obj, ''); \n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when constructor throws error\nvar regexp = /./;\nObject.defineProperty(regexp, 'constructor', {\n  get(){\n    throw 42;\n  }\n});\n\ntry {\n  regexp[Symbol.matchAll](\"foo\");\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when global flag throws error\nvar regexp = /[A-Z]/;\nObject.defineProperty(regexp, 'global', { get() { throw 42; }});\n\ntry {\n  regexp[Symbol.matchAll]('');\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when lastIndex throws error\nvar regexp = /[A-Z]/;\nregexp.lastIndex = {\n  valueOf() {\n    throw 42;\n  }\n};\n\ntry {\n  regexp[Symbol.matchAll](\"foo\");\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when argument is not an object\ntry {\n  RegExp.prototype[Symbol.matchAll].call(null, '');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  RegExp.prototype[Symbol.matchAll].call(true, '');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  RegExp.prototype[Symbol.matchAll].call('', '');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  RegExp.prototype[Symbol.matchAll].call(Symbol(), '');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  RegExp.prototype[Symbol.matchAll].call(1, '');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-prototype-match.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar regexp = /[0-9]+/g;\nvar str = '2016-01-02';\nvar num = 12131233;\n\n// Test with string input\nvar result = regexp[Symbol.match](str);\nassert(result.toString() === \"2016,01,02\");\n\nregexp = /[0-5]+/g;\nresult = regexp[Symbol.match](str);\nassert(result.toString() === \"201,01,02\");\n\nregexp = /[0-1]+/g;\nresult = regexp[Symbol.match](str);\nassert(result.toString() === \"01,01,0\");\n\nregexp = /([0-9]+)-([0-9]+)-([0-9]+)/g\nresult = regexp[Symbol.match](str);\nassert(result.toString() === \"2016-01-02\");\n\n// Test with number input\nregexp = /[0-9]+/g;\nresult = regexp[Symbol.match](num);\nassert(result.toString() === \"12131233\");\n\n// Test with empty string\nresult = regexp[Symbol.match]('');\nassert(result === null);\n\n// Test with undefined\nresult = regexp[Symbol.match](undefined);\nassert(result === null);\n\n// Test when input is not a regexp\nregexp = 12;\n\ntry {\n  result = regexp[Symbol.match](str);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Test with RegExp subclass where we override the [Symbol.match] function\nclass RegExpSub extends RegExp {\n  [Symbol.match](str) {\n    var result = RegExp.prototype[Symbol.match].call(this, str);\n    if (result) {\n      return \"VALID\";\n    }\n    else\n    {\n      return \"INVALID\";\n    }\n  }\n}\n\nvar regexp1 = new RegExpSub('([0-9]+)-([0-9]+)-([0-9]+)');\nresult = regexp1[Symbol.match](str);\nassert(result === \"VALID\");\n\nvar o = {\n  lastIndex: 0,\n  global: true,\n  exec: function () {\n    if (this.lastIndex === 0)\n    {\n      this.lastIndex = 1;\n      return {0: 3.14, index: 2};\n    }\n\n    return null;\n  }\n}\n\nvar result = RegExp.prototype[Symbol.match].call(o, \"asd\");\nassert(result.length === 1);\nassert(typeof result[0] === \"string\");\nassert(result[0] === \"3.14\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-prototype-source.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar regexp = /fooBar/ig;\nassert(regexp.source === 'fooBar');\n\nassert(new RegExp().source === '(?:)');\n\nassert(new RegExp('/foo/').source === '\\\\/foo\\\\/');\nassert(new RegExp('/foo/').source.length === 7);\n\nassert(new RegExp('bar', 'ug').source === 'bar');\n\nassert(new RegExp('/\\?/').source === '\\\\/?\\\\/');\nassert(new RegExp('/\\?/').source.length === 5);\n\nassert(new RegExp('\\n').source === '\\\\n');\n\nassert(new RegExp('\\r').source === '\\\\r');\n\nassert(new RegExp('\\u2028').source === '\\\\u2028');\n\nassert(new RegExp('\\u2029').source === '\\\\u2029');\n\nassert(new RegExp('/\\n/').source === '\\\\/\\\\n\\\\/');\nassert(new RegExp('/\\n/').source.length === 6);\n\nassert(new RegExp(/\\/\\//).source === '\\\\/\\\\/');\nassert(new RegExp(/\\?\\//g).source === '\\\\?\\\\/');\n\nassert (RegExp.prototype.source === '(?:)')\n\nvar sourceProp = Object.getOwnPropertyDescriptor (RegExp.prototype, \"source\");\ntry {\n  sourceProp.get.call({});\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-prototype-split.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nresult = /./[Symbol.split]('string', -13);\nassert(result.length === 7);\n\nresult = /./[Symbol.split]('string', 2);\nassert(result.length === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-prototype-test.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = 'something interesting';\nvar regexp = new RegExp('o*');\nObject.defineProperty(regexp, 'exec', { 'get':  function () {throw 42}});\n\ntry {\n  regexp.test(str);\n  assert(false);\n} catch (e) {\n  assert(e === 42);  \n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-routines.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r = new RegExp('a', 'gimuy');\nassert (r.flags === 'gimuy');\nassert (r.toString() === '/a/gimuy');\n\ntry {\n  Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.call(42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar o = {\n  global: true,\n  unicode: true,\n  sticky: true,\n  source: \"str\"\n}\n\nObject.defineProperty(o, 'flags', Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags'));\nassert(o.flags === \"guy\");\nassert (RegExp.prototype.toString.call (o) === \"/str/guy\");\n\nObject.defineProperty(o, 'multiline', { 'get': function () {throw \"abrupt flag get\"; }});\ntry {\n  o.flags\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt flag get\");\n}\n\ntry {\n  RegExp.prototype.toString.call(42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (RegExp.prototype.toString.call({}) === \"/undefined/undefined\");\n\nvar o = {};\nObject.defineProperty (o, 'source', { 'get' : function () {throw \"abrupt source get\"; } });\ntry {\n  RegExp.prototype.toString.call(o);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt source get\");\n}\n\nvar o = {source: {toString: function() {throw \"abrupt source toString\";}}};\ntry {\n  RegExp.prototype.toString.call(o);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt source toString\");\n}\n\nvar o = {source: \"str\"};\nObject.defineProperty (o, 'flags', { 'get' : function () {throw \"abrupt flags get\"; } });\ntry {\n  RegExp.prototype.toString.call(o);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt flags get\");\n}\n\nvar o = {source: \"str\", flags: {toString: function() {throw \"abrupt flags toString\";}}};\ntry {\n  RegExp.prototype.toString.call(o);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt flags toString\");\n}\n\nvar o = {\n  global: true,\n  source: \"str\"\n}\n\nObject.defineProperty(o, 'unicode', { 'get': function () {throw \"abrupt unicode get\"; }});\ntry {\n  RegExp.prototype[Symbol.match].call(o, \"str\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt unicode get\");\n}\n\nassert (\"str𐲡fgh\".replace(/(?:)/gu, \"x\") === 'xsxtxrx𐲡xfxgxhx');\nassert (\"str𐲡fgh\".replace(/(?:)/g, \"x\") === 'xsxtxrx\\ud803x\\udca1xfxgxhx');\n\nr = /(?:)/gu;\n/* Disable fast path. */\nr.exec = function (s) { return RegExp.prototype.exec.call(this, s); };\n\nassert (\"str𐲡fgh\".replace(r, \"x\") === 'xsxtxrx𐲡xfxgxhx');\nObject.defineProperty(r, 'unicode', {value: false});\nassert (\"str𐲡fgh\".replace(r, \"x\") === 'xsxtxrx\\ud803x\\udca1xfxgxhx');\n\nr = /(?:)/gu;\nassert (RegExp.prototype[Symbol.match].call(r, \"str𐲡fgh\").length === 8);\nObject.defineProperty(r, 'unicode', {value: false});\nassert (RegExp.prototype[Symbol.match].call(r, \"str𐲡fgh\").length === 9);\n\nr = /(?:)/gy;\nr.lastIndex = 2;\nassert (\"asd\".replace(r, \"x\") === \"xaxsxdx\");\nassert (r.lastIndex === 0);\n\nr.lastIndex = 5;\nassert (\"asd\".replace(r, \"x\") === \"xaxsxdx\");\nassert (r.lastIndex === 0);\n\nr = /(?:)/y;\nr.lastIndex = 2;\nassert (\"asd\".replace(r, \"x\") === \"asxd\");\nassert (r.lastIndex === 2);\n\nr.lastIndex = 5;\nassert (\"asd\".replace(r, \"x\") === \"asd\");\nassert (r.lastIndex === 0);\n\nr.lastIndex = 2;\n/* Disable fast path. */\nr.exec = function (s) { return RegExp.prototype.exec.call(this, s); };\nassert (\"asd\".replace(r, \"x\") === \"asxd\");\nassert (r.lastIndex === 2);\n\nr.lastIndex = 5;\nassert (\"asd\".replace(r, \"x\") === \"asd\");\nassert (r.lastIndex === 0);\n\nassert (RegExp.prototype[Symbol.match].call(/a/y, \"aaa\").length === 1);\nassert (RegExp.prototype[Symbol.match].call(/a/gy, \"aaa\").length === 3);\n\nvar length = Object.getOwnPropertyDescriptor(RegExp.prototype.compile, \"length\");\nassert(!length.enumerable);\nassert(!length.writable);\nassert(length.configurable);\nassert(length.value === 2);\n\nvar re = /./;\nre.lastIndex = 23;\n\ntry {\n  re.compile(re, null);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  re.compile(re, 0);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  re.compile(re, '');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  re.compile(re, false);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  re.compile(re, {});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n  \ntry {\n  re.compile(re, []);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n  \nassert(re.lastIndex === 23);\n\nvar subject = /initial/;\nObject.defineProperty(subject, 'lastIndex', { value: 45, writable: false });\n\ntry {\n  subject.compile(/updated/gi);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(subject.toString() === new RegExp('updated', 'gi').toString());\nassert(subject.lastIndex === 45);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regexp-unicode.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar result = /\\0/.exec(\"\\u0000\");\nassert (result !== null);\nassert (result[0] === \"\\u0000\");\n\nresult = /\\0/u.exec(\"\\u0000\");\nassert (result !== null);\nassert (result[0] === \"\\u0000\");\n\nresult = /\\000/.exec(\"\\u0000\");\nassert (result !== null);\nassert (result[0] === \"\\u0000\");\n\ntry {\n  new RegExp(\"\\\\000\", 'u').exec(\"\\u0000\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nresult = /\\0000/.exec(\"\\u0000\\u0030\");\nassert (result !== null);\nassert (result[0] === \"\\u0000\\u0030\");\n\nresult = /\\377/.exec(\"\\u00ff\");\nassert (result !== null);\nassert (result[0] === \"\\u00ff\");\n\ntry {\n  new RegExp(\"\\\\377\", 'u').exec(\"\\u00ff\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nresult = /\\3777/.exec(\"\\u00ff\\u0037\");\nassert (result !== null);\nassert (result[0] === \"\\u00ff\\u0037\");\n\ntry {\n  new RegExp(\"\\\\3777\", 'u').exec(\"\\u00ff\\u0037\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nresult = /\\400/.exec(\"\\u0020\\u0030\");\nassert (result !== null);\nassert (result[0] === \"\\u0020\\u0030\");\n\ntry {\n  new RegExp(\"\\\\400\", 'u').exec(\"\\u0020\\u0030\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nresult = /(\\1)/.exec(\"\\u0001\");\nassert (result !== null);\nassert (result[0].length === 0);\n\nresult = /(\\1)/u.exec(\"\\u0001\");\nassert (result !== null);\nassert (result[0].length === 0);\n\nresult = /(\\2)/.exec(\"\\u0002\");\nassert (result !== null);\nassert (result[0] === '\\u0002');\n\ntry {\n  new RegExp(\"(\\\\2)\", 'u').exec(\"\\u0002\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nresult = /\\8/.exec(\"\\u0038\");\nassert (result !== null);\nassert (result[0] === '8');\n\nresult = /\\99/.exec(\"\\u0039\\u0039\");\nassert (result !== null);\nassert (result[0] === \"99\");\n\n// CharClassEscape\nassert (/\\d+/.exec(\"123\")[0] === \"123\");\nassert (/\\D+/.exec(\"abc\")[0] === \"abc\");\nassert (/\\s+/.exec(\"   \")[0] === \"   \");\nassert (/\\S+/.exec(\"abc\")[0] === \"abc\");\nassert (/\\w+/.exec(\"abc\")[0] === \"abc\");\nassert (/\\W+/.exec(\"|||\")[0] === \"|||\");\nassert (/\\d+/u.exec(\"123\")[0] === \"123\");\nassert (/\\D+/u.exec(\"abc\")[0] === \"abc\");\nassert (/\\s+/u.exec(\"   \")[0] === \"   \");\nassert (/\\S+/u.exec(\"abc\")[0] === \"abc\");\nassert (/\\w+/u.exec(\"abc\")[0] === \"abc\");\nassert (/\\W+/u.exec(\"|||\")[0] === \"|||\");\n\nassert (/\\d+/u.exec(\"\\u{10CAF}\") === null);\nassert (/\\D+/u.exec(\"\\u{10CAF}\")[0] === \"\\u{10CAF}\");\nassert (/\\s+/u.exec(\"\\u{10CAF}\") === null);\nassert (/\\S+/u.exec(\"\\u{10CAF}\")[0] === \"\\u{10CAF}\");\nassert (/\\w+/u.exec(\"\\u{10CAF}\") === null);\nassert (/\\W+/u.exec(\"\\u{10CAF}\")[0] === \"\\u{10CAF}\");\n\nresult = /\\xz/.exec(\"xz\");\nassert (result !== null);\nassert (result[0] === \"xz\");\n\ntry {\n  new RegExp(\"\\\\xz\", \"u\").exec(\"xz\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nresult = /\\c/.exec(\"\\\\c\");\nassert (result !== null);\nassert (result[0] === \"\\\\c\");\n\ntry {\n  new RegExp(\"\\\\c\", 'u').exec(\"\\\\c\")\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nresult = /\\c1/.exec(\"\\\\c1\");\nassert (result !== null);\nassert (result[0] === \"\\\\c1\");\n\ntry {\n  new RegExp(\"\\\\c1\", 'u').exec(\"\\\\c1\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"^+\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"$+\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"\\\\b+\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"\\\\B+\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/[\\b]/.exec(\"\\u0008\")[0] === \"\\u0008\");\nassert (/[\\b]/u.exec(\"\\u0008\")[0] === \"\\u0008\");\nassert (/[\\B]/.exec(\"\\u0042\")[0] === \"\\u0042\");\n\ntry {\n  new RegExp (\"[\\\\B]\", 'u').exec(\"\\u0042\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/[\\c1]/.exec(\"\\u0011\")[0] === \"\\u0011\");\nassert (/[\\c_]/.exec(\"\\u001f\")[0] === \"\\u001f\");\nassert (/[\\c]/.exec(\"\\\\\")[0] === \"\\\\\");\nassert (/[\\c]/.exec(\"c\")[0] === \"c\");\n\ntry {\n  new RegExp(\"[\\\\c1]\", 'u');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"[\\\\c]\", 'u');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"[\\\\c_]\", 'u');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/{{1,2}/.exec(\"{{\")[0] === \"{{\");\n\ntry {\n  new RegExp(\"{{1,2}\", 'u').exec(\"{{\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/a{1,2/.exec(\"a{1,2\")[0] === \"a{1,2\");\n\ntry {\n  new RegExp(\"a{1,2\", 'u').exec(\"a{1,2\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/\\u017f/i.exec(\"s\") === null);\nassert (/\\u017f/ui.exec(\"s\")[0] === \"s\");\n\nassert (/𐲯/.exec(\"𐲯\")[0] === \"𐲯\");\nassert (/𐲯/u.exec(\"𐲯\")[0] === \"𐲯\");\nassert (/𐲯*?/.exec(\"𐲯\")[0] === \"\\ud803\");\nassert (/𐲯*?/u.exec(\"𐲯\")[0] === \"\");\nassert (/𐲯+/.exec(\"𐲯𐲯𐲯\")[0] === \"𐲯\");\nassert (/𐲯+/u.exec(\"𐲯𐲯𐲯\")[0] === \"𐲯𐲯𐲯\");\n\nassert (/\\ud803\\udc96*?/.exec(\"𐲖\")[0] === '\\ud803');\nassert (/\\ud803\\udc96*?/u.exec(\"𐲖\")[0] === '');\nassert (/\\ud803\\udc96+/.exec(\"𐲖𐲖𐲖\")[0] === '𐲖');\nassert (/\\ud803\\udc96+/u.exec(\"𐲖𐲖𐲖\")[0] === '𐲖𐲖𐲖');\n\nassert (/.*𐲗𐲘/u.exec(\"𐲓𐲔𐲕𐲖𐲗𐲘\")[0] === '𐲓𐲔𐲕𐲖𐲗𐲘');\n\nassert (/[\\u{10000}]/.exec(\"\\u{10000}\") === null);\nassert (/[\\u{10000}]/.exec(\"{\")[0] === \"{\");\nassert (/[^\\u{10000}]/.exec(\"\\u{10000}\")[0] === \"\\ud800\");\nassert (/[^\\u{10000}]/.exec(\"{\") === null);\n\nassert (/[\\uffff]/.exec(\"\\uffff\")[0] === \"\\uffff\");\nassert (/[^\\uffff]/.exec(\"\\uffff\") === null);\n\nassert (/[\\u{10000}]/u.exec(\"\\u{10000}\")[0] === \"\\u{10000}\");\nassert (/[\\u{10000}]/u.exec(\"{\") === null);\nassert (/[^\\u{10000}]/u.exec(\"\\u{10000}\") === null);\nassert (/[^\\u{10000}]/u.exec(\"{\")[0] === \"{\");\n\nassert (/[\\uffff]/u.exec(\"\\uffff\")[0] === \"\\uffff\");\nassert (/[^\\uffff]/u.exec(\"\\uffff\") === null);\n\nassert (/a{4294967296,4294967297}/.exec(\"aaaa\") === null);\nassert (/a{4294967294,4294967295}/.exec(\"aaaa\") === null);\nassert (/a{0000000000000000001,0000000000000000002}/u.exec(\"aaaa\")[0] === 'aa');\nassert (/(\\4294967297)/.exec(\"\\4294967297\")[0] === \"\\4294967297\");\nassert (/(\\1)/u.exec(\"aaaa\")[0] === \"\");\n\ntry {\n  new RegExp(\"a{4294967295,4294967294}\", '');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/[\\d-\\s]/.exec(\"-\")[0] === \"-\");\nassert (/[0-\\s]/.exec(\"-\")[0] === \"-\");\nassert (/[\\d-0]/.exec(\"-\")[0] === \"-\");\n\ntry {\n  new RegExp(\"[\\\\d-\\\\s]\", 'u').exec(\"-\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"[0-\\\\s]\", 'u').exec(\"-\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"[\\\\d-0]\", 'u').exec(\"-\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/[-]/.exec(\"-\")[0] === \"-\");\nassert (/[-]/u.exec(\"-\")[0] === \"-\");\nassert (/[--]/.exec(\"-\")[0] === \"-\");\nassert (/[--]/u.exec(\"-\")[0] === \"-\");\n\nassert (/}/.exec(\"}\")[0] === \"}\");\nassert (/\\}/u.exec(\"}\")[0] === \"}\");\n\ntry {\n  new RegExp(\"}\", 'u').exec(\"}\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/]/.exec(\"]\")[0] === \"]\");\nassert (/\\]/u.exec(\"]\")[0] === \"]\");\n\ntry {\n  new RegExp(\"]\", 'u').exec(\"]\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (/(?=)*/.exec(\"\")[0] === \"\");\nassert (/(?=)+/.exec(\"\")[0] === \"\");\nassert (/(?=){1,2}/.exec(\"\")[0] === \"\");\n\ntry {\n  new RegExp(\"(?=)*\", 'u');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"(?=)+\", 'u');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"(?=){1,2}\", 'u');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp(\"(?=){2,1}\", '');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert(/\\w/iu.test(\"ſ\"));\nassert(/\\w/iu.test(\"\\u212a\"));\nassert(/k/iu.test(\"\\u212a\"));\nassert(/\\u{10c90}/iu.test(\"\\u{10cd0}\"));\n\nassert(/\\b/iu.test(\"ſ\"));\nassert(/\\b/iu.test(\"\\u212a\"));\nassert(/.\\B/iu.test(\"aſ\"));\nassert(/.\\B/iu.test(\"a\\u212a\"));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1616.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar name = \"\";\n\ntry\n{\n  var a = new ArrayBuffer (0xfffffffe)\n}\ncatch (e)\n{\n  name = e.name;\n}\n\nassert(name === \"RangeError\");\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1622.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor (var a in new Int8Array(123));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1633.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ndelete new Uint16Array()[0]\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1670.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar name = \"\";\n\ntry\n{\n  Int16Array.from();\n}\ncatch (e)\n{\n  name = e.name;\n}\n\nassert(name === \"TypeError\");\n\nInt16Array.of();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1763.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnew Promise(Math.max.propertyIsEnumerable.toString).then()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1765.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nFunction()(Promise.prototype.toLocaleString())\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1881.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnew Promise(isFinite.toString).catch(Promise.prototype.then)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1936.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar name = \"\";\n\ntry\n{\n  Object.defineProperties(constructor.isExtensible, {a: Object.getOwnPropertyDescriptor(Uint8ClampedArray, \"length\")})\n  new Int32Array(new ArrayBuffer(), undefined, 40000000000)\n}\ncatch (e)\n{\n  name = e.name;\n}\n\n\nassert(name === \"RangeError\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1995.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar name = \"\";\n\ntry\n{\n    Promise.race([\"\"]).$()\n}\ncatch (e)\n{\n    name = e.name;\n}\n\nassert(name === \"TypeError\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1996.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnew Promise(function(f) {\n    f.apply()\n});\n\nnew Promise(function(f, r) {\n    r.apply()\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-1997.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = Promise.resolve();\nfor (var i = 0; i < 200; i++)\n{\n    Promise.race([a]).then();\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2058.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('/?:/');\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2107.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar thenableWithError = {\n  then: function() { throw new Error(\"\") }\n};\n\nfunction executor(resolve) {\n  resolve(thenableWithError)\n}\n\nnew Promise(executor);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2110.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrowFn = () => {};\narrowFn.hasOwnProperty('caller');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2111.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar value = {};\nvar poisonedThen = Object.defineProperty({}, 'then', {\n  get: function() {\n    throw value;\n  }\n});\nvar promise = new Promise(function(resolve) {\n  resolve(poisonedThen);\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2143.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = new Uint8Array(2);\n\ntry {\n  a[0] = { valueOf : function() { throw \"intoint\"; } };\n  assert(false);\n} catch (e) {\n  assert(e === \"intoint\")\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2181.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar error = {};\n\ntry {\n  var arrayBuffer = new ArrayBuffer(1);\n  var start = { valueOf : function ( ) { throw error; } };\n  var end = { valueOf : function ( ) { } };\n\n  arrayBuffer.slice(start, end);\n  assert(false);\n} catch (e) {\n  assert(e === error);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2414.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  // By default bound functions always support new operator.\n  // However, arrow functions must throw an error even in this case.\n\n  var f = (() => 1).bind();\n\n  new f;\n\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2435.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(new Int8Array(0)).filter(parseInt)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2465.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = eval(\"Object.prototype[1] = 0;\\\n              Promise.all()\")\na.catch(function(err) {\n  assert(err instanceof TypeError);\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2468.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.prototype[1] = 0;\nPromise.race([]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2486.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.setPrototypeOf(Math, Int32Array);\nfor (var i = 0; i < 200; i++) { \n    Promise.race([, [,] % {}]).then(); \n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2487.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperty(Array.prototype, 0, {set: function() {var $ = $()}});\nPromise.all([0]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2488.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperty(Array.prototype, 0, {set: function() {throw \"MyError\"}});\nPromise.all([0]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2489-original.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This test case should not throw an error anymore.\nObject.defineProperty(Object.prototype, 0, {'get': function() { throw $ }});\nPromise.all();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2490.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Original issue\nObject.defineProperty(Object.prototype, 6, {});\nPromise.all([0]);\n\n// Variant 2\nObject.defineProperty(Object.prototype, 2, {});\nPromise.all([0]);\n\n// Variant 3\nObject.defineProperty(Object.prototype, 3, {});\nPromise.all([0]);\n\n// Variant 4\nObject.defineProperty(Object.prototype, 4, {});\nPromise.all([0]);\n\n// Variant 5\nObject.defineProperty(Object.prototype, 5, {});\nPromise.all([0]);\n\n// Variant 7\nObject.defineProperty(Object.prototype, 7, {});\nPromise.all([0]);\n\n// Variant 8\nObject.defineProperty(Object.prototype, 8, {});\nPromise.all([0]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2528.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('for (/a/ in a => { }, a => { }, a => { }) throw 1');\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2544.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperty(Array.prototype, 0, { get : function () { throw $; } });\nvar global_err = undefined;\nPromise.race([ , this]).then(Error).catch(function(err) { global_err = err; });\n\nfunction __checkAsync() {\n  assert(global_err instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2587.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f(a,b,c) {\n  var args = Array.prototype.slice.call(arguments, 3);\n  assert (typeof args.splice === \"function\");\n}\nf();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2602.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperty ( Array.prototype , 0 , { set : function ( ) { throw \"MyError\" } } ) ;\nPromise.all ( [ \"2015-01-01\" ] ) ;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2603.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nObject.defineProperty( Array.prototype, 0, { set : function ( ) { throw \"MyError\" } } );\nPromise.all( [ .86456 ] ) ;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2657.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval (\"var Mixin1 = (superclass) => class extends super.lass {};\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2658.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  var A = class extends null { }\n  new A;\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2664.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar mustBeCalled = false;\n\nclass C1 {\n  f () {\n    mustBeCalled = true;\n    return function () {};\n  }\n}\n\nclass C2 extends C1 {\n  f () {\n    return class extends super.f() {}\n  }\n}\n\nvar c = new C2;\nc.f ();\n\nassert (mustBeCalled);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2666.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass C {\n  static D () {\n    return 5;\n  }\n}\n\nclass D extends C {}\n\nassert (D.D () === 5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2667.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval (\"new Strin = class extends f ()() { constructor () { var C = class extends$B {}\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2671.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass Shape {\n  constructor (id,x,y) {\n    this.id = id;\n    this.x = x;\n    this.y = y;\n  }\n  toString () {\n      return \"Shape(\" + this.id + \")\"\n  }\n}\nclass Rectangle extends Shape {\n  constructor (id, x, y, width, height) {\n      super (id, x, y);\n  }\n  toString () {\n      return \"Rectangle > \" + super.toString ();\n  }\n}\nclass Circle extends Shape {\n  constructor (id, x, y, radius) {\n      super (id, x, y);\n  }\n  toString () {\n      return \"Circle > \" + super.toString ();\n  }\n}\nvar shape = new Shape (0, 0, 0);\nvar rec = new Rectangle (1, 0, 0, 4, 4);\nvar circ = new Circle (2, 0, 0, 4);\n\nassert (Object.keys (shape).toString () === \"id,x,y\");\nassert (rec.id === 1);\nassert (circ.id === 2);\nassert (rec.toString () === \"Rectangle > Shape(1)\");\nassert (circ.toString () === \"Circle > Shape(2)\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2693.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperty(Array.prototype, 0, { get : function ( ) { throw $ } });\nPromise.all([,]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2698.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Uint8Array.prototype.join.call([ \"2015-01-01T00:\", { toString : '2,1,3,4,0' } ], [ ]) ;\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2724.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  var obj = { reverse : Int32Array.prototype.join } ;\n  Object.defineProperty( obj, 'length', { 'get' : function(toPrecision) { return Object.create(/x/); }});\n  obj.reverse(\"$01$02$11$20\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2743.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar v1 = Object(Symbol(\"symbol\"))\nvar v2 = new RegExp();\nvar v3 = new Array(v1)\n\ntry {\n  var v4 = v3.forEach(function(p_0, p_1, p_2) { return p_0 + p_1 + p_2; }, v2);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2757.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar v1 = (new Int8Array (149)).subarray (78);\nvar v1ToString = v1.toString ();\nv1.set (v1);\nassert (v1ToString === v1.toString ());\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2768.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (typeof new Object (Symbol ()) === \"object\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2769.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ndelete JSON[Symbol.toStringTag];\nJSON[Symbol.toStringTag ] = \"𖠀\";\nassert (Map.prototype.toString.call(JSON) === \"[object 𖠀]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2770.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperty(Array.prototype, 0, {set: function() { return Array.prototype.push(), Object.freeze(Array.prototype)}});\nPromise.all([0]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2777.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar f = function (a, b, ...argArr0) {\n    arguments;\n    assert (a === 1);\n    assert (b === 2);\n    assert (argArr0.length === 2);\n    assert (argArr0.toString() === \"3,4\");\n}\n\nf (1,2,3,4);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2779.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (Map.prototype.toString() === \"[object Map]\");\nassert (Object.prototype.toString.call (Symbol.prototype) === \"[object Symbol]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2782.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrayLikeObj = { \"0\" : 0, \"1\" : 1, \"2\" : 2, \"length\": 3 }\n\niterator = Array.prototype.keys.call (arrayLikeObj);\n\nfor (var i = 0; i < arrayLikeObj.length; i++) {\n  var next = iterator.next ();\n  assert (next.value === i && next.done === false);\n}\n\nnext = iterator.next ();\nassert (next.done === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2783.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nvar id_0;\n$(encodeURIComponent);\nfunction $ ( ) { }\narray = [ $, $, $, $, $, $, $] ;\n[0, 0, 0].forEach(function(e) {Object.defineProperty(array, e, {'get' : Int32Array})})\niterator = array.entries();\nvar id_2 = [ ];\nvar id_3 = [ ];\nvar id_4 ;\nfor (var i ; i < 1000000; i++) {\n    try {\n        array = iterator.next();\n        $(Uint8ClampedArray.$[$])\n    } catch (e) { $(e instanceof ReferenceError) }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2822.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass Animal {\n    constructor() {\n        eval();\n    }\n    explain() { }\n}\nclass Dog extends Animal {\n    constructor() {\n        super()\n    }\n}\nclass Doge extends Dog {\n    whoAmI() {}\n}\n\nvar d = new Doge;\nassert (typeof d === \"object\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2823.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass myArray extends Array {}\nassert (!(undefined instanceof myArray));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2825.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar $;\nvar called = false;\n\nfunction f() {}\nvar B = class extends f {\n    constructor() {\n        eval();\n        super($)\n        this.g()\n    }\n}\nC = class extends B {\n    g() {\n        (() => {\n          called = true;\n        })()\n    }\n}\nD = class extends C {\n    constructor() {\n        super()\n    }\n    g() {\n        eval('super[\"g\"]')()\n    }\n}\nnew D\nassert (called);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2842.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function $ () { var $, b }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2848.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrayBuffer = new ArrayBuffer;\nvar dataView = new DataView(arrayBuffer);\nassert (dataView.buffer === arrayBuffer);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2850.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  (function () {\n    var d = new DataView(new ArrayBuffer())\n    for (var $; ;) {\n      d.setInt8(0)\n    }\n  })()\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2851.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction a (n) {\n  var array = new Int32Array(n)\n  var array2 = new Int32Array(array)\n  array2.set(new Uint8Array(array.buffer, 34))\n}\n\na(10)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2852.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction createMap (count) {\n  var map = new Map()\n  for (var i = 0; i < count; i++) {\n    map.set(i)\n  }\n  return map\n}\n\nvar counter = 0;\ncreateMap(2000).forEach(function ($, key) {\n  counter++;\n  $ += key\n})\n\nassert(counter === 2000);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2853.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar map = new Map()\nmap.set()\nmap.set('bar')\n\nvar count = 0\nmap.forEach(function () {\n  if (count === 0) {\n    map.delete('bar')\n  }\n  count++;\n})\n\nassert(count === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2854.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar buffer = new ArrayBuffer()\nvar dataView = new DataView(buffer, 0, undefined)\n\nassert(dataView.byteLength === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2891.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nfunction f (name){\n  delete this.keywords[name];\n  assert (false);\n}\n\ntry {\n  f (\"jerry\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2895.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction createMap (count) {\n  var map = new Map ( )\n  for (var i = { member : 0, valueOf: function () { return this.member } }; i < count ; i ++) {\n    map.set(i);\n  }\n  return map\n}\ncreateMap(2000).forEach(function($, $) {})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2910.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar map = new Map ; \nfor (var i = 0; i < 15 ; i ++ ) { map.set() } \nmap.forEach ( Number )\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2911.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar m = new Map;\nvar obj = { $: 0 };\nassert(m.set(\"strItem\", obj) === m);\ngc();\nassert(m.get(\"st\" + \"rItem\") === obj);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2947.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(new Uint32Array(Array(undefined, 9040650076)).findIndex(function (p_0) { return p_0 }) === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2948.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  new (new Object()).constructor().constructor('abcdefghi').repeat(-4956799914495204378)\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2950.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = new Map();\nvar iterator = str[ Symbol.iterator ]();\n\ntry {\n  iterator.next.call({ })\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2951.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// To trigger the assertion the engine must be compiled with --system allocator=ON and --mem-stress-test=ON\nm = new Map([]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2975.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Import/export statements must be in the global scope. */\nvar eval = eval.bind();\ntry {\n  eval('import { c } from \"tests/jerry/es.next/module-export-01.mjs\";');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-2990.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass A {\n  constructor() {\n    this.id = 50000;\n  }\n\n  getid(a) {\n    if (typeof a === 'number') {\n      this.id += a;\n    }\n    return this.id;\n  }\n}\n\nclass B extends A {\n  constructor() {\n    super();\n    this.id = 100;\n  }\n\n  getid_A() {\n    return super.getid.call(this);\n  }\n\n  getid_B(a) {\n    return super.getid.call(this, a);\n  }\n  getid_C(a) {\n    var fn = super.getid.bind(this);\n    return fn(a);\n  }\n}\n\nvar obj = new B();\n\nassert (obj.getid_A() === 100);\nassert (obj.getid_B(1) === 101);\nassert (obj.getid_C(1) === 102);\nassert (obj.id === 102);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3040.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar map = new Map();\nvar array = Array();\nmap.set(array);\nassert(map.has(array));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3043-3046.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// issue #3046\nvar map = new Map();\nvar array = [1.5];\nmap.set(array);\nassert(map.has(array));\n\n// issue #3043\nmap = new Map();\narray = [0];\nmap.set(array);\nassert(map.has(array));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3045.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar set = new Set();\nset.add();\nassert(!set.has([1]));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3049.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar func = function (a, b) { return a + b };\nassert(['A'].findIndex(func) == 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3050.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar counter = 0;\nvar expected = [0];\n\nvar b = [$];\nfunction dConstr () { }\ndConstr.prototype = b;\nvar d = new dConstr()\nfor (var $ in d) {\n  counter++;\n  assert($ in expected);\n}\n\nassert(counter === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3062.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar map = new Map();\nvar obj = Object.freeze({});\nmap.set(obj, 1);\nassert(map.has(obj));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3063.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = \"123\" + \"test123\";\n\ntry {\n  str.repeat([1073741823]);\n  assert(false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3067.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test case minimalized from issue #3067\n\nfunction f () { }\n\nclass B extends f {\n  constructor () {\n    super (0)\n    super.$\n    this.$ = $\n  }\n}\n\ntry {\n  var b = new B;\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3070.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r = new RegExp(\"([X]{6}|.*)\", \"g\");\nvar s = \"a\";\ns.replace(r, () => r.compile(\"[PqaCZlWQUT]{0}\", \"m\"));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3072.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrb = new ArrayBuffer(13);\n\ntry {\n  var d = new DataView(arrb, 12, -Infinity);\n  d.setFloat32(1, 1);\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3078.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrb = new ArrayBuffer(13);\nvar arr = new Uint8Array(arrb, 9);\nfor (var idx = 0; idx < arr.length; idx++) {\n  arr[idx] = idx + 1;\n}\n\nassert(arr.slice(1).toString() == \"2,3,4\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3079.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor (b = 0; b < 100; b++) {\n    var setv = new Set();\n    setv.add(1);\n    setv.add(Math.SQRT2);\n    setv.forEach(function(value, key, set) {\n        setv.clear();\n        (eval)(\"\" + 123);\n    });\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3084.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(\"\".repeat(1.1) === \"\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3095.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass $ {\n  set ( ) {\n    switch ( $ ) { }\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3097.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nswitch ($) {\n  case $: function $( $ = $, ... c ) { }\n  case $ :\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3105.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = String.fromCharCode([-10] + \"123\", Date.UTC(15, 13, 15));\nstr.repeat(11);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3106.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar symbol = Symbol();\nvar arr = [{}];\nwith (arr.pop()){\n    arr.push(symbol.valueOf());\n}\n\ntry {\n  arr.length = String.fromCharCode(Object.freeze(arr));\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3107.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arr = new Int8Array(200);\nvar result = arr.copyWithin(100, 14, 5);\n\nassert (arr === result);\n\nfor (i = 0; i < 200; i++)\n{\n    assert (arr[i] === 0);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3109.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrb = new ArrayBuffer(14);\n\ntry {\n  var arr = new DataView(arrb, 13, Infinity);\n  assert(false);\n  arr.setUint32(9, -65536);\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3129.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrb = new ArrayBuffer(1);\nvar arr = new Uint8Array(arrb);\narr.lastIndexOf(Number.NaN, -[4294967280]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3162.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { v0 = this.toString( )} catch ( $ ) { }\ntry { v1 = this.toLocaleString( ).localeCompare( )} catch ( $ ) { }\ntry { var v14 = Int8Array.from(((Array)(v0.length))) } catch ( $ ) { }\ntry { v14(v14.fill(v1)) } catch ( $ ) { }\ntry { v0(v14.toLocaleString( )) } catch ( $ ) { }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3204.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc3204_1 () {\n  (new Int16Array(7029)).subarray(5812).reduce(function() { })\n})();\n\n(function tc3204_2 () {\n  (new (Uint8Array)((new (ArrayBuffer)(\"5\")), EvalError.length)).reduceRight(function() { })\n})();\n\n(function tc3204_3 () {\n  var v0 = (((new ((new ((new Object).constructor)).constructor)).constructor)(\"\")).split( )\n  var $ = (new Float64Array(7652)).subarray(1872).reduce((new (v0.filter.constructor)))\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3222.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar v0 = (Array((((new String).split().constructor)(Symbol( )))))\n\ntry {\n  var $ = (new Uint8ClampedArray).set((new ((new constructor).constructor(this).Uint32Array)), v0)\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3237.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrayBufferVar1 = new ArrayBuffer(12, 8);\nvar arrayVar1 = new Uint8Array(arrayBufferVar1, 9);\narrayVar1.lastIndexOf(15, -Math.LOG10E);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3243.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  (new Int8Array((new ArrayBuffer()), 1, Infinity)).reverse()\n  assert(false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3250.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrowFn = () => { };\nassert (arrowFn.prototype === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3252.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    function NoParent ( ) { }\n    Number.constructor( NoParent, Symbol.hasInstance, { })\n    assert (false)\n} catch (e) {\n    assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3262.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert ((new Float64Array(Object('foobar').split())).every(function (p_0) { return p_0 }) === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3267.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar hasProp = $ => { }\nObject.preventExtensions(hasProp);\nassert (Object.isSealed(hasProp) === false);\n\nvar keys = Object.getOwnPropertyNames(hasProp);\nassert (keys.length === 1);\nassert (keys[0] === \"length\");\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3298.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar $ = { $: function ( $) { } };\n\nfunction g ( b = (local = $) ) {\n  var o ;\n  function f ( ) { return this === o }\n}\n\ng ()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3302.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction g ( a, b = a ) {\n  function a ( ) { }\n  function $ ( ) { }\n  eval ( \"\" )\n}\ng ( );\n\n$ = function ( ) {\n  function x ( ) { }\n}\n\nfunction j ( ) { }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3306.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  typeof(a);\n  let a;\n  assert (false);\n} catch (e) {\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3348.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  [$, this.$] = [ ];\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3355.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar $ = $ => { }\n/ /\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3356.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar alpha = []; \nvar $ = {[$] : $} \nobj = {}  \nobj[ Symbol.isConcatSpreadable ] = \"\\O\"  \nalpha.concat(obj)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3360.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction $ (b = [ ].$) { };\nassert ($() === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3361.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar fakeArray = { [ Symbol ] : 0};\nfakeArray[ Symbol.isConcatSpreadable ] = 2.756;\n[].concat(fakeArray);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3363.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (typeof x === 'undefined');\nlet { t: [ { a: b } ] } = { t: [ { a: 'a' } ] };\nassert (b === 'a');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3364.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(eval(...[0]) === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3376.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function () {\n  new Promise(isFinite.toString)\n})();\n\n(function () {\n  [ ] = [ ]\n})\n({})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3381.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\na: function f() {return true;}\n\nassert (f() === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3383.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (typeof Function('[]', 0) == \"function\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3390.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = Promise.resolve( 'a' );\nvar b = Promise.reject( 'b' );\nPromise.race( [ a , b ] ).then ( function ( x ) { var a , b ; [ a , b ] = [ 1 , 2 ]; String( a === 1 ); } , function ( x ) { } );\nPromise.race( [ b , a ] ).then ( function ( x ) { String ( false ) ;}, function ( x ) { } );\nPromise.race( [ , b , a ] ).then ( function ( x ) { String ( x === undefined ) ; }, function ( x ) { String ( false ); } );\nPromise.race( a ).then ( function ( x ) { String ( false ); }, function ( x ) { String ( x.name === \"TypeError\" ); } );\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3395.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor (var [] of [[], []])\n    \"\".split(new RegExp())\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3396.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction i($, b = (eval(\"var x\"))) {\n    function x() {}\n    eval()\n}\ni()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3408.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [0, 0, obj, 0, 0];\narray.copyWithin(NaN, 67, 0);\nvar obj\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3409.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a;\nPromise.race([a]).then(function() {[] = []});\nPromise.race().then(function() {}, function() { throw \"'this' had incorrect value!\"})\n\nvar a = Promise.resolve('a');\nvar b = Promise.reject('b');\nPromise.race([a, b]).then(function(x) {\n    var [a, b] = [1, 2];\n}, function(x) {});\nPromise.race([b, a]).then(function(x) {}, function(x) {});\nPromise.race([, b, a]).then(function(x) {}, function(x) {});\nPromise.race(a).then(function(x) {}, function(x) {\n    String(i.name === \"TypeError\");\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3411.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a;\nPromise.race([a]).then(function() {[] = []});\nPromise.race().then(function() {}, function() { throw \"'this' had incorrect value!\"})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3419.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval ('Function(\"[]\", 0)()');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3420.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Array.from.call(String, $);\n  function $() {}\n  assert(fasle);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3421.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright 2014 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nfor (let [] of [[],[]]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3422.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (typeof RegExp('{}') === \"object\");\nlet {t: []} = {t: []};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3431.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval ('function g({[\"y\"]: []}) {}; g({xy: {}})');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  eval ('function g([], {}, [], {}) {}; g()');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3434.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction g({\n    [\"y\"]: {\n        get = 5\n    }\n}) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3437.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[...RegExp.prototype.compile] = ([]);\n\nassert(RegExp.prototype.compile.length === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3454.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\ntry {\n  eval(\"var $ = function yield() {}\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3455.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  [...RegExp.$.$] = String();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar o = { a : { b : { c : { d: { e : { } } } } } };\n\n[...o.a.b.c.d.e] = \"foo\";\n\nassert(o.a.b.c.d.e.length === 3);\nassert(o.a.b.c.d.e[0] === \"f\");\nassert(o.a.b.c.d.e[1] === \"o\");\nassert(o.a.b.c.d.e[2] === \"o\");\n\n[o.a.b.c.d.e] = \"foo\";\n\nassert(o.a.b.c.d.e === \"f\");\n\n[this.o.a.b.c.d.e] = \"bar\";\nassert(this.o.a.b.c.d.e === \"b\");\n\n[...this.o.a.b.c.d.e] = \"bar\";\nassert(this.o.a.b.c.d.e.length === 3);\nassert(this.o.a.b.c.d.e[0] === \"b\");\nassert(this.o.a.b.c.d.e[1] === \"a\");\nassert(this.o.a.b.c.d.e[2] === \"r\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3458.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass Animal {}\nclass Dog extends Animal {\n  static explain () {\n    super.f = 8\n  }\n}\n\nassert (Dog.f === undefined);\nassert (Animal.f === undefined);\n\nDog.explain ()\n\nassert (Animal.f === undefined);\nassert (Dog.f === 8);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3459.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass MyOtherArray {}\n\nclass MyNonArray extends Array {\n  static [Symbol.species] () {}\n}\n\ntry {\n  (() => MyNonArray)().prototype.slice.call(new MyNonArray((0) === 1))\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3478.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.prototype[\"symbol\"] = 0;\nPromise.race([]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3479.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass MyObservedArray extends Array {\n    constructor() {\n        super('\"use strict\"; var x = \"\\\\411\";')\n    } [Symbol]() {}\n}\n\nnew MyObservedArray().slice()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3483.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction assertThrows(src) {\n  try {\n    eval(src);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n\nassertThrows('Setting `o.bar` to');\nassertThrows('Setting `o.bar`; Setting `o.bar` to');\nassertThrows('Setting `o.bar`; Setting `o.bar`; Setting `o.bar` to');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3485.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = new Float32Array([$])\n\ntry {\n  var $ = a.map(function () { $() });\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3519.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('function method () { [\"\"] = $ }');\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);  \n}\n\ntry {\n  eval (\"function mm () { [new.target] = 3; }\");\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3527.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction assertThrows(src) {\n  try {\n    eval(src);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n\nassertThrows(`function $({\n  $: {\n      [$.$]\n  }\n}) {}`);\n\nassertThrows(`function $({\n  $: {\n      [$]\n  }\n}) {}`);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3534.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [$, Infinity]\nReflect.preventExtensions(array);\n\ntry {\n  var $ = array.pop()\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3536.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass A {\n  constructor() {\n    var hasProp = $ => {}\n    Object.preventExtensions(hasProp);\n    assert(Object.isSealed(hasProp) === false);\n  }\n  super() {\n    $: $\n  }\n}\nclass B extends A {\n  constructor() {\n    super() (super.super)\n  }\n}\n\ntry {\n  new B;\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3580.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar func = function(val, idx) {\n    return val + idx\n};\n\nString([0, \"X\"].map(func).copyWithin([]));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3588.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test if the native function as constructor is correctly invoked\n// when used as parent \"class\"\n\nclass C extends print {}\nnew C ()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3589.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('[this,000000000,this,99999999=9999999]');\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\ntry {\n  eval('[this,999+=8]');\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3595.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test if the native function as constructor is correctly invoked\n// when used as parent \"class\"\n\nvar src = \"({ $($) { a(...args) }\";\n\ntry {\n  eval (src);\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3606.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nvar expected = '{\"copyWithin\":true,\"entries\":true,\"fill\":true,\"find\":true,\"findIndex\":true,\"flat\":true,\"flatMap\":true,\"includes\":true,\"keys\":true,\"values\":true}';\nassert(JSON.stringify(Array.prototype[Symbol.unscopables]) === expected);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3611.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar tcs = [\n  \"for (const [] of $)\",\n  \"for (const [] in $)\",\n  \"for (let [] of $)\",\n  \"for (let [] in $)\",\n  \"for (const {} of $)\",\n  \"for (const {} in $)\",\n  \"for (let {} of $)\",\n  \"for (let {} in $)\",\n];\n\nfor (let e of tcs) {\n  try {\n    eval (e);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n\n  try {\n    eval (e + \" {}\");\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3625.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar Base = function() {}.bind();\nObject.defineProperty(Base, 'prototype', {\n    get: function() {\n        return Int8Array + Function\n    }\n});\n\ntry {\n  class C extends Base {}\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3628.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar g = Array.bind(0, 0, 0, 0)\ng.prototype = Array;\nclass C extends g {}\nclass D extends C {\n    constructor(a, b, c) {\n        eval(\"eval ('super (a, b, c, d)')\")\n\n    }\n}\nvar d = new D\nassert(d.length === 7);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3630.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  {\n    class eval {}\n    eval()\n  }\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3636.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() {}\nvar B = class extends f {\n    constructor() {\n        String(Reflect.setPrototypeOf(B, null));\n        super($)\n    }\n}\nC = class extends B {\n    g() {\n        return function() {}\n    }\n}\nD = class extends C {\n    constructor() {\n        super()\n    }\n    g() {}\n}\n\ntry {\n  new D\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3637.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = [1, 2, 3, 4];\nvar b = a.slice(0, { valueOf: function(){ a.length = 0; return 100; } });\n\nassert(b.length === 4);\n\nvar c = [1, 2, 3, 4];\nc.prop = 4\nvar d = c.slice(0, { valueOf: function(){ c.length = 0; return 100; } });\n\nassert(d.length === 4);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3640.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar B = class {}\neval = class extends B {}\n\ntry {\n  eval();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3641.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\neval = class extends SyntaxError {\n  constructor() {\n      super()\n  }\n}\n\ntry {\n  eval()\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3647.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nf();\nlet g;\nfunction f() {\n  assert(eval('function g() { return 5}; g')() === 5);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3655.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlet str = 'for (let i of id_36) function testcase() { testcase';\n\ntry {\n  eval (str);\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3656.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n$ => $++\n[ ]\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3658.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction g({\n  [\"y\"]: {\n      a\n  }\n})\n{\n  {\n    function a() {}\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3665.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar idx1 = 32.6;\nvar idx2 = 42.7;\nvar obj = { [idx1] : { [idx2] : {}}};\n([obj[idx1][idx2]] = [5.7]);\n\nassert (obj[idx1][idx2] === 5.7);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3671.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {\n  get source() {\n      return \"Iam\"\n  },\n  [Symbol.match]: true\n}\n\nvar regexp = new RegExp(obj);\nassert(regexp.source === \"Iam\");\n\nObject.defineProperty(obj, 'flags', {'get' : function () {throw 42}});\n\ntry {\n  new RegExp(obj);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3713.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction $(b = eval()) {\n    \"\"\n    eval()\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3715.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass B extends Array {\n    constructor() {\n        super();\n        super.f = 8;\n    }\n}\nvar arg = new B()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3727.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nFunction(\"a = 5, b, c = function() { for (var a = 0; a < 4; a++) ; return a; } ()\", \"eval ('super (a, b, c, d)')\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3751.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(`for (let i in {\n            id_0: 1\n        })\n\n        (function() {\n                i\n        `);\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3760.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar split = RegExp.prototype[Symbol.split];\n\ntry {\n  split.call({[Symbol.match]: \"g\"});\n  assert(false);\n} catch (ex) {\n  assert(ex instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3784.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar expected = ['0', '1', '2', '3', '4', '5'];\nvar actual = [];\n\nvar v1 = typeof 13.37;\nvar v3 = Object(v1);\nvar v5 = [13.37,13.37];\nvar v6 = [v5];\nv3.__proto__ = v6;\n\nfor (var v7 in v3) {\n  actual.push(v7);\n}\n\nassert(actual.length === expected.length);\n\nfor (var i = 0; i < actual.length; i++) {\n  assert(actual[i] === expected[i]);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3785.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = new Proxy({length:2}, {});\na.__proto__ = a;\n\ntry {\n  a[1];\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\ntry {\n  a[1] = 2;\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\ntry {\n  Array.prototype.forEach.call(a, ()=>{});\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3787.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar symbol = Symbol(\"s\");\nvar obj = {demo: \"3\"};\nobj[symbol] = 3;\n\nvar proxy = new Proxy(obj, []);\nvar str = JSON.stringify(proxy);\n\nassert(str === '{\"demo\":\"3\"}');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3812.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f (a) {\n  assert(a[0] === '𞹴');\n}\n\nf`𞹴`;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3814.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f () {}\n\nassert((new f) instanceof new Proxy(f, {}))\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3815.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction a() {}\n\ntry {\n  eval('(a()) = a');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3817.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar replace = RegExp.prototype[Symbol.replace];\nreplace.call({ exec : ( ) => { return {  } } }, '^o𓙦һ', \"a\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3819.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('typeof (global.v2) = 123');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3820.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('(isNaN(parseFloat(\".\"))) = \\'abcd\\'');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3822.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(`function f ({array, 'a', { value: 'foo', enumerable: true } : 36}){}`);\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3823.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(`function f ({\"aba,a\"}){}`);\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3824.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(`var a = {\"foo//b\", };`);\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3825.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(`var errorMessage = \"toStringThrows\"\n\n  var toStringThrows = {\n    \"foo//bar/baz//foo\"\n  }\n\n  try {\n    var obj = {};\n    obj[toStringThrows] = 3;\n    assert(false);\n  } catch (e) {\n    assert(e.message == errorMessage);\n  }\n  `);\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3836.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction validate_typedarray (typedarray, result) {\n  assert(typedarray.length === result.length);\n  for (var i = 0; i < typedarray.length; i++) {\n    assert(typedarray[i] === result[i]);\n  }\n}\n\nvar v1 = new Float64Array(6);\nv1.buffer.constructor = Uint8Array;\nvar v2 = new Float64Array(v1);\n\nassert(v2.buffer.constructor === Uint8Array);\nvalidate_typedarray(v2, [0, 0, 0, 0, 0, 0]);\n\nvar v3 = new Uint32Array(6);\nv3.buffer.constructor = Float64Array;\nvar v4 = new Uint8Array(v3);\n\nassert(v4.buffer.constructor === Float64Array);\nvalidate_typedarray(v4, [0, 0, 0, 0, 0, 0]);\n\nvar v5 = new Uint32Array(6);\nv5.buffer.constructor = Set;\nvar v6 = new Uint8Array(v5);\n\nassert(v6.buffer.constructor === Set);\nvalidate_typedarray(v6, [0, 0, 0, 0, 0, 0]);\n\nvar species_called = false;\n\nvar v7 = new Float64Array(6);\nvar v8 = v7.buffer;\nv8.constructor = {\n  get [Symbol.species] (){\n    species_called = true;\n    return Uint8Array;\n  }\n}\nvar v9 = new Float64Array(v7);\n\nassert(species_called);\nassert(Reflect.getPrototypeOf(v9.buffer) === Uint8Array.prototype);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3837.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction dummy ()\n{\n  \"D\" + \"a\";\n}\n\nvar p1Handler = { getOwnPropertyDescriptor: dummy };\nvar p1 = new Proxy({}, p1Handler);\n\nfunction dummyString ()\n{\n  return \"a\";\n}\n\nvar p2Handler = { deleteProperty: dummyString };\nvar p2 = new Proxy(p1, p2Handler);\n\nvar result = (delete p2[1]);\n\nassert (result);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3841.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('$?$:$=>{ }?{ }:$')\n  assert(false)\n} catch (e) {\n  assert(e instanceof SyntaxError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3842.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('while(0 ? 0 : ()=>{} | {})')\n  assert(false)\n} catch (e) {\n  assert(e instanceof SyntaxError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3845.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(`typeof (a) = 1 === 'undefined';`);\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3849.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(`[]=$--['']`);\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3856.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlet str = '';\nfunction async() {}\n\nasync(str)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3857.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction async() {}\n\nnew async\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3860.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Object (...1, {});\n  assert (false);\n} catch (ex) {\n  // expected error: \"TypeError: object is not iterable\"\n  assert (ex instanceof TypeError);\n}\n\ntry {\n  Object (...1, {}, {});\n  assert (false);\n} catch (ex) {\n  // expected error: \"TypeError: object is not iterable\"\n  assert (ex instanceof TypeError);\n}\n\ntry {\n  Object (...1, { \"prop\": 2 }, 1, { \"prop\": 2 });\n  assert (false);\n} catch (ex) {\n  // expected error: \"TypeError: object is not iterable\"\n  assert (ex instanceof TypeError);\n}\n\ntry {\n  Object (...1, \"str\");\n  assert (false);\n} catch (ex) {\n  // expected error: \"TypeError: object is not iterable\"\n  assert (ex instanceof TypeError);\n}\n\ntry {\n  Object (...[], { \"prop\": 2 }, 1, { \"prop\": 2 }, ...1);\n  assert (false);\n} catch (ex) {\n  // expected error: \"TypeError: object is not iterable\"\n  assert (ex instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3861.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  (function() {\n    function* generatorFn() {}\n    g = generatorFn()\n    ownProto = Object.getPrototypeOf(g)\n    sharedProto = Object.getPrototypeOf(ownProto)\n    propertyIsEnumerable(sharedProto)\n  })()\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3862.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar target = function() {};\nvar handler = {\n    get() {\n        if ($);\n    }\n};\n\nvar o = new Proxy(target, handler);\n\ntry {\n  Reflect.construct(Function, ['c'], o);\n  assert(false);  \n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3866.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a;\nvar b;\nvar called = false;\nPromise.race([a, b]);\nPromise.race([b, a]);\nPromise.race([, b, a]);\nPromise.race().then(function() {}, function() {\n    let str;\n    function getStr() {\n        return $ `$`\n    }\n    var $ = getStr()\n}).catch(e => {\n  called = true;\n  assert (e instanceof TypeError);\n})\n\nfunction __checkAsync() {\n  assert(called);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3868.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = new Proxy({ a : 4, b :4}, {});\nvar reached = false;\n\nfor (var $ in a)\n{\n  reached = true;\n}\n\nassert (reached === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3869.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('function a ({ *x:x }) {}')\n  assert(false)\n} catch (e) {\n  assert(e instanceof SyntaxError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3870.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (new RegExp(\"\\ud800\", \"u\").exec(\"\\ud800\")[0] === \"\\ud800\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3871.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  new RegExp('\"\\\\u', 'u');\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3880.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nRegExp.prototype.constructor = \"\"\nvar r = /a/;\nassert (r.test (\"a\"));\n\nRegExp.prototype.constructor = {}\nr = /b/;\nassert (r.test (\"b\"));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3888.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction i(id_0, b = (eval(\"var x\"))) {\n    function x() {}\n    eval(!eval(\"var x = {}; x instanceof assert;\"))\n}\ni()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3893.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.prototype.toString = function () {\n  return a`` ;\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3908.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"async(a,b+)\")\n  assert(false)\n} catch (e) {\n  assert(e instanceof SyntaxError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3935.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nconst obj = {};\nvar a = { a : (o) = 1 } = obj;\n\nassert (a === obj);\nassert (o === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3945.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction a() {\n  this[2] = { b : new Proxy(Function, {}) }\n}\n\nJSON.parse(\"[1, 2, []]\", a);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3950.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction a() {\n  this[2] = new Proxy(new function() { return new Array }, {})\n  return {}\n}\n\nJSON.parse(\"[1, 2, []]\", a);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-3975.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\na = 10\nb = new Uint8Array(a)\nfunction c() { d }\n\ntry {\n  b.sort(c);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4013.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(\"\\ud800\".toUpperCase() === \"\\ud800\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4016-4019.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction checkSyntax(str) {\n  try {\n    eval(str);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n\ncheckSyntax(`function a ([{ catch (e) {\n  eval(\"var e\");\n} }])`);\n\n\ncheckSyntax(`function a ({\n  catch (e) {\n  eval(\"var e\");\n}})`);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4017.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  var v0 = Object.freeze (RegExp (\"foo\", \"g\")).compile ();\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4018.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[\n  '\"\\\\ubad',\n].forEach(function(result = JSON.parse (str, function (k, v) {\n  return v;\n})) {\n  r = eval ('\"use ' + 's' + 't' + 'r' + 'i' + 'c' + 't\"; va' + 'r x = 1;');\n});\n\n// Better test\nfunction f(result = function () {}) {\n  var x = 1;\n  eval ('\"use strict\"; var x = 2; assert(x === 2)');\n  assert(x === 1)\n}\nf()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4043.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f(a, b, c) { }\n\nObject.defineProperty(f, \"length\", {\n  writable: true,\n  configurable: true,\n  value: 10 ** 42\n});\n\nassert(f.bind().length == 10 ** 42);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4044.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = Int32Array.prototype;\na.__proto__ = [];\n\nvar b = a.splice(7, -4, 8, 9, 10);\n\nb.__proto__ = a;\nb.length = 5;\n\ntry {\n  b = b.concat([]);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4045.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = new Proxy(eval, {});\nvar b = {\n    y : 2\n};\nb.__proto__ = a;\n\nvar f = [];\nvar c = [];\nvar d = new Date();\nd.__proto__ = b;\na.__proto__ = f;\n\nc.__proto__ = d;\n\n\nvar a1 = new String();\na1.__proto__ = c;\n\nassert(a.__proto__ === f);\nassert(b.__proto__.__proto__ === f);\nassert(d.__proto__.__proto__ === a);\nassert(c.__proto__.__proto__.__proto__ === a);\nassert(a1.__proto__.__proto__.__proto__.__proto__ === a);\n\nvar e = []\na1.__proto__ = e;\n\nassert(a1.__proto__ === e);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4048.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Single non-enumerable property leak check with Object.assign, */\nvar from = {};\nObject.defineProperty (from, \"abc\", { enumerable: false, get: function() { return new String (\"demo\"); }})\nassert ((from.abc + \"\") === \"demo\");\n\nvar out = Object.assign ({}, from);\nassert (typeof (out.abc) === \"undefined\");\n\n/* Test with Proxy */\nvar called_get = false;\nvar called_keys = false;\nvar called_desc = false;\nvar called_extra_get = false;\n\nvar prox = new Proxy (from, {\n  get: function (target, key) {\n    assert (key === \"ERR\");\n    called_get = true;\n    throw new URIError(\"ERR\");\n  },\n  ownKeys: function (target) {\n    called_keys = true;\n    return [\"abc\", \"ERR\"];\n  },\n  getOwnPropertyDescriptor: function(target, key) {\n    if (key === \"ERR\") {\n      called_desc = true;\n      return { enumerable: true,\n               get: function() {\n                 /* This should never be called! */\n                 called_extra_get = true;\n                 return \"ABC\";\n               },\n               configurable: true,\n      };\n    }\n    return Reflect.getOwnPropertyDescriptor(target, key);\n  },\n});\n\ntry {\n  var prox_out = Object.assign ({}, prox);\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof URIError);\n}\n\nassert (called_keys === true);\nassert (called_desc === true);\nassert (called_get === true);\n\nassert (called_extra_get === false);\n\n/* Original test case from the issue report: test if there is a leak on exit. */\nvar result = Object.assign({}, RegExp);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4050.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(`function write([a] of { }\n    (function Test1() {\n        write(\"\");\n    });`);\n  assert(false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4051.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction foo() {\n  for (var i = 0; i < 3; i++) {\n    const N = class { };\n    function bar(a0) { }\n    assert(N.name === 'N');\n  }\n}\nfoo();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4052.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {};\nvar proxy = new Proxy(obj, {\n    getOwnPropertyDescriptor: function (target, property) {\n    },\n});\nvar proxy2 = new Proxy(proxy, {\n    a: obj.prop2++\n});\n\ntry {\n  Object.freeze(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Object.seal(proxy);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4054.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"var obj = { m() {super.8 = 17;} };\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4059.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  new new Proxy(Function(), { get:String.fromCharCode })\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4093.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar v138 = {\n    ownKeys: function() { return []; },\n};\n\nvar v140 = new Proxy ({}, v138);\n\n/* expected an empty array */\nvar result = Object.getOwnPropertyNames (v140);\n\nassert (result instanceof Array);\nassert (result.length === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4094.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() {\n  var o1 = {e:[]};\n  var o2 = o1;\n\n  async function g(a,b) {\n      await b;\n      o2 = 13.37;\n  }\n  g(\"a\");\n}\nf();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4097.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction* g(a) {\n    yield* a;\n    return -3.14;\n}\n\ntry {\n  var iter = g(\"foo\" + \"bar\");\n  new WeakMap(iter);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4129.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(JSON.stringify(\"\\uD834\") === '\"\\\\ud834\"');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4131.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar P = function (executor) {\n  return new Promise (function () {\n    executor (\n      function () {},\n      function () {\n        throw new TypeError ();\n      }\n    );\n  });\n};\n\ntry {\n  Promise.reject.call (P);\n  assert (false)\n} catch (e) {\n  assert ( e instanceof TypeError)\n}\n\nvar P = function (executor) {\n  return new Promise ( function() {\n    executor(\n      function () {\n        throw new TypeError ();\n      },\n      function () {}\n    );\n  });\n};\n\ntry {\n  Promise.resolve.call(P);\n  assert (false)\n} catch (e) {\n  assert ( e instanceof TypeError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4132.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction async(p) {\n  return p;\n}\n\nassert(async(\"X\",) === \"X\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4138.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (new Object (0n) == 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4139.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar b;\nassert(0n !== b);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4146.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// helper function - simple implementation\nArray.prototype.equals = function (array) {\n  if (this.length != array.length)\n    return false;\n\n  for (var i = 0; i < this.length; i++) {\n    if (this[i] instanceof Array && array[i] instanceof Array) {\n      if (!this[i].equals(array[i]))\n        return false;\n      }\n      else if (this[i] != array[i]) {\n        return false;\n    }\n  }\n\n  return true;\n}\n\nfunction longDenseArray(){\n        var a = [0];\n        for(var i = 0; i < 60; i++){\n                a[i] = i;\n        }\n        return a;\n}\n\nfunction shorten(){\n        currArray.length = 20;\n        return 1;\n}\n\nvar array = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,,,,,,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19];\nvar currArray = longDenseArray();\ncurrArray.copyWithin(25, {valueOf: shorten})\nassert (currArray.length == 44)\nassert (currArray.equals (array))\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4147.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar asyncFunProto = Object.getPrototypeOf (async function() {});\nassert (Object.prototype.toString.call (asyncFunProto) === \"[object AsyncFunction]\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4148.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar calls = 0;\nNumber.prototype.toLocaleString = function() {\n  return {\n    toString: function() {\n      calls++;\n      if (calls > 1) {\n        throw \"ERROR V\";\n      }\n    }\n  };\n};\n\nvar array = [42.333333, 2.3];\n\nvar sampleA = new Float32Array(array);\ntry {\n  sampleA.toLocaleString();\n} catch(ex) {\n  assert(ex === \"ERROR V\");\n}\nassert(calls === 2);\n\nvar sampleB = new Uint8Array(array);\ntry {\n  sampleB.toLocaleString();\n} catch(ex) {\n  assert(ex === \"ERROR V\");\n}\nassert(calls === 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4149.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlet x;\ntry {\n  (0,eval)('var x');\n  assert(false)\n} catch (e) {\n  assert(e instanceof SyntaxError)\n}\n\n(0,eval)('function x() {};');\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4213.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arr = new BigInt64Array([39n]);\n\nvar result = arr.find(function() { return true; });\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4214.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar called = false; Promise.resolve('d').finally((v) => called = true);\n\nfunction __checkAsync() {\n    assert(called);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4234.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ntry {\n  1 < Symbol(1)\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Symbol(1) < 1\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  1n < Symbol(1)\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Symbol(1) < 1n\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4265.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    eval (\"export class Dog {constructor() {}}; for (var a\")\n} catch (e) {\n    assert (e instanceof SyntaxError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4341.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Shifting a negative bigint value with a big number to the right should be -1n. */\nassert((-1n >> (2n ** 32n)) === -1n);\nassert((-1n >> 2n) === -1n);\nassert((-1n >> (2n ** 1n)) === -1n);\nassert((-5n >> 3n) === -1n);\nassert((-5n >> 4n) === -1n);\nassert((-(2n ** 32n) >> (2n ** 31n)) === -1n);\nassert((-(2n ** 32n) >> (2n ** 32n)) === -1n);\nassert((-(2n ** 32n) >> (2n ** 33n)) === -1n);\nassert((-(2n ** 32n) >> (2n ** 33000n)) === -1n);\nassert((-(2n ** 32n) >> 32n) === -1n);\n\n/* (xn << -yn) ==> (xn >> yn) */\nassert((-1n << -(2n ** 32n)) === -1n);\nassert((-1n << -2n) === -1n);\nassert((-1n << -(2n ** 1n)) === -1n);\nassert((-5n << -3n) === -1n);\nassert((-5n << -4n) === -1n);\nassert((-(2n ** 32n) << -(2n ** 31n)) === -1n);\nassert((-(2n ** 32n) << -(2n ** 32n)) === -1n);\nassert((-(2n ** 32n) << -(2n ** 33n)) === -1n);\nassert((-(2n ** 32n) << -(2n ** 33000n)) === -1n);\n\n/* Partialy related tests. */\nassert((-(2n ** 32n) >> 31n) === -2n);\nassert((-(2n ** 32n) >> 30n) === -4n);\nassert((-(2n ** 32n) >> 29n) === -8n);\nassert((-(2n ** 32n) >> 28n) === -16n);\nassert((-(2n ** 32n) >> 16n) === -65536n);\nassert((-(2n ** 32n) >> 2n) === -1073741824n);\n\nassert((-5n >> 2n) === -2n);\nassert((-5n >> -4n) === -80n);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4375.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"1_\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4385.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('P`${*\\x10$');\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4396.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction demo() {\n}\n\nvar proxy = new Proxy(demo, {});\nvar weakset = new WeakSet();\n\n/* Internal: WeakSet adds an extra internal property to the proxy object. */\nweakset.add(proxy);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4397.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f () {\n  RegExp(\"[\\\\s-a]\", \"u\");\n}\n\nvar arr = new Float64Array();\nassert(arr.reduceRight(SyntaxError, f, 'RegExp(\"[\\\\s-a]\", \"u\"): ') === f);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4398.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar get = [];\nvar constructor = Function();\nconstructor[Symbol.species] = Object;\nvar p = new Proxy({ constructor: constructor, flags: '', exec: function() { return null; } }, { set: function (x) { this.set = x === 42; } });\n\ntry {\n  RegExp.prototype[Symbol.split].call(p, 7996);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4402.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar p = new Proxy(Function(), { get: function closure() { eval(\"o.p.y\"); delete closure; return closure == arguments.callee && !(new String(undefined)); }});\n\ntry {\n  Function.prototype.bind.call(p);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4405.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arr = [1];\n\nvar ta = new Int8Array(arr);\nObject.setPrototypeOf(arr, ta);\narr[1] = 2;\n\ntry {\n  ta = new Int8Array(arr);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4408.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('/(?<=^abc)def/');\n} catch(e) {\n  assert(e instanceof SyntaxError);\n}\n\ntry {\n  eval('/(?a)/;')\n} catch(e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4413.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((new (class C2 { x = 5 })).x === 5);\nassert((new (class C2 { x = {} + {} })).x === \"[object Object][object Object]\");\nassert((new (class C2 { [\"foo\"] = 5; x = {} + {} })).foo === 5);\nassert((new (class C2 { [\"foo\"] = 5; x = 6 })).foo === 5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4432.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f(x,x,x) {\n  return arguments[1];\n}\n\nassert(f(1) === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4440.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar handler = {\n  get: function(target, key) {\n    assert(typeof(target) === 'function');\n    assert(key === 'dummy');\n    return 42;\n  }\n};\n\ntry {\n  throw new Proxy(Function(), handler);\n  assert(false);\n} catch (ex) {\n  /* 'ex' is the Proxy */\n  assert(typeof(ex) === 'function');\n  assert(ex.dummy === 42);\n}\n\ntry {\n  throw new Proxy(EvalError(), { });\n} catch (ex) {\n  assert(ex instanceof EvalError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4441.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar get = [];\nvar constructor = Function();\nconstructor[Symbol.species] = Object;\nvar p = new Proxy({ constructor: constructor, flags: '', exec: function() { return /\\ua796/iu; } }, { defineProperty: function(o, k) { get.push(k); return o[k]; }});\n\ntry {\n  RegExp.prototype[Symbol.split].call(p, 7996);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4442.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('0x1_');\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4445.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Keeping test as it is due to the fact this was triggered via a gc related issue\n\nvar a= [\"\", \"\\0\", \"\\t\", \"\\n\", \"\\v\", \"\\f\", \"\\r\", \" \", \"\\u00a0\", \"\\u2028\", \"\\u2029\", \"\\ufeff\"]\nArray.prototype[4] = 10;\n\nfunction Test()\n{\n  a.sort(function() {\n    var A = function() { };\n    A.prototype.x = 42;\n    var o = new Proxy({\n        \"3\": {\n          writable:false,\n          value:20\n        }\n      }, /*handler*/ {\n        getPrototypeOf: function (val, size, ch) {\n          var result = new String(val);\n          if (ch == null) {\n            ch = \" \";\n          }\n          while (result.length < size) {\n            result = ch + result;\n          }\n          return result;\n        }\n      }\n    );\n\n    o.x = 43;\n    var result = \"\";\n    for (var p in o) {\n        result += o[p];\n    }\n    return a | 0;\n  });\n\n  throw new EvalError(\"error\");\n}\n\ntry {\n  Test();\n  assert(false);\n} catch (ex) {\n  assert (ex instanceof EvalError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4446.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass Base {\n  constructor() {\n      return new Proxy(this, {\n          defineProperty(target, p, desc) {\n              return Reflect.defineProperty(target, p, desc);\n          }\n      });\n  }\n}\n\nlet computedKey = \"test\";\nclass BasicTPK extends Base {\n  [computedKey] = \"basic\";\n}\n\nlet instance = new BasicTPK;\nassert(instance instanceof BasicTPK);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4463.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction Test262Error(message) {\n  this.message = message || \"\";\n}\n\nTest262Error.prototype.toString = function () {\n  return \"Test262Error: \" + this.message;\n};\n\nvar newTarget = function () {}.bind(null);\nObject.defineProperty(newTarget, \"prototype\", {\n  get() {\n    throw new Test262Error();\n  },\n});\n\nvar typedArrayConstructors = [\n  Float64Array,\n  Float32Array,\n  Int32Array,\n  Int16Array,\n  Int8Array,\n  Uint32Array,\n  Uint16Array,\n  Uint8Array,\n  Uint8ClampedArray,\n];\n\nfor (var type of typedArrayConstructors) {\n  try {\n    Reflect.construct(Uint8ClampedArray, [], newTarget);\n  } catch (error) {\n    if (!(error instanceof Test262Error)) {\n      throw \"error must be instanceof Test262Error\";\n    }\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4464.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = [3.3, 2.2, 1];\n\ntry {\na.sort(function() {\n    var o = new Proxy({\n        get foo() {\n            return eval(\"function\");\n        },\n        set foo(arg) {\n            return s2 = s3\n        }\n    }, {\n        has: true,\n        get: function() {\n            a = true;\n            return 30;\n        }\n    });\n    o.x = 43;\n    var result = \"\";\n    for (var p in o)\n        result += o[p];\n});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4466.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar called_get = false;\nvar targetProxy = new Proxy({}, {\n  getOwnPropertyDescriptor: function(target, key) {\n    throw new URIError(\"Generate error\");\n  }\n});\n\nvar px = new Proxy(targetProxy, {\n  get: function(target, key) {\n    called_get = true;\n    return { debug: 1 };\n  }\n});\n\ntry {\n  px.abc;\n  assert(false);\n} catch (ex) {\n  assert(ex instanceof URIError);\n  assert(called_get === true);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4468.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = 'for (let i=0; i<(eval(\"1; function x() { }; 2;\")); x - i++) { x += delete x;}'\n\nassert(eval(str) === 'function(){/* ecmascript */}true');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-4469.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction assertArrayEquals(array1, array2) {\n  if (array1.length !== array2.length) {\n    return false;\n  }\n\n  for (var i = 0; i < array1.length; i++) {\n    if (array1[i] !== array2[i]) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction tag(site){\n  return site;\n}\n\nvar site1 = eval(\"tag`Cocoa`\");\nvar site3 = eval(\"tag`Cocoa`\");\n\nassertArrayEquals(site1, site3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-612.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  RegExp.prototype.compile([]);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/regression-test-issue-782.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  String.prototype.search(RegExp.prototype);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/restricted-properties.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction must_throw (str) {\n  try {\n    eval (\"switch (1) { default: \" + str + \"}\");\n    assert (false);\n  }\n  catch (e) {\n  }\n\n  try {\n    eval (str);\n    assert (false);\n  }\n  catch (e) {\n  }\n}\n\n// strict functions created using the Function constructor\nvar strictF = new Function('\"use strict\"');\n\nassert(strictF.hasOwnProperty('caller') === false);\nassert(strictF.hasOwnProperty('arguments') === false);\n\nmust_throw(\"strictF.caller\")\nmust_throw(\"strictF.arguments\")\nmust_throw(\"strictF.caller = 1\")\nmust_throw(\"strictF.arguments = 2\")\n\n// generator functions created using the Generator constructor\nvar GeneratorFunction = Object.getPrototypeOf(function*(){}).constructor\nvar generatorF = new GeneratorFunction()\n\nassert(generatorF.hasOwnProperty('caller') === false);\nassert(generatorF.hasOwnProperty('arguments') === false);\n\nmust_throw(\"generatorF.caller\")\nmust_throw(\"generatorF.arguments\")\nmust_throw(\"generatorF.caller = 1\")\nmust_throw(\"generatorF.arguments = 2\")\n\n// async functions created using the AsyncFunction constructor\nasync function asyncF() {}\n\nassert(asyncF.hasOwnProperty('caller') === false);\nassert(asyncF.hasOwnProperty('arguments') === false);\n\nmust_throw(\"asyncF.caller\")\nmust_throw(\"asyncF.arguments\")\nmust_throw(\"asyncF.caller = 1\")\nmust_throw(\"asyncF.arguments = 2\")\n\n// functions created using the bind method\nvar f = function () {};\nvar boundF = f.bind();\n\nassert(boundF.hasOwnProperty('caller') === false);\nassert(boundF.hasOwnProperty('arguments') === false);\n\nmust_throw(\"boundF.caller\")\nmust_throw(\"boundF.arguments\")\nmust_throw(\"boundF.caller = 1\")\nmust_throw(\"boundF.arguments = 2\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/set-iterators.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar methods = ['entries', 'keys', 'values', Symbol.iterator];\n\nmethods.forEach(function (method) {\n  try {\n    Set.prototype[method].call(5);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\nmethods.forEach(function (method) {\n  try {\n    Set.prototype[method].call({});\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\nvar s = new Set([0, 1, 2, 3, 4, 5, 6]);\n\nmethods.forEach(function(method) {\n  assert(s[method]().toString() === '[object Set Iterator]');\n});\n\nmethods.forEach(function (method) {\n  try {\n    s[method].next.call(5);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\nmethods.forEach(function (method) {\n  try {\n    s[method].next.call({});\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\nvar setFromSet = new Set(s);\nassert(setFromSet.size === 7);\n\nvar iterators = [s.keys(), s.values(), s[Symbol.iterator]()];\nvar entryIterator = s.entries();\nvar elementCount = s.size;\n\nfor (var i = 0; i < elementCount; i++) {\n  iterators.forEach(function(element) {\n    var next = element.next();\n    assert(next.done === false);\n    assert(next.value === i);\n  });\n\n  var next = entryIterator.next();\n  assert(next.done === false);\n  assert(next.value[0] === i);\n  assert(next.value[1] === i);\n}\n\niterators.forEach(function(element) {\n    var next = element.next();\n    assert(next.done === true);\n    assert(next.value === undefined);\n  });\n\nvar next = entryIterator.next();\nassert(next.done === true);\nassert(next.value === undefined);\n\n\niterators = [s.keys(), s.values(), s[Symbol.iterator]()];\nentryIterator = s.entries();\nvar elementCount = s.size;\n\nfor (var i = 0; i < elementCount; i++) {\n  iterators.forEach(function(element) {\n    var next = element.next();\n    assert(next.done === false);\n    assert(next.value === i);\n  });\n\n  var next = entryIterator.next();\n  assert(next.done === false);\n  assert(next.value[0] === i);\n  assert(next.value[1] === i);\n  s.delete(i);\n}\n\nassert(s.size === 0);\n\ns = new Set ([0, 1]);\nvar expected = [0, 1, 2, 4, 5, 6, 3];\nvar loopCount = 0;\n\ns.forEach(function(element) {\n  if (loopCount === 0) {\n    for (var i = 0; i < expected.length ; i++) {\n      s.add(i);\n    }\n    s.delete(3);\n    s.add(3);\n  }\n  assert(element === expected[loopCount++]);\n});\n\nassert(loopCount === expected.length);\n\ns = new Set([0, 1, 2, 3, 4, 5, 6]);\nexpected = [0, 1];\nloopCount = 0;\n\nfor (var value of s) {\n  if (loopCount === 0) {\n    s.clear();\n    s.add(1);\n  }\n\n  assert(value === expected[loopCount++]);\n}\n\ns = new Set([0])\nexpected = [0, 1];\nloopCount = 0;\n\nfor (var value of s) {\n  if (loopCount === 0) {\n    s.add(2);\n    s.delete(2);\n    s.add(3);\n    s.delete(3);\n    s.add(1);\n  }\n\n  assert(value === expected[loopCount++]);\n}\n\nassert(Set.prototype.values === Set.prototype.keys);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/set.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar set = new Set();\nvar int = 1;\nassert (set.size === 0);\nassert (set.add (int) === set);\nassert (set.has (int));\nassert (set.size === 1);\n\nvar str = \"foobar\"\nassert (set.add (str) === set);\nassert (set.has (str));\nassert (set.size === 2);\n\nvar number = 5.78;\nassert (set.add (number) === set);\nassert (set.has (number));\nassert (set.size === 3);\n\nvar object = { a : 2, b : 4};\nassert (set.add (object) === set);\nassert (set.has (object));\nassert (set.size === 4);\n\nvar func = function () {};\nassert (set.add (func) === set);\nassert (set.has (func));\nassert (set.size === 5);\n\nvar symbol = Symbol (\"foo\");\nassert (set.add (symbol) === set);\nassert (set.has (symbol));\nassert (set.size === 6);\n\nassert (!set.has(5));\nassert (!set.has(\"foo\"));\nassert (!set.has({ a : 2, b : 4}));\nassert (!set.has(function () {}));\nassert (!set.has(Symbol (\"foo\")));\n\nvar elements = [int, str, number, object, func, symbol];\n\nvar i = 0;\nset.forEach (function (value, key) {\n  assert (key === elements[i]);\n  assert (value === elements[i]);\n  i++;\n});\n\nassert (set.delete (int));\nassert (set.size === 5);\nassert (set.delete (str));\nassert (set.size === 4);\nassert (set.delete (number));\nassert (set.size === 3);\nassert (set.delete (object));\nassert (set.size === 2);\nassert (set.delete (func));\nassert (set.size === 1);\nassert (set.delete (symbol));\nassert (set.size === 0);\n\nset = new Set([1, 2, 3, 4]);\nassert (set.has(1));\nassert (set.has(2));\nassert (set.has(3));\nassert (set.has(4));\n\nassert (set.size === 4);\nassert (set.add (2) === set);\nassert (set.size === 4);\nassert (set.delete (2));\nassert (set.size === 3);\n\nset.clear();\nassert(set.size === 0);\n\nset.add(3);\nassert(set.delete(3));\nassert(!set.delete(3));\n\nfunction createIterable(arr, methods = {}) {\n  let iterable = function *() {\n    let idx = 0;\n    while (idx < arr.length) {\n      yield arr[idx];\n      idx++;\n    }\n  }();\n  iterable['return'] = methods['return'];\n  iterable['throw'] = methods['throw'];\n\n  return iterable;\n};\n\nvar closed = false;\nvar iter = createIterable([1, 2, 3], {\n  'return': function(){ closed = true; return {}; }\n});\nvar add = Set.prototype.add;\nSet.prototype.add = function(){ throw 0 };\ntry {\n  new Set(iter);\n} catch(e){}\nSet.prototype.add = add;\n\nassert(closed === true);\n\n/* Test third argument of callback */\nvar s = new Set([1, 2, 3]);\n\ns.forEach(function(value, key, thisArg) {\n  assert (typeof thisArg === \"object\");\n  assert(thisArg === s);\n});\n\nvar set = new Set();\nset.add(-0);\nvar k;\nset.forEach(function (value) {\n  k = 1 / value;\n});\n\nassert(k === Infinity);\nassert(set.has(+0) === true);\n\n[Symbol.iterator, Symbol.toStringTag].forEach(e => assert (Reflect.ownKeys(Set.prototype).includes(e)));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-fromcodepoint.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Tests with valid inputs\nassert(String.fromCodePoint(42) === \"*\")\nassert(String.fromCodePoint(65, 90) === \"AZ\");\nassert(String.fromCodePoint(0x404) === \"Є\");\nassert(String.fromCodePoint(194564) === \"你\");\nassert(String.fromCodePoint(0x1D306, 0x61, 0x1D307) === \"𝌆a𝌇\");\nassert(String.fromCodePoint(0x1F303) === \"🌃\");\n\n// Tests with invalid inputs\ntry {\n    assert(String.fromCodePoint('_'));\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError);\n}\n\ntry {\n    assert(String.fromCodePoint(Infinity));\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError);\n}\n\ntry {\n    assert(String.fromCodePoint(-1));\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError);\n}\n\ntry {\n    assert(String.fromCodePoint(3.14));\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError);\n}\n\ntry {\n    assert(String.fromCodePoint(3e-2));\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError);\n}\n\ntry {\n    assert(String.fromCodePoint(NaN));\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-iterator.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  String.prototype[Symbol.iterator].call(undefined);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  String.prototype[Symbol.iterator].call(Symbol('foo'));\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar str = 'foobar';\nvar iterator = str[Symbol.iterator]();\n\ntry {\n  iterator.next.call(5);\n  assert (false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  iterator.next.call({});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar str = 'Example string.';\nvar expected = ['E', 'x', 'a', 'm', 'p', 'l', 'e', ' ', 's', 't', 'r', 'i', 'n', 'g', '.'];\n\nvar iterator = str[Symbol.iterator]();\nvar next = iterator.next();\nvar idx = 0;\n\nwhile (!next.done) {\n  assert(next.value === expected[idx++]);\n  assert(next.done === false);\n  next = iterator.next();\n}\n\nassert(next.value === undefined);\n\nvar str = '^o𓙦һR񼴆]ŭ媖?᯾豼עW򏋁';\nvar expected = ['^', 'o', '𓙦', 'һ', 'R', '񼴆', ']', 'ŭ', '媖', '?', '᯾', '豼', 'ע', 'W', '򏋁'];\n\niterator = str[Symbol.iterator]();\nnext = iterator.next();\nidx = 0;\n\nwhile (!next.done) {\n  assert(next.value === expected[idx++]);\n  assert(next.done === false);\n  next = iterator.next();\n}\n\nassert(next.value === undefined);\n\nassert(iterator.toString() === '[object String Iterator]');\nassert(iterator[Symbol.toStringTag] === 'String Iterator');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-codepointat.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = \"A🌃B\\uD800\";\nvar obj = {};\n\n// Test with normal inputs\nassert(str.codePointAt(0) === 65);\nassert(str.codePointAt(1) === 127747);\nassert(str.codePointAt(2) === 57091);\nassert(str.codePointAt(3) === 66);\nassert(str.codePointAt(4) === 55296);\n\n// Test with string\nassert(str.codePointAt(\"a\") === 65);\nassert(str.codePointAt(\"B\") === 65);\n\n// Test with object\nassert(str.codePointAt(obj) === 65);\n\n// Test with NaN\nassert(str.codePointAt(NaN) === 65);\n\n// Test when the input >= length\nassert(str.codePointAt(5) === undefined);\nassert(str.codePointAt(10) === undefined);\n\n// Test witn negative\nassert(str.codePointAt(-1) === undefined);\nassert(str.codePointAt(-5) === undefined);\nassert(str.codePointAt(-0) === 65);\n\n// Test with undefined and +/- Infinity\nassert(str.codePointAt(undefined) === 65);\nassert(str.codePointAt(Infinity) === undefined);\nassert(str.codePointAt(-Infinity) === undefined);\n\n// Test with boolean\nassert(str.codePointAt(true) === 127747);\nassert(str.codePointAt(false) === 65);\n\n// Test when input > UINT32_MAX\nassert(str.codePointAt(4294967299) === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-endswith.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar x = \"Dancer of the Boreal Valley\";\nassert (x.endsWith (\"Valley\"));\nassert (x.endsWith (\"Boreal\", 20));\nassert (x.endsWith (\"Dancer\", 6));\nassert (x.endsWith (\"\"));\nassert (x.endsWith ([]));\n\nvar y = \"Lalafell\";\nassert (y.endsWith (\"Lala\") === false);\nassert (y.endsWith (\"fell\", 2) === false);\nassert (y.endsWith (\"Final\", \"Fantasy\") === false);\nassert (y.endsWith (\"Hydaelyn\", 30) === false);\nassert (y.endsWith (undefined) === false);\n\nassert(String.prototype.endsWith.call (5) === false);\n\nvar test_obj = {toString: function() { return \"A realm reborn\"; } };\ntest_obj.endsWith = String.prototype.endsWith;\nassert (test_obj.endsWith (\"reborn\") === true);\nassert (test_obj.endsWith (\"realm\") === false);\n\ntry {\n  String.prototype.endsWith.call (Symbol());\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  String.prototype.endsWith.call (undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  String.prototype.endsWith.call (null);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar z = /[/]/;\ntry {\n  y.endsWith (z);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nz[Symbol.match] = false;\nassert(y.endsWith(z) === false);\n\ntry {\n  \"foo\".endsWith({[Symbol.match] : true});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".endsWith({get [Symbol.match] () { throw 5}});\n  assert(false);\n} catch (e) {\n  assert(e === 5);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-includes.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar x = \"Good King Moggle Mog XII\";\nassert (x.includes (\"Moggle\"));\nassert (x.includes (\"Moggle Mog\", 3));\nassert (x.includes (\"\"));\nassert (x.includes ([]));\n\nvar y = \"Nidhogg's Rage\";\nassert (y.includes (\"Dragon\") === false);\nassert (y.includes (\"Rage\", 11) === false);\nassert (y.includes (\"Final\", \"Fantasy\") === false);\nassert (y.includes (\"Hydaelyn\", 30) === false);\nassert (y.includes (undefined) === false);\n\nassert(String.prototype.includes.call (5) === false);\n\nvar test_obj = {toString: function() { return \"The world of Eorzea\"; } };\ntest_obj.includes = String.prototype.includes;\nassert (test_obj.includes (\"Eorzea\") === true);\nassert (test_obj.includes (\"Viera\") === false);\n\ntry {\n  String.prototype.includes.call (Symbol());\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  String.prototype.includes.call (undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  String.prototype.includes.call (null);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar z = /[/]/;\ntry {\n  y.includes (z);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nz[Symbol.match] = false;\nassert(y.includes(z) === false);\n\ntry {\n  \"foo\".includes({[Symbol.match] : true});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".includes({get [Symbol.match] () { throw 5}});\n  assert(false);\n} catch (e) {\n  assert(e === 5);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-match-all.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(String.prototype.matchAll.length === 1);\nvar desc = Object.getOwnPropertyDescriptor(String.prototype.matchAll, \"length\");\nassert(!desc.enumerable);\nassert(!desc.writable);\nassert(desc.configurable);\n\nassert(String.prototype.matchAll.name === \"matchAll\");\nvar desc = Object.getOwnPropertyDescriptor(String.prototype.matchAll, \"name\");\nassert(!desc.enumerable);\nassert(!desc.writable);\nassert(desc.configurable);\n\n// test basic functionality\nvar re = /[0-9]+/g;\nvar str = '2016-01-02|2019-03-07';\nvar result = str.matchAll(re);\nvar result_array = Array.from(result, x => x[0]);\nassert(result_array.toString() === \"2016,01,02,2019,03,07\");\n\nvar counter = 0;\nvar obj = {};\nRegExp.prototype[Symbol.matchAll] = function() {\n  counter++;\n  return obj;\n};\n\nassert('a'.matchAll(null) === obj);\nassert(counter === 1);\n\nassert(''.matchAll(undefined) === obj);\nassert(counter === 2) ;\n\nvar obj = {};\nvar retval = {};\nvar counter = 0;\nvar thisVal, args;\n\nobj[Symbol.matchAll] = function () {\n    counter++;\n  thisVal = this;\n  args = arguments;\n  return retval;\n};\n\nvar str = ''\n\nassert(str.matchAll(obj) === retval);\nassert(counter === 1);\nassert(thisVal === obj);\nassert(args !== undefined);\nassert(args.length === 1);\nassert(args[0] === str);\n\n// throw error when flag is not global\ntry {\n  \"foo\".matchAll(/a/);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".matchAll(/a/i);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".matchAll(/a/m);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".matchAll(/a/u);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".matchAll(/a/u);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".matchAll(/a/y);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar regexp = /a/;\nObject.defineProperty(regexp, 'flags', {\n  value: 'muyi'\n});\n\ntry {\n  \"foo\".matchAll(regexp);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when flags value is undefined\nvar regexp = /a/g;\nObject.defineProperty(regexp, 'flags', { value: undefined });\n\ntry {\n  \"foo\".matchAll(regexp)\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when match Symbol throws error\nvar regexp = /[A-Z]/g;\nObject.defineProperty (regexp, Symbol.match, { get () { throw 42; }});\n\ntry {\n  \"foo\".matchAll(regexp);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when flags throws error\nvar regexp = /a/g;\nObject.defineProperty(regexp, 'flags', { get () { throw 42; }});\n\ntry {\n  \"foo\".matchAll(regexp);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\n// test when flags value is symbol\nvar regexp = /a/g;\nvar sym = Symbol(\"foo\")\nObject.defineProperty(regexp, 'flags', { value: sym });\n\ntry {\n  \"foo\".matchAll(regexp);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when matchAll Symbol throws error\nvar regexp = /[A-Z]/g;\nObject.defineProperty (regexp, Symbol.matchAll, { get () { throw 42; }});\n\ntry {\n  \"foo\".matchAll(regexp);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-match.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass NewRegExp extends RegExp {\n    [Symbol.match](str) {\n        var result = RegExp.prototype[Symbol.match].call(this, str);\n        var successful = 0;\n        if (result) {\n            successful = 1;\n        }\n        return successful;\n    }\n}\n\nvar str = 'This is a random string.';\nvar regexp = new NewRegExp(/[A-Z]/g);\nassert(str.match(regexp) === 1);\n\ntry {\n  String.prototype.match.call(null, regexp);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar regexp2 = /[A-Z]/g;\nregexp2[Symbol.match] = \"foo\";\n\ntry {\n  str.match(regexp2);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nObject.defineProperty (regexp2, Symbol.match, { get () { throw 5 }});\n\ntry {\n  str.match(regexp2);\n  assert(false);\n} catch (e) {\n  assert(e === 5); \n}\n\nvar wrong_sytnax = \"str.match(/[A-5]/g\";\n\ntry {\n  eval(wrong_sytnax);\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\ndelete(RegExp.prototype[Symbol.match]);\n\ntry {\n  str.match(regexp);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar regexp3 = \"foo\";\nRegExp.prototype[Symbol.match] = 3;\n\ntry {\n  str.match(regexp3);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-padding.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar test = \"bar\"\n\nassert(test.padStart(\"5\", \"foo\") === \"fobar\")\nassert(test.padStart(6, \"foo\") === \"foobar\")\nassert(test.padStart(8, '1234')=== \"12341bar\")\nassert(test.padEnd(5, \"baz\") === \"barba\")\nassert(test.padEnd(6, \"baz\") === \"barbaz\")\nassert(test.padEnd(8, '1234')=== \"bar12341\")\n\n// Check for negative value\nassert(test.padStart(-5, \"foo\") === \"bar\")\nassert(test.padEnd(-5, \"foo\") === \"bar\")\n\n// 21.1.3.15.1.6\nassert(test.padStart(10) === \"       bar\")\nassert(test.padEnd(10) === \"bar       \")\n\n// Empty FilString\nassert(test.padEnd(10, \"\") === \"bar\")\nassert(test.padStart(10, \"\") === \"bar\")\n\n// Check with unicode surrogate characters\n// 𐋀 = [55296, 57024]\nvar unicode_padded = \"a\".padStart(4 ,\"𐋀\")\nassert(unicode_padded.charCodeAt(0) == 55296)\nassert(unicode_padded.charCodeAt(1) == 57024)\nassert(unicode_padded.charCodeAt(2) == 55296)\nassert(unicode_padded.charCodeAt(3) == 97)\n\nunicode_padded = \"a\".padEnd(4 ,\"𐋀\")\nassert(unicode_padded.charCodeAt(0) == 97)\nassert(unicode_padded.charCodeAt(1) == 55296)\nassert(unicode_padded.charCodeAt(2) == 57024)\nassert(unicode_padded.charCodeAt(3) == 55296)\n\n// 𐋂 = [55296, 57026]\nunicode_padded = \"𐋂\".padStart(4 ,\"𐋀\")\nassert(unicode_padded.charCodeAt(0) == 55296)\nassert(unicode_padded.charCodeAt(1) == 57024)\nassert(unicode_padded.charCodeAt(2) == 55296)\nassert(unicode_padded.charCodeAt(3) == 57026)\n\n// Check for errors in length\ntry {\n  test.padStart(Symbol(\"Will this fail?\"), \"It should\" )\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\ntry {\n  test.padEnd(Symbol(\"Will this fail?\"), \"It should\" )\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n// Check for errors in fillString\ntry {\n  test.padStart(10, Symbol(\"Fail, this should. \" ))\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\ntry {\n  test.padEnd(10, Symbol(\"Fail, this should. \" ))\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-repeat.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// ES v6.0 21.1.3.13.6\nvar z = \"I am vengeance\";\ntry {\n  z.repeat (-1);\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\n// ES v6.0 21.1.3.13.7\nvar x = \"I am the night\";\ntry {\n  print(z.repeat (Infinity));\n  assert (false);\n} catch (e) {\n  assert (e instanceof RangeError);\n}\n\n// ES v6.0 21.1.3.13.8\nassert (z.repeat (0) === \"\");\nassert (z.repeat (NaN) === \"\");\n\nvar y = \"I am batman \";\nassert (y.repeat (3) === \"I am batman I am batman I am batman \");\n\nassert (String.prototype.repeat.call (\"My cat is awesome. \", 3) === \"My cat is awesome. My cat is awesome. My cat is awesome. \");\n\ntry {\n  String.prototype.repeat.call (undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  String.prototype.repeat.call (null);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  String.prototype.repeat.call (undefined, \"Sylveon\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar a = Symbol (\"Unicorn invasion.\", 3);\ntry {\n  String.prototype.repeat.call (a);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-replace-all.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyright (C) 2019 Leo Balter. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n\nassert(String.prototype.replaceAll.length === 2);\nvar desc = Object.getOwnPropertyDescriptor(String.prototype.replaceAll, \"length\");\nassert(!desc.enumerable);\nassert(!desc.writable);\nassert(desc.configurable);\n\nassert(String.prototype.replaceAll.name === \"replaceAll\");\nvar desc = Object.getOwnPropertyDescriptor(String.prototype.replaceAll, \"name\");\nassert(!desc.enumerable);\nassert(!desc.writable);\nassert(desc.configurable);\n\n/**\n * Note: The RegExp based replaceAll works the same as the replace method except one special case,\n * when the regexp argument doesn't have a global flag, because then it throws an error\n */\n\ntry {\n  \"foo\".replaceAll(/./);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".replaceAll(/./i);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".replaceAll(/./m);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".replaceAll(/./u);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".replaceAll(/./y);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar regexp = /a/;\nObject.defineProperty(regexp, 'flags', {\n  value: 'muyi'\n});\n\ntry {\n  \"foo\".replaceAll(regexp);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nvar regexp = /a/g;\nObject.defineProperty(regexp, 'flags', { value: undefined });\n\ntry {\n  \"foo\".replaceAll(regexp);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test basic functionality\nvar str = \"foobarfoo\";\nassert(str.replaceAll(\"foo\", \"bar\") === \"barbarbar\");\n\nvar str = \"ab c ab cdab cab c\"\nassert(str.replaceAll(\"ab c\", \"z\") === \"z zdzz\");\n\nvar str = \"ab c\"\nassert(str.replaceAll(\"ab c\", \"z\") === \"z\");\n\nvar str = \"ab c \"\nassert(str.replaceAll(\"ab c\", \"z\") === \"z \");\n\nassert('aaab a a aac'.replaceAll('aa', 'z') === 'zab a a zc');\nassert('aaab a a aac'.replaceAll('aa', 'a') === 'aab a a ac');\nassert('aaab a a aac'.replaceAll('a', 'a') === 'aaab a a aac');\nassert('aaab a a aac'.replaceAll('a', 'z') === 'zzzb z z zzc');\n\nfunction replaceValue() {\n  throw 42;\n}\n\nassert('a'.replaceAll('b', replaceValue) === \"a\");\nassert('a'.replaceAll('aa', replaceValue) === \"a\")\n\nassert('aab c  \\nx'.replaceAll('', '_') === '_a_a_b_ _c_ _ _\\n_x_');\nassert('a'.replaceAll('', '_') === '_a_');\n\n// test with replacement string\nvar str = 'Ninguém é igual a ninguém. Todo o ser humano é um estranho ímpar.';\nassert(str.replaceAll('ninguém', '$$') ==='Ninguém é igual a $. Todo o ser humano é um estranho ímpar.');\nassert(str.replaceAll('é', '$$') === 'Ningu$m $ igual a ningu$m. Todo o ser humano $ um estranho ímpar.');\nassert(str.replaceAll('é', '$$ -') === 'Ningu$ -m $ - igual a ningu$ -m. Todo o ser humano $ - um estranho ímpar.');\nassert(str.replaceAll('é', '$$&') === 'Ningu$&m $& igual a ningu$&m. Todo o ser humano $& um estranho ímpar.');\nassert(str.replaceAll('é', '$$$') === 'Ningu$$m $$ igual a ningu$$m. Todo o ser humano $$ um estranho ímpar.');\nassert(str.replaceAll('é', '$$$$') === 'Ningu$$m $$ igual a ningu$$m. Todo o ser humano $$ um estranho ímpar.');\n\nassert(str.replaceAll('ninguém', '$&') === 'Ninguém é igual a ninguém. Todo o ser humano é um estranho ímpar.');\nassert(str.replaceAll('ninguém', '($&)') === 'Ninguém é igual a (ninguém). Todo o ser humano é um estranho ímpar.');\nassert(str.replaceAll('é', '($&)') === 'Ningu(é)m (é) igual a ningu(é)m. Todo o ser humano (é) um estranho ímpar.');\nassert(str.replaceAll('é', '($&) $&') === 'Ningu(é) ém (é) é igual a ningu(é) ém. Todo o ser humano (é) é um estranho ímpar.');\n\nassert(str.replaceAll('ninguém', '$\\'') === 'Ninguém é igual a . Todo o ser humano é um estranho ímpar.. Todo o ser humano é um estranho ímpar.');\nassert(str.replaceAll('.', '--- $\\'') === 'Ninguém é igual a ninguém---  Todo o ser humano é um estranho ímpar. Todo o ser humano é um estranho ímpar--- ');\nassert(str.replaceAll('é', '($\\')') === 'Ningu(m é igual a ninguém. Todo o ser humano é um estranho ímpar.)m ( igual a ninguém. Todo o ser humano é um estranho ímpar.) igual a ningu(m. Todo o ser humano é um estranho ímpar.)m. Todo o ser humano ( um estranho ímpar.) um estranho ímpar.');\nassert(str.replaceAll('é', '($\\') $\\'') === 'Ningu(m é igual a ninguém. Todo o ser humano é um estranho ímpar.) m é igual a ninguém. Todo o ser humano é um estranho ímpar.m ( igual a ninguém. Todo o ser humano é um estranho ímpar.)  igual a ninguém. Todo o ser humano é um estranho ímpar. igual a ningu(m. Todo o ser humano é um estranho ímpar.) m. Todo o ser humano é um estranho ímpar.m. Todo o ser humano ( um estranho ímpar.)  um estranho ímpar. um estranho ímpar.');\n\nassert(str.replaceAll('ninguém', '$`') === 'Ninguém é igual a Ninguém é igual a . Todo o ser humano é um estranho ímpar.');\nassert(str.replaceAll('Ninguém', '$`') === ' é igual a ninguém. Todo o ser humano é um estranho ímpar.');\nassert(str.replaceAll('ninguém', '($`)') === 'Ninguém é igual a (Ninguém é igual a ). Todo o ser humano é um estranho ímpar.');\nassert(str.replaceAll('é', '($`)') === 'Ningu(Ningu)m (Ninguém ) igual a ningu(Ninguém é igual a ningu)m. Todo o ser humano (Ninguém é igual a ninguém. Todo o ser humano ) um estranho ímpar.');\nassert(str.replaceAll('é', '($`) $`') === 'Ningu(Ningu) Ningum (Ninguém ) Ninguém  igual a ningu(Ninguém é igual a ningu) Ninguém é igual a ningum. Todo o ser humano (Ninguém é igual a ninguém. Todo o ser humano ) Ninguém é igual a ninguém. Todo o ser humano  um estranho ímpar.');\n\n// test when functional replacer toString throws error\nfunction custom() {\n  return {\n    toString() {\n      throw 42;\n    }\n  }\n}\n\ntry {\n  'a'.replaceAll('a', custom);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\nfunction symbol() {\n  return {\n    toString() {\n      return Symbol();\n    }\n  }\n}\n  \ntry {\n  'a'.replaceAll('a', symbol);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// test when functional replacer Symbol.replace throws error\nvar poisoned = 0;\nvar poison = {\n  toString() {\n    poisoned += 1;\n    throw 'Should not call toString on this/replaceValue';\n  },\n};\n\nvar searchValue = {\n  [Symbol.match]: false,\n  flags: 'g',\n  [Symbol.replace]() {\n    throw 42;\n  },\n  toString() {\n    throw 'Should not call toString on searchValue';\n  }\n};\n\ntry {\n  ''.replaceAll.call(poison, searchValue, poison);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n\nassert(poisoned === 0);\n\n// test when flags value is undefined or null\nvar poisoned = 0;\nvar poison = {\n  toString() {\n    poisoned += 1;\n    throw 'Should not call toString on this/replaceValue';\n  },\n};\n\nvar called = 0;\nvar value = undefined;\nvar searchValue = {\n  [Symbol.match]: true,\n  get flags() {\n    called += 1;\n    return value;\n  }\n};\n\ntry {\n  ''.replaceAll.call(poison, searchValue, poison);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(called === 1) // 1);\n\ncalled = 0;\nvalue = null;\n\ntry {\n  ''.replaceAll.call(poison, searchValue, poison);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(called === 1);\nassert(poisoned === 0);\n\n// test when Symbol.match throws error\nvar searchValue = {\n  get [Symbol.match]() {\n    throw 42;\n  }\n};\n\ntry {\n  ''.replaceAll.call(poison, searchValue, poison);\n  assert(false);\n} catch (e) {\n  assert(e === 42);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-split.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = \"foo//bar/baz//foo\";\nres = str.split(\"a\", Infinity);\nassert (res.length === 0);\n\nres = str.split(/\\/\\//, -1);\nassert (res.length === 3);\nassert (res[0] === \"foo\");\nassert (res[1] === \"bar/baz\");\nassert (res[2] === \"foo\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-startswith.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar x = \"My cat is awesome\";\nassert (x.startsWith (\"My\"));\nassert (x.startsWith (\"cat\", 3));\nassert (x.startsWith (\"awesome\", 10));\nassert (x.startsWith (\"\"));\nassert (x.startsWith (\"\", 1));\nassert (x.startsWith (\"\", 17));\nassert (x.startsWith ([]));\n\nassert (x.startsWith (\"doggo\") === false);\nassert (x.startsWith (\"awesome\", 2) === false);\nassert (x.startsWith (\"awesome\", \"oi\") === false);\nassert (x.startsWith (\"kitten\", 30) === false);\nassert (x.startsWith (undefined) === false);\nassert(String.prototype.startsWith.call (5) === false);\n\nvar test_obj = {toString: function() { return \"The world of Eorzea\"; } };\ntest_obj.startsWith = String.prototype.startsWith;\nassert (test_obj.startsWith (\"The\") === true);\nassert (test_obj.startsWith (\"Viera\") === false);\n\ntry {\n  String.prototype.startsWith.call (Symbol());\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  String.prototype.startsWith.call (undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ny = /[/]/;\ntry {\n  x.startsWith (y);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ny[Symbol.match] = false;\nassert(x.startsWith(y) === false);\n\ntry {\n  \"foo\".startsWith({[Symbol.match] : true});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  \"foo\".startsWith({get [Symbol.match] () { throw 5}});\n  assert(false);\n} catch (e) {\n  assert(e === 5);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-prototype-trim.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar test = \"  asd  \";\nassert(test.trimStart() === \"asd  \")\nassert(test.trimStart().length === 5)\nassert(test.trimLeft() === \"asd  \")\nassert(test.trimLeft().length === 5)\nassert(String.prototype.trimStart === String.prototype.trimLeft)\n\nassert(test.trimEnd() === \"  asd\")\nassert(test.trimEnd().length === 5)\nassert(test.trimRight() === \"  asd\")\nassert(test.trimRight().length === 5)\nassert(String.prototype.trimEnd === String.prototype.trimRight)\n\nassert(test.trim() === \"asd\")\nassert(test.trim().length === 3)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-raw-crash-escaping-backslash.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This test must be left unchanged - testing JerryScript crash */\n\ntry\n{\n  var s = 'print(String.raw`\\\\`)\\n// `';\n  eval (s)\n  asserts(false)\n}\ncatch (error)\n{\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-raw.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction assertThrows(str, error) {\n  try {\n    eval(str);\n    assert(false);\n  } catch (e) {\n    if (typeof error === \"function\") {\n      assert(e instanceof error);\n    } else {\n      assert(e === error)\n    }\n  }\n}\n\n// https://www.ecma-international.org/ecma-262/6.0/#sec-string.raw 21.1.2.4\n// Note: the string error messages represents the nth step of the routine\nvar abruptTests = [\n  [\"undefined\", TypeError], // 3.\n  [\"{ get raw() { throw '5'; } }\", '5'],\n  [\"{ raw : undefined }\", TypeError], // 5.toObject\n  [\"{ raw : { get length() { throw '7.1'; } } }\", '7.1'],\n  [\"{ raw : { length : { toString() { throw '7.2'; } } } }\", '7.2'],\n  [\"{ raw : { length: 2, get '0'() { throw '12.b.1'} } }\", '12.b.1'],\n  [\"{ raw : { length: 2, '0' : { toString() { throw '12.b.2';} } } }\", '12.b.2'],\n  [\"{ raw : { length: 2, '0' : 1 } }, { toString() { throw '12.h';} }\", '12.h'],\n];\n\nabruptTests.forEach(e => {\n  assertThrows(\"String.raw(\" + e[0] + \")\", e[1]);\n});\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw\nassert(String.raw`Hi\\n${2+3}!` === 'Hi\\\\n5!');\nassert(String.raw`Hi\\u000A!` === 'Hi\\\\u000A!');\n\nlet name = 'Bob';\nassert(String.raw`Hi\\n${name}!` === \"Hi\\\\nBob!\");\n\nlet str = String.raw({\n  raw: ['foo', 'bar', 'baz']\n}, 2 + 3, 'Java' + 'Script');\nassert(str === \"foo5barJavaScriptbaz\");\n\nassert(String.raw({ raw: 'test' }, 0, 1, 2) === \"t0e1s2t\");\n\nvar get = [];\nvar raw = new Proxy({length: 2, 0: '', 1: ''}, { get: function(o, k) { get.push(k); return o[k]; }});\nvar p = new Proxy({raw: raw}, { get: function(o, k) { get.push(k); return o[k]; }});\nString.raw(p);\nassert(get + '' === \"raw,length,0,1\");\n\nassert(String.raw`\\\\` == \"\\\\\\\\\")\nassert(String.raw`\\`` == \"\\\\`\")\nassert(String.raw`\\\n\\\n` == \"\\\\\\n\\\\\\n\")\nassert(String.raw`\\ ` == \"\\\\\\u2029\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/string-upper-lower-case-conversion.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlet start = 0x10000\nlet end = 0x10FFFF\n\nconst lower_expected = [66560, 66561, 66562, 66563, 66564, 66565, 66566, 66567, 66568, 66569, 66570, 66571, 66572,\n                        66573, 66574, 66575, 66576, 66577, 66578, 66579, 66580, 66581, 66582, 66583, 66584, 66585,\n                        66586, 66587, 66588, 66589, 66590, 66591, 66592, 66593, 66594, 66595, 66596, 66597, 66598,\n                        66599, 66736, 66737, 66738, 66739, 66740, 66741, 66742, 66743, 66744, 66745, 66746, 66747,\n                        66748, 66749, 66750, 66751, 66752, 66753, 66754, 66755, 66756, 66757, 66758, 66759, 66760,\n                        66761, 66762, 66763, 66764, 66765, 66766, 66767, 66768, 66769, 66770, 66771, 68736, 68737,\n                        68738, 68739, 68740, 68741, 68742, 68743, 68744, 68745, 68746, 68747, 68748, 68749, 68750,\n                        68751, 68752, 68753, 68754, 68755, 68756, 68757, 68758, 68759, 68760, 68761, 68762, 68763,\n                        68764, 68765, 68766, 68767, 68768, 68769, 68770, 68771, 68772, 68773, 68774, 68775, 68776,\n                        68777, 68778, 68779, 68780, 68781, 68782, 68783, 68784, 68785, 68786, 71840, 71841, 71842,\n                        71843, 71844, 71845, 71846, 71847, 71848, 71849, 71850, 71851, 71852, 71853, 71854, 71855,\n                        71856, 71857, 71858, 71859, 71860, 71861, 71862, 71863, 71864, 71865, 71866, 71867, 71868,\n                        71869, 71870, 71871, 93760, 93761, 93762, 93763, 93764, 93765, 93766, 93767, 93768, 93769,\n                        93770, 93771, 93772, 93773, 93774, 93775, 93776, 93777, 93778, 93779, 93780, 93781, 93782,\n                        93783, 93784, 93785, 93786, 93787, 93788, 93789, 93790, 93791, 125184, 125185, 125186, 125187,\n                        125188, 125189, 125190, 125191, 125192, 125193, 125194, 125195, 125196, 125197, 125198, 125199,\n                        125200, 125201, 125202, 125203, 125204, 125205, 125206, 125207, 125208, 125209, 125210, 125211,\n                        125212, 125213, 125214, 125215, 125216, 125217];\n\nconst upper_expected = [66600, 66601, 66602, 66603, 66604, 66605, 66606, 66607, 66608, 66609, 66610, 66611, 66612,\n                        66613, 66614, 66615, 66616, 66617, 66618, 66619, 66620, 66621, 66622, 66623, 66624, 66625,\n                        66626, 66627, 66628, 66629, 66630, 66631, 66632, 66633, 66634, 66635, 66636, 66637, 66638,\n                        66639, 66776, 66777, 66778, 66779, 66780, 66781, 66782, 66783, 66784, 66785, 66786, 66787,\n                        66788, 66789, 66790, 66791, 66792, 66793, 66794, 66795, 66796, 66797, 66798, 66799, 66800,\n                        66801, 66802, 66803, 66804, 66805, 66806, 66807, 66808, 66809, 66810, 66811, 68800, 68801,\n                        68802, 68803, 68804, 68805, 68806, 68807, 68808, 68809, 68810, 68811, 68812, 68813, 68814,\n                        68815, 68816, 68817, 68818, 68819, 68820, 68821, 68822, 68823, 68824, 68825, 68826, 68827,\n                        68828, 68829, 68830, 68831, 68832, 68833, 68834, 68835, 68836, 68837, 68838, 68839, 68840,\n                        68841, 68842, 68843, 68844, 68845, 68846, 68847, 68848, 68849, 68850, 71872, 71873, 71874,\n                        71875, 71876, 71877, 71878, 71879, 71880, 71881, 71882, 71883, 71884, 71885, 71886, 71887,\n                        71888, 71889, 71890, 71891, 71892, 71893, 71894, 71895, 71896, 71897, 71898, 71899, 71900,\n                        71901, 71902, 71903, 93792, 93793, 93794, 93795, 93796, 93797, 93798, 93799, 93800, 93801,\n                        93802, 93803, 93804, 93805, 93806, 93807, 93808, 93809, 93810, 93811, 93812, 93813, 93814,\n                        93815, 93816, 93817, 93818, 93819, 93820, 93821, 93822, 93823, 125218, 125219, 125220, 125221,\n                        125222, 125223, 125224, 125225, 125226, 125227, 125228, 125229, 125230, 125231, 125232, 125233,\n                        125234, 125235, 125236, 125237, 125238, 125239, 125240, 125241, 125242, 125243, 125244, 125245,\n                        125246, 125247, 125248, 125249, 125250, 125251];\n\nfor (let iter of lower_expected) {\n  let cp = String.fromCodePoint(iter);\n  assert(cp !== cp.toLowerCase());\n}\n\nfor (let iter of upper_expected) {\n  let cp = String.fromCodePoint(iter);\n  assert(cp !== cp.toUpperCase());\n}\n\nassert(\"\\ud801A\".toLowerCase() === \"\\ud801a\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/super-assignment.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar setterCalled = false;\n\nclass Base {\n  func () {\n    return 5;\n  }\n  funcArrow () {\n    return () => 5;\n  }\n  [\"com\" + \"puted\"] () {\n    return 10;\n  }\n  get getter () {\n    return 6;\n  }\n  set setter (a) {\n    setterCalled = true;\n  }\n  getSuperValueOf() {\n    return super.valueOf;\n  }\n}\n\nclass Derived extends Base {\n  func () {\n    return super.func();\n  }\n  funcArrow () {\n    return () => super.func();\n  }\n  [\"com\" + \"puted\"] () {\n    return super[\"com\" + \"puted\"]();\n  }\n  get getter () {\n    return super.getter;\n  }\n  set setter (a) {\n    super.setter = a;\n  }\n  deleteSuperReference () {\n    delete super.a;\n  }\n}\n\nvar derived = new Derived;\nvar base = new Base;\n\nassert (derived.func() === 5);\nassert (derived.funcArrow()() === 5);\nassert (derived.computed() === 10);\nassert (derived.getter === 6);\nderived.setter = 7;\nassert (setterCalled === true);\nassert (base.getSuperValueOf() === Object.prototype.valueOf);\n\ntry {\n  derived.deleteSuperReference();\n  assert (false);\n} catch (e) {\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-computed-object-literal.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar symbolFoo = Symbol ('foo');\nvar symbolBar = Symbol ('bar');\n\nvar obj = {\n  _a : 5,\n  get [symbolFoo]() {\n    return this._a;\n  },\n  set [symbolFoo](a) {\n    this._a = a;\n  },\n  [symbolBar] : 10\n}\n\n/* Test accessor properties */\nassert (obj[symbolFoo] === 5);\nobj[symbolFoo] = 6;\nassert (obj[symbolFoo] === 6);\n\n/* Test nameddata properties */\nassert (obj[symbolBar] === 10);\nobj[symbolBar] = 20;\nassert (obj[symbolBar] === 20);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-exception.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ntry {\n  undefined[Symbol (\"foo\")];\n  assert (false);\n} catch (e) {\n  /* Error message: Cannot read property 'Symbol(foo)' of undefined */\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-in.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar test_symbol = Symbol ('Test');\n\nvar obj = {};\n\nassert ((test_symbol in obj) === false);\n\nobj[test_symbol] = 'value';\n\nassert ((test_symbol in obj) === true);\nassert (obj[test_symbol] === 'value');\n\n\nvar array = [];\n\nassert ((test_symbol in array) === false);\n\narray[test_symbol] = 'value';\n\nassert ((test_symbol in array) === true);\nassert (array[test_symbol] === 'value');\n\n\nassert ((test_symbol in Symbol) === false);\n\ntry {\n  test_symbol in test_symbol;\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof TypeError);\n}\n\ntry {\n  test_symbol in 3;\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof TypeError);\n}\n\ntry {\n  test_symbol in 'Test';\n  assert (false);\n} catch (ex) {\n  assert (ex instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-isconcatspreadable.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test with regular arrays\nvar alpha = ['a', 'b', 'c'];\nvar numeric = [1, 2, 3];\n\nvar alphaNumeric = alpha.concat(numeric);\nassert(JSON.stringify(alphaNumeric) === '[\"a\",\"b\",\"c\",1,2,3]');\nassert(alphaNumeric.length === 6);\n\nnumeric[Symbol.isConcatSpreadable] = false;\nalphaNumeric = alpha.concat(numeric);\nassert(JSON.stringify(alphaNumeric) === '[\"a\",\"b\",\"c\",[1,2,3]]');\nassert(alphaNumeric.length === 4);\n\nnumeric[Symbol.isConcatSpreadable] = true;\n\n// Test with array-like object\nvar fakeArray = {\n  [Symbol.isConcatSpreadable]: true,\n  length: 2,\n  0: 4,\n  1: 5\n}\n\nvar numericArray = numeric.concat(fakeArray);\nassert(JSON.stringify(numericArray) === '[1,2,3,4,5]');\nassert(numericArray.length === 5);\n\nfakeArray[Symbol.isConcatSpreadable] = false;\nnumericArray = numeric.concat(fakeArray);\nassert(JSON.stringify(numericArray) === '[1,2,3,{\"0\":4,\"1\":5,\"length\":2}]');\nassert(numericArray.length === 4);\n\n// Test with object\nvar obj = { 0: 'd' };\n\nvar alphaObj = alpha.concat(obj);\nassert(JSON.stringify(alphaObj) === '[\"a\",\"b\",\"c\",{\"0\":\"d\"}]');\nassert(alphaObj.length === 4);\n\nobj[Symbol.isConcatSpreadable] = true;\nalphaObj = alpha.concat(obj);\nassert(JSON.stringify(alphaObj) === '[\"a\",\"b\",\"c\"]');\nassert(alphaObj.length === 3);\n\n// Test with boolean\nvar bool = true;\nvar numericBool = numeric.concat(bool);\nassert(JSON.stringify(numericBool) === '[1,2,3,true]');\nassert(numericBool.length === 4);\n\nbool[Symbol.isConcatSpreadable] = false;\nnumericBool = numeric.concat(bool);\nassert(JSON.stringify(numericBool) === '[1,2,3,true]');\nassert(numericBool.length === 4);\n\n// Test when unable to concat\nvar array1 = [];\nvar array2 = [];\nObject.defineProperty(array2, '0', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\n\ntry {\n  array1.concat(array2);\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-key-keyfor.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ntry {\n  Symbol.for (Symbol('foo'));\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError)\n}\n\nvar a = Symbol.for ('foo');\nvar b = Symbol.for ('foo');\n\nassert (a === b);\nassert (a == b);\n\nassert (Symbol.keyFor (a) === 'foo');\nassert (Symbol.keyFor (b) === 'foo');\n\n// Test non-string arguments\nvar c = Symbol.for (5);\nvar d = Symbol.for (5.58);\nvar e = Symbol.for ({});\n\nassert (Symbol.keyFor (c) === '5');\nassert (Symbol.keyFor (d) === '5.58');\nassert (Symbol.keyFor (e) === '[object Object]');\n\n// Test global symbol table\nvar array = [];\nfor (var i = 0; i < 15; i++) {\n  array[i] = Symbol.for ('foo' + i);\n\n  for (var j = 0; j < i; j++) {\n    assert (array[j] !== array[i]);\n  }\n}\n\ntry {\n  Symbol.keyFor ('NonSymbolValue');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nfor (var i = 0; i < 15; i++) {\n  assert (Symbol.keyFor (array[i]) === ('foo' + i));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-prototype-description.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nassert(Symbol('desc').description === \"desc\");\nassert(Symbol.iterator.description === \"Symbol.iterator\");\nassert(Symbol.for('foo').description === \"foo\");\nassert(`${Symbol('foo').description}bar` === \"foobar\");\n\nvar desc = Object.getOwnPropertyDescriptor(Symbol.prototype, 'description');\n\nassert(desc.set === undefined);\nassert(typeof desc.get === \"function\");\nassert(desc.writable === undefined);\nassert(desc.enumerable === false);\nassert(desc.configurable === true);\n\nvar sym = Symbol('foo')\nassert(desc.get.call(Object(sym)) === \"foo\")\n\nvar obj_sym = Object(Symbol('foo'));\nassert(obj_sym.description === \"foo\");\n\ntry {\n  desc.get.call(null);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  desc.get.call(123);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  desc.get.call('test');\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  desc.get.call(undefined);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  desc.get.call({});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  desc.get.call(new Proxy({}, {}));\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nassert(Symbol(\"\").description !== undefined);\nassert(Symbol().description === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-prototype-symbol-toprimitive.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ntry {\n  Symbol.prototype[Symbol.toPrimitive].call ('NonSymbolValue');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Symbol.prototype[Symbol.toPrimitive].call ({});\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar foo = Symbol ('foo');\nassert (foo[Symbol.toPrimitive] () === foo);\n\nvar fooObj = Object (foo);\nassert (fooObj[Symbol.toPrimitive] () === foo);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-prototype-tostring.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ntry {\n  Symbol.prototype.toString.call ('NonSymbolValue');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Symbol.prototype.toString.call ({});\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar foo = Symbol ('foo');\nassert (foo.toString () === \"Symbol(foo)\");\nassert (String (foo) === \"Symbol(foo)\");\n\nvar fooObj = Object (foo);\nassert (fooObj.toString () === \"Symbol(foo)\");\n\ntry {\n  String (fooObj);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-prototype-valueof.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ntry {\n  Symbol.prototype.valueOf.call ('NonSymbolValue');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Symbol.prototype.valueOf.call ({});\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar foo = Symbol ('foo');\nassert (foo.valueOf () === foo);\n\nvar fooObj = Object (foo);\nassert (fooObj.valueOf () === foo);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-prototype.toprimitive.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar obj2 = {\n    [Symbol.toPrimitive](hint) {\n      if (hint == 'number') {\n        return 10;\n      }\n      if (hint == 'string') {\n        return 'hello';\n      }\n      return true;\n    }\n  };\n\n  assert(+obj2 === 10);\n  assert(`${obj2}` === \"hello\");\n  assert(obj2 + '' === \"true\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-replace.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar replace = RegExp.prototype[Symbol.replace];\n\ntry {\n  replace.call (0, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  replace.call (new RegExp(), {\n    toString: () => {\n      throw \"abrupt string\"\n    }\n  }, \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt string\");\n}\n\ntry {\n  replace.call (new RegExp(), \"string\", {\n    toString: () => {\n      throw \"abrupt replace\"\n    }\n  });\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt replace\");\n}\n\ntry {\n  replace.call ({\n    get global() {\n      throw \"abrupt global\"\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt global\");\n}\n\ntry {\n  replace.call ({\n    global: true,\n    set lastIndex(idx) {\n      throw \"abrupt lastIndex\"\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt lastIndex\");\n}\n\ntry {\n  replace.call ({\n    get exec() {\n      throw \"abrupt exec\"\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt exec\");\n}\n\ntry {\n  replace.call ({\n    exec: RegExp.prototype.exec\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  replace.call ({\n    exec: 42\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  replace.call ({\n    exec: () => {\n      throw \"abrupt exec result\"\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt exec result\");\n}\n\ntry {\n  replace.call ({\n    exec: () => {\n      return 1\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  replace.call ({\n    exec: () => {\n      return {\n        get length() {\n          throw \"abrupt result length\"\n        }\n      }\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt result length\");\n}\n\ntry {\n  replace.call ({\n      global: true,\n      exec: () => {\n        return {\n          length: 1,\n          get 0() {\n            throw \"abrupt match\"\n          }\n        }\n      }\n    },\n    \"string\",\n    \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt match\");\n}\n\ntry {\n  replace.call ({\n      global: true,\n      exec: () => {\n        return {\n          length: 1,\n          get 0() {\n            return {\n              toString: () => {\n                throw \"abrupt match toString\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"string\",\n    \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt match toString\");\n}\n\nvar result_obj = {\n  toString: () => {\n    Object.defineProperty (result_obj, 'toString', {\n      value: () => {\n        throw \"abrupt match toString delayed\";\n      }\n    });\n    return \"str\";\n  }\n}\n\nvar first = true;\ntry {\n  replace.call ({\n      global: true,\n      exec: () => {\n        if (!first) {\n          return null;\n        }\n\n        first = false;\n        return {\n          length: 1,\n          get 0() {\n            return result_obj;\n          }\n        }\n      }\n    },\n    \"string\",\n    \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt match toString delayed\");\n}\n\ntry {\n  replace.call ({\n      global: true,\n      get lastIndex() {\n        throw \"abrupt lastIndex get\"\n      },\n      set lastIndex(i) {},\n      exec: () => {\n        return {\n          length: 1,\n          get 0() {\n            return {\n              toString: () => {\n                return \"\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"string\",\n    \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt lastIndex get\");\n}\n\ntry {\n  replace.call ({\n      global: true,\n      get lastIndex() {\n        return {\n          valueOf: () => {\n            throw \"abrupt lastIndex toNumber\"\n          }\n        }\n      },\n      set lastIndex(i) {},\n      exec: () => {\n        return {\n          length: 1,\n          get 0() {\n            return {\n              toString: () => {\n                return \"\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"string\",\n    \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt lastIndex toNumber\");\n}\n\nvar o = {\n  global: true,\n  exec: () => {\n    return {\n      length: 1,\n      get 0() {\n        return {\n          toString: () => {\n            return \"\"\n          }\n        }\n      }\n    }\n  }\n}\nObject.defineProperty (o, 'lastIndex', {\n  configurable: true,\n  get: () => {\n    Object.defineProperty (o, 'lastIndex', {\n      get: () => {\n        return {\n          valueOf: () => {\n            return 42\n          }\n        };\n      },\n      set: (i) => {\n        throw \"abrupt lastIndex put\";\n      },\n      configurable: true\n    });\n    return {\n      valueOf: () => {\n        return 24\n      }\n    };\n  },\n  set: (i) => {}\n});\n\ntry {\n  replace.call (o,\n    \"string\",\n    \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt lastIndex put\");\n}\n\no = {\n  global: true,\n  exec: () => {\n    return {\n      length: 1,\n      get 0() {\n        return {\n          toString: () => {\n            return \"\"\n          }\n        }\n      }\n    }\n  },\n};\nObject.defineProperty (o, 'lastIndex', {\n  get: () => {\n    Object.defineProperty (o, 'lastIndex', {\n      value: 0,\n      writable: false\n    });\n    return 0;\n  },\n  set: () => {}\n});\n\ntry {\n  replace.call (o,\n    \"string\",\n    \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\no = {\n  global: true\n};\nObject.defineProperty (o, 'exec', {\n  configurable: true,\n  value: () => {\n    Object.defineProperty (o, 'exec', {\n      get: () => {\n        throw \"abrupt exec\"\n      },\n      set: (v) => {}\n    });\n    return {\n      length: 1,\n      0: \"thisisastring\"\n    }\n  }\n});\n\ntry {\n  replace.call (o,\n    \"string\",\n    \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt exec\");\n}\n\ntry {\n  replace.call ({\n    exec: () => {\n      return {\n        length: 1,\n        0: \"str\",\n        get index() {\n          throw \"abrupt index\"\n        }\n      }\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt index\");\n}\n\ntry {\n  replace.call ({\n    exec: () => {\n      return {\n        length: 1,\n        0: \"str\",\n        get index() {\n          return {\n            valueOf: () => {\n              throw \"abrupt index toNumber\"\n            }\n          }\n        }\n      }\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt index toNumber\");\n}\n\ntry {\n  replace.call ({\n    exec: () => {\n      return {\n        length: 2,\n        0: \"str\",\n        index: 0,\n        get 1() {\n          throw \"abrupt capture\"\n        }\n      }\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt capture\");\n}\n\ntry {\n  replace.call ({\n    exec: () => {\n      return {\n        length: 2,\n        0: \"str\",\n        index: 0,\n        1: {\n          toString: () => {\n            throw \"abrupt capture toString\"\n          }\n        }\n      }\n    }\n  }, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt capture toString\");\n}\n\ntry {\n  replace.call ({\n    exec: () => {\n      return {\n        length: 2,\n        0: \"str\",\n        index: 0,\n        1: \"st\"\n      }\n    }\n  }, \"string\", () => {\n    throw \"abrupt replace\"\n  });\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt replace\");\n}\n\ntry {\n  replace.call ({\n    exec: () => {\n      return {\n        length: 2,\n        0: \"str\",\n        index: 0,\n        1: \"st\"\n      }\n    }\n  }, \"string\", () => {\n    return {\n      toString: () => {\n        throw \"abrupt replace toString\"\n      }\n    }\n  });\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt replace toString\");\n}\n\ntry {\n  replace.call (/abc/, \"abc\", () => {\n    throw \"fastpath abrupt replace\"\n  });\n  assert (false);\n} catch (e) {\n  assert (e === \"fastpath abrupt replace\");\n}\n\ntry {\n  replace.call (/abc/, \"abc\", () => {\n    return {\n      toString: () => {\n        throw \"fastpath abrupt replace\"\n      }\n    }\n  });\n  assert (false);\n} catch (e) {\n  assert (e === \"fastpath abrupt replace\");\n}\n\nassert (replace.call (/abc/, \"abc\", \"xyz\") === \"xyz\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"xyz\") === \"abxyzfg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$$-\") === \"ab-$-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$&-\") === \"ab-cde-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$`-\") === \"ab-ab-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$'-\") === \"ab-fg-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$0-\") === \"ab-$0-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$1-\") === \"ab-c-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$2-\") === \"ab-d-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$3-\") === \"ab-d-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$4-\") === \"ab--fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$5-\") === \"ab-e-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$6-\") === \"ab-$6-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$00-\") === \"ab-$00-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$01-\") === \"ab-c-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$10-\") === \"ab-c0-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$99-\") === \"ab-$99-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"-$$1-\") === \"ab-$1-fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"$\") === \"ab$fg\");\nassert (replace.call (/(c)((d)|(x))(e)/, \"abcdefg\", \"$@\") === \"ab$@fg\");\n\nreplace.call (/(c)((d)|(x))(e)/, \"abcdefg\", function () {\n  assert (arguments[0] === \"cde\");\n  assert (arguments[1] === \"c\");\n  assert (arguments[2] === \"d\");\n  assert (arguments[3] === \"d\");\n  assert (arguments[4] === undefined);\n  assert (arguments[5] === \"e\");\n  assert (arguments[6] === 2);\n  assert (arguments[7] === \"abcdefg\");\n});\n\nvar re = /ab/g;\nassert (replace.call (re, \"-ab-ab-ab-ab-\", \"cd\") === \"-cd-cd-cd-cd-\");\nassert (re.lastIndex === 0);\n\nre.lastIndex = 5;\nassert (replace.call (re, \"-ab-ab-ab-ab-\", \"cd\") === \"-cd-cd-cd-cd-\");\nassert (re.lastIndex === 0);\n\nassert (replace.call (/(?:)/g, \"string\", \"Duck\") === \"DucksDucktDuckrDuckiDucknDuckgDuck\");\n\nclass Regexplike {\n  constructor() {\n    this.index = 0;\n    this.global = true;\n  }\n\n  exec() {\n    if (this.index > 0) {\n      return null;\n    }\n\n    this.index = 39;\n    var result = {\n      length: 1,\n      0: \"Duck\",\n      index: this.index\n    };\n    return result;\n  }\n}\n\nre = new Regexplike();\n\n/* Well-behaved RegExp-like object. */\nassert (replace.call (re, \"What have you brought upon this cursed land\", \"$&\") === \"What have you brought upon this cursed Duck\");\n\nvar replace_count = 0;\n\nfunction replacer() {\n  replace_count++;\n  return arguments[0];\n}\n\nre.index = 0;\nre.exec = function () {\n  if (this.index > 3) {\n    return null;\n  }\n\n  var result = {\n    length: 1,\n    0: \"Duck\",\n    index: this.index++\n  };\n  return result;\n}\n\n/* Mis-behaving RegExp-like object, replace function is called on each match, but the result is ignored for inconsistent matches. */\nassert (replace.call (re, \"Badger\", replacer) === \"Ducker\");\nassert (replace_count === 4);\n\nre.index = 0;\nassert (replace.call (re, \"Badger\", \"Ord\") === \"Order\");\n\ntry {\n  replace.call (RegExp.prototype, \"string\", \"replace\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert(replace.call({ exec : ( ) => { return {  } } }, 'һ', \"a\") === \"a\");\nassert(replace.call({ exec : ( ) => { return {  } } }, 'һһһһһһһһһ', \"a\") === \"a\");\nassert(replace.call({ exec : ( ) => { return {  } } }, 'һһһһһһһһһһ', \"a\") === \"aһ\");\n\n/* Object with custom @@replace method */\nvar o = {}\no[Symbol.replace] = function () {\n  return \"Duck\"\n};\nassert (\"string\".replace (o, \"Mallard\") === \"Duck\");\n\no[Symbol.replace] = 42;\ntry {\n  \"string\".replace (o, \"Duck\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nObject.defineProperty (o, Symbol.replace, {\n  get: () => {\n    throw \"abrupt @@replace get\"\n  },\n  set: (v) => {}\n});\n\ntry {\n  \"string\".replace (o, \"Duck\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt @@replace get\");\n}\n\no = {};\no[Symbol.replace] = function () {\n  throw \"abrupt @@replace\"\n};\ntry {\n  \"string\".replace (o, \"str\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt @@replace\")\n}\n\nclass Regexplike2 {\n    exec() {\n        return {}\n    }\n}\nre = new Regexplike2();\nassert (replace.call (re, \"1\") === \"undefined\");\n\nvar abruptStickyRegexp = /./;\nObject.defineProperty(abruptStickyRegexp, 'sticky', {\n  get: function() {\n    throw \"abrupt sticky\";\n  }\n});\n\nassert(abruptStickyRegexp[Symbol.replace]() === \"undefinedndefined\");\n\nvar r = /./;\nr.lastIndex = {\n  valueOf: function() {\n    throw \"abrupt lastIndex\"\n  }\n}\n\ntry {\n  r[Symbol.replace](\"a\", \"b\");\n  assert(false);\n} catch (e) {\n  assert(e === \"abrupt lastIndex\");\n}\n\nvar r = /a/y;\nr.lastIndex = 3;\nassert (r[Symbol.replace](\"aaaaa\", \"b\") === \"aaaba\");\nassert (r.lastIndex === 4);\n\nassert (r[Symbol.replace](\"ccccc\", \"b\") === \"ccccc\");\nassert (r.lastIndex === 0);\n\nvar r = /a/yg;\nr.lastIndex = 3;\nassert (r[Symbol.replace](\"aaaaa\", \"b\") === \"bbbbb\");\nassert (r.lastIndex === 0);\n\nvar replaceCalled = false;\nvar r = /a/\nr.lastIndex = 2;\n\nassert(r[Symbol.replace](\"aaaa\", function(match, index) {\n  replaceCalled = true;\n  assert (match === \"a\");\n  assert (index === 0);\n  return \"b\";\n}) === \"baaa\");\n\nassert (replaceCalled);\nassert (r.lastIndex === 2);\n\n(function () {\n  var r = /./g;\n  var execWasCalled = false;\n  var coercibleIndex = {\n    valueOf: function() {\n      return Math.pow(2, 54);\n    },\n  };\n\n  var result = {\n    length: 1,\n    0: '',\n    index: 0,\n  };\n\n  r.exec = function() {\n    if (execWasCalled) {\n      return null;\n    }\n\n    r.lastIndex = coercibleIndex;\n    execWasCalled = true;\n    return result;\n  };\n\n  assert(r[Symbol.replace]('', '') === '');\n  assert(r.lastIndex === Math.pow(2, 53));\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-search.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar search = RegExp.prototype[Symbol.search];\n\ntry {\n  search.call (0, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  search.call (new RegExp(), {\n    toString: () => {\n      throw \"abrupt string\"\n    }\n  });\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt string\");\n}\n\ntry {\n  search.call ({\n    get lastIndex() {\n      throw \"abrupt get lastIndex\"\n    }\n  }, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt get lastIndex\");\n}\n\ntry {\n  search.call ({\n    get lastIndex() {\n      return 3;\n    },\n    set lastIndex(idx) {\n      throw \"abrupt set lastIndex\"\n    }\n  }, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt set lastIndex\");\n}\n\ntry {\n  search.call ({\n    get exec() {\n      throw \"abrupt exec\"\n    }\n  }, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt exec\");\n}\n\ntry {\n  search.call ({\n    exec: RegExp.prototype.exec\n  }, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  search.call ({\n    exec: 42\n  }, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  search.call ({\n    exec: () => {\n      throw \"abrupt exec result\"\n    }\n  }, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt exec result\");\n}\n\ntry {\n  search.call ({\n    exec: () => {\n      return 1\n    }\n  }, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  search.call ({\n    exec: () => {\n      return {\n        get index() {\n          throw \"abrupt index\"\n        }\n      }\n    }\n  }, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt index\");\n}\n\nassert (search.call (/abc/, \"abc\") === 0);\nassert (search.call (/abc/, \"strabc\") === 3);\nassert (search.call (/abc/, \"bcd\") === -1);\n\nclass Regexplike {\n  constructor() {\n    this.index = 0;\n    this.global = true;\n  }\n\n  exec() {\n    if (this.index > 0) {\n      return null;\n    }\n\n    this.index = 42;\n    var result = {\n      length: 1,\n      0: \"Duck\",\n      index: this.index\n    };\n    return result;\n  }\n}\n\nre = new Regexplike();\nassert (search.call (re, \"str\") === 42);\n\n/* Object with custom @@search method */\nvar o = {}\no[Symbol.search] = function () {\n  return 4;\n};\nassert (\"string\".search (o) === 4);\n\no[Symbol.search] = 42;\ntry {\n  \"string\".search (o);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nObject.defineProperty (o, Symbol.search, {\n  get: () => {\n    throw \"abrupt @@search get\"\n  },\n  set: (v) => {}\n});\n\ntry {\n  \"string\".search (o);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt @@search get\");\n}\n\no = {};\no[Symbol.search] = function () {\n  throw \"abrupt @@search\"\n};\ntry {\n  \"string\".search (o);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt @@search\")\n}\n\no = {\n  exec: function () { return {index: \"Duck\"}; },\n};\nassert (\"string\".search (o) === 1);\n\no[Symbol.search] = RegExp.prototype[Symbol.search];\nassert (\"string\".search (o) === \"Duck\");\n\no = {\n  lastIndex: \"Duck\",\n  exec: () => {\n    return \"Duck\";\n  }\n}\n\ntry {\n  RegExp.prototype[Symbol.search].call (o, \"Duck\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\no = {\n  exec: () => {\n    return { 0: \"Duck\", index: 0 };\n  },\n  get lastIndex () {\n    return \"Duck\";\n  },\n  set lastIndex (v) {\n    return \"Duck\";\n  }\n}\n\nassert (RegExp.prototype[Symbol.search].call (o, \"str\") === 0);\n\nvar r = /a/;\nr.lastIndex = 3.14;\n\nvar get_calls = [];\nvar set_calls = [];\n\nvar handler = {\n  get: function(o, k) {\n    get_calls.push(k);\n\n    if (k === \"exec\") {\n      return (str) => r.exec(str);\n    }\n\n    return r[k];\n  },\n  set: function(o, k, v) {\n    set_calls.push(k);\n    r[k] = v;\n  }\n};\n\nvar p = new Proxy(r, handler);\ntry {\n  search.call(p, \"bba\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (get_calls.join(\",\") === \"lastIndex\");\nassert (set_calls.join(\",\") === \"lastIndex\");\nassert (r.lastIndex === 0);\n\nvar o = {\n  get lastIndex() {\n    Object.defineProperty(o, \"lastIndex\", {\n      get: function () { throw \"abrupt get second lastIndex\"; }\n    });\n    return 1;\n  },\n  set lastIndex(v) {},\n  exec: () => { return null; }\n}\n\ntry {\n  search.call(o, \"str\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt get second lastIndex\");\n}\n\nvar index = 1;\nvar o = {\n  get lastIndex() {\n    return index++;\n  },\n  set lastIndex(v) {\n    Object.defineProperty(o, \"lastIndex\", {\n      set: function (v) { throw \"abrupt set second lastIndex\"; }\n    });\n  },\n  exec: () => { return null; }\n}\n\ntry {\n  search.call(o, \"str\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt set second lastIndex\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-split.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar split = RegExp.prototype[Symbol.split];\n\ntry {\n  split.call (0, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  split.call (new RegExp(), {\n    toString: () => {\n      throw \"abrupt string\"\n    }\n  });\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt string\");\n}\n\ntry {\n  var o = {};\n  o.constructor = \"ctor\";\n  split.call (o, \"str\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  var o = {};\n  var c = {};\n  o.constructor = c;\n  Object.defineProperty (c, Symbol.species, { get: function () { throw \"abrupt species\";} });\n\n  split.call (o, \"str\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt species\");\n}\n\ntry {\n  split.call ({\n    get flags() {\n      throw \"abrupt flags\";\n    }\n  }, \"string\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt flags\");\n}\n\ntry {\n  split.call ({ toString: function () { return \"s\"; }, flags: \"g\"},\n              \"string\",\n              { valueOf: function () { throw \"abrupt limit\"; } });\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt limit\");\n}\n\nvar exec = RegExp.prototype.exec;\n\ntry {\n  Object.defineProperty(RegExp.prototype, \"exec\", { get : function() { throw \"abrupt get exec\"; }})\n  split.call ({ toString: function () { return \"s\"; }, flags: \"g\"},\n              \"string\")\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt get exec\");\n}\n\ntry {\n  Object.defineProperty(RegExp.prototype, \"exec\", { value: function (str) {\n    this.lastIndex++;\n    return { get length() { throw \"abrupt match length\"; }}\n  }});\n  split.call ({ toString: function () { return \"s\"; }, flags: \"g\"},\n              \"string\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt match length\");\n}\n\ntry {\n  Object.defineProperty(RegExp.prototype, \"exec\", { value: function (str) {\n    this.lastIndex++;\n    return { length: 2, get 1() { throw \"abrupt capture\"; }}\n  }});\n  split.call ({ toString: function () { return \"s\"; }, flags: \"g\"},\n              \"string\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt capture\");\n}\n\nObject.defineProperty(RegExp.prototype, \"exec\", { value: function (str) {\n  this.lastIndex = 10;\n  return { };\n}});\n\nvar result = split.call ({flags: \"g\"}, \"string\");\n\nassert(result.length === 2)\nassert(result[0] === \"\")\nassert(result[1] === \"\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol-unscopables.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {\n    prop1: 42,\n    prop2: 13,\n    prop3: \"foo\",\n    prop4: 1\n};\n\nvar obj2 = {\n    foo: \"foo\"\n};\n\nobj[Symbol.unscopables] = {\n    prop1: false,\n    prop2: true,\n    prop3: undefined,\n    prop4: obj2\n};\n\nwith (obj)\n{\n    assert(prop1 === 42);\n\n    try {\n      prop2;\n      assert(false);\n    } catch (e) {\n      assert(e instanceof ReferenceError);\n    }\n\n    assert (prop3 === \"foo\");\n\n    try {\n      prop4;\n      assert(false);\n    } catch (e) {\n      assert(e instanceof ReferenceError);\n    }\n\n    try {\n      prop5;\n      assert(false);\n    } catch (e) {\n      assert(e instanceof ReferenceError);\n    }\n}\n\nvar obj2 = {};\nObject.defineProperty(obj2, Symbol.unscopables, { get: function () { throw 42; } });\n\nwith (obj2) {\n  try {\n    prop;\n    assert(false);\n  } catch (e) {\n    assert(e instanceof ReferenceError);\n  }\n}\n\nvar obj3 = { foo: 12 };\nObject.defineProperty(obj3, Symbol.unscopables, { get: function () { throw 42; } });\n\nwith (obj3) {\n  try {\n    typeof foo;\n  } catch (e) {\n    assert(e === 42);\n  }\n}\n\nvar symbol_obj = Array.prototype[Symbol.unscopables];\nassert(symbol_obj.copyWithin === true);\nassert(symbol_obj.entries === true);\nassert(symbol_obj.fill === true);\nassert(symbol_obj.find === true);\nassert(symbol_obj.findIndex === true);\nassert(symbol_obj.keys === true);\nassert(symbol_obj.values === true);\n\nassert(Object.getPrototypeOf(Array.prototype[Symbol.unscopables]) === null);\n\nvar obj3 = Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], \"find\");\nassert(obj3.value === true);\nassert(obj3.writable === true);\nassert(obj3.enumerable == true);\nassert(obj3.configurable == true);\n\nvar a = { foo: 1, bar: 2 };\na[Symbol.unscopables] = { bar: true };\nwith (a) {\n  assert(foo === 1);\n  assert(typeof bar === \"undefined\");\n}\n\nlet track = [];\nlet proxy = new Proxy({ a : 4, [Symbol.unscopables] : [] }, {\n  has (t, p) {\n    track.push(p);\n    return Reflect.has(...arguments);\n  },\n  get (t, p, r) {\n    track.push(p);\n    return Reflect.get(...arguments);\n  }\n});\n\nwith (proxy){\n  a;\n}\n\nassert(track.length == 3);\nassert(track[0] === 'a');\nassert(track[1] === Symbol.unscopables);\nassert(track[2] === 'a');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/symbol.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar a = Symbol ('foo');\nvar b = Symbol ('bar');\n\nassert (a !== b);\nassert (a === a);\nassert (typeof a === 'symbol');\nassert (a.toString() == 'Symbol(foo)');\nassert (Object.prototype.toString.call (a) === \"[object Symbol]\");\nassert (JSON.stringify (a) === undefined);\n\nvar obj = { c : 10, d : 20};\nobj[a] = 'EnumerableSymbolProp';\nassert (obj[a] === 'EnumerableSymbolProp');\n\n// Symbol properties are not listed via for in\nObject.defineProperty(obj, b, { value : 'NonEnumerableSymbolProp' });\n\nvar counter = 0;\n\nfor (var v in obj) {\n  assert (v === 'c' || v === 'd');\n  counter++;\n}\n\nassert (counter === 2);\n\nvar keys = Object.keys (obj);\nassert (keys.length === 2);\nassert (keys[0] === 'c' || keys[0] === 'd');\nassert (keys[1] === 'd' || keys[1] === 'c');\n\nvar c = Symbol ('bar');\nvar obj2 = {};\nobj2[b] = 'foo';\nobj2[c] = 'bar';\n\nassert (obj2[b] == 'foo');\nassert (obj2[c] == 'bar');\n\ntry {\n  new Date (Symbol ('2018-11-09'));\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  a + 'append_string';\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (Object (a) == a);\nassert (Object (a) !== a);\n\n// Test built-in symbols\nvar a = ['hasInstance',\n         'isConcatSpreadable',\n         'iterator',\n         'match',\n         'replace',\n         'search',\n         'species',\n         'split',\n         'toPrimitive',\n         'toStringTag',\n         'unscopables'];\n\na.forEach (function (e) {\n  assert (Symbol[e].toString() === ('Symbol(Symbol.' + e +')'));\n  assert (typeof Symbol[e] === 'symbol');\n  /* Check for property descriptor ES 6 19.4.2.2 - 19.4.2.14 */\n  var desc = Object.getOwnPropertyDescriptor(Symbol, e)\n  assert (desc.writable === false);\n  assert (desc.enumerable === false);\n  assert (desc.configurable === false);\n});\n\nvar obj = {};\nObject.defineProperty(obj, a, { 'get' : function () {throw new ReferenceError ('foo'); } });\nObject.defineProperty(obj, b, { value : 5 });\nassert (obj[b] === 5);\n\ntry {\n  obj[a];\n  assert (false);\n} catch (e) {\n  assert (e instanceof ReferenceError);\n  assert (e.message === 'foo');\n}\n\nvar descriptor = Object.getOwnPropertyDescriptor(obj, b);\n\nassert (descriptor.configurable === false);\nassert (descriptor.enumerable === false);\nassert (descriptor.writable === false);\nassert (descriptor.value === 5);\n\nvar foo = Symbol ('foo');\nassert (foo[Symbol.toStringTag] === 'Symbol');\n\n// Test same descriptions\nvar symA = Symbol ('foobar');\nvar symB = Symbol ('foobar');\nassert (symA !== symB);\nassert (symA != symB);\n\nvar obj = { foobar : 55 };\nobj[symA] = 77;\nassert (obj[\"foobar\"] !== obj[symA]);\nassert (obj[\"foobar\"] != obj[symA]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/tagged-template-literal.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals\n// Tagged templates\nvar person = 'Mike';\nvar age = 28;\n\nfunction myTag(strings, personExp, ageExp) {\n  assert(strings[0] == \"That \");\n  assert(strings[1] == \" is a \");\n  var str0 = strings[0];\n  var str1 = strings[1];\n\n  var ageStr;\n  if (ageExp > 99){\n    ageStr = 'centenarian';\n  } else {\n    ageStr = 'youngster';\n  }\n\n  return `${str0}${personExp}${str1}${ageStr}`;\n}\n\nvar output = myTag`That ${ person } is a ${ age }`;\nassert(output === \"That Mike is a youngster\");\n\nfunction template(strings, ...keys) {\n  return (function(...values) {\n    var dict = values[values.length - 1] || {};\n    var result = [strings[0]];\n    keys.forEach(function(key, i) {\n      var value = Number.isInteger(key) ? values[key] : dict[key];\n      result.push(value, strings[i + 1]);\n    });\n    return result.join('');\n  });\n}\n\nvar t1Closure = template`${0}${1}${0}!`;\nassert(t1Closure('Y', 'A') === \"YAY!\");\nvar t2Closure = template`${0} ${'foo'}!`;\nassert(t2Closure('Hello', {foo: 'World'}) === \"Hello World!\");\n\n// Raw strings\n(function () {\n  function tag(strings) {\n    assert(strings.raw[0].length === 40);\n  }\n\n  tag`string text line 1 \\n string text line 2`;\n})();\n\nassert (String.raw`Hi\\n${2+3}!` === \"Hi\\\\n5!\");\n\n(function () {\n  function empty(strings, ...params) {\n    assert(strings.length === 4);\n    assert(strings.raw.length === 4);\n    assert(params.length === 3);\n    strings.forEach ((e) => assert (e === \"\"));\n    strings.raw.forEach ((e) => assert (e === \"\"));\n    params.forEach ((e) => assert (e === 1));\n  }\n\n  empty`${1}${1}${1}`;\n})();\n\n(function () {\n  function f (str) {\n    return str.raw[0].length;\n  }\n  assert (eval(\"f`a\\u2029b`\") === 3);\n})();\n\n(function () {\n  function testRaw(parts, a, b) {\n    assert(parts instanceof Array);\n    assert(parts.raw instanceof Array);\n    assert(parts.length === 3);\n    assert(parts[0] === \"str\");\n    assert(parts[1] === \"escaped\\n\");\n    assert(parts[2] === \"\");\n    assert(parts.raw.length === 3);\n    assert(parts.raw[0] === \"str\");\n    assert(parts.raw[1] === \"escaped\\\\n\");\n    assert(parts.raw[2] === \"\");\n    assert(a === 123);\n    assert(b === 456);\n    return true;\n  }\n\n  assert(testRaw `str${123}escaped\\n${456}` === true);\n})();\n\n// TemplateStrings call site caching\n(function () {\n  let str = (arr) => arr;\n  function getStr() {\n    return str`foo`;\n  }\n  var chainedCall = getStr();\n  var localCall = str`foo`;\n  assert(chainedCall === getStr() && chainedCall !== localCall);\n})();\n\n// TemplateStrings permanent caching\n(function () {\n  let str = (arr) => arr;\n  function getStr() {\n    return str`foo`;\n  }\n  var chainedCall = getStr();\n  var localNew = new getStr();\n  assert(chainedCall === getStr() && chainedCall === localNew);\n})();\n\nvar templateObject;\n\n(function(p) {\n  templateObject = p;\n})`str`;\n\nvar desc = Object.getOwnPropertyDescriptor(templateObject, '0');\nassert(desc.writable === false);\nassert(desc.enumerable === true);\nassert(desc.configurable === false);\n\n(function () {\n  function f (strings, ...args) {\n    return function () {\n      return Array(...args);\n    };\n  }\n\n  var a = new f`${1}${2}${3}`;\n  assert(a.length === 3);\n  assert(a[0] === 1);\n  assert(a[1] === 2);\n  assert(a[2] === 3);\n\n  function g (strings, ...args) {\n    return Array;\n  }\n\n  a = new g`${1}${2}${3}`(4, 5, 6);\n  assert(a.length === 3);\n  assert(a[0] === 4);\n  assert(a[1] === 5);\n  assert(a[2] === 6);\n\n  try {\n    new (g`${1}${2}${3}`(4, 5, 6));\n    assert(false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  function h (strings, ...args) {\n    return 5;\n  }\n\n  try {\n    new h`foo`;\n    assert(false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/template_string.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction must_throw (str)\n{\n  try\n  {\n    eval (\"switch (1) { default: \" + str + \"}\");\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n\n  try\n  {\n    eval (str);\n    assert (false);\n  }\n  catch (e)\n  {\n  }\n}\n\nvar a = 'A';\nvar b = 'B';\n\nswitch (1)\n{\ndefault:\n\n  ``;\n  `abc`;\n  `ab${a+b}${ `x` }c`;\n\n  assert (`` === '');\n  assert (`abc` === 'abc');\n  assert (`ab\\\n  c` === 'ab  c');\n  assert (`ab\n  c` === 'ab\\n  c');\n\n  assert (`prefix${a}` === 'prefixA');\n  assert (`${a}postfix` === 'Apostfix');\n  assert (`prefix${a}postfix` === 'prefixApostfix');\n\n  assert (`${a}${b}` === 'AB');\n  assert (`${a},${b}` === 'A,B');\n  assert (`${a}${b}${a}${b}` === 'ABAB');\n  assert (`${a},${b},${a},${b}` === 'A,B,A,B');\n  assert (`$${a},${b},${a},${b}$` === '$A,B,A,B$');\n\n  assert (`\\${}` === '${}');\n  assert (`$\\{}` === '${}');\n  assert (`x${  `y` + `z`  }x` === 'xyzx');\n  assert (`x${  `y` , `z`  }x` === 'xzx');\n\n  function f(x) { return x + 1; }\n\n  /* Precedence. */\n  var c = 1;\n  assert (`x${  f(1) * f(2)  }x${ c = 4 }` === 'x6x4');\n  assert (c === 4);\n  assert (`m${0 || 93}n${7 && 0}o` === 'm93n0o');\n\n  /* Result is always a string. */\n  assert (`${  function() { return true } () }` === 'true');\n  assert (`${  function() { return a.length } () }` === '1');\n\n  /* Result is a single string with its properties. */\n  assert(`${a}${b}${a}${b}`.length === 4);\n}\n\nmust_throw (\"`\");\nmust_throw (\"`${\");\nmust_throw (\"`${7\");\nmust_throw (\"`${}`\");\nmust_throw (\"`${1}\");\nmust_throw (\"`${1}.${\");\nmust_throw (\"`${1}.${2}\");\n\n// line break normalization\nvar cr = eval(\"`a\" + String.fromCharCode(13) + \"b`\");\nvar lf = eval(\"`a\" + String.fromCharCode(10) + \"b`\");\nvar crlf = eval(\"`a\" + String.fromCharCode(13,10) + \"b`\");\n\nassert(cr.length === 3);\nassert(lf.length === 3);\nassert(crlf.length === 3);\nassert(cr[1] === lf[1]);\nassert(lf[1] === crlf[1]);\nassert(crlf[1] === '\\n');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/test_suite_15.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_15_03_04_02__001() {\n  assert(Function.prototype.toString.hasOwnProperty('length'));\n  assert(delete Function.prototype.toString.length);\n  assert(!Function.prototype.toString.hasOwnProperty('length'));\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/test_suite_19.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_19_01_02__003() {\n  function test_set_prototype_of_success(o, proto, msg)\n  {\n    assert(o === Object.setPrototypeOf(o, proto));\n\n    if (msg)\n    {\n      print(msg + \" PASS\");\n    }\n  }\n\n  (function test_nonobject_o(undefined)\n  {\n    test_set_prototype_of_success(true, new Object(), \"Object.setPrototypeOf(boolean, ...)\");\n    test_set_prototype_of_success(3.14, new Object(), \"Object.setPrototypeOf(number, ...)\");\n    test_set_prototype_of_success(\"xyz\", new Object(), \"Object.setPrototypeOf(string, ...)\");\n  })()\n})();\n\n(function tc_19_01_02__006() {\n  function test_set_prototype_of_success_set(o, proto, msg)\n  {\n    assert(o === Object.setPrototypeOf(o, proto));\n    assert(proto === Object.getPrototypeOf(o));\n\n    if (msg)\n    {\n      print(msg + \" PASS\");\n    }\n  }\n\n  (function test_set_prototype_of(undefined)\n  {\n    test_set_prototype_of_success_set(new Object(), new Object(), \"Object.setPrototypeOf(o1, o2)\");\n    test_set_prototype_of_success_set(new Object(), null, \"Object.setPrototypeOf(o, null)\");\n  })()\n})();\n\n(function tc_19_01_02__004() {\n  function test_set_prototype_of_error(o, proto, msg)\n  {\n    var name = \"\";\n\n    try\n    {\n      Object.setPrototypeOf(o, proto);\n    }\n    catch (e)\n    {\n      name = e.name;\n    }\n\n    assert(name === \"TypeError\");\n\n    if (msg)\n    {\n      print(msg + \" PASS (XFAIL)\");\n    }\n  }\n\n  function test_set_prototype_of_success_set(o, proto, msg)\n  {\n    assert(o === Object.setPrototypeOf(o, proto));\n    assert(proto === Object.getPrototypeOf(o));\n\n    if (msg)\n    {\n      print(msg + \" PASS\");\n    }\n  }\n\n  (function test_nonextensible_o(undefined)\n  {\n    var o = new Object();\n    var o_proto = Object.getPrototypeOf(o);\n    Object.preventExtensions(o);\n\n    test_set_prototype_of_success_set(o, o_proto, \"Object.setPrototypeOf(o_nonext, o_nonext.__proto__)\");\n    test_set_prototype_of_error(o, new Object(), \"Object.setPrototypeOf(o_nonext, ...)\");\n  })()\n})();\n\n(function tc_19_01_02__002() {\n  function test_set_prototype_of_error(o, proto, msg)\n  {\n    var name = \"\";\n\n    try\n    {\n      Object.setPrototypeOf(o, proto);\n    }\n    catch (e)\n    {\n      name = e.name;\n    }\n\n    assert(name === \"TypeError\");\n\n    if (msg)\n    {\n      print(msg + \" PASS (XFAIL)\");\n    }\n  }\n\n  (function test_nonobject_proto(undefined)\n  {\n    test_set_prototype_of_error(new Object(), undefined, \"Object.setPrototypeOf(..., undefined)\");\n    test_set_prototype_of_error(new Object(), true, \"Object.setPrototypeOf(..., boolean)\");\n    test_set_prototype_of_error(new Object(), 3.14, \"Object.setPrototypeOf(..., number)\");\n    test_set_prototype_of_error(new Object(), \"xyz\", \"Object.setPrototypeOf(..., string)\");\n  })()\n})();\n\n(function tc_19_01_02__005() {\n  function test_set_prototype_of_error(o, proto, msg)\n  {\n    var name = \"\";\n\n    try\n    {\n      Object.setPrototypeOf(o, proto);\n    }\n    catch (e)\n    {\n      name = e.name;\n    }\n\n    assert(name === \"TypeError\");\n\n    if (msg)\n    {\n      print(msg + \" PASS (XFAIL)\");\n    }\n  }\n\n  (function test_circularity(undefined)\n  {\n    var o = new Object();\n\n    test_set_prototype_of_error(o, o, \"Object.setPrototypeOf(o, o)\");\n  })()\n})();\n\n(function tc_19_01_02__001() {\n  function test_set_prototype_of_error(o, proto, msg)\n  {\n    var name = \"\";\n\n    try\n    {\n      Object.setPrototypeOf(o, proto);\n    }\n    catch (e)\n    {\n      name = e.name;\n    }\n\n    assert(name === \"TypeError\");\n\n    if (msg)\n    {\n      print(msg + \" PASS (XFAIL)\");\n    }\n  }\n\n  (function test_incoercible_o(undefined)\n  {\n    test_set_prototype_of_error(undefined, new Object(), \"Object.setPrototypeOf(undefined, ...)\");\n    test_set_prototype_of_error(null, new Object(), \"Object.setPrototypeOf(null, ...)\");\n  })();\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/test_suite_22.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_22_02_02__004() {\n  function foo(v, k)\n  {\n    return this.num + v + k;\n  }\n\n  var a = Float32Array.from([10,20,30], foo, {num:0.5});\n\n  assert(a[0] === 10.5);\n  assert(a[1] === 21.5);\n  assert(a[2] === 32.5);\n})();\n\n/* ES11 22.2.1.1 - length is equal to 0 */\n(function tc_22_02_02__002() {\n  var a = Object.getPrototypeOf(Int8Array);\n  assert(a.length === 0);\n})();\n\n(function tc_22_02_02__003() {\n  var a = Object.getPrototypeOf(Int8Array);\n  var b = new Int8Array();\n  var c = Object.getPrototypeOf(Object.getPrototypeOf(b));\n  assert(c === a.prototype);\n})();\n\n(function tc_22_02_02__005() {\n  var name = \"\";\n\n  try\n  {\n    Int16Array.from.call(1);\n  }\n  catch (e)\n  {\n    name = e.name;\n  }\n\n  assert(name === \"TypeError\");\n\n  name = \"\";\n\n  try\n  {\n    Int16Array.from.call(Float32Array);\n  }\n  catch (e)\n  {\n    name = e.name;\n  }\n\n  assert(name === \"TypeError\");\n\n  name = \"\";\n\n  try\n  {\n    Int16Array.from.call(Float32Array, [1,2,3], 1);\n  }\n  catch (e)\n  {\n    name = e.name;\n  }\n\n  assert(name === \"TypeError\");\n\n  name = \"\";\n\n  try\n  {\n    Int16Array.from.call(Number, [1,2,3]);\n  }\n  catch (e)\n  {\n    name = e.name;\n  }\n\n  assert(name === \"TypeError\");\n})();\n\n(function tc_22_02_02__001() {\n  var a = Object.getPrototypeOf(Int8Array);\n  assert(a.name === \"TypedArray\");\n})();\n\n(function tc_22_02_01__013() {\n  var a = new Float32Array(2);\n\n  a[0] = 0.1;\n  a[1] = -2.3;\n\n  assert(a[0] === 0.10000000149011612);\n  assert(a[1] === -2.299999952316284);\n})();\n\n(function tc_22_02_01__021() {\n  var a = new Float32Array([0.1, 0.2, 0.3]);\n\n  var b = a.hasOwnProperty(1);\n  var c = a.hasOwnProperty(3);\n\n  assert (b === true);\n  assert (c === false);\n})();\n\n(function tc_22_02_01__002() {\n  var a = new Int8Array(5);\n  assert(a instanceof Int8Array);\n})();\n\n(function tc_22_02_01__006() {\n  var a = new Int8Array([1,2,3]);\n  assert(a instanceof Int8Array);\n})();\n\n(function tc_22_02_01__009() {\n  Int8Array.prototype[10] = 10;\n  var a = new Int8Array(5);\n  assert(a[10] === undefined);\n})();\n\n(function tc_22_02_01__015() {\n  var a = new Int32Array(8);\n\n  a[0] = 0xffffffff;\n  a[1] = 0xff00000001;\n  a[2] = 0xff80000001;\n  a[3] = -2.3;\n  a[4] = Number.NEGATIVE_INFINITY;\n  a[5] = NaN;\n  a[6] = 10e17;\n  a[7] = -10e17;\n\n  assert(a[0] === -1);\n  assert(a[1] === 1);\n  assert(a[2] === -2147483647);\n  assert(a[3] === -2);\n  assert(a[4] === 0);\n  assert(a[5] === 0);\n  assert(a[6] === -1486618624);\n  assert(a[7] === 1486618624);\n})();\n\n(function tc_22_02_01__018() {\n  var a = new Uint16Array(2);\n\n  a[0] = 0x123456789A;\n  a[1] = -2.3;\n\n  assert(a[0] === 0x789A);\n  assert(a[1] === 65534);\n})();\n\n(function tc_22_02_01__020() {\n  var name = \"\";\n\n  try\n  {\n    new Int16Array(Float32Array.prototype);\n  }\n  catch (e)\n  {\n    name = e.name;\n  }\n\n  assert(name === \"TypeError\");\n})();\n\n(function tc_22_02_01__016() {\n  var a = new Int8Array(3);\n\n  a[0] = 0xff;\n  a[1] = 0xff01;\n  a[2] = -2.3;\n\n  assert(a[0] === -1);\n  assert(a[1] === 1);\n  assert(a[2] === -2);\n})();\n\n(function tc_22_02_01__010() {\n  var a = new Float32Array([0.1, -3.4, 65535.9]);\n  var b = new Int16Array(a);\n  var c = new Uint8Array(a);\n  var d = new Int32Array(a);\n\n  assert(b[0] === 0);\n  assert(b[1] === -3);\n  assert(b[2] === -1);\n  assert(c[0] === 0);\n  assert(c[1] === 253);\n  assert(c[2] === 255);\n  assert(d[0] === 0);\n  assert(d[1] === -3);\n  assert(d[2] === 65535);\n})();\n\n(function tc_22_02_01__008() {\n  var a = new Int8Array([1.5,1000,-9]);\n  a[2] = a[1] * a[0];\n  assert(a[2] === -24);\n})();\n\n(function tc_22_02_01__014() {\n  var a = new Int16Array(3);\n\n  a[0] = 0xffff;\n  a[1] = 0xff0001;\n  a[2] = -2.3;\n\n  assert(a[0] === -1);\n  assert(a[1] === 1);\n  assert(a[2] === -2);\n})();\n\n(function tc_22_02_01__007() {\n  var a = new Int8Array(5);\n  assert(a[2] === 0);\n})();\n\n(function tc_22_02_01__017() {\n  var a = new Uint32Array(2);\n\n  a[0] = 0x123456789A;\n  a[1] = -2.3;\n\n  assert(a[0] === 0x3456789A);\n  assert(a[1] === 4294967294);\n})();\n\n(function tc_22_02_01__001() {\n  var a = new Int8Array();\n  assert(a instanceof Int8Array);\n})();\n\n(function tc_22_02_01__003() {\n  var a = new Int8Array('5');\n  assert(a instanceof Int8Array);\n})();\n\n(function tc_22_02_01__019() {\n  var a = new Uint8Array(2);\n\n  a[0] = 0x123456789A;\n  a[1] = -2.3;\n\n  assert(a[0] === 0x9A);\n  assert(a[1] === 254);\n})();\n\n(function tc_22_02_01__005() {\n  var a = new ArrayBuffer(5);\n  var b = new Int8Array(a);\n  assert(b instanceof Int8Array);\n})();\n\n(function tc_22_02_01__012() {\n  var a = new Float64Array(2);\n\n  a[0] = 0.1;\n  a[1] = -2.3;\n\n  assert(a[0] === 0.1);\n  assert(a[1] === -2.3);\n})();\n\n(function tc_22_02_01__011() {\n  var a = new Uint8ClampedArray([1.5, 2.5, -1.5, 10000]);\n\n  assert(a[0] === 2);\n  assert(a[1] === 2);\n  assert(a[2] === 0);\n  assert(a[3] === 255);\n})();\n\n(function tc_22_02_01__004() {\n  var a = new Int8Array(5);\n  var b = new Int8Array(a);\n  assert(a instanceof Int8Array);\n})();\n\n(function tc_22_02_03__015() {\n  var total = new Float32Array([-1.5, 0, 1.5, 2]).reduce(function(a, b, c) {\n    return a + b + c;\n  }, 10);\n\n  assert(total === 18);\n})();\n\n(function tc_22_02_03__003() {\n  var a = new Int8Array(5);\n  assert(a.byteLength === 5);\n})();\n\n(function tc_22_02_03__020() {\n  var uint8 = new Uint8Array(4);\n\n  uint8.set([10, \"11\", 12]);\n  assert(uint8[0] === 10 && uint8[1] === 11 && uint8[2] === 12);\n\n  uint8.set([13, 14.3, 15], 1);\n  assert(uint8[0] === 10 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([16], NaN);\n  assert(uint8[0] === 16 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([17], \"\");\n  assert(uint8[0] === 17 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([18], \"0\");\n  assert(uint8[0] === 18 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([19], false);\n  assert(uint8[0] === 19 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([20], 0.2);\n  assert(uint8[0] === 20 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([21], 0.9);\n  assert(uint8[0] === 21 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([22], null);\n  assert(uint8[0] === 22 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([23], {});\n  assert(uint8[0] === 23 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([24], []);\n  assert(uint8[0] === 24 && uint8[1] === 13 && uint8[2] === 14 && uint8[3] === 15);\n\n  uint8.set([25], true);\n  assert(uint8[0] === 24 && uint8[1] === 25 && uint8[2] === 14 && uint8[3] === 15);\n})();\n\n(function tc_22_02_03__011() {\n  var a = new Float32Array([1.25, 2.5, 3.75]);\n\n  var b = a.map(function(num) {\n    return num * 2;\n  });\n\n  assert(a[0] === 1.25);\n  assert(a[1] === 2.5);\n  assert(a[2] === 3.75);\n  assert(b[0] === 2.5);\n  assert(b[1] === 5);\n  assert(b[2] === 7.5);\n})();\n\n(function tc_22_02_03__002() {\n  var a = new Int8Array(5);\n  assert(a.byteOffset === 0);\n})();\n\n(function tc_22_02_03__012() {\n  var a = new Float32Array([1.1, 2.2, 3.3, 4.4]);\n  var count = 0;\n\n  function f_every(num)\n  {\n    count++;\n    return num < 3;\n  }\n\n  var ret = a.every(f_every);\n\n  assert(ret === false);\n  assert(count === 3);\n})();\n\n(function tc_22_02_03__007() {\n  var a = new Uint8Array([10, 20, 30, 40]);\n  var o = {\n    \"small\":0,\n    \"large\":0\n  };\n  var func = function(v, k)\n  {\n    if (v < 25)\n    {\n      this.small = this.small + k;\n    }\n    else\n    {\n      this.large = this.large + k;\n    }\n  }\n\n  var ret = a.forEach(func, o);\n\n  assert(ret === undefined);\n  assert(o.small === 1);\n  assert(o.large === 5);\n})();\n\n(function tc_22_02_03__021() {\n  var float64 = new Float64Array(4);\n  float64.set([10.1, \"11.2\", 12.3]);\n  assert(float64[0] === 10.1 && float64[1] === 11.2 && float64[2] === 12.3);\n\n  float64.set([13.1, 14.2, 15.3], 1);\n  assert(float64[0] === 10.1 && float64[1] === 13.1 && float64[2] === 14.2 && float64[3] === 15.3);\n\n  try\n  {\n\n    float64.set([17.1, 18.2, 19.3], 2);\n    assert(false);\n  } catch (e)\n  {\n    assert(e instanceof RangeError)\n  }\n})();\n\n(function tc_22_02_03__009() {\n  var a = new Uint8Array([1, 2, 3, 4]);\n  var count = 0;\n\n  function f_every(num)\n  {\n    count++;\n    return num < 3;\n  }\n\n  var ret = a.every(f_every);\n\n  assert(ret === false);\n  assert(count === 3);\n})();\n\n(function tc_22_02_03__014() {\n  var a = new Float32Array([-1.1, 0.1, 2.5, 3.0]);\n  var o = {\n    \"small\":0,\n    \"large\":0\n  };\n  var func = function(v, k)\n  {\n    if (v < 2)\n    {\n      this.small = this.small + k;\n    }\n    else\n    {\n      this.large = this.large + k;\n    }\n  }\n\n  var ret = a.forEach(func, o);\n\n  assert(ret === undefined);\n  assert(o.small === 1);\n  assert(o.large === 5);\n})();\n\n(function tc_22_02_03__001() {\n  var a = new Int8Array(5);\n  assert(a.length === 5);\n})();\n\n(function tc_22_02_03__010() {\n  var a = new Uint8Array([1, 2, 3, 4]);\n  var count = 0;\n\n  function f_some(num)\n  {\n    count++;\n    return num > 3;\n  }\n\n  var ret = a.some(f_some);\n\n  assert(ret === true);\n  assert(count === 4);\n})();\n\n(function tc_22_02_03__006() {\n  var a = new Int8Array([1,2,3,4,5]);\n  var b = new Int8Array(a.buffer, 2, 3);\n\n  b[0] = 5.6;\n  assert(a[2] === 5);\n})();\n\n(function tc_22_02_03__018() {\n  var a = new Float32Array([-1.5, 0, 1.5]);\n  var b = a.reverse()\n\n  assert(a === b);\n  assert(a[0] === 1.5);\n  assert(a[1] === 0);\n  assert(a[2] === -1.5);\n})();\n\n(function tc_22_02_03__008() {\n  var a = new Uint8Array([1, 2, 3]);\n\n  var b = a.map(function(num) {\n    return num * 2;\n  });\n\n  assert(a[0] === 1);\n  assert(a[1] === 2);\n  assert(a[2] === 3);\n  assert(b[0] === 2);\n  assert(b[1] === 4);\n  assert(b[2] === 6);\n})();\n\n(function tc_22_02_03__016() {\n  var total = new Float32Array([-1.5, 0, 1.5, 2]).reduceRight(function(a, b) {\n    return a - b;\n  });\n\n  assert (total === 2)\n})();\n\n(function tc_22_02_03__013() {\n  var a = new Float32Array([1.1, 2.2, 3.3, 4.4]);\n  var count = 0;\n\n  function f_some(num)\n  {\n    count++;\n    return num > 3;\n  }\n\n  var ret = a.some(f_some);\n\n  assert(ret === true);\n  assert(count === 3);\n})();\n\n(function tc_22_02_03__005() {\n  var a = new Int8Array([1,2,3,4,5]);\n  var b = new Int8Array(a.buffer, 2, 3);\n\n  assert(a.buffer === b.buffer);\n  assert(b.length === 3);\n  assert(b.byteOffset === 2);\n  assert(b.byteLength === 3);\n})();\n\n(function tc_22_02_03__017() {\n  var a = new Float32Array([-1.5, 0, 1.5, 2]);\n  var b = a.filter(function(x){\n    return x > 0;\n  });\n\n  assert(a[0] === -1.5);\n  assert(a[1] === 0);\n  assert(a[2] === 1.5);\n  assert(a[3] === 2);\n  assert(b[0] === 1.5);\n  assert(b[1] === 2);\n  assert(b.length === 2);\n})();\n\n(function tc_22_02_03__019() {\n  var uint8 = new Uint8Array(4);\n\n\n  assert(uint8.set.length === 1)\n\n  try\n  {\n    uint8.set([1], -1);\n    assert(false);\n  } catch (e)\n  {\n    assert(e instanceof RangeError);\n  }\n\n  try\n  {\n    uint8.set([1], - (Math.pow(2, 32) + 1));\n    assert(false);\n  } catch (e)\n  {\n    assert(e instanceof RangeError);\n  }\n\n  try\n  {\n    uint8.set([1], -Infinity);\n    assert(false);\n  } catch (e)\n  {\n    assert(e instanceof RangeError);\n  }\n\n  try\n  {\n    uint8.set([1], Infinity);\n    assert(false);\n  } catch (e)\n  {\n    assert(e instanceof RangeError);\n  }\n\n  try\n  {\n    uint8.set([1], (Math.pow(2, 32) + 1));\n    assert(false);\n  } catch (e)\n  {\n    assert(e instanceof RangeError);\n  }\n\n  try\n  {\n\n    uint8.set([17, 18, 19], 2);\n    assert(false);\n  } catch (e)\n  {\n    assert(e instanceof RangeError)\n  }\n})();\n\n(function tc_22_02_03__004() {\n  var a = new Int8Array(5);\n  assert(a.buffer instanceof ArrayBuffer);\n})();\n\n(function tc_22_02_06__001() {\n  assert(Int8Array.prototype.BYTES_PER_ELEMENT === 1);\n  assert(Uint8Array.prototype.BYTES_PER_ELEMENT === 1);\n  assert(Uint8ClampedArray.prototype.BYTES_PER_ELEMENT === 1);\n  assert(Int16Array.prototype.BYTES_PER_ELEMENT === 2);\n  assert(Uint16Array.prototype.BYTES_PER_ELEMENT === 2);\n  assert(Int32Array.prototype.BYTES_PER_ELEMENT === 4);\n  assert(Uint32Array.prototype.BYTES_PER_ELEMENT === 4);\n  assert(Float32Array.prototype.BYTES_PER_ELEMENT === 4);\n  assert(Float64Array.prototype.BYTES_PER_ELEMENT === 8);\n})();\n\n(function tc_22_02_05__001() {\n  assert(Int8Array.BYTES_PER_ELEMENT === 1);\n  assert(Uint8Array.BYTES_PER_ELEMENT === 1);\n  assert(Uint8ClampedArray.BYTES_PER_ELEMENT === 1);\n  assert(Int16Array.BYTES_PER_ELEMENT === 2);\n  assert(Uint16Array.BYTES_PER_ELEMENT === 2);\n  assert(Int32Array.BYTES_PER_ELEMENT === 4);\n  assert(Uint32Array.BYTES_PER_ELEMENT === 4);\n  assert(Float32Array.BYTES_PER_ELEMENT === 4);\n  assert(Float64Array.BYTES_PER_ELEMENT === 8);\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/test_suite_24.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_24_01_02__010() {\n  var a = new ArrayBuffer(NaN);\n  assert(a.byteLength === 0);\n})();\n\n(function tc_24_01_02__009() {\n  var a = new ArrayBuffer(undefined);\n  assert(a.byteLength === 0);\n})();\n\n(function tc_24_01_02__012() {\n  var name = \"\";\n  try\n  {\n    var a = new ArrayBuffer(-1.9);\n  }\n  catch (e)\n  {\n    name = e.name;\n  }\n\n  assert(name === \"RangeError\");\n})();\n\n(function tc_24_01_02__003() {\n  var a = new ArrayBuffer(\"5\");\n  assert(typeof a === 'object');\n  assert(a.byteLength === 5);\n})();\n\n(function tc_24_01_02__013() {\n  var name = \"\";\n  try\n  {\n    var a = new ArrayBuffer(Math.pow(2, 32) - 1);\n  }\n  catch (e)\n  {\n    name = e.name;\n  }\n\n  assert(name === \"RangeError\");\n})();\n\n(function tc_24_01_02__002() {\n  var a = new ArrayBuffer(5);\n  assert(typeof a === 'object');\n  assert(a.byteLength === 5);\n})();\n\n(function tc_24_01_02__007() {\n  var a = new ArrayBuffer(\"string\");\n  assert(a.byteLength === 0);\n})();\n\n(function tc_24_01_02__006() {\n  var a = new ArrayBuffer(5.5);\n  assert(a.byteLength === 5);\n})();\n\n(function tc_24_01_02__004() {\n  var name = \"\";\n\n  try\n  {\n    var a = ArrayBuffer();\n  }\n  catch (e)\n  {\n    name = e.name;\n  }\n\n  assert(name === \"TypeError\");\n})();\n\n(function tc_24_01_02__005() {\n  assert(ArrayBuffer.length === 1);\n})();\n\n(function tc_24_01_02__001() {\n  var a = new ArrayBuffer();\n  assert(typeof a === 'object');\n  assert(a.byteLength === 0);\n})();\n\n(function tc_24_01_02__008() {\n  var obj = {};\n  var a = new ArrayBuffer(obj);\n  assert(a.byteLength === 0);\n})();\n\n(function tc_24_01_02__011() {\n  var a = new ArrayBuffer(-0.3);\n  assert(a.byteLength === 0);\n\n  var b = new ArrayBuffer(-0.9);\n  assert(b.byteLength === 0);\n})();\n\n(function tc_24_01_04__002() {\n  var a = new ArrayBuffer(5);\n  assert(a.byteLength === 5);\n})();\n\n(function tc_24_01_04__006() {\n  var a = new ArrayBuffer(5);\n  var b = a.slice (3, 2);\n  assert(b.byteLength === 0);\n})();\n\n(function tc_24_01_04__001() {\n  assert(ArrayBuffer.prototype.constructor === ArrayBuffer);\n})();\n\n(function tc_24_01_04__004() {\n  var a = new ArrayBuffer(5);\n  var b = a.slice (1, 3);\n  assert(b.byteLength === 2);\n})();\n\n(function tc_24_01_04__003() {\n  var a = new ArrayBuffer(5);\n  a.byteLength = 10;\n  assert(a.byteLength === 5);\n})();\n\n(function tc_24_01_04__007() {\n  var a = new ArrayBuffer(5);\n  var b = a.slice();\n  assert(b.byteLength === 5);\n})();\n\n(function tc_24_01_04__005() {\n  var a = new ArrayBuffer(5);\n  var b = a.slice(1, -2);\n  assert(b.byteLength === 2);\n})();\n\n(function tc_24_01_03__001() {\n  assert(typeof ArrayBuffer.prototype === 'object');\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/test_suite_25.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_25_04_05__004() {\n  var a = new Promise(function(f, r){\n    f(\"a\");\n  });\n\n  var b = new Promise(function(f, r){\n    f(a);\n  })\n\n  b.then(function(x) {\n    assert (x === \"a\");\n  })\n})();\n\n(function tc_25_04_05__002() {\n  var obj = {name:\"\"};\n\n  var a = new Promise(function(f, r){\n    obj.name = obj.name + \"a\";\n    f(obj);\n  });\n\n  a.then(function(x) {\n    x.name = x.name + \"b\";\n    return x;\n  }).then(null, function(x) {\n    x.name = x.name + \"c\";\n    return x;\n  }).then(function(x) {\n    x.name = x.name + \"d\";\n    assert (obj.name === \"aebd\");\n  });\n\n  obj.name = obj.name + \"e\";\n\n  assert (obj.name === \"ae\")\n})();\n\n(function tc_25_04_05__006() {\n  var p = Promise.resolve(1).then(function(x) {\n    assert(x === 1);\n    return Promise.resolve(2);\n  }).then(function(x) {\n    assert(x === 2);\n    return Promise.reject(3);\n  }).catch(function(x) {\n    assert(x === 3);\n  });\n})();\n\n(function tc_25_04_05__001() {\n  assert (Promise.length === 1);\n})();\n\n(function tc_25_04_05__003() {\n  var a = new Promise(function(f, r){\n    r(0);\n  });\n\n  a\n  .then(function f1(x) {\n    return x + 1;\n  }, function r1(x){\n    return x + 10;\n  })\n  .then(function f2(x) {\n    throw x + 100\n  })\n  .then(function f3(x) {\n    return x + 1000\n  }, function r3(x) {\n    return x + 10000\n  })\n  .then(function(x) {\n    assert (x === 10110);\n  })\n})();\n\n(function tc_25_04_05__005() {\n  Promise.reject(\"abc\").catch(function(x)\n  {\n    assert (x === \"abc\");\n    return \"def\";\n  }).then(function(x) {\n    assert (x === \"def\");\n  });\n})();\n\n(function tc_25_04_04__005() {\n  var a = Promise.resolve('a');\n  var b = Promise.resolve('b');\n  var c = Promise.reject('c');\n\n  Promise.all([a, b, 1]).then(function(x)\n  {\n    assert (x[0] === 'a');\n    assert (x[1] === 'b');\n    assert (x[2] === 1);\n  }, function(x)\n  {\n    assert (false);\n  });\n\n  Promise.all([a, b, c, 1]).then(function(x)\n  {\n    assert (false);\n  }, function(x)\n  {\n    assert (x === 'c');\n  });\n\n  Promise.all([]).then(function(x)\n  {\n    assert (x.length === 0);\n  }, function(x)\n  {\n    assert (false);\n  });\n\n  Promise.all(a).then(function(x)\n  {\n    assert (false);\n  }, function(x)\n  {\n    assert(x.name === \"TypeError\");\n  });\n})();\n\n(function tc_25_04_04__001() {\n  Promise.resolve(\"abc\").then(function(x)\n  {\n    assert (x === \"abc\");\n  });\n})();\n\n(function tc_25_04_04__003() {\n  Promise.reject(\"abc\").then(function(x)\n  {\n    assert (false);\n  }, function(x)\n  {\n    assert (x === \"abc\");\n  });\n})();\n\n(function tc_25_04_04__002() {\n  var a = new Promise(function(f)\n  {\n    var o = {name: \"abc\"};\n    f(o);\n  })\n\n  Promise.resolve(a).then(function(x)\n  {\n    assert (x.name === \"abc\");\n  });\n})();\n\n(function tc_25_04_04__004() {\n  var a = Promise.resolve('a');\n  var b = Promise.reject('b');\n\n  Promise.race([a, b]).then(function(x)\n  {\n    assert (x === 'a');\n  }, function(x)\n  {\n    assert (false);\n  });\n\n  Promise.race([b, a]).then(function(x)\n  {\n    assert (false);\n  }, function(x)\n  {\n    assert (x === 'b');\n  });\n\n  Promise.race([ ,b, a]).then(function(x)\n  {\n    assert (x === undefined);\n  }, function(x)\n  {\n    assert (false);\n  });\n\n  Promise.race(a).then(function(x)\n  {\n    assert (false);\n  }, function(x)\n  {\n    assert(x.name === \"TypeError\");\n  });\n})();\n\n(function tc_25_04_03__002() {\n  var name1 = \"\";\n  var name2 = \"\";\n  var name3 = \"\";\n  function foo() {};\n\n  try\n  {\n    new Promise();\n  }\n  catch (e)\n  {\n    name1 = e.name;\n  }\n\n  try\n  {\n    Promise(foo);\n  }\n  catch (e)\n  {\n    name2 = e.name;\n  }\n\n  try\n  {\n    new Promise(\"string\");\n  }\n  catch (e)\n  {\n    name3 = e.name;\n  }\n\n  assert (name1 === \"TypeError\");\n  assert (name2 === \"TypeError\");\n  assert (name3 === \"TypeError\");\n})();\n\n(function tc_25_04_03__001() {\n  function foo() {};\n\n  var a = new Promise(foo);\n\n  assert (a instanceof Promise);\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/to-length.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction compareArray(a, b) {\n  if (b.length !== a.length) {\n    return false;\n  }\n\n  for (var i = 0; i < a.length; i++) {\n    if (b[i] !== a[i]) {\n      return false;\n    }\n  }\n  return true;\n}\n\n// concat\n(function() {\n  try {\n    Array.prototype.concat.call({}, {[Symbol.isConcatSpreadable]: true, length : 2 **53 - 1})\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n\n  try {\n    Array.prototype.concat.call([1, 2, 3, 4], {[Symbol.isConcatSpreadable]: true, length : 2 **53 - 4})\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n})();\n\n// fill\n(function() {\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 - 5] : 'foo'}\n  Array.prototype.fill.call(obj, 'bar', 2 ** 53 - 5)\n\n  assert(obj[2 ** 53 - 5] === 'bar');\n  assert(obj[2 ** 53 - 4] === 'bar');\n  assert(obj[2 ** 53 - 3] === 'bar');\n  assert(obj[2 ** 53 - 2] === 'bar');\n\n  obj = { length: 2 ** 53 + 2, [2 ** 53 - 2] : 'foo'}\n  Array.prototype.fill.call(obj, 'bar', 2 ** 53 - 2)\n\n  assert(obj[2 ** 53 - 2] === 'bar');\n  assert(obj[2 ** 53 - 1] === undefined);\n})();\n\n// includes\n(function() {\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 - 5] : 'foo'}\n  assert(Array.prototype.includes.call(obj, 'foo', 2 ** 53 - 10) === true);\n\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 + 5] : 'foo'}\n  assert(Array.prototype.includes.call(obj, 'foo', 2 ** 53 - 10) === false);\n})();\n\n// indexOf\n(function() {\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 - 5] : 'foo'}\n  assert(Array.prototype.indexOf.call(obj, 'foo', 2 ** 53 - 10) === 2 ** 53 - 5);\n\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 + 5] : 'foo'}\n  assert(Array.prototype.indexOf.call(obj, 'foo', 2 ** 53 - 10) === -1);\n})();\n\n// lastIndexOf\n(function() {\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 - 5] : 'foo', [2 ** 53 - 6] : 'foo'}\n  assert(Array.prototype.lastIndexOf.call(obj, 'foo', 2 ** 53 - 2) === 2 ** 53 - 5);\n\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 - 5] : 'foo', [2 ** 53 - 6] : 'foo'}\n  assert(Array.prototype.lastIndexOf.call(obj, 'foo', 10) === -1);\n})();\n\n\n// pop\n(function() {\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 - 2] : 'foo', [2 ** 53 - 3] : 'bar'}\n  assert(Array.prototype.pop.call(obj) === 'foo');\n  assert(obj.length === 2 ** 53 - 2);\n\n  assert(Array.prototype.pop.call(obj) === 'bar');\n  assert(obj.length === 2 ** 53 - 3);\n})();\n\n// push\n(function() {\n  var obj = { length: 2 ** 53 - 1 };\n  try {\n    Array.prototype.push.call(obj, 'foo');\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n\n  var obj = { length: 2 ** 53 - 2, [2 ** 53 - 3] : 'foo'}\n\n  assert(Array.prototype.push.call(obj, 'bar') === 2 ** 53 - 1);\n  assert(obj.length === 2 ** 53 - 1);\n})();\n\n// slice\n(function() {\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 - 5] : 'foo', [2 ** 53 - 2] : 'bar'};\n  var sliced = Array.prototype.slice.call(obj, 2 ** 53 - 10);\n  assert(compareArray(sliced, [,,,,,'foo',,,'bar']));\n\n  var sliced = Array.prototype.slice.call(obj, 2 ** 53 - 8, 2 ** 53 - 4);\n  assert(compareArray(sliced, [,,,'foo',]));\n})();\n\n// splice\n(function() {\n  var obj = { length: 2 ** 53 - 1, [2 ** 53 - 5] : 'foo', [2 ** 53 - 2] : 'bar'};\n  var spliced = Array.prototype.splice.call(obj, 2 ** 53 - 10, 5, '1', '2', '3', '4');\n  assert(compareArray(spliced, [,,,,,]));\n  assert(obj.length === 2 ** 53 - 2);\n  assert(obj[2 ** 53 - 3] === 'bar');\n  assert(obj[2 ** 53 - 6] === 'foo');\n  assert(obj[2 ** 53 - 7] === '4');\n  assert(obj[2 ** 53 - 8] === '3');\n  assert(obj[2 ** 53 - 9] === '2');\n  assert(obj[2 ** 53 - 10] === '1');\n})();\n\n// unshift\n(function() {\n  var obj = { length: 2 ** 53 - 1 };\n  try {\n    Array.prototype.unshift.call(obj, 'foo');\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/to-number-string.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nassert(+\"0b1101001\" === 105);\nassert(+\"0B1101001\" === 105);\nassert(+\"0o767\" === 503);\nassert(+\"0O767\" === 503);\n\nfunction assertNaN(str) {\n  assert(isNaN(+str));\n}\n\nassertNaN(\"0b\");\nassertNaN(\"0b12\");\nassertNaN(\"0b10101100103\");\nassertNaN(\"0b101foo\");\nassertNaN(\"0bfoo101\");\nassertNaN(\"0b12345\");\n\nassertNaN(\"0B\");\nassertNaN(\"0B12\");\nassertNaN(\"0B10101100103\");\nassertNaN(\"0B101foo\");\nassertNaN(\"0Bfoo101\");\nassertNaN(\"0B12345\");\n\nassertNaN(\"0o\");\nassertNaN(\"0o1289\");\nassertNaN(\"0o88888\");\nassertNaN(\"0o12345foo\");\nassertNaN(\"0ofoo12345\");\n\nassertNaN(\"0O\");\nassertNaN(\"0O1289\");\nassertNaN(\"0O88888\");\nassertNaN(\"0O12345foo\");\nassertNaN(\"0Ofoo12345\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/to-property-key.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Test if the ToPropertyKey operation calls the @@ToPrimitive symbol */\n\nvar obj_A = {};\nvar sym = Symbol();\n\nvar toprimitive_called = 0;\n\nvar wrap = {\n    [Symbol.toPrimitive]: function() {\n        toprimitive_called++;\n        return sym;\n    }\n};\n\n/* <object>.hasOwnProperty calls the ToPropertyKey operation */\nassert (obj_A.hasOwnProperty (wrap) === false);\nassert (toprimitive_called === 1);\n\n/* \"in\" operator calls the ToPropertyKey operation */\nassert ((wrap in obj_A) === false);\nassert (toprimitive_called === 2);\n\nobj_A[sym] = 0;\n\n/* <object>.hasOwnProperty calls the ToPropertyKey operation */\nassert (obj_A.hasOwnProperty (wrap) === true);\nassert (toprimitive_called === 3);\n\n/* \"in\" operator calls the ToPropertyKey operation */\nassert ((wrap in obj_A) === true);\nassert (toprimitive_called === 4);\n\n\nvar obj_B = {};\n\n/* <object>.hasOwnProperty calls the ToPropertyKey operation */\nassert (obj_B.hasOwnProperty (wrap) === false);\nassert (toprimitive_called === 5);\n\n/* Object.defineProperty calls the ToPropertyKey operation */\nObject.defineProperty (obj_B, wrap, {\n  value: -1,\n  enumerable: false,\n  configurable: true,\n  writable: true\n});\nassert (toprimitive_called === 6);\n\nassert (obj_B[sym] === -1);\n\n/* Object.getOwnPropertyDescriptor calls the ToPropertyKey operation */\nvar desc = Object.getOwnPropertyDescriptor (obj_B, wrap);\nassert (toprimitive_called === 7);\n\nassert (desc.value === -1);\nassert (desc.enumerable === false);\nassert (desc.configurable === true);\nassert (desc.writable === true);\n\n/* Reflect.get calls the ToPropertyKey operation */\nassert (Reflect.get (obj_B, wrap) === -1);\nassert (toprimitive_called === 8);\n\n/* Reflect.deleteProperty calls the ToPropertyKey operation */\nassert (Reflect.deleteProperty (obj_B, wrap) === true);\nassert (toprimitive_called === 9);\n\n/* Reflect.has calls the ToPropertyKey operation */\nassert (Reflect.has (obj_B, wrap) === false);\nassert (toprimitive_called === 10);\n\n/* Reflect.defineProperty calls the ToPropertyKey operation */\nReflect.defineProperty (obj_B, wrap, {\n  value: 50,\n  enumerable: false,\n  configurable: true,\n  writable: true\n});\n\nassert (toprimitive_called === 11);\n\n/* Reflect.getOwnPropertyDescriptor calls the ToPropertyKey operation */\nvar desc_B = Reflect.getOwnPropertyDescriptor (obj_B, wrap);\nassert (toprimitive_called === 12);\n\nassert (desc_B.value === 50);\nassert (desc_B.enumerable === false);\nassert (desc_B.configurable === true);\nassert (desc_B.writable === true);\n\n/* Delete calls the ToPropertyKey operation */\ndelete obj_B[wrap];\nassert (toprimitive_called === 13);\n\n/* Get calls the ToPropertyKey operation */\nassert (obj_B[wrap] === undefined);\nassert (toprimitive_called === 14);\n\n/* Computed property calls the ToPropertyKey operation */\nvar obj_C = {\n    [wrap]: function() { return 100; }\n};\nassert (toprimitive_called === 15);\nassert (obj_C[sym]() === 100);\n\n/* Setter/Getter will each call the ToPropertyKey operation */\nvar obj_D = {\n    get [wrap] () { return 150; },\n    set [wrap] (value) { }\n};\nassert (toprimitive_called === 17);\nassert (obj_D[sym] === 150);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/try-catch.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar e = -1\n\nfunction f1()\n{\n  assert(e === undefined)\n  try {\n    throw 0\n  } catch (e) {\n    var e = 1\n    assert(e === 1)\n  }\n  assert(e === undefined)\n}\nf1()\n\nfunction f2()\n{\n  assert(e === undefined)\n  try {\n    throw 0\n  } catch (e) {\n    {\n      var e = 2\n      assert(e === 2)\n    }\n    assert(e === 2)\n  }\n  assert(e === undefined)\n}\nf2()\n\nfunction f3()\n{\n  assert(e === -1)\n  try {\n    throw [0]\n  } catch ([e]) {\n    {\n      try {\n        eval(\"var e = 2\")\n        assert(false)\n      } catch (e) {\n        assert(e instanceof SyntaxError)\n      }\n    }\n    assert(e === 0)\n  }\n  assert(e === -1)\n}\nf3()\n\nfunction f4()\n{\n  assert(e === undefined)\n  try {\n    throw 0\n  } catch (e) {\n    {\n      function e() { return 3 }\n      assert(e() === 3)\n    }\n    assert(e === 0)\n  }\n  assert(e() === 3)\n}\nf4()\n\nfunction f5()\n{\n  assert(e === -1)\n  try {\n    throw 0\n  } catch (e) {\n    {\n      eval(\"function e() { return 3 } assert(e === 0)\")\n      assert(e === 0)\n    }\n    assert(e === 0)\n  }\n  assert(e() === 3)\n}\nf5()\n\nfunction f6()\n{\n  let e = 4;\n  assert(e === 4)\n  try {\n    throw 0\n  } catch (e) {\n    {\n      function e() { return 5 }\n      assert(e() === 5)\n    }\n    assert(e === 0)\n  }\n  assert(e === 4)\n}\nf6()\n\nfunction f7()\n{\n  let e = 6;\n  assert(e === 6)\n  try {\n    throw 0\n  } catch (e) {\n    {\n      eval(\"function e() { return 7 } assert(e() === 7)\")\n    }\n    assert(e === 0)\n  }\n  assert(e === 6)\n}\nf7()\n\nfunction f8()\n{\n  var cnt = 0;\n\n  try {\n    throw \"A\"\n    asert(false)\n  } catch {\n    cnt++\n  }\n\n  let i = 0\n  const j = 0\n\n  try {\n    throw {}\n    asert(false)\n  } catch {\n    const i = 1.5\n    let j = 2\n    cnt += i * j\n  }\n\n  assert(i === 0)\n  assert(j === 0)\n  return cnt\n}\n\ntry {\n  assert(f8() === 4)\n} catch {\n  assert(false)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/try-pattern.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction check_syntax_error(code)\n{\n  try {\n    eval(code);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof SyntaxError);\n  }\n}\n\ncheck_syntax_error(\"try {} catch() {}\");\ncheck_syntax_error(\"try {} catch([a] {}\");\ncheck_syntax_error(\"try {} catch([a] = [1]) {}\");\ncheck_syntax_error(\"try {} catch({a} = {a:1}) {}\");\ncheck_syntax_error(\"try {} catch(a,) {}\");\ncheck_syntax_error(\"try {} catch(a) { function a() {} }\");\ncheck_syntax_error(\"try {} catch(a) { { function a() {} } function a() {} }\");\ncheck_syntax_error(\"try {} catch([a]) { var a }\");\ncheck_syntax_error(\"try {} catch([a]) { { var a } }\");\ncheck_syntax_error(\"try {} catch([a]) { function a() {} }\");\n\ntry {\n  throw [1,2]\n  assert(false)\n} catch ([a, b]) {\n  assert(a === 1)\n  assert(b === 2)\n}\n\ntry {\n  throw { x:1, y:2 }\n  assert(false)\n} catch ({x, 'y':b}) {\n  assert(x === 1)\n  assert(b === 2)\n}\n\ntry {\n  throw [1,2]\n  assert(false)\n} catch ([a, b]) {\n  eval(\"assert(a === 1)\")\n  eval(\"assert(b === 2)\")\n}\n\ntry {\n  throw { x:1, y:2 }\n  assert(false)\n} catch ({x, 'y':b}) {\n  eval(\"assert(x === 1)\")\n  eval(\"assert(b === 2)\")\n}\n\ntry {\n  try {\n    throw []\n    assert(false)\n  } catch ([a = b, b]) {\n    assert(false)\n  }\n} catch (e) {\n  assert(e instanceof ReferenceError)\n}\n\ntry {\n  throw [{a : 5}];\n} catch([{a}]) {\n  assert(a === 5);\n}\n\nvar catchReached = false;\ntry {\n  throw [{}];\n  assert(false);\n} catch([{}]) {\n  catchReached = true;\n}\n\nassert(catchReached);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedArray-fill.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar a = new Int32Array([1, 2, 3, 4, 5]);\nassert(a.fill(0).toString() === '0,0,0,0,0');\nassert(a.toString() === '0,0,0,0,0');\nassert(a.fill(1, 3).toString() === '0,0,0,1,1');\nassert(a.toString() === '0,0,0,1,1');\nassert(a.fill(2, 1, 3).toString() === '0,2,2,1,1');\nassert(a.toString() === '0,2,2,1,1');\nassert(a.fill(3, -3).toString() === '0,2,3,3,3');\nassert(a.toString() === '0,2,3,3,3');\nassert(a.fill(4, -3, -1).toString() === '0,2,4,4,3');\nassert(a.toString() === '0,2,4,4,3');\nassert(a.fill(5, 3, 2).toString() === '0,2,4,4,3');\nassert(a.toString() === '0,2,4,4,3');\nassert(a.fill(6, -2, -3).toString() === '0,2,4,4,3');\nassert(a.toString() === '0,2,4,4,3');\nassert(a.fill(7, 4, 1).toString() === '0,2,4,4,3');\nassert(a.toString() === '0,2,4,4,3');\nassert(a.fill(8, -1, -4).toString() === '0,2,4,4,3');\nassert(a.toString() === '0,2,4,4,3');\nassert(a.fill(9, 1).fill(10, 1).toString() === '0,10,10,10,10');\nassert(a.toString() === '0,10,10,10,10');\nassert(a.fill(11, 0, 4).fill(12, 1, 2).toString() === '11,12,11,11,10');\nassert(a.toString() === '11,12,11,11,10');\nassert(a.fill(13, 999, 1000).fill(14, -1000, -999).toString() === '11,12,11,11,10');\nassert(a.toString() === '11,12,11,11,10');\nassert(a.fill(14, 0, 0).toString() === '11,12,11,11,10');\nassert(a.toString() === '11,12,11,11,10');\nassert(a.fill(15, a.length, a.length).toString() === '11,12,11,11,10');\nassert(a.toString() === '11,12,11,11,10');\nassert(a.fill(NaN).toString() === '0,0,0,0,0'); // NaN gets coerced into an integer.\nassert(a.toString() === '0,0,0,0,0');\nassert(a.fill({ valueOf: () => 16 }).toString() === '16,16,16,16,16');\nassert(a.toString() === '16,16,16,16,16');\n\nvar b = new Uint8Array();\nassert(b.fill(1).toString() === '');\nassert(b.toString() === '');\nassert(b.fill(2, 0, 0).toString() === '');\nassert(b.toString() === '');\nassert(b.fill(3, b.length, b.length).toString() === '');\nassert(b.toString() === '');\n\nvar c = new Uint8Array([0]);\nassert(c.fill(256).toString() === '0');\nassert(c.toString() === '0');\nassert(c.fill(257).toString() === '1');\nassert(c.toString() === '1');\n\ntry {\n  c.fill({});\n} catch (e) {\n  assert(e instanceof TypeError);\n  assert(c.toString() === '1');\n}\n\nvar d = new Float32Array([0]);\nassert(d.fill(NaN).toString() === 'NaN');\nassert(d.toString() === 'NaN');\n\nvar ab = new ArrayBuffer(4);\nvar e = new Uint8Array(ab);\nassert(e.fill(0).toString() === '0,0,0,0');\n\nvar f = new Uint32Array(ab);\nassert(f.fill(1).toString() === '1');\nassert(e.toString() === '1,0,0,0');\n\nvar g = new Uint8Array(ab, 1, 2);\nassert(g.toString() === '0,0');\nassert(g.fill(2).toString() === '2,2');\nassert(e.toString() === '1,2,2,0');\nassert(g.fill(3, -1).toString() === '2,3');\nassert(e.toString() === '1,2,3,0');\nassert(g.fill(4, 0, 2).toString() === '4,4');\nassert(e.toString() === '1,4,4,0');\nassert(g.fill(5, 0, 999).toString() === '5,5');\nassert(e.toString() === '1,5,5,0');\nassert(g.fill(6, -999, 999).toString() === '6,6');\nassert(e.toString() === '1,6,6,0');\nassert(g.fill(7, -999, 0).toString() === '6,6');\nassert(e.toString() === '1,6,6,0');\n\nvar ab2 = new ArrayBuffer(4);\nvar h = new Uint8Array(ab2);\nvar i = new Uint16Array(ab2, 0, 1);\nassert(i.fill(1).toString() === '1');\nassert(h.toString() === '1,0,0,0');\nvar j = new Uint16Array(ab2, 2, 1);\nassert(j.fill(1).toString() === '1');\nassert(h.toString() === '1,0,1,0');\n\nvar k = new BigInt64Array([1n, 2n, 3n, 4n, 5n]);\nassert(k.fill(1n, 1, 4).toString() === '1,1,1,1,5');\nassert(k.fill(18446744073709551616n, 0, 5).toString() === '0,0,0,0,0');\nassert(k.fill(-5n, 3, 5).toString() === '0,0,0,-5,-5');\n\nvar l = new BigUint64Array([1n, 2n, 3n, 4n, 5n]);\nassert(l.fill(-18446744073709551614n, 3, 5).toString() === '1,2,3,2,2');\nassert(l.fill(18446744073709551614n, 4).toString() === '1,2,3,2,18446744073709551614');\n\nvar invalid = {\n  valueOf: function() {\n    throw new Error();\n  }\n};\n\nvar m = new BigInt64Array();\ntry {\n  m.fill(1n, invalid);\n  assert(false)\n} catch (e) {\n  assert(e instanceof Error);\n}\n\ntry {\n  m.fill(1n, 0, invalid);\n  assert(false)\n} catch (e) {\n  assert(e instanceof Error);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedArray-find-index.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrow_is_available = false;\n\ntry {\n  assert (eval (\"(f => 5) ()\") === 5);\n  arrow_is_available = true;\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nvar typedArrayTypes = [Int8Array,\n                       Uint8Array,\n                       Uint8ClampedArray,\n                       Int16Array,\n                       Uint16Array,\n                       Int32Array,\n                       Uint32Array,\n                       Float32Array,\n                       Float64Array];\n\n\ntypedArrayTypes.forEach (function (TypedArray) {\n\n  var array1 = new TypedArray ([5, 12, 0, 8, 120, 44]);\n\n  function bigger_than_10 (element) {\n    return element > 10;\n  }\n\n  assert (array1.findIndex (bigger_than_10) === 1);\n\n  function less_than_0 (element) {\n    if (element == 0) {\n      throw new Error (\"zero\");\n    }\n    return element < 0;\n  }\n\n  try {\n    array1.findIndex (less_than_0);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof Error);\n    assert (e.message === \"zero\");\n  }\n\n  if (arrow_is_available) {\n    assert (eval (\"array1.findIndex (e => e > 100)\") === 4);\n  }\n\n  /* Test the callback function arguments */\n  var src_array = new TypedArray ([4, 6, 8, 12]);\n  var array_index = 0;\n\n  function isPrime (element, index, array) {\n    assert (array_index++ === index);\n    assert (array === src_array)\n    assert (element === array[index]);\n\n    var start = 2;\n    while (start <= Math.sqrt (element)) {\n      if (element % start++ < 1) {\n        return false;\n      }\n    }\n    return element > 1;\n  }\n\n  assert (src_array.findIndex (isPrime) === -1);\n\n  src_array = new TypedArray ([4, 5, 8, 12]);\n  array_index = 0;\n  assert (src_array.findIndex (isPrime) === 1);\n\n  // Checking behavior when the given object is not %TypedArray%\n  try {\n    TypedArray.prototype.findIndex.call (5);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  // Checking behavior when the first argument is not a callback\n  var array = new TypedArray ([1, 2, 3]);\n\n  try {\n    array.findIndex (5);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  // Checking behavior when the first argument does not exist\n  try {\n    array.findIndex ();\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  // Checking behavior when there are more than 2 arguments\n  assert (array.findIndex (function (e) { return e < 2 }, {}, 8, 4, 5, 6, 6) === 0);\n})\n\nfunction isNegative(element, index, array) {\n  return element < 0;\n}\n\nfunction isBigger(element, index, array) {\n  return element > 40n;\n}\n\nvar bigint_array = new BigInt64Array([10n, -20n, 30n, -40n, 50n]);\nvar biguint_array = new BigUint64Array([10n, 20n, 30n, 40n, 50n]);\n\nassert(bigint_array.findIndex(isNegative) === 1);\nassert(biguint_array.findIndex(isBigger) === 4);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedArray-find.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrow_is_available = false;\n\ntry {\n  assert (eval (\"(f => 5) ()\") === 5);\n  arrow_is_available = true;\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nvar typedArrayTypes = [Int8Array,\n                       Uint8Array,\n                       Uint8ClampedArray,\n                       Int16Array,\n                       Uint16Array,\n                       Int32Array,\n                       Uint32Array,\n                       Float32Array,\n                       Float64Array];\n\n\ntypedArrayTypes.forEach (function (TypedArray) {\n\n  var array1 = new TypedArray ([5, 12, 0, 8, 120, 44]);\n\n  function bigger_than_10 (element) {\n    return element > 10;\n  }\n\n  assert (array1.find (bigger_than_10) === 12);\n\n  function less_than_0 (element) {\n    if (element == 0) {\n      throw new Error (\"zero\");\n    }\n    return element < 0;\n  }\n\n  try {\n    array1.find (less_than_0);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof Error);\n    assert (e.message === \"zero\");\n  }\n\n  if (arrow_is_available) {\n      assert (eval (\"array1.find (e => e > 100)\") === 120);\n  }\n\n  /* Test the callback function arguments */\n  var src_array = new TypedArray ([4, 6, 8, 12]);\n  var array_index = 0;\n\n  function isPrime (element, index, array) {\n    assert (array_index++ === index);\n    assert (array === src_array)\n    assert (element === array[index]);\n\n    var start = 2;\n    while (start <= Math.sqrt (element)) {\n      if (element % start++ < 1) {\n        return false;\n      }\n    }\n    return element > 1;\n  }\n\n  assert (src_array.find (isPrime) === undefined);\n\n  src_array = new TypedArray ([4, 5, 8, 12]);\n  array_index = 0;\n  assert (src_array.find (isPrime) === 5);\n\n  // Checking behavior when the given object is not %TypedArray%\n  try {\n    TypedArray.prototype.find.call (5);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  // Checking behavior when the first argument is not a callback\n  var array = new TypedArray ([1, 2, 3]);\n\n  try {\n    array.find (5);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  // Checking behavior when the first argument is not exists\n  try {\n    array.find ();\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  // Checking behavior when the there are more than 2 arguments\n  assert (array.find (function (e) { return e < 2 }, {}, 8, 4, 5, 6, 6) === 1);\n})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedArray-join.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar float_array = new Float32Array([1.125, 5.5, -1.25, -0.0]);\nvar int_array = new Int8Array([3, 2, 1, 100, -30]);\nvar uint_array = new Uint8Array([3, 2, 1, 100, -30]);\nvar empty_array = new Uint32Array();\n\nassert(float_array.join() === float_array.toString());\nassert(int_array.join('-') === \"3-2-1-100--30\");\nassert(uint_array.join('=') === \"3=2=1=100=226\");\nassert(empty_array.join('_') === \"\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedArray-set-with-typedArray.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar a = new Int32Array([1, 2, 3, 4, 5]);\nvar b = new Int32Array(5);\n\ntry {\n  a.set(b, 123456);\n  assert(1 === 0); // Should not get here.\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n\nb.set(a);\nassert(b.join() === '1,2,3,4,5');\ntry {\n  b.set(a, 1);\n  assert(1 === 0); // Should not get here.\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n\nb.set(new Int32Array([99, 98]), 2);\nassert(b.join() === '1,2,99,98,5');\n\nb.set(new Int32Array([99, 98, 97]), 2);\nassert(b.join() === '1,2,99,98,97');\n\ntry {\n  b.set(new Int32Array([99, 98, 97, 96]), 2);\n  assert(1 === 0); // Should not get here.\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n\ntry {\n  b.set([101, 102, 103, 104], 4);\n  assert(1 === 0); // Should not get here.\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n\n//  ab = [ 0, 1, 2, 3, 4, 5, 6, 7 ]\n//  a1 = [ ^, ^, ^, ^, ^, ^, ^, ^ ]\n//  a2 =             [ ^, ^, ^, ^ ]\nvar ab = new ArrayBuffer(8);\nvar a1 = new Uint8Array(ab);\nfor (var i = 0; i < a1.length; i += 1) {\n  a1.set([i], i);\n}\n\nvar a2 = new Uint8Array(ab, 4);\na1.set(a2, 2);\nassert(a1.join() === '0,1,4,5,6,7,6,7');\nassert(a2.join() === '6,7,6,7');\n\nvar a3 = new Uint32Array(ab, 4);\na1.set(a3, 2);\nassert(a1.join() === '0,1,6,5,6,7,6,7');\nassert(a3.join() === '117835526');\n\nvar a4 = new Uint8Array(ab, 0, 4);\na1.set(a4, 2);\nassert(a1.join() === '0,1,0,1,6,5,6,7');\nassert(a4.join() === '0,1,0,1');\n\nvar a5 = new Uint32Array(ab, 4, 1);\na1.set(a5, 2);\nassert(a1.join() === '0,1,6,1,6,5,6,7');\nassert(a5.join() === '117835014');\n\nvar c = new Int32Array([0xFFFFFFFF]);\nvar d = new Uint8Array(4);\nd.set(c);\nassert(d.join() === '255,0,0,0');\n\nvar e = new Float32Array([3.33]);\nvar f = new Uint8Array(1);\nf.set(e);\nassert(f.join() === '3');\ne.set(f);\nassert(e.join() === '3');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedArray-sort.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Default sorting behavior.\nvar a = Uint8Array.from([4, 1, 3, 5, 4, 2]);\nassert(a.sort().toString() === '1,2,3,4,4,5');\nassert(a.toString() === '1,2,3,4,4,5');\n\n// Views into typedarrays should be properly sorted.\nvar b = Uint8Array.from([2, 1, 4, 3, 0]);\nassert(b.subarray(2, 4).sort().toString() === '3,4');\nassert(b.toString() === '2,1,3,4,0');\n\n// Empty typedarrays should be able to be \"sorted\".\nvar c = Uint8Array.from([]);\nassert(c.sort().toString() === '');\n\n// Infinity should be supported.\nvar d = Float32Array.from([Infinity, 3, 2, 1, -Infinity]);\nassert(d.sort().toString() === '-Infinity,1,2,3,Infinity');\n\n// +0 and -0 should be properly sorted.\nvar e = Float32Array.from([1, 0, -0, -1]);\nassert(e.sort().toString() === '-1,0,0,1');\n\n// NaN should be supported and always at the end.\nvar f = Float32Array.from([NaN, 0, 1, -1, -Infinity, Infinity, NaN]);\nassert(f.sort().toString() === '-Infinity,-1,0,1,Infinity,NaN,NaN');\n\n// The element size of the view should be sorted properly.\nvar ab = new ArrayBuffer(4);\nvar g = new Uint32Array(ab);\nvar h = new Uint8Array(ab);\nh.set([0xFF, 0, 0xFF, 0]);\nassert(h.toString() === '255,0,255,0');\nassert(g.toString() === '16711935');\nassert(h.subarray(0, 2).sort().toString() === '0,255');\nassert(h.subarray(2, 4).sort().toString() === '0,255');\nassert(g.toString() === '4278255360');\nassert(g.sort().toString() === '4278255360');\nassert(h.toString() === '0,255,0,255');\n\n// Comparator argument should be callable.\nvar i = Uint8Array.from([1, 2, 3]);\ntry {\n  i.sort({});\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// Comparator function returns a Number.\ni.sort(function (lhs, rhs) {\n  return rhs - lhs;\n});\nassert(i.toString() === '3,2,1');\n\n// Comparator function returns a non-Number type that coerces to a Number.\ni.sort(function (lhs, rhs) {\n  return { valueOf: function() { return rhs - lhs; } };\n});\nassert(i.toString() === '3,2,1');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedArray-stringify.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar float_array = new Float32Array([1.125, 5.5, -1.25, -0.0]);\nvar int_array = new Int8Array([3, 2, 1, 100, -30])\nvar uint_array = new Uint8Array([3, 2, 1, 100, -30])\nvar empty_array = new Uint32Array();\n\nassert((JSON.stringify(float_array)) === '{\"0\":1.125,\"1\":5.5,\"2\":-1.25,\"3\":0}');\nassert((JSON.stringify(int_array)) === '{\"0\":3,\"1\":2,\"2\":1,\"3\":100,\"4\":-30}');\nassert((JSON.stringify(uint_array)) === '{\"0\":3,\"1\":2,\"2\":1,\"3\":100,\"4\":226}');\nassert((JSON.stringify(empty_array)) === '{}');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedArray-subarray.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar a = new Int32Array([1, 2, 3, 4, 5]);\nassert(a.subarray().toString() === '1,2,3,4,5');\nassert(a.subarray(3).toString() === '4,5');\nassert(a.subarray(1, 3).toString() === '2,3');\nassert(a.subarray(-3).toString() === '3,4,5');\nassert(a.subarray(-3, -1).toString() === '3,4');\nassert(a.subarray(3, 2).toString() === '');\nassert(a.subarray(-2, -3).toString() === '');\nassert(a.subarray(4, 1).toString() === '');\nassert(a.subarray(-1, -4).toString() === '');\nassert(a.subarray(1).subarray(1).toString() === '3,4,5');\nassert(a.subarray(1, 4).subarray(1, 2).toString() === '3');\n\nvar b = new Uint8Array([]);\nassert(b.subarray(123456, -123456).toString() === '');\nassert(b.subarray().subarray().toString() === '');\n\nvar ab = new ArrayBuffer(28);\nvar tmp = new Int32Array(ab);\ntmp.set([0, 1, 2, 3, 4, 5, 0]);\nvar c = new Int32Array(ab, 4, 5);\nassert(c.toString() === '1,2,3,4,5');\nassert(c.subarray().toString() === '1,2,3,4,5');\nassert(c.subarray(3).toString() === '4,5');\nassert(c.subarray(1, 3).toString() === '2,3');\nassert(c.subarray(-3).toString() === '3,4,5');\nassert(c.subarray(-3, -1).toString() === '3,4');\nassert(c.subarray(3, 2).toString() === '');\nassert(c.subarray(-2, -3).toString() === '');\nassert(c.subarray(4, 1).toString() === '');\nassert(c.subarray(-1, -4).toString() === '');\nassert(c.subarray(1).subarray(1).toString() === '3,4,5');\nassert(c.subarray(1, 4).subarray(1, 2).toString() === '3');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedArray-tostring.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar float_array = new Float32Array([1.125, 5.5, -1.25, -0.0]);\nvar int_array = new Int8Array([3, 2, 1, 100, -30])\nvar uint_array = new Uint8Array([3, 2, 1, 100, -30])\nvar empty_array = new Uint32Array();\n\nassert(float_array.toString() === \"1.125,5.5,-1.25,0\");\nassert(int_array.toString() === \"3,2,1,100,-30\");\nassert(uint_array.toString() === \"3,2,1,100,226\");\nassert(empty_array.toString() === \"\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-from.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar typedArrayConstructors = [\n    Uint8Array,\n    Int8Array,\n    Uint16Array,\n    Int16Array,\n    Uint32Array,\n    Int32Array,\n    Uint8ClampedArray,\n    Float32Array,\n    Float64Array\n];\n\nvar set = new Set([1,2,3]);\n\nvar foo = {};\nvar bar = {};\nvar weak_set = new WeakSet();\nweak_set.add(foo);\nweak_set.add(bar);\n\nvar string = new String('123');\n\nvar map = new Map();\nmap.set(0, 'zero');\nmap.set(1, 'one');\n\nvar weak_map = new WeakMap();\nweak_map.set(foo, 'foo');\nweak_map.set(bar, 'bar');\n\nvar string = '123';\n\nfor (var constructor of typedArrayConstructors)\n{\n    assert(constructor.from.length === 1);\n\n    try {\n      function f() {constructor.from.call(Array, []);}\n    } catch (e) {\n      assert(e instanceof TypeError); \n    }\n\n    assert(constructor.from(set).toString() === '1,2,3');\n    assert(constructor.from(weak_set).toString() === '');\n\n    if (constructor == Float32Array || constructor == Float64Array)\n    {\n        assert(constructor.from(map).toString() === 'NaN,NaN');\n    }\n    else\n    {\n        assert(constructor.from(map).toString() === '0,0');\n    }\n\n    assert(constructor.from(weak_map).toString() === '');\n    assert(constructor.from(string).toString() === '1,2,3');\n\n    try {\n      function f() {constructor.from.call({}, []);}\n    } catch (e) {\n      assert(e instanceof TypeError);\n    }\n\n    try {\n      function f() {constructor.from.call([], []);}\n    } catch (e) {\n      assert(e instanceof TypeError);\n    }\n\n    try {\n      function f() {constructor.from.call(1, []);}\n    } catch (e) {\n      assert(e instanceof TypeError);\n    }\n\n    try {\n      function f() {constructor.from.call(undefined, []);}\n    } catch (e) {\n      assert(e instanceof TypeError);\n    }\n\n    assert(constructor.from([1,2,3,4]).toString() === '1,2,3,4');\n    assert(constructor.from([12,45]).toString() === '12,45');\n    assert(constructor.from(NaN).toString() === '');\n    assert(constructor.from(Infinity).toString() === '');\n\n    assert(constructor.from([4,5,6], x => x + 1).toString() === '5,6,7');\n    assert(constructor.from([2,4,8], x => x * 2).toString() === '4,8,16');\n\n    try {\n      constructor.from([1,2,3], x => {throw 5});\n      assert(false);\n    } catch (e) {\n      assert(e === 5);\n    }\n\n    try {\n      constructor.from([Symbol.match]);\n      assert(false);\n    } catch (e) {\n      assert(e instanceof TypeError);\n    }\n\n    try {\n      constructor.from([1,1,1], 'foo');\n      assert(false);\n    } catch (e) {\n      assert (e instanceof TypeError);\n    }\n\n    try {\n      function f() {constructor.from(null)}\n    } catch (e) {\n      assert(e instanceof TypeError);\n    }\n\n    try {\n      function f() {constructor.from(undefined);}\n    } catch (e) {\n      assert(e instanceof TypeError);\n    }\n\n    var called = 0;\n    var arr = [1,2,3];\n    var obj = {};\n\n    function testIterator() {\n      called++;\n      return arr[Symbol.iterator]();\n    }\n\n    var getCalled = 0;\n    Object.defineProperty(obj, Symbol.iterator, {\n      get: function() {\n          getCalled++;\n          return testIterator;\n      },\n    });\n\n    assert(constructor.from(obj).toString() === '1,2,3');\n    assert(called === 1);\n    assert(getCalled === 1);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-of.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar int_typedarrays = [\n    Uint8ClampedArray,\n    Uint8Array,\n    Uint16Array,\n    Uint32Array,\n    Int8Array,\n    Int16Array,\n    Int32Array\n];\n\nvar float_typedarrays = [\n    Float32Array,\n    Float64Array,\n];\n\nvar obj = {\n    0: 0,\n    1: 1\n};\n\nint_typedarrays.forEach(function(e){\n    try {\n        e.of.call(undefined);\n        assert (false);\n    } catch (err) {\n        assert (err instanceof TypeError);\n    }\n\n    try {\n        e.of.call(obj);\n        assert (false);\n    } catch (err) {\n        assert (err instanceof TypeError);\n    }\n\n    // Test with regulat inputs\n    assert(e.of(1,2,3).toString() === \"1,2,3\");\n    assert(e.of(12,4,5,0).toString() === \"12,4,5,0\");\n    assert(e.of(23).toString() === \"23\");\n\n    // Test with string inputs\n    assert(e.of(\"12\",4).toString() === \"12,4\");\n    assert(e.of(1,2,\"foo\").toString() === \"1,2,0\");\n\n    // Test with undefined\n    assert(e.of(undefined).toString() === \"0\");\n\n    // Test with object\n    assert(e.of(obj).toString() === \"0\");\n\n    // Test with NaN\n    assert(e.of(NaN).toString() === \"0\");\n});\n\nfloat_typedarrays.forEach(function(e){\n    try {\n        e.of.call(undefined);\n        assert (false);\n    } catch (err) {\n        assert (err instanceof TypeError);\n    }\n\n    try {\n        e.of.call(obj);\n        assert (false);\n    } catch (err) {\n        assert (err instanceof TypeError);\n    }\n\n    // Test with regulat inputs\n    assert(e.of(1,2,3).toString() === \"1,2,3\");\n    assert(e.of(12,4,5,0).toString() === \"12,4,5,0\");\n    assert(e.of(23).toString() === \"23\");\n\n    // Test with string inputs\n    assert(e.of(\"12\",4).toString() === \"12,4\");\n    assert(e.of(1,2,\"foo\").toString() === \"1,2,NaN\");\n    assert(e.of(\"-12\").toString() === \"-12\");\n\n    // Test with undefined\n    assert(e.of(undefined).toString() === \"NaN\");\n\n    // Test with object\n    assert(e.of(obj).toString() === \"NaN\");\n\n    // Test with NaN\n    assert(e.of(NaN).toString() === \"NaN\");\n});\n\n// Test with negative inputs\nvar a = Uint8ClampedArray.of(-8);\nassert(a.toString() === \"0\");\n\na = Uint8Array.of(-8);\nassert(a.toString() === \"248\");\n\na = Uint16Array.of(-8);\nassert(a.toString() === \"65528\");\n\na = Uint32Array.of(-8);\nassert(a.toString() === \"4294967288\");\n\na = Int8Array.of(-8);\nassert(a.toString() === \"-8\");\n\na = Int16Array.of(-8);\nassert(a.toString() === \"-8\");\n\na = Int32Array.of(-8);\nassert(a.toString() === \"-8\");\n\na = Float32Array.of(-8);\nassert(a.toString() === \"-8\");\n\na = Float64Array.of(-8);\nassert(a.toString() === \"-8\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-offset-modulo.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar types = [\n  Uint16Array,\n  Uint32Array,\n  Float32Array,\n  Float64Array,\n  Int16Array,\n  Int32Array,\n]\n\nvar buffer = new ArrayBuffer (100);\n\nfor (var idx = 0; idx < types.length; idx++) {\n  try {\n    var target = types[idx];\n\n    /* TypedArray should throw error on incorrect offset (offset % elementSize != 0)! */\n    new target (buffer, target.BYTES_PER_ELEMENT + 1, 1);\n    assert (false);\n  } catch (ex) {\n    assert (ex instanceof RangeError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-copy-within.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar typedarrays = [\n    new Uint8ClampedArray ([0, 1, 2, 3, 4, 5]),\n    new Uint8Array([0, 1, 2, 3, 4, 5]),\n    new Uint16Array([0, 1, 2, 3, 4, 5]),\n    new Uint32Array([0, 1, 2, 3, 4, 5]),\n    new Float32Array([0, 1, 2, 3, 4, 5]),\n    new Float64Array([0, 1, 2, 3, 4, 5]),\n    new Int8Array([0, 1, 2, 3, 4, 5]),\n    new Int16Array([0, 1, 2, 3, 4, 5]),\n    new Int32Array([0, 1, 2, 3, 4, 5])\n  ];\n\ntypedarrays.forEach(function(e){\n    try {\n        e.prototype.copyWithin.call (undefined);\n        assert (false);\n    } catch (err) {\n        assert (err instanceof TypeError);\n    }\n\n    // Test with normal inputs\n    assert(e.copyWithin(2, 1 ,4).toString() === '0,1,1,2,3,5');\n    assert(e.copyWithin(3, 4, 6).toString() === '0,1,1,3,5,5');\n    assert(e.copyWithin(4, 1, 3).toString() === '0,1,1,3,1,1');\n\n    e.set([5, 2, 1, 3, 4, 4]);\n\n    // Test with negative inputs\n    assert(e.copyWithin(2, -10, 3).toString() === '5,2,5,2,1,4');\n    assert(e.copyWithin(-3, 1, 6).toString() === '5,2,5,2,5,2');\n    assert(e.copyWithin(2, 0, -3).toString() === '5,2,5,2,5,2');\n\n    e.set([9, 3, 4, 5, 1, 7]);\n\n    // Test with default inputs\n    assert(e.copyWithin().toString() === '9,3,4,5,1,7');\n    assert(e.copyWithin(3).toString() === '9,3,4,9,3,4');\n    assert(e.copyWithin(1, 5).toString() === '9,4,4,9,3,4');\n\n    e.set([12, 3, 1, 43, 2, 9]);\n\n    // Test with too big inputs\n    assert(e.copyWithin(2, 12, 21).toString() === '12,3,1,43,2,9');\n    assert(e.copyWithin(4, 5, 13).toString() === '12,3,1,43,9,9');\n\n    e.set([1, 2, 3, 1, 2, 1]);\n\n    // Test with undefined inputs\n    assert(e.copyWithin(undefined, 2, 4).toString() === '3,1,3,1,2,1');\n    assert(e.copyWithin(undefined, undefined, 2).toString() === '3,1,3,1,2,1');\n    assert(e.copyWithin(3, undefined, 5).toString() === '3,1,3,3,1,3');\n\n    e.set([0, 2, 4, 2, 1, 5]);\n\n    // Test with NaN/+-Infinity\n    assert(e.copyWithin(NaN, 3, 5).toString() === '2,1,4,2,1,5');\n    assert(e.copyWithin(3, Infinity, 5).toString() === '2,1,4,2,1,5');\n    assert(e.copyWithin(1, 3, -Infinity).toString() === '2,1,4,2,1,5');\n});\n\nvar bigint_array = new BigInt64Array([1n, 2n, 3n, -4n, 5n]);\nassert(bigint_array.copyWithin(2, 1, 4).toString() === '1,2,2,3,-4');\nassert(bigint_array.copyWithin(0, 4).toString() === '-4,2,2,3,-4');\n\nvar biguint_array = new BigUint64Array([1n, 2n, 3n, 4n, 5n]);\nassert(biguint_array.copyWithin(0, 2, 4).toString() === '3,4,3,4,5');\nassert(biguint_array.copyWithin(-3, 0, 3).toString() === '3,4,3,4,3');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-entries.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar normal_typedarrays = [\n  new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Uint16Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Uint32Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Float32Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Float64Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Int8Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Int16Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Int32Array([1, 2, 3, 4, 5, 6, 7, 8])\n];\n\nnormal_typedarrays.forEach (function(e){\n  try {\n    e.prototype.entries.call (undefined);\n    assert (false);\n  }\n  catch (e) {\n    assert (e instanceof TypeError)\n  }\n});\n\nnormal_typedarrays.forEach(function(e){\n  var iterator = e.entries ();\n  var current_item = iterator.next ();\n\n  for (var i = 0; i < e.length; i++) {\n    assert (current_item.value[0] === i);\n    assert (current_item.value[1] === e[i]);\n    assert (current_item.done === false);\n\n    current_item = iterator.next ();\n  }\n\n  assert (current_item.value === undefined);\n  assert (current_item.done === true);\n});\n\nvar empty_typedarrays = [\n  new Uint8Array([]),\n  new Uint16Array([]),\n  new Uint32Array([]),\n  new Float32Array([]),\n  new Float64Array([]),\n  new Int8Array([]),\n  new Int16Array([]),\n  new Int32Array([])\n];\n\nempty_typedarrays.forEach(function (e){\n  iterator = e.entries ();\n  current_item = iterator.next ();\n\n  assert (current_item.value === undefined);\n  assert (current_item.done === true);\n});\n\nassert ([].entries ().toString () === \"[object Array Iterator]\");\n\nvar bigint_array = new BigInt64Array([1n, 2n, 3n, 4n]);\nvar entries = bigint_array.entries();\nassert(entries.next().value[1] === 1n);\nassert(entries.next().value[1] === 2n);\n\nvar biguint_array = new BigUint64Array([1n, 2n, 3n, 4n]);\nvar entries = biguint_array.entries();\nassert(entries.next().value[1] === 1n);\nassert(entries.next().value[1] === 2n);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-includes.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar typedarrays = [\n  new Uint8Array([0, 1, 2, 3, 0, 5, 6]),\n  new Uint16Array([0, 1, 2, 3, 0, 5, 6]),\n  new Uint32Array([0, 1, 2, 3, 0, 5, 6]),\n  new Float32Array([0, 1, 2, 3, 0, 5, 6]),\n  new Float64Array([0, 1, 2, 3, 0, 5, 6]),\n  new Int8Array([0, 1, 2, 3, 0, 5, 6]),\n  new Int16Array([0, 1, 2, 3, 0, 5, 6]),\n  new Int32Array([0, 1, 2, 3, 0, 5, 6])\n];\n\ntypedarrays.forEach(function(e){\n  assert(e.includes.length === 1);\n  assert(e.includes.name === \"includes\");\n  assert(e.includes() === false);\n  assert(e.includes(\"foo\") === false);\n  assert(e.includes(undefined) === false);\n  assert(e.includes(NaN) === false);\n  assert(e.includes(0) === true);\n  assert(e.includes(0, 4) === true);\n  assert(e.includes(0, 5) === false);\n  assert(e.includes(1, Infinity) === false);\n  assert(e.includes(1, -Infinity) === true);\n  assert(e.includes(6, 8) === false);\n  assert(e.includes(3, -5) === true);\n});\n\nvar empty_typedarrays = [\n  new Uint8Array([]),\n  new Uint16Array([]),\n  new Uint32Array([]),\n  new Float32Array([]),\n  new Float64Array([]),\n  new Int8Array([]),\n  new Int16Array([]),\n  new Int32Array([])\n];\n\nempty_typedarrays.forEach(function(e){\n  assert(e.includes(5) === false);\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-indexof.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar normal_typedarrays = [\n  new Uint8Array([0, 1, 2, 3, 0, 5, 6]),\n  new Uint16Array([0, 1, 2, 3, 0, 5, 6]),\n  new Uint32Array([0, 1, 2, 3, 0, 5, 6]),\n  new Float32Array([0, 1, 2, 3, 0, 5, 6]),\n  new Float64Array([0, 1, 2, 3, 0, 5, 6]),\n  new Int8Array([0, 1, 2, 3, 0, 5, 6]),\n  new Int16Array([0, 1, 2, 3, 0, 5, 6]),\n  new Int32Array([0, 1, 2, 3, 0, 5, 6])\n];\n\nnormal_typedarrays.forEach(function(e){\n\n  try{\n    e.prototype.indexOf.call (undefined);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  var index = e.indexOf(0);\n  assert(index === 0);\n  assert(e[index] === 0);\n\n  // Regular input\n  assert(e.indexOf(0, 1) === 4);\n  assert(e.indexOf(0, 5) === -1);\n  assert(e.indexOf(3, -2) === -1);\n  assert(e.indexOf(5, -6) === 5);\n  assert(e.indexOf(2, -2) === -1);\n\n  // Empty input\n  assert(e.indexOf() === -1);\n\n  // String input\n  assert(e.indexOf(\"foo\") === -1);\n  assert(e.indexOf(3, \"foo\") === 3);\n\n  // Nan, +/-Infinity\n  assert(e.indexOf(0, NaN) === 0);\n  assert(e.indexOf(0, Infinity) === -1);\n  assert(e.indexOf(3, -Infinity) === 3);\n\n  // Checking behavior when fromIndex is undefined\n  e.set([1, 2]);\n\n  assert(e.indexOf(2, undefined) === 1);\n  assert(e.indexOf(2) === 1);\n\n  // Checking behavior when start index >= length\n  e.set([11, 22, 33, 44]);\n\n  assert(e.indexOf(44, 5) === -1);\n\n  var fromIndex = {\n    toString: function () {\n      return {};\n    },\n\n    valueOf: function () {\n      return {};\n    }\n  };\n\n  e.set([0, 1]);\n\n  try {\n    e.indexOf(1, fromIndex);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\n// Checking behavior when length is zero\nvar empty_typedarrays = [\n  new Uint8Array([]),\n  new Uint16Array([]),\n  new Uint32Array([]),\n  new Float32Array([]),\n  new Float64Array([]),\n  new Int8Array([]),\n  new Int16Array([]),\n  new Int32Array([])\n];\n\nempty_typedarrays.forEach(function(e){\n  assert(e.indexOf(0) === -1);\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-keys.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar normal_typedarrays = [\n  new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Uint16Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Uint32Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Float32Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Float64Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Int8Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Int16Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Int32Array([1, 2, 3, 4, 5, 6, 7, 8])\n];\n\nnormal_typedarrays.forEach (function(e){\n  try {\n    e.prototype.keys.call (undefined);\n    assert (false);\n  }\n  catch (e) {\n    assert (e instanceof TypeError)\n  }\n});\n\nnormal_typedarrays.forEach(function (e){\n  var iterator = e.keys ();\n  var current_item = iterator.next ();\n\n  for (var i = 0; i < e.length; i++) {\n    assert (current_item.value === i);\n    assert (current_item.done === false);\n  \n    current_item = iterator.next ();\n  }\n\n  assert (current_item.value === undefined);\n  assert (current_item.done === true);\n});\n\nvar empty_typedarrays = [\n  new Uint8Array([]),\n  new Uint16Array([]),\n  new Uint32Array([]),\n  new Float32Array([]),\n  new Float64Array([]),\n  new Int8Array([]),\n  new Int16Array([]),\n  new Int32Array([])\n];\n\nempty_typedarrays.forEach(function (e){\n  iterator = e.keys ();\n  current_item = iterator.next ();\n\n  assert (current_item.value === undefined);\n  assert (current_item.done === true);\n});\n\nassert ([].keys ().toString () === \"[object Array Iterator]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-lastindexof.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar normal_typedarrays = [\n  new Uint8Array([0, 1, 2, 3, 0, 5, 6]),\n  new Uint16Array([0, 1, 2, 3, 0, 5, 6]),\n  new Uint32Array([0, 1, 2, 3, 0, 5, 6]),\n  new Float32Array([0, 1, 2, 3, 0, 5, 6]),\n  new Float64Array([0, 1, 2, 3, 0, 5, 6]),\n  new Int8Array([0, 1, 2, 3, 0, 5, 6]),\n  new Int16Array([0, 1, 2, 3, 0, 5, 6]),\n  new Int32Array([0, 1, 2, 3, 0, 5, 6])\n];\n\nnormal_typedarrays.forEach(function(e){\n  try{\n    e.prototype.lastIndexOf.call (undefined);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  var index = e.lastIndexOf(0);\n  assert(index === 4);\n  assert(e[index] === 0);\n\n  // Regular input\n  assert(e.lastIndexOf(0, 3) === 0);\n  assert(e.lastIndexOf(0, -8) === -1);\n  assert(e.lastIndexOf(2) === 2);\n  assert(e.lastIndexOf(5, 3) === -1);\n  assert(e.lastIndexOf(3, 6) === 3);\n\n  // Empty input\n  assert(e.lastIndexOf() === -1);\n\n  // String input\n  assert(e.lastIndexOf(\"foo\") === -1);\n  assert(e.lastIndexOf(0, \"foo\") === 0);\n\n  // Nan, +/-Infinity\n  assert(e.lastIndexOf(0, NaN) === 0);\n  assert(e.lastIndexOf(0, Infinity) === 4);\n  assert(e.lastIndexOf(0, -Infinity) === -1);\n\n  // Checking behavior when fromIndex is undefined\n  e.set([1, 2]);\n\n  assert(e.lastIndexOf(2, undefined) === -1);\n  assert(e.lastIndexOf(2) === 2);\n\n  // Checking behavior when start index >= length\n  e.set([11, 22, 33, 44]);\n\n  assert(e.lastIndexOf(44, 8) === 3);\n\n  var fromIndex = {\n    toString: function () {\n      return {};\n    },\n\n    valueOf: function () {\n      return {};\n    }\n  };\n\n  e.set([0, 1]);\n\n  try {\n    e.lastIndexOf(1, fromIndex);\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n});\n\n// Checking behavior when length is zero\nvar empty_typedarrays = [\n  new Uint8Array([]),\n  new Uint16Array([]),\n  new Uint32Array([]),\n  new Float32Array([]),\n  new Float64Array([]),\n  new Int8Array([]),\n  new Int16Array([]),\n  new Int32Array([])\n];\n\nempty_typedarrays.forEach(function(e){\n  assert(e.lastIndexOf(0) === -1);\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-slice-ext-arraybuffer.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar typedarrays = [\n  Uint8ClampedArray,\n  Uint8Array,\n  Uint16Array,\n  Uint32Array,\n  Float32Array,\n  Float64Array,\n  Int8Array,\n  Int16Array,\n  Int32Array,\n];\n\nfor (var typeIdx = 0; typeIdx < typedarrays.length; typeIdx++) {\n  var buffer = new ArrayBuffer(100);\n  var typed = new typedarrays[typeIdx](buffer, 8, 6);\n  try {\n    typed.prototype.slice.call(undefined);\n    assert(false);\n  } catch (err) {\n    assert(err instanceof TypeError);\n  }\n\n  for (var idx = 0; idx < typed.length; idx++) {\n    typed[idx] = idx;\n  }\n\n  // Test with normal inputs\n  assert(typed.slice(1, 3).toString() === \"1,2\");\n  assert(typed.slice(2, 5).toString() === \"2,3,4\");\n  assert(typed.slice(0, 6).toString() === \"0,1,2,3,4,5\");\n\n  // Test witn negative inputs\n  assert(typed.slice(-2, 5).toString() === \"4\");\n  assert(typed.slice(0, -3).toString() === \"0,1,2\");\n  assert(typed.slice(-1, -4).toString() === \"\");\n\n  // Test with bigger inputs then length\n  assert(typed.slice(7, 1).toString() === \"\");\n  assert(typed.slice(2, 9).toString() === \"2,3,4,5\");\n\n  // Test with undefined\n  assert(typed.slice(undefined, 4).toString() === \"0,1,2,3\");\n  assert(typed.slice(0, undefined).toString() === \"0,1,2,3,4,5\");\n  assert(typed.slice(undefined, undefined).toString() === \"0,1,2,3,4,5\");\n\n  // Test with NaN and +/-Infinity\n  assert(typed.slice(NaN, 3).toString() === \"0,1,2\");\n  assert(typed.slice(2, Infinity).toString() === \"2,3,4,5\");\n  assert(typed.slice(-Infinity, Infinity).toString() === \"0,1,2,3,4,5\");\n\n  // Test with default inputs\n  assert(typed.slice().toString() === \"0,1,2,3,4,5\");\n  assert(typed.slice(4).toString() === \"4,5\");\n\n  delete buffer;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-slice.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar typedarrays = [\n    new Uint8ClampedArray([0, 1, 2, 3, 4, 5]),\n    new Uint8Array([0, 1, 2, 3, 4, 5]),\n    new Uint16Array([0, 1, 2, 3, 4, 5]),\n    new Uint32Array([0, 1, 2, 3, 4, 5]),\n    new Float32Array([0, 1, 2, 3, 4, 5]),\n    new Float64Array([0, 1, 2, 3, 4, 5]),\n    new Int8Array([0, 1, 2, 3, 4, 5]),\n    new Int16Array([0, 1, 2, 3, 4, 5]),\n    new Int32Array([0, 1, 2, 3, 4, 5])\n  ];\n\ntypedarrays.forEach(function(e){\n    try {\n        e.prototype.slice.call (undefined);\n        assert (false);\n    } catch (err) {\n        assert (err instanceof TypeError);\n    }\n\n    // Test with normal inputs\n    assert(e.slice(1, 3).toString() === \"1,2\");\n    assert(e.slice(2, 5).toString() === \"2,3,4\");\n    assert(e.slice(0, 6).toString() === \"0,1,2,3,4,5\");\n\n    // Test witn negative inputs\n    assert(e.slice(-2, 5).toString() === \"4\");\n    assert(e.slice(0, -3).toString() === \"0,1,2\");\n    assert(e.slice(-1, -4).toString() === \"\");\n\n    // Test with bigger inputs then length\n    assert(e.slice(7, 1).toString() === \"\");\n    assert(e.slice(2, 9).toString() === \"2,3,4,5\");\n\n    // Test with undefined\n    assert(e.slice(undefined, 4).toString() === \"0,1,2,3\");\n    assert(e.slice(0, undefined).toString() === \"0,1,2,3,4,5\");\n    assert(e.slice(undefined, undefined).toString() === \"0,1,2,3,4,5\");\n\n    // Test with NaN and +/-Infinity\n    assert(e.slice(NaN, 3).toString() === \"0,1,2\");\n    assert(e.slice(2, Infinity).toString() === \"2,3,4,5\");\n    assert(e.slice(-Infinity, Infinity).toString() === \"0,1,2,3,4,5\");\n\n    // Test with default inputs\n    assert(e.slice().toString() === \"0,1,2,3,4,5\");\n    assert(e.slice(4).toString() === \"4,5\");\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-tolocalestring.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar int_typedarrays = [\n    new Uint8Array([0, 1, 2, 3, 4, 5]),\n    new Uint16Array([0, 1, 2, 3, 4, 5]),\n    new Uint32Array([0, 1, 2, 3, 4, 5]),\n    new Int8Array([0, 1, 2, 3, 4, 5]),\n    new Int16Array([0, 1, 2, 3, 4, 5]),\n    new Int32Array([0, 1, 2, 3, 4, 5])\n];\n\nvar float_typedarrays = [\n    new Float32Array([0, 1, 2, 3, 4, 5]),\n    new Float64Array([0, 1, 2, 3, 4, 5]),\n];\n\nint_typedarrays.forEach(function(e){\n    // Test with normal inputs\n    assert(e.toLocaleString() === \"0,1,2,3,4,5\");\n    e.set([3, 3, 6, 1, 2, 9]);\n    assert(e.toLocaleString() === \"3,3,6,1,2,9\");\n    e.set([32, 12, 2, 8, 32, 1]);\n    assert(e.toLocaleString() === \"32,12,2,8,32,1\");\n    // Test with undefined\n    e.set([12, undefined, 0, undefined, 3, 5]);\n    assert(e.toLocaleString() === \"12,0,0,0,3,5\");\n    // Test with null\n    e.set([null, 3, 3, 3, null, 10]);\n    assert(e.toLocaleString() === \"0,3,3,3,0,10\");\n    e.set([12, null, 21, null, null, null]);\n    assert(e.toLocaleString() === \"12,0,21,0,0,0\");\n});\n\nfloat_typedarrays.forEach(function(e){\n    // Test with normal inputs\n    assert(e.toLocaleString() === \"0,1,2,3,4,5\");\n    e.set([3, 3, 6, 1, 2, 9]);\n    assert(e.toLocaleString() === \"3,3,6,1,2,9\");\n    e.set([32, 12, 2, 8, 32, 1]);\n    assert(e.toLocaleString() === \"32,12,2,8,32,1\");\n    // Test with undefined\n    e.set([12, undefined, 0, undefined, 3, 5]);\n    assert(e.toLocaleString() === \"12,NaN,0,NaN,3,5\");\n    // Test with null\n    e.set([null, 3, 3, 3, null, 10]);\n    assert(e.toLocaleString() === \"0,3,3,3,0,10\");\n    e.set([12, null, 21, null, null, null]);\n    assert(e.toLocaleString() === \"12,0,21,0,0,0\");\n});\n\n// Test empty TypedArrays\nvar empty_typedarrays = [\n    new Uint8Array([]),\n    new Uint16Array([]),\n    new Uint32Array([]),\n    new Float32Array([]),\n    new Float64Array([]),\n    new Int8Array([]),\n    new Int16Array([]),\n    new Int32Array([])\n];\n\nempty_typedarrays.forEach(function(e){\n    assert(e.toLocaleString() === \"\");\n});\n\nNumber.prototype.toLocaleString = function() { return \"5\" }\n\nvar typedarrays = [\n    new Uint8Array([10]),\n    new Uint16Array([10]),\n    new Uint32Array([10]),\n    new Float32Array([10]),\n    new Float64Array([10]),\n    new Int8Array([10]),\n    new Int16Array([10]),\n    new Int32Array([10])\n];\n\ntypedarrays.forEach(function(e){\n    assert(e.toLocaleString() === \"5\");\n});\n\nNumber.prototype.toLocaleString = \"foo\";\n\ntypedarrays.forEach(function(e){\n    try {\n        assert(e.toLocaleString() === \"foo\");\n        assert(false);\n    } catch (err) {\n        assert(err instanceof TypeError);\n    }\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-prototype-values.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar normal_typedarrays = [\n  new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Uint16Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Uint32Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Float32Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Float64Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Int8Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Int16Array([1, 2, 3, 4, 5, 6, 7, 8]),\n  new Int32Array([1, 2, 3, 4, 5, 6, 7, 8])\n];\n\nnormal_typedarrays.forEach (function(e){\n  try {\n    e.prototype.values.call (undefined);\n    assert (false);\n  }\n  catch (e) {\n    assert (e instanceof TypeError)\n  }\n});\n\nnormal_typedarrays.forEach(function (e){\n  var iterator = e.values ();\n  var symbol_iterator = e[Symbol.iterator] ();\n\n  var current_item = iterator.next ();\n  var symbol_current_item = symbol_iterator.next ();\n\n  for (var i = 0; i < e.length; i++) {\n    assert (current_item.value === e[i]);\n    assert (current_item.done === false);\n\n    assert (current_item.value === symbol_current_item.value);\n    assert (current_item.done === symbol_current_item.done);\n\n    current_item = iterator.next ();\n    symbol_current_item = symbol_iterator.next ();\n  }\n\n  assert (current_item.value === undefined);\n  assert (current_item.done === true);\n  assert (current_item.value === symbol_current_item.value);\n  assert (current_item.done === symbol_current_item.done)\n});\n\nvar empty_typedarrays = [\n  new Uint8Array([]),\n  new Uint16Array([]),\n  new Uint32Array([]),\n  new Float32Array([]),\n  new Float64Array([]),\n  new Int8Array([]),\n  new Int16Array([]),\n  new Int32Array([])\n];\n\nempty_typedarrays.forEach(function (e){\n  iterator = e.values ();\n  current_item = iterator.next ();\n\n  assert (current_item.value === undefined);\n  assert (current_item.done === true);\n});\n\nassert ([].values ().toString () === \"[object Array Iterator]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/typedarray-symbol-properties.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar typedArrayTypes = [Int8Array,\n                       Uint8Array,\n                       Uint8ClampedArray,\n                       Int16Array,\n                       Uint16Array,\n                       Int32Array,\n                       Uint32Array,\n                       Float32Array,\n                       Float64Array];\n\ntypedArrayTypes.forEach (function (typedArrayType) {\n  var typedArray = new typedArrayType ();\n  var fooSymbol = Symbol (\"foo\");\n  var barSymbol = Symbol (\"bar\");\n  typedArray[fooSymbol] = 5;\n  assert (typedArray[fooSymbol] === 5);\n\n  Object.defineProperty (typedArray, barSymbol, {value: 10});\n  assert (typedArray[barSymbol] === 10);\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/unicode-escape-identifiers.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar \\u{102C0} = 2;\nassert(\\u{102C0} === 2);\n\nvar o1 = { \\u{102C0} : 3 };\nassert(o1['\\ud800\\udec0'] === 3);\n\nvar o2 = { '\\ud800\\udec0' : 4 };\nassert(o2.\\u{102C0} === 4);\n\ntry {\n  eval('var ⸯ');\n  assert(false);\n} catch(e) {\n  assert(e instanceof SyntaxError);\n}\n\nvar 𐋀 = 5;\nassert(𐋀 === 5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/weakmap.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar m1 = new WeakMap();\nvar k1 = {};\nassert (m1.set (k1, 3.14) instanceof WeakMap);\nassert (m1.has (k1) === true);\nassert (m1.get (k1) === 3.14);\n\nk1 = {};\ngc (); /* This will remove the entry, but there is no way to validate it from js. */\n\nassert (m1.has (k1) === false);\nassert (m1.delete(k1) === false);\nassert (m1.set (k1, \"asd\" + \"fgh\") instanceof WeakMap);\nassert (m1.has (k1) === true);\nassert (m1.get (k1) === \"asdfgh\");\n\nassert (m1.delete (\"str\") === false);\nassert (m1.has (42) === false);\nassert (m1.get (42) === undefined);\ntry {\n  m1.set (42, 42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ngc ();\nassert (m1.delete(k1) === true);\ngc ();\nassert (m1.has (k1) === false);\nk1 = {};\ngc ();\n\nObject.freeze(k1);\nassert (m1.set (k1, \"frozen\") instanceof WeakMap);\nassert (m1.has (k1) === true);\nassert (m1.get (k1) === \"frozen\");\nk1 = {};\ngc ();\n\nvar m2 = new WeakMap();\n\nm1.set (k1, \"str\" + \"str\");\nm2.set (k1, 42.42);\n\nk1 = {};\ngc ();\nvar k2 = {};\n\nm1.set (k1, \"str\" + \"str\");\nm1.set (k2, \"str2\" + \"str2\");\nm2.set (k1, 42.42);\nm2.set (k2, Infinity);\n\nm2.delete (k1);\ngc ();\nk1 = {};\nk2 = {};\ngc ();\n\nvar k3 = {};\nm1 = new WeakMap();\nm1.set(k1, \"str\" + \"str\");\nm1.set(k2, \"str2\" + \"str2\");\nm1.set(k3, \"str3\" + \"str3\");\nk1 = undefined;\nk2 = undefined;\nk3 = undefined;\nm1 = undefined;\ngc();\n\ntry {\n  WeakMap();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  WeakMap.prototype.get.call({});\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (new WeakMap(null) instanceof WeakMap);\n\nk1 = {};\nk2 = {};\nm1 = new WeakMap([[k1, 1.2], [k2, 1.3]]);\nassert (m1.has (k1));\nassert (m1.has (k2));\nassert (m1.get (k1) === 1.2);\nassert (m1.get (k2) === 1.3);\ngc();\nm1 = undefined;\ngc();\n\nm1 = new WeakMap();\nm1.set(k1, \"str\");\nm1.set(k1, \"4\");\nm1.set(k1, null);\nm1.set(k1, 42);\nassert (m1.has (k1));\nk1 = {};\ngc();\n\nm1 = new WeakMap();\nm1.set(k1, \"str\");\nm1.set(k1, \"4\");\nm1.set(k1, 42);\nm1.set(k1, null);\nassert (m1.has (k1));\nm1 = new WeakMap();\ngc();\n\ntry {\n  new WeakMap([[1,2],[3,4]]);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nfunction createIterable(arr, methods = {}) {\n  let iterable = function *() {\n    let idx = 0;\n    while (idx < arr.length) {\n      yield arr[idx];\n      idx++;\n    }\n  }();\n  iterable['return'] = methods['return'];\n  iterable['throw'] = methods['throw'];\n\n  return iterable;\n};\n\nvar closed = false;\nvar iter = createIterable([1, 2, 3], {\n  'return': function(){ closed = true; return {}; }\n});\ntry {\n  new WeakMap(iter);\n} catch(e){}\n\nassert(closed === true);\n\nm1.set([], []);\n\nassert (WeakMap.prototype.toString() === \"[object WeakMap]\");\n\nWeakMap.prototype.set = function () { throw \"abrupt set\" };\n\ntry {\n  new WeakMap([[{}, 1]]);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt set\");\n}\n\nObject.defineProperty(WeakMap.prototype, 'set', {\n  get: () => { throw \"abrupt set getter\" }\n});\n\ntry {\n  new WeakMap([]);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt set getter\");\n}\n\n[Symbol.toStringTag].forEach(e => assert (Reflect.ownKeys(WeakMap.prototype).includes(e)));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es.next/weakset.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar m1 = new WeakSet();\n\nvar k1 = {};\nassert (m1.add (k1) instanceof WeakSet);\nassert (m1.has (k1) === true);\n\nk1 = {};\ngc (); /* This will remove the entry, but there is no way to validate it from js. */\n\nassert (m1.has (k1) === false);\nassert (m1.delete(k1) === false);\nassert (m1.add (k1) instanceof WeakSet);\nassert (m1.has (k1) === true);\n\nassert (m1.delete (\"str\") === false);\nassert (m1.has (42) === false);\n\ntry {\n  m1.add (42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ngc ();\nassert (m1.delete(k1) === true);\ngc ();\nassert (m1.has (k1) === false);\nk1 = {};\ngc ();\n\nObject.freeze(k1);\nassert (m1.add (k1) instanceof WeakSet);\nassert (m1.has (k1) === true);\nk1 = {};\ngc ();\n\nvar m2 = new WeakSet();\n\nk1 = {};\ngc ();\nvar k2 = {};\n\nm1.add (k1);\nm1.add (k2);\nm2.add (k1);\nm2.add (k2);\n\nm2.delete (k1);\ngc ();\nk1 = {};\nk2 = {};\ngc ();\n\nnew WeakSet().add(new WeakSet().add(new WeakSet().add(new WeakSet().add(new WeakSet().add(new WeakSet().add(new WeakSet()))))));\ngc();\n\ntry {\n  WeakSet();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  WeakSet.prototype.get.call({});\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nassert (new WeakSet(null) instanceof WeakSet);\n\nk1 = {};\nk2 = {};\nm1 = new WeakSet([k1, k2]);\nassert (m1.has (k1));\nassert (m1.has (k2));\ngc();\nm1 = undefined;\ngc();\n\nm1 = new WeakSet();\nk1 = {};\nm1.add (k1);\nm1.add (k1);\nm1.add (k1);\nassert (m1.has (k1));\nk1 = {};\ngc();\n\nm1 = new WeakSet();\nm1.add (k1);\nm1.add (k1);\nm1.add (k1);\nassert (m1.has (k1));\nm1 = new WeakSet();\ngc();\n\ntry {\n  new WeakSet([1,2,3,4]);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nfunction createIterable(arr, methods = {}) {\n  let iterable = function *() {\n    let idx = 0;\n    while (idx < arr.length) {\n      yield arr[idx];\n      idx++;\n    }\n  }();\n  iterable['return'] = methods['return'];\n  iterable['throw'] = methods['throw'];\n\n  return iterable;\n};\n\nvar closed = false;\nvar iter = createIterable([1, 2, 3], {\n  'return': function(){ closed = true; return {}; }\n});\ntry {\n  new WeakMap(iter);\n} catch(e){}\n\nassert(closed === true);\n\nm1.add([]);\n\nassert (WeakSet.prototype.toString() === \"[object WeakSet]\");\n\nWeakSet.prototype.add = function () { throw \"abrupt add\" };\n\ntry {\n  new WeakSet([{}]);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt add\");\n}\n\nObject.defineProperty(WeakSet.prototype, 'add', {\n  get: () => { throw \"abrupt add getter\" }\n});\n\ntry {\n  new WeakSet([]);\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt add getter\");\n}\n\n[Symbol.toStringTag].forEach(e => assert (Reflect.ownKeys(WeakSet.prototype).includes(e)));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/arguments.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f(a, b, c)\n{\n  'use strict';\n  try {\n    arguments['caller'];\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n}\n\nf(1, 2, 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/arithmetic-parse.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (txt) {\n  try {\n    eval (txt)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\nvar a = 21;\nvar b = 10;\nvar c;\n\ncheck_syntax_error (\"c =  a++b\");\ncheck_syntax_error (\"c =  a--b\");\n\ncheck_syntax_error (\"c = a +* b\");\ncheck_syntax_error (\"c = a -* b\");\ncheck_syntax_error (\"c = a +/ b\");\ncheck_syntax_error (\"c = a -/ b\");\ncheck_syntax_error (\"c = a +% b\");\ncheck_syntax_error (\"c = a -% b\");\n\ncheck_syntax_error (\"a =* b\");\ncheck_syntax_error (\"a =/ b\");\ncheck_syntax_error (\"a =% b\");\n\ncheck_syntax_error (\"c = a+\");\ncheck_syntax_error (\"c = a-\");\n\ncheck_syntax_error(\"a++\\n()\");\ncheck_syntax_error(\"a--\\n.b\");\n\nassert((-2 .toString()) === -2);\n\nNumber.prototype[0] = 123;\nassert(-2[0] === -123);\n\nfunction f() {\n  var a = 0;\n  function g() {}\n\n  try {\n    eval (\"g(this, 'a' = 1)\");\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n  }\n\n  try {\n    eval (\"g(this, 'a' += 1)\");\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n  }\n\n  assert (a === 0);\n}\nf();\n\nfunction g(a, b)\n{\n  assert(b === \"undefined\");\n}\ng(this, typeof undeclared_var)\n\nfunction h()\n{\n  var done = false;\n  var o = { a: function () { done = (this === o) } }\n  function f() {}\n\n  with (o) {\n    f(this, a());\n  }\n  assert(done);\n}\nh();\n  "
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/arithmetics.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = 21;\nvar b = 10;\nvar c;\n\nc = a + b;\nassert(c == 31);\n\nc = a - b;\nassert(c == 11);\n\nc = a * b;\nassert(c == 210);\n\nc = a / b;\nassert(c >= 2.1 - 0.000001 && c <= 2.1 + 0.000001);\n\nc = a % b;\nassert(c == 1);\n\nc = a++;\nassert(c == 21);\n\nc = a--;\nassert(c == 22);\n\nvar o = { p : 1 };\n\nassert (++o.p === 2);\nassert (o.p === 2);\nassert (--o.p === 1);\nassert (o.p === 1);\n\ntry {\n  eval ('++ ++ a');\n  assert (false);\n}\ncatch (e) {\n  assert (e instanceof ReferenceError);\n}\n\nassert (0.1 + 0.2 != 0.3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/array-prototype-push.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar o = { length : 4294967294, push : Array.prototype.push };\nassert(o.push(\"x\") === 4294967295);\nassert(o.length === 4294967295);\nassert(o[4294967294] === \"x\");\n\ntry {\n  assert(o.push(\"y\") === 4294967296);\n} catch (e) {\n  assert(false);\n}\nassert(o.length === 4294967296);\nassert(o[4294967295] === \"y\");\n\ntry {\n  assert(o.push(\"z\") === 1);\n} catch (e) {\n  assert(false);\n}\nassert(o.length === 1);\nassert(o[0] === \"z\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/array-prototype-unshift.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrayLike = {get 5() { throw \"should throw\"; }};\narrayLike.length = 10;\ntry {\n  Array.prototype.unshift.call(arrayLike);\n  assert(false);\n} catch (error) {\n  assert(error == \"should throw\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/builtin-prototypes.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nassert (Object.prototype.toString.call (Date.prototype) === '[object Date]');\nassert (isNaN(Date.prototype.valueOf()));\n\nassert (isNaN (Date.prototype.setTime()));\nassert (isNaN (Date.prototype.setMilliseconds()));\nassert (isNaN (Date.prototype.setUTCMilliseconds()));\nassert (isNaN (Date.prototype.setSeconds()));\nassert (isNaN (Date.prototype.setUTCSeconds()));\nassert (isNaN (Date.prototype.setMinutes()));\nassert (isNaN (Date.prototype.setUTCMinutes()));\nassert (isNaN (Date.prototype.setHours()));\nassert (isNaN (Date.prototype.setUTCHours()));\nassert (isNaN (Date.prototype.setDate()));\nassert (isNaN (Date.prototype.getUTCDate()));\nassert (isNaN (Date.prototype.setMonth()));\nassert (isNaN (Date.prototype.setUTCMonth()));\nassert (isNaN (Date.prototype.setFullYear()));\nassert (isNaN (Date.prototype.setUTCFullYear()));\n\nassert (Object.prototype.toString.call (RegExp.prototype) === '[object RegExp]');\n\nassert (RegExp.prototype.source === \"(?:)\");\nassert (RegExp.prototype.global === false);\nassert (RegExp.prototype.ignoreCase === false);\nassert (RegExp.prototype.multiline === false);\n\nRegExp.prototype.source = \"a\";\nRegExp.prototype.global = true;\nRegExp.prototype.ignoreCase = true;\nRegExp.prototype.multiline = true;\nassert (RegExp.prototype.source === \"(?:)\");\nassert (RegExp.prototype.global === false);\nassert (RegExp.prototype.ignoreCase === false);\nassert (RegExp.prototype.multiline === false);\n\ndelete RegExp.prototype.source;\ndelete RegExp.prototype.global;\ndelete RegExp.prototype.ignoreCase;\ndelete RegExp.prototype.multiline;\nassert (RegExp.prototype.source === \"(?:)\");\nassert (RegExp.prototype.global === false);\nassert (RegExp.prototype.ignoreCase === false);\nassert (RegExp.prototype.multiline === false);\n\nvar prototypes = [\n  Error.prototype,\n  EvalError.prototype,\n  RangeError.prototype,\n  ReferenceError.prototype,\n  SyntaxError.prototype,\n  TypeError.prototype,\n  URIError.prototype\n]\n\nprototypes.forEach (function (proto) {\n  assert (Object.prototype.toString.call (proto) === '[object Error]');\n})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/date-utc.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar d = Date.UTC(2015);\nassert (isNaN(d));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/func-decl.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() {\n    return 'foo';\n}\nassert ((function() {\n    if (1 === 0) {\n        function f() {\n            return 'bar';\n        }\n    }\n    return f();\n})() === 'bar');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/func-length.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar desc = Object.getOwnPropertyDescriptor(Function, \"length\");\nassert(desc.value === 1 &&\n        desc.writable === false &&\n        desc.enumerable === false &&\n        desc.configurable === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/json-superset.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"'\\u2028'\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\ntry {\n  eval(\"'\\u2029'\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/object-getprototypeof.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  var v;\n  Object.getPrototypeOf(v);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Object.getPrototypeOf(\"foo\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Object.getPrototypeOf(60);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  var y = Object.getPrototypeOf(null);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar obj = { x : \"foo\" };\nassert (Object.getPrototypeOf(obj) === Object.prototype);\n\nvar constructor = function () {};\nconstructor.prototype = obj;\n\nvar d_obj = new constructor();\nassert (Object.getPrototypeOf(d_obj) === obj);\n\nobj = Object.create(null);\nassert (Object.getPrototypeOf(obj) === null);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/object-literal-fails.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction throw_error(snippet)\n{\n  try\n  {\n    eval(snippet);\n    assert (false);\n  }\n  catch (e)\n  {\n    assert (e instanceof SyntaxError);\n  }\n}\n\nfunction throw_error_strict(snippet)\n{\n  'use strict'\n\n  try\n  {\n    eval(snippet);\n    assert (false);\n  }\n  catch (e)\n  {\n    assert (e instanceof SyntaxError);\n  }\n}\n\n// These should be failed in ECMA-262 v5.1\nthrow_error_strict(\"({a:1, a:2})\");\nthrow_error(\"({a:1, get a() { return 1 }})\");\nthrow_error(\"({get a() {return undefined}, get a() {return undefined}})\");\nthrow_error(\"({ get 1() {}, 1:1 })\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/object-methods.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  Object.getOwnPropertyNames(\"hello\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry\n{\n  Object.preventExtensions(42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry\n{\n  Object.isExtensible(42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry\n{\n  Object.seal(42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry\n{\n  Object.isSealed(42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry\n{\n  Object.freeze(42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry\n{\n  Object.isFrozen(42);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Object.keys(\"hello\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Object.getOwnPropertyNames(\"hello\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Object.getOwnPropertyDescriptor(\"hello\", '1');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regexp-construct.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r = RegExp (\"a\",\"gim\");\nvar r2;\n\ntry {\n  r2 = RegExp (r,\"gim\");\n  assert(false);\n}\ncatch ( e )\n{\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regexp-lastindex.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar t = /abc/g;\nt.lastIndex = -12.5;\nresult = t.exec(\"abc   abc\");\nassert(!result);\nassert(t.lastIndex === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regexp-routines.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  RegExp.prototype.toString.call ({});\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-1065.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnew (new (new RegExp().constructor)().constructor)().constructor.prototype.toString();\n\ntry {\n  RegExp().constructor().constructor.prototype.compile(RegExp.prototype);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-1080.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n((new RegExp(\"}\").constructor)(\"a\", \"g\").constructor)(undefined).constructor.prototype.toString();\nnew Date(\"2015-07-09T12:13:14.121+01:30\").toISOString();\n\ntry {\n  RegExp(new RegExp(\"a\", \"g\")).constructor(\"\").constructor.prototype.compile(RegExp.prototype);\n  assert (false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nnew Date(\"2015-09-17\").getUTCFullYear();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-116.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  Symbol.for.length.toString.length.toExponential.length.valueOf.length.toExponential.length.valueOf.length.toFixed.name.anchor.name.bold.length.toExponential.caller;\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-1546.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nString.prototype.split(RegExp.prototype);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-1641.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar result = \"0\".split(RegExp.prototype);\n\nassert(result.length === 1);\nassert(result[0] === \"0\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-2058.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"/?:/\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-312.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar res = RegExp.prototype.exec(10);\n\nassert (res[0] === \"\");\nassert (res.input === \"10\");\nassert (res.index === 0);\nassert (res.length === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-3151-function.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ndo function $ ( ) { } while (0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-3637.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = [1, 2, 3, 4];\nvar b = a.slice(0, { valueOf: function(){ a.length = 0; return 100; } });\n\nassert(b.length === 0);\n\nvar c = [1, 2, 3, 4];\nc.prop = 4\nvar d = c.slice(0, { valueOf: function(){ c.length = 0; return 100; } });\n\nassert(d.length === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-3815.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction a() {}\n\ntry {\n  (a()) = a\n  assert (false);\n} catch (e) {\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/regression-test-issue-787.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nArray.prototype.push(Math.sin);\nObject.freeze(Array.prototype);\nString.prototype.match(String.prototype);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/string-prototype-split.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = \"foo//bar/baz//foo\";\nres = str.split(\"a\", Infinity);\nassert (res.length === 0);\n\nres = str.split(/\\/\\//, -1);\nassert (res.length === 3);\nassert (res[0] === \"foo\");\nassert (res[1] === \"bar/baz\");\nassert (res[2] === \"foo\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/string-regexp-methods.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Changing exec should not affect replace.\nObject.getPrototypeOf(/x/).exec = function () { return 1234; }\nassert (/y/.exec(\"y\") === 1234);\n\nassert (\"y\".replace (/y/, \"x\") === \"x\");\nassert (\"ay\".search (/y/) === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/string-upper-lower-case-conversion.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Although codepoint 0x10400 and 0x10428 are an upper-lowercase pair,\n// we must not do their conversion in JavaScript. We must also ignore\n// stray surrogates.\n\nassert (\"\\ud801\\ud801\\udc00\\udc00\".toLowerCase() == \"\\ud801\\ud801\\udc00\\udc00\");\nassert (\"\\ud801\\ud801\\udc28\\udc28\".toUpperCase() == \"\\ud801\\ud801\\udc28\\udc28\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/test_suite_15.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_15_07_04_02__006() {\n  assert(Number.prototype.toString(2) === \"0\");\n})();\n\n(function tc_15_03_04_02__001() {\n  assert(Function.prototype.toString.hasOwnProperty('length'));\n  assert(!(delete Function.prototype.toString.length));\n  assert(Function.prototype.toString.hasOwnProperty('length'));\n})();\n\n(function tc_15_03_04_02__004() {\n  assert(Function.prototype.toString.hasOwnProperty('length'));\n  assert(!(delete Function.prototype.toString.length));\n  assert(Function.prototype.toString.hasOwnProperty('length'));\n})();\n\n(function tc_15_07_04_05__002() {\n  assert(Number.prototype.toFixed(0) === \"0\");\n})();\n\n(function tc_15_07_04_05__007() {\n  assert(Number.prototype.toFixed(Number.NaN) === \"0\");\n})();\n\n(function tc_15_07_04_02__008() {\n  assert(Number.prototype.toString() === \"0\");\n})();\n\n(function tc_15_07_04_05__004() {\n  assert (Number.prototype.toFixed(1.1) === \"0.0\");\n})();\n\n(function tc_15_07_03_01__010() {\n  assert(Number.prototype == +0);\n})();\n\n(function tc_13_02__002() {\n  var foo = function (c, y) {\n  };\n  var check = foo.hasOwnProperty(\"length\") && foo.length === 2;\n\n  foo.length = 12;\n  if (foo.length === 12)\n    check = false;\n\n  for (p in foo)\n  {\n    if (p === \"length\")\n      check = false;\n  }\n  delete foo.length;\n  if (!foo.hasOwnProperty(\"length\"))\n    check = false;\n\n  assert(check === true);\n})();\n\n(function tc_15_07_03_01__008() {\n  delete Number.prototype.toString\n  assert(Number.prototype.toString() === \"[object Number]\");\n})();\n\n(function tc_15_07_04__002() {\n  assert(typeof Number.prototype === \"object\" && Number.prototype == +0.0);\n})();\n\n(function tc_15_07_03_01__011() {\n  assert(1/Number.prototype === Number.POSITIVE_INFINITY);\n})();\n\n(function tc_15_07_03_01__004() {\n  var b = Number.prototype\n  Number.prototype = 4\n  assert(Number.prototype != 4 && Number.prototype === b)\n})();\n\n(function tc_15_07_03_01__009() {\n  Number.prototype.toString = Object.prototype.toString;\n  assert(Number.prototype.toString() === \"[object Number]\");\n})();\n\n(function tc_15_07_04_05__001() {\n  assert(Number.prototype.toFixed() === \"0\");\n})();\n\n(function tc_15_07_04__001() {\n  delete Number.prototype.toString\n  assert(Number.prototype.toString() === \"[object Number]\");\n})();\n\n(function tc_15_07_04_05__005() {\n  assert(Number.prototype.toFixed(0.9) === \"0\");\n})();\n\n(function tc_15_07_04_05__006() {\n  assert (Number.prototype.toFixed(\"1\") === \"0.0\");\n})();\n\n(function tc_15_07_04_05__008() {\n  assert(Number.prototype.toFixed(\"some string\") === \"0\");\n})();\n\n(function tc_15_07_04_05__003() {\n  assert(Number.prototype.toFixed(1) === \"0.0\");\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/es5.1/try-catch.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() {\n  try {\n    assert(e() == 6)\n    throw 8;\n    assert(false);\n  } catch (e) {\n    function e() { return 6 }\n    assert(e == 8);\n  }\n}\n\nf();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/escape-sequences.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert ('abcd\\\nefgh' === 'abcdefgh');\n\nassert ('\\'' === \"'\");\nassert (\"\\'\" === \"'\");\nassert ('\\\"' === '\"');\nassert (\"\\\"\" === '\"');\n\nassert ((new String ('\\\\')).length === 1);\nassert ((new String ('\\b')).length === 1);\nassert ((new String ('\\f')).length === 1);\nassert ((new String ('\\n')).length === 1);\nassert ((new String ('\\r')).length === 1);\nassert ((new String ('\\t')).length === 1);\nassert ((new String ('\\v')).length === 1);\n\n/* verifying character codes */\nassert ((new String ('\\\\')).charCodeAt (0) === 92);\nassert ((new String ('\\b')).charCodeAt (0) === 8);\nassert ((new String ('\\f')).charCodeAt (0) === 12);\nassert ((new String ('\\n')).charCodeAt (0) === 10);\nassert ((new String ('\\r')).charCodeAt (0) === 13);\nassert ((new String ('\\t')).charCodeAt (0) === 9);\nassert ((new String ('\\v')).charCodeAt (0) === 11);\n\n/* 'p' is not SingleEscapeCharacter */\nassert ('\\p' === 'p');\n\nvar v\\u0061riable = 'valu\\u0065';\nassert (variable === 'value');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/eval-with.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() {\n  try {\n    a;\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n  }\n\n  var o = { a:1 };\n\n  with (o)\n  {\n    eval(\"var a = 2\")\n  }\n\n  assert (o.a === 2);\n  assert (a === undefined);\n}\nf();\n\nfunction g() {\n  try {\n    a;\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n  }\n\n  var o = { a:1 };\n\n  with (o)\n  {\n    eval(\"function a() { return 8; }\")\n  }\n\n  assert (o.a === 1);\n  assert (a() === 8);\n}\ng();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/eval.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (eval () === undefined);\nassert (eval (undefined) === undefined);\nassert (eval (null) === null);\nassert (eval (true) === true);\nassert (eval (false) === false);\nassert (eval (1) === 1);\nassert (eval (eval) === eval);\n\n/* Indirect eval */\nfunction f1()\n{\n var v1 = 'local value';\n\n assert (v1 === 'local value');\n assert (typeof (this.v1) === 'undefined');\n\n r = this.eval ('var v1 = \"global value\";');\n\n assert (v1 === 'local value');\n assert (this.v1 === 'global value');\n assert (r === undefined);\n};\n\nf1 ();\n\n/* Direct eval from strict mode code */\nfunction f2 (global)\n{\n 'use strict';\n var v2 = 'local value';\n\n assert (v2 === 'local value');\n assert (typeof (global.v2) === 'undefined');\n\n r = eval ('var v2 = \"global value\";');\n\n assert (v2 === 'local value');\n assert (typeof (global.v2) === 'undefined');\n assert (r === undefined);\n\n try\n {\n   eval ('arguments = 1;');\n   assert (false);\n }\n catch (e)\n {\n   assert (e instanceof SyntaxError);\n }\n}\n\nf2 (this);\n\nvar y;\n\nfor (var i = 0; i < 100; i++)\n{\n  var r = eval ('var x =' + ' 1;');\n  assert (typeof (x) === 'number');\n  assert (r === undefined);\n\n  delete x;\n  assert (typeof (x) === 'undefined');\n\n  r = eval ('\"use ' + 's' + 't' + 'r' + 'i' + 'c' + 't\"; va' + 'r x = 1;');\n  assert (typeof (x) === 'undefined');\n  assert (r === \"use strict\");\n\n  y = 'str';\n  assert (typeof (y) === 'string');\n\n  delete y;\n  assert (typeof (y) === 'string');\n\n  r = eval ('var y = \"another ' + 'string\";');\n  assert (y === 'another string');\n  assert (r == undefined);\n\n  delete y;\n  assert (typeof (y) === 'string');\n\n  r = eval ('if (true) 3; else 5;');\n  assert (r === 3);\n}\n\n// Check SyntaxError handling\ntry\n{\n  eval ('var var;');\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof SyntaxError);\n}\n\ntry\n{\n  eval (\"v_0 = {a: Math, /[]/};\");\n  assert (false);\n}\ncatch(e)\n{\n  assert (e instanceof SyntaxError);\n}\n\n// nested eval with function expressions\ncode = 'eval(\"(function (){})\")';\ncode = \"eval ('\" + code + \"')\";\neval (code);\n\n// Eval enclosed in brackets is still an eval.\nvar p1 = 0;\n\nfunction f3() {\n  var p1 = 5;\n  (eval)(\"assert(p1 === 5)\");\n}\nf3();\n\nfunction f4() {\n  var p1 = 6;\n  ((eval))(\"assert(p1 === 6)\");\n}\nf4();\n\nfunction f5() {\n  var p1 = 7;\n  (((((eval)))(\"assert(p1 === 7)\")));\n}\nf5();\n\nfunction f6() {\n  var p1 = 8;\n  var e = eval;\n\n  e(\"assert(p1 === 0)\");\n  (((((e)))(\"assert(p1 === 0)\")));\n}\nf6();\n\ny = 1;\nfunction f7() {\n  function x() { return y; }\n  eval(\"assert(x()() === 5); function y() { return 5 } assert(x()() === 5)\");\n}\nf7()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/arguments-assignment-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\narguments = 1;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/arguments-catch-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\ntry{}catch(arguments){};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/arguments-in-prop-set-param-list-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nvar a = { set a(arguments) {} };\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/arguments-in-var-decl-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nvar arguments;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/arguments-param-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nfunction f(arguments) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/arguments-postfix-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\narguments++;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/arguments-prefix-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\n++arguments;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/delete-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\ndelete a;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/escape-sequences-invalid-hex.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = '\\x5t';\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/escape-sequences-invalid-unicode.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = '\\u004t';\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/escape-sequences-invalid-variable.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a\\u0028bcd;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/eval-assignment-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\neval = 1;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/eval-catch-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\ntry{}catch(eval){};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/eval-in-prop-set-param-list-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nvar a = { set a(eval) {} };\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/eval-in-var-decl-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nvar eval;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/eval-param-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nfunction f(eval) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/eval-postfix-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\neval++;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/eval-prefix-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\n++eval;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/func-expr-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\";\n\n(function () {\n  var let = 1;\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/labelled-statements-break-across-function.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\na: for (var i = 0; i < 10; i++)\n{\n  function f ()\n  {\n    for (var j = 0; n < 10; j++)\n    {\n      break a;\n    }\n  }\n\n  f ();\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/labelled-statements-duplicate-label.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\na: a: for (var i = 0; i < 10; i++)\n{\n  break a;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/labelled-statements-no-label.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor (var i = 0; i < 10; i++)\n{\n  break a;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/let-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nvar let = 1;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-001.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// File does not exist.\nimport b from \"module-exports.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-002.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { , as b } from \"../es.next/module-export-01.mjs\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-003.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport , as b from \"../es.next/module-export-01.mjs\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-004.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { b as , } from \"../es.next/module-export-01.mjs\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-005.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Named imports must be in a NamedImports block. */\nimport b as , from \"../es.next/module-export-01.mjs\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-006.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Can't have reserved words for the referenced bindings. */\nexport { yield as y };\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-007.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Module requests must always be evaluated. */\nimport \"./module-sideeffect.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-008.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* A string literal must always follow the 'from' keyword. */\nimport { b } from\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-009.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* A string literal must always follow the 'from' keyword. */\nimport { b } from 3\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-010.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Can't have duplicate local bindings */\nimport { c as a, d as a } from \"../es.next/module-export-01.mjs\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-011.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-012.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-013.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport var a = 4;\nexport 3\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-014.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Import/export statements must be in the global scope. */\nif (true) {\n  import { c } from \"../es.next/module-export-01.mjs\";\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-015.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Import/export statements must be in the global scope. */\nfunction someFunction() {\n  import { c } from \"../es.next/module-export-01.mjs\";\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-016.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Import/export statements must be in the global scope. */\neval ('import { c } from \"../es.next/module-export-01.mjs\";');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-017.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* NamedImports must always be followed by a FromClause. */\nimport { b }, from \"../es.next/module-export-01.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-018.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* An import statement can have either a NameSpaceImport or NamedIpmorts */\nimport * as mod, { b } from \"../es.next/module-export-01.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-019.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* An ImportClause must be followed by a FromClause. */\nimport { c }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-020.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* '*' is not valid inside NamedImports. */\nimport { *, d } from \"../es.next/module-imported-01.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-021.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Can't have duplicated local bindings. */\nimport { b } from \"../es.next/module-export-01.mjs\"\nimport { b } from \"../es.next/module-export-02.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-022.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* FromClause must follow an ImportClause. */\nimport from \"../es.next/module-export-02.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-023.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Namespace imports must have a local name. */\nimport * from \"../es.next/module-export-01.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-024.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Star exports can't have an export name. */\nexport * as star from \"../es.next/module-export-01.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-025.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Indirect exports must be checked if they are resolvable. */\nexport { l } from \"../es.next/module-export-01.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-026.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Can't have circular imports/exports. */\nexport { b } from \"./module-027.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-027.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Can't have circular imports/exports. */\nexport { b } from \"./module-026.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-028.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Ambiguous import */\nimport { x } from \"../es.next/module-export-05.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-029.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Import/export statements must be in the global scope. */\nFunction('','import { c } from \"../es.next/module-export-01.mjs\";')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-030.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* No default export found. */\nimport def from \"../es.next/module-export-06.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-031.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default function () { function () {} }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-032.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet a;\nimport { a } from \"../es.next/module-export-fail-test.mjs\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-033.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar a;\nimport { a } from \"../es.next/module-export-fail-test.mjs\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-034.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { a } from \"../es.next/module-export-fail-test.mjs\";\nclass a {};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-035.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { a } from \"../es.next/module-export-fail-test.mjs\";\nfunction a() {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-036.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport \"./module-await-001.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-037.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport \"./module-await-001.mjs\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-await-001.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nawait\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-export-001.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default await 1;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-export-default-arrow.mjs",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport default () => 1, 5;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/module-sideeffect.mjs",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nthrow new Error(\"side-effect\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/octal-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nvar a = 07;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/param-duplication-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nfunction f(a, a) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1387.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n'use strict'\nfunction undefined () {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1549.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nva'c=\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1550.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ndo break; while a\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1597.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  throw 1\n} catch (e) {\n\n  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n\n  throw 1\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1598.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor (;; a[,b] )\n  break;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1615.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n0x10000 && eval(0x10000())\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1624.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nwith ({}) {\n  a = function (b)\n  {\n    var init;\n    init();\n  }\n}\na();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1671.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nArray.prototype.push(\"A\", \"B\", 0, 1)\nArray.prototype.sort(JSON.parse)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1831.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/኱𞻲/‌ஃ︠﹍\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1871-1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n𝄞\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1871-2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ng𝄞\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1873.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nwhile (\n  {a: a,\n   get a() {}\n }) continue;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-1918.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nthrow $ = {name: function () {}}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2039.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n` ?N\\7$D\\\\${D ?N@ ${Z ?11.1\u0001Z7$D\\\\${D ?N@ ${Z ?11.1\u0001 ?11.1\u0001.G.{Z %11.0\u0001.G.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2069.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnull[1] = 'abcd';\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2094.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction a() {\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2095.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar e = new SyntaxError('dummy');\ne.name = 'Syntax';\nthrow e;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2106.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnew Float32Array({ length: 0x40000001 });\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2180.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nJSON.parse('\"' + '\\\\');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2192.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nJSON.parse('\"' + '\\\\u');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2344.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nnew RegExp().compile(\"\\\\1\\\\\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2489.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperty(Object.prototype, 0, {'get': function() { throw $ }});\n/**\n * The below line is added becase the patch #2526 introduces internal properties for promises.\n * The Reference Error this issue produced can still be reproduced by calling this line.\n * The reason it was present before is that Promise's 0th property was Promise which could be modified\n * with the above line, and the engine getting that property for internal purposes got the `throw $` instead.\n * Thanks to internal properties, it can't be modified anymore from JS side, therefore Promise won't trigger the error.\n * To keep this issue's output as it was before, the `Array.prototype[0];` line is added.\n */\nArray.prototype[0];\nPromise.all();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2654.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n--null.static ? this : [ , ] instanceof true;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2659.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n`eval`(\"eval ('super (a, b, c)')\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2719.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nJSON.stringify(URIError, valueOf, new String('abc\\u2040\\u2030cba'));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2774.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Discard the output of the 'print' function */\nprint = function () {}\n\nprint ( JSON . stringify ( \"\" ) === '\"\"' )\nnormal_string = \"asdasd\"\nprint ( JSON . stringify ( normal_string ) == '\"asdasd\"' )\nformat_characters = \"\\ba\\fs\\nd\\ra\\tsd\"\nprint ( JSON . stringify ( format_characters ) == '\"\\\\ba\\\\fs\\\\nd\\\\ra\\\\tsd\"' )\nctl_string = \"asd\u001fasd\"\nprint ( JSON . stringify ( ctl_string ) == \"h\" )\nescpad_string = \"\\\"asda\\sd\"\nprint ( JSON . stringify ( escpad_string ) == '\"\\\\\"asdasd\"' )\nprint ( JSON . stringify ( '\\u2040' ) == '\"⁀\"' )\nprint ( JSON . stringify ( 'abc\\u2040\\u2030cba' ) == '\"abc⁀‰cba\"' )\nprint ( JSON . stringify ( 1 ) === '1' )\nprint ( JSON . stringify ( 0 ) === 'true' )\nprint ( JSON . stringify ( \"\" ) === '\"foo\"' )\nprint ( JSON . stringify ( ) === 'null' )\nprint ( NaN , RegExp ( \"54\" ) )\nprint ( JSON . stringify ( new Number ( 1 ) ) === 0 )\nprint ( JSON . stringify ( new Boolean ( 0 ) ) === 0 )\nprint ( JSON . stringify ( new String ( 0 ) ) === 0 )\nempty_object = { }\nprint ( JSON . stringify ( empty_object ) == '{}' )\nempty_object = { }\nempty_object . a = undefined\nprint ( JSON . stringify ( empty_object ) == 0 )\np_object = { $ : 1 , \"b\" : 0 , \"\" : 0 , \"d\" : 0 , \"e\" : undefined }\nprint ( JSON . stringify ( p_object ) == '{\"a\":1,\"b\":true,\"c\":\"foo\",\"d\":null}' )\no_object = { $ : new Number ( 1 ) , \"\" : new Boolean ( 0 ) , \"c\" : new String ( 0 ) }\nprint ( JSON . stringify ( o_object ) == '{\"a\":1,\"b\":true,\"c\":\"foo\"}' )\nchild = { $ : 1 , \"\" : new String ( ) , \"c\" : undefined }\nparent = { $ : 0 , \"b\" : child , \"\" : 0 }\nprint ( JSON . stringify ( parent ) == '{\"a\":true,\"b\":{\"a\":1,\"b\":\"\\\\nfoo\"},\"c\":null}' )\nrecursive_object = { }\nrecursive_object . $ = 0\nrecursive_object . $ = recursive_object\ntry { JSON . stringify ( recursive_object )\n$ ( $ )\n} catch ( e ) { print ( e instanceof TypeError )\n}\nempty_array = [ ]\nprint ( JSON . stringify ( JSON . parse ) == '[]' )\narray = [ undefined ]\nprint ( JSON . stringify ( array ) == '[null]' )\np_array = [ 1 , 0 , \"\" , 0 , undefined ]\nprint ( JSON . stringify ( p_array ) == '[1,true,\"foo\",null,null]' )\no_array = [ new Number ( 1 ) , new Boolean ( 0 ) , new String ( 0 ) ]\nprint ( \"#xy#\" . replace ( /(x)((((((((y))))))))/ , \"$00|$01|$011|$090|$10|$99\" ) === \"#$00|x|x1|y0|x0|y9#\" )\nchild = [ 1 , new String ( \"\\nfoo\" ) , undefined ]\nparent = [ 0 , child , 0 ]\nprint ( JSON . stringify ( parent ) == '[true,[1,\"\\\\nfoo\",null],null]' )\nrecursive_array = [ ]\nrecursive_array [ 0 ] = 0\nrecursive_array [ 1 ] = recursive_array\nprint ( \"\" . match ( ) !== void 0 )\nobject = { $ : 1 , $ : [ 1.25 , 2.5 , 3.75 ] }\nprint ( JSON . stringify ( object ) == '{\"a\":1,\"b\":[1,true,{\"a\":\"foo\"}]}' )\nobject = { $ : [ /  / ] , $ : { } }\nprint ( JSON . stringify ( object ) === '{\"a\":[1],\"b\":{}}' )\narray = [ 1 , { $ : 2 , \"\" : 0 , c : [ 3 ] } ]\nprint ( JSON . stringify ( array ) == '[1,{\"a\":2,\"b\":true,\"c\":[3]}]' )\nto_json_object = { }\nto_json_object . $ = 2\nto_json_object . toJSON = function ( ) {\n}\nprint ( JSON . stringify ( to_json_object ) === \"3\" )\nfunction replacer_function ( ) { if ( typeof ( ℇ ) == \"\" ) return \"FOO\"\n} object = { $ : 0 , \"b\" : new String ( \"JSON\" ) , \"\" : 3 }\nprint ( JSON . stringify ( object , replacer_function ) == '{\"a\":\"FOO\",\"b\":\"JSON\",\"c\":3}' )\nfilter = [ \"\" ]\nprint ( JSON . stringify ( object , filter ) == '{\"a\":\"JSON\",\"b\":\"JSON\"}' )\nprint ( JSON . stringify ( [ ] , [ 0 , 'foo' ] ) === 0 )\nnumber = new Number ( )\nnumber . toString = { }\nnumber . valueOf = [ ]\ntry { JSON . stringify ( [ ] , [ number ] )\n$ ( $ )\n} catch ( e ) { print ( e instanceof TypeError )\n}\nfunction replacer_thrower ( ) { throw new ReferenceError ( $ )\n} try { $ . $ ( $ , $ )\n$ ( $ )\n} catch ( e ) { print ( e . message === 0 )\nprint ( e instanceof ReferenceError )\n}\nobject = { $ : 2 }\nprint ( JSON . stringify ( object , 3 ) == 0 )\nvar f = new Function ( \" a\\t ,  b\" , \"\\u0020c\" , \"return a + b + c;\" )\nprint ( JSON . stringify ( object , 0 ) == 0 )\nprint ( JSON . stringify ( object ) == 0 )\nprint ( JSON . stringify ( ) == 0 )\nprint ( JSON . stringify ( object , new Boolean ( 0 ) ) == 0 )\nprint ( ReferenceError ( 0 ) == '{\"a\":2}' )\nprint ( JSON . stringify ( object , new String ( 0 ) ) == 0 )\nprint ( JSON . stringify ( object , { $ : 3 } ) == 0 )\nobject = { $ : 2 }\nprint ( JSON . stringify ( object , 0 , \"\" ) == '{\\n   \"a\": 2\\n}' )\nprint ( JSON . stringify ( object , 0 , \"\" ) == '{\\nasd\"a\": 2\\n}' )\nprint ( JSON . stringify ( object , 0 , \"\" ) == '{\\nasd0123456\"a\": 2\\n}' )\nprint ( JSON . stringify ( object , 0 , \"asd\\u20400123456789\" ) == '{\\nasd⁀012345\"a\": 2\\n}' )\nprint ( JSON . stringify ( object , 0 , 100 ) == '{\\n          \"a\": 2\\n}' )\nprint ( JSON . stringify ( object , 0 , - 5 ) == 0 )\narray = [ 0 ]\nprint ( JSON . stringify ( array , 0 , \"   \" ) == '[\\n   2\\n]' )\nprint ( JSON . stringify ( array , 0 , \"asd\" ) == '[\\nasd2\\n]' )\nprint ( JSON . stringify ( array , 0 , \"asd0123456789\" ) == '[\\nasd01234562\\n]' )\nprint ( JSON . stringify ( array , 0 , \"\" ) == '[\\nasd⁀0123452\\n]' )\nprint ( )\nprint ( JSON . stringify ( array , 0 , - 5 ) == '[2]' )\nnested_object = { $ : 2 , \"\" : { $ : this } }\nprint ( JSON . stringify ( nested_object , 0 , 2 ) == \"zero\" )\n$ = [ $ , [ $ , $ ] ]\n$ ( $ . $ ( nested_array , 0 , $ ) == '[\\n  2,\\n  [\\n    1,\\n    true\\n  ]\\n]' )\n$\n$ ( $ . $ ( $ , $ , $ ) == $ )\n$ ( $ . $ ( $ , $ , $ ) == $ )\n$\n$\n$ ( $ . $ ( $ , $ , [ $ , $ , $ ] ) == $ )\n$ ( $ . $ ( $ , $ , { $ : 3 } ) == $ )\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2775.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Discard the output of the 'print' function */\nprint = function () {}\n\nprint ( JSON . stringify ( \"\" ) === '\"\"' )\nnormal_string = \"asdasd\"\nprint ( JSON . stringify ( normal_string ) == '\"asdasd\"' )\nformat_characters = \"\\ba\\fs\\nd\\ra\\tsd\"\nprint ( JSON . stringify ( format_characters ) == '\"\\\\ba\\\\fs\\\\nd\\\\ra\\\\tsd\"' )\nctl_string = \"asd\u001fasd\"\nprint ( JSON . stringify ( ctl_string ) == '\"asd\\\\u001fasd\"' )\nescpad_string = \"\\\"asda\\sd\"\nprint ( JSON . stringify ( escpad_string ) == '\"\\\\\"asdasd\"' )\nprint ( JSON . stringify ( true ) === 'true' )\nprint ( JSON . stringify ( \"foo\" ) === '\"foo\"' )\nprint ( JSON . stringify ( null ) === 'null' )\nprint ( JSON . stringify ( RegExp ) === undefined )\nprint ( JSON . stringify ( new Number ( 1 ) ) === '1' )\nprint ( JSON . stringify ( new Boolean ( true ) ) === 'true' )\nprint ( JSON . stringify ( new String ( \"foo\" ) ) === '\"foo\"' )\nempty_object = { }\nprint ( JSON . stringify ( empty_object ) == '{}' )\nempty_object = { }\nempty_object . $ = undefined\nprint ( JSON . stringify ( empty_object ) == '{}' )\np_object = { \"a\" : 1 , \"b\" : true , \"c\" : \"foo\" , \"d\" : null , \"e\" : undefined }\nprint ( JSON . stringify ( p_object ) == '{\"a\":1,\"b\":true,\"c\":\"foo\",\"d\":null}' )\no_object = { \"a\" : new Number ( 1 ) , \"b\" : new Boolean ( true ) , \"c\" : new String ( \"foo\" ) }\nprint ( JSON . stringify ( o_object ) == '{\"a\":1,\"b\":true,\"c\":\"foo\"}' )\nchild = { \"a\" : 1 , \"b\" : new String ( \"\\nfoo\" ) , $ : undefined }\nparent = { \"a\" : true , \"b\" : child , \"c\" : null }\nprint ( JSON . stringify ( parent ) == '{\"a\":true,\"b\":{\"a\":1,\"b\":\"\\\\nfoo\"},\"c\":null}' )\nrecursive_object = { }\nrecursive_object . $ = 0\nrecursive_object . b = recursive_object\ntry { JSON . stringify ( recursive_object )\n$ ( ')' )\n} catch ( e ) { print ( e instanceof TypeError )\n}\nempty_array = [ ]\nprint ( JSON . stringify ( empty_array ) == '[]' )\narray = [ undefined ]\nprint ( JSON . stringify ( array ) == '[null]' )\np_array = [ 1 , true , \"foo\" , null , undefined ]\nprint ( JSON . stringify ( p_array ) == '[1,true,\"foo\",null,null]' )\no_array = [ new Number ( 1 ) , new Boolean ( true ) , new String ( \"foo\" ) ]\nprint ( JSON . stringify ( o_array ) == '[1,true,\"foo\"]' )\nchild = [ 1 , new String ( \"\\nfoo\" ) , undefined ]\nparent = [ true , child , null ]\nprint ( JSON . stringify ( parent ) == '[true,[1,\"\\\\nfoo\",null],null]' )\nrecursive_array = [ ]\nrecursive_array [ 0 ] = 2\nrecursive_array [ 1 ] = recursive_array\ntry { JSON . stringify ( recursive_array )\n$ ( $ )\n} catch ( e ) { print ( e instanceof TypeError )\n}\nobject = { \"a\" : 1 , \"b\" : [ 1 , true , { \"a\" : \"foo\" } ] }\nprint ( JSON . stringify ( object ) == '{\"a\":1,\"b\":[1,true,{\"a\":\"foo\"}]}' )\nobject = { \"a\" : [ 1 ] , \"b\" : { } }\nprint ( JSON . stringify ( object ) === '{\"a\":[1],\"b\":{}}' )\narray = [ 1 , { \"a\" : 2 , \"b\" : true , c : [ 3 ] } ]\nprint ( JSON . stringify ( array ) == '[1,{\"a\":2,\"b\":true,\"c\":[3]}]' )\nto_json_object = { }\nto_json_object . $ = 0\nto_json_object . $ = function ( ) {\n}\nvar v1 = ( new Int8Array ( 149 ) ) . subarray ( 78 )\nfunction replacer_function ( $ , value ) { if ( typeof ( value ) == \"string\" ) return \"FOO\"\nreturn value\n} object = { \"a\" : \"JSON\" , \"b\" : new String ( \"JSON\" ) , \"c\" : 3 }\nprint ( JSON . stringify ( object , replacer_function ) == '{\"a\":\"FOO\",\"b\":\"JSON\",\"c\":3}' )\nfilter = [ \"a\" , \"b\" ]\nprint ( JSON . stringify ( object , filter ) == '{\"a\":\"JSON\",\"b\":\"JSON\"}' )\nprint ( JSON . stringify ( [ ] , [ \"\" , 4 ] ) === '[]' )\nnumber = new Number ( 2.2 )\nnumber . toString = { }\nnew Promise ( isFinite . toString ) . catch ( Promise . prototype . then )\ntry { } catch ( $ ) { $ ( $ instanceof $ )\n}\nfunction replacer_thrower ( ) { throw new ReferenceError ( \"foo\" )\n} try { JSON . stringify ( object , replacer_thrower )\n} catch ( e ) { print ( e . message === \"foo\" )\nprint ( e instanceof ReferenceError )\n}\nobject = { \"a\" : 2 }\nprint ( JSON . stringify ( object , 3 ) == '{\"a\":2}' )\nprint ( JSON . stringify ( object , 0 ) == '{\"a\":2}' )\nprint ( JSON . stringify ( object , 0 ) == '{\"a\":2}' )\nprint ( JSON . stringify ( object , undefined ) == '{\"a\":2}' )\nprint ( JSON . stringify ( object , 0 ) == '{\"a\":2}' )\nprint ( JSON . stringify ( object , new Boolean ( 0 ) ) == '{\"a\":2}' )\nprint ( JSON . stringify ( object , 0 , \"asd\\u20400123456789\" ) == '{\\nasd⁀012345\"a\": 2\\n}' )\nprint ( JSON . stringify ( object , 0 , 100 ) == '{\\n          \"a\": 2\\n}' )\nprint ( JSON . stringify ( object , 0 , - 5 ) == '{\"a\":2}' )\narray = [ 2 ]\nprint ( JSON . stringify ( array , 0 , \"   \" ) == '[\\n   2\\n]' )\nprint ( JSON . stringify ( array , 0 , \"asd\" ) == '[\\nasd2\\n]' )\nprint ( JSON . stringify ( array , 0 , \"asd0123456789\" ) == '[\\nasd01234562\\n]' )\nprint ( JSON . stringify ( array , 0 , \"asd\\u20400123456789\" ) == '[\\nasd⁀0123452\\n]' )\nprint ( JSON . stringify ( array , 0 , 100 ) == '[\\n          2\\n]' )\nprint ( JSON . stringify ( array , 0 , - 5 ) == '[2]' )\nnested_object = { do : 2 , let : this }\nprint ( JSON . stringify ( nested_object , 0 , 2 ) == '{\\n  \"a\": 2,\\n  \"b\": {\\n    \"c\": 1,\\n    \"d\": true\\n  }\\n}' )\n$ = [ $ , [ $ ] ]\n$ ( $ . $ ( nested_array , $ , 2 ) == '[\\n  2,\\n  [\\n    1,\\n    true\\n  ]\\n]' )\n$\n$\n$\n$ ( $ . $ ( $ , 0 , $ ) == $ )\neval ( \"{}/a/g\" )\n$ ( $ . $ ( $ , $ , [ $ , $ , 0 ] ) == $ )\n$ ( $ . $ ( $ , $ , { $ : 3 } ) == $ )\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2819.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  for (this << class extends this {} in this) { }\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2846.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f ( ) { }\nvar B = class extends f { constructor ( ){ eval ( \"eval ('super (1, 2, 3, 4)')\" ) ; } }\n    C = class extends B { g ( ) { { ( ) => { } } } }\n    D = class extends C { constructor ( ) { super ( )\n}\n\ng () { eval () } }\neval = eval.bind()\nnew D\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2885.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperties(constructor, { $: Object })\nJSON.parse('{\"a\":1}', function (k) {\n  if (k) { $ *= $ }\n})\nvar $ = Object.freeze(RegExp($, 'g')).exec()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2894.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nArray.prototype.unshift(Object(Symbol()));\nArray.prototype.reduce(function(p_0, p_1) { return p_0 + p_1}, \"\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2896.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport {} from \"dummy.mjs\";\nexport {} from \"../es.next/module-export-04.mjs\";\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2897.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nobject = { valueOf: function ( ) { return Symbol ( \"foo\" ) } };\nassert(\"\" + object);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2901.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nobject = new Object ( )\nvar str = Symbol ( 'foo' )\nassert ( object + str === \"[object Object]\" )\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2902.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar b = Symbol.for();\nfor (var $;;) {$ = $(\"\" + b)};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2908-1.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport{p0hc\"=\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2908-2.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport{a as p0hc\"=\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2908-3.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport{p0hc\"=\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2908-4.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport{a as p0hc\"=\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-2993.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nthrow new SyntaxError(\"𐐀\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3094.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass $ {\n  set ( ) {}\n}\nfor ( ; 10 ; i )\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3096.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nclass $ {\n  set ( ) {\n    while ( done )\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3101.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor ( ; ; ( ) => 0) {\n    for ( ; $; $) ;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3102.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nwhile ( $(($) => {}) ) {\n    while ($);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3112.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar iter = \"\" [ Symbol.iterator ] ( );\niter.next.constructor ( Object.getPrototypeOf( iter ) )\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3117.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar $ = class { } .prototype  = [ ]\nswitch ( '1' ) {\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3119.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\na ( ) = { m ( ) { } } .m ( ) = class { m ( ) { } }.sameValue\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3121.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar Base = function ( ) { }.bind( );\nObject.defineProperty ( Base , 'prototype' , { get : function ( ) {$} } );\nclass C extends Base { }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3123.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nswitch ($) {\n  case $: class $ {;}\n  case $$: class $$ {; ; ; ; ;;;; ;}\n  case 6:\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3131.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nswitch ( $) { case $: for ( ; ; ) ; case $ :}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3140.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor (; []; [//])\nfunction f14(v33, v34) {\nswitch (!0x13) {}\n }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3145.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[this?$\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3152.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n$ = { $: () => 0, $: $ }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3173.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar NISLFuzzingFunc = function(d, c) {\n    var a = d.toPrecision(c);\n};\nvar NISLParameter0 = 59246;\nvar NISLParameter1 = function(p) {\n};\nNISLFuzzingFunc(NISLParameter0, NISLParameter1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3174.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nif ($)\n    function $ ( ) { };\nelse if ( b ) c\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3214.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar $ = { $ ( ){ } } = { g ( ) { ( ) => m ++ ( ) } }  = class extends C { constructor ( ) { super () } }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3253-1.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a;\nexport { a\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3253-2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a, b;\nexport { a as b\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3275.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor ( i in this ) class ${ } eval ( )\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3276.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nwith ({ }) class ${ $( ) { $ } }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3297.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"98765\".replace(76, function ( ) { return $ })\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3299.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f (a, b = $+ function ( ) { } ( ), $) { }\nvar $ = { $: function ($) { }}\nf( )\n\nfunction duplicatedArg ( a , b = d , c ) {\n  try {\n    var eval\n    var id_1\n    if ( id_2 === eval ( ) ) { }\n  } finally { }\n}\n\nduplicatedArg(1, 2)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3300.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ny = 6\nfunction i ( a , b = ( y ) + 2 , c = typeof id_0 ) {\n  function x ( ) { }\n    eval ( \"//Single Line Comments\\u2029 var =;\" )\n   c === \"undefined\"\n   print ( y === 10 )\n   ( id_2 === 11 )\n}\ni ( )\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3394.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nclass Animal { }\n\nclass Dog extends Animal {\n    static explain() {\n        super.explain(...[])\n    }\n}\n\nDog.explain()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3398.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f($, [\n    [b, [c] = [], {} = {\n        $: eval()\n    }]\n] = [[]], c) {}\nf()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3410.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nvar a;\nPromise.race([a]).then(function() {\n  [] = []\n});\nthrow 0.1234;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3554.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function(){try{}catch(e){function e\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-358.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nlabel_0: \n    if (false)\n        do  {\n            continue label_0;\n        } while (false);"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3714.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction $() {\n    if ($)\n    function\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3735.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction $({ $ $() {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-384.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Copyrnse.\n\n'use stricto\n// C_pyrnsq.\n\n'use strictI\n// Copyrnse. Functionn f_0(){\n    'use strictT\n// Copyrnse.\n\n'use strict)\n// Copyrnse.\n\n'use strict;"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-3882.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor(let{[function(){}]:{}} = ()=>{} in []) ;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/regression-test-issue-4403.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nthrow new SyntaxError(\"[0: 98, 1: 54, 8: false, 10: 21, foo: bar]\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/throw-error-object.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nthrow new SyntaxError(\"error\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/throw-number.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nthrow 0.1234;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/throw-string.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nthrow \"SyntaxError\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/fail/with-strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\"use strict\"\n\nwith (Array) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/for-in-parse.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction parse (txt) {\n  try {\n    eval (txt)\n    assert (false)\n  } catch (e) {\n    assert (e instanceof SyntaxError)\n  }\n}\n\nvar obj = {a: 1, b: 2, c:3, d:4};\n\nvar forIn =\n  \"for var prop in obj\" +\n  \"   obj [prop] += 4\"\nparse (forIn)\n\nvar forIn =\n  \"for [var prop in obj]\" +\n  \"   obj[prop] += 4;\"\nparse (forIn)\n\nvar forIn =\n  \"for (var prop obj)\" +\n  \"   obj[prop] += 4;\"\nparse (forIn)\n\nvar forIn =\n  \"foreach (var prop in obj)\" +\n  \"   obj[prop] += 4;\"\nparse (forIn)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/for-in.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// 1.\nvar simple_obj = {a: 1, b: 2, c: 3, d: 4};\nfor (var prop_of_simple_obj in simple_obj) {\n    simple_obj[prop_of_simple_obj] += 4;\n}\n\nassert(simple_obj.a === 5\n       && simple_obj.b === 6\n       && simple_obj.c === 7\n       && simple_obj.d === 8);\n\n// 2.\nfor\n    (\n    var\n        prop_of_simple_obj in simple_obj\n    ) {\n    simple_obj[prop_of_simple_obj] -= 4;\n}\n\nassert(simple_obj.a === 1\n       && simple_obj.b === 2\n       && simple_obj.c === 3\n       && simple_obj.d === 4);\n\n// 3.\nfunction test() {\n  var cnt = 0;\n\n  for (var prop_of_simple_obj in simple_obj) {\n    if (prop_of_simple_obj === 'b')\n      continue;\n\n    cnt++;\n\n    simple_obj[prop_of_simple_obj] += 4;\n  }\n\n  return cnt;\n}\n\nvar ret_val = test();\n\nassert((simple_obj.a === 5\n        && simple_obj.b === 2\n        && simple_obj.c === 7\n        && simple_obj.d == 8)\n       && ret_val === 3);\n\n// 4.\nvar array_obj = new Array(1, 2, 3, 4, 5, 6, 7);\nvar prop_of_array_obj;\n\narray_obj.eight = 8;\n\nfor (prop_of_array_obj in array_obj) {\n    array_obj[prop_of_array_obj] += 1;\n}\n\nassert(array_obj[0] === 2\n       && array_obj[1] === 3\n       && array_obj[2] === 4\n       && array_obj[3] === 5\n       && array_obj[4] === 6\n       && array_obj[5] === 7\n       && array_obj[6] === 8\n       && array_obj['eight'] === 9);\n\n// 5.\nvar null_obj = null;\nfor (var prop_of_null_obj in null_obj) {\n    assert(false);\n}\n\n// 6.\nvar empty_object = {};\nfor (var prop_of_empty_object in empty_object) {\n    assert(false);\n}\n\n// 7.\nfor (var i in undefined) {\n    assert(false);\n}\n\n// 8.\nvar base_obj = {base_prop: \"base\"};\n\nfunction constr() {\n    this.derived_prop = \"derived\";\n}\n\nconstr.prototype = base_obj;\n\nvar derived_obj = new constr();\n\nfor (var prop_of_derived_obj in derived_obj) {\n    derived_obj[prop_of_derived_obj] += \"A\";\n}\n\nassert(derived_obj.base_prop === \"baseA\" && derived_obj.derived_prop === \"derivedA\");\n\n// 9.\nlog = {};\ncount = 0;\n\nfor (i in {q : 1})\n{\n  log [i] = true;\n  count++;\n}\n\nassert (count == 1 && 'q' in log);\n\n// 10.\nlog = {};\ncount = 0;\n\nfor (i in {q : 1, p : 2, get f() { ; }, set f (v) { ; }, get t () { }, set c (v) {}})\n{\n  log [i] = true;\n  count++;\n}\n\nassert (count == 5\n        && 'q' in log\n        && 'p' in log\n        && 'f' in log\n        && 't' in log\n        && 'c' in log);\n\n// 11.\nlog = {};\ncount = 0;\n\nvar a = [];\na[5] = 5;\nfor (var x in a)\n{\n  log[x] = true;\n  count++;\n}\n\nassert (count == 1\n        && '5' in log);\n\n// 12.\nlog = {};\ncount = 0;\n\nq = { c : 3, d : 4 };\n\nfunction p_constructor ()\n{\n  this.a = 1;\n  this.b = 2;\n\n  return this;\n}\n\np_constructor.prototype = q;\np = new p_constructor ();\n\nObject.defineProperty (p, 'h', { value : 5, enumerable : false, configurable : true });\nObject.defineProperty (q, 'h', { value : 6, enumerable : true, configurable : true });\n\nfor (var i in p)\n{\n  log[i] = true;\n  count++;\n}\n\nassert (count == 4\n        && 'a' in log\n        && 'b' in log\n        && 'c' in log\n        && 'd' in log);\n\n// 13.\nlog = {};\ncount = 0;\n\nfunction f()\n{\n  var tmp = { a: 1, b: 2, c: 3, d: 4 };\n\n  return tmp;\n}\n\nfor (var i in f())\n{\n  log[i] = true;\n  count++;\n}\n\nassert (count == 4\n        && 'a' in log\n        && 'b' in log\n        && 'c' in log\n        && 'd' in log);\n\n// 14.\nlog = {};\ncount = 0;\n\nb = 'prop';\nc = { prop : 1 };\nBoolean.prototype.boolean_prototype_prop = 1;\n\nfor (a in b in c)\n{\n  log[a] = true;\n  count++;\n}\n\nassert (count == 1\n        && 'boolean_prototype_prop' in log);\n\n// 15.\nlog = {};\ncount = 0;\n\nfor (a in 'prop' in { prop : 1 })\n{\n  log[a] = true;\n  count++;\n}\n\nassert (count == 1\n        && 'boolean_prototype_prop' in log);\n\n// 16.\na = 'str';\nb = {};\nfor ((a in b) ; ; )\n{\n  break;\n}\n\n// 17.\nlog = {};\ncount = 0;\n\nvar base_obj = { base_prop1: \"base1\", base_prop2: \"base2\" };\n\nfunction l () {\n    this.derived_prop1 = \"derived1\";\n    this.derived_prop2 = \"derived2\";\n}\n\nl.prototype = base_obj;\n\nvar derived_obj = new l();\n\nfor (var prop_of_derived_obj in derived_obj) {\n  delete derived_obj.derived_prop1;\n  delete derived_obj.derived_prop2;\n  delete base_obj.base_prop1;\n  delete base_obj.base_prop2;\n\n  log[prop_of_derived_obj] = true;\n  count++;\n}\n\nassert(count == 1\n       && ('base_prop1' in log\n           || 'base_prop2' in log\n           || 'derived_prop1' in log\n           || 'derived_prop2' in log));\n\ntry {\n  /* This form is a SyntaxError even in ES5.1. */\n  eval(\"for (a = b in {}) ;\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/for-parse.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction parse(txt) {\n  try {\n    eval(txt)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof SyntaxError)\n  }\n}\n\nparse(\"for (;;;) print('hello')\") \nparse(\"for (,,) print('hello')\") \nparse(\"for (i = 0; i < 10; i++; ) print('i: ' + i)\") \nparse(\"for (i = 0; i < 10; i++)\")\nparse(\"for i = 0; i < 10; i++ {}\")\nparse(\"for (i = 0;; i < 10; i++) {}\")\nparse(\"for (i = 0; j = 1; i < 10; i++) print('i: '+ i + ' j: ' + j)\")\nparse(\"for (i = 0 j = 5;i<10 || j<10; i++, j++) {}\")\nparse(\"for (i = 0, j = 5; i < 10 || j < 10; i++ j++) {}\")\nparse(\"for (i = 0, j = 5; i < 10 j < 10; i++, j++) {}\")\n\nvar doubleFor =\n\"for (i = 0; i < 5; i++) { \"+ \n\"  for (j = 0; j < 5; j++) { print('i: ' + i + ' j: ' + j) }\";\nparse(doubleFor)\n\nvar doubleFor2 =\n\"for (i = 0; i < 5; i++) { \"+ \n\"  for (j = 0; j < 5; j++) { print('i: ' + i + ' j: ' + j)\";\nparse(doubleFor2)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/for.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// 1.\nvar i = 0;\nfor (; i < 100; i++) {\n}\nassert(i == 100);\n\n// 2.\nfor (var j = 0; j < 100; j++) {\n}\nassert(j == 100);\n\n// 3.\nfor (i = 0; ; ) {\n  if (i == 100) {\n    break;\n    assert(false);\n  }\n  i++;\n}\nassert(i == 100);\n\n// 4.\nfor (i = 0; i < 10; i++) {\n  for (j = 0; j < 10; j++) {\n  }\n}\nassert(i != 100);\nassert(j != 100);\nassert(i == 10);\nassert(j == 10);\n\n// 5.\ns = '';\nfor (\nvar i = {x: 0};\n\n i.x < 2\n;\n i.x++\n\n)\n {\n  s += i.x;\n}\n\nassert (s === '01');\n\n// 6.\ns = '';\nfor (\nvar i = {x: 0};\n\n i.x < 2\n;\n\n i.x++\n\n)\n {\n  s += i.x;\n}\n\nassert (s === '01');\n\n// 7.\na = [];\nfor (; a[0]; ) {\n  assert (false);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/func-decl.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f() {\n    return 'foo';\n}\nassert ((function() {\n    if (1 === 1) {\n        function f() {\n            return 'bar';\n        }\n    }\n    return f();\n})() === 'bar');\n\nfunction check_syntax_error (s) {\n  try {\n    eval (s);\n    assert (false);\n  }\n  catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\ncheck_syntax_error (\"'use strict'; function arguments () {}\");\ncheck_syntax_error (\"'use strict'; var l = function arguments () {}\");\n\ncheck_syntax_error (\"function f__strict_mode_duplicate_parameters (p, p) { 'use strict'; }\");\n\nfunction test_strict_mode_propagation_in_func_expr_and_getters_setters () {\n  var p = function () {\n    'use strict';\n\n    return true;\n  }\n\n  var o = { get prop () { 'use strict'; return true; }, set prop (v) { 'use strict'; } };\n\n  function test () {\n    tmp_eval = eval;\n    eval = tmp_eval;\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function-args.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f1(x)\n{\n  var c1 = (x >= 1);\n  var c2 = (x <= 10);\n\n  if (c1 === true)\n  {\n    if (c2 === true)\n    {\n      assert(t);\n\n      return;\n    }\n  }\n\n  assert(t === false);\n}\n\nvar i;\nvar t = true;\n\nfor(i = 1; i <= 10; i++)\n{\n  f1(i);\n}\n\nt = false;\n\nfor(i = 11; i <= 20; i++)\n{\n  f1(i);\n}\n\nfunction g (p, p) {\n  assert (p === arguments[1]);\n  assert (p === 'second');\n}\n\ng ('first', 'second');\n\ntry {\n  f1 ({});\n  f1 (undefined_variable);\n  assert (false);\n}\ncatch (e) {\n  assert (e instanceof ReferenceError);\n}\n\nfunction f2 ()\n{\n  return this;\n}\n\nwith ({})\n{\n  assert (f2 () === this);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function-construct.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar f = new Function ('');\nassert (f () === undefined);\n\nvar f = new Function ('\"use strict\"; f = undefined;');\nassert (f () === undefined && f === undefined);\n\nvar f = new Function ('\"use strict\"; q = undefined;');\ntry\n{\n  f ();\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n}\n\nvar singleArgFunction = new Function ('arg', 'return arg');\n\nassert (singleArgFunction (5) === 5);\n\nfor (i = 1; i < 10; i ++)\n{\n  var f = new Function ('a', 'b', 'var q = a; b++; function f (k) {return q + k + b++;}; return f;');\n\n  var fns = new Array ();\n\n  for (var n = 0; n < 10; n++)\n  {\n    var r = f (1, 7);\n    fns[n] = r;\n\n    var check_value = 10;\n\n    for (var m = 0; m < 100; m++)\n    {\n      var value = r (1);\n      assert (check_value++ === value);\n    }\n  }\n\n  var check_value = 109;\n  for (var n = 0; n < 11; n++)\n  {\n    for (var m = 0; m < 10; m++)\n    {\n      var value = fns [m] (m * n);\n      assert (value == check_value + m * n);\n    }\n\n    check_value++;\n  }\n}\n\nvar f = new Function (\"a,b\", \"c\", \"return a + b + c;\");\nassert (f (1,2,3) === 6);\n\nf = new Function (\"a,b\", \"c,d\", \"return a + b + c + d;\");\nassert (f (1,2,3,4) === 10);\n\nf = new Function (\"a\" , \"b\", \"c,d\", \"return a + b + c + d;\");\nassert (f (1,2,3,4) === 10);\n\nvar f = new Function (\" a\\t ,  b\", \"\\u0020c\", \"return a + b + c;\");\nassert (f (1,2,3) === 6);\n\nf = new Function (\"a, \\n b  \\u0020\", \"c \\t, d\\n\", \"return a + b + c + d;\");\nassert (f (1,2,3,4) === 10);\n\nf = new Function (\" a\\t\" , \"\\nb \", \" \\u0020c , d \", \"return a + b + c + d;\");\nassert (f (1,2,3,4) === 10);\n\ntry\n{\n  new Function ({\n    toString : function () {\n      throw new TypeError();\n    },\n    valueOf : function () {\n      throw new TypeError();\n    }\n  });\n\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nvar p = { toString : function() { throw 1; } };\nvar body = { toString : function() { throw \"body\"; } };\n\ntry\n{\n  new Function (p, body);\n  // Should not be reached.\n  assert (false);\n}\ncatch (e)\n{\n  assert (e === 1);\n}\n\n// Check SyntaxError handling\ntry\n{\n  new Function ('var var;');\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof SyntaxError);\n}\n\ntry\n{\n  new Function ('a;b', 'return;');\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function-expr-named.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar expr = \"Dummy value\";\n\nvar f = function expr() {\n  assert(expr === f);\n  expr = 6;\n  assert(expr === f);\n  assert(!(delete expr));\n  assert(expr === f);\n}\n\nf();\n\nf = function expr() {\n  assert(expr === undefined);\n  var expr = 6;\n  assert(expr === 6);\n}\n\nf();\n\nvar f = function expr() {\n  assert(expr === f);\n  eval(\"var expr = 8\");\n  assert(expr === 8);\n}\n\nf();\n\nvar f = function expr(i) {\n  assert(expr === f);\n\n  if (i > 0) {\n    expr(i - 1);\n  }\n}\n\nf(10);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function-external.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  assert(!({} instanceof assert));\n} catch(e) {\n  assert(false);\n}\n\ntry {\n  ({} instanceof Math.sin);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\nMath.sin.prototype = {}\n\ntry {\n  assert(!({} instanceof Math.sin));\n} catch(e) {\n  assert(false);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function-prototype-apply.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// See a general usage: number addition.\nfunction addNum ()\n{\n  var sum = 0;\n  for(var i = 0; i < arguments.length; i++)\n  {\n    sum += arguments[i];\n  }\n  return sum;\n}\n\nvar array = [6720, 4, 42];\nvar obj;\n\nobj = addNum.apply(obj, array);\nassert (obj === 6766);\n\n// If the arguments are missing.\nobj = addNum.apply();\nassert (obj === 0);\n\nobj = addNum.apply(obj);\nassert (obj === 0);\n\n// If the function is a builtin.\nassert (Math.min.apply(null, array) === 4);\nassert (Math.max.apply(null, array) === 6720);\n\n// If the function can't be used as caller.\ntry {\n  obj = new Function.prototype.apply();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// If the called function throws an error.\nfunction throwError ()\n{\n  throw new ReferenceError (\"foo\");\n}\n\ntry {\n  obj = throwError.apply(obj, array);\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// If the array access throws an error.\nObject.defineProperty(array, '0', { 'get' : function () { throw new ReferenceError (\"foo\"); } });\n\ntry {\n  obj = addNum.apply(obj, array);\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function-prototype-bind.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar mul = function(a, b) {\n  return a * b;\n};\n\nvar triple = mul.bind(null, 3);\ndelete mul;\nassert (triple(20) === 60);\nassert (triple.prototype === undefined);\n\nvar dupl = triple.bind({}, 2);\nassert (dupl() === 6);\nassert (dupl.prototype === undefined);\n\ntry {\n  var obj = {};\n  var new_func = obj.bind(null, 'foo');\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar obj1 = {num : 36};\n\nvar f1 = function(a) {\n  return this.num + a;\n}\n\nvar add36 = f1.bind(obj1);\nassert (add36(24) === 60);\n\nvar appendfoo = f1.bind(obj1, \"foo\");\nassert (appendfoo() === \"36foo\");\n\nvar f2 = function(a) {\n  return this.num + a.num;\n}\n\nvar sum = f2.bind(obj1, obj1);\nassert (sum() === 72);\n\nfunction P(x, y) {\n  this.x = x;\n  this.y = y;\n}\n\nvar P1 = P.bind({}, 2);\nvar _p1 = new P1();\nassert (_p1.x === 2);\nassert (_p1.y === undefined);\nassert (_p1 instanceof P);\nassert (_p1 instanceof P1);\n\nvar P2 = P1.bind(null);\nvar _p2 = new P2();\nassert (_p2.x === 2);\nassert (_p2.y === undefined);\n\n_p2 = new P2(12, 60);\nassert (_p2.x === 2);\nassert (_p2.y === 12);\n\n_p2 = new P2({}, 12);\nassert (_p2.x === 2);\nassert (Object.getPrototypeOf(_p2.y) === Object.prototype);\nassert (_p2 instanceof P);\nassert (_p2 instanceof P1);\nassert (_p2 instanceof P2);\n\nvar P3 = P2.bind({}, 5);\nvar _p3 = new P3(8);\nassert (_p3.x === 2);\nassert (_p3.y === 5);\nassert (_p3 instanceof P);\nassert (_p3 instanceof P1);\nassert (_p3 instanceof P2);\nassert (_p3 instanceof P3);\n\nvar P4 = P.bind();\nP4(4, 5);\nassert (x === 4);\nassert (y === 5);\n\nvar _x = x;\nvar _y = y;\n\nvar P5 = P.bind(undefined);\nP5(5, 4);\nassert (x === _y);\nassert (y === _x);\n\nvar number = Number.constructor;\nvar bound = number.bind(null, 24);\nvar foo = new bound();\nassert (foo() === undefined);\n\nvar number = Number;\nvar bound = number.bind(null, 3);\nvar foo = new bound();\nassert (foo == 3);\nassert (foo instanceof Number);\nassert (foo.prototype === undefined);\n\nvar func = Number.prototype.toString.bind('foo');\nassert (func instanceof Function);\n\ntry {\n  var math = Math.sin;\n  var bound = math.bind(null, 0);\n  var foo = new bound();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar foo = function(x, y) { }\n\nvar bound = foo.bind(null);\nassert(bound.length === 2);\n\nbound = foo.bind(null, 9);\nassert(bound.length === 1);\n\nbound = foo.bind(null, 9, 8);\nassert(bound.length === 0);\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function-prototype-tostring.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (Math.cos.toString() === \"function(){/* ecmascript */}\");\n\nfunction none() { return 1; }\nassert (none.toString() === \"function(){/* ecmascript */}\");\n\nfunction single(b) { return 1; }\nassert (single.toString() === \"function(){/* ecmascript */}\");\n\nfunction multiple(a,b) { return 1; }\nassert (multiple.toString() === \"function(){/* ecmascript */}\");\n\nfunction lots(a,b,c,d,e,f,g,h,i,j,k) { return 1; }\nassert (lots.toString() === \"function(){/* ecmascript */}\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function-return.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f_empty()\n{\n  return;\n}\n\nfunction f_42()\n{\n  return 42;\n}\n\nfunction f_expr()\n{\n  var a = 5;\n  var b = 5;\n  return a + b;\n}\n\nassert(f_expr() === 10);\nassert(f_42() === 42);"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function-scopes.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  (function() {\n    function decl() {}\n  })();\n  decl();\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n\ntry {\n  var o = {\n    get p() {\n      function decl() {\n      }\n    }\n  };\n  decl();\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Function.constructor === Function);\nassert(Function.prototype() === undefined);\nassert(Function.length === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/function.prototype.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f (arg1, arg2, arg3)\n{\n  this.string = arg1;\n  this.number = arg2;\n  this.boolean = arg3;\n}\n\nvar this_arg = {};\n\nf.call (this_arg, 's', 1, true, null);\n\nassert (this_arg.string  === 's');\nassert (this_arg.number  === 1);\nassert (this_arg.boolean === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/gc.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {}, obj_l;\nobj_l = obj;\n\nfor (var k = 0; k < 1500; k++)\n{\n  obj_l.prop = {};\n  obj_l = obj_l.prop;\n}\n\nfunction f (o, i) {\n  if (--i > 0) {\n    f ({a:o, b:o}, i);\n  }\n}\n\nfor (var i = 0; i < 100; i++)\n{\n  ({} + f ({}, 12));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/get-value.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\n/*\n * Check that in case of 'primitive' base, 'this' argument of [[Call]] is the base value, not ToObject (base).\n */\nfunction test_1 ()\n{\n 'use strict';\n\n Object.defineProperty (Number.prototype,\n                        'getter',\n                        { get : function () { return this; }, configurable : true });\n\n assert ((10).getter === 10);\n assert (typeof ((10).getter) === 'number');\n\n delete Number.prototype.getter;\n}\n\ntest_1 ();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/getter-setter-this-value.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction Box(data) {\n  this._data = data;\n}\n\nvar box = new Box('=');\n\nObject.defineProperty(Box.prototype, 'data', {\n  get: function () {\n    assert(this === box);\n    return this._data;\n  },\n  set: function (data) {\n    assert(this === box);\n    this._data = data;\n  }\n});\n\nassert(box.data === '=');\nbox.data = '+';\nassert(box.data === '+');\n\nfunction test_access(value, proto) {\n  \"use strict\"\n\n  Object.defineProperty(proto, 'test', {\n    get: function () { assert (this === value) },\n    set: function () { assert (this === value) }\n  });\n\n  value.test;\n  value.test = undefined;\n}\n\ntest_access (\"str\", String.prototype);\ntest_access (1, Number.prototype);\ntest_access (true, Boolean.prototype);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/global-escaping.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Escaping\n\nassert (escape (\"\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\") ===\n        \"%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F\");\nassert (escape (\"\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f\") ===\n        \"%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F\");\nassert (escape (\" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN\") ===\n        \"%20%21%22%23%24%25%26%27%28%29*+%2C-./0123456789%3A%3B%3C%3D%3E%3F@ABCDEFGHIJKLMN\");\nassert (escape (\"OPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}\\x7F\") ===\n        \"OPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7F\");\n\nassert (escape(\"\\x80\\x95\\xaf\\xfe\\xff\") === \"%80%95%AF%FE%FF\");\nassert (escape(\"\\u0100\\ud800\\udc00\") === \"%u0100%uD800%uDC00\");\n\nassert (escape({}) === \"%5Bobject%20Object%5D\");\nassert (escape(true) === \"true\");\n\n// Unescaping\n\nassert (unescape (\"%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F\") ===\n        \"\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\");\nassert (unescape(\"%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F\") ===\n        \"\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f\");\nassert (unescape(\"%20%21%22%23%24%25%26%27%28%29*+%2C-./0123456789%3A%3B%3C%3D%3E%3F@ABCDEFGHIJKLMN\") ===\n        \" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN\");\nassert (unescape(\"OPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7F\") ===\n        \"OPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}\\x7F\");\nassert (unescape(\"%80%95%AF%FE%FF\") === \"\\x80\\x95\\xaf\\xfe\\xff\");\nassert (unescape(\"%ud800\") === \"\\ud800\");\nassert (unescape(\"\\ud800\") === \"\\ud800\");\nassert (unescape(\"\\ud800\\udc00\") === \"\\ud800\\udc00\");\nassert (unescape(\"%ud800%udc00\") === \"\\ud800\\udc00\");\nassert (unescape(\"\\ud800%udc00\") === \"\\ud800\\udc00\");\nassert (unescape(\"%ud800\\udc00\") === \"\\ud800\\udc00\");\n\nassert (unescape({}) === \"[object Object]\");\nassert (unescape(true) === \"true\")\nassert (unescape() === \"undefined\");\nassert (unescape(1985) === \"1985\");\nassert (unescape(\"%5#%uu\") === \"%5#%uu\");\n\n// Inversion\n\nvar str = \"\\u0001\\u0000\\uFFFF\";\nassert (unescape(escape(str)) === str);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/global-parsefloat.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(parseFloat(\"1\") === 1);\nassert(parseFloat(\"+1\") === 1);\nassert(parseFloat(\"-1\") === -1);\nassert(parseFloat(\"1.2\") === 1.2);\nassert(parseFloat(\"+1.2\") === 1.2);\nassert(parseFloat(\"-1.2\") === -1.2);\nassert(parseFloat(\"1.2e3\") === 1200);\nassert(parseFloat(\"+1.2e3\") === 1200);\nassert(parseFloat(\"-1.2e3\") === -1200);\nassert(parseFloat(\"   \\n\\t  1.2e3\") === 1200);\nassert(parseFloat(\"03.02e1\") === 30.2);\nassert(parseFloat(\"003.\") === 3);\nassert(parseFloat(\".2e3\") === 200);\nassert(parseFloat(\"1.e3\") === 1000);\nassert(parseFloat(\"1.2e\") === 1.2);\nassert(parseFloat(\"1.e\") === 1);\nassert(parseFloat(\"1.e3\") === 1000);\nassert(parseFloat(\"1e3\") === 1000);\nassert(parseFloat(\"1e\") === 1);\nassert(parseFloat(\"1.2e3foo\") === 1200);\nassert(isNaN(parseFloat(\"foo1.2e3foo\")));\nassert(parseFloat(\"Infinity\") === Infinity);\nassert(parseFloat(\"-Infinity\") === -Infinity);\nassert(parseFloat(\"Infinityfoo\") === Infinity);\nassert(parseFloat(\"-Infinityfoo\") === -Infinity);\nassert(isNaN(parseFloat(\"\")));\nassert(isNaN(parseFloat(\".\")));\nassert(isNaN(parseFloat(\"..\")));\nassert(isNaN(parseFloat(\"+\")));\nassert(isNaN(parseFloat(\"-\")));\nassert(isNaN(parseFloat(\"e\")));\nassert(isNaN(parseFloat(\"a\")));\nassert(isNaN(parseFloat(\"e+\")));\nassert(isNaN(parseFloat(\"+e-\")));\nassert(isNaN(parseFloat(\".e\")));\nassert(isNaN(parseFloat(\".a\")));\nassert(isNaN(parseFloat(\"e3\")));\nassert(isNaN(parseFloat(\".e3\")));\nassert(parseFloat(\"1..2\") === 1);\nassert(parseFloat(\"1.2.3\") === 1.2);\nassert(parseFloat(\"1.2ee3\") === 1.2);\nassert(parseFloat(\"0\") === 0);\nassert(parseFloat(\".0\") === 0);\nassert(parseFloat(\"0.e3\") === 0);\nassert(parseFloat(\"0.0e3\") === 0);\nassert(parseFloat(\"1.2eA\") === 1.2);\nassert(parseFloat(\"1.ae3\") === 1);\nassert(parseFloat(\"\\u00a0\\u00a01.2e3\") === 1200);\nassert(parseFloat(\"\\u2029\\u2029\\u00a01.2e\\u00D0\") === 1.2);\nassert(isNaN(parseFloat(\"\\u2029\\u2029\\u00a0\\u00D01.2e3\")));\nassert(parseFloat(\"\\u2029\\u2029\\u00a01.\\u20292e\\u00D0\") === 1);\nassert(isNaN(parseFloat(\"\\u2029\\u2029\")));\n\nvar obj = new Object();\nvar arr = [3,4,5];\nvar num = 7;\nvar bool = true;\nvar undef;\n\nassert(isNaN(parseFloat(obj)));\nassert(parseFloat(arr) === 3);\nassert(parseFloat(num) === 7);\nassert(isNaN(parseFloat(bool)));\nassert(isNaN(parseFloat(undef)));\n\nvar obj = { toString : function () { throw new ReferenceError(\"foo\") } };\ntry {\n  parseFloat(obj);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n  assert(e.message === \"foo\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/global-parseint.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(parseInt(\"123\") === 123);\nassert(parseInt(\"+123\") === 123);\nassert(parseInt(\"-123\") === -123);\nassert(parseInt(\"0123\") === 123);\nassert(parseInt(\"  123\") === 123);\nassert(parseInt(\" \\n  123\") === 123);\nassert(parseInt(\" \\n  123  \\t\") === 123);\nassert(parseInt(\"0x123\") === 291);\nassert(parseInt(\"0X123\") === 291);\nassert(parseInt(\"123\", 4) === 27);\nassert(parseInt(\"ABC\", 16) === 2748);\nassert(parseInt(\"12A3\") === 12);\nassert(parseInt(\"12.34\") === 12);\nassert(isNaN(parseInt(\"AB\")));\nassert(isNaN(parseInt(\"\")));\nassert(isNaN(parseInt(\"-\")));\nassert(isNaN(parseInt(\"-\", 11)));\nassert(parseInt(\"\\u00a0123\") === 123);\nassert(parseInt(\"\\u20291  123\\u00D0\") === 1);\nassert(parseInt(\"\\u00a0123\", 13) === 198);\nassert(parseInt(\"\\u2029123  1\\u00D0\", 11) === 146);\nassert(isNaN(parseInt(\"\\u0009\")));\nassert(isNaN(parseInt(\"\\u00A0\")));\nassert(parseInt(\"\\u00A0\\u00A0-1\") === parseInt(\"-1\"));\nassert(parseInt(\"\\u00A01\") === parseInt(\"1\"));\n\nvar bool = true;\nvar obj = new Object();\nvar num = 8;\nvar arr = [2,3,4];\nvar undef;\n\nassert(isNaN(parseInt(bool, bool)));\nassert(isNaN(parseInt(bool, obj)));\nassert(isNaN(parseInt(bool, num)));\nassert(isNaN(parseInt(bool, arr)));\n\nassert(isNaN(parseInt(obj, bool)));\nassert(isNaN(parseInt(obj, obj)));\nassert(isNaN(parseInt(obj, num)));\nassert(isNaN(parseInt(obj, arr)));\n\nassert(isNaN(parseInt(num, bool)));\nassert(parseInt(num, obj) === 8);\nassert(isNaN(parseInt(num, num)));\nassert(parseInt(num, arr) === 8);\n\nassert(isNaN(parseInt(arr, bool)));\nassert(parseInt(arr, obj) === 2);\nassert(parseInt(arr, num) === 2);\nassert(parseInt(arr, arr) === 2);\n\nassert(isNaN(parseInt(undef, bool)));\nassert(isNaN(parseInt(undef, obj)));\nassert(isNaN(parseInt(undef, num)));\nassert(isNaN(parseInt(undef, arr)));\n\nvar obj = { toString : function () { throw new ReferenceError(\"foo\") } };\ntry {\n  parseInt(obj);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n  assert(e.message === \"foo\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/global-uri-coding.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// URI encoding\n\n// This test will not pass on FLOAT32 due to precision issues\n\nfunction checkEncodeURIParseError (str)\n{\n  try {\n    encodeURI (str);\n    assert (false);\n  } catch(e) {\n    assert(e instanceof URIError);\n  }\n}\n\nassert (encodeURI (\"\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\") ===\n        \"%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F\");\nassert (encodeURI (\"\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f\") ===\n        \"%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F\");\nassert (encodeURI (\" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN\") ===\n         \"%20!%22#$%25&'()*+,-./0123456789:;%3C=%3E?@ABCDEFGHIJKLMN\");\nassert (encodeURI (\"OPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}\\x7F\") ===\n         \"OPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7F\");\n\nassert (encodeURIComponent (\"\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\") ===\n        \"%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F\");\nassert (encodeURIComponent (\"\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f\") ===\n        \"%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F\");\nassert (encodeURIComponent (\" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN\") ===\n        \"%20!%22%23%24%25%26'()*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMN\");\nassert (encodeURIComponent (\"OPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}\\x7F\") ===\n        \"OPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7F\");\n\nassert (encodeURI (\"\\xe9\") == \"%C3%A9\");\nassert (encodeURI (\"\\ud7ff\") == \"%ED%9F%BF\");\nassert (encodeURI (\"\\ue000\") == \"%EE%80%80\");\nassert (encodeURI (\"\\ud800\\udc00\") == \"%F0%90%80%80\");\nassert (encodeURI (String.fromCharCode(0xd800, 0xdc00)) == \"%F0%90%80%80\");\n\ncheckEncodeURIParseError (\"\\ud800\");\ncheckEncodeURIParseError (\"\\udfff\");\n\n// URI decoding\n\nfunction checkDecodeURIParseError (str)\n{\n  try {\n    decodeURI (str);\n    assert (false);\n  } catch(e) {\n    assert(e instanceof URIError);\n  }\n}\n\nassert (decodeURI (\"%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F\") ===\n        \"\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\");\nassert (decodeURI (\"%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F\") ===\n        \"\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f\");\nassert (decodeURI (\"%20%21%22%23%24%25%26%27%28%29%2a%2b%2c%2d%2e%2f\") ===\n        \" !\\\"%23%24%%26'()*%2b%2c-.%2f\");\nassert (decodeURI (\"%30%31%32%33%34%35%36%37%38%39%3a%3b%3c%3d%3e%3f\") ===\n        \"0123456789%3a%3b<%3d>%3f\");\nassert (decodeURI (\"%40%41%42%43%44%45%46%47%48%49%4a%4b%4c%4d%4e%4f\") ===\n        \"%40ABCDEFGHIJKLMNO\");\nassert (decodeURI (\"%50%51%52%53%54%55%56%57%58%59%5a%5b%5c%5d%5e%5f\") ===\n        \"PQRSTUVWXYZ[\\\\]^_\");\nassert (decodeURI (\"%60%61%62%63%64%65%66%67%68%69%6a%6b%6c%6d%6e%6f\") ===\n        \"`abcdefghijklmno\");\nassert (decodeURI (\"%70%71%72%73%74%75%76%77%78%79%7a%7b%7c%7d%7e\") ===\n        \"pqrstuvwxyz{|}~\");\n\nassert (decodeURIComponent (\"%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F\") ===\n        \"\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\");\nassert (decodeURIComponent (\"%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F\") ===\n        \"\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f\");\nassert (decodeURIComponent (\"%20%21%22%23%24%25%26%27%28%29%2a%2b%2c%2d%2e%2f\") ===\n        \" !\\\"#$%&'()*+,-./\");\nassert (decodeURIComponent (\"%30%31%32%33%34%35%36%37%38%39%3a%3b%3c%3d%3e%3f\") ===\n        \"0123456789:;<=>?\");\nassert (decodeURIComponent (\"%40%41%42%43%44%45%46%47%48%49%4a%4b%4c%4d%4e%4f\") ===\n        \"@ABCDEFGHIJKLMNO\");\nassert (decodeURIComponent (\"%50%51%52%53%54%55%56%57%58%59%5a%5b%5c%5d%5e%5f\") ===\n        \"PQRSTUVWXYZ[\\\\]^_\");\nassert (decodeURIComponent (\"%60%61%62%63%64%65%66%67%68%69%6a%6b%6c%6d%6e%6f\") ===\n        \"`abcdefghijklmno\");\nassert (decodeURIComponent (\"%70%71%72%73%74%75%76%77%78%79%7a%7b%7c%7d%7e\") ===\n        \"pqrstuvwxyz{|}~\");\n\nassert (decodeURI (\"%6A%6B%6C%6D%6E%6F\") === \"jklmno\");\nassert (decodeURI (\"%C3%A9\") === \"\\xe9\");\nassert (decodeURI (\"%e2%b1%a5\") === \"\\u2c65\");\nassert (decodeURI (\"%f0%90%90%a8\") === \"\\ud801\\udc28\");\n\ncheckDecodeURIParseError (\"13%\");\ncheckDecodeURIParseError (\"%0g\");\ncheckDecodeURIParseError (\"%1G\");\ncheckDecodeURIParseError (\"%a\");\ncheckDecodeURIParseError (\"%c1%81\");\ncheckDecodeURIParseError (\"a%80b\");\ncheckDecodeURIParseError (\"%f4%90%80%80\");\ncheckDecodeURIParseError (\"%ed%a0%80\");\ncheckDecodeURIParseError (\"%ed%b0%80\");\ncheckDecodeURIParseError (\"%fa%81%82%83%84\");\ncheckDecodeURIParseError (\"%fd%81%82%83%84%85\");\n\n// Coerce (automatic toString()) tests\n\nassert (decodeURI ([1, 2, 3]) === \"1,2,3\");\nassert (decodeURI ({ x:1 }) === \"[object Object]\");\nassert (encodeURI (void 0) === \"undefined\");\nassert (encodeURI (216.000e1) === \"2160\");\n\n// Combining surrogate fragments\n\nassert (decodeURI(\"\\ud800\\udc00 \\ud800 \\udc00\") === \"\\ud800\\udc00 \\ud800 \\udc00\");\nassert (decodeURI(\"%f0%90%80%80\") === \"\\ud800\\udc00\");\nassert (decodeURI(\"\\ud800%f0%90%80%80\\ud800\") === \"\\ud800\\ud800\\udc00\\ud800\");\nassert (decodeURI(\"\\udc00%f0%90%80%80\\udc00\") === \"\\udc00\\ud800\\udc00\\udc00\");\n\ncheckDecodeURIParseError (\"\\ud800%ed%b0%80\");\ncheckDecodeURIParseError (\"%ed%a0%80\\udc00\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/global.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nassert (this.hasOwnProperty !== undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/hash.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\na = {};\na['12345']=1;\na['13345']=3;\na['sss45']=4;\na['1'] = 2;\n\nassert (a[12345] === 1);\nassert (a[1] === 2);\nassert (a[13345] === 3);\nassert (a['sss45'] === 4);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/if-else.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar was_then = false, was_else = false;\n\nif (true) {\n  was_then = true;\n} else {\n  was_else = true;\n}\n\nassert (was_then && !was_else);\n\nwas_then = false;\nwas_else = false;\n\nif (false) {\n  was_then = true;\n} else {\n  was_else = true;\n}\n\nassert (was_else && !was_then);\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/if_parser.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction test_parse_error (txt) {\n  try {\n    eval (txt)\n    assert (false)\n  } catch (e){\n    assert (e instanceof SyntaxError)\n  }\n}\n\nvar if1=\n\"if (false)() print ('t')\" +\n\"else print ('f')\"\ntest_parse_error (if1)\n\ntest_parse_error (\"if (true)() { print ('t') }\")\ntest_parse_error (\"if {} (true) print ('t')\")\ntest_parse_error (\"if (true false) print ('t')\")\ntest_parse_error (\"if (true && || false) print ('t')\")\ntest_parse_error (\"if (&& true) print ('t')\")\ntest_parse_error (\"if (true ||) print ('t')\")\ntest_parse_error (\"if (true && {false || true}) print ('t')\")\n\nvar elseif1 =\n\"if (false) print ('if statement') \" +\n\"elseif (false) print ('else if statement') \" +\n\"else print ('else statement') \"\ntest_parse_error (elseif1);\n\nvar elseif2 =\n\"if (false) print ('if statement') \" +\n\"elif (false) print ('else if statement') \" +\n\"else print ('else statement') \"\ntest_parse_error (elseif2)\n\nvar elseif3 =\n\"if (false) print ('if statement') \" +\n\"else (false) print ('else if statement') \" +\n\"else print ('else statement') \"\ntest_parse_error (elseif3)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/insert-semicolon.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar f = new Function ('return a');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/json-parse.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This test will not pass on FLOAT32 due to precision issues\n\n// Checking primitve types\nvar str;\nvar result;\nvar log;\n\nfunction check_parse_error (str)\n{\n  try {\n    JSON.parse (str);\n    // Should throw a parse error.\n    assert (false);\n  } catch (e) {\n  }\n}\n\nstr = ' null ';\nassert (JSON.parse (str) === null);\nstr = 'true';\nassert (JSON.parse (str) === true);\nstr = 'false';\nassert (JSON.parse (str) === false);\nstr = '-32.5e002';\nassert (JSON.parse (str) == -3250);\nstr = '\"str\"';\nassert (JSON.parse (str) == \"str\");\nstr = '\"\\\\b\\\\f\\\\n\\\\t\\\\r\"'\nassert (JSON.parse (str) === \"\\b\\f\\n\\t\\r\");\n/* Note: \\u is parsed by the lexer, \\\\u is by the JSON parser. */\nstr = '\"\\\\u0000\\\\u001f\"';\nassert (JSON.parse (str) === \"\\x00\\x1f\");\nstr = '\"\\\\ud801\\\\udc00\\\\ud801\\udc00\\ud801\\\\udc00\\ud801\\udc00\"';\nassert (JSON.parse (str) === \"\\ud801\\udc00\\ud801\\udc00\\ud801\\udc00\\ud801\\udc00\");\n/* These surrogates do not form a valid surrogate pairs. */\nstr = '\"\\\\ud801,\\\\udc00,\\\\ud801,\\udc00,\\ud801,\\\\udc00,\\ud801,\\udc00\"';\nassert (JSON.parse (str) === \"\\ud801,\\udc00,\\ud801,\\udc00,\\ud801,\\udc00,\\ud801,\\udc00\");\n\ncheck_parse_error ('undefined');\ncheck_parse_error ('falses');\ncheck_parse_error ('+5');\ncheck_parse_error ('5.');\ncheck_parse_error ('01');\ncheck_parse_error ('0x1');\ncheck_parse_error ('0e-');\ncheck_parse_error ('3e+a');\ncheck_parse_error ('55e4,');\ncheck_parse_error ('5 true');\ncheck_parse_error (\"'str'\");\ncheck_parse_error ('\\x00');\ncheck_parse_error ('\"\\x00\"');\ncheck_parse_error ('\"\\x1f\"');\n\n// Checking objects\nstr = ' { \"x\": 0, \"yy\": null, \"zzz\": { \"A\": 4.0, \"BB\": { \"1\": 63e-1 }, \"CCC\" : false } } ';\nresult = JSON.parse (str);\nassert (typeof result == \"object\");\nassert (result.x === 0);\nassert (result.yy === null);\nassert (typeof result.zzz == \"object\");\nassert (result.zzz.A === 4);\nassert (typeof result.zzz.BB == \"object\");\nassert (result.zzz.BB[\"1\"] === 6.3);\nassert (result.zzz.CCC === false);\n\ncheck_parse_error ('{');\ncheck_parse_error ('{{{}');\ncheck_parse_error ('{x:5}');\ncheck_parse_error ('{true:4}');\ncheck_parse_error ('{\"x\":5 \"y\":6}');\ncheck_parse_error ('{\"x\":5,\"y\":6,}');\ncheck_parse_error ('{\"x\":5,,\"y\":6}');\n\n// Checking arrays\nstr = '[{\"x\":[]},[[]],{}, [ null ] ]';\nresult = JSON.parse (str);\nassert (result.length === 4);\nassert (typeof result === \"object\");\nassert (typeof result[0] === \"object\");\nassert (typeof result[0].x === \"object\");\nassert (result[0].x.length === 0);\nassert (result[1].length === 1);\nassert (result[1][0].length === 0);\nassert (typeof result[2] === \"object\");\nassert (result[3].length === 1);\nassert (result[3][0] === null);\n\ncheck_parse_error ('[');\ncheck_parse_error ('[[[]');\ncheck_parse_error ('[ true null ]');\ncheck_parse_error ('[1,,2]');\ncheck_parse_error ('[1,2,]');\ncheck_parse_error ('[1] [2]');\n\n// Checking parse with different primitive types\n\nassert (JSON.parse (null) == null);\nassert (JSON.parse (true) == true);\nassert (JSON.parse (3) == 3);\n\ntry {\n  JSON.parse (undefined);\n  // Should not be reached.\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\n// Checking parse with different object types\n\nobject = { toString: function() { return false; } };\nassert (JSON.parse (object) == false);\n\nobject = {\"a\": 3, \"b\": \"foo\"};\ntry {\n  JSON.parse (object);\n  // Should not be reached.\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\narray = [3, \"foo\"];\ntry {\n  JSON.parse (array);\n  // Should not be reached.\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nassert (JSON.parse (new Number (3)) == 3);\nassert (JSON.parse (new Boolean (true)) == true);\n\nobject = new String ('{\"a\": 3, \"b\": \"foo\"}');\nresult = JSON.parse (object);\n\nassert (result.a == 3);\nassert (result.b == \"foo\");\n\n// Checking reviver\n\nfunction toStringReviver(k, v)\n{\n  log += \"<\" + k + \">:\" + (typeof v == \"number\" ? v : \"(obj)\") + \", \";\n  return v;\n}\n\nstr = '{ \"a\":1, \"b\":2, \"c\": { \"d\":4, \"e\": { \"f\":6 } } }';\nlog = \"\";\nJSON.parse (str, toStringReviver);\nassert (log === \"<a>:1, <b>:2, <d>:4, <f>:6, <e>:(obj), <c>:(obj), <>:(obj), \");\n\nstr = '[ 32, 47, 33 ]';\nlog = \"\";\nJSON.parse (str, toStringReviver);\nassert (log === \"<0>:32, <1>:47, <2>:33, <>:(obj), \");\n\n// Defining properties multiple times\n\nstr = ' { \"a\":1, \"b\":2, \"a\":3 } ';\nlog = \"\";\nJSON.parse (str, toStringReviver);\nassert (log === \"<a>:3, <b>:2, <>:(obj), \");\n\nstr = ' { \"a\":1, \"b\":2, \"b\":3 } ';\nlog = \"\";\nJSON.parse (str, toStringReviver);\nassert (log === \"<a>:1, <b>:3, <>:(obj), \");\n\nstr = ' { \"a\":1, \"b\":{}, \"b\":[], \"a\":2, \"b\":3, \"c\":4 } ';\nlog = \"\";\nJSON.parse (str, toStringReviver);\nassert (log === \"<a>:2, <b>:3, <c>:4, <>:(obj), \");\n\n// Changing property value\n\nstr = ' { \"a\":1, \"b\":2, \"c\":3 } ';\nresult = JSON.parse (str, function (k, v) {\n  if (k == \"a\")\n  {\n    return 8;\n  }\n  if (k == \"b\")\n  {\n    return 9;\n  }\n  if (k == \"c\")\n  {\n    return void 0;\n  }\n  return v;\n});\n\nassert (result.a === 8);\nassert (result.b === 9);\nassert (result.c === void 0);\n\n// Adding / deleting properties\n\nstr = ' { \"a\":1, \"b\":2 } ';\nlog = \"\";\nresult = JSON.parse (str, function (k, v) {\n  if (k == \"a\")\n  {\n    // Deleted properties must still be enumerated.\n    delete this[\"b\"];\n    // New properties must not be enumerated.\n    this.c = 4;\n  }\n  if (k != \"\")\n  {\n    log += \"<\" + k + \">:\" + v + \" \";\n  }\n  return v;\n});\n\nassert (log === \"<a>:1 <b>:undefined \");\nassert (result.a === 1);\nassert (result.b === void 0);\nassert (result.c === 4);\n\n// Changing properties to accessors\n\nstr = ' { \"a\":1, \"b\":2, \"c\":3 } ';\nlog = \"\";\nJSON.parse (str, function (k, v) {\n  if (k == \"a\")\n  {\n    Object.defineProperty(this, \"b\", {\n      enumerable: true,\n      configurable: true,\n      get: function() { return 12; }\n    });\n    Object.defineProperty(this, \"c\", {\n      enumerable: true,\n      configurable: true,\n      set: function(val) { }\n    });\n  }\n  if (k != \"\")\n  {\n    log += \"<\" + k + \">:\" + v + \" \";\n  }\n  return v;\n});\nassert (log === \"<a>:1 <b>:12 <c>:undefined \");\n\n// Forcing extra walk steps\n\nstr = ' { \"a\":1, \"b\":2 } ';\nlog = \"\";\nJSON.parse (str, function (k, v) {\n  if (k == \"a\")\n  {\n     this.b = { x:3, y:4 };\n  }\n  if (k != \"\")\n  {\n    log += \"<\" + k + \">:\" + v + \" \";\n  }\n  return v;\n});\nassert (log === \"<a>:1 <x>:3 <y>:4 <b>:[object Object] \");\n\n// Setting a property to read-only, and change its value.\n\nstr = ' { \"a\":1, \"b\":2 } ';\nresult = JSON.parse (str, function (k, v) {\n  if (k == \"a\")\n  {\n    Object.defineProperty(this, \"b\", {\n      enumerable: true,\n      // FIXME: Should work with configurable: true.\n      configurable: false,\n      writable: false,\n      value: 2\n    });\n    return 8;\n  }\n  if (k == \"b\")\n  {\n    return 9;\n  }\n  return v;\n});\n\nassert (result.a === 8);\nassert (result.b === 2);\n\n// Throw error in the reviver\n\ntry {\n  str = ' { \"a\":1, \"b\":2 } ';\n  result = JSON.parse (str, function (k, v) { throw new ReferenceError(\"error\"); } );\n  assert(false);\n} catch (e) {\n  assert (e.message === \"error\");\n  assert (e instanceof ReferenceError);\n}\n\n// Throw error in a getter\n\ntry {\n  str = ' { \"a\":1, \"b\":2 } ';\n  JSON.parse (str, function (k, v) {\n    if (k == \"a\")\n    {\n      Object.defineProperty(this, \"b\", {\n        enumerable: true,\n        configurable: true,\n        get: function() { throw new ReferenceError(\"error\"); }\n      });\n    }\n    return v;\n  });\n  assert(false);\n} catch (e) {\n  assert (e.message === \"error\");\n  assert (e instanceof ReferenceError);\n}\n\n// Checking reviver with different primitive types\n\nstr = ' { \"a\":1 } ';\n\nresult = JSON.parse (str, 4);\nassert (result.a == 1);\n\nresult = JSON.parse (str, null);\nassert (result.a == 1);\n\nresult = JSON.parse (str, undefined);\nassert (result.a == 1);\n\nresult = JSON.parse (str, true);\nassert (result.a == 1);\n\nresult = JSON.parse (str, \"foo\");\nassert (result.a == 1);\n\n// Checking reviver with different object types\n\nstr = ' { \"a\":1 } ';\n\nresult = JSON.parse(str, new Boolean (true));\nassert (result.a == 1);\n\nresult = JSON.parse(str, new String (\"foo\"));\nassert (result.a == 1);\n\nresult = JSON.parse(str, new Number (3));\nassert (result.a == 1);\n\nresult = JSON.parse(str, {\"a\": 2});\nassert (result.a == 1);\n\nresult = JSON.parse(str, [1, 2, 3]);\nassert (result.a == 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/json-stringify.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Checking quoting strings\nassert (JSON.stringify (\"\") === '\"\"');\n\nnormal_string = \"asdasd\";\nassert (JSON.stringify (normal_string) == '\"asdasd\"');\n\nformat_characters = \"\\ba\\fs\\nd\\ra\\tsd\";\nassert (JSON.stringify (format_characters) == '\"\\\\ba\\\\fs\\\\nd\\\\ra\\\\tsd\"');\n\nctl_string = \"asd\u001fasd\";\nassert (JSON.stringify (ctl_string) == '\"asd\\\\u001fasd\"');\n\nescpad_string = \"\\\"asda\\sd\";\nassert (JSON.stringify (escpad_string) == '\"\\\\\"asdasd\"');\n\nassert (JSON.stringify('\\u2040') == '\"⁀\"');\nassert (JSON.stringify('abc\\u2040\\u2030cba') == '\"abc⁀‰cba\"');\n\n// Checking primitive types\nassert (JSON.stringify (1) === '1');\nassert (JSON.stringify (true) === 'true');\nassert (JSON.stringify (\"foo\") === '\"foo\"');\nassert (JSON.stringify (null) === 'null');\nassert (JSON.stringify (undefined) === undefined);\n\nassert (JSON.stringify (new Number(1)) === '1');\nassert (JSON.stringify (new Boolean(true)) === 'true');\nassert (JSON.stringify (new String(\"foo\")) === '\"foo\"');\n\n// Checking objects\nempty_object = {}\nassert (JSON.stringify (empty_object) == '{}');\n\nempty_object = {};\nempty_object.a = undefined;\n\nassert (JSON.stringify (empty_object) == '{}');\n\np_object = { \"a\": 1, \"b\": true, \"c\": \"foo\", \"d\": null, \"e\": undefined };\nassert (JSON.stringify (p_object) == '{\"a\":1,\"b\":true,\"c\":\"foo\",\"d\":null}');\n\no_object = { \"a\": new Number(1), \"b\": new Boolean(true), \"c\": new String(\"foo\") };\nassert (JSON.stringify (o_object) == '{\"a\":1,\"b\":true,\"c\":\"foo\"}');\n\nchild = { \"a\": 1, \"b\": new String(\"\\nfoo\"), \"c\": undefined };\nparent = { \"a\": true, \"b\": child, \"c\": null};\n\nassert (JSON.stringify (parent) == '{\"a\":true,\"b\":{\"a\":1,\"b\":\"\\\\nfoo\"},\"c\":null}');\n\nrecursive_object = {};\nrecursive_object.a = 2;\nrecursive_object.b = recursive_object;\n\ntry {\n  JSON.stringify (recursive_object)\n  // Should not be reached.\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Checking arrays\nempty_array = [];\nassert (JSON.stringify (empty_array) == '[]');\n\narray = [undefined];\nassert (JSON.stringify (array) == '[null]');\n\np_array = [1, true, \"foo\", null, undefined];\nassert (JSON.stringify (p_array) == '[1,true,\"foo\",null,null]');\n\no_array = [new Number(1), new Boolean(true), new String(\"foo\")];\nassert (JSON.stringify (o_array) == '[1,true,\"foo\"]');\n\nchild = [ 1, new String(\"\\nfoo\"), undefined ];\nparent = [ true, child, null ];\n\nassert (JSON.stringify (parent) == '[true,[1,\"\\\\nfoo\",null],null]');\n\nrecursive_array = [];\nrecursive_array[0] = 2;\nrecursive_array[1] = recursive_array;\n\ntry {\n  JSON.stringify (recursive_array)\n  // Should not be reached.\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nobject = {\"a\": 1, \"b\": [1, true, {\"a\": \"foo\"}]};\nassert (JSON.stringify (object) == '{\"a\":1,\"b\":[1,true,{\"a\":\"foo\"}]}');\n\nobject = {\"a\": [1], \"b\": {}};\nassert (JSON.stringify(object) === '{\"a\":[1],\"b\":{}}');\n\narray = [1, {\"a\": 2, \"b\": true, c: [3]}];\nassert (JSON.stringify (array) == '[1,{\"a\":2,\"b\":true,\"c\":[3]}]');\n\n// Filtering / replacing\nto_json_object = {};\nto_json_object.a = 2;\nto_json_object.toJSON = function (key) { return 3; };\n\nassert (JSON.stringify (to_json_object) === \"3\");\n\nfunction replacer_function (key, value)\n{\n  if (typeof(value) == \"string\")\n    return \"FOO\";\n  return value;\n}\n\nobject = { \"a\": \"JSON\", \"b\": new String(\"JSON\"), \"c\": 3 };\nassert (JSON.stringify (object, replacer_function) == '{\"a\":\"FOO\",\"b\":\"JSON\",\"c\":3}');\n\nfilter = [\"a\", \"b\"];\nassert (JSON.stringify (object, filter) == '{\"a\":\"JSON\",\"b\":\"JSON\"}');\n\nassert (JSON.stringify ([], [ 'foo', 'foo' ]) === '[]');\n\nnumber = new Number(2.2);\nnumber.toString = {};\nnumber.valueOf = [];\n\ntry\n{\n  JSON.stringify([], [number]);\n  // Should not be reached.\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\n// Throw error in the replacer function\nfunction replacer_thrower (key, value)\n{\n  throw new ReferenceError(\"foo\");\n  return value;\n}\n\ntry {\n  JSON.stringify (object, replacer_thrower)\n  // Should not be reached.\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Checking replacer with different primitive types\nobject = { \"a\": 2 };\nassert (JSON.stringify (object, 3) == '{\"a\":2}');\nassert (JSON.stringify (object, true) == '{\"a\":2}');\nassert (JSON.stringify (object, null) == '{\"a\":2}');\nassert (JSON.stringify (object, undefined) == '{\"a\":2}');\nassert (JSON.stringify (object, \"foo\") == '{\"a\":2}');\n\n// Checking replacer with different primitive types\nassert (JSON.stringify (object, new Boolean (true)) == '{\"a\":2}');\nassert (JSON.stringify (object, new Number (3)) == '{\"a\":2}');\nassert (JSON.stringify (object, new String (\"foo\")) == '{\"a\":2}');\nassert (JSON.stringify (object, { \"a\": 3 }) == '{\"a\":2}');\n\n// Checking JSON formatting\nobject = {\"a\": 2};\nassert (JSON.stringify (object, null, \"   \") == '{\\n   \"a\": 2\\n}');\nassert (JSON.stringify (object, null, \"asd\") == '{\\nasd\"a\": 2\\n}');\nassert (JSON.stringify (object, null, \"asd0123456789\") == '{\\nasd0123456\"a\": 2\\n}');\nassert (JSON.stringify (object, null, \"asd\\u20400123456789\") == '{\\nasd⁀012345\"a\": 2\\n}');\nassert (JSON.stringify (object, null, 100) == '{\\n          \"a\": 2\\n}');\nassert (JSON.stringify (object, null, -5) == '{\"a\":2}');\n\narray = [2];\nassert (JSON.stringify (array, null, \"   \") == '[\\n   2\\n]');\nassert (JSON.stringify (array, null, \"asd\") == '[\\nasd2\\n]');\nassert (JSON.stringify (array, null, \"asd0123456789\") == '[\\nasd01234562\\n]');\nassert (JSON.stringify (array, null, \"asd\\u20400123456789\") == '[\\nasd⁀0123452\\n]');\nassert (JSON.stringify (array, null, 100) == '[\\n          2\\n]');\nassert (JSON.stringify (array, null, -5) == '[2]');\n\nnested_object = {\"a\": 2, \"b\": {\"c\": 1, \"d\": true}};\nassert (JSON.stringify (nested_object, null, 2) == '{\\n  \"a\": 2,\\n  \"b\": {\\n    \"c\": 1,\\n    \"d\": true\\n  }\\n}');\n\nnested_array = [2, [1,true]];\nassert (JSON.stringify (nested_array, null, 2) == '[\\n  2,\\n  [\\n    1,\\n    true\\n  ]\\n]');\n\n// Checking space (formatting parameter) with different primititve types\nobject = { \"a\": 2 };\nassert (JSON.stringify (object, null, true) == '{\"a\":2}');\nassert (JSON.stringify (object, null, null) == '{\"a\":2}');\nassert (JSON.stringify (object, null, undefined) == '{\"a\":2}');\n\n// Checking space (formatting parameter) with different object types\nassert (JSON.stringify (object, null, new Boolean (true)) == '{\"a\":2}');\nassert (JSON.stringify (object, null, [1, 2, 3] ) == '{\"a\":2}');\nassert (JSON.stringify (object, null, { \"a\": 3 }) == '{\"a\":2}');\n\n// Test array replacer\nassert (JSON.stringify ({\"key1\": false, \"key2\": 12}, [], \"abc\") === '{}');\nassert (JSON.stringify ({\"key1\": false, \"key2\": 12}, [\"key1\"], \"abc\") === '{\\nabc\"key1\": false\\n}');\nassert (JSON.stringify ({\"key1\": false, \"key2\": 12}, [\"key2\"], \"abc\") === '{\\nabc\"key2\": 12\\n}');\nassert (JSON.stringify ({\"key1\": false, \"key2\": 12}, [\"key1\", \"key2\"], \"abc\") === '{\\nabc\"key1\": false,\\nabc\"key2\": 12\\n}');\nassert (JSON.stringify ({\"key1\": false, \"key2\": 12}, [\"key\", \"key3\"], \"abc\") === '{}');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/keyword.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error(code)\n{\n  try {\n    eval(code)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof SyntaxError)\n  }\n}\n\nfunction check_strict_syntax_error(code)\n{\n  \"use strict\"\n\n  try {\n    eval(code)\n    assert(false)\n  } catch (e) {\n    assert(e instanceof SyntaxError)\n  }\n}\n\ncheck_syntax_error(\"d\\\\u006f {} while (false)\")\ncheck_syntax_error(\"\\\\u0076\\\\u0061\\\\u0072 var = 5\")\ncheck_syntax_error(\"wit\\\\u0068 ({}) {}\")\ncheck_syntax_error(\"\\\\u0066alse\")\ncheck_syntax_error(\"type\\\\006ff 3.14\")\ncheck_syntax_error(\"try {} fin\\\\u0061lly {}\")\ncheck_syntax_error(\"f\\\\u0075nction f() {}\")\ncheck_syntax_error(\"a instanc\\\\u0065of b\")\n\ncheck_strict_syntax_error(\"\\\\u006c\\\\u0065\\\\u0074 _let = 5\");\ncheck_strict_syntax_error(\"\\\\u0070rotecte\\\\u0064\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/labelled-statements.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* 1 */\n\na: a = 1;\n\nstr = '';\n\na: for (j = 0; j < 10; j++)\n{\n  str += 'A';\n\n  b: for (i = 0; i < 10; i++)\n  {\n    str += 'B';\n\n    break a;\n\n    str += 'C';\n  }\n\n  str += 'D';\n}\n\nassert (str === 'AB');\n\n/* 2 */\nstr = '';\n\na: for (j = 0; j < 5; j++)\n{\n  str += 'A';\n\n  b: for (i = 0; i < 5; i++)\n  {\n    str += 'B';\n\n    switch (1)\n    {\n      case 1:\n        continue b;\n      default:\n        break b;\n    }\n\n    str += 'C';\n  }\n\n  str += 'D';\n}\n\nassert (str === 'ABBBBBDABBBBBDABBBBBDABBBBBDABBBBBD');\n\n/* 3 */\nstr = '';\n\na: for (j = 0; j < 5; j++)\n{\n  str += 'A';\n\n  b: for (i = 0; i < 5; i++)\n  {\n    str += 'B';\n\n    switch (1)\n    {\n      case 1:\n        continue a;\n    }\n\n    str += 'C';\n  }\n\n  str += 'D';\n}\n\nassert (str === 'ABABABABAB');\n\n/* 4 */\nstr = '';\n\na: for (j = 0; j < 5; j++)\n{\n  str += 'A';\n\n  b: for (i = 0; i < 5; i++)\n  {\n    str += 'B';\n\n    switch (1)\n    {\n      case 1:\n        break b;\n    }\n\n    str += 'C';\n  }\n\n  str += 'D';\n}\n\nassert (str === 'ABDABDABDABDABD');\n\n/* 5 */\nstr = '';\n\na: for (j = 0; j < 5; j++)\n{\n  str += 'A';\n\n  b: for (i = 0; i < 5; i++)\n  {\n    str += 'B';\n\n    switch (1)\n    {\n      case 1:\n        break a;\n    }\n\n    str += 'C';\n  }\n\n  str += 'D';\n}\n\nassert (str === 'AB');\n\n\n/* 6 */\nstr = '';\n\na: for (j = 0; j < 5; j++)\n{\n  str += 'A';\n\n  b: for (i = 0; i < 5; i++)\n  {\n    str += 'B';\n\n    with ({})\n    {\n      break b;\n    }\n\n    str += 'C';\n  }\n\n  str += 'D';\n}\n\nassert (str === 'ABDABDABDABDABD');\n\n/* 7 */\nstr = '';\n\na: for (j = 0; j < 5; j++)\n{\n  c:\n  {\n    str += 'A';\n\n    b: for (i = 0; i < 5; i++)\n    {\n      str += 'B';\n\n      with ({})\n      {\n        break c;\n      }\n\n      str += 'C';\n    }\n\n    str += 'D';\n  }\n}\n\nassert (str === 'ABABABABAB');\n\n/* 8 */\n\na: {\n function f ()\n {\n      str = '';\n\n   a: for (i = 0; i < 5; i++)\n      {\n        str += 'A';\n\n        for (j = 0; j < 5; j++)\n        {\n          str += 'B';\n\n          continue a;\n\n          str += 'C';\n        }\n        str += 'D';\n      }\n\n    assert (str === 'ABABABABAB');\n }\n}\n\nf ();\n\n/* 9 */\n\nstr = '';\n\nfor (i = 0; i < 5; i++)\n{\n  str += 'A';\n\n  switch (i)\n  {\n    case 0:\n    {\n      str += '0';\n      break;\n    }\n    case 1:\n    {\n      str += '1';\n      break;\n    }\n    case 2:\n    {\n      str += '2';\n      break;\n    }\n    case 3:\n    {\n      str += '3';\n      break;\n    }\n    case 4:\n    {\n      str += '4';\n      break;\n    }\n  }\n\n  str += 'B';\n}\n\nassert (str === 'A0BA1BA2BA3BA4B');\n\n/* 10 */\n\nstr = '';\n\nfor (i = 0; i < 2; i++)\n{\n  str += '[A]';\n\n  a:\n  for (j = 0; j < 5; j++)\n  {\n    str += '[B]';\n\n    switch (j)\n    {\n      case 0:\n      {\n        str += '[0]';\n        break;\n      }\n      case 1:\n      {\n        str += '[1]';\n        if (i % 2 == 0)\n        {\n          str += '[1.1]';\n          break a;\n        }\n        else\n        {\n          str += '[1.2]';\n        }\n      }\n      case 2:\n      {\n        str += '[2]';\n        continue a;\n      }\n      case 3:\n      {\n        str += '[3]';\n        break;\n      }\n      case 4:\n      {\n        str += '[4]';\n        continue a;\n      }\n    }\n\n    str += '[C]';\n  }\n\n  str += '[D]';\n}\n\nassert (str === '[A][B][0][C][B][1][1.1][D]' +\n                '[A][B][0][C][B][1][1.2][2][B][2][B][3][C][B][4][D]');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/large_literal.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar literal = \"a\"\n\nfor (var i = 0; i < 25; i++)\n  literal += \"\\\\u0061bcdefghij\"\n\nassert(eval(\"var \" + literal + \" = 42; \" + literal) === 42)\n\nliteral = undefined\n\nvar str = \"\"\nvar expected = \"\"\n\nfor (var i = 0; i < 1000; i++)\n{\n  str += \"123456789\\\\n\"\n  expected += \"123456789\\n\"\n}\n\nassert(eval('\"' + str + '\"') === expected);\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/logical.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((!false) === true);\n\nassert((true || true) === true);\nassert((false || true) === true);\nassert((false || false) === false);\nassert((true || false) === true);\n\nassert((true && true) === true);\nassert((true && false) === false);\nassert((false && true) === false);\nassert((false && false) === false);"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/math-abs.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar nan = NaN;\nvar p_zero = 0.0;\nvar m_zero = -p_zero;\nvar p_inf = Infinity;\nvar m_inf = -p_inf;\n\nassert (isNaN(Math['abs'](NaN)));\nassert (Math['abs'](p_zero) === p_zero);\nassert (Math['abs'](m_zero) === p_zero);\nassert (Math['abs'](p_inf) === p_inf);\nassert (Math['abs'](m_inf) === p_inf);\n\nassert (Math['abs'](0.5) === 0.5);\nassert (Math['abs'](-0.5) === 0.5);\nassert (Math['abs'](1.2) === 1.2);\nassert (Math['abs'](1.5) === 1.5);\nassert (Math['abs'](0.7) === 0.7);\nassert (Math['abs'](0.2) === 0.2);\nassert (Math['abs'](-0.2) === 0.2);\nassert (Math['abs'](-0.7) === 0.7);\nassert (Math['abs'](-1.2) === 1.2);\nassert (Math['abs'](-1.7) === 1.7);\nassert (Math['abs'](-1.5) === 1.5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/math-exp.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(isNaN(Math['exp'] (NaN)));\nassert(Math['exp'] (0.0) === 1.0);\nassert(Math['exp'] (Infinity) === Infinity);\nassert(Math['exp'] (-Infinity) === 0.0);\n\nassert(Math['exp'] (1) >= 0.999999 * Math['E']);\nassert(Math['exp'] (1) <= 1.000001 * Math['E']);\n\nassert(Math['exp'] (-1) >= 0.999999 * (1 / Math['E']));\nassert(Math['exp'] (-1) <= 1.000001 * (1 / Math['E']));\n\nassert(Math['exp'] (0.5) >= 0.999999 * 1.6487212707);\nassert(Math['exp'] (0.5) <= 1.000001 * 1.6487212707);\n\nassert(Math['exp'] (30) >= 0.999999 * 1.06864745815e+13);\nassert(Math['exp'] (30) <= 1.000001 * 1.06864745815e+13);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/math-functions-tonumber-rule.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = \"\";\nvar a = {valueOf: function() { str += \"a\"; return 1;}};\nvar b = {valueOf: function() { str += \"b\"; return NaN;}};\nvar c = {valueOf: function() { str += \"c\"; return 2;}};\n\nMath.min (a, b, c);\nassert (str === \"abc\");\n\nstr = \"\";\nMath.max (a, b, c);\nassert (str === \"abc\");\n\nstr = \"\";\nMath.pow(b,a);\nassert (str === \"ba\");\n\nstr = \"\";\nMath.atan2(b,a);\nassert (str === \"ba\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/math-log.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert( isNaN (Math.log(NaN)) );\nassert( isNaN (Math.log (-1)) );\nassert( isNaN (Math.log (-Infinity)) );\n\nassert( Math.log (0) === -Infinity );\nassert( Math.log (1) === 0 );\nassert( Math.log (Infinity) === Infinity );\nassert( Math.log (2) >= Math.LN2 * 0.999999 );\nassert( Math.log (2) <= Math.LN2 * 1.000001 );\n\nvar very_close_to_1_but_greater = 1.0000001;\nassert( very_close_to_1_but_greater > 1.0 );\n\nassert( Math.log (very_close_to_1_but_greater) >= 0.0 );\nassert( Math.log (very_close_to_1_but_greater) <= 0.000001 );\n\nvar very_close_to_1_but_less = 0.999999;\nassert( very_close_to_1_but_less < 1.0 );\n\nassert( Math.log (very_close_to_1_but_less) <= 0.0 );\nassert( Math.log (very_close_to_1_but_less) >= -0.00001 );\n\nassert( Math.log (2.7182818284590452354) >= 0.999999 );\nassert( Math.log (2.7182818284590452354) <= 1.000001 );\n\nassert( Math.log (0.000000001) <= 0.999999 * (-20.7232658369) );\nassert( Math.log (0.000000001) >= 1.000001 * (-20.7232658369) );\n\nassert( Math.log (1.0e+38) >= 0.999999 * 87.4982335338 );\nassert( Math.log (1.0e+38) <= 1.000001 * 87.4982335338 );\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/math-max.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(isNaN (Math['max'] (1.0, NaN)));\nassert(isNaN (Math['max'] (NaN, 1.0)));\nassert(isNaN (Math['max'] (Infinity, NaN)));\nassert(isNaN (Math['max'] (NaN, Infinity)));\nassert(Math['max'] (1.0, 3.0, 0.0) === 3.0);\nassert(Math['max'] (1.0, 3.0, Infinity) === Infinity);\nassert(Math['max'] (1.0, 3.0, -Infinity) === 3.0);\nassert(Math['max'] (-Infinity, Infinity) === Infinity);\nassert(Math['max'] (Infinity, -Infinity) === Infinity);\nassert(Math['max'] (Infinity, Infinity) === Infinity);\nassert(Math['max'] (-Infinity, -Infinity) === -Infinity);\nassert(Math['max'] () === -Infinity);\n\nassert(Math['max'] (0.0, -0.0) === 0.0);\nassert(Math['max'] (-0.0, 0.0) === 0.0);\n\nassert(Math['max'] (2, Infinity) === Infinity);\nassert(Math['max'] (Infinity, 2) === Infinity);\nassert(Math['max'] (2, -Infinity) === 2);\nassert(Math['max'] (-Infinity, 2) === 2);\n\nassert(Math['max'] (-2, Infinity) === Infinity);\nassert(Math['max'] (Infinity, -2) === Infinity);\nassert(Math['max'] (-2, -Infinity) === -2);\nassert(Math['max'] (-Infinity, -2) === -2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/math-min.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(isNaN (Math['min'] (1.0, NaN)));\nassert(isNaN (Math['min'] (NaN, 1.0)));\nassert(isNaN (Math['min'] (-Infinity, NaN)));\nassert(isNaN (Math['min'] (NaN, -Infinity)));\nassert(Math['min'] (1.0, 3.0, 0.0) === 0.0);\nassert(Math['min'] (1.0, 3.0, Infinity) === 1.0);\nassert(Math['min'] (1.0, 3.0, -Infinity) === -Infinity);\nassert(Math['min'] (-Infinity, Infinity) === -Infinity);\nassert(Math['min'] (Infinity, -Infinity) === -Infinity);\nassert(Math['min'] (Infinity, Infinity) === Infinity);\nassert(Math['min'] (-Infinity, -Infinity) === -Infinity);\nassert(Math['min'] () === Infinity);\n\nassert(Math['min'] (0.0, -0.0) === -0.0);\nassert(Math['min'] (-0.0, 0.0) === -0.0);\n\nassert(Math['min'] (2, -Infinity) === -Infinity);\nassert(Math['min'] (-Infinity, 2) === -Infinity);\nassert(Math['min'] (2, Infinity) === 2);\nassert(Math['min'] (Infinity, 2) === 2);\n\nassert(Math['min'] (-2, Infinity) === -2);\nassert(Math['min'] (Infinity, -2) === -2);\nassert(Math['min'] (-2, -Infinity) === -Infinity);\nassert(Math['min'] (-Infinity, -2) === -Infinity);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/math-pow.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert ( isNaN (Math.pow (0.0 /* any number */, NaN)) );\nassert ( Math.pow (NaN, 0.0) === 1.0 );\nassert ( Math.pow (NaN, -0.0) === 1.0 );\nassert ( isNaN (Math.pow (NaN, 1.0 /* any non-zero number */)) );\nassert ( Math.pow (2.0, Infinity) === Infinity );\nassert ( Math.pow (2.0, -Infinity) === 0.0 );\nassert ( isNaN (Math.pow (1.0, Infinity)) );\nassert ( isNaN (Math.pow (1.0, -Infinity)) );\nassert ( Math.pow (0.5, Infinity) === 0.0 );\nassert ( Math.pow (0.5, -Infinity) === Infinity );\nassert ( Math.pow (Infinity, 1.0) === Infinity );\nassert ( Math.pow (Infinity, -1.0) === 0 );\nassert ( Math.pow (-Infinity, 3.0) === -Infinity );\nassert ( Math.pow (-Infinity, 2.0) === Infinity );\nassert ( Math.pow (-Infinity, 2.5) === Infinity );\nassert ( Math.pow (-Infinity, -3.0) === -0.0 );\nassert ( Math.pow (-Infinity, -2.0) === 0.0 );\nassert ( Math.pow (-Infinity, -2.5) === 0.0 );\nassert ( Math.pow (0.0, 1.2) === 0.0 );\nassert ( Math.pow (0.0, -1.2) === Infinity );\nassert ( Math.pow (-0.0, 3.0) === -0.0 );\nassert ( Math.pow (-0.0, 2.0) === 0.0 );\nassert ( Math.pow (-0.0, 2.5) === 0.0 );\nassert ( Math.pow (-0.0, -3.0) === -Infinity );\nassert ( Math.pow (-0.0, -2.0) === Infinity );\nassert ( Math.pow (-0.0, -2.5) === Infinity );\nassert ( isNaN (Math.pow (-3, 2.5)) );\n\nassert(Math.pow (-2, 2) === 4);\nassert(Math.pow (2, 2) === 4);\n\nassert(Math.pow (2, 3) === 8);\nassert(Math.pow (-2, 3) === -8);\n\nassert(Math.pow (5, 3) === 125);\nassert(Math.pow (-5, 3) === -125);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/math-round.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar nan = NaN;\nvar p_zero = 0.0;\nvar m_zero = -p_zero;\nvar p_inf = Infinity;\nvar m_inf = -p_inf;\n\nassert (isNaN(Math['round'](NaN)));\nassert (Math['round'](p_zero) === p_zero);\nassert (Math['round'](m_zero) === m_zero);\nassert (Math['round'](p_inf) === p_inf);\nassert (Math['round'](m_inf) === m_inf);\n\nassert (Math['round'](0.5) === 1.0);\nassert (Math['round'](-0.5) === -0.0);\nassert (Math['round'](1.2) === 1.0);\nassert (Math['round'](1.5) === 2.0);\nassert (Math['round'](0.7) === 1.0);\nassert (Math['round'](0.2) === 0.0);\nassert (Math['round'](-0.2) === -0.0);\nassert (Math['round'](-0.7) === -1.0);\nassert (Math['round'](-1.2) === -1.0);\nassert (Math['round'](-1.7) === -2.0);\nassert (Math['round'](-1.5) === -1.0);\n\nassert (Math['round'](1) === 1);\nassert (Math['round'](-1) === -1);\n\nfor (var n = 1; n <= 53; n++)\n{\n  var x = Math.pow(2, n)\n  assert (Math['round'](x - 1) === x - 1);\n  assert (Math['round'](x) === x);\n  assert (Math['round'](x + 1) === x + 1);\n  assert (Math['round'](-x - 1) === -x - 1);\n  assert (Math['round'](-x) === -x);\n  assert (Math['round'](-x + 1) === -x + 1);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/math-trig.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar delta = 0.0001;\nvar mod_m = 1.0 - delta;\nvar mod_p = 1.0 + delta;\n\nassert (isNaN (Math.cos (NaN)));\nassert ((Math.cos (+0.0)) == 1.0);\nassert ((Math.cos (-0.0)) == 1.0);\nassert (isNaN (Math.cos (Infinity)));\nassert (isNaN (Math.cos (-Infinity)));\n\nassert (Math.cos (Math.PI) > -1.0 * mod_p);\nassert (Math.cos (Math.PI) < -1.0 * mod_m);\n\nassert (Math.cos (Math.PI / 2) > -delta);\nassert (Math.cos (Math.PI / 2) < +delta);\nassert (Math.cos (-Math.PI / 2) > -delta);\nassert (Math.cos (-Math.PI / 2) < +delta);\n\nassert (Math.cos (Math.PI / 4) > mod_m * Math.SQRT2 / 2);\nassert (Math.cos (Math.PI / 4) < mod_p * Math.SQRT2 / 2);\n\nassert (Math.cos (-Math.PI / 4) > mod_m * Math.SQRT2 / 2);\nassert (Math.cos (-Math.PI / 4) < mod_p * Math.SQRT2 / 2);\n\nassert (isNaN (Math.sin (NaN)));\nassert (1.0 / Math.sin (0.0) == Infinity);\nassert (1.0 / Math.sin (-0.0) == -Infinity);\nassert (isNaN (Math.sin (Infinity)));\nassert (isNaN (Math.sin (-Infinity)));\n\nassert (Math.sin (Math.PI) > -delta);\nassert (Math.sin (Math.PI) < +delta);\n\nassert (Math.sin (Math.PI / 2) > 1.0 * mod_m);\nassert (Math.sin (Math.PI / 2) < 1.0 * mod_p);\n\nassert (Math.sin (-Math.PI / 2) > -1.0 * mod_p);\nassert (Math.sin (-Math.PI / 2) < -1.0 * mod_m);\n\nassert (Math.sin (Math.PI / 4) > mod_m * Math.SQRT2 / 2);\nassert (Math.sin (Math.PI / 4) < mod_p * Math.SQRT2 / 2);\n\nassert (Math.sin (-Math.PI / 4) > -mod_p * Math.SQRT2 / 2);\nassert (Math.sin (-Math.PI / 4) < -mod_m * Math.SQRT2 / 2);\n\nvar step = 0.01;\n\nfor (var x = -2 * Math.PI; x <= 2 * Math.PI; x += step)\n{\n  var s = Math.sin (x);\n  var c = Math.cos (x);\n  var sqr_s = s * s;\n  var sqr_c = c * c;\n\n  assert (sqr_s + sqr_c > mod_m);\n  assert (sqr_s + sqr_c < mod_p);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/nested-function.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f1()\n{\n  function f2()\n    {\n      assert(k > 0);\n      assert(i < 10000);\n\n      if(--k == 0)\n        {\n          return;\n        }\n\n      f2();\n    }\n\n  k = 17;\n\n  f2();\n}\n\nvar k;\nvar i;\n\nfor(i = 0; i < 100; i++)\n{\n  f1();\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/new-line-in-literal.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (eval (\"'1\\\\\\r\\n2'\") === '12');\n\nassert (eval (\"'1\\\\\\n2'\") === '12');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/number-prototype-to-exponential.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//This test will not pass on FLOAT32 due to precision issues\n\nassert((123.56).toExponential() === \"1.2356e+2\");\nassert((123.56).toExponential(0) === \"1e+2\");\nassert((123.56).toExponential(1) === \"1.2e+2\");\nassert((123.56).toExponential(5) === \"1.23560e+2\");\nassert((-1.23).toExponential(1) === \"-1.2e+0\");\nassert((0.00023).toExponential(0) === \"2e-4\");\nassert((0.356).toExponential(1) === \"3.6e-1\");\nassert((0.0000356).toExponential(2) === \"3.56e-5\");\nassert((0.000030056).toExponential(2) === \"3.01e-5\");\nassert(Infinity.toExponential(0) === \"Infinity\");\nassert((-Infinity).toExponential(0) === \"-Infinity\");\nassert(NaN.toExponential(0) === \"NaN\");\nassert((0.0).toExponential(0) === \"0e+0\");\nassert((0.0).toExponential(1) === \"0.0e+0\");\nassert((-0.0).toExponential(0) === \"0e+0\");\nassert((-0.0).toExponential(1) === \"0.0e+0\");\nassert((123456789012345678901.0).toExponential(20) === \"1.23456789012345680000e+20\");\nassert((123456789012345678901.0).toExponential(\"6\") === \"1.234568e+20\");\nassert((123.45).toExponential(3.2) === \"1.235e+2\");\nassert((123.45).toExponential(-0.1) === \"1e+2\");\nassert((12).toExponential(21) === \"1.200000000000000000000e+1\")\n\ntry {\n    (12).toExponential(Number.MAX_VALUE);\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError)\n}\n\ntry {\n    (12).toExponential(Infinity);\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError)\n}\n\ntry {\n    (12).toExponential(-1);\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError)\n}\n\ntry {\n    Number.prototype.toExponential.call(new Object());\n    assert(false);\n} catch (e) {\n    assert(e instanceof TypeError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/number-prototype-to-fixed.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//This test will not pass on FLOAT32 due to precision issues\n\nassert((123.56).toFixed() === \"124\");\nassert((123.56).toFixed(0) === \"124\");\nassert((123.56).toFixed(1) === \"123.6\");\nassert((123.56).toFixed(5) === \"123.56000\");\nassert((1.23e-10).toFixed(2) === \"0.00\");\nassert((1.23e+20).toFixed(2) === \"123000000000000000000.00\");\nassert((1.23e+21).toFixed(2) === \"1.23e+21\");\nassert((-1.23).toFixed(1) === \"-1.2\");\nassert((0.00023).toFixed(0) === \"0\");\nassert((0.356).toFixed(2) === \"0.36\");\nassert((0.0000356).toFixed(5) === \"0.00004\");\nassert((0.000030056).toFixed(7) === \"0.0000301\");\nassert(Infinity.toFixed(0) === \"Infinity\");\nassert((-Infinity).toFixed(0) === \"-Infinity\");\nassert(NaN.toFixed(0) === \"NaN\");\nassert((0.0).toFixed(0) === \"0\");\nassert((0.0).toFixed(1) === \"0.0\");\nassert((-0.0).toFixed(0) === \"0\");\nassert((-0.0).toFixed(1) === \"0.0\");\nassert((123.56).toFixed(NaN) === \"124\");\nassert((123.56).toFixed(-0.9) === \"124\");\nassert((0.095).toFixed(2) === \"0.10\");\nassert((0.995).toFixed(2) === \"1.00\")\nassert((9.995).toFixed(2) === \"10.00\");\nassert((7.995).toFixed(2) === \"8.00\");\nassert((8.995).toFixed(2) === \"9.00\");\nassert((99.995).toFixed(2) === \"100.00\");\nassert((12).toFixed(21) === \"12.000000000000000000000\");\nassert((-1111111111111111111111.12).toFixed(3) === \"-1.1111111111111111e+21\");\nassert((1111111111111111111111.12).toFixed(3) === \"1.1111111111111111e+21\");\n\ntry {\n    Number.prototype.toExponential.call(new Object());\n    assert(false);\n} catch (e) {\n    assert(e instanceof TypeError)\n}\n\ntry {\n    (12).toFixed(-1);\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError)\n}\n\nassert ((0.5).toFixed(0) === \"1\");\nassert ((1.5).toFixed(0) === \"2\");\nassert ((12.5).toFixed(0) === \"13\");\nassert ((123.5).toFixed(0) === \"124\");\nassert ((1234.5).toFixed(0) === \"1235\");\nassert ((0.567).toFixed(0) === \"1\");\nassert ((1.567).toFixed(0) === \"2\");\nassert ((12.567).toFixed(0) === \"13\");\nassert ((123.567).toFixed(0) === \"124\");\nassert ((1234.567).toFixed(0) === \"1235\");\n\nassert ((1.2567).toFixed(0) === \"1\");\nassert ((1.2567).toFixed(1) === \"1.3\");\nassert ((1.2567).toFixed(2) === \"1.26\");\nassert ((1.2567).toFixed(3) === \"1.257\");\nassert ((1.2567).toFixed(4) === \"1.2567\");\nassert ((1.2567).toFixed(5) === \"1.25670\");\n\nassert ((12.3567).toFixed(0) === \"12\");\nassert ((12.3567).toFixed(1) === \"12.4\");\nassert ((12.3567).toFixed(2) === \"12.36\");\nassert ((12.3567).toFixed(3) === \"12.357\");\nassert ((12.3567).toFixed(4) === \"12.3567\");\nassert ((12.3567).toFixed(5) === \"12.35670\");\n\nassert ((123.4567).toFixed(0) === \"123\");\nassert ((123.4567).toFixed(1) === \"123.5\");\nassert ((123.4567).toFixed(2) === \"123.46\");\nassert ((123.4567).toFixed(3) === \"123.457\");\nassert ((123.4567).toFixed(4) === \"123.4567\");\nassert ((123.4567).toFixed(5) === \"123.45670\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/number-prototype-to-precision.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//This test will not pass on FLOAT32 due to precision issues\n\nassert((123.56).toPrecision() === \"123.56\");\nassert((123.56).toPrecision(1) === \"1e+2\");\nassert((123.56).toPrecision(2) === \"1.2e+2\");\nassert((123.56).toPrecision(6) === \"123.560\");\nassert((-1.23).toPrecision(1) === \"-1\");\nassert((0.00023).toPrecision(1) === \"0.0002\");\nassert((0.356).toPrecision(2) === \"0.36\");\nassert((0.0000356).toPrecision(5) === \"0.000035600\");\nassert((0.000030056).toPrecision(4) === \"0.00003006\");\nassert(Infinity.toPrecision(1) === \"Infinity\");\nassert((-Infinity).toPrecision(1) === \"-Infinity\");\nassert(NaN.toPrecision(1) === \"NaN\");\nassert((0.0).toPrecision(1) === \"0\");\nassert((-0.0).toPrecision(1) === \"0\");\nassert((0.0).toPrecision(6) === \"0.00000\");\nassert((123456789012345678901.0).toPrecision(20) === \"1.2345678901234568000e+20\");\nassert((123456789012345678901.0).toPrecision(21) === \"123456789012345680000\");\nassert((123456789012345678901.0).toPrecision(\"6\") === \"1.23457e+20\");\nassert((0.0000004).toPrecision(2) === \"4.0e-7\");\nassert((0.000004).toPrecision(2) === \"0.0000040\");\nassert((1234.92).toPrecision(4) === \"1235\");\nassert((1234.92).toPrecision(3) === \"1.23e+3\");\n\nassert((123.56).toPrecision(1.3) === \"1e+2\");\nassert((123.56).toPrecision(21.9) === \"123.560000000000000000\");\nassert((12).toPrecision(22) === \"12.00000000000000000000\")\n\nassert(Number(982).toPrecision(1) === \"1e+3\");\nassert(Number(982).toPrecision(2) === \"9.8e+2\");\nassert(Number(1499).toPrecision(1) === \"1e+3\");\nassert(Number(1500).toPrecision(1) === \"2e+3\");\n\ntry {\n    (12).toPrecision(0);\n    assert(false);\n} catch (e) {\n    assert(e instanceof RangeError)\n}\n\ntry {\n    Number.prototype.toExponential.call(new Object());\n    assert(false);\n} catch (e) {\n    assert(e instanceof TypeError)\n}\n\n\nassert((+Infinity).toPrecision(1000) === \"Infinity\");\nvar n = new Number(+Infinity);\nassert(n.toPrecision(1000) === \"Infinity\");\n\nassert((-Infinity).toPrecision(1000) === \"-Infinity\");\nvar n = new Number(-Infinity);\nassert(n.toPrecision(1000) === \"-Infinity\");\n\nassert(NaN.toPrecision(undefined) === \"NaN\");\n  \nvar calls = 0;\n\nvar p = {\n  valueOf: function() {\n    calls++;\n\treturn Infinity;\n  }\n};\n\nassert(NaN.toPrecision(p) === \"NaN\");\nassert(calls === 1);\n\nvar n = new Number(NaN);\ncalls = 0;\nassert(n.toPrecision(p) === \"NaN\");\nassert(calls === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/number-prototype-to-string.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This test will not pass on FLOAT32 due to precision issues\n\nassert((NaN).toString() === \"NaN\");\nassert((-Infinity).toString() === \"-Infinity\");\nassert((Infinity).toString() === \"Infinity\");\nassert((NaN).toString(6) === \"NaN\");\nassert((-Infinity).toString(7) === \"-Infinity\");\nassert((Infinity).toString(8) === \"Infinity\");\nassert((16).toString(16) === \"10\");\nassert((15).toString(16) === \"f\");\nassert((12.5).toString(4) === \"30.2\");\nassert((0.005).toString(4) === \"0.000110132232011013223201101323\");\nassert((2000).toString(4) === \"133100\");\nassert((2000).toString(3) === \"2202002\");\nassert((2000).toString(16) === \"7d0\");\nassert((0.03125).toString(2) === \"0.00001\");\nassert((0.03125).toString(16) === \"0.08\");\nassert((0.0001).toString(4) === \"0.000000122031232023223013010030231\")\nassert((0).toString(16) === \"0\");\nassert((-16).toString(16) === \"-10\");\nassert((-15).toString(16) === \"-f\");\nassert((-12.5).toString(4) === \"-30.2\");\nassert((-0.005).toString(4) === \"-0.000110132232011013223201101323\");\nassert((-2000).toString(4) === \"-133100\");\nassert((-2000).toString(3) === \"-2202002\");\nassert((-2000).toString(16) === \"-7d0\");\nassert((-0.03125).toString(2) === \"-0.00001\");\nassert((-0.03125).toString(16) === \"-0.08\");\nassert((-0.0001).toString(4) === \"-0.000000122031232023223013010030231\")\nassert((-0).toString(16) === \"0\");\nassert((1e+73).toString(35) === \"2nx1mg1l0w4ujlpt449c5qfrkkmtpgpsfsc2prlaqtnjbli2\")\nassert((-1e+73).toString(35) === \"-2nx1mg1l0w4ujlpt449c5qfrkkmtpgpsfsc2prlaqtnjbli2\")\nassert((1).toString(undefined) === \"1\")\n\nassert((123400).toString(2) === \"11110001000001000\");\nassert((123400).toString(3) === \"20021021101\");\nassert((123400).toString(4) === \"132020020\");\nassert((123400).toString(5) === \"12422100\");\nassert((123400).toString(6) === \"2351144\");\nassert((123400).toString(7) === \"1022524\");\nassert((123400).toString(8) === \"361010\");\nassert((123400).toString(9) === \"207241\");\nassert((123400).toString(10) === \"123400\");\nassert((123400).toString(11) === \"84792\");\nassert((123400).toString(12) === \"5b4b4\");\nassert((123400).toString(13) === \"44224\");\nassert((123400).toString(14) === \"32d84\");\nassert((123400).toString(15) === \"2686a\");\nassert((123400).toString(16) === \"1e208\");\nassert((123400).toString(17) === \"181ge\");\nassert((123400).toString(18) === \"132fa\");\nassert((123400).toString(19) === \"hife\");\nassert((123400).toString(20) === \"f8a0\");\nassert((123400).toString(21) === \"d6h4\");\nassert((123400).toString(22) === \"bcl2\");\nassert((123400).toString(23) === \"a365\");\nassert((123400).toString(24) === \"8m5g\");\nassert((123400).toString(25) === \"7mb0\");\nassert((123400).toString(26) === \"70e4\");\nassert((123400).toString(27) === \"677a\");\nassert((123400).toString(28) === \"5hb4\");\nassert((123400).toString(29) === \"51l5\");\nassert((123400).toString(30) === \"4h3a\");\nassert((123400).toString(31) === \"44ck\");\nassert((123400).toString(32) === \"3og8\");\nassert((123400).toString(33) === \"3ead\");\nassert((123400).toString(34) === \"34pe\");\nassert((123400).toString(35) === \"2upp\");\nassert((123400).toString(36) === \"2n7s\");\n\nassert ((1152921504606846600).toString([1,2,3,4].slice(1,2)) === \"111111111111111111111111111111111111111111111111111010000000\");\nassert ((-1152921504606846600).toString(2) === \"-111111111111111111111111111111111111111111111111111010000000\");\n\nassert ((0x100000000000061).toString(2) === \"100000000000000000000000000000000000000000000000001100000\")\nassert ((-0x100000000000061).toString(16) === \"-100000000000060\");\n\nassert((123400).toString(new Number(16)) === \"1e208\");\n\nassert(65535.9.toString(3) === \"10022220020.2200220022002200220022102110122000001102212\");\n\nvar digit_chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n                   'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',\n                   'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n                   'u', 'v', 'w', 'x', 'y', 'z'];\n\nfor (radix = 2; radix <= 36; radix++) {\n  for (num = 1; num < 100; num++) {\n    var value = num;\n    var str = \"\";\n    while (value > 0) {\n      str = digit_chars[value % radix] + str;\n      value = Math.floor(value / radix);\n    }\n\n    assert(str === (num).toString(radix));\n  }\n}\n\ntry {\n  assert((123).toString(1));\n  assert(false)\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n\ntry {\n  assert((123).toString(37));\n  assert(false)\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n\ntry {\n  assert((123).toString(Infinity));\n  assert(false)\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-create.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Example where we create an object with a couple of sample properties.\n// (Note that the second parameter maps keys to *property descriptors*.)\nvar o = Object.create(Object.prototype, {\n  // foo is a regular 'value property'\n  foo: { writable: true, configurable: true, value: 'hello' },\n  // bar is a getter-and-setter (accessor) property\n  bar: {\n    configurable: false,\n    get: function() { return 10; },\n    set: function(value) { console.log('Setting `o.bar` to', value); }\n  }\n});\n\n// create a new object whose prototype is a new, empty object\n// and a adding single property 'p', with value 42\nvar o = Object.create({}, { p: { value: 42 } });\n// by default properties ARE NOT writable, enumerable or configurable:\no.p = 24;\nassert (o.p === 42);\n\n// to specify an ES3 property\nvar o2 = Object.create({}, {\n  p: {\n    value: 42,\n    writable: true,\n    enumerable: true,\n    configurable: true\n  }\n});\n\nassert (o2.p === 42);\n\n// Shape - superclass\nfunction Shape() {\n  this.x = 0;\n  this.y = 0;\n}\n\n// superclass method\nShape.prototype.move = function(x, y) {\n  this.x += x;\n  this.y += y;\n};\n\n// Rectangle - subclass\nfunction Rectangle() {\n  Shape.call(this); // call super constructor.\n}\n\n// subclass extends superclass\nRectangle.prototype = Object.create(Shape.prototype);\nRectangle.prototype.constructor = Rectangle;\n\nvar rect = new Rectangle();\n\nassert (rect instanceof Rectangle);\nassert (rect instanceof Shape);\nrect.move(1, 1);\nassert (rect.x === 1)\nassert (rect.y === 1);\n\nvar obj = {\n  protoFunction: function() {\n    return 3;\n  }\n};\n\nObject.defineProperties(obj, {\n  \"foo\": {\n    value: 42,\n    writable: true,\n  },\n  \"a\": {\n    value: \"b\",\n    configurable: true\n  },\n  \"bar\": {\n    get: function() {\n      return this.foo;\n    },\n  },\n});\n\nvar obj2 = Object.create(obj);\n\nassert (obj2.protoFunction() === 3);\nassert (obj2.foo === 42);\nassert (obj2.a === \"b\");\nassert (obj2.bar === 42);\nassert (Object.getPrototypeOf (obj2) === obj);\n\n\nvar props = {\n    prop1: {\n        value: 1,\n    },\n    hey: function () {\n        return \"ho\";\n    }\n};\n\nvar obj3 = Object.create(obj, props);\nassert (obj3.prop1 === 1);\nassert (obj3.protoFunction() === 3);\ntry {\n  assert (obj3.hey === undefined);\n  obj3.hey();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Create an object with null as prototype\nvar obj = Object.create(null)\nassert (typeof (obj) === \"object\");\nassert (Object.getPrototypeOf (obj) === null);\n\ntry {\n    Object.create()\n    assert (false);\n} catch (e) {\n    assert (e instanceof TypeError);\n}\n\ntry {\n    Object.create(undefined)\n    assert (false);\n} catch (e) {\n    assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-define-properties.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {};\nObject.defineProperties(obj, {\n  \"foo\": {\n    value: true,\n    writable: true\n  },\n  \"bar\": {\n    value: \"baz\",\n    writable: false\n  },\n  \"Hello\": {\n    value: \"world\",\n    writable: false\n  },\n  \"inner_object\": {\n    value : {\n      \"a\" : 1,\n      \"b\" : {\n        value: \"foo\"\n      }\n    }\n  }\n});\n\nassert (obj.foo === true);\nassert (obj.bar === \"baz\");\nassert (obj.Hello === \"world\");\nassert (obj.inner_object.a === 1);\nassert (obj.inner_object.b.value === \"foo\");\n\n// These cases should throw TypeError\ntry {\n  Object.defineProperties(obj, undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Object.defineProperties(obj, null);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Object.defineProperties(undefined, {\n    \"foo\": {\n      value: true,\n      writable: true\n    }\n  });\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Check for internal assert, see issue #131.\ntry {\n  Object.defineProperties([], undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// If one of the properties is wrong than it shouldn't update the object.\nvar obj2 = {\n  a: 5\n};\ntry {\n  Object.defineProperties(obj2, {\n    \"foo\": {\n      value: true,\n      writable: true\n    },\n    \"bar\": {\n      value: 3,\n      set: 3\n    },\n    \"Hello\": {\n      value: \"world\",\n      writable: false\n    }\n  });\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n  assert (obj2.foo === undefined);\n  assert (obj2.set === undefined);\n  assert (obj2.Hello === undefined);\n  assert (obj2.a === 5);\n}\n\n// Define accessors\nvar obj = {};\nObject.defineProperties(obj, {\n  \"foo\": {\n    value: 42,\n    writable: true,\n  },\n  \"bar\": {\n    get: function() { return this.foo },\n    set: function(v) { this.foo = v }\n  }\n});\n\nassert (obj.bar === 42);\nobj.bar = \"baz\";\nassert (obj.foo === \"baz\");\n\n// Define get method which throws error\nvar obj = {};\nvar props = {\n  prop1: {\n    value: 1,\n    writable: true,\n  },\n  get bar() {\n    throw new TypeError(\"foo\");\n    return { value : 2, writable : true };\n  },\n  prop2: {\n    value: 3,\n    writable: true,\n  },\n  prop3: {\n    value: 4,\n    writable: true,\n  }\n};\n\ntry {\n  Object.defineProperties(obj, props);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n  assert (e.message === \"foo\");\n}\n\n// Define get method which deletes a property\nvar obj = {};\nObject.defineProperties(obj, {\n  \"foo\": {\n    value: 42,\n    writable: true,\n  },\n  \"a\": {\n    value: \"b\",\n    configurable: true\n  },\n  \"bar\": {\n    get: function() {\n      delete this.a;\n      return this.foo;\n    },\n  }\n});\n\nassert (obj.a === \"b\");\nassert (obj.bar === 42);\nassert (obj.a === undefined);\n\nvar obj = {};\nvar props = {\n  prop1: {\n    value: 1,\n    writable: true,\n  },\n  get bar() {\n    delete props.prop1;\n    delete props.prop2;\n    return { value : 2, writable : true };\n  },\n  prop2: {\n    value: 3,\n    writable: true,\n  },\n  prop3: {\n    value: 4,\n    writable: true,\n  }\n};\n\nObject.defineProperties(obj, props);\nvar bar_desc = Object.getOwnPropertyDescriptor(obj, 'bar');\nassert(bar_desc.value === 2);\nassert(bar_desc.writable === true);\nassert(obj.prop2 === undefined);\n\nvar prop1_desc = Object.getOwnPropertyDescriptor(obj, 'prop1');\nvar prop3_desc = Object.getOwnPropertyDescriptor(obj, 'prop3');\nassert(prop1_desc.value === 1);\nassert(prop1_desc.writable === true);\nassert(prop3_desc.value === 4);\nassert(prop3_desc.writable === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-defineproperty.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = [];\n\nObject.defineProperty (obj, \"prop\", {\n    value: 2010,\n    writable: true,\n    enumerable: true,\n    configurable: false\n});\n\nassert (obj.hasOwnProperty (\"prop\"));\nfunction getFunc() {\n    return 20;\n}\n\ntry {\n    Object.defineProperty (obj, \"prop\", {\n        get: getFunc\n    });\n    assert (false);\n} catch (e) {\n    assert (e instanceof TypeError);\n    var desc = Object.getOwnPropertyDescriptor (obj, \"prop\");\n    assert (desc.value === 2010);\n    assert (typeof (desc.get) === 'undefined');\n}\n\nobj = {};\nvar setter = function () {};\n\nObject.defineProperty(obj, \"prop\", {\n    set: setter,\n    configurable: true\n});\n\nvar desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\nObject.defineProperty(obj, \"prop\", {\n    set: undefined\n});\n\nvar desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\nassert (desc1.set === setter && desc2.set === undefined);\n\nobj = {};\n\n/* This error is thrown even in non-strict mode. */\nObject.defineProperty(obj, 'f', {\n  set: function(value) { throw 234; },\n});\n\ntry {\n  obj.f = 5;\n  assert (false);\n} catch (err) {\n  assert (err === 234);\n}\n\ntry {\n  Object.defineProperty(42, \"prop\", {\n      set: undefined\n  });\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-get-own-property-descriptor.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj;\nvar desc;\n\nobj = { bar: 42 };\ndesc = Object.getOwnPropertyDescriptor (obj, 'bar');\n// desc is { configurable: true, enumerable: true, value: 42, writable: true }\nassert (desc.value === 42);\nassert (desc.configurable);\nassert (desc.writable);\nassert (desc.enumerable);\n\nobj = { \"foo\": \"bar\" };\ndesc = Object.getOwnPropertyDescriptor (obj, 'foo');\nassert (desc.value === \"bar\");\n\nobj = {};\nObject.defineProperty (obj, 'baz', { value: 8675309, writable: false, enumerable: false });\ndesc = Object.getOwnPropertyDescriptor (obj, 'baz');\n// desc is { value: 8675309, writable: false, enumerable: false, configurable: false }\nassert (desc.value === 8675309);\nassert (!desc.configurable);\nassert (!desc.writable);\nassert (!desc.enumerable);\n\nobj = { \"0.00001\": 1 };\ndesc = Object.getOwnPropertyDescriptor (obj, 1e-5);\nassert ( desc.value === 1);\n\nobj = { \"123\": 1 };\ndesc = Object.getOwnPropertyDescriptor (obj, 123);\nassert (desc.value === 1);\n\nobj = { \"undefined\": 1 };\nvar desc1 = Object.getOwnPropertyDescriptor (obj, undefined);\nvar desc2 = Object.getOwnPropertyDescriptor (obj, \"undefined\");\nassert (desc1.value === 1 && desc2.value === 1);\n\nobj = { \"0\": 1 };\ndesc = Object.getOwnPropertyDescriptor (obj, -0);\nassert (desc.value === 1);\n\nobj = { \"Hellobj\": 42 };\ndesc = Object.getOwnPropertyDescriptor (obj, new String (\"Hellobj\"));\nassert (desc.value === 42);\n\nobj = {};\ndesc = Object.getOwnPropertyDescriptor (obj, 'baz');\nassert (desc === undefined);\n\nobj = { get foo() { return obj.bar; }, set foo(a) { obj.bar = a; }, bar: 0 };\ndesc = Object.getOwnPropertyDescriptor(obj, 'foo');\n// d is { configurable: true, enumerable: true, get: /*the getter function*/, set: /*the setter function*/ }\nassert (typeof(desc.get) === 'function');\nassert (typeof(desc.set) === 'function');\nassert (desc.configurable);\nassert (desc.enumerable);\nassert (obj.foo === 0)\n\nvar array_desc = Object.getOwnPropertyDescriptor(Array, \"prototype\");\nassert (array_desc.configurable === false);\nassert (array_desc.writable === false);\nassert (array_desc.enumerable === false);\n\nvar obj_undef;\ntry {\n    Object.getOwnPropertyDescriptor (obj_undef, \"fail\");\n    assert (false);\n} catch (e) {\n    assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-get-own-property-names.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test array\nvar arr = ['a', 'b', 'c'];\nvar props = Object.getOwnPropertyNames(arr);\n// props should contain: 0,1,2,length and the order is not defined!\nassert (props.indexOf(\"0\") !== -1);\nassert (props.indexOf(\"1\") !== -1);\nassert (props.indexOf(\"2\") !== -1);\nassert (props.indexOf(\"length\") !== -1);\nassert (props.length === 4);\n\n// Test object\nvar obj = {key1: 'a', key3: 'b', key2: 'c', key4: 'c', key5: ''};\nprops = Object.getOwnPropertyNames(obj);\n// props should contain: key1,key2,key3,key4,key5 and the order is not defined!\nassert (props.indexOf(\"key1\") !== -1);\nassert (props.indexOf(\"key2\") !== -1);\nassert (props.indexOf(\"key3\") !== -1);\nassert (props.indexOf(\"key4\") !== -1);\nassert (props.indexOf(\"key5\") !== -1);\nassert (props.length === 5);\n\nvar obj2 = {};\nObject.defineProperties(obj2, {\n    key_one: {enumerable: true, value: 'one'},\n    key_two: {enumerable: false, value: 'two'},\n});\n\nprops = Object.getOwnPropertyNames(obj2);\n// props should contain: key_one,key_two and the order is not defined!\nassert (props.indexOf(\"key_one\") !== -1);\nassert (props.indexOf(\"key_two\") !== -1);\nassert (props.length === 2);\n\n// Test prototype chain\nfunction Parent() {}\nParent.prototype.inheritedMethod = function() {};\n\nfunction Child() {\n  this.prop = 5;\n  this.method = function() {};\n}\nChild.prototype = new Parent;\nChild.prototype.prototypeMethod = function() {};\n\nprops = Object.getOwnPropertyNames (new Child());\n// props should contain: prop,method and the order is not defined!\nassert (props.indexOf(\"prop\") !== -1);\nassert (props.indexOf(\"method\") !== -1);\n\nassert (props.length === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-is-extensible.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// New objects are extensible.\nvar empty = {};\nassert (Object.isExtensible(empty) === true);\n\n// ...but that can be changed.\nObject.preventExtensions(empty);\nassert(Object.isExtensible(empty) === false);\n\n// Sealed objects are by definition non-extensible.\nvar sealed = Object.seal({});\nassert (Object.isExtensible(sealed) === false);\n\n// Frozen objects are also by definition non-extensible.\nvar frozen = Object.freeze({});\nassert(Object.isExtensible(frozen) === false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-keys.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test array\nvar arr = ['a', 'b', 'c'];\nvar props = Object.keys(arr);\n// props should contain: 0,1,2 and the order is not defined!\nassert (props.indexOf(\"0\") !== -1);\nassert (props.indexOf(\"1\") !== -1);\nassert (props.indexOf(\"2\") !== -1);\nassert (props.length === 3);\n\n// Test object\nvar obj = {key1: 'a', key3: 'b', key2: 'c', key4: 'c', key5: ''};\nprops = Object.keys(obj);\n// props should contain: key1,key2,key3,key4,key5 and the order is not defined!\nassert (props.indexOf(\"key1\") !== -1);\nassert (props.indexOf(\"key2\") !== -1);\nassert (props.indexOf(\"key3\") !== -1);\nassert (props.indexOf(\"key4\") !== -1);\nassert (props.indexOf(\"key5\") !== -1);\nassert (props.length === 5);\n\nvar obj2 = {};\nObject.defineProperties(obj2, {\n    key_one: {enumerable: true, value: 'one'},\n    key_two: {enumerable: false, value: 'two'},\n});\n\nprops = Object.keys(obj2);\n// props should contain: key_one\nassert (props.indexOf(\"key_one\") !== -1);\nassert (props.indexOf(\"key_two\") === -1);\nassert (props.length === 1);\n\n// Test prototype chain\nfunction Parent() {}\nParent.prototype.inheritedMethod = function() {};\n\nfunction Child() {\n  this.prop = 5;\n  this.method = function() {};\n}\nChild.prototype = new Parent;\nChild.prototype.prototypeMethod = function() {};\n\nprops = Object.keys (new Child());\n// props should contain: prop,method and the order is not defined!\nassert (props.indexOf(\"prop\") !== -1);\nassert (props.indexOf(\"method\") !== -1);\nassert (props.length === 2);\n\nvar o = {};\n\nObject.defineProperty(o, 'a', {\n  value: \"OK\",\n  writable: true,\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(o, 'b', {\n  value: \"NOT_OK\",\n  writable: true,\n  enumerable: false,\n  configurable: true\n});\n\nObject.defineProperty(o, 'c', {\n  value: \"OK\",\n  writable: true,\n  enumerable: true,\n  configurable: true\n});\n\nprops = Object.keys(o);\nassert(props.length === 2);\nassert(o[props[0]] === \"OK\");\nassert(o[props[1]] === \"OK\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-literal-2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = {get a(){return undefined}, set a(b){}}\n\nvar b = {if:0, else:1, try:2, catch:3, finally:4, let:5}\n\nassert (b.if + b.else + b.try + b.catch + b.finally + b.let === 15)\n\nfunction c() {\n  \"use strict\"\n  var b = {let:15, enum:10}\n  assert (b.let + b.enum === 25)\n}\nc();\n\nfunction d () {\n  \"use strict\";\n\n  try {\n    /* 'let' is a FutureReservedWord in strict mode code */\n    eval ('var a = { get prop () { let = 1; } }');\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\nd ();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-literal-prescanner.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nswitch (true) {\ndefault:\n  var obj = {\n    value: 0,\n    set\n      member\n      (x)\n    {\n      // Multiple statements.\n      this.value = x + 4;\n      this.value += 2;\n    },\n    get\"member\"() {\n      // Multiple statements.\n      this.value = this.value + 1;\n      return this.value;\n    },\n    get 3() {\n      return 3;\n    }\n  }\n}\n\nobj[\"member\"] = 10;\nassert(obj.member === 17);\nassert(obj.member === 18);\n\nassert(obj[3] === 3);\nassert(obj[\"3\"] === 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-literal.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar person = {\n    firstName:\"John\",\n    lastName:\"Doe\",\n    age:50,\n    eyeColor:\"blue\",\n    \"gender\":\"male\",\n    0:0\n};\n\nassert (person.firstName === \"John\");\nassert (person[\"firstName\"] === \"John\");\nassert (person.lastName === \"Doe\");\nassert (person[\"lastName\"] === \"Doe\");\nassert (person.age === 50);\nassert (person[\"age\"] === 50);\nassert (person.eyeColor === \"blue\");\nassert (person[\"eyeColor\"] === \"blue\");\nassert (person.gender === \"male\");\nassert (person[\"gender\"] === \"male\");\nassert (person[\"0\"] === 0);\n\nvar x = person;\nx.age = 40;\nassert (x.age === 40);\nassert (person.age === 40);\n\nvar john = new Object();\njohn.firstName = \"John\";\njohn.lastName = \"Doe\";\njohn.age = 40;\njohn.eyeColor = \"blue\";\n\nassert (person.firstName === john.firstName);\nassert (person.lastName === john.lastName);\nassert (person.age === john.age);\nassert (person.eyeColor === john.eyeColor);\n\nvar a, b; \nb = 'property1'; \na = { \n  'property1' : 'value1', \n  get property2 () { return 1; }, \n  set property2 (a) {\n    if (true)\n      this.property3 = a * 10;\n    else\n      this.property3 = a;\n  },\n  set property3 (b) { this.property1 = b; }\n}; \nassert (a.property1 === 'value1'); \nassert (a.property2 === 1); \na.property3 = 'value2'; \nassert (a.property1 === 'value2'); \na.property2 = 2.5; \nassert (a.property1 === 25); \nb = delete a[b]; \nassert (b === true); \nassert (a.property1 === undefined); \n\nflow = '';\na = {\n  get q ()\n  {\n    flow += 'get: ' + (typeof q);\n\n    return 0;\n  },\n  set q (v)\n  {\n    flow += ', set: ' + (typeof q);\n  }\n};\n\na.q;\na.q = 1;\n\nassert (flow == 'get: undefined, set: undefined');\n\nvar data = {\n  '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8,\n  '9': 9, '10': 10, '11': 11, '12': 12, '13': 13, '14': 14, '15': 15, '16': 16,\n  '17': 17, '18': 18, '19': 19, '20': 20, '21': 21, '22': 22, '23': 23, '24': 24,\n  '25': 25, '26': 26, '27': 27, '28': 28, '29': 29, '30': 30, '31': 31, '32': 32,\n  '33': 33, '34': 34, '35': 35, '36': 36, '37': 37, '38': 38, '39': 39, '40': 40,\n  '41': 41, '42': 42, '43': 43, '44': 44, '45': 45, '46': 46, '47': 47, '48': 48,\n  '49': 49, '50': 50, '51': 51, '52': 52, '53': 53, '54': 54, '55': 55, '56': 56,\n  '57': 57, '58': 58, '59': 59, '60': 60, '61': 61, '62': 62, '63': 63, '64': 64,\n  '65': 65, '66': 66, '67': 67, '68': 68, '69': 69, '70': 70, '71': 71, '72': 72,\n  '73': 73, '74': 74, '75': 75, '76': 76, '77': 77, '78': 78, '79': 79, '80': 80,\n  '81': 81, '82': 82, '83': 83, '84': 84, '85': 85, '86': 86, '87': 87, '88': 88,\n  '89': 89, '90': 90, '91': 91, '92': 92, '93': 93, '94': 94, '95': 95, '96': 96,\n  '97': 97, '98': 98, '99': 99, '100': 100, '101': 101, '102': 102, '103': 103, '104': 104,\n  '105': 105, '106': 106, '107': 107, '108': 108, '109': 109, '110': 110, '111': 111, '112': 112,\n  '113': 113, '114': 114, '115': 115, '116': 116, '117': 117, '118': 118, '119': 119, '120': 120,\n  '121': 121, '122': 122, '123': 123, '124': 124, '125': 125, '126': 126, '127': 127, '128': 128,\n  '129': 129, '130': 130, '131': 131, '132': 132, '133': 133, '134': 134, '135': 135, '136': 136,\n  '137': 137, '138': 138, '139': 139, '140': 140, '141': 141, '142': 142, '143': 143, '144': 144,\n  '145': 145, '146': 146, '147': 147, '148': 148, '149': 149, '150': 150, '151': 151, '152': 152,\n  '153': 153, '154': 154, '155': 155, '156': 156, '157': 157, '158': 158, '159': 159, '160': 160,\n  '161': 161, '162': 162, '163': 163, '164': 164, '165': 165, '166': 166, '167': 167, '168': 168,\n  '169': 169, '170': 170, '171': 171, '172': 172, '173': 173, '174': 174, '175': 175, '176': 176,\n  '177': 177, '178': 178, '179': 179, '180': 180, '181': 181, '182': 182, '183': 183, '184': 184,\n  '185': 185, '186': 186, '187': 187, '188': 188, '189': 189, '190': 190, '191': 191, '192': 192,\n  '193': 193, '194': 194, '195': 195, '196': 196, '197': 197, '198': 198, '199': 199, '200': 200,\n  '201': 201, '202': 202, '203': 203, '204': 204, '205': 205, '206': 206, '207': 207, '208': 208,\n  '209': 209, '210': 210, '211': 211, '212': 212, '213': 213, '214': 214, '215': 215, '216': 216,\n  '217': 217, '218': 218, '219': 219, '220': 220, '221': 221, '222': 222, '223': 223, '224': 224,\n  '225': 225, '226': 226, '227': 227, '228': 228, '229': 229, '230': 230, '231': 231, '232': 232,\n  '233': 233, '234': 234, '235': 235, '236': 236, '237': 237, '238': 238, '239': 239, '240': 240,\n  '241': 241, '242': 242, '243': 243, '244': 244, '245': 245, '246': 246, '247': 247, '248': 248,\n  '249': 249, '250': 250, '251': 251, '252': 252, '253': 253, '254': 254, '255': 255, '256': 256,\n  '257': 257, '258': 258, '259': 259, '260': 260, '261': 261, '262': 262, '263': 263, '264': 264,\n  '265': 265, '266': 266, '267': 267, '268': 268, '269': 269, '270': 270, '271': 271, '272': 272,\n  '273': 273, '274': 274, '275': 275, '276': 276, '277': 277, '278': 278, '279': 279, '280': 280,\n  '281': 281, '282': 282, '283': 283, '284': 284, '285': 285, '286': 286, '287': 287, '288': 288,\n  '289': 289, '290': 290, '291': 291, '292': 292, '293': 293, '294': 294, '295': 295, '296': 296,\n  '297': 297, '298': 298, '299': 299, '300': 300, '301': 301, '302': 302, '303': 303, '304': 304,\n  '305': 305, '306': 306, '307': 307, '308': 308, '309': 309, '310': 310, '311': 311, '312': 312,\n  '313': 313, '314': 314, '315': 315, '316': 316, '317': 317, '318': 318, '319': 319, '320': 320,\n  '321': 321, '322': 322, '323': 323, '324': 324, '325': 325, '326': 326, '327': 327, '328': 328,\n  '329': 329, '330': 330, '331': 331, '332': 332, '333': 333, '334': 334, '335': 335, '336': 336,\n  '337': 337, '338': 338, '339': 339, '340': 340, '341': 341, '342': 342, '343': 343, '344': 344,\n  '345': 345, '346': 346, '347': 347, '348': 348, '349': 349, '350': 350, '351': 351, '352': 352,\n  '353': 353, '354': 354, '355': 355, '356': 356, '357': 357, '358': 358, '359': 359, '360': 360,\n  '361': 361, '362': 362, '363': 363, '364': 364, '365': 365, '366': 366, '367': 367, '368': 368,\n  '369': 369, '370': 370, '371': 371, '372': 372, '373': 373, '374': 374, '375': 375, '376': 376,\n  '377': 377, '378': 378, '379': 379, '380': 380, '381': 381, '382': 382, '383': 383, '384': 384,\n  '385': 385, '386': 386, '387': 387, '388': 388, '389': 389, '390': 390, '391': 391, '392': 392,\n  '393': 393, '394': 394, '395': 395, '396': 396, '397': 397, '398': 398, '399': 399, '400': 400,\n  '401': 401, '402': 402, '403': 403, '404': 404, '405': 405, '406': 406, '407': 407, '408': 408,\n  '409': 409, '410': 410, '411': 411, '412': 412, '413': 413, '414': 414, '415': 415, '416': 416,\n  '417': 417, '418': 418, '419': 419, '420': 420, '421': 421, '422': 422, '423': 423, '424': 424,\n  '425': 425, '426': 426, '427': 427, '428': 428, '429': 429, '430': 430, '431': 431, '432': 432,\n  '433': 433, '434': 434, '435': 435, '436': 436, '437': 437, '438': 438, '439': 439, '440': 440,\n  '441': 441, '442': 442, '443': 443, '444': 444, '445': 445, '446': 446, '447': 447, '448': 448,\n  '449': 449, '450': 450, '451': 451, '452': 452, '453': 453, '454': 454, '455': 455, '456': 456,\n  '457': 457, '458': 458, '459': 459, '460': 460, '461': 461, '462': 462, '463': 463, '464': 464,\n  '465': 465, '466': 466, '467': 467, '468': 468, '469': 469, '470': 470, '471': 471, '472': 472,\n  '473': 473, '474': 474, '475': 475, '476': 476, '477': 477, '478': 478, '479': 479, '480': 480,\n  '481': 481, '482': 482, '483': 483, '484': 484, '485': 485, '486': 486, '487': 487, '488': 488,\n  '489': 489, '490': 490, '491': 491, '492': 492, '493': 493, '494': 494, '495': 495, '496': 496,\n  '497': 497, '498': 498, '499': 499, '500': 500, '501': 501, '502': 502, '503': 503, '504': 504,\n  '505': 505, '506': 506, '507': 507, '508': 508, '509': 509, '510': 510, '511': 511, '512': 512,\n  '513': 513, '514': 514, '515': 515, '516': 516, '517': 517, '518': 518, '519': 519, '520': 520,\n  '521': 521, '522': 522, '523': 523, '524': 524, '525': 525, '526': 526, '527': 527, '528': 528,\n  '529': 529, '530': 530, '531': 531, '532': 532, '533': 533, '534': 534, '535': 535, '536': 536,\n  '537': 537, '538': 538, '539': 539, '540': 540, '541': 541, '542': 542, '543': 543, '544': 544,\n  '545': 545, '546': 546, '547': 547, '548': 548, '549': 549, '550': 550, '551': 551, '552': 552,\n  '553': 553, '554': 554, '555': 555, '556': 556, '557': 557, '558': 558, '559': 559, '560': 560,\n  '561': 561, '562': 562, '563': 563, '564': 564, '565': 565, '566': 566, '567': 567, '568': 568,\n  '569': 569, '570': 570, '571': 571, '572': 572, '573': 573, '574': 574, '575': 575, '576': 576,\n  '577': 577, '578': 578, '579': 579, '580': 580, '581': 581, '582': 582, '583': 583, '584': 584,\n  '585': 585, '586': 586, '587': 587, '588': 588, '589': 589, '590': 590, '591': 591, '592': 592,\n  '593': 593, '594': 594, '595': 595, '596': 596, '597': 597, '598': 598, '599': 599, '600': 600,\n  '601': 601, '602': 602, '603': 603, '604': 604, '605': 605, '606': 606, '607': 607, '608': 608,\n  '609': 609, '610': 610, '611': 611, '612': 612, '613': 613, '614': 614, '615': 615, '616': 616,\n  '617': 617, '618': 618, '619': 619, '620': 620, '621': 621, '622': 622, '623': 623, '624': 624,\n  '625': 625, '626': 626, '627': 627, '628': 628, '629': 629, '630': 630, '631': 631, '632': 632,\n  '633': 633, '634': 634, '635': 635, '636': 636, '637': 637, '638': 638, '639': 639, '640': 640,\n  '641': 641, '642': 642, '643': 643, '644': 644, '645': 645, '646': 646, '647': 647, '648': 648,\n  '649': 649, '650': 650, '651': 651, '652': 652, '653': 653, '654': 654, '655': 655, '656': 656,\n  '657': 657, '658': 658, '659': 659, '660': 660, '661': 661, '662': 662, '663': 663, '664': 664,\n  '665': 665, '666': 666, '667': 667, '668': 668, '669': 669, '670': 670, '671': 671, '672': 672,\n  '673': 673, '674': 674, '675': 675, '676': 676, '677': 677, '678': 678, '679': 679, '680': 680,\n  '681': 681, '682': 682, '683': 683, '684': 684, '685': 685, '686': 686, '687': 687, '688': 688,\n  '689': 689, '690': 690, '691': 691, '692': 692, '693': 693, '694': 694, '695': 695, '696': 696,\n  '697': 697, '698': 698, '699': 699, '700': 700, '701': 701, '702': 702, '703': 703, '704': 704,\n  '705': 705, '706': 706, '707': 707, '708': 708, '709': 709, '710': 710, '711': 711, '712': 712,\n  '713': 713, '714': 714, '715': 715, '716': 716, '717': 717, '718': 718, '719': 719, '720': 720,\n  '721': 721, '722': 722, '723': 723, '724': 724, '725': 725, '726': 726, '727': 727, '728': 728,\n  '729': 729, '730': 730, '731': 731, '732': 732, '733': 733, '734': 734, '735': 735, '736': 736,\n  '737': 737, '738': 738, '739': 739, '740': 740, '741': 741, '742': 742, '743': 743, '744': 744,\n  '745': 745, '746': 746, '747': 747, '748': 748, '749': 749, '750': 750, '751': 751, '752': 752,\n  '753': 753, '754': 754, '755': 755, '756': 756, '757': 757, '758': 758, '759': 759, '760': 760,\n  '761': 761, '762': 762, '763': 763, '764': 764, '765': 765, '766': 766, '767': 767, '768': 768,\n  '769': 769, '770': 770, '771': 771, '772': 772, '773': 773, '774': 774, '775': 775, '776': 776,\n  '777': 777, '778': 778, '779': 779, '780': 780, '781': 781, '782': 782, '783': 783, '784': 784,\n  '785': 785, '786': 786, '787': 787, '788': 788, '789': 789, '790': 790, '791': 791, '792': 792,\n  '793': 793, '794': 794, '795': 795, '796': 796, '797': 797, '798': 798, '799': 799, '800': 800,\n  '801': 801, '802': 802, '803': 803, '804': 804, '805': 805, '806': 806, '807': 807, '808': 808,\n  '809': 809, '810': 810, '811': 811, '812': 812, '813': 813, '814': 814, '815': 815, '816': 816,\n  '817': 817, '818': 818, '819': 819, '820': 820, '821': 821, '822': 822, '823': 823, '824': 824,\n  '825': 825, '826': 826, '827': 827, '828': 828, '829': 829, '830': 830, '831': 831, '832': 832,\n  '833': 833, '834': 834, '835': 835, '836': 836, '837': 837, '838': 838, '839': 839, '840': 840,\n  '841': 841, '842': 842, '843': 843, '844': 844, '845': 845, '846': 846, '847': 847, '848': 848,\n  '849': 849, '850': 850, '851': 851, '852': 852, '853': 853, '854': 854, '855': 855, '856': 856,\n  '857': 857, '858': 858, '859': 859, '860': 860, '861': 861, '862': 862, '863': 863, '864': 864,\n  '865': 865, '866': 866, '867': 867, '868': 868, '869': 869, '870': 870, '871': 871, '872': 872,\n  '873': 873, '874': 874, '875': 875, '876': 876, '877': 877, '878': 878, '879': 879, '880': 880,\n  '881': 881, '882': 882, '883': 883, '884': 884, '885': 885, '886': 886, '887': 887, '888': 888,\n  '889': 889, '890': 890, '891': 891, '892': 892, '893': 893, '894': 894, '895': 895, '896': 896,\n  '897': 897, '898': 898, '899': 899, '900': 900, '901': 901, '902': 902, '903': 903, '904': 904,\n  '905': 905, '906': 906, '907': 907, '908': 908, '909': 909, '910': 910, '911': 911, '912': 912,\n  '913': 913, '914': 914, '915': 915, '916': 916, '917': 917, '918': 918, '919': 919, '920': 920,\n  '921': 921, '922': 922, '923': 923, '924': 924, '925': 925, '926': 926, '927': 927, '928': 928,\n  '929': 929, '930': 930, '931': 931, '932': 932, '933': 933, '934': 934, '935': 935, '936': 936,\n  '937': 937, '938': 938, '939': 939, '940': 940, '941': 941, '942': 942, '943': 943, '944': 944,\n  '945': 945, '946': 946, '947': 947, '948': 948, '949': 949, '950': 950, '951': 951, '952': 952,\n  '953': 953, '954': 954, '955': 955, '956': 956, '957': 957, '958': 958, '959': 959, '960': 960,\n  '961': 961, '962': 962, '963': 963, '964': 964, '965': 965, '966': 966, '967': 967, '968': 968,\n  '969': 969, '970': 970, '971': 971, '972': 972, '973': 973, '974': 974, '975': 975, '976': 976,\n  '977': 977, '978': 978, '979': 979, '980': 980, '981': 981, '982': 982, '983': 983, '984': 984,\n  '985': 985, '986': 986, '987': 987, '988': 988, '989': 989, '990': 990, '991': 991, '992': 992,\n  '993': 993, '994': 994, '995': 995, '996': 996, '997': 997, '998': 998, '999': 999, '1000': 1000,\n  '1001': 1001, '1002': 1002, '1003': 1003, '1004': 1004, '1005': 1005, '1006': 1006, '1007': 1007, '1008': 1008,\n  '1009': 1009, '1010': 1010, '1011': 1011, '1012': 1012, '1013': 1013, '1014': 1014, '1015': 1015, '1016': 1016,\n  '1017': 1017, '1018': 1018, '1019': 1019, '1020': 1020, '1021': 1021, '1022': 1022, '1023': 1023, '1024': 1024 };\n\nfor (i = 1; i <= 1024; i++)\n{\n  assert (data[i] === i);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-prototype-hasownproperty.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj1 = {};\nobj1.prop = \"hi\";\n\nassert (obj1.hasOwnProperty('prop') === true);\nassert (obj1.hasOwnProperty('NO_PROP') === false);\n\n\n// Test if the toString fails.\ntry {\n  obj1.hasOwnProperty({toString: function() { throw new ReferenceError (\"foo\"); }});\n\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Test if the toObject fails.\n\nvar obj2;\ntry {\n  obj2.hasOwnProperty(\"fail\");\n\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar obj_undef;\nvar obj3 = {};\nObject.defineProperty(obj3, 'Test', { 'get' : function () {throw new ReferenceError (\"foo\"); } });\nassert (obj3.hasOwnProperty(\"Test\") === true);\n\nObject.defineProperty(obj3, 'Test2', { 'get' : function () { return 0/0; } });\nassert (obj3.hasOwnProperty(\"Test2\") === true);\n\nObject.defineProperty(obj3, 'Test4', { 'get' : function () { return obj_undef; } });\nassert (obj3.hasOwnProperty(\"Test4\") === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-prototype-isprototypeof.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction Function_A() { }\nfunction Function_B() { }\nFunction_B.prototype = new Function_A();\n\nfunction Function_C() { }\nFunction_C.prototype = new Function_B();\n\nfunction Function_D() { }\nFunction_D.prototype = new Function_C();\n\nvar d_instance = new Function_D();\n\nassert (Function_A.prototype.isPrototypeOf (d_instance) === true)\nassert (Function_A.prototype.isPrototypeOf (Array) === false)\n\n\nassert (Function_A.prototype.isPrototypeOf.call(0, 0) === false);\nassert (Function_A.prototype.isPrototypeOf.call(Function_A, 0) === false);\n\nassert (Function.prototype.isPrototypeOf (Object) === true)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-prototype-propertyisenumerable.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {};\n\n// Test if the toString fails.\ntry {\n  obj.propertyIsEnumerable({ toString: function() { throw new ReferenceError (\"foo\"); } });\n\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Test if the toObject fails.\nvar obj1;\ntry {\n  obj1.propertyIsEnumerable(\"fail\");\n\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\nvar array = [];\nobj.prop = \"bar\";\narray[0] = \"bar\";\n\nassert (obj.propertyIsEnumerable('prop') === true);\nassert (array.propertyIsEnumerable(0) === true);\n\nassert (obj.propertyIsEnumerable('length') === false);\nassert (array.propertyIsEnumerable('length') === false);\nassert (Math.propertyIsEnumerable('random') === false);\n\n// Creating a new property\nObject.defineProperty(obj, 'prop1', { value: 'foo', enumerable: true });\nObject.defineProperty(obj, 'prop2', { value: 'foo', enumerable: false });\nObject.defineProperty(obj, 'prop3', { value: 'foo' });\nassert (obj.propertyIsEnumerable('prop1') === true);\nassert (obj.propertyIsEnumerable('prop2') === false);\nassert (obj.propertyIsEnumerable('prop3') === false);\n\nObject.defineProperty(array, 'prop1', { value: 'foo', enumerable: true });\nObject.defineProperty(array, 'prop2', { value: 'foo', enumerable: false });\nObject.defineProperty(array, 'prop3', { value: 'foo' });\nassert (array.propertyIsEnumerable('prop1') === true);\nassert (array.propertyIsEnumerable('prop2') === false);\nassert (array.propertyIsEnumerable('prop3') === false);\n\n// Modify an existing one\nObject.defineProperty(obj, 'prop', { value: 'foo', enumerable: false });\nassert (obj.propertyIsEnumerable('prop') === false);\nObject.defineProperty(obj, 'prop', { value: 'foo', enumerable: true });\nassert (obj.propertyIsEnumerable('prop') === true);\n\nObject.defineProperty(array, 0, { value: 'foo', enumerable: false });\nassert (array.propertyIsEnumerable(0) === false);\nObject.defineProperty(array, 0, { value: 'foo', enumerable: true });\nassert (array.propertyIsEnumerable(0) === true);\n\n// Enumerability of inherited properties\nfunction construct1()\n{\n  this.prop1 = 'foo';\n}\n\nfunction construct2()\n{\n  this.prop2 = 'foo';\n}\n\nconstruct2.prototype = new construct1;\nconstruct2.prototype.constructor = construct2;\n\nvar obj2 = new construct2();\nobj2.prop3 = 'foo';\n\nassert (obj2.propertyIsEnumerable('prop3') === true);\nassert (obj2.propertyIsEnumerable('prop2') === true);\nassert (obj2.propertyIsEnumerable('prop1') === false);\n\nobj2.prop1 = 'foo';\n\nassert (obj2.propertyIsEnumerable('prop1') === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object-prototype-tolocalestring.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj1 = {};\nobj1.toString = function () { return \"mystring\"; }\n\nassert (obj1.toLocaleString() === \"mystring\");\n\nvar obj2 = {a: 3};\nassert (obj2.toLocaleString() === \"[object Object]\");\n\n\nvar obj3 = {toLocaleString: function() { throw ReferenceError (\"foo\"); }};\ntry {\n  obj3.toLocaleString();\n\n  assert (false);\n} catch (e) {\n  assert (e.message === \"foo\");\n  assert (e instanceof ReferenceError);\n}\n\n// Test invalid toString call\nvar obj4 = {toString: 2};\ntry {\n  obj4.toLocaleString();\n\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\n// Test undefined toString call\nvar obj5 = {};\nvar obj6;\nobj5.toString = obj6\ntry {\n  obj5.toLocaleString();\n\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object_freeze.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {\n  prop: function() {},\n  foo: 'bar'\n};\n\n// New properties may be added, existing properties may be changed or removed\nobj.foo = 'baz';\nobj.lumpy = 'woof';\ndelete obj.prop;\n\nvar o = Object.freeze(obj);\n\nassert(Object.isFrozen(obj) === true);\n\n// Now any changes will fail\nobj.foo = 'quux'; // silently does nothing\nassert (obj.foo === 'baz');\n\nobj.quaxxor = 'the friendly duck'; // silently doesn't add the property\nassert (obj.quaxxor === undefined);\n\n// ...and in strict mode such attempts will throw TypeErrors\nfunction fail(){\n  'use strict';\n\n  try {\n    obj.foo = 'sparky'; // throws a TypeError\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    delete obj.foo; // throws a TypeError\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n\n  try {\n    obj.sparky = 'arf'; // throws a TypeError\n    assert (false);\n  } catch (e) {\n    assert (e instanceof TypeError);\n  }\n}\n\nfail();\n\n// Attempted changes through Object.defineProperty will also throw\n\ntry {\n  Object.defineProperty(obj, 'ohai', { value: 17 }); // throws a TypeError\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  Object.defineProperty(obj, 'foo', { value: 'eit' }); // throws a TypeError\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/object_seal.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {\n  prop: function() {},\n  foo: 'bar'\n};\n// New properties may be added, existing properties may be changed or removed.\nobj.foo = 'baz';\nobj.lumpy = 'woof';\ndelete obj.prop;\n\nvar o = Object.seal(obj);\n\nassert (o === obj);\nassert (Object.isSealed (obj) === true);\n\n// Changing property values on a sealed object still works.\nobj.foo = 'quux';\nassert (obj.foo === 'quux');\n// But you can't convert data properties to accessors, or vice versa.\ntry {\n    Object.defineProperty(obj, 'foo', { get: function() { return 42; } }); // throws a TypeError\n    assert (false);\n} catch (e) {\n    assert (e instanceof TypeError);\n}\n\n// Now any changes, other than to property values, will fail.\nobj.quaxxor = 'the friendly duck'; // silently doesn't add the property\ndelete obj.foo; // silently doesn't delete the property\n\nassert (obj.quaxxor === undefined);\nassert (obj.foo === 'quux')\n\ntry {\n    // Attempted additions through Object.defineProperty will also throw.\n    Object.defineProperty (obj, 'ohai', { value: 17 }); // throws a TypeError\n    assert (false);\n} catch (e) {\n    assert (e instanceof TypeError);\n}\n\ntry {\n    Object.defineProperties (obj, { 'ohai' : { value: 17 } });\n    assert (false);\n} catch (e) {\n    assert (e instanceof TypeError);\n}\n\nObject.defineProperty (obj, 'foo', { value: 'eit' });\nassert (obj.foo === 'eit')\n\n// Objects aren't sealed by default.\nvar empty = {};\nassert (Object.isSealed (empty) === false);\n\n// If you make an empty object non-extensible, it is vacuously sealed.\nObject.preventExtensions (empty);\nassert (Object.isSealed (empty) === true);\n\n// The same is not true of a non-empty object, unless its properties are all non-configurable.\nvar hasProp = { fee: 'fie foe fum' };\nObject.preventExtensions (hasProp);\nassert (Object.isSealed (hasProp) === false);\n\n// But make them all non-configurable and the object becomes sealed.\nObject.defineProperty (hasProp, 'fee', { configurable: false });\nassert (Object.isSealed (hasProp) === true);\n\n// The easiest way to seal an object, of course, is Object.seal.\nvar sealed = {};\nObject.seal (sealed);\nassert (Object.isSealed (sealed) === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/octal.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (010 === 8);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/parser-oom.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* String which is 32 bytes long. */\nvar str = \"1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+\";\n\nfor (var i = 0; i < 10; i++) {\n  str = str + str;\n}\n\nstr = \"(function() { return \" + str + \"1 })\";\n\n/* Eat memory. */\nvar array = [];\n\ntry\n{\n  for (var i = 0; i < 30; i++)\n  {\n    array[i] = eval(str);\n  }\n  assert (false);\n}\ncatch (err)\n{\n  array = null;\n  assert (err === null);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/parser-oom2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* String which is 32 bytes long. */\nvar str = \"'\\\\t' +'\\\\t' +'\\\\t'+'\\\\t'+'\\\\t'+'\\\\t'+\";\n\nfor (var i = 0; i < 10; i++) {\n  str = str + str;\n}\n\nstr = \"(function() { return \" + str + \"1 })\";\n\n/* Eat memory. */\nvar array = [];\n\ntry\n{\n  for (var i = 0; i < 90; i++)\n  {\n    array[i] = eval(str);\n  }\n  assert (false);\n}\ncatch (err)\n{\n  array = null;\n  assert (err === null);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/prescanner.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = 0;\nvar count = 0;\nwhile ( function() { while (++a < 0) ; } (), a < 4) {\n  while (++count < 0) ;\n}\nassert(count == 3);\n\nfor (a = 0, count = 0; function() { while (++a < 0) ; } (), a < 4 ; ) {\n  while (++count < 0) ;\n}\nassert(count == 3);\n\na = 0;\ncount = 0;\nswitch (100) {\n  default:\n    while (++a < 2) ;\n    break;\n\n  case (function () { for (var a = 0; a <= 1; a++) count ++; return a; })():\n    while (++a < 100) ;\n    break;\n\n  case (function () { for (var a = 0; a <= 2; a++) count ++; return a; })():\n    while (++a < 100) ;\n    break;\n\n  case (function () { for (var a = 0; a <= 3; a++) count ++; return a; })():\n    while (++a < 100) ;\n    break;\n\n  case (function () { for (var a = 0; a <= 4; a++) count ++; return a; })():\n    while (++a < 100) ;\n    break;\n}\n\nassert (count == 14);\nassert (a == 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-alternatives.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r;\n\nr = new RegExp (\"a|b\");\nassert (r.exec(\"a\") == \"a\");\n\nr = new RegExp (\"a|b\");\nassert (r.exec(\"b\") == \"b\");\n\nr = new RegExp (\"a|b|c\");\nassert (r.exec(\"b\") == \"b\");\n\nr = new RegExp (\"a|b|c\");\nassert (r.exec(\"c\") == \"c\");\n\nr = new RegExp (\"a|b|c|d\");\nassert (r.exec(\"\") == undefined);\n\nr = new RegExp (\"a|b|c|d\");\nassert (r.exec(\"a\") == \"a\");\n\nr = new RegExp (\"a|b|c|d\");\nassert (r.exec(\"b\") == \"b\");\n\nr = new RegExp (\"a|b|c|d\");\nassert (r.exec(\"c\") == \"c\");\n\nr = new RegExp (\"a|b|c|d\");\nassert (r.exec(\"d\") == \"d\");\n\nr = new RegExp (\"a|bb|c|d\");\nassert (r.exec(\"e\") == undefined);\n\nr = new RegExp (\"a|bb|c|d\");\nassert (r.exec(\"bb\") == \"bb\");\n\nr = new RegExp (\"a|bb|c|d\");\nassert (r.exec(\"bba\") == \"bb\");\n\nr = new RegExp (\"a|bb|c|d\");\nassert (r.exec(\"bbbb\") == \"bb\");\n\nr = new RegExp (\"a|bb|c|d\");\nassert (r.exec(\"a\") == \"a\");\n\nr = new RegExp (\"a|bb|c|d\");\nassert (r.exec(\"b\") == undefined);\n\nr = new RegExp(\"(?:a|b)\\\\b|\\\\.\\\\w+\", \"g\");\nassert (r.exec(\"name.lower()\")[0] === \".lower\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-assertions.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar t;\n\nt = new RegExp (\"^alma$\").exec(\"alma\");\nassert (t == \"alma\");\n\nt = new RegExp (\"^alma$\").exec(\"almaa\");\nassert (t == undefined);\n\nt = new RegExp (\"^alma$\").exec(\"aalma\");\nassert (t == undefined);\n\nt = new RegExp (\"^alma\").exec(\"alma\");\nassert (t == \"alma\");\n\nt = new RegExp (\"^alma\").exec(\"almaa\");\nassert (t == \"alma\");\n\nt = new RegExp (\"^alma\").exec(\"aalma\");\nassert (t == undefined);\n\nt = new RegExp (\"alma$\").exec(\"alma\");\nassert (t == \"alma\");\n\nt = new RegExp (\"alma$\").exec(\"almaa\");\nassert (t == undefined);\n\nt = new RegExp (\"alma$\").exec(\"aalma\");\nassert (t == \"alma\");\n\nt = new RegExp (\"\\\\bis\\\\b\").exec(\"This island is beautiful\");\nassert (t == \"is\");\n\nt = new RegExp (\"\\\\Bis\\\\B\").exec(\"This island is beautiful\");\nassert (t == undefined);\n\nt = new RegExp (\"\\\\Bis\").exec(\"This island is beautiful\");\nassert (t == \"is\");\n\nt = new RegExp (\"is\\\\B\").exec(\"This island is beautiful\");\nassert (t == \"is\");\n\nt = new RegExp (\"\\\\Bis\\\\b\").exec(\"This island is beautiful\");\nassert (t == \"is\");\n\nt = new RegExp (\"\\\\bis\\\\B\").exec(\"This island is beautiful\");\nassert (t == \"is\");\n\nt = new RegExp (\"al(?=(ma))\").exec(\"al\");\nassert (t == undefined);\n\nt = new RegExp (\"al(?!(ma))\").exec(\"ala\");\nassert (t[0] == \"al\");\nassert (t[1] == undefined);\n\nt = new RegExp (\"al(?=(ma))\").exec(\"alma\");\nassert (t[0] == \"al\");\nassert (t[1] == \"ma\");\n\nt = new RegExp (\"al(?=(ma))\").exec(\"almama\");\nassert (t[0] == \"al\");\nassert (t[1] == \"ma\");\n\nt = new RegExp (\"(al)(?=(ma))ma\").exec(\"al\");\nassert (t == undefined);\n\nt = new RegExp (\"(al)(?=(ma)ma)\").exec(\"al\");\nassert (t == undefined);\n\nt = new RegExp (\"al(?=(ma))*ma\").exec(\"alma\");\nassert (t[0] == \"alma\");\nassert (t[1] == undefined);\n\nt = new RegExp (\"al(?!(ma))*ma\").exec(\"alma\");\nassert (t[0] == \"alma\");\nassert (t[1] == undefined);\n\nt = new RegExp (\"al(?=(ma))ma\").exec(\"alma\");\nassert (t[0] == \"alma\");\nassert (t[1] == \"ma\");\n\nt = new RegExp (\"al(?!(ma))ma\").exec(\"alma\");\nassert (t == undefined);\n\nt = new RegExp (\"(al)(?=(ma))ma\").exec(\"almama\");\nt = new RegExp (\"(al)(?=(ma)ma)\").exec(\"almama\");\n\nt = new RegExp (\"al(?=(ma))ma\").exec(\"almama\");\nassert (t[0] == \"alma\");\nassert (t[1] == \"ma\");\n\nt = new RegExp (\"al(?=(ma)ma)\").exec(\"almama\");\nassert (t[0] == \"al\");\nassert (t[1] == \"ma\");\n\nt = new RegExp (\"al(?!(ma))ma\").exec(\"almama\");\nassert (t == undefined);\n\nt = new RegExp (\"a(?=(a)(a))aab|aaac\").exec(\"aaac\");\nt = new RegExp (\"a(?=(a)(a))aab|aaac\").exec(\"aaab\");\n\nt = new RegExp (\"(?!(a)b)|ab\").exec(\"ab\");\nassert (t[0] == \"ab\");\nassert (t[1] == undefined);\n\nt = new RegExp (\"(?=(a)b)|ab\").exec(\"ab\");\nassert (t[0] == \"\");\nassert (t[1] == \"a\");\n\nt = new RegExp (\"(?=a|.)Dt\").exec(\"Dt\");\nassert (t == \"Dt\");\n\nt = new RegExp (\"(?=.|a)Dt\").exec(\"Dt\");\nassert (t == \"Dt\");\n\nt = new RegExp (\"(?=a|b)Dt\").exec(\"Dt\");\nassert (t == undefined);\n\nt = new RegExp (\"(?=.|P)\").exec(\"a\");\nassert (t == \"\");\n\nt = new RegExp (\"(?=.)\").exec(\"a\");\nassert (t == \"\");\n\nt = new RegExp (\"(?!a|.)Dt\").exec(\"Dt\");\nassert (t == undefined);\n\nt = new RegExp (\"(?!.|a)Dt\").exec(\"Dt\");\nassert (t == undefined);\n\nt = new RegExp (\"(?!a|b)Dt\").exec(\"Dt\");\nassert (t == \"Dt\");\n\nt = new RegExp (\"(?!.|P)\").exec(\"a\");\nassert (t == \"\");\n\nt = new RegExp (\"(?!.)\").exec(\"a\");\nassert (t == \"\");\n\nt = new RegExp (\"abc\",\"g\");\nt.lastIndex = {toString: function () { return \"4\"}};\nvar result = t.exec(\"abc   abc\");\nassert(result[0] === \"abc\");\nassert(result.index === 6);\n\nt = new RegExp (\"abc\",\"g\");\nt.lastIndex = {valueOf: function () { return \"4\"}};\nvar result = t.exec(\"abc   abc\");\nassert(result[0] === \"abc\");\nassert(result.index === 6);\n\nt = new RegExp (\"abc\",\"g\");\nt.lastIndex = \"2\"\nvar result = t.exec(\"abc   abc\");\nassert(result[0] === \"abc\");\nassert(result.index === 6);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-backreference.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r;\n\nr = new RegExp (\"(a)b\\\\1\").exec(\"aba\");\nassert (r[0] == \"aba\");\nassert (r[1] == \"a\");\n\nr = new RegExp (\"(a)b\\\\1\").exec(\"b\");\nassert (r == undefined);\n\nr = new RegExp (\"(a)*b\\\\1\").exec(\"b\");\nassert (r[0] == \"b\");\nassert (r[1] == undefined);\n\nassert (JSON.stringify (/[[]?(a)\\1/.exec(\"aa\")) === '[\"aa\",\"a\"]');\nassert (JSON.stringify (/\\1{2,5}()\\B/.exec(\"asd\")) === '[\"\",\"\"]');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-backtrack.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (JSON.stringify (/(?:(a)*){3,}/.exec(\"aaaab\")) === '[\"aaaa\",null]');\nassert (JSON.stringify (/((a)*){3,}/.exec(\"aaaab\")) === '[\"aaaa\",\"\",null]');\nassert (JSON.stringify (/((a)+){3,}/.exec(\"aaaab\")) === '[\"aaaa\",\"a\",\"a\"]');\nassert (JSON.stringify (/((.)*){3,}/.exec(\"abcd\")) === '[\"abcd\",\"\",null]');\nassert (JSON.stringify (/((.)+){3,}/.exec(\"abcd\")) === '[\"abcd\",\"d\",\"d\"]');\n\nassert (JSON.stringify (/((.){1,2}){1,2}/.exec(\"abc\")) === '[\"abc\",\"c\",\"c\"]');\nassert (JSON.stringify (/(?:(a)*?)asd/.exec(\"aaasd\")) === '[\"aaasd\",\"a\"]');\nassert (JSON.stringify (/(?:(a)*)asd/.exec(\"aaasd\")) === '[\"aaasd\",\"a\"]');\n\nassert (JSON.stringify (/(.)*((a)*|(b)*)/.exec(\"ab\")) === '[\"ab\",\"b\",\"\",null,null]');\nassert (JSON.stringify (/(.)*((x)|(y))+/.exec(\"xy\")) === '[\"xy\",\"x\",\"y\",null,\"y\"]');\nassert (JSON.stringify (/(.)*((y)|(x))+/.exec(\"xy\")) === '[\"xy\",\"x\",\"y\",\"y\",null]');\n\nassert (JSON.stringify (/((?:a)*)/.exec(\"aaaad\")) === '[\"aaaa\",\"aaaa\"]');\nassert (JSON.stringify (/((y)+|x)+/.exec(\"x\")) === '[\"x\",\"x\",null]');\nassert (JSON.stringify (/((?:y)*|x)+/.exec(\"x\")) === '[\"x\",\"x\"]');\nassert (JSON.stringify (/((y)*|x)+/.exec(\"x\")) === '[\"x\",\"x\",null]');\nassert (JSON.stringify (/((y)*|x)*/.exec(\"x\")) === '[\"x\",\"x\",null]');\nassert (JSON.stringify (/(?:(y)*|x)*/.exec(\"x\")) === '[\"x\",null]');\nassert (JSON.stringify (/(?:(y)*|(x))*/.exec(\"x\")) === '[\"x\",null,\"x\"]');\n\nassert (JSON.stringify (/((?:a)*)asd/.exec(\"aaasd\")) === '[\"aaasd\",\"aa\"]');\nassert (JSON.stringify (/((?:a)+)asd/.exec(\"aaasd\")) === '[\"aaasd\",\"aa\"]');\nassert (JSON.stringify (/((?:a)*?)asd/.exec(\"aaasd\")) === '[\"aaasd\",\"aa\"]');\nassert (JSON.stringify (/((?:a)+?)asd/.exec(\"aaasd\")) === '[\"aaasd\",\"aa\"]');\n\nassert (JSON.stringify (/((y)|(z)|(a))*/.exec(\"yazx\")) === '[\"yaz\",\"z\",null,\"z\",null]');\nassert (JSON.stringify (/((y)|(z)|(.))*/.exec(\"yaz\")) === '[\"yaz\",\"z\",null,\"z\",null]');\nassert (JSON.stringify (/((y)*|(z)*|(a)*)*/.exec(\"yazx\")) === '[\"yaz\",\"z\",null,\"z\",null]')\nassert (JSON.stringify (/((y)|(z)|(a))*/.exec(\"yazx\")) === '[\"yaz\",\"z\",null,\"z\",null]')\nassert (JSON.stringify (/(?:(y)|(z)|(a))*/.exec(\"yazx\")) === '[\"yaz\",null,\"z\",null]')\nassert (JSON.stringify (/((y)|(z)|(a))+?/.exec(\"yazx\")) === '[\"y\",\"y\",\"y\",null,null]')\nassert (JSON.stringify (/(?:(y)|(z)|(a))+?/.exec(\"yazx\")) === '[\"y\",\"y\",null,null]')\n\nassert (JSON.stringify (/(?:(x|y)*|z)*/.exec(\"yz\")) === '[\"yz\",null]');\nassert (JSON.stringify (/((x|y)*|z)*/.exec(\"yz\")) == '[\"yz\",\"z\",null]');\nassert (JSON.stringify (/(((x|y)*|(v|w)*|z)*)asd/.exec(\"xyzwvxzasd\")) === '[\"xyzwvxzasd\",\"xyzwvxz\",\"z\",null,null]');\n\nassert (JSON.stringify (/((a)*){1,3}b/.exec(\"ab\")) === '[\"ab\",\"a\",\"a\"]')\nassert (JSON.stringify (/((a)*){2,3}b/.exec(\"ab\")) === '[\"ab\",\"\",null]')\nassert (JSON.stringify (/((a)*){3,3}b/.exec(\"ab\")) === '[\"ab\",\"\",null]')\n\nassert (JSON.stringify (/((a)*){3,}b/.exec(\"aaaab\")) === '[\"aaaab\",\"\",null]');\nassert (JSON.stringify (/((a)*)*b/.exec(\"aaaab\")) === '[\"aaaab\",\"aaaa\",\"a\"]');\n\nassert (JSON.stringify (/((bb?)*)*a/.exec(\"bbba\")) === '[\"bbba\",\"bbb\",\"b\"]');\nassert (JSON.stringify (/((b)*)*a/.exec(\"bbba\")) === '[\"bbba\",\"bbb\",\"b\"]');\n\nassert (JSON.stringify (/(aa|a)a/.exec(\"aa\")) === '[\"aa\",\"a\"]');\nassert (JSON.stringify (/(aa|a)?a/.exec(\"aa\")) === '[\"aa\",\"a\"]');\nassert (JSON.stringify (/(aa|a)+?a/.exec(\"aa\")) === '[\"aa\",\"a\"]');\nassert (JSON.stringify (/(?:aa|a)a/.exec(\"aa\")) === '[\"aa\"]');\nassert (JSON.stringify (/(?:aa|a)?a/.exec(\"aa\")) === '[\"aa\"]');\nassert (JSON.stringify (/(?:aa|a)+?a/.exec(\"aa\")) === '[\"aa\"]');\n\nassert (JSON.stringify (/(aa|a)a/.exec(\"a\")) === 'null');\nassert (JSON.stringify (/(aa|a)?a/.exec(\"a\")) === '[\"a\",null]');\nassert (JSON.stringify (/(aa|a)+?a/.exec(\"a\")) === 'null');\nassert (JSON.stringify (/(?:aa|a)a/.exec(\"a\")) === 'null');\nassert (JSON.stringify (/(?:aa|a)?a/.exec(\"a\")) === '[\"a\"]');\nassert (JSON.stringify (/(?:aa|a)+?a/.exec(\"a\")) === 'null');\n\nassert (JSON.stringify (/a+/.exec(\"aaasd\")) === '[\"aaa\"]');\nassert (JSON.stringify (/a+?/.exec(\"aaasd\")) === '[\"a\"]');\n\nassert (JSON.stringify (/a+sd/.exec(\"aaasd\")) === '[\"aaasd\"]');\nassert (JSON.stringify (/a+?sd/.exec(\"aaasd\")) === '[\"aaasd\"]');\n\nassert (JSON.stringify (/a{2}sd/.exec(\"aaasd\")) === '[\"aasd\"]');\nassert (JSON.stringify (/a{3}sd/.exec(\"aaasd\")) === '[\"aaasd\"]');\n\nassert (JSON.stringify (/(?=a)/.exec(\"a\")) === '[\"\"]');\nassert (JSON.stringify (/(?=a)+/.exec(\"a\")) === '[\"\"]');\nassert (JSON.stringify (/(?=a)*/.exec(\"a\")) === '[\"\"]');\nassert (JSON.stringify (/(?=(a))?/.exec(\"a\")) === '[\"\",null]');\nassert (JSON.stringify (/(?=(a))+?/.exec(\"a\")) === '[\"\",\"a\"]');\nassert (JSON.stringify (/(?=(a))*?/.exec(\"a\")) === '[\"\",null]');\n\nassert (JSON.stringify (/(?!a)/.exec(\"a\")) === '[\"\"]');\nassert (JSON.stringify (/(?!a)+/.exec(\"a\")) === '[\"\"]');\nassert (JSON.stringify (/(?!a)*/.exec(\"a\")) === '[\"\"]');\nassert (JSON.stringify (/(?!(a))?/.exec(\"a\")) === '[\"\",null]');\nassert (JSON.stringify (/(?!(a))+?/.exec(\"a\")) === '[\"\",null]');\nassert (JSON.stringify (/(?!(a))*?/.exec(\"a\")) === '[\"\",null]');\n\nassert (JSON.stringify (/al(?=(ma))*ma/.exec(\"alma\")) === '[\"alma\",null]');\nassert (JSON.stringify (/al(?!(ma))*ma/.exec(\"alma\")) === '[\"alma\",null]');\nassert (JSON.stringify (/al(?=(ma))+ma/.exec(\"alma\")) === '[\"alma\",\"ma\"]');\nassert (JSON.stringify (/al(?!(ma))+ma/.exec(\"alma\")) === 'null');\n\nassert (JSON.stringify (/(?=())x|/.exec(\"asd\")) === '[\"\",null]');\nassert (JSON.stringify (/(?!())x|/.exec(\"asd\")) === '[\"\",null]');\n\nassert (JSON.stringify (/(().*)+.$/.exec(\"abcdefg\")) === '[\"abcdefg\",\"abcdef\",\"\"]');\nassert (JSON.stringify (/(().*)+?.$/.exec(\"abcdefg\")) === '[\"abcdefg\",\"abcdef\",\"\"]');\nassert (JSON.stringify (/(?:().*)+.$/.exec(\"abcdefg\")) === '[\"abcdefg\",\"\"]');\nassert (JSON.stringify (/(?:().*)+?.$/.exec(\"abcdefg\")) === '[\"abcdefg\",\"\"]');\n\nassert (JSON.stringify(/((?=())|.)+^/.exec(\"a\")) === '[\"\",\"\",\"\"]');\nassert (JSON.stringify(/(?:(|\\b\\w+?){2})+$/.exec(\"aaaa\")) === '[\"aaaa\",\"aaaa\"]');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-capture-groups.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r;\n\n// Simple test cases\nr = new RegExp (\"()\");\nassert (r.exec (\"a\") == \",\");\n\nr = new RegExp (\"(a)\");\nassert (r.exec (\"a\") == \"a,a\");\n\nr = new RegExp (\"((a)b)c\");\nassert (r.exec (\"abc\") == \"abc,ab,a\");\n\nr = new RegExp (\"(a)*\");\nassert (r.exec (\"b\")[0] == \"\");\nassert (r.exec (\"b\")[1] == undefined);\nassert (r.exec (\"aaaa\") == \"aaaa,a\");\n\nr = new RegExp (\"(a)+\");\nassert (r.exec (\"aaaa\") == \"aaaa,a\");\n\nr = new RegExp (\"(a){4}\");\nassert (r.exec (\"aaaa\") == \"aaaa,a\");\n\nr = new RegExp (\"(a){1,2}\");\nassert (r.exec (\"a\") == \"a,a\");\nassert (r.exec (\"aa\") == \"aa,a\");\nassert (r.exec (\"aaaa\") == \"aa,a\");\n\nr = new RegExp (\"(a)?\");\nassert (r.exec (\"a\") == \"a,a\");\nassert (r.exec (\"b\")[0] == \"\");\nassert (r.exec (\"b\")[1] == undefined);\n\n// Test greedy iterations\nr = new RegExp (\"(a){1,3}a\");\nassert (r.exec(\"aa\") == \"aa,a\");\n\nr = new RegExp (\"(a){1,3}a\");\nassert (r.exec(\"aaa\") == \"aaa,a\");\n\nr = new RegExp (\"(a){1,3}\");\nassert (r.exec(\"a\") == \"a,a\");\n\nr = new RegExp (\"(a){1,3}\");\nassert (r.exec(\"aaa\") == \"aaa,a\");\n\nr = new RegExp (\"(a){1,3}\");\nassert (r.exec(\"aaaa\") == \"aaa,a\");\n\nr = new RegExp (\"(a){1,5}\");\nassert (r.exec(\"aaaa\") == \"aaaa,a\");\n\nr = new RegExp (\"(a|b){1,2}\");\nassert (r.exec(\"a\") == \"a,a\");\n\nr = new RegExp (\"(a|b){1,3}a\");\nassert (r.exec(\"aaa\") == \"aaa,a\");\n\nr = new RegExp (\"(a|b){1,3}a\");\nassert (r.exec(\"aba\") == \"aba,b\");\n\nr = new RegExp (\"(a|b){1,3}a\");\nassert (r.exec(\"b\") == undefined);\n\nr = new RegExp (\"(a|b){1,3}a\");\nassert (r.exec(\"bbb\") == undefined);\n\nr = new RegExp (\"(a|b){1,3}\");\nassert (r.exec(\"a\") == \"a,a\");\n\nr = new RegExp (\"(a|b){1,3}\");\nassert (r.exec(\"aa\") == \"aa,a\");\n\nr = new RegExp (\"(a|b){1,3}\");\nassert (r.exec(\"aaa\") == \"aaa,a\");\n\nr = new RegExp (\"(a|b){1,3}\");\nassert (r.exec(\"ab\") == \"ab,b\");\n\nr = new RegExp (\"(a|b){1,3}\");\nassert (r.exec(\"aba\") == \"aba,a\");\n\nr = new RegExp (\"(a|b){1,3}\");\nassert (r.exec(\"bab\") == \"bab,b\");\n\nr = new RegExp (\"(a|b){1,3}\");\nassert (r.exec(\"bbb\") == \"bbb,b\");\n\nr = new RegExp (\"(a|b){1,4}a\");\nassert (r.exec(\"bbb\") == undefined);\n\nr = new RegExp (\"(a|b){1,4}\");\nassert (r.exec(\"ab\") == \"ab,b\");\n\nr = new RegExp (\"(a|b){1,4}\");\nassert (r.exec(\"aba\") == \"aba,a\");\n\nr = new RegExp (\"(a|b){1,4}\");\nassert (r.exec(\"bbb\") == \"bbb,b\");\n\nr = new RegExp (\"(a|b){1,5}\");\nassert (r.exec(\"aba\") == \"aba,a\");\n\nr = new RegExp (\"(a|b){1,5}\");\nassert (r.exec(\"abab\") == \"abab,b\");\n\nr = new RegExp (\"(a|b){1,5}\");\nassert (r.exec(\"bbb\") == \"bbb,b\");\n\nr = new RegExp (\"(aba)*\");\nassert (r.exec(\"aaaa\") == \",\");\n\nr = new RegExp (\"(aba)+\");\nassert (r.exec(\"aaaa\") == undefined);\n\nr = new RegExp (\"(a|bb|c|d)\");\nassert (r.exec(\"a\") == \"a,a\");\n\nr = new RegExp (\"(a|b)\");\nassert (r.exec(\"a\") == \"a,a\");\n\nr = new RegExp (\"(a|b)+\");\nassert (r.exec(\"aba\") == \"aba,a\");\n\nr = new RegExp (\"(a|b)\");\nassert (r.exec(\"b\") == \"b,b\");\n\nr = new RegExp (\"(a)\");\nassert (r.exec(\"a\") == \"a,a\");\n\nr = new RegExp (\"(a)*\");\nassert (r.exec(\"a\") == \"a,a\");\n\nr = new RegExp (\"(a)*\");\nassert (r.exec(\"aaaa\") == \"aaaa,a\");\n\nr = new RegExp (\"(a)+\");\nassert (r.exec(\"aaaa\") == \"aaaa,a\");\n\nr = new RegExp (\"(a|aa){0,3}b\");\nassert (r.exec(\"aaaaaab\") == \"aaaaaab,aa\");\n\nr = new RegExp (\"((a){2,3}){4}b\");\nassert (r.exec(\"aaaaaaaab\") == \"aaaaaaaab,aa,a\");\n\n// Test non-greedy iterations\nr = new RegExp (\"(a)+?\");\nassert (r.exec(\"aaaa\") == \"a,a\");\n\nr = new RegExp (\"(a)*?aa\");\nassert (r.exec(\"aaaa\") == \"aa,\");\n\nr = new RegExp (\"(aaa|aa)*?aa\");\nassert (r.exec(\"aaaa\")[0] == \"aa\");\nassert (r.exec(\"aaaa\")[1] == undefined);\n\nr = new RegExp (\"(a)??aa\");\nassert (r.exec(\"aaaa\")[0] == \"aa\");\nassert (r.exec(\"aaaa\")[1] == undefined);\n\nr = new RegExp (\"(a)?aa\");\nassert (r.exec(\"aaaa\") == \"aaa,a\");\n\nr = new RegExp (\"(()*?)*?a\");\nassert (r.exec(\"ba\")[0] == \"a\");\nassert (r.exec(\"ba\")[1] == undefined);\nassert (r.exec(\"ba\")[2] == undefined);\n\nr = new RegExp (\"((bb?)*)*a\");\nassert (r.exec(\"bbba\") == \"bbba,bbb,b\");\n\nr = new RegExp (\"((bb?)*)*bbb\\\\Ba\");\nassert (r.exec(\"bbba\")[0] == \"bbba\");\nassert (r.exec(\"bbba\")[1] == undefined);\nassert (r.exec(\"bbba\")[2] == undefined);\n\nr = new RegExp (\"(a??){0,1}a\");\nassert (r.exec(\"aa\") == \"aa,a\");\n\nr = new RegExp (\"(a?){0,1}a\");\nassert (r.exec(\"aa\") == \"aa,a\");\n\nr = new RegExp (\"(a{0,1}?){0,1}a\");\nassert (r.exec(\"aa\") == \"aa,a\");\n\nr = new RegExp (\"(|.)+\");\nassert (JSON.stringify (r.exec(\"asdfgh\")) === '[\"asdfgh\",\"h\"]');\n\nassert (JSON.stringify (/([^\\W](){8,}?){5}/.exec(\"asdfghijk\")) === '[\"asdfg\",\"g\",\"\"]');\nassert (JSON.stringify (/(()+?(.+)|){3,}./u.exec(\"asdfghi\")) === '[\"asdfghi\",\"\",null,null]')\nassert (JSON.stringify (/(()+?(.+)|){3,}?./u.exec(\"asdfghi\")) === '[\"asdfghi\",\"\",null,null]')\nassert (JSON.stringify (/(?:()+?(.+)|){3,}./u.exec(\"asdfghi\")) === '[\"asdfghi\",null,null]')\nassert (JSON.stringify (/(?:()+?(.+)|){3,}?./u.exec(\"asdfghi\")) === '[\"asdfghi\",null,null]')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-character-class.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r;\n\nr = new RegExp (\"[abc]*\").exec(\"aaabbcccabcacbacabacbacab\");\nassert (r == \"aaabbcccabcacbacabacbacab\");\n\nr = new RegExp (\"[abc]*\").exec(\"aaabbcccabdcacb\");\nassert (r == \"aaabbcccab\");\n\nr = new RegExp (\"[abc]*\").exec(\"defghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"[a-z]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[A-Z]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"[^a-z]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"[^A-Z]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"\\\\d*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"\\\\D*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"\\\\w*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"\\\\W*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"\\\\s*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"\\\\S*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[\\\\d]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"[\\\\D]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[\\\\w]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[\\\\W]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"[\\\\s]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"[\\\\S]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[^\\\\d]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[^\\\\D]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"[^\\\\w]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"[^\\\\W]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[^\\\\s]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[^\\\\S]*\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"\");\n\nr = new RegExp (\"\\\\d*\").exec(\"0123456789\");\nassert (r == \"0123456789\");\n\ntry\n{\n  r = new RegExp(\"[\");\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof SyntaxError);\n}\n\ntry\n{\n  r = new RegExp(\"[\\\\\");\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof SyntaxError);\n}\n\nr = new RegExp (\"^[\\\\u0061-\\\\u007a]+$\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"^[\\\\u0061-\\\\u007a]+\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[\\\\u0061-\\\\u007a]+$\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"^[\\\\x61-\\\\x7a]+$\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"^[\\\\x61-\\\\x7a]+\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp (\"[\\\\x61-\\\\x7a]+$\").exec(\"abcdefghjklmnopqrstuvwxyz\");\nassert (r == \"abcdefghjklmnopqrstuvwxyz\");\n\nr = new RegExp(\"[\\\\u0800-\\\\uffff]\", \"g\");\nassert (r.test (\"\\uffff\"));\nassert (!r.test (\"\\uffff\"));\n\nr = new RegExp(\"[\\0]\");\nassert (r.test (\"\\0\"));\nassert (!r.test (\"0\"));\n\nr = new RegExp(\"[\\0-\\1]\");\nassert (r.test (\"\\1\"));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-construct.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r;\n\nr = new RegExp ();\nassert (r.source == \"(?:)\");\nassert (r.global == false);\nassert (r.ignoreCase == false);\nassert (r.multiline == false);\n\nr = new RegExp (\"a\");\nassert (r.source == \"a\");\nassert (r.global == false);\nassert (r.ignoreCase == false);\nassert (r.multiline == false);\n\nr = new RegExp (\"a\",\"gim\");\nassert (r.source == \"a\");\nassert (r.global == true);\nassert (r.ignoreCase == true);\nassert (r.multiline == true);\n\nr = RegExp (\"a\");\nassert (r.source == \"a\");\nassert (r.global == false);\nassert (r.ignoreCase == false);\nassert (r.multiline == false);\n\nr = RegExp (\"a\",\"gim\");\nassert (r.source == \"a\");\nassert (r.global == true);\nassert (r.ignoreCase == true);\nassert (r.multiline == true);\n\nvar r2;\n\nr2 = RegExp (r);\nassert (r2.source == \"a\");\nassert (r2.global == true);\nassert (r2.ignoreCase == true);\nassert (r2.multiline == true);\n\nr2 = RegExp (r, undefined);\nassert (r2.source == \"a\");\nassert (r2.global == true);\nassert (r2.ignoreCase == true);\nassert (r2.multiline == true);\n\nr = /(?:)/;\nassert (r.source == \"(?:)\");\nassert (r.global == false);\nassert (r.ignoreCase == false);\nassert (r.multiline == false);\n\nr = /a/;\nassert (r.source == \"a\");\nassert (r.global == false);\nassert (r.ignoreCase == false);\nassert (r.multiline == false);\n\nr = /a/gim;\nassert (r.source == \"a\");\nassert (r.global == true);\nassert (r.ignoreCase == true);\nassert (r.multiline == true);\n\n/* The 'undefined' argument for the RegExp constructor should not be converted to string,\n * and it should behave just like when there is no argument.\n */\nr1 = new RegExp();\nr2 = new RegExp(undefined);\nvar foo;\nr3 = new RegExp(foo)\n\nassert (r1.source === r2.source);\nassert (r2.source === r3.source);\n\nr = new RegExp (\"foo\", undefined);\nassert (r.source === \"foo\");\nassert (r.global === false);\nassert (r.ignoreCase === false);\nassert (r.multiline === false);\n\nr = new RegExp (\"foo\", void 0);\nassert (r.source === \"foo\");\nassert (r.global === false);\nassert (r.ignoreCase === false);\nassert (r.multiline === false);\n\ntry {\n  new RegExp (undefined, \"ii\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp (\"\", \"gg\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  new RegExp (void 0, \"mm\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\nr = new RegExp (undefined, undefined);\nassert (r.source == \"(?:)\");\nassert (r.global == false);\nassert (r.ignoreCase == false);\nassert (r.multiline == false);\n\n/* RegExp properties */\nassert (RegExp.length === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-literal.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar t;\n\nt = /\\//.exec(\"/\");\nassert (t == \"/\");\n\nt = /[/]/.exec(\"/\");\nassert (\"a\"+/x/+\"b\" == \"a/x/b\");\n\nt = /\\/\\[[\\]/]/.exec(\"/[/\");\nassert (t == \"/[/\");\n\nt = /\\u0000/.exec(\"\\u0000\");\nassert (t == \"\\u0000\");\n\ntry {\n  eval(\"/\" + String.fromCharCode(\"0x0000\") + \"/\");\n} catch (e) {\n  assert (false);\n}\n\ntry {\n  eval(\"var x = 5\\n\\n/foo/\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\ntry {\n  eval(\"var x = 5;\\n\\n/foo/\");\n} catch (e) {\n  assert(false);\n}\n\ntry {\n  eval(\"for (;false;/abc/.exec(\\\"abc\\\")) {5}\");\n} catch (e) {\n  assert(false);\n}\n\ntry {\n  eval(\"var a = [] /foo/\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\ntry {\n  eval(\"/\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\ntry {\n  eval(\"var x = /aaa/\");\n} catch (e) {\n  assert (false);\n}\n\ntry {\n  eval(\"{}/a/g\");\n} catch (e) {\n  assert (false);\n}\n\ntry {\n  eval(\"var a, g; +{}/a/g\");\n} catch (e) {\n  assert (false);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-non-capture-groups.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r;\n\n// Simple test cases\nr = new RegExp (\"(?:)\");\nassert (r.exec (\"a\") == \"\");\n\nr = new RegExp (\"(?:a)\");\nassert (r.exec (\"a\") == \"a\");\n\nr = new RegExp (\"(?:(?:a)b)c\");\nassert (r.exec (\"abc\") == \"abc\");\n\nr = new RegExp (\"(?:a)*\");\nassert (r.exec (\"b\") == \"\");\nassert (r.exec (\"aaaa\") == \"aaaa\");\n\nr = new RegExp (\"(?:a)+\");\nassert (r.exec (\"aaaa\") == \"aaaa\");\n\nr = new RegExp (\"(?:a){4}\");\nassert (r.exec (\"aaaa\") == \"aaaa\");\n\nr = new RegExp (\"(?:a){1,2}\");\nassert (r.exec (\"a\") == \"a\");\nassert (r.exec (\"aa\") == \"aa\");\nassert (r.exec (\"aaaa\") == \"aa\");\n\nr = new RegExp (\"(?:a)?\");\nassert (r.exec (\"a\") == \"a\");\nassert (r.exec (\"b\") == \"\");\n\n// Test greedy iterations\nr = new RegExp (\"(?:a){1,3}a\");\nassert (r.exec (\"aa\") == \"aa\");\n\nr = new RegExp (\"(?:a){1,3}a\");\nassert (r.exec (\"aaa\") == \"aaa\");\n\nr = new RegExp (\"(?:a){1,3}\");\nassert (r.exec (\"a\") == \"a\");\n\nr = new RegExp (\"(?:a){1,3}\");\nassert (r.exec (\"aaa\") == \"aaa\");\n\nr = new RegExp (\"(?:a){1,3}\");\nassert (r.exec (\"aaaa\") == \"aaa\");\n\nr = new RegExp (\"(?:a){1,5}\");\nassert (r.exec (\"aaaa\") == \"aaaa\");\n\nr = new RegExp (\"(?:a|b){1,2}\");\nassert (r.exec (\"a\") == \"a\");\n\nr = new RegExp (\"(?:a|b){1,3}a\");\nassert (r.exec (\"aaa\") == \"aaa\");\n\nr = new RegExp (\"(?:a|b){1,3}a\");\nassert (r.exec (\"aba\") == \"aba\");\n\nr = new RegExp (\"(?:a|b){1,3}a\");\nassert (r.exec (\"b\") == undefined);\n\nr = new RegExp (\"(?:a|b){1,3}a\");\nassert (r.exec (\"bbb\") == undefined);\n\nr = new RegExp (\"(?:a|b){1,3}\");\nassert (r.exec (\"a\") == \"a\");\n\nr = new RegExp (\"(?:a|b){1,3}\");\nassert (r.exec (\"aa\") == \"aa\");\n\nr = new RegExp (\"(?:a|b){1,3}\");\nassert (r.exec (\"aaa\") == \"aaa\");\n\nr = new RegExp (\"(?:a|b){1,3}\");\nassert (r.exec (\"ab\") == \"ab\");\n\nr = new RegExp (\"(?:a|b){1,3}\");\nassert (r.exec (\"aba\") == \"aba\");\n\nr = new RegExp (\"(?:a|b){1,3}\");\nassert (r.exec (\"bab\") == \"bab\");\n\nr = new RegExp (\"(?:a|b){1,3}\");\nassert (r.exec (\"bbb\") == \"bbb\");\n\nr = new RegExp (\"(?:a|b){1,4}a\");\nassert (r.exec (\"bbb\") == undefined);\n\nr = new RegExp (\"(?:a|b){1,4}\");\nassert (r.exec (\"ab\") == \"ab\");\n\nr = new RegExp (\"(?:a|b){1,4}\");\nassert (r.exec (\"aba\") == \"aba\");\n\nr = new RegExp (\"(?:a|b){1,4}\");\nassert (r.exec (\"bbb\") == \"bbb\");\n\nr = new RegExp (\"(?:a|b){1,5}\");\nassert (r.exec (\"abab\") == \"abab\");\n\nr = new RegExp (\"(?:aba)*\");\nassert (r.exec (\"aaaa\") == \"\");\n\nr = new RegExp (\"(?:aba)+\");\nassert (r.exec (\"aaaa\") == undefined);\n\nr = new RegExp (\"(?:a|bb|c|d)\");\nassert (r.exec (\"a\") == \"a\");\n\nr = new RegExp (\"(?:a|b|c|d)\");\nassert (r.exec (\"\") == undefined);\n\nr = new RegExp (\"(?:a|b|c|d)\");\nassert (r.exec (\"a\") == \"a\");\n\nr = new RegExp (\"(?:a|b|c|d)\");\nassert (r.exec (\"b\") == \"b\");\n\nr = new RegExp (\"(?:a|b|c|d)\");\nassert (r.exec (\"c\") == \"c\");\n\nr = new RegExp (\"(?:a|b|c|d)\");\nassert (r.exec (\"d\") == \"d\");\n\nr = new RegExp (\"(?:a|b)+\");\nassert (r.exec (\"aba\") == \"aba\");\n\nr = new RegExp (\"(?:a|b)\");\nassert (r.exec (\"b\") == \"b\");\n\nr = new RegExp (\"(?:a)\");\nassert (r.exec (\"a\") == \"a\");\n\nr = new RegExp (\"(?:a)*\");\nassert (r.exec (\"a\") == \"a\");\n\nr = new RegExp (\"(?:a)*\");\nassert (r.exec (\"aaaa\") == \"aaaa\");\n\nr = new RegExp (\"(?:a)+\");\nassert (r.exec (\"aaaa\") == \"aaaa\");\n\nr = new RegExp (\"(?:a)?aa\");\nassert (r.exec (\"aaaa\") == \"aaa\");\n\nr = new RegExp (\"(?:a?){0,1}a\");\nassert (r.exec (\"aa\") == \"aa\");\n\nr = new RegExp (\"(?:a|aa){0,3}b\");\nassert (r.exec (\"aaaaaab\") == \"aaaaaab\");\n\nr = new RegExp (\"(?:(?:a){2,3}){4}b\");\nassert (r.exec (\"aaaaaaaab\") == \"aaaaaaaab\");\n\n// Test non-greedy iterations\nr = new RegExp (\"(?:a)+?\");\nassert (r.exec (\"aaaa\") == \"a\");\n\nr = new RegExp (\"(?:a)*?aa\");\nassert (r.exec (\"aaaa\") == \"aa\");\n\nr = new RegExp (\"(?:aaa|aa)*?aa\");\nassert (r.exec (\"aaaa\") == \"aa\");\n\nr = new RegExp (\"(?:a)??aa\");\nassert (r.exec (\"aaaa\") == \"aa\");\n\nr = new RegExp (\"(?:(?:)*?)*?a\");\nassert (r.exec (\"ba\") == \"a\");\n\nr = new RegExp (\"(?:(?:bb?)*)*a\");\nassert (r.exec (\"bbba\") == \"bbba\");\n\nr = new RegExp (\"(?:(?:bb?)*)*bbb\\\\Ba\");\nassert (r.exec (\"bbba\") == \"bbba\");\n\nr = new RegExp (\"(?:a??){0,1}a\");\nassert (r.exec (\"aa\") == \"aa\");\n\nr = new RegExp (\"(?:a{0,1}?){0,1}a\");\nassert (r.exec (\"aa\") == \"aa\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-routines.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r;\n\nr = new RegExp (\"a\");\nassert (r.exec (\"a\") == \"a\");\nassert (r.exec (\"b\") == null);\ntry {\n  r.exec.call({}, \"a\");\n  assert (false)\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nassert (r.test (\"a\") == true);\nassert (r.test (\"b\") == false);\ntry {\n  r.test.call({}, \"a\");\n  assert (false)\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nr = new RegExp (\"a\", \"mig\");\nassert (r.toString () == \"/a/gim\");\n\n/* Test continous calls to the exec method to see how does the match\n * updates the lastIndex propertyand see if the match restarts.\n */\nvar re = new RegExp(\"a\", \"g\");\nresult = re.exec(\"a\");\nassert (result.length === 1);\nassert (result[0] === \"a\");\nassert (re.lastIndex === 1);\n\nassert (re.exec(\"a\") === null);\nassert (re.lastIndex === 0);\n\nresult = re.exec(\"a\");\nassert (result.length === 1);\nassert (result[0] === \"a\");\nassert (re.lastIndex === 1);\n\nvar re1 = /foo/gim;\nvar re2 = /bar/g;\n\ntry {\n  re2.compile(\"asd\", \"ggim\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n  assert (re2 == \"/bar/g\");\n}\n\ntry {\n  re2.compile(\"[\", undefined);\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n  assert (re2 == \"/bar/g\");\n}\n\ntry {\n  re2.compile(re1, \"im\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n  assert (re2 == \"/bar/g\");\n}\n\nre2.lastIndex = 2;\nassert (re2.compile(\"asd\", \"im\") === re2);\n\nassert (re2 == \"/asd/im\");\nassert (re2.global === false);\nassert (re2.ignoreCase === true);\nassert (re2.multiline === true);\nassert (re2.source === \"asd\");\nassert (re2.lastIndex === 0);\n\nassert (re2.compile(re1) === re2);\nassert (re2.toString() === re1.toString());\nassert (re2.global === re1.global);\nassert (re2.ignoreCase === re1.ignoreCase);\nassert (re2.multiline === re1.multiline);\nassert (re2.source === re1.source);\nassert (re2.lastIndex === 0);\n\nvar r = /./\nr.lastIndex = {\n  valueOf: function() {\n    throw \"abrupt lastIndex\"\n  }\n}\n\ntry {\n  r.exec(\"a\");\n  assert(false);\n} catch (e) {\n  assert (e === \"abrupt lastIndex\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-simple-atom-and-iterations.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r;\n\nr = new RegExp (\"a\");\nassert (r.exec (\"a\") == \"a\");\nassert (r.exec (\"b\") == undefined);\n\nr = new RegExp (\"abc\");\nassert (r.exec (\"abc\") == \"abc\");\n\nr = new RegExp (\"a*\");\nassert (r.exec (\"aaa\") == \"aaa\");\nassert (r.exec (\"b\") == \"\");\n\nr = new RegExp (\"a+\");\nassert (r.exec (\"aaa\") == \"aaa\");\nassert (r.exec (\"b\") == undefined);\n\nr = new RegExp (\"ab*\");\nassert (r.exec (\"a\") == \"a\");\nassert (r.exec (\"ab\") == \"ab\");\nassert (r.exec (\"abbbb\") == \"abbbb\");\nassert (r.exec (\"bbb\") == undefined);\n\nr = new RegExp (\"a?\");\nassert (r.exec (\"a\") == \"a\");\nassert (r.exec (\"b\") == \"\");\n\nr = new RegExp (\"a{4}\");\nassert (r.exec (\"aaa\") == undefined);\nassert (r.exec (\"aaaaa\") == \"aaaa\");\nassert (r.exec (\"aaaa\") == \"aaaa\");\n\nr = new RegExp (\"a{2,6}\");\nassert (r.exec (\"a\") == undefined);\nassert (r.exec (\"aa\") == \"aa\");\nassert (r.exec (\"aaaaaa\") == \"aaaaaa\");\nassert (r.exec (\"aaaaaaa\") == \"aaaaaa\");\n\nr = new RegExp (\".*\");\nassert (r.exec (\"abcdefghijkl\") == \"abcdefghijkl\");\n\nr = /\\n/;\nassert (r.exec (\"\\n\") == \"\\n\");\n\nassert (/[\\12]+/.exec (\"1\\n\\n\\n\\n\\n2\") == \"\\n\\n\\n\\n\\n\");\nassert (/[\\1284]+/.exec (\"1\\n\\n8\\n4\\n\\n2\") == \"\\n\\n8\\n4\\n\\n\");\nassert (/[\\89]12/.exec (\"1\\9128123\") == \"912\");\nassert (/[\\11]/.exec (\"1\\n\\n\\t\\n\\n2\") == \"\\t\");\nassert (/[\\142][\\143][\\144]/.exec (\"abcde\") == \"bcd\");\n\nassert (/\\12+/.exec (\"1\\n\\n\\n\\n\\n2\") == \"\\n\\n\\n\\n\\n\");\nassert (/\\11/.exec (\"1\\n\\n\\t\\n\\n2\") == \"\\t\");\nassert (/\\142\\143\\144/.exec (\"abcde\") == \"bcd\");\nassert (/\\942\\143\\144/.exec (\"a942cde\") == \"942cd\");\nassert (/\\14234/.exec (\"b34\") == \"b34\");\n\nassert (/(\\d+)\\2([abc]+)\\1\\2/.exec(\"123abc123abc\") == \"123abc123abc,123,abc\");\nassert (/([abc]+)\\40([d-f]+)\\12\\1/.exec(\"abc def\\nabc\") == \"abc def\\nabc,abc,def\");\n\nvar expected = \"8765432911,8,7,6,5,4,3,2,9,1\";\nassert (/(\\d)(\\d)(\\d)(\\d)(\\d)(\\d)(\\d)(\\d)\\9(\\d)\\9/.exec(\"8765432911\") == expected);\n\nr = /\\c/;\nassert (r.exec (\"\\\\c\") == \"\\\\c\");\n\nr = /[\\c]/;\nassert (r.exec (\"c\") == \"c\");\n\nr = /[\\c1]/;\nassert (r.exec (\"\\u0011\") == \"\\u0011\");\n\nr = /\\c3/;\nassert (r.exec (\"\\\\c3\") == \"\\\\c3\");\n\nr = /\\cIasd/;\nassert (r.exec (\"\\tasd\") == \"\\tasd\");\n\nr = /.??$/;\nassert (JSON.stringify (r.exec(\"asd\")) === '[\"d\"]');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regexp-web-compatibility.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction test_match(re, input, expected)\n{\n  var result = re.exec(input);\n\n  if (expected === null)\n  {\n    assert (result === null);\n    return;\n  }\n\n  assert (result !== null);\n  assert (result.length === expected.length);\n\n  for (var idx = 0; idx < result.length; idx++)\n  {\n    assert (result[idx] === expected[idx]);\n  }\n}\n\ntest_match (new RegExp (\"A{1,2}\"), \"B\", null);\ntest_match (new RegExp (\"A{1,2}\"), \"\", null);\ntest_match (new RegExp (\"A{1,2}\"), \"A\", [\"A\"]);\ntest_match (new RegExp (\"A{1,2}\"), \"AA\", [\"AA\"]);\ntest_match (new RegExp (\"A{1,2}\"), \"AAA\", [\"AA\"]);\n\ntest_match (new RegExp (\"A{1,}\"), \"B\", null);\ntest_match (new RegExp (\"A{1,}\"), \"GA\", [\"A\"]);\ntest_match (new RegExp (\"A{1,}\"), \"FAAAW\", [\"AAA\"]);\ntest_match (new RegExp (\"A{1,}\"), \"FAdAAW\", [\"A\"]);\n\n/* Test web compatiblity (ES2015 Annex B 1.4) */\n\ntest_match (new RegExp (\"A{1,2\"), \"A\", null);\ntest_match (new RegExp (\"A{1,2\"), \"AA\", null);\ntest_match (new RegExp (\"A{1,2\"), \"A{1,2\", [\"A{1,2\"]);\ntest_match (new RegExp (\"A{1,2\"), \"AA{1,2\", [\"A{1,2\"]);\n\ntest_match (new RegExp (\"A{1,\"), \"A\", null);\ntest_match (new RegExp (\"A{1,\"), \"AA\", null);\ntest_match (new RegExp (\"A{1,\"), \"A{1,\", [\"A{1,\"]);\ntest_match (new RegExp (\"A{1,\"), \"A{1,2\", [\"A{1,\"]);\ntest_match (new RegExp (\"A{1,\"), \"AA{1,2\", [\"A{1,\"]);\n\ntest_match (new RegExp (\"A{1\"), \"A\", null);\ntest_match (new RegExp (\"A{1\"), \"AA\", null);\ntest_match (new RegExp (\"A{1\"), \"A{1,\", [\"A{1\"]);\ntest_match (new RegExp (\"A{1\"), \"A{1,2\", [\"A{1\"]);\ntest_match (new RegExp (\"A{1\"), \"AA{1,2\", [\"A{1\"]);\n\ntest_match (new RegExp (\"A{\"), \"A\", null);\ntest_match (new RegExp (\"A{\"), \"AA\", null);\ntest_match (new RegExp (\"A{\"), \"A{,\", [\"A{\"]);\ntest_match (new RegExp (\"A{\"), \"A{1,\", [\"A{\"]);\ntest_match (new RegExp (\"A{\"), \"A{1,2\", [\"A{\"]);\ntest_match (new RegExp (\"A{\"), \"AA{1,2\", [\"A{\"]);\n\ntest_match (new RegExp (\"{\"), \"\", null);\ntest_match (new RegExp (\"{\"), \"AA\", null);\ntest_match (new RegExp (\"{\"), \"{,\", [\"{\"]);\ntest_match (new RegExp (\"{\"), \"{1,\", [\"{\"]);\ntest_match (new RegExp (\"{\"), \"{1,2\", [\"{\"]);\ntest_match (new RegExp (\"{\"), \"A{1,2\", [\"{\"]);\n\ntest_match (new RegExp (\"{{2,3}\"), \"\", null);\ntest_match (new RegExp (\"{{2,3}\"), \"AA\", null);\ntest_match (new RegExp (\"{{2,3}\"), \"{{,\", [\"{{\"]);\ntest_match (new RegExp (\"{{2,3}\"), \"{{{,\", [\"{{{\"]);\ntest_match (new RegExp (\"{{2,3}\"), \"{{{{,\", [\"{{{\"]);\n\ntest_match (new RegExp (\"{{2,3\"), \"{{{{,\", null);\ntest_match (new RegExp (\"{{2,3\"), \"{{2,3,\", [\"{{2,3\"]);\n\ntest_match (/A{1,2/, \"A\", null);\ntest_match (/A{1,2/, \"AA\", null);\ntest_match (/A{1,2/, \"A{1,2\", [\"A{1,2\"]);\ntest_match (/A{1,2/, \"AA{1,2\", [\"A{1,2\"]);\n\ntest_match (/A{1,/, \"A\", null);\ntest_match (/A{1,/, \"AA\", null);\ntest_match (/A{1,/, \"A{1,\", [\"A{1,\"]);\ntest_match (/A{1,/, \"A{1,2\", [\"A{1,\"]);\ntest_match (/A{1,/, \"AA{1,2\", [\"A{1,\"]);\n\ntest_match (/A{1/, \"A\", null);\ntest_match (/A{1/, \"AA\", null);\ntest_match (/A{1/, \"A{1,\", [\"A{1\"]);\ntest_match (/A{1/, \"A{1,2\", [\"A{1\"]);\ntest_match (/A{1/, \"AA{1,2\", [\"A{1\"]);\n\ntest_match (/A{/, \"A\", null);\ntest_match (/A{/, \"AA\", null);\ntest_match (/A{/, \"A{,\", [\"A{\"]);\ntest_match (/A{/, \"A{1,\", [\"A{\"]);\ntest_match (/A{/, \"A{1,2\", [\"A{\"]);\ntest_match (/A{/, \"AA{1,2\", [\"A{\"]);\n\ntest_match (/{/, \"\", null);\ntest_match (/{/, \"AA\", null);\ntest_match (/{/, \"{,\", [\"{\"]);\ntest_match (/{/, \"{1,\", [\"{\"]);\ntest_match (/{/, \"{1,2\", [\"{\"]);\ntest_match (/{/, \"A{1,2\", [\"{\"]);\n\ntest_match (/{{2,3}/, \"\", null);\ntest_match (/{{2,3}/, \"AA\", null);\ntest_match (/{{2,3}/, \"{{,\", [\"{{\"]);\ntest_match (/{{2,3}/, \"{{{,\", [\"{{{\"]);\ntest_match (/{{2,3}/, \"{{{{,\", [\"{{{\"]);\n\ntest_match (/{{2,3/, \"{{{{,\", null);\ntest_match (/{{2,3/, \"{{2,3,\", [\"{{2,3\"]);\n\ntry {\n    new RegExp (\"[\");\n    assert (false);\n} catch (ex) {\n    assert (ex instanceof SyntaxError);\n}\n\ntry {\n    eval (\"/[/\");\n    assert (false);\n} catch (ex) {\n    assert (ex instanceof SyntaxError);\n}\n\ntry {\n    new RegExp (\"(\");\n    assert (false);\n} catch (ex) {\n    assert (ex instanceof SyntaxError);\n}\n\ntry {\n    eval (\"/(/\");\n    assert (false);\n} catch (ex) {\n    assert (ex instanceof SyntaxError);\n}\n\ntest_match (new RegExp(\"\\s+{3,4\"), \"s+{3,4\", null);\ntest_match (new RegExp(\"\\s+{3,4\"), \"s{3,4\", [\"s{3,4\"]);\ntest_match (new RegExp(\"\\s+{3,4\"), \"ss{3,4\", [\"ss{3,4\"]);\ntest_match (new RegExp(\"\\\\s+{3,4\"), \"    {3,4\", [\"    {3,4\"]);\ntest_match (new RegExp(\"\\\\s+{3,4\"), \"   d{3,4\", null);\n\ntest_match (/s+{3,4/, \"s+{3,4\", null);\ntest_match (/s+{3,4/, \"s{3,4\", [\"s{3,4\"]);\ntest_match (/s+{3,4/, \"ss{3,4\", [\"ss{3,4\"]);\ntest_match (/\\s+{3,4/, \"    {3,4\", [\"    {3,4\"]);\ntest_match (/\\s+{3,4/, \"   d{3,4\", null);\n\ntry {\n    new RegExp (\"\\s+{3,4}\");\n    assert (false);\n} catch (ex) {\n    assert (ex instanceof SyntaxError);\n}\n\ntry {\n    eval (\"/\\\\s+{3,4}/\");\n    assert (false);\n} catch (ex) {\n    assert (ex instanceof SyntaxError);\n}\n\ntry {\n    new RegExp (\"a{2,3}{2,3}\");\n    assert (false);\n} catch (ex) {\n    assert (ex instanceof SyntaxError);\n}\n\ntry {\n    eval (\"/a{2,3}{2,3}/\");\n    assert (false);\n} catch (ex) {\n    assert (ex instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1054.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  new String(Number.MAX_VALUE)\n} catch(e) {\n  assert(false);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1071.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar d = new Date(864858163349847396, 1, 1, 1, 1, 1, 1, 1)\nassert (d.toGMTString() === \"Invalid Date\");\n\nd = new Date(864858, 1, 1, 1, 1, 1, 1, 1)\nassert (d.toGMTString() === \"Invalid Date\");\n\nd = new Date(86485, 1, 1, 1, 1, 1, 1, 1)\nassert (d.toGMTString() !== \"Invalid Date\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1072.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { new (this.$)(new (this.RegExp)().ignoreCase).$ ()  } catch($){}\ntry { new (this.String)() .constructor.prototype.match()  } catch($){}\ntry { this.RegExp().compile() } catch($){}\ntry { this.$(this.RegExp.prototype .compile (this.RegExp.prototype))  } catch($){}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1073.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { String.prototype(new (RegExp)())  } catch($){}\ntry { RegExp.prototype.compile() } catch($){}\ntry { isNaN(RegExp.prototype.compile(RegExp.prototype)) } catch($){}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1074.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { this.Date.prototype.$ (this.isNaN.length, this.String.fromCharCode.length)  } catch($){}\ntry { this.String.prototype.constructor.prototype.$(new (this.RegExp)())  } catch($){}\ntry { this.RegExp.prototype.constructor.prototype.compile ()  } catch($){}\ntry { this.isNaN (undefined)  } catch($){}\ntry { new (this.Date)(\"2015-09-17\").constructor.parse()  } catch($){}\ntry { this.isNaN(this.RegExp.prototype.compile(this.RegExp.prototype))  } catch($){}\ntry { new $.$ ()  } catch($){}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1075.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { new (RegExp)().$()  } catch($){}\ntry { RegExp.prototype.compile()  } catch($){}\ntry { new (this.$)(1, RegExp.prototype.compile(RegExp.prototype))  } catch($){}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1076.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { Array.prototype.unshift(1)  } catch($){}\ntry { Object.freeze(this.Array.prototype)()  } catch($){}\ntry { new String(1).split(\"\")  } catch($){}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1078.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nArray.prototype.splice(Function.prototype, 1, this);\nObject.freeze(Array.prototype);\nvar res = (new String(\"Hello\")).split(new RegExp());\nassert(res.length == 5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1079.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nArray.prototype.push(1)\nObject.freeze(Array.prototype)\ntry { new RegExp().constructor.prototype.exec()  } catch($){}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1081.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { new RegExp().compile(A)  } catch (err) {}\ntry { A } catch (err) {}\ntry { new RegExp().constructor.prototype.toString()  } catch (A) {}\ntry { A } catch (err) {}\ntry { new RegExp(1, \"g\").exec(1)  } catch (A) {}\ntry { A } catch (err) {}\ntry { A } catch (A) {}\ntry { A } catch (A) {}\ntry { new (Boolean.constructor.prototype)  } catch (err) {}\ntry { Boolean  } catch (A) {}\ntry { A } catch(A) {}\ntry { new RegExp().compile(new (RegExp)())  } catch (A) {}\ntry { Math.max().constructor.seal(A) } catch (err) {}\ntry { Date.parse(RegExp.prototype.compile(RegExp.prototype)) } catch(A) {}\ntry { Boolean.A() } catch (err) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1082.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { new (String)().A.A.A (A)  } catch (A) {}\ntry { new (this.RegExp)().A ()  } catch (A) {}\ntry { A.A.A ()  } catch (A) {}\ntry { ; } catch (A) {}\ntry { new A.A ()  } catch (A) {}\ntry { new (this.Date)().setMinutes (this.RegExp.prototype)  } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { new A.A (A)  } catch (A) {}\ntry { this.A (A)  } catch (A) {}\ntry { new A.A ()  } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { new A().A ()  } catch (A) {}\ntry { new A().A ()  } catch (A) {}\ntry { this.isNaN (this.RegExp.prototype.compile (this.RegExp.prototype))  } catch (A) {}\ntry { ; } catch (A) {}\ntry { A.A.A (A)  } catch (A) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1083.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { ; } catch (A) {}\ntry { new (this.String)().A.A.A (A)  } catch (A) {}\ntry { ; } catch (A) {}\ntry { new (this.RegExp)().A ()  } catch (A) {}\ntry { A.A.A ()  } catch (A) {}\ntry {  } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { ; } catch (A) {}\ntry { new A.A ()  } catch (A) {}\ntry { new (this.Date)().setMinutes (this.RegExp.prototype)  } catch (A) {}\ntry { this.A (A)  } catch (A) {}\ntry { new A.A ()  } catch (A) {}\ntry { this.isNaN (this.RegExp.prototype.compile (this.RegExp.prototype))  } catch (A) {}\ntry { ; } catch (A) {}\ntry { A.A.A(A)  } catch (A) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-112.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ndelete Function.prototype.toString;\nassert (Math.cos + 1 === '[object Function]1');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-113.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nv_1 = [];\nv_1 * v_1[v_1 % v_1];\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-114.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nv_1 = 1;\nv_1[1] = 1;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-115.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar v_1 = [,];\nObject.defineProperty(v_1, \"0\", {\n    set: function() {},\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-117.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[print(typeof v_1)];\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-121.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  function f_1() {\n    v_1 + v_1;\n  }\n\n  f_1(new f_1);\n\n  assert (false);\n} catch (e) {\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-122.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  print({toString: function() { throw new TypeError(\"foo\"); }}, []);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n  assert (e.message === \"foo\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-123.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar v_1 = (1 + (1 + (1 +\n    (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 +\n    (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 +\n    (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 +\n    1\n    )) )) )) )) )) )) )) )) )) ))\n    )) )) )) )) )) )) )) )) )) ))\n    )) )) )) )) )) )) )) )) )) ))\n    )) );\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-128.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ndo {\n    try {\n    } finally {\n        break;\n    }\n} while (false);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1282.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar counter = 0;\n\n({ get \"0\"() { counter += 1; } })[0];\n({ get 0() { counter += 2; } })[0];\n({ get 0.0() { counter += 3; } })[0];\n({ get 0.() { counter += 4; } })[0];\n({ get 1.() { counter += 5; } })[1];\n({ get 5.2322341234123() { counter += 6; } })[5.2322341234123];\n\nassert (counter == 21);\n\n({ set \"0\"(q) { counter -= 1; } })[0] = \"dummy\";\n({ set 0(q) { counter -= 2; } })[0] = \"dummy\";\n({ set 0.0(q) { counter -= 3; } })[0] = \"dummy\";\n({ set 0.(q) { counter -= 4; } })[0] = \"dummy\";\n({ set 1.(q) { counter -= 5; } })[1] = \"dummy\";\n({ set 5.2322341234123(q) { counter -= 6; } })[5.2322341234123] = \"dummy\";\n\nassert (counter == 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1284.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar count = 0;\n[].length = { valueOf: function() { count++; return 1; } };\nassert(count == 2);\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1286.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar builtinEval = eval;\nvar eval = builtinEval.bind(undefined, \"context\");\n\nvar context = \"global\";\nfunction checkIfDirectEval() {\n  var context = \"function\";\n  return (eval() == \"function\");\n}\n\nassert (!checkIfDirectEval());\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-129.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    eval(\"do { \\\n        return null; \\\n        } while (false);\");\n    assert (false);\n} catch (e) {\n    assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1292.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function nonStrictFuncExpr() {\n  assert(typeof nonStrictFuncExpr == \"function\");\n  nonStrictFuncExpr = 123;\n  assert(typeof nonStrictFuncExpr == \"function\");\n})();\n\n(function strictFuncExpr() {\n  \"use strict\";\n  assert(typeof strictFuncExpr == \"function\");\n  try {\n    strictFuncExpr = 123;\n    assert(false);\n  } catch (e) {\n    assert(e instanceof TypeError);\n  }\n  assert(typeof strictFuncExpr == \"function\");\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-130.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nv_1 = Math.floor('\\u3d52');\nv_1 = Math.floor([]);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1300.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [ [0] ];\nvar obj = { prop : \"\" };\nvar i = 0;\nvar count = 0;\n\n(function () {\n      for (array[0][i] in obj)\n          count++;\n})();\n\nassert(array[0][0] == \"prop\");\nassert(count == 1);\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1309.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar errorMessage = \"toStringThrows\"\n\nvar toStringThrows = {\n  toString : function() {\n    throw new Error(errorMessage);\n  }\n}\n\ntry {\n  var obj = {};\n  obj[toStringThrows] = 3;\n  assert(false);\n} catch (e) {\n  assert(e.message == errorMessage);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-132.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Test raised by fuzzer\nv_0 = [,];\nv_1 = [,];\nv_2 = Object.defineProperties([,], { '0': {  get: function() { } } });\n\n// Test change from data to accessor type\nvar a = { x:2 };\nObject.defineProperty(a, \"x\", {\n      enumerable: true,\n      configurable: true,\n      get: function() { return 0; }\n});\n\n// Test change from accessor to data type\nvar obj = {test: 2};\n\nObject.defineProperty(obj, \"test\", {\n      enumerable: true,\n      configurable: true,\n      get: function() { return 0; }\n});\n\nObject.defineProperty(obj, \"x\", {\n      enumerable: true,\n      configurable: true,\n      value: -2\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1386.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor (var y = 1950; y < 2050; y++) {\n  for (var m = 0; m < 12; m++) {\n    var last_date = new Date(y, m, 1).getDay ();\n    assert (!isNaN (last_date));\n    for (var d = 1; d < 32; d++) {\n      assert (last_date == new Date(y, m, d).getDay ());\n      last_date = (last_date + 1) % 7;\n    }\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1389.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction x(){}\n\n\"a0\",\"a1\",\"a2\",\"a3\",\"a4\",\"a5\",\"a6\",\"a7\",\"a8\",\"a9\",\"a10\",\"a11\",\"a12\",\"a13\",\"a14\",\n\"a15\",\"a16\",\"a17\",\"a18\",\"a19\",\"a20\",\"a21\",\"a22\",\"a23\",\"a24\",\"a25\",\"a26\",\"a27\",\n\"a28\",\"a29\",\"a30\",\"a31\",\"a32\",\"a33\",\"a34\",\"a35\",\"a36\",\"a37\",\"a38\",\"a39\",\"a40\",\n\"a41\",\"a42\",\"a43\",\"a44\",\"a45\",\"a46\",\"a47\",\"a48\",\"a49\",\"a50\",\"a51\",\"a52\",\"a53\",\n\"a54\",\"a55\",\"a56\",\"a57\",\"a58\",\"a59\",\"a60\",\"a61\",\"a62\",\"a63\",\"a64\",\"a65\",\"a66\",\n\"a67\",\"a68\",\"a69\",\"a70\",\"a71\",\"a72\",\"a73\",\"a74\",\"a75\",\"a76\",\"a77\",\"a78\",\"a79\",\n\"a80\",\"a81\",\"a82\",\"a83\",\"a84\",\"a85\",\"a86\",\"a87\",\"a88\",\"a89\",\"a90\",\"a91\",\"a92\",\n\"a93\",\"a94\",\"a95\",\"a96\",\"a97\",\"a98\",\"a99\",\"a100\",\"a101\",\"a102\",\"a103\",\"a104\",\n\"a105\",\"a106\",\"a107\",\"a108\",\"a109\",\"a110\",\"a111\",\"a112\",\"a113\",\"a114\",\"a115\",\n\"a116\",\"a117\",\"a118\",\"a119\",\"a120\",\"a121\",\"a122\",\"a123\",\"a124\",\"a125\",\"a126\",\n\"a127\",\"a128\",\"a129\",\"a130\",\"a131\",\"a132\",\"a133\",\"a134\",\"a135\",\"a136\",\"a137\",\n\"a138\",\"a139\",\"a140\",\"a141\",\"a142\",\"a143\",\"a144\",\"a145\",\"a146\",\"a147\",\"a148\",\n\"a149\",\"a150\",\"a151\",\"a152\",\"a153\",\"a154\",\"a155\",\"a156\",\"a157\",\"a158\",\"a159\",\n\"a160\",\"a161\",\"a162\",\"a163\",\"a164\",\"a165\",\"a166\",\"a167\",\"a168\",\"a169\",\"a170\",\n\"a171\",\"a172\",\"a173\",\"a174\",\"a175\",\"a176\",\"a177\",\"a178\",\"a179\",\"a180\",\"a181\",\n\"a182\",\"a183\",\"a184\",\"a185\",\"a186\",\"a187\",\"a188\",\"a189\",\"a190\",\"a191\",\"a192\",\n\"a193\",\"a194\",\"a195\",\"a196\",\"a197\",\"a198\",\"a199\",\"a200\",\"a201\",\"a202\",\"a203\",\n\"a204\",\"a205\",\"a206\",\"a207\",\"a208\",\"a209\",\"a210\",\"a211\",\"a212\",\"a213\",\"a214\",\n\"a215\",\"a216\",\"a217\",\"a218\",\"a219\",\"a220\",\"a221\",\"a222\",\"a223\",\"a224\",\"a225\",\n\"a226\",\"a227\",\"a228\",\"a229\",\"a230\",\"a231\",\"a232\",\"a233\",\"a234\",\"a235\",\"a236\",\n\"a237\",\"a238\",\"a239\",\"a240\",\"a241\",\"a242\",\"a243\",\"a244\",\"a245\",\"a246\",\"a247\",\n\"a248\",\"a249\",\"a250\",\"a251\",\"a252\",\"a253\",\"a254\",\"a255\",\"a256\",\"a257\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1533.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = [];\n\nfor (var i = 0; i < 200; ++i)\n  a[i] = 5;\n\nfor (var i = 0; i < 200; ++i)\n  a[i] = a[i] + 5;\n\nfor (var i = 0; i < 200; ++i)\n  delete a[i]\n\na[0] = 5\n\na = [];\n\nfor (var i = 0; i < 200; ++i)\n  a[i] = 5;\n\na.length = 0\n\nfor (var i = 0; i < 200; ++i)\n  a[i] = 5;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1547.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(new Date(Number.MAX_VALUE, Number.MAX_VALUE).toString() == \"Invalid Date\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1552.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar o = []\n\nfunction add(i)\n{\n  delete o[i & 31];\n  o[i] = 0;\n}\n\nfor (var i = 0; i < 130; i++)\n{\n  add(i)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1555.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar src = \"var a = 0; while(a) { switch(a) {\";\n/* The += operation has a longer opcode. */\nfor (var i = 0; i < 3300; i++)\n    src += \"case \" + i + \": a += a += a; break; \";\nsrc += \"} }\";\n\neval(src);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1556.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Maximum 256 paramaters are allowed. */\nvar src = \"(function (\";\nfor (var i = 0; i < 254; i++)\n    src += \"a\" + i + \", \";\nsrc += \"b) { var c = 1; })()\";\n\neval(src);\n\n/* More than 256 parameters is a syntax error. */\nvar src = \"(function (\";\nfor (var i = 0; i < 255; i++)\n    src += \"a\" + i + \", \";\nsrc += \"b) { })()\";\n\ntry {\n  eval(src);\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\n/* Maximum 256 local variables are stored in registers.\n * The rest is stored in the lexical environment. */\nvar src = \"(function () {\";\nfor (var i = 0; i < 400; i++)\n    src += \"var a\" + i + \" = 5; \";\nsrc += \"})()\";\n\neval(src);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-156.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction dec(x) { return x - 1 };\nfor (var i = 5; i > 0; i = dec(i)) {}\nfor (var i = 11; i = dec (i); i--) {}\nfor (var i = dec (12); i > 0; i--) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1621.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar eval = eval.bind()\ngc();\neval(\"1\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1636.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(Number(\"Infinity\") == Infinity);\nassert(isNaN(Number(\"infinity\")));\nassert(isNaN(Number(\"InfinitY\")));\nassert(isNaN(Number(\"e\")));\nassert(isNaN(Number(\"e3\")));\nassert(Number(\"1e2\") == 100);\nassert(isNaN(Number(\".\")));\nassert(isNaN(Number(\".e2\")));\nassert(Number(\"0.\") == 0);\nassert(Number(\".0\") == 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-164.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar v_1 = { };\n\nfor (i = 0; i < 1; i++) {\n  with ( v_1 ) {\n    with ( v_1 ) { }\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1657.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Negative out-of-range years should NOT cause hangs. */\nnew Date(-565224, 1);\nDate.UTC(-565224, 1);\nnew Date().setFullYear(-565224);\nnew Date().setUTCFullYear(-565224);\nnew Date().setYear(-565224);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1821.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n'\\\n'\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1829.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfor ({ get 10() {} } ; ; ) break;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1830.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/[\\꧿]ౘ/\n\nvar r = new RegExp (\"[\\꧿]ౘ\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1855.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert ((1 / 0*(-1)) == -Infinity);\nassert ((1 / 0*1) == Infinity);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1917.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert('foobar'.replace(/(ob)/g, '$0') == 'fo$0ar')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1934.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar devNum = 38;\nvar devQueue = [];\nfor (var i = 0; i < devNum; i++)\n{\n    devQueue.push(i);\n}\n\nfor (var j = 0; j < devNum; j++)\n{\n    devQueue.shift();\n    devQueue.unshift(1);\n    devQueue.shift();\n    assert(j + devQueue.length + 1  == devNum)\n}\n\nassert(devQueue.length == 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1947.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction a () {\n function b () {\n   // Can be any unicode escape character, ie: A\n   \\u0041\n }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-195.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction Error() { }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1970.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  var a = Function.prototype.bind({0:0},30000000000);\n  a();\n}\ncatch (e) {\n  assert(false);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1972.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  [].length = {\n    valueOf: function() {\n      return Array.prototype.push (1), Object.freeze (Array.prototype);\n    }\n  }\n  assert (false);\n}\ncatch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1973.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nprint (777E7777777777 == Infinity)\nprint (-777E7777777777 == -Infinity)\nprint (777E-7777777777 == 0)\nprint (-777E-7777777777 == -0)\n\nprint (100E307 == Infinity)\nprint (10E307 == 1E308)\nprint (10E308 == Infinity)\nprint (1E308 == 1E308)\nprint (0.1E309 == 1E308)\nprint (0.1E310 == Infinity)\n\nprint (-100E307 == -Infinity)\nprint (-10E307 == -1E308)\nprint (-10E308 == -Infinity)\nprint (-1E308 == -1E308)\nprint (-0.1E309 == -1E308)\nprint (-0.1E310 == -Infinity)\n\nprint (5E-325 == 0)\nprint (50E-325 == 5E-324)\nprint (0.5E-324 == 0)\nprint (5E-324 == 5E-324)\nprint (0.05E-323 == 0)\nprint (0.5E-323 == 5E-324)\n\nprint (-5E-325 == -0)\nprint (-50E-325 == -5E-324)\nprint (-0.5E-324 == -0)\nprint (-5E-324 == -5E-324)\nprint (-0.05E-323 == -0)\nprint (-0.5E-323 == -5E-324)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1974.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((39000000000000700).toString(2) == \"10001010100011100100101100011010001111011000001011000000\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1990.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(unescape(\"%f׊nd\") === \"%f׊nd\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-1993.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(parseFloat(Number.MAX_VALUE).toFixed(5) == parseFloat(Number.MAX_VALUE).toString());\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2008.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n'\\\n'+'056';\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2073.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nDate.parse(\"2015-01-01T01߄'a': 1}:01F\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2105.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* Adding property to a frozen object */\nvar a = {one: \"test\"};\na.two = 3;\nObject.freeze(a);\na.three = 7;\nassert(a.three === undefined);\n\n/* Adding properties to frozen global object */\nObject.freeze(this);\nassert(eval ('function b() {};') === undefined);\nassert(eval('var test_var = 3') === undefined);\n\n/* Check strict mode TypeError */\nfunction fail() {\n  'use strict';\n  a.one = 'test'; // throws a TypeError\n  delete a.two; // throws a TypeError\n  a.three = 'test2'; // throws a TypeError\n}\n\ntry {\n  fail();\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\nfunction fail_two() {\n  'use strict';\n  this.a = 'test';\n}\n\ntry {\n  fail_two();\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n/* Check properties of a */\nassert(Object.keys(a) == \"one,two\");\n/* Check properties of global object */\nassert(Object.keys(this) == \"assert,gc,print,resourceName,createRealm,a,fail,fail_two\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2108.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((8e-9).toFixed(20) == \"0.00000000800000000000\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-212.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nwith(0xB276)\n  eval(\"foo = true;\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2178.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Testcase from bugreport (issue: #2178).\nbad = \"'detailForm','detailForm:j_id166', []);\\\" ><img alt=\\\"Export to XLS format\\\" />\\n</a>\"\ngood = \"'detailForm','detailForm:j_id166');\\\" ><img alt=\\\"Export to XLS format\\\" />\\n</a>\"\nr = /'(detailForm:j_id\\d+)'[^>]+>[^>]+Export to XLS format/;\nassert(!!good.match(r) && !!bad.match(r));\n\n// Similar testcases.\nvar regexPatternCharacters = ['^', '$', '\\\\', '.', '*', '+', '?', '(', ')', '[', ']', '{', '}'];\nregexPatternCharacters.forEach(function (str) {\n  assert(str.match(/[^>]/) == str);\n})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2182.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction test(len)\n{\n  function applyTest() { }\n  try {\n    applyTest.apply(null, { length : len });\n    assert(false);\n  } catch (e) {\n    assert(e instanceof RangeError);\n  }\n}\n\ntest(65536);\ntest(0x40000001);\ntest(0xffffffff);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2190.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  /(?:(?=x)){10000}xyz/.exec('xyz');\n  assert(false);\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2198.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar id_0 = Object.prototype.toString ; \nObject.prototype.toString = function ( ) { return \"SHIFTED\" } ; \nRegExp ( '#1: __str = new String({}); typeof __str === \"object\". Actual: typeof __str ===');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2200.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[\n  // This input caused a buffer overrun,\n  // see https://github.com/jerryscript-project/jerryscript/issues/2200\n  '\"\\\\ubad',\n  // Test similar malformations as well:\n  '\"\\\\ubad\"',\n  '\"\\\\u',\n].forEach(function(badJson) {\n  try {\n    JSON.parse(badJson);\n  } catch (e) {\n  }\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2204.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  new RegExp(\"\\{{91406,456}\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof SyntaxError)\n}\n\ntry {\n  new RegExp(\"\\{91406,456}\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof SyntaxError)\n}\n\ntry {\n  new RegExp(\"\\({91406,456}\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof SyntaxError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2230.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\ntry {\n  ((new RegExp(\"[\\\\u0\")).exec(\"u\"));\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  ((new RegExp(\"[\\\\x0\")).exec(\"x\"));\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2237.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\ntry {\n  (new RegExp(\"[\\\\u0020\")).exec(\"u\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n\ntry {\n  (new RegExp(\"[\\\\x20\")).exec(\"x\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2258-2963.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  JSON.stringify(10, Array);\n  assert(false);\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2272.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nNumber.isInteger = Number.isInteger || function (value) {\n  return typeof value === 'number' &&\n    isFinite (value) &&\n    Math.floor (value) === value;\n};\n\nvar now = Date.now ();\n\nassert (Number.isInteger (now));\n\nvar date = new Date(now); // Should not throw an error\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2384.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  \"[]{83}\".match(\"(?=){12,8}\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2386.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nMath in Number\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2398.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This issue was triggered when show opcodes was enabled at compile\n// time but not enabled in runtime. A memory leak was created.\n\nfunction f()\n{\n  var \\u0042 = true;\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2400.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Wrong byte codes were dumped for this function when show opcodes had been enabled\n\nfunction abc(a,b) {\n  var c = 6;\n  return arguments[0] + b + c;\n}\n\nabc(1, 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2409.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Must be a success.\neval('g\\\\u0065t: break get')\n\ntry {\n  // Must be a fail.\n  eval('({ g\\\\u0065t a() {} })')\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\n// Must be a success.\neval('({ g\\\\u0065t: 5 })')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2448.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar x = new RegExp('(/*()+?b+?b+?|.|)+')\n\ntry {\n  x.exec('?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????');\n  assert(false);\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-245.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  v_0 = new RegExp(\"N(?![^6](?:.)|(?!C[^k-o]*|p){0,}|H)|\\\\\\\\xDF\\\\db{0,}|i\\\\\\\\0?)\");\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2451.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar src = \"var a = 0; while(a) { switch(a) {\" ;\nfor (var i = 0; i < 4000; i++)\n    src += \"-Infinity\" + i + \"\\u00a0\\u00a01.2e3\";\nsrc += \"\\udc00%f0%90%80%80\\udc00\";\nprint(src);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2452.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar src = \"\";\nfor (var i = 0; i < 4000; i++)\n  src += \"\\udc00%f0%90%80%80\\udc00\";\nsrc += \"} }\";\nprint(src);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2453.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar src = \"\";\nfor (var i = 0; i < 4000; i++)\n  src += 4 + i + \": a += a += a; break; \";\n  src += \"\\𝔺\\\n\\ \";\nprint(src);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2478.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction fn(x) {\n  switch (x) {\n    case 1: { return }\n  }\n}\n\nnew Function(\"switch(1) { default: { return }}\")\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2494.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperty(Object.prototype, \"\", {});\nassert(JSON.stringify() === undefined)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-255.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nv_0 = /(?!(?!l{666,}))/;\n\ntry\n{\n  v_0.exec(\"llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll\");\n}\ncatch (e)\n{\n  assert (e instanceof RangeError);\n  assert (e.message === \"RegExp executor steps limit is exceeded.\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-257.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r;\nr = new RegExp(\"]\");\nassert (r.exec(\"]\") == \"]\");\n\nr = new RegExp(\"}\");\nassert (r.exec(\"}\") == \"}\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-260.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  isNaN(__proto__);\n} catch (e) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-261.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  SyntaxError(RegExp());\n  isFinite(foo);\n} catch (e) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2614.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\".5.\");\n  assert(false);\n} catch(e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-262.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    RegExp(\"\");\n    eval(encodeURI(isNaN(__proto__)));\n} catch (e) { }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-263.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    Boolean(decodeURI(decodeURIComponent(Number())));\n} catch(err) {}\n try {\n    ReferenceError(isNaN(__proto__));\n } catch(err) {}\n try {\n    isNaN(__proto__);\n } catch(err) {}\n try {\n    load();\n } catch(err) {}\n try {\n    RegExp(\"\\n\");\n } catch(err) {}\n try {} catch(err) {}\n try {\n    ReferenceError(performance.__proto__.isPrototypeOf(arguments.map(os)));\n } catch(err) {}\n try {\n    Float64Array(performance,WeakSet(),Infinity.valueOf());\n } catch(err) {}\n try {\n    arguments.push(Int8Array(Boolean(isFinite(quit())),ArrayBuffer(os.system()),Array(read())));\n } catch(err) {}\n try {\n    Boolean(encodeURI(DataView(ArrayBuffer(os),parseFloat(Set()),URIError(Object(Int8Array(Function(parseInt(write(),RangeError(__proto__.valueOf()))),Int16Array(Map(),__proto__.valueOf(),readbuffer()),Math))))));\n } catch(err) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-264.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    Boolean(decodeURI(decodeURIComponent(Number())));\n } catch(err) {}\n try {\n    ReferenceError(isNaN(__proto__));\n } catch(err) {}\n try {\n    isNaN(__proto__);\n } catch(err) {}\n try {\n    load();\n } catch(err) {}\n try {\n    RegExp(\"\\n\");\n } catch(err) {}\n try {\n    Set();\n } catch(err) {}\n try {\n    ReferenceError(performance.__proto__.isPrototypeOf(arguments.map(os)));\n } catch(err) {}\n try {\n    Float64Array(performance,WeakSet(),Infinity.valueOf());\n } catch(err) {}\n try {\n    arguments.push(Int8Array(Boolean(isFinite(quit())),ArrayBuffer(os.system()),Array(read())));\n } catch(err) {}\n try {\n    Boolean(encodeURI(DataView(ArrayBuffer(os),parseFloat(Set()),URIError(Object(Int8Array(Function(parseInt(write(),RangeError(__proto__.valueOf()))),Int16Array(Map(),__proto__.valueOf(),readbuffer()),Math))))));\n } catch(err) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-265.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nparseInt(NaN,RegExp(\"54\"));\n\ntry {\n    parseInt(ArrayBuffer());\n} catch(err) {}\n\ntry {\n    isNaN(__proto__);\n} catch(err) {}\n\ntry {\n    RangeError(parseInt(Infinity,readbuffer()));\n} catch (err) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2652-2653.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nObject.defineProperty (Object.prototype, \"\", { 'set' : function () { throw ReferenceError (\"\") } });\nassert (JSON.stringify () === undefined);\nprint (JSON.stringify ());\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2656.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = { \"arguments\": \"foo\" }\n\nfunction testcase ()\n{\n  return obj.hasOwnProperty (\"arguments\");\n}\n\nassert (testcase () === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-266.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    String(\"test\");\n    isNaN(__proto__);\n} catch(err) {}\n\ntry {\n    SyntaxError(RegExp(\"[/]\"));\n} catch(err) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2660.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  new RegExp(\"\\{{91[06,456}\");\n  assert (false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-267.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    RegExp(\"\\u2029\");\n} catch(err) {}\n\ntry {\n    URIError(isNaN(__proto__));\n} catch(err) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2699.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f(a) {\n  function a() {\n    return 5;\n  }\n\n  assert (typeof a === \"function\");\n  assert (a () === 5);\n  assert (arguments[0] () === 5);\n}\n\nf (6);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-274.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n'�'\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2755.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  var v0 = Object.freeze (RegExp ($, \"g\")).exec ();\n  var $ = v0.every (Function (\"a1,a2,a3\",  \"this.shifted=a3+a2+a1.length;\"), v0.hasOwnProperty);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-276.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* 256 \"a\" in the array */\n\ntry {\n      [\"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n        \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\",\n          \"a\", \"a\", \"a\", \"a\"];\n} catch(e) { }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-279.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (isNaN (parseInt (RegExp (\"\\u2029\"))));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-280.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_reference_error (s) {\n  try {\n    eval (s);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof ReferenceError);\n  }\n}\n\ncheck_reference_error ('v_0 = {0: delete 3. instanceof foo() ^ {} }');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2802.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(2e23 == 1.9999999999999998e+23);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2805.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arrayBindNoArgs = Array.bind (this);\nvar bindWithArgs = arrayBindNoArgs.bind (this, 1, 2);\nvar array = new bindWithArgs ();\nassert (array instanceof Array);\nassert (array[0] === 1);\nassert (array[1] === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-281.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nwhile(false) foo\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-285.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nNaN == RegExp;\nNaN == Date;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2905.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar func = function () {\n  foo.prototype = new Array(1, 2, 3);\n  function foo() {}\n  var f = new foo();\n  f.length = f;\n  try {\n    var a = \"Using f will give an error: \" + f;\n    assert(false);\n  } catch (e) {\n    assert(e instanceof RangeError);\n  }\n};\n\nfunc();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2914.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar func = function (number) {\n  \"use strict\";\n  number.foo = \"\";\n};\n\nvar func2 = function (number) {\n  \"use strict\";\n  number.bar = \"\";\n};\n\ntry {\n  func(-334918463);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\ntry {\n  Object.defineProperty(Number.prototype, \"foo\", { get : function() { throw ReferenceError(\"foo\"); },\n                                                   set : function(a) { throw ReferenceError(\"bar\"); },\n                                                 });\n  func(-334918463);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n  assert(e.message === \"bar\");\n}\n\nvar setter_called = false;\nObject.defineProperty(Number.prototype, \"bar\", { get : function() { assert(false) },\n                                                 set : function(a) { setter_called = true; },\n                                               });\nfunc2(-334918463);\nassert(setter_called === true);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2936.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar 测试 = \"您好\";\nassert(测试 === \"您好\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-2937.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar c = 0;\nvar p1 = this[c++];\nassert (p1 === undefined);\nassert (c === 1);\n\nvar p2 = this[c--];\nassert (p2 === undefined);\nassert (c === 0);\n\nvar p3 = this[++c];\nassert (p3 === undefined);\nassert (c === 1);\n\nvar p4 = this[--c];\nassert (p4 === undefined);\nassert (c === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3039.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = [];\nfor (var i = 0; i < 200; ++i) {\n  a[ i ] = 0;\n}\n\na.length = 1;\nfor (var i = 0; i < 5; ++i) {\n  a[ i ] = 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3048.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nthis[delete $];\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3055.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\nvar src = '(function () {'\nfor (var i = 0; i < 550; i++) { src += 'var a' + i + ' = 5; ' }\nsrc += '})()'\neval(src)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3060.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arr = [];\narr.length = 10;\narr.splice(0, 17);\narr.length = 4294967294;\narr.splice(1, 1, 1);\n\nassert(arr.length === 4294967294);\nassert(arr[0] === undefined);\nassert(arr[1] === 1);\nassert(arr[2] === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3068.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arr = [0, Infinity];\nObject.defineProperties(arr, {\n    length: {\n    value: 1,\n    }\n});\n\nassert(arr.length === 1);\nassert(arr[0] === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3072.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar arr = [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ];\narr [4294967294] = 0\nassert (arr.length === 4294967295);\nassert (arr[4294967294] === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3082.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {\n  a: \"str\",\n  b: function() {},\n  c: true\n}\n\nassert (JSON.stringify (obj) === \"{\\\"a\\\":\\\"str\\\",\\\"c\\\":true}\");\nassert (JSON.stringify (obj, null, 2) === \"{\\n  \\\"a\\\": \\\"str\\\",\\n  \\\"c\\\": true\\n}\");\n\nvar obj = {\n  f: function() {}\n}\n\nassert (JSON.stringify (obj) === \"{}\");\nassert (JSON.stringify (obj, null, 2) === \"{}\");\n\nvar obj = {\n  f: function() {},\n  a: null\n}\n\nassert (JSON.stringify (obj) === \"{\\\"a\\\":null}\");\nassert (JSON.stringify (obj, null, 2) === \"{\\n  \\\"a\\\": null\\n}\");\n\nvar obj = {\n  a: false,\n  f: function() {}\n}\n\nassert (JSON.stringify (obj) === \"{\\\"a\\\":false}\");\nassert (JSON.stringify (obj, null, 2) === \"{\\n  \\\"a\\\": false\\n}\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3114.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction $() {\n  var id_0 = $.SIMD.id_1;\n  var id_1 = id_2.check;\n  var id_3 = id_4;\n  var id_5 = id_6.id_7;\n  var id_7 = id_8.id_9;\n  var id_9 = id_10;\n  var id_11 = id_12;\n  var id_13 = id_14;\n  var id_15 = id_16;\n  var id_17 = id_18;\n  var id_19 = id_20;\n  var id_21 = id_22;\n  var id_23 = id_24;\n  var id_25 = id_26;\n  var id_27 = id_28;\n  var id_29 = id_30.and;\n  var id_31 = id_32.or;\n  var id_33 = id_34.xor;\n  var id_35 = id_36.not;\n  var id_37 = id_38;\n  var id_39 = id_40;\n  var id_41 = id_42.id_43;\n  var id_43 = id_44.id_45;\n  var id_45 = id_46.store\n  var id_47 = id_48.id_49;\n  var id_49 = id_50.id_51;\n  var id_56 = id_57.splat;\n  var id_58 = id_59;\n  var id_60 = id_61.id_62;\n  var id_62 = id_63.abs;\n  var id_64 = id_65.neg;\n  var id_66 = id_67.add;\n  var id_68 = id_69.sub;\n  var id_70 = id_71.mul;\n  var id_72 = id_73.div;\n  var id_74 = id_75.min;\n  var id_76 = id_77.max;\n  var id_78 = id_79.sqrt;\n  var id_80 = id_81.id_82;\n  var id_82 = id_83.shuffle;\n  var id_84 = id_85.lessThan;\n  var id_86 = id_87.lessThanOrEqual;\n  var id_88 = id_89.equal;\n  var id_90 = id_91.notEqual;\n  var id_92 = id_93.greaterThan;\n  var id_94 = id_95.greaterThanOrEqual;\n  var id_96 = id_97.select;\n  var id_98 = id_99.load;\n  var id_100 = id_101.id_102;\n  var id_102 = id_103.id_104;\n  var $ = id_105.id_106;\n  var id_106 = id_107;\n  var id_108 = id_109.id_110;\n  var id_110 = id_111;\n  var id_112 = id_113;\n  var fround = stdlib.Math.fround;\n  var id_114 = id_115(imports.asmModule);\n  var id_116 = id_117;\n  var id_118 = id_119(5033.2, 3401.0, 665.34, 32234.1);\n  var id_120 = id_121(1065353216, 1073741824, 1077936128, 1082130432);\n  var gval = 1234;\n  var id_126 = $.id_127;\n  var id_127 = $.$;\n\n  function id_165() {\n    value = id_166;\n    id_167(id_168)\n  }\n\n  function id_169() {\n    return id_170(id_171)\n  }\n\n  function id_172() {\n    $ = id_173;\n    id_174(id_175)\n  }\n\n  function id_176() {\n    return id_177(id_178)\n  }\n\n  function id_179() {\n    $ = id_180;\n    id_181(id_182)\n  }\n\n  function id_183() {\n    return id_184(id_185)\n  }\n\n  function id_186() {\n    $ = id_187;\n    id_188(id_189)\n  }\n\n  function id_190() {}\n\n  function id_193() {\n    $ = id_194;\n    id_195(id_196)\n  }\n\n  function $() {}\n\n  function id_200() {\n    id_201(id_202, id_203);\n    return id_204(id_205)\n  }\n\n  function id_206() {\n    var $ = id_208;\n    while ($) {\n      id_209 = id_210;\n      for (;;) {\n        switch ($) {\n          case $:\n            id_211(id_212, id_213);\n          case $:\n            id_214(id_215, id_216);\n          case $:\n            id_217(id_218, id_219);\n          case $:\n            id_220(id_221, id_222)\n        }\n        id_223 = id_224(id_225, id_226)\n      }\n\n    }\n\n    return id_227(id_228)\n  }\n\n  function id_229() {\n    var $ = id_231;\n    for (;;) {\n      id_232 = id_233;\n      for (;;) {\n        switch ($) {\n          case $:\n            id_234(id_235, id_236);\n          case $:\n            id_237(id_238, id_239);\n          case $:\n            id_240(id_241, id_242);\n          case $:\n            id_243(id_244, id_245)\n        }\n        id_246 = id_247(id_248, id_249)\n      }\n\n    }\n\n    return id_250(id_251)\n  }\n\n  function id_252() {\n    var $ = id_254;\n    do {\n      id_255 = id_256;\n      for (;;) {\n        switch ($) {\n          case $:\n            id_257(id_258, id_259);\n          case $:\n            id_260(id_261, id_262);\n          case $:\n            id_263(id_264, id_265);\n          case $:\n            id_266(id_267, id_268)\n        }\n        id_269 = id_270(id_271, id_272)\n      }\n\n    }\n    while ($) return id_273(id_274)\n  }\n\n  function id_275() {\n    var $ = id_277;\n    while ($) {\n      id_278 = id_279;\n      for (;;) {\n        id_280(id_281, id_282);\n        id_283 = id_284(id_285, id_286)\n      }\n\n    }\n\n    return id_287(id_288)\n  }\n\n  function id_289() {\n    var $ = id_291;\n    while ($) {\n      id_292 = id_293;\n      for (;;) {\n        id_294(id_295, id_296);\n        id_297 = id_298(id_299, id_300)\n      }\n\n    }\n\n    return id_301(id_302)\n  }\n\n  function id_303() {\n    var $ = id_305;\n    while ((loopIndex) < (loopCOUNT)) {\n      id_306 = id_307;\n      for (;;) {\n        id_308(id_309, id_310);\n        id_311 = id_312(id_313, id_314)\n      }\n\n    }\n\n    return id_315(id_316)\n  }\n\n  function id_317() {\n    var $ = id_319;\n    while ($) {\n      id_320 = id_321;\n      for (;;) {\n        id_322(id_323, id_324);\n        id_325 = id_326(id_327, id_328)\n      }\n\n    }\n\n    return id_329(id_330)\n  }\n\n  function id_331() {\n    var $ = id_333;\n    while ($) {\n      id_334 = id_335;\n      for (;;) {\n        id_336(id_337, id_338);\n        id_339 = id_340(id_341, id_342)\n      }\n\n    }\n\n    return id_343(id_344)\n  }\n\n  function id_345() {\n    var $ = id_347;\n    while ($) {\n      id_348 = id_349;\n      for (;;) {\n        id_350(id_351, id_352);\n        id_353 = id_354(id_355, id_356)\n      }\n\n    }\n\n    return id_357(id_358)\n  }\n\n  function id_359() {\n    var $ = id_360;\n    while ($) {\n      for (;;) {\n        switch (functionPicker) {\n          case $:\n            v = id_361(id_362);\n          case $:\n            $ = id_363(id_364);\n          case $:\n            $ = id_365(id_366);\n          case $:\n            $ = id_367(id_368, idx)\n        }\n      }\n\n    }\n\n  }\n\n  function id_369() {\n    var $ = id_370;\n    for (;;) {\n      for (;;) {\n        switch ($) {\n          case $:\n            $ = id_371(id_372);\n          case $:\n            $ = id_373(id_374);\n          case $:\n            $ = id_375(id_376);\n          case $:\n            $ = id_377(id_378)\n        }\n      }\n\n    }\n\n  }\n\n  function id_379() {\n    var $ = id_380;\n    do {\n      for (;;) {\n        switch ($) {\n          case $:\n            $ = id_381(id_382);\n          case $:\n            $ = id_383(id_384);\n          case $:\n            $ = id_385(id_386);\n          case $:\n            $ = id_387(id_388)\n        }\n      }\n\n    }\n    while ($)\n  }\n\n  function id_389() {\n    var $ = id_390;\n    while ($) {\n      for (;;) {\n        $ = id_391(id_392)\n      }\n\n    }\n\n  }\n\n  function id_393() {\n    var $ = id_394;\n    end = (((length)))\n  }\n\n  function id_397() {\n    var $ = id_398;\n    while ($) {\n      for (;;) {\n        $ = id_399(id_400)\n      }\n\n    }\n\n  }\n\n  function id_401() {\n    var $ = id_402;\n    while ($) {\n      for (;;) {\n        $ = id_403(id_404)\n      }\n\n    }\n\n  }\n\n  function id_405() {\n    while ($) {\n      for (;;) {\n        $ = id_407(id_408)\n      }\n\n    }\n\n  }\n\n  function id_409() {\n    var $ = id_410;\n    while ($) {\n      for (;;) {\n        $ = id_411(id_412)\n      }\n\n    }\n\n  }\n  return {\n    changeHeap: ch,\n    id_413: id_414,\n    id_415: id_416,\n    id_417: id_418,\n    id_419: id_420,\n    id_421: id_422,\n    id_423: id_424,\n    id_425: id_426,\n    id_427: id_428,\n    id_429: id_430,\n    id_431: id_432,\n    id_433: id_434,\n    id_435: id_436,\n    id_437: id_438,\n    id_439: id_440,\n    id_441: id_442,\n    id_443: id_444,\n    id_445: id_446,\n    id_447: id_448,\n    id_449: id_450,\n    id_451: id_452,\n    id_453: id_454,\n    id_455: id_456,\n    id_457: id_458,\n    id_459: id_460,\n    id_461: id_462,\n    id_463: id_464,\n    id_465: id_466,\n    id_467: id_468,\n    id_469: id_470,\n    id_471: id_472,\n    id_473: id_474,\n    id_475: id_476,\n    id_477: $\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-316.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  v_1 = RegExp.prototype.test;\n  v_1(ReferenceError);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\ntry {\n  v_1 = RegExp.prototype.exec;\n  v_1(ReferenceError);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\ntry {\n  v_1 = RegExp.prototype.toString;\n  v_1(ReferenceError);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3229.js",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar NISLFuzzingFunc = function(e) {\n  Number(0).toString(e);\n};\n\nvar NISLParameter4 = \"Hello Jerry\";\n\ntry {\n  NISLFuzzingFunc(NISLParameter4);\n  assert(false);\n} catch (e) {\n  assert(e instanceof RangeError);\n}\ntry {\n  Number.prototype.toString.call(-Infinity, \"Unicorn invasion\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3271.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction bar(a) {\n  assert(a[0] === 10);\n  a.hasOwnProperty(0);\n  assert(a[0] === 10);\n}\n\nfunction foo(a) {\n  assert(a === 20);\n  a = 10;\n  bar(arguments);\n}\n\nfunction barStrict(a) {\n  \"use strict\"\n  assert(a[0] === 20);\n  a.hasOwnProperty(0);\n  assert(a[0] === 20);\n}\n\nfunction fooStrict(a) {\n  \"use strict\"\n  assert(a === 20);\n  a = 10;\n  barStrict(arguments);\n}\n\nfoo(20);\nfooStrict(20);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3313.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"var\" + \"\\u2029\" + 'g\\\\u0065t: break get' );\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3325.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar text = 'x';\nassert (text.charAt(0) === \"x\");\nassert (text.charAt(-0.1) === \"x\");\nassert (text.charAt(-0.5) === \"x\");\nassert (text.charAt(-0.9) === \"x\");\nassert (text.charAt(0.85) === \"x\");\n\nassert (text.charAt(-0.5) !== \"\");\nassert (text.charAt(0.85) !== \"\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-339.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  eval ('var y = 4e;');\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3397.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar $\n\n$++\n[ ]\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-340.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n'\\0'+'456';\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-341.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  eval ('\\xbf\\x0a\\x0a');\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3467.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(new Function(\"return\")() === undefined);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3477.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction _p(arg1, arg2) {\n  return arg1 ? arg1 : arg2;\n}\n\nvar _ref;\nvar constructor = _p(this, (_ref = Object.getPrototypeOf(function (){})).call({}));\nassert(constructor === this);\n\ntry {\n  _p(this, (_ref += Object.getPrototypeOf(function (){})).call({}));\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3523.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar obj = {\n    sort: Array.prototype.sort,\n    $: 0\n}\nassert(obj.sort() === obj);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3532.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar reached = false;\n\nfunction dConstr () {}\ndConstr.prototype = [, ]\nfor (var $ in new dConstr()) {\n  reached = true;\n}\n\nassert(!reached);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-354.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar data = {\n'1': '', '2': '', '3': '', '4': '', '5': '', '6': '', '7': '', '8': '',\n'9': '', '10': '', '11': '', '12': '', '13': '', '14': '', '15': '', '16': '',\n'17': '', '18': '', '19': '', '20': '', '21': '', '22': '', '23': '', '24': '',\n'25': '', '26': '', '27': '', '28': '', '29': '', '30': '', '31': '', '32': '',\n'33': '', '34': '', '35': '', '36': '', '37': '', '38': '', '39': '', '40': '',\n'41': '', '42': '', '43': '', '44': '', '45': '', '46': '', '47': '', '48': '',\n'49': '', '50': '', '51': '', '52': '', '53': '', '54': '', '55': '', '56': '',\n'57': '', '58': '', '59': '', '60': '', '61': '', '62': '', '63': '', '64': '',\n'65': '', '66': '', '67': '', '68': '', '69': '', '70': '', '71': '', '72': '',\n'73': '', '74': '', '75': '', '76': '', '77': '', '78': '', '79': '', '80': '',\n'81': '', '82': '', '83': '', '84': '', '85': '', '86': '', '87': '', '88': '',\n'89': '', '90': '', '91': '', '92': '', '93': '', '94': '', '95': '', '96': '',\n'97': '', '98': '', '99': '', '100': '', '101': '', '102': '', '103': '', '104': '',\n'105': '', '106': '', '107': '', '108': '', '109': '', '110': '', '111': '', '112': '',\n'113': '', '114': '', '115': '', '116': '', '117': '', '118': '', '119': '', '120': '',\n'121': '', '122': '', '123': '', '124': '', '125': '', '126': '', '127': '', '128': '',\n'129': '', '130': '', '131': '', '132': '', '133': '', '134': '', '135': '', '136': '',\n'137': '', '138': '', '139': '', '140': '', '141': '', '142': '', '143': '', '144': '',\n'145': '', '146': '', '147': '', '148': '', '149': '', '150': '', '151': '', '152': '',\n'153': '', '154': '', '155': '', '156': '', '157': '', '158': '', '159': '', '160': '',\n'161': '', '162': '', '163': '', '164': '', '165': '', '166': '', '167': '', '168': '',\n'169': '', '170': '', '171': '', '172': '', '173': '', '174': '', '175': '', '176': '',\n'177': '', '178': '', '179': '', '180': '', '181': '', '182': '', '183': '', '184': '',\n'185': '', '186': '', '187': '', '188': '', '189': '', '190': '', '191': '', '192': '',\n'193': '', '194': '', '195': '', '196': '', '197': '', '198': '', '199': '', '200': '',\n'201': '', '202': '', '203': '', '204': '', '205': '', '206': '', '207': '', '208': '',\n'209': '', '210': '', '211': '', '212': '', '213': '', '214': '', '215': '', '216': '',\n'217': '', '218': '', '219': '', '220': '', '221': '', '222': '', '223': '', '224': '',\n'225': '', '226': '', '227': '', '228': '', '229': '', '230': '', '231': '', '232': '',\n'233': '', '234': '', '235': '', '236': '', '237': '', '238': '', '239': '', '240': '',\n'241': '', '242': '', '243': '', '244': '', '245': '', '246': '', '247': '', '248': '',\n'249': '', '250': '', '251': '', '252': '', '253': '', '254': '', '255': '',\n'256': '',\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3553.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar src = \"0?0:0+++++0\";\n\ntry {\n  eval (src);\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-359.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f_0(a_0) {\n    \"use strict\";\n    Object.freeze({a: \"foo\"});\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3608.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar src = \"function $() { return $ ? $ : $ * $++() } switch ($) {}\";\n\ntry {\n  eval (src);\n  assert (false);\n} catch (e) {\n  assert (e instanceof SyntaxError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3648.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar func = function () {};\nvar boundFunc = func.bind();\nvar externalFunc = print;\nvar builtinFunc = unescape;\n\n[func, boundFunc, externalFunc, builtinFunc].forEach(function (e) {\n  assert (Array.prototype.sort.call(e) === e);\n})\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3650.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar u = 5;\nassert ([this, u = u - 1].length === 2);\nassert (u === 4);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3711.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction func() {}\n\nvar bound = func.bind();\n\n/* original test case from the issue report */\nif (function() {\n  return func.bind()(0, 0, 0, 0, 0, 0, 0)\n}());\n\n/* various versions of the issue report */\n\n/* call the bound function with a lots of args */\nfor (var idx = 0; idx < 50; idx++) {\n    var args = new Array(idx);\n\n    bound.apply(undefined, args);\n\n    delete args;\n}\n\n/* bind the function with multiple args and invoke it */\nfor (var idx = 0; idx < 25; idx++) {\n    var args = new Array(idx);\n\n    func.bind.apply(func, args).apply(undefined, args);\n\n    delete args;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3748-3749.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* try to trigger the gc a few times*/\nfor (var i = 0; i < 2; i++)\n{\n  new RegExp(32.2, \"g\")\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3761.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar result = parseFloat (\"IE\");\nassert (isNaN (result));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3778.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (parseFloat (-0.00001) === -0.00001);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3779.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar array = [1, 2, 3];\nvar idx_50 = array.lastIndexOf(50, {\n    valueOf: function() {\n        // Trigger removing elements from fast array.\n        array.length = 0;\n    }\n})\n\nassert (idx_50 === -1);\n\nvar idx_51 = array.lastIndexOf(51, {\n    valueOf: function() {\n        array.push(51)\n        return 10;\n    }\n})\n\nassert (idx_51 === -1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-380.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar v_0 = [];\nvar v_1 = [['\\u200E', '\\u0601', '\\u0602', '\\u0603', '\\u06DD', '\\u070F'],[0x1107, 0x1175, 0x11B0]];\nv_0[v_1];\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-381.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f_0(){\n    'use strict';\n    var v_0 = {\n        p_0: function(a_0, a_1) {}\n    };\n    f_1(function(a_2) {});\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3813.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar o = Object(\"str\");\no.toString = function() { throw \"toString error\" };\n\ntry {\n  JSON.stringify(o);\n  assert(false);\n} catch (e) {\n  assert(e === \"toString error\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3821.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (script)\n{\n  try\n  {\n    eval (script);\n    assert (false);\n  }\n  catch (e)\n  {\n    assert (e instanceof SyntaxError);\n  }\n}\n\ncheck_syntax_error ('function')\ncheck_syntax_error ('function a')\ncheck_syntax_error ('function a\"')\ncheck_syntax_error ('function a\"b')\ncheck_syntax_error ('function a(\"b')\ncheck_syntax_error ('function a(b, \"c')\ncheck_syntax_error ('function a(b, c\"d')\ncheck_syntax_error ('function a(b, c)\"d')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3878.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar d = new Date();\n\nvar s = d.setHours();\nassert (typeof s === \"number\" && isNaN (s));\n\nvar g = d.getHours();\nassert (typeof g === \"number\" && isNaN (g));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3903.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (\"abcde\".indexOf(\"\",1) === 1);\nassert (\"abcde\".lastIndexOf(\"\",1) === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3934.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r = /(?:(?:^b?)*)*a/.exec(\"bbba\")\n\nassert (r !== null);\nassert (r.index === 3);\nassert (r[0] === \"a\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-3944.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[function(a, a) { (function() { a }) }()]\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-4056.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar r = new RegExp('a');\n\nnew RegExp('1');\nnew RegExp('2');\nnew RegExp('3');\nnew RegExp('4');\nnew RegExp('5');\nnew RegExp('6');\nnew RegExp('7');\nnew RegExp('8');\n\nr.compile(r);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-4238.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    eval(\" \\\n    class foo { \\\n        constructor() { \\\n            function bar() {} \\\n        } \\\n    \")\n} catch (e) {\n    assert (e instanceof SyntaxError)\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-429.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar v_0 = [\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n    16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n    48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\n    64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,\n    80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,\n    96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n    112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,\n    128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,\n    144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,\n    160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,\n    176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,\n    192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,\n    208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,\n    224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,\n    240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255\n];\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-440.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function () {\n  var d = {};\n  var a = [arguments];\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-447.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  for (v_0 in v_1) {};\n  f_0(v_2.v_3 === 5);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-453.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n    var v_0 = [\n        ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,     \n        ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,     \n        ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,     \n        ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,     \n        ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,     \n        ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,     ];\n    }\ncatch(e) {}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-541.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnew RegExp(\"m\\u2820\");\nparseInt(\"145\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-563.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval('if (true) /abc/.exec(\"abc\");');\n} catch (e) {\n  assert (false);\n}\n\ntry {\n  eval('if (true) {} /abc/.exec(\"abc\");');\n} catch (e) {\n  assert (false);\n}\n\ntry {\n  eval('var a\\n/abc/.exec(\"abc\");');\n} catch (e) {\n  assert (false);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-566.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar setMethods =\n[\n    \"setTime\",\n    \"setMilliseconds\",\n    \"setSeconds\",\n    \"setUTCMilliseconds\",\n    \"setSeconds\",\n    \"setUTCSeconds\",\n    \"setMinutes\",\n    \"setUTCMinutes\",\n    \"setHours\",\n    \"setUTCHours\",\n    \"setDate\",\n    \"setUTCDate\",\n    \"setMonth\",\n    \"setUTCMonth\",\n    \"setFullYear\",\n    \"setUTCFullYear\"\n]\n\nfor(var i in setMethods)\n{\n  var setMethod = setMethods[i];\n  try\n  {\n    ({method: Date.prototype[setMethod]}).method(0);\n  }\n  catch (e)\n  {\n    assert(e instanceof TypeError);\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-613.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\na = \"é\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-614.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nJSON.stringify & (Date = 1);\n\nb = 1;\nthis.a = 2;\nthis.a\nb = 3;\nassert(b == 3);\nassert(a == 2);\nthis.a & (b = 4);\nassert(b == 4);\nassert(a == 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-639.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f_0() {\n      var f_0 = print;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-640.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f_0() {\n  var f_0 = 10;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-641.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  Object.freeze(RegExp.prototype.compile)();\n  assert(false);\n}\ncatch (e)\n{\n  assert(e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-642.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nFunction.prototype.length = function() {};\nFunction.prototype.bind(0);\nassert (Function.prototype.length === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-644.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction a()\n{\n  for (i = 1; i < 5; i++)\n    if (i) {\n      5;\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-646.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a;\n\n(a) = 1;\n\nassert (a === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-652.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"this / 10\");\n} catch (e) {\n  assert (false);\n}\n\ntry {\n  eval(\"var v_0 = 10;\\nv_0++ / 1\");\n} catch (e) {\n  assert (false);\n}\n\ntry {\n  eval(\"var v_0 = 10;\\nif (v_0++ / 1) {\\n}\");\n} catch (e) {\n  assert (false);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-653.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = \"foo\", r;\nswitch(a) {\n    case true ? \"foo\" : \"bar\":\n        r = \"OK\";\n        break;\n}\nassert(r === \"OK\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-654.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nswitch (true) {\n    case {\"foo\": \"bar\"}:\n        break;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-655.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"if (true) {}\\n/a/;\");\n} catch (e) {\n  assert (false);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-667.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nswitch (1) {\n  case 0:\n    assert(false);\n    break;\n  case 2:\n    assert(false);\n    break;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-669.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f(){return}\n\nswitch (1) {\n  case 1:\n    break}\n\nwhile (false) {continue}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-680.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  f1(function(a1){});\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n}\n\nvar x = {\nfoo: function () { throw new TypeError(\"bar\"); }\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-686.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (code) {\n  try {\n    eval(code);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\ncheck_syntax_error (\"function eval () {'use strict';}\");\ncheck_syntax_error (\"function f (eval) {'use strict';}\");\ncheck_syntax_error (\"function arguments () {'use strict';}\");\ncheck_syntax_error (\"function f (arguments) {'use strict';}\");\n\ncheck_syntax_error (\"(function eval () {'use strict';})\");\ncheck_syntax_error (\"(function f (eval) {'use strict';})\");\ncheck_syntax_error (\"(function arguments () {'use strict';})\");\ncheck_syntax_error (\"(function f (arguments) {'use strict';})\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-689.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n'use strict';\n\nfunction f (g) {\n  new g ({prop_name: 'value'});\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-703.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f(a, b) {\n  return {\n    a: a,\n    b: b\n  };\n}\n\nvar o = f('1', '2');\n\nassert(o.a == '1');\nassert(o.b == '2');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-725.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n\teval(\"switch(foo){} {}\");\n\tassert(false);\n} catch (e) {\n\tassert(e instanceof ReferenceError);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-736.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar code = 'try\\n\\\n{\\n\\\n  print({toStSing:!function() { throw new TypeError(\"foo\"); }}, []);t (false);\\n\\\n}\\n\\\ncatch (e)\\n\\\n{\\n\\\n  assert*(e instanceof\\n\\\n  assert );\\n\\\n  asstrt (e.a%e === \"foo\");\\n\\\n}';\n\ntry {\n  eval(code);\n  assert(false);\n} catch(e) {\n  assert(e instanceof ReferenceError);\n}\n\nassert (!eval(\"var x = {}; x instanceof assert;\"));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-737.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (s) {\n  try {\n    eval (s);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\n/* Test case #1 */\ncheck_syntax_error (\n\" new function f(f) {                                \\\n  return {className: 'xxx'};                         \\\n};                                                   \\\nx = 1;                                               \\\nfunction g(active) {                                 \\\n  for (i = 1; i <= 1000; i++) { if (i == active) {   \\\n  x = i;   if (f(\\\"\\\" + i) != null) { }              \\\n    } else {                                         \\\n  if (f(\\\"\\\" + i) != null) }                         \\\n  }                                                  \\\n}                                                    \\\ng(0)                                                 \\\n\");\n\n/* Test case #2 */\ncheck_syntax_error (\n\" new function a(a) {;for (f in [1,2,3]) print(f);   \\\n}; 1;                                                \\\nfunction g(active) {                                 \\\n  for (i = 1; i <= 1000; i++) { if (i == active) {   \\\n  xI                                                 \\\n      if (f != null) { }                             \\\n    } else {                                         \\\n  if (f(\\\"\\\" + i) != null) }                         \\\n  }                                                  \\\n}                                                    \\\ng(0)                                                 \\\n\");\n\n/* Test case #3 */\ncheck_syntax_error (\n\" new function f(f) {;for (f in [1,2,3]) pRint(f);   \\\n}; 1;                                                \\\nfunction g(active) {                                 \\\n  for (i = 1; i <= 1000; i++) { if (i == active) {   \\\n  x                                                  \\\n      if (f != null) { }                             \\\n    } else {                                         \\\n  if (f(\\\"\\\" + i) != null) }                         \\\n  }                                                  \\\n}                                                    \\\ng(0)                                                 \\\n\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-738.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction g() {};for (B in Boolean) print(f);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-739.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  var res = RegExp.prototyj_l;\n  obj_l = obj;\n\n  for (var k = 0; k < 1500; k++)\n  {\n    obj_l.prop = {};\n    obj_l = obj_l.prop;\n  }\n\n  function f (f, i) {\n    if (--i > 0) {\n      f ({a:o, b:o}, i);\n    }\n  }\n\n  for (var i = 0; i < 100; i++)\n  {\n    ({} + f ({}, 12));\n  }\n\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-741.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = JSON.stringify (b=+'�');\n\nassert(a === \"null\");\n\nvar b = JSON.stringify (b=-'�0001');\n\nassert(b === \"null\");\n\nvar c = JSON.stringify (b=+'�');\n\nassert(c === \"null\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-743.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction Error(Error) { }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-745.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"7E9.\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof SyntaxError);\n}\n\nassert(7E9.toString() === \"7000000000\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-747.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (''.replace(/$/g,\"a\") === \"a\");\nassert (''.replace(/^/g,\"a\") === \"a\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-781.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry\n{\n  Function (Array.isArray);\n  assert (false);\n}\ncatch (e)\n{ \n  assert (e instanceof SyntaxError);\n}\n\ntry { Function(TypeError.prototype) } catch (err) { }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-783.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  RegExp.prototype.compile(RegExp.prototype);\n  assert(false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-785.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { RegExp.prototype.toString() } catch (err) {  }\ntry { isNaN.apply(unescape, JSON.stringify) } catch (err) {  }\ntry { Array.prototype.forEach(eval) } catch (err) {  }\ntry { RegExp.prototype.compile(RegExp.prototype) } catch (err) {  }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-786.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry { RegExp.prototype.toString() } catch (err) {  }\ntry { Date.prototype.toTimeString() } catch (err) {  }\ntry { Boolean.prototype.toString() } catch (err) {  }\ntry { String.prototype.match(isNaN) } catch (err) {  }\ntry { Math.round(Math.atan) } catch (err) {  }\ntry { Date.prototype.getUTCDay() } catch (err) {  }\ntry { toLocaleString() } catch (err) {  }\ntry { Array.prototype.join(String.prototype.split) } catch (err) {  }\ntry { Date.prototype.getSeconds() } catch (err) {  }\ntry { isNaN.apply(Date.prototype.toISOString, String.prototype.split) } catch (err) {  }\ntry { Math.cos(Object) } catch (err) {  }\ntry { Math.floor(Date.prototype.getUTCSeconds) } catch (err) {  }\ntry { isNaN.apply(assert, JSON.stringify) } catch (err) {  }\ntry { Number.prototype.toLocaleString() } catch (err) {  }\ntry { Date.prototype.getTimezoneOffset() } catch (err) {  }\ntry { Date.prototype.setMinutes(Object.getOwnPropertyDescriptor,  Object.getOwnPropertyNames) } catch (err) {  }\ntry { Math.log(String.prototype.search) } catch (err) {  }\ntry { ReferenceError(Object.defineProperty) } catch (err) {  }\ntry { Array.prototype.filter(Number.prototype.toLocaleString) } catch (err) {  }\ntry { Array.prototype.forEach(Date.prototype.getDay) } catch (err) {  }\ntry { Object.defineProperty(SyntaxError.prototype, Date.prototype.setUTCMinutes, Math.max) } catch (err) {  }\ntry { Date.prototype.setMilliseconds(String.prototype.localeCompare) } catch (err) {  }\ntry { Math.asin(Date.prototype.getDay) } catch (err) {  }\ntry { Array.prototype.some(Date.prototype.getDay) } catch (err) {  }\ntry { String.prototype.charCodeAt(toString) } catch (err) {  }\ntry { isPrototypeOf(Math.tan) } catch (err) {  }\ntry { Object.isFrozen(print) } catch (err) {  }\ntry { RegExp.prototype.compile(RegExp.prototype) } catch (err) {  }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-798.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = {}, b = 0;\n\nwhile (a[b]) {\n  assert (false);\n}\n\nfor ( ; a[b]; ) {\n  assert (false);\n}\n\nvar flag = false;\ndo\n{\n  assert (!flag);\n  flag = true;\n} while (a[b]);\n\na = { };\na.b = { c : 1 };\n\nwith (a.b)\n{\n  assert (c === 1);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issue-962.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction re_test (pattern, string, expected)\n{\n  assert ((new RegExp(pattern)).exec(string) == expected);\n}\n\nre_test(\"[\\\\u0020]\", \"u\", null);\nre_test(\"[\\\\u0020]\", \" \", \" \");\nre_test(\"[\\\\u0020]\", \"x\", null);\n\nre_test(\"[\\\\x20]\", \"u\", null);\nre_test(\"[\\\\x20]\", \" \", \" \");\nre_test(\"[\\\\x20]\", \"x\", null);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/regression-test-issues-43-183.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (script)\n{\n  try\n  {\n    eval (script);\n    assert (false);\n  }\n  catch (e)\n  {\n    assert (e instanceof SyntaxError);\n  }\n}\n\ncheck_syntax_error ('{');\ncheck_syntax_error ('}');\ncheck_syntax_error ('[');\ncheck_syntax_error (']');\ncheck_syntax_error ('(');\ncheck_syntax_error (')');\n\ncheck_syntax_error ('function f (');\ncheck_syntax_error ('function f ()');\ncheck_syntax_error ('function f () {');\ncheck_syntax_error ('function f () }');\ncheck_syntax_error ('function f ({) }');\ncheck_syntax_error ('function f { }');\ncheck_syntax_error ('function f {');\ncheck_syntax_error ('function f }');\n\ncheck_syntax_error ('a = [[];');\n\ncheck_syntax_error ('a = {;');\ncheck_syntax_error ('a = };');\ncheck_syntax_error ('a = {{};');\n\ncheck_syntax_error ('a = {get q {} };');\ncheck_syntax_error ('a = {get q ( {} };');\ncheck_syntax_error ('a = {get q ) {} };');\ncheck_syntax_error ('a = {get q () };');\ncheck_syntax_error ('a = {get q () { };');\ncheck_syntax_error ('a = {get q () };');\ncheck_syntax_error ('a = {get q () { };');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/relational.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((7 < 4) == false);\nassert((7 > 4) == true);\n\nassert((7 <= 11) == true);\nassert((11 <= 11) == true);\n\nassert((7 >= 11) == false);\nassert((7 >= 7) == true);\n\nassert(0 > (0 - 'Infinity'));\nassert(0 < (0 - '-Infinity'));\nassert((0 - 'Infinity') < (0 - '-Infinity'));\n\nassert('a' > '');\nassert(!('' < ''));\nassert(!('' > ''));\nassert('abcd' > 'abc');\nassert('abc' < 'abcd');\nassert('abcd' <= 'abcd');\nassert('abcd' >= 'abcd');\nassert(!('abcd' > 'abcd'));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/shift.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert((9 << 2) === 36);\nassert((14 << 2) === 56);\n\nassert((9 >> 2) === 2);\nassert((-14 >> 2) === -4);\n\nassert((9 >>> 2) === (9 >> 2));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/sqrt.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert(isNaN(Math['sqrt'] (NaN)));\nassert(isNaN(Math['sqrt'] (-1.0)));\nassert(isNaN(Math['sqrt'] (-Infinity)));\nassert(Math['sqrt'] (0.0) === 0.0);\nassert(Math['sqrt'] (Infinity) === Infinity);\n\nassert(Math['sqrt'] (1.0) === 1.0);\nassert(Math['sqrt'] (2.0) >= Math['SQRT2'] * 0.999999);\nassert(Math['sqrt'] (2.0) <= Math['SQRT2'] * 1.000001);\nassert(Math['sqrt'] (0.5) >= Math['SQRT1_2'] * 0.999999);\nassert(Math['sqrt'] (0.5) <= Math['SQRT1_2'] * 1.000001);\n\nvar sqrt_1e38 = Math['sqrt'] (1.0e+38);\nassert(sqrt_1e38 > 0.999999 * 1.0e+19);\nassert(sqrt_1e38 < 1.000001 * 1.0e+19);\n\nvar sqrt_1e38 = Math['sqrt'] (1.0e-38);\nassert(sqrt_1e38 > 0.999999 * 1.0e-19);\nassert(sqrt_1e38 < 1.000001 * 1.0e-19);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/stack-limit.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f () {\n  f();\n}\n\ntry {\n  f();\n  assert(false);\n} catch (e) {\n  assert(e instanceof RangeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/strict.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n'use strict';\n\nvar temp;\n\ntry\n{\n  a = 1;\n\n  assert (false);\n} catch (e)\n{\n  assert (e instanceof ReferenceError);\n}\n\ntry\n{\n  NaN = 1;\n\n  assert (false);\n} catch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nfunction f()\n{\n  assert(this === undefined);\n}\n\nf();\n\nObject.function_prop = function ()\n{\n  assert (this === Object);\n}\n\nObject.function_prop ();\n\ntry\n{\n  var temp = f.caller;\n\n  assert (false);\n} catch (e)\n{\n  assert (e instanceof TypeError);\n}\n\ntry\n{\n  delete this.NaN;\n\n  assert (false);\n} catch (e)\n{\n  assert (e instanceof TypeError);\n}\n\ntry\n{\n  eval (\"'\\\\\" + \"101'\");\n\n  assert (false);\n} catch (e)\n{\n  assert (e instanceof SyntaxError);\n}\n\ntry\n{\n  var str1 = \"'\\\\\" + \"0'\";\n  var str2 = \"'\\\\x\" + \"00'\";\n  eval (str1);\n\n  assert (eval (str1) === eval (str2));\n} catch (e)\n{\n  assert (false);\n}\n\ntry\n{\n  var str1 = \"'\\\\\" + \"0\" + \"\\\\\" + \"0\" + \"\\\\\" + \"0'\";\n  var str2 = \"'\\\\x\" + \"00\" + \"\\\\x\" + \"00\" + \"\\\\x\" + \"00'\";\n  eval (str1);\n\n  assert (eval (str1) === eval (str2));\n} catch (e)\n{\n  assert (false);\n}\n\ntry\n{\n  var str1 = \"'foo\\\\\" + \"0\" + \"bar'\";\n  var str2 = \"'foo\\\\x\" + \"00\" + \"bar'\";\n  eval (str1);\n\n  assert (eval (str1) === eval (str2));\n} catch (e)\n{\n  assert (false);\n}\n\n(function (a) {\n  (function (a) {\n  });\n});\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/strict2.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction check_syntax_error (script)\n{\n  try\n  {\n    eval (script);\n    assert (false);\n  }\n  catch (e)\n  {\n    assert (e instanceof SyntaxError);\n  }\n}\n\nvar\n  implements = 0,\n  private = 1,\n  public = 2,\n  interface = 3,\n  package = 4,\n  protected = 5,\n  let = 6,\n  yield = 7,\n  static = 8;\n\ncheck_syntax_error(\"'use strict'\\nimplements\")\ncheck_syntax_error(\"'use strict'\\n\\\\u0069mplements\")\nassert(eval(\"'use stric'\\nimplements\") === 0)\nassert(eval(\"'use stric'\\n\\\\u0069mplements\") === 0)\n\ncheck_syntax_error(\"'use strict'\\nprivate\")\ncheck_syntax_error(\"'use strict'\\n\\\\u0070rivate\")\nassert(eval(\"'use stric'\\nprivate\") === 1)\nassert(eval(\"'use stric'\\n\\\\u0070rivate\") === 1)\n\ncheck_syntax_error(\"'use strict'\\npublic\")\ncheck_syntax_error(\"'use strict'\\n\\\\u0070ublic\")\nassert(eval(\"'use stric'\\npublic\") === 2)\nassert(eval(\"'use stric'\\n\\\\u0070ublic\") === 2)\n\ncheck_syntax_error(\"'use strict'\\ninterface\")\ncheck_syntax_error(\"'use strict'\\n\\\\u0069nterface\")\nassert(eval(\"'use stric'\\ninterface\") === 3)\nassert(eval(\"'use stric'\\n\\\\u0069nterface\") === 3)\n\ncheck_syntax_error(\"'use strict'\\npackage\")\ncheck_syntax_error(\"'use strict'\\n\\\\u0070ackage\")\nassert(eval(\"'use stric'\\npackage\") === 4)\nassert(eval(\"'use stric'\\n\\\\u0070ackage\") === 4)\n\ncheck_syntax_error(\"'use strict'\\nprotected\")\ncheck_syntax_error(\"'use strict'\\n\\\\u0070rotected\")\nassert(eval(\"'use stric'\\nprotected\") === 5)\nassert(eval(\"'use stric'\\n\\\\u0070rotected\") === 5)\n\ncheck_syntax_error(\"'use strict'\\nlet\")\ncheck_syntax_error(\"'use strict'\\n\\\\u006cet\")\nassert(eval(\"'use stric'\\nlet\") === 6)\nassert(eval(\"'use stric'\\n\\\\u006cet\") === 6)\n\ncheck_syntax_error(\"'use strict'\\nyield\")\ncheck_syntax_error(\"'use strict'\\n\\\\u0079ield\")\nassert(eval(\"'use stric'\\nyield\") === 7)\nassert(eval(\"'use stric'\\n\\\\u0079ield\") === 7)\n\ncheck_syntax_error(\"'use strict'\\nstatic\")\ncheck_syntax_error(\"'use strict'\\n\\\\u0073tatic\")\nassert(eval(\"'use stric'\\nstatic\") === 8)\nassert(eval(\"'use stric'\\n\\\\u0073tatic\") === 8)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-charat.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// check properties\n\nfunction length_configurable()\n{\n  function is_es51() {\n    return (typeof g === \"function\");\n    { function g() {} }\n  }\n  return is_es51() ? false : true;\n}\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.charAt, 'length').configurable === length_configurable());\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.charAt, 'length').enumerable === false);\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.charAt, 'length').writable === false);\n\nassert(String.prototype.charAt.length === 1);\n\n// check empty string\nassert(String.prototype.charAt.call(new String()) === \"\");\n\n// check NaN\nassert(\"hello world!\".charAt(NaN) === \"h\");\n\n// check Object\nassert(String.prototype.charAt.call({})  === \"[\");\n\n// simple checks\nassert(\"hello world!\".charAt(0) === \"h\");\n\nassert(\"hello world!\".charAt(1) === \"e\");\n\n// check +-Inf\nassert(\"hello world!\".charAt(-Infinity) === \"\");\n\nassert(\"hello world!\".charAt(Infinity) === \"\");\n\nassert(\"hello world!\".charAt(11) === \"!\");\n\nassert(\"hello world!\".charAt(12) === \"\");\n\n// check unicode\nassert(\"hello\\u000B\\u000C\\u0020\\u00A0world!\".charAt(8) === \"\\u00A0\");\n\nassert(\"hello\\uD834\\uDF06world!\".charAt(6) === \"\\uDF06\");\n\nassert(\"hell\\u006F\\u006F w\\u006F\\u006Frld!\".charAt(8) === \"\\u006F\");\n\nassert(\"\\u00A9\\u006F\".charAt(2) === \"\");\n\n// check negative\nassert(\"hello world!\".charAt(-1) === \"\");\n\nassert(\"hello world!\".charAt(-9999999) === \"\");\n\nassert(\"hello world!\".charAt(-0) === \"h\");\n\n// check undefined\nassert(\"hello world!\".charAt(undefined) === \"h\");\n\n// check booleans\nassert(\"hello world!\".charAt(true) === \"e\");\n\nassert(\"hello world!\".charAt(false) === \"h\");\n\n// check this is undefined\ntry {\n  String.prototype.charAt.call(undefined);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check this is null\ntry {\n  String.prototype.charAt.call(null);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - undefined\ntry {\n  assert(true.charAt() === \"\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - null\ntry {\n  assert(String.prototype.charAt.call(null, 0) === \"\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - Boolean\nassert(String.prototype.charAt.call(true, 1) === \"r\");\n\n// check coercible - Object\nvar test_object = {firstName:\"John\", lastName:\"Doe\"};\nassert(String.prototype.charAt.call(test_object, 1) === \"o\");\n\n// check coercible - Number\nassert(String.prototype.charAt.call(123, 2) === \"3\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-charcodeat.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// check properties\n\nfunction length_configurable()\n{\n  function is_es51() {\n    return (typeof g === \"function\");\n    { function g() {} }\n  }\n  return is_es51() ? false : true;\n}\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.charCodeAt, 'length').configurable === length_configurable());\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.charCodeAt, 'length').enumerable === false);\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.charCodeAt, 'length').writable === false);\n\nassert(String.prototype.charCodeAt.length === 1);\n\n// check empty string\nassert(isNaN(String.prototype.charCodeAt.call(new String())));\n\n// check Object with NaN pos\nassert(String.prototype.charCodeAt.call({}) === 91);\n\n// simple checks\nassert(\"hello world!\".charCodeAt(0) === 104);\n\nassert(\"hello world!\".charCodeAt(1) === 101);\n\nassert(\"HELLO WORLD\".charCodeAt(10) === 68);\n\n// check +-Inf\nassert(isNaN(\"hello world!\".charCodeAt(-Infinity)));\n\nassert(isNaN(\"hello world!\".charCodeAt(Infinity)));\n\nassert(\"hello world!\".charCodeAt(11) === 33);\n\nassert(isNaN(\"hello world!\".charCodeAt(12)));\n\n// check unicode\nassert(\"hello\\u000B\\u000C\\u0020\\u00A0world!\".charCodeAt(8) === 160);\n\nassert(\"hello\\uD834\\uDF06world!\".charCodeAt(6) === 57094);\n\nassert(\"hell\\u006F\\u006F w\\u006F\\u006Frld!\".charCodeAt(8) === 111);\n\nassert(isNaN(\"\\u00A9\\u006F\".charCodeAt(2)));\n\n// check negative\nassert(isNaN(\"hello world!\".charCodeAt(-1)));\n\nassert(isNaN(\"hello world!\".charCodeAt(-9999999)));\n\nassert(\"hello world!\".charCodeAt(-0) === 104);\n\n// check undefined\nassert(\"hello world!\".charCodeAt(undefined) === 104);\n\n// check booleans\nassert(\"hello world!\".charCodeAt(true) === 101);\n\nassert(\"hello world!\".charCodeAt(false) === 104);\n\n// check index above uint32_t\nassert(isNaN(\"hello world!\".charCodeAt(4294967299)));\n\n// check coercible - undefined\ntry {\n  assert(isNaN(String.prototype.charCodeAt.call(undefined)));\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - null\ntry {\n  assert(isNaN(String.prototype.charCodeAt.call(null, 0)));\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - Boolean\nassert(String.prototype.charCodeAt.call(true, 1) === 114);\nassert(String.prototype.charCodeAt.call(true) === 116);\n\n// check coercible - Object\nvar test_object = {firstName:\"John\", lastName:\"Doe\"};\nassert(String.prototype.charCodeAt.call(test_object, 1) === 111);\n\n// check coercible - Number\nassert(String.prototype.charCodeAt.call(123, 2) === 51);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-concat.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// check properties\n\nfunction length_configurable()\n{\n  function is_es51() {\n    return (typeof g === \"function\");\n    { function g() {} }\n  }\n  return is_es51() ? false : true;\n}\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.concat, 'length').configurable === length_configurable());\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.concat, 'length').enumerable === false);\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.concat, 'length').writable === false);\n\n// simple checks\nvar s1 = \"Hello \";\nvar s2 = \"world!\";\nvar s3 = \" \";\nassert(s1.concat(s2, s3, 3, 10, \"  \", \".\") === \"Hello world! 310  .\");\nassert(\"Hello \".concat(s1) === \"Hello Hello \");\n\nassert(s1.concat(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9) === \"Hello 012345678901234567890123456789\");\n\nassert(\"\".concat() === \"\");\n\n// check unicode\nassert(\"\\u0041\".concat(\"\\u0041\", \"\\u1041\") === \"\\u0041\\u0041\\u1041\");\nassert(\"\\u0041\\u1D306A\".concat(\"\\u0041\", \"\\u1041\") === \"\\u0041\\u1D306A\\u0041\\u1041\");\n\n// check undefined\nvar y;\nassert(\"Check \".concat(y) === \"Check undefined\");\n\n// check toString error in this object\nvar y = {};\ny.toString = function () { throw new ReferenceError (\"foo\");}\ny.concat = String.prototype.concat;\ntry {\n  y.concat(\"cat\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n\n// check toString error in arguments\nvar x = {};\nx.toString = function () { throw new ReferenceError (\"foo\");}\ntry {\n  \"a\".concat(x);\n  assert(false);\n} catch (e) {\n  assert(e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-indexof.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// check properties\n\nfunction length_configurable()\n{\n  function is_es51() {\n    return (typeof g === \"function\");\n    { function g() {} }\n  }\n  return is_es51() ? false : true;\n}\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.indexOf, 'length').configurable === length_configurable());\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.indexOf, 'length').enumerable === false);\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.indexOf, 'length').writable === false);\n\nassert(String.prototype.indexOf.length === 1);\n\nassert(\"Hello world, welcome to the universe.\".indexOf(\"welcome\") === 13);\n\nassert(\"Hello world, welcome to the universe.\".indexOf(\"Hello world, welcome to the universe.\") === 0);\n\nassert(\"Hello world, welcome to the universe.\".indexOf(\"welcome\",10) == 13);\n\nassert(\"Hello world, welcome to the universe.\".indexOf(\"welcome\",-100) == 13);\n\nassert(\"Hello world, welcome to the universe.\".indexOf(\"welcome\", 15) === -1);\n\nassert(\"Hello world, welcome to the universe.\".indexOf(\"o\", 15) === 17);\n\n// check utf8 strings\nassert(\"\\uFFA2\".indexOf(\"\\uFFA2\") === 0);\n\nassert(\"\\uFFA2\".indexOf(\"A\") === -1);\n\nassert(\"w2\\uFFA2A\".indexOf(\"A\") === 3);\n\nassert(\"w2\\u1D306A\".indexOf(\"A\") === 4);\n\nassert(\"\\uD834\\uDF06\".indexOf(\"\\uDF06\") === 1);\n\nassert(\"\\uD834\\uDF06w2\\u1D306D\".indexOf(\"D\") === 6);\n\nassert(\"\\ud800\\dc00\".indexOf(\"\\dc00\") === 1);\n\nassert(\"\\u8000\\u0700\\u8000\\u8000A\".indexOf(\"A\", 3) === 4);\n\n// check prefix search\nassert(\"aaaabaaa\".indexOf(\"aaaba\") === 1);\n\n// check empty string\nassert(String.prototype.indexOf.call(new String()) === -1);\n\nassert(String.prototype.indexOf.call(\"\",\"\") === 0);\n\n// check NaN\nassert(\"Hello world, welcome to the universe.\".indexOf(NaN) === -1);\n\nassert(\"Hello world, welcome to the universe.\".indexOf(\"welcome\",NaN) === 13);\n\n// check Object\nassert(String.prototype.indexOf.call({}) === -1);\n\n// check +-Inf\nassert(\"hello world!\".indexOf(\"world\", -Infinity) === 6);\n\nassert(\"hello world!\".indexOf(\"world\", Infinity) === -1);\n\n// check numbers\nassert(\"hello world!\".indexOf(-1) === -1);\n\nassert(\"hello 0 world!\".indexOf(-0) === 6);\n\n// check undefined\nassert(\"hello world!\".indexOf(undefined) === -1);\n\nvar undefined_var;\nassert(\"Hello world, welcome to the universe.\".indexOf(\"welcome\", undefined_var) === 13);\n\n// check booleans\nassert(\"true\".indexOf(true, false) === 0);\n\n// check coercible - undefined\ntry {\n  String.prototype.indexOf.call(undefined);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - null\ntry {\n  String.prototype.indexOf.call(null);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - Boolean\nassert(String.prototype.indexOf.call(true, \"e\") === 3);\nassert(String.prototype.indexOf.call(false, \"e\") === 4);\n\n// check coercible - Object\nvar test_object = {firstName:\"John\", lastName:\"Doe\"};\nassert(String.prototype.indexOf.call(test_object, \"Obj\") === 8);\n\n// check coercible - Number\nassert(String.prototype.indexOf.call(123, \"2\") === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-lastindexof.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// check properties\n\nfunction length_configurable()\n{\n  function is_es51() {\n    return (typeof g === \"function\");\n    { function g() {} }\n  }\n  return is_es51() ? false : true;\n}\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.lastIndexOf, 'length').configurable === length_configurable());\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.lastIndexOf, 'length').enumerable === false);\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.lastIndexOf, 'length').writable === false);\n\nassert(String.prototype.lastIndexOf.length === 1);\n\n// simple checks\nassert(\"Hello welcome, welcome to the universe.\".lastIndexOf(\"welcome\") === 15);\n\nassert(\"Hello world, welcome to the universe.\".lastIndexOf(\"Hello world, welcome to the universe.\") === 0);\n\nassert(\"Hello welcome, welcome to the universe.\".lastIndexOf(\"welcome\", 5) === -1);\n\nassert(\"Hello welcome, welcome to the universe.\".lastIndexOf(\"welcome\", -100) == -1);\n\nassert(\"Hello welcome, welcome to the universe.\".lastIndexOf(\"welcome\", 15) === 15);\n\nassert(\"Hello welcome, welcome to the universe o.\".lastIndexOf(\"o\", 10) === 10);\n\nassert(\"Hello welcome, welcome to the universe o.\".lastIndexOf(\"o\", 25) === 24);\n\nassert(\"Helloooo woooorld\".lastIndexOf(\"oooo\", 6) === 4);\n\n// check utf8 strings\nassert(\"\\uFFA2\".lastIndexOf(\"\\uFFA2\") === 0);\n\nassert(\"\\uFFA2\".lastIndexOf(\"A\") === -1);\n\nassert(\"w2\\uFFA2 A\".lastIndexOf(\"A\") === 4);\n\nassert(\"w2\\u1D306A\".indexOf(\"A\") === 4);\n\nassert(\"\\u0070A\".lastIndexOf(\"A\") === 1);\n\nassert(\"\\u8000A\".lastIndexOf(\"A\") === 1);\n\nassert(\"\\u0080\\u0080\\u0980\\u1080A\".lastIndexOf(\"A\") === 4);\n\nassert(\"\\u0080\\u0980\\u1080A\\u0080\\u0080\\u0980\\u1080\".lastIndexOf(\"A\", 4) === 3);\n\nassert(\"\\u0080\\u0080\\u0980\\u1080A\\u0980AA\\u0980A\".lastIndexOf(\"A\\u0980A\") === 7);\n\nassert(\"\\u0080\\u0080\\u0980\\u1080A\\u0980AA\\u0980A\".lastIndexOf(\"A\\u0980A\", 4) === 4);\n\nassert(\"\\uD834\\uDF06\".lastIndexOf(\"\\uDF06\") === 1);\n\nassert(\"\\uD834\\uDF06w2\\u1D306D\\uDF06w2\\u1D306D\".lastIndexOf(\"D\") === 12);\n\nassert(\"\\ud800\\dc00\\ud800\\dc00\".lastIndexOf(\"\\dc00\") === 6);\n\n// check empty string\nassert(String.prototype.lastIndexOf.call(new String()) === -1);\n\nassert(String.prototype.lastIndexOf.call(\"Hello world, welcome to the universe.\",\"\") === 37);\n\nassert(String.prototype.lastIndexOf.call(\"\",\"\") === 0);\n\n// check NaN\nassert(\"Hello world, welcome to the universe.\".lastIndexOf(NaN) === -1);\n\nassert(\"Hello world, welcome to the universe.\".lastIndexOf(\"o\", NaN) === 22);\n\n// check Object\nassert(String.prototype.lastIndexOf.call({}) === -1);\n\n// check +-Inf\nassert(\"hello world!\".lastIndexOf(\"world\", -Infinity) === -1);\n\nassert(\"hello world!\".lastIndexOf(\"world\", Infinity) === 6);\n\n// check numbers\nassert(\"hello world!\".lastIndexOf(-1) === -1);\n\nassert(\"hello 0 world!\".lastIndexOf(-0) === 6);\n\n// check undefined\nassert(\"hello world!\".lastIndexOf(undefined) === -1);\n\nvar undefined_var;\nassert(\"Hello world, welcome to the universe.\".lastIndexOf(\"welcome\", undefined_var) === 13);\n\n// check booleans\nassert(\"true\".lastIndexOf(true, false) === 0);\n\n// check coercible - undefined\ntry {\n  String.prototype.lastIndexOf.call(undefined);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - null\ntry {\n  String.prototype.lastIndexOf.call(null);\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - Boolean\nassert(String.prototype.lastIndexOf.call(true, \"e\") === 3);\nassert(String.prototype.lastIndexOf.call(false, \"e\") === 4);\n\n// check coercible - Object\nvar test_object = {firstName:\"John\", lastName:\"Doe\"};\nassert(String.prototype.lastIndexOf.call(test_object, \"Obj\") === 8);\n\n// check coercible - Number\nassert(String.prototype.lastIndexOf.call(123, \"2\") === 1);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-localecompare.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str1 = \"ab\";\nvar str2 = \"cd\";\nassert (str1.localeCompare(str1) === 0);\nassert (str1.localeCompare(str2) === -1);\nassert (str2.localeCompare(str1) === 1);\n\nvar x = \"32\";\nvar y = \"-32\";\nassert (y.localeCompare(-31) === 1);\nassert (y.localeCompare(\"\") === 1);\nassert (y.localeCompare(-32) === 0);\nassert (x.localeCompare(33) === -1);\nassert (x.localeCompare() === -1);\nassert (x.localeCompare(null) === -1);\nassert (x.localeCompare(NaN) === -1);\nassert (x.localeCompare(Infinity) === -1);\nassert (x.localeCompare(-Infinity) === 1);\n\nvar array1 = [\"1\", 2];\nvar array2 = [3, 4];\nassert (String.prototype.localeCompare.call(42, array1) === 1);\nassert (String.prototype.localeCompare.call(array1, null) === -1);\nassert (String.prototype.localeCompare.call(array1, array1) === 0);\nassert (String.prototype.localeCompare.call(array1, array2) === -1);\nassert (String.prototype.localeCompare.call(array2, array1) === 1);\n\ntry {\n  var res = String.prototype.localeCompare.call(null, 0);\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  var res = String.prototype.localeCompare.call();\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-match.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// check properties\n\nfunction length_configurable()\n{\n  function is_es51() {\n    return (typeof g === \"function\");\n    { function g() {} }\n  }\n  return is_es51() ? false : true;\n}\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.match, 'length').configurable === length_configurable());\nassert(Object.getOwnPropertyDescriptor(String.prototype.match, 'length').enumerable === false);\nassert(Object.getOwnPropertyDescriptor(String.prototype.match, 'length').writable === false);\n\nfunction match_equals (match_result, expected)\n{\n  if (match_result.length !== expected.length)\n  {\n    return false;\n  }\n\n  for(var i = 0; i < expected.length; i++)\n  {\n    if (match_result[i] !== expected[i])\n    {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nassert (match_equals (\"hello\".match(\"o\"), [\"o\"]));\nassert (\"hello\".match(/ /g) == void 0);\n\nassert (match_equals (\"hello\".match(/o/), [\"o\"]));\n\nassert (match_equals (\"hello\".match(/l/), [\"l\"]));\nassert (match_equals (\"hello\".match(/l/g), [\"l\", \"l\"]));\n\nassert (\"\".match(/a/g) == void 0);\n\nassert (\"\".match() !== void 0 );\n\nassert (match_equals (\"\".match(), [\"\"]));\nassert (match_equals (\"\".match(undefined), [\"\"]));\nassert (match_equals (\"\".match(\"\"), [\"\"]));\n\nassert (match_equals (\"test 1, test 2, test 3, test 45\".match(/[0-9]+/g), [\"1\", \"2\", \"3\", \"45\"]));\n\nvar re = new RegExp(\"\", \"g\");\nassert (match_equals (\"a\".match(re), [\"\", \"\"]));\n\n\n/* Check Object coercible */\ntry {\n  String.prototype.match.call(undefined, \"\");\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\n/* Check toString conversion */\ntry {\n  var obj = { toString: function() { throw new ReferenceError(\"foo\"); } };\n  String.prototype.match.call(obj, \"\");\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n  assert (e.message === \"foo\");\n}\n\n/* Check Invalid RegExp */\ntry {\n  var obj = { toString: function() { throw new ReferenceError(\"foo\"); } };\n  \"\".match (obj);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n  assert (e.message === \"foo\");\n}\n\n/* Check if lastIndex is set to 0 on start */\nvar re = /a/g;\nre.lastIndex = 3;\n\nassert (match_equals (\"a\".match(re), [\"a\"]));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-replace.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (\"abcabc\".replace(\"bc\", \":\") === \"a:abc\");\nassert (\"hello\".replace(\"\", \":\") === \":hello\");\nassert (\"hello\".replace(\"h\", \"\") === \"ello\");\nassert (\"\".replace(\"\", \"h\") === \"h\");\n\nassert (\"xabcxabcx\".replace (/abc/g, \"[$&][$`][$']\") === \"x[abc][x][xabcx]x[abc][xabcx][x]x\");\nassert (\"abc\".replace (/a(b)c|d()/, \"[$1][$01][$2][$02][$99][$123][$012]\") === \"[b][b][][][$99][b23][b2]\");\nassert (\"abc\".replace(\"abc\", \"$x$$5$0$00$\") === \"$x$5$0$00$\");\n\nassert (\"#x#\".replace(\"x\", \"$1\") === \"#$1#\");\nassert (\"#x#\".replace(/(x)/, \"$1$2\") === \"#x$2#\");\nassert (\"#x#\".replace(/(x)/, \"$01$02$11$20\") === \"#x$02x1$20#\");\nassert (\"#xy#\".replace(/(x)((((((((((y))))))))))/, \"$07|$20|$11|$12|$110|$99|$011\") === \"#y|y0|y|x2|y0|y9|x1#\");\nassert (\"#xy#\".replace(/(x)((((((((y))))))))/, \"$00|$01|$011|$090|$10|$99\") === \"#$00|x|x1|y0|x0|y9#\");\n\nassert (\"a true true story\".replace(true) === \"a undefined true story\");\nassert (\"1234\".replace(23, 32) === \"1324\");\n\nassert (\"abcabc\".replace(/bc/, \":\") === \"a:abc\");\nassert (\"axbcxx\".replace(/x*/g, \":\") === \":a::b:c::\");\n\nassert (\"\".replace(/|/g,\"஻\") === \"஻\");\nassert (\"஻BB8B@abXde^\".replace(/a/g,\"$஻Bce((/a%\") === \"஻BB8B@$஻Bce((/a%bXde^\");\nassert (\"abcab\".replace(/a/g,\"˙Ł$Đ\") === \"˙Ł$Đbc˙Ł$Đb\");\nassert (\"˙Ł$Đbc˙Ł$Đb\".replace(\"Ł$\",\"ab\") === \"˙abĐbc˙Ł$Đb\");\n\nassert (String.prototype.replace.call (12321, /2/g, \".\") === \"1.3.1\");\n\ntry\n{\n  String.prototype.replace.call (null, \"u\", \".\");\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nassert (\"98765\".replace(76, function () { return {}; }) === \"98[object Object]5\");\n\nfunction concat_arguments()\n{\n  var str = \"\";\n  for (var i = 0; i < arguments.length; i++)\n  {\n    str += \"[\" + arguments[i] + \"]\";\n  }\n  return str;\n}\n\nassert (\"abcdabcd\".replace(\"cd\", concat_arguments) === \"ab[cd][2][abcdabcd]abcd\");\nassert (\"abcdef\".replace (/a((b)c)|d()/, concat_arguments) === \"[abc][bc][b][undefined][0][abcdef]def\");\n\ntry\n{\n  \"x\".replace(\"x\", function() { throw \"MyError\"; });\n  assert (false);\n}\ncatch (e)\n{\n  assert (e === \"MyError\");\n}\n\nassert (\"\\ud801\\udc00\".replace(\"\\ud801\", \"#\") === \"#\\udc00\");\nassert (\"\\ud801\\udc00\".replace(\"\\udc00\", \"#\") === \"\\ud801#\");\n\nvar global = this;\n\nfunction case1()\n{\n  assert(this === global);\n  return \"y\";\n}\n\nfunction case2()\n{\n  \"use strict\";\n  assert(this === undefined);\n  return \"y\";\n}\n\nassert (\"x\".replace(\"x\", case1) === \"y\");\nassert (\"x\".replace(\"x\", case2) === \"y\");\n\nvar regexp = /r/g;\n\nObject.defineProperty(regexp, \"lastIndex\", {\n  configurable : false,\n  enumerable : false,\n  value : 0,\n  writable : false\n});\n\ntry {\n  \"r\".replace (regexp, \"x\");\n  assert (false);\n} catch (e) {\n  assert (e instanceof TypeError);\n}\n\ntry {\n  \"str\".replace ({toString: function () {throw \"abrupt search toString\"}}, \"\");\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt search toString\");\n}\n\ntry {\n  \"str\".replace (\"str\", {toString: function () {throw \"abrupt search toString\"}});\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt search toString\");\n}\n\ntry {\n  \"str\".replace (\"str\", function () {return {toString: function () {throw \"abrupt replacer toString\"}}});\n  assert (false);\n} catch (e) {\n  assert (e === \"abrupt replacer toString\");\n}\n\nvar r = /./;\nr.lastIndex = {\n  valueOf: function() {\n    throw \"abrupt lastIndex\"\n  }\n}\n\ntry {\n  \"a\".replace(r, \"b\");\n  assert(false);\n} catch (e) {\n  assert(e === \"abrupt lastIndex\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-search.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (\"abcabbcd\".search (/abb+c/) === 3);\nassert (\"ababbccabd\".search (\"((?:(ax))|(bx)|ab*c+)\") === 2);\nassert (\"acbaabcabcabc\".search (/b+c/g) === 5);\nassert (\"abcabd\".search (\"c?a+d\") === -1);\n\nassert (String.prototype.search.call ({}, \"ec+t\") === 4);\n\ntry\n{\n  String.prototype.search.call (null, \"u\");\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\nvar regexp = /x/g;\nregexp.lastIndex = \"index\";\n\nassert (\"aaxbb\".search (regexp) === 2);\nassert (\"aabb\".search (regexp) === -1);\nassert (regexp.lastIndex === \"index\");\n\nassert (\"##\\ud801\\udc00\".search (\"\\ud801\") === 2);\nassert (\"##\\ud801\\udc00\".search (\"\\udc00\") === 3);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-slice.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str = \"universe\";\nvar res;\n\nres = str.slice();\nassert (res === \"universe\");\n\nres = str.slice(1, 6);\nassert (res === \"niver\");\n\nres = str.slice(\"a\", \"-4\");\nassert (res === \"univ\");\n\nres = str.slice(-5);\nassert (res === \"verse\");\n\nres = str.slice(-12, undefined);\nassert (res === \"universe\");\n\nres = str.slice(undefined, -20);\nassert (res === \"\");\n\nres = str.slice(undefined, undefined);\nassert (res === \"universe\");\n\nres = str.slice(Infinity, NaN);\nassert (res === \"\");\n\nres = str.slice(-Infinity, Infinity);\nassert (res === \"universe\");\n\nres = str.slice(NaN, -Infinity);\nassert (res === \"\");\n\nres = str.slice(false, true);\nassert (res === \"u\");\n\nvar x;\nres = str.slice(x, x);\nassert (res === \"universe\");\n\nvar obj = {y: \"foo\"};\nvar arr = [x, x];\nres = str.slice(obj, arr);\nassert (res === \"\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-split.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar res = \"\".split();\nassert (res[0] === \"\");\n\nres = \"foo\".split();\nassert (res[0] === \"foo\");\n\nvar str = \"foo//bar/baz//foo\";\nres = str.split(\"\");\n\nassert (res.length === 17);\nfor (var i = 0; i < res.length; i++)\n{\n  assert (res[i] === str[i]);\n}\n\nres = str.split(\"\", \"foo\");\nassert (res.length === 0);\n\nres = str.split(\"\", \"4\");\nassert (res.length === 4);\nfor (var i = 0; i < res.length; i++)\n{\n  assert (res[i] === str[i]);\n}\n\nres = str.split(undefined, undefined)\nassert (res.length === 1);\nassert (res[0] === \"foo//bar/baz//foo\");\n\nres = str.split(\"a\", false);\nassert (res.length === 0);\n\nres = str.split(\"a\", true);\nassert (res.length === 1);\nassert (res[0] === \"foo//b\");\n\nres = str.split(\"a\", NaN);\nassert (res.length === 0);\n\nres = str.split([\"o\"])\nassert (res.length === 5);\nassert (res[0] === \"f\");\nassert (res[1] === \"\");\nassert (res[2] === \"//bar/baz//f\");\nassert (res[3] === \"\");\nassert (res[4] === \"\");\n\nres = str.split([\"o\", \"/\"]);\nassert (res.length === 1);\nassert (res[0] === \"foo//bar/baz//foo\");\n\nres = str.split(\"a\", [\"2\"]);\nassert (res.length === 2);\nassert (res[0] === \"foo//b\");\nassert (res[1] === \"r/b\");\n\nres = str.split(\"a\", [\"2\", \"3\"]);\nassert (res.length === 0);\n\nvar obj = {x: 12, b: undefined};\nres = str.split(obj, 4);\nassert (res.length === 1);\nassert (res[0] === \"foo//bar/baz//foo\");\n\nres = str.split(\"o\", obj);\nassert (res.length === 0);\n\nres = str.split(false, true);\nassert (res.length === 1);\nassert (res[0] === \"foo//bar/baz//foo\");\n\nres = str.split(/\\/\\//);\nassert (res.length === 3);\nassert (res[0] === \"foo\");\nassert (res[1] === \"bar/baz\");\nassert (res[2] === \"foo\");\n\nres = str.split(/\\/\\//, 1);\nassert (res.length === 1);\nassert (res[0] === \"foo\");\n\nstr = \"fo123o12bar\";\nres = str.split(12, undefined);\nassert (res.length === 3);\nassert (res[0] === \"fo\");\nassert (res[1] === \"3o\");\nassert (res[2] === \"bar\");\n\nstr = \"aaabababaab\";\nres = str.split(/aa+/);\nassert (res.length === 3);\nassert (res[0] === \"\");\nassert (res[1] === \"babab\");\nassert (res[2] === \"b\");\n\nstr = \"A<B>bold</B>and<CODE>coded</CODE>\";\nres = str.split(/<(\\/)?([^<>]+)>/);\nassert (res.length === 13);\nvar expected = [\"A\", undefined, \"B\", \"bold\", \"/\", \"B\", \"and\", undefined, \"CODE\", \"coded\", \"/\", \"CODE\", \"\"];\nfor (var i = 0; i < res.length; i++)\n{\n  assert (res[i] === expected[i]);\n}\n\n/* Check Object coercible */\ntry {\n  String.prototype.split.call(undefined, \"\");\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n\n/* Check toString conversion */\ntry {\n  var obj = { toString: function() { throw new ReferenceError(\"foo\"); } };\n  String.prototype.split.call(obj, \"\");\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n  assert (e.message === \"foo\");\n}\n\n/* Check Invalid RegExp */\ntry {\n  var obj = { toString: function() { throw new ReferenceError(\"foo\"); } };\n  \"\".split(obj);\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n  assert (e.message === \"foo\");\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-substr.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// check properties\n\nfunction length_configurable()\n{\n  function is_es51() {\n    return (typeof g === \"function\");\n    { function g() {} }\n  }\n  return is_es51() ? false : true;\n}\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.substr, 'length').configurable === length_configurable());\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.substr, 'length').enumerable === false);\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.substr, 'length').writable === false);\n\nassert(String.prototype.substr.length === 2);\n\nassert(String.prototype.substr.call(new String()) === \"\");\n\nassert(String.prototype.substr.call({}) === \"[object Object]\");\n\n// check this is undefined\ntry {\n  String.prototype.substr.call(undefined);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check this is null\ntry {\n  String.prototype.substr.call(null);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// simple checks\nassert(\"Hello world!\".substr(0, 11) === \"Hello world\");\n\nassert(\"Hello world!\".substr(11, 0) === \"\");\n\nassert(\"Hello world!\".substr(0, 12) === \"Hello world!\");\n\nassert(\"Hello world!\".substr(12, 0) === \"\");\n// check NaN\nassert(\"Hello world!\".substr(NaN, 12) === \"Hello world!\");\n\n// check NaN\nassert(\"Hello world!\".substr(2, NaN) === \"\");\n\n// check end undefined\nassert(\"Hello world!\".substr(2, undefined) === \"llo world!\");\n\n// check negative\nassert(\"Hello world!\".substr(-1,8) === \"!\");\n\n// check negative\nassert(\"Hello\\tworld!\".substr(5,-8) === \"\");\n\n// check negative\nassert(\"Hello world!\".substr(-1,-8) === \"\");\n\n// check ranges\nassert(\"Hello world!\".substr(-1,10000) === \"!\");\n\nassert(\"Hello world!\".substr(10000,1000000) === \"\");\n\nassert(\"Hello world!\".substr(100000,1) === \"\");\n\n// check both undefined\nassert(\"Hello world!\".substr(undefined, undefined) === \"Hello world!\");\n\nvar undef_var;\nassert(\"Hello world!\".substr(undef_var, undef_var) === \"Hello world!\");\n\n// check integer conversion\nassert(\"Hello world!\".substr(undefined, 5) === \"Hello\");\n\nassert(\"Hello world!\".substr(undefined, \"bar\") === \"\");\n\nassert(\"Hello world!\".substr(2, true) === \"l\");\n\nassert(\"Hello world!\".substr(2, false) === \"\");\n\nassert(\"Hello world!\".substr(5, obj) === \" world!\");\n\n// check other objects\nvar obj = { substr : String.prototype.substr }\n\nobj.toString = function() {\n    return \"Iam\";\n}\nassert(obj.substr(0,1) === \"I\");\n\nobj.toString = function() {\n  throw new ReferenceError (\"foo\");\n};\n\ntry {\n  assert(obj.substr(100000,1));\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// check coercible - undefined\ntry {\n  assert(true.substr() === \"\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - null\ntry {\n  assert(String.prototype.substr.call(null, 0, 1) === \"\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - Boolean\nassert(String.prototype.substr.call(true, 0, 1) === \"t\");\n\n// check coercible - Object\nvar test_object = {firstName:\"John\", lastName:\"Doe\"};\nassert(String.prototype.substr.call(test_object, 0, 7) === \"[object\");\n\n// check coercible - Number\nassert(String.prototype.substr.call(123, 0, 3) === \"123\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-substring.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// check properties\n\nfunction length_configurable()\n{\n  function is_es51() {\n    return (typeof g === \"function\");\n    { function g() {} }\n  }\n  return is_es51() ? false : true;\n}\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.substring, 'length').configurable === length_configurable());\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.substring, 'length').enumerable === false);\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.substring, 'length').writable === false);\n\nassert(String.prototype.substring.length === 2);\n\nassert(String.prototype.substring.call(new String()) === \"\");\n\nassert(String.prototype.substring.call({}) === \"[object Object]\");\n\n// check this is undefined\ntry {\n  String.prototype.substring.call(undefined);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check this is null\ntry {\n  String.prototype.substring.call(null);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// simple checks\nassert(\"hello world!\".substring(0, 11) === \"hello world\");\n\nassert(\"hello world!\".substring(11, 0) === \"hello world\");\n\nassert(\"hello world!\".substring(0, 12) === \"hello world!\");\n\nassert(\"hello world!\".substring(12, 0) === \"hello world!\");\n\n// check NaN\nassert(\"hello world!\".substring(NaN, 12) === \"hello world!\");\n\n// check NaN\nassert(\"hello world!\".substring(2, NaN) === \"he\");\n\n// check end undefined\nassert(\"hello world!\".substring(2, undefined) === \"llo world!\");\n\n// check negative\nassert(\"hello world!\".substring(-1,8) === \"hello wo\");\n\n// check negative\nassert(\"hello\\tworld!\".substring(5,-8) === \"hello\");\n\n// check negative\nassert(\"hello world!\".substring(-1,-8) === \"\");\n\n// check ranges\nassert(\"hello world!\".substring(-1,10000) === \"hello world!\");\n\nassert(\"hello world!\".substring(10000,1000000) === \"\");\n\nassert(\"hello world!\".substring(100000,1) === \"ello world!\");\n\n// check both undefined\nassert(\"hello world!\".substring(undefined, undefined) === \"hello world!\");\n\nvar undef_var;\nassert(\"hello world!\".substring(undef_var, undef_var) === \"hello world!\");\n\n// check integer conversion\nassert(\"hello world!\".substring(undefined, 5) === \"hello\");\n\nassert(\"hello world!\".substring(undefined, \"bar\") === \"\");\n\nassert(\"hello world!\".substring(2, true) === \"e\");\n\nassert(\"hello world!\".substring(2, false) === \"he\");\n\nassert(\"hello world!\".substring(5, obj) === \" world!\");\n\n// check other objects\nvar obj = { substring : String.prototype.substring }\n\nobj.toString = function() {\n    return \"Iam\";\n}\nassert(obj.substring(100000,1) === \"am\");\n\nobj.toString = function() {\n  throw new ReferenceError (\"foo\");\n};\n\ntry {\n  assert(obj.substring(100000,1));\n  assert(false);\n} catch (e) {\n  assert(e.message === \"foo\");\n  assert(e instanceof ReferenceError);\n}\n\n// check coercible - undefined\ntry {\n  assert(true.substring() === \"\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - null\ntry {\n  assert(String.prototype.substring.call(null, 0, 1) === \"\");\n  assert(false);\n} catch (e) {\n  assert(e instanceof TypeError);\n}\n\n// check coercible - Boolean\nassert(String.prototype.substring.call(true, 0, 1) === \"t\");\n\n// check coercible - Object\nvar test_object = {firstName:\"John\", lastName:\"Doe\"};\nassert(String.prototype.substring.call(test_object, 0, 7) === \"[object\");\n\n// check coercible - Number\nassert(String.prototype.substring.call(123, 0, 3) === \"123\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype-trim.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// check properties\n\nfunction length_configurable()\n{\n  function is_es51() {\n    return (typeof g === \"function\");\n    { function g() {} }\n  }\n  return is_es51() ? false : true;\n}\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.trim, 'length').configurable === length_configurable());\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.trim, 'length').enumerable === false);\n\nassert(Object.getOwnPropertyDescriptor(String.prototype.trim, 'length').writable === false);\n\nassert(String.prototype.trim.length === 0);\n\n// check this value\nassert(String.prototype.trim.call(new String()) === \"\");\n\nassert(String.prototype.trim.call({}) === \"[object Object]\");\n\n// check undefined\ntry {\n  String.prototype.trim.call(undefined);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// check null\ntry {\n  String.prototype.trim.call(null);\n  assert(false);\n} catch(e) {\n  assert(e instanceof TypeError);\n}\n\n// simple checks\nassert(\" hello world\".trim() === \"hello world\");\n\nassert(\"hello world \".trim() === \"hello world\");\n\nassert(\"    hello world   \".trim() === \"hello world\");\n\nassert(\"\\t  hello world\\n\".trim() === \"hello world\");\n\nassert(\"\\t\\n  hello world\\t \\n \".trim() === \"hello world\");\n\nassert(\"hello world\\n   \\t\\t\".trim() === \"hello world\");\n\nassert(\" hello world \\\\ \".trim() === \"hello world \\\\\");\n\nassert(\"**hello world**\".trim() === \"**hello world**\");\n\nassert(\" \\t \\n\".trim() === \"\");\n\nassert(\"          \".trim() === \"\");\n\nassert(\"\".trim() === \"\");\n\nassert(\"\\uf389\".trim() === \"\\uf389\");\nassert(String.prototype.trim.call('\\uf389') === \"\\uf389\");\nassert(\"\\u20291\\u00D0\".trim() === \"1\\u00D0\");\nassert(\"\\u20291\\u00A0\".trim() === \"1\");\n\nassert(\"\\u0009\\u000B\\u000C\\u0020\\u00A01\".trim() === \"1\");\nassert(\"\\u000A\\u000D\\u2028\\u202911\".trim() === \"11\");\n\nassert(\"\\u0009\\u000B\\u000C\\u0020\\u00A01\\u0009\\u000B\\u000C\\u0020\\u00A0\".trim() === \"1\");\nassert(\"\\u000A\\u000D\\u2028\\u202911\\u000A\\u000D\\u2028\\u2029\".trim() === \"11\");\n\nassert (\"\\u200B\".trim() === '\\u200B')\nassert (\"\\u200A\".trim() === '')\nassert (\"\\u00A0\".trim() === '')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-prototype.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (String.prototype.length === 0);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-surrogates-concat.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar str0 = \"𐐀\";\nvar str1 = \"\\ud801\\udc00\";\nvar str2 = \"\\ud801\";\nvar str3 = \"\\udc00\";\n\nvar str_concat = str2 + str3;\n\nassert(str0 == str_concat);\nassert(str1 == str_concat);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string-upper-lower-case-conversion.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// LATIN SMALL LIGATURES\n// LATIN SMALL LIGATURE FF\nassert (\"\\ufb00\".toLowerCase() == \"\\ufb00\");\nassert (\"\\ufb00\".toUpperCase() == \"\\u0046\\u0046\");\n// LATIN SMALL LIGATURE FI\nassert (\"\\ufb01\".toLowerCase() == \"\\ufb01\");\nassert (\"\\ufb01\".toUpperCase() == \"\\u0046\\u0049\");\n// LATIN SMALL LIGATURE FL\nassert (\"\\ufb02\".toLowerCase() == \"\\ufb02\");\nassert (\"\\ufb02\".toUpperCase() == \"\\u0046\\u004c\");\n// LATIN SMALL LIGATURE FFI\nassert (\"\\ufb03\".toLowerCase() == \"\\ufb03\");\nassert (\"\\ufb03\".toUpperCase() == \"\\u0046\\u0046\\u0049\");\n// LATIN SMALL LIGATURE FFL\nassert (\"\\ufb04\".toLowerCase() == \"\\ufb04\");\nassert (\"\\ufb04\".toUpperCase() == \"\\u0046\\u0046\\u004c\");\n// LATIN SMALL LIGATURE LONG S T\nassert (\"\\ufb05\".toLowerCase() == \"\\ufb05\");\nassert (\"\\ufb05\".toUpperCase() == \"\\u0053\\u0054\");\n// LATIN SMALL LIGATURE ST\nassert (\"\\ufb06\".toLowerCase() == \"\\ufb06\");\nassert (\"\\ufb06\".toUpperCase() == \"\\u0053\\u0054\");\n\n// LATIN CAPITAL LETTER I WITH DOT ABOVE\nassert (\"\\u0130\".toLowerCase() == \"\\u0069\\u0307\");\nassert (\"\\u0130\".toUpperCase() == \"\\u0130\");\n\n// LATIN SMALL LETTER SHARP S\nassert (\"\\u00df\".toLowerCase() == \"\\u00df\");\nassert (\"\\u00df\".toUpperCase() == \"\\u0053\\u0053\");\n\n// LATIN CAPITAL LETTER I WITH BREVE\nassert (\"\\u012c\".toLowerCase() == \"\\u012d\");\nassert (\"\\u012c\".toUpperCase() == \"\\u012c\");\n// LATIN SMALL LETTER I WITH BREVE\nassert (\"\\u012d\".toLowerCase() == \"\\u012d\")\nassert (\"\\u012d\".toUpperCase() == \"\\u012c\");\n\n// Check randomly selected characters from conversion tables\n\n// lower-case conversions\nassert (\"\\u01c5\\u01c8\\u01cb\\u212b\".toLowerCase() == \"\\u01c6\\u01c9\\u01cc\\u00e5\");\nassert (\"\\u0130\".toLowerCase() == \"\\u0069\\u0307\");\n\n// upper-case conversions\nassert (\"\\u00b5\\u017f\".toUpperCase() == \"\\u039c\\u0053\");\nassert (\"\\ufb17\\u00df\\u1fbc\".toUpperCase() == \"\\u0544\\u053D\\u0053\\u0053\\u0391\\u0399\");\nassert (\"\\ufb03\\ufb04\".toUpperCase() == \"\\u0046\\u0046\\u0049\\u0046\\u0046\\u004c\");\n\n// character case ranges\nassert (\"\\u0100\\u0101\\u0139\\u03fa\\ua7b4\".toLowerCase() == \"\\u0101\\u0101\\u013a\\u03fb\\ua7b5\");\nassert (\"\\u0101\\u0100\\u013a\\u03fb\\ua7b5\".toUpperCase() == \"\\u0100\\u0100\\u0139\\u03fa\\ua7b4\");\n\n// character pairs\nassert (\"\\u0178\\ua7b1\\u0287\\ua7b3\".toLowerCase() == \"\\u00ff\\u0287\\u0287\\uab53\");\nassert (\"\\u00ff\\u0287\\ua7b1\\uab53\".toUpperCase() == \"\\u0178\\ua7b1\\ua7b1\\ua7b3\");\n\n// character case ranges\nassert (\"\\u00e0\\u00c0\\u00c1\\u00c2\\uff21\".toLowerCase() == \"\\u00e0\\u00e0\\u00e1\\u00e2\\uff41\");\nassert (\"\\u00e0\\u00c0\\u00e1\\u00e2\\uff41\".toUpperCase() == \"\\u00c0\\u00c0\\u00c1\\u00c2\\uff21\");\n\n// lower-case ranges\nassert (\"\\u1f88\\u1f98\\u1fa8\\u1f8b\\u1faf\".toLowerCase() == \"\\u1f80\\u1f90\\u1fa0\\u1f83\\u1fa7\");\n\n// upper-case special ranges\nassert (\"\\u1f80\\u1f81\\u1fa7\".toUpperCase() == \"\\u1f08\\u0399\\u1f09\\u0399\\u1f6f\\u0399\");\n\nassert (\"0123456789abcdefghijklmnopqrstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ\".toLowerCase()\n        == \"0123456789abcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxyz\");\nassert (\"0123456789abcdefghijklmnopqrstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ\".toUpperCase()\n        == \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZYABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n\n// Conversion of non-string objects.\n\nassert (String.prototype.toUpperCase.call(true) == \"TRUE\");\nassert (String.prototype.toLowerCase.call(-23) == \"-23\");\n\nvar object = { toString : function() { return \"<sTr>\"; } };\nassert (String.prototype.toUpperCase.call(object) == \"<STR>\");\nassert (String.prototype.toLowerCase.call(object) == \"<str>\");\n\ntry\n{\n  String.prototype.toUpperCase.call(null);\n  assert(false);\n}\ncatch (e)\n{\n  assert (e instanceof TypeError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/string.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = 'abcd';\nvar b = 'dfgh';\n\nc = a + b;\n\nassert(c == a + b);\nassert(c === a + b);\nassert(c != a);\nassert(c != b);\nassert(c !== a);\nassert(c !== b);\nassert(c != b + a);\nassert(c !== b + a);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/switch-case.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = 1;\n\nswitch (a) {\n  case 1:\n  case 2:\n    break;\n  case 3:\n    assert (0);\n}\n\nswitch (a) {\n  case 1:\n    break;\n  case 2:\n  case 3:\n    assert (0);\n}\n\nswitch (a) {\n  default:\n    assert (0);\n  case 1:\n    break;\n  case 2:\n  case 3:\n    assert (0);\n}\n\nswitch (a) {\n  default:\n    break;\n  case 2:\n  case 3:\n    assert (0);\n}\n\nswitch (a) {\n  case 3:\n    assert (0);\n  default:\n    assert (0);\n  case 1:\n}\n\nexecuted_case = '';\nswitch (a) {\n  default:\n    executed_case = 'default';\n    break;\n  case 2:\n    executed_case = 'case 2';\n    break;\n}\nassert (executed_case === 'default');\n\nvar counter = 0;\n\nswitch (\"var\") {\n  case \"var\":\n    counter++;\n  case \"var1\":\n    counter++;\n  case \"var2\":\n    counter++;\n  default:\n    counter++;\n}\n\nassert (counter === 4);\n\nvar flow = '';\n\nswitch (\"var\") {\n  case \"var\":\n    flow += '1';\n  case \"var1\":\n    flow += '2';\n  case \"var2\":\n    flow += '3';\n    switch (flow) {\n      case '123':\n       flow += 'a';\n       break;\n      default:\n       flow += 'b';\n    }\n  default:\n    flow += '4';\n}\n\nassert (flow === '123a4');\n\nswitch (0) { case 0: for (;false;); case 1: }\nswitch (0) { case 0: while (false); case 1: }\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/test-new-string.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar a = new String ('abcd');\nvar b = String.fromCharCode (97, 98, 99, 100);\n\nassert (a + '' === 'abcd');\nassert (b + '' === 'abcd');\nassert (a + b === 'abcdabcd');\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/test_suite_06.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_06__004() {\n  var arg = 3;\n  function a() {\n    return 5 + arg;\n  }\n\n  arg = 4;\n  var b = function () {\n    return 6 + arg;\n  };\n\n  arg = 5;\n  c = function e() {\n    return 7 + arg;\n  };\n\n  assert(a() + b() + c() === 33);\n})();\n\n(function tc_06__005() {\n  var a = \"\\u0410\\u0411\";\n  var b = \"\\u0509\\u0413\";\n\n  assert(a < b);\n})();\n\n(function tc_06__003() {\n  var obj = new Object();\n\n  function c(arg)\n  {\n    var obj = new Object();\n    obj.par = arg;\n    obj.print = function () {\n      return arg;\n    };\n    return obj;\n  }\n\n  var a = c(5);\n  var b = c(6);\n  assert(a.print() + b.par === 11);\n})();\n\n(function tc_06__001() {\n  var str = \"a\\u000Ab\";\n  assert(str[1] === '\\n');\n})();\n\n(function tc_06__002() {\n  function c(arg)\n  {\n    var obj = new Object();\n    obj.print = function () {\n      f = arg;\n    };\n    return obj;\n  }\n\n  a = c(5);\n  b = c(6);\n\n  a.print.toString = 7;\n\n  assert(typeof a.print.toString !== typeof b.print.toString);\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/test_suite_07.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_07_09__002() {\n  function test()\n  {\n    var a = 1, b = 2;\n\n    return\n    a + b\n  }\n\n  var v = test();\n\n  assert(v !== 3);\n\n  assert(typeof v === \"undefined\")\n})();\n\n(function tc_07_09__008() {\n  function test()\n  {\n    var a = 10, b = 5;\n    var c = a + b\n\n    return c;\n  }\n\n  assert(test() == 15);\n})();\n\n(function tc_07_09__004() {\n  var obj = new Object();\n\n  function c(arg)\n  {\n    var obj = new Object();\n    obj.par = arg;\n    obj.print = function () {\n      return arg;\n    }\n    return obj;\n  }\n\n  var a, b = 1, d = 2, e = 3;\n\n  a = b + c\n          (d + e).print()\n\n  assert(a === 6);\n})();\n\n(function tc_07_09__005() {\n  var b = 4, c = 5;\n\n  a = b\n  --c\n\n  assert(a === 4 && c === 4);\n})();\n\n(function tc_07_09__007() {\n  var mainloop = 1, cnt = 0;\n\n  for (var i = 0; i < 10; ++i)\n  {\n    for (var j = 0; j < 10; ++j)\n    {\n      if (j == 6)\n      {\n        break\n        mainloop\n      }\n\n      ++cnt;\n    }\n  }\n\n  assert(cnt == 60);\n})();\n\n(function tc_07_09__009() {\n  {\n    var a, b = 3, c = 30;\n    a = b + c}\n\n  assert (a == 33);\n})();\n\n(function tc_07_09__010() {\n  assert (glob === undefined);\n\n  var glob = 34\n\n  assert (glob === 34);\n})();\n\n(function tc_07_09__003() {\n  var b = 4, c = 5;\n\n  a = b\n  ++c\n\n  assert(a === 4 && c === 6);\n})();\n\n(function tc_07_09__001() {\n  { 1\n  2 } 3\n})();\n\n(function tc_07_09__006() {\n  var mainloop = 1, cnt = 0;\n\n  for (var i = 0; i < 10; ++i)\n  {\n    for (var j = 0; j < 10; ++j)\n    {\n      if (j == 6)\n      {\n        continue\n        mainloop\n      }\n\n      ++cnt;\n    }\n  }\n\n  assert(cnt == 90);\n})();\n\n(function tc_07_06_01__001() {\n  var package = 1;\n})();\n\n(function tc_07_08_05__001() {\n  /a[a-z]/.exec(\"abcdefghi\");\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/test_suite_08.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_08_02__001() {\n  var x = null;\n})();\n\n(function tc_08_02__002() {\n  assert(typeof null == 'object');\n})();\n\n(function tc_08_05__002() {\n  assert(typeof -Infinity == 'number');\n})();\n\n(function tc_08_05__001() {\n  a = 0x3e7;\n  assert(a == 999);\n})();\n\n(function tc_08_05__003() {\n  assert(0 > -Infinity);\n})();\n\n(function tc_08_04__009() {\n  var str = \"\";\n  var strObj = new String(\"\");\n  var strObj_ = new String();\n\n  assert(str.constructor === strObj.constructor);\n})();\n\n(function tc_08_04__007() {\n  var str = 'ABC';\n  var strObj = new String('ABC');\n  assert(str == strObj);\n})();\n\n(function tc_08_04__005() {\n  var s = 'hello';\n  assert(s[5] == undefined);\n})();\n\n(function tc_08_04__001() {\n  a = '';\n  assert(typeof a == \"string\");\n})();\n\n(function tc_08_04__017() {\n  var __str__ = \"\\u0041\\u0042\\u0043\" + 'ABC'\n  assert(__str__ === 'ABCABC');\n})();\n\n(function tc_08_04__004() {\n  var s = 'hello';\n  assert(s[0] == 'h');\n})();\n\n(function tc_08_04__016() {\n  var str = \"\";\n  var strObj = new String;\n\n  assert(typeof str != typeof strObj);\n})();\n\n(function tc_08_04__015() {\n  var str = \"\";\n  var strObj = new String;\n\n  assert(str !== strObj);\n})();\n\n(function tc_08_04__014() {\n  var str = \"\";\n  var strObj = new String;\n\n  assert(str == strObj);\n})();\n\n(function tc_08_04__003() {\n  var str = \"test\";\n  assert(str.constructor === String);\n})();\n\n(function tc_08_04__002() {\n  assert((\"x\\0a\" < \"x\\0b\") && (\"x\\0b\" < \"x\\0c\"));\n})();\n\n(function tc_08_04__010() {\n  var str = \"\";\n  var strObj = new String(\"\");\n  var strObj_ = new String();\n\n  assert(str.constructor === strObj_.constructor);\n})();\n\n(function tc_08_04__008() {\n  var str = 'ABC';\n  var strObj = new String('ABC');\n\n  assert(str !== strObj);\n})();\n\n(function tc_08_04__011() {\n  var str = \"\";\n  var strObj = new String(\"\");\n  var strObj_ = new String();\n\n  assert(str == strObj);\n})();\n\n(function tc_08_04__012() {\n  var str = \"\";\n  var strObj = new String(\"\");\n  var strObj_ = new String();\n\n  assert(str !== strObj);\n})();\n\n(function tc_08_04__013() {\n  var str = \"\";\n  var strObj = new String;\n\n  assert(str.constructor === strObj.constructor);\n})();\n\n(function tc_08_04__006() {\n  var str = 'ABC';\n  var strObj = new String('ABC');\n  assert(str.constructor === strObj.constructor);\n})();\n\n(function tc_08_01__011() {\n  assert (test ());\n\n  function test (arg)\n  {\n    if (typeof (arg) === \"undefined\")\n      return true;\n    else\n      return false;\n  }\n})();\n\n(function tc_08_01__009() {\n  var x;\n  assert(test1() === void 0);\n\n  function test1(x) {\n    return x;\n  }\n})();\n\n(function tc_08_01__008() {\n  var x;\n  assert(x === void 0);\n})();\n\n(function tc_08_01__010() {\n  assert (test ());\n\n  function test (arg)\n  {\n    if (typeof (arg) === \"undefined\")\n      return true;\n    else\n      return false;\n  }\n})();\n\n(function tc_08_01__001() {\n  var a;\n  assert(typeof (a) === \"undefined\");\n})();\n\n(function tc_08_01__006() {\n  assert(typeof (void 0) === \"undefined\");\n})();\n\n(function tc_08_01__002() {\n  var o = {};\n\n  assert(typeof (o.empty) === \"undefined\");\n})();\n\n(function tc_08_01__003() {\n  var a;\n  var b = null;\n\n  assert(a == b);\n})();\n\n(function tc_08_01__005() {\n  a = foo();\n\n  assert(typeof (a) === \"undefined\");\n\n  function foo() {\n  }\n})();\n\n(function tc_08_01__007() {\n  assert(undefined === void 0);\n})();\n\n(function tc_08_01__004() {\n  var a;\n  assert(!a);\n})();\n\n(function tc_08_03__003() {\n  assert(!(false == true));\n})();\n\n(function tc_08_03__001() {\n  var a = true;\n  assert(a);\n})();\n\n(function tc_08_03__002() {\n  var a = false;\n  assert(!a);\n})();\n\n(function tc_08_03__004() {\n  assert(!(false === true));\n})();\n\n(function tc_08_12_02__001() {\n  var prot = {\n    b: 3\n  };\n\n  function Custom() {\n  }\n\n  Custom.prototype = prot;\n\n  var obj = new Custom();\n\n  assert(obj.b === 3);\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/test_suite_10.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_10_03_01__001() {\n  a = 10;\n\n  function foo() {\n    var b = 20;\n\n    assert(a + b === 30);\n  }\n\n  foo();\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/test_suite_11.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_11_10__001() {\n  var a = 10;\n  a = 1 & 2;\n  assert(a == 0)\n})();\n\n(function tc_11_10__006() {\n  var a;\n  a = 4 | 1;\n  assert(a == 5)\n})();\n\n(function tc_11_10__004() {\n  var a = 4;\n  var b = null;\n  a = 1 & b;\n  assert(a == 0)\n})();\n\n(function tc_11_10__016() {\n  var a = 10;\n  a = 1 & 2147483648;\n  assert(a == 0)\n})();\n\n(function tc_11_10__017() {\n  var a = 10;\n  a = 1 & 2147483647;\n  assert(a == 1)\n})();\n\n(function tc_11_10__003() {\n  var a = 4;\n  var b = \"0\";\n  a = 1 & b;\n  assert(a == 0)\n})();\n\n(function tc_11_10__008() {\n  var a;\n  var b = \"0\";\n  a = 1 | b;\n  assert(a == 1)\n})();\n\n(function tc_11_10__010() {\n  var a = 4;\n  var b;\n  a = 1 | b;\n  assert(a == 1)\n})();\n\n(function tc_11_10__012() {\n  var a = 4;\n  var b = 1;\n  a ^ b;\n  assert(a == 4 && b == 1)\n})();\n\n(function tc_11_10__011() {\n  var a;\n  a = 1 ^ 3;\n  assert(a == 2)\n})();\n\n(function tc_11_10__015() {\n  var a = 4;\n  var b;\n  a = 1 ^ b;\n  assert(a == 1)\n})();\n\n(function tc_11_10__014() {\n  var a = 4;\n  var b = null;\n  a = 1 ^ b;\n  assert(a == 1)\n})();\n\n(function tc_11_10__013() {\n  var a;\n  var b = \"0\";\n  a = 1 ^ b;\n  assert(a == 1)\n})();\n\n(function tc_11_10__007() {\n  var a = 4;\n  var b = 1;\n  a | b;\n  assert(a == 4 && b == 1)\n})();\n\n(function tc_11_10__009() {\n  var a = 4;\n  var b = null;\n  a = 1 | b;\n  assert(a == 1)\n})();\n\n(function tc_11_10__002() {\n  var a = 4;\n  var b = 1;\n  a & b;\n  assert(a == 4 && b == 1)\n})();\n\n(function tc_11_10__005() {\n  var a = 4;\n  var b;\n  a = 1 & b;\n  assert(a == 0)\n})();\n\n(function tc_11_10__018() {\n  var a = 10;\n  a = 2147483647 & 2147483649;\n  assert(a == 1)\n})();\n\n(function tc_11_01_06__003() {\n  var a = 2;\n  var b = 3;\n\n  assert((a) + (b) === (a + b));\n})();\n\n(function tc_11_01_06__009() {\n  assert(typeof (a) === \"undefined\");\n})();\n\n(function tc_11_01_06__006() {\n  a = {\n    n: Number,\n    s: String\n  }\n\n  assert(typeof (a.property) === \"undefined\");\n})();\n\n(function tc_11_01_06__005() {\n  a = {\n    n: Number,\n    s: String\n  }\n\n  assert(delete(a.n) === true);\n})();\n\n(function tc_11_01_06__004() {\n  a = {\n    n: Number,\n    s: String\n  };\n  b = {\n    n: Number,\n    s: String\n  };\n  a.n = 1;\n  b.n = 2;\n  a.s = \"qwe\";\n  b.s = \"rty\";\n\n  assert(((a).n + (b).n === 3) && ((a).s + (b).s === \"qwerty\"));\n})();\n\n(function tc_11_01_06__002() {\n  var a = 1;\n  var b = 2;\n  assert(a + b === (a + b));\n})();\n\n(function tc_11_01_06__001() {\n  var a = [1, 2, 4];\n  var cnt = 0;\n\n  for (var i = (0 in a) ? 1 : 2; i < 10; ++i)\n  {\n    ++cnt;\n  }\n\n  assert(cnt == 9);\n})();\n\n(function tc_11_01_05__001() {\n  var a = {\n    b: 5\n  };\n\n  assert(a.b === 5);\n})();\n\n(function tc_11_01_05__006() {\n  var a = {\n    get a() {\n      return 3;\n    }\n  };\n\n  assert(a.a === 3);\n})();\n\n(function tc_11_01_05__008() {\n  var a = {\n    _a: 3,\n    get a() {\n      return this._a;\n    },\n    set a(newa) {\n      this._a = newa;\n    }\n\n  };\n\n  a.a = 5;\n\n  assert(a.a === 5);\n})();\n\n(function tc_11_01_05__002() {\n  var a = {\n    \"b\": 5\n  };\n\n  assert(a.b === 5);\n})();\n\n(function tc_11_01_05__004() {\n  var a = {\n    10.25: 5\n  };\n\n  assert(a[10.25] === 5);\n})();\n\n(function tc_11_01_05__003() {\n  var a = {\n    10: 5\n  };\n\n  assert(a[10] === 5);\n})();\n\n(function tc_11_01_05__007() {\n  var a = {\n    _a: 3,\n    get a() {\n      return this._a;\n    }\n  };\n\n  a._a = 5;\n\n  assert(a.a === 5);\n})();\n\n(function tc_11_01_05__005() {\n  var a = {\n    prop1: 1,\n    prop2: 2\n  };\n\n  assert(a.prop1 === 1 && a.prop2 === 2);\n})();\n\n(function tc_11_13_02__013() {\n  var a = 0xffffffff;\n  var _a = a;\n  var b = 4;\n  assert ((a <<= b) === (_a << b));\n})();\n\n(function tc_11_13_02__047() {\n  object = {\n    valueOf: function () {\n      return 16\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object >>>= 2) === (copyObject >>> 2)) && (object === (copyObject >>> 2)))\n})();\n\n(function tc_11_13_02__005() {\n  var a = true;\n  var b = false;\n  a += b;\n  assert(a === 1)\n})();\n\n(function tc_11_13_02__039() {\n  var a = 4;\n  var _a = a;\n  var b = 10;\n  assert((a %= b) === (_a % b))\n})();\n\n(function tc_11_13_02__040() {\n  object = {\n    valueOf: function () {\n      return 1\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object *= 2) === (copyObject * 2)) && (object === (copyObject * 2)))\n})();\n\n(function tc_11_13_02__050() {\n  object = {\n    valueOf: function () {\n      return 1\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object ^= 1) === (copyObject ^ 1)) && (object === (copyObject ^ 1)))\n})();\n\n(function tc_11_13_02__008() {\n  var a = 5;\n  var _a = a;\n  var b = 10;\n  assert((a -= b) === (_a - b))\n})();\n\n(function tc_11_13_02__002() {\n  var a = 1;\n  var b = \"2\";\n  a += b;\n  assert(a === \"12\")\n})();\n\n(function tc_11_13_02__011() {\n  var a = 102;\n  var _a = a;\n  var b = 10;\n  assert(((a %= b) === (_a % b)) && (a === (_a % b)))\n})();\n\n(function tc_11_13_02__014() {\n  var a = 0xffffffff;\n  var _a = a;\n  var b = 4;\n  assert ((a >>>= b) === (_a >>> b));\n})();\n\n(function tc_11_13_02__001() {\n  var a = 1;\n  var b = 2;\n  a += b;\n  assert(a === 3);\n})();\n\n(function tc_11_13_02__003() {\n  var a = \"1\";\n  var b = 2;\n  a += b;\n  assert(a === \"12\")\n})();\n\n(function tc_11_13_02__043() {\n  object = {\n    valueOf: function () {\n      return 178\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object /= 2) === (copyObject / 2)) && (object === (copyObject / 2)))\n})();\n\n(function tc_11_13_02__007() {\n  var a = 3;\n  var _a = a;\n  var b = 7;\n  assert((a += b) === (_a + b))\n})();\n\n(function tc_11_13_02__045() {\n  object = {\n    valueOf: function () {\n      return 16\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object <<= 2) === (copyObject << 2)) && (object === (copyObject << 2)))\n})();\n\n(function tc_11_13_02__010() {\n  var a = 1;\n  var _a = a;\n  var b = 10.6;\n  assert((a /= b) === (_a / b))\n})();\n\n(function tc_11_13_02__046() {\n  object = {\n    valueOf: function () {\n      return 16\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object >>= 2) === (copyObject >> 2)) && (object === (copyObject >> 2)))\n})();\n\n(function tc_11_13_02__042() {\n  object = {\n    valueOf: function () {\n      return 15\n    },\n    toString: function () {\n      return \"\"\n    }\n  }\n\n  copyObject = object;\n  assert(((object -= 2) === (copyObject - 2)) && (object === (copyObject - 2)))\n})();\n\n(function tc_11_13_02__004() {\n  var a = \"1\";\n  var b = \"2\";\n  a += b;\n  assert(a === \"12\")\n})();\n\n(function tc_11_13_02__049() {\n  object = {\n    valueOf: function () {\n      return 1\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object |= 1) === (copyObject | 1)) && (object === (copyObject | 1)))\n})();\n\n(function tc_11_13_02__009() {\n  var a = 10;\n  var _a = a;\n  var b = 1.5;\n  assert((a *= b) === (_a * b))\n})();\n\n(function tc_11_13_02__044() {\n  object = {\n    valueOf: function () {\n      return 1345\n    },\n    toString: function () {\n      return \"foo\"\n    }\n  }\n\n  copyObject = object;\n  assert(((object %= 2) === (copyObject % 2)) && (object === (copyObject % 2)))\n})();\n\n(function tc_11_13_02__048() {\n  object = {\n    valueOf: function () {\n      return 1\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object &= 1) === (copyObject & 1)) && (object === (copyObject & 1)))\n})();\n\n(function tc_11_13_02__006() {\n  var a = 1;\n  var b = null;\n  a += b;\n  assert(a === 1)\n})();\n\n(function tc_11_13_02__041() {\n  object = {\n    valueOf: function () {\n      return 1\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object += 2) === (copyObject + 2)) && (object === (copyObject + 2)))\n})();\n\n(function tc_11_13_02__051() {\n  object = {\n    valueOf: function () {\n      return \"12\"\n    },\n    toString: function () {\n      return 0\n    }\n  }\n\n  copyObject = object;\n  assert(((object += 3) === (copyObject + 3)) && (object === (copyObject + 3)))\n})();\n\n(function tc_11_13_02__012() {\n  var a = 0xffffffff;\n  var _a = a;\n  var b = 4;\n  assert ((a >>= b) === (_a >> b));\n})();\n\n(function tc_11_13_01__001() {\n  var a = 5;\n  var b;\n\n  b = a;\n  assert(b == 5)\n})();\n\n(function tc_11_07_01__008() {\n  var a = 5;\n  var b = a << true;\n  assert(b == 10)\n})();\n\n(function tc_11_07_01__006() {\n  var a = null;\n  var b = a << 2;\n  assert(b == 0)\n})();\n\n(function tc_11_07_01__004() {\n  var a = 5;\n  var b = a << \"2\";\n  assert(b == 20)\n})();\n\n(function tc_11_07_01__003() {\n  var a = 5;\n  var b = a << 1 + 1;\n  assert(b == 20)\n})();\n\n(function tc_11_07_01__007() {\n  var a = 5;\n  var b = a << null;\n  assert(b == 5)\n})();\n\n(function tc_11_07_01__005() {\n  var a;\n  var b = a << 2;\n  assert(b == 0)\n})();\n\n(function tc_11_07_01__001() {\n  var a = 5;\n  var b = a << 2\n  assert(b == 20)\n})();\n\n(function tc_11_07_01__009() {\n  var a = 5;\n  var b = a << -1;\n  assert(b == -2147483648)\n})();\n\n(function tc_11_07_03__007() {\n  var a = 20;\n  var b = a >>> true;\n  assert(b == 10)\n})();\n\n(function tc_11_07_03__006() {\n  var a = 5;\n  var b = a >>> null;\n  assert(b == 5)\n})();\n\n(function tc_11_07_03__004() {\n  var a;\n  var b = a >>> 2;\n  assert(b == 0)\n})();\n\n(function tc_11_07_03__005() {\n  var a = null;\n  var b = a >>> 2;\n  assert(b == 0)\n})();\n\n(function tc_11_07_03__002() {\n  var a = 20;\n      var b = a >>> 1+1;\n  assert(b == 5)\n})();\n\n(function tc_11_07_03__003() {\n  var a = 20;\n  var b = a >>> \"2\";\n  assert(b == 5)\n})();\n\n(function tc_11_07_03__001() {\n  var a = 20;\n  var b = a >>> 2\n  assert(b == 5)\n})();\n\n(function tc_11_07_02__001() {\n  var a = 20;\n  var b = a >> 2\n  assert(b == 5)\n})();\n\n(function tc_11_07_02__003() {\n  var a = 20;\n  var b = a >> \"2\";\n  assert(b == 5)\n})();\n\n(function tc_11_07_02__004() {\n  var a;\n  var b = a >> 2;\n  assert(b == 0)\n})();\n\n(function tc_11_07_02__005() {\n  var a = null;\n  var b = a >> 2;\n  assert(b == 0)\n})();\n\n(function tc_11_07_02__009() {\n  var b = -2147483648 >> 30;\n  assert(b == -2)\n})();\n\n(function tc_11_07_02__006() {\n  var a = 5;\n  var b = a >> null;\n  assert(b == 5)\n})();\n\n(function tc_11_07_02__007() {\n  var a = 20;\n  var b = a >> true;\n  assert(b == 10)\n})();\n\n(function tc_11_07_02__002() {\n  var a = 20;\n  var b = a >> 1 + 1;\n  assert(b == 5)\n})();\n\n(function tc_11_07_02__008() {\n  var a = 5;\n  var b = a >> -1;\n  assert(b == 0)\n})();\n\n(function tc_11_02_01__004() {\n  var name = \"name\"\n  var a = {name: \"name\", value: \"1\"};\n\n  assert(a[name] == \"name\");\n})();\n\n(function tc_11_02_01__002() {\n  var a = {name: \"name\", value: \"1\"};\n  var b = {name: \"b\", value: \"1\"};\n\n  assert((a.name == b.name) || (a.value == b.value));\n})();\n\n(function tc_11_02_01__011() {\n  var a = {name: \"a\", value: 1};\n  var b = {name: \"b\", value: 1};\n\n  assert(plus(a, b) === 2);\n\n  function plus(a, b)\n  {\n    return a.value + b.value;\n  }\n})();\n\n(function tc_11_02_01__003() {\n  var a = {name: \"name\", value: \"1\"};\n\n  assert(a[1] !== \"nameeeeeeeeeee\");\n})();\n\n(function tc_11_02_01__008() {\n  var a = {name: \"a\", value: \"1\"};\n  var b = {name: \"b\", value: \"1\"};\n\n  assert(isNaN(plus(a, b)));\n\n  function plus(a, b)\n  {\n    return a.value * b.name;\n  }\n})();\n\n(function tc_11_02_01__010() {\n  var a = {name: \"a\", value: \"1\"};\n  var b = {name: \"b\", value: 1};\n\n  assert(plus(a, b) === \"11\");\n\n  function plus(a, b)\n  {\n    return a.value + b.value;\n  }\n})();\n\n(function tc_11_02_01__001() {\n  var a = {name: \"name\", value: \"1\"};\n\n  assert(a.name !== \"nameeeeeeeeeee\");\n})();\n\n(function tc_11_02_01__007() {\n  var a = {name: \"a\", value: \"1\"};\n  var b = {name: \"b\", value: \"1\"};\n  assert(plus(a, b) !== 2)\n\n  function plus(a, b)\n  {\n    return a.value + b.value;\n  }\n})();\n\n(function tc_11_02_01__009() {\n  var a = {name: \"a\", value: \"1\"};\n  var b = {name: \"b\", value: \"1\"};\n\n  assert(plus(a, b) === \"11\");\n\n  function plus(a, b)\n  {\n    return a.value + b.value;\n  }\n})();\n\n(function tc_11_02_04__003() {\n  assert(f_arg().length === 0);\n\n  function f_arg(x, y) {\n    return arguments;\n  }\n})();\n\n(function tc_11_02_04__010() {\n  f_arg = function () {\n    return arguments;\n  }\n\n  var args = f_arg (1, 2, 3);\n\n  for (var i = 0; i < 3; i++)\n  {\n    assert(args[i] === i + 1);\n  }\n\n  assert(args[3] === undefined);\n})();\n\n(function tc_11_02_04__012() {\n  f_arg = function(x,y) {\n    return arguments;\n  }\n\n  assert(f_arg(1)[0] === 1);\n})();\n\n(function tc_11_02_04__007() {\n  f_arg = function () {\n    return arguments;\n  }\n\n  assert(f_arg(1, 2, 3)[0] === 1);\n})();\n\n(function tc_11_02_04__017() {\n  function f_arg() {\n  }\n\n  try\n  {\n    f_arg(x, x = 1);\n  }\n  catch (e) {\n    assert((e instanceof ReferenceError) === true);\n  }\n})();\n\n(function tc_11_02_04__019() {\n  function f_arg() {\n  }\n\n\n  var x = function () {\n    throw \"x\";\n  };\n  var y = function () {\n    throw \"y\";\n  };\n  try\n  {\n    f_arg(x(), y());\n    assert(false);\n  }\n  catch (e)\n  {\n    if (e === \"y\")\n    {\n      assert(false);\n    } else {\n      if (e !== \"x\")\n      {\n        assert(false);\n      }\n    }\n  }\n})();\n\n(function tc_11_02_04__016() {\n  function f_arg() {\n  }\n\n  f_arg(x=1,x);\n})();\n\n(function tc_11_02_04__014() {\n  f_arg = function(x,y) {\n    return arguments;\n  }\n\n  assert(f_arg(1,2,3)[3] === undefined);\n})();\n\n(function tc_11_02_04__006() {\n  f_arg = function () {\n    return arguments;\n  }\n\n  assert(f_arg(1, 2, 3).length === 3);\n})();\n\n(function tc_11_02_04__004() {\n  assert(f_arg()[0] === undefined);\n\n  function f_arg(x,y) {\n    return arguments;\n  }\n})();\n\n(function tc_11_02_04__011() {\n  f_arg = function(x,y) {\n    return arguments;\n  }\n\n  assert(f_arg(1,2,3).length === 3);\n})();\n\n(function tc_11_02_04__001() {\n  assert(f_arg().length === 0);\n\n  function f_arg() {\n    return arguments;\n  }\n})();\n\n(function tc_11_02_04__013() {\n  f_arg = function (x, y) {\n    return arguments;\n  }\n\n  assert(f_arg(1, 2, 3)[2] === 3);\n})();\n\n(function tc_11_02_04__009() {\n  f_arg = function () {\n    return arguments;\n  }\n\n  assert(f_arg(1, 2, 3)[3] === undefined);\n})();\n\n(function tc_11_02_04__005() {\n  f_arg = function ()\n  {\n    return arguments\n  }\n\n  assert(f_arg(1, 2).length === 2);\n\n  f_arg = function () {\n    return arguments;\n  }\n})();\n\n(function tc_11_02_04__002() {\n  assert(f_arg()[0] === undefined);\n\n  function f_arg() {\n    return arguments;\n  }\n})();\n\n(function tc_11_02_04__008() {\n  f_arg = function () {\n    return arguments;\n  }\n\n  assert(f_arg(1, 2, 3)[2] === 3);\n})();\n\n(function tc_11_02_04__018() {\n  function f_arg(x, y, z) {\n    return z;\n  }\n\n  assert(f_arg(x = 1, y = x, x + y) === 2);\n})();\n\n(function tc_11_02_02__006() {\n  function Animal(name)\n  {\n    this.name = name\n    this.canWalk = true\n    if (name == \"bird\")\n    {\n      this.canFly = true;\n    }\n  }\n\n  var animal = new Animal(\"animal\");\n  var bird = new Animal(\"bird\");\n  assert(animal.canFly !== bird.canFly);\n})();\n\n(function tc_11_02_02__004() {\n  function Animal(name)\n  {\n    this.name = name\n    this.canWalk = true\n  }\n\n  var animal = new Animal(\"animal\");\n  assert(animal.someparameter != \"insect\");\n})();\n\n(function tc_11_02_02__001() {\n  function Animal(name)\n  {\n    this.name = name\n    this.canWalk = true\n  }\n\n  var animal = new Animal(\"animal\");\n  assert(animal.name === \"animal\");\n})();\n\n(function tc_11_02_02__007() {\n  function Animal(name)\n  {\n    this.name = name\n    this.canWalk = true\n    if (name == \"bird\")\n    {\n      this.canFly = true;\n    }\n  }\n\n  var animal = new Animal(\"animal\");\n  var bird = new Animal(\"bird\");\n\n  assert(animal.canWalk === true);\n  assert(bird.canWalk === true);\n  assert(animal.canFly === undefined);\n  assert(bird.canFly === true);\n})();\n\n(function tc_11_02_02__009() {\n  var a = {};\n  a.b = true;\n  assert(typeof a == \"object\" && a.b == 1);\n})();\n\n(function tc_11_02_02__002() {\n  function Animal(name)\n  {\n    this.name = name\n    this.canWalk = true\n  }\n\n  var animal = new Animal(\"animal\");\n  assert(animal.name == \"animal\");\n})();\n\n(function tc_11_02_02__003() {\n  function Animal(name)\n  {\n    this.name = name\n    this.canWalk = true\n  }\n\n  var animal = new Animal(\"animal\");\n  assert(animal.name != \"insect\");\n})();\n\n(function tc_11_02_02__005() {\n  function Animal(name)\n  {\n    this.name = name\n    this.canWalk = true\n  }\n\n  var animal = new Animal(\"animal\");\n  assert(animal[1] != \"animal\");\n})();\n\n(function tc_11_02_02__008() {\n  function Animal(name)\n  {\n    this.name = name\n    this.canWalk = true\n  }\n\n  var animal = new Animal();\n\n  assert(animal.canWalk);\n})();\n\n(function tc_11_02_03__007() {\n  function foo()\n  {\n    return 1;\n  }\n  assert(foo() === 1);\n})();\n\n(function tc_11_02_03__006() {\n  var a = {};\n  a.toString();\n})();\n\n(function tc_11_02_03__017() {\n  var obj = {\n    field: Number,\n    foo: function () {\n      this.field++;\n    }\n  }\n\n  obj.field = 3;\n  obj.foo();\n\n  assert(obj.field === 4);\n})();\n\n(function tc_11_02_03__021() {\n  var a = 1;\n  var b = foo();\n  function foo()\n  {\n    return a;\n  }\n\n  assert(b === 1);\n})();\n\n(function tc_11_02_03__008() {\n  var a = {\n    foo: function ()\n    {\n      return 1;\n    }\n  }\n\n  assert(a.foo() === 1);\n})();\n\n(function tc_11_14__002() {\n  var a, b, c, res;\n\n  res = (a = 39, b = null, c = 12.5);\n\n  assert(a == 39 && b == null && c == 12.5 && res == 12.5)\n})();\n\n(function tc_11_14__001() {\n  var res = (33, false, 73.234, 100);\n\n  assert(res == 100);\n})();\n\n(function tc_11_04_07__001() {\n  var a = 1;\n  assert(-a === -1)\n})();\n\n(function tc_11_04_07__014() {\n  var a = new Number(1);\n  assert(-a === -1)\n})();\n\n(function tc_11_04_07__009() {\n  var a = false;\n  assert(-a === 0)\n})();\n\n(function tc_11_04_07__024() {\n  var a = {\n    valueOf: function () {\n      return -1;\n    }\n  }\n  assert(-a === 1)\n})();\n\n(function tc_11_04_07__010() {\n  var a = Infinity;\n  assert(-a === -Infinity)\n})();\n\n(function tc_11_04_07__011() {\n  var a = -Infinity;\n  assert(-a === Infinity)\n})();\n\n(function tc_11_04_07__029() {\n  var a = {\n    member: 1,\n    valueOf: function () {\n      return this.member;\n    }\n  }\n\n  assert(-a === -1)\n})();\n\n(function tc_11_04_07__004() {\n  var a = \"-1\";\n  assert(-a === 1)\n})();\n\n(function tc_11_04_07__003() {\n  var a = \"1\";\n  assert(-a === -1)\n})();\n\n(function tc_11_04_07__002() {\n  var a = -1;\n  assert(-a === 1)\n})();\n\n(function tc_11_04_07__006() {\n  var a = \"0\";\n  assert(-a === 0)\n})();\n\n(function tc_11_04_07__022() {\n  var a = [1, 2, 3, 4, 5];\n  assert(isNaN(-a))\n})();\n\n(function tc_11_04_07__028() {\n  var a = {\n    valueOf: function () {\n      return undefined;\n    }\n  }\n  assert(isNaN(-a))\n})();\n\n(function tc_11_04_07__027() {\n  var a = {\n    valueOf: function () {\n      return null;\n    }\n  }\n  assert(-a === -0)\n})();\n\n(function tc_11_04_07__008() {\n  var a = true;\n  assert(-a === -1)\n})();\n\n(function tc_11_04_07__018() {\n  var a = new String(\"-1\");\n  assert(-a === 1)\n})();\n\n(function tc_11_04_07__012() {\n  var a = undefined;\n  assert(isNaN(-a))\n})();\n\n(function tc_11_04_07__016() {\n  var a = new Number(0);\n  assert(-a === 0)\n})();\n\n(function tc_11_04_07__017() {\n  var a = new String(\"1\");\n  assert(-a === -1)\n})();\n\n(function tc_11_04_07__019() {\n  var a = new String(\"\");\n  assert(-a === 0)\n})();\n\n(function tc_11_04_07__021() {\n  var a = new Boolean(false);\n  assert(-a === 0)\n})();\n\n(function tc_11_04_07__025() {\n  var a = {\n    valueOf: function () {\n      return true;\n    }\n  }\n  assert(-a === -1)\n})();\n\n(function tc_11_04_07__030() {\n  var a = {\n    member: 1,\n  }\n\n  assert(isNaN(-a))\n})();\n\n(function tc_11_04_07__005() {\n  var a = 0;\n  assert(-a === 0)\n})();\n\n(function tc_11_04_07__007() {\n  var a = \"\";\n  assert(-a === 0)\n})();\n\n(function tc_11_04_07__026() {\n  var a = {\n    valueOf: function () {\n      return false;\n    }\n  }\n  assert(-a === 0)\n})();\n\n(function tc_11_04_07__023() {\n  var a = {\n    valueOf: function () {\n      return 1;\n    }\n  }\n  assert(-a === -1)\n})();\n\n(function tc_11_04_07__013() {\n  var a = null;\n  assert(-a === -0)\n})();\n\n(function tc_11_04_07__031() {\n  var a = {\n    valueOf: function () {\n      return \"qwerty\";\n    }\n  }\n\n  assert(isNaN(-a))\n})();\n\n(function tc_11_04_07__015() {\n  var a = new Number(-1);\n  assert(-a === 1)\n})();\n\n(function tc_11_04_07__033() {\n  var a = new Object;\n  a.toString = function () {\n    return \"1\";\n  }\n\n  assert(-a === -1)\n})();\n\n(function tc_11_04_07__032() {\n  var a = +0;\n\n  assert(-a === -0)\n})();\n\n(function tc_11_04_07__020() {\n  var a = new Boolean(true);\n  assert(-a === -1)\n})();\n\n(function tc_11_04_02__002() {\n  var b = 1;\n\n  var a = void(++b);\n\n  assert(a == undefined && b == 2);\n})();\n\n(function tc_11_04_02__001() {\n  var a = void(5 / 2);\n\n  assert(a == undefined);\n})();\n\n(function tc_11_04_04__005() {\n  var a = 25;\n\n  assert(++\n          a === 26)\n})();\n\n(function tc_11_04_04__011() {\n  var a = \"abc\";\n\n  assert(isNaN(++a));\n})();\n\n(function tc_11_04_04__001() {\n  var a = 25;\n\n  assert(++a === 26);\n})();\n\n(function tc_11_04_04__006() {\n  var a = 1.12;\n  var eps = 0.00000001;\n\n  assert(++a >= 2.12 - eps && a <= 2.12 + eps);\n})();\n\n(function tc_11_04_04__009() {\n  var a = undefined;\n\n  assert(isNaN(++a))\n})();\n\n(function tc_11_04_04__002() {\n  var a = 25, b = -1;\n  ;\n\n  assert(++a === ++b + 26);\n})();\n\n(function tc_11_04_04__012() {\n  var a = function () {\n  };\n\n  assert(isNaN(++a));\n})();\n\n(function tc_11_04_04__007() {\n  var a = true;\n\n  assert(++a === 2);\n})();\n\n(function tc_11_04_04__010() {\n  var a = null;\n\n  assert(++a === 1);\n})();\n\n(function tc_11_04_04__008() {\n  var a = {};\n\n  assert(isNaN(++a))\n})();\n\n(function tc_11_04_04__004() {\n  var a = 25;\n\n  assert((++a) / 2 === 13);\n})();\n\n(function tc_11_04_01__013() {\n  eval('var foo = 1;');\n  assert((delete foo) == true && typeof foo == \"undefined\");\n})();\n\n(function tc_11_04_01__012() {\n  this.test = function (arg)\n  {\n    return 1;\n  }\n\n  assert((delete test) == true);\n})();\n\n(function tc_11_04_01__011() {\n  function test(arg)\n  {\n    if ((delete arg) == false)\n      return 0;\n    else\n      return 1;\n  }\n\n  assert(!test(\"str\"));\n})();\n\n(function tc_11_04_01__002() {\n  var y = 43;\n\n  assert((delete y) == false && y == 43);\n})();\n\n(function tc_11_04_01__017() {\n  assert((delete i_dont_exist) == true);\n})();\n\n(function tc_11_04_01__004() {\n  var myobj = {\n    h: 4,\n    k: 5\n  };\n\n  assert((delete myobj.h) == true && myobj.h == undefined);\n})();\n\n(function tc_11_04_01__007() {\n  var fruits = ['apple', 'banana', 'kiwi', 'pineapple'];\n\n  delete fruits[3];\n\n  assert(!(3 in fruits) && fruits.length == 4);\n})();\n\nassert((delete arguments) == true);\n\n(function tc_11_04_01__006() {\n  function Foo() {\n  }\n  Foo.prototype.bar = 42;\n  var foo = new Foo();\n  if (!(delete foo.bar))\n    assert(false)\n\n  if (foo.bar != 42)\n    assert(false)\n\n  if (!(delete Foo.prototype.bar))\n    assert(false)\n})();\n\n(function tc_11_04_01__003() {\n  var y = 43;\n\n  assert((delete Math.PI) == false);\n})();\n\n(function tc_11_04_01__008() {\n  function x() {\n  }\n\n  assert((delete x) == false && typeof x == \"function\");\n})();\n\n(function tc_11_04_01__009() {\n  this.prop = \"prop\";\n\n  assert((delete this.prop) == true);\n})();\n\n(function tc_11_04_01__005() {\n  myobj = {\n          h: 4,\n          k: 5\n      };\n\n  assert ((delete myobj) == true);\n})();\n\n(function tc_11_04_01__001() {\n  x = 42;\n\n  assert ((delete x) == true);\n})();\n\n(function tc_11_04_06__013() {\n  var a = new String(\"-1\");\n  assert(+a === -1)\n})();\n\n(function tc_11_04_06__008() {\n  var a = new Number(1);\n  assert(+a === 1)\n})();\n\n(function tc_11_04_06__017() {\n  var a = new String(\"qwerty\");\n  assert(isNaN(+a))\n})();\n\n(function tc_11_04_06__018() {\n  var a = {\n    valueOf: function () {\n      return 1;\n    }\n  }\n\n  assert(+a === 1)\n})();\n\n(function tc_11_04_06__014() {\n  var a = undefined;\n  assert(isNaN(+a))\n})();\n\n(function tc_11_04_06__024() {\n  var a = {\n    member: Number\n  }\n\n  assert(isNaN(+a))\n})();\n\n(function tc_11_04_06__026() {\n  var array = [1, 2, 3, 4, 5];\n  assert(isNaN(+array))\n})();\n\n(function tc_11_04_06__004() {\n  var a = \"-1\";\n  assert(+a === -1)\n})();\n\n(function tc_11_04_06__001() {\n  var a = 1;\n  assert(+a === a)\n})();\n\n(function tc_11_04_06__005() {\n  var a = true;\n  assert(+a === 1)\n})();\n\n(function tc_11_04_06__023() {\n  var a = {\n    valueOf: function () {\n      return \"not a number\";\n    }\n  }\n\n  assert(isNaN(+a))\n})();\n\n(function tc_11_04_06__007() {\n  var a = new Number(0);\n  assert(+a === 0);\n})();\n\n(function tc_11_04_06__012() {\n  var a = new String(\"1\");\n  assert(+a === 1)\n})();\n\n(function tc_11_04_06__022() {\n  var a = {\n    valueOf: function () {\n      return false;\n    }\n  }\n\n  assert(+a === +0)\n})();\n\n(function tc_11_04_06__010() {\n  var a = new Boolean(true);\n  assert(+a === 1)\n})();\n\n(function tc_11_04_06__006() {\n  var a = false;\n  assert(+a === 0)\n})();\n\n(function tc_11_04_06__020() {\n  var a = {\n    valueOf: function () {\n      return -1;\n    }\n  }\n\n  assert(+a === -1)\n})();\n\n(function tc_11_04_06__021() {\n  var a = new Object;\n  a.valueOf = function () {\n    return true;\n  }\n\n  assert(+a === 1)\n})();\n\n(function tc_11_04_06__002() {\n  var a = -1;\n  assert(+a === a)\n})();\n\n(function tc_11_04_06__027() {\n  var a = {\n    toString: function () {\n      return \"1\"\n    }\n  }\n\n  assert(+a === 1)\n})();\n\n(function tc_11_04_06__015() {\n  var a = null;\n  assert(+a === +0)\n})();\n\n(function tc_11_04_06__025() {\n  var a = {\n    valueOf: function () {\n      return null;\n    }\n  }\n  assert(+a === +0)\n})();\n\n(function tc_11_04_06__019() {\n  var a = {\n    valueOf: function () {\n      return \"1\";\n    }\n  }\n\n  assert(+a === 1)\n})();\n\n(function tc_11_04_06__028() {\n  var a = {\n    valueOf: function () {\n      return \"\"\n    }\n  }\n\n  assert(+a === 0)\n})();\n\n(function tc_11_04_06__009() {\n  var a = new Number(-1);\n  assert(+a === -1)\n})();\n\n(function tc_11_04_06__003() {\n  var a = \"1\";\n  assert(+a === 1)\n})();\n\n(function tc_11_04_06__011() {\n  var a = new Boolean(false);\n  assert(+a === +0)\n})();\n\n(function tc_11_04_06__016() {\n  var a = NaN;\n  assert(isNaN(+a))\n})();\n\n(function tc_11_04_09__006() {\n  assert(!(+0) === true)\n})();\n\n(function tc_11_04_09__015() {\n  assert(![] === false)\n})();\n\n(function tc_11_04_09__004() {\n  var a = null;\n  assert(!a === true)\n})();\n\n(function tc_11_04_09__017() {\n  assert(!1 === false)\n})();\n\n(function tc_11_04_09__013() {\n  assert(!true === false)\n})();\n\n(function tc_11_04_09__005() {\n  var a = null;\n  assert(!a === true)\n})();\n\n(function tc_11_04_09__012() {\n  var a = {\n    valueOf: function () {\n      return false;\n    }\n  }\n  assert(!a === false)\n})();\n\n(function tc_11_04_09__002() {\n  var a = false;\n  assert(!a === true)\n})();\n\n(function tc_11_04_09__010() {\n  assert(!(\"anything\") === false)\n})();\n\n(function tc_11_04_09__011() {\n  var a = new Object;\n  assert(!a === false)\n})();\n\n(function tc_11_04_09__001() {\n  var a = true;\n  assert(!a === false)\n})();\n\n(function tc_11_04_09__007() {\n  assert(!(-0) === true)\n})();\n\n(function tc_11_04_09__018() {\n  assert(!(-Infinity) === false)\n})();\n\n(function tc_11_04_09__014() {\n  assert(!false === true)\n})();\n\n(function tc_11_04_09__016() {\n  assert(!0 === true)\n})();\n\n(function tc_11_04_09__003() {\n  var a = undefined;\n  assert(!a === true)\n})();\n\n(function tc_11_04_09__008() {\n  assert(!(NaN) === true)\n})();\n\n(function tc_11_04_09__019() {\n  assert(!Infinity === false)\n})();\n\n(function tc_11_04_09__009() {\n  assert(!(\"\") === true)\n})();\n\n(function tc_11_04_09__020() {\n  var a = new Boolean(true);\n  assert(!a === false)\n})();\n\n(function tc_11_04_08__001() {\n  var a = 0;\n  assert(~a === -1);\n})();\n\n(function tc_11_04_08__019() {\n  var a = {\n    valueOf: function () {\n      return \"0x001\"\n    }\n  }\n  assert(~a === -0x002)\n})();\n\n(function tc_11_04_08__007() {\n  var a = -0;\n  assert(~a === -1)\n})();\n\n(function tc_11_04_08__020() {\n  var a = {\n    valueOf: function () {\n      return -0x01\n    }\n  }\n  assert(~a === 0)\n})();\n\n(function tc_11_04_08__011() {\n  var a = 0x1fffffffe;\n  assert(~a === ~(0xfffffffe))\n})();\n\n(function tc_11_04_08__022() {\n  var a = Number(1);\n  assert(~a === -2)\n})();\n\n(function tc_11_04_08__021() {\n  var a = {\n    valueOf: function () {\n      return true\n    }\n  }\n  assert(~a === -2)\n})();\n\n(function tc_11_04_08__002() {\n  var a = -1;\n  assert(~a === 0)\n})();\n\n(function tc_11_04_08__006() {\n  var a = +0;\n  assert(~a === -1)\n})();\n\n(function tc_11_04_08__018() {\n  var a = false;\n  assert(~a === -1)\n})();\n\n(function tc_11_04_08__016() {\n  var a = \"Who cares?\";\n  assert(~a === -1)\n})();\n\n(function tc_11_04_08__003() {\n  var a = 1;\n  assert(~a === -2)\n})();\n\n(function tc_11_04_08__014() {\n  var a = 0xffff;\n  assert(~a === -0x10000)\n})();\n\n(function tc_11_04_08__008() {\n  var a = +Infinity;\n  assert(~a === -1)\n})();\n\n(function tc_11_04_08__017() {\n  var a = true;\n  assert(~a === -2)\n})();\n\n(function tc_11_04_08__004() {\n  var a = 0x0001;\n  assert(~a === -0x0002)\n})();\n\n(function tc_11_04_08__012() {\n  var a = 0x110000000;\n  assert(~a === ~(0x10000000))\n})();\n\n(function tc_11_04_08__009() {\n  var a = -Infinity;\n  assert(~a === -1)\n})();\n\n(function tc_11_04_08__005() {\n  var a = NaN;\n  assert(~a === -1)\n})();\n\n(function tc_11_04_08__013() {\n  var a = 0x1fffffff;\n  assert(~a === ~(0x1fffffff))\n})();\n\n(function tc_11_04_08__010() {\n  var a = 2 * 0x100000000;\n  assert(~a === -1)\n})();\n\n(function tc_11_04_08__015() {\n  var a = \"1\";\n  assert(~a === -2)\n})();\n\n(function tc_11_04_05__005() {\n  var a = 25;\n\n  assert(--\n          a === 24)\n})();\n\n(function tc_11_04_05__012() {\n  var a = function () {\n  };\n\n  assert(isNaN(--a));\n})();\n\n(function tc_11_04_05__008() {\n  var a = {};\n\n  assert(isNaN(--a))\n})();\n\n(function tc_11_04_05__009() {\n  var a = undefined;\n\n  assert(isNaN(--a))\n})();\n\n(function tc_11_04_05__002() {\n  var a = 25, b = 1;\n  ;\n\n  assert(--a === --b + 24)\n})();\n\n(function tc_11_04_05__006() {\n  var eps = 0.000000001;\n  var a = 1.12;\n\n  assert(--a >= 0.12 - eps &&\n          a <= 0.12 + eps)\n})();\n\n(function tc_11_04_05__010() {\n  var a = null;\n\n  assert(--a === -1);\n})();\n\n(function tc_11_04_05__011() {\n  var a = \"abc\";\n\n  assert(isNaN(--a));\n})();\n\n(function tc_11_04_05__004() {\n  var a = 25;\n\n  assert((--a) / 2 === 12)\n})();\n\n(function tc_11_04_05__007() {\n  var a = true;\n\n  assert(--a === 0)\n})();\n\n(function tc_11_04_05__001() {\n  var a = 25;\n\n  assert(--a === 24)\n})();\n\n(function tc_11_04_03__003() {\n  assert(typeof Math.LN2 === 'number' &&\n          typeof Infinity === 'number' &&\n          typeof NaN === 'number' &&\n          typeof Number(1) === 'number');\n})();\n\n(function tc_11_04_03__012() {\n  assert (typeof Math.sin === 'function');\n})();\n\n(function tc_11_04_03__007() {\n  assert(typeof Boolean(true) === 'boolean');\n})();\n\n(function tc_11_04_03__005() {\n  assert(typeof (typeof 1) === 'string' &&\n          typeof String(\"str\") === 'string');\n})();\n\n(function tc_11_04_03__008() {\n  assert(typeof undefined === 'undefined' &&\n          typeof smth === 'undefined');\n})();\n\n(function tc_11_04_03__009() {\n  assert(typeof {a: 1} === 'object' &&\n          typeof [1, 2, 4] === 'object')\n})();\n\n(function tc_11_04_03__006() {\n  assert(typeof true === 'boolean' &&\n          typeof false === 'boolean');\n})();\n\n(function tc_11_04_03__004() {\n  assert(typeof \"\" === 'string' &&\n          typeof \"str\" === 'string');\n})();\n\n(function tc_11_04_03__013() {\n  assert(typeof null === 'object');\n})();\n\n(function tc_11_04_03__011() {\n  assert (typeof function(){} === 'function')\n})();\n\n(function tc_11_04_03__002() {\n  assert(typeof 37 === 'number' &&\n          typeof 3.14 === 'number');\n})();\n\n(function tc_11_04_03__016() {\n  assert(typeof\n          24 === 'number')\n})();\n\n(function tc_11_04_03__010() {\n  assert(typeof new Date() === 'object' &&\n          typeof new Boolean(true) === 'object' &&\n          typeof new Number(1) === 'object' &&\n          typeof new String(\"abc\") === 'object')\n})();\n\n(function tc_11_04_03__001() {\n  assert(typeof 37 === 'number');\n})();\n\n(function tc_11_06_02__006() {\n  assert(1 - 1 === 0)\n})();\n\n(function tc_11_06_02__013() {\n  assert(\"1\" - \"1\" === 0)\n})();\n\n(function tc_11_06_02__012() {\n  assert(new Number(1) - new Number(1) === 0)\n})();\n\n(function tc_11_06_02__015() {\n  assert(new String(\"1\") - new String(\"1\") === 0)\n})();\n\n(function tc_11_06_02__002() {\n  var a = -10;\n  var b = 50;\n  assert((a - b === -60) && (b - a === 60))\n})();\n\n(function tc_11_06_02__014() {\n  assert(!(((\"1\" - new String(\"1\") !== 0) || (new String(\"1\") - 1 !== 0))))\n})();\n\n(function tc_11_06_02__004() {\n  var a = \"string\";\n  var b = 10;\n  assert(isNaN(a - b) && isNaN(b - a))\n})();\n\n(function tc_11_06_02__003() {\n  var a = -5;\n  var b = -100;\n  assert(a - b === 95)\n})();\n\n(function tc_11_06_02__010() {\n  assert(true - true === 0)\n})();\n\n(function tc_11_06_02__008() {\n  object = {\n    valueOf: function () {\n      return 1;\n    },\n    toString: function () {\n      return 0;\n    }\n  }\n  assert(!((object - 1 !== 0) || (1 - object !== 0)));\n})();\n\n(function tc_11_06_02__009() {\n  var x = 0;\n  assert(x - (x = 1) === -1)\n})();\n\n(function tc_11_06_02__017() {\n  assert(isNaN(\"x\" - 1) && isNaN(1 - \"x\"))\n})();\n\n(function tc_11_06_02__001() {\n  var a = 100;\n  var b = 20;\n  assert(a - b === 80)\n})();\n\n(function tc_11_06_02__011() {\n  assert(!(((new Number(1) - 1 !== 0) || (1 - new Number(1) !== 0))))\n})();\n\n(function tc_11_06_02__007() {\n  var object1 = new Object();\n  var object2 = new Object();\n  object1.prop = 1;\n  object2.prop = 1;\n  assert(object1.prop - object2.prop === 0)\n})();\n\n(function tc_11_06_02__005() {\n  var x = 1;\n  assert(!((x - 1 !== 0) || (1 - x !== 0)))\n})();\n\n(function tc_11_06_02__016() {\n  assert(isNaN(\"x\" - \"1\") && isNaN(\"1\" - \"x\"))\n})();\n\n(function tc_11_06_03__024() {\n  assert(\"1\" + 1 + 1 === (\"1\" + 1) + 1)\n})();\n\n(function tc_11_06_03__002() {\n  obj = new Object;\n  assert(isNaN(obj + NaN) && isNaN(NaN + obj))\n})();\n\n(function tc_11_06_03__007() {\n  assert(-0 + -0 === -0)\n})();\n\n(function tc_11_06_03__010() {\n  assert(2 + -2 === +0)\n})();\n\n(function tc_11_06_03__016() {\n  var a = 1;\n  var b = -1;\n  assert(a - b === a + -b)\n})();\n\n(function tc_11_06_03__017() {\n  assert(Number.MAX_VALUE - -0 === Number.MAX_VALUE)\n})();\n\n(function tc_11_06_03__012() {\n  assert(-Number.MAX_VALUE - Number.MAX_VALUE === -Infinity)\n})();\n\n(function tc_11_06_03__013() {\n  assert(!(Number.MIN_VALUE + -Number.MIN_VALUE !== +0))\n})();\n\n(function tc_11_06_03__009() {\n  assert(0 + 5 === 5)\n})();\n\n(function tc_11_06_03__015() {\n  assert(Number.MAX_VALUE - -Number.MAX_VALUE === +Infinity)\n})();\n\n(function tc_11_06_03__011() {\n  assert((+0 + +0 === +0) && (+0 + -0 === +0))\n})();\n\n(function tc_11_06_03__001() {\n  var a = 1;\n  var b = 2;\n  assert(a + b === b + a)\n})();\n\n(function tc_11_06_03__008() {\n  assert((+0 + +0 === +0) && (+0 + -0 === +0))\n})();\n\n(function tc_11_06_03__022() {\n  assert(-Number.MAX_VALUE + Number.MAX_VALUE + Number.MAX_VALUE === (-Number.MAX_VALUE + Number.MAX_VALUE) + Number.MAX_VALUE)\n})();\n\n(function tc_11_06_03__003() {\n  obj = new Object();\n  assert(isNaN(obj - NaN) && isNaN(NaN - obj))\n})();\n\n(function tc_11_06_03__018() {\n  assert(0 - 1 === -1)\n})();\n\n(function tc_11_06_03__019() {\n  assert(-Number.MAX_VALUE - -Number.MAX_VALUE === +0)\n})();\n\n(function tc_11_06_03__021() {\n  assert(-8.99e+307 - 8.99e+307 === -Infinity)\n})();\n\n(function tc_11_06_03__004() {\n  assert(isNaN(Infinity + -Infinity))\n})();\n\n(function tc_11_06_03__023() {\n  assert((-Number.MAX_VALUE + Number.MAX_VALUE) + Number.MAX_VALUE !== -Number.MAX_VALUE + (Number.MAX_VALUE + Number.MAX_VALUE))\n})();\n\n(function tc_11_06_03__005() {\n  assert((Infinity + Infinity === Infinity) && (-Infinity + -Infinity === -Infinity))\n})();\n\n(function tc_11_06_03__014() {\n  assert(-Number.MAX_VALUE - -Number.MAX_VALUE === +0)\n})();\n\n(function tc_11_06_03__006() {\n  assert(Infinity + 1 === Infinity)\n})();\n\n(function tc_11_06_03__025() {\n  assert((\"1\" + 1) + 1 !== \"1\" + (1 + 1))\n})();\n\n(function tc_11_06_03__020() {\n  assert(1e+308 - -1e+308 === +Infinity)\n})();\n\n(function tc_11_06_01__006() {\n  var y = 1;\n  assert(1 + y === 2)\n})();\n\n(function tc_11_06_01__012() {\n  object = {\n    valueOf: function () {\n      return 1\n    },\n    toString: function () {\n      return 0\n    }\n  }\n  assert(1 + object === 2)\n})();\n\n(function tc_11_06_01__010() {\n  assert(new Number(1) + new Number(1) === 2)\n})();\n\n(function tc_11_06_01__008() {\n  var objectx = new Object();\n  var objecty = new Object();\n  objectx.prop = 1;\n  objecty.prop = 1;\n  assert(objectx.prop + objecty.prop === 2)\n})();\n\n(function tc_11_06_01__005() {\n  var x = 1;\n  assert(x + 1 === 2)\n})();\n\n(function tc_11_06_01__007() {\n  assert(new Number(1) + 1 === 2)\n})();\n\n(function tc_11_06_01__002() {\n  var a = 12;\n  var b = \"3\";\n  assert(a + b === \"123\")\n})();\n\n(function tc_11_06_01__017() {\n  object = new Object()\n\n  var b = 1\n\n  assert(object + b === \"[object Object]1\")\n})();\n\n(function tc_11_06_01__015() {\n  object1 = {\n    valueOf: function () {\n      return 1;\n    },\n    toString: function () {\n      return 0;\n    }\n  }\n\n  object2 = {\n    valueOf: function () {\n      return 1;\n    },\n    toString: function () {\n      return 0;\n    }\n  }\n\n  assert(object1 + object2 === 2)\n})();\n\n(function tc_11_06_01__009() {\n  assert(1 + new Number(1) === 2)\n})();\n\n(function tc_11_06_01__018() {\n  object = new String()\n\n  var b = 1\n\n  assert(object + b === \"1\")\n})();\n\n(function tc_11_06_01__003() {\n  var a = \"12\";\n  var b = 3;\n  assert(a + b === \"123\")\n})();\n\n(function tc_11_06_01__011() {\n  object = {\n    valueOf: function () {\n      return 1\n    },\n    toString: function () {\n      return 0\n    }\n  }\n  assert(object + 1 === 2)\n})();\n\n(function tc_11_06_01__016() {\n  object = new Object()\n\n  var str = new String()\n\n  assert(object + str === \"[object Object]\")\n})();\n\n(function tc_11_06_01__001() {\n  var a = \"lirum \";\n  var b = \"ipsum\";\n  assert(a + b == \"lirum ipsum\")\n})();\n\n(function tc_11_06_01__013() {\n  object = {\n    valueOf: function () {\n      return 1\n    },\n    toString: function () {\n      return 0\n    }\n  }\n  assert(object + \"1\" === \"11\")\n})();\n\n(function tc_11_06_01__014() {\n  object = {\n    valueOf: function () {\n      return \"1\"\n    },\n    toString: function () {\n      return 0\n    }\n  }\n  assert(\"1\" + object === \"11\")\n})();\n\n(function tc_11_06_01__004() {\n  var a = 123;\n  var b = 456;\n  assert(a + b == 579)\n})();\n\n(function tc_11_09_04__020() {\n  var x = \"12.6asdg$7_sfk/sf/adf\\.3rqaf\\u0102\", y = \"12.6asdg$7_sfk/sf/adf\\.3rqaf\\u0102\"\n  assert(x === y)\n})();\n\n(function tc_11_09_04__007() {\n  var x = false, y = 0\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__015() {\n  var x = NaN, y = NaN\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__017() {\n  var x = 123.01, y = 0.0123e+4\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__006() {\n  var x = null, y = 0\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__001() {\n  var x, y = null\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__019() {\n  var x = -0, y = +0\n  assert(x === y)\n})();\n\n(function tc_11_09_04__023() {\n  var x = false, y = true\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__008() {\n  var x = \"0\", y = 0\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__024() {\n  var x = new String(\"abc\")\n  var y = x\n  assert(x === y)\n})();\n\n(function tc_11_09_04__011() {\n  var x, y\n  assert(x === y)\n})();\n\n(function tc_11_09_04__005() {\n  var x, y = new Function()\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__013() {\n  var x = NaN, y = 0\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__016() {\n  var x = 123.00, y = 0.0123e+4, eps = .00001\n  assert(x <= y + eps && x >= y - eps)\n})();\n\n(function tc_11_09_04__025() {\n  var x = new String(\"abc\")\n  var y = new String(\"abc\")\n\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__009() {\n  var x = \"0\", y = Object(0)\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__004() {\n  var x, y = -37.2e-6\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__002() {\n  var x, y = true\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__022() {\n  var x = false, y = false\n  assert(x === y)\n})();\n\n(function tc_11_09_04__014() {\n  var x = 0.0, y = NaN\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__010() {\n  var x = \"abc\", y = new String(\"abc\")\n\n  assert(x !== y)\n})();\n\n(function tc_11_09_04__021() {\n  var x = true, y = true\n  assert(x === y)\n})();\n\n(function tc_11_09_04__018() {\n  var x = +0, y = -0\n  assert(x === y)\n})();\n\n(function tc_11_09_04__012() {\n  var x = y = null\n  assert(x === y)\n})();\n\n(function tc_11_09_04__003() {\n  var x, y = \"undefined\"\n  assert(x !== y)\n})();\n\n(function tc_11_09_01__031() {\n  var x = Object(\"abc\")\n  var y = Object(\"abc\")\n  b = x, c = y\n  assert(!(c == b))\n})();\n\n(function tc_11_09_01__025() {\n  var x = false, y = \"-0\"\n  assert(x == y)\n})();\n\n(function tc_11_09_01__027() {\n  var x = true, y = \"-1\"\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__032() {\n  var x = \"a\"\n  var y = 2\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__002() {\n  var x = null, y = null\n  assert(x == y)\n})();\n\n(function tc_11_09_01__005() {\n  var x = 2.756, y = 2.756\n  assert(x == y)\n})();\n\n(function tc_11_09_01__007() {\n  var x = -0, y = +0\n  assert(x == y)\n})();\n\n(function tc_11_09_01__006() {\n  var x = +0, y = -0\n  assert(x == y)\n})();\n\n(function tc_11_09_01__008() {\n  var x = 2.8, y = 3.4\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__033() {\n  var x = \"12.1e5\"\n  var y = 1210000\n  assert(x == y)\n})();\n\n(function tc_11_09_01__036() {\n  var x = 1e-324\n  var y = false\n  assert(x == y)\n})();\n\n(function tc_11_09_01__011() {\n  var x = \"abg\", y = 'abh'\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__014() {\n  var x = false, y = false\n  assert(x == y)\n})();\n\n(function tc_11_09_01__020() {\n  var x = 0.123, y = \"0.123e0\"\n  assert(x == y)\n})();\n\n(function tc_11_09_01__017() {\n  var x = undefined, y = null\n  assert(x == y)\n})();\n\n(function tc_11_09_01__004() {\n  var x = 2, y = NaN\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__024() {\n  var x = 0.123, y = \"1.23e-1\"\n  assert(x == y)\n})();\n\n(function tc_11_09_01__003() {\n  var x = NaN, y = 1\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__034() {\n  var x = \"1\"\n  var y = true\n  assert(x == y)\n})();\n\n(function tc_11_09_01__021() {\n  var x = 0.123, y = \"0.123e+2\"\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__019() {\n  var x = 0.123, y = \"0.124\"\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__026() {\n  var x = true, y = \"+1\"\n  assert(x == y)\n})();\n\n(function tc_11_09_01__018() {\n  var x = 0.123, y = \"0.123\"\n  assert(x == y)\n})();\n\n(function tc_11_09_01__010() {\n  var x = \"abg\", y = 'abgs'\n  assert(x != y)\n})();\n\n(function tc_11_09_01__038() {\n  var x = \"0\", y = Object(0)\n  assert(x == y)\n})();\n\n(function tc_11_09_01__015() {\n  var x = false, y = true\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__009() {\n  var x = \"abg\", y = 'abg'\n  assert(x == y)\n})();\n\n(function tc_11_09_01__029() {\n  var x = true, y = \"123\"\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__016() {\n  var x = null, y = undefined\n  assert(x == y)\n})();\n\n(function tc_11_09_01__035() {\n  var x = 0\n  var y = false\n  assert(x == y)\n})();\n\n(function tc_11_09_01__037() {\n  var x = 0.1e-323\n  var y = false\n  assert(x == y)\n})();\n\n(function tc_11_09_01__013() {\n  var x = true, y = true\n  assert(x == y)\n})();\n\n(function tc_11_09_01__028() {\n  var x = true, y = \"true\"\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__030() {\n  var x = Object(\"abc\")\n  b = x\n  assert(x == b)\n})();\n\n(function tc_11_09_01__022() {\n  var x = 0.123, y = \"0.123a\"\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__023() {\n  var x = 0.123, y = \"b0.123\"\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__012() {\n  var x = \"abg\", y = 'aBg'\n  assert(!(x == y))\n})();\n\n(function tc_11_09_01__001() {\n  var x, y\n  assert(x == y)\n})();\n\n(function tc_11_09_02__035() {\n  var x = 0\n  var y = false\n  assert(x == y)\n})();\n\n(function tc_11_09_02__033() {\n  var x = \"12.1e5\"\n  var y = 1210000\n  assert(!(x != y))\n})();\n\n(function tc_11_09_02__019() {\n  var x = 0.123, y = \"0.124\"\n  assert(x != y)\n})();\n\n(function tc_11_09_02__018() {\n  var x = 0.123, y = \"0.123\"\n  assert(x == y)\n})();\n\n(function tc_11_09_02__005() {\n  var x = 2.756, y = 2.756\n  assert(x == y)\n})();\n\n(function tc_11_09_02__028() {\n  var x = true, y = \"true\"\n  assert(x != y)\n})();\n\n(function tc_11_09_02__024() {\n  var x = 0.123, y = \"1.23e-1\"\n  assert(x == y)\n})();\n\n(function tc_11_09_02__032() {\n  var x = \"a\"\n  var y = 2\n  assert(x != y)\n})();\n\n(function tc_11_09_02__021() {\n  var x = 0.123, y = \"0.123e+2\"\n  assert(!(x == y))\n})();\n\n(function tc_11_09_02__002() {\n  var x = null, y = null\n  assert(x == y)\n})();\n\n(function tc_11_09_02__026() {\n  var x = true, y = \"+1\"\n  assert(x == y)\n})();\n\n(function tc_11_09_02__037() {\n  var x = 1e-323\n  var y = false\n  assert(x != y)\n})();\n\n(function tc_11_09_02__012() {\n  var x = \"abg\", y = 'aBg'\n  assert(x != y)\n})();\n\n(function tc_11_09_02__016() {\n  var x = null, y = undefined\n  assert(x == y)\n})();\n\n(function tc_11_09_02__017() {\n  var x = undefined, y = null\n  assert(x == y)\n})();\n\n(function tc_11_09_02__031() {\n  var x = Object(\"abc\")\n  var y = Object(\"abc\")\n  b = x, c = y\n  assert(c != b)\n})();\n\n(function tc_11_09_02__023() {\n  var x = 0.123, y = \"b0.123\"\n  assert(x != y)\n})();\n\n(function tc_11_09_02__015() {\n  var x = false, y = true\n  assert(x != y)\n})();\n\n(function tc_11_09_02__034() {\n  var x = \"1\"\n  var y = true\n  assert(x == y)\n})();\n\n(function tc_11_09_02__036() {\n  var x = 1e-324\n  var y = false\n  assert(x == y)\n})();\n\n(function tc_11_09_02__022() {\n  var x = 0.123, y = \"0.123a\"\n  assert(x != y)\n})();\n\n(function tc_11_09_02__038() {\n  var x = \"0\", y = Object(0)\n  assert(x == y)\n})();\n\n(function tc_11_09_02__020() {\n  var x = 0.123, y = \"0.123e0\"\n  assert(x == y)\n})();\n\n(function tc_11_09_02__003() {\n  var x = NaN, y = 1\n  assert(x != y)\n})();\n\n(function tc_11_09_02__014() {\n  var x = false, y = false\n  assert(x == y)\n})();\n\n(function tc_11_09_02__011() {\n  var x = \"abg\", y = 'abh'\n  assert(x != y)\n})();\n\n(function tc_11_09_02__025() {\n  var x = false, y = \"-0\"\n  assert(x == y)\n})();\n\n(function tc_11_09_02__007() {\n  var x = -0, y = +0\n  assert(x == y)\n})();\n\n(function tc_11_09_02__030() {\n  var x = Object(\"abc\")\n  b = x\n  assert(x == b)\n})();\n\n(function tc_11_09_02__027() {\n  var x = true, y = \"-1\"\n  assert(x != y)\n})();\n\n(function tc_11_09_02__004() {\n  var x = 2, y = NaN\n  assert(x != y)\n})();\n\n(function tc_11_09_02__006() {\n  var x = +0, y = -0\n  assert(x == y)\n})();\n\n(function tc_11_09_02__013() {\n  var x = true, y = true\n  assert(x == y)\n})();\n\n(function tc_11_09_02__010() {\n  var x = \"abg\", y = 'abgs'\n  assert(x != y)\n})();\n\n(function tc_11_09_02__001() {\n  var x, y\n  assert(x == y)\n})();\n\n(function tc_11_09_02__029() {\n  var x = true, y = \"123\"\n  assert(x != y)\n})();\n\n(function tc_11_09_02__008() {\n  var x = 2.8, y = 3.4\n  assert(x != y)\n})();\n\n(function tc_11_09_02__009() {\n  var x = \"abg\", y = 'abg'\n  assert(x == y)\n})();\n\n(function tc_11_09_05__009() {\n  var x = \"0\", y = Object(0)\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__020() {\n  var x = \"12.6asdg$7_sfk/sf/adf\\.3rqaf\\u0102\", y = \"12.6asdg$7_sfk/sf/adf\\.3rqaf\\u0102\"\n  assert(x === y)\n})();\n\n(function tc_11_09_05__002() {\n  var x, y = true\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__023() {\n  var x = false, y = true\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__007() {\n  var x = false, y = 0\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__019() {\n  var x = -0, y = +0\n  assert(x === y)\n})();\n\n(function tc_11_09_05__004() {\n  var x, y = -37.2e-6\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__013() {\n  var x = NaN, y = 0\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__005() {\n  var x, y = new Function()\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__003() {\n  var x, y = \"undefined\"\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__018() {\n  var x = +0, y = -0\n  assert(x === y)\n})();\n\n(function tc_11_09_05__008() {\n  var x = \"0\", y = 0\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__012() {\n  var x = y = null\n  assert(x === y)\n})();\n\n(function tc_11_09_05__006() {\n  var x = null, y = 0\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__024() {\n  var x = new String(\"abc\")\n  var y = x\n  assert(x === y)\n})();\n\n(function tc_11_09_05__025() {\n  var x = new String(\"abc\")\n  var y = new String(\"abc\")\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__017() {\n  var x = 123.01, y = 0.0123e+4\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__015() {\n  var x = NaN, y = NaN\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__010() {\n  var x = \"abc\", y = new String(\"abc\")\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__022() {\n  var x = false, y = false\n  assert(x === y)\n})();\n\n(function tc_11_09_05__001() {\n  var x, y = null\n  assert(x !== y)\n})();\n\n(function tc_11_09_05__021() {\n  var x = true, y = true\n  assert(x === y)\n})();\n\n(function tc_11_09_05__011() {\n  var x, y\n  assert(x === y)\n})();\n\n(function tc_11_09_05__016() {\n  var x = 123.00, y = 0.0123e+4, eps = .00001\n  assert(x <= y + eps && x >= y - eps)\n})();\n\n(function tc_11_09_05__014() {\n  var x = 0.0, y = NaN\n  assert(x !== y)\n})();\n\n(function tc_11_11__007() {\n  var a = \"\";\n  var b = new Object();\n  assert(!((a && b) !== a))\n})();\n\n(function tc_11_11__001() {\n  var a = true;\n  var b = false;\n  assert(!((a && b) === true))\n})();\n\n(function tc_11_11__019() {\n  var a = false;\n  var b = new Object;\n  assert((a || b) === b)\n})();\n\n(function tc_11_11__022() {\n  var a = 123.456;\n  var b = new Object;\n  assert((a || b) === a)\n})();\n\n(function tc_11_11__017() {\n  var a = false;\n  var b = false;\n  assert((a || b) === false)\n})();\n\n(function tc_11_11__010() {\n  var a = 12345;\n  var b = new Object();\n  assert((a && b) === b)\n})();\n\n(function tc_11_11__005() {\n  var a = true;\n  var b = new Object();\n  assert((a && b) === b)\n})();\n\n(function tc_11_11__027() {\n  var a = new Object;\n  var b = \"who cares, what is this?\";\n  assert((a || b) === a)\n})();\n\n(function tc_11_11__013() {\n  var a = new Object;\n  var b = new Object;\n  assert((a && b) === b)\n})();\n\n(function tc_11_11__002() {\n  var a = true;\n  var b = true;\n  assert((a && b) === true)\n})();\n\n(function tc_11_11__009() {\n  var a = NaN;\n  var b = new Object ();\n  assert ((!a && b) === b);\n})();\n\n(function tc_11_11__008() {\n  var a = 0;\n  var b = new Object();\n  assert((a && b) === 0)\n})();\n\n(function tc_11_11__006() {\n  var a = \"not empty string\";\n  var b = new Object();\n  assert(!((a && b) !== b))\n})();\n\n(function tc_11_11__014() {\n  var a = true;\n  var b = false;\n  assert((a || b) === true)\n})();\n\n(function tc_11_11__004() {\n  var a = false;\n  var b = new Object();\n  assert((a && b) === false)\n})();\n\n(function tc_11_11__024() {\n  var a = \"\";\n  var b = new Object;\n  assert((a || b) === b)\n})();\n\n(function tc_11_11__018() {\n  var a = true;\n  var b = new Object;\n  assert((a || b) === true)\n})();\n\n(function tc_11_11__026() {\n  var a = undefined;\n  var b = new String(\"123\");\n  assert((a || b) === b)\n})();\n\n(function tc_11_11__023() {\n  var a = \"non empty string\";\n  var b = new Object;\n  assert((a || b) === a)\n})();\n\n(function tc_11_11__011() {\n  var a = null;\n  var b = new Object();\n  assert((a && b) === a)\n})();\n\n(function tc_11_11__020() {\n  var a1 = +0;\n  var a2 = -0;\n  var b = new Object;\n  assert(((a1 || b) === b) && ((a2 || b) === b))\n})();\n\n(function tc_11_11__021() {\n  var a = NaN;\n  var b = new Object;\n  assert((a || b) === b)\n})();\n\n(function tc_11_11__003() {\n  var a = false;\n  var b = false;\n  assert(!((a && b) === true))\n})();\n\n(function tc_11_11__025() {\n  var a = null;\n  var b = Number(123.5e5);\n  assert((a || b) === b)\n})();\n\n(function tc_11_11__012() {\n  var a = undefined;\n  var b = new Object();\n  assert((a && b) === a)\n})();\n\n(function tc_11_11__016() {\n  var a = false;\n  var b = true;\n  assert((a || b) === true)\n})();\n\n(function tc_11_11__015() {\n  var a = true;\n  var b = true;\n  assert((a || b) === true)\n})();\n\n(function tc_11_12__004() {\n  var a = 1;\n  var b = 2;\n  var c = 1;\n  var d = 1;\n\n  var e;\n\n  e = (a < b) ? (c = 100) : (d = 10);\n\n  assert(c == 100 && e == 100 && d == 1)\n})();\n\n(function tc_11_12__008() {\n  var cond = 23;\n  var a = [1, 2, 4];\n  var cnt = 0;\n\n  for (var i = (cond < 24) ? 0 in a : 2; i < 10; ++i)\n  {\n    ++cnt;\n  }\n\n  assert(cnt == 9)\n})();\n\n(function tc_11_12__005() {\n  var a = 1;\n  var b = 2;\n  var c = 1;\n  var d = 1;\n\n  var e;\n\n  e = (a > b) ? (c = 100) : (d = 10);\n\n  assert(c == 1 && e == 10 && d == 10)\n})();\n\n(function tc_11_12__003() {\n  var a = 1;\n  var b = 2;\n  var c = 3;\n\n  var d;\n\n  d = a > b ? 5 : b < c ? 10 : 15;\n\n  assert(d == 10)\n})();\n\n(function tc_11_12__012() {\n  var cond = 12;\n  var res;\n\n  res = (cond < 13)\n          ?\n          1\n          :\n          2;\n\n  assert(res == 1)\n})();\n\n(function tc_11_12__001() {\n  var a = 5;\n  var b = 3;\n\n  var c = (a > b) ? 12 : 14;\n\n  assert(c == 12)\n})();\n\n(function tc_11_12__002() {\n  var a = 1;\n  var b = 2;\n  var c = 3;\n\n  var d;\n\n  d = a < b ? b < c ? 5 : 10 : 15;\n\n  assert(d == 5)\n})();\n\n(function tc_11_05_02__017() {\n  assert(isNaN(null / undefined) === true)\n})();\n\n(function tc_11_05_02__036() {\n  assert(isNaN(false / null) === true)\n})();\n\n(function tc_11_05_02__056() {\n  assert(new String(\"2\") / new Number(1) === 2)\n})();\n\n(function tc_11_05_02__045() {\n  assert(isNaN(Number.NaN / 2) === true)\n})();\n\n(function tc_11_05_02__021() {\n  assert(\"6\" / 2 === 3)\n})();\n\n(function tc_11_05_02__028() {\n  assert(true / \"1\" === 1)\n})();\n\n(function tc_11_05_02__009() {\n  assert(false / true === 0)\n})();\n\n(function tc_11_05_02__080() {\n  assert(Number.NEGATIVE_INFINITY / 2 === Number.NEGATIVE_INFINITY)\n})();\n\n(function tc_11_05_02__073() {\n  assert(0 / Number.NEGATIVE_INFINITY === 0)\n})();\n\n(function tc_11_05_02__039() {\n  assert(isNaN(Number.NaN / +0) === true)\n})();\n\n(function tc_11_05_02__031() {\n  assert(isNaN(undefined / \"2\") === true)\n})();\n\n(function tc_11_05_02__058() {\n  assert(new String(\"2\") / new String(\"1\") === 2)\n})();\n\n(function tc_11_05_02__065() {\n  assert(new Boolean(true) / null === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__005() {\n  var a = 0;\n  assert((a = 1) / a === 1)\n})();\n\n(function tc_11_05_02__040() {\n  assert(isNaN(Number.NaN / -0) === true)\n})();\n\n(function tc_11_05_02__074() {\n  assert(0 / Number.POSITIVE_INFINITY === 0)\n})();\n\n(function tc_11_05_02__008() {\n  assert(true / true === 1)\n})();\n\n(function tc_11_05_02__088() {\n  assert(Number.MIN_VALUE / 2 === 0)\n})();\n\n(function tc_11_05_02__051() {\n  assert(false / new Boolean(true) === 0)\n})();\n\n(function tc_11_05_02__075() {\n  assert(Number.POSITIVE_INFINITY / 0 === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__024() {\n  assert(1 / null === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__087() {\n  assert(Number.MAX_VALUE / (-0.5) === Number.NEGATIVE_INFINITY)\n})();\n\n(function tc_11_05_02__019() {\n  assert(2 / true === 2)\n})();\n\n(function tc_11_05_02__067() {\n  assert(isNaN(undefined / new Boolean(true)) === true)\n})();\n\n(function tc_11_05_02__035() {\n  assert(isNaN(undefined / true) === true)\n})();\n\n(function tc_11_05_02__082() {\n  assert(2 / Number.POSITIVE_INFINITY === 0)\n})();\n\n(function tc_11_05_02__002() {\n  var a = 3;\n  assert(6 / a === 2)\n})();\n\n(function tc_11_05_02__059() {\n  assert(isNaN({} / {}) === true)\n})();\n\n(function tc_11_05_02__038() {\n  assert(isNaN(Number.NaN / Number.NaN) === true)\n})();\n\n(function tc_11_05_02__022() {\n  assert(isNaN(\"a\" / 2) === true)\n})();\n\n(function tc_11_05_02__060() {\n  assert(null / new Number(5) === 0)\n})();\n\n(function tc_11_05_02__057() {\n  assert(new String(\"2\") / 1 === 2)\n})();\n\n(function tc_11_05_02__006() {\n  var a = 0;\n  assert(a / (a = 1) === 0)\n})();\n\n(function tc_11_05_02__043() {\n  assert(isNaN(Number.NaN / Number.MAX_VALUE) === true)\n})();\n\n(function tc_11_05_02__025() {\n  assert(null / 1 === 0)\n})();\n\n(function tc_11_05_02__055() {\n  assert(false / new String(\"2\") === 0)\n})();\n\n(function tc_11_05_02__029() {\n  assert(\"2\" / true === 2)\n})();\n\n(function tc_11_05_02__026() {\n  assert(isNaN(1 / undefined) === true)\n})();\n\n(function tc_11_05_02__054() {\n  assert(new Boolean(false) / new String(\"2\") === 0)\n})();\n\n(function tc_11_05_02__044() {\n  assert(isNaN(Number.NaN / Number.MIN_VALUE) === true)\n})();\n\n(function tc_11_05_02__030() {\n  assert(isNaN(\"2\" / undefined) === true)\n})();\n\n(function tc_11_05_02__001() {\n  assert(6 / 3 === 2)\n})();\n\n(function tc_11_05_02__037() {\n  assert(null / true === 0)\n})();\n\n(function tc_11_05_02__081() {\n  assert(2 / Number.NEGATIVE_INFINITY === -0)\n})();\n\n(function tc_11_05_02__032() {\n  assert(\"2\" / null === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__047() {\n  assert(6 / new Number(3) === 2)\n})();\n\n(function tc_11_05_02__048() {\n  assert(new Number(6) / new Number(3) === 2)\n})();\n\n(function tc_11_05_02__089() {\n  assert(2 / Number.MIN_VALUE === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__012() {\n  assert(isNaN(\"a\" / \"3\") === true)\n})();\n\n(function tc_11_05_02__084() {\n  assert(isNaN(0 / 0) === true)\n})();\n\n(function tc_11_05_02__086() {\n  assert(Number.MAX_VALUE / Number.MAX_VALUE === 1)\n})();\n\n(function tc_11_05_02__085() {\n  assert(Number.MAX_VALUE / 0.5 === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__052() {\n  assert(new Boolean(true) / false === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__004() {\n  var a = 6;\n  var b = 3;\n  assert(a / b === 2)\n})();\n\n(function tc_11_05_02__033() {\n  assert(null / \"2\" === 0)\n})();\n\n(function tc_11_05_02__053() {\n  assert(new String(\"2\") / new Boolean(false) === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__014() {\n  assert(isNaN(null / null) === true)\n})();\n\n(function tc_11_05_02__042() {\n  assert(isNaN(Number.NaN / Number.NEGATIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_02__010() {\n  assert(true / false === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__069() {\n  assert(isNaN(new String(\"5\") / undefined) === true)\n})();\n\n(function tc_11_05_02__076() {\n  assert(isNaN(Number.POSITIVE_INFINITY / Number.POSITIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_02__023() {\n  assert(isNaN(6 / \"a\") === true)\n})();\n\n(function tc_11_05_02__018() {\n  assert(true / 1 === 1)\n})();\n\n(function tc_11_05_02__079() {\n  assert(isNaN(Number.NEGATIVE_INFINITY / Number.NEGATIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_02__049() {\n  assert(new Number(2) / new Boolean(true) === 2)\n})();\n\n(function tc_11_05_02__062() {\n  assert(new String(\"5\") / null === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__078() {\n  assert(isNaN(Number.NEGATIVE_INFINITY / Number.POSITIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_02__083() {\n  assert(Number.POSITIVE_INFINITY / 2 === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__034() {\n  assert(isNaN(true / undefined) === true)\n})();\n\n(function tc_11_05_02__068() {\n  assert(isNaN(undefined / new String(\"5\")) === true)\n})();\n\n(function tc_11_05_02__013() {\n  assert(isNaN(\"6\" / \"a\") === true)\n})();\n\n(function tc_11_05_02__090() {\n  assert((1 / 2) / 4 !== 1 / (2 / 4))\n})();\n\n(function tc_11_05_02__072() {\n  assert(Number.NEGATIVE_INFINITY / 0 === Number.NEGATIVE_INFINITY)\n})();\n\n(function tc_11_05_02__016() {\n  assert(isNaN(undefined / null) === true)\n})();\n\n(function tc_11_05_02__003() {\n  var a = 6;\n  assert(a / 3 === 2)\n})();\n\n(function tc_11_05_02__061() {\n  assert(new Number(5) / null === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_02__066() {\n  assert(isNaN(new Boolean(true) / undefined) === true)\n})();\n\n(function tc_11_05_02__077() {\n  assert(isNaN(Number.POSITIVE_INFINITY / Number.NEGATIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_02__046() {\n  assert(new Number(6) / 3 === 2)\n})();\n\n(function tc_11_05_02__027() {\n  assert(isNaN(undefined / 1) === true)\n})();\n\n(function tc_11_05_02__015() {\n  assert(isNaN(undefined / undefined) === true)\n})();\n\n(function tc_11_05_02__020() {\n  assert(6 / \"2\" === 3)\n})();\n\n(function tc_11_05_02__063() {\n  assert(null / new String(\"5\") === 0)\n})();\n\n(function tc_11_05_02__041() {\n  assert(isNaN(Number.NaN / Number.POSITIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_02__011() {\n  assert(\"6\" / \"3\" === 2)\n})();\n\n(function tc_11_05_02__050() {\n  assert(new Boolean(false) / new Boolean(true) === 0)\n})();\n\n(function tc_11_05_02__070() {\n  assert(isNaN(new Number(5) / undefined) === true)\n})();\n\n(function tc_11_05_02__064() {\n  assert(null / new Boolean(true) === 0)\n})();\n\n(function tc_11_05_02__071() {\n  assert(isNaN(undefined / new Number(5)) === true)\n})();\n\n(function tc_11_05_02__007() {\n  var a = 6;\n  assert(a /\n          3 === 2)\n})();\n\n(function tc_11_05_01__018() {\n  assert(true * 1 === 1)\n})();\n\n(function tc_11_05_01__015() {\n  assert(isNaN(undefined * undefined) === true)\n})();\n\n(function tc_11_05_01__085() {\n  assert(2 * Number.MAX_VALUE === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_01__048() {\n  assert(new Number(1) * new Number(1) === 1)\n})();\n\n(function tc_11_05_01__049() {\n  assert(new Number(1) * new Boolean(true) === 1)\n})();\n\n(function tc_11_05_01__050() {\n  assert(new Boolean(true) * new Boolean(true) === 1)\n})();\n\n(function tc_11_05_01__010() {\n  assert(false * false === 0)\n})();\n\n(function tc_11_05_01__078() {\n  assert(Number.NEGATIVE_INFINITY * Number.POSITIVE_INFINITY === Number.NEGATIVE_INFINITY)\n})();\n\n(function tc_11_05_01__038() {\n  assert(isNaN(Number.NaN * Number.NaN) === true)\n})();\n\n(function tc_11_05_01__064() {\n  assert(null * new Boolean(true) === 0)\n})();\n\n(function tc_11_05_01__067() {\n  assert(isNaN(undefined * new Boolean(true)) === true)\n})();\n\n(function tc_11_05_01__058() {\n  assert(new String(\"2\") * new String(\"1\") === 2)\n})();\n\n(function tc_11_05_01__005() {\n  var a = 0;\n  assert((a = 1) * a === 1)\n})();\n\n(function tc_11_05_01__001() {\n  assert(2 * 3 === 6)\n})();\n\n(function tc_11_05_01__087() {\n  assert(Number.MAX_VALUE * (-1.5) === Number.NEGATIVE_INFINITY)\n})();\n\n(function tc_11_05_01__083() {\n  assert(Number.POSITIVE_INFINITY * 1 === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_01__069() {\n  assert(isNaN(new String(\"1\") * undefined) === true)\n})();\n\n(function tc_11_05_01__074() {\n  assert(isNaN(0 * Number.POSITIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_01__029() {\n  assert(\"1\" * true === 1)\n})();\n\n(function tc_11_05_01__034() {\n  assert(isNaN(true * undefined) === true)\n})();\n\n(function tc_11_05_01__068() {\n  assert(isNaN(undefined * new String(\"1\")) === true)\n})();\n\n(function tc_11_05_01__061() {\n  assert(new Number(2) * null === 0)\n})();\n\n(function tc_11_05_01__077() {\n  assert(Number.POSITIVE_INFINITY * Number.NEGATIVE_INFINITY === Number.NEGATIVE_INFINITY)\n})();\n\n(function tc_11_05_01__080() {\n  assert(Number.NEGATIVE_INFINITY * 1 === Number.NEGATIVE_INFINITY)\n})();\n\n(function tc_11_05_01__022() {\n  assert(isNaN(\"a\" * 1) === true)\n})();\n\n(function tc_11_05_01__019() {\n  assert(1 * true === 1)\n})();\n\n(function tc_11_05_01__006() {\n  var a = 0;\n  assert(a * (a = 1) === 0)\n})();\n\n(function tc_11_05_01__054() {\n  assert(new String(\"2\") * new Boolean(true) === 2)\n})();\n\n(function tc_11_05_01__013() {\n  assert(isNaN(\"1\" * \"a\") === true)\n})();\n\n(function tc_11_05_01__021() {\n  assert(\"2\" * 3 === 6)\n})();\n\n(function tc_11_05_01__063() {\n  assert(null * new String(\"2\") === 0)\n})();\n\n(function tc_11_05_01__035() {\n  assert(isNaN(undefined * true) === true)\n})();\n\n(function tc_11_05_01__056() {\n  assert(new String(\"2\") * new Number(1) === 2)\n})();\n\n(function tc_11_05_01__031() {\n  assert(isNaN(undefined * \"1\") === true)\n})();\n\n(function tc_11_05_01__084() {\n  assert(Number.MAX_VALUE * 2 === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_01__025() {\n  assert(null * 1 === 0)\n})();\n\n(function tc_11_05_01__042() {\n  assert(isNaN(Number.NaN * Number.NEGATIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_01__079() {\n  assert(Number.NEGATIVE_INFINITY * Number.NEGATIVE_INFINITY === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_01__040() {\n  assert(isNaN(Number.NaN * -0) === true)\n})();\n\n(function tc_11_05_01__007() {\n  var a = 2;\n  assert(a *\n          3 === 6)\n})();\n\n(function tc_11_05_01__070() {\n  assert(isNaN(new Number(1) * undefined) === true)\n})();\n\n(function tc_11_05_01__055() {\n  assert(new String(\"2\") * true === 2)\n})();\n\n(function tc_11_05_01__041() {\n  assert(isNaN(Number.NaN * Number.POSITIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_01__003() {\n  var a = 3;\n  assert(a * 2 === 6)\n})();\n\n(function tc_11_05_01__014() {\n  assert(null * null === 0)\n})();\n\n(function tc_11_05_01__073() {\n  assert(isNaN(0 * Number.NEGATIVE_INFINITY) === true)\n})();\n\n(function tc_11_05_01__002() {\n  var a = 3;\n  assert(2 * a === 6)\n})();\n\n(function tc_11_05_01__004() {\n  var a = 3;\n  var b = 2;\n  assert(a * b === 6)\n})();\n\n(function tc_11_05_01__046() {\n  assert(1 * new Number(1) === 1)\n})();\n\n(function tc_11_05_01__026() {\n  assert(isNaN(1 * undefined) === true)\n})();\n\n(function tc_11_05_01__008() {\n  assert(true * true === 1)\n})();\n\n(function tc_11_05_01__060() {\n  assert(null * new Number(2) === 0)\n})();\n\n(function tc_11_05_01__028() {\n  assert(true * \"1\" === 1)\n})();\n\n(function tc_11_05_01__089() {\n  assert(0.1 * Number.MIN_VALUE === +0)\n})();\n\n(function tc_11_05_01__062() {\n  assert(new String(\"2\") * null === 0)\n})();\n\n(function tc_11_05_01__053() {\n  assert(new Boolean(true) * new String(\"2\") === 2)\n})();\n\n(function tc_11_05_01__037() {\n  assert(null * true === 0)\n})();\n\n(function tc_11_05_01__036() {\n  assert(true * null === 0)\n})();\n\n(function tc_11_05_01__047() {\n  assert(new Number(1) * 1 === 1)\n})();\n\n(function tc_11_05_01__033() {\n  assert(null * \"1\" === 0)\n})();\n\n(function tc_11_05_01__009() {\n  assert(true * false === 0)\n})();\n\n(function tc_11_05_01__032() {\n  assert(\"1\" * null === 0)\n})();\n\n(function tc_11_05_01__043() {\n  assert(isNaN(Number.NaN * Number.MAX_VALUE) === true)\n})();\n\n(function tc_11_05_01__051() {\n  assert(true * new Boolean(true) === 1)\n})();\n\n(function tc_11_05_01__017() {\n  assert(isNaN(null * undefined) === true)\n})();\n\n(function tc_11_05_01__024() {\n  assert(1 * null === 0)\n})();\n\n(function tc_11_05_01__012() {\n  assert(isNaN(\"a\" * \"1\") === true)\n})();\n\n(function tc_11_05_01__066() {\n  assert(isNaN(new Boolean(true) * undefined) === true)\n})();\n\n(function tc_11_05_01__076() {\n  assert(Number.POSITIVE_INFINITY * Number.POSITIVE_INFINITY === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_01__081() {\n  assert((-1) * Number.NEGATIVE_INFINITY === Number.POSITIVE_INFINITY)\n})();\n\n(function tc_11_05_01__086() {\n  assert((-1.5) * Number.MAX_VALUE === Number.NEGATIVE_INFINITY)\n})();\n\n(function tc_11_05_01__090() {\n  assert((Number.MAX_VALUE * 1.1) * 0.9 !== Number.MAX_VALUE * (1.1 * 0.9))\n})();\n\n(function tc_11_05_01__020() {\n  assert(2 * \"3\" === 6)\n})();\n\n(function tc_11_05_01__088() {\n  assert(Number.MIN_VALUE * (-0.5) === -0)\n})();\n\n(function tc_11_05_01__016() {\n  assert(isNaN(undefined * null) === true)\n})();\n\n(function tc_11_05_01__075() {\n  assert(isNaN(Number.POSITIVE_INFINITY * 0) === true)\n})();\n\n(function tc_11_05_01__082() {\n  assert((-1) * Number.POSITIVE_INFINITY === Number.NEGATIVE_INFINITY)\n})();\n\n(function tc_11_05_01__059() {\n  assert(isNaN({} * {}) === true)\n})();\n\n(function tc_11_05_01__023() {\n  assert(isNaN(1 * \"a\") === true)\n})();\n\n(function tc_11_05_01__057() {\n  assert(new String(\"2\") * 1 === 2)\n})();\n\n(function tc_11_05_01__052() {\n  assert(new Boolean(true) * true === 1)\n})();\n\n(function tc_11_05_01__072() {\n  assert(isNaN(Number.NEGATIVE_INFINITY * 0) === true)\n})();\n\n(function tc_11_05_01__039() {\n  assert(isNaN(Number.NaN * +0) === true)\n})();\n\n(function tc_11_05_01__045() {\n  assert(isNaN(Number.NaN * 1) === true)\n})();\n\n(function tc_11_05_01__065() {\n  assert(new Boolean(true) * null === 0)\n})();\n\n(function tc_11_05_01__011() {\n  assert(\"2\" * \"3\" === 6)\n})();\n\n(function tc_11_05_01__027() {\n  assert(isNaN(undefined * 1) === true)\n})();\n\n(function tc_11_05_01__044() {\n  assert(isNaN(Number.NaN * Number.MIN_VALUE) === true)\n})();\n\n(function tc_11_05_01__071() {\n  assert(isNaN(undefined * new Number(1)))\n})();\n\n(function tc_11_05_01__030() {\n  assert(isNaN(\"1\" * undefined) === true)\n})();\n\n(function tc_11_05_03__005() {\n  assert(100 % -3 > 0)\n})();\n\n(function tc_11_05_03__022() {\n  var n = 100;\n  var d = new Boolean(false);\n  assert(isNaN(n % d))\n})();\n\n(function tc_11_05_03__013() {\n  assert(isNaN(-Infinity % Infinity))\n})();\n\n(function tc_11_05_03__018() {\n  var n = 105;\n  var d = 10;\n  assert(n % d === 5)\n})();\n\n(function tc_11_05_03__028() {\n  assert(isNaN(1 % null))\n})();\n\n(function tc_11_05_03__002() {\n  assert(isNaN(100 % NaN))\n})();\n\n(function tc_11_05_03__020() {\n  var n = 550;\n  var d = 5.5;\n  assert(n % d === 0)\n})();\n\n(function tc_11_05_03__026() {\n  assert(isNaN(undefined % 1))\n})();\n\n(function tc_11_05_03__007() {\n  assert(isNaN(Infinity % 3))\n})();\n\n(function tc_11_05_03__027() {\n  assert(null % 1 === +0)\n})();\n\n(function tc_11_05_03__030() {\n  var n = new Boolean(true);\n  var d = new String(\"\");\n  assert(isNaN(n % d))\n})();\n\n(function tc_11_05_03__015() {\n  assert(+0 % 5 === +0)\n})();\n\n(function tc_11_05_03__012() {\n  assert(0 % 5 === 0)\n})();\n\n(function tc_11_05_03__023() {\n  var n = \"100\";\n  var d = \"\";\n  assert(isNaN(n % d))\n})();\n\n(function tc_11_05_03__003() {\n  assert(isNaN(NaN % NaN))\n})();\n\n(function tc_11_05_03__010() {\n  assert(isNaN(Infinity % 0))\n})();\n\n(function tc_11_05_03__024() {\n  var n = {\n    valueOf: function () {\n      return 109.5;\n    }\n  }\n  var d = {\n    valueOf: function () {\n      return 5.5;\n    }\n  }\n  assert(n % d === 5)\n})();\n\n(function tc_11_05_03__029() {\n  var n = new String(\"100\");\n  var d = new String(\"10\");\n  assert(n % d === 0)\n})();\n\n(function tc_11_05_03__019() {\n  var n = 109.5;\n  var d = 5.5;\n  assert(n % d === 5)\n})();\n\n(function tc_11_05_03__008() {\n  assert(isNaN(-Infinity % 3))\n})();\n\n(function tc_11_05_03__025() {\n  var n = {\n    valueOf: function () {\n      return -Infinity;\n    }\n  }\n  var d = {\n    valueOf: function () {\n      return 0;\n    }\n  }\n  assert(isNaN(n % d))\n})();\n\n(function tc_11_05_03__021() {\n  var n = 100;\n  var d = new Boolean(true);\n  assert(n % d === 0)\n})();\n\n(function tc_11_05_03__006() {\n  assert(-100 % -3 < 0)\n})();\n\n(function tc_11_05_03__016() {\n  var n = 100;\n  var d = 10;\n  assert(n % d === 0)\n})();\n\n(function tc_11_05_03__009() {\n  assert(isNaN(5 % 0))\n})();\n\n(function tc_11_05_03__001() {\n  assert(isNaN(NaN % 1))\n})();\n\n(function tc_11_05_03__017() {\n  var n = 100.5;\n  var d = 10;\n  assert(n % d === 0.5)\n})();\n\n(function tc_11_05_03__011() {\n  assert(5 % Infinity === 5)\n})();\n\n(function tc_11_05_03__004() {\n  assert(-100 % 3 < 0)\n})();\n\n(function tc_11_05_03__014() {\n  assert(-0 % 5 === -0)\n})();\n\n(function tc_11_03_02__006() {\n  var a = true;\n  var b = false;\n  assert((a-- === 1) && (b-- === +0) && (a === 0) && (b === -1));\n})();\n\n(function tc_11_03_02__010() {\n  var a = \"1\";\n  assert((a-- === 1) && (a === 0));\n})();\n\n(function tc_11_03_02__015() {\n  var a = \"Infinity\";\n  assert((a-- === Infinity) && (a === Infinity));\n})();\n\n(function tc_11_03_02__013() {\n  var a = \"\";\n  assert((a-- === 0) && (a === -1));\n})();\n\n(function tc_11_03_02__016() {\n  var a = \"0xa\";\n  assert((a-- === 0xa) && (a === 9));\n})();\n\n(function tc_11_03_02__009() {\n  var a = undefined;\n  assert(isNaN(a--) && isNaN(a));\n})();\n\n(function tc_11_03_02__012() {\n  var a = \"1e3\";\n  assert((a-- === 1e3) && (a === 999));\n})();\n\n(function tc_11_03_02__011() {\n  var a = \"blah\";\n  assert(isNaN(a--) && isNaN(a));\n})();\n\n(function tc_11_03_02__014() {\n  var a = \"  \";\n\n  assert((a-- === 0) && (a === -1));\n\n})();\n\n(function tc_11_03_02__008() {\n  var a = null;\n  assert((a-- == +0) && (a === -1));\n})();\n\n(function tc_11_03_02__005() {\n  var a = 1;\n  assert((a-- === 1) && (a === 0));\n})();\n\n(function tc_11_03_02__007() {\n  var a = {\n    valueOf: function () {\n      return 1;\n    }\n  }\n\n  assert((a-- === 1) && (a === 0));\n\n})();\n\n(function tc_11_03_01__007() {\n  var a = {\n    valueOf: function () {\n      return 1;\n    }\n  }\n\n  assert((a++ === 1) && (a === 2));\n})();\n\n(function tc_11_03_01__016() {\n  var a = \"0xa\";\n  assert((a++ === 0xa) && (a === 0xb));\n})();\n\n(function tc_11_03_01__014() {\n  var a = \"  \";\n  assert((a++ === 0) && (a === 1));\n})();\n\n(function tc_11_03_01__015() {\n  var a = \"Infinity\";\n\n  assert((a++ === Infinity) && (a === Infinity));\n})();\n\n(function tc_11_03_01__009() {\n  var a = undefined;\n\n  assert(isNaN(a++) && isNaN(a));\n})();\n\n(function tc_11_03_01__005() {\n  var a = 1;\n\n  assert((a++ === 1) && (a === 2));\n})();\n\n(function tc_11_03_01__012() {\n  var a = \"1e3\";\n\n  assert((a++ === 1e3) && (a === 1001));\n\n})();\n\n(function tc_11_03_01__008() {\n  var a = null;\n\n  assert((a++ == +0) && (a === 1));\n})();\n\n(function tc_11_03_01__006() {\n  var a = true;\n  var b = false;\n\n  assert((a++ === 1) && (b++ === +0) && (a === 2) && (b === 1));\n})();\n\n(function tc_11_03_01__011() {\n  var a = \"blah\";\n  assert ( isNaN(a++) && isNaN(a) );\n})();\n\n(function tc_11_03_01__013() {\n  var a = \"\";\n  assert((a++ === 0) && (a === 1));\n})();\n\n(function tc_11_03_01__010() {\n  var a = \"1\";\n\n  assert((a++ === 1) && (a === 2));\n})();\n\n(function tc_11_08_07__008() {\n  var a = {name: 'Masha', 'age': 10}\n  var c = 'Masha' in a\n  assert(!c)\n})();\n\n(function tc_11_08_07__005() {\n  var a = {name: 'Masha', 'age': 10}\n  var c = 'name' in a\n  assert(c)\n})();\n\n(function tc_11_08_07__010() {\n  var a = new String('example');\n  assert('toString' in a);\n})();\n\n(function tc_11_08_07__007() {\n  var a = {name: 'Masha', 'age': 10}\n  var c = \"age\" in a\n  assert(c)\n})();\n\n(function tc_11_08_07__009() {\n  var a = {name: 'Masha', 'age': 10}\n  var c = \"toString\" in a\n  assert(c)\n})();\n\n(function tc_11_08_07__014() {\n  var c = 'PI' in Math\n  assert(c)\n})();\n\n(function tc_11_08_07__011() {\n  var a = new String('example')\n  var c = 'length' in a\n  assert(c)\n})();\n\n(function tc_11_08_07__013() {\n  var a = new String('example')\n  var c = 'toString' in a\n  assert(c)\n})();\n\n(function tc_11_08_07__001() {\n  var a = [1, 2, 3, 4, 5, 6]\n  var c = 0 in a\n  assert(c)\n})();\n\n(function tc_11_08_07__004() {\n  var a = [1, 2, 3, 4, 5, 6]\n  var c = '0' in a\n  assert(c)\n})();\n\n(function tc_11_08_07__003() {\n  var a = [1, 2, 3, 4, 5, 6]\n  var c = 6 in a\n  assert(!c)\n})();\n\n(function tc_11_08_07__002() {\n  var a = [1, 2, 3, 4, 5, 6]\n  var c = 5 in a\n  assert(c)\n})();\n\n(function tc_11_08_07__012() {\n  var a = new String('example');\n  assert(!('toString.' in a));\n})();\n\n(function tc_11_08_01__006() {\n  var a = false, b = true\n  var c = a < b\n  assert(c)\n})();\n\n(function tc_11_08_01__003() {\n  var a = \"abc\", b = \"abd\"\n  var c = a < b\n  assert(c)\n})();\n\n(function tc_11_08_01__002() {\n  var a = 7, b = 6\n  var c = a < b\n  assert(!c)\n})();\n\n(function tc_11_08_01__001() {\n  var a = 5, b = 7\n  var c = a < b\n  assert(c)\n})();\n\n(function tc_11_08_01__005() {\n  var a = null, b = undefined\n  var c = a < b\n  assert(!c)\n})();\n\n(function tc_11_08_01__004() {\n  var a = \"abd\", b = \"abc\"\n  var c = a < b\n  assert(!c)\n})();\n\n(function tc_11_08_04__006() {\n  var a = false, b = true\n  var c = a >= b\n  assert(!c)\n})();\n\n(function tc_11_08_04__005() {\n  var a = null, b = undefined\n  var c = a >= b\n  assert(!c)\n})();\n\n(function tc_11_08_04__003() {\n  var a = \"zbda\", b = \"zbd\"\n  var c = a >= b\n  assert(c)\n})();\n\n(function tc_11_08_04__001() {\n  var a = 700000000000000000000, b = 500000000000000000000\n  var c = a >= b\n  assert(c)\n})();\n\n(function tc_11_08_04__008() {\n  var a = 1.2, b = '1.2'\n  var c = a >= b\n  assert(c)\n})();\n\n(function tc_11_08_04__002() {\n  var a = 6.233, b = 6.234\n  var c = a >= b\n  assert(!c)\n})();\n\n(function tc_11_08_04__009() {\n  var a = 6.233, b = 6.233\n  var c = a >= b\n  assert(c)\n})();\n\n(function tc_11_08_04__004() {\n  var a = \"aaaaa1\", b = \"aaaaaz\"\n  var c = a >= b\n  assert(!c)\n})();\n\n(function tc_11_08_04__007() {\n  var a = false, b = false\n  var c = a >= b\n  assert(c)\n})();\n\n(function tc_11_08_03__010() {\n  var a = 2, b = function () {\n  }\n  var c = a <= b\n  assert(!c)\n})();\n\n(function tc_11_08_03__001() {\n  var a = 5, b = 7\n  var c = a <= b\n  assert(c)\n})();\n\n(function tc_11_08_03__008() {\n  var a = \"abd\", b = \"abd\"\n  var c = a <= b\n  assert(c)\n})();\n\n(function tc_11_08_03__005() {\n  var a = null, b = undefined\n  var c = a <= b\n  assert(!c)\n})();\n\n(function tc_11_08_03__007() {\n  var a = 7, b = 7\n  var c = a <= b\n  assert(c)\n})();\n\n(function tc_11_08_03__002() {\n  var a = 7, b = 6\n  var c = a <= b\n  assert(!c)\n})();\n\n(function tc_11_08_03__011() {\n  var a = 2, b = 'sdafg'\n  var c = a <= b\n  assert(!c)\n})();\n\n(function tc_11_08_03__009() {\n  var a = true, b = true\n  var c = a <= b\n  assert(c)\n})();\n\n(function tc_11_08_03__003() {\n  var a = \"abc\", b = \"abd\"\n  var c = a <= b\n  assert(c)\n})();\n\n(function tc_11_08_03__004() {\n  var a = \"abd\", b = \"abc\"\n  var c = a <= b\n  assert(!c)\n})();\n\n(function tc_11_08_03__006() {\n  var a = false, b = true\n  var c = a <= b\n  assert(c)\n})();\n\n(function tc_11_08_06__007() {\n  var a = new Object()\n  var c = a instanceof Object\n  assert(c)\n})();\n\n(function tc_11_08_06__005() {\n  var a = new String('abcd')\n  var c = a instanceof String\n  assert(c)\n})();\n\n(function tc_11_08_06__003() {\n  var a = new Number(2)\n  var c = a instanceof Number\n  assert(c)\n})();\n\n(function tc_11_08_06__002() {\n  var a = Number(2)\n  var c = a instanceof Number\n  assert(!c)\n})();\n\n(function tc_11_08_06__001() {\n  var a = 2\n  var c = a instanceof Number\n  assert(!c)\n})();\n\n(function tc_11_08_06__008() {\n  var a = null;\n  var c = a instanceof Object;\n  assert (!c);\n})();\n\n(function tc_11_08_06__004() {\n  var a = 'abcd'\n  var c = a instanceof String\n  assert(!c)\n})();\n\n(function tc_11_08_06__006() {\n  var a = function () {\n  }\n  var b = new a()\n  var c = b instanceof a\n  assert(c)\n})();\n\n(function tc_11_08_02__005() {\n  var a = null, b = undefined\n  var c = a > b\n  assert(!c)\n})();\n\n(function tc_11_08_02__004() {\n  var a = \"aaaaa1\", b = \"aaaaaz\"\n  var c = a > b\n  assert(!c)\n})();\n\n(function tc_11_08_02__003() {\n  var a = \"zbda\", b = \"zbd\"\n  var c = a > b\n  assert(c)\n})();\n\n(function tc_11_08_02__006() {\n  var a = false, b = true\n  var c = a > b\n  assert(!c)\n})();\n\n(function tc_11_08_02__001() {\n  var a = 700000000000000000000, b = 500000000000000000000\n  var c = a > b\n  assert(c)\n})();\n\n(function tc_11_08_02__002() {\n  var a = 6.233, b = 6.234\n  var c = a > b\n  assert(!c)\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/test_suite_12.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_12_02__007() {\n  var a = 'undefined';\n\n  assert(a === 'undefined');\n})();\n\n(function tc_12_02__019() {\n  var\n          a = 2\n\n  assert(a === 2);\n})();\n\n(function tc_12_02__022() {\n  var a = 1;\n  var b = a;\n\n  assert(a === b);\n})();\n\n(function tc_12_02__003() {\n  var a = null;\n  assert(a === null);\n})();\n\n(function tc_12_02__001() {\n  var a;\n  assert(a === undefined);\n})();\n\n(function tc_12_02__006() {\n  var a = 'undefined';\n\n  assert(a === \"undefined\");\n})();\n\n(function tc_12_02__014() {\n  var\n\n          $a = 2;\n  assert($a === 2);\n})();\n\n(function tc_12_02__010() {\n  var a, b = 3.14, c;\n\n  assert(a === undefined && b === 3.14 && c === undefined)\n})();\n\n(function tc_12_02__004() {\n  var a = undefined;\n\n  assert(a === undefined);\n})();\n\n(function tc_12_02__005() {\n  var a = \"undefined\";\n\n  assert(a === \"undefined\");\n})();\n\n(function tc_12_02__009() {\n  var a = 1,\n          b,\n          c = 4;\n\n  b = a + c;\n\n  assert(b === 5);\n})();\n\n(function tc_12_02__011() {\n  var a, b, c;\n\n  assert(a === undefined && b === undefined && c === undefined);\n})();\n\n(function tc_12_02__002() {\n  var a = 12345;\n  assert(a === 12345);\n})();\n\n(function tc_12_02__020() {\n  var a = RegExp();\n\n  assert(a instanceof RegExp);\n})();\n\n(function tc_12_02__015() {\n  var a = 12 + \"abc\";\n\n  assert(a === \"12abc\");\n})();\n\n(function tc_12_02__018() {\n  var a = [];\n\n  assert(a instanceof Array && a.length === 0);\n})();\n\n(function tc_12_02__016() {\n  var a = {};\n  var b = typeof (a);\n\n  assert(b === \"object\" && b === typeof (Object()) && b === typeof ({}));\n})();\n\n(function tc_12_02__008() {\n  var a = false, b = true;\n\n  assert(a === false && b === true);\n})();\n\n(function tc_12_02__013() {\n  var\n          _a$1 = 2;\n\n  assert(_a$1 === 2);\n})();\n\n(function tc_12_02__012() {\n  var\n          _a1 = 2;\n\n  assert(_a1 === 2);\n})();\n\n(function tc_12_02__021() {\n  var a = new Date();\n\n  assert(a instanceof Date);\n})();\n\n(function tc_12_02_01__002() {\n  var arguments = 2;\n  assert(arguments === 2 && typeof (arguments) === \"number\");\n})();\n\n(function tc_12_02_01__001() {\n  var eval = 1;\n  assert(eval === 1 && typeof (eval) === \"number\");\n})();\n\n(function tc_12_12__006() {\n  var x = 0;\n  lablemark:\n          if (x < 6) {\n    ++x;\n    break lablemark;\n  }\n\n  assert(x !== 6);\n})();\n\n(function tc_12_12__010() {\n  var x = 0;\n  for (i = 0; i < 10; ++i) {\n    lablemark:\n            for (j = 0; j < 10; ++j) {\n      for (k = 0; k < 10; ++k) {\n        ++x;\n        continue lablemark;\n      }\n    }\n  }\n\n  assert(x == 100)\n})();\n\n(function tc_12_12__007() {\n  var x = 0;\n  for (i = 0; i < 10; ++i) {\n    for (j = 0; j < 10; ++j) {\n      lablemark:\n              for (k = 0; k < 10; ++k) {\n        ++x;\n        break lablemark;\n      }\n    }\n  }\n\n  assert(x == 100)\n})();\n\n(function tc_12_12__003() {\n  switchMark:\n          switch (1) {\n    case 0:\n      break;\n    case 1:\n      break switchMark;\n    case 2:\n      assert(false);\n  }\n})();\n\n(function tc_12_12__009() {\n  var x = 0;\n  lablemark:\n          for (i = 0; i < 10; ++i) {\n    for (j = 0; j < 10; ++j) {\n      for (k = 0; k < 10; ++k) {\n        ++x;\n        break lablemark;\n      }\n    }\n  }\n\n  assert(x == 1)\n})();\n\n(function tc_12_12__008() {\n  var x = 0;\n  for (i = 0; i < 10; ++i) {\n    lablemark:\n            for (j = 0; j < 10; ++j) {\n      for (k = 0; k < 10; ++k) {\n        ++x;\n        break lablemark;\n      }\n    }\n  }\n\n  assert(x == 10)\n})();\n\n(function tc_12_12__005() {\n  whileMark:\n          for (i = 0; i < 10; ++i) {\n    continue whileMark;\n    assert(false);\n  }\n})();\n\n(function tc_12_12__001() {\n  loop:\n          while (true) {\n    break loop;\n  }\n})();\n\n(function tc_12_12__004() {\n  var i = 0;\n\n  whileMark:\n          while (i < 10) {\n    ++i;\n    continue whileMark;\n    assert(false);\n  }\n})();\n\n(function tc_12_12__002() {\n  loop:\n          while (true) {\n    do {\n      for (; true; ) {\n        break loop;\n      }\n    } while (true);\n  }\n})();\n\n(function tc_12_03__003() {\n  var a=\"ab;c\"\n  ;\n  ;\n  assert (a === 'ab;c');\n})();\n\n(function tc_12_03__001() {\n  function test()\n  {\n    ;\n    return 1;;;;;;\n  }\n\n  test();\n})();\n\n(function tc_12_03__002() {\n  function test()\n  {\n   ;;;;;;\n   return 1\n  }\n\n  test();\n})();\n\n(function tc_12_05__001() {\n  function test()\n  {\n    if (true) {\n      return 1;\n    }\n    assert(false);\n  }\n\n  test();\n})();\n\n(function tc_12_05__007() {\n  var a = 1, b = 2;\n  var c;\n  if (a === 1)\n  {\n    if (b === 1)\n      c = 3;\n  }\n  else\n  if (b === 2)\n    c = 5;\n  else\n    c = 7;\n\n  assert(c === undefined);\n})();\n\n(function tc_12_05__008() {\n  var a = 1, b = 2;\n  var c;\n  if (a === 1)\n    if (b === 1)\n      c = 3;\n    else\n    if (b === 2)\n      c = 5;\n    else\n      c = 7;\n\n  assert(c === 5);\n\n})();\n\n(function tc_12_05__004() {\n  function test()\n  {\n    if (false)\n      assert(false);\n    else {\n      return 1;\n    }\n  }\n\n  test();\n})();\n\n(function tc_12_05__006() {\n  var a = 'w\\0', b = 'w\\0';\n  assert(a === b);\n})();\n\n(function tc_12_05__002() {\n  function test()\n  {\n    if (false) {\n      assert(false);\n    }\n  }\n\n  test();\n})();\n\n(function tc_12_05__005() {\n  function test()\n  {\n      if(true);\n  }\n\n  test();\n})();\n\n(function tc_12_05__003() {\n  function test()\n  {\n    if (true)\n    {\n      return 1;\n    }\n    else\n      assert(false);\n  }\n\n  test();\n})();\n\n(function tc_12_06_03__008() {\n  var sum = 1;\n\n  for (var i = 0; i < 10; i++, sum *= i)\n    ;\n\n  assert(sum === 3628800);\n})();\n\n(function tc_12_06_03__010() {\n  for\n          (\n                  var i = 0\n                  ;\n                  i < 10\n                  ;\n                  i++\n                  )\n  {\n    i++;\n  }\n\n  assert(i == 10);\n})();\n\n(function tc_12_06_03__005() {\n  var i = 0;\n  for (; ; )\n  {\n    if (i++ === 100)\n      break;\n  }\n})();\n\n(function tc_12_06_03__004() {\n  var i;\n\n  for (i = 1; i < 20; )\n    i *= 2;\n\n  assert(i === 32);\n})();\n\n(function tc_12_06_03__011() {\n  var i;\n\n  function test()\n  {\n    for (i = 0; i < 10; i++)\n    {\n      if (i === 4)\n        return 1;\n    }\n\n    return 0;\n  }\n\n  var r = test();\n\n  assert(r === 1 && i === 4);\n})();\n\n(function tc_12_06_03__009() {\n  var init;\n\n  for (init = (129 - 8) / 11; init != 11; )\n  {\n    init = 33;\n  }\n\n  assert(init == 11);\n})();\n\n(function tc_12_06_03__001() {\n  var cnt = 1;\n\n  for (var i = 0; i < 10; i++)\n    cnt++;\n\n  assert(cnt === 11 && i === 10);\n})();\n\n(function tc_12_06_03__006() {\n  var sum = 0;\n  for (var i = 1; i <= 10; i++)\n  {\n    for (var j = 1; j <= 5; j++)\n    {\n      sum += i * j;\n    }\n  }\n\n  assert(sum === 825);\n})();\n\n(function tc_12_06_03__007() {\n  var sum = 0;\n  for (var i = 1, j = 1, k = 1; i + j + k <= 100; i++, j += 2, k += 3)\n  {\n    sum += i + j + k;\n  }\n\n  assert(sum == 867);\n})();\n\n(function tc_12_06_03__003() {\n  var i;\n\n  for (i = 0; ; i += 5)\n  {\n    if (i === 100)\n      break;\n  }\n})();\n\n(function tc_12_06_03__002() {\n  var cond = 1.999;\n  var cnt = 0;\n\n  for (; cond < 10.333; cond += 1.121)\n    cnt++;\n\n  assert(cnt == 8);\n})();\n\n(function tc_12_06_04__007() {\n  var o = {a: 1, b: 2, c: 3, d: 4, e: 5};\n\n  function test()\n  {\n    for (var p in o)\n    {\n      if (p === 'c')\n        return 1;\n\n      o[p] += 4;\n    }\n    return 0;\n  }\n\n  var r = test();\n\n  assert(((o.a === 5 && o.b === 6 && o.c === 3) ||\n          (o.c === 3 && o.d === 8 && o.e === 9)) && r === 1);\n})();\n\n(function tc_12_06_04__006() {\n  var o = {a: 1, b: 2, c: 3};\n\n  for\n          (\n                  var\n                  p in o\n                  )\n  {\n    o[p] += 4;\n  }\n\n  assert(o.a === 5 && o.b === 6 && o.c === 7);\n})();\n\n(function tc_12_06_04__002() {\n  var a = new Array(1, 2, 3, 4, 5, 6, 7);\n  a.eight = 8;\n\n  var p;\n  for (p in a)\n  {\n    a[p] += 1;\n  }\n\n  assert(a[0] === 2 && a[1] === 3 && a[2] === 4 && a[3] === 5 &&\n          a[4] === 6 && a[5] === 7 && a[6] === 8 && a['eight'] === 9);\n})();\n\n(function tc_12_06_04__005() {\n  var b = {basep: \"base\"};\n\n  function dConstr()\n  {\n    this.derivedp = \"derived\";\n  }\n  dConstr.prototype = b;\n\n  var d = new dConstr();\n\n  for (var p in d)\n  {\n    d[p] += \"A\";\n  }\n\n  assert(d.basep === \"baseA\" && d.derivedp === \"derivedA\");\n})();\n\n(function tc_12_06_04__004() {\n  var a;\n\n  for (var p in a)\n  {\n    assert(false);\n  }\n})();\n\n(function tc_12_06_04__001() {\n  var o = {a: 1, b: 2, c: 3};\n\n  for (var p in o)\n  {\n    o[p] += 4;\n  }\n\n  assert(o.a === 5 && o.b === 6 && o.c === 7);\n})();\n\n(function tc_12_06_04__003() {\n  var a = null;\n\n  for (var p in a)\n  {\n    assert(false);\n  }\n})();\n\n(function tc_12_06_01__002() {\n  var cnt = 1;\n  do\n  {\n    cnt++;\n    if (cnt === 42) {\n      break;\n    }\n  } while (true);\n})();\n\n(function tc_12_06_01__010() {\n  var cnt = 0;\n\n  function test()\n  {\n    do\n    {\n      cnt++;\n      if (cnt === 8)\n        return 1;\n    }\n    while (cnt < 10);\n\n    return 0;\n  }\n\n  var r = test();\n\n  assert(cnt === 8 && r === 1);\n})();\n\n(function tc_12_06_01__009() {\n  var cnt = 0;\n  do\n  {\n    cnt++;\n  }\n  while\n          (cnt < 10\n                  );\n\n  assert(cnt === 10);\n})();\n\n(function tc_12_06_01__006() {\n  var cnt = 1;\n  do\n  {\n    cnt++;\n  }\n  while (false);\n\n  assert(cnt === 2);\n})();\n\n(function tc_12_06_01__001() {\n  var cnt = 1;\n  do\n    cnt++;\n  while (cnt < 10);\n\n  assert(cnt === 10);\n})();\n\n(function tc_12_06_01__007() {\n  var cnt = 1;\n  do\n  {\n    cnt++;\n  }\n  while (!\"string\");\n\n  assert(cnt === 2);\n})();\n\n(function tc_12_06_01__003() {\n  var cnt = 1;\n  do {\n    cnt++;\n\n    if (cnt === 10)\n    {\n      break;\n    }\n  }\n  while (0, 1);\n})();\n\n(function tc_12_06_01__005() {\n  var x = 1 / 3;\n  do\n  {\n    x = 1;\n  }\n  while (x === 3 / 9);\n  assert (x === 1);\n})();\n\n(function tc_12_06_01__008() {\n  var cnt = 0;\n  do\n  {\n    cnt++;\n  }\n  while (!(cnt & 0x8000));\n\n  assert(cnt == 32768);\n})();\n\n(function tc_12_06_01__004() {\n  var obj = new Object();\n  obj.x = \"defined\";\n  do\n  {\n    delete obj.x;\n  }\n  while (obj.x !== undefined);\n})();\n\n(function tc_12_06_02__004() {\n  var cnt = 33;\n\n  while (\"\")\n    cnt /= 2;\n\n  assert(cnt === 33);\n})();\n\n(function tc_12_06_02__005() {\n  var bVal = true;\n  var val = \"test\";\n\n  while (!bVal)\n  {\n    val += \" of while\";\n  }\n\n  assert(val === \"test\");\n})();\n\n(function tc_12_06_02__008() {\n  var cnt = 25;\n\n  function test()\n  {\n    while (cnt)\n    {\n      cnt--;\n      if (cnt === 3)\n        return 1;\n    }\n    return 0;\n  }\n\n  r = test();\n\n  assert(cnt === 3 && r === 1);\n})();\n\n(function tc_12_06_02__002() {\n  var cnt = 0;\n\n  while (1) {\n    cnt++;\n    if (cnt === 10)\n      break;\n  }\n})();\n\n(function tc_12_06_02__003() {\n  var cnt = 0;\n  while ((1234 - 34) % 23 - 1234 * 23.222)\n  {\n    cnt++;\n    if (cnt === 10)\n      break;\n  }\n})();\n\n(function tc_12_06_02__001() {\n  var cnt = 25;\n  while (cnt)\n    cnt--;\n\n  assert(cnt === 0);\n})();\n\n(function tc_12_06_02__007() {\n  var bitField = 0x1000000;\n  var cnt = 0;\n\n  while\n          (\n                  bitField >>= 1 &&\n                  true\n                  )\n  {\n    cnt++;\n  }\n\n  assert(cnt === 24);\n})();\n\n(function tc_12_06_02__006() {\n  var bitField = 0x1000000;\n  var cnt = 0;\n\n  while (bitField >>= 1)\n  {\n    cnt++;\n  }\n\n  assert(cnt === 24);\n})();\n\n(function tc_12_09__002() {\n  var r = test()\n\n  assert(r === 1);\n\n  function test()\n  {\n    return ((23 << 2) + 8) / 100;\n  }\n})();\n\n(function tc_12_09__001() {\n  var r = test()\n\n  assert(typeof r == 'object' && r.prop1 === \"property1\" && r.prop2 === 2 && r.prop3 === false);\n\n  function test()\n  {\n    var o = {\n      prop1: \"property1\",\n      prop2: 2,\n      prop3: false\n    };\n\n    return o;\n  }\n})();\n\n(function tc_12_09__005() {\n  var r = test()\n\n  assert(r === 100);\n\n  function test()\n  {\n    function internal()\n    {\n      return 100;\n    }\n\n    return internal();\n  }\n})();\n\n(function tc_12_09__006() {\n  var r = test()\n\n  assert(typeof r == 'function');\n\n  function test()\n  {\n    function internal()\n    {\n      return 100;\n    }\n\n    return internal;\n  }\n})();\n\n(function tc_12_09__004() {\n  var r = test()\n\n  assert(r == undefined);\n\n  function test()\n  {\n    var r = 1;\n    return\n    r;\n  }\n})();\n\n(function tc_12_09__003() {\n  var r = test()\n\n  assert(r === 33);\n\n  function test()\n  {\n    return 33;\n  }\n})();\n\n(function tc_12_04__003() {\n  var a, b, c\n  a = 2, b = 3, c = 4\n})();\n\n(function tc_12_04__001() {\n  var a = 5, b = 1;\n  (a + b);\n})();\n\n(function tc_12_04__002() {\n  var a = 5, b = 1;\n  a = a && b;\n})();\n\n(function tc_12_04__004() {\n  var a\n  a = function () {\n  }\n})();\n\n(function tc_12_08__008() {\n  var i = 9;\n  var cnt = 0;\n\n  while (i-- > 0)\n  {\n    if (i % 2)\n      break;\n\n    var j = 0;\n    while (j++ < 20)\n    {\n      if (j % 2 === 0)\n        break;\n      cnt++;\n    }\n\n  }\n\n  assert(cnt === 1);\n})();\n\n(function tc_12_08__014() {\n  var sum = 0;\n  var i = 0, j = 0;\n  top:\n          do\n  {\n    j = 0;\n\n    do\n    {\n      if (j > 9 && i % 2)\n        break top;\n\n      sum += 1;\n    }\n    while (j++ < 20);\n\n    sum += 1;\n  }\n  while (i++ < 10);\n\n  assert(sum === 32);\n})();\n\n(function tc_12_08__009() {\n  var sum = 0, i = 0;\n\n  WhileLabel:\n          while (++i < 10)\n  {\n    if (i === 5)\n    {\n      break WhileLabel;\n    }\n\n    sum += i;\n  }\n\n  assert(sum === 10);\n})();\n\n(function tc_12_08__010() {\n  var sum = 0;\n  var i = 0, j = 0;\n  top:\n          while (i++ < 10)\n  {\n    j = 0;\n    while (j++ < 20)\n    {\n      if (j > 9 && i % 2)\n        break top;\n\n      sum += 1;\n    }\n\n    sum += 1;\n  }\n\n  assert(sum === 9);\n})();\n\n(function tc_12_08__011() {\n  var mask = 0xff0f;\n  var numOnes = 0;\n\n  do\n  {\n    if (!(mask & 1))\n      break;\n\n    mask >>= 1;\n    numOnes++;\n  } while (mask);\n\n  assert(numOnes === 4);\n})();\n\n(function tc_12_08__002() {\n  var o = {p1: 1,\n    p2: {p1: 100, p2: 200, p3: 100},\n    p3: 4,\n    p4: 7,\n    p5: 124686,\n    p6: {p1: 100, p2: 200, p3: 100},\n    p7: 1},\n  sum = 0;\n\n  for (var p in o)\n  {\n    if (p === \"p4\")\n      break;\n\n    if (typeof (o[p]) === \"object\")\n    {\n      for (var pp in o[p])\n      {\n        if (pp === \"p2\")\n          break;\n\n        sum += o[p][pp];\n      }\n    }\n    else\n    {\n      sum += 20;\n    }\n  }\n\n  assert(sum === 140);\n})();\n\n(function tc_12_08__007() {\n  var mask = 0xff0f;\n  var numOnes = 0;\n\n  while (mask)\n  {\n    if (!(mask & 1))\n      break;\n\n    mask >>= 1;\n    numOnes++;\n  }\n\n  assert(numOnes === 4);\n})();\n\n(function tc_12_08__004() {\n  function main()\n  {\n    var sum = 0;\n    for (var i = 0; i < 10; i++)\n      for (var j = 0; j < 20; j++)\n      {\n        if (j === 10)\n          break;\n\n        sum += 1;\n      }\n\n    assert(sum === 100);\n  }\n\n  main ();\n})();\n\n(function tc_12_08__016() {\n  var o = {p1: 1, p2: 2, p3: {p1: 150, p2: 200, p3: 130, p4: 20}, p4: 4, p5: 46}, sum = 0;\n  for (var p in o)\n  {\n    if (p === \"p4\")\n      continue;\n\n    if (typeof (o[p]) === \"object\")\n    {\n      for (var pp in o[p])\n      {\n        if (pp === \"p2\")\n          break;\n\n        sum += o[p][pp];\n      }\n    }\n    else {\n      sum += o[p];\n    }\n  }\n\n  assert(sum === 199);\n})();\n\n(function tc_12_08__012() {\n  var i = 10;\n  var cnt = 0;\n\n  do\n  {\n    var j = 0;\n    do\n    {\n      if (j % 2 === 0)\n        break;\n      cnt++;\n    }\n    while (j++ < 20)\n\n    if (i % 2)\n      break;\n  }\n  while (i-- > 0);\n\n  assert(cnt === 0);\n})();\n\n(function tc_12_08__001() {\n  var o = {p1: 1,\n    p2: {p1: 100, p2: 200, p3: 100},\n    p3: 4,\n    p4: 7,\n    p5: 124686,\n    p6: {p1: 100, p2: 200, p3: 100},\n    p7: 1},\n  sum = 0;\n\n\n  for (var p in o)\n  {\n    if (p === \"p4\")\n      break;\n\n    if (typeof (o[p]) === \"object\")\n    {\n      top:\n              for (var pp in o[p])\n      {\n        if (pp === \"p2\")\n          break top;\n\n        sum += o[p][pp];\n      }\n    }\n\n    sum += 20;\n\n  }\n\n  assert(sum === 160);\n})();\n\n(function tc_12_08__018() {\n  var o = {p1: 1,\n    p2: {p1: 100, p2: 200, p3: 100},\n    p3: 4,\n    p4: 7,\n    p5: 124686,\n    p6: {p1: 100, p2: 200, p3: 100},\n    p7: 1},\n  sum = 0;\n\n  top:\n          for (var p in o)\n  {\n    if (p === \"p4\")\n      break;\n\n    if (typeof (o[p]) === \"object\")\n    {\n      for (var pp in o[p])\n      {\n        if (pp === \"p2\")\n          break top;\n\n        sum += o[p][pp];\n      }\n    }\n\n    sum += 20;\n\n  }\n\n  assert(sum === 120)\n})();\n\n(function tc_12_08__013() {\n  var sum = 0, i = 0;\n\n  DoWhileLabel:\n          do\n  {\n    if (i === 5)\n    {\n      break DoWhileLabel;\n    }\n\n    sum += i;\n  }\n  while (++i < 10);\n\n  assert(sum === 10);\n})();\n\n(function tc_12_08__005() {\n  var sum = 0;\n\n  ForLabel:\n          for (var i = 0; i < 10; i++)\n  {\n    if (i === 5)\n    {\n      break ForLabel;\n    }\n\n    sum += i;\n  }\n\n  assert(sum === 10);\n})();\n\n(function tc_12_08__015() {\n  var o = {p1: 1, p2: 2, p3: 3, p4: 1, p5: 2}, sum = 0;\n  for (var p in o)\n  {\n    if (p === \"p3\")\n    {\n      break;\n    }\n\n    sum += o[p];\n  }\n\n  assert(sum === 3);\n})();\n\n(function tc_12_08__017() {\n  var o = {a: 1, b: 2, c: 3};\n\n  ForLabel:\n          for (var p in o)\n  {\n    if (p === \"b\")\n      break ForLabel;\n    o[p] += 4;\n  }\n\n  assert(o.a + o.b + o.c === 10);\n})();\n\n(function tc_12_08__003() {\n  var sum = 0;\n  for (var i = 0; i < 10; i++)\n  {\n    if (i === 5)\n    {\n      break;\n    }\n\n    sum += i;\n  }\n\n  assert(sum === 10);\n})();\n\n(function tc_12_08__006() {\n  var sum = 0;\n  top:\n          for (var i = 0; i < 10; i++)\n  {\n    for (var j = 0; j < 20; j++)\n    {\n      if (j > 9 && i % 2)\n        break top;\n\n      sum += 1;\n    }\n\n    sum += 1;\n  }\n\n  assert(sum === 31);\n})();\n\n(function tc_12_10__003() {\n  var o = {prop: \"property\"};\n\n  with (o) {\n    assert(prop == \"property\");\n  }\n})();\n\n(function tc_12_10__005() {\n  with ({})\n  {\n    var x = \"abc\";\n  }\n\n  assert(x === \"abc\");\n})();\n\n(function tc_12_10__004() {\n  var x;\n\n  function test()\n  {\n    with (Math)\n    {\n      x = abs(-396);\n      return 1;\n    }\n\n    return 0;\n  }\n\n  var r = test();\n\n  assert(r === 1 && x === 396);\n})();\n\n(function tc_12_10__002() {\n  var o = {prop: \"property\"};\n\n  with (o) {\n    assert(prop == \"property\");\n  }\n})();\n\n(function tc_12_10__007() {\n  var x, y;\n\n  with\n          (\n                  Math)\n  {\n    x = cos(PI);\n  }\n\n  assert(x == -1);\n})();\n\n(function tc_12_10__001() {\n  var x, y;\n\n  with (Math) {\n    x = cos(PI);\n  }\n\n  assert(x == -1);\n})();\n\n(function tc_12_10__006() {\n  assert(test(\"hello\") == \"hello\" && typeof test({}) == \"object\" && test({arg: \"hello\"}) == \"hello\")\n\n  function test(arg) {\n    with (arg) {\n      return arg;\n    }\n  }\n})();\n\n(function tc_12_11__005() {\n  switch (1) {\n  }\n})();\n\n(function tc_12_11__002() {\n  var matchesCount = 0;\n\n  switch (\"key\") {\n    case \"key\":\n      ++matchesCount;\n      break;\n    case \"key\":\n      ++matchesCount;\n      break;\n    case \"another key\":\n      ++matchesCount;\n      break;\n    default:\n      ++matchesCount;\n      break;\n  }\n\n  assert (matchesCount === 1);\n})();\n\n(function tc_12_11__001() {\n  switch (1) {\n    case 0:\n      assert(false);\n    case 1:\n      break;\n    default:\n      assert(false);\n  }\n})();\n\n(function tc_12_11__006() {\n  function fact(n)\n  {\n    return n < 2 ? 1 : n * fact(n - 1);\n  }\n\n  switch (fact(5)) {\n    case 5 * fact(4):\n      break;\n    default:\n      assert(false);\n  }\n})();\n\n(function tc_12_11__004() {\n  var counter = 0;\n\n  switch (\"key\") {\n    case \"key\":\n      ++counter;\n    case \"another key\":\n      ++counter;\n    case \"another key2\":\n      ++counter;\n    default:\n      ++counter;\n  }\n\n  assert (counter == 4);\n})();\n\n(function tc_12_11__003() {\n  switch (1) {\n    case true:\n      assert(false);\n    case false:\n      assert(false);\n    default:\n      assert(true);\n  }\n})();\n\n(function tc_12_11__007() {\n  switch (\"key\") {\n    case \"another key\":\n      assert(false);\n    default:\n      break;\n    case \"another key2\":\n      assert(false);\n  }\n})();\n\n(function tc_12_14__001() {\n  try {\n    try {\n      throw \"error\";\n    } catch (e) {\n      throw e;\n    }\n    assert(false);\n  } catch (e) {\n  }\n})();\n\n(function tc_12_14__003() {\n  function test ()\n  {\n      try {\n          throw 1;\n      } catch (e) {\n          return (e === 1);\n      }\n\n      return false;\n  }\n\n  assert (test ());\n})();\n\n(function tc_12_14__004() {\n  function test ()\n  {\n    try {\n      throw \"error\";\n    } catch (e) {\n      return false;\n    } finally {\n      return true;\n    }\n\n    return false;\n  }\n\n  assert (test ());\n})();\n\n(function tc_12_14__006() {\n  function test ()\n  {\n    try {\n      var x = 1;\n    } finally {\n      return true;\n    }\n\n    return false;\n  }\n\n  assert (test ());\n})();\n\n(function tc_12_14__005() {\n  function test ()\n  {\n      try {\n          throw \"error\";\n      } catch (e) {\n          return true;\n      } finally {\n      }\n\n      return false;\n  }\n\n  assert (test ());\n})();\n\n(function tc_12_14__002() {\n  function test ()\n  {\n    try {\n      var x = 1;\n    } catch (e) {\n      return false;\n    }\n\n    return true;\n  }\n\n  assert (test ());\n})();\n\n(function tc_12_01__005() {\n  {\n    {\n      var a = null;\n      ;\n    }\n    {\n      {\n      }\n    }\n    a = 'null';\n  }\n\n  assert(a === 'null');\n})();\n\n(function tc_12_01__004() {\n  {\n    var a = null;\n    ;\n    a = 'null';\n  }\n\n  assert(a === 'null');\n})();\n\n(function tc_12_01__002() {\n  function test ()\n  {\n    {\n      return true;\n    }\n    return false;\n  }\n\n  assert (test ());\n})();\n\n(function tc_12_01__003() {\n  {;;}\n})();\n\n(function tc_12_01__001() {\n  {\n  }\n})();\n\n(function tc_12_13__001() {\n  function test ()\n  {\n    try {\n      if (true) {\n        throw \"error\";\n      }\n    } catch (e) {\n      return true;\n    }\n    return false;\n  }\n\n  assert (test ());\n})();\n\n(function tc_12_13__003() {\n  function d () {\n    throw \"exception\";\n  }\n  function c () {\n    d ();\n  }\n  function b () {\n    c ();\n  }\n  function a () {\n    b ();\n  }\n\n  function test ()\n  {\n    try {\n      a ();\n    } catch (e) {\n      return true;\n    }\n    return false;\n  }\n\n  assert (test ());\n})();\n\n(function tc_12_13__002() {\n  function test ()\n  {\n    try {\n      while (true) {\n        throw \"error\";\n      }\n    } catch (e) {\n      return true;\n    }\n    return false;\n  }\n\n  assert (test ());\n})();\n\n(function tc_12_07__001() {\n  var sum = 0;\n  for (var i = 0; i < 10; i++)\n  {\n    if (i === 5)\n    {\n      continue;\n    }\n\n    sum += i;\n  }\n\n  assert(sum === 40);\n})();\n\n(function tc_12_07__009() {\n  var sum = 0, i = 0;\n\n  WhileLabel:\n          while (++i < 10)\n  {\n    if (i === 5)\n    {\n      continue WhileLabel;\n    }\n\n    sum += i;\n  }\n\n  assert(sum === 40);\n})();\n\n(function tc_12_07__006() {\n  var sum = 0;\n  top:\n          for (var i = 0; i < 10; i++)\n  {\n    for (var j = 0; j < 20; j++)\n    {\n      if (j > 9 && i % 2)\n        continue top;\n\n      sum += 1;\n    }\n\n    sum += 1;\n  }\n\n  assert(sum === 155);\n})();\n\n(function tc_12_07__002() {\n  var sum = 0;\n  for (var i = 0; i < 10; i++)\n    for (var j = 0; j < 20; j++)\n    {\n      if (j > 9)\n        continue;\n\n      sum += 1;\n    }\n\n  assert(sum === 100);\n})();\n\n(function tc_12_07__015() {\n  var o = {p1: 1, p2: 2, p3: 3, p4: 4, p5: 5}, sum = 0;\n  for (var p in o)\n  {\n    if (p == \"p3\")\n    {\n      continue;\n    }\n\n    sum += o[p];\n  }\n\n  assert(sum == 12)\n})();\n\n(function tc_12_07__008() {\n  var i = 10;\n  var cnt = 0;\n\n  while (i-- > 0)\n  {\n    if (i % 2)\n      continue;\n\n    var j = 0;\n    while (j++ < 20)\n    {\n      if (j % 2 === 0)\n        continue;\n      cnt++;\n    }\n\n  }\n\n  assert(cnt === 50);\n})();\n\n(function tc_12_07__004() {\n  var o = {a: 1, b: 2, c: 3};\n\n  ForLabel:\n          for (var p in o)\n  {\n    if (p === \"b\")\n      continue ForLabel;\n    o[p] += 4;\n  }\n\n  assert(o.a === 5 && o.b === 2 && o.c === 7);\n})();\n\n(function tc_12_07__012() {\n  var i = 10;\n  var cnt = 0;\n\n  do\n  {\n    if (i % 2)\n      continue;\n\n    var j = 0;\n    do\n    {\n      if (j % 2 === 0)\n        continue;\n      cnt++;\n    }\n    while (j++ < 20)\n  }\n  while (i-- > 0);\n\n  assert(cnt === 60);\n})();\n\n(function tc_12_07__003() {\n  var o = {p1: 1, p2: 2, p3: {p1: 100, p2: 200, p3: 100}, p4: 4, p5: 5}, sum = 0;\n\n  top:\n          for (var p in o)\n  {\n    if (p === \"p2\")\n      continue;\n\n    if (typeof (o[p]) === \"object\")\n    {\n      for (var pp in o[p])\n      {\n        if (pp === \"p2\")\n          continue top;\n\n        sum += o[p][pp];\n      }\n    }\n\n    sum += 20;\n\n  }\n\n  assert(sum === 160);\n})();\n\n(function tc_12_07__016() {\n  var o = {p1: 1, p2: 2, p3: {p1: 100, p2: 200}, p4: 4, p5: 5}, sum = 0;\n  for (var p in o)\n  {\n    if (p === \"p2\")\n      continue;\n\n    if (typeof (o[p]) === \"object\")\n    {\n      for (var pp in o[p])\n      {\n        if (pp === \"p2\")\n          continue;\n\n        sum += o[p][pp];\n      }\n    }\n    else {\n      sum += o[p];\n    }\n  }\n\n  assert(sum === 110);\n})();\n\n(function tc_12_07__013() {\n  var sum = 0, i = 0;\n\n  DoWhileLabel:\n          do\n  {\n    if (i === 5)\n    {\n      continue DoWhileLabel;\n    }\n\n    sum += i;\n  }\n  while (++i < 10);\n\n  assert(sum === 40);\n})();\n\n(function tc_12_07__010() {\n  var sum = 0;\n  var i = 0, j = 0;\n  top:\n          while (i++ < 10)\n  {\n    j = 0;\n    while (j++ < 20)\n    {\n      if (j > 9 && i % 2)\n        continue top;\n\n      sum += 1;\n    }\n\n    sum += 1;\n  }\n\n  assert(sum === 150);\n})();\n\n(function tc_12_07__007() {\n  var mask = 0xff0f;\n  var numZeroes = 0;\n\n  while (mask)\n  {\n    mask >>= 1;\n\n    if (mask & 1)\n      continue;\n\n    numZeroes++;\n  }\n\n  assert(numZeroes === 5);\n})();\n\n(function tc_12_07__011() {\n  var mask = 0xff0f;\n  var numZeroes = 0;\n\n  do\n  {\n    mask >>= 1;\n\n    if (mask & 1)\n      continue;\n\n    numZeroes++;\n  } while (mask);\n\n  assert(numZeroes === 5);\n})();\n\n(function tc_12_07__005() {\n  var sum = 0;\n\n  ForLabel:\n          for (var i = 0; i < 10; i++)\n  {\n    if (i === 5)\n    {\n      continue ForLabel;\n    }\n\n    sum += i;\n  }\n\n  assert(sum === 40);\n})();\n\n(function tc_12_07__014() {\n  var sum = 0;\n  var i = 0, j = 0;\n  top:\n          do\n  {\n    j = 0;\n\n    do\n    {\n      if (j > 9 && i % 2)\n        continue top;\n\n      sum += 1;\n    }\n    while (j++ < 20);\n\n    sum += 1;\n  }\n  while (i++ < 10);\n\n  assert(sum === 182);\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/test_suite_13.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_13__012() {\n  function foo(a, b, c, d) {\n    var deleted = true;\n    for (i = 0; i < arguments.length; i++)\n    {\n      delete arguments[i];\n      deleted = deleted && (typeof (arguments[i]) === \"undefined\");\n    }\n    return deleted;\n  }\n\n  assert(foo(\"A\", \"F\", 1, true) === true);\n})();\n\n(function tc_13__005() {\n  var foo = 1;\n\n  assert (foo === 1);\n\n  function foo()\n  {\n      return 1;\n  }\n})();\n\n(function tc_13__013() {\n  function foo(arguments) {\n    return arguments;\n  }\n\n  assert(foo(1) === 1);\n})();\n\n(function tc_13__010() {\n  function foo() {\n    return 1;\n  }\n  var object = new Object;\n  object.fun = foo;\n\n  assert(object.fun() === 1);\n})();\n\n(function tc_13__001() {\n  var b = 1;\n  for (var i = 1; i < 10; ++i)\n  {\n    b *= i;\n  }\n  var c = b;\n\n  assert(c == 362880);\n})();\n\n(function tc_13__007() {\n  function foo(arg) {\n    return ++arg;\n  }\n\n  assert(foo(1) === 2);\n})();\n\n(function tc_13__008() {\n  function foo(params) {\n    return arguments.length;\n  }\n\n  assert(foo(1, 'e', true, 5) === 4);\n})();\n\n(function tc_13__003() {\n  assert(function (param1, param2) {\n    return 1;\n  }(true, \"blah\") === 1);\n})();\n\n(function tc_13__011() {\n  function foo(param1) {\n    return delete arguments;\n  }\n\n  assert(!foo(\"param\"));\n})();\n\n(function tc_13__002() {\n  function foo() {\n    return 1;\n  }\n\n  assert(foo() === 1);\n})();\n\n(function tc_13__009() {\n  var check = typeof (foo) === \"function\";\n\n  var foo = 1;\n\n  check = check && (foo === 1);\n\n  function foo() {\n    return 1;\n  }\n\n  assert(check);\n})();\n\n(function tc_13__006() {\n  function foo() {\n  }\n\n  assert(foo() === undefined);\n})();\n\n(function tc_13__004() {\n  function foo() {\n  }\n\n  assert(typeof foo === \"function\");\n})();\n\n(function tc_13_01__001() {\n  function arguments (param) {\n    return true;\n  }\n  assert (arguments ());\n})();\n\n(function tc_13_02__001() {\n  var foo = function () {\n    this.caller = 123;\n  };\n  var f = new foo();\n  assert(f.caller === 123);\n})();\n\n(function tc_13_02__007() {\n  var obj = new function foo()\n  {\n    this.prop = 1;\n  };\n\n  assert(obj.prop === 1);\n})();\n\n(function tc_13_02__003() {\n  function foo(arg) {\n    arg.prop = 3;\n  }\n  var obj = new Object();\n  foo(obj);\n\n  assert(obj.prop === 3);\n})();\n\n(function tc_13_02__006() {\n  function foo() {\n    return;\n  }\n\n  assert(foo() === undefined);\n})();\n\n(function tc_13_02__004() {\n  function foo(arg) {\n    arg += 3;\n  }\n\n  var num = 1;\n  foo(num);\n\n  assert(num === 1);\n})();\n\n(function tc_13_02__005() {\n  function foo() {\n    return null;\n  }\n\n  assert(foo() === null);\n})();\n\n(function tc_13_02__008() {\n  function func() {\n  }\n\n  assert(Function.prototype.isPrototypeOf(func));\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/test_suite_15.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function tc_15_02_01__004() {\n  var a = 1;\n  assert(typeof Object(a) === 'object');\n})();\n\n(function tc_15_02_01__005() {\n  var a = true;\n\n  assert(typeof Object(a) === 'object');\n})();\n\n(function tc_15_02_01__002() {\n  var a;\n  a = Object(null);\n\n  assert(typeof a === 'object');\n})();\n\n(function tc_15_02_01__003() {\n  var a;\n  a = Object(undefined);\n\n  assert(typeof a === 'object');\n})();\n\n(function tc_15_02_01__006() {\n  var a = false;\n  assert(typeof Object(a) === 'object');\n})();\n\n(function tc_15_02_01__007() {\n  var a = \"some string\";\n\n  assert(typeof Object(a) === 'object');\n})();\n\n(function tc_15_02_01__009() {\n  var a = new Number(123.5);\n  assert (typeof Object(a) === 'object');\n})();\n\n(function tc_15_02_01__008() {\n  var a = \"some string\";\n  assert(typeof Object(a) === 'object');\n})();\n\n(function tc_15_02_01__010() {\n  var a = new String(\"nice string\");\n  assert(typeof Object(a) === 'object');\n})();\n\n(function tc_15_02_01__001() {\n  var a;\n  a = Object();\n\n  assert(typeof a === 'object');\n})();\n\n(function tc_15_02_03__018() {\n  var object = {\n    prop1: Number,\n    prop2: String,\n    prop3: Boolean\n  }\n\n  Object.seal(object);\n\n  check = delete object.prop1 || delete object.prop2 || delete object.prop3;\n\n  object.prop4 = 3;\n\n  check = check || Boolean(object.prop4);\n\n  assert(!check);\n})();\n\n(function tc_15_02_03__017() {\n  var object = {\n    prop1: \"qwerty\",\n    prop2: 123,\n  }\n\n  Object.freeze(object);\n\n  object.prop1 = \"asdf\";\n  object.prop3 = true;\n\n  assert(!(object.prop1 === \"asdf\") && !delete object.prop2 && !object.prop3);\n})();\n\n(function tc_15_02_03__001() {\n  assert(typeof Object.getPrototypeOf(Object) == \"function\" &&\n          Object.length == 1);\n})();\n\n(function tc_15_02_03__004() {\n  var object = {\n    prop1: Number,\n    prop2: String,\n    prop3: true,\n    prop4: 0\n  }\n\n  var keys = Object.keys(object);\n\n  assert(keys[0] == \"prop1\" &&\n          keys[1] == \"prop2\" &&\n          keys[2] == \"prop3\" &&\n          keys[3] == \"prop4\");\n\n})();\n\n(function tc_15_02_03__019() {\n  var emptyObject = {}\n\n  var properties = {\n    prop1: {\n      writable: true,\n      enumerable: true,\n      configurable: false,\n      value: \"I'm prop1\"\n    },\n    prop2: {\n      writable: true,\n      enumerable: true,\n      configurable: false,\n      value: \"I'm prop2\"\n    }\n  }\n\n  var isEnumerable = true;\n  var isConfigurable = true;\n  var isWritable = false;\n\n  Object.defineProperties(emptyObject, properties);\n\n  emptyObject.prop1 = \"hello\";\n  emptyObject.prop2 = \"world\";\n\n  if (emptyObject.prop1 === \"hello\" && emptyObject.prop2 == \"world\")\n    isWritable = true;\n\n  for (p in emptyObject) {\n    if (emptyObject[p] === \"hello\")\n      isEnumerable = !isEnumerable;\n    else if (emptyObject[p] === \"world\")\n      isEnumerable = !isEnumerable;\n  }\n\n  isConfigurable = delete emptyObject.prop1 && delete emptyObject.prop2\n\n  assert(isWritable && isEnumerable && !isConfigurable);\n})();\n\n(function tc_15_02_03__016() {\n  var emptyObject = {}\n\n  var propertyDescriptor = {\n    enumerable: true,\n    configurable: true,\n    get: function () {\n      return myProperty;\n    },\n    set: function (newValue) {\n      myProperty = newValue;\n    }\n  }\n\n  Object.defineProperty(emptyObject, 'myProperty', propertyDescriptor);\n\n  var checkGetSet = false;\n  var isEnumerable = false;\n  var isConfigurable = false;\n\n  emptyObject.myProperty = \"foobar\";\n  if (emptyObject.myProperty == \"foobar\")\n    checkGetSet = true;\n\n  for (p in emptyObject) {\n    if (emptyObject[p] == \"foobar\") {\n      isEnumerable = true;\n      break;\n    }\n  }\n\n  if (delete emptyObject.myProperty)\n    isConfigurable = true;\n\n  assert(checkGetSet && isEnumerable && isConfigurable);\n})();\n\n(function tc_15_02_03__010() {\n  var a = new String(\"qwe\");\n\n  names = Object.getOwnPropertyNames(a);\n\n  assert(names instanceof Array);\n\n  var is_0 = false, is_1 = false, is_2 = false, is_length = false;\n  for (var i = 0; i <= 3; i++)\n  {\n    if (names[i] === \"0\") { is_0 = true; }\n    if (names[i] === \"1\") { is_1 = true; }\n    if (names[i] === \"2\") { is_2 = true; }\n    if (names[i] === \"length\") { is_length = true; }\n  }\n\n  assert (is_0 && is_1 && is_2 && is_length);\n})();\n\n(function tc_15_02_03__020() {\n  var emptyObject = {}\n\n  var propertyDescriptor = {\n    enumerable: true,\n    configurable: true,\n    value: \"hello!\",\n    writable: true\n  }\n\n  Object.defineProperty(emptyObject, 'myProperty', propertyDescriptor);\n\n  var isWritable = false;\n  var isEnumerable = false;\n  var isConfigurable = false;\n\n  emptyObject.myProperty = \"foobar\";\n  if (emptyObject.myProperty == \"foobar\")\n    isWritable = true;\n\n  for (p in emptyObject) {\n    if (emptyObject[p] == \"foobar\") {\n      isEnumerable = true;\n      break;\n    }\n  }\n\n  if (delete emptyObject.myProperty)\n    isConfigurable = true;\n\n  assert(isWritable && isEnumerable && isConfigurable);\n})();\n\n(function tc_15_02_03__003() {\n  writable = false;\n  enumerable = false;\n  configurable = false;\n\n  Object.prototype = \"qwerty\";\n  if (Object.prototype === \"qwerty\")\n    writable = true;\n\n  for (prop in Object)\n  {\n    if (Object[prop] == \"qwerty\")\n      enumerable = true;\n  }\n\n  if (delete Object.prototype)\n    configurable = true;\n\n  assert(!writable && !enumerable && !configurable);\n})();\n\n(function tc_15_02_03__009() {\n  var a = {\n    prop1: Number,\n    prop2: String,\n    foo: function () {\n      return 1;\n    },\n    bar: function () {\n      return 0;\n    }\n  };\n  names = Object.getOwnPropertyNames(a);\n\n  assert(names instanceof Array &&\n          names[0] === \"prop1\" &&\n          names[1] === \"prop2\" &&\n          names[2] === \"foo\" &&\n          names[3] === \"bar\");\n})();\n\n(function tc_15_02_03__013() {\n  var niceObject = {\n    niceProp1: String,\n    niceProp2: Number,\n    niceMeth: function () {\n      return true;\n    }\n  }\n  var someElseObject = {\n    prop1: Boolean,\n    prop2: Number\n  }\n  var niceChild = Object.create(niceObject, someElseObject);\n\n  assert(Object.getPrototypeOf(niceChild) === niceObject);\n})();\n\n(function tc_15_02_03__012() {\n  var veryUsefulObject = {\n  }\n\n  Object.preventExtensions(veryUsefulObject);\n\n  veryUsefulObject.property = \"qwerty\";\n\n  veryUsefulObject.method = function () {\n    return \"asdf\";\n  }\n\n  assert(veryUsefulObject.property === undefined);\n  assert(veryUsefulObject.method === undefined);\n})();\n\n(function tc_15_02_03__008() {\n  var object1 = {\n    field1: 5,\n    field2: \"qwe\",\n    field3: true\n  }\n\n  var object2 = {\n    field1: 5,\n    field2: \"qwe\",\n    field3: true\n  }\n\n  Object.freeze(object1);\n\n  assert(Object.isFrozen(object1) && !Object.isFrozen(object2));\n})();\n\n(function tc_15_02_03__021() {\n  var emptyObject = {}\n\n  var propertyDescriptor = {\n    enumerable: true,\n    configurable: true,\n    value: \"hello!\",\n    writable: true\n  }\n\n  Object.defineProperty(emptyObject, 'myProperty', propertyDescriptor);\n\n  var newPropertyDescriptor = {\n    enumerable: false,\n    configurable: false,\n    writable: false\n  }\n\n  Object.defineProperty(emptyObject, 'myProperty', newPropertyDescriptor);\n\n  var isWritable = false;\n  var isEnumerable = false;\n  var isConfigurable = false;\n\n  emptyObject.myProperty = \"foobar\";\n  if (emptyObject.myProperty == \"foobar\")\n    isWritable = true;\n\n  for (p in emptyObject) {\n    if (emptyObject[p] == \"foobar\") {\n      isEnumerable = true;\n      break;\n    }\n  }\n\n  if (delete emptyObject.myProperty)\n    isConfigurable = true;\n\n  assert(!isWritable && !isEnumerable && !isConfigurable);\n})();\n\n(function tc_15_02_03__007() {\n  var a = {\n    foo: function () {\n      return 1\n    }\n  }\n  desc = Object.getOwnPropertyDescriptor(a, \"foo\");\n\n  assert(desc instanceof Object);\n})();\n\n(function tc_15_02_03__002() {\n  assert(typeof Object.prototype == \"object\");\n})();\n\n(function tc_15_02_03__011() {\n  var object1 = {\n    field1: 5,\n    field2: \"qwe\",\n    field3: true\n  }\n\n  var object2 = {\n    field1: 5,\n    field2: \"qwe\",\n    field3: true\n  }\n\n  Object.seal(object1);\n\n  assert(Object.isSealed(object1) && !Object.isSealed(object2));\n})();\n\n(function tc_15_02_03__014() {\n  var a = new String(\"qwe\");\n  var someElseObject = {\n    prop1: Boolean,\n    prop2: Number\n  }\n  var niceChild = Object.create(a, someElseObject);\n\n  assert(Object.getPrototypeOf(niceChild) === a);\n})();\n\n(function tc_15_02_03__006() {\n  var object1 = {\n    field1: 5,\n    field2: \"qwe\",\n    field3: true\n  }\n\n  var object2 = {\n    field1: 5,\n    field2: \"qwe\",\n    field3: true\n  }\n\n  Object.freeze(object1);\n\n  assert(!Object.isExtensible(object1) && Object.isExtensible(object2));\n})();\n\n(function tc_15_02_03__015() {\n  var a = {}\n  var someElseObject = undefined;\n  var childObject = Object.create(a, someElseObject);\n\n  assert(Object.getPrototypeOf(childObject) === a && Object.getOwnPropertyNames(childObject).length == 0);\n})();\n\n(function tc_15_02_03__005() {\n  var a = {\n    field: Number\n  }\n\n  assert(Object.getPrototypeOf(a) == Object.getPrototypeOf(Object()));\n})();\n\n(function tc_15_02_04__002() {\n  assert(Object.isExtensible(Object.getPrototypeOf(Object())));\n})();\n\n(function tc_15_02_04__001() {\n  assert(Object.getPrototypeOf(Object.getPrototypeOf(Object())) === null);\n})();\n\n(function tc_15_02_04_07__001() {\n  var object = {\n    prop: true\n  }\n\n  assert(!object.propertyIsEnumerable('prop2'));\n})();\n\n(function tc_15_02_04_07__002() {\n  var object = {}\n\n  var propertyDescriptor = {\n    enumerable: true,\n    configurable: true,\n    value: \"qwe\",\n    writable: true\n  }\n\n  Object.defineProperty(object, 'prop', propertyDescriptor);\n\n  assert(object.propertyIsEnumerable('prop'));\n})();\n\n(function tc_15_02_04_07__003() {\n  var object = {}\n\n  var propertyDescriptor = {\n    enumerable: false,\n    configurable: true,\n    value: \"qwe\",\n    writable: true\n  }\n\n  Object.defineProperty(object, 'prop', propertyDescriptor);\n\n  assert(!object.propertyIsEnumerable('prop'));\n})();\n\n(function tc_15_02_04_04__007() {\n  var a = false;\n\n  assert(a.valueOf() === false);\n})();\n\n(function tc_15_02_04_04__004() {\n  var a = new Number(5);\n\n  assert(a.valueOf() === 5);\n})();\n\n(function tc_15_02_04_04__001() {\n  var a = new Object();\n  assert(a.valueOf() === a);\n})();\n\n(function tc_15_02_04_04__003() {\n  var a = {\n    n: true,\n    s: \"qwerty\"\n  }\n\n  assert(a.valueOf() === a);\n})();\n\n(function tc_15_02_04_04__002() {\n  var a = {\n    n: Number(5)\n  }\n  assert(a.valueOf() === a);\n})();\n\n(function tc_15_02_04_04__008() {\n  var a = new String(\"qwe\");\n  assert(a.valueOf() === \"qwe\");\n})();\n\n(function tc_15_02_04_04__009() {\n  var a = \"asdfgh\";\n  assert(a.valueOf() === \"asdfgh\");\n})();\n\n(function tc_15_02_04_04__005() {\n  var a = 123;\n\n  assert(a.valueOf() === 123);\n})();\n\n(function tc_15_02_04_04__010() {\n  var a = \"123\";\n  assert(a.valueOf() === \"123\");\n})();\n\n(function tc_15_02_04_04__006() {\n  var a = new Boolean(true);\n\n  assert(a.valueOf() === true);\n})();\n\n(function tc_15_02_04_02__003() {\n  var obj = {};\n  assert(obj.toString() === \"[object Object]\");\n})();\n\n(function tc_15_02_04_02__001() {\n  assert(Object.prototype.toString.call(undefined) === \"[object Undefined]\");\n})();\n\n(function tc_15_02_04_02__002() {\n  assert(Object.prototype.toString.call(null) === \"[object Null]\");\n})();\n\n(function tc_15_02_04_02__004() {\n  assert(Object.prototype.toString.call(123) === \"[object Number]\");\n})();\n\n(function tc_15_02_04_05__002() {\n  var obj = {\n    prop1: 5\n  }\n\n  assert(!obj.hasOwnProperty(\"prop5\"));\n})();\n\n(function tc_15_02_04_05__004() {\n  function Parent() {\n    this.prop = 5;\n  }\n\n  function Child() {\n    this.prop2 = false;\n  }\n\n  Child.prototype = Parent;\n\n  var obj = new Child();\n\n  assert(obj.hasOwnProperty(\"prop2\"));\n})();\n\n(function tc_15_02_04_05__003() {\n  function Parent() {\n    this.prop = 5;\n  }\n\n  function Child() {\n    this.prop2 = false;\n  }\n\n  Child.prototype = Parent;\n\n  var obj = new Child();\n\n  assert(!obj.hasOwnProperty(\"prop\"));\n})();\n\n(function tc_15_02_04_05__001() {\n  var obj = {\n    prop1: 5,\n    prop2: \"qwe\",\n    prop3: Boolean\n  }\n\n  assert(obj.hasOwnProperty(\"prop1\"));\n})();\n\n(function tc_15_02_04_01__002() {\n  assert(Object.prototype.constructor === Object);\n})();\n\n(function tc_15_02_04_01__001() {\n  assert(Object.getPrototypeOf(Object()).constructor === Object);\n})();\n\n(function tc_15_02_04_03__003() {\n  assert(Object.toLocaleString() === Object.toString());\n})();\n\n(function tc_15_02_04_03__002() {\n  var o = new Object();\n  assert(o.toLocaleString() === o.toString());\n\n})();\n\n(function tc_15_02_04_03__001() {\n  assert(typeof Object.prototype.toLocaleString === 'function');\n})();\n\n(function tc_15_02_04_06__001() {\n  var a = new Object();\n  var b = 123;\n\n  assert(!a.isPrototypeOf(b));\n})();\n\n(function tc_15_02_04_06__002() {\n  var object = new Object();\n  var p = Object.getPrototypeOf(object);\n\n  assert(p.isPrototypeOf(object));\n})();\n\n(function tc_15_02_04_06__006() {\n  try\n  {\n    Object.prototype.isPrototypeOf.call(undefined, {});\n\n    assert(false);\n  } catch (e)\n  {\n    assert (e instanceof TypeError);\n  }\n})();\n\n(function tc_15_02_04_06__003() {\n  var object = new Object();\n  var otherObject = new Object();\n\n  assert(!otherObject.isPrototypeOf(object));\n})();\n\n(function tc_15_02_04_06__005() {\n  var object = Object.create(null);\n  var temp = new Object();\n  assert(!temp.isPrototypeOf(object));\n})();\n\n(function tc_15_02_04_06__004() {\n  var object = new Object();\n  assert(!object.isPrototypeOf(object));\n})();\n\n(function tc_15_02_02__009() {\n  var a = new Object(null);\n  assert(typeof a === 'object' &&\n          typeof (Object.getPrototypeOf(a)) === \"object\" &&\n          Object.isExtensible(a));\n})();\n\n(function tc_15_02_02__002() {\n  var a = new Object();\n  var b = new Object();\n\n  assert(a !== b);\n})();\n\n(function tc_15_02_02__006() {\n  var a = 5.5;\n  var b = new Object(a);\n  assert(typeof b === \"object\" && b == a && b !== a);\n})();\n\n(function tc_15_02_02__004() {\n  var a = {\n    field1: Number,\n    field2: String,\n    foo: function () {\n      return 0;\n    }\n  }\n  var b = new Object(a);\n  assert(a === b);\n})();\n\n(function tc_15_02_02__008() {\n  var a = new Object();\n  assert(typeof a === 'object' &&\n          typeof (Object.getPrototypeOf(a)) === \"object\" &&\n          Object.isExtensible(a));\n\n})();\n\n(function tc_15_02_02__010() {\n  var a = new Object(undefined);\n  assert(typeof a === 'object' &&\n          typeof (Object.getPrototypeOf(a)) === \"object\" &&\n          Object.isExtensible(a));\n\n})();\n\n(function tc_15_02_02__007() {\n  var a = true;\n  var b = new Object(a);\n  assert(typeof b === \"object\" && b == a && b !== a);\n})();\n\n(function tc_15_02_02__005() {\n  var a = \"foobar\";\n  var b = new Object(a);\n  assert(typeof b === \"object\" && b == a && b !== a);\n})();\n\n(function tc_15_02_02__003() {\n  var a = new Object();\n  var b = new Object(a);\n  assert(a === b);\n})();\n\n(function tc_15_02_02__001() {\n  var a = new Object();\n\n  assert(typeof a === 'object');\n})();\n\n(function tc_15_03_02_01__002() {\n  try\n  {\n    Function('a', 'a', '\"use strict\";');\n    assert(false);\n  }\n  catch (e)\n  {\n  }\n})();\n\n(function tc_15_03_02_01__005() {\n  \"use strict\";\n  try\n  {\n    Function('eval', 'return;');\n\n  }\n  catch (e)\n  {\n    assert(false);\n  }\n})();\n\n(function tc_15_03_02_01__009() {\n  \"use strict\";\n\n  try\n  {\n    Function('arguments', 'return;');\n  }\n  catch (e)\n  {\n    assert(false);\n  }\n})();\n\n(function tc_15_03_02_01__004() {\n  try\n  {\n    Function('eval', '\"use strict\";');\n    assert(false);\n  }\n  catch (e)\n  {\n  }\n})();\n\n(function tc_15_03_02_01__011() {\n  \"use strict\";\n\n  var foo = new Function(\"baz\", \"baz\", \"baz\", \"return 0;\");\n\n  assert(foo() === 0);\n})();\n\n(function tc_15_03_02_01__001() {\n  var func = new Function(\"a,b\", \"c\", \"return a+b+c\")\n  assert(func(1, 2, 3) == 6);\n})();\n\n(function tc_15_03_02_01__010() {\n  \"use strict\";\n\n  var foo = new Function(\"baz\", \"qux\", \"baz\", \"return 0;\");\n})();\n\n(function tc_15_03_02_01__008() {\n  \"use strict\";\n\n  try\n  {\n    Function('a,a', 'return a;');\n  }\n  catch (e)\n  {\n    assert(false);\n  }\n})();\n\n(function tc_15_03_02_01__007() {\n  try\n  {\n    Function('a,a', '\"use strict\";');\n    assert(false);\n  }\n  catch (e)\n  {\n  }\n})();\n\n(function tc_15_03_02_01__012s() {\n  \"use strict\";\n\n  try\n  {\n    Function('a', 'a', 'return;');\n  }\n  catch (e)\n  {\n    assert(false);\n  }\n})();\n\n(function tc_15_03_04_02__005() {\n  assert(Function.prototype.toString.hasOwnProperty('length'));\n\n  var obj = Function.prototype.toString.length;\n\n  Function.prototype.toString.length = function () {\n    return \"shifted\";\n  };\n\n  assert(Function.prototype.toString.length === obj);\n})();\n\n(function tc_15_03_04_02__002() {\n  var FACTORY = Function.prototype.toString;\n\n  try\n  {\n    var instance = new FACTORY;\n    assert(false);\n  }\n  catch (e)\n  {\n  }\n})();\n\n(function tc_15_03_04_02__003() {\n  assert(Function.prototype.toString.hasOwnProperty('length'));\n  assert(!Function.prototype.toString.propertyIsEnumerable('length'));\n  for (p in Function.prototype.toString)\n  {\n    assert(p !== \"length\");\n  }\n})();\n\n(function tc_15_03_04_02__006() {\n  assert(Function.prototype.toString.hasOwnProperty(\"length\"));\n  assert(Function.prototype.toString.length === 0);\n\n})();\n\n(function tc_15_03_03__004() {\n  assert(Function.hasOwnProperty(\"length\"));\n  assert(Function.length === 1);\n})();\n\n(function tc_15_03_03__002() {\n  assert(Function.prototype.isPrototypeOf(Function));\n})();\n\n(function tc_15_03_03__003() {\n  Function.prototype.indicator = 1;\n  assert (Function.indicator === 1);\n})();\n\n(function tc_15_03_03__001() {\n  assert(Function.hasOwnProperty(\"prototype\"));\n})();\n\n(function tc_15_03_03_01__001() {\n  var obj = Function.prototype;\n  Function.prototype = function () {\n    return \"shifted\";\n  };\n\n  if (Function.prototype !== obj)\n  {\n    assert(false);\n  }\n\n  try\n  {\n    if (Function.prototype() !== undefined)\n    {\n      assert(false);\n    }\n  }\n  catch (e)\n  {\n    assert(false);\n  }\n})();\n\n(function tc_15_03_03_01__002() {\n  if (Function.propertyIsEnumerable('prototype'))\n  {\n    assert(false);\n  }\n\n  var count = 0;\n\n  for (p in Function)\n  {\n    if (p === \"prototype\")\n      count++;\n  }\n\n  if (count !== 0)\n  {\n    assert(false);\n  }\n})();\n\n(function tc_15_03_03_01__003() {\n  delete Function.prototype;\n\n  if (!(Function.hasOwnProperty('prototype')))\n  {\n    assert(false);\n  }\n})();\n\n(function tc_15_03_03_01__004() {\n  function foo() {\n  }\n\n  Object.defineProperty(foo, 'prototype', {value: {}});\n  assert(foo.prototype ===\n          Object.getOwnPropertyDescriptor(foo, 'prototype').value);\n\n})();\n\n(function tc_15_07__001() {\n  var a = Number;\n  Number = null;\n  var b = new a(5);\n  Number = a;\n  assert(b !== 5);\n})();\n\n(function tc_15_07__002() {\n  var a = Number;\n  Number = null;\n  var b = new a(5)\n  Number = a;\n  assert(!(b === 5));\n})();\n\n(function tc_15_07_01__010() {\n  var a = Number;\n  Number = null;\n  var b = a(2);\n  Number = a;\n  assert(b === 2 && typeof b === \"number\");\n})();\n\n(function tc_15_07_01__002() {\n  assert (typeof Number(\"123456\") === \"number\");\n})();\n\n(function tc_15_07_01__005() {\n  assert (Number() === +0);\n})();\n\n(function tc_15_07_01__006() {\n  assert(isNaN(Number(new Error())));\n})();\n\n(function tc_15_07_01__008() {\n  assert(isNaN(Number(\"abcdefg\")));\n})();\n\n(function tc_15_07_01__004() {\n  assert (Number(753) === 753);\n})();\n\n(function tc_15_07_01__001() {\n  assert(Number(\"123456\") === 123456);\n})();\n\n(function tc_15_07_01__007() {\n  assert(typeof Number(\"abcdefg\") === \"number\");\n})();\n\n(function tc_15_07_01__003() {\n  assert(typeof Number(new Object()) === \"number\");\n})();\n\n(function tc_15_07_01__009() {\n  assert(isNaN(Number(function a() {return Infinity})));\n})();\n\n(function tc_15_07_02__011() {\n  var a = new Number();\n  assert(a.valueOf() === +0.0);\n})();\n\n(function tc_15_07_02__004() {\n  var a = Number\n  Number = null\n  var b = new a(\"1e12\")\n  Number = a;\n  assert(b.toString(35) === \"fiyo05lf\");\n})();\n\n(function tc_15_07_02__007() {\n  ts = Number.prototype.toString\n  delete Number.prototype.toString;\n  var a = new Number()\n  assert(a.toString() === \"[object Number]\");\n  Number.prototype.toString = ts;\n})();\n\n(function tc_15_07_02__001() {\n  var a = new Number(\"123456\");\n  assert((a == 123456) && (typeof a === 'object'));\n})();\n\n(function tc_15_07_02__006() {\n  var a = Number\n  Number = null\n  var b = new a(\"1e12\")\n  b.c = new a(new a(777))\n  Number = a;\n  assert(typeof b.c === \"object\" && b.c.valueOf() === 777)\n})();\n\n(function tc_15_07_02__003() {\n  var a = Number\n  Number = null\n  var b = new a(\"1e12\")\n  Number = a;\n  assert(b == 1000000000000 && typeof b === \"object\");\n})();\n\n(function tc_15_07_02__005() {\n  var a = Number\n  Number = null\n  var b = new a(\"1e12\")\n  b.c = new a(new Error())\n  Number = a;\n\n  assert(typeof b.c === \"object\" && isNaN(b.c));\n})();\n\n(function tc_15_07_02__010() {\n  var b = Number.prototype\n  var a = Number\n  Number = null\n  var c = new a(5)\n  Number = a;\n  assert(b === c.constructor.prototype);\n})();\n\n(function tc_15_07_02__009() {\n  var a = new Number(null)\n  assert(Number.prototype === a.constructor.prototype);\n})();\n\n(function tc_15_07_02__002() {\n  var a = new Number();\n  assert((a == +0.0) && (typeof a === 'object'));\n})();\n\n(function tc_15_07_02__008() {\n  var a = new Number(null)\n  assert(Number.prototype.isPrototypeOf(a));\n})();\n\n(function tc_15_07_04__003() {\n  assert(Object.prototype.isPrototypeOf(Number.prototype));\n})();\n\n(function tc_15_07_04_01__002() {\n  assert(Number.prototype.constructor === Number);\n})();\n\n(function tc_15_07_04_01__001() {\n  assert(Number.prototype.hasOwnProperty('constructor'));\n})();\n\n(function tc_15_07_04_02__012() {\n  assert((new Number(Number.POSITIVE_INFINITY)).toString(undefined) === \"Infinity\");\n})();\n\n(function tc_15_07_04_02__011() {\n  assert((new Number(NaN)).toString(undefined) === \"NaN\")\n})();\n\n(function tc_15_07_04_02__005() {\n  var a = -123456789012345\n  assert(a.toString(8) === \"-3404420603357571\");\n})();\n\n(function tc_15_07_04_02__003() {\n  var a = new Number(15);\n  assert(a.toString(2) === \"1111\");\n})();\n\n(function tc_15_07_04_02__010() {\n  assert((new Number(NaN)).toString() === \"NaN\");\n})();\n\n(function tc_15_07_04_02__001() {\n  var a = Number(0.1);\n  assert(a.toString(36) === \"0.3llllllllllqsn8td1p464unmi\");\n})();\n\n(function tc_15_07_04_02__013() {\n  assert ((new Number(Number.NEGATIVE_INFINITY)).toString(undefined) === \"-Infinity\");\n})();\n\n(function tc_15_07_04_02__004() {\n  var a = 123456789012345\n  assert(a.toString(8) === \"3404420603357571\");\n})();\n\n(function tc_15_07_04_02__009() {\n  assert(Number.prototype.hasOwnProperty('toString') &&\n          typeof Number.prototype.toString === \"function\");\n})();\n\n(function tc_15_07_03__004() {\n  var p = Object.getPrototypeOf(Number);\n  assert(p === Function.prototype);\n})();\n\n(function tc_15_07_03__002() {\n  assert(Number.hasOwnProperty(\"length\") && Number.length === 1);\n})();\n\n(function tc_15_07_03__003() {\n  assert(Function.prototype.isPrototypeOf(Number) === true);\n})();\n\n(function tc_15_07_03__001() {\n  assert(Number.constructor.prototype === Function.prototype);\n})();\n\n(function tc_15_07_03_02__002() {\n  assert(Number.MAX_VALUE === 1.7976931348623157e308);\n})();\n\n(function tc_15_07_03_02__003() {\n  assert(Number.MAX_VALUE === 1.7976931348623157e308);\n})();\n\n(function tc_15_07_03_02__004() {\n  var b = Number.MAX_VALUE;\n  Number.MAX_VALUE = 0;\n  assert(Number.MAX_VALUE === b);\n})();\n\n(function tc_15_07_03_02__006() {\n  for (x in Number)\n  {\n    if (x === \"MAX_VALUE\")\n    {\n      assert(false);\n    }\n  }\n})();\n\n(function tc_15_07_03_02__005() {\n  assert(!(delete Number.MAX_VALUE));\n})();\n\n(function tc_15_07_03_02__001() {\n  assert(Number.hasOwnProperty(\"MAX_VALUE\"));\n})();\n\n(function tc_15_07_03_01__001() {\n  assert(Number.hasOwnProperty(\"prototype\"));\n})();\n\n(function tc_15_07_03_01__002() {\n  var a = Object.getOwnPropertyDescriptor(Number, 'prototype');\n\n  assert((a.writable === false &&\n          a.enumerable === false &&\n          a.configurable === false));\n})();\n\n(function tc_15_07_03_01__003() {\n  assert(Object.getPrototypeOf(new Number()) === Number.prototype);\n})();\n\n(function tc_15_07_03_01__007() {\n  for (x in Number)\n  {\n    if (x === \"prototype\")\n    {\n      assert(false);\n    }\n  }\n})();\n\n(function tc_15_07_03_01__005() {\n  assert(delete Number.prototype === false)\n})();\n\n(function tc_15_07_03_01__006() {\n  assert(!Number.propertyIsEnumerable('prototype'));\n})();\n\n(function tc_15_07_03_06__001() {\n  assert(Number.hasOwnProperty(\"POSITIVE_INFINITY\"));\n})();\n\n(function tc_15_07_03_06__006() {\n  for (x in Number)\n  {\n    if (x === \"POSITIVE_INFINITY\")\n    {\n      assert(false);\n    }\n  }\n})();\n\n(function tc_15_07_03_06__007() {\n  assert(!Number.propertyIsEnumerable('POSITIVE_INFINITY'));\n})();\n\n(function tc_15_07_03_06__003() {\n  assert(Number.POSITIVE_INFINITY === Infinity);\n})();\n\n(function tc_15_07_03_06__005() {\n  assert(!(delete Number.POSITIVE_INFINITY));\n})();\n\n(function tc_15_07_03_06__002() {\n  assert(!isFinite(Number.POSITIVE_INFINITY) && Number.POSITIVE_INFINITY > 0);\n})();\n\n(function tc_15_07_03_06__004() {\n  var b = Number.POSITIVE_INFINITY\n  Number.POSITIVE_INFINITY = 0\n  assert(Number.POSITIVE_INFINITY === b);\n})();\n\n(function tc_15_07_03_05__005() {\n  assert(!(delete Number.NEGATIVE_INFINITY));\n})();\n\n(function tc_15_07_03_05__006() {\n  for (x in Number)\n  {\n    if (x === \"NEGATIVE_INFINITY\")\n    {\n      assert(false);\n    }\n  }\n})();\n\n(function tc_15_07_03_05__007() {\n  assert(!Number.propertyIsEnumerable('NEGATIVE_INFINITY'));\n})();\n\n(function tc_15_07_03_05__003() {\n  assert(Number.NEGATIVE_INFINITY === -Infinity);\n})();\n\n(function tc_15_07_03_05__001() {\n  assert(Number.hasOwnProperty(\"NEGATIVE_INFINITY\"));\n})();\n\n(function tc_15_07_03_05__002() {\n  assert(!(isFinite(Number.NEGATIVE_INFINITY) && Number.NEGATIVE_INFINITY < 0));\n})();\n\n(function tc_15_07_03_05__004() {\n  var b = Number.NEGATIVE_INFINITY;\n  Number.NEGATIVE_INFINITY = 0;\n  assert(Number.NEGATIVE_INFINITY === b);\n})();\n\n(function tc_15_07_03_04__001() {\n  assert(Number.hasOwnProperty(\"NaN\"));\n})();\n\n(function tc_15_07_03_04__005() {\n  assert(!(delete Number.NaN));\n})();\n\n(function tc_15_07_03_04__003() {\n  for (x in Number)\n  {\n    if (x === \"NaN\")\n    {\n      assert(false);\n    }\n  }\n})();\n\n(function tc_15_07_03_04__004() {\n  Number.NaN = 0;\n  assert(isNaN(Number.NaN));\n})();\n\n(function tc_15_07_03_04__002() {\n  assert(isNaN(Number.NaN));\n})();\n\n(function tc_15_07_03_03__001() {\n  assert(Number.hasOwnProperty(\"MIN_VALUE\"));\n})();\n\n(function tc_15_07_03_03__005() {\n  assert(!(delete Number.MIN_VALUE));\n})();\n\n(function tc_15_07_03_03__003() {\n  assert(Number.MIN_VALUE === 5e-324);\n})();\n\n(function tc_15_07_03_03__006() {\n  for (x in Number)\n  {\n    if (x === \"MIN_VALUE\")\n    {\n      assert(false);\n    }\n  }\n})();\n\n(function tc_15_07_03_03__004() {\n  var b = Number.MIN_VALUE\n  Number.MIN_VALUE = 0\n  assert(Number.MIN_VALUE === b);\n})();\n\n(function tc_15_07_03_03__002() {\n  assert(Number.MIN_VALUE === 5e-324);\n})();\n\n(function tc_15_05_02_01__002() {\n  var s = new String (\"\");\n  s.x = 1;\n  assert (s.x === 1);\n})();\n\n(function tc_15_05_02_01__001() {\n  assert(String.prototype.isPrototypeOf(new String(\"\")));\n})();\n\n(function tc_15_05_03_01__002() {\n  for (var p in String) {\n    if (p === String.prototype) {\n      assert(false);\n    }\n  }\n})();\n\n(function tc_15_05_03_01__001() {\n  String.prototype = 1;\n  assert(String.prototype !== 1);\n})();\n\n(function tc_15_05_03_02__001() {\n  assert (String.fromCharCode () === \"\");\n})();\n\n(function tc_15_05_03_02__002() {\n  assert (String.fromCharCode (65, 66, 67) === \"ABC\");\n})();\n\n(function tc_15_05_01_01__005() {\n  assert (String (false) === \"false\");\n})();\n\n(function tc_15_05_01_01__008() {\n  assert (String (-0) === \"0\");\n})();\n\n(function tc_15_05_01_01__013() {\n  assert (String (0.111111111111111) === \"0.111111111111111\");\n})();\n\n(function tc_15_05_01_01__010() {\n  assert (String (Infinity) === \"Infinity\");\n})();\n\n(function tc_15_05_01_01__007() {\n  assert (String (+0) === \"0\");\n})();\n\n(function tc_15_05_01_01__009() {\n  assert (String (-1) === \"-\" + String (1));\n})();\n\n(function tc_15_05_01_01__012() {\n  assert (String (10000000000000000000) === \"10000000000000000000\");\n})();\n\n(function tc_15_05_01_01__006() {\n  assert(String(NaN) === \"NaN\");\n})();\n\n(function tc_15_05_01_01__001() {\n  assert (String () === String (\"\"));\n})();\n\n(function tc_15_05_01_01__015() {\n  assert (String (0.000000111111111111111) === \"1.11111111111111e-7\");\n})();\n\n(function tc_15_05_01_01__004() {\n  assert (String (true) === \"true\");\n})();\n\n(function tc_15_05_01_01__014() {\n  assert (String (0.00000111111111111111) === \"0.00000111111111111111\");\n})();\n\n(function tc_15_05_01_01__002() {\n  assert (String (undefined) === \"undefined\");\n})();\n\n(function tc_15_05_01_01__003() {\n  assert (String (null) === \"null\");\n})();\n\n(function tc_15_05_01_01__011() {\n  assert (String (123000) === \"123000\");\n})();\n\n(function tc_15_05_04_07__001() {\n  assert(String(\"abcd\").indexOf(\"ab\") === 0);\n})();\n\n(function tc_15_05_04_07__002() {\n  assert(String(\"abcd\").indexOf(\"ab\", 0) === 0);\n})();\n\n(function tc_15_05_04_07__003() {\n  assert(String(\"abcd\").indexOf(\"ab\", 1) === -1);\n})();\n\n(function tc_15_05_04_01__001() {\n  assert (String.prototype.constructor === String);\n})();\n\n(function tc_15_05_04_05__001() {\n  assert(isNaN(String(\"abc\").charCodeAt(-1)));\n})();\n\n(function tc_15_05_04_05__002() {\n  assert(isNaN(String(\"abc\").charCodeAt(3)));\n})();\n\n(function tc_15_05_04_05__004() {\n  assert(String(\"abc\").charCodeAt(\"0\") === 97);\n})();\n\n(function tc_15_05_04_05__003() {\n  assert(String(\"abc\").charCodeAt(0) === 97);\n})();\n\n(function tc_15_05_04_03__001() {\n  assert (String (\"abc\").valueOf () === \"abc\");\n})();\n\n(function tc_15_05_04_02__001() {\n  assert (String (\"abc\").toString () === \"abc\");\n})();\n\n(function tc_15_05_04_02__002() {\n  assert (\"abc\".toString () === \"abc\");\n})();\n\n(function tc_15_05_04_04__003() {\n  assert(String(\"abc\").charAt(0) === \"a\");\n})();\n\n(function tc_15_05_04_04__004() {\n  assert(String(\"abc\").charAt(\"0\") === \"a\");\n})();\n\n(function tc_15_05_04_04__001() {\n  assert(String(\"abc\").charAt(-1) === \"\");\n})();\n\n(function tc_15_05_04_04__002() {\n  assert(String(\"abc\").charAt(3) === \"\");\n})();\n\n(function tc_15_05_04_06__004() {\n  assert (String ().concat.length === 1);\n})();\n\n(function tc_15_05_04_06__001() {\n  assert(String(\"abc\").concat(\"d\") === \"abcd\");\n})();\n\n(function tc_15_05_04_06__003() {\n  assert(String().concat(\"a\", \"b\", \"c\") === \"abc\");\n})();\n\n(function tc_15_05_04_06__002() {\n  assert(String().concat() === \"\");\n})();\n\n(function tc_15_08_02_06__011() {\n  assert(isNaN(Math.ceil(\"NaN\")));\n})();\n\n(function tc_15_08_02_06__007() {\n  assert (Math.ceil(-1.3) === -1);\n})();\n\n(function tc_15_08_02_06__006() {\n  assert(1/Math.ceil(-0.3) === -Infinity);\n})();\n\n(function tc_15_08_02_06__012() {\n  assert(isNaN(Math.ceil(new Object())));\n})();\n\n(function tc_15_08_02_06__003() {\n  assert(1/Math.ceil(-0) === -Infinity);\n})();\n\n(function tc_15_08_02_06__010() {\n  assert (Math.ceil(1.1) === 2);\n})();\n\n(function tc_15_08_02_06__004() {\n  assert(Math.ceil(-Infinity) === -Infinity);\n})();\n\n(function tc_15_08_02_06__009() {\n  assert (Math.ceil(1.9) === 2);\n})();\n\n(function tc_15_08_02_06__008() {\n  assert (Math.ceil(-1.9) === -1);\n})();\n\n(function tc_15_08_02_06__005() {\n  assert(Math.ceil(Infinity) === Number.POSITIVE_INFINITY);\n})();\n\n(function tc_15_08_02_06__002() {\n  var res = 1 / Math.ceil(+0)\n  assert(res === +Infinity && res !== -Infinity);\n})();\n\n(function tc_15_08_02_06__001() {\n  assert(isNaN(Math.ceil(NaN)));\n})();\n\n(function tc_15_08_02_16__005() {\n  assert (isNaN(Math.sin(-Infinity)));\n})();\n\n(function tc_15_08_02_16__001() {\n  assert (isNaN(Math.sin(NaN)));\n})();\n\n(function tc_15_08_02_16__003() {\n  assert (1/Math.sin(-0) === -Infinity);\n})();\n\n(function tc_15_08_02_16__004() {\n  assert (isNaN(Math.sin(Infinity)));\n})();\n\n(function tc_15_08_02_16__002() {\n  assert (1/Math.sin(+0) === Infinity);\n})();\n\n(function tc_15_08_02_03__009() {\n  assert(Math.asin(1) === Math.PI / 2);\n})();\n\n(function tc_15_08_02_03__007() {\n  assert(Math.asin(+0) === +0);\n})();\n\n(function tc_15_08_02_03__004() {\n  assert(!isNaN(Math.asin(-1.0000000000000001)));\n})();\n\n(function tc_15_08_02_03__005() {\n  assert(isNaN(Math.asin(-1.000000000000001)));\n})();\n\n(function tc_15_08_02_03__003() {\n  assert(!isNaN(Math.asin(1.0000000000000001)));\n})();\n\n(function tc_15_08_02_03__008() {\n  assert(Math.asin(-0) === -0);\n})();\n\n(function tc_15_08_02_03__006() {\n  assert(isNaN(Math.asin(-3)));\n})();\n\n(function tc_15_08_02_03__001() {\n  assert(isNaN(Math.asin(NaN)));\n})();\n\n(function tc_15_08_02_03__002() {\n  assert(isNaN(Math.asin(1.000000000000001)));\n})();\n\n(function tc_15_08_02_17__003() {\n  assert (1/Math.sqrt(+0) === Infinity);\n})();\n\n(function tc_15_08_02_17__005() {\n  assert (Math.sqrt(Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_17__004() {\n  assert (1/Math.sqrt(-0) === -Infinity);\n})();\n\n(function tc_15_08_02_17__002() {\n  assert (isNaN(Math.sqrt(-2)));\n})();\n\n(function tc_15_08_02_17__001() {\n  assert (isNaN(Math.sqrt(NaN)));\n})();\n\n(function tc_15_08_02_01__002() {\n  assert(Math.abs(-0.0) === +0.0);\n})();\n\n(function tc_15_08_02_01__001() {\n  assert(isNaN(Math.abs(NaN)));\n})();\n\n(function tc_15_08_02_01__005() {\n  assert(Math.abs(-123513745) === 123513745);\n})();\n\n(function tc_15_08_02_01__003() {\n  assert(Math.abs(Number.NEGATIVE_INFINITY) === Number.POSITIVE_INFINITY);\n})();\n\n(function tc_15_08_02_01__004() {\n  assert(Math.abs(Number.NEGATIVE_INFINITY) === Number.POSITIVE_INFINITY);\n})();\n\n(function tc_15_08_02_11__004() {\n  assert(isNaN(Math.max(NaN)));\n})();\n\n(function tc_15_08_02_11__012() {\n  assert(typeof Math.max === \"function\");\n})();\n\n(function tc_15_08_02_11__009() {\n  assert(Math.max() === -Infinity);\n})();\n\n(function tc_15_08_02_11__003() {\n  assert(isNaN(Math.max(Object())));\n})();\n\n(function tc_15_08_02_11__011() {\n  assert(Math.max(+0, -0) === +0);\n})();\n\n(function tc_15_08_02_11__006() {\n  assert(isNaN(Math.max(5, -7, NaN)));\n})();\n\n(function tc_15_08_02_11__001() {\n  assert(isNaN(Math.max(undefined)));\n})();\n\n(function tc_15_08_02_11__002() {\n  assert(isNaN(Math.max({})));\n})();\n\n(function tc_15_08_02_11__010() {\n  assert(Math.max() !== Infinity);\n})();\n\n(function tc_15_08_02_11__014() {\n  assert(1/Math.max(-0, +0) === Infinity);\n})();\n\n(function tc_15_08_02_11__005() {\n  assert(isNaN(Math.max(5, 7, NaN)));\n})();\n\n(function tc_15_08_02_11__008() {\n  assert(!isFinite(Math.max()));\n})();\n\n(function tc_15_08_02_11__007() {\n  assert(Math.max(5, -7) === 5);\n})();\n\n(function tc_15_08_02_11__013() {\n  assert(Math.max.length === 2);\n})();\n\n(function tc_15_08_02_07__003() {\n  assert (Math.cos(+0) === 1);\n})();\n\n(function tc_15_08_02_07__006() {\n  assert (isNaN(Math.cos(-Infinity)));\n})();\n\n(function tc_15_08_02_07__001() {\n  assert (isNaN(Math.cos(NaN)));\n})();\n\n(function tc_15_08_02_07__004() {\n  assert (Math.cos(-0) === 1);\n})();\n\n(function tc_15_08_02_07__007() {\n  assert (Math.cos(Math.PI) === -1);\n})();\n\n(function tc_15_08_02_07__002() {\n  assert(isNaN(Math.cos(\"   NaN\")));\n})();\n\n(function tc_15_08_02_07__005() {\n  assert (isNaN(Math.cos(Infinity)));\n})();\n\n(function tc_15_08_02_10__002() {\n  assert (isNaN(Math.log(-0.00001)));\n})();\n\n(function tc_15_08_02_10__004() {\n  assert (Math.log(-0) === -Infinity);\n})();\n\n(function tc_15_08_02_10__001() {\n  assert(isNaN(Math.log(NaN)));\n})();\n\n(function tc_15_08_02_10__005() {\n  assert (1/Math.log(1) === Infinity);\n})();\n\n(function tc_15_08_02_10__003() {\n  assert(Math.log(+0) === -Infinity);\n})();\n\n(function tc_15_08_02_10__006() {\n  assert (Math.log(Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_13__029() {\n  assert (Math.pow(2,2) === 4);\n})();\n\n(function tc_15_08_02_13__022() {\n  assert (1/Math.pow(+0, 5.2) === Infinity);\n})();\n\n(function tc_15_08_02_13__010() {\n  assert(isNaN(Math.pow(1, Infinity)));\n})();\n\n(function tc_15_08_02_13__023() {\n  assert(Math.pow(+0, -5.2) === Infinity);\n\n})();\n\n(function tc_15_08_02_13__017() {\n  assert (1/Math.pow(Infinity, -3) === Infinity);\n})();\n\n(function tc_15_08_02_13__024() {\n  assert (1/Math.pow(-0, 12) === Infinity);\n})();\n\n(function tc_15_08_02_13__031() {\n  assert(isNaN(Math.pow(1, NaN)));\n})();\n\n(function tc_15_08_02_13__007() {\n  assert (1/Math.pow(5, -Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_13__027() {\n  assert (Math.pow(-0, -1) === -Infinity);\n})();\n\n(function tc_15_08_02_13__014() {\n  assert(1 / Math.pow(0.3, Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_13__003() {\n  assert (Math.pow(NaN, +0, 5, \"qeqegfhb\") === 1);\n})();\n\n(function tc_15_08_02_13__002() {\n  assert(Math.pow(2, +0, 5, \"qeqegfhb\") === 1);\n})();\n\n(function tc_15_08_02_13__009() {\n  assert(Math.pow(-5, Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_13__021() {\n  assert (1/Math.pow(-Infinity, -5) === -Infinity);\n})();\n\n(function tc_15_08_02_13__001() {\n  assert(isNaN(Math.pow(2, \"NaN\", 5)));\n})();\n\n(function tc_15_08_02_13__025() {\n  assert (1/Math.pow(-0, 7) === -Infinity);\n})();\n\n(function tc_15_08_02_13__012() {\n  assert (isNaN(Math.pow(-1, -Infinity)));\n})();\n\n(function tc_15_08_02_13__016() {\n  assert (Math.pow(Infinity, 3) === Infinity);\n})();\n\n(function tc_15_08_02_13__013() {\n  assert(isNaN(Math.pow(1, -Infinity)));\n})();\n\n(function tc_15_08_02_13__011() {\n  assert (isNaN(Math.pow(-1, Infinity)));\n})();\n\n(function tc_15_08_02_13__015() {\n  assert (Math.pow(-0.3, -Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_13__028() {\n  assert(isNaN(Math.pow(-174, 1.78)));\n})();\n\n(function tc_15_08_02_13__008() {\n  assert (1/Math.pow(-5, -Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_13__006() {\n  assert (Math.pow(5, Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_13__026() {\n  assert (Math.pow(-0, -100) === Infinity);\n})();\n\n(function tc_15_08_02_13__004() {\n  assert (Math.pow(\"qeqegfhb\", -0) === 1);\n})();\n\n(function tc_15_08_02_13__030() {\n  assert (Math.pow(\"2   \",\"2.0\") === 4);\n})();\n\n(function tc_15_08_02_13__005() {\n  assert (isNaN(Math.pow(\"qeqegfhb\", 1)));\n})();\n\n(function tc_15_08_02_13__020() {\n  assert (1/Math.pow(-Infinity, -6) === Infinity);\n})();\n\n(function tc_15_08_02_13__019() {\n  assert (Math.pow(-Infinity, 5) === -Infinity);\n})();\n\n(function tc_15_08_02_13__018() {\n  assert (Math.pow(-Infinity, 6) === Infinity);\n})();\n\n(function tc_15_08_02_15__006() {\n  assert (1/Math.round(0.2) === Infinity);\n})();\n\n(function tc_15_08_02_15__003() {\n  assert (1/Math.round(-0) === -Infinity);\n})();\n\n(function tc_15_08_02_15__007() {\n  assert (1/Math.round(-0.3) === -Infinity);\n})();\n\n(function tc_15_08_02_15__005() {\n  assert (Math.round(-Infinity) === -Infinity);\n})();\n\n(function tc_15_08_02_15__001() {\n  assert (isNaN(Math.round(NaN)));\n})();\n\n(function tc_15_08_02_15__004() {\n  assert (Math.round(Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_15__002() {\n  assert (1/Math.round(+0) === Infinity);\n})();\n\n(function tc_15_08_02_05__003() {\n  assert(Math.atan2(Number.MIN_VALUE, +0) === Math.PI / 2);\n})();\n\n(function tc_15_08_02_05__020() {\n  assert(Math.atan2(-Number.MAX_VALUE, Number.POSITIVE_INFINITY) === -0);\n})();\n\n(function tc_15_08_02_05__019() {\n  assert(Math.atan2(Number.MAX_VALUE, -Infinity) === Math.PI);\n})();\n\n(function tc_15_08_02_05__008() {\n  assert(Math.atan2(+0, -0) === Math.PI);\n})();\n\n(function tc_15_08_02_05__029() {\n  assert(Math.atan2(-Infinity, -Infinity) === -3*Math.PI / 4);\n})();\n\n(function tc_15_08_02_05__016() {\n  assert(Math.atan2(-99999999, +0) === -Math.PI/2);\n})();\n\n(function tc_15_08_02_05__028() {\n  assert(Math.atan2(-Infinity, +Infinity) === -Math.PI / 4);\n})();\n\n(function tc_15_08_02_05__007() {\n  assert(Math.atan2(+0, +0) === +0);\n})();\n\n(function tc_15_08_02_05__006() {\n  assert(Math.atan2(+0, Number.MAX_VALUE) === +0);\n})();\n\n(function tc_15_08_02_05__009() {\n  assert(Math.atan2(+0, -Number.MIN_VALUE) === Math.PI);\n})();\n\n(function tc_15_08_02_05__025() {\n  assert(Math.atan2(-Infinity, -999999999) === -Math.PI / 2);\n})();\n\n(function tc_15_08_02_05__014() {\n  assert(Math.atan2(-0, -Number.MIN_VALUE) === -Math.PI);\n})();\n\n(function tc_15_08_02_05__026() {\n  assert(Math.atan2(Infinity, Infinity) === Math.PI / 4);\n})();\n\n(function tc_15_08_02_05__023() {\n  assert(Math.atan2(Infinity, -1) === Math.PI / 2);\n})();\n\n(function tc_15_08_02_05__024() {\n  assert(Math.atan2(-Infinity, -1) === -Math.PI / 2);\n})();\n\n(function tc_15_08_02_05__011() {\n  assert(Math.atan2(-0, Infinity) === -0);\n})();\n\n(function tc_15_08_02_05__010() {\n  assert(Math.atan2(+0, -Infinity) === Math.PI);\n})();\n\n(function tc_15_08_02_05__015() {\n  assert(Math.atan2(-0, -Infinity) === -Math.PI);\n})();\n\n(function tc_15_08_02_05__004() {\n  assert(!(Math.atan2(0, +0) === Math.PI / 2));\n})();\n\n(function tc_15_08_02_05__021() {\n  assert(Math.atan2(-Number.MIN_VALUE, Number.NEGATIVE_INFINITY) === -Math.PI);\n})();\n\n(function tc_15_08_02_05__022() {\n  assert(Math.atan2(Infinity, 1) === Math.PI / 2);\n})();\n\n(function tc_15_08_02_05__013() {\n  assert(Math.atan2(-0, -0) === -Math.PI);\n})();\n\n(function tc_15_08_02_05__027() {\n  assert(Math.atan2(Infinity, -Infinity) === 3*Math.PI / 4);\n})();\n\n(function tc_15_08_02_05__001() {\n  assert(isNaN(Math.atan2(NaN, 1)));\n})();\n\n(function tc_15_08_02_05__002() {\n  assert(isNaN(Math.atan2(1, NaN)));\n})();\n\n(function tc_15_08_02_05__017() {\n  assert(Math.atan2(-99999999, -0) === -Math.PI/2);\n})();\n\n(function tc_15_08_02_05__005() {\n  assert(Math.atan2(1, -0) === Math.PI / 2);\n})();\n\n(function tc_15_08_02_05__018() {\n  assert(Math.atan2(1, Infinity) === +0);\n})();\n\n(function tc_15_08_02_05__012() {\n  assert(Math.atan2(-0, +0) === -0);\n})();\n\n(function tc_15_08_02_02__002() {\n  assert(!isNaN(Math.acos(1.00000000000000000000001)));\n})();\n\n(function tc_15_08_02_02__003() {\n  assert(isNaN(Math.acos(Number.NEGATIVE_INFINITY)));\n})();\n\n(function tc_15_08_02_02__005() {\n  assert(isNaN(Math.acos(1.000000000000001)));\n})();\n\n(function tc_15_08_02_02__004() {\n  assert(Math.acos(1) === +0.0);\n})();\n\n(function tc_15_08_02_02__006() {\n  assert(isNaN(Math.acos(-7)));\n})();\n\n(function tc_15_08_02_02__001() {\n  assert(isNaN(Math.acos(NaN)));\n})();\n\n(function tc_15_08_02_12__010() {\n  assert(Math.min() !== -Infinity);\n})();\n\n(function tc_15_08_02_12__013() {\n  assert(Math.min.length === 2);\n})();\n\n(function tc_15_08_02_12__012() {\n  assert(typeof Math.min === \"function\");\n})();\n\n(function tc_15_08_02_12__014() {\n  assert(1/Math.min(+0, -0) === -Infinity);\n})();\n\n(function tc_15_08_02_12__005() {\n  assert(isNaN(Math.min(5, 7, NaN)));\n})();\n\n(function tc_15_08_02_12__001() {\n  assert(isNaN(Math.min(undefined)));\n})();\n\n(function tc_15_08_02_12__002() {\n  assert(isNaN(Math.min({})));\n})();\n\n(function tc_15_08_02_12__008() {\n  assert(!isFinite(Math.min()));\n})();\n\n(function tc_15_08_02_12__003() {\n  assert(isNaN(Math.min(Object())));\n})();\n\n(function tc_15_08_02_12__009() {\n  assert(Math.min() === Infinity);\n})();\n\n(function tc_15_08_02_12__004() {\n  assert(isNaN(Math.min(NaN)));\n})();\n\n(function tc_15_08_02_12__007() {\n  assert(Math.min(5, -7) === -7);\n})();\n\n(function tc_15_08_02_12__006() {\n  assert(isNaN(Math.min(5, -7, NaN)));\n})();\n\n(function tc_15_08_02_12__011() {\n  assert(Math.min(+0, -0) === +0);\n})();\n\n(function tc_15_08_02_18__007() {\n  assert (isNaN(Math.tan(undefined)));\n})();\n\n(function tc_15_08_02_18__001() {\n  assert (isNaN(Math.tan(NaN)));\n})();\n\n(function tc_15_08_02_18__006() {\n  assert (1/Math.tan(-0, NaN) === -Infinity);\n})();\n\n(function tc_15_08_02_18__005() {\n  assert (1/Math.tan(-0) === -Infinity);\n})();\n\n(function tc_15_08_02_18__002() {\n  assert (isNaN(Math.tan(Infinity)));\n})();\n\n(function tc_15_08_02_18__003() {\n  assert (isNaN(Math.tan(-Infinity)));\n})();\n\n(function tc_15_08_02_18__004() {\n  assert (1/Math.tan(+0) === Infinity);\n})();\n\n(function tc_15_08_02_04__002() {\n  assert(isNaN(Math.atan(undefined)));\n})();\n\n(function tc_15_08_02_04__006() {\n  assert(Math.atan(Infinity) === Math.PI / 2);\n})();\n\n(function tc_15_08_02_04__008() {\n  assert(Math.atan(Number.NEGATIVE_INFINITY) === -Math.PI / 2);\n})();\n\n(function tc_15_08_02_04__003() {\n  assert(isNaN(Math.atan({})));\n})();\n\n(function tc_15_08_02_04__007() {\n  assert(Math.atan(Number.POSITIVE_INFINITY) === Math.PI / 2);\n})();\n\n(function tc_15_08_02_04__004() {\n  assert(Math.atan(+0) === +0);\n})();\n\n(function tc_15_08_02_04__001() {\n  assert(isNaN(Math.atan(NaN)));\n})();\n\n(function tc_15_08_02_04__009() {\n  assert(Math.atan(-1) === -Math.PI / 4);\n})();\n\n(function tc_15_08_02_04__005() {\n  assert(Math.atan(-0) === -0);\n})();\n\n(function tc_15_08_02_09__001() {\n  assert (isNaN(Math.floor(NaN)));\n})();\n\n(function tc_15_08_02_09__006() {\n  assert (1/Math.floor(0.2) === Infinity);\n})();\n\n(function tc_15_08_02_09__008() {\n  assert (Math.floor(1.9) === -Math.ceil(-1.9));\n})();\n\n(function tc_15_08_02_09__007() {\n  assert (Math.floor(1.2) === -Math.ceil(-1.2));\n})();\n\n(function tc_15_08_02_09__002() {\n  assert (1/Math.floor(+0) === Infinity);\n})();\n\n(function tc_15_08_02_09__003() {\n  assert(1/Math.floor(-0) === -Infinity);\n})();\n\n(function tc_15_08_02_09__005() {\n  assert (Math.floor(-Infinity) === -Infinity);\n})();\n\n(function tc_15_08_02_09__004() {\n  assert (Math.floor(Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_08__004() {\n  assert (Math.exp(Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_08__002() {\n  assert (Math.exp(+0) === 1);\n})();\n\n(function tc_15_08_02_08__003() {\n  assert(Math.exp(-0) === 1);\n})();\n\n(function tc_15_08_02_08__001() {\n  assert (isNaN(Math.exp(NaN)));\n})();\n\n(function tc_15_08_02_08__006() {\n  assert (1/Math.exp(-Infinity) === Infinity);\n})();\n\n(function tc_15_08_02_08__005() {\n  assert (Math.exp(Infinity) === Infinity);\n})();\n\n(function tc_15_06_01_01__005() {\n  assert(false === Boolean(+0));\n})();\n\n(function tc_15_06_01_01__011() {\n  assert(true === Boolean(\"abcdef\"));\n})();\n\n(function tc_15_06_01_01__012() {\n  assert(true === Boolean({}));\n})();\n\n(function tc_15_06_01_01__002() {\n  assert(false === Boolean(null));\n})();\n\n(function tc_15_06_01_01__007() {\n  assert(false === Boolean(NaN));\n})();\n\n(function tc_15_06_01_01__001() {\n  assert(false === Boolean(undefined));\n})();\n\n(function tc_15_06_01_01__004() {\n  assert(true === Boolean(true));\n})();\n\n(function tc_15_06_01_01__009() {\n  assert(true === Boolean(-11111));\n})();\n\n(function tc_15_06_01_01__003() {\n  assert(false === Boolean(false));\n})();\n\n(function tc_15_06_01_01__010() {\n  assert(false === Boolean(\"\"));\n})();\n\n(function tc_15_06_01_01__006() {\n  assert(false === Boolean(-0));\n})();\n\n(function tc_15_06_01_01__008() {\n  assert(true === Boolean(11111));\n})();\n\n(function tc_15_06_02_01__002() {\n  var b = new Boolean (true);\n  b.x = 1;\n  assert (b.x === 1);\n})();\n\n(function tc_15_06_02_01__001() {\n  assert(Boolean.prototype.isPrototypeOf(new Boolean(true)));\n})();\n\n(function tc_15_06_04_03__001() {\n  assert(Boolean(false).valueOf() === false);\n})();\n\n(function tc_15_06_04_02__003() {\n  assert(true.toString() === \"true\");\n})();\n\n(function tc_15_06_04_02__001() {\n  assert(Boolean(true).toString() === \"true\");\n})();\n\n(function tc_15_06_04_02__002() {\n  assert(Boolean(false).toString() === \"false\");\n})();\n\n(function tc_15_06_04_01__001() {\n  assert(Boolean.prototype.constructor === Boolean);\n})();\n\n(function tc_15_06_03_01__001() {\n  for (var p in Boolean) {\n    if (p === Boolean.prototype) {\n      assert(false);\n    }\n  }\n})();\n\n(function tc_15_04_02_02__007() {\n  var a = new Array(\"5\");\n  assert(a.length === 1);\n})();\n\n(function tc_15_04_02_02__003() {\n  var a = new Array(5);\n  assert(a[0] === undefined);\n})();\n\n(function tc_15_04_02_02__008() {\n  var a = new Array(\"55\");\n  assert(a[0] === \"55\");\n})();\n\n(function tc_15_04_02_02__005() {\n  var a = new Array(5);\n  assert(a[10] === undefined);\n})();\n\n(function tc_15_04_02_02__002() {\n  var a = new Array(5);\n  assert(a.length === 5);\n})();\n\n(function tc_15_04_02_02__006() {\n  var a = new Array(0);\n  assert(a.length === 0);\n})();\n\n(function tc_15_04_02_02__004() {\n  var a = new Array(5);\n  assert(a[3] === undefined);\n})();\n\n(function tc_15_04_02_02__001() {\n  var a = new Array(5);\n  assert(typeof a === 'object');\n})();\n\n(function tc_15_04_02_01__001() {\n  var a = new Array();\n  assert(typeof a === 'object');\n})();\n\n(function tc_15_04_02_01__004() {\n  var a = new Array(1, 2, 5);\n  assert(a[1] === 2);\n})();\n\n(function tc_15_04_02_01__003() {\n  var a = new Array(1, 2, 5);\n  assert(a[0] === 1);\n})();\n\n(function tc_15_04_02_01__008() {\n  var a = new Array();\n  assert(a[0] === undefined);\n})();\n\n(function tc_15_04_02_01__005() {\n  var a = new Array(1, 2, 5);\n  assert(a[2] === 5);\n})();\n\n(function tc_15_04_02_01__007() {\n  var a = new Array();\n  assert(a.length === 0);\n})();\n\n(function tc_15_04_02_01__006() {\n  var a = new Array(1, 2, 5);\n  assert(a[3] === undefined);\n})();\n\n(function tc_15_04_02_01__002() {\n  var a = new Array(1, 2, 5);\n  assert(a.length === 3);\n})();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/this-arg.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar i = 0;\n\nfunction a() {}\n\na.prototype.b = function() { i++; }\n\na.prototype.c = function() { this.b(); i++; }\n\nvar aa = new a();\naa.c();\n\nassert (i === 2);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/try-catch-finally.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar was_catch = false, was_finally = false;\n\ntry {\n} catch (err) {\n  was_catch = true;\n} finally {\n  was_finally = true;\n}\n\nassert (!was_catch && was_finally);\n\nwas_catch = false;\nwas_finally = false;\n\ntry {\n  throw 1;\n  assert (0);\n} catch (err) {\n  assert (err === 1);\n  was_catch = true;\n} finally {\n  was_finally = true;\n}\n\nassert (was_catch && was_finally);"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/try-eval.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  e;\n  assert (false);\n} catch (e) {\n  eval(\"var e\");\n}\nassert (e === undefined);\n\nfunction f() {\n  try {\n    throw 1;\n    assert (false);\n  } catch (e) {\n    eval(\"var e\");\n  }\n}\nf();\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/typeof.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction f()\n{\n  return 1;\n}\n\nassert(typeof(a) === \"undefined\");\nassert(typeof(null) === \"object\");\nassert(typeof(false) === \"boolean\");\nassert(typeof(true) === \"boolean\");\nassert(typeof(1) === \"number\");\nassert(typeof(1.1) === \"number\");\nassert(typeof('abcd') === \"string\");\nassert(typeof(\"1.1\") === \"string\");\nassert(typeof(this) === \"object\");\nassert(typeof(f) === \"function\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/unary-plus-minus.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (+0 === -0);\nassert (1/-0 === -Infinity);\nassert (1/+0 === Infinity);\nassert (\"3\" -+-+-+ \"1\" + \"1\" / \"3\" * \"6\" + \"2\" === \"42\");\nassert (isNaN (-NaN));"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/unicode-format-control-characters.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction checkSyntax (str) {\n  try {\n    eval (str);\n    assert (false);\n  } catch (e) {\n    assert (e instanceof SyntaxError);\n  }\n}\n\n// Only \\u200C-Zero width non-joiner, and \\u200D-Zero width joiner are allowed\n\ncheckSyntax (\"_\\u200b\\u200d\");\ncheckSyntax (\"_\\u200c\\u200e\");\n\nvar _\\u200c\\u200d = 5;\n\nassert (_\\u200c\\u200d === 5);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/unusual.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar x = [0];\nassert (x == x);\nassert (x == !x);\nassert (Array(3) == \",,\");\n\nassert ([] + [] == \"\");\nassert ([] + {} == \"[object Object]\");\nassert (eval (\"{} + []\") == 0);\nassert (isNaN (eval (\"{} + {}\")));\nassert ({} + [] == \"[object Object]\");\nassert ({} + {} == \"[object Object][object Object]\");\n\nassert ((! + [] + [] + ![]) === \"truefalse\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/var-decl.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nassert (x === undefined);\nassert (y === undefined);\nassert (z === undefined);\nassert (i === undefined);\nassert (j === undefined);\nassert (k === undefined);\nassert (q === undefined);\nassert (v === undefined);\n\neval ('var n');\neval ('var m = 1');\n\ntry\n{\n  x = p;\n  assert (false);\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n}\n\n{\n  var y;\n}\nvar x = y;\n\ndo var z; while (0);\n\nfor (var i, j = function () {var p;}; i === undefined; i = null)\n{\n}\n\nfor (var q in {})\n{\n}\n\n{ var v = 1 }\n\ntry\n{\n  var k\n  l\n  assert (false)\n}\ncatch (e)\n{\n  assert (e instanceof ReferenceError);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/variables.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar real = 42;\nvar float = 3.14;\nvar integer = -4;\nvar exponent = 1e7;\nvar str = 'literal';\n\na = 42;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/windows-line-ending.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//     http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n\r\n// This test file should use CR-LF styled line endings to test if everything is\r\n// parsed correctly\r\n\r\n\r\nvar value =\r\n  5;\r\n\r\nassert (value === 5);\r\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/jerry/zero-character.js",
    "content": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntry {\n  eval(\"/*var \" + String.fromCharCode(0) + \"xx = 1*/\");\n}\ncatch (e) {\n  assert (false);\n}\n\nassert (\"x\\0y\" !== \"x\\0z\");\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/test262-es6-excludelist.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<excludeList>\n  <!-- ES11 change: Should throw Syntaxerror -->\n  <test id=\"language/types/boolean/S8.3_A2.1.js\"><reason></reason></test>\n  <test id=\"language/types/boolean/S8.3_A2.2.js\"><reason></reason></test>\n  <test id=\"language/types/reference/S8.7.2_A1_T1.js\"><reason></reason></test>\n  <test id=\"language/types/reference/S8.7.2_A1_T2.js\"><reason></reason></test>\n  <test id=\"language/reserved-words/S7.6.1_A1.1.js\"><reason></reason></test>\n  <test id=\"language/reserved-words/S7.6.1_A1.2.js\"><reason></reason></test>\n  <test id=\"language/reserved-words/S7.6.1_A1.3.js\"><reason></reason></test>\n  <test id=\"language/expressions/this/S11.1.1_A1.js\"><reason></reason></test>\n  <test id=\"language/keywords/S7.6.1.1_A1.18.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/add-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/btws-and-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/btws-or-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/btws-xor-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/div-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/left-shift-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/mod-div-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/mult-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/right-shift-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/subtract-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/u-right-shift-non-simple.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/non-simple-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/11.13.1-1-1.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/11.13.1-1-2.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/11.13.1-1-3.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/11.13.1-1-4.js\"><reason></reason></test>\n\n  <test id=\"annexB/B.2.3.10.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.11.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.12.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.13.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.14.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.2.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.3.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.4.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.5.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.6.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.7.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.8.js\"><reason></reason></test>\n  <test id=\"annexB/B.2.3.9.js\"><reason></reason></test>\n  <test id=\"built-ins/decodeURIComponent/S15.1.3.2_A2.5_T1.js\"><reason></reason></test>\n  <test id=\"built-ins/decodeURI/S15.1.3.1_A2.5_T1.js\"><reason></reason></test>\n  <test id=\"built-ins/GeneratorPrototype/next/context-constructor-invocation.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/all/species-get-error.js\"><reason>Promise.all no longer uses @@species</reason></test>\n  <test id=\"built-ins/Promise/race/species-get-error.js\"><reason>Promise.race no longer uses @@species</reason></test>\n  <test id=\"built-ins/Proxy/enumerate/call-parameters.js\"><reason></reason></test>\n  <test id=\"built-ins/Proxy/enumerate/return-is-abrupt.js\"><reason></reason></test>\n  <test id=\"built-ins/Proxy/enumerate/result-not-an-object-throws-boolean.js\"><reason>For-in supports proxy</reason></test>\n  <test id=\"built-ins/Proxy/enumerate/result-not-an-object-throws-number.js\"><reason>For-in supports proxy</reason></test>\n  <test id=\"built-ins/Proxy/enumerate/result-not-an-object-throws-string.js\"><reason>For-in supports proxy</reason></test>\n  <test id=\"built-ins/Proxy/enumerate/result-not-an-object-throws-symbol.js\"><reason>For-in supports proxy</reason></test>\n  <test id=\"built-ins/Proxy/enumerate/result-not-an-object-throws-undefined.js\"><reason>For-in supports proxy</reason></test>\n  <test id=\"built-ins/Proxy/enumerate/return-trap-result.js\"><reason></reason></test>\n  <test id=\"built-ins/Proxy/enumerate/return-trap-result-no-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Proxy/enumerate/trap-is-not-callable.js\"><reason>For-in supports proxy</reason></test>\n  <test id=\"built-ins/Reflect/enumerate/does-not-iterate-over-symbol-properties.js\"><reason>ES2016 change: Reflect.enumerate has been removed</reason></test>\n  <test id=\"built-ins/Reflect/enumerate/enumerate.js\"><reason>ES2016 change: Reflect.enumerate has been removed</reason></test>\n  <test id=\"built-ins/Reflect/enumerate/length.js\"><reason>ES2016 change: Reflect.enumerate has been removed</reason></test>\n  <test id=\"built-ins/Reflect/enumerate/name.js\"><reason>ES2016 change: Reflect.enumerate has been removed</reason></test>\n  <test id=\"built-ins/Reflect/enumerate/return-abrupt-from-result.js\"><reason>ES2016 change: Reflect.enumerate has been removed</reason></test>\n  <test id=\"built-ins/Reflect/enumerate/return-iterator.js\"><reason>ES2016 change: Reflect.enumerate has been removed</reason></test>\n  <test id=\"built-ins/RegExp/prototype/exec/get-sticky-coerce.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/exec/get-sticky-err.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/builtin-coerce-global.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/builtin-coerce-sticky.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/builtin-failure-set-lastindex-err.js\"><reason>lastIndex no longer needs to be updated if not sticky or global</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/builtin-failure-set-lastindex.js\"><reason>lastIndex no longer needs to be updated if not sticky or global</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/builtin-get-global-err.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/builtin-get-sticky-err.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/builtin-success-g-set-lastindex-err.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/builtin-success-g-set-lastindex.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/coerce-global.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/coerce-sticky.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.match/get-sticky-err.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/get-sticky-coerce.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/get-sticky-err.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.search/get-sticky-coerce.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.search/get-sticky-err.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.split/coerce-limit.js\"><reason>Test is outdated: ES11, 21.2.5.13 13</reason></test>\n  <test id=\"built-ins/RegExp/prototype/test/get-sticky-err.js\"><reason>RegExpBuiltinExec no longer uses accessors to get flags</reason></test>\n  <test id=\"built-ins/String/prototype/normalize/form-is-not-valid-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/length.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/name.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/normalize.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-abrupt-from-form.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-abrupt-from-this.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-normalized-string-from-coerced-form.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-normalized-string.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-normalized-string-using-default-parameter.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/toLocaleLowerCase/special_casing_conditional.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/toLowerCase/special_casing_conditional.js\"><reason></reason></test>\n  <test id=\"intl402/6.2.2_a.js\"><reason></reason></test>\n  <test id=\"intl402/6.2.2_b.js\"><reason></reason></test>\n  <test id=\"intl402/6.2.2_c.js\"><reason></reason></test>\n  <test id=\"intl402/6.2.3.js\"><reason></reason></test>\n  <test id=\"intl402/6.2.4.js\"><reason></reason></test>\n  <test id=\"intl402/9.1_a.js\"><reason></reason></test>\n  <test id=\"intl402/9.1_b.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.1_1.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.1_2.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.1_3.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.1_4.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.1_8_c_ii.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.1_8_c_vi.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.2.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.3_5.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.5_6.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.6_2.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.6_4_b.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.6_4_c.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.6_4.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.8_1_c.js\"><reason></reason></test>\n  <test id=\"intl402/9.2.8_4.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_10.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_11.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_13.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_19_b.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_19_c.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_1.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_20.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_23.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_6.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.1_a.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.2.1_4.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.2_a.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1.3.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.1_L15.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.2.3_b.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/10.4_a.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/9.2.5_11_g_ii_2.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/10.2.1.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/10.3_a.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/10.3_b.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/10.3_L15.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/10.3.2_1_a_L15.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/10.3.2_1_c.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/10.3.2_CS_a.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/10.3.2_CS_b_NN.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/10.3.2_CS_c_NN.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/10.3.2_CS_d_NN.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/10.3.2_L15.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/constructor/10.3.1.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/resolvedOptions/10.3.3.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/resolvedOptions/10.3.3_L15.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/supportedLocalesOf/10.2.2_a.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/supportedLocalesOf/10.2.2_b.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/supportedLocalesOf/10.2.2_L15.js\"><reason></reason></test>\n  <test id=\"intl402/Date/prototype/13.3.0_6_1.js\"><reason></reason></test>\n  <test id=\"intl402/Date/prototype/13.3.0_6_2.js\"><reason></reason></test>\n  <test id=\"intl402/Date/prototype/13.3.0_7.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.1_18.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.1_1.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.1_22.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.1_23.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.1_25.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.1_5.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.1_6.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.1_a.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.1_TDTO.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.2.1_4.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.2.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1.3.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.1_L15.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.2.3_b.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.2.3_c.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/12.4_a.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/6.4_a.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/6.4_b.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/6.4_c.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/12.2.1.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/12.3_a.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/12.3_b.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/12.3_L15.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/constructor/12.3.1.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/12.3.2_1_a_L15.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/12.3.2_1_c.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/12.3.2_FDT_1.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/12.3.2_FDT_7_a_iv.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/12.3.2_L15.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/12.3.2_TLT_2.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/12.3.3.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/12.3.3_L15.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/supportedLocalesOf/12.2.2_a.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/supportedLocalesOf/12.2.2_b.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/supportedLocalesOf/12.2.2_L15.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/8.0.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/8.0_L15.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_15.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_17.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_19.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_1.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_20_c.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_21.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_32.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_34.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_6.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_7.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.1_a.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.2.1_4.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.2.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1.3.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.1_L15.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.2.3_b.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/11.4_a.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/6.3.1_a.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/6.3.1_b.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/11.2.1.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/11.3_a.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/11.3_b.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/11.3_L15.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/constructor/11.3.1.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/11.3.2_1_a_ii.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/11.3.2_1_a_L15.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/11.3.2_1_c.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/11.3.2_FN_1.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/11.3.2_FN_2.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/11.3.2_FN_3_b.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/11.3.2_L15.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/11.3.2_TRF.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/11.3.2_TRP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/11.3.3.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/11.3.3_L15.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/supportedLocalesOf/11.2.2_a.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/supportedLocalesOf/11.2.2_b.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/supportedLocalesOf/11.2.2_L15.js\"><reason></reason></test>\n  <test id=\"intl402/Number/prototype/toLocaleString/13.2.1_4_1.js\"><reason></reason></test>\n  <test id=\"intl402/Number/prototype/toLocaleString/13.2.1_4_2.js\"><reason></reason></test>\n  <test id=\"intl402/Number/prototype/toLocaleString/13.2.1_5.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/localeCompare/13.1.1_6_1.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/localeCompare/13.1.1_6_2.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/localeCompare/13.1.1_7.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleLowerCase/special_casing_Azeri.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleLowerCase/special_casing_Lithuanian.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleLowerCase/special_casing_Turkish.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleUpperCase/special_casing_Azeri.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleUpperCase/special_casing_Lithuanian.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleUpperCase/special_casing_Turkish.js\"><reason></reason></test>\n  <test id=\"language/asi/S7.9_A5.7_T1.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js\"><reason>No longer a SyntaxError in ES11</reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A6_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A6_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A7_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A7_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A7_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.10_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.11_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.1_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.2_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.3_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.4_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.6_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.7_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.8_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.9_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/generators/has-instance.js\"><reason></reason></test>\n  <test id=\"language/expressions/generators/prototype-value.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/generator-invoke-ctor.js\"><reason>ES2016 change: Generator methods isn't constructor - https://github.com/tc39/ecma262/pull/171 </reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/tagged-template/cache-differing-expressions-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/tagged-template/cache-differing-expressions.js\"><reason></reason></test>\n  <test id=\"language/expressions/tagged-template/cache-differing-expressions-new-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/tagged-template/cache-identical-source-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/tagged-template/cache-identical-source.js\"><reason></reason></test>\n  <test id=\"language/expressions/tagged-template/cache-identical-source-new-function.js\"><reason></reason></test>\n  <test id=\"language/line-terminators/S7.3_A2.3.js\"><reason>No longer a SyntaxError in ES11</reason></test>\n  <test id=\"language/line-terminators/S7.3_A2.4.js\"><reason>No longer a SyntaxError in ES11</reason></test>\n  <test id=\"language/statements/for-of/iterator-next-reference.js\"><reason>ES2018 change: next method must be cached</reason></test>\n  <test id=\"language/statements/for/S12.6.3_A9.1.js\"><reason></reason></test>\n  <test id=\"language/statements/for/S12.6.3_A9.js\"><reason></reason></test>\n  <test id=\"language/statements/generators/has-instance.js\"><reason></reason></test>\n  <test id=\"language/statements/generators/prototype-value.js\"><reason></reason></test>\n  <test id=\"language/statements/try/S12.14_A16_T4.js\"><reason>ES2019 change: catch without parameter is allowed</reason></test>\n  <test id=\"built-ins/Number/S9.3.1_A2.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/Number/S9.3.1_A3_T1.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/Number/S9.3.1_A3_T2.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/RegExp/S15.10.2.12_A1_T1.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/RegExp/S15.10.2.12_A2_T1.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/String/prototype/trim/15.5.4.20-3-2.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/String/prototype/trim/15.5.4.20-3-3.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/String/prototype/trim/15.5.4.20-3-4.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/String/prototype/trim/15.5.4.20-3-5.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/String/prototype/trim/15.5.4.20-3-6.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/parseFloat/S15.1.2.3_A2_T10.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/parseInt/S15.1.2.2_A2_T10.js\"><reason>Unicode 13: 0x180E is no longer whitespace character</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.search/set-lastindex-restore-err.js\"><reason>lastIndex handling in Symbol.search has changed since ES6</reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.search/set-lastindex-restore.js\"><reason>lastIndex handling in Symbol.search has changed since ES6</reason></test>\n  <test id=\"built-ins/RegExp/prototype/global/15.10.7.2-1.js\"><reason>RegExp accessors should no longer throw when called on the RegExp prototype</reason></test>\n  <test id=\"built-ins/RegExp/prototype/ignoreCase/15.10.7.3-1.js\"><reason>RegExp accessors should no longer throw when called on the RegExp prototype</reason></test>\n  <test id=\"built-ins/RegExp/prototype/multiline/15.10.7.4-1.js\"><reason>RegExp accessors should no longer throw when called on the RegExp prototype</reason></test>\n  <test id=\"built-ins/RegExp/prototype/source/15.10.7.1-1.js\"><reason>RegExp accessors should no longer throw when called on the RegExp prototype</reason></test>\n  <test id=\"language/arguments-object/10.6-13-b-1-s.js\"><reason>ES11: arguments object no longer has caller property</reason></test>\n  <test id=\"language/arguments-object/10.6-13-b-2-s.js\"><reason>ES11: arguments object no longer has caller property</reason></test>\n  <test id=\"language/arguments-object/10.6-13-b-3-s.js\"><reason>ES11: arguments object no longer has caller property</reason></test>\n  <test id=\"language/arguments-object/10.6-14-1-s.js\"><reason>ES11: arguments object no longer has caller property</reason></test>\n  <test id=\"language/arguments-object/10.6-14-b-1-s.js\"><reason>ES11: arguments object no longer has caller property</reason></test>\n  <test id=\"language/arguments-object/10.6-14-b-4-s.js\"><reason>ES11: arguments object no longer has caller property</reason></test>\n  <test id=\"language/statements/class/strict-mode/arguments-caller.js\"><reason>ES11: arguments object no longer has caller property</reason></test>\n  <test id=\"built-ins/Proxy/create-handler-is-revoked-proxy.js\"><reason>ES11+: ProxyCreate does not check Proxy handler and target.</reason></test>\n  <test id=\"built-ins/Proxy/create-target-is-revoked-proxy.js\"><reason>ES11+: ProxyCreate does not check Proxy handler and target.</reason></test>\n  <test id=\"language/expressions/assignment/fn-name-lhs-cover.js\"><reason>Outdated test, anonymous funtions should now have a name property</reason></test>\n  <test id=\"language/expressions/assignment/fn-name-lhs-member.js\"><reason>Outdated test, anonymous funtions should now have a name property</reason></test>\n  <test id=\"language/expressions/function/name.js\"><reason>Outdated test, anonymous funtions should now have a name property</reason></test>\n  <test id=\"language/expressions/generators/name.js\"><reason>Outdated test, anonymous funtions should now have a name property</reason></test>\n</excludeList>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/test262-esnext-excludelist.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<excludeList>\n  <!-- Uncategorized failing tests -->\n  <test id=\"built-ins/Array/prototype/splice/property-traps-order-with-species.js\"><reason></reason></test>\n  <test id=\"built-ins/ArrayBuffer/data-allocation-after-object-creation.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFunction/AsyncFunction-is-subclass.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFunction/AsyncFunctionPrototype-prototype.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFunction/AsyncFunctionPrototype-to-string.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFunction/instance-prototype-property.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/arithmetic.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/asIntN.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/bigint-tobigint-errors.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/bigint-tobigint-wrapped-values.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/bigint-tobigint.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/bits-toindex-errors.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/bits-toindex-toprimitive.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/bits-toindex-wrapped-values.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/bits-toindex.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/length.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/name.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asIntN/order-of-steps.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/arithmetic.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/asUintN.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/bigint-tobigint-errors.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/bigint-tobigint-wrapped-values.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/bigint-tobigint.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/bits-toindex-errors.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/bits-toindex-toprimitive.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/bits-toindex-wrapped-values.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/bits-toindex.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/length.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/name.js\"><reason></reason></test>\n  <test id=\"built-ins/BigInt/asUintN/order-of-steps.js\"><reason></reason></test>\n  <test id=\"built-ins/Date/prototype/setTime/new-value-time-clip.js\"><reason></reason></test>\n  <test id=\"built-ins/Date/prototype/toDateString/format.js\"><reason></reason></test>\n  <test id=\"built-ins/Date/prototype/toDateString/negative-year.js\"><reason></reason></test>\n  <test id=\"built-ins/Date/prototype/toTimeString/format.js\"><reason></reason></test>\n  <test id=\"built-ins/Date/value-symbol-to-prim-invocation.js\"><reason></reason></test>\n  <test id=\"built-ins/Date/value-to-primitive-call.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/AsyncFunction.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/Function.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/GeneratorFunction.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/arrow-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-arrow-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-function-declaration.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-function-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-method-class-expression-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-method-class-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-method-class-statement-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-method-class-statement.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-method-object.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/bound-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/built-in-function-object.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/class-declaration-complex-heritage.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/class-declaration-explicit-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/class-declaration-implicit-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/class-expression-explicit-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/class-expression-implicit-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/function-declaration-non-simple-parameter-list.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/function-declaration.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/function-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/generator-function-declaration.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/generator-function-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/generator-method.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/getter-class-expression-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/getter-class-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/getter-class-statement-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/getter-class-statement.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/getter-object.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/line-terminator-normalisation-CR-LF.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/line-terminator-normalisation-CR.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/line-terminator-normalisation-LF.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/method-class-expression-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/method-class-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/method-class-statement-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/method-class-statement.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/method-computed-property-name.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/method-object.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-arrow-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-async-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-async-method-definition.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-bound-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-class.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-function-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-generator-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-method-definition.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/setter-class-expression-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/setter-class-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/setter-class-statement-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/setter-class-statement.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/setter-object.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/symbol-named-builtins.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/unicode.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/well-known-intrinsic-object-functions.js\"><reason></reason></test>\n  <test id=\"built-ins/GeneratorFunction/instance-yield-expr-in-param.js\"><reason></reason></test>\n  <test id=\"built-ins/GeneratorPrototype/return/from-state-completed.js\"><reason></reason></test>\n  <test id=\"built-ins/Number/prototype/toExponential/return-values.js\"><reason></reason></test>\n  <test id=\"built-ins/Number/prototype/toFixed/exactness.js\"><reason></reason></test>\n  <test id=\"built-ins/Number/prototype/toPrecision/exponential.js\"><reason></reason></test>\n  <test id=\"built-ins/Object/entries/order-after-define-property.js\"><reason></reason></test>\n  <test id=\"built-ins/Object/keys/order-after-define-property.js\"><reason></reason></test>\n  <test id=\"built-ins/Object/prototype/toString/symbol-tag-non-str-proxy-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/all/invoke-resolve-get-error.js\"><reason>Test expects incorrect call order</reason></test>\n  <test id=\"built-ins/Promise/all/resolve-non-callable.js\"><reason>Test expects incorrect call order</reason></test>\n  <test id=\"built-ins/Promise/race/invoke-resolve-get-error.js\"><reason>Test expects incorrect call order</reason></test>\n  <test id=\"built-ins/Promise/race/resolve-non-callable.js\"><reason>Test expects incorrect call order</reason></test>\n  <test id=\"built-ins/Proxy/preventExtensions/trap-is-undefined-target-is-proxy.js\"><reason></reason></test>\n  <test id=\"built-ins/Proxy/setPrototypeOf/toboolean-trap-result-false.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-tostring-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/matchAll/regexp-is-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/form-is-not-valid-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/length.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/name.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/normalize.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-abrupt-from-form.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-abrupt-from-this.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-normalized-string-from-coerced-form.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-normalized-string-using-default-parameter.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/normalize/return-normalized-string.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/toLocaleLowerCase/Final_Sigma_U180E.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/toLocaleLowerCase/special_casing_conditional.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/toLowerCase/Final_Sigma_U180E.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/toLowerCase/special_casing_conditional.js\"><reason></reason></test>\n  <test id=\"built-ins/ThrowTypeError/name.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/from/arylk-get-length-error.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/from/arylk-to-length-error.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/from/iter-access-error.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/from/iter-invoke-error.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/from/iter-next-error.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/from/iter-next-value-error.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator-symbol.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/join/get-length-uses-internal-arraylength.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/join/return-abrupt-from-separator-symbol.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/join/return-abrupt-from-separator.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/set/BigInt/number-tobigint.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/sort/sorted-values.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/length-arg/toindex-length.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/length-arg/toindex-length.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/object-arg/returns.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-returns-other-instance.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/from/BigInt/custom-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/from/BigInt/new-instance-using-custom-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/from/custom-ctor-returns-other-instance.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/from/custom-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/from/new-instance-from-ordinary-object.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/from/new-instance-using-custom-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-minus-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-minus-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/key-is-not-minus-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/abrupt-from-ordinary-has-parent-hasproperty.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/inherited-property.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-greater-than-last-index.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-lower-than-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-minus-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-integer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/abrupt-from-ordinary-has-parent-hasproperty.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/inherited-property.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/key-is-greater-than-last-index.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/key-is-lower-than-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/key-is-minus-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-integer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-minus-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/key-is-minus-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/tonumber-value-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-returns-other-instance.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/of/BigInt/custom-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/of/BigInt/new-instance-using-custom-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/of/custom-ctor-returns-other-instance.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/of/custom-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/of/new-instance-using-custom-ctor.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-function.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js\"><reason></reason></test>\n  <test id=\"language/computed-property-names/class/static/method-number.js\"><reason></reason></test>\n  <test id=\"language/computed-property-names/class/static/method-string.js\"><reason></reason></test>\n  <test id=\"language/computed-property-names/class/static/method-symbol.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/non-definable-function-with-function.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/non-definable-function-with-variable.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/non-definable-global-function.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/non-definable-global-generator.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/non-definable-global-var.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/var-env-func-init-global-update-configurable.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/var-env-gloabl-lex-strict-caller.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/var-env-global-lex-strict-source.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/var-env-lower-lex-strict-caller.js\"><reason></reason></test>\n  <test id=\"language/eval-code/direct/var-env-lower-lex-strict-source.js\"><reason></reason></test>\n  <test id=\"language/eval-code/indirect/non-definable-function-with-function.js\"><reason></reason></test>\n  <test id=\"language/eval-code/indirect/non-definable-function-with-variable.js\"><reason></reason></test>\n  <test id=\"language/eval-code/indirect/non-definable-global-function.js\"><reason></reason></test>\n  <test id=\"language/eval-code/indirect/non-definable-global-generator.js\"><reason></reason></test>\n  <test id=\"language/eval-code/indirect/non-definable-global-var.js\"><reason></reason></test>\n  <test id=\"language/eval-code/indirect/var-env-func-init-global-new.js\"><reason></reason></test>\n  <test id=\"language/eval-code/indirect/var-env-func-init-global-update-configurable.js\"><reason></reason></test>\n  <test id=\"language/eval-code/indirect/var-env-var-init-global-new.js\"><reason></reason></test>\n  <test id=\"language/expressions/arrow-function/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/arrow-function/dstr/dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/arrow-function/eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/arrow-function/param-dflt-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A6_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A6_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A7_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A7_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/S11.13.1_A7_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-iter-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-iter-rtrn-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-iter-thrw-close-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-iter-thrw-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-rest-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-elision-iter-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-rest-iter-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-rest-iter-rtrn-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-rest-iter-thrw-close-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-rest-iter-thrw-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-rest-lref-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/assignment/dstr/array-rest-lref.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-arrow-function/await-as-param-nested-arrow-body-position.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-arrow-function/await-as-param-nested-arrow-parameter-position.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-arrow-function/await-as-param-rest-nested-arrow-parameter-position.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/eval-spread-empty-leading.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/eval-spread-empty-trailing.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/eval-spread.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/accessor-name-inst/literal-numeric-leading-decimal.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/accessor-name-static/literal-numeric-leading-decimal.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/class-name-ident-let-escaped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/class-name-ident-let.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/class-name-ident-static-escaped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/class-name-ident-static.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/class-name-ident-yield-escaped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/class-name-ident-yield.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/name.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.10_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.11_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.1_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.2_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.3_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.4_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.6_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.7_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.8_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/compound-assignment/S11.13.2_A7.9_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/function/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/function/dstr/dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/function/eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/generators/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/generators/dstr/dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/generators/eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/import.meta/distinct-for-each-module.js\"><reason></reason></test>\n  <test id=\"language/expressions/import.meta/import-meta-is-an-ordinary-object.js\"><reason></reason></test>\n  <test id=\"language/expressions/import.meta/same-object-returned.js\"><reason></reason></test>\n  <test id=\"language/expressions/import.meta/syntax/goal-module-nested-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/import.meta/syntax/goal-module.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/early-errors-object-async-method-duplicate-parameters.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/gen-meth-eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/meth-eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-decrement/S11.3.2_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/postfix-increment/S11.3.1_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-decrement/S11.4.5_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T1.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T2.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T4.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A5_T5.js\"><reason></reason></test>\n  <test id=\"language/expressions/prefix-increment/S11.4.4_A6_T3.js\"><reason></reason></test>\n  <test id=\"language/expressions/super/call-proto-not-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/super/prop-dot-cls-ref-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/super/prop-dot-obj-ref-non-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/super/prop-dot-obj-ref-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/super/prop-expr-cls-ref-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/super/prop-expr-obj-key-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/super/prop-expr-obj-ref-non-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/super/prop-expr-obj-ref-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/tagged-template/invalid-escape-sequences.js\"><reason></reason></test>\n  <test id=\"language/expressions/yield/star-return-is-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/yield/star-throw-is-null.js\"><reason></reason></test>\n  <test id=\"language/global-code/decl-lex-configurable-global.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-10.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-10.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-11.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-11.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-12.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-12.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-13.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-13.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-5.2.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-5.2.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-6.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-6.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-6.1.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-6.1.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-7.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-7.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-8.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-8.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-9.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/part-unicode-9.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-10.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-10.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-11.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-11.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-12.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-12.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-13.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-13.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-5.2.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-5.2.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-6.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-6.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-6.1.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-6.1.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-7.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-7.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-8.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-8.0.0.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-9.0.0-escaped.js\"><reason></reason></test>\n  <test id=\"language/identifiers/start-unicode-9.0.0.js\"><reason></reason></test>\n  <test id=\"language/literals/string/legacy-octal-escape-sequence-prologue-strict.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-cls-anon.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-cls-name-meth.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-cls-named.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-expr-cls-anon.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-expr-cls-name-meth.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-expr-cls-named.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-expr-err-get-value.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-expr-fn-anon.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-expr-fn-named.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-expr-gen-anon.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-expr-gen-named.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-export-dflt-expr-in.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-gtbndng-indirect-trlng-comma.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-gtbndng-indirect-update-as.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-rqstd-abrupt.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-rqstd-once.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-rqstd-order.js\"><reason></reason></test>\n  <test id=\"language/module-code/eval-self-once.js\"><reason></reason></test>\n  <test id=\"language/module-code/export-star-as-dflt.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-iee-bndng-cls.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-iee-bndng-const.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-iee-bndng-fun.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-iee-bndng-gen.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-iee-bndng-let.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-iee-bndng-var.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-iee-iee-cycle.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-iee-star-cycle.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-iee-trlng-comma.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-cls.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-const.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-dflt-cls.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-dflt-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-dflt-fun-anon.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-dflt-fun-named.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-dflt-gen-anon.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-dflt-gen-named.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-dflt-named.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-dflt-star.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-fun.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-gen.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-let.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-trlng-comma.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-bndng-var.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-id-name.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-iee-cycle.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-named-star-cycle.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-once.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-same-global.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-ambiguous.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-as-props-dflt-skip.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-binding.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-equality.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-id-name.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-iee-cycle.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-props-circular.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-props-dflt-keep-indirect.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-props-dflt-keep-local.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-props-dflt-skip.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-props-nrml.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-star-star-cycle.js\"><reason></reason></test>\n  <test id=\"language/module-code/instn-uniq-env-rec.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/Symbol.iterator.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/Symbol.toStringTag.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/define-own-property.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/delete-exported-init.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/delete-exported-uninit.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/delete-non-exported.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/enumerate-binding-uninit.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-nested-namespace-dflt-skip.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-nested-namespace-props-nrml.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-own-property-str-found-init.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-own-property-str-found-uninit.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-own-property-str-not-found.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-own-property-sym.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-prototype-of.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-str-found-init.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-str-found-uninit.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-str-initialize.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-str-not-found.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-str-update.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-sym-found.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/get-sym-not-found.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/has-property-str-found-init.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/has-property-str-found-uninit.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/has-property-str-not-found.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/has-property-sym-found.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/has-property-sym-not-found.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/is-extensible.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/object-hasOwnProperty-binding-uninit.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/object-keys-binding-uninit.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/object-propertyIsEnumerable-binding-uninit.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/own-property-keys-binding-types.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/own-property-keys-sort.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/prevent-extensions.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/set-prototype-of-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/set-prototype-of.js\"><reason></reason></test>\n  <test id=\"language/module-code/namespace/internals/set.js\"><reason></reason></test>\n  <test id=\"language/module-code/parse-err-hoist-lex-fun.js\"><reason></reason></test>\n  <test id=\"language/module-code/parse-err-hoist-lex-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/async-function/let-newline-await-in-async-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/accessor-name-inst/literal-numeric-leading-decimal.js\"><reason></reason></test>\n  <test id=\"language/statements/class/accessor-name-static/literal-numeric-leading-decimal.js\"><reason></reason></test>\n  <test id=\"language/statements/class/class-name-ident-let-escaped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/class-name-ident-let.js\"><reason></reason></test>\n  <test id=\"language/statements/class/class-name-ident-static-escaped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/class-name-ident-static.js\"><reason></reason></test>\n  <test id=\"language/statements/class/class-name-ident-yield-escaped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/class-name-ident-yield.js\"><reason></reason></test>\n  <test id=\"language/statements/class/constructor-inferred-observable-iteration.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/subclass/default-constructor-spread-override.js\"><reason></reason></test>\n  <test id=\"language/statements/class/subclass/superclass-async-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/super/in-constructor-superproperty-evaluation.js\"><reason></reason></test>\n  <test id=\"language/statements/const/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/do-while/cptn-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/do-while/cptn-normal.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/cptn-decl-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/cptn-decl-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/cptn-decl-skip-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/cptn-decl-zero-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/cptn-expr-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/cptn-expr-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/cptn-expr-skip-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/cptn-expr-zero-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/head-lhs-let.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/let-block-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/let-identifier-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/scope-body-lex-open.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/scope-head-lex-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-in/scope-head-lex-open.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/cptn-decl-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/cptn-decl-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/cptn-decl-no-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/cptn-expr-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/cptn-expr-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/cptn-expr-no-itr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-iter-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-iter-rtrn-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-iter-rtrn-close-null.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-iter-rtrn-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-iter-thrw-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-iter-thrw-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-elision-iter-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-list-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-null.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-list-thrw-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-list-thrw-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-rest-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-rest-thrw-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elem-trlg-iter-rest-thrw-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-elision-iter-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-rest-iter-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-rest-iter-rtrn-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-rest-iter-rtrn-close-null.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-rest-iter-rtrn-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-rest-iter-thrw-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-rest-iter-thrw-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-rest-lref-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/array-rest-lref.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/const-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/let-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/dstr/var-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/head-const-init.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/head-decl-no-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/head-expr-no-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/head-let-init.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/head-var-init.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/head-var-no-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/let-block-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/let-identifier-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/scope-body-lex-open.js\"><reason></reason></test>\n  <test id=\"language/statements/for-of/scope-head-lex-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for/cptn-decl-expr-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/for/cptn-decl-expr-no-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/for/cptn-expr-expr-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/for/cptn-expr-expr-no-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/for/dstr/const-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for/dstr/let-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for/dstr/var-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for/head-init-expr-check-empty-inc-empty-completion.js\"><reason></reason></test>\n  <test id=\"language/statements/for/head-init-var-check-empty-inc-empty-completion.js\"><reason></reason></test>\n  <test id=\"language/statements/for/let-block-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/for/let-identifier-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/for/scope-body-lex-open.js\"><reason></reason></test>\n  <test id=\"language/statements/function/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/function/dstr/dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/function/eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/statements/generators/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/generators/dstr/dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/generators/eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/statements/if/cptn-else-false-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/if/cptn-else-false-nrml.js\"><reason></reason></test>\n  <test id=\"language/statements/if/cptn-else-true-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/if/cptn-else-true-nrml.js\"><reason></reason></test>\n  <test id=\"language/statements/if/cptn-no-else-false.js\"><reason></reason></test>\n  <test id=\"language/statements/if/cptn-no-else-true-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/if/cptn-no-else-true-nrml.js\"><reason></reason></test>\n  <test id=\"language/statements/if/if-gen-else-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/if/if-gen-else-stmt.js\"><reason></reason></test>\n  <test id=\"language/statements/if/if-gen-no-else.js\"><reason></reason></test>\n  <test id=\"language/statements/if/if-stmt-else-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/if/let-block-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/if/let-identifier-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/labeled/decl-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/labeled/let-block-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/labeled/let-identifier-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/let/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/let/syntax/let-newline-yield-in-generator-function.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-a-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-b-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-b-final.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-dflt-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-dflt-b-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-dflt-b-final.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-dflt-final.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-no-dflt-match-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-no-dflt-match-final.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/cptn-no-dflt-no-match.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-function.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-catch-empty-break.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-catch-empty-continue.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-catch-finally-empty-break.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-catch-finally-empty-continue.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-finally-empty-break.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-finally-empty-continue.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-finally-from-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-finally-skip-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-finally-wo-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/try/cptn-try.js\"><reason></reason></test>\n  <test id=\"language/statements/try/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/try/scope-catch-block-lex-open.js\"><reason></reason></test>\n  <test id=\"language/statements/variable/binding-resolution.js\"><reason></reason></test>\n  <test id=\"language/statements/variable/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/while/cptn-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/while/cptn-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/while/cptn-no-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/while/let-block-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/while/let-identifier-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/with/cptn-abrupt-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/with/cptn-nrml.js\"><reason></reason></test>\n  <test id=\"language/statements/with/let-block-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/with/let-identifier-with-newline.js\"><reason></reason></test>\n  <!-- END - Uncategorized failing tests -->\n\n  <!-- AnnexB - Additional ECMAScript Features for Web Browsers\n       https://www.ecma-international.org/ecma-262/11.0/#sec-additional-ecmascript-features-for-web-browsers\n  -->\n  <test id=\"annexB/built-ins/Date/prototype/setYear/this-time-nan.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/Date/prototype/setYear/this-time-valid.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/Date/prototype/setYear/year-number-absolute.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/Date/prototype/setYear/year-number-relative.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/Function/createdynfn-html-close-comment-body.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/Function/createdynfn-html-close-comment-params.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/Function/createdynfn-html-open-comment-body.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/Function/createdynfn-html-open-comment-params.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/Function/createdynfn-no-line-terminator-html-close-comment-body.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/anchor/B.2.3.2.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/anchor/attr-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/anchor/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/anchor/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/anchor/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/anchor/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/big/B.2.3.3.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/big/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/big/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/big/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/big/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/blink/B.2.3.4.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/blink/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/blink/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/blink/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/blink/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/bold/B.2.3.5.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/bold/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/bold/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/bold/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/bold/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fixed/B.2.3.6.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fixed/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fixed/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fixed/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fixed/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontcolor/B.2.3.7.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontcolor/attr-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontcolor/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontcolor/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontcolor/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontcolor/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontsize/B.2.3.8.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontsize/attr-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontsize/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontsize/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontsize/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/fontsize/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/italics/B.2.3.9.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/italics/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/italics/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/italics/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/italics/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/link/B.2.3.10.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/link/attr-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/link/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/link/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/link/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/link/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/small/B.2.3.11.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/small/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/small/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/small/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/small/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/strike/B.2.3.12.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/strike/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/strike/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/strike/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/strike/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sub/B.2.3.13.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sub/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sub/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sub/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sub/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sup/B.2.3.14.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sup/length.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sup/name.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sup/prop-desc.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/sup/this-val-tostring-err.js\"><reason></reason></test>\n  <test id=\"annexB/language/comments/multi-line-html-close.js\"><reason></reason></test>\n  <test id=\"annexB/language/comments/single-line-html-close-asi.js\"><reason></reason></test>\n  <test id=\"annexB/language/comments/single-line-html-close-unicode-separators.js\"><reason></reason></test>\n  <test id=\"annexB/language/comments/single-line-html-close.js\"><reason></reason></test>\n  <test id=\"annexB/language/comments/single-line-html-open.js\"><reason></reason></test>\n  <test id=\"annexB/language/eval-code/indirect/global-block-decl-eval-global-init.js\"><reason></reason></test>\n  <test id=\"annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-init.js\"><reason></reason></test>\n  <test id=\"annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-init.js\"><reason></reason></test>\n  <test id=\"annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-init.js\"><reason></reason></test>\n  <test id=\"annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-init.js\"><reason></reason></test>\n  <test id=\"annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-init.js\"><reason></reason></test>\n  <test id=\"annexB/language/eval-code/indirect/global-switch-case-eval-global-init.js\"><reason></reason></test>\n  <test id=\"annexB/language/eval-code/indirect/global-switch-dflt-eval-global-init.js\"><reason></reason></test>\n  <test id=\"annexB/language/function-code/block-decl-func-skip-arguments.js\"><reason></reason></test>\n  <test id=\"annexB/language/function-code/block-decl-nested-blocks-with-fun-decl.js\"><reason></reason></test>\n  <test id=\"annexB/language/statements/for-in/nonstrict-initializer.js\"><reason></reason></test>\n  <!-- END AnnexB - Additional ECMAScript Features for Web Browsers -->\n\n  <!-- ECMAScript Internationalization API\n       https://ecma-international.org/publications/standards/Ecma-402.htm\n  -->\n  <test id=\"intl402/BigInt/prototype/toLocaleString/de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/BigInt/prototype/toLocaleString/default-options-object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/BigInt/prototype/toLocaleString/en-US.js\"><reason></reason></test>\n  <test id=\"intl402/BigInt/prototype/toLocaleString/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/BigInt/prototype/toLocaleString/returns-same-results-as-NumberFormat.js\"><reason></reason></test>\n  <test id=\"intl402/BigInt/prototype/toLocaleString/taint-Intl-NumberFormat.js\"><reason></reason></test>\n  <test id=\"intl402/BigInt/prototype/toLocaleString/this-value-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/BigInt/prototype/toLocaleString/throws-same-exceptions-as-NumberFormat.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/constructor-options-throwing-getters.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/default-options-object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/ignore-invalid-unicode-ext-values.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/instance-proto-and-extensible.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/legacy-regexp-statics-not-modified.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/length.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/missing-unicode-ext-value-defaults-to-true.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/name.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/numeric-and-caseFirst.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/bound-to-collator-instance.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/canonically-equivalent-strings.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/compare-function-builtin.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/compare-function-length.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/compare-function-name.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/length.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/name.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/non-normative-basic.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/non-normative-phonebook.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/non-normative-sensitivity.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/compare/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/constructor/value.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/resolvedOptions/basic.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/resolvedOptions/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/resolvedOptions/length.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/resolvedOptions/name.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/resolvedOptions/order.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/resolvedOptions/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/this-value-collator-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/this-value-not-collator.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/toStringTag/toString-changed-tag.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/toStringTag/toString-removed-tag.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/toStringTag/toString.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/prototype/toStringTag/toStringTag.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/subclassing.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/supportedLocalesOf/basic.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/supportedLocalesOf/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/supportedLocalesOf/length.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/supportedLocalesOf/name.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/supportedLocalesOf/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/supportedLocalesOf/taint-Object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/taint-Object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/test-option-ignorePunctuation.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/test-option-localeMatcher.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/test-option-numeric-and-caseFirst.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/test-option-sensitivity.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/test-option-usage.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/this-value-ignored.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/unicode-ext-seq-in-private-tag.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/unicode-ext-seq-with-attribute.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/unicode-ext-value-collation.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/usage-de.js\"><reason></reason></test>\n  <test id=\"intl402/Date/prototype/returns-same-results-as-DateTimeFormat.js\"><reason></reason></test>\n  <test id=\"intl402/Date/prototype/taint-Intl-DateTimeFormat.js\"><reason></reason></test>\n  <test id=\"intl402/Date/prototype/throws-same-exceptions-as-DateTimeFormat.js\"><reason></reason></test>\n  <test id=\"intl402/Date/prototype/toLocaleString/default-options-object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/casing-numbering-system-calendar-options.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-calendar-numberingSystem-order.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-default-value.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-calendar-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-dateStyle-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-dateStyle-valid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-dayPeriod-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-dayPeriod-valid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-fractionalSecondDigits-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-fractionalSecondDigits-valid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-numberingSystem-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-order-dayPeriod.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-order-fractionalSecondDigits.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-order-timedate-style.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-order.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-throwing-getters-dayPeriod.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-throwing-getters-fractionalSecondDigits.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-throwing-getters-timedate-style.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-throwing-getters.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-timeStyle-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-timeStyle-valid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/constructor-options-toobject.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/date-time-options.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/default-options-object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/ignore-invalid-unicode-ext-values.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/instance-proto-and-extensible.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/legacy-regexp-statics-not-modified.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/length.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/name.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/numbering-system-calendar-options.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/constructor/value.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/bound-to-datetimeformat-instance.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/date-constructor-not-called.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/dayPeriod-long-en.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/dayPeriod-narrow-en.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/dayPeriod-short-en.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/format-function-builtin.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/format-function-length.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/format-function-name.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/fractionalSecondDigits.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/length.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/name.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/proleptic-gregorian-calendar.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/related-year-zh.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/taint-Object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/throws-value-non-finite.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/time-clip-near-time-boundaries.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/time-clip-to-integer.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/format/timedatestyle-en.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/argument-date-string.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/argument-near-time-boundaries.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/argument-to-integer.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/argument-tonumber-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/date-is-infinity-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/date-is-nan-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/date-undefined-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/date-x-greater-than-y-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/en-US.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/fractionalSecondDigits.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/length.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/name.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/this-bad-object.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRange/this-is-not-object-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/argument-date-string.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/argument-near-time-boundaries.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/argument-to-integer.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/argument-tonumber-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/date-is-infinity-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/date-is-nan-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/date-undefined-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/date-x-greater-than-y-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/en-US.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/length.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/name.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/pattern-on-calendar.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/this-bad-object.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatRangeToParts/this-is-not-object-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/date-constructor-not-called.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/date-is-infinity-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/date-is-nan-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/dayPeriod-long-en.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/dayPeriod-narrow-en.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/dayPeriod-short-en.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/formatToParts.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/fractionalSecondDigits.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/length.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/main.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/name.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/pattern-on-calendar.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/related-year-zh.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/related-year.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/return-abrupt-tonumber-date.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/this-has-not-internal-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/this-is-not-object-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/time-clip-near-time-boundaries.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/formatToParts/time-clip-to-integer.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/basic.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle-dateStyle.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle-default.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle-timeStyle.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/length.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/name.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/order-dayPeriod.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/order-fractionalSecondDigits.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/order-style.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/order.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/resolvedOptions/resolved-locale-with-hc-unicode.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/this-value-datetimeformat-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/this-value-not-datetimeformat.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/toStringTag/toString-changed-tag.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/toStringTag/toString-removed-tag.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/toStringTag/toString.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/prototype/toStringTag/toStringTag.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/required-date-time-formats.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/subclassing.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/supportedLocalesOf/basic.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/supportedLocalesOf/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/supportedLocalesOf/length.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/supportedLocalesOf/name.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/supportedLocalesOf/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/supportedLocalesOf/taint-Object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/taint-Object-prototype-date-time-components.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/taint-Object-prototype-dayPeriod.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/taint-Object-prototype-fractionalSecondDigits.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/taint-Object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/test-option-date-time-components.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/test-option-formatMatcher.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/test-option-hour12.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/test-option-localeMatcher.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/this-value-ignored.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/timezone-canonicalized.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/timezone-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/timezone-utc.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/ctor-custom-get-prototype-poison-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/ctor-custom-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/ctor-default-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/instance-extensible.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/length.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/locales-invalid-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/locales-length-poison-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/locales-length-tolength-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/locales-symbol-length.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/name.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-fallback-abrupt-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-fallback-invalid-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-fallback-toString-abrupt-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-fallback-valid.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-localeMatcher-abrupt-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-localeMatcher-invalid-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-localeMatcher-toString-abrupt-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-localeMatcher-valid.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-null-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-random-properties-unchecked.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-style-abrupt-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-style-invalid-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-style-toString-abrupt-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-style-valid.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-type-abrupt-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-type-invalid-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-type-toString-abrupt-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/options-type-valid.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/proto.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/Symbol.toStringTag.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/default-option-values.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/length.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/name.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/option-fallback.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/option-style.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/option-type.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/return-object.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/this-not-object-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/prototype/resolvedOptions/this-object-lacks-internal-throws.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/undefined-newtarget-throws.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/Locale-object.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/canonicalized-tags.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/canonicalized-unicode-ext-seq.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/complex-language-subtag-replacement.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/complex-region-subtag-replacement.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/descriptor.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/duplicates.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/elements-not-reordered.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/error-cases.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/get-locale.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/getCanonicalLocales.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/grandfathered.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/has-property.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/invalid-tags.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/length.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/locales-is-not-a-string.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/main.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/name.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/non-iana-canon.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/overriden-arg-length.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/overriden-push.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/preferred-grandfathered.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/preferred-variant.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/returned-object-is-an-array.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/returned-object-is-mutable.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/to-string.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/transformed-ext-canonical.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/transformed-ext-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/transformed-ext-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-calendar.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-col-strength.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-measurement-system.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-region.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-subdivision.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-timezone.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-yes-to-true.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/unicode-ext-key-with-digit.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/getCanonicalLocales/weird-cases.js\"><reason></reason></test>\n  <test id=\"intl402/Intl/proto.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/locales-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/locales-valid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/newtarget-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-localeMatcher-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-order.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-style-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-style-valid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-throwing-getters.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-toobject-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-toobject.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-type-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-type-valid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/options-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/subclassing.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/length.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/name.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/prototype.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/basic.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/branding.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/length.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/locales-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/name.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/options-localeMatcher-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/options-null.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/options-toobject.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/options-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/supportedLocalesOf/result-type.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/instance/extensibility.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/instance/prototype.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/branding.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/en-us-default.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/en-us-disjunction.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/en-us-narrow.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/en-us-short.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/en-us-unit.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/es-es-long.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/es-es-narrow.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/es-es-short.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/iterable-getiterator-throw.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/iterable-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/iterable-iteratorclose.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/iterable-iteratorstep-throw.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/iterable-iteratorvalue-throw.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/iterable-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/iterable.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/length.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/name.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/format/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/branding.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/en-us-default.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/en-us-disjunction.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/en-us-narrow.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/en-us-short.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/en-us-unit.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/es-es-long.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/es-es-narrow.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/es-es-short.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/iterable-getiterator-throw.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/iterable-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/iterable-iteratorclose.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/iterable-iteratorstep-throw.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/iterable-iteratorvalue-throw.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/iterable-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/iterable.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/length.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/name.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/formatToParts/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/resolvedOptions/branding.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/resolvedOptions/caching.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/resolvedOptions/length.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/resolvedOptions/name.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/resolvedOptions/order.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/resolvedOptions/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/resolvedOptions/type.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/toStringTag/toString.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/prototype/toStringTag/toStringTag.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/canonicalize-locale-list-take-locale.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-apply-options-canonicalizes-twice.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-getter-order.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-locale-object.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-newtarget-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-non-iana-canon.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-calendar-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-calendar-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-canonicalized.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-casefirst-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-casefirst-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-collation-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-collation-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-hourcycle-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-hourcycle-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-language-grandfathered.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-language-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-language-valid-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-language-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-numberingsystem-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-numberingsystem-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-numeric-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-numeric-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-region-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-region-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-script-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-script-valid-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-script-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-options-throwing-getters.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-parse-twice.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-tag-tostring.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-tag.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-unicode-ext-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/constructor-unicode-ext-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/extensions-grandfathered.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/extensions-private.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/function-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/getters-grandfathered.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/getters-missing.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/getters.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/instance-extensibility.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/instance.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/invalid-tag-throws-boolean.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/invalid-tag-throws-null.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/invalid-tag-throws-number.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/invalid-tag-throws-symbol.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/invalid-tag-throws-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/invalid-tag-throws.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/length.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/likely-subtags-grandfathered.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/likely-subtags.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/baseName/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/baseName/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/baseName/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/calendar/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/calendar/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/calendar/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/caseFirst/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/caseFirst/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/caseFirst/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/collation/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/collation/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/collation/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/hourCycle/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/hourCycle/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/hourCycle/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/language/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/language/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/language/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/maximize/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/maximize/length.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/maximize/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/maximize/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/minimize/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/minimize/length.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/minimize/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/minimize/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/numberingSystem/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/numberingSystem/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/numberingSystem/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/numeric/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/numeric/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/numeric/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/region/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/region/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/region/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/script/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/script/name.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/script/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/toString/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/toString/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/toStringTag/toString-removed-tag.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/toStringTag/toString.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/prototype/toStringTag/toStringTag.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/subclassing.js\"><reason></reason></test>\n  <test id=\"intl402/Number/prototype/toLocaleString/default-options-object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/Number/prototype/toLocaleString/returns-same-results-as-NumberFormat.js\"><reason></reason></test>\n  <test id=\"intl402/Number/prototype/toLocaleString/taint-Intl-NumberFormat.js\"><reason></reason></test>\n  <test id=\"intl402/Number/prototype/toLocaleString/throws-same-exceptions-as-NumberFormat.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/casing-numbering-system-options.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-compactDisplay-compact.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-compactDisplay-no-compact.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-default-value.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-locales-arraylike.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-locales-get-tostring.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-locales-hasproperty.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-locales-string.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-locales-toobject.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-notation.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-numberingSystem-order.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-options-numberingSystem-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-options-throwing-getters.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-options-toobject.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-order.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-signDisplay.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-unit.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/constructor-unitDisplay.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/currency-code-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/currency-code-well-formed.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/currency-digits.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/currencyDisplay-unit.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/default-minimum-singificant-digits.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/default-options-object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/dft-currency-mnfd-range-check-mxfd.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/fraction-digit-options-read-once.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/ignore-invalid-unicode-ext-values.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/instance-proto-and-extensible.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/legacy-regexp-statics-not-modified.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/length.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/name.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/numbering-system-options.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/constructor/value.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/bound-to-numberformat-instance.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/default-value.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/engineering-scientific-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/engineering-scientific-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/engineering-scientific-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/engineering-scientific-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/engineering-scientific-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/format-fraction-digits-precision.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/format-fraction-digits.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/format-function-builtin.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/format-function-length.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/format-function-name.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/format-negative-numbers.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/format-non-finite-numbers.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/format-significant-digits-precision.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/format-significant-digits.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/length.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/name.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/notation-compact-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/notation-compact-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/notation-compact-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/notation-compact-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/notation-compact-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/numbering-systems.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/percent-formatter.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-currency-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-currency-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-currency-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-currency-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-currency-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-rounding.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/signDisplay-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/this-value-not-numberformat.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/unit-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/unit-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/unit-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/unit-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/unit-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/units-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/units.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/value-arg-coerced-to-number.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/format/value-tonumber.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/default-parameter.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/engineering-scientific-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/engineering-scientific-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/engineering-scientific-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/engineering-scientific-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/engineering-scientific-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/length.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/main.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/name.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/notation-compact-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/notation-compact-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/notation-compact-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/notation-compact-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/notation-compact-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/percent-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/signDisplay-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/this-value-not-numberformat.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/unit-de-DE.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/unit-en-US.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/unit-ja-JP.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/unit-ko-KR.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/unit-zh-TW.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/unit.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/formatToParts/value-tonumber.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/basic.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/compactDisplay.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/length.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/name.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/order.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/resolvedOptions/this-value-not-numberformat.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/this-value-numberformat-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/toStringTag/configurable.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/prototype/toStringTag/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/significant-digits-options-get-sequence.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/style-unit.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/subclassing.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/supportedLocalesOf/basic.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/supportedLocalesOf/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/supportedLocalesOf/length.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/supportedLocalesOf/name.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/supportedLocalesOf/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/supportedLocalesOf/taint-Object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/taint-Object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/test-option-currency.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/test-option-currencyDisplay.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/test-option-localeMatcher.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/test-option-style.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/test-option-useGrouping.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/this-value-ignored.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/throws-for-currency-style-without-currency-option.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/builtin.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/can-be-subclassed.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/constructor-options-throwing-getters.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/default-options-object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/internals.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/length.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/name.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/bind.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/builtins.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/constructor/main.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/properties.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/prototype.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/resolvedOptions/builtins.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/resolvedOptions/length.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/resolvedOptions/name.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/resolvedOptions/order.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/resolvedOptions/pluralCategories.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/resolvedOptions/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/resolvedOptions/properties.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/select/length.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/select/name.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/select/non-finite.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/select/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/select/tainting.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/toStringTag/toString-changed-tag.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/toStringTag/toString-removed-tag.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/toStringTag/toString.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/prototype/toStringTag/toStringTag.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/supportedLocalesOf/arguments.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/supportedLocalesOf/length.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/supportedLocalesOf/main.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/supportedLocalesOf/name.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/supportedLocalesOf/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/supportedLocalesOf/supportedLocalesOf.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/undefined-newtarget-throws.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/locales-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/locales-valid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/newtarget-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-localeMatcher-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-numberingSystem-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-numberingSystem-valid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-numeric-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-numeric-valid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-order.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-proto.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-style-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-style-valid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-throwing-getters.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-toobject-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-toobject.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/options-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/subclassing.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/length.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/name.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/prototype.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/basic.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/branding.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/length.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/locales-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/name.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/options-localeMatcher-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/options-null.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/options-toobject.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/options-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/supportedLocalesOf/result-type.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/instance/extensibility.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/instance/prototype.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/branding.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/en-us-numeric-always.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/en-us-numeric-auto.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/en-us-style-short.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/length.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/name.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/pl-pl-style-long.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/pl-pl-style-narrow.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/pl-pl-style-short.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/unit-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/unit-plural.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/value-non-finite.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/value-symbol.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/format/value-tonumber.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/branding.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-always.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-auto.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/en-us-style-short.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/length.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/name.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-long.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-narrow.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-short.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/result-type.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/unit-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/unit-plural.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/value-non-finite.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/value-symbol.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/formatToParts/value-tonumber.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/resolvedOptions/branding.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/resolvedOptions/caching.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/resolvedOptions/length.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/resolvedOptions/name.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/resolvedOptions/order.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/resolvedOptions/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/resolvedOptions/type.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/toStringTag/toString.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/prototype/toStringTag/toStringTag.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/locales-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/locales-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/newtarget-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-granularity-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-granularity-valid.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-localeMatcher-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-order.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-throwing-getters.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-toobject-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-toobject.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/options-valid-combinations.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/subclassing.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/length.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/name.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/prototype.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/basic.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/length.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/locales-empty.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/locales-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/locales-specific.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/name.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/options-localeMatcher-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/options-null.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/options-toobject.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/options-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/supportedLocalesOf/result-type.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/instance/extensibility.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/instance/prototype.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/constructor/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/resolvedOptions/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/resolvedOptions/caching.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/resolvedOptions/length.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/resolvedOptions/name.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/resolvedOptions/order.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/resolvedOptions/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/resolvedOptions/type-without-lbs.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/branding.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/length.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/name.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/prop-desc.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/segment-grapheme-iterable.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/segment-grapheme.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/segment-sentence-iterable.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/segment-sentence.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/segment-tostring.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/segment-word-iterable.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/segment/segment-word.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/toStringTag/toString.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/prototype/toStringTag/toStringTag.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/localeCompare/default-options-object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/localeCompare/returns-same-results-as-Collator.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/localeCompare/taint-Intl-Collator.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/localeCompare/throws-same-exceptions-as-Collator.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleLowerCase/special_casing_Azeri.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleLowerCase/special_casing_Lithuanian.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleLowerCase/special_casing_Turkish.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleUpperCase/special_casing_Azeri.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleUpperCase/special_casing_Lithuanian.js\"><reason></reason></test>\n  <test id=\"intl402/String/prototype/toLocaleUpperCase/special_casing_Turkish.js\"><reason></reason></test>\n  <test id=\"intl402/constructors-string-and-single-element-array.js\"><reason></reason></test>\n  <test id=\"intl402/constructors-taint-Object-prototype-2.js\"><reason></reason></test>\n  <test id=\"intl402/constructors-taint-Object-prototype.js\"><reason></reason></test>\n  <test id=\"intl402/default-locale-is-canonicalized.js\"><reason></reason></test>\n  <test id=\"intl402/default-locale-is-supported.js\"><reason></reason></test>\n  <test id=\"intl402/fallback-locales-are-supported.js\"><reason></reason></test>\n  <test id=\"intl402/language-tags-canonicalized.js\"><reason></reason></test>\n  <test id=\"intl402/language-tags-invalid.js\"><reason></reason></test>\n  <test id=\"intl402/language-tags-valid.js\"><reason></reason></test>\n  <test id=\"intl402/language-tags-with-underscore.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-consistent-with-resolvedOptions.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-default-locale-and-zxx-locale.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-duplicate-elements-removed.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-empty-and-undefined.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-locales-arg-coered-to-object.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-locales-arg-empty-array.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-returned-array-elements-are-not-frozen.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-taint-Array-2.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-taint-Array.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-test-option-localeMatcher.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-throws-if-element-not-string-or-object.js\"><reason></reason></test>\n  <test id=\"intl402/supportedLocalesOf-unicode-extensions-ignored.js\"><reason></reason></test>\n  <!-- END ECMAScript Internationalization API -->\n\n  <!-- ESNext stage 3 proposals: class fields, private methods and static class features\n       features: [class-fields-public, class-fields-private, class-static-fields-public, class-static-fields-private, class-static-methods-private, class-methods-private]\n       https://github.com/tc39/proposal-class-fields\n       https://github.com/tc39/proposal-private-methods\n       http://github.com/tc39/proposal-static-class-features\n  -->\n  <test id=\"built-ins/Function/prototype/toString/private-method-class-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/private-method-class-statement.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/private-static-method-class-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/private-static-method-class-statement.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-static-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-static-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-static-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-static-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-gen-meth-static-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-static-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-static-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-static-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-static-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-private-meth-static-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-static-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-static-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-static-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-static-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-gen-meth-static-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-static-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-static-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-static-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-static-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-private-meth-static-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/constructor-this-tdz-during-initializers.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-async-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-async-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-async-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-expr-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-call-done-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-call-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-call-value-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-non-object-ignores-then.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-boolean-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-null-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-number-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-object-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-string-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-symbol-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-undefined-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-async-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-async-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-async-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-expr-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-call-done-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-call-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-call-value-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-non-object-ignores-then.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-boolean-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-null-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-number-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-object-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-string-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-symbol-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-undefined-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/class-name-static-initializer-anonymous.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/class-name-static-initializer-default-export.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/derived-cls-direct-eval-contains-superproperty-1.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/derived-cls-direct-eval-contains-superproperty-2.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/direct-eval-err-contains-newtarget.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/fields-anonymous-function-length.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/fields-multiple-definitions-static-private-methods-proxy.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/gen-private-method-static/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/gen-private-method-static/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/gen-private-method/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/gen-private-method/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/grammar-private-field-optional-chaining.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-definitions-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/multiple-stacked-definitions-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-no-sc-line-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/new-sc-line-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-escape-sequence-ZWJ.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-escape-sequence-ZWNJ.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-escape-sequence-u2118.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-escape-sequence-u6F.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-name-ZWJ.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-name-ZWNJ.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-name-common.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-name-dollar.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-name-u2118.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/inst-private-name-underscore.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-escape-sequence-ZWJ.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-escape-sequence-ZWNJ.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-escape-sequence-u2118.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-escape-sequence-u6F.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-name-ZWJ.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-name-ZWNJ.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-name-common.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-name-dollar.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-name-u2118.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-accessor-name/static-private-name-underscore.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-async-generator-method-name.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-async-method-name.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-direct-eval-contains-superproperty-1.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-direct-eval-contains-superproperty-2.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-direct-eval-err-contains-arguments.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-direct-eval-err-contains-newtarget.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-field-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-field-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-field-after-optional-chain.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-field-as-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-field-as-async-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-field-as-async-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-field-as-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-fields-proxy-default-handler-throws.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-generator-method-name.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-getter-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-getter-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-getter-is-not-a-own-property.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-getter-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-getter-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-getter-shadowed-by-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-getter-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-indirect-eval-err-contains-arguments.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-indirect-eval-err-contains-newtarget.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-comparison.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-get-and-call.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-is-not-a-own-property.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-length.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-referenced-from-static-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-method-shadowed-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-methods/prod-private-async-generator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-methods/prod-private-async-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-methods/prod-private-generator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-methods/prod-private-method-initialize-order.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-methods/prod-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-setter-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-setter-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-setter-is-not-a-own-property.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-setter-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-setter-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-setter-shadowed-by-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-setter-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-async-generator-method-name.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-async-method-name.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-field-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-field-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-field-shadowed-by-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-field-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-field-usage-inside-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-generator-method-name.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-method-length.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-method-name.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-method-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-method-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-method-shadowed-by-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-method-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-static-method-usage-inside-nested-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/prod-private-getter-before-super-return-in-constructor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/prod-private-getter-before-super-return-in-field-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/prod-private-method-before-super-return-in-constructor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/prod-private-method-before-super-return-in-field-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/prod-private-setter-before-super-return-in-constructor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/prod-private-setter-before-super-return-in-field-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/regular-definitions-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-field-anonymous-function-length.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-field-anonymous-function-name.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-fields-proxy-default-handler-throws.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-getter-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-getter-access-on-inner-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-getter-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-method-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-method-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-method-and-instance-method-brand-check.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-method-referenced-from-instance-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-method-subclass-receiver.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-methods-proxy-default-handler-throws.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-setter-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-setter-access-on-inner-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-setter-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/static-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-privatemeth-duplicate-get-set.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-privatename-classelementname-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-privatename-classelementname-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-privatename-no-initializer-with-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-privatenames-multi-line.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-static-private-async-gen-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-static-private-async-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-static-private-gen-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-static-private-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/wrapped-in-sc-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-eval-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-factory.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-realm-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-eval-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-factory.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-realm-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-eval-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-factory.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-realm-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-field-multiple-evaluations-of-class-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-field-multiple-evaluations-of-class-eval-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-field-multiple-evaluations-of-class-factory.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-field-multiple-evaluations-of-class-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-field-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-getter-multiple-evaluations-of-class-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-getter-multiple-evaluations-of-class-eval-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-getter-multiple-evaluations-of-class-factory.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-getter-multiple-evaluations-of-class-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-getter-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-method-brand-check-multiple-evaluations-of-class-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-method-brand-check-multiple-evaluations-of-class-eval-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-method-brand-check-multiple-evaluations-of-class-factory.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-method-brand-check-multiple-evaluations-of-class-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-method-brand-check-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-setter-multiple-evaluations-of-class-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-setter-multiple-evaluations-of-class-eval-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-setter-multiple-evaluations-of-class-factory.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-setter-multiple-evaluations-of-class-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-setter-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/module-code/privatename-valid-no-earlyerr.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-async-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-async-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-async-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-expr-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-done-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-value-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-non-object-ignores-then.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-boolean-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-null-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-number-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-object-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-string-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-symbol-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-undefined-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-async-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-async-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-async-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-expr-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-call-done-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-call-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-call-value-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-non-object-ignores-then.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-boolean-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-null-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-number-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-object-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-string-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-symbol-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-undefined-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-1.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-2.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/direct-eval-err-contains-newtarget.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/fields-anonymous-function-length.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/gen-private-method-static/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/gen-private-method-static/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/gen-private-method/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/gen-private-method/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/get-access-of-missing-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/get-access-of-missing-shadowed-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/grammar-private-field-optional-chaining.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-definitions-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/multiple-stacked-definitions-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-no-sc-line-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/new-sc-line-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-is-visible-in-computed-properties.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWJ.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWNJ.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u2118.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u6F.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-name-ZWJ.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-name-ZWNJ.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-name-common.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-name-dollar.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-name-u2118.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/inst-private-name-underscore.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWJ.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWNJ.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u2118.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u6F.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-name-ZWJ.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-name-ZWNJ.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-name-common.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-name-dollar.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-name-u2118.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-accessor-name/static-private-name-underscore.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-async-generator-method-name.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-async-method-name.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-class-field-on-frozen-objects.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-1.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-2.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-direct-eval-err-contains-arguments.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-direct-eval-err-contains-newtarget.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-after-optional-chain.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-as-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-as-async-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-as-async-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-as-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-is-not-clobbered-by-computed-property.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-is-visible-in-computed-properties.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-visible-to-direct-eval-on-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-visible-to-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-field-with-initialized-id-is-visible-in-computed-properties.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-generator-method-name.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-brand-check-multiple-evaluations-of-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-brand-check-super-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-brand-check.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-is-not-a-own-property.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-is-not-clobbered-by-computed-property.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-shadowed-by-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-visible-to-direct-eval-on-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-getter-visible-to-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-indirect-eval-err-contains-arguments.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-indirect-eval-err-contains-newtarget.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-brand-check-multiple-evaluations-of-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-brand-check-super-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-brand-check.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-comparison-multiple-evaluations-of-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-comparison.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-get-and-call.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-is-not-a-own-property.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-is-not-clobbered-by-computed-property.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-is-visible-in-computed-properties.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-length.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-referenced-from-static-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-shadowed-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-visible-to-direct-eval-on-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-method-visible-to-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-methods/prod-private-async-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-methods/prod-private-async-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-methods/prod-private-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-methods/prod-private-method-initialize-order.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-methods/prod-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-brand-check-multiple-evaluations-of-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-brand-check-super-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-brand-check.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-is-not-a-own-property.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-is-not-clobbered-by-computed-property.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-shadowed-by-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-visible-to-direct-eval-on-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-setter-visible-to-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-async-generator-method-name.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-async-method-name.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-field-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-field-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-field-shadowed-by-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-field-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-field-usage-inside-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-field-visible-to-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-generator-method-name.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-getter-abrupt-completition.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-getter-visible-to-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-method-length.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-method-name.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-method-shadowed-by-field-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-method-shadowed-by-getter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-method-shadowed-by-method-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-method-shadowed-by-setter-on-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-method-usage-inside-nested-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-method-visible-to-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-setter-abrupt-completition.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-static-setter-visible-to-direct-eval.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefield-on-proxy.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldadd-typeerror.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-success-1.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-success-2.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-success-3.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-success-4.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-success-5.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-typeerror-1.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-typeerror-2.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-typeerror-3.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-typeerror-4.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldget-typeerror-5.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldset-typeerror-1.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldset-typeerror-2.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldset-typeerror-3.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldset-typeerror-4.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatefieldset-typeerror-5.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privategetter-on-proxy.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatemethods-on-proxy.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatename-not-valid-eval-earlyerr-4.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatename-not-valid-eval-earlyerr-5.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/privatename-valid-no-earlyerr.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/prod-private-getter-before-super-return-in-constructor.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/prod-private-getter-before-super-return-in-field-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/prod-private-method-before-super-return-in-constructor.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/prod-private-method-before-super-return-in-field-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/prod-private-setter-before-super-return-in-constructor.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/prod-private-setter-before-super-return-in-field-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/public-class-field-initialization-on-super-class-with-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/regular-definitions-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-method-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/set-access-of-missing-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/set-access-of-missing-shadowed-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/set-access-of-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/set-access-of-shadowed-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-field-anonymous-function-length.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-field-anonymous-function-name.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-fields-proxy-default-handler-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-getter-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-getter-access-on-inner-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-getter-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-method-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-method-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-method-and-instance-method-brand-check.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-method-referenced-from-instance-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-method-subclass-receiver.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-setter-access-on-inner-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-setter-access-on-inner-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-setter-access-on-inner-function.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/static-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/super-access-inside-a-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/super-access-inside-a-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/super-access-inside-a-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-get-set.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-privatename-no-initializer-with-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-privatenames-multi-line.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-static-private-async-gen-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-static-private-async-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-static-private-gen-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-static-private-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/wrapped-in-sc-static-private-methods.js\"><reason></reason></test>\n  <!-- END - ESNext stage 3 proposals: class fields, private methods and static class features -->\n\n  <!-- ESNext stage 3 proposal: top level await\n       features: [top-level-await]\n       https://github.com/tc39/proposal-top-level-await\n  -->\n  <test id=\"language/module-code/top-level-await/await-awaits-thenable-not-callable.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-awaits-thenables-that-throw.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-awaits-thenables.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-dynamic-import-rejection.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-dynamic-import-resolution.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-expr-new-expr-reject.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-expr-reject-throws.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-expr-resolution.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-void-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/dynamic-import-rejection.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/dynamic-import-resolution.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/if-await-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/module-async-import-async-resolution-ticks.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/module-import-rejection-body.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/module-import-rejection-tick.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/module-import-rejection.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/module-import-resolution.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/module-import-unwrapped.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/module-self-import-async-resolution-ticks.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/module-sync-import-async-resolution-ticks.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/await-expr-dyn-import.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/block-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/catch-parameter.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-class-decl-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-lex-decl-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/export-var-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-in-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-of-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-block-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/if-expr-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/top-level-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/try-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/typeof-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/void-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/while-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/top-level-ticks-2.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/top-level-ticks.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/void-await-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/while-dynamic-evaluation.js\"><reason></reason></test>\n  <!-- END - ESNext stage 3 proposal: top level await -->\n\n  <!-- ESNext stage 3 proposal: RegExp match indices\n       features: [regexp-match-indices]\n       https://github.com/tc39/proposal-top-level-await\n  -->\n  <test id=\"annexB/built-ins/RegExp/match-indices/indices-groups-object.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-array-element.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-array-matched.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-array-non-unicode-match.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-array-properties.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-array-unicode-match.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-array-unicode-property-names.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-array-unmatched.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-array.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-groups-object-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-groups-object-unmatched.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-groups-object.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-groups-properties.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-property.js\"><reason></reason></test>\n  <!-- END - ESNext stage 3 proposal: RegExp match indices -->\n\n  <!-- ESNext stage 3 proposal: Atomics.waitAsync\n       features: [Atomics.waitAsync] (also needs ES2017 feature: [Atomics])\n       https://github.com/tc39/proposal-atomics-wait-async\n  -->\n  <test id=\"built-ins/Atomics/waitAsync/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/false-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/nan-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/negative-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/non-bigint64-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/non-shared-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/not-a-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/not-an-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/null-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/null-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/object-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/object-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/poisoned-object-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/poisoned-object-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-index-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-value-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-value-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/true-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/true-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/undefined-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/undefined-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/undefined-index-defaults-to-zero-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/value-not-equal-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/false-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/is-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/nan-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/negative-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/non-int32-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/non-shared-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/not-a-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/not-an-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/null-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/null-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/object-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/object-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/poisoned-object-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/poisoned-object-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/returns-result-object-value-is-promise-resolves-to-ok.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/returns-result-object-value-is-promise-resolves-to-timed-out.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/returns-result-object-value-is-string-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/returns-result-object-value-is-string-timed-out.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-index-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-value-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-value-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/true-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/true-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/undefined-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/undefined-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/undefined-index-defaults-to-zero-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/validate-arraytype-before-timeout-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/value-not-equal-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/was-woken-before-timeout.js\"><reason></reason></test>\n  <!-- END - ESNext stage 3 proposal: Atomics.waitAsync -->\n\n  <!-- ESNext stage 3 proposal: Hashbang Grammar\n       features: [hashbang]\n       https://github.com/tc39/proposal-hashbang\n  -->\n  <test id=\"language/comments/hashbang/eval-indirect.js\"><reason></reason></test>\n  <test id=\"language/comments/hashbang/eval.js\"><reason></reason></test>\n  <test id=\"language/comments/hashbang/line-terminator-carriage-return.js\"><reason></reason></test>\n  <test id=\"language/comments/hashbang/line-terminator-line-separator.js\"><reason></reason></test>\n  <test id=\"language/comments/hashbang/line-terminator-paragraph-separator.js\"><reason></reason></test>\n  <test id=\"language/comments/hashbang/module.js\"><reason></reason></test>\n  <test id=\"language/comments/hashbang/no-line-separator.js\"><reason></reason></test>\n  <test id=\"language/comments/hashbang/not-empty.js\"><reason></reason></test>\n  <test id=\"language/comments/hashbang/use-strict.js\"><reason></reason></test>\n  <!-- END - ESNext stage 3 proposal: Hashbang Grammar -->\n\n  <!-- ESNext stage 4 proposal: String.prototype.replaceAll\n       features: [String.prototype.replaceAll]\n       https://github.com/tc39/proposal-string-replaceall\n  -->\n  <test id=\"annexB/built-ins/String/prototype/replaceAll/custom-replacer-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/String/prototype/replaceAll/searchValue-replacer-RegExp-call.js\"><reason></reason></test>\n  <!-- END - ESNext stage 4 proposal: String.prototype.replaceAll -->\n\n  <!-- ESNext stage 4 proposal: Promise.any\n       features: [Promise.any, AggregateError]\n       https://github.com/tc39/proposal-promise-any\n  -->\n  <test id=\"built-ins/NativeErrors/AggregateError/errors-iterabletolist-failures.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/errors-iterabletolist.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/length.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/message-method-prop-cast.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/message-method-prop.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/message-tostring-abrupt-symbol.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/message-tostring-abrupt.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/message-undefined-no-prop.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/name.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/newtarget-is-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/newtarget-proto-custom.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/newtarget-proto-fallback.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/newtarget-proto.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/proto.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/prototype/constructor.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/prototype/errors-absent-on-prototype.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/prototype/message.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/prototype/name.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/prototype/proto.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/call-reject-element-after-return.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/call-reject-element-items.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/capability-executor-called-twice.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/capability-executor-not-callable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/capability-reject-throws-no-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/capability-resolve-throws-no-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/capability-resolve-throws-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/ctx-ctor-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/ctx-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/ctx-non-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-error-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-error-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-get-error-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-get-error.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-get-once-multiple-calls.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-get-once-no-calls.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-on-promises-every-iteration-of-custom.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-on-promises-every-iteration-of-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-on-values-every-iteration-of-custom.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-on-values-every-iteration-of-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve-return.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-resolve.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-then-error-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-then-error-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-then-get-error-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-then-get-error-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-then-on-promises-every-iteration.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/invoke-then.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/is-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-empty-iterable-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-empty-string-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-error-object-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-false-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-null-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-number-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-poisoned.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-string-resolve.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-symbol-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-true-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-arg-is-undefined-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-assigned-false-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-assigned-null-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-assigned-number-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-assigned-string-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-assigned-symbol-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-assigned-true-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-assigned-undefined-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-next-val-err-no-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-next-val-err-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-returns-false-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-returns-null-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-returns-number-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-returns-string-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-returns-symbol-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-returns-true-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-returns-undefined-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-step-err-no-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/iter-step-err-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/new-reject-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-all-mixed.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-deferred.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-element-function-extensible.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-element-function-length.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-element-function-name.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-element-function-nonconstructor.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-element-function-prototype.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-from-same-thenable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-ignored-immed.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/reject-immed.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-before-loop-exit-from-same.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-before-loop-exit.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-from-reject-catch.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-from-resolve-reject-catch.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-from-same-thenable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-ignores-late-rejection-deferred.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-ignores-late-rejection.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-non-callable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-non-thenable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolve-not-callable-reject-with-typeerror.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolved-sequence-extra-ticks.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolved-sequence-mixed.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolved-sequence-with-rejections.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/resolved-sequence.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/returns-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/any/species-get-error.js\"><reason></reason></test>\n  <!-- END - ESNext stage 4 proposal: Promise.any -->\n\n  <!-- ESNext stage 4 proposal: WeakRefs\n       features: [WeakRef, FinalizationRegistry]\n       https://github.com/tc39/proposal-weakrefs\n  -->\n  <test id=\"built-ins/FinalizationRegistry/constructor.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/gc-has-one-chance-to-call-cleanupCallback.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/instance-extensible.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/length.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/name.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/newtarget-prototype-is-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/proto.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype-from-newtarget-abrupt.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype-from-newtarget-custom.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype-from-newtarget.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/Symbol.toStringTag.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/callback-not-callable-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-reference.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-unregister.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/custom-this.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/holdings-multiple-values.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/length.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/name.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/reentrancy.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined-with-gc.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/this-does-not-have-internal-cells-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/this-not-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/constructor.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/proto.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/custom-this.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/holdings-any-value-type.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/holdings-same-as-target.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/length.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/name.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/return-undefined-register-itself.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/return-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/target-not-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/this-does-not-have-internal-target-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/this-not-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/unregisterToken-not-object-or-undefined-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/unregisterToken-same-as-holdings-and-target.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/unregisterToken-same-as-holdings.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/register/unregisterToken-same-as-target.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/unregister/custom-this.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/unregister/length.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/unregister/name.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/unregister/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/unregister/this-does-not-have-internal-cells-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/unregister/this-not-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/unregister/unregister-cleaned-up-cell.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/unregister/unregister.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/unregister/unregisterToken-not-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/returns-new-object-from-constructor.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/target-not-callable-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/undefined-newtarget-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/unnaffected-by-poisoned-cleanupCallback.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/constructor.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/instance-extensible.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/length.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/name.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/newtarget-prototype-is-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/proto.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype-from-newtarget-abrupt.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype-from-newtarget-custom.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype-from-newtarget.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/Symbol.toStringTag.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/constructor.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/deref/custom-this.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/deref/length.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/deref/name.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/deref/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/deref/return-target.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/deref/this-does-not-have-internal-target-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/deref/this-not-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/prototype/proto.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/returns-new-object-from-constructor.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/target-not-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/undefined-newtarget-throws.js\"><reason></reason></test>\n  <!-- END - ESNext stage 4 proposal: WeakRefs -->\n\n  <!-- ESNext stage 4 proposal: Logical Assignment Operators\n       features: [logical-assignment-operators]\n       https://github.com/tc39/proposal-logical-assignment\n  -->\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-bigint.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-lhs-before-rhs.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-namedevaluation-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-namedevaluation-class-expression.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-namedevaluation-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-no-set-put.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-no-set.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-non-extensible.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-non-writeable-put.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-non-writeable.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-unresolved-lhs.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-unresolved-rhs-put.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator-unresolved-rhs.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-assignment-operator.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-and-whitespace.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-bigint.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-lhs-before-rhs.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-namedevaluation-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-namedevaluation-class-expression.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-namedevaluation-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-no-set-put.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-no-set.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-non-extensible.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-non-writeable-put.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-non-writeable.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-unresolved-lhs.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-unresolved-rhs-put.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator-unresolved-rhs.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-assignment-operator.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-nullish-whitespace.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-bigint.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-lhs-before-rhs.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-namedevaluation-arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-namedevaluation-class-expression.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-namedevaluation-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-no-set-put.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-no-set.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-non-extensible.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-non-writeable-put.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-non-writeable.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-unresolved-lhs.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-unresolved-rhs-put.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator-unresolved-rhs.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-assignment-operator.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-assignment/lgcl-or-whitespace.js\"><reason></reason></test>\n  <!-- END - ESNext stage 4 proposal: Logical Assignment Operators -->\n\n  <!-- ES2015: Proper Tail Call (PTC) Optimization\n       features: [tail-call-optimization]\n  -->\n  <test id=\"language/expressions/call/tco-call-args.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-cross-realm-class-construct.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-cross-realm-class-derived-construct.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-cross-realm-fun-call.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-cross-realm-fun-construct.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-member-args.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-non-eval-function-dynamic.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-non-eval-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-non-eval-global.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-non-eval-with.js\"><reason></reason></test>\n  <test id=\"language/expressions/coalesce/tco-pos-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/coalesce/tco-pos-undefined.js\"><reason></reason></test>\n  <test id=\"language/expressions/comma/tco-final.js\"><reason></reason></test>\n  <test id=\"language/expressions/conditional/tco-cond.js\"><reason></reason></test>\n  <test id=\"language/expressions/conditional/tco-pos.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-and/tco-right.js\"><reason></reason></test>\n  <test id=\"language/expressions/logical-or/tco-right.js\"><reason></reason></test>\n  <test id=\"language/expressions/tagged-template/tco-call.js\"><reason></reason></test>\n  <test id=\"language/expressions/tagged-template/tco-member.js\"><reason></reason></test>\n  <test id=\"language/expressions/tco-pos.js\"><reason></reason></test>\n  <test id=\"language/statements/block/tco-stmt-list.js\"><reason></reason></test>\n  <test id=\"language/statements/block/tco-stmt.js\"><reason></reason></test>\n  <test id=\"language/statements/do-while/tco-body.js\"><reason></reason></test>\n  <test id=\"language/statements/for/tco-const-body.js\"><reason></reason></test>\n  <test id=\"language/statements/for/tco-let-body.js\"><reason></reason></test>\n  <test id=\"language/statements/for/tco-lhs-body.js\"><reason></reason></test>\n  <test id=\"language/statements/for/tco-var-body.js\"><reason></reason></test>\n  <test id=\"language/statements/if/tco-else-body.js\"><reason></reason></test>\n  <test id=\"language/statements/if/tco-if-body.js\"><reason></reason></test>\n  <test id=\"language/statements/labeled/tco.js\"><reason></reason></test>\n  <test id=\"language/statements/return/tco.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/tco-case-body-dflt.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/tco-case-body.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/tco-dftl-body.js\"><reason></reason></test>\n  <test id=\"language/statements/try/tco-catch-finally.js\"><reason></reason></test>\n  <test id=\"language/statements/try/tco-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/try/tco-finally.js\"><reason></reason></test>\n  <test id=\"language/statements/while/tco-body.js\"><reason></reason></test>\n  <!-- END - ES2015: Proper Tail Call (PTC) Optimization -->\n\n  <!-- ES2020: Optional Chaining\n       features: [optional-chaining]\n       https://github.com/tc39/proposal-optional-chaining\n  -->\n  <test id=\"language/expressions/optional-chaining/call-expression.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/eval-optional-call.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/iteration-statement-do.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/iteration-statement-for-await-of.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/iteration-statement-for-in.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/iteration-statement-for-of-type-error.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/iteration-statement-for.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/iteration-statement-while.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/member-expression-async-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/member-expression-async-literal.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/member-expression-async-this.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/member-expression.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/new-target-optional-call.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/optional-call-preserves-this.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/optional-chain-async-optional-chain-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/optional-chain-async-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/optional-chain-expression-optional-expression.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/optional-chain-prod-arguments.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/optional-chain-prod-expression.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/optional-chain-prod-identifiername.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/optional-chain.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/optional-expression.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/runtime-semantics-evaluation.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/short-circuiting.js\"><reason></reason></test>\n  <test id=\"language/expressions/optional-chaining/super-property-optional-call.js\"><reason></reason></test>\n  <!-- END - ES2020: Optional Chaining -->\n\n  <!-- ES2017: Shared Memory and Atomics\n       features: [Atomics]\n       https://github.com/tc39/ecmascript_sharedmem\n  -->\n  <test id=\"built-ins/Atomics/Symbol.toStringTag.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/bigint/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/bigint/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/bigint/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/validate-arraytype-before-expectedValue-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/validate-arraytype-before-replacementValue-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/bigint/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/nonshared-int-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/isLockFree/bigint/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/isLockFree/corner-cases.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/isLockFree/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/isLockFree/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/isLockFree/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/isLockFree/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/bigint/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/non-bigint64-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/non-shared-bufferdata-count-evaluation-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/non-shared-bufferdata-index-evaluation-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/non-shared-bufferdata-non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/non-shared-bufferdata-returns-0.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/notify-all-on-loc.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-boundary-cases.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-defaults-to-infinity-missing.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-defaults-to-infinity-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-from-nans.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-symbol-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-tointeger-throws-then-wake-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/negative-count.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/non-int32-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/non-shared-bufferdata-count-evaluation-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/non-shared-bufferdata-index-evaluation-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/non-shared-bufferdata-non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/non-shared-bufferdata-returns-0.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/non-shared-int-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/not-a-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/not-an-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-all-on-loc.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-all.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-in-order-one-time.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-in-order.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-nan.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-one.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-renotify-noop.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-two.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-with-no-agents-waiting.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-with-no-matching-agents-waiting.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/symbol-for-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/undefined-index-defaults-to-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/validate-arraytype-before-count-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/bigint/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/proto.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/bigint/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/expected-return-value-negative-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/bigint/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/cannot-suspend-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/false-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/nan-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/negative-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/non-bigint64-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/non-shared-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/waiterlist-order-of-operations-is-fifo.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/cannot-suspend-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/false-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/nan-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/negative-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/non-int32-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/non-shared-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/not-a-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/not-an-object-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/null-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/null-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/object-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/object-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/poisoned-object-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/poisoned-object-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-index-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-value-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-value-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/true-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/true-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/undefined-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/undefined-index-defaults-to-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/validate-arraytype-before-timeout-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/wait-index-value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/waiterlist-order-of-operations-is-fifo.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/bigint/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/non-shared-bufferdata.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/non-shared-int-views-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n\n  <!-- ES2017: Shared Memory and Atomics\n       features: [SharedArrayBuffer]\n       https://github.com/tc39/ecmascript_sharedmem\n  -->\n  <test id=\"built-ins/ArrayBuffer/prototype/byteLength/this-is-sharedarraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/ArrayBuffer/prototype/slice/this-is-sharedarraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/add/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/and/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/compareExchange/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/exchange/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/isLockFree/bigint/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/load/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/notify-all-on-loc.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-boundary-cases.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-defaults-to-infinity-missing.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-defaults-to-infinity-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-from-nans.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-symbol-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-tointeger-throws-then-wake-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/negative-count.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/non-shared-int-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-all-on-loc.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-all.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-in-order-one-time.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-in-order.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-nan.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-one.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-renotify-noop.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-two.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-with-no-agents-waiting.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-with-no-matching-agents-waiting.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/symbol-for-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/undefined-index-defaults-to-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/or/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/expected-return-value-negative-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/store/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/sub/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/cannot-suspend-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/false-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/nan-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/negative-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/non-bigint64-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/waiterlist-order-of-operations-is-fifo.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/cannot-suspend-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/false-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/nan-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/negative-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/null-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/null-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/object-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/object-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/poisoned-object-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/poisoned-object-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-index-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-value-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-value-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/true-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/true-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/undefined-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/undefined-index-defaults-to-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/wait-index-value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/waiterlist-order-of-operations-is-fifo.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/false-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/nan-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/negative-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/non-bigint64-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/null-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/null-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/object-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/object-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/poisoned-object-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/poisoned-object-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-index-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-value-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-value-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/true-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/true-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/undefined-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/undefined-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/undefined-index-defaults-to-zero-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/value-not-equal-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/false-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/nan-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/negative-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/negative-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/non-int32-typedarray-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/null-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/null-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/object-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/object-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/out-of-range-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/poisoned-object-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/poisoned-object-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/returns-result-object-value-is-promise-resolves-to-ok.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/returns-result-object-value-is-promise-resolves-to-timed-out.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/returns-result-object-value-is-string-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/returns-result-object-value-is-string-timed-out.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-index-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-index-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-timeout-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-value-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-value-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/true-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/true-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/undefined-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/undefined-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/undefined-index-defaults-to-zero-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/validate-arraytype-before-index-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/validate-arraytype-before-timeout-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/validate-arraytype-before-value-coercion.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/value-not-equal-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/bigint/bad-range.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/expected-return-value.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/xor/non-views.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/buffer-does-not-have-arraybuffer-data-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/buffer-reference-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/byteoffset-is-negative-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/custom-proto-access-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/custom-proto-if-not-object-fallbacks-to-default-prototype-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/custom-proto-if-object-is-used-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/defined-bytelength-and-byteoffset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/defined-byteoffset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/defined-byteoffset-undefined-bytelength-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/excessive-bytelength-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/excessive-byteoffset-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/instance-extensibility-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/negative-bytelength-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/negative-byteoffset-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/newtarget-undefined-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/proto-from-ctor-realm-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/buffer/return-buffer-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/buffer/this-has-no-dataview-internal-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/byteLength/return-bytelength-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/byteLength/this-has-no-dataview-internal-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/byteOffset/return-byteoffset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/byteOffset/this-has-no-dataview-internal-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/index-is-out-of-range-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/negative-byteoffset-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/return-abrupt-from-tonumber-byteoffset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/return-abrupt-from-tonumber-byteoffset-symbol-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/return-value-clean-arraybuffer-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/return-values-custom-offset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/return-values-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/this-has-no-dataview-internal-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/to-boolean-littleendian-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/prototype/getInt32/toindex-byteoffset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/return-abrupt-tonumber-bytelength-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/return-abrupt-tonumber-bytelength-symbol-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/return-abrupt-tonumber-byteoffset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/return-abrupt-tonumber-byteoffset-symbol-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/return-instance-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/toindex-bytelength-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/toindex-byteoffset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/allocation-limit.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/data-allocation-after-object-creation.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/init-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/length-is-absent.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/length-is-too-large-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/length.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/negative-length-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/newtarget-prototype-is-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype-from-newtarget.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/Symbol.toStringTag.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/byteLength/invoked-as-accessor.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/byteLength/invoked-as-func.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/byteLength/length.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/byteLength/name.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/byteLength/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/byteLength/return-bytelength.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/byteLength/this-has-no-typedarrayname-internal.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/byteLength/this-is-arraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/byteLength/this-is-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/constructor.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/context-is-not-arraybuffer-object.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/context-is-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/descriptor.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/end-default-if-absent.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/end-default-if-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/end-exceeds-length.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/extensible.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/length.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/name.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/negative-end.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/negative-start.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/nonconstructor.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/number-conversion.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-constructor-is-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-constructor-is-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-is-not-constructor.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-is-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-is-null.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-is-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-returns-larger-arraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-returns-not-arraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-returns-same-arraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species-returns-smaller-arraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/species.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/start-default-if-absent.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/start-default-if-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/start-exceeds-end.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/start-exceeds-length.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/this-is-arraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/tointeger-conversion-end.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/prototype/slice/tointeger-conversion-start.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/return-abrupt-from-length-symbol.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/return-abrupt-from-length.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/toindex-length.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/undefined-newtarget-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/zero-length.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-conversions-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/typedarray-backed-by-sharedarraybuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/indexed-value-sab.js\"><reason></reason></test>\n  <!-- END - ES2017: Shared Memory and Atomics -->\n\n  <!-- ES2018: RegExp Lookbehind Assertions\n       features: [regexp-lookbehind]\n       https://github.com/tc39/proposal-regexp-lookbehind\n  -->\n  <test id=\"built-ins/RegExp/lookBehind/alternations.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/back-references-to-captures.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/back-references.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/captures-negative.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/captures.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/do-not-backtrack.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/greedy-loop.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/misc.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/mutual-recursive.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/negative.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/nested-lookaround.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/simple-fixed-length.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/sliced-strings.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/start-of-line.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/sticky.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/variable-length.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/lookBehind/word-boundary.js\"><reason></reason></test>\n  <!-- END - ES2018: RegExp Lookbehind Assertions -->\n\n  <!-- ES2018: RegExp named capture groups\n       features: [regexp-named-groups]\n       https://github.com/tc39/proposal-regexp-named-groups\n  -->\n  <test id=\"annexB/built-ins/RegExp/match-indices/indices-groups-object.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/RegExp/named-groups/groups-object.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/RegExp/named-groups/non-unicode-malformed-lookbehind.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/RegExp/named-groups/non-unicode-malformed.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-groups-object-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-groups-object-unmatched.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-groups-object.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/match-indices/indices-groups-properties.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/functional-replace-global.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/functional-replace-non-global.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/groups-object-subclass-sans.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/groups-object-subclass.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/groups-object-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/groups-object-unmatched.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/groups-object.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/groups-properties.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/lookbehind.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/non-unicode-match.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/non-unicode-property-names-valid.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/non-unicode-property-names.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/non-unicode-references.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/string-replace-escaped.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/string-replace-get.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/string-replace-missing.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/string-replace-numbered.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/string-replace-unclosed.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/string-replace-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/unicode-match.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/unicode-property-names-valid.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/unicode-property-names.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/named-groups/unicode-references.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/named-groups-fn.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/named-groups.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/poisoned-stdlib.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups-err.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups-prop-err.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups-prop.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/result-get-groups-err.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/Symbol.replace/result-get-groups-prop-err.js\"><reason></reason></test>\n  <test id=\"language/literals/regexp/named-groups/forward-reference.js\"><reason></reason></test>\n  <!-- END - ES2018: RegExp named capture groups -->\n\n  <!-- ES2018 - RegExp Unicode Property Escapes\n       features: [regexp-unicode-property-escapes]\n       https://github.com/tc39/proposal-regexp-unicode-property-escapes\n  -->\n  <test id=\"built-ins/RegExp/property-escapes/character-class.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/ASCII.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/ASCII_Hex_Digit.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Alphabetic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Any.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Assigned.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Bidi_Control.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Bidi_Mirrored.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Case_Ignorable.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Cased.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Changes_When_Casefolded.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Changes_When_Casemapped.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Changes_When_Lowercased.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Changes_When_NFKC_Casefolded.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Changes_When_Titlecased.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Changes_When_Uppercased.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Dash.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Default_Ignorable_Code_Point.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Deprecated.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Diacritic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Emoji.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Emoji_Component.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Emoji_Modifier.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Emoji_Modifier_Base.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Emoji_Presentation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Extended_Pictographic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Extender.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Cased_Letter.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Close_Punctuation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Connector_Punctuation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Currency_Symbol.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Dash_Punctuation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Enclosing_Mark.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Final_Punctuation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Format.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Initial_Punctuation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Letter.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Letter_Number.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Line_Separator.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Lowercase_Letter.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Math_Symbol.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Letter.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Symbol.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Nonspacing_Mark.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Number.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Open_Punctuation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Other.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Letter.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Number.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Punctuation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Symbol.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Paragraph_Separator.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Private_Use.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Separator.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Space_Separator.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Spacing_Mark.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Surrogate.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Symbol.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Titlecase_Letter.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Unassigned.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/General_Category_-_Uppercase_Letter.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Grapheme_Base.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Grapheme_Extend.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Hex_Digit.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/IDS_Binary_Operator.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/IDS_Trinary_Operator.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/ID_Continue.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/ID_Start.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Ideographic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Join_Control.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Logical_Order_Exception.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Lowercase.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Math.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Noncharacter_Code_Point.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Pattern_Syntax.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Pattern_White_Space.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Quotation_Mark.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Radical.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Regional_Indicator.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Adlam.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Ahom.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Anatolian_Hieroglyphs.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Arabic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Armenian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Avestan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Balinese.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Bamum.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Bassa_Vah.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Batak.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Bengali.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Bhaiksuki.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Bopomofo.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Brahmi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Braille.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Buginese.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Buhid.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Canadian_Aboriginal.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Carian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Caucasian_Albanian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Chakma.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Cham.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Cherokee.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Chorasmian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Common.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Coptic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Cuneiform.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Cypriot.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Cyrillic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Deseret.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Devanagari.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Dives_Akuru.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Dogra.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Duployan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Egyptian_Hieroglyphs.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Elbasan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Elymaic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Ethiopic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Georgian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Glagolitic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Gothic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Grantha.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Greek.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Gujarati.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Gunjala_Gondi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Gurmukhi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Han.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Hangul.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Hanifi_Rohingya.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Hanunoo.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Hatran.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Hebrew.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Hiragana.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Imperial_Aramaic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Inscriptional_Pahlavi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Inscriptional_Parthian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Javanese.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Kaithi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Kannada.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Katakana.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Kayah_Li.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Kharoshthi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Khitan_Small_Script.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Khmer.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Khojki.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Khudawadi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Lao.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Latin.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Lepcha.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Limbu.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Linear_A.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Linear_B.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Lisu.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Lycian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Lydian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Mahajani.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Makasar.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Malayalam.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Mandaic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Manichaean.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Marchen.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Masaram_Gondi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Medefaidrin.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Meetei_Mayek.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Mende_Kikakui.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Meroitic_Cursive.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Meroitic_Hieroglyphs.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Miao.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Modi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Mongolian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Mro.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Multani.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Myanmar.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Nabataean.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Nandinagari.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_New_Tai_Lue.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Newa.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Nko.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Nushu.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Nyiakeng_Puachue_Hmong.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Ogham.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Ol_Chiki.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Old_Hungarian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Old_Italic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Old_North_Arabian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Old_Permic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Old_Persian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Old_Sogdian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Old_South_Arabian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Old_Turkic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Oriya.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Osage.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Osmanya.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Pahawh_Hmong.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Palmyrene.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Pau_Cin_Hau.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Phags_Pa.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Phoenician.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Psalter_Pahlavi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Rejang.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Runic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Samaritan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Saurashtra.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Sharada.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Shavian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Siddham.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_SignWriting.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Sinhala.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Sogdian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Sora_Sompeng.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Soyombo.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Sundanese.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Syloti_Nagri.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Syriac.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tagalog.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tagbanwa.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tai_Le.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tai_Tham.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tai_Viet.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Takri.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tamil.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tangut.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Telugu.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Thaana.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Thai.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tibetan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tifinagh.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Tirhuta.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Ugaritic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Vai.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Wancho.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Warang_Citi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Yezidi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Yi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_-_Zanabazar_Square.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Adlam.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ahom.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Anatolian_Hieroglyphs.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Arabic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Armenian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Avestan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Balinese.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bamum.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bassa_Vah.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Batak.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bengali.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bhaiksuki.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bopomofo.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Brahmi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Braille.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Buginese.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Buhid.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Canadian_Aboriginal.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Carian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Caucasian_Albanian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Chakma.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cham.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cherokee.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Chorasmian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Common.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Coptic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cuneiform.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cypriot.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cyrillic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Deseret.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Devanagari.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Dives_Akuru.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Dogra.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Duployan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Egyptian_Hieroglyphs.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Elbasan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Elymaic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ethiopic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Georgian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Glagolitic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gothic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Grantha.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Greek.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gujarati.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gunjala_Gondi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gurmukhi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Han.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hangul.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hanifi_Rohingya.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hanunoo.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hatran.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hebrew.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hiragana.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Imperial_Aramaic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inscriptional_Pahlavi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inscriptional_Parthian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Javanese.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kaithi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kannada.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Katakana.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kayah_Li.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kharoshthi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khitan_Small_Script.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khmer.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khojki.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khudawadi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lao.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Latin.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lepcha.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Limbu.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Linear_A.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Linear_B.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lisu.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lycian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lydian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mahajani.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Makasar.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Malayalam.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mandaic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Manichaean.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Marchen.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Masaram_Gondi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Medefaidrin.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meetei_Mayek.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mende_Kikakui.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meroitic_Cursive.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meroitic_Hieroglyphs.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Miao.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Modi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mongolian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mro.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Multani.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Myanmar.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nabataean.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nandinagari.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_New_Tai_Lue.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Newa.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nko.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nushu.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nyiakeng_Puachue_Hmong.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ogham.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ol_Chiki.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Hungarian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Italic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_North_Arabian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Permic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Persian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Sogdian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_South_Arabian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Turkic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Oriya.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Osage.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Osmanya.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Pahawh_Hmong.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Palmyrene.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Pau_Cin_Hau.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Phags_Pa.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Phoenician.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Psalter_Pahlavi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Rejang.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Runic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Samaritan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Saurashtra.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sharada.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Shavian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Siddham.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_SignWriting.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sinhala.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sogdian.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sora_Sompeng.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Soyombo.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sundanese.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Syloti_Nagri.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Syriac.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tagalog.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tagbanwa.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Le.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Tham.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Viet.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Takri.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tamil.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tangut.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Telugu.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Thaana.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Thai.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tibetan.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tifinagh.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tirhuta.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ugaritic.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Vai.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Wancho.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Warang_Citi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Yezidi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Yi.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Zanabazar_Square.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Sentence_Terminal.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Soft_Dotted.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Terminal_Punctuation.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Unified_Ideograph.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Uppercase.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/Variation_Selector.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/White_Space.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/XID_Continue.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/property-escapes/generated/XID_Start.js\"><reason></reason></test>\n  <!-- END - ES2018 - RegExp Unicode Property Escapes -->\n\n  <!-- ES2018: Rest/Spread Properties\n       features: [object-rest, object-spread]\n       https://github.com/tc39/proposal-object-rest-spread\n  -->\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/private-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/private-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <!-- END - ES2018: Rest/Spread Properties -->\n\n  <!-- ES2020: Dynamic Import\n       features: [dynamic-import]\n       https://github.com/tc39/proposal-dynamic-import\n  -->\n  <test id=\"language/expressions/dynamic-import/always-create-new-promise.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assign-expr-get-value-abrupt-throws.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/additive-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/array-literal.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/arrow-function.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/await-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/await-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/call-expr-arguments.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/call-expr-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/call-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/cover-call-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/cover-parenthesized-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/import-meta.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/lhs-assign-operator-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/lhs-eq-assign-expr-nostrict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/lhs-eq-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/logical-and-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/logical-or-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/member-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/new-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/object-literal.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/tagged-function-call.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/ternary.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/this.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/unary-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/yield-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/yield-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/yield-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/assignment-expression/yield-star.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/await-import-evaluation.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-arrow-import-catch-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-arrow-import-catch-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-arrow-import-catch-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-arrow-import-catch-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-arrow-import-catch-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-arrow-import-catch-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-arrow-import-catch-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-await-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-await-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-await-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-await-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-await-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-await-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-await-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-await-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-await-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-await-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-await-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-await-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-await-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-await-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-return-await-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-return-await-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-return-await-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-return-await-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-return-await-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-return-await-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-return-await-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-function-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-import-catch-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-import-catch-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-import-catch-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-import-catch-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-import-catch-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-import-catch-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-import-catch-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-labeled-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-labeled-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-labeled-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-labeled-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-labeled-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-labeled-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-block-labeled-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-do-while-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-do-while-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-do-while-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-do-while-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-do-while-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-do-while-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-do-while-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-else-import-catch-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-else-import-catch-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-else-import-catch-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-else-import-catch-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-else-import-catch-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-else-import-catch-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-else-import-catch-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-function-import-catch-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-function-import-catch-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-function-import-catch-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-function-import-catch-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-function-import-catch-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-function-import-catch-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-function-import-catch-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-if-import-catch-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-if-import-catch-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-if-import-catch-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-if-import-catch-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-if-import-catch-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-if-import-catch-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-if-import-catch-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-while-import-catch-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-while-import-catch-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-while-import-catch-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-while-import-catch-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-while-import-catch-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-while-import-catch-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-while-import-catch-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/top-level-import-catch-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/top-level-import-catch-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/top-level-import-catch-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/top-level-import-catch-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/top-level-import-catch-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/top-level-import-catch-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/top-level-import-catch-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/custom-primitive.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-cls-anon.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-cls-name-meth.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-cls-named.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-expr-cls-anon.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-expr-cls-name-meth.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-expr-cls-named.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-expr-fn-anon.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-expr-fn-named.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-expr-gen-anon.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-expr-gen-named.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-export-dflt-expr-in.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-rqstd-once.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-self-once-module.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/eval-self-once-script.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/for-await-resolution-and-error-agen-yield.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/for-await-resolution-and-error-agen.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/for-await-resolution-and-error.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/imported-self-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/indirect-resolution.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-Symbol-toStringTag.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-define-own-property.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-delete-exported-init-no-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-delete-exported-init-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-delete-non-exported-no-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-delete-non-exported-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-extensible.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-nested-namespace-dflt-direct.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-nested-namespace-dflt-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-nested-namespace-props-nrml.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-own-property-str-found-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-own-property-str-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-own-property-sym.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-str-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-str-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-sym-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-get-sym-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-has-property-str-found-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-has-property-str-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-has-property-sym-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-has-property-sym-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-no-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-own-property-keys-sort.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-prevent-extensions-object.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-prevent-extensions-reflect.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-prop-descs.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-prototype.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-set-no-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-set-prototype-of-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-set-prototype-of.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-set-same-values-no-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-set-same-values-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/await-ns-set-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/default-property-not-set-own.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-Symbol-toStringTag.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-define-own-property.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-delete-exported-init-no-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-delete-exported-init-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-delete-non-exported-no-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-delete-non-exported-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-extensible.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-nested-namespace-dflt-direct.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-nested-namespace-dflt-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-nested-namespace-props-nrml.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-own-property-str-found-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-own-property-str-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-own-property-sym.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-str-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-str-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-sym-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-get-sym-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-has-property-str-found-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-has-property-str-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-has-property-sym-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-has-property-sym-not-found.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-no-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-own-property-keys-sort.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-prevent-extensions-object.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-prevent-extensions-reflect.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-prop-descs.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-prototype.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-set-no-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-set-prototype-of-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-set-prototype-of.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-set-same-values-no-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-set-same-values-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/namespace/promise-then-ns-set-strict.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/returns-promise.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/reuse-namespace-object-from-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/reuse-namespace-object-from-script.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/reuse-namespace-object.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/callexpression-arguments.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/callexpression-templateliteral.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-arrow-assignment-expression-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-arrow-assignment-expression-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-arrow-assignment-expression-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-arrow-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-arrow-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-arrow-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-await-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-await-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-await-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-return-await-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-return-await-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-return-await-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-function-await-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-function-await-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-function-await-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-function-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-function-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-function-return-await-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-function-return-await-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-function-return-await-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-function-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-gen-await-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-gen-await-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-gen-await-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-block-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-block-labeled-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-block-labeled-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-block-labeled-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-block-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-block-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-do-while-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-do-while-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-do-while-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-else-braceless-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-else-braceless-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-else-braceless-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-else-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-else-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-else-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-function-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-function-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-function-return-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-function-return-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-function-return-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-function-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-if-braceless-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-if-braceless-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-if-braceless-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-if-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-if-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-if-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-while-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-while-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-while-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-with-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-with-expression-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-with-expression-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-with-expression-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-with-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-with-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/new-covered-expression-is-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/top-level-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/top-level-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/top-level-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/update-to-dynamic-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage-from-eval.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-assignment-expression-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-assignment-expression-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-assignment-expression-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-assignment-expression-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-assignment-expression-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-assignment-expression-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-import-then-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-import-then-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-import-then-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-import-then-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-import-then-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-arrow-import-then-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-await-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-await-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-await-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-await-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-await-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-await-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-return-await-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-return-await-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-return-await-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-return-await-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-return-await-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-arrow-function-return-await-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-await-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-await-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-await-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-await-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-await-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-await-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-return-await-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-return-await-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-return-await-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-return-await-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-return-await-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-return-await-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-function-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-block-import-then-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-block-import-then-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-block-import-then-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-block-import-then-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-block-import-then-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-block-import-then-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-do-while-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-do-while-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-do-while-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-do-while-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-do-while-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-do-while-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-else-import-then-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-else-import-then-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-else-import-then-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-else-import-then-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-else-import-then-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-else-import-then-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-function-import-then-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-function-import-then-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-function-import-then-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-function-import-then-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-function-import-then-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-function-import-then-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-braceless-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-braceless-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-braceless-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-braceless-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-import-then-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-import-then-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-import-then-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-import-then-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-import-then-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-if-import-then-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-while-import-then-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-while-import-then-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-while-import-then-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-while-import-then-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-while-import-then-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-while-import-then-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/syntax-nested-block-labeled-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/syntax-nested-block-labeled-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/syntax-nested-block-labeled-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/syntax-nested-block-labeled-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/syntax-nested-block-labeled-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/syntax-nested-block-labeled-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/top-level-import-then-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/top-level-import-then-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/top-level-import-then-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/top-level-import-then-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/top-level-import-then-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/top-level-import-then-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-dynamic-import-rejection.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/await-dynamic-import-resolution.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/dynamic-import-rejection.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/dynamic-import-resolution.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/await-expr-dyn-import.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/catch-parameter.js\"><reason></reason></test>\n  <test id=\"language/module-code/verify-dfs.js\"><reason></reason></test>\n  <!-- END - ES2020: Dynamic Import -->\n\n  <!-- ES2018: Asynchronous Iteration\n       features: [async-iteration]\n       https://github.com/tc39/proposal-async-iteration\n   -->\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/next/absent-value-not-passed.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/next/iterator-result-poisoned-done.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/next/iterator-result-poisoned-value.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/next/iterator-result-prototype.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/next/iterator-result-rejected.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/next/iterator-result-unwrap-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/absent-value-not-passed.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/iterator-result-poisoned-done.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/iterator-result-poisoned-value.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/iterator-result-unwrap-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/iterator-result.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/poisoned-get-return.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/poisoned-return.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/result-object-error.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/return-null.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/return/return-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-poisoned-done.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-poisoned-value.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/throw/poisoned-get-throw.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/throw/poisoned-throw.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/throw/result-object-error.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/throw/throw-null.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFromSyncIteratorPrototype/throw/throw-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorFunction/instance-await-expr-in-param.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorFunction/instance-yield-expr-in-param.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/next/request-queue-await-order.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/next/request-queue-promise-resolve-order.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/next/this-val-not-async-generator.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/next/this-val-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/return/return-state-completed.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/return/return-suspendedStart-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/return/return-suspendedYield-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/return/this-val-not-async-generator.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/return/this-val-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/throw/this-val-not-async-generator.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncGeneratorPrototype/throw/this-val-not-object.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined-with-gc.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/AsyncGenerator.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-generator-declaration.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-generator-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-generator-method-class-expression-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-generator-method-class-expression.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-generator-method-class-statement-static.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-generator-method-class-statement.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/async-generator-method-object.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-async-generator-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/prototype/toString/proxy-async-generator-method-definition.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-decl-async-private-gen-meth-static-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-multiple.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-null.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-single-args.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-spread-operator.js\"><reason></reason></test>\n  <test id=\"language/arguments-object/cls-expr-async-private-gen-meth-static-args-trailing-comma-undefined.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js\"><reason></reason></test>\n  <test id=\"language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/named-yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-star-getiter-async-return-method-is-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-star-getiter-async-throw-method-is-null.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-thenable-create-resolving-functions-reject.js\"><reason></reason></test>\n  <test id=\"language/expressions/async-generator/yield-thenable-create-resolving-functions-resolve.js\"><reason></reason></test>\n  <test id=\"language/expressions/await/for-await-of-interleaved.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method-static/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/async-gen-method/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/after-same-line-static-async-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-async-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-async-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-async-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-expr-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-call-done-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-call-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-call-value-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-non-object-ignores-then.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-not-callable-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-boolean-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-null-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-number-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-object-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-string-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-symbol-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-undefined-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-next-then-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method-static/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-async-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-async-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-async-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-expr-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-call-done-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-call-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-call-value-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-non-object-ignores-then.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-null-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-not-callable-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-boolean-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-null-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-number-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-object-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-string-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-symbol-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-non-callable-undefined-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-next-then-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/async-gen-private-method/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/private-methods/prod-private-async-generator.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/same-line-async-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/elements/syntax/valid/grammar-static-private-async-gen-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-await-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-eval-rqstd-abrupt-typeerror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-eval-rqstd-abrupt-urierror.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-eval-script-code-target.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-file-does-not-exist.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-instn-iee-err-ambiguous-import.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-instn-iee-err-circular.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/catch/nested-async-gen-return-await-specifier-tostring-abrupt-rejects.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/for-await-resolution-and-error-agen-yield.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/for-await-resolution-and-error-agen.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-gen-await-empty-str-is-valid-assign-expr.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-gen-await-nested-imports.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/syntax/valid/nested-async-gen-await-script-code-valid.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-await-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-eval-gtbndng-indirect-update-dflt.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-eval-gtbndng-indirect-update.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-eval-script-code-host-resolves-module-code.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-is-call-expression-square-brackets.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-returns-thenable.js\"><reason></reason></test>\n  <test id=\"language/expressions/dynamic-import/usage/nested-async-gen-return-await-specifier-tostring.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-meth-eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/expressions/object/method-definition/async-gen-yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-array-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-func-expression.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-identifier.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-literal-number.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-literal-string.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-nested.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-new-expr.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-null.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-obj-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-regexp.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-template-literal.js\"><reason></reason></test>\n  <test id=\"language/module-code/top-level-await/syntax/for-await-await-expr-this.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/dstr/dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/eval-var-scope-syntax-err.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/return-undefined-implicit-and-explicit.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-return-then-getter-ticks.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-star-async-from-sync-iterator-inaccessible.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-star-return-then-getter-ticks.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/statements/async-generator/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method-static/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/async-gen-method/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-init-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-init-iter-no-close.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-name-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elem-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-empty-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-ary-rest-iter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-hole.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-init-undef.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-complete.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-done.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-id-iter-val.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elem-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elision-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-elem.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-ary-rest.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id-elision.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id-exhausted.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-obj-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-ary-ptrn-rest-obj-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-dflt-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-empty.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-arrow.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-class.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-cover.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-fn.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-fn-name-gen.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-init-skipped.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id-trailing-comma.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-id.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-obj-init.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-prop-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-skip-non-enumerable.js\"><reason></reason></test>\n  <test id=\"language/statements/class/dstr/async-private-gen-meth-static-obj-ptrn-rest-val-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/after-same-line-static-async-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-async-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-async-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-async-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-expr-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-done-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-value-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-non-object-ignores-then.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-boolean-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-null-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-number-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-object-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-string-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-symbol-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-undefined-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method-static/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-catch.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-async-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-sync-iterator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-promise-reject-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-spread-arr-multiple.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-spread-arr-single.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-spread-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-async-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-async-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-async-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-expr-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-null-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-undefined-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-call-done-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-call-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-call-value-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-non-object-ignores-then.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-boolean-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-null-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-number-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-object-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-string-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-symbol-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-undefined-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-get-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-boolean-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-null-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-number-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-object-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-string-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-symbol-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-undefined-fulfillpromise.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-next-then-returns-abrupt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-sync-next.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-sync-return.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/async-gen-private-method/yield-star-sync-throw.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/private-methods/prod-private-async-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-private-field-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-private-method-getter-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-private-method-usage.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-private-names.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-getter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-getter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-method-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-method.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-setter-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-private-setter.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-static-private-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-static-private-methods-with-fields.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/same-line-async-gen-static-private-methods.js\"><reason></reason></test>\n  <test id=\"language/statements/class/elements/syntax/valid/grammar-static-private-async-gen-meth-prototype.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-from-sync-iterator-continuation-abrupt-completion-get-constructor.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-init-simple-no-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-init-yield-ident-invalid.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-nested-array-invalid.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-nested-array-yield-ident-invalid.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-nested-obj-invalid.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-nested-obj-yield-ident-invalid.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-put-prop-ref-user-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-put-unresolvable-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-target-simple-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-target-yield-invalid.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-obj-id-init-simple-no-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-decl-dstr-obj-id-simple-no-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-init-iter-get-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-elem-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-elem-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-elem-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-elem-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-elision-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-elision-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-id-elision-next-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-id-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-async-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-async-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-async-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-async-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-async-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-async-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-obj-ptrn-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-obj-ptrn-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-obj-ptrn-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-obj-ptrn-list-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-obj-ptrn-prop-eval-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-obj-ptrn-prop-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-obj-ptrn-prop-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-const-obj-ptrn-prop-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-init-iter-get-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-elem-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-elem-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-elem-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-elem-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-elision-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-elision-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-id-elision-next-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-id-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-async-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-async-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-async-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-async-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-async-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-async-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-obj-ptrn-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-obj-ptrn-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-obj-ptrn-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-obj-ptrn-list-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-obj-ptrn-prop-eval-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-obj-ptrn-prop-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-obj-ptrn-prop-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-let-obj-ptrn-prop-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-init-iter-get-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-elem-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-elem-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-elem-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-elem-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-elision-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-elision-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-id-elision-next-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-id-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-async-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-async-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-async-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-async-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-async-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-async-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-obj-ptrn-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-obj-ptrn-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-obj-ptrn-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-obj-ptrn-list-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-obj-ptrn-prop-eval-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-obj-ptrn-prop-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-obj-ptrn-prop-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-func-dstr-var-obj-ptrn-prop-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-init-simple-no-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-init-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-get-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-nrml-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-nrml-close-null.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-thrw-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-nested-array-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-nested-obj-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-put-prop-ref-user-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-put-unresolvable-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-target-simple-no-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-target-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-list-nrml-close-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-list-thrw-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-rest-nrml-close-skip.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-rest-nested-array-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-rest-nested-obj-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-array-rest-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-obj-id-init-simple-no-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-obj-id-init-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-obj-id-simple-no-strict.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-obj-prop-elem-init-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-obj-prop-elem-target-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-obj-prop-nested-array-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-decl-dstr-obj-prop-nested-obj-yield-expr.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-init-iter-get-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elem-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elem-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elem-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elem-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elision-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elision-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-elision-next-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-async-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-async-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-async-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-async-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-async-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-async-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-list-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-prop-eval-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-prop-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-prop-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-prop-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-init-iter-get-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elem-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elem-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elem-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elem-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elision-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elision-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-elision-next-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-async-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-async-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-async-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-async-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-async-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-async-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-list-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-prop-eval-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-prop-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-prop-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-prop-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-init-iter-get-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elem-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elem-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elem-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elem-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elision-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elision-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-elision-next-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-iter-close.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-iter-step-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-iter-val-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-async-ary-ptrn-rest-init-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-async-ary-ptrn-rest-init-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-async-ary-ptrn-rest-init-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-async-ary-ptrn-rest-not-final-ary.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-async-ary-ptrn-rest-not-final-id.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-async-ary-ptrn-rest-not-final-obj.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-list-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-prop-eval-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-prop-id-get-value-err.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-prop-id-init-throws.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-prop-id-init-unresolvable.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/head-const-init.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/head-let-init.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/head-var-init.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/let-block-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/let-identifier-with-newline.js\"><reason></reason></test>\n  <test id=\"language/statements/for-await-of/ticks-with-sync-iter-resolved-promise-and-constructor-lookup.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js\"><reason></reason></test>\n  <test id=\"language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js\"><reason></reason></test>\n  <!-- END - ES2018: Asynchronous Iteration -->\n\n  <!-- ES2020 - Promise.allSettled\n       features: [Promise.allSettled]\n       https://github.com/tc39/proposal-promise-allSettled\n  -->\n  <test id=\"built-ins/Promise/allSettled/call-resolve-element-after-return.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/call-resolve-element-items.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/call-resolve-element.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/capability-executor-called-twice.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/capability-executor-not-callable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/capability-resolve-throws-no-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/capability-resolve-throws-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/ctx-ctor-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/ctx-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/does-not-invoke-array-setters.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-error-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-error-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-get-error-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-get-error.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-get-once-multiple-calls.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-get-once-no-calls.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-on-promises-every-iteration-of-custom.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-on-promises-every-iteration-of-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-on-values-every-iteration-of-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve-return.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-resolve.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-then-error-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-then-error-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-then-get-error-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-then-get-error-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/invoke-then.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/is-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-arg-is-false-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-arg-is-null-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-arg-is-number-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-arg-is-poisoned.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-arg-is-string-resolve.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-arg-is-symbol-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-arg-is-true-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-arg-is-undefined-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-assigned-false-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-assigned-null-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-assigned-number-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-assigned-string-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-assigned-symbol-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-assigned-true-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-assigned-undefined-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-next-err-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-next-val-err-no-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-next-val-err-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-returns-false-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-returns-null-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-returns-number-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-returns-string-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-returns-symbol-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-returns-true-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-returns-undefined-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-step-err-no-close.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/iter-step-err-reject.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/length.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/name.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/new-reject-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/new-resolve-function.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/prop-desc.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-deferred.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-element-function-extensible.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-element-function-length.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-element-function-multiple-calls.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-element-function-name.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-element-function-nonconstructor.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-element-function-prototype.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-ignored-deferred.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-ignored-immed.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/reject-immed.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-before-loop-exit-from-same.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-before-loop-exit.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-element-function-extensible.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-element-function-length.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-element-function-name.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-element-function-nonconstructor.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-element-function-prototype.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-from-same-thenable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-ignores-late-rejection-deferred.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-ignores-late-rejection.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-non-callable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-non-thenable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-not-callable-reject-with-typeerror.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-poisoned-then.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolve-thenable.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolved-all-fulfilled.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolved-all-mixed.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolved-all-rejected.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolved-immed.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolved-sequence-extra-ticks.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolved-sequence-mixed.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolved-sequence-with-rejections.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolved-sequence.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolved-then-catch-finally.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolves-empty-array.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/resolves-to-array.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/returns-promise.js\"><reason></reason></test>\n  <test id=\"built-ins/Promise/allSettled/species-get-error.js\"><reason></reason></test>\n  <!-- END - ES2020 - Promise.allSettled -->\n\n  <!-- Missing test262 support in JerryScript REPL - missing $262 object\n       https://github.com/tc39/test262/blob/main/INTERPRETING.md#host-defined-functions\n  -->\n  <test id=\"annexB/built-ins/Array/from/iterator-method-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/match/custom-matcher-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/matchAll/custom-matcher-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/replace/custom-replacer-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/replaceAll/custom-replacer-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/search/custom-searcher-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/String/prototype/split/custom-splitter-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/built-ins/TypedArrayConstructors/from/iterator-method-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/language/expressions/assignment/dstr/array-pattern-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/language/expressions/assignment/dstr/object-pattern-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/language/expressions/yield/star-iterable-return-emulates-undefined-throws-when-called.js\"><reason></reason></test>\n  <test id=\"annexB/language/expressions/yield/star-iterable-throw-emulates-undefined-throws-when-called.js\"><reason></reason></test>\n  <test id=\"annexB/language/statements/class/subclass/superclass-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/language/statements/const/dstr/array-pattern-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/language/statements/const/dstr/object-pattern-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"annexB/language/statements/for-of/iterator-close-return-emulates-undefined-throws-when-called.js\"><reason></reason></test>\n  <test id=\"annexB/language/statements/function/default-parameters-emulates-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/AsyncFunction/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/bigint/notify-all-on-loc.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-defaults-to-infinity-missing.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/count-defaults-to-infinity-undefined.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/negative-count.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-all-on-loc.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-all.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-in-order-one-time.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-in-order.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-nan.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-one.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-renotify-noop.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-two.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-with-no-agents-waiting.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-with-no-matching-agents-waiting.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/notify-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/undefined-index-defaults-to-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/nan-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/waiterlist-order-of-operations-is-fifo.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/nan-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/null-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/object-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/poisoned-object-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-index-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/symbol-for-value-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/true-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/undefined-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/undefined-index-defaults-to-zero.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/wait-index-value-not-equal.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/waiterlist-order-of-operations-is-fifo.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/nan-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/null-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/object-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/poisoned-object-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-index-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/symbol-for-value-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/true-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/undefined-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/undefined-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/undefined-index-defaults-to-zero-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/value-not-equal-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/false-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/good-views.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/nan-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/negative-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-no-operation.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-add.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-and.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-compareExchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-exchange.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-or.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-store.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-sub.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/no-spurious-wakeup-on-xor.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/null-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/object-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/poisoned-object-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-index-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-timeout-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/symbol-for-value-throws-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/true-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/undefined-for-timeout-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/undefined-for-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/undefined-index-defaults-to-zero-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/value-not-equal-agent.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/waiterlist-block-indexedposition-wake.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/was-woken-before-timeout.js\"><reason></reason></test>\n  <test id=\"built-ins/DataView/proto-from-ctor-realm-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/gc-has-one-chance-to-call-cleanupCallback.js\"><reason></reason></test>\n  <test id=\"built-ins/FinalizationRegistry/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/Function/internals/Call/class-ctor-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/NativeErrors/AggregateError/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/dotAll/cross-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/global/cross-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/ignoreCase/cross-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/multiline/cross-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/source/cross-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/sticky/cross-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/RegExp/prototype/unicode/cross-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/SharedArrayBuffer/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm-sab.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/WeakRef/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"intl402/Collator/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"intl402/DateTimeFormat/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"intl402/DisplayNames/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"intl402/ListFormat/constructor/constructor/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"intl402/Locale/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"intl402/NumberFormat/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"intl402/PluralRules/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"intl402/RelativeTimeFormat/constructor/constructor/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"intl402/Segmenter/constructor/constructor/proto-from-ctor-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/eval-realm-indirect.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-cross-realm-class-construct.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-cross-realm-class-derived-construct.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-cross-realm-fun-call.js\"><reason></reason></test>\n  <test id=\"language/expressions/call/tco-cross-realm-fun-construct.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-realm-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-realm-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-realm-function-ctor.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-field-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-getter-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-method-brand-check-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/expressions/class/private-static-setter-multiple-evaluations-of-class-realm.js\"><reason></reason></test>\n  <test id=\"language/global-code/script-decl-func-err-non-configurable.js\"><reason></reason></test>\n  <test id=\"language/global-code/script-decl-func-err-non-extensible.js\"><reason></reason></test>\n  <test id=\"language/global-code/script-decl-func.js\"><reason></reason></test>\n  <test id=\"language/global-code/script-decl-lex-deletion.js\"><reason></reason></test>\n  <test id=\"language/global-code/script-decl-lex-restricted-global.js\"><reason></reason></test>\n  <test id=\"language/global-code/script-decl-lex.js\"><reason></reason></test>\n  <test id=\"language/global-code/script-decl-var-err.js\"><reason></reason></test>\n  <!-- Missing test262 support in JerryScript REPL - missing $262 object -->\n\n  <!-- Missing test262 support in JerryScript REPL - missing $262.detachArrayBuffer function\n       https://github.com/tc39/test262/blob/main/INTERPRETING.md#host-defined-functions\n  -->\n  <test id=\"built-ins/Atomics/notify/bigint/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/notify/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/bigint/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/wait/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/bigint/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/Atomics/waitAsync/null-bufferdata-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached-prototype.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/copyWithin/coerced-values-start-detached.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/every/BigInt/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/every/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/fill/coerced-end-detach.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/fill/coerced-start-detach.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/fill/coerced-value-detach.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/filter/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/find/BigInt/predicate-may-detach-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/find/predicate-may-detach-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/findIndex/predicate-may-detach-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/forEach/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/includes/detached-buffer-tointeger.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/map/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/reduce/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/reduceRight/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-other-targettype.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-same-targettype.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-get-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-speciesctor-get-species-custom-ctor-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-other-targettype.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-same-targettype.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/slice/detached-buffer-get-ctor.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/slice/detached-buffer-speciesctor-get-species-custom-ctor-throws.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/some/BigInt/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/some/callbackfn-detachbuffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/sort/BigInt/detached-buffer-comparefn.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/sort/detached-buffer-comparefn-coerce.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArray/prototype/sort/detached-buffer-comparefn.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/detached-when-species-retrieved-different-type.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/detached-when-species-retrieved-same-type.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/typedarray-arg/detached-when-species-retrieved-different-type.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/ctors/typedarray-arg/detached-when-species-retrieved-same-type.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/BigInt/infinity-detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Get/infinity-detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/enumerate-detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/GetOwnProperty/enumerate-detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/infinity-with-detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/HasProperty/infinity-with-detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/detached-buffer-realm.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/detached-buffer.js\"><reason></reason></test>\n  <test id=\"built-ins/TypedArrayConstructors/internals/Set/tonumber-value-detached-buffer.js\"><reason></reason></test>\n  <!-- END - Missing test262 support in JerryScript REPL - missing $262.detachArrayBuffer function -->\n\n</excludeList>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nproject (unit-core C)\n\nif (NOT IS_ABSOLUTE ${FEATURE_PROFILE})\n  set(FEATURE_PROFILE \"${CMAKE_SOURCE_DIR}/jerry-core/profiles/${FEATURE_PROFILE}.profile\")\nendif()\n\nif(${FEATURE_PROFILE} STREQUAL \"${CMAKE_SOURCE_DIR}/jerry-core/profiles/minimal.profile\")\n  message(FATAL_ERROR \"minimal profile isn't supported in unit-core\")\nendif()\n\n# Unit tests main modules\nset(SOURCE_UNIT_TEST_MAIN_MODULES\n  test-abort.c\n  test-api-binary-operations-arithmetics.c\n  test-api-binary-operations-comparisons.c\n  test-api-binary-operations-instanceof.c\n  test-api-errortype.c\n  test-api-functiontype.c\n  test-api-iteratortype.c\n  test-api-object-property-names.c\n  test-api-objecttype.c\n  test-api-promise.c\n  test-api-property.c\n  test-api-set-and-clear-error-flag.c\n  test-api-strings.c\n  test-api-value-type.c\n  test-api.c\n  test-arraybuffer.c\n  test-backtrace.c\n  test-bigint.c\n  test-container.c\n  test-context-data.c\n  test-dataview.c\n  test-date-helpers.c\n  test-exec-stop.c\n  test-external-string.c\n  test-from-property-descriptor.c\n  test-has-property.c\n  test-internal-properties.c\n  test-jmem.c\n  test-json.c\n  test-lit-char-helpers.c\n  test-literal-storage.c\n  test-mem-stats.c\n  test-native-callback-nested.c\n  test-native-instanceof.c\n  test-newtarget.c\n  test-number-converter.c\n  test-number-to-int32.c\n  test-number-to-string.c\n  test-objects-foreach.c\n  test-poolman.c\n  test-promise.c\n  test-proxy.c\n  test-realm.c\n  test-regexp-dotall-unicode.c\n  test-error-callback.c\n  test-regexp.c\n  test-regression-3588.c\n  test-resource-name.c\n  test-snapshot.c\n  test-string-to-number.c\n  test-stringbuilder.c\n  test-strings.c\n  test-symbol.c\n  test-to-integer.c\n  test-to-length.c\n  test-to-property-descriptor.c\n  test-typedarray.c\n  test-unicode.c\n)\n\n# jerry_heap_stats_t.size == 0 if system allocator is used.\nif(JERRY_SYSTEM_ALLOCATOR)\n  list(REMOVE_ITEM SOURCE_UNIT_TEST_MAIN_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/test-mem-stats.c)\nendif()\n\n# Unit tests declaration\nadd_custom_target(unittests-core)\n\nforeach(SOURCE_UNIT_TEST_MAIN ${SOURCE_UNIT_TEST_MAIN_MODULES})\n  get_filename_component(TARGET_NAME ${SOURCE_UNIT_TEST_MAIN} NAME_WE)\n  set(TARGET_NAME unit-${TARGET_NAME})\n\n  add_executable(${TARGET_NAME} ${SOURCE_UNIT_TEST_MAIN})\n  target_include_directories(${TARGET_NAME} PRIVATE ${INCLUDE_CORE_PRIVATE})\n  set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS \"${LINKER_FLAGS_COMMON}\")\n  set_property(TARGET ${TARGET_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/tests\")\n  target_link_libraries(${TARGET_NAME} jerry-core jerry-port-default)\n\n  add_dependencies(unittests-core ${TARGET_NAME})\nendforeach()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-abort.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nstatic jerry_value_t\ncallback_func (const jerry_value_t function_obj,\n               const jerry_value_t this_val,\n               const jerry_value_t args_p[],\n               const jerry_length_t args_count)\n{\n  JERRY_UNUSED (function_obj);\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_p);\n  JERRY_UNUSED (args_count);\n\n  jerry_value_t value = jerry_create_string ((jerry_char_t *) \"Abort run!\");\n  value = jerry_create_abort_from_value (value, true);\n  return value;\n} /* callback_func */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global = jerry_get_global_object ();\n  jerry_value_t callback_name = jerry_create_string ((jerry_char_t *) \"callback\");\n  jerry_value_t func = jerry_create_external_function (callback_func);\n  jerry_value_t res = jerry_set_property (global, callback_name, func);\n  TEST_ASSERT (!jerry_value_is_error (res));\n\n  jerry_release_value (res);\n  jerry_release_value (func);\n  jerry_release_value (callback_name);\n  jerry_release_value (global);\n\n  const jerry_char_t inf_loop_code_src1[] = TEST_STRING_LITERAL (\n    \"while(true) {\\n\"\n    \"  with ({}) {\\n\"\n    \"    try {\\n\"\n    \"      callback();\\n\"\n    \"    } catch (e) {\\n\"\n    \"    } finally {\\n\"\n    \"    }\\n\"\n    \"  }\\n\"\n    \"}\"\n  );\n\n  jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                               0,\n                                               inf_loop_code_src1,\n                                               sizeof (inf_loop_code_src1) - 1,\n                                               JERRY_PARSE_NO_OPTS);\n\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n  res = jerry_run (parsed_code_val);\n\n  TEST_ASSERT (jerry_value_is_abort (res));\n\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n\n  const jerry_char_t inf_loop_code_src2[] = TEST_STRING_LITERAL (\n    \"function f() {\"\n    \"  while(true) {\\n\"\n    \"    with ({}) {\\n\"\n    \"      try {\\n\"\n    \"        callback();\\n\"\n    \"      } catch (e) {\\n\"\n    \"      } finally {\\n\"\n    \"      }\\n\"\n    \"    }\\n\"\n    \"  }\"\n    \"}\\n\"\n    \"function g() {\\n\"\n    \"  for (a in { x:5 })\\n\"\n    \"    f();\\n\"\n    \"}\\n\"\n    \"\\n\"\n    \"with({})\\n\"\n    \" f();\\n\"\n  );\n\n  parsed_code_val = jerry_parse (NULL,\n                                 0,\n                                 inf_loop_code_src2,\n                                 sizeof (inf_loop_code_src2) - 1,\n                                 JERRY_PARSE_NO_OPTS);\n\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n  res = jerry_run (parsed_code_val);\n\n  TEST_ASSERT (jerry_value_is_abort (res));\n\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n\n  /* Test flag overwrites. */\n  jerry_value_t value = jerry_create_string ((jerry_char_t *) \"Error description\");\n  TEST_ASSERT (!jerry_value_is_abort (value));\n  TEST_ASSERT (!jerry_value_is_error (value));\n\n  value = jerry_create_abort_from_value (value, true);\n  TEST_ASSERT (jerry_value_is_abort (value));\n  TEST_ASSERT (jerry_value_is_error (value));\n\n  value = jerry_create_error_from_value (value, true);\n  TEST_ASSERT (!jerry_value_is_abort (value));\n  TEST_ASSERT (jerry_value_is_error (value));\n\n  value = jerry_create_abort_from_value (value, true);\n  TEST_ASSERT (jerry_value_is_abort (value));\n  TEST_ASSERT (jerry_value_is_error (value));\n\n  jerry_release_value (value);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-binary-operations-arithmetics.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\n#define T(op, lhs, rhs, res) \\\n  { op, lhs, rhs, res }\n\n#define T_NAN(op, lhs, rhs) \\\n  { op, lhs, rhs }\n\n#define T_ERR(op, lsh, rhs) \\\n  T_NAN (op, lsh, rhs)\n\n#define T_ARI(lhs, rhs) \\\n  T_NAN (JERRY_BIN_OP_SUB, lhs, rhs), \\\n  T_NAN (JERRY_BIN_OP_MUL, lhs, rhs), \\\n  T_NAN (JERRY_BIN_OP_DIV, lhs, rhs), \\\n  T_NAN (JERRY_BIN_OP_REM, lhs, rhs)\n\ntypedef struct\n{\n  jerry_binary_operation_t op;\n  jerry_value_t lhs;\n  jerry_value_t rhs;\n  jerry_value_t expected;\n} test_entry_t;\n\ntypedef struct\n{\n  jerry_binary_operation_t op;\n  jerry_value_t lhs;\n  jerry_value_t rhs;\n} test_nan_entry_t;\n\ntypedef test_nan_entry_t test_error_entry_t;\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t obj1 = jerry_eval ((const jerry_char_t *) \"o={x:1};o\", 9, JERRY_PARSE_NO_OPTS);\n  jerry_value_t obj2 = jerry_eval ((const jerry_char_t *) \"o={x:1};o\", 9, JERRY_PARSE_NO_OPTS);\n  jerry_value_t err1 = jerry_create_error (JERRY_ERROR_SYNTAX, (const jerry_char_t *) \"error\");\n\n  test_nan_entry_t test_nans[] =\n  {\n    /* Testing addition (+) */\n    T_NAN (JERRY_BIN_OP_ADD, jerry_create_number (3.1), jerry_create_undefined ()),\n    T_NAN (JERRY_BIN_OP_ADD, jerry_create_undefined (), jerry_create_undefined ()),\n    T_NAN (JERRY_BIN_OP_ADD, jerry_create_undefined (), jerry_create_null ()),\n\n    /* Testing subtraction (-), multiplication (*), division (/), remainder (%) */\n    T_ARI (jerry_create_number (3.1), jerry_create_undefined ()),\n    T_ARI (jerry_create_string ((const jerry_char_t *) \"foo\"), jerry_create_string ((const jerry_char_t *) \"bar\")),\n    T_ARI (jerry_create_string ((const jerry_char_t *) \"foo\"), jerry_create_undefined ()),\n    T_ARI (jerry_create_string ((const jerry_char_t *) \"foo\"), jerry_create_null ()),\n    T_ARI (jerry_create_string ((const jerry_char_t *) \"foo\"), jerry_create_number (5.0)),\n    T_ARI (jerry_create_undefined (), jerry_create_string ((const jerry_char_t *) \"foo\")),\n    T_ARI (jerry_create_null (), jerry_create_string ((const jerry_char_t *) \"foo\")),\n    T_ARI (jerry_create_number (5.0), jerry_create_string ((const jerry_char_t *) \"foo\")),\n    T_ARI (jerry_create_undefined (), jerry_create_undefined ()),\n    T_ARI (jerry_create_undefined (), jerry_create_null ()),\n    T_ARI (jerry_create_null (), jerry_create_undefined ()),\n    T_ARI (jerry_acquire_value (obj1), jerry_acquire_value (obj1)),\n    T_ARI (jerry_acquire_value (obj1), jerry_acquire_value (obj2)),\n    T_ARI (jerry_acquire_value (obj2), jerry_acquire_value (obj1)),\n    T_ARI (jerry_acquire_value (obj2), jerry_create_undefined ()),\n    T_ARI (jerry_acquire_value (obj1), jerry_create_string ((const jerry_char_t *) \"foo\")),\n    T_ARI (jerry_acquire_value (obj1), jerry_create_null ()),\n    T_ARI (jerry_acquire_value (obj1), jerry_create_boolean (true)),\n    T_ARI (jerry_acquire_value (obj1), jerry_create_boolean (false)),\n    T_ARI (jerry_acquire_value (obj1), jerry_create_number (5.0)),\n\n    /* Testing division (/) */\n    T_NAN (JERRY_BIN_OP_DIV, jerry_create_boolean (false), jerry_create_boolean (false)),\n    T_NAN (JERRY_BIN_OP_DIV, jerry_create_number (0.0), jerry_create_number (0.0)),\n    T_NAN (JERRY_BIN_OP_DIV, jerry_create_null (), jerry_create_null ()),\n\n    /* Testing remainder (%) */\n    T_NAN (JERRY_BIN_OP_REM, jerry_create_boolean (true), jerry_create_boolean (false)),\n    T_NAN (JERRY_BIN_OP_REM, jerry_create_boolean (false), jerry_create_boolean (false)),\n    T_NAN (JERRY_BIN_OP_REM, jerry_create_number (0.0), jerry_create_number (0.0)),\n    T_NAN (JERRY_BIN_OP_REM, jerry_create_null (), jerry_create_null ()),\n  };\n\n  for (uint32_t idx = 0; idx < sizeof (test_nans) / sizeof (test_nan_entry_t); idx++)\n  {\n    jerry_value_t result = jerry_binary_operation (test_nans[idx].op, test_nans[idx].lhs, test_nans[idx].rhs);\n    TEST_ASSERT (jerry_value_is_number (result));\n\n    double num = jerry_get_number_value (result);\n\n    TEST_ASSERT (num != num);\n\n    jerry_release_value (test_nans[idx].lhs);\n    jerry_release_value (test_nans[idx].rhs);\n    jerry_release_value (result);\n  }\n\n  test_entry_t tests[] =\n  {\n    /* Testing addition (+) */\n    T (JERRY_BIN_OP_ADD, jerry_create_number (5.0), jerry_create_number (5.0), jerry_create_number (10.0)),\n    T (JERRY_BIN_OP_ADD, jerry_create_number (3.1), jerry_create_number (10), jerry_create_number (13.1)),\n    T (JERRY_BIN_OP_ADD, jerry_create_number (3.1), jerry_create_boolean (true), jerry_create_number (4.1)),\n    T (JERRY_BIN_OP_ADD,\n       jerry_create_string ((const jerry_char_t *) \"foo\"),\n       jerry_create_string ((const jerry_char_t *) \"bar\"),\n       jerry_create_string ((const jerry_char_t *) \"foobar\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_create_string ((const jerry_char_t *) \"foo\"),\n       jerry_create_undefined (),\n       jerry_create_string ((const jerry_char_t *) \"fooundefined\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_create_string ((const jerry_char_t *) \"foo\"),\n       jerry_create_null (),\n       jerry_create_string ((const jerry_char_t *) \"foonull\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_create_string ((const jerry_char_t *) \"foo\"),\n       jerry_create_number (5.0),\n       jerry_create_string ((const jerry_char_t *) \"foo5\")),\n\n    T (JERRY_BIN_OP_ADD, jerry_create_null (), jerry_create_null (), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_ADD, jerry_create_boolean (true), jerry_create_boolean (true), jerry_create_number (2.0)),\n    T (JERRY_BIN_OP_ADD, jerry_create_boolean (true), jerry_create_boolean (false), jerry_create_number (1.0)),\n    T (JERRY_BIN_OP_ADD, jerry_create_boolean (false), jerry_create_boolean (true), jerry_create_number (1.0)),\n    T (JERRY_BIN_OP_ADD, jerry_create_boolean (false), jerry_create_boolean (false), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_ADD,\n       jerry_acquire_value (obj1),\n       jerry_acquire_value (obj1),\n       jerry_create_string ((const jerry_char_t *) \"[object Object][object Object]\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_acquire_value (obj1),\n       jerry_acquire_value (obj2),\n       jerry_create_string ((const jerry_char_t *) \"[object Object][object Object]\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_acquire_value (obj2),\n       jerry_acquire_value (obj1),\n       jerry_create_string ((const jerry_char_t *) \"[object Object][object Object]\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_acquire_value (obj1),\n       jerry_create_null (),\n       jerry_create_string ((const jerry_char_t *) \"[object Object]null\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_acquire_value (obj1),\n       jerry_create_undefined (),\n       jerry_create_string ((const jerry_char_t *) \"[object Object]undefined\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_acquire_value (obj1),\n       jerry_create_boolean (true),\n       jerry_create_string ((const jerry_char_t *) \"[object Object]true\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_acquire_value (obj1),\n       jerry_create_boolean (false),\n       jerry_create_string ((const jerry_char_t *) \"[object Object]false\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_acquire_value (obj1),\n       jerry_create_number (5.0),\n       jerry_create_string ((const jerry_char_t *) \"[object Object]5\")),\n    T (JERRY_BIN_OP_ADD,\n       jerry_acquire_value (obj1),\n       jerry_create_string ((const jerry_char_t *) \"foo\"),\n       jerry_create_string ((const jerry_char_t *) \"[object Object]foo\")),\n\n    /* Testing subtraction (-) */\n    T (JERRY_BIN_OP_SUB, jerry_create_number (5.0), jerry_create_number (5.0), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_SUB, jerry_create_number (3.1), jerry_create_number (10), jerry_create_number (-6.9)),\n    T (JERRY_BIN_OP_SUB, jerry_create_number (3.1), jerry_create_boolean (true), jerry_create_number (2.1)),\n    T (JERRY_BIN_OP_SUB, jerry_create_boolean (true), jerry_create_boolean (true), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_SUB, jerry_create_boolean (true), jerry_create_boolean (false), jerry_create_number (1.0)),\n    T (JERRY_BIN_OP_SUB, jerry_create_boolean (false), jerry_create_boolean (true), jerry_create_number (-1.0)),\n    T (JERRY_BIN_OP_SUB, jerry_create_boolean (false), jerry_create_boolean (false), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_SUB, jerry_create_null (), jerry_create_null (), jerry_create_number (-0.0)),\n\n    /* Testing multiplication (*) */\n    T (JERRY_BIN_OP_MUL, jerry_create_number (5.0), jerry_create_number (5.0), jerry_create_number (25.0)),\n    T (JERRY_BIN_OP_MUL, jerry_create_number (3.1), jerry_create_number (10), jerry_create_number (31)),\n    T (JERRY_BIN_OP_MUL, jerry_create_number (3.1), jerry_create_boolean (true), jerry_create_number (3.1)),\n    T (JERRY_BIN_OP_MUL, jerry_create_boolean (true), jerry_create_boolean (true), jerry_create_number (1.0)),\n    T (JERRY_BIN_OP_MUL, jerry_create_boolean (true), jerry_create_boolean (false), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_MUL, jerry_create_boolean (false), jerry_create_boolean (true), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_MUL, jerry_create_boolean (false), jerry_create_boolean (false), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_MUL, jerry_create_null (), jerry_create_null (), jerry_create_number (0.0)),\n\n    /* Testing division (/) */\n    T (JERRY_BIN_OP_DIV, jerry_create_number (5.0), jerry_create_number (5.0), jerry_create_number (1.0)),\n    T (JERRY_BIN_OP_DIV, jerry_create_number (3.1), jerry_create_number (10), jerry_create_number (0.31)),\n    T (JERRY_BIN_OP_DIV, jerry_create_number (3.1), jerry_create_boolean (true), jerry_create_number (3.1)),\n    T (JERRY_BIN_OP_DIV, jerry_create_boolean (true), jerry_create_boolean (true), jerry_create_number (1.0)),\n    T (JERRY_BIN_OP_DIV,\n       jerry_create_boolean (true),\n       jerry_create_boolean (false),\n       jerry_create_number_infinity (false)),\n    T (JERRY_BIN_OP_DIV, jerry_create_boolean (false), jerry_create_boolean (true), jerry_create_number (0.0)),\n\n    /* Testing remainder (%) */\n    T (JERRY_BIN_OP_REM, jerry_create_number (5.0), jerry_create_number (5.0), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_REM, jerry_create_number (5.0), jerry_create_number (2.0), jerry_create_number (1.0)),\n    T (JERRY_BIN_OP_REM, jerry_create_number (3.1), jerry_create_number (10), jerry_create_number (3.1)),\n    T (JERRY_BIN_OP_REM,\n       jerry_create_number (3.1),\n       jerry_create_boolean (true),\n       jerry_create_number (0.10000000000000009)),\n    T (JERRY_BIN_OP_REM, jerry_create_boolean (true), jerry_create_boolean (true), jerry_create_number (0.0)),\n    T (JERRY_BIN_OP_REM, jerry_create_boolean (false), jerry_create_boolean (true), jerry_create_number (0.0)),\n\n  };\n\n  for (uint32_t idx = 0; idx < sizeof (tests) / sizeof (test_entry_t); idx++)\n  {\n    jerry_value_t result = jerry_binary_operation (tests[idx].op, tests[idx].lhs, tests[idx].rhs);\n    TEST_ASSERT (!jerry_value_is_error (result));\n\n    jerry_value_t equals = jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, result, tests[idx].expected);\n    TEST_ASSERT (jerry_value_is_boolean (equals) && jerry_get_boolean_value (equals));\n    jerry_release_value (equals);\n\n    jerry_release_value (tests[idx].lhs);\n    jerry_release_value (tests[idx].rhs);\n    jerry_release_value (tests[idx].expected);\n    jerry_release_value (result);\n  }\n\n  jerry_value_t obj3 = jerry_eval ((const jerry_char_t *) \"o={valueOf:function(){throw 5}};o\", 33, JERRY_PARSE_NO_OPTS);\n\n  test_error_entry_t error_tests[] =\n  {\n    /* Testing addition (+) */\n    T_ERR (JERRY_BIN_OP_ADD, jerry_acquire_value (err1), jerry_acquire_value (err1)),\n    T_ERR (JERRY_BIN_OP_ADD, jerry_acquire_value (err1), jerry_create_undefined ()),\n    T_ERR (JERRY_BIN_OP_ADD, jerry_create_undefined (), jerry_acquire_value (err1)),\n\n    /* Testing subtraction (-), multiplication (*), division (/), remainder (%) */\n    T_ARI (jerry_acquire_value (err1), jerry_acquire_value (err1)),\n    T_ARI (jerry_acquire_value (err1), jerry_create_undefined ()),\n    T_ARI (jerry_create_undefined (), jerry_acquire_value (err1)),\n\n    /* Testing addition (+) */\n    T_ERR (JERRY_BIN_OP_ADD, jerry_acquire_value (obj3), jerry_create_undefined ()),\n    T_ERR (JERRY_BIN_OP_ADD, jerry_acquire_value (obj3), jerry_create_null ()),\n    T_ERR (JERRY_BIN_OP_ADD, jerry_acquire_value (obj3), jerry_create_boolean (true)),\n    T_ERR (JERRY_BIN_OP_ADD, jerry_acquire_value (obj3), jerry_create_boolean (false)),\n    T_ERR (JERRY_BIN_OP_ADD, jerry_acquire_value (obj3), jerry_acquire_value (obj2)),\n    T_ERR (JERRY_BIN_OP_ADD, jerry_acquire_value (obj3), jerry_create_string ((const jerry_char_t *) \"foo\")),\n\n    /* Testing subtraction (-), multiplication (*), division (/), remainder (%) */\n    T_ARI (jerry_acquire_value (obj3), jerry_create_undefined ()),\n    T_ARI (jerry_acquire_value (obj3), jerry_create_null ()),\n    T_ARI (jerry_acquire_value (obj3), jerry_create_boolean (true)),\n    T_ARI (jerry_acquire_value (obj3), jerry_create_boolean (false)),\n    T_ARI (jerry_acquire_value (obj3), jerry_acquire_value (obj2)),\n    T_ARI (jerry_acquire_value (obj3), jerry_create_string ((const jerry_char_t *) \"foo\")),\n  };\n\n  for (uint32_t idx = 0; idx < sizeof (error_tests) / sizeof (test_error_entry_t); idx++)\n  {\n    jerry_value_t result = jerry_binary_operation (tests[idx].op, error_tests[idx].lhs, error_tests[idx].rhs);\n    TEST_ASSERT (jerry_value_is_error (result));\n    jerry_release_value (error_tests[idx].lhs);\n    jerry_release_value (error_tests[idx].rhs);\n    jerry_release_value (result);\n  }\n\n  jerry_release_value (obj1);\n  jerry_release_value (obj2);\n  jerry_release_value (obj3);\n  jerry_release_value (err1);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-binary-operations-comparisons.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\n#define T(op, lhs, rhs, res) \\\n  { op, lhs, rhs, res }\n\ntypedef struct\n{\n  jerry_binary_operation_t op;\n  jerry_value_t lhs;\n  jerry_value_t rhs;\n  bool expected;\n} test_entry_t;\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t obj1 = jerry_eval ((const jerry_char_t *) \"o={x:1};o\", 9, JERRY_PARSE_NO_OPTS);\n  jerry_value_t obj2 = jerry_eval ((const jerry_char_t *) \"o={x:1};o\", 9, JERRY_PARSE_NO_OPTS);\n  jerry_value_t err1 = jerry_create_error (JERRY_ERROR_SYNTAX, (const jerry_char_t *) \"error\");\n\n  test_entry_t tests[] =\n  {\n    /* Testing strict equal comparison */\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_number (5.0), jerry_create_number (5.0), true),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_number (3.1), jerry_create_number (10), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_number (3.1), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_number (3.1), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       true),\n    T (JERRY_BIN_OP_STRICT_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       jerry_create_undefined (),\n       false),\n    T (JERRY_BIN_OP_STRICT_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       jerry_create_null (),\n       false),\n    T (JERRY_BIN_OP_STRICT_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       jerry_create_number (5.0),\n       false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_undefined (), jerry_create_undefined (), true),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_undefined (), jerry_create_null (), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_null (), jerry_create_null (), true),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_boolean (true), jerry_create_boolean (true), true),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_boolean (true), jerry_create_boolean (false), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_boolean (false), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_boolean (false), jerry_create_boolean (false), true),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (obj1), jerry_acquire_value (obj1), true),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (obj1), jerry_acquire_value (obj2), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (obj2), jerry_acquire_value (obj1), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (obj1), jerry_create_null (), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (obj1), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (obj1), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (obj1), jerry_create_boolean (false), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (obj1), jerry_create_number (5.0), false),\n    T (JERRY_BIN_OP_STRICT_EQUAL,\n       jerry_acquire_value (obj1),\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       false),\n\n    /* Testing equal comparison */\n    T (JERRY_BIN_OP_EQUAL, jerry_create_number (5.0), jerry_create_number (5.0), true),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_number (3.1), jerry_create_number (10), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_number (3.1), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_number (3.1), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       true),\n    T (JERRY_BIN_OP_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       jerry_create_undefined (),\n       false),\n    T (JERRY_BIN_OP_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       jerry_create_null (),\n       false),\n    T (JERRY_BIN_OP_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       jerry_create_number (5.0),\n       false),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_undefined (), jerry_create_undefined (), true),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_undefined (), jerry_create_null (), true),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_null (), jerry_create_null (), true),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_boolean (true), jerry_create_boolean (true), true),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_boolean (true), jerry_create_boolean (false), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_boolean (false), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_create_boolean (false), jerry_create_boolean (false), true),\n    T (JERRY_BIN_OP_EQUAL, jerry_acquire_value (obj1), jerry_acquire_value (obj1), true),\n    T (JERRY_BIN_OP_EQUAL, jerry_acquire_value (obj1), jerry_acquire_value (obj2), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_acquire_value (obj2), jerry_acquire_value (obj1), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_acquire_value (obj1), jerry_create_null (), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_acquire_value (obj1), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_acquire_value (obj1), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_acquire_value (obj1), jerry_create_boolean (false), false),\n    T (JERRY_BIN_OP_EQUAL, jerry_acquire_value (obj1), jerry_create_number (5.0), false),\n    T (JERRY_BIN_OP_EQUAL,\n       jerry_acquire_value (obj1),\n       jerry_create_string ((const jerry_char_t *) \"example string\"),\n       false),\n\n    /* Testing less comparison */\n    T (JERRY_BIN_OP_LESS, jerry_create_number (5.0), jerry_create_number (5.0), false),\n    T (JERRY_BIN_OP_LESS, jerry_create_number (3.1), jerry_create_number (10), true),\n    T (JERRY_BIN_OP_LESS, jerry_create_number (3.1), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_LESS, jerry_create_number (3.1), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_LESS,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_string ((const jerry_char_t *) \"2\"),\n       true),\n    T (JERRY_BIN_OP_LESS,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_undefined (),\n       false),\n    T (JERRY_BIN_OP_LESS,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_null (),\n       false),\n    T (JERRY_BIN_OP_LESS,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_number (5.0),\n       true),\n    T (JERRY_BIN_OP_LESS, jerry_create_undefined (), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_LESS, jerry_create_undefined (), jerry_create_null (), false),\n    T (JERRY_BIN_OP_LESS, jerry_create_null (), jerry_create_null (), false),\n    T (JERRY_BIN_OP_LESS, jerry_create_boolean (true), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_LESS, jerry_create_boolean (true), jerry_create_boolean (false), false),\n    T (JERRY_BIN_OP_LESS, jerry_create_boolean (false), jerry_create_boolean (true), true),\n    T (JERRY_BIN_OP_LESS, jerry_create_boolean (false), jerry_create_boolean (false), false),\n\n    /* Testing less or equal comparison */\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_number (5.0), jerry_create_number (5.0), true),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_number (5.1), jerry_create_number (5.0), false),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_number (3.1), jerry_create_number (10), true),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_number (3.1), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_number (3.1), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_LESS_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_string ((const jerry_char_t *) \"2\"),\n       true),\n    T (JERRY_BIN_OP_LESS_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       true),\n    T (JERRY_BIN_OP_LESS_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_undefined (),\n       false),\n    T (JERRY_BIN_OP_LESS_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_null (),\n       false),\n    T (JERRY_BIN_OP_LESS_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_number (5.0),\n       true),\n    T (JERRY_BIN_OP_LESS_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"5.0\"),\n       jerry_create_number (5.0),\n       true),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_undefined (), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_undefined (), jerry_create_null (), false),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_null (), jerry_create_null (), true),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_boolean (true), jerry_create_boolean (true), true),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_boolean (true), jerry_create_boolean (false), false),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_boolean (false), jerry_create_boolean (true), true),\n    T (JERRY_BIN_OP_LESS_EQUAL, jerry_create_boolean (false), jerry_create_boolean (false), true),\n\n    /* Testing greater comparison */\n    T (JERRY_BIN_OP_GREATER, jerry_create_number (5.0), jerry_create_number (5.0), false),\n    T (JERRY_BIN_OP_GREATER, jerry_create_number (10), jerry_create_number (3.1), true),\n    T (JERRY_BIN_OP_GREATER, jerry_create_number (3.1), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_GREATER, jerry_create_number (3.1), jerry_create_boolean (true), true),\n    T (JERRY_BIN_OP_GREATER,\n       jerry_create_string ((const jerry_char_t *) \"2\"),\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       true),\n    T (JERRY_BIN_OP_GREATER,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_string ((const jerry_char_t *) \"2\"),\n       false),\n    T (JERRY_BIN_OP_GREATER,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_undefined (),\n       false),\n    T (JERRY_BIN_OP_GREATER,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_null (),\n       true),\n    T (JERRY_BIN_OP_GREATER,\n       jerry_create_number (5.0),\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       true),\n    T (JERRY_BIN_OP_GREATER, jerry_create_undefined (), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_GREATER, jerry_create_undefined (), jerry_create_null (), false),\n    T (JERRY_BIN_OP_GREATER, jerry_create_null (), jerry_create_null (), false),\n    T (JERRY_BIN_OP_GREATER, jerry_create_boolean (true), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_GREATER, jerry_create_boolean (true), jerry_create_boolean (false), true),\n    T (JERRY_BIN_OP_GREATER, jerry_create_boolean (false), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_GREATER, jerry_create_boolean (false), jerry_create_boolean (false), false),\n\n    /* Testing greater or equal comparison */\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_number (5.0), jerry_create_number (5.0), true),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_number (5.0), jerry_create_number (5.1), false),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_number (10), jerry_create_number (3.1), true),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_number (3.1), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_number (3.1), jerry_create_boolean (true), true),\n    T (JERRY_BIN_OP_GREATER_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"2\"),\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       true),\n    T (JERRY_BIN_OP_GREATER_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       true),\n    T (JERRY_BIN_OP_GREATER_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_undefined (),\n       false),\n    T (JERRY_BIN_OP_GREATER_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       jerry_create_null (),\n       true),\n    T (JERRY_BIN_OP_GREATER_EQUAL,\n       jerry_create_number (5.0),\n       jerry_create_string ((const jerry_char_t *) \"1\"),\n       true),\n    T (JERRY_BIN_OP_GREATER_EQUAL,\n       jerry_create_string ((const jerry_char_t *) \"5.0\"),\n       jerry_create_number (5.0),\n       true),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_undefined (), jerry_create_undefined (), false),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_undefined (), jerry_create_null (), false),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_null (), jerry_create_null (), true),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_boolean (true), jerry_create_boolean (true), true),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_boolean (true), jerry_create_boolean (false), true),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_boolean (false), jerry_create_boolean (true), false),\n    T (JERRY_BIN_OP_GREATER_EQUAL, jerry_create_boolean (false), jerry_create_boolean (false), true),\n  };\n\n  for (uint32_t idx = 0; idx < sizeof (tests) / sizeof (test_entry_t); idx++)\n  {\n    jerry_value_t result = jerry_binary_operation (tests[idx].op, tests[idx].lhs, tests[idx].rhs);\n    TEST_ASSERT (!jerry_value_is_error (result));\n    TEST_ASSERT (jerry_get_boolean_value (result) == tests[idx].expected);\n    jerry_release_value (tests[idx].lhs);\n    jerry_release_value (tests[idx].rhs);\n    jerry_release_value (result);\n  }\n\n  test_entry_t error_tests[] =\n  {\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (err1), jerry_acquire_value (err1), true),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_acquire_value (err1), jerry_create_undefined (), true),\n    T (JERRY_BIN_OP_STRICT_EQUAL, jerry_create_undefined (), jerry_acquire_value (err1), true),\n  };\n\n  for (uint32_t idx = 0; idx < sizeof (error_tests) / sizeof (test_entry_t); idx++)\n  {\n    jerry_value_t result = jerry_binary_operation (tests[idx].op, error_tests[idx].lhs, error_tests[idx].rhs);\n    TEST_ASSERT (jerry_value_is_error (result) == error_tests[idx].expected);\n    jerry_release_value (error_tests[idx].lhs);\n    jerry_release_value (error_tests[idx].rhs);\n    jerry_release_value (result);\n  }\n\n  jerry_release_value (obj1);\n  jerry_release_value (obj2);\n  jerry_release_value (err1);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-binary-operations-instanceof.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\n#define T(lhs, rhs, res) \\\n  { lhs, rhs, res }\n\ntypedef struct\n{\n  jerry_value_t lhs;\n  jerry_value_t rhs;\n  bool expected;\n} test_entry_t;\n\nstatic jerry_value_t\nmy_constructor (const jerry_value_t func_val, /**< function */\n                const jerry_value_t this_val, /**< this */\n                const jerry_value_t argv[], /**< arguments */\n                const jerry_length_t argc) /**< number of arguments */\n{\n  (void) func_val;\n  (void) this_val;\n  (void) argv;\n  (void) argc;\n  return jerry_create_undefined ();\n} /* my_constructor */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t base_obj = jerry_create_object ();\n  jerry_value_t constructor = jerry_create_external_function (my_constructor);\n\n  jerry_value_t no_proto_instance_val = jerry_construct_object (constructor, NULL, 0);\n\n  jerry_value_t prototype_str = jerry_create_string ((const jerry_char_t *) \"prototype\");\n  jerry_value_t res = jerry_set_property (constructor, prototype_str, base_obj);\n  jerry_release_value (prototype_str);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  jerry_release_value (res);\n\n  jerry_value_t instance_val = jerry_construct_object (constructor, NULL, 0);\n\n  jerry_value_t error = jerry_create_error_from_value (base_obj, false);\n\n  test_entry_t bool_tests[] =\n  {\n    T (jerry_acquire_value (instance_val), jerry_acquire_value (constructor), true),\n    T (jerry_acquire_value (no_proto_instance_val), jerry_acquire_value (constructor), false),\n    T (jerry_acquire_value (base_obj), jerry_acquire_value (constructor), false)\n  };\n\n  for (uint32_t idx = 0; idx < sizeof (bool_tests) / sizeof (test_entry_t); idx++)\n  {\n    jerry_value_t result = jerry_binary_operation (JERRY_BIN_OP_INSTANCEOF,\n                                                   bool_tests[idx].lhs,\n                                                   bool_tests[idx].rhs);\n    TEST_ASSERT (!jerry_value_is_error (result));\n    TEST_ASSERT (jerry_get_boolean_value (result) == bool_tests[idx].expected);\n    jerry_release_value (bool_tests[idx].lhs);\n    jerry_release_value (bool_tests[idx].rhs);\n    jerry_release_value (result);\n  }\n\n  test_entry_t error_tests[] =\n  {\n    T (jerry_acquire_value (constructor), jerry_acquire_value (instance_val), true),\n    T (jerry_create_undefined (), jerry_acquire_value (constructor), true),\n    T (jerry_acquire_value (instance_val), jerry_create_undefined (), true),\n    T (jerry_acquire_value (instance_val), jerry_acquire_value (base_obj), true),\n    T (jerry_acquire_value (error), jerry_acquire_value (constructor), true),\n    T (jerry_acquire_value (instance_val), jerry_acquire_value (error), true),\n    T (jerry_create_string ((const jerry_char_t *) \"\"), jerry_create_string ((const jerry_char_t *) \"\"), true),\n    T (jerry_create_string ((const jerry_char_t *) \"\"), jerry_create_number (5.0), true),\n    T (jerry_create_number (5.0), jerry_create_string ((const jerry_char_t *) \"\"), true),\n    T (jerry_create_array (1), jerry_create_array (1), true),\n    T (jerry_create_array (1), jerry_create_object (), true),\n    T (jerry_create_object (), jerry_create_array (1), true),\n    T (jerry_create_null (), jerry_create_object (), true),\n    T (jerry_create_object (), jerry_create_string ((const jerry_char_t *) \"\"), true)\n  };\n\n  for (uint32_t idx = 0; idx < sizeof (error_tests) / sizeof (test_entry_t); idx++)\n  {\n    jerry_value_t result = jerry_binary_operation (JERRY_BIN_OP_INSTANCEOF,\n                                                   error_tests[idx].lhs,\n                                                   error_tests[idx].rhs);\n    TEST_ASSERT (jerry_value_is_error (result) == error_tests[idx].expected);\n    jerry_release_value (error_tests[idx].lhs);\n    jerry_release_value (error_tests[idx].rhs);\n    jerry_release_value (result);\n  }\n\n  jerry_release_value (base_obj);\n  jerry_release_value (constructor);\n  jerry_release_value (error);\n  jerry_release_value (instance_val);\n  jerry_release_value (no_proto_instance_val);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-errortype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_error_t errors[] =\n  {\n    JERRY_ERROR_COMMON,\n    JERRY_ERROR_EVAL,\n    JERRY_ERROR_RANGE,\n    JERRY_ERROR_REFERENCE,\n    JERRY_ERROR_SYNTAX,\n    JERRY_ERROR_TYPE,\n    JERRY_ERROR_URI\n  };\n\n  for (size_t idx = 0; idx < sizeof (errors) / sizeof (errors[0]); idx++)\n  {\n    jerry_value_t error_obj = jerry_create_error (errors[idx], (const jerry_char_t *)\"test\");\n    TEST_ASSERT (jerry_value_is_error (error_obj));\n    TEST_ASSERT (jerry_get_error_type (error_obj) == errors[idx]);\n\n    error_obj = jerry_get_value_from_error (error_obj, true);\n\n    TEST_ASSERT (jerry_get_error_type (error_obj) == errors[idx]);\n\n    jerry_release_value (error_obj);\n  }\n\n  jerry_value_t test_values[] =\n  {\n    jerry_create_number (11),\n    jerry_create_string ((const jerry_char_t *) \"message\"),\n    jerry_create_boolean (true),\n    jerry_create_object (),\n  };\n\n  for (size_t idx = 0; idx < sizeof (test_values) / sizeof (test_values[0]); idx++)\n  {\n    jerry_error_t error_type = jerry_get_error_type (test_values[idx]);\n    TEST_ASSERT (error_type == JERRY_ERROR_NONE);\n    jerry_release_value (test_values[idx]);\n  }\n\n  char test_source[] = \"\\xF0\\x9D\\x84\\x9E\";\n\n  jerry_value_t result = jerry_parse (NULL,\n                                      0,\n                                      (const jerry_char_t *) test_source,\n                                      sizeof (test_source) - 1,\n                                      JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (jerry_value_is_error (result));\n  TEST_ASSERT (jerry_get_error_type (result) == JERRY_ERROR_SYNTAX);\n\n  jerry_release_value (result);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-functiontype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\ntypedef struct\n{\n  jerry_function_type_t type_info;\n  jerry_value_t value;\n  bool active;\n  bool is_async;\n} test_entry_t;\n\n#define ENTRY(TYPE, VALUE) { TYPE, VALUE, true, false }\n#define ENTRY_IF(TYPE, VALUE, FEATURE, ASYNC) { TYPE, VALUE, jerry_is_feature_enabled (FEATURE), ASYNC }\n#define EVALUATE(BUFF) (jerry_eval ((BUFF), sizeof ((BUFF)) - 1, JERRY_PARSE_NO_OPTS))\nstatic jerry_value_t\ntest_ext_function (const jerry_value_t function_obj, /**< function object */\n                   const jerry_value_t this_val, /**< function this value */\n                   const jerry_value_t args_p[], /**< array of arguments */\n                   const jerry_length_t args_cnt) /**< number of arguments */\n{\n  (void) function_obj;\n  (void) this_val;\n  (void) args_p;\n  (void) args_cnt;\n  return jerry_create_boolean (true);\n} /* test_ext_function */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const jerry_char_t arrow_function[] = \"_ => 5\";\n  const jerry_char_t async_arrow_function[] = \"async _ => 5\";\n  const jerry_char_t generator_function[] = \"function *f() {}; f\";\n  const jerry_char_t async_generator_function[] = \"async function *f() {}; f\";\n  const jerry_char_t getter_function[] = \"Object.getOwnPropertyDescriptor({get a(){}}, 'a').get\";\n  const jerry_char_t setter_function[] = \"Object.getOwnPropertyDescriptor({set a(b){}}, 'a').set\";\n  const jerry_char_t method_function[] = \"Object.getOwnPropertyDescriptor({a(){}}, 'a').value\";\n\n  const jerry_char_t builtin_function[] = \"Object\";\n  const jerry_char_t simple_function[] = \"function f() {}; f\";\n  const jerry_char_t bound_function[] = \"function f() {}; f.bind(1,2)\";\n\n  test_entry_t entries[] =\n  {\n    ENTRY (JERRY_FUNCTION_TYPE_NONE, jerry_create_number (-33.0)),\n    ENTRY (JERRY_FUNCTION_TYPE_NONE, jerry_create_boolean (true)),\n    ENTRY (JERRY_FUNCTION_TYPE_NONE, jerry_create_undefined ()),\n    ENTRY (JERRY_FUNCTION_TYPE_NONE, jerry_create_null ()),\n    ENTRY (JERRY_FUNCTION_TYPE_NONE, jerry_create_string ((const jerry_char_t *) \"foo\")),\n    ENTRY (JERRY_FUNCTION_TYPE_NONE, jerry_create_error (JERRY_ERROR_TYPE, (const jerry_char_t *) \"error\")),\n\n    ENTRY (JERRY_FUNCTION_TYPE_NONE, jerry_create_object ()),\n    ENTRY (JERRY_FUNCTION_TYPE_NONE, jerry_create_array (10)),\n\n    ENTRY_IF (JERRY_FUNCTION_TYPE_ARROW, EVALUATE (arrow_function), JERRY_FEATURE_SYMBOL, false),\n    ENTRY_IF (JERRY_FUNCTION_TYPE_ARROW, EVALUATE (async_arrow_function), JERRY_FEATURE_SYMBOL, true),\n    ENTRY_IF (JERRY_FUNCTION_TYPE_GENERATOR, EVALUATE (generator_function), JERRY_FEATURE_SYMBOL, false),\n    ENTRY_IF (JERRY_FUNCTION_TYPE_GENERATOR, EVALUATE (async_generator_function), JERRY_FEATURE_SYMBOL, true),\n    ENTRY_IF (JERRY_FUNCTION_TYPE_GENERIC, EVALUATE (method_function), JERRY_FEATURE_SYMBOL, false),\n    ENTRY (JERRY_FUNCTION_TYPE_GENERIC, EVALUATE (builtin_function)),\n    ENTRY (JERRY_FUNCTION_TYPE_GENERIC, EVALUATE (simple_function)),\n    ENTRY (JERRY_FUNCTION_TYPE_BOUND, EVALUATE (bound_function)),\n    ENTRY (JERRY_FUNCTION_TYPE_GENERIC, jerry_create_external_function (test_ext_function)),\n    ENTRY (JERRY_FUNCTION_TYPE_ACCESSOR, EVALUATE (getter_function)),\n    ENTRY (JERRY_FUNCTION_TYPE_ACCESSOR, EVALUATE (setter_function)),\n  };\n\n  for (size_t idx = 0; idx < sizeof (entries) / sizeof (entries[0]); idx++)\n  {\n    jerry_function_type_t type_info = jerry_function_get_type (entries[idx].value);\n    TEST_ASSERT (!entries[idx].active\n                 || (type_info == entries[idx].type_info\n                     && jerry_value_is_async_function (entries[idx].value) == entries[idx].is_async));\n    jerry_release_value (entries[idx].value);\n  }\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-iteratortype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\ntypedef struct\n{\n  jerry_iterator_type_t type_info;\n  jerry_value_t value;\n  bool active;\n} test_entry_t;\n\n#define ENTRY(TYPE, VALUE) { TYPE, VALUE, true }\n#define ENTRY_IF(TYPE, VALUE, FEATURE) { TYPE, VALUE, jerry_is_feature_enabled (FEATURE) }\n#define EVALUATE(BUFF) (jerry_eval ((BUFF), sizeof ((BUFF)) - 1, JERRY_PARSE_NO_OPTS))\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const jerry_char_t array_iterator_keys[] = \"[1, 2, 3].keys()\";\n  const jerry_char_t array_iterator_values[] = \"[1, 2, 3].values()\";\n  const jerry_char_t array_iterator_entries[] = \"[1, 2, 3].entries()\";\n  const jerry_char_t array_iterator_symbol_iterator[] = \"([1, 2, 3])[Symbol.iterator]()\";\n\n  const jerry_char_t typedarray_iterator_keys[] = \"new Uint8Array([1, 2, 3]).keys()\";\n  const jerry_char_t typedarray_iterator_values[] = \"new Uint8Array([1, 2, 3]).values()\";\n  const jerry_char_t typedarray_iterator_entries[] = \"new Uint8Array([1, 2, 3]).entries()\";\n  const jerry_char_t typedarray_iterator_symbol_iterator[] = \"new Uint8Array([1, 2, 3])[Symbol.iterator]()\";\n\n  const jerry_char_t string_symbol_iterator[] = \"('foo')[Symbol.iterator]()\";\n\n  const jerry_char_t map_iterator_keys[] = \"new Map([1, 2, 3].entries()).keys()\";\n  const jerry_char_t map_iterator_values[] = \"new Map([1, 2, 3].entries()).values()\";\n  const jerry_char_t map_iterator_entries[] = \"new Map([1, 2, 3].entries()).entries()\";\n  const jerry_char_t map_iterator_symbol_iterator[] = \"new Map([1, 2, 3].entries())[Symbol.iterator]()\";\n\n  const jerry_char_t set_iterator_keys[] = \"new Set([1, 2, 3]).keys()\";\n  const jerry_char_t set_iterator_values[] = \"new Set([1, 2, 3]).values()\";\n  const jerry_char_t set_iterator_entries[] = \"new Set([1, 2, 3]).entries()\";\n  const jerry_char_t set_iterator_symbol_iterator[] = \"new Set([1, 2, 3])[Symbol.iterator]()\";\n\n  test_entry_t entries[] =\n  {\n    ENTRY (JERRY_ITERATOR_TYPE_NONE, jerry_create_number (-33.0)),\n    ENTRY (JERRY_ITERATOR_TYPE_NONE, jerry_create_boolean (true)),\n    ENTRY (JERRY_ITERATOR_TYPE_NONE, jerry_create_undefined ()),\n    ENTRY (JERRY_ITERATOR_TYPE_NONE, jerry_create_null ()),\n    ENTRY (JERRY_ITERATOR_TYPE_NONE, jerry_create_string ((const jerry_char_t *) \"foo\")),\n    ENTRY (JERRY_ITERATOR_TYPE_NONE, jerry_create_error (JERRY_ERROR_TYPE, (const jerry_char_t *) \"error\")),\n\n    ENTRY (JERRY_ITERATOR_TYPE_NONE, jerry_create_object ()),\n    ENTRY (JERRY_ITERATOR_TYPE_NONE, jerry_create_array (10)),\n\n    ENTRY_IF (JERRY_ITERATOR_TYPE_ARRAY, EVALUATE (array_iterator_keys), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_ARRAY, EVALUATE (array_iterator_values), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_ARRAY, EVALUATE (array_iterator_entries), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_ARRAY, EVALUATE (array_iterator_symbol_iterator), JERRY_FEATURE_SYMBOL),\n\n    ENTRY_IF (JERRY_ITERATOR_TYPE_ARRAY, EVALUATE (typedarray_iterator_keys), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_ARRAY, EVALUATE (typedarray_iterator_values), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_ARRAY, EVALUATE (typedarray_iterator_entries), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_ARRAY, EVALUATE (typedarray_iterator_symbol_iterator), JERRY_FEATURE_SYMBOL),\n\n    ENTRY_IF (JERRY_ITERATOR_TYPE_STRING, EVALUATE (string_symbol_iterator), JERRY_FEATURE_SYMBOL),\n\n    ENTRY_IF (JERRY_ITERATOR_TYPE_MAP, EVALUATE (map_iterator_keys), JERRY_FEATURE_MAP),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_MAP, EVALUATE (map_iterator_values), JERRY_FEATURE_MAP),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_MAP, EVALUATE (map_iterator_entries), JERRY_FEATURE_MAP),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_MAP, EVALUATE (map_iterator_symbol_iterator), JERRY_FEATURE_MAP),\n\n    ENTRY_IF (JERRY_ITERATOR_TYPE_SET, EVALUATE (set_iterator_keys), JERRY_FEATURE_SET),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_SET, EVALUATE (set_iterator_values), JERRY_FEATURE_SET),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_SET, EVALUATE (set_iterator_entries), JERRY_FEATURE_SET),\n    ENTRY_IF (JERRY_ITERATOR_TYPE_SET, EVALUATE (set_iterator_symbol_iterator), JERRY_FEATURE_SET),\n  };\n\n  for (size_t idx = 0; idx < sizeof (entries) / sizeof (entries[0]); idx++)\n  {\n    jerry_iterator_type_t type_info = jerry_iterator_get_type (entries[idx].value);\n    TEST_ASSERT (!entries[idx].active || type_info == entries[idx].type_info);\n    jerry_release_value (entries[idx].value);\n  }\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-object-property-names.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\nstatic const char *prop_names[] =\n{\n  \"val1\",\n  \"val2\",\n  \"val3\",\n  \"val4\",\n  \"val5\",\n  \"37\",\n  \"symbol\"\n};\n\nstatic jerry_char_t buffer[256] = { 0 };\n\nstatic void create_and_set_property (const jerry_value_t object, const char *prop_name)\n{\n  jerry_value_t jprop_name = jerry_create_string ((const jerry_char_t *) prop_name);\n  jerry_value_t ret_val = jerry_set_property (object, jprop_name, jerry_create_undefined ());\n\n  jerry_release_value (jprop_name);\n  jerry_release_value (ret_val);\n} /* create_and_set_property */\n\nstatic void compare_prop_name (const jerry_value_t object, const char *prop_name, uint32_t idx)\n{\n  jerry_value_t name = jerry_get_property_by_index (object, idx);\n  TEST_ASSERT (jerry_value_is_string (name) || jerry_value_is_number (name));\n  if (jerry_value_is_string (name))\n  {\n    jerry_size_t name_size = jerry_get_string_size (name);\n    TEST_ASSERT (name_size < sizeof (buffer));\n    jerry_size_t ret_size = jerry_string_to_char_buffer (name, buffer, sizeof (buffer));\n    TEST_ASSERT (name_size == ret_size);\n    buffer[name_size] = '\\0';\n    TEST_ASSERT (strcmp ((const char *) buffer, prop_name) == 0);\n  }\n  else\n  {\n    TEST_ASSERT ((int) jerry_get_number_value (name) == atoi (prop_name));\n  }\n\n  jerry_release_value (name);\n} /* compare_prop_name */\n\nstatic void define_property (const jerry_value_t object,\n                             const char *prop_name,\n                             jerry_property_descriptor_t *prop_desc_p,\n                             bool is_symbol)\n{\n  jerry_value_t jname = jerry_create_string ((const jerry_char_t *) prop_name);\n  jerry_value_t ret_val;\n  if (is_symbol)\n  {\n    jerry_value_t symbol = jerry_create_symbol (jname);\n    ret_val = jerry_define_own_property (object, symbol, prop_desc_p);\n    jerry_release_value (symbol);\n  }\n  else\n  {\n    ret_val = jerry_define_own_property (object, jname, prop_desc_p);\n  }\n\n  jerry_release_value (jname);\n  jerry_release_value (ret_val);\n} /* define_property */\n\nint\nmain (void)\n{\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_SYMBOL))\n  {\n    return 0;\n  }\n\n  TEST_INIT ();\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t error_value = jerry_object_get_property_names (jerry_create_undefined (), JERRY_PROPERTY_FILTER_ALL);\n  TEST_ASSERT (jerry_value_is_error (error_value) && jerry_get_error_type (error_value) == JERRY_ERROR_TYPE);\n  jerry_release_value (error_value);\n\n  jerry_value_t test_object = jerry_create_object ();\n  create_and_set_property (test_object, prop_names[0]);\n  create_and_set_property (test_object, prop_names[1]);\n\n  jerry_value_t names;\n\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n  prop_desc.is_configurable_defined = true;\n  prop_desc.is_configurable = true;\n  prop_desc.is_writable_defined = true;\n  prop_desc.is_writable = true;\n  prop_desc.is_enumerable_defined = true;\n\n  // Test enumerable - non-enumerable filter\n  prop_desc.is_enumerable = false;\n  define_property (test_object, prop_names[2], &prop_desc, false);\n  names = jerry_object_get_property_names (test_object,\n                                           JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 2);\n  jerry_release_value (names);\n  names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 3);\n  compare_prop_name (names, prop_names[2], 2);\n  jerry_release_value (names);\n  prop_desc.is_enumerable = true;\n\n  // Test configurable - non-configurable filter\n  prop_desc.is_configurable = false;\n  define_property (test_object, prop_names[3], &prop_desc, false);\n  names = jerry_object_get_property_names (test_object,\n                                           JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 3);\n  jerry_release_value (names);\n  names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 4);\n  compare_prop_name (names, prop_names[3], 3);\n  jerry_release_value (names);\n  prop_desc.is_configurable = true;\n\n  // Test writable - non-writable filter\n  prop_desc.is_writable = false;\n  define_property (test_object, prop_names[4], &prop_desc, false);\n  names = jerry_object_get_property_names (test_object,\n                                           JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 4);\n  jerry_release_value (names);\n  names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 5);\n  compare_prop_name (names, prop_names[4], 4);\n  jerry_release_value (names);\n  prop_desc.is_writable = true;\n\n  // Test all property filter\n  names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL);\n  jerry_length_t array_len = jerry_get_array_length (names);\n  TEST_ASSERT (array_len == (uint32_t) 5);\n\n  for (uint32_t i = 0; i < array_len; i++)\n  {\n    compare_prop_name (names, prop_names[i], i);\n  }\n\n  jerry_release_value (names);\n\n  // Test number and string index exclusion\n  define_property (test_object, prop_names[5], &prop_desc, false);\n  names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL\n                                           | JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS\n                                           | JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 1);\n  compare_prop_name (names, prop_names[5], 0);\n  jerry_release_value (names);\n  names = jerry_object_get_property_names (test_object,\n                                           JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 5);\n  jerry_release_value (names);\n\n  // Test prototype chain traversion\n  names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 6);\n  jerry_release_value (names);\n  names = jerry_object_get_property_names (test_object,\n                                           JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_TRAVERSE_PROTOTYPE_CHAIN);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 18);\n  jerry_release_value (names);\n\n  // Test symbol exclusion\n  define_property (test_object, prop_names[6], &prop_desc, true);\n  names = jerry_object_get_property_names (test_object,\n                                           JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 6);\n  jerry_release_value (names);\n  names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL);\n  TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 7);\n  jerry_release_value (names);\n\n  jerry_free_property_descriptor_fields (&prop_desc);\n  jerry_release_value (test_object);\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-objecttype.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\ntypedef struct\n{\n  jerry_object_type_t type_info;\n  jerry_value_t value;\n  bool active;\n} test_entry_t;\n\n#define ENTRY(TYPE, VALUE) { TYPE, VALUE, true }\n#define ENTRY_IF(TYPE, VALUE, FEATURE) { TYPE, VALUE, jerry_is_feature_enabled (FEATURE) }\n#define EVALUATE(BUFF) (jerry_eval ((BUFF), sizeof ((BUFF)) - 1, JERRY_PARSE_NO_OPTS))\nstatic jerry_value_t\ntest_ext_function (const jerry_value_t function_obj, /**< function object */\n                   const jerry_value_t this_val, /**< function this value */\n                   const jerry_value_t args_p[], /**< array of arguments */\n                   const jerry_length_t args_cnt) /**< number of arguments */\n{\n  (void) function_obj;\n  (void) this_val;\n  (void) args_p;\n  (void) args_cnt;\n  return jerry_create_boolean (true);\n} /* test_ext_function */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const jerry_char_t proxy_object[] = \"new Proxy({}, {})\";\n  const jerry_char_t typedarray_object[] = \"new Uint8Array()\";\n  const jerry_char_t container_object[] = \"new Map()\";\n  const jerry_char_t iterator_object[] = \"[1, 2, 3].values()\";\n  const jerry_char_t arrow_function[] = \"_ => 5\";\n  const jerry_char_t async_arrow_function[] = \"async _ => 5\";\n  const jerry_char_t generator_function[] = \"function *f() {}; f\";\n  const jerry_char_t async_generator_function[] = \"async function *f() {}; f\";\n  const jerry_char_t getter_function[] = \"Object.getOwnPropertyDescriptor({get a(){}}, 'a').get\";\n  const jerry_char_t setter_function[] = \"Object.getOwnPropertyDescriptor({set a(b){}}, 'a').set\";\n  const jerry_char_t method_function[] = \"Object.getOwnPropertyDescriptor({a(){}}, 'a').value\";\n\n  const jerry_char_t symbol_object[] = \"new Object(Symbol('foo'))\";\n  const jerry_char_t generator_object[] = \"function *f() { yield 5 }; f()\";\n  const jerry_char_t bigint_object[] = \"Object(5n)\";\n\n  const jerry_char_t builtin_function[] = \"Object\";\n  const jerry_char_t simple_function[] = \"function f() {}; f\";\n  const jerry_char_t bound_function[] = \"function f() {}; f.bind(1,2)\";\n  const jerry_char_t mapped_arguments[] = \"function f(a, b) { return arguments; }; f()\";\n  const jerry_char_t unmapped_arguments[] = \"function f(a, b) {'use strict'; return arguments; }; f()\";\n  const jerry_char_t boolean_object[] = \"new Boolean(true)\";\n  const jerry_char_t date_object[] = \"new Date()\";\n  const jerry_char_t number_object[] = \"new Number(5)\";\n  const jerry_char_t regexp_object[] = \"new RegExp()\";\n  const jerry_char_t string_object[] = \"new String('foo')\";\n\n  test_entry_t entries[] =\n  {\n    ENTRY (JERRY_OBJECT_TYPE_NONE, jerry_create_number (-33.0)),\n    ENTRY (JERRY_OBJECT_TYPE_NONE, jerry_create_boolean (true)),\n    ENTRY (JERRY_OBJECT_TYPE_NONE, jerry_create_undefined ()),\n    ENTRY (JERRY_OBJECT_TYPE_NONE, jerry_create_null ()),\n    ENTRY (JERRY_OBJECT_TYPE_NONE, jerry_create_string ((const jerry_char_t *) \"foo\")),\n    ENTRY (JERRY_OBJECT_TYPE_NONE, jerry_create_error (JERRY_ERROR_TYPE, (const jerry_char_t *) \"error\")),\n\n    ENTRY (JERRY_OBJECT_TYPE_GENERIC, jerry_create_object ()),\n    ENTRY (JERRY_OBJECT_TYPE_ARRAY, jerry_create_array (10)),\n\n    ENTRY_IF (JERRY_OBJECT_TYPE_PROXY, EVALUATE (proxy_object), JERRY_FEATURE_PROXY),\n    ENTRY_IF (JERRY_OBJECT_TYPE_TYPEDARRAY, EVALUATE (typedarray_object), JERRY_FEATURE_TYPEDARRAY),\n    ENTRY_IF (JERRY_OBJECT_TYPE_CONTAINER, EVALUATE (container_object), JERRY_FEATURE_MAP),\n    ENTRY_IF (JERRY_OBJECT_TYPE_ITERATOR, EVALUATE (iterator_object), JERRY_FEATURE_SYMBOL),\n\n    ENTRY_IF (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (arrow_function), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (async_arrow_function), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (generator_function), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (async_generator_function), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (method_function), JERRY_FEATURE_SYMBOL),\n    ENTRY (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (builtin_function)),\n    ENTRY (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (simple_function)),\n    ENTRY (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (bound_function)),\n    ENTRY (JERRY_OBJECT_TYPE_FUNCTION, jerry_create_external_function (test_ext_function)),\n    ENTRY (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (getter_function)),\n    ENTRY (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (setter_function)),\n\n    ENTRY (JERRY_OBJECT_TYPE_ARGUMENTS, EVALUATE (mapped_arguments)),\n    ENTRY (JERRY_OBJECT_TYPE_ARGUMENTS, EVALUATE (unmapped_arguments)),\n    ENTRY (JERRY_OBJECT_TYPE_BOOLEAN, EVALUATE (boolean_object)),\n    ENTRY (JERRY_OBJECT_TYPE_DATE, EVALUATE (date_object)),\n    ENTRY (JERRY_OBJECT_TYPE_NUMBER, EVALUATE (number_object)),\n    ENTRY (JERRY_OBJECT_TYPE_REGEXP, EVALUATE (regexp_object)),\n    ENTRY (JERRY_OBJECT_TYPE_STRING, EVALUATE (string_object)),\n    ENTRY_IF (JERRY_OBJECT_TYPE_SYMBOL, EVALUATE (symbol_object), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_OBJECT_TYPE_GENERATOR, EVALUATE (generator_object), JERRY_FEATURE_SYMBOL),\n    ENTRY_IF (JERRY_OBJECT_TYPE_BIGINT, EVALUATE (bigint_object), JERRY_FEATURE_BIGINT),\n  };\n\n  for (size_t idx = 0; idx < sizeof (entries) / sizeof (entries[0]); idx++)\n  {\n    jerry_object_type_t type_info = jerry_object_get_type (entries[idx].value);\n    TEST_ASSERT (!entries[idx].active || type_info == entries[idx].type_info);\n    jerry_release_value (entries[idx].value);\n  }\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-promise.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\nstatic void\ntest_promise_resolve_success (void)\n{\n  jerry_value_t my_promise = jerry_create_promise ();\n\n  // A created promise has an undefined promise result by default and a pending state\n  {\n    jerry_value_t promise_result = jerry_get_promise_result (my_promise);\n    TEST_ASSERT (jerry_value_is_undefined (promise_result));\n\n    jerry_promise_state_t promise_state = jerry_get_promise_state (my_promise);\n    TEST_ASSERT (promise_state == JERRY_PROMISE_STATE_PENDING);\n\n    jerry_release_value (promise_result);\n  }\n\n  jerry_value_t resolve_value = jerry_create_object ();\n  {\n    jerry_value_t obj_key = jerry_create_string ((const jerry_char_t *) \"key_one\");\n    jerry_value_t set_result = jerry_set_property (resolve_value, obj_key, jerry_create_number (3));\n    TEST_ASSERT (jerry_value_is_boolean (set_result) && (jerry_get_boolean_value (set_result) == true));\n    jerry_release_value (set_result);\n    jerry_release_value (obj_key);\n  }\n\n  // A resolved promise should have the result of from the resolve call and a fulfilled state\n  {\n    jerry_value_t resolve_result = jerry_resolve_or_reject_promise (my_promise, resolve_value, true);\n\n    // Release \"old\" value of resolve.\n    jerry_release_value (resolve_value);\n\n    jerry_value_t promise_result = jerry_get_promise_result (my_promise);\n    {\n      TEST_ASSERT (jerry_value_is_object (promise_result));\n      jerry_value_t obj_key = jerry_create_string ((const jerry_char_t *) \"key_one\");\n      jerry_value_t get_result = jerry_get_property (promise_result, obj_key);\n      TEST_ASSERT (jerry_value_is_number (get_result));\n      TEST_ASSERT (jerry_get_number_value (get_result) == 3.0);\n\n      jerry_release_value (get_result);\n      jerry_release_value (obj_key);\n    }\n\n    jerry_promise_state_t promise_state = jerry_get_promise_state (my_promise);\n    TEST_ASSERT (promise_state == JERRY_PROMISE_STATE_FULFILLED);\n\n    jerry_release_value (promise_result);\n\n    jerry_release_value (resolve_result);\n  }\n\n  // Resolvind a promise again does not change the result/state\n  {\n    jerry_value_t resolve_result = jerry_resolve_or_reject_promise (my_promise, jerry_create_number (50), false);\n\n    jerry_value_t promise_result = jerry_get_promise_result (my_promise);\n    {\n      TEST_ASSERT (jerry_value_is_object (promise_result));\n      jerry_value_t obj_key = jerry_create_string ((const jerry_char_t *) \"key_one\");\n      jerry_value_t get_result = jerry_get_property (promise_result, obj_key);\n      TEST_ASSERT (jerry_value_is_number (get_result));\n      TEST_ASSERT (jerry_get_number_value (get_result) == 3.0);\n\n      jerry_release_value (get_result);\n      jerry_release_value (obj_key);\n    }\n\n    jerry_promise_state_t promise_state = jerry_get_promise_state (my_promise);\n    TEST_ASSERT (promise_state == JERRY_PROMISE_STATE_FULFILLED);\n\n    jerry_release_value (promise_result);\n\n    jerry_release_value (resolve_result);\n  }\n\n  jerry_release_value (my_promise);\n} /* test_promise_resolve_success */\n\nstatic void\ntest_promise_resolve_fail (void)\n{\n  jerry_value_t my_promise = jerry_create_promise ();\n\n  // A created promise has an undefined promise result by default and a pending state\n  {\n    jerry_value_t promise_result = jerry_get_promise_result (my_promise);\n    TEST_ASSERT (jerry_value_is_undefined (promise_result));\n\n    jerry_promise_state_t promise_state = jerry_get_promise_state (my_promise);\n    TEST_ASSERT (promise_state == JERRY_PROMISE_STATE_PENDING);\n\n    jerry_release_value (promise_result);\n  }\n\n  // A resolved promise should have the result of from the resolve call and a fulfilled state\n  {\n    jerry_value_t error_value = jerry_create_error (JERRY_ERROR_TYPE, (const jerry_char_t *) \"resolve_fail\");\n    jerry_value_t error_obj = jerry_get_value_from_error (error_value, true);\n    jerry_value_t resolve_result = jerry_resolve_or_reject_promise (my_promise, error_obj, false);\n    jerry_release_value (error_obj);\n\n    jerry_value_t promise_result = jerry_get_promise_result (my_promise);\n    // The error is not throw that's why it is only an error object.\n    TEST_ASSERT (jerry_value_is_object (promise_result));\n    TEST_ASSERT (jerry_get_error_type (promise_result) == JERRY_ERROR_TYPE);\n\n    jerry_promise_state_t promise_state = jerry_get_promise_state (my_promise);\n    TEST_ASSERT (promise_state == JERRY_PROMISE_STATE_REJECTED);\n\n    jerry_release_value (promise_result);\n\n    jerry_release_value (resolve_result);\n  }\n\n  // Resolvind a promise again does not change the result/state\n  {\n    jerry_value_t resolve_result = jerry_resolve_or_reject_promise (my_promise, jerry_create_number (50), true);\n\n    jerry_value_t promise_result = jerry_get_promise_result (my_promise);\n    TEST_ASSERT (jerry_value_is_object (promise_result));\n    TEST_ASSERT (jerry_get_error_type (promise_result) == JERRY_ERROR_TYPE);\n\n    jerry_promise_state_t promise_state = jerry_get_promise_state (my_promise);\n    TEST_ASSERT (promise_state == JERRY_PROMISE_STATE_REJECTED);\n\n    jerry_release_value (promise_result);\n\n    jerry_release_value (resolve_result);\n  }\n\n  jerry_release_value (my_promise);\n} /* test_promise_resolve_fail */\n\nstatic void\ntest_promise_from_js (void)\n{\n  const jerry_char_t test_source[] = \"(new Promise(function(rs, rj) { rs(30); })).then(function(v) { return v + 1; })\";\n\n  jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                               0,\n                                               test_source,\n                                               sizeof (test_source) - 1,\n                                               JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n  jerry_value_t res = jerry_run (parsed_code_val);\n  TEST_ASSERT (jerry_value_is_promise (res));\n\n  TEST_ASSERT (jerry_get_promise_state (res) == JERRY_PROMISE_STATE_PENDING);\n\n  jerry_value_t run_result = jerry_run_all_enqueued_jobs ();\n  TEST_ASSERT (jerry_value_is_undefined (run_result));\n  jerry_release_value (run_result);\n\n  TEST_ASSERT (jerry_get_promise_state (res) == JERRY_PROMISE_STATE_FULFILLED);\n  jerry_value_t promise_result = jerry_get_promise_result (res);\n  TEST_ASSERT (jerry_value_is_number (promise_result));\n  TEST_ASSERT (jerry_get_number_value (promise_result) == 31.0);\n\n  jerry_release_value (promise_result);\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n} /* test_promise_from_js */\n\nint\nmain (void)\n{\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_PROMISE))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Promise is disabled!\\n\");\n    return 0;\n  }\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  test_promise_resolve_fail ();\n  test_promise_resolve_success ();\n\n  test_promise_from_js ();\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-property.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Test: init property descriptor */\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n  TEST_ASSERT (prop_desc.is_value_defined == false);\n  TEST_ASSERT (jerry_value_is_undefined (prop_desc.value));\n  TEST_ASSERT (prop_desc.is_writable_defined == false);\n  TEST_ASSERT (prop_desc.is_writable == false);\n  TEST_ASSERT (prop_desc.is_enumerable_defined == false);\n  TEST_ASSERT (prop_desc.is_enumerable == false);\n  TEST_ASSERT (prop_desc.is_configurable_defined == false);\n  TEST_ASSERT (prop_desc.is_configurable == false);\n  TEST_ASSERT (prop_desc.is_get_defined == false);\n  TEST_ASSERT (jerry_value_is_undefined (prop_desc.getter));\n  TEST_ASSERT (prop_desc.is_set_defined == false);\n  TEST_ASSERT (jerry_value_is_undefined (prop_desc.setter));\n\n  /* Test: define own properties */\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"my_defined_property\");\n  prop_desc.is_value_defined = true;\n  prop_desc.value = jerry_acquire_value (prop_name);\n  jerry_value_t res = jerry_define_own_property (global_obj_val, prop_name, &prop_desc);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_boolean (res));\n  TEST_ASSERT (jerry_get_boolean_value (res));\n  jerry_release_value (res);\n  jerry_free_property_descriptor_fields (&prop_desc);\n\n  /* Test: get own property descriptor */\n  bool is_ok = jerry_get_own_property_descriptor (global_obj_val, prop_name, &prop_desc);\n  TEST_ASSERT (is_ok);\n  TEST_ASSERT (prop_desc.is_value_defined == true);\n  TEST_ASSERT (jerry_value_is_string (prop_desc.value));\n  TEST_ASSERT (prop_desc.is_writable == false);\n  TEST_ASSERT (prop_desc.is_enumerable == false);\n  TEST_ASSERT (prop_desc.is_configurable == false);\n  TEST_ASSERT (prop_desc.is_get_defined == false);\n  TEST_ASSERT (jerry_value_is_undefined (prop_desc.getter));\n  TEST_ASSERT (prop_desc.is_set_defined == false);\n  TEST_ASSERT (jerry_value_is_undefined (prop_desc.setter));\n  jerry_free_property_descriptor_fields (&prop_desc);\n\n  if (jerry_is_feature_enabled (JERRY_FEATURE_PROXY))\n  {\n    /* Note: update this test when the internal method is implemented */\n    jerry_value_t target = jerry_create_object ();\n    jerry_value_t handler = jerry_create_object ();\n    jerry_value_t proxy = jerry_create_proxy (target, handler);\n\n    jerry_release_value (target);\n    jerry_release_value (handler);\n    is_ok = jerry_get_own_property_descriptor (proxy, prop_name, &prop_desc);\n    TEST_ASSERT (!is_ok);\n    jerry_release_value (proxy);\n  }\n\n  jerry_release_value (prop_name);\n\n  /* Test: define and get own property descriptor */\n  prop_desc.is_enumerable = true;\n  prop_name = jerry_create_string ((const jerry_char_t *) \"enumerable-property\");\n  res = jerry_define_own_property (global_obj_val, prop_name, &prop_desc);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_boolean (res));\n  TEST_ASSERT (jerry_get_boolean_value (res));\n  jerry_release_value (res);\n  jerry_free_property_descriptor_fields (&prop_desc);\n  is_ok = jerry_get_own_property_descriptor (global_obj_val, prop_name, &prop_desc);\n  TEST_ASSERT (is_ok);\n  TEST_ASSERT (prop_desc.is_writable == false);\n  TEST_ASSERT (prop_desc.is_enumerable == true);\n  TEST_ASSERT (prop_desc.is_configurable == false);\n\n  jerry_release_value (prop_name);\n  jerry_release_value (global_obj_val);\n\n  /* Test: define own property descriptor error */\n  jerry_init_property_descriptor_fields (&prop_desc);\n  prop_desc.is_value_defined = true;\n  prop_desc.value = jerry_create_number (11);\n\n  jerry_value_t obj_val = jerry_create_object ();\n  prop_name = jerry_create_string ((const jerry_char_t *) \"property_key\");\n  res = jerry_define_own_property (obj_val, prop_name, &prop_desc);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  jerry_release_value (res);\n\n  jerry_release_value (prop_desc.value);\n  prop_desc.value = jerry_create_number (22);\n  res = jerry_define_own_property (obj_val, prop_name, &prop_desc);\n  TEST_ASSERT (jerry_value_is_error (res));\n  jerry_release_value (res);\n\n  jerry_release_value (prop_name);\n  jerry_release_value (obj_val);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-set-and-clear-error-flag.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nstatic void\ncompare_str (jerry_value_t value, const jerry_char_t *str_p, size_t str_len)\n{\n  jerry_size_t size = jerry_get_string_size (value);\n  TEST_ASSERT (str_len == size);\n  JERRY_VLA (jerry_char_t, str_buff, size);\n  jerry_string_to_utf8_char_buffer (value, str_buff, size);\n  TEST_ASSERT (!memcmp (str_p, str_buff, str_len));\n} /* compare_str */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t obj_val = jerry_create_object ();\n  obj_val = jerry_create_error_from_value (obj_val, true);\n  jerry_value_t err_val = jerry_acquire_value (obj_val);\n\n  obj_val = jerry_get_value_from_error (err_val, true);\n\n  TEST_ASSERT (obj_val != err_val);\n  jerry_release_value (err_val);\n  jerry_release_value (obj_val);\n\n  const jerry_char_t pterodactylus[] = \"Pterodactylus\";\n  const size_t pterodactylus_size = sizeof (pterodactylus) - 1;\n\n  jerry_value_t str = jerry_create_string (pterodactylus);\n  jerry_value_t error = jerry_create_error_from_value (str, true);\n  str = jerry_get_value_from_error (error, true);\n\n  compare_str (str, pterodactylus, pterodactylus_size);\n  jerry_release_value (str);\n\n  str = jerry_create_string (pterodactylus);\n  error = jerry_create_error_from_value (str, false);\n  jerry_release_value (str);\n  str = jerry_get_value_from_error (error, true);\n\n  compare_str (str, pterodactylus, pterodactylus_size);\n  jerry_release_value (str);\n\n  str = jerry_create_string (pterodactylus);\n  error = jerry_create_abort_from_value (str, true);\n  str = jerry_get_value_from_error (error, true);\n\n  compare_str (str, pterodactylus, pterodactylus_size);\n  jerry_release_value (str);\n\n  str = jerry_create_string (pterodactylus);\n  error = jerry_create_abort_from_value (str, false);\n  jerry_release_value (str);\n  str = jerry_get_value_from_error (error, true);\n\n  compare_str (str, pterodactylus, pterodactylus_size);\n  jerry_release_value (str);\n\n  str = jerry_create_string (pterodactylus);\n  error = jerry_create_error_from_value (str, true);\n  error = jerry_create_abort_from_value (error, true);\n  TEST_ASSERT (jerry_value_is_abort (error));\n  str = jerry_get_value_from_error (error, true);\n\n  compare_str (str, pterodactylus, pterodactylus_size);\n  jerry_release_value (str);\n\n  str = jerry_create_string (pterodactylus);\n  error = jerry_create_error_from_value (str, true);\n  jerry_value_t error2 = jerry_create_abort_from_value (error, false);\n  TEST_ASSERT (jerry_value_is_abort (error2));\n  jerry_release_value (error);\n  str = jerry_get_value_from_error (error2, true);\n\n  compare_str (str, pterodactylus, pterodactylus_size);\n  jerry_release_value (str);\n\n  double test_num = 3.1415926;\n  jerry_value_t num = jerry_create_number (test_num);\n  jerry_value_t num2 = jerry_create_error_from_value (num, false);\n  TEST_ASSERT (jerry_value_is_error (num2));\n  jerry_release_value (num);\n  num2 = jerry_get_value_from_error (num2, true);\n  TEST_ASSERT (jerry_get_number_value (num2) == test_num);\n  jerry_release_value (num2);\n\n  num = jerry_create_number (test_num);\n  num2 = jerry_create_error_from_value (num, true);\n  TEST_ASSERT (jerry_value_is_error (num2));\n  num2 = jerry_get_value_from_error (num2, true);\n  TEST_ASSERT (jerry_get_number_value (num2) == test_num);\n  jerry_release_value (num2);\n\n  num = jerry_create_number (test_num);\n  num2 = jerry_create_error_from_value (num, false);\n  TEST_ASSERT (jerry_value_is_error (num2));\n  jerry_release_value (num);\n  jerry_value_t num3 = jerry_create_error_from_value (num2, false);\n  TEST_ASSERT (jerry_value_is_error (num3));\n  jerry_release_value (num2);\n  num2 = jerry_get_value_from_error (num3, true);\n  TEST_ASSERT (jerry_get_number_value (num2) == test_num);\n  jerry_release_value (num2);\n\n  num = jerry_create_number (test_num);\n  num2 = jerry_create_error_from_value (num, true);\n  TEST_ASSERT (jerry_value_is_error (num2));\n  num3 = jerry_create_error_from_value (num2, true);\n  TEST_ASSERT (jerry_value_is_error (num3));\n  num2 = jerry_get_value_from_error (num3, true);\n  TEST_ASSERT (jerry_get_number_value (num2) == test_num);\n  jerry_release_value (num2);\n\n  num = jerry_create_number (test_num);\n  error = jerry_create_abort_from_value (num, true);\n  TEST_ASSERT (jerry_value_is_abort (error));\n  num2 = jerry_create_error_from_value (error, true);\n  TEST_ASSERT (jerry_value_is_error (num2));\n  num = jerry_get_value_from_error (num2, true);\n  TEST_ASSERT (jerry_get_number_value (num) == test_num);\n  jerry_release_value (num);\n\n  num = jerry_create_number (test_num);\n  error = jerry_create_abort_from_value (num, false);\n  jerry_release_value (num);\n  TEST_ASSERT (jerry_value_is_abort (error));\n  num2 = jerry_create_error_from_value (error, true);\n  TEST_ASSERT (jerry_value_is_error (num2));\n  num = jerry_get_value_from_error (num2, true);\n  TEST_ASSERT (jerry_get_number_value (num) == test_num);\n  jerry_release_value (num);\n\n  num = jerry_create_number (test_num);\n  error = jerry_create_abort_from_value (num, true);\n  TEST_ASSERT (jerry_value_is_abort (error));\n  num2 = jerry_create_error_from_value (error, false);\n  jerry_release_value (error);\n  TEST_ASSERT (jerry_value_is_error (num2));\n  num = jerry_get_value_from_error (num2, true);\n  TEST_ASSERT (jerry_get_number_value (num) == test_num);\n  jerry_release_value (num);\n\n  num = jerry_create_number (test_num);\n  error = jerry_create_abort_from_value (num, false);\n  jerry_release_value (num);\n  TEST_ASSERT (jerry_value_is_abort (error));\n  num2 = jerry_create_error_from_value (error, false);\n  jerry_release_value (error);\n  TEST_ASSERT (jerry_value_is_error (num2));\n  num = jerry_get_value_from_error (num2, true);\n  TEST_ASSERT (jerry_get_number_value (num) == test_num);\n  jerry_release_value (num);\n\n  jerry_value_t value = jerry_create_number (42);\n  value = jerry_get_value_from_error (value, true);\n  jerry_release_value (value);\n\n  value = jerry_create_number (42);\n  jerry_value_t value2 = jerry_get_value_from_error (value, false);\n  jerry_release_value (value);\n  jerry_release_value (value2);\n\n  value = jerry_create_number (42);\n  error = jerry_create_error_from_value (value, true);\n  error = jerry_create_error_from_value (error, true);\n  jerry_release_value (error);\n\n  value = jerry_create_number (42);\n  error = jerry_create_abort_from_value (value, true);\n  error = jerry_create_abort_from_value (error, true);\n  jerry_release_value (error);\n\n  value = jerry_create_number (42);\n  error = jerry_create_error_from_value (value, true);\n  error2 = jerry_create_error_from_value (error, false);\n  jerry_release_value (error);\n  jerry_release_value (error2);\n\n  value = jerry_create_number (42);\n  error = jerry_create_abort_from_value (value, true);\n  error2 = jerry_create_abort_from_value (error, false);\n  jerry_release_value (error);\n  jerry_release_value (error2);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-strings.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nstatic bool\nstrict_equals (jerry_value_t a, /**< the first string to compare */\n               jerry_value_t b) /**< the second string to compare */\n{\n  const jerry_char_t is_equal_src[] = \"var isEqual = function(a, b) { return (a === b); }; isEqual\";\n  jerry_value_t is_equal_fn_val = jerry_eval (is_equal_src, sizeof (is_equal_src) - 1, JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (is_equal_fn_val));\n  jerry_value_t args[2] = {a, b};\n  jerry_value_t res = jerry_call_function (is_equal_fn_val, jerry_create_undefined (), args, 2);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_boolean (res));\n  bool is_strict_equal = jerry_get_boolean_value (res);\n  jerry_release_value (res);\n  jerry_release_value (is_equal_fn_val);\n  return is_strict_equal;\n} /* strict_equals */\n\nint\nmain (void)\n{\n  jerry_size_t sz, utf8_sz, cesu8_sz;\n  jerry_length_t cesu8_length, utf8_length;\n  jerry_value_t args[2];\n\n  TEST_INIT ();\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Test corner case for jerry_string_to_char_buffer */\n  args[0] = jerry_create_string ((jerry_char_t *) \"\");\n  sz = jerry_get_string_size (args[0]);\n  TEST_ASSERT (sz == 0);\n  jerry_release_value (args[0]);\n\n  /* Test create_jerry_string_from_utf8 with 4-byte long unicode sequences,\n   * test string: 'str: {DESERET CAPITAL LETTER LONG I}'\n   */\n  args[0] = jerry_create_string_from_utf8 ((jerry_char_t *) \"\\x73\\x74\\x72\\x3a \\xf0\\x90\\x90\\x80\");\n  args[1] = jerry_create_string ((jerry_char_t *) \"\\x73\\x74\\x72\\x3a \\xed\\xa0\\x81\\xed\\xb0\\x80\");\n\n  /* These sizes must be equal */\n  utf8_sz = jerry_get_string_size (args[0]);\n  cesu8_sz = jerry_get_string_size (args[1]);\n\n  JERRY_VLA (char, string_from_utf8, utf8_sz);\n  JERRY_VLA (char, string_from_cesu8, cesu8_sz);\n\n  jerry_string_to_char_buffer (args[0], (jerry_char_t *) string_from_utf8, utf8_sz);\n  jerry_string_to_char_buffer (args[1], (jerry_char_t *) string_from_cesu8, cesu8_sz);\n\n  TEST_ASSERT (utf8_sz == cesu8_sz);\n\n  TEST_ASSERT (!strncmp (string_from_utf8, string_from_cesu8, utf8_sz));\n  jerry_release_value (args[0]);\n  jerry_release_value (args[1]);\n\n  /* Test jerry_string_to_utf8_char_buffer, test string: 'str: {DESERET CAPITAL LETTER LONG I}' */\n  args[0] = jerry_create_string_from_utf8 ((jerry_char_t *) \"\\x73\\x74\\x72\\x3a \\xf0\\x90\\x90\\x80\");\n  args[1] = jerry_create_string ((jerry_char_t *) \"\\x73\\x74\\x72\\x3a \\xed\\xa0\\x81\\xed\\xb0\\x80\");\n\n  /* Test that the strings are equal / ensure hashes are equal */\n  TEST_ASSERT (strict_equals (args[0], args[1]));\n\n  /* These sizes must be equal */\n  utf8_sz = jerry_get_utf8_string_size (args[0]);\n  cesu8_sz = jerry_get_utf8_string_size (args[1]);\n\n  TEST_ASSERT (utf8_sz == cesu8_sz && utf8_sz > 0);\n\n  JERRY_VLA (char, string_from_utf8_string, utf8_sz);\n  JERRY_VLA (char, string_from_cesu8_string, cesu8_sz);\n\n  jerry_string_to_utf8_char_buffer (args[0], (jerry_char_t *) string_from_utf8_string, utf8_sz);\n  jerry_string_to_utf8_char_buffer (args[1], (jerry_char_t *) string_from_cesu8_string, cesu8_sz);\n\n  TEST_ASSERT (!strncmp (string_from_utf8_string, string_from_cesu8_string, utf8_sz));\n  jerry_release_value (args[0]);\n  jerry_release_value (args[1]);\n\n  /* Test string: 'str: {MATHEMATICAL FRAKTUR SMALL F}{MATHEMATICAL FRAKTUR SMALL G}' */\n  args[0] = jerry_create_string_from_utf8 ((jerry_char_t *) \"\\x73\\x74\\x72\\x3a \\xf0\\x9d\\x94\\xa3 \\xf0\\x9d\\x94\\xa4\");\n\n  cesu8_length = jerry_get_string_length (args[0]);\n  utf8_length = jerry_get_utf8_string_length (args[0]);\n\n  cesu8_sz = jerry_get_string_size (args[0]);\n  utf8_sz =  jerry_get_utf8_string_size (args[0]);\n\n  TEST_ASSERT (cesu8_length == 10 && utf8_length == 8);\n  TEST_ASSERT (cesu8_sz != utf8_sz);\n  TEST_ASSERT (utf8_sz == 14 && cesu8_sz == 18);\n\n  JERRY_VLA (char, test_string, utf8_sz);\n\n  TEST_ASSERT (jerry_string_to_utf8_char_buffer (args[0], (jerry_char_t *) test_string, utf8_sz) == 14);\n  TEST_ASSERT (!strncmp (test_string, \"\\x73\\x74\\x72\\x3a \\xf0\\x9d\\x94\\xa3 \\xf0\\x9d\\x94\\xa4\", utf8_sz));\n\n  sz = jerry_substring_to_utf8_char_buffer (args[0], 0, utf8_length, (jerry_char_t *) test_string, utf8_sz);\n  TEST_ASSERT (sz == 14);\n  TEST_ASSERT (!strncmp (test_string, \"\\x73\\x74\\x72\\x3a \\xf0\\x9d\\x94\\xa3 \\xf0\\x9d\\x94\\xa4\", sz));\n\n  sz = jerry_substring_to_utf8_char_buffer (args[0], 0, utf8_length + 1, (jerry_char_t *) test_string, utf8_sz);\n  TEST_ASSERT (sz == 14);\n  TEST_ASSERT (!strncmp (test_string, \"\\x73\\x74\\x72\\x3a \\xf0\\x9d\\x94\\xa3 \\xf0\\x9d\\x94\\xa4\", sz));\n\n  sz = jerry_substring_to_utf8_char_buffer (args[0], utf8_length, 0, (jerry_char_t *) test_string, utf8_sz);\n  TEST_ASSERT (sz == 0);\n\n  sz = jerry_substring_to_utf8_char_buffer (args[0], 0, utf8_length, (jerry_char_t *) test_string, utf8_sz - 1);\n  TEST_ASSERT (sz == 10);\n  TEST_ASSERT (!strncmp (test_string, \"\\x73\\x74\\x72\\x3a \\xf0\\x9d\\x94\\xa3 \", sz));\n\n  sz = jerry_substring_to_utf8_char_buffer (args[0], 0, utf8_length - 1, (jerry_char_t *) test_string, utf8_sz);\n  TEST_ASSERT (sz == 10);\n  TEST_ASSERT (!strncmp (test_string, \"\\x73\\x74\\x72\\x3a \\xf0\\x9d\\x94\\xa3 \", sz));\n\n  sz = jerry_substring_to_utf8_char_buffer (args[0],\n                                            utf8_length - 2,\n                                            utf8_length - 1,\n                                            (jerry_char_t *) test_string,\n                                            utf8_sz);\n  TEST_ASSERT (sz == 1);\n  TEST_ASSERT (!strncmp (test_string, \" \", sz));\n\n  sz = jerry_substring_to_utf8_char_buffer (args[0],\n                                            utf8_length - 3,\n                                            utf8_length - 2,\n                                            (jerry_char_t *) test_string,\n                                            utf8_sz);\n  TEST_ASSERT (sz == 4);\n  TEST_ASSERT (!strncmp (test_string, \"\\xf0\\x9d\\x94\\xa3\", sz));\n\n  jerry_release_value (args[0]);\n\n  /* Test string: 'str: {DESERET CAPITAL LETTER LONG I}' */\n  args[0] = jerry_create_string ((jerry_char_t *) \"\\x73\\x74\\x72\\x3a \\xed\\xa0\\x81\\xed\\xb0\\x80\");\n\n  cesu8_length = jerry_get_string_length (args[0]);\n  utf8_length = jerry_get_utf8_string_length (args[0]);\n\n  cesu8_sz = jerry_get_string_size (args[0]);\n  utf8_sz =  jerry_get_utf8_string_size (args[0]);\n\n  TEST_ASSERT (cesu8_length == 7 && utf8_length == 6);\n  TEST_ASSERT (cesu8_sz != utf8_sz);\n  TEST_ASSERT (utf8_sz == 9 && cesu8_sz == 11);\n\n  jerry_release_value (args[0]);\n\n  /* Test string: 'price: 10{EURO SIGN}' */\n  args[0] = jerry_create_string_from_utf8 ((jerry_char_t *) \"\\x70\\x72\\x69\\x63\\x65\\x3a \\x31\\x30\\xe2\\x82\\xac\");\n\n  cesu8_length = jerry_get_string_length (args[0]);\n  utf8_length = jerry_get_utf8_string_length (args[0]);\n\n  cesu8_sz = jerry_get_string_size (args[0]);\n  utf8_sz =  jerry_get_utf8_string_size (args[0]);\n\n  TEST_ASSERT (cesu8_length == utf8_length);\n  TEST_ASSERT (cesu8_length == 10);\n  TEST_ASSERT (cesu8_sz == utf8_sz);\n  TEST_ASSERT (utf8_sz == 12);\n  jerry_release_value (args[0]);\n\n  /* Test string: '3' */\n  {\n    jerry_value_t test_str = jerry_create_string ((const jerry_char_t *) \"3\");\n    char result_string[1] = { 'E' };\n    jerry_size_t copied_utf8 = jerry_substring_to_utf8_char_buffer (test_str,\n                                                                    0,\n                                                                    1,\n                                                                    (jerry_char_t *) result_string,\n                                                                    sizeof (result_string));\n    TEST_ASSERT (copied_utf8 == 1);\n    TEST_ASSERT (result_string[0] == '3');\n\n    result_string[0] = 'E';\n    jerry_size_t copied = jerry_substring_to_char_buffer (test_str,\n                                                          0,\n                                                          1,\n                                                          (jerry_char_t *) result_string,\n                                                          sizeof (result_string));\n    TEST_ASSERT (copied == 1);\n    TEST_ASSERT (result_string[0] == '3');\n\n    jerry_release_value (test_str);\n  }\n\n  /* Test jerry_substring_to_char_buffer */\n  args[0] = jerry_create_string ((jerry_char_t *) \"an ascii string\");\n\n  /* Buffer size */\n  cesu8_sz = 5;\n\n  JERRY_VLA (char, substring, cesu8_sz);\n  sz = jerry_substring_to_char_buffer (args[0], 3, 8, (jerry_char_t *) substring, cesu8_sz);\n  TEST_ASSERT (sz == 5);\n  TEST_ASSERT (!strncmp (substring, \"ascii\", sz));\n\n  /* Buffer size is 5, substring length is 11 => copied only the first 5 char */\n  sz = jerry_substring_to_char_buffer (args[0], 0, 11, (jerry_char_t *) substring, cesu8_sz);\n\n  TEST_ASSERT (sz == 5);\n  TEST_ASSERT (!strncmp (substring, \"an as\", sz));\n\n  /* Position of the first character is greater than the string length */\n  sz = jerry_substring_to_char_buffer (args[0], 16, 21, (jerry_char_t *) substring, cesu8_sz);\n  TEST_ASSERT (sz == 0);\n\n  sz = jerry_substring_to_char_buffer (args[0], 14, 15, (jerry_char_t *) substring, cesu8_sz);\n  TEST_ASSERT (sz == 1);\n  TEST_ASSERT (!strncmp (substring, \"g\", sz));\n\n  sz = jerry_substring_to_char_buffer (args[0], 0, 1, (jerry_char_t *) substring, cesu8_sz);\n  TEST_ASSERT (sz == 1);\n  TEST_ASSERT (!strncmp (substring, \"a\", sz));\n\n  cesu8_length = jerry_get_string_length (args[0]);\n  cesu8_sz = jerry_get_string_size (args[0]);\n  TEST_ASSERT (cesu8_length == 15);\n  TEST_ASSERT (cesu8_length == cesu8_sz);\n\n  JERRY_VLA (char, fullstring, cesu8_sz);\n  sz = jerry_substring_to_char_buffer (args[0], 0, cesu8_length, (jerry_char_t *) fullstring, cesu8_sz);\n  TEST_ASSERT (sz == 15);\n  TEST_ASSERT (!strncmp (fullstring, \"an ascii string\", sz));\n\n  jerry_release_value (args[0]);\n\n  /* Test jerry_substring_to_char_buffer: '0101' */\n  args[0] = jerry_create_string ((jerry_char_t *) \"0101\");\n  cesu8_sz = jerry_get_string_size (args[0]);\n\n  JERRY_VLA (char, number_substring, cesu8_sz);\n\n  sz = jerry_substring_to_char_buffer (args[0], 1, 3, (jerry_char_t *) number_substring, cesu8_sz);\n  TEST_ASSERT (sz == 2);\n  TEST_ASSERT (!strncmp (number_substring, \"10\", sz));\n\n  jerry_release_value (args[0]);\n\n  /* Test jerry_substring_to_char_buffer: 'str: {greek zero sign}' */\n  args[0] = jerry_create_string ((jerry_char_t *) \"\\x73\\x74\\x72\\x3a \\xed\\xa0\\x80\\xed\\xb6\\x8a\");\n  cesu8_sz = jerry_get_string_size (args[0]);\n  cesu8_length = jerry_get_string_length (args[0]);\n  TEST_ASSERT (cesu8_sz == 11);\n  TEST_ASSERT (cesu8_length = 7);\n\n  JERRY_VLA (char, supl_substring, cesu8_sz);\n\n  sz = jerry_substring_to_char_buffer (args[0], 0, cesu8_length, (jerry_char_t *) supl_substring, cesu8_sz);\n  TEST_ASSERT (sz == 11);\n  TEST_ASSERT (!strncmp (supl_substring, \"\\x73\\x74\\x72\\x3a \\xed\\xa0\\x80\\xed\\xb6\\x8a\", sz));\n\n  /* Decrease the buffer size => the low surrogate char will not fit into the buffer */\n  cesu8_sz -= 1;\n  sz = jerry_substring_to_char_buffer (args[0], 0, cesu8_length, (jerry_char_t *) supl_substring, cesu8_sz);\n  TEST_ASSERT (sz == 8);\n  TEST_ASSERT (!strncmp (supl_substring, \"\\x73\\x74\\x72\\x3a \\xed\\xa0\\x80\", sz));\n\n  sz = jerry_substring_to_char_buffer (args[0],\n                                       cesu8_length - 1,\n                                       cesu8_length,\n                                       (jerry_char_t *) supl_substring,\n                                       cesu8_sz);\n  TEST_ASSERT (sz == 3);\n  TEST_ASSERT (!strncmp (supl_substring, \"\\xed\\xb6\\x8a\", sz));\n\n  sz = jerry_substring_to_char_buffer (args[0],\n                                       cesu8_length - 2,\n                                       cesu8_length - 1,\n                                       (jerry_char_t *) supl_substring,\n                                       cesu8_sz);\n  TEST_ASSERT (sz == 3);\n  TEST_ASSERT (!strncmp (supl_substring, \"\\xed\\xa0\\x80\", sz));\n\n  jerry_release_value (args[0]);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api-value-type.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\ntypedef struct\n{\n  jerry_type_t type_info;\n  jerry_value_t value;\n} test_entry_t;\n\n#define ENTRY(TYPE, VALUE) { TYPE, VALUE }\n\nstatic jerry_value_t\ntest_ext_function (const jerry_value_t function_obj, /**< function object */\n                   const jerry_value_t this_val, /**< function this value */\n                   const jerry_value_t args_p[], /**< array of arguments */\n                   const jerry_length_t args_cnt) /**< number of arguments */\n{\n  (void) function_obj;\n  (void) this_val;\n  (void) args_p;\n  (void) args_cnt;\n  return jerry_create_boolean (true);\n} /* test_ext_function */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const jerry_char_t test_eval_function[] = \"function demo(a) { return a + 1; }; demo\";\n\n  test_entry_t entries[] =\n  {\n    ENTRY (JERRY_TYPE_NUMBER, jerry_create_number (-33.0)),\n    ENTRY (JERRY_TYPE_NUMBER, jerry_create_number (3)),\n    ENTRY (JERRY_TYPE_NUMBER, jerry_create_number_nan ()),\n    ENTRY (JERRY_TYPE_NUMBER, jerry_create_number_infinity (false)),\n    ENTRY (JERRY_TYPE_NUMBER, jerry_create_number_infinity (true)),\n\n    ENTRY (JERRY_TYPE_BOOLEAN, jerry_create_boolean (true)),\n    ENTRY (JERRY_TYPE_BOOLEAN, jerry_create_boolean (false)),\n\n    ENTRY (JERRY_TYPE_UNDEFINED, jerry_create_undefined ()),\n\n    ENTRY (JERRY_TYPE_OBJECT, jerry_create_object ()),\n    ENTRY (JERRY_TYPE_OBJECT, jerry_create_array (10)),\n    ENTRY (JERRY_TYPE_ERROR, jerry_create_error (JERRY_ERROR_TYPE, (const jerry_char_t *) \"error\")),\n\n    ENTRY (JERRY_TYPE_NULL, jerry_create_null ()),\n\n    ENTRY (JERRY_TYPE_FUNCTION, jerry_eval (test_eval_function,\n                                            sizeof (test_eval_function) - 1,\n                                            JERRY_PARSE_NO_OPTS)),\n    ENTRY (JERRY_TYPE_FUNCTION, jerry_create_external_function (test_ext_function)),\n\n    ENTRY (JERRY_TYPE_STRING, jerry_create_string (test_eval_function)),\n    ENTRY (JERRY_TYPE_STRING, jerry_create_string ((jerry_char_t *) \"\")),\n  };\n\n  for (size_t idx = 0; idx < sizeof (entries) / sizeof (entries[0]); idx++)\n  {\n    jerry_type_t type_info = jerry_value_get_type (entries[idx].value);\n\n    TEST_ASSERT (type_info != JERRY_TYPE_NONE);\n    TEST_ASSERT (type_info == entries[idx].type_info);\n\n    jerry_release_value (entries[idx].value);\n  }\n\n  if (jerry_is_feature_enabled (JERRY_FEATURE_SYMBOL))\n  {\n    jerry_value_t symbol_desc_value = jerry_create_string ((jerry_char_t *) \"foo\");\n    jerry_value_t symbol_value = jerry_create_symbol (symbol_desc_value);\n    jerry_type_t type_info = jerry_value_get_type (symbol_value);\n\n    TEST_ASSERT (type_info != JERRY_TYPE_NONE);\n    TEST_ASSERT (type_info == JERRY_TYPE_SYMBOL);\n\n    jerry_release_value (symbol_value);\n    jerry_release_value (symbol_desc_value);\n  }\n\n  if (jerry_is_feature_enabled (JERRY_FEATURE_BIGINT))\n  {\n    /* Check simple bigint value type */\n    uint64_t digits_buffer[2] = { 1, 0 };\n    jerry_value_t value_bigint = jerry_create_bigint (digits_buffer, 2, false);\n    jerry_type_t value_type_info = jerry_value_get_type (value_bigint);\n\n    TEST_ASSERT (value_type_info != JERRY_TYPE_NONE);\n    TEST_ASSERT (value_type_info == JERRY_TYPE_BIGINT);\n\n    jerry_release_value (value_bigint);\n\n    /* Check bigint wrapped in object type */\n    jerry_char_t object_bigint_src[] = \"Object(5n)\";\n    jerry_value_t object_bigint = jerry_eval (object_bigint_src, sizeof (object_bigint_src) - 1, JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (object_bigint));\n\n    jerry_type_t object_type_info = jerry_value_get_type (object_bigint);\n\n    TEST_ASSERT (object_type_info != JERRY_TYPE_NONE);\n    TEST_ASSERT (object_type_info == JERRY_TYPE_OBJECT);\n\n    jerry_release_value (object_bigint);\n  }\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-api.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nconst jerry_char_t test_source[] = TEST_STRING_LITERAL (\n  \"function assert (arg) { \"\n  \"  if (!arg) { \"\n  \"    throw Error('Assert failed');\"\n  \"  } \"\n  \"} \"\n  \"this.t = 1; \"\n  \"function f () { \"\n  \"return this.t; \"\n  \"} \"\n  \"this.foo = f; \"\n  \"this.bar = function (a) { \"\n  \"return a + t; \"\n  \"}; \"\n  \"function A () { \"\n  \"this.t = 12; \"\n  \"} \"\n  \"this.A = A; \"\n  \"this.a = new A (); \"\n  \"function call_external () { \"\n  \"  return this.external ('1', true); \"\n  \"} \"\n  \"function call_throw_test() { \"\n  \"  var catched = false; \"\n  \"  try { \"\n  \"    this.throw_test(); \"\n  \"  } catch (e) { \"\n  \"    catched = true; \"\n  \"    assert(e.name == 'TypeError'); \"\n  \"    assert(e.message == 'error'); \"\n  \"  } \"\n  \"  assert(catched); \"\n  \"} \"\n  \"function throw_reference_error() { \"\n  \" throw new ReferenceError ();\"\n  \"} \"\n  \"p = {'alpha':32, 'bravo':false, 'charlie':{}, 'delta':123.45, 'echo':'foobar'};\"\n  \"np = {}; Object.defineProperty (np, 'foxtrot', { \"\n  \"get: function() { throw 'error'; }, enumerable: true }) \"\n);\n\nbool test_api_is_free_callback_was_called = false;\n\nstatic jerry_value_t\nhandler (const jerry_value_t func_obj_val, /**< function object */\n         const jerry_value_t this_val, /**< this value */\n         const jerry_value_t args_p[], /**< arguments list */\n         const jerry_length_t args_cnt) /**< arguments length */\n{\n  char buffer[32];\n  jerry_size_t sz;\n\n  printf (\"ok %u %u %p %u\\n\",\n          (unsigned int) func_obj_val, (unsigned int) this_val, (void *) args_p, (unsigned int) args_cnt);\n\n  TEST_ASSERT (args_cnt == 2);\n\n  TEST_ASSERT (jerry_value_is_string (args_p[0]));\n  sz = jerry_get_string_size (args_p[0]);\n  TEST_ASSERT (sz == 1);\n  sz = jerry_string_to_char_buffer (args_p[0],\n                                    (jerry_char_t *) buffer,\n                                    sz);\n  TEST_ASSERT (sz == 1);\n  TEST_ASSERT (!strncmp (buffer, \"1\", (size_t) sz));\n\n  TEST_ASSERT (jerry_value_is_boolean (args_p[1]));\n\n  return jerry_create_string ((jerry_char_t *) \"string from handler\");\n} /* handler */\n\nstatic jerry_value_t\nhandler_throw_test (const jerry_value_t func_obj_val, /**< function object */\n                    const jerry_value_t this_val, /**< this value */\n                    const jerry_value_t args_p[], /**< arguments list */\n                    const jerry_length_t args_cnt) /**< arguments length */\n{\n  printf (\"ok %u %u %p %u\\n\",\n          (unsigned int) func_obj_val, (unsigned int) this_val, (void *) args_p, (unsigned int) args_cnt);\n\n  return jerry_create_error (JERRY_ERROR_TYPE, (jerry_char_t *) \"error\");\n} /* handler_throw_test */\n\nstatic void\nhandler_construct_1_freecb (void *native_p)\n{\n  TEST_ASSERT ((uintptr_t) native_p == (uintptr_t) 0x0000000000000000ull);\n  printf (\"ok object free callback\\n\");\n\n  test_api_is_free_callback_was_called = true;\n} /* handler_construct_1_freecb */\n\nstatic void\nhandler_construct_2_freecb (void *native_p)\n{\n  TEST_ASSERT ((uintptr_t) native_p == (uintptr_t) 0x0012345678abcdefull);\n  printf (\"ok object free callback\\n\");\n\n  test_api_is_free_callback_was_called = true;\n} /* handler_construct_2_freecb */\n\n/**\n * The name of the jerry_object_native_info_t struct.\n */\n#define JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE(c_type) _jerry_object_native_info_##c_type\n\n/**\n * Define a native pointer's type based on the C type and free callback.\n */\n#define JERRY_DEFINE_NATIVE_HANDLE_INFO(c_type, native_free_cb) \\\n  static const jerry_object_native_info_t JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE (c_type) = \\\n  { \\\n    .free_cb = (jerry_object_native_free_callback_t) native_free_cb \\\n  }\n\nJERRY_DEFINE_NATIVE_HANDLE_INFO (bind1, handler_construct_1_freecb);\nJERRY_DEFINE_NATIVE_HANDLE_INFO (bind2, handler_construct_2_freecb);\nJERRY_DEFINE_NATIVE_HANDLE_INFO (bind3, NULL);\n\nstatic jerry_value_t\nhandler_construct (const jerry_value_t func_obj_val, /**< function object */\n                   const jerry_value_t this_val, /**< this value */\n                   const jerry_value_t args_p[], /**< arguments list */\n                   const jerry_length_t args_cnt) /**< arguments length */\n{\n  printf (\"ok construct %u %u %p %u\\n\",\n          (unsigned int) func_obj_val, (unsigned int) this_val, (void *) args_p, (unsigned int) args_cnt);\n\n  TEST_ASSERT (jerry_value_is_object (this_val));\n\n  TEST_ASSERT (args_cnt == 1);\n  TEST_ASSERT (jerry_value_is_boolean (args_p[0]));\n  TEST_ASSERT (jerry_get_boolean_value (args_p[0]) == true);\n\n  jerry_value_t field_name = jerry_create_string ((jerry_char_t *) \"value_field\");\n  jerry_value_t res = jerry_set_property (this_val, field_name, args_p[0]);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_boolean (res) && jerry_get_boolean_value (res));\n  jerry_release_value (res);\n  jerry_release_value (field_name);\n\n  /* Set a native pointer. */\n  jerry_set_object_native_pointer (this_val,\n                                   (void *) 0x0000000000000000ull,\n                                   &JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE (bind1));\n\n  /* Check that the native pointer was set. */\n  void *ptr = NULL;\n  bool is_ok = jerry_get_object_native_pointer (this_val, &ptr, &JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE (bind1));\n  TEST_ASSERT (is_ok\n               && (uintptr_t) ptr == (uintptr_t) 0x0000000000000000ull);\n\n  /* Set a second native pointer. */\n  jerry_set_object_native_pointer (this_val,\n                                   (void *) 0x0012345678abcdefull,\n                                   &JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE (bind2));\n\n  /* Check that a second native pointer was set. */\n  is_ok = jerry_get_object_native_pointer (this_val, &ptr, &JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE (bind2));\n  TEST_ASSERT (is_ok\n               && (uintptr_t) ptr == (uintptr_t) 0x0012345678abcdefull);\n\n  /* Check that the first native pointer is still set. */\n  is_ok = jerry_get_object_native_pointer (this_val, &ptr, &JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE (bind1));\n  TEST_ASSERT (is_ok\n               && (uintptr_t) ptr == (uintptr_t) 0x0000000000000000ull);\n  return jerry_create_boolean (true);\n} /* handler_construct */\n\n/**\n * Extended Magic Strings\n */\n#define JERRY_MAGIC_STRING_ITEMS \\\n  JERRY_MAGIC_STRING_DEF (GLOBAL, global) \\\n  JERRY_MAGIC_STRING_DEF (GREEK_ZERO_SIGN, \\xed\\xa0\\x80\\xed\\xb6\\x8a) \\\n  JERRY_MAGIC_STRING_DEF (CONSOLE, console)\n\n#define JERRY_MAGIC_STRING_DEF(NAME, STRING) \\\n  static const char jerry_magic_string_ex_ ## NAME[] = # STRING;\n\nJERRY_MAGIC_STRING_ITEMS\n\n#undef JERRY_MAGIC_STRING_DEF\n\nconst jerry_length_t magic_string_lengths[] =\n{\n#define JERRY_MAGIC_STRING_DEF(NAME, STRING) \\\n    (jerry_length_t) (sizeof (jerry_magic_string_ex_ ## NAME) - 1u),\n\n  JERRY_MAGIC_STRING_ITEMS\n\n#undef JERRY_MAGIC_STRING_DEF\n};\n\nconst jerry_char_t *magic_string_items[] =\n{\n#define JERRY_MAGIC_STRING_DEF(NAME, STRING) \\\n    (const jerry_char_t *) jerry_magic_string_ex_ ## NAME,\n\n  JERRY_MAGIC_STRING_ITEMS\n\n#undef JERRY_MAGIC_STRING_DEF\n};\n\nstatic bool\nforeach (const jerry_value_t name, /**< field name */\n         const jerry_value_t value, /**< field value */\n         void *user_data) /**< user data */\n{\n  char str_buf_p[128];\n  jerry_size_t sz = jerry_string_to_char_buffer (name, (jerry_char_t *) str_buf_p, 128);\n  str_buf_p[sz] = '\\0';\n\n  TEST_ASSERT (!strncmp ((const char *) user_data, \"user_data\", 9));\n  TEST_ASSERT (sz > 0);\n\n  if (!strncmp (str_buf_p, \"alpha\", (size_t) sz))\n  {\n    TEST_ASSERT (jerry_value_is_number (value));\n    TEST_ASSERT (jerry_get_number_value (value) == 32.0);\n    return true;\n  }\n  else if (!strncmp (str_buf_p, \"bravo\", (size_t) sz))\n  {\n    TEST_ASSERT (jerry_value_is_boolean (value));\n    TEST_ASSERT (jerry_get_boolean_value (value) == false);\n    return true;\n  }\n  else if (!strncmp (str_buf_p, \"charlie\", (size_t) sz))\n  {\n    TEST_ASSERT (jerry_value_is_object (value));\n    return true;\n  }\n  else if (!strncmp (str_buf_p, \"delta\", (size_t) sz))\n  {\n    TEST_ASSERT (jerry_value_is_number (value));\n    TEST_ASSERT (jerry_get_number_value (value) == 123.45);\n    return true;\n  }\n  else if (!strncmp (str_buf_p, \"echo\", (size_t) sz))\n  {\n    TEST_ASSERT (jerry_value_is_string (value));\n    jerry_size_t echo_sz = jerry_string_to_char_buffer (value,\n                                                        (jerry_char_t *) str_buf_p,\n                                                        128);\n    str_buf_p[echo_sz] = '\\0';\n    TEST_ASSERT (!strncmp (str_buf_p, \"foobar\", (size_t) echo_sz));\n    return true;\n  }\n\n  TEST_ASSERT (false);\n  return false;\n} /* foreach */\n\nstatic bool\nforeach_exception (const jerry_value_t name, /**< field name */\n                   const jerry_value_t value, /**< field value */\n                   void *user_data) /**< user data */\n{\n  JERRY_UNUSED (value);\n  JERRY_UNUSED (user_data);\n  char str_buf_p[128];\n  jerry_size_t sz = jerry_string_to_char_buffer (name, (jerry_char_t *) str_buf_p, 128);\n  str_buf_p[sz] = '\\0';\n\n  if (!strncmp (str_buf_p, \"foxtrot\", (size_t) sz))\n  {\n    TEST_ASSERT (false);\n  }\n\n  return true;\n} /* foreach_exception */\n\nstatic bool\nforeach_subset (const jerry_value_t name, /**< field name */\n                const jerry_value_t value, /**< field value */\n                void *user_data) /**< user data */\n{\n  JERRY_UNUSED (name);\n  JERRY_UNUSED (value);\n  int *count_p = (int *) (user_data);\n\n  if (*count_p == 3)\n  {\n    return false;\n  }\n  (*count_p)++;\n  return true;\n} /* foreach_subset */\n\nstatic jerry_value_t\nget_property (const jerry_value_t obj_val, /**< object value */\n              const char *str_p) /**< property name */\n{\n  jerry_value_t prop_name_val = jerry_create_string ((const jerry_char_t *) str_p);\n  jerry_value_t ret_val = jerry_get_property (obj_val, prop_name_val);\n  jerry_release_value (prop_name_val);\n  return ret_val;\n} /* get_property */\n\nstatic jerry_value_t\nset_property (const jerry_value_t obj_val, /**< object value */\n              const char *str_p, /**< property name */\n              const jerry_value_t val) /**< value to set */\n{\n  jerry_value_t prop_name_val = jerry_create_string ((const jerry_char_t *) str_p);\n  jerry_value_t ret_val = jerry_set_property (obj_val, prop_name_val, val);\n  jerry_release_value (prop_name_val);\n  return ret_val;\n} /* set_property */\n\nstatic bool\ntest_run_simple (const char *script_p) /**< source code to run */\n{\n  size_t script_size = strlen (script_p);\n\n  return jerry_run_simple ((const jerry_char_t *) script_p, script_size, JERRY_INIT_EMPTY);\n} /* test_run_simple */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  bool is_ok;\n  jerry_size_t sz, cesu8_sz;\n  jerry_length_t cesu8_length;\n  jerry_value_t val_t, val_foo, val_bar, val_A, val_A_prototype, val_a, val_a_foo, val_value_field, val_p, val_np;\n  jerry_value_t val_call_external;\n  jerry_value_t global_obj_val, obj_val;\n  jerry_value_t external_func_val, external_construct_val;\n  jerry_value_t throw_test_handler_val;\n  jerry_value_t parsed_code_val, proto_val, prim_val;\n  jerry_value_t res, args[2];\n  double number_val;\n  char buffer[32];\n\n  is_ok = test_run_simple (\"throw 'Hello World';\");\n  TEST_ASSERT (!is_ok);\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  parsed_code_val = jerry_parse (NULL,\n                                 0,\n                                 test_source,\n                                 sizeof (test_source) - 1,\n                                 JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n  res = jerry_run (parsed_code_val);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n\n  global_obj_val = jerry_get_global_object ();\n\n  /* Get global.boo (non-existing field) */\n  val_t = get_property (global_obj_val, \"boo\");\n  TEST_ASSERT (!jerry_value_is_error (val_t));\n  TEST_ASSERT (jerry_value_is_undefined (val_t));\n\n  /* Get global.t */\n  val_t = get_property (global_obj_val, \"t\");\n  TEST_ASSERT (!jerry_value_is_error (val_t));\n  TEST_ASSERT (jerry_value_is_number (val_t)\n               && jerry_get_number_value (val_t) == 1.0);\n  jerry_release_value (val_t);\n\n  /* Get global.foo */\n  val_foo = get_property (global_obj_val, \"foo\");\n  TEST_ASSERT (!jerry_value_is_error (val_foo));\n  TEST_ASSERT (jerry_value_is_object (val_foo));\n\n  /* Call foo (4, 2) */\n  args[0] = jerry_create_number (4);\n  args[1] = jerry_create_number (2);\n  res = jerry_call_function (val_foo, jerry_create_undefined (), args, 2);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_number (res)\n               && jerry_get_number_value (res) == 1.0);\n  jerry_release_value (res);\n\n  /* Get global.bar */\n  val_bar = get_property (global_obj_val, \"bar\");\n  TEST_ASSERT (!jerry_value_is_error (val_bar));\n  TEST_ASSERT (jerry_value_is_object (val_bar));\n\n  /* Call bar (4, 2) */\n  res = jerry_call_function (val_bar, jerry_create_undefined (), args, 2);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_number (res)\n               && jerry_get_number_value (res) == 5.0);\n  jerry_release_value (res);\n  jerry_release_value (val_bar);\n\n  /* Set global.t = \"abcd\" */\n  jerry_release_value (args[0]);\n  args[0] = jerry_create_string ((jerry_char_t *) \"abcd\");\n  res = set_property (global_obj_val, \"t\", args[0]);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_get_boolean_value (res));\n  jerry_release_value (res);\n\n  /* Call foo (4, 2) */\n  res = jerry_call_function (val_foo, jerry_create_undefined (), args, 2);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_string (res));\n  sz = jerry_get_string_size (res);\n  TEST_ASSERT (sz == 4);\n  sz = jerry_string_to_char_buffer (res, (jerry_char_t *) buffer, sz);\n  TEST_ASSERT (sz == 4);\n  jerry_release_value (res);\n  TEST_ASSERT (!strncmp (buffer, \"abcd\", (size_t) sz));\n  jerry_release_value (args[0]);\n  jerry_release_value (args[1]);\n\n  /* Get global.A */\n  val_A = get_property (global_obj_val, \"A\");\n  TEST_ASSERT (!jerry_value_is_error (val_A));\n  TEST_ASSERT (jerry_value_is_object (val_A));\n\n  /* Get A.prototype */\n  is_ok = jerry_value_is_constructor (val_A);\n  TEST_ASSERT (is_ok);\n  val_A_prototype = get_property (val_A, \"prototype\");\n  TEST_ASSERT (!jerry_value_is_error (val_A_prototype));\n  TEST_ASSERT (jerry_value_is_object (val_A_prototype));\n  jerry_release_value (val_A);\n\n  /* Set A.prototype.foo = global.foo */\n  res = set_property (val_A_prototype, \"foo\", val_foo);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_get_boolean_value (res));\n  jerry_release_value (res);\n  jerry_release_value (val_A_prototype);\n  jerry_release_value (val_foo);\n\n  /* Get global.a */\n  val_a = get_property (global_obj_val, \"a\");\n  TEST_ASSERT (!jerry_value_is_error (val_a));\n  TEST_ASSERT (jerry_value_is_object (val_a));\n\n  /* Get a.t */\n  res = get_property (val_a, \"t\");\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_number (res)\n               && jerry_get_number_value (res) == 12.0);\n  jerry_release_value (res);\n\n  /* foreach properties */\n  val_p = get_property (global_obj_val, \"p\");\n  is_ok = jerry_foreach_object_property (val_p, foreach, (void *) \"user_data\");\n  TEST_ASSERT (is_ok);\n\n  /* break foreach at third element */\n  int count = 0;\n  is_ok = jerry_foreach_object_property (val_p, foreach_subset, &count);\n  TEST_ASSERT (is_ok);\n  TEST_ASSERT (count == 3);\n  jerry_release_value (val_p);\n\n  /* foreach with throw test */\n  val_np = get_property (global_obj_val, \"np\");\n  is_ok = !jerry_foreach_object_property (val_np, foreach_exception, NULL);\n  TEST_ASSERT (is_ok);\n  jerry_release_value (val_np);\n\n  /* Get a.foo */\n  val_a_foo = get_property (val_a, \"foo\");\n  TEST_ASSERT (!jerry_value_is_error (val_a_foo));\n  TEST_ASSERT (jerry_value_is_object (val_a_foo));\n\n  /* Call a.foo () */\n  res = jerry_call_function (val_a_foo, val_a, NULL, 0);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_number (res)\n               && jerry_get_number_value (res) == 12.0);\n  jerry_release_value (res);\n  jerry_release_value (val_a_foo);\n\n  jerry_release_value (val_a);\n\n  /* Create native handler bound function object and set it to 'external' variable */\n  external_func_val = jerry_create_external_function (handler);\n  TEST_ASSERT (jerry_value_is_function (external_func_val)\n               && jerry_value_is_constructor (external_func_val));\n\n  res = set_property (global_obj_val, \"external\", external_func_val);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_get_boolean_value (res));\n  jerry_release_value (external_func_val);\n\n  /* Call 'call_external' function that should call external function created above */\n  val_call_external = get_property (global_obj_val, \"call_external\");\n  TEST_ASSERT (!jerry_value_is_error (val_call_external));\n  TEST_ASSERT (jerry_value_is_object (val_call_external));\n  res = jerry_call_function (val_call_external, global_obj_val, NULL, 0);\n  jerry_release_value (val_call_external);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_string (res));\n  sz = jerry_get_string_size (res);\n  TEST_ASSERT (sz == 19);\n  sz = jerry_string_to_char_buffer (res, (jerry_char_t *) buffer, sz);\n  TEST_ASSERT (sz == 19);\n  jerry_release_value (res);\n  TEST_ASSERT (!strncmp (buffer, \"string from handler\", (size_t) sz));\n\n  /* Create native handler bound function object and set it to 'external_construct' variable */\n  external_construct_val = jerry_create_external_function (handler_construct);\n  TEST_ASSERT (jerry_value_is_function (external_construct_val)\n               && jerry_value_is_constructor (external_construct_val));\n\n  res = set_property (global_obj_val, \"external_construct\", external_construct_val);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_get_boolean_value (res));\n  jerry_release_value (res);\n\n  /* Call external function created above, as constructor */\n  args[0] = jerry_create_boolean (true);\n  res = jerry_construct_object (external_construct_val, args, 1);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_object (res));\n  val_value_field = get_property (res, \"value_field\");\n\n  /* Get 'value_field' of constructed object */\n  TEST_ASSERT (!jerry_value_is_error (val_value_field));\n  TEST_ASSERT (jerry_value_is_boolean (val_value_field)\n               && jerry_get_boolean_value (val_value_field));\n  jerry_release_value (val_value_field);\n  jerry_release_value (external_construct_val);\n\n  void *ptr = NULL;\n  is_ok = jerry_get_object_native_pointer (res, &ptr, &JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE (bind2));\n  TEST_ASSERT (is_ok\n               && (uintptr_t) ptr == (uintptr_t) 0x0012345678abcdefull);\n\n  /* Passing NULL for info_p is allowed. */\n  is_ok = jerry_get_object_native_pointer (res, &ptr, NULL);\n  TEST_ASSERT (!is_ok);\n\n  jerry_release_value (res);\n\n  /* Test: It is ok to set native pointer's free callback as NULL. */\n  jerry_value_t obj_freecb = jerry_create_object ();\n  jerry_set_object_native_pointer (obj_freecb,\n                                   (void *) 0x1234,\n                                   &JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE (bind3));\n\n  jerry_release_value (obj_freecb);\n\n  /* Test: Throwing exception from native handler. */\n  throw_test_handler_val = jerry_create_external_function (handler_throw_test);\n  TEST_ASSERT (jerry_value_is_function (throw_test_handler_val));\n\n  res = set_property (global_obj_val, \"throw_test\", throw_test_handler_val);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_get_boolean_value (res));\n  jerry_release_value (res);\n  jerry_release_value (throw_test_handler_val);\n\n  val_t = get_property (global_obj_val, \"call_throw_test\");\n  TEST_ASSERT (!jerry_value_is_error (val_t));\n  TEST_ASSERT (jerry_value_is_object (val_t));\n\n  res = jerry_call_function (val_t, global_obj_val, NULL, 0);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  jerry_release_value (val_t);\n  jerry_release_value (res);\n\n  /* Test: Unhandled exception in called function */\n  val_t = get_property (global_obj_val, \"throw_reference_error\");\n  TEST_ASSERT (!jerry_value_is_error (val_t));\n  TEST_ASSERT (jerry_value_is_object (val_t));\n\n  res = jerry_call_function (val_t, global_obj_val, NULL, 0);\n\n  TEST_ASSERT (jerry_value_is_error (res));\n  jerry_release_value (val_t);\n\n  /* 'res' should contain exception object */\n  res = jerry_get_value_from_error (res, true);\n  TEST_ASSERT (jerry_value_is_object (res));\n  jerry_release_value (res);\n\n  /* Test: Call of non-function */\n  obj_val = jerry_create_object ();\n  res = jerry_call_function (obj_val, global_obj_val, NULL, 0);\n  TEST_ASSERT (jerry_value_is_error (res));\n\n  /* 'res' should contain exception object */\n  res = jerry_get_value_from_error (res, true);\n  TEST_ASSERT (jerry_value_is_object (res));\n  jerry_release_value (res);\n\n  jerry_release_value (obj_val);\n\n  /* Test: Unhandled exception in function called, as constructor */\n  val_t = get_property (global_obj_val, \"throw_reference_error\");\n  TEST_ASSERT (!jerry_value_is_error (val_t));\n  TEST_ASSERT (jerry_value_is_object (val_t));\n\n  res = jerry_construct_object (val_t, NULL, 0);\n  TEST_ASSERT (jerry_value_is_error (res));\n  jerry_release_value (val_t);\n\n  /* 'res' should contain exception object */\n  res = jerry_get_value_from_error (res, true);\n  TEST_ASSERT (jerry_value_is_object (res));\n  jerry_release_value (res);\n\n  /* Test: Call of non-function as constructor */\n  obj_val = jerry_create_object ();\n  res = jerry_construct_object (obj_val, NULL, 0);\n  TEST_ASSERT (jerry_value_is_error (res));\n\n  /* 'res' should contain exception object */\n  res = jerry_get_value_from_error (res, true);\n  TEST_ASSERT (jerry_value_is_object (res));\n  jerry_release_value (res);\n\n  jerry_release_value (obj_val);\n\n  /* Test: Array Object API */\n  jerry_value_t array_obj_val = jerry_create_array (10);\n  TEST_ASSERT (jerry_value_is_array (array_obj_val));\n  TEST_ASSERT (jerry_get_array_length (array_obj_val) == 10);\n\n  jerry_value_t v_in = jerry_create_number (10.5);\n  res = jerry_set_property_by_index (array_obj_val, 5, v_in);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_boolean (res) && jerry_get_boolean_value (res));\n  jerry_release_value (res);\n  jerry_value_t v_out = jerry_get_property_by_index (array_obj_val, 5);\n\n  TEST_ASSERT (jerry_value_is_number (v_out)\n               && jerry_get_number_value (v_out) == 10.5);\n\n  jerry_delete_property_by_index (array_obj_val, 5);\n  jerry_value_t v_und = jerry_get_property_by_index (array_obj_val, 5);\n\n  TEST_ASSERT (jerry_value_is_undefined (v_und));\n\n  jerry_release_value (v_in);\n  jerry_release_value (v_out);\n  jerry_release_value (v_und);\n  jerry_release_value (array_obj_val);\n\n  /* Test: object keys */\n  res = jerry_get_object_keys (global_obj_val);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_array (res));\n  TEST_ASSERT (jerry_get_array_length (res) == 15);\n  jerry_release_value (res);\n\n  /* Test: jerry_value_to_primitive */\n  obj_val = jerry_eval ((jerry_char_t *) \"new String ('hello')\", 20, JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (obj_val));\n  TEST_ASSERT (jerry_value_is_object (obj_val));\n  TEST_ASSERT (!jerry_value_is_string (obj_val));\n  prim_val = jerry_value_to_primitive (obj_val);\n  TEST_ASSERT (!jerry_value_is_error (prim_val));\n  TEST_ASSERT (jerry_value_is_string (prim_val));\n  jerry_release_value (prim_val);\n\n  /* Test: jerry_get_prototype */\n  proto_val = jerry_get_prototype (jerry_create_undefined ());\n  TEST_ASSERT (jerry_value_is_error (proto_val));\n  jerry_value_t error = jerry_get_value_from_error (proto_val, true);\n  TEST_ASSERT (jerry_get_error_type (error) == JERRY_ERROR_TYPE);\n  jerry_release_value (error);\n\n  proto_val = jerry_get_prototype (obj_val);\n  TEST_ASSERT (!jerry_value_is_error (proto_val));\n  TEST_ASSERT (jerry_value_is_object (proto_val));\n  jerry_release_value (proto_val);\n  jerry_release_value (obj_val);\n\n  if (jerry_is_feature_enabled (JERRY_FEATURE_PROXY))\n  {\n    jerry_value_t target = jerry_create_object ();\n    jerry_value_t handler = jerry_create_object ();\n    jerry_value_t proxy = jerry_create_proxy (target, handler);\n    jerry_value_t obj_proto = jerry_eval ((jerry_char_t *) \"Object.prototype\", 16, JERRY_PARSE_NO_OPTS);\n\n    jerry_release_value (target);\n    jerry_release_value (handler);\n    proto_val = jerry_get_prototype (proxy);\n    TEST_ASSERT (!jerry_value_is_error (proto_val));\n    TEST_ASSERT (proto_val == obj_proto);\n    jerry_release_value (proto_val);\n    jerry_release_value (obj_proto);\n    jerry_release_value (proxy);\n  }\n\n  /* Test: jerry_set_prototype */\n  obj_val = jerry_create_object ();\n  res = jerry_set_prototype (obj_val, jerry_create_null ());\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_boolean (res));\n  TEST_ASSERT (jerry_get_boolean_value (res));\n\n  jerry_value_t new_proto = jerry_create_object ();\n  res = jerry_set_prototype (obj_val, new_proto);\n  jerry_release_value (new_proto);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_boolean (res));\n  TEST_ASSERT (jerry_get_boolean_value (res));\n  proto_val = jerry_get_prototype (obj_val);\n  TEST_ASSERT (!jerry_value_is_error (proto_val));\n  TEST_ASSERT (jerry_value_is_object (proto_val));\n  jerry_release_value (proto_val);\n  jerry_release_value (obj_val);\n\n  if (jerry_is_feature_enabled (JERRY_FEATURE_PROXY))\n  {\n    jerry_value_t target = jerry_create_object ();\n    jerry_value_t handler = jerry_create_object ();\n    jerry_value_t proxy = jerry_create_proxy (target, handler);\n    new_proto = jerry_eval ((jerry_char_t *) \"Function.prototype\", 18, JERRY_PARSE_NO_OPTS);\n\n    res = jerry_set_prototype (proxy, new_proto);\n    TEST_ASSERT (!jerry_value_is_error (res));\n    jerry_value_t target_proto = jerry_get_prototype (target);\n    TEST_ASSERT (target_proto == new_proto);\n\n    jerry_release_value (target);\n    jerry_release_value (handler);\n    jerry_release_value (proxy);\n    jerry_release_value (new_proto);\n    jerry_release_value (target_proto);\n  }\n\n  /* Test: eval */\n  const jerry_char_t eval_code_src1[] = \"(function () { return 123; })\";\n  val_t = jerry_eval (eval_code_src1, sizeof (eval_code_src1) - 1, JERRY_PARSE_STRICT_MODE);\n  TEST_ASSERT (!jerry_value_is_error (val_t));\n  TEST_ASSERT (jerry_value_is_object (val_t));\n  TEST_ASSERT (jerry_value_is_function (val_t));\n\n  res = jerry_call_function (val_t, jerry_create_undefined (), NULL, 0);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_number (res)\n               && jerry_get_number_value (res) == 123.0);\n  jerry_release_value (res);\n\n  jerry_release_value (val_t);\n\n  /* cleanup. */\n  jerry_release_value (global_obj_val);\n\n  /* Test: run gc. */\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n\n  /* Test: spaces */\n  const jerry_char_t eval_code_src2[] = \"\\x0a \\x0b \\x0c \\xc2\\xa0 \\xe2\\x80\\xa8 \\xe2\\x80\\xa9 \\xef\\xbb\\xbf 4321\";\n  val_t = jerry_eval (eval_code_src2, sizeof (eval_code_src2) - 1, JERRY_PARSE_STRICT_MODE);\n  TEST_ASSERT (!jerry_value_is_error (val_t));\n  TEST_ASSERT (jerry_value_is_number (val_t)\n               && jerry_get_number_value (val_t) == 4321.0);\n  jerry_release_value (val_t);\n\n  /* Test: number */\n  val_t = jerry_create_number (6.25);\n  number_val = jerry_get_number_value (val_t);\n  TEST_ASSERT (number_val * 3 == 18.75);\n  jerry_release_value (val_t);\n\n  val_t = jerry_create_number_infinity (true);\n  number_val = jerry_get_number_value (val_t);\n  TEST_ASSERT (number_val * 3 == number_val && number_val != 0.0);\n  jerry_release_value (val_t);\n\n  val_t = jerry_create_number_nan ();\n  number_val = jerry_get_number_value (val_t);\n  TEST_ASSERT (number_val != number_val);\n  jerry_release_value (val_t);\n\n  /* Test: create function */\n  const jerry_char_t func_resource[] = \"unknown\";\n  const jerry_char_t func_arg_list[] = \"a , b,c\";\n  const jerry_char_t func_src[] = \"  return 5 +  a+\\nb+c\";\n\n  jerry_value_t func_val = jerry_parse_function (func_resource,\n                                                 sizeof (func_resource) - 1,\n                                                 func_arg_list,\n                                                 sizeof (func_arg_list) - 1,\n                                                 func_src,\n                                                 sizeof (func_src) - 1,\n                                                 JERRY_PARSE_NO_OPTS);\n\n  TEST_ASSERT (!jerry_value_is_error (func_val));\n\n  jerry_value_t func_args[3] =\n  {\n    jerry_create_number (4),\n    jerry_create_number (6),\n    jerry_create_number (-2)\n  };\n\n  val_t = jerry_call_function (func_val, func_args[0], func_args, 3);\n  number_val = jerry_get_number_value (val_t);\n  TEST_ASSERT (number_val == 13.0);\n\n  jerry_release_value (val_t);\n  jerry_release_value (func_val);\n\n  jerry_cleanup ();\n\n  TEST_ASSERT (test_api_is_free_callback_was_called);\n\n  /* Test: jerry_get_value_from_error */\n  {\n    jerry_init (JERRY_INIT_EMPTY);\n    jerry_value_t num_val = jerry_create_number (123);\n    num_val = jerry_create_error_from_value (num_val, true);\n    TEST_ASSERT (jerry_value_is_error (num_val));\n    jerry_value_t num2_val = jerry_get_value_from_error (num_val, false);\n    TEST_ASSERT (jerry_value_is_error (num_val));\n    TEST_ASSERT (!jerry_value_is_error (num2_val));\n    double num = jerry_get_number_value (num2_val);\n    TEST_ASSERT (num == 123);\n    num2_val = jerry_get_value_from_error (num_val, true);\n    TEST_ASSERT (!jerry_value_is_error (num2_val));\n    num = jerry_get_number_value (num2_val);\n    TEST_ASSERT (num == 123);\n    jerry_release_value (num2_val);\n    jerry_cleanup ();\n  }\n\n  /* Test parsing/executing scripts with lexically scoped global variables multiple times. */\n  if (jerry_is_feature_enabled (JERRY_FEATURE_SYMBOL))\n  {\n    jerry_init (JERRY_INIT_EMPTY);\n    const jerry_char_t scoped_src_p[] = \"let a;\";\n    jerry_value_t parse_result = jerry_parse (NULL,\n                                              0,\n                                              scoped_src_p,\n                                              sizeof (scoped_src_p) - 1,\n                                              JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parse_result));\n    jerry_release_value (parse_result);\n\n    parse_result = jerry_parse (NULL,\n                                0,\n                                scoped_src_p,\n                                sizeof (scoped_src_p) - 1,\n                                JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parse_result));\n\n    jerry_value_t run_result = jerry_run (parse_result);\n    TEST_ASSERT (!jerry_value_is_error (run_result));\n    jerry_release_value (run_result);\n\n    /* Should be a syntax error due to redeclaration. */\n    run_result = jerry_run (parse_result);\n    TEST_ASSERT (jerry_value_is_error (run_result));\n    jerry_release_value (run_result);\n    jerry_release_value (parse_result);\n\n    /* The variable should have no effect on parsing. */\n    parse_result = jerry_parse (NULL,\n                                0,\n                                scoped_src_p,\n                                sizeof (scoped_src_p) - 1,\n                                JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parse_result));\n    jerry_release_value (parse_result);\n    jerry_cleanup ();\n  }\n\n  /* Test: parser error location */\n  if (jerry_is_feature_enabled (JERRY_FEATURE_ERROR_MESSAGES))\n  {\n    jerry_init (JERRY_INIT_SHOW_OPCODES);\n\n    const jerry_char_t parser_err_src[] = \"b = 'hello';\\nvar a = (;\";\n    parsed_code_val = jerry_parse (NULL,\n                                   0,\n                                   parser_err_src,\n                                   sizeof (parser_err_src) - 1,\n                                   JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (jerry_value_is_error (parsed_code_val));\n    parsed_code_val = jerry_get_value_from_error (parsed_code_val, true);\n    jerry_value_t err_str_val = jerry_value_to_string (parsed_code_val);\n    jerry_size_t err_str_size = jerry_get_string_size (err_str_val);\n    jerry_char_t err_str_buf[256];\n    sz = jerry_string_to_char_buffer (err_str_val, err_str_buf, err_str_size);\n    err_str_buf[sz] = 0;\n\n    jerry_release_value (err_str_val);\n    jerry_release_value (parsed_code_val);\n    TEST_ASSERT (!strcmp ((char *) err_str_buf,\n                          \"SyntaxError: Primary expression expected. [<anonymous>:2:10]\"));\n\n    const jerry_char_t file_str[] = \"filename.js\";\n    parsed_code_val = jerry_parse (file_str,\n                                   sizeof (file_str) - 1,\n                                   parser_err_src,\n                                   sizeof (parser_err_src) - 1,\n                                   JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (jerry_value_is_error (parsed_code_val));\n    parsed_code_val = jerry_get_value_from_error (parsed_code_val, true);\n    err_str_val = jerry_value_to_string (parsed_code_val);\n    err_str_size = jerry_get_string_size (err_str_val);\n\n    sz = jerry_string_to_char_buffer (err_str_val, err_str_buf, err_str_size);\n    err_str_buf[sz] = 0;\n\n    jerry_release_value (err_str_val);\n    jerry_release_value (parsed_code_val);\n    TEST_ASSERT (!strcmp ((char *) err_str_buf,\n                          \"SyntaxError: Primary expression expected. [filename.js:2:10]\"));\n\n    const jerry_char_t eval_err_src[] = \"eval(\\\"var b;\\\\nfor (,); \\\");\";\n    parsed_code_val = jerry_parse (file_str,\n                                   sizeof (file_str),\n                                   eval_err_src,\n                                   sizeof (eval_err_src) - 1,\n                                   JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n    res = jerry_run (parsed_code_val);\n    TEST_ASSERT (jerry_value_is_error (res));\n    res = jerry_get_value_from_error (res, true);\n    err_str_val = jerry_value_to_string (res);\n    err_str_size = jerry_get_string_size (err_str_val);\n\n    sz = jerry_string_to_char_buffer (err_str_val, err_str_buf, err_str_size);\n    err_str_buf[sz] = 0;\n\n    jerry_release_value (err_str_val);\n    jerry_release_value (parsed_code_val);\n    jerry_release_value (res);\n    TEST_ASSERT (!strcmp ((char *) err_str_buf,\n                          \"SyntaxError: Primary expression expected. [<eval>:2:6]\"));\n\n    jerry_cleanup ();\n  }\n\n  /* External Magic String */\n  jerry_init (JERRY_INIT_SHOW_OPCODES);\n\n  uint32_t num_magic_string_items = (uint32_t) (sizeof (magic_string_items) / sizeof (jerry_char_t *));\n  jerry_register_magic_strings (magic_string_items,\n                                num_magic_string_items,\n                                magic_string_lengths);\n\n  const jerry_char_t ms_code_src[] = \"var global = {}; var console = [1]; var process = 1;\";\n  parsed_code_val = jerry_parse (NULL,\n                                 0,\n                                 ms_code_src,\n                                 sizeof (ms_code_src) - 1,\n                                 JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n  res = jerry_run (parsed_code_val);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n\n  /* call jerry_create_string functions which will returns with the registered external magic strings */\n  args[0] = jerry_create_string ((jerry_char_t *) \"console\");\n  args[1] = jerry_create_string ((jerry_char_t *) \"\\xed\\xa0\\x80\\xed\\xb6\\x8a\"); /**< greek zero sign */\n\n  cesu8_length = jerry_get_string_length (args[0]);\n  cesu8_sz = jerry_get_string_size (args[0]);\n\n  JERRY_VLA (char, string_console, cesu8_sz);\n  jerry_string_to_char_buffer (args[0], (jerry_char_t *) string_console, cesu8_sz);\n\n  TEST_ASSERT (!strncmp (string_console, \"console\", cesu8_sz));\n  TEST_ASSERT (cesu8_length == 7);\n  TEST_ASSERT (cesu8_length == cesu8_sz);\n\n  jerry_release_value (args[0]);\n\n  const jerry_char_t test_magic_str_access_src[] = \"'console'.charAt(6) == 'e'\";\n  res = jerry_eval (test_magic_str_access_src,\n                    sizeof (test_magic_str_access_src) - 1,\n                    JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (jerry_value_is_boolean (res));\n  TEST_ASSERT (jerry_get_boolean_value (res) == true);\n\n  jerry_release_value (res);\n\n  cesu8_length = jerry_get_string_length (args[1]);\n  cesu8_sz = jerry_get_string_size (args[1]);\n\n  JERRY_VLA (char, string_greek_zero_sign, cesu8_sz);\n  jerry_string_to_char_buffer (args[1], (jerry_char_t *) string_greek_zero_sign, cesu8_sz);\n\n  TEST_ASSERT (!strncmp (string_greek_zero_sign, \"\\xed\\xa0\\x80\\xed\\xb6\\x8a\", cesu8_sz));\n  TEST_ASSERT (cesu8_length == 2);\n  TEST_ASSERT (cesu8_sz == 6);\n\n  jerry_release_value (args[1]);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-arraybuffer.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\n/**\n * Register a JavaScript value in the global object.\n */\nstatic void\nregister_js_value (const char *name_p, /**< name of the function */\n                   jerry_value_t value) /**< JS value */\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  jerry_value_t name_val = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t result_val = jerry_set_property (global_obj_val, name_val, value);\n  TEST_ASSERT (jerry_value_is_boolean (result_val));\n\n  jerry_release_value (name_val);\n  jerry_release_value (global_obj_val);\n\n  jerry_release_value (result_val);\n} /* register_js_value */\n\nstatic jerry_value_t\nassert_handler (const jerry_value_t func_obj_val, /**< function object */\n                const jerry_value_t this_val, /**< this arg */\n                const jerry_value_t args_p[], /**< function arguments */\n                const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  if (args_cnt > 0\n      && jerry_value_is_boolean (args_p[0])\n      && jerry_get_boolean_value (args_p[0]))\n  {\n    return jerry_create_boolean (true);\n  }\n\n  if (args_cnt > 1\n      && jerry_value_is_string (args_p[1]))\n  {\n    jerry_length_t utf8_sz = jerry_get_string_size (args_p[1]);\n    JERRY_VLA (char, string_from_utf8, utf8_sz);\n    string_from_utf8[utf8_sz] = 0;\n\n    jerry_string_to_char_buffer (args_p[1], (jerry_char_t *) string_from_utf8, utf8_sz);\n\n    printf (\"JS assert: %s\\n\", string_from_utf8);\n  }\n\n  TEST_ASSERT (false);\n} /* assert_handler */\n\n/**\n * Test ArrayBuffer 'read' api call with various offset values.\n */\nstatic void\ntest_read_with_offset (uint8_t offset) /**< offset for buffer read. */\n{\n  const jerry_char_t eval_arraybuffer_src[] = TEST_STRING_LITERAL (\n    \"var array = new Uint8Array (15);\"\n    \"for (var i = 0; i < array.length; i++) { array[i] = i * 2; };\"\n    \"array.buffer\"\n  );\n  jerry_value_t arraybuffer = jerry_eval (eval_arraybuffer_src,\n                                          sizeof (eval_arraybuffer_src) - 1,\n                                          JERRY_PARSE_STRICT_MODE);\n\n  TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n  TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n  TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == 15);\n\n  uint8_t buffer[20];\n  memset (buffer, 120, 20);\n\n  /* Try to copy more than the target buffer size. */\n  jerry_length_t copied = jerry_arraybuffer_read (arraybuffer, offset, buffer, 20);\n  TEST_ASSERT (copied == (jerry_length_t) (15 - offset));\n\n  for (uint8_t i = 0; i < copied; i++)\n  {\n    TEST_ASSERT (buffer[i] == (i + offset) * 2);\n  }\n  TEST_ASSERT (buffer[15 - offset] == 120);\n\n  jerry_release_value (arraybuffer);\n} /* test_read_with_offset */\n\n/**\n * Test ArrayBuffer 'write' api call with various offset values.\n */\nstatic void test_write_with_offset (uint8_t offset) /**< offset for buffer write. */\n{\n  {\n    jerry_value_t offset_val = jerry_create_number (offset);\n    register_js_value (\"offset\", offset_val);\n    jerry_release_value (offset_val);\n  }\n\n  const jerry_char_t eval_arraybuffer_src[] = \"var array = new Uint8Array (15); array.buffer\";\n  jerry_value_t arraybuffer = jerry_eval (eval_arraybuffer_src,\n                                          sizeof (eval_arraybuffer_src) - 1,\n                                          JERRY_PARSE_STRICT_MODE);\n\n  TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n  TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n  TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == 15);\n\n  uint8_t buffer[20];\n\n  for (uint8_t i = 0; i < 20; i++)\n  {\n    buffer[i] = (uint8_t) (i * 3);\n  }\n\n  /* Intentionally copy more than the allowed space. */\n  jerry_length_t copied = jerry_arraybuffer_write (arraybuffer, offset, buffer, 20);\n  TEST_ASSERT (copied == (jerry_length_t) (15 - offset));\n\n  const jerry_char_t eval_test_arraybuffer[] = TEST_STRING_LITERAL (\n    \"for (var i = 0; i < offset; i++)\"\n    \"{\"\n    \"  assert (array[i] == 0, 'offset check for: ' + i + ' was: ' + array[i] + ' should be: 0');\"\n    \"};\"\n    \"for (var i = offset; i < array.length; i++)\"\n    \"{\"\n    \"  var expected = (i - offset) * 3;\"\n    \"  assert (array[i] == expected, 'calc check for: ' + i + ' was: ' + array[i] + ' should be: ' + expected);\"\n    \"};\"\n    \"assert (array[15] === undefined, 'ArrayBuffer out of bounds index should return undefined value');\"\n  );\n  jerry_value_t res = jerry_eval (eval_test_arraybuffer,\n                                  sizeof (eval_test_arraybuffer) - 1,\n                                  JERRY_PARSE_STRICT_MODE);\n  jerry_release_value (res);\n  jerry_release_value (arraybuffer);\n} /* test_write_with_offset */\n\nstatic bool callback_called = false;\nstatic bool detach_free_callback_called = false;\n\nstatic void test_free_cb (void *buffer) /**< buffer to free (if needed) */\n{\n  (void) buffer;\n  callback_called = true;\n} /* test_free_cb */\n\nstatic void test_detach_free_cb (void *buffer) /**< buffer to free */\n{\n  free (buffer);\n  detach_free_callback_called = true;\n} /* test_detach_free_cb */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_TYPEDARRAY))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"ArrayBuffer is disabled!\\n\");\n    jerry_cleanup ();\n    return 0;\n  }\n\n  jerry_value_t function_val = jerry_create_external_function (assert_handler);\n  register_js_value (\"assert\", function_val);\n  jerry_release_value (function_val);\n\n  /* Test array buffer queries */\n  {\n    const jerry_char_t eval_arraybuffer_src[] = \"new ArrayBuffer (10)\";\n    jerry_value_t eval_arraybuffer = jerry_eval (eval_arraybuffer_src,\n                                                 sizeof (eval_arraybuffer_src) - 1,\n                                                 JERRY_PARSE_STRICT_MODE);\n    TEST_ASSERT (!jerry_value_is_error (eval_arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (eval_arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (eval_arraybuffer) == 10);\n    jerry_release_value (eval_arraybuffer);\n  }\n\n  /* Test array buffer creation */\n  {\n    const uint32_t length = 15;\n    jerry_value_t arraybuffer = jerry_create_arraybuffer (length);\n    TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n    jerry_release_value (arraybuffer);\n  }\n\n  /* Test array buffer read operations */\n  for (uint8_t i = 0; i < 15; i++)\n  {\n    test_read_with_offset (i);\n  }\n\n  /* Test zero length ArrayBuffer read */\n  {\n    const uint32_t length = 0;\n    jerry_value_t arraybuffer = jerry_create_arraybuffer (length);\n    TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n\n    uint8_t data[20];\n    memset (data, 11, 20);\n\n    jerry_length_t bytes_read = jerry_arraybuffer_read (arraybuffer, 0, data, 20);\n    TEST_ASSERT (bytes_read == 0);\n\n    for (int i = 0; i < 20; i++)\n    {\n      TEST_ASSERT (data[i] == 11);\n    }\n\n    jerry_release_value (arraybuffer);\n  }\n\n  /* Test array buffer write operations */\n  for (uint8_t i = 0; i < 15; i++)\n  {\n    test_write_with_offset (i);\n  }\n\n  /* Test zero length ArrayBuffer write */\n  {\n    const uint32_t length = 0;\n    jerry_value_t arraybuffer = jerry_create_arraybuffer (length);\n    TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n\n    uint8_t data[20];\n    memset (data, 11, 20);\n\n    jerry_length_t bytes_written = jerry_arraybuffer_write (arraybuffer, 0, data, 20);\n    TEST_ASSERT (bytes_written == 0);\n\n    jerry_release_value (arraybuffer);\n  }\n\n  /* Test zero length external ArrayBuffer */\n  {\n    const uint32_t length = 0;\n    jerry_value_t arraybuffer = jerry_create_arraybuffer_external (length, NULL, NULL);\n    TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n    TEST_ASSERT (jerry_is_arraybuffer_detachable (arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n\n    uint8_t data[20];\n    memset (data, 11, 20);\n\n    jerry_length_t bytes_written = jerry_arraybuffer_write (arraybuffer, 0, data, 20);\n    TEST_ASSERT (bytes_written == 0);\n\n    jerry_release_value (arraybuffer);\n  }\n\n  /* Test ArrayBuffer with buffer allocated externally */\n  {\n    const uint32_t buffer_size = 15;\n    const uint8_t base_value = 51;\n\n    JERRY_VLA (uint8_t, buffer_p, buffer_size);\n    memset (buffer_p, base_value, buffer_size);\n\n    jerry_value_t arrayb = jerry_create_arraybuffer_external (buffer_size, buffer_p, test_free_cb);\n    uint8_t new_value = 123;\n    jerry_length_t copied = jerry_arraybuffer_write (arrayb, 0, &new_value, 1);\n    TEST_ASSERT (copied == 1);\n    TEST_ASSERT (buffer_p[0] == new_value);\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arrayb) == buffer_size);\n\n    for (uint32_t i = 1; i < buffer_size; i++)\n    {\n      TEST_ASSERT (buffer_p[i] == base_value);\n    }\n\n    JERRY_VLA (uint8_t, test_buffer, buffer_size);\n    jerry_length_t read = jerry_arraybuffer_read (arrayb, 0, test_buffer, buffer_size);\n    TEST_ASSERT (read == buffer_size);\n    TEST_ASSERT (test_buffer[0] == new_value);\n\n    for (uint32_t i = 1; i < buffer_size; i++)\n    {\n      TEST_ASSERT (test_buffer[i] == base_value);\n    }\n\n    TEST_ASSERT (jerry_value_is_arraybuffer (arrayb));\n    jerry_release_value (arrayb);\n  }\n\n  /* Test ArrayBuffer external memory map/unmap */\n  {\n    const uint32_t buffer_size = 20;\n    /* cppcheck-suppress variableScope */\n    JERRY_VLA (uint8_t, buffer_p, buffer_size);\n    {\n      jerry_value_t input_buffer = jerry_create_arraybuffer_external (buffer_size, buffer_p, NULL);\n      register_js_value (\"input_buffer\", input_buffer);\n      jerry_release_value (input_buffer);\n    }\n\n    const jerry_char_t eval_arraybuffer_src[] = TEST_STRING_LITERAL (\n      \"var array = new Uint8Array(input_buffer);\"\n      \"for (var i = 0; i < array.length; i++)\"\n      \"{\"\n      \"  array[i] = i * 2;\"\n      \"};\"\n      \"array.buffer\"\n    );\n    jerry_value_t buffer = jerry_eval (eval_arraybuffer_src,\n                                       sizeof (eval_arraybuffer_src) - 1,\n                                       JERRY_PARSE_STRICT_MODE);\n\n    TEST_ASSERT (!jerry_value_is_error (buffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (buffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (buffer) == 20);\n\n    uint8_t *const data = jerry_get_arraybuffer_pointer (buffer);\n\n    /* test memory read */\n    for (int i = 0; i < 20; i++)\n    {\n      TEST_ASSERT (data[i] == (uint8_t) (i * 2));\n    }\n\n    /* \"upload\" new data */\n    double sum = 0;\n    for (int i = 0; i < 20; i++)\n    {\n      data[i] = (uint8_t) (i * 3);\n      sum += data[i];\n    }\n\n    const jerry_char_t eval_test_arraybuffer[] = TEST_STRING_LITERAL (\n      \"var sum = 0;\"\n      \"for (var i = 0; i < array.length; i++)\"\n      \"{\"\n      \"  var expected = i * 3;\"\n      \"  assert(array[i] == expected, 'Array at index ' + i + ' was: ' + array[i] + ' should be: ' + expected);\"\n      \"  sum += array[i]\"\n      \"};\"\n      \"sum\"\n    );\n    jerry_value_t res = jerry_eval (eval_test_arraybuffer,\n                                    sizeof (eval_test_arraybuffer) - 1,\n                                    JERRY_PARSE_STRICT_MODE);\n    TEST_ASSERT (jerry_value_is_number (res));\n    TEST_ASSERT (jerry_get_number_value (res) == sum);\n    jerry_release_value (res);\n\n    jerry_release_value (buffer);\n  }\n\n  /* Test internal ArrayBuffer detach */\n  {\n    const uint32_t length = 1;\n    jerry_value_t arraybuffer = jerry_create_arraybuffer (length);\n    TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n\n    jerry_value_t is_detachable = jerry_is_arraybuffer_detachable (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (is_detachable));\n    TEST_ASSERT (jerry_get_boolean_value (is_detachable));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n    jerry_release_value (is_detachable);\n\n    jerry_value_t res = jerry_detach_arraybuffer (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (res));\n    TEST_ASSERT (jerry_get_arraybuffer_pointer (arraybuffer) == NULL);\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == 0);\n\n    jerry_release_value (res);\n    jerry_release_value (arraybuffer);\n  }\n\n  /* Test external ArrayBuffer detach */\n  {\n    uint8_t buf[1];\n    const uint32_t length = 1;\n    jerry_value_t arraybuffer = jerry_create_arraybuffer_external (length, buf, NULL);\n    TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n\n    jerry_value_t is_detachable = jerry_is_arraybuffer_detachable (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (is_detachable));\n    TEST_ASSERT (jerry_get_boolean_value (is_detachable));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n    jerry_release_value (is_detachable);\n\n    jerry_value_t res = jerry_detach_arraybuffer (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (res));\n    TEST_ASSERT (jerry_get_arraybuffer_pointer (arraybuffer) == NULL);\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == 0);\n\n    is_detachable = jerry_is_arraybuffer_detachable (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (is_detachable));\n    TEST_ASSERT (!jerry_get_boolean_value (is_detachable));\n    jerry_release_value (is_detachable);\n\n    jerry_release_value (res);\n    jerry_release_value (arraybuffer);\n  }\n\n  /* Test external ArrayBuffer with callback detach */\n  {\n    const uint32_t length = 8;\n    uint8_t *buf = (uint8_t *) malloc (length);\n    jerry_value_t arraybuffer = jerry_create_arraybuffer_external (length, buf, test_detach_free_cb);\n    TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n\n    jerry_value_t is_detachable = jerry_is_arraybuffer_detachable (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (is_detachable));\n    TEST_ASSERT (jerry_get_boolean_value (is_detachable));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n    jerry_release_value (is_detachable);\n\n    jerry_value_t res = jerry_detach_arraybuffer (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (res));\n    TEST_ASSERT (jerry_get_arraybuffer_pointer (arraybuffer) == NULL);\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == 0);\n    TEST_ASSERT (detach_free_callback_called);\n\n    is_detachable = jerry_is_arraybuffer_detachable (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (is_detachable));\n    TEST_ASSERT (!jerry_get_boolean_value (is_detachable));\n    jerry_release_value (is_detachable);\n\n    jerry_release_value (res);\n    jerry_release_value (arraybuffer);\n  }\n\n  jerry_cleanup ();\n\n  TEST_ASSERT (callback_called == true);\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-backtrace.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nstatic jerry_value_t\nbacktrace_handler (const jerry_value_t function_obj, /**< function object */\n                   const jerry_value_t this_val, /**< this value */\n                   const jerry_value_t args_p[], /**< argument list */\n                   const jerry_length_t args_count) /**< argument count */\n{\n  JERRY_UNUSED (function_obj);\n  JERRY_UNUSED (this_val);\n\n  uint32_t max_depth = 0;\n\n  if (args_count >= 1 && jerry_value_is_number (args_p[0]))\n  {\n    max_depth = (uint32_t) jerry_get_number_value (args_p[0]);\n  }\n\n  if (args_count >= 2)\n  {\n    return jerry_get_backtrace_from (max_depth, args_p[1]);\n  }\n\n  return jerry_get_backtrace (max_depth);\n} /* backtrace_handler */\n\nstatic jerry_value_t\nrun (const char *resource_name_p, /**< resource name */\n     const char *source_p) /**< source code */\n{\n  jerry_value_t code = jerry_parse ((const jerry_char_t *) resource_name_p,\n                                    strlen (resource_name_p),\n                                    (const jerry_char_t *) source_p,\n                                    strlen (source_p),\n                                    JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (code));\n\n  jerry_value_t result = jerry_run (code);\n  jerry_release_value (code);\n\n  return result;\n} /* run */\n\nstatic void\ncompare (jerry_value_t array, /**< array */\n         uint32_t index, /**< item index */\n         const char *str) /**< string to compare */\n{\n  jerry_char_t buf[64];\n\n  size_t len = strlen (str);\n\n  TEST_ASSERT (len < sizeof (buf));\n\n  jerry_value_t value = jerry_get_property_by_index (array, index);\n\n  TEST_ASSERT (!jerry_value_is_error (value)\n               && jerry_value_is_string (value));\n\n  TEST_ASSERT (jerry_get_string_size (value) == len);\n\n  jerry_size_t str_len = jerry_string_to_char_buffer (value, buf, (jerry_size_t) len);\n  TEST_ASSERT (str_len == len);\n\n  jerry_release_value (value);\n\n  TEST_ASSERT (memcmp (buf, str, len) == 0);\n} /* compare */\n\nstatic void\ntest_get_backtrace_api_call (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global = jerry_get_global_object ();\n\n  jerry_value_t func = jerry_create_external_function (backtrace_handler);\n  jerry_value_t name = jerry_create_string ((const jerry_char_t *) \"backtrace\");\n  jerry_value_t result = jerry_set_property (global, name, func);\n  TEST_ASSERT (!jerry_value_is_error (result));\n\n  jerry_release_value (result);\n  jerry_release_value (name);\n  jerry_release_value (func);\n\n  jerry_release_value (global);\n\n  const char *source = (\"function f() {\\n\"\n                        \"  return backtrace(0);\\n\"\n                        \"}\\n\"\n                        \"\\n\"\n                        \"function g() {\\n\"\n                        \"  return f();\\n\"\n                        \"}\\n\"\n                        \"\\n\"\n                        \"function h() {\\n\"\n                        \"  return g();\\n\"\n                        \"}\\n\"\n                        \"\\n\"\n                        \"h();\\n\");\n\n  jerry_value_t backtrace = run (\"something.js\", source);\n\n  TEST_ASSERT (!jerry_value_is_error (backtrace)\n               && jerry_value_is_array (backtrace));\n\n  TEST_ASSERT (jerry_get_array_length (backtrace) == 4);\n\n  compare (backtrace, 0, \"something.js:2\");\n  compare (backtrace, 1, \"something.js:6\");\n  compare (backtrace, 2, \"something.js:10\");\n  compare (backtrace, 3, \"something.js:13\");\n\n  jerry_release_value (backtrace);\n\n  /* Depth set to 2 this time. */\n\n  source = (\"function f() {\\n\"\n            \"  return backtrace(2);\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"function g() {\\n\"\n            \"  return f();\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"function h() {\\n\"\n            \"  return g();\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"h();\\n\");\n\n  backtrace = run (\"something_else.js\", source);\n\n  TEST_ASSERT (!jerry_value_is_error (backtrace)\n               && jerry_value_is_array (backtrace));\n\n  TEST_ASSERT (jerry_get_array_length (backtrace) == 2);\n\n  compare (backtrace, 0, \"something_else.js:2\");\n  compare (backtrace, 1, \"something_else.js:6\");\n\n  jerry_release_value (backtrace);\n\n  /* Ignore f and g this time. */\n\n  source = (\"function f() {\\n\"\n            \"  return backtrace(0, g);\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"function g() {\\n\"\n            \"  return f();\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"function h() {\\n\"\n            \"  return g();\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"h();\\n\");\n\n  backtrace = run (\"something_ignore.js\", source);\n\n  TEST_ASSERT (!jerry_value_is_error (backtrace)\n               && jerry_value_is_array (backtrace));\n\n  TEST_ASSERT (jerry_get_array_length (backtrace) == 2);\n\n  compare (backtrace, 0, \"something_ignore.js:10\");\n  compare (backtrace, 1, \"something_ignore.js:13\");\n\n  jerry_release_value (backtrace);\n\n  /* Use bound function this time. */\n\n  source = (\"function f() {\\n\"\n            \"  return backtrace(0, i);\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"function g(u, v) {\\n\"\n            \"  return v();\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"var h = g.bind(null, 0)\\n\"\n            \"var i = h.bind(null, f)\\n\"\n            \"\\n\"\n            \"function j() {\\n\"\n            \"  return i();\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"j();\\n\");\n\n  backtrace = run (\"something_bound.js\", source);\n\n  TEST_ASSERT (!jerry_value_is_error (backtrace)\n               && jerry_value_is_array (backtrace));\n\n  TEST_ASSERT (jerry_get_array_length (backtrace) == 2);\n\n  compare (backtrace, 0, \"something_bound.js:13\");\n  compare (backtrace, 1, \"something_bound.js:16\");\n\n  jerry_release_value (backtrace);\n\n  /* Use invalid function this time. */\n\n  source = (\"function f() {\\n\"\n            \"  return backtrace(0, ':)');\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"function g() {\\n\"\n            \"  return f();\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"function h() {\\n\"\n            \"  return g();\\n\"\n            \"}\\n\"\n            \"\\n\"\n            \"h();\\n\");\n\n  backtrace = run (\"nothing_ignore.js\", source);\n\n  TEST_ASSERT (!jerry_value_is_error (backtrace)\n               && jerry_value_is_array (backtrace));\n\n  TEST_ASSERT (jerry_get_array_length (backtrace) == 4);\n\n  compare (backtrace, 0, \"nothing_ignore.js:2\");\n  compare (backtrace, 1, \"nothing_ignore.js:6\");\n  compare (backtrace, 2, \"nothing_ignore.js:10\");\n  compare (backtrace, 3, \"nothing_ignore.js:13\");\n\n  jerry_release_value (backtrace);\n\n  jerry_cleanup ();\n} /* test_get_backtrace_api_call */\n\nstatic void\ntest_exception_backtrace (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const char *source = (\"function f() {\\n\"\n                        \"  undef_reference;\\n\"\n                        \"}\\n\"\n                        \"\\n\"\n                        \"function g() {\\n\"\n                        \"  return f();\\n\"\n                        \"}\\n\"\n                        \"\\n\"\n                        \"g();\\n\");\n\n  jerry_value_t error = run (\"bad.js\", source);\n\n  TEST_ASSERT (jerry_value_is_error (error));\n\n  error = jerry_get_value_from_error (error, true);\n\n  TEST_ASSERT (jerry_value_is_object (error));\n\n  jerry_value_t name = jerry_create_string ((const jerry_char_t *) \"stack\");\n  jerry_value_t backtrace = jerry_get_property (error, name);\n\n  jerry_release_value (name);\n  jerry_release_value (error);\n\n  TEST_ASSERT (!jerry_value_is_error (backtrace)\n               && jerry_value_is_array (backtrace));\n\n  TEST_ASSERT (jerry_get_array_length (backtrace) == 3);\n\n  compare (backtrace, 0, \"bad.js:2\");\n  compare (backtrace, 1, \"bad.js:6\");\n  compare (backtrace, 2, \"bad.js:9\");\n\n  jerry_release_value (backtrace);\n\n  jerry_cleanup ();\n} /* test_exception_backtrace */\n\nstatic void\ntest_large_line_count (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const char *source = (\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n                        \"g();\\n\");\n\n  jerry_value_t error = run (\"bad.js\", source);\n\n  TEST_ASSERT (jerry_value_is_error (error));\n\n  error = jerry_get_value_from_error (error, true);\n\n  TEST_ASSERT (jerry_value_is_object (error));\n\n  jerry_value_t name = jerry_create_string ((const jerry_char_t *) \"stack\");\n  jerry_value_t backtrace = jerry_get_property (error, name);\n\n  jerry_release_value (name);\n  jerry_release_value (error);\n\n  TEST_ASSERT (!jerry_value_is_error (backtrace)\n               && jerry_value_is_array (backtrace));\n\n  TEST_ASSERT (jerry_get_array_length (backtrace) == 1);\n\n  compare (backtrace, 0, \"bad.js:385\");\n\n  jerry_release_value (backtrace);\n\n  jerry_cleanup ();\n} /* test_large_line_count */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  TEST_ASSERT (jerry_is_feature_enabled (JERRY_FEATURE_LINE_INFO));\n\n  test_get_backtrace_api_call ();\n  test_exception_backtrace ();\n  test_large_line_count ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-bigint.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_BIGINT))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Bigint support is disabled!\\n\");\n    return 0;\n  }\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t string = jerry_create_string ((const jerry_char_t *) \"0xfffffff1fffffff2fffffff3\");\n  TEST_ASSERT (!jerry_value_is_error (string));\n\n  jerry_value_t bigint = jerry_value_to_bigint (string);\n  jerry_release_value (string);\n\n  TEST_ASSERT (!jerry_value_is_error (bigint));\n  TEST_ASSERT (jerry_value_is_bigint (bigint));\n\n  string = jerry_value_to_string (bigint);\n  TEST_ASSERT (!jerry_value_is_error (string));\n\n  static jerry_char_t str_buffer[64];\n  const char *expected_string_p = \"79228162256009920505775652851\";\n\n  jerry_size_t size = jerry_string_to_char_buffer (string, str_buffer, sizeof (str_buffer));\n  TEST_ASSERT (size == strlen (expected_string_p));\n  TEST_ASSERT (memcmp (str_buffer, expected_string_p, size) == 0);\n  jerry_release_value (string);\n\n  TEST_ASSERT (jerry_get_bigint_size_in_digits (bigint) == 2);\n\n  uint64_t digits_buffer[4];\n  bool sign;\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = true;\n  jerry_get_bigint_digits (bigint, digits_buffer, 0, &sign);\n  TEST_ASSERT (sign == false);\n  TEST_ASSERT (digits_buffer[0] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[1] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[2] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = true;\n  jerry_get_bigint_digits (bigint, digits_buffer, 1, &sign);\n  TEST_ASSERT (sign == false);\n  TEST_ASSERT (digits_buffer[0] == 0xfffffff2fffffff3ull);\n  TEST_ASSERT (digits_buffer[1] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[2] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = true;\n  jerry_get_bigint_digits (bigint, digits_buffer, 2, &sign);\n  TEST_ASSERT (sign == false);\n  TEST_ASSERT (digits_buffer[0] == 0xfffffff2fffffff3ull);\n  TEST_ASSERT (digits_buffer[1] == 0xfffffff1ull);\n  TEST_ASSERT (digits_buffer[2] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = true;\n  jerry_get_bigint_digits (bigint, digits_buffer, 3, &sign);\n  TEST_ASSERT (sign == false);\n  TEST_ASSERT (digits_buffer[0] == 0xfffffff2fffffff3ull);\n  TEST_ASSERT (digits_buffer[1] == 0xfffffff1ull);\n  TEST_ASSERT (digits_buffer[2] == 0);\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  jerry_get_bigint_digits (bigint, digits_buffer, 4, NULL);\n  TEST_ASSERT (digits_buffer[0] == 0xfffffff2fffffff3ull);\n  TEST_ASSERT (digits_buffer[1] == 0xfffffff1ull);\n  TEST_ASSERT (digits_buffer[2] == 0);\n  TEST_ASSERT (digits_buffer[3] == 0);\n\n  jerry_release_value (bigint);\n\n  digits_buffer[0] = 0;\n  digits_buffer[1] = 0;\n  digits_buffer[2] = 0;\n  /* Sign of zero value is always positive, even if we set negative. */\n  bigint = jerry_create_bigint (digits_buffer, 3, true);\n  TEST_ASSERT (jerry_value_is_bigint (bigint));\n  TEST_ASSERT (jerry_get_bigint_size_in_digits (bigint) == 0);\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = true;\n  jerry_get_bigint_digits (bigint, digits_buffer, 2, &sign);\n  TEST_ASSERT (sign == false);\n  TEST_ASSERT (digits_buffer[0] == 0);\n  TEST_ASSERT (digits_buffer[1] == 0);\n  TEST_ASSERT (digits_buffer[2] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  jerry_release_value (bigint);\n\n  digits_buffer[0] = 1;\n  digits_buffer[1] = 0;\n  digits_buffer[2] = 0;\n  digits_buffer[3] = 0;\n  bigint = jerry_create_bigint (digits_buffer, 4, true);\n  TEST_ASSERT (jerry_value_is_bigint (bigint));\n  TEST_ASSERT (jerry_get_bigint_size_in_digits (bigint) == 1);\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = false;\n  jerry_get_bigint_digits (bigint, digits_buffer, 1, &sign);\n  TEST_ASSERT (sign == true);\n  TEST_ASSERT (digits_buffer[0] == 1);\n  TEST_ASSERT (digits_buffer[1] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[2] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = false;\n  jerry_get_bigint_digits (bigint, digits_buffer, 2, &sign);\n  TEST_ASSERT (sign == true);\n  TEST_ASSERT (digits_buffer[0] == 1);\n  TEST_ASSERT (digits_buffer[1] == 0);\n  TEST_ASSERT (digits_buffer[2] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  jerry_release_value (bigint);\n\n  digits_buffer[0] = 0;\n  digits_buffer[1] = 1;\n  digits_buffer[2] = 0;\n  digits_buffer[3] = 0;\n  bigint = jerry_create_bigint (digits_buffer, 4, true);\n  TEST_ASSERT (jerry_value_is_bigint (bigint));\n  TEST_ASSERT (jerry_get_bigint_size_in_digits (bigint) == 2);\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = false;\n  jerry_get_bigint_digits (bigint, digits_buffer, 1, &sign);\n  TEST_ASSERT (sign == true);\n  TEST_ASSERT (digits_buffer[0] == 0);\n  TEST_ASSERT (digits_buffer[1] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[2] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = false;\n  jerry_get_bigint_digits (bigint, digits_buffer, 2, &sign);\n  TEST_ASSERT (sign == true);\n  TEST_ASSERT (digits_buffer[0] == 0);\n  TEST_ASSERT (digits_buffer[1] == 1);\n  TEST_ASSERT (digits_buffer[2] == ~((uint64_t) 0));\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  memset (digits_buffer, 0xff, sizeof (digits_buffer));\n  sign = false;\n  jerry_get_bigint_digits (bigint, digits_buffer, 3, &sign);\n  TEST_ASSERT (sign == true);\n  TEST_ASSERT (digits_buffer[0] == 0);\n  TEST_ASSERT (digits_buffer[1] == 1);\n  TEST_ASSERT (digits_buffer[2] == 0);\n  TEST_ASSERT (digits_buffer[3] == ~((uint64_t) 0));\n\n  jerry_release_value (bigint);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-common.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef TEST_COMMON_H\n#define TEST_COMMON_H\n\n#include \"jerryscript-port.h\"\n\n#include <math.h>\n#include <setjmp.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n\n#define JERRY_UNUSED(x) ((void) (x))\n\n#define TEST_ASSERT(x) \\\n  do \\\n  { \\\n    if (JERRY_UNLIKELY (!(x))) \\\n    { \\\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \\\n                      \"TEST: Assertion '%s' failed at %s(%s):%lu.\\n\", \\\n                      #x, \\\n                      __FILE__, \\\n                      __func__, \\\n                      (unsigned long) __LINE__); \\\n      jerry_port_fatal (ERR_FAILED_INTERNAL_ASSERTION); \\\n    } \\\n  } while (0)\n\n#define TEST_ASSERT_STR(EXPECTED, RESULT) \\\n  do \\\n  { \\\n    const char* __expected = (const char *) (EXPECTED); \\\n    const char* __result = (const char *) (RESULT); \\\n    if (strcmp(__expected, __result) != 0) \\\n    { \\\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \\\n                      \"TEST: String comparison failed at %s(%s):%lu.\\n\" \\\n                      \" Expected: '%s'\\n Got: '%s'\\n\", \\\n                      __FILE__, \\\n                       __func__, \\\n                      (unsigned long) __LINE__, \\\n                      __expected, \\\n                      __result); \\\n      jerry_port_fatal (ERR_FAILED_INTERNAL_ASSERTION); \\\n      \\\n    } \\\n  } while (0)\n\n/**\n * Test initialization statement that should be included\n * at the beginning of main function in every unit test.\n */\n#define TEST_INIT() \\\ndo \\\n{ \\\n  union { double d; unsigned u; } now = { .d = jerry_port_get_current_time () }; \\\n  srand (now.u); \\\n} while (0)\n\n/**\n * Dummy macro to enable the breaking of long string literals into multiple\n * substrings on separate lines. (Style checker doesn't allow it without putting\n * the whole literal into parentheses but the compiler warns about parenthesized\n * string constants.)\n */\n#define TEST_STRING_LITERAL(x) x\n\n#endif /* !TEST_COMMON_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-container.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_MAP)\n      || !jerry_is_feature_enabled (JERRY_FEATURE_SET)\n      || !jerry_is_feature_enabled (JERRY_FEATURE_WEAKMAP)\n      || !jerry_is_feature_enabled (JERRY_FEATURE_WEAKSET))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Containers are disabled!\\n\");\n    jerry_cleanup ();\n    return 0;\n  }\n\n  jerry_value_t instance_check;\n  jerry_value_t global = jerry_get_global_object ();\n  jerry_value_t map_str = jerry_create_string ((jerry_char_t *) \"Map\");\n  jerry_value_t set_str = jerry_create_string ((jerry_char_t *) \"Set\");\n  jerry_value_t weakmap_str = jerry_create_string ((jerry_char_t *) \"WeakMap\");\n  jerry_value_t weakset_str = jerry_create_string ((jerry_char_t *) \"WeakSet\");\n  jerry_value_t global_map = jerry_get_property (global, map_str);\n  jerry_value_t global_set = jerry_get_property (global, set_str);\n  jerry_value_t global_weakmap = jerry_get_property (global, weakmap_str);\n  jerry_value_t global_weakset = jerry_get_property (global, weakset_str);\n\n  jerry_release_value (global);\n\n  jerry_release_value (map_str);\n  jerry_release_value (set_str);\n  jerry_release_value (weakmap_str);\n  jerry_release_value (weakset_str);\n\n  jerry_value_t empty_map = jerry_create_container (JERRY_CONTAINER_TYPE_MAP, NULL, 0);\n  TEST_ASSERT (jerry_get_container_type (empty_map) == JERRY_CONTAINER_TYPE_MAP);\n  instance_check = jerry_binary_operation (JERRY_BIN_OP_INSTANCEOF, empty_map, global_map);\n  TEST_ASSERT (jerry_get_boolean_value (instance_check));\n  jerry_release_value (instance_check);\n  jerry_release_value (global_map);\n  jerry_release_value (empty_map);\n\n  jerry_value_t empty_set = jerry_create_container (JERRY_CONTAINER_TYPE_SET, NULL, 0);\n  TEST_ASSERT (jerry_get_container_type (empty_set) == JERRY_CONTAINER_TYPE_SET);\n  instance_check = jerry_binary_operation (JERRY_BIN_OP_INSTANCEOF, empty_set, global_set);\n  TEST_ASSERT (jerry_get_boolean_value (instance_check));\n  jerry_release_value (instance_check);\n  jerry_release_value (global_set);\n  jerry_release_value (empty_set);\n\n  jerry_value_t empty_weakmap = jerry_create_container (JERRY_CONTAINER_TYPE_WEAKMAP, NULL, 0);\n  TEST_ASSERT (jerry_get_container_type (empty_weakmap) == JERRY_CONTAINER_TYPE_WEAKMAP);\n  instance_check = jerry_binary_operation (JERRY_BIN_OP_INSTANCEOF, empty_weakmap, global_weakmap);\n  TEST_ASSERT (jerry_get_boolean_value (instance_check));\n  jerry_release_value (instance_check);\n  jerry_release_value (global_weakmap);\n  jerry_release_value (empty_weakmap);\n\n  jerry_value_t empty_weakset = jerry_create_container (JERRY_CONTAINER_TYPE_WEAKSET, NULL, 0);\n  TEST_ASSERT (jerry_get_container_type (empty_weakset) == JERRY_CONTAINER_TYPE_WEAKSET);\n  instance_check = jerry_binary_operation (JERRY_BIN_OP_INSTANCEOF, empty_weakset, global_weakset);\n  TEST_ASSERT (jerry_get_boolean_value (instance_check));\n  jerry_release_value (instance_check);\n  jerry_release_value (global_weakset);\n  jerry_release_value (empty_weakset);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-context-data.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nstatic bool test_context_data1_new_called = false;\nstatic bool test_context_data2_new_called = false;\nstatic bool test_context_data3_new_called = false;\nstatic bool test_context_data4_new_called = false;\nstatic bool test_context_data1_free_called = false;\nstatic bool test_context_data2_free_called = false;\nstatic bool test_context_data4_free_called = false;\nstatic bool test_context_data1_finalize_called = false;\nstatic bool test_context_data4_finalize_called = false;\n\n/* Context item 1 */\nconst char *string1 = \"item1\";\n\nstatic void\ntest_context_data1_new (void *user_data_p)\n{\n  test_context_data1_new_called = true;\n  *((const char **) user_data_p) = string1;\n} /* test_context_data1_new */\n\nstatic void\ntest_context_data1_free (void *user_data_p)\n{\n  test_context_data1_free_called = true;\n  TEST_ASSERT ((*(const char **) user_data_p) == string1);\n  TEST_ASSERT (!test_context_data1_finalize_called);\n} /* test_context_data1_free */\n\nstatic void\ntest_context_data1_finalize (void *user_data_p)\n{\n  TEST_ASSERT (test_context_data1_free_called);\n  TEST_ASSERT (!test_context_data1_finalize_called);\n  TEST_ASSERT ((*(const char **) user_data_p) == string1);\n  test_context_data1_finalize_called = true;\n} /* test_context_data1_finalize */\n\nstatic const jerry_context_data_manager_t manager1 =\n{\n  .init_cb = test_context_data1_new,\n  .deinit_cb = test_context_data1_free,\n  .finalize_cb = test_context_data1_finalize,\n  .bytes_needed = sizeof (const char *)\n};\n\n/* Context item 2 */\nconst char *string2 = \"item2\";\n\nstatic void\ntest_context_data2_new (void *user_data_p)\n{\n  test_context_data2_new_called = true;\n  *((const char **) user_data_p) = string2;\n} /* test_context_data2_new */\n\nstatic void\ntest_context_data2_free (void *user_data_p)\n{\n  test_context_data2_free_called = true;\n  TEST_ASSERT ((*(const char **) user_data_p) == string2);\n} /* test_context_data2_free */\n\nstatic const jerry_context_data_manager_t manager2 =\n{\n  .init_cb = test_context_data2_new,\n  .deinit_cb = test_context_data2_free,\n  .bytes_needed = sizeof (const char *)\n};\n\n/* Context item 3 */\n\nstatic void\ntest_context_data3_new (void *user_data_p)\n{\n  JERRY_UNUSED (user_data_p);\n  test_context_data3_new_called = true;\n} /* test_context_data3_new */\n\nstatic const jerry_context_data_manager_t manager3 =\n{\n  .init_cb = test_context_data3_new,\n  /* NULL is allowed: */\n  .deinit_cb = NULL,\n  .finalize_cb = NULL,\n  .bytes_needed = 0,\n};\n\n/* Context item 4 */\n\nstatic void\ntest_context_data4_new (void *user_data_p)\n{\n  test_context_data4_new_called = true;\n  TEST_ASSERT (user_data_p == NULL);\n} /* test_context_data4_new */\n\nstatic void\ntest_context_data4_free (void *user_data_p)\n{\n  test_context_data4_free_called = true;\n  TEST_ASSERT (user_data_p == NULL);\n  TEST_ASSERT (!test_context_data4_finalize_called);\n} /* test_context_data4_free */\n\nstatic void\ntest_context_data4_finalize (void *user_data_p)\n{\n  TEST_ASSERT (!test_context_data4_finalize_called);\n  test_context_data4_finalize_called = true;\n  TEST_ASSERT (user_data_p == NULL);\n} /* test_context_data4_finalize */\n\nstatic const jerry_context_data_manager_t manager4 =\n{\n  .init_cb = test_context_data4_new,\n  .deinit_cb = test_context_data4_free,\n  .finalize_cb = test_context_data4_finalize,\n  .bytes_needed = 0\n};\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  TEST_ASSERT (!strcmp (*((const char **) jerry_get_context_data (&manager1)), \"item1\"));\n  TEST_ASSERT (!strcmp (*((const char **) jerry_get_context_data (&manager2)), \"item2\"));\n  TEST_ASSERT (jerry_get_context_data (&manager3) == NULL);\n  TEST_ASSERT (jerry_get_context_data (&manager4) == NULL);\n\n  TEST_ASSERT (test_context_data1_new_called);\n  TEST_ASSERT (test_context_data2_new_called);\n  TEST_ASSERT (test_context_data3_new_called);\n  TEST_ASSERT (test_context_data4_new_called);\n\n  TEST_ASSERT (!test_context_data1_free_called);\n  TEST_ASSERT (!test_context_data2_free_called);\n  TEST_ASSERT (!test_context_data4_free_called);\n\n  jerry_cleanup ();\n\n  TEST_ASSERT (test_context_data1_free_called);\n  TEST_ASSERT (test_context_data2_free_called);\n  TEST_ASSERT (test_context_data4_free_called);\n\n  TEST_ASSERT (test_context_data1_finalize_called);\n  TEST_ASSERT (test_context_data4_finalize_called);\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-dataview.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_DATAVIEW))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"DataView support is disabled!\\n\");\n    return 0;\n  }\n\n  /* DataView builtin requires the TypedArray builtin */\n  TEST_ASSERT (jerry_is_feature_enabled (JERRY_FEATURE_TYPEDARRAY));\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Test accessors */\n  jerry_value_t arraybuffer = jerry_create_arraybuffer (16);\n  jerry_value_t view1 = jerry_create_dataview (arraybuffer, 0, 16);\n  TEST_ASSERT (!jerry_value_is_error (view1));\n  TEST_ASSERT (jerry_value_is_dataview (view1));\n\n  jerry_length_t byteOffset = 0;\n  jerry_length_t byteLength = 0;;\n  jerry_value_t internal_buffer = jerry_get_dataview_buffer (view1, &byteOffset, &byteLength);\n  TEST_ASSERT (jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, internal_buffer, arraybuffer));\n  TEST_ASSERT (byteOffset == 0);\n  TEST_ASSERT (byteLength == 16);\n  jerry_release_value (internal_buffer);\n\n  jerry_value_t view2 = jerry_create_dataview (arraybuffer, 12, 4);\n  TEST_ASSERT (!jerry_value_is_error (view1));\n  TEST_ASSERT (jerry_value_is_dataview (view2));\n  internal_buffer = jerry_get_dataview_buffer (view2, &byteOffset, &byteLength);\n  TEST_ASSERT (jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, internal_buffer, arraybuffer));\n  TEST_ASSERT (byteOffset == 12);\n  TEST_ASSERT (byteLength == 4);\n  jerry_release_value (internal_buffer);\n\n  /* Test invalid construction */\n  jerry_value_t empty_object = jerry_create_object ();\n  jerry_value_t view3 = jerry_create_dataview (empty_object, 20, 10);\n  TEST_ASSERT (jerry_value_is_error (view3));\n  jerry_value_t error_obj = jerry_get_value_from_error (view3, true);\n  TEST_ASSERT (jerry_get_error_type (error_obj) == JERRY_ERROR_TYPE);\n  jerry_release_value (error_obj);\n  jerry_release_value (empty_object);\n\n  jerry_value_t view4 = jerry_create_dataview (arraybuffer, 20, 10);\n  TEST_ASSERT (jerry_value_is_error (view3));\n  error_obj = jerry_get_value_from_error (view4, true);\n  TEST_ASSERT (jerry_get_error_type (error_obj) == JERRY_ERROR_RANGE);\n  jerry_release_value (error_obj);\n\n  /* Test getting/setting values */\n  jerry_value_t global_obj = jerry_get_global_object ();\n  jerry_value_t view1_str = jerry_create_string ((const jerry_char_t *) \"view1\");\n  jerry_value_t view2_str = jerry_create_string ((const jerry_char_t *) \"view2\");\n  TEST_ASSERT (jerry_set_property (global_obj, view1_str, view1));\n  TEST_ASSERT (jerry_set_property (global_obj, view2_str, view2));\n\n  jerry_release_value (view1_str);\n  jerry_release_value (view2_str);\n  jerry_release_value (global_obj);\n\n  const jerry_char_t set_src[] = \"view1.setInt16 (12, 255)\";\n  TEST_ASSERT (jerry_value_is_undefined (jerry_eval (set_src, sizeof (set_src) - 1, JERRY_PARSE_NO_OPTS)));\n\n  const jerry_char_t get_src[] = \"view2.getInt16 (0)\";\n  TEST_ASSERT (jerry_get_number_value (jerry_eval (get_src, sizeof (get_src) - 1, JERRY_PARSE_NO_OPTS)) == 255);\n\n  const jerry_char_t get_src_little_endian[] = \"view2.getInt16 (0, true)\";\n  TEST_ASSERT (jerry_get_number_value (jerry_eval (get_src_little_endian,\n                                                   sizeof (get_src_little_endian) - 1,\n                                                   JERRY_PARSE_NO_OPTS)) == -256);\n\n  /* Cleanup */\n  jerry_release_value (view2);\n  jerry_release_value (view1);\n  jerry_release_value (arraybuffer);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-date-helpers.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-builtin-helpers.h\"\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n\n#include \"test-common.h\"\n\n#define MS_PER_DAY ((ecma_number_t) 86400000)\n#define MS_PER_YEAR ((ecma_number_t) 365 * MS_PER_DAY)\n#define START_OF_GREGORIAN_CALENDAR ((ecma_number_t) (-1970 * MS_PER_YEAR \\\n  - (1970 / 4) * MS_PER_DAY \\\n  + (1970 / 100) * MS_PER_DAY \\\n  - (1970 / 400) * MS_PER_DAY \\\n  - MS_PER_DAY))\n\n/**\n * Unit test's main function.\n */\nint\nmain (void)\n{\n  /* int ecma_date_day (time)*/\n\n  TEST_ASSERT (ecma_date_day (0) == 0);\n  TEST_ASSERT (ecma_date_day (MS_PER_DAY) == 1);\n\n  /* ecma_number_t ecma_date_time_within_day (time) */\n\n  TEST_ASSERT (ecma_date_time_within_day (0) == 0);\n  TEST_ASSERT (ecma_date_time_within_day (42) == 42);\n  TEST_ASSERT (ecma_date_time_within_day (42.51) == 42.51);\n  TEST_ASSERT (ecma_date_time_within_day (MS_PER_DAY + 42) == 42);\n\n  /* int ecma_date_year_from_time (time) */\n\n  TEST_ASSERT (ecma_date_year_from_time (0) == 1970);\n  TEST_ASSERT (ecma_date_year_from_time (0) == 1970);\n  TEST_ASSERT (ecma_date_year_from_time (MS_PER_DAY) == 1970);\n  TEST_ASSERT (ecma_date_year_from_time ((MS_PER_DAY) * (ecma_number_t) 365 - 1) == 1970);\n  TEST_ASSERT (ecma_date_year_from_time (MS_PER_DAY * (ecma_number_t) 365) == 1971);\n  TEST_ASSERT (ecma_date_year_from_time (MS_PER_DAY * (ecma_number_t) (365 * (2015 - 1970)))\n                == 2014);\n  TEST_ASSERT (ecma_date_year_from_time (MS_PER_DAY * (ecma_number_t) (365.25 * (2015 - 1970)))\n                == 2015);\n  TEST_ASSERT (ecma_date_year_from_time (-MS_PER_YEAR) == 1969);\n  TEST_ASSERT (ecma_date_year_from_time (-1970 * MS_PER_YEAR) == 1);\n  TEST_ASSERT (ecma_date_year_from_time (START_OF_GREGORIAN_CALENDAR) == 0);\n  TEST_ASSERT (ecma_date_year_from_time (START_OF_GREGORIAN_CALENDAR - 1) == -1);\n  TEST_ASSERT (ecma_date_year_from_time (START_OF_GREGORIAN_CALENDAR - 3 * MS_PER_YEAR) == -3);\n\n  /* int ecma_date_month_from_time  (time) */\n\n  TEST_ASSERT (ecma_date_month_from_time (START_OF_GREGORIAN_CALENDAR) == 0);\n  TEST_ASSERT (ecma_date_month_from_time (0) == 0);\n  TEST_ASSERT (ecma_date_month_from_time (-MS_PER_DAY) == 11);\n  TEST_ASSERT (ecma_date_month_from_time (31 * MS_PER_DAY) == 1);\n\n  /* int ecma_date_date_from_time  (time) */\n\n  TEST_ASSERT (ecma_date_date_from_time (START_OF_GREGORIAN_CALENDAR) == 1);\n  TEST_ASSERT (ecma_date_date_from_time (0) == 1);\n  TEST_ASSERT (ecma_date_date_from_time (-MS_PER_DAY) == 31);\n  TEST_ASSERT (ecma_date_date_from_time (31 * MS_PER_DAY) == 1);\n\n  /* int ecma_date_week_day (ecma_number_t time) */\n\n  /* FIXME: Implement */\n\n  /* ecma_number_t ecma_date_utc (time) */\n\n  /* FIXME: Implement */\n\n  /* ecma_number_t ecma_date_hour_from_time (time) */\n\n  TEST_ASSERT (ecma_date_hour_from_time (START_OF_GREGORIAN_CALENDAR) == 0);\n  TEST_ASSERT (ecma_date_hour_from_time (0) == 0);\n  TEST_ASSERT (ecma_date_hour_from_time (-MS_PER_DAY) == 0);\n  TEST_ASSERT (ecma_date_hour_from_time (-1) == 23);\n\n  /* ecma_number_t ecma_date_min_from_time (time) */\n\n  TEST_ASSERT (ecma_date_min_from_time (START_OF_GREGORIAN_CALENDAR) == 0);\n  TEST_ASSERT (ecma_date_min_from_time (0) == 0);\n  TEST_ASSERT (ecma_date_min_from_time (-MS_PER_DAY) == 0);\n  TEST_ASSERT (ecma_date_min_from_time (-1) == 59);\n\n  /* ecma_number_t ecma_date_sec_from_time (time) */\n\n  TEST_ASSERT (ecma_date_sec_from_time (START_OF_GREGORIAN_CALENDAR) == 0);\n  TEST_ASSERT (ecma_date_sec_from_time (0) == 0);\n  TEST_ASSERT (ecma_date_sec_from_time (-MS_PER_DAY) == 0);\n  TEST_ASSERT (ecma_date_sec_from_time (-1) == 59);\n\n  /* ecma_number_t ecma_date_ms_from_time (time) */\n\n  TEST_ASSERT (ecma_date_ms_from_time (START_OF_GREGORIAN_CALENDAR) == 0);\n  TEST_ASSERT (ecma_date_ms_from_time (0) == 0);\n  TEST_ASSERT (ecma_date_ms_from_time (-MS_PER_DAY) == 0);\n  TEST_ASSERT (ecma_date_ms_from_time (-1) == 999);\n\n  /* ecma_number_t ecma_date_make_time (hour, min, sec, ms) */\n\n  /* FIXME: Implement */\n\n  /* ecma_number_t ecma_date_make_day (year, month, date) */\n\n  TEST_ASSERT (ecma_date_make_day (1970, 0, 1) == 0);\n  TEST_ASSERT (ecma_date_make_day (1970, -1, 1) == -31);\n  TEST_ASSERT (ecma_date_make_day (1970, 0, 2.5) == 1);\n  TEST_ASSERT (ecma_date_make_day (1970, 1, 35) == 65);\n  TEST_ASSERT (ecma_date_make_day (1970, 13, 35) == 430);\n  TEST_ASSERT (ecma_date_make_day (2016, 2, 1) == 16861);\n  TEST_ASSERT (ecma_date_make_day (2016, 8, 31) == 17075);\n  TEST_ASSERT (ecma_date_make_day (2016, 9, 1) == 17075);\n\n  /* ecma_number_t ecma_date_make_date (day, time) */\n\n  /* FIXME: Implement */\n\n  /* ecma_number_t ecma_date_time_clip (year) */\n\n  /* FIXME: Implement */\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-error-callback.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nstatic bool error_object_created_callback_is_running = false;\nstatic int error_object_created_callback_count = 0;\n\nstatic void\nerror_object_created_callback (const jerry_value_t error_object_t, /**< new error object */\n                              void *user_p) /**< user pointer */\n{\n  TEST_ASSERT (!error_object_created_callback_is_running);\n  TEST_ASSERT (user_p == (void *) &error_object_created_callback_count);\n\n  error_object_created_callback_is_running = true;\n  error_object_created_callback_count++;\n\n  jerry_value_t name = jerry_create_string ((const jerry_char_t *) \"message\");\n  jerry_value_t message = jerry_create_string ((const jerry_char_t *) \"Replaced message!\");\n\n  jerry_value_t result = jerry_set_property (error_object_t, name, message);\n  TEST_ASSERT (jerry_value_is_boolean (result) && jerry_get_boolean_value (result) == true);\n  jerry_release_value (result);\n\n  /* This SyntaxError must not trigger a recusrsive call of the this callback. */\n  const char *source_p = \"Syntax Error in JS!\";\n  result = jerry_eval ((const jerry_char_t *) source_p, strlen (source_p), 0);\n  TEST_ASSERT (jerry_value_is_error (result));\n\n  jerry_release_value (result);\n  jerry_release_value (message);\n  jerry_release_value (name);\n\n  error_object_created_callback_is_running = false;\n} /* error_object_created_callback */\n\nstatic void\nrun_test (const char *source_p)\n{\n  /* Run the code 5 times. */\n  for (int i = 0; i < 5; i++)\n  {\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) source_p, strlen (source_p), 0);\n    TEST_ASSERT (jerry_value_is_boolean (result) && jerry_get_boolean_value (result) == true);\n    jerry_release_value (result);\n  }\n} /* run_test */\n\n/**\n * Unit test's main function.\n */\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_set_error_object_created_callback (error_object_created_callback,\n                                          (void *) &error_object_created_callback_count);\n\n  run_test (\"var result = false\\n\"\n            \"try {\\n\"\n            \"  ref_error;\\n\"\n            \"} catch(e) {\\n\"\n            \"  result = (e.message === 'Replaced message!')\\n\"\n            \"}\\n\"\n            \"result\\n\");\n\n  run_test (\"var error = new Error()\\n\"\n            \"error.message === 'Replaced message!'\\n\");\n\n  jerry_release_value (jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) \"Message\"));\n\n  TEST_ASSERT (error_object_created_callback_count == 11);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-exec-stop.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nstatic jerry_value_t\nvm_exec_stop_callback (void *user_p)\n{\n  int *int_p = (int *) user_p;\n\n  if (*int_p > 0)\n  {\n    (*int_p)--;\n\n    return jerry_create_undefined ();\n  }\n\n  return jerry_create_string ((const jerry_char_t *) \"Abort script\");\n} /* vm_exec_stop_callback */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  /* Test stopping an infinite loop. */\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_VM_EXEC_STOP))\n  {\n    return 0;\n  }\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  int countdown = 6;\n  jerry_set_vm_exec_stop_callback (vm_exec_stop_callback, &countdown, 16);\n\n  const jerry_char_t inf_loop_code_src1[] = \"while(true) {}\";\n  jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                               0,\n                                               inf_loop_code_src1,\n                                               sizeof (inf_loop_code_src1) - 1,\n                                               JERRY_PARSE_NO_OPTS);\n\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n  jerry_value_t res = jerry_run (parsed_code_val);\n  TEST_ASSERT (countdown == 0);\n\n  TEST_ASSERT (jerry_value_is_error (res));\n\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n\n  /* A more complex example. Although the callback error is captured\n   * by the catch block, it is automatically thrown again. */\n\n  /* We keep the callback function, only the countdown is reset. */\n  countdown = 6;\n\n  const jerry_char_t inf_loop_code_src2[] = TEST_STRING_LITERAL (\n    \"function f() { while (true) ; }\\n\"\n    \"try { f(); } catch(e) {}\"\n  );\n\n  parsed_code_val = jerry_parse (NULL,\n                                 0,\n                                 inf_loop_code_src2,\n                                 sizeof (inf_loop_code_src2) - 1,\n                                 JERRY_PARSE_NO_OPTS);\n\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n  res = jerry_run (parsed_code_val);\n  TEST_ASSERT (countdown == 0);\n\n  /* The result must have an error flag which proves that\n   * the error is thrown again inside the catch block. */\n  TEST_ASSERT (jerry_value_is_error (res));\n\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-external-string.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nstatic int free_count = 0;\n\nstatic const char *external_1 = \"External string! External string! External string! External string!\";\nstatic const char *external_2 = \"Object\";\nstatic const char *external_3 = \"x!?:s\";\nstatic const char *external_4 = \"Object property external string! Object property external string!\";\n\nstatic void\nfree_external1 (void *ptr)\n{\n  TEST_ASSERT (ptr == external_1);\n  free_count++;\n} /* free_external1 */\n\nstatic void\nfree_external2 (void *ptr)\n{\n  TEST_ASSERT (ptr == external_2);\n  free_count++;\n} /* free_external2 */\n\nstatic void\nfree_external3 (void *ptr)\n{\n  TEST_ASSERT (ptr == external_3);\n  free_count++;\n} /* free_external3 */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Test external callback calls. */\n  jerry_value_t external_string = jerry_create_external_string ((jerry_char_t *) external_1, free_external1);\n  TEST_ASSERT (free_count == 0);\n  jerry_release_value (external_string);\n  TEST_ASSERT (free_count == 1);\n\n  external_string = jerry_create_external_string ((jerry_char_t *) external_1, NULL);\n  TEST_ASSERT (free_count == 1);\n  jerry_release_value (external_string);\n  TEST_ASSERT (free_count == 1);\n\n  external_string = jerry_create_external_string ((jerry_char_t *) external_2, free_external2);\n  TEST_ASSERT (free_count == 2);\n  jerry_release_value (external_string);\n  TEST_ASSERT (free_count == 2);\n\n  external_string = jerry_create_external_string ((jerry_char_t *) external_2, NULL);\n  TEST_ASSERT (free_count == 2);\n  jerry_release_value (external_string);\n  TEST_ASSERT (free_count == 2);\n\n  external_string = jerry_create_external_string ((jerry_char_t *) external_3, free_external3);\n  TEST_ASSERT (free_count == 3);\n  jerry_release_value (external_string);\n  TEST_ASSERT (free_count == 3);\n\n  external_string = jerry_create_external_string ((jerry_char_t *) external_3, NULL);\n  TEST_ASSERT (free_count == 3);\n  jerry_release_value (external_string);\n  TEST_ASSERT (free_count == 3);\n\n  /* Test string comparison. */\n  external_string = jerry_create_external_string ((jerry_char_t *) external_1, free_external1);\n  jerry_value_t other_string = jerry_create_string ((jerry_char_t *) external_1);\n\n  jerry_value_t result = jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, external_string, other_string);\n  TEST_ASSERT (jerry_value_is_boolean (result));\n  TEST_ASSERT (jerry_get_boolean_value (result));\n  jerry_release_value (result);\n\n  result = jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, external_string, external_string);\n  TEST_ASSERT (jerry_value_is_boolean (result));\n  TEST_ASSERT (jerry_get_boolean_value (result));\n  jerry_release_value (result);\n\n  TEST_ASSERT (free_count == 3);\n  jerry_release_value (external_string);\n  TEST_ASSERT (free_count == 4);\n  jerry_release_value (other_string);\n\n  /* Test getting string. */\n  external_string = jerry_create_external_string ((jerry_char_t *) external_1, free_external1);\n  size_t length = strlen (external_1);\n\n  TEST_ASSERT (jerry_value_is_string (external_string));\n  TEST_ASSERT (jerry_get_string_size (external_string) == length);\n  TEST_ASSERT (jerry_get_string_length (external_string) == length);\n\n  jerry_char_t buf[128];\n  jerry_string_to_char_buffer (external_string, buf, sizeof (buf));\n  TEST_ASSERT (memcmp (buf, external_1, length) == 0);\n\n  TEST_ASSERT (free_count == 4);\n  jerry_release_value (external_string);\n  TEST_ASSERT (free_count == 5);\n\n  /* Test property access. */\n  external_string = jerry_create_external_string ((jerry_char_t *) external_4, NULL);\n  other_string = jerry_create_string ((jerry_char_t *) external_4);\n\n  jerry_value_t obj = jerry_create_object ();\n  result = jerry_set_property (obj, external_string, other_string);\n  TEST_ASSERT (jerry_value_is_boolean (result));\n  TEST_ASSERT (jerry_get_boolean_value (result));\n  jerry_release_value (result);\n\n  jerry_value_t get_result = jerry_get_property (obj, other_string);\n  TEST_ASSERT (jerry_value_is_string (get_result));\n\n  result = jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, get_result, external_string);\n  jerry_release_value (get_result);\n  TEST_ASSERT (jerry_value_is_boolean (result));\n  TEST_ASSERT (jerry_get_boolean_value (result));\n  jerry_release_value (result);\n\n  result = jerry_set_property (obj, other_string, external_string);\n  TEST_ASSERT (jerry_value_is_boolean (result));\n  TEST_ASSERT (jerry_get_boolean_value (result));\n  jerry_release_value (result);\n\n  get_result = jerry_get_property (obj, external_string);\n  TEST_ASSERT (jerry_value_is_string (get_result));\n\n  result = jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, get_result, other_string);\n  jerry_release_value (get_result);\n  TEST_ASSERT (jerry_value_is_boolean (result));\n  TEST_ASSERT (jerry_get_boolean_value (result));\n  jerry_release_value (result);\n\n  jerry_release_value (obj);\n  jerry_release_value (external_string);\n  jerry_release_value (other_string);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-from-property-descriptor.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t object = jerry_create_object ();\n  jerry_value_t prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"length\");\n  jerry_value_t value = jerry_create_boolean (true);\n\n  TEST_ASSERT (jerry_set_property (object, prop_name, prop_name));\n  TEST_ASSERT (jerry_has_property (object, prop_name));\n  TEST_ASSERT (jerry_has_own_property (object, prop_name));\n\n  jerry_property_descriptor_t prop_desc;\n  TEST_ASSERT (jerry_get_own_property_descriptor (object, prop_name, &prop_desc));\n\n  jerry_value_t from_object = jerry_from_property_descriptor (&prop_desc);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"value\");\n  value = jerry_get_property (from_object, prop_name);\n  TEST_ASSERT (value == prop_desc.value);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"writable\");\n  value = jerry_get_property (from_object, prop_name);\n  TEST_ASSERT (jerry_get_boolean_value (value) == prop_desc.is_writable);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"writable\");\n  value = jerry_get_property (from_object, prop_name);\n  TEST_ASSERT (jerry_get_boolean_value (value) == prop_desc.is_writable);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"enumerable\");\n  value = jerry_get_property (from_object, prop_name);\n  TEST_ASSERT (jerry_get_boolean_value (value) == prop_desc.is_enumerable);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"configurable\");\n  value = jerry_get_property (from_object, prop_name);\n  TEST_ASSERT (jerry_get_boolean_value (value) == prop_desc.is_configurable);\n\n  jerry_release_value (object);\n  jerry_release_value (prop_name);\n  jerry_release_value (value);\n  jerry_release_value (from_object);\n  jerry_free_property_descriptor_fields (&prop_desc);\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-has-property.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nstatic void\nassert_boolean_and_release (jerry_value_t result, bool expected)\n{\n  TEST_ASSERT (jerry_value_is_boolean (result));\n  TEST_ASSERT (jerry_get_boolean_value (result) == expected);\n  jerry_release_value (result);\n} /* assert_boolean_and_release */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t object = jerry_create_object ();\n  jerry_value_t prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"something\");\n  jerry_value_t prop_value = jerry_create_boolean (true);\n  jerry_value_t proto_object = jerry_create_object ();\n\n  /* Assert that an empty object does not have the property in question */\n  assert_boolean_and_release (jerry_has_property (object, prop_name), false);\n  assert_boolean_and_release (jerry_has_own_property (object, prop_name), false);\n\n  assert_boolean_and_release (jerry_set_prototype (object, proto_object), true);\n\n  /* If the object has a prototype, that still means it doesn't have the property */\n  assert_boolean_and_release (jerry_has_property (object, prop_name), false);\n  assert_boolean_and_release (jerry_has_own_property (object, prop_name), false);\n\n  assert_boolean_and_release (jerry_set_property (proto_object, prop_name, prop_value), true);\n\n  /* After setting the property on the prototype, it must be there, but not on the object */\n  assert_boolean_and_release (jerry_has_property (object, prop_name), true);\n  assert_boolean_and_release (jerry_has_own_property (object, prop_name), false);\n\n  TEST_ASSERT (jerry_delete_property (proto_object, prop_name));\n  assert_boolean_and_release (jerry_set_property (object, prop_name, prop_value), true);\n\n  /* After relocating the property onto the object, it must be there */\n  assert_boolean_and_release (jerry_has_property (object, prop_name), true);\n  assert_boolean_and_release (jerry_has_own_property (object, prop_name), true);\n\n  jerry_release_value (object);\n  jerry_release_value (prop_name);\n  jerry_release_value (prop_value);\n  jerry_release_value (proto_object);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-internal-properties.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t object = jerry_create_object ();\n\n  jerry_value_t prop_name_1 = jerry_create_string ((const jerry_char_t *) \"foo\");\n  jerry_value_t prop_name_2 = jerry_create_string ((const jerry_char_t *) \"non_hidden_prop\");\n  jerry_value_t prop_name_3;\n\n  if (jerry_is_feature_enabled (JERRY_FEATURE_SYMBOL))\n  {\n    jerry_value_t prop_name_3_desc = jerry_create_string ((const jerry_char_t *) \"bar\");\n    prop_name_3 = jerry_create_symbol (prop_name_3_desc);\n    jerry_release_value (prop_name_3_desc);\n  }\n  else\n  {\n    prop_name_3 = jerry_create_string ((const jerry_char_t *) \"non_hidden_string_prop\");\n  }\n\n  jerry_value_t internal_prop_name_1 = jerry_create_string ((const jerry_char_t *) \"hidden_foo\");\n  jerry_value_t internal_prop_name_2 = jerry_create_string ((const jerry_char_t *) \"hidden_prop\");\n  jerry_value_t internal_prop_name_3;\n\n  if (jerry_is_feature_enabled (JERRY_FEATURE_SYMBOL))\n  {\n    jerry_value_t internal_prop_name_3_desc = jerry_create_string ((const jerry_char_t *) \"bar\");\n    internal_prop_name_3 = jerry_create_symbol (internal_prop_name_3_desc);\n    jerry_release_value (internal_prop_name_3_desc);\n  }\n  else\n  {\n    internal_prop_name_3 = jerry_create_string ((const jerry_char_t *) \"hidden_string_prop\");\n  }\n\n  jerry_value_t prop_value_1 = jerry_create_number (5.5);\n  jerry_value_t prop_value_2 = jerry_create_number (6.5);\n  jerry_value_t prop_value_3 = jerry_create_number (7.5);\n\n  jerry_value_t internal_prop_value_1 = jerry_create_number (8.5);\n  jerry_value_t internal_prop_value_2 = jerry_create_number (9.5);\n  jerry_value_t internal_prop_value_3 = jerry_create_number (10.5);\n\n  /* Test the normal [[Set]] method */\n  bool set_result_1 = jerry_set_property (object, prop_name_1, prop_value_1);\n  bool set_result_2 = jerry_set_property (object, prop_name_2, prop_value_2);\n  bool set_result_3 = jerry_set_property (object, prop_name_3, prop_value_3);\n\n  TEST_ASSERT (set_result_1);\n  TEST_ASSERT (set_result_2);\n  TEST_ASSERT (set_result_3);\n\n  /* Test the internal [[Set]] method */\n  bool set_internal_result_1 = jerry_set_internal_property (object, internal_prop_name_1, internal_prop_value_1);\n  bool set_internal_result_2 = jerry_set_internal_property (object, internal_prop_name_2, internal_prop_value_2);\n  bool set_internal_result_3 = jerry_set_internal_property (object, internal_prop_name_3, internal_prop_value_3);\n\n  TEST_ASSERT (set_internal_result_1);\n  TEST_ASSERT (set_internal_result_2);\n  TEST_ASSERT (set_internal_result_3);\n\n  /* Test the normal [[Has]] method. */\n  jerry_value_t has_result_1 = jerry_has_property (object, prop_name_1);\n  jerry_value_t has_result_2 = jerry_has_property (object, prop_name_2);\n  jerry_value_t has_result_3 = jerry_has_property (object, prop_name_3);\n  jerry_value_t has_result_4 = jerry_has_property (object, internal_prop_name_1);\n  jerry_value_t has_result_5 = jerry_has_property (object, internal_prop_name_2);\n  jerry_value_t has_result_6 = jerry_has_property (object, internal_prop_name_3);\n\n  TEST_ASSERT (jerry_value_is_boolean (has_result_1) && jerry_get_boolean_value (has_result_1));\n  TEST_ASSERT (jerry_value_is_boolean (has_result_2) && jerry_get_boolean_value (has_result_2));\n  TEST_ASSERT (jerry_value_is_boolean (has_result_3) && jerry_get_boolean_value (has_result_3));\n  TEST_ASSERT (jerry_value_is_boolean (has_result_4) && !jerry_get_boolean_value (has_result_4));\n  TEST_ASSERT (jerry_value_is_boolean (has_result_5) && !jerry_get_boolean_value (has_result_5));\n  TEST_ASSERT (jerry_value_is_boolean (has_result_6) && !jerry_get_boolean_value (has_result_6));\n\n  jerry_release_value (has_result_1);\n  jerry_release_value (has_result_2);\n  jerry_release_value (has_result_3);\n  jerry_release_value (has_result_4);\n  jerry_release_value (has_result_5);\n  jerry_release_value (has_result_6);\n\n  /* Test the internal [[Has]] method. */\n  bool has_internal_result_1 = jerry_has_internal_property (object, prop_name_1);\n  bool has_internal_result_2 = jerry_has_internal_property (object, prop_name_2);\n  bool has_internal_result_3 = jerry_has_internal_property (object, prop_name_3);\n  bool has_internal_result_4 = jerry_has_internal_property (object, internal_prop_name_1);\n  bool has_internal_result_5 = jerry_has_internal_property (object, internal_prop_name_2);\n  bool has_internal_result_6 = jerry_has_internal_property (object, internal_prop_name_3);\n\n  TEST_ASSERT (!has_internal_result_1);\n  TEST_ASSERT (!has_internal_result_2);\n  TEST_ASSERT (!has_internal_result_3);\n  TEST_ASSERT (has_internal_result_4);\n  TEST_ASSERT (has_internal_result_5);\n  TEST_ASSERT (has_internal_result_6);\n\n  /* Test the normal [[Get]] method. */\n  jerry_value_t get_result_1 = jerry_get_property (object, prop_name_1);\n  jerry_value_t get_result_2 = jerry_get_property (object, prop_name_2);\n  jerry_value_t get_result_3 = jerry_get_property (object, prop_name_3);\n  jerry_value_t get_result_4 = jerry_get_property (object, internal_prop_name_1);\n  jerry_value_t get_result_5 = jerry_get_property (object, internal_prop_name_2);\n  jerry_value_t get_result_6 = jerry_get_property (object, internal_prop_name_3);\n\n  TEST_ASSERT (jerry_value_is_number (get_result_1) && jerry_get_number_value (get_result_1) == 5.5);\n  TEST_ASSERT (jerry_value_is_number (get_result_2) && jerry_get_number_value (get_result_2) == 6.5);\n  TEST_ASSERT (jerry_value_is_number (get_result_3) && jerry_get_number_value (get_result_3) == 7.5);\n  TEST_ASSERT (jerry_value_is_undefined (get_result_4));\n  TEST_ASSERT (jerry_value_is_undefined (get_result_5));\n  TEST_ASSERT (jerry_value_is_undefined (get_result_6));\n\n  jerry_release_value (get_result_1);\n  jerry_release_value (get_result_2);\n  jerry_release_value (get_result_3);\n  jerry_release_value (get_result_4);\n  jerry_release_value (get_result_5);\n  jerry_release_value (get_result_6);\n\n  /* Test the internal [[Get]] method. */\n  jerry_value_t get_internal_result_1 = jerry_get_internal_property (object, prop_name_1);\n  jerry_value_t get_internal_result_2 = jerry_get_internal_property (object, prop_name_2);\n  jerry_value_t get_internal_result_3 = jerry_get_internal_property (object, prop_name_3);\n  jerry_value_t get_internal_result_4 = jerry_get_internal_property (object, internal_prop_name_1);\n  jerry_value_t get_internal_result_5 = jerry_get_internal_property (object, internal_prop_name_2);\n  jerry_value_t get_internal_result_6 = jerry_get_internal_property (object, internal_prop_name_3);\n\n  TEST_ASSERT (jerry_value_is_undefined (get_internal_result_1));\n  TEST_ASSERT (jerry_value_is_undefined (get_internal_result_2));\n  TEST_ASSERT (jerry_value_is_undefined (get_internal_result_3));\n  TEST_ASSERT (jerry_value_is_number (get_internal_result_4) && jerry_get_number_value (get_internal_result_4) == 8.5);\n  TEST_ASSERT (jerry_value_is_number (get_internal_result_5) && jerry_get_number_value (get_internal_result_5) == 9.5);\n  TEST_ASSERT (jerry_value_is_number (get_internal_result_6) && jerry_get_number_value (get_internal_result_6) == 10.5);\n\n  jerry_release_value (get_internal_result_1);\n  jerry_release_value (get_internal_result_2);\n  jerry_release_value (get_internal_result_3);\n  jerry_release_value (get_internal_result_4);\n  jerry_release_value (get_internal_result_5);\n  jerry_release_value (get_internal_result_6);\n\n  /* Test the normal [[Delete]] method. */\n  bool delete_result_1 = jerry_delete_property (object, prop_name_1);\n  bool delete_result_2 = jerry_delete_property (object, prop_name_2);\n  bool delete_result_3 = jerry_delete_property (object, prop_name_3);\n  bool delete_result_4 = jerry_delete_property (object, internal_prop_name_1);\n  bool delete_result_5 = jerry_delete_property (object, internal_prop_name_2);\n  bool delete_result_6 = jerry_delete_property (object, internal_prop_name_3);\n\n  TEST_ASSERT (delete_result_1);\n  TEST_ASSERT (delete_result_2);\n  TEST_ASSERT (delete_result_3);\n  TEST_ASSERT (delete_result_4);\n  TEST_ASSERT (delete_result_5);\n  TEST_ASSERT (delete_result_6);\n\n  jerry_value_t has_after_delete_result_1 = jerry_has_property (object, prop_name_1);\n  jerry_value_t has_after_delete_result_2 = jerry_has_property (object, prop_name_2);\n  jerry_value_t has_after_delete_result_3 = jerry_has_property (object, prop_name_3);\n  bool has_after_delete_result_4 = jerry_has_internal_property (object, internal_prop_name_1);\n  bool has_after_delete_result_5 = jerry_has_internal_property (object, internal_prop_name_2);\n  bool has_after_delete_result_6 = jerry_has_internal_property (object, internal_prop_name_3);\n\n  TEST_ASSERT (jerry_value_is_boolean (has_after_delete_result_1)\n               && !jerry_get_boolean_value (has_after_delete_result_1));\n  TEST_ASSERT (jerry_value_is_boolean (has_after_delete_result_2)\n               && !jerry_get_boolean_value (has_after_delete_result_2));\n  TEST_ASSERT (jerry_value_is_boolean (has_after_delete_result_3)\n               && !jerry_get_boolean_value (has_after_delete_result_3));\n  TEST_ASSERT (has_after_delete_result_4);\n  TEST_ASSERT (has_after_delete_result_5);\n  TEST_ASSERT (has_after_delete_result_6);\n\n  jerry_release_value (has_after_delete_result_1);\n  jerry_release_value (has_after_delete_result_2);\n  jerry_release_value (has_after_delete_result_3);\n\n  /* Test the internal [[Delete]] method. */\n  bool delete_internal_result_4 = jerry_delete_internal_property (object, internal_prop_name_1);\n  bool delete_internal_result_5 = jerry_delete_internal_property (object, internal_prop_name_2);\n  bool delete_internal_result_6 = jerry_delete_internal_property (object, internal_prop_name_3);\n\n  TEST_ASSERT (delete_internal_result_4);\n  TEST_ASSERT (delete_internal_result_5);\n  TEST_ASSERT (delete_internal_result_6);\n\n  bool has_after_internal_delete_result_1 = jerry_has_internal_property (object, internal_prop_name_1);\n  bool has_after_internal_delete_result_2 = jerry_has_internal_property (object, internal_prop_name_2);\n  bool has_after_internal_delete_result_3 = jerry_has_internal_property (object, internal_prop_name_3);\n\n  TEST_ASSERT (!has_after_internal_delete_result_1);\n  TEST_ASSERT (!has_after_internal_delete_result_2);\n  TEST_ASSERT (!has_after_internal_delete_result_3);\n\n  /* Cleanup */\n  jerry_release_value (prop_value_3);\n  jerry_release_value (prop_value_2);\n  jerry_release_value (prop_value_1);\n\n  jerry_release_value (prop_name_3);\n  jerry_release_value (prop_name_2);\n  jerry_release_value (prop_name_1);\n\n  jerry_release_value (internal_prop_value_3);\n  jerry_release_value (internal_prop_value_2);\n  jerry_release_value (internal_prop_value_1);\n\n  jerry_release_value (internal_prop_name_3);\n  jerry_release_value (internal_prop_name_2);\n  jerry_release_value (internal_prop_name_1);\n\n  jerry_release_value (object);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-jmem.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-init-finalize.h\"\n#include \"jmem.h\"\n\n#include \"test-common.h\"\n\n#define BASIC_SIZE (64)\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jmem_init ();\n  ecma_init ();\n\n  {\n    uint8_t *block1_p = (uint8_t *) jmem_heap_alloc_block (BASIC_SIZE);\n    uint8_t *block2_p = (uint8_t *) jmem_heap_alloc_block (BASIC_SIZE);\n    uint8_t *block3_p = (uint8_t *) jmem_heap_alloc_block (BASIC_SIZE);\n\n    /* [block1 64] [block2 64] [block3 64] [...] */\n\n    for (uint8_t i = 0; i < BASIC_SIZE; i++)\n    {\n      block2_p[i] = i;\n    }\n\n    /* Realloc by moving */\n    block2_p = jmem_heap_realloc_block (block2_p, BASIC_SIZE, BASIC_SIZE * 2);\n\n    /* [block1 64] [free 64] [block3 64] [block2 128] [...] */\n\n    for (uint8_t i = 0; i < BASIC_SIZE; i++)\n    {\n      TEST_ASSERT (block2_p[i] == i);\n    }\n\n    for (uint8_t i = BASIC_SIZE; i < BASIC_SIZE * 2; i++)\n    {\n      block2_p[i] = i;\n    }\n\n    uint8_t *block4_p = (uint8_t *) jmem_heap_alloc_block (BASIC_SIZE * 2);\n\n    /* [block1 64] [free 64] [block3 64] [block2 128] [block4 128] [...] */\n\n    jmem_heap_free_block (block3_p, BASIC_SIZE);\n\n    /* [block1 64] [free 128] [block2 128] [block4 128] [...] */\n\n    /* Realloc by extending front */\n    block2_p = (uint8_t *) jmem_heap_realloc_block (block2_p, BASIC_SIZE * 2, BASIC_SIZE * 3);\n\n    /* [block1 64] [free 64] [block2 192] [block4 128] [...] */\n\n    for (uint8_t i = 0; i < BASIC_SIZE * 2; i++)\n    {\n      TEST_ASSERT (block2_p[i] == i);\n    }\n\n    /* Shrink */\n    block2_p = (uint8_t *) jmem_heap_realloc_block (block2_p, BASIC_SIZE * 3, BASIC_SIZE);\n\n    /* [block1 64] [free 64] [block2 64] [free 128] [block4 128] [...] */\n\n    for (uint8_t i = 0; i < BASIC_SIZE; i++)\n    {\n      TEST_ASSERT (block2_p[i] == i);\n    }\n\n    for (uint8_t i = 0; i < BASIC_SIZE; i++)\n    {\n      block1_p[i] = i;\n    }\n\n    /* Grow in place */\n    block1_p = (uint8_t *) jmem_heap_realloc_block (block1_p, BASIC_SIZE, BASIC_SIZE * 2);\n\n    /* [block1 128] [block2 64] [free 128] [block4 128] [...] */\n\n    for (uint8_t i = 0; i < BASIC_SIZE; i++)\n    {\n      TEST_ASSERT (block1_p[i] == i);\n    }\n\n    jmem_heap_free_block (block1_p, BASIC_SIZE * 2);\n    jmem_heap_free_block (block2_p, BASIC_SIZE);\n    jmem_heap_free_block (block4_p, BASIC_SIZE * 2);\n  }\n\n  ecma_finalize ();\n  jmem_finalize ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-json.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nstatic jerry_value_t\ncustom_to_json (const jerry_value_t func_obj_val, /**< function object */\n                const jerry_value_t this_val, /**< this value */\n                const jerry_value_t args_p[], /**< arguments list */\n                const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_p);\n  JERRY_UNUSED (args_cnt);\n\n  return jerry_create_error (JERRY_ERROR_URI, (const jerry_char_t *) \"Error\");\n} /* custom_to_json */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  {\n    /* JSON.parse check */\n    const jerry_char_t data[] = \"{\\\"name\\\": \\\"John\\\", \\\"age\\\": 5}\";\n    jerry_value_t parsed_json = jerry_json_parse (data, sizeof (data) - 1);\n\n    /* Check \"name\" property values */\n    jerry_value_t name_key = jerry_create_string ((const jerry_char_t *) \"name\");\n\n    jerry_value_t has_name = jerry_has_property (parsed_json, name_key);\n    TEST_ASSERT (jerry_get_boolean_value (has_name));\n    jerry_release_value (has_name);\n\n    jerry_value_t name_value = jerry_get_property (parsed_json, name_key);\n    TEST_ASSERT (jerry_value_is_string (name_value) == true);\n\n    jerry_size_t name_size = jerry_get_string_size (name_value);\n    JERRY_VLA (jerry_char_t, name_data, name_size + 1);\n    jerry_size_t copied = jerry_string_to_char_buffer (name_value, name_data, name_size);\n    name_data[name_size] = '\\0';\n\n    jerry_release_value (name_value);\n\n    TEST_ASSERT (copied == name_size);\n    TEST_ASSERT_STR (\"John\", name_data);\n    jerry_release_value (name_key);\n\n    /* Check \"age\" property values */\n    jerry_value_t age_key = jerry_create_string ((const jerry_char_t *) \"age\");\n\n    jerry_value_t has_age = jerry_has_property (parsed_json, age_key);\n    TEST_ASSERT (jerry_get_boolean_value (has_age));\n    jerry_release_value (has_age);\n\n    jerry_value_t age_value = jerry_get_property (parsed_json, age_key);\n    TEST_ASSERT (jerry_value_is_number (age_value) == true);\n    TEST_ASSERT (jerry_get_number_value (age_value) == 5.0);\n\n    jerry_release_value (age_value);\n    jerry_release_value (age_key);\n\n    jerry_release_value (parsed_json);\n  }\n\n  /* JSON.parse error checks */\n  {\n    jerry_value_t parsed_json = jerry_json_parse ((const jerry_char_t *) \"\", 0);\n    TEST_ASSERT (jerry_value_is_error (parsed_json));\n    TEST_ASSERT (jerry_get_error_type (parsed_json) == JERRY_ERROR_SYNTAX);\n    jerry_release_value (parsed_json);\n  }\n\n  {\n    jerry_value_t parsed_json = jerry_json_parse ((const jerry_char_t *) \"-\", 1);\n    TEST_ASSERT (jerry_value_is_error (parsed_json));\n    TEST_ASSERT (jerry_get_error_type (parsed_json) == JERRY_ERROR_SYNTAX);\n    jerry_release_value (parsed_json);\n  }\n\n  /* JSON.stringify check */\n  {\n    jerry_value_t obj = jerry_create_object ();\n    /* Fill \"obj\" with data */\n    {\n      jerry_value_t name_key = jerry_create_string ((const jerry_char_t *) \"name\");\n      jerry_value_t name_value = jerry_create_string ((const jerry_char_t *) \"John\");\n      jerry_value_t name_set = jerry_set_property (obj, name_key, name_value);\n      TEST_ASSERT (!jerry_value_is_error (name_set));\n      TEST_ASSERT (jerry_value_is_boolean (name_set));\n      TEST_ASSERT (jerry_get_boolean_value (name_set));\n      jerry_release_value (name_key);\n      jerry_release_value (name_value);\n      jerry_release_value (name_set);\n    }\n    {\n      jerry_value_t age_key = jerry_create_string ((const jerry_char_t *) \"age\");\n      jerry_value_t age_value = jerry_create_number (32);\n      jerry_value_t age_set = jerry_set_property (obj, age_key, age_value);\n      TEST_ASSERT (!jerry_value_is_error (age_set));\n      TEST_ASSERT (jerry_value_is_boolean (age_set));\n      TEST_ASSERT (jerry_get_boolean_value (age_set));\n      jerry_release_value (age_key);\n      jerry_release_value (age_value);\n      jerry_release_value (age_set);\n    }\n\n    jerry_value_t json_string = jerry_json_stringify (obj);\n    TEST_ASSERT (jerry_value_is_string (json_string));\n\n    jerry_release_value (obj);\n\n    jerry_size_t json_size = jerry_get_string_size (json_string);\n    JERRY_VLA (jerry_char_t, json_data, json_size + 1);\n    jerry_string_to_char_buffer (json_string, json_data, json_size);\n    json_data[json_size] = '\\0';\n\n    const char check_value[] = \"{\\\"name\\\":\\\"John\\\",\\\"age\\\":32}\";\n    TEST_ASSERT_STR (check_value, json_data);\n\n    jerry_release_value (json_string);\n  }\n\n  /* Custom \"toJSON\" invocation test */\n  {\n    jerry_value_t obj = jerry_create_object ();\n    /* Fill \"obj\" with data */\n    {\n      jerry_value_t name_key = jerry_create_string ((const jerry_char_t *) \"toJSON\");\n      jerry_value_t name_value = jerry_create_external_function (custom_to_json);\n      jerry_value_t name_set = jerry_set_property (obj, name_key, name_value);\n      TEST_ASSERT (!jerry_value_is_error (name_set));\n      TEST_ASSERT (jerry_value_is_boolean (name_set));\n      TEST_ASSERT (jerry_get_boolean_value (name_set));\n      jerry_release_value (name_key);\n      jerry_release_value (name_value);\n      jerry_release_value (name_set);\n    }\n\n    jerry_value_t json_string = jerry_json_stringify (obj);\n    TEST_ASSERT (jerry_value_is_error (json_string));\n    TEST_ASSERT (jerry_get_error_type (json_string) == JERRY_ERROR_URI);\n\n    jerry_release_value (json_string);\n    jerry_release_value (obj);\n  }\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-lit-char-helpers.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-helpers.h\"\n#include \"lit-strings.h\"\n#include \"ecma-init-finalize.h\"\n#include \"lit-char-helpers.h\"\n#include \"js-parser-internal.h\"\n\n#include \"test-common.h\"\n\nstatic lit_code_point_t\nlexer_hex_to_character (const uint8_t *source_p) /**< current source position */\n{\n  lit_code_point_t result = 0;\n\n  do\n  {\n    uint32_t byte = *source_p++;\n\n    result <<= 4;\n\n    if (byte >= LIT_CHAR_0 && byte <= LIT_CHAR_9)\n    {\n      result += byte - LIT_CHAR_0;\n    }\n    else\n    {\n      byte = LEXER_TO_ASCII_LOWERCASE (byte);\n      if (byte >= LIT_CHAR_LOWERCASE_A && byte <= LIT_CHAR_LOWERCASE_F)\n      {\n        result += byte - (LIT_CHAR_LOWERCASE_A - 10);\n      }\n      else\n      {\n        return UINT32_MAX;\n      }\n    }\n  }\n  while (*source_p);\n\n  return result;\n} /* lexer_hex_to_character */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jmem_init ();\n  ecma_init ();\n\n  const uint8_t _1_byte_long1[] = \"007F\";\n  const uint8_t _1_byte_long2[] = \"0000\";\n  const uint8_t _1_byte_long3[] = \"0065\";\n\n  const uint8_t _2_byte_long1[] = \"008F\";\n  const uint8_t _2_byte_long2[] = \"00FF\";\n  const uint8_t _2_byte_long3[] = \"07FF\";\n\n  const uint8_t _3_byte_long1[] = \"08FF\";\n  const uint8_t _3_byte_long2[] = \"0FFF\";\n  const uint8_t _3_byte_long3[] = \"FFFF\";\n\n  const uint8_t _6_byte_long1[] = \"10000\";\n  const uint8_t _6_byte_long2[] = \"10FFFF\";\n\n  size_t length;\n\n  /* Test 1-byte-long unicode sequences. */\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_1_byte_long1));\n  TEST_ASSERT (length == 1);\n\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_1_byte_long2));\n  TEST_ASSERT (length == 1);\n\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_1_byte_long3));\n  TEST_ASSERT (length == 1);\n\n  /* Test 2-byte-long unicode sequences. */\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_2_byte_long1));\n  TEST_ASSERT (length == 2);\n\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_2_byte_long2));\n  TEST_ASSERT (length == 2);\n\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_2_byte_long3));\n  TEST_ASSERT (length == 2);\n\n  /* Test 3-byte-long unicode sequences. */\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_3_byte_long1));\n  TEST_ASSERT (length == 3);\n\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_3_byte_long2));\n  TEST_ASSERT (length == 3);\n\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_3_byte_long3));\n  TEST_ASSERT (length == 3);\n\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_6_byte_long1));\n  TEST_ASSERT (length == 6);\n\n  length = lit_code_point_get_cesu8_length (lexer_hex_to_character (_6_byte_long2));\n  TEST_ASSERT (length == 6);\n\n  ecma_finalize ();\n  jmem_finalize ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-literal-storage.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-helpers.h\"\n#include \"ecma-literal-storage.h\"\n#include \"test-common.h\"\n\n/* Iterations count. */\n#define test_iters 64\n\n/* Subiterations count. */\n#define test_sub_iters 64\n\n/* Max characters in a string. */\n#define max_characters_in_string 256\n\nstatic void\ngenerate_string (lit_utf8_byte_t *str, lit_utf8_size_t len)\n{\n  static const lit_utf8_byte_t bytes[] = \"!@#$%^&*()_+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789\";\n  static const lit_utf8_size_t length = (lit_utf8_size_t) (sizeof (bytes) - 1);\n  for (lit_utf8_size_t i = 0; i < len; ++i)\n  {\n    str[i] = bytes[(unsigned long) rand () % length];\n  }\n} /* generate_string */\n\nstatic ecma_number_t\ngenerate_number (void)\n{\n  ecma_number_t num = ((ecma_number_t) rand () / 32767.0);\n  if (rand () % 2)\n  {\n    num = -num;\n  }\n  int power = rand () % 30;\n  while (power-- > 0)\n  {\n    num *= 10;\n  }\n  return num;\n} /* generate_number */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  const lit_utf8_byte_t *ptrs[test_sub_iters];\n  ecma_number_t numbers[test_sub_iters];\n  lit_utf8_byte_t strings[test_sub_iters][max_characters_in_string + 1];\n  lit_utf8_size_t lengths[test_sub_iters];\n\n  jmem_init ();\n\n  for (uint32_t i = 0; i < test_iters; i++)\n  {\n    memset (numbers, 0, sizeof (ecma_number_t) * test_sub_iters);\n    memset (lengths, 0, sizeof (lit_utf8_size_t) * test_sub_iters);\n    memset (ptrs, 0, sizeof (lit_utf8_byte_t *) * test_sub_iters);\n\n    for (uint32_t j = 0; j < test_sub_iters; j++)\n    {\n      int type = rand () % 3;\n      if (type == 0)\n      {\n        lengths[j] = (lit_utf8_size_t) (rand () % max_characters_in_string + 1);\n        generate_string (strings[j], lengths[j]);\n        ecma_find_or_create_literal_string (strings[j], lengths[j]);\n        strings[j][lengths[j]] = '\\0';\n        ptrs[j] = strings[j];\n        TEST_ASSERT (ptrs[j]);\n      }\n      else if (type == 1)\n      {\n        lit_magic_string_id_t msi = (lit_magic_string_id_t) (rand () % LIT_NON_INTERNAL_MAGIC_STRING__COUNT);\n        ptrs[j] = lit_get_magic_string_utf8 (msi);\n        TEST_ASSERT (ptrs[j]);\n        lengths[j] = (lit_utf8_size_t) lit_zt_utf8_string_size (ptrs[j]);\n        ecma_find_or_create_literal_string (ptrs[j], lengths[j]);\n      }\n      else\n      {\n        ecma_number_t num = generate_number ();\n        lengths[j] = ecma_number_to_utf8_string (num, strings[j], max_characters_in_string);\n        ecma_find_or_create_literal_number (num);\n      }\n    }\n\n    /* Add empty string. */\n    ecma_find_or_create_literal_string (NULL, 0);\n\n    for (uint32_t j = 0; j < test_sub_iters; j++)\n    {\n      ecma_value_t lit1;\n      ecma_value_t lit2;\n      if (ptrs[j])\n      {\n        lit1 = ecma_find_or_create_literal_string (ptrs[j], lengths[j]);\n        lit2 = ecma_find_or_create_literal_string (ptrs[j], lengths[j]);\n        TEST_ASSERT (ecma_is_value_string (lit1));\n        TEST_ASSERT (ecma_is_value_string (lit2));\n        TEST_ASSERT (lit1 == lit2);\n      }\n      else\n      {\n        lit1 = ecma_find_or_create_literal_number (numbers[j]);\n        lit2 = ecma_find_or_create_literal_number (numbers[j]);\n        TEST_ASSERT (ecma_is_value_number (lit1));\n        TEST_ASSERT (ecma_is_value_number (lit2));\n        TEST_ASSERT (lit1 == lit2);\n      }\n    }\n\n    /* Check empty string exists. */\n    TEST_ASSERT (ecma_find_or_create_literal_string (NULL, 0) != JMEM_CP_NULL);\n  }\n\n  ecma_finalize_lit_storage ();\n  jmem_finalize ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-mem-stats.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nint main (void)\n{\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_MEM_STATS))\n  {\n    return 0;\n  }\n  const jerry_char_t test_source[] = TEST_STRING_LITERAL (\n    \"var a = 'hello';\"\n    \"var b = 'world';\"\n    \"var c = a + ' ' + b;\"\n  );\n\n  jerry_init (JERRY_INIT_EMPTY);\n  jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                               0,\n                                               test_source,\n                                               sizeof (test_source) - 1,\n                                               JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n  jerry_value_t res = jerry_run (parsed_code_val);\n  TEST_ASSERT (!jerry_value_is_error (res));\n\n  jerry_heap_stats_t stats;\n  memset (&stats, 0, sizeof (stats));\n  bool get_stats_ret = jerry_get_memory_stats (&stats);\n  TEST_ASSERT (get_stats_ret);\n  TEST_ASSERT (stats.version == 1);\n  TEST_ASSERT (stats.size == 524280);\n\n  TEST_ASSERT (!jerry_get_memory_stats (NULL));\n\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-native-callback-nested.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\nstatic void native_cb2 (void)\n{\n  jerry_value_t array = jerry_create_array (100);\n  jerry_release_value (array);\n} /* native_cb2 */\n\nstatic const jerry_object_native_info_t native_info2 =\n{\n  .free_cb = (jerry_object_native_free_callback_t) native_cb2\n};\n\nstatic void native_cb (void)\n{\n  jerry_value_t array = jerry_create_array (100);\n\n  jerry_set_object_native_pointer (array, NULL, &native_info2);\n\n  jerry_release_value (array);\n} /* native_cb */\n\nstatic const jerry_object_native_info_t native_info =\n{\n  .free_cb = (jerry_object_native_free_callback_t) native_cb\n};\n\nstatic void *\ncontext_alloc_fn (size_t size, void *cb_data)\n{\n  (void) cb_data;\n  return malloc (size);\n} /* context_alloc_fn */\n\nint\nmain (void)\n{\n  jerry_context_t *ctx_p = jerry_create_context (1024, context_alloc_fn, NULL);\n  jerry_port_default_set_current_context (ctx_p);\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t obj = jerry_create_object ();\n\n  jerry_set_object_native_pointer (obj, NULL, &native_info);\n  jerry_release_value (obj);\n\n  jerry_cleanup ();\n  free (ctx_p);\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-native-instanceof.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nstatic const char instanceof_source[] = \"var x = function(o, c) {return (o instanceof c);}; x\";\n\nstatic jerry_value_t\nexternal_function (const jerry_value_t function_obj,\n                   const jerry_value_t this_arg,\n                   const jerry_value_t args_p[],\n                   const jerry_size_t args_count)\n{\n  (void) function_obj;\n  (void) this_arg;\n  (void) args_p;\n  (void) args_count;\n\n  return jerry_create_undefined ();\n} /* external_function */\n\nstatic void\ntest_instanceof (jerry_value_t instanceof,\n                 jerry_value_t constructor)\n{\n  jerry_value_t instance = jerry_construct_object (constructor, NULL, 0);\n  jerry_value_t args[2] =\n  {\n    instance, constructor\n  };\n\n  jerry_value_t undefined = jerry_create_undefined ();\n  jerry_value_t result = jerry_call_function (instanceof, undefined, args, 2);\n  jerry_release_value (undefined);\n\n  TEST_ASSERT (!jerry_value_is_error (result));\n  TEST_ASSERT (jerry_value_is_boolean (result));\n\n  TEST_ASSERT (jerry_get_boolean_value (result));\n\n  jerry_release_value (instance);\n  jerry_release_value (result);\n} /* test_instanceof */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t instanceof = jerry_eval ((jerry_char_t *) instanceof_source, sizeof (instanceof_source) - 1, true);\n\n  /* Test for a native-backed function. */\n  jerry_value_t constructor = jerry_create_external_function (external_function);\n\n  test_instanceof (instanceof, constructor);\n  jerry_release_value (constructor);\n\n  /* Test for a JS constructor. */\n  jerry_value_t global = jerry_get_global_object ();\n  jerry_value_t object_name = jerry_create_string ((jerry_char_t *) \"Object\");\n  constructor = jerry_get_property (global, object_name);\n  jerry_release_value (object_name);\n  jerry_release_value (global);\n\n  test_instanceof (instanceof, constructor);\n  jerry_release_value (constructor);\n\n  jerry_release_value (instanceof);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-newtarget.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\n/**\n * Register a JavaScript function in the global object.\n */\nstatic jerry_value_t\nregister_js_function (const char *name_p, /**< name of the function */\n                      jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  jerry_value_t function_val = jerry_create_external_function (handler_p);\n  jerry_value_t function_name_val = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t result_val = jerry_set_property (global_obj_val, function_name_val, function_val);\n\n  jerry_release_value (function_name_val);\n  jerry_release_value (global_obj_val);\n\n  jerry_release_value (result_val);\n\n  return function_val;\n} /* register_js_function */\n\nenum\n{\n  TEST_ID_SIMPLE_CONSTRUCT = 1,\n  TEST_ID_SIMPLE_CALL = 2,\n  TEST_ID_CONSTRUCT_AND_CALL_SUB = 3,\n};\n\nstatic jerry_value_t\nconstruct_handler (const jerry_value_t func_obj_val, /**< function object */\n                   const jerry_value_t this_val, /**< this arg */\n                   const jerry_value_t args_p[], /**< function arguments */\n                   const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_p);\n\n  if (args_cnt != 1 || !jerry_value_is_number (args_p[0]))\n  {\n    TEST_ASSERT (0 && \"Invalid arguments for demo method\");\n  }\n\n  int test_id = (int) jerry_get_number_value (args_p[0]);\n\n  switch (test_id)\n  {\n    case TEST_ID_SIMPLE_CONSTRUCT:\n    {\n      /* Method was called with \"new\": new.target should be equal to the function object. */\n      jerry_value_t target = jerry_get_new_target ();\n      TEST_ASSERT (!jerry_value_is_undefined (target));\n      TEST_ASSERT (target == func_obj_val);\n      jerry_release_value (target);\n      break;\n    }\n    case TEST_ID_SIMPLE_CALL:\n    {\n      /* Method was called directly without \"new\": new.target should be equal undefined. */\n      jerry_value_t target = jerry_get_new_target ();\n      TEST_ASSERT (jerry_value_is_undefined (target));\n      TEST_ASSERT (target != func_obj_val);\n      jerry_release_value (target);\n      break;\n    }\n    case TEST_ID_CONSTRUCT_AND_CALL_SUB:\n    {\n      /* Method was called with \"new\": new.target should be equal to the function object. */\n      jerry_value_t target = jerry_get_new_target ();\n      TEST_ASSERT (!jerry_value_is_undefined (target));\n      TEST_ASSERT (target == func_obj_val);\n      jerry_release_value (target);\n\n      /* Calling a function should hide the old \"new.target\". */\n      jerry_value_t sub_arg = jerry_create_number (TEST_ID_SIMPLE_CALL);\n      jerry_value_t func_call_result = jerry_call_function (func_obj_val, this_val, &sub_arg, 1);\n      TEST_ASSERT (!jerry_value_is_error (func_call_result));\n      TEST_ASSERT (jerry_value_is_undefined (func_call_result));\n      break;\n    }\n\n    default:\n    {\n      TEST_ASSERT (0 && \"Incorrect test ID\");\n      break;\n    }\n  }\n\n  return jerry_create_undefined ();\n} /* construct_handler */\n\nint\nmain (void)\n{\n  /* Test JERRY_FEATURE_SYMBOL feature as it is a must-have in ES.next */\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_SYMBOL))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Skipping test, ES.next support is disabled.\\n\");\n    return 0;\n  }\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t demo_func = register_js_function (\"Demo\", construct_handler);\n\n  {\n    jerry_value_t test_arg = jerry_create_number (TEST_ID_SIMPLE_CONSTRUCT);\n    jerry_value_t constructed = jerry_construct_object (demo_func, &test_arg, 1);\n    TEST_ASSERT (!jerry_value_is_error (constructed));\n    TEST_ASSERT (jerry_value_is_object (constructed));\n    jerry_release_value (test_arg);\n    jerry_release_value (constructed);\n  }\n\n  {\n    jerry_value_t test_arg = jerry_create_number (TEST_ID_SIMPLE_CALL);\n    jerry_value_t this_arg = jerry_create_undefined ();\n    jerry_value_t constructed = jerry_call_function (demo_func, this_arg, &test_arg, 1);\n    TEST_ASSERT (jerry_value_is_undefined (constructed));\n    jerry_release_value (constructed);\n    jerry_release_value (constructed);\n    jerry_release_value (test_arg);\n  }\n\n  {\n    jerry_value_t test_arg = jerry_create_number (TEST_ID_CONSTRUCT_AND_CALL_SUB);\n    jerry_value_t constructed = jerry_construct_object (demo_func, &test_arg, 1);\n    TEST_ASSERT (!jerry_value_is_error (constructed));\n    TEST_ASSERT (jerry_value_is_object (constructed));\n    jerry_release_value (test_arg);\n    jerry_release_value (constructed);\n  }\n\n  {\n    static const jerry_char_t test_source[] = TEST_STRING_LITERAL (\"new Demo (1)\");\n\n    jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                                 0,\n                                                 test_source,\n                                                 sizeof (test_source) - 1,\n                                                 JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n    jerry_value_t res = jerry_run (parsed_code_val);\n    TEST_ASSERT (!jerry_value_is_error (res));\n\n    jerry_release_value (res);\n    jerry_release_value (parsed_code_val);\n  }\n\n  {\n    static const jerry_char_t test_source[] = TEST_STRING_LITERAL (\"Demo (2)\");\n\n    jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                                 0,\n                                                 test_source,\n                                                 sizeof (test_source) - 1,\n                                                 JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n    jerry_value_t res = jerry_run (parsed_code_val);\n    TEST_ASSERT (!jerry_value_is_error (res));\n\n    jerry_release_value (res);\n    jerry_release_value (parsed_code_val);\n  }\n\n  {\n    static const jerry_char_t test_source[] = TEST_STRING_LITERAL (\n      \"function base(arg) { new Demo (arg); };\"\n      \"base (1);\"\n      \"new base(1);\"\n      \"new base(3);\"\n    );\n\n    jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                                 0,\n                                                 test_source,\n                                                 sizeof (test_source) - 1,\n                                                 JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n    jerry_value_t res = jerry_run (parsed_code_val);\n    TEST_ASSERT (!jerry_value_is_error (res));\n\n    jerry_release_value (res);\n    jerry_release_value (parsed_code_val);\n  }\n\n  jerry_release_value (demo_func);\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-number-converter.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n\n#include \"test-common.h\"\n\n// basic toUint32 tester method\nstatic void\ntest_to_uint32 (double input, uint32_t test_number)\n{\n  jerry_value_t number_val = jerry_create_number (input);\n  uint32_t uint_number = jerry_value_as_uint32 (number_val);\n  TEST_ASSERT (uint_number == test_number);\n  jerry_release_value (number_val);\n} /* test_to_uint32 */\n\n// basic toInt32 tester method\nstatic void\ntest_to_int32 (double input, int32_t test_number)\n{\n  jerry_value_t number_val = jerry_create_number (input);\n  int32_t int_number = jerry_value_as_int32 (number_val);\n  TEST_ASSERT (int_number == test_number);\n  jerry_release_value (number_val);\n} /* test_to_int32 */\n\n// basic toInteger tester method\nstatic void\ntest_to_interger (double input, double test_number)\n{\n  jerry_value_t number_val = jerry_create_number (input);\n  double double_number = jerry_value_as_integer (number_val);\n  TEST_ASSERT (double_number == test_number);\n  jerry_release_value (number_val);\n} /* test_to_interger */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  // few toUint32 test-cases\n  test_to_uint32 (1.0, 1);\n  test_to_uint32 (0.0, 0);\n  test_to_uint32 (NAN, 0);\n  test_to_uint32 (-NAN, 0);\n  test_to_uint32 (INFINITY, 0);\n  test_to_uint32 (-INFINITY, 0);\n  test_to_uint32 (0.1, 0);\n  test_to_uint32 (-0.1, 0);\n  test_to_uint32 (1.1, 1);\n  test_to_uint32 (-1.1, 4294967295);\n  test_to_uint32 (4294967295, 4294967295);\n  test_to_uint32 (-4294967295, 1);\n  test_to_uint32 (4294967296, 0);\n  test_to_uint32 (-4294967296, 0);\n  test_to_uint32 (4294967297, 1);\n  test_to_uint32 (-4294967297, 4294967295);\n\n  // few toint32 test-cases\n  test_to_int32 (1.0, 1);\n  test_to_int32 (0.0, 0);\n  test_to_int32 (NAN, 0);\n  test_to_int32 (-NAN, 0);\n  test_to_int32 (INFINITY, 0);\n  test_to_int32 (-INFINITY, 0);\n  test_to_int32 (0.1, 0);\n  test_to_int32 (-0.1, 0);\n  test_to_int32 (1.1, 1);\n  test_to_int32 (-1.1, -1);\n  test_to_int32 (4294967295, -1);\n  test_to_int32 (-4294967295, 1);\n  test_to_int32 (4294967296, 0);\n  test_to_int32 (-4294967296, 0);\n  test_to_int32 (4294967297, 1);\n  test_to_int32 (-4294967297, -1);\n  test_to_int32 (2147483648, -2147483648);\n  test_to_int32 (-2147483648, -2147483648);\n  test_to_int32 (2147483647, 2147483647);\n  test_to_int32 (-2147483647, -2147483647);\n  test_to_int32 (-2147483649, 2147483647);\n  test_to_int32 (2147483649, -2147483647);\n\n  // few toInteger test-cases\n  test_to_interger (1.0, 1.0);\n  test_to_interger (0.0, 0.0);\n  test_to_interger (NAN, 0);\n  test_to_interger (-NAN, 0);\n  test_to_interger (INFINITY, INFINITY);\n  test_to_interger (-INFINITY, -INFINITY);\n  test_to_interger (0.1, 0);\n  test_to_interger (-0.1, -0);\n  test_to_interger (1.1, 1);\n  test_to_interger (-1.1, -1);\n  test_to_interger (4294967295, 4294967295);\n  test_to_interger (-4294967295, -4294967295);\n  test_to_interger (4294967295, 4294967295);\n  test_to_interger (-4294967296, -4294967296);\n  test_to_interger (4294967297, 4294967297);\n  test_to_interger (-4294967297, -4294967297);\n\n  // few test-cases which return with error\n  jerry_value_t error_val =  jerry_create_error (JERRY_ERROR_TYPE, (const jerry_char_t *) \"error\");\n  double number = jerry_value_as_integer (error_val);\n  jerry_release_value (error_val);\n  TEST_ASSERT (number == 0);\n\n  error_val = jerry_create_symbol (error_val);\n  number = jerry_value_as_integer (error_val);\n  TEST_ASSERT (number == 0);\n  jerry_release_value (error_val);\n\n  error_val = jerry_eval ((const jerry_char_t *) \"({ valueOf() { throw new TypeError('foo')}})\",\n                          44, JERRY_PARSE_NO_OPTS);\n  number = jerry_value_as_integer (error_val);\n  TEST_ASSERT (number == 0);\n  jerry_release_value (error_val);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-number-to-int32.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n\n#include \"test-common.h\"\n\ntypedef struct\n{\n  ecma_number_t num;\n  uint32_t uint32_num;\n} uint32_test_case_t;\n\ntypedef struct\n{\n  ecma_number_t num;\n  int32_t int32_num;\n} int32_test_case_t;\n\n/**\n * Unit test's main function.\n */\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  const uint32_test_case_t test_cases_uint32[] =\n  {\n#define TEST_CASE(num, uint32) { num, uint32 }\n    TEST_CASE (1.0, 1),\n    TEST_CASE (0.0, 0),\n    TEST_CASE (NAN, 0),\n    TEST_CASE (-NAN, 0),\n    TEST_CASE (INFINITY, 0),\n    TEST_CASE (-INFINITY, 0),\n    TEST_CASE (0.1, 0),\n    TEST_CASE (-0.1, 0),\n    TEST_CASE (1.1, 1),\n    TEST_CASE (-1.1, 4294967295),\n    TEST_CASE (4294967295, 4294967295),\n    TEST_CASE (-4294967295, 1),\n    TEST_CASE (4294967296, 0),\n    TEST_CASE (-4294967296, 0),\n    TEST_CASE (4294967297, 1),\n    TEST_CASE (-4294967297, 4294967295)\n#undef TEST_CASE\n  };\n\n  for (uint32_t i = 0;\n       i < sizeof (test_cases_uint32) / sizeof (test_cases_uint32[0]);\n       i++)\n  {\n    TEST_ASSERT (ecma_number_to_uint32 (test_cases_uint32[i].num) == test_cases_uint32[i].uint32_num);\n  }\n\n  int32_test_case_t test_cases_int32[] =\n  {\n#define TEST_CASE(num, int32) { num, int32 }\n    TEST_CASE (1.0, 1),\n    TEST_CASE (0.0, 0),\n    TEST_CASE (NAN, 0),\n    TEST_CASE (-NAN, 0),\n    TEST_CASE (INFINITY, 0),\n    TEST_CASE (-INFINITY, 0),\n    TEST_CASE (0.1, 0),\n    TEST_CASE (-0.1, 0),\n    TEST_CASE (1.1, 1),\n    TEST_CASE (-1.1, -1),\n    TEST_CASE (4294967295, -1),\n    TEST_CASE (-4294967295, 1),\n    TEST_CASE (4294967296, 0),\n    TEST_CASE (-4294967296, 0),\n    TEST_CASE (4294967297, 1),\n    TEST_CASE (-4294967297, -1),\n    TEST_CASE (2147483648, -2147483648),\n    TEST_CASE (-2147483648, -2147483648),\n    TEST_CASE (2147483647, 2147483647),\n    TEST_CASE (-2147483647, -2147483647),\n    TEST_CASE (-2147483649, 2147483647),\n    TEST_CASE (2147483649, -2147483647)\n#undef TEST_CASE\n  };\n\n  for (uint32_t i = 0;\n       i < sizeof (test_cases_int32) / sizeof (test_cases_int32[0]);\n       i++)\n  {\n    TEST_ASSERT (ecma_number_to_int32 (test_cases_int32[i].num) == test_cases_int32[i].int32_num);\n  }\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-number-to-string.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n\n#include \"test-common.h\"\n\n/**\n * Unit test's main function.\n */\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  const lit_utf8_byte_t *strings[] =\n  {\n    (const lit_utf8_byte_t *) \"1\",\n    (const lit_utf8_byte_t *) \"0.5\",\n    (const lit_utf8_byte_t *) \"12345\",\n    (const lit_utf8_byte_t *) \"12345.123\",\n    (const lit_utf8_byte_t *) \"1e-45\",\n    (const lit_utf8_byte_t *) \"-2.5e+38\",\n    (const lit_utf8_byte_t *) \"NaN\",\n    (const lit_utf8_byte_t *) \"Infinity\",\n    (const lit_utf8_byte_t *) \"-Infinity\",\n    (const lit_utf8_byte_t *) \"0\",\n    (const lit_utf8_byte_t *) \"0\",\n  };\n\n  const ecma_number_t nums[] =\n  {\n    (ecma_number_t) 1.0,\n    (ecma_number_t) 0.5,\n    (ecma_number_t) 12345.0,\n    (ecma_number_t) 12345.123,\n    (ecma_number_t) 1.0e-45,\n    (ecma_number_t) -2.5e+38,\n    (ecma_number_t) NAN,\n    (ecma_number_t) INFINITY,\n    (ecma_number_t) -INFINITY,\n    (ecma_number_t) +0.0,\n    (ecma_number_t) -0.0\n  };\n\n  for (uint32_t i = 0;\n       i < sizeof (nums) / sizeof (nums[0]);\n       i++)\n  {\n    lit_utf8_byte_t str[64];\n\n    lit_utf8_size_t str_size = ecma_number_to_utf8_string (nums[i], str, sizeof (str));\n\n    if (strncmp ((char *) str, (char *) strings[i], str_size) != 0)\n    {\n      return 1;\n    }\n  }\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-objects-foreach.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nstatic bool\ncount_objects (jerry_value_t object, void *user_arg)\n{\n  (void) object;\n  TEST_ASSERT (user_arg != NULL);\n\n  int *counter = (int *) user_arg;\n\n  (*counter)++;\n  return true;\n} /* count_objects */\n\nstatic void\ntest_container (void)\n{\n  jerry_value_t global = jerry_get_global_object ();\n  jerry_value_t map_str = jerry_create_string ((const jerry_char_t *) \"Map\");\n  jerry_value_t map_result = jerry_get_property (global, map_str);\n  jerry_type_t type = jerry_value_get_type (map_result);\n\n  jerry_release_value (map_result);\n  jerry_release_value (map_str);\n  jerry_release_value (global);\n\n  /* If there is no Map function this is not an es.next profile build, skip this test case. */\n  if (type != JERRY_TYPE_FUNCTION)\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Container based test is disabled!\\n\");\n    return;\n  }\n\n  {\n    /* Create a \"DEMO\" array which will be used for the Map below. */\n    const char array_str[] = \"var DEMO = [[1, 2], [3, 4]]; DEMO\";\n    jerry_value_t array = jerry_eval ((const jerry_char_t *) array_str, sizeof (array_str) - 1, 0);\n    TEST_ASSERT (jerry_value_is_object (array));\n    TEST_ASSERT (!jerry_value_is_error (array));\n    jerry_release_value (array);\n  }\n\n  const char eval_str[] = \"new Map (DEMO)\";\n  {\n    /* Make sure that the Map and it's prototype object/function is initialized. */\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) eval_str, sizeof (eval_str) - 1, 0);\n    TEST_ASSERT (jerry_value_is_object (result));\n    TEST_ASSERT (!jerry_value_is_error (result));\n    jerry_release_value (result);\n  }\n\n  /* Do a bit of cleaning to clear up old objects. */\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n\n  /* Get the number of iterable objects. */\n  int start_count = 0;\n  jerry_objects_foreach (count_objects, &start_count);\n\n  /* Create another map. */\n  jerry_value_t result = jerry_eval ((const jerry_char_t *) eval_str, sizeof (eval_str) - 1, 0);\n\n  /* Remove any old/unused objects. */\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n\n  /* Get the current number of objects. */\n  int end_count = 0;\n  jerry_objects_foreach (count_objects, &end_count);\n\n  /* As only one Map was created the number of available iterable objects should be incremented only by one. */\n  TEST_ASSERT (end_count > start_count);\n  TEST_ASSERT ((end_count - start_count) == 1);\n\n  jerry_release_value (result);\n} /* test_container */\n\nstatic void\ntest_internal_prop (void)\n{\n  /* Make sure that the object is initialized in the engine. */\n  jerry_value_t object_dummy = jerry_create_object ();\n\n  /* Get the number of iterable objects. */\n  int before_object_count = 0;\n  jerry_objects_foreach (count_objects, &before_object_count);\n\n  jerry_value_t object = jerry_create_object ();\n\n  /* After creating the object, the number of objects is incremented by one. */\n  int after_object_count = 0;\n  {\n    jerry_objects_foreach (count_objects, &after_object_count);\n\n    TEST_ASSERT (after_object_count > before_object_count);\n    TEST_ASSERT ((after_object_count - before_object_count) == 1);\n  }\n\n  jerry_value_t internal_prop_name = jerry_create_string ((const jerry_char_t *) \"hidden_foo\");\n  jerry_value_t internal_prop_object = jerry_create_object ();\n  bool internal_result = jerry_set_internal_property (object, internal_prop_name, internal_prop_object);\n  TEST_ASSERT (internal_result == true);\n  jerry_release_value (internal_prop_name);\n  jerry_release_value (internal_prop_object);\n\n  /* After adding an internal property object, the number of object is incremented by one. */\n  {\n    int after_internal_count = 0;\n    jerry_objects_foreach (count_objects, &after_internal_count);\n\n    TEST_ASSERT (after_internal_count > after_object_count);\n    TEST_ASSERT ((after_internal_count - after_object_count) == 1);\n  }\n\n  jerry_release_value (object);\n  jerry_release_value (object_dummy);\n} /* test_internal_prop */\n\nstatic int test_data = 1;\n\nstatic void free_test_data (void *data_p)\n{\n  TEST_ASSERT ((int *) data_p == &test_data);\n} /* free_test_data */\n\nstatic const jerry_object_native_info_t test_info =\n{\n  .free_cb = free_test_data\n};\n\nstatic const jerry_char_t strict_equal_source[] = \"var x = function(a, b) {return a === b;}; x\";\n\nstatic bool\nfind_test_object_by_data (const jerry_value_t candidate,\n                          void *object_data_p,\n                          void *context_p)\n{\n  if (object_data_p == &test_data)\n  {\n    *((jerry_value_t *) context_p) = jerry_acquire_value (candidate);\n    return false;\n  }\n  return true;\n} /* find_test_object_by_data */\n\nstatic bool\nfind_test_object_by_property (const jerry_value_t candidate,\n                              void *context_p)\n{\n  jerry_value_t *args_p = (jerry_value_t *) context_p;\n  jerry_value_t result = jerry_has_property (candidate, args_p[0]);\n\n  bool has_property = (!jerry_value_is_error (result) && jerry_get_boolean_value (result));\n\n  /* If the object has the desired property, store a new reference to it in args_p[1]. */\n  if (has_property)\n  {\n    args_p[1] = jerry_acquire_value (candidate);\n  }\n\n  jerry_release_value (result);\n\n  /* Stop iterating if we've found our object. */\n  return !has_property;\n} /* find_test_object_by_property */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Render strict-equal as a function. */\n  jerry_value_t parse_result = jerry_parse (NULL,\n                                            0,\n                                            strict_equal_source,\n                                            sizeof (strict_equal_source) - 1,\n                                            JERRY_PARSE_STRICT_MODE);\n  TEST_ASSERT (!jerry_value_is_error (parse_result));\n  jerry_value_t strict_equal = jerry_run (parse_result);\n  TEST_ASSERT (!jerry_value_is_error (strict_equal));\n  jerry_release_value (parse_result);\n\n  /* Create an object and associate some native data with it. */\n  jerry_value_t object = jerry_create_object ();\n  jerry_set_object_native_pointer (object, &test_data, &test_info);\n\n  /* Retrieve the object by its native pointer. */\n\n  jerry_value_t found_object;\n  TEST_ASSERT (jerry_objects_foreach_by_native_info (&test_info, find_test_object_by_data, &found_object));\n  jerry_value_t args[2] = {object, found_object};\n\n  /* Assert that the correct object was retrieved. */\n  jerry_value_t undefined = jerry_create_undefined ();\n  jerry_value_t strict_equal_result = jerry_call_function (strict_equal, undefined, args, 2);\n  TEST_ASSERT (jerry_value_is_boolean (strict_equal_result) && jerry_get_boolean_value (strict_equal_result));\n  jerry_release_value (strict_equal_result);\n  jerry_release_value (found_object);\n  jerry_release_value (object);\n\n  /* Collect garbage. */\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n\n  /* Attempt to retrieve the object by its native pointer again. */\n  TEST_ASSERT (!jerry_objects_foreach_by_native_info (&test_info, find_test_object_by_data, &found_object));\n\n  /* Create an object and set a property on it. */\n  object = jerry_create_object ();\n  jerry_value_t property_name = jerry_create_string ((jerry_char_t *) \"xyzzy\");\n  jerry_value_t property_value = jerry_create_number (42);\n  jerry_release_value (jerry_set_property (object, property_name, property_value));\n  jerry_release_value (property_value);\n\n  /* Retrieve the object by the presence of its property, placing it at args[1]. */\n  args[0] = property_name;\n  TEST_ASSERT (jerry_objects_foreach (find_test_object_by_property, args));\n\n  /* Assert that the right object was retrieved and release both the original reference to it and the retrieved one. */\n  args[0] = object;\n  strict_equal_result = jerry_call_function (strict_equal, undefined, args, 2);\n  TEST_ASSERT (jerry_value_is_boolean (strict_equal_result) && jerry_get_boolean_value (strict_equal_result));\n  jerry_release_value (strict_equal_result);\n  jerry_release_value (args[0]);\n  jerry_release_value (args[1]);\n\n  /* Collect garbage. */\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n\n  /* Attempt to retrieve the object by the presence of its property again. */\n  args[0] = property_name;\n  TEST_ASSERT (!jerry_objects_foreach (find_test_object_by_property, args));\n\n  jerry_release_value (property_name);\n  jerry_release_value (undefined);\n  jerry_release_value (strict_equal);\n\n  test_container ();\n  test_internal_prop ();\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-poolman.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for pool manager.\n */\n\n#include <stdbool.h>\n#include <stdint.h>\n#include <string.h>\n\n#include \"jmem.h\"\n\n#define JMEM_ALLOCATOR_INTERNAL\n#include \"jmem-allocator-internal.h\"\n\n#include \"test-common.h\"\n\n/* Iterations count. */\nconst uint32_t test_iters = 1024;\n\n/* Subiterations count. */\n#define TEST_MAX_SUB_ITERS  1024\n#define TEST_CHUNK_SIZE 8\n\nuint8_t *ptrs[TEST_MAX_SUB_ITERS];\nuint8_t data[TEST_MAX_SUB_ITERS][TEST_CHUNK_SIZE];\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jmem_init ();\n\n  for (uint32_t i = 0; i < test_iters; i++)\n  {\n    const size_t subiters = ((size_t) rand () % TEST_MAX_SUB_ITERS) + 1;\n\n    for (size_t j = 0; j < subiters; j++)\n    {\n      ptrs[j] = (uint8_t *) jmem_pools_alloc (TEST_CHUNK_SIZE);\n\n      if (ptrs[j] != NULL)\n      {\n        for (size_t k = 0; k < TEST_CHUNK_SIZE; k++)\n        {\n          ptrs[j][k] = (uint8_t) (rand () % 256);\n        }\n\n        memcpy (data[j], ptrs[j], TEST_CHUNK_SIZE);\n      }\n    }\n\n    /* jmem_heap_print (false); */\n\n    for (size_t j = 0; j < subiters; j++)\n    {\n      if (rand () % 256 == 0)\n      {\n        jmem_pools_collect_empty ();\n      }\n\n      if (ptrs[j] != NULL)\n      {\n        TEST_ASSERT (!memcmp (data[j], ptrs[j], TEST_CHUNK_SIZE));\n\n        jmem_pools_free (ptrs[j], TEST_CHUNK_SIZE);\n      }\n    }\n  }\n\n#ifdef JMEM_STATS\n  jmem_heap_stats_print ();\n#endif /* JMEM_STATS */\n\n  jmem_finalize ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-promise.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\nstatic const jerry_char_t test_source[] = TEST_STRING_LITERAL (\n  \"var p1 = create_promise1();\"\n  \"var p2 = create_promise2();\"\n  \"p1.then(function(x) { \"\n  \"  assert(x==='resolved'); \"\n  \"}); \"\n  \"p2.catch(function(x) { \"\n  \"  assert(x==='rejected'); \"\n  \"}); \"\n);\n\nstatic int count_in_assert = 0;\nstatic jerry_value_t my_promise1;\nstatic jerry_value_t my_promise2;\nstatic const jerry_char_t s1[] = \"resolved\";\nstatic const jerry_char_t s2[] = \"rejected\";\n\nstatic jerry_value_t\ncreate_promise1_handler (const jerry_value_t func_obj_val, /**< function object */\n                         const jerry_value_t this_val, /**< this value */\n                         const jerry_value_t args_p[], /**< arguments list */\n                         const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_p);\n  JERRY_UNUSED (args_cnt);\n\n  jerry_value_t ret =  jerry_create_promise ();\n  my_promise1 = jerry_acquire_value (ret);\n\n  return ret;\n} /* create_promise1_handler */\n\nstatic jerry_value_t\ncreate_promise2_handler (const jerry_value_t func_obj_val, /**< function object */\n                         const jerry_value_t this_val, /**< this value */\n                         const jerry_value_t args_p[], /**< arguments list */\n                         const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_p);\n  JERRY_UNUSED (args_cnt);\n\n  jerry_value_t ret =  jerry_create_promise ();\n  my_promise2 = jerry_acquire_value (ret);\n\n  return ret;\n} /* create_promise2_handler */\n\nstatic jerry_value_t\nassert_handler (const jerry_value_t func_obj_val, /**< function object */\n                const jerry_value_t this_val, /**< this arg */\n                const jerry_value_t args_p[], /**< function arguments */\n                const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  count_in_assert++;\n\n  if (args_cnt == 1\n      && jerry_value_is_boolean (args_p[0])\n      && jerry_get_boolean_value (args_p[0]))\n  {\n    return jerry_create_boolean (true);\n  }\n  else\n  {\n    TEST_ASSERT (false);\n  }\n} /* assert_handler */\n\n/**\n * Register a JavaScript function in the global object.\n */\nstatic void\nregister_js_function (const char *name_p, /**< name of the function */\n                      jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  jerry_value_t function_val = jerry_create_external_function (handler_p);\n  jerry_value_t function_name_val = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t result_val = jerry_set_property (global_obj_val, function_name_val, function_val);\n\n  jerry_release_value (function_name_val);\n  jerry_release_value (function_val);\n  jerry_release_value (global_obj_val);\n\n  jerry_release_value (result_val);\n} /* register_js_function */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_PROMISE))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Promise is disabled!\\n\");\n    jerry_cleanup ();\n    return 0;\n  }\n\n  register_js_function (\"create_promise1\", create_promise1_handler);\n  register_js_function (\"create_promise2\", create_promise2_handler);\n  register_js_function (\"assert\", assert_handler);\n\n  jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                               0,\n                                               test_source,\n                                               sizeof (test_source) - 1,\n                                               JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n  jerry_value_t res = jerry_run (parsed_code_val);\n  TEST_ASSERT (!jerry_value_is_error (res));\n\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n\n  /* Test jerry_create_promise and jerry_value_is_promise. */\n  TEST_ASSERT (jerry_value_is_promise (my_promise1));\n  TEST_ASSERT (jerry_value_is_promise (my_promise2));\n\n  TEST_ASSERT (count_in_assert == 0);\n\n  /* Test jerry_resolve_or_reject_promise. */\n  jerry_value_t str_resolve = jerry_create_string (s1);\n  jerry_value_t str_reject = jerry_create_string (s2);\n\n  jerry_resolve_or_reject_promise (my_promise1, str_resolve, true);\n  jerry_resolve_or_reject_promise (my_promise2, str_reject, false);\n\n  /* The resolve/reject function should be invalid after the promise has the result. */\n  jerry_resolve_or_reject_promise (my_promise2, str_resolve, true);\n  jerry_resolve_or_reject_promise (my_promise1, str_reject, false);\n\n  /* Run the jobqueue. */\n  res = jerry_run_all_enqueued_jobs ();\n\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (count_in_assert == 2);\n\n  jerry_release_value (my_promise1);\n  jerry_release_value (my_promise2);\n  jerry_release_value (str_resolve);\n  jerry_release_value (str_reject);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-proxy.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\n/** Test in Proxy on C side. Equivalent test code in JS:\n\nvar demo = 0.0;\n\nvar target = {};\nvar handler = {\n    get: function (target, name, recv) {\n        assert (typeof (target) === 'object');\n        assert (name === 'value');\n        assert (typeof (recv) === 'object');\n        return demo++;\n    }\n\n    set: function (target, name, value, recv) {\n        assert (typeof (target) === 'object');\n        assert (name === 'value');\n        assert (typeof (recv) === 'object');\n        demo = 55;\n        return demo;\n    }\n};\n\nvar pdemo = new Proxy(target, handler);\n\nassert (pdemo.value === 1.0);\nassert (pdemo.value === 1.0);\nassert (pdemo.value === 2.0);\n\npdemo.value = 55;\n\nassert (pdemo.value === 56);\n\npdemo.value = 12;\n\nassert (pdemo.value === 13);\n */\n\nstatic int demo_value = 0;\n\nstatic jerry_value_t\nhandler_get (const jerry_value_t function_obj, /**< function object */\n                   const jerry_value_t this_val, /**< this arg */\n                   const jerry_value_t args_p[], /**< function arguments */\n                   const jerry_length_t args_count) /**< number of function arguments */\n{\n  JERRY_UNUSED (function_obj);\n  JERRY_UNUSED (this_val);\n\n  TEST_ASSERT (args_count == 3);\n  TEST_ASSERT (jerry_value_is_object (args_p[0])); /* target */\n  TEST_ASSERT (jerry_value_is_string (args_p[1])); /* P */\n  TEST_ASSERT (jerry_value_is_object (args_p[2])); /* receiver */\n\n  const char expected[] = \"value\";\n  char buffer[10];\n  jerry_size_t copied = jerry_string_to_char_buffer (args_p[1], (jerry_char_t *) buffer, 10);\n\n  TEST_ASSERT (copied == 5);\n  TEST_ASSERT (strncmp (expected, buffer, 5) == 0);\n\n  demo_value++;\n\n  return jerry_create_number (demo_value);\n} /* handler_get */\n\nstatic jerry_value_t\nhandler_set (const jerry_value_t function_obj, /**< function object */\n                   const jerry_value_t this_val, /**< this arg */\n                   const jerry_value_t args_p[], /**< function arguments */\n                   const jerry_length_t args_count) /**< number of function arguments */\n{\n  JERRY_UNUSED (function_obj);\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_p);\n  JERRY_UNUSED (args_count);\n\n  TEST_ASSERT (args_count == 4);\n  TEST_ASSERT (jerry_value_is_object (args_p[0])); /* target */\n  TEST_ASSERT (jerry_value_is_string (args_p[1])); /* P */\n  TEST_ASSERT (jerry_value_is_number (args_p[2])); /* V */\n  TEST_ASSERT (jerry_value_is_object (args_p[3])); /* receiver */\n\n  const char expected[] = \"value\";\n  char buffer[10];\n  jerry_size_t copied = jerry_string_to_char_buffer (args_p[1], (jerry_char_t *) buffer, 10);\n\n  TEST_ASSERT (copied == 5);\n  TEST_ASSERT (strncmp (expected, buffer, 5) == 0);\n\n  TEST_ASSERT (jerry_value_is_number (args_p[2]));\n  demo_value = (int) jerry_get_number_value (args_p[2]);\n\n  return jerry_create_number (demo_value);\n} /* handler_set */\n\nstatic void\nset_property (jerry_value_t target, /**< target object */\n              const char *name_p, /**< name of the property */\n              jerry_value_t value) /**< value of the property */\n{\n  jerry_value_t name_val = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t result_val = jerry_set_property (target, name_val, value);\n\n  TEST_ASSERT (jerry_value_is_boolean (result_val));\n  TEST_ASSERT (jerry_get_boolean_value (result_val));\n  jerry_release_value (name_val);\n} /* set_property */\n\nstatic jerry_value_t\nget_property (jerry_value_t target, /**< target object */\n              const char *name_p) /**< name of the property */\n{\n  jerry_value_t name_val = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t result_val = jerry_get_property (target, name_val);\n\n  TEST_ASSERT (!jerry_value_is_error (result_val));\n  jerry_release_value (name_val);\n  return result_val;\n} /* get_property */\n\nstatic void\nset_function (jerry_value_t target, /**< target object */\n              const char *name_p, /**< name of the function */\n              jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t function_val = jerry_create_external_function (handler_p);\n  set_property (target, name_p, function_val);\n  jerry_release_value (function_val);\n} /* set_function */\n\nstruct test_data\n{\n  int value;\n};\n\nstatic void\nproxy_native_freecb (void *user_p)\n{\n  TEST_ASSERT (user_p != NULL);\n  struct test_data *native_p = (struct test_data *) user_p;\n  native_p->value = -1;\n} /* proxy_native_freecb */\n\nstatic const jerry_object_native_info_t proxy_native_info =\n{\n  .free_cb = proxy_native_freecb,\n};\n\nstatic jerry_value_t\nproxy_native_handler_get (const jerry_value_t function_obj, /**< function object */\n                          const jerry_value_t this_val, /**< this arg */\n                          const jerry_value_t args_p[], /**< function arguments */\n                          const jerry_length_t args_count) /**< number of function arguments */\n{\n  JERRY_UNUSED (function_obj);\n  JERRY_UNUSED (this_val);\n  TEST_ASSERT (args_count == 3);\n\n  /* 3rd argument (Receiver) should be the Proxy here. */\n  jerry_value_t receiver = args_p[2];\n  TEST_ASSERT (jerry_value_is_proxy (receiver));\n\n  /* Check if proxy has the native ptr. */\n  struct test_data *native_p;\n  bool has_p = jerry_get_object_native_pointer (receiver, (void *) &native_p, &proxy_native_info);\n  TEST_ASSERT (has_p == true);\n\n  native_p->value <<= 1;\n  return jerry_create_number (native_p->value);\n} /* proxy_native_handler_get */\n\n/**\n * Test Proxy with added native object.\n */\nstatic void\ntest_proxy_native (void)\n{\n  jerry_value_t handler = jerry_create_object ();\n  set_function (handler, \"get\", proxy_native_handler_get);\n\n  jerry_value_t target = jerry_create_object ();\n  jerry_value_t proxy = jerry_create_proxy (target, handler);\n\n  struct test_data *data = (struct test_data *) malloc (sizeof (struct test_data));\n  data->value = 2;\n  jerry_set_object_native_pointer (proxy, data, &proxy_native_info);\n\n  /* Call: proxy[10] */\n  jerry_value_t result_for_10 = jerry_get_property_by_index (proxy, 10);\n  TEST_ASSERT (jerry_value_is_number (result_for_10));\n  TEST_ASSERT (jerry_get_number_value (result_for_10) == 4.0);\n\n  /* Call: proxy[5] */\n  data->value = 8;\n  jerry_value_t result_for_5 = jerry_get_property_by_index (proxy, 5);\n  TEST_ASSERT (jerry_value_is_number (result_for_5));\n  TEST_ASSERT (jerry_get_number_value (result_for_5) == 16.0);\n\n  jerry_release_value (handler);\n  jerry_release_value (target);\n  jerry_release_value (proxy);\n} /* test_proxy_native */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_PROXY))\n  {\n    printf (\"Skipping test, Proxy not enabled\\n\");\n    return 0;\n  }\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t handler = jerry_create_object ();\n  {\n    set_function (handler, \"get\", handler_get);\n    set_function (handler, \"set\", handler_set);\n  }\n\n  jerry_value_t target = jerry_create_object ();\n  jerry_value_t proxy = jerry_create_proxy (target, handler);\n  {\n    jerry_value_t global = jerry_get_global_object ();\n    set_property (global, \"pdemo\", proxy);\n    jerry_release_value (global);\n  }\n\n  const jerry_char_t get_value_src[] = TEST_STRING_LITERAL (\"pdemo.value\");\n  jerry_value_t parsed_get_code_val = jerry_parse (NULL,\n                                               0,\n                                               get_value_src,\n                                               sizeof (get_value_src) - 1,\n                                               JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (parsed_get_code_val));\n\n  {\n    jerry_value_t res = jerry_run (parsed_get_code_val);\n    TEST_ASSERT (jerry_value_is_number (res));\n    TEST_ASSERT (jerry_get_number_value (res) == 1.0);\n    jerry_release_value (res);\n  }\n\n  {\n    jerry_value_t res = get_property (proxy, \"value\");\n    TEST_ASSERT (jerry_value_is_number (res));\n    TEST_ASSERT (jerry_get_number_value (res) == 2.0);\n    jerry_release_value (res);\n  }\n\n  {\n    jerry_value_t res = jerry_run (parsed_get_code_val);\n    TEST_ASSERT (jerry_value_is_number (res));\n    TEST_ASSERT (jerry_get_number_value (res) == 3.0);\n    jerry_release_value (res);\n  }\n\n  const jerry_char_t set_value_src[] = TEST_STRING_LITERAL (\"pdemo.value = 55\");\n  jerry_value_t parsed_set_code_val = jerry_parse (NULL,\n                                                   0,\n                                                   set_value_src,\n                                                   sizeof (set_value_src) - 1,\n                                                   JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (parsed_set_code_val));\n\n  {\n    jerry_value_t res = jerry_run (parsed_set_code_val);\n    TEST_ASSERT (jerry_value_is_number (res));\n    TEST_ASSERT (jerry_get_number_value (res) == 55);\n    jerry_release_value (res);\n  }\n\n  {\n    jerry_value_t res = jerry_run (parsed_get_code_val);\n    TEST_ASSERT (jerry_value_is_number (res));\n    TEST_ASSERT (jerry_get_number_value (res) == 56);\n    jerry_release_value (res);\n  }\n\n  {\n    jerry_value_t new_value = jerry_create_number (12);\n    set_property (proxy, \"value\", new_value);\n    jerry_release_value (new_value);\n  }\n\n  {\n    jerry_value_t res = get_property (proxy, \"value\");\n    TEST_ASSERT (jerry_value_is_number (res));\n    TEST_ASSERT (jerry_get_number_value (res) == 13.0);\n    jerry_release_value (res);\n  }\n\n  jerry_release_value (parsed_set_code_val);\n  jerry_release_value (parsed_get_code_val);\n  jerry_release_value (proxy);\n  jerry_release_value (target);\n  jerry_release_value (handler);\n\n  {\n    const jerry_char_t has_value_src[] = TEST_STRING_LITERAL (\"new Proxy({}, {\\n\"\n                                                              \"  has: function(target, key) { throw 33 }\\n\"\n                                                              \"})\");\n    jerry_value_t parsed_has_code_val = jerry_parse (NULL,\n                                                     0,\n                                                     has_value_src,\n                                                     sizeof (has_value_src) - 1,\n                                                     JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parsed_has_code_val));\n\n    jerry_value_t res = jerry_run (parsed_has_code_val);\n    jerry_release_value (parsed_has_code_val);\n    TEST_ASSERT (jerry_value_is_proxy (res));\n\n    jerry_value_t name = jerry_create_string ((const jerry_char_t *) \"key\");\n    TEST_ASSERT (jerry_value_is_string (name));\n    jerry_value_t property = jerry_has_property (res, name);\n    jerry_release_value (name);\n    jerry_release_value (res);\n\n    TEST_ASSERT (jerry_value_is_error (property));\n    property = jerry_get_value_from_error (property, true);\n    TEST_ASSERT (jerry_get_number_value (property) == 33);\n    jerry_release_value (property);\n  }\n\n  target = jerry_create_object ();\n  handler = jerry_create_object ();\n  proxy = jerry_create_proxy (target, handler);\n  jerry_release_value (handler);\n\n  {\n    jerry_value_t res = jerry_get_proxy_target (proxy);\n    TEST_ASSERT (res == target);\n    jerry_release_value (res);\n\n    res = jerry_get_proxy_target (target);\n    TEST_ASSERT (jerry_value_is_error (res));\n    res = jerry_get_value_from_error (res, true);\n    TEST_ASSERT (jerry_get_error_type (res) == JERRY_ERROR_TYPE);\n    jerry_release_value (res);\n  }\n\n  jerry_release_value (proxy);\n  jerry_release_value (target);\n\n  test_proxy_native ();\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-realm.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n\n#include \"test-common.h\"\n\nstatic void\ncreate_number_property (jerry_value_t object_value, /**< object value */\n                        char *name_p, /**< name */\n                        double number) /**< value */\n{\n  jerry_value_t name_value = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t number_value = jerry_create_number (number);\n  jerry_value_t result_value = jerry_set_property (object_value, name_value, number_value);\n  TEST_ASSERT (!jerry_value_is_error (result_value));\n\n  jerry_release_value (result_value);\n  jerry_release_value (number_value);\n  jerry_release_value (name_value);\n} /* create_number_property */\n\nstatic double\nget_number_property (jerry_value_t object_value, /**< object value */\n                     char *name_p) /**< name */\n{\n  jerry_value_t name_value = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t result_value = jerry_get_property (object_value, name_value);\n  TEST_ASSERT (!jerry_value_is_error (result_value));\n  TEST_ASSERT (jerry_value_is_number (result_value));\n\n  double result = jerry_get_number_value (result_value);\n\n  jerry_release_value (result_value);\n  jerry_release_value (name_value);\n  return result;\n} /* get_number_property */\n\nstatic double\neval_and_get_number (char *script_p) /**< script source */\n{\n  jerry_value_t result_value;\n  result_value = jerry_eval ((const jerry_char_t *) script_p, strlen (script_p), JERRY_PARSE_NO_OPTS);\n\n  TEST_ASSERT (jerry_value_is_number (result_value));\n  double result = jerry_get_number_value (result_value);\n  jerry_release_value (result_value);\n  return result;\n} /* eval_and_get_number */\n\nstatic void\ncheck_type_error (jerry_value_t result_value) /**< result value */\n{\n  TEST_ASSERT (jerry_value_is_error (result_value));\n  result_value = jerry_get_value_from_error (result_value, true);\n  TEST_ASSERT (jerry_get_error_type (result_value) == JERRY_ERROR_TYPE);\n  jerry_release_value (result_value);\n} /* check_type_error */\n\nstatic void\ncheck_array_prototype (jerry_value_t realm_value, jerry_value_t result_value)\n{\n  jerry_value_t name_value = jerry_create_string ((const jerry_char_t *) \"Array\");\n  jerry_value_t array_value = jerry_get_property (realm_value, name_value);\n  TEST_ASSERT (jerry_value_is_object (array_value));\n  jerry_release_value (name_value);\n\n  name_value = jerry_create_string ((const jerry_char_t *) \"prototype\");\n  jerry_value_t prototype_value = jerry_get_property (array_value, name_value);\n  TEST_ASSERT (jerry_value_is_object (prototype_value));\n  jerry_release_value (name_value);\n  jerry_release_value (array_value);\n\n  jerry_value_t compare_value = jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, result_value, prototype_value);\n  jerry_release_value (prototype_value);\n\n  TEST_ASSERT (jerry_value_is_boolean (compare_value) && jerry_get_boolean_value (compare_value));\n  jerry_release_value (compare_value);\n} /* check_array_prototype */\n\n/**\n * Unit test's main function.\n */\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_value = jerry_get_global_object ();\n  jerry_value_t result_value = jerry_realm_get_this (global_value);\n  TEST_ASSERT (global_value == result_value);\n  jerry_release_value (global_value);\n\n  jerry_value_t number_value = jerry_create_number (3);\n  check_type_error (jerry_realm_get_this (number_value));\n  jerry_release_value (number_value);\n\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_REALM))\n  {\n    printf (\"Skipping test, Realms not enabled\\n\");\n    return 0;\n  }\n\n  jerry_value_t realm_value = jerry_create_realm ();\n\n  create_number_property (global_value, \"a\", 3.5);\n  create_number_property (global_value, \"b\", 7.25);\n  create_number_property (realm_value, \"a\", -1.25);\n  create_number_property (realm_value, \"b\", -6.75);\n\n  TEST_ASSERT (eval_and_get_number (\"a\") == 3.5);\n\n  result_value = jerry_set_realm (realm_value);\n  TEST_ASSERT (result_value == global_value);\n  TEST_ASSERT (eval_and_get_number (\"a\") == -1.25);\n\n  result_value = jerry_set_realm (global_value);\n  TEST_ASSERT (result_value == realm_value);\n  TEST_ASSERT (eval_and_get_number (\"b\") == 7.25);\n\n  result_value = jerry_set_realm (realm_value);\n  TEST_ASSERT (result_value == global_value);\n  TEST_ASSERT (eval_and_get_number (\"b\") == -6.75);\n\n  result_value = jerry_set_realm (global_value);\n  TEST_ASSERT (result_value == realm_value);\n\n  jerry_value_t object_value = jerry_create_object ();\n  check_type_error (jerry_set_realm (object_value));\n  jerry_release_value (object_value);\n\n  number_value = jerry_create_number (5);\n  check_type_error (jerry_set_realm (number_value));\n  jerry_release_value (number_value);\n\n  jerry_release_value (global_value);\n  jerry_release_value (realm_value);\n\n  realm_value = jerry_create_realm ();\n\n  result_value = jerry_realm_get_this (realm_value);\n  TEST_ASSERT (result_value == realm_value);\n  jerry_release_value (result_value);\n\n  result_value = jerry_set_realm (realm_value);\n  TEST_ASSERT (!jerry_value_is_error (result_value));\n  object_value = jerry_create_object ();\n  jerry_set_realm (result_value);\n\n  number_value = jerry_create_number (7);\n  check_type_error (jerry_realm_set_this (realm_value, number_value));\n  check_type_error (jerry_realm_set_this (number_value, object_value));\n  jerry_release_value (number_value);\n\n  result_value = jerry_realm_set_this (realm_value, object_value);\n  TEST_ASSERT (jerry_value_is_boolean (result_value) && jerry_get_boolean_value (result_value));\n  jerry_release_value (result_value);\n\n  create_number_property (object_value, \"x\", 7.25);\n  create_number_property (object_value, \"y\", 1.25);\n\n  result_value = jerry_set_realm (realm_value);\n  TEST_ASSERT (!jerry_value_is_error (result_value));\n  TEST_ASSERT (eval_and_get_number (\"var z = -5.5; x + this.y\") == 8.5);\n  jerry_set_realm (result_value);\n\n  TEST_ASSERT (get_number_property (object_value, \"z\") == -5.5);\n\n  result_value = jerry_realm_get_this (realm_value);\n  TEST_ASSERT (result_value == object_value);\n  jerry_release_value (result_value);\n\n  jerry_release_value (object_value);\n  jerry_release_value (realm_value);\n\n  if (jerry_is_feature_enabled (JERRY_FEATURE_PROXY))\n  {\n    /* Check property creation. */\n    jerry_value_t handler_value = jerry_create_object ();\n    jerry_value_t target_value = jerry_create_realm ();\n    jerry_value_t proxy_value = jerry_create_proxy (target_value, handler_value);\n\n    jerry_realm_set_this (target_value, proxy_value);\n    jerry_release_value (proxy_value);\n    jerry_release_value (handler_value);\n\n    jerry_value_t old_realm_value = jerry_set_realm (target_value);\n    TEST_ASSERT (!jerry_value_is_error (old_realm_value));\n    TEST_ASSERT (eval_and_get_number (\"var z = 1.5; z\") == 1.5);\n    jerry_set_realm (old_realm_value);\n\n    TEST_ASSERT (get_number_property (target_value, \"z\") == 1.5);\n    jerry_release_value (target_value);\n\n    /* Check isExtensible error. */\n\n    const char *script_p = \"new Proxy({}, { isExtensible: function() { throw 42.5 } })\";\n    proxy_value = jerry_eval ((const jerry_char_t *) script_p, strlen (script_p), JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (proxy_value) && jerry_value_is_object (proxy_value));\n\n    target_value = jerry_create_realm ();\n    jerry_realm_set_this (target_value, proxy_value);\n    jerry_release_value (proxy_value);\n\n    old_realm_value = jerry_set_realm (target_value);\n    TEST_ASSERT (!jerry_value_is_error (old_realm_value));\n    script_p = \"var z = 1.5\";\n    result_value = jerry_eval ((const jerry_char_t *) script_p, strlen (script_p), JERRY_PARSE_NO_OPTS);\n    jerry_set_realm (old_realm_value);\n    jerry_release_value (target_value);\n\n    TEST_ASSERT (jerry_value_is_error (result_value));\n    result_value = jerry_get_value_from_error (result_value, true);\n    TEST_ASSERT (jerry_value_is_number (result_value) && jerry_get_number_value (result_value) == 42.5);\n    jerry_release_value (result_value);\n  }\n\n  realm_value = jerry_create_realm ();\n\n  result_value = jerry_set_realm (realm_value);\n  TEST_ASSERT (!jerry_value_is_error (result_value));\n\n  const char *script_p = \"global2 = global1 - 1; Object.getPrototypeOf([])\";\n  jerry_value_t script_value = jerry_parse (NULL,\n                                            0,\n                                            (const jerry_char_t *) script_p,\n                                            strlen (script_p),\n                                            JERRY_PARSE_NO_OPTS);\n\n  TEST_ASSERT (!jerry_value_is_error (script_value));\n  jerry_set_realm (result_value);\n\n  /* Script is compiled in another realm. */\n  create_number_property (realm_value, \"global1\", 7.5);\n  result_value = jerry_run (script_value);\n  TEST_ASSERT (!jerry_value_is_error (result_value));\n\n  check_array_prototype (realm_value, result_value);\n\n  jerry_release_value (result_value);\n  jerry_release_value (script_value);\n\n  TEST_ASSERT (get_number_property (realm_value, \"global2\") == 6.5);\n\n  jerry_release_value (realm_value);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-regexp-dotall-unicode.c",
    "content": " /* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  TEST_INIT ();\n  jerry_init (JERRY_INIT_EMPTY);\n\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_SYMBOL))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"ES.next support is disabled\\n\");\n    jerry_cleanup ();\n    return 0;\n  }\n\n  jerry_value_t undefined_this_arg = jerry_create_undefined ();\n  jerry_char_t pattern2[] = \"\\\\u{61}.\\\\u{62}\";\n  uint16_t flags = JERRY_REGEXP_FLAG_DOTALL | JERRY_REGEXP_FLAG_UNICODE | JERRY_REGEXP_FLAG_STICKY;\n  jerry_value_t regex_obj = jerry_create_regexp (pattern2, flags);\n  TEST_ASSERT (jerry_value_is_object (regex_obj));\n\n  const jerry_char_t func_resource[] = \"unknown\";\n  const jerry_char_t func_arg_list[] = \"regex\";\n  const jerry_char_t func_src2[] = \"return [regex.exec('a\\\\nb'), regex.dotAll, regex.sticky, regex.unicode ];\";\n  jerry_value_t func_val = jerry_parse_function (func_resource,\n                                                 sizeof (func_resource) - 1,\n                                                 func_arg_list,\n                                                 sizeof (func_arg_list) - 1,\n                                                 func_src2,\n                                                 sizeof (func_src2) - 1,\n                                                 JERRY_PARSE_NO_OPTS);\n\n  jerry_value_t res = jerry_call_function (func_val, undefined_this_arg, &regex_obj, 1);\n  jerry_value_t regex_res = jerry_get_property_by_index (res, 0);\n  jerry_value_t regex_res_str = jerry_get_property_by_index (regex_res, 0);\n  jerry_value_t is_dotall = jerry_get_property_by_index (res, 1);\n  jerry_value_t is_sticky = jerry_get_property_by_index (res, 2);\n  jerry_value_t is_unicode = jerry_get_property_by_index (res, 3);\n\n  jerry_size_t str_size = jerry_get_string_size (regex_res_str);\n  JERRY_VLA (jerry_char_t, res_buff, str_size);\n  jerry_size_t res_size = jerry_string_to_char_buffer (regex_res_str, res_buff, str_size);\n\n  const char expected_result[] = \"a\\nb\";\n  TEST_ASSERT (res_size == (sizeof (expected_result) - 1));\n  TEST_ASSERT (strncmp (expected_result, (const char *) res_buff, res_size) == 0);\n  TEST_ASSERT (jerry_get_boolean_value (is_dotall));\n  TEST_ASSERT (jerry_get_boolean_value (is_sticky));\n  TEST_ASSERT (jerry_get_boolean_value (is_unicode));\n\n  jerry_release_value (regex_obj);\n  jerry_release_value (res);\n  jerry_release_value (func_val);\n  jerry_release_value (regex_res);\n  jerry_release_value (regex_res_str);\n  jerry_release_value (is_dotall);\n  jerry_release_value (is_sticky);\n  jerry_release_value (is_unicode);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-regexp.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  TEST_INIT ();\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  jerry_char_t pattern[] = \"[^.]+\";\n  uint16_t flags = JERRY_REGEXP_FLAG_GLOBAL | JERRY_REGEXP_FLAG_MULTILINE;\n  jerry_value_t regex_obj = jerry_create_regexp (pattern, flags);\n  TEST_ASSERT (jerry_value_is_object (regex_obj));\n\n  const jerry_char_t func_resource[] = \"unknown\";\n  const jerry_char_t func_arg_list[] = \"regex\";\n  const jerry_char_t func_src[] = \"return [regex.exec('something.domain.com'), regex.multiline, regex.global];\";\n  jerry_value_t func_val = jerry_parse_function (func_resource,\n                                                 sizeof (func_resource) - 1,\n                                                 func_arg_list,\n                                                 sizeof (func_arg_list) - 1,\n                                                 func_src,\n                                                 sizeof (func_src) - 1,\n                                                 JERRY_PARSE_NO_OPTS);\n\n  jerry_value_t res = jerry_call_function (func_val, global_obj_val, &regex_obj, 1);\n  jerry_value_t regex_res = jerry_get_property_by_index (res, 0);\n  jerry_value_t regex_res_str = jerry_get_property_by_index (regex_res, 0);\n  jerry_value_t is_multiline = jerry_get_property_by_index (res, 1);\n  jerry_value_t is_global = jerry_get_property_by_index (res, 2);\n\n  jerry_size_t str_size = jerry_get_string_size (regex_res_str);\n  JERRY_VLA (jerry_char_t, res_buff, str_size);\n  jerry_size_t res_size = jerry_string_to_char_buffer (regex_res_str, res_buff, str_size);\n\n  const char expected_result[] = \"something\";\n  TEST_ASSERT (res_size == (sizeof (expected_result) - 1));\n  TEST_ASSERT (strncmp (expected_result, (const char *) res_buff, res_size) == 0);\n  TEST_ASSERT (jerry_get_boolean_value (is_multiline));\n  TEST_ASSERT (jerry_get_boolean_value (is_global));\n\n  jerry_release_value (regex_obj);\n  jerry_release_value (res);\n  jerry_release_value (func_val);\n  jerry_release_value (regex_res);\n  jerry_release_value (regex_res_str);\n  jerry_release_value (is_multiline);\n  jerry_release_value (is_global);\n  jerry_release_value (global_obj_val);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-regression-3588.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\n/**\n * Empty constructor\n */\nstatic jerry_value_t\nconstruct_handler (const jerry_value_t func_obj_val, /**< function object */\n                   const jerry_value_t this_val, /**< this arg */\n                   const jerry_value_t args_p[], /**< function arguments */\n                   const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  TEST_ASSERT (args_cnt == 1);\n  TEST_ASSERT (jerry_get_number_value (args_p[0]) == 1.0);\n\n  return jerry_create_undefined ();\n} /* construct_handler */\n\nint\nmain (void)\n{\n  /* Test JERRY_FEATURE_SYMBOL feature as it is a must-have in ES.next */\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_SYMBOL))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Skipping test, ES.next support is disabled.\\n\");\n    return 0;\n  }\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  {\n    jerry_value_t global_obj_val = jerry_get_global_object ();\n\n    jerry_value_t function_val = jerry_create_external_function (construct_handler);\n    jerry_value_t function_name_val = jerry_create_string ((const jerry_char_t *) \"Demo\");\n    jerry_value_t result_val = jerry_set_property (global_obj_val, function_name_val, function_val);\n    TEST_ASSERT (!jerry_value_is_error (result_val));\n    TEST_ASSERT (jerry_get_boolean_value (result_val) == true);\n    jerry_release_value (result_val);\n    jerry_release_value (function_name_val);\n    jerry_release_value (global_obj_val);\n    jerry_release_value (function_val);\n  }\n\n  {\n    static const jerry_char_t test_source[] = TEST_STRING_LITERAL (\n        \"class Sub1 extends Demo { constructor () { super (1); } };\"\n        \"new Sub1 ()\"\n    );\n\n    jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                                 0,\n                                                 test_source,\n                                                 sizeof (test_source) - 1,\n                                                 JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n    jerry_value_t result = jerry_run (parsed_code_val);\n    TEST_ASSERT (!jerry_value_is_error (result));\n\n    jerry_release_value (result);\n    jerry_release_value (parsed_code_val);\n  }\n\n  {\n    static const jerry_char_t test_source[] = TEST_STRING_LITERAL (\n      \"class Sub2 extends Demo { };\"\n      \"new Sub2 (1)\"\n    );\n\n    jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                                 0,\n                                                 test_source,\n                                                 sizeof (test_source) - 1,\n                                                 JERRY_PARSE_NO_OPTS);\n    TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n    jerry_value_t result = jerry_run (parsed_code_val);\n    TEST_ASSERT (!jerry_value_is_error (result));\n\n    jerry_release_value (result);\n    jerry_release_value (parsed_code_val);\n  }\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-resource-name.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nstatic jerry_value_t\nresource_name_handler (const jerry_value_t function_obj, /**< function object */\n                       const jerry_value_t this_val, /**< this value */\n                       const jerry_value_t args_p[], /**< argument list */\n                       const jerry_length_t args_count) /**< argument count */\n{\n  (void) function_obj;\n  (void) this_val;\n\n  jerry_value_t undefined_value = jerry_create_undefined ();\n  jerry_value_t resource_name = jerry_get_resource_name (args_count > 0 ? args_p[0] : undefined_value);\n  jerry_release_value (undefined_value);\n\n  return resource_name;\n} /* resource_name_handler */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_LINE_INFO))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Line info support is disabled!\\n\");\n    return 0;\n  }\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t global = jerry_get_global_object ();\n\n  /* Register the \"resourceName\" method. */\n  {\n    jerry_value_t func = jerry_create_external_function (resource_name_handler);\n    jerry_value_t name = jerry_create_string ((const jerry_char_t *) \"resourceName\");\n    jerry_value_t result = jerry_set_property (global, name, func);\n    jerry_release_value (result);\n    jerry_release_value (name);\n    jerry_release_value (func);\n  }\n\n  jerry_release_value (global);\n\n  const char *source_1 = (\"function f1 () {\\n\"\n                          \"  if (resourceName() !== 'demo1.js') return false; \\n\"\n                          \"  if (resourceName(f1) !== 'demo1.js') return false; \\n\"\n                          \"  if (resourceName(5) !== '<anonymous>') return false; \\n\"\n                          \"  return f1; \\n\"\n                          \"} \\n\"\n                          \"f1();\");\n  const char *resource_1 = \"demo1.js\";\n\n  jerry_value_t program = jerry_parse ((const jerry_char_t *) resource_1,\n                                       strlen (resource_1),\n                                       (const jerry_char_t *) source_1,\n                                       strlen (source_1),\n                                       JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (program));\n\n  jerry_value_t run_result = jerry_run (program);\n  TEST_ASSERT (!jerry_value_is_error (run_result));\n  TEST_ASSERT (jerry_value_is_object (run_result));\n\n  jerry_value_t resource_value = jerry_get_resource_name (run_result);\n  jerry_value_t resource1_name_value = jerry_create_string ((const jerry_char_t *) resource_1);\n  TEST_ASSERT (jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, resource_value, resource1_name_value));\n  jerry_release_value (resource1_name_value);\n  jerry_release_value (resource_value);\n\n  jerry_release_value (run_result);\n  jerry_release_value (program);\n\n  const char *source_2 = (\"function f2 () { \\n\"\n                          \"  if (resourceName() !== 'demo2.js') return false; \\n\"\n                          \"  if (resourceName(f2) !== 'demo2.js') return false; \\n\"\n                          \"  if (resourceName(f1) !== 'demo1.js') return false; \\n\"\n                          \"  if (resourceName(Object.prototype) !== '<anonymous>') return false; \\n\"\n                          \"  if (resourceName(Function) !== '<anonymous>') return false; \\n\"\n                          \"  return f2; \\n\"\n                          \"} \\n\"\n                          \"f2(); \\n\");\n  const char *resource_2 = \"demo2.js\";\n\n  program = jerry_parse ((const jerry_char_t *) resource_2,\n                         strlen (resource_2),\n                         (const jerry_char_t *) source_2,\n                         strlen (source_2),\n                         JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (program));\n\n  run_result = jerry_run (program);\n  TEST_ASSERT (!jerry_value_is_error (run_result));\n  TEST_ASSERT (jerry_value_is_object (run_result));\n\n  resource_value = jerry_get_resource_name (run_result);\n  jerry_value_t resource2_name_value = jerry_create_string ((const jerry_char_t *) resource_2);\n  TEST_ASSERT (jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL, resource_value, resource2_name_value));\n  jerry_release_value (resource2_name_value);\n  jerry_release_value (resource_value);\n\n  jerry_release_value (run_result);\n  jerry_release_value (program);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-snapshot.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\n/**\n * Maximum size of snapshots buffer\n */\n#define SNAPSHOT_BUFFER_SIZE (256)\n\n/**\n * Maximum size of literal buffer\n */\n#define LITERAL_BUFFER_SIZE (256)\n\n/**\n * Magic strings\n */\nstatic const jerry_char_t *magic_strings[] =\n{\n  (const jerry_char_t *) \" \",\n  (const jerry_char_t *) \"a\",\n  (const jerry_char_t *) \"b\",\n  (const jerry_char_t *) \"c\",\n  (const jerry_char_t *) \"from\",\n  (const jerry_char_t *) \"func\",\n  (const jerry_char_t *) \"string\",\n  (const jerry_char_t *) \"snapshot\"\n};\n\n/**\n * Magic string lengths\n */\nstatic const jerry_length_t magic_string_lengths[] =\n{\n  1, 1, 1, 1, 4, 4, 6, 8\n};\n\nstatic void test_function_snapshot (void)\n{\n  /* function to snapshot */\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_SAVE)\n      || !jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_EXEC))\n  {\n    return;\n  }\n\n  const jerry_init_flag_t flags = JERRY_INIT_EMPTY;\n  static uint32_t function_snapshot_buffer[SNAPSHOT_BUFFER_SIZE];\n\n  const jerry_char_t func_args[] = \"a, b\";\n  const jerry_char_t code_to_snapshot[] = \"return a + b\";\n\n  jerry_init (flags);\n  jerry_value_t generate_result;\n  generate_result = jerry_generate_function_snapshot (NULL,\n                                                      0,\n                                                      code_to_snapshot,\n                                                      sizeof (code_to_snapshot) - 1,\n                                                      func_args,\n                                                      sizeof (func_args) - 1,\n                                                      0,\n                                                      function_snapshot_buffer,\n                                                      SNAPSHOT_BUFFER_SIZE);\n  TEST_ASSERT (!jerry_value_is_error (generate_result)\n               && jerry_value_is_number (generate_result));\n\n  size_t function_snapshot_size = (size_t) jerry_get_number_value (generate_result);\n  jerry_release_value (generate_result);\n\n  jerry_cleanup ();\n\n  jerry_init (flags);\n\n  jerry_value_t function_obj = jerry_load_function_snapshot (function_snapshot_buffer,\n                                                             function_snapshot_size,\n                                                             0,\n                                                             0);\n\n  TEST_ASSERT (!jerry_value_is_error (function_obj));\n  TEST_ASSERT (jerry_value_is_function (function_obj));\n\n  jerry_value_t this_val = jerry_create_undefined ();\n  jerry_value_t args[2];\n  args[0] = jerry_create_number (1.0);\n  args[1] = jerry_create_number (2.0);\n\n  jerry_value_t res = jerry_call_function (function_obj, this_val, args, 2);\n\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_number (res));\n  double num = jerry_get_number_value (res);\n  TEST_ASSERT (num == 3);\n\n  jerry_release_value (args[0]);\n  jerry_release_value (args[1]);\n  jerry_release_value (res);\n  jerry_release_value (function_obj);\n\n  jerry_cleanup ();\n} /* test_function_snapshot */\n\nstatic void arguments_test_exec_snapshot (uint32_t *snapshot_p, size_t snapshot_size, uint32_t exec_snapshot_flags)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n  jerry_value_t res = jerry_exec_snapshot (snapshot_p, snapshot_size, 0, exec_snapshot_flags);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_number (res));\n  double raw_value = jerry_get_number_value (res);\n  TEST_ASSERT (raw_value == 15);\n  jerry_release_value (res);\n\n  jerry_cleanup ();\n} /* arguments_test_exec_snapshot */\n\nstatic void test_function_arguments_snapshot (void)\n{\n  if (jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_SAVE)\n      && jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_EXEC))\n  {\n    static uint32_t arguments_snapshot_buffer[SNAPSHOT_BUFFER_SIZE];\n\n    const jerry_char_t code_to_snapshot[] = TEST_STRING_LITERAL (\n      \"function f(a,b,c) {\"\n      \"  arguments[0]++;\"\n      \"  arguments[1]++;\"\n      \"  arguments[2]++;\"\n      \"  return a + b + c;\"\n      \"}\"\n      \"f(3,4,5);\"\n    );\n    jerry_init (JERRY_INIT_EMPTY);\n\n    jerry_value_t generate_result;\n    generate_result = jerry_generate_snapshot (NULL,\n                                               0,\n                                               code_to_snapshot,\n                                               sizeof (code_to_snapshot) - 1,\n                                               0,\n                                               arguments_snapshot_buffer,\n                                               SNAPSHOT_BUFFER_SIZE);\n\n    TEST_ASSERT (!jerry_value_is_error (generate_result)\n                 && jerry_value_is_number (generate_result));\n\n    size_t snapshot_size = (size_t) jerry_get_number_value (generate_result);\n    jerry_release_value (generate_result);\n\n    jerry_cleanup ();\n\n    arguments_test_exec_snapshot (arguments_snapshot_buffer, snapshot_size, 0);\n    arguments_test_exec_snapshot (arguments_snapshot_buffer, snapshot_size, JERRY_SNAPSHOT_EXEC_COPY_DATA);\n  }\n} /* test_function_arguments_snapshot */\n\nstatic void test_exec_snapshot (uint32_t *snapshot_p, size_t snapshot_size, uint32_t exec_snapshot_flags)\n{\n  char string_data[32];\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_register_magic_strings (magic_strings,\n                                sizeof (magic_string_lengths) / sizeof (jerry_length_t),\n                                magic_string_lengths);\n\n  jerry_value_t res = jerry_exec_snapshot (snapshot_p, snapshot_size, 0, exec_snapshot_flags);\n\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_string (res));\n  jerry_size_t sz = jerry_get_string_size (res);\n  TEST_ASSERT (sz == 20);\n  sz = jerry_string_to_char_buffer (res, (jerry_char_t *) string_data, sz);\n  TEST_ASSERT (sz == 20);\n  jerry_release_value (res);\n  TEST_ASSERT (!strncmp (string_data, \"string from snapshot\", (size_t) sz));\n\n  jerry_cleanup ();\n} /* test_exec_snapshot */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  /* Static snapshot */\n  if (jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_SAVE)\n      && jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_EXEC))\n  {\n    static uint32_t snapshot_buffer[SNAPSHOT_BUFFER_SIZE];\n    const jerry_char_t code_to_snapshot[] = TEST_STRING_LITERAL (\n      \"function func(a, b, c) {\"\n      \"  c = 'snapshot';\"\n      \"  return arguments[0] + ' ' + b + ' ' + arguments[2];\"\n      \"};\"\n      \"func('string', 'from');\"\n    );\n\n    jerry_init (JERRY_INIT_EMPTY);\n    jerry_register_magic_strings (magic_strings,\n                                  sizeof (magic_string_lengths) / sizeof (jerry_length_t),\n                                  magic_string_lengths);\n\n    jerry_value_t generate_result;\n    generate_result = jerry_generate_snapshot (NULL,\n                                               0,\n                                               code_to_snapshot,\n                                               sizeof (code_to_snapshot) - 1,\n                                               JERRY_SNAPSHOT_SAVE_STATIC,\n                                               snapshot_buffer,\n                                               SNAPSHOT_BUFFER_SIZE);\n    TEST_ASSERT (!jerry_value_is_error (generate_result)\n                 && jerry_value_is_number (generate_result));\n\n    size_t snapshot_size = (size_t) jerry_get_number_value (generate_result);\n    jerry_release_value (generate_result);\n\n    /* Static snapshots are not supported by default. */\n    jerry_value_t exec_result = jerry_exec_snapshot (snapshot_buffer, snapshot_size, 0, 0);\n    TEST_ASSERT (jerry_value_is_error (exec_result));\n    jerry_release_value (exec_result);\n\n    jerry_cleanup ();\n\n    test_exec_snapshot (snapshot_buffer, snapshot_size, JERRY_SNAPSHOT_EXEC_ALLOW_STATIC);\n  }\n\n  /* Merge snapshot */\n  if (jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_SAVE)\n      && jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_EXEC))\n  {\n    static uint32_t snapshot_buffer_0[SNAPSHOT_BUFFER_SIZE];\n    static uint32_t snapshot_buffer_1[SNAPSHOT_BUFFER_SIZE];\n    size_t snapshot_sizes[2];\n    static uint32_t merged_snapshot_buffer[SNAPSHOT_BUFFER_SIZE];\n\n    const jerry_char_t code_to_snapshot1[] = \"var a = 'hello'; 123\";\n\n    jerry_init (JERRY_INIT_EMPTY);\n    jerry_value_t generate_result;\n    generate_result = jerry_generate_snapshot (NULL,\n                                               0,\n                                               code_to_snapshot1,\n                                               sizeof (code_to_snapshot1) - 1,\n                                               0,\n                                               snapshot_buffer_0,\n                                               SNAPSHOT_BUFFER_SIZE);\n    TEST_ASSERT (!jerry_value_is_error (generate_result)\n                 && jerry_value_is_number (generate_result));\n\n    snapshot_sizes[0] = (size_t) jerry_get_number_value (generate_result);\n    jerry_release_value (generate_result);\n\n    jerry_cleanup ();\n\n    const jerry_char_t code_to_snapshot2[] = \"var b = 'hello'; 456\";\n\n    jerry_init (JERRY_INIT_EMPTY);\n    generate_result = jerry_generate_snapshot (NULL,\n                                               0,\n                                               code_to_snapshot2,\n                                               sizeof (code_to_snapshot2) - 1,\n                                               0,\n                                               snapshot_buffer_1,\n                                               SNAPSHOT_BUFFER_SIZE);\n    TEST_ASSERT (!jerry_value_is_error (generate_result)\n                 && jerry_value_is_number (generate_result));\n\n    snapshot_sizes[1] = (size_t) jerry_get_number_value (generate_result);\n    jerry_release_value (generate_result);\n\n    jerry_cleanup ();\n\n    jerry_init (JERRY_INIT_EMPTY);\n\n    const char *error_p;\n    const uint32_t *snapshot_buffers[2];\n\n    snapshot_buffers[0] = snapshot_buffer_0;\n    snapshot_buffers[1] = snapshot_buffer_1;\n\n    static uint32_t snapshot_buffer_0_bck[SNAPSHOT_BUFFER_SIZE];\n    static uint32_t snapshot_buffer_1_bck[SNAPSHOT_BUFFER_SIZE];\n\n    memcpy (snapshot_buffer_0_bck, snapshot_buffer_0, SNAPSHOT_BUFFER_SIZE);\n    memcpy (snapshot_buffer_1_bck, snapshot_buffer_1, SNAPSHOT_BUFFER_SIZE);\n\n    size_t merged_size = jerry_merge_snapshots (snapshot_buffers,\n                                                snapshot_sizes,\n                                                2,\n                                                merged_snapshot_buffer,\n                                                SNAPSHOT_BUFFER_SIZE,\n                                                &error_p);\n\n    jerry_cleanup ();\n\n    TEST_ASSERT (0 == memcmp (snapshot_buffer_0_bck, snapshot_buffer_0, SNAPSHOT_BUFFER_SIZE));\n    TEST_ASSERT (0 == memcmp (snapshot_buffer_1_bck, snapshot_buffer_1, SNAPSHOT_BUFFER_SIZE));\n\n    jerry_init (JERRY_INIT_EMPTY);\n\n    jerry_value_t res = jerry_exec_snapshot (merged_snapshot_buffer, merged_size, 0, 0);\n    TEST_ASSERT (!jerry_value_is_error (res));\n    TEST_ASSERT (jerry_get_number_value (res) == 123);\n    jerry_release_value (res);\n\n    res = jerry_exec_snapshot (merged_snapshot_buffer, merged_size, 1, 0);\n    TEST_ASSERT (!jerry_value_is_error (res));\n    TEST_ASSERT (jerry_get_number_value (res) == 456);\n    jerry_release_value (res);\n\n    jerry_cleanup ();\n  }\n\n  /* Save literals */\n  if (jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_SAVE))\n  {\n    /* C format generation */\n    jerry_init (JERRY_INIT_EMPTY);\n\n    static jerry_char_t literal_buffer_c[LITERAL_BUFFER_SIZE];\n    static uint32_t literal_snapshot_buffer[SNAPSHOT_BUFFER_SIZE];\n    static const jerry_char_t code_for_c_format[] = \"var object = { aa:'fo\\\" o\\\\n \\\\\\\\', Bb:'max', aaa:'xzy0' };\";\n\n    jerry_value_t generate_result;\n    generate_result = jerry_generate_snapshot (NULL,\n                                               0,\n                                               code_for_c_format,\n                                               sizeof (code_for_c_format) - 1,\n                                               0,\n                                               literal_snapshot_buffer,\n                                               SNAPSHOT_BUFFER_SIZE);\n\n    TEST_ASSERT (!jerry_value_is_error (generate_result));\n    TEST_ASSERT (jerry_value_is_number (generate_result));\n\n    size_t snapshot_size = (size_t) jerry_get_number_value (generate_result);\n    jerry_release_value (generate_result);\n\n    const size_t lit_c_buf_sz = jerry_get_literals_from_snapshot (literal_snapshot_buffer,\n                                                                  snapshot_size,\n                                                                  literal_buffer_c,\n                                                                  LITERAL_BUFFER_SIZE,\n                                                                  true);\n    TEST_ASSERT (lit_c_buf_sz == 239);\n\n    static const char *expected_c_format = (\n                                            \"jerry_length_t literal_count = 5;\\n\\n\"\n                                            \"jerry_char_t *literals[5] =\\n\"\n                                            \"{\\n\"\n                                            \"  \\\"Bb\\\",\\n\"\n                                            \"  \\\"aa\\\",\\n\"\n                                            \"  \\\"aaa\\\",\\n\"\n                                            \"  \\\"xzy0\\\",\\n\"\n                                            \"  \\\"fo\\\\\\\" o\\\\x0A \\\\\\\\\\\"\\n\"\n                                            \"};\\n\\n\"\n                                            \"jerry_length_t literal_sizes[5] =\\n\"\n                                            \"{\\n\"\n                                            \"  2 /* Bb */,\\n\"\n                                            \"  2 /* aa */,\\n\"\n                                            \"  3 /* aaa */,\\n\"\n                                            \"  4 /* xzy0 */,\\n\"\n                                            \"  8 /* fo\\\" o\\n \\\\ */\\n\"\n                                            \"};\\n\"\n                                            );\n\n    TEST_ASSERT (!strncmp ((char *) literal_buffer_c, expected_c_format, lit_c_buf_sz));\n\n    /* List format generation */\n    static jerry_char_t literal_buffer_list[LITERAL_BUFFER_SIZE];\n    const size_t lit_list_buf_sz = jerry_get_literals_from_snapshot (literal_snapshot_buffer,\n                                                                     snapshot_size,\n                                                                     literal_buffer_list,\n                                                                     LITERAL_BUFFER_SIZE,\n                                                                     false);\n    TEST_ASSERT (lit_list_buf_sz == 34);\n    TEST_ASSERT (!strncmp ((char *) literal_buffer_list,\n                           \"2 Bb\\n2 aa\\n3 aaa\\n4 xzy0\\n8 fo\\\" o\\n \\\\\\n\",\n                           lit_list_buf_sz));\n\n    jerry_cleanup ();\n  }\n\n  test_function_snapshot ();\n\n  test_function_arguments_snapshot ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-string-to-number.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"jerryscript.h\"\n\n#include \"test-common.h\"\n\n/**\n * Unit test's main function.\n */\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  const jerry_char_t *strings[] =\n  {\n    (const jerry_char_t *) \"1\",\n    (const jerry_char_t *) \"0.5\",\n    (const jerry_char_t *) \"12345\",\n    (const jerry_char_t *) \"1e-45\",\n    (const jerry_char_t *) \"-2.5e+38\",\n    (const jerry_char_t *) \"-2.5e38\",\n    (const jerry_char_t *) \"- 2.5e+38\",\n    (const jerry_char_t *) \"-2 .5e+38\",\n    (const jerry_char_t *) \"-2. 5e+38\",\n    (const jerry_char_t *) \"-2.5e+ 38\",\n    (const jerry_char_t *) \"-2.5 e+38\",\n    (const jerry_char_t *) \"-2.5e +38\",\n    (const jerry_char_t *) \"NaN\",\n    (const jerry_char_t *) \"abc\",\n    (const jerry_char_t *) \"   Infinity  \",\n    (const jerry_char_t *) \"-Infinity\",\n    (const jerry_char_t *) \"0\",\n    (const jerry_char_t *) \"0\",\n  };\n\n  const ecma_number_t nums[] =\n  {\n    (ecma_number_t) 1.0,\n    (ecma_number_t) 0.5,\n    (ecma_number_t) 12345.0,\n    (ecma_number_t) 1.0e-45,\n    (ecma_number_t) -2.5e+38,\n    (ecma_number_t) -2.5e+38,\n    (ecma_number_t) NAN,\n    (ecma_number_t) NAN,\n    (ecma_number_t) NAN,\n    (ecma_number_t) NAN,\n    (ecma_number_t) NAN,\n    (ecma_number_t) NAN,\n    (ecma_number_t) NAN,\n    (ecma_number_t) NAN,\n    (ecma_number_t) INFINITY,\n    (ecma_number_t) -INFINITY,\n    (ecma_number_t) +0.0,\n    (ecma_number_t) -0.0\n  };\n\n  for (uint32_t i = 0;\n       i < sizeof (nums) / sizeof (nums[0]);\n       i++)\n  {\n    ecma_number_t num = ecma_utf8_string_to_number (strings[i], lit_zt_utf8_string_size (strings[i]), 0);\n\n    if (num != nums[i]\n        && (!ecma_number_is_nan (num)\n            || !ecma_number_is_nan (nums[i])))\n    {\n      return 1;\n    }\n  }\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-stringbuilder.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-helpers.h\"\n#include \"ecma-init-finalize.h\"\n#include \"lit-char-helpers.h\"\n#include \"lit-strings.h\"\n\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jmem_init ();\n  ecma_init ();\n\n  {\n    static const lit_utf8_byte_t string_data[] = \"A simple string\";\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_stringbuilder_append_raw (&builder, string_data, sizeof (string_data) - 1);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (string_data, sizeof (string_data) - 1);\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  {\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_stringbuilder_append_magic (&builder, LIT_MAGIC_STRING_STRING);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    ecma_string_t *str_p = ecma_get_magic_string (LIT_MAGIC_STRING_STRING);\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n  }\n\n  {\n    static const lit_utf8_byte_t string_data[] = \"a\";\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_LOWERCASE_A);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (string_data, sizeof (string_data) - 1);\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  {\n    static const lit_utf8_byte_t string_data[] = \"A simple string\";\n    ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (string_data, sizeof (string_data) - 1);\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_stringbuilder_append (&builder, str_p);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  {\n    ecma_string_t *str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n  }\n\n  {\n    static const lit_utf8_byte_t string_data[] = \"abc\";\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_LOWERCASE_A);\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_LOWERCASE_B);\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_LOWERCASE_C);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (string_data, sizeof (string_data) - 1);\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  {\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_1);\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_2);\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_3);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    ecma_string_t *str_p = ecma_new_ecma_string_from_uint32 (123);\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  {\n    static const lit_utf8_byte_t string_data[] = \"abc\";\n    ecma_string_t *uint_str_p = ecma_new_ecma_string_from_uint32 (234);\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_1);\n    ecma_stringbuilder_append_raw (&builder, string_data, sizeof (string_data) - 1);\n    ecma_stringbuilder_append (&builder, uint_str_p);\n    ecma_stringbuilder_append_magic (&builder, LIT_MAGIC_STRING_STRING);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    static const lit_utf8_byte_t expected_data[] = \"1abc234string\";\n    ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (expected_data, sizeof (expected_data) - 1);\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  {\n    static const lit_utf8_byte_t string_data[] = \"abc\";\n    ecma_string_t *uint_str_p = ecma_new_ecma_string_from_uint32 (234);\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_1);\n    ecma_stringbuilder_append_raw (&builder, string_data, sizeof (string_data) - 1);\n    ecma_stringbuilder_append (&builder, uint_str_p);\n    ecma_stringbuilder_append_magic (&builder, LIT_MAGIC_STRING_STRING);\n    /* Test that we do not leak. */\n    ecma_stringbuilder_destroy (&builder);\n  }\n\n  {\n    static const lit_utf8_byte_t string_data[] = \"abcdefghijklmnop\";\n    const size_t count = UINT16_MAX / (sizeof (string_data) - 1) + 1;\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    for (size_t i = 0; i < count; i++)\n    {\n      ecma_stringbuilder_append_raw (&builder, string_data, sizeof (string_data) - 1);\n    }\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    ecma_string_t *expected_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n    for (size_t i = 0; i < count; i++)\n    {\n      expected_p = ecma_append_chars_to_string (expected_p,\n                                                string_data,\n                                                sizeof (string_data) - 1,\n                                                sizeof (string_data) - 1);\n    }\n\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, expected_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (expected_p);\n  }\n\n  {\n    static const lit_utf8_byte_t string_data[] = \"abc\";\n    ecma_string_t *uint_str_p = ecma_new_ecma_string_from_uint32 (234);\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_stringbuilder_append_char (&builder, LIT_CHAR_1);\n    ecma_stringbuilder_append_raw (&builder, string_data, sizeof (string_data) - 1);\n\n    ecma_string_t *another_string = ecma_new_ecma_string_from_utf8 (string_data, sizeof (string_data) - 1);\n\n    ecma_stringbuilder_append (&builder, uint_str_p);\n    ecma_stringbuilder_append_magic (&builder, LIT_MAGIC_STRING_STRING);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    static const lit_utf8_byte_t expected_data[] = \"1abc234string\";\n    ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (expected_data, sizeof (expected_data) - 1);\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n    ecma_deref_ecma_string (another_string);\n  }\n\n  {\n    static const lit_utf8_byte_t string_data[] = \"abc\";\n    ecma_string_t *uint_str_p = ecma_new_ecma_string_from_uint32 (234);\n\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (uint_str_p);\n    ecma_stringbuilder_append_raw (&builder, string_data, sizeof (string_data) - 1);\n    ecma_stringbuilder_append_magic (&builder, LIT_MAGIC_STRING_STRING);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    static const lit_utf8_byte_t expected_data[] = \"234abcstring\";\n    ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (expected_data, sizeof (expected_data) - 1);\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  {\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create ();\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    ecma_string_t *str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  {\n    ecma_string_t *str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (str_p);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  {\n    ecma_string_t *str_p = ecma_get_magic_string (LIT_MAGIC_STRING_STRING);\n    ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (str_p);\n    ecma_string_t *result_p = ecma_stringbuilder_finalize (&builder);\n\n    TEST_ASSERT (ecma_compare_ecma_strings (result_p, str_p));\n    ecma_deref_ecma_string (result_p);\n    ecma_deref_ecma_string (str_p);\n  }\n\n  ecma_finalize ();\n  jmem_finalize ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-strings.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-helpers.h\"\n#include \"lit-strings.h\"\n#include \"ecma-init-finalize.h\"\n\n#include \"test-common.h\"\n\n/* Iterations count. */\n#define test_iters (1024)\n\n/* Sub iterations count. */\n#define test_subiters (128)\n\n/* Max bytes in string. */\n#define max_bytes_in_string (65 * 1024)\n#define max_code_units_in_string (max_bytes_in_string)\n\ntypedef enum\n{\n  CESU8_ANY_SIZE,\n  CESU8_ONE_BYTE,\n  CESU8_TWO_BYTES,\n  CESU8_THREE_BYTES,\n} utf8_char_size;\n\nstatic lit_utf8_size_t\ngenerate_cesu8_char (utf8_char_size char_size,\n                     lit_utf8_byte_t *buf)\n{\n  TEST_ASSERT (char_size >= 0 && char_size <= LIT_CESU8_MAX_BYTES_IN_CODE_UNIT);\n  lit_code_point_t code_point = (lit_code_point_t) rand ();\n\n  if (char_size == 1)\n  {\n    code_point %= LIT_UTF8_1_BYTE_CODE_POINT_MAX;\n  }\n  else if (char_size == 2)\n  {\n    code_point = LIT_UTF8_2_BYTE_CODE_POINT_MIN + code_point % (LIT_UTF8_2_BYTE_CODE_POINT_MAX -\n                                                                LIT_UTF8_2_BYTE_CODE_POINT_MIN);\n  }\n  else if (char_size == 3)\n  {\n    code_point = LIT_UTF8_3_BYTE_CODE_POINT_MIN + code_point % (LIT_UTF8_3_BYTE_CODE_POINT_MAX -\n                                                                LIT_UTF8_3_BYTE_CODE_POINT_MIN);\n  }\n  else\n  {\n    code_point %= LIT_UTF8_3_BYTE_CODE_POINT_MAX;\n  }\n\n  if (code_point >= LIT_UTF16_HIGH_SURROGATE_MIN\n      && code_point <= LIT_UTF16_LOW_SURROGATE_MAX)\n  {\n    code_point = LIT_UTF16_HIGH_SURROGATE_MIN - 1;\n  }\n\n  return lit_code_unit_to_utf8 ((ecma_char_t) code_point, buf);\n} /* generate_cesu8_char */\n\nstatic lit_utf8_size_t\ngenerate_cesu8_string (lit_utf8_byte_t *buf_p,\n                       lit_utf8_size_t buf_size)\n{\n  lit_utf8_size_t length = 0;\n\n  lit_utf8_size_t size = 0;\n  while (size  < buf_size)\n  {\n    const utf8_char_size char_size = (((buf_size - size) > LIT_CESU8_MAX_BYTES_IN_CODE_UNIT)\n                                      ? CESU8_ANY_SIZE\n                                      : (utf8_char_size) (buf_size - size));\n\n    lit_utf8_size_t bytes_generated = generate_cesu8_char (char_size, buf_p);\n\n    TEST_ASSERT (lit_is_valid_cesu8_string (buf_p, bytes_generated));\n\n    size += bytes_generated;\n    buf_p += bytes_generated;\n    length++;\n  }\n\n  TEST_ASSERT (size == buf_size);\n\n  return length;\n} /* generate_cesu8_string */\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jmem_init ();\n  ecma_init ();\n\n  lit_utf8_byte_t cesu8_string[max_bytes_in_string];\n  ecma_char_t code_units[max_code_units_in_string];\n  const lit_utf8_byte_t *saved_positions[max_code_units_in_string];\n\n  for (int i = 0; i < test_iters; i++)\n  {\n    lit_utf8_size_t cesu8_string_size = (i == 0) ? 0 : (lit_utf8_size_t) (rand () % max_bytes_in_string);\n    lit_utf8_size_t length = generate_cesu8_string (cesu8_string, cesu8_string_size);\n\n    ecma_string_t *char_collection_string_p = ecma_new_ecma_string_from_utf8 (cesu8_string, cesu8_string_size);\n    lit_utf8_size_t char_collection_len = ecma_string_get_length (char_collection_string_p);\n    TEST_ASSERT (char_collection_len == length);\n    ecma_deref_ecma_string (char_collection_string_p);\n\n    TEST_ASSERT (lit_utf8_string_length (cesu8_string, cesu8_string_size) == length);\n\n    const lit_utf8_byte_t *curr_p = cesu8_string;\n    const lit_utf8_byte_t *end_p = cesu8_string + cesu8_string_size;\n\n    lit_utf8_size_t calculated_length = 0;\n    lit_utf8_size_t code_units_count = 0;\n\n    while (curr_p < end_p)\n    {\n      code_units[code_units_count] = lit_cesu8_peek_next (curr_p);\n      saved_positions[code_units_count] = curr_p;\n      code_units_count++;\n      calculated_length++;\n\n      lit_utf8_incr (&curr_p);\n    }\n\n    TEST_ASSERT (length == calculated_length);\n\n    if (code_units_count > 0)\n    {\n      for (int j = 0; j < test_subiters; j++)\n      {\n        lit_utf8_size_t index = (lit_utf8_size_t) rand () % code_units_count;\n        curr_p = saved_positions[index];\n        TEST_ASSERT (lit_cesu8_peek_next (curr_p) == code_units[index]);\n      }\n    }\n\n    curr_p = (lit_utf8_byte_t *) end_p;\n    while (curr_p > cesu8_string)\n    {\n      TEST_ASSERT (code_units_count > 0);\n      calculated_length--;\n      TEST_ASSERT (code_units[calculated_length] == lit_cesu8_peek_prev (curr_p));\n      lit_utf8_decr (&curr_p);\n    }\n\n    TEST_ASSERT (calculated_length == 0);\n\n    while (curr_p < end_p)\n    {\n      ecma_char_t code_unit = lit_cesu8_read_next (&curr_p);\n      TEST_ASSERT (code_unit == code_units[calculated_length]);\n      calculated_length++;\n    }\n\n    TEST_ASSERT (length == calculated_length);\n\n    while (curr_p > cesu8_string)\n    {\n      TEST_ASSERT (code_units_count > 0);\n      calculated_length--;\n      TEST_ASSERT (code_units[calculated_length] == lit_cesu8_read_prev (&curr_p));\n    }\n\n    TEST_ASSERT (calculated_length == 0);\n  }\n\n  /* Overlong-encoded code point */\n  lit_utf8_byte_t invalid_cesu8_string_1[] = {0xC0, 0x82};\n  TEST_ASSERT (!lit_is_valid_cesu8_string (invalid_cesu8_string_1, sizeof (invalid_cesu8_string_1)));\n\n  /* Overlong-encoded code point */\n  lit_utf8_byte_t invalid_cesu8_string_2[] = {0xE0, 0x80, 0x81};\n  TEST_ASSERT (!lit_is_valid_cesu8_string (invalid_cesu8_string_2, sizeof (invalid_cesu8_string_2)));\n\n  /* Pair of surrogates: 0xD901 0xDFF0 which encode Unicode character 0x507F0 */\n  lit_utf8_byte_t invalid_cesu8_string_3[] = {0xED, 0xA4, 0x81, 0xED, 0xBF, 0xB0};\n  TEST_ASSERT (lit_is_valid_cesu8_string (invalid_cesu8_string_3, sizeof (invalid_cesu8_string_3)));\n\n  /* Isolated high surrogate 0xD901 */\n  lit_utf8_byte_t valid_utf8_string_1[] = {0xED, 0xA4, 0x81};\n  TEST_ASSERT (lit_is_valid_cesu8_string (valid_utf8_string_1, sizeof (valid_utf8_string_1)));\n\n  lit_utf8_byte_t res_buf[3];\n  lit_utf8_size_t res_size;\n\n  res_size = lit_code_unit_to_utf8 (0x73, res_buf);\n  TEST_ASSERT (res_size == 1);\n  TEST_ASSERT (res_buf[0] == 0x73);\n\n  res_size = lit_code_unit_to_utf8 (0x41A, res_buf);\n  TEST_ASSERT (res_size == 2);\n  TEST_ASSERT (res_buf[0] == 0xD0);\n  TEST_ASSERT (res_buf[1] == 0x9A);\n\n  res_size = lit_code_unit_to_utf8 (0xD7FF, res_buf);\n  TEST_ASSERT (res_size == 3);\n  TEST_ASSERT (res_buf[0] == 0xED);\n  TEST_ASSERT (res_buf[1] == 0x9F);\n  TEST_ASSERT (res_buf[2] == 0xBF);\n\n  ecma_finalize ();\n  jmem_finalize ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-symbol.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\n/* foo string */\n#define STRING_FOO ((const jerry_char_t *) \"foo\")\n\n/* bar string */\n#define STRING_BAR ((const jerry_char_t *) \"bar\")\n\n/* Symbol(bar) desciptive string */\n#define SYMBOL_DESCIPTIVE_STRING_BAR \"Symbol(bar)\"\n\n/* bar string desciption */\n#define SYMBOL_DESCIPTION_BAR \"bar\"\n\nint\nmain (void)\n{\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_SYMBOL))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"Symbol support is disabled!\\n\");\n    return 0;\n  }\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t object = jerry_create_object ();\n\n  /* Test for that each symbol is unique independently from their descriptor strings */\n  jerry_value_t symbol_desc_1 = jerry_create_string (STRING_FOO);\n  jerry_value_t symbol_desc_2 = jerry_create_string (STRING_FOO);\n\n  jerry_value_t symbol_1 = jerry_create_symbol (symbol_desc_1);\n  TEST_ASSERT (!jerry_value_is_error (symbol_1));\n  TEST_ASSERT (jerry_value_is_symbol (symbol_1));\n\n  jerry_value_t symbol_2 = jerry_create_symbol (symbol_desc_2);\n  TEST_ASSERT (!jerry_value_is_error (symbol_2));\n  TEST_ASSERT (jerry_value_is_symbol (symbol_2));\n\n  /* The descriptor strings are no longer needed */\n  jerry_release_value (symbol_desc_1);\n  jerry_release_value (symbol_desc_2);\n\n  jerry_value_t value_1 = jerry_create_number (1);\n  jerry_value_t value_2 = jerry_create_number (2);\n\n  jerry_value_t result_val = jerry_set_property (object, symbol_1, value_1);\n  TEST_ASSERT (jerry_value_is_boolean (result_val));\n  TEST_ASSERT (jerry_get_boolean_value (jerry_has_property (object, symbol_1)));\n  TEST_ASSERT (jerry_get_boolean_value (jerry_has_own_property (object, symbol_1)));\n\n  result_val = jerry_set_property (object, symbol_2, value_2);\n  TEST_ASSERT (jerry_value_is_boolean (result_val));\n  TEST_ASSERT (jerry_get_boolean_value (jerry_has_property (object, symbol_2)));\n  TEST_ASSERT (jerry_get_boolean_value (jerry_has_own_property (object, symbol_2)));\n\n  jerry_value_t get_value_1 = jerry_get_property (object, symbol_1);\n  TEST_ASSERT (jerry_get_number_value (get_value_1) == jerry_get_number_value (value_1));\n  jerry_release_value (get_value_1);\n\n  jerry_value_t get_value_2 = jerry_get_property (object, symbol_2);\n  TEST_ASSERT (jerry_get_number_value (get_value_2) == jerry_get_number_value (value_2));\n  jerry_release_value (get_value_2);\n\n  /* Test delete / has_{own}_property */\n  TEST_ASSERT (jerry_delete_property (object, symbol_1));\n  TEST_ASSERT (!jerry_get_boolean_value (jerry_has_property (object, symbol_1)));\n  TEST_ASSERT (!jerry_get_boolean_value (jerry_has_own_property (object, symbol_1)));\n\n  jerry_release_value (value_1);\n  jerry_release_value (symbol_1);\n\n  /* Test {get, define}_own_property_descriptor */\n  jerry_property_descriptor_t prop_desc;\n  TEST_ASSERT (jerry_get_own_property_descriptor (object, symbol_2, &prop_desc));\n  TEST_ASSERT (prop_desc.is_value_defined == true);\n  TEST_ASSERT (value_2 == prop_desc.value);\n  TEST_ASSERT (jerry_get_number_value (value_2) == jerry_get_number_value (prop_desc.value));\n  TEST_ASSERT (prop_desc.is_writable == true);\n  TEST_ASSERT (prop_desc.is_enumerable == true);\n  TEST_ASSERT (prop_desc.is_configurable == true);\n  TEST_ASSERT (prop_desc.is_get_defined == false);\n  TEST_ASSERT (jerry_value_is_undefined (prop_desc.getter));\n  TEST_ASSERT (prop_desc.is_set_defined == false);\n  TEST_ASSERT (jerry_value_is_undefined (prop_desc.setter));\n  jerry_free_property_descriptor_fields (&prop_desc);\n\n  /* Modify the descriptor fields */\n  jerry_init_property_descriptor_fields (&prop_desc);\n  jerry_value_t value_3 = jerry_create_string (STRING_BAR);\n\n  prop_desc.is_value_defined = true;\n  prop_desc.value = jerry_acquire_value (value_3);\n  prop_desc.is_writable_defined = true;\n  prop_desc.is_writable = false;\n  prop_desc.is_enumerable_defined = true;\n  prop_desc.is_enumerable = false;\n  prop_desc.is_configurable_defined = true;\n  prop_desc.is_configurable = false;\n  TEST_ASSERT (jerry_get_boolean_value (jerry_define_own_property (object, symbol_2, &prop_desc)));\n  jerry_free_property_descriptor_fields (&prop_desc);\n\n  /* Check the modified fields */\n  TEST_ASSERT (jerry_get_own_property_descriptor (object, symbol_2, &prop_desc));\n  TEST_ASSERT (prop_desc.is_value_defined == true);\n  TEST_ASSERT (value_3 == prop_desc.value);\n  TEST_ASSERT (jerry_value_is_string (prop_desc.value));\n  TEST_ASSERT (prop_desc.is_writable_defined == true);\n  TEST_ASSERT (prop_desc.is_writable == false);\n  TEST_ASSERT (prop_desc.is_enumerable_defined == true);\n  TEST_ASSERT (prop_desc.is_enumerable == false);\n  TEST_ASSERT (prop_desc.is_configurable_defined == true);\n  TEST_ASSERT (prop_desc.is_configurable == false);\n  TEST_ASSERT (prop_desc.is_get_defined == false);\n  TEST_ASSERT (jerry_value_is_undefined (prop_desc.getter));\n  TEST_ASSERT (prop_desc.is_set_defined == false);\n  TEST_ASSERT (jerry_value_is_undefined (prop_desc.setter));\n  jerry_free_property_descriptor_fields (&prop_desc);\n\n  jerry_release_value (value_3);\n  jerry_release_value (value_2);\n  jerry_release_value (symbol_2);\n  jerry_release_value (object);\n\n  /* Test creating symbol with a symbol description */\n  jerry_value_t empty_symbol_desc = jerry_create_string ((const jerry_char_t *) \"\");\n\n  jerry_value_t empty_symbol = jerry_create_symbol (empty_symbol_desc);\n  TEST_ASSERT (!jerry_value_is_error (empty_symbol));\n  TEST_ASSERT (jerry_value_is_symbol (empty_symbol));\n\n  jerry_release_value (empty_symbol_desc);\n\n  jerry_value_t symbol_symbol = jerry_create_symbol (empty_symbol);\n  TEST_ASSERT (!jerry_value_is_symbol (symbol_symbol));\n  TEST_ASSERT (jerry_value_is_error (symbol_symbol));\n\n  jerry_value_t error_obj = jerry_get_value_from_error (symbol_symbol, true);\n\n  TEST_ASSERT (jerry_get_error_type (error_obj) == JERRY_ERROR_TYPE);\n\n  jerry_release_value (error_obj);\n  jerry_release_value (empty_symbol);\n\n  /* Test symbol to string operation with symbol argument */\n  jerry_value_t bar_symbol_desc = jerry_create_string (STRING_BAR);\n\n  jerry_value_t bar_symbol = jerry_create_symbol (bar_symbol_desc);\n  TEST_ASSERT (!jerry_value_is_error (bar_symbol));\n  TEST_ASSERT (jerry_value_is_symbol (bar_symbol));\n\n  jerry_release_value (bar_symbol_desc);\n\n  jerry_value_t bar_symbol_string = jerry_get_symbol_descriptive_string (bar_symbol);\n  TEST_ASSERT (jerry_value_is_string (bar_symbol_string));\n\n  jerry_size_t bar_symbol_string_size = jerry_get_string_size (bar_symbol_string);\n  TEST_ASSERT (bar_symbol_string_size == (sizeof (SYMBOL_DESCIPTIVE_STRING_BAR) - 1));\n  JERRY_VLA (jerry_char_t, str_buff, bar_symbol_string_size);\n\n  jerry_string_to_char_buffer (bar_symbol_string, str_buff, bar_symbol_string_size);\n  TEST_ASSERT (memcmp (str_buff, SYMBOL_DESCIPTIVE_STRING_BAR, sizeof (SYMBOL_DESCIPTIVE_STRING_BAR) - 1) == 0);\n\n  jerry_release_value (bar_symbol_string);\n\n  /* Test symbol get description operation with string description */\n  bar_symbol_string = jerry_get_symbol_description (bar_symbol);\n  TEST_ASSERT (jerry_value_is_string (bar_symbol_string));\n\n  bar_symbol_string_size = jerry_get_string_size (bar_symbol_string);\n  TEST_ASSERT (bar_symbol_string_size == (sizeof (SYMBOL_DESCIPTION_BAR) - 1));\n\n  jerry_string_to_char_buffer (bar_symbol_string, str_buff, bar_symbol_string_size);\n  TEST_ASSERT (memcmp (str_buff, STRING_BAR, sizeof (SYMBOL_DESCIPTION_BAR) - 1) == 0);\n\n  jerry_release_value (bar_symbol_string);\n  jerry_release_value (bar_symbol);\n\n  /* Test symbol get description operation with undefined description */\n  jerry_value_t undefined_value = jerry_create_undefined ();\n  jerry_value_t undefined_symbol = jerry_create_symbol (undefined_value);\n  jerry_release_value (undefined_value);\n  TEST_ASSERT (!jerry_value_is_error (bar_symbol));\n  TEST_ASSERT (jerry_value_is_symbol (bar_symbol));\n\n  undefined_value = jerry_get_symbol_description (undefined_symbol);\n  TEST_ASSERT (jerry_value_is_undefined (undefined_value));\n  jerry_release_value (undefined_value);\n  jerry_release_value (undefined_symbol);\n\n  /* Test symbol to string operation with non-symbol argument */\n  jerry_value_t null_value = jerry_create_null ();\n  jerry_value_t to_string_value = jerry_get_symbol_descriptive_string (null_value);\n  TEST_ASSERT (jerry_value_is_error (to_string_value));\n\n  error_obj = jerry_get_value_from_error (to_string_value, true);\n\n  TEST_ASSERT (jerry_get_error_type (error_obj) == JERRY_ERROR_TYPE);\n\n  jerry_release_value (error_obj);\n  jerry_release_value (null_value);\n\n  const jerry_char_t obj_src[] = \"\"\n  \"({\"\n  \"  [Symbol.asyncIterator]: 1,\"\n  \"  [Symbol.hasInstance]: 2,\"\n  \"  [Symbol.isConcatSpreadable]: 3,\"\n  \"  [Symbol.iterator]: 4,\"\n  \"  [Symbol.match]: 5,\"\n  \"  [Symbol.replace]: 6,\"\n  \"  [Symbol.search]: 7,\"\n  \"  [Symbol.species]: 8,\"\n  \"  [Symbol.split]: 9,\"\n  \"  [Symbol.toPrimitive]: 10,\"\n  \"  [Symbol.toStringTag]: 11,\"\n  \"  [Symbol.unscopables]: 12,\"\n  \"  [Symbol.matchAll]: 13,\"\n  \"})\";\n\n  const char *symbols[] =\n  {\n    \"asyncIterator\",\n    \"hasInstance\",\n    \"isConcatSpreadable\",\n    \"iterator\",\n    \"match\",\n    \"replace\",\n    \"search\",\n    \"species\",\n    \"split\",\n    \"toPrimitive\",\n    \"toStringTag\",\n    \"unscopables\",\n    \"matchAll\",\n  };\n\n  jerry_value_t obj = jerry_eval (obj_src, sizeof (obj_src) - 1, JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (jerry_value_is_object (obj));\n\n  jerry_value_t global_obj = jerry_get_global_object ();\n  jerry_value_t symbol_str = jerry_create_string ((const jerry_char_t *) \"Symbol\");\n  jerry_value_t builtin_symbol = jerry_get_property (global_obj, symbol_str);\n  TEST_ASSERT (jerry_value_is_object (builtin_symbol));\n\n  double expected = 1.0;\n  uint32_t prop_index = 0;\n\n  for (jerry_well_known_symbol_t id = JERRY_SYMBOL_ASYNC_ITERATOR;\n       id <= JERRY_SYMBOL_MATCH_ALL;\n       id++, expected++, prop_index++)\n  {\n    jerry_value_t well_known_symbol = jerry_get_well_known_symbol (id);\n\n    jerry_value_t prop_str = jerry_create_string ((const jerry_char_t *) symbols[prop_index]);\n    jerry_value_t current_global_symbol = jerry_get_property (builtin_symbol, prop_str);\n    jerry_release_value (prop_str);\n\n    jerry_value_t relation = jerry_binary_operation (JERRY_BIN_OP_STRICT_EQUAL,\n                                                     well_known_symbol,\n                                                     current_global_symbol);\n\n    TEST_ASSERT (jerry_value_is_boolean (relation)\n                 && jerry_get_boolean_value (relation));\n\n    jerry_release_value (relation);\n\n    jerry_value_t prop_result_wn = jerry_get_property (obj, well_known_symbol);\n    jerry_value_t prop_result_global = jerry_get_property (obj, current_global_symbol);\n\n    TEST_ASSERT (jerry_value_is_number (prop_result_wn));\n    double number_wn = jerry_get_number_value (prop_result_wn);\n    TEST_ASSERT (number_wn == expected);\n\n    TEST_ASSERT (jerry_value_is_number (prop_result_global));\n    double number_global = jerry_get_number_value (prop_result_global);\n    TEST_ASSERT (number_global == expected);\n\n    jerry_release_value (prop_result_global);\n    jerry_release_value (prop_result_wn);\n    jerry_release_value (current_global_symbol);\n    jerry_release_value (well_known_symbol);\n  }\n\n  jerry_release_value (builtin_symbol);\n\n  /* Deletion of the 'Symbol' builtin makes the well-known symbols unaccessible from JS context\n     but the symbols still can be obtained via 'jerry_get_well_known_symbol' */\n  const jerry_char_t deleter_src[] = \"delete Symbol\";\n\n  jerry_value_t deleter = jerry_eval (deleter_src, sizeof (deleter_src) - 1, JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (jerry_value_is_boolean (deleter)\n               && jerry_get_boolean_value (deleter));\n  jerry_release_value (deleter);\n\n  builtin_symbol = jerry_get_property (global_obj, symbol_str);\n  TEST_ASSERT (jerry_value_is_undefined (builtin_symbol));\n  jerry_release_value (builtin_symbol);\n\n  expected = 1.0;\n  prop_index = 0;\n\n  for (jerry_well_known_symbol_t id = JERRY_SYMBOL_ASYNC_ITERATOR;\n       id <= JERRY_SYMBOL_MATCH_ALL;\n       id++, expected++, prop_index++)\n  {\n    jerry_value_t well_known_symbol = jerry_get_well_known_symbol (id);\n    jerry_value_t prop_result_wn = jerry_get_property (obj, well_known_symbol);\n\n    TEST_ASSERT (jerry_value_is_number (prop_result_wn));\n    double number_wn = jerry_get_number_value (prop_result_wn);\n    TEST_ASSERT (number_wn == expected);\n\n    jerry_release_value (prop_result_wn);\n    jerry_release_value (well_known_symbol);\n  }\n\n  jerry_well_known_symbol_t invalid_symbol = (jerry_well_known_symbol_t) (JERRY_SYMBOL_MATCH_ALL + 1);\n  jerry_value_t invalid_well_known_symbol = jerry_get_well_known_symbol (invalid_symbol);\n  TEST_ASSERT (jerry_value_is_undefined (invalid_well_known_symbol));\n  jerry_release_value (invalid_well_known_symbol);\n\n  invalid_symbol = (jerry_well_known_symbol_t) (JERRY_SYMBOL_ASYNC_ITERATOR - 1);\n  invalid_well_known_symbol = jerry_get_well_known_symbol (invalid_symbol);\n  TEST_ASSERT (jerry_value_is_undefined (invalid_well_known_symbol));\n  jerry_release_value (invalid_well_known_symbol);\n\n  jerry_release_value (symbol_str);\n  jerry_release_value (global_obj);\n  jerry_release_value (obj);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-to-integer.c",
    "content": "/*\n * Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-init-finalize.h\"\n#include \"ecma-exceptions.h\"\n#include \"jerryscript.h\"\n#include \"jcontext.h\"\n\n#include \"test-common.h\"\n\n/**\n * Unit test's main function.\n */\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jmem_init ();\n  ecma_init ();\n\n  ecma_number_t num;\n\n  ecma_value_t int_num = ecma_make_int32_value (123);\n\n  ecma_number_t result = ecma_op_to_integer (int_num, &num);\n\n  ecma_free_value (int_num);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == 123);\n\n  /* 2 */\n  ecma_value_t error = ecma_raise_type_error (ECMA_ERR_MSG (\"I am a neat little error message\"));\n\n  result = ecma_op_to_integer (error, &num);\n\n  jcontext_release_exception ();\n\n  TEST_ASSERT (ECMA_IS_VALUE_ERROR (result));\n\n  /* 3 */\n  ecma_value_t nan = ecma_make_nan_value ();\n\n  result = ecma_op_to_integer (nan, &num);\n\n  ecma_free_value (nan);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == 0);\n\n  /* 4 */\n    /* -0 */\n  ecma_value_t negative_zero = ecma_make_number_value (-0.0f);\n\n  result = ecma_op_to_integer (negative_zero, &num);\n\n  ecma_free_value (negative_zero);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (1.0f / num == ecma_number_make_infinity (true));\n\n    /* +0 */\n  ecma_value_t positive_zero = ecma_make_number_value (+0.0f);\n\n  result = ecma_op_to_integer (positive_zero, &num);\n\n  ecma_free_value (positive_zero);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (1.0f / num == ecma_number_make_infinity (false));\n\n    /* -infinity */\n  ecma_value_t negative_infinity = ecma_make_number_value (ecma_number_make_infinity (true));\n\n  result = ecma_op_to_integer (negative_infinity, &num);\n\n  ecma_free_value (negative_infinity);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == ecma_number_make_infinity (true));\n\n    /* +infinity */\n  ecma_value_t positive_infinity = ecma_make_number_value (ecma_number_make_infinity (false));\n\n  result = ecma_op_to_integer (positive_infinity, &num);\n\n  ecma_free_value (positive_infinity);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == ecma_number_make_infinity (false));\n\n  /* 5 */\n  ecma_value_t floor = ecma_make_number_value (3.001f);\n\n  result = ecma_op_to_integer (floor, &num);\n\n  ecma_free_value (floor);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == 3);\n\n  ecma_value_t floor2 = ecma_make_number_value (-26.5973);\n\n  result = ecma_op_to_integer (floor2, &num);\n\n  ecma_free_value (floor2);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == -26);\n\n  ecma_finalize ();\n  jmem_finalize ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-to-length.c",
    "content": "/*\n * Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"ecma-globals.h\"\n#include \"ecma-helpers.h\"\n#include \"ecma-conversion.h\"\n#include \"ecma-init-finalize.h\"\n#include \"ecma-exceptions.h\"\n#include \"jerryscript.h\"\n#include \"jcontext.h\"\n\n#include \"test-common.h\"\n\n/**\n * Unit test's main function.\n */\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jmem_init ();\n  ecma_init ();\n\n  ecma_length_t num;\n\n  ecma_value_t int_num = ecma_make_int32_value (123);\n\n  ecma_value_t result = ecma_op_to_length (int_num, &num);\n\n  ecma_free_value (int_num);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == 123);\n\n  /* 1, 3 */\n  ecma_value_t error_throw = ecma_raise_type_error (ECMA_ERR_MSG (\"I'm an error\"));\n\n  result = ecma_op_to_length (error_throw, &num);\n\n  jcontext_release_exception ();\n\n  TEST_ASSERT (ECMA_IS_VALUE_ERROR (result));\n\n  /* zero */\n  ecma_value_t zero = ecma_make_int32_value (0);\n\n  result = ecma_op_to_length (zero, &num);\n\n  ecma_free_value (zero);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == 0);\n\n  /* negative */\n  ecma_value_t negative = ecma_make_number_value (-26.5973f);\n\n  result = ecma_op_to_length (negative, &num);\n\n  ecma_free_value (negative);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n#if ENABLED (JERRY_ESNEXT)\n  TEST_ASSERT (num == 0);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  TEST_ASSERT (num == 4294967270);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* +infinity */\n  ecma_value_t positive_infinity = ecma_make_number_value (ecma_number_make_infinity (false));\n\n  result = ecma_op_to_length (positive_infinity, &num);\n\n  ecma_free_value (positive_infinity);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n#if ENABLED (JERRY_ESNEXT)\n  TEST_ASSERT (num == ECMA_NUMBER_MAX_SAFE_INTEGER);\n#else /* !ENABLED (JERRY_ESNEXT) */\n  TEST_ASSERT (num == 0);\n#endif /* ENABLED (JERRY_ESNEXT) */\n\n  /* -infinity */\n  ecma_value_t negative_infinity = ecma_make_number_value (ecma_number_make_infinity (true));\n\n  result = ecma_op_to_length (negative_infinity, &num);\n\n  ecma_free_value (negative_infinity);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == 0);\n\n  /* NaN */\n  ecma_value_t nan = ecma_make_nan_value ();\n\n  result = ecma_op_to_length (nan, &num);\n\n  ecma_free_value (nan);\n\n  TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));\n  TEST_ASSERT (num == 0);\n\n  ecma_finalize ();\n  jmem_finalize ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-to-property-descriptor.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"config.h\"\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nint\nmain (void)\n{\n  TEST_INIT ();\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t object = jerry_create_object ();\n  jerry_value_t prop_name;\n  jerry_value_t value = jerry_create_boolean (true);\n  jerry_property_descriptor_t prop_desc;\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"value\");\n  TEST_ASSERT (jerry_set_property (object, prop_name, value));\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"writable\");\n  TEST_ASSERT (jerry_set_property (object, prop_name, value));\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"writable\");\n  TEST_ASSERT (jerry_set_property (object, prop_name, value));\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"enumerable\");\n  TEST_ASSERT (jerry_set_property (object, prop_name, value));\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"configurable\");\n  TEST_ASSERT (jerry_set_property (object, prop_name, value));\n\n  jerry_value_t result = jerry_to_property_descriptor (object, &prop_desc);\n  TEST_ASSERT (jerry_value_is_boolean (result) && jerry_get_boolean_value (result));\n  jerry_release_value (result);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"value\");\n  value = jerry_get_property (object, prop_name);\n  TEST_ASSERT (value == prop_desc.value);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"writable\");\n  value = jerry_get_property (object, prop_name);\n  TEST_ASSERT (jerry_get_boolean_value (value) == prop_desc.is_writable);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"writable\");\n  value = jerry_get_property (object, prop_name);\n  TEST_ASSERT (jerry_get_boolean_value (value) == prop_desc.is_writable);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"enumerable\");\n  value = jerry_get_property (object, prop_name);\n  TEST_ASSERT (jerry_get_boolean_value (value) == prop_desc.is_enumerable);\n\n  prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) \"configurable\");\n  value = jerry_get_property (object, prop_name);\n  TEST_ASSERT (jerry_get_boolean_value (value) == prop_desc.is_configurable);\n\n  jerry_release_value (object);\n  jerry_release_value (prop_name);\n  jerry_release_value (value);\n  jerry_free_property_descriptor_fields (&prop_desc);\n\n  object = jerry_create_null ();\n  result = jerry_to_property_descriptor (object, &prop_desc);\n  TEST_ASSERT (jerry_value_is_error (result));\n  jerry_release_value (result);\n  jerry_release_value (object);\n\n  jerry_cleanup ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-typedarray.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-port.h\"\n#include \"jerryscript-port-default.h\"\n#include \"test-common.h\"\n\n#include <stdio.h>\n\n/**\n * Type to describe test cases.\n */\ntypedef struct\n{\n  jerry_typedarray_type_t typedarray_type; /**< what kind of TypedArray */\n  char *constructor_name; /**< JS constructor name for TypedArray */\n  uint32_t element_count; /**< number of elements for the TypedArray */\n  uint32_t bytes_per_element; /**< bytes per elment of the given typedarray_type */\n} test_entry_t;\n\n/**\n * Register a JavaScript value in the global object.\n */\nstatic void\nregister_js_value (const char *name_p, /**< name of the function */\n                    jerry_value_t value) /**< function callback */\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  jerry_value_t name_val = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t result_val = jerry_set_property (global_obj_val, name_val, value);\n\n  jerry_release_value (name_val);\n  jerry_release_value (global_obj_val);\n\n  jerry_release_value (result_val);\n} /* register_js_value */\n\nstatic jerry_value_t\nassert_handler (const jerry_value_t func_obj_val, /**< function object */\n                const jerry_value_t this_val, /**< this arg */\n                const jerry_value_t args_p[], /**< function arguments */\n                const jerry_length_t args_cnt) /**< number of function arguments */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  if (jerry_value_is_boolean (args_p[0])\n      && jerry_get_boolean_value (args_p[0]))\n  {\n    return jerry_create_boolean (true);\n  }\n  else\n  {\n    if (args_cnt > 1\n        && jerry_value_is_string (args_p[1]))\n    {\n      jerry_length_t utf8_sz = jerry_get_string_size (args_p[1]);\n      JERRY_VLA (char, string_from_utf8, utf8_sz);\n      string_from_utf8[utf8_sz] = 0;\n\n      jerry_string_to_char_buffer (args_p[1], (jerry_char_t *) string_from_utf8, utf8_sz);\n\n      printf (\"JS assert: %s\\n\", string_from_utf8);\n    }\n    TEST_ASSERT (false);\n  }\n} /* assert_handler */\n\n/**\n * Do simple TypedArray property validation.\n */\nstatic void\ntest_typedarray_info (jerry_value_t typedarray, /**< target TypedArray to query */\n                      jerry_typedarray_type_t typedarray_type, /**< expected TypedArray type */\n                      jerry_length_t element_count, /**< expected element count */\n                      jerry_length_t bytes_per_element) /**< bytes per element for the given type */\n{\n  TEST_ASSERT (!jerry_value_is_error (typedarray));\n  TEST_ASSERT (jerry_value_is_typedarray (typedarray));\n  TEST_ASSERT (jerry_get_typedarray_type (typedarray) == typedarray_type);\n  TEST_ASSERT (jerry_get_typedarray_length (typedarray) == element_count);\n\n  jerry_length_t byte_length = (uint32_t) -1;\n  jerry_length_t byte_offset = (uint32_t) -1;\n  jerry_value_t arraybuffer = jerry_get_typedarray_buffer (typedarray, &byte_offset, &byte_length);\n  TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n\n  TEST_ASSERT (byte_length == element_count * bytes_per_element);\n  TEST_ASSERT (byte_offset == 0);\n\n  jerry_release_value (arraybuffer);\n} /* test_typedarray_info */\n\n/**\n * Test construction of TypedArrays and validate properties.\n */\nstatic void\ntest_typedarray_queries (test_entry_t test_entries[]) /**< test cases */\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  for (uint32_t i = 0; test_entries[i].constructor_name != NULL; i++)\n  {\n    /* Create TypedArray via construct call */\n    {\n      jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) test_entries[i].constructor_name);\n      jerry_value_t prop_value = jerry_get_property (global_obj_val, prop_name);\n      TEST_ASSERT (!jerry_value_is_error (prop_value));\n      jerry_value_t length_arg = jerry_create_number (test_entries[i].element_count);\n\n      jerry_value_t typedarray = jerry_construct_object (prop_value, &length_arg, 1);\n\n      jerry_release_value (prop_name);\n      jerry_release_value (prop_value);\n      jerry_release_value (length_arg);\n\n      test_typedarray_info (typedarray,\n                            test_entries[i].typedarray_type,\n                            test_entries[i].element_count,\n                            test_entries[i].bytes_per_element);\n      jerry_release_value (typedarray);\n    }\n\n    /* Create TypedArray via api call */\n    {\n      jerry_value_t typedarray = jerry_create_typedarray (test_entries[i].typedarray_type,\n                                                          test_entries[i].element_count);\n      test_typedarray_info (typedarray,\n                            test_entries[i].typedarray_type,\n                            test_entries[i].element_count,\n                            test_entries[i].bytes_per_element);\n      jerry_release_value (typedarray);\n    }\n  }\n\n  jerry_release_value (global_obj_val);\n} /* test_typedarray_queries */\n\n/**\n * Test value at given position in the buffer based on TypedArray type.\n */\nstatic\nvoid test_buffer_value (uint64_t value, /**< value to test for */\n                        const void *buffer, /**< buffer to read value from */\n                        uint32_t start_offset, /**< start offset of the value */\n                        jerry_typedarray_type_t typedarray_type, /**< type of TypedArray */\n                        uint32_t bytes_per_element) /**< bytes per element for the given type */\n{\n  uint32_t offset = start_offset / bytes_per_element;\n\n#define TEST_VALUE_AT(TYPE, BUFFER, OFFSET, VALUE) TEST_ASSERT (((TYPE *) BUFFER)[OFFSET] == (TYPE) (VALUE))\n\n  switch (typedarray_type)\n  {\n    case JERRY_TYPEDARRAY_UINT8:      TEST_VALUE_AT (uint8_t,  buffer, offset, value); break;\n    case JERRY_TYPEDARRAY_INT8:       TEST_VALUE_AT (int8_t,   buffer, offset, value); break;\n    case JERRY_TYPEDARRAY_UINT16:     TEST_VALUE_AT (uint16_t, buffer, offset, value); break;\n    case JERRY_TYPEDARRAY_INT16:      TEST_VALUE_AT (int16_t,  buffer, offset, value); break;\n    case JERRY_TYPEDARRAY_UINT32:     TEST_VALUE_AT (uint32_t, buffer, offset, value); break;\n    case JERRY_TYPEDARRAY_INT32:      TEST_VALUE_AT (int32_t,  buffer, offset, value); break;\n    case JERRY_TYPEDARRAY_FLOAT32:    TEST_VALUE_AT (float,    buffer, offset, value); break;\n    case JERRY_TYPEDARRAY_FLOAT64:    TEST_VALUE_AT (double,   buffer, offset, value); break;\n    case JERRY_TYPEDARRAY_BIGINT64:   TEST_VALUE_AT (int64_t,  buffer, offset, value); break;\n    case JERRY_TYPEDARRAY_BIGUINT64:  TEST_VALUE_AT (uint64_t, buffer, offset, value); break;\n\n    case JERRY_TYPEDARRAY_UINT8CLAMPED:\n    {\n      int64_t signed_value = (int64_t) value;\n      uint8_t expected = (uint8_t) value;\n\n      /* clamp the value if required*/\n      if (signed_value > 0xFF)\n      {\n        expected = 0xFF;\n      }\n      else if (signed_value < 0)\n      {\n        expected = 0;\n      }\n\n      TEST_VALUE_AT (uint8_t, buffer, offset, expected); break;\n    }\n    default: TEST_ASSERT (false); break;\n  }\n\n#undef TEST_VALUE_AT\n} /* test_buffer_value */\n\nstatic void\ntest_typedarray_complex_creation (test_entry_t test_entries[], /**< test cases */\n                                  bool use_external_buffer) /**< run tests using arraybuffer with external memory */\n{\n  const uint32_t arraybuffer_size = 256;\n\n  JERRY_VLA (uint8_t, buffer_ext, arraybuffer_size);\n  memset (buffer_ext, 0, arraybuffer_size);\n\n  for (uint32_t i = 0; test_entries[i].constructor_name != NULL; i++)\n  {\n    const uint32_t offset = 8;\n    uint32_t element_count = test_entries[i].element_count;\n    uint32_t bytes_per_element = test_entries[i].bytes_per_element;\n\n    /* new %TypedArray% (buffer, offset, length); */\n    jerry_value_t typedarray;\n    {\n      jerry_value_t arraybuffer;\n\n      if (use_external_buffer)\n      {\n        arraybuffer = jerry_create_arraybuffer_external (arraybuffer_size, buffer_ext, NULL);\n      }\n      else\n      {\n        arraybuffer = jerry_create_arraybuffer (arraybuffer_size);\n      }\n\n      jerry_value_t js_offset = jerry_create_number (offset);\n      jerry_value_t js_element_count = jerry_create_number (element_count);\n\n      register_js_value (\"expected_offset\", js_offset);\n      register_js_value (\"expected_length\", js_element_count);\n\n      typedarray = jerry_create_typedarray_for_arraybuffer_sz (test_entries[i].typedarray_type,\n                                                               arraybuffer,\n                                                               offset,\n                                                               element_count);\n      TEST_ASSERT (!jerry_value_is_error (typedarray));\n\n      jerry_release_value (js_offset);\n      jerry_release_value (js_element_count);\n      jerry_release_value (arraybuffer);\n    }\n\n    register_js_value (\"array\", typedarray);\n\n    const jerry_char_t test_exptected_src[] = TEST_STRING_LITERAL (\n      \"assert (array.length == expected_length,\"\n      \"        'expected length: ' + expected_length + ' got: ' + array.length);\"\n      \"assert (array.byteOffset == expected_offset);\"\n    );\n    jerry_value_t result = jerry_eval (test_exptected_src,\n                                       sizeof (test_exptected_src) - 1,\n                                       JERRY_PARSE_STRICT_MODE);\n    TEST_ASSERT (!jerry_value_is_error (result));\n    jerry_release_value (result);\n\n    const jerry_char_t set_element_src[] = TEST_STRING_LITERAL (\n      \"array[0] = 0x11223344n\"\n    );\n\n    /* crop the last 'n' character */\n    size_t src_length = sizeof (set_element_src) - 2;\n\n    if (test_entries[i].typedarray_type >= JERRY_TYPEDARRAY_BIGINT64)\n    {\n      /* use the last 'n' character */\n      src_length++;\n    }\n\n    result = jerry_eval (set_element_src, src_length, JERRY_PARSE_STRICT_MODE);\n    TEST_ASSERT (!jerry_value_is_error (result));\n    jerry_release_value (result);\n\n    {\n      jerry_length_t byte_length = 0;\n      jerry_length_t byte_offset = 0;\n      jerry_value_t buffer = jerry_get_typedarray_buffer (typedarray, &byte_offset, &byte_length);\n      TEST_ASSERT (byte_length == element_count * bytes_per_element);\n      TEST_ASSERT (byte_offset == offset);\n\n      JERRY_VLA (uint8_t, test_buffer, arraybuffer_size);\n\n      jerry_typedarray_type_t type = jerry_get_typedarray_type (typedarray);\n      jerry_value_t read_count = jerry_arraybuffer_read (buffer, 0, test_buffer, offset + byte_length);\n      TEST_ASSERT (read_count == offset + byte_length);\n      test_buffer_value (0x11223344, test_buffer, offset, type, bytes_per_element);\n\n      if (use_external_buffer)\n      {\n        test_buffer_value (0x11223344, buffer_ext, offset, type, bytes_per_element);\n        TEST_ASSERT (memcmp (buffer_ext, test_buffer, offset + byte_length) == 0);\n      }\n\n      jerry_release_value (buffer);\n    }\n\n    jerry_release_value (typedarray);\n  }\n} /* test_typedarray_complex_creation */\n\n/**\n * Test get/set/delete property by index.\n */\nstatic void test_property_by_index (test_entry_t test_entries[])\n{\n  int test_int_numbers[5] = {-5, -70, 13, 0, 56};\n  double test_double_numbers[5] = {-83.153, -35.15, 0, 13.1, 89.8975};\n  uint8_t test_uint_numbers[5] = {83, 15, 36, 0, 43};\n  uint64_t test_uint64_numbers[5] = {83, 0, 1, UINT32_MAX, UINT64_MAX};\n  int64_t test_int64_numbers[5] = {INT64_MAX, INT64_MIN, 0, INT32_MAX, INT32_MIN};\n\n  for (uint32_t i = 0; test_entries[i].constructor_name != NULL; i++)\n  {\n    jerry_value_t test_number;\n    uint32_t test_numbers_length = sizeof (test_int_numbers) / sizeof (int);\n    jerry_value_t typedarray = jerry_create_typedarray (test_entries[i].typedarray_type, test_numbers_length);\n    jerry_typedarray_type_t type = jerry_get_typedarray_type (typedarray);\n\n    jerry_value_t set_result;\n    jerry_value_t get_result;\n\n    switch (type)\n    {\n      case JERRY_TYPEDARRAY_INT8:\n      case JERRY_TYPEDARRAY_INT16:\n      case JERRY_TYPEDARRAY_INT32:\n      {\n        for (uint8_t j = 0; j < test_numbers_length; j++)\n        {\n          test_number = jerry_create_number (test_int_numbers[j]);\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n          set_result = jerry_set_property_by_index (typedarray, j, test_number);\n          get_result = jerry_get_property_by_index (typedarray, j);\n\n          TEST_ASSERT (jerry_value_is_boolean (set_result));\n          TEST_ASSERT (jerry_get_boolean_value (set_result));\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n          TEST_ASSERT (jerry_get_number_value (get_result) == test_int_numbers[j]);\n\n          jerry_release_value (test_number);\n          jerry_release_value (set_result);\n          jerry_release_value (get_result);\n        }\n        break;\n      }\n      case JERRY_TYPEDARRAY_FLOAT32:\n      case JERRY_TYPEDARRAY_FLOAT64:\n      {\n        for (uint8_t j = 0; j < test_numbers_length; j++)\n        {\n          test_number = jerry_create_number (test_double_numbers[j]);\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n          set_result = jerry_set_property_by_index (typedarray, j, test_number);\n          get_result = jerry_get_property_by_index (typedarray, j);\n\n          TEST_ASSERT (jerry_value_is_boolean (set_result));\n          TEST_ASSERT (jerry_get_boolean_value (set_result));\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n\n          double epsilon = pow (10, -5);\n          double get_abs = fabs (jerry_get_number_value (get_result) - test_double_numbers[j]);\n          TEST_ASSERT (get_abs < epsilon);\n\n          jerry_release_value (test_number);\n          jerry_release_value (set_result);\n          jerry_release_value (get_result);\n\n          /* Testing positive and negative infinity */\n          for (uint8_t k = 0; k < 2; k++)\n          {\n            jerry_value_t inf = jerry_create_number_infinity (k);\n            jerry_value_t set_inf = jerry_set_property_by_index (typedarray, 0, inf);\n            TEST_ASSERT (jerry_value_is_boolean (set_inf));\n            TEST_ASSERT (jerry_get_boolean_value (set_inf));\n            jerry_value_t get_inf = jerry_get_property_by_index (typedarray, 0);\n            TEST_ASSERT (isinf (jerry_get_number_value (get_inf)));\n\n            jerry_release_value (inf);\n            jerry_release_value (set_inf);\n            jerry_release_value (get_inf);\n          }\n        }\n        break;\n      }\n      case JERRY_TYPEDARRAY_BIGINT64:\n      {\n        for (uint8_t j = 0; j < test_numbers_length; j++)\n        {\n          test_number = jerry_create_bigint ((uint64_t *) &test_int64_numbers[j], 1, true);\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n          set_result = jerry_set_property_by_index (typedarray, j, test_number);\n          get_result = jerry_get_property_by_index (typedarray, j);\n\n          TEST_ASSERT (jerry_value_is_boolean (set_result));\n          TEST_ASSERT (jerry_get_boolean_value (set_result));\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n          int64_t get_number;\n          bool sign;\n          jerry_get_bigint_digits (get_result, (uint64_t *) &get_number, 1, &sign);\n\n          TEST_ASSERT (sign ? get_number : -get_number == test_int64_numbers[j]);\n\n          jerry_release_value (test_number);\n          jerry_release_value (set_result);\n          jerry_release_value (get_result);\n        }\n        break;\n      }\n      case JERRY_TYPEDARRAY_BIGUINT64:\n      {\n        for (uint8_t j = 0; j < test_numbers_length; j++)\n        {\n          test_number = jerry_create_bigint (&test_uint64_numbers[j], 1, false);\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n          set_result = jerry_set_property_by_index (typedarray, j, test_number);\n          get_result = jerry_get_property_by_index (typedarray, j);\n\n          TEST_ASSERT (jerry_value_is_boolean (set_result));\n          TEST_ASSERT (jerry_get_boolean_value (set_result));\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n          uint64_t get_number;\n          bool sign;\n          jerry_get_bigint_digits (get_result, &get_number, 1, &sign);\n\n          TEST_ASSERT (get_number == test_uint64_numbers[j]);\n\n          jerry_release_value (test_number);\n          jerry_release_value (set_result);\n          jerry_release_value (get_result);\n        }\n        break;\n      }\n      default:\n      {\n        for (uint8_t j = 0; j < test_numbers_length; j++)\n        {\n          test_number = jerry_create_number (test_uint_numbers[j]);\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n          set_result = jerry_set_property_by_index (typedarray, j, test_number);\n          get_result = jerry_get_property_by_index (typedarray, j);\n\n          TEST_ASSERT (jerry_value_is_boolean (set_result));\n          TEST_ASSERT (jerry_get_boolean_value (set_result));\n          TEST_ASSERT (!jerry_delete_property_by_index (typedarray, j));\n          TEST_ASSERT (jerry_get_number_value (get_result) == test_uint_numbers[j]);\n\n          jerry_release_value (test_number);\n          jerry_release_value (set_result);\n          jerry_release_value (get_result);\n        }\n        break;\n      }\n    }\n\n    jerry_value_t set_undefined = jerry_set_property_by_index (typedarray, 100, jerry_create_number (50));\n    TEST_ASSERT (jerry_value_is_error (set_undefined));\n    jerry_value_t get_undefined = jerry_get_property_by_index (typedarray, 100);\n    TEST_ASSERT (jerry_value_is_undefined (get_undefined));\n\n    jerry_release_value (set_undefined);\n    jerry_release_value (get_undefined);\n    jerry_release_value (typedarray);\n  }\n} /* test_property_by_index */\n\nstatic void\ntest_detached_arraybuffer (void)\n{\n  static jerry_typedarray_type_t types[] =\n  {\n    JERRY_TYPEDARRAY_UINT8,\n    JERRY_TYPEDARRAY_UINT8CLAMPED,\n    JERRY_TYPEDARRAY_INT8,\n    JERRY_TYPEDARRAY_UINT16,\n    JERRY_TYPEDARRAY_INT16,\n    JERRY_TYPEDARRAY_UINT32,\n    JERRY_TYPEDARRAY_INT32,\n    JERRY_TYPEDARRAY_FLOAT32,\n    JERRY_TYPEDARRAY_FLOAT64,\n    JERRY_TYPEDARRAY_BIGINT64,\n    JERRY_TYPEDARRAY_BIGUINT64,\n  };\n\n  /* Creating an TypedArray for a detached array buffer with a given length/offset is invalid */\n  {\n    uint8_t buf[1];\n    const uint32_t length = 1;\n    jerry_value_t arraybuffer = jerry_create_arraybuffer_external (length, buf, NULL);\n    TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n\n    jerry_value_t is_detachable = jerry_is_arraybuffer_detachable (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (is_detachable));\n    TEST_ASSERT (jerry_get_boolean_value (is_detachable));\n    jerry_release_value (is_detachable);\n\n    jerry_value_t res = jerry_detach_arraybuffer (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (res));\n    jerry_release_value (res);\n\n    for (size_t idx = 0; idx < (sizeof (types) / sizeof (types[0])); idx++)\n    {\n      jerry_value_t typedarray = jerry_create_typedarray_for_arraybuffer_sz (types[idx], arraybuffer, 0, 4);\n      TEST_ASSERT (jerry_value_is_error (typedarray));\n      TEST_ASSERT (jerry_get_error_type (typedarray) == JERRY_ERROR_TYPE);\n      jerry_release_value (typedarray);\n    }\n\n    jerry_release_value (arraybuffer);\n  }\n\n  /* Creating an TypedArray for a detached array buffer without length/offset is valid */\n  {\n    uint8_t buf[1];\n    const uint32_t length = 1;\n    jerry_value_t arraybuffer = jerry_create_arraybuffer_external (length, buf, NULL);\n    TEST_ASSERT (!jerry_value_is_error (arraybuffer));\n    TEST_ASSERT (jerry_value_is_arraybuffer (arraybuffer));\n    TEST_ASSERT (jerry_get_arraybuffer_byte_length (arraybuffer) == length);\n\n    jerry_value_t is_detachable = jerry_is_arraybuffer_detachable (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (is_detachable));\n    TEST_ASSERT (jerry_get_boolean_value (is_detachable));\n    jerry_release_value (is_detachable);\n\n    jerry_value_t res = jerry_detach_arraybuffer (arraybuffer);\n    TEST_ASSERT (!jerry_value_is_error (res));\n    jerry_release_value (res);\n\n    for (size_t idx = 0; idx < (sizeof (types) / sizeof (types[0])); idx++)\n    {\n      jerry_value_t typedarray = jerry_create_typedarray_for_arraybuffer (types[idx], arraybuffer);\n      TEST_ASSERT (jerry_value_is_error (typedarray));\n      TEST_ASSERT (jerry_get_error_type (typedarray) == JERRY_ERROR_TYPE);\n      jerry_release_value (typedarray);\n    }\n\n    jerry_release_value (arraybuffer);\n  }\n} /* test_detached_arraybuffer */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  if (!jerry_is_feature_enabled (JERRY_FEATURE_TYPEDARRAY))\n  {\n    jerry_port_log (JERRY_LOG_LEVEL_ERROR, \"TypedArray is disabled!\\n\");\n    jerry_cleanup ();\n    return 0;\n  }\n\n  jerry_value_t function_val = jerry_create_external_function (assert_handler);\n  register_js_value (\"assert\", function_val);\n  jerry_release_value (function_val);\n\n  test_entry_t test_entries[] =\n  {\n#define TEST_ENTRY(TYPE, CONSTRUCTOR, COUNT, BYTES_PER_ELEMENT) \\\n      { TYPE, CONSTRUCTOR, COUNT, BYTES_PER_ELEMENT }\n\n    TEST_ENTRY (JERRY_TYPEDARRAY_UINT8,        \"Uint8Array\",        12, 1),\n    TEST_ENTRY (JERRY_TYPEDARRAY_UINT8CLAMPED, \"Uint8ClampedArray\", 12, 1),\n    TEST_ENTRY (JERRY_TYPEDARRAY_INT8,         \"Int8Array\",         12, 1),\n    TEST_ENTRY (JERRY_TYPEDARRAY_UINT16,       \"Uint16Array\",       12, 2),\n    TEST_ENTRY (JERRY_TYPEDARRAY_INT16,        \"Int16Array\",        12, 2),\n    TEST_ENTRY (JERRY_TYPEDARRAY_UINT16,       \"Uint16Array\",       12, 2),\n    TEST_ENTRY (JERRY_TYPEDARRAY_INT32,        \"Int32Array\",        12, 4),\n    TEST_ENTRY (JERRY_TYPEDARRAY_UINT32,       \"Uint32Array\",       12, 4),\n    TEST_ENTRY (JERRY_TYPEDARRAY_FLOAT32,      \"Float32Array\",      12, 4),\n  /* TODO: add check if the float64 is supported */\n    TEST_ENTRY (JERRY_TYPEDARRAY_FLOAT64,      \"Float64Array\",      12, 8),\n    TEST_ENTRY (JERRY_TYPEDARRAY_BIGINT64,     \"BigInt64Array\",     12, 8),\n    TEST_ENTRY (JERRY_TYPEDARRAY_BIGUINT64,    \"BigUint64Array\",    12, 8),\n\n    TEST_ENTRY (JERRY_TYPEDARRAY_INVALID, NULL, 0, 0)\n#undef TEST_ENTRY\n  };\n\n  /* Test TypedArray queries */\n  test_typedarray_queries (test_entries);\n\n  /* Test TypedArray operations in js */\n  {\n    const uint32_t element_count = 14;\n\n    jerry_value_t array = jerry_create_typedarray (JERRY_TYPEDARRAY_UINT8, element_count);\n\n    {\n      uint8_t expected_value = 42;\n      JERRY_VLA (uint8_t, expected_data, element_count);\n      memset (expected_data, expected_value, element_count);\n\n      jerry_length_t byte_length;\n      jerry_length_t offset;\n      jerry_value_t buffer = jerry_get_typedarray_buffer (array, &offset, &byte_length);\n      TEST_ASSERT (byte_length == element_count);\n      jerry_length_t written = jerry_arraybuffer_write (buffer, offset, expected_data, element_count);\n      TEST_ASSERT (written == element_count);\n      jerry_release_value (buffer);\n\n      jerry_value_t js_element_count = jerry_create_number (element_count);\n      jerry_value_t js_expected_value = jerry_create_number (expected_value);\n\n      register_js_value (\"array\", array);\n      register_js_value (\"expected_length\", js_element_count);\n      register_js_value (\"expected_value\", js_expected_value);\n\n      jerry_release_value (js_element_count);\n      jerry_release_value (js_expected_value);\n    }\n\n    /* Check read and to write */\n    const jerry_char_t eval_src[] = TEST_STRING_LITERAL (\n      \"assert (array.length == expected_length, 'expected length: ' + expected_length + ' got: ' + array.length);\"\n      \"for (var i = 0; i < array.length; i++)\"\n      \"{\"\n      \"  assert (array[i] == expected_value);\"\n      \"  array[i] = i;\"\n      \"};\"\n    );\n    jerry_value_t result = jerry_eval (eval_src,\n                                       sizeof (eval_src) - 1,\n                                       JERRY_PARSE_STRICT_MODE);\n\n    TEST_ASSERT (!jerry_value_is_error (result));\n    jerry_release_value (result);\n\n    /* Check write results */\n    {\n      jerry_length_t byte_length;\n      jerry_length_t offset;\n      jerry_value_t buffer = jerry_get_typedarray_buffer (array, &offset, &byte_length);\n      TEST_ASSERT (byte_length == element_count);\n\n      JERRY_VLA (uint8_t, result_data, element_count);\n\n      jerry_length_t read_count = jerry_arraybuffer_read (buffer, offset, result_data, byte_length);\n      TEST_ASSERT (read_count == byte_length);\n\n      for (uint8_t i = 0; i < read_count; i++)\n      {\n        TEST_ASSERT (result_data[i] == i);\n      }\n\n      jerry_release_value (buffer);\n    }\n\n    jerry_release_value (array);\n  }\n\n  test_typedarray_complex_creation (test_entries, false);\n  test_typedarray_complex_creation (test_entries, true);\n\n  test_property_by_index (test_entries);\n\n  /* test invalid things */\n  {\n    jerry_value_t values[] =\n    {\n      jerry_create_number (11),\n      jerry_create_boolean (false),\n      jerry_create_string ((const jerry_char_t *) \"test\"),\n      jerry_create_object (),\n      jerry_create_null (),\n      jerry_create_arraybuffer (16),\n      jerry_create_error (JERRY_ERROR_TYPE, (const jerry_char_t *) \"error\"),\n      jerry_create_undefined (),\n      jerry_create_promise (),\n    };\n\n    for (size_t idx = 0; idx < sizeof (values) / sizeof (values[0]); idx++)\n    {\n      /* A non-TypedArray object should not be regarded a TypedArray. */\n      bool is_typedarray = jerry_value_is_typedarray (values[idx]);\n      TEST_ASSERT (is_typedarray == false);\n\n      /* JERRY_TYPEDARRAY_INVALID should be returned for non-TypedArray objects */\n      jerry_typedarray_type_t type = jerry_get_typedarray_type (values[idx]);\n      TEST_ASSERT (type == JERRY_TYPEDARRAY_INVALID);\n\n      /* Zero should be returned for non-TypedArray objects */\n      jerry_length_t length = jerry_get_typedarray_length (values[idx]);\n      TEST_ASSERT (length == 0);\n\n      /**\n       * Getting the ArrayBuffer from a non-TypedArray object(s) should return an error\n       * and should not modify the output parameter values.\n       */\n      {\n        jerry_length_t offset = 22;\n        jerry_length_t byte_count = 23;\n        jerry_value_t error = jerry_get_typedarray_buffer (values[idx], &offset, &byte_count);\n        TEST_ASSERT (jerry_value_is_error (error));\n        TEST_ASSERT (offset == 22);\n        TEST_ASSERT (byte_count == 23);\n        jerry_release_value (error);\n      }\n\n      /**\n       * Creating a TypedArray from a non-ArrayBuffer should result an error.\n       */\n      if (!jerry_value_is_arraybuffer (values[idx]))\n      {\n        jerry_value_t error = jerry_create_typedarray_for_arraybuffer (JERRY_TYPEDARRAY_UINT8, values[idx]);\n        TEST_ASSERT (jerry_value_is_error (error));\n        jerry_release_value (error);\n      }\n\n      jerry_release_value (values[idx]);\n    }\n  }\n\n  test_detached_arraybuffer ();\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-core/test-unicode.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n\nstatic bool\ntest_syntax_error (char *script_p) /**< script */\n{\n  jerry_value_t parse_result = jerry_parse (NULL,\n                                            0,\n                                            (const jerry_char_t *) script_p,\n                                            strlen (script_p),\n                                            JERRY_PARSE_NO_OPTS);\n\n  bool result = false;\n\n  if (jerry_value_is_error (parse_result))\n  {\n    result = true;\n    TEST_ASSERT (jerry_get_error_type (parse_result) == JERRY_ERROR_SYNTAX);\n  }\n\n  jerry_release_value (parse_result);\n  return result;\n} /* test_syntax_error */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  if (!test_syntax_error (\"\\\\u{61}\"))\n  {\n    TEST_ASSERT (!test_syntax_error (\"\\xF0\\x90\\xB2\\x80: break \\\\u{10C80}\"));\n    /* The \\u surrogate pairs are ignored. The \\u{hex} form must be used. */\n    TEST_ASSERT (test_syntax_error (\"\\xF0\\x90\\xB2\\x80: break \\\\ud803\\\\udc80\"));\n    /* The utf8 code point and the cesu8 surrogate pair must match. */\n    TEST_ASSERT (!test_syntax_error (\"\\xF0\\x90\\xB2\\x80: break \\xed\\xa0\\x83\\xed\\xb2\\x80\"));\n\n    TEST_ASSERT (!test_syntax_error (\"$\\xF0\\x90\\xB2\\x80$: break $\\\\u{10C80}$\"));\n    TEST_ASSERT (test_syntax_error (\"$\\xF0\\x90\\xB2\\x80$: break $\\\\ud803\\\\udc80$\"));\n    TEST_ASSERT (!test_syntax_error (\"$\\xF0\\x90\\xB2\\x80$: break $\\xed\\xa0\\x83\\xed\\xb2\\x80$\"));\n  }\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-doc/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nproject (unit-doc C)\nfind_package(PythonInterp REQUIRED)\n\nset(GEN_DOCTEST \"${CMAKE_SOURCE_DIR}/tools/gen-doctest.py\")\nset(DOC_FILES\n  \"${CMAKE_SOURCE_DIR}/docs/00.GETTING-STARTED.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/01.CONFIGURATION.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/02.API-REFERENCE.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/03.API-EXAMPLE.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/04.INTERNALS.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/05.PORT-API.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/06.REFERENCE-COUNTING.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/07.DEBUGGER.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/08.CODING-STANDARDS.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/09.EXT-REFERENCE-ARG.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/10.EXT-REFERENCE-HANDLER.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/11.EXT-REFERENCE-AUTORELEASE.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/12.EXT-REFERENCE-MODULE.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/13.DEBUGGER-TRANSPORT.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/14.EXT-REFERENCE-HANDLE-SCOPE.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/15.MODULE-SYSTEM.md\"\n  \"${CMAKE_SOURCE_DIR}/docs/16.MIGRATION-GUIDE.md\"\n)\n\nif(NOT (${CMAKE_C_COMPILER_ID} STREQUAL MSVC))\n  set(COMPILE_FLAGS_DOCTEST \"-Wno-unused-parameter -Wno-unused-function -Wno-unused-variable\")\nendif()\n\n\n# Dry run of the doctest generator: analyze MarkDown files and get the list of\n# file names that will be generated. This allows the definition of proper\n# dependencies between the MarkDown files and the generated sources.\nexecute_process(\n  COMMAND ${PYTHON_EXECUTABLE} ${GEN_DOCTEST} --dry -d ${CMAKE_CURRENT_BINARY_DIR} ${DOC_FILES}\n  OUTPUT_VARIABLE DOCTEST_OUTPUT\n  RESULT_VARIABLE GEN_DOCTEST_RESULT\n)\nif(NOT GEN_DOCTEST_RESULT EQUAL 0)\n  message(FATAL_ERROR \"failed to get doctest file list\")\nendif()\n\n# Process the output of the doctest generator: collect sources that must be\n# compiled, compiled+linked, or compiled+linked+executed into separate lists.\nset(DOCTEST_COMPILE \"\")\nset(DOCTEST_LINK \"\")\nset(DOCTEST_RUN \"\")\n\nstring(REPLACE \"\\n\" \";\" DOCTEST_LIST \"${DOCTEST_OUTPUT}\")\nforeach(DOCTEST_ELEMENT IN LISTS DOCTEST_LIST)\n  if(NOT (\"${DOCTEST_ELEMENT}\" STREQUAL \"\"))\n    separate_arguments(DOCTEST_ELEMENT)\n    list(GET DOCTEST_ELEMENT 0 DOCTEST_ACTION)\n    list(GET DOCTEST_ELEMENT 1 DOCTEST_NAME)\n    string(TOUPPER ${DOCTEST_ACTION} DOCTEST_ACTION)\n\n    set(DOCTEST_${DOCTEST_ACTION} ${DOCTEST_${DOCTEST_ACTION}} ${DOCTEST_NAME})\n  endif()\nendforeach()\n\n# Disable 02.API-REFERENCE-create-context.c on Windows, because there is no pthread on it.\nif(\"${PLATFORM}\" STREQUAL \"WINDOWS\")\n  list(REMOVE_ITEM DOCTEST_COMPILE ${CMAKE_CURRENT_BINARY_DIR}/02.API-REFERENCE-create-context.c)\nendif()\n\n# Disable 11.EXT-REFERENCE-AUTORELEASE.c if compiler is MSVC, because MSVC doesn't support cleanup attribute.\nif(USING_MSVC)\n  list(REMOVE_ITEM DOCTEST_COMPILE ${CMAKE_CURRENT_BINARY_DIR}/11.EXT-REFERENCE-AUTORELEASE.c)\nendif()\n\n# Add custom command to run doctest generator if any of the MarkDown sources\n# changes.\nadd_custom_command(\n  COMMAND ${PYTHON_EXECUTABLE} ${GEN_DOCTEST} -d ${CMAKE_CURRENT_BINARY_DIR} ${DOC_FILES}\n  DEPENDS ${GEN_DOCTEST} ${DOC_FILES}\n  OUTPUT ${DOCTEST_COMPILE} ${DOCTEST_LINK} ${DOCTEST_RUN}\n  COMMENT \"Generating doctests\"\n)\n\n# Add custom target to trigger the custom command above. Targets below can/must\n# depend on this one so that the custom command gets executed only once.\nadd_custom_target(all-doc-files DEPENDS ${DOCTEST_COMPILE} ${DOCTEST_LINK} ${DOCTEST_RUN})\n\n# Process compile-only doctests: add them to a dummy library\n# (named libcompile-doc-tests.a) to trigger compilation.\nif(NOT (\"${DOCTEST_COMPILE}\" STREQUAL \"\"))\n  add_library(compile-doc-tests ${DOCTEST_COMPILE})\n  add_dependencies(compile-doc-tests all-doc-files)\n  target_link_libraries(compile-doc-tests jerry-ext jerry-core jerry-port-default)\n  set_property(TARGET compile-doc-tests APPEND_STRING PROPERTY COMPILE_FLAGS \"${COMPILE_FLAGS_DOCTEST}\")\nendif()\n\nmacro(doctest_add_executables NAME_PREFIX)\n  foreach(DOCTEST_NAME ${ARGN})\n    get_filename_component(TARGET_NAME ${DOCTEST_NAME} NAME)\n    string(REGEX REPLACE \"\\\\.[^.]*$\" \"\" TARGET_NAME ${TARGET_NAME})\n    set(TARGET_NAME ${NAME_PREFIX}-${TARGET_NAME})\n\n    add_executable(${TARGET_NAME} ${DOCTEST_NAME})\n    add_dependencies(${TARGET_NAME} all-doc-files)\n    set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS \"${COMPILE_FLAGS_DOCTEST}\")\n    set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS \"${LINKER_FLAGS_COMMON}\")\n    set_property(TARGET ${TARGET_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/tests\")\n    target_link_libraries(${TARGET_NAME} jerry-ext jerry-core jerry-port-default)\n  endforeach()\nendmacro()\n\n# Process link-only doctests: create an executable from each (named link-doc-*)\ndoctest_add_executables(\"link-doc\" ${DOCTEST_LINK})\n\n# Process \"full-fledged\" doctests: create an executable from each (named\n# unit-doc-*). Their name prefix (unit-) ensures that the unit test runner\n# script will treat them like any other unit test, i.e., executed them.\ndoctest_add_executables(\"unit-doc\" ${DOCTEST_RUN})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nproject (unit-ext C)\n\nset(INCLUDE_UNIT_EXT ${CMAKE_CURRENT_SOURCE_DIR})\n\n# Unit tests main modules\nset(SOURCE_UNIT_TEST_EXT_MODULES\n  test-ext-arg.c\n  test-ext-autorelease.c\n  test-ext-handle-scope-escape.c\n  test-ext-handle-scope-handle-prelist-escape.c\n  test-ext-handle-scope-handle-prelist.c\n  test-ext-handle-scope-nested.c\n  test-ext-handle-scope-remove.c\n  test-ext-handle-scope-root.c\n  test-ext-handle-scope.c\n  test-ext-method-register.c\n  test-ext-module-canonical.c\n  test-ext-module-empty.c\n)\n\n# Disable test-ext-autorelease.c if compiler is MSVC, because MSVC doesn't support cleanup attribute.\nif(USING_MSVC)\n  list(REMOVE_ITEM SOURCE_UNIT_TEST_EXT_MODULES test-ext-autorelease.c)\nendif()\n\n# Unit tests declaration\nadd_custom_target(unittests-ext)\n\nforeach(SOURCE_UNIT_TEST_EXT ${SOURCE_UNIT_TEST_EXT_MODULES})\n  get_filename_component(TARGET_NAME ${SOURCE_UNIT_TEST_EXT} NAME_WE)\n  set(TARGET_NAME unit-${TARGET_NAME})\n\n  add_executable(${TARGET_NAME} ${SOURCE_UNIT_TEST_EXT})\n  set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS \"${LINKER_FLAGS_COMMON}\")\n  set_property(TARGET ${TARGET_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/tests\")\n\n  target_link_libraries(${TARGET_NAME} jerry-ext jerry-core jerry-port-default)\n\n  add_dependencies(unittests-ext ${TARGET_NAME})\nendforeach()\n\nset(UNIT_TEST_EXT_DIRS\n  module\n)\n\nforeach(UNIT_TEST_EXT_DIR ${UNIT_TEST_EXT_DIRS})\n  add_subdirectory(${UNIT_TEST_EXT_DIR})\nendforeach()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/module/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nset(JERRYX_MODULE_UNITTEST_NAME unit-test-jerry-module)\nproject (${JERRYX_MODULE_UNITTEST_NAME} C)\n\nset(JERRYX_MODULE_UNIT_TEST_SOURCES\n  jerry-module-test.c\n  my-broken-module.c\n  my-custom-module.c\n)\n\nif (FEATURE_INIT_FINI)\n  set(DEFINES_JERRYX_MODULE_UNITTEST ${DEFINES_JERRYX_MODULE_UNITTEST} ENABLE_INIT_FINI)\nendif()\n\nadd_executable(${JERRYX_MODULE_UNITTEST_NAME} ${JERRYX_MODULE_UNIT_TEST_SOURCES})\nset_property(TARGET ${JERRYX_MODULE_UNITTEST_NAME} PROPERTY LINK_FLAGS \"${LINKER_FLAGS_COMMON}\")\nset_property(TARGET ${JERRYX_MODULE_UNITTEST_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/tests\")\ntarget_link_libraries(${JERRYX_MODULE_UNITTEST_NAME} jerry-ext jerry-core jerry-port-default)\ntarget_include_directories(${JERRYX_MODULE_UNITTEST_NAME} PRIVATE ${INCLUDE_UNIT_EXT})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/module/jerry-module-test.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <string.h>\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n#include \"jerryscript-ext/module.h\"\n\n/* Load a module. */\nconst char eval_string1[] = \"require ('my_custom_module');\";\n\n/* Load a module using a different resolver. */\nconst char eval_string2[] = \"require ('differently-handled-module');\";\n\n/* Load a broken module using the built-in resolver. */\nconst char eval_string3[] =\n\"(function() {\"\n\"  var theError;\"\n\"  try {\"\n\"    require ('my_broken_module');\"\n\"  } catch (anError) {\"\n\"    theError = anError;\"\n\"  }\"\n\"  return (((theError.message === 'Module on_resolve () must not be NULL') &&\"\n\"    (theError.moduleName === 'my_broken_module') &&\"\n\"    (theError instanceof TypeError)) ? 1 : 0);\"\n\"}) ();\";\n\n/* Load a non-existent module. */\nconst char eval_string4[] =\n\"(function() {\"\n\"  var theError;\"\n\"  try {\"\n\"    require ('some_missing_module_xyzzy');\"\n\"  } catch (anError) {\"\n\"    theError = anError;\"\n\"  }\"\n\"  return (((theError.message === 'Module not found') &&\"\n\"    (theError.moduleName === 'some_missing_module_xyzzy')) ? 1 : 0);\"\n\"}) ();\";\n\n/* Make sure the result of a module load is cached. */\nconst char eval_string5[] =\n\"(function() {\"\n\"  var x = require('cache-check');\"\n\"  var y = require('cache-check');\"\n\"  return x === y ? 1 : 0;\"\n\"}) ();\";\n\n/* Make sure the result of a module load is removed from the cache. */\nconst char eval_string6[] =\n\"(function() {\"\n\"  var x = require('cache-check');\"\n\"  clear_require_cache('cache-check');\"\n\"  var y = require('cache-check');\"\n\"  return x !== y ? 1 : 0;\"\n\"}) ();\";\n\n/* Make sure the entire cache is cleared. */\nconst char eval_string7[] =\n\"(function() {\"\n\"  var x = require('cache-check');\"\n\"  clear_require_cache(undefined);\"\n\"  var y = require('cache-check');\"\n\"  return x !== y ? 1 : 0;\"\n\"}) ();\";\n\n/*\n * Define a resolver for a module named \"differently-handled-module\" to check that custom resolvers work.\n */\nstatic bool\nresolve_differently_handled_module (const jerry_value_t name,\n                                    jerry_value_t *result)\n{\n  jerry_size_t name_size = jerry_get_utf8_string_size (name);\n  JERRY_VLA (jerry_char_t, name_string, name_size);\n  jerry_string_to_utf8_char_buffer (name, name_string, name_size);\n\n  if (!strncmp ((char *) name_string, \"differently-handled-module\", name_size))\n  {\n    (*result) = jerry_create_number (29);\n    return true;\n  }\n  return false;\n} /* resolve_differently_handled_module */\n\nstatic jerryx_module_resolver_t differently_handled_module_resolver =\n{\n  NULL,\n  resolve_differently_handled_module\n};\n\n/*\n * Define module \"cache-check\" via its own resolver as an empty object. Since objects are accessible only via references\n * we can strictly compare the object returned on subsequent attempts at loading \"cache-check\" with the object returned\n * on the first attempt and establish that the two are in fact the same object - which in turn shows that caching works.\n */\nstatic bool\ncache_check (const jerry_value_t name,\n             jerry_value_t *result)\n{\n  jerry_size_t name_size = jerry_get_utf8_string_size (name);\n  JERRY_VLA (jerry_char_t, name_string, name_size);\n  jerry_string_to_utf8_char_buffer (name, name_string, name_size);\n\n  if (!strncmp ((char *) name_string, \"cache-check\", name_size))\n  {\n    (*result) = jerry_create_object ();\n    return true;\n  }\n  return false;\n} /* cache_check */\n\nstatic jerryx_module_resolver_t cache_check_resolver =\n{\n  NULL,\n  cache_check\n};\n\nstatic const jerryx_module_resolver_t *resolvers[3] =\n{\n  &jerryx_module_native_resolver,\n  &differently_handled_module_resolver,\n  &cache_check_resolver\n};\n\nstatic jerry_value_t\nhandle_clear_require_cache (const jerry_value_t js_function,\n                            const jerry_value_t this_val,\n                            const jerry_value_t args_p[],\n                            const jerry_length_t args_count)\n{\n  (void) js_function;\n  (void) this_val;\n  (void) args_count;\n\n  TEST_ASSERT (args_count == 1);\n  jerryx_module_clear_cache (args_p[0], resolvers, 3);\n\n  return 0;\n} /* handle_clear_require_cache */\n\nstatic jerry_value_t\nhandle_require (const jerry_value_t js_function,\n                const jerry_value_t this_val,\n                const jerry_value_t args_p[],\n                const jerry_length_t args_count)\n{\n  (void) js_function;\n  (void) this_val;\n  (void) args_count;\n\n  jerry_value_t return_value = 0;\n\n  TEST_ASSERT (args_count == 1);\n  return_value = jerryx_module_resolve (args_p[0], resolvers, 3);\n\n  return return_value;\n} /* handle_require */\n\nstatic void\nassert_number (jerry_value_t js_value, double expected_result)\n{\n  TEST_ASSERT (!jerry_value_is_error (js_value));\n  TEST_ASSERT (jerry_get_number_value (js_value) == expected_result);\n} /* assert_number */\n\nstatic void\neval_one (const char *the_string, double expected_result)\n{\n  jerry_value_t js_eval_result = jerry_eval ((const jerry_char_t *) the_string,\n                                             strlen (the_string),\n                                             JERRY_PARSE_STRICT_MODE);\n  assert_number (js_eval_result, expected_result);\n  jerry_release_value (js_eval_result);\n} /* eval_one */\n\n#ifndef ENABLE_INIT_FINI\nextern void my_broken_module_register (void);\nextern void my_custom_module_register (void);\n#endif /* !ENABLE_INIT_FINI */\n\nint\nmain (int argc, char **argv)\n{\n  (void) argc;\n  (void) argv;\n  jerry_value_t js_global = 0, js_function = 0, js_property_name = 0;\n  jerry_value_t res;\n\n#ifndef ENABLE_INIT_FINI\n  my_broken_module_register ();\n  my_custom_module_register ();\n#endif /* !ENABLE_INIT_FINI */\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  js_global = jerry_get_global_object ();\n\n  js_function = jerry_create_external_function (handle_require);\n  js_property_name = jerry_create_string ((const jerry_char_t *) \"require\");\n  res = jerry_set_property (js_global, js_property_name, js_function);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_boolean (res) && jerry_get_boolean_value (res));\n  jerry_release_value (res);\n  jerry_release_value (js_property_name);\n  jerry_release_value (js_function);\n\n  js_function = jerry_create_external_function (handle_clear_require_cache);\n  js_property_name = jerry_create_string ((const jerry_char_t *) \"clear_require_cache\");\n  res = jerry_set_property (js_global, js_property_name, js_function);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (jerry_value_is_boolean (res) && jerry_get_boolean_value (res));\n  jerry_release_value (res);\n  jerry_release_value (js_property_name);\n  jerry_release_value (js_function);\n\n  jerry_release_value (js_global);\n\n  eval_one (eval_string1, 42);\n  eval_one (eval_string2, 29);\n  eval_one (eval_string3, 1);\n  eval_one (eval_string4, 1);\n  eval_one (eval_string5, 1);\n  eval_one (eval_string6, 1);\n  eval_one (eval_string7, 1);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/module/my-broken-module.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/module.h\"\n\n#define MODULE_NAME my_broken_module\n\n/*\n * A broken module to test that the loader complains about the absence of on_resolve ()\n */\nJERRYX_NATIVE_MODULE (MODULE_NAME, NULL)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/module/my-custom-module.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/module.h\"\n\n#define MODULE_NAME my_custom_module\n\nstatic jerry_value_t\nmy_custom_module_on_resolve (void)\n{\n  return jerry_create_number (42);\n} /* my_custom_module_on_resolve */\n\nJERRYX_NATIVE_MODULE (MODULE_NAME, my_custom_module_on_resolve)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-common.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef TEST_COMMON_H\n#define TEST_COMMON_H\n\n#include \"jerryscript-port.h\"\n\n#define ARRAY_SIZE(array) ((unsigned long) (sizeof (array) / sizeof ((array)[0])))\n\n#define JERRY_UNUSED(x) ((void) (x))\n\n#define TEST_ASSERT(x) \\\n  do \\\n  { \\\n    if (!(x)) \\\n    { \\\n      jerry_port_log (JERRY_LOG_LEVEL_ERROR, \\\n                      \"TEST: Assertion '%s' failed at %s(%s):%lu.\\n\", \\\n                      #x, \\\n                      __FILE__, \\\n                      __func__, \\\n                      (unsigned long) __LINE__); \\\n      jerry_port_fatal (ERR_FAILED_INTERNAL_ASSERTION); \\\n    } \\\n  } while (0)\n\n#define TEST_STRING_LITERAL(x) x\n\n#endif /* !TEST_COMMON_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-arg.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/args.\n */\n\n#include <string.h>\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/arg.h\"\n#include \"test-common.h\"\n\nstatic const jerry_char_t test_source[] = TEST_STRING_LITERAL (\n  \"var arg1 = true;\"\n  \"var arg2 = 10.5;\"\n  \"var arg3 = 'abc';\"\n  \"var arg4 = function foo() {};\"\n  \"test_validator1(arg1, arg2, arg3, arg4);\"\n  \"arg1 = new Boolean(true);\"\n  \"arg3 = new String('abc');\"\n  \"test_validator1(arg1, arg2, arg3);\"\n  \"test_validator1(arg1, arg2, '');\"\n  \"arg2 = new Number(10.5);\"\n  \"test_validator1(arg1, arg2, arg3);\"\n  \"test_validator1(arg1, 10.5, 'abcdef');\"\n  \"test_validator3(arg1, arg1);\"\n  \"test_validator3(arg1);\"\n  \"test_validator3();\"\n  \"test_validator3(undefined, undefined);\"\n  \"var obj_a = new MyObjectA();\"\n  \"var obj_b = new MyObjectB();\"\n  \"test_validator2.call(obj_a, 5);\"\n  \"test_validator2.call(obj_b, 5);\"\n  \"test_validator2.call(obj_a, 1);\"\n  \"var obj1 = {prop1:true, prop2:'1.5'};\"\n  \"test_validator_prop1(obj1);\"\n  \"test_validator_prop2(obj1);\"\n  \"test_validator_prop2();\"\n  \"var obj2 = {prop1:true};\"\n  \"Object.defineProperty(obj2, 'prop2', {\"\n  \"  get: function() { throw new TypeError('prop2 error') }\"\n  \"});\"\n  \"test_validator_prop3(obj2);\"\n  \"test_validator_int1(-1000, 1000, 128, -1000, 1000, -127,\"\n  \"                    -1000, 4294967297, 65536, -2200000000, 4294967297, -2147483647);\"\n  \"test_validator_int2(-1.5, -1.5, -1.5, 1.5, 1.5, 1.5, Infinity, -Infinity, 300.5, 300.5);\"\n  \"test_validator_int3(NaN);\"\n  \"var arr = [1, 2];\"\n  \"test_validator_array1(arr);\"\n  \"test_validator_array1();\"\n  \"test_validator_array2(arr);\"\n  \"test_validator_restore(false, 3.0);\"\n  \"test_validator_restore(3.0, false);\"\n);\n\nstatic const jerry_object_native_info_t thing_a_info =\n{\n  .free_cb = NULL\n};\n\nstatic const jerry_object_native_info_t thing_b_info =\n{\n  .free_cb = NULL\n};\n\ntypedef struct\n{\n  int x;\n} my_type_a_t;\n\ntypedef struct\n{\n  bool x;\n} my_type_b_t;\n\nstatic my_type_a_t my_thing_a;\nstatic my_type_b_t my_thing_b;\n\nstatic int validator1_count = 0;\nstatic int validator2_count = 0;\nstatic int validator3_count = 0;\nstatic int validator_int_count = 0;\nstatic int validator_prop_count = 0;\nstatic int validator_array_count = 0;\nstatic int validator_restore_count = 0;\n\n/**\n * The handler should have following arguments:\n *   this: Ignore.\n *   arg1: Bool.\n *   arg2: Number. It must be strict primitive number.\n *   arg3: String.\n *   arg4: function. It is an optional argument.\n *\n */\nstatic jerry_value_t\ntest_validator1_handler (const jerry_value_t func_obj_val, /**< function object */\n                         const jerry_value_t this_val, /**< this value */\n                         const jerry_value_t args_p[], /**< arguments list */\n                         const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n\n  bool arg1;\n  double arg2 = 0.0;\n  char arg3[5] = \"1234\";\n  jerry_value_t arg4 = jerry_create_undefined ();\n\n  jerryx_arg_t mapping[] =\n  {\n    /* ignore this */\n    jerryx_arg_ignore (),\n    /* 1st argument should be boolean */\n    jerryx_arg_boolean (&arg1, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    /* 2nd argument should be strict number */\n    jerryx_arg_number (&arg2, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED),\n    /* 3th argument should be string */\n    jerryx_arg_string (arg3, 5, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    /* 4th argument should be function, and it is optional */\n    jerryx_arg_function (&arg4, JERRYX_ARG_OPTIONAL)\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_this_and_args (this_val,\n                                                            args_p,\n                                                            args_cnt,\n                                                            mapping,\n                                                            ARRAY_SIZE (mapping));\n\n  if (validator1_count == 0)\n  {\n    TEST_ASSERT (!jerry_value_is_error (is_ok));\n    TEST_ASSERT (arg1);\n    TEST_ASSERT (arg2 == 10.5);\n    TEST_ASSERT (strcmp (arg3, \"abc\") == 0);\n    TEST_ASSERT (jerry_value_is_function (arg4));\n  }\n  else if (validator1_count == 1)\n  {\n    TEST_ASSERT (!jerry_value_is_error (is_ok));\n    TEST_ASSERT (arg1);\n    TEST_ASSERT (arg2 == 10.5);\n    TEST_ASSERT (strcmp (arg3, \"abc\") == 0);\n    TEST_ASSERT (jerry_value_is_undefined (arg4));\n  }\n  else if (validator1_count == 2)\n  {\n    TEST_ASSERT (!jerry_value_is_error (is_ok));\n    TEST_ASSERT (arg1);\n    TEST_ASSERT (arg2 == 10.5);\n    TEST_ASSERT (strcmp (arg3, \"\") == 0);\n    TEST_ASSERT (jerry_value_is_undefined (arg4));\n  }\n  else\n  {\n    TEST_ASSERT (jerry_value_is_error (is_ok));\n  }\n\n  jerry_release_value (is_ok);\n  jerry_release_value (arg4);\n  validator1_count++;\n\n  return jerry_create_undefined ();\n} /* test_validator1_handler */\n\n/**\n * The JS argument should be number, whose value is equal with the extra_info .\n */\nstatic jerry_value_t\nmy_custom_transform (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */\n                     const jerryx_arg_t *c_arg_p) /**< the native arg */\n{\n  jerry_value_t js_arg = jerryx_arg_js_iterator_pop (js_arg_iter_p);\n  jerry_value_t to_number = jerry_value_to_number (js_arg);\n\n  if (jerry_value_is_error (to_number))\n  {\n    jerry_release_value (to_number);\n\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"It can not be converted to a number.\");\n  }\n\n  int expected_num = (int) c_arg_p->extra_info;\n  int get_num = (int) jerry_get_number_value (to_number);\n\n  if (get_num != expected_num)\n  {\n    return jerry_create_error (JERRY_ERROR_TYPE,\n                               (jerry_char_t *) \"Number value is not expected.\");\n  }\n\n  return jerry_create_undefined ();\n} /* my_custom_transform */\n\n/**\n * The handler should have following arguments:\n *   this: with native pointer whose type is bind_a_info.\n *   arg1: should pass the custom tranform function.\n */\nstatic jerry_value_t\ntest_validator2_handler (const jerry_value_t func_obj_val, /**< function object */\n                         const jerry_value_t this_val, /**< this value */\n                         const jerry_value_t args_p[], /**< arguments list */\n                         const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n\n  my_type_a_t *thing_p;\n\n  jerryx_arg_t mapping[] =\n  {\n    /* this should has native pointer, whose type is thing_a_info */\n    jerryx_arg_native_pointer ((void **) &thing_p, &thing_a_info, JERRYX_ARG_REQUIRED),\n    /* custom tranform function */\n    jerryx_arg_custom (NULL, 5, my_custom_transform)\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_this_and_args (this_val,\n                                                            args_p,\n                                                            args_cnt,\n                                                            mapping,\n                                                            ARRAY_SIZE (mapping));\n\n  if (validator2_count == 0)\n  {\n    TEST_ASSERT (!jerry_value_is_error (is_ok));\n    TEST_ASSERT (thing_p == &my_thing_a);\n    TEST_ASSERT (thing_p->x == 1);\n  }\n  else\n  {\n    TEST_ASSERT (jerry_value_is_error (is_ok));\n  }\n\n  jerry_release_value (is_ok);\n  validator2_count++;\n\n  return jerry_create_undefined ();\n} /* test_validator2_handler */\n\n/**\n * The handler should have following arguments:\n *   arg1: Bool. It is an optional argument.\n *\n */\nstatic jerry_value_t\ntest_validator3_handler (const jerry_value_t func_obj_val, /**< function object */\n                         const jerry_value_t this_val, /**< this value */\n                         const jerry_value_t args_p[], /**< arguments list */\n                         const jerry_length_t args_cnt) /**< arguments length */\n{\n\n  JERRY_UNUSED (func_obj_val);\n\n  bool arg1 = false;\n  bool arg2 = false;\n\n  jerryx_arg_t mapping[] =\n  {\n    /* ignore this */\n    jerryx_arg_ignore (),\n    /* 1th argument should be boolean, and it is optional */\n    jerryx_arg_boolean (&arg1, JERRYX_ARG_COERCE, JERRYX_ARG_OPTIONAL),\n    /* 2nd argument should be boolean, and it is optional */\n    jerryx_arg_boolean (&arg2, JERRYX_ARG_COERCE, JERRYX_ARG_OPTIONAL),\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_this_and_args (this_val,\n                                                            args_p,\n                                                            args_cnt,\n                                                            mapping,\n                                                            ARRAY_SIZE (mapping));\n\n  if (validator3_count == 0)\n  {\n    TEST_ASSERT (!jerry_value_is_error (is_ok));\n    TEST_ASSERT (arg1);\n    TEST_ASSERT (arg2);\n  }\n  else if (validator3_count == 1)\n  {\n    TEST_ASSERT (!jerry_value_is_error (is_ok));\n    TEST_ASSERT (arg1);\n    /* arg2 must be unchanged */\n    TEST_ASSERT (!arg2);\n  }\n  else if (validator3_count == 2)\n  {\n    TEST_ASSERT (!jerry_value_is_error (is_ok));\n    /* arg1 must be unchanged */\n    TEST_ASSERT (!arg1);\n    /* arg2 must be unchanged */\n    TEST_ASSERT (!arg2);\n  }\n  else if (validator3_count == 3)\n  {\n    TEST_ASSERT (!jerry_value_is_error (is_ok));\n    /* arg1 must be unchanged */\n    TEST_ASSERT (!arg1);\n    /* arg2 must be unchanged */\n    TEST_ASSERT (!arg2);\n  }\n\n  jerry_release_value (is_ok);\n  validator3_count++;\n\n  return jerry_create_undefined ();\n} /* test_validator3_handler */\n\n/**\n * Calling jerryx_arg_transform_object_properties directly.\n */\nstatic jerry_value_t\ntest_validator_prop1_handler (const jerry_value_t func_obj_val, /**< function object */\n                              const jerry_value_t this_val, /**< this value */\n                              const jerry_value_t args_p[], /**< arguments list */\n                              const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_cnt);\n\n  bool native1 = false;\n  double native2 = 0;\n  double native3 = 3;\n\n  const char *name_p[] = {\"prop1\", \"prop2\", \"prop3\"};\n\n  jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_boolean (&native1, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&native2, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&native3, JERRYX_ARG_COERCE, JERRYX_ARG_OPTIONAL)\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_object_properties (args_p[0],\n                                                                (const jerry_char_t **) name_p,\n                                                                ARRAY_SIZE (name_p),\n                                                                mapping,\n                                                                ARRAY_SIZE (mapping));\n\n  TEST_ASSERT (!jerry_value_is_error (is_ok));\n  TEST_ASSERT (native1);\n  TEST_ASSERT (native2 == 1.5);\n  TEST_ASSERT (native3 == 3);\n\n  validator_prop_count++;\n\n  return jerry_create_undefined ();\n} /* test_validator_prop1_handler */\n\n/**\n * Calling jerryx_arg_transform_object_properties indirectly by\n * using jerryx_arg_object_properties.\n */\nstatic jerry_value_t\ntest_validator_prop2_handler (const jerry_value_t func_obj_val, /**< function object */\n                              const jerry_value_t this_val, /**< this value */\n                              const jerry_value_t args_p[], /**< arguments list */\n                              const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  bool native1 = false;\n  double native2 = 0;\n  double native3 = 3;\n\n  jerryx_arg_object_props_t prop_info;\n\n  const char *name_p[] = { \"prop1\", \"prop2\", \"prop3\" };\n\n  jerryx_arg_t prop_mapping[] =\n  {\n    jerryx_arg_boolean (&native1, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&native2, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&native3, JERRYX_ARG_COERCE, JERRYX_ARG_OPTIONAL)\n  };\n\n  prop_info.name_p = (const jerry_char_t **) name_p;\n  prop_info.name_cnt = 3;\n  prop_info.c_arg_p = prop_mapping;\n  prop_info.c_arg_cnt = 3;\n\n  jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_object_properties (&prop_info, JERRYX_ARG_OPTIONAL),\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_args (args_p, args_cnt, mapping, ARRAY_SIZE (mapping));\n\n  TEST_ASSERT (!jerry_value_is_error (is_ok));\n\n  if (validator_prop_count == 1)\n  {\n    TEST_ASSERT (native1);\n    TEST_ASSERT (native2 == 1.5);\n    TEST_ASSERT (native3 == 3);\n  }\n\n  validator_prop_count++;\n\n  return jerry_create_undefined ();\n} /* test_validator_prop2_handler */\n\nstatic jerry_value_t\ntest_validator_prop3_handler (const jerry_value_t func_obj_val, /**< function object */\n                              const jerry_value_t this_val, /**< this value */\n                              const jerry_value_t args_p[], /**< arguments list */\n                              const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_cnt);\n\n  bool native1 = false;\n  bool native2 = true;\n\n  const char *name_p[] = { \"prop1\", \"prop2\" };\n\n  jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_boolean (&native1, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_boolean (&native2, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_object_properties (args_p[0],\n                                                                (const jerry_char_t **) name_p,\n                                                                ARRAY_SIZE (name_p),\n                                                                mapping,\n                                                                ARRAY_SIZE (mapping));\n\n  TEST_ASSERT (jerry_value_is_error (is_ok));\n  TEST_ASSERT (!native1);\n  TEST_ASSERT (native2);\n\n  validator_prop_count++;\n  jerry_release_value (is_ok);\n\n  return jerry_create_undefined ();\n} /* test_validator_prop3_handler */\n\n/*\n * args_p[0-2] are uint8, args_p[3-5] are int8, args_p[6-8] are uint32, args_p[9-11] are int32.\n */\nstatic jerry_value_t\ntest_validator_int1_handler (const jerry_value_t func_obj_val, /**< function object */\n                             const jerry_value_t this_val, /**< this value */\n                             const jerry_value_t args_p[], /**< arguments list */\n                             const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  uint8_t num0, num1, num2;\n  int8_t num3, num4, num5;\n  uint32_t num6, num7, num8;\n  int32_t num9, num10, num11;\n\n  jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_uint8 (&num0, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_uint8 (&num1, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_uint8 (&num2, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num3, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num4, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num5, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_uint32 (&num6, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_uint32 (&num7, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_uint32 (&num8, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int32 (&num9, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int32 (&num10, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int32 (&num11, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED)\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_args (args_p,\n                                                   args_cnt,\n                                                   mapping,\n                                                   ARRAY_SIZE (mapping));\n\n  TEST_ASSERT (!jerry_value_is_error (is_ok));\n  TEST_ASSERT (num0 == 0);\n  TEST_ASSERT (num1 == 255);\n  TEST_ASSERT (num2 == 128);\n  TEST_ASSERT (num3 == -128);\n  TEST_ASSERT (num4 == 127);\n  TEST_ASSERT (num5 == -127);\n  TEST_ASSERT (num6 == 0);\n  TEST_ASSERT (num7 == 4294967295);\n  TEST_ASSERT (num8 == 65536);\n  TEST_ASSERT (num9 == -2147483648);\n  TEST_ASSERT (num10 == 2147483647);\n  TEST_ASSERT (num11 == -2147483647);\n\n  jerry_release_value (is_ok);\n  validator_int_count++;\n\n  return jerry_create_undefined ();\n} /* test_validator_int1_handler */\n\nstatic jerry_value_t\ntest_validator_int2_handler (const jerry_value_t func_obj_val, /**< function object */\n                             const jerry_value_t this_val, /**< this value */\n                             const jerry_value_t args_p[], /**< arguments list */\n                             const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  int8_t num0, num1, num2, num3, num4, num5, num6, num7, num8, num9;\n  num8 = 123;\n  num9 = 123;\n\n  jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_int8 (&num0, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num1, JERRYX_ARG_FLOOR, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num2, JERRYX_ARG_CEIL, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num3, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num4, JERRYX_ARG_FLOOR, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num5, JERRYX_ARG_CEIL, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num6, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num7, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num8, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_int8 (&num9, JERRYX_ARG_ROUND, JERRYX_ARG_NO_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_args (args_p,\n                                                   args_cnt,\n                                                   mapping,\n                                                   ARRAY_SIZE (mapping));\n\n  TEST_ASSERT (jerry_value_is_error (is_ok));\n  TEST_ASSERT (num0 == -2);\n  TEST_ASSERT (num1 == -2);\n  TEST_ASSERT (num2 == -1);\n  TEST_ASSERT (num3 == 2);\n  TEST_ASSERT (num4 == 1);\n  TEST_ASSERT (num5 == 2);\n  TEST_ASSERT (num6 == 127);\n  TEST_ASSERT (num7 == -128);\n  TEST_ASSERT (num8 == 127);\n  TEST_ASSERT (num9 == 123);\n\n  jerry_release_value (is_ok);\n  validator_int_count++;\n\n  return jerry_create_undefined ();\n} /* test_validator_int2_handler */\n\nstatic jerry_value_t\ntest_validator_int3_handler (const jerry_value_t func_obj_val, /**< function object */\n                             const jerry_value_t this_val, /**< this value */\n                             const jerry_value_t args_p[], /**< arguments list */\n                             const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  int8_t num0;\n\n  jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_int8 (&num0, JERRYX_ARG_ROUND, JERRYX_ARG_CLAMP, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_args (args_p,\n                                                   args_cnt,\n                                                   mapping,\n                                                   ARRAY_SIZE (mapping));\n\n  TEST_ASSERT (jerry_value_is_error (is_ok));\n\n  jerry_release_value (is_ok);\n  validator_int_count++;\n\n  return jerry_create_undefined ();\n} /* test_validator_int3_handler */\n\nstatic jerry_value_t\ntest_validator_array1_handler (const jerry_value_t func_obj_val, /**< function object */\n                               const jerry_value_t this_val, /**< this value */\n                               const jerry_value_t args_p[], /**< arguments list */\n                               const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  double native1 = 0;\n  double native2 = 0;\n  double native3 = 0;\n\n  jerryx_arg_array_items_t arr_info;\n\n  jerryx_arg_t item_mapping[] =\n  {\n    jerryx_arg_number (&native1, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&native2, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_number (&native3, JERRYX_ARG_COERCE, JERRYX_ARG_OPTIONAL)\n  };\n\n  arr_info.c_arg_p = item_mapping;\n  arr_info.c_arg_cnt = 3;\n\n  jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_array (&arr_info, JERRYX_ARG_OPTIONAL),\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_args (args_p, args_cnt, mapping, ARRAY_SIZE (mapping));\n\n  TEST_ASSERT (!jerry_value_is_error (is_ok));\n\n  if (validator_array_count == 0)\n  {\n    TEST_ASSERT (native1 == 1);\n    TEST_ASSERT (native2 == 2);\n    TEST_ASSERT (native3 == 0);\n  }\n\n  validator_array_count++;\n\n  return jerry_create_undefined ();\n} /* test_validator_array1_handler */\n\nstatic jerry_value_t\ntest_validator_array2_handler (const jerry_value_t func_obj_val, /**< function object */\n                               const jerry_value_t this_val, /**< this value */\n                               const jerry_value_t args_p[], /**< arguments list */\n                               const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n  JERRY_UNUSED (args_cnt);\n\n  double native1 = 0;\n  bool native2 = false;\n\n  jerryx_arg_t item_mapping[] =\n  {\n    jerryx_arg_number (&native1, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n    jerryx_arg_boolean (&native2, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED)\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_array (args_p[0], item_mapping, ARRAY_SIZE (item_mapping));\n\n  TEST_ASSERT (jerry_value_is_error (is_ok));\n  TEST_ASSERT (native1 == 1);\n  TEST_ASSERT (!native2);\n\n  validator_array_count++;\n  jerry_release_value (is_ok);\n\n  return jerry_create_undefined ();\n} /* test_validator_array2_handler */\n\n/**\n * This validator is designed to test the\n * jerryx_arg_js_iterator_restore function.  We'll introduce a union\n * type to hold a bool or double and a transform function that will\n * look for this type.  Then, we'll call the handler with two\n * parameters, one bool and one double and see if we correctly build\n * the union types for each parameter.  To check that the code protects\n * against backing up too far, when the check for the double fails,\n * we'll \"restore\" the stack three times; this shouldn't break\n * anything.\n*/\n/*\n * This enumeration type specifies the kind of thing held in the union.\n*/\ntypedef enum\n{\n  DOUBLE_VALUE,\n  BOOL_VALUE\n} union_type_t;\n\n/*\n * This struct holds either a boolean or double in a union and has a\n * second field that describes the type held in the union.\n*/\ntypedef struct\n{\n  union_type_t type_of_value;\n  union\n  {\n    double double_field;\n    bool bool_field;\n  } value;\n} double_or_bool_t;\n\n/**\n * This creates a jerryx_arg_t that can be used like any\n * of the installed functions, like jerryx_arg_bool().\n */\n#define jerryx_arg_double_or_bool_t(value_ptr, coerce_or_not, optional_or_not, last_parameter) \\\n        jerryx_arg_custom (value_ptr, \\\n                           (uintptr_t)&((uintptr_t []){(uintptr_t)coerce_or_not, \\\n                                                       (uintptr_t)optional_or_not, \\\n                                                       (uintptr_t)last_parameter}), \\\n                           jerry_arg_to_double_or_bool_t)\n/*\n * This function is the argument validator used in the above macro called\n * jerryx_arg_double_or_bool. It calls jerryx_arg_js_iterator_restore()\n * more times than it should to ensure that calling that function too\n * often doesn't cause an error.\n*/\nstatic jerry_value_t\njerry_arg_to_double_or_bool_t (jerryx_arg_js_iterator_t *js_arg_iter_p,\n                             const jerryx_arg_t *c_arg_p)\n{\n  /* c_arg_p has two fields: dest, which is a pointer to the data that\n   * gets filled in, and extra_info, which contains the flags used to\n   * control coercion and optional-ness, respectively. For this test,\n   * we added an extra flag that tells us that we're working on the\n   * last parameter; when we know it's the last parameter, we'll \"restore\"\n   * the stack more times than there are actual stack values to ensure\n   * that the restore function doesn't produce an error. */\n  double_or_bool_t *destination = c_arg_p->dest;\n  uintptr_t *extra_info = (uintptr_t *) (c_arg_p->extra_info);\n  jerryx_arg_t conversion_function;\n  jerry_value_t conversion_result;\n  jerry_value_t restore_result;\n  bool last_parameter = (extra_info[2] == 1);\n\n  validator_restore_count++;\n\n  conversion_function = jerryx_arg_number ((double *) (&(destination->value.double_field)),\n                                           (jerryx_arg_coerce_t) extra_info[0],\n                                           JERRYX_ARG_OPTIONAL);\n  conversion_result = conversion_function.func (js_arg_iter_p, &conversion_function);\n  if (!jerry_value_is_error (conversion_result))\n  {\n    if (last_parameter)\n    {\n      /* The stack is only two parameters high, but we want to ensure that\n       * excessive calls will not result in aberrant behavior... */\n      jerryx_arg_js_iterator_restore (js_arg_iter_p);\n      jerryx_arg_js_iterator_restore (js_arg_iter_p);\n      jerryx_arg_js_iterator_restore (js_arg_iter_p);\n      restore_result = jerryx_arg_js_iterator_restore (js_arg_iter_p);\n      TEST_ASSERT (jerry_value_is_undefined (restore_result));\n    }\n\n    destination->type_of_value = DOUBLE_VALUE;\n    return conversion_result;\n  }\n\n  jerryx_arg_js_iterator_restore (js_arg_iter_p);\n\n  conversion_function = jerryx_arg_boolean ((bool *) (&(destination->value.bool_field)),\n                                            (jerryx_arg_coerce_t) extra_info[0],\n                                            (jerryx_arg_optional_t) extra_info[1]);\n\n  jerry_release_value (conversion_result);\n  conversion_result = conversion_function.func (js_arg_iter_p, &conversion_function);\n  if (!jerry_value_is_error (conversion_result))\n  {\n    if (last_parameter)\n    {\n      /* The stack is only two parameters high, but we want to ensure that\n       * excessive calls will not result in aberrant behavior... */\n      jerryx_arg_js_iterator_restore (js_arg_iter_p);\n      jerryx_arg_js_iterator_restore (js_arg_iter_p);\n      jerryx_arg_js_iterator_restore (js_arg_iter_p);\n      restore_result = jerryx_arg_js_iterator_restore (js_arg_iter_p);\n      TEST_ASSERT (jerry_value_is_undefined (restore_result));\n    }\n\n    destination->type_of_value = BOOL_VALUE;\n    return conversion_result;\n  }\n\n  /* Fall through indicates that whatever they gave us, it wasn't\n   * one of the types we were expecting... */\n  jerry_release_value (conversion_result);\n  return jerry_create_error (JERRY_ERROR_TYPE,\n                             (const jerry_char_t *) \"double_or_bool-type error.\");\n} /* jerry_arg_to_double_or_bool_t */\n\n/**\n * This validator expects two parameters, one a bool and one a double -- the\n * order doesn't matter (so we'll call it twice with the orders reversed).\n*/\nstatic jerry_value_t\ntest_validator_restore_handler (const jerry_value_t func_obj_val, /**< function object */\n                                const jerry_value_t this_val, /**< this value */\n                                const jerry_value_t args_p[], /**< arguments list */\n                                const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (this_val);\n\n  double_or_bool_t arg1;\n  double_or_bool_t arg2;\n\n  jerryx_arg_t item_mapping[] =\n  {\n    jerryx_arg_double_or_bool_t (&arg1, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED, 0),\n    jerryx_arg_double_or_bool_t (&arg2, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED, 1)\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_args (args_p, args_cnt, item_mapping, ARRAY_SIZE (item_mapping));\n\n  TEST_ASSERT (!jerry_value_is_error (is_ok));\n\n  /* We are going to call this with [false, 3.0] and [3.0, false] parameters... */\n  bool arg1_is_false = (arg1.type_of_value == BOOL_VALUE && arg1.value.bool_field == false);\n  bool arg1_is_three = (arg1.type_of_value == DOUBLE_VALUE && arg1.value.double_field == 3.0);\n  bool arg2_is_false = (arg2.type_of_value == BOOL_VALUE && arg2.value.bool_field == false);\n  bool arg2_is_three = (arg2.type_of_value == DOUBLE_VALUE && arg2.value.double_field == 3.0);\n  TEST_ASSERT ((arg1_is_false && arg2_is_three) || (arg1_is_three && arg2_is_false));\n\n  jerry_release_value (is_ok);\n\n  return jerry_create_undefined ();\n} /* test_validator_restore_handler */\n\nstatic void\ntest_utf8_string (void)\n{\n  /* test string: 'str: {DESERET CAPITAL LETTER LONG I}' */\n  jerry_value_t str = jerry_create_string ((jerry_char_t *) \"\\x73\\x74\\x72\\x3a \\xed\\xa0\\x81\\xed\\xb0\\x80\");\n  char expect_utf8_buf[] = \"\\x73\\x74\\x72\\x3a \\xf0\\x90\\x90\\x80\";\n  size_t buf_len = sizeof (expect_utf8_buf) - 1;\n  JERRY_VLA (char, buf, buf_len + 1);\n\n  jerryx_arg_t mapping[] =\n  {\n    jerryx_arg_utf8_string (buf, (uint32_t) buf_len + 1, JERRYX_ARG_COERCE, JERRYX_ARG_REQUIRED),\n  };\n\n  jerry_value_t is_ok = jerryx_arg_transform_args (&str,\n                                                   1,\n                                                   mapping,\n                                                   ARRAY_SIZE (mapping));\n\n  TEST_ASSERT (!jerry_value_is_error (is_ok));\n  TEST_ASSERT (!strcmp (buf, expect_utf8_buf));\n\n  jerry_release_value (str);\n} /* test_utf8_string */\n\nstatic jerry_value_t\ncreate_object_a_handler (const jerry_value_t func_obj_val, /**< function object */\n                         const jerry_value_t this_val, /**< this value */\n                         const jerry_value_t args_p[], /**< arguments list */\n                         const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (args_p);\n  JERRY_UNUSED (args_cnt);\n\n  TEST_ASSERT (jerry_value_is_object (this_val));\n\n  my_thing_a.x = 1;\n  jerry_set_object_native_pointer (this_val,\n                                   &my_thing_a,\n                                   &thing_a_info);\n\n  return jerry_create_boolean (true);\n} /* create_object_a_handler */\n\nstatic jerry_value_t\ncreate_object_b_handler (const jerry_value_t func_obj_val, /**< function object */\n                         const jerry_value_t this_val, /**< this value */\n                         const jerry_value_t args_p[], /**< arguments list */\n                         const jerry_length_t args_cnt) /**< arguments length */\n{\n  JERRY_UNUSED (func_obj_val);\n  JERRY_UNUSED (args_p);\n  JERRY_UNUSED (args_cnt);\n\n  TEST_ASSERT (jerry_value_is_object (this_val));\n\n  my_thing_b.x = false;\n  jerry_set_object_native_pointer (this_val,\n                                   &my_thing_b,\n                                   &thing_b_info);\n\n  return jerry_create_boolean (true);\n} /* create_object_b_handler */\n\n/**\n * Register a JavaScript function in the global object.\n */\nstatic void\nregister_js_function (const char *name_p, /**< name of the function */\n                      jerry_external_handler_t handler_p) /**< function callback */\n{\n  jerry_value_t global_obj_val = jerry_get_global_object ();\n\n  jerry_value_t function_val = jerry_create_external_function (handler_p);\n  jerry_value_t function_name_val = jerry_create_string ((const jerry_char_t *) name_p);\n  jerry_value_t result_val = jerry_set_property (global_obj_val, function_name_val, function_val);\n\n  jerry_release_value (function_name_val);\n  jerry_release_value (function_val);\n  jerry_release_value (global_obj_val);\n\n  jerry_release_value (result_val);\n} /* register_js_function */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  test_utf8_string ();\n\n  register_js_function (\"test_validator1\", test_validator1_handler);\n  register_js_function (\"test_validator2\", test_validator2_handler);\n  register_js_function (\"test_validator3\", test_validator3_handler);\n  register_js_function (\"test_validator_int1\", test_validator_int1_handler);\n  register_js_function (\"test_validator_int2\", test_validator_int2_handler);\n  register_js_function (\"test_validator_int3\", test_validator_int3_handler);\n  register_js_function (\"MyObjectA\", create_object_a_handler);\n  register_js_function (\"MyObjectB\", create_object_b_handler);\n  register_js_function (\"test_validator_prop1\", test_validator_prop1_handler);\n  register_js_function (\"test_validator_prop2\", test_validator_prop2_handler);\n  register_js_function (\"test_validator_prop3\", test_validator_prop3_handler);\n  register_js_function (\"test_validator_array1\", test_validator_array1_handler);\n  register_js_function (\"test_validator_array2\", test_validator_array2_handler);\n  register_js_function (\"test_validator_restore\", test_validator_restore_handler);\n\n  jerry_value_t parsed_code_val = jerry_parse (NULL,\n                                               0,\n                                               test_source,\n                                               sizeof (test_source) - 1,\n                                               JERRY_PARSE_NO_OPTS);\n  TEST_ASSERT (!jerry_value_is_error (parsed_code_val));\n\n  jerry_value_t res = jerry_run (parsed_code_val);\n  TEST_ASSERT (!jerry_value_is_error (res));\n  TEST_ASSERT (validator1_count == 5);\n  TEST_ASSERT (validator2_count == 3);\n  TEST_ASSERT (validator_prop_count == 4);\n  TEST_ASSERT (validator_int_count == 3);\n  TEST_ASSERT (validator_array_count == 3);\n  TEST_ASSERT (validator_restore_count == 4);\n\n  jerry_release_value (res);\n  jerry_release_value (parsed_code_val);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-autorelease.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/autorelease.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/autorelease.h\"\n#include \"test-common.h\"\n\nstatic int native_free_cb_call_count;\n\nstatic void\nnative_free_cb (void *native_p)\n{\n  ++native_free_cb_call_count;\n  (void) native_p;\n} /* native_free_cb */\n\nstatic const jerry_object_native_info_t native_info =\n{\n  .free_cb = native_free_cb,\n};\n\nstatic jerry_value_t\ncreate_object (void)\n{\n  jerry_value_t obj = jerry_create_object ();\n  jerry_set_object_native_pointer (obj, NULL, &native_info);\n  return obj;\n} /* create_object */\n\nstatic void\ntest_autorelease_val (void)\n{\n  JERRYX_AR_VALUE_T obj = create_object ();\n  (void) obj;\n} /* test_autorelease_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  native_free_cb_call_count = 0;\n  test_autorelease_val ();\n  jerry_gc (JERRY_GC_PRESSURE_HIGH);\n  TEST_ASSERT (native_free_cb_call_count == 1);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-handle-scope-escape.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/handle-scope.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n#include \"test-common.h\"\n\nstatic int native_free_cb_call_count;\n\nstatic void\nnative_free_cb (void *native_p)\n{\n  ++native_free_cb_call_count;\n  (void) native_p;\n} /* native_free_cb */\n\nstatic const jerry_object_native_info_t native_info =\n{\n  .free_cb = native_free_cb,\n};\n\nstatic jerry_value_t\ncreate_object (void)\n{\n  jerryx_escapable_handle_scope scope;\n  jerryx_open_escapable_handle_scope (&scope);\n  jerry_value_t obj = jerryx_create_handle (jerry_create_object ());\n  jerry_set_object_native_pointer (obj, NULL, &native_info);\n\n  // If leaves `escaped` uninitialized, there will be a style error on linux thrown by compiler\n  jerry_value_t escaped = 0;\n  jerryx_escape_handle (scope, obj, &escaped);\n  TEST_ASSERT (scope->prelist_handle_count == 0);\n  TEST_ASSERT (scope->handle_ptr == NULL);\n\n  jerryx_close_handle_scope (scope);\n  return escaped;\n} /* create_object */\n\nstatic void\ntest_handle_scope_val (void)\n{\n  jerryx_handle_scope scope;\n  jerryx_open_handle_scope (&scope);\n  jerry_value_t obj = create_object ();\n  (void) obj;\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == 0);\n\n  jerryx_close_handle_scope (scope);\n} /* test_handle_scope_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  native_free_cb_call_count = 0;\n  test_handle_scope_val ();\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == 1);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-handle-scope-handle-prelist-escape.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/handle-scope-handle-prelist-escape.\n *\n * Tests escaping jerry value that holds on scope's prelist.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n#include \"test-common.h\"\n\nstatic size_t native_free_cb_call_count;\nstatic const size_t handle_count = JERRYX_HANDLE_PRELIST_SIZE + 1;\n\nstatic void\nnative_free_cb (void *native_p)\n{\n  ++native_free_cb_call_count;\n  (void) native_p;\n} /* native_free_cb */\n\nstatic const jerry_object_native_info_t native_info =\n{\n  .free_cb = native_free_cb,\n};\n\nstatic jerry_value_t\ncreate_object (void)\n{\n  jerryx_escapable_handle_scope scope;\n  jerryx_open_escapable_handle_scope (&scope);\n\n  jerry_value_t obj;\n  for (size_t idx = 0; idx < handle_count; idx ++)\n  {\n    obj = jerryx_create_handle (jerry_create_object ());\n    jerry_set_object_native_pointer (obj, NULL, &native_info);\n  }\n\n  // If leaves `escaped` uninitialized, there will be a style error on linux thrown by compiler\n  jerry_value_t escaped = 0;\n  jerryx_escape_handle (scope, obj, &escaped);\n  TEST_ASSERT (scope->prelist_handle_count == JERRYX_HANDLE_PRELIST_SIZE);\n\n  jerryx_close_handle_scope (scope);\n  return escaped;\n} /* create_object */\n\nstatic void\ntest_handle_scope_val (void)\n{\n  jerryx_handle_scope scope;\n  jerryx_open_handle_scope (&scope);\n  jerry_value_t obj = create_object ();\n  (void) obj;\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == (handle_count -1));\n\n  jerryx_close_handle_scope (scope);\n} /* test_handle_scope_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  native_free_cb_call_count = 0;\n  test_handle_scope_val ();\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == handle_count);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-handle-scope-handle-prelist.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/handle-scope-handle-prelist.\n *\n * Tests escaping jerry value that holds on scope's handle heap.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n#include \"test-common.h\"\n\nstatic size_t native_free_cb_call_count;\nstatic const size_t handle_count = JERRYX_HANDLE_PRELIST_SIZE * 2;\n\nstatic void\nnative_free_cb (void *native_p)\n{\n  ++native_free_cb_call_count;\n  (void) native_p;\n} /* native_free_cb */\n\nstatic const jerry_object_native_info_t native_info =\n{\n  .free_cb = native_free_cb,\n};\n\nstatic jerry_value_t\ncreate_object (void)\n{\n  jerryx_escapable_handle_scope scope;\n  jerryx_open_escapable_handle_scope (&scope);\n\n  jerry_value_t obj;\n  for (size_t idx = 0; idx < handle_count; idx ++)\n  {\n    obj = jerryx_create_handle (jerry_create_object ());\n    jerry_set_object_native_pointer (obj, NULL, &native_info);\n  }\n\n  // If leaves `escaped` uninitialized, there will be a style error on linux thrown by compiler\n  jerry_value_t escaped = 0;\n  jerryx_escape_handle (scope, obj, &escaped);\n  TEST_ASSERT (scope->prelist_handle_count == JERRYX_HANDLE_PRELIST_SIZE);\n\n  jerryx_close_handle_scope (scope);\n  return escaped;\n} /* create_object */\n\nstatic void\ntest_handle_scope_val (void)\n{\n  jerryx_handle_scope scope;\n  jerryx_open_handle_scope (&scope);\n  jerry_value_t obj = create_object ();\n  (void) obj;\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == (handle_count -1));\n\n  jerryx_close_handle_scope (scope);\n} /* test_handle_scope_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  native_free_cb_call_count = 0;\n  test_handle_scope_val ();\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == handle_count);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-handle-scope-nested.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/handle-scope.\n *\n * Tests escaping jerry value that passed from scopes which are created on heap.\n * Also reallocates scopes for one times to test if reallocation works.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n#include \"test-common.h\"\n\nstatic int native_free_cb_call_count;\n\nstatic void\nnative_free_cb (void *native_p)\n{\n  ++native_free_cb_call_count;\n  (void) native_p;\n} /* native_free_cb */\n\nstatic const jerry_object_native_info_t native_info =\n{\n  .free_cb = native_free_cb,\n};\n\nstatic jerry_value_t\ncreate_object_nested (int times)\n{\n  jerryx_escapable_handle_scope scope;\n  jerryx_open_escapable_handle_scope (&scope);\n\n  jerry_value_t obj;\n  if (times == 0)\n  {\n    obj = jerryx_create_handle (jerry_create_object ());\n    jerry_set_object_native_pointer (obj, NULL, &native_info);\n  }\n  else\n  {\n    obj = create_object_nested (times - 1);\n  }\n  TEST_ASSERT (jerryx_handle_scope_get_current () == scope);\n\n  // If leaves `escaped` uninitialized, there will be a style error on linux thrown by compiler\n  jerry_value_t escaped = 0;\n  jerryx_handle_scope_status status = jerryx_escape_handle (scope, obj, &escaped);\n  TEST_ASSERT (status == jerryx_handle_scope_ok);\n  TEST_ASSERT (scope->prelist_handle_count == 0);\n  TEST_ASSERT (scope->handle_ptr == NULL);\n\n  jerryx_close_handle_scope (scope);\n  return escaped;\n} /* create_object_nested */\n\nstatic void\ntest_handle_scope_val (void)\n{\n  jerryx_handle_scope scope;\n  jerryx_open_handle_scope (&scope);\n\n  for (int idx = 0; idx < 2; ++idx)\n  {\n    jerry_value_t obj = create_object_nested (JERRYX_SCOPE_PRELIST_SIZE * 2);\n    (void) obj;\n  }\n\n  TEST_ASSERT (jerryx_handle_scope_get_current () == scope);\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == 0);\n\n  jerryx_close_handle_scope (scope);\n} /* test_handle_scope_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  native_free_cb_call_count = 0;\n  test_handle_scope_val ();\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == 2);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-handle-scope-remove.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/handle-scope.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n#include \"test-common.h\"\n\nstatic int native_free_cb_call_count;\n\nstatic void\nnative_free_cb (void *native_p)\n{\n  ++native_free_cb_call_count;\n  (void) native_p;\n} /* native_free_cb */\n\nstatic const jerry_object_native_info_t native_info =\n{\n  .free_cb = native_free_cb,\n};\n\nstatic jerry_value_t\ncreate_object (void)\n{\n  jerryx_escapable_handle_scope scope;\n  jerryx_open_escapable_handle_scope (&scope);\n  jerry_value_t obj = jerryx_create_handle (jerry_create_object ());\n  jerry_set_object_native_pointer (obj, NULL, &native_info);\n\n  // If leaves `escaped` uninitialized, there will be a style error on linux thrown by compiler\n  jerry_value_t escaped = 0;\n  jerryx_remove_handle (scope, obj, &escaped);\n  TEST_ASSERT (scope->prelist_handle_count == 0);\n  TEST_ASSERT (scope->handle_ptr == NULL);\n\n  jerryx_close_handle_scope (scope);\n  return escaped;\n} /* create_object */\n\nstatic void\ntest_handle_scope_val (void)\n{\n  jerryx_handle_scope scope;\n  jerryx_open_handle_scope (&scope);\n  jerry_value_t obj = create_object ();\n  (void) obj;\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == 0);\n\n  jerryx_close_handle_scope (scope);\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == 0);\n\n  jerry_release_value (obj);\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == 1);\n} /* test_handle_scope_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  native_free_cb_call_count = 0;\n  test_handle_scope_val ();\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-handle-scope-root.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/handle-scope.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n#include \"test-common.h\"\n\nstatic int native_free_cb_call_count;\nstatic int reusing_times = 10;\n\nstatic void\nnative_free_cb (void *native_p)\n{\n  ++native_free_cb_call_count;\n  (void) native_p;\n} /* native_free_cb */\n\nstatic const jerry_object_native_info_t native_info =\n{\n  .free_cb = native_free_cb,\n};\n\nstatic jerry_value_t\ncreate_object (void)\n{\n  jerry_value_t obj = jerry_create_object ();\n  jerry_set_object_native_pointer (obj, NULL, &native_info);\n  return obj;\n} /* create_object */\n\nstatic void\ntest_handle_scope_val (void)\n{\n  jerryx_escapable_handle_scope root = jerryx_handle_scope_get_root ();\n  // root handle scope should always be reusable after close\n  for (int i = 0; i < reusing_times; ++i)\n  {\n    jerry_value_t obj = jerryx_create_handle (create_object ());\n    (void) obj;\n    jerryx_close_handle_scope (root);\n    jerry_gc (JERRY_GC_PRESSURE_LOW);\n    TEST_ASSERT (native_free_cb_call_count == (i + 1));\n  }\n} /* test_handle_scope_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  native_free_cb_call_count = 0;\n  test_handle_scope_val ();\n\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == reusing_times);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-handle-scope.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/handle-scope.\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handle-scope.h\"\n#include \"test-common.h\"\n\nstatic int native_free_cb_call_count;\n\nstatic void\nnative_free_cb (void *native_p)\n{\n  ++native_free_cb_call_count;\n  (void) native_p;\n} /* native_free_cb */\n\nstatic const jerry_object_native_info_t native_info =\n{\n  .free_cb = native_free_cb,\n};\n\nstatic jerry_value_t\ncreate_object (void)\n{\n  jerry_value_t obj = jerry_create_object ();\n  jerry_set_object_native_pointer (obj, NULL, &native_info);\n  return obj;\n} /* create_object */\n\nstatic void\ntest_handle_scope_val (void)\n{\n  jerryx_handle_scope scope;\n  jerryx_open_handle_scope (&scope);\n  jerry_value_t obj = jerryx_create_handle (create_object ());\n  (void) obj;\n  jerryx_close_handle_scope (scope);\n} /* test_handle_scope_val */\n\nint\nmain (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  native_free_cb_call_count = 0;\n  test_handle_scope_val ();\n  jerry_gc (JERRY_GC_PRESSURE_LOW);\n  TEST_ASSERT (native_free_cb_call_count == 1);\n\n  jerry_cleanup ();\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-method-register.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-ext/handler property registration\n */\n\n#include \"jerryscript.h\"\n#include \"jerryscript-ext/handler.h\"\n#include \"test-common.h\"\n\n#include <string.h>\n\nstatic jerry_value_t\nmethod_hello (const jerry_value_t jfunc,  /**< function object */\n              const jerry_value_t jthis,  /**< function this */\n              const jerry_value_t jargv[], /**< arguments */\n              const jerry_length_t jargc) /**< number of arguments */\n{\n  (void) jfunc;\n  (void) jthis;\n  (void) jargv;\n  return jerry_create_number (jargc);\n} /* method_hello */\n\n/**\n * Helper method to create a non-configurable property on an object\n */\nstatic void\nfreeze_property (jerry_value_t target_obj, /**< target object */\n                 const char *target_prop) /**< target property name */\n{\n  // \"freeze\" property\n  jerry_property_descriptor_t prop_desc;\n  jerry_init_property_descriptor_fields (&prop_desc);\n  prop_desc.is_configurable_defined = true;\n  prop_desc.is_configurable = false;\n\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) target_prop);\n  jerry_value_t return_value = jerry_define_own_property (target_obj, prop_name, &prop_desc);\n  TEST_ASSERT (jerry_value_is_boolean (return_value));\n  jerry_release_value (return_value);\n  jerry_release_value (prop_name);\n\n  jerry_free_property_descriptor_fields (&prop_desc);\n} /* freeze_property */\n\n/**\n * Test registration of various property values.\n */\nstatic void\ntest_simple_registration (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t target_object = jerry_create_object ();\n\n  // Test simple registration\n  jerryx_property_entry methods[] =\n  {\n    JERRYX_PROPERTY_FUNCTION (\"hello\", method_hello),\n    JERRYX_PROPERTY_NUMBER (\"my_number\", 42.5),\n    JERRYX_PROPERTY_STRING (\"my_str\", \"super_str\"),\n    JERRYX_PROPERTY_STRING_SZ (\"my_str_sz\", \"super_str\", 6),\n    JERRYX_PROPERTY_BOOLEAN (\"my_bool\", true),\n    JERRYX_PROPERTY_BOOLEAN (\"my_bool_false\", false),\n    JERRYX_PROPERTY_UNDEFINED (\"my_non_value\"),\n    JERRYX_PROPERTY_LIST_END (),\n  };\n\n  jerryx_register_result register_result = jerryx_set_properties (target_object, methods);\n\n  TEST_ASSERT (register_result.registered == 7);\n  TEST_ASSERT (jerry_value_is_undefined (register_result.result));\n\n  jerryx_release_property_entry (methods, register_result);\n  jerry_release_value (register_result.result);\n\n  jerry_value_t global_obj = jerry_get_global_object ();\n  jerryx_set_property_str (global_obj, \"test\", target_object);\n  jerry_release_value (target_object);\n  jerry_release_value (global_obj);\n\n  {\n    const char *test_A = \"test.my_number\";\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0);\n    TEST_ASSERT (jerry_value_is_number (result));\n    TEST_ASSERT (jerry_get_number_value (result) == 42.5);\n    jerry_release_value (result);\n  }\n\n  {\n    const char *test_A = \"test.my_str_sz === 'super_'\";\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0);\n    TEST_ASSERT (jerry_value_is_boolean (result));\n    TEST_ASSERT (jerry_get_boolean_value (result) == true);\n    jerry_release_value (result);\n  }\n\n  {\n    const char *test_A = \"test.my_str === 'super_str'\";\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0);\n    TEST_ASSERT (jerry_value_is_boolean (result));\n    TEST_ASSERT (jerry_get_boolean_value (result) == true);\n    jerry_release_value (result);\n  }\n\n  {\n    const char *test_A = \"test.my_bool\";\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0);\n    TEST_ASSERT (jerry_value_is_boolean (result));\n    TEST_ASSERT (jerry_get_boolean_value (result) == true);\n    jerry_release_value (result);\n  }\n\n  {\n    const char *test_A = \"test.my_bool_false\";\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0);\n    TEST_ASSERT (jerry_value_is_boolean (result));\n    TEST_ASSERT (jerry_get_boolean_value (result) == false);\n    jerry_release_value (result);\n  }\n\n  {\n    const char *test_A = \"test.my_non_value\";\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0);\n    TEST_ASSERT (jerry_value_is_undefined (result));\n    jerry_release_value (result);\n  }\n\n  {\n    const char *test_A = \"test.hello(33, 42, 2);\";\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0);\n    TEST_ASSERT (jerry_value_is_number (result));\n    TEST_ASSERT ((uint32_t) jerry_get_number_value (result) == 3u);\n    jerry_release_value (result);\n  }\n\n  {\n    const char *test_A = \"test.hello();\";\n    jerry_value_t result = jerry_eval ((const jerry_char_t *) test_A, strlen (test_A), 0);\n    TEST_ASSERT (jerry_value_is_number (result));\n    TEST_ASSERT ((uint32_t) jerry_get_number_value (result) == 0u);\n    jerry_release_value (result);\n  }\n\n  jerry_cleanup ();\n} /* test_simple_registration */\n\n/**\n * Test registration error.\n *\n * Trying to register a property which is already a non-configurable property\n * should result in an error.\n */\nstatic void\ntest_error_setvalue (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const char *target_prop = \"test_err\";\n  jerry_value_t global_obj = jerry_get_global_object ();\n  freeze_property (global_obj, target_prop);\n\n  jerry_value_t new_object = jerry_create_object ();\n  jerry_value_t set_result = jerryx_set_property_str (global_obj, target_prop, new_object);\n  TEST_ASSERT (jerry_value_is_error (set_result));\n\n  jerry_release_value (set_result);\n  jerry_release_value (new_object);\n  jerry_release_value (global_obj);\n\n  jerry_cleanup ();\n} /* test_error_setvalue */\n\n/**\n * Test registration error with jerryx_set_properties.\n *\n * Trying to register a property which is already a non-configurable property\n * should result in an error.\n */\nstatic void\ntest_error_single_function (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const char *target_prop = \"test_err\";\n  jerry_value_t target_object = jerry_create_object ();\n  freeze_property (target_object, target_prop);\n\n  jerryx_property_entry methods[] =\n  {\n    JERRYX_PROPERTY_FUNCTION (target_prop, method_hello), // This registration should fail\n    JERRYX_PROPERTY_LIST_END (),\n  };\n\n  jerryx_register_result register_result = jerryx_set_properties (target_object, methods);\n\n  TEST_ASSERT (register_result.registered == 0);\n  TEST_ASSERT (jerry_value_is_error (register_result.result));\n  jerryx_release_property_entry (methods, register_result);\n  jerry_release_value (register_result.result);\n\n  jerry_release_value (target_object);\n\n  jerry_cleanup ();\n} /* test_error_single_function */\n\n/**\n * Test to see if jerryx_set_properties exits at the first error.\n */\nstatic void\ntest_error_multiple_functions (void)\n{\n  jerry_init (JERRY_INIT_EMPTY);\n\n  const char *prop_ok = \"prop_ok\";\n  const char *prop_err = \"prop_err\";\n  const char *prop_not = \"prop_not\";\n  jerry_value_t target_object = jerry_create_object ();\n  freeze_property (target_object, prop_err);\n\n  jerryx_property_entry methods[] =\n  {\n    JERRYX_PROPERTY_FUNCTION (prop_ok, method_hello), // This registration is ok\n    JERRYX_PROPERTY_FUNCTION (prop_err, method_hello), // This registration should fail\n    JERRYX_PROPERTY_FUNCTION (prop_not, method_hello), // This registration is not done\n    JERRYX_PROPERTY_LIST_END (),\n  };\n\n  jerryx_register_result register_result = jerryx_set_properties (target_object, methods);\n\n  TEST_ASSERT (register_result.registered == 1);\n  TEST_ASSERT (jerry_value_is_error (register_result.result));\n\n  jerryx_release_property_entry (methods, register_result);\n  jerry_release_value (register_result.result);\n\n  {\n    // Test if property \"prop_ok\" is correctly registered.\n    jerry_value_t prop_ok_val = jerry_create_string ((const jerry_char_t *) prop_ok);\n    jerry_value_t prop_ok_exists = jerry_has_own_property (target_object, prop_ok_val);\n    TEST_ASSERT (jerry_get_boolean_value (prop_ok_exists) == true);\n    jerry_release_value (prop_ok_exists);\n\n    // Try calling the method\n    jerry_value_t prop_ok_func = jerry_get_property (target_object, prop_ok_val);\n    TEST_ASSERT (jerry_value_is_function (prop_ok_func) == true);\n    jerry_value_t args[2] =\n    {\n      jerry_create_number (22),\n      jerry_create_number (-3),\n    };\n    jerry_size_t args_cnt = sizeof (args) / sizeof (jerry_value_t);\n    jerry_value_t func_result = jerry_call_function (prop_ok_func,\n                                                     jerry_create_undefined (),\n                                                     args,\n                                                     args_cnt);\n    TEST_ASSERT (jerry_value_is_number (func_result) == true);\n    TEST_ASSERT ((uint32_t) jerry_get_number_value (func_result) == 2u);\n    jerry_release_value (func_result);\n    for (jerry_size_t idx = 0; idx < args_cnt; idx++)\n    {\n      jerry_release_value (args[idx]);\n    }\n    jerry_release_value (prop_ok_func);\n    jerry_release_value (prop_ok_val);\n  }\n\n  {\n    // The \"prop_err\" should exist - as it was \"freezed\" - but it should not be a function\n    jerry_value_t prop_err_val = jerry_create_string ((const jerry_char_t *) prop_err);\n    jerry_value_t prop_err_exists = jerry_has_own_property (target_object, prop_err_val);\n    TEST_ASSERT (jerry_get_boolean_value (prop_err_exists) == true);\n    jerry_release_value (prop_err_exists);\n\n    jerry_value_t prop_err_func = jerry_value_is_function (prop_err_val);\n    TEST_ASSERT (jerry_value_is_function (prop_err_func) == false);\n    jerry_release_value (prop_err_val);\n  }\n\n  { // The \"prop_not\" is not available on the target object\n    jerry_value_t prop_not_val = jerry_create_string ((const jerry_char_t *) prop_not);\n    jerry_value_t prop_not_exists = jerry_has_own_property (target_object, prop_not_val);\n    TEST_ASSERT (jerry_get_boolean_value (prop_not_exists) == false);\n    jerry_release_value (prop_not_exists);\n    jerry_release_value (prop_not_val);\n  }\n\n  jerry_release_value (target_object);\n\n  jerry_cleanup ();\n} /* test_error_multiple_functions */\n\nint\nmain (void)\n{\n  test_simple_registration ();\n  test_error_setvalue ();\n  test_error_single_function ();\n  test_error_multiple_functions ();\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-module-canonical.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <string.h>\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n#include \"jerryscript-ext/module.h\"\n\n#define ACTUAL_NAME \"alice\"\n#define ALIAS_NAME \"bob\"\n\nstatic jerry_value_t\nget_canonical_name (const jerry_value_t name)\n{\n  jerry_size_t name_size = jerry_get_string_size (name);\n  JERRY_VLA (jerry_char_t, name_string, name_size + 1);\n  jerry_string_to_char_buffer (name, name_string, name_size);\n  name_string[name_size] = 0;\n\n  if (!strcmp ((char *) name_string, ACTUAL_NAME))\n  {\n    return jerry_acquire_value (name);\n  }\n  else if (!strcmp ((char *) name_string, ALIAS_NAME))\n  {\n    return jerry_create_string ((jerry_char_t *) ACTUAL_NAME);\n  }\n  else\n  {\n    return jerry_create_undefined ();\n  }\n} /* get_canonical_name */\n\nstatic bool\nresolve (const jerry_value_t canonical_name, jerry_value_t *result)\n{\n  jerry_size_t name_size = jerry_get_string_size (canonical_name);\n  JERRY_VLA (jerry_char_t, name_string, name_size + 1);\n  jerry_string_to_char_buffer (canonical_name, name_string, name_size);\n  name_string[name_size] = 0;\n\n  if (!strcmp ((char *) name_string, ACTUAL_NAME))\n  {\n    *result = jerry_create_object ();\n    return true;\n  }\n  return false;\n} /* resolve */\n\nstatic const jerryx_module_resolver_t canonical_test =\n{\n  .get_canonical_name_p = get_canonical_name,\n  .resolve_p = resolve\n};\n\n#define TEST_VALUE 95.0\n\nint\nmain (int argc, char **argv)\n{\n  (void) argc;\n  (void) argv;\n\n  const jerryx_module_resolver_t *resolver = &canonical_test;\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  jerry_value_t actual_name = jerry_create_string ((jerry_char_t *) ACTUAL_NAME);\n  jerry_value_t alias_name = jerry_create_string ((jerry_char_t *) ALIAS_NAME);\n\n  /* It's important that we resolve by the non-canonical name first. */\n  jerry_value_t result2 = jerryx_module_resolve (alias_name, &resolver, 1);\n  jerry_value_t result1 = jerryx_module_resolve (actual_name, &resolver, 1);\n  jerry_release_value (actual_name);\n  jerry_release_value (alias_name);\n\n  /* An elaborate way of doing strict equal - set a property on one object and it \"magically\" appears on the other. */\n  jerry_value_t prop_name = jerry_create_string ((jerry_char_t *) \"something\");\n  jerry_value_t prop_value = jerry_create_number (TEST_VALUE);\n  jerry_release_value (jerry_set_property (result1, prop_name, prop_value));\n  jerry_release_value (prop_value);\n\n  prop_value = jerry_get_property (result2, prop_name);\n  TEST_ASSERT (jerry_get_number_value (prop_value) == TEST_VALUE);\n  jerry_release_value (prop_value);\n\n  jerry_release_value (prop_name);\n  jerry_release_value (result1);\n  jerry_release_value (result2);\n\n  jerry_cleanup ();\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-ext/test-ext-module-empty.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <string.h>\n\n#include \"jerryscript.h\"\n#include \"test-common.h\"\n#include \"jerryscript-ext/module.h\"\n\nint\nmain (int argc, char **argv)\n{\n  (void) argc;\n  (void) argv;\n  jerry_char_t buffer[256];\n  jerry_size_t bytes_copied;\n  const jerryx_module_resolver_t *resolver = &jerryx_module_native_resolver;\n  jerry_value_t module_name;\n\n  jerry_init (JERRY_INIT_EMPTY);\n\n  /* Attempt to load a non-existing module. */\n  module_name = jerry_create_string ((jerry_char_t *) \"some-unknown-module-name\");\n  jerry_value_t module = jerryx_module_resolve (module_name, &resolver, 1);\n  jerry_release_value (module_name);\n\n  TEST_ASSERT (jerry_value_is_error (module));\n\n  /* Retrieve the error message. */\n  module = jerry_get_value_from_error (module, true);\n  jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) \"message\");\n  jerry_value_t prop = jerry_get_property (module, prop_name);\n\n  /* Assert that the error message is a string with specific contents. */\n  TEST_ASSERT (jerry_value_is_string (prop));\n\n  bytes_copied = jerry_substring_to_utf8_char_buffer (prop, 0, 254, buffer, 256);\n  buffer[bytes_copied] = 0;\n  TEST_ASSERT (!strcmp ((const char *) buffer, \"Module not found\"));\n\n  /* Release the error message property name and value. */\n  jerry_release_value (prop);\n  jerry_release_value (prop_name);\n\n  /* Retrieve the moduleName property. */\n  prop_name = jerry_create_string ((const jerry_char_t *) \"moduleName\");\n  prop = jerry_get_property (module, prop_name);\n\n  /* Assert that the moduleName property is a string containing the requested module name. */\n  TEST_ASSERT (jerry_value_is_string (prop));\n\n  bytes_copied = jerry_substring_to_utf8_char_buffer (prop, 0, 254, buffer, 256);\n  buffer[bytes_copied] = 0;\n  TEST_ASSERT (!strcmp ((const char *) buffer, \"some-unknown-module-name\"));\n\n  /* Release everything. */\n  jerry_release_value (prop);\n  jerry_release_value (prop_name);\n  jerry_release_value (module);\n\n  return 0;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-math/CMakeLists.txt",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required (VERSION 2.8.12)\nproject (unit-math C)\n\n# Unit tests main modules\nset(SOURCE_UNIT_TEST_MAIN_MODULES\n  test-math.c\n)\n\n# Unit tests declaration\nadd_custom_target(unittests-math)\n\nforeach(SOURCE_UNIT_TEST_MAIN ${SOURCE_UNIT_TEST_MAIN_MODULES})\n  get_filename_component(TARGET_NAME ${SOURCE_UNIT_TEST_MAIN} NAME_WE)\n  set(TARGET_NAME unit-${TARGET_NAME})\n\n  add_executable(${TARGET_NAME} ${SOURCE_UNIT_TEST_MAIN})\n  set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS \"${LINKER_FLAGS_COMMON}\")\n  set_property(TARGET ${TARGET_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/tests\")\n\n  target_link_libraries(${TARGET_NAME} jerry-math)\n\n  add_dependencies(unittests-math ${TARGET_NAME})\nendforeach()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-math/test-math.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Unit test for jerry-math\n */\n\n#include <math.h>\n#include <stdbool.h>\n#include <stdint.h>\n#include <stdio.h>\n\nstatic bool passed = true;\n\nstatic void\ncheck_int (const char *expr, int computed, int expected)\n{\n  printf (\"%s = %d [expected=%d] \", expr, computed, expected);\n\n  bool result = computed == expected;\n  printf (\"%s\\n\", result ? \"PASS\" : \"FAIL\");\n\n  passed &= result;\n} /* check_int */\n\ntypedef union\n{\n  double value;\n  uint64_t bits64;\n  uint32_t bits32[2];\n} double_bits_t;\n\nstatic void\ncheck_double (const char *expr, double computed, double expected)\n{\n  double_bits_t computed_bits;\n  double_bits_t expected_bits;\n\n  computed_bits.value = computed;\n  expected_bits.value = expected;\n\n  printf (\"%s = 0x%08x%08x [expected=0x%08x%08x] \", expr,\n          (unsigned int) computed_bits.bits32[1], (unsigned int) computed_bits.bits32[0],\n          (unsigned int) expected_bits.bits32[1], (unsigned int) expected_bits.bits32[0]);\n\n  bool result;\n  if (isnan (computed) && isnan (expected))\n  {\n    result = true;\n  }\n  else\n  {\n    int64_t diff = (int64_t) (computed_bits.bits64 - expected_bits.bits64);\n    if (diff < 0)\n    {\n      diff = -diff;\n    }\n\n    if (diff <= 1) /* tolerate 1 bit of differene in the last place */\n    {\n      result = true;\n      if (diff != 0)\n      {\n        printf (\"APPROX \");\n      }\n    }\n    else\n    {\n      result = false;\n    }\n  }\n  printf (\"%s\\n\", result ? \"PASS\" : \"FAIL\");\n\n  passed &= result;\n} /* check_double */\n\nint\nmain (void)\n{\n#define INF INFINITY\n#include \"test-math.inc.h\"\n\n  return passed ? 0 : 1;\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tests/unit-math/test-math.inc.h",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file is automatically generated by the gen-test-math.sh script.\n * Do not edit! */\n\ncheck_double (\"acos (0.0)\", acos (0.0), 1.57079632679489655800E+00);\ncheck_double (\"acos (-0.0)\", acos (-0.0), 1.57079632679489655800E+00);\ncheck_double (\"acos (1.0)\", acos (1.0), 0.00000000000000000000E+00);\ncheck_double (\"acos (-1.0)\", acos (-1.0), 3.14159265358979311600E+00);\ncheck_double (\"acos (0.5)\", acos (0.5), 1.04719755119659785336E+00);\ncheck_double (\"acos (-0.5)\", acos (-0.5), 2.09439510239319570672E+00);\ncheck_double (\"acos (INFINITY)\", acos (INFINITY), NAN);\ncheck_double (\"acos (-INFINITY)\", acos (-INFINITY), NAN);\ncheck_double (\"acos (NAN)\", acos (NAN), NAN);\ncheck_double (\"acos (6.9e-18)\", acos (6.9e-18), 1.57079632679489655800E+00);\ncheck_double (\"acos (-6.9e-18)\", acos (-6.9e-18), 1.57079632679489655800E+00);\ncheck_double (\"acos (7.0e-18)\", acos (7.0e-18), 1.57079632679489655800E+00);\ncheck_double (\"acos (-7.0e-18)\", acos (-7.0e-18), 1.57079632679489655800E+00);\ncheck_double (\"acos (7.4e-9)\", acos (7.4e-9), 1.57079631939489661185E+00);\ncheck_double (\"acos (-7.4e-9)\", acos (-7.4e-9), 1.57079633419489672619E+00);\ncheck_double (\"acos (7.5e-9)\", acos (7.5e-9), 1.57079631929489660358E+00);\ncheck_double (\"acos (-7.5e-9)\", acos (-7.5e-9), 1.57079633429489651242E+00);\ncheck_double (\"acos (0.1)\", acos (0.1), 1.47062890563333681371E+00);\ncheck_double (\"acos (-0.1)\", acos (-0.1), 1.67096374795645652434E+00);\ncheck_double (\"acos (0.4)\", acos (0.4), 1.15927948072740849561E+00);\ncheck_double (\"acos (-0.4)\", acos (-0.4), 1.98231317286238462039E+00);\ncheck_double (\"acos (0.6)\", acos (0.6), 9.27295218001612298053E-01);\ncheck_double (\"acos (-0.6)\", acos (-0.6), 2.21429743558818081794E+00);\ncheck_double (\"acos (0.99)\", acos (0.99), 1.41539473324427289569E-01);\ncheck_double (\"acos (-0.99)\", acos (-0.99), 3.00005318026536604847E+00);\ncheck_double (\"acos (1.1)\", acos (1.1), NAN);\ncheck_double (\"acos (-1.1)\", acos (-1.1), NAN);\ncheck_double (\"acos (0.7)\", acos (0.7), 7.95398830184143590394E-01);\ncheck_double (\"asin (0.0)\", asin (0.0), 0.00000000000000000000E+00);\ncheck_double (\"asin (-0.0)\", asin (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"asin (1.0)\", asin (1.0), 1.57079632679489655800E+00);\ncheck_double (\"asin (-1.0)\", asin (-1.0), -1.57079632679489655800E+00);\ncheck_double (\"asin (0.5)\", asin (0.5), 5.23598775598298926681E-01);\ncheck_double (\"asin (-0.5)\", asin (-0.5), -5.23598775598298926681E-01);\ncheck_double (\"asin (0.98)\", asin (0.98), 1.37046148447177684737E+00);\ncheck_double (\"asin (-0.98)\", asin (-0.98), -1.37046148447177684737E+00);\ncheck_double (\"asin (INFINITY)\", asin (INFINITY), NAN);\ncheck_double (\"asin (-INFINITY)\", asin (-INFINITY), NAN);\ncheck_double (\"asin (NAN)\", asin (NAN), NAN);\ncheck_double (\"asin (6.9e-18)\", asin (6.9e-18), 6.90000000000000026253E-18);\ncheck_double (\"asin (-6.9e-18)\", asin (-6.9e-18), -6.90000000000000026253E-18);\ncheck_double (\"asin (7.0e-18)\", asin (7.0e-18), 6.99999999999999973042E-18);\ncheck_double (\"asin (-7.0e-18)\", asin (-7.0e-18), -6.99999999999999973042E-18);\ncheck_double (\"asin (7.4e-9)\", asin (7.4e-9), 7.40000000000000008865E-09);\ncheck_double (\"asin (-7.4e-9)\", asin (-7.4e-9), -7.40000000000000008865E-09);\ncheck_double (\"asin (7.5e-9)\", asin (7.5e-9), 7.49999999999999932974E-09);\ncheck_double (\"asin (-7.5e-9)\", asin (-7.5e-9), -7.49999999999999932974E-09);\ncheck_double (\"asin (0.1)\", asin (0.1), 1.00167421161559799803E-01);\ncheck_double (\"asin (-0.1)\", asin (-0.1), -1.00167421161559799803E-01);\ncheck_double (\"asin (0.4)\", asin (0.4), 4.11516846067488062388E-01);\ncheck_double (\"asin (-0.4)\", asin (-0.4), -4.11516846067488062388E-01);\ncheck_double (\"asin (0.6)\", asin (0.6), 6.43501108793284370968E-01);\ncheck_double (\"asin (-0.6)\", asin (-0.6), -6.43501108793284370968E-01);\ncheck_double (\"asin (0.97)\", asin (0.97), 1.32523080927960457132E+00);\ncheck_double (\"asin (-0.97)\", asin (-0.97), -1.32523080927960457132E+00);\ncheck_double (\"asin (0.99)\", asin (0.99), 1.42925685347046926843E+00);\ncheck_double (\"asin (-0.99)\", asin (-0.99), -1.42925685347046926843E+00);\ncheck_double (\"asin (1.1)\", asin (1.1), NAN);\ncheck_double (\"asin (-1.1)\", asin (-1.1), NAN);\ncheck_double (\"asin (0.7)\", asin (0.7), 7.75397496610752967605E-01);\ncheck_double (\"atan (0.0)\", atan (0.0), 0.00000000000000000000E+00);\ncheck_double (\"atan (-0.0)\", atan (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"atan (7.0 / 16.0)\", atan (7.0 / 16.0), 4.12410441597387322776E-01);\ncheck_double (\"atan (-7.0 / 16.0)\", atan (-7.0 / 16.0), -4.12410441597387322776E-01);\ncheck_double (\"atan (11.0 / 16.0)\", atan (11.0 / 16.0), 6.02287346134964152178E-01);\ncheck_double (\"atan (-11.0 / 16.0)\", atan (-11.0 / 16.0), -6.02287346134964152178E-01);\ncheck_double (\"atan (19.0 / 16.0)\", atan (19.0 / 16.0), 8.70903457075652975838E-01);\ncheck_double (\"atan (-19.0 / 16.0)\", atan (-19.0 / 16.0), -8.70903457075652975838E-01);\ncheck_double (\"atan (39.0 / 16.0)\", atan (39.0 / 16.0), 1.18147960496175574718E+00);\ncheck_double (\"atan (-39.0 / 16.0)\", atan (-39.0 / 16.0), -1.18147960496175574718E+00);\ncheck_double (\"atan (1.0)\", atan (1.0), 7.85398163397448278999E-01);\ncheck_double (\"atan (-1.0)\", atan (-1.0), -7.85398163397448278999E-01);\ncheck_double (\"atan (INFINITY)\", atan (INFINITY), 1.57079632679489655800E+00);\ncheck_double (\"atan (-INFINITY)\", atan (-INFINITY), -1.57079632679489655800E+00);\ncheck_double (\"atan (NAN)\", atan (NAN), NAN);\ncheck_double (\"atan (6.9 / 16.0)\", atan (6.9 / 16.0), 4.07152520941509277197E-01);\ncheck_double (\"atan (-6.9 / 16.0)\", atan (-6.9 / 16.0), -4.07152520941509277197E-01);\ncheck_double (\"atan (7.1 / 16.0)\", atan (7.1 / 16.0), 4.17644283240569735849E-01);\ncheck_double (\"atan (-7.1 / 16.0)\", atan (-7.1 / 16.0), -4.17644283240569735849E-01);\ncheck_double (\"atan (10.9 / 16.0)\", atan (10.9 / 16.0), 5.98030920656102416011E-01);\ncheck_double (\"atan (-10.9 / 16.0)\", atan (-10.9 / 16.0), -5.98030920656102416011E-01);\ncheck_double (\"atan (11.1 / 16.0)\", atan (11.1 / 16.0), 6.06519005615576589641E-01);\ncheck_double (\"atan (-11.1 / 16.0)\", atan (-11.1 / 16.0), -6.06519005615576589641E-01);\ncheck_double (\"atan (18.9 / 16.0)\", atan (18.9 / 16.0), 8.68302259886018612534E-01);\ncheck_double (\"atan (-18.9 / 16.0)\", atan (-18.9 / 16.0), -8.68302259886018612534E-01);\ncheck_double (\"atan (19.1 / 16.0)\", atan (19.1 / 16.0), 8.73488683179258762479E-01);\ncheck_double (\"atan (-19.1 / 16.0)\", atan (-19.1 / 16.0), -8.73488683179258762479E-01);\ncheck_double (\"atan (38.9 / 16.0)\", atan (38.9 / 16.0), 1.18057723083411603149E+00);\ncheck_double (\"atan (-38.9 / 16.0)\", atan (-38.9 / 16.0), -1.18057723083411603149E+00);\ncheck_double (\"atan (39.1 / 16.0)\", atan (39.1 / 16.0), 1.18237802686613768799E+00);\ncheck_double (\"atan (-39.1 / 16.0)\", atan (-39.1 / 16.0), -1.18237802686613768799E+00);\ncheck_double (\"atan (0.99)\", atan (0.99), 7.80373080066635860241E-01);\ncheck_double (\"atan (-0.99)\", atan (-0.99), -7.80373080066635860241E-01);\ncheck_double (\"atan (1.1)\", atan (1.1), 8.32981266674431730657E-01);\ncheck_double (\"atan (-1.1)\", atan (-1.1), -8.32981266674431730657E-01);\ncheck_double (\"atan (7.37e+19)\", atan (7.37e+19), 1.57079632679489655800E+00);\ncheck_double (\"atan (-7.37e+19)\", atan (-7.37e+19), -1.57079632679489655800E+00);\ncheck_double (\"atan (7.38e+19)\", atan (7.38e+19), 1.57079632679489655800E+00);\ncheck_double (\"atan (-7.38e+19)\", atan (-7.38e+19), -1.57079632679489655800E+00);\ncheck_double (\"atan (0.7)\", atan (0.7), 6.10725964389208564320E-01);\ncheck_double (\"atan2 (NAN, NAN)\", atan2 (NAN, NAN), NAN);\ncheck_double (\"atan2 (0.0, NAN)\", atan2 (0.0, NAN), NAN);\ncheck_double (\"atan2 (-0.0, NAN)\", atan2 (-0.0, NAN), NAN);\ncheck_double (\"atan2 (1.0, NAN)\", atan2 (1.0, NAN), NAN);\ncheck_double (\"atan2 (-1.0, NAN)\", atan2 (-1.0, NAN), NAN);\ncheck_double (\"atan2 (INFINITY, NAN)\", atan2 (INFINITY, NAN), NAN);\ncheck_double (\"atan2 (-INFINITY, NAN)\", atan2 (-INFINITY, NAN), NAN);\ncheck_double (\"atan2 (NAN, 0.0)\", atan2 (NAN, 0.0), NAN);\ncheck_double (\"atan2 (NAN, -0.0)\", atan2 (NAN, -0.0), NAN);\ncheck_double (\"atan2 (NAN, 1.0)\", atan2 (NAN, 1.0), NAN);\ncheck_double (\"atan2 (NAN, -1.0)\", atan2 (NAN, -1.0), NAN);\ncheck_double (\"atan2 (NAN, INFINITY)\", atan2 (NAN, INFINITY), NAN);\ncheck_double (\"atan2 (NAN, -INFINITY)\", atan2 (NAN, -INFINITY), NAN);\ncheck_double (\"atan2 (0.0, 0.0)\", atan2 (0.0, 0.0), 0.00000000000000000000E+00);\ncheck_double (\"atan2 (0.0, -0.0)\", atan2 (0.0, -0.0), 3.14159265358979311600E+00);\ncheck_double (\"atan2 (-0.0, 0.0)\", atan2 (-0.0, 0.0), -0.00000000000000000000E+00);\ncheck_double (\"atan2 (-0.0, -0.0)\", atan2 (-0.0, -0.0), -3.14159265358979311600E+00);\ncheck_double (\"atan2 (0.0, 1.0)\", atan2 (0.0, 1.0), 0.00000000000000000000E+00);\ncheck_double (\"atan2 (0.0, -1.0)\", atan2 (0.0, -1.0), 3.14159265358979311600E+00);\ncheck_double (\"atan2 (0.0, INFINITY)\", atan2 (0.0, INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"atan2 (0.0, -INFINITY)\", atan2 (0.0, -INFINITY), 3.14159265358979311600E+00);\ncheck_double (\"atan2 (-0.0, 1.0)\", atan2 (-0.0, 1.0), -0.00000000000000000000E+00);\ncheck_double (\"atan2 (-0.0, -1.0)\", atan2 (-0.0, -1.0), -3.14159265358979311600E+00);\ncheck_double (\"atan2 (-0.0, INFINITY)\", atan2 (-0.0, INFINITY), -0.00000000000000000000E+00);\ncheck_double (\"atan2 (-0.0, -INFINITY)\", atan2 (-0.0, -INFINITY), -3.14159265358979311600E+00);\ncheck_double (\"atan2 (1.0, 0.0)\", atan2 (1.0, 0.0), 1.57079632679489655800E+00);\ncheck_double (\"atan2 (1.0, -0.0)\", atan2 (1.0, -0.0), 1.57079632679489655800E+00);\ncheck_double (\"atan2 (INFINITY, 0.0)\", atan2 (INFINITY, 0.0), 1.57079632679489655800E+00);\ncheck_double (\"atan2 (INFINITY, -0.0)\", atan2 (INFINITY, -0.0), 1.57079632679489655800E+00);\ncheck_double (\"atan2 (-1.0, 0.0)\", atan2 (-1.0, 0.0), -1.57079632679489655800E+00);\ncheck_double (\"atan2 (-1.0, -0.0)\", atan2 (-1.0, -0.0), -1.57079632679489655800E+00);\ncheck_double (\"atan2 (-INFINITY, 0.0)\", atan2 (-INFINITY, 0.0), -1.57079632679489655800E+00);\ncheck_double (\"atan2 (-INFINITY, -0.0)\", atan2 (-INFINITY, -0.0), -1.57079632679489655800E+00);\ncheck_double (\"atan2 (1.0, INFINITY)\", atan2 (1.0, INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"atan2 (-1.0, INFINITY)\", atan2 (-1.0, INFINITY), -0.00000000000000000000E+00);\ncheck_double (\"atan2 (1.0, -INFINITY)\", atan2 (1.0, -INFINITY), 3.14159265358979311600E+00);\ncheck_double (\"atan2 (-1.0, -INFINITY)\", atan2 (-1.0, -INFINITY), -3.14159265358979311600E+00);\ncheck_double (\"atan2 (INFINITY, INFINITY)\", atan2 (INFINITY, INFINITY), 7.85398163397448278999E-01);\ncheck_double (\"atan2 (INFINITY, -INFINITY)\", atan2 (INFINITY, -INFINITY), 2.35619449019234483700E+00);\ncheck_double (\"atan2 (-INFINITY, INFINITY)\", atan2 (-INFINITY, INFINITY), -7.85398163397448278999E-01);\ncheck_double (\"atan2 (-INFINITY, -INFINITY)\", atan2 (-INFINITY, -INFINITY), -2.35619449019234483700E+00);\ncheck_double (\"atan2 (INFINITY, 1.0)\", atan2 (INFINITY, 1.0), 1.57079632679489655800E+00);\ncheck_double (\"atan2 (INFINITY, -1.0)\", atan2 (INFINITY, -1.0), 1.57079632679489655800E+00);\ncheck_double (\"atan2 (-INFINITY, 1.0)\", atan2 (-INFINITY, 1.0), -1.57079632679489655800E+00);\ncheck_double (\"atan2 (-INFINITY, -1.0)\", atan2 (-INFINITY, -1.0), -1.57079632679489655800E+00);\ncheck_double (\"atan2 (0.7, 1.0)\", atan2 (0.7, 1.0), 6.10725964389208564320E-01);\ncheck_double (\"atan2 (-0.7, 1.0)\", atan2 (-0.7, 1.0), -6.10725964389208564320E-01);\ncheck_double (\"atan2 (0.7, -1.0)\", atan2 (0.7, -1.0), 2.53086668920058466270E+00);\ncheck_double (\"atan2 (-0.7, -1.0)\", atan2 (-0.7, -1.0), -2.53086668920058466270E+00);\ncheck_double (\"atan2 (0.4, 0.0003)\", atan2 (0.4, 0.0003), 1.57004632693552159672E+00);\ncheck_double (\"atan2 (1.4, -0.93)\", atan2 (1.4, -0.93), 2.15714876682378431383E+00);\ncheck_double (\"acosh (0.0)\", acosh (0.0), -NAN);\ncheck_double (\"acosh (-0.0)\", acosh (-0.0), -NAN);\ncheck_double (\"acosh (1.0)\", acosh (1.0), 0.00000000000000000000E+00);\ncheck_double (\"acosh (-1.0)\", acosh (-1.0), -NAN);\ncheck_double (\"acosh (INFINITY)\", acosh (INFINITY), INF);\ncheck_double (\"acosh (-INFINITY)\", acosh (-INFINITY), -NAN);\ncheck_double (\"acosh (NAN)\", acosh (NAN), NAN);\ncheck_double (\"acosh (7.08e+02)\", acosh (7.08e+02), 7.25559077551410425144E+00);\ncheck_double (\"acosh (7.10e+02)\", acosh (7.10e+02), 7.25841165466159132791E+00);\ncheck_double (\"acosh (-7.40e+02)\", acosh (-7.40e+02), -NAN);\ncheck_double (\"acosh (-7.50e+02)\", acosh (-7.50e+02), -NAN);\ncheck_double (\"acosh (0.34)\", acosh (0.34), -NAN);\ncheck_double (\"acosh (-0.34)\", acosh (-0.34), -NAN);\ncheck_double (\"acosh (0.35)\", acosh (0.35), -NAN);\ncheck_double (\"acosh (-0.35)\", acosh (-0.35), -NAN);\ncheck_double (\"acosh (1.03)\", acosh (1.03), 2.44340698822827606662E-01);\ncheck_double (\"acosh (-1.03)\", acosh (-1.03), -NAN);\ncheck_double (\"acosh (1.04)\", acosh (1.04), 2.81908289054146887764E-01);\ncheck_double (\"acosh (-1.04)\", acosh (-1.04), -NAN);\ncheck_double (\"acosh (3.72e-09)\", acosh (3.72e-09), -NAN);\ncheck_double (\"acosh (-3.72e-09)\", acosh (-3.72e-09), -NAN);\ncheck_double (\"acosh (3.73e-09)\", acosh (3.73e-09), -NAN);\ncheck_double (\"acosh (-3.73e-09)\", acosh (-3.73e-09), -NAN);\ncheck_double (\"acosh (2.0)\", acosh (2.0), 1.31695789692481679545E+00);\ncheck_double (\"acosh (3.0)\", acosh (3.0), 1.76274717403908609548E+00);\ncheck_double (\"acosh (0.7)\", acosh (0.7), -NAN);\ncheck_double (\"acosh (38.0)\", acosh (38.0), 4.33056016511402308566E+00);\ncheck_double (\"asinh (0.0)\", asinh (0.0), 0.00000000000000000000E+00);\ncheck_double (\"asinh (-0.0)\", asinh (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"asinh (1.0)\", asinh (1.0), 8.81373587019543047738E-01);\ncheck_double (\"asinh (-1.0)\", asinh (-1.0), -8.81373587019543047738E-01);\ncheck_double (\"asinh (INFINITY)\", asinh (INFINITY), INF);\ncheck_double (\"asinh (-INFINITY)\", asinh (-INFINITY), -INF);\ncheck_double (\"asinh (NAN)\", asinh (NAN), NAN);\ncheck_double (\"asinh (7.08e+02)\", asinh (7.08e+02), 7.25559177299247970439E+00);\ncheck_double (\"asinh (7.10e+02)\", asinh (7.10e+02), 7.25841264652828410675E+00);\ncheck_double (\"asinh (-7.40e+02)\", asinh (-7.40e+02), -7.29979782329546722508E+00);\ncheck_double (\"asinh (-7.50e+02)\", asinh (-7.50e+02), -7.31322083153444957304E+00);\ncheck_double (\"asinh (0.34)\", asinh (0.34), 3.33768351645882199730E-01);\ncheck_double (\"asinh (-0.34)\", asinh (-0.34), -3.33768351645882199730E-01);\ncheck_double (\"asinh (0.35)\", asinh (0.35), 3.43221555085943930141E-01);\ncheck_double (\"asinh (-0.35)\", asinh (-0.35), -3.43221555085943930141E-01);\ncheck_double (\"asinh (1.03)\", asinh (1.03), 9.02428495530461671770E-01);\ncheck_double (\"asinh (-1.03)\", asinh (-1.03), -9.02428495530461671770E-01);\ncheck_double (\"asinh (1.04)\", asinh (1.04), 9.09376928017844976537E-01);\ncheck_double (\"asinh (-1.04)\", asinh (-1.04), -9.09376928017844976537E-01);\ncheck_double (\"asinh (3.72e-09)\", asinh (3.72e-09), 3.71999999999999997526E-09);\ncheck_double (\"asinh (-3.72e-09)\", asinh (-3.72e-09), -3.71999999999999997526E-09);\ncheck_double (\"asinh (3.73e-09)\", asinh (3.73e-09), 3.73000000000000014752E-09);\ncheck_double (\"asinh (-3.73e-09)\", asinh (-3.73e-09), -3.73000000000000014752E-09);\ncheck_double (\"asinh (2.0)\", asinh (2.0), 1.44363547517881030124E+00);\ncheck_double (\"asinh (3.0)\", asinh (3.0), 1.81844645923206682525E+00);\ncheck_double (\"asinh (0.7)\", asinh (0.7), 6.52666566082355736889E-01);\ncheck_double (\"asinh (38.0)\", asinh (38.0), 4.33090642553643068169E+00);\ncheck_double (\"atanh (0.0)\", atanh (0.0), 0.00000000000000000000E+00);\ncheck_double (\"atanh (-0.0)\", atanh (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"atanh (1.0)\", atanh (1.0), INF);\ncheck_double (\"atanh (-1.0)\", atanh (-1.0), -INF);\ncheck_double (\"atanh (INFINITY)\", atanh (INFINITY), -NAN);\ncheck_double (\"atanh (-INFINITY)\", atanh (-INFINITY), -NAN);\ncheck_double (\"atanh (NAN)\", atanh (NAN), NAN);\ncheck_double (\"atanh (7.08e+02)\", atanh (7.08e+02), -NAN);\ncheck_double (\"atanh (7.10e+02)\", atanh (7.10e+02), -NAN);\ncheck_double (\"atanh (-7.40e+02)\", atanh (-7.40e+02), -NAN);\ncheck_double (\"atanh (-7.50e+02)\", atanh (-7.50e+02), -NAN);\ncheck_double (\"atanh (0.34)\", atanh (0.34), 3.54092528962242913959E-01);\ncheck_double (\"atanh (-0.34)\", atanh (-0.34), -3.54092528962242913959E-01);\ncheck_double (\"atanh (0.35)\", atanh (0.35), 3.65443754271396137323E-01);\ncheck_double (\"atanh (-0.35)\", atanh (-0.35), -3.65443754271396137323E-01);\ncheck_double (\"atanh (1.03)\", atanh (1.03), -NAN);\ncheck_double (\"atanh (-1.03)\", atanh (-1.03), -NAN);\ncheck_double (\"atanh (1.04)\", atanh (1.04), -NAN);\ncheck_double (\"atanh (-1.04)\", atanh (-1.04), -NAN);\ncheck_double (\"atanh (3.72e-09)\", atanh (3.72e-09), 3.71999999999999997526E-09);\ncheck_double (\"atanh (-3.72e-09)\", atanh (-3.72e-09), -3.71999999999999997526E-09);\ncheck_double (\"atanh (3.73e-09)\", atanh (3.73e-09), 3.73000000000000014752E-09);\ncheck_double (\"atanh (-3.73e-09)\", atanh (-3.73e-09), -3.73000000000000014752E-09);\ncheck_double (\"atanh (2.0)\", atanh (2.0), -NAN);\ncheck_double (\"atanh (3.0)\", atanh (3.0), -NAN);\ncheck_double (\"atanh (0.7)\", atanh (0.7), 8.67300527694053080552E-01);\ncheck_double (\"atanh (38.0)\", atanh (38.0), -NAN);\ncheck_double (\"ceil (0.0)\", ceil (0.0), 0.00000000000000000000E+00);\ncheck_double (\"ceil (-0.0)\", ceil (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"ceil (INFINITY)\", ceil (INFINITY), INF);\ncheck_double (\"ceil (-INFINITY)\", ceil (-INFINITY), -INF);\ncheck_double (\"ceil (NAN)\", ceil (NAN), NAN);\ncheck_double (\"ceil (3.14)\", ceil (3.14), 4.00000000000000000000E+00);\ncheck_double (\"ceil (-3.14)\", ceil (-3.14), -3.00000000000000000000E+00);\ncheck_double (\"ceil (3.72e-09)\", ceil (3.72e-09), 1.00000000000000000000E+00);\ncheck_double (\"ceil (-3.72e-09)\", ceil (-3.72e-09), -0.00000000000000000000E+00);\ncheck_double (\"ceil (7.37e+19)\", ceil (7.37e+19), 7.37000000000000000000E+19);\ncheck_double (\"ceil (-7.37e+19)\", ceil (-7.37e+19), -7.37000000000000000000E+19);\ncheck_double (\"exp (0.0)\", exp (0.0), 1.00000000000000000000E+00);\ncheck_double (\"exp (-0.0)\", exp (-0.0), 1.00000000000000000000E+00);\ncheck_double (\"exp (1.0)\", exp (1.0), 2.71828182845904509080E+00);\ncheck_double (\"exp (-1.0)\", exp (-1.0), 3.67879441171442334024E-01);\ncheck_double (\"exp (INFINITY)\", exp (INFINITY), INF);\ncheck_double (\"exp (-INFINITY)\", exp (-INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"exp (NAN)\", exp (NAN), NAN);\ncheck_double (\"exp (7.08e+02)\", exp (7.08e+02), 3.02338314427605515848E+307);\ncheck_double (\"exp (7.10e+02)\", exp (7.10e+02), INF);\ncheck_double (\"exp (-7.40e+02)\", exp (-7.40e+02), 4.19955798965059562550E-322);\ncheck_double (\"exp (-7.50e+02)\", exp (-7.50e+02), 0.00000000000000000000E+00);\ncheck_double (\"exp (0.34)\", exp (0.34), 1.40494759056359375116E+00);\ncheck_double (\"exp (-0.34)\", exp (-0.34), 7.11770322762609652933E-01);\ncheck_double (\"exp (0.35)\", exp (0.35), 1.41906754859325712204E+00);\ncheck_double (\"exp (-0.35)\", exp (-0.35), 7.04688089718713439602E-01);\ncheck_double (\"exp (1.03)\", exp (1.03), 2.80106583469907910455E+00);\ncheck_double (\"exp (-1.03)\", exp (-1.03), 3.57006960569147380191E-01);\ncheck_double (\"exp (1.04)\", exp (1.04), 2.82921701435155981130E+00);\ncheck_double (\"exp (-1.04)\", exp (-1.04), 3.53454681958780159157E-01);\ncheck_double (\"exp (3.72e-09)\", exp (3.72e-09), 1.00000000372000008575E+00);\ncheck_double (\"exp (-3.72e-09)\", exp (-3.72e-09), 9.99999996280000025273E-01);\ncheck_double (\"exp (3.73e-09)\", exp (3.73e-09), 1.00000000373000008658E+00);\ncheck_double (\"exp (-3.73e-09)\", exp (-3.73e-09), 9.99999996270000024445E-01);\ncheck_double (\"exp (2.0)\", exp (2.0), 7.38905609893065040694E+00);\ncheck_double (\"exp (3.0)\", exp (3.0), 2.00855369231876679237E+01);\ncheck_double (\"exp (0.7)\", exp (0.7), 2.01375270747047663278E+00);\ncheck_double (\"exp (38.0)\", exp (38.0), 3.18559317571137560000E+16);\ncheck_double (\"expm1 (0.0)\", expm1 (0.0), 0.00000000000000000000E+00);\ncheck_double (\"expm1 (-0.0)\", expm1 (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"expm1 (1.0)\", expm1 (1.0), 1.71828182845904531284E+00);\ncheck_double (\"expm1 (-1.0)\", expm1 (-1.0), -6.32120558828557665976E-01);\ncheck_double (\"expm1 (INFINITY)\", expm1 (INFINITY), INF);\ncheck_double (\"expm1 (-INFINITY)\", expm1 (-INFINITY), -1.00000000000000000000E+00);\ncheck_double (\"expm1 (NAN)\", expm1 (NAN), NAN);\ncheck_double (\"expm1 (7.08e+02)\", expm1 (7.08e+02), 3.02338314427605515848E+307);\ncheck_double (\"expm1 (7.095e+02)\", expm1 (7.095e+02), 1.35498631931463283283E+308);\ncheck_double (\"expm1 (7.10e+02)\", expm1 (7.10e+02), INF);\ncheck_double (\"expm1 (-7.40e+02)\", expm1 (-7.40e+02), -1.00000000000000000000E+00);\ncheck_double (\"expm1 (-7.50e+02)\", expm1 (-7.50e+02), -1.00000000000000000000E+00);\ncheck_double (\"expm1 (0.34)\", expm1 (0.34), 4.04947590563593806667E-01);\ncheck_double (\"expm1 (-0.34)\", expm1 (-0.34), -2.88229677237390291555E-01);\ncheck_double (\"expm1 (0.35)\", expm1 (0.35), 4.19067548593257233058E-01);\ncheck_double (\"expm1 (-0.35)\", expm1 (-0.35), -2.95311910281286560398E-01);\ncheck_double (\"expm1 (1.03)\", expm1 (1.03), 1.80106583469907910455E+00);\ncheck_double (\"expm1 (-1.03)\", expm1 (-1.03), -6.42993039430852619809E-01);\ncheck_double (\"expm1 (1.04)\", expm1 (1.04), 1.82921701435155958926E+00);\ncheck_double (\"expm1 (-1.04)\", expm1 (-1.04), -6.46545318041219840843E-01);\ncheck_double (\"expm1 (3.72e-09)\", expm1 (3.72e-09), 3.72000000691919994955E-09);\ncheck_double (\"expm1 (-3.72e-09)\", expm1 (-3.72e-09), -3.71999999308080000097E-09);\ncheck_double (\"expm1 (3.73e-09)\", expm1 (3.73e-09), 3.73000000695645013275E-09);\ncheck_double (\"expm1 (-3.73e-09)\", expm1 (-3.73e-09), -3.72999999304355016230E-09);\ncheck_double (\"expm1 (2.0)\", expm1 (2.0), 6.38905609893065040694E+00);\ncheck_double (\"expm1 (3.0)\", expm1 (3.0), 1.90855369231876679237E+01);\ncheck_double (\"expm1 (0.7)\", expm1 (0.7), 1.01375270747047641073E+00);\ncheck_double (\"expm1 (38.0)\", expm1 (38.0), 3.18559317571137560000E+16);\ncheck_double (\"fabs (0.0)\", fabs (0.0), 0.00000000000000000000E+00);\ncheck_double (\"fabs (-0.0)\", fabs (-0.0), 0.00000000000000000000E+00);\ncheck_double (\"fabs (1.0)\", fabs (1.0), 1.00000000000000000000E+00);\ncheck_double (\"fabs (-1.0)\", fabs (-1.0), 1.00000000000000000000E+00);\ncheck_double (\"fabs (INFINITY)\", fabs (INFINITY), INF);\ncheck_double (\"fabs (-INFINITY)\", fabs (-INFINITY), INF);\ncheck_double (\"fabs (NAN)\", fabs (NAN), NAN);\ncheck_double (\"fabs (3.14)\", fabs (3.14), 3.14000000000000012434E+00);\ncheck_double (\"fabs (-3.14)\", fabs (-3.14), 3.14000000000000012434E+00);\ncheck_double (\"fabs (0.7)\", fabs (0.7), 6.99999999999999955591E-01);\ncheck_double (\"fabs (-0.7)\", fabs (-0.7), 6.99999999999999955591E-01);\ncheck_double (\"fabs (3.72e-09)\", fabs (3.72e-09), 3.71999999999999997526E-09);\ncheck_double (\"fabs (-3.72e-09)\", fabs (-3.72e-09), 3.71999999999999997526E-09);\ncheck_double (\"fabs (7.37e+19)\", fabs (7.37e+19), 7.37000000000000000000E+19);\ncheck_double (\"fabs (-7.37e+19)\", fabs (-7.37e+19), 7.37000000000000000000E+19);\ncheck_double (\"floor (0.0)\", floor (0.0), 0.00000000000000000000E+00);\ncheck_double (\"floor (-0.0)\", floor (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"floor (INFINITY)\", floor (INFINITY), INF);\ncheck_double (\"floor (-INFINITY)\", floor (-INFINITY), -INF);\ncheck_double (\"floor (NAN)\", floor (NAN), NAN);\ncheck_double (\"floor (3.14)\", floor (3.14), 3.00000000000000000000E+00);\ncheck_double (\"floor (-3.14)\", floor (-3.14), -4.00000000000000000000E+00);\ncheck_double (\"floor (3.72e-09)\", floor (3.72e-09), 0.00000000000000000000E+00);\ncheck_double (\"floor (-3.72e-09)\", floor (-3.72e-09), -1.00000000000000000000E+00);\ncheck_double (\"floor (7.37e+19)\", floor (7.37e+19), 7.37000000000000000000E+19);\ncheck_double (\"floor (-7.37e+19)\", floor (-7.37e+19), -7.37000000000000000000E+19);\ncheck_double (\"fmod (0.0, 0.0)\", fmod (0.0, 0.0), -NAN);\ncheck_double (\"fmod (0.0, -0.0)\", fmod (0.0, -0.0), -NAN);\ncheck_double (\"fmod (-0.0, 0.0)\", fmod (-0.0, 0.0), -NAN);\ncheck_double (\"fmod (-0.0, -0.0)\", fmod (-0.0, -0.0), -NAN);\ncheck_double (\"fmod (0.0, 3.0)\", fmod (0.0, 3.0), 0.00000000000000000000E+00);\ncheck_double (\"fmod (0.0, -3.0)\", fmod (0.0, -3.0), 0.00000000000000000000E+00);\ncheck_double (\"fmod (-0.0, 3.0)\", fmod (-0.0, 3.0), -0.00000000000000000000E+00);\ncheck_double (\"fmod (-0.0, -3.0)\", fmod (-0.0, -3.0), -0.00000000000000000000E+00);\ncheck_double (\"fmod (0.0, INFINITY)\", fmod (0.0, INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"fmod (0.0, -INFINITY)\", fmod (0.0, -INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"fmod (-0.0, INFINITY)\", fmod (-0.0, INFINITY), -0.00000000000000000000E+00);\ncheck_double (\"fmod (-0.0, -INFINITY)\", fmod (-0.0, -INFINITY), -0.00000000000000000000E+00);\ncheck_double (\"fmod (0.0, NAN)\", fmod (0.0, NAN), NAN);\ncheck_double (\"fmod (-0.0, NAN)\", fmod (-0.0, NAN), NAN);\ncheck_double (\"fmod (3.0, 0.0)\", fmod (3.0, 0.0), -NAN);\ncheck_double (\"fmod (3.0, -0.0)\", fmod (3.0, -0.0), -NAN);\ncheck_double (\"fmod (-3.0, 0.0)\", fmod (-3.0, 0.0), -NAN);\ncheck_double (\"fmod (-3.0, -0.0)\", fmod (-3.0, -0.0), -NAN);\ncheck_double (\"fmod (3.0, 3.0)\", fmod (3.0, 3.0), 0.00000000000000000000E+00);\ncheck_double (\"fmod (3.0, -3.0)\", fmod (3.0, -3.0), 0.00000000000000000000E+00);\ncheck_double (\"fmod (-3.0, 3.0)\", fmod (-3.0, 3.0), -0.00000000000000000000E+00);\ncheck_double (\"fmod (-3.0, -3.0)\", fmod (-3.0, -3.0), -0.00000000000000000000E+00);\ncheck_double (\"fmod (3.0, INFINITY)\", fmod (3.0, INFINITY), 3.00000000000000000000E+00);\ncheck_double (\"fmod (3.0, -INFINITY)\", fmod (3.0, -INFINITY), 3.00000000000000000000E+00);\ncheck_double (\"fmod (-3.0, INFINITY)\", fmod (-3.0, INFINITY), -3.00000000000000000000E+00);\ncheck_double (\"fmod (-3.0, -INFINITY)\", fmod (-3.0, -INFINITY), -3.00000000000000000000E+00);\ncheck_double (\"fmod (3.0, NAN)\", fmod (3.0, NAN), NAN);\ncheck_double (\"fmod (-3.0, NAN)\", fmod (-3.0, NAN), NAN);\ncheck_double (\"fmod (INFINITY, 0.0)\", fmod (INFINITY, 0.0), -NAN);\ncheck_double (\"fmod (INFINITY, -0.0)\", fmod (INFINITY, -0.0), -NAN);\ncheck_double (\"fmod (-INFINITY, 0.0)\", fmod (-INFINITY, 0.0), -NAN);\ncheck_double (\"fmod (-INFINITY, -0.0)\", fmod (-INFINITY, -0.0), -NAN);\ncheck_double (\"fmod (INFINITY, 3.0)\", fmod (INFINITY, 3.0), -NAN);\ncheck_double (\"fmod (INFINITY, -3.0)\", fmod (INFINITY, -3.0), -NAN);\ncheck_double (\"fmod (-INFINITY, 3.0)\", fmod (-INFINITY, 3.0), -NAN);\ncheck_double (\"fmod (-INFINITY, -3.0)\", fmod (-INFINITY, -3.0), -NAN);\ncheck_double (\"fmod (INFINITY, INFINITY)\", fmod (INFINITY, INFINITY), -NAN);\ncheck_double (\"fmod (INFINITY, -INFINITY)\", fmod (INFINITY, -INFINITY), -NAN);\ncheck_double (\"fmod (-INFINITY, INFINITY)\", fmod (-INFINITY, INFINITY), -NAN);\ncheck_double (\"fmod (-INFINITY, -INFINITY)\", fmod (-INFINITY, -INFINITY), -NAN);\ncheck_double (\"fmod (INFINITY, NAN)\", fmod (INFINITY, NAN), NAN);\ncheck_double (\"fmod (-INFINITY, NAN)\", fmod (-INFINITY, NAN), NAN);\ncheck_double (\"fmod (NAN, 0.0)\", fmod (NAN, 0.0), NAN);\ncheck_double (\"fmod (NAN, -0.0)\", fmod (NAN, -0.0), NAN);\ncheck_double (\"fmod (NAN, 3.0)\", fmod (NAN, 3.0), NAN);\ncheck_double (\"fmod (NAN, -3.0)\", fmod (NAN, -3.0), NAN);\ncheck_double (\"fmod (NAN, INFINITY)\", fmod (NAN, INFINITY), NAN);\ncheck_double (\"fmod (NAN, -INFINITY)\", fmod (NAN, -INFINITY), NAN);\ncheck_double (\"fmod (NAN, NAN)\", fmod (NAN, NAN), NAN);\ncheck_double (\"fmod (3.0, 1.0)\", fmod (3.0, 1.0), 0.00000000000000000000E+00);\ncheck_double (\"fmod (3.0, -1.0)\", fmod (3.0, -1.0), 0.00000000000000000000E+00);\ncheck_double (\"fmod (-3.0, 1.0)\", fmod (-3.0, 1.0), -0.00000000000000000000E+00);\ncheck_double (\"fmod (-3.0, -1.0)\", fmod (-3.0, -1.0), -0.00000000000000000000E+00);\ncheck_double (\"fmod (6.5, 2.3)\", fmod (6.5, 2.3), 1.90000000000000035527E+00);\ncheck_double (\"fmod (6.5, -2.3)\", fmod (6.5, -2.3), 1.90000000000000035527E+00);\ncheck_double (\"fmod (-6.5, 2.3)\", fmod (-6.5, 2.3), -1.90000000000000035527E+00);\ncheck_double (\"fmod (-6.5, -2.3)\", fmod (-6.5, -2.3), -1.90000000000000035527E+00);\ncheck_int (\"isfinite (0.0)\", isfinite (0.0), 1);\ncheck_int (\"isfinite (-0.0)\", isfinite (-0.0), 1);\ncheck_int (\"isfinite (1.0)\", isfinite (1.0), 1);\ncheck_int (\"isfinite (-1.0)\", isfinite (-1.0), 1);\ncheck_int (\"isfinite (INFINITY)\", isfinite (INFINITY), 0);\ncheck_int (\"isfinite (-INFINITY)\", isfinite (-INFINITY), 0);\ncheck_int (\"isfinite (NAN)\", isfinite (NAN), 0);\ncheck_int (\"isfinite (3.14)\", isfinite (3.14), 1);\ncheck_int (\"isfinite (-3.14)\", isfinite (-3.14), 1);\ncheck_int (\"isfinite (0.7)\", isfinite (0.7), 1);\ncheck_int (\"isfinite (-0.7)\", isfinite (-0.7), 1);\ncheck_int (\"isfinite (3.72e-09)\", isfinite (3.72e-09), 1);\ncheck_int (\"isfinite (-3.72e-09)\", isfinite (-3.72e-09), 1);\ncheck_int (\"isfinite (7.37e+19)\", isfinite (7.37e+19), 1);\ncheck_int (\"isfinite (-7.37e+19)\", isfinite (-7.37e+19), 1);\ncheck_int (\"isinf (0.0)\", isinf (0.0), 0);\ncheck_int (\"isinf (-0.0)\", isinf (-0.0), 0);\ncheck_int (\"isinf (1.0)\", isinf (1.0), 0);\ncheck_int (\"isinf (-1.0)\", isinf (-1.0), 0);\ncheck_int (\"isinf (INFINITY)\", isinf (INFINITY), 1);\ncheck_int (\"isinf (-INFINITY)\", isinf (-INFINITY), -1);\ncheck_int (\"isinf (NAN)\", isinf (NAN), 0);\ncheck_int (\"isinf (3.14)\", isinf (3.14), 0);\ncheck_int (\"isinf (-3.14)\", isinf (-3.14), 0);\ncheck_int (\"isinf (0.7)\", isinf (0.7), 0);\ncheck_int (\"isinf (-0.7)\", isinf (-0.7), 0);\ncheck_int (\"isinf (3.72e-09)\", isinf (3.72e-09), 0);\ncheck_int (\"isinf (-3.72e-09)\", isinf (-3.72e-09), 0);\ncheck_int (\"isinf (7.37e+19)\", isinf (7.37e+19), 0);\ncheck_int (\"isinf (-7.37e+19)\", isinf (-7.37e+19), 0);\ncheck_int (\"isnan (0.0)\", isnan (0.0), 0);\ncheck_int (\"isnan (-0.0)\", isnan (-0.0), 0);\ncheck_int (\"isnan (1.0)\", isnan (1.0), 0);\ncheck_int (\"isnan (-1.0)\", isnan (-1.0), 0);\ncheck_int (\"isnan (INFINITY)\", isnan (INFINITY), 0);\ncheck_int (\"isnan (-INFINITY)\", isnan (-INFINITY), 0);\ncheck_int (\"isnan (NAN)\", isnan (NAN), 1);\ncheck_int (\"isnan (3.14)\", isnan (3.14), 0);\ncheck_int (\"isnan (-3.14)\", isnan (-3.14), 0);\ncheck_int (\"isnan (0.7)\", isnan (0.7), 0);\ncheck_int (\"isnan (-0.7)\", isnan (-0.7), 0);\ncheck_int (\"isnan (3.72e-09)\", isnan (3.72e-09), 0);\ncheck_int (\"isnan (-3.72e-09)\", isnan (-3.72e-09), 0);\ncheck_int (\"isnan (7.37e+19)\", isnan (7.37e+19), 0);\ncheck_int (\"isnan (-7.37e+19)\", isnan (-7.37e+19), 0);\ncheck_double (\"log (0.0)\", log (0.0), -INF);\ncheck_double (\"log (-0.0)\", log (-0.0), -INF);\ncheck_double (\"log (1.0)\", log (1.0), 0.00000000000000000000E+00);\ncheck_double (\"log (-1.0)\", log (-1.0), NAN);\ncheck_double (\"log (INFINITY)\", log (INFINITY), INF);\ncheck_double (\"log (-INFINITY)\", log (-INFINITY), NAN);\ncheck_double (\"log (NAN)\", log (NAN), NAN);\ncheck_double (\"log (M_E)\", log (M_E), 1.00000000000000000000E+00);\ncheck_double (\"log (1.0 / M_E)\", log (1.0 / M_E), -1.00000000000000000000E+00);\ncheck_double (\"log (2)\", log (2), 6.93147180559945286227E-01);\ncheck_double (\"log (10)\", log (10), 2.30258509299404590109E+00);\ncheck_double (\"log (0.7)\", log (0.7), -3.56674943938732447180E-01);\ncheck_double (\"log (2.22e-308)\", log (2.22e-308), -7.08398701446281847893E+02);\ncheck_double (\"log (2.23e-308)\", log (2.23e-308), -7.08394207056694085622E+02);\ncheck_double (\"log (0.17)\", log (0.17), -1.77195684193187519284E+00);\ncheck_double (\"log (0.18)\", log (0.18), -1.71479842809192661868E+00);\ncheck_double (\"log (1999.0)\", log (1999.0), 7.60040233450039970364E+00);\ncheck_double (\"log (2000.0)\", log (2000.0), 7.60090245954208221235E+00);\ncheck_double (\"log (2001.0)\", log (2001.0), 7.60140233458373337783E+00);\ncheck_double (\"log1p (0.0)\", log1p (0.0), 0.00000000000000000000E+00);\ncheck_double (\"log1p (-0.0)\", log1p (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"log1p (1.0)\", log1p (1.0), 6.93147180559945286227E-01);\ncheck_double (\"log1p (-1.0)\", log1p (-1.0), -INF);\ncheck_double (\"log1p (INFINITY)\", log1p (INFINITY), INF);\ncheck_double (\"log1p (-INFINITY)\", log1p (-INFINITY), -NAN);\ncheck_double (\"log1p (NAN)\", log1p (NAN), NAN);\ncheck_double (\"log1p (M_E)\", log1p (M_E), 1.31326168751822280889E+00);\ncheck_double (\"log1p (1.0 / M_E)\", log1p (1.0 / M_E), 3.13261687518222864401E-01);\ncheck_double (\"log1p (2)\", log1p (2), 1.09861228866810978211E+00);\ncheck_double (\"log1p (10)\", log1p (10), 2.39789527279837066942E+00);\ncheck_double (\"log1p (0.7)\", log1p (0.7), 5.30628251062170375185E-01);\ncheck_double (\"log1p (2.22e-308)\", log1p (2.22e-308), 2.22000000000000013467E-308);\ncheck_double (\"log1p (2.23e-308)\", log1p (2.23e-308), 2.23000000000000010412E-308);\ncheck_double (\"log1p (0.17)\", log1p (0.17), 1.57003748809664750441E-01);\ncheck_double (\"log1p (0.18)\", log1p (0.18), 1.65514438477573383457E-01);\ncheck_double (\"log1p (1999.0)\", log1p (1999.0), 7.60090245954208221235E+00);\ncheck_double (\"log1p (2000.0)\", log1p (2000.0), 7.60140233458373337783E+00);\ncheck_double (\"log1p (2001.0)\", log1p (2001.0), 7.60190195987516581511E+00);\ncheck_double (\"log2 (0.0)\", log2 (0.0), -INF);\ncheck_double (\"log2 (-0.0)\", log2 (-0.0), -INF);\ncheck_double (\"log2 (1.0)\", log2 (1.0), 0.00000000000000000000E+00);\ncheck_double (\"log2 (-1.0)\", log2 (-1.0), NAN);\ncheck_double (\"log2 (INFINITY)\", log2 (INFINITY), INF);\ncheck_double (\"log2 (-INFINITY)\", log2 (-INFINITY), NAN);\ncheck_double (\"log2 (NAN)\", log2 (NAN), NAN);\ncheck_double (\"log2 (M_E)\", log2 (M_E), 1.44269504088896338700E+00);\ncheck_double (\"log2 (1.0 / M_E)\", log2 (1.0 / M_E), -1.44269504088896338700E+00);\ncheck_double (\"log2 (2)\", log2 (2), 1.00000000000000000000E+00);\ncheck_double (\"log2 (10)\", log2 (10), 3.32192809488736218171E+00);\ncheck_double (\"log2 (0.7)\", log2 (0.7), -5.14573172829758340718E-01);\ncheck_double (\"log2 (2.22e-308)\", log2 (2.22e-308), -1.02200329354873224474E+03);\ncheck_double (\"log2 (2.23e-308)\", log2 (2.23e-308), -1.02199680951516199912E+03);\ncheck_double (\"log2 (0.17)\", log2 (0.17), -2.55639334852438526724E+00);\ncheck_double (\"log2 (0.18)\", log2 (0.18), -2.47393118833241221211E+00);\ncheck_double (\"log2 (1999.0)\", log2 (1999.0), 1.09650627567446274924E+01);\ncheck_double (\"log2 (2000.0)\", log2 (2000.0), 1.09657842846620869892E+01);\ncheck_double (\"log2 (2001.0)\", log2 (2001.0), 1.09665054519057409976E+01);\ncheck_double (\"log10 (0.0)\", log10 (0.0), -INF);\ncheck_double (\"log10 (-0.0)\", log10 (-0.0), -INF);\ncheck_double (\"log10 (1.0)\", log10 (1.0), 0.00000000000000000000E+00);\ncheck_double (\"log10 (-1.0)\", log10 (-1.0), NAN);\ncheck_double (\"log10 (INFINITY)\", log10 (INFINITY), INF);\ncheck_double (\"log10 (-INFINITY)\", log10 (-INFINITY), NAN);\ncheck_double (\"log10 (NAN)\", log10 (NAN), NAN);\ncheck_double (\"log10 (M_E)\", log10 (M_E), 4.34294481903251816668E-01);\ncheck_double (\"log10 (1.0 / M_E)\", log10 (1.0 / M_E), -4.34294481903251816668E-01);\ncheck_double (\"log10 (2)\", log10 (2), 3.01029995663981198017E-01);\ncheck_double (\"log10 (10)\", log10 (10), 1.00000000000000000000E+00);\ncheck_double (\"log10 (0.7)\", log10 (0.7), -1.54901959985743187254E-01);\ncheck_double (\"log10 (2.22e-308)\", log10 (2.22e-308), -3.07653647025549389582E+02);\ncheck_double (\"log10 (2.23e-308)\", log10 (2.23e-308), -3.07651695136951843779E+02);\ncheck_double (\"log10 (0.17)\", log10 (0.17), -7.69551078621726003526E-01);\ncheck_double (\"log10 (0.18)\", log10 (0.18), -7.44727494896693986703E-01);\ncheck_double (\"log10 (1999.0)\", log10 (1999.0), 3.30081279411811712166E+00);\ncheck_double (\"log10 (2000.0)\", log10 (2000.0), 3.30102999566398125353E+00);\ncheck_double (\"log10 (2001.0)\", log10 (2001.0), 3.30124708863621130206E+00);\ncheck_double (\"pow (0.0, 0.0)\", pow (0.0, 0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (0.0, -0.0)\", pow (0.0, -0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (-0.0, 0.0)\", pow (-0.0, 0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (-0.0, -0.0)\", pow (-0.0, -0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (0.0, 1.0)\", pow (0.0, 1.0), 0.00000000000000000000E+00);\ncheck_double (\"pow (0.0, -1.0)\", pow (0.0, -1.0), INF);\ncheck_double (\"pow (-0.0, 1.0)\", pow (-0.0, 1.0), -0.00000000000000000000E+00);\ncheck_double (\"pow (-0.0, -1.0)\", pow (-0.0, -1.0), -INF);\ncheck_double (\"pow (0.0, INFINITY)\", pow (0.0, INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"pow (0.0, -INFINITY)\", pow (0.0, -INFINITY), INF);\ncheck_double (\"pow (-0.0, INFINITY)\", pow (-0.0, INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"pow (-0.0, -INFINITY)\", pow (-0.0, -INFINITY), INF);\ncheck_double (\"pow (0.0, NAN)\", pow (0.0, NAN), NAN);\ncheck_double (\"pow (-0.0, NAN)\", pow (-0.0, NAN), NAN);\ncheck_double (\"pow (1.0, 0.0)\", pow (1.0, 0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (1.0, -0.0)\", pow (1.0, -0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (-1.0, 0.0)\", pow (-1.0, 0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (-1.0, -0.0)\", pow (-1.0, -0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (1.0, 1.0)\", pow (1.0, 1.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (1.0, -1.0)\", pow (1.0, -1.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (-1.0, 1.0)\", pow (-1.0, 1.0), -1.00000000000000000000E+00);\ncheck_double (\"pow (-1.0, -1.0)\", pow (-1.0, -1.0), -1.00000000000000000000E+00);\ncheck_double (\"pow (1.0, INFINITY)\", pow (1.0, INFINITY), 1.00000000000000000000E+00);\ncheck_double (\"pow (1.0, -INFINITY)\", pow (1.0, -INFINITY), 1.00000000000000000000E+00);\ncheck_double (\"pow (-1.0, INFINITY)\", pow (-1.0, INFINITY), 1.00000000000000000000E+00);\ncheck_double (\"pow (-1.0, -INFINITY)\", pow (-1.0, -INFINITY), 1.00000000000000000000E+00);\ncheck_double (\"pow (1.0, NAN)\", pow (1.0, NAN), 1.00000000000000000000E+00);\ncheck_double (\"pow (-1.0, NAN)\", pow (-1.0, NAN), NAN);\ncheck_double (\"pow (INFINITY, 0.0)\", pow (INFINITY, 0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (INFINITY, -0.0)\", pow (INFINITY, -0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (-INFINITY, 0.0)\", pow (-INFINITY, 0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (-INFINITY, -0.0)\", pow (-INFINITY, -0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (INFINITY, 1.0)\", pow (INFINITY, 1.0), INF);\ncheck_double (\"pow (INFINITY, -1.0)\", pow (INFINITY, -1.0), 0.00000000000000000000E+00);\ncheck_double (\"pow (-INFINITY, 1.0)\", pow (-INFINITY, 1.0), -INF);\ncheck_double (\"pow (-INFINITY, -1.0)\", pow (-INFINITY, -1.0), -0.00000000000000000000E+00);\ncheck_double (\"pow (INFINITY, INFINITY)\", pow (INFINITY, INFINITY), INF);\ncheck_double (\"pow (INFINITY, -INFINITY)\", pow (INFINITY, -INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"pow (-INFINITY, INFINITY)\", pow (-INFINITY, INFINITY), INF);\ncheck_double (\"pow (-INFINITY, -INFINITY)\", pow (-INFINITY, -INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"pow (INFINITY, NAN)\", pow (INFINITY, NAN), NAN);\ncheck_double (\"pow (-INFINITY, NAN)\", pow (-INFINITY, NAN), NAN);\ncheck_double (\"pow (NAN, 0.0)\", pow (NAN, 0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (NAN, -0.0)\", pow (NAN, -0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (NAN, 1.0)\", pow (NAN, 1.0), NAN);\ncheck_double (\"pow (NAN, -1.0)\", pow (NAN, -1.0), NAN);\ncheck_double (\"pow (NAN, INFINITY)\", pow (NAN, INFINITY), NAN);\ncheck_double (\"pow (NAN, -INFINITY)\", pow (NAN, -INFINITY), NAN);\ncheck_double (\"pow (NAN, NAN)\", pow (NAN, NAN), NAN);\ncheck_double (\"pow (0.9, INFINITY)\", pow (0.9, INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"pow (0.9, -INFINITY)\", pow (0.9, -INFINITY), INF);\ncheck_double (\"pow (-0.9, INFINITY)\", pow (-0.9, INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"pow (-0.9, -INFINITY)\", pow (-0.9, -INFINITY), INF);\ncheck_double (\"pow (1.1, INFINITY)\", pow (1.1, INFINITY), INF);\ncheck_double (\"pow (1.1, -INFINITY)\", pow (1.1, -INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"pow (-1.1, INFINITY)\", pow (-1.1, INFINITY), INF);\ncheck_double (\"pow (-1.1, -INFINITY)\", pow (-1.1, -INFINITY), 0.00000000000000000000E+00);\ncheck_double (\"pow (0.0, 2.0)\", pow (0.0, 2.0), 0.00000000000000000000E+00);\ncheck_double (\"pow (0.0, -2.0)\", pow (0.0, -2.0), INF);\ncheck_double (\"pow (-0.0, 2.0)\", pow (-0.0, 2.0), 0.00000000000000000000E+00);\ncheck_double (\"pow (-0.0, -2.0)\", pow (-0.0, -2.0), INF);\ncheck_double (\"pow (0.0, 3.0)\", pow (0.0, 3.0), 0.00000000000000000000E+00);\ncheck_double (\"pow (0.0, -3.0)\", pow (0.0, -3.0), INF);\ncheck_double (\"pow (-0.0, 3.0)\", pow (-0.0, 3.0), -0.00000000000000000000E+00);\ncheck_double (\"pow (-0.0, -3.0)\", pow (-0.0, -3.0), -INF);\ncheck_double (\"pow (0.0, 3.14)\", pow (0.0, 3.14), 0.00000000000000000000E+00);\ncheck_double (\"pow (0.0, -3.14)\", pow (0.0, -3.14), INF);\ncheck_double (\"pow (-0.0, 3.14)\", pow (-0.0, 3.14), 0.00000000000000000000E+00);\ncheck_double (\"pow (-0.0, -3.14)\", pow (-0.0, -3.14), INF);\ncheck_double (\"pow (1.0, 3.14)\", pow (1.0, 3.14), 1.00000000000000000000E+00);\ncheck_double (\"pow (1.0, -3.14)\", pow (1.0, -3.14), 1.00000000000000000000E+00);\ncheck_double (\"pow (-1.0, 3.14)\", pow (-1.0, 3.14), -NAN);\ncheck_double (\"pow (-1.0, -3.14)\", pow (-1.0, -3.14), -NAN);\ncheck_double (\"pow (3.14, 0.0)\", pow (3.14, 0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (3.14, -0.0)\", pow (3.14, -0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (-3.14, 0.0)\", pow (-3.14, 0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (-3.14, -0.0)\", pow (-3.14, -0.0), 1.00000000000000000000E+00);\ncheck_double (\"pow (3.14, 1.0)\", pow (3.14, 1.0), 3.14000000000000012434E+00);\ncheck_double (\"pow (3.14, -1.0)\", pow (3.14, -1.0), 3.18471337579617819191E-01);\ncheck_double (\"pow (-3.14, 1.0)\", pow (-3.14, 1.0), -3.14000000000000012434E+00);\ncheck_double (\"pow (-3.14, -1.0)\", pow (-3.14, -1.0), -3.18471337579617819191E-01);\ncheck_double (\"pow (3.14, 2.0)\", pow (3.14, 2.0), 9.85960000000000036380E+00);\ncheck_double (\"pow (3.14, -2.0)\", pow (3.14, -2.0), 1.01423992859750899953E-01);\ncheck_double (\"pow (-3.14, 2.0)\", pow (-3.14, 2.0), 9.85960000000000036380E+00);\ncheck_double (\"pow (-3.14, -2.0)\", pow (-3.14, -2.0), 1.01423992859750899953E-01);\ncheck_double (\"pow (3.14, 3.0)\", pow (3.14, 3.0), 3.09591440000000019950E+01);\ncheck_double (\"pow (3.14, -3.0)\", pow (3.14, -3.0), 3.23006346687104775595E-02);\ncheck_double (\"pow (-3.14, 3.0)\", pow (-3.14, 3.0), -3.09591440000000019950E+01);\ncheck_double (\"pow (-3.14, -3.0)\", pow (-3.14, -3.0), -3.23006346687104775595E-02);\ncheck_double (\"pow (3.14, 3.14)\", pow (3.14, 3.14), 3.63378388801747078674E+01);\ncheck_double (\"pow (3.14, -3.14)\", pow (3.14, -3.14), 2.75195231972252124519E-02);\ncheck_double (\"pow (-3.14, 3.14)\", pow (-3.14, 3.14), -NAN);\ncheck_double (\"pow (-3.14, -3.14)\", pow (-3.14, -3.14), -NAN);\ncheck_double (\"pow (INFINITY, 2.0)\", pow (INFINITY, 2.0), INF);\ncheck_double (\"pow (INFINITY, -2.0)\", pow (INFINITY, -2.0), 0.00000000000000000000E+00);\ncheck_double (\"pow (-INFINITY, 2.0)\", pow (-INFINITY, 2.0), INF);\ncheck_double (\"pow (-INFINITY, -2.0)\", pow (-INFINITY, -2.0), 0.00000000000000000000E+00);\ncheck_double (\"pow (INFINITY, 3.0)\", pow (INFINITY, 3.0), INF);\ncheck_double (\"pow (INFINITY, -3.0)\", pow (INFINITY, -3.0), 0.00000000000000000000E+00);\ncheck_double (\"pow (-INFINITY, 3.0)\", pow (-INFINITY, 3.0), -INF);\ncheck_double (\"pow (-INFINITY, -3.0)\", pow (-INFINITY, -3.0), -0.00000000000000000000E+00);\ncheck_double (\"pow (INFINITY, 3.14)\", pow (INFINITY, 3.14), INF);\ncheck_double (\"pow (INFINITY, -3.14)\", pow (INFINITY, -3.14), 0.00000000000000000000E+00);\ncheck_double (\"pow (-INFINITY, 3.14)\", pow (-INFINITY, 3.14), INF);\ncheck_double (\"pow (-INFINITY, -3.14)\", pow (-INFINITY, -3.14), 0.00000000000000000000E+00);\ncheck_double (\"pow (0.7, 1.2)\", pow (0.7, 1.2), 6.51804940566386381562E-01);\ncheck_double (\"sqrt (0.0)\", sqrt (0.0), 0.00000000000000000000E+00);\ncheck_double (\"sqrt (-0.0)\", sqrt (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"sqrt (1.0)\", sqrt (1.0), 1.00000000000000000000E+00);\ncheck_double (\"sqrt (-1.0)\", sqrt (-1.0), -NAN);\ncheck_double (\"sqrt (INFINITY)\", sqrt (INFINITY), INF);\ncheck_double (\"sqrt (-INFINITY)\", sqrt (-INFINITY), -NAN);\ncheck_double (\"sqrt (NAN)\", sqrt (NAN), NAN);\ncheck_double (\"sqrt (0.7)\", sqrt (0.7), 8.36660026534075562665E-01);\ncheck_double (\"sqrt (2)\", sqrt (2), 1.41421356237309514547E+00);\ncheck_double (\"sqrt (10)\", sqrt (10), 3.16227766016837952279E+00);\ncheck_double (\"sqrt (2.22e-308)\", sqrt (2.22e-308), 1.48996644257513405066E-154);\ncheck_double (\"sqrt (2.23e-308)\", sqrt (2.23e-308), 1.49331845230680803391E-154);\ncheck_double (\"sqrt (3.72e-09)\", sqrt (3.72e-09), 6.09918027279076225416E-05);\ncheck_double (\"sqrt (7.37e+19)\", sqrt (7.37e+19), 8.58487041253390121460E+09);\ncheck_double (\"sqrt (2209)\", sqrt (2209), 4.70000000000000000000E+01);\ncheck_double (\"sqrt (4)\", sqrt (4), 2.00000000000000000000E+00);\ncheck_double (\"sqrt (0.25)\", sqrt (0.25), 5.00000000000000000000E-01);\ncheck_double (\"sqrt (6642.25)\", sqrt (6642.25), 8.15000000000000000000E+01);\ncheck_double (\"sqrt (15239.9025)\", sqrt (15239.9025), 1.23450000000000002842E+02);\ncheck_double (\"cbrt (0.0)\", cbrt (0.0), 0.00000000000000000000E+00);\ncheck_double (\"cbrt (-0.0)\", cbrt (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"cbrt (1.0)\", cbrt (1.0), 1.00000000000000000000E+00);\ncheck_double (\"cbrt (-1.0)\", cbrt (-1.0), -1.00000000000000000000E+00);\ncheck_double (\"cbrt (INFINITY)\", cbrt (INFINITY), INF);\ncheck_double (\"cbrt (-INFINITY)\", cbrt (-INFINITY), -INF);\ncheck_double (\"cbrt (NAN)\", cbrt (NAN), NAN);\ncheck_double (\"cbrt (0.7)\", cbrt (0.7), 8.87904001742600645919E-01);\ncheck_double (\"cbrt (2)\", cbrt (2), 1.25992104989487319067E+00);\ncheck_double (\"cbrt (10)\", cbrt (10), 2.15443469003188381450E+00);\ncheck_double (\"cbrt (2.22e-308)\", cbrt (2.22e-308), 2.81050475771047639693E-103);\ncheck_double (\"cbrt (2.23e-308)\", cbrt (2.23e-308), 2.81471841433133404618E-103);\ncheck_double (\"cbrt (3.72e-09)\", cbrt (3.72e-09), 1.54946217899915657419E-03);\ncheck_double (\"cbrt (7.37e+19)\", cbrt (7.37e+19), 4.19265534205965511501E+06);\ncheck_double (\"cbrt (2209)\", cbrt (2209), 1.30236256766892157799E+01);\ncheck_double (\"cbrt (4)\", cbrt (4), 1.58740105196819958344E+00);\ncheck_double (\"cbrt (0.25)\", cbrt (0.25), 6.29960524947436595333E-01);\ncheck_double (\"cbrt (6642.25)\", cbrt (6642.25), 1.87977155063238647870E+01);\ncheck_double (\"cbrt (15239.9025)\", cbrt (15239.9025), 2.47929038511971775449E+01);\ncheck_double (\"cbrt (3)\", cbrt (3), 1.44224957030740830177E+00);\ncheck_double (\"cbrt (9)\", cbrt (9), 2.08008382305190409056E+00);\ncheck_double (\"cbrt (-17.87)\", cbrt (-17.87), -2.61441695192974155049E+00);\ncheck_double (\"cbrt (-8941)\", cbrt (-8941), -2.07552848589356599973E+01);\ncheck_double (\"sin (0.0)\", sin (0.0), 0.00000000000000000000E+00);\ncheck_double (\"sin (-0.0)\", sin (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"sin (1.0)\", sin (1.0), 8.41470984807896504876E-01);\ncheck_double (\"sin (-1.0)\", sin (-1.0), -8.41470984807896504876E-01);\ncheck_double (\"sin (INFINITY)\", sin (INFINITY), -NAN);\ncheck_double (\"sin (-INFINITY)\", sin (-INFINITY), -NAN);\ncheck_double (\"sin (NAN)\", sin (NAN), NAN);\ncheck_double (\"sin (M_PI)\", sin (M_PI), 1.22464679914735320717E-16);\ncheck_double (\"sin (-M_PI)\", sin (-M_PI), -1.22464679914735320717E-16);\ncheck_double (\"sin (2.0 * M_PI)\", sin (2.0 * M_PI), -2.44929359829470641435E-16);\ncheck_double (\"sin (-2.0 * M_PI)\", sin (-2.0 * M_PI), 2.44929359829470641435E-16);\ncheck_double (\"sin (M_PI / 2.0)\", sin (M_PI / 2.0), 1.00000000000000000000E+00);\ncheck_double (\"sin (-M_PI / 2.0)\", sin (-M_PI / 2.0), -1.00000000000000000000E+00);\ncheck_double (\"sin (M_PI / 3.0)\", sin (M_PI / 3.0), 8.66025403784438596588E-01);\ncheck_double (\"sin (-M_PI / 3.0)\", sin (-M_PI / 3.0), -8.66025403784438596588E-01);\ncheck_double (\"sin (M_PI / 4.0)\", sin (M_PI / 4.0), 7.07106781186547461715E-01);\ncheck_double (\"sin (-M_PI / 4.0)\", sin (-M_PI / 4.0), -7.07106781186547461715E-01);\ncheck_double (\"sin (M_PI / 6.0)\", sin (M_PI / 6.0), 4.99999999999999944489E-01);\ncheck_double (\"sin (-M_PI / 6.0)\", sin (-M_PI / 6.0), -4.99999999999999944489E-01);\ncheck_double (\"sin (M_PI * 2.0 / 3.0)\", sin (M_PI * 2.0 / 3.0), 8.66025403784438707611E-01);\ncheck_double (\"sin (-M_PI * 2.0 / 3.0)\", sin (-M_PI * 2.0 / 3.0), -8.66025403784438707611E-01);\ncheck_double (\"sin (M_PI * 5.0 / 6.0)\", sin (M_PI * 5.0 / 6.0), 4.99999999999999944489E-01);\ncheck_double (\"sin (-M_PI * 5.0 / 6.0)\", sin (-M_PI * 5.0 / 6.0), -4.99999999999999944489E-01);\ncheck_double (\"sin (6.9e-18)\", sin (6.9e-18), 6.90000000000000026253E-18);\ncheck_double (\"sin (-6.9e-18)\", sin (-6.9e-18), -6.90000000000000026253E-18);\ncheck_double (\"sin (7.0e-18)\", sin (7.0e-18), 6.99999999999999973042E-18);\ncheck_double (\"sin (-7.0e-18)\", sin (-7.0e-18), -6.99999999999999973042E-18);\ncheck_double (\"sin (7.4e-9)\", sin (7.4e-9), 7.40000000000000008865E-09);\ncheck_double (\"sin (-7.4e-9)\", sin (-7.4e-9), -7.40000000000000008865E-09);\ncheck_double (\"sin (7.5e-9)\", sin (7.5e-9), 7.49999999999999932974E-09);\ncheck_double (\"sin (-7.5e-9)\", sin (-7.5e-9), -7.49999999999999932974E-09);\ncheck_double (\"sin (0.2)\", sin (0.2), 1.98669330795061216399E-01);\ncheck_double (\"sin (-0.2)\", sin (-0.2), -1.98669330795061216399E-01);\ncheck_double (\"sin (0.4)\", sin (0.4), 3.89418342308650522465E-01);\ncheck_double (\"sin (-0.4)\", sin (-0.4), -3.89418342308650522465E-01);\ncheck_double (\"sin (0.7)\", sin (0.7), 6.44217687237691016833E-01);\ncheck_double (\"sin (-0.7)\", sin (-0.7), -6.44217687237691016833E-01);\ncheck_double (\"sin (0.8)\", sin (0.8), 7.17356090899522791382E-01);\ncheck_double (\"sin (-0.8)\", sin (-0.8), -7.17356090899522791382E-01);\ncheck_double (\"sin (3.0)\", sin (3.0), 1.41120008059867213523E-01);\ncheck_double (\"sin (-3.0)\", sin (-3.0), -1.41120008059867213523E-01);\ncheck_double (\"sin (4.0)\", sin (4.0), -7.56802495307928202450E-01);\ncheck_double (\"sin (-4.0)\", sin (-4.0), 7.56802495307928202450E-01);\ncheck_double (\"sin (6.0)\", sin (6.0), -2.79415498198925860152E-01);\ncheck_double (\"sin (-6.0)\", sin (-6.0), 2.79415498198925860152E-01);\ncheck_double (\"sin (7.0)\", sin (7.0), 6.56986598718789061024E-01);\ncheck_double (\"sin (-7.0)\", sin (-7.0), -6.56986598718789061024E-01);\ncheck_double (\"cos (0.0)\", cos (0.0), 1.00000000000000000000E+00);\ncheck_double (\"cos (-0.0)\", cos (-0.0), 1.00000000000000000000E+00);\ncheck_double (\"cos (1.0)\", cos (1.0), 5.40302305868139765010E-01);\ncheck_double (\"cos (-1.0)\", cos (-1.0), 5.40302305868139765010E-01);\ncheck_double (\"cos (INFINITY)\", cos (INFINITY), -NAN);\ncheck_double (\"cos (-INFINITY)\", cos (-INFINITY), -NAN);\ncheck_double (\"cos (NAN)\", cos (NAN), NAN);\ncheck_double (\"cos (M_PI)\", cos (M_PI), -1.00000000000000000000E+00);\ncheck_double (\"cos (-M_PI)\", cos (-M_PI), -1.00000000000000000000E+00);\ncheck_double (\"cos (2.0 * M_PI)\", cos (2.0 * M_PI), 1.00000000000000000000E+00);\ncheck_double (\"cos (-2.0 * M_PI)\", cos (-2.0 * M_PI), 1.00000000000000000000E+00);\ncheck_double (\"cos (M_PI / 2.0)\", cos (M_PI / 2.0), 6.12323399573676603587E-17);\ncheck_double (\"cos (-M_PI / 2.0)\", cos (-M_PI / 2.0), 6.12323399573676603587E-17);\ncheck_double (\"cos (M_PI / 3.0)\", cos (M_PI / 3.0), 5.00000000000000111022E-01);\ncheck_double (\"cos (-M_PI / 3.0)\", cos (-M_PI / 3.0), 5.00000000000000111022E-01);\ncheck_double (\"cos (M_PI / 4.0)\", cos (M_PI / 4.0), 7.07106781186547572737E-01);\ncheck_double (\"cos (-M_PI / 4.0)\", cos (-M_PI / 4.0), 7.07106781186547572737E-01);\ncheck_double (\"cos (M_PI / 6.0)\", cos (M_PI / 6.0), 8.66025403784438707611E-01);\ncheck_double (\"cos (-M_PI / 6.0)\", cos (-M_PI / 6.0), 8.66025403784438707611E-01);\ncheck_double (\"cos (M_PI * 2.0 / 3.0)\", cos (M_PI * 2.0 / 3.0), -4.99999999999999777955E-01);\ncheck_double (\"cos (-M_PI * 2.0 / 3.0)\", cos (-M_PI * 2.0 / 3.0), -4.99999999999999777955E-01);\ncheck_double (\"cos (M_PI * 5.0 / 6.0)\", cos (M_PI * 5.0 / 6.0), -8.66025403784438707611E-01);\ncheck_double (\"cos (-M_PI * 5.0 / 6.0)\", cos (-M_PI * 5.0 / 6.0), -8.66025403784438707611E-01);\ncheck_double (\"cos (6.9e-18)\", cos (6.9e-18), 1.00000000000000000000E+00);\ncheck_double (\"cos (-6.9e-18)\", cos (-6.9e-18), 1.00000000000000000000E+00);\ncheck_double (\"cos (7.0e-18)\", cos (7.0e-18), 1.00000000000000000000E+00);\ncheck_double (\"cos (-7.0e-18)\", cos (-7.0e-18), 1.00000000000000000000E+00);\ncheck_double (\"cos (7.4e-9)\", cos (7.4e-9), 1.00000000000000000000E+00);\ncheck_double (\"cos (-7.4e-9)\", cos (-7.4e-9), 1.00000000000000000000E+00);\ncheck_double (\"cos (7.5e-9)\", cos (7.5e-9), 1.00000000000000000000E+00);\ncheck_double (\"cos (-7.5e-9)\", cos (-7.5e-9), 1.00000000000000000000E+00);\ncheck_double (\"cos (0.2)\", cos (0.2), 9.80066577841241626246E-01);\ncheck_double (\"cos (-0.2)\", cos (-0.2), 9.80066577841241626246E-01);\ncheck_double (\"cos (0.4)\", cos (0.4), 9.21060994002885102816E-01);\ncheck_double (\"cos (-0.4)\", cos (-0.4), 9.21060994002885102816E-01);\ncheck_double (\"cos (0.7)\", cos (0.7), 7.64842187284488495003E-01);\ncheck_double (\"cos (-0.7)\", cos (-0.7), 7.64842187284488495003E-01);\ncheck_double (\"cos (0.8)\", cos (0.8), 6.96706709347165387136E-01);\ncheck_double (\"cos (-0.8)\", cos (-0.8), 6.96706709347165387136E-01);\ncheck_double (\"cos (3.0)\", cos (3.0), -9.89992496600445415211E-01);\ncheck_double (\"cos (-3.0)\", cos (-3.0), -9.89992496600445415211E-01);\ncheck_double (\"cos (4.0)\", cos (4.0), -6.53643620863611940486E-01);\ncheck_double (\"cos (-4.0)\", cos (-4.0), -6.53643620863611940486E-01);\ncheck_double (\"cos (6.0)\", cos (6.0), 9.60170286650365967240E-01);\ncheck_double (\"cos (-6.0)\", cos (-6.0), 9.60170286650365967240E-01);\ncheck_double (\"cos (7.0)\", cos (7.0), 7.53902254343304600859E-01);\ncheck_double (\"cos (-7.0)\", cos (-7.0), 7.53902254343304600859E-01);\ncheck_double (\"tan (0.0)\", tan (0.0), 0.00000000000000000000E+00);\ncheck_double (\"tan (-0.0)\", tan (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"tan (1.0)\", tan (1.0), 1.55740772465490229237E+00);\ncheck_double (\"tan (-1.0)\", tan (-1.0), -1.55740772465490229237E+00);\ncheck_double (\"tan (INFINITY)\", tan (INFINITY), -NAN);\ncheck_double (\"tan (-INFINITY)\", tan (-INFINITY), -NAN);\ncheck_double (\"tan (NAN)\", tan (NAN), NAN);\ncheck_double (\"tan (M_PI)\", tan (M_PI), -1.22464679914735320717E-16);\ncheck_double (\"tan (-M_PI)\", tan (-M_PI), 1.22464679914735320717E-16);\ncheck_double (\"tan (2.0 * M_PI)\", tan (2.0 * M_PI), -2.44929359829470641435E-16);\ncheck_double (\"tan (-2.0 * M_PI)\", tan (-2.0 * M_PI), 2.44929359829470641435E-16);\ncheck_double (\"tan (M_PI / 2.0)\", tan (M_PI / 2.0), 1.63312393531953700000E+16);\ncheck_double (\"tan (-M_PI / 2.0)\", tan (-M_PI / 2.0), -1.63312393531953700000E+16);\ncheck_double (\"tan (M_PI / 3.0)\", tan (M_PI / 3.0), 1.73205080756887674909E+00);\ncheck_double (\"tan (-M_PI / 3.0)\", tan (-M_PI / 3.0), -1.73205080756887674909E+00);\ncheck_double (\"tan (M_PI / 4.0)\", tan (M_PI / 4.0), 9.99999999999999888978E-01);\ncheck_double (\"tan (-M_PI / 4.0)\", tan (-M_PI / 4.0), -9.99999999999999888978E-01);\ncheck_double (\"tan (M_PI / 6.0)\", tan (M_PI / 6.0), 5.77350269189625731059E-01);\ncheck_double (\"tan (-M_PI / 6.0)\", tan (-M_PI / 6.0), -5.77350269189625731059E-01);\ncheck_double (\"tan (M_PI * 2.0 / 3.0)\", tan (M_PI * 2.0 / 3.0), -1.73205080756887830340E+00);\ncheck_double (\"tan (-M_PI * 2.0 / 3.0)\", tan (-M_PI * 2.0 / 3.0), 1.73205080756887830340E+00);\ncheck_double (\"tan (M_PI * 5.0 / 6.0)\", tan (M_PI * 5.0 / 6.0), -5.77350269189625731059E-01);\ncheck_double (\"tan (-M_PI * 5.0 / 6.0)\", tan (-M_PI * 5.0 / 6.0), 5.77350269189625731059E-01);\ncheck_double (\"tan (3.7e-9)\", tan (3.7e-9), 3.70000000000000004433E-09);\ncheck_double (\"tan (-3.7e-9)\", tan (-3.7e-9), -3.70000000000000004433E-09);\ncheck_double (\"tan (3.8e-9)\", tan (3.8e-9), 3.80000000000000011259E-09);\ncheck_double (\"tan (-3.8e-9)\", tan (-3.8e-9), -3.80000000000000011259E-09);\ncheck_double (\"tan (0.6)\", tan (0.6), 6.84136808341692326252E-01);\ncheck_double (\"tan (-0.6)\", tan (-0.6), -6.84136808341692326252E-01);\ncheck_double (\"tan (0.7)\", tan (0.7), 8.42288380463079411342E-01);\ncheck_double (\"tan (-0.7)\", tan (-0.7), -8.42288380463079411342E-01);\ncheck_double (\"tan (3.0)\", tan (3.0), -1.42546543074277803909E-01);\ncheck_double (\"tan (-3.0)\", tan (-3.0), 1.42546543074277803909E-01);\ncheck_double (\"tan (4.0)\", tan (4.0), 1.15782128234957748525E+00);\ncheck_double (\"tan (-4.0)\", tan (-4.0), -1.15782128234957748525E+00);\ncheck_double (\"tan (6.0)\", tan (6.0), -2.91006191384749146600E-01);\ncheck_double (\"tan (-6.0)\", tan (-6.0), 2.91006191384749146600E-01);\ncheck_double (\"tan (7.0)\", tan (7.0), 8.71447982724318781500E-01);\ncheck_double (\"tan (-7.0)\", tan (-7.0), -8.71447982724318781500E-01);\ncheck_double (\"cosh (0.0)\", cosh (0.0), 1.00000000000000000000E+00);\ncheck_double (\"cosh (-0.0)\", cosh (-0.0), 1.00000000000000000000E+00);\ncheck_double (\"cosh (1.0)\", cosh (1.0), 1.54308063481524371241E+00);\ncheck_double (\"cosh (-1.0)\", cosh (-1.0), 1.54308063481524371241E+00);\ncheck_double (\"cosh (INFINITY)\", cosh (INFINITY), INF);\ncheck_double (\"cosh (-INFINITY)\", cosh (-INFINITY), INF);\ncheck_double (\"cosh (NAN)\", cosh (NAN), NAN);\ncheck_double (\"cosh (M_PI)\", cosh (M_PI), 1.15919532755215186626E+01);\ncheck_double (\"cosh (-M_PI)\", cosh (-M_PI), 1.15919532755215186626E+01);\ncheck_double (\"cosh (2.0 * M_PI)\", cosh (2.0 * M_PI), 2.67746761483748173305E+02);\ncheck_double (\"cosh (-2.0 * M_PI)\", cosh (-2.0 * M_PI), 2.67746761483748173305E+02);\ncheck_double (\"cosh (M_PI / 2.0)\", cosh (M_PI / 2.0), 2.50917847865805665464E+00);\ncheck_double (\"cosh (-M_PI / 2.0)\", cosh (-M_PI / 2.0), 2.50917847865805665464E+00);\ncheck_double (\"cosh (M_PI / 3.0)\", cosh (M_PI / 3.0), 1.60028685770238610075E+00);\ncheck_double (\"cosh (-M_PI / 3.0)\", cosh (-M_PI / 3.0), 1.60028685770238610075E+00);\ncheck_double (\"cosh (M_PI / 4.0)\", cosh (M_PI / 4.0), 1.32460908925200571140E+00);\ncheck_double (\"cosh (-M_PI / 4.0)\", cosh (-M_PI / 4.0), 1.32460908925200571140E+00);\ncheck_double (\"cosh (M_PI / 6.0)\", cosh (M_PI / 6.0), 1.14023832107642886236E+00);\ncheck_double (\"cosh (-M_PI / 6.0)\", cosh (-M_PI / 6.0), 1.14023832107642886236E+00);\ncheck_double (\"cosh (M_PI * 2.0 / 3.0)\", cosh (M_PI * 2.0 / 3.0), 4.12183605386995388642E+00);\ncheck_double (\"cosh (-M_PI * 2.0 / 3.0)\", cosh (-M_PI * 2.0 / 3.0), 4.12183605386995388642E+00);\ncheck_double (\"cosh (M_PI * 5.0 / 6.0)\", cosh (M_PI * 5.0 / 6.0), 6.89057236497588299073E+00);\ncheck_double (\"cosh (-M_PI * 5.0 / 6.0)\", cosh (-M_PI * 5.0 / 6.0), 6.89057236497588299073E+00);\ncheck_double (\"cosh (6.9e-18)\", cosh (6.9e-18), 1.00000000000000000000E+00);\ncheck_double (\"cosh (-6.9e-18)\", cosh (-6.9e-18), 1.00000000000000000000E+00);\ncheck_double (\"cosh (7.0e-18)\", cosh (7.0e-18), 1.00000000000000000000E+00);\ncheck_double (\"cosh (-7.0e-18)\", cosh (-7.0e-18), 1.00000000000000000000E+00);\ncheck_double (\"cosh (7.4e-9)\", cosh (7.4e-9), 1.00000000000000000000E+00);\ncheck_double (\"cosh (-7.4e-9)\", cosh (-7.4e-9), 1.00000000000000000000E+00);\ncheck_double (\"cosh (7.5e-9)\", cosh (7.5e-9), 1.00000000000000000000E+00);\ncheck_double (\"cosh (-7.5e-9)\", cosh (-7.5e-9), 1.00000000000000000000E+00);\ncheck_double (\"cosh (0.2)\", cosh (0.2), 1.02006675561907589334E+00);\ncheck_double (\"cosh (-0.2)\", cosh (-0.2), 1.02006675561907589334E+00);\ncheck_double (\"cosh (0.4)\", cosh (0.4), 1.08107237183845472650E+00);\ncheck_double (\"cosh (-0.4)\", cosh (-0.4), 1.08107237183845472650E+00);\ncheck_double (\"cosh (0.7)\", cosh (0.7), 1.25516900563094302434E+00);\ncheck_double (\"cosh (-0.7)\", cosh (-0.7), 1.25516900563094302434E+00);\ncheck_double (\"cosh (0.8)\", cosh (0.8), 1.33743494630484471841E+00);\ncheck_double (\"cosh (-0.8)\", cosh (-0.8), 1.33743494630484471841E+00);\ncheck_double (\"cosh (3.0)\", cosh (3.0), 1.00676619957777653269E+01);\ncheck_double (\"cosh (-3.0)\", cosh (-3.0), 1.00676619957777653269E+01);\ncheck_double (\"cosh (4.0)\", cosh (4.0), 2.73082328360164865444E+01);\ncheck_double (\"cosh (-4.0)\", cosh (-4.0), 2.73082328360164865444E+01);\ncheck_double (\"cosh (6.0)\", cosh (6.0), 2.01715636122455890700E+02);\ncheck_double (\"cosh (-6.0)\", cosh (-6.0), 2.01715636122455890700E+02);\ncheck_double (\"cosh (7.0)\", cosh (7.0), 5.48317035155212124664E+02);\ncheck_double (\"cosh (-7.0)\", cosh (-7.0), 5.48317035155212124664E+02);\ncheck_double (\"sinh (0.0)\", sinh (0.0), 0.00000000000000000000E+00);\ncheck_double (\"sinh (-0.0)\", sinh (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"sinh (1.0)\", sinh (1.0), 1.17520119364380137839E+00);\ncheck_double (\"sinh (-1.0)\", sinh (-1.0), -1.17520119364380137839E+00);\ncheck_double (\"sinh (INFINITY)\", sinh (INFINITY), INF);\ncheck_double (\"sinh (-INFINITY)\", sinh (-INFINITY), -INF);\ncheck_double (\"sinh (NAN)\", sinh (NAN), NAN);\ncheck_double (\"sinh (M_PI)\", sinh (M_PI), 1.15487393572577463630E+01);\ncheck_double (\"sinh (-M_PI)\", sinh (-M_PI), -1.15487393572577463630E+01);\ncheck_double (\"sinh (2.0 * M_PI)\", sinh (2.0 * M_PI), 2.67744894041016436859E+02);\ncheck_double (\"sinh (-2.0 * M_PI)\", sinh (-2.0 * M_PI), -2.67744894041016436859E+02);\ncheck_double (\"sinh (M_PI / 2.0)\", sinh (M_PI / 2.0), 2.30129890230729472478E+00);\ncheck_double (\"sinh (-M_PI / 2.0)\", sinh (-M_PI / 2.0), -2.30129890230729472478E+00);\ncheck_double (\"sinh (M_PI / 3.0)\", sinh (M_PI / 3.0), 1.24936705052397512006E+00);\ncheck_double (\"sinh (-M_PI / 3.0)\", sinh (-M_PI / 3.0), -1.24936705052397512006E+00);\ncheck_double (\"sinh (M_PI / 4.0)\", sinh (M_PI / 4.0), 8.68670961486009529651E-01);\ncheck_double (\"sinh (-M_PI / 4.0)\", sinh (-M_PI / 4.0), -8.68670961486009529651E-01);\ncheck_double (\"sinh (M_PI / 6.0)\", sinh (M_PI / 6.0), 5.47853473888039732564E-01);\ncheck_double (\"sinh (-M_PI / 6.0)\", sinh (-M_PI / 6.0), -5.47853473888039732564E-01);\ncheck_double (\"sinh (M_PI * 2.0 / 3.0)\", sinh (M_PI * 2.0 / 3.0), 3.99869134279982052504E+00);\ncheck_double (\"sinh (-M_PI * 2.0 / 3.0)\", sinh (-M_PI * 2.0 / 3.0), -3.99869134279982052504E+00);\ncheck_double (\"sinh (M_PI * 5.0 / 6.0)\", sinh (M_PI * 5.0 / 6.0), 6.81762330412654371514E+00);\ncheck_double (\"sinh (-M_PI * 5.0 / 6.0)\", sinh (-M_PI * 5.0 / 6.0), -6.81762330412654371514E+00);\ncheck_double (\"sinh (6.9e-18)\", sinh (6.9e-18), 6.90000000000000026253E-18);\ncheck_double (\"sinh (-6.9e-18)\", sinh (-6.9e-18), -6.90000000000000026253E-18);\ncheck_double (\"sinh (7.0e-18)\", sinh (7.0e-18), 6.99999999999999973042E-18);\ncheck_double (\"sinh (-7.0e-18)\", sinh (-7.0e-18), -6.99999999999999973042E-18);\ncheck_double (\"sinh (7.4e-9)\", sinh (7.4e-9), 7.40000000000000008865E-09);\ncheck_double (\"sinh (-7.4e-9)\", sinh (-7.4e-9), -7.40000000000000008865E-09);\ncheck_double (\"sinh (7.5e-9)\", sinh (7.5e-9), 7.49999999999999932974E-09);\ncheck_double (\"sinh (-7.5e-9)\", sinh (-7.5e-9), -7.49999999999999932974E-09);\ncheck_double (\"sinh (0.2)\", sinh (0.2), 2.01336002541093989082E-01);\ncheck_double (\"sinh (-0.2)\", sinh (-0.2), -2.01336002541093989082E-01);\ncheck_double (\"sinh (0.4)\", sinh (0.4), 4.10752325802815509981E-01);\ncheck_double (\"sinh (-0.4)\", sinh (-0.4), -4.10752325802815509981E-01);\ncheck_double (\"sinh (0.7)\", sinh (0.7), 7.58583701839533497413E-01);\ncheck_double (\"sinh (-0.7)\", sinh (-0.7), -7.58583701839533497413E-01);\ncheck_double (\"sinh (0.8)\", sinh (0.8), 8.88105982187623044233E-01);\ncheck_double (\"sinh (-0.8)\", sinh (-0.8), -8.88105982187623044233E-01);\ncheck_double (\"sinh (3.0)\", sinh (3.0), 1.00178749274099025968E+01);\ncheck_double (\"sinh (-3.0)\", sinh (-3.0), -1.00178749274099025968E+01);\ncheck_double (\"sinh (4.0)\", sinh (4.0), 2.72899171971277532123E+01);\ncheck_double (\"sinh (-4.0)\", sinh (-4.0), -2.72899171971277532123E+01);\ncheck_double (\"sinh (6.0)\", sinh (6.0), 2.01713157370279219549E+02);\ncheck_double (\"sinh (-6.0)\", sinh (-6.0), -2.01713157370279219549E+02);\ncheck_double (\"sinh (7.0)\", sinh (7.0), 5.48316123273246489589E+02);\ncheck_double (\"sinh (-7.0)\", sinh (-7.0), -5.48316123273246489589E+02);\ncheck_double (\"tanh (0.0)\", tanh (0.0), 0.00000000000000000000E+00);\ncheck_double (\"tanh (-0.0)\", tanh (-0.0), -0.00000000000000000000E+00);\ncheck_double (\"tanh (1.0)\", tanh (1.0), 7.61594155955764851029E-01);\ncheck_double (\"tanh (-1.0)\", tanh (-1.0), -7.61594155955764851029E-01);\ncheck_double (\"tanh (INFINITY)\", tanh (INFINITY), 1.00000000000000000000E+00);\ncheck_double (\"tanh (-INFINITY)\", tanh (-INFINITY), -1.00000000000000000000E+00);\ncheck_double (\"tanh (NAN)\", tanh (NAN), NAN);\ncheck_double (\"tanh (M_PI)\", tanh (M_PI), 9.96272076220749980280E-01);\ncheck_double (\"tanh (-M_PI)\", tanh (-M_PI), -9.96272076220749980280E-01);\ncheck_double (\"tanh (2.0 * M_PI)\", tanh (2.0 * M_PI), 9.99993025339610652757E-01);\ncheck_double (\"tanh (-2.0 * M_PI)\", tanh (-2.0 * M_PI), -9.99993025339610652757E-01);\ncheck_double (\"tanh (M_PI / 2.0)\", tanh (M_PI / 2.0), 9.17152335667274387632E-01);\ncheck_double (\"tanh (-M_PI / 2.0)\", tanh (-M_PI / 2.0), -9.17152335667274387632E-01);\ncheck_double (\"tanh (M_PI / 3.0)\", tanh (M_PI / 3.0), 7.80714435359267655556E-01);\ncheck_double (\"tanh (-M_PI / 3.0)\", tanh (-M_PI / 3.0), -7.80714435359267655556E-01);\ncheck_double (\"tanh (M_PI / 4.0)\", tanh (M_PI / 4.0), 6.55794202632672407205E-01);\ncheck_double (\"tanh (-M_PI / 4.0)\", tanh (-M_PI / 4.0), -6.55794202632672407205E-01);\ncheck_double (\"tanh (M_PI / 6.0)\", tanh (M_PI / 6.0), 4.80472778156451563181E-01);\ncheck_double (\"tanh (-M_PI / 6.0)\", tanh (-M_PI / 6.0), -4.80472778156451563181E-01);\ncheck_double (\"tanh (M_PI * 2.0 / 3.0)\", tanh (M_PI * 2.0 / 3.0), 9.70123821165930766419E-01);\ncheck_double (\"tanh (-M_PI * 2.0 / 3.0)\", tanh (-M_PI * 2.0 / 3.0), -9.70123821165930766419E-01);\ncheck_double (\"tanh (M_PI * 5.0 / 6.0)\", tanh (M_PI * 5.0 / 6.0), 9.89413207352682011475E-01);\ncheck_double (\"tanh (-M_PI * 5.0 / 6.0)\", tanh (-M_PI * 5.0 / 6.0), -9.89413207352682011475E-01);\ncheck_double (\"tanh (6.9e-18)\", tanh (6.9e-18), 6.90000000000000026253E-18);\ncheck_double (\"tanh (-6.9e-18)\", tanh (-6.9e-18), -6.90000000000000026253E-18);\ncheck_double (\"tanh (7.0e-18)\", tanh (7.0e-18), 6.99999999999999973042E-18);\ncheck_double (\"tanh (-7.0e-18)\", tanh (-7.0e-18), -6.99999999999999973042E-18);\ncheck_double (\"tanh (7.4e-9)\", tanh (7.4e-9), 7.40000000000000008865E-09);\ncheck_double (\"tanh (-7.4e-9)\", tanh (-7.4e-9), -7.40000000000000008865E-09);\ncheck_double (\"tanh (7.5e-9)\", tanh (7.5e-9), 7.49999999999999932974E-09);\ncheck_double (\"tanh (-7.5e-9)\", tanh (-7.5e-9), -7.49999999999999932974E-09);\ncheck_double (\"tanh (0.2)\", tanh (0.2), 1.97375320224904005073E-01);\ncheck_double (\"tanh (-0.2)\", tanh (-0.2), -1.97375320224904005073E-01);\ncheck_double (\"tanh (0.4)\", tanh (0.4), 3.79948962255224897966E-01);\ncheck_double (\"tanh (-0.4)\", tanh (-0.4), -3.79948962255224897966E-01);\ncheck_double (\"tanh (0.7)\", tanh (0.7), 6.04367777117163496037E-01);\ncheck_double (\"tanh (-0.7)\", tanh (-0.7), -6.04367777117163496037E-01);\ncheck_double (\"tanh (0.8)\", tanh (0.8), 6.64036770267849019156E-01);\ncheck_double (\"tanh (-0.8)\", tanh (-0.8), -6.64036770267849019156E-01);\ncheck_double (\"tanh (3.0)\", tanh (3.0), 9.95054753686730464324E-01);\ncheck_double (\"tanh (-3.0)\", tanh (-3.0), -9.95054753686730464324E-01);\ncheck_double (\"tanh (4.0)\", tanh (4.0), 9.99329299739067034025E-01);\ncheck_double (\"tanh (-4.0)\", tanh (-4.0), -9.99329299739067034025E-01);\ncheck_double (\"tanh (6.0)\", tanh (6.0), 9.99987711650795585427E-01);\ncheck_double (\"tanh (-6.0)\", tanh (-6.0), -9.99987711650795585427E-01);\ncheck_double (\"tanh (7.0)\", tanh (7.0), 9.99998336943944687860E-01);\ncheck_double (\"tanh (-7.0)\", tanh (-7.0), -9.99998336943944687860E-01);\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/third-party/valgrind/memcheck.h",
    "content": "\n/*\n   ----------------------------------------------------------------\n\n   Notice that the following BSD-style license applies to this one\n   file (memcheck.h) only.  The rest of Valgrind is licensed under the\n   terms of the GNU General Public License, version 2, unless\n   otherwise indicated.  See the COPYING file in the source\n   distribution for details.\n\n   ----------------------------------------------------------------\n\n   This file is part of MemCheck, a heavyweight Valgrind tool for\n   detecting memory errors.\n\n   Copyright (C) 2000-2011 Julian Seward.  All rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n      not claim that you wrote the original software.  If you use this \n      software in a product, an acknowledgment in the product \n      documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n      not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n      products derived from this software without specific prior written \n      permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   ----------------------------------------------------------------\n\n   Notice that the above BSD-style license applies to this one file\n   (memcheck.h) only.  The entire rest of Valgrind is licensed under\n   the terms of the GNU General Public License, version 2.  See the\n   COPYING file in the source distribution for details.\n\n   ---------------------------------------------------------------- \n*/\n\n\n#ifndef __MEMCHECK_H\n#define __MEMCHECK_H\n\n\n/* This file is for inclusion into client (your!) code.\n\n   You can use these macros to manipulate and query memory permissions\n   inside your own programs.\n\n   See comment near the top of valgrind.h on how to use them.\n*/\n\n#include \"valgrind.h\"\n\n/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! \n   This enum comprises an ABI exported by Valgrind to programs\n   which use client requests.  DO NOT CHANGE THE ORDER OF THESE\n   ENTRIES, NOR DELETE ANY -- add new ones at the end. */\ntypedef\n   enum { \n      VG_USERREQ__MAKE_MEM_NOACCESS = VG_USERREQ_TOOL_BASE('M','C'),\n      VG_USERREQ__MAKE_MEM_UNDEFINED,\n      VG_USERREQ__MAKE_MEM_DEFINED,\n      VG_USERREQ__DISCARD,\n      VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,\n      VG_USERREQ__CHECK_MEM_IS_DEFINED,\n      VG_USERREQ__DO_LEAK_CHECK,\n      VG_USERREQ__COUNT_LEAKS,\n\n      VG_USERREQ__GET_VBITS,\n      VG_USERREQ__SET_VBITS,\n\n      VG_USERREQ__CREATE_BLOCK,\n\n      VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE,\n\n      /* Not next to VG_USERREQ__COUNT_LEAKS because it was added later. */\n      VG_USERREQ__COUNT_LEAK_BLOCKS,\n\n      /* This is just for memcheck's internal use - don't use it */\n      _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR \n         = VG_USERREQ_TOOL_BASE('M','C') + 256\n   } Vg_MemCheckClientRequest;\n\n\n\n/* Client-code macros to manipulate the state of memory. */\n\n/* Mark memory at _qzz_addr as unaddressable for _qzz_len bytes. */\n#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr,_qzz_len)           \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \\\n                            VG_USERREQ__MAKE_MEM_NOACCESS,       \\\n                            (_qzz_addr), (_qzz_len), 0, 0, 0)\n      \n/* Similarly, mark memory at _qzz_addr as addressable but undefined\n   for _qzz_len bytes. */\n#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len)          \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \\\n                            VG_USERREQ__MAKE_MEM_UNDEFINED,      \\\n                            (_qzz_addr), (_qzz_len), 0, 0, 0)\n\n/* Similarly, mark memory at _qzz_addr as addressable and defined\n   for _qzz_len bytes. */\n#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr,_qzz_len)            \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \\\n                            VG_USERREQ__MAKE_MEM_DEFINED,        \\\n                            (_qzz_addr), (_qzz_len), 0, 0, 0)\n\n/* Similar to VALGRIND_MAKE_MEM_DEFINED except that addressability is\n   not altered: bytes which are addressable are marked as defined,\n   but those which are not addressable are left unchanged. */\n#define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(_qzz_addr,_qzz_len)     \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,              \\\n                            VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE, \\\n                            (_qzz_addr), (_qzz_len), 0, 0, 0)\n\n/* Create a block-description handle.  The description is an ascii\n   string which is included in any messages pertaining to addresses\n   within the specified memory range.  Has no other effect on the\n   properties of the memory range. */\n#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len, _qzz_desc)\t   \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,        \\\n                            VG_USERREQ__CREATE_BLOCK,              \\\n                            (_qzz_addr), (_qzz_len), (_qzz_desc),  \\\n                            0, 0)\n\n/* Discard a block-description-handle. Returns 1 for an\n   invalid handle, 0 for a valid handle. */\n#define VALGRIND_DISCARD(_qzz_blkindex)                          \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \\\n                            VG_USERREQ__DISCARD,                 \\\n                            0, (_qzz_blkindex), 0, 0, 0)\n\n\n/* Client-code macros to check the state of memory. */\n\n/* Check that memory at _qzz_addr is addressable for _qzz_len bytes.\n   If suitable addressibility is not established, Valgrind prints an\n   error message and returns the address of the first offending byte.\n   Otherwise it returns zero. */\n#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr,_qzz_len)      \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                             \\\n                            VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,  \\\n                            (_qzz_addr), (_qzz_len), 0, 0, 0)\n\n/* Check that memory at _qzz_addr is addressable and defined for\n   _qzz_len bytes.  If suitable addressibility and definedness are not\n   established, Valgrind prints an error message and returns the\n   address of the first offending byte.  Otherwise it returns zero. */\n#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len)        \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                           \\\n                            VG_USERREQ__CHECK_MEM_IS_DEFINED,    \\\n                            (_qzz_addr), (_qzz_len), 0, 0, 0)\n\n/* Use this macro to force the definedness and addressibility of an\n   lvalue to be checked.  If suitable addressibility and definedness\n   are not established, Valgrind prints an error message and returns\n   the address of the first offending byte.  Otherwise it returns\n   zero. */\n#define VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue)                \\\n   VALGRIND_CHECK_MEM_IS_DEFINED(                                \\\n      (volatile unsigned char *)&(__lvalue),                     \\\n                      (unsigned long)(sizeof (__lvalue)))\n\n\n/* Do a full memory leak check (like --leak-check=full) mid-execution. */\n#define VALGRIND_DO_LEAK_CHECK                                   \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK,   \\\n                                    0, 0, 0, 0, 0)\n\n/* Same as VALGRIND_DO_LEAK_CHECK but only showing the entries for\n   which there was an increase in leaked bytes or leaked nr of blocks\n   since the previous leak search. */\n#define VALGRIND_DO_ADDED_LEAK_CHECK                            \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK,  \\\n                                    0, 1, 0, 0, 0)\n\n/* Same as VALGRIND_DO_ADDED_LEAK_CHECK but showing entries with\n   increased or decreased leaked bytes/blocks since previous leak\n   search. */\n#define VALGRIND_DO_CHANGED_LEAK_CHECK                          \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK,  \\\n                                    0, 2, 0, 0, 0)\n\n/* Do a summary memory leak check (like --leak-check=summary) mid-execution. */\n#define VALGRIND_DO_QUICK_LEAK_CHECK                             \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK,   \\\n                                    1, 0, 0, 0, 0)\n\n/* Return number of leaked, dubious, reachable and suppressed bytes found by\n   all previous leak checks.  They must be lvalues.  */\n#define VALGRIND_COUNT_LEAKS(leaked, dubious, reachable, suppressed)     \\\n   /* For safety on 64-bit platforms we assign the results to private\n      unsigned long variables, then assign these to the lvalues the user\n      specified, which works no matter what type 'leaked', 'dubious', etc\n      are.  We also initialise '_qzz_leaked', etc because\n      VG_USERREQ__COUNT_LEAKS doesn't mark the values returned as\n      defined. */                                                        \\\n   {                                                                     \\\n    unsigned long _qzz_leaked    = 0, _qzz_dubious    = 0;               \\\n    unsigned long _qzz_reachable = 0, _qzz_suppressed = 0;               \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(                                     \\\n                               VG_USERREQ__COUNT_LEAKS,                  \\\n                               &_qzz_leaked, &_qzz_dubious,              \\\n                               &_qzz_reachable, &_qzz_suppressed, 0);    \\\n    leaked     = _qzz_leaked;                                            \\\n    dubious    = _qzz_dubious;                                           \\\n    reachable  = _qzz_reachable;                                         \\\n    suppressed = _qzz_suppressed;                                        \\\n   }\n\n/* Return number of leaked, dubious, reachable and suppressed bytes found by\n   all previous leak checks.  They must be lvalues.  */\n#define VALGRIND_COUNT_LEAK_BLOCKS(leaked, dubious, reachable, suppressed) \\\n   /* For safety on 64-bit platforms we assign the results to private\n      unsigned long variables, then assign these to the lvalues the user\n      specified, which works no matter what type 'leaked', 'dubious', etc\n      are.  We also initialise '_qzz_leaked', etc because\n      VG_USERREQ__COUNT_LEAKS doesn't mark the values returned as\n      defined. */                                                        \\\n   {                                                                     \\\n    unsigned long _qzz_leaked    = 0, _qzz_dubious    = 0;               \\\n    unsigned long _qzz_reachable = 0, _qzz_suppressed = 0;               \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(                                     \\\n                               VG_USERREQ__COUNT_LEAK_BLOCKS,            \\\n                               &_qzz_leaked, &_qzz_dubious,              \\\n                               &_qzz_reachable, &_qzz_suppressed, 0);    \\\n    leaked     = _qzz_leaked;                                            \\\n    dubious    = _qzz_dubious;                                           \\\n    reachable  = _qzz_reachable;                                         \\\n    suppressed = _qzz_suppressed;                                        \\\n   }\n\n\n/* Get the validity data for addresses [zza..zza+zznbytes-1] and copy it\n   into the provided zzvbits array.  Return values:\n      0   if not running on valgrind\n      1   success\n      2   [previously indicated unaligned arrays;  these are now allowed]\n      3   if any parts of zzsrc/zzvbits are not addressable.\n   The metadata is not copied in cases 0, 2 or 3 so it should be\n   impossible to segfault your system by using this call.\n*/\n#define VALGRIND_GET_VBITS(zza,zzvbits,zznbytes)                \\\n    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                \\\n                                    VG_USERREQ__GET_VBITS,      \\\n                                    (const char*)(zza),         \\\n                                    (char*)(zzvbits),           \\\n                                    (zznbytes), 0, 0)\n\n/* Set the validity data for addresses [zza..zza+zznbytes-1], copying it\n   from the provided zzvbits array.  Return values:\n      0   if not running on valgrind\n      1   success\n      2   [previously indicated unaligned arrays;  these are now allowed]\n      3   if any parts of zza/zzvbits are not addressable.\n   The metadata is not copied in cases 0, 2 or 3 so it should be\n   impossible to segfault your system by using this call.\n*/\n#define VALGRIND_SET_VBITS(zza,zzvbits,zznbytes)                \\\n    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                \\\n                                    VG_USERREQ__SET_VBITS,      \\\n                                    (const char*)(zza),         \\\n                                    (const char*)(zzvbits),     \\\n                                    (zznbytes), 0, 0 )\n\n#endif\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/third-party/valgrind/valgrind.h",
    "content": "/* -*- c -*-\n   ----------------------------------------------------------------\n\n   Notice that the following BSD-style license applies to this one\n   file (valgrind.h) only.  The rest of Valgrind is licensed under the\n   terms of the GNU General Public License, version 2, unless\n   otherwise indicated.  See the COPYING file in the source\n   distribution for details.\n\n   ----------------------------------------------------------------\n\n   This file is part of Valgrind, a dynamic binary instrumentation\n   framework.\n\n   Copyright (C) 2000-2011 Julian Seward.  All rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n      not claim that you wrote the original software.  If you use this \n      software in a product, an acknowledgment in the product \n      documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n      not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n      products derived from this software without specific prior written \n      permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   ----------------------------------------------------------------\n\n   Notice that the above BSD-style license applies to this one file\n   (valgrind.h) only.  The entire rest of Valgrind is licensed under\n   the terms of the GNU General Public License, version 2.  See the\n   COPYING file in the source distribution for details.\n\n   ---------------------------------------------------------------- \n*/\n\n\n/* This file is for inclusion into client (your!) code.\n\n   You can use these macros to manipulate and query Valgrind's \n   execution inside your own programs.\n\n   The resulting executables will still run without Valgrind, just a\n   little bit more slowly than they otherwise would, but otherwise\n   unchanged.  When not running on valgrind, each client request\n   consumes very few (eg. 7) instructions, so the resulting performance\n   loss is negligible unless you plan to execute client requests\n   millions of times per second.  Nevertheless, if that is still a\n   problem, you can compile with the NVALGRIND symbol defined (gcc\n   -DNVALGRIND) so that client requests are not even compiled in.  */\n\n#ifndef __VALGRIND_H\n#define __VALGRIND_H\n\n\n/* ------------------------------------------------------------------ */\n/* VERSION NUMBER OF VALGRIND                                         */\n/* ------------------------------------------------------------------ */\n\n/* Specify Valgrind's version number, so that user code can\n   conditionally compile based on our version number.  Note that these\n   were introduced at version 3.6 and so do not exist in version 3.5\n   or earlier.  The recommended way to use them to check for \"version\n   X.Y or later\" is (eg)\n\n#if defined(__VALGRIND_MAJOR__) && defined(__VALGRIND_MINOR__)   \\\n    && (__VALGRIND_MAJOR__ > 3                                   \\\n        || (__VALGRIND_MAJOR__ == 3 && __VALGRIND_MINOR__ >= 6))\n*/\n#define __VALGRIND_MAJOR__    3\n#define __VALGRIND_MINOR__    6\n\n\n#include <stdarg.h>\n\n/* Nb: this file might be included in a file compiled with -ansi.  So\n   we can't use C++ style \"//\" comments nor the \"asm\" keyword (instead\n   use \"__asm__\"). */\n\n/* Derive some tags indicating what the target platform is.  Note\n   that in this file we're using the compiler's CPP symbols for\n   identifying architectures, which are different to the ones we use\n   within the rest of Valgrind.  Note, __powerpc__ is active for both\n   32 and 64-bit PPC, whereas __powerpc64__ is only active for the\n   latter (on Linux, that is).\n\n   Misc note: how to find out what's predefined in gcc by default:\n   gcc -Wp,-dM somefile.c\n*/\n#undef PLAT_x86_darwin\n#undef PLAT_amd64_darwin\n#undef PLAT_x86_win32\n#undef PLAT_x86_linux\n#undef PLAT_amd64_linux\n#undef PLAT_ppc32_linux\n#undef PLAT_ppc64_linux\n#undef PLAT_arm_linux\n#undef PLAT_s390x_linux\n\n\n#if defined(__APPLE__) && defined(__i386__)\n#  define PLAT_x86_darwin 1\n#elif defined(__APPLE__) && defined(__x86_64__)\n#  define PLAT_amd64_darwin 1\n#elif defined(__MINGW32__) || defined(__CYGWIN32__) \\\n      || (defined(_WIN32) && defined(_M_IX86))\n#  define PLAT_x86_win32 1\n#elif defined(__linux__) && defined(__i386__)\n#  define PLAT_x86_linux 1\n#elif defined(__linux__) && defined(__x86_64__)\n#  define PLAT_amd64_linux 1\n#elif defined(__linux__) && defined(__powerpc__) && !defined(__powerpc64__)\n#  define PLAT_ppc32_linux 1\n#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__)\n#  define PLAT_ppc64_linux 1\n#elif defined(__linux__) && defined(__arm__)\n#  define PLAT_arm_linux 1\n#elif defined(__linux__) && defined(__s390__) && defined(__s390x__)\n#  define PLAT_s390x_linux 1\n#else\n/* If we're not compiling for our target platform, don't generate\n   any inline asms.  */\n#  if !defined(NVALGRIND)\n#    define NVALGRIND 1\n#  endif\n#endif\n\n\n/* ------------------------------------------------------------------ */\n/* ARCHITECTURE SPECIFICS for SPECIAL INSTRUCTIONS.  There is nothing */\n/* in here of use to end-users -- skip to the next section.           */\n/* ------------------------------------------------------------------ */\n\n/*\n * VALGRIND_DO_CLIENT_REQUEST(): a statement that invokes a Valgrind client\n * request. Accepts both pointers and integers as arguments.\n *\n * VALGRIND_DO_CLIENT_REQUEST_STMT(): a statement that invokes a Valgrind\n * client request that does not return a value.\n\n * VALGRIND_DO_CLIENT_REQUEST_EXPR(): a C expression that invokes a Valgrind\n * client request and whose value equals the client request result.  Accepts\n * both pointers and integers as arguments.  Note that such calls are not\n * necessarily pure functions -- they may have side effects.\n */\n\n#define VALGRIND_DO_CLIENT_REQUEST(_zzq_rlval, _zzq_default,            \\\n                                   _zzq_request, _zzq_arg1, _zzq_arg2,  \\\n                                   _zzq_arg3, _zzq_arg4, _zzq_arg5)     \\\n  do { (_zzq_rlval) = VALGRIND_DO_CLIENT_REQUEST_EXPR((_zzq_default),   \\\n                        (_zzq_request), (_zzq_arg1), (_zzq_arg2),       \\\n                        (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)\n\n#define VALGRIND_DO_CLIENT_REQUEST_STMT(_zzq_request, _zzq_arg1,        \\\n                           _zzq_arg2,  _zzq_arg3, _zzq_arg4, _zzq_arg5) \\\n  do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                        \\\n                    (_zzq_request), (_zzq_arg1), (_zzq_arg2),           \\\n                    (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)\n\n#if defined(NVALGRIND)\n\n/* Define NVALGRIND to completely remove the Valgrind magic sequence\n   from the compiled code (analogous to NDEBUG's effects on\n   assert()) */\n#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \\\n        _zzq_default, _zzq_request,                               \\\n        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \\\n      (_zzq_default)\n\n#else  /* ! NVALGRIND */\n\n/* The following defines the magic code sequences which the JITter\n   spots and handles magically.  Don't look too closely at them as\n   they will rot your brain.\n\n   The assembly code sequences for all architectures is in this one\n   file.  This is because this file must be stand-alone, and we don't\n   want to have multiple files.\n\n   For VALGRIND_DO_CLIENT_REQUEST, we must ensure that the default\n   value gets put in the return slot, so that everything works when\n   this is executed not under Valgrind.  Args are passed in a memory\n   block, and so there's no intrinsic limit to the number that could\n   be passed, but it's currently five.\n   \n   The macro args are: \n      _zzq_rlval    result lvalue\n      _zzq_default  default value (result returned when running on real CPU)\n      _zzq_request  request code\n      _zzq_arg1..5  request params\n\n   The other two macros are used to support function wrapping, and are\n   a lot simpler.  VALGRIND_GET_NR_CONTEXT returns the value of the\n   guest's NRADDR pseudo-register and whatever other information is\n   needed to safely run the call original from the wrapper: on\n   ppc64-linux, the R2 value at the divert point is also needed.  This\n   information is abstracted into a user-visible type, OrigFn.\n\n   VALGRIND_CALL_NOREDIR_* behaves the same as the following on the\n   guest, but guarantees that the branch instruction will not be\n   redirected: x86: call *%eax, amd64: call *%rax, ppc32/ppc64:\n   branch-and-link-to-r11.  VALGRIND_CALL_NOREDIR is just text, not a\n   complete inline asm, since it needs to be combined with more magic\n   inline asm stuff to be useful.\n*/\n\n/* ------------------------- x86-{linux,darwin} ---------------- */\n\n#if defined(PLAT_x86_linux)  ||  defined(PLAT_x86_darwin)  \\\n    ||  (defined(PLAT_x86_win32) && defined(__GNUC__))\n\ntypedef\n   struct { \n      unsigned int nraddr; /* where's the code? */\n   }\n   OrigFn;\n\n#define __SPECIAL_INSTRUCTION_PREAMBLE                            \\\n                     \"roll $3,  %%edi ; roll $13, %%edi\\n\\t\"      \\\n                     \"roll $29, %%edi ; roll $19, %%edi\\n\\t\"\n\n#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \\\n        _zzq_default, _zzq_request,                               \\\n        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \\\n  __extension__                                                   \\\n  ({volatile unsigned int _zzq_args[6];                           \\\n    volatile unsigned int _zzq_result;                            \\\n    _zzq_args[0] = (unsigned int)(_zzq_request);                  \\\n    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \\\n    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \\\n    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \\\n    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \\\n    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \\\n    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* %EDX = client_request ( %EAX ) */         \\\n                     \"xchgl %%ebx,%%ebx\"                          \\\n                     : \"=d\" (_zzq_result)                         \\\n                     : \"a\" (&_zzq_args[0]), \"0\" (_zzq_default)    \\\n                     : \"cc\", \"memory\"                             \\\n                    );                                            \\\n    _zzq_result;                                                  \\\n  })\n\n#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \\\n  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \\\n    volatile unsigned int __addr;                                 \\\n    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* %EAX = guest_NRADDR */                    \\\n                     \"xchgl %%ecx,%%ecx\"                          \\\n                     : \"=a\" (__addr)                              \\\n                     :                                            \\\n                     : \"cc\", \"memory\"                             \\\n                    );                                            \\\n    _zzq_orig->nraddr = __addr;                                   \\\n  }\n\n#define VALGRIND_CALL_NOREDIR_EAX                                 \\\n                     __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* call-noredir *%EAX */                     \\\n                     \"xchgl %%edx,%%edx\\n\\t\"\n#endif /* PLAT_x86_linux || PLAT_x86_darwin || (PLAT_x86_win32 && __GNUC__) */\n\n/* ------------------------- x86-Win32 ------------------------- */\n\n#if defined(PLAT_x86_win32) && !defined(__GNUC__)\n\ntypedef\n   struct { \n      unsigned int nraddr; /* where's the code? */\n   }\n   OrigFn;\n\n#if defined(_MSC_VER)\n\n#define __SPECIAL_INSTRUCTION_PREAMBLE                            \\\n                     __asm rol edi, 3  __asm rol edi, 13          \\\n                     __asm rol edi, 29 __asm rol edi, 19\n\n#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \\\n        _zzq_default, _zzq_request,                               \\\n        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \\\n    valgrind_do_client_request_expr((uintptr_t)(_zzq_default),    \\\n        (uintptr_t)(_zzq_request), (uintptr_t)(_zzq_arg1),        \\\n        (uintptr_t)(_zzq_arg2), (uintptr_t)(_zzq_arg3),           \\\n        (uintptr_t)(_zzq_arg4), (uintptr_t)(_zzq_arg5))\n\nstatic __inline uintptr_t\nvalgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request,\n                                uintptr_t _zzq_arg1, uintptr_t _zzq_arg2,\n                                uintptr_t _zzq_arg3, uintptr_t _zzq_arg4,\n                                uintptr_t _zzq_arg5)\n{\n    volatile uintptr_t _zzq_args[6];\n    volatile unsigned int _zzq_result;\n    _zzq_args[0] = (uintptr_t)(_zzq_request);\n    _zzq_args[1] = (uintptr_t)(_zzq_arg1);\n    _zzq_args[2] = (uintptr_t)(_zzq_arg2);\n    _zzq_args[3] = (uintptr_t)(_zzq_arg3);\n    _zzq_args[4] = (uintptr_t)(_zzq_arg4);\n    _zzq_args[5] = (uintptr_t)(_zzq_arg5);\n    __asm { __asm lea eax, _zzq_args __asm mov edx, _zzq_default\n            __SPECIAL_INSTRUCTION_PREAMBLE\n            /* %EDX = client_request ( %EAX ) */\n            __asm xchg ebx,ebx\n            __asm mov _zzq_result, edx\n    }\n    return _zzq_result;\n}\n\n#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \\\n  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \\\n    volatile unsigned int __addr;                                 \\\n    __asm { __SPECIAL_INSTRUCTION_PREAMBLE                        \\\n            /* %EAX = guest_NRADDR */                             \\\n            __asm xchg ecx,ecx                                    \\\n            __asm mov __addr, eax                                 \\\n    }                                                             \\\n    _zzq_orig->nraddr = __addr;                                   \\\n  }\n\n#define VALGRIND_CALL_NOREDIR_EAX ERROR\n\n#else\n#error Unsupported compiler.\n#endif\n\n#endif /* PLAT_x86_win32 */\n\n/* ------------------------ amd64-{linux,darwin} --------------- */\n\n#if defined(PLAT_amd64_linux)  ||  defined(PLAT_amd64_darwin)\n\ntypedef\n   struct { \n      unsigned long long int nraddr; /* where's the code? */\n   }\n   OrigFn;\n\n#define __SPECIAL_INSTRUCTION_PREAMBLE                            \\\n                     \"rolq $3,  %%rdi ; rolq $13, %%rdi\\n\\t\"      \\\n                     \"rolq $61, %%rdi ; rolq $51, %%rdi\\n\\t\"\n\n#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \\\n        _zzq_default, _zzq_request,                               \\\n        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \\\n    __extension__                                                 \\\n    ({ volatile unsigned long long int _zzq_args[6];              \\\n    volatile unsigned long long int _zzq_result;                  \\\n    _zzq_args[0] = (unsigned long long int)(_zzq_request);        \\\n    _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \\\n    _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \\\n    _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \\\n    _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \\\n    _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \\\n    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* %RDX = client_request ( %RAX ) */         \\\n                     \"xchgq %%rbx,%%rbx\"                          \\\n                     : \"=d\" (_zzq_result)                         \\\n                     : \"a\" (&_zzq_args[0]), \"0\" (_zzq_default)    \\\n                     : \"cc\", \"memory\"                             \\\n                    );                                            \\\n    _zzq_result;                                                  \\\n    })\n\n#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \\\n  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \\\n    volatile unsigned long long int __addr;                       \\\n    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* %RAX = guest_NRADDR */                    \\\n                     \"xchgq %%rcx,%%rcx\"                          \\\n                     : \"=a\" (__addr)                              \\\n                     :                                            \\\n                     : \"cc\", \"memory\"                             \\\n                    );                                            \\\n    _zzq_orig->nraddr = __addr;                                   \\\n  }\n\n#define VALGRIND_CALL_NOREDIR_RAX                                 \\\n                     __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* call-noredir *%RAX */                     \\\n                     \"xchgq %%rdx,%%rdx\\n\\t\"\n#endif /* PLAT_amd64_linux || PLAT_amd64_darwin */\n\n/* ------------------------ ppc32-linux ------------------------ */\n\n#if defined(PLAT_ppc32_linux)\n\ntypedef\n   struct { \n      unsigned int nraddr; /* where's the code? */\n   }\n   OrigFn;\n\n#define __SPECIAL_INSTRUCTION_PREAMBLE                            \\\n                     \"rlwinm 0,0,3,0,0  ; rlwinm 0,0,13,0,0\\n\\t\"  \\\n                     \"rlwinm 0,0,29,0,0 ; rlwinm 0,0,19,0,0\\n\\t\"\n\n#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \\\n        _zzq_default, _zzq_request,                               \\\n        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \\\n                                                                  \\\n    __extension__                                                 \\\n  ({         unsigned int  _zzq_args[6];                          \\\n             unsigned int  _zzq_result;                           \\\n             unsigned int* _zzq_ptr;                              \\\n    _zzq_args[0] = (unsigned int)(_zzq_request);                  \\\n    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \\\n    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \\\n    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \\\n    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \\\n    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \\\n    _zzq_ptr = _zzq_args;                                         \\\n    __asm__ volatile(\"mr 3,%1\\n\\t\" /*default*/                    \\\n                     \"mr 4,%2\\n\\t\" /*ptr*/                        \\\n                     __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* %R3 = client_request ( %R4 ) */           \\\n                     \"or 1,1,1\\n\\t\"                               \\\n                     \"mr %0,3\"     /*result*/                     \\\n                     : \"=b\" (_zzq_result)                         \\\n                     : \"b\" (_zzq_default), \"b\" (_zzq_ptr)         \\\n                     : \"cc\", \"memory\", \"r3\", \"r4\");               \\\n    _zzq_result;                                                  \\\n    })\n\n#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \\\n  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \\\n    unsigned int __addr;                                          \\\n    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* %R3 = guest_NRADDR */                     \\\n                     \"or 2,2,2\\n\\t\"                               \\\n                     \"mr %0,3\"                                    \\\n                     : \"=b\" (__addr)                              \\\n                     :                                            \\\n                     : \"cc\", \"memory\", \"r3\"                       \\\n                    );                                            \\\n    _zzq_orig->nraddr = __addr;                                   \\\n  }\n\n#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                   \\\n                     __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* branch-and-link-to-noredir *%R11 */       \\\n                     \"or 3,3,3\\n\\t\"\n#endif /* PLAT_ppc32_linux */\n\n/* ------------------------ ppc64-linux ------------------------ */\n\n#if defined(PLAT_ppc64_linux)\n\ntypedef\n   struct { \n      unsigned long long int nraddr; /* where's the code? */\n      unsigned long long int r2;  /* what tocptr do we need? */\n   }\n   OrigFn;\n\n#define __SPECIAL_INSTRUCTION_PREAMBLE                            \\\n                     \"rotldi 0,0,3  ; rotldi 0,0,13\\n\\t\"          \\\n                     \"rotldi 0,0,61 ; rotldi 0,0,51\\n\\t\"\n\n#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \\\n        _zzq_default, _zzq_request,                               \\\n        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \\\n                                                                  \\\n  __extension__                                                   \\\n  ({         unsigned long long int  _zzq_args[6];                \\\n             unsigned long long int  _zzq_result;                 \\\n             unsigned long long int* _zzq_ptr;                    \\\n    _zzq_args[0] = (unsigned long long int)(_zzq_request);        \\\n    _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \\\n    _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \\\n    _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \\\n    _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \\\n    _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \\\n    _zzq_ptr = _zzq_args;                                         \\\n    __asm__ volatile(\"mr 3,%1\\n\\t\" /*default*/                    \\\n                     \"mr 4,%2\\n\\t\" /*ptr*/                        \\\n                     __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* %R3 = client_request ( %R4 ) */           \\\n                     \"or 1,1,1\\n\\t\"                               \\\n                     \"mr %0,3\"     /*result*/                     \\\n                     : \"=b\" (_zzq_result)                         \\\n                     : \"b\" (_zzq_default), \"b\" (_zzq_ptr)         \\\n                     : \"cc\", \"memory\", \"r3\", \"r4\");               \\\n    _zzq_result;                                                  \\\n  })\n\n#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \\\n  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \\\n    unsigned long long int __addr;                                \\\n    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* %R3 = guest_NRADDR */                     \\\n                     \"or 2,2,2\\n\\t\"                               \\\n                     \"mr %0,3\"                                    \\\n                     : \"=b\" (__addr)                              \\\n                     :                                            \\\n                     : \"cc\", \"memory\", \"r3\"                       \\\n                    );                                            \\\n    _zzq_orig->nraddr = __addr;                                   \\\n    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* %R3 = guest_NRADDR_GPR2 */                \\\n                     \"or 4,4,4\\n\\t\"                               \\\n                     \"mr %0,3\"                                    \\\n                     : \"=b\" (__addr)                              \\\n                     :                                            \\\n                     : \"cc\", \"memory\", \"r3\"                       \\\n                    );                                            \\\n    _zzq_orig->r2 = __addr;                                       \\\n  }\n\n#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                   \\\n                     __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* branch-and-link-to-noredir *%R11 */       \\\n                     \"or 3,3,3\\n\\t\"\n\n#endif /* PLAT_ppc64_linux */\n\n/* ------------------------- arm-linux ------------------------- */\n\n#if defined(PLAT_arm_linux)\n\ntypedef\n   struct { \n      unsigned int nraddr; /* where's the code? */\n   }\n   OrigFn;\n\n#define __SPECIAL_INSTRUCTION_PREAMBLE                            \\\n            \"mov r12, r12, ror #3  ; mov r12, r12, ror #13 \\n\\t\"  \\\n            \"mov r12, r12, ror #29 ; mov r12, r12, ror #19 \\n\\t\"\n\n#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \\\n        _zzq_default, _zzq_request,                               \\\n        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \\\n                                                                  \\\n  __extension__                                                   \\\n  ({volatile unsigned int  _zzq_args[6];                          \\\n    volatile unsigned int  _zzq_result;                           \\\n    _zzq_args[0] = (unsigned int)(_zzq_request);                  \\\n    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \\\n    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \\\n    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \\\n    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \\\n    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \\\n    __asm__ volatile(\"mov r3, %1\\n\\t\" /*default*/                 \\\n                     \"mov r4, %2\\n\\t\" /*ptr*/                     \\\n                     __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* R3 = client_request ( R4 ) */             \\\n                     \"orr r10, r10, r10\\n\\t\"                      \\\n                     \"mov %0, r3\"     /*result*/                  \\\n                     : \"=r\" (_zzq_result)                         \\\n                     : \"r\" (_zzq_default), \"r\" (&_zzq_args[0])    \\\n                     : \"cc\",\"memory\", \"r3\", \"r4\");                \\\n    _zzq_result;                                                  \\\n  })\n\n#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \\\n  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \\\n    unsigned int __addr;                                          \\\n    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* R3 = guest_NRADDR */                      \\\n                     \"orr r11, r11, r11\\n\\t\"                      \\\n                     \"mov %0, r3\"                                 \\\n                     : \"=r\" (__addr)                              \\\n                     :                                            \\\n                     : \"cc\", \"memory\", \"r3\"                       \\\n                    );                                            \\\n    _zzq_orig->nraddr = __addr;                                   \\\n  }\n\n#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                    \\\n                     __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                     /* branch-and-link-to-noredir *%R4 */        \\\n                     \"orr r12, r12, r12\\n\\t\"\n\n#endif /* PLAT_arm_linux */\n\n/* ------------------------ s390x-linux ------------------------ */\n\n#if defined(PLAT_s390x_linux)\n\ntypedef\n  struct {\n     unsigned long long int nraddr; /* where's the code? */\n  }\n  OrigFn;\n\n/* __SPECIAL_INSTRUCTION_PREAMBLE will be used to identify Valgrind specific\n * code. This detection is implemented in platform specific toIR.c\n * (e.g. VEX/priv/guest_s390_decoder.c).\n */\n#define __SPECIAL_INSTRUCTION_PREAMBLE                           \\\n                     \"lr 15,15\\n\\t\"                              \\\n                     \"lr 1,1\\n\\t\"                                \\\n                     \"lr 2,2\\n\\t\"                                \\\n                     \"lr 3,3\\n\\t\"\n\n#define __CLIENT_REQUEST_CODE \"lr 2,2\\n\\t\"\n#define __GET_NR_CONTEXT_CODE \"lr 3,3\\n\\t\"\n#define __CALL_NO_REDIR_CODE  \"lr 4,4\\n\\t\"\n\n#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                         \\\n       _zzq_default, _zzq_request,                               \\\n       _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \\\n  __extension__                                                  \\\n ({volatile unsigned long long int _zzq_args[6];                 \\\n   volatile unsigned long long int _zzq_result;                  \\\n   _zzq_args[0] = (unsigned long long int)(_zzq_request);        \\\n   _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \\\n   _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \\\n   _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \\\n   _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \\\n   _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \\\n   __asm__ volatile(/* r2 = args */                              \\\n                    \"lgr 2,%1\\n\\t\"                               \\\n                    /* r3 = default */                           \\\n                    \"lgr 3,%2\\n\\t\"                               \\\n                    __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                    __CLIENT_REQUEST_CODE                        \\\n                    /* results = r3 */                           \\\n                    \"lgr %0, 3\\n\\t\"                              \\\n                    : \"=d\" (_zzq_result)                         \\\n                    : \"a\" (&_zzq_args[0]), \"0\" (_zzq_default)    \\\n                    : \"cc\", \"2\", \"3\", \"memory\"                   \\\n                   );                                            \\\n   _zzq_result;                                                  \\\n })\n\n#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                      \\\n { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \\\n   volatile unsigned long long int __addr;                       \\\n   __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \\\n                    __GET_NR_CONTEXT_CODE                        \\\n                    \"lgr %0, 3\\n\\t\"                              \\\n                    : \"=a\" (__addr)                              \\\n                    :                                            \\\n                    : \"cc\", \"3\", \"memory\"                        \\\n                   );                                            \\\n   _zzq_orig->nraddr = __addr;                                   \\\n }\n\n#define VALGRIND_CALL_NOREDIR_R1                                 \\\n                    __SPECIAL_INSTRUCTION_PREAMBLE               \\\n                    __CALL_NO_REDIR_CODE\n\n#endif /* PLAT_s390x_linux */\n\n/* Insert assembly code for other platforms here... */\n\n#endif /* NVALGRIND */\n\n\n/* ------------------------------------------------------------------ */\n/* PLATFORM SPECIFICS for FUNCTION WRAPPING.  This is all very        */\n/* ugly.  It's the least-worst tradeoff I can think of.               */\n/* ------------------------------------------------------------------ */\n\n/* This section defines magic (a.k.a appalling-hack) macros for doing\n   guaranteed-no-redirection macros, so as to get from function\n   wrappers to the functions they are wrapping.  The whole point is to\n   construct standard call sequences, but to do the call itself with a\n   special no-redirect call pseudo-instruction that the JIT\n   understands and handles specially.  This section is long and\n   repetitious, and I can't see a way to make it shorter.\n\n   The naming scheme is as follows:\n\n      CALL_FN_{W,v}_{v,W,WW,WWW,WWWW,5W,6W,7W,etc}\n\n   'W' stands for \"word\" and 'v' for \"void\".  Hence there are\n   different macros for calling arity 0, 1, 2, 3, 4, etc, functions,\n   and for each, the possibility of returning a word-typed result, or\n   no result.\n*/\n\n/* Use these to write the name of your wrapper.  NOTE: duplicates\n   VG_WRAP_FUNCTION_Z{U,Z} in pub_tool_redir.h.  NOTE also: inserts\n   the default behaviour equivalance class tag \"0000\" into the name.\n   See pub_tool_redir.h for details -- normally you don't need to\n   think about this, though. */\n\n/* Use an extra level of macroisation so as to ensure the soname/fnname\n   args are fully macro-expanded before pasting them together. */\n#define VG_CONCAT4(_aa,_bb,_cc,_dd) _aa##_bb##_cc##_dd\n\n#define I_WRAP_SONAME_FNNAME_ZU(soname,fnname)                    \\\n   VG_CONCAT4(_vgw00000ZU_,soname,_,fnname)\n\n#define I_WRAP_SONAME_FNNAME_ZZ(soname,fnname)                    \\\n   VG_CONCAT4(_vgw00000ZZ_,soname,_,fnname)\n\n/* Use this macro from within a wrapper function to collect the\n   context (address and possibly other info) of the original function.\n   Once you have that you can then use it in one of the CALL_FN_\n   macros.  The type of the argument _lval is OrigFn. */\n#define VALGRIND_GET_ORIG_FN(_lval)  VALGRIND_GET_NR_CONTEXT(_lval)\n\n/* Derivatives of the main macros below, for calling functions\n   returning void. */\n\n#define CALL_FN_v_v(fnptr)                                        \\\n   do { volatile unsigned long _junk;                             \\\n        CALL_FN_W_v(_junk,fnptr); } while (0)\n\n#define CALL_FN_v_W(fnptr, arg1)                                  \\\n   do { volatile unsigned long _junk;                             \\\n        CALL_FN_W_W(_junk,fnptr,arg1); } while (0)\n\n#define CALL_FN_v_WW(fnptr, arg1,arg2)                            \\\n   do { volatile unsigned long _junk;                             \\\n        CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0)\n\n#define CALL_FN_v_WWW(fnptr, arg1,arg2,arg3)                      \\\n   do { volatile unsigned long _junk;                             \\\n        CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0)\n\n#define CALL_FN_v_WWWW(fnptr, arg1,arg2,arg3,arg4)                \\\n   do { volatile unsigned long _junk;                             \\\n        CALL_FN_W_WWWW(_junk,fnptr,arg1,arg2,arg3,arg4); } while (0)\n\n#define CALL_FN_v_5W(fnptr, arg1,arg2,arg3,arg4,arg5)             \\\n   do { volatile unsigned long _junk;                             \\\n        CALL_FN_W_5W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5); } while (0)\n\n#define CALL_FN_v_6W(fnptr, arg1,arg2,arg3,arg4,arg5,arg6)        \\\n   do { volatile unsigned long _junk;                             \\\n        CALL_FN_W_6W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6); } while (0)\n\n#define CALL_FN_v_7W(fnptr, arg1,arg2,arg3,arg4,arg5,arg6,arg7)   \\\n   do { volatile unsigned long _junk;                             \\\n        CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0)\n\n/* ------------------------- x86-{linux,darwin} ---------------- */\n\n#if defined(PLAT_x86_linux)  ||  defined(PLAT_x86_darwin)\n\n/* These regs are trashed by the hidden call.  No need to mention eax\n   as gcc can already see that, plus causes gcc to bomb. */\n#define __CALLER_SAVED_REGS /*\"eax\"*/ \"ecx\", \"edx\"\n\n/* These CALL_FN_ macros assume that on x86-linux, sizeof(unsigned\n   long) == 4. */\n\n#define CALL_FN_W_v(lval, orig)                                   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[1];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      __asm__ volatile(                                           \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_W(lval, orig, arg1)                             \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[2];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      __asm__ volatile(                                           \\\n         \"subl $12, %%esp\\n\\t\"                                    \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $16, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      __asm__ volatile(                                           \\\n         \"subl $8, %%esp\\n\\t\"                                     \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $16, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[4];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      __asm__ volatile(                                           \\\n         \"subl $4, %%esp\\n\\t\"                                     \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $16, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[5];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      __asm__ volatile(                                           \\\n         \"pushl 16(%%eax)\\n\\t\"                                    \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $16, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[6];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      __asm__ volatile(                                           \\\n         \"subl $12, %%esp\\n\\t\"                                    \\\n         \"pushl 20(%%eax)\\n\\t\"                                    \\\n         \"pushl 16(%%eax)\\n\\t\"                                    \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $32, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[7];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      __asm__ volatile(                                           \\\n         \"subl $8, %%esp\\n\\t\"                                     \\\n         \"pushl 24(%%eax)\\n\\t\"                                    \\\n         \"pushl 20(%%eax)\\n\\t\"                                    \\\n         \"pushl 16(%%eax)\\n\\t\"                                    \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $32, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7)                            \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[8];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      __asm__ volatile(                                           \\\n         \"subl $4, %%esp\\n\\t\"                                     \\\n         \"pushl 28(%%eax)\\n\\t\"                                    \\\n         \"pushl 24(%%eax)\\n\\t\"                                    \\\n         \"pushl 20(%%eax)\\n\\t\"                                    \\\n         \"pushl 16(%%eax)\\n\\t\"                                    \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $32, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[9];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      __asm__ volatile(                                           \\\n         \"pushl 32(%%eax)\\n\\t\"                                    \\\n         \"pushl 28(%%eax)\\n\\t\"                                    \\\n         \"pushl 24(%%eax)\\n\\t\"                                    \\\n         \"pushl 20(%%eax)\\n\\t\"                                    \\\n         \"pushl 16(%%eax)\\n\\t\"                                    \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $32, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8,arg9)                  \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[10];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      __asm__ volatile(                                           \\\n         \"subl $12, %%esp\\n\\t\"                                    \\\n         \"pushl 36(%%eax)\\n\\t\"                                    \\\n         \"pushl 32(%%eax)\\n\\t\"                                    \\\n         \"pushl 28(%%eax)\\n\\t\"                                    \\\n         \"pushl 24(%%eax)\\n\\t\"                                    \\\n         \"pushl 20(%%eax)\\n\\t\"                                    \\\n         \"pushl 16(%%eax)\\n\\t\"                                    \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $48, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                  arg7,arg8,arg9,arg10)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[11];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      _argvec[10] = (unsigned long)(arg10);                       \\\n      __asm__ volatile(                                           \\\n         \"subl $8, %%esp\\n\\t\"                                     \\\n         \"pushl 40(%%eax)\\n\\t\"                                    \\\n         \"pushl 36(%%eax)\\n\\t\"                                    \\\n         \"pushl 32(%%eax)\\n\\t\"                                    \\\n         \"pushl 28(%%eax)\\n\\t\"                                    \\\n         \"pushl 24(%%eax)\\n\\t\"                                    \\\n         \"pushl 20(%%eax)\\n\\t\"                                    \\\n         \"pushl 16(%%eax)\\n\\t\"                                    \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $48, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \\\n                                  arg6,arg7,arg8,arg9,arg10,      \\\n                                  arg11)                          \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[12];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      _argvec[10] = (unsigned long)(arg10);                       \\\n      _argvec[11] = (unsigned long)(arg11);                       \\\n      __asm__ volatile(                                           \\\n         \"subl $4, %%esp\\n\\t\"                                     \\\n         \"pushl 44(%%eax)\\n\\t\"                                    \\\n         \"pushl 40(%%eax)\\n\\t\"                                    \\\n         \"pushl 36(%%eax)\\n\\t\"                                    \\\n         \"pushl 32(%%eax)\\n\\t\"                                    \\\n         \"pushl 28(%%eax)\\n\\t\"                                    \\\n         \"pushl 24(%%eax)\\n\\t\"                                    \\\n         \"pushl 20(%%eax)\\n\\t\"                                    \\\n         \"pushl 16(%%eax)\\n\\t\"                                    \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $48, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \\\n                                  arg6,arg7,arg8,arg9,arg10,      \\\n                                  arg11,arg12)                    \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[13];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      _argvec[10] = (unsigned long)(arg10);                       \\\n      _argvec[11] = (unsigned long)(arg11);                       \\\n      _argvec[12] = (unsigned long)(arg12);                       \\\n      __asm__ volatile(                                           \\\n         \"pushl 48(%%eax)\\n\\t\"                                    \\\n         \"pushl 44(%%eax)\\n\\t\"                                    \\\n         \"pushl 40(%%eax)\\n\\t\"                                    \\\n         \"pushl 36(%%eax)\\n\\t\"                                    \\\n         \"pushl 32(%%eax)\\n\\t\"                                    \\\n         \"pushl 28(%%eax)\\n\\t\"                                    \\\n         \"pushl 24(%%eax)\\n\\t\"                                    \\\n         \"pushl 20(%%eax)\\n\\t\"                                    \\\n         \"pushl 16(%%eax)\\n\\t\"                                    \\\n         \"pushl 12(%%eax)\\n\\t\"                                    \\\n         \"pushl 8(%%eax)\\n\\t\"                                     \\\n         \"pushl 4(%%eax)\\n\\t\"                                     \\\n         \"movl (%%eax), %%eax\\n\\t\"  /* target->%eax */            \\\n         VALGRIND_CALL_NOREDIR_EAX                                \\\n         \"addl $48, %%esp\\n\"                                      \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#endif /* PLAT_x86_linux || PLAT_x86_darwin */\n\n/* ------------------------ amd64-{linux,darwin} --------------- */\n\n#if defined(PLAT_amd64_linux)  ||  defined(PLAT_amd64_darwin)\n\n/* ARGREGS: rdi rsi rdx rcx r8 r9 (the rest on stack in R-to-L order) */\n\n/* These regs are trashed by the hidden call. */\n#define __CALLER_SAVED_REGS /*\"rax\",*/ \"rcx\", \"rdx\", \"rsi\",       \\\n                            \"rdi\", \"r8\", \"r9\", \"r10\", \"r11\"\n\n/* This is all pretty complex.  It's so as to make stack unwinding\n   work reliably.  See bug 243270.  The basic problem is the sub and\n   add of 128 of %rsp in all of the following macros.  If gcc believes\n   the CFA is in %rsp, then unwinding may fail, because what's at the\n   CFA is not what gcc \"expected\" when it constructs the CFIs for the\n   places where the macros are instantiated.\n\n   But we can't just add a CFI annotation to increase the CFA offset\n   by 128, to match the sub of 128 from %rsp, because we don't know\n   whether gcc has chosen %rsp as the CFA at that point, or whether it\n   has chosen some other register (eg, %rbp).  In the latter case,\n   adding a CFI annotation to change the CFA offset is simply wrong.\n\n   So the solution is to get hold of the CFA using\n   __builtin_dwarf_cfa(), put it in a known register, and add a\n   CFI annotation to say what the register is.  We choose %rbp for\n   this (perhaps perversely), because:\n\n   (1) %rbp is already subject to unwinding.  If a new register was\n       chosen then the unwinder would have to unwind it in all stack\n       traces, which is expensive, and\n\n   (2) %rbp is already subject to precise exception updates in the\n       JIT.  If a new register was chosen, we'd have to have precise\n       exceptions for it too, which reduces performance of the\n       generated code.\n\n   However .. one extra complication.  We can't just whack the result\n   of __builtin_dwarf_cfa() into %rbp and then add %rbp to the\n   list of trashed registers at the end of the inline assembly\n   fragments; gcc won't allow %rbp to appear in that list.  Hence\n   instead we need to stash %rbp in %r15 for the duration of the asm,\n   and say that %r15 is trashed instead.  gcc seems happy to go with\n   that.\n\n   Oh .. and this all needs to be conditionalised so that it is\n   unchanged from before this commit, when compiled with older gccs\n   that don't support __builtin_dwarf_cfa.  Furthermore, since\n   this header file is freestanding, it has to be independent of\n   config.h, and so the following conditionalisation cannot depend on\n   configure time checks.\n\n   Although it's not clear from\n   'defined(__GNUC__) && defined(__GCC_HAVE_DWARF2_CFI_ASM)',\n   this expression excludes Darwin.\n   .cfi directives in Darwin assembly appear to be completely\n   different and I haven't investigated how they work.\n\n   For even more entertainment value, note we have to use the\n   completely undocumented __builtin_dwarf_cfa(), which appears to\n   really compute the CFA, whereas __builtin_frame_address(0) claims\n   to but actually doesn't.  See\n   https://bugs.kde.org/show_bug.cgi?id=243270#c47\n*/\n#if defined(__GNUC__) && defined(__GCC_HAVE_DWARF2_CFI_ASM)\n#  define __FRAME_POINTER                                         \\\n      ,\"r\"(__builtin_dwarf_cfa())\n#  define VALGRIND_CFI_PROLOGUE                                   \\\n      \"movq %%rbp, %%r15\\n\\t\"                                     \\\n      \"movq %2, %%rbp\\n\\t\"                                        \\\n      \".cfi_remember_state\\n\\t\"                                   \\\n      \".cfi_def_cfa rbp, 0\\n\\t\"\n#  define VALGRIND_CFI_EPILOGUE                                   \\\n      \"movq %%r15, %%rbp\\n\\t\"                                     \\\n      \".cfi_restore_state\\n\\t\"\n#else\n#  define __FRAME_POINTER\n#  define VALGRIND_CFI_PROLOGUE\n#  define VALGRIND_CFI_EPILOGUE\n#endif\n\n\n/* These CALL_FN_ macros assume that on amd64-linux, sizeof(unsigned\n   long) == 8. */\n\n/* NB 9 Sept 07.  There is a nasty kludge here in all these CALL_FN_\n   macros.  In order not to trash the stack redzone, we need to drop\n   %rsp by 128 before the hidden call, and restore afterwards.  The\n   nastyness is that it is only by luck that the stack still appears\n   to be unwindable during the hidden call - since then the behaviour\n   of any routine using this macro does not match what the CFI data\n   says.  Sigh.\n\n   Why is this important?  Imagine that a wrapper has a stack\n   allocated local, and passes to the hidden call, a pointer to it.\n   Because gcc does not know about the hidden call, it may allocate\n   that local in the redzone.  Unfortunately the hidden call may then\n   trash it before it comes to use it.  So we must step clear of the\n   redzone, for the duration of the hidden call, to make it safe.\n\n   Probably the same problem afflicts the other redzone-style ABIs too\n   (ppc64-linux); but for those, the stack is\n   self describing (none of this CFI nonsense) so at least messing\n   with the stack pointer doesn't give a danger of non-unwindable\n   stack. */\n\n#define CALL_FN_W_v(lval, orig)                                   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[1];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_W(lval, orig, arg1)                             \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[2];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[4];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[5];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"movq 32(%%rax), %%rcx\\n\\t\"                              \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[6];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"movq 40(%%rax), %%r8\\n\\t\"                               \\\n         \"movq 32(%%rax), %%rcx\\n\\t\"                              \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[7];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"movq 48(%%rax), %%r9\\n\\t\"                               \\\n         \"movq 40(%%rax), %%r8\\n\\t\"                               \\\n         \"movq 32(%%rax), %%rcx\\n\\t\"                              \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7)                            \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[8];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $136,%%rsp\\n\\t\"                                    \\\n         \"pushq 56(%%rax)\\n\\t\"                                    \\\n         \"movq 48(%%rax), %%r9\\n\\t\"                               \\\n         \"movq 40(%%rax), %%r8\\n\\t\"                               \\\n         \"movq 32(%%rax), %%rcx\\n\\t\"                              \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $8, %%rsp\\n\"                                       \\\n         \"addq $136,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[9];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"pushq 64(%%rax)\\n\\t\"                                    \\\n         \"pushq 56(%%rax)\\n\\t\"                                    \\\n         \"movq 48(%%rax), %%r9\\n\\t\"                               \\\n         \"movq 40(%%rax), %%r8\\n\\t\"                               \\\n         \"movq 32(%%rax), %%rcx\\n\\t\"                              \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $16, %%rsp\\n\"                                      \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8,arg9)                  \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[10];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $136,%%rsp\\n\\t\"                                    \\\n         \"pushq 72(%%rax)\\n\\t\"                                    \\\n         \"pushq 64(%%rax)\\n\\t\"                                    \\\n         \"pushq 56(%%rax)\\n\\t\"                                    \\\n         \"movq 48(%%rax), %%r9\\n\\t\"                               \\\n         \"movq 40(%%rax), %%r8\\n\\t\"                               \\\n         \"movq 32(%%rax), %%rcx\\n\\t\"                              \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $24, %%rsp\\n\"                                      \\\n         \"addq $136,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                  arg7,arg8,arg9,arg10)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[11];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      _argvec[10] = (unsigned long)(arg10);                       \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"pushq 80(%%rax)\\n\\t\"                                    \\\n         \"pushq 72(%%rax)\\n\\t\"                                    \\\n         \"pushq 64(%%rax)\\n\\t\"                                    \\\n         \"pushq 56(%%rax)\\n\\t\"                                    \\\n         \"movq 48(%%rax), %%r9\\n\\t\"                               \\\n         \"movq 40(%%rax), %%r8\\n\\t\"                               \\\n         \"movq 32(%%rax), %%rcx\\n\\t\"                              \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $32, %%rsp\\n\"                                      \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                  arg7,arg8,arg9,arg10,arg11)     \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[12];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      _argvec[10] = (unsigned long)(arg10);                       \\\n      _argvec[11] = (unsigned long)(arg11);                       \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $136,%%rsp\\n\\t\"                                    \\\n         \"pushq 88(%%rax)\\n\\t\"                                    \\\n         \"pushq 80(%%rax)\\n\\t\"                                    \\\n         \"pushq 72(%%rax)\\n\\t\"                                    \\\n         \"pushq 64(%%rax)\\n\\t\"                                    \\\n         \"pushq 56(%%rax)\\n\\t\"                                    \\\n         \"movq 48(%%rax), %%r9\\n\\t\"                               \\\n         \"movq 40(%%rax), %%r8\\n\\t\"                               \\\n         \"movq 32(%%rax), %%rcx\\n\\t\"                              \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $40, %%rsp\\n\"                                      \\\n         \"addq $136,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                arg7,arg8,arg9,arg10,arg11,arg12) \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[13];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      _argvec[10] = (unsigned long)(arg10);                       \\\n      _argvec[11] = (unsigned long)(arg11);                       \\\n      _argvec[12] = (unsigned long)(arg12);                       \\\n      __asm__ volatile(                                           \\\n         VALGRIND_CFI_PROLOGUE                                    \\\n         \"subq $128,%%rsp\\n\\t\"                                    \\\n         \"pushq 96(%%rax)\\n\\t\"                                    \\\n         \"pushq 88(%%rax)\\n\\t\"                                    \\\n         \"pushq 80(%%rax)\\n\\t\"                                    \\\n         \"pushq 72(%%rax)\\n\\t\"                                    \\\n         \"pushq 64(%%rax)\\n\\t\"                                    \\\n         \"pushq 56(%%rax)\\n\\t\"                                    \\\n         \"movq 48(%%rax), %%r9\\n\\t\"                               \\\n         \"movq 40(%%rax), %%r8\\n\\t\"                               \\\n         \"movq 32(%%rax), %%rcx\\n\\t\"                              \\\n         \"movq 24(%%rax), %%rdx\\n\\t\"                              \\\n         \"movq 16(%%rax), %%rsi\\n\\t\"                              \\\n         \"movq 8(%%rax), %%rdi\\n\\t\"                               \\\n         \"movq (%%rax), %%rax\\n\\t\"  /* target->%rax */            \\\n         VALGRIND_CALL_NOREDIR_RAX                                \\\n         \"addq $48, %%rsp\\n\"                                      \\\n         \"addq $128,%%rsp\\n\\t\"                                    \\\n         VALGRIND_CFI_EPILOGUE                                    \\\n         : /*out*/   \"=a\" (_res)                                  \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS, \"r15\"   \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#endif /* PLAT_amd64_linux || PLAT_amd64_darwin */\n\n/* ------------------------ ppc32-linux ------------------------ */\n\n#if defined(PLAT_ppc32_linux)\n\n/* This is useful for finding out about the on-stack stuff:\n\n   extern int f9  ( int,int,int,int,int,int,int,int,int );\n   extern int f10 ( int,int,int,int,int,int,int,int,int,int );\n   extern int f11 ( int,int,int,int,int,int,int,int,int,int,int );\n   extern int f12 ( int,int,int,int,int,int,int,int,int,int,int,int );\n\n   int g9 ( void ) {\n      return f9(11,22,33,44,55,66,77,88,99);\n   }\n   int g10 ( void ) {\n      return f10(11,22,33,44,55,66,77,88,99,110);\n   }\n   int g11 ( void ) {\n      return f11(11,22,33,44,55,66,77,88,99,110,121);\n   }\n   int g12 ( void ) {\n      return f12(11,22,33,44,55,66,77,88,99,110,121,132);\n   }\n*/\n\n/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */\n\n/* These regs are trashed by the hidden call. */\n#define __CALLER_SAVED_REGS                                       \\\n   \"lr\", \"ctr\", \"xer\",                                            \\\n   \"cr0\", \"cr1\", \"cr2\", \"cr3\", \"cr4\", \"cr5\", \"cr6\", \"cr7\",        \\\n   \"r0\", \"r2\", \"r3\", \"r4\", \"r5\", \"r6\", \"r7\", \"r8\", \"r9\", \"r10\",   \\\n   \"r11\", \"r12\", \"r13\"\n\n/* These CALL_FN_ macros assume that on ppc32-linux, \n   sizeof(unsigned long) == 4. */\n\n#define CALL_FN_W_v(lval, orig)                                   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[1];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_W(lval, orig, arg1)                             \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[2];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[4];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[5];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      _argvec[4] = (unsigned long)arg4;                           \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 6,16(11)\\n\\t\"  /* arg4->r6 */                       \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[6];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      _argvec[4] = (unsigned long)arg4;                           \\\n      _argvec[5] = (unsigned long)arg5;                           \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 6,16(11)\\n\\t\"  /* arg4->r6 */                       \\\n         \"lwz 7,20(11)\\n\\t\"                                       \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[7];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      _argvec[4] = (unsigned long)arg4;                           \\\n      _argvec[5] = (unsigned long)arg5;                           \\\n      _argvec[6] = (unsigned long)arg6;                           \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 6,16(11)\\n\\t\"  /* arg4->r6 */                       \\\n         \"lwz 7,20(11)\\n\\t\"                                       \\\n         \"lwz 8,24(11)\\n\\t\"                                       \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7)                            \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[8];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      _argvec[4] = (unsigned long)arg4;                           \\\n      _argvec[5] = (unsigned long)arg5;                           \\\n      _argvec[6] = (unsigned long)arg6;                           \\\n      _argvec[7] = (unsigned long)arg7;                           \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 6,16(11)\\n\\t\"  /* arg4->r6 */                       \\\n         \"lwz 7,20(11)\\n\\t\"                                       \\\n         \"lwz 8,24(11)\\n\\t\"                                       \\\n         \"lwz 9,28(11)\\n\\t\"                                       \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[9];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      _argvec[4] = (unsigned long)arg4;                           \\\n      _argvec[5] = (unsigned long)arg5;                           \\\n      _argvec[6] = (unsigned long)arg6;                           \\\n      _argvec[7] = (unsigned long)arg7;                           \\\n      _argvec[8] = (unsigned long)arg8;                           \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 6,16(11)\\n\\t\"  /* arg4->r6 */                       \\\n         \"lwz 7,20(11)\\n\\t\"                                       \\\n         \"lwz 8,24(11)\\n\\t\"                                       \\\n         \"lwz 9,28(11)\\n\\t\"                                       \\\n         \"lwz 10,32(11)\\n\\t\" /* arg8->r10 */                      \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8,arg9)                  \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[10];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      _argvec[4] = (unsigned long)arg4;                           \\\n      _argvec[5] = (unsigned long)arg5;                           \\\n      _argvec[6] = (unsigned long)arg6;                           \\\n      _argvec[7] = (unsigned long)arg7;                           \\\n      _argvec[8] = (unsigned long)arg8;                           \\\n      _argvec[9] = (unsigned long)arg9;                           \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"addi 1,1,-16\\n\\t\"                                       \\\n         /* arg9 */                                               \\\n         \"lwz 3,36(11)\\n\\t\"                                       \\\n         \"stw 3,8(1)\\n\\t\"                                         \\\n         /* args1-8 */                                            \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 6,16(11)\\n\\t\"  /* arg4->r6 */                       \\\n         \"lwz 7,20(11)\\n\\t\"                                       \\\n         \"lwz 8,24(11)\\n\\t\"                                       \\\n         \"lwz 9,28(11)\\n\\t\"                                       \\\n         \"lwz 10,32(11)\\n\\t\" /* arg8->r10 */                      \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"addi 1,1,16\\n\\t\"                                        \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                  arg7,arg8,arg9,arg10)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[11];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      _argvec[4] = (unsigned long)arg4;                           \\\n      _argvec[5] = (unsigned long)arg5;                           \\\n      _argvec[6] = (unsigned long)arg6;                           \\\n      _argvec[7] = (unsigned long)arg7;                           \\\n      _argvec[8] = (unsigned long)arg8;                           \\\n      _argvec[9] = (unsigned long)arg9;                           \\\n      _argvec[10] = (unsigned long)arg10;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"addi 1,1,-16\\n\\t\"                                       \\\n         /* arg10 */                                              \\\n         \"lwz 3,40(11)\\n\\t\"                                       \\\n         \"stw 3,12(1)\\n\\t\"                                        \\\n         /* arg9 */                                               \\\n         \"lwz 3,36(11)\\n\\t\"                                       \\\n         \"stw 3,8(1)\\n\\t\"                                         \\\n         /* args1-8 */                                            \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 6,16(11)\\n\\t\"  /* arg4->r6 */                       \\\n         \"lwz 7,20(11)\\n\\t\"                                       \\\n         \"lwz 8,24(11)\\n\\t\"                                       \\\n         \"lwz 9,28(11)\\n\\t\"                                       \\\n         \"lwz 10,32(11)\\n\\t\" /* arg8->r10 */                      \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"addi 1,1,16\\n\\t\"                                        \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                  arg7,arg8,arg9,arg10,arg11)     \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[12];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      _argvec[4] = (unsigned long)arg4;                           \\\n      _argvec[5] = (unsigned long)arg5;                           \\\n      _argvec[6] = (unsigned long)arg6;                           \\\n      _argvec[7] = (unsigned long)arg7;                           \\\n      _argvec[8] = (unsigned long)arg8;                           \\\n      _argvec[9] = (unsigned long)arg9;                           \\\n      _argvec[10] = (unsigned long)arg10;                         \\\n      _argvec[11] = (unsigned long)arg11;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"addi 1,1,-32\\n\\t\"                                       \\\n         /* arg11 */                                              \\\n         \"lwz 3,44(11)\\n\\t\"                                       \\\n         \"stw 3,16(1)\\n\\t\"                                        \\\n         /* arg10 */                                              \\\n         \"lwz 3,40(11)\\n\\t\"                                       \\\n         \"stw 3,12(1)\\n\\t\"                                        \\\n         /* arg9 */                                               \\\n         \"lwz 3,36(11)\\n\\t\"                                       \\\n         \"stw 3,8(1)\\n\\t\"                                         \\\n         /* args1-8 */                                            \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 6,16(11)\\n\\t\"  /* arg4->r6 */                       \\\n         \"lwz 7,20(11)\\n\\t\"                                       \\\n         \"lwz 8,24(11)\\n\\t\"                                       \\\n         \"lwz 9,28(11)\\n\\t\"                                       \\\n         \"lwz 10,32(11)\\n\\t\" /* arg8->r10 */                      \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"addi 1,1,32\\n\\t\"                                        \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                arg7,arg8,arg9,arg10,arg11,arg12) \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[13];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)arg1;                           \\\n      _argvec[2] = (unsigned long)arg2;                           \\\n      _argvec[3] = (unsigned long)arg3;                           \\\n      _argvec[4] = (unsigned long)arg4;                           \\\n      _argvec[5] = (unsigned long)arg5;                           \\\n      _argvec[6] = (unsigned long)arg6;                           \\\n      _argvec[7] = (unsigned long)arg7;                           \\\n      _argvec[8] = (unsigned long)arg8;                           \\\n      _argvec[9] = (unsigned long)arg9;                           \\\n      _argvec[10] = (unsigned long)arg10;                         \\\n      _argvec[11] = (unsigned long)arg11;                         \\\n      _argvec[12] = (unsigned long)arg12;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"addi 1,1,-32\\n\\t\"                                       \\\n         /* arg12 */                                              \\\n         \"lwz 3,48(11)\\n\\t\"                                       \\\n         \"stw 3,20(1)\\n\\t\"                                        \\\n         /* arg11 */                                              \\\n         \"lwz 3,44(11)\\n\\t\"                                       \\\n         \"stw 3,16(1)\\n\\t\"                                        \\\n         /* arg10 */                                              \\\n         \"lwz 3,40(11)\\n\\t\"                                       \\\n         \"stw 3,12(1)\\n\\t\"                                        \\\n         /* arg9 */                                               \\\n         \"lwz 3,36(11)\\n\\t\"                                       \\\n         \"stw 3,8(1)\\n\\t\"                                         \\\n         /* args1-8 */                                            \\\n         \"lwz 3,4(11)\\n\\t\"   /* arg1->r3 */                       \\\n         \"lwz 4,8(11)\\n\\t\"                                        \\\n         \"lwz 5,12(11)\\n\\t\"                                       \\\n         \"lwz 6,16(11)\\n\\t\"  /* arg4->r6 */                       \\\n         \"lwz 7,20(11)\\n\\t\"                                       \\\n         \"lwz 8,24(11)\\n\\t\"                                       \\\n         \"lwz 9,28(11)\\n\\t\"                                       \\\n         \"lwz 10,32(11)\\n\\t\" /* arg8->r10 */                      \\\n         \"lwz 11,0(11)\\n\\t\"  /* target->r11 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"addi 1,1,32\\n\\t\"                                        \\\n         \"mr %0,3\"                                                \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#endif /* PLAT_ppc32_linux */\n\n/* ------------------------ ppc64-linux ------------------------ */\n\n#if defined(PLAT_ppc64_linux)\n\n/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */\n\n/* These regs are trashed by the hidden call. */\n#define __CALLER_SAVED_REGS                                       \\\n   \"lr\", \"ctr\", \"xer\",                                            \\\n   \"cr0\", \"cr1\", \"cr2\", \"cr3\", \"cr4\", \"cr5\", \"cr6\", \"cr7\",        \\\n   \"r0\", \"r2\", \"r3\", \"r4\", \"r5\", \"r6\", \"r7\", \"r8\", \"r9\", \"r10\",   \\\n   \"r11\", \"r12\", \"r13\"\n\n/* These CALL_FN_ macros assume that on ppc64-linux, sizeof(unsigned\n   long) == 8. */\n\n#define CALL_FN_W_v(lval, orig)                                   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+0];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1] = (unsigned long)_orig.r2;                       \\\n      _argvec[2] = (unsigned long)_orig.nraddr;                   \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\" /* restore tocptr */                      \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_W(lval, orig, arg1)                             \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+1];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\" /* restore tocptr */                      \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+2];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\" /* restore tocptr */                      \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+3];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\" /* restore tocptr */                      \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+4];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      _argvec[2+4] = (unsigned long)arg4;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld   6, 32(11)\\n\\t\" /* arg4->r6 */                      \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\" /* restore tocptr */                      \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+5];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      _argvec[2+4] = (unsigned long)arg4;                         \\\n      _argvec[2+5] = (unsigned long)arg5;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld   6, 32(11)\\n\\t\" /* arg4->r6 */                      \\\n         \"ld   7, 40(11)\\n\\t\" /* arg5->r7 */                      \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\" /* restore tocptr */                      \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+6];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      _argvec[2+4] = (unsigned long)arg4;                         \\\n      _argvec[2+5] = (unsigned long)arg5;                         \\\n      _argvec[2+6] = (unsigned long)arg6;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld   6, 32(11)\\n\\t\" /* arg4->r6 */                      \\\n         \"ld   7, 40(11)\\n\\t\" /* arg5->r7 */                      \\\n         \"ld   8, 48(11)\\n\\t\" /* arg6->r8 */                      \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\" /* restore tocptr */                      \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7)                            \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+7];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      _argvec[2+4] = (unsigned long)arg4;                         \\\n      _argvec[2+5] = (unsigned long)arg5;                         \\\n      _argvec[2+6] = (unsigned long)arg6;                         \\\n      _argvec[2+7] = (unsigned long)arg7;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld   6, 32(11)\\n\\t\" /* arg4->r6 */                      \\\n         \"ld   7, 40(11)\\n\\t\" /* arg5->r7 */                      \\\n         \"ld   8, 48(11)\\n\\t\" /* arg6->r8 */                      \\\n         \"ld   9, 56(11)\\n\\t\" /* arg7->r9 */                      \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\" /* restore tocptr */                      \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+8];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      _argvec[2+4] = (unsigned long)arg4;                         \\\n      _argvec[2+5] = (unsigned long)arg5;                         \\\n      _argvec[2+6] = (unsigned long)arg6;                         \\\n      _argvec[2+7] = (unsigned long)arg7;                         \\\n      _argvec[2+8] = (unsigned long)arg8;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld   6, 32(11)\\n\\t\" /* arg4->r6 */                      \\\n         \"ld   7, 40(11)\\n\\t\" /* arg5->r7 */                      \\\n         \"ld   8, 48(11)\\n\\t\" /* arg6->r8 */                      \\\n         \"ld   9, 56(11)\\n\\t\" /* arg7->r9 */                      \\\n         \"ld  10, 64(11)\\n\\t\" /* arg8->r10 */                     \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\" /* restore tocptr */                      \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8,arg9)                  \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+9];                        \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      _argvec[2+4] = (unsigned long)arg4;                         \\\n      _argvec[2+5] = (unsigned long)arg5;                         \\\n      _argvec[2+6] = (unsigned long)arg6;                         \\\n      _argvec[2+7] = (unsigned long)arg7;                         \\\n      _argvec[2+8] = (unsigned long)arg8;                         \\\n      _argvec[2+9] = (unsigned long)arg9;                         \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"addi 1,1,-128\\n\\t\"  /* expand stack frame */            \\\n         /* arg9 */                                               \\\n         \"ld  3,72(11)\\n\\t\"                                       \\\n         \"std 3,112(1)\\n\\t\"                                       \\\n         /* args1-8 */                                            \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld   6, 32(11)\\n\\t\" /* arg4->r6 */                      \\\n         \"ld   7, 40(11)\\n\\t\" /* arg5->r7 */                      \\\n         \"ld   8, 48(11)\\n\\t\" /* arg6->r8 */                      \\\n         \"ld   9, 56(11)\\n\\t\" /* arg7->r9 */                      \\\n         \"ld  10, 64(11)\\n\\t\" /* arg8->r10 */                     \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\\n\\t\" /* restore tocptr */                  \\\n         \"addi 1,1,128\"     /* restore frame */                   \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                  arg7,arg8,arg9,arg10)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+10];                       \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      _argvec[2+4] = (unsigned long)arg4;                         \\\n      _argvec[2+5] = (unsigned long)arg5;                         \\\n      _argvec[2+6] = (unsigned long)arg6;                         \\\n      _argvec[2+7] = (unsigned long)arg7;                         \\\n      _argvec[2+8] = (unsigned long)arg8;                         \\\n      _argvec[2+9] = (unsigned long)arg9;                         \\\n      _argvec[2+10] = (unsigned long)arg10;                       \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"addi 1,1,-128\\n\\t\"  /* expand stack frame */            \\\n         /* arg10 */                                              \\\n         \"ld  3,80(11)\\n\\t\"                                       \\\n         \"std 3,120(1)\\n\\t\"                                       \\\n         /* arg9 */                                               \\\n         \"ld  3,72(11)\\n\\t\"                                       \\\n         \"std 3,112(1)\\n\\t\"                                       \\\n         /* args1-8 */                                            \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld   6, 32(11)\\n\\t\" /* arg4->r6 */                      \\\n         \"ld   7, 40(11)\\n\\t\" /* arg5->r7 */                      \\\n         \"ld   8, 48(11)\\n\\t\" /* arg6->r8 */                      \\\n         \"ld   9, 56(11)\\n\\t\" /* arg7->r9 */                      \\\n         \"ld  10, 64(11)\\n\\t\" /* arg8->r10 */                     \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\\n\\t\" /* restore tocptr */                  \\\n         \"addi 1,1,128\"     /* restore frame */                   \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                  arg7,arg8,arg9,arg10,arg11)     \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+11];                       \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      _argvec[2+4] = (unsigned long)arg4;                         \\\n      _argvec[2+5] = (unsigned long)arg5;                         \\\n      _argvec[2+6] = (unsigned long)arg6;                         \\\n      _argvec[2+7] = (unsigned long)arg7;                         \\\n      _argvec[2+8] = (unsigned long)arg8;                         \\\n      _argvec[2+9] = (unsigned long)arg9;                         \\\n      _argvec[2+10] = (unsigned long)arg10;                       \\\n      _argvec[2+11] = (unsigned long)arg11;                       \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"addi 1,1,-144\\n\\t\"  /* expand stack frame */            \\\n         /* arg11 */                                              \\\n         \"ld  3,88(11)\\n\\t\"                                       \\\n         \"std 3,128(1)\\n\\t\"                                       \\\n         /* arg10 */                                              \\\n         \"ld  3,80(11)\\n\\t\"                                       \\\n         \"std 3,120(1)\\n\\t\"                                       \\\n         /* arg9 */                                               \\\n         \"ld  3,72(11)\\n\\t\"                                       \\\n         \"std 3,112(1)\\n\\t\"                                       \\\n         /* args1-8 */                                            \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld   6, 32(11)\\n\\t\" /* arg4->r6 */                      \\\n         \"ld   7, 40(11)\\n\\t\" /* arg5->r7 */                      \\\n         \"ld   8, 48(11)\\n\\t\" /* arg6->r8 */                      \\\n         \"ld   9, 56(11)\\n\\t\" /* arg7->r9 */                      \\\n         \"ld  10, 64(11)\\n\\t\" /* arg8->r10 */                     \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\\n\\t\" /* restore tocptr */                  \\\n         \"addi 1,1,144\"     /* restore frame */                   \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                arg7,arg8,arg9,arg10,arg11,arg12) \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3+12];                       \\\n      volatile unsigned long _res;                                \\\n      /* _argvec[0] holds current r2 across the call */           \\\n      _argvec[1]   = (unsigned long)_orig.r2;                     \\\n      _argvec[2]   = (unsigned long)_orig.nraddr;                 \\\n      _argvec[2+1] = (unsigned long)arg1;                         \\\n      _argvec[2+2] = (unsigned long)arg2;                         \\\n      _argvec[2+3] = (unsigned long)arg3;                         \\\n      _argvec[2+4] = (unsigned long)arg4;                         \\\n      _argvec[2+5] = (unsigned long)arg5;                         \\\n      _argvec[2+6] = (unsigned long)arg6;                         \\\n      _argvec[2+7] = (unsigned long)arg7;                         \\\n      _argvec[2+8] = (unsigned long)arg8;                         \\\n      _argvec[2+9] = (unsigned long)arg9;                         \\\n      _argvec[2+10] = (unsigned long)arg10;                       \\\n      _argvec[2+11] = (unsigned long)arg11;                       \\\n      _argvec[2+12] = (unsigned long)arg12;                       \\\n      __asm__ volatile(                                           \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"std 2,-16(11)\\n\\t\"  /* save tocptr */                   \\\n         \"ld   2,-8(11)\\n\\t\"  /* use nraddr's tocptr */           \\\n         \"addi 1,1,-144\\n\\t\"  /* expand stack frame */            \\\n         /* arg12 */                                              \\\n         \"ld  3,96(11)\\n\\t\"                                       \\\n         \"std 3,136(1)\\n\\t\"                                       \\\n         /* arg11 */                                              \\\n         \"ld  3,88(11)\\n\\t\"                                       \\\n         \"std 3,128(1)\\n\\t\"                                       \\\n         /* arg10 */                                              \\\n         \"ld  3,80(11)\\n\\t\"                                       \\\n         \"std 3,120(1)\\n\\t\"                                       \\\n         /* arg9 */                                               \\\n         \"ld  3,72(11)\\n\\t\"                                       \\\n         \"std 3,112(1)\\n\\t\"                                       \\\n         /* args1-8 */                                            \\\n         \"ld   3, 8(11)\\n\\t\"  /* arg1->r3 */                      \\\n         \"ld   4, 16(11)\\n\\t\" /* arg2->r4 */                      \\\n         \"ld   5, 24(11)\\n\\t\" /* arg3->r5 */                      \\\n         \"ld   6, 32(11)\\n\\t\" /* arg4->r6 */                      \\\n         \"ld   7, 40(11)\\n\\t\" /* arg5->r7 */                      \\\n         \"ld   8, 48(11)\\n\\t\" /* arg6->r8 */                      \\\n         \"ld   9, 56(11)\\n\\t\" /* arg7->r9 */                      \\\n         \"ld  10, 64(11)\\n\\t\" /* arg8->r10 */                     \\\n         \"ld  11, 0(11)\\n\\t\"  /* target->r11 */                   \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \\\n         \"mr 11,%1\\n\\t\"                                           \\\n         \"mr %0,3\\n\\t\"                                            \\\n         \"ld 2,-16(11)\\n\\t\" /* restore tocptr */                  \\\n         \"addi 1,1,144\"     /* restore frame */                   \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"r\" (&_argvec[2])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#endif /* PLAT_ppc64_linux */\n\n/* ------------------------- arm-linux ------------------------- */\n\n#if defined(PLAT_arm_linux)\n\n/* These regs are trashed by the hidden call. */\n#define __CALLER_SAVED_REGS \"r0\", \"r1\", \"r2\", \"r3\",\"r4\",\"r14\"\n\n/* These CALL_FN_ macros assume that on arm-linux, sizeof(unsigned\n   long) == 4. */\n\n#define CALL_FN_W_v(lval, orig)                                   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[1];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      __asm__ volatile(                                           \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"mov %0, r0\\n\"                                           \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_W(lval, orig, arg1)                             \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[2];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"mov %0, r0\\n\"                                           \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\",  __CALLER_SAVED_REGS         \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[3];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"mov %0, r0\\n\"                                           \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[4];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"mov %0, r0\\n\"                                           \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[5];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #16] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"mov %0, r0\"                                             \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[6];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #20] \\n\\t\"                                 \\\n         \"push {r0} \\n\\t\"                                         \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #16] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"add sp, sp, #4 \\n\\t\"                                    \\\n         \"mov %0, r0\"                                             \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[7];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #20] \\n\\t\"                                 \\\n         \"ldr r1, [%1, #24] \\n\\t\"                                 \\\n         \"push {r0, r1} \\n\\t\"                                     \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #16] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"add sp, sp, #8 \\n\\t\"                                    \\\n         \"mov %0, r0\"                                             \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7)                            \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[8];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #20] \\n\\t\"                                 \\\n         \"ldr r1, [%1, #24] \\n\\t\"                                 \\\n         \"ldr r2, [%1, #28] \\n\\t\"                                 \\\n         \"push {r0, r1, r2} \\n\\t\"                                 \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #16] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"add sp, sp, #12 \\n\\t\"                                   \\\n         \"mov %0, r0\"                                             \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8)                       \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[9];                          \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #20] \\n\\t\"                                 \\\n         \"ldr r1, [%1, #24] \\n\\t\"                                 \\\n         \"ldr r2, [%1, #28] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #32] \\n\\t\"                                 \\\n         \"push {r0, r1, r2, r3} \\n\\t\"                             \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #16] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"add sp, sp, #16 \\n\\t\"                                   \\\n         \"mov %0, r0\"                                             \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \\\n                                 arg7,arg8,arg9)                  \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[10];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #20] \\n\\t\"                                 \\\n         \"ldr r1, [%1, #24] \\n\\t\"                                 \\\n         \"ldr r2, [%1, #28] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #32] \\n\\t\"                                 \\\n         \"ldr r4, [%1, #36] \\n\\t\"                                 \\\n         \"push {r0, r1, r2, r3, r4} \\n\\t\"                         \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #16] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"add sp, sp, #20 \\n\\t\"                                   \\\n         \"mov %0, r0\"                                             \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \\\n                                  arg7,arg8,arg9,arg10)           \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[11];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      _argvec[10] = (unsigned long)(arg10);                       \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #40] \\n\\t\"                                 \\\n         \"push {r0} \\n\\t\"                                         \\\n         \"ldr r0, [%1, #20] \\n\\t\"                                 \\\n         \"ldr r1, [%1, #24] \\n\\t\"                                 \\\n         \"ldr r2, [%1, #28] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #32] \\n\\t\"                                 \\\n         \"ldr r4, [%1, #36] \\n\\t\"                                 \\\n         \"push {r0, r1, r2, r3, r4} \\n\\t\"                         \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #16] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"add sp, sp, #24 \\n\\t\"                                   \\\n         \"mov %0, r0\"                                             \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \\\n                                  arg6,arg7,arg8,arg9,arg10,      \\\n                                  arg11)                          \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[12];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      _argvec[10] = (unsigned long)(arg10);                       \\\n      _argvec[11] = (unsigned long)(arg11);                       \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #40] \\n\\t\"                                 \\\n         \"ldr r1, [%1, #44] \\n\\t\"                                 \\\n         \"push {r0, r1} \\n\\t\"                                     \\\n         \"ldr r0, [%1, #20] \\n\\t\"                                 \\\n         \"ldr r1, [%1, #24] \\n\\t\"                                 \\\n         \"ldr r2, [%1, #28] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #32] \\n\\t\"                                 \\\n         \"ldr r4, [%1, #36] \\n\\t\"                                 \\\n         \"push {r0, r1, r2, r3, r4} \\n\\t\"                         \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #16] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"add sp, sp, #28 \\n\\t\"                                   \\\n         \"mov %0, r0\"                                             \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\",__CALLER_SAVED_REGS           \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \\\n                                  arg6,arg7,arg8,arg9,arg10,      \\\n                                  arg11,arg12)                    \\\n   do {                                                           \\\n      volatile OrigFn        _orig = (orig);                      \\\n      volatile unsigned long _argvec[13];                         \\\n      volatile unsigned long _res;                                \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                   \\\n      _argvec[1] = (unsigned long)(arg1);                         \\\n      _argvec[2] = (unsigned long)(arg2);                         \\\n      _argvec[3] = (unsigned long)(arg3);                         \\\n      _argvec[4] = (unsigned long)(arg4);                         \\\n      _argvec[5] = (unsigned long)(arg5);                         \\\n      _argvec[6] = (unsigned long)(arg6);                         \\\n      _argvec[7] = (unsigned long)(arg7);                         \\\n      _argvec[8] = (unsigned long)(arg8);                         \\\n      _argvec[9] = (unsigned long)(arg9);                         \\\n      _argvec[10] = (unsigned long)(arg10);                       \\\n      _argvec[11] = (unsigned long)(arg11);                       \\\n      _argvec[12] = (unsigned long)(arg12);                       \\\n      __asm__ volatile(                                           \\\n         \"ldr r0, [%1, #40] \\n\\t\"                                 \\\n         \"ldr r1, [%1, #44] \\n\\t\"                                 \\\n         \"ldr r2, [%1, #48] \\n\\t\"                                 \\\n         \"push {r0, r1, r2} \\n\\t\"                                 \\\n         \"ldr r0, [%1, #20] \\n\\t\"                                 \\\n         \"ldr r1, [%1, #24] \\n\\t\"                                 \\\n         \"ldr r2, [%1, #28] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #32] \\n\\t\"                                 \\\n         \"ldr r4, [%1, #36] \\n\\t\"                                 \\\n         \"push {r0, r1, r2, r3, r4} \\n\\t\"                         \\\n         \"ldr r0, [%1, #4] \\n\\t\"                                  \\\n         \"ldr r1, [%1, #8] \\n\\t\"                                  \\\n         \"ldr r2, [%1, #12] \\n\\t\"                                 \\\n         \"ldr r3, [%1, #16] \\n\\t\"                                 \\\n         \"ldr r4, [%1] \\n\\t\"  /* target->r4 */                    \\\n         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \\\n         \"add sp, sp, #32 \\n\\t\"                                   \\\n         \"mov %0, r0\"                                             \\\n         : /*out*/   \"=r\" (_res)                                  \\\n         : /*in*/    \"0\" (&_argvec[0])                            \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS          \\\n      );                                                          \\\n      lval = (__typeof__(lval)) _res;                             \\\n   } while (0)\n\n#endif /* PLAT_arm_linux */\n\n/* ------------------------- s390x-linux ------------------------- */\n\n#if defined(PLAT_s390x_linux)\n\n/* Similar workaround as amd64 (see above), but we use r11 as frame\n   pointer and save the old r11 in r7. r11 might be used for\n   argvec, therefore we copy argvec in r1 since r1 is clobbered\n   after the call anyway.  */\n#if defined(__GNUC__) && defined(__GCC_HAVE_DWARF2_CFI_ASM)\n#  define __FRAME_POINTER                                         \\\n      ,\"d\"(__builtin_dwarf_cfa())\n#  define VALGRIND_CFI_PROLOGUE                                   \\\n      \".cfi_remember_state\\n\\t\"                                   \\\n      \"lgr 1,%1\\n\\t\" /* copy the argvec pointer in r1 */          \\\n      \"lgr 7,11\\n\\t\"                                              \\\n      \"lgr 11,%2\\n\\t\"                                             \\\n      \".cfi_def_cfa r11, 0\\n\\t\"\n#  define VALGRIND_CFI_EPILOGUE                                   \\\n      \"lgr 11, 7\\n\\t\"                                             \\\n      \".cfi_restore_state\\n\\t\"\n#else\n#  define __FRAME_POINTER\n#  define VALGRIND_CFI_PROLOGUE                                   \\\n      \"lgr 1,%1\\n\\t\"\n#  define VALGRIND_CFI_EPILOGUE\n#endif\n\n\n\n\n/* These regs are trashed by the hidden call. Note that we overwrite\n   r14 in s390_irgen_noredir (VEX/priv/guest_s390_irgen.c) to give the\n   function a proper return address. All others are ABI defined call\n   clobbers. */\n#define __CALLER_SAVED_REGS \"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"14\", \\\n                           \"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\"\n\n\n#define CALL_FN_W_v(lval, orig)                                  \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long  _argvec[1];                        \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-160\\n\\t\"                                      \\\n         \"lg 1, 0(1)\\n\\t\"  /* target->r1 */                      \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,160\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"d\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"7\"     \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n/* The call abi has the arguments in r2-r6 and stack */\n#define CALL_FN_W_W(lval, orig, arg1)                            \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[2];                         \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-160\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,160\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"7\"     \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_WW(lval, orig, arg1, arg2)                     \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[3];                         \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-160\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,160\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"7\"     \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_WWW(lval, orig, arg1, arg2, arg3)              \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[4];                         \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-160\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,160\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"7\"     \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_WWWW(lval, orig, arg1, arg2, arg3, arg4)       \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[5];                         \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      _argvec[4] = (unsigned long)arg4;                          \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-160\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 5,32(1)\\n\\t\"                                        \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,160\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"7\"     \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_5W(lval, orig, arg1, arg2, arg3, arg4, arg5)   \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[6];                         \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      _argvec[4] = (unsigned long)arg4;                          \\\n      _argvec[5] = (unsigned long)arg5;                          \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-160\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 5,32(1)\\n\\t\"                                        \\\n         \"lg 6,40(1)\\n\\t\"                                        \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,160\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"6\",\"7\" \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_6W(lval, orig, arg1, arg2, arg3, arg4, arg5,   \\\n                     arg6)                                       \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[7];                         \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      _argvec[4] = (unsigned long)arg4;                          \\\n      _argvec[5] = (unsigned long)arg5;                          \\\n      _argvec[6] = (unsigned long)arg6;                          \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-168\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 5,32(1)\\n\\t\"                                        \\\n         \"lg 6,40(1)\\n\\t\"                                        \\\n         \"mvc 160(8,15), 48(1)\\n\\t\"                              \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,168\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"6\",\"7\" \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_7W(lval, orig, arg1, arg2, arg3, arg4, arg5,   \\\n                     arg6, arg7)                                 \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[8];                         \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      _argvec[4] = (unsigned long)arg4;                          \\\n      _argvec[5] = (unsigned long)arg5;                          \\\n      _argvec[6] = (unsigned long)arg6;                          \\\n      _argvec[7] = (unsigned long)arg7;                          \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-176\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 5,32(1)\\n\\t\"                                        \\\n         \"lg 6,40(1)\\n\\t\"                                        \\\n         \"mvc 160(8,15), 48(1)\\n\\t\"                              \\\n         \"mvc 168(8,15), 56(1)\\n\\t\"                              \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,176\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"6\",\"7\" \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_8W(lval, orig, arg1, arg2, arg3, arg4, arg5,   \\\n                     arg6, arg7 ,arg8)                           \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[9];                         \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      _argvec[4] = (unsigned long)arg4;                          \\\n      _argvec[5] = (unsigned long)arg5;                          \\\n      _argvec[6] = (unsigned long)arg6;                          \\\n      _argvec[7] = (unsigned long)arg7;                          \\\n      _argvec[8] = (unsigned long)arg8;                          \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-184\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 5,32(1)\\n\\t\"                                        \\\n         \"lg 6,40(1)\\n\\t\"                                        \\\n         \"mvc 160(8,15), 48(1)\\n\\t\"                              \\\n         \"mvc 168(8,15), 56(1)\\n\\t\"                              \\\n         \"mvc 176(8,15), 64(1)\\n\\t\"                              \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,184\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"6\",\"7\" \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_9W(lval, orig, arg1, arg2, arg3, arg4, arg5,   \\\n                     arg6, arg7 ,arg8, arg9)                     \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[10];                        \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      _argvec[4] = (unsigned long)arg4;                          \\\n      _argvec[5] = (unsigned long)arg5;                          \\\n      _argvec[6] = (unsigned long)arg6;                          \\\n      _argvec[7] = (unsigned long)arg7;                          \\\n      _argvec[8] = (unsigned long)arg8;                          \\\n      _argvec[9] = (unsigned long)arg9;                          \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-192\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 5,32(1)\\n\\t\"                                        \\\n         \"lg 6,40(1)\\n\\t\"                                        \\\n         \"mvc 160(8,15), 48(1)\\n\\t\"                              \\\n         \"mvc 168(8,15), 56(1)\\n\\t\"                              \\\n         \"mvc 176(8,15), 64(1)\\n\\t\"                              \\\n         \"mvc 184(8,15), 72(1)\\n\\t\"                              \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,192\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"6\",\"7\" \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_10W(lval, orig, arg1, arg2, arg3, arg4, arg5,  \\\n                     arg6, arg7 ,arg8, arg9, arg10)              \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[11];                        \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      _argvec[4] = (unsigned long)arg4;                          \\\n      _argvec[5] = (unsigned long)arg5;                          \\\n      _argvec[6] = (unsigned long)arg6;                          \\\n      _argvec[7] = (unsigned long)arg7;                          \\\n      _argvec[8] = (unsigned long)arg8;                          \\\n      _argvec[9] = (unsigned long)arg9;                          \\\n      _argvec[10] = (unsigned long)arg10;                        \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-200\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 5,32(1)\\n\\t\"                                        \\\n         \"lg 6,40(1)\\n\\t\"                                        \\\n         \"mvc 160(8,15), 48(1)\\n\\t\"                              \\\n         \"mvc 168(8,15), 56(1)\\n\\t\"                              \\\n         \"mvc 176(8,15), 64(1)\\n\\t\"                              \\\n         \"mvc 184(8,15), 72(1)\\n\\t\"                              \\\n         \"mvc 192(8,15), 80(1)\\n\\t\"                              \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,200\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"6\",\"7\" \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_11W(lval, orig, arg1, arg2, arg3, arg4, arg5,  \\\n                     arg6, arg7 ,arg8, arg9, arg10, arg11)       \\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[12];                        \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      _argvec[4] = (unsigned long)arg4;                          \\\n      _argvec[5] = (unsigned long)arg5;                          \\\n      _argvec[6] = (unsigned long)arg6;                          \\\n      _argvec[7] = (unsigned long)arg7;                          \\\n      _argvec[8] = (unsigned long)arg8;                          \\\n      _argvec[9] = (unsigned long)arg9;                          \\\n      _argvec[10] = (unsigned long)arg10;                        \\\n      _argvec[11] = (unsigned long)arg11;                        \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-208\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 5,32(1)\\n\\t\"                                        \\\n         \"lg 6,40(1)\\n\\t\"                                        \\\n         \"mvc 160(8,15), 48(1)\\n\\t\"                              \\\n         \"mvc 168(8,15), 56(1)\\n\\t\"                              \\\n         \"mvc 176(8,15), 64(1)\\n\\t\"                              \\\n         \"mvc 184(8,15), 72(1)\\n\\t\"                              \\\n         \"mvc 192(8,15), 80(1)\\n\\t\"                              \\\n         \"mvc 200(8,15), 88(1)\\n\\t\"                              \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,208\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"6\",\"7\" \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n#define CALL_FN_W_12W(lval, orig, arg1, arg2, arg3, arg4, arg5,  \\\n                     arg6, arg7 ,arg8, arg9, arg10, arg11, arg12)\\\n   do {                                                          \\\n      volatile OrigFn        _orig = (orig);                     \\\n      volatile unsigned long _argvec[13];                        \\\n      volatile unsigned long _res;                               \\\n      _argvec[0] = (unsigned long)_orig.nraddr;                  \\\n      _argvec[1] = (unsigned long)arg1;                          \\\n      _argvec[2] = (unsigned long)arg2;                          \\\n      _argvec[3] = (unsigned long)arg3;                          \\\n      _argvec[4] = (unsigned long)arg4;                          \\\n      _argvec[5] = (unsigned long)arg5;                          \\\n      _argvec[6] = (unsigned long)arg6;                          \\\n      _argvec[7] = (unsigned long)arg7;                          \\\n      _argvec[8] = (unsigned long)arg8;                          \\\n      _argvec[9] = (unsigned long)arg9;                          \\\n      _argvec[10] = (unsigned long)arg10;                        \\\n      _argvec[11] = (unsigned long)arg11;                        \\\n      _argvec[12] = (unsigned long)arg12;                        \\\n      __asm__ volatile(                                          \\\n         VALGRIND_CFI_PROLOGUE                                   \\\n         \"aghi 15,-216\\n\\t\"                                      \\\n         \"lg 2, 8(1)\\n\\t\"                                        \\\n         \"lg 3,16(1)\\n\\t\"                                        \\\n         \"lg 4,24(1)\\n\\t\"                                        \\\n         \"lg 5,32(1)\\n\\t\"                                        \\\n         \"lg 6,40(1)\\n\\t\"                                        \\\n         \"mvc 160(8,15), 48(1)\\n\\t\"                              \\\n         \"mvc 168(8,15), 56(1)\\n\\t\"                              \\\n         \"mvc 176(8,15), 64(1)\\n\\t\"                              \\\n         \"mvc 184(8,15), 72(1)\\n\\t\"                              \\\n         \"mvc 192(8,15), 80(1)\\n\\t\"                              \\\n         \"mvc 200(8,15), 88(1)\\n\\t\"                              \\\n         \"mvc 208(8,15), 96(1)\\n\\t\"                              \\\n         \"lg 1, 0(1)\\n\\t\"                                        \\\n         VALGRIND_CALL_NOREDIR_R1                                \\\n         \"lgr %0, 2\\n\\t\"                                         \\\n         \"aghi 15,216\\n\\t\"                                       \\\n         VALGRIND_CFI_EPILOGUE                                   \\\n         : /*out*/   \"=d\" (_res)                                 \\\n         : /*in*/    \"a\" (&_argvec[0]) __FRAME_POINTER           \\\n         : /*trash*/ \"cc\", \"memory\", __CALLER_SAVED_REGS,\"6\",\"7\" \\\n      );                                                         \\\n      lval = (__typeof__(lval)) _res;                            \\\n   } while (0)\n\n\n#endif /* PLAT_s390x_linux */\n\n\n/* ------------------------------------------------------------------ */\n/* ARCHITECTURE INDEPENDENT MACROS for CLIENT REQUESTS.               */\n/*                                                                    */\n/* ------------------------------------------------------------------ */\n\n/* Some request codes.  There are many more of these, but most are not\n   exposed to end-user view.  These are the public ones, all of the\n   form 0x1000 + small_number.\n\n   Core ones are in the range 0x00000000--0x0000ffff.  The non-public\n   ones start at 0x2000.\n*/\n\n/* These macros are used by tools -- they must be public, but don't\n   embed them into other programs. */\n#define VG_USERREQ_TOOL_BASE(a,b) \\\n   ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))\n#define VG_IS_TOOL_USERREQ(a, b, v) \\\n   (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))\n\n/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! \n   This enum comprises an ABI exported by Valgrind to programs\n   which use client requests.  DO NOT CHANGE THE ORDER OF THESE\n   ENTRIES, NOR DELETE ANY -- add new ones at the end. */\ntypedef\n   enum { VG_USERREQ__RUNNING_ON_VALGRIND  = 0x1001,\n          VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002,\n\n          /* These allow any function to be called from the simulated\n             CPU but run on the real CPU.  Nb: the first arg passed to\n             the function is always the ThreadId of the running\n             thread!  So CLIENT_CALL0 actually requires a 1 arg\n             function, etc. */\n          VG_USERREQ__CLIENT_CALL0 = 0x1101,\n          VG_USERREQ__CLIENT_CALL1 = 0x1102,\n          VG_USERREQ__CLIENT_CALL2 = 0x1103,\n          VG_USERREQ__CLIENT_CALL3 = 0x1104,\n\n          /* Can be useful in regression testing suites -- eg. can\n             send Valgrind's output to /dev/null and still count\n             errors. */\n          VG_USERREQ__COUNT_ERRORS = 0x1201,\n\n          /* Allows a string (gdb monitor command) to be passed to the tool\n             Used for interaction with vgdb/gdb */\n          VG_USERREQ__GDB_MONITOR_COMMAND = 0x1202,\n\n          /* These are useful and can be interpreted by any tool that\n             tracks malloc() et al, by using vg_replace_malloc.c. */\n          VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,\n          VG_USERREQ__RESIZEINPLACE_BLOCK = 0x130b,\n          VG_USERREQ__FREELIKE_BLOCK   = 0x1302,\n          /* Memory pool support. */\n          VG_USERREQ__CREATE_MEMPOOL   = 0x1303,\n          VG_USERREQ__DESTROY_MEMPOOL  = 0x1304,\n          VG_USERREQ__MEMPOOL_ALLOC    = 0x1305,\n          VG_USERREQ__MEMPOOL_FREE     = 0x1306,\n          VG_USERREQ__MEMPOOL_TRIM     = 0x1307,\n          VG_USERREQ__MOVE_MEMPOOL     = 0x1308,\n          VG_USERREQ__MEMPOOL_CHANGE   = 0x1309,\n          VG_USERREQ__MEMPOOL_EXISTS   = 0x130a,\n\n          /* Allow printfs to valgrind log. */\n          /* The first two pass the va_list argument by value, which\n             assumes it is the same size as or smaller than a UWord,\n             which generally isn't the case.  Hence are deprecated.\n             The second two pass the vargs by reference and so are\n             immune to this problem. */\n          /* both :: char* fmt, va_list vargs (DEPRECATED) */\n          VG_USERREQ__PRINTF           = 0x1401,\n          VG_USERREQ__PRINTF_BACKTRACE = 0x1402,\n          /* both :: char* fmt, va_list* vargs */\n          VG_USERREQ__PRINTF_VALIST_BY_REF = 0x1403,\n          VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 0x1404,\n\n          /* Stack support. */\n          VG_USERREQ__STACK_REGISTER   = 0x1501,\n          VG_USERREQ__STACK_DEREGISTER = 0x1502,\n          VG_USERREQ__STACK_CHANGE     = 0x1503,\n\n          /* Wine support */\n          VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,\n\n          /* Querying of debug info. */\n          VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701,\n\n          /* Disable/enable error reporting level.  Takes a single\n             Word arg which is the delta to this thread's error\n             disablement indicator.  Hence 1 disables or further\n             disables errors, and -1 moves back towards enablement.\n             Other values are not allowed. */\n          VG_USERREQ__CHANGE_ERR_DISABLEMENT = 0x1801\n   } Vg_ClientRequest;\n\n#if !defined(__GNUC__)\n#  define __extension__ /* */\n#endif\n\n\n/* Returns the number of Valgrinds this code is running under.  That\n   is, 0 if running natively, 1 if running under Valgrind, 2 if\n   running under Valgrind which is running under another Valgrind,\n   etc. */\n#define RUNNING_ON_VALGRIND                                           \\\n    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* if not */,         \\\n                                    VG_USERREQ__RUNNING_ON_VALGRIND,  \\\n                                    0, 0, 0, 0, 0)                    \\\n\n\n/* Discard translation of code in the range [_qzz_addr .. _qzz_addr +\n   _qzz_len - 1].  Useful if you are debugging a JITter or some such,\n   since it provides a way to make sure valgrind will retranslate the\n   invalidated area.  Returns no value. */\n#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len)              \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DISCARD_TRANSLATIONS,  \\\n                                    _qzz_addr, _qzz_len, 0, 0, 0)\n\n\n/* These requests are for getting Valgrind itself to print something.\n   Possibly with a backtrace.  This is a really ugly hack.  The return value\n   is the number of characters printed, excluding the \"**<pid>** \" part at the\n   start and the backtrace (if present). */\n\n#if defined(__GNUC__) || defined(__INTEL_COMPILER)\n/* Modern GCC will optimize the static routine out if unused,\n   and unused attribute will shut down warnings about it.  */\nstatic int VALGRIND_PRINTF(const char *format, ...)\n   __attribute__((format(__printf__, 1, 2), __unused__));\n#endif\nstatic int\n#if defined(_MSC_VER)\n__inline\n#endif\nVALGRIND_PRINTF(const char *format, ...)\n{\n#if defined(NVALGRIND)\n   return 0;\n#else /* NVALGRIND */\n#if defined(_MSC_VER)\n   uintptr_t _qzz_res;\n#else\n   unsigned long _qzz_res;\n#endif\n   va_list vargs;\n   va_start(vargs, format);\n#if defined(_MSC_VER)\n   _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,\n                              VG_USERREQ__PRINTF_VALIST_BY_REF,\n                              (uintptr_t)format,\n                              (uintptr_t)&vargs,\n                              0, 0, 0);\n#else\n   _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,\n                              VG_USERREQ__PRINTF_VALIST_BY_REF,\n                              (unsigned long)format,\n                              (unsigned long)&vargs, \n                              0, 0, 0);\n#endif\n   va_end(vargs);\n   return (int)_qzz_res;\n#endif /* NVALGRIND */\n}\n\n#if defined(__GNUC__) || defined(__INTEL_COMPILER)\nstatic int VALGRIND_PRINTF_BACKTRACE(const char *format, ...)\n   __attribute__((format(__printf__, 1, 2), __unused__));\n#endif\nstatic int\n#if defined(_MSC_VER)\n__inline\n#endif\nVALGRIND_PRINTF_BACKTRACE(const char *format, ...)\n{\n#if defined(NVALGRIND)\n   return 0;\n#else /* NVALGRIND */\n#if defined(_MSC_VER)\n   uintptr_t _qzz_res;\n#else\n   unsigned long _qzz_res;\n#endif\n   va_list vargs;\n   va_start(vargs, format);\n#if defined(_MSC_VER)\n   _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,\n                              VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF,\n                              (uintptr_t)format,\n                              (uintptr_t)&vargs,\n                              0, 0, 0);\n#else\n   _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,\n                              VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF,\n                              (unsigned long)format,\n                              (unsigned long)&vargs, \n                              0, 0, 0);\n#endif\n   va_end(vargs);\n   return (int)_qzz_res;\n#endif /* NVALGRIND */\n}\n\n\n/* These requests allow control to move from the simulated CPU to the\n   real CPU, calling an arbitary function.\n   \n   Note that the current ThreadId is inserted as the first argument.\n   So this call:\n\n     VALGRIND_NON_SIMD_CALL2(f, arg1, arg2)\n\n   requires f to have this signature:\n\n     Word f(Word tid, Word arg1, Word arg2)\n\n   where \"Word\" is a word-sized type.\n\n   Note that these client requests are not entirely reliable.  For example,\n   if you call a function with them that subsequently calls printf(),\n   there's a high chance Valgrind will crash.  Generally, your prospects of\n   these working are made higher if the called function does not refer to\n   any global variables, and does not refer to any libc or other functions\n   (printf et al).  Any kind of entanglement with libc or dynamic linking is\n   likely to have a bad outcome, for tricky reasons which we've grappled\n   with a lot in the past.\n*/\n#define VALGRIND_NON_SIMD_CALL0(_qyy_fn)                          \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,       \\\n                                    VG_USERREQ__CLIENT_CALL0,     \\\n                                    _qyy_fn,                      \\\n                                    0, 0, 0, 0)\n\n#define VALGRIND_NON_SIMD_CALL1(_qyy_fn, _qyy_arg1)                    \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,            \\\n                                    VG_USERREQ__CLIENT_CALL1,          \\\n                                    _qyy_fn,                           \\\n                                    _qyy_arg1, 0, 0, 0)\n\n#define VALGRIND_NON_SIMD_CALL2(_qyy_fn, _qyy_arg1, _qyy_arg2)         \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,            \\\n                                    VG_USERREQ__CLIENT_CALL2,          \\\n                                    _qyy_fn,                           \\\n                                    _qyy_arg1, _qyy_arg2, 0, 0)\n\n#define VALGRIND_NON_SIMD_CALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3) \\\n    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,             \\\n                                    VG_USERREQ__CLIENT_CALL3,           \\\n                                    _qyy_fn,                            \\\n                                    _qyy_arg1, _qyy_arg2,               \\\n                                    _qyy_arg3, 0)\n\n\n/* Counts the number of errors that have been recorded by a tool.  Nb:\n   the tool must record the errors with VG_(maybe_record_error)() or\n   VG_(unique_error)() for them to be counted. */\n#define VALGRIND_COUNT_ERRORS                                     \\\n    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(                    \\\n                               0 /* default return */,            \\\n                               VG_USERREQ__COUNT_ERRORS,          \\\n                               0, 0, 0, 0, 0)\n\n/* Several Valgrind tools (Memcheck, Massif, Helgrind, DRD) rely on knowing\n   when heap blocks are allocated in order to give accurate results.  This\n   happens automatically for the standard allocator functions such as\n   malloc(), calloc(), realloc(), memalign(), new, new[], free(), delete,\n   delete[], etc.\n\n   But if your program uses a custom allocator, this doesn't automatically\n   happen, and Valgrind will not do as well.  For example, if you allocate\n   superblocks with mmap() and then allocates chunks of the superblocks, all\n   Valgrind's observations will be at the mmap() level and it won't know that\n   the chunks should be considered separate entities.  In Memcheck's case,\n   that means you probably won't get heap block overrun detection (because\n   there won't be redzones marked as unaddressable) and you definitely won't\n   get any leak detection.\n\n   The following client requests allow a custom allocator to be annotated so\n   that it can be handled accurately by Valgrind.\n\n   VALGRIND_MALLOCLIKE_BLOCK marks a region of memory as having been allocated\n   by a malloc()-like function.  For Memcheck (an illustrative case), this\n   does two things:\n\n   - It records that the block has been allocated.  This means any addresses\n     within the block mentioned in error messages will be\n     identified as belonging to the block.  It also means that if the block\n     isn't freed it will be detected by the leak checker.\n\n   - It marks the block as being addressable and undefined (if 'is_zeroed' is\n     not set), or addressable and defined (if 'is_zeroed' is set).  This\n     controls how accesses to the block by the program are handled.\n   \n   'addr' is the start of the usable block (ie. after any\n   redzone), 'sizeB' is its size.  'rzB' is the redzone size if the allocator\n   can apply redzones -- these are blocks of padding at the start and end of\n   each block.  Adding redzones is recommended as it makes it much more likely\n   Valgrind will spot block overruns.  `is_zeroed' indicates if the memory is\n   zeroed (or filled with another predictable value), as is the case for\n   calloc().\n   \n   VALGRIND_MALLOCLIKE_BLOCK should be put immediately after the point where a\n   heap block -- that will be used by the client program -- is allocated.\n   It's best to put it at the outermost level of the allocator if possible;\n   for example, if you have a function my_alloc() which calls\n   internal_alloc(), and the client request is put inside internal_alloc(),\n   stack traces relating to the heap block will contain entries for both\n   my_alloc() and internal_alloc(), which is probably not what you want.\n\n   For Memcheck users: if you use VALGRIND_MALLOCLIKE_BLOCK to carve out\n   custom blocks from within a heap block, B, that has been allocated with\n   malloc/calloc/new/etc, then block B will be *ignored* during leak-checking\n   -- the custom blocks will take precedence.\n\n   VALGRIND_FREELIKE_BLOCK is the partner to VALGRIND_MALLOCLIKE_BLOCK.  For\n   Memcheck, it does two things:\n\n   - It records that the block has been deallocated.  This assumes that the\n     block was annotated as having been allocated via\n     VALGRIND_MALLOCLIKE_BLOCK.  Otherwise, an error will be issued.\n\n   - It marks the block as being unaddressable.\n\n   VALGRIND_FREELIKE_BLOCK should be put immediately after the point where a\n   heap block is deallocated.\n\n   VALGRIND_RESIZEINPLACE_BLOCK informs a tool about reallocation. For\n   Memcheck, it does four things:\n\n   - It records that the size of a block has been changed.  This assumes that\n     the block was annotated as having been allocated via\n     VALGRIND_MALLOCLIKE_BLOCK.  Otherwise, an error will be issued.\n\n   - If the block shrunk, it marks the freed memory as being unaddressable.\n\n   - If the block grew, it marks the new area as undefined and defines a red\n     zone past the end of the new block.\n\n   - The V-bits of the overlap between the old and the new block are preserved.\n\n   VALGRIND_RESIZEINPLACE_BLOCK should be put after allocation of the new block\n   and before deallocation of the old block.\n\n   In many cases, these three client requests will not be enough to get your\n   allocator working well with Memcheck.  More specifically, if your allocator\n   writes to freed blocks in any way then a VALGRIND_MAKE_MEM_UNDEFINED call\n   will be necessary to mark the memory as addressable just before the zeroing\n   occurs, otherwise you'll get a lot of invalid write errors.  For example,\n   you'll need to do this if your allocator recycles freed blocks, but it\n   zeroes them before handing them back out (via VALGRIND_MALLOCLIKE_BLOCK).\n   Alternatively, if your allocator reuses freed blocks for allocator-internal\n   data structures, VALGRIND_MAKE_MEM_UNDEFINED calls will also be necessary.\n\n   Really, what's happening is a blurring of the lines between the client\n   program and the allocator... after VALGRIND_FREELIKE_BLOCK is called, the\n   memory should be considered unaddressable to the client program, but the\n   allocator knows more than the rest of the client program and so may be able\n   to safely access it.  Extra client requests are necessary for Valgrind to\n   understand the distinction between the allocator and the rest of the\n   program.\n\n   Ignored if addr == 0.\n*/\n#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)          \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK,       \\\n                                    addr, sizeB, rzB, is_zeroed, 0)\n\n/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details.\n   Ignored if addr == 0.\n*/\n#define VALGRIND_RESIZEINPLACE_BLOCK(addr, oldSizeB, newSizeB, rzB)     \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__RESIZEINPLACE_BLOCK,    \\\n                                    addr, oldSizeB, newSizeB, rzB, 0)\n\n/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details.\n   Ignored if addr == 0.\n*/\n#define VALGRIND_FREELIKE_BLOCK(addr, rzB)                              \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__FREELIKE_BLOCK,         \\\n                                    addr, rzB, 0, 0, 0)\n\n/* Create a memory pool. */\n#define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed)             \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL,   \\\n                                    pool, rzB, is_zeroed, 0, 0)\n\n/* Destroy a memory pool. */\n#define VALGRIND_DESTROY_MEMPOOL(pool)                            \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DESTROY_MEMPOOL,  \\\n                                    pool, 0, 0, 0, 0)\n\n/* Associate a piece of memory with a memory pool. */\n#define VALGRIND_MEMPOOL_ALLOC(pool, addr, size)                  \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_ALLOC,    \\\n                                    pool, addr, size, 0, 0)\n\n/* Disassociate a piece of memory from a memory pool. */\n#define VALGRIND_MEMPOOL_FREE(pool, addr)                         \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_FREE,     \\\n                                    pool, addr, 0, 0, 0)\n\n/* Disassociate any pieces outside a particular range. */\n#define VALGRIND_MEMPOOL_TRIM(pool, addr, size)                   \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_TRIM,     \\\n                                    pool, addr, size, 0, 0)\n\n/* Resize and/or move a piece associated with a memory pool. */\n#define VALGRIND_MOVE_MEMPOOL(poolA, poolB)                       \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MOVE_MEMPOOL,     \\\n                                    poolA, poolB, 0, 0, 0)\n\n/* Resize and/or move a piece associated with a memory pool. */\n#define VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB, size)         \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_CHANGE,   \\\n                                    pool, addrA, addrB, size, 0)\n\n/* Return 1 if a mempool exists, else 0. */\n#define VALGRIND_MEMPOOL_EXISTS(pool)                             \\\n    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                  \\\n                               VG_USERREQ__MEMPOOL_EXISTS,        \\\n                               pool, 0, 0, 0, 0)\n\n/* Mark a piece of memory as being a stack. Returns a stack id. */\n#define VALGRIND_STACK_REGISTER(start, end)                       \\\n    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                  \\\n                               VG_USERREQ__STACK_REGISTER,        \\\n                               start, end, 0, 0, 0)\n\n/* Unmark the piece of memory associated with a stack id as being a\n   stack. */\n#define VALGRIND_STACK_DEREGISTER(id)                             \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_DEREGISTER, \\\n                                    id, 0, 0, 0, 0)\n\n/* Change the start and end address of the stack id. */\n#define VALGRIND_STACK_CHANGE(id, start, end)                     \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_CHANGE,     \\\n                                    id, start, end, 0, 0)\n\n/* Load PDB debug info for Wine PE image_map. */\n#define VALGRIND_LOAD_PDB_DEBUGINFO(fd, ptr, total_size, delta)     \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__LOAD_PDB_DEBUGINFO, \\\n                                    fd, ptr, total_size, delta, 0)\n\n/* Map a code address to a source file name and line number.  buf64\n   must point to a 64-byte buffer in the caller's address space.  The\n   result will be dumped in there and is guaranteed to be zero\n   terminated.  If no info is found, the first byte is set to zero. */\n#define VALGRIND_MAP_IP_TO_SRCLOC(addr, buf64)                    \\\n    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                  \\\n                               VG_USERREQ__MAP_IP_TO_SRCLOC,      \\\n                               addr, buf64, 0, 0, 0)\n\n/* Disable error reporting for this thread.  Behaves in a stack like\n   way, so you can safely call this multiple times provided that\n   VALGRIND_ENABLE_ERROR_REPORTING is called the same number of times\n   to re-enable reporting.  The first call of this macro disables\n   reporting.  Subsequent calls have no effect except to increase the\n   number of VALGRIND_ENABLE_ERROR_REPORTING calls needed to re-enable\n   reporting.  Child threads do not inherit this setting from their\n   parents -- they are always created with reporting enabled. */\n#define VALGRIND_DISABLE_ERROR_REPORTING                                \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, \\\n                                    1, 0, 0, 0, 0)\n\n/* Re-enable error reporting, as per comments on\n   VALGRIND_DISABLE_ERROR_REPORTING. */\n#define VALGRIND_ENABLE_ERROR_REPORTING                                 \\\n    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, \\\n                                    -1, 0, 0, 0, 0)\n\n#undef PLAT_x86_darwin\n#undef PLAT_amd64_darwin\n#undef PLAT_x86_win32\n#undef PLAT_x86_linux\n#undef PLAT_amd64_linux\n#undef PLAT_ppc32_linux\n#undef PLAT_ppc64_linux\n#undef PLAT_arm_linux\n#undef PLAT_s390x_linux\n\n#endif   /* __VALGRIND_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/amalgam.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\n\nimport argparse\nimport fnmatch\nimport json\nimport logging\nimport os\nimport re\nimport shutil\n\nROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nJERRY_CORE = os.path.join(ROOT_DIR, 'jerry-core')\nJERRY_PORT = os.path.join(ROOT_DIR, 'jerry-port', 'default')\nJERRY_MATH = os.path.join(ROOT_DIR, 'jerry-math')\n\n\nclass Amalgamator(object):\n    # pylint: disable=too-many-instance-attributes\n\n    _RE_INCLUDE = re.compile(r'\\s*#include (\"|<)(.*?)(\"|>)\\n$')\n\n    def __init__(self, h_files, extra_includes=(), remove_includes=(), add_lineinfo=False):\n        self._h_files = h_files\n        self._extra_includes = extra_includes\n        self._remove_includes = remove_includes\n        self._add_lineinfo = add_lineinfo\n        self._last_builtin = None\n        self._processed = []\n        self._output = []\n        # The copyright will be loaded from the first input file\n        self._copyright = {'lines': [], 'loaded': False}\n\n    def _process_non_include(self, line, file_level):\n        # Special case #2: Builtin include header name usage\n        if line.strip() == \"#include BUILTIN_INC_HEADER_NAME\":\n            assert self._last_builtin is not None, 'No previous BUILTIN_INC_HEADER_NAME definition'\n            logging.debug('[%d] Detected usage of BUILTIN_INC_HEADER_NAME, including: \"%s\"',\n                          file_level, self._last_builtin)\n            self.add_file(self._h_files[self._last_builtin])\n            # return from the function as we have processed the included file\n            return\n\n        # Special case #1: Builtin include header name definition\n        if line.startswith('#define BUILTIN_INC_HEADER_NAME '):\n            # the line is in this format: #define BUILTIN_INC_HEADER_NAME \"<filename>\"\n            self._last_builtin = line.split('\"', 2)[1]\n            logging.debug('[%d] Detected definition of BUILTIN_INC_HEADER_NAME: \"%s\"', file_level, self._last_builtin)\n\n        # the line is not anything special, just push it into the output\n        self._output.append(line)\n\n    def _emit_lineinfo(self, line_number, filename):\n        if not self._add_lineinfo:\n            return\n\n        normalized_path = repr(os.path.normpath(filename))[1:-1]\n        line_info = '#line %d \"%s\"\\n' % (line_number, normalized_path)\n\n        if self._output and self._output[-1].startswith('#line'):\n            # Avoid emitting multiple line infos in sequence, just overwrite the last one\n            self._output[-1] = line_info\n        else:\n            self._output.append(line_info)\n\n    def add_file(self, filename, file_level=0):\n        if os.path.basename(filename) in self._processed:\n            logging.warning('Tried to to process an already processed file: \"%s\"', filename)\n            return\n\n        if not file_level:\n            logging.debug('Adding file: \"%s\"', filename)\n\n        file_level += 1\n\n        # mark the start of the new file in the output\n        self._emit_lineinfo(1, filename)\n\n        line_idx = 0\n        with open(filename, 'r') as input_file:\n            in_copyright = False\n            for line in input_file:\n                line_idx += 1\n\n                if not in_copyright and line.startswith('/* Copyright '):\n                    in_copyright = True\n                    if not self._copyright['loaded']:\n                        self._copyright['lines'].append(line)\n                    continue\n\n                if in_copyright:\n                    if not self._copyright['loaded']:\n                        self._copyright['lines'].append(line)\n\n                    if line.strip().endswith('*/'):\n                        in_copyright = False\n                        self._copyright['loaded'] = True\n                        # emit a line info so the line numbering can be tracked correctly\n                        self._emit_lineinfo(line_idx + 1, filename)\n\n                    continue\n\n                # check if the line is an '#include' line\n                match = self._RE_INCLUDE.match(line)\n                if not match:\n                    # the line is not a header\n                    self._process_non_include(line, file_level)\n                    continue\n\n                if match.group(1) == '<':\n                    # found a \"global\" include\n                    self._output.append(line)\n                    continue\n\n                name = match.group(2)\n\n                if name in self._remove_includes:\n                    logging.debug('[%d] Removing include line (%s:%d): %s',\n                                  file_level, filename, line_idx, line.strip())\n                    # emit a line info so the line numbering can be tracked correctly\n                    self._emit_lineinfo(line_idx + 1, filename)\n                    continue\n\n                if name not in self._h_files:\n                    logging.warning('[%d] Include not found (%s:%d): \"%s\"', file_level, filename, line_idx, name)\n                    self._output.append(line)\n                    continue\n\n                if name in self._processed:\n                    logging.debug('[%d] Already included: \"%s\"', file_level, name)\n                    # emit a line info so the line numbering can be tracked correctly\n                    self._emit_lineinfo(line_idx + 1, filename)\n                    continue\n\n                logging.debug('[%d] Including: \"%s\"', file_level, self._h_files[name])\n                self.add_file(self._h_files[name], file_level)\n\n                # mark the continuation of the current file in the output\n                self._emit_lineinfo(line_idx + 1, filename)\n\n                if not name.endswith('.inc.h'):\n                    # if the included file is not a \"*.inc.h\" file mark it as processed\n                    self._processed.append(name)\n\n        file_level -= 1\n        if not filename.endswith('.inc.h'):\n            self._processed.append(os.path.basename(filename))\n\n    def write_output(self, out_fp):\n        for line in self._copyright['lines']:\n            out_fp.write(line)\n\n        for include in self._extra_includes:\n            out_fp.write('#include \"%s\"\\n' % include)\n\n        for line in self._output:\n            out_fp.write(line)\n\n\ndef match_files(base_dir, pattern):\n    \"\"\"\n    Return the files matching the given pattern.\n\n    :param base_dir: directory to search in\n    :param pattern: file pattern to use\n    :returns generator: the generator which iterates the matching file names\n    \"\"\"\n    for path, _, files in os.walk(base_dir):\n        for name in files:\n            if fnmatch.fnmatch(name, pattern):\n                yield os.path.join(path, name)\n\n\ndef collect_files(base_dir, pattern):\n    \"\"\"\n    Collect files in the provided base directory given a file pattern.\n    Will collect all files in the base dir recursively.\n\n    :param base_dir: directory to search in\n    :param pattern: file pattern to use\n    :returns dictionary: a dictionary file base name -> file path mapping\n    \"\"\"\n    name_mapping = {}\n    for fname in match_files(base_dir, pattern):\n        name = os.path.basename(fname)\n\n        if name in name_mapping:\n            logging.warning('Duplicate name detected: \"%s\" and \"%s\"', fname, name_mapping[name])\n            continue\n\n        name_mapping[name] = fname\n\n    return name_mapping\n\n\ndef amalgamate(base_dir, input_files=(), output_file=None,\n               append_c_files=False, remove_includes=(), extra_includes=(),\n               add_lineinfo=False):\n    \"\"\"\n    :param input_files: Main input source/header files\n    :param output_file: Output source/header file\n    :param append_c_files: Enable auto inclusion of c files under the base-dir\n    :param add_lineinfo: Enable #line macro insertion into the generated sources\n    \"\"\"\n    logging.debug('Starting merge with args: %s', json.dumps(locals(), indent=4, sort_keys=True))\n\n    h_files = collect_files(base_dir, '*.h')\n    c_files = collect_files(base_dir, '*.c')\n\n    for name in remove_includes:\n        c_files.pop(name, '')\n        h_files.pop(name, '')\n\n    amalgam = Amalgamator(h_files, extra_includes, remove_includes, add_lineinfo)\n    for input_file in input_files:\n        amalgam.add_file(input_file)\n\n    if append_c_files:\n        # if the input file is in the C files list it should be removed to avoid\n        # double inclusion of the file\n        for input_file in input_files:\n            input_name = os.path.basename(input_file)\n            c_files.pop(input_name, '')\n\n        # Add the C files in reverse order to make sure that builtins are\n        # not at the beginning.\n        for fname in sorted(c_files.values(), reverse=True):\n            amalgam.add_file(fname)\n\n    with open(output_file, 'w') as output:\n        amalgam.write_output(output)\n\n\ndef amalgamate_jerry_core(output_dir):\n    amalgamate(\n        base_dir=JERRY_CORE,\n        input_files=[\n            os.path.join(JERRY_CORE, 'api', 'jerry.c'),\n            # Add the global built-in by default to include some common items\n            # to avoid problems with common built-in headers\n            os.path.join(JERRY_CORE, 'ecma', 'builtin-objects', 'ecma-builtins.c'),\n        ],\n        output_file=os.path.join(output_dir, 'jerryscript.c'),\n        append_c_files=True,\n        remove_includes=[\n            'jerryscript.h',\n            'jerryscript-port.h',\n            'jerryscript-compiler.h',\n            'jerryscript-core.h',\n            'jerryscript-debugger.h',\n            'jerryscript-debugger-transport.h',\n            'jerryscript-port.h',\n            'jerryscript-snapshot.h',\n            'config.h',\n        ],\n        extra_includes=['jerryscript.h'],\n    )\n\n    amalgamate(\n        base_dir=JERRY_CORE,\n        input_files=[\n            os.path.join(JERRY_CORE, 'include', 'jerryscript.h'),\n            os.path.join(JERRY_CORE, 'include', 'jerryscript-debugger-transport.h'),\n        ],\n        output_file=os.path.join(output_dir, 'jerryscript.h'),\n        remove_includes=['config.h'],\n        extra_includes=['jerryscript-config.h'],\n    )\n\n    shutil.copyfile(os.path.join(JERRY_CORE, 'config.h'),\n                    os.path.join(output_dir, 'jerryscript-config.h'))\n\n\ndef amalgamate_jerry_port_default(output_dir):\n    amalgamate(\n        base_dir=JERRY_PORT,\n        output_file=os.path.join(output_dir, 'jerryscript-port-default.c'),\n        append_c_files=True,\n        remove_includes=[\n            'jerryscript-port.h',\n            'jerryscript-port-default.h',\n            'jerryscript-debugger.h',\n        ],\n        extra_includes=[\n            'jerryscript.h',\n            'jerryscript-port-default.h',\n        ],\n    )\n\n    amalgamate(\n        base_dir=JERRY_PORT,\n        input_files=[os.path.join(JERRY_PORT, 'include', 'jerryscript-port-default.h')],\n        output_file=os.path.join(output_dir, 'jerryscript-port-default.h'),\n        remove_includes=[\n            'jerryscript-port.h',\n            'jerryscript.h',\n        ],\n        extra_includes=['jerryscript.h'],\n    )\n\n\ndef amalgamate_jerry_math(output_dir):\n    amalgamate(\n        base_dir=JERRY_MATH,\n        output_file=os.path.join(output_dir, 'jerryscript-math.c'),\n        append_c_files=True,\n    )\n\n    shutil.copyfile(os.path.join(JERRY_MATH, 'include', 'math.h'),\n                    os.path.join(output_dir, 'math.h'))\n\ndef main():\n    parser = argparse.ArgumentParser(description='Generate amalgamated sources.')\n    parser.add_argument('--jerry-core', action='store_true',\n                        help='amalgamate jerry-core files')\n    parser.add_argument('--jerry-port-default', action='store_true',\n                        help='amalgamate jerry-port-default files')\n    parser.add_argument('--jerry-math', action='store_true',\n                        help='amalgamate jerry-math files')\n    parser.add_argument('--output-dir', metavar='DIR', default='amalgam',\n                        help='output dir (default: %(default)s)')\n    parser.add_argument('--verbose', '-v', action='store_true',\n                        help='increase verbosity')\n\n    args = parser.parse_args()\n\n    if args.verbose:\n        logging.basicConfig(level=logging.DEBUG)\n\n    try:\n        os.makedirs(args.output_dir)\n    except os.error:\n        pass\n\n    if args.jerry_core:\n        amalgamate_jerry_core(args.output_dir)\n\n    if args.jerry_port_default:\n        amalgamate_jerry_port_default(args.output_dir)\n\n    if args.jerry_math:\n        amalgamate_jerry_math(args.output_dir)\n\n\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/apt-get-install-deps.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif [ \"$(whoami)\" != \"root\" ]; then\n    SUDO=sudo\nfi\n\n${SUDO} apt-get update -q\n${SUDO} apt-get install -q -y \\\n    make cmake \\\n    gcc gcc-multilib \\\n    doxygen \\\n    cppcheck vera++ python pylint python-serial\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/apt-get-install-qemu-arm.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif [ \"$(whoami)\" != \"root\" ]; then\n    SUDO=sudo\nfi\n\n${SUDO} apt-get update -q\n${SUDO} apt-get install -q -y \\\n    gcc-arm-linux-gnueabihf libc6-dev-armhf-cross \\\n    qemu-user-static\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/babel/.babelrc",
    "content": "{\n  \"plugins\": [\n    \"@babel/plugin-transform-function-name\",\n    \"@babel/plugin-proposal-object-rest-spread\",\n    \"@babel/plugin-transform-block-scoping\",\n    \"@babel/plugin-transform-destructuring\",\n    \"@babel/plugin-transform-block-scoped-functions\",\n    \"@babel/plugin-transform-unicode-regex\",\n    \"@babel/plugin-transform-sticky-regex\",\n    \"@babel/plugin-transform-spread\",\n    \"@babel/plugin-transform-parameters\",\n    \"@babel/plugin-transform-object-super\",\n    \"@babel/plugin-transform-new-target\",\n    \"@babel/plugin-transform-literals\",\n    \"@babel/plugin-transform-instanceof\"\n  ]\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/babel/README.md",
    "content": "# Converting incompatible features with Babel\nTo run ES6 sources with JerryScript that use unsupported language features, you can use Babel to transpile your code, which will output a semantically equivalent source file, where the unsupported features are replaced with ES5.1 code.\nBabel is a JavaScript compiler that is used to convert ES2015+ code into a backward-compatible version. You can find more information [here](https://babeljs.io/).\n\n## Example\n\n```javascript\n//Before\nconst fn = () => 1;\n\n//After conversion\n\nvar fn = function fn() {\n  return 1;\n};\n```\n## Table of Contents\n* **[Getting ready](#getting-ready)**\n  * Installing node.js and npm\n* **[Using babel](#using-babel)**\n* **[Missing features/Polyfill](#missing-features)**\n\n## Getting ready [](#getting-ready)\n\n### 1. **Node.js and npm**\n\nStart by updating the packages with\n\n`$ sudo apt update`\n\nInstall `nodejs` using the apt package manager\n\n`$ sudo apt install nodejs`\n\nCheck the version of **node.js** to verify that it installed\n\n```bash\n$ nodejs --version\nOutput: v8.10.0\n```\n\nNext up is installing **npm** with the following command\n\n`$ sudo apt install npm`\n\nVerify installation by typing:\n\n```bash\n$ npm --version\nOutput: 6.10.2\n```\n\n### 2. Using babel [](#using-babel)\n\nAssuming you're in the tools/babel folder,\n\n`$ sudo npm install`\n\nAfter installing the dependencies it is ready to use.\n\nPlace the files/directories you want transpiled to the babel folder and run\n\n`$ npm run transpile [name of input file/directory] [(OPTIONAL)name of output file/directory]`\n\nIf you want to use the same name, then only give the name once."
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/babel/package.json",
    "content": "{\n  \"name\": \"jerryscript\",\n  \"description\": \"Ultra-lightweight JavaScript engine for the Internet of Things.\",\n  \"scripts\": {\n    \"transpile\": \"scripty\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/jerryscript-project/jerryscript.git\"\n  },\n  \"license\": \"Apache-2.0\",\n  \"devDependencies\": {\n    \"@babel/cli\": \"^7.4.4\",\n    \"@babel/core\": \"^7.4.5\",\n    \"@babel/plugin-proposal-object-rest-spread\": \"^7.5.5\",\n    \"@babel/plugin-transform-block-scoped-functions\": \"^7.2.0\",\n    \"@babel/plugin-transform-block-scoping\": \"^7.4.4\",\n    \"@babel/plugin-transform-destructuring\": \"^7.4.4\",\n    \"@babel/plugin-transform-function-name\": \"^7.4.4\",\n    \"@babel/plugin-transform-instanceof\": \"^7.2.0\",\n    \"@babel/plugin-transform-literals\": \"^7.2.0\",\n    \"@babel/plugin-transform-new-target\": \"^7.4.4\",\n    \"@babel/plugin-transform-object-super\": \"^7.2.0\",\n    \"@babel/plugin-transform-parameters\": \"^7.4.4\",\n    \"@babel/plugin-transform-spread\": \"^7.2.2\",\n    \"@babel/plugin-transform-sticky-regex\": \"^7.2.0\",\n    \"@babel/plugin-transform-unicode-regex\": \"^7.4.4\",\n    \"scripty\": \"^1.9.1\"\n  }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/babel/scripts/transpile.sh",
    "content": "#!/usr/bin/env bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif [[ \"$#\" -gt 2 || \"$#\" -lt 1 ]]; then\n  echo \"Usage: $0 input [output]\"\n  echo \"* input: name of input directory/file\"\n  echo \"* output: name of output directory/file (same as input if not given)\"\n  exit 1\nfi\n\nif [[ ! -d $1 && ! -f $1 ]]; then\n  echo \"Error: $1 is not a file or directory\"\n  exit 1\nfi\n\nFLAG='--out-file'\nif [[ -d $1 ]]; then\n  FLAG='--out-dir'\nfi\n\nif [[ \"$#\" -eq 1 ]]; then\n  ./node_modules/.bin/babel $1 $FLAG $1 --verbose\nelse\n  ./node_modules/.bin/babel $1 $FLAG $2 --verbose\nfi\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/brew-install-deps.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nbrew update\n\nPKGS=\"\n    cmake\n    cppcheck vera++\n    \"\n\nfor pkg in $PKGS\ndo\n    if ! ( brew list -1 | grep -q \"^${pkg}\\$\" )\n    then\n        brew install $pkg\n    fi\ndone\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/build.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\n\nimport argparse\nimport multiprocessing\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport settings\n\ndef default_toolchain():\n    # We don't have default toolchain on Windows and os.uname() isn't supported.\n    if sys.platform == 'win32':\n        return None\n\n    (sysname, _, _, _, machine) = os.uname()\n    toolchain = os.path.join(settings.PROJECT_DIR,\n                             'cmake',\n                             'toolchain_%s_%s.cmake' % (sysname.lower(), machine.lower()))\n    return toolchain if os.path.isfile(toolchain) else None\n\ndef get_arguments():\n    devhelp_preparser = argparse.ArgumentParser(add_help=False)\n    devhelp_preparser.add_argument('--devhelp', action='store_true', default=False,\n                                   help='show help with all options '\n                                        '(including those, which are useful for developers only)')\n\n    devhelp_arguments, args = devhelp_preparser.parse_known_args()\n    if devhelp_arguments.devhelp:\n        args.append('--devhelp')\n\n    def devhelp(helpstring):\n        return helpstring if devhelp_arguments.devhelp else argparse.SUPPRESS\n\n    parser = argparse.ArgumentParser(parents=[devhelp_preparser], epilog=\"\"\"\n        This tool is a thin wrapper around cmake and make to help build the\n        project easily. All the real build logic is in the CMakeLists.txt files.\n        For most of the options, the defaults are also defined there.\n        \"\"\")\n\n    buildgrp = parser.add_argument_group('general build options')\n    buildgrp.add_argument('--builddir', metavar='DIR', default=os.path.join(settings.PROJECT_DIR, 'build'),\n                          help='specify build directory (default: %(default)s)')\n    buildgrp.add_argument('--clean', action='store_true', default=False,\n                          help='clean build')\n    buildgrp.add_argument('--cmake-param', metavar='OPT', action='append', default=[],\n                          help='add custom argument to CMake')\n    buildgrp.add_argument('--compile-flag', metavar='OPT', action='append', default=[],\n                          help='add custom compile flag')\n    buildgrp.add_argument('--build-type', metavar='TYPE', default='MinSizeRel',\n                          help='set build type (default: %(default)s)')\n    buildgrp.add_argument('--debug', dest='build_type', action='store_const', const='Debug', default=argparse.SUPPRESS,\n                          help='debug build (alias for --build-type %(const)s)')\n    buildgrp.add_argument('--install', metavar='DIR', nargs='?', default=None, const=False,\n                          help='install after build (default: don\\'t install; '\n                               'default directory if install: OS-specific)')\n    buildgrp.add_argument('-j', '--jobs', metavar='N', type=int, default=multiprocessing.cpu_count() + 1,\n                          help='number of parallel build jobs (default: %(default)s)')\n    buildgrp.add_argument('--link-lib', metavar='OPT', action='append', default=[],\n                          help='add custom library to be linked')\n    buildgrp.add_argument('--linker-flag', metavar='OPT', action='append', default=[],\n                          help='add custom linker flag')\n    buildgrp.add_argument('--amalgam', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                          help='enable amalgamated build (%(choices)s)')\n    buildgrp.add_argument('--lto', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                          help='enable link-time optimizations (%(choices)s)')\n    buildgrp.add_argument('--shared-libs', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                          help='enable building of shared libraries (%(choices)s)')\n    buildgrp.add_argument('--strip', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                          help='strip release binaries (%(choices)s)')\n    buildgrp.add_argument('--toolchain', metavar='FILE', default=default_toolchain(),\n                          help='specify toolchain file (default: %(default)s)')\n    buildgrp.add_argument('-v', '--verbose', action='store_const', const='ON',\n                          help='increase verbosity')\n\n    compgrp = parser.add_argument_group('optional components')\n    compgrp.add_argument('--doctests', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('build doctests (%(choices)s)'))\n    compgrp.add_argument('--jerry-cmdline', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='build jerry command line tool (%(choices)s)')\n    compgrp.add_argument('--jerry-cmdline-snapshot', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='build snapshot command line tool (%(choices)s)')\n    compgrp.add_argument('--jerry-cmdline-test', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('build test version of the jerry command line tool (%(choices)s)'))\n    compgrp.add_argument('--libfuzzer', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('build jerry with libfuzzer support (%(choices)s)'))\n    compgrp.add_argument('--jerry-ext', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='build jerry-ext (%(choices)s)')\n    compgrp.add_argument('--jerry-math', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='build and use jerry-math (%(choices)s)')\n    compgrp.add_argument('--jerry-port-default', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='build default jerry port implementation (%(choices)s)')\n    compgrp.add_argument('--unittests', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('build unittests (%(choices)s)'))\n\n    coregrp = parser.add_argument_group('jerry-core options')\n    coregrp.add_argument('--cpointer-32bit', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable 32 bit compressed pointers (%(choices)s)')\n    coregrp.add_argument('--error-messages', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable error messages (%(choices)s)')\n    coregrp.add_argument('--external-context', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable external context (%(choices)s)')\n    coregrp.add_argument('--jerry-debugger', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable the jerry debugger (%(choices)s)')\n    coregrp.add_argument('--js-parser', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable js-parser (%(choices)s)')\n    coregrp.add_argument('--line-info', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='provide line info (%(choices)s)')\n    coregrp.add_argument('--logging', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable logging (%(choices)s)')\n    coregrp.add_argument('--mem-heap', metavar='SIZE', type=int,\n                         help='size of memory heap (in kilobytes)')\n    coregrp.add_argument('--gc-limit', metavar='SIZE', type=int,\n                         help='memory usage limit to trigger garbage collection (in bytes)')\n    coregrp.add_argument('--stack-limit', metavar='SIZE', type=int,\n                         help='maximum stack usage (in kilobytes)')\n    coregrp.add_argument('--gc-mark-limit', metavar='SIZE', type=int,\n                         help='maximum depth of recursion during GC mark phase')\n    coregrp.add_argument('--mem-stats', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('enable memory statistics (%(choices)s)'))\n    coregrp.add_argument('--mem-stress-test', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('enable mem-stress test (%(choices)s)'))\n    coregrp.add_argument('--profile', metavar='FILE',\n                         help='specify profile file')\n    coregrp.add_argument('--regexp-strict-mode', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('enable regexp strict mode (%(choices)s)'))\n    coregrp.add_argument('--show-opcodes', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('enable parser byte-code dumps (%(choices)s)'))\n    coregrp.add_argument('--show-regexp-opcodes', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('enable regexp byte-code dumps (%(choices)s)'))\n    coregrp.add_argument('--snapshot-exec', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable executing snapshot files (%(choices)s)')\n    coregrp.add_argument('--snapshot-save', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable saving snapshot files (%(choices)s)')\n    coregrp.add_argument('--system-allocator', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable system allocator (%(choices)s)')\n    coregrp.add_argument('--valgrind', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('enable Valgrind support (%(choices)s)'))\n    coregrp.add_argument('--vm-exec-stop', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help='enable VM execution stopping (%(choices)s)')\n\n    maingrp = parser.add_argument_group('jerry-main options')\n    maingrp.add_argument('--link-map', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('enable the generation of link map for jerry command line tool (%(choices)s)'))\n    maingrp.add_argument('--compile-commands', metavar='X', choices=['ON', 'OFF'], type=str.upper,\n                         help=devhelp('enable the generation of compile_commands.json (%(choices)s)'))\n\n    arguments = parser.parse_args(args)\n    if arguments.devhelp:\n        parser.print_help()\n        sys.exit(0)\n\n    return arguments\n\ndef generate_build_options(arguments):\n    build_options = []\n\n    def build_options_append(cmakeopt, cliarg):\n        if cliarg:\n            build_options.append('-D%s=%s' % (cmakeopt, cliarg))\n\n    # general build options\n    build_options_append('CMAKE_BUILD_TYPE', arguments.build_type)\n    build_options_append('EXTERNAL_COMPILE_FLAGS', ' '.join(arguments.compile_flag))\n    build_options_append('EXTERNAL_LINK_LIBS', ' '.join(arguments.link_lib))\n    build_options_append('EXTERNAL_LINKER_FLAGS', ' '.join(arguments.linker_flag))\n    build_options_append('ENABLE_AMALGAM', arguments.amalgam)\n    build_options_append('ENABLE_LTO', arguments.lto)\n    build_options_append('BUILD_SHARED_LIBS', arguments.shared_libs)\n    build_options_append('ENABLE_STRIP', arguments.strip)\n    build_options_append('CMAKE_TOOLCHAIN_FILE', arguments.toolchain)\n    build_options_append('CMAKE_VERBOSE_MAKEFILE', arguments.verbose)\n\n    # optional components\n    build_options_append('DOCTESTS', arguments.doctests)\n    build_options_append('JERRY_CMDLINE', arguments.jerry_cmdline)\n    build_options_append('JERRY_CMDLINE_SNAPSHOT', arguments.jerry_cmdline_snapshot)\n    build_options_append('JERRY_CMDLINE_TEST', arguments.jerry_cmdline_test)\n    build_options_append('JERRY_LIBFUZZER', arguments.libfuzzer)\n    build_options_append('JERRY_EXT', arguments.jerry_ext)\n    build_options_append('JERRY_MATH', arguments.jerry_math)\n    build_options_append('JERRY_PORT_DEFAULT', arguments.jerry_port_default)\n    build_options_append('UNITTESTS', arguments.unittests)\n\n    # jerry-core options\n    build_options_append('JERRY_CPOINTER_32_BIT', arguments.cpointer_32bit)\n    build_options_append('JERRY_ERROR_MESSAGES', arguments.error_messages)\n    build_options_append('JERRY_EXTERNAL_CONTEXT', arguments.external_context)\n    build_options_append('JERRY_DEBUGGER', arguments.jerry_debugger)\n    build_options_append('JERRY_PARSER', arguments.js_parser)\n    build_options_append('JERRY_LINE_INFO', arguments.line_info)\n    build_options_append('JERRY_LOGGING', arguments.logging)\n    build_options_append('JERRY_GLOBAL_HEAP_SIZE', arguments.mem_heap)\n    build_options_append('JERRY_GC_LIMIT', arguments.gc_limit)\n    build_options_append('JERRY_STACK_LIMIT', arguments.stack_limit)\n    build_options_append('JERRY_MEM_STATS', arguments.mem_stats)\n    build_options_append('JERRY_MEM_GC_BEFORE_EACH_ALLOC', arguments.mem_stress_test)\n    build_options_append('JERRY_PROFILE', arguments.profile)\n    build_options_append('JERRY_REGEXP_STRICT_MODE', arguments.regexp_strict_mode)\n    build_options_append('JERRY_PARSER_DUMP_BYTE_CODE', arguments.show_opcodes)\n    build_options_append('JERRY_REGEXP_DUMP_BYTE_CODE', arguments.show_regexp_opcodes)\n    build_options_append('JERRY_SNAPSHOT_EXEC', arguments.snapshot_exec)\n    build_options_append('JERRY_SNAPSHOT_SAVE', arguments.snapshot_save)\n    build_options_append('JERRY_SYSTEM_ALLOCATOR', arguments.system_allocator)\n    build_options_append('JERRY_VALGRIND', arguments.valgrind)\n    build_options_append('JERRY_VM_EXEC_STOP', arguments.vm_exec_stop)\n\n    if arguments.gc_mark_limit is not None:\n        build_options.append('-D%s=%s' % ('JERRY_GC_MARK_LIMIT', arguments.gc_mark_limit))\n\n    # jerry-main options\n    build_options_append('ENABLE_LINK_MAP', arguments.link_map)\n    build_options_append('ENABLE_COMPILE_COMMANDS', arguments.compile_commands)\n\n    # general build options (final step)\n    if arguments.cmake_param:\n        build_options.extend(arguments.cmake_param)\n\n    return build_options\n\ndef configure_output_dir(arguments):\n    if not os.path.isabs(arguments.builddir):\n        arguments.builddir = os.path.join(settings.PROJECT_DIR, arguments.builddir)\n\n    if arguments.clean and os.path.exists(arguments.builddir):\n        shutil.rmtree(arguments.builddir)\n\n    if not os.path.exists(arguments.builddir):\n        os.makedirs(arguments.builddir)\n\ndef configure_jerry(arguments):\n    configure_output_dir(arguments)\n\n    build_options = generate_build_options(arguments)\n\n    cmake_cmd = ['cmake', '-B' + arguments.builddir, '-H' + settings.PROJECT_DIR]\n\n    if arguments.install:\n        cmake_cmd.append('-DCMAKE_INSTALL_PREFIX=%s' % arguments.install)\n\n    cmake_cmd.extend(build_options)\n\n    return subprocess.call(cmake_cmd)\n\ndef make_jerry(arguments):\n    make_cmd = ['cmake', '--build', arguments.builddir, '--config', arguments.build_type]\n    env = dict(os.environ)\n    env['CMAKE_BUILD_PARALLEL_LEVEL'] = str(arguments.jobs)\n    env['MAKEFLAGS'] = '-j%d' % (arguments.jobs) # Workaround for CMake < 3.12\n    proc = subprocess.Popen(make_cmd, env=env)\n    proc.wait()\n\n    return proc.returncode\n\ndef install_jerry(arguments):\n    install_target = 'INSTALL' if sys.platform == 'win32' else 'install'\n    make_cmd = ['cmake', '--build', arguments.builddir, '--config', arguments.build_type, '--target', install_target]\n    return subprocess.call(make_cmd)\n\ndef print_result(ret):\n    print('=' * 30)\n    if ret:\n        print('Build failed with exit code: %s' % (ret))\n    else:\n        print('Build succeeded!')\n    print('=' * 30)\n\ndef main():\n    arguments = get_arguments()\n\n    ret = configure_jerry(arguments)\n\n    if not ret:\n        ret = make_jerry(arguments)\n\n    if not ret and arguments.install is not None:\n        ret = install_jerry(arguments)\n\n    print_result(ret)\n    sys.exit(ret)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/check-cppcheck.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif [[ \"$OSTYPE\" == \"linux\"* ]]; then\n  CPPCHECK_JOBS=${CPPCHECK_JOBS:=$(nproc)}\nelif [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n  CPPCHECK_JOBS=${CPPCHECK_JOBS:=$(sysctl -n hw.ncpu)}\nelse\n  CPPCHECK_JOBS=${CPPCHECK_JOBS:=1}\nfi\n\nJERRY_CORE_DIRS=`find jerry-core -type d`\nJERRY_EXT_DIRS=`find jerry-ext -type d`\nJERRY_PORT_DIRS=`find jerry-port -type d`\nJERRY_MATH_DIRS=`find jerry-math -type d`\n\n\nINCLUDE_DIRS=()\nfor DIR in $JERRY_CORE_DIRS $JERRY_EXT_DIRS $JERRY_PORT_DIRS $JERRY_MATH_DIRS\ndo\n  INCLUDE_DIRS=(\"${INCLUDE_DIRS[@]}\" \"-I$DIR\")\ndone\n\ncppcheck -j$CPPCHECK_JOBS --force \\\n  --language=c --std=c99 \\\n  --quiet \\\n  --enable=warning,style,performance,portability,information \\\n  --template=\"{file}:{line}: {severity}({id}): {message}\" \\\n  --error-exitcode=1 \\\n  --inline-suppr \\\n  --exitcode-suppressions=tools/cppcheck/suppressions-list \\\n  --suppressions-list=tools/cppcheck/suppressions-list \\\n  \"${INCLUDE_DIRS[@]}\" \\\n  jerry-core jerry-ext jerry-port jerry-math jerry-main tests/unit-*\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/check-doxygen.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ndoxygen 2>&1 >/dev/null | head -n 1000 | tee doxygen.log\nif [ -s doxygen.log ]\nthen\n  EXIT=1\nelse\n  EXIT=0\nfi\nrm -f doxygen.log\nexit $EXIT\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/check-license.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\n\nimport io\nimport os\nimport re\nimport sys\nimport settings\n\nLICENSE = re.compile(\n    r'((#|//|\\*) Copyright .*\\n'\n    r')+\\s?\\2\\n'\n    r'\\s?\\2 Licensed under the Apache License, Version 2.0 \\(the \"License\"\\);\\n'\n    r'\\s?\\2 you may not use this file except in compliance with the License.\\n'\n    r'\\s?\\2 You may obtain a copy of the License at\\n'\n    r'\\s?\\2\\n'\n    r'\\s?\\2     http://www.apache.org/licenses/LICENSE-2.0\\n'\n    r'\\s?\\2\\n'\n    r'\\s?\\2 Unless required by applicable law or agreed to in writing, software\\n'\n    r'\\s?\\2 distributed under the License is distributed on an \"AS IS\" BASIS\\n'\n    r'\\s?\\2 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n'\n    r'\\s?\\2 See the License for the specific language governing permissions and\\n'\n    r'\\s?\\2 limitations under the License.\\n'\n)\n\nINCLUDE_DIRS = [\n    'cmake',\n    'jerry-core',\n    'jerry-ext',\n    'jerry-math',\n    'jerry-main',\n    'jerry-port',\n    'targets',\n    'tests',\n    'tools',\n]\n\nEXCLUDE_DIRS = [\n    'targets/esp8266',\n    os.path.relpath(settings.TEST262_TEST_SUITE_DIR, settings.PROJECT_DIR),\n]\n\nEXTENSIONS = [\n    '.c',\n    '.cpp',\n    '.h',\n    '.S',\n    '.js',\n    '.py',\n    '.sh',\n    '.tcl',\n    '.cmake',\n]\n\n\ndef main():\n    is_ok = True\n\n    for dname in INCLUDE_DIRS:\n        for root, _, files in os.walk(dname):\n            if any(root.startswith(exclude) for exclude in EXCLUDE_DIRS):\n                continue\n            for fname in files:\n                if any(fname.endswith(ext) for ext in EXTENSIONS):\n                    fpath = os.path.join(root, fname)\n                    with io.open(fpath, 'r', errors='ignore') as curr_file:\n                        if not LICENSE.search(curr_file.read()):\n                            print('%s: incorrect license' % fpath)\n                            is_ok = False\n\n    if not is_ok:\n        sys.exit(1)\n\n\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/check-magic-strings.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nMAGIC_STRINGS_GEN=\"tools/gen-magic-strings.py\"\nMAGIC_STRINGS_INC_H=\"jerry-core/lit/lit-magic-strings.inc.h\"\nMAGIC_STRINGS_TEMP=`mktemp lit-magic-strings.inc.h.XXXXXXXXXX`\n\ncp $MAGIC_STRINGS_INC_H $MAGIC_STRINGS_TEMP\n$MAGIC_STRINGS_GEN\nDIFF_RESULT=$?\n\nif [ $DIFF_RESULT -eq 0 ]\nthen\n  diff -q $MAGIC_STRINGS_INC_H $MAGIC_STRINGS_TEMP\n  DIFF_RESULT=$?\n  if [ $DIFF_RESULT -ne 0 ]\n  then\n    echo -e \"\\e[1;33m$MAGIC_STRINGS_INC_H must be re-generated. Run $MAGIC_STRINGS_GEN\\e[0m\"\n  fi\nfi\nmv $MAGIC_STRINGS_TEMP $MAGIC_STRINGS_INC_H\n\nexit $DIFF_RESULT\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/check-pylint.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nTERM_NORMAL='\\033[0m'\nTERM_RED='\\033[1;31m'\n\npylint --version &>/dev/null\nif [ $? -ne 0 ]\nthen\n    echo -e \"${TERM_RED}Can't run check-pylint because pylint isn't installed.${TERM_NORMAL}\\n\"\n    exit 1\nfi\n\nfind ./tools ./jerry-debugger -name \"*.py\" \\\n    | xargs pylint --rcfile=tools/pylint/pylintrc\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/check-signed-off.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Usage\nfunction print_usage\n{\n echo \"Usage: $0 [--help] [--tolerant] [--gh-actions]\"\n}\n\nfunction print_help\n{\n echo \"$0: Check Signed-off-by message of the latest commit\"\n echo \"\"\n print_usage\n echo \"\"\n echo \"Optional arguments:\"\n echo \"  --help            print this help message\"\n echo \"  --tolerant        check the existence of the message only but don't\"\n echo \"                    require the name and email address to match the author\"\n echo \"                    of the commit\"\n echo \"  --gh-actions      perform check in tolerant mode if on GitHub-Actions and not\"\n echo \"                    checking a pull request, perform strict check otherwise\"\n echo \"\"\n echo \"The last line of every commit message must follow the form of:\"\n echo \"'JerryScript-DCO-1.0-Signed-off-by: NAME EMAIL', where NAME and EMAIL must\"\n echo \"match the name and email address of the author of the commit (unless in\"\n echo \"tolerant mode).\"\n}\n\n# Processing command line\nTOLERANT=\"no\"\nwhile [ \"$#\" -gt 0 ]\ndo\n if [ \"$1\" == \"--help\" ]\n then\n  print_help\n  exit 0\n elif [ \"$1\" == \"--tolerant\" ]\n then\n  TOLERANT=\"yes\"\n  shift\n elif [ \"$1\" == \"--gh-actions\" ]\n then\n  if [ \"$GITHUB_EVENT_NAME\" == \"\" ]\n  then\n   echo -e \"\\e[1;33mWarning! GitHub-Actions-tolerant mode requested but not running on GitHub-Actions! \\e[0m\"\n  elif [ \"$GITHUB_EVENT_NAME\" == \"pull_request\" ]\n  then\n   TOLERANT=\"no\"\n  else\n   TOLERANT=\"yes\"\n  fi\n  shift\n else\n  print_usage\n  exit 1\n fi\ndone\n\n# Determining latest commit\nparent_hashes=(`git show -s --format=%p HEAD | head -1`)\n\nif [ \"${#parent_hashes[@]}\" -eq 1 ]\nthen\n commit_hash=`git show -s --format=%h HEAD | head -1`\nelif [ \"${#parent_hashes[@]}\" -eq 2 ]\nthen\n commit_hash=${parent_hashes[1]}\nelse\n echo \"$0: cannot handle commit with ${#parent_hashes[@]} parents ${parent_hashes[@]}\"\n exit 1\nfi\n\n# Checking the last line\nactual_signed_off_by_line=`git show -s --format=%B $commit_hash | sed '/^$/d' | tr -d '\\015' | tail -n 1`\n\nif [ \"$TOLERANT\" == \"no\" ]\nthen\n author_name=`git show -s --format=%an $commit_hash`\n author_email=`git show -s --format=%ae $commit_hash`\n required_signed_off_by_line=\"JerryScript-DCO-1.0-Signed-off-by: $author_name $author_email\"\n\n if [ \"$actual_signed_off_by_line\" != \"$required_signed_off_by_line\" ]\n then\n  echo -e \"\\e[1;33mSigned-off-by message is incorrect. The following line should be at the end of the $commit_hash commit's message: '$required_signed_off_by_line'. \\e[0m\"\n  exit 1\n fi\nelse\n  echo -e \"\\e[1;33mWarning! The name and email address of the author of the $commit_hash commit is not checked in tolerant mode! \\e[0m\"\n  if echo \"$actual_signed_off_by_line\" | grep -q -v '^JerryScript-DCO-1.0-Signed-off-by:'\n  then\n   echo -e \"\\e[1;33mSigned-off-by message is incorrect. The following line should be at the end of the $commit_hash commit's message: '$required_signed_off_by_line'. \\e[0m\"\n   exit 1\n  fi\nfi\n\nexit 0\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/check-sonarqube.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif [[ \"${TRAVIS_REPO_SLUG}\" == \"jerryscript-project/jerryscript\"\n  && ${TRAVIS_BRANCH} == \"master\"\n  && ${TRAVIS_EVENT_TYPE} == \"push\" ]]\nthen\n  git fetch --unshallow\n  build-wrapper-linux-x86-64 --out-dir bw-output \\\n    ./tools/build.py --error-messages=on \\\n                     --jerry-cmdline-snapshot=on \\\n                     --jerry-debugger=on \\\n                     --line-info=on \\\n                     --mem-stats=on \\\n                     --profile=es.next \\\n                     --snapshot-save=on \\\n                     --snapshot-exec=on \\\n                     --valgrind=on \\\n                     --vm-exec-stop=on\n  sonar-scanner -Dsonar.projectVersion=\"${TRAVIS_COMMIT}\"\nelse\n  # SonarQube analysis works only on the master branch.\n  # Ensure the build works with the options used for the analysis.\n  ./tools/build.py --error-messages=on \\\n                   --jerry-cmdline-snapshot=on \\\n                   --jerry-debugger=on \\\n                   --line-info=on \\\n                   --mem-stats=on \\\n                   --profile=es.next \\\n                   --snapshot-save=on \\\n                   --snapshot-exec=on \\\n                   --valgrind=on \\\n                   --vm-exec-stop=on\nfi\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/check-vera.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nJERRY_CORE_FILES=`find ./jerry-core -name \"*.c\" -or -name \"*.h\"`\nJERRY_EXT_FILES=`find ./jerry-ext -name \"*.c\" -or -name \"*.h\"`\nJERRY_PORT_FILES=`find ./jerry-port -name \"*.c\" -or -name \"*.h\"`\nJERRY_MATH_FILES=`find ./jerry-math -name \"*.c\" -or -name \"*.h\"`\nJERRY_MAIN_FILES=`find ./jerry-main -name \"*.c\" -or -name \"*.h\"`\nUNIT_TEST_FILES=`find ./tests/unit-* -name \"*.c\" -or -name \"*.h\"`\n\nif [ -n \"$1\" ]\nthen\nMANUAL_CHECK_FILES=`find $1 -name \"*.c\" -or -name \"*.h\"`\nfi\n\nvera++ -r tools/vera++ -p jerry \\\n -e --no-duplicate \\\n $MANUAL_CHECK_FILES $JERRY_CORE_FILES $JERRY_EXT_FILES $JERRY_PORT_FILES $JERRY_MATH_FILES $JERRY_MAIN_FILES $UNIT_TEST_FILES\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/cppcheck/suppressions-list",
    "content": "wrongmathcall:tests/unit-math/test-math.inc.h\nvariableScope:jerry-math/*.c\ninvalidPointerCast:jerry-math/*.c\n\nConfigurationNotChecked:jerry-core/ecma/builtin-objects/ecma-builtin-global.inc.h\nConfigurationNotChecked:jerry-core/ecma/builtin-objects/ecma-builtin-helpers-macro-defines.inc.h\nConfigurationNotChecked:jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.inc.h\nConfigurationNotChecked:jerry-core/ecma/builtin-objects/ecma-builtin-object.inc.h\nConfigurationNotChecked:jerry-core/ecma/builtin-objects/ecma-builtin-helpers-macro-undefs.inc.h\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/gen-doctest.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\n\nimport argparse\nimport fileinput\nimport os\nimport re\nimport shlex\nimport sys\n\n\nclass DoctestExtractor(object):\n    \"\"\"\n    An extractor to process Markdown files and find doctests inside.\n    \"\"\"\n\n    def __init__(self, outdir, dry):\n        \"\"\"\n        :param outdir: path to the directory where to write the found doctests.\n        :param dry: if True, don't create the doctest files but print the file\n            names only.\n        \"\"\"\n        self._outdir = outdir\n        self._dry = dry\n\n        # Attributes actually initialized by process()\n        self._infile = None\n        self._outname_base = None\n        self._outname_cnt = None\n\n    def _warning(self, message, lineno):\n        \"\"\"\n        Print a warning to the standard error.\n\n        :param message: a description of the problem.\n        :param lineno: the location that triggered the warning.\n        \"\"\"\n        print('%s:%d: %s' % (self._infile, lineno, message), file=sys.stderr)\n\n    def _process_decl(self, params):\n        \"\"\"\n        Process a doctest declaration (`[doctest]: # (name=\"test.c\", ...)`).\n\n        :param params: the parameter string of the declaration (the string\n            between the parentheses).\n        :return: a tuple of a dictionary (of keys and values taken from the\n            `params` string) and the line number of the declaration.\n        \"\"\"\n        tokens = list(shlex.shlex(params))\n\n        decl = {}\n        for i in range(0, len(tokens), 4):\n            if i + 2 >= len(tokens) or tokens[i + 1] != '=' or (i + 3 < len(tokens) and tokens[i + 3] != ','):\n                self._warning('incorrect parameter list for test (key=\"value\", ...)', fileinput.filelineno())\n                decl = {}\n                break\n            decl[tokens[i]] = tokens[i + 2].strip('\\'\"')\n\n        if 'name' not in decl:\n            decl['name'] = '%s%d.c' % (self._outname_base, self._outname_cnt)\n            self._outname_cnt += 1\n\n        if 'test' not in decl:\n            decl['test'] = 'run'\n\n        return decl, fileinput.filelineno()\n\n    def _process_code_start(self):\n        \"\"\"\n        Process the beginning of a fenced code block (` ```c `).\n\n        :return: a tuple of a list (of the first line(s) of the doctest) and the\n            line number of the start of the code block.\n        \"\"\"\n        return ['#line %d \"%s\"\\n' % (fileinput.filelineno() + 1, self._infile)], fileinput.filelineno()\n\n    def _process_code_end(self, decl, code):\n        \"\"\"\n        Process the end of a fenced code block (` ``` `).\n\n        :param decl: the dictionary of the declaration parameters.\n        :param code: the list of lines of the doctest.\n        \"\"\"\n        outname = os.path.join(self._outdir, decl['name']).replace('\\\\', '/')\n        action = decl['test']\n        if self._dry:\n            print('%s %s' % (action, outname))\n        else:\n            with open(outname, 'w') as outfile:\n                outfile.writelines(code)\n\n    def process(self, infile):\n        \"\"\"\n        Find doctests in a Markdown file and process them according to the\n        constructor parameters.\n\n        :param infile: path to the input file.\n        \"\"\"\n        self._infile = infile\n        self._outname_base = os.path.splitext(os.path.basename(infile))[0]\n        self._outname_cnt = 1\n\n        mode = 'TEXT'\n        decl, decl_lineno = {}, 0\n        code, code_lineno = [], 0\n\n        for line in fileinput.input(infile):\n            decl_match = re.match(r'^\\[doctest\\]:\\s+#\\s+\\((.*)\\)\\s*$', line)\n            nl_match = re.match(r'^\\s*$', line)\n            start_match = re.match(r'^```c\\s*$', line)\n            end_match = re.match(r'^```\\s*', line)\n\n            if mode == 'TEXT':\n                if decl_match is not None:\n                    decl, decl_lineno = self._process_decl(decl_match.group(1))\n                    mode = 'NL'\n            elif mode == 'NL':\n                if decl_match is not None:\n                    self._warning('test without code block', decl_lineno)\n                    decl, decl_lineno = self._process_decl(decl_match.group(1))\n                elif start_match is not None:\n                    code, code_lineno = self._process_code_start()\n                    mode = 'CODE'\n                elif nl_match is None:\n                    self._warning('test without code block', decl_lineno)\n                    mode = 'TEXT'\n            elif mode == 'CODE':\n                if end_match is not None:\n                    self._process_code_end(decl, code)\n                    mode = 'TEXT'\n                else:\n                    code.append(line)\n\n        if mode == 'NL':\n            self._warning('test without code block', decl_lineno)\n        elif mode == 'CODE':\n            self._warning('unterminated code block', code_lineno)\n\n\ndef main():\n    parser = argparse.ArgumentParser(description='Markdown doctest extractor', epilog=\"\"\"\n        The tool extracts specially marked fenced C code blocks from the input Markdown files\n        and writes them to the file system. The annotations recognized by the tool are special\n        but valid Markdown links/comments that must be added before the fenced code blocks:\n        `[doctest]: # (name=\"test.c\", ...)`. For now, two parameters are valid:\n        `name` determines the filename for the extracted code block (overriding the default\n        auto-numbered naming scheme), and `test` determines the test action to be performed on\n        the extracted code (valid options are \"compile\", \"link\", and the default \"run\").\n        \"\"\")\n    parser.add_argument('-d', '--dir', metavar='NAME', default=os.getcwd(),\n                        help='output directory name (default: %(default)s)')\n    parser.add_argument('--dry', action='store_true',\n                        help='don\\'t generate files but print file names that would be generated '\n                             'and what test action to perform on them')\n    parser.add_argument('file', nargs='+',\n                        help='input Markdown file(s)')\n    args = parser.parse_args()\n\n    extractor = DoctestExtractor(args.dir, args.dry)\n    for mdfile in args.file:\n        extractor.process(mdfile)\n\n\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/gen-magic-strings.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\n\ntry:\n    from configparser import ConfigParser\nexcept ImportError:\n    from ConfigParser import ConfigParser\n\nimport argparse\nimport fileinput\nimport json\nimport os\nimport re\n\nfrom settings import PROJECT_DIR\n\n\nMAGIC_STRINGS_INI = os.path.join(PROJECT_DIR, 'jerry-core', 'lit', 'lit-magic-strings.ini')\nMAGIC_STRINGS_INC_H = os.path.join(PROJECT_DIR, 'jerry-core', 'lit', 'lit-magic-strings.inc.h')\n\n\ndef debug_dump(obj):\n    def deepcopy(obj):\n        if isinstance(obj, (list, tuple)):\n            return [deepcopy(e) for e in obj]\n        if isinstance(obj, set):\n            return [repr(e) for e in obj]\n        if isinstance(obj, dict):\n            return {repr(k): deepcopy(e) for k, e in obj.items()}\n        return obj\n    return json.dumps(deepcopy(obj), indent=4)\n\n\ndef read_magic_string_defs(debug=False):\n    # Read the `jerry-core/lit/lit-magic-strings.ini` file and returns the magic\n    # string definitions found therein in the form of\n    #   [LIT_MAGIC_STRINGS]\n    #   LIT_MAGIC_STRING_xxx = \"vvv\"\n    #   ...\n    # as\n    #   [('LIT_MAGIC_STRING_xxx', 'vvv'), ...]\n    # sorted by length and alpha.\n    ini_parser = ConfigParser()\n    ini_parser.optionxform = str # case sensitive options (magic string IDs)\n    ini_parser.read(MAGIC_STRINGS_INI)\n\n    defs = [(str_ref, json.loads(str_value) if str_value != '' else '')\n            for str_ref, str_value in ini_parser.items('LIT_MAGIC_STRINGS')]\n    defs = sorted(defs, key=lambda ref_value: (len(ref_value[1]), ref_value[1]))\n\n    if debug:\n        print('debug: magic string definitions: {dump}'\n              .format(dump=debug_dump(defs)))\n\n    return defs\n\n\ndef extract_magic_string_refs(debug=False):\n    results = {}\n\n    def process_line(fname, lnum, line, guard_stack):\n        # Build `results` dictionary as\n        #   results['LIT_MAGIC_STRING_xxx'][('!defined (CONFIG_DISABLE_yyy_BUILTIN)', ...)]\n        #       = [('zzz.c', 123), ...]\n        # meaning that the given literal is referenced under the given guards at\n        # the listed (file, line number) locations.\n        for str_ref in re.findall('LIT_MAGIC_STRING_[a-zA-Z0-9_]+', line):\n            if str_ref in ['LIT_MAGIC_STRING_DEF',\n                           'LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE',\n                           'LIT_MAGIC_STRING_LENGTH_LIMIT',\n                           'LIT_MAGIC_STRING__COUNT']:\n                continue\n\n            guard_set = set()\n            for guards in guard_stack:\n                guard_set.update(guards)\n            guard_tuple = tuple(sorted(guard_set))\n\n            if str_ref not in results:\n                results[str_ref] = {}\n            str_guards = results[str_ref]\n\n            if guard_tuple not in str_guards:\n                str_guards[guard_tuple] = []\n            file_list = str_guards[guard_tuple]\n\n            file_list.append((fname, lnum))\n\n    def process_guard(guard):\n        # Transform `#ifndef MACRO` to `#if !defined (MACRO)` and\n        # `#ifdef MACRO` to `#if defined (MACRO)` to enable or-ing/and-ing the\n        # conditions later on.\n        if guard.startswith('ndef '):\n            guard = guard.replace('ndef ', '!defined (', 1) + ')'\n        elif guard.startswith('def '):\n            guard = guard.replace('def ', 'defined (', 1) + ')'\n        return guard\n\n    def process_file(fname):\n        # Builds `guard_stack` list for each line of a file as\n        #   [['!defined (CONFIG_DISABLE_yyy_BUILTIN)', ...], ...]\n        # meaning that all the listed guards (conditionals) have to hold for the\n        # line to be kept by the preprocessor.\n        guard_stack = []\n\n        for line in fileinput.input(fname):\n            if_match = re.match('^ *# *if(.*)', line)\n            elif_match = re.match('^ *# *elif(.*)', line)\n            else_match = re.match('^ *# *else', line)\n            endif_match = re.match('^ *# *endif', line)\n            if if_match is not None:\n                guard_stack.append([process_guard(if_match.group(1))])\n            elif elif_match is not None:\n                guards = guard_stack[-1]\n                guards[-1] = '!(%s)' % guards[-1].strip()\n                guards.append(process_guard(elif_match.group(1)))\n            elif else_match is not None:\n                guards = guard_stack[-1]\n                guards[-1] = '!(%s)' % guards[-1].strip()\n            elif endif_match is not None:\n                guard_stack.pop()\n\n            lnum = fileinput.filelineno()\n            process_line(fname, lnum, line, guard_stack)\n\n        if guard_stack:\n            print('warning: {fname}: unbalanced preprocessor conditional '\n                  'directives (analysis finished with no closing `#endif` '\n                  'for {guard_stack})'\n                  .format(fname=fname, guard_stack=guard_stack))\n\n    for root, _, files in os.walk(os.path.join(PROJECT_DIR, 'jerry-core')):\n        for fname in files:\n            if (fname.endswith('.c') or fname.endswith('.h')) \\\n               and fname != 'lit-magic-strings.inc.h':\n                process_file(os.path.join(root, fname))\n\n    if debug:\n        print('debug: magic string references: {dump}'\n              .format(dump=debug_dump(results)))\n\n    return results\n\n\ndef calculate_magic_string_guards(defs, uses, debug=False):\n    extended_defs = []\n\n    for str_ref, str_value in defs:\n        if str_ref not in uses:\n            print('warning: unused magic string {str_ref}'\n                  .format(str_ref=str_ref))\n            continue\n\n        # Calculate the most compact guard, i.e., if a magic string is\n        # referenced under various guards, keep the one that is more generic.\n        # E.g.,\n        # guard1 = A and B and C and D and E and F\n        # guard2 = A and B and C\n        # then guard1 or guard2 == guard2.\n        guards = [set(guard_tuple) for guard_tuple in uses[str_ref].keys()]\n        for i, guard_i in enumerate(guards):\n            if guard_i is None:\n                continue\n            for j, guard_j in enumerate(guards):\n                if j == i or guard_j is None:\n                    continue\n                if guard_i < guard_j:\n                    guards[j] = None\n        guards = {tuple(sorted(guard)) for guard in guards if guard is not None}\n\n        extended_defs.append((str_ref, str_value, guards))\n\n    if debug:\n        print('debug: magic string definitions (with guards): {dump}'\n              .format(dump=debug_dump(extended_defs)))\n\n    return extended_defs\n\n\ndef guards_to_str(guards):\n    return ' \\\\\\n|| '.join(' && '.join(g.strip() for g in sorted(guard))\n                           for guard in sorted(guards))\n\n\ndef generate_header(gen_file):\n    header = \\\n\"\"\"/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This file is automatically generated by the %s script\n * from %s. Do not edit! */\n\"\"\" % (os.path.basename(__file__), os.path.basename(MAGIC_STRINGS_INI))\n    print(header, file=gen_file)\n\n\ndef generate_magic_string_defs(gen_file, defs):\n    last_guards = set([()])\n    for str_ref, str_value, guards in defs:\n        if last_guards != guards:\n            if () not in last_guards:\n                print('#endif', file=gen_file)\n            if () not in guards:\n                print('#if {guards}'.format(guards=guards_to_str(guards)), file=gen_file)\n\n        print('LIT_MAGIC_STRING_DEF ({str_ref}, {str_value})'\n              .format(str_ref=str_ref, str_value=json.dumps(str_value)), file=gen_file)\n\n        last_guards = guards\n\n    if () not in last_guards:\n        print('#endif', file=gen_file)\n\n\ndef generate_first_magic_strings(gen_file, defs):\n    print(file=gen_file) # empty line separator\n\n    max_size = len(defs[-1][1])\n    for size in range(max_size + 1):\n        last_guards = set([()])\n        for str_ref, str_value, guards in defs:\n            if len(str_value) >= size:\n                if () not in guards and () in last_guards:\n                    print('#if {guards}'.format(guards=guards_to_str(guards)), file=gen_file)\n                elif () not in guards and () not in last_guards:\n                    if guards == last_guards:\n                        continue\n                    print('#elif {guards}'.format(guards=guards_to_str(guards)), file=gen_file)\n                elif () in guards and () not in last_guards:\n                    print('#else', file=gen_file)\n\n                print('LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE ({size}, {str_ref})'\n                      .format(size=size, str_ref=str_ref), file=gen_file)\n\n                if () in guards:\n                    break\n\n                last_guards = guards\n\n        if () not in last_guards:\n            print('#endif', file=gen_file)\n\n\ndef main():\n    parser = argparse.ArgumentParser(description='lit-magic-strings.inc.h generator')\n    parser.add_argument('--debug', action='store_true', help='enable debug output')\n    args = parser.parse_args()\n\n    defs = read_magic_string_defs(debug=args.debug)\n    uses = extract_magic_string_refs(debug=args.debug)\n\n    extended_defs = calculate_magic_string_guards(defs, uses, debug=args.debug)\n\n    with open(MAGIC_STRINGS_INC_H, 'w') as gen_file:\n        generate_header(gen_file)\n        generate_magic_string_defs(gen_file, extended_defs)\n        generate_first_magic_strings(gen_file, extended_defs)\n\n\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/gen-test-math.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nmake -C tools/unit-tests build\ntools/unit-tests/gen-test-math >tests/unit-math/test-math.inc.h\nmake -C tools/unit-tests clean\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/gen-unicode.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\n\nimport argparse\nimport csv\nimport itertools\nimport os\nimport re\nimport warnings\n\nfrom gen_c_source import LICENSE, format_code\nfrom settings import PROJECT_DIR\n\n\nUNICODE_DATA_FILE = 'UnicodeData.txt'\nSPECIAL_CASING_FILE = 'SpecialCasing.txt'\nDERIVED_PROPS_FILE = 'DerivedCoreProperties.txt'\nPROP_LIST_FILE = 'PropList.txt'\nCASE_FOLDING_FILE = 'CaseFolding.txt'\n\nRANGES_C_SOURCE = os.path.join(PROJECT_DIR, 'jerry-core/lit/lit-unicode-ranges.inc.h')\nRANGES_SUP_C_SOURCE = os.path.join(PROJECT_DIR, 'jerry-core/lit/lit-unicode-ranges-sup.inc.h')\nCONVERSIONS_C_SOURCE = os.path.join(PROJECT_DIR, 'jerry-core/lit/lit-unicode-conversions.inc.h')\nCONVERSIONS_SUP_C_SOURCE = os.path.join(PROJECT_DIR, 'jerry-core/lit/lit-unicode-conversions-sup.inc.h')\nFOLDING_C_SOURCE = os.path.join(PROJECT_DIR, 'jerry-core/lit/lit-unicode-folding.inc.h')\nFOLDING_SUP_C_SOURCE = os.path.join(PROJECT_DIR, 'jerry-core/lit/lit-unicode-folding-sup.inc.h')\n\nUNICODE_PLANE_TYPE_BASIC = 0\nUNICODE_PLANE_TYPE_SUPPLEMENTARY = 1\n\n# common code generation\n\nclass UnicodeBasicSource(object):\n    # pylint: disable=too-many-instance-attributes\n    def __init__(self, filepath, character_type=\"uint16_t\", length_type=\"uint8_t\"):\n        self._filepath = filepath\n        self._header = [LICENSE, \"\"]\n        self._data = []\n        self._table_name_suffix = \"\"\n        self.character_type = character_type\n        self.length_type = length_type\n\n        self._range_table_types = [self.character_type,\n                                   self.length_type,\n                                   self.character_type]\n        self._range_table_names = [\"interval_starts\",\n                                   \"interval_lengths\",\n                                   \"chars\"]\n        self._range_table_descriptions = [\"Character interval starting points for\",\n                                          \"Character interval lengths for\",\n                                          \"Non-interval characters for\"]\n\n        self._conversion_range_types = [self.character_type,\n                                        self.length_type]\n        self._conversion_range_names = [\"ranges\",\n                                        \"range_lengths\"]\n\n    def complete_header(self, completion):\n        self._header.append(completion)\n        self._header.append(\"\")  # for an extra empty line\n\n    def add_whitepace_range(self, category, categorizer, units):\n        self.add_range(category, categorizer.create_tables(units))\n\n    def add_range(self, category, tables):\n        idx = 0\n        for table in tables:\n            self.add_table(table,\n                           \"/**\\n * %s %s.\\n */\" % (self._range_table_descriptions[idx], category),\n                           self._range_table_types[idx],\n                           category,\n                           self._range_table_names[idx])\n            idx += 1\n\n    def add_conversion_range(self, category, tables, descriptions):\n        self.add_named_conversion_range(category, tables, self._conversion_range_names, descriptions)\n\n    def add_named_conversion_range(self, category, tables, table_names, descriptions):\n        idx = 0\n        for table in tables:\n            self.add_table(table,\n                           descriptions[idx],\n                           self._conversion_range_types[idx],\n                           category,\n                           table_names[idx])\n            idx += 1\n\n    def add_table(self, table, description, table_type, category, table_name):\n        if table and sum(table) != 0:\n            self._data.append(description)\n            self._data.append(\"static const %s lit_unicode_%s%s%s[] JERRY_ATTR_CONST_DATA =\"\n                              % (table_type,\n                                 category.lower(),\n                                 \"_\" + table_name if table_name else \"\",\n                                 self._table_name_suffix))\n            self._data.append(\"{\")\n            self._data.append(format_code(table, 1, 6 if self._table_name_suffix else 4))\n            self._data.append(\"};\")\n            self._data.append(\"\")  # for an extra empty line\n\n    def generate(self):\n        with open(self._filepath, 'w') as generated_source:\n            generated_source.write(\"\\n\".join(self._header))\n            generated_source.write(\"\\n\".join(self._data))\n\n\nclass UnicodeSupplementarySource(UnicodeBasicSource):\n    def __init__(self, filepath):\n        UnicodeBasicSource.__init__(self, filepath, \"uint32_t\", \"uint16_t\")\n        self._table_name_suffix = \"_sup\"\n\n    def add_whitepace_range(self, category, categorizer, units):\n        self.add_range(category, categorizer.create_tables(units))\n\nclass UnicodeBasicCategorizer(object):\n    def __init__(self):\n        self._length_limit = 0xff\n        self.extra_id_continue_units = set([0x200C, 0x200D])\n\n    #pylint: disable=no-self-use\n    def in_range(self, i):\n        return i >= 0x80 and i < 0x10000\n\n    def _group_ranges(self, units):\n        \"\"\"\n        Convert an increasing list of integers into a range list\n        :return: List of ranges.\n        \"\"\"\n        for _, group in itertools.groupby(enumerate(units), lambda q: (q[1] - q[0])):\n            group = list(group)\n            yield group[0][1], group[-1][1]\n\n    def create_tables(self, units):\n        \"\"\"\n        Split list of ranges into intervals and single char lists.\n        :return: A tuple containing the following info:\n            - list of interval starting points\n            - list of interval lengths\n            - list of single chars\n        \"\"\"\n\n        interval_sps = []\n        interval_lengths = []\n        chars = []\n\n        for element in self._group_ranges(units):\n            interval_length = element[1] - element[0]\n            if interval_length == 0:\n                chars.append(element[0])\n            elif interval_length > self._length_limit:\n                for i in range(element[0], element[1], self._length_limit + 1):\n                    length = min(self._length_limit, element[1] - i)\n                    interval_sps.append(i)\n                    interval_lengths.append(length)\n            else:\n                interval_sps.append(element[0])\n                interval_lengths.append(interval_length)\n\n        return interval_sps, interval_lengths, chars\n\n    def read_units(self, file_path, categories, subcategories=None):\n        \"\"\"\n        Read the Unicode Derived Core Properties file and extract the ranges\n        for the given categories.\n\n        :param file_path: Path to the Unicode \"DerivedCoreProperties.txt\" file.\n        :param categories: A list of category strings to extract from the Unicode file.\n        :param subcategories: A list of subcategory strings to restrict categories.\n        :return: A dictionary each string from the :param categories: is a key and for each\n                key list of code points are stored.\n        \"\"\"\n        # Create a dictionary in the format: { category[0]: [ ], ..., category[N]: [ ] }\n        units = {}\n        for category in categories:\n            units[category] = []\n\n        # Formats to match:\n        #  <HEX>     ; <category> #\n        #  <HEX>..<HEX>     ; <category> # <subcategory>\n        matcher = r\"(?P<start>[\\dA-F]+)(?:\\.\\.(?P<end>[\\dA-F]+))?\\s+; (?P<category>[\\w]+) # (?P<subcategory>[\\w&]{2})\"\n\n        with open(file_path, \"r\") as src_file:\n            for line in src_file:\n                match = re.match(matcher, line)\n\n                if (match\n                        and match.group(\"category\") in categories\n                        and (not subcategories or match.group(\"subcategory\") in subcategories)):\n                    start = int(match.group(\"start\"), 16)\n                    # if no \"end\" found use the \"start\"\n                    end = int(match.group(\"end\") or match.group(\"start\"), 16)\n\n                    matching_code_points = [\n                        code_point for code_point in range(start, end + 1) if self.in_range(code_point)\n                    ]\n\n                    units[match.group(\"category\")].extend(matching_code_points)\n\n        return units\n\n    def read_case_mappings(self, unicode_data_file, special_casing_file):\n        \"\"\"\n        Read the corresponding unicode values of lower and upper case letters and store these in tables.\n\n        :param unicode_data_file: Contains the default case mappings (one-to-one mappings).\n        :param special_casing_file: Contains additional informative case mappings that are either not one-to-one\n                                    or which are context-sensitive.\n        :return: Upper and lower case mappings.\n        \"\"\"\n\n        lower_case_mapping = {}\n        upper_case_mapping = {}\n\n        # Add one-to-one mappings\n        with open(unicode_data_file) as unicode_data:\n            reader = csv.reader(unicode_data, delimiter=';')\n\n            for line in reader:\n                letter_id = int(line[0], 16)\n\n                if not self.in_range(letter_id):\n                    continue\n\n                capital_letter = line[12]\n                small_letter = line[13]\n\n                if capital_letter:\n                    upper_case_mapping[letter_id] = parse_unicode_sequence(capital_letter)\n\n                if small_letter:\n                    lower_case_mapping[letter_id] = parse_unicode_sequence(small_letter)\n\n        # Update the conversion tables with the special cases\n        with open(special_casing_file) as special_casing:\n            reader = csv.reader(special_casing, delimiter=';')\n\n            for line in reader:\n                # Skip comment sections and empty lines\n                if not line or line[0].startswith('#'):\n                    continue\n\n                # Replace '#' character with empty string\n                for idx, fragment in enumerate(line):\n                    if fragment.find('#') >= 0:\n                        line[idx] = ''\n\n                letter_id = int(line[0], 16)\n                condition_list = line[4]\n\n                if not self.in_range(letter_id) or condition_list:\n                    continue\n\n                original_letter = parse_unicode_sequence(line[0])\n                small_letter = parse_unicode_sequence(line[1])\n                capital_letter = parse_unicode_sequence(line[3])\n\n                if small_letter != original_letter:\n                    lower_case_mapping[letter_id] = small_letter\n                if capital_letter != original_letter:\n                    upper_case_mapping[letter_id] = capital_letter\n\n        return lower_case_mapping, upper_case_mapping\n\nclass UnicodeSupplementaryCategorizer(UnicodeBasicCategorizer):\n    def __init__(self):\n        UnicodeBasicCategorizer.__init__(self)\n        self._length_limit = 0xffff\n        self.extra_id_continue_units = set()\n\n    def in_range(self, i):\n        return i >= 0x10000\n\ndef generate_ranges(script_args, plane_type):\n    if plane_type == UNICODE_PLANE_TYPE_SUPPLEMENTARY:\n        c_source = UnicodeSupplementarySource(RANGES_SUP_C_SOURCE)\n        categorizer = UnicodeSupplementaryCategorizer()\n    else:\n        c_source = UnicodeBasicSource(RANGES_C_SOURCE)\n        categorizer = UnicodeBasicCategorizer()\n\n    header_completion = [\"/* This file is automatically generated by the %s script\" % os.path.basename(__file__),\n                         \" * from %s. Do not edit! */\" % (DERIVED_PROPS_FILE),\n                         \"\"]\n\n    c_source.complete_header(\"\\n\".join(header_completion))\n\n    derived_props_path = os.path.join(script_args.unicode_dir, DERIVED_PROPS_FILE)\n    units = categorizer.read_units(derived_props_path, [\"ID_Start\", \"ID_Continue\"])\n\n    units[\"ID_Continue\"] = sorted(set(units[\"ID_Continue\"]).union(categorizer.extra_id_continue_units)\n                                  - set(units[\"ID_Start\"]))\n\n    for category, unit in units.items():\n        c_source.add_range(category, categorizer.create_tables(unit))\n\n    prop_list_path = os.path.join(script_args.unicode_dir, PROP_LIST_FILE)\n\n    white_space_units = categorizer.read_units(prop_list_path, [\"White_Space\"], [\"Zs\"])[\"White_Space\"]\n\n    c_source.add_whitepace_range(\"White_Space\", categorizer, white_space_units)\n\n    c_source.generate()\n\n\n# functions for unicode conversions\n\ndef make_char(hex_val):\n    \"\"\"\n    Create a unicode character from a hex value\n\n    :param hex_val: Hex value of the character.\n    :return: Unicode character corresponding to the value.\n    \"\"\"\n\n    try:\n        return unichr(hex_val)\n    except NameError:\n        return chr(hex_val)\n\n\ndef parse_unicode_sequence(raw_data):\n    \"\"\"\n    Parse unicode sequence from raw data.\n\n    :param raw_data: Contains the unicode sequence which needs to parse.\n    :return: The parsed unicode sequence.\n    \"\"\"\n\n    result = ''\n\n    for unicode_char in raw_data.split(' '):\n        if unicode_char == '':\n            continue\n\n        # Convert it to unicode code point (from hex value without 0x prefix)\n        hex_val = int(unicode_char, 16)\n        result += make_char(hex_val)\n\n    return result\n\ndef extract_ranges(letter_case, reverse_letter_case=None):\n    \"\"\"\n    Extract ranges from case mappings\n    (the second param is optional, if it's not empty, a range will contains bidirectional conversions only).\n\n    :param letter_id: An integer, representing the unicode code point of the character.\n    :param letter_case: case mappings dictionary which contains the conversions.\n    :param reverse_letter_case: Comparable case mapping table which contains the return direction of the conversion.\n    :return: A table with the start points and their mapped value, and another table with the lengths of the ranges.\n    \"\"\"\n\n    in_range = False\n    range_position = -1\n    ranges = []\n    range_lengths = []\n\n    for letter_id in sorted(letter_case.keys()):\n        prev_letter_id = letter_id - 1\n\n        # One-way conversions\n        if reverse_letter_case is None:\n            if len(letter_case[letter_id]) > 1:\n                in_range = False\n                continue\n\n            if prev_letter_id not in letter_case or len(letter_case[prev_letter_id]) > 1:\n                in_range = False\n                continue\n\n        # Two way conversions\n        else:\n            if not is_bidirectional_conversion(letter_id, letter_case, reverse_letter_case):\n                in_range = False\n                continue\n\n            if not is_bidirectional_conversion(prev_letter_id, letter_case, reverse_letter_case):\n                in_range = False\n                continue\n\n        conv_distance = calculate_conversion_distance(letter_case, letter_id)\n        prev_conv_distance = calculate_conversion_distance(letter_case, prev_letter_id)\n\n        if conv_distance != prev_conv_distance:\n            in_range = False\n            continue\n\n        if in_range:\n            range_lengths[range_position] += 1\n        else:\n            in_range = True\n            range_position += 1\n\n            # Add the start point of the range and its mapped value\n            ranges.extend([prev_letter_id, ord(letter_case[prev_letter_id])])\n            range_lengths.append(2)\n\n    # Remove all ranges from the case mapping table.\n    for idx in range(0, len(ranges), 2):\n        range_length = range_lengths[idx // 2]\n\n        for incr in range(range_length):\n            del letter_case[ranges[idx] + incr]\n            if reverse_letter_case is not None:\n                del reverse_letter_case[ranges[idx + 1] + incr]\n\n    return ranges, range_lengths\n\n\ndef extract_character_pair_ranges(letter_case, reverse_letter_case):\n    \"\"\"\n    Extract two or more character pairs from the case mapping tables.\n\n    :param letter_case: case mappings dictionary which contains the conversions.\n    :param reverse_letter_case: Comparable case mapping table which contains the return direction of the conversion.\n    :return: A table with the start points, and another table with the lengths of the ranges.\n    \"\"\"\n\n    start_points = []\n    lengths = []\n    in_range = False\n    element_counter = -1\n\n    for letter_id in sorted(letter_case.keys()):\n        # Only extract character pairs\n        if not is_bidirectional_conversion(letter_id, letter_case, reverse_letter_case):\n            in_range = False\n            continue\n\n        if ord(letter_case[letter_id]) == letter_id + 1:\n            prev_letter_id = letter_id - 2\n\n            if not is_bidirectional_conversion(prev_letter_id, letter_case, reverse_letter_case):\n                in_range = False\n\n            if in_range:\n                lengths[element_counter] += 2\n            else:\n                element_counter += 1\n                start_points.append(letter_id)\n                lengths.append(2)\n                in_range = True\n\n        else:\n            in_range = False\n\n    # Remove all found case mapping from the conversion tables after the scanning method\n    for idx, letter_id in enumerate(start_points):\n        conv_length = lengths[idx]\n\n        for incr in range(0, conv_length, 2):\n            del letter_case[letter_id + incr]\n            del reverse_letter_case[letter_id + 1 + incr]\n\n    return start_points, lengths\n\n\ndef extract_character_pairs(letter_case, reverse_letter_case):\n    \"\"\"\n    Extract character pairs. Check that two unicode value are also a mapping value of each other.\n\n    :param letter_case: case mappings dictionary which contains the conversions.\n    :param reverse_letter_case: Comparable case mapping table which contains the return direction of the conversion.\n    :return: A table with character pairs.\n    \"\"\"\n\n    character_pairs = []\n\n    for letter_id in sorted(letter_case.keys()):\n        if is_bidirectional_conversion(letter_id, letter_case, reverse_letter_case):\n            mapped_value = letter_case[letter_id]\n            character_pairs.extend([letter_id, ord(mapped_value)])\n\n            # Remove character pairs from case mapping tables\n            del letter_case[letter_id]\n            del reverse_letter_case[ord(mapped_value)]\n\n    return character_pairs\n\n\ndef extract_special_ranges(letter_case):\n    \"\"\"\n    Extract special ranges. It contains start points of one-to-two letter case ranges\n    where the second character is always the same.\n\n    :param letter_case: case mappings dictionary which contains the conversions.\n\n    :return: A table with the start points and their mapped values, and a table with the lengths of the ranges.\n    \"\"\"\n\n    special_ranges = []\n    special_range_lengths = []\n\n    range_position = -1\n\n    for letter_id in sorted(letter_case.keys()):\n        mapped_value = letter_case[letter_id]\n\n        if len(mapped_value) != 2:\n            continue\n\n        prev_letter_id = letter_id - 1\n\n        if prev_letter_id not in letter_case:\n            in_range = False\n            continue\n\n        prev_mapped_value = letter_case[prev_letter_id]\n\n        if len(prev_mapped_value) != 2:\n            continue\n\n        if prev_mapped_value[1] != mapped_value[1]:\n            continue\n\n        if (ord(prev_mapped_value[0]) - prev_letter_id) != (ord(mapped_value[0]) - letter_id):\n            in_range = False\n            continue\n\n        if in_range:\n            special_range_lengths[range_position] += 1\n        else:\n            range_position += 1\n            in_range = True\n\n            special_ranges.extend([prev_letter_id, ord(prev_mapped_value[0]), ord(prev_mapped_value[1])])\n            special_range_lengths.append(1)\n\n    # Remove special ranges from the conversion table\n    for idx in range(0, len(special_ranges), 3):\n        range_length = special_range_lengths[idx // 3]\n        letter_id = special_ranges[idx]\n\n        for incr in range(range_length):\n            del letter_case[special_ranges[idx] + incr]\n\n    return special_ranges, special_range_lengths\n\n\ndef extract_conversions(letter_case):\n    \"\"\"\n    Extract conversions. It provide the full (or remained) case mappings from the table.\n    The counter table contains the information of how much one-to-one, one-to-two or one-to-three mappings\n    exists successively in the conversion table.\n\n    :return: A table with conversions, and a table with counters.\n    \"\"\"\n\n    unicodes = [[], [], []]\n    unicode_lengths = [0, 0, 0]\n\n    # 1 to 1 byte\n    for letter_id in sorted(letter_case.keys()):\n        mapped_value = letter_case[letter_id]\n\n        if len(mapped_value) != 1:\n            continue\n\n        unicodes[0].extend([letter_id, ord(mapped_value)])\n        del letter_case[letter_id]\n\n    # 1 to 2 bytes\n    for letter_id in sorted(letter_case.keys()):\n        mapped_value = letter_case[letter_id]\n\n        if len(mapped_value) != 2:\n            continue\n\n        unicodes[1].extend([letter_id, ord(mapped_value[0]), ord(mapped_value[1])])\n        del letter_case[letter_id]\n\n    # 1 to 3 bytes\n    for letter_id in sorted(letter_case.keys()):\n        mapped_value = letter_case[letter_id]\n\n        if len(mapped_value) != 3:\n            continue\n\n        unicodes[2].extend([letter_id, ord(mapped_value[0]), ord(mapped_value[1]), ord(mapped_value[2])])\n        del letter_case[letter_id]\n\n    unicode_lengths = [int(len(unicodes[0]) / 2), int(len(unicodes[1]) / 3), int(len(unicodes[2]) / 4)]\n\n    return list(itertools.chain.from_iterable(unicodes)), unicode_lengths\n\n\ndef is_bidirectional_conversion(letter_id, letter_case, reverse_letter_case):\n    \"\"\"\n    Check that two unicode value are also a mapping value of each other.\n\n    :param letter_id: An integer, representing the unicode code point of the character.\n    :param other_case_mapping: Comparable case mapping table which possible contains\n                               the return direction of the conversion.\n    :return: True, if it's a reverible conversion, false otherwise.\n    \"\"\"\n\n    if letter_id not in letter_case:\n        return False\n\n    # Check one-to-one mapping\n    mapped_value = letter_case[letter_id]\n    if len(mapped_value) > 1:\n        return False\n\n    # Check two way conversions\n    mapped_value_id = ord(mapped_value)\n\n    if mapped_value_id not in reverse_letter_case or len(reverse_letter_case[mapped_value_id]) > 1:\n        return False\n\n    if ord(reverse_letter_case[mapped_value_id]) != letter_id:\n        return False\n\n    return True\n\n\ndef calculate_conversion_distance(letter_case, letter_id):\n    \"\"\"\n    Calculate the distance between the unicode character and its mapped value\n    (only needs and works with one-to-one mappings).\n\n    :param letter_case: case mappings dictionary which contains the conversions.\n    :param letter_id: An integer, representing the unicode code point of the character.\n    :return: The conversion distance.\n    \"\"\"\n\n    if letter_id not in letter_case or len(letter_case[letter_id]) > 1:\n        return None\n\n    return ord(letter_case[letter_id]) - letter_id\n\n\ndef generate_conversions(script_args, plane_type):\n    if plane_type == UNICODE_PLANE_TYPE_SUPPLEMENTARY:\n        c_source = UnicodeSupplementarySource(CONVERSIONS_SUP_C_SOURCE)\n        categorizer = UnicodeSupplementaryCategorizer()\n    else:\n        c_source = UnicodeBasicSource(CONVERSIONS_C_SOURCE)\n        categorizer = UnicodeBasicCategorizer()\n\n    header_completion = [\"/* This file is automatically generated by the %s script\" % os.path.basename(__file__),\n                         \" * from %s and %s files. Do not edit! */\" % (UNICODE_DATA_FILE, SPECIAL_CASING_FILE),\n                         \"\"]\n\n    c_source.complete_header(\"\\n\".join(header_completion))\n\n    unicode_data_path = os.path.join(script_args.unicode_dir, UNICODE_DATA_FILE)\n    special_casing_path = os.path.join(script_args.unicode_dir, SPECIAL_CASING_FILE)\n\n    # Read the corresponding unicode values of lower and upper case letters and store these in tables\n    lower_case, upper_case = categorizer.read_case_mappings(unicode_data_path, special_casing_path)\n\n    c_source.add_conversion_range(\"character_case\",\n                                  extract_ranges(lower_case, upper_case),\n                                  [(\"/* Contains start points of character case ranges \"\n                                    \"(these are bidirectional conversions). */\"),\n                                   \"/* Interval lengths of start points in `character_case_ranges` table. */\"])\n    c_source.add_conversion_range(\"character_pair\",\n                                  extract_character_pair_ranges(lower_case, upper_case),\n                                  [\"/* Contains the start points of bidirectional conversion ranges. */\",\n                                   \"/* Interval lengths of start points in `character_pair_ranges` table. */\"])\n\n    c_source.add_table(extract_character_pairs(lower_case, upper_case),\n                       \"/* Contains lower/upper case bidirectional conversion pairs. */\",\n                       c_source.character_type,\n                       \"character_pairs\",\n                       \"\")\n\n    c_source.add_conversion_range(\"upper_case_special\",\n                                  extract_special_ranges(upper_case),\n                                  [(\"/* Contains start points of one-to-two uppercase ranges where the \"\n                                    \"second character\\n\"\n                                    \" * is always the same.\\n\"\n                                    \" */\"),\n                                   \"/* Interval lengths for start points in `upper_case_special_ranges` table. */\"])\n\n    c_source.add_conversion_range(\"lower_case\",\n                                  extract_ranges(lower_case),\n                                  [\"/* Contains start points of lowercase ranges. */\",\n                                   \"/* Interval lengths for start points in `lower_case_ranges` table. */\"])\n\n    c_source.add_named_conversion_range(\"lower_case\",\n                                        extract_conversions(lower_case),\n                                        [\"conversions\", \"conversion_counters\"],\n                                        [(\"/* The remaining lowercase conversions. The lowercase variant can \"\n                                          \"be one-to-three character long. */\"),\n                                         (\"/* Number of one-to-one, one-to-two, and one-to-three lowercase \"\n                                          \"conversions. */\")])\n\n    c_source.add_named_conversion_range(\"upper_case\",\n                                        extract_conversions(upper_case),\n                                        [\"conversions\", \"conversion_counters\"],\n                                        [(\"/* The remaining uppercase conversions. The uppercase variant can \"\n                                          \"be one-to-three character long. */\"),\n                                         (\"/* Number of one-to-one, one-to-two, and one-to-three uppercase \"\n                                          \"conversions. */\")])\n\n    if lower_case:\n        warnings.warn('Not all elements extracted from the lowercase table!')\n    if upper_case:\n        warnings.warn('Not all elements extracted from the uppercase table!')\n\n    c_source.generate()\n\n\ndef generate_folding(script_args, plane_type):\n    if plane_type == UNICODE_PLANE_TYPE_SUPPLEMENTARY:\n        c_source = UnicodeSupplementarySource(FOLDING_SUP_C_SOURCE)\n        categorizer = UnicodeSupplementaryCategorizer()\n    else:\n        c_source = UnicodeBasicSource(FOLDING_C_SOURCE)\n        categorizer = UnicodeBasicCategorizer()\n\n    header_completion = [\"/* This file is automatically generated by the %s script\" % os.path.basename(__file__),\n                         \" * from the %s file. Do not edit! */\" % (CASE_FOLDING_FILE),\n                         \"\"]\n\n    c_source.complete_header(\"\\n\".join(header_completion))\n\n    unicode_data_path = os.path.join(script_args.unicode_dir, UNICODE_DATA_FILE)\n    special_casing_path = os.path.join(script_args.unicode_dir, SPECIAL_CASING_FILE)\n    case_folding_path = os.path.join(script_args.unicode_dir, CASE_FOLDING_FILE)\n\n    # Read the corresponding unicode values of lower and upper case letters and store these in tables\n    lower_case, upper_case = categorizer.read_case_mappings(unicode_data_path, special_casing_path)\n\n    folding = {}\n\n    with open(case_folding_path, 'r') as case_folding:\n        case_folding_re = re.compile(r'(?P<code_point>[^;]*);\\s*(?P<type>[^;]*);\\s*(?P<folding>[^;]*);')\n        for line in case_folding:\n            match = case_folding_re.match(line)\n            if match and match.group('type') in ('S', 'C'):\n                code_point = int(match.group('code_point'), 16)\n\n                if categorizer.in_range(code_point):\n                    folding[code_point] = parse_unicode_sequence(match.group('folding'))\n\n    should_to_upper = []\n    should_skip_to_lower = []\n\n    for code_point in lower_case:\n        if code_point not in folding:\n            should_skip_to_lower.append(code_point)\n\n    for code_point, folded in folding.items():\n        if lower_case.get(code_point, make_char(code_point)) != folded:\n            should_to_upper.append(code_point)\n\n            if upper_case.get(code_point, '') == folded:\n                should_skip_to_lower.append(code_point)\n\n    c_source.add_range('folding_skip_to_lower', categorizer.create_tables(should_skip_to_lower))\n    c_source.add_range('folding_to_upper', categorizer.create_tables(should_to_upper))\n\n    c_source.generate()\n\n\n# entry point\n\n\ndef main():\n    parser = argparse.ArgumentParser(description='lit-unicode-{conversions,ranges}-{sup}.inc.h generator',\n                                     epilog='''\n                                        The input data must be retrieved from\n                                        http://www.unicode.org/Public/<VERSION>/ucd/UCD.zip.\n                                        The last known good version is 13.0.0.\n                                        ''')\n    def check_dir(path):\n        if not os.path.isdir(path) or not os.access(path, os.R_OK):\n            raise argparse.ArgumentTypeError('The %s directory does not exist or is not readable!' % path)\n        return path\n\n    parser.add_argument('--unicode-dir', metavar='DIR', action='store', required=True,\n                        type=check_dir, help='specify the unicode data directory')\n\n    script_args = parser.parse_args()\n\n    generate_ranges(script_args, UNICODE_PLANE_TYPE_BASIC)\n    generate_ranges(script_args, UNICODE_PLANE_TYPE_SUPPLEMENTARY)\n    generate_conversions(script_args, UNICODE_PLANE_TYPE_BASIC)\n    generate_conversions(script_args, UNICODE_PLANE_TYPE_SUPPLEMENTARY)\n    generate_folding(script_args, UNICODE_PLANE_TYPE_BASIC)\n    # There are currently no code points in the supplementary planes that require special folding\n    # generate_folding(script_args, UNICODE_PLANE_TYPE_SUPPLEMENTARY)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/gen_c_source.py",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\nLICENSE = \"\"\"/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\"\"\"\n\n\ndef format_code(code, indent, digit_number=4):\n    def regroup(list_to_group, num):\n        return [list_to_group[i:i+num] for i in range(0, len(list_to_group), num)]\n\n    def hex_format(char, digit_number):\n        if isinstance(char, str):\n            char = ord(char)\n\n        return (\"0x{:0%sx}\" % digit_number).format(char)\n\n    lines = []\n\n    nums_per_line = 10\n    width = nums_per_line * (digit_number + 4)\n    # convert all characters to hex format\n    converted_code = [hex_format(char, digit_number) for char in code]\n    # 10 hex number per line\n    for line in regroup(\", \".join(converted_code), width):\n        lines.append(('  ' * indent) + line.strip())\n    return \"\\n\".join(lines)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/heaplimit_measure.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nfrom __future__ import print_function\n# force // operator to be integer division in Python 2\nfrom __future__ import division\n\nimport argparse\nimport json\nimport os\nimport subprocess\nimport sys\n\nTOOLS_PATH = os.path.dirname(os.path.realpath(__file__))\nBASE_PATH = os.path.join(TOOLS_PATH, '..')\n\nFLAG_CLEAN = '--clean'\nFLAG_DEBUG = '--debug'\nFLAG_HEAPLIMIT = '--mem-heap'\nJERRY_BUILDER = os.path.join(BASE_PATH, 'tools', 'build.py')\nJERRY_BIN = os.path.join(BASE_PATH, 'build', 'bin', 'jerry')\nTEST_DIR = os.path.join(BASE_PATH, 'tests')\n\n\ndef get_args():\n    \"\"\" Parse input arguments. \"\"\"\n    desc = 'Finds the smallest possible JerryHeap size without failing to run the given js file'\n    parser = argparse.ArgumentParser(description=desc)\n    parser.add_argument('testfile')\n    parser.add_argument('--heapsize', type=int, default=512,\n                        help='set the limit of the first heapsize (default: %(default)d)')\n    parser.add_argument('--buildtype', choices=['release', 'debug'], default='release',\n                        help='select build type (default: %(default)s)')\n\n    script_args = parser.parse_args()\n\n    return script_args\n\n\ndef check_files(opts):\n    files = [JERRY_BUILDER, opts.testfile]\n    for _file in files:\n        if not os.path.isfile(_file):\n            sys.exit(\"File not found: %s\" % _file)\n\n\ndef build_bin(heapsize, opts):\n    \"\"\" Run tools/build.py script \"\"\"\n    command = [\n        JERRY_BUILDER,\n        FLAG_CLEAN,\n        FLAG_HEAPLIMIT,\n        str(heapsize)\n    ]\n\n    if opts.buildtype == 'debug':\n        command.append(FLAG_DEBUG)\n\n    print('Building JerryScript with: %s' % (' '.join(command)))\n    subprocess.check_output(command)\n\n\ndef run_test(opts):\n    \"\"\" Run the testfile to get the exitcode. \"\"\"\n    try:\n        testfile = os.path.abspath(opts.testfile)\n        run_cmd = [JERRY_BIN, testfile]\n        # check output will raise an error if the exit code is not 0\n        subprocess.check_output(run_cmd, cwd=TEST_DIR)\n    except subprocess.CalledProcessError as err:\n        return err.returncode\n\n    return 0\n\n\ndef heap_limit(opts):\n    \"\"\" Find the minimal size of jerryheap to pass \"\"\"\n    goodheap = opts.heapsize\n    lowheap = 0\n    hiheap = opts.heapsize\n\n    while lowheap < hiheap:\n        build_bin(hiheap, opts)\n        assert os.path.isfile(JERRY_BIN), 'Jerry binary file does not exists'\n\n        exitcode = run_test(opts)\n        if exitcode != 0:\n            lowheap = hiheap\n            hiheap = (lowheap + goodheap) // 2\n        else:\n            goodheap = hiheap\n            hiheap = (lowheap + hiheap) // 2\n\n    return {\n        'testfile': opts.testfile,\n        'heaplimit to pass': goodheap\n    }\n\n\ndef main(options):\n    check_files(options)\n    result = heap_limit(options)\n    print(json.dumps(result, indent=4))\n\n\nif __name__ == \"__main__\":\n    main(get_args())\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/js2c.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n#  This file converts ./js/*.js to a C-array in ./source/jerry-targetjs.h file\n\nimport argparse\nimport glob\nimport os\nimport re\n\nfrom gen_c_source import LICENSE, format_code\n\n\nHEADER = '''#ifndef JERRY_TARGETJS_H\n#define JERRY_TARGETJS_H\n'''\n\nFOOTER = '''\n#endif\n'''\n\nNATIVE_STRUCT = '''\nstruct js_source_all {\n  const char* name;\n  const char* source;\n  const int length;\n};\n\n#define DECLARE_JS_CODES \\\\\nstruct js_source_all js_codes[] = \\\\\n{ \\\\'''\n\n\ndef extract_name(path):\n    special_chars = re.compile(r'[-\\\\?\\'\".]')\n    return special_chars.sub('_', os.path.splitext(os.path.basename(path))[0])\n\n\ndef reduce_code(code):\n    code = re.sub(r\"/\\*.*?\\*/\", \"\", code, flags=re.DOTALL)  # remove all occurance streamed comments\n    code = re.sub(r\"//.*?\\n\", \"\", code)  # remove all occurance singleline comments\n    code = re.sub('\\n+', '\\n', re.sub('\\n +', '\\n', code))  # remove white spaces\n    return code\n\n\ndef js_to_native_code(path, name, build_type):\n    with open(path, 'r') as js_source:\n        code = js_source.read()\n\n    if build_type != 'debug':\n        code = reduce_code(code)\n\n    data = format_code(code, 1, 2)\n\n    native_code = \"\"\"const static char {0}_n[] = \"{0}\";\nconst static char {0}_s[] =\n{{\n{1}\n}};\nconst static int {0}_l = {2};\n\"\"\".format(name, data, len(code))\n\n    return native_code\n\n\ndef main():\n    parser = argparse.ArgumentParser(description=\"js2c\")\n    parser.add_argument('--build-type', help='build type', default='release', choices=['release', 'debug'])\n    parser.add_argument('--ignore', help='files to ignore', dest='ignore_files', default=[], action='append')\n    parser.add_argument('--no-main',\n                        help=\"don't require a 'main.js' file\",\n                        dest='main',\n                        action='store_false',\n                        default=True)\n    parser.add_argument('--js-source',\n                        dest='js_source_path',\n                        default='./js',\n                        help='Source directory of JavaScript files\" (default: %(default)s)')\n    parser.add_argument('--dest',\n                        dest='output_path',\n                        default='./source',\n                        help=\"Destination directory of 'jerry-targetjs.h' (default: %(default)s)\")\n\n    script_args = parser.parse_args()\n\n    gen_line = \"/* This file is generated by %s. Please do not modify. */\" % os.path.basename(__file__)\n\n    gen_output = [LICENSE, \"\", gen_line, \"\", HEADER]\n    gen_structs = [NATIVE_STRUCT]\n\n    if script_args.main:\n        gen_structs.append('  {{ {0}_n, {0}_s, {0}_l }}, \\\\'.format(\"main\"))\n\n    files = glob.glob(os.path.join(script_args.js_source_path, '*.js'))\n\n    for path in files:\n        if os.path.basename(path) not in script_args.ignore_files:\n            name = extract_name(path)\n            gen_output.append(js_to_native_code(path, name, script_args.build_type))\n            if name != 'main':\n                gen_structs.append('  {{ {0}_n, {0}_s, {0}_l }}, \\\\'.format(name))\n\n    gen_structs.append('  { NULL, NULL, 0 } \\\\\\n};')\n\n    gen_output.append(\"\\n\".join(gen_structs))\n    gen_output.append(FOOTER)\n\n    with open(os.path.join(script_args.output_path, 'jerry-targetjs.h'), 'w') as gen_file:\n        gen_file.write(\"\\n\".join(gen_output))\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/mem-stats-measure.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nJERRY=$1\nTEST=$2\n\nMEM_PEAK=`$JERRY $TEST --mem-stats | grep \"Peak allocated =\" | awk '{print $4}'`\n\necho $MEM_PEAK\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/perf.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nITERS=\"$1\"\nENGINE=\"$2\"\nBENCHMARK=\"$3\"\nPRINT_MIN=\"$4\"\nOS=`uname -s | tr [:upper:] [:lower:]`\n\nif [ \"$OS\" == \"darwin\" ]\nthen\n  time_regexp='s/user[ \t]*\\([0-9]*\\)m\\([0-9.]*\\)s/\\1 \\2/g'\nelse\n  time_regexp='s/user[ \\t]*\\([0-9]*\\)m\\([0-9.]*\\)s/\\1 \\2/g'\nfi\n\nperf_values=$( (( for i in `seq 1 1 $ITERS`; do time $ENGINE \"$BENCHMARK\"; if [ $? -ne 0 ]; then exit 1; fi; done ) 2>&1 ) | \\\n               grep user | \\\n               sed \"$time_regexp\" | \\\n               awk '{ print ($1 * 60 + $2); }';\n               if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi; );\n\nif [ \"$PRINT_MIN\" == \"-min\" ]\nthen\n  perf_values=$( echo \"$perf_values\" | \\\n                 awk \"BEGIN {\n                        min_v = -1;\n                      }\n                      {\n                        if (min_v == -1 || $1 < min_v) {\n                          min_v = $1;\n                        }\n                      }\n                      END {\n                        print min_v\n                      }\" || exit 1;\n               );\n  calc_status=$?\nelse\n  perf_values=$( echo \"$perf_values\" | \\\n                 awk \"BEGIN {\n                        n = 0\n                      }\n                      {\n                        n++\n                        a[n] = \\$1\n                      }\n                      END {\n                        #\n                        # Values of 99% quantiles of two-sided t-distribution for given number of degrees of freedom\n                        #\n                        t_gamma_n_m1 [1]  = 63.657\n                        t_gamma_n_m1 [2]  = 9.9248\n                        t_gamma_n_m1 [3]  = 5.8409\n                        t_gamma_n_m1 [4]  = 4.6041\n                        t_gamma_n_m1 [5]  = 4.0321\n                        t_gamma_n_m1 [6]  = 3.7074\n                        t_gamma_n_m1 [7]  = 3.4995\n                        t_gamma_n_m1 [8]  = 3.3554\n                        t_gamma_n_m1 [9]  = 3.2498\n                        t_gamma_n_m1 [10] = 3.1693\n                        t_gamma_n_m1 [11] = 3.1058\n                        t_gamma_n_m1 [12] = 3.0545\n                        t_gamma_n_m1 [13] = 3.0123\n                        t_gamma_n_m1 [14] = 2.9768\n                        t_gamma_n_m1 [15] = 2.9467\n                        t_gamma_n_m1 [16] = 2.9208\n                        t_gamma_n_m1 [17] = 2.8982\n                        t_gamma_n_m1 [18] = 2.8784\n                        t_gamma_n_m1 [19] = 2.8609\n                        t_gamma_n_m1 [20] = 2.8453\n                        t_gamma_n_m1 [21] = 2.8314\n                        t_gamma_n_m1 [22] = 2.8188\n                        t_gamma_n_m1 [23] = 2.8073\n                        t_gamma_n_m1 [24] = 2.7969\n                        t_gamma_n_m1 [25] = 2.7874\n                        t_gamma_n_m1 [26] = 2.7787\n                        t_gamma_n_m1 [27] = 2.7707\n                        t_gamma_n_m1 [28] = 2.7633\n                        t_gamma_n_m1 [29] = 2.7564\n                        t_gamma_n_m1 [30] = 2.75\n                        t_gamma_n_m1 [31] = 2.744\n                        t_gamma_n_m1 [32] = 2.7385\n                        t_gamma_n_m1 [33] = 2.7333\n                        t_gamma_n_m1 [34] = 2.7284\n                        t_gamma_n_m1 [35] = 2.7238\n                        t_gamma_n_m1 [36] = 2.7195\n                        t_gamma_n_m1 [37] = 2.7154\n                        t_gamma_n_m1 [38] = 2.7116\n                        t_gamma_n_m1 [39] = 2.7079\n                        t_gamma_n_m1 [40] = 2.7045\n                        t_gamma_n_m1 [41] = 2.7012\n                        t_gamma_n_m1 [42] = 2.6981\n                        t_gamma_n_m1 [43] = 2.6951\n                        t_gamma_n_m1 [44] = 2.6923\n                        t_gamma_n_m1 [45] = 2.6896\n                        t_gamma_n_m1 [46] = 2.687\n                        t_gamma_n_m1 [47] = 2.6846\n                        t_gamma_n_m1 [48] = 2.6822\n                        t_gamma_n_m1 [49] = 2.68\n                        t_gamma_n_m1 [50] = 2.6778\n\n                        #\n                        # Sort array of measurements\n                        #\n                        for (i = 2; i <= n; i++) {\n                          j = i\n                          k = a [j]\n                          while (j > 1 && a [j - 1] > k) {\n                            a [j] = a [j - 1]\n                            j--\n                          }\n                          a [j] = k\n                        }\n\n                        #\n                        # Remove 20% of lowest and 20% of highest values\n                        #\n                        n_20_percent = int (n / 5)\n\n                        for (i = 1; i <= n_20_percent; i++) {\n                          delete a[n]\n                          n--\n                        }\n\n                        for (i = 1; i <= n - n_20_percent; i++) {\n                          a[i] = a[i + n_20_percent]\n                        }\n\n                        n -= n_20_percent\n\n                        #\n                        # Calculate average\n                        #\n                        sum = 0\n                        for (i = 1; i <= n; i++) {\n                          sum += a[i]\n                        }\n\n                        avg = sum / n\n\n                        if (n > 1) {\n                          if (n - 1 <= 50) {\n                            t_coef = t_gamma_n_m1 [n - 1]\n                          } else {\n                            # For greater degrees of freedom, values of corresponding quantiles\n                            # are insignificantly less than the value.\n                            #\n                            # For example, the value for infinite number of freedoms is 2.5758\n                            #\n                            # So, to reduce table size, we take this, greater value,\n                            # overestimating inaccuracy for no more than 4%.\n                            #\n                            t_coef = t_gamma_n_m1 [50]\n                          }\n\n                          #\n                          # Calculate inaccuracy estimation\n                          #\n                          sum_delta_squares = 0\n                          for (i = 1; i <= n; i++) {\n                            sum_delta_squares += (avg - a[i]) ^ 2\n                          }\n\n                          delta = t_coef * sqrt (sum_delta_squares / (n * (n - 1)))\n\n                          print avg, delta\n                        } else {\n                          print avg\n                        }\n                      }\n                      \" || exit 1;\n               );\n  calc_status=$?\nfi\n\necho \"$perf_values\"\n\nif [ $? -ne 0 ];\nthen\n  exit 1;\nfi;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/pylint/pylintrc",
    "content": "[MASTER]\n\n# Specify a configuration file.\n#rcfile=\n\n# Python code to execute, usually for sys.path manipulation such as\n# pygtk.require().\n#init-hook=\n\n# Add files or directories to the blacklist. They should be base names, not\n# paths.\nignore=CVS\n\n# Pickle collected data for later comparisons.\npersistent=yes\n\n# List of plugins (as comma separated values of python modules names) to load,\n# usually to register additional checkers.\nload-plugins=\n\n# Use multiple processes to speed up Pylint.\njobs=1\n\n# Allow loading of arbitrary C extensions. Extensions are imported into the\n# active Python interpreter and may run arbitrary code.\nunsafe-load-any-extension=no\n\n# A comma-separated list of package or module names from where C extensions may\n# be loaded. Extensions are loading into the active Python interpreter and may\n# run arbitrary code\nextension-pkg-whitelist=\n\n# Allow optimization of some AST trees. This will activate a peephole AST\n# optimizer, which will apply various small optimizations. For instance, it can\n# be used to obtain the result of joining multiple strings with the addition\n# operator. Joining a lot of strings can lead to a maximum recursion error in\n# Pylint and this flag can prevent that. It has one side effect, the resulting\n# AST will be different than the one from reality.\noptimize-ast=no\n\n\n[MESSAGES CONTROL]\n\n# Only show warnings with the listed confidence levels. Leave empty to show\n# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED\nconfidence=\n\n# Enable the message, report, category or checker with the given id(s). You can\n# either give multiple identifier separated by comma (,) or put this option\n# multiple time. See also the \"--disable\" option for examples.\n#enable=\n\n# Disable the message, report, category or checker with the given id(s). You\n# can either give multiple identifiers separated by comma (,) or put this\n# option multiple times (only on the command line, not in the configuration\n# file where it should appear only once).You can also use \"--disable=all\" to\n# disable everything first and then reenable specific checks. For example, if\n# you want to run only the similarities checker, you can use \"--disable=all\n# --enable=similarities\". If you want to run only the classes checker, but have\n# no Warning level messages displayed, use\"--disable=all --enable=classes\n# --disable=W\"\ndisable=import-star-module-level,old-octal-literal,oct-method,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,missing-docstring,locally-disabled\n\n\n[REPORTS]\n\n# Set the output format. Available formats are text, parseable, colorized, msvs\n# (visual studio) and html. You can also give a reporter class, eg\n# mypackage.mymodule.MyReporterClass.\noutput-format=text\n\n# Put messages in a separate file for each module / package specified on the\n# command line instead of printing them on stdout. Reports (if any) will be\n# written in a file name \"pylint_global.[txt|html]\".\nfiles-output=no\n\n# Tells whether to display a full report or only the messages\nreports=no\n\n# Python expression which should return a note less than 10 (10 is the highest\n# note). You have access to the variables errors warning, statement which\n# respectively contain the number of errors / warnings messages and the total\n# number of statements analyzed. This is used by the global evaluation report\n# (RP0004).\nevaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)\n\n# Template used to display messages. This is a python new-style format string\n# used to format the message information. See doc for all details\n#msg-template=\n\n\n[TYPECHECK]\n\n# Tells whether missing members accessed in mixin class should be ignored. A\n# mixin class is detected if its name ends with \"mixin\" (case insensitive).\nignore-mixin-members=yes\n\n# List of module names for which member attributes should not be checked\n# (useful for modules/projects where namespaces are manipulated during runtime\n# and thus existing member attributes cannot be deduced by static analysis. It\n# supports qualified module names, as well as Unix pattern matching.\nignored-modules=\n\n# List of classes names for which member attributes should not be checked\n# (useful for classes with attributes dynamically set). This supports can work\n# with qualified names.\nignored-classes=\n\n# List of members which are set dynamically and missed by pylint inference\n# system, and so shouldn't trigger E1101 when accessed. Python regular\n# expressions are accepted.\ngenerated-members=\n\n\n[FORMAT]\n\n# Maximum number of characters on a single line.\nmax-line-length=120\n\n# Regexp for a line that is allowed to be longer than the limit.\nignore-long-lines=^\\s*(# )?<?https?://\\S+>?$\n\n# Allow the body of an if to be on the same line as the test if there is no\n# else.\nsingle-line-if-stmt=no\n\n# List of optional constructs for which whitespace checking is disabled. `dict-\n# separator` is used to allow tabulation in dicts, etc.: {1  : 1,\\n222: 2}.\n# `trailing-comma` allows a space between comma and closing bracket: (a, ).\n# `empty-line` allows space-only lines.\nno-space-check=trailing-comma,dict-separator\n\n# Maximum number of lines in a module\nmax-module-lines=2000\n\n# String used as indentation unit. This is usually \"    \" (4 spaces) or \"\\t\" (1\n# tab).\nindent-string='    '\n\n# Number of spaces of indent required inside a hanging  or continued line.\nindent-after-paren=4\n\n# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.\nexpected-line-ending-format=\n\n\n[MISCELLANEOUS]\n\n# List of note tags to take in consideration, separated by a comma.\nnotes=FIXME,XXX,TODO\n\n\n[SPELLING]\n\n# Spelling dictionary name. Available dictionaries: none. To make it working\n# install python-enchant package.\nspelling-dict=\n\n# List of comma separated words that should not be checked.\nspelling-ignore-words=\n\n# A path to a file that contains private dictionary; one word per line.\nspelling-private-dict-file=\n\n# Tells whether to store unknown words to indicated private dictionary in\n# --spelling-private-dict-file option instead of raising a message.\nspelling-store-unknown-words=no\n\n\n[VARIABLES]\n\n# Tells whether we should check for unused import in __init__ files.\ninit-import=no\n\n# A regular expression matching the name of dummy variables (i.e. expectedly\n# not used).\ndummy-variables-rgx=_$|dummy\n\n# List of additional names supposed to be defined in builtins. Remember that\n# you should avoid to define new builtins when possible.\nadditional-builtins=\n\n# List of strings which can identify a callback function by name. A callback\n# name must start or end with one of those strings.\ncallbacks=cb_,_cb\n\n\n[BASIC]\n\n# List of builtins function names that should not be used, separated by a comma\nbad-functions=map,filter,input\n\n# Good variable names which should always be accepted, separated by a comma\ngood-names=i,j,k,ex,Run,_\n\n# Bad variable names which should always be refused, separated by a comma\nbad-names=foo,bar,baz,toto,tutu,tata\n\n# Colon-delimited sets of names that determine each other's naming style when\n# the name regexes allow several styles.\nname-group=\n\n# Include a hint for the correct naming format with invalid-name\ninclude-naming-hint=no\n\n# Regular expression matching correct function names\nfunction-rgx=[a-z_][a-z0-9_]{2,30}$\n\n# Naming hint for function names\nfunction-name-hint=[a-z_][a-z0-9_]{2,30}$\n\n# Regular expression matching correct variable names\nvariable-rgx=[a-z_][a-z0-9_]{2,30}$\n\n# Naming hint for variable names\nvariable-name-hint=[a-z_][a-z0-9_]{2,30}$\n\n# Regular expression matching correct constant names\nconst-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$\n\n# Naming hint for constant names\nconst-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$\n\n# Regular expression matching correct attribute names\nattr-rgx=[a-z_][a-z0-9_]{2,30}$\n\n# Naming hint for attribute names\nattr-name-hint=[a-z_][a-z0-9_]{2,30}$\n\n# Regular expression matching correct argument names\nargument-rgx=[a-z_][a-z0-9_]{2,30}$\n\n# Naming hint for argument names\nargument-name-hint=[a-z_][a-z0-9_]{2,30}$\n\n# Regular expression matching correct class attribute names\nclass-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$\n\n# Naming hint for class attribute names\nclass-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$\n\n# Regular expression matching correct inline iteration names\ninlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$\n\n# Naming hint for inline iteration names\ninlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$\n\n# Regular expression matching correct class names\nclass-rgx=[A-Z_][a-zA-Z0-9]+$\n\n# Naming hint for class names\nclass-name-hint=[A-Z_][a-zA-Z0-9]+$\n\n# Regular expression matching correct module names\nmodule-rgx=(([a-z_][a-z0-9_-]*)|([A-Z][a-zA-Z0-9]+))$\n\n# Naming hint for module names\nmodule-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$\n\n# Regular expression matching correct method names\nmethod-rgx=[a-z_][a-z0-9_]{2,30}$\n\n# Naming hint for method names\nmethod-name-hint=[a-z_][a-z0-9_]{2,30}$\n\n# Regular expression which should only match function or class names that do\n# not require a docstring.\nno-docstring-rgx=^_\n\n# Minimum line length for functions/classes that require docstrings, shorter\n# ones are exempt.\ndocstring-min-length=-1\n\n\n[ELIF]\n\n# Maximum number of nested blocks for function / method body\nmax-nested-blocks=7\n\n\n[LOGGING]\n\n# Logging modules to check that the string format arguments are in logging\n# function parameter format\nlogging-modules=logging\n\n\n[SIMILARITIES]\n\n# Minimum lines number of a similarity.\nmin-similarity-lines=4\n\n# Ignore comments when computing similarities.\nignore-comments=yes\n\n# Ignore docstrings when computing similarities.\nignore-docstrings=yes\n\n# Ignore imports when computing similarities.\nignore-imports=no\n\n\n[DESIGN]\n\n# Maximum number of arguments for function / method\nmax-args=10\n\n# Argument names that match this expression will be ignored. Default to name\n# with leading underscore\nignored-argument-names=_.*\n\n# Maximum number of locals for function / method body\nmax-locals=20\n\n# Maximum number of return / yield for function / method body\nmax-returns=6\n\n# Maximum number of branch for function / method body\nmax-branches=25\n\n# Maximum number of statements in function / method body\nmax-statements=75\n\n# Maximum number of parents for a class (see R0901).\nmax-parents=7\n\n# Maximum number of attributes for a class (see R0902).\nmax-attributes=10\n\n# Minimum number of public methods for a class (see R0903).\nmin-public-methods=0\n\n# Maximum number of public methods for a class (see R0904).\nmax-public-methods=25\n\n# Maximum number of boolean expressions in a if statement\nmax-bool-expr=5\n\n\n[IMPORTS]\n\n# Deprecated modules which should not be used, separated by a comma\ndeprecated-modules=regsub,TERMIOS,Bastion,rexec\n\n# Create a graph of every (i.e. internal and external) dependencies in the\n# given file (report RP0402 must not be disabled)\nimport-graph=\n\n# Create a graph of external dependencies in the given file (report RP0402 must\n# not be disabled)\next-import-graph=\n\n# Create a graph of internal dependencies in the given file (report RP0402 must\n# not be disabled)\nint-import-graph=\n\n\n[CLASSES]\n\n# List of method names used to declare (i.e. assign) instance attributes.\ndefining-attr-methods=__init__,__new__,setUp\n\n# List of valid names for the first argument in a class method.\nvalid-classmethod-first-arg=cls\n\n# List of valid names for the first argument in a metaclass class method.\nvalid-metaclass-classmethod-first-arg=mcs\n\n# List of member names, which should be excluded from the protected access\n# warning.\nexclude-protected=_asdict,_fields,_replace,_source,_make\n\n\n[EXCEPTIONS]\n\n# Exceptions that will emit a warning when being caught. Defaults to\n# \"Exception\"\novergeneral-exceptions=Exception\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/rss-measure.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nJERRY=$1\nTEST=$2\nSLEEP=0.1\nOS=`uname -s | tr [:upper:] [:lower:]`\n\nRss_OUT=\"\"\n\nfunction collect_entry()\n{\n  OUT_NAME=\"$1_OUT\";\n  OUT=$OUT_NAME;\n\n  if [ \"$OS\" == \"darwin\" ]\n  then\n    SUM=`ps -o rss $PID | grep [0-9]`\n  else\n    SUM=$(grep -o -e \"^[0-9a-f][0-9a-f]*.*\" -e \"^Rss.*\" /proc/$PID/smaps 2>/dev/null | grep -A 1 -- \"r[w-]-p \" | grep \"^Rss\"|awk '{s += $2;} END {print s;}')\n  fi;\n\n  if [ \"$SUM\" != \"\" ];\n  then\n    eval \"$OUT=\\\"\\$$OUT $SUM\\\\n\\\"\";\n  fi;\n}\n\nfunction print_entry()\n{\n  OUT_NAME=\"$1_OUT\";\n  OUT=$OUT_NAME;\n\n  eval \"echo -e \\\"\\$$OUT\\\"\" | awk -v entry=\"$1\" '{ if ($1 != \"\") { n += 1; if ($1 > max) { max = $1; } } } END { if (n == 0) { exit; }; printf \"%d\\n\",  max; }';\n}\n\nfunction run_test()\n{\n  $JERRY $TEST &\n  PID=$!\n\n  while kill -0 \"$PID\" > /dev/null 2>&1;\n  do\n    collect_entry Rss\n\n    sleep $SLEEP\n  done\n\n  wait \"$PID\" || exit 1\n}\n\nrun_test\n\nprint_entry Rss\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/run-mem-stats-test.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Choosing table or semicolon-separated output mode\nif [ \"$1\" == \"-d\" ]\nthen\n  TABLE=\"no\"\n  PRINT_TEST_NAME_AWK_SCRIPT='{printf \"%s;\", $1}'\n  PRINT_TOTAL_AWK_SCRIPT='{printf \"%d;%d;%d\\n\", $1, $2, $3 * 1024}'\n\n  shift\nelse\n  PRINT_TEST_NAME_AWK_SCRIPT='{printf \"%30s\", $1}'\n  PRINT_TOTAL_AWK_SCRIPT='{printf \"%25d%25d%25d\\n\", $1, $2, $3 * 1024}'\n  TABLE=\"yes\"\nfi\n\nfunction fail_msg\n{\n  echo \"$1\"\n  exit 1\n}\n\n# Engine\n\n# Check if the specified build supports memory statistics options\nfunction is_mem_stats_build\n{\n  [ -x \"$1\" ] || fail_msg \"Engine '$1' is not executable\"\n\n  tmpfile=`mktemp`\n  \"$1\" --mem-stats $tmpfile 2>&1 | grep -- \"Ignoring JERRY_INIT_MEM_STATS flag because of !JMEM_STATS configuration.\" 2>&1 > /dev/null\n  code=$?\n  rm $tmpfile\n\n  return $code\n}\n\nJERRY=\"$1\"\nshift\nis_mem_stats_build \"$JERRY\" || fail_msg \"First engine specified should be built without memory statistics support\"\n\nJERRY_MEM_STATS=\"$1\"\nshift\nis_mem_stats_build \"$JERRY_MEM_STATS\" && fail_msg \"Second engine specified should be built with memory statistics support\"\n\n# Benchmarks list\nBENCHMARKS=\"\"\n\nwhile [ $# -ne 0 ]\ndo\n  BENCHMARKS=\"$BENCHMARKS $1\"\n  shift\ndone\n\n# Running\nif [ \"$TABLE\" == \"yes\" ]\nthen\n  awk 'BEGIN {printf \"%30s%25s%25s%25s\\n\", \"Test name\", \"Peak Heap (parser)\", \"Peak Heap (execution)\", \"Maximum RSS\"}'\n  echo\nfi\n\nfor bench in $BENCHMARKS\ndo\n  test=`basename $bench .js`\n\n  echo \"$test\" | awk \"$PRINT_TEST_NAME_AWK_SCRIPT\"\n  MEM_STATS=$(\"$JERRY_MEM_STATS\" --mem-stats --mem-stats-separate $bench | grep -e \"Peak allocated =\" | grep -o \"[0-9]*\")\n  RSS=$(./tools/rss-measure.sh \"$JERRY\" $bench | tail -n 1 | grep -o \"[0-9]*\")\n  echo $MEM_STATS $RSS | xargs | awk \"$PRINT_TOTAL_AWK_SCRIPT\"\ndone\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/run-perf-test.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ntrap \"exit 2\" INT\n\nfunction pr_err() {\n  echo -e \"\\e[91mError: $@\\e[39m\"\n}\n\nfunction exit_err() {\n  pr_err $@\n\n  exit 1\n}\n\n# Check if the specified build supports memory statistics options\nfunction is_mem_stats_build() {\n  [ -x \"$1\" ] || fail_msg \"Engine '$1' is not executable\"\n\n  tmpfile=`mktemp`\n  \"$1\" --mem-stats $tmpfile 2>&1 | grep -- \"Ignoring JERRY_INIT_MEM_STATS flag because of !JMEM_STATS configuration.\" 2>&1 > /dev/null\n  code=$?\n  rm $tmpfile\n\n  return $code\n}\n\nUSAGE=\"Usage:\\n    tools/run-perf-test.sh OLD_ENGINE NEW_ENGINE REPEATS TIMEOUT BENCH_FOLDER [-m result-file-name.md]\"\n\nif [ \"$#\" -lt 5 ]\nthen\n  echo -e \"${USAGE}\"\n  exit_err \"Argument number mismatch...\"\nfi\n\nENGINE_OLD=\"$1\"\nENGINE_NEW=\"$2\"\nREPEATS=\"$3\"\nTIMEOUT=\"$4\"\nBENCH_FOLDER=\"$5\"\nOUTPUT_FORMAT=\"$6\"\nOUTPUT_FILE=\"$7\"\n\nif [ \"$#\" -gt 5 ]\nthen\n  if [ \"${OUTPUT_FORMAT}\" != \"-m\" ]\n  then\n    exit_err \"Please, use '-m result-file-name.md' as last arguments\"\n  fi\n  if [ -z \"${OUTPUT_FILE}\" ]\n  then\n    exit_err \"Missing md file name. Please, define the filename. Ex.: '-m result-file-name.md'\"\n  fi\n\n  rm -rf \"${OUTPUT_FILE}\"\nfi\n\nif [ \"${REPEATS}\" -lt 1 ]\nthen\n  exit_err \"REPEATS must be greater than 0\"\nfi\n\nif [ \"${TIMEOUT}\" -lt 1 ]\nthen\n  exit_err \"TIMEOUT must be greater than 0\"\nfi\n\nperf_n=0\nmem_n=0\n\nperf_rel_mult=1.0\nperf_rel_inaccuracy_tmp=0\nmem_rel_mult=1.0\nmem_rel_inaccuracy_tmp=\"-1\"\n\n# Unicode \"figure space\" character\nFIGURE_SPACE=$(echo -e -n \"\\xE2\\x80\\x87\")\n\n# Unicode \"approximately equal\" character\nAPPROXIMATELY_EQUAL=$(echo -n -e \"\\xE2\\x89\\x88\")\n\nfunction run-compare()\n{\n  COMMAND=$1\n  PRE=$2\n  TEST=$3\n  PRECISION=$4\n  UNIT=$5\n\n  ABS_FP_FMT=\"%$((PRECISION + 4)).$((PRECISION))f$UNIT\"\n  REL_FP_FMT=\"%0.3f\"\n  REL_SHOW_PLUS_SIGN_FP_FMT=\"%+0.3f\"\n\n  OLD=$(timeout \"${TIMEOUT}\" ${COMMAND} \"${ENGINE_OLD}\" \"${TEST}\") || return 1\n  NEW=$(timeout \"${TIMEOUT}\" ${COMMAND} \"${ENGINE_NEW}\" \"${TEST}\") || return 1\n\n  #check result\n  ! $OLD || ! $NEW || return 1\n\n  OLD_value=$(echo \"$OLD \" | cut -d ' ' -f 1)\n  OLD_inaccuracy=$(echo \"$OLD \" | cut -d ' ' -f 2)\n\n  NEW_value=$(echo \"$NEW \" | cut -d ' ' -f 1)\n  NEW_inaccuracy=$(echo \"$NEW \" | cut -d ' ' -f 2)\n\n  #calc relative speedup\n  eval \"rel_mult=\\$${PRE}_rel_mult\"\n\n  rel=$(echo \"${OLD_value}\" \"${NEW_value}\" | awk '{ print $2 / $1; }')\n\n  #increment n\n  ((${PRE}_n++))\n\n  #calc percent to display\n  PERCENT=$(echo \"$rel\" | awk '{print (1.0 - $1) * 100; }')\n\n  if [[ \"$OLD_inaccuracy\" != \"\" && \"$NEW_inaccuracy\" != \"\" ]]\n  then\n    DIFF=$(printf \"$ABS_FP_FMT -> $ABS_FP_FMT\" $OLD_value $NEW_value)\n    rel_inaccuracy=$(echo \"$OLD_value $OLD_inaccuracy $NEW_value $NEW_inaccuracy\" | \\\n                     awk \"{\n                            OLD_value=\\$1\n                            OLD_inaccuracy=\\$2\n                            NEW_value=\\$3\n                            NEW_inaccuracy=\\$4\n\n                            rel_inaccuracy = (NEW_value / OLD_value) * sqrt ((OLD_inaccuracy / OLD_value) ^ 2 + (NEW_inaccuracy / NEW_value) ^ 2)\n                            if (rel_inaccuracy < 0) {\n                              rel_inaccuracy = -rel_inaccuracy\n                            }\n\n                            print rel_inaccuracy\n                          }\")\n    PERCENT_inaccuracy=$(echo \"$rel_inaccuracy\" | awk '{ print $1 * 100.0 }')\n\n    ext=$(echo \"$PERCENT $PERCENT_inaccuracy\" | \\\n                awk \"{\n                       PERCENT=\\$1\n                       PERCENT_inaccuracy=\\$2\n\n                       if (PERCENT > 0.0 && PERCENT > PERCENT_inaccuracy) {\n                         print \\\"[+]\\\"\n                       } else if (PERCENT < 0 && -PERCENT > PERCENT_inaccuracy) {\n                         print \\\"[-]\\\"\n                       } else {\n                         print \\\"[$APPROXIMATELY_EQUAL]\\\"\n                       }\n                     }\")\n\n    if [[ $rel_inaccuracy_tmp -lt 0 ]]\n    then\n      return 1\n    fi\n\n    eval \"rel_inaccuracy_tmp=\\$${PRE}_rel_inaccuracy_tmp\"\n\n    rel_inaccuracy_tmp=$(echo \"$rel $rel_inaccuracy $rel_inaccuracy_tmp\" | \\\n                         awk \"{\n                                rel=\\$1\n                                rel_inaccuracy=\\$2\n                                rel_inaccuracy_tmp=\\$3\n                                print rel_inaccuracy_tmp + (rel_inaccuracy / rel) ^ 2\n                              }\")\n\n    eval \"${PRE}_rel_inaccuracy_tmp=\\$rel_inaccuracy_tmp\"\n\n    PERCENT=$(printf \"%8s %11s\" $(printf \"$REL_SHOW_PLUS_SIGN_FP_FMT%%\" $PERCENT) $(printf \"(+-$REL_FP_FMT%%)\" $PERCENT_inaccuracy))\n    PERCENT=\"$PERCENT : $ext\"\n\n    if [ \"${OUTPUT_FORMAT}\" == \"-m\" ]\n    then\n      WIDTH=42\n      MD_DIFF=$(printf \"%s%s\" \"$DIFF\" \"$(printf \"%$(($WIDTH - ${#DIFF}))s\")\")\n      MD_PERCENT=$(printf \"%s%s\" \"$(printf \"%$(($WIDTH - ${#PERCENT}))s\")\" \"$PERCENT\")\n\n      MD_FORMAT=\"\\`%s\\`<br>\\`%s\\`\"\n    fi\n\n    CONSOLE_FORMAT=\"%20s : %19s\"\n  else\n    ext=\"\"\n\n    if [[ \"$OLD_inaccuracy\" != \"\" || \"$NEW_inaccuracy\" != \"\" ]]\n    then\n      return 1;\n    fi\n\n    DIFF=$(printf \"$ABS_FP_FMT -> $ABS_FP_FMT\" $OLD_value $NEW_value)\n    PERCENT=$(printf \"$REL_SHOW_PLUS_SIGN_FP_FMT%%\" $PERCENT)\n\n    if [ \"${OUTPUT_FORMAT}\" == \"-m\" ]\n    then\n      WIDTH=20\n      MD_DIFF=$(printf \"%s%s\" \"$DIFF\" \"$(printf \"%$(($WIDTH - ${#DIFF}))s\")\")\n      MD_PERCENT=$(printf \"%s%s\" \"$(printf \"%$(($WIDTH - ${#PERCENT}))s\")\" \"$PERCENT\")\n\n      MD_FORMAT=\"\\`%s\\`<br>\\`%s\\`\"\n    fi\n\n    CONSOLE_FORMAT=\"%14s : %8s\"\n  fi\n\n  rel_mult=$(echo \"$rel_mult\" \"$rel\" | awk '{print $1 * $2;}')\n\n  eval \"${PRE}_rel_mult=\\$rel_mult\"\n\n  if [ \"${OUTPUT_FORMAT}\" == \"-m\" ]\n  then\n    printf \"$MD_FORMAT\" \"$MD_DIFF\" \"$MD_PERCENT\" | sed \"s/ /$FIGURE_SPACE/g\" >> \"${OUTPUT_FILE}\"\n  fi\n\n  printf \"$CONSOLE_FORMAT\" \"$DIFF\" \"$PERCENT\"\n}\n\nfunction run-test()\n{\n  TEST=$1\n\n  # print only filename\n  if [ \"${OUTPUT_FORMAT}\" == \"-m\" ]\n  then\n    printf \"%s | \" \"${TEST##*/}\" >> \"${OUTPUT_FILE}\"\n  fi\n\n  printf \"%50s | \" \"${TEST##*/}\"\n\n  if [ \"$IS_MEM_STAT\" -ne 0 ]\n  then\n    run-compare \"./tools/mem-stats-measure.sh\"      \"mem\"   \"${TEST}\" 0   || return 1\n  else\n    run-compare \"./tools/rss-measure.sh\"      \"mem\"   \"${TEST}\" 0 k || return 1\n  fi\n\n  if [ \"${OUTPUT_FORMAT}\" == \"-m\" ]\n  then\n    printf \" | \" >> \"${OUTPUT_FILE}\"\n  fi\n\n  printf \" | \"\n  run-compare \"./tools/perf.sh ${REPEATS}\"  \"perf\"  \"${TEST}\" 3 s || return 1\n\n  if [ \"${OUTPUT_FORMAT}\" == \"-m\" ]\n  then\n    printf \"\\n\" >> \"${OUTPUT_FILE}\"\n  fi\n\n  printf \"\\n\"\n}\n\nfunction run-suite()\n{\n  FOLDER=$1\n\n  for BENCHMARK in ${FOLDER}/*.js\n  do\n    run-test \"${BENCHMARK}\" 2> /dev/null || printf \"<FAILED>\\n\" \"${BENCHMARK}\";\n  done\n}\n\ndate\n\nis_mem_stats_build \"${ENGINE_OLD}\" || is_mem_stats_build \"${ENGINE_NEW}\"\nIS_MEM_STAT=$?\n\nif [ \"${OUTPUT_FORMAT}\" == \"-m\" ]\nthen\n  if [ \"$IS_MEM_STAT\" -ne 0 ]\n  then\n    echo \"Benchmark | Peak alloc.<br>(+ is better) | Perf<br>(+ is better)\" >> \"${OUTPUT_FILE}\"\n  else\n    echo \"Benchmark | RSS<br>(+ is better) | Perf<br>(+ is better)\" >> \"${OUTPUT_FILE}\"\n  fi\n  echo \"---------: | --------- | ---------\" >> \"${OUTPUT_FILE}\"\nfi\n\nif [ \"$IS_MEM_STAT\" -ne 0 ]\nthen\n  printf \"%50s | %25s | %35s\\n\" \"Benchmark\" \"Peak alloc.(+ is better)\" \"Perf(+ is better)\"\nelse\n  printf \"%50s | %25s | %35s\\n\" \"Benchmark\" \"RSS(+ is better)\" \"Perf(+ is better)\"\nfi\n\nrun-suite \"${BENCH_FOLDER}\"\n\nmem_rel_gmean=$(echo \"$mem_rel_mult\" \"$mem_n\" | awk '{print $1 ^ (1.0 / $2);}')\nmem_percent_gmean=$(echo \"$mem_rel_gmean\" | awk '{print (1.0 - $1) * 100;}')\nif [[ $mem_rel_inaccuracy_tmp != \"-1\" ]]\nthen\n  exit_err \"Incorrect inaccuracy calculation for memory consumption geometric mean\"\nfi\n\nperf_rel_gmean=$(echo \"$perf_rel_mult\" \"$perf_n\" | awk '{print $1 ^ (1.0 / $2);}')\nperf_percent_gmean=$(echo \"$perf_rel_gmean\" | awk '{print (1.0 - $1) * 100;}')\nif [[ \"$perf_rel_inaccuracy_tmp\" == \"-1\" ]]\nthen\n  exit_err \"Incorrect inaccuracy calculation for performance geometric mean\"\nelse\n  perf_percent_inaccuracy=$(echo \"$perf_rel_gmean $perf_rel_inaccuracy_tmp $perf_n\" | \\\n                            awk \"{\n                                   perf_rel_gmean=\\$1\n                                   perf_rel_inaccuracy_tmp=\\$2\n                                   perf_n=\\$3\n\n                                   print 100.0 * (perf_rel_gmean ^ (1.0 / perf_n) * sqrt (perf_rel_inaccuracy_tmp) / perf_n)\n                                 }\")\n  perf_ext=$(echo \"$perf_percent_gmean $perf_percent_inaccuracy\" | \\\n             awk \"{\n                    perf_percent_gmean=\\$1\n                    perf_percent_inaccuracy=\\$2\n\n                    if (perf_percent_gmean > 0.0 && perf_percent_gmean > perf_percent_inaccuracy) {\n                      print \\\"[+]\\\"\n                    } else if (perf_percent_gmean < 0 && -perf_percent_gmean > perf_percent_inaccuracy) {\n                      print \\\"[-]\\\"\n                    } else {\n                      print \\\"[$APPROXIMATELY_EQUAL]\\\"\n                    }\n                  }\")\n  perf_percent_inaccuracy=$(printf \"(+-%0.3f%%) : $perf_ext\" $perf_percent_inaccuracy)\nfi\n\ngmean_label_text=\"Geometric mean:\"\n\nif [ \"${OUTPUT_FORMAT}\" == \"-m\" ]\nthen\n  mem_percent_gmean_text=$(printf \"RSS reduction: \\`%0.3f%%\\`\" \"$mem_percent_gmean\")\n  perf_percent_gmean_text=$(printf \"Speed up: \\`%0.3f%% %s\\`\" \"$perf_percent_gmean\" \"$perf_percent_inaccuracy\")\n  printf \"%s | %s | %s\\n\" \"$gmean_label_text\" \"$mem_percent_gmean_text\" \"$perf_percent_gmean_text\" >> \"${OUTPUT_FILE}\"\nfi\n\nmem_percent_gmean_text=$(printf \"RSS reduction: %0.3f%%\" \"$mem_percent_gmean\")\nperf_percent_gmean_text=$(printf \"Speed up: %0.3f%% %s\" \"$perf_percent_gmean\" \"$perf_percent_inaccuracy\")\nprintf \"%50s | %25s | %51s\\n\" \"$gmean_label_text\" \"$mem_percent_gmean_text\" \"$perf_percent_gmean_text\"\n\ndate\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/run-tests.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\n\nimport argparse\nimport collections\nimport hashlib\nimport os\nimport platform\nimport subprocess\nimport sys\nimport settings\n\nOUTPUT_DIR = os.path.join(settings.PROJECT_DIR, 'build', 'tests')\n\nOptions = collections.namedtuple('Options', ['name', 'build_args', 'test_args', 'skip'])\nOptions.__new__.__defaults__ = ([], [], False)\n\ndef skip_if(condition, desc):\n    return desc if condition else False\n\nOPTIONS_COMMON = ['--lto=off']\nOPTIONS_PROFILE_MIN = ['--profile=minimal']\nOPTIONS_PROFILE_ES51 = ['--profile=es5.1']\nOPTIONS_PROFILE_ESNEXT = ['--profile=es.next']\nOPTIONS_STACK_LIMIT = ['--stack-limit=96']\nOPTIONS_GC_MARK_LIMIT = ['--gc-mark-limit=16']\nOPTIONS_MEM_STRESS = ['--mem-stress-test=on']\nOPTIONS_DEBUG = ['--debug']\nOPTIONS_SNAPSHOT = ['--snapshot-save=on', '--snapshot-exec=on', '--jerry-cmdline-snapshot=on']\nOPTIONS_UNITTESTS = ['--unittests=on', '--jerry-cmdline=off', '--error-messages=on',\n                     '--snapshot-save=on', '--snapshot-exec=on', '--vm-exec-stop=on',\n                     '--line-info=on', '--mem-stats=on']\nOPTIONS_DOCTESTS = ['--doctests=on', '--jerry-cmdline=off', '--error-messages=on',\n                    '--snapshot-save=on', '--snapshot-exec=on', '--vm-exec-stop=on']\n\n# Test options for unittests\nJERRY_UNITTESTS_OPTIONS = [\n    Options('unittests-es.next',\n            OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ESNEXT),\n    Options('unittests-es.next-debug',\n            OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ESNEXT + OPTIONS_DEBUG),\n    Options('doctests-es.next',\n            OPTIONS_COMMON + OPTIONS_DOCTESTS + OPTIONS_PROFILE_ESNEXT),\n    Options('doctests-es.next-debug',\n            OPTIONS_COMMON + OPTIONS_DOCTESTS + OPTIONS_PROFILE_ESNEXT + OPTIONS_DEBUG),\n    Options('unittests-es5.1',\n            OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51),\n    Options('unittests-es5.1-debug',\n            OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG),\n    Options('doctests-es5.1',\n            OPTIONS_COMMON + OPTIONS_DOCTESTS + OPTIONS_PROFILE_ES51),\n    Options('doctests-es5.1-debug',\n            OPTIONS_COMMON + OPTIONS_DOCTESTS + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG),\n    Options('unittests-es5.1-debug-init-fini',\n            OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG\n            + ['--cmake-param=-DFEATURE_INIT_FINI=ON'],\n            skip=skip_if((sys.platform == 'win32'), 'FEATURE_INIT_FINI build flag isn\\'t supported on Windows,' +\n                         ' because Microsoft Visual C/C++ Compiler doesn\\'t support' +\n                         ' library constructors and destructors.')),\n    Options('unittests-es5.1-debug-math',\n            OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG\n            + ['--jerry-math=on']),\n]\n\n# Test options for jerry-tests\nJERRY_TESTS_OPTIONS = [\n    Options('jerry_tests-es.next-debug',\n            OPTIONS_COMMON + OPTIONS_PROFILE_ESNEXT + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT\n            + OPTIONS_MEM_STRESS),\n    Options('jerry_tests-es5.1',\n            OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT),\n    Options('jerry_tests-es5.1-snapshot',\n            OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_SNAPSHOT + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT,\n            ['--snapshot']),\n    Options('jerry_tests-es5.1-debug',\n            OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT\n            + OPTIONS_MEM_STRESS),\n    Options('jerry_tests-es5.1-debug-snapshot',\n            OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_SNAPSHOT + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT\n            + OPTIONS_GC_MARK_LIMIT, ['--snapshot']),\n    Options('jerry_tests-es5.1-debug-cpointer_32bit',\n            OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT\n            + ['--cpointer-32bit=on', '--mem-heap=1024']),\n    Options('jerry_tests-es5.1-debug-external_context',\n            OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT\n            + ['--external-context=on']),\n]\n\n# Test options for test262\nTEST262_TEST_SUITE_OPTIONS = [\n    Options('test262_tests', OPTIONS_PROFILE_ES51),\n    Options('test262_tests-debug', OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG)\n]\n\n# Test options for test262-es2015\nTEST262_ES2015_TEST_SUITE_OPTIONS = [\n    Options('test262_tests_es2015', OPTIONS_PROFILE_ESNEXT + ['--line-info=on', '--error-messages=on']),\n]\n\n# Test options for test262-esnext\nTEST262_ESNEXT_TEST_SUITE_OPTIONS = [\n    Options('test262_tests_esnext', OPTIONS_PROFILE_ESNEXT\n            + ['--line-info=on', '--error-messages=on', '--mem-heap=20480']),\n]\n\n# Test options for jerry-debugger\nDEBUGGER_TEST_OPTIONS = [\n    Options('jerry_debugger_tests',\n            OPTIONS_DEBUG + ['--jerry-debugger=on'])\n]\n\n# Test options for buildoption-test\nJERRY_BUILDOPTIONS = [\n    Options('buildoption_test-lto',\n            ['--lto=on']),\n    Options('buildoption_test-error_messages',\n            ['--error-messages=on']),\n    Options('buildoption_test-logging',\n            ['--logging=on']),\n    Options('buildoption_test-amalgam',\n            ['--amalgam=on']),\n    Options('buildoption_test-valgrind',\n            ['--valgrind=on']),\n    Options('buildoption_test-mem_stats',\n            ['--mem-stats=on']),\n    Options('buildoption_test-show_opcodes',\n            ['--show-opcodes=on']),\n    Options('buildoption_test-show_regexp_opcodes',\n            ['--show-regexp-opcodes=on']),\n    Options('buildoption_test-cpointer_32bit',\n            ['--compile-flag=-m32', '--cpointer-32bit=on', '--system-allocator=on'],\n            skip=skip_if(\n                platform.system() != 'Linux' or (platform.machine() != 'i386' and platform.machine() != 'x86_64'),\n                '-m32 is only supported on x86[-64]-linux')\n           ),\n    Options('buildoption_test-jerry_math',\n            ['--jerry-math=on']),\n    Options('buildoption_test-no_lcache_prophashmap',\n            ['--compile-flag=-DJERRY_LCACHE=0', '--compile-flag=-DJERRY_PROPRETY_HASHMAP=0']),\n    Options('buildoption_test-external_context',\n            ['--external-context=on']),\n    Options('buildoption_test-shared_libs',\n            ['--shared-libs=on'],\n            skip=skip_if((sys.platform == 'win32'), 'Not yet supported, link failure on Windows')),\n    Options('buildoption_test-cmdline_test',\n            ['--jerry-cmdline-test=on'],\n            skip=skip_if((sys.platform == 'win32'), 'rand() can\\'t be overriden on Windows (benchmarking.c)')),\n    Options('buildoption_test-cmdline_snapshot',\n            ['--jerry-cmdline-snapshot=on']),\n    Options('buildoption_test-recursion_limit',\n            OPTIONS_STACK_LIMIT),\n    Options('buildoption_test-gc-mark_limit',\n            OPTIONS_GC_MARK_LIMIT),\n    Options('buildoption_test-jerry-debugger',\n            ['--jerry-debugger=on']),\n    Options('buildoption_test-module-off',\n            ['--compile-flag=-DJERRY_MODULE_SYSTEM=0', '--lto=off']),\n    Options('buildoption_test-builtin-proxy-off',\n            ['--compile-flag=-DJERRY_BUILTIN_PROXY=0']),\n]\n\ndef get_arguments():\n    parser = argparse.ArgumentParser()\n    parser.add_argument('--toolchain', metavar='FILE',\n                        help='Add toolchain file')\n    parser.add_argument('-q', '--quiet', action='store_true',\n                        help='Only print out failing tests')\n    parser.add_argument('--buildoptions', metavar='LIST',\n                        help='Add a comma separated list of extra build options to each test')\n    parser.add_argument('--skip-list', metavar='LIST',\n                        help='Add a comma separated list of patterns of the excluded JS-tests')\n    parser.add_argument('--outdir', metavar='DIR', default=OUTPUT_DIR,\n                        help='Specify output directory (default: %(default)s)')\n    parser.add_argument('--check-signed-off', metavar='TYPE', nargs='?',\n                        choices=['strict', 'tolerant', 'gh-actions'], const='strict',\n                        help='Run signed-off check (%(choices)s; default type if not given: %(const)s)')\n    parser.add_argument('--check-cppcheck', action='store_true',\n                        help='Run cppcheck')\n    parser.add_argument('--check-doxygen', action='store_true',\n                        help='Run doxygen')\n    parser.add_argument('--check-pylint', action='store_true',\n                        help='Run pylint')\n    parser.add_argument('--check-vera', action='store_true',\n                        help='Run vera check')\n    parser.add_argument('--check-license', action='store_true',\n                        help='Run license check')\n    parser.add_argument('--check-magic-strings', action='store_true',\n                        help='Run \"magic string source code generator should be executed\" check')\n    parser.add_argument('--jerry-debugger', action='store_true',\n                        help='Run jerry-debugger tests')\n    parser.add_argument('--jerry-tests', action='store_true',\n                        help='Run jerry-tests')\n    parser.add_argument('--test262', action='store_true',\n                        help='Run test262 - ES5.1')\n    parser.add_argument('--test262-es2015', default=False, const='default',\n                        nargs='?', choices=['default', 'all', 'update'],\n                        help='Run test262 - ES2015. default: all tests except excludelist, ' +\n                        'all: all tests, update: all tests and update excludelist')\n    parser.add_argument('--test262-esnext', default=False, const='default',\n                        nargs='?', choices=['default', 'all', 'update'],\n                        help='Run test262 - ESnext. default: all tests except excludelist, ' +\n                        'all: all tests, update: all tests and update excludelist')\n    parser.add_argument('--test262-test-list', metavar='LIST',\n                        help='Add a comma separated list of tests or directories to run in test262 test suite')\n    parser.add_argument('--unittests', action='store_true',\n                        help='Run unittests (including doctests)')\n    parser.add_argument('--buildoption-test', action='store_true',\n                        help='Run buildoption-test')\n    parser.add_argument('--all', '--precommit', action='store_true',\n                        help='Run all tests')\n\n    if len(sys.argv) == 1:\n        parser.print_help()\n        sys.exit(1)\n\n    script_args = parser.parse_args()\n\n    if script_args.test262_test_list and not \\\n       (script_args.test262 or script_args.test262_es2015 or script_args.test262_esnext):\n        print(\"--test262-test-list is only allowed with --test262 or --test262-es2015 or --test262-esnext\\n\")\n        parser.print_help()\n        sys.exit(1)\n\n    return script_args\n\nBINARY_CACHE = {}\n\nTERM_NORMAL = '\\033[0m'\nTERM_YELLOW = '\\033[1;33m'\nTERM_BLUE = '\\033[1;34m'\nTERM_RED = '\\033[1;31m'\n\ndef report_command(cmd_type, cmd, env=None):\n    sys.stderr.write('%s%s%s\\n' % (TERM_BLUE, cmd_type, TERM_NORMAL))\n    if env is not None:\n        sys.stderr.write(''.join('%s%s=%r \\\\%s\\n' % (TERM_BLUE, var, val, TERM_NORMAL)\n                                 for var, val in sorted(env.items())))\n    sys.stderr.write('%s%s%s\\n' % (TERM_BLUE, (' \\\\%s\\n\\t%s' % (TERM_NORMAL, TERM_BLUE)).join(cmd), TERM_NORMAL))\n\ndef report_skip(job):\n    sys.stderr.write('%sSkipping: %s' % (TERM_YELLOW, job.name))\n    if job.skip:\n        sys.stderr.write(' (%s)' % job.skip)\n    sys.stderr.write('%s\\n' % TERM_NORMAL)\n\ndef get_platform_cmd_prefix():\n    if sys.platform == 'win32':\n        return ['cmd', '/S', '/C']\n    return []\n\ndef create_binary(job, options):\n    build_args = job.build_args[:]\n    if options.buildoptions:\n        for option in options.buildoptions.split(','):\n            if option not in build_args:\n                build_args.append(option)\n\n    build_cmd = get_platform_cmd_prefix()\n    build_cmd.append(settings.BUILD_SCRIPT)\n    build_cmd.extend(build_args)\n\n    build_dir_path = os.path.join(options.outdir, job.name)\n    build_cmd.append('--builddir=%s' % build_dir_path)\n\n    install_dir_path = os.path.join(build_dir_path, 'local')\n    build_cmd.append('--install=%s' % install_dir_path)\n\n    if options.toolchain:\n        build_cmd.append('--toolchain=%s' % options.toolchain)\n\n    report_command('Build command:', build_cmd)\n\n    binary_key = tuple(sorted(build_args))\n    if binary_key in BINARY_CACHE:\n        ret, build_dir_path = BINARY_CACHE[binary_key]\n        sys.stderr.write('(skipping: already built at %s with returncode %d)\\n' % (build_dir_path, ret))\n        return ret, build_dir_path\n\n    try:\n        subprocess.check_output(build_cmd)\n        ret = 0\n    except subprocess.CalledProcessError as err:\n        print(err.output)\n        ret = err.returncode\n\n    BINARY_CACHE[binary_key] = (ret, build_dir_path)\n    return ret, build_dir_path\n\ndef get_binary_path(build_dir_path):\n    executable_extension = '.exe' if sys.platform == 'win32' else ''\n    return os.path.join(build_dir_path, 'local', 'bin', 'jerry' + executable_extension)\n\ndef hash_binary(bin_path):\n    blocksize = 65536\n    hasher = hashlib.sha1()\n    with open(bin_path, 'rb') as bin_file:\n        buf = bin_file.read(blocksize)\n        while buf:\n            hasher.update(buf)\n            buf = bin_file.read(blocksize)\n    return hasher.hexdigest()\n\ndef iterate_test_runner_jobs(jobs, options):\n    tested_paths = set()\n    tested_hashes = {}\n\n    for job in jobs:\n        ret_build, build_dir_path = create_binary(job, options)\n        if ret_build:\n            yield job, ret_build, None\n\n        if build_dir_path in tested_paths:\n            sys.stderr.write('(skipping: already tested with %s)\\n' % build_dir_path)\n            continue\n        else:\n            tested_paths.add(build_dir_path)\n\n        bin_path = get_binary_path(build_dir_path)\n        bin_hash = hash_binary(bin_path)\n\n        if bin_hash in tested_hashes:\n            sys.stderr.write('(skipping: already tested with equivalent %s)\\n' % tested_hashes[bin_hash])\n            continue\n        else:\n            tested_hashes[bin_hash] = build_dir_path\n\n        test_cmd = get_platform_cmd_prefix()\n        test_cmd.extend([settings.TEST_RUNNER_SCRIPT, '--engine', bin_path])\n\n        yield job, ret_build, test_cmd\n\ndef run_check(runnable, env=None):\n    report_command('Test command:', runnable, env=env)\n\n    if env is not None:\n        full_env = dict(os.environ)\n        full_env.update(env)\n        env = full_env\n\n    proc = subprocess.Popen(runnable, env=env)\n    proc.wait()\n    return proc.returncode\n\ndef run_jerry_debugger_tests(options):\n    ret_build = ret_test = 0\n    for job in DEBUGGER_TEST_OPTIONS:\n        ret_build, build_dir_path = create_binary(job, options)\n        if ret_build:\n            print(\"\\n%sBuild failed%s\\n\" % (TERM_RED, TERM_NORMAL))\n            break\n\n        for channel in [\"websocket\", \"rawpacket\"]:\n            for test_file in os.listdir(settings.DEBUGGER_TESTS_DIR):\n                if test_file.endswith(\".cmd\"):\n                    test_case, _ = os.path.splitext(test_file)\n                    test_case_path = os.path.join(settings.DEBUGGER_TESTS_DIR, test_case)\n                    test_cmd = [\n                        settings.DEBUGGER_TEST_RUNNER_SCRIPT,\n                        get_binary_path(build_dir_path),\n                        channel,\n                        settings.DEBUGGER_CLIENT_SCRIPT,\n                        os.path.relpath(test_case_path, settings.PROJECT_DIR)\n                    ]\n\n                    if job.test_args:\n                        test_cmd.extend(job.test_args)\n\n                    ret_test |= run_check(test_cmd)\n\n    return ret_build | ret_test\n\ndef run_jerry_tests(options):\n    ret_build = ret_test = 0\n    for job, ret_build, test_cmd in iterate_test_runner_jobs(JERRY_TESTS_OPTIONS, options):\n        if ret_build:\n            break\n\n        test_cmd.append('--test-dir')\n        test_cmd.append(settings.JERRY_TESTS_DIR)\n\n        if options.quiet:\n            test_cmd.append(\"-q\")\n\n        skip_list = []\n\n        if '--profile=es.next' in job.build_args:\n            skip_list.append(os.path.join('es5.1', ''))\n        else:\n            skip_list.append(os.path.join('es.next', ''))\n\n        if options.skip_list:\n            skip_list.append(options.skip_list)\n\n        if skip_list:\n            test_cmd.append(\"--skip-list=\" + \",\".join(skip_list))\n\n        if job.test_args:\n            test_cmd.extend(job.test_args)\n\n        ret_test |= run_check(test_cmd, env=dict(TZ='UTC'))\n\n    return ret_build | ret_test\n\ndef run_test262_test_suite(options):\n    ret_build = ret_test = 0\n\n    jobs = []\n    if options.test262:\n        jobs.extend(TEST262_TEST_SUITE_OPTIONS)\n    if options.test262_es2015:\n        jobs.extend(TEST262_ES2015_TEST_SUITE_OPTIONS)\n    if options.test262_esnext:\n        jobs.extend(TEST262_ESNEXT_TEST_SUITE_OPTIONS)\n\n    for job in jobs:\n        ret_build, build_dir_path = create_binary(job, options)\n        if ret_build:\n            print(\"\\n%sBuild failed%s\\n\" % (TERM_RED, TERM_NORMAL))\n            break\n\n        test_cmd = get_platform_cmd_prefix() + [\n            settings.TEST262_RUNNER_SCRIPT,\n            '--engine', get_binary_path(build_dir_path) + \" --test262-object\",\n            '--test-dir', settings.TEST262_TEST_SUITE_DIR\n        ]\n\n        if job.name.endswith('es2015'):\n            test_cmd.append('--es2015')\n            test_cmd.append(options.test262_es2015)\n        elif job.name.endswith('esnext'):\n            test_cmd.append('--esnext')\n            test_cmd.append(options.test262_esnext)\n        else:\n            test_cmd.append('--es51')\n\n        if job.test_args:\n            test_cmd.extend(job.test_args)\n\n        if options.test262_test_list:\n            test_cmd.append('--test262-test-list')\n            test_cmd.append(options.test262_test_list)\n\n        ret_test |= run_check(test_cmd, env=dict(TZ='America/Los_Angeles'))\n\n    return ret_build | ret_test\n\ndef run_unittests(options):\n    ret_build = ret_test = 0\n    for job in JERRY_UNITTESTS_OPTIONS:\n        if job.skip:\n            report_skip(job)\n            continue\n        ret_build, build_dir_path = create_binary(job, options)\n        if ret_build:\n            print(\"\\n%sBuild failed%s\\n\" % (TERM_RED, TERM_NORMAL))\n            break\n\n        if sys.platform == 'win32':\n            if \"--debug\" in job.build_args:\n                build_config = \"Debug\"\n            else:\n                build_config = \"MinSizeRel\"\n        else:\n            build_config = \"\"\n\n\n        ret_test |= run_check(\n            get_platform_cmd_prefix() +\n            [settings.UNITTEST_RUNNER_SCRIPT] +\n            [os.path.join(build_dir_path, 'tests', build_config)] +\n            ([\"-q\"] if options.quiet else [])\n        )\n\n    return ret_build | ret_test\n\ndef run_buildoption_test(options):\n    for job in JERRY_BUILDOPTIONS:\n        if job.skip:\n            report_skip(job)\n            continue\n\n        ret, _ = create_binary(job, options)\n        if ret:\n            print(\"\\n%sBuild failed%s\\n\" % (TERM_RED, TERM_NORMAL))\n            break\n\n    return ret\n\nCheck = collections.namedtuple('Check', ['enabled', 'runner', 'arg'])\n\ndef main(options):\n    checks = [\n        Check(options.check_signed_off, run_check, [settings.SIGNED_OFF_SCRIPT]\n              + {'tolerant': ['--tolerant'], 'gh-actions': ['--gh-actions']}.get(options.check_signed_off, [])),\n        Check(options.check_cppcheck, run_check, [settings.CPPCHECK_SCRIPT]),\n        Check(options.check_doxygen, run_check, [settings.DOXYGEN_SCRIPT]),\n        Check(options.check_pylint, run_check, [settings.PYLINT_SCRIPT]),\n        Check(options.check_vera, run_check, [settings.VERA_SCRIPT]),\n        Check(options.check_license, run_check, [settings.LICENSE_SCRIPT]),\n        Check(options.check_magic_strings, run_check, [settings.MAGIC_STRINGS_SCRIPT]),\n        Check(options.jerry_debugger, run_jerry_debugger_tests, options),\n        Check(options.jerry_tests, run_jerry_tests, options),\n        Check(options.test262 or options.test262_es2015 or options.test262_esnext, run_test262_test_suite, options),\n        Check(options.unittests, run_unittests, options),\n        Check(options.buildoption_test, run_buildoption_test, options),\n    ]\n\n    for check in checks:\n        if check.enabled or options.all:\n            ret = check.runner(check.arg)\n            if ret:\n                sys.exit(ret)\n\nif __name__ == \"__main__\":\n    main(get_arguments())\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/runners/run-benchmarks.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nENGINE=$1\n\nfunction run ()\n{\n    echo \"Running test: $1.js\"\n        ./tools/perf.sh 5 $ENGINE ./tests/benchmarks/$1.js\n        ./tools/rss-measure.sh $ENGINE ./tests/benchmarks/$1.js\n}\n\necho \"Running Sunspider:\"\n#run jerry/sunspider/3d-morph // too fast\nrun jerry/sunspider/bitops-3bit-bits-in-byte\nrun jerry/sunspider/bitops-bits-in-byte\nrun jerry/sunspider/bitops-bitwise-and\nrun jerry/sunspider/controlflow-recursive\nrun jerry/sunspider/math-cordic\nrun jerry/sunspider/math-partial-sums\nrun jerry/sunspider/math-spectral-norm\n\necho \"Running Jerry:\"\nrun jerry/cse\nrun jerry/cse_loop\nrun jerry/cse_ready_loop\nrun jerry/empty_loop\nrun jerry/function_loop\nrun jerry/loop_arithmetics_10kk\nrun jerry/loop_arithmetics_1kk\n\necho \"Running UBench:\"\nrun ubench/function-closure\nrun ubench/function-empty\nrun ubench/function-correct-args\nrun ubench/function-excess-args\nrun ubench/function-missing-args\nrun ubench/function-sum\nrun ubench/loop-empty-resolve\nrun ubench/loop-empty\nrun ubench/loop-sum\n\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/runners/run-debugger-test.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nJERRY=$1\nCHANNEL=$2\nDEBUGGER_CLIENT=$3\nTEST_CASE=$4\nCLIENT_ARGS=\"\"\n\nTERM_NORMAL='\\033[0m'\nTERM_RED='\\033[1;31m'\nTERM_GREEN='\\033[1;32m'\n\nif [[ $TEST_CASE == *\"client_source\"* ]]; then\n  START_DEBUG_SERVER=\"${JERRY} --start-debug-server --debug-channel ${CHANNEL} --debugger-wait-source &\"\n  if [[ $TEST_CASE == *\"client_source_multiple\"* ]]; then\n    CLIENT_ARGS=\"--client-source ${TEST_CASE}_2.js ${TEST_CASE}_1.js\"\n  else\n    CLIENT_ARGS=\"--client-source ${TEST_CASE}.js\"\n  fi\nelse\n  START_DEBUG_SERVER=\"${JERRY} ${TEST_CASE}.js --start-debug-server --debug-channel ${CHANNEL} &\"\nfi\n\necho \"$START_DEBUG_SERVER\"\neval \"$START_DEBUG_SERVER\"\nsleep 1s\n\nRESULT_TEMP=`mktemp ${TEST_CASE}.out.XXXXXXXXXX`\n\n(cat \"${TEST_CASE}.cmd\" | ${DEBUGGER_CLIENT} --channel ${CHANNEL} --non-interactive ${CLIENT_ARGS}) >${RESULT_TEMP} 2>&1\n\nif [[ $TEST_CASE == *\"restart\"* ]]; then\n  CONTINUE_CASE=$(sed \"s/restart/continue/g\" <<< \"$TEST_CASE\")\n  (cat \"${CONTINUE_CASE}.cmd\" | ${DEBUGGER_CLIENT} --channel ${CHANNEL} --non-interactive ${CLIENT_ARGS}) >>${RESULT_TEMP} 2>&1\nfi\n\ndiff -U0 ${TEST_CASE}.expected ${RESULT_TEMP}\nSTATUS_CODE=$?\n\nrm -f ${RESULT_TEMP}\n\nif [ ${STATUS_CODE} -ne 0 ]\nthen\n  echo -e \"${TERM_RED}FAIL: ${TEST_CASE}${TERM_NORMAL}\\n\"\nelse\n  echo -e \"${TERM_GREEN}PASS: ${TEST_CASE}${TERM_NORMAL}\\n\"\nfi\n\nexit ${STATUS_CODE}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/runners/run-test-suite-test262.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\nimport argparse\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nimport util\n\ndef get_platform_cmd_prefix():\n    if sys.platform == 'win32':\n        return ['cmd', '/S', '/C']\n    return ['python2']  # The official test262.py isn't python3 compatible, but has python shebang.\n\n\ndef get_arguments():\n    execution_runtime = os.environ.get('RUNTIME', '')\n    parser = argparse.ArgumentParser()\n    parser.add_argument('--runtime', metavar='FILE', default=execution_runtime,\n                        help='Execution runtime (e.g. qemu)')\n    parser.add_argument('--engine', metavar='FILE', required=True,\n                        help='JerryScript binary to run tests with')\n    parser.add_argument('--test-dir', metavar='DIR', required=True,\n                        help='Directory contains test262 test suite')\n    group = parser.add_mutually_exclusive_group(required=True)\n    group.add_argument('--es51', action='store_true',\n                       help='Run test262 ES5.1 version')\n    group.add_argument('--es2015', default=False, const='default',\n                       nargs='?', choices=['default', 'all', 'update'],\n                       help='Run test262 - ES2015. default: all tests except excludelist, ' +\n                       'all: all tests, update: all tests and update excludelist')\n    group.add_argument('--esnext', default=False, const='default',\n                       nargs='?', choices=['default', 'all', 'update'],\n                       help='Run test262 - ES.next. default: all tests except excludelist, ' +\n                       'all: all tests, update: all tests and update excludelist')\n    parser.add_argument('--test262-test-list', metavar='LIST',\n                        help='Add a comma separated list of tests or directories to run in test262 test suite')\n\n    args = parser.parse_args()\n\n    if args.es2015:\n        args.test_dir = os.path.join(args.test_dir, 'es2015')\n        args.test262_harness_dir = os.path.abspath(os.path.dirname(__file__))\n        args.test262_git_hash = 'fd44cd73dfbce0b515a2474b7cd505d6176a9eb5'\n        args.excludelist_path = os.path.join('tests', 'test262-es6-excludelist.xml')\n    elif args.esnext:\n        args.test_dir = os.path.join(args.test_dir, 'esnext')\n        args.test262_harness_dir = os.path.abspath(os.path.dirname(__file__))\n        args.test262_git_hash = '281eb10b2844929a7c0ac04527f5b42ce56509fd'\n        args.excludelist_path = os.path.join('tests', 'test262-esnext-excludelist.xml')\n    else:\n        args.test_dir = os.path.join(args.test_dir, 'es51')\n        args.test262_harness_dir = args.test_dir\n        args.test262_git_hash = 'es5-tests'\n\n    args.mode = args.es2015 or args.esnext\n\n    return args\n\n\ndef prepare_test262_test_suite(args):\n    if os.path.isdir(os.path.join(args.test_dir, '.git')):\n        return 0\n\n    return_code = subprocess.call(['git', 'clone', '--no-checkout',\n                                   'https://github.com/tc39/test262.git', args.test_dir])\n    if return_code:\n        print('Cloning test262 repository failed.')\n        return return_code\n\n    return_code = subprocess.call(['git', 'checkout', args.test262_git_hash], cwd=args.test_dir)\n    assert not return_code, 'Cloning test262 repository failed - invalid git revision.'\n\n    if args.es51:\n        path_to_remove = os.path.join(args.test_dir, 'test', 'suite', 'bestPractice')\n        if os.path.isdir(path_to_remove):\n            shutil.rmtree(path_to_remove)\n\n        path_to_remove = os.path.join(args.test_dir, 'test', 'suite', 'intl402')\n        if os.path.isdir(path_to_remove):\n            shutil.rmtree(path_to_remove)\n\n    return 0\n\n\ndef update_exclude_list(args):\n    print(\"=== Summary - updating excludelist ===\\n\")\n    passing_tests = set()\n    failing_tests = set()\n    new_passing_tests = set()\n    with open(os.path.join(os.path.dirname(args.engine), 'test262.report'), 'r') as report_file:\n        for line in report_file:\n            match = re.match('(=== )?(.*) (?:failed|passed) in (?:non-strict|strict)', line)\n            if match:\n                (unexpected, test) = match.groups()\n                test = test.replace('\\\\', '/')\n                if unexpected:\n                    failing_tests.add(test + '.js')\n                else:\n                    passing_tests.add(test + '.js')\n\n    # Tests pass in strict-mode but fail in non-strict-mode (or vice versa) should be considered as failures\n    passing_tests = passing_tests - failing_tests\n\n    with open(args.excludelist_path, 'r+') as exclude_file:\n        lines = exclude_file.readlines()\n        exclude_file.seek(0)\n        exclude_file.truncate()\n\n        # Skip the last line \"</excludeList>\" to be able to insert new failing tests.\n        for line in lines[:-1]:\n            match = re.match(r\"  <test id=\\\"(\\S*)\\\">\", line)\n            if match:\n                test = match.group(1)\n                if test in failing_tests:\n                    failing_tests.remove(test)\n                    exclude_file.write(line)\n                elif test in passing_tests:\n                    new_passing_tests.add(test)\n                else:\n                    exclude_file.write(line)\n            else:\n                exclude_file.write(line)\n\n        if failing_tests:\n            print(\"New failing tests added to the excludelist\")\n            for test in sorted(failing_tests):\n                exclude_file.write('  <test id=\"' + test + '\"><reason></reason></test>\\n')\n                print(\"  \" + test)\n            print(\"\")\n\n        exclude_file.write('</excludeList>\\n')\n\n    if new_passing_tests:\n        print(\"New passing tests removed from the excludelist\")\n        for test in sorted(new_passing_tests):\n            print(\"  \" + test)\n        print(\"\")\n\n    if failing_tests or new_passing_tests:\n        print(\"Excludelist was updated succesfully.\")\n        return 1\n\n    print(\"Excludelist was already up-to-date.\")\n    return 0\n\n\ndef main(args):\n    return_code = prepare_test262_test_suite(args)\n    if return_code:\n        return return_code\n\n    if sys.platform == 'win32':\n        original_timezone = util.get_timezone()\n        util.set_sighdl_to_reset_timezone(original_timezone)\n        util.set_timezone('Pacific Standard Time')\n\n    command = (args.runtime + ' ' + args.engine).strip()\n\n    kwargs = {}\n    if sys.version_info.major >= 3:\n        kwargs['errors'] = 'ignore'\n\n    if args.es51:\n        test262_harness_path = os.path.join(args.test262_harness_dir, 'tools/packaging/test262.py')\n    else:\n        test262_harness_path = os.path.join(args.test262_harness_dir, 'test262-harness.py')\n\n    test262_command = get_platform_cmd_prefix() + \\\n                      [test262_harness_path,\n                       '--command', command,\n                       '--tests', args.test_dir,\n                       '--summary']\n\n    if 'excludelist_path' in args and args.mode == 'default':\n        test262_command.extend(['--exclude-list', args.excludelist_path])\n\n    if args.test262_test_list:\n        test262_command.extend(args.test262_test_list.split(','))\n\n    proc = subprocess.Popen(test262_command,\n                            universal_newlines=True,\n                            stdout=subprocess.PIPE,\n                            **kwargs)\n\n    return_code = 1\n    with open(os.path.join(os.path.dirname(args.engine), 'test262.report'), 'w') as output_file:\n        counter = 0\n        summary_found = False\n        summary_end_found = False\n        while True:\n            output = proc.stdout.readline()\n            if not output:\n                break\n            output_file.write(output)\n\n            if output.startswith('=== Summary ==='):\n                summary_found = True\n                print('')\n\n            if summary_found:\n                if not summary_end_found:\n                    print(output, end='')\n                    if not output.strip():\n                        summary_end_found = True\n                if 'All tests succeeded' in output:\n                    return_code = 0\n            elif re.search('in (non-)?strict mode', output):\n                counter += 1\n                if (counter % 100) == 0:\n                    print(\".\", end='')\n                if (counter % 5000) == 0:\n                    print(\" Executed %d tests.\" % counter)\n\n    proc.wait()\n\n    if sys.platform == 'win32':\n        util.set_timezone(original_timezone)\n\n    if args.mode == 'update':\n        return_code = update_exclude_list(args)\n\n    return return_code\n\n\nif __name__ == \"__main__\":\n    sys.exit(main(get_arguments()))\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/runners/run-test-suite.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\nimport argparse\nimport os\nimport subprocess\nimport sys\n\nimport util\n\ndef get_arguments():\n    execution_runtime = os.environ.get('RUNTIME')\n    parser = argparse.ArgumentParser()\n    parser.add_argument('-q', '--quiet', action='store_true',\n                        help='Only print out failing tests')\n    parser.add_argument('--runtime', metavar='FILE', default=execution_runtime,\n                        help='Execution runtime (e.g. qemu)')\n    parser.add_argument('--engine', metavar='FILE',\n                        help='JerryScript binary to run tests with')\n    parser.add_argument('--test-list', metavar='FILE',\n                        help='File contains test paths to run')\n    parser.add_argument('--skip-list', metavar='LIST',\n                        help='Add a comma separated list of patterns of the excluded JS-tests')\n    parser.add_argument('--test-dir', metavar='DIR',\n                        help='Directory contains tests to run')\n    parser.add_argument('--snapshot', action='store_true',\n                        help='Snapshot test')\n\n    script_args = parser.parse_args()\n    if script_args.skip_list:\n        script_args.skip_list = script_args.skip_list.split(',')\n    else:\n        script_args.skip_list = []\n\n    return script_args\n\n\ndef get_tests(test_dir, test_list, skip_list):\n    tests = []\n    if test_dir:\n        tests = []\n        for root, _, files in os.walk(test_dir):\n            for test_file in files:\n                if test_file.endswith('.js') or test_file.endswith('.mjs'):\n                    tests.extend([os.path.join(root, test_file)])\n\n    if test_list:\n        dirname = os.path.dirname(test_list)\n        with open(test_list, \"r\") as test_list_fd:\n            for test in test_list_fd:\n                tests.append(os.path.normpath(os.path.join(dirname, test.rstrip())))\n\n    tests.sort()\n\n    def filter_tests(test):\n        for skipped in skip_list:\n            if skipped in test:\n                return False\n        return True\n\n    return [test for test in tests if filter_tests(test)]\n\n\ndef get_platform_cmd_prefix():\n    if sys.platform == 'win32':\n        return ['cmd', '/S', '/C']\n    return []\n\n\ndef execute_test_command(test_cmd):\n    kwargs = {}\n    if sys.version_info.major >= 3:\n        kwargs['encoding'] = 'unicode_escape'\n    process = subprocess.Popen(test_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,\n                               universal_newlines=True, **kwargs)\n    stdout = process.communicate()[0]\n    return (process.returncode, stdout)\n\n\ndef main(args):\n    tests = get_tests(args.test_dir, args.test_list, args.skip_list)\n    total = len(tests)\n    if total == 0:\n        print(\"No test to execute.\")\n        return 1\n\n    if sys.platform == 'win32':\n        original_timezone = util.get_timezone()\n        util.set_sighdl_to_reset_timezone(original_timezone)\n        util.set_timezone('UTC')\n\n    if args.snapshot:\n        passed = run_snapshot_tests(args, tests)\n    else:\n        passed = run_normal_tests(args, tests)\n\n    if sys.platform == 'win32':\n        util.set_timezone(original_timezone)\n\n    failed = total - passed\n\n    summary_list = [os.path.relpath(args.engine)]\n    if args.snapshot:\n        summary_list.append('--snapshot')\n    if args.test_dir:\n        summary_list.append(os.path.relpath(args.test_dir))\n    if args.test_list:\n        summary_list.append(os.path.relpath(args.test_list))\n    util.print_test_summary(' '.join(summary_list), total, passed, failed)\n\n    return bool(failed)\n\n\ndef run_normal_tests(args, tests):\n    test_cmd = get_platform_cmd_prefix()\n    if args.runtime:\n        test_cmd.append(args.runtime)\n    test_cmd.extend([args.engine, '--call-on-exit', '__checkAsync'])\n\n    total = len(tests)\n    tested = 0\n    passed = 0\n    for test in tests:\n        tested += 1\n        test_path = os.path.relpath(test)\n        is_expected_to_fail = os.path.join(os.path.sep, 'fail', '') in test\n\n        test_argument = []\n        if test.endswith('.mjs'):\n            test_argument.extend(['-m'])\n\n        (returncode, stdout) = execute_test_command(test_cmd + test_argument + [test])\n\n        if (returncode == 0 and not is_expected_to_fail) or (returncode == 1 and is_expected_to_fail):\n            passed += 1\n            if not args.quiet:\n                passed_string = 'PASS' + (' (XFAIL)' if is_expected_to_fail else '')\n                util.print_test_result(tested, total, True, passed_string, test_path)\n        else:\n            passed_string = 'FAIL%s (%d)' % (' (XPASS)' if returncode == 0 and is_expected_to_fail else '', returncode)\n            util.print_test_result(tested, total, False, passed_string, test_path)\n            print(\"================================================\")\n            print(stdout)\n            print(\"================================================\")\n\n    return passed\n\n\ndef run_snapshot_tests(args, tests):\n    execute_snapshot_cmd = get_platform_cmd_prefix()\n    generate_snapshot_cmd = get_platform_cmd_prefix()\n    if args.runtime:\n        execute_snapshot_cmd.append(args.runtime)\n        generate_snapshot_cmd.append(args.runtime)\n\n    execute_snapshot_cmd.extend([args.engine, '--exec-snapshot', 'js.snapshot'])\n    execute_snapshot_cmd.extend(['--call-on-exit', '__checkAsync'])\n\n    # engine: jerry[.exe] -> snapshot generator: jerry-snapshot[.exe]\n    engine = os.path.splitext(args.engine)\n    generate_snapshot_cmd.append(engine[0] + '-snapshot' + engine[1])\n    generate_snapshot_cmd.append('generate')\n\n    total = len(tests)\n    tested = 0\n    passed = 0\n    for test in tests:\n        tested += 1\n        test_path = os.path.relpath(test)\n        is_expected_to_fail = os.path.join(os.path.sep, 'fail', '') in test\n        (returncode, stdout) = execute_test_command(generate_snapshot_cmd + [test])\n\n        if (returncode == 0) or (returncode == 1 and is_expected_to_fail):\n            if not args.quiet:\n                passed_string = 'PASS' + (' (XFAIL)' if returncode else '')\n                util.print_test_result(tested, total, True, passed_string, test_path, True)\n        else:\n            util.print_test_result(tested, total, False, 'FAIL (%d)' % (returncode), test_path, True)\n            print(\"================================================\")\n            print(stdout)\n            print(\"================================================\")\n\n        if returncode:\n            if is_expected_to_fail:\n                passed += 1\n            continue\n\n        (returncode, stdout) = execute_test_command(execute_snapshot_cmd)\n        os.remove('js.snapshot')\n\n        if (returncode == 0 and not is_expected_to_fail) or (returncode == 1 and is_expected_to_fail):\n            passed += 1\n            if not args.quiet:\n                passed_string = 'PASS' + (' (XFAIL)' if is_expected_to_fail else '')\n                util.print_test_result(tested, total, True, passed_string, test_path, False)\n        else:\n            passed_string = 'FAIL%s (%d)' % (' (XPASS)' if returncode == 0 and is_expected_to_fail else '', returncode)\n            util.print_test_result(tested, total, False, passed_string, test_path, False)\n            print(\"================================================\")\n            print(stdout)\n            print(\"================================================\")\n\n    return passed\n\n\nif __name__ == \"__main__\":\n    sys.exit(main(get_arguments()))\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/runners/run-unittests.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\nimport argparse\nimport glob\nimport os\nimport subprocess\nimport sys\n\nimport util\n\n\ndef get_arguments():\n    runtime = os.environ.get('RUNTIME')\n    parser = argparse.ArgumentParser()\n    parser.add_argument('-q', '--quiet', action='store_true',\n                        help='Only print out failing tests')\n    parser.add_argument('--runtime', metavar='FILE', default=runtime,\n                        help='Execution runtime (e.g. qemu)')\n    parser.add_argument('path',\n                        help='Path of test binaries')\n\n    script_args = parser.parse_args()\n    return script_args\n\n\ndef get_unittests(path):\n    unittests = []\n    files = glob.glob(os.path.join(path, 'unit-*'))\n    for testfile in files:\n        if os.path.isfile(testfile) and os.access(testfile, os.X_OK):\n            if sys.platform != 'win32' or testfile.endswith(\".exe\"):\n                unittests.append(testfile)\n    unittests.sort()\n    return unittests\n\n\ndef main(args):\n    unittests = get_unittests(args.path)\n    total = len(unittests)\n    if total == 0:\n        print(\"%s: no unit-* test to execute\", args.path)\n        return 1\n\n    test_cmd = [args.runtime] if args.runtime else []\n\n    tested = 0\n    passed = 0\n    failed = 0\n    for test in unittests:\n        tested += 1\n        test_path = os.path.relpath(test)\n        try:\n            subprocess.check_output(test_cmd + [test], stderr=subprocess.STDOUT, universal_newlines=True)\n            passed += 1\n            if not args.quiet:\n                util.print_test_result(tested, total, True, 'PASS', test_path)\n        except subprocess.CalledProcessError as err:\n            failed += 1\n            util.print_test_result(tested, total, False, 'FAIL (%d)' % err.returncode, test_path)\n            print(\"================================================\")\n            print(err.output)\n            print(\"================================================\")\n\n    util.print_test_summary(os.path.join(os.path.relpath(args.path), \"unit-*\"), total, passed, failed)\n\n    if failed > 0:\n        return 1\n    return 0\n\n\nif __name__ == \"__main__\":\n    sys.exit(main(get_arguments()))\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/runners/test262-harness.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# This file is based on work under the following copyright and permission notice:\n# https://github.com/test262-utils/test262-harness-py\n# test262.py, _monkeyYaml.py, parseTestRecord.py\n\n# license of test262.py:\n# Copyright 2009 the Sputnik authors.  All rights reserved.\n# This code is governed by the BSD license found in the LICENSE file.\n# This is derived from sputnik.py, the Sputnik console test runner,\n# with elements from packager.py, which is separately\n# copyrighted. TODO: Refactor so there is less duplication between\n# test262.py and packager.py.\n\n# license of _packager.py:\n# Copyright (c) 2012 Ecma International.  All rights reserved.\n# This code is governed by the BSD license found in the LICENSE file.\n\n# license of _monkeyYaml.py:\n# Copyright 2014 by Sam Mikes.  All rights reserved.\n# This code is governed by the BSD license found in the LICENSE file.\n\n# license of parseTestRecord.py:\n# Copyright 2011 by Google, Inc.  All rights reserved.\n# This code is governed by the BSD license found in the LICENSE file.\n\n\nfrom __future__ import print_function\n\nimport logging\nimport optparse\nimport os\nfrom os import path\nimport platform\nimport re\nimport subprocess\nimport sys\nimport tempfile\nimport xml.dom.minidom\nfrom collections import Counter\n\nimport signal\nimport threading\nimport multiprocessing\n\n#######################################################################\n# based on _monkeyYaml.py\n#######################################################################\n\nM_YAML_LIST_PATTERN = re.compile(r\"^\\[(.*)\\]$\")\nM_YAML_MULTILINE_LIST = re.compile(r\"^ *- (.*)$\")\n\n\n# The timeout of each test case\nTEST262_CASE_TIMEOUT = 5\n\n\ndef yaml_load(string):\n    return my_read_dict(string.splitlines())[1]\n\n\ndef my_read_dict(lines, indent=\"\"):\n    dictionary = {}\n    key = None\n    empty_lines = 0\n\n    while lines:\n        if not lines[0].startswith(indent):\n            break\n\n        line = lines.pop(0)\n        if my_is_all_spaces(line):\n            empty_lines += 1\n            continue\n\n        result = re.match(r\"(.*?):(.*)\", line)\n\n        if result:\n            if not dictionary:\n                dictionary = {}\n            key = result.group(1).strip()\n            value = result.group(2).strip()\n            (lines, value) = my_read_value(lines, value, indent)\n            dictionary[key] = value\n        else:\n            if dictionary and key and key in dictionary:\n                char = \" \" if empty_lines == 0 else \"\\n\" * empty_lines\n                dictionary[key] += char + line.strip()\n            else:\n                raise Exception(\"monkeyYaml is confused at \" + line)\n        empty_lines = 0\n\n    if not dictionary:\n        dictionary = None\n\n    return lines, dictionary\n\n\ndef my_read_value(lines, value, indent):\n    if value == \">\" or value == \"|\":\n        (lines, value) = my_multiline(lines, value == \"|\")\n        value = value + \"\\n\"\n        return (lines, value)\n    if lines and not value:\n        if my_maybe_list(lines[0]):\n            return my_multiline_list(lines, value)\n        indent_match = re.match(\"(\" + indent + r\"\\s+)\", lines[0])\n        if indent_match:\n            if \":\" in lines[0]:\n                return my_read_dict(lines, indent_match.group(1))\n            return my_multiline(lines, False)\n    return lines, my_read_one_line(value)\n\n\ndef my_maybe_list(value):\n    return M_YAML_MULTILINE_LIST.match(value)\n\n\ndef my_multiline_list(lines, value):\n    # assume no explcit indentor (otherwise have to parse value)\n    value = []\n    indent = 0\n    while lines:\n        line = lines.pop(0)\n        leading = my_leading_spaces(line)\n        if my_is_all_spaces(line):\n            pass\n        elif leading < indent:\n            lines.insert(0, line)\n            break\n        else:\n            indent = indent or leading\n            value += [my_read_one_line(my_remove_list_header(indent, line))]\n    return (lines, value)\n\n\ndef my_remove_list_header(indent, line):\n    line = line[indent:]\n    return M_YAML_MULTILINE_LIST.match(line).group(1)\n\n\ndef my_read_one_line(value):\n    if M_YAML_LIST_PATTERN.match(value):\n        return my_flow_list(value)\n    elif re.match(r\"^[-0-9]*$\", value):\n        try:\n            value = int(value)\n        except ValueError:\n            pass\n    elif re.match(r\"^[-.0-9eE]*$\", value):\n        try:\n            value = float(value)\n        except ValueError:\n            pass\n    elif re.match(r\"^('|\\\").*\\1$\", value):\n        value = value[1:-1]\n    return value\n\n\ndef my_flow_list(value):\n    result = M_YAML_LIST_PATTERN.match(value)\n    values = result.group(1).split(\",\")\n    return [my_read_one_line(v.strip()) for v in values]\n\n\ndef my_multiline(lines, preserve_newlines=False):\n    # assume no explcit indentor (otherwise have to parse value)\n    value = \"\"\n    indent = my_leading_spaces(lines[0])\n    was_empty = None\n\n    while lines:\n        line = lines.pop(0)\n        is_empty = my_is_all_spaces(line)\n\n        if is_empty:\n            if preserve_newlines:\n                value += \"\\n\"\n        elif my_leading_spaces(line) < indent:\n            lines.insert(0, line)\n            break\n        else:\n            if preserve_newlines:\n                if was_empty != None:\n                    value += \"\\n\"\n            else:\n                if was_empty:\n                    value += \"\\n\"\n                elif was_empty is False:\n                    value += \" \"\n            value += line[(indent):]\n\n        was_empty = is_empty\n\n    return (lines, value)\n\n\ndef my_is_all_spaces(line):\n    return len(line.strip()) == 0\n\n\ndef my_leading_spaces(line):\n    return len(line) - len(line.lstrip(' '))\n\n\n#######################################################################\n# based on parseTestRecord.py\n#######################################################################\n\n# Matches trailing whitespace and any following blank lines.\n_BLANK_LINES = r\"([ \\t]*[\\r\\n]{1,2})*\"\n\n# Matches the YAML frontmatter block.\n# It must be non-greedy because test262-es2015/built-ins/Object/assign/Override.js contains a comment like yaml pattern\n_YAML_PATTERN = re.compile(r\"/\\*---(.*?)---\\*/\" + _BLANK_LINES, re.DOTALL)\n\n# Matches all known variants for the license block.\n# https://github.com/tc39/test262/blob/705d78299cf786c84fa4df473eff98374de7135a/tools/lint/lib/checks/license.py\n_LICENSE_PATTERN = re.compile(\n    r'// Copyright( \\([C]\\))? (\\w+) .+\\. {1,2}All rights reserved\\.[\\r\\n]{1,2}' +\n    r'(' +\n    r'// This code is governed by the( BSD)? license found in the LICENSE file\\.' +\n    r'|' +\n    r'// See LICENSE for details.' +\n    r'|' +\n    r'// Use of this source code is governed by a BSD-style license that can be[\\r\\n]{1,2}' +\n    r'// found in the LICENSE file\\.' +\n    r'|' +\n    r'// See LICENSE or https://github\\.com/tc39/test262/blob/master/LICENSE' +\n    r')' + _BLANK_LINES, re.IGNORECASE)\n\n\ndef yaml_attr_parser(test_record, attrs, name, onerror=print):\n    parsed = yaml_load(attrs)\n    if parsed is None:\n        onerror(\"Failed to parse yaml in name %s\" % name)\n        return\n\n    for key in parsed:\n        value = parsed[key]\n        if key == \"info\":\n            key = \"commentary\"\n        test_record[key] = value\n\n    if 'flags' in test_record:\n        for flag in test_record['flags']:\n            test_record[flag] = \"\"\n\n\ndef find_license(src):\n    match = _LICENSE_PATTERN.search(src)\n    if not match:\n        return None\n\n    return match.group(0)\n\n\ndef find_attrs(src):\n    match = _YAML_PATTERN.search(src)\n    if not match:\n        return (None, None)\n\n    return (match.group(0), match.group(1).strip())\n\n\ndef parse_test_record(src, name, onerror=print):\n    # Find the license block.\n    header = find_license(src)\n\n    # Find the YAML frontmatter.\n    (frontmatter, attrs) = find_attrs(src)\n\n    # YAML frontmatter is required for all tests.\n    if frontmatter is None:\n        onerror(\"Missing frontmatter: %s\" % name)\n\n    # The license shuold be placed before the frontmatter and there shouldn't be\n    # any extra content between the license and the frontmatter.\n    if header is not None and frontmatter is not None:\n        header_idx = src.index(header)\n        frontmatter_idx = src.index(frontmatter)\n        if header_idx > frontmatter_idx:\n            onerror(\"Unexpected license after frontmatter: %s\" % name)\n\n        # Search for any extra test content, but ignore whitespace only or comment lines.\n        extra = src[header_idx + len(header): frontmatter_idx]\n        if extra and any(line.strip() and not line.lstrip().startswith(\"//\") for line in extra.split(\"\\n\")):\n            onerror(\n                \"Unexpected test content between license and frontmatter: %s\" % name)\n\n    # Remove the license and YAML parts from the actual test content.\n    test = src\n    if frontmatter is not None:\n        test = test.replace(frontmatter, '')\n    if header is not None:\n        test = test.replace(header, '')\n\n    test_record = {}\n    test_record['header'] = header.strip() if header else ''\n    test_record['test'] = test\n\n    if attrs:\n        yaml_attr_parser(test_record, attrs, name, onerror)\n\n    # Report if the license block is missing in non-generated tests.\n    if header is None and \"generated\" not in test_record and \"hashbang\" not in name:\n        onerror(\"No license found in: %s\" % name)\n\n    return test_record\n\n\n#######################################################################\n# based on test262.py\n#######################################################################\n\nclass Test262Error(Exception):\n    def __init__(self, message):\n        Exception.__init__(self)\n        self.message = message\n\n\ndef report_error(error_string):\n    raise Test262Error(error_string)\n\n\ndef build_options():\n    result = optparse.OptionParser()\n    result.add_option(\"--command\", default=None,\n                      help=\"The command-line to run\")\n    result.add_option(\"--tests\", default=path.abspath('.'),\n                      help=\"Path to the tests\")\n    result.add_option(\"--exclude-list\", default=None,\n                      help=\"Path to the excludelist.xml file\")\n    result.add_option(\"--cat\", default=False, action=\"store_true\",\n                      help=\"Print packaged test code that would be run\")\n    result.add_option(\"--summary\", default=False, action=\"store_true\",\n                      help=\"Print summary after running tests\")\n    result.add_option(\"--full-summary\", default=False, action=\"store_true\",\n                      help=\"Print summary and test output after running tests\")\n    result.add_option(\"--strict_only\", default=False, action=\"store_true\",\n                      help=\"Test only strict mode\")\n    result.add_option(\"--non_strict_only\", default=False, action=\"store_true\",\n                      help=\"Test only non-strict mode\")\n    result.add_option(\"--unmarked_default\", default=\"both\",\n                      help=\"default mode for tests of unspecified strictness\")\n    result.add_option(\"-j\", \"--job-count\", default=None, action=\"store\", type=int,\n                      help=\"Number of parallel test jobs to run. In case of '0' cpu count is used.\")\n    result.add_option(\"--logname\", help=\"Filename to save stdout to\")\n    result.add_option(\"--loglevel\", default=\"warning\",\n                      help=\"sets log level to debug, info, warning, error, or critical\")\n    result.add_option(\"--print-handle\", default=\"print\",\n                      help=\"Command to print from console\")\n    result.add_option(\"--list-includes\", default=False, action=\"store_true\",\n                      help=\"List includes required by tests\")\n    result.add_option(\"--module-flag\", default=\"-m\",\n                      help=\"List includes required by tests\")\n    return result\n\n\ndef validate_options(options):\n    if not options.command:\n        report_error(\"A --command must be specified.\")\n    if not path.exists(options.tests):\n        report_error(\"Couldn't find test path '%s'\" % options.tests)\n\n\ndef is_windows():\n    actual_platform = platform.system()\n    return (actual_platform == 'Windows') or (actual_platform == 'Microsoft')\n\n\nclass TempFile(object):\n\n    def __init__(self, suffix=\"\", prefix=\"tmp\", text=False):\n        self.suffix = suffix\n        self.prefix = prefix\n        self.text = text\n        self.file_desc = None\n        self.name = None\n        self.is_closed = False\n        self.open_file()\n\n    def open_file(self):\n        (self.file_desc, self.name) = tempfile.mkstemp(\n            suffix=self.suffix,\n            prefix=self.prefix,\n            text=self.text)\n\n    def write(self, string):\n        os.write(self.file_desc, string)\n\n    def read(self):\n        file_desc = file(self.name)\n        result = file_desc.read()\n        file_desc.close()\n        return result\n\n    def close(self):\n        if not self.is_closed:\n            self.is_closed = True\n            os.close(self.file_desc)\n\n    def dispose(self):\n        try:\n            self.close()\n            os.unlink(self.name)\n        except OSError as exception:\n            logging.error(\"Error disposing temp file: %s\", str(exception))\n\n\nclass TestResult(object):\n\n    def __init__(self, exit_code, stdout, stderr, case):\n        self.exit_code = exit_code\n        self.stdout = stdout\n        self.stderr = stderr\n        self.case = case\n\n    def report_outcome(self, long_format):\n        name = self.case.get_name()\n        mode = self.case.get_mode()\n        if self.has_unexpected_outcome():\n            if self.case.is_negative():\n                print(\"=== %s passed in %s, but was expected to fail ===\" % (name, mode))\n                print(\"--- expected error: %s ---\\n\" % self.case.get_negative_type())\n            else:\n                if long_format:\n                    print(\"=== %s failed in %s ===\" % (name, mode))\n                else:\n                    print(\"%s in %s: \" % (name, mode))\n            self.write_output(sys.stdout)\n            if long_format:\n                print(\"===\")\n        elif self.case.is_negative():\n            print(\"%s failed in %s as expected\" % (name, mode))\n        else:\n            print(\"%s passed in %s\" % (name, mode))\n\n    def write_output(self, target):\n        out = self.stdout.strip()\n        if out:\n            target.write(\"--- output --- \\n %s\" % out)\n        error = self.stderr.strip()\n        if error:\n            target.write(\"--- errors ---  \\n %s\" % error)\n\n        target.write(\"\\n--- exit code: %d ---\\n\" % self.exit_code)\n\n    def has_failed(self):\n        return self.exit_code != 0\n\n    def async_has_failed(self):\n        return 'Test262:AsyncTestComplete' not in self.stdout\n\n    def has_unexpected_outcome(self):\n        if self.case.is_async_test():\n            return self.async_has_failed() or self.has_failed()\n        elif self.case.is_negative():\n            return not (self.has_failed() and self.case.negative_match(self.get_error_output()))\n\n        return self.has_failed()\n\n    def get_error_output(self):\n        if self.stderr:\n            return self.stderr\n        return self.stdout\n\n\nclass TestCase(object):\n\n    def __init__(self, suite, name, full_path, strict_mode, command_template, module_flag):\n        self.suite = suite\n        self.name = name\n        self.full_path = full_path\n        self.strict_mode = strict_mode\n        with open(self.full_path) as file_desc:\n            self.contents = file_desc.read()\n        test_record = parse_test_record(self.contents, name)\n        self.test = test_record[\"test\"]\n        del test_record[\"test\"]\n        del test_record[\"header\"]\n        test_record.pop(\"commentary\", None)    # do not throw if missing\n        self.test_record = test_record\n        self.command_template = command_template\n        self.module_flag = module_flag\n\n        self.validate()\n\n    def negative_match(self, stderr):\n        neg = re.compile(self.get_negative_type())\n        return re.search(neg, stderr)\n\n    def get_negative(self):\n        if not self.is_negative():\n            return None\n        return self.test_record[\"negative\"]\n\n    def get_negative_type(self):\n        negative = self.get_negative()\n        if isinstance(negative, dict) and \"type\" in negative:\n            return negative[\"type\"]\n        return negative\n\n    def get_negative_phase(self):\n        negative = self.get_negative()\n        return negative and \"phase\" in negative and negative[\"phase\"]\n\n    def get_name(self):\n        return path.join(*self.name)\n\n    def get_mode(self):\n        if self.strict_mode:\n            return \"strict mode\"\n        return \"non-strict mode\"\n\n    def get_path(self):\n        return self.name\n\n    def is_negative(self):\n        return 'negative' in self.test_record\n\n    def is_only_strict(self):\n        return 'onlyStrict' in self.test_record\n\n    def is_no_strict(self):\n        return 'noStrict' in self.test_record or self.is_raw()\n\n    def is_raw(self):\n        return 'raw' in self.test_record\n\n    def is_async_test(self):\n        return 'async' in self.test_record or '$DONE' in self.test\n\n    def is_module(self):\n        return 'module' in self.test_record\n\n    def get_include_list(self):\n        if self.test_record.get('includes'):\n            return self.test_record['includes']\n        return []\n\n    def get_additional_includes(self):\n        return '\\n'.join([self.suite.get_include(include) for include in self.get_include_list()])\n\n    def get_source(self):\n        if self.is_raw():\n            return self.test\n\n        source = self.suite.get_include(\"sta.js\") + \\\n            self.suite.get_include(\"assert.js\")\n\n        if self.is_async_test():\n            source = source + \\\n                self.suite.get_include(\"timer.js\") + \\\n                self.suite.get_include(\"doneprintHandle.js\").replace(\n                    'print', self.suite.print_handle)\n\n        source = source + \\\n            self.get_additional_includes() + \\\n            self.test + '\\n'\n\n        if self.get_negative_phase() == \"early\":\n            source = (\"throw 'Expected an early error, but code was executed.';\\n\" +\n                      source)\n\n        if self.strict_mode:\n            source = '\"use strict\";\\nvar strict_mode = true;\\n' + source\n        else:\n            # add comment line so line numbers match in both strict and non-strict version\n            source = '//\"no strict\";\\nvar strict_mode = false;\\n' + source\n\n        return source\n\n    @staticmethod\n    def instantiate_template(template, params):\n        def get_parameter(match):\n            key = match.group(1)\n            return params.get(key, match.group(0))\n\n        return re.sub(r\"\\{\\{(\\w+)\\}\\}\", get_parameter, template)\n\n    @staticmethod\n    def execute(command):\n        if is_windows():\n            args = '%s' % command\n        else:\n            args = command.split(\" \")\n        stdout = TempFile(prefix=\"test262-out-\")\n        stderr = TempFile(prefix=\"test262-err-\")\n        try:\n            logging.info(\"exec: %s\", str(args))\n            process = subprocess.Popen(\n                args,\n                shell=False,\n                stdout=stdout.file_desc,\n                stderr=stderr.file_desc\n            )\n            timer = threading.Timer(TEST262_CASE_TIMEOUT, process.kill)\n            timer.start()\n            code = process.wait()\n            timer.cancel()\n            out = stdout.read()\n            err = stderr.read()\n        finally:\n            stdout.dispose()\n            stderr.dispose()\n        return (code, out, err)\n\n    def run_test_in(self, tmp):\n        tmp.write(self.get_source())\n        tmp.close()\n\n        if self.is_module():\n            arg = self.module_flag + ' ' + tmp.name\n        else:\n            arg = tmp.name\n\n        command = TestCase.instantiate_template(self.command_template, {\n            'path': arg\n        })\n\n        (code, out, err) = TestCase.execute(command)\n        return TestResult(code, out, err, self)\n\n    def run(self):\n        tmp = TempFile(suffix=\".js\", prefix=\"test262-\", text=True)\n        try:\n            result = self.run_test_in(tmp)\n        finally:\n            tmp.dispose()\n        return result\n\n    def print_source(self):\n        print(self.get_source())\n\n    def validate(self):\n        flags = self.test_record.get(\"flags\")\n        phase = self.get_negative_phase()\n\n        if phase not in [None, False, \"parse\", \"early\", \"runtime\", \"resolution\"]:\n            raise TypeError(\"Invalid value for negative phase: \" + phase)\n\n        if not flags:\n            return\n\n        if 'raw' in flags:\n            if 'noStrict' in flags:\n                raise TypeError(\"The `raw` flag implies the `noStrict` flag\")\n            elif 'onlyStrict' in flags:\n                raise TypeError(\n                    \"The `raw` flag is incompatible with the `onlyStrict` flag\")\n            elif self.get_include_list():\n                raise TypeError(\n                    \"The `raw` flag is incompatible with the `includes` tag\")\n\n\ndef pool_init():\n    \"\"\"Ignore CTRL+C in the worker process.\"\"\"\n    signal.signal(signal.SIGINT, signal.SIG_IGN)\n\n\ndef test_case_run_process(case):\n    return case.run()\n\n\nclass ProgressIndicator(object):\n\n    def __init__(self, count):\n        self.count = count\n        self.succeeded = 0\n        self.failed = 0\n        self.failed_tests = []\n\n    def has_run(self, result):\n        result.report_outcome(True)\n        if result.has_unexpected_outcome():\n            self.failed += 1\n            self.failed_tests.append(result)\n        else:\n            self.succeeded += 1\n\n\ndef make_plural(num):\n    if num == 1:\n        return (num, \"\")\n    return (num, \"s\")\n\n\ndef percent_format(partial, total):\n    return \"%i test%s (%.1f%%)\" % (make_plural(partial) +\n                                   ((100.0 * partial)/total,))\n\n\nclass TestSuite(object):\n\n    def __init__(self, options):\n        self.test_root = path.join(options.tests, 'test')\n        self.lib_root = path.join(options.tests, 'harness')\n        self.strict_only = options.strict_only\n        self.non_strict_only = options.non_strict_only\n        self.unmarked_default = options.unmarked_default\n        self.print_handle = options.print_handle\n        self.include_cache = {}\n        self.exclude_list_path = options.exclude_list\n        self.module_flag = options.module_flag\n        self.logf = None\n\n    def _load_excludes(self):\n        if self.exclude_list_path and os.path.exists(self.exclude_list_path):\n            xml_document = xml.dom.minidom.parse(self.exclude_list_path)\n            xml_tests = xml_document.getElementsByTagName(\"test\")\n            return {x.getAttribute(\"id\") for x in xml_tests}\n\n        return set()\n\n    def validate(self):\n        if not path.exists(self.test_root):\n            report_error(\"No test repository found\")\n        if not path.exists(self.lib_root):\n            report_error(\"No test library found\")\n\n    @staticmethod\n    def is_hidden(test_path):\n        return test_path.startswith('.') or test_path == 'CVS'\n\n    @staticmethod\n    def is_test_case(test_path):\n        return test_path.endswith('.js') and not test_path.endswith('_FIXTURE.js')\n\n    @staticmethod\n    def should_run(rel_path, tests):\n        if not tests:\n            return True\n        for test in tests:\n            if test in rel_path:\n                return True\n        return False\n\n    def get_include(self, name):\n        if not name in self.include_cache:\n            static = path.join(self.lib_root, name)\n            if path.exists(static):\n                with open(static) as file_desc:\n                    contents = file_desc.read()\n                    contents = re.sub(r'\\r\\n', '\\n', contents)\n                    self.include_cache[name] = contents + \"\\n\"\n            else:\n                report_error(\"Can't find: \" + static)\n        return self.include_cache[name]\n\n    def enumerate_tests(self, tests, command_template):\n        exclude_list = self._load_excludes()\n\n        logging.info(\"Listing tests in %s\", self.test_root)\n        cases = []\n        for root, dirs, files in os.walk(self.test_root):\n            for hidden_dir in [x for x in dirs if self.is_hidden(x)]:\n                dirs.remove(hidden_dir)\n            dirs.sort()\n            for test_path in filter(TestSuite.is_test_case, sorted(files)):\n                full_path = path.join(root, test_path)\n                if full_path.startswith(self.test_root):\n                    rel_path = full_path[len(self.test_root)+1:]\n                else:\n                    logging.warning(\"Unexpected path %s\", full_path)\n                    rel_path = full_path\n                if self.should_run(rel_path, tests):\n                    basename = path.basename(full_path)[:-3]\n                    name = rel_path.split(path.sep)[:-1] + [basename]\n                    if rel_path in exclude_list:\n                        print('Excluded: ' + rel_path)\n                    else:\n                        if not self.non_strict_only:\n                            strict_case = TestCase(self, name, full_path, True, command_template, self.module_flag)\n                            if not strict_case.is_no_strict():\n                                if strict_case.is_only_strict() or self.unmarked_default in ['both', 'strict']:\n                                    cases.append(strict_case)\n                        if not self.strict_only:\n                            non_strict_case = TestCase(self, name, full_path, False, command_template, self.module_flag)\n                            if not non_strict_case.is_only_strict():\n                                if non_strict_case.is_no_strict() or self.unmarked_default in ['both', 'non_strict']:\n                                    cases.append(non_strict_case)\n        logging.info(\"Done listing tests\")\n        return cases\n\n    def print_summary(self, progress, logfile):\n\n        def write(string):\n            if logfile:\n                self.logf.write(string + \"\\n\")\n            print(string)\n\n        print(\"\")\n        write(\"=== Summary ===\")\n        count = progress.count\n        succeeded = progress.succeeded\n        failed = progress.failed\n        write(\" - Ran %i test%s\" % make_plural(count))\n        if progress.failed == 0:\n            write(\" - All tests succeeded\")\n        else:\n            write(\" - Passed \" + percent_format(succeeded, count))\n            write(\" - Failed \" + percent_format(failed, count))\n            positive = [c for c in progress.failed_tests if not c.case.is_negative()]\n            negative = [c for c in progress.failed_tests if c.case.is_negative()]\n            if positive:\n                print(\"\")\n                write(\"Failed Tests\")\n                for result in positive:\n                    write(\"  %s in %s\" % (result.case.get_name(), result.case.get_mode()))\n            if negative:\n                print(\"\")\n                write(\"Expected to fail but passed ---\")\n                for result in negative:\n                    write(\"  %s in %s\" % (result.case.get_name(), result.case.get_mode()))\n\n    def print_failure_output(self, progress, logfile):\n        for result in progress.failed_tests:\n            if logfile:\n                self.write_log(result)\n            print(\"\")\n            result.report_outcome(False)\n\n    def run(self, command_template, tests, print_summary, full_summary, logname, job_count=1):\n        if not \"{{path}}\" in command_template:\n            command_template += \" {{path}}\"\n        cases = self.enumerate_tests(tests, command_template)\n        if not cases:\n            report_error(\"No tests to run\")\n        progress = ProgressIndicator(len(cases))\n        if logname:\n            self.logf = open(logname, \"w\")\n\n        if job_count == 1:\n            for case in cases:\n                result = case.run()\n                if logname:\n                    self.write_log(result)\n                progress.has_run(result)\n        else:\n            if job_count == 0:\n                job_count = None # uses multiprocessing.cpu_count()\n\n            pool = multiprocessing.Pool(processes=job_count, initializer=pool_init)\n            try:\n                for result in pool.imap(test_case_run_process, cases):\n                    if logname:\n                        self.write_log(result)\n                    progress.has_run(result)\n            except KeyboardInterrupt:\n                pool.terminate()\n                pool.join()\n\n        if print_summary:\n            self.print_summary(progress, logname)\n            if full_summary:\n                self.print_failure_output(progress, logname)\n            else:\n                print(\"\")\n                print(\"Use --full-summary to see output from failed tests\")\n        print(\"\")\n        return progress.failed\n\n    def write_log(self, result):\n        name = result.case.get_name()\n        mode = result.case.get_mode()\n        if result.has_unexpected_outcome():\n            if result.case.is_negative():\n                self.logf.write(\n                    \"=== %s passed in %s, but was expected to fail === \\n\" % (name, mode))\n                self.logf.write(\"--- expected error: %s ---\\n\" % result.case.GetNegativeType())\n                result.write_output(self.logf)\n            else:\n                self.logf.write(\"=== %s failed in %s === \\n\" % (name, mode))\n                result.write_output(self.logf)\n            self.logf.write(\"===\\n\")\n        elif result.case.is_negative():\n            self.logf.write(\"%s failed in %s as expected \\n\" % (name, mode))\n        else:\n            self.logf.write(\"%s passed in %s \\n\" % (name, mode))\n\n    def print_source(self, tests):\n        cases = self.enumerate_tests(tests, \"\")\n        if cases:\n            cases[0].print_source()\n\n    def list_includes(self, tests):\n        cases = self.enumerate_tests(tests, \"\")\n        includes_dict = Counter()\n        for case in cases:\n            includes = case.get_include_list()\n            includes_dict.update(includes)\n\n        print(includes_dict)\n\n\ndef main():\n    code = 0\n    parser = build_options()\n    (options, args) = parser.parse_args()\n    validate_options(options)\n\n    test_suite = TestSuite(options)\n\n    test_suite.validate()\n    if options.loglevel == 'debug':\n        logging.basicConfig(level=logging.DEBUG)\n    elif options.loglevel == 'info':\n        logging.basicConfig(level=logging.INFO)\n    elif options.loglevel == 'warning':\n        logging.basicConfig(level=logging.WARNING)\n    elif options.loglevel == 'error':\n        logging.basicConfig(level=logging.ERROR)\n    elif options.loglevel == 'critical':\n        logging.basicConfig(level=logging.CRITICAL)\n\n    if options.cat:\n        test_suite.print_source(args)\n    elif options.list_includes:\n        test_suite.list_includes(args)\n    else:\n        code = test_suite.run(options.command, args,\n                              options.summary or options.full_summary,\n                              options.full_summary,\n                              options.logname,\n                              options.job_count)\n    return code\n\n\nif __name__ == '__main__':\n    try:\n        sys.exit(main())\n    except Test262Error as exception:\n        print(\"Error: %s\" % exception.message)\n        sys.exit(1)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/runners/util.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\nimport signal\nimport subprocess\nimport sys\n\nTERM_NORMAL = '\\033[0m'\nTERM_RED = '\\033[1;31m'\nTERM_GREEN = '\\033[1;32m'\n\n\ndef set_timezone(timezone):\n    assert sys.platform == 'win32', \"set_timezone is Windows only function\"\n    subprocess.call(['cmd', '/S', '/C', 'tzutil', '/s', timezone])\n\n\ndef set_timezone_and_exit(timezone):\n    assert sys.platform == 'win32', \"set_timezone_and_exit is Windows only function\"\n    set_timezone(timezone)\n    sys.exit(1)\n\n\ndef get_timezone():\n    assert sys.platform == 'win32', \"get_timezone is Windows only function\"\n    return subprocess.check_output(['cmd', '/S', '/C', 'tzutil', '/g'], universal_newlines=True)\n\n\ndef set_sighdl_to_reset_timezone(timezone):\n    assert sys.platform == 'win32', \"install_signal_handler_to_restore_timezone is Windows only function\"\n    signal.signal(signal.SIGINT, lambda signal, frame: set_timezone_and_exit(timezone))\n\n\ndef print_test_summary(summary_string, total, passed, failed):\n    print(\"\\n[summary] %s\\n\" % summary_string)\n    print(\"TOTAL: %d\" % total)\n    print(\"%sPASS: %d%s\" % (TERM_GREEN, passed, TERM_NORMAL))\n    print(\"%sFAIL: %d%s\\n\" % (TERM_RED, failed, TERM_NORMAL))\n\n    success_color = TERM_GREEN if passed == total else TERM_RED\n    print(\"%sSuccess: %d%%%s\" % (success_color, passed*100/total, TERM_NORMAL))\n\n\ndef print_test_result(tested, total, is_passed, passed_string, test_path, is_snapshot_generation=None):\n    if is_snapshot_generation is None:\n        snapshot_string = ''\n    elif is_snapshot_generation:\n        snapshot_string = ' (generate snapshot)'\n    else:\n        snapshot_string = ' (execute snapshot)'\n\n    color = TERM_GREEN if is_passed else TERM_RED\n    print(\"[%4d/%4d] %s%s: %s%s%s\" % (tested, total, color, passed_string, test_path, snapshot_string, TERM_NORMAL))\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/settings.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom os import path\n\nTOOLS_DIR = path.dirname(path.abspath(__file__))\nPROJECT_DIR = path.normpath(path.join(TOOLS_DIR, '..'))\nDEBUGGER_TESTS_DIR = path.join(PROJECT_DIR, 'tests/debugger')\nJERRY_TESTS_DIR = path.join(PROJECT_DIR, 'tests/jerry')\nTEST262_TEST_SUITE_DIR = path.join(PROJECT_DIR, 'tests/test262')\n\nBUILD_SCRIPT = path.join(TOOLS_DIR, 'build.py')\nCPPCHECK_SCRIPT = path.join(TOOLS_DIR, 'check-cppcheck.sh')\nDEBUGGER_CLIENT_SCRIPT = path.join(PROJECT_DIR, 'jerry-debugger/jerry_client.py')\nDEBUGGER_TEST_RUNNER_SCRIPT = path.join(TOOLS_DIR, 'runners/run-debugger-test.sh')\nDOXYGEN_SCRIPT = path.join(TOOLS_DIR, 'check-doxygen.sh')\nLICENSE_SCRIPT = path.join(TOOLS_DIR, 'check-license.py')\nMAGIC_STRINGS_SCRIPT = path.join(TOOLS_DIR, 'check-magic-strings.sh')\nPYLINT_SCRIPT = path.join(TOOLS_DIR, 'check-pylint.sh')\nSIGNED_OFF_SCRIPT = path.join(TOOLS_DIR, 'check-signed-off.sh')\nTEST_RUNNER_SCRIPT = path.join(TOOLS_DIR, 'runners/run-test-suite.py')\nTEST262_RUNNER_SCRIPT = path.join(TOOLS_DIR, 'runners/run-test-suite-test262.py')\nVERA_SCRIPT = path.join(TOOLS_DIR, 'check-vera.sh')\nUNITTEST_RUNNER_SCRIPT = path.join(TOOLS_DIR, 'runners/run-unittests.py')\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/unit-tests/Makefile",
    "content": "# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nCC=gcc\nLDFLAGS=-lm\n\nGENS=gen-test-math\n\n.PHONY: build\nbuild: $(GENS)\n\n.PHONY: clean\nclean:\n\trm -f $(GENS)\n\ngen-test-math: gen-test-math.c\n\t$(CC) $< -o $@ $(LDFLAGS)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/unit-tests/gen-test-math.c",
    "content": "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Unit test generator for jerry-math.\n * To be compiled separately from the rest of jerry and to be linked to a trusted libm.\n * Its output should be redirected to test-math.inc.h.\n *\n * Example:\n * gcc gen-test-math.c -o gen-test-math -lm\n * ./gen-test-math >test-math.inc.h\n */\n\n#include <math.h>\n#include <stdio.h>\n\n#define GEN_INT_TEST(EXPR) printf(\"check_int (\\\"%s\\\", %s, %d);\\n\", #EXPR, #EXPR, EXPR);\n#define GEN_DBL_TEST(EXPR) printf(\"check_double (\\\"%s\\\", %s, %.20E);\\n\", #EXPR, #EXPR, EXPR);\n\nint\nmain (int argc, char **args)\n{\n  printf (\"/* Copyright JS Foundation and other contributors, http://js.foundation\\n\"\n          \" *\\n\"\n          \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n          \" * you may not use this file except in compliance with the License.\\n\"\n          \" * You may obtain a copy of the License at\\n\"\n          \" *\\n\"\n          \" *     http://www.apache.org/licenses/LICENSE-2.0\\n\"\n          \" *\\n\"\n          \" * Unless required by applicable law or agreed to in writing, software\\n\"\n          \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS\\n\"\n          \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n          \" * See the License for the specific language governing permissions and\\n\"\n          \" * limitations under the License.\\n\"\n          \" */\\n\"\n          \"\\n\"\n          \"/* This file is automatically generated by the gen-test-math.sh script.\\n\"\n          \" * Do not edit! */\\n\"\n          \"\\n\");\n\n  /* acos tests */\n  GEN_DBL_TEST (acos (0.0));\n  GEN_DBL_TEST (acos (-0.0));\n  GEN_DBL_TEST (acos (1.0));\n  GEN_DBL_TEST (acos (-1.0));\n  GEN_DBL_TEST (acos (0.5));\n  GEN_DBL_TEST (acos (-0.5));\n  GEN_DBL_TEST (acos (INFINITY));\n  GEN_DBL_TEST (acos (-INFINITY));\n  GEN_DBL_TEST (acos (NAN));\n  GEN_DBL_TEST (acos (6.9e-18));\n  GEN_DBL_TEST (acos (-6.9e-18));\n  GEN_DBL_TEST (acos (7.0e-18));\n  GEN_DBL_TEST (acos (-7.0e-18));\n  GEN_DBL_TEST (acos (7.4e-9));\n  GEN_DBL_TEST (acos (-7.4e-9));\n  GEN_DBL_TEST (acos (7.5e-9));\n  GEN_DBL_TEST (acos (-7.5e-9));\n  GEN_DBL_TEST (acos (0.1));\n  GEN_DBL_TEST (acos (-0.1));\n  GEN_DBL_TEST (acos (0.4));\n  GEN_DBL_TEST (acos (-0.4));\n  GEN_DBL_TEST (acos (0.6));\n  GEN_DBL_TEST (acos (-0.6));\n  GEN_DBL_TEST (acos (0.99));\n  GEN_DBL_TEST (acos (-0.99));\n  GEN_DBL_TEST (acos (1.1));\n  GEN_DBL_TEST (acos (-1.1));\n  GEN_DBL_TEST (acos (0.7));\n\n  /* asin tests*/\n  GEN_DBL_TEST (asin (0.0));\n  GEN_DBL_TEST (asin (-0.0));\n  GEN_DBL_TEST (asin (1.0));\n  GEN_DBL_TEST (asin (-1.0));\n  GEN_DBL_TEST (asin (0.5));\n  GEN_DBL_TEST (asin (-0.5));\n  GEN_DBL_TEST (asin (0.98));\n  GEN_DBL_TEST (asin (-0.98));\n  GEN_DBL_TEST (asin (INFINITY));\n  GEN_DBL_TEST (asin (-INFINITY));\n  GEN_DBL_TEST (asin (NAN));\n  GEN_DBL_TEST (asin (6.9e-18));\n  GEN_DBL_TEST (asin (-6.9e-18));\n  GEN_DBL_TEST (asin (7.0e-18));\n  GEN_DBL_TEST (asin (-7.0e-18));\n  GEN_DBL_TEST (asin (7.4e-9));\n  GEN_DBL_TEST (asin (-7.4e-9));\n  GEN_DBL_TEST (asin (7.5e-9));\n  GEN_DBL_TEST (asin (-7.5e-9));\n  GEN_DBL_TEST (asin (0.1));\n  GEN_DBL_TEST (asin (-0.1));\n  GEN_DBL_TEST (asin (0.4));\n  GEN_DBL_TEST (asin (-0.4));\n  GEN_DBL_TEST (asin (0.6));\n  GEN_DBL_TEST (asin (-0.6));\n  GEN_DBL_TEST (asin (0.97));\n  GEN_DBL_TEST (asin (-0.97));\n  GEN_DBL_TEST (asin (0.99));\n  GEN_DBL_TEST (asin (-0.99));\n  GEN_DBL_TEST (asin (1.1));\n  GEN_DBL_TEST (asin (-1.1));\n  GEN_DBL_TEST (asin (0.7));\n\n  /* atan tests*/\n  GEN_DBL_TEST (atan (0.0));\n  GEN_DBL_TEST (atan (-0.0));\n  GEN_DBL_TEST (atan (7.0 / 16.0));\n  GEN_DBL_TEST (atan (-7.0 / 16.0));\n  GEN_DBL_TEST (atan (11.0 / 16.0));\n  GEN_DBL_TEST (atan (-11.0 / 16.0));\n  GEN_DBL_TEST (atan (19.0 / 16.0));\n  GEN_DBL_TEST (atan (-19.0 / 16.0));\n  GEN_DBL_TEST (atan (39.0 / 16.0));\n  GEN_DBL_TEST (atan (-39.0 / 16.0));\n  GEN_DBL_TEST (atan (1.0));\n  GEN_DBL_TEST (atan (-1.0));\n  GEN_DBL_TEST (atan (INFINITY));\n  GEN_DBL_TEST (atan (-INFINITY));\n  GEN_DBL_TEST (atan (NAN));\n  GEN_DBL_TEST (atan (6.9 / 16.0));\n  GEN_DBL_TEST (atan (-6.9 / 16.0));\n  GEN_DBL_TEST (atan (7.1 / 16.0));\n  GEN_DBL_TEST (atan (-7.1 / 16.0));\n  GEN_DBL_TEST (atan (10.9 / 16.0));\n  GEN_DBL_TEST (atan (-10.9 / 16.0));\n  GEN_DBL_TEST (atan (11.1 / 16.0));\n  GEN_DBL_TEST (atan (-11.1 / 16.0));\n  GEN_DBL_TEST (atan (18.9 / 16.0));\n  GEN_DBL_TEST (atan (-18.9 / 16.0));\n  GEN_DBL_TEST (atan (19.1 / 16.0));\n  GEN_DBL_TEST (atan (-19.1 / 16.0));\n  GEN_DBL_TEST (atan (38.9 / 16.0));\n  GEN_DBL_TEST (atan (-38.9 / 16.0));\n  GEN_DBL_TEST (atan (39.1 / 16.0));\n  GEN_DBL_TEST (atan (-39.1 / 16.0));\n  GEN_DBL_TEST (atan (0.99));\n  GEN_DBL_TEST (atan (-0.99));\n  GEN_DBL_TEST (atan (1.1));\n  GEN_DBL_TEST (atan (-1.1));\n  GEN_DBL_TEST (atan (7.37e+19));\n  GEN_DBL_TEST (atan (-7.37e+19));\n  GEN_DBL_TEST (atan (7.38e+19));\n  GEN_DBL_TEST (atan (-7.38e+19));\n  GEN_DBL_TEST (atan (0.7));\n\n  /* atan2 tests*/\n  GEN_DBL_TEST (atan2 (NAN, NAN));\n  GEN_DBL_TEST (atan2 (0.0, NAN));\n  GEN_DBL_TEST (atan2 (-0.0, NAN));\n  GEN_DBL_TEST (atan2 (1.0, NAN));\n  GEN_DBL_TEST (atan2 (-1.0, NAN));\n  GEN_DBL_TEST (atan2 (INFINITY, NAN));\n  GEN_DBL_TEST (atan2 (-INFINITY, NAN));\n  GEN_DBL_TEST (atan2 (NAN, 0.0));\n  GEN_DBL_TEST (atan2 (NAN, -0.0));\n  GEN_DBL_TEST (atan2 (NAN, 1.0));\n  GEN_DBL_TEST (atan2 (NAN, -1.0));\n  GEN_DBL_TEST (atan2 (NAN, INFINITY));\n  GEN_DBL_TEST (atan2 (NAN, -INFINITY));\n  GEN_DBL_TEST (atan2 (0.0, 0.0));\n  GEN_DBL_TEST (atan2 (0.0, -0.0));\n  GEN_DBL_TEST (atan2 (-0.0, 0.0));\n  GEN_DBL_TEST (atan2 (-0.0, -0.0));\n  GEN_DBL_TEST (atan2 (0.0, 1.0));\n  GEN_DBL_TEST (atan2 (0.0, -1.0));\n  GEN_DBL_TEST (atan2 (0.0, INFINITY));\n  GEN_DBL_TEST (atan2 (0.0, -INFINITY));\n  GEN_DBL_TEST (atan2 (-0.0, 1.0));\n  GEN_DBL_TEST (atan2 (-0.0, -1.0));\n  GEN_DBL_TEST (atan2 (-0.0, INFINITY));\n  GEN_DBL_TEST (atan2 (-0.0, -INFINITY));\n  GEN_DBL_TEST (atan2 (1.0, 0.0));\n  GEN_DBL_TEST (atan2 (1.0, -0.0));\n  GEN_DBL_TEST (atan2 (INFINITY, 0.0));\n  GEN_DBL_TEST (atan2 (INFINITY, -0.0));\n  GEN_DBL_TEST (atan2 (-1.0, 0.0));\n  GEN_DBL_TEST (atan2 (-1.0, -0.0));\n  GEN_DBL_TEST (atan2 (-INFINITY, 0.0));\n  GEN_DBL_TEST (atan2 (-INFINITY, -0.0));\n  GEN_DBL_TEST (atan2 (1.0, INFINITY));\n  GEN_DBL_TEST (atan2 (-1.0, INFINITY));\n  GEN_DBL_TEST (atan2 (1.0, -INFINITY));\n  GEN_DBL_TEST (atan2 (-1.0, -INFINITY));\n  GEN_DBL_TEST (atan2 (INFINITY, INFINITY));\n  GEN_DBL_TEST (atan2 (INFINITY, -INFINITY));\n  GEN_DBL_TEST (atan2 (-INFINITY, INFINITY));\n  GEN_DBL_TEST (atan2 (-INFINITY, -INFINITY));\n  GEN_DBL_TEST (atan2 (INFINITY, 1.0));\n  GEN_DBL_TEST (atan2 (INFINITY, -1.0));\n  GEN_DBL_TEST (atan2 (-INFINITY, 1.0));\n  GEN_DBL_TEST (atan2 (-INFINITY, -1.0));\n  GEN_DBL_TEST (atan2 (0.7, 1.0));\n  GEN_DBL_TEST (atan2 (-0.7, 1.0));\n  GEN_DBL_TEST (atan2 (0.7, -1.0));\n  GEN_DBL_TEST (atan2 (-0.7, -1.0));\n  GEN_DBL_TEST (atan2 (0.4, 0.0003));\n  GEN_DBL_TEST (atan2 (1.4, -0.93));\n\n  /* acosh tests */\n  GEN_DBL_TEST (acosh (0.0));\n  GEN_DBL_TEST (acosh (-0.0));\n  GEN_DBL_TEST (acosh (1.0));\n  GEN_DBL_TEST (acosh (-1.0));\n  GEN_DBL_TEST (acosh (INFINITY));\n  GEN_DBL_TEST (acosh (-INFINITY));\n  GEN_DBL_TEST (acosh (NAN));\n  GEN_DBL_TEST (acosh (7.08e+02));\n  GEN_DBL_TEST (acosh (7.10e+02));\n  GEN_DBL_TEST (acosh (-7.40e+02));\n  GEN_DBL_TEST (acosh (-7.50e+02));\n  GEN_DBL_TEST (acosh (0.34));\n  GEN_DBL_TEST (acosh (-0.34));\n  GEN_DBL_TEST (acosh (0.35));\n  GEN_DBL_TEST (acosh (-0.35));\n  GEN_DBL_TEST (acosh (1.03));\n  GEN_DBL_TEST (acosh (-1.03));\n  GEN_DBL_TEST (acosh (1.04));\n  GEN_DBL_TEST (acosh (-1.04));\n  GEN_DBL_TEST (acosh (3.72e-09));\n  GEN_DBL_TEST (acosh (-3.72e-09));\n  GEN_DBL_TEST (acosh (3.73e-09));\n  GEN_DBL_TEST (acosh (-3.73e-09));\n  GEN_DBL_TEST (acosh (2.0));\n  GEN_DBL_TEST (acosh (3.0));\n  GEN_DBL_TEST (acosh (0.7));\n  GEN_DBL_TEST (acosh (38.0));\n\n  /* asinh tests */\n  GEN_DBL_TEST (asinh (0.0));\n  GEN_DBL_TEST (asinh (-0.0));\n  GEN_DBL_TEST (asinh (1.0));\n  GEN_DBL_TEST (asinh (-1.0));\n  GEN_DBL_TEST (asinh (INFINITY));\n  GEN_DBL_TEST (asinh (-INFINITY));\n  GEN_DBL_TEST (asinh (NAN));\n  GEN_DBL_TEST (asinh (7.08e+02));\n  GEN_DBL_TEST (asinh (7.10e+02));\n  GEN_DBL_TEST (asinh (-7.40e+02));\n  GEN_DBL_TEST (asinh (-7.50e+02));\n  GEN_DBL_TEST (asinh (0.34));\n  GEN_DBL_TEST (asinh (-0.34));\n  GEN_DBL_TEST (asinh (0.35));\n  GEN_DBL_TEST (asinh (-0.35));\n  GEN_DBL_TEST (asinh (1.03));\n  GEN_DBL_TEST (asinh (-1.03));\n  GEN_DBL_TEST (asinh (1.04));\n  GEN_DBL_TEST (asinh (-1.04));\n  GEN_DBL_TEST (asinh (3.72e-09));\n  GEN_DBL_TEST (asinh (-3.72e-09));\n  GEN_DBL_TEST (asinh (3.73e-09));\n  GEN_DBL_TEST (asinh (-3.73e-09));\n  GEN_DBL_TEST (asinh (2.0));\n  GEN_DBL_TEST (asinh (3.0));\n  GEN_DBL_TEST (asinh (0.7));\n  GEN_DBL_TEST (asinh (38.0));\n\n  /* atanh tests */\n  GEN_DBL_TEST (atanh (0.0));\n  GEN_DBL_TEST (atanh (-0.0));\n  GEN_DBL_TEST (atanh (1.0));\n  GEN_DBL_TEST (atanh (-1.0));\n  GEN_DBL_TEST (atanh (INFINITY));\n  GEN_DBL_TEST (atanh (-INFINITY));\n  GEN_DBL_TEST (atanh (NAN));\n  GEN_DBL_TEST (atanh (7.08e+02));\n  GEN_DBL_TEST (atanh (7.10e+02));\n  GEN_DBL_TEST (atanh (-7.40e+02));\n  GEN_DBL_TEST (atanh (-7.50e+02));\n  GEN_DBL_TEST (atanh (0.34));\n  GEN_DBL_TEST (atanh (-0.34));\n  GEN_DBL_TEST (atanh (0.35));\n  GEN_DBL_TEST (atanh (-0.35));\n  GEN_DBL_TEST (atanh (1.03));\n  GEN_DBL_TEST (atanh (-1.03));\n  GEN_DBL_TEST (atanh (1.04));\n  GEN_DBL_TEST (atanh (-1.04));\n  GEN_DBL_TEST (atanh (3.72e-09));\n  GEN_DBL_TEST (atanh (-3.72e-09));\n  GEN_DBL_TEST (atanh (3.73e-09));\n  GEN_DBL_TEST (atanh (-3.73e-09));\n  GEN_DBL_TEST (atanh (2.0));\n  GEN_DBL_TEST (atanh (3.0));\n  GEN_DBL_TEST (atanh (0.7));\n  GEN_DBL_TEST (atanh (38.0));\n\n  /* ceil tests */\n  GEN_DBL_TEST (ceil (0.0));\n  GEN_DBL_TEST (ceil (-0.0));\n  GEN_DBL_TEST (ceil (INFINITY));\n  GEN_DBL_TEST (ceil (-INFINITY));\n  GEN_DBL_TEST (ceil (NAN));\n  GEN_DBL_TEST (ceil (3.14));\n  GEN_DBL_TEST (ceil (-3.14));\n  GEN_DBL_TEST (ceil (3.72e-09));\n  GEN_DBL_TEST (ceil (-3.72e-09));\n  GEN_DBL_TEST (ceil (7.37e+19));\n  GEN_DBL_TEST (ceil (-7.37e+19));\n\n  /* copysign tests */\n  /* SKIPPED: not publicly declared in jerry-math\n  GEN_DBL_TEST (copysign (0.0, 0.0));\n  GEN_DBL_TEST (copysign (0.0, -0.0));\n  GEN_DBL_TEST (copysign (-0.0, 0.0));\n  GEN_DBL_TEST (copysign (-0.0, -0.0));\n  GEN_DBL_TEST (copysign (0.0, 1.0));\n  GEN_DBL_TEST (copysign (0.0, -1.0));\n  GEN_DBL_TEST (copysign (-0.0, 1.0));\n  GEN_DBL_TEST (copysign (-0.0, -1.0));\n  GEN_DBL_TEST (copysign (0.0, INFINITY));\n  GEN_DBL_TEST (copysign (0.0, -INFINITY));\n  GEN_DBL_TEST (copysign (-0.0, INFINITY));\n  GEN_DBL_TEST (copysign (-0.0, -INFINITY));\n  GEN_DBL_TEST (copysign (0.0, NAN));\n  GEN_DBL_TEST (copysign (-0.0, NAN));\n  GEN_DBL_TEST (copysign (1.0, 0.0));\n  GEN_DBL_TEST (copysign (1.0, -0.0));\n  GEN_DBL_TEST (copysign (-1.0, 0.0));\n  GEN_DBL_TEST (copysign (-1.0, -0.0));\n  GEN_DBL_TEST (copysign (1.0, 1.0));\n  GEN_DBL_TEST (copysign (1.0, -1.0));\n  GEN_DBL_TEST (copysign (-1.0, 1.0));\n  GEN_DBL_TEST (copysign (-1.0, -1.0));\n  GEN_DBL_TEST (copysign (1.0, INFINITY));\n  GEN_DBL_TEST (copysign (1.0, -INFINITY));\n  GEN_DBL_TEST (copysign (-1.0, INFINITY));\n  GEN_DBL_TEST (copysign (-1.0, -INFINITY));\n  GEN_DBL_TEST (copysign (1.0, NAN));\n  GEN_DBL_TEST (copysign (-1.0, NAN));\n  GEN_DBL_TEST (copysign (INFINITY, 0.0));\n  GEN_DBL_TEST (copysign (INFINITY, -0.0));\n  GEN_DBL_TEST (copysign (-INFINITY, 0.0));\n  GEN_DBL_TEST (copysign (-INFINITY, -0.0));\n  GEN_DBL_TEST (copysign (INFINITY, 1.0));\n  GEN_DBL_TEST (copysign (INFINITY, -1.0));\n  GEN_DBL_TEST (copysign (-INFINITY, 1.0));\n  GEN_DBL_TEST (copysign (-INFINITY, -1.0));\n  GEN_DBL_TEST (copysign (INFINITY, INFINITY));\n  GEN_DBL_TEST (copysign (INFINITY, -INFINITY));\n  GEN_DBL_TEST (copysign (-INFINITY, INFINITY));\n  GEN_DBL_TEST (copysign (-INFINITY, -INFINITY));\n  GEN_DBL_TEST (copysign (INFINITY, NAN));\n  GEN_DBL_TEST (copysign (-INFINITY, NAN));\n  GEN_DBL_TEST (copysign (NAN, 0.0));\n  GEN_DBL_TEST (copysign (NAN, -0.0));\n  GEN_DBL_TEST (copysign (NAN, 1.0));\n  GEN_DBL_TEST (copysign (NAN, -1.0));\n  GEN_DBL_TEST (copysign (NAN, INFINITY));\n  GEN_DBL_TEST (copysign (NAN, -INFINITY));\n  GEN_DBL_TEST (copysign (NAN, NAN));\n  GEN_DBL_TEST (copysign (3.14, -1.0));\n  GEN_DBL_TEST (copysign (-3.14, 1.0));\n  GEN_DBL_TEST (copysign (1.0, -3.14));\n  GEN_DBL_TEST (copysign (-1.0, 3.14));\n  */\n\n  /* exp tests */\n  GEN_DBL_TEST (exp (0.0));\n  GEN_DBL_TEST (exp (-0.0));\n  GEN_DBL_TEST (exp (1.0));\n  GEN_DBL_TEST (exp (-1.0));\n  GEN_DBL_TEST (exp (INFINITY));\n  GEN_DBL_TEST (exp (-INFINITY));\n  GEN_DBL_TEST (exp (NAN));\n  GEN_DBL_TEST (exp (7.08e+02));\n  GEN_DBL_TEST (exp (7.10e+02));\n  GEN_DBL_TEST (exp (-7.40e+02));\n  GEN_DBL_TEST (exp (-7.50e+02));\n  GEN_DBL_TEST (exp (0.34));\n  GEN_DBL_TEST (exp (-0.34));\n  GEN_DBL_TEST (exp (0.35));\n  GEN_DBL_TEST (exp (-0.35));\n  GEN_DBL_TEST (exp (1.03));\n  GEN_DBL_TEST (exp (-1.03));\n  GEN_DBL_TEST (exp (1.04));\n  GEN_DBL_TEST (exp (-1.04));\n  GEN_DBL_TEST (exp (3.72e-09));\n  GEN_DBL_TEST (exp (-3.72e-09));\n  GEN_DBL_TEST (exp (3.73e-09));\n  GEN_DBL_TEST (exp (-3.73e-09));\n  GEN_DBL_TEST (exp (2.0));\n  GEN_DBL_TEST (exp (3.0));\n  GEN_DBL_TEST (exp (0.7));\n  GEN_DBL_TEST (exp (38.0));\n\n  /* expm1 tests */\n  GEN_DBL_TEST (expm1 (0.0));\n  GEN_DBL_TEST (expm1 (-0.0));\n  GEN_DBL_TEST (expm1 (1.0));\n  GEN_DBL_TEST (expm1 (-1.0));\n  GEN_DBL_TEST (expm1 (INFINITY));\n  GEN_DBL_TEST (expm1 (-INFINITY));\n  GEN_DBL_TEST (expm1 (NAN));\n  GEN_DBL_TEST (expm1 (7.08e+02));\n  GEN_DBL_TEST (expm1 (7.095e+02));\n  GEN_DBL_TEST (expm1 (7.10e+02));\n  GEN_DBL_TEST (expm1 (-7.40e+02));\n  GEN_DBL_TEST (expm1 (-7.50e+02));\n  GEN_DBL_TEST (expm1 (0.34));\n  GEN_DBL_TEST (expm1 (-0.34));\n  GEN_DBL_TEST (expm1 (0.35));\n  GEN_DBL_TEST (expm1 (-0.35));\n  GEN_DBL_TEST (expm1 (1.03));\n  GEN_DBL_TEST (expm1 (-1.03));\n  GEN_DBL_TEST (expm1 (1.04));\n  GEN_DBL_TEST (expm1 (-1.04));\n  GEN_DBL_TEST (expm1 (3.72e-09));\n  GEN_DBL_TEST (expm1 (-3.72e-09));\n  GEN_DBL_TEST (expm1 (3.73e-09));\n  GEN_DBL_TEST (expm1 (-3.73e-09));\n  GEN_DBL_TEST (expm1 (2.0));\n  GEN_DBL_TEST (expm1 (3.0));\n  GEN_DBL_TEST (expm1 (0.7));\n  GEN_DBL_TEST (expm1 (38.0));\n\n  /* fabs tests */\n  GEN_DBL_TEST (fabs (0.0));\n  GEN_DBL_TEST (fabs (-0.0));\n  GEN_DBL_TEST (fabs (1.0));\n  GEN_DBL_TEST (fabs (-1.0));\n  GEN_DBL_TEST (fabs (INFINITY));\n  GEN_DBL_TEST (fabs (-INFINITY));\n  GEN_DBL_TEST (fabs (NAN));\n  GEN_DBL_TEST (fabs (3.14));\n  GEN_DBL_TEST (fabs (-3.14));\n  GEN_DBL_TEST (fabs (0.7));\n  GEN_DBL_TEST (fabs (-0.7));\n  GEN_DBL_TEST (fabs (3.72e-09));\n  GEN_DBL_TEST (fabs (-3.72e-09));\n  GEN_DBL_TEST (fabs (7.37e+19));\n  GEN_DBL_TEST (fabs (-7.37e+19));\n\n  /* floor tests */\n  GEN_DBL_TEST (floor (0.0));\n  GEN_DBL_TEST (floor (-0.0));\n  GEN_DBL_TEST (floor (INFINITY));\n  GEN_DBL_TEST (floor (-INFINITY));\n  GEN_DBL_TEST (floor (NAN));\n  GEN_DBL_TEST (floor (3.14));\n  GEN_DBL_TEST (floor (-3.14));\n  GEN_DBL_TEST (floor (3.72e-09));\n  GEN_DBL_TEST (floor (-3.72e-09));\n  GEN_DBL_TEST (floor (7.37e+19));\n  GEN_DBL_TEST (floor (-7.37e+19));\n\n  /* fmod tests */\n  GEN_DBL_TEST (fmod (0.0, 0.0));\n  GEN_DBL_TEST (fmod (0.0, -0.0));\n  GEN_DBL_TEST (fmod (-0.0, 0.0));\n  GEN_DBL_TEST (fmod (-0.0, -0.0));\n  GEN_DBL_TEST (fmod (0.0, 3.0));\n  GEN_DBL_TEST (fmod (0.0, -3.0));\n  GEN_DBL_TEST (fmod (-0.0, 3.0));\n  GEN_DBL_TEST (fmod (-0.0, -3.0));\n  GEN_DBL_TEST (fmod (0.0, INFINITY));\n  GEN_DBL_TEST (fmod (0.0, -INFINITY));\n  GEN_DBL_TEST (fmod (-0.0, INFINITY));\n  GEN_DBL_TEST (fmod (-0.0, -INFINITY));\n  GEN_DBL_TEST (fmod (0.0, NAN));\n  GEN_DBL_TEST (fmod (-0.0, NAN));\n  GEN_DBL_TEST (fmod (3.0, 0.0));\n  GEN_DBL_TEST (fmod (3.0, -0.0));\n  GEN_DBL_TEST (fmod (-3.0, 0.0));\n  GEN_DBL_TEST (fmod (-3.0, -0.0));\n  GEN_DBL_TEST (fmod (3.0, 3.0));\n  GEN_DBL_TEST (fmod (3.0, -3.0));\n  GEN_DBL_TEST (fmod (-3.0, 3.0));\n  GEN_DBL_TEST (fmod (-3.0, -3.0));\n  GEN_DBL_TEST (fmod (3.0, INFINITY));\n  GEN_DBL_TEST (fmod (3.0, -INFINITY));\n  GEN_DBL_TEST (fmod (-3.0, INFINITY));\n  GEN_DBL_TEST (fmod (-3.0, -INFINITY));\n  GEN_DBL_TEST (fmod (3.0, NAN));\n  GEN_DBL_TEST (fmod (-3.0, NAN));\n  GEN_DBL_TEST (fmod (INFINITY, 0.0));\n  GEN_DBL_TEST (fmod (INFINITY, -0.0));\n  GEN_DBL_TEST (fmod (-INFINITY, 0.0));\n  GEN_DBL_TEST (fmod (-INFINITY, -0.0));\n  GEN_DBL_TEST (fmod (INFINITY, 3.0));\n  GEN_DBL_TEST (fmod (INFINITY, -3.0));\n  GEN_DBL_TEST (fmod (-INFINITY, 3.0));\n  GEN_DBL_TEST (fmod (-INFINITY, -3.0));\n  GEN_DBL_TEST (fmod (INFINITY, INFINITY));\n  GEN_DBL_TEST (fmod (INFINITY, -INFINITY));\n  GEN_DBL_TEST (fmod (-INFINITY, INFINITY));\n  GEN_DBL_TEST (fmod (-INFINITY, -INFINITY));\n  GEN_DBL_TEST (fmod (INFINITY, NAN));\n  GEN_DBL_TEST (fmod (-INFINITY, NAN));\n  GEN_DBL_TEST (fmod (NAN, 0.0));\n  GEN_DBL_TEST (fmod (NAN, -0.0));\n  GEN_DBL_TEST (fmod (NAN, 3.0));\n  GEN_DBL_TEST (fmod (NAN, -3.0));\n  GEN_DBL_TEST (fmod (NAN, INFINITY));\n  GEN_DBL_TEST (fmod (NAN, -INFINITY));\n  GEN_DBL_TEST (fmod (NAN, NAN));\n  GEN_DBL_TEST (fmod (3.0, 1.0));\n  GEN_DBL_TEST (fmod (3.0, -1.0));\n  GEN_DBL_TEST (fmod (-3.0, 1.0));\n  GEN_DBL_TEST (fmod (-3.0, -1.0));\n  GEN_DBL_TEST (fmod (6.5, 2.3));\n  GEN_DBL_TEST (fmod (6.5, -2.3));\n  GEN_DBL_TEST (fmod (-6.5, 2.3));\n  GEN_DBL_TEST (fmod (-6.5, -2.3));\n\n  /* isfinite tests */\n  GEN_INT_TEST (isfinite (0.0));\n  GEN_INT_TEST (isfinite (-0.0));\n  GEN_INT_TEST (isfinite (1.0));\n  GEN_INT_TEST (isfinite (-1.0));\n  GEN_INT_TEST (isfinite (INFINITY));\n  GEN_INT_TEST (isfinite (-INFINITY));\n  GEN_INT_TEST (isfinite (NAN));\n  GEN_INT_TEST (isfinite (3.14));\n  GEN_INT_TEST (isfinite (-3.14));\n  GEN_INT_TEST (isfinite (0.7));\n  GEN_INT_TEST (isfinite (-0.7));\n  GEN_INT_TEST (isfinite (3.72e-09));\n  GEN_INT_TEST (isfinite (-3.72e-09));\n  GEN_INT_TEST (isfinite (7.37e+19));\n  GEN_INT_TEST (isfinite (-7.37e+19));\n\n  /* isinf tests */\n  GEN_INT_TEST (isinf (0.0));\n  GEN_INT_TEST (isinf (-0.0));\n  GEN_INT_TEST (isinf (1.0));\n  GEN_INT_TEST (isinf (-1.0));\n  GEN_INT_TEST (isinf (INFINITY));\n  GEN_INT_TEST (isinf (-INFINITY));\n  GEN_INT_TEST (isinf (NAN));\n  GEN_INT_TEST (isinf (3.14));\n  GEN_INT_TEST (isinf (-3.14));\n  GEN_INT_TEST (isinf (0.7));\n  GEN_INT_TEST (isinf (-0.7));\n  GEN_INT_TEST (isinf (3.72e-09));\n  GEN_INT_TEST (isinf (-3.72e-09));\n  GEN_INT_TEST (isinf (7.37e+19));\n  GEN_INT_TEST (isinf (-7.37e+19));\n\n  /* isnan tests */\n  GEN_INT_TEST (isnan (0.0));\n  GEN_INT_TEST (isnan (-0.0));\n  GEN_INT_TEST (isnan (1.0));\n  GEN_INT_TEST (isnan (-1.0));\n  GEN_INT_TEST (isnan (INFINITY));\n  GEN_INT_TEST (isnan (-INFINITY));\n  GEN_INT_TEST (isnan (NAN));\n  GEN_INT_TEST (isnan (3.14));\n  GEN_INT_TEST (isnan (-3.14));\n  GEN_INT_TEST (isnan (0.7));\n  GEN_INT_TEST (isnan (-0.7));\n  GEN_INT_TEST (isnan (3.72e-09));\n  GEN_INT_TEST (isnan (-3.72e-09));\n  GEN_INT_TEST (isnan (7.37e+19));\n  GEN_INT_TEST (isnan (-7.37e+19));\n\n  /* log tests */\n  GEN_DBL_TEST (log (0.0));\n  GEN_DBL_TEST (log (-0.0));\n  GEN_DBL_TEST (log (1.0));\n  GEN_DBL_TEST (log (-1.0));\n  GEN_DBL_TEST (log (INFINITY));\n  GEN_DBL_TEST (log (-INFINITY));\n  GEN_DBL_TEST (log (NAN));\n  GEN_DBL_TEST (log (M_E));\n  GEN_DBL_TEST (log (1.0 / M_E));\n  GEN_DBL_TEST (log (2));\n  GEN_DBL_TEST (log (10));\n  GEN_DBL_TEST (log (0.7));\n  GEN_DBL_TEST (log (2.22e-308));\n  GEN_DBL_TEST (log (2.23e-308));\n  GEN_DBL_TEST (log (0.17));\n  GEN_DBL_TEST (log (0.18));\n  GEN_DBL_TEST (log (1999.0));\n  GEN_DBL_TEST (log (2000.0));\n  GEN_DBL_TEST (log (2001.0));\n\n  /* log1p tests */\n  GEN_DBL_TEST (log1p (0.0));\n  GEN_DBL_TEST (log1p (-0.0));\n  GEN_DBL_TEST (log1p (1.0));\n  GEN_DBL_TEST (log1p (-1.0));\n  GEN_DBL_TEST (log1p (INFINITY));\n  GEN_DBL_TEST (log1p (-INFINITY));\n  GEN_DBL_TEST (log1p (NAN));\n  GEN_DBL_TEST (log1p (M_E));\n  GEN_DBL_TEST (log1p (1.0 / M_E));\n  GEN_DBL_TEST (log1p (2));\n  GEN_DBL_TEST (log1p (10));\n  GEN_DBL_TEST (log1p (0.7));\n  GEN_DBL_TEST (log1p (2.22e-308));\n  GEN_DBL_TEST (log1p (2.23e-308));\n  GEN_DBL_TEST (log1p (0.17));\n  GEN_DBL_TEST (log1p (0.18));\n  GEN_DBL_TEST (log1p (1999.0));\n  GEN_DBL_TEST (log1p (2000.0));\n  GEN_DBL_TEST (log1p (2001.0));\n\n  /* log2 tests */\n  GEN_DBL_TEST (log2 (0.0));\n  GEN_DBL_TEST (log2 (-0.0));\n  GEN_DBL_TEST (log2 (1.0));\n  GEN_DBL_TEST (log2 (-1.0));\n  GEN_DBL_TEST (log2 (INFINITY));\n  GEN_DBL_TEST (log2 (-INFINITY));\n  GEN_DBL_TEST (log2 (NAN));\n  GEN_DBL_TEST (log2 (M_E));\n  GEN_DBL_TEST (log2 (1.0 / M_E));\n  GEN_DBL_TEST (log2 (2));\n  GEN_DBL_TEST (log2 (10));\n  GEN_DBL_TEST (log2 (0.7));\n  GEN_DBL_TEST (log2 (2.22e-308));\n  GEN_DBL_TEST (log2 (2.23e-308));\n  GEN_DBL_TEST (log2 (0.17));\n  GEN_DBL_TEST (log2 (0.18));\n  GEN_DBL_TEST (log2 (1999.0));\n  GEN_DBL_TEST (log2 (2000.0));\n  GEN_DBL_TEST (log2 (2001.0));\n\n  /* log10 tests */\n  GEN_DBL_TEST (log10 (0.0));\n  GEN_DBL_TEST (log10 (-0.0));\n  GEN_DBL_TEST (log10 (1.0));\n  GEN_DBL_TEST (log10 (-1.0));\n  GEN_DBL_TEST (log10 (INFINITY));\n  GEN_DBL_TEST (log10 (-INFINITY));\n  GEN_DBL_TEST (log10 (NAN));\n  GEN_DBL_TEST (log10 (M_E));\n  GEN_DBL_TEST (log10 (1.0 / M_E));\n  GEN_DBL_TEST (log10 (2));\n  GEN_DBL_TEST (log10 (10));\n  GEN_DBL_TEST (log10 (0.7));\n  GEN_DBL_TEST (log10 (2.22e-308));\n  GEN_DBL_TEST (log10 (2.23e-308));\n  GEN_DBL_TEST (log10 (0.17));\n  GEN_DBL_TEST (log10 (0.18));\n  GEN_DBL_TEST (log10 (1999.0));\n  GEN_DBL_TEST (log10 (2000.0));\n  GEN_DBL_TEST (log10 (2001.0));\n\n  /* pow tests */\n  GEN_DBL_TEST (pow (0.0, 0.0));\n  GEN_DBL_TEST (pow (0.0, -0.0));\n  GEN_DBL_TEST (pow (-0.0, 0.0));\n  GEN_DBL_TEST (pow (-0.0, -0.0));\n  GEN_DBL_TEST (pow (0.0, 1.0));\n  GEN_DBL_TEST (pow (0.0, -1.0));\n  GEN_DBL_TEST (pow (-0.0, 1.0));\n  GEN_DBL_TEST (pow (-0.0, -1.0));\n  GEN_DBL_TEST (pow (0.0, INFINITY));\n  GEN_DBL_TEST (pow (0.0, -INFINITY));\n  GEN_DBL_TEST (pow (-0.0, INFINITY));\n  GEN_DBL_TEST (pow (-0.0, -INFINITY));\n  GEN_DBL_TEST (pow (0.0, NAN));\n  GEN_DBL_TEST (pow (-0.0, NAN));\n  GEN_DBL_TEST (pow (1.0, 0.0));\n  GEN_DBL_TEST (pow (1.0, -0.0));\n  GEN_DBL_TEST (pow (-1.0, 0.0));\n  GEN_DBL_TEST (pow (-1.0, -0.0));\n  GEN_DBL_TEST (pow (1.0, 1.0));\n  GEN_DBL_TEST (pow (1.0, -1.0));\n  GEN_DBL_TEST (pow (-1.0, 1.0));\n  GEN_DBL_TEST (pow (-1.0, -1.0));\n  GEN_DBL_TEST (pow (1.0, INFINITY));\n  GEN_DBL_TEST (pow (1.0, -INFINITY));\n  GEN_DBL_TEST (pow (-1.0, INFINITY));\n  GEN_DBL_TEST (pow (-1.0, -INFINITY));\n  GEN_DBL_TEST (pow (1.0, NAN));\n  GEN_DBL_TEST (pow (-1.0, NAN));\n  GEN_DBL_TEST (pow (INFINITY, 0.0));\n  GEN_DBL_TEST (pow (INFINITY, -0.0));\n  GEN_DBL_TEST (pow (-INFINITY, 0.0));\n  GEN_DBL_TEST (pow (-INFINITY, -0.0));\n  GEN_DBL_TEST (pow (INFINITY, 1.0));\n  GEN_DBL_TEST (pow (INFINITY, -1.0));\n  GEN_DBL_TEST (pow (-INFINITY, 1.0));\n  GEN_DBL_TEST (pow (-INFINITY, -1.0));\n  GEN_DBL_TEST (pow (INFINITY, INFINITY));\n  GEN_DBL_TEST (pow (INFINITY, -INFINITY));\n  GEN_DBL_TEST (pow (-INFINITY, INFINITY));\n  GEN_DBL_TEST (pow (-INFINITY, -INFINITY));\n  GEN_DBL_TEST (pow (INFINITY, NAN));\n  GEN_DBL_TEST (pow (-INFINITY, NAN));\n  GEN_DBL_TEST (pow (NAN, 0.0));\n  GEN_DBL_TEST (pow (NAN, -0.0));\n  GEN_DBL_TEST (pow (NAN, 1.0));\n  GEN_DBL_TEST (pow (NAN, -1.0));\n  GEN_DBL_TEST (pow (NAN, INFINITY));\n  GEN_DBL_TEST (pow (NAN, -INFINITY));\n  GEN_DBL_TEST (pow (NAN, NAN));\n  GEN_DBL_TEST (pow (0.9, INFINITY));\n  GEN_DBL_TEST (pow (0.9, -INFINITY));\n  GEN_DBL_TEST (pow (-0.9, INFINITY));\n  GEN_DBL_TEST (pow (-0.9, -INFINITY));\n  GEN_DBL_TEST (pow (1.1, INFINITY));\n  GEN_DBL_TEST (pow (1.1, -INFINITY));\n  GEN_DBL_TEST (pow (-1.1, INFINITY));\n  GEN_DBL_TEST (pow (-1.1, -INFINITY));\n  GEN_DBL_TEST (pow (0.0, 2.0));\n  GEN_DBL_TEST (pow (0.0, -2.0));\n  GEN_DBL_TEST (pow (-0.0, 2.0));\n  GEN_DBL_TEST (pow (-0.0, -2.0));\n  GEN_DBL_TEST (pow (0.0, 3.0));\n  GEN_DBL_TEST (pow (0.0, -3.0));\n  GEN_DBL_TEST (pow (-0.0, 3.0));\n  GEN_DBL_TEST (pow (-0.0, -3.0));\n  GEN_DBL_TEST (pow (0.0, 3.14));\n  GEN_DBL_TEST (pow (0.0, -3.14));\n  GEN_DBL_TEST (pow (-0.0, 3.14));\n  GEN_DBL_TEST (pow (-0.0, -3.14));\n  GEN_DBL_TEST (pow (1.0, 3.14));\n  GEN_DBL_TEST (pow (1.0, -3.14));\n  GEN_DBL_TEST (pow (-1.0, 3.14));\n  GEN_DBL_TEST (pow (-1.0, -3.14));\n  GEN_DBL_TEST (pow (3.14, 0.0));\n  GEN_DBL_TEST (pow (3.14, -0.0));\n  GEN_DBL_TEST (pow (-3.14, 0.0));\n  GEN_DBL_TEST (pow (-3.14, -0.0));\n  GEN_DBL_TEST (pow (3.14, 1.0));\n  GEN_DBL_TEST (pow (3.14, -1.0));\n  GEN_DBL_TEST (pow (-3.14, 1.0));\n  GEN_DBL_TEST (pow (-3.14, -1.0));\n  GEN_DBL_TEST (pow (3.14, 2.0));\n  GEN_DBL_TEST (pow (3.14, -2.0));\n  GEN_DBL_TEST (pow (-3.14, 2.0));\n  GEN_DBL_TEST (pow (-3.14, -2.0));\n  GEN_DBL_TEST (pow (3.14, 3.0));\n  GEN_DBL_TEST (pow (3.14, -3.0));\n  GEN_DBL_TEST (pow (-3.14, 3.0));\n  GEN_DBL_TEST (pow (-3.14, -3.0));\n  GEN_DBL_TEST (pow (3.14, 3.14));\n  GEN_DBL_TEST (pow (3.14, -3.14));\n  GEN_DBL_TEST (pow (-3.14, 3.14));\n  GEN_DBL_TEST (pow (-3.14, -3.14));\n  GEN_DBL_TEST (pow (INFINITY, 2.0));\n  GEN_DBL_TEST (pow (INFINITY, -2.0));\n  GEN_DBL_TEST (pow (-INFINITY, 2.0));\n  GEN_DBL_TEST (pow (-INFINITY, -2.0));\n  GEN_DBL_TEST (pow (INFINITY, 3.0));\n  GEN_DBL_TEST (pow (INFINITY, -3.0));\n  GEN_DBL_TEST (pow (-INFINITY, 3.0));\n  GEN_DBL_TEST (pow (-INFINITY, -3.0));\n  GEN_DBL_TEST (pow (INFINITY, 3.14));\n  GEN_DBL_TEST (pow (INFINITY, -3.14));\n  GEN_DBL_TEST (pow (-INFINITY, 3.14));\n  GEN_DBL_TEST (pow (-INFINITY, -3.14));\n  GEN_DBL_TEST (pow (0.7, 1.2));\n\n  /* scalbn tests */\n  /* SKIPPED: not publicly declared in jerry-math\n  GEN_DBL_TEST (scalbn (0.0, 0));\n  GEN_DBL_TEST (scalbn (-0.0, 0));\n  GEN_DBL_TEST (scalbn (0.0, 1));\n  GEN_DBL_TEST (scalbn (0.0, -1));\n  GEN_DBL_TEST (scalbn (-0.0, 1));\n  GEN_DBL_TEST (scalbn (-0.0, -1));\n  GEN_DBL_TEST (scalbn (1.0, 0));\n  GEN_DBL_TEST (scalbn (-1.0, 0));\n  GEN_DBL_TEST (scalbn (1.0, 1));\n  GEN_DBL_TEST (scalbn (1.0, -1));\n  GEN_DBL_TEST (scalbn (-1.0, 1));\n  GEN_DBL_TEST (scalbn (-1.0, -1));\n  GEN_DBL_TEST (scalbn (INFINITY, 0));\n  GEN_DBL_TEST (scalbn (-INFINITY, 0));\n  GEN_DBL_TEST (scalbn (INFINITY, 1));\n  GEN_DBL_TEST (scalbn (INFINITY, -1));\n  GEN_DBL_TEST (scalbn (-INFINITY, 1));\n  GEN_DBL_TEST (scalbn (-INFINITY, -1));\n  GEN_DBL_TEST (scalbn (NAN, 0));\n  GEN_DBL_TEST (scalbn (NAN, 1));\n  GEN_DBL_TEST (scalbn (NAN, -1));\n  GEN_DBL_TEST (scalbn (3.14, -1));\n  GEN_DBL_TEST (scalbn (-3.14, 1));\n  GEN_DBL_TEST (scalbn (0.7, 4));\n  GEN_DBL_TEST (scalbn (0.7, -4));\n  GEN_DBL_TEST (scalbn (-0.7, 4));\n  GEN_DBL_TEST (scalbn (-0.7, -4));\n  GEN_DBL_TEST (scalbn (0.8, 5));\n  GEN_DBL_TEST (scalbn (0.8, -5));\n  GEN_DBL_TEST (scalbn (-0.8, 5));\n  GEN_DBL_TEST (scalbn (-0.8, -5));\n  GEN_DBL_TEST (scalbn (5.55e-18, 49999));\n  GEN_DBL_TEST (scalbn (5.55e-18, 50000));\n  GEN_DBL_TEST (scalbn (5.55e-18, 50001));\n  GEN_DBL_TEST (scalbn (1.0, -49999));\n  GEN_DBL_TEST (scalbn (1.0, -50000));\n  GEN_DBL_TEST (scalbn (1.0, -50001));\n  */\n\n  /* sqrt tests */\n  GEN_DBL_TEST (sqrt (0.0));\n  GEN_DBL_TEST (sqrt (-0.0));\n  GEN_DBL_TEST (sqrt (1.0));\n  GEN_DBL_TEST (sqrt (-1.0));\n  GEN_DBL_TEST (sqrt (INFINITY));\n  GEN_DBL_TEST (sqrt (-INFINITY));\n  GEN_DBL_TEST (sqrt (NAN));\n  GEN_DBL_TEST (sqrt (0.7));\n  GEN_DBL_TEST (sqrt (2));\n  GEN_DBL_TEST (sqrt (10));\n  GEN_DBL_TEST (sqrt (2.22e-308));\n  GEN_DBL_TEST (sqrt (2.23e-308));\n  GEN_DBL_TEST (sqrt (3.72e-09));\n  GEN_DBL_TEST (sqrt (7.37e+19));\n  GEN_DBL_TEST (sqrt (2209));\n  GEN_DBL_TEST (sqrt (4));\n  GEN_DBL_TEST (sqrt (0.25));\n  GEN_DBL_TEST (sqrt (6642.25));\n  GEN_DBL_TEST (sqrt (15239.9025));\n\n  /* cbrt tests */\n  GEN_DBL_TEST (cbrt (0.0));\n  GEN_DBL_TEST (cbrt (-0.0));\n  GEN_DBL_TEST (cbrt (1.0));\n  GEN_DBL_TEST (cbrt (-1.0));\n  GEN_DBL_TEST (cbrt (INFINITY));\n  GEN_DBL_TEST (cbrt (-INFINITY));\n  GEN_DBL_TEST (cbrt (NAN));\n  GEN_DBL_TEST (cbrt (0.7));\n  GEN_DBL_TEST (cbrt (2));\n  GEN_DBL_TEST (cbrt (10));\n  GEN_DBL_TEST (cbrt (2.22e-308));\n  GEN_DBL_TEST (cbrt (2.23e-308));\n  GEN_DBL_TEST (cbrt (3.72e-09));\n  GEN_DBL_TEST (cbrt (7.37e+19));\n  GEN_DBL_TEST (cbrt (2209));\n  GEN_DBL_TEST (cbrt (4));\n  GEN_DBL_TEST (cbrt (0.25));\n  GEN_DBL_TEST (cbrt (6642.25));\n  GEN_DBL_TEST (cbrt (15239.9025));\n  GEN_DBL_TEST (cbrt (3));\n  GEN_DBL_TEST (cbrt (9));\n  GEN_DBL_TEST (cbrt (-17.87));\n  GEN_DBL_TEST (cbrt (-8941));\n\n  /* sin tests */\n  GEN_DBL_TEST (sin (0.0));\n  GEN_DBL_TEST (sin (-0.0));\n  GEN_DBL_TEST (sin (1.0));\n  GEN_DBL_TEST (sin (-1.0));\n  GEN_DBL_TEST (sin (INFINITY));\n  GEN_DBL_TEST (sin (-INFINITY));\n  GEN_DBL_TEST (sin (NAN));\n  GEN_DBL_TEST (sin (M_PI));\n  GEN_DBL_TEST (sin (-M_PI));\n  GEN_DBL_TEST (sin (2.0 * M_PI));\n  GEN_DBL_TEST (sin (-2.0 * M_PI));\n  GEN_DBL_TEST (sin (M_PI / 2.0));\n  GEN_DBL_TEST (sin (-M_PI / 2.0));\n  GEN_DBL_TEST (sin (M_PI / 3.0));\n  GEN_DBL_TEST (sin (-M_PI / 3.0));\n  GEN_DBL_TEST (sin (M_PI / 4.0));\n  GEN_DBL_TEST (sin (-M_PI / 4.0));\n  GEN_DBL_TEST (sin (M_PI / 6.0));\n  GEN_DBL_TEST (sin (-M_PI / 6.0));\n  GEN_DBL_TEST (sin (M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (sin (-M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (sin (M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (sin (-M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (sin (6.9e-18));\n  GEN_DBL_TEST (sin (-6.9e-18));\n  GEN_DBL_TEST (sin (7.0e-18));\n  GEN_DBL_TEST (sin (-7.0e-18));\n  GEN_DBL_TEST (sin (7.4e-9));\n  GEN_DBL_TEST (sin (-7.4e-9));\n  GEN_DBL_TEST (sin (7.5e-9));\n  GEN_DBL_TEST (sin (-7.5e-9));\n  GEN_DBL_TEST (sin (0.2));\n  GEN_DBL_TEST (sin (-0.2));\n  GEN_DBL_TEST (sin (0.4));\n  GEN_DBL_TEST (sin (-0.4));\n  GEN_DBL_TEST (sin (0.7));\n  GEN_DBL_TEST (sin (-0.7));\n  GEN_DBL_TEST (sin (0.8));\n  GEN_DBL_TEST (sin (-0.8));\n  GEN_DBL_TEST (sin (3.0));\n  GEN_DBL_TEST (sin (-3.0));\n  GEN_DBL_TEST (sin (4.0));\n  GEN_DBL_TEST (sin (-4.0));\n  GEN_DBL_TEST (sin (6.0));\n  GEN_DBL_TEST (sin (-6.0));\n  GEN_DBL_TEST (sin (7.0));\n  GEN_DBL_TEST (sin (-7.0));\n\n  /* cos tests */\n  GEN_DBL_TEST (cos (0.0));\n  GEN_DBL_TEST (cos (-0.0));\n  GEN_DBL_TEST (cos (1.0));\n  GEN_DBL_TEST (cos (-1.0));\n  GEN_DBL_TEST (cos (INFINITY));\n  GEN_DBL_TEST (cos (-INFINITY));\n  GEN_DBL_TEST (cos (NAN));\n  GEN_DBL_TEST (cos (M_PI));\n  GEN_DBL_TEST (cos (-M_PI));\n  GEN_DBL_TEST (cos (2.0 * M_PI));\n  GEN_DBL_TEST (cos (-2.0 * M_PI));\n  GEN_DBL_TEST (cos (M_PI / 2.0));\n  GEN_DBL_TEST (cos (-M_PI / 2.0));\n  GEN_DBL_TEST (cos (M_PI / 3.0));\n  GEN_DBL_TEST (cos (-M_PI / 3.0));\n  GEN_DBL_TEST (cos (M_PI / 4.0));\n  GEN_DBL_TEST (cos (-M_PI / 4.0));\n  GEN_DBL_TEST (cos (M_PI / 6.0));\n  GEN_DBL_TEST (cos (-M_PI / 6.0));\n  GEN_DBL_TEST (cos (M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (cos (-M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (cos (M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (cos (-M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (cos (6.9e-18));\n  GEN_DBL_TEST (cos (-6.9e-18));\n  GEN_DBL_TEST (cos (7.0e-18));\n  GEN_DBL_TEST (cos (-7.0e-18));\n  GEN_DBL_TEST (cos (7.4e-9));\n  GEN_DBL_TEST (cos (-7.4e-9));\n  GEN_DBL_TEST (cos (7.5e-9));\n  GEN_DBL_TEST (cos (-7.5e-9));\n  GEN_DBL_TEST (cos (0.2));\n  GEN_DBL_TEST (cos (-0.2));\n  GEN_DBL_TEST (cos (0.4));\n  GEN_DBL_TEST (cos (-0.4));\n  GEN_DBL_TEST (cos (0.7));\n  GEN_DBL_TEST (cos (-0.7));\n  GEN_DBL_TEST (cos (0.8));\n  GEN_DBL_TEST (cos (-0.8));\n  GEN_DBL_TEST (cos (3.0));\n  GEN_DBL_TEST (cos (-3.0));\n  GEN_DBL_TEST (cos (4.0));\n  GEN_DBL_TEST (cos (-4.0));\n  GEN_DBL_TEST (cos (6.0));\n  GEN_DBL_TEST (cos (-6.0));\n  GEN_DBL_TEST (cos (7.0));\n  GEN_DBL_TEST (cos (-7.0));\n\n  /* tan tests */\n  GEN_DBL_TEST (tan (0.0));\n  GEN_DBL_TEST (tan (-0.0));\n  GEN_DBL_TEST (tan (1.0));\n  GEN_DBL_TEST (tan (-1.0));\n  GEN_DBL_TEST (tan (INFINITY));\n  GEN_DBL_TEST (tan (-INFINITY));\n  GEN_DBL_TEST (tan (NAN));\n  GEN_DBL_TEST (tan (M_PI));\n  GEN_DBL_TEST (tan (-M_PI));\n  GEN_DBL_TEST (tan (2.0 * M_PI));\n  GEN_DBL_TEST (tan (-2.0 * M_PI));\n  GEN_DBL_TEST (tan (M_PI / 2.0));\n  GEN_DBL_TEST (tan (-M_PI / 2.0));\n  GEN_DBL_TEST (tan (M_PI / 3.0));\n  GEN_DBL_TEST (tan (-M_PI / 3.0));\n  GEN_DBL_TEST (tan (M_PI / 4.0));\n  GEN_DBL_TEST (tan (-M_PI / 4.0));\n  GEN_DBL_TEST (tan (M_PI / 6.0));\n  GEN_DBL_TEST (tan (-M_PI / 6.0));\n  GEN_DBL_TEST (tan (M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (tan (-M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (tan (M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (tan (-M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (tan (3.7e-9));\n  GEN_DBL_TEST (tan (-3.7e-9));\n  GEN_DBL_TEST (tan (3.8e-9));\n  GEN_DBL_TEST (tan (-3.8e-9));\n  GEN_DBL_TEST (tan (0.6));\n  GEN_DBL_TEST (tan (-0.6));\n  GEN_DBL_TEST (tan (0.7));\n  GEN_DBL_TEST (tan (-0.7));\n  GEN_DBL_TEST (tan (3.0));\n  GEN_DBL_TEST (tan (-3.0));\n  GEN_DBL_TEST (tan (4.0));\n  GEN_DBL_TEST (tan (-4.0));\n  GEN_DBL_TEST (tan (6.0));\n  GEN_DBL_TEST (tan (-6.0));\n  GEN_DBL_TEST (tan (7.0));\n  GEN_DBL_TEST (tan (-7.0));\n\n    /* cosh tests */\n  GEN_DBL_TEST (cosh (0.0));\n  GEN_DBL_TEST (cosh (-0.0));\n  GEN_DBL_TEST (cosh (1.0));\n  GEN_DBL_TEST (cosh (-1.0));\n  GEN_DBL_TEST (cosh (INFINITY));\n  GEN_DBL_TEST (cosh (-INFINITY));\n  GEN_DBL_TEST (cosh (NAN));\n  GEN_DBL_TEST (cosh (M_PI));\n  GEN_DBL_TEST (cosh (-M_PI));\n  GEN_DBL_TEST (cosh (2.0 * M_PI));\n  GEN_DBL_TEST (cosh (-2.0 * M_PI));\n  GEN_DBL_TEST (cosh (M_PI / 2.0));\n  GEN_DBL_TEST (cosh (-M_PI / 2.0));\n  GEN_DBL_TEST (cosh (M_PI / 3.0));\n  GEN_DBL_TEST (cosh (-M_PI / 3.0));\n  GEN_DBL_TEST (cosh (M_PI / 4.0));\n  GEN_DBL_TEST (cosh (-M_PI / 4.0));\n  GEN_DBL_TEST (cosh (M_PI / 6.0));\n  GEN_DBL_TEST (cosh (-M_PI / 6.0));\n  GEN_DBL_TEST (cosh (M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (cosh (-M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (cosh (M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (cosh (-M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (cosh (6.9e-18));\n  GEN_DBL_TEST (cosh (-6.9e-18));\n  GEN_DBL_TEST (cosh (7.0e-18));\n  GEN_DBL_TEST (cosh (-7.0e-18));\n  GEN_DBL_TEST (cosh (7.4e-9));\n  GEN_DBL_TEST (cosh (-7.4e-9));\n  GEN_DBL_TEST (cosh (7.5e-9));\n  GEN_DBL_TEST (cosh (-7.5e-9));\n  GEN_DBL_TEST (cosh (0.2));\n  GEN_DBL_TEST (cosh (-0.2));\n  GEN_DBL_TEST (cosh (0.4));\n  GEN_DBL_TEST (cosh (-0.4));\n  GEN_DBL_TEST (cosh (0.7));\n  GEN_DBL_TEST (cosh (-0.7));\n  GEN_DBL_TEST (cosh (0.8));\n  GEN_DBL_TEST (cosh (-0.8));\n  GEN_DBL_TEST (cosh (3.0));\n  GEN_DBL_TEST (cosh (-3.0));\n  GEN_DBL_TEST (cosh (4.0));\n  GEN_DBL_TEST (cosh (-4.0));\n  GEN_DBL_TEST (cosh (6.0));\n  GEN_DBL_TEST (cosh (-6.0));\n  GEN_DBL_TEST (cosh (7.0));\n  GEN_DBL_TEST (cosh (-7.0));\n\n  /* sinh tests */\n  GEN_DBL_TEST (sinh (0.0));\n  GEN_DBL_TEST (sinh (-0.0));\n  GEN_DBL_TEST (sinh (1.0));\n  GEN_DBL_TEST (sinh (-1.0));\n  GEN_DBL_TEST (sinh (INFINITY));\n  GEN_DBL_TEST (sinh (-INFINITY));\n  GEN_DBL_TEST (sinh (NAN));\n  GEN_DBL_TEST (sinh (M_PI));\n  GEN_DBL_TEST (sinh (-M_PI));\n  GEN_DBL_TEST (sinh (2.0 * M_PI));\n  GEN_DBL_TEST (sinh (-2.0 * M_PI));\n  GEN_DBL_TEST (sinh (M_PI / 2.0));\n  GEN_DBL_TEST (sinh (-M_PI / 2.0));\n  GEN_DBL_TEST (sinh (M_PI / 3.0));\n  GEN_DBL_TEST (sinh (-M_PI / 3.0));\n  GEN_DBL_TEST (sinh (M_PI / 4.0));\n  GEN_DBL_TEST (sinh (-M_PI / 4.0));\n  GEN_DBL_TEST (sinh (M_PI / 6.0));\n  GEN_DBL_TEST (sinh (-M_PI / 6.0));\n  GEN_DBL_TEST (sinh (M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (sinh (-M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (sinh (M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (sinh (-M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (sinh (6.9e-18));\n  GEN_DBL_TEST (sinh (-6.9e-18));\n  GEN_DBL_TEST (sinh (7.0e-18));\n  GEN_DBL_TEST (sinh (-7.0e-18));\n  GEN_DBL_TEST (sinh (7.4e-9));\n  GEN_DBL_TEST (sinh (-7.4e-9));\n  GEN_DBL_TEST (sinh (7.5e-9));\n  GEN_DBL_TEST (sinh (-7.5e-9));\n  GEN_DBL_TEST (sinh (0.2));\n  GEN_DBL_TEST (sinh (-0.2));\n  GEN_DBL_TEST (sinh (0.4));\n  GEN_DBL_TEST (sinh (-0.4));\n  GEN_DBL_TEST (sinh (0.7));\n  GEN_DBL_TEST (sinh (-0.7));\n  GEN_DBL_TEST (sinh (0.8));\n  GEN_DBL_TEST (sinh (-0.8));\n  GEN_DBL_TEST (sinh (3.0));\n  GEN_DBL_TEST (sinh (-3.0));\n  GEN_DBL_TEST (sinh (4.0));\n  GEN_DBL_TEST (sinh (-4.0));\n  GEN_DBL_TEST (sinh (6.0));\n  GEN_DBL_TEST (sinh (-6.0));\n  GEN_DBL_TEST (sinh (7.0));\n  GEN_DBL_TEST (sinh (-7.0));\n\n  /* tanh tests */\n  GEN_DBL_TEST (tanh (0.0));\n  GEN_DBL_TEST (tanh (-0.0));\n  GEN_DBL_TEST (tanh (1.0));\n  GEN_DBL_TEST (tanh (-1.0));\n  GEN_DBL_TEST (tanh (INFINITY));\n  GEN_DBL_TEST (tanh (-INFINITY));\n  GEN_DBL_TEST (tanh (NAN));\n  GEN_DBL_TEST (tanh (M_PI));\n  GEN_DBL_TEST (tanh (-M_PI));\n  GEN_DBL_TEST (tanh (2.0 * M_PI));\n  GEN_DBL_TEST (tanh (-2.0 * M_PI));\n  GEN_DBL_TEST (tanh (M_PI / 2.0));\n  GEN_DBL_TEST (tanh (-M_PI / 2.0));\n  GEN_DBL_TEST (tanh (M_PI / 3.0));\n  GEN_DBL_TEST (tanh (-M_PI / 3.0));\n  GEN_DBL_TEST (tanh (M_PI / 4.0));\n  GEN_DBL_TEST (tanh (-M_PI / 4.0));\n  GEN_DBL_TEST (tanh (M_PI / 6.0));\n  GEN_DBL_TEST (tanh (-M_PI / 6.0));\n  GEN_DBL_TEST (tanh (M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (tanh (-M_PI * 2.0 / 3.0));\n  GEN_DBL_TEST (tanh (M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (tanh (-M_PI * 5.0 / 6.0));\n  GEN_DBL_TEST (tanh (6.9e-18));\n  GEN_DBL_TEST (tanh (-6.9e-18));\n  GEN_DBL_TEST (tanh (7.0e-18));\n  GEN_DBL_TEST (tanh (-7.0e-18));\n  GEN_DBL_TEST (tanh (7.4e-9));\n  GEN_DBL_TEST (tanh (-7.4e-9));\n  GEN_DBL_TEST (tanh (7.5e-9));\n  GEN_DBL_TEST (tanh (-7.5e-9));\n  GEN_DBL_TEST (tanh (0.2));\n  GEN_DBL_TEST (tanh (-0.2));\n  GEN_DBL_TEST (tanh (0.4));\n  GEN_DBL_TEST (tanh (-0.4));\n  GEN_DBL_TEST (tanh (0.7));\n  GEN_DBL_TEST (tanh (-0.7));\n  GEN_DBL_TEST (tanh (0.8));\n  GEN_DBL_TEST (tanh (-0.8));\n  GEN_DBL_TEST (tanh (3.0));\n  GEN_DBL_TEST (tanh (-3.0));\n  GEN_DBL_TEST (tanh (4.0));\n  GEN_DBL_TEST (tanh (-4.0));\n  GEN_DBL_TEST (tanh (6.0));\n  GEN_DBL_TEST (tanh (-6.0));\n  GEN_DBL_TEST (tanh (7.0));\n  GEN_DBL_TEST (tanh (-7.0));\n} /* main */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/update-webpage.sh",
    "content": "#!/bin/bash\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif [ $# -ne 1 ]; then\n  echo \"Please, specify your gh-pages clone directory: update-webpage <gh-pages clone dir>\"\n  exit 1\nfi\n\ngh_pages_dir=$1\ndocs_dir=`dirname $(readlink -f $0)`\"/../docs\"\n\nGETTING_STARTED_MD=\"00.GETTING-STARTED.md\"\nCONFIGURATION_MD=\"01.CONFIGURATION.md\"\nAPI_REFERENCE_MD=\"02.API-REFERENCE.md\"\nAPI_EXAMPLES_MD=\"03.API-EXAMPLE.md\"\nINTERNALS_MD=\"04.INTERNALS.md\"\nPORT_API_MD=\"05.PORT-API.md\"\nREFERENCE_COUNTING_MD=\"06.REFERENCE-COUNTING.md\"\nDEBUGGER_MD=\"07.DEBUGGER.md\"\nCODING_STANDARDS_MD=\"08.CODING-STANDARDS.md\"\nEXT_REFERENCE_ARG_MD=\"09.EXT-REFERENCE-ARG.md\"\nEXT_REFERENCE_HANDLER_MD=\"10.EXT-REFERENCE-HANDLER.md\"\nEXT_REFERENCE_AUTORELEASE_MD=\"11.EXT-REFERENCE-AUTORELEASE.md\"\nEXT_REFERENCE_MODULE_MD=\"12.EXT-REFERENCE-MODULE.md\"\nDEBUGGER_TRANSPORT_MD=\"13.DEBUGGER-TRANSPORT.md\"\nEXT_REFERENCE_HANDLE_SCOPE_MD=\"14.EXT-REFERENCE-HANDLE-SCOPE.md\"\nMODULE_SYSTEM_MD=\"15.MODULE-SYSTEM.md\"\nMIGRATION_GUIDE_MD=\"16.MIGRATION-GUIDE.md\"\n\ndeclare -A titles\n\ntitles[$GETTING_STARTED_MD]=\"Getting Started\"\ntitles[$CONFIGURATION_MD]=\"Configuration\"\ntitles[$API_REFERENCE_MD]=\"API Reference\"\ntitles[$API_EXAMPLES_MD]=\"API Examples\"\ntitles[$INTERNALS_MD]=\"Internals\"\ntitles[$PORT_API_MD]=\"Port API\"\ntitles[$REFERENCE_COUNTING_MD]=\"Reference Counting\"\ntitles[$DEBUGGER_MD]=\"Debugger\"\ntitles[$CODING_STANDARDS_MD]=\"Coding Standards\"\ntitles[$EXT_REFERENCE_ARG_MD]=\"'Extension API: Argument Validation'\"\ntitles[$EXT_REFERENCE_HANDLER_MD]=\"'Extension API: External Function Handlers'\"\ntitles[$EXT_REFERENCE_AUTORELEASE_MD]=\"'Extension API: Autorelease Values'\"\ntitles[$EXT_REFERENCE_MODULE_MD]=\"'Extension API: Module Support'\"\ntitles[$DEBUGGER_TRANSPORT_MD]=\"'Debugger Transport'\"\ntitles[$EXT_REFERENCE_HANDLE_SCOPE_MD]=\"'Extension API: Handle Scope'\"\ntitles[$MODULE_SYSTEM_MD]=\"'Module System (EcmaScript2015)'\"\ntitles[$MIGRATION_GUIDE_MD]=\"Migration Guide\"\n\nfor docfile in $docs_dir/*.md; do\n  docfile_base=`basename $docfile`\n\n  permalink=`echo $docfile_base | cut -d'.' -f 2 | tr '[:upper:]' '[:lower:]'`\n  missing_title=`echo $permalink | tr '-' ' '`\n\n  # the first three documents belong to the navigation bar\n  category=$([[ $docfile_base =~ ^0[0-3] ]] && echo \"navbar\" || echo \"documents\")\n\n  # generate appropriate header for each *.md\n  echo \"---\"                                             >  $gh_pages_dir/$docfile_base\n  echo \"layout: page\"                                    >> $gh_pages_dir/$docfile_base\n  echo \"title: ${titles[$docfile_base]:-$missing_title}\" >> $gh_pages_dir/$docfile_base\n  echo \"category: ${category}\"                           >> $gh_pages_dir/$docfile_base\n  echo \"permalink: /$permalink/\"                         >> $gh_pages_dir/$docfile_base\n  echo \"---\"                                             >> $gh_pages_dir/$docfile_base\n  echo                                                   >> $gh_pages_dir/$docfile_base\n  echo \"* toc\"                                           >> $gh_pages_dir/$docfile_base\n  echo \"{:toc}\"                                          >> $gh_pages_dir/$docfile_base\n  echo                                                   >> $gh_pages_dir/$docfile_base\n\n  # the file itself removing underscores inside links\n  gawk \\\n  '\n  !/\\[.*\\]\\(#/ {\n    print $0\n  }\n\n  /\\[.*\\]\\(#/ {\n    link_start_pos = index($0, \"](#\");\n    line_beg = substr($0, 1, link_start_pos+2);\n    line_remain = substr($0, link_start_pos+3);\n    link_end_pos = index(line_remain, \")\")\n    link = substr(line_remain, 1, link_end_pos-1);\n    line_end = substr(line_remain, link_end_pos)\n\n    printf \"%s%s%s\\n\", line_beg, link, line_end\n  }\n  ' $docfile                                             >> $gh_pages_dir/$docfile_base\n\n  # fix image links\n  sed -i -r -e 's/^!\\[.*\\]\\(/&{{ site.github.url }}\\//' $gh_pages_dir/$docfile_base\n  sed -i -r -e 's/^!\\[.*\\]\\(\\{\\{ site\\.github\\.url \\}\\}\\/img.*$/&{: class=\"thumbnail center-block img-responsive\" }/' $gh_pages_dir/$docfile_base\n\n  # turn filenames into permalinks\n  sed -i -r -e 's/docs\\/[0-9]+\\.(.*)\\.md/\\L\\1/g' $gh_pages_dir/$docfile_base\n\n  # replace span tags to div\n  sed -i 's/<span class=/<div class=/g' $gh_pages_dir/$docfile_base\n  sed -i 's/<\\/span>/<\\/div>/g' $gh_pages_dir/$docfile_base\n\n  # remove table header separators\n  sed -i '/^| ---/d' $gh_pages_dir/$docfile_base\n\n  # update images\n  cp -Ru $docs_dir/img $gh_pages_dir\ndone\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/profiles/jerry",
    "content": "set rules {\n    jerry_always_curly\n    jerry_braces_on_separate_line\n    jerry_braces_same_line_or_column\n    jerry_comment_function_end\n    jerry_funcname_space_parentheses\n    jerry_identifier_no_space_bracket\n    jerry_indentation\n    jerry_max_line_length\n    jerry_no_space_after_opening_parentheses\n    jerry_no_space_before_closing_parentheses\n    jerry_no_tabs\n    jerry_no_trailing_spaces\n    jerry_no_leading_or_trailing_empty_line\n    jerry_no_consecutive_empty_lines\n    jerry_pointer_declarator_space\n    jerry_switch_case\n    jerry_typecast_space_parentheses\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_always_curly.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nforeach file_name [getSourceFileNames] {\n    set state \"control\"\n    set do_marks {}\n    set prev_tok_type \"\"\n    set prev_ctrl \"\"\n    set expect_while false\n    set expect_open_brace false\n    set paren_count 0\n\n    foreach token [getTokens $file_name 1 0 -1 -1 {if do while else for leftparen rightparen semicolon leftbrace rightbrace}] {\n        set tok_val [lindex $token 0]\n        set line_num [lindex $token 1]\n        set col_num [lindex $token 2]\n        set tok_type [lindex $token 3]\n\n        if {$state == \"expression\"} {\n            # puts \"expression $paren_count $tok_type ($line_num , $col_num)\"\n            if {$tok_type == \"leftparen\"} {\n                incr paren_count\n            } elseif {$tok_type == \"rightparen\"} {\n                incr paren_count -1\n                if {$paren_count == 0} {\n                    set state \"control\"\n                    set expect_open_brace true\n                } elseif {$paren_count < 0 } {\n                    report $file_name $line_num \"unexpected right parentheses\"\n                }\n            } elseif {$tok_type != \"semicolon\"} {\n                report $file_name $line_num \"unexpected token: $tok_type\"\n            }\n        } else {\n            if {$expect_open_brace == true} {\n                if {$tok_type == \"if\" && $prev_tok_type == \"else\"} {\n                    # empty\n                } elseif {$tok_type != \"leftbrace\"} {\n                    report $file_name [lindex $prev_ctrl 1] \"brace after \\'[lindex $prev_ctrl 3]\\' required\"\n                }\n                set expect_open_brace false\n            }\n\n            if {$tok_type == \"while\" && ($expect_while == true || [lindex $prev_ctrl 3] == \"do\")} {\n                set expect_while false\n                set prev_ctrl \"\"\n            } elseif {$tok_type in {if for while}} {\n                set state \"expression\"\n                set prev_ctrl $token\n            } elseif {$tok_type in {do else}} {\n                set expect_open_brace true\n                set prev_ctrl $token\n            } elseif {$tok_type == \"leftbrace\"} {\n                if {[lindex $prev_ctrl 3] == \"do\"} {\n                    lappend do_marks 1\n                } else {\n                    lappend do_marks 0\n                }\n                set prev_ctrl \"\"\n            } elseif {$tok_type == \"rightbrace\"} {\n                if {[llength $do_marks] > 0} {\n                    if {[lindex $do_marks end] == 1} {\n                        set expect_while true\n                    }\n                    set do_marks [lreplace $do_marks end end]\n                } else {\n                    report $file_name $line_num \"unmatched brace\"\n                }\n            }\n        }\n\n        set prev_tok_type $tok_type\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_braces_on_separate_line.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nforeach file_name [getSourceFileNames] {\n    set state \"normal\"\n    set lines {}\n    set cols {}\n    set struct_marks {}\n    set expect_struct_name false\n    set prev_tok \"\"\n    set def_start false\n    set expect_newline false\n    set check_newline true\n\n    foreach token [getTokens $file_name 1 0 -1 -1 {}] {\n        set tok_val [lindex $token 0]\n        set line_num [lindex $token 1]\n        set col_num [lindex $token 2]\n        set tok_type [lindex $token 3]\n\n        if {$state == \"macro\"} {\n            if {$col_num == 0} {\n                set state \"normal\"\n            } else {\n                continue\n            }\n        }\n\n        if {$tok_type in {space ccomment cppcomment newline}} {\n            continue\n        }\n\n        if {$tok_type == \"pp_define\"} {\n            set state \"macro\"\n            set prev_tok \"\"\n            set def_start false\n            continue\n        }\n\n        if {$expect_struct_name == true} {\n            if {$tok_type == \"identifier\" && $line_num != [lindex $prev_tok 1]} {\n                report $file_name $line_num \"type name should be on the same line with the rightbrace\"\n            }\n            set expect_struct_name false\n        }\n\n        # check that rightbrace and typename (in struct, union and enum definitons) are on the same line\n        if {$tok_type in {struct enum union}} {\n            set def_start true\n        } elseif {$tok_type == \"semicolon\"} {\n            set def_start false\n        } elseif {$tok_type == \"leftbrace\"} {\n            lappend cols $col_num\n            lappend lines $line_num\n            if {$def_start == true} {\n                lappend struct_marks 1\n                set def_start false\n            } elseif {[lindex $prev_tok 3] == \"assign\"} {\n                lappend struct_marks 2\n                set check_newline false\n            } else {\n                lappend struct_marks 0\n            }\n        } elseif {$tok_type == \"rightbrace\"} {\n            if {[llength $lines] > 0} {\n                if {[lindex $struct_marks end] == 1} {\n                    set expect_struct_name true\n                    set check_newline false\n                } elseif {[lindex $struct_marks end] == 2} {\n                    set check_newline false\n                }\n                set lines [lreplace $lines end end]\n                set cols [lreplace $cols end end]\n                set struct_marks [lreplace $struct_marks end end]\n            } else {\n                report $file_name $line_num \"unmatched brace\"\n            }\n        }\n\n        # check that braces are on separate lines\n        if {$check_newline == true} {\n            if {$expect_newline == true} {\n                if {$tok_type == \"semicolon\"} {\n                    # empty\n                } elseif {[lindex $prev_tok 1] == $line_num} {\n                    report $file_name $line_num \"brace should be placed on a separate line\"\n                } else {\n                    set expect_newline false\n                }\n            } elseif {$tok_type in {leftbrace rightbrace}} {\n                if {[lindex $prev_tok 1] == $line_num} {\n                    report $file_name $line_num \"brace should be placed on a separate line\"\n                }\n                set expect_newline true\n            }\n        } else {\n            set check_newline true\n        }\n\n        set prev_tok $token\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_braces_same_line_or_column.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nforeach file_name [getSourceFileNames] {\n    set state \"normal\"\n    set lines {}\n    set cols {}\n\n    foreach token [getTokens $file_name 1 0 -1 -1 {}] {\n        set tok_val [lindex $token 0]\n        set line_num [lindex $token 1]\n        set col_num [lindex $token 2]\n        set tok_type [lindex $token 3]\n\n        if {$state == \"macro\"} {\n            if {$col_num == 0} {\n                set state \"normal\"\n            } else {\n                set prev_tok_line $line_num\n                continue\n            }\n        }\n\n        if {$tok_type in {space ccomment cppcomment newline}} {\n            continue\n        }\n\n        if {$tok_type == \"pp_define\"} {\n            set state \"macro\"\n            continue\n        }\n\n        if {$tok_type == \"leftbrace\"} {\n            lappend cols $col_num\n            lappend lines $line_num\n        } elseif {$tok_type == \"rightbrace\"} {\n            if {[llength $lines] > 0} {\n                if {[lindex $lines end] != $line_num && [lindex $cols end] != $col_num} {\n                    report $file_name $line_num \"matching braces should be on the same line or column\"\n                }\n                set lines [lreplace $lines end end]\n                set cols [lreplace $cols end end]\n            } else {\n                report $file_name $line_num \"unmatched brace\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_comment_function_end.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nforeach fileName [getSourceFileNames] {\n    set funcStart 0\n    set funcName \"\"\n    set lineNumber 1\n    foreach line [getAllLines $fileName] {\n        if {[regexp {^((static |const )*\\w+ )*\\w+ \\(.*[,\\)]} $line]} {\n            set type {}\n            set modifier {}\n            if {$funcStart == 0} {\n                regexp {^((static |const )*\\w+ )*(\\w+) \\(} $line matched type modifier funcName\n            }\n        }\n\n        if {[regexp {^\\{$} $line]} {\n            set funcStart 1\n        }\n\n        if {$funcStart == 1} {\n            if {[regexp {^\\}$} $line] && [string length $funcName] != 0} {\n                report $fileName $lineNumber \"missing comment at the end of function: /* $funcName */\"\n                set funcStart 0\n            } elseif {[regexp {^\\} /\\*\\s*\\w+\\s*\\*/$} $line] && [string length $funcName] != 0} {\n                set comment {}\n                regexp {^\\} /\\*\\s*(\\w+)\\s*\\*/$} $line -> comment\n                if {$comment != $funcName} {\n                    report $fileName $lineNumber \"comment missmatch. (Current: $comment, Expected: $funcName) \"\n                }\n                set funcStart 0\n            } elseif {[regexp {^\\}.*;?$} $line]} {\n                set funcStart 0\n            }\n        }\n\n        incr lineNumber\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_funcname_space_parentheses.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nproc check_part_of_the_file {file line_num col_start col_end} {\n    if {$col_start == $col_end} {\n        return\n    }\n    set line [getLine $file $line_num]\n\n    if {[regexp {^\\s*#[ ]*define} $line]} {\n        return\n    }\n\n    set line [string range $line $col_start $col_end]\n\n    if {[regexp {([[:alnum:]][\\s]{2,}\\()|([[:alnum:]]\\()} $line]} {\n        report $file $line_num \"there should be exactly one space before left parentheses\"\n    }\n}\n\nforeach fileName [getSourceFileNames] {\n    set checkLine 1\n    set checkColStart 0\n    set seenOmitToken false\n    foreach token [getTokens $fileName 1 0 -1 -1 {}] {\n        set lineNumber [lindex $token 1]\n        set colNumber [lindex $token 2]\n        set tokenType [lindex $token 3]\n\n        if {$checkLine != $lineNumber} {\n            if {!$seenOmitToken} {\n                check_part_of_the_file $fileName $checkLine $checkColStart end\n            }\n            set checkColStart $colNumber\n            set checkLine $lineNumber\n        } elseif {$seenOmitToken} {\n            set checkColStart $colNumber\n        }\n\n        if {$tokenType in {ccomment cppcomment stringlit}} {\n            check_part_of_the_file $fileName $checkLine $checkColStart $colNumber\n            set seenOmitToken true\n        } else {\n            set seenOmitToken false\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_identifier_no_space_bracket.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nproc check_part_of_the_file {file line_num col_start col_end} {\n    if {$col_start == $col_end} {\n        return\n    }\n\n    set line [getLine $file $line_num]\n    set line [string range $line $col_start $col_end]\n\n    if {[regexp {[[:alnum:]_][\\s]+\\[} $line]} {\n        report $file $line_num \"there should be no spaces between identifier and left bracket\"\n    }\n}\n\nforeach fileName [getSourceFileNames] {\n    set checkLine 1\n    set checkColStart 0\n    set seenOmitToken false\n    foreach token [getTokens $fileName 1 0 -1 -1 {}] {\n        set lineNumber [lindex $token 1]\n        set colNumber [lindex $token 2]\n        set tokenType [lindex $token 3]\n\n        if {$checkLine != $lineNumber} {\n            if {!$seenOmitToken} {\n                check_part_of_the_file $fileName $checkLine $checkColStart end\n            }\n            set checkColStart $colNumber\n            set checkLine $lineNumber\n        } elseif {$seenOmitToken} {\n            set checkColStart $colNumber\n        }\n\n        if {$tokenType in {ccomment cppcomment stringlit}} {\n            check_part_of_the_file $fileName $checkLine $checkColStart $colNumber\n            set seenOmitToken true\n        } else {\n            set seenOmitToken false\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_indentation.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Indentation\n\nforeach fileName [getSourceFileNames] {\n    set indent 0\n    set lastCheckedLineNumber -1\n    set is_in_comment \"no\"\n    set is_in_pp_define \"no\"\n    set is_in_class \"no\"\n    set is_in_template \"no\"\n    set parentheses_level 0\n    set template_brackets_level 0\n\n    foreach token [getTokens $fileName 1 0 -1 -1 {}] {\n        set type [lindex $token 3]\n        set lineNumber [lindex $token 1]\n\n        if {$is_in_comment == \"yes\"} {\n            set is_in_comment \"no\"\n        }\n\n        if {$type == \"newline\"} {\n            set is_in_pp_define \"no\"\n        } elseif {$type == \"class\"} {\n            set is_in_class \"yes\"\n        } elseif {$type == \"template\"} {\n            set is_in_template \"yes\"\n        } elseif {$is_in_class == \"yes\" && $type == \"semicolon\" && $indent == 0} {\n            set is_in_class \"no\"\n        } elseif {$type == \"ccomment\"} {\n            set is_in_comment \"yes\"\n        } elseif {[string first \"pp_\" $type] == 0} {\n            if {$type == \"pp_define\"} {\n                set is_in_pp_define \"yes\"\n            }\n\n            set lastCheckedLineNumber $lineNumber\n        } elseif {$type == \"space\"} {\n        } elseif {$type != \"eof\"} {\n            if {$type == \"rightbrace\" && $indent > 0} {\n                incr indent -2\n            }\n\n            if {$is_in_pp_define == \"no\" && $is_in_comment == \"no\" && $parentheses_level == 0 &&\n                $is_in_template == \"no\"} {\n                set line [getLine $fileName $lineNumber]\n\n                if {$lineNumber != $lastCheckedLineNumber} {\n                    if {[regexp {^[[:blank:]]*} $line match]} {\n                        set real_indent [string length $match]\n                        if {$indent != $real_indent} {\n                            if {[regexp {^[[:blank:]]*(private:|public:|protected:)} $line]} {\n                                if {$indent != $real_indent + 2} {\n                                    set exp_indent [expr  {$indent - 2}]\n                                    report $fileName $lineNumber \"Indentation: $real_indent -> $exp_indent. Line: '$line'\"\n                                }\n                            } elseif {![regexp {^[[:alnum:]_]{1,}:$} $line] || $real_indent != 0} {\n                                report $fileName $lineNumber \"Indentation: $real_indent -> $indent. Line: '$line'\"\n                            }\n                        }\n                    }\n                }\n\n                if {$lineNumber == $lastCheckedLineNumber} {\n                    if {$type == \"leftbrace\"} {\n                        if {![regexp {^[[:blank:]]*\\{[[:blank:]]*$} $line]\n                            && ![regexp {[^\\{=]=[^\\{=]\\{.*\\},?} $line]} {\n                            report $fileName $lineNumber \"Left brace is not the only non-space character in the line: '$line'\"\n                        }\n                    }\n                    if {$type == \"rightbrace\"} {\n                        if {![regexp {^.* = .*\\{.*\\}[,;]?$} $line]\n                            && ![regexp {[^\\{=]=[^\\{=]\\{.*\\}[,;]?} $line]} {\n                            report $fileName $lineNumber \"Right brace is not first non-space character in the line: '$line'\"\n                        }\n                    }\n                }\n                if {$type == \"rightbrace\"} {\n                    if {![regexp {^[[:blank:]]*\\};?((( [a-z_\\(][a-z0-9_\\(\\)]{0,}){1,})?;| /\\*.*\\*/| //.*)?$} $line]\n                        && ![regexp {[^\\{=]=[^\\{=]\\{.*\\}[,;]?} $line]} {\n                        report $fileName $lineNumber \"Right brace is not the only non-space character in the line and \\\n                            is not single right brace followed by \\[a-z0-9_() \\] string and single semicolon character: '$line'\"\n                    }\n                }\n            }\n\n            if {$type == \"leftbrace\"} {\n                if {![regexp {^extern \"C\"} [getLine $fileName [expr {$lineNumber - 1}]]]} {\n                    incr indent 2\n                }\n            } elseif {$type == \"leftparen\"} {\n                incr parentheses_level 1\n            } elseif {$type == \"rightparen\"} {\n                incr parentheses_level -1\n            }\n\n            if {$is_in_template == \"yes\"} {\n                if {$type == \"less\"} {\n                    incr template_brackets_level\n                } elseif {$type == \"greater\"} {\n                    incr template_brackets_level -1\n                    if {$template_brackets_level == 0} {\n                        set is_in_template \"no\"\n                    }\n                }\n            }\n\n            set lastCheckedLineNumber $lineNumber\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_max_line_length.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset maxLen 120\n\nforeach f [getSourceFileNames] {\n    set lineNumber 1\n    foreach line [getAllLines $f] {\n        if {[string length $line] > $maxLen} {\n            report $f $lineNumber \"line is longer than ${maxLen} characters\"\n        }\n        incr lineNumber\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_no_consecutive_empty_lines.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset maxEmptyLines 1\n\nforeach f [getSourceFileNames] {\n    set lineNumber 1\n    set emptyCount 0\n    set reported false\n    foreach line [getAllLines $f] {\n        if {[string trim $line] == \"\"} {\n            incr emptyCount\n            if {$emptyCount > $maxEmptyLines && $reported == \"false\"} {\n                report $f $lineNumber \"too many consecutive empty lines\"\n                set reported true\n            }\n        } else {\n            set emptyCount 0\n            set reported false\n        }\n        incr lineNumber\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_no_leading_or_trailing_empty_line.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nforeach f [getSourceFileNames] {\n    set lineCount [getLineCount $f]\n    if {$lineCount > 0} {\n        set firstLine [getLine $f 1]\n        if {[string trim $firstLine] == \"\"} {\n            report $f 1 \"leading empty line(s)\"\n        }\n\n        set lastLine [getLine $f $lineCount]\n        if {[string trim $lastLine] == \"\"} {\n            report $f $lineCount \"trailing empty line(s)\"\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_no_space_after_opening_parentheses.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nproc check_part_of_the_file {file line_num col_start col_end} {\n    if {$col_start == $col_end} {\n        return\n    }\n\n    set line [getLine $file $line_num]\n    set line [string range $line $col_start $col_end]\n\n    if {[regexp {\\(+[[:blank:]]} $line]} {\n        report $file $line_num \"there should be no blank characters after opening parentheses\"\n    }\n}\n\nforeach fileName [getSourceFileNames] {\n    set checkLine 1\n    set checkColStart 0\n    set seenOmitToken false\n    foreach token [getTokens $fileName 1 0 -1 -1 {}] {\n        set lineNumber [lindex $token 1]\n        set colNumber [lindex $token 2]\n        set tokenType [lindex $token 3]\n\n        if {$checkLine != $lineNumber} {\n            if {!$seenOmitToken} {\n                check_part_of_the_file $fileName $checkLine $checkColStart end\n            }\n            set checkColStart $colNumber\n            set checkLine $lineNumber\n        } elseif {$seenOmitToken} {\n            set checkColStart $colNumber\n        }\n\n        if {$tokenType in {ccomment cppcomment stringlit}} {\n            check_part_of_the_file $fileName $checkLine $checkColStart $colNumber\n            set seenOmitToken true\n        } else {\n            set seenOmitToken false\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_no_space_before_closing_parentheses.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nproc check_part_of_the_file {file line_num col_start col_end} {\n    if {$col_start == $col_end} {\n        return\n    }\n\n    set line [getLine $file $line_num]\n    set line [string range $line $col_start $col_end]\n\n    if {[regexp {[[:graph:]][[:blank:]]+\\)} $line]} {\n        report $file $line_num \"there should be no blank characters before closing parentheses\"\n    }\n}\n\nforeach fileName [getSourceFileNames] {\n    set checkLine 1\n    set checkColStart 0\n    set seenOmitToken false\n    foreach token [getTokens $fileName 1 0 -1 -1 {}] {\n        set lineNumber [lindex $token 1]\n        set colNumber [lindex $token 2]\n        set tokenType [lindex $token 3]\n\n        if {$checkLine != $lineNumber} {\n            if {!$seenOmitToken} {\n                check_part_of_the_file $fileName $checkLine $checkColStart end\n            }\n            set checkColStart $colNumber\n            set checkLine $lineNumber\n        } elseif {$seenOmitToken} {\n            set checkColStart $colNumber\n        }\n\n        if {$tokenType in {ccomment cppcomment stringlit}} {\n            check_part_of_the_file $fileName $checkLine $checkColStart $colNumber\n            set seenOmitToken true\n        } else {\n            set seenOmitToken false\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_no_tabs.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nforeach f [getSourceFileNames] {\n    set lineNumber 1\n    foreach line [getAllLines $f] {\n        if {[regexp {\\t} $line]} {\n            report $f $lineNumber \"tabs are not allowed\"\n        }\n        incr lineNumber\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_no_trailing_spaces.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nforeach f [getSourceFileNames] {\n    set lineNumber 1\n    foreach line [getAllLines $f] {\n        if {[regexp {[[:blank:]]$} $line]} {\n            report $f $lineNumber \"trailing space is not allowed\"\n        }\n        incr lineNumber\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_pointer_declarator_space.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nproc check_part_of_the_file {file line_num col_start col_end} {\n    if {$col_start == $col_end} {\n        return\n    }\n\n    set line [getLine $file $line_num]\n    set line [string range $line $col_start $col_end]\n\n    if {[regexp {\\w\\*\\s\\w+} $line]\n         || [regexp {\\w\\*\\)} $line]\n         || [regexp {\\w\\*$} $line]} {\n        report $file $line_num \"there should be a space between the referenced type and the pointer declarator.\"\n    }\n}\n\nforeach fileName [getSourceFileNames] {\n    set checkLine 1\n    set checkColStart 0\n    set seenOmitToken false\n    foreach token [getTokens $fileName 1 0 -1 -1 {}] {\n        set lineNumber [lindex $token 1]\n        set colNumber [lindex $token 2]\n        set tokenType [lindex $token 3]\n\n        if {$checkLine != $lineNumber} {\n            if {!$seenOmitToken} {\n                check_part_of_the_file $fileName $checkLine $checkColStart end\n            }\n            set checkColStart $colNumber\n            set checkLine $lineNumber\n        } elseif {$seenOmitToken} {\n            set checkColStart $colNumber\n        }\n\n        if {$tokenType in {ccomment cppcomment stringlit}} {\n            check_part_of_the_file $fileName $checkLine $checkColStart $colNumber\n            set seenOmitToken true\n        } else {\n            set seenOmitToken false\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_switch_case.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# switch-case\n\nforeach fileName [getSourceFileNames] {\n    set is_in_comment \"no\"\n    set is_in_pp_define \"no\"\n\n    foreach token [getTokens $fileName 1 0 -1 -1 {}] {\n        set type [lindex $token 3]\n        set lineNumber [lindex $token 1]\n\n        if {$is_in_comment == \"yes\"} {\n            set is_in_comment \"no\"\n        }\n\n        if {$type == \"newline\"} {\n            set is_in_pp_define \"no\"\n        } elseif {$type == \"ccomment\"} {\n            set is_in_comment \"yes\"\n        } elseif {[string first \"pp_\" $type] == 0} {\n            if {$type == \"pp_define\"} {\n                set is_in_pp_define \"yes\"\n            }\n        } elseif {$type == \"space\"} {\n        } elseif {$type != \"eof\"} {\n            if {$is_in_pp_define == \"no\" && $type == \"switch\"} {\n                set next_token_start [lindex $token 2]\n                incr next_token_start 1\n                set line_num 0\n                set state \"switch\"\n                set case_block \"no\"\n                set seen_braces 0\n                foreach next_token [getTokens $fileName $lineNumber $next_token_start -1 -1 {}] {\n                    set next_token_type [lindex $next_token 3]\n                    set next_token_value [lindex $next_token 0]\n                    if {$state == \"switch\"} {\n                        if {$next_token_type == \"ccomment\" || $next_token_type == \"space\" || $next_token_type == \"newline\"} {\n                            continue\n                        } elseif {$next_token_type == \"leftbrace\"} {\n                            set state \"first-case\"\n                            continue\n                        } else {\n                            # TODO: check switch\n                            continue\n                        }\n                    } elseif {$state == \"first-case\"} {\n                        if {$next_token_type == \"ccomment\" || $next_token_type == \"space\" || $next_token_type == \"newline\"} {\n                            continue\n                        } elseif {$next_token_type == \"case\"} {\n                            set state \"case\"\n                            continue\n                        } elseif {$next_token_type == \"default\"} {\n                            set state \"default\"\n                            continue\n                        } else {\n                            # Macros magic: give up\n                            break\n                        }\n                    } elseif {$state == \"case\"} {\n                        if {$next_token_type == \"space\"} {\n                            set state \"space-after-case\"\n                            continue\n                        } else {\n                            report $fileName [lindex $next_token 1] \"There should be single space character after 'case' keyword (state $state)\"\n                        }\n                    } elseif {$state == \"space-after-case\"} {\n                        if {$next_token_type != \"identifier\" && $next_token_type != \"intlit\" && $next_token_type != \"charlit\" && $next_token_type != \"sizeof\"} {\n                            report $fileName [lindex $next_token 1] \"There should be single space character after 'case' keyword (state $state, next_token_type $next_token_type)\"\n                        } else {\n                            set state \"case-label\"\n                            continue\n                        }\n                    } elseif {$state == \"case-label\" || $state == \"default\"} {\n                        set case_block \"no\"\n                        if {$next_token_type != \"colon\"} {\n                            continue\n                        } else {\n                            set state \"colon\"\n                            continue\n                        }\n                    } elseif {$state == \"after-colon-preprocessor\"} {\n                      if {$next_token_type == \"newline\"} {\n                          set state \"colon\"\n                      }\n                    } elseif {$state == \"colon\"} {\n                        if {$next_token_type == \"space\" || $next_token_type == \"newline\"} {\n                            continue\n                        } elseif {$next_token_type == \"ccomment\"} {\n                            if {[string match \"*FALL*\" $next_token_value]} {\n                                set state \"fallthru\"\n                                set line_num [lindex $next_token 1]\n                                continue\n                            } else {\n                                continue\n                            }\n                        } elseif {$next_token_type == \"case\"} {\n                            set state \"case\"\n                            continue\n                        } elseif {$next_token_type == \"default\"} {\n                            set state \"default\"\n                            continue\n                        } elseif {$next_token_type == \"leftbrace\"} {\n                            set case_block \"yes\"\n                            set state \"wait-for-break\"\n                            continue\n                        } elseif {$next_token_type == \"identifier\"} {\n                            if {[string compare \"JERRY_UNREACHABLE\" $next_token_value] == 0\n                                || [string first \"JERRY_UNIMPLEMENTED\" $next_token_value] == 0} {\n                                set state \"wait-for-semicolon\"\n                                continue\n                            } else {\n                                set state \"wait-for-break\"\n                                continue\n                            }\n                        } elseif {$next_token_type == \"break\"\n                                  || $next_token_type == \"continue\"\n                                  || $next_token_type == \"return\"} {\n                            set state \"wait-for-semicolon\"\n                            continue\n                        } elseif {[string first \"pp_\" $next_token_type] == 0} {\n                            set state \"after-colon-preprocessor\"\n                        } else {\n                            set state \"wait-for-break\"\n                            continue\n                        }\n                    } elseif {$state == \"wait-for-semicolon\"} {\n                        if {$next_token_type == \"semicolon\"} {\n                            set state \"break\"\n                        }\n                        continue\n                    } elseif {$state == \"wait-for-break\"} {\n                        if {$next_token_type == \"case\" || $next_token_type == \"default\"} {\n                            report $fileName [lindex $next_token 1] \"Missing break, continue or FALLTHRU comment before case (state $state)\"\n                        } elseif {$next_token_type == \"leftbrace\"} {\n                            set state \"inside-braces\"\n                            incr seen_braces 1\n                            continue\n                        } elseif {$next_token_type == \"rightbrace\"} {\n                            if {$case_block == \"yes\"} {\n                                set state \"case-blocks-end\"\n                                continue\n                            } else {\n                                break\n                            }\n                        } elseif {[string compare \"JERRY_UNREACHABLE\" $next_token_value] == 0\n                                   || [string first \"JERRY_UNIMPLEMENTED\" $next_token_value] == 0} {\n                            set state \"wait-for-semicolon\"\n                            continue\n                        } elseif {$next_token_type == \"ccomment\" && [string match \"*FALL*\" $next_token_value]} {\n                            set state \"fallthru\"\n                            set line_num [lindex $next_token 1]\n                            continue\n                        } elseif {$next_token_type == \"break\"\n                                  || $next_token_type == \"continue\"\n                                  || $next_token_type == \"return\"\n                                  || $next_token_type == \"goto\"} {\n                            set state \"wait-for-semicolon\"\n                            continue\n                        }\n                        continue\n                    } elseif {$state == \"break\" || $state == \"fallthru\"} {\n                        if {$case_block == \"no\"} {\n                            if {$next_token_type == \"ccomment\" || $next_token_type == \"space\" || $next_token_type == \"newline\"} {\n                                continue\n                            } elseif {$next_token_type == \"case\"} {\n                                set state \"case\"\n                                continue\n                            } elseif {$next_token_type == \"default\"} {\n                                set state \"default\"\n                                continue\n                            } elseif {$next_token_type == \"leftbrace\"} {\n                                set state \"inside-braces\"\n                                incr seen_braces 1\n                                continue\n                            } elseif {$next_token_type == \"rightbrace\"} {\n                                lappend switch_ends [lindex $next_token 1]\n                                break\n                            } elseif {$next_token_type == \"break\"\n                                      || $next_token_type == \"continue\"\n                                      || $next_token_type == \"return\"} {\n                                set state \"wait-for-semicolon\"\n                                continue\n                            } else {\n                                set state \"wait-for-break\"\n                                continue\n                            }\n                        } else {\n                            if {$next_token_type == \"ccomment\" || $next_token_type == \"space\" || $next_token_type == \"newline\"} {\n                                continue\n                            } elseif {$next_token_type == \"case\"} {\n                                set state \"case\"\n                                continue\n                            } elseif {$next_token_type == \"default\"} {\n                                set state \"default\"\n                                continue\n                            } elseif {$next_token_type == \"leftbrace\"} {\n                                set state \"inside-braces\"\n                                incr seen_braces 1\n                                continue\n                            } elseif {$next_token_type == \"rightbrace\"} {\n                                set state \"after-rightbrace\"\n                                continue\n                            } elseif {$next_token_type == \"break\"\n                                      || $next_token_type == \"continue\"\n                                      || $next_token_type == \"return\"} {\n                                set state \"wait-for-semicolon\"\n                                continue\n                            } else {\n                                set state \"wait-for-break\"\n                                continue\n                            }\n                        }\n                    } elseif {$state == \"inside-braces\"} {\n                        if {$next_token_type == \"rightbrace\"} {\n                            incr seen_braces -1\n                            if {$seen_braces == 0} {\n                                set state \"wait-for-break\"\n                                continue\n                            }\n                        } elseif {$next_token_type == \"leftbrace\"} {\n                            incr seen_braces 1\n                        }\n                        continue\n                    } elseif {$state == \"after-rightbrace-preprocessor\"} {\n                        if {$next_token_type == \"newline\"} {\n                            set state \"after-rightbrace\"\n                        }\n                   } elseif {$state == \"after-rightbrace\"} {\n                        if {$next_token_type == \"ccomment\" || $next_token_type == \"space\" || $next_token_type == \"newline\"} {\n                            continue\n                        } elseif {$next_token_type == \"case\"} {\n                            set state \"case\"\n                            continue\n                        } elseif {$next_token_type == \"default\"} {\n                            set state \"default\"\n                            continue\n                        }  elseif {$next_token_type == \"rightbrace\"} {\n                            lappend switch_ends [lindex $next_token 1]\n                            break\n                        } elseif {[string first \"pp_\" $next_token_type] == 0} {\n                            set state \"after-rightbrace-preprocessor\"\n                        } else {\n                            report $fileName [lindex $next_token 1] \"There should be 'case' or 'default' (state $state)\"\n                        }\n                    } elseif {$state == \"case-blocks-end-preprocessor\"} {\n                      if {$next_token_type == \"newline\"} {\n                          set state \"case-blocks-end\"\n                      }\n                    } elseif {$state == \"case-blocks-end\"} {\n                        if {$next_token_type == \"ccomment\" || $next_token_type == \"space\" || $next_token_type == \"newline\"} {\n                            continue\n                        } elseif {$next_token_type == \"rightbrace\"} {\n                            lappend switch_ends [lindex $next_token 1]\n                            break\n                        } elseif {[string first \"pp_\" $next_token_type] == 0} {\n                            set state \"case-blocks-end-preprocessor\"\n                        } else {\n                            report $fileName [lindex $next_token 1] \"Missing break, continue or FALLTHRU comment before rightbrace (state $state)\"\n                        }\n                    } else {\n                        report $fileName [lindex $next_token 1] \"Unknown state: $state\"\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/vera++/scripts/rules/jerry_typecast_space_parentheses.tcl",
    "content": "#!/usr/bin/tclsh\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nproc check_part_of_the_file {file line_num col_start col_end} {\n    if {$col_start == $col_end} {\n        return\n    }\n\n    set line [getLine $file $line_num]\n    set line [string range $line $col_start $col_end]\n\n    if {[regexp {\\)[\\w\\(&~=]} $line]} {\n        report $file $line_num \"there should be exactly one space after right parentheses\"\n    }\n}\n\nforeach fileName [getSourceFileNames] {\n    set checkLine 1\n    set checkColStart 0\n    set seenOmitToken false\n    foreach token [getTokens $fileName 1 0 -1 -1 {}] {\n        set lineNumber [lindex $token 1]\n        set colNumber [lindex $token 2]\n        set tokenType [lindex $token 3]\n\n        if {$checkLine != $lineNumber} {\n            if {!$seenOmitToken} {\n                check_part_of_the_file $fileName $checkLine $checkColStart end\n            }\n            set checkColStart $colNumber\n            set checkLine $lineNumber\n        } elseif {$seenOmitToken} {\n            set checkColStart $colNumber\n        }\n\n        if {$tokenType in {ccomment cppcomment stringlit}} {\n            check_part_of_the_file $fileName $checkLine $checkColStart $colNumber\n            set seenOmitToken true\n        } else {\n            set seenOmitToken false\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/jerryscript/tools/version.py",
    "content": "#!/usr/bin/env python\n\n# Copyright JS Foundation and other contributors, http://js.foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\n\nimport argparse\nimport os\nimport re\nimport settings\n\n\ndef main():\n    parser = argparse.ArgumentParser(\n        description='Display version of JerryScript',\n        epilog=\"\"\"\n            Extract version information from sources without relying on\n            compiler or preprocessor features.\n            \"\"\"\n    )\n    _ = parser.parse_args()\n\n    with open(os.path.join(settings.PROJECT_DIR, 'jerry-core', 'include', 'jerryscript-core.h'), 'r') as header:\n        version = {}\n        version_re = re.compile(r'\\s*#define\\s+JERRY_API_(?P<key>MAJOR|MINOR|PATCH)_VERSION\\s+(?P<value>\\S+)')\n        for line in header:\n            match = version_re.match(line)\n            if match:\n                version[match.group('key')] = match.group('value')\n\n    print('%(MAJOR)s.%(MINOR)s.%(PATCH)s' % version)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/CMakeLists.txt",
    "content": "add_library(libpng STATIC)\nfile(GLOB_RECURSE libpng_SOURCES \"*.c\" \"*.h\")\nlist(FILTER libpng_SOURCES EXCLUDE REGEX \"pngtest\\\\.c$\")\ntarget_include_directories(libpng PUBLIC ../../)\ntarget_sources(libpng PRIVATE ${libpng_SOURCES})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/png.c",
    "content": "\n/* png.c - location for general purpose libpng functions\n *\n * Last changed in libpng 1.2.43 [February 25, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_EXTERN\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n\n/* Generate a compiler error if there is an old png.h in the search path. */\ntypedef version_1_2_44 Your_png_h_is_not_version_1_2_44;\n\n/* Version information for C files.  This had better match the version\n * string defined in png.h.\n */\n\n#ifdef PNG_USE_GLOBAL_ARRAYS\n/* png_libpng_ver was changed to a function in version 1.0.5c */\nPNG_CONST char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;\n\n#ifdef PNG_READ_SUPPORTED\n\n/* png_sig was changed to a function in version 1.0.5c */\n/* Place to hold the signature string for a PNG file. */\nPNG_CONST png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};\n#endif /* PNG_READ_SUPPORTED */\n\n/* Invoke global declarations for constant strings for known chunk types */\nPNG_IHDR;\nPNG_IDAT;\nPNG_IEND;\nPNG_PLTE;\nPNG_bKGD;\nPNG_cHRM;\nPNG_gAMA;\nPNG_hIST;\nPNG_iCCP;\nPNG_iTXt;\nPNG_oFFs;\nPNG_pCAL;\nPNG_sCAL;\nPNG_pHYs;\nPNG_sBIT;\nPNG_sPLT;\nPNG_sRGB;\nPNG_tEXt;\nPNG_tIME;\nPNG_tRNS;\nPNG_zTXt;\n\n#ifdef PNG_READ_SUPPORTED\n/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */\n\n/* Start of interlace block */\nPNG_CONST int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};\n\n/* Offset to next interlace block */\nPNG_CONST int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};\n\n/* Start of interlace block in the y direction */\nPNG_CONST int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};\n\n/* Offset to next interlace block in the y direction */\nPNG_CONST int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};\n\n/* Height of interlace block.  This is not currently used - if you need\n * it, uncomment it here and in png.h\nPNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};\n*/\n\n/* Mask to determine which pixels are valid in a pass */\nPNG_CONST int FARDATA png_pass_mask[] =\n    {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};\n\n/* Mask to determine which pixels to overwrite while displaying */\nPNG_CONST int FARDATA png_pass_dsp_mask[]\n   = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};\n\n#endif /* PNG_READ_SUPPORTED */\n#endif /* PNG_USE_GLOBAL_ARRAYS */\n\n/* Tells libpng that we have already handled the first \"num_bytes\" bytes\n * of the PNG file signature.  If the PNG data is embedded into another\n * stream we can set num_bytes = 8 so that libpng will not attempt to read\n * or write any of the magic bytes before it starts on the IHDR.\n */\n\n#ifdef PNG_READ_SUPPORTED\nvoid PNGAPI\npng_set_sig_bytes(png_structp png_ptr, int num_bytes)\n{\n   png_debug(1, \"in png_set_sig_bytes\");\n\n   if (png_ptr == NULL)\n      return;\n\n   if (num_bytes > 8)\n      png_error(png_ptr, \"Too many bytes for PNG signature.\");\n\n   png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes);\n}\n\n/* Checks whether the supplied bytes match the PNG signature.  We allow\n * checking less than the full 8-byte signature so that those apps that\n * already read the first few bytes of a file to determine the file type\n * can simply check the remaining bytes for extra assurance.  Returns\n * an integer less than, equal to, or greater than zero if sig is found,\n * respectively, to be less than, to match, or be greater than the correct\n * PNG signature (this is the same behaviour as strcmp, memcmp, etc).\n */\nint PNGAPI\npng_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)\n{\n   png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};\n   if (num_to_check > 8)\n      num_to_check = 8;\n   else if (num_to_check < 1)\n      return (-1);\n\n   if (start > 7)\n      return (-1);\n\n   if (start + num_to_check > 8)\n      num_to_check = 8 - start;\n\n   return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check)));\n}\n\n#if defined(PNG_1_0_X) || defined(PNG_1_2_X)\n/* (Obsolete) function to check signature bytes.  It does not allow one\n * to check a partial signature.  This function might be removed in the\n * future - use png_sig_cmp().  Returns true (nonzero) if the file is PNG.\n */\nint PNGAPI\npng_check_sig(png_bytep sig, int num)\n{\n  return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num));\n}\n#endif\n#endif /* PNG_READ_SUPPORTED */\n\n#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)\n/* Function to allocate memory for zlib and clear it to 0. */\n#ifdef PNG_1_0_X\nvoidpf PNGAPI\n#else\nvoidpf /* PRIVATE */\n#endif\npng_zalloc(voidpf png_ptr, uInt items, uInt size)\n{\n   png_voidp ptr;\n   png_structp p=(png_structp)png_ptr;\n   png_uint_32 save_flags=p->flags;\n   png_uint_32 num_bytes;\n\n   if (png_ptr == NULL)\n      return (NULL);\n   if (items > PNG_UINT_32_MAX/size)\n   {\n     png_warning (p, \"Potential overflow in png_zalloc()\");\n     return (NULL);\n   }\n   num_bytes = (png_uint_32)items * size;\n\n   p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;\n   ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);\n   p->flags=save_flags;\n\n#if defined(PNG_1_0_X) && !defined(PNG_NO_ZALLOC_ZERO)\n   if (ptr == NULL)\n       return ((voidpf)ptr);\n\n   if (num_bytes > (png_uint_32)0x8000L)\n   {\n      png_memset(ptr, 0, (png_size_t)0x8000L);\n      png_memset((png_bytep)ptr + (png_size_t)0x8000L, 0,\n         (png_size_t)(num_bytes - (png_uint_32)0x8000L));\n   }\n   else\n   {\n      png_memset(ptr, 0, (png_size_t)num_bytes);\n   }\n#endif\n   return ((voidpf)ptr);\n}\n\n/* Function to free memory for zlib */\n#ifdef PNG_1_0_X\nvoid PNGAPI\n#else\nvoid /* PRIVATE */\n#endif\npng_zfree(voidpf png_ptr, voidpf ptr)\n{\n   png_free((png_structp)png_ptr, (png_voidp)ptr);\n}\n\n/* Reset the CRC variable to 32 bits of 1's.  Care must be taken\n * in case CRC is > 32 bits to leave the top bits 0.\n */\nvoid /* PRIVATE */\npng_reset_crc(png_structp png_ptr)\n{\n   png_ptr->crc = crc32(0, Z_NULL, 0);\n}\n\n/* Calculate the CRC over a section of data.  We can only pass as\n * much data to this routine as the largest single buffer size.  We\n * also check that this data will actually be used before going to the\n * trouble of calculating it.\n */\nvoid /* PRIVATE */\npng_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length)\n{\n   int need_crc = 1;\n\n   if (png_ptr->chunk_name[0] & 0x20)                     /* ancillary */\n   {\n      if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) ==\n          (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN))\n         need_crc = 0;\n   }\n   else                                                    /* critical */\n   {\n      if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE)\n         need_crc = 0;\n   }\n\n   if (need_crc)\n      png_ptr->crc = crc32(png_ptr->crc, ptr, (uInt)length);\n}\n\n/* Allocate the memory for an info_struct for the application.  We don't\n * really need the png_ptr, but it could potentially be useful in the\n * future.  This should be used in favour of malloc(png_sizeof(png_info))\n * and png_info_init() so that applications that want to use a shared\n * libpng don't have to be recompiled if png_info changes size.\n */\npng_infop PNGAPI\npng_create_info_struct(png_structp png_ptr)\n{\n   png_infop info_ptr;\n\n   png_debug(1, \"in png_create_info_struct\");\n\n   if (png_ptr == NULL)\n      return (NULL);\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO,\n      png_ptr->malloc_fn, png_ptr->mem_ptr);\n#else\n   info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);\n#endif\n   if (info_ptr != NULL)\n      png_info_init_3(&info_ptr, png_sizeof(png_info));\n\n   return (info_ptr);\n}\n\n/* This function frees the memory associated with a single info struct.\n * Normally, one would use either png_destroy_read_struct() or\n * png_destroy_write_struct() to free an info struct, but this may be\n * useful for some applications.\n */\nvoid PNGAPI\npng_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)\n{\n   png_infop info_ptr = NULL;\n\n   png_debug(1, \"in png_destroy_info_struct\");\n\n   if (png_ptr == NULL)\n      return;\n\n   if (info_ptr_ptr != NULL)\n      info_ptr = *info_ptr_ptr;\n\n   if (info_ptr != NULL)\n   {\n      png_info_destroy(png_ptr, info_ptr);\n\n#ifdef PNG_USER_MEM_SUPPORTED\n      png_destroy_struct_2((png_voidp)info_ptr, png_ptr->free_fn,\n          png_ptr->mem_ptr);\n#else\n      png_destroy_struct((png_voidp)info_ptr);\n#endif\n      *info_ptr_ptr = NULL;\n   }\n}\n\n/* Initialize the info structure.  This is now an internal function (0.89)\n * and applications using it are urged to use png_create_info_struct()\n * instead.\n */\n#if defined(PNG_1_0_X) || defined(PNG_1_2_X)\n#undef png_info_init\nvoid PNGAPI\npng_info_init(png_infop info_ptr)\n{\n   /* We only come here via pre-1.0.12-compiled applications */\n   png_info_init_3(&info_ptr, 0);\n}\n#endif\n\nvoid PNGAPI\npng_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)\n{\n   png_infop info_ptr = *ptr_ptr;\n\n   png_debug(1, \"in png_info_init_3\");\n\n   if (info_ptr == NULL)\n      return;\n\n   if (png_sizeof(png_info) > png_info_struct_size)\n   {\n      png_destroy_struct(info_ptr);\n      info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);\n      *ptr_ptr = info_ptr;\n   }\n\n   /* Set everything to 0 */\n   png_memset(info_ptr, 0, png_sizeof(png_info));\n}\n\n#ifdef PNG_FREE_ME_SUPPORTED\nvoid PNGAPI\npng_data_freer(png_structp png_ptr, png_infop info_ptr,\n   int freer, png_uint_32 mask)\n{\n   png_debug(1, \"in png_data_freer\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   if (freer == PNG_DESTROY_WILL_FREE_DATA)\n      info_ptr->free_me |= mask;\n   else if (freer == PNG_USER_WILL_FREE_DATA)\n      info_ptr->free_me &= ~mask;\n   else\n      png_warning(png_ptr,\n         \"Unknown freer parameter in png_data_freer.\");\n}\n#endif\n\nvoid PNGAPI\npng_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,\n   int num)\n{\n   png_debug(1, \"in png_free_data\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n#ifdef PNG_TEXT_SUPPORTED\n   /* Free text item num or (if num == -1) all text items */\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_TEXT) & info_ptr->free_me)\n#else\n   if (mask & PNG_FREE_TEXT)\n#endif\n   {\n      if (num != -1)\n      {\n         if (info_ptr->text && info_ptr->text[num].key)\n         {\n            png_free(png_ptr, info_ptr->text[num].key);\n            info_ptr->text[num].key = NULL;\n         }\n      }\n      else\n      {\n         int i;\n         for (i = 0; i < info_ptr->num_text; i++)\n             png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, i);\n         png_free(png_ptr, info_ptr->text);\n         info_ptr->text = NULL;\n         info_ptr->num_text=0;\n      }\n   }\n#endif\n\n#ifdef PNG_tRNS_SUPPORTED\n   /* Free any tRNS entry */\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_TRNS) & info_ptr->free_me)\n#else\n   if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS))\n#endif\n   {\n      png_free(png_ptr, info_ptr->trans);\n      info_ptr->trans = NULL;\n      info_ptr->valid &= ~PNG_INFO_tRNS;\n#ifndef PNG_FREE_ME_SUPPORTED\n      png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;\n#endif\n   }\n#endif\n\n#ifdef PNG_sCAL_SUPPORTED\n   /* Free any sCAL entry */\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_SCAL) & info_ptr->free_me)\n#else\n   if (mask & PNG_FREE_SCAL)\n#endif\n   {\n#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)\n      png_free(png_ptr, info_ptr->scal_s_width);\n      png_free(png_ptr, info_ptr->scal_s_height);\n      info_ptr->scal_s_width = NULL;\n      info_ptr->scal_s_height = NULL;\n#endif\n      info_ptr->valid &= ~PNG_INFO_sCAL;\n   }\n#endif\n\n#ifdef PNG_pCAL_SUPPORTED\n   /* Free any pCAL entry */\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_PCAL) & info_ptr->free_me)\n#else\n   if (mask & PNG_FREE_PCAL)\n#endif\n   {\n      png_free(png_ptr, info_ptr->pcal_purpose);\n      png_free(png_ptr, info_ptr->pcal_units);\n      info_ptr->pcal_purpose = NULL;\n      info_ptr->pcal_units = NULL;\n      if (info_ptr->pcal_params != NULL)\n         {\n            int i;\n            for (i = 0; i < (int)info_ptr->pcal_nparams; i++)\n            {\n               png_free(png_ptr, info_ptr->pcal_params[i]);\n               info_ptr->pcal_params[i] = NULL;\n            }\n            png_free(png_ptr, info_ptr->pcal_params);\n            info_ptr->pcal_params = NULL;\n         }\n      info_ptr->valid &= ~PNG_INFO_pCAL;\n   }\n#endif\n\n#ifdef PNG_iCCP_SUPPORTED\n   /* Free any iCCP entry */\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_ICCP) & info_ptr->free_me)\n#else\n   if (mask & PNG_FREE_ICCP)\n#endif\n   {\n      png_free(png_ptr, info_ptr->iccp_name);\n      png_free(png_ptr, info_ptr->iccp_profile);\n      info_ptr->iccp_name = NULL;\n      info_ptr->iccp_profile = NULL;\n      info_ptr->valid &= ~PNG_INFO_iCCP;\n   }\n#endif\n\n#ifdef PNG_sPLT_SUPPORTED\n   /* Free a given sPLT entry, or (if num == -1) all sPLT entries */\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_SPLT) & info_ptr->free_me)\n#else\n   if (mask & PNG_FREE_SPLT)\n#endif\n   {\n      if (num != -1)\n      {\n         if (info_ptr->splt_palettes)\n         {\n            png_free(png_ptr, info_ptr->splt_palettes[num].name);\n            png_free(png_ptr, info_ptr->splt_palettes[num].entries);\n            info_ptr->splt_palettes[num].name = NULL;\n            info_ptr->splt_palettes[num].entries = NULL;\n         }\n      }\n      else\n      {\n         if (info_ptr->splt_palettes_num)\n         {\n            int i;\n            for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)\n               png_free_data(png_ptr, info_ptr, PNG_FREE_SPLT, i);\n\n            png_free(png_ptr, info_ptr->splt_palettes);\n            info_ptr->splt_palettes = NULL;\n            info_ptr->splt_palettes_num = 0;\n         }\n         info_ptr->valid &= ~PNG_INFO_sPLT;\n      }\n   }\n#endif\n\n#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\n   if (png_ptr->unknown_chunk.data)\n   {\n      png_free(png_ptr, png_ptr->unknown_chunk.data);\n      png_ptr->unknown_chunk.data = NULL;\n   }\n\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_UNKN) & info_ptr->free_me)\n#else\n   if (mask & PNG_FREE_UNKN)\n#endif\n   {\n      if (num != -1)\n      {\n          if (info_ptr->unknown_chunks)\n          {\n             png_free(png_ptr, info_ptr->unknown_chunks[num].data);\n             info_ptr->unknown_chunks[num].data = NULL;\n          }\n      }\n      else\n      {\n         int i;\n\n         if (info_ptr->unknown_chunks_num)\n         {\n            for (i = 0; i < (int)info_ptr->unknown_chunks_num; i++)\n               png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i);\n\n            png_free(png_ptr, info_ptr->unknown_chunks);\n            info_ptr->unknown_chunks = NULL;\n            info_ptr->unknown_chunks_num = 0;\n         }\n      }\n   }\n#endif\n\n#ifdef PNG_hIST_SUPPORTED\n   /* Free any hIST entry */\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_HIST)  & info_ptr->free_me)\n#else\n   if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST))\n#endif\n   {\n      png_free(png_ptr, info_ptr->hist);\n      info_ptr->hist = NULL;\n      info_ptr->valid &= ~PNG_INFO_hIST;\n#ifndef PNG_FREE_ME_SUPPORTED\n      png_ptr->flags &= ~PNG_FLAG_FREE_HIST;\n#endif\n   }\n#endif\n\n   /* Free any PLTE entry that was internally allocated */\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_PLTE) & info_ptr->free_me)\n#else\n   if ((mask & PNG_FREE_PLTE) && (png_ptr->flags & PNG_FLAG_FREE_PLTE))\n#endif\n   {\n      png_zfree(png_ptr, info_ptr->palette);\n      info_ptr->palette = NULL;\n      info_ptr->valid &= ~PNG_INFO_PLTE;\n#ifndef PNG_FREE_ME_SUPPORTED\n      png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;\n#endif\n      info_ptr->num_palette = 0;\n   }\n\n#ifdef PNG_INFO_IMAGE_SUPPORTED\n   /* Free any image bits attached to the info structure */\n#ifdef PNG_FREE_ME_SUPPORTED\n   if ((mask & PNG_FREE_ROWS) & info_ptr->free_me)\n#else\n   if (mask & PNG_FREE_ROWS)\n#endif\n   {\n      if (info_ptr->row_pointers)\n      {\n         int row;\n         for (row = 0; row < (int)info_ptr->height; row++)\n         {\n            png_free(png_ptr, info_ptr->row_pointers[row]);\n            info_ptr->row_pointers[row] = NULL;\n         }\n         png_free(png_ptr, info_ptr->row_pointers);\n         info_ptr->row_pointers = NULL;\n      }\n      info_ptr->valid &= ~PNG_INFO_IDAT;\n   }\n#endif\n\n#ifdef PNG_FREE_ME_SUPPORTED\n   if (num == -1)\n      info_ptr->free_me &= ~mask;\n   else\n      info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL);\n#endif\n}\n\n/* This is an internal routine to free any memory that the info struct is\n * pointing to before re-using it or freeing the struct itself.  Recall\n * that png_free() checks for NULL pointers for us.\n */\nvoid /* PRIVATE */\npng_info_destroy(png_structp png_ptr, png_infop info_ptr)\n{\n   png_debug(1, \"in png_info_destroy\");\n\n   png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);\n\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n   if (png_ptr->num_chunk_list)\n   {\n      png_free(png_ptr, png_ptr->chunk_list);\n      png_ptr->chunk_list = NULL;\n      png_ptr->num_chunk_list = 0;\n   }\n#endif\n\n   png_info_init_3(&info_ptr, png_sizeof(png_info));\n}\n#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */\n\n/* This function returns a pointer to the io_ptr associated with the user\n * functions.  The application should free any memory associated with this\n * pointer before png_write_destroy() or png_read_destroy() are called.\n */\npng_voidp PNGAPI\npng_get_io_ptr(png_structp png_ptr)\n{\n   if (png_ptr == NULL)\n      return (NULL);\n   return (png_ptr->io_ptr);\n}\n\n#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)\n#ifdef PNG_STDIO_SUPPORTED\n/* Initialize the default input/output functions for the PNG file.  If you\n * use your own read or write routines, you can call either png_set_read_fn()\n * or png_set_write_fn() instead of png_init_io().  If you have defined\n * PNG_NO_STDIO, you must use a function of your own because \"FILE *\" isn't\n * necessarily available.\n */\nvoid PNGAPI\npng_init_io(png_structp png_ptr, png_FILE_p fp)\n{\n   png_debug(1, \"in png_init_io\");\n\n   if (png_ptr == NULL)\n      return;\n\n   png_ptr->io_ptr = (png_voidp)fp;\n}\n#endif\n\n#ifdef PNG_TIME_RFC1123_SUPPORTED\n/* Convert the supplied time into an RFC 1123 string suitable for use in\n * a \"Creation Time\" or other text-based time string.\n */\npng_charp PNGAPI\npng_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)\n{\n   static PNG_CONST char short_months[12][4] =\n        {\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n         \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"};\n\n   if (png_ptr == NULL)\n      return (NULL);\n   if (png_ptr->time_buffer == NULL)\n   {\n      png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29*\n         png_sizeof(char)));\n   }\n\n#ifdef _WIN32_WCE\n   {\n      wchar_t time_buf[29];\n      wsprintf(time_buf, TEXT(\"%d %S %d %02d:%02d:%02d +0000\"),\n          ptime->day % 32, short_months[(ptime->month - 1) % 12],\n        ptime->year, ptime->hour % 24, ptime->minute % 60,\n          ptime->second % 61);\n      WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer,\n          29, NULL, NULL);\n   }\n#else\n#ifdef USE_FAR_KEYWORD\n   {\n      char near_time_buf[29];\n      png_snprintf6(near_time_buf, 29, \"%d %s %d %02d:%02d:%02d +0000\",\n          ptime->day % 32, short_months[(ptime->month - 1) % 12],\n          ptime->year, ptime->hour % 24, ptime->minute % 60,\n          ptime->second % 61);\n      png_memcpy(png_ptr->time_buffer, near_time_buf,\n          29*png_sizeof(char));\n   }\n#else\n   png_snprintf6(png_ptr->time_buffer, 29, \"%d %s %d %02d:%02d:%02d +0000\",\n       ptime->day % 32, short_months[(ptime->month - 1) % 12],\n       ptime->year, ptime->hour % 24, ptime->minute % 60,\n       ptime->second % 61);\n#endif\n#endif /* _WIN32_WCE */\n   return ((png_charp)png_ptr->time_buffer);\n}\n#endif /* PNG_TIME_RFC1123_SUPPORTED */\n\n#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */\n\npng_charp PNGAPI\npng_get_copyright(png_structp png_ptr)\n{\n   png_ptr = png_ptr;  /* Silence compiler warning about unused png_ptr */\n#ifdef PNG_STRING_COPYRIGHT\n      return PNG_STRING_COPYRIGHT\n#else\n#ifdef __STDC__\n   return ((png_charp) PNG_STRING_NEWLINE \\\n     \"libpng version 1.2.44 - June 26, 2010\" PNG_STRING_NEWLINE \\\n     \"Copyright (c) 1998-2010 Glenn Randers-Pehrson\" PNG_STRING_NEWLINE \\\n     \"Copyright (c) 1996-1997 Andreas Dilger\" PNG_STRING_NEWLINE \\\n     \"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\" \\\n     PNG_STRING_NEWLINE);\n#else\n      return ((png_charp) \"libpng version 1.2.44 - June 26, 2010\\\n      Copyright (c) 1998-2010 Glenn Randers-Pehrson\\\n      Copyright (c) 1996-1997 Andreas Dilger\\\n      Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\");\n#endif\n#endif\n}\n\n/* The following return the library version as a short string in the\n * format 1.0.0 through 99.99.99zz.  To get the version of *.h files\n * used with your application, print out PNG_LIBPNG_VER_STRING, which\n * is defined in png.h.\n * Note: now there is no difference between png_get_libpng_ver() and\n * png_get_header_ver().  Due to the version_nn_nn_nn typedef guard,\n * it is guaranteed that png.c uses the correct version of png.h.\n */\npng_charp PNGAPI\npng_get_libpng_ver(png_structp png_ptr)\n{\n   /* Version of *.c files used when building libpng */\n   png_ptr = png_ptr;  /* Silence compiler warning about unused png_ptr */\n   return ((png_charp) PNG_LIBPNG_VER_STRING);\n}\n\npng_charp PNGAPI\npng_get_header_ver(png_structp png_ptr)\n{\n   /* Version of *.h files used when building libpng */\n   png_ptr = png_ptr;  /* Silence compiler warning about unused png_ptr */\n   return ((png_charp) PNG_LIBPNG_VER_STRING);\n}\n\npng_charp PNGAPI\npng_get_header_version(png_structp png_ptr)\n{\n   /* Returns longer string containing both version and date */\n   png_ptr = png_ptr;  /* Silence compiler warning about unused png_ptr */\n#ifdef __STDC__\n   return ((png_charp) PNG_HEADER_VERSION_STRING\n#ifndef PNG_READ_SUPPORTED\n   \"     (NO READ SUPPORT)\"\n#endif\n   PNG_STRING_NEWLINE);\n#else\n   return ((png_charp) PNG_HEADER_VERSION_STRING);\n#endif\n}\n\n#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\nint PNGAPI\npng_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)\n{\n   /* Check chunk_name and return \"keep\" value if it's on the list, else 0 */\n   int i;\n   png_bytep p;\n   if (png_ptr == NULL || chunk_name == NULL || png_ptr->num_chunk_list<=0)\n      return 0;\n   p = png_ptr->chunk_list + png_ptr->num_chunk_list*5 - 5;\n   for (i = png_ptr->num_chunk_list; i; i--, p -= 5)\n      if (!png_memcmp(chunk_name, p, 4))\n        return ((int)*(p + 4));\n   return 0;\n}\n#endif\n\n/* This function, added to libpng-1.0.6g, is untested. */\nint PNGAPI\npng_reset_zstream(png_structp png_ptr)\n{\n   if (png_ptr == NULL)\n      return Z_STREAM_ERROR;\n   return (inflateReset(&png_ptr->zstream));\n}\n#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */\n\n/* This function was added to libpng-1.0.7 */\npng_uint_32 PNGAPI\npng_access_version_number(void)\n{\n   /* Version of *.c files used when building libpng */\n   return((png_uint_32) PNG_LIBPNG_VER);\n}\n\n\n#if defined(PNG_READ_SUPPORTED) && defined(PNG_ASSEMBLER_CODE_SUPPORTED)\n#ifndef PNG_1_0_X\n/* This function was added to libpng 1.2.0 */\nint PNGAPI\npng_mmx_support(void)\n{\n   /* Obsolete, to be removed from libpng-1.4.0 */\n    return -1;\n}\n#endif /* PNG_1_0_X */\n#endif /* PNG_READ_SUPPORTED && PNG_ASSEMBLER_CODE_SUPPORTED */\n\n#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)\n#ifdef PNG_SIZE_T\n/* Added at libpng version 1.2.6 */\n   PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));\npng_size_t PNGAPI\npng_convert_size(size_t size)\n{\n   if (size > (png_size_t)-1)\n      PNG_ABORT();  /* We haven't got access to png_ptr, so no png_error() */\n   return ((png_size_t)size);\n}\n#endif /* PNG_SIZE_T */\n\n/* Added at libpng version 1.2.34 and 1.4.0 (moved from pngset.c) */\n#ifdef PNG_cHRM_SUPPORTED\n#ifdef PNG_CHECK_cHRM_SUPPORTED\n\n/*\n *    Multiply two 32-bit numbers, V1 and V2, using 32-bit\n *    arithmetic, to produce a 64 bit result in the HI/LO words.\n *\n *                  A B\n *                x C D\n *               ------\n *              AD || BD\n *        AC || CB || 0\n *\n *    where A and B are the high and low 16-bit words of V1,\n *    C and D are the 16-bit words of V2, AD is the product of\n *    A and D, and X || Y is (X << 16) + Y.\n*/\n\nvoid /* PRIVATE */\npng_64bit_product (long v1, long v2, unsigned long *hi_product,\n   unsigned long *lo_product)\n{\n   int a, b, c, d;\n   long lo, hi, x, y;\n\n   a = (v1 >> 16) & 0xffff;\n   b = v1 & 0xffff;\n   c = (v2 >> 16) & 0xffff;\n   d = v2 & 0xffff;\n\n   lo = b * d;                   /* BD */\n   x = a * d + c * b;            /* AD + CB */\n   y = ((lo >> 16) & 0xffff) + x;\n\n   lo = (lo & 0xffff) | ((y & 0xffff) << 16);\n   hi = (y >> 16) & 0xffff;\n\n   hi += a * c;                  /* AC */\n\n   *hi_product = (unsigned long)hi;\n   *lo_product = (unsigned long)lo;\n}\n\nint /* PRIVATE */\npng_check_cHRM_fixed(png_structp png_ptr,\n   png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x,\n   png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y,\n   png_fixed_point blue_x, png_fixed_point blue_y)\n{\n   int ret = 1;\n   unsigned long xy_hi,xy_lo,yx_hi,yx_lo;\n\n   png_debug(1, \"in function png_check_cHRM_fixed\");\n\n   if (png_ptr == NULL)\n      return 0;\n\n   if (white_x < 0 || white_y <= 0 ||\n         red_x < 0 ||   red_y <  0 ||\n       green_x < 0 || green_y <  0 ||\n        blue_x < 0 ||  blue_y <  0)\n   {\n      png_warning(png_ptr,\n        \"Ignoring attempt to set negative chromaticity value\");\n      ret = 0;\n   }\n   if (white_x > (png_fixed_point) PNG_UINT_31_MAX ||\n       white_y > (png_fixed_point) PNG_UINT_31_MAX ||\n         red_x > (png_fixed_point) PNG_UINT_31_MAX ||\n         red_y > (png_fixed_point) PNG_UINT_31_MAX ||\n       green_x > (png_fixed_point) PNG_UINT_31_MAX ||\n       green_y > (png_fixed_point) PNG_UINT_31_MAX ||\n        blue_x > (png_fixed_point) PNG_UINT_31_MAX ||\n        blue_y > (png_fixed_point) PNG_UINT_31_MAX )\n   {\n      png_warning(png_ptr,\n        \"Ignoring attempt to set chromaticity value exceeding 21474.83\");\n      ret = 0;\n   }\n   if (white_x > 100000L - white_y)\n   {\n      png_warning(png_ptr, \"Invalid cHRM white point\");\n      ret = 0;\n   }\n   if (red_x > 100000L - red_y)\n   {\n      png_warning(png_ptr, \"Invalid cHRM red point\");\n      ret = 0;\n   }\n   if (green_x > 100000L - green_y)\n   {\n      png_warning(png_ptr, \"Invalid cHRM green point\");\n      ret = 0;\n   }\n   if (blue_x > 100000L - blue_y)\n   {\n      png_warning(png_ptr, \"Invalid cHRM blue point\");\n      ret = 0;\n   }\n\n   png_64bit_product(green_x - red_x, blue_y - red_y, &xy_hi, &xy_lo);\n   png_64bit_product(green_y - red_y, blue_x - red_x, &yx_hi, &yx_lo);\n\n   if (xy_hi == yx_hi && xy_lo == yx_lo)\n   {\n      png_warning(png_ptr,\n         \"Ignoring attempt to set cHRM RGB triangle with zero area\");\n      ret = 0;\n   }\n\n   return ret;\n}\n#endif /* PNG_CHECK_cHRM_SUPPORTED */\n#endif /* PNG_cHRM_SUPPORTED */\n\nvoid /* PRIVATE */\npng_check_IHDR(png_structp png_ptr,\n   png_uint_32 width, png_uint_32 height, int bit_depth,\n   int color_type, int interlace_type, int compression_type,\n   int filter_type)\n{\n   int error = 0;\n\n   /* Check for width and height valid values */\n   if (width == 0)\n   {\n      png_warning(png_ptr, \"Image width is zero in IHDR\");\n      error = 1;\n   }\n\n   if (height == 0)\n   {\n      png_warning(png_ptr, \"Image height is zero in IHDR\");\n      error = 1;\n   }\n\n#ifdef PNG_SET_USER_LIMITS_SUPPORTED\n   if (width > png_ptr->user_width_max || width > PNG_USER_WIDTH_MAX)\n#else\n   if (width > PNG_USER_WIDTH_MAX)\n#endif\n   {\n      png_warning(png_ptr, \"Image width exceeds user limit in IHDR\");\n      error = 1;\n   }\n\n#ifdef PNG_SET_USER_LIMITS_SUPPORTED\n   if (height > png_ptr->user_height_max || height > PNG_USER_HEIGHT_MAX)\n#else\n   if (height > PNG_USER_HEIGHT_MAX)\n#endif\n   {\n      png_warning(png_ptr, \"Image height exceeds user limit in IHDR\");\n      error = 1;\n   }\n\n   if (width > PNG_UINT_31_MAX)\n   {\n      png_warning(png_ptr, \"Invalid image width in IHDR\");\n      error = 1;\n   }\n\n   if ( height > PNG_UINT_31_MAX)\n   {\n      png_warning(png_ptr, \"Invalid image height in IHDR\");\n      error = 1;\n   }\n\n   if ( width > (PNG_UINT_32_MAX\n                 >> 3)      /* 8-byte RGBA pixels */\n                 - 64       /* bigrowbuf hack */\n                 - 1        /* filter byte */\n                 - 7*8      /* rounding of width to multiple of 8 pixels */\n                 - 8)       /* extra max_pixel_depth pad */\n      png_warning(png_ptr, \"Width is too large for libpng to process pixels\");\n\n   /* Check other values */\n   if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&\n       bit_depth != 8 && bit_depth != 16)\n   {\n      png_warning(png_ptr, \"Invalid bit depth in IHDR\");\n      error = 1;\n   }\n\n   if (color_type < 0 || color_type == 1 ||\n       color_type == 5 || color_type > 6)\n   {\n      png_warning(png_ptr, \"Invalid color type in IHDR\");\n      error = 1;\n   }\n\n   if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) ||\n       ((color_type == PNG_COLOR_TYPE_RGB ||\n         color_type == PNG_COLOR_TYPE_GRAY_ALPHA ||\n         color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8))\n   {\n      png_warning(png_ptr, \"Invalid color type/bit depth combination in IHDR\");\n      error = 1;\n   }\n\n   if (interlace_type >= PNG_INTERLACE_LAST)\n   {\n      png_warning(png_ptr, \"Unknown interlace method in IHDR\");\n      error = 1;\n   }\n\n   if (compression_type != PNG_COMPRESSION_TYPE_BASE)\n   {\n      png_warning(png_ptr, \"Unknown compression method in IHDR\");\n      error = 1;\n   }\n\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n   /* Accept filter_method 64 (intrapixel differencing) only if\n    * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and\n    * 2. Libpng did not read a PNG signature (this filter_method is only\n    *    used in PNG datastreams that are embedded in MNG datastreams) and\n    * 3. The application called png_permit_mng_features with a mask that\n    *    included PNG_FLAG_MNG_FILTER_64 and\n    * 4. The filter_method is 64 and\n    * 5. The color_type is RGB or RGBA\n    */\n   if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) &&\n       png_ptr->mng_features_permitted)\n      png_warning(png_ptr, \"MNG features are not allowed in a PNG datastream\");\n\n   if (filter_type != PNG_FILTER_TYPE_BASE)\n   {\n      if (!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&\n         (filter_type == PNG_INTRAPIXEL_DIFFERENCING) &&\n         ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) &&\n         (color_type == PNG_COLOR_TYPE_RGB ||\n         color_type == PNG_COLOR_TYPE_RGB_ALPHA)))\n      {\n         png_warning(png_ptr, \"Unknown filter method in IHDR\");\n         error = 1;\n      }\n\n      if (png_ptr->mode & PNG_HAVE_PNG_SIGNATURE)\n      {\n         png_warning(png_ptr, \"Invalid filter method in IHDR\");\n         error = 1;\n      }\n   }\n\n#else\n   if (filter_type != PNG_FILTER_TYPE_BASE)\n   {\n      png_warning(png_ptr, \"Unknown filter method in IHDR\");\n      error = 1;\n   }\n#endif\n\n   if (error == 1)\n      png_error(png_ptr, \"Invalid IHDR data\");\n}\n#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/png.h",
    "content": "/* png.h - header file for PNG reference library\n *\n * libpng version 1.2.44 - June 26, 2010\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license (See LICENSE, below)\n *\n * Authors and maintainers:\n *  libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat\n *  libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger\n *  libpng versions 0.97, January 1998, through 1.2.44 - June 26, 2010: Glenn\n *  See also \"Contributing Authors\", below.\n *\n * Note about libpng version numbers:\n *\n *    Due to various miscommunications, unforeseen code incompatibilities\n *    and occasional factors outside the authors' control, version numbering\n *    on the library has not always been consistent and straightforward.\n *    The following table summarizes matters since version 0.89c, which was\n *    the first widely used release:\n *\n *    source                 png.h  png.h  shared-lib\n *    version                string   int  version\n *    -------                ------ -----  ----------\n *    0.89c \"1.0 beta 3\"     0.89      89  1.0.89\n *    0.90  \"1.0 beta 4\"     0.90      90  0.90  [should have been 2.0.90]\n *    0.95  \"1.0 beta 5\"     0.95      95  0.95  [should have been 2.0.95]\n *    0.96  \"1.0 beta 6\"     0.96      96  0.96  [should have been 2.0.96]\n *    0.97b \"1.00.97 beta 7\" 1.00.97   97  1.0.1 [should have been 2.0.97]\n *    0.97c                  0.97      97  2.0.97\n *    0.98                   0.98      98  2.0.98\n *    0.99                   0.99      98  2.0.99\n *    0.99a-m                0.99      99  2.0.99\n *    1.00                   1.00     100  2.1.0 [100 should be 10000]\n *    1.0.0      (from here on, the   100  2.1.0 [100 should be 10000]\n *    1.0.1       png.h string is   10001  2.1.0\n *    1.0.1a-e    identical to the  10002  from here on, the shared library\n *    1.0.2       source version)   10002  is 2.V where V is the source code\n *    1.0.2a-b                      10003  version, except as noted.\n *    1.0.3                         10003\n *    1.0.3a-d                      10004\n *    1.0.4                         10004\n *    1.0.4a-f                      10005\n *    1.0.5 (+ 2 patches)           10005\n *    1.0.5a-d                      10006\n *    1.0.5e-r                      10100 (not source compatible)\n *    1.0.5s-v                      10006 (not binary compatible)\n *    1.0.6 (+ 3 patches)           10006 (still binary incompatible)\n *    1.0.6d-f                      10007 (still binary incompatible)\n *    1.0.6g                        10007\n *    1.0.6h                        10007  10.6h (testing xy.z so-numbering)\n *    1.0.6i                        10007  10.6i\n *    1.0.6j                        10007  2.1.0.6j (incompatible with 1.0.0)\n *    1.0.7beta11-14        DLLNUM  10007  2.1.0.7beta11-14 (binary compatible)\n *    1.0.7beta15-18           1    10007  2.1.0.7beta15-18 (binary compatible)\n *    1.0.7rc1-2               1    10007  2.1.0.7rc1-2 (binary compatible)\n *    1.0.7                    1    10007  (still compatible)\n *    1.0.8beta1-4             1    10008  2.1.0.8beta1-4\n *    1.0.8rc1                 1    10008  2.1.0.8rc1\n *    1.0.8                    1    10008  2.1.0.8\n *    1.0.9beta1-6             1    10009  2.1.0.9beta1-6\n *    1.0.9rc1                 1    10009  2.1.0.9rc1\n *    1.0.9beta7-10            1    10009  2.1.0.9beta7-10\n *    1.0.9rc2                 1    10009  2.1.0.9rc2\n *    1.0.9                    1    10009  2.1.0.9\n *    1.0.10beta1              1    10010  2.1.0.10beta1\n *    1.0.10rc1                1    10010  2.1.0.10rc1\n *    1.0.10                   1    10010  2.1.0.10\n *    1.0.11beta1-3            1    10011  2.1.0.11beta1-3\n *    1.0.11rc1                1    10011  2.1.0.11rc1\n *    1.0.11                   1    10011  2.1.0.11\n *    1.0.12beta1-2            2    10012  2.1.0.12beta1-2\n *    1.0.12rc1                2    10012  2.1.0.12rc1\n *    1.0.12                   2    10012  2.1.0.12\n *    1.1.0a-f                 -    10100  2.1.1.0a-f (branch abandoned)\n *    1.2.0beta1-2             2    10200  2.1.2.0beta1-2\n *    1.2.0beta3-5             3    10200  3.1.2.0beta3-5\n *    1.2.0rc1                 3    10200  3.1.2.0rc1\n *    1.2.0                    3    10200  3.1.2.0\n *    1.2.1beta1-4             3    10201  3.1.2.1beta1-4\n *    1.2.1rc1-2               3    10201  3.1.2.1rc1-2\n *    1.2.1                    3    10201  3.1.2.1\n *    1.2.2beta1-6            12    10202  12.so.0.1.2.2beta1-6\n *    1.0.13beta1             10    10013  10.so.0.1.0.13beta1\n *    1.0.13rc1               10    10013  10.so.0.1.0.13rc1\n *    1.2.2rc1                12    10202  12.so.0.1.2.2rc1\n *    1.0.13                  10    10013  10.so.0.1.0.13\n *    1.2.2                   12    10202  12.so.0.1.2.2\n *    1.2.3rc1-6              12    10203  12.so.0.1.2.3rc1-6\n *    1.2.3                   12    10203  12.so.0.1.2.3\n *    1.2.4beta1-3            13    10204  12.so.0.1.2.4beta1-3\n *    1.0.14rc1               13    10014  10.so.0.1.0.14rc1\n *    1.2.4rc1                13    10204  12.so.0.1.2.4rc1\n *    1.0.14                  10    10014  10.so.0.1.0.14\n *    1.2.4                   13    10204  12.so.0.1.2.4\n *    1.2.5beta1-2            13    10205  12.so.0.1.2.5beta1-2\n *    1.0.15rc1-3             10    10015  10.so.0.1.0.15rc1-3\n *    1.2.5rc1-3              13    10205  12.so.0.1.2.5rc1-3\n *    1.0.15                  10    10015  10.so.0.1.0.15\n *    1.2.5                   13    10205  12.so.0.1.2.5\n *    1.2.6beta1-4            13    10206  12.so.0.1.2.6beta1-4\n *    1.0.16                  10    10016  10.so.0.1.0.16\n *    1.2.6                   13    10206  12.so.0.1.2.6\n *    1.2.7beta1-2            13    10207  12.so.0.1.2.7beta1-2\n *    1.0.17rc1               10    10017  10.so.0.1.0.17rc1\n *    1.2.7rc1                13    10207  12.so.0.1.2.7rc1\n *    1.0.17                  10    10017  10.so.0.1.0.17\n *    1.2.7                   13    10207  12.so.0.1.2.7\n *    1.2.8beta1-5            13    10208  12.so.0.1.2.8beta1-5\n *    1.0.18rc1-5             10    10018  10.so.0.1.0.18rc1-5\n *    1.2.8rc1-5              13    10208  12.so.0.1.2.8rc1-5\n *    1.0.18                  10    10018  10.so.0.1.0.18\n *    1.2.8                   13    10208  12.so.0.1.2.8\n *    1.2.9beta1-3            13    10209  12.so.0.1.2.9beta1-3\n *    1.2.9beta4-11           13    10209  12.so.0.9[.0]\n *    1.2.9rc1                13    10209  12.so.0.9[.0]\n *    1.2.9                   13    10209  12.so.0.9[.0]\n *    1.2.10beta1-8           13    10210  12.so.0.10[.0]\n *    1.2.10rc1-3             13    10210  12.so.0.10[.0]\n *    1.2.10                  13    10210  12.so.0.10[.0]\n *    1.2.11beta1-4           13    10211  12.so.0.11[.0]\n *    1.0.19rc1-5             10    10019  10.so.0.19[.0]\n *    1.2.11rc1-5             13    10211  12.so.0.11[.0]\n *    1.0.19                  10    10019  10.so.0.19[.0]\n *    1.2.11                  13    10211  12.so.0.11[.0]\n *    1.0.20                  10    10020  10.so.0.20[.0]\n *    1.2.12                  13    10212  12.so.0.12[.0]\n *    1.2.13beta1             13    10213  12.so.0.13[.0]\n *    1.0.21                  10    10021  10.so.0.21[.0]\n *    1.2.13                  13    10213  12.so.0.13[.0]\n *    1.2.14beta1-2           13    10214  12.so.0.14[.0]\n *    1.0.22rc1               10    10022  10.so.0.22[.0]\n *    1.2.14rc1               13    10214  12.so.0.14[.0]\n *    1.0.22                  10    10022  10.so.0.22[.0]\n *    1.2.14                  13    10214  12.so.0.14[.0]\n *    1.2.15beta1-6           13    10215  12.so.0.15[.0]\n *    1.0.23rc1-5             10    10023  10.so.0.23[.0]\n *    1.2.15rc1-5             13    10215  12.so.0.15[.0]\n *    1.0.23                  10    10023  10.so.0.23[.0]\n *    1.2.15                  13    10215  12.so.0.15[.0]\n *    1.2.16beta1-2           13    10216  12.so.0.16[.0]\n *    1.2.16rc1               13    10216  12.so.0.16[.0]\n *    1.0.24                  10    10024  10.so.0.24[.0]\n *    1.2.16                  13    10216  12.so.0.16[.0]\n *    1.2.17beta1-2           13    10217  12.so.0.17[.0]\n *    1.0.25rc1               10    10025  10.so.0.25[.0]\n *    1.2.17rc1-3             13    10217  12.so.0.17[.0]\n *    1.0.25                  10    10025  10.so.0.25[.0]\n *    1.2.17                  13    10217  12.so.0.17[.0]\n *    1.0.26                  10    10026  10.so.0.26[.0]\n *    1.2.18                  13    10218  12.so.0.18[.0]\n *    1.2.19beta1-31          13    10219  12.so.0.19[.0]\n *    1.0.27rc1-6             10    10027  10.so.0.27[.0]\n *    1.2.19rc1-6             13    10219  12.so.0.19[.0]\n *    1.0.27                  10    10027  10.so.0.27[.0]\n *    1.2.19                  13    10219  12.so.0.19[.0]\n *    1.2.20beta01-04         13    10220  12.so.0.20[.0]\n *    1.0.28rc1-6             10    10028  10.so.0.28[.0]\n *    1.2.20rc1-6             13    10220  12.so.0.20[.0]\n *    1.0.28                  10    10028  10.so.0.28[.0]\n *    1.2.20                  13    10220  12.so.0.20[.0]\n *    1.2.21beta1-2           13    10221  12.so.0.21[.0]\n *    1.2.21rc1-3             13    10221  12.so.0.21[.0]\n *    1.0.29                  10    10029  10.so.0.29[.0]\n *    1.2.21                  13    10221  12.so.0.21[.0]\n *    1.2.22beta1-4           13    10222  12.so.0.22[.0]\n *    1.0.30rc1               10    10030  10.so.0.30[.0]\n *    1.2.22rc1               13    10222  12.so.0.22[.0]\n *    1.0.30                  10    10030  10.so.0.30[.0]\n *    1.2.22                  13    10222  12.so.0.22[.0]\n *    1.2.23beta01-05         13    10223  12.so.0.23[.0]\n *    1.2.23rc01              13    10223  12.so.0.23[.0]\n *    1.2.23                  13    10223  12.so.0.23[.0]\n *    1.2.24beta01-02         13    10224  12.so.0.24[.0]\n *    1.2.24rc01              13    10224  12.so.0.24[.0]\n *    1.2.24                  13    10224  12.so.0.24[.0]\n *    1.2.25beta01-06         13    10225  12.so.0.25[.0]\n *    1.2.25rc01-02           13    10225  12.so.0.25[.0]\n *    1.0.31                  10    10031  10.so.0.31[.0]\n *    1.2.25                  13    10225  12.so.0.25[.0]\n *    1.2.26beta01-06         13    10226  12.so.0.26[.0]\n *    1.2.26rc01              13    10226  12.so.0.26[.0]\n *    1.2.26                  13    10226  12.so.0.26[.0]\n *    1.0.32                  10    10032  10.so.0.32[.0]\n *    1.2.27beta01-06         13    10227  12.so.0.27[.0]\n *    1.2.27rc01              13    10227  12.so.0.27[.0]\n *    1.0.33                  10    10033  10.so.0.33[.0]\n *    1.2.27                  13    10227  12.so.0.27[.0]\n *    1.0.34                  10    10034  10.so.0.34[.0]\n *    1.2.28                  13    10228  12.so.0.28[.0]\n *    1.2.29beta01-03         13    10229  12.so.0.29[.0]\n *    1.2.29rc01              13    10229  12.so.0.29[.0]\n *    1.0.35                  10    10035  10.so.0.35[.0]\n *    1.2.29                  13    10229  12.so.0.29[.0]\n *    1.0.37                  10    10037  10.so.0.37[.0]\n *    1.2.30beta01-04         13    10230  12.so.0.30[.0]\n *    1.0.38rc01-08           10    10038  10.so.0.38[.0]\n *    1.2.30rc01-08           13    10230  12.so.0.30[.0]\n *    1.0.38                  10    10038  10.so.0.38[.0]\n *    1.2.30                  13    10230  12.so.0.30[.0]\n *    1.0.39rc01-03           10    10039  10.so.0.39[.0]\n *    1.2.31rc01-03           13    10231  12.so.0.31[.0]\n *    1.0.39                  10    10039  10.so.0.39[.0]\n *    1.2.31                  13    10231  12.so.0.31[.0]\n *    1.2.32beta01-02         13    10232  12.so.0.32[.0]\n *    1.0.40rc01              10    10040  10.so.0.40[.0]\n *    1.2.32rc01              13    10232  12.so.0.32[.0]\n *    1.0.40                  10    10040  10.so.0.40[.0]\n *    1.2.32                  13    10232  12.so.0.32[.0]\n *    1.2.33beta01-02         13    10233  12.so.0.33[.0]\n *    1.2.33rc01-02           13    10233  12.so.0.33[.0]\n *    1.0.41rc01              10    10041  10.so.0.41[.0]\n *    1.2.33                  13    10233  12.so.0.33[.0]\n *    1.0.41                  10    10041  10.so.0.41[.0]\n *    1.2.34beta01-07         13    10234  12.so.0.34[.0]\n *    1.0.42rc01              10    10042  10.so.0.42[.0]\n *    1.2.34rc01              13    10234  12.so.0.34[.0]\n *    1.0.42                  10    10042  10.so.0.42[.0]\n *    1.2.34                  13    10234  12.so.0.34[.0]\n *    1.2.35beta01-03         13    10235  12.so.0.35[.0]\n *    1.0.43rc01-02           10    10043  10.so.0.43[.0]\n *    1.2.35rc01-02           13    10235  12.so.0.35[.0]\n *    1.0.43                  10    10043  10.so.0.43[.0]\n *    1.2.35                  13    10235  12.so.0.35[.0]\n *    1.2.36beta01-05         13    10236  12.so.0.36[.0]\n *    1.2.36rc01              13    10236  12.so.0.36[.0]\n *    1.0.44                  10    10044  10.so.0.44[.0]\n *    1.2.36                  13    10236  12.so.0.36[.0]\n *    1.2.37beta01-03         13    10237  12.so.0.37[.0]\n *    1.2.37rc01              13    10237  12.so.0.37[.0]\n *    1.2.37                  13    10237  12.so.0.37[.0]\n *    1.2.45                  10    10045  12.so.0.45[.0]\n *    1.0.46                  10    10046  10.so.0.46[.0]\n *    1.2.38beta01            13    10238  12.so.0.38[.0]\n *    1.2.38rc01-03           13    10238  12.so.0.38[.0]\n *    1.0.47                  10    10047  10.so.0.47[.0]\n *    1.2.38                  13    10238  12.so.0.38[.0]\n *    1.2.39beta01-05         13    10239  12.so.0.39[.0]\n *    1.2.39rc01              13    10239  12.so.0.39[.0]\n *    1.0.48                  10    10048  10.so.0.48[.0]\n *    1.2.39                  13    10239  12.so.0.39[.0]\n *    1.2.40beta01            13    10240  12.so.0.40[.0]\n *    1.2.40rc01              13    10240  12.so.0.40[.0]\n *    1.0.49                  10    10049  10.so.0.49[.0]\n *    1.2.40                  13    10240  12.so.0.40[.0]\n *    1.2.41beta01-18         13    10241  12.so.0.41[.0]\n *    1.0.51rc01              10    10051  10.so.0.51[.0]\n *    1.2.41rc01-03           13    10241  12.so.0.41[.0]\n *    1.0.51                  10    10051  10.so.0.51[.0]\n *    1.2.41                  13    10241  12.so.0.41[.0]\n *    1.2.42beta01-02         13    10242  12.so.0.42[.0]\n *    1.2.42rc01-05           13    10242  12.so.0.42[.0]\n *    1.0.52                  10    10052  10.so.0.52[.0]\n *    1.2.42                  13    10242  12.so.0.42[.0]\n *    1.2.43beta01-05         13    10243  12.so.0.43[.0]\n *    1.0.53rc01-02           10    10053  10.so.0.53[.0]\n *    1.2.43rc01-02           13    10243  12.so.0.43[.0]\n *    1.0.53                  10    10053  10.so.0.53[.0]\n *    1.2.43                  13    10243  12.so.0.43[.0]\n *    1.2.44beta01-03         13    10244  12.so.0.44[.0]\n *    1.2.44rc01-03           13    10244  12.so.0.44[.0]\n *    1.2.44                  13    10244  12.so.0.44[.0]\n *\n *    Henceforth the source version will match the shared-library major\n *    and minor numbers; the shared-library major version number will be\n *    used for changes in backward compatibility, as it is intended.  The\n *    PNG_LIBPNG_VER macro, which is not used within libpng but is available\n *    for applications, is an unsigned integer of the form xyyzz corresponding\n *    to the source version x.y.z (leading zeros in y and z).  Beta versions\n *    were given the previous public release number plus a letter, until\n *    version 1.0.6j; from then on they were given the upcoming public\n *    release number plus \"betaNN\" or \"rcNN\".\n *\n *    Binary incompatibility exists only when applications make direct access\n *    to the info_ptr or png_ptr members through png.h, and the compiled\n *    application is loaded with a different version of the library.\n *\n *    DLLNUM will change each time there are forward or backward changes\n *    in binary compatibility (e.g., when a new feature is added).\n *\n * See libpng.txt or libpng.3 for more information.  The PNG specification\n * is available as a W3C Recommendation and as an ISO Specification,\n * <http://www.w3.org/TR/2003/REC-PNG-20031110/\n */\n\n/*\n * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:\n *\n * If you modify libpng you may insert additional notices immediately following\n * this sentence.\n *\n * This code is released under the libpng license.\n *\n * libpng versions 1.2.6, August 15, 2004, through 1.2.44, June 26, 2010, are\n * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are\n * distributed according to the same disclaimer and license as libpng-1.2.5\n * with the following individual added to the list of Contributing Authors:\n *\n *    Cosmin Truta\n *\n * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are\n * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are\n * distributed according to the same disclaimer and license as libpng-1.0.6\n * with the following individuals added to the list of Contributing Authors:\n *\n *    Simon-Pierre Cadieux\n *    Eric S. Raymond\n *    Gilles Vollant\n *\n * and with the following additions to the disclaimer:\n *\n *    There is no warranty against interference with your enjoyment of the\n *    library or against infringement.  There is no warranty that our\n *    efforts or the library will fulfill any of your particular purposes\n *    or needs.  This library is provided with all faults, and the entire\n *    risk of satisfactory quality, performance, accuracy, and effort is with\n *    the user.\n *\n * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are\n * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are\n * distributed according to the same disclaimer and license as libpng-0.96,\n * with the following individuals added to the list of Contributing Authors:\n *\n *    Tom Lane\n *    Glenn Randers-Pehrson\n *    Willem van Schaik\n *\n * libpng versions 0.89, June 1996, through 0.96, May 1997, are\n * Copyright (c) 1996, 1997 Andreas Dilger\n * Distributed according to the same disclaimer and license as libpng-0.88,\n * with the following individuals added to the list of Contributing Authors:\n *\n *    John Bowler\n *    Kevin Bracey\n *    Sam Bushell\n *    Magnus Holmgren\n *    Greg Roelofs\n *    Tom Tanner\n *\n * libpng versions 0.5, May 1995, through 0.88, January 1996, are\n * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n *\n * For the purposes of this copyright and license, \"Contributing Authors\"\n * is defined as the following set of individuals:\n *\n *    Andreas Dilger\n *    Dave Martindale\n *    Guy Eric Schalnat\n *    Paul Schmidt\n *    Tim Wegner\n *\n * The PNG Reference Library is supplied \"AS IS\".  The Contributing Authors\n * and Group 42, Inc. disclaim all warranties, expressed or implied,\n * including, without limitation, the warranties of merchantability and of\n * fitness for any purpose.  The Contributing Authors and Group 42, Inc.\n * assume no liability for direct, indirect, incidental, special, exemplary,\n * or consequential damages, which may result from the use of the PNG\n * Reference Library, even if advised of the possibility of such damage.\n *\n * Permission is hereby granted to use, copy, modify, and distribute this\n * source code, or portions hereof, for any purpose, without fee, subject\n * to the following restrictions:\n *\n * 1. The origin of this source code must not be misrepresented.\n *\n * 2. Altered versions must be plainly marked as such and\n * must not be misrepresented as being the original source.\n *\n * 3. This Copyright notice may not be removed or altered from\n *    any source or altered source distribution.\n *\n * The Contributing Authors and Group 42, Inc. specifically permit, without\n * fee, and encourage the use of this source code as a component to\n * supporting the PNG file format in commercial products.  If you use this\n * source code in a product, acknowledgment is not required but would be\n * appreciated.\n */\n\n/*\n * A \"png_get_copyright\" function is available, for convenient use in \"about\"\n * boxes and the like:\n *\n * printf(\"%s\",png_get_copyright(NULL));\n *\n * Also, the PNG logo (in PNG format, of course) is supplied in the\n * files \"pngbar.png\" and \"pngbar.jpg (88x31) and \"pngnow.png\" (98x31).\n */\n\n/*\n * Libpng is OSI Certified Open Source Software.  OSI Certified is a\n * certification mark of the Open Source Initiative.\n */\n\n/*\n * The contributing authors would like to thank all those who helped\n * with testing, bug fixes, and patience.  This wouldn't have been\n * possible without all of you.\n *\n * Thanks to Frank J. T. Wojcik for helping with the documentation.\n */\n\n/*\n * Y2K compliance in libpng:\n * =========================\n *\n *    June 26, 2010\n *\n *    Since the PNG Development group is an ad-hoc body, we can't make\n *    an official declaration.\n *\n *    This is your unofficial assurance that libpng from version 0.71 and\n *    upward through 1.2.44 are Y2K compliant.  It is my belief that earlier\n *    versions were also Y2K compliant.\n *\n *    Libpng only has three year fields.  One is a 2-byte unsigned integer\n *    that will hold years up to 65535.  The other two hold the date in text\n *    format, and will hold years up to 9999.\n *\n *    The integer is\n *        \"png_uint_16 year\" in png_time_struct.\n *\n *    The strings are\n *        \"png_charp time_buffer\" in png_struct and\n *        \"near_time_buffer\", which is a local character string in png.c.\n *\n *    There are seven time-related functions:\n *        png.c: png_convert_to_rfc_1123() in png.c\n *          (formerly png_convert_to_rfc_1152() in error)\n *        png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c\n *        png_convert_from_time_t() in pngwrite.c\n *        png_get_tIME() in pngget.c\n *        png_handle_tIME() in pngrutil.c, called in pngread.c\n *        png_set_tIME() in pngset.c\n *        png_write_tIME() in pngwutil.c, called in pngwrite.c\n *\n *    All handle dates properly in a Y2K environment.  The\n *    png_convert_from_time_t() function calls gmtime() to convert from system\n *    clock time, which returns (year - 1900), which we properly convert to\n *    the full 4-digit year.  There is a possibility that applications using\n *    libpng are not passing 4-digit years into the png_convert_to_rfc_1123()\n *    function, or that they are incorrectly passing only a 2-digit year\n *    instead of \"year - 1900\" into the png_convert_from_struct_tm() function,\n *    but this is not under our control.  The libpng documentation has always\n *    stated that it works with 4-digit years, and the APIs have been\n *    documented as such.\n *\n *    The tIME chunk itself is also Y2K compliant.  It uses a 2-byte unsigned\n *    integer to hold the year, and can hold years as large as 65535.\n *\n *    zlib, upon which libpng depends, is also Y2K compliant.  It contains\n *    no date-related code.\n *\n *       Glenn Randers-Pehrson\n *       libpng maintainer\n *       PNG Development Group\n */\n\n#ifndef PNG_H\n#define PNG_H\n\n/* This is not the place to learn how to use libpng.  The file libpng.txt\n * describes how to use libpng, and the file example.c summarizes it\n * with some code on which to build.  This file is useful for looking\n * at the actual function definitions and structure components.\n */\n\n/* Version information for png.h - this should match the version in png.c */\n#define PNG_LIBPNG_VER_STRING \"1.2.44\"\n#define PNG_HEADER_VERSION_STRING \\\n   \" libpng version 1.2.44 - June 26, 2010\\n\"\n\n#define PNG_LIBPNG_VER_SONUM   0\n#define PNG_LIBPNG_VER_DLLNUM  13\n\n/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */\n#define PNG_LIBPNG_VER_MAJOR   1\n#define PNG_LIBPNG_VER_MINOR   2\n#define PNG_LIBPNG_VER_RELEASE 44\n/* This should match the numeric part of the final component of\n * PNG_LIBPNG_VER_STRING, omitting any leading zero:\n */\n\n#define PNG_LIBPNG_VER_BUILD  0\n\n/* Release Status */\n#define PNG_LIBPNG_BUILD_ALPHA    1\n#define PNG_LIBPNG_BUILD_BETA     2\n#define PNG_LIBPNG_BUILD_RC       3\n#define PNG_LIBPNG_BUILD_STABLE   4\n#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7\n\n/* Release-Specific Flags */\n#define PNG_LIBPNG_BUILD_PATCH    8 /* Can be OR'ed with\n                                       PNG_LIBPNG_BUILD_STABLE only */\n#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with\n                                       PNG_LIBPNG_BUILD_SPECIAL */\n#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with\n                                       PNG_LIBPNG_BUILD_PRIVATE */\n\n#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE\n\n/* Careful here.  At one time, Guy wanted to use 082, but that would be octal.\n * We must not include leading zeros.\n * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only\n * version 1.0.0 was mis-numbered 100 instead of 10000).  From\n * version 1.0.1 it's    xxyyzz, where x=major, y=minor, z=release\n */\n#define PNG_LIBPNG_VER 10244 /* 1.2.44 */\n\n#ifndef PNG_VERSION_INFO_ONLY\n/* Include the compression library's header */\n#include \"3rdPartyLibs/zlib/zlib.h\"\n#endif\n\n/* Include all user configurable info, including optional assembler routines */\n#include \"pngconf.h\"\n\n/*\n * Added at libpng-1.2.8 */\n/* Ref MSDN: Private as priority over Special\n * VS_FF_PRIVATEBUILD File *was not* built using standard release\n * procedures. If this value is given, the StringFileInfo block must\n * contain a PrivateBuild string.\n *\n * VS_FF_SPECIALBUILD File *was* built by the original company using\n * standard release procedures but is a variation of the standard\n * file of the same version number. If this value is given, the\n * StringFileInfo block must contain a SpecialBuild string.\n */\n\n#ifdef PNG_USER_PRIVATEBUILD\n#  define PNG_LIBPNG_BUILD_TYPE \\\n          (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)\n#else\n#  ifdef PNG_LIBPNG_SPECIALBUILD\n#    define PNG_LIBPNG_BUILD_TYPE \\\n            (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)\n#  else\n#    define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)\n#  endif\n#endif\n\n#ifndef PNG_VERSION_INFO_ONLY\n\n/* Inhibit C++ name-mangling for libpng functions but not for system calls. */\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/* This file is arranged in several sections.  The first section contains\n * structure and type definitions.  The second section contains the external\n * library functions, while the third has the internal library functions,\n * which applications aren't expected to use directly.\n */\n\n#ifndef PNG_NO_TYPECAST_NULL\n#define int_p_NULL                (int *)NULL\n#define png_bytep_NULL            (png_bytep)NULL\n#define png_bytepp_NULL           (png_bytepp)NULL\n#define png_doublep_NULL          (png_doublep)NULL\n#define png_error_ptr_NULL        (png_error_ptr)NULL\n#define png_flush_ptr_NULL        (png_flush_ptr)NULL\n#define png_free_ptr_NULL         (png_free_ptr)NULL\n#define png_infopp_NULL           (png_infopp)NULL\n#define png_malloc_ptr_NULL       (png_malloc_ptr)NULL\n#define png_read_status_ptr_NULL  (png_read_status_ptr)NULL\n#define png_rw_ptr_NULL           (png_rw_ptr)NULL\n#define png_structp_NULL          (png_structp)NULL\n#define png_uint_16p_NULL         (png_uint_16p)NULL\n#define png_voidp_NULL            (png_voidp)NULL\n#define png_write_status_ptr_NULL (png_write_status_ptr)NULL\n#else\n#define int_p_NULL                NULL\n#define png_bytep_NULL            NULL\n#define png_bytepp_NULL           NULL\n#define png_doublep_NULL          NULL\n#define png_error_ptr_NULL        NULL\n#define png_flush_ptr_NULL        NULL\n#define png_free_ptr_NULL         NULL\n#define png_infopp_NULL           NULL\n#define png_malloc_ptr_NULL       NULL\n#define png_read_status_ptr_NULL  NULL\n#define png_rw_ptr_NULL           NULL\n#define png_structp_NULL          NULL\n#define png_uint_16p_NULL         NULL\n#define png_voidp_NULL            NULL\n#define png_write_status_ptr_NULL NULL\n#endif\n\n/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */\n#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)\n/* Version information for C files, stored in png.c.  This had better match\n * the version above.\n */\n#ifdef PNG_USE_GLOBAL_ARRAYS\nPNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[18];\n  /* Need room for 99.99.99beta99z */\n#else\n#define png_libpng_ver png_get_header_ver(NULL)\n#endif\n\n#ifdef PNG_USE_GLOBAL_ARRAYS\n/* This was removed in version 1.0.5c */\n/* Structures to facilitate easy interlacing.  See png.c for more details */\nPNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_start[7];\nPNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_inc[7];\nPNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_ystart[7];\nPNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_yinc[7];\nPNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_mask[7];\nPNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_dsp_mask[7];\n/* This isn't currently used.  If you need it, see png.c for more details.\nPNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_height[7];\n*/\n#endif\n\n#endif /* PNG_NO_EXTERN */\n\n/* Three color definitions.  The order of the red, green, and blue, (and the\n * exact size) is not important, although the size of the fields need to\n * be png_byte or png_uint_16 (as defined below).\n */\ntypedef struct png_color_struct\n{\n   png_byte red;\n   png_byte green;\n   png_byte blue;\n} png_color;\ntypedef png_color FAR * png_colorp;\ntypedef png_color FAR * FAR * png_colorpp;\n\ntypedef struct png_color_16_struct\n{\n   png_byte index;    /* used for palette files */\n   png_uint_16 red;   /* for use in red green blue files */\n   png_uint_16 green;\n   png_uint_16 blue;\n   png_uint_16 gray;  /* for use in grayscale files */\n} png_color_16;\ntypedef png_color_16 FAR * png_color_16p;\ntypedef png_color_16 FAR * FAR * png_color_16pp;\n\ntypedef struct png_color_8_struct\n{\n   png_byte red;   /* for use in red green blue files */\n   png_byte green;\n   png_byte blue;\n   png_byte gray;  /* for use in grayscale files */\n   png_byte alpha; /* for alpha channel files */\n} png_color_8;\ntypedef png_color_8 FAR * png_color_8p;\ntypedef png_color_8 FAR * FAR * png_color_8pp;\n\n/*\n * The following two structures are used for the in-core representation\n * of sPLT chunks.\n */\ntypedef struct png_sPLT_entry_struct\n{\n   png_uint_16 red;\n   png_uint_16 green;\n   png_uint_16 blue;\n   png_uint_16 alpha;\n   png_uint_16 frequency;\n} png_sPLT_entry;\ntypedef png_sPLT_entry FAR * png_sPLT_entryp;\ntypedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp;\n\n/*  When the depth of the sPLT palette is 8 bits, the color and alpha samples\n *  occupy the LSB of their respective members, and the MSB of each member\n *  is zero-filled.  The frequency member always occupies the full 16 bits.\n */\n\ntypedef struct png_sPLT_struct\n{\n   png_charp name;           /* palette name */\n   png_byte depth;           /* depth of palette samples */\n   png_sPLT_entryp entries;  /* palette entries */\n   png_int_32 nentries;      /* number of palette entries */\n} png_sPLT_t;\ntypedef png_sPLT_t FAR * png_sPLT_tp;\ntypedef png_sPLT_t FAR * FAR * png_sPLT_tpp;\n\n#ifdef PNG_TEXT_SUPPORTED\n/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,\n * and whether that contents is compressed or not.  The \"key\" field\n * points to a regular zero-terminated C string.  The \"text\", \"lang\", and\n * \"lang_key\" fields can be regular C strings, empty strings, or NULL pointers.\n * However, the * structure returned by png_get_text() will always contain\n * regular zero-terminated C strings (possibly empty), never NULL pointers,\n * so they can be safely used in printf() and other string-handling functions.\n */\ntypedef struct png_text_struct\n{\n   int  compression;       /* compression value:\n                             -1: tEXt, none\n                              0: zTXt, deflate\n                              1: iTXt, none\n                              2: iTXt, deflate  */\n   png_charp key;          /* keyword, 1-79 character description of \"text\" */\n   png_charp text;         /* comment, may be an empty string (ie \"\")\n                              or a NULL pointer */\n   png_size_t text_length; /* length of the text string */\n#ifdef PNG_iTXt_SUPPORTED\n   png_size_t itxt_length; /* length of the itxt string */\n   png_charp lang;         /* language code, 0-79 characters\n                              or a NULL pointer */\n   png_charp lang_key;     /* keyword translated UTF-8 string, 0 or more\n                              chars or a NULL pointer */\n#endif\n} png_text;\ntypedef png_text FAR * png_textp;\ntypedef png_text FAR * FAR * png_textpp;\n#endif\n\n/* Supported compression types for text in PNG files (tEXt, and zTXt).\n * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed.\n */\n#define PNG_TEXT_COMPRESSION_NONE_WR -3\n#define PNG_TEXT_COMPRESSION_zTXt_WR -2\n#define PNG_TEXT_COMPRESSION_NONE    -1\n#define PNG_TEXT_COMPRESSION_zTXt     0\n#define PNG_ITXT_COMPRESSION_NONE     1\n#define PNG_ITXT_COMPRESSION_zTXt     2\n#define PNG_TEXT_COMPRESSION_LAST     3  /* Not a valid value */\n\n/* png_time is a way to hold the time in an machine independent way.\n * Two conversions are provided, both from time_t and struct tm.  There\n * is no portable way to convert to either of these structures, as far\n * as I know.  If you know of a portable way, send it to me.  As a side\n * note - PNG has always been Year 2000 compliant!\n */\ntypedef struct png_time_struct\n{\n   png_uint_16 year; /* full year, as in, 1995 */\n   png_byte month;   /* month of year, 1 - 12 */\n   png_byte day;     /* day of month, 1 - 31 */\n   png_byte hour;    /* hour of day, 0 - 23 */\n   png_byte minute;  /* minute of hour, 0 - 59 */\n   png_byte second;  /* second of minute, 0 - 60 (for leap seconds) */\n} png_time;\ntypedef png_time FAR * png_timep;\ntypedef png_time FAR * FAR * png_timepp;\n\n#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \\\n defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)\n/* png_unknown_chunk is a structure to hold queued chunks for which there is\n * no specific support.  The idea is that we can use this to queue\n * up private chunks for output even though the library doesn't actually\n * know about their semantics.\n */\n#define PNG_CHUNK_NAME_LENGTH 5\ntypedef struct png_unknown_chunk_t\n{\n    png_byte name[PNG_CHUNK_NAME_LENGTH];\n    png_byte *data;\n    png_size_t size;\n\n    /* libpng-using applications should NOT directly modify this byte. */\n    png_byte location; /* mode of operation at read time */\n}\npng_unknown_chunk;\ntypedef png_unknown_chunk FAR * png_unknown_chunkp;\ntypedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;\n#endif\n\n/* png_info is a structure that holds the information in a PNG file so\n * that the application can find out the characteristics of the image.\n * If you are reading the file, this structure will tell you what is\n * in the PNG file.  If you are writing the file, fill in the information\n * you want to put into the PNG file, then call png_write_info().\n * The names chosen should be very close to the PNG specification, so\n * consult that document for information about the meaning of each field.\n *\n * With libpng < 0.95, it was only possible to directly set and read the\n * the values in the png_info_struct, which meant that the contents and\n * order of the values had to remain fixed.  With libpng 0.95 and later,\n * however, there are now functions that abstract the contents of\n * png_info_struct from the application, so this makes it easier to use\n * libpng with dynamic libraries, and even makes it possible to use\n * libraries that don't have all of the libpng ancillary chunk-handing\n * functionality.\n *\n * In any case, the order of the parameters in png_info_struct should NOT\n * be changed for as long as possible to keep compatibility with applications\n * that use the old direct-access method with png_info_struct.\n *\n * The following members may have allocated storage attached that should be\n * cleaned up before the structure is discarded: palette, trans, text,\n * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,\n * splt_palettes, scal_unit, row_pointers, and unknowns.   By default, these\n * are automatically freed when the info structure is deallocated, if they were\n * allocated internally by libpng.  This behavior can be changed by means\n * of the png_data_freer() function.\n *\n * More allocation details: all the chunk-reading functions that\n * change these members go through the corresponding png_set_*\n * functions.  A function to clear these members is available: see\n * png_free_data().  The png_set_* functions do not depend on being\n * able to point info structure members to any of the storage they are\n * passed (they make their own copies), EXCEPT that the png_set_text\n * functions use the same storage passed to them in the text_ptr or\n * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns\n * functions do not make their own copies.\n */\ntypedef struct png_info_struct\n{\n   /* The following are necessary for every PNG file */\n   png_uint_32 width PNG_DEPSTRUCT;       /* width of image in pixels (from IHDR) */\n   png_uint_32 height PNG_DEPSTRUCT;      /* height of image in pixels (from IHDR) */\n   png_uint_32 valid PNG_DEPSTRUCT;       /* valid chunk data (see PNG_INFO_ below) */\n   png_uint_32 rowbytes PNG_DEPSTRUCT;    /* bytes needed to hold an untransformed row */\n   png_colorp palette PNG_DEPSTRUCT;      /* array of color values (valid & PNG_INFO_PLTE) */\n   png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in \"palette\" (PLTE) */\n   png_uint_16 num_trans PNG_DEPSTRUCT;   /* number of transparent palette color (tRNS) */\n   png_byte bit_depth PNG_DEPSTRUCT;      /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */\n   png_byte color_type PNG_DEPSTRUCT;     /* see PNG_COLOR_TYPE_ below (from IHDR) */\n   /* The following three should have been named *_method not *_type */\n   png_byte compression_type PNG_DEPSTRUCT; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */\n   png_byte filter_type PNG_DEPSTRUCT;    /* must be PNG_FILTER_TYPE_BASE (from IHDR) */\n   png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */\n\n   /* The following is informational only on read, and not used on writes. */\n   png_byte channels PNG_DEPSTRUCT;       /* number of data channels per pixel (1, 2, 3, 4) */\n   png_byte pixel_depth PNG_DEPSTRUCT;    /* number of bits per pixel */\n   png_byte spare_byte PNG_DEPSTRUCT;     /* to align the data, and for future use */\n   png_byte signature[8] PNG_DEPSTRUCT;   /* magic bytes read by libpng from start of file */\n\n   /* The rest of the data is optional.  If you are reading, check the\n    * valid field to see if the information in these are valid.  If you\n    * are writing, set the valid field to those chunks you want written,\n    * and initialize the appropriate fields below.\n    */\n\n#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)\n   /* The gAMA chunk describes the gamma characteristics of the system\n    * on which the image was created, normally in the range [1.0, 2.5].\n    * Data is valid if (valid & PNG_INFO_gAMA) is non-zero.\n    */\n   float gamma PNG_DEPSTRUCT; /* gamma value of image, if (valid & PNG_INFO_gAMA) */\n#endif\n\n#ifdef PNG_sRGB_SUPPORTED\n    /* GR-P, 0.96a */\n    /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */\n   png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent [0, 1, 2, or 3] */\n#endif\n\n#ifdef PNG_TEXT_SUPPORTED\n   /* The tEXt, and zTXt chunks contain human-readable textual data in\n    * uncompressed, compressed, and optionally compressed forms, respectively.\n    * The data in \"text\" is an array of pointers to uncompressed,\n    * null-terminated C strings. Each chunk has a keyword that describes the\n    * textual data contained in that chunk.  Keywords are not required to be\n    * unique, and the text string may be empty.  Any number of text chunks may\n    * be in an image.\n    */\n   int num_text PNG_DEPSTRUCT; /* number of comments read/to write */\n   int max_text PNG_DEPSTRUCT; /* current size of text array */\n   png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */\n#endif /* PNG_TEXT_SUPPORTED */\n\n#ifdef PNG_tIME_SUPPORTED\n   /* The tIME chunk holds the last time the displayed image data was\n    * modified.  See the png_time struct for the contents of this struct.\n    */\n   png_time mod_time PNG_DEPSTRUCT;\n#endif\n\n#ifdef PNG_sBIT_SUPPORTED\n   /* The sBIT chunk specifies the number of significant high-order bits\n    * in the pixel data.  Values are in the range [1, bit_depth], and are\n    * only specified for the channels in the pixel data.  The contents of\n    * the low-order bits is not specified.  Data is valid if\n    * (valid & PNG_INFO_sBIT) is non-zero.\n    */\n   png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */\n#endif\n\n#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \\\ndefined(PNG_READ_BACKGROUND_SUPPORTED)\n   /* The tRNS chunk supplies transparency data for paletted images and\n    * other image types that don't need a full alpha channel.  There are\n    * \"num_trans\" transparency values for a paletted image, stored in the\n    * same order as the palette colors, starting from index 0.  Values\n    * for the data are in the range [0, 255], ranging from fully transparent\n    * to fully opaque, respectively.  For non-paletted images, there is a\n    * single color specified that should be treated as fully transparent.\n    * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.\n    */\n   png_bytep trans PNG_DEPSTRUCT; /* transparent values for paletted image */\n   png_color_16 trans_values PNG_DEPSTRUCT; /* transparent color for non-palette image */\n#endif\n\n#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n   /* The bKGD chunk gives the suggested image background color if the\n    * display program does not have its own background color and the image\n    * is needs to composited onto a background before display.  The colors\n    * in \"background\" are normally in the same color space/depth as the\n    * pixel data.  Data is valid if (valid & PNG_INFO_bKGD) is non-zero.\n    */\n   png_color_16 background PNG_DEPSTRUCT;\n#endif\n\n#ifdef PNG_oFFs_SUPPORTED\n   /* The oFFs chunk gives the offset in \"offset_unit_type\" units rightwards\n    * and downwards from the top-left corner of the display, page, or other\n    * application-specific co-ordinate space.  See the PNG_OFFSET_ defines\n    * below for the unit types.  Valid if (valid & PNG_INFO_oFFs) non-zero.\n    */\n   png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */\n   png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */\n   png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */\n#endif\n\n#ifdef PNG_pHYs_SUPPORTED\n   /* The pHYs chunk gives the physical pixel density of the image for\n    * display or printing in \"phys_unit_type\" units (see PNG_RESOLUTION_\n    * defines below).  Data is valid if (valid & PNG_INFO_pHYs) is non-zero.\n    */\n   png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */\n   png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */\n   png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see PNG_RESOLUTION_ below) */\n#endif\n\n#ifdef PNG_hIST_SUPPORTED\n   /* The hIST chunk contains the relative frequency or importance of the\n    * various palette entries, so that a viewer can intelligently select a\n    * reduced-color palette, if required.  Data is an array of \"num_palette\"\n    * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)\n    * is non-zero.\n    */\n   png_uint_16p hist PNG_DEPSTRUCT;\n#endif\n\n#ifdef PNG_cHRM_SUPPORTED\n   /* The cHRM chunk describes the CIE color characteristics of the monitor\n    * on which the PNG was created.  This data allows the viewer to do gamut\n    * mapping of the input image to ensure that the viewer sees the same\n    * colors in the image as the creator.  Values are in the range\n    * [0.0, 0.8].  Data valid if (valid & PNG_INFO_cHRM) non-zero.\n    */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   float x_white PNG_DEPSTRUCT;\n   float y_white PNG_DEPSTRUCT;\n   float x_red PNG_DEPSTRUCT;\n   float y_red PNG_DEPSTRUCT;\n   float x_green PNG_DEPSTRUCT;\n   float y_green PNG_DEPSTRUCT;\n   float x_blue PNG_DEPSTRUCT;\n   float y_blue PNG_DEPSTRUCT;\n#endif\n#endif\n\n#ifdef PNG_pCAL_SUPPORTED\n   /* The pCAL chunk describes a transformation between the stored pixel\n    * values and original physical data values used to create the image.\n    * The integer range [0, 2^bit_depth - 1] maps to the floating-point\n    * range given by [pcal_X0, pcal_X1], and are further transformed by a\n    * (possibly non-linear) transformation function given by \"pcal_type\"\n    * and \"pcal_params\" into \"pcal_units\".  Please see the PNG_EQUATION_\n    * defines below, and the PNG-Group's PNG extensions document for a\n    * complete description of the transformations and how they should be\n    * implemented, and for a description of the ASCII parameter strings.\n    * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.\n    */\n   png_charp pcal_purpose PNG_DEPSTRUCT;  /* pCAL chunk description string */\n   png_int_32 pcal_X0 PNG_DEPSTRUCT;      /* minimum value */\n   png_int_32 pcal_X1 PNG_DEPSTRUCT;      /* maximum value */\n   png_charp pcal_units PNG_DEPSTRUCT;    /* Latin-1 string giving physical units */\n   png_charpp pcal_params PNG_DEPSTRUCT;  /* ASCII strings containing parameter values */\n   png_byte pcal_type PNG_DEPSTRUCT;      /* equation type (see PNG_EQUATION_ below) */\n   png_byte pcal_nparams PNG_DEPSTRUCT;   /* number of parameters given in pcal_params */\n#endif\n\n/* New members added in libpng-1.0.6 */\n#ifdef PNG_FREE_ME_SUPPORTED\n   png_uint_32 free_me PNG_DEPSTRUCT;     /* flags items libpng is responsible for freeing */\n#endif\n\n#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \\\n defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)\n   /* Storage for unknown chunks that the library doesn't recognize. */\n   png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT;\n   png_size_t unknown_chunks_num PNG_DEPSTRUCT;\n#endif\n\n#ifdef PNG_iCCP_SUPPORTED\n   /* iCCP chunk data. */\n   png_charp iccp_name PNG_DEPSTRUCT;     /* profile name */\n   png_charp iccp_profile PNG_DEPSTRUCT;  /* International Color Consortium profile data */\n                            /* Note to maintainer: should be png_bytep */\n   png_uint_32 iccp_proflen PNG_DEPSTRUCT;  /* ICC profile data length */\n   png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */\n#endif\n\n#ifdef PNG_sPLT_SUPPORTED\n   /* Data on sPLT chunks (there may be more than one). */\n   png_sPLT_tp splt_palettes PNG_DEPSTRUCT;\n   png_uint_32 splt_palettes_num PNG_DEPSTRUCT;\n#endif\n\n#ifdef PNG_sCAL_SUPPORTED\n   /* The sCAL chunk describes the actual physical dimensions of the\n    * subject matter of the graphic.  The chunk contains a unit specification\n    * a byte value, and two ASCII strings representing floating-point\n    * values.  The values are width and height corresponsing to one pixel\n    * in the image.  This external representation is converted to double\n    * here.  Data values are valid if (valid & PNG_INFO_sCAL) is non-zero.\n    */\n   png_byte scal_unit PNG_DEPSTRUCT;         /* unit of physical scale */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   double scal_pixel_width PNG_DEPSTRUCT;    /* width of one pixel */\n   double scal_pixel_height PNG_DEPSTRUCT;   /* height of one pixel */\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   png_charp scal_s_width PNG_DEPSTRUCT;     /* string containing height */\n   png_charp scal_s_height PNG_DEPSTRUCT;    /* string containing width */\n#endif\n#endif\n\n#ifdef PNG_INFO_IMAGE_SUPPORTED\n   /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */\n   /* Data valid if (valid & PNG_INFO_IDAT) non-zero */\n   png_bytepp row_pointers PNG_DEPSTRUCT;        /* the image bits */\n#endif\n\n#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED)\n   png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, if (valid & PNG_INFO_gAMA) */\n#endif\n\n#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED)\n   png_fixed_point int_x_white PNG_DEPSTRUCT;\n   png_fixed_point int_y_white PNG_DEPSTRUCT;\n   png_fixed_point int_x_red PNG_DEPSTRUCT;\n   png_fixed_point int_y_red PNG_DEPSTRUCT;\n   png_fixed_point int_x_green PNG_DEPSTRUCT;\n   png_fixed_point int_y_green PNG_DEPSTRUCT;\n   png_fixed_point int_x_blue PNG_DEPSTRUCT;\n   png_fixed_point int_y_blue PNG_DEPSTRUCT;\n#endif\n\n} png_info;\n\ntypedef png_info FAR * png_infop;\ntypedef png_info FAR * FAR * png_infopp;\n\n/* Maximum positive integer used in PNG is (2^31)-1 */\n#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)\n#define PNG_UINT_32_MAX ((png_uint_32)(-1))\n#define PNG_SIZE_MAX ((png_size_t)(-1))\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\n/* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */\n#define PNG_MAX_UINT PNG_UINT_31_MAX\n#endif\n\n/* These describe the color_type field in png_info. */\n/* color type masks */\n#define PNG_COLOR_MASK_PALETTE    1\n#define PNG_COLOR_MASK_COLOR      2\n#define PNG_COLOR_MASK_ALPHA      4\n\n/* color types.  Note that not all combinations are legal */\n#define PNG_COLOR_TYPE_GRAY 0\n#define PNG_COLOR_TYPE_PALETTE  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE)\n#define PNG_COLOR_TYPE_RGB        (PNG_COLOR_MASK_COLOR)\n#define PNG_COLOR_TYPE_RGB_ALPHA  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)\n#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA)\n/* aliases */\n#define PNG_COLOR_TYPE_RGBA  PNG_COLOR_TYPE_RGB_ALPHA\n#define PNG_COLOR_TYPE_GA  PNG_COLOR_TYPE_GRAY_ALPHA\n\n/* This is for compression type. PNG 1.0-1.2 only define the single type. */\n#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */\n#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE\n\n/* This is for filter type. PNG 1.0-1.2 only define the single type. */\n#define PNG_FILTER_TYPE_BASE      0 /* Single row per-byte filtering */\n#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */\n#define PNG_FILTER_TYPE_DEFAULT   PNG_FILTER_TYPE_BASE\n\n/* These are for the interlacing type.  These values should NOT be changed. */\n#define PNG_INTERLACE_NONE        0 /* Non-interlaced image */\n#define PNG_INTERLACE_ADAM7       1 /* Adam7 interlacing */\n#define PNG_INTERLACE_LAST        2 /* Not a valid value */\n\n/* These are for the oFFs chunk.  These values should NOT be changed. */\n#define PNG_OFFSET_PIXEL          0 /* Offset in pixels */\n#define PNG_OFFSET_MICROMETER     1 /* Offset in micrometers (1/10^6 meter) */\n#define PNG_OFFSET_LAST           2 /* Not a valid value */\n\n/* These are for the pCAL chunk.  These values should NOT be changed. */\n#define PNG_EQUATION_LINEAR       0 /* Linear transformation */\n#define PNG_EQUATION_BASE_E       1 /* Exponential base e transform */\n#define PNG_EQUATION_ARBITRARY    2 /* Arbitrary base exponential transform */\n#define PNG_EQUATION_HYPERBOLIC   3 /* Hyperbolic sine transformation */\n#define PNG_EQUATION_LAST         4 /* Not a valid value */\n\n/* These are for the sCAL chunk.  These values should NOT be changed. */\n#define PNG_SCALE_UNKNOWN         0 /* unknown unit (image scale) */\n#define PNG_SCALE_METER           1 /* meters per pixel */\n#define PNG_SCALE_RADIAN          2 /* radians per pixel */\n#define PNG_SCALE_LAST            3 /* Not a valid value */\n\n/* These are for the pHYs chunk.  These values should NOT be changed. */\n#define PNG_RESOLUTION_UNKNOWN    0 /* pixels/unknown unit (aspect ratio) */\n#define PNG_RESOLUTION_METER      1 /* pixels/meter */\n#define PNG_RESOLUTION_LAST       2 /* Not a valid value */\n\n/* These are for the sRGB chunk.  These values should NOT be changed. */\n#define PNG_sRGB_INTENT_PERCEPTUAL 0\n#define PNG_sRGB_INTENT_RELATIVE   1\n#define PNG_sRGB_INTENT_SATURATION 2\n#define PNG_sRGB_INTENT_ABSOLUTE   3\n#define PNG_sRGB_INTENT_LAST       4 /* Not a valid value */\n\n/* This is for text chunks */\n#define PNG_KEYWORD_MAX_LENGTH     79\n\n/* Maximum number of entries in PLTE/sPLT/tRNS arrays */\n#define PNG_MAX_PALETTE_LENGTH    256\n\n/* These determine if an ancillary chunk's data has been successfully read\n * from the PNG header, or if the application has filled in the corresponding\n * data in the info_struct to be written into the output file.  The values\n * of the PNG_INFO_<chunk> defines should NOT be changed.\n */\n#define PNG_INFO_gAMA 0x0001\n#define PNG_INFO_sBIT 0x0002\n#define PNG_INFO_cHRM 0x0004\n#define PNG_INFO_PLTE 0x0008\n#define PNG_INFO_tRNS 0x0010\n#define PNG_INFO_bKGD 0x0020\n#define PNG_INFO_hIST 0x0040\n#define PNG_INFO_pHYs 0x0080\n#define PNG_INFO_oFFs 0x0100\n#define PNG_INFO_tIME 0x0200\n#define PNG_INFO_pCAL 0x0400\n#define PNG_INFO_sRGB 0x0800   /* GR-P, 0.96a */\n#define PNG_INFO_iCCP 0x1000   /* ESR, 1.0.6 */\n#define PNG_INFO_sPLT 0x2000   /* ESR, 1.0.6 */\n#define PNG_INFO_sCAL 0x4000   /* ESR, 1.0.6 */\n#define PNG_INFO_IDAT 0x8000L  /* ESR, 1.0.6 */\n\n/* This is used for the transformation routines, as some of them\n * change these values for the row.  It also should enable using\n * the routines for other purposes.\n */\ntypedef struct png_row_info_struct\n{\n   png_uint_32 width; /* width of row */\n   png_uint_32 rowbytes; /* number of bytes in row */\n   png_byte color_type; /* color type of row */\n   png_byte bit_depth; /* bit depth of row */\n   png_byte channels; /* number of channels (1, 2, 3, or 4) */\n   png_byte pixel_depth; /* bits per pixel (depth * channels) */\n} png_row_info;\n\ntypedef png_row_info FAR * png_row_infop;\ntypedef png_row_info FAR * FAR * png_row_infopp;\n\n/* These are the function types for the I/O functions and for the functions\n * that allow the user to override the default I/O functions with his or her\n * own.  The png_error_ptr type should match that of user-supplied warning\n * and error functions, while the png_rw_ptr type should match that of the\n * user read/write data functions.\n */\ntypedef struct png_struct_def png_struct;\ntypedef png_struct FAR * png_structp;\n\ntypedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));\ntypedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t));\ntypedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp));\ntypedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32,\n   int));\ntypedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32,\n   int));\n\n#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\ntypedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop));\ntypedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));\ntypedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,\n   png_uint_32, int));\n#endif\n\n#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_LEGACY_SUPPORTED)\ntypedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp,\n    png_row_infop, png_bytep));\n#endif\n\n#ifdef PNG_USER_CHUNKS_SUPPORTED\ntypedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp));\n#endif\n#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\ntypedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));\n#endif\n\n/* Transform masks for the high-level interface */\n#define PNG_TRANSFORM_IDENTITY       0x0000    /* read and write */\n#define PNG_TRANSFORM_STRIP_16       0x0001    /* read only */\n#define PNG_TRANSFORM_STRIP_ALPHA    0x0002    /* read only */\n#define PNG_TRANSFORM_PACKING        0x0004    /* read and write */\n#define PNG_TRANSFORM_PACKSWAP       0x0008    /* read and write */\n#define PNG_TRANSFORM_EXPAND         0x0010    /* read only */\n#define PNG_TRANSFORM_INVERT_MONO    0x0020    /* read and write */\n#define PNG_TRANSFORM_SHIFT          0x0040    /* read and write */\n#define PNG_TRANSFORM_BGR            0x0080    /* read and write */\n#define PNG_TRANSFORM_SWAP_ALPHA     0x0100    /* read and write */\n#define PNG_TRANSFORM_SWAP_ENDIAN    0x0200    /* read and write */\n#define PNG_TRANSFORM_INVERT_ALPHA   0x0400    /* read and write */\n#define PNG_TRANSFORM_STRIP_FILLER   0x0800    /* write only, deprecated */\n/* Added to libpng-1.2.34 */\n#define PNG_TRANSFORM_STRIP_FILLER_BEFORE 0x0800  /* write only */\n#define PNG_TRANSFORM_STRIP_FILLER_AFTER  0x1000  /* write only */\n/* Added to libpng-1.2.41 */\n#define PNG_TRANSFORM_GRAY_TO_RGB   0x2000      /* read only */\n\n/* Flags for MNG supported features */\n#define PNG_FLAG_MNG_EMPTY_PLTE     0x01\n#define PNG_FLAG_MNG_FILTER_64      0x04\n#define PNG_ALL_MNG_FEATURES        0x05\n\ntypedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_size_t));\ntypedef void (*png_free_ptr) PNGARG((png_structp, png_voidp));\n\n/* The structure that holds the information to read and write PNG files.\n * The only people who need to care about what is inside of this are the\n * people who will be modifying the library for their own special needs.\n * It should NOT be accessed directly by an application, except to store\n * the jmp_buf.\n */\n\nstruct png_struct_def\n{\n#ifdef PNG_SETJMP_SUPPORTED\n   jmp_buf jmpbuf;            /* used in png_error */\n#endif\n   png_error_ptr error_fn PNG_DEPSTRUCT;    /* function for printing errors and aborting */\n   png_error_ptr warning_fn PNG_DEPSTRUCT;  /* function for printing warnings */\n   png_voidp error_ptr PNG_DEPSTRUCT;       /* user supplied struct for error functions */\n   png_rw_ptr write_data_fn PNG_DEPSTRUCT;  /* function for writing output data */\n   png_rw_ptr read_data_fn PNG_DEPSTRUCT;   /* function for reading input data */\n   png_voidp io_ptr PNG_DEPSTRUCT;          /* ptr to application struct for I/O functions */\n\n#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\n   png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read transform */\n#endif\n\n#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED\n   png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write transform */\n#endif\n\n/* These were added in libpng-1.0.2 */\n#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED\n#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)\n   png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct for user transform */\n   png_byte user_transform_depth PNG_DEPSTRUCT;    /* bit depth of user transformed pixels */\n   png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user transformed pixels */\n#endif\n#endif\n\n   png_uint_32 mode PNG_DEPSTRUCT;          /* tells us where we are in the PNG file */\n   png_uint_32 flags PNG_DEPSTRUCT;         /* flags indicating various things to libpng */\n   png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations to perform */\n\n   z_stream zstream PNG_DEPSTRUCT;          /* pointer to decompression structure (below) */\n   png_bytep zbuf PNG_DEPSTRUCT;            /* buffer for zlib */\n   png_size_t zbuf_size PNG_DEPSTRUCT;      /* size of zbuf */\n   int zlib_level PNG_DEPSTRUCT;            /* holds zlib compression level */\n   int zlib_method PNG_DEPSTRUCT;           /* holds zlib compression method */\n   int zlib_window_bits PNG_DEPSTRUCT;      /* holds zlib compression window bits */\n   int zlib_mem_level PNG_DEPSTRUCT;        /* holds zlib compression memory level */\n   int zlib_strategy PNG_DEPSTRUCT;         /* holds zlib compression strategy */\n\n   png_uint_32 width PNG_DEPSTRUCT;         /* width of image in pixels */\n   png_uint_32 height PNG_DEPSTRUCT;        /* height of image in pixels */\n   png_uint_32 num_rows PNG_DEPSTRUCT;      /* number of rows in current pass */\n   png_uint_32 usr_width PNG_DEPSTRUCT;     /* width of row at start of write */\n   png_uint_32 rowbytes PNG_DEPSTRUCT;      /* size of row in bytes */\n#if 0 /* Replaced with the following in libpng-1.2.43 */\n   png_size_t irowbytes PNG_DEPSTRUCT;\n#endif\n/* Added in libpng-1.2.43 */\n#ifdef PNG_USER_LIMITS_SUPPORTED\n   /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown\n    * chunks that can be stored (0 means unlimited).\n    */\n   png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT;\n#endif\n   png_uint_32 iwidth PNG_DEPSTRUCT;        /* width of current interlaced row in pixels */\n   png_uint_32 row_number PNG_DEPSTRUCT;    /* current row in interlace pass */\n   png_bytep prev_row PNG_DEPSTRUCT;        /* buffer to save previous (unfiltered) row */\n   png_bytep row_buf PNG_DEPSTRUCT;         /* buffer to save current (unfiltered) row */\n#ifndef PNG_NO_WRITE_FILTER\n   png_bytep sub_row PNG_DEPSTRUCT;         /* buffer to save \"sub\" row when filtering */\n   png_bytep up_row PNG_DEPSTRUCT;          /* buffer to save \"up\" row when filtering */\n   png_bytep avg_row PNG_DEPSTRUCT;         /* buffer to save \"avg\" row when filtering */\n   png_bytep paeth_row PNG_DEPSTRUCT;       /* buffer to save \"Paeth\" row when filtering */\n#endif\n   png_row_info row_info PNG_DEPSTRUCT;     /* used for transformation routines */\n\n   png_uint_32 idat_size PNG_DEPSTRUCT;     /* current IDAT size for read */\n   png_uint_32 crc PNG_DEPSTRUCT;           /* current chunk CRC value */\n   png_colorp palette PNG_DEPSTRUCT;        /* palette from the input file */\n   png_uint_16 num_palette PNG_DEPSTRUCT;   /* number of color entries in palette */\n   png_uint_16 num_trans PNG_DEPSTRUCT;     /* number of transparency values */\n   png_byte chunk_name[5] PNG_DEPSTRUCT;    /* null-terminated name of current chunk */\n   png_byte compression PNG_DEPSTRUCT;      /* file compression type (always 0) */\n   png_byte filter PNG_DEPSTRUCT;           /* file filter type (always 0) */\n   png_byte interlaced PNG_DEPSTRUCT;       /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */\n   png_byte pass PNG_DEPSTRUCT;             /* current interlace pass (0 - 6) */\n   png_byte do_filter PNG_DEPSTRUCT;        /* row filter flags (see PNG_FILTER_ below ) */\n   png_byte color_type PNG_DEPSTRUCT;       /* color type of file */\n   png_byte bit_depth PNG_DEPSTRUCT;        /* bit depth of file */\n   png_byte usr_bit_depth PNG_DEPSTRUCT;    /* bit depth of users row */\n   png_byte pixel_depth PNG_DEPSTRUCT;      /* number of bits per pixel */\n   png_byte channels PNG_DEPSTRUCT;         /* number of channels in file */\n   png_byte usr_channels PNG_DEPSTRUCT;     /* channels at start of write */\n   png_byte sig_bytes PNG_DEPSTRUCT;        /* magic bytes read/written from start of file */\n\n#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)\n#ifdef PNG_LEGACY_SUPPORTED\n   png_byte filler PNG_DEPSTRUCT;           /* filler byte for pixel expansion */\n#else\n   png_uint_16 filler PNG_DEPSTRUCT;           /* filler bytes for pixel expansion */\n#endif\n#endif\n\n#ifdef PNG_bKGD_SUPPORTED\n   png_byte background_gamma_type PNG_DEPSTRUCT;\n#  ifdef PNG_FLOATING_POINT_SUPPORTED\n   float background_gamma PNG_DEPSTRUCT;\n#  endif\n   png_color_16 background PNG_DEPSTRUCT;   /* background color in screen gamma space */\n#ifdef PNG_READ_GAMMA_SUPPORTED\n   png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */\n#endif\n#endif /* PNG_bKGD_SUPPORTED */\n\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\n   png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */\n   png_uint_32 flush_dist PNG_DEPSTRUCT;    /* how many rows apart to flush, 0 - no flush */\n   png_uint_32 flush_rows PNG_DEPSTRUCT;    /* number of rows written since last flush */\n#endif\n\n#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n   int gamma_shift PNG_DEPSTRUCT;      /* number of \"insignificant\" bits 16-bit gamma */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   float gamma PNG_DEPSTRUCT;          /* file gamma value */\n   float screen_gamma PNG_DEPSTRUCT;   /* screen gamma value (display_exponent) */\n#endif\n#endif\n\n#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n   png_bytep gamma_table PNG_DEPSTRUCT;     /* gamma table for 8-bit depth files */\n   png_bytep gamma_from_1 PNG_DEPSTRUCT;    /* converts from 1.0 to screen */\n   png_bytep gamma_to_1 PNG_DEPSTRUCT;      /* converts from file to 1.0 */\n   png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */\n   png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */\n   png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */\n#endif\n\n#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)\n   png_color_8 sig_bit PNG_DEPSTRUCT;       /* significant bits in each available channel */\n#endif\n\n#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)\n   png_color_8 shift PNG_DEPSTRUCT;         /* shift for significant bit tranformation */\n#endif\n\n#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \\\n || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n   png_bytep trans PNG_DEPSTRUCT;           /* transparency values for paletted files */\n   png_color_16 trans_values PNG_DEPSTRUCT; /* transparency values for non-paletted files */\n#endif\n\n   png_read_status_ptr read_row_fn PNG_DEPSTRUCT;   /* called after each row is decoded */\n   png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each row is encoded */\n#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\n   png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header data fully read */\n   png_progressive_row_ptr row_fn PNG_DEPSTRUCT;   /* called after each prog. row is decoded */\n   png_progressive_end_ptr end_fn PNG_DEPSTRUCT;   /* called after image is complete */\n   png_bytep save_buffer_ptr PNG_DEPSTRUCT;        /* current location in save_buffer */\n   png_bytep save_buffer PNG_DEPSTRUCT;            /* buffer for previously read data */\n   png_bytep current_buffer_ptr PNG_DEPSTRUCT;     /* current location in current_buffer */\n   png_bytep current_buffer PNG_DEPSTRUCT;         /* buffer for recently used data */\n   png_uint_32 push_length PNG_DEPSTRUCT;          /* size of current input chunk */\n   png_uint_32 skip_length PNG_DEPSTRUCT;          /* bytes to skip in input data */\n   png_size_t save_buffer_size PNG_DEPSTRUCT;      /* amount of data now in save_buffer */\n   png_size_t save_buffer_max PNG_DEPSTRUCT;       /* total size of save_buffer */\n   png_size_t buffer_size PNG_DEPSTRUCT;           /* total amount of available input data */\n   png_size_t current_buffer_size PNG_DEPSTRUCT;   /* amount of data now in current_buffer */\n   int process_mode PNG_DEPSTRUCT;                 /* what push library is currently doing */\n   int cur_palette PNG_DEPSTRUCT;                  /* current push library palette index */\n\n#  ifdef PNG_TEXT_SUPPORTED\n     png_size_t current_text_size PNG_DEPSTRUCT;   /* current size of text input data */\n     png_size_t current_text_left PNG_DEPSTRUCT;   /* how much text left to read in input */\n     png_charp current_text PNG_DEPSTRUCT;         /* current text chunk buffer */\n     png_charp current_text_ptr PNG_DEPSTRUCT;     /* current location in current_text */\n#  endif /* PNG_TEXT_SUPPORTED */\n#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */\n\n#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)\n/* for the Borland special 64K segment handler */\n   png_bytepp offset_table_ptr PNG_DEPSTRUCT;\n   png_bytep offset_table PNG_DEPSTRUCT;\n   png_uint_16 offset_table_number PNG_DEPSTRUCT;\n   png_uint_16 offset_table_count PNG_DEPSTRUCT;\n   png_uint_16 offset_table_count_free PNG_DEPSTRUCT;\n#endif\n\n#ifdef PNG_READ_DITHER_SUPPORTED\n   png_bytep palette_lookup PNG_DEPSTRUCT;         /* lookup table for dithering */\n   png_bytep dither_index PNG_DEPSTRUCT;           /* index translation for palette files */\n#endif\n\n#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED)\n   png_uint_16p hist PNG_DEPSTRUCT;                /* histogram */\n#endif\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n   png_byte heuristic_method PNG_DEPSTRUCT;        /* heuristic for row filter selection */\n   png_byte num_prev_filters PNG_DEPSTRUCT;        /* number of weights for previous rows */\n   png_bytep prev_filters PNG_DEPSTRUCT;           /* filter type(s) of previous row(s) */\n   png_uint_16p filter_weights PNG_DEPSTRUCT;      /* weight(s) for previous line(s) */\n   png_uint_16p inv_filter_weights PNG_DEPSTRUCT;  /* 1/weight(s) for previous line(s) */\n   png_uint_16p filter_costs PNG_DEPSTRUCT;        /* relative filter calculation cost */\n   png_uint_16p inv_filter_costs PNG_DEPSTRUCT;    /* 1/relative filter calculation cost */\n#endif\n\n#ifdef PNG_TIME_RFC1123_SUPPORTED\n   png_charp time_buffer PNG_DEPSTRUCT;            /* String to hold RFC 1123 time text */\n#endif\n\n/* New members added in libpng-1.0.6 */\n\n#ifdef PNG_FREE_ME_SUPPORTED\n   png_uint_32 free_me PNG_DEPSTRUCT;   /* flags items libpng is responsible for freeing */\n#endif\n\n#ifdef PNG_USER_CHUNKS_SUPPORTED\n   png_voidp user_chunk_ptr PNG_DEPSTRUCT;\n   png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read chunk handler */\n#endif\n\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n   int num_chunk_list PNG_DEPSTRUCT;\n   png_bytep chunk_list PNG_DEPSTRUCT;\n#endif\n\n/* New members added in libpng-1.0.3 */\n#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\n   png_byte rgb_to_gray_status PNG_DEPSTRUCT;\n   /* These were changed from png_byte in libpng-1.0.6 */\n   png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT;\n   png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT;\n   png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT;\n#endif\n\n/* New member added in libpng-1.0.4 (renamed in 1.0.9) */\n#if defined(PNG_MNG_FEATURES_SUPPORTED) || \\\n    defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \\\n    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)\n/* Changed from png_byte to png_uint_32 at version 1.2.0 */\n#ifdef PNG_1_0_X\n   png_byte mng_features_permitted PNG_DEPSTRUCT;\n#else\n   png_uint_32 mng_features_permitted PNG_DEPSTRUCT;\n#endif /* PNG_1_0_X */\n#endif\n\n/* New member added in libpng-1.0.7 */\n#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n   png_fixed_point int_gamma PNG_DEPSTRUCT;\n#endif\n\n/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n   png_byte filter_type PNG_DEPSTRUCT;\n#endif\n\n#ifdef PNG_1_0_X\n/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */\n   png_uint_32 row_buf_size PNG_DEPSTRUCT;\n#endif\n\n/* New members added in libpng-1.2.0 */\n#ifdef PNG_ASSEMBLER_CODE_SUPPORTED\n#  ifndef PNG_1_0_X\n#    ifdef PNG_MMX_CODE_SUPPORTED\n   png_byte     mmx_bitdepth_threshold PNG_DEPSTRUCT;\n   png_uint_32  mmx_rowbytes_threshold PNG_DEPSTRUCT;\n#    endif\n   png_uint_32  asm_flags PNG_DEPSTRUCT;\n#  endif\n#endif\n\n/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_voidp mem_ptr PNG_DEPSTRUCT;            /* user supplied struct for mem functions */\n   png_malloc_ptr malloc_fn PNG_DEPSTRUCT;     /* function for allocating memory */\n   png_free_ptr free_fn PNG_DEPSTRUCT;         /* function for freeing memory */\n#endif\n\n/* New member added in libpng-1.0.13 and 1.2.0 */\n   png_bytep big_row_buf PNG_DEPSTRUCT;        /* buffer to save current (unfiltered) row */\n\n#ifdef PNG_READ_DITHER_SUPPORTED\n/* The following three members were added at version 1.0.14 and 1.2.4 */\n   png_bytep dither_sort PNG_DEPSTRUCT;        /* working sort array */\n   png_bytep index_to_palette PNG_DEPSTRUCT;   /* where the original index currently is */\n                                 /* in the palette */\n   png_bytep palette_to_index PNG_DEPSTRUCT;   /* which original index points to this */\n                                 /* palette color */\n#endif\n\n/* New members added in libpng-1.0.16 and 1.2.6 */\n   png_byte compression_type PNG_DEPSTRUCT;\n\n#ifdef PNG_USER_LIMITS_SUPPORTED\n   png_uint_32 user_width_max PNG_DEPSTRUCT;\n   png_uint_32 user_height_max PNG_DEPSTRUCT;\n#endif\n\n/* New member added in libpng-1.0.25 and 1.2.17 */\n#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\n   /* Storage for unknown chunk that the library doesn't recognize. */\n   png_unknown_chunk unknown_chunk PNG_DEPSTRUCT;\n#endif\n\n/* New members added in libpng-1.2.26 */\n  png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT;\n  png_uint_32 old_prev_row_size PNG_DEPSTRUCT;\n\n/* New member added in libpng-1.2.30 */\n  png_charp chunkdata PNG_DEPSTRUCT;  /* buffer for reading chunk data */\n\n\n};\n\n\n/* This triggers a compiler error in png.c, if png.c and png.h\n * do not agree upon the version number.\n */\ntypedef png_structp version_1_2_44;\n\ntypedef png_struct FAR * FAR * png_structpp;\n\n/* Here are the function definitions most commonly used.  This is not\n * the place to find out how to use libpng.  See libpng.txt for the\n * full explanation, see example.c for the summary.  This just provides\n * a simple one line description of the use of each function.\n */\n\n/* Returns the version number of the library */\nextern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void));\n\n/* Tell lib we have already handled the first <num_bytes> magic bytes.\n * Handling more than 8 bytes from the beginning of the file is an error.\n */\nextern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr,\n   int num_bytes));\n\n/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a\n * PNG file.  Returns zero if the supplied bytes match the 8-byte PNG\n * signature, and non-zero otherwise.  Having num_to_check == 0 or\n * start > 7 will always fail (ie return non-zero).\n */\nextern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,\n   png_size_t num_to_check));\n\n/* Simple signature checking function.  This is the same as calling\n * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).\n */\nextern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num)) PNG_DEPRECATED;\n\n/* Allocate and initialize png_ptr struct for reading, and any other memory. */\nextern PNG_EXPORT(png_structp,png_create_read_struct)\n   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,\n   png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;\n\n/* Allocate and initialize png_ptr struct for writing, and any other memory */\nextern PNG_EXPORT(png_structp,png_create_write_struct)\n   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,\n   png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;\n\n#ifdef PNG_WRITE_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_compression_buffer_size)\n   PNGARG((png_structp png_ptr));\n#endif\n\n#ifdef PNG_WRITE_SUPPORTED\nextern PNG_EXPORT(void,png_set_compression_buffer_size)\n   PNGARG((png_structp png_ptr, png_uint_32 size));\n#endif\n\n/* Reset the compression stream */\nextern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));\n\n/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */\n#ifdef PNG_USER_MEM_SUPPORTED\nextern PNG_EXPORT(png_structp,png_create_read_struct_2)\n   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,\n   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,\n   png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;\nextern PNG_EXPORT(png_structp,png_create_write_struct_2)\n   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,\n   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,\n   png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;\n#endif\n\n/* Write a PNG chunk - size, type, (optional) data, CRC. */\nextern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr,\n   png_bytep chunk_name, png_bytep data, png_size_t length));\n\n/* Write the start of a PNG chunk - length and chunk name. */\nextern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr,\n   png_bytep chunk_name, png_uint_32 length));\n\n/* Write the data of a PNG chunk started with png_write_chunk_start(). */\nextern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr,\n   png_bytep data, png_size_t length));\n\n/* Finish a chunk started with png_write_chunk_start() (includes CRC). */\nextern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));\n\n/* Allocate and initialize the info structure */\nextern PNG_EXPORT(png_infop,png_create_info_struct)\n   PNGARG((png_structp png_ptr)) PNG_ALLOCATED;\n\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\n/* Initialize the info structure (old interface - DEPRECATED) */\nextern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr))\n    PNG_DEPRECATED;\n#undef png_info_init\n#define png_info_init(info_ptr) png_info_init_3(&info_ptr,\\\n    png_sizeof(png_info));\n#endif\n\nextern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,\n    png_size_t png_info_struct_size));\n\n/* Writes all the PNG information before the image. */\nextern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr,\n   png_infop info_ptr));\nextern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr,\n   png_infop info_ptr));\n\n#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\n/* Read the information before the actual image data. */\nextern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,\n   png_infop info_ptr));\n#endif\n\n#ifdef PNG_TIME_RFC1123_SUPPORTED\nextern PNG_EXPORT(png_charp,png_convert_to_rfc1123)\n   PNGARG((png_structp png_ptr, png_timep ptime));\n#endif\n\n#ifdef PNG_CONVERT_tIME_SUPPORTED\n/* Convert from a struct tm to png_time */\nextern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,\n   struct tm FAR * ttime));\n\n/* Convert from time_t to png_time.  Uses gmtime() */\nextern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,\n   time_t ttime));\n#endif /* PNG_CONVERT_tIME_SUPPORTED */\n\n#ifdef PNG_READ_EXPAND_SUPPORTED\n/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */\nextern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));\n#ifndef PNG_1_0_X\nextern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp\n  png_ptr));\n#endif\nextern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr));\nextern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\n/* Deprecated */\nextern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp\n    png_ptr)) PNG_DEPRECATED;\n#endif\n#endif\n\n#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)\n/* Use blue, green, red order for pixels. */\nextern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr));\n#endif\n\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\n/* Expand the grayscale to 24-bit RGB if necessary. */\nextern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr));\n#endif\n\n#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\n/* Reduce RGB to grayscale. */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,\n   int error_action, double red, double green ));\n#endif\nextern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr,\n   int error_action, png_fixed_point red, png_fixed_point green ));\nextern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp\n   png_ptr));\n#endif\n\nextern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth,\n   png_colorp palette));\n\n#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED\nextern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr));\n#endif\n\n#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \\\n    defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)\nextern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr));\n#endif\n\n#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \\\n    defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)\nextern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));\n#endif\n\n#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)\n/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */\nextern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,\n   png_uint_32 filler, int flags));\n/* The values of the PNG_FILLER_ defines should NOT be changed */\n#define PNG_FILLER_BEFORE 0\n#define PNG_FILLER_AFTER 1\n/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */\n#ifndef PNG_1_0_X\nextern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr,\n   png_uint_32 filler, int flags));\n#endif\n#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */\n\n#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)\n/* Swap bytes in 16-bit depth files. */\nextern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr));\n#endif\n\n#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)\n/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */\nextern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr));\n#endif\n\n#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)\n/* Swap packing order of pixels in bytes. */\nextern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr));\n#endif\n\n#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)\n/* Converts files to legal bit depths. */\nextern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr,\n   png_color_8p true_bits));\n#endif\n\n#if defined(PNG_READ_INTERLACING_SUPPORTED) || \\\n    defined(PNG_WRITE_INTERLACING_SUPPORTED)\n/* Have the code handle the interlacing.  Returns the number of passes. */\nextern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr));\n#endif\n\n#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)\n/* Invert monochrome files */\nextern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr));\n#endif\n\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n/* Handle alpha and tRNS by replacing with a background color. */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,\n   png_color_16p background_color, int background_gamma_code,\n   int need_expand, double background_gamma));\n#endif\n#define PNG_BACKGROUND_GAMMA_UNKNOWN 0\n#define PNG_BACKGROUND_GAMMA_SCREEN  1\n#define PNG_BACKGROUND_GAMMA_FILE    2\n#define PNG_BACKGROUND_GAMMA_UNIQUE  3\n#endif\n\n#ifdef PNG_READ_16_TO_8_SUPPORTED\n/* Strip the second byte of information from a 16-bit depth file. */\nextern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));\n#endif\n\n#ifdef PNG_READ_DITHER_SUPPORTED\n/* Turn on dithering, and reduce the palette to the number of colors available. */\nextern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr,\n   png_colorp palette, int num_palette, int maximum_colors,\n   png_uint_16p histogram, int full_dither));\n#endif\n\n#ifdef PNG_READ_GAMMA_SUPPORTED\n/* Handle gamma correction. Screen_gamma=(display_exponent) */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,\n   double screen_gamma, double default_file_gamma));\n#endif\n#endif\n\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\n#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \\\n    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)\n/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */\n/* Deprecated and will be removed.  Use png_permit_mng_features() instead. */\nextern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr,\n   int empty_plte_permitted)) PNG_DEPRECATED;\n#endif\n#endif\n\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\n/* Set how many lines between output flushes - 0 for no flushing */\nextern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows));\n/* Flush the current PNG output buffer */\nextern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr));\n#endif\n\n/* Optional update palette with requested transformations */\nextern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr));\n\n/* Optional call to update the users info structure */\nextern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr,\n   png_infop info_ptr));\n\n#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED\n/* Read one or more rows of image data. */\nextern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr,\n   png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));\n#endif\n\n#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED\n/* Read a row of data. */\nextern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr,\n   png_bytep row,\n   png_bytep display_row));\n#endif\n\n#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED\n/* Read the whole image into memory at once. */\nextern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr,\n   png_bytepp image));\n#endif\n\n/* Write a row of image data */\nextern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr,\n   png_bytep row));\n\n/* Write a few rows of image data */\nextern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr,\n   png_bytepp row, png_uint_32 num_rows));\n\n/* Write the image data */\nextern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,\n   png_bytepp image));\n\n/* Writes the end of the PNG file. */\nextern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,\n   png_infop info_ptr));\n\n#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED\n/* Read the end of the PNG file. */\nextern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr,\n   png_infop info_ptr));\n#endif\n\n/* Free any memory associated with the png_info_struct */\nextern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr,\n   png_infopp info_ptr_ptr));\n\n/* Free any memory associated with the png_struct and the png_info_structs */\nextern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp\n   png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));\n\n/* Free all memory used by the read (old method - NOT DLL EXPORTED) */\nextern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_infop end_info_ptr)) PNG_DEPRECATED;\n\n/* Free any memory associated with the png_struct and the png_info_structs */\nextern PNG_EXPORT(void,png_destroy_write_struct)\n   PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));\n\n/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */\nextern void png_write_destroy PNGARG((png_structp png_ptr)) PNG_DEPRECATED;\n\n/* Set the libpng method of handling chunk CRC errors */\nextern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,\n   int crit_action, int ancil_action));\n\n/* Values for png_set_crc_action() to say how to handle CRC errors in\n * ancillary and critical chunks, and whether to use the data contained\n * therein.  Note that it is impossible to \"discard\" data in a critical\n * chunk.  For versions prior to 0.90, the action was always error/quit,\n * whereas in version 0.90 and later, the action for CRC errors in ancillary\n * chunks is warn/discard.  These values should NOT be changed.\n *\n *      value                       action:critical     action:ancillary\n */\n#define PNG_CRC_DEFAULT       0  /* error/quit          warn/discard data */\n#define PNG_CRC_ERROR_QUIT    1  /* error/quit          error/quit        */\n#define PNG_CRC_WARN_DISCARD  2  /* (INVALID)           warn/discard data */\n#define PNG_CRC_WARN_USE      3  /* warn/use data       warn/use data     */\n#define PNG_CRC_QUIET_USE     4  /* quiet/use data      quiet/use data    */\n#define PNG_CRC_NO_CHANGE     5  /* use current value   use current value */\n\n/* These functions give the user control over the scan-line filtering in\n * libpng and the compression methods used by zlib.  These functions are\n * mainly useful for testing, as the defaults should work with most users.\n * Those users who are tight on memory or want faster performance at the\n * expense of compression can modify them.  See the compression library\n * header file (zlib.h) for an explination of the compression functions.\n */\n\n/* Set the filtering method(s) used by libpng.  Currently, the only valid\n * value for \"method\" is 0.\n */\nextern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,\n   int filters));\n\n/* Flags for png_set_filter() to say which filters to use.  The flags\n * are chosen so that they don't conflict with real filter types\n * below, in case they are supplied instead of the #defined constants.\n * These values should NOT be changed.\n */\n#define PNG_NO_FILTERS     0x00\n#define PNG_FILTER_NONE    0x08\n#define PNG_FILTER_SUB     0x10\n#define PNG_FILTER_UP      0x20\n#define PNG_FILTER_AVG     0x40\n#define PNG_FILTER_PAETH   0x80\n#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \\\n                         PNG_FILTER_AVG | PNG_FILTER_PAETH)\n\n/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.\n * These defines should NOT be changed.\n */\n#define PNG_FILTER_VALUE_NONE  0\n#define PNG_FILTER_VALUE_SUB   1\n#define PNG_FILTER_VALUE_UP    2\n#define PNG_FILTER_VALUE_AVG   3\n#define PNG_FILTER_VALUE_PAETH 4\n#define PNG_FILTER_VALUE_LAST  5\n\n#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */\n/* The \"heuristic_method\" is given by one of the PNG_FILTER_HEURISTIC_\n * defines, either the default (minimum-sum-of-absolute-differences), or\n * the experimental method (weighted-minimum-sum-of-absolute-differences).\n *\n * Weights are factors >= 1.0, indicating how important it is to keep the\n * filter type consistent between rows.  Larger numbers mean the current\n * filter is that many times as likely to be the same as the \"num_weights\"\n * previous filters.  This is cumulative for each previous row with a weight.\n * There needs to be \"num_weights\" values in \"filter_weights\", or it can be\n * NULL if the weights aren't being specified.  Weights have no influence on\n * the selection of the first row filter.  Well chosen weights can (in theory)\n * improve the compression for a given image.\n *\n * Costs are factors >= 1.0 indicating the relative decoding costs of a\n * filter type.  Higher costs indicate more decoding expense, and are\n * therefore less likely to be selected over a filter with lower computational\n * costs.  There needs to be a value in \"filter_costs\" for each valid filter\n * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't\n * setting the costs.  Costs try to improve the speed of decompression without\n * unduly increasing the compressed image size.\n *\n * A negative weight or cost indicates the default value is to be used, and\n * values in the range [0.0, 1.0) indicate the value is to remain unchanged.\n * The default values for both weights and costs are currently 1.0, but may\n * change if good general weighting/cost heuristics can be found.  If both\n * the weights and costs are set to 1.0, this degenerates the WEIGHTED method\n * to the UNWEIGHTED method, but with added encoding time/computation.\n */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,\n   int heuristic_method, int num_weights, png_doublep filter_weights,\n   png_doublep filter_costs));\n#endif\n#endif /*  PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */\n\n/* Heuristic used for row filter selection.  These defines should NOT be\n * changed.\n */\n#define PNG_FILTER_HEURISTIC_DEFAULT    0  /* Currently \"UNWEIGHTED\" */\n#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1  /* Used by libpng < 0.95 */\n#define PNG_FILTER_HEURISTIC_WEIGHTED   2  /* Experimental feature */\n#define PNG_FILTER_HEURISTIC_LAST       3  /* Not a valid value */\n\n/* Set the library compression level.  Currently, valid values range from\n * 0 - 9, corresponding directly to the zlib compression levels 0 - 9\n * (0 - no compression, 9 - \"maximal\" compression).  Note that tests have\n * shown that zlib compression levels 3-6 usually perform as well as level 9\n * for PNG images, and do considerably fewer caclulations.  In the future,\n * these values may not correspond directly to the zlib compression levels.\n */\nextern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr,\n   int level));\n\nextern PNG_EXPORT(void,png_set_compression_mem_level)\n   PNGARG((png_structp png_ptr, int mem_level));\n\nextern PNG_EXPORT(void,png_set_compression_strategy)\n   PNGARG((png_structp png_ptr, int strategy));\n\nextern PNG_EXPORT(void,png_set_compression_window_bits)\n   PNGARG((png_structp png_ptr, int window_bits));\n\nextern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr,\n   int method));\n\n/* These next functions are called for input/output, memory, and error\n * handling.  They are in the file pngrio.c, pngwio.c, and pngerror.c,\n * and call standard C I/O routines such as fread(), fwrite(), and\n * fprintf().  These functions can be made to use other I/O routines\n * at run time for those applications that need to handle I/O in a\n * different manner by calling png_set_???_fn().  See libpng.txt for\n * more information.\n */\n\n#ifdef PNG_STDIO_SUPPORTED\n/* Initialize the input/output for the PNG file to the default functions. */\nextern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp));\n#endif\n\n/* Replace the (error and abort), and warning functions with user\n * supplied functions.  If no messages are to be printed you must still\n * write and use replacement functions. The replacement error_fn should\n * still do a longjmp to the last setjmp location if you are using this\n * method of error handling.  If error_fn or warning_fn is NULL, the\n * default function will be used.\n */\n\nextern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr,\n   png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));\n\n/* Return the user pointer associated with the error functions */\nextern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));\n\n/* Replace the default data output functions with a user supplied one(s).\n * If buffered output is not used, then output_flush_fn can be set to NULL.\n * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time\n * output_flush_fn will be ignored (and thus can be NULL).\n * It is probably a mistake to use NULL for output_flush_fn if\n * write_data_fn is not also NULL unless you have built libpng with\n * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's\n * default flush function, which uses the standard *FILE structure, will\n * be used.\n */\nextern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr,\n   png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));\n\n/* Replace the default data input function with a user supplied one. */\nextern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr,\n   png_voidp io_ptr, png_rw_ptr read_data_fn));\n\n/* Return the user pointer associated with the I/O functions */\nextern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr));\n\nextern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr,\n   png_read_status_ptr read_row_fn));\n\nextern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr,\n   png_write_status_ptr write_row_fn));\n\n#ifdef PNG_USER_MEM_SUPPORTED\n/* Replace the default memory allocation functions with user supplied one(s). */\nextern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,\n   png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));\n/* Return the user pointer associated with the memory functions */\nextern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr));\n#endif\n\n#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_LEGACY_SUPPORTED)\nextern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp\n   png_ptr, png_user_transform_ptr read_user_transform_fn));\n#endif\n\n#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_LEGACY_SUPPORTED)\nextern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp\n   png_ptr, png_user_transform_ptr write_user_transform_fn));\n#endif\n\n#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_LEGACY_SUPPORTED)\nextern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp\n   png_ptr, png_voidp user_transform_ptr, int user_transform_depth,\n   int user_transform_channels));\n/* Return the user pointer associated with the user transform functions */\nextern PNG_EXPORT(png_voidp,png_get_user_transform_ptr)\n   PNGARG((png_structp png_ptr));\n#endif\n\n#ifdef PNG_USER_CHUNKS_SUPPORTED\nextern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr,\n   png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));\nextern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp\n   png_ptr));\n#endif\n\n#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\n/* Sets the function callbacks for the push reader, and a pointer to a\n * user-defined structure available to the callback functions.\n */\nextern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr,\n   png_voidp progressive_ptr,\n   png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,\n   png_progressive_end_ptr end_fn));\n\n/* Returns the user pointer associated with the push read functions */\nextern PNG_EXPORT(png_voidp,png_get_progressive_ptr)\n   PNGARG((png_structp png_ptr));\n\n/* Function to be called when data becomes available */\nextern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));\n\n/* Function that combines rows.  Not very much different than the\n * png_combine_row() call.  Is this even used?????\n */\nextern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,\n   png_bytep old_row, png_bytep new_row));\n#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */\n\nextern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,\n   png_uint_32 size)) PNG_ALLOCATED;\n\n#ifdef PNG_1_0_X\n#  define png_malloc_warn png_malloc\n#else\n/* Added at libpng version 1.2.4 */\nextern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,\n   png_uint_32 size)) PNG_ALLOCATED;\n#endif\n\n/* Frees a pointer allocated by png_malloc() */\nextern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));\n\n#ifdef PNG_1_0_X\n/* Function to allocate memory for zlib. */\nextern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items,\n   uInt size));\n\n/* Function to free memory for zlib */\nextern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr));\n#endif\n\n/* Free data that was allocated internally */\nextern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 free_me, int num));\n#ifdef PNG_FREE_ME_SUPPORTED\n/* Reassign responsibility for freeing existing data, whether allocated\n * by libpng or by the application\n */\nextern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, int freer, png_uint_32 mask));\n#endif\n/* Assignments for png_data_freer */\n#define PNG_DESTROY_WILL_FREE_DATA 1\n#define PNG_SET_WILL_FREE_DATA 1\n#define PNG_USER_WILL_FREE_DATA 2\n/* Flags for png_ptr->free_me and info_ptr->free_me */\n#define PNG_FREE_HIST 0x0008\n#define PNG_FREE_ICCP 0x0010\n#define PNG_FREE_SPLT 0x0020\n#define PNG_FREE_ROWS 0x0040\n#define PNG_FREE_PCAL 0x0080\n#define PNG_FREE_SCAL 0x0100\n#define PNG_FREE_UNKN 0x0200\n#define PNG_FREE_LIST 0x0400\n#define PNG_FREE_PLTE 0x1000\n#define PNG_FREE_TRNS 0x2000\n#define PNG_FREE_TEXT 0x4000\n#define PNG_FREE_ALL  0x7fff\n#define PNG_FREE_MUL  0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */\n\n#ifdef PNG_USER_MEM_SUPPORTED\nextern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr,\n   png_uint_32 size)) PNG_ALLOCATED;\nextern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr,\n   png_voidp ptr));\n#endif\n\nextern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr,\n   png_voidp s1, png_voidp s2, png_uint_32 size)) PNG_DEPRECATED;\n\nextern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr,\n   png_voidp s1, int value, png_uint_32 size)) PNG_DEPRECATED;\n\n#if defined(USE_FAR_KEYWORD)  /* memory model conversion function */\nextern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,\n   int check));\n#endif /* USE_FAR_KEYWORD */\n\n#ifndef PNG_NO_ERROR_TEXT\n/* Fatal error in PNG image of libpng - can't continue */\nextern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,\n   png_const_charp error_message)) PNG_NORETURN;\n\n/* The same, but the chunk name is prepended to the error string. */\nextern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr,\n   png_const_charp error_message)) PNG_NORETURN;\n#else\n/* Fatal error in PNG image of libpng - can't continue */\nextern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN;\n#endif\n\n#ifndef PNG_NO_WARNINGS\n/* Non-fatal error in libpng.  Can continue, but may have a problem. */\nextern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,\n   png_const_charp warning_message));\n\n#ifdef PNG_READ_SUPPORTED\n/* Non-fatal error in libpng, chunk name is prepended to message. */\nextern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,\n   png_const_charp warning_message));\n#endif /* PNG_READ_SUPPORTED */\n#endif /* PNG_NO_WARNINGS */\n\n/* The png_set_<chunk> functions are for storing values in the png_info_struct.\n * Similarly, the png_get_<chunk> calls are used to read values from the\n * png_info_struct, either storing the parameters in the passed variables, or\n * setting pointers into the png_info_struct where the data is stored.  The\n * png_get_<chunk> functions return a non-zero value if the data was available\n * in info_ptr, or return zero and do not change any of the parameters if the\n * data was not available.\n *\n * These functions should be used instead of directly accessing png_info\n * to avoid problems with future changes in the size and internal layout of\n * png_info_struct.\n */\n/* Returns \"flag\" if chunk data is valid in info_ptr. */\nextern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr,\npng_infop info_ptr, png_uint_32 flag));\n\n/* Returns number of bytes needed to hold a transformed row. */\nextern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr,\npng_infop info_ptr));\n\n#ifdef PNG_INFO_IMAGE_SUPPORTED\n/* Returns row_pointers, which is an array of pointers to scanlines that was\n * returned from png_read_png().\n */\nextern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr,\npng_infop info_ptr));\n/* Set row_pointers, which is an array of pointers to scanlines for use\n * by png_write_png().\n */\nextern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_bytepp row_pointers));\n#endif\n\n/* Returns number of color channels in image. */\nextern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr,\npng_infop info_ptr));\n\n#ifdef PNG_EASY_ACCESS_SUPPORTED\n/* Returns image width in pixels. */\nextern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n\n/* Returns image height in pixels. */\nextern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n\n/* Returns image bit_depth. */\nextern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n\n/* Returns image color_type. */\nextern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n\n/* Returns image filter_type. */\nextern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n\n/* Returns image interlace_type. */\nextern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n\n/* Returns image compression_type. */\nextern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n\n/* Returns image resolution in pixels per meter, from pHYs chunk data. */\nextern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\nextern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\nextern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n\n/* Returns pixel aspect ratio, computed from pHYs chunk data.  */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n#endif\n\n/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */\nextern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\nextern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\nextern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\nextern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp\npng_ptr, png_infop info_ptr));\n\n#endif /* PNG_EASY_ACCESS_SUPPORTED */\n\n/* Returns pointer to signature string read from PNG header */\nextern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr,\npng_infop info_ptr));\n\n#ifdef PNG_bKGD_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_color_16p *background));\n#endif\n\n#ifdef PNG_bKGD_SUPPORTED\nextern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_color_16p background));\n#endif\n\n#ifdef PNG_cHRM_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, double *white_x, double *white_y, double *red_x,\n   double *red_y, double *green_x, double *green_y, double *blue_x,\n   double *blue_y));\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point\n   *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y,\n   png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point\n   *int_blue_x, png_fixed_point *int_blue_y));\n#endif\n#endif\n\n#ifdef PNG_cHRM_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, double white_x, double white_y, double red_x,\n   double red_y, double green_x, double green_y, double blue_x, double blue_y));\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\nextern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y,\n   png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point\n   int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,\n   png_fixed_point int_blue_y));\n#endif\n#endif\n\n#ifdef PNG_gAMA_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, double *file_gamma));\n#endif\nextern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_fixed_point *int_file_gamma));\n#endif\n\n#ifdef PNG_gAMA_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, double file_gamma));\n#endif\nextern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_fixed_point int_file_gamma));\n#endif\n\n#ifdef PNG_hIST_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_16p *hist));\n#endif\n\n#ifdef PNG_hIST_SUPPORTED\nextern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_16p hist));\n#endif\n\nextern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 *width, png_uint_32 *height,\n   int *bit_depth, int *color_type, int *interlace_method,\n   int *compression_method, int *filter_method));\n\nextern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,\n   int color_type, int interlace_method, int compression_method,\n   int filter_method));\n\n#ifdef PNG_oFFs_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,\n   int *unit_type));\n#endif\n\n#ifdef PNG_oFFs_SUPPORTED\nextern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,\n   int unit_type));\n#endif\n\n#ifdef PNG_pCAL_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,\n   int *type, int *nparams, png_charp *units, png_charpp *params));\n#endif\n\n#ifdef PNG_pCAL_SUPPORTED\nextern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,\n   int type, int nparams, png_charp units, png_charpp params));\n#endif\n\n#ifdef PNG_pHYs_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));\n#endif\n\n#ifdef PNG_pHYs_SUPPORTED\nextern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));\n#endif\n\nextern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_colorp *palette, int *num_palette));\n\nextern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_colorp palette, int num_palette));\n\n#ifdef PNG_sBIT_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_color_8p *sig_bit));\n#endif\n\n#ifdef PNG_sBIT_SUPPORTED\nextern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_color_8p sig_bit));\n#endif\n\n#ifdef PNG_sRGB_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, int *intent));\n#endif\n\n#ifdef PNG_sRGB_SUPPORTED\nextern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, int intent));\nextern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, int intent));\n#endif\n\n#ifdef PNG_iCCP_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_charpp name, int *compression_type,\n   png_charpp profile, png_uint_32 *proflen));\n   /* Note to maintainer: profile should be png_bytepp */\n#endif\n\n#ifdef PNG_iCCP_SUPPORTED\nextern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_charp name, int compression_type,\n   png_charp profile, png_uint_32 proflen));\n   /* Note to maintainer: profile should be png_bytep */\n#endif\n\n#ifdef PNG_sPLT_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_sPLT_tpp entries));\n#endif\n\n#ifdef PNG_sPLT_SUPPORTED\nextern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_sPLT_tp entries, int nentries));\n#endif\n\n#ifdef PNG_TEXT_SUPPORTED\n/* png_get_text also returns the number of text chunks in *num_text */\nextern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_textp *text_ptr, int *num_text));\n#endif\n\n/*\n *  Note while png_set_text() will accept a structure whose text,\n *  language, and  translated keywords are NULL pointers, the structure\n *  returned by png_get_text will always contain regular\n *  zero-terminated C strings.  They might be empty strings but\n *  they will never be NULL pointers.\n */\n\n#ifdef PNG_TEXT_SUPPORTED\nextern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_textp text_ptr, int num_text));\n#endif\n\n#ifdef PNG_tIME_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_timep *mod_time));\n#endif\n\n#ifdef PNG_tIME_SUPPORTED\nextern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_timep mod_time));\n#endif\n\n#ifdef PNG_tRNS_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_bytep *trans, int *num_trans,\n   png_color_16p *trans_values));\n#endif\n\n#ifdef PNG_tRNS_SUPPORTED\nextern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_bytep trans, int num_trans,\n   png_color_16p trans_values));\n#endif\n\n#ifdef PNG_tRNS_SUPPORTED\n#endif\n\n#ifdef PNG_sCAL_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, int *unit, double *width, double *height));\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));\n#endif\n#endif\n#endif /* PNG_sCAL_SUPPORTED */\n\n#ifdef PNG_sCAL_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nextern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, int unit, double width, double height));\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\nextern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));\n#endif\n#endif\n#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */\n\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n/* Provide a list of chunks and how they are to be handled, if the built-in\n   handling or default unknown chunk handling is not desired.  Any chunks not\n   listed will be handled in the default manner.  The IHDR and IEND chunks\n   must not be listed.\n      keep = 0: follow default behaviour\n           = 1: do not keep\n           = 2: keep only if safe-to-copy\n           = 3: keep even if unsafe-to-copy\n*/\nextern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp\n   png_ptr, int keep, png_bytep chunk_list, int num_chunks));\nPNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep\n   chunk_name));\n#endif\n#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\nextern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));\nextern PNG_EXPORT(void, png_set_unknown_chunk_location)\n   PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));\nextern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp\n   png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));\n#endif\n\n/* Png_free_data() will turn off the \"valid\" flag for anything it frees.\n * If you need to turn it off for a chunk that your application has freed,\n * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK);\n */\nextern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,\n   png_infop info_ptr, int mask));\n\n#ifdef PNG_INFO_IMAGE_SUPPORTED\n/* The \"params\" pointer is currently not used and is for future expansion. */\nextern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,\n                        png_infop info_ptr,\n                        int transforms,\n                        png_voidp params));\nextern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,\n                        png_infop info_ptr,\n                        int transforms,\n                        png_voidp params));\n#endif\n\n/* Define PNG_DEBUG at compile time for debugging information.  Higher\n * numbers for PNG_DEBUG mean more debugging information.  This has\n * only been added since version 0.95 so it is not implemented throughout\n * libpng yet, but more support will be added as needed.\n */\n#ifdef PNG_DEBUG\n#if (PNG_DEBUG > 0)\n#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)\n#include <crtdbg.h>\n#if (PNG_DEBUG > 1)\n#ifndef _DEBUG\n#  define _DEBUG\n#endif\n#ifndef png_debug\n#define png_debug(l,m)  _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)\n#endif\n#ifndef png_debug1\n#define png_debug1(l,m,p1)  _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)\n#endif\n#ifndef png_debug2\n#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)\n#endif\n#endif\n#else /* PNG_DEBUG_FILE || !_MSC_VER */\n#ifndef PNG_DEBUG_FILE\n#define PNG_DEBUG_FILE stderr\n#endif /* PNG_DEBUG_FILE */\n\n#if (PNG_DEBUG > 1)\n/* Note: [\"%s\"m PNG_STRING_NEWLINE] probably does not work on non-ISO\n * compilers.\n */\n#  ifdef __STDC__\n#    ifndef png_debug\n#      define png_debug(l,m) \\\n       { \\\n       int num_tabs=l; \\\n       fprintf(PNG_DEBUG_FILE,\"%s\"m PNG_STRING_NEWLINE,(num_tabs==1 ? \"\\t\" : \\\n         (num_tabs==2 ? \"\\t\\t\":(num_tabs>2 ? \"\\t\\t\\t\":\"\")))); \\\n       }\n#    endif\n#    ifndef png_debug1\n#      define png_debug1(l,m,p1) \\\n       { \\\n       int num_tabs=l; \\\n       fprintf(PNG_DEBUG_FILE,\"%s\"m PNG_STRING_NEWLINE,(num_tabs==1 ? \"\\t\" : \\\n         (num_tabs==2 ? \"\\t\\t\":(num_tabs>2 ? \"\\t\\t\\t\":\"\"))),p1); \\\n       }\n#    endif\n#    ifndef png_debug2\n#      define png_debug2(l,m,p1,p2) \\\n       { \\\n       int num_tabs=l; \\\n       fprintf(PNG_DEBUG_FILE,\"%s\"m PNG_STRING_NEWLINE,(num_tabs==1 ? \"\\t\" : \\\n         (num_tabs==2 ? \"\\t\\t\":(num_tabs>2 ? \"\\t\\t\\t\":\"\"))),p1,p2); \\\n       }\n#    endif\n#  else /* __STDC __ */\n#    ifndef png_debug\n#      define png_debug(l,m) \\\n       { \\\n       int num_tabs=l; \\\n       char format[256]; \\\n       snprintf(format,256,\"%s%s%s\",(num_tabs==1 ? \"\\t\" : \\\n         (num_tabs==2 ? \"\\t\\t\":(num_tabs>2 ? \"\\t\\t\\t\":\"\"))), \\\n         m,PNG_STRING_NEWLINE); \\\n       fprintf(PNG_DEBUG_FILE,format); \\\n       }\n#    endif\n#    ifndef png_debug1\n#      define png_debug1(l,m,p1) \\\n       { \\\n       int num_tabs=l; \\\n       char format[256]; \\\n       snprintf(format,256,\"%s%s%s\",(num_tabs==1 ? \"\\t\" : \\\n         (num_tabs==2 ? \"\\t\\t\":(num_tabs>2 ? \"\\t\\t\\t\":\"\"))), \\\n         m,PNG_STRING_NEWLINE); \\\n       fprintf(PNG_DEBUG_FILE,format,p1); \\\n       }\n#    endif\n#    ifndef png_debug2\n#      define png_debug2(l,m,p1,p2) \\\n       { \\\n       int num_tabs=l; \\\n       char format[256]; \\\n       snprintf(format,256,\"%s%s%s\",(num_tabs==1 ? \"\\t\" : \\\n         (num_tabs==2 ? \"\\t\\t\":(num_tabs>2 ? \"\\t\\t\\t\":\"\"))), \\\n         m,PNG_STRING_NEWLINE); \\\n       fprintf(PNG_DEBUG_FILE,format,p1,p2); \\\n       }\n#    endif\n#  endif /* __STDC __ */\n#endif /* (PNG_DEBUG > 1) */\n\n#endif /* _MSC_VER */\n#endif /* (PNG_DEBUG > 0) */\n#endif /* PNG_DEBUG */\n#ifndef png_debug\n#define png_debug(l, m)\n#endif\n#ifndef png_debug1\n#define png_debug1(l, m, p1)\n#endif\n#ifndef png_debug2\n#define png_debug2(l, m, p1, p2)\n#endif\n\nextern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));\nextern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));\nextern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr));\nextern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));\n\n#ifdef PNG_MNG_FEATURES_SUPPORTED\nextern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp\n   png_ptr, png_uint_32 mng_features_permitted));\n#endif\n\n/* For use in png_set_keep_unknown, added to version 1.2.6 */\n#define PNG_HANDLE_CHUNK_AS_DEFAULT   0\n#define PNG_HANDLE_CHUNK_NEVER        1\n#define PNG_HANDLE_CHUNK_IF_SAFE      2\n#define PNG_HANDLE_CHUNK_ALWAYS       3\n\n/* Added to version 1.2.0 */\n#ifdef PNG_ASSEMBLER_CODE_SUPPORTED\n#ifdef PNG_MMX_CODE_SUPPORTED\n#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED  0x01  /* not user-settable */\n#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU    0x02  /* not user-settable */\n#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  0x04\n#define PNG_ASM_FLAG_MMX_READ_INTERLACE    0x08\n#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB   0x10\n#define PNG_ASM_FLAG_MMX_READ_FILTER_UP    0x20\n#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG   0x40\n#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80\n#define PNG_ASM_FLAGS_INITIALIZED          0x80000000  /* not user-settable */\n\n#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \\\n                           | PNG_ASM_FLAG_MMX_READ_INTERLACE    \\\n                           | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \\\n                           | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \\\n                           | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \\\n                           | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )\n#define PNG_MMX_WRITE_FLAGS ( 0 )\n\n#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \\\n                      | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU   \\\n                      | PNG_MMX_READ_FLAGS                \\\n                      | PNG_MMX_WRITE_FLAGS )\n\n#define PNG_SELECT_READ   1\n#define PNG_SELECT_WRITE  2\n#endif /* PNG_MMX_CODE_SUPPORTED */\n\n#ifndef PNG_1_0_X\n/* pngget.c */\nextern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask)\n   PNGARG((int flag_select, int *compilerID));\n\n/* pngget.c */\nextern PNG_EXPORT(png_uint_32,png_get_asm_flagmask)\n   PNGARG((int flag_select));\n\n/* pngget.c */\nextern PNG_EXPORT(png_uint_32,png_get_asm_flags)\n   PNGARG((png_structp png_ptr));\n\n/* pngget.c */\nextern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold)\n   PNGARG((png_structp png_ptr));\n\n/* pngget.c */\nextern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold)\n   PNGARG((png_structp png_ptr));\n\n/* pngset.c */\nextern PNG_EXPORT(void,png_set_asm_flags)\n   PNGARG((png_structp png_ptr, png_uint_32 asm_flags));\n\n/* pngset.c */\nextern PNG_EXPORT(void,png_set_mmx_thresholds)\n   PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold,\n   png_uint_32 mmx_rowbytes_threshold));\n\n#endif /* PNG_1_0_X */\n\n#ifndef PNG_1_0_X\n/* png.c, pnggccrd.c, or pngvcrd.c */\nextern PNG_EXPORT(int,png_mmx_support) PNGARG((void));\n#endif /* PNG_1_0_X */\n#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */\n\n/* Strip the prepended error numbers (\"#nnn \") from error and warning\n * messages before passing them to the error or warning handler.\n */\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\nextern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp\n   png_ptr, png_uint_32 strip_mode));\n#endif\n\n/* Added at libpng-1.2.6 */\n#ifdef PNG_SET_USER_LIMITS_SUPPORTED\nextern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp\n   png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));\nextern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp\n   png_ptr));\nextern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp\n   png_ptr));\n#endif\n/* Maintainer: Put new public prototypes here ^, in libpng.3, and in\n * project defs\n */\n\n#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED\n/* With these routines we avoid an integer divide, which will be slower on\n * most machines.  However, it does take more operations than the corresponding\n * divide method, so it may be slower on a few RISC systems.  There are two\n * shifts (by 8 or 16 bits) and an addition, versus a single integer divide.\n *\n * Note that the rounding factors are NOT supposed to be the same!  128 and\n * 32768 are correct for the NODIV code; 127 and 32767 are correct for the\n * standard method.\n *\n * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ]\n */\n\n /* fg and bg should be in `gamma 1.0' space; alpha is the opacity          */\n\n#  define png_composite(composite, fg, alpha, bg)                            \\\n     { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \\\n                        +        (png_uint_16)(bg)*(png_uint_16)(255 -       \\\n                        (png_uint_16)(alpha)) + (png_uint_16)128);           \\\n       (composite) = (png_byte)((temp + (temp >> 8)) >> 8); }\n\n#  define png_composite_16(composite, fg, alpha, bg)                         \\\n     { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \\\n                        + (png_uint_32)(bg)*(png_uint_32)(65535L -           \\\n                        (png_uint_32)(alpha)) + (png_uint_32)32768L);        \\\n       (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }\n\n#else  /* Standard method using integer division */\n\n#  define png_composite(composite, fg, alpha, bg)                            \\\n     (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) +    \\\n       (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) +       \\\n       (png_uint_16)127) / 255)\n\n#  define png_composite_16(composite, fg, alpha, bg)                         \\\n     (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \\\n       (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) +      \\\n       (png_uint_32)32767) / (png_uint_32)65535L)\n\n#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */\n\n/* Inline macros to do direct reads of bytes from the input buffer.  These\n * require that you are using an architecture that uses PNG byte ordering\n * (MSB first) and supports unaligned data storage.  I think that PowerPC\n * in big-endian mode and 680x0 are the only ones that will support this.\n * The x86 line of processors definitely do not.  The png_get_int_32()\n * routine also assumes we are using two's complement format for negative\n * values, which is almost certainly true.\n */\n#ifdef PNG_READ_BIG_ENDIAN_SUPPORTED\n#  define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))\n#  define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))\n#  define png_get_int_32(buf)  ( *((png_int_32p)  (buf)))\n#else\nextern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf));\nextern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf));\nextern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf));\n#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */\nextern PNG_EXPORT(png_uint_32,png_get_uint_31)\n  PNGARG((png_structp png_ptr, png_bytep buf));\n/* No png_get_int_16 -- may be added if there's a real need for it. */\n\n/* Place a 32-bit number into a buffer in PNG byte order (big-endian).\n */\nextern PNG_EXPORT(void,png_save_uint_32)\n   PNGARG((png_bytep buf, png_uint_32 i));\nextern PNG_EXPORT(void,png_save_int_32)\n   PNGARG((png_bytep buf, png_int_32 i));\n\n/* Place a 16-bit number into a buffer in PNG byte order.\n * The parameter is declared unsigned int, not png_uint_16,\n * just to avoid potential problems on pre-ANSI C compilers.\n */\nextern PNG_EXPORT(void,png_save_uint_16)\n   PNGARG((png_bytep buf, unsigned int i));\n/* No png_save_int_16 -- may be added if there's a real need for it. */\n\n/* ************************************************************************* */\n\n/* These next functions are used internally in the code.  They generally\n * shouldn't be used unless you are writing code to add or replace some\n * functionality in libpng.  More information about most functions can\n * be found in the files where the functions are located.\n */\n\n\n/* Various modes of operation, that are visible to applications because\n * they are used for unknown chunk location.\n */\n#define PNG_HAVE_IHDR               0x01\n#define PNG_HAVE_PLTE               0x02\n#define PNG_HAVE_IDAT               0x04\n#define PNG_AFTER_IDAT              0x08 /* Have complete zlib datastream */\n#define PNG_HAVE_IEND               0x10\n\n#ifdef PNG_INTERNAL\n\n/* More modes of operation.  Note that after an init, mode is set to\n * zero automatically when the structure is created.\n */\n#define PNG_HAVE_gAMA               0x20\n#define PNG_HAVE_cHRM               0x40\n#define PNG_HAVE_sRGB               0x80\n#define PNG_HAVE_CHUNK_HEADER      0x100\n#define PNG_WROTE_tIME             0x200\n#define PNG_WROTE_INFO_BEFORE_PLTE 0x400\n#define PNG_BACKGROUND_IS_GRAY     0x800\n#define PNG_HAVE_PNG_SIGNATURE    0x1000\n#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */\n\n/* Flags for the transformations the PNG library does on the image data */\n#define PNG_BGR                0x0001\n#define PNG_INTERLACE          0x0002\n#define PNG_PACK               0x0004\n#define PNG_SHIFT              0x0008\n#define PNG_SWAP_BYTES         0x0010\n#define PNG_INVERT_MONO        0x0020\n#define PNG_DITHER             0x0040\n#define PNG_BACKGROUND         0x0080\n#define PNG_BACKGROUND_EXPAND  0x0100\n                          /*   0x0200 unused */\n#define PNG_16_TO_8            0x0400\n#define PNG_RGBA               0x0800\n#define PNG_EXPAND             0x1000\n#define PNG_GAMMA              0x2000\n#define PNG_GRAY_TO_RGB        0x4000\n#define PNG_FILLER             0x8000L\n#define PNG_PACKSWAP          0x10000L\n#define PNG_SWAP_ALPHA        0x20000L\n#define PNG_STRIP_ALPHA       0x40000L\n#define PNG_INVERT_ALPHA      0x80000L\n#define PNG_USER_TRANSFORM   0x100000L\n#define PNG_RGB_TO_GRAY_ERR  0x200000L\n#define PNG_RGB_TO_GRAY_WARN 0x400000L\n#define PNG_RGB_TO_GRAY      0x600000L  /* two bits, RGB_TO_GRAY_ERR|WARN */\n                       /*    0x800000L     Unused */\n#define PNG_ADD_ALPHA       0x1000000L  /* Added to libpng-1.2.7 */\n#define PNG_EXPAND_tRNS     0x2000000L  /* Added to libpng-1.2.9 */\n#define PNG_PREMULTIPLY_ALPHA 0x4000000L  /* Added to libpng-1.2.41 */\n                                          /* by volker */\n                       /*   0x8000000L  unused */\n                       /*  0x10000000L  unused */\n                       /*  0x20000000L  unused */\n                       /*  0x40000000L  unused */\n\n/* Flags for png_create_struct */\n#define PNG_STRUCT_PNG   0x0001\n#define PNG_STRUCT_INFO  0x0002\n\n/* Scaling factor for filter heuristic weighting calculations */\n#define PNG_WEIGHT_SHIFT 8\n#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))\n#define PNG_COST_SHIFT 3\n#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))\n\n/* Flags for the png_ptr->flags rather than declaring a byte for each one */\n#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY     0x0001\n#define PNG_FLAG_ZLIB_CUSTOM_LEVEL        0x0002\n#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL    0x0004\n#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS  0x0008\n#define PNG_FLAG_ZLIB_CUSTOM_METHOD       0x0010\n#define PNG_FLAG_ZLIB_FINISHED            0x0020\n#define PNG_FLAG_ROW_INIT                 0x0040\n#define PNG_FLAG_FILLER_AFTER             0x0080\n#define PNG_FLAG_CRC_ANCILLARY_USE        0x0100\n#define PNG_FLAG_CRC_ANCILLARY_NOWARN     0x0200\n#define PNG_FLAG_CRC_CRITICAL_USE         0x0400\n#define PNG_FLAG_CRC_CRITICAL_IGNORE      0x0800\n#define PNG_FLAG_FREE_PLTE                0x1000\n#define PNG_FLAG_FREE_TRNS                0x2000\n#define PNG_FLAG_FREE_HIST                0x4000\n#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS      0x8000L\n#define PNG_FLAG_KEEP_UNSAFE_CHUNKS       0x10000L\n#define PNG_FLAG_LIBRARY_MISMATCH         0x20000L\n#define PNG_FLAG_STRIP_ERROR_NUMBERS      0x40000L\n#define PNG_FLAG_STRIP_ERROR_TEXT         0x80000L\n#define PNG_FLAG_MALLOC_NULL_MEM_OK       0x100000L\n#define PNG_FLAG_ADD_ALPHA                0x200000L  /* Added to libpng-1.2.8 */\n#define PNG_FLAG_STRIP_ALPHA              0x400000L  /* Added to libpng-1.2.8 */\n                                  /*      0x800000L  unused */\n                                  /*     0x1000000L  unused */\n                                  /*     0x2000000L  unused */\n                                  /*     0x4000000L  unused */\n                                  /*     0x8000000L  unused */\n                                  /*    0x10000000L  unused */\n                                  /*    0x20000000L  unused */\n                                  /*    0x40000000L  unused */\n\n#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \\\n                                     PNG_FLAG_CRC_ANCILLARY_NOWARN)\n\n#define PNG_FLAG_CRC_CRITICAL_MASK  (PNG_FLAG_CRC_CRITICAL_USE | \\\n                                     PNG_FLAG_CRC_CRITICAL_IGNORE)\n\n#define PNG_FLAG_CRC_MASK           (PNG_FLAG_CRC_ANCILLARY_MASK | \\\n                                     PNG_FLAG_CRC_CRITICAL_MASK)\n\n/* Save typing and make code easier to understand */\n\n#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \\\n   abs((int)((c1).green) - (int)((c2).green)) + \\\n   abs((int)((c1).blue) - (int)((c2).blue)))\n\n/* Added to libpng-1.2.6 JB */\n#define PNG_ROWBYTES(pixel_bits, width) \\\n    ((pixel_bits) >= 8 ? \\\n    ((width) * (((png_uint_32)(pixel_bits)) >> 3)) : \\\n    (( ((width) * ((png_uint_32)(pixel_bits))) + 7) >> 3) )\n\n/* PNG_OUT_OF_RANGE returns true if value is outside the range\n * ideal-delta..ideal+delta.  Each argument is evaluated twice.\n * \"ideal\" and \"delta\" should be constants, normally simple\n * integers, \"value\" a variable. Added to libpng-1.2.6 JB\n */\n#define PNG_OUT_OF_RANGE(value, ideal, delta) \\\n        ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )\n\n/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */\n#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)\n/* Place to hold the signature string for a PNG file. */\n#ifdef PNG_USE_GLOBAL_ARRAYS\n   PNG_EXPORT_VAR (PNG_CONST png_byte FARDATA) png_sig[8];\n#else\n#endif\n#endif /* PNG_NO_EXTERN */\n\n/* Constant strings for known chunk types.  If you need to add a chunk,\n * define the name here, and add an invocation of the macro in png.c and\n * wherever it's needed.\n */\n#define PNG_IHDR png_byte png_IHDR[5] = { 73,  72,  68,  82, '\\0'}\n#define PNG_IDAT png_byte png_IDAT[5] = { 73,  68,  65,  84, '\\0'}\n#define PNG_IEND png_byte png_IEND[5] = { 73,  69,  78,  68, '\\0'}\n#define PNG_PLTE png_byte png_PLTE[5] = { 80,  76,  84,  69, '\\0'}\n#define PNG_bKGD png_byte png_bKGD[5] = { 98,  75,  71,  68, '\\0'}\n#define PNG_cHRM png_byte png_cHRM[5] = { 99,  72,  82,  77, '\\0'}\n#define PNG_gAMA png_byte png_gAMA[5] = {103,  65,  77,  65, '\\0'}\n#define PNG_hIST png_byte png_hIST[5] = {104,  73,  83,  84, '\\0'}\n#define PNG_iCCP png_byte png_iCCP[5] = {105,  67,  67,  80, '\\0'}\n#define PNG_iTXt png_byte png_iTXt[5] = {105,  84,  88, 116, '\\0'}\n#define PNG_oFFs png_byte png_oFFs[5] = {111,  70,  70, 115, '\\0'}\n#define PNG_pCAL png_byte png_pCAL[5] = {112,  67,  65,  76, '\\0'}\n#define PNG_sCAL png_byte png_sCAL[5] = {115,  67,  65,  76, '\\0'}\n#define PNG_pHYs png_byte png_pHYs[5] = {112,  72,  89, 115, '\\0'}\n#define PNG_sBIT png_byte png_sBIT[5] = {115,  66,  73,  84, '\\0'}\n#define PNG_sPLT png_byte png_sPLT[5] = {115,  80,  76,  84, '\\0'}\n#define PNG_sRGB png_byte png_sRGB[5] = {115,  82,  71,  66, '\\0'}\n#define PNG_tEXt png_byte png_tEXt[5] = {116,  69,  88, 116, '\\0'}\n#define PNG_tIME png_byte png_tIME[5] = {116,  73,  77,  69, '\\0'}\n#define PNG_tRNS png_byte png_tRNS[5] = {116,  82,  78,  83, '\\0'}\n#define PNG_zTXt png_byte png_zTXt[5] = {122,  84,  88, 116, '\\0'}\n\n#ifdef PNG_USE_GLOBAL_ARRAYS\nPNG_EXPORT_VAR (png_byte FARDATA) png_IHDR[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_IDAT[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_IEND[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_PLTE[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_bKGD[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_cHRM[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_gAMA[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_hIST[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_iCCP[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_iTXt[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_oFFs[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_pCAL[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_sCAL[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_pHYs[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_sBIT[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_sPLT[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_sRGB[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_tEXt[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_tIME[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_tRNS[5];\nPNG_EXPORT_VAR (png_byte FARDATA) png_zTXt[5];\n#endif /* PNG_USE_GLOBAL_ARRAYS */\n\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\n/* Initialize png_ptr struct for reading, and allocate any other memory.\n * (old interface - DEPRECATED - use png_create_read_struct instead).\n */\nextern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr))\n    PNG_DEPRECATED;\n#undef png_read_init\n#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \\\n    PNG_LIBPNG_VER_STRING,  png_sizeof(png_struct));\n#endif\n\nextern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,\n    png_const_charp user_png_ver, png_size_t png_struct_size));\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\nextern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,\n    png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t\n    png_info_size));\n#endif\n\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\n/* Initialize png_ptr struct for writing, and allocate any other memory.\n * (old interface - DEPRECATED - use png_create_write_struct instead).\n */\nextern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr))\n    PNG_DEPRECATED;\n#undef png_write_init\n#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \\\n    PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));\n#endif\n\nextern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr,\n    png_const_charp user_png_ver, png_size_t png_struct_size));\nextern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr,\n    png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t\n    png_info_size));\n\n/* Allocate memory for an internal libpng struct */\nPNG_EXTERN png_voidp png_create_struct PNGARG((int type)) PNG_PRIVATE;\n\n/* Free memory from internal libpng struct */\nPNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)) PNG_PRIVATE;\n\nPNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr\n  malloc_fn, png_voidp mem_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,\n   png_free_ptr free_fn, png_voidp mem_ptr)) PNG_PRIVATE;\n\n/* Free any memory that info_ptr points to and reset struct. */\nPNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\n\n#ifndef PNG_1_0_X\n/* Function to allocate memory for zlib. */\nPNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items,\n   uInt size)) PNG_PRIVATE;\n\n/* Function to free memory for zlib */\nPNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)) PNG_PRIVATE;\n\n#ifdef PNG_SIZE_T\n/* Function to convert a sizeof an item to png_sizeof item */\n   PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size))\n      PNG_PRIVATE;\n#endif\n\n/* Next four functions are used internally as callbacks.  PNGAPI is required\n * but not PNG_EXPORT.  PNGAPI added at libpng version 1.2.3.\n */\n\nPNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,\n   png_bytep data, png_size_t length)) PNG_PRIVATE;\n\n#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\nPNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,\n   png_bytep buffer, png_size_t length)) PNG_PRIVATE;\n#endif\n\nPNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,\n   png_bytep data, png_size_t length)) PNG_PRIVATE;\n\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\n#ifdef PNG_STDIO_SUPPORTED\nPNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr))\n   PNG_PRIVATE;\n#endif\n#endif\n#else /* PNG_1_0_X */\n#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\nPNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr,\n   png_bytep buffer, png_size_t length)) PNG_PRIVATE;\n#endif\n#endif /* PNG_1_0_X */\n\n/* Reset the CRC variable */\nPNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n\n/* Write the \"data\" buffer to whatever output you are using. */\nPNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,\n   png_size_t length)) PNG_PRIVATE;\n\n/* Read data from whatever input you are using into the \"data\" buffer */\nPNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,\n   png_size_t length)) PNG_PRIVATE;\n\n/* Read bytes into buf, and update png_ptr->crc */\nPNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,\n   png_size_t length)) PNG_PRIVATE;\n\n/* Decompress data in a chunk that uses compression */\n#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \\\n    defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED)\nPNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr,\n   int comp_type, png_size_t chunklength,\n   png_size_t prefix_length, png_size_t *data_length)) PNG_PRIVATE;\n#endif\n\n/* Read \"skip\" bytes, read the file crc, and (optionally) verify png_ptr->crc */\nPNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)\n   PNG_PRIVATE);\n\n/* Read the CRC from the file and compare it to the libpng calculated CRC */\nPNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n\n/* Calculate the CRC over a section of data.  Note that we are only\n * passing a maximum of 64K on systems that have this as a memory limit,\n * since this is the maximum buffer size we can specify.\n */\nPNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,\n   png_size_t length)) PNG_PRIVATE;\n\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\nPNG_EXTERN void png_flush PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n#endif\n\n/* Simple function to write the signature */\nPNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n\n/* Write various chunks */\n\n/* Write the IHDR chunk, and update the png_struct with the necessary\n * information.\n */\nPNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,\n   png_uint_32 height,\n   int bit_depth, int color_type, int compression_method, int filter_method,\n   int interlace_method)) PNG_PRIVATE;\n\nPNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,\n   png_uint_32 num_pal)) PNG_PRIVATE;\n\nPNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,\n   png_size_t length)) PNG_PRIVATE;\n\nPNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n\n#ifdef PNG_WRITE_gAMA_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nPNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma))\n    PNG_PRIVATE;\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\nPNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr,\n    png_fixed_point file_gamma)) PNG_PRIVATE;\n#endif\n#endif\n\n#ifdef PNG_WRITE_sBIT_SUPPORTED\nPNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,\n   int color_type)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_cHRM_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nPNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,\n   double white_x, double white_y,\n   double red_x, double red_y, double green_x, double green_y,\n   double blue_x, double blue_y)) PNG_PRIVATE;\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\nPNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,\n   png_fixed_point int_white_x, png_fixed_point int_white_y,\n   png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point\n   int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,\n   png_fixed_point int_blue_y)) PNG_PRIVATE;\n#endif\n#endif\n\n#ifdef PNG_WRITE_sRGB_SUPPORTED\nPNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,\n   int intent)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_iCCP_SUPPORTED\nPNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,\n   png_charp name, int compression_type,\n   png_charp profile, int proflen)) PNG_PRIVATE;\n   /* Note to maintainer: profile should be png_bytep */\n#endif\n\n#ifdef PNG_WRITE_sPLT_SUPPORTED\nPNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,\n   png_sPLT_tp palette)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_tRNS_SUPPORTED\nPNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,\n   png_color_16p values, int number, int color_type)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_bKGD_SUPPORTED\nPNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,\n   png_color_16p values, int color_type)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_hIST_SUPPORTED\nPNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,\n   int num_hist)) PNG_PRIVATE;\n#endif\n\n#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \\\n    defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)\nPNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,\n   png_charp key, png_charpp new_key)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_tEXt_SUPPORTED\nPNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,\n   png_charp text, png_size_t text_len)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_zTXt_SUPPORTED\nPNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,\n   png_charp text, png_size_t text_len, int compression)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_iTXt_SUPPORTED\nPNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,\n   int compression, png_charp key, png_charp lang, png_charp lang_key,\n   png_charp text)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_TEXT_SUPPORTED  /* Added at version 1.0.14 and 1.2.4 */\nPNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_textp text_ptr, int num_text)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_oFFs_SUPPORTED\nPNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,\n   png_int_32 x_offset, png_int_32 y_offset, int unit_type)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_pCAL_SUPPORTED\nPNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,\n   png_int_32 X0, png_int_32 X1, int type, int nparams,\n   png_charp units, png_charpp params)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_pHYs_SUPPORTED\nPNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,\n   png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,\n   int unit_type)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_tIME_SUPPORTED\nPNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,\n   png_timep mod_time)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_sCAL_SUPPORTED\n#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)\nPNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,\n   int unit, double width, double height)) PNG_PRIVATE;\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\nPNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,\n   int unit, png_charp width, png_charp height)) PNG_PRIVATE;\n#endif\n#endif\n#endif\n\n/* Called when finished processing a row of data */\nPNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n\n/* Internal use only.   Called before first row of data */\nPNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n\n#ifdef PNG_READ_GAMMA_SUPPORTED\nPNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n#endif\n\n/* Combine a row of data, dealing with alpha, etc. if requested */\nPNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,\n   int mask)) PNG_PRIVATE;\n\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n/* Expand an interlaced row */\n/* OLD pre-1.0.9 interface:\nPNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,\n   png_bytep row, int pass, png_uint_32 transformations)) PNG_PRIVATE;\n */\nPNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n#endif\n\n/* GRR TO DO (2.0 or whenever):  simplify other internal calling interfaces */\n\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n/* Grab pixels out of a row for an interlaced pass */\nPNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,\n   png_bytep row, int pass)) PNG_PRIVATE;\n#endif\n\n/* Unfilter a row */\nPNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,\n   png_row_infop row_info, png_bytep row, png_bytep prev_row,\n   int filter)) PNG_PRIVATE;\n\n/* Choose the best filter to use and filter the row data */\nPNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,\n   png_row_infop row_info)) PNG_PRIVATE;\n\n/* Write out the filtered row. */\nPNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,\n   png_bytep filtered_row)) PNG_PRIVATE;\n/* Finish a row while reading, dealing with interlacing passes, etc. */\nPNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));\n\n/* Initialize the row buffers, etc. */\nPNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n/* Optional call to update the users info structure */\nPNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\n\n/* These are the functions that do the transformations */\n#ifdef PNG_READ_FILLER_SUPPORTED\nPNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,\n   png_bytep row, png_uint_32 filler, png_uint_32 flags)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED\nPNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,\n   png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED\nPNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,\n   png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED\nPNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,\n   png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED\nPNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,\n   png_bytep row)) PNG_PRIVATE;\n#endif\n\n#if defined(PNG_WRITE_FILLER_SUPPORTED) || \\\n    defined(PNG_READ_STRIP_ALPHA_SUPPORTED)\nPNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,\n   png_bytep row, png_uint_32 flags)) PNG_PRIVATE;\n#endif\n\n#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)\nPNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info,\n    png_bytep row)) PNG_PRIVATE;\n#endif\n\n#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)\nPNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info,\n    png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\nPNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop\n   row_info, png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\nPNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,\n   png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_PACK_SUPPORTED\nPNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info,\n    png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_SHIFT_SUPPORTED\nPNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,\n   png_color_8p sig_bits)) PNG_PRIVATE;\n#endif\n\n#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)\nPNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info,\n    png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_16_TO_8_SUPPORTED\nPNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info,\n    png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_DITHER_SUPPORTED\nPNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,\n   png_bytep row, png_bytep palette_lookup,\n    png_bytep dither_lookup)) PNG_PRIVATE;\n\n#  ifdef PNG_CORRECT_PALETTE_SUPPORTED\nPNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,\n   png_colorp palette, int num_palette)) PNG_PRIVATE;\n#  endif\n#endif\n\n#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)\nPNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info,\n    png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_PACK_SUPPORTED\nPNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,\n   png_bytep row, png_uint_32 bit_depth)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_WRITE_SHIFT_SUPPORTED\nPNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,\n   png_color_8p bit_depth)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n#ifdef PNG_READ_GAMMA_SUPPORTED\nPNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,\n   png_color_16p trans_values, png_color_16p background,\n   png_color_16p background_1,\n   png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,\n   png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,\n   png_uint_16pp gamma_16_to_1, int gamma_shift)) PNG_PRIVATE;\n#else\nPNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,\n   png_color_16p trans_values, png_color_16p background)) PNG_PRIVATE;\n#endif\n#endif\n\n#ifdef PNG_READ_GAMMA_SUPPORTED\nPNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,\n   png_bytep gamma_table, png_uint_16pp gamma_16_table,\n   int gamma_shift)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_EXPAND_SUPPORTED\nPNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,\n   png_bytep row, png_colorp palette, png_bytep trans,\n   int num_trans)) PNG_PRIVATE;\nPNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,\n   png_bytep row, png_color_16p trans_value)) PNG_PRIVATE;\n#endif\n\n/* The following decodes the appropriate chunks, and does error correction,\n * then calls the appropriate callback for the chunk if it is valid.\n */\n\n/* Decode the IHDR chunk */\nPNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\nPNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length));\nPNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length));\n\n#ifdef PNG_READ_bKGD_SUPPORTED\nPNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_cHRM_SUPPORTED\nPNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_gAMA_SUPPORTED\nPNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_hIST_SUPPORTED\nPNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_iCCP_SUPPORTED\nextern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length));\n#endif /* PNG_READ_iCCP_SUPPORTED */\n\n#ifdef PNG_READ_iTXt_SUPPORTED\nPNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_oFFs_SUPPORTED\nPNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_pCAL_SUPPORTED\nPNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_pHYs_SUPPORTED\nPNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_sBIT_SUPPORTED\nPNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_sCAL_SUPPORTED\nPNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_sPLT_SUPPORTED\nextern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif /* PNG_READ_sPLT_SUPPORTED */\n\n#ifdef PNG_READ_sRGB_SUPPORTED\nPNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_tEXt_SUPPORTED\nPNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_tIME_SUPPORTED\nPNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_tRNS_SUPPORTED\nPNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_READ_zTXt_SUPPORTED\nPNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\n#endif\n\nPNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\n\nPNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,\n   png_bytep chunk_name)) PNG_PRIVATE;\n\n/* Handle the transformations for reading and writing */\nPNG_EXTERN void png_do_read_transformations\n   PNGARG((png_structp png_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_do_write_transformations\n   PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n\nPNG_EXTERN void png_init_read_transformations\n   PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n\n#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\nPNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,\n   png_uint_32 length)) PNG_PRIVATE;\nPNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,\n   png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE;\nPNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,\n   png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE;\nPNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\nPNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr,\n   png_bytep row)) PNG_PRIVATE;\nPNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\nPNG_EXTERN void png_read_push_finish_row\n   PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n#ifdef PNG_READ_tEXt_SUPPORTED\nPNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\nPNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\n#endif\n#ifdef PNG_READ_zTXt_SUPPORTED\nPNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\nPNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\n#endif\n#ifdef PNG_READ_iTXt_SUPPORTED\nPNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,\n   png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\nPNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,\n   png_infop info_ptr)) PNG_PRIVATE;\n#endif\n\n#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */\n\n#ifdef PNG_MNG_FEATURES_SUPPORTED\nPNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,\n   png_bytep row)) PNG_PRIVATE;\nPNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,\n   png_bytep row)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_ASSEMBLER_CODE_SUPPORTED\n#ifdef PNG_MMX_CODE_SUPPORTED\n/* png.c */ /* PRIVATE */\nPNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n#endif\n#endif\n\n\n/* The following six functions will be exported in libpng-1.4.0. */\n#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)\nPNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr,\npng_infop info_ptr));\n\nPNG_EXTERN png_uint_32 png_get_x_pixels_per_inch PNGARG((png_structp png_ptr,\npng_infop info_ptr));\n\nPNG_EXTERN png_uint_32 png_get_y_pixels_per_inch PNGARG((png_structp png_ptr,\npng_infop info_ptr));\n\nPNG_EXTERN float png_get_x_offset_inches PNGARG((png_structp png_ptr,\npng_infop info_ptr));\n\nPNG_EXTERN float png_get_y_offset_inches PNGARG((png_structp png_ptr,\npng_infop info_ptr));\n\n#ifdef PNG_pHYs_SUPPORTED\nPNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr,\npng_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));\n#endif /* PNG_pHYs_SUPPORTED */\n#endif  /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */\n\n/* Read the chunk header (length + type name) */\nPNG_EXTERN png_uint_32 png_read_chunk_header\n   PNGARG((png_structp png_ptr)) PNG_PRIVATE;\n\n/* Added at libpng version 1.2.34 */\n#ifdef PNG_cHRM_SUPPORTED\nPNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,\n   png_fixed_point int_white_x, png_fixed_point int_white_y,\n   png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point\n   int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,\n   png_fixed_point int_blue_y)) PNG_PRIVATE;\n#endif\n\n#ifdef PNG_cHRM_SUPPORTED\n#ifdef PNG_CHECK_cHRM_SUPPORTED\n/* Added at libpng version 1.2.34 */\nPNG_EXTERN void png_64bit_product PNGARG((long v1, long v2,\n   unsigned long *hi_product, unsigned long *lo_product)) PNG_PRIVATE;\n#endif\n#endif\n\n/* Added at libpng version 1.2.41 */\nPNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr,\n   png_uint_32 width, png_uint_32 height, int bit_depth,\n   int color_type, int interlace_type, int compression_type,\n   int filter_type)) PNG_PRIVATE;\n\n/* Added at libpng version 1.2.41 */\nPNG_EXTERN png_voidp png_calloc PNGARG((png_structp png_ptr,\n   png_uint_32 size));\n\n/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */\n\n#endif /* PNG_INTERNAL */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* PNG_VERSION_INFO_ONLY */\n/* Do not put anything past this line */\n#endif /* PNG_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngconf.h",
    "content": "\n/* pngconf.h - machine configurable file for libpng\n *\n * libpng version 1.2.44 - June 26, 2010\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n */\n\n/* Any machine specific code is near the front of this file, so if you\n * are configuring libpng for a machine, you may want to read the section\n * starting here down to where it starts to typedef png_color, png_text,\n * and png_info.\n */\n\n#ifndef PNGCONF_H\n#define PNGCONF_H\n\n#define PNG_1_2_X\n\n/*\n * PNG_USER_CONFIG has to be defined on the compiler command line. This\n * includes the resource compiler for Windows DLL configurations.\n */\n#ifdef PNG_USER_CONFIG\n#  ifndef PNG_USER_PRIVATEBUILD\n#    define PNG_USER_PRIVATEBUILD\n#  endif\n#include \"pngusr.h\"\n#endif\n\n/* PNG_CONFIGURE_LIBPNG is set by the \"configure\" script. */\n#ifdef PNG_CONFIGURE_LIBPNG\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n#endif\n\n/*\n * Added at libpng-1.2.8\n *\n * If you create a private DLL you need to define in \"pngusr.h\" the followings:\n * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of\n *        the DLL was built>\n *  e.g. #define PNG_USER_PRIVATEBUILD \"Build by MyCompany for xyz reasons.\"\n * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to\n *        distinguish your DLL from those of the official release. These\n *        correspond to the trailing letters that come after the version\n *        number and must match your private DLL name>\n *  e.g. // private DLL \"libpng13gx.dll\"\n *       #define PNG_USER_DLLFNAME_POSTFIX \"gx\"\n *\n * The following macros are also at your disposal if you want to complete the\n * DLL VERSIONINFO structure.\n * - PNG_USER_VERSIONINFO_COMMENTS\n * - PNG_USER_VERSIONINFO_COMPANYNAME\n * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS\n */\n\n#ifdef __STDC__\n#ifdef SPECIALBUILD\n#  pragma message(\"PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\\\n are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.\")\n#endif\n\n#ifdef PRIVATEBUILD\n# pragma message(\"PRIVATEBUILD is deprecated.\\\n Use PNG_USER_PRIVATEBUILD instead.\")\n# define PNG_USER_PRIVATEBUILD PRIVATEBUILD\n#endif\n#endif /* __STDC__ */\n\n#ifndef PNG_VERSION_INFO_ONLY\n\n/* End of material added to libpng-1.2.8 */\n\n/* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble\n   Restored at libpng-1.2.21 */\n#if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \\\n    !defined(PNG_WARN_UNINITIALIZED_ROW)\n#  define PNG_WARN_UNINITIALIZED_ROW 1\n#endif\n/* End of material added at libpng-1.2.19/1.2.21 */\n\n/* This is the size of the compression buffer, and thus the size of\n * an IDAT chunk.  Make this whatever size you feel is best for your\n * machine.  One of these will be allocated per png_struct.  When this\n * is full, it writes the data to the disk, and does some other\n * calculations.  Making this an extremely small size will slow\n * the library down, but you may want to experiment to determine\n * where it becomes significant, if you are concerned with memory\n * usage.  Note that zlib allocates at least 32Kb also.  For readers,\n * this describes the size of the buffer available to read the data in.\n * Unless this gets smaller than the size of a row (compressed),\n * it should not make much difference how big this is.\n */\n\n#ifndef PNG_ZBUF_SIZE\n#  define PNG_ZBUF_SIZE 8192\n#endif\n\n/* Enable if you want a write-only libpng */\n\n#ifndef PNG_NO_READ_SUPPORTED\n#  define PNG_READ_SUPPORTED\n#endif\n\n/* Enable if you want a read-only libpng */\n\n#ifndef PNG_NO_WRITE_SUPPORTED\n#  define PNG_WRITE_SUPPORTED\n#endif\n\n/* Enabled in 1.2.41. */\n#ifdef PNG_ALLOW_BENIGN_ERRORS\n#  define png_benign_error png_warning\n#  define png_chunk_benign_error png_chunk_warning\n#else\n#  ifndef PNG_BENIGN_ERRORS_SUPPORTED\n#    define png_benign_error png_error\n#    define png_chunk_benign_error png_chunk_error\n#  endif\n#endif\n\n/* Added in libpng-1.2.41 */\n#if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED)\n#  define PNG_WARNINGS_SUPPORTED\n#endif\n\n#if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED)\n#  define PNG_ERROR_TEXT_SUPPORTED\n#endif\n\n#if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED)\n#  define PNG_CHECK_cHRM_SUPPORTED\n#endif\n\n/* Enabled by default in 1.2.0.  You can disable this if you don't need to\n * support PNGs that are embedded in MNG datastreams\n */\n#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)\n#  ifndef PNG_MNG_FEATURES_SUPPORTED\n#    define PNG_MNG_FEATURES_SUPPORTED\n#  endif\n#endif\n\n#ifndef PNG_NO_FLOATING_POINT_SUPPORTED\n#  ifndef PNG_FLOATING_POINT_SUPPORTED\n#    define PNG_FLOATING_POINT_SUPPORTED\n#  endif\n#endif\n\n/* If you are running on a machine where you cannot allocate more\n * than 64K of memory at once, uncomment this.  While libpng will not\n * normally need that much memory in a chunk (unless you load up a very\n * large file), zlib needs to know how big of a chunk it can use, and\n * libpng thus makes sure to check any memory allocation to verify it\n * will fit into memory.\n#define PNG_MAX_MALLOC_64K\n */\n#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)\n#  define PNG_MAX_MALLOC_64K\n#endif\n\n/* Special munging to support doing things the 'cygwin' way:\n * 'Normal' png-on-win32 defines/defaults:\n *   PNG_BUILD_DLL -- building dll\n *   PNG_USE_DLL   -- building an application, linking to dll\n *   (no define)   -- building static library, or building an\n *                    application and linking to the static lib\n * 'Cygwin' defines/defaults:\n *   PNG_BUILD_DLL -- (ignored) building the dll\n *   (no define)   -- (ignored) building an application, linking to the dll\n *   PNG_STATIC    -- (ignored) building the static lib, or building an\n *                    application that links to the static lib.\n *   ALL_STATIC    -- (ignored) building various static libs, or building an\n *                    application that links to the static libs.\n * Thus,\n * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and\n * this bit of #ifdefs will define the 'correct' config variables based on\n * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but\n * unnecessary.\n *\n * Also, the precedence order is:\n *   ALL_STATIC (since we can't #undef something outside our namespace)\n *   PNG_BUILD_DLL\n *   PNG_STATIC\n *   (nothing) == PNG_USE_DLL\n *\n * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent\n *   of auto-import in binutils, we no longer need to worry about\n *   __declspec(dllexport) / __declspec(dllimport) and friends.  Therefore,\n *   we don't need to worry about PNG_STATIC or ALL_STATIC when it comes\n *   to __declspec() stuff.  However, we DO need to worry about\n *   PNG_BUILD_DLL and PNG_STATIC because those change some defaults\n *   such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.\n */\n#ifdef __CYGWIN__\n#  ifdef ALL_STATIC\n#    ifdef PNG_BUILD_DLL\n#      undef PNG_BUILD_DLL\n#    endif\n#    ifdef PNG_USE_DLL\n#      undef PNG_USE_DLL\n#    endif\n#    ifdef PNG_DLL\n#      undef PNG_DLL\n#    endif\n#    ifndef PNG_STATIC\n#      define PNG_STATIC\n#    endif\n#  else\n#    ifdef PNG_BUILD_DLL\n#      ifdef PNG_STATIC\n#        undef PNG_STATIC\n#      endif\n#      ifdef PNG_USE_DLL\n#        undef PNG_USE_DLL\n#      endif\n#      ifndef PNG_DLL\n#        define PNG_DLL\n#      endif\n#    else\n#      ifdef PNG_STATIC\n#        ifdef PNG_USE_DLL\n#          undef PNG_USE_DLL\n#        endif\n#        ifdef PNG_DLL\n#          undef PNG_DLL\n#        endif\n#      else\n#        ifndef PNG_USE_DLL\n#          define PNG_USE_DLL\n#        endif\n#        ifndef PNG_DLL\n#          define PNG_DLL\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n/* This protects us against compilers that run on a windowing system\n * and thus don't have or would rather us not use the stdio types:\n * stdin, stdout, and stderr.  The only one currently used is stderr\n * in png_error() and png_warning().  #defining PNG_NO_CONSOLE_IO will\n * prevent these from being compiled and used. #defining PNG_NO_STDIO\n * will also prevent these, plus will prevent the entire set of stdio\n * macros and functions (FILE *, printf, etc.) from being compiled and used,\n * unless (PNG_DEBUG > 0) has been #defined.\n *\n * #define PNG_NO_CONSOLE_IO\n * #define PNG_NO_STDIO\n */\n\n#if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED)\n#  define PNG_STDIO_SUPPORTED\n#endif\n\n#ifdef _WIN32_WCE\n#  include <windows.h>\n   /* Console I/O functions are not supported on WindowsCE */\n#  define PNG_NO_CONSOLE_IO\n   /* abort() may not be supported on some/all Windows CE platforms */\n#  define PNG_ABORT() exit(-1)\n#  ifdef PNG_DEBUG\n#    undef PNG_DEBUG\n#  endif\n#endif\n\n#ifdef PNG_BUILD_DLL\n#  ifndef PNG_CONSOLE_IO_SUPPORTED\n#    ifndef PNG_NO_CONSOLE_IO\n#      define PNG_NO_CONSOLE_IO\n#    endif\n#  endif\n#endif\n\n#  ifdef PNG_NO_STDIO\n#    ifndef PNG_NO_CONSOLE_IO\n#      define PNG_NO_CONSOLE_IO\n#    endif\n#    ifdef PNG_DEBUG\n#      if (PNG_DEBUG > 0)\n#        include <stdio.h>\n#      endif\n#    endif\n#  else\n#    ifndef _WIN32_WCE\n/* \"stdio.h\" functions are not supported on WindowsCE */\n#      include <stdio.h>\n#    endif\n#  endif\n\n#if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED)\n#  define PNG_CONSOLE_IO_SUPPORTED\n#endif\n\n/* This macro protects us against machines that don't have function\n * prototypes (ie K&R style headers).  If your compiler does not handle\n * function prototypes, define this macro and use the included ansi2knr.\n * I've always been able to use _NO_PROTO as the indicator, but you may\n * need to drag the empty declaration out in front of here, or change the\n * ifdef to suit your own needs.\n */\n#ifndef PNGARG\n\n#ifdef OF /* zlib prototype munger */\n#  define PNGARG(arglist) OF(arglist)\n#else\n\n#ifdef _NO_PROTO\n#  define PNGARG(arglist) ()\n#  ifndef PNG_TYPECAST_NULL\n#     define PNG_TYPECAST_NULL\n#  endif\n#else\n#  define PNGARG(arglist) arglist\n#endif /* _NO_PROTO */\n\n\n#endif /* OF */\n\n#endif /* PNGARG */\n\n/* Try to determine if we are compiling on a Mac.  Note that testing for\n * just __MWERKS__ is not good enough, because the Codewarrior is now used\n * on non-Mac platforms.\n */\n#ifndef MACOS\n#  if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \\\n      defined(THINK_C) || defined(__SC__)\n#    define MACOS\n#  endif\n#endif\n\n/* enough people need this for various reasons to include it here */\n#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)\n#  include <sys/types.h>\n#endif\n\n#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)\n#  define PNG_SETJMP_SUPPORTED\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n/* This is an attempt to force a single setjmp behaviour on Linux.  If\n * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.\n *\n * You can bypass this test if you know that your application uses exactly\n * the same setjmp.h that was included when libpng was built.  Only define\n * PNG_SKIP_SETJMP_CHECK while building your application, prior to the\n * application's '#include \"png.h\"'. Don't define PNG_SKIP_SETJMP_CHECK\n * while building a separate libpng library for general use.\n */\n\n#  ifndef PNG_SKIP_SETJMP_CHECK\n#    ifdef __linux__\n#      ifdef _BSD_SOURCE\n#        define PNG_SAVE_BSD_SOURCE\n#        undef _BSD_SOURCE\n#      endif\n#      ifdef _SETJMP_H\n       /* If you encounter a compiler error here, see the explanation\n        * near the end of INSTALL.\n        */\n           //__pngconf.h__ in libpng already includes setjmp.h;\n           //__dont__ include it again.;\n#      endif\n#    endif /* __linux__ */\n#  endif /* PNG_SKIP_SETJMP_CHECK */\n\n   /* include setjmp.h for error handling */\n#  include <setjmp.h>\n\n#  ifdef __linux__\n#    ifdef PNG_SAVE_BSD_SOURCE\n#      ifndef _BSD_SOURCE\n#        define _BSD_SOURCE\n#      endif\n#      undef PNG_SAVE_BSD_SOURCE\n#    endif\n#  endif /* __linux__ */\n#endif /* PNG_SETJMP_SUPPORTED */\n\n#ifdef BSD\n#  include <strings.h>\n#else\n#  include <string.h>\n#endif\n\n/* Other defines for things like memory and the like can go here.  */\n#ifdef PNG_INTERNAL\n\n#include <stdlib.h>\n\n/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which\n * aren't usually used outside the library (as far as I know), so it is\n * debatable if they should be exported at all.  In the future, when it is\n * possible to have run-time registry of chunk-handling functions, some of\n * these will be made available again.\n#define PNG_EXTERN extern\n */\n#define PNG_EXTERN\n\n/* Other defines specific to compilers can go here.  Try to keep\n * them inside an appropriate ifdef/endif pair for portability.\n */\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n#  ifdef MACOS\n     /* We need to check that <math.h> hasn't already been included earlier\n      * as it seems it doesn't agree with <fp.h>, yet we should really use\n      * <fp.h> if possible.\n      */\n#    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)\n#      include <fp.h>\n#    endif\n#  else\n#    include <math.h>\n#  endif\n#  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)\n     /* Amiga SAS/C: We must include builtin FPU functions when compiling using\n      * MATH=68881\n      */\n#    include <m68881.h>\n#  endif\n#endif\n\n/* Codewarrior on NT has linking problems without this. */\n#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)\n#  define PNG_ALWAYS_EXTERN\n#endif\n\n/* This provides the non-ANSI (far) memory allocation routines. */\n#if defined(__TURBOC__) && defined(__MSDOS__)\n#  include <mem.h>\n#  include <alloc.h>\n#endif\n\n/* I have no idea why is this necessary... */\n#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \\\n    defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))\n#  include <malloc.h>\n#endif\n\n/* This controls how fine the dithering gets.  As this allocates\n * a largish chunk of memory (32K), those who are not as concerned\n * with dithering quality can decrease some or all of these.\n */\n#ifndef PNG_DITHER_RED_BITS\n#  define PNG_DITHER_RED_BITS 5\n#endif\n#ifndef PNG_DITHER_GREEN_BITS\n#  define PNG_DITHER_GREEN_BITS 5\n#endif\n#ifndef PNG_DITHER_BLUE_BITS\n#  define PNG_DITHER_BLUE_BITS 5\n#endif\n\n/* This controls how fine the gamma correction becomes when you\n * are only interested in 8 bits anyway.  Increasing this value\n * results in more memory being used, and more pow() functions\n * being called to fill in the gamma tables.  Don't set this value\n * less then 8, and even that may not work (I haven't tested it).\n */\n\n#ifndef PNG_MAX_GAMMA_8\n#  define PNG_MAX_GAMMA_8 11\n#endif\n\n/* This controls how much a difference in gamma we can tolerate before\n * we actually start doing gamma conversion.\n */\n#ifndef PNG_GAMMA_THRESHOLD\n#  define PNG_GAMMA_THRESHOLD 0.05\n#endif\n\n#endif /* PNG_INTERNAL */\n\n/* The following uses const char * instead of char * for error\n * and warning message functions, so some compilers won't complain.\n * If you do not want to use const, define PNG_NO_CONST here.\n */\n\n#ifndef PNG_NO_CONST\n#  define PNG_CONST const\n#else\n#  define PNG_CONST\n#endif\n\n/* The following defines give you the ability to remove code from the\n * library that you will not be using.  I wish I could figure out how to\n * automate this, but I can't do that without making it seriously hard\n * on the users.  So if you are not using an ability, change the #define\n * to and #undef, and that part of the library will not be compiled.  If\n * your linker can't find a function, you may want to make sure the\n * ability is defined here.  Some of these depend upon some others being\n * defined.  I haven't figured out all the interactions here, so you may\n * have to experiment awhile to get everything to compile.  If you are\n * creating or using a shared library, you probably shouldn't touch this,\n * as it will affect the size of the structures, and this will cause bad\n * things to happen if the library and/or application ever change.\n */\n\n/* Any features you will not be using can be undef'ed here */\n\n/* GR-P, 0.96a: Set \"*TRANSFORMS_SUPPORTED as default but allow user\n * to turn it off with \"*TRANSFORMS_NOT_SUPPORTED\" or *PNG_NO_*_TRANSFORMS\n * on the compile line, then pick and choose which ones to define without\n * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED\n * if you only want to have a png-compliant reader/writer but don't need\n * any of the extra transformations.  This saves about 80 kbytes in a\n * typical installation of the library. (PNG_NO_* form added in version\n * 1.0.1c, for consistency)\n */\n\n/* The size of the png_text structure changed in libpng-1.0.6 when\n * iTXt support was added.  iTXt support was turned off by default through\n * libpng-1.2.x, to support old apps that malloc the png_text structure\n * instead of calling png_set_text() and letting libpng malloc it.  It\n * will be turned on by default in libpng-1.4.0.\n */\n\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\n#  ifndef PNG_NO_iTXt_SUPPORTED\n#    define PNG_NO_iTXt_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_iTXt\n#    define PNG_NO_READ_iTXt\n#  endif\n#  ifndef PNG_NO_WRITE_iTXt\n#    define PNG_NO_WRITE_iTXt\n#  endif\n#endif\n\n#if !defined(PNG_NO_iTXt_SUPPORTED)\n#  if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)\n#    define PNG_READ_iTXt\n#  endif\n#  if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)\n#    define PNG_WRITE_iTXt\n#  endif\n#endif\n\n/* The following support, added after version 1.0.0, can be turned off here en\n * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility\n * with old applications that require the length of png_struct and png_info\n * to remain unchanged.\n */\n\n#ifdef PNG_LEGACY_SUPPORTED\n#  define PNG_NO_FREE_ME\n#  define PNG_NO_READ_UNKNOWN_CHUNKS\n#  define PNG_NO_WRITE_UNKNOWN_CHUNKS\n#  define PNG_NO_HANDLE_AS_UNKNOWN\n#  define PNG_NO_READ_USER_CHUNKS\n#  define PNG_NO_READ_iCCP\n#  define PNG_NO_WRITE_iCCP\n#  define PNG_NO_READ_iTXt\n#  define PNG_NO_WRITE_iTXt\n#  define PNG_NO_READ_sCAL\n#  define PNG_NO_WRITE_sCAL\n#  define PNG_NO_READ_sPLT\n#  define PNG_NO_WRITE_sPLT\n#  define PNG_NO_INFO_IMAGE\n#  define PNG_NO_READ_RGB_TO_GRAY\n#  define PNG_NO_READ_USER_TRANSFORM\n#  define PNG_NO_WRITE_USER_TRANSFORM\n#  define PNG_NO_USER_MEM\n#  define PNG_NO_READ_EMPTY_PLTE\n#  define PNG_NO_MNG_FEATURES\n#  define PNG_NO_FIXED_POINT_SUPPORTED\n#endif\n\n/* Ignore attempt to turn off both floating and fixed point support */\n#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \\\n    !defined(PNG_NO_FIXED_POINT_SUPPORTED)\n#  define PNG_FIXED_POINT_SUPPORTED\n#endif\n\n#ifndef PNG_NO_FREE_ME\n#  define PNG_FREE_ME_SUPPORTED\n#endif\n\n#ifdef PNG_READ_SUPPORTED\n\n#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \\\n      !defined(PNG_NO_READ_TRANSFORMS)\n#  define PNG_READ_TRANSFORMS_SUPPORTED\n#endif\n\n#ifdef PNG_READ_TRANSFORMS_SUPPORTED\n#  ifndef PNG_NO_READ_EXPAND\n#    define PNG_READ_EXPAND_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_SHIFT\n#    define PNG_READ_SHIFT_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_PACK\n#    define PNG_READ_PACK_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_BGR\n#    define PNG_READ_BGR_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_SWAP\n#    define PNG_READ_SWAP_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_PACKSWAP\n#    define PNG_READ_PACKSWAP_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_INVERT\n#    define PNG_READ_INVERT_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_DITHER\n#    define PNG_READ_DITHER_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_BACKGROUND\n#    define PNG_READ_BACKGROUND_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_16_TO_8\n#    define PNG_READ_16_TO_8_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_FILLER\n#    define PNG_READ_FILLER_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_GAMMA\n#    define PNG_READ_GAMMA_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_GRAY_TO_RGB\n#    define PNG_READ_GRAY_TO_RGB_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_SWAP_ALPHA\n#    define PNG_READ_SWAP_ALPHA_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_INVERT_ALPHA\n#    define PNG_READ_INVERT_ALPHA_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_STRIP_ALPHA\n#    define PNG_READ_STRIP_ALPHA_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_USER_TRANSFORM\n#    define PNG_READ_USER_TRANSFORM_SUPPORTED\n#  endif\n#  ifndef PNG_NO_READ_RGB_TO_GRAY\n#    define PNG_READ_RGB_TO_GRAY_SUPPORTED\n#  endif\n#endif /* PNG_READ_TRANSFORMS_SUPPORTED */\n\n/* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */\n#if !defined(PNG_NO_PROGRESSIVE_READ) && \\\n !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED)  /* if you don't do progressive */\n#  define PNG_PROGRESSIVE_READ_SUPPORTED     /* reading.  This is not talking */\n#endif                               /* about interlacing capability!  You'll */\n            /* still have interlacing unless you change the following define: */\n#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */\n\n/* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */\n#if !defined(PNG_NO_SEQUENTIAL_READ) && \\\n    !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \\\n    !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED)\n#  define PNG_SEQUENTIAL_READ_SUPPORTED\n#endif\n\n#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */\n\n#ifndef PNG_NO_READ_COMPOSITE_NODIV\n#  ifndef PNG_NO_READ_COMPOSITED_NODIV  /* libpng-1.0.x misspelling */\n#    define PNG_READ_COMPOSITE_NODIV_SUPPORTED  /* well tested on Intel, SGI */\n#  endif\n#endif\n\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\n/* Deprecated, will be removed from version 2.0.0.\n   Use PNG_MNG_FEATURES_SUPPORTED instead. */\n#ifndef PNG_NO_READ_EMPTY_PLTE\n#  define PNG_READ_EMPTY_PLTE_SUPPORTED\n#endif\n#endif\n\n#endif /* PNG_READ_SUPPORTED */\n\n#ifdef PNG_WRITE_SUPPORTED\n\n# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \\\n    !defined(PNG_NO_WRITE_TRANSFORMS)\n#  define PNG_WRITE_TRANSFORMS_SUPPORTED\n#endif\n\n#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED\n#  ifndef PNG_NO_WRITE_SHIFT\n#    define PNG_WRITE_SHIFT_SUPPORTED\n#  endif\n#  ifndef PNG_NO_WRITE_PACK\n#    define PNG_WRITE_PACK_SUPPORTED\n#  endif\n#  ifndef PNG_NO_WRITE_BGR\n#    define PNG_WRITE_BGR_SUPPORTED\n#  endif\n#  ifndef PNG_NO_WRITE_SWAP\n#    define PNG_WRITE_SWAP_SUPPORTED\n#  endif\n#  ifndef PNG_NO_WRITE_PACKSWAP\n#    define PNG_WRITE_PACKSWAP_SUPPORTED\n#  endif\n#  ifndef PNG_NO_WRITE_INVERT\n#    define PNG_WRITE_INVERT_SUPPORTED\n#  endif\n#  ifndef PNG_NO_WRITE_FILLER\n#    define PNG_WRITE_FILLER_SUPPORTED   /* same as WRITE_STRIP_ALPHA */\n#  endif\n#  ifndef PNG_NO_WRITE_SWAP_ALPHA\n#    define PNG_WRITE_SWAP_ALPHA_SUPPORTED\n#  endif\n#ifndef PNG_1_0_X\n#  ifndef PNG_NO_WRITE_INVERT_ALPHA\n#    define PNG_WRITE_INVERT_ALPHA_SUPPORTED\n#  endif\n#endif\n#  ifndef PNG_NO_WRITE_USER_TRANSFORM\n#    define PNG_WRITE_USER_TRANSFORM_SUPPORTED\n#  endif\n#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */\n\n#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \\\n    !defined(PNG_WRITE_INTERLACING_SUPPORTED)\n#define PNG_WRITE_INTERLACING_SUPPORTED  /* not required for PNG-compliant\n                                            encoders, but can cause trouble\n                                            if left undefined */\n#endif\n\n#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \\\n    !defined(PNG_WRITE_WEIGHTED_FILTER) && \\\n     defined(PNG_FLOATING_POINT_SUPPORTED)\n#  define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n#endif\n\n#ifndef PNG_NO_WRITE_FLUSH\n#  define PNG_WRITE_FLUSH_SUPPORTED\n#endif\n\n#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\n/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */\n#ifndef PNG_NO_WRITE_EMPTY_PLTE\n#  define PNG_WRITE_EMPTY_PLTE_SUPPORTED\n#endif\n#endif\n\n#endif /* PNG_WRITE_SUPPORTED */\n\n#ifndef PNG_1_0_X\n#  ifndef PNG_NO_ERROR_NUMBERS\n#    define PNG_ERROR_NUMBERS_SUPPORTED\n#  endif\n#endif /* PNG_1_0_X */\n\n#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)\n#  ifndef PNG_NO_USER_TRANSFORM_PTR\n#    define PNG_USER_TRANSFORM_PTR_SUPPORTED\n#  endif\n#endif\n\n#ifndef PNG_NO_STDIO\n#  define PNG_TIME_RFC1123_SUPPORTED\n#endif\n\n/* This adds extra functions in pngget.c for accessing data from the\n * info pointer (added in version 0.99)\n * png_get_image_width()\n * png_get_image_height()\n * png_get_bit_depth()\n * png_get_color_type()\n * png_get_compression_type()\n * png_get_filter_type()\n * png_get_interlace_type()\n * png_get_pixel_aspect_ratio()\n * png_get_pixels_per_meter()\n * png_get_x_offset_pixels()\n * png_get_y_offset_pixels()\n * png_get_x_offset_microns()\n * png_get_y_offset_microns()\n */\n#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)\n#  define PNG_EASY_ACCESS_SUPPORTED\n#endif\n\n/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0\n * and removed from version 1.2.20.  The following will be removed\n * from libpng-1.4.0\n*/\n\n#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)\n#  ifndef PNG_OPTIMIZED_CODE_SUPPORTED\n#    define PNG_OPTIMIZED_CODE_SUPPORTED\n#  endif\n#endif\n\n#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)\n#  ifndef PNG_ASSEMBLER_CODE_SUPPORTED\n#    define PNG_ASSEMBLER_CODE_SUPPORTED\n#  endif\n\n#  if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)\n     /* work around 64-bit gcc compiler bugs in gcc-3.x */\n#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\n#      define PNG_NO_MMX_CODE\n#    endif\n#  endif\n\n#  ifdef __APPLE__\n#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\n#      define PNG_NO_MMX_CODE\n#    endif\n#  endif\n\n#  if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))\n#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\n#      define PNG_NO_MMX_CODE\n#    endif\n#  endif\n\n#  if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\n#    define PNG_MMX_CODE_SUPPORTED\n#  endif\n\n#endif\n/* end of obsolete code to be removed from libpng-1.4.0 */\n\n/* Added at libpng-1.2.0 */\n#ifndef PNG_1_0_X\n#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)\n#  define PNG_USER_MEM_SUPPORTED\n#endif\n#endif /* PNG_1_0_X */\n\n/* Added at libpng-1.2.6 */\n#ifndef PNG_1_0_X\n#  ifndef PNG_SET_USER_LIMITS_SUPPORTED\n#    ifndef PNG_NO_SET_USER_LIMITS\n#      define PNG_SET_USER_LIMITS_SUPPORTED\n#    endif\n#  endif\n#endif /* PNG_1_0_X */\n\n/* Added at libpng-1.0.53 and 1.2.43 */\n#ifndef PNG_USER_LIMITS_SUPPORTED\n#  ifndef PNG_NO_USER_LIMITS\n#    define PNG_USER_LIMITS_SUPPORTED\n#  endif\n#endif\n\n/* Added at libpng-1.0.16 and 1.2.6.  To accept all valid PNGS no matter\n * how large, set these limits to 0x7fffffffL\n */\n#ifndef PNG_USER_WIDTH_MAX\n#  define PNG_USER_WIDTH_MAX 1000000L\n#endif\n#ifndef PNG_USER_HEIGHT_MAX\n#  define PNG_USER_HEIGHT_MAX 1000000L\n#endif\n\n/* Added at libpng-1.2.43.  To accept all valid PNGs no matter\n * how large, set these two limits to 0.\n */\n#ifndef PNG_USER_CHUNK_CACHE_MAX\n#  define PNG_USER_CHUNK_CACHE_MAX 0\n#endif\n\n/* Added at libpng-1.2.43 */\n#ifndef PNG_USER_CHUNK_MALLOC_MAX\n#  define PNG_USER_CHUNK_MALLOC_MAX 0\n#endif\n\n#ifndef PNG_LITERAL_SHARP\n#  define PNG_LITERAL_SHARP 0x23\n#endif\n#ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET\n#  define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b\n#endif\n#ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET\n#  define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d\n#endif\n\n/* Added at libpng-1.2.34 */\n#ifndef PNG_STRING_NEWLINE\n#define PNG_STRING_NEWLINE \"\\n\"\n#endif\n\n/* These are currently experimental features, define them if you want */\n\n/* very little testing */\n/*\n#ifdef PNG_READ_SUPPORTED\n#  ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED\n#    define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED\n#  endif\n#endif\n*/\n\n/* This is only for PowerPC big-endian and 680x0 systems */\n/* some testing */\n/*\n#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED\n#  define PNG_READ_BIG_ENDIAN_SUPPORTED\n#endif\n*/\n\n/* Buggy compilers (e.g., gcc 2.7.2.2) need this */\n/*\n#define PNG_NO_POINTER_INDEXING\n*/\n\n#if !defined(PNG_NO_POINTER_INDEXING) && \\\n    !defined(PNG_POINTER_INDEXING_SUPPORTED)\n#  define PNG_POINTER_INDEXING_SUPPORTED\n#endif\n\n/* These functions are turned off by default, as they will be phased out. */\n/*\n#define  PNG_USELESS_TESTS_SUPPORTED\n#define  PNG_CORRECT_PALETTE_SUPPORTED\n*/\n\n/* Any chunks you are not interested in, you can undef here.  The\n * ones that allocate memory may be expecially important (hIST,\n * tEXt, zTXt, tRNS, pCAL).  Others will just save time and make png_info\n * a bit smaller.\n */\n\n#if defined(PNG_READ_SUPPORTED) && \\\n    !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \\\n    !defined(PNG_NO_READ_ANCILLARY_CHUNKS)\n#  define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED\n#endif\n\n#if defined(PNG_WRITE_SUPPORTED) && \\\n    !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \\\n    !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)\n#  define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED\n#endif\n\n#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED\n\n#ifdef PNG_NO_READ_TEXT\n#  define PNG_NO_READ_iTXt\n#  define PNG_NO_READ_tEXt\n#  define PNG_NO_READ_zTXt\n#endif\n#ifndef PNG_NO_READ_bKGD\n#  define PNG_READ_bKGD_SUPPORTED\n#  define PNG_bKGD_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_cHRM\n#  define PNG_READ_cHRM_SUPPORTED\n#  define PNG_cHRM_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_gAMA\n#  define PNG_READ_gAMA_SUPPORTED\n#  define PNG_gAMA_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_hIST\n#  define PNG_READ_hIST_SUPPORTED\n#  define PNG_hIST_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_iCCP\n#  define PNG_READ_iCCP_SUPPORTED\n#  define PNG_iCCP_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_iTXt\n#  ifndef PNG_READ_iTXt_SUPPORTED\n#    define PNG_READ_iTXt_SUPPORTED\n#  endif\n#  ifndef PNG_iTXt_SUPPORTED\n#    define PNG_iTXt_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_READ_oFFs\n#  define PNG_READ_oFFs_SUPPORTED\n#  define PNG_oFFs_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_pCAL\n#  define PNG_READ_pCAL_SUPPORTED\n#  define PNG_pCAL_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_sCAL\n#  define PNG_READ_sCAL_SUPPORTED\n#  define PNG_sCAL_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_pHYs\n#  define PNG_READ_pHYs_SUPPORTED\n#  define PNG_pHYs_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_sBIT\n#  define PNG_READ_sBIT_SUPPORTED\n#  define PNG_sBIT_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_sPLT\n#  define PNG_READ_sPLT_SUPPORTED\n#  define PNG_sPLT_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_sRGB\n#  define PNG_READ_sRGB_SUPPORTED\n#  define PNG_sRGB_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_tEXt\n#  define PNG_READ_tEXt_SUPPORTED\n#  define PNG_tEXt_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_tIME\n#  define PNG_READ_tIME_SUPPORTED\n#  define PNG_tIME_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_tRNS\n#  define PNG_READ_tRNS_SUPPORTED\n#  define PNG_tRNS_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_zTXt\n#  define PNG_READ_zTXt_SUPPORTED\n#  define PNG_zTXt_SUPPORTED\n#endif\n#ifndef PNG_NO_READ_OPT_PLTE\n#  define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */\n#endif                      /* optional PLTE chunk in RGB and RGBA images */\n#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \\\n    defined(PNG_READ_zTXt_SUPPORTED)\n#  define PNG_READ_TEXT_SUPPORTED\n#  define PNG_TEXT_SUPPORTED\n#endif\n\n#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */\n\n#ifndef PNG_NO_READ_UNKNOWN_CHUNKS\n#  define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED\n#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED\n#    define PNG_UNKNOWN_CHUNKS_SUPPORTED\n#  endif\n#endif\n#if !defined(PNG_NO_READ_USER_CHUNKS) && \\\n     defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)\n#  define PNG_READ_USER_CHUNKS_SUPPORTED\n#  define PNG_USER_CHUNKS_SUPPORTED\n#  ifdef PNG_NO_READ_UNKNOWN_CHUNKS\n#    undef PNG_NO_READ_UNKNOWN_CHUNKS\n#  endif\n#  ifdef PNG_NO_HANDLE_AS_UNKNOWN\n#    undef PNG_NO_HANDLE_AS_UNKNOWN\n#  endif\n#endif\n\n#ifndef PNG_NO_HANDLE_AS_UNKNOWN\n#  ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n#    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n#  endif\n#endif\n\n#ifdef PNG_WRITE_SUPPORTED\n#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED\n\n#ifdef PNG_NO_WRITE_TEXT\n#  define PNG_NO_WRITE_iTXt\n#  define PNG_NO_WRITE_tEXt\n#  define PNG_NO_WRITE_zTXt\n#endif\n#ifndef PNG_NO_WRITE_bKGD\n#  define PNG_WRITE_bKGD_SUPPORTED\n#  ifndef PNG_bKGD_SUPPORTED\n#    define PNG_bKGD_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_cHRM\n#  define PNG_WRITE_cHRM_SUPPORTED\n#  ifndef PNG_cHRM_SUPPORTED\n#    define PNG_cHRM_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_gAMA\n#  define PNG_WRITE_gAMA_SUPPORTED\n#  ifndef PNG_gAMA_SUPPORTED\n#    define PNG_gAMA_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_hIST\n#  define PNG_WRITE_hIST_SUPPORTED\n#  ifndef PNG_hIST_SUPPORTED\n#    define PNG_hIST_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_iCCP\n#  define PNG_WRITE_iCCP_SUPPORTED\n#  ifndef PNG_iCCP_SUPPORTED\n#    define PNG_iCCP_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_iTXt\n#  ifndef PNG_WRITE_iTXt_SUPPORTED\n#    define PNG_WRITE_iTXt_SUPPORTED\n#  endif\n#  ifndef PNG_iTXt_SUPPORTED\n#    define PNG_iTXt_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_oFFs\n#  define PNG_WRITE_oFFs_SUPPORTED\n#  ifndef PNG_oFFs_SUPPORTED\n#    define PNG_oFFs_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_pCAL\n#  define PNG_WRITE_pCAL_SUPPORTED\n#  ifndef PNG_pCAL_SUPPORTED\n#    define PNG_pCAL_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_sCAL\n#  define PNG_WRITE_sCAL_SUPPORTED\n#  ifndef PNG_sCAL_SUPPORTED\n#    define PNG_sCAL_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_pHYs\n#  define PNG_WRITE_pHYs_SUPPORTED\n#  ifndef PNG_pHYs_SUPPORTED\n#    define PNG_pHYs_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_sBIT\n#  define PNG_WRITE_sBIT_SUPPORTED\n#  ifndef PNG_sBIT_SUPPORTED\n#    define PNG_sBIT_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_sPLT\n#  define PNG_WRITE_sPLT_SUPPORTED\n#  ifndef PNG_sPLT_SUPPORTED\n#    define PNG_sPLT_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_sRGB\n#  define PNG_WRITE_sRGB_SUPPORTED\n#  ifndef PNG_sRGB_SUPPORTED\n#    define PNG_sRGB_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_tEXt\n#  define PNG_WRITE_tEXt_SUPPORTED\n#  ifndef PNG_tEXt_SUPPORTED\n#    define PNG_tEXt_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_tIME\n#  define PNG_WRITE_tIME_SUPPORTED\n#  ifndef PNG_tIME_SUPPORTED\n#    define PNG_tIME_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_tRNS\n#  define PNG_WRITE_tRNS_SUPPORTED\n#  ifndef PNG_tRNS_SUPPORTED\n#    define PNG_tRNS_SUPPORTED\n#  endif\n#endif\n#ifndef PNG_NO_WRITE_zTXt\n#  define PNG_WRITE_zTXt_SUPPORTED\n#  ifndef PNG_zTXt_SUPPORTED\n#    define PNG_zTXt_SUPPORTED\n#  endif\n#endif\n#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \\\n    defined(PNG_WRITE_zTXt_SUPPORTED)\n#  define PNG_WRITE_TEXT_SUPPORTED\n#  ifndef PNG_TEXT_SUPPORTED\n#    define PNG_TEXT_SUPPORTED\n#  endif\n#endif\n\n#ifdef PNG_WRITE_tIME_SUPPORTED\n#  ifndef PNG_NO_CONVERT_tIME\n#    ifndef _WIN32_WCE\n/*   The \"tm\" structure is not supported on WindowsCE */\n#      ifndef PNG_CONVERT_tIME_SUPPORTED\n#        define PNG_CONVERT_tIME_SUPPORTED\n#      endif\n#   endif\n#  endif\n#endif\n\n#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */\n\n#if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED)\n#  define PNG_WRITE_FILTER_SUPPORTED\n#endif\n\n#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS\n#  define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\n#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED\n#    define PNG_UNKNOWN_CHUNKS_SUPPORTED\n#  endif\n#endif\n\n#ifndef PNG_NO_HANDLE_AS_UNKNOWN\n#  ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n#    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n#  endif\n#endif\n#endif /* PNG_WRITE_SUPPORTED */\n\n/* Turn this off to disable png_read_png() and\n * png_write_png() and leave the row_pointers member\n * out of the info structure.\n */\n#ifndef PNG_NO_INFO_IMAGE\n#  define PNG_INFO_IMAGE_SUPPORTED\n#endif\n\n/* Need the time information for converting tIME chunks */\n#ifdef PNG_CONVERT_tIME_SUPPORTED\n     /* \"time.h\" functions are not supported on WindowsCE */\n#    include <time.h>\n#endif\n\n/* Some typedefs to get us started.  These should be safe on most of the\n * common platforms.  The typedefs should be at least as large as the\n * numbers suggest (a png_uint_32 must be at least 32 bits long), but they\n * don't have to be exactly that size.  Some compilers dislike passing\n * unsigned shorts as function parameters, so you may be better off using\n * unsigned int for png_uint_16.  Likewise, for 64-bit systems, you may\n * want to have unsigned int for png_uint_32 instead of unsigned long.\n */\n\ntypedef unsigned long png_uint_32;\ntypedef long png_int_32;\ntypedef unsigned short png_uint_16;\ntypedef short png_int_16;\ntypedef unsigned char png_byte;\n\n/* This is usually size_t.  It is typedef'ed just in case you need it to\n   change (I'm not sure if you will or not, so I thought I'd be safe) */\n#ifdef PNG_SIZE_T\n   typedef PNG_SIZE_T png_size_t;\n#  define png_sizeof(x) png_convert_size(sizeof(x))\n#else\n   typedef size_t png_size_t;\n#  define png_sizeof(x) sizeof(x)\n#endif\n\n/* The following is needed for medium model support.  It cannot be in the\n * PNG_INTERNAL section.  Needs modification for other compilers besides\n * MSC.  Model independent support declares all arrays and pointers to be\n * large using the far keyword.  The zlib version used must also support\n * model independent data.  As of version zlib 1.0.4, the necessary changes\n * have been made in zlib.  The USE_FAR_KEYWORD define triggers other\n * changes that are needed. (Tim Wegner)\n */\n\n/* Separate compiler dependencies (problem here is that zlib.h always\n   defines FAR. (SJT) */\n#ifdef __BORLANDC__\n#  if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)\n#    define LDATA 1\n#  else\n#    define LDATA 0\n#  endif\n   /* GRR:  why is Cygwin in here?  Cygwin is not Borland C... */\n#  if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)\n#    define PNG_MAX_MALLOC_64K\n#    if (LDATA != 1)\n#      ifndef FAR\n#        define FAR __far\n#      endif\n#      define USE_FAR_KEYWORD\n#    endif   /* LDATA != 1 */\n     /* Possibly useful for moving data out of default segment.\n      * Uncomment it if you want. Could also define FARDATA as\n      * const if your compiler supports it. (SJT)\n#    define FARDATA FAR\n      */\n#  endif  /* __WIN32__, __FLAT__, __CYGWIN__ */\n#endif   /* __BORLANDC__ */\n\n\n/* Suggest testing for specific compiler first before testing for\n * FAR.  The Watcom compiler defines both __MEDIUM__ and M_I86MM,\n * making reliance oncertain keywords suspect. (SJT)\n */\n\n/* MSC Medium model */\n#ifdef FAR\n#  ifdef M_I86MM\n#    define USE_FAR_KEYWORD\n#    define FARDATA FAR\n#    include <dos.h>\n#  endif\n#endif\n\n/* SJT: default case */\n#ifndef FAR\n#  define FAR\n#endif\n\n/* At this point FAR is always defined */\n#ifndef FARDATA\n#  define FARDATA\n#endif\n\n/* Typedef for floating-point numbers that are converted\n   to fixed-point with a multiple of 100,000, e.g., int_gamma */\ntypedef png_int_32 png_fixed_point;\n\n/* Add typedefs for pointers */\ntypedef void            FAR * png_voidp;\ntypedef png_byte        FAR * png_bytep;\ntypedef png_uint_32     FAR * png_uint_32p;\ntypedef png_int_32      FAR * png_int_32p;\ntypedef png_uint_16     FAR * png_uint_16p;\ntypedef png_int_16      FAR * png_int_16p;\ntypedef PNG_CONST char  FAR * png_const_charp;\ntypedef char            FAR * png_charp;\ntypedef png_fixed_point FAR * png_fixed_point_p;\n\n#ifndef PNG_NO_STDIO\n#ifdef _WIN32_WCE\ntypedef HANDLE                png_FILE_p;\n#else\ntypedef FILE                * png_FILE_p;\n#endif\n#endif\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\ntypedef double          FAR * png_doublep;\n#endif\n\n/* Pointers to pointers; i.e. arrays */\ntypedef png_byte        FAR * FAR * png_bytepp;\ntypedef png_uint_32     FAR * FAR * png_uint_32pp;\ntypedef png_int_32      FAR * FAR * png_int_32pp;\ntypedef png_uint_16     FAR * FAR * png_uint_16pp;\ntypedef png_int_16      FAR * FAR * png_int_16pp;\ntypedef PNG_CONST char  FAR * FAR * png_const_charpp;\ntypedef char            FAR * FAR * png_charpp;\ntypedef png_fixed_point FAR * FAR * png_fixed_point_pp;\n#ifdef PNG_FLOATING_POINT_SUPPORTED\ntypedef double          FAR * FAR * png_doublepp;\n#endif\n\n/* Pointers to pointers to pointers; i.e., pointer to array */\ntypedef char            FAR * FAR * FAR * png_charppp;\n\n#if defined(PNG_1_0_X) || defined(PNG_1_2_X)\n/* SPC -  Is this stuff deprecated? */\n/* It'll be removed as of libpng-1.4.0 - GR-P */\n/* libpng typedefs for types in zlib. If zlib changes\n * or another compression library is used, then change these.\n * Eliminates need to change all the source files.\n */\ntypedef charf *         png_zcharp;\ntypedef charf * FAR *   png_zcharpp;\ntypedef z_stream FAR *  png_zstreamp;\n#endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */\n\n/*\n * Define PNG_BUILD_DLL if the module being built is a Windows\n * LIBPNG DLL.\n *\n * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.\n * It is equivalent to Microsoft predefined macro _DLL that is\n * automatically defined when you compile using the share\n * version of the CRT (C Run-Time library)\n *\n * The cygwin mods make this behavior a little different:\n * Define PNG_BUILD_DLL if you are building a dll for use with cygwin\n * Define PNG_STATIC if you are building a static library for use with cygwin,\n *   -or- if you are building an application that you want to link to the\n *   static library.\n * PNG_USE_DLL is defined by default (no user action needed) unless one of\n *   the other flags is defined.\n */\n\n#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))\n#  define PNG_DLL\n#endif\n/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.\n * When building a static lib, default to no GLOBAL ARRAYS, but allow\n * command-line override\n */\n#ifdef __CYGWIN__\n#  ifndef PNG_STATIC\n#    ifdef PNG_USE_GLOBAL_ARRAYS\n#      undef PNG_USE_GLOBAL_ARRAYS\n#    endif\n#    ifndef PNG_USE_LOCAL_ARRAYS\n#      define PNG_USE_LOCAL_ARRAYS\n#    endif\n#  else\n#    if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)\n#      ifdef PNG_USE_GLOBAL_ARRAYS\n#        undef PNG_USE_GLOBAL_ARRAYS\n#      endif\n#    endif\n#  endif\n#  if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)\n#    define PNG_USE_LOCAL_ARRAYS\n#  endif\n#endif\n\n/* Do not use global arrays (helps with building DLL's)\n * They are no longer used in libpng itself, since version 1.0.5c,\n * but might be required for some pre-1.0.5c applications.\n */\n#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)\n#  if defined(PNG_NO_GLOBAL_ARRAYS) || \\\n      (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)\n#    define PNG_USE_LOCAL_ARRAYS\n#  else\n#    define PNG_USE_GLOBAL_ARRAYS\n#  endif\n#endif\n\n#ifdef __CYGWIN__\n#  undef PNGAPI\n#  define PNGAPI __cdecl\n#  undef PNG_IMPEXP\n#  define PNG_IMPEXP\n#endif\n\n/* If you define PNGAPI, e.g., with compiler option \"-DPNGAPI=__stdcall\",\n * you may get warnings regarding the linkage of png_zalloc and png_zfree.\n * Don't ignore those warnings; you must also reset the default calling\n * convention in your compiler to match your PNGAPI, and you must build\n * zlib and your applications the same way you build libpng.\n */\n\n#if defined(__MINGW32__) && !defined(PNG_MODULEDEF)\n#  ifndef PNG_NO_MODULEDEF\n#    define PNG_NO_MODULEDEF\n#  endif\n#endif\n\n#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)\n#  define PNG_IMPEXP\n#endif\n\n#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \\\n    (( defined(_Windows) || defined(_WINDOWS) || \\\n       defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))\n\n#  ifndef PNGAPI\n#     if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))\n#        define PNGAPI __cdecl\n#     else\n#        define PNGAPI _cdecl\n#     endif\n#  endif\n\n#  if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \\\n       0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)\n#     define PNG_IMPEXP\n#  endif\n\n#  ifndef PNG_IMPEXP\n\n#     define PNG_EXPORT_TYPE1(type,symbol)  PNG_IMPEXP type PNGAPI symbol\n#     define PNG_EXPORT_TYPE2(type,symbol)  type PNG_IMPEXP PNGAPI symbol\n\n      /* Borland/Microsoft */\n#     if defined(_MSC_VER) || defined(__BORLANDC__)\n#        if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)\n#           define PNG_EXPORT PNG_EXPORT_TYPE1\n#        else\n#           define PNG_EXPORT PNG_EXPORT_TYPE2\n#           ifdef PNG_BUILD_DLL\n#              define PNG_IMPEXP __export\n#           else\n#              define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in\n                                                 VC++ */\n#           endif                             /* Exists in Borland C++ for\n                                                 C++ classes (== huge) */\n#        endif\n#     endif\n\n#     ifndef PNG_IMPEXP\n#        ifdef PNG_BUILD_DLL\n#           define PNG_IMPEXP __declspec(dllexport)\n#        else\n#           define PNG_IMPEXP __declspec(dllimport)\n#        endif\n#     endif\n#  endif  /* PNG_IMPEXP */\n#else /* !(DLL || non-cygwin WINDOWS) */\n#   if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)\n#      ifndef PNGAPI\n#         define PNGAPI _System\n#      endif\n#   else\n#      if 0 /* ... other platforms, with other meanings */\n#      endif\n#   endif\n#endif\n\n#ifndef PNGAPI\n#  define PNGAPI\n#endif\n#ifndef PNG_IMPEXP\n#  define PNG_IMPEXP\n#endif\n\n#ifdef PNG_BUILDSYMS\n#  ifndef PNG_EXPORT\n#    define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END\n#  endif\n#  ifdef PNG_USE_GLOBAL_ARRAYS\n#    ifndef PNG_EXPORT_VAR\n#      define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT\n#    endif\n#  endif\n#endif\n\n#ifndef PNG_EXPORT\n#  define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol\n#endif\n\n#ifdef PNG_USE_GLOBAL_ARRAYS\n#  ifndef PNG_EXPORT_VAR\n#    define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type\n#  endif\n#endif\n\n#ifdef PNG_PEDANTIC_WARNINGS\n#  ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED\n#    define PNG_PEDANTIC_WARNINGS_SUPPORTED\n#  endif\n#endif\n\n#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED\n/* Support for compiler specific function attributes.  These are used\n * so that where compiler support is available incorrect use of API\n * functions in png.h will generate compiler warnings.  Added at libpng\n * version 1.2.41.\n */\n#  ifdef __GNUC__\n#    ifndef PNG_USE_RESULT\n#      define PNG_USE_RESULT __attribute__((__warn_unused_result__))\n#    endif\n#    ifndef PNG_NORETURN\n#      define PNG_NORETURN   __attribute__((__noreturn__))\n#    endif\n#    ifndef PNG_ALLOCATED\n#      define PNG_ALLOCATED  __attribute__((__malloc__))\n#    endif\n\n    /* This specifically protects structure members that should only be\n     * accessed from within the library, therefore should be empty during\n     * a library build.\n     */\n#    ifndef PNG_DEPRECATED\n#      define PNG_DEPRECATED __attribute__((__deprecated__))\n#    endif\n#    ifndef PNG_DEPSTRUCT\n#      define PNG_DEPSTRUCT  __attribute__((__deprecated__))\n#    endif\n#    ifndef PNG_PRIVATE\n#      if 0 /* Doesn't work so we use deprecated instead*/\n#        define PNG_PRIVATE \\\n          __attribute__((warning(\"This function is not exported by libpng.\")))\n#      else\n#        define PNG_PRIVATE \\\n          __attribute__((__deprecated__))\n#      endif\n#    endif /* PNG_PRIVATE */\n#  endif /* __GNUC__ */\n#endif /* PNG_PEDANTIC_WARNINGS */\n\n#ifndef PNG_DEPRECATED\n#  define PNG_DEPRECATED  /* Use of this function is deprecated */\n#endif\n#ifndef PNG_USE_RESULT\n#  define PNG_USE_RESULT  /* The result of this function must be checked */\n#endif\n#ifndef PNG_NORETURN\n#  define PNG_NORETURN    /* This function does not return */\n#endif\n#ifndef PNG_ALLOCATED\n#  define PNG_ALLOCATED   /* The result of the function is new memory */\n#endif\n#ifndef PNG_DEPSTRUCT\n#  define PNG_DEPSTRUCT   /* Access to this struct member is deprecated */\n#endif\n#ifndef PNG_PRIVATE\n#  define PNG_PRIVATE     /* This is a private libpng function */\n#endif\n\n/* User may want to use these so they are not in PNG_INTERNAL. Any library\n * functions that are passed far data must be model independent.\n */\n\n#ifndef PNG_ABORT\n#  define PNG_ABORT() abort()\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n#  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)\n#else\n#  define png_jmpbuf(png_ptr) \\\n   (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)\n#endif\n\n#ifdef USE_FAR_KEYWORD  /* memory model independent fns */\n/* Use this to make far-to-near assignments */\n#  define CHECK   1\n#  define NOCHECK 0\n#  define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))\n#  define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))\n#  define png_snprintf _fsnprintf   /* Added to v 1.2.19 */\n#  define png_strlen  _fstrlen\n#  define png_memcmp  _fmemcmp    /* SJT: added */\n#  define png_memcpy  _fmemcpy\n#  define png_memset  _fmemset\n#else /* Use the usual functions */\n#  define CVT_PTR(ptr)         (ptr)\n#  define CVT_PTR_NOCHECK(ptr) (ptr)\n#  ifndef PNG_NO_SNPRINTF\n#    ifdef _MSC_VER\n#      define png_snprintf _snprintf   /* Added to v 1.2.19 */\n#      define png_snprintf2 _snprintf\n#      define png_snprintf6 _snprintf\n#    else\n#      define png_snprintf snprintf   /* Added to v 1.2.19 */\n#      define png_snprintf2 snprintf\n#      define png_snprintf6 snprintf\n#    endif\n#  else\n     /* You don't have or don't want to use snprintf().  Caution: Using\n      * sprintf instead of snprintf exposes your application to accidental\n      * or malevolent buffer overflows.  If you don't have snprintf()\n      * as a general rule you should provide one (you can get one from\n      * Portable OpenSSH).\n      */\n#    define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)\n#    define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)\n#    define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \\\n        sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)\n#  endif\n#  define png_strlen  strlen\n#  define png_memcmp  memcmp      /* SJT: added */\n#  define png_memcpy  memcpy\n#  define png_memset  memset\n#endif\n/* End of memory model independent support */\n\n/* Just a little check that someone hasn't tried to define something\n * contradictory.\n */\n#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)\n#  undef PNG_ZBUF_SIZE\n#  define PNG_ZBUF_SIZE 65536L\n#endif\n\n/* Added at libpng-1.2.8 */\n#endif /* PNG_VERSION_INFO_ONLY */\n\n#endif /* PNGCONF_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngerror.c",
    "content": "\n/* pngerror.c - stub functions for i/o and memory allocation\n *\n * Last changed in libpng 1.2.41 [December 3, 2009]\n * Copyright (c) 1998-2009 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n * This file provides a location for all error handling.  Users who\n * need special error handling are expected to write replacement functions\n * and use png_set_error_fn() to use those functions.  See the instructions\n * at each function.\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)\n\nstatic void /* PRIVATE */\npng_default_error PNGARG((png_structp png_ptr,\n  png_const_charp error_message)) PNG_NORETURN;\n#ifdef PNG_WARNINGS_SUPPORTED\nstatic void /* PRIVATE */\npng_default_warning PNGARG((png_structp png_ptr,\n  png_const_charp warning_message));\n#endif /* PNG_WARNINGS_SUPPORTED */\n\n/* This function is called whenever there is a fatal error.  This function\n * should not be changed.  If there is a need to handle errors differently,\n * you should supply a replacement error function and use png_set_error_fn()\n * to replace the error function at run-time.\n */\n#ifdef PNG_ERROR_TEXT_SUPPORTED\nvoid PNGAPI\npng_error(png_structp png_ptr, png_const_charp error_message)\n{\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\n   char msg[16];\n   if (png_ptr != NULL)\n   {\n     if (png_ptr->flags&\n       (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))\n     {\n       if (*error_message == PNG_LITERAL_SHARP)\n       {\n           /* Strip \"#nnnn \" from beginning of error message. */\n           int offset;\n           for (offset = 1; offset<15; offset++)\n              if (error_message[offset] == ' ')\n                  break;\n           if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)\n           {\n              int i;\n              for (i = 0; i < offset - 1; i++)\n                 msg[i] = error_message[i + 1];\n              msg[i - 1] = '\\0';\n              error_message = msg;\n           }\n           else\n              error_message += offset;\n       }\n       else\n       {\n           if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)\n           {\n              msg[0] = '0';\n              msg[1] = '\\0';\n              error_message = msg;\n           }\n       }\n     }\n   }\n#endif\n   if (png_ptr != NULL && png_ptr->error_fn != NULL)\n      (*(png_ptr->error_fn))(png_ptr, error_message);\n\n   /* If the custom handler doesn't exist, or if it returns,\n      use the default handler, which will not return. */\n   png_default_error(png_ptr, error_message);\n}\n#else\nvoid PNGAPI\npng_err(png_structp png_ptr)\n{\n   if (png_ptr != NULL && png_ptr->error_fn != NULL)\n      (*(png_ptr->error_fn))(png_ptr, '\\0');\n\n   /* If the custom handler doesn't exist, or if it returns,\n      use the default handler, which will not return. */\n   png_default_error(png_ptr, '\\0');\n}\n#endif /* PNG_ERROR_TEXT_SUPPORTED */\n\n#ifdef PNG_WARNINGS_SUPPORTED\n/* This function is called whenever there is a non-fatal error.  This function\n * should not be changed.  If there is a need to handle warnings differently,\n * you should supply a replacement warning function and use\n * png_set_error_fn() to replace the warning function at run-time.\n */\nvoid PNGAPI\npng_warning(png_structp png_ptr, png_const_charp warning_message)\n{\n   int offset = 0;\n   if (png_ptr != NULL)\n   {\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\n   if (png_ptr->flags&\n     (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))\n#endif\n     {\n       if (*warning_message == PNG_LITERAL_SHARP)\n       {\n           for (offset = 1; offset < 15; offset++)\n              if (warning_message[offset] == ' ')\n                  break;\n       }\n     }\n   }\n   if (png_ptr != NULL && png_ptr->warning_fn != NULL)\n      (*(png_ptr->warning_fn))(png_ptr, warning_message + offset);\n   else\n      png_default_warning(png_ptr, warning_message + offset);\n}\n#endif /* PNG_WARNINGS_SUPPORTED */\n\n#ifdef PNG_BENIGN_ERRORS_SUPPORTED\nvoid PNGAPI\npng_benign_error(png_structp png_ptr, png_const_charp error_message)\n{\n  if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)\n    png_warning(png_ptr, error_message);\n  else\n    png_error(png_ptr, error_message);\n}\n#endif\n\n/* These utilities are used internally to build an error message that relates\n * to the current chunk.  The chunk name comes from png_ptr->chunk_name,\n * this is used to prefix the message.  The message is limited in length\n * to 63 bytes, the name characters are output as hex digits wrapped in []\n * if the character is invalid.\n */\n#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))\nstatic PNG_CONST char png_digit[16] = {\n   '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n   'A', 'B', 'C', 'D', 'E', 'F'\n};\n\n#define PNG_MAX_ERROR_TEXT 64\n#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED)\nstatic void /* PRIVATE */\npng_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp\n   error_message)\n{\n   int iout = 0, iin = 0;\n\n   while (iin < 4)\n   {\n      int c = png_ptr->chunk_name[iin++];\n      if (isnonalpha(c))\n      {\n         buffer[iout++] = PNG_LITERAL_LEFT_SQUARE_BRACKET;\n         buffer[iout++] = png_digit[(c & 0xf0) >> 4];\n         buffer[iout++] = png_digit[c & 0x0f];\n         buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET;\n      }\n      else\n      {\n         buffer[iout++] = (png_byte)c;\n      }\n   }\n\n   if (error_message == NULL)\n      buffer[iout] = '\\0';\n   else\n   {\n      buffer[iout++] = ':';\n      buffer[iout++] = ' ';\n      png_memcpy(buffer + iout, error_message, PNG_MAX_ERROR_TEXT);\n      buffer[iout + PNG_MAX_ERROR_TEXT - 1] = '\\0';\n   }\n}\n\n#ifdef PNG_READ_SUPPORTED\nvoid PNGAPI\npng_chunk_error(png_structp png_ptr, png_const_charp error_message)\n{\n   char msg[18+PNG_MAX_ERROR_TEXT];\n   if (png_ptr == NULL)\n     png_error(png_ptr, error_message);\n   else\n   {\n     png_format_buffer(png_ptr, msg, error_message);\n     png_error(png_ptr, msg);\n   }\n}\n#endif /* PNG_READ_SUPPORTED */\n#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */\n\n#ifdef PNG_WARNINGS_SUPPORTED\nvoid PNGAPI\npng_chunk_warning(png_structp png_ptr, png_const_charp warning_message)\n{\n   char msg[18+PNG_MAX_ERROR_TEXT];\n   if (png_ptr == NULL)\n     png_warning(png_ptr, warning_message);\n   else\n   {\n     png_format_buffer(png_ptr, msg, warning_message);\n     png_warning(png_ptr, msg);\n   }\n}\n#endif /* PNG_WARNINGS_SUPPORTED */\n\n#ifdef PNG_READ_SUPPORTED\n#ifdef PNG_BENIGN_ERRORS_SUPPORTED\nvoid PNGAPI\npng_chunk_benign_error(png_structp png_ptr, png_const_charp error_message)\n{\n  if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)\n    png_chunk_warning(png_ptr, error_message);\n  else\n    png_chunk_error(png_ptr, error_message);\n}\n#endif\n#endif /* PNG_READ_SUPPORTED */\n\n/* This is the default error handling function.  Note that replacements for\n * this function MUST NOT RETURN, or the program will likely crash.  This\n * function is used by default, or if the program supplies NULL for the\n * error function pointer in png_set_error_fn().\n */\nstatic void /* PRIVATE */\npng_default_error(png_structp png_ptr, png_const_charp error_message)\n{\n#ifdef PNG_CONSOLE_IO_SUPPORTED\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\n   if (*error_message == PNG_LITERAL_SHARP)\n   {\n     /* Strip \"#nnnn \" from beginning of error message. */\n     int offset;\n     char error_number[16];\n     for (offset = 0; offset<15; offset++)\n     {\n         error_number[offset] = error_message[offset + 1];\n         if (error_message[offset] == ' ')\n             break;\n     }\n     if ((offset > 1) && (offset < 15))\n     {\n       error_number[offset - 1] = '\\0';\n       fprintf(stderr, \"libpng error no. %s: %s\",\n          error_number, error_message + offset + 1);\n       fprintf(stderr, PNG_STRING_NEWLINE);\n     }\n     else\n     {\n       fprintf(stderr, \"libpng error: %s, offset=%d\",\n          error_message, offset);\n       fprintf(stderr, PNG_STRING_NEWLINE);\n     }\n   }\n   else\n#endif\n   {\n      fprintf(stderr, \"libpng error: %s\", error_message);\n      fprintf(stderr, PNG_STRING_NEWLINE);\n   }\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n   if (png_ptr)\n   {\n#  ifdef USE_FAR_KEYWORD\n   {\n      jmp_buf jmpbuf;\n      png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf));\n     longjmp(jmpbuf,1);\n   }\n#  else\n   longjmp(png_ptr->jmpbuf, 1);\n#  endif\n   }\n#endif\n   /* Here if not setjmp support or if png_ptr is null. */\n   PNG_ABORT();\n#ifndef PNG_CONSOLE_IO_SUPPORTED\n   error_message = error_message; /* Make compiler happy */\n#endif\n}\n\n#ifdef PNG_WARNINGS_SUPPORTED\n/* This function is called when there is a warning, but the library thinks\n * it can continue anyway.  Replacement functions don't have to do anything\n * here if you don't want them to.  In the default configuration, png_ptr is\n * not used, but it is passed in case it may be useful.\n */\nstatic void /* PRIVATE */\npng_default_warning(png_structp png_ptr, png_const_charp warning_message)\n{\n#ifdef PNG_CONSOLE_IO_SUPPORTED\n#  ifdef PNG_ERROR_NUMBERS_SUPPORTED\n   if (*warning_message == PNG_LITERAL_SHARP)\n   {\n     int offset;\n     char warning_number[16];\n     for (offset = 0; offset < 15; offset++)\n     {\n        warning_number[offset] = warning_message[offset + 1];\n        if (warning_message[offset] == ' ')\n            break;\n     }\n     if ((offset > 1) && (offset < 15))\n     {\n       warning_number[offset + 1] = '\\0';\n       fprintf(stderr, \"libpng warning no. %s: %s\",\n          warning_number, warning_message + offset);\n       fprintf(stderr, PNG_STRING_NEWLINE);\n     }\n     else\n     {\n       fprintf(stderr, \"libpng warning: %s\",\n          warning_message);\n       fprintf(stderr, PNG_STRING_NEWLINE);\n     }\n   }\n   else\n#  endif\n   {\n     fprintf(stderr, \"libpng warning: %s\", warning_message);\n     fprintf(stderr, PNG_STRING_NEWLINE);\n   }\n#else\n   warning_message = warning_message; /* Make compiler happy */\n#endif\n   png_ptr = png_ptr; /* Make compiler happy */\n}\n#endif /* PNG_WARNINGS_SUPPORTED */\n\n/* This function is called when the application wants to use another method\n * of handling errors and warnings.  Note that the error function MUST NOT\n * return to the calling routine or serious problems will occur.  The return\n * method used in the default routine calls longjmp(png_ptr->jmpbuf, 1)\n */\nvoid PNGAPI\npng_set_error_fn(png_structp png_ptr, png_voidp error_ptr,\n   png_error_ptr error_fn, png_error_ptr warning_fn)\n{\n   if (png_ptr == NULL)\n      return;\n   png_ptr->error_ptr = error_ptr;\n   png_ptr->error_fn = error_fn;\n   png_ptr->warning_fn = warning_fn;\n}\n\n\n/* This function returns a pointer to the error_ptr associated with the user\n * functions.  The application should free any memory associated with this\n * pointer before png_write_destroy and png_read_destroy are called.\n */\npng_voidp PNGAPI\npng_get_error_ptr(png_structp png_ptr)\n{\n   if (png_ptr == NULL)\n      return NULL;\n   return ((png_voidp)png_ptr->error_ptr);\n}\n\n\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\nvoid PNGAPI\npng_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)\n{\n   if (png_ptr != NULL)\n   {\n     png_ptr->flags &=\n       ((~(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode);\n   }\n}\n#endif\n#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pnggccrd.c",
    "content": "/* pnggccrd.c was removed from libpng-1.2.20. */\n\n/* This code snippet is for use by configure's compilation test. */\n\n#if (!defined _MSC_VER) && \\\n    defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \\\n    defined(PNG_MMX_CODE_SUPPORTED)\n\nint PNGAPI png_dummy_mmx_support(void);\n\nstatic int _mmx_supported = 2; // 0: no MMX; 1: MMX supported; 2: not tested\n\nint PNGAPI\npng_dummy_mmx_support(void) __attribute__((noinline));\n\nint PNGAPI\npng_dummy_mmx_support(void)\n{\n   int result;\n#ifdef PNG_MMX_CODE_SUPPORTED  // superfluous, but what the heck\n    __asm__ __volatile__ (\n#ifdef __x86_64__\n        \"pushq %%rbx          \\n\\t\"  // rbx gets clobbered by CPUID instruction\n        \"pushq %%rcx          \\n\\t\"  // so does rcx...\n        \"pushq %%rdx          \\n\\t\"  // ...and rdx (but rcx & rdx safe on Linux)\n        \"pushfq               \\n\\t\"  // save Eflag to stack\n        \"popq %%rax           \\n\\t\"  // get Eflag from stack into rax\n        \"movq %%rax, %%rcx    \\n\\t\"  // make another copy of Eflag in rcx\n        \"xorl $0x200000, %%eax \\n\\t\" // toggle ID bit in Eflag (i.e., bit 21)\n        \"pushq %%rax          \\n\\t\"  // save modified Eflag back to stack\n        \"popfq                \\n\\t\"  // restore modified value to Eflag reg\n        \"pushfq               \\n\\t\"  // save Eflag to stack\n        \"popq %%rax           \\n\\t\"  // get Eflag from stack\n        \"pushq %%rcx          \\n\\t\"  // save original Eflag to stack\n        \"popfq                \\n\\t\"  // restore original Eflag\n#else\n        \"pushl %%ebx          \\n\\t\"  // ebx gets clobbered by CPUID instruction\n        \"pushl %%ecx          \\n\\t\"  // so does ecx...\n        \"pushl %%edx          \\n\\t\"  // ...and edx (but ecx & edx safe on Linux)\n        \"pushfl               \\n\\t\"  // save Eflag to stack\n        \"popl %%eax           \\n\\t\"  // get Eflag from stack into eax\n        \"movl %%eax, %%ecx    \\n\\t\"  // make another copy of Eflag in ecx\n        \"xorl $0x200000, %%eax \\n\\t\" // toggle ID bit in Eflag (i.e., bit 21)\n        \"pushl %%eax          \\n\\t\"  // save modified Eflag back to stack\n        \"popfl                \\n\\t\"  // restore modified value to Eflag reg\n        \"pushfl               \\n\\t\"  // save Eflag to stack\n        \"popl %%eax           \\n\\t\"  // get Eflag from stack\n        \"pushl %%ecx          \\n\\t\"  // save original Eflag to stack\n        \"popfl                \\n\\t\"  // restore original Eflag\n#endif\n        \"xorl %%ecx, %%eax    \\n\\t\"  // compare new Eflag with original Eflag\n        \"jz 0f                \\n\\t\"  // if same, CPUID instr. is not supported\n\n        \"xorl %%eax, %%eax    \\n\\t\"  // set eax to zero\n//      \".byte  0x0f, 0xa2    \\n\\t\"  // CPUID instruction (two-byte opcode)\n        \"cpuid                \\n\\t\"  // get the CPU identification info\n        \"cmpl $1, %%eax       \\n\\t\"  // make sure eax return non-zero value\n        \"jl 0f                \\n\\t\"  // if eax is zero, MMX is not supported\n\n        \"xorl %%eax, %%eax    \\n\\t\"  // set eax to zero and...\n        \"incl %%eax           \\n\\t\"  // ...increment eax to 1.  This pair is\n                                     // faster than the instruction \"mov eax, 1\"\n        \"cpuid                \\n\\t\"  // get the CPU identification info again\n        \"andl $0x800000, %%edx \\n\\t\" // mask out all bits but MMX bit (23)\n        \"cmpl $0, %%edx       \\n\\t\"  // 0 = MMX not supported\n        \"jz 0f                \\n\\t\"  // non-zero = yes, MMX IS supported\n\n        \"movl $1, %%eax       \\n\\t\"  // set return value to 1\n        \"jmp  1f              \\n\\t\"  // DONE:  have MMX support\n\n    \"0:                       \\n\\t\"  // .NOT_SUPPORTED: target label for jump instructions\n        \"movl $0, %%eax       \\n\\t\"  // set return value to 0\n    \"1:                       \\n\\t\"  // .RETURN: target label for jump instructions\n#ifdef __x86_64__\n        \"popq %%rdx           \\n\\t\"  // restore rdx\n        \"popq %%rcx           \\n\\t\"  // restore rcx\n        \"popq %%rbx           \\n\\t\"  // restore rbx\n#else\n        \"popl %%edx           \\n\\t\"  // restore edx\n        \"popl %%ecx           \\n\\t\"  // restore ecx\n        \"popl %%ebx           \\n\\t\"  // restore ebx\n#endif\n\n//      \"ret                  \\n\\t\"  // DONE:  no MMX support\n                                     // (fall through to standard C \"ret\")\n\n        : \"=a\" (result)              // output list\n\n        :                            // any variables used on input (none)\n\n                                     // no clobber list\n//      , \"%ebx\", \"%ecx\", \"%edx\"     // GRR:  we handle these manually\n//      , \"memory\"   // if write to a variable gcc thought was in a reg\n//      , \"cc\"       // \"condition codes\" (flag bits)\n    );\n    _mmx_supported = result;\n#else\n    _mmx_supported = 0;\n#endif /* PNG_MMX_CODE_SUPPORTED */\n\n    return _mmx_supported;\n}\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngget.c",
    "content": "\n/* pngget.c - retrieval of values from info struct\n *\n * Last changed in libpng 1.2.43 [February 25, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)\n\npng_uint_32 PNGAPI\npng_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return(info_ptr->valid & flag);\n\n   else\n      return(0);\n}\n\npng_uint_32 PNGAPI\npng_get_rowbytes(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return(info_ptr->rowbytes);\n\n   else\n      return(0);\n}\n\n#ifdef PNG_INFO_IMAGE_SUPPORTED\npng_bytepp PNGAPI\npng_get_rows(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return(info_ptr->row_pointers);\n\n   else\n      return(0);\n}\n#endif\n\n#ifdef PNG_EASY_ACCESS_SUPPORTED\n/* Easy access to info, added in libpng-0.99 */\npng_uint_32 PNGAPI\npng_get_image_width(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return info_ptr->width;\n\n   return (0);\n}\n\npng_uint_32 PNGAPI\npng_get_image_height(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return info_ptr->height;\n\n   return (0);\n}\n\npng_byte PNGAPI\npng_get_bit_depth(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return info_ptr->bit_depth;\n\n   return (0);\n}\n\npng_byte PNGAPI\npng_get_color_type(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return info_ptr->color_type;\n\n   return (0);\n}\n\npng_byte PNGAPI\npng_get_filter_type(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return info_ptr->filter_type;\n\n   return (0);\n}\n\npng_byte PNGAPI\npng_get_interlace_type(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return info_ptr->interlace_type;\n\n   return (0);\n}\n\npng_byte PNGAPI\npng_get_compression_type(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return info_ptr->compression_type;\n\n   return (0);\n}\n\npng_uint_32 PNGAPI\npng_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n#ifdef PNG_pHYs_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_pHYs)\n   {\n      png_debug1(1, \"in %s retrieval function\", \"png_get_x_pixels_per_meter\");\n\n      if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER)\n          return (0);\n\n      else\n          return (info_ptr->x_pixels_per_unit);\n   }\n#else\n   return (0);\n#endif\n   return (0);\n}\n\npng_uint_32 PNGAPI\npng_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n#ifdef PNG_pHYs_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_pHYs)\n   {\n      png_debug1(1, \"in %s retrieval function\", \"png_get_y_pixels_per_meter\");\n\n      if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER)\n          return (0);\n\n      else\n          return (info_ptr->y_pixels_per_unit);\n   }\n#else\n   return (0);\n#endif\n   return (0);\n}\n\npng_uint_32 PNGAPI\npng_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n#ifdef PNG_pHYs_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_pHYs)\n   {\n      png_debug1(1, \"in %s retrieval function\", \"png_get_pixels_per_meter\");\n\n      if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER ||\n         info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit)\n          return (0);\n\n      else\n          return (info_ptr->x_pixels_per_unit);\n   }\n#else\n   return (0);\n#endif\n   return (0);\n}\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nfloat PNGAPI\npng_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)\n   {\n   if (png_ptr != NULL && info_ptr != NULL)\n#ifdef PNG_pHYs_SUPPORTED\n\n   if (info_ptr->valid & PNG_INFO_pHYs)\n   {\n      png_debug1(1, \"in %s retrieval function\", \"png_get_aspect_ratio\");\n\n      if (info_ptr->x_pixels_per_unit == 0)\n         return ((float)0.0);\n\n      else\n         return ((float)((float)info_ptr->y_pixels_per_unit\n            /(float)info_ptr->x_pixels_per_unit));\n   }\n#else\n      return (0.0);\n#endif\n   return ((float)0.0);\n}\n#endif\n\npng_int_32 PNGAPI\npng_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n#ifdef PNG_oFFs_SUPPORTED\n\n   if (info_ptr->valid & PNG_INFO_oFFs)\n   {\n      png_debug1(1, \"in %s retrieval function\", \"png_get_x_offset_microns\");\n\n      if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)\n          return (0);\n\n      else\n          return (info_ptr->x_offset);\n   }\n#else\n      return (0);\n#endif\n   return (0);\n}\n\npng_int_32 PNGAPI\npng_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n\n#ifdef PNG_oFFs_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_oFFs)\n   {\n      png_debug1(1, \"in %s retrieval function\", \"png_get_y_offset_microns\");\n\n      if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)\n          return (0);\n\n      else\n          return (info_ptr->y_offset);\n   }\n#else\n   return (0);\n#endif\n   return (0);\n}\n\npng_int_32 PNGAPI\npng_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n\n#ifdef PNG_oFFs_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_oFFs)\n   {\n      png_debug1(1, \"in %s retrieval function\", \"png_get_x_offset_microns\");\n\n      if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)\n          return (0);\n\n      else\n          return (info_ptr->x_offset);\n   }\n#else\n   return (0);\n#endif\n   return (0);\n}\n\npng_int_32 PNGAPI\npng_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n\n#ifdef PNG_oFFs_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_oFFs)\n   {\n      png_debug1(1, \"in %s retrieval function\", \"png_get_y_offset_microns\");\n\n      if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)\n          return (0);\n\n      else\n          return (info_ptr->y_offset);\n   }\n#else\n   return (0);\n#endif\n   return (0);\n}\n\n#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)\npng_uint_32 PNGAPI\npng_get_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)\n{\n   return ((png_uint_32)((float)png_get_pixels_per_meter(png_ptr, info_ptr)\n     *.0254 +.5));\n}\n\npng_uint_32 PNGAPI\npng_get_x_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)\n{\n   return ((png_uint_32)((float)png_get_x_pixels_per_meter(png_ptr, info_ptr)\n     *.0254 +.5));\n}\n\npng_uint_32 PNGAPI\npng_get_y_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)\n{\n   return ((png_uint_32)((float)png_get_y_pixels_per_meter(png_ptr, info_ptr)\n     *.0254 +.5));\n}\n\nfloat PNGAPI\npng_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr)\n{\n   return ((float)png_get_x_offset_microns(png_ptr, info_ptr)\n     *.00003937);\n}\n\nfloat PNGAPI\npng_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr)\n{\n   return ((float)png_get_y_offset_microns(png_ptr, info_ptr)\n     *.00003937);\n}\n\n#ifdef PNG_pHYs_SUPPORTED\npng_uint_32 PNGAPI\npng_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)\n{\n   png_uint_32 retval = 0;\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))\n   {\n      png_debug1(1, \"in %s retrieval function\", \"pHYs\");\n\n      if (res_x != NULL)\n      {\n         *res_x = info_ptr->x_pixels_per_unit;\n         retval |= PNG_INFO_pHYs;\n      }\n      if (res_y != NULL)\n      {\n         *res_y = info_ptr->y_pixels_per_unit;\n         retval |= PNG_INFO_pHYs;\n      }\n      if (unit_type != NULL)\n      {\n         *unit_type = (int)info_ptr->phys_unit_type;\n         retval |= PNG_INFO_pHYs;\n         if (*unit_type == 1)\n         {\n            if (res_x != NULL) *res_x = (png_uint_32)(*res_x * .0254 + .50);\n            if (res_y != NULL) *res_y = (png_uint_32)(*res_y * .0254 + .50);\n         }\n      }\n   }\n   return (retval);\n}\n#endif /* PNG_pHYs_SUPPORTED */\n#endif  /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */\n\n/* png_get_channels really belongs in here, too, but it's been around longer */\n\n#endif  /* PNG_EASY_ACCESS_SUPPORTED */\n\npng_byte PNGAPI\npng_get_channels(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return(info_ptr->channels);\n   else\n      return (0);\n}\n\npng_bytep PNGAPI\npng_get_signature(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr != NULL && info_ptr != NULL)\n      return(info_ptr->signature);\n   else\n      return (NULL);\n}\n\n#ifdef PNG_bKGD_SUPPORTED\npng_uint_32 PNGAPI\npng_get_bKGD(png_structp png_ptr, png_infop info_ptr,\n   png_color_16p *background)\n{\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)\n      && background != NULL)\n   {\n      png_debug1(1, \"in %s retrieval function\", \"bKGD\");\n\n      *background = &(info_ptr->background);\n      return (PNG_INFO_bKGD);\n   }\n   return (0);\n}\n#endif\n\n#ifdef PNG_cHRM_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\npng_uint_32 PNGAPI\npng_get_cHRM(png_structp png_ptr, png_infop info_ptr,\n   double *white_x, double *white_y, double *red_x, double *red_y,\n   double *green_x, double *green_y, double *blue_x, double *blue_y)\n{\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))\n   {\n      png_debug1(1, \"in %s retrieval function\", \"cHRM\");\n\n      if (white_x != NULL)\n         *white_x = (double)info_ptr->x_white;\n      if (white_y != NULL)\n         *white_y = (double)info_ptr->y_white;\n      if (red_x != NULL)\n         *red_x = (double)info_ptr->x_red;\n      if (red_y != NULL)\n         *red_y = (double)info_ptr->y_red;\n      if (green_x != NULL)\n         *green_x = (double)info_ptr->x_green;\n      if (green_y != NULL)\n         *green_y = (double)info_ptr->y_green;\n      if (blue_x != NULL)\n         *blue_x = (double)info_ptr->x_blue;\n      if (blue_y != NULL)\n         *blue_y = (double)info_ptr->y_blue;\n      return (PNG_INFO_cHRM);\n   }\n   return (0);\n}\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\npng_uint_32 PNGAPI\npng_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,\n   png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x,\n   png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y,\n   png_fixed_point *blue_x, png_fixed_point *blue_y)\n{\n   png_debug1(1, \"in %s retrieval function\", \"cHRM\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))\n   {\n      if (white_x != NULL)\n         *white_x = info_ptr->int_x_white;\n      if (white_y != NULL)\n         *white_y = info_ptr->int_y_white;\n      if (red_x != NULL)\n         *red_x = info_ptr->int_x_red;\n      if (red_y != NULL)\n         *red_y = info_ptr->int_y_red;\n      if (green_x != NULL)\n         *green_x = info_ptr->int_x_green;\n      if (green_y != NULL)\n         *green_y = info_ptr->int_y_green;\n      if (blue_x != NULL)\n         *blue_x = info_ptr->int_x_blue;\n      if (blue_y != NULL)\n         *blue_y = info_ptr->int_y_blue;\n      return (PNG_INFO_cHRM);\n   }\n   return (0);\n}\n#endif\n#endif\n\n#ifdef PNG_gAMA_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\npng_uint_32 PNGAPI\npng_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)\n{\n   png_debug1(1, \"in %s retrieval function\", \"gAMA\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)\n      && file_gamma != NULL)\n   {\n      *file_gamma = (double)info_ptr->gamma;\n      return (PNG_INFO_gAMA);\n   }\n   return (0);\n}\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\npng_uint_32 PNGAPI\npng_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,\n    png_fixed_point *int_file_gamma)\n{\n   png_debug1(1, \"in %s retrieval function\", \"gAMA\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)\n      && int_file_gamma != NULL)\n   {\n      *int_file_gamma = info_ptr->int_gamma;\n      return (PNG_INFO_gAMA);\n   }\n   return (0);\n}\n#endif\n#endif\n\n#ifdef PNG_sRGB_SUPPORTED\npng_uint_32 PNGAPI\npng_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)\n{\n   png_debug1(1, \"in %s retrieval function\", \"sRGB\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)\n      && file_srgb_intent != NULL)\n   {\n      *file_srgb_intent = (int)info_ptr->srgb_intent;\n      return (PNG_INFO_sRGB);\n   }\n   return (0);\n}\n#endif\n\n#ifdef PNG_iCCP_SUPPORTED\npng_uint_32 PNGAPI\npng_get_iCCP(png_structp png_ptr, png_infop info_ptr,\n             png_charpp name, int *compression_type,\n             png_charpp profile, png_uint_32 *proflen)\n{\n   png_debug1(1, \"in %s retrieval function\", \"iCCP\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)\n      && name != NULL && profile != NULL && proflen != NULL)\n   {\n      *name = info_ptr->iccp_name;\n      *profile = info_ptr->iccp_profile;\n      /* Compression_type is a dummy so the API won't have to change\n       * if we introduce multiple compression types later.\n       */\n      *proflen = (int)info_ptr->iccp_proflen;\n      *compression_type = (int)info_ptr->iccp_compression;\n      return (PNG_INFO_iCCP);\n   }\n   return (0);\n}\n#endif\n\n#ifdef PNG_sPLT_SUPPORTED\npng_uint_32 PNGAPI\npng_get_sPLT(png_structp png_ptr, png_infop info_ptr,\n             png_sPLT_tpp spalettes)\n{\n   if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)\n   {\n     *spalettes = info_ptr->splt_palettes;\n     return ((png_uint_32)info_ptr->splt_palettes_num);\n   }\n   return (0);\n}\n#endif\n\n#ifdef PNG_hIST_SUPPORTED\npng_uint_32 PNGAPI\npng_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)\n{\n   png_debug1(1, \"in %s retrieval function\", \"hIST\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)\n      && hist != NULL)\n   {\n      *hist = info_ptr->hist;\n      return (PNG_INFO_hIST);\n   }\n   return (0);\n}\n#endif\n\npng_uint_32 PNGAPI\npng_get_IHDR(png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 *width, png_uint_32 *height, int *bit_depth,\n   int *color_type, int *interlace_type, int *compression_type,\n   int *filter_type)\n\n{\n   png_debug1(1, \"in %s retrieval function\", \"IHDR\");\n\n   if (png_ptr == NULL || info_ptr == NULL || width == NULL ||\n       height == NULL || bit_depth == NULL || color_type == NULL)\n      return (0);\n\n   *width = info_ptr->width;\n   *height = info_ptr->height;\n   *bit_depth = info_ptr->bit_depth;\n   *color_type = info_ptr->color_type;\n\n   if (compression_type != NULL)\n      *compression_type = info_ptr->compression_type;\n\n   if (filter_type != NULL)\n      *filter_type = info_ptr->filter_type;\n\n   if (interlace_type != NULL)\n      *interlace_type = info_ptr->interlace_type;\n\n   /* This is redundant if we can be sure that the info_ptr values were all\n    * assigned in png_set_IHDR().  We do the check anyhow in case an\n    * application has ignored our advice not to mess with the members\n    * of info_ptr directly.\n    */\n   png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height,\n       info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,\n       info_ptr->compression_type, info_ptr->filter_type);\n\n   return (1);\n}\n\n#ifdef PNG_oFFs_SUPPORTED\npng_uint_32 PNGAPI\npng_get_oFFs(png_structp png_ptr, png_infop info_ptr,\n   png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)\n{\n   png_debug1(1, \"in %s retrieval function\", \"oFFs\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)\n      && offset_x != NULL && offset_y != NULL && unit_type != NULL)\n   {\n      *offset_x = info_ptr->x_offset;\n      *offset_y = info_ptr->y_offset;\n      *unit_type = (int)info_ptr->offset_unit_type;\n      return (PNG_INFO_oFFs);\n   }\n   return (0);\n}\n#endif\n\n#ifdef PNG_pCAL_SUPPORTED\npng_uint_32 PNGAPI\npng_get_pCAL(png_structp png_ptr, png_infop info_ptr,\n   png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams,\n   png_charp *units, png_charpp *params)\n{\n   png_debug1(1, \"in %s retrieval function\", \"pCAL\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)\n       && purpose != NULL && X0 != NULL && X1 != NULL && type != NULL &&\n       nparams != NULL && units != NULL && params != NULL)\n   {\n      *purpose = info_ptr->pcal_purpose;\n      *X0 = info_ptr->pcal_X0;\n      *X1 = info_ptr->pcal_X1;\n      *type = (int)info_ptr->pcal_type;\n      *nparams = (int)info_ptr->pcal_nparams;\n      *units = info_ptr->pcal_units;\n      *params = info_ptr->pcal_params;\n      return (PNG_INFO_pCAL);\n   }\n   return (0);\n}\n#endif\n\n#ifdef PNG_sCAL_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\npng_uint_32 PNGAPI\npng_get_sCAL(png_structp png_ptr, png_infop info_ptr,\n             int *unit, double *width, double *height)\n{\n    if (png_ptr != NULL && info_ptr != NULL &&\n        (info_ptr->valid & PNG_INFO_sCAL))\n    {\n        *unit = info_ptr->scal_unit;\n        *width = info_ptr->scal_pixel_width;\n        *height = info_ptr->scal_pixel_height;\n        return (PNG_INFO_sCAL);\n    }\n    return(0);\n}\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\npng_uint_32 PNGAPI\npng_get_sCAL_s(png_structp png_ptr, png_infop info_ptr,\n             int *unit, png_charpp width, png_charpp height)\n{\n    if (png_ptr != NULL && info_ptr != NULL &&\n        (info_ptr->valid & PNG_INFO_sCAL))\n    {\n        *unit = info_ptr->scal_unit;\n        *width = info_ptr->scal_s_width;\n        *height = info_ptr->scal_s_height;\n        return (PNG_INFO_sCAL);\n    }\n    return(0);\n}\n#endif\n#endif\n#endif\n\n#ifdef PNG_pHYs_SUPPORTED\npng_uint_32 PNGAPI\npng_get_pHYs(png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)\n{\n   png_uint_32 retval = 0;\n\n   png_debug1(1, \"in %s retrieval function\", \"pHYs\");\n\n   if (png_ptr != NULL && info_ptr != NULL &&\n      (info_ptr->valid & PNG_INFO_pHYs))\n   {\n      if (res_x != NULL)\n      {\n         *res_x = info_ptr->x_pixels_per_unit;\n         retval |= PNG_INFO_pHYs;\n      }\n\n      if (res_y != NULL)\n      {\n         *res_y = info_ptr->y_pixels_per_unit;\n         retval |= PNG_INFO_pHYs;\n      }\n\n      if (unit_type != NULL)\n      {\n         *unit_type = (int)info_ptr->phys_unit_type;\n         retval |= PNG_INFO_pHYs;\n      }\n   }\n   return (retval);\n}\n#endif\n\npng_uint_32 PNGAPI\npng_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,\n   int *num_palette)\n{\n   png_debug1(1, \"in %s retrieval function\", \"PLTE\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE)\n       && palette != NULL)\n   {\n      *palette = info_ptr->palette;\n      *num_palette = info_ptr->num_palette;\n      png_debug1(3, \"num_palette = %d\", *num_palette);\n      return (PNG_INFO_PLTE);\n   }\n   return (0);\n}\n\n#ifdef PNG_sBIT_SUPPORTED\npng_uint_32 PNGAPI\npng_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)\n{\n   png_debug1(1, \"in %s retrieval function\", \"sBIT\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)\n      && sig_bit != NULL)\n   {\n      *sig_bit = &(info_ptr->sig_bit);\n      return (PNG_INFO_sBIT);\n   }\n   return (0);\n}\n#endif\n\n#ifdef PNG_TEXT_SUPPORTED\npng_uint_32 PNGAPI\npng_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,\n   int *num_text)\n{\n   if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)\n   {\n      png_debug1(1, \"in %s retrieval function\",\n         (png_ptr->chunk_name[0] == '\\0' ? \"text\"\n             : (png_const_charp)png_ptr->chunk_name));\n\n      if (text_ptr != NULL)\n         *text_ptr = info_ptr->text;\n\n      if (num_text != NULL)\n         *num_text = info_ptr->num_text;\n\n      return ((png_uint_32)info_ptr->num_text);\n   }\n   if (num_text != NULL)\n     *num_text = 0;\n   return(0);\n}\n#endif\n\n#ifdef PNG_tIME_SUPPORTED\npng_uint_32 PNGAPI\npng_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)\n{\n   png_debug1(1, \"in %s retrieval function\", \"tIME\");\n\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)\n       && mod_time != NULL)\n   {\n      *mod_time = &(info_ptr->mod_time);\n      return (PNG_INFO_tIME);\n   }\n   return (0);\n}\n#endif\n\n#ifdef PNG_tRNS_SUPPORTED\npng_uint_32 PNGAPI\npng_get_tRNS(png_structp png_ptr, png_infop info_ptr,\n   png_bytep *trans, int *num_trans, png_color_16p *trans_values)\n{\n   png_uint_32 retval = 0;\n   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))\n   {\n      png_debug1(1, \"in %s retrieval function\", \"tRNS\");\n\n      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      {\n          if (trans != NULL)\n          {\n             *trans = info_ptr->trans;\n             retval |= PNG_INFO_tRNS;\n          }\n\n          if (trans_values != NULL)\n             *trans_values = &(info_ptr->trans_values);\n      }\n      else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */\n      {\n          if (trans_values != NULL)\n          {\n             *trans_values = &(info_ptr->trans_values);\n             retval |= PNG_INFO_tRNS;\n          }\n\n          if (trans != NULL)\n             *trans = NULL;\n      }\n      if (num_trans != NULL)\n      {\n         *num_trans = info_ptr->num_trans;\n         retval |= PNG_INFO_tRNS;\n      }\n   }\n   return (retval);\n}\n#endif\n\n#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\npng_uint_32 PNGAPI\npng_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,\n             png_unknown_chunkpp unknowns)\n{\n   if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL)\n   {\n     *unknowns = info_ptr->unknown_chunks;\n     return ((png_uint_32)info_ptr->unknown_chunks_num);\n   }\n   return (0);\n}\n#endif\n\n#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\npng_byte PNGAPI\npng_get_rgb_to_gray_status (png_structp png_ptr)\n{\n   return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0);\n}\n#endif\n\n#ifdef PNG_USER_CHUNKS_SUPPORTED\npng_voidp PNGAPI\npng_get_user_chunk_ptr(png_structp png_ptr)\n{\n   return (png_ptr? png_ptr->user_chunk_ptr : NULL);\n}\n#endif\n\npng_uint_32 PNGAPI\npng_get_compression_buffer_size(png_structp png_ptr)\n{\n   return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L);\n}\n\n#ifdef PNG_ASSEMBLER_CODE_SUPPORTED\n#ifndef PNG_1_0_X\n/* This function was added to libpng 1.2.0 and should exist by default */\npng_uint_32 PNGAPI\npng_get_asm_flags (png_structp png_ptr)\n{\n    /* Obsolete, to be removed from libpng-1.4.0 */\n    return (png_ptr? 0L: 0L);\n}\n\n/* This function was added to libpng 1.2.0 and should exist by default */\npng_uint_32 PNGAPI\npng_get_asm_flagmask (int flag_select)\n{\n    /* Obsolete, to be removed from libpng-1.4.0 */\n    flag_select=flag_select;\n    return 0L;\n}\n\n    /* GRR:  could add this:   && defined(PNG_MMX_CODE_SUPPORTED) */\n/* This function was added to libpng 1.2.0 */\npng_uint_32 PNGAPI\npng_get_mmx_flagmask (int flag_select, int *compilerID)\n{\n    /* Obsolete, to be removed from libpng-1.4.0 */\n    flag_select=flag_select;\n    *compilerID = -1;   /* unknown (i.e., no asm/MMX code compiled) */\n    return 0L;\n}\n\n/* This function was added to libpng 1.2.0 */\npng_byte PNGAPI\npng_get_mmx_bitdepth_threshold (png_structp png_ptr)\n{\n    /* Obsolete, to be removed from libpng-1.4.0 */\n    return (png_ptr? 0: 0);\n}\n\n/* This function was added to libpng 1.2.0 */\npng_uint_32 PNGAPI\npng_get_mmx_rowbytes_threshold (png_structp png_ptr)\n{\n    /* Obsolete, to be removed from libpng-1.4.0 */\n    return (png_ptr? 0L: 0L);\n}\n#endif /* ?PNG_1_0_X */\n#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */\n\n#ifdef PNG_SET_USER_LIMITS_SUPPORTED\n/* These functions were added to libpng 1.2.6 but not enabled\n* by default. They will be enabled in libpng-1.4.0 */\npng_uint_32 PNGAPI\npng_get_user_width_max (png_structp png_ptr)\n{\n    return (png_ptr? png_ptr->user_width_max : 0);\n}\npng_uint_32 PNGAPI\npng_get_user_height_max (png_structp png_ptr)\n{\n    return (png_ptr? png_ptr->user_height_max : 0);\n}\n#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */\n\n#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngmem.c",
    "content": "\n/* pngmem.c - stub functions for memory allocation\n *\n * Last changed in libpng 1.2.41 [February 25, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n * This file provides a location for all memory allocation.  Users who\n * need special memory handling are expected to supply replacement\n * functions for png_malloc() and png_free(), and to use\n * png_create_read_struct_2() and png_create_write_struct_2() to\n * identify the replacement functions.\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)\n\n/* Borland DOS special memory handler */\n#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)\n/* If you change this, be sure to change the one in png.h also */\n\n/* Allocate memory for a png_struct.  The malloc and memset can be replaced\n   by a single call to calloc() if this is thought to improve performance. */\npng_voidp /* PRIVATE */\npng_create_struct(int type)\n{\n#ifdef PNG_USER_MEM_SUPPORTED\n   return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));\n}\n\n/* Alternate version of png_create_struct, for use with user-defined malloc. */\npng_voidp /* PRIVATE */\npng_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)\n{\n#endif /* PNG_USER_MEM_SUPPORTED */\n   png_size_t size;\n   png_voidp struct_ptr;\n\n   if (type == PNG_STRUCT_INFO)\n      size = png_sizeof(png_info);\n   else if (type == PNG_STRUCT_PNG)\n      size = png_sizeof(png_struct);\n   else\n      return (png_get_copyright(NULL));\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   if (malloc_fn != NULL)\n   {\n      png_struct dummy_struct;\n      png_structp png_ptr = &dummy_struct;\n      png_ptr->mem_ptr=mem_ptr;\n      struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size);\n   }\n   else\n#endif /* PNG_USER_MEM_SUPPORTED */\n   struct_ptr = (png_voidp)farmalloc(size);\n   if (struct_ptr != NULL)\n      png_memset(struct_ptr, 0, size);\n   return (struct_ptr);\n}\n\n/* Free memory allocated by a png_create_struct() call */\nvoid /* PRIVATE */\npng_destroy_struct(png_voidp struct_ptr)\n{\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);\n}\n\n/* Free memory allocated by a png_create_struct() call */\nvoid /* PRIVATE */\npng_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,\n    png_voidp mem_ptr)\n{\n#endif\n   if (struct_ptr != NULL)\n   {\n#ifdef PNG_USER_MEM_SUPPORTED\n      if (free_fn != NULL)\n      {\n         png_struct dummy_struct;\n         png_structp png_ptr = &dummy_struct;\n         png_ptr->mem_ptr=mem_ptr;\n         (*(free_fn))(png_ptr, struct_ptr);\n         return;\n      }\n#endif /* PNG_USER_MEM_SUPPORTED */\n      farfree (struct_ptr);\n   }\n}\n\n/* Allocate memory.  For reasonable files, size should never exceed\n * 64K.  However, zlib may allocate more then 64K if you don't tell\n * it not to.  See zconf.h and png.h for more information. zlib does\n * need to allocate exactly 64K, so whatever you call here must\n * have the ability to do that.\n *\n * Borland seems to have a problem in DOS mode for exactly 64K.\n * It gives you a segment with an offset of 8 (perhaps to store its\n * memory stuff).  zlib doesn't like this at all, so we have to\n * detect and deal with it.  This code should not be needed in\n * Windows or OS/2 modes, and only in 16 bit mode.  This code has\n * been updated by Alexander Lehmann for version 0.89 to waste less\n * memory.\n *\n * Note that we can't use png_size_t for the \"size\" declaration,\n * since on some systems a png_size_t is a 16-bit quantity, and as a\n * result, we would be truncating potentially larger memory requests\n * (which should cause a fatal error) and introducing major problems.\n */\npng_voidp /* PRIVATE */\npng_calloc(png_structp png_ptr, png_uint_32 size)\n{\n   png_voidp ret;\n\n   ret = (png_malloc(png_ptr, size));\n   if (ret != NULL)\n      png_memset(ret,0,(png_size_t)size);\n   return (ret);\n}\n\npng_voidp PNGAPI\npng_malloc(png_structp png_ptr, png_uint_32 size)\n{\n   png_voidp ret;\n\n   if (png_ptr == NULL || size == 0)\n      return (NULL);\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   if (png_ptr->malloc_fn != NULL)\n      ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));\n   else\n      ret = (png_malloc_default(png_ptr, size));\n   if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)\n       png_error(png_ptr, \"Out of memory!\");\n   return (ret);\n}\n\npng_voidp PNGAPI\npng_malloc_default(png_structp png_ptr, png_uint_32 size)\n{\n   png_voidp ret;\n#endif /* PNG_USER_MEM_SUPPORTED */\n\n   if (png_ptr == NULL || size == 0)\n      return (NULL);\n\n#ifdef PNG_MAX_MALLOC_64K\n   if (size > (png_uint_32)65536L)\n   {\n      png_warning(png_ptr, \"Cannot Allocate > 64K\");\n      ret = NULL;\n   }\n   else\n#endif\n\n   if (size != (size_t)size)\n      ret = NULL;\n   else if (size == (png_uint_32)65536L)\n   {\n      if (png_ptr->offset_table == NULL)\n      {\n         /* Try to see if we need to do any of this fancy stuff */\n         ret = farmalloc(size);\n         if (ret == NULL || ((png_size_t)ret & 0xffff))\n         {\n            int num_blocks;\n            png_uint_32 total_size;\n            png_bytep table;\n            int i;\n            png_byte huge * hptr;\n\n            if (ret != NULL)\n            {\n               farfree(ret);\n               ret = NULL;\n            }\n\n            if (png_ptr->zlib_window_bits > 14)\n               num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14));\n            else\n               num_blocks = 1;\n            if (png_ptr->zlib_mem_level >= 7)\n               num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7));\n            else\n               num_blocks++;\n\n            total_size = ((png_uint_32)65536L) * (png_uint_32)num_blocks+16;\n\n            table = farmalloc(total_size);\n\n            if (table == NULL)\n            {\n#ifndef PNG_USER_MEM_SUPPORTED\n               if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)\n                  png_error(png_ptr, \"Out Of Memory.\"); /* Note \"O\", \"M\" */\n               else\n                  png_warning(png_ptr, \"Out Of Memory.\");\n#endif\n               return (NULL);\n            }\n\n            if ((png_size_t)table & 0xfff0)\n            {\n#ifndef PNG_USER_MEM_SUPPORTED\n               if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)\n                  png_error(png_ptr,\n                    \"Farmalloc didn't return normalized pointer\");\n               else\n                  png_warning(png_ptr,\n                    \"Farmalloc didn't return normalized pointer\");\n#endif\n               return (NULL);\n            }\n\n            png_ptr->offset_table = table;\n            png_ptr->offset_table_ptr = farmalloc(num_blocks *\n               png_sizeof(png_bytep));\n\n            if (png_ptr->offset_table_ptr == NULL)\n            {\n#ifndef PNG_USER_MEM_SUPPORTED\n               if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)\n                  png_error(png_ptr, \"Out Of memory.\"); /* Note \"O\", \"m\" */\n               else\n                  png_warning(png_ptr, \"Out Of memory.\");\n#endif\n               return (NULL);\n            }\n\n            hptr = (png_byte huge *)table;\n            if ((png_size_t)hptr & 0xf)\n            {\n               hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L);\n               hptr = hptr + 16L;  /* \"hptr += 16L\" fails on Turbo C++ 3.0 */\n            }\n            for (i = 0; i < num_blocks; i++)\n            {\n               png_ptr->offset_table_ptr[i] = (png_bytep)hptr;\n               hptr = hptr + (png_uint_32)65536L;  /* \"+=\" fails on TC++3.0 */\n            }\n\n            png_ptr->offset_table_number = num_blocks;\n            png_ptr->offset_table_count = 0;\n            png_ptr->offset_table_count_free = 0;\n         }\n      }\n\n      if (png_ptr->offset_table_count >= png_ptr->offset_table_number)\n      {\n#ifndef PNG_USER_MEM_SUPPORTED\n         if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)\n            png_error(png_ptr, \"Out of Memory.\"); /* Note \"o\" and \"M\" */\n         else\n            png_warning(png_ptr, \"Out of Memory.\");\n#endif\n         return (NULL);\n      }\n\n      ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++];\n   }\n   else\n      ret = farmalloc(size);\n\n#ifndef PNG_USER_MEM_SUPPORTED\n   if (ret == NULL)\n   {\n      if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)\n         png_error(png_ptr, \"Out of memory.\"); /* Note \"o\" and \"m\" */\n      else\n         png_warning(png_ptr, \"Out of memory.\"); /* Note \"o\" and \"m\" */\n   }\n#endif\n\n   return (ret);\n}\n\n/* Free a pointer allocated by png_malloc().  In the default\n * configuration, png_ptr is not used, but is passed in case it\n * is needed.  If ptr is NULL, return without taking any action.\n */\nvoid PNGAPI\npng_free(png_structp png_ptr, png_voidp ptr)\n{\n   if (png_ptr == NULL || ptr == NULL)\n      return;\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   if (png_ptr->free_fn != NULL)\n   {\n      (*(png_ptr->free_fn))(png_ptr, ptr);\n      return;\n   }\n   else\n      png_free_default(png_ptr, ptr);\n}\n\nvoid PNGAPI\npng_free_default(png_structp png_ptr, png_voidp ptr)\n{\n#endif /* PNG_USER_MEM_SUPPORTED */\n\n   if (png_ptr == NULL || ptr == NULL)\n      return;\n\n   if (png_ptr->offset_table != NULL)\n   {\n      int i;\n\n      for (i = 0; i < png_ptr->offset_table_count; i++)\n      {\n         if (ptr == png_ptr->offset_table_ptr[i])\n         {\n            ptr = NULL;\n            png_ptr->offset_table_count_free++;\n            break;\n         }\n      }\n      if (png_ptr->offset_table_count_free == png_ptr->offset_table_count)\n      {\n         farfree(png_ptr->offset_table);\n         farfree(png_ptr->offset_table_ptr);\n         png_ptr->offset_table = NULL;\n         png_ptr->offset_table_ptr = NULL;\n      }\n   }\n\n   if (ptr != NULL)\n   {\n      farfree(ptr);\n   }\n}\n\n#else /* Not the Borland DOS special memory handler */\n\n/* Allocate memory for a png_struct or a png_info.  The malloc and\n   memset can be replaced by a single call to calloc() if this is thought\n   to improve performance noticably. */\npng_voidp /* PRIVATE */\npng_create_struct(int type)\n{\n#ifdef PNG_USER_MEM_SUPPORTED\n   return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));\n}\n\n/* Allocate memory for a png_struct or a png_info.  The malloc and\n   memset can be replaced by a single call to calloc() if this is thought\n   to improve performance noticably. */\npng_voidp /* PRIVATE */\npng_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)\n{\n#endif /* PNG_USER_MEM_SUPPORTED */\n   png_size_t size;\n   png_voidp struct_ptr;\n\n   if (type == PNG_STRUCT_INFO)\n      size = png_sizeof(png_info);\n   else if (type == PNG_STRUCT_PNG)\n      size = png_sizeof(png_struct);\n   else\n      return (NULL);\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   if (malloc_fn != NULL)\n   {\n      png_struct dummy_struct;\n      png_structp png_ptr = &dummy_struct;\n      png_ptr->mem_ptr=mem_ptr;\n      struct_ptr = (*(malloc_fn))(png_ptr, size);\n      if (struct_ptr != NULL)\n         png_memset(struct_ptr, 0, size);\n      return (struct_ptr);\n   }\n#endif /* PNG_USER_MEM_SUPPORTED */\n\n#if defined(__TURBOC__) && !defined(__FLAT__)\n   struct_ptr = (png_voidp)farmalloc(size);\n#else\n# if defined(_MSC_VER) && defined(MAXSEG_64K)\n   struct_ptr = (png_voidp)halloc(size, 1);\n# else\n   struct_ptr = (png_voidp)malloc(size);\n# endif\n#endif\n   if (struct_ptr != NULL)\n      png_memset(struct_ptr, 0, size);\n\n   return (struct_ptr);\n}\n\n\n/* Free memory allocated by a png_create_struct() call */\nvoid /* PRIVATE */\npng_destroy_struct(png_voidp struct_ptr)\n{\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);\n}\n\n/* Free memory allocated by a png_create_struct() call */\nvoid /* PRIVATE */\npng_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,\n    png_voidp mem_ptr)\n{\n#endif /* PNG_USER_MEM_SUPPORTED */\n   if (struct_ptr != NULL)\n   {\n#ifdef PNG_USER_MEM_SUPPORTED\n      if (free_fn != NULL)\n      {\n         png_struct dummy_struct;\n         png_structp png_ptr = &dummy_struct;\n         png_ptr->mem_ptr=mem_ptr;\n         (*(free_fn))(png_ptr, struct_ptr);\n         return;\n      }\n#endif /* PNG_USER_MEM_SUPPORTED */\n#if defined(__TURBOC__) && !defined(__FLAT__)\n      farfree(struct_ptr);\n#else\n# if defined(_MSC_VER) && defined(MAXSEG_64K)\n      hfree(struct_ptr);\n# else\n      free(struct_ptr);\n# endif\n#endif\n   }\n}\n\n/* Allocate memory.  For reasonable files, size should never exceed\n * 64K.  However, zlib may allocate more then 64K if you don't tell\n * it not to.  See zconf.h and png.h for more information.  zlib does\n * need to allocate exactly 64K, so whatever you call here must\n * have the ability to do that.\n */\n\npng_voidp PNGAPI\npng_calloc(png_structp png_ptr, png_uint_32 size)\n{\n   png_voidp ret;\n\n   ret = (png_malloc(png_ptr, size));\n   if (ret != NULL)\n      png_memset(ret,0,(png_size_t)size);\n   return (ret);\n}\n\npng_voidp PNGAPI\npng_malloc(png_structp png_ptr, png_uint_32 size)\n{\n   png_voidp ret;\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   if (png_ptr == NULL || size == 0)\n      return (NULL);\n\n   if (png_ptr->malloc_fn != NULL)\n      ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));\n   else\n      ret = (png_malloc_default(png_ptr, size));\n   if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)\n       png_error(png_ptr, \"Out of Memory!\");\n   return (ret);\n}\n\npng_voidp PNGAPI\npng_malloc_default(png_structp png_ptr, png_uint_32 size)\n{\n   png_voidp ret;\n#endif /* PNG_USER_MEM_SUPPORTED */\n\n   if (png_ptr == NULL || size == 0)\n      return (NULL);\n\n#ifdef PNG_MAX_MALLOC_64K\n   if (size > (png_uint_32)65536L)\n   {\n#ifndef PNG_USER_MEM_SUPPORTED\n      if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)\n         png_error(png_ptr, \"Cannot Allocate > 64K\");\n      else\n#endif\n         return NULL;\n   }\n#endif\n\n   /* Check for overflow */\n#if defined(__TURBOC__) && !defined(__FLAT__)\n   if (size != (unsigned long)size)\n      ret = NULL;\n   else\n      ret = farmalloc(size);\n#else\n# if defined(_MSC_VER) && defined(MAXSEG_64K)\n   if (size != (unsigned long)size)\n      ret = NULL;\n   else\n      ret = halloc(size, 1);\n# else\n   if (size != (size_t)size)\n      ret = NULL;\n   else\n      ret = malloc((size_t)size);\n# endif\n#endif\n\n#ifndef PNG_USER_MEM_SUPPORTED\n   if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)\n      png_error(png_ptr, \"Out of Memory\");\n#endif\n\n   return (ret);\n}\n\n/* Free a pointer allocated by png_malloc().  If ptr is NULL, return\n * without taking any action.\n */\nvoid PNGAPI\npng_free(png_structp png_ptr, png_voidp ptr)\n{\n   if (png_ptr == NULL || ptr == NULL)\n      return;\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   if (png_ptr->free_fn != NULL)\n   {\n      (*(png_ptr->free_fn))(png_ptr, ptr);\n      return;\n   }\n   else\n      png_free_default(png_ptr, ptr);\n}\nvoid PNGAPI\npng_free_default(png_structp png_ptr, png_voidp ptr)\n{\n   if (png_ptr == NULL || ptr == NULL)\n      return;\n\n#endif /* PNG_USER_MEM_SUPPORTED */\n\n#if defined(__TURBOC__) && !defined(__FLAT__)\n   farfree(ptr);\n#else\n# if defined(_MSC_VER) && defined(MAXSEG_64K)\n   hfree(ptr);\n# else\n   free(ptr);\n# endif\n#endif\n}\n\n#endif /* Not Borland DOS special memory handler */\n\n#ifdef PNG_1_0_X\n#  define png_malloc_warn png_malloc\n#else\n/* This function was added at libpng version 1.2.3.  The png_malloc_warn()\n * function will set up png_malloc() to issue a png_warning and return NULL\n * instead of issuing a png_error, if it fails to allocate the requested\n * memory.\n */\npng_voidp PNGAPI\npng_malloc_warn(png_structp png_ptr, png_uint_32 size)\n{\n   png_voidp ptr;\n   png_uint_32 save_flags;\n   if (png_ptr == NULL)\n      return (NULL);\n\n   save_flags = png_ptr->flags;\n   png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;\n   ptr = (png_voidp)png_malloc((png_structp)png_ptr, size);\n   png_ptr->flags=save_flags;\n   return(ptr);\n}\n#endif\n\npng_voidp PNGAPI\npng_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2,\n   png_uint_32 length)\n{\n   png_size_t size;\n\n   size = (png_size_t)length;\n   if ((png_uint_32)size != length)\n      png_error(png_ptr, \"Overflow in png_memcpy_check.\");\n\n   return(png_memcpy (s1, s2, size));\n}\n\npng_voidp PNGAPI\npng_memset_check (png_structp png_ptr, png_voidp s1, int value,\n   png_uint_32 length)\n{\n   png_size_t size;\n\n   size = (png_size_t)length;\n   if ((png_uint_32)size != length)\n      png_error(png_ptr, \"Overflow in png_memset_check.\");\n\n   return (png_memset (s1, value, size));\n\n}\n\n#ifdef PNG_USER_MEM_SUPPORTED\n/* This function is called when the application wants to use another method\n * of allocating and freeing memory.\n */\nvoid PNGAPI\npng_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr\n  malloc_fn, png_free_ptr free_fn)\n{\n   if (png_ptr != NULL)\n   {\n      png_ptr->mem_ptr = mem_ptr;\n      png_ptr->malloc_fn = malloc_fn;\n      png_ptr->free_fn = free_fn;\n   }\n}\n\n/* This function returns a pointer to the mem_ptr associated with the user\n * functions.  The application should free any memory associated with this\n * pointer before png_write_destroy and png_read_destroy are called.\n */\npng_voidp PNGAPI\npng_get_mem_ptr(png_structp png_ptr)\n{\n   if (png_ptr == NULL)\n      return (NULL);\n   return ((png_voidp)png_ptr->mem_ptr);\n}\n#endif /* PNG_USER_MEM_SUPPORTED */\n#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngpread.c",
    "content": "\n/* pngpread.c - read a png file in push mode\n *\n * Last changed in libpng 1.2.44 [June 26, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\n\n/* Push model modes */\n#define PNG_READ_SIG_MODE   0\n#define PNG_READ_CHUNK_MODE 1\n#define PNG_READ_IDAT_MODE  2\n#define PNG_SKIP_MODE       3\n#define PNG_READ_tEXt_MODE  4\n#define PNG_READ_zTXt_MODE  5\n#define PNG_READ_DONE_MODE  6\n#define PNG_READ_iTXt_MODE  7\n#define PNG_ERROR_MODE      8\n\nvoid PNGAPI\npng_process_data(png_structp png_ptr, png_infop info_ptr,\n   png_bytep buffer, png_size_t buffer_size)\n{\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   png_push_restore_buffer(png_ptr, buffer, buffer_size);\n\n   while (png_ptr->buffer_size)\n   {\n      png_process_some_data(png_ptr, info_ptr);\n   }\n}\n\n/* What we do with the incoming data depends on what we were previously\n * doing before we ran out of data...\n */\nvoid /* PRIVATE */\npng_process_some_data(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr == NULL)\n      return;\n\n   switch (png_ptr->process_mode)\n   {\n      case PNG_READ_SIG_MODE:\n      {\n         png_push_read_sig(png_ptr, info_ptr);\n         break;\n      }\n\n      case PNG_READ_CHUNK_MODE:\n      {\n         png_push_read_chunk(png_ptr, info_ptr);\n         break;\n      }\n\n      case PNG_READ_IDAT_MODE:\n      {\n         png_push_read_IDAT(png_ptr);\n         break;\n      }\n\n#ifdef PNG_READ_tEXt_SUPPORTED\n      case PNG_READ_tEXt_MODE:\n      {\n         png_push_read_tEXt(png_ptr, info_ptr);\n         break;\n      }\n\n#endif\n#ifdef PNG_READ_zTXt_SUPPORTED\n      case PNG_READ_zTXt_MODE:\n      {\n         png_push_read_zTXt(png_ptr, info_ptr);\n         break;\n      }\n\n#endif\n#ifdef PNG_READ_iTXt_SUPPORTED\n      case PNG_READ_iTXt_MODE:\n      {\n         png_push_read_iTXt(png_ptr, info_ptr);\n         break;\n      }\n\n#endif\n      case PNG_SKIP_MODE:\n      {\n         png_push_crc_finish(png_ptr);\n         break;\n      }\n\n      default:\n      {\n         png_ptr->buffer_size = 0;\n         break;\n      }\n   }\n}\n\n/* Read any remaining signature bytes from the stream and compare them with\n * the correct PNG signature.  It is possible that this routine is called\n * with bytes already read from the signature, either because they have been\n * checked by the calling application, or because of multiple calls to this\n * routine.\n */\nvoid /* PRIVATE */\npng_push_read_sig(png_structp png_ptr, png_infop info_ptr)\n{\n   png_size_t num_checked = png_ptr->sig_bytes,\n             num_to_check = 8 - num_checked;\n\n   if (png_ptr->buffer_size < num_to_check)\n   {\n      num_to_check = png_ptr->buffer_size;\n   }\n\n   png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]),\n      num_to_check);\n   png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes + num_to_check);\n\n   if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))\n   {\n      if (num_checked < 4 &&\n          png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))\n         png_error(png_ptr, \"Not a PNG file\");\n      else\n         png_error(png_ptr, \"PNG file corrupted by ASCII conversion\");\n   }\n   else\n   {\n      if (png_ptr->sig_bytes >= 8)\n      {\n         png_ptr->process_mode = PNG_READ_CHUNK_MODE;\n      }\n   }\n}\n\nvoid /* PRIVATE */\npng_push_read_chunk(png_structp png_ptr, png_infop info_ptr)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n      PNG_CONST PNG_IHDR;\n      PNG_CONST PNG_IDAT;\n      PNG_CONST PNG_IEND;\n      PNG_CONST PNG_PLTE;\n#ifdef PNG_READ_bKGD_SUPPORTED\n      PNG_CONST PNG_bKGD;\n#endif\n#ifdef PNG_READ_cHRM_SUPPORTED\n      PNG_CONST PNG_cHRM;\n#endif\n#ifdef PNG_READ_gAMA_SUPPORTED\n      PNG_CONST PNG_gAMA;\n#endif\n#ifdef PNG_READ_hIST_SUPPORTED\n      PNG_CONST PNG_hIST;\n#endif\n#ifdef PNG_READ_iCCP_SUPPORTED\n      PNG_CONST PNG_iCCP;\n#endif\n#ifdef PNG_READ_iTXt_SUPPORTED\n      PNG_CONST PNG_iTXt;\n#endif\n#ifdef PNG_READ_oFFs_SUPPORTED\n      PNG_CONST PNG_oFFs;\n#endif\n#ifdef PNG_READ_pCAL_SUPPORTED\n      PNG_CONST PNG_pCAL;\n#endif\n#ifdef PNG_READ_pHYs_SUPPORTED\n      PNG_CONST PNG_pHYs;\n#endif\n#ifdef PNG_READ_sBIT_SUPPORTED\n      PNG_CONST PNG_sBIT;\n#endif\n#ifdef PNG_READ_sCAL_SUPPORTED\n      PNG_CONST PNG_sCAL;\n#endif\n#ifdef PNG_READ_sRGB_SUPPORTED\n      PNG_CONST PNG_sRGB;\n#endif\n#ifdef PNG_READ_sPLT_SUPPORTED\n      PNG_CONST PNG_sPLT;\n#endif\n#ifdef PNG_READ_tEXt_SUPPORTED\n      PNG_CONST PNG_tEXt;\n#endif\n#ifdef PNG_READ_tIME_SUPPORTED\n      PNG_CONST PNG_tIME;\n#endif\n#ifdef PNG_READ_tRNS_SUPPORTED\n      PNG_CONST PNG_tRNS;\n#endif\n#ifdef PNG_READ_zTXt_SUPPORTED\n      PNG_CONST PNG_zTXt;\n#endif\n#endif /* PNG_USE_LOCAL_ARRAYS */\n\n   /* First we make sure we have enough data for the 4 byte chunk name\n    * and the 4 byte chunk length before proceeding with decoding the\n    * chunk data.  To fully decode each of these chunks, we also make\n    * sure we have enough data in the buffer for the 4 byte CRC at the\n    * end of every chunk (except IDAT, which is handled separately).\n    */\n   if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER))\n   {\n      png_byte chunk_length[4];\n\n      if (png_ptr->buffer_size < 8)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_push_fill_buffer(png_ptr, chunk_length, 4);\n      png_ptr->push_length = png_get_uint_31(png_ptr, chunk_length);\n      png_reset_crc(png_ptr);\n      png_crc_read(png_ptr, png_ptr->chunk_name, 4);\n      png_check_chunk_name(png_ptr, png_ptr->chunk_name);\n      png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;\n   }\n\n   if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))\n     if (png_ptr->mode & PNG_AFTER_IDAT)\n        png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;\n\n   if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))\n   {\n      if (png_ptr->push_length != 13)\n         png_error(png_ptr, \"Invalid IHDR length\");\n\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_IHDR(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n   else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_IEND(png_ptr, info_ptr, png_ptr->push_length);\n\n      png_ptr->process_mode = PNG_READ_DONE_MODE;\n      png_push_have_end(png_ptr, info_ptr);\n   }\n\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n   else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))\n         png_ptr->mode |= PNG_HAVE_IDAT;\n\n      png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length);\n\n      if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))\n         png_ptr->mode |= PNG_HAVE_PLTE;\n\n      else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))\n      {\n         if (!(png_ptr->mode & PNG_HAVE_IHDR))\n            png_error(png_ptr, \"Missing IHDR before IDAT\");\n\n         else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&\n                  !(png_ptr->mode & PNG_HAVE_PLTE))\n            png_error(png_ptr, \"Missing PLTE before IDAT\");\n      }\n   }\n\n#endif\n   else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n      png_handle_PLTE(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n   else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))\n   {\n      /* If we reach an IDAT chunk, this means we have read all of the\n       * header chunks, and we can start reading the image (or if this\n       * is called after the image has been read - we have an error).\n       */\n\n      if (!(png_ptr->mode & PNG_HAVE_IHDR))\n         png_error(png_ptr, \"Missing IHDR before IDAT\");\n\n      else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&\n          !(png_ptr->mode & PNG_HAVE_PLTE))\n         png_error(png_ptr, \"Missing PLTE before IDAT\");\n\n      if (png_ptr->mode & PNG_HAVE_IDAT)\n      {\n         if (!(png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))\n            if (png_ptr->push_length == 0)\n               return;\n\n         if (png_ptr->mode & PNG_AFTER_IDAT)\n            png_error(png_ptr, \"Too many IDAT's found\");\n      }\n\n      png_ptr->idat_size = png_ptr->push_length;\n      png_ptr->mode |= PNG_HAVE_IDAT;\n      png_ptr->process_mode = PNG_READ_IDAT_MODE;\n      png_push_have_info(png_ptr, info_ptr);\n      png_ptr->zstream.avail_out =\n          (uInt) PNG_ROWBYTES(png_ptr->pixel_depth,\n          png_ptr->iwidth) + 1;\n      png_ptr->zstream.next_out = png_ptr->row_buf;\n      return;\n   }\n\n#ifdef PNG_READ_gAMA_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_gAMA(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_sBIT_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_sBIT(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_cHRM_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_sRGB_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_sRGB(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_iCCP_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_iCCP(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_sPLT_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_tRNS_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_bKGD_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_hIST_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_pHYs_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_oFFs_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_oFFs(png_ptr, info_ptr, png_ptr->push_length);\n   }\n#endif\n\n#ifdef PNG_READ_pCAL_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_pCAL(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_sCAL_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_sCAL(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_tIME_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_handle_tIME(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_tEXt_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_push_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_zTXt_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_push_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n#ifdef PNG_READ_iTXt_SUPPORTED\n   else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4))\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_push_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n#endif\n   else\n   {\n      if (png_ptr->push_length + 4 > png_ptr->buffer_size)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n      png_push_handle_unknown(png_ptr, info_ptr, png_ptr->push_length);\n   }\n\n   png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;\n}\n\nvoid /* PRIVATE */\npng_push_crc_skip(png_structp png_ptr, png_uint_32 skip)\n{\n   png_ptr->process_mode = PNG_SKIP_MODE;\n   png_ptr->skip_length = skip;\n}\n\nvoid /* PRIVATE */\npng_push_crc_finish(png_structp png_ptr)\n{\n   if (png_ptr->skip_length && png_ptr->save_buffer_size)\n   {\n      png_size_t save_size;\n\n      if (png_ptr->skip_length < (png_uint_32)png_ptr->save_buffer_size)\n         save_size = (png_size_t)png_ptr->skip_length;\n      else\n         save_size = png_ptr->save_buffer_size;\n\n      png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size);\n\n      png_ptr->skip_length -= save_size;\n      png_ptr->buffer_size -= save_size;\n      png_ptr->save_buffer_size -= save_size;\n      png_ptr->save_buffer_ptr += save_size;\n   }\n   if (png_ptr->skip_length && png_ptr->current_buffer_size)\n   {\n      png_size_t save_size;\n\n      if (png_ptr->skip_length < (png_uint_32)png_ptr->current_buffer_size)\n         save_size = (png_size_t)png_ptr->skip_length;\n      else\n         save_size = png_ptr->current_buffer_size;\n\n      png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size);\n\n      png_ptr->skip_length -= save_size;\n      png_ptr->buffer_size -= save_size;\n      png_ptr->current_buffer_size -= save_size;\n      png_ptr->current_buffer_ptr += save_size;\n   }\n   if (!png_ptr->skip_length)\n   {\n      if (png_ptr->buffer_size < 4)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_crc_finish(png_ptr, 0);\n      png_ptr->process_mode = PNG_READ_CHUNK_MODE;\n   }\n}\n\nvoid PNGAPI\npng_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)\n{\n   png_bytep ptr;\n\n   if (png_ptr == NULL)\n      return;\n\n   ptr = buffer;\n   if (png_ptr->save_buffer_size)\n   {\n      png_size_t save_size;\n\n      if (length < png_ptr->save_buffer_size)\n         save_size = length;\n      else\n         save_size = png_ptr->save_buffer_size;\n\n      png_memcpy(ptr, png_ptr->save_buffer_ptr, save_size);\n      length -= save_size;\n      ptr += save_size;\n      png_ptr->buffer_size -= save_size;\n      png_ptr->save_buffer_size -= save_size;\n      png_ptr->save_buffer_ptr += save_size;\n   }\n   if (length && png_ptr->current_buffer_size)\n   {\n      png_size_t save_size;\n\n      if (length < png_ptr->current_buffer_size)\n         save_size = length;\n\n      else\n         save_size = png_ptr->current_buffer_size;\n\n      png_memcpy(ptr, png_ptr->current_buffer_ptr, save_size);\n      png_ptr->buffer_size -= save_size;\n      png_ptr->current_buffer_size -= save_size;\n      png_ptr->current_buffer_ptr += save_size;\n   }\n}\n\nvoid /* PRIVATE */\npng_push_save_buffer(png_structp png_ptr)\n{\n   if (png_ptr->save_buffer_size)\n   {\n      if (png_ptr->save_buffer_ptr != png_ptr->save_buffer)\n      {\n         png_size_t i, istop;\n         png_bytep sp;\n         png_bytep dp;\n\n         istop = png_ptr->save_buffer_size;\n         for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer;\n            i < istop; i++, sp++, dp++)\n         {\n            *dp = *sp;\n         }\n      }\n   }\n   if (png_ptr->save_buffer_size + png_ptr->current_buffer_size >\n      png_ptr->save_buffer_max)\n   {\n      png_size_t new_max;\n      png_bytep old_buffer;\n\n      if (png_ptr->save_buffer_size > PNG_SIZE_MAX -\n         (png_ptr->current_buffer_size + 256))\n      {\n        png_error(png_ptr, \"Potential overflow of save_buffer\");\n      }\n\n      new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;\n      old_buffer = png_ptr->save_buffer;\n      png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr,\n         (png_uint_32)new_max);\n      if (png_ptr->save_buffer == NULL)\n      {\n        png_free(png_ptr, old_buffer);\n        png_error(png_ptr, \"Insufficient memory for save_buffer\");\n      }\n      png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size);\n      png_free(png_ptr, old_buffer);\n      png_ptr->save_buffer_max = new_max;\n   }\n   if (png_ptr->current_buffer_size)\n   {\n      png_memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size,\n         png_ptr->current_buffer_ptr, png_ptr->current_buffer_size);\n      png_ptr->save_buffer_size += png_ptr->current_buffer_size;\n      png_ptr->current_buffer_size = 0;\n   }\n   png_ptr->save_buffer_ptr = png_ptr->save_buffer;\n   png_ptr->buffer_size = 0;\n}\n\nvoid /* PRIVATE */\npng_push_restore_buffer(png_structp png_ptr, png_bytep buffer,\n   png_size_t buffer_length)\n{\n   png_ptr->current_buffer = buffer;\n   png_ptr->current_buffer_size = buffer_length;\n   png_ptr->buffer_size = buffer_length + png_ptr->save_buffer_size;\n   png_ptr->current_buffer_ptr = png_ptr->current_buffer;\n}\n\nvoid /* PRIVATE */\npng_push_read_IDAT(png_structp png_ptr)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_CONST PNG_IDAT;\n#endif\n   if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER))\n   {\n      png_byte chunk_length[4];\n\n      if (png_ptr->buffer_size < 8)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_push_fill_buffer(png_ptr, chunk_length, 4);\n      png_ptr->push_length = png_get_uint_31(png_ptr, chunk_length);\n      png_reset_crc(png_ptr);\n      png_crc_read(png_ptr, png_ptr->chunk_name, 4);\n      png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;\n\n      if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))\n      {\n         png_ptr->process_mode = PNG_READ_CHUNK_MODE;\n         if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))\n            png_error(png_ptr, \"Not enough compressed data\");\n         return;\n      }\n\n      png_ptr->idat_size = png_ptr->push_length;\n   }\n   if (png_ptr->idat_size && png_ptr->save_buffer_size)\n   {\n      png_size_t save_size;\n\n      if (png_ptr->idat_size < (png_uint_32)png_ptr->save_buffer_size)\n      {\n         save_size = (png_size_t)png_ptr->idat_size;\n\n         /* Check for overflow */\n         if ((png_uint_32)save_size != png_ptr->idat_size)\n            png_error(png_ptr, \"save_size overflowed in pngpread\");\n      }\n      else\n         save_size = png_ptr->save_buffer_size;\n\n      png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size);\n\n      png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size);\n\n      png_ptr->idat_size -= save_size;\n      png_ptr->buffer_size -= save_size;\n      png_ptr->save_buffer_size -= save_size;\n      png_ptr->save_buffer_ptr += save_size;\n   }\n   if (png_ptr->idat_size && png_ptr->current_buffer_size)\n   {\n      png_size_t save_size;\n\n      if (png_ptr->idat_size < (png_uint_32)png_ptr->current_buffer_size)\n      {\n         save_size = (png_size_t)png_ptr->idat_size;\n\n         /* Check for overflow */\n         if ((png_uint_32)save_size != png_ptr->idat_size)\n            png_error(png_ptr, \"save_size overflowed in pngpread\");\n      }\n      else\n         save_size = png_ptr->current_buffer_size;\n\n      png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size);\n\n      png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size);\n\n      png_ptr->idat_size -= save_size;\n      png_ptr->buffer_size -= save_size;\n      png_ptr->current_buffer_size -= save_size;\n      png_ptr->current_buffer_ptr += save_size;\n   }\n   if (!png_ptr->idat_size)\n   {\n      if (png_ptr->buffer_size < 4)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_crc_finish(png_ptr, 0);\n      png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;\n      png_ptr->mode |= PNG_AFTER_IDAT;\n   }\n}\n\nvoid /* PRIVATE */\npng_process_IDAT_data(png_structp png_ptr, png_bytep buffer,\n   png_size_t buffer_length)\n{\n   /* The caller checks for a non-zero buffer length. */\n   if (!(buffer_length > 0) || buffer == NULL)\n      png_error(png_ptr, \"No IDAT data (internal error)\");\n\n   /* This routine must process all the data it has been given\n    * before returning, calling the row callback as required to\n    * handle the uncompressed results.\n    */\n   png_ptr->zstream.next_in = buffer;\n   png_ptr->zstream.avail_in = (uInt)buffer_length;\n\n   /* Keep going until the decompressed data is all processed\n    * or the stream marked as finished.\n    */\n   while (png_ptr->zstream.avail_in > 0 &&\n\t  !(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))\n   {\n      int ret;\n\n      /* We have data for zlib, but we must check that zlib\n       * has somewhere to put the results.  It doesn't matter\n       * if we don't expect any results -- it may be the input\n       * data is just the LZ end code.\n       */\n      if (!(png_ptr->zstream.avail_out > 0))\n      {\n         png_ptr->zstream.avail_out =\n             (uInt) PNG_ROWBYTES(png_ptr->pixel_depth,\n             png_ptr->iwidth) + 1;\n         png_ptr->zstream.next_out = png_ptr->row_buf;\n      }\n\n      /* Using Z_SYNC_FLUSH here means that an unterminated\n       * LZ stream can still be handled (a stream with a missing\n       * end code), otherwise (Z_NO_FLUSH) a future zlib\n       * implementation might defer output and, therefore,\n       * change the current behavior.  (See comments in inflate.c\n       * for why this doesn't happen at present with zlib 1.2.5.)\n       */\n      ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH);\n\n      /* Check for any failure before proceeding. */\n      if (ret != Z_OK && ret != Z_STREAM_END)\n      {\n\t /* Terminate the decompression. */\n\t png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;\n\n         /* This may be a truncated stream (missing or\n\t  * damaged end code).  Treat that as a warning.\n\t  */\n         if (png_ptr->row_number >= png_ptr->num_rows ||\n\t     png_ptr->pass > 6)\n\t    png_warning(png_ptr, \"Truncated compressed data in IDAT\");\n\t else\n\t    png_error(png_ptr, \"Decompression error in IDAT\");\n\n\t /* Skip the check on unprocessed input */\n         return;\n      }\n\n      /* Did inflate output any data? */\n      if (png_ptr->zstream.next_out != png_ptr->row_buf)\n      {\n\t /* Is this unexpected data after the last row?\n\t  * If it is, artificially terminate the LZ output\n\t  * here.\n\t  */\n         if (png_ptr->row_number >= png_ptr->num_rows ||\n\t     png_ptr->pass > 6)\n         {\n\t    /* Extra data. */\n\t    png_warning(png_ptr, \"Extra compressed data in IDAT\");\n            png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;\n\t    /* Do no more processing; skip the unprocessed\n\t     * input check below.\n\t     */\n            return;\n\t }\n\n\t /* Do we have a complete row? */\n\t if (png_ptr->zstream.avail_out == 0)\n\t    png_push_process_row(png_ptr);\n      }\n\n      /* And check for the end of the stream. */\n      if (ret == Z_STREAM_END)\n\t png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;\n   }\n\n   /* All the data should have been processed, if anything\n    * is left at this point we have bytes of IDAT data\n    * after the zlib end code.\n    */\n   if (png_ptr->zstream.avail_in > 0)\n      png_warning(png_ptr, \"Extra compression data\");\n}\n\nvoid /* PRIVATE */\npng_push_process_row(png_structp png_ptr)\n{\n   png_ptr->row_info.color_type = png_ptr->color_type;\n   png_ptr->row_info.width = png_ptr->iwidth;\n   png_ptr->row_info.channels = png_ptr->channels;\n   png_ptr->row_info.bit_depth = png_ptr->bit_depth;\n   png_ptr->row_info.pixel_depth = png_ptr->pixel_depth;\n\n   png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,\n       png_ptr->row_info.width);\n\n   png_read_filter_row(png_ptr, &(png_ptr->row_info),\n       png_ptr->row_buf + 1, png_ptr->prev_row + 1,\n       (int)(png_ptr->row_buf[0]));\n\n   png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,\n      png_ptr->rowbytes + 1);\n\n   if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA))\n      png_do_read_transformations(png_ptr);\n\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n   /* Blow up interlaced rows to full size */\n   if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))\n   {\n      if (png_ptr->pass < 6)\n/*       old interface (pre-1.0.9):\n         png_do_read_interlace(&(png_ptr->row_info),\n             png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations);\n */\n         png_do_read_interlace(png_ptr);\n\n    switch (png_ptr->pass)\n    {\n         case 0:\n         {\n            int i;\n            for (i = 0; i < 8 && png_ptr->pass == 0; i++)\n            {\n               png_push_have_row(png_ptr, png_ptr->row_buf + 1);\n               png_read_push_finish_row(png_ptr); /* Updates png_ptr->pass */\n            }\n\n            if (png_ptr->pass == 2) /* Pass 1 might be empty */\n            {\n               for (i = 0; i < 4 && png_ptr->pass == 2; i++)\n               {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n                  png_read_push_finish_row(png_ptr);\n               }\n            }\n\n            if (png_ptr->pass == 4 && png_ptr->height <= 4)\n            {\n               for (i = 0; i < 2 && png_ptr->pass == 4; i++)\n               {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n                  png_read_push_finish_row(png_ptr);\n               }\n            }\n\n            if (png_ptr->pass == 6 && png_ptr->height <= 4)\n            {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n                png_read_push_finish_row(png_ptr);\n            }\n\n            break;\n         }\n\n         case 1:\n         {\n            int i;\n            for (i = 0; i < 8 && png_ptr->pass == 1; i++)\n            {\n               png_push_have_row(png_ptr, png_ptr->row_buf + 1);\n               png_read_push_finish_row(png_ptr);\n            }\n\n            if (png_ptr->pass == 2) /* Skip top 4 generated rows */\n            {\n               for (i = 0; i < 4 && png_ptr->pass == 2; i++)\n               {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n                  png_read_push_finish_row(png_ptr);\n               }\n            }\n\n            break;\n         }\n\n         case 2:\n         {\n            int i;\n\n            for (i = 0; i < 4 && png_ptr->pass == 2; i++)\n            {\n               png_push_have_row(png_ptr, png_ptr->row_buf + 1);\n               png_read_push_finish_row(png_ptr);\n            }\n\n            for (i = 0; i < 4 && png_ptr->pass == 2; i++)\n            {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n               png_read_push_finish_row(png_ptr);\n            }\n\n            if (png_ptr->pass == 4) /* Pass 3 might be empty */\n            {\n               for (i = 0; i < 2 && png_ptr->pass == 4; i++)\n               {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n                  png_read_push_finish_row(png_ptr);\n               }\n            }\n\n            break;\n         }\n\n         case 3:\n         {\n            int i;\n\n            for (i = 0; i < 4 && png_ptr->pass == 3; i++)\n            {\n               png_push_have_row(png_ptr, png_ptr->row_buf + 1);\n               png_read_push_finish_row(png_ptr);\n            }\n\n            if (png_ptr->pass == 4) /* Skip top two generated rows */\n            {\n               for (i = 0; i < 2 && png_ptr->pass == 4; i++)\n               {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n                  png_read_push_finish_row(png_ptr);\n               }\n            }\n\n            break;\n         }\n\n         case 4:\n         {\n            int i;\n\n            for (i = 0; i < 2 && png_ptr->pass == 4; i++)\n            {\n               png_push_have_row(png_ptr, png_ptr->row_buf + 1);\n               png_read_push_finish_row(png_ptr);\n            }\n\n            for (i = 0; i < 2 && png_ptr->pass == 4; i++)\n            {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n               png_read_push_finish_row(png_ptr);\n            }\n\n            if (png_ptr->pass == 6) /* Pass 5 might be empty */\n            {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n               png_read_push_finish_row(png_ptr);\n            }\n\n            break;\n         }\n\n         case 5:\n         {\n            int i;\n\n            for (i = 0; i < 2 && png_ptr->pass == 5; i++)\n            {\n               png_push_have_row(png_ptr, png_ptr->row_buf + 1);\n               png_read_push_finish_row(png_ptr);\n            }\n\n            if (png_ptr->pass == 6) /* Skip top generated row */\n            {\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n               png_read_push_finish_row(png_ptr);\n            }\n\n            break;\n         }\n         case 6:\n         {\n            png_push_have_row(png_ptr, png_ptr->row_buf + 1);\n            png_read_push_finish_row(png_ptr);\n\n            if (png_ptr->pass != 6)\n               break;\n\n                  png_push_have_row(png_ptr, png_bytep_NULL);\n            png_read_push_finish_row(png_ptr);\n         }\n      }\n   }\n   else\n#endif\n   {\n      png_push_have_row(png_ptr, png_ptr->row_buf + 1);\n      png_read_push_finish_row(png_ptr);\n   }\n}\n\nvoid /* PRIVATE */\npng_read_push_finish_row(png_structp png_ptr)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */\n\n   /* Start of interlace block */\n   PNG_CONST int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};\n\n   /* Offset to next interlace block */\n   PNG_CONST int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};\n\n   /* Start of interlace block in the y direction */\n   PNG_CONST int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};\n\n   /* Offset to next interlace block in the y direction */\n   PNG_CONST int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};\n\n   /* Height of interlace block.  This is not currently used - if you need\n    * it, uncomment it here and in png.h\n   PNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};\n   */\n#endif\n\n   png_ptr->row_number++;\n   if (png_ptr->row_number < png_ptr->num_rows)\n      return;\n\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n   if (png_ptr->interlaced)\n   {\n      png_ptr->row_number = 0;\n      png_memset_check(png_ptr, png_ptr->prev_row, 0,\n         png_ptr->rowbytes + 1);\n      do\n      {\n         png_ptr->pass++;\n         if ((png_ptr->pass == 1 && png_ptr->width < 5) ||\n             (png_ptr->pass == 3 && png_ptr->width < 3) ||\n             (png_ptr->pass == 5 && png_ptr->width < 2))\n           png_ptr->pass++;\n\n         if (png_ptr->pass > 7)\n            png_ptr->pass--;\n\n         if (png_ptr->pass >= 7)\n            break;\n\n         png_ptr->iwidth = (png_ptr->width +\n            png_pass_inc[png_ptr->pass] - 1 -\n            png_pass_start[png_ptr->pass]) /\n            png_pass_inc[png_ptr->pass];\n\n         if (png_ptr->transformations & PNG_INTERLACE)\n            break;\n\n         png_ptr->num_rows = (png_ptr->height +\n            png_pass_yinc[png_ptr->pass] - 1 -\n            png_pass_ystart[png_ptr->pass]) /\n            png_pass_yinc[png_ptr->pass];\n\n      } while (png_ptr->iwidth == 0 || png_ptr->num_rows == 0);\n   }\n#endif /* PNG_READ_INTERLACING_SUPPORTED */\n}\n\n#ifdef PNG_READ_tEXt_SUPPORTED\nvoid /* PRIVATE */\npng_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32\n   length)\n{\n   if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))\n      {\n         png_error(png_ptr, \"Out of place tEXt\");\n         info_ptr = info_ptr; /* To quiet some compiler warnings */\n      }\n\n#ifdef PNG_MAX_MALLOC_64K\n   png_ptr->skip_length = 0;  /* This may not be necessary */\n\n   if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */\n   {\n      png_warning(png_ptr, \"tEXt chunk too large to fit in memory\");\n      png_ptr->skip_length = length - (png_uint_32)65535L;\n      length = (png_uint_32)65535L;\n   }\n#endif\n\n   png_ptr->current_text = (png_charp)png_malloc(png_ptr,\n      (png_uint_32)(length + 1));\n   png_ptr->current_text[length] = '\\0';\n   png_ptr->current_text_ptr = png_ptr->current_text;\n   png_ptr->current_text_size = (png_size_t)length;\n   png_ptr->current_text_left = (png_size_t)length;\n   png_ptr->process_mode = PNG_READ_tEXt_MODE;\n}\n\nvoid /* PRIVATE */\npng_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr->buffer_size && png_ptr->current_text_left)\n   {\n      png_size_t text_size;\n\n      if (png_ptr->buffer_size < png_ptr->current_text_left)\n         text_size = png_ptr->buffer_size;\n\n      else\n         text_size = png_ptr->current_text_left;\n\n      png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);\n      png_ptr->current_text_left -= text_size;\n      png_ptr->current_text_ptr += text_size;\n   }\n   if (!(png_ptr->current_text_left))\n   {\n      png_textp text_ptr;\n      png_charp text;\n      png_charp key;\n      int ret;\n\n      if (png_ptr->buffer_size < 4)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_push_crc_finish(png_ptr);\n\n#ifdef PNG_MAX_MALLOC_64K\n      if (png_ptr->skip_length)\n         return;\n#endif\n\n      key = png_ptr->current_text;\n\n      for (text = key; *text; text++)\n         /* Empty loop */ ;\n\n      if (text < key + png_ptr->current_text_size)\n         text++;\n\n      text_ptr = (png_textp)png_malloc(png_ptr,\n         (png_uint_32)png_sizeof(png_text));\n      text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;\n      text_ptr->key = key;\n#ifdef PNG_iTXt_SUPPORTED\n      text_ptr->lang = NULL;\n      text_ptr->lang_key = NULL;\n#endif\n      text_ptr->text = text;\n\n      ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);\n\n      png_free(png_ptr, key);\n      png_free(png_ptr, text_ptr);\n      png_ptr->current_text = NULL;\n\n      if (ret)\n        png_warning(png_ptr, \"Insufficient memory to store text chunk.\");\n   }\n}\n#endif\n\n#ifdef PNG_READ_zTXt_SUPPORTED\nvoid /* PRIVATE */\npng_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32\n   length)\n{\n   if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))\n      {\n         png_error(png_ptr, \"Out of place zTXt\");\n         info_ptr = info_ptr; /* To quiet some compiler warnings */\n      }\n\n#ifdef PNG_MAX_MALLOC_64K\n   /* We can't handle zTXt chunks > 64K, since we don't have enough space\n    * to be able to store the uncompressed data.  Actually, the threshold\n    * is probably around 32K, but it isn't as definite as 64K is.\n    */\n   if (length > (png_uint_32)65535L)\n   {\n      png_warning(png_ptr, \"zTXt chunk too large to fit in memory\");\n      png_push_crc_skip(png_ptr, length);\n      return;\n   }\n#endif\n\n   png_ptr->current_text = (png_charp)png_malloc(png_ptr,\n      (png_uint_32)(length + 1));\n   png_ptr->current_text[length] = '\\0';\n   png_ptr->current_text_ptr = png_ptr->current_text;\n   png_ptr->current_text_size = (png_size_t)length;\n   png_ptr->current_text_left = (png_size_t)length;\n   png_ptr->process_mode = PNG_READ_zTXt_MODE;\n}\n\nvoid /* PRIVATE */\npng_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr->buffer_size && png_ptr->current_text_left)\n   {\n      png_size_t text_size;\n\n      if (png_ptr->buffer_size < (png_uint_32)png_ptr->current_text_left)\n         text_size = png_ptr->buffer_size;\n\n      else\n         text_size = png_ptr->current_text_left;\n\n      png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);\n      png_ptr->current_text_left -= text_size;\n      png_ptr->current_text_ptr += text_size;\n   }\n   if (!(png_ptr->current_text_left))\n   {\n      png_textp text_ptr;\n      png_charp text;\n      png_charp key;\n      int ret;\n      png_size_t text_size, key_size;\n\n      if (png_ptr->buffer_size < 4)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_push_crc_finish(png_ptr);\n\n      key = png_ptr->current_text;\n\n      for (text = key; *text; text++)\n         /* Empty loop */ ;\n\n      /* zTXt can't have zero text */\n      if (text >= key + png_ptr->current_text_size)\n      {\n         png_ptr->current_text = NULL;\n         png_free(png_ptr, key);\n         return;\n      }\n\n      text++;\n\n      if (*text != PNG_TEXT_COMPRESSION_zTXt) /* Check compression byte */\n      {\n         png_ptr->current_text = NULL;\n         png_free(png_ptr, key);\n         return;\n      }\n\n      text++;\n\n      png_ptr->zstream.next_in = (png_bytep )text;\n      png_ptr->zstream.avail_in = (uInt)(png_ptr->current_text_size -\n         (text - key));\n      png_ptr->zstream.next_out = png_ptr->zbuf;\n      png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n\n      key_size = text - key;\n      text_size = 0;\n      text = NULL;\n      ret = Z_STREAM_END;\n\n      while (png_ptr->zstream.avail_in)\n      {\n         ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);\n         if (ret != Z_OK && ret != Z_STREAM_END)\n         {\n            inflateReset(&png_ptr->zstream);\n            png_ptr->zstream.avail_in = 0;\n            png_ptr->current_text = NULL;\n            png_free(png_ptr, key);\n            png_free(png_ptr, text);\n            return;\n         }\n         if (!(png_ptr->zstream.avail_out) || ret == Z_STREAM_END)\n         {\n            if (text == NULL)\n            {\n               text = (png_charp)png_malloc(png_ptr,\n                     (png_uint_32)(png_ptr->zbuf_size\n                     - png_ptr->zstream.avail_out + key_size + 1));\n\n               png_memcpy(text + key_size, png_ptr->zbuf,\n                  png_ptr->zbuf_size - png_ptr->zstream.avail_out);\n\n               png_memcpy(text, key, key_size);\n\n               text_size = key_size + png_ptr->zbuf_size -\n                  png_ptr->zstream.avail_out;\n\n               *(text + text_size) = '\\0';\n            }\n            else\n            {\n               png_charp tmp;\n\n               tmp = text;\n               text = (png_charp)png_malloc(png_ptr, text_size +\n                  (png_uint_32)(png_ptr->zbuf_size \n                  - png_ptr->zstream.avail_out + 1));\n\n               png_memcpy(text, tmp, text_size);\n               png_free(png_ptr, tmp);\n\n               png_memcpy(text + text_size, png_ptr->zbuf,\n                  png_ptr->zbuf_size - png_ptr->zstream.avail_out);\n\n               text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out;\n               *(text + text_size) = '\\0';\n            }\n            if (ret != Z_STREAM_END)\n            {\n               png_ptr->zstream.next_out = png_ptr->zbuf;\n               png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n            }\n         }\n         else\n         {\n            break;\n         }\n\n         if (ret == Z_STREAM_END)\n            break;\n      }\n\n      inflateReset(&png_ptr->zstream);\n      png_ptr->zstream.avail_in = 0;\n\n      if (ret != Z_STREAM_END)\n      {\n         png_ptr->current_text = NULL;\n         png_free(png_ptr, key);\n         png_free(png_ptr, text);\n         return;\n      }\n\n      png_ptr->current_text = NULL;\n      png_free(png_ptr, key);\n      key = text;\n      text += key_size;\n\n      text_ptr = (png_textp)png_malloc(png_ptr,\n          (png_uint_32)png_sizeof(png_text));\n      text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt;\n      text_ptr->key = key;\n#ifdef PNG_iTXt_SUPPORTED\n      text_ptr->lang = NULL;\n      text_ptr->lang_key = NULL;\n#endif\n      text_ptr->text = text;\n\n      ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);\n\n      png_free(png_ptr, key);\n      png_free(png_ptr, text_ptr);\n\n      if (ret)\n        png_warning(png_ptr, \"Insufficient memory to store text chunk.\");\n   }\n}\n#endif\n\n#ifdef PNG_READ_iTXt_SUPPORTED\nvoid /* PRIVATE */\npng_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32\n   length)\n{\n   if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))\n      {\n         png_error(png_ptr, \"Out of place iTXt\");\n         info_ptr = info_ptr; /* To quiet some compiler warnings */\n      }\n\n#ifdef PNG_MAX_MALLOC_64K\n   png_ptr->skip_length = 0;  /* This may not be necessary */\n\n   if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */\n   {\n      png_warning(png_ptr, \"iTXt chunk too large to fit in memory\");\n      png_ptr->skip_length = length - (png_uint_32)65535L;\n      length = (png_uint_32)65535L;\n   }\n#endif\n\n   png_ptr->current_text = (png_charp)png_malloc(png_ptr,\n      (png_uint_32)(length + 1));\n   png_ptr->current_text[length] = '\\0';\n   png_ptr->current_text_ptr = png_ptr->current_text;\n   png_ptr->current_text_size = (png_size_t)length;\n   png_ptr->current_text_left = (png_size_t)length;\n   png_ptr->process_mode = PNG_READ_iTXt_MODE;\n}\n\nvoid /* PRIVATE */\npng_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)\n{\n\n   if (png_ptr->buffer_size && png_ptr->current_text_left)\n   {\n      png_size_t text_size;\n\n      if (png_ptr->buffer_size < png_ptr->current_text_left)\n         text_size = png_ptr->buffer_size;\n\n      else\n         text_size = png_ptr->current_text_left;\n\n      png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);\n      png_ptr->current_text_left -= text_size;\n      png_ptr->current_text_ptr += text_size;\n   }\n   if (!(png_ptr->current_text_left))\n   {\n      png_textp text_ptr;\n      png_charp key;\n      int comp_flag;\n      png_charp lang;\n      png_charp lang_key;\n      png_charp text;\n      int ret;\n\n      if (png_ptr->buffer_size < 4)\n      {\n         png_push_save_buffer(png_ptr);\n         return;\n      }\n\n      png_push_crc_finish(png_ptr);\n\n#ifdef PNG_MAX_MALLOC_64K\n      if (png_ptr->skip_length)\n         return;\n#endif\n\n      key = png_ptr->current_text;\n\n      for (lang = key; *lang; lang++)\n         /* Empty loop */ ;\n\n      if (lang < key + png_ptr->current_text_size - 3)\n         lang++;\n\n      comp_flag = *lang++;\n      lang++;     /* Skip comp_type, always zero */\n\n      for (lang_key = lang; *lang_key; lang_key++)\n         /* Empty loop */ ;\n\n      lang_key++;        /* Skip NUL separator */\n\n      text=lang_key;\n\n      if (lang_key < key + png_ptr->current_text_size - 1)\n      {\n        for (; *text; text++)\n           /* Empty loop */ ;\n      }\n\n      if (text < key + png_ptr->current_text_size)\n         text++;\n\n      text_ptr = (png_textp)png_malloc(png_ptr,\n         (png_uint_32)png_sizeof(png_text));\n\n      text_ptr->compression = comp_flag + 2;\n      text_ptr->key = key;\n      text_ptr->lang = lang;\n      text_ptr->lang_key = lang_key;\n      text_ptr->text = text;\n      text_ptr->text_length = 0;\n      text_ptr->itxt_length = png_strlen(text);\n\n      ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);\n\n      png_ptr->current_text = NULL;\n\n      png_free(png_ptr, text_ptr);\n      if (ret)\n         png_warning(png_ptr, \"Insufficient memory to store iTXt chunk.\");\n   }\n}\n#endif\n\n/* This function is called when we haven't found a handler for this\n * chunk.  If there isn't a problem with the chunk itself (ie a bad chunk\n * name or a critical chunk), the chunk is (currently) silently ignored.\n */\nvoid /* PRIVATE */\npng_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32\n   length)\n{\n   png_uint_32 skip = 0;\n\n   if (!(png_ptr->chunk_name[0] & 0x20))\n   {\n#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED\n      if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=\n         PNG_HANDLE_CHUNK_ALWAYS\n#ifdef PNG_READ_USER_CHUNKS_SUPPORTED\n         && png_ptr->read_user_chunk_fn == NULL\n#endif\n         )\n#endif\n         png_chunk_error(png_ptr, \"unknown critical chunk\");\n\n      info_ptr = info_ptr; /* To quiet some compiler warnings */\n   }\n\n#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED\n   if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)\n   {\n#ifdef PNG_MAX_MALLOC_64K\n      if (length > (png_uint_32)65535L)\n      {\n          png_warning(png_ptr, \"unknown chunk too large to fit in memory\");\n          skip = length - (png_uint_32)65535L;\n          length = (png_uint_32)65535L;\n      }\n#endif\n      png_memcpy((png_charp)png_ptr->unknown_chunk.name,\n                 (png_charp)png_ptr->chunk_name, \n                 png_sizeof(png_ptr->unknown_chunk.name));\n      png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name) - 1]\n        = '\\0';\n\n      png_ptr->unknown_chunk.size = (png_size_t)length;\n\n      if (length == 0)\n         png_ptr->unknown_chunk.data = NULL;\n\n      else\n      {\n         png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr,\n            (png_uint_32)length);\n         png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);\n      }\n\n#ifdef PNG_READ_USER_CHUNKS_SUPPORTED\n      if (png_ptr->read_user_chunk_fn != NULL)\n      {\n         /* Callback to user unknown chunk handler */\n         int ret;\n         ret = (*(png_ptr->read_user_chunk_fn))\n           (png_ptr, &png_ptr->unknown_chunk);\n\n         if (ret < 0)\n            png_chunk_error(png_ptr, \"error in user chunk\");\n\n         if (ret == 0)\n         {\n            if (!(png_ptr->chunk_name[0] & 0x20))\n               if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=\n                    PNG_HANDLE_CHUNK_ALWAYS)\n                  png_chunk_error(png_ptr, \"unknown critical chunk\");\n            png_set_unknown_chunks(png_ptr, info_ptr,\n               &png_ptr->unknown_chunk, 1);\n         }\n      }\n\n      else\n#endif\n        png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);\n      png_free(png_ptr, png_ptr->unknown_chunk.data);\n      png_ptr->unknown_chunk.data = NULL;\n   }\n\n   else\n#endif\n      skip=length;\n   png_push_crc_skip(png_ptr, skip);\n}\n\nvoid /* PRIVATE */\npng_push_have_info(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr->info_fn != NULL)\n      (*(png_ptr->info_fn))(png_ptr, info_ptr);\n}\n\nvoid /* PRIVATE */\npng_push_have_end(png_structp png_ptr, png_infop info_ptr)\n{\n   if (png_ptr->end_fn != NULL)\n      (*(png_ptr->end_fn))(png_ptr, info_ptr);\n}\n\nvoid /* PRIVATE */\npng_push_have_row(png_structp png_ptr, png_bytep row)\n{\n   if (png_ptr->row_fn != NULL)\n      (*(png_ptr->row_fn))(png_ptr, row, png_ptr->row_number,\n         (int)png_ptr->pass);\n}\n\nvoid PNGAPI\npng_progressive_combine_row (png_structp png_ptr,\n   png_bytep old_row, png_bytep new_row)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_CONST int FARDATA png_pass_dsp_mask[7] =\n      {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};\n#endif\n\n   if (png_ptr == NULL)\n      return;\n\n   if (new_row != NULL)    /* new_row must == png_ptr->row_buf here. */\n      png_combine_row(png_ptr, old_row, png_pass_dsp_mask[png_ptr->pass]);\n}\n\nvoid PNGAPI\npng_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr,\n   png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,\n   png_progressive_end_ptr end_fn)\n{\n   if (png_ptr == NULL)\n      return;\n\n   png_ptr->info_fn = info_fn;\n   png_ptr->row_fn = row_fn;\n   png_ptr->end_fn = end_fn;\n\n   png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer);\n}\n\npng_voidp PNGAPI\npng_get_progressive_ptr(png_structp png_ptr)\n{\n   if (png_ptr == NULL)\n      return (NULL);\n\n   return png_ptr->io_ptr;\n}\n#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngread.c",
    "content": "\n/* pngread.c - read a PNG file\n *\n * Last changed in libpng 1.2.44 [June 26, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n * This file contains routines that an application calls directly to\n * read a PNG file or stream.\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#ifdef PNG_READ_SUPPORTED\n\n\n/* Create a PNG structure for reading, and allocate any memory needed. */\npng_structp PNGAPI\npng_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,\n   png_error_ptr error_fn, png_error_ptr warn_fn)\n{\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn,\n      warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL));\n}\n\n/* Alternate create PNG structure for reading, and allocate any memory\n * needed.\n */\npng_structp PNGAPI\npng_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,\n   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,\n   png_malloc_ptr malloc_fn, png_free_ptr free_fn)\n{\n#endif /* PNG_USER_MEM_SUPPORTED */\n\n#ifdef PNG_SETJMP_SUPPORTED\n   volatile\n#endif\n   png_structp png_ptr;\n\n#ifdef PNG_SETJMP_SUPPORTED\n#ifdef USE_FAR_KEYWORD\n   jmp_buf jmpbuf;\n#endif\n#endif\n\n   int i;\n\n   png_debug(1, \"in png_create_read_struct\");\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,\n      (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);\n#else\n   png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);\n#endif\n   if (png_ptr == NULL)\n      return (NULL);\n\n   /* Added at libpng-1.2.6 */\n#ifdef PNG_USER_LIMITS_SUPPORTED\n   png_ptr->user_width_max = PNG_USER_WIDTH_MAX;\n   png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;\n#  ifdef PNG_USER_CHUNK_CACHE_MAX\n   /* Added at libpng-1.2.43 and 1.4.0 */\n   png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;\n#  endif\n#  ifdef PNG_SET_USER_CHUNK_MALLOC_MAX\n   /* Added at libpng-1.2.43 and 1.4.1 */\n   png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX;\n#  endif\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n#ifdef USE_FAR_KEYWORD\n   if (setjmp(jmpbuf))\n#else\n   if (setjmp(png_ptr->jmpbuf))\n#endif\n   {\n      png_free(png_ptr, png_ptr->zbuf);\n      png_ptr->zbuf = NULL;\n#ifdef PNG_USER_MEM_SUPPORTED\n      png_destroy_struct_2((png_voidp)png_ptr,\n         (png_free_ptr)free_fn, (png_voidp)mem_ptr);\n#else\n      png_destroy_struct((png_voidp)png_ptr);\n#endif\n      return (NULL);\n   }\n#ifdef USE_FAR_KEYWORD\n   png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf));\n#endif\n#endif /* PNG_SETJMP_SUPPORTED */\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn);\n#endif\n\n   png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn);\n\n   if (user_png_ver)\n   {\n      i = 0;\n      do\n      {\n         if (user_png_ver[i] != png_libpng_ver[i])\n            png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;\n      } while (png_libpng_ver[i++]);\n    }\n    else\n         png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;\n\n\n    if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)\n    {\n       /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so\n       * we must recompile any applications that use any older library version.\n       * For versions after libpng 1.0, we will be compatible, so we need\n       * only check the first digit.\n       */\n      if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] ||\n          (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||\n          (user_png_ver[0] == '0' && user_png_ver[2] < '9'))\n      {\n#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)\n         char msg[80];\n         if (user_png_ver)\n         {\n           png_snprintf(msg, 80,\n              \"Application was compiled with png.h from libpng-%.20s\",\n              user_png_ver);\n           png_warning(png_ptr, msg);\n         }\n         png_snprintf(msg, 80,\n             \"Application  is  running with png.c from libpng-%.20s\",\n             png_libpng_ver);\n         png_warning(png_ptr, msg);\n#endif\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\n         png_ptr->flags = 0;\n#endif\n         png_error(png_ptr,\n            \"Incompatible libpng version in application and library\");\n      }\n   }\n\n   /* Initialize zbuf - compression buffer */\n   png_ptr->zbuf_size = PNG_ZBUF_SIZE;\n   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,\n     (png_uint_32)png_ptr->zbuf_size);\n   png_ptr->zstream.zalloc = png_zalloc;\n   png_ptr->zstream.zfree = png_zfree;\n   png_ptr->zstream.opaque = (voidpf)png_ptr;\n\n      switch (inflateInit(&png_ptr->zstream))\n      {\n         case Z_OK: /* Do nothing */ break;\n         case Z_MEM_ERROR:\n         case Z_STREAM_ERROR: png_error(png_ptr, \"zlib memory error\");\n            break;\n         case Z_VERSION_ERROR: png_error(png_ptr, \"zlib version error\");\n            break;\n         default: png_error(png_ptr, \"Unknown zlib error\");\n      }\n\n\n   png_ptr->zstream.next_out = png_ptr->zbuf;\n   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n\n   png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL);\n\n#ifdef PNG_SETJMP_SUPPORTED\n/* Applications that neglect to set up their own setjmp() and then\n   encounter a png_error() will longjmp here.  Since the jmpbuf is\n   then meaningless we abort instead of returning. */\n#ifdef USE_FAR_KEYWORD\n   if (setjmp(jmpbuf))\n       PNG_ABORT();\n   png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf));\n#else\n   if (setjmp(png_ptr->jmpbuf))\n       PNG_ABORT();\n#endif\n#endif /* PNG_SETJMP_SUPPORTED */\n\n   return (png_ptr);\n}\n\n#if defined(PNG_1_0_X) || defined(PNG_1_2_X)\n/* Initialize PNG structure for reading, and allocate any memory needed.\n * This interface is deprecated in favour of the png_create_read_struct(),\n * and it will disappear as of libpng-1.3.0.\n */\n#undef png_read_init\nvoid PNGAPI\npng_read_init(png_structp png_ptr)\n{\n   /* We only come here via pre-1.0.7-compiled applications */\n   png_read_init_2(png_ptr, \"1.0.6 or earlier\", 0, 0);\n}\n\nvoid PNGAPI\npng_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,\n   png_size_t png_struct_size, png_size_t png_info_size)\n{\n   /* We only come here via pre-1.0.12-compiled applications */\n   if (png_ptr == NULL)\n      return;\n#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)\n   if (png_sizeof(png_struct) > png_struct_size ||\n      png_sizeof(png_info) > png_info_size)\n   {\n      char msg[80];\n      png_ptr->warning_fn = NULL;\n      if (user_png_ver)\n      {\n        png_snprintf(msg, 80,\n           \"Application was compiled with png.h from libpng-%.20s\",\n           user_png_ver);\n        png_warning(png_ptr, msg);\n      }\n      png_snprintf(msg, 80,\n         \"Application  is  running with png.c from libpng-%.20s\",\n         png_libpng_ver);\n      png_warning(png_ptr, msg);\n   }\n#endif\n   if (png_sizeof(png_struct) > png_struct_size)\n   {\n      png_ptr->error_fn = NULL;\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\n      png_ptr->flags = 0;\n#endif\n      png_error(png_ptr,\n      \"The png struct allocated by the application for reading is\"\n      \" too small.\");\n   }\n   if (png_sizeof(png_info) > png_info_size)\n   {\n      png_ptr->error_fn = NULL;\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\n      png_ptr->flags = 0;\n#endif\n      png_error(png_ptr,\n        \"The info struct allocated by application for reading is\"\n        \" too small.\");\n   }\n   png_read_init_3(&png_ptr, user_png_ver, png_struct_size);\n}\n#endif /* PNG_1_0_X || PNG_1_2_X */\n\nvoid PNGAPI\npng_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,\n   png_size_t png_struct_size)\n{\n#ifdef PNG_SETJMP_SUPPORTED\n   jmp_buf tmp_jmp;  /* to save current jump buffer */\n#endif\n\n   int i = 0;\n\n   png_structp png_ptr=*ptr_ptr;\n\n   if (png_ptr == NULL)\n      return;\n\n   do\n   {\n      if (user_png_ver[i] != png_libpng_ver[i])\n      {\n#ifdef PNG_LEGACY_SUPPORTED\n        png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;\n#else\n        png_ptr->warning_fn = NULL;\n        png_warning(png_ptr,\n         \"Application uses deprecated png_read_init() and should be\"\n         \" recompiled.\");\n        break;\n#endif\n      }\n   } while (png_libpng_ver[i++]);\n\n   png_debug(1, \"in png_read_init_3\");\n\n#ifdef PNG_SETJMP_SUPPORTED\n   /* Save jump buffer and error functions */\n   png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf));\n#endif\n\n   if (png_sizeof(png_struct) > png_struct_size)\n   {\n      png_destroy_struct(png_ptr);\n      *ptr_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);\n      png_ptr = *ptr_ptr;\n   }\n\n   /* Reset all variables to 0 */\n   png_memset(png_ptr, 0, png_sizeof(png_struct));\n\n#ifdef PNG_SETJMP_SUPPORTED\n   /* Restore jump buffer */\n   png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf));\n#endif\n\n   /* Added at libpng-1.2.6 */\n#ifdef PNG_SET_USER_LIMITS_SUPPORTED\n   png_ptr->user_width_max = PNG_USER_WIDTH_MAX;\n   png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;\n#endif\n\n   /* Initialize zbuf - compression buffer */\n   png_ptr->zbuf_size = PNG_ZBUF_SIZE;\n   png_ptr->zstream.zalloc = png_zalloc;\n   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,\n     (png_uint_32)png_ptr->zbuf_size);\n   png_ptr->zstream.zalloc = png_zalloc;\n   png_ptr->zstream.zfree = png_zfree;\n   png_ptr->zstream.opaque = (voidpf)png_ptr;\n\n   switch (inflateInit(&png_ptr->zstream))\n   {\n      case Z_OK: /* Do nothing */ break;\n      case Z_STREAM_ERROR: png_error(png_ptr, \"zlib memory error\"); break;\n      case Z_VERSION_ERROR: png_error(png_ptr, \"zlib version error\");\n          break;\n      default: png_error(png_ptr, \"Unknown zlib error\");\n   }\n\n   png_ptr->zstream.next_out = png_ptr->zbuf;\n   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n\n   png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL);\n}\n\n#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\n/* Read the information before the actual image data.  This has been\n * changed in v0.90 to allow reading a file that already has the magic\n * bytes read from the stream.  You can tell libpng how many bytes have\n * been read from the beginning of the stream (up to the maximum of 8)\n * via png_set_sig_bytes(), and we will only check the remaining bytes\n * here.  The application can then have access to the signature bytes we\n * read if it is determined that this isn't a valid PNG file.\n */\nvoid PNGAPI\npng_read_info(png_structp png_ptr, png_infop info_ptr)\n{\n   png_debug(1, \"in png_read_info\");\n \n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n \n   /* If we haven't checked all of the PNG signature bytes, do so now. */\n   if (png_ptr->sig_bytes < 8)\n   {\n      png_size_t num_checked = png_ptr->sig_bytes,\n                 num_to_check = 8 - num_checked;\n\n      png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check);\n      png_ptr->sig_bytes = 8;\n\n      if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))\n      {\n         if (num_checked < 4 &&\n             png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))\n            png_error(png_ptr, \"Not a PNG file\");\n         else\n            png_error(png_ptr, \"PNG file corrupted by ASCII conversion\");\n      }\n      if (num_checked < 3)\n         png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;\n   }\n\n   for (;;)\n   {\n#ifdef PNG_USE_LOCAL_ARRAYS\n      PNG_CONST PNG_IHDR;\n      PNG_CONST PNG_IDAT;\n      PNG_CONST PNG_IEND;\n      PNG_CONST PNG_PLTE;\n#ifdef PNG_READ_bKGD_SUPPORTED\n      PNG_CONST PNG_bKGD;\n#endif\n#ifdef PNG_READ_cHRM_SUPPORTED\n      PNG_CONST PNG_cHRM;\n#endif\n#ifdef PNG_READ_gAMA_SUPPORTED\n      PNG_CONST PNG_gAMA;\n#endif\n#ifdef PNG_READ_hIST_SUPPORTED\n      PNG_CONST PNG_hIST;\n#endif\n#ifdef PNG_READ_iCCP_SUPPORTED\n      PNG_CONST PNG_iCCP;\n#endif\n#ifdef PNG_READ_iTXt_SUPPORTED\n      PNG_CONST PNG_iTXt;\n#endif\n#ifdef PNG_READ_oFFs_SUPPORTED\n      PNG_CONST PNG_oFFs;\n#endif\n#ifdef PNG_READ_pCAL_SUPPORTED\n      PNG_CONST PNG_pCAL;\n#endif\n#ifdef PNG_READ_pHYs_SUPPORTED\n      PNG_CONST PNG_pHYs;\n#endif\n#ifdef PNG_READ_sBIT_SUPPORTED\n      PNG_CONST PNG_sBIT;\n#endif\n#ifdef PNG_READ_sCAL_SUPPORTED\n      PNG_CONST PNG_sCAL;\n#endif\n#ifdef PNG_READ_sPLT_SUPPORTED\n      PNG_CONST PNG_sPLT;\n#endif\n#ifdef PNG_READ_sRGB_SUPPORTED\n      PNG_CONST PNG_sRGB;\n#endif\n#ifdef PNG_READ_tEXt_SUPPORTED\n      PNG_CONST PNG_tEXt;\n#endif\n#ifdef PNG_READ_tIME_SUPPORTED\n      PNG_CONST PNG_tIME;\n#endif\n#ifdef PNG_READ_tRNS_SUPPORTED\n      PNG_CONST PNG_tRNS;\n#endif\n#ifdef PNG_READ_zTXt_SUPPORTED\n      PNG_CONST PNG_zTXt;\n#endif\n#endif /* PNG_USE_LOCAL_ARRAYS */\n      png_uint_32 length = png_read_chunk_header(png_ptr);\n      PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;\n\n      /* This should be a binary subdivision search or a hash for\n       * matching the chunk name rather than a linear search.\n       */\n      if (!png_memcmp(chunk_name, png_IDAT, 4))\n        if (png_ptr->mode & PNG_AFTER_IDAT)\n          png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;\n\n      if (!png_memcmp(chunk_name, png_IHDR, 4))\n         png_handle_IHDR(png_ptr, info_ptr, length);\n      else if (!png_memcmp(chunk_name, png_IEND, 4))\n         png_handle_IEND(png_ptr, info_ptr, length);\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n      else if (png_handle_as_unknown(png_ptr, chunk_name))\n      {\n         if (!png_memcmp(chunk_name, png_IDAT, 4))\n            png_ptr->mode |= PNG_HAVE_IDAT;\n         png_handle_unknown(png_ptr, info_ptr, length);\n         if (!png_memcmp(chunk_name, png_PLTE, 4))\n            png_ptr->mode |= PNG_HAVE_PLTE;\n         else if (!png_memcmp(chunk_name, png_IDAT, 4))\n         {\n            if (!(png_ptr->mode & PNG_HAVE_IHDR))\n               png_error(png_ptr, \"Missing IHDR before IDAT\");\n            else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&\n                     !(png_ptr->mode & PNG_HAVE_PLTE))\n               png_error(png_ptr, \"Missing PLTE before IDAT\");\n            break;\n         }\n      }\n#endif\n      else if (!png_memcmp(chunk_name, png_PLTE, 4))\n         png_handle_PLTE(png_ptr, info_ptr, length);\n      else if (!png_memcmp(chunk_name, png_IDAT, 4))\n      {\n         if (!(png_ptr->mode & PNG_HAVE_IHDR))\n            png_error(png_ptr, \"Missing IHDR before IDAT\");\n         else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&\n                  !(png_ptr->mode & PNG_HAVE_PLTE))\n            png_error(png_ptr, \"Missing PLTE before IDAT\");\n\n         png_ptr->idat_size = length;\n         png_ptr->mode |= PNG_HAVE_IDAT;\n         break;\n      }\n#ifdef PNG_READ_bKGD_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_bKGD, 4))\n         png_handle_bKGD(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_cHRM_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_cHRM, 4))\n         png_handle_cHRM(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_gAMA_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_gAMA, 4))\n         png_handle_gAMA(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_hIST_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_hIST, 4))\n         png_handle_hIST(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_oFFs_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_oFFs, 4))\n         png_handle_oFFs(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_pCAL_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_pCAL, 4))\n         png_handle_pCAL(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_sCAL_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_sCAL, 4))\n         png_handle_sCAL(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_pHYs_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_pHYs, 4))\n         png_handle_pHYs(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_sBIT_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_sBIT, 4))\n         png_handle_sBIT(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_sRGB_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_sRGB, 4))\n         png_handle_sRGB(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_iCCP_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_iCCP, 4))\n         png_handle_iCCP(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_sPLT_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_sPLT, 4))\n         png_handle_sPLT(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_tEXt_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_tEXt, 4))\n         png_handle_tEXt(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_tIME_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_tIME, 4))\n         png_handle_tIME(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_tRNS_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_tRNS, 4))\n         png_handle_tRNS(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_zTXt_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_zTXt, 4))\n         png_handle_zTXt(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_iTXt_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_iTXt, 4))\n         png_handle_iTXt(png_ptr, info_ptr, length);\n#endif\n      else\n         png_handle_unknown(png_ptr, info_ptr, length);\n   }\n}\n#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */\n\n/* Optional call to update the users info_ptr structure */\nvoid PNGAPI\npng_read_update_info(png_structp png_ptr, png_infop info_ptr)\n{\n   png_debug(1, \"in png_read_update_info\");\n \n   if (png_ptr == NULL)\n      return;\n   if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))\n      png_read_start_row(png_ptr);\n   else\n      png_warning(png_ptr,\n      \"Ignoring extra png_read_update_info() call; row buffer not reallocated\");\n\n   png_read_transform_info(png_ptr, info_ptr);\n}\n\n#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\n/* Initialize palette, background, etc, after transformations\n * are set, but before any reading takes place.  This allows\n * the user to obtain a gamma-corrected palette, for example.\n * If the user doesn't call this, we will do it ourselves.\n */\nvoid PNGAPI\npng_start_read_image(png_structp png_ptr)\n{\n   png_debug(1, \"in png_start_read_image\");\n \n   if (png_ptr == NULL)\n      return;\n   if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))\n      png_read_start_row(png_ptr);\n}\n#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */\n\n#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\nvoid PNGAPI\npng_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)\n{\n   PNG_CONST PNG_IDAT;\n   PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55,\n      0xff};\n   PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};\n   int ret;\n \n   if (png_ptr == NULL)\n      return;\n \n   png_debug2(1, \"in png_read_row (row %lu, pass %d)\",\n      png_ptr->row_number, png_ptr->pass);\n\n   if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))\n      png_read_start_row(png_ptr);\n   if (png_ptr->row_number == 0 && png_ptr->pass == 0)\n   {\n   /* Check for transforms that have been set but were defined out */\n#if defined(PNG_WRITE_INVERT_SUPPORTED) && !defined(PNG_READ_INVERT_SUPPORTED)\n   if (png_ptr->transformations & PNG_INVERT_MONO)\n      png_warning(png_ptr, \"PNG_READ_INVERT_SUPPORTED is not defined.\");\n#endif\n#if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED)\n   if (png_ptr->transformations & PNG_FILLER)\n      png_warning(png_ptr, \"PNG_READ_FILLER_SUPPORTED is not defined.\");\n#endif\n#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \\\n    !defined(PNG_READ_PACKSWAP_SUPPORTED)\n   if (png_ptr->transformations & PNG_PACKSWAP)\n      png_warning(png_ptr, \"PNG_READ_PACKSWAP_SUPPORTED is not defined.\");\n#endif\n#if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED)\n   if (png_ptr->transformations & PNG_PACK)\n      png_warning(png_ptr, \"PNG_READ_PACK_SUPPORTED is not defined.\");\n#endif\n#if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED)\n   if (png_ptr->transformations & PNG_SHIFT)\n      png_warning(png_ptr, \"PNG_READ_SHIFT_SUPPORTED is not defined.\");\n#endif\n#if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED)\n   if (png_ptr->transformations & PNG_BGR)\n      png_warning(png_ptr, \"PNG_READ_BGR_SUPPORTED is not defined.\");\n#endif\n#if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED)\n   if (png_ptr->transformations & PNG_SWAP_BYTES)\n      png_warning(png_ptr, \"PNG_READ_SWAP_SUPPORTED is not defined.\");\n#endif\n   }\n\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n   /* If interlaced and we do not need a new row, combine row and return */\n   if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))\n   {\n      switch (png_ptr->pass)\n      {\n         case 0:\n            if (png_ptr->row_number & 0x07)\n            {\n               if (dsp_row != NULL)\n                  png_combine_row(png_ptr, dsp_row,\n                     png_pass_dsp_mask[png_ptr->pass]);\n               png_read_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 1:\n            if ((png_ptr->row_number & 0x07) || png_ptr->width < 5)\n            {\n               if (dsp_row != NULL)\n                  png_combine_row(png_ptr, dsp_row,\n                     png_pass_dsp_mask[png_ptr->pass]);\n               png_read_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 2:\n            if ((png_ptr->row_number & 0x07) != 4)\n            {\n               if (dsp_row != NULL && (png_ptr->row_number & 4))\n                  png_combine_row(png_ptr, dsp_row,\n                     png_pass_dsp_mask[png_ptr->pass]);\n               png_read_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 3:\n            if ((png_ptr->row_number & 3) || png_ptr->width < 3)\n            {\n               if (dsp_row != NULL)\n                  png_combine_row(png_ptr, dsp_row,\n                     png_pass_dsp_mask[png_ptr->pass]);\n               png_read_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 4:\n            if ((png_ptr->row_number & 3) != 2)\n            {\n               if (dsp_row != NULL && (png_ptr->row_number & 2))\n                  png_combine_row(png_ptr, dsp_row,\n                     png_pass_dsp_mask[png_ptr->pass]);\n               png_read_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 5:\n            if ((png_ptr->row_number & 1) || png_ptr->width < 2)\n            {\n               if (dsp_row != NULL)\n                  png_combine_row(png_ptr, dsp_row,\n                     png_pass_dsp_mask[png_ptr->pass]);\n               png_read_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 6:\n            if (!(png_ptr->row_number & 1))\n            {\n               png_read_finish_row(png_ptr);\n               return;\n            }\n            break;\n      }\n   }\n#endif\n\n   if (!(png_ptr->mode & PNG_HAVE_IDAT))\n      png_error(png_ptr, \"Invalid attempt to read row data\");\n\n   png_ptr->zstream.next_out = png_ptr->row_buf;\n   png_ptr->zstream.avail_out =\n       (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth,\n       png_ptr->iwidth) + 1);\n   do\n   {\n      if (!(png_ptr->zstream.avail_in))\n      {\n         while (!png_ptr->idat_size)\n         {\n            png_crc_finish(png_ptr, 0);\n\n            png_ptr->idat_size = png_read_chunk_header(png_ptr);\n            if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))\n               png_error(png_ptr, \"Not enough image data\");\n         }\n         png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size;\n         png_ptr->zstream.next_in = png_ptr->zbuf;\n         if (png_ptr->zbuf_size > png_ptr->idat_size)\n            png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size;\n         png_crc_read(png_ptr, png_ptr->zbuf,\n            (png_size_t)png_ptr->zstream.avail_in);\n         png_ptr->idat_size -= png_ptr->zstream.avail_in;\n      }\n      ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);\n      if (ret == Z_STREAM_END)\n      {\n         if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in ||\n            png_ptr->idat_size)\n            png_error(png_ptr, \"Extra compressed data\");\n         png_ptr->mode |= PNG_AFTER_IDAT;\n         png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;\n         break;\n      }\n      if (ret != Z_OK)\n         png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :\n                   \"Decompression error\");\n\n   } while (png_ptr->zstream.avail_out);\n\n   png_ptr->row_info.color_type = png_ptr->color_type;\n   png_ptr->row_info.width = png_ptr->iwidth;\n   png_ptr->row_info.channels = png_ptr->channels;\n   png_ptr->row_info.bit_depth = png_ptr->bit_depth;\n   png_ptr->row_info.pixel_depth = png_ptr->pixel_depth;\n   png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,\n       png_ptr->row_info.width);\n\n   if (png_ptr->row_buf[0])\n   png_read_filter_row(png_ptr, &(png_ptr->row_info),\n      png_ptr->row_buf + 1, png_ptr->prev_row + 1,\n      (int)(png_ptr->row_buf[0]));\n\n   png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,\n      png_ptr->rowbytes + 1);\n\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n   if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&\n      (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))\n   {\n      /* Intrapixel differencing */\n      png_do_read_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1);\n   }\n#endif\n\n\n   if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA))\n      png_do_read_transformations(png_ptr);\n\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n   /* Blow up interlaced rows to full size */\n   if (png_ptr->interlaced &&\n      (png_ptr->transformations & PNG_INTERLACE))\n   {\n      if (png_ptr->pass < 6)\n         /* Old interface (pre-1.0.9):\n          * png_do_read_interlace(&(png_ptr->row_info),\n          *    png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations);\n          */\n         png_do_read_interlace(png_ptr);\n\n      if (dsp_row != NULL)\n         png_combine_row(png_ptr, dsp_row,\n            png_pass_dsp_mask[png_ptr->pass]);\n      if (row != NULL)\n         png_combine_row(png_ptr, row,\n            png_pass_mask[png_ptr->pass]);\n   }\n   else\n#endif\n   {\n      if (row != NULL)\n         png_combine_row(png_ptr, row, 0xff);\n      if (dsp_row != NULL)\n         png_combine_row(png_ptr, dsp_row, 0xff);\n   }\n   png_read_finish_row(png_ptr);\n\n   if (png_ptr->read_row_fn != NULL)\n      (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);\n}\n#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */\n\n#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\n/* Read one or more rows of image data.  If the image is interlaced,\n * and png_set_interlace_handling() has been called, the rows need to\n * contain the contents of the rows from the previous pass.  If the\n * image has alpha or transparency, and png_handle_alpha()[*] has been\n * called, the rows contents must be initialized to the contents of the\n * screen.\n *\n * \"row\" holds the actual image, and pixels are placed in it\n * as they arrive.  If the image is displayed after each pass, it will\n * appear to \"sparkle\" in.  \"display_row\" can be used to display a\n * \"chunky\" progressive image, with finer detail added as it becomes\n * available.  If you do not want this \"chunky\" display, you may pass\n * NULL for display_row.  If you do not want the sparkle display, and\n * you have not called png_handle_alpha(), you may pass NULL for rows.\n * If you have called png_handle_alpha(), and the image has either an\n * alpha channel or a transparency chunk, you must provide a buffer for\n * rows.  In this case, you do not have to provide a display_row buffer\n * also, but you may.  If the image is not interlaced, or if you have\n * not called png_set_interlace_handling(), the display_row buffer will\n * be ignored, so pass NULL to it.\n *\n * [*] png_handle_alpha() does not exist yet, as of this version of libpng\n */\n\nvoid PNGAPI\npng_read_rows(png_structp png_ptr, png_bytepp row,\n   png_bytepp display_row, png_uint_32 num_rows)\n{\n   png_uint_32 i;\n   png_bytepp rp;\n   png_bytepp dp;\n\n   png_debug(1, \"in png_read_rows\");\n \n   if (png_ptr == NULL)\n      return;\n   rp = row;\n   dp = display_row;\n   if (rp != NULL && dp != NULL)\n      for (i = 0; i < num_rows; i++)\n      {\n         png_bytep rptr = *rp++;\n         png_bytep dptr = *dp++;\n\n         png_read_row(png_ptr, rptr, dptr);\n      }\n   else if (rp != NULL)\n      for (i = 0; i < num_rows; i++)\n      {\n         png_bytep rptr = *rp;\n         png_read_row(png_ptr, rptr, png_bytep_NULL);\n         rp++;\n      }\n   else if (dp != NULL)\n      for (i = 0; i < num_rows; i++)\n      {\n         png_bytep dptr = *dp;\n         png_read_row(png_ptr, png_bytep_NULL, dptr);\n         dp++;\n      }\n}\n#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */\n\n#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\n/* Read the entire image.  If the image has an alpha channel or a tRNS\n * chunk, and you have called png_handle_alpha()[*], you will need to\n * initialize the image to the current image that PNG will be overlaying.\n * We set the num_rows again here, in case it was incorrectly set in\n * png_read_start_row() by a call to png_read_update_info() or\n * png_start_read_image() if png_set_interlace_handling() wasn't called\n * prior to either of these functions like it should have been.  You can\n * only call this function once.  If you desire to have an image for\n * each pass of a interlaced image, use png_read_rows() instead.\n *\n * [*] png_handle_alpha() does not exist yet, as of this version of libpng\n */\nvoid PNGAPI\npng_read_image(png_structp png_ptr, png_bytepp image)\n{\n   png_uint_32 i, image_height;\n   int pass, j;\n   png_bytepp rp;\n\n   png_debug(1, \"in png_read_image\");\n \n   if (png_ptr == NULL)\n      return;\n\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n   pass = png_set_interlace_handling(png_ptr);\n#else\n   if (png_ptr->interlaced)\n      png_error(png_ptr,\n        \"Cannot read interlaced image -- interlace handler disabled.\");\n   pass = 1;\n#endif\n\n\n   image_height=png_ptr->height;\n   png_ptr->num_rows = image_height; /* Make sure this is set correctly */\n\n   for (j = 0; j < pass; j++)\n   {\n      rp = image;\n      for (i = 0; i < image_height; i++)\n      {\n         png_read_row(png_ptr, *rp, png_bytep_NULL);\n         rp++;\n      }\n   }\n}\n#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */\n\n#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\n/* Read the end of the PNG file.  Will not read past the end of the\n * file, will verify the end is accurate, and will read any comments\n * or time information at the end of the file, if info is not NULL.\n */\nvoid PNGAPI\npng_read_end(png_structp png_ptr, png_infop info_ptr)\n{\n   png_debug(1, \"in png_read_end\");\n \n   if (png_ptr == NULL)\n      return;\n   png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */\n\n   do\n   {\n#ifdef PNG_USE_LOCAL_ARRAYS\n      PNG_CONST PNG_IHDR;\n      PNG_CONST PNG_IDAT;\n      PNG_CONST PNG_IEND;\n      PNG_CONST PNG_PLTE;\n#ifdef PNG_READ_bKGD_SUPPORTED\n      PNG_CONST PNG_bKGD;\n#endif\n#ifdef PNG_READ_cHRM_SUPPORTED\n      PNG_CONST PNG_cHRM;\n#endif\n#ifdef PNG_READ_gAMA_SUPPORTED\n      PNG_CONST PNG_gAMA;\n#endif\n#ifdef PNG_READ_hIST_SUPPORTED\n      PNG_CONST PNG_hIST;\n#endif\n#ifdef PNG_READ_iCCP_SUPPORTED\n      PNG_CONST PNG_iCCP;\n#endif\n#ifdef PNG_READ_iTXt_SUPPORTED\n      PNG_CONST PNG_iTXt;\n#endif\n#ifdef PNG_READ_oFFs_SUPPORTED\n      PNG_CONST PNG_oFFs;\n#endif\n#ifdef PNG_READ_pCAL_SUPPORTED\n      PNG_CONST PNG_pCAL;\n#endif\n#ifdef PNG_READ_pHYs_SUPPORTED\n      PNG_CONST PNG_pHYs;\n#endif\n#ifdef PNG_READ_sBIT_SUPPORTED\n      PNG_CONST PNG_sBIT;\n#endif\n#ifdef PNG_READ_sCAL_SUPPORTED\n      PNG_CONST PNG_sCAL;\n#endif\n#ifdef PNG_READ_sPLT_SUPPORTED\n      PNG_CONST PNG_sPLT;\n#endif\n#ifdef PNG_READ_sRGB_SUPPORTED\n      PNG_CONST PNG_sRGB;\n#endif\n#ifdef PNG_READ_tEXt_SUPPORTED\n      PNG_CONST PNG_tEXt;\n#endif\n#ifdef PNG_READ_tIME_SUPPORTED\n      PNG_CONST PNG_tIME;\n#endif\n#ifdef PNG_READ_tRNS_SUPPORTED\n      PNG_CONST PNG_tRNS;\n#endif\n#ifdef PNG_READ_zTXt_SUPPORTED\n      PNG_CONST PNG_zTXt;\n#endif\n#endif /* PNG_USE_LOCAL_ARRAYS */\n      png_uint_32 length = png_read_chunk_header(png_ptr);\n      PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;\n\n      if (!png_memcmp(chunk_name, png_IHDR, 4))\n         png_handle_IHDR(png_ptr, info_ptr, length);\n      else if (!png_memcmp(chunk_name, png_IEND, 4))\n         png_handle_IEND(png_ptr, info_ptr, length);\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n      else if (png_handle_as_unknown(png_ptr, chunk_name))\n      {\n         if (!png_memcmp(chunk_name, png_IDAT, 4))\n         {\n            if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))\n               png_error(png_ptr, \"Too many IDAT's found\");\n         }\n         png_handle_unknown(png_ptr, info_ptr, length);\n         if (!png_memcmp(chunk_name, png_PLTE, 4))\n            png_ptr->mode |= PNG_HAVE_PLTE;\n      }\n#endif\n      else if (!png_memcmp(chunk_name, png_IDAT, 4))\n      {\n         /* Zero length IDATs are legal after the last IDAT has been\n          * read, but not after other chunks have been read.\n          */\n         if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))\n            png_error(png_ptr, \"Too many IDAT's found\");\n         png_crc_finish(png_ptr, length);\n      }\n      else if (!png_memcmp(chunk_name, png_PLTE, 4))\n         png_handle_PLTE(png_ptr, info_ptr, length);\n#ifdef PNG_READ_bKGD_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_bKGD, 4))\n         png_handle_bKGD(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_cHRM_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_cHRM, 4))\n         png_handle_cHRM(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_gAMA_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_gAMA, 4))\n         png_handle_gAMA(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_hIST_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_hIST, 4))\n         png_handle_hIST(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_oFFs_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_oFFs, 4))\n         png_handle_oFFs(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_pCAL_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_pCAL, 4))\n         png_handle_pCAL(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_sCAL_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_sCAL, 4))\n         png_handle_sCAL(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_pHYs_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_pHYs, 4))\n         png_handle_pHYs(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_sBIT_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_sBIT, 4))\n         png_handle_sBIT(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_sRGB_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_sRGB, 4))\n         png_handle_sRGB(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_iCCP_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_iCCP, 4))\n         png_handle_iCCP(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_sPLT_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_sPLT, 4))\n         png_handle_sPLT(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_tEXt_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_tEXt, 4))\n         png_handle_tEXt(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_tIME_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_tIME, 4))\n         png_handle_tIME(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_tRNS_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_tRNS, 4))\n         png_handle_tRNS(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_zTXt_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_zTXt, 4))\n         png_handle_zTXt(png_ptr, info_ptr, length);\n#endif\n#ifdef PNG_READ_iTXt_SUPPORTED\n      else if (!png_memcmp(chunk_name, png_iTXt, 4))\n         png_handle_iTXt(png_ptr, info_ptr, length);\n#endif\n      else\n         png_handle_unknown(png_ptr, info_ptr, length);\n   } while (!(png_ptr->mode & PNG_HAVE_IEND));\n}\n#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */\n\n/* Free all memory used by the read */\nvoid PNGAPI\npng_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,\n   png_infopp end_info_ptr_ptr)\n{\n   png_structp png_ptr = NULL;\n   png_infop info_ptr = NULL, end_info_ptr = NULL;\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_free_ptr free_fn = NULL;\n   png_voidp mem_ptr = NULL;\n#endif\n\n   png_debug(1, \"in png_destroy_read_struct\");\n \n   if (png_ptr_ptr != NULL)\n      png_ptr = *png_ptr_ptr;\n   if (png_ptr == NULL)\n      return;\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   free_fn = png_ptr->free_fn;\n   mem_ptr = png_ptr->mem_ptr;\n#endif\n\n   if (info_ptr_ptr != NULL)\n      info_ptr = *info_ptr_ptr;\n\n   if (end_info_ptr_ptr != NULL)\n      end_info_ptr = *end_info_ptr_ptr;\n\n   png_read_destroy(png_ptr, info_ptr, end_info_ptr);\n\n   if (info_ptr != NULL)\n   {\n#ifdef PNG_TEXT_SUPPORTED\n      png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1);\n#endif\n\n#ifdef PNG_USER_MEM_SUPPORTED\n      png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn,\n          (png_voidp)mem_ptr);\n#else\n      png_destroy_struct((png_voidp)info_ptr);\n#endif\n      *info_ptr_ptr = NULL;\n   }\n\n   if (end_info_ptr != NULL)\n   {\n#ifdef PNG_READ_TEXT_SUPPORTED\n      png_free_data(png_ptr, end_info_ptr, PNG_FREE_TEXT, -1);\n#endif\n#ifdef PNG_USER_MEM_SUPPORTED\n      png_destroy_struct_2((png_voidp)end_info_ptr, (png_free_ptr)free_fn,\n         (png_voidp)mem_ptr);\n#else\n      png_destroy_struct((png_voidp)end_info_ptr);\n#endif\n      *end_info_ptr_ptr = NULL;\n   }\n\n   if (png_ptr != NULL)\n   {\n#ifdef PNG_USER_MEM_SUPPORTED\n      png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn,\n          (png_voidp)mem_ptr);\n#else\n      png_destroy_struct((png_voidp)png_ptr);\n#endif\n      *png_ptr_ptr = NULL;\n   }\n}\n\n/* Free all memory used by the read (old method) */\nvoid /* PRIVATE */\npng_read_destroy(png_structp png_ptr, png_infop info_ptr,\n    png_infop end_info_ptr)\n{\n#ifdef PNG_SETJMP_SUPPORTED\n   jmp_buf tmp_jmp;\n#endif\n   png_error_ptr error_fn;\n   png_error_ptr warning_fn;\n   png_voidp error_ptr;\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_free_ptr free_fn;\n#endif\n\n   png_debug(1, \"in png_read_destroy\");\n \n   if (info_ptr != NULL)\n      png_info_destroy(png_ptr, info_ptr);\n\n   if (end_info_ptr != NULL)\n      png_info_destroy(png_ptr, end_info_ptr);\n\n   png_free(png_ptr, png_ptr->zbuf);\n   png_free(png_ptr, png_ptr->big_row_buf);\n   png_free(png_ptr, png_ptr->prev_row);\n   png_free(png_ptr, png_ptr->chunkdata);\n#ifdef PNG_READ_DITHER_SUPPORTED\n   png_free(png_ptr, png_ptr->palette_lookup);\n   png_free(png_ptr, png_ptr->dither_index);\n#endif\n#ifdef PNG_READ_GAMMA_SUPPORTED\n   png_free(png_ptr, png_ptr->gamma_table);\n#endif\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n   png_free(png_ptr, png_ptr->gamma_from_1);\n   png_free(png_ptr, png_ptr->gamma_to_1);\n#endif\n#ifdef PNG_FREE_ME_SUPPORTED\n   if (png_ptr->free_me & PNG_FREE_PLTE)\n      png_zfree(png_ptr, png_ptr->palette);\n   png_ptr->free_me &= ~PNG_FREE_PLTE;\n#else\n   if (png_ptr->flags & PNG_FLAG_FREE_PLTE)\n      png_zfree(png_ptr, png_ptr->palette);\n   png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;\n#endif\n#if defined(PNG_tRNS_SUPPORTED) || \\\n    defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n#ifdef PNG_FREE_ME_SUPPORTED\n   if (png_ptr->free_me & PNG_FREE_TRNS)\n      png_free(png_ptr, png_ptr->trans);\n   png_ptr->free_me &= ~PNG_FREE_TRNS;\n#else\n   if (png_ptr->flags & PNG_FLAG_FREE_TRNS)\n      png_free(png_ptr, png_ptr->trans);\n   png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;\n#endif\n#endif\n#ifdef PNG_READ_hIST_SUPPORTED\n#ifdef PNG_FREE_ME_SUPPORTED\n   if (png_ptr->free_me & PNG_FREE_HIST)\n      png_free(png_ptr, png_ptr->hist);\n   png_ptr->free_me &= ~PNG_FREE_HIST;\n#else\n   if (png_ptr->flags & PNG_FLAG_FREE_HIST)\n      png_free(png_ptr, png_ptr->hist);\n   png_ptr->flags &= ~PNG_FLAG_FREE_HIST;\n#endif\n#endif\n#ifdef PNG_READ_GAMMA_SUPPORTED\n   if (png_ptr->gamma_16_table != NULL)\n   {\n      int i;\n      int istop = (1 << (8 - png_ptr->gamma_shift));\n      for (i = 0; i < istop; i++)\n      {\n         png_free(png_ptr, png_ptr->gamma_16_table[i]);\n      }\n   png_free(png_ptr, png_ptr->gamma_16_table);\n   }\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n   if (png_ptr->gamma_16_from_1 != NULL)\n   {\n      int i;\n      int istop = (1 << (8 - png_ptr->gamma_shift));\n      for (i = 0; i < istop; i++)\n      {\n         png_free(png_ptr, png_ptr->gamma_16_from_1[i]);\n      }\n   png_free(png_ptr, png_ptr->gamma_16_from_1);\n   }\n   if (png_ptr->gamma_16_to_1 != NULL)\n   {\n      int i;\n      int istop = (1 << (8 - png_ptr->gamma_shift));\n      for (i = 0; i < istop; i++)\n      {\n         png_free(png_ptr, png_ptr->gamma_16_to_1[i]);\n      }\n   png_free(png_ptr, png_ptr->gamma_16_to_1);\n   }\n#endif\n#endif\n#ifdef PNG_TIME_RFC1123_SUPPORTED\n   png_free(png_ptr, png_ptr->time_buffer);\n#endif\n\n   inflateEnd(&png_ptr->zstream);\n#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\n   png_free(png_ptr, png_ptr->save_buffer);\n#endif\n\n#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\n#ifdef PNG_TEXT_SUPPORTED\n   png_free(png_ptr, png_ptr->current_text);\n#endif /* PNG_TEXT_SUPPORTED */\n#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */\n\n   /* Save the important info out of the png_struct, in case it is\n    * being used again.\n    */\n#ifdef PNG_SETJMP_SUPPORTED\n   png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf));\n#endif\n\n   error_fn = png_ptr->error_fn;\n   warning_fn = png_ptr->warning_fn;\n   error_ptr = png_ptr->error_ptr;\n#ifdef PNG_USER_MEM_SUPPORTED\n   free_fn = png_ptr->free_fn;\n#endif\n\n   png_memset(png_ptr, 0, png_sizeof(png_struct));\n\n   png_ptr->error_fn = error_fn;\n   png_ptr->warning_fn = warning_fn;\n   png_ptr->error_ptr = error_ptr;\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_ptr->free_fn = free_fn;\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n   png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf));\n#endif\n\n}\n\nvoid PNGAPI\npng_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn)\n{\n   if (png_ptr == NULL)\n      return;\n   png_ptr->read_row_fn = read_row_fn;\n}\n\n\n#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\n#ifdef PNG_INFO_IMAGE_SUPPORTED\nvoid PNGAPI\npng_read_png(png_structp png_ptr, png_infop info_ptr,\n                           int transforms,\n                           voidp params)\n{\n   int row;\n\n   if (png_ptr == NULL)\n      return;\n#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED\n   /* Invert the alpha channel from opacity to transparency\n    */\n   if (transforms & PNG_TRANSFORM_INVERT_ALPHA)\n       png_set_invert_alpha(png_ptr);\n#endif\n\n   /* png_read_info() gives us all of the information from the\n    * PNG file before the first IDAT (image data chunk).\n    */\n   png_read_info(png_ptr, info_ptr);\n   if (info_ptr->height > PNG_UINT_32_MAX/png_sizeof(png_bytep))\n      png_error(png_ptr, \"Image is too high to process with png_read_png()\");\n\n   /* -------------- image transformations start here ------------------- */\n\n#ifdef PNG_READ_16_TO_8_SUPPORTED\n   /* Tell libpng to strip 16 bit/color files down to 8 bits per color.\n    */\n   if (transforms & PNG_TRANSFORM_STRIP_16)\n      png_set_strip_16(png_ptr);\n#endif\n\n#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED\n   /* Strip alpha bytes from the input data without combining with\n    * the background (not recommended).\n    */\n   if (transforms & PNG_TRANSFORM_STRIP_ALPHA)\n      png_set_strip_alpha(png_ptr);\n#endif\n\n#if defined(PNG_READ_PACK_SUPPORTED) && !defined(PNG_READ_EXPAND_SUPPORTED)\n   /* Extract multiple pixels with bit depths of 1, 2, or 4 from a single\n    * byte into separate bytes (useful for paletted and grayscale images).\n    */\n   if (transforms & PNG_TRANSFORM_PACKING)\n      png_set_packing(png_ptr);\n#endif\n\n#ifdef PNG_READ_PACKSWAP_SUPPORTED\n   /* Change the order of packed pixels to least significant bit first\n    * (not useful if you are using png_set_packing).\n    */\n   if (transforms & PNG_TRANSFORM_PACKSWAP)\n      png_set_packswap(png_ptr);\n#endif\n\n#ifdef PNG_READ_EXPAND_SUPPORTED\n   /* Expand paletted colors into true RGB triplets\n    * Expand grayscale images to full 8 bits from 1, 2, or 4 bits/pixel\n    * Expand paletted or RGB images with transparency to full alpha\n    * channels so the data will be available as RGBA quartets.\n    */\n   if (transforms & PNG_TRANSFORM_EXPAND)\n      if ((png_ptr->bit_depth < 8) ||\n          (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||\n          (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))\n         png_set_expand(png_ptr);\n#endif\n\n   /* We don't handle background color or gamma transformation or dithering.\n    */\n\n#ifdef PNG_READ_INVERT_SUPPORTED\n   /* Invert monochrome files to have 0 as white and 1 as black\n    */\n   if (transforms & PNG_TRANSFORM_INVERT_MONO)\n      png_set_invert_mono(png_ptr);\n#endif\n\n#ifdef PNG_READ_SHIFT_SUPPORTED\n   /* If you want to shift the pixel values from the range [0,255] or\n    * [0,65535] to the original [0,7] or [0,31], or whatever range the\n    * colors were originally in:\n    */\n   if ((transforms & PNG_TRANSFORM_SHIFT)\n       && png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT))\n   {\n      png_color_8p sig_bit;\n\n      png_get_sBIT(png_ptr, info_ptr, &sig_bit);\n      png_set_shift(png_ptr, sig_bit);\n   }\n#endif\n\n#ifdef PNG_READ_BGR_SUPPORTED\n   /* Flip the RGB pixels to BGR (or RGBA to BGRA)\n    */\n   if (transforms & PNG_TRANSFORM_BGR)\n      png_set_bgr(png_ptr);\n#endif\n\n#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED\n   /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR)\n    */\n   if (transforms & PNG_TRANSFORM_SWAP_ALPHA)\n       png_set_swap_alpha(png_ptr);\n#endif\n\n#ifdef PNG_READ_SWAP_SUPPORTED\n   /* Swap bytes of 16 bit files to least significant byte first\n    */\n   if (transforms & PNG_TRANSFORM_SWAP_ENDIAN)\n      png_set_swap(png_ptr);\n#endif\n\n/* Added at libpng-1.2.41 */\n#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED\n   /* Invert the alpha channel from opacity to transparency\n    */\n   if (transforms & PNG_TRANSFORM_INVERT_ALPHA)\n       png_set_invert_alpha(png_ptr);\n#endif\n\n/* Added at libpng-1.2.41 */\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\n   /* Expand grayscale image to RGB\n    */\n   if (transforms & PNG_TRANSFORM_GRAY_TO_RGB)\n       png_set_gray_to_rgb(png_ptr);\n#endif\n\n   /* We don't handle adding filler bytes */\n\n   /* Optional call to gamma correct and add the background to the palette\n    * and update info structure.  REQUIRED if you are expecting libpng to\n    * update the palette for you (i.e., you selected such a transform above).\n    */\n   png_read_update_info(png_ptr, info_ptr);\n\n   /* -------------- image transformations end here ------------------- */\n\n#ifdef PNG_FREE_ME_SUPPORTED\n   png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);\n#endif\n   if (info_ptr->row_pointers == NULL)\n   {\n      info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,\n         info_ptr->height * png_sizeof(png_bytep));\n      png_memset(info_ptr->row_pointers, 0, info_ptr->height\n         * png_sizeof(png_bytep));\n\n#ifdef PNG_FREE_ME_SUPPORTED\n      info_ptr->free_me |= PNG_FREE_ROWS;\n#endif\n\n      for (row = 0; row < (int)info_ptr->height; row++)\n         info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,\n            png_get_rowbytes(png_ptr, info_ptr));\n   }\n\n   png_read_image(png_ptr, info_ptr->row_pointers);\n   info_ptr->valid |= PNG_INFO_IDAT;\n\n   /* Read rest of file, and get additional chunks in info_ptr - REQUIRED */\n   png_read_end(png_ptr, info_ptr);\n\n   transforms = transforms; /* Quiet compiler warnings */\n   params = params;\n\n}\n#endif /* PNG_INFO_IMAGE_SUPPORTED */\n#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */\n#endif /* PNG_READ_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngrio.c",
    "content": "\n/* pngrio.c - functions for data input\n *\n * Last changed in libpng 1.2.43 [February 25, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n * This file provides a location for all input.  Users who need\n * special handling are expected to write a function that has the same\n * arguments as this and performs a similar function, but that possibly\n * has a different input method.  Note that you shouldn't change this\n * function, but rather write a replacement function and then make\n * libpng use it at run time with png_set_read_fn(...).\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#ifdef PNG_READ_SUPPORTED\n\n/* Read the data from whatever input you are using.  The default routine\n * reads from a file pointer.  Note that this routine sometimes gets called\n * with very small lengths, so you should implement some kind of simple\n * buffering if you are using unbuffered reads.  This should never be asked\n * to read more then 64K on a 16 bit machine.\n */\nvoid /* PRIVATE */\npng_read_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   png_debug1(4, \"reading %d bytes\", (int)length);\n \n   if (png_ptr->read_data_fn != NULL)\n      (*(png_ptr->read_data_fn))(png_ptr, data, length);\n   else\n      png_error(png_ptr, \"Call to NULL read function\");\n}\n\n#ifdef PNG_STDIO_SUPPORTED\n/* This is the function that does the actual reading of data.  If you are\n * not reading from a standard C stream, you should create a replacement\n * read_data function and use it at run time with png_set_read_fn(), rather\n * than changing the library.\n */\n#ifndef USE_FAR_KEYWORD\nvoid PNGAPI\npng_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   png_size_t check;\n\n   if (png_ptr == NULL)\n      return;\n   /* fread() returns 0 on error, so it is OK to store this in a png_size_t\n    * instead of an int, which is what fread() actually returns.\n    */\n#ifdef _WIN32_WCE\n   if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )\n      check = 0;\n#else\n   check = (png_size_t)fread(data, (png_size_t)1, length,\n      (png_FILE_p)png_ptr->io_ptr);\n#endif\n\n   if (check != length)\n      png_error(png_ptr, \"Read Error\");\n}\n#else\n/* This is the model-independent version. Since the standard I/O library\n   can't handle far buffers in the medium and small models, we have to copy\n   the data.\n*/\n\n#define NEAR_BUF_SIZE 1024\n#define MIN(a,b) (a <= b ? a : b)\n\nstatic void PNGAPI\npng_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   int check;\n   png_byte *n_data;\n   png_FILE_p io_ptr;\n\n   if (png_ptr == NULL)\n      return;\n   /* Check if data really is near. If so, use usual code. */\n   n_data = (png_byte *)CVT_PTR_NOCHECK(data);\n   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);\n   if ((png_bytep)n_data == data)\n   {\n#ifdef _WIN32_WCE\n      if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check,\n          NULL) )\n         check = 0;\n#else\n      check = fread(n_data, 1, length, io_ptr);\n#endif\n   }\n   else\n   {\n      png_byte buf[NEAR_BUF_SIZE];\n      png_size_t read, remaining, err;\n      check = 0;\n      remaining = length;\n      do\n      {\n         read = MIN(NEAR_BUF_SIZE, remaining);\n#ifdef _WIN32_WCE\n         if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) )\n            err = 0;\n#else\n         err = fread(buf, (png_size_t)1, read, io_ptr);\n#endif\n         png_memcpy(data, buf, read); /* copy far buffer to near buffer */\n         if (err != read)\n            break;\n         else\n            check += err;\n         data += read;\n         remaining -= read;\n      }\n      while (remaining != 0);\n   }\n   if ((png_uint_32)check != (png_uint_32)length)\n      png_error(png_ptr, \"read Error\");\n}\n#endif\n#endif\n\n/* This function allows the application to supply a new input function\n * for libpng if standard C streams aren't being used.\n *\n * This function takes as its arguments:\n * png_ptr      - pointer to a png input data structure\n * io_ptr       - pointer to user supplied structure containing info about\n *                the input functions.  May be NULL.\n * read_data_fn - pointer to a new input function that takes as its\n *                arguments a pointer to a png_struct, a pointer to\n *                a location where input data can be stored, and a 32-bit\n *                unsigned int that is the number of bytes to be read.\n *                To exit and output any fatal error messages the new write\n *                function should call png_error(png_ptr, \"Error msg\").\n *                May be NULL, in which case libpng's default function will\n *                be used.\n */\nvoid PNGAPI\npng_set_read_fn(png_structp png_ptr, png_voidp io_ptr,\n   png_rw_ptr read_data_fn)\n{\n   if (png_ptr == NULL)\n      return;\n   png_ptr->io_ptr = io_ptr;\n\n#ifdef PNG_STDIO_SUPPORTED\n   if (read_data_fn != NULL)\n      png_ptr->read_data_fn = read_data_fn;\n   else\n      png_ptr->read_data_fn = png_default_read_data;\n#else\n   png_ptr->read_data_fn = read_data_fn;\n#endif\n\n   /* It is an error to write to a read device */\n   if (png_ptr->write_data_fn != NULL)\n   {\n      png_ptr->write_data_fn = NULL;\n      png_warning(png_ptr,\n         \"It's an error to set both read_data_fn and write_data_fn in the \");\n      png_warning(png_ptr,\n         \"same structure.  Resetting write_data_fn to NULL.\");\n   }\n\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\n   png_ptr->output_flush_fn = NULL;\n#endif\n}\n#endif /* PNG_READ_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngrtran.c",
    "content": "\n/* pngrtran.c - transforms the data in a row for PNG readers\n *\n * Last changed in libpng 1.2.43 [February 25, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n * This file contains functions optionally called by an application\n * in order to tell libpng how to handle data when reading a PNG.\n * Transformations that are used in both reading and writing are\n * in pngtrans.c.\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#ifdef PNG_READ_SUPPORTED\n\n/* Set the action on getting a CRC error for an ancillary or critical chunk. */\nvoid PNGAPI\npng_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)\n{\n   png_debug(1, \"in png_set_crc_action\");\n \n   if (png_ptr == NULL)\n      return;\n\n   /* Tell libpng how we react to CRC errors in critical chunks */\n   switch (crit_action)\n   {\n      case PNG_CRC_NO_CHANGE:                        /* Leave setting as is */\n         break;\n\n      case PNG_CRC_WARN_USE:                               /* Warn/use data */\n         png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK;\n         png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE;\n         break;\n\n      case PNG_CRC_QUIET_USE:                             /* Quiet/use data */\n         png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK;\n         png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE |\n                           PNG_FLAG_CRC_CRITICAL_IGNORE;\n         break;\n\n      case PNG_CRC_WARN_DISCARD:    /* Not a valid action for critical data */\n         png_warning(png_ptr,\n            \"Can't discard critical data on CRC error.\");\n      case PNG_CRC_ERROR_QUIT:                                /* Error/quit */\n\n      case PNG_CRC_DEFAULT:\n      default:\n         png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK;\n         break;\n   }\n\n   /* Tell libpng how we react to CRC errors in ancillary chunks */\n   switch (ancil_action)\n   {\n      case PNG_CRC_NO_CHANGE:                       /* Leave setting as is */\n         break;\n\n      case PNG_CRC_WARN_USE:                              /* Warn/use data */\n         png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK;\n         png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE;\n         break;\n\n      case PNG_CRC_QUIET_USE:                            /* Quiet/use data */\n         png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK;\n         png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE |\n                           PNG_FLAG_CRC_ANCILLARY_NOWARN;\n         break;\n\n      case PNG_CRC_ERROR_QUIT:                               /* Error/quit */\n         png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK;\n         png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_NOWARN;\n         break;\n\n      case PNG_CRC_WARN_DISCARD:                      /* Warn/discard data */\n\n      case PNG_CRC_DEFAULT:\n      default:\n         png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK;\n         break;\n   }\n}\n\n#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \\\n    defined(PNG_FLOATING_POINT_SUPPORTED)\n/* Handle alpha and tRNS via a background color */\nvoid PNGAPI\npng_set_background(png_structp png_ptr,\n   png_color_16p background_color, int background_gamma_code,\n   int need_expand, double background_gamma)\n{\n   png_debug(1, \"in png_set_background\");\n \n   if (png_ptr == NULL)\n      return;\n   if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN)\n   {\n      png_warning(png_ptr, \"Application must supply a known background gamma\");\n      return;\n   }\n\n   png_ptr->transformations |= PNG_BACKGROUND;\n   png_memcpy(&(png_ptr->background), background_color,\n      png_sizeof(png_color_16));\n   png_ptr->background_gamma = (float)background_gamma;\n   png_ptr->background_gamma_type = (png_byte)(background_gamma_code);\n   png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0);\n}\n#endif\n\n#ifdef PNG_READ_16_TO_8_SUPPORTED\n/* Strip 16 bit depth files to 8 bit depth */\nvoid PNGAPI\npng_set_strip_16(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_strip_16\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->transformations |= PNG_16_TO_8;\n}\n#endif\n\n#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED\nvoid PNGAPI\npng_set_strip_alpha(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_strip_alpha\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;\n}\n#endif\n\n#ifdef PNG_READ_DITHER_SUPPORTED\n/* Dither file to 8 bit.  Supply a palette, the current number\n * of elements in the palette, the maximum number of elements\n * allowed, and a histogram if possible.  If the current number\n * of colors is greater then the maximum number, the palette will be\n * modified to fit in the maximum number.  \"full_dither\" indicates\n * whether we need a dithering cube set up for RGB images, or if we\n * simply are reducing the number of colors in a paletted image.\n */\n\ntypedef struct png_dsort_struct\n{\n   struct png_dsort_struct FAR * next;\n   png_byte left;\n   png_byte right;\n} png_dsort;\ntypedef png_dsort FAR *       png_dsortp;\ntypedef png_dsort FAR * FAR * png_dsortpp;\n\nvoid PNGAPI\npng_set_dither(png_structp png_ptr, png_colorp palette,\n   int num_palette, int maximum_colors, png_uint_16p histogram,\n   int full_dither)\n{\n   png_debug(1, \"in png_set_dither\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->transformations |= PNG_DITHER;\n\n   if (!full_dither)\n   {\n      int i;\n\n      png_ptr->dither_index = (png_bytep)png_malloc(png_ptr,\n         (png_uint_32)(num_palette * png_sizeof(png_byte)));\n      for (i = 0; i < num_palette; i++)\n         png_ptr->dither_index[i] = (png_byte)i;\n   }\n\n   if (num_palette > maximum_colors)\n   {\n      if (histogram != NULL)\n      {\n         /* This is easy enough, just throw out the least used colors.\n          * Perhaps not the best solution, but good enough.\n          */\n\n         int i;\n\n         /* Initialize an array to sort colors */\n         png_ptr->dither_sort = (png_bytep)png_malloc(png_ptr,\n            (png_uint_32)(num_palette * png_sizeof(png_byte)));\n\n         /* Initialize the dither_sort array */\n         for (i = 0; i < num_palette; i++)\n            png_ptr->dither_sort[i] = (png_byte)i;\n\n         /* Find the least used palette entries by starting a\n          * bubble sort, and running it until we have sorted\n          * out enough colors.  Note that we don't care about\n          * sorting all the colors, just finding which are\n          * least used.\n          */\n\n         for (i = num_palette - 1; i >= maximum_colors; i--)\n         {\n            int done; /* To stop early if the list is pre-sorted */\n            int j;\n\n            done = 1;\n            for (j = 0; j < i; j++)\n            {\n               if (histogram[png_ptr->dither_sort[j]]\n                   < histogram[png_ptr->dither_sort[j + 1]])\n               {\n                  png_byte t;\n\n                  t = png_ptr->dither_sort[j];\n                  png_ptr->dither_sort[j] = png_ptr->dither_sort[j + 1];\n                  png_ptr->dither_sort[j + 1] = t;\n                  done = 0;\n               }\n            }\n            if (done)\n               break;\n         }\n\n         /* Swap the palette around, and set up a table, if necessary */\n         if (full_dither)\n         {\n            int j = num_palette;\n\n            /* Put all the useful colors within the max, but don't\n             * move the others.\n             */\n            for (i = 0; i < maximum_colors; i++)\n            {\n               if ((int)png_ptr->dither_sort[i] >= maximum_colors)\n               {\n                  do\n                     j--;\n                  while ((int)png_ptr->dither_sort[j] >= maximum_colors);\n                  palette[i] = palette[j];\n               }\n            }\n         }\n         else\n         {\n            int j = num_palette;\n\n            /* Move all the used colors inside the max limit, and\n             * develop a translation table.\n             */\n            for (i = 0; i < maximum_colors; i++)\n            {\n               /* Only move the colors we need to */\n               if ((int)png_ptr->dither_sort[i] >= maximum_colors)\n               {\n                  png_color tmp_color;\n\n                  do\n                     j--;\n                  while ((int)png_ptr->dither_sort[j] >= maximum_colors);\n\n                  tmp_color = palette[j];\n                  palette[j] = palette[i];\n                  palette[i] = tmp_color;\n                  /* Indicate where the color went */\n                  png_ptr->dither_index[j] = (png_byte)i;\n                  png_ptr->dither_index[i] = (png_byte)j;\n               }\n            }\n\n            /* Find closest color for those colors we are not using */\n            for (i = 0; i < num_palette; i++)\n            {\n               if ((int)png_ptr->dither_index[i] >= maximum_colors)\n               {\n                  int min_d, k, min_k, d_index;\n\n                  /* Find the closest color to one we threw out */\n                  d_index = png_ptr->dither_index[i];\n                  min_d = PNG_COLOR_DIST(palette[d_index], palette[0]);\n                  for (k = 1, min_k = 0; k < maximum_colors; k++)\n                  {\n                     int d;\n\n                     d = PNG_COLOR_DIST(palette[d_index], palette[k]);\n\n                     if (d < min_d)\n                     {\n                        min_d = d;\n                        min_k = k;\n                     }\n                  }\n                  /* Point to closest color */\n                  png_ptr->dither_index[i] = (png_byte)min_k;\n               }\n            }\n         }\n         png_free(png_ptr, png_ptr->dither_sort);\n         png_ptr->dither_sort = NULL;\n      }\n      else\n      {\n         /* This is much harder to do simply (and quickly).  Perhaps\n          * we need to go through a median cut routine, but those\n          * don't always behave themselves with only a few colors\n          * as input.  So we will just find the closest two colors,\n          * and throw out one of them (chosen somewhat randomly).\n          * [We don't understand this at all, so if someone wants to\n          *  work on improving it, be our guest - AED, GRP]\n          */\n         int i;\n         int max_d;\n         int num_new_palette;\n         png_dsortp t;\n         png_dsortpp hash;\n\n         t = NULL;\n\n         /* Initialize palette index arrays */\n         png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr,\n            (png_uint_32)(num_palette * png_sizeof(png_byte)));\n         png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr,\n            (png_uint_32)(num_palette * png_sizeof(png_byte)));\n\n         /* Initialize the sort array */\n         for (i = 0; i < num_palette; i++)\n         {\n            png_ptr->index_to_palette[i] = (png_byte)i;\n            png_ptr->palette_to_index[i] = (png_byte)i;\n         }\n\n         hash = (png_dsortpp)png_calloc(png_ptr, (png_uint_32)(769 *\n            png_sizeof(png_dsortp)));\n\n         num_new_palette = num_palette;\n\n         /* Initial wild guess at how far apart the farthest pixel\n          * pair we will be eliminating will be.  Larger\n          * numbers mean more areas will be allocated, Smaller\n          * numbers run the risk of not saving enough data, and\n          * having to do this all over again.\n          *\n          * I have not done extensive checking on this number.\n          */\n         max_d = 96;\n\n         while (num_new_palette > maximum_colors)\n         {\n            for (i = 0; i < num_new_palette - 1; i++)\n            {\n               int j;\n\n               for (j = i + 1; j < num_new_palette; j++)\n               {\n                  int d;\n\n                  d = PNG_COLOR_DIST(palette[i], palette[j]);\n\n                  if (d <= max_d)\n                  {\n\n                     t = (png_dsortp)png_malloc_warn(png_ptr,\n                         (png_uint_32)(png_sizeof(png_dsort)));\n                     if (t == NULL)\n                         break;\n                     t->next = hash[d];\n                     t->left = (png_byte)i;\n                     t->right = (png_byte)j;\n                     hash[d] = t;\n                  }\n               }\n               if (t == NULL)\n                  break;\n            }\n\n            if (t != NULL)\n            for (i = 0; i <= max_d; i++)\n            {\n               if (hash[i] != NULL)\n               {\n                  png_dsortp p;\n\n                  for (p = hash[i]; p; p = p->next)\n                  {\n                     if ((int)png_ptr->index_to_palette[p->left]\n                        < num_new_palette &&\n                        (int)png_ptr->index_to_palette[p->right]\n                        < num_new_palette)\n                     {\n                        int j, next_j;\n\n                        if (num_new_palette & 0x01)\n                        {\n                           j = p->left;\n                           next_j = p->right;\n                        }\n                        else\n                        {\n                           j = p->right;\n                           next_j = p->left;\n                        }\n\n                        num_new_palette--;\n                        palette[png_ptr->index_to_palette[j]]\n                          = palette[num_new_palette];\n                        if (!full_dither)\n                        {\n                           int k;\n\n                           for (k = 0; k < num_palette; k++)\n                           {\n                              if (png_ptr->dither_index[k] ==\n                                 png_ptr->index_to_palette[j])\n                                 png_ptr->dither_index[k] =\n                                    png_ptr->index_to_palette[next_j];\n                              if ((int)png_ptr->dither_index[k] ==\n                                 num_new_palette)\n                                 png_ptr->dither_index[k] =\n                                    png_ptr->index_to_palette[j];\n                           }\n                        }\n\n                        png_ptr->index_to_palette[png_ptr->palette_to_index\n                           [num_new_palette]] = png_ptr->index_to_palette[j];\n                        png_ptr->palette_to_index[png_ptr->index_to_palette[j]]\n                           = png_ptr->palette_to_index[num_new_palette];\n\n                        png_ptr->index_to_palette[j] =\n                            (png_byte)num_new_palette;\n                        png_ptr->palette_to_index[num_new_palette] =\n                            (png_byte)j;\n                     }\n                     if (num_new_palette <= maximum_colors)\n                        break;\n                  }\n                  if (num_new_palette <= maximum_colors)\n                     break;\n               }\n            }\n\n            for (i = 0; i < 769; i++)\n            {\n               if (hash[i] != NULL)\n               {\n                  png_dsortp p = hash[i];\n                  while (p)\n                  {\n                     t = p->next;\n                     png_free(png_ptr, p);\n                     p = t;\n                  }\n               }\n               hash[i] = 0;\n            }\n            max_d += 96;\n         }\n         png_free(png_ptr, hash);\n         png_free(png_ptr, png_ptr->palette_to_index);\n         png_free(png_ptr, png_ptr->index_to_palette);\n         png_ptr->palette_to_index = NULL;\n         png_ptr->index_to_palette = NULL;\n      }\n      num_palette = maximum_colors;\n   }\n   if (png_ptr->palette == NULL)\n   {\n      png_ptr->palette = palette;\n   }\n   png_ptr->num_palette = (png_uint_16)num_palette;\n\n   if (full_dither)\n   {\n      int i;\n      png_bytep distance;\n      int total_bits = PNG_DITHER_RED_BITS + PNG_DITHER_GREEN_BITS +\n         PNG_DITHER_BLUE_BITS;\n      int num_red = (1 << PNG_DITHER_RED_BITS);\n      int num_green = (1 << PNG_DITHER_GREEN_BITS);\n      int num_blue = (1 << PNG_DITHER_BLUE_BITS);\n      png_size_t num_entries = ((png_size_t)1 << total_bits);\n\n      png_ptr->palette_lookup = (png_bytep )png_calloc(png_ptr,\n         (png_uint_32)(num_entries * png_sizeof(png_byte)));\n\n      distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries *\n         png_sizeof(png_byte)));\n      png_memset(distance, 0xff, num_entries * png_sizeof(png_byte));\n\n      for (i = 0; i < num_palette; i++)\n      {\n         int ir, ig, ib;\n         int r = (palette[i].red >> (8 - PNG_DITHER_RED_BITS));\n         int g = (palette[i].green >> (8 - PNG_DITHER_GREEN_BITS));\n         int b = (palette[i].blue >> (8 - PNG_DITHER_BLUE_BITS));\n\n         for (ir = 0; ir < num_red; ir++)\n         {\n            /* int dr = abs(ir - r); */\n            int dr = ((ir > r) ? ir - r : r - ir);\n            int index_r = (ir << (PNG_DITHER_BLUE_BITS +\n                PNG_DITHER_GREEN_BITS));\n\n            for (ig = 0; ig < num_green; ig++)\n            {\n               /* int dg = abs(ig - g); */\n               int dg = ((ig > g) ? ig - g : g - ig);\n               int dt = dr + dg;\n               int dm = ((dr > dg) ? dr : dg);\n               int index_g = index_r | (ig << PNG_DITHER_BLUE_BITS);\n\n               for (ib = 0; ib < num_blue; ib++)\n               {\n                  int d_index = index_g | ib;\n                  /* int db = abs(ib - b); */\n                  int db = ((ib > b) ? ib - b : b - ib);\n                  int dmax = ((dm > db) ? dm : db);\n                  int d = dmax + dt + db;\n\n                  if (d < (int)distance[d_index])\n                  {\n                     distance[d_index] = (png_byte)d;\n                     png_ptr->palette_lookup[d_index] = (png_byte)i;\n                  }\n               }\n            }\n         }\n      }\n\n      png_free(png_ptr, distance);\n   }\n}\n#endif\n\n#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)\n/* Transform the image from the file_gamma to the screen_gamma.  We\n * only do transformations on images where the file_gamma and screen_gamma\n * are not close reciprocals, otherwise it slows things down slightly, and\n * also needlessly introduces small errors.\n *\n * We will turn off gamma transformation later if no semitransparent entries\n * are present in the tRNS array for palette images.  We can't do it here\n * because we don't necessarily have the tRNS chunk yet.\n */\nvoid PNGAPI\npng_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)\n{\n   png_debug(1, \"in png_set_gamma\");\n\n   if (png_ptr == NULL)\n      return;\n\n   if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) ||\n       (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) ||\n       (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))\n     png_ptr->transformations |= PNG_GAMMA;\n   png_ptr->gamma = (float)file_gamma;\n   png_ptr->screen_gamma = (float)scrn_gamma;\n}\n#endif\n\n#ifdef PNG_READ_EXPAND_SUPPORTED\n/* Expand paletted images to RGB, expand grayscale images of\n * less than 8-bit depth to 8-bit depth, and expand tRNS chunks\n * to alpha channels.\n */\nvoid PNGAPI\npng_set_expand(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_expand\");\n\n   if (png_ptr == NULL)\n      return;\n\n   png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);\n   png_ptr->flags &= ~PNG_FLAG_ROW_INIT;\n}\n\n/* GRR 19990627:  the following three functions currently are identical\n *  to png_set_expand().  However, it is entirely reasonable that someone\n *  might wish to expand an indexed image to RGB but *not* expand a single,\n *  fully transparent palette entry to a full alpha channel--perhaps instead\n *  convert tRNS to the grayscale/RGB format (16-bit RGB value), or replace\n *  the transparent color with a particular RGB value, or drop tRNS entirely.\n *  IOW, a future version of the library may make the transformations flag\n *  a bit more fine-grained, with separate bits for each of these three\n *  functions.\n *\n *  More to the point, these functions make it obvious what libpng will be\n *  doing, whereas \"expand\" can (and does) mean any number of things.\n *\n *  GRP 20060307: In libpng-1.2.9, png_set_gray_1_2_4_to_8() was modified\n *  to expand only the sample depth but not to expand the tRNS to alpha\n *  and its name was changed to png_set_expand_gray_1_2_4_to_8().\n */\n\n/* Expand paletted images to RGB. */\nvoid PNGAPI\npng_set_palette_to_rgb(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_palette_to_rgb\");\n\n   if (png_ptr == NULL)\n      return;\n\n   png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);\n   png_ptr->flags &= ~PNG_FLAG_ROW_INIT;\n}\n\n#ifndef PNG_1_0_X\n/* Expand grayscale images of less than 8-bit depth to 8 bits. */\nvoid PNGAPI\npng_set_expand_gray_1_2_4_to_8(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_expand_gray_1_2_4_to_8\");\n\n   if (png_ptr == NULL)\n      return;\n\n   png_ptr->transformations |= PNG_EXPAND;\n   png_ptr->flags &= ~PNG_FLAG_ROW_INIT;\n}\n#endif\n\n#if defined(PNG_1_0_X) || defined(PNG_1_2_X)\n/* Expand grayscale images of less than 8-bit depth to 8 bits. */\n/* Deprecated as of libpng-1.2.9 */\nvoid PNGAPI\npng_set_gray_1_2_4_to_8(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_gray_1_2_4_to_8\");\n\n   if (png_ptr == NULL)\n      return;\n\n   png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);\n}\n#endif\n\n\n/* Expand tRNS chunks to alpha channels. */\nvoid PNGAPI\npng_set_tRNS_to_alpha(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_tRNS_to_alpha\");\n\n   png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);\n   png_ptr->flags &= ~PNG_FLAG_ROW_INIT;\n}\n#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */\n\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\nvoid PNGAPI\npng_set_gray_to_rgb(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_gray_to_rgb\");\n\n   png_ptr->transformations |= PNG_GRAY_TO_RGB;\n   png_ptr->flags &= ~PNG_FLAG_ROW_INIT;\n}\n#endif\n\n#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n/* Convert a RGB image to a grayscale of the same width.  This allows us,\n * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image.\n */\n\nvoid PNGAPI\npng_set_rgb_to_gray(png_structp png_ptr, int error_action, double red,\n   double green)\n{\n   int red_fixed = (int)((float)red*100000.0 + 0.5);\n   int green_fixed = (int)((float)green*100000.0 + 0.5);\n   if (png_ptr == NULL)\n      return;\n   png_set_rgb_to_gray_fixed(png_ptr, error_action, red_fixed, green_fixed);\n}\n#endif\n\nvoid PNGAPI\npng_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,\n   png_fixed_point red, png_fixed_point green)\n{\n   png_debug(1, \"in png_set_rgb_to_gray\");\n\n   if (png_ptr == NULL)\n      return;\n\n   switch(error_action)\n   {\n      case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY;\n              break;\n\n      case 2: png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN;\n              break;\n\n      case 3: png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR;\n   }\n   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n#ifdef PNG_READ_EXPAND_SUPPORTED\n      png_ptr->transformations |= PNG_EXPAND;\n#else\n   {\n      png_warning(png_ptr,\n        \"Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED.\");\n      png_ptr->transformations &= ~PNG_RGB_TO_GRAY;\n   }\n#endif\n   {\n      png_uint_16 red_int, green_int;\n      if (red < 0 || green < 0)\n      {\n         red_int   =  6968; /* .212671 * 32768 + .5 */\n         green_int = 23434; /* .715160 * 32768 + .5 */\n      }\n      else if (red + green < 100000L)\n      {\n         red_int = (png_uint_16)(((png_uint_32)red*32768L)/100000L);\n         green_int = (png_uint_16)(((png_uint_32)green*32768L)/100000L);\n      }\n      else\n      {\n         png_warning(png_ptr, \"ignoring out of range rgb_to_gray coefficients\");\n         red_int   =  6968;\n         green_int = 23434;\n      }\n      png_ptr->rgb_to_gray_red_coeff   = red_int;\n      png_ptr->rgb_to_gray_green_coeff = green_int;\n      png_ptr->rgb_to_gray_blue_coeff  =\n         (png_uint_16)(32768 - red_int - green_int);\n   }\n}\n#endif\n\n#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_LEGACY_SUPPORTED) || \\\n    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)\nvoid PNGAPI\npng_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr\n   read_user_transform_fn)\n{\n   png_debug(1, \"in png_set_read_user_transform_fn\");\n\n   if (png_ptr == NULL)\n      return;\n\n#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\n   png_ptr->transformations |= PNG_USER_TRANSFORM;\n   png_ptr->read_user_transform_fn = read_user_transform_fn;\n#endif\n#ifdef PNG_LEGACY_SUPPORTED\n   if (read_user_transform_fn)\n      png_warning(png_ptr,\n        \"This version of libpng does not support user transforms\");\n#endif\n}\n#endif\n\n/* Initialize everything needed for the read.  This includes modifying\n * the palette.\n */\nvoid /* PRIVATE */\npng_init_read_transformations(png_structp png_ptr)\n{\n   png_debug(1, \"in png_init_read_transformations\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n  if (png_ptr != NULL)\n#endif\n  {\n#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \\\n    defined(PNG_READ_SHIFT_SUPPORTED) || \\\n    defined(PNG_READ_GAMMA_SUPPORTED)\n   int color_type = png_ptr->color_type;\n#endif\n\n#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED)\n\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\n   /* Detect gray background and attempt to enable optimization\n    * for gray --> RGB case\n    *\n    * Note:  if PNG_BACKGROUND_EXPAND is set and color_type is either RGB or\n    * RGB_ALPHA (in which case need_expand is superfluous anyway), the\n    * background color might actually be gray yet not be flagged as such.\n    * This is not a problem for the current code, which uses\n    * PNG_BACKGROUND_IS_GRAY only to decide when to do the\n    * png_do_gray_to_rgb() transformation.\n    */\n   if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&\n       !(color_type & PNG_COLOR_MASK_COLOR))\n   {\n          png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;\n   } else if ((png_ptr->transformations & PNG_BACKGROUND) &&\n              !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&\n              (png_ptr->transformations & PNG_GRAY_TO_RGB) &&\n              png_ptr->background.red == png_ptr->background.green &&\n              png_ptr->background.red == png_ptr->background.blue)\n   {\n          png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;\n          png_ptr->background.gray = png_ptr->background.red;\n   }\n#endif\n\n   if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&\n       (png_ptr->transformations & PNG_EXPAND))\n   {\n      if (!(color_type & PNG_COLOR_MASK_COLOR))  /* i.e., GRAY or GRAY_ALPHA */\n      {\n         /* Expand background and tRNS chunks */\n         switch (png_ptr->bit_depth)\n         {\n            case 1:\n               png_ptr->background.gray *= (png_uint_16)0xff;\n               png_ptr->background.red = png_ptr->background.green\n                 =  png_ptr->background.blue = png_ptr->background.gray;\n               if (!(png_ptr->transformations & PNG_EXPAND_tRNS))\n               {\n                 png_ptr->trans_values.gray *= (png_uint_16)0xff;\n                 png_ptr->trans_values.red = png_ptr->trans_values.green\n                   = png_ptr->trans_values.blue = png_ptr->trans_values.gray;\n               }\n               break;\n\n            case 2:\n               png_ptr->background.gray *= (png_uint_16)0x55;\n               png_ptr->background.red = png_ptr->background.green\n                 = png_ptr->background.blue = png_ptr->background.gray;\n               if (!(png_ptr->transformations & PNG_EXPAND_tRNS))\n               {\n                 png_ptr->trans_values.gray *= (png_uint_16)0x55;\n                 png_ptr->trans_values.red = png_ptr->trans_values.green\n                   = png_ptr->trans_values.blue = png_ptr->trans_values.gray;\n               }\n               break;\n\n            case 4:\n               png_ptr->background.gray *= (png_uint_16)0x11;\n               png_ptr->background.red = png_ptr->background.green\n                 = png_ptr->background.blue = png_ptr->background.gray;\n               if (!(png_ptr->transformations & PNG_EXPAND_tRNS))\n               {\n                 png_ptr->trans_values.gray *= (png_uint_16)0x11;\n                 png_ptr->trans_values.red = png_ptr->trans_values.green\n                   = png_ptr->trans_values.blue = png_ptr->trans_values.gray;\n               }\n               break;\n\n            case 8:\n\n            case 16:\n               png_ptr->background.red = png_ptr->background.green\n                 = png_ptr->background.blue = png_ptr->background.gray;\n               break;\n         }\n      }\n      else if (color_type == PNG_COLOR_TYPE_PALETTE)\n      {\n         png_ptr->background.red   =\n            png_ptr->palette[png_ptr->background.index].red;\n         png_ptr->background.green =\n            png_ptr->palette[png_ptr->background.index].green;\n         png_ptr->background.blue  =\n            png_ptr->palette[png_ptr->background.index].blue;\n\n#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED\n        if (png_ptr->transformations & PNG_INVERT_ALPHA)\n        {\n#ifdef PNG_READ_EXPAND_SUPPORTED\n           if (!(png_ptr->transformations & PNG_EXPAND_tRNS))\n#endif\n           {\n           /* Invert the alpha channel (in tRNS) unless the pixels are\n            * going to be expanded, in which case leave it for later\n            */\n              int i, istop;\n              istop=(int)png_ptr->num_trans;\n              for (i=0; i<istop; i++)\n                 png_ptr->trans[i] = (png_byte)(255 - png_ptr->trans[i]);\n           }\n        }\n#endif\n\n      }\n   }\n#endif\n\n#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)\n   png_ptr->background_1 = png_ptr->background;\n#endif\n#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)\n\n   if ((color_type == PNG_COLOR_TYPE_PALETTE && png_ptr->num_trans != 0)\n       && (fabs(png_ptr->screen_gamma * png_ptr->gamma - 1.0)\n         < PNG_GAMMA_THRESHOLD))\n   {\n    int i, k;\n    k=0;\n    for (i=0; i<png_ptr->num_trans; i++)\n    {\n      if (png_ptr->trans[i] != 0 && png_ptr->trans[i] != 0xff)\n        k=1; /* Partial transparency is present */\n    }\n    if (k == 0)\n      png_ptr->transformations &= ~PNG_GAMMA;\n   }\n\n   if ((png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) &&\n        png_ptr->gamma != 0.0)\n   {\n      png_build_gamma_table(png_ptr);\n\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n      if (png_ptr->transformations & PNG_BACKGROUND)\n      {\n         if (color_type == PNG_COLOR_TYPE_PALETTE)\n         {\n           /* Could skip if no transparency */\n            png_color back, back_1;\n            png_colorp palette = png_ptr->palette;\n            int num_palette = png_ptr->num_palette;\n            int i;\n            if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE)\n            {\n               back.red = png_ptr->gamma_table[png_ptr->background.red];\n               back.green = png_ptr->gamma_table[png_ptr->background.green];\n               back.blue = png_ptr->gamma_table[png_ptr->background.blue];\n\n               back_1.red = png_ptr->gamma_to_1[png_ptr->background.red];\n               back_1.green = png_ptr->gamma_to_1[png_ptr->background.green];\n               back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue];\n            }\n            else\n            {\n               double g, gs;\n\n               switch (png_ptr->background_gamma_type)\n               {\n                  case PNG_BACKGROUND_GAMMA_SCREEN:\n                     g = (png_ptr->screen_gamma);\n                     gs = 1.0;\n                     break;\n\n                  case PNG_BACKGROUND_GAMMA_FILE:\n                     g = 1.0 / (png_ptr->gamma);\n                     gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);\n                     break;\n\n                  case PNG_BACKGROUND_GAMMA_UNIQUE:\n                     g = 1.0 / (png_ptr->background_gamma);\n                     gs = 1.0 / (png_ptr->background_gamma *\n                                 png_ptr->screen_gamma);\n                     break;\n                  default:\n                     g = 1.0;    /* back_1 */\n                     gs = 1.0;   /* back */\n               }\n\n               if ( fabs(gs - 1.0) < PNG_GAMMA_THRESHOLD)\n               {\n                  back.red   = (png_byte)png_ptr->background.red;\n                  back.green = (png_byte)png_ptr->background.green;\n                  back.blue  = (png_byte)png_ptr->background.blue;\n               }\n               else\n               {\n                  back.red = (png_byte)(pow(\n                     (double)png_ptr->background.red/255, gs) * 255.0 + .5);\n                  back.green = (png_byte)(pow(\n                     (double)png_ptr->background.green/255, gs) * 255.0\n                         + .5);\n                  back.blue = (png_byte)(pow(\n                     (double)png_ptr->background.blue/255, gs) * 255.0 + .5);\n               }\n\n               back_1.red = (png_byte)(pow(\n                  (double)png_ptr->background.red/255, g) * 255.0 + .5);\n               back_1.green = (png_byte)(pow(\n                  (double)png_ptr->background.green/255, g) * 255.0 + .5);\n               back_1.blue = (png_byte)(pow(\n                  (double)png_ptr->background.blue/255, g) * 255.0 + .5);\n            }\n            for (i = 0; i < num_palette; i++)\n            {\n               if (i < (int)png_ptr->num_trans && png_ptr->trans[i] != 0xff)\n               {\n                  if (png_ptr->trans[i] == 0)\n                  {\n                     palette[i] = back;\n                  }\n                  else /* if (png_ptr->trans[i] != 0xff) */\n                  {\n                     png_byte v, w;\n\n                     v = png_ptr->gamma_to_1[palette[i].red];\n                     png_composite(w, v, png_ptr->trans[i], back_1.red);\n                     palette[i].red = png_ptr->gamma_from_1[w];\n\n                     v = png_ptr->gamma_to_1[palette[i].green];\n                     png_composite(w, v, png_ptr->trans[i], back_1.green);\n                     palette[i].green = png_ptr->gamma_from_1[w];\n\n                     v = png_ptr->gamma_to_1[palette[i].blue];\n                     png_composite(w, v, png_ptr->trans[i], back_1.blue);\n                     palette[i].blue = png_ptr->gamma_from_1[w];\n                  }\n               }\n               else\n               {\n                  palette[i].red = png_ptr->gamma_table[palette[i].red];\n                  palette[i].green = png_ptr->gamma_table[palette[i].green];\n                  palette[i].blue = png_ptr->gamma_table[palette[i].blue];\n               }\n            }\n            /* Prevent the transformations being done again, and make sure\n             * that the now spurious alpha channel is stripped - the code\n             * has just reduced background composition and gamma correction\n             * to a simple alpha channel strip.\n             */\n            png_ptr->transformations &= ~PNG_BACKGROUND;\n            png_ptr->transformations &= ~PNG_GAMMA;\n            png_ptr->transformations |= PNG_STRIP_ALPHA;\n         }\n         /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */\n         else\n         /* color_type != PNG_COLOR_TYPE_PALETTE */\n         {\n            double m = (double)(((png_uint_32)1 << png_ptr->bit_depth) - 1);\n            double g = 1.0;\n            double gs = 1.0;\n\n            switch (png_ptr->background_gamma_type)\n            {\n               case PNG_BACKGROUND_GAMMA_SCREEN:\n                  g = (png_ptr->screen_gamma);\n                  gs = 1.0;\n                  break;\n\n               case PNG_BACKGROUND_GAMMA_FILE:\n                  g = 1.0 / (png_ptr->gamma);\n                  gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);\n                  break;\n\n               case PNG_BACKGROUND_GAMMA_UNIQUE:\n                  g = 1.0 / (png_ptr->background_gamma);\n                  gs = 1.0 / (png_ptr->background_gamma *\n                     png_ptr->screen_gamma);\n                  break;\n            }\n\n            png_ptr->background_1.gray = (png_uint_16)(pow(\n               (double)png_ptr->background.gray / m, g) * m + .5);\n            png_ptr->background.gray = (png_uint_16)(pow(\n               (double)png_ptr->background.gray / m, gs) * m + .5);\n\n            if ((png_ptr->background.red != png_ptr->background.green) ||\n                (png_ptr->background.red != png_ptr->background.blue) ||\n                (png_ptr->background.red != png_ptr->background.gray))\n            {\n               /* RGB or RGBA with color background */\n               png_ptr->background_1.red = (png_uint_16)(pow(\n                  (double)png_ptr->background.red / m, g) * m + .5);\n               png_ptr->background_1.green = (png_uint_16)(pow(\n                  (double)png_ptr->background.green / m, g) * m + .5);\n               png_ptr->background_1.blue = (png_uint_16)(pow(\n                  (double)png_ptr->background.blue / m, g) * m + .5);\n               png_ptr->background.red = (png_uint_16)(pow(\n                  (double)png_ptr->background.red / m, gs) * m + .5);\n               png_ptr->background.green = (png_uint_16)(pow(\n                  (double)png_ptr->background.green / m, gs) * m + .5);\n               png_ptr->background.blue = (png_uint_16)(pow(\n                  (double)png_ptr->background.blue / m, gs) * m + .5);\n            }\n            else\n            {\n               /* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */\n               png_ptr->background_1.red = png_ptr->background_1.green\n                 = png_ptr->background_1.blue = png_ptr->background_1.gray;\n               png_ptr->background.red = png_ptr->background.green\n                 = png_ptr->background.blue = png_ptr->background.gray;\n            }\n         }\n      }\n      else\n      /* Transformation does not include PNG_BACKGROUND */\n#endif /* PNG_READ_BACKGROUND_SUPPORTED */\n      if (color_type == PNG_COLOR_TYPE_PALETTE)\n      {\n         png_colorp palette = png_ptr->palette;\n         int num_palette = png_ptr->num_palette;\n         int i;\n\n         for (i = 0; i < num_palette; i++)\n         {\n            palette[i].red = png_ptr->gamma_table[palette[i].red];\n            palette[i].green = png_ptr->gamma_table[palette[i].green];\n            palette[i].blue = png_ptr->gamma_table[palette[i].blue];\n         }\n\n         /* Done the gamma correction. */\n         png_ptr->transformations &= ~PNG_GAMMA;\n      }\n   }\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n   else\n#endif\n#endif /* PNG_READ_GAMMA_SUPPORTED && PNG_FLOATING_POINT_SUPPORTED */\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n   /* No GAMMA transformation */\n   if ((png_ptr->transformations & PNG_BACKGROUND) &&\n       (color_type == PNG_COLOR_TYPE_PALETTE))\n   {\n      int i;\n      int istop = (int)png_ptr->num_trans;\n      png_color back;\n      png_colorp palette = png_ptr->palette;\n\n      back.red   = (png_byte)png_ptr->background.red;\n      back.green = (png_byte)png_ptr->background.green;\n      back.blue  = (png_byte)png_ptr->background.blue;\n\n      for (i = 0; i < istop; i++)\n      {\n         if (png_ptr->trans[i] == 0)\n         {\n            palette[i] = back;\n         }\n         else if (png_ptr->trans[i] != 0xff)\n         {\n            /* The png_composite() macro is defined in png.h */\n            png_composite(palette[i].red, palette[i].red,\n               png_ptr->trans[i], back.red);\n            png_composite(palette[i].green, palette[i].green,\n               png_ptr->trans[i], back.green);\n            png_composite(palette[i].blue, palette[i].blue,\n               png_ptr->trans[i], back.blue);\n         }\n      }\n\n      /* Handled alpha, still need to strip the channel. */\n      png_ptr->transformations &= ~PNG_BACKGROUND;\n      png_ptr->transformations |= PNG_STRIP_ALPHA;\n   }\n#endif /* PNG_READ_BACKGROUND_SUPPORTED */\n\n#ifdef PNG_READ_SHIFT_SUPPORTED\n   if ((png_ptr->transformations & PNG_SHIFT) &&\n      (color_type == PNG_COLOR_TYPE_PALETTE))\n   {\n      png_uint_16 i;\n      png_uint_16 istop = png_ptr->num_palette;\n      int sr = 8 - png_ptr->sig_bit.red;\n      int sg = 8 - png_ptr->sig_bit.green;\n      int sb = 8 - png_ptr->sig_bit.blue;\n\n      if (sr < 0 || sr > 8)\n         sr = 0;\n      if (sg < 0 || sg > 8)\n         sg = 0;\n      if (sb < 0 || sb > 8)\n         sb = 0;\n      for (i = 0; i < istop; i++)\n      {\n         png_ptr->palette[i].red >>= sr;\n         png_ptr->palette[i].green >>= sg;\n         png_ptr->palette[i].blue >>= sb;\n      }\n   }\n#endif  /* PNG_READ_SHIFT_SUPPORTED */\n }\n#if !defined(PNG_READ_GAMMA_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) \\\n && !defined(PNG_READ_BACKGROUND_SUPPORTED)\n   if (png_ptr)\n      return;\n#endif\n}\n\n/* Modify the info structure to reflect the transformations.  The\n * info should be updated so a PNG file could be written with it,\n * assuming the transformations result in valid PNG data.\n */\nvoid /* PRIVATE */\npng_read_transform_info(png_structp png_ptr, png_infop info_ptr)\n{\n   png_debug(1, \"in png_read_transform_info\");\n\n#ifdef PNG_READ_EXPAND_SUPPORTED\n   if (png_ptr->transformations & PNG_EXPAND)\n   {\n      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      {\n         if (png_ptr->num_trans &&\n              (png_ptr->transformations & PNG_EXPAND_tRNS))\n            info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;\n         else\n            info_ptr->color_type = PNG_COLOR_TYPE_RGB;\n         info_ptr->bit_depth = 8;\n         info_ptr->num_trans = 0;\n      }\n      else\n      {\n         if (png_ptr->num_trans)\n         {\n            if (png_ptr->transformations & PNG_EXPAND_tRNS)\n              info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;\n         }\n         if (info_ptr->bit_depth < 8)\n            info_ptr->bit_depth = 8;\n         info_ptr->num_trans = 0;\n      }\n   }\n#endif\n\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n   if (png_ptr->transformations & PNG_BACKGROUND)\n   {\n      info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;\n      info_ptr->num_trans = 0;\n      info_ptr->background = png_ptr->background;\n   }\n#endif\n\n#ifdef PNG_READ_GAMMA_SUPPORTED\n   if (png_ptr->transformations & PNG_GAMMA)\n   {\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n      info_ptr->gamma = png_ptr->gamma;\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\n      info_ptr->int_gamma = png_ptr->int_gamma;\n#endif\n   }\n#endif\n\n#ifdef PNG_READ_16_TO_8_SUPPORTED\n   if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16))\n      info_ptr->bit_depth = 8;\n#endif\n\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\n   if (png_ptr->transformations & PNG_GRAY_TO_RGB)\n      info_ptr->color_type |= PNG_COLOR_MASK_COLOR;\n#endif\n\n#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\n   if (png_ptr->transformations & PNG_RGB_TO_GRAY)\n      info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR;\n#endif\n\n#ifdef PNG_READ_DITHER_SUPPORTED\n   if (png_ptr->transformations & PNG_DITHER)\n   {\n      if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||\n          (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) &&\n          png_ptr->palette_lookup && info_ptr->bit_depth == 8)\n      {\n         info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;\n      }\n   }\n#endif\n\n#ifdef PNG_READ_PACK_SUPPORTED\n   if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8))\n      info_ptr->bit_depth = 8;\n#endif\n\n   if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      info_ptr->channels = 1;\n   else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)\n      info_ptr->channels = 3;\n   else\n      info_ptr->channels = 1;\n\n#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED\n   if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)\n      info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;\n#endif\n\n   if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)\n      info_ptr->channels++;\n\n#ifdef PNG_READ_FILLER_SUPPORTED\n   /* STRIP_ALPHA and FILLER allowed:  MASK_ALPHA bit stripped above */\n   if ((png_ptr->transformations & PNG_FILLER) &&\n       ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||\n       (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)))\n   {\n      info_ptr->channels++;\n      /* If adding a true alpha channel not just filler */\n#ifndef PNG_1_0_X\n      if (png_ptr->transformations & PNG_ADD_ALPHA)\n        info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;\n#endif\n   }\n#endif\n\n#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) && \\\ndefined(PNG_READ_USER_TRANSFORM_SUPPORTED)\n   if (png_ptr->transformations & PNG_USER_TRANSFORM)\n     {\n       if (info_ptr->bit_depth < png_ptr->user_transform_depth)\n         info_ptr->bit_depth = png_ptr->user_transform_depth;\n       if (info_ptr->channels < png_ptr->user_transform_channels)\n         info_ptr->channels = png_ptr->user_transform_channels;\n     }\n#endif\n\n   info_ptr->pixel_depth = (png_byte)(info_ptr->channels *\n      info_ptr->bit_depth);\n\n   info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width);\n\n#ifndef PNG_READ_EXPAND_SUPPORTED\n   if (png_ptr)\n      return;\n#endif\n}\n\n/* Transform the row.  The order of transformations is significant,\n * and is very touchy.  If you add a transformation, take care to\n * decide how it fits in with the other transformations here.\n */\nvoid /* PRIVATE */\npng_do_read_transformations(png_structp png_ptr)\n{\n   png_debug(1, \"in png_do_read_transformations\");\n\n   if (png_ptr->row_buf == NULL)\n   {\n#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)\n      char msg[50];\n\n      png_snprintf2(msg, 50,\n         \"NULL row buffer for row %ld, pass %d\", (long)png_ptr->row_number,\n         png_ptr->pass);\n      png_error(png_ptr, msg);\n#else\n      png_error(png_ptr, \"NULL row buffer\");\n#endif\n   }\n#ifdef PNG_WARN_UNINITIALIZED_ROW\n   if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))\n      /* Application has failed to call either png_read_start_image()\n       * or png_read_update_info() after setting transforms that expand\n       * pixels.  This check added to libpng-1.2.19\n       */\n#if (PNG_WARN_UNINITIALIZED_ROW==1)\n      png_error(png_ptr, \"Uninitialized row\");\n#else\n      png_warning(png_ptr, \"Uninitialized row\");\n#endif\n#endif\n\n#ifdef PNG_READ_EXPAND_SUPPORTED\n   if (png_ptr->transformations & PNG_EXPAND)\n   {\n      if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE)\n      {\n         png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1,\n            png_ptr->palette, png_ptr->trans, png_ptr->num_trans);\n      }\n      else\n      {\n         if (png_ptr->num_trans &&\n             (png_ptr->transformations & PNG_EXPAND_tRNS))\n            png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,\n               &(png_ptr->trans_values));\n         else\n            png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,\n               NULL);\n      }\n   }\n#endif\n\n#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED\n   if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)\n      png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,\n         PNG_FLAG_FILLER_AFTER | (png_ptr->flags & PNG_FLAG_STRIP_ALPHA));\n#endif\n\n#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\n   if (png_ptr->transformations & PNG_RGB_TO_GRAY)\n   {\n      int rgb_error =\n         png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info),\n             png_ptr->row_buf + 1);\n      if (rgb_error)\n      {\n         png_ptr->rgb_to_gray_status=1;\n         if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==\n             PNG_RGB_TO_GRAY_WARN)\n            png_warning(png_ptr, \"png_do_rgb_to_gray found nongray pixel\");\n         if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==\n             PNG_RGB_TO_GRAY_ERR)\n            png_error(png_ptr, \"png_do_rgb_to_gray found nongray pixel\");\n      }\n   }\n#endif\n\n/* From Andreas Dilger e-mail to png-implement, 26 March 1998:\n *\n *   In most cases, the \"simple transparency\" should be done prior to doing\n *   gray-to-RGB, or you will have to test 3x as many bytes to check if a\n *   pixel is transparent.  You would also need to make sure that the\n *   transparency information is upgraded to RGB.\n *\n *   To summarize, the current flow is:\n *   - Gray + simple transparency -> compare 1 or 2 gray bytes and composite\n *                                   with background \"in place\" if transparent,\n *                                   convert to RGB if necessary\n *   - Gray + alpha -> composite with gray background and remove alpha bytes,\n *                                   convert to RGB if necessary\n *\n *   To support RGB backgrounds for gray images we need:\n *   - Gray + simple transparency -> convert to RGB + simple transparency,\n *                                   compare 3 or 6 bytes and composite with\n *                                   background \"in place\" if transparent\n *                                   (3x compare/pixel compared to doing\n *                                   composite with gray bkgrnd)\n *   - Gray + alpha -> convert to RGB + alpha, composite with background and\n *                                   remove alpha bytes (3x float\n *                                   operations/pixel compared with composite\n *                                   on gray background)\n *\n *  Greg's change will do this.  The reason it wasn't done before is for\n *  performance, as this increases the per-pixel operations.  If we would check\n *  in advance if the background was gray or RGB, and position the gray-to-RGB\n *  transform appropriately, then it would save a lot of work/time.\n */\n\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\n   /* If gray -> RGB, do so now only if background is non-gray; else do later\n    * for performance reasons\n    */\n   if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&\n       !(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))\n      png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n   if ((png_ptr->transformations & PNG_BACKGROUND) &&\n      ((png_ptr->num_trans != 0 ) ||\n      (png_ptr->color_type & PNG_COLOR_MASK_ALPHA)))\n      png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1,\n         &(png_ptr->trans_values), &(png_ptr->background)\n#ifdef PNG_READ_GAMMA_SUPPORTED\n         , &(png_ptr->background_1),\n         png_ptr->gamma_table, png_ptr->gamma_from_1,\n         png_ptr->gamma_to_1, png_ptr->gamma_16_table,\n         png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1,\n         png_ptr->gamma_shift\n#endif\n);\n#endif\n\n#ifdef PNG_READ_GAMMA_SUPPORTED\n   if ((png_ptr->transformations & PNG_GAMMA) &&\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n       !((png_ptr->transformations & PNG_BACKGROUND) &&\n       ((png_ptr->num_trans != 0) ||\n       (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) &&\n#endif\n       (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE))\n      png_do_gamma(&(png_ptr->row_info), png_ptr->row_buf + 1,\n          png_ptr->gamma_table, png_ptr->gamma_16_table,\n          png_ptr->gamma_shift);\n#endif\n\n#ifdef PNG_READ_16_TO_8_SUPPORTED\n   if (png_ptr->transformations & PNG_16_TO_8)\n      png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_DITHER_SUPPORTED\n   if (png_ptr->transformations & PNG_DITHER)\n   {\n      png_do_dither((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1,\n         png_ptr->palette_lookup, png_ptr->dither_index);\n      if (png_ptr->row_info.rowbytes == (png_uint_32)0)\n         png_error(png_ptr, \"png_do_dither returned rowbytes=0\");\n   }\n#endif\n\n#ifdef PNG_READ_INVERT_SUPPORTED\n   if (png_ptr->transformations & PNG_INVERT_MONO)\n      png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_SHIFT_SUPPORTED\n   if (png_ptr->transformations & PNG_SHIFT)\n      png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1,\n         &(png_ptr->shift));\n#endif\n\n#ifdef PNG_READ_PACK_SUPPORTED\n   if (png_ptr->transformations & PNG_PACK)\n      png_do_unpack(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_BGR_SUPPORTED\n   if (png_ptr->transformations & PNG_BGR)\n      png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_PACKSWAP_SUPPORTED\n   if (png_ptr->transformations & PNG_PACKSWAP)\n      png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\n   /* If gray -> RGB, do so now only if we did not do so above */\n   if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&\n       (png_ptr->mode & PNG_BACKGROUND_IS_GRAY))\n      png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_FILLER_SUPPORTED\n   if (png_ptr->transformations & PNG_FILLER)\n      png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,\n         (png_uint_32)png_ptr->filler, png_ptr->flags);\n#endif\n\n#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED\n   if (png_ptr->transformations & PNG_INVERT_ALPHA)\n      png_do_read_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED\n   if (png_ptr->transformations & PNG_SWAP_ALPHA)\n      png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_SWAP_SUPPORTED\n   if (png_ptr->transformations & PNG_SWAP_BYTES)\n      png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n\n#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\n   if (png_ptr->transformations & PNG_USER_TRANSFORM)\n    {\n      if (png_ptr->read_user_transform_fn != NULL)\n         (*(png_ptr->read_user_transform_fn)) /* User read transform function */\n            (png_ptr,                    /* png_ptr */\n               &(png_ptr->row_info),     /* row_info: */\n               /*  png_uint_32 width;       width of row */\n               /*  png_uint_32 rowbytes;    number of bytes in row */\n               /*  png_byte color_type;     color type of pixels */\n               /*  png_byte bit_depth;      bit depth of samples */\n               /*  png_byte channels;       number of channels (1-4) */\n               /*  png_byte pixel_depth;    bits per pixel (depth*channels) */\n               png_ptr->row_buf + 1);    /* start of pixel data for row */\n#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED\n      if (png_ptr->user_transform_depth)\n         png_ptr->row_info.bit_depth = png_ptr->user_transform_depth;\n      if (png_ptr->user_transform_channels)\n         png_ptr->row_info.channels = png_ptr->user_transform_channels;\n#endif\n      png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth *\n         png_ptr->row_info.channels);\n      png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,\n         png_ptr->row_info.width);\n   }\n#endif\n\n}\n\n#ifdef PNG_READ_PACK_SUPPORTED\n/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel,\n * without changing the actual values.  Thus, if you had a row with\n * a bit depth of 1, you would end up with bytes that only contained\n * the numbers 0 or 1.  If you would rather they contain 0 and 255, use\n * png_do_shift() after this.\n */\nvoid /* PRIVATE */\npng_do_unpack(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_unpack\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL && row_info->bit_depth < 8)\n#else\n   if (row_info->bit_depth < 8)\n#endif\n   {\n      png_uint_32 i;\n      png_uint_32 row_width=row_info->width;\n\n      switch (row_info->bit_depth)\n      {\n         case 1:\n         {\n            png_bytep sp = row + (png_size_t)((row_width - 1) >> 3);\n            png_bytep dp = row + (png_size_t)row_width - 1;\n            png_uint_32 shift = 7 - (int)((row_width + 7) & 0x07);\n            for (i = 0; i < row_width; i++)\n            {\n               *dp = (png_byte)((*sp >> shift) & 0x01);\n               if (shift == 7)\n               {\n                  shift = 0;\n                  sp--;\n               }\n               else\n                  shift++;\n\n               dp--;\n            }\n            break;\n         }\n\n         case 2:\n         {\n\n            png_bytep sp = row + (png_size_t)((row_width - 1) >> 2);\n            png_bytep dp = row + (png_size_t)row_width - 1;\n            png_uint_32 shift = (int)((3 - ((row_width + 3) & 0x03)) << 1);\n            for (i = 0; i < row_width; i++)\n            {\n               *dp = (png_byte)((*sp >> shift) & 0x03);\n               if (shift == 6)\n               {\n                  shift = 0;\n                  sp--;\n               }\n               else\n                  shift += 2;\n\n               dp--;\n            }\n            break;\n         }\n\n         case 4:\n         {\n            png_bytep sp = row + (png_size_t)((row_width - 1) >> 1);\n            png_bytep dp = row + (png_size_t)row_width - 1;\n            png_uint_32 shift = (int)((1 - ((row_width + 1) & 0x01)) << 2);\n            for (i = 0; i < row_width; i++)\n            {\n               *dp = (png_byte)((*sp >> shift) & 0x0f);\n               if (shift == 4)\n               {\n                  shift = 0;\n                  sp--;\n               }\n               else\n                  shift = 4;\n\n               dp--;\n            }\n            break;\n         }\n      }\n      row_info->bit_depth = 8;\n      row_info->pixel_depth = (png_byte)(8 * row_info->channels);\n      row_info->rowbytes = row_width * row_info->channels;\n   }\n}\n#endif\n\n#ifdef PNG_READ_SHIFT_SUPPORTED\n/* Reverse the effects of png_do_shift.  This routine merely shifts the\n * pixels back to their significant bits values.  Thus, if you have\n * a row of bit depth 8, but only 5 are significant, this will shift\n * the values back to 0 through 31.\n */\nvoid /* PRIVATE */\npng_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)\n{\n   png_debug(1, \"in png_do_unshift\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL && sig_bits != NULL &&\n#endif\n       row_info->color_type != PNG_COLOR_TYPE_PALETTE)\n   {\n      int shift[4];\n      int channels = 0;\n      int c;\n      png_uint_16 value = 0;\n      png_uint_32 row_width = row_info->width;\n\n      if (row_info->color_type & PNG_COLOR_MASK_COLOR)\n      {\n         shift[channels++] = row_info->bit_depth - sig_bits->red;\n         shift[channels++] = row_info->bit_depth - sig_bits->green;\n         shift[channels++] = row_info->bit_depth - sig_bits->blue;\n      }\n      else\n      {\n         shift[channels++] = row_info->bit_depth - sig_bits->gray;\n      }\n      if (row_info->color_type & PNG_COLOR_MASK_ALPHA)\n      {\n         shift[channels++] = row_info->bit_depth - sig_bits->alpha;\n      }\n\n      for (c = 0; c < channels; c++)\n      {\n         if (shift[c] <= 0)\n            shift[c] = 0;\n         else\n            value = 1;\n      }\n\n      if (!value)\n         return;\n\n      switch (row_info->bit_depth)\n      {\n         case 2:\n         {\n            png_bytep bp;\n            png_uint_32 i;\n            png_uint_32 istop = row_info->rowbytes;\n\n            for (bp = row, i = 0; i < istop; i++)\n            {\n               *bp >>= 1;\n               *bp++ &= 0x55;\n            }\n            break;\n         }\n\n         case 4:\n         {\n            png_bytep bp = row;\n            png_uint_32 i;\n            png_uint_32 istop = row_info->rowbytes;\n            png_byte mask = (png_byte)((((int)0xf0 >> shift[0]) & (int)0xf0) |\n               (png_byte)((int)0xf >> shift[0]));\n\n            for (i = 0; i < istop; i++)\n            {\n               *bp >>= shift[0];\n               *bp++ &= mask;\n            }\n            break;\n         }\n\n         case 8:\n         {\n            png_bytep bp = row;\n            png_uint_32 i;\n            png_uint_32 istop = row_width * channels;\n\n            for (i = 0; i < istop; i++)\n            {\n               *bp++ >>= shift[i%channels];\n            }\n            break;\n         }\n\n         case 16:\n         {\n            png_bytep bp = row;\n            png_uint_32 i;\n            png_uint_32 istop = channels * row_width;\n\n            for (i = 0; i < istop; i++)\n            {\n               value = (png_uint_16)((*bp << 8) + *(bp + 1));\n               value >>= shift[i%channels];\n               *bp++ = (png_byte)(value >> 8);\n               *bp++ = (png_byte)(value & 0xff);\n            }\n            break;\n         }\n      }\n   }\n}\n#endif\n\n#ifdef PNG_READ_16_TO_8_SUPPORTED\n/* Chop rows of bit depth 16 down to 8 */\nvoid /* PRIVATE */\npng_do_chop(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_chop\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL && row_info->bit_depth == 16)\n#else\n   if (row_info->bit_depth == 16)\n#endif\n   {\n      png_bytep sp = row;\n      png_bytep dp = row;\n      png_uint_32 i;\n      png_uint_32 istop = row_info->width * row_info->channels;\n\n      for (i = 0; i<istop; i++, sp += 2, dp++)\n      {\n#ifdef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED\n      /* This does a more accurate scaling of the 16-bit color\n       * value, rather than a simple low-byte truncation.\n       *\n       * What the ideal calculation should be:\n       *   *dp = (((((png_uint_32)(*sp) << 8) |\n       *          (png_uint_32)(*(sp + 1))) * 255 + 127)\n       *          / (png_uint_32)65535L;\n       *\n       * GRR: no, I think this is what it really should be:\n       *   *dp = (((((png_uint_32)(*sp) << 8) |\n       *           (png_uint_32)(*(sp + 1))) + 128L)\n       *           / (png_uint_32)257L;\n       *\n       * GRR: here's the exact calculation with shifts:\n       *   temp = (((png_uint_32)(*sp) << 8) |\n       *           (png_uint_32)(*(sp + 1))) + 128L;\n       *   *dp = (temp - (temp >> 8)) >> 8;\n       *\n       * Approximate calculation with shift/add instead of multiply/divide:\n       *   *dp = ((((png_uint_32)(*sp) << 8) |\n       *          (png_uint_32)((int)(*(sp + 1)) - *sp)) + 128) >> 8;\n       *\n       * What we actually do to avoid extra shifting and conversion:\n       */\n\n         *dp = *sp + ((((int)(*(sp + 1)) - *sp) > 128) ? 1 : 0);\n#else\n       /* Simply discard the low order byte */\n         *dp = *sp;\n#endif\n      }\n      row_info->bit_depth = 8;\n      row_info->pixel_depth = (png_byte)(8 * row_info->channels);\n      row_info->rowbytes = row_info->width * row_info->channels;\n   }\n}\n#endif\n\n#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED\nvoid /* PRIVATE */\npng_do_read_swap_alpha(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_read_swap_alpha\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL)\n#endif\n   {\n      png_uint_32 row_width = row_info->width;\n      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n      {\n         /* This converts from RGBA to ARGB */\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp = row + row_info->rowbytes;\n            png_bytep dp = sp;\n            png_byte save;\n            png_uint_32 i;\n\n            for (i = 0; i < row_width; i++)\n            {\n               save = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = save;\n            }\n         }\n         /* This converts from RRGGBBAA to AARRGGBB */\n         else\n         {\n            png_bytep sp = row + row_info->rowbytes;\n            png_bytep dp = sp;\n            png_byte save[2];\n            png_uint_32 i;\n\n            for (i = 0; i < row_width; i++)\n            {\n               save[0] = *(--sp);\n               save[1] = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = save[0];\n               *(--dp) = save[1];\n            }\n         }\n      }\n      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)\n      {\n         /* This converts from GA to AG */\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp = row + row_info->rowbytes;\n            png_bytep dp = sp;\n            png_byte save;\n            png_uint_32 i;\n\n            for (i = 0; i < row_width; i++)\n            {\n               save = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = save;\n            }\n         }\n         /* This converts from GGAA to AAGG */\n         else\n         {\n            png_bytep sp = row + row_info->rowbytes;\n            png_bytep dp = sp;\n            png_byte save[2];\n            png_uint_32 i;\n\n            for (i = 0; i < row_width; i++)\n            {\n               save[0] = *(--sp);\n               save[1] = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = save[0];\n               *(--dp) = save[1];\n            }\n         }\n      }\n   }\n}\n#endif\n\n#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED\nvoid /* PRIVATE */\npng_do_read_invert_alpha(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_read_invert_alpha\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL)\n#endif\n   {\n      png_uint_32 row_width = row_info->width;\n      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n      {\n         /* This inverts the alpha channel in RGBA */\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp = row + row_info->rowbytes;\n            png_bytep dp = sp;\n            png_uint_32 i;\n\n            for (i = 0; i < row_width; i++)\n            {\n               *(--dp) = (png_byte)(255 - *(--sp));\n\n/*             This does nothing:\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               We can replace it with:\n*/\n               sp-=3;\n               dp=sp;\n            }\n         }\n         /* This inverts the alpha channel in RRGGBBAA */\n         else\n         {\n            png_bytep sp = row + row_info->rowbytes;\n            png_bytep dp = sp;\n            png_uint_32 i;\n\n            for (i = 0; i < row_width; i++)\n            {\n               *(--dp) = (png_byte)(255 - *(--sp));\n               *(--dp) = (png_byte)(255 - *(--sp));\n\n/*             This does nothing:\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               We can replace it with:\n*/\n               sp-=6;\n               dp=sp;\n            }\n         }\n      }\n      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)\n      {\n         /* This inverts the alpha channel in GA */\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp = row + row_info->rowbytes;\n            png_bytep dp = sp;\n            png_uint_32 i;\n\n            for (i = 0; i < row_width; i++)\n            {\n               *(--dp) = (png_byte)(255 - *(--sp));\n               *(--dp) = *(--sp);\n            }\n         }\n         /* This inverts the alpha channel in GGAA */\n         else\n         {\n            png_bytep sp  = row + row_info->rowbytes;\n            png_bytep dp = sp;\n            png_uint_32 i;\n\n            for (i = 0; i < row_width; i++)\n            {\n               *(--dp) = (png_byte)(255 - *(--sp));\n               *(--dp) = (png_byte)(255 - *(--sp));\n/*\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n*/\n               sp-=2;\n               dp=sp;\n            }\n         }\n      }\n   }\n}\n#endif\n\n#ifdef PNG_READ_FILLER_SUPPORTED\n/* Add filler channel if we have RGB color */\nvoid /* PRIVATE */\npng_do_read_filler(png_row_infop row_info, png_bytep row,\n   png_uint_32 filler, png_uint_32 flags)\n{\n   png_uint_32 i;\n   png_uint_32 row_width = row_info->width;\n\n   png_byte hi_filler = (png_byte)((filler>>8) & 0xff);\n   png_byte lo_filler = (png_byte)(filler & 0xff);\n\n   png_debug(1, \"in png_do_read_filler\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL  && row_info != NULL &&\n#endif\n       row_info->color_type == PNG_COLOR_TYPE_GRAY)\n   {\n      if (row_info->bit_depth == 8)\n      {\n         /* This changes the data from G to GX */\n         if (flags & PNG_FLAG_FILLER_AFTER)\n         {\n            png_bytep sp = row + (png_size_t)row_width;\n            png_bytep dp =  sp + (png_size_t)row_width;\n            for (i = 1; i < row_width; i++)\n            {\n               *(--dp) = lo_filler;\n               *(--dp) = *(--sp);\n            }\n            *(--dp) = lo_filler;\n            row_info->channels = 2;\n            row_info->pixel_depth = 16;\n            row_info->rowbytes = row_width * 2;\n         }\n      /* This changes the data from G to XG */\n         else\n         {\n            png_bytep sp = row + (png_size_t)row_width;\n            png_bytep dp = sp  + (png_size_t)row_width;\n            for (i = 0; i < row_width; i++)\n            {\n               *(--dp) = *(--sp);\n               *(--dp) = lo_filler;\n            }\n            row_info->channels = 2;\n            row_info->pixel_depth = 16;\n            row_info->rowbytes = row_width * 2;\n         }\n      }\n      else if (row_info->bit_depth == 16)\n      {\n         /* This changes the data from GG to GGXX */\n         if (flags & PNG_FLAG_FILLER_AFTER)\n         {\n            png_bytep sp = row + (png_size_t)row_width * 2;\n            png_bytep dp = sp  + (png_size_t)row_width * 2;\n            for (i = 1; i < row_width; i++)\n            {\n               *(--dp) = hi_filler;\n               *(--dp) = lo_filler;\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n            }\n            *(--dp) = hi_filler;\n            *(--dp) = lo_filler;\n            row_info->channels = 2;\n            row_info->pixel_depth = 32;\n            row_info->rowbytes = row_width * 4;\n         }\n         /* This changes the data from GG to XXGG */\n         else\n         {\n            png_bytep sp = row + (png_size_t)row_width * 2;\n            png_bytep dp = sp  + (png_size_t)row_width * 2;\n            for (i = 0; i < row_width; i++)\n            {\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = hi_filler;\n               *(--dp) = lo_filler;\n            }\n            row_info->channels = 2;\n            row_info->pixel_depth = 32;\n            row_info->rowbytes = row_width * 4;\n         }\n      }\n   } /* COLOR_TYPE == GRAY */\n   else if (row_info->color_type == PNG_COLOR_TYPE_RGB)\n   {\n      if (row_info->bit_depth == 8)\n      {\n         /* This changes the data from RGB to RGBX */\n         if (flags & PNG_FLAG_FILLER_AFTER)\n         {\n            png_bytep sp = row + (png_size_t)row_width * 3;\n            png_bytep dp = sp  + (png_size_t)row_width;\n            for (i = 1; i < row_width; i++)\n            {\n               *(--dp) = lo_filler;\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n            }\n            *(--dp) = lo_filler;\n            row_info->channels = 4;\n            row_info->pixel_depth = 32;\n            row_info->rowbytes = row_width * 4;\n         }\n      /* This changes the data from RGB to XRGB */\n         else\n         {\n            png_bytep sp = row + (png_size_t)row_width * 3;\n            png_bytep dp = sp + (png_size_t)row_width;\n            for (i = 0; i < row_width; i++)\n            {\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = lo_filler;\n            }\n            row_info->channels = 4;\n            row_info->pixel_depth = 32;\n            row_info->rowbytes = row_width * 4;\n         }\n      }\n      else if (row_info->bit_depth == 16)\n      {\n         /* This changes the data from RRGGBB to RRGGBBXX */\n         if (flags & PNG_FLAG_FILLER_AFTER)\n         {\n            png_bytep sp = row + (png_size_t)row_width * 6;\n            png_bytep dp = sp  + (png_size_t)row_width * 2;\n            for (i = 1; i < row_width; i++)\n            {\n               *(--dp) = hi_filler;\n               *(--dp) = lo_filler;\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n            }\n            *(--dp) = hi_filler;\n            *(--dp) = lo_filler;\n            row_info->channels = 4;\n            row_info->pixel_depth = 64;\n            row_info->rowbytes = row_width * 8;\n         }\n         /* This changes the data from RRGGBB to XXRRGGBB */\n         else\n         {\n            png_bytep sp = row + (png_size_t)row_width * 6;\n            png_bytep dp = sp  + (png_size_t)row_width * 2;\n            for (i = 0; i < row_width; i++)\n            {\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = *(--sp);\n               *(--dp) = hi_filler;\n               *(--dp) = lo_filler;\n            }\n            row_info->channels = 4;\n            row_info->pixel_depth = 64;\n            row_info->rowbytes = row_width * 8;\n         }\n      }\n   } /* COLOR_TYPE == RGB */\n}\n#endif\n\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\n/* Expand grayscale files to RGB, with or without alpha */\nvoid /* PRIVATE */\npng_do_gray_to_rgb(png_row_infop row_info, png_bytep row)\n{\n   png_uint_32 i;\n   png_uint_32 row_width = row_info->width;\n\n   png_debug(1, \"in png_do_gray_to_rgb\");\n\n   if (row_info->bit_depth >= 8 &&\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n      !(row_info->color_type & PNG_COLOR_MASK_COLOR))\n   {\n      if (row_info->color_type == PNG_COLOR_TYPE_GRAY)\n      {\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp = row + (png_size_t)row_width - 1;\n            png_bytep dp = sp  + (png_size_t)row_width * 2;\n            for (i = 0; i < row_width; i++)\n            {\n               *(dp--) = *sp;\n               *(dp--) = *sp;\n               *(dp--) = *(sp--);\n            }\n         }\n         else\n         {\n            png_bytep sp = row + (png_size_t)row_width * 2 - 1;\n            png_bytep dp = sp  + (png_size_t)row_width * 4;\n            for (i = 0; i < row_width; i++)\n            {\n               *(dp--) = *sp;\n               *(dp--) = *(sp - 1);\n               *(dp--) = *sp;\n               *(dp--) = *(sp - 1);\n               *(dp--) = *(sp--);\n               *(dp--) = *(sp--);\n            }\n         }\n      }\n      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)\n      {\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp = row + (png_size_t)row_width * 2 - 1;\n            png_bytep dp = sp  + (png_size_t)row_width * 2;\n            for (i = 0; i < row_width; i++)\n            {\n               *(dp--) = *(sp--);\n               *(dp--) = *sp;\n               *(dp--) = *sp;\n               *(dp--) = *(sp--);\n            }\n         }\n         else\n         {\n            png_bytep sp = row + (png_size_t)row_width * 4 - 1;\n            png_bytep dp = sp  + (png_size_t)row_width * 4;\n            for (i = 0; i < row_width; i++)\n            {\n               *(dp--) = *(sp--);\n               *(dp--) = *(sp--);\n               *(dp--) = *sp;\n               *(dp--) = *(sp - 1);\n               *(dp--) = *sp;\n               *(dp--) = *(sp - 1);\n               *(dp--) = *(sp--);\n               *(dp--) = *(sp--);\n            }\n         }\n      }\n      row_info->channels += (png_byte)2;\n      row_info->color_type |= PNG_COLOR_MASK_COLOR;\n      row_info->pixel_depth = (png_byte)(row_info->channels *\n         row_info->bit_depth);\n      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);\n   }\n}\n#endif\n\n#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\n/* Reduce RGB files to grayscale, with or without alpha\n * using the equation given in Poynton's ColorFAQ at\n * <http://www.inforamp.net/~poynton/>  (THIS LINK IS DEAD June 2008)\n * New link:\n * <http://www.poynton.com/notes/colour_and_gamma/>\n * Charles Poynton poynton at poynton.com\n *\n *     Y = 0.212671 * R + 0.715160 * G + 0.072169 * B\n *\n *  We approximate this with\n *\n *     Y = 0.21268 * R    + 0.7151 * G    + 0.07217 * B\n *\n *  which can be expressed with integers as\n *\n *     Y = (6969 * R + 23434 * G + 2365 * B)/32768\n *\n *  The calculation is to be done in a linear colorspace.\n *\n *  Other integer coefficents can be used via png_set_rgb_to_gray().\n */\nint /* PRIVATE */\npng_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)\n\n{\n   png_uint_32 i;\n\n   png_uint_32 row_width = row_info->width;\n   int rgb_error = 0;\n\n   png_debug(1, \"in png_do_rgb_to_gray\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n      (row_info->color_type & PNG_COLOR_MASK_COLOR))\n   {\n      png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff;\n      png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff;\n      png_uint_32 bc = png_ptr->rgb_to_gray_blue_coeff;\n\n      if (row_info->color_type == PNG_COLOR_TYPE_RGB)\n      {\n         if (row_info->bit_depth == 8)\n         {\n#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n            if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL)\n            {\n               png_bytep sp = row;\n               png_bytep dp = row;\n\n               for (i = 0; i < row_width; i++)\n               {\n                  png_byte red   = png_ptr->gamma_to_1[*(sp++)];\n                  png_byte green = png_ptr->gamma_to_1[*(sp++)];\n                  png_byte blue  = png_ptr->gamma_to_1[*(sp++)];\n                  if (red != green || red != blue)\n                  {\n                     rgb_error |= 1;\n                     *(dp++) = png_ptr->gamma_from_1[\n                       (rc*red + gc*green + bc*blue)>>15];\n                  }\n                  else\n                     *(dp++) = *(sp - 1);\n               }\n            }\n            else\n#endif\n            {\n               png_bytep sp = row;\n               png_bytep dp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_byte red   = *(sp++);\n                  png_byte green = *(sp++);\n                  png_byte blue  = *(sp++);\n                  if (red != green || red != blue)\n                  {\n                     rgb_error |= 1;\n                     *(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15);\n                  }\n                  else\n                     *(dp++) = *(sp - 1);\n               }\n            }\n         }\n\n         else /* RGB bit_depth == 16 */\n         {\n#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n            if (png_ptr->gamma_16_to_1 != NULL &&\n                png_ptr->gamma_16_from_1 != NULL)\n            {\n               png_bytep sp = row;\n               png_bytep dp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_uint_16 red, green, blue, w;\n\n                  red   = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;\n                  green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;\n                  blue  = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;\n\n                  if (red == green && red == blue)\n                     w = red;\n                  else\n                  {\n                     png_uint_16 red_1   = png_ptr->gamma_16_to_1[(red&0xff) >>\n                                  png_ptr->gamma_shift][red>>8];\n                     png_uint_16 green_1 =\n                         png_ptr->gamma_16_to_1[(green&0xff) >>\n                                  png_ptr->gamma_shift][green>>8];\n                     png_uint_16 blue_1  = png_ptr->gamma_16_to_1[(blue&0xff) >>\n                                  png_ptr->gamma_shift][blue>>8];\n                     png_uint_16 gray16  = (png_uint_16)((rc*red_1 + gc*green_1\n                                  + bc*blue_1)>>15);\n                     w = png_ptr->gamma_16_from_1[(gray16&0xff) >>\n                         png_ptr->gamma_shift][gray16 >> 8];\n                     rgb_error |= 1;\n                  }\n\n                  *(dp++) = (png_byte)((w>>8) & 0xff);\n                  *(dp++) = (png_byte)(w & 0xff);\n               }\n            }\n            else\n#endif\n            {\n               png_bytep sp = row;\n               png_bytep dp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_uint_16 red, green, blue, gray16;\n\n                  red   = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;\n                  green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;\n                  blue  = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;\n\n                  if (red != green || red != blue)\n                     rgb_error |= 1;\n                  gray16  = (png_uint_16)((rc*red + gc*green + bc*blue)>>15);\n                  *(dp++) = (png_byte)((gray16>>8) & 0xff);\n                  *(dp++) = (png_byte)(gray16 & 0xff);\n               }\n            }\n         }\n      }\n      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n      {\n         if (row_info->bit_depth == 8)\n         {\n#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n            if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL)\n            {\n               png_bytep sp = row;\n               png_bytep dp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_byte red   = png_ptr->gamma_to_1[*(sp++)];\n                  png_byte green = png_ptr->gamma_to_1[*(sp++)];\n                  png_byte blue  = png_ptr->gamma_to_1[*(sp++)];\n                  if (red != green || red != blue)\n                     rgb_error |= 1;\n                  *(dp++) =  png_ptr->gamma_from_1\n                             [(rc*red + gc*green + bc*blue)>>15];\n                  *(dp++) = *(sp++);  /* alpha */\n               }\n            }\n            else\n#endif\n            {\n               png_bytep sp = row;\n               png_bytep dp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_byte red   = *(sp++);\n                  png_byte green = *(sp++);\n                  png_byte blue  = *(sp++);\n                  if (red != green || red != blue)\n                     rgb_error |= 1;\n                  *(dp++) =  (png_byte)((rc*red + gc*green + bc*blue)>>15);\n                  *(dp++) = *(sp++);  /* alpha */\n               }\n            }\n         }\n         else /* RGBA bit_depth == 16 */\n         {\n#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\n            if (png_ptr->gamma_16_to_1 != NULL &&\n                png_ptr->gamma_16_from_1 != NULL)\n            {\n               png_bytep sp = row;\n               png_bytep dp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_uint_16 red, green, blue, w;\n\n                  red   = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;\n                  green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;\n                  blue  = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;\n\n                  if (red == green && red == blue)\n                     w = red;\n                  else\n                  {\n                     png_uint_16 red_1   = png_ptr->gamma_16_to_1[(red&0xff) >>\n                         png_ptr->gamma_shift][red>>8];\n                     png_uint_16 green_1 =\n                         png_ptr->gamma_16_to_1[(green&0xff) >>\n                         png_ptr->gamma_shift][green>>8];\n                     png_uint_16 blue_1  = png_ptr->gamma_16_to_1[(blue&0xff) >>\n                         png_ptr->gamma_shift][blue>>8];\n                     png_uint_16 gray16  = (png_uint_16)((rc * red_1\n                         + gc * green_1 + bc * blue_1)>>15);\n                     w = png_ptr->gamma_16_from_1[(gray16&0xff) >>\n                         png_ptr->gamma_shift][gray16 >> 8];\n                     rgb_error |= 1;\n                  }\n\n                  *(dp++) = (png_byte)((w>>8) & 0xff);\n                  *(dp++) = (png_byte)(w & 0xff);\n                  *(dp++) = *(sp++);  /* alpha */\n                  *(dp++) = *(sp++);\n               }\n            }\n            else\n#endif\n            {\n               png_bytep sp = row;\n               png_bytep dp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_uint_16 red, green, blue, gray16;\n                  red   = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;\n                  green = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;\n                  blue  = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;\n                  if (red != green || red != blue)\n                     rgb_error |= 1;\n                  gray16  = (png_uint_16)((rc*red + gc*green + bc*blue)>>15);\n                  *(dp++) = (png_byte)((gray16>>8) & 0xff);\n                  *(dp++) = (png_byte)(gray16 & 0xff);\n                  *(dp++) = *(sp++);  /* alpha */\n                  *(dp++) = *(sp++);\n               }\n            }\n         }\n      }\n   row_info->channels -= (png_byte)2;\n      row_info->color_type &= ~PNG_COLOR_MASK_COLOR;\n      row_info->pixel_depth = (png_byte)(row_info->channels *\n         row_info->bit_depth);\n      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);\n   }\n   return rgb_error;\n}\n#endif\n\n/* Build a grayscale palette.  Palette is assumed to be 1 << bit_depth\n * large of png_color.  This lets grayscale images be treated as\n * paletted.  Most useful for gamma correction and simplification\n * of code.\n */\nvoid PNGAPI\npng_build_grayscale_palette(int bit_depth, png_colorp palette)\n{\n   int num_palette;\n   int color_inc;\n   int i;\n   int v;\n\n   png_debug(1, \"in png_do_build_grayscale_palette\");\n\n   if (palette == NULL)\n      return;\n\n   switch (bit_depth)\n   {\n      case 1:\n         num_palette = 2;\n         color_inc = 0xff;\n         break;\n\n      case 2:\n         num_palette = 4;\n         color_inc = 0x55;\n         break;\n\n      case 4:\n         num_palette = 16;\n         color_inc = 0x11;\n         break;\n\n      case 8:\n         num_palette = 256;\n         color_inc = 1;\n         break;\n\n      default:\n         num_palette = 0;\n         color_inc = 0;\n         break;\n   }\n\n   for (i = 0, v = 0; i < num_palette; i++, v += color_inc)\n   {\n      palette[i].red = (png_byte)v;\n      palette[i].green = (png_byte)v;\n      palette[i].blue = (png_byte)v;\n   }\n}\n\n/* This function is currently unused.  Do we really need it? */\n#if defined(PNG_READ_DITHER_SUPPORTED) && \\\n  defined(PNG_CORRECT_PALETTE_SUPPORTED)\nvoid /* PRIVATE */\npng_correct_palette(png_structp png_ptr, png_colorp palette,\n   int num_palette)\n{\n   png_debug(1, \"in png_correct_palette\");\n\n#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \\\n    defined(PNG_READ_GAMMA_SUPPORTED) && \\\n  defined(PNG_FLOATING_POINT_SUPPORTED)\n   if (png_ptr->transformations & (PNG_GAMMA | PNG_BACKGROUND))\n   {\n      png_color back, back_1;\n\n      if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE)\n      {\n         back.red = png_ptr->gamma_table[png_ptr->background.red];\n         back.green = png_ptr->gamma_table[png_ptr->background.green];\n         back.blue = png_ptr->gamma_table[png_ptr->background.blue];\n\n         back_1.red = png_ptr->gamma_to_1[png_ptr->background.red];\n         back_1.green = png_ptr->gamma_to_1[png_ptr->background.green];\n         back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue];\n      }\n      else\n      {\n         double g;\n\n         g = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma);\n\n         if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_SCREEN\n             || fabs(g - 1.0) < PNG_GAMMA_THRESHOLD)\n         {\n            back.red = png_ptr->background.red;\n            back.green = png_ptr->background.green;\n            back.blue = png_ptr->background.blue;\n         }\n         else\n         {\n            back.red =\n               (png_byte)(pow((double)png_ptr->background.red/255, g) *\n                255.0 + 0.5);\n            back.green =\n               (png_byte)(pow((double)png_ptr->background.green/255, g) *\n                255.0 + 0.5);\n            back.blue =\n               (png_byte)(pow((double)png_ptr->background.blue/255, g) *\n                255.0 + 0.5);\n         }\n\n         g = 1.0 / png_ptr->background_gamma;\n\n         back_1.red =\n            (png_byte)(pow((double)png_ptr->background.red/255, g) *\n             255.0 + 0.5);\n         back_1.green =\n            (png_byte)(pow((double)png_ptr->background.green/255, g) *\n             255.0 + 0.5);\n         back_1.blue =\n            (png_byte)(pow((double)png_ptr->background.blue/255, g) *\n             255.0 + 0.5);\n      }\n\n      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      {\n         png_uint_32 i;\n\n         for (i = 0; i < (png_uint_32)num_palette; i++)\n         {\n            if (i < png_ptr->num_trans && png_ptr->trans[i] == 0)\n            {\n               palette[i] = back;\n            }\n            else if (i < png_ptr->num_trans && png_ptr->trans[i] != 0xff)\n            {\n               png_byte v, w;\n\n               v = png_ptr->gamma_to_1[png_ptr->palette[i].red];\n               png_composite(w, v, png_ptr->trans[i], back_1.red);\n               palette[i].red = png_ptr->gamma_from_1[w];\n\n               v = png_ptr->gamma_to_1[png_ptr->palette[i].green];\n               png_composite(w, v, png_ptr->trans[i], back_1.green);\n               palette[i].green = png_ptr->gamma_from_1[w];\n\n               v = png_ptr->gamma_to_1[png_ptr->palette[i].blue];\n               png_composite(w, v, png_ptr->trans[i], back_1.blue);\n               palette[i].blue = png_ptr->gamma_from_1[w];\n            }\n            else\n            {\n               palette[i].red = png_ptr->gamma_table[palette[i].red];\n               palette[i].green = png_ptr->gamma_table[palette[i].green];\n               palette[i].blue = png_ptr->gamma_table[palette[i].blue];\n            }\n         }\n      }\n      else\n      {\n         int i;\n\n         for (i = 0; i < num_palette; i++)\n         {\n            if (palette[i].red == (png_byte)png_ptr->trans_values.gray)\n            {\n               palette[i] = back;\n            }\n            else\n            {\n               palette[i].red = png_ptr->gamma_table[palette[i].red];\n               palette[i].green = png_ptr->gamma_table[palette[i].green];\n               palette[i].blue = png_ptr->gamma_table[palette[i].blue];\n            }\n         }\n      }\n   }\n   else\n#endif\n#ifdef PNG_READ_GAMMA_SUPPORTED\n   if (png_ptr->transformations & PNG_GAMMA)\n   {\n      int i;\n\n      for (i = 0; i < num_palette; i++)\n      {\n         palette[i].red = png_ptr->gamma_table[palette[i].red];\n         palette[i].green = png_ptr->gamma_table[palette[i].green];\n         palette[i].blue = png_ptr->gamma_table[palette[i].blue];\n      }\n   }\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n   else\n#endif\n#endif\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n   if (png_ptr->transformations & PNG_BACKGROUND)\n   {\n      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      {\n         png_color back;\n\n         back.red   = (png_byte)png_ptr->background.red;\n         back.green = (png_byte)png_ptr->background.green;\n         back.blue  = (png_byte)png_ptr->background.blue;\n\n         for (i = 0; i < (int)png_ptr->num_trans; i++)\n         {\n            if (png_ptr->trans[i] == 0)\n            {\n               palette[i].red = back.red;\n               palette[i].green = back.green;\n               palette[i].blue = back.blue;\n            }\n            else if (png_ptr->trans[i] != 0xff)\n            {\n               png_composite(palette[i].red, png_ptr->palette[i].red,\n                  png_ptr->trans[i], back.red);\n               png_composite(palette[i].green, png_ptr->palette[i].green,\n                  png_ptr->trans[i], back.green);\n               png_composite(palette[i].blue, png_ptr->palette[i].blue,\n                  png_ptr->trans[i], back.blue);\n            }\n         }\n      }\n      else /* Assume grayscale palette (what else could it be?) */\n      {\n         int i;\n\n         for (i = 0; i < num_palette; i++)\n         {\n            if (i == (png_byte)png_ptr->trans_values.gray)\n            {\n               palette[i].red = (png_byte)png_ptr->background.red;\n               palette[i].green = (png_byte)png_ptr->background.green;\n               palette[i].blue = (png_byte)png_ptr->background.blue;\n            }\n         }\n      }\n   }\n#endif\n}\n#endif\n\n#ifdef PNG_READ_BACKGROUND_SUPPORTED\n/* Replace any alpha or transparency with the supplied background color.\n * \"background\" is already in the screen gamma, while \"background_1\" is\n * at a gamma of 1.0.  Paletted files have already been taken care of.\n */\nvoid /* PRIVATE */\npng_do_background(png_row_infop row_info, png_bytep row,\n   png_color_16p trans_values, png_color_16p background\n#ifdef PNG_READ_GAMMA_SUPPORTED\n   , png_color_16p background_1,\n   png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,\n   png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,\n   png_uint_16pp gamma_16_to_1, int gamma_shift\n#endif\n   )\n{\n   png_bytep sp, dp;\n   png_uint_32 i;\n   png_uint_32 row_width=row_info->width;\n   int shift;\n\n   png_debug(1, \"in png_do_background\");\n\n   if (background != NULL &&\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n      (!(row_info->color_type & PNG_COLOR_MASK_ALPHA) ||\n      (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_values)))\n   {\n      switch (row_info->color_type)\n      {\n         case PNG_COLOR_TYPE_GRAY:\n         {\n            switch (row_info->bit_depth)\n            {\n               case 1:\n               {\n                  sp = row;\n                  shift = 7;\n                  for (i = 0; i < row_width; i++)\n                  {\n                     if ((png_uint_16)((*sp >> shift) & 0x01)\n                        == trans_values->gray)\n                     {\n                        *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);\n                        *sp |= (png_byte)(background->gray << shift);\n                     }\n                     if (!shift)\n                     {\n                        shift = 7;\n                        sp++;\n                     }\n                     else\n                        shift--;\n                  }\n                  break;\n               }\n\n               case 2:\n               {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n                  if (gamma_table != NULL)\n                  {\n                     sp = row;\n                     shift = 6;\n                     for (i = 0; i < row_width; i++)\n                     {\n                        if ((png_uint_16)((*sp >> shift) & 0x03)\n                            == trans_values->gray)\n                        {\n                           *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);\n                           *sp |= (png_byte)(background->gray << shift);\n                        }\n                        else\n                        {\n                           png_byte p = (png_byte)((*sp >> shift) & 0x03);\n                           png_byte g = (png_byte)((gamma_table [p | (p << 2) |\n                               (p << 4) | (p << 6)] >> 6) & 0x03);\n                           *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);\n                           *sp |= (png_byte)(g << shift);\n                        }\n                        if (!shift)\n                        {\n                           shift = 6;\n                           sp++;\n                        }\n                        else\n                           shift -= 2;\n                     }\n                  }\n                  else\n#endif\n                  {\n                     sp = row;\n                     shift = 6;\n                     for (i = 0; i < row_width; i++)\n                     {\n                        if ((png_uint_16)((*sp >> shift) & 0x03)\n                            == trans_values->gray)\n                        {\n                           *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);\n                           *sp |= (png_byte)(background->gray << shift);\n                        }\n                        if (!shift)\n                        {\n                           shift = 6;\n                           sp++;\n                        }\n                        else\n                           shift -= 2;\n                     }\n                  }\n                  break;\n               }\n\n               case 4:\n               {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n                  if (gamma_table != NULL)\n                  {\n                     sp = row;\n                     shift = 4;\n                     for (i = 0; i < row_width; i++)\n                     {\n                        if ((png_uint_16)((*sp >> shift) & 0x0f)\n                            == trans_values->gray)\n                        {\n                           *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);\n                           *sp |= (png_byte)(background->gray << shift);\n                        }\n                        else\n                        {\n                           png_byte p = (png_byte)((*sp >> shift) & 0x0f);\n                           png_byte g = (png_byte)((gamma_table[p |\n                             (p << 4)] >> 4) & 0x0f);\n                           *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);\n                           *sp |= (png_byte)(g << shift);\n                        }\n                        if (!shift)\n                        {\n                           shift = 4;\n                           sp++;\n                        }\n                        else\n                           shift -= 4;\n                     }\n                  }\n                  else\n#endif\n                  {\n                     sp = row;\n                     shift = 4;\n                     for (i = 0; i < row_width; i++)\n                     {\n                        if ((png_uint_16)((*sp >> shift) & 0x0f)\n                            == trans_values->gray)\n                        {\n                           *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);\n                           *sp |= (png_byte)(background->gray << shift);\n                        }\n                        if (!shift)\n                        {\n                           shift = 4;\n                           sp++;\n                        }\n                        else\n                           shift -= 4;\n                     }\n                  }\n                  break;\n               }\n\n               case 8:\n               {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n                  if (gamma_table != NULL)\n                  {\n                     sp = row;\n                     for (i = 0; i < row_width; i++, sp++)\n                     {\n                        if (*sp == trans_values->gray)\n                        {\n                           *sp = (png_byte)background->gray;\n                        }\n                        else\n                        {\n                           *sp = gamma_table[*sp];\n                        }\n                     }\n                  }\n                  else\n#endif\n                  {\n                     sp = row;\n                     for (i = 0; i < row_width; i++, sp++)\n                     {\n                        if (*sp == trans_values->gray)\n                        {\n                           *sp = (png_byte)background->gray;\n                        }\n                     }\n                  }\n                  break;\n               }\n\n               case 16:\n               {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n                  if (gamma_16 != NULL)\n                  {\n                     sp = row;\n                     for (i = 0; i < row_width; i++, sp += 2)\n                     {\n                        png_uint_16 v;\n\n                        v = (png_uint_16)(((*sp) << 8) + *(sp + 1));\n                        if (v == trans_values->gray)\n                        {\n                           /* Background is already in screen gamma */\n                           *sp = (png_byte)((background->gray >> 8) & 0xff);\n                           *(sp + 1) = (png_byte)(background->gray & 0xff);\n                        }\n                        else\n                        {\n                           v = gamma_16[*(sp + 1) >> gamma_shift][*sp];\n                           *sp = (png_byte)((v >> 8) & 0xff);\n                           *(sp + 1) = (png_byte)(v & 0xff);\n                        }\n                     }\n                  }\n                  else\n#endif\n                  {\n                     sp = row;\n                     for (i = 0; i < row_width; i++, sp += 2)\n                     {\n                        png_uint_16 v;\n\n                        v = (png_uint_16)(((*sp) << 8) + *(sp + 1));\n                        if (v == trans_values->gray)\n                        {\n                           *sp = (png_byte)((background->gray >> 8) & 0xff);\n                           *(sp + 1) = (png_byte)(background->gray & 0xff);\n                        }\n                     }\n                  }\n                  break;\n               }\n            }\n            break;\n         }\n\n         case PNG_COLOR_TYPE_RGB:\n         {\n            if (row_info->bit_depth == 8)\n            {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n               if (gamma_table != NULL)\n               {\n                  sp = row;\n                  for (i = 0; i < row_width; i++, sp += 3)\n                  {\n                     if (*sp == trans_values->red &&\n                        *(sp + 1) == trans_values->green &&\n                        *(sp + 2) == trans_values->blue)\n                     {\n                        *sp = (png_byte)background->red;\n                        *(sp + 1) = (png_byte)background->green;\n                        *(sp + 2) = (png_byte)background->blue;\n                     }\n                     else\n                     {\n                        *sp = gamma_table[*sp];\n                        *(sp + 1) = gamma_table[*(sp + 1)];\n                        *(sp + 2) = gamma_table[*(sp + 2)];\n                     }\n                  }\n               }\n               else\n#endif\n               {\n                  sp = row;\n                  for (i = 0; i < row_width; i++, sp += 3)\n                  {\n                     if (*sp == trans_values->red &&\n                        *(sp + 1) == trans_values->green &&\n                        *(sp + 2) == trans_values->blue)\n                     {\n                        *sp = (png_byte)background->red;\n                        *(sp + 1) = (png_byte)background->green;\n                        *(sp + 2) = (png_byte)background->blue;\n                     }\n                  }\n               }\n            }\n            else /* if (row_info->bit_depth == 16) */\n            {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n               if (gamma_16 != NULL)\n               {\n                  sp = row;\n                  for (i = 0; i < row_width; i++, sp += 6)\n                  {\n                     png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));\n                     png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));\n                     png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));\n                     if (r == trans_values->red && g == trans_values->green &&\n                        b == trans_values->blue)\n                     {\n                        /* Background is already in screen gamma */\n                        *sp = (png_byte)((background->red >> 8) & 0xff);\n                        *(sp + 1) = (png_byte)(background->red & 0xff);\n                        *(sp + 2) = (png_byte)((background->green >> 8) & 0xff);\n                        *(sp + 3) = (png_byte)(background->green & 0xff);\n                        *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff);\n                        *(sp + 5) = (png_byte)(background->blue & 0xff);\n                     }\n                     else\n                     {\n                        png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp];\n                        *sp = (png_byte)((v >> 8) & 0xff);\n                        *(sp + 1) = (png_byte)(v & 0xff);\n                        v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)];\n                        *(sp + 2) = (png_byte)((v >> 8) & 0xff);\n                        *(sp + 3) = (png_byte)(v & 0xff);\n                        v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)];\n                        *(sp + 4) = (png_byte)((v >> 8) & 0xff);\n                        *(sp + 5) = (png_byte)(v & 0xff);\n                     }\n                  }\n               }\n               else\n#endif\n               {\n                  sp = row;\n                  for (i = 0; i < row_width; i++, sp += 6)\n                  {\n                     png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp+1));\n                     png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));\n                     png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));\n\n                     if (r == trans_values->red && g == trans_values->green &&\n                        b == trans_values->blue)\n                     {\n                        *sp = (png_byte)((background->red >> 8) & 0xff);\n                        *(sp + 1) = (png_byte)(background->red & 0xff);\n                        *(sp + 2) = (png_byte)((background->green >> 8) & 0xff);\n                        *(sp + 3) = (png_byte)(background->green & 0xff);\n                        *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff);\n                        *(sp + 5) = (png_byte)(background->blue & 0xff);\n                     }\n                  }\n               }\n            }\n            break;\n         }\n\n         case PNG_COLOR_TYPE_GRAY_ALPHA:\n         {\n            if (row_info->bit_depth == 8)\n            {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n               if (gamma_to_1 != NULL && gamma_from_1 != NULL &&\n                   gamma_table != NULL)\n               {\n                  sp = row;\n                  dp = row;\n                  for (i = 0; i < row_width; i++, sp += 2, dp++)\n                  {\n                     png_uint_16 a = *(sp + 1);\n\n                     if (a == 0xff)\n                     {\n                        *dp = gamma_table[*sp];\n                     }\n                     else if (a == 0)\n                     {\n                        /* Background is already in screen gamma */\n                        *dp = (png_byte)background->gray;\n                     }\n                     else\n                     {\n                        png_byte v, w;\n\n                        v = gamma_to_1[*sp];\n                        png_composite(w, v, a, background_1->gray);\n                        *dp = gamma_from_1[w];\n                     }\n                  }\n               }\n               else\n#endif\n               {\n                  sp = row;\n                  dp = row;\n                  for (i = 0; i < row_width; i++, sp += 2, dp++)\n                  {\n                     png_byte a = *(sp + 1);\n\n                     if (a == 0xff)\n                     {\n                        *dp = *sp;\n                     }\n#ifdef PNG_READ_GAMMA_SUPPORTED\n                     else if (a == 0)\n                     {\n                        *dp = (png_byte)background->gray;\n                     }\n                     else\n                     {\n                        png_composite(*dp, *sp, a, background_1->gray);\n                     }\n#else\n                     *dp = (png_byte)background->gray;\n#endif\n                  }\n               }\n            }\n            else /* if (png_ptr->bit_depth == 16) */\n            {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n               if (gamma_16 != NULL && gamma_16_from_1 != NULL &&\n                   gamma_16_to_1 != NULL)\n               {\n                  sp = row;\n                  dp = row;\n                  for (i = 0; i < row_width; i++, sp += 4, dp += 2)\n                  {\n                     png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));\n\n                     if (a == (png_uint_16)0xffff)\n                     {\n                        png_uint_16 v;\n\n                        v = gamma_16[*(sp + 1) >> gamma_shift][*sp];\n                        *dp = (png_byte)((v >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(v & 0xff);\n                     }\n#ifdef PNG_READ_GAMMA_SUPPORTED\n                     else if (a == 0)\n#else\n                     else\n#endif\n                     {\n                        /* Background is already in screen gamma */\n                        *dp = (png_byte)((background->gray >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(background->gray & 0xff);\n                     }\n#ifdef PNG_READ_GAMMA_SUPPORTED\n                     else\n                     {\n                        png_uint_16 g, v, w;\n\n                        g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];\n                        png_composite_16(v, g, a, background_1->gray);\n                        w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8];\n                        *dp = (png_byte)((w >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(w & 0xff);\n                     }\n#endif\n                  }\n               }\n               else\n#endif\n               {\n                  sp = row;\n                  dp = row;\n                  for (i = 0; i < row_width; i++, sp += 4, dp += 2)\n                  {\n                     png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));\n                     if (a == (png_uint_16)0xffff)\n                     {\n                        png_memcpy(dp, sp, 2);\n                     }\n#ifdef PNG_READ_GAMMA_SUPPORTED\n                     else if (a == 0)\n#else\n                     else\n#endif\n                     {\n                        *dp = (png_byte)((background->gray >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(background->gray & 0xff);\n                     }\n#ifdef PNG_READ_GAMMA_SUPPORTED\n                     else\n                     {\n                        png_uint_16 g, v;\n\n                        g = (png_uint_16)(((*sp) << 8) + *(sp + 1));\n                        png_composite_16(v, g, a, background_1->gray);\n                        *dp = (png_byte)((v >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(v & 0xff);\n                     }\n#endif\n                  }\n               }\n            }\n            break;\n         }\n\n         case PNG_COLOR_TYPE_RGB_ALPHA:\n         {\n            if (row_info->bit_depth == 8)\n            {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n               if (gamma_to_1 != NULL && gamma_from_1 != NULL &&\n                   gamma_table != NULL)\n               {\n                  sp = row;\n                  dp = row;\n                  for (i = 0; i < row_width; i++, sp += 4, dp += 3)\n                  {\n                     png_byte a = *(sp + 3);\n\n                     if (a == 0xff)\n                     {\n                        *dp = gamma_table[*sp];\n                        *(dp + 1) = gamma_table[*(sp + 1)];\n                        *(dp + 2) = gamma_table[*(sp + 2)];\n                     }\n                     else if (a == 0)\n                     {\n                        /* Background is already in screen gamma */\n                        *dp = (png_byte)background->red;\n                        *(dp + 1) = (png_byte)background->green;\n                        *(dp + 2) = (png_byte)background->blue;\n                     }\n                     else\n                     {\n                        png_byte v, w;\n\n                        v = gamma_to_1[*sp];\n                        png_composite(w, v, a, background_1->red);\n                        *dp = gamma_from_1[w];\n                        v = gamma_to_1[*(sp + 1)];\n                        png_composite(w, v, a, background_1->green);\n                        *(dp + 1) = gamma_from_1[w];\n                        v = gamma_to_1[*(sp + 2)];\n                        png_composite(w, v, a, background_1->blue);\n                        *(dp + 2) = gamma_from_1[w];\n                     }\n                  }\n               }\n               else\n#endif\n               {\n                  sp = row;\n                  dp = row;\n                  for (i = 0; i < row_width; i++, sp += 4, dp += 3)\n                  {\n                     png_byte a = *(sp + 3);\n\n                     if (a == 0xff)\n                     {\n                        *dp = *sp;\n                        *(dp + 1) = *(sp + 1);\n                        *(dp + 2) = *(sp + 2);\n                     }\n                     else if (a == 0)\n                     {\n                        *dp = (png_byte)background->red;\n                        *(dp + 1) = (png_byte)background->green;\n                        *(dp + 2) = (png_byte)background->blue;\n                     }\n                     else\n                     {\n                        png_composite(*dp, *sp, a, background->red);\n                        png_composite(*(dp + 1), *(sp + 1), a,\n                           background->green);\n                        png_composite(*(dp + 2), *(sp + 2), a,\n                           background->blue);\n                     }\n                  }\n               }\n            }\n            else /* if (row_info->bit_depth == 16) */\n            {\n#ifdef PNG_READ_GAMMA_SUPPORTED\n               if (gamma_16 != NULL && gamma_16_from_1 != NULL &&\n                   gamma_16_to_1 != NULL)\n               {\n                  sp = row;\n                  dp = row;\n                  for (i = 0; i < row_width; i++, sp += 8, dp += 6)\n                  {\n                     png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6))\n                         << 8) + (png_uint_16)(*(sp + 7)));\n                     if (a == (png_uint_16)0xffff)\n                     {\n                        png_uint_16 v;\n\n                        v = gamma_16[*(sp + 1) >> gamma_shift][*sp];\n                        *dp = (png_byte)((v >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(v & 0xff);\n                        v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)];\n                        *(dp + 2) = (png_byte)((v >> 8) & 0xff);\n                        *(dp + 3) = (png_byte)(v & 0xff);\n                        v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)];\n                        *(dp + 4) = (png_byte)((v >> 8) & 0xff);\n                        *(dp + 5) = (png_byte)(v & 0xff);\n                     }\n                     else if (a == 0)\n                     {\n                        /* Background is already in screen gamma */\n                        *dp = (png_byte)((background->red >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(background->red & 0xff);\n                        *(dp + 2) = (png_byte)((background->green >> 8) & 0xff);\n                        *(dp + 3) = (png_byte)(background->green & 0xff);\n                        *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff);\n                        *(dp + 5) = (png_byte)(background->blue & 0xff);\n                     }\n                     else\n                     {\n                        png_uint_16 v, w, x;\n\n                        v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];\n                        png_composite_16(w, v, a, background_1->red);\n                        x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];\n                        *dp = (png_byte)((x >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(x & 0xff);\n                        v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];\n                        png_composite_16(w, v, a, background_1->green);\n                        x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];\n                        *(dp + 2) = (png_byte)((x >> 8) & 0xff);\n                        *(dp + 3) = (png_byte)(x & 0xff);\n                        v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)];\n                        png_composite_16(w, v, a, background_1->blue);\n                        x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8];\n                        *(dp + 4) = (png_byte)((x >> 8) & 0xff);\n                        *(dp + 5) = (png_byte)(x & 0xff);\n                     }\n                  }\n               }\n               else\n#endif\n               {\n                  sp = row;\n                  dp = row;\n                  for (i = 0; i < row_width; i++, sp += 8, dp += 6)\n                  {\n                     png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6))\n                        << 8) + (png_uint_16)(*(sp + 7)));\n                     if (a == (png_uint_16)0xffff)\n                     {\n                        png_memcpy(dp, sp, 6);\n                     }\n                     else if (a == 0)\n                     {\n                        *dp = (png_byte)((background->red >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(background->red & 0xff);\n                        *(dp + 2) = (png_byte)((background->green >> 8) & 0xff);\n                        *(dp + 3) = (png_byte)(background->green & 0xff);\n                        *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff);\n                        *(dp + 5) = (png_byte)(background->blue & 0xff);\n                     }\n                     else\n                     {\n                        png_uint_16 v;\n\n                        png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));\n                        png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8)\n                            + *(sp + 3));\n                        png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8)\n                            + *(sp + 5));\n\n                        png_composite_16(v, r, a, background->red);\n                        *dp = (png_byte)((v >> 8) & 0xff);\n                        *(dp + 1) = (png_byte)(v & 0xff);\n                        png_composite_16(v, g, a, background->green);\n                        *(dp + 2) = (png_byte)((v >> 8) & 0xff);\n                        *(dp + 3) = (png_byte)(v & 0xff);\n                        png_composite_16(v, b, a, background->blue);\n                        *(dp + 4) = (png_byte)((v >> 8) & 0xff);\n                        *(dp + 5) = (png_byte)(v & 0xff);\n                     }\n                  }\n               }\n            }\n            break;\n         }\n      }\n\n      if (row_info->color_type & PNG_COLOR_MASK_ALPHA)\n      {\n         row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;\n         row_info->channels--;\n         row_info->pixel_depth = (png_byte)(row_info->channels *\n            row_info->bit_depth);\n         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);\n      }\n   }\n}\n#endif\n\n#ifdef PNG_READ_GAMMA_SUPPORTED\n/* Gamma correct the image, avoiding the alpha channel.  Make sure\n * you do this after you deal with the transparency issue on grayscale\n * or RGB images. If your bit depth is 8, use gamma_table, if it\n * is 16, use gamma_16_table and gamma_shift.  Build these with\n * build_gamma_table().\n */\nvoid /* PRIVATE */\npng_do_gamma(png_row_infop row_info, png_bytep row,\n   png_bytep gamma_table, png_uint_16pp gamma_16_table,\n   int gamma_shift)\n{\n   png_bytep sp;\n   png_uint_32 i;\n   png_uint_32 row_width=row_info->width;\n\n   png_debug(1, \"in png_do_gamma\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n       ((row_info->bit_depth <= 8 && gamma_table != NULL) ||\n        (row_info->bit_depth == 16 && gamma_16_table != NULL)))\n   {\n      switch (row_info->color_type)\n      {\n         case PNG_COLOR_TYPE_RGB:\n         {\n            if (row_info->bit_depth == 8)\n            {\n               sp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  *sp = gamma_table[*sp];\n                  sp++;\n                  *sp = gamma_table[*sp];\n                  sp++;\n                  *sp = gamma_table[*sp];\n                  sp++;\n               }\n            }\n            else /* if (row_info->bit_depth == 16) */\n            {\n               sp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_uint_16 v;\n\n                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];\n                  *sp = (png_byte)((v >> 8) & 0xff);\n                  *(sp + 1) = (png_byte)(v & 0xff);\n                  sp += 2;\n                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];\n                  *sp = (png_byte)((v >> 8) & 0xff);\n                  *(sp + 1) = (png_byte)(v & 0xff);\n                  sp += 2;\n                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];\n                  *sp = (png_byte)((v >> 8) & 0xff);\n                  *(sp + 1) = (png_byte)(v & 0xff);\n                  sp += 2;\n               }\n            }\n            break;\n         }\n\n         case PNG_COLOR_TYPE_RGB_ALPHA:\n         {\n            if (row_info->bit_depth == 8)\n            {\n               sp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  *sp = gamma_table[*sp];\n                  sp++;\n                  *sp = gamma_table[*sp];\n                  sp++;\n                  *sp = gamma_table[*sp];\n                  sp++;\n                  sp++;\n               }\n            }\n            else /* if (row_info->bit_depth == 16) */\n            {\n               sp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];\n                  *sp = (png_byte)((v >> 8) & 0xff);\n                  *(sp + 1) = (png_byte)(v & 0xff);\n                  sp += 2;\n                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];\n                  *sp = (png_byte)((v >> 8) & 0xff);\n                  *(sp + 1) = (png_byte)(v & 0xff);\n                  sp += 2;\n                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];\n                  *sp = (png_byte)((v >> 8) & 0xff);\n                  *(sp + 1) = (png_byte)(v & 0xff);\n                  sp += 4;\n               }\n            }\n            break;\n         }\n\n         case PNG_COLOR_TYPE_GRAY_ALPHA:\n         {\n            if (row_info->bit_depth == 8)\n            {\n               sp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  *sp = gamma_table[*sp];\n                  sp += 2;\n               }\n            }\n            else /* if (row_info->bit_depth == 16) */\n            {\n               sp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];\n                  *sp = (png_byte)((v >> 8) & 0xff);\n                  *(sp + 1) = (png_byte)(v & 0xff);\n                  sp += 4;\n               }\n            }\n            break;\n         }\n\n         case PNG_COLOR_TYPE_GRAY:\n         {\n            if (row_info->bit_depth == 2)\n            {\n               sp = row;\n               for (i = 0; i < row_width; i += 4)\n               {\n                  int a = *sp & 0xc0;\n                  int b = *sp & 0x30;\n                  int c = *sp & 0x0c;\n                  int d = *sp & 0x03;\n\n                  *sp = (png_byte)(\n                      ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)])   ) & 0xc0)|\n                      ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)|\n                      ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)|\n                      ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ));\n                  sp++;\n               }\n            }\n\n            if (row_info->bit_depth == 4)\n            {\n               sp = row;\n               for (i = 0; i < row_width; i += 2)\n               {\n                  int msb = *sp & 0xf0;\n                  int lsb = *sp & 0x0f;\n\n                  *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0)\n                      | (((int)gamma_table[(lsb << 4) | lsb]) >> 4));\n                  sp++;\n               }\n            }\n\n            else if (row_info->bit_depth == 8)\n            {\n               sp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  *sp = gamma_table[*sp];\n                  sp++;\n               }\n            }\n\n            else if (row_info->bit_depth == 16)\n            {\n               sp = row;\n               for (i = 0; i < row_width; i++)\n               {\n                  png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];\n                  *sp = (png_byte)((v >> 8) & 0xff);\n                  *(sp + 1) = (png_byte)(v & 0xff);\n                  sp += 2;\n               }\n            }\n            break;\n         }\n      }\n   }\n}\n#endif\n\n#ifdef PNG_READ_EXPAND_SUPPORTED\n/* Expands a palette row to an RGB or RGBA row depending\n * upon whether you supply trans and num_trans.\n */\nvoid /* PRIVATE */\npng_do_expand_palette(png_row_infop row_info, png_bytep row,\n   png_colorp palette, png_bytep trans, int num_trans)\n{\n   int shift, value;\n   png_bytep sp, dp;\n   png_uint_32 i;\n   png_uint_32 row_width=row_info->width;\n\n   png_debug(1, \"in png_do_expand_palette\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n       row_info->color_type == PNG_COLOR_TYPE_PALETTE)\n   {\n      if (row_info->bit_depth < 8)\n      {\n         switch (row_info->bit_depth)\n         {\n            case 1:\n            {\n               sp = row + (png_size_t)((row_width - 1) >> 3);\n               dp = row + (png_size_t)row_width - 1;\n               shift = 7 - (int)((row_width + 7) & 0x07);\n               for (i = 0; i < row_width; i++)\n               {\n                  if ((*sp >> shift) & 0x01)\n                     *dp = 1;\n                  else\n                     *dp = 0;\n                  if (shift == 7)\n                  {\n                     shift = 0;\n                     sp--;\n                  }\n                  else\n                     shift++;\n\n                  dp--;\n               }\n               break;\n            }\n\n            case 2:\n            {\n               sp = row + (png_size_t)((row_width - 1) >> 2);\n               dp = row + (png_size_t)row_width - 1;\n               shift = (int)((3 - ((row_width + 3) & 0x03)) << 1);\n               for (i = 0; i < row_width; i++)\n               {\n                  value = (*sp >> shift) & 0x03;\n                  *dp = (png_byte)value;\n                  if (shift == 6)\n                  {\n                     shift = 0;\n                     sp--;\n                  }\n                  else\n                     shift += 2;\n\n                  dp--;\n               }\n               break;\n            }\n\n            case 4:\n            {\n               sp = row + (png_size_t)((row_width - 1) >> 1);\n               dp = row + (png_size_t)row_width - 1;\n               shift = (int)((row_width & 0x01) << 2);\n               for (i = 0; i < row_width; i++)\n               {\n                  value = (*sp >> shift) & 0x0f;\n                  *dp = (png_byte)value;\n                  if (shift == 4)\n                  {\n                     shift = 0;\n                     sp--;\n                  }\n                  else\n                     shift += 4;\n\n                  dp--;\n               }\n               break;\n            }\n         }\n         row_info->bit_depth = 8;\n         row_info->pixel_depth = 8;\n         row_info->rowbytes = row_width;\n      }\n      switch (row_info->bit_depth)\n      {\n         case 8:\n         {\n            if (trans != NULL)\n            {\n               sp = row + (png_size_t)row_width - 1;\n               dp = row + (png_size_t)(row_width << 2) - 1;\n\n               for (i = 0; i < row_width; i++)\n               {\n                  if ((int)(*sp) >= num_trans)\n                     *dp-- = 0xff;\n                  else\n                     *dp-- = trans[*sp];\n                  *dp-- = palette[*sp].blue;\n                  *dp-- = palette[*sp].green;\n                  *dp-- = palette[*sp].red;\n                  sp--;\n               }\n               row_info->bit_depth = 8;\n               row_info->pixel_depth = 32;\n               row_info->rowbytes = row_width * 4;\n               row_info->color_type = 6;\n               row_info->channels = 4;\n            }\n            else\n            {\n               sp = row + (png_size_t)row_width - 1;\n               dp = row + (png_size_t)(row_width * 3) - 1;\n\n               for (i = 0; i < row_width; i++)\n               {\n                  *dp-- = palette[*sp].blue;\n                  *dp-- = palette[*sp].green;\n                  *dp-- = palette[*sp].red;\n                  sp--;\n               }\n\n               row_info->bit_depth = 8;\n               row_info->pixel_depth = 24;\n               row_info->rowbytes = row_width * 3;\n               row_info->color_type = 2;\n               row_info->channels = 3;\n            }\n            break;\n         }\n      }\n   }\n}\n\n/* If the bit depth < 8, it is expanded to 8.  Also, if the already\n * expanded transparency value is supplied, an alpha channel is built.\n */\nvoid /* PRIVATE */\npng_do_expand(png_row_infop row_info, png_bytep row,\n   png_color_16p trans_value)\n{\n   int shift, value;\n   png_bytep sp, dp;\n   png_uint_32 i;\n   png_uint_32 row_width=row_info->width;\n\n   png_debug(1, \"in png_do_expand\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL)\n#endif\n   {\n      if (row_info->color_type == PNG_COLOR_TYPE_GRAY)\n      {\n         png_uint_16 gray = (png_uint_16)(trans_value ? trans_value->gray : 0);\n\n         if (row_info->bit_depth < 8)\n         {\n            switch (row_info->bit_depth)\n            {\n               case 1:\n               {\n                  gray = (png_uint_16)((gray&0x01)*0xff);\n                  sp = row + (png_size_t)((row_width - 1) >> 3);\n                  dp = row + (png_size_t)row_width - 1;\n                  shift = 7 - (int)((row_width + 7) & 0x07);\n                  for (i = 0; i < row_width; i++)\n                  {\n                     if ((*sp >> shift) & 0x01)\n                        *dp = 0xff;\n                     else\n                        *dp = 0;\n                     if (shift == 7)\n                     {\n                        shift = 0;\n                        sp--;\n                     }\n                     else\n                        shift++;\n\n                     dp--;\n                  }\n                  break;\n               }\n\n               case 2:\n               {\n                  gray = (png_uint_16)((gray&0x03)*0x55);\n                  sp = row + (png_size_t)((row_width - 1) >> 2);\n                  dp = row + (png_size_t)row_width - 1;\n                  shift = (int)((3 - ((row_width + 3) & 0x03)) << 1);\n                  for (i = 0; i < row_width; i++)\n                  {\n                     value = (*sp >> shift) & 0x03;\n                     *dp = (png_byte)(value | (value << 2) | (value << 4) |\n                        (value << 6));\n                     if (shift == 6)\n                     {\n                        shift = 0;\n                        sp--;\n                     }\n                     else\n                        shift += 2;\n\n                     dp--;\n                  }\n                  break;\n               }\n\n               case 4:\n               {\n                  gray = (png_uint_16)((gray&0x0f)*0x11);\n                  sp = row + (png_size_t)((row_width - 1) >> 1);\n                  dp = row + (png_size_t)row_width - 1;\n                  shift = (int)((1 - ((row_width + 1) & 0x01)) << 2);\n                  for (i = 0; i < row_width; i++)\n                  {\n                     value = (*sp >> shift) & 0x0f;\n                     *dp = (png_byte)(value | (value << 4));\n                     if (shift == 4)\n                     {\n                        shift = 0;\n                        sp--;\n                     }\n                     else\n                        shift = 4;\n\n                     dp--;\n                  }\n                  break;\n               }\n            }\n\n            row_info->bit_depth = 8;\n            row_info->pixel_depth = 8;\n            row_info->rowbytes = row_width;\n         }\n\n         if (trans_value != NULL)\n         {\n            if (row_info->bit_depth == 8)\n            {\n               gray = gray & 0xff;\n               sp = row + (png_size_t)row_width - 1;\n               dp = row + (png_size_t)(row_width << 1) - 1;\n               for (i = 0; i < row_width; i++)\n               {\n                  if (*sp == gray)\n                     *dp-- = 0;\n                  else\n                     *dp-- = 0xff;\n                  *dp-- = *sp--;\n               }\n            }\n\n            else if (row_info->bit_depth == 16)\n            {\n               png_byte gray_high = (gray >> 8) & 0xff;\n               png_byte gray_low = gray & 0xff;\n               sp = row + row_info->rowbytes - 1;\n               dp = row + (row_info->rowbytes << 1) - 1;\n               for (i = 0; i < row_width; i++)\n               {\n                  if (*(sp - 1) == gray_high && *(sp) == gray_low)\n                  {\n                     *dp-- = 0;\n                     *dp-- = 0;\n                  }\n                  else\n                  {\n                     *dp-- = 0xff;\n                     *dp-- = 0xff;\n                  }\n                  *dp-- = *sp--;\n                  *dp-- = *sp--;\n               }\n            }\n\n            row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA;\n            row_info->channels = 2;\n            row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1);\n            row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,\n               row_width);\n         }\n      }\n      else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_value)\n      {\n         if (row_info->bit_depth == 8)\n         {\n            png_byte red = trans_value->red & 0xff;\n            png_byte green = trans_value->green & 0xff;\n            png_byte blue = trans_value->blue & 0xff;\n            sp = row + (png_size_t)row_info->rowbytes - 1;\n            dp = row + (png_size_t)(row_width << 2) - 1;\n            for (i = 0; i < row_width; i++)\n            {\n               if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue)\n                  *dp-- = 0;\n               else\n                  *dp-- = 0xff;\n               *dp-- = *sp--;\n               *dp-- = *sp--;\n               *dp-- = *sp--;\n            }\n         }\n         else if (row_info->bit_depth == 16)\n         {\n            png_byte red_high = (trans_value->red >> 8) & 0xff;\n            png_byte green_high = (trans_value->green >> 8) & 0xff;\n            png_byte blue_high = (trans_value->blue >> 8) & 0xff;\n            png_byte red_low = trans_value->red & 0xff;\n            png_byte green_low = trans_value->green & 0xff;\n            png_byte blue_low = trans_value->blue & 0xff;\n            sp = row + row_info->rowbytes - 1;\n            dp = row + (png_size_t)(row_width << 3) - 1;\n            for (i = 0; i < row_width; i++)\n            {\n               if (*(sp - 5) == red_high &&\n                  *(sp - 4) == red_low &&\n                  *(sp - 3) == green_high &&\n                  *(sp - 2) == green_low &&\n                  *(sp - 1) == blue_high &&\n                  *(sp    ) == blue_low)\n               {\n                  *dp-- = 0;\n                  *dp-- = 0;\n               }\n               else\n               {\n                  *dp-- = 0xff;\n                  *dp-- = 0xff;\n               }\n               *dp-- = *sp--;\n               *dp-- = *sp--;\n               *dp-- = *sp--;\n               *dp-- = *sp--;\n               *dp-- = *sp--;\n               *dp-- = *sp--;\n            }\n         }\n         row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA;\n         row_info->channels = 4;\n         row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2);\n         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);\n      }\n   }\n}\n#endif\n\n#ifdef PNG_READ_DITHER_SUPPORTED\nvoid /* PRIVATE */\npng_do_dither(png_row_infop row_info, png_bytep row,\n    png_bytep palette_lookup, png_bytep dither_lookup)\n{\n   png_bytep sp, dp;\n   png_uint_32 i;\n   png_uint_32 row_width=row_info->width;\n\n   png_debug(1, \"in png_do_dither\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL)\n#endif\n   {\n      if (row_info->color_type == PNG_COLOR_TYPE_RGB &&\n         palette_lookup && row_info->bit_depth == 8)\n      {\n         int r, g, b, p;\n         sp = row;\n         dp = row;\n         for (i = 0; i < row_width; i++)\n         {\n            r = *sp++;\n            g = *sp++;\n            b = *sp++;\n\n            /* This looks real messy, but the compiler will reduce\n             * it down to a reasonable formula.  For example, with\n             * 5 bits per color, we get:\n             * p = (((r >> 3) & 0x1f) << 10) |\n             *    (((g >> 3) & 0x1f) << 5) |\n             *    ((b >> 3) & 0x1f);\n             */\n            p = (((r >> (8 - PNG_DITHER_RED_BITS)) &\n               ((1 << PNG_DITHER_RED_BITS) - 1)) <<\n               (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) |\n               (((g >> (8 - PNG_DITHER_GREEN_BITS)) &\n               ((1 << PNG_DITHER_GREEN_BITS) - 1)) <<\n               (PNG_DITHER_BLUE_BITS)) |\n               ((b >> (8 - PNG_DITHER_BLUE_BITS)) &\n               ((1 << PNG_DITHER_BLUE_BITS) - 1));\n\n            *dp++ = palette_lookup[p];\n         }\n         row_info->color_type = PNG_COLOR_TYPE_PALETTE;\n         row_info->channels = 1;\n         row_info->pixel_depth = row_info->bit_depth;\n         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);\n      }\n      else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&\n         palette_lookup != NULL && row_info->bit_depth == 8)\n      {\n         int r, g, b, p;\n         sp = row;\n         dp = row;\n         for (i = 0; i < row_width; i++)\n         {\n            r = *sp++;\n            g = *sp++;\n            b = *sp++;\n            sp++;\n\n            p = (((r >> (8 - PNG_DITHER_RED_BITS)) &\n               ((1 << PNG_DITHER_RED_BITS) - 1)) <<\n               (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) |\n               (((g >> (8 - PNG_DITHER_GREEN_BITS)) &\n               ((1 << PNG_DITHER_GREEN_BITS) - 1)) <<\n               (PNG_DITHER_BLUE_BITS)) |\n               ((b >> (8 - PNG_DITHER_BLUE_BITS)) &\n               ((1 << PNG_DITHER_BLUE_BITS) - 1));\n\n            *dp++ = palette_lookup[p];\n         }\n         row_info->color_type = PNG_COLOR_TYPE_PALETTE;\n         row_info->channels = 1;\n         row_info->pixel_depth = row_info->bit_depth;\n         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);\n      }\n      else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&\n         dither_lookup && row_info->bit_depth == 8)\n      {\n         sp = row;\n         for (i = 0; i < row_width; i++, sp++)\n         {\n            *sp = dither_lookup[*sp];\n         }\n      }\n   }\n}\n#endif\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n#ifdef PNG_READ_GAMMA_SUPPORTED\nstatic PNG_CONST int png_gamma_shift[] =\n   {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x00};\n\n/* We build the 8- or 16-bit gamma tables here.  Note that for 16-bit\n * tables, we don't make a full table if we are reducing to 8-bit in\n * the future.  Note also how the gamma_16 tables are segmented so that\n * we don't need to allocate > 64K chunks for a full 16-bit table.\n *\n * See the PNG extensions document for an integer algorithm for creating\n * the gamma tables.  Maybe we will implement that here someday.\n *\n * We should only reach this point if\n *\n *      the file_gamma is known (i.e., the gAMA or sRGB chunk is present,\n *      or the application has provided a file_gamma)\n *\n *   AND\n *      {\n *         the screen_gamma is known\n *      OR\n *\n *         RGB_to_gray transformation is being performed\n *      }\n *\n *   AND\n *      {\n *         the screen_gamma is different from the reciprocal of the\n *         file_gamma by more than the specified threshold\n *\n *      OR\n *\n *         a background color has been specified and the file_gamma\n *         and screen_gamma are not 1.0, within the specified threshold.\n *      }\n */\n\nvoid /* PRIVATE */\npng_build_gamma_table(png_structp png_ptr)\n{\n  png_debug(1, \"in png_build_gamma_table\");\n\n  if (png_ptr->bit_depth <= 8)\n  {\n     int i;\n     double g;\n\n     if (png_ptr->screen_gamma > .000001)\n        g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);\n\n     else\n        g = 1.0;\n\n     png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr,\n        (png_uint_32)256);\n\n     for (i = 0; i < 256; i++)\n     {\n        png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0,\n           g) * 255.0 + .5);\n     }\n\n#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \\\n   defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)\n     if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY))\n     {\n\n        g = 1.0 / (png_ptr->gamma);\n\n        png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr,\n           (png_uint_32)256);\n\n        for (i = 0; i < 256; i++)\n        {\n           png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0,\n              g) * 255.0 + .5);\n        }\n\n\n        png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr,\n           (png_uint_32)256);\n\n        if (png_ptr->screen_gamma > 0.000001)\n           g = 1.0 / png_ptr->screen_gamma;\n\n        else\n           g = png_ptr->gamma;   /* Probably doing rgb_to_gray */\n\n        for (i = 0; i < 256; i++)\n        {\n           png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0,\n              g) * 255.0 + .5);\n\n        }\n     }\n#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */\n  }\n  else\n  {\n     double g;\n     int i, j, shift, num;\n     int sig_bit;\n     png_uint_32 ig;\n\n     if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)\n     {\n        sig_bit = (int)png_ptr->sig_bit.red;\n\n        if ((int)png_ptr->sig_bit.green > sig_bit)\n           sig_bit = png_ptr->sig_bit.green;\n\n        if ((int)png_ptr->sig_bit.blue > sig_bit)\n           sig_bit = png_ptr->sig_bit.blue;\n     }\n     else\n     {\n        sig_bit = (int)png_ptr->sig_bit.gray;\n     }\n\n     if (sig_bit > 0)\n        shift = 16 - sig_bit;\n\n     else\n        shift = 0;\n\n     if (png_ptr->transformations & PNG_16_TO_8)\n     {\n        if (shift < (16 - PNG_MAX_GAMMA_8))\n           shift = (16 - PNG_MAX_GAMMA_8);\n     }\n\n     if (shift > 8)\n        shift = 8;\n\n     if (shift < 0)\n        shift = 0;\n\n     png_ptr->gamma_shift = (png_byte)shift;\n\n     num = (1 << (8 - shift));\n\n     if (png_ptr->screen_gamma > .000001)\n        g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);\n     else\n        g = 1.0;\n\n     png_ptr->gamma_16_table = (png_uint_16pp)png_calloc(png_ptr,\n        (png_uint_32)(num * png_sizeof(png_uint_16p)));\n\n     if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND))\n     {\n        double fin, fout;\n        png_uint_32 last, max;\n\n        for (i = 0; i < num; i++)\n        {\n           png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,\n              (png_uint_32)(256 * png_sizeof(png_uint_16)));\n        }\n\n        g = 1.0 / g;\n        last = 0;\n        for (i = 0; i < 256; i++)\n        {\n           fout = ((double)i + 0.5) / 256.0;\n           fin = pow(fout, g);\n           max = (png_uint_32)(fin * (double)((png_uint_32)num << 8));\n           while (last <= max)\n           {\n              png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]\n                 [(int)(last >> (8 - shift))] = (png_uint_16)(\n                 (png_uint_16)i | ((png_uint_16)i << 8));\n              last++;\n           }\n        }\n        while (last < ((png_uint_32)num << 8))\n        {\n           png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]\n              [(int)(last >> (8 - shift))] = (png_uint_16)65535L;\n           last++;\n        }\n     }\n     else\n     {\n        for (i = 0; i < num; i++)\n        {\n           png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,\n              (png_uint_32)(256 * png_sizeof(png_uint_16)));\n\n           ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4);\n\n           for (j = 0; j < 256; j++)\n           {\n              png_ptr->gamma_16_table[i][j] =\n                 (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /\n                    65535.0, g) * 65535.0 + .5);\n           }\n        }\n     }\n\n#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \\\n   defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)\n     if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY))\n     {\n\n        g = 1.0 / (png_ptr->gamma);\n\n        png_ptr->gamma_16_to_1 = (png_uint_16pp)png_calloc(png_ptr,\n           (png_uint_32)(num * png_sizeof(png_uint_16p )));\n\n        for (i = 0; i < num; i++)\n        {\n           png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr,\n              (png_uint_32)(256 * png_sizeof(png_uint_16)));\n\n           ig = (((png_uint_32)i *\n              (png_uint_32)png_gamma_shift[shift]) >> 4);\n           for (j = 0; j < 256; j++)\n           {\n              png_ptr->gamma_16_to_1[i][j] =\n                 (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /\n                    65535.0, g) * 65535.0 + .5);\n           }\n        }\n\n        if (png_ptr->screen_gamma > 0.000001)\n           g = 1.0 / png_ptr->screen_gamma;\n\n        else\n           g = png_ptr->gamma;   /* Probably doing rgb_to_gray */\n\n        png_ptr->gamma_16_from_1 = (png_uint_16pp)png_calloc(png_ptr,\n           (png_uint_32)(num * png_sizeof(png_uint_16p)));\n\n        for (i = 0; i < num; i++)\n        {\n           png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr,\n              (png_uint_32)(256 * png_sizeof(png_uint_16)));\n\n           ig = (((png_uint_32)i *\n              (png_uint_32)png_gamma_shift[shift]) >> 4);\n\n           for (j = 0; j < 256; j++)\n           {\n              png_ptr->gamma_16_from_1[i][j] =\n                 (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /\n                    65535.0, g) * 65535.0 + .5);\n           }\n        }\n     }\n#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */\n  }\n}\n#endif\n/* To do: install integer version of png_build_gamma_table here */\n#endif\n\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n/* Undoes intrapixel differencing  */\nvoid /* PRIVATE */\npng_do_read_intrapixel(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_read_intrapixel\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n       (row_info->color_type & PNG_COLOR_MASK_COLOR))\n   {\n      int bytes_per_pixel;\n      png_uint_32 row_width = row_info->width;\n      if (row_info->bit_depth == 8)\n      {\n         png_bytep rp;\n         png_uint_32 i;\n\n         if (row_info->color_type == PNG_COLOR_TYPE_RGB)\n            bytes_per_pixel = 3;\n\n         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n            bytes_per_pixel = 4;\n\n         else\n            return;\n\n         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)\n         {\n            *(rp) = (png_byte)((256 + *rp + *(rp+1))&0xff);\n            *(rp+2) = (png_byte)((256 + *(rp+2) + *(rp+1))&0xff);\n         }\n      }\n      else if (row_info->bit_depth == 16)\n      {\n         png_bytep rp;\n         png_uint_32 i;\n\n         if (row_info->color_type == PNG_COLOR_TYPE_RGB)\n            bytes_per_pixel = 6;\n\n         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n            bytes_per_pixel = 8;\n\n         else\n            return;\n\n         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)\n         {\n            png_uint_32 s0   = (*(rp    ) << 8) | *(rp + 1);\n            png_uint_32 s1   = (*(rp + 2) << 8) | *(rp + 3);\n            png_uint_32 s2   = (*(rp + 4) << 8) | *(rp + 5);\n            png_uint_32 red  = (png_uint_32)((s0 + s1 + 65536L) & 0xffffL);\n            png_uint_32 blue = (png_uint_32)((s2 + s1 + 65536L) & 0xffffL);\n            *(rp  ) = (png_byte)((red >> 8) & 0xff);\n            *(rp+1) = (png_byte)(red & 0xff);\n            *(rp+4) = (png_byte)((blue >> 8) & 0xff);\n            *(rp+5) = (png_byte)(blue & 0xff);\n         }\n      }\n   }\n}\n#endif /* PNG_MNG_FEATURES_SUPPORTED */\n#endif /* PNG_READ_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngrutil.c",
    "content": "\n/* pngrutil.c - utilities to read a PNG file\n *\n * Last changed in libpng 1.2.44 [June 26, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n * This file contains routines that are only called from within\n * libpng itself during the course of reading an image.\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#ifdef PNG_READ_SUPPORTED\n\n#if defined(_WIN32_WCE) && (_WIN32_WCE<0x500)\n#  define WIN32_WCE_OLD\n#endif\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n#  ifdef WIN32_WCE_OLD\n/* The strtod() function is not supported on WindowsCE */\n__inline double png_strtod(png_structp png_ptr, PNG_CONST char *nptr,\n    char **endptr)\n{\n   double result = 0;\n   int len;\n   wchar_t *str, *end;\n\n   len = MultiByteToWideChar(CP_ACP, 0, nptr, -1, NULL, 0);\n   str = (wchar_t *)png_malloc(png_ptr, len * png_sizeof(wchar_t));\n   if ( NULL != str )\n   {\n      MultiByteToWideChar(CP_ACP, 0, nptr, -1, str, len);\n      result = wcstod(str, &end);\n      len = WideCharToMultiByte(CP_ACP, 0, end, -1, NULL, 0, NULL, NULL);\n      *endptr = (char *)nptr + (png_strlen(nptr) - len + 1);\n      png_free(png_ptr, str);\n   }\n   return result;\n}\n#  else\n#    define png_strtod(p,a,b) strtod(a,b)\n#  endif\n#endif\n\npng_uint_32 PNGAPI\npng_get_uint_31(png_structp png_ptr, png_bytep buf)\n{\n#ifdef PNG_READ_BIG_ENDIAN_SUPPORTED\n   png_uint_32 i = png_get_uint_32(buf);\n#else\n   /* Avoid an extra function call by inlining the result. */\n   png_uint_32 i = ((png_uint_32)(*buf) << 24) +\n      ((png_uint_32)(*(buf + 1)) << 16) +\n      ((png_uint_32)(*(buf + 2)) << 8) +\n      (png_uint_32)(*(buf + 3));\n#endif\n   if (i > PNG_UINT_31_MAX)\n     png_error(png_ptr, \"PNG unsigned integer out of range.\");\n   return (i);\n}\n#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED\n/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */\npng_uint_32 PNGAPI\npng_get_uint_32(png_bytep buf)\n{\n   png_uint_32 i = ((png_uint_32)(*buf) << 24) +\n      ((png_uint_32)(*(buf + 1)) << 16) +\n      ((png_uint_32)(*(buf + 2)) << 8) +\n      (png_uint_32)(*(buf + 3));\n\n   return (i);\n}\n\n/* Grab a signed 32-bit integer from a buffer in big-endian format.  The\n * data is stored in the PNG file in two's complement format, and it is\n * assumed that the machine format for signed integers is the same.\n */\npng_int_32 PNGAPI\npng_get_int_32(png_bytep buf)\n{\n   png_int_32 i = ((png_int_32)(*buf) << 24) +\n      ((png_int_32)(*(buf + 1)) << 16) +\n      ((png_int_32)(*(buf + 2)) << 8) +\n      (png_int_32)(*(buf + 3));\n\n   return (i);\n}\n\n/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */\npng_uint_16 PNGAPI\npng_get_uint_16(png_bytep buf)\n{\n   png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) +\n      (png_uint_16)(*(buf + 1)));\n\n   return (i);\n}\n#endif /* PNG_READ_BIG_ENDIAN_SUPPORTED */\n\n/* Read the chunk header (length + type name).\n * Put the type name into png_ptr->chunk_name, and return the length.\n */\npng_uint_32 /* PRIVATE */\npng_read_chunk_header(png_structp png_ptr)\n{\n   png_byte buf[8];\n   png_uint_32 length;\n\n   /* Read the length and the chunk name */\n   png_read_data(png_ptr, buf, 8);\n   length = png_get_uint_31(png_ptr, buf);\n\n   /* Put the chunk name into png_ptr->chunk_name */\n   png_memcpy(png_ptr->chunk_name, buf + 4, 4);\n\n   png_debug2(0, \"Reading %s chunk, length = %lu\",\n      png_ptr->chunk_name, length);\n\n   /* Reset the crc and run it over the chunk name */\n   png_reset_crc(png_ptr);\n   png_calculate_crc(png_ptr, png_ptr->chunk_name, 4);\n\n   /* Check to see if chunk name is valid */\n   png_check_chunk_name(png_ptr, png_ptr->chunk_name);\n\n   return length;\n}\n\n/* Read data, and (optionally) run it through the CRC. */\nvoid /* PRIVATE */\npng_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length)\n{\n   if (png_ptr == NULL)\n      return;\n   png_read_data(png_ptr, buf, length);\n   png_calculate_crc(png_ptr, buf, length);\n}\n\n/* Optionally skip data and then check the CRC.  Depending on whether we\n * are reading a ancillary or critical chunk, and how the program has set\n * things up, we may calculate the CRC on the data and print a message.\n * Returns '1' if there was a CRC error, '0' otherwise.\n */\nint /* PRIVATE */\npng_crc_finish(png_structp png_ptr, png_uint_32 skip)\n{\n   png_size_t i;\n   png_size_t istop = png_ptr->zbuf_size;\n\n   for (i = (png_size_t)skip; i > istop; i -= istop)\n   {\n      png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);\n   }\n   if (i)\n   {\n      png_crc_read(png_ptr, png_ptr->zbuf, i);\n   }\n\n   if (png_crc_error(png_ptr))\n   {\n      if (((png_ptr->chunk_name[0] & 0x20) &&                /* Ancillary */\n          !(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) ||\n          (!(png_ptr->chunk_name[0] & 0x20) &&             /* Critical  */\n          (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_USE)))\n      {\n         png_chunk_warning(png_ptr, \"CRC error\");\n      }\n      else\n      {\n         png_chunk_error(png_ptr, \"CRC error\");\n      }\n      return (1);\n   }\n\n   return (0);\n}\n\n/* Compare the CRC stored in the PNG file with that calculated by libpng from\n * the data it has read thus far.\n */\nint /* PRIVATE */\npng_crc_error(png_structp png_ptr)\n{\n   png_byte crc_bytes[4];\n   png_uint_32 crc;\n   int need_crc = 1;\n\n   if (png_ptr->chunk_name[0] & 0x20)                     /* ancillary */\n   {\n      if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) ==\n          (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN))\n         need_crc = 0;\n   }\n   else                                                    /* critical */\n   {\n      if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE)\n         need_crc = 0;\n   }\n\n   png_read_data(png_ptr, crc_bytes, 4);\n\n   if (need_crc)\n   {\n      crc = png_get_uint_32(crc_bytes);\n      return ((int)(crc != png_ptr->crc));\n   }\n   else\n      return (0);\n}\n\n#if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \\\n    defined(PNG_READ_iCCP_SUPPORTED)\nstatic png_size_t\npng_inflate(png_structp png_ptr, const png_byte *data, png_size_t size,\n        png_bytep output, png_size_t output_size)\n{\n   png_size_t count = 0;\n\n   png_ptr->zstream.next_in = (png_bytep)data; /* const_cast: VALID */\n   png_ptr->zstream.avail_in = size;\n\n   while (1)\n   {\n      int ret, avail;\n\n      /* Reset the output buffer each time round - we empty it\n       * after every inflate call.\n       */\n      png_ptr->zstream.next_out = png_ptr->zbuf;\n      png_ptr->zstream.avail_out = png_ptr->zbuf_size;\n\n      ret = inflate(&png_ptr->zstream, Z_NO_FLUSH);\n      avail = png_ptr->zbuf_size - png_ptr->zstream.avail_out;\n\n      /* First copy/count any new output - but only if we didn't\n       * get an error code.\n       */\n      if ((ret == Z_OK || ret == Z_STREAM_END) && avail > 0)\n      {\n         if (output != 0 && output_size > count)\n         {\n            int copy = output_size - count;\n            if (avail < copy) copy = avail;\n            png_memcpy(output + count, png_ptr->zbuf, copy);\n         }\n         count += avail;\n      }\n\n      if (ret == Z_OK)\n         continue;\n\n      /* Termination conditions - always reset the zstream, it\n       * must be left in inflateInit state.\n       */\n      png_ptr->zstream.avail_in = 0;\n      inflateReset(&png_ptr->zstream);\n\n      if (ret == Z_STREAM_END)\n         return count; /* NOTE: may be zero. */\n\n      /* Now handle the error codes - the API always returns 0\n       * and the error message is dumped into the uncompressed\n       * buffer if available.\n       */\n      {\n         PNG_CONST char *msg;\n         if (png_ptr->zstream.msg != 0)\n            msg = png_ptr->zstream.msg;\n         else\n         {\n#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)\n            char umsg[52];\n\n            switch (ret)\n            {\n               case Z_BUF_ERROR:\n                  msg = \"Buffer error in compressed datastream in %s chunk\";\n                  break;\n               case Z_DATA_ERROR:\n                  msg = \"Data error in compressed datastream in %s chunk\";\n                  break;\n               default:\n                  msg = \"Incomplete compressed datastream in %s chunk\";\n                  break;\n            }\n\n            png_snprintf(umsg, sizeof umsg, msg, png_ptr->chunk_name);\n            msg = umsg;\n#else\n            msg = \"Damaged compressed datastream in chunk other than IDAT\";\n#endif\n         }\n\n         png_warning(png_ptr, msg);\n      }\n\n      /* 0 means an error - notice that this code simple ignores\n       * zero length compressed chunks as a result.\n       */\n      return 0;\n   }\n}\n\n/*\n * Decompress trailing data in a chunk.  The assumption is that chunkdata\n * points at an allocated area holding the contents of a chunk with a\n * trailing compressed part.  What we get back is an allocated area\n * holding the original prefix part and an uncompressed version of the\n * trailing part (the malloc area passed in is freed).\n */\nvoid /* PRIVATE */\npng_decompress_chunk(png_structp png_ptr, int comp_type,\n    png_size_t chunklength,\n    png_size_t prefix_size, png_size_t *newlength)\n{\n   /* The caller should guarantee this */\n   if (prefix_size > chunklength)\n   {\n      /* The recovery is to delete the chunk. */\n      png_warning(png_ptr, \"invalid chunklength\");\n      prefix_size = 0; /* To delete everything */\n   }\n\n   else if (comp_type == PNG_COMPRESSION_TYPE_BASE)\n   {\n      png_size_t expanded_size = png_inflate(png_ptr,\n                (png_bytep)(png_ptr->chunkdata + prefix_size),\n                chunklength - prefix_size,\n                0/*output*/, 0/*output size*/);\n\n      /* Now check the limits on this chunk - if the limit fails the\n       * compressed data will be removed, the prefix will remain.\n       */\n#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED\n      if (png_ptr->user_chunk_malloc_max &&\n          (prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1))\n#else\n#  ifdef PNG_USER_CHUNK_MALLOC_MAX\n      if ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&\n          prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)\n#  endif\n#endif\n         png_warning(png_ptr, \"Exceeded size limit while expanding chunk\");\n\n      /* If the size is zero either there was an error and a message\n       * has already been output (warning) or the size really is zero\n       * and we have nothing to do - the code will exit through the\n       * error case below.\n       */\n#if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \\\n    defined(PNG_USER_CHUNK_MALLOC_MAX)\n      else\n#endif\n      if (expanded_size > 0)\n      {\n         /* Success (maybe) - really uncompress the chunk. */\n         png_size_t new_size = 0;\n         png_charp text = png_malloc_warn(png_ptr,\n                        prefix_size + expanded_size + 1);\n\n         if (text != NULL)\n         {\n            png_memcpy(text, png_ptr->chunkdata, prefix_size);\n            new_size = png_inflate(png_ptr,\n                (png_bytep)(png_ptr->chunkdata + prefix_size),\n                chunklength - prefix_size,\n                (png_bytep)(text + prefix_size), expanded_size);\n            text[prefix_size + expanded_size] = 0; /* just in case */\n\n            if (new_size == expanded_size)\n            {\n               png_free(png_ptr, png_ptr->chunkdata);\n               png_ptr->chunkdata = text;\n               *newlength = prefix_size + expanded_size;\n               return; /* The success return! */\n            }\n\n            png_warning(png_ptr, \"png_inflate logic error\");\n            png_free(png_ptr, text);\n         }\n         else\n          png_warning(png_ptr, \"Not enough memory to decompress chunk.\");\n      }\n   }\n\n   else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */\n   {\n#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)\n      char umsg[50];\n\n      png_snprintf(umsg, sizeof umsg, \"Unknown zTXt compression type %d\",\n          comp_type);\n      png_warning(png_ptr, umsg);\n#else\n      png_warning(png_ptr, \"Unknown zTXt compression type\");\n#endif\n\n      /* The recovery is to simply drop the data. */\n   }\n\n   /* Generic error return - leave the prefix, delete the compressed\n    * data, reallocate the chunkdata to remove the potentially large\n    * amount of compressed data.\n    */\n   {\n      png_charp text = png_malloc_warn(png_ptr, prefix_size + 1);\n      if (text != NULL)\n      {\n         if (prefix_size > 0)\n            png_memcpy(text, png_ptr->chunkdata, prefix_size);\n         png_free(png_ptr, png_ptr->chunkdata);\n         png_ptr->chunkdata = text;\n\n         /* This is an extra zero in the 'uncompressed' part. */\n         *(png_ptr->chunkdata + prefix_size) = 0x00;\n      }\n      /* Ignore a malloc error here - it is safe. */\n   }\n\n   *newlength = prefix_size;\n}\n#endif\n\n/* Read and check the IDHR chunk */\nvoid /* PRIVATE */\npng_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_byte buf[13];\n   png_uint_32 width, height;\n   int bit_depth, color_type, compression_type, filter_type;\n   int interlace_type;\n\n   png_debug(1, \"in png_handle_IHDR\");\n\n   if (png_ptr->mode & PNG_HAVE_IHDR)\n      png_error(png_ptr, \"Out of place IHDR\");\n\n   /* Check the length */\n   if (length != 13)\n      png_error(png_ptr, \"Invalid IHDR chunk\");\n\n   png_ptr->mode |= PNG_HAVE_IHDR;\n\n   png_crc_read(png_ptr, buf, 13);\n   png_crc_finish(png_ptr, 0);\n\n   width = png_get_uint_31(png_ptr, buf);\n   height = png_get_uint_31(png_ptr, buf + 4);\n   bit_depth = buf[8];\n   color_type = buf[9];\n   compression_type = buf[10];\n   filter_type = buf[11];\n   interlace_type = buf[12];\n\n   /* Set internal variables */\n   png_ptr->width = width;\n   png_ptr->height = height;\n   png_ptr->bit_depth = (png_byte)bit_depth;\n   png_ptr->interlaced = (png_byte)interlace_type;\n   png_ptr->color_type = (png_byte)color_type;\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n   png_ptr->filter_type = (png_byte)filter_type;\n#endif\n   png_ptr->compression_type = (png_byte)compression_type;\n\n   /* Find number of channels */\n   switch (png_ptr->color_type)\n   {\n      case PNG_COLOR_TYPE_GRAY:\n      case PNG_COLOR_TYPE_PALETTE:\n         png_ptr->channels = 1;\n         break;\n\n      case PNG_COLOR_TYPE_RGB:\n         png_ptr->channels = 3;\n         break;\n\n      case PNG_COLOR_TYPE_GRAY_ALPHA:\n         png_ptr->channels = 2;\n         break;\n\n      case PNG_COLOR_TYPE_RGB_ALPHA:\n         png_ptr->channels = 4;\n         break;\n   }\n\n   /* Set up other useful info */\n   png_ptr->pixel_depth = (png_byte)(png_ptr->bit_depth *\n   png_ptr->channels);\n   png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->width);\n   png_debug1(3, \"bit_depth = %d\", png_ptr->bit_depth);\n   png_debug1(3, \"channels = %d\", png_ptr->channels);\n   png_debug1(3, \"rowbytes = %lu\", png_ptr->rowbytes);\n   png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth,\n      color_type, interlace_type, compression_type, filter_type);\n}\n\n/* Read and check the palette */\nvoid /* PRIVATE */\npng_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_color palette[PNG_MAX_PALETTE_LENGTH];\n   int num, i;\n#ifdef PNG_POINTER_INDEXING_SUPPORTED\n   png_colorp pal_ptr;\n#endif\n\n   png_debug(1, \"in png_handle_PLTE\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before PLTE\");\n\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid PLTE after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   else if (png_ptr->mode & PNG_HAVE_PLTE)\n      png_error(png_ptr, \"Duplicate PLTE chunk\");\n\n   png_ptr->mode |= PNG_HAVE_PLTE;\n\n   if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR))\n   {\n      png_warning(png_ptr,\n        \"Ignoring PLTE chunk in grayscale PNG\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n#ifndef PNG_READ_OPT_PLTE_SUPPORTED\n   if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)\n   {\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n#endif\n\n   if (length > 3*PNG_MAX_PALETTE_LENGTH || length % 3)\n   {\n      if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)\n      {\n         png_warning(png_ptr, \"Invalid palette chunk\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n\n      else\n      {\n         png_error(png_ptr, \"Invalid palette chunk\");\n      }\n   }\n\n   num = (int)length / 3;\n\n#ifdef PNG_POINTER_INDEXING_SUPPORTED\n   for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++)\n   {\n      png_byte buf[3];\n\n      png_crc_read(png_ptr, buf, 3);\n      pal_ptr->red = buf[0];\n      pal_ptr->green = buf[1];\n      pal_ptr->blue = buf[2];\n   }\n#else\n   for (i = 0; i < num; i++)\n   {\n      png_byte buf[3];\n\n      png_crc_read(png_ptr, buf, 3);\n      /* Don't depend upon png_color being any order */\n      palette[i].red = buf[0];\n      palette[i].green = buf[1];\n      palette[i].blue = buf[2];\n   }\n#endif\n\n   /* If we actually NEED the PLTE chunk (ie for a paletted image), we do\n    * whatever the normal CRC configuration tells us.  However, if we\n    * have an RGB image, the PLTE can be considered ancillary, so\n    * we will act as though it is.\n    */\n#ifndef PNG_READ_OPT_PLTE_SUPPORTED\n   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n#endif\n   {\n      png_crc_finish(png_ptr, 0);\n   }\n#ifndef PNG_READ_OPT_PLTE_SUPPORTED\n   else if (png_crc_error(png_ptr))  /* Only if we have a CRC error */\n   {\n      /* If we don't want to use the data from an ancillary chunk,\n         we have two options: an error abort, or a warning and we\n         ignore the data in this chunk (which should be OK, since\n         it's considered ancillary for a RGB or RGBA image). */\n      if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE))\n      {\n         if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)\n         {\n            png_chunk_error(png_ptr, \"CRC error\");\n         }\n         else\n         {\n            png_chunk_warning(png_ptr, \"CRC error\");\n            return;\n         }\n      }\n      /* Otherwise, we (optionally) emit a warning and use the chunk. */\n      else if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN))\n      {\n         png_chunk_warning(png_ptr, \"CRC error\");\n      }\n   }\n#endif\n\n   png_set_PLTE(png_ptr, info_ptr, palette, num);\n\n#ifdef PNG_READ_tRNS_SUPPORTED\n   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n   {\n      if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))\n      {\n         if (png_ptr->num_trans > (png_uint_16)num)\n         {\n            png_warning(png_ptr, \"Truncating incorrect tRNS chunk length\");\n            png_ptr->num_trans = (png_uint_16)num;\n         }\n         if (info_ptr->num_trans > (png_uint_16)num)\n         {\n            png_warning(png_ptr, \"Truncating incorrect info tRNS chunk length\");\n            info_ptr->num_trans = (png_uint_16)num;\n         }\n      }\n   }\n#endif\n\n}\n\nvoid /* PRIVATE */\npng_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_debug(1, \"in png_handle_IEND\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR) || !(png_ptr->mode & PNG_HAVE_IDAT))\n   {\n      png_error(png_ptr, \"No image in file\");\n   }\n\n   png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND);\n\n   if (length != 0)\n   {\n      png_warning(png_ptr, \"Incorrect IEND chunk length\");\n   }\n   png_crc_finish(png_ptr, length);\n\n   info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */\n}\n\n#ifdef PNG_READ_gAMA_SUPPORTED\nvoid /* PRIVATE */\npng_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_fixed_point igamma;\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   float file_gamma;\n#endif\n   png_byte buf[4];\n\n   png_debug(1, \"in png_handle_gAMA\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before gAMA\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid gAMA after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (png_ptr->mode & PNG_HAVE_PLTE)\n      /* Should be an error, but we can cope with it */\n      png_warning(png_ptr, \"Out of place gAMA chunk\");\n\n   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)\n#ifdef PNG_READ_sRGB_SUPPORTED\n      && !(info_ptr->valid & PNG_INFO_sRGB)\n#endif\n      )\n   {\n      png_warning(png_ptr, \"Duplicate gAMA chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (length != 4)\n   {\n      png_warning(png_ptr, \"Incorrect gAMA chunk length\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_crc_read(png_ptr, buf, 4);\n   if (png_crc_finish(png_ptr, 0))\n      return;\n\n   igamma = (png_fixed_point)png_get_uint_32(buf);\n   /* Check for zero gamma */\n   if (igamma == 0)\n      {\n         png_warning(png_ptr,\n           \"Ignoring gAMA chunk with gamma=0\");\n         return;\n      }\n\n#ifdef PNG_READ_sRGB_SUPPORTED\n   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB))\n      if (PNG_OUT_OF_RANGE(igamma, 45500L, 500))\n      {\n         png_warning(png_ptr,\n           \"Ignoring incorrect gAMA value when sRGB is also present\");\n#ifdef PNG_CONSOLE_IO_SUPPORTED\n         fprintf(stderr, \"gamma = (%d/100000)\", (int)igamma);\n#endif\n         return;\n      }\n#endif /* PNG_READ_sRGB_SUPPORTED */\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   file_gamma = (float)igamma / (float)100000.0;\n#  ifdef PNG_READ_GAMMA_SUPPORTED\n     png_ptr->gamma = file_gamma;\n#  endif\n     png_set_gAMA(png_ptr, info_ptr, file_gamma);\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   png_set_gAMA_fixed(png_ptr, info_ptr, igamma);\n#endif\n}\n#endif\n\n#ifdef PNG_READ_sBIT_SUPPORTED\nvoid /* PRIVATE */\npng_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_size_t truelen;\n   png_byte buf[4];\n\n   png_debug(1, \"in png_handle_sBIT\");\n\n   buf[0] = buf[1] = buf[2] = buf[3] = 0;\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before sBIT\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid sBIT after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (png_ptr->mode & PNG_HAVE_PLTE)\n   {\n      /* Should be an error, but we can cope with it */\n      png_warning(png_ptr, \"Out of place sBIT chunk\");\n   }\n   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT))\n   {\n      png_warning(png_ptr, \"Duplicate sBIT chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      truelen = 3;\n   else\n      truelen = (png_size_t)png_ptr->channels;\n\n   if (length != truelen || length > 4)\n   {\n      png_warning(png_ptr, \"Incorrect sBIT chunk length\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_crc_read(png_ptr, buf, truelen);\n   if (png_crc_finish(png_ptr, 0))\n      return;\n\n   if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)\n   {\n      png_ptr->sig_bit.red = buf[0];\n      png_ptr->sig_bit.green = buf[1];\n      png_ptr->sig_bit.blue = buf[2];\n      png_ptr->sig_bit.alpha = buf[3];\n   }\n   else\n   {\n      png_ptr->sig_bit.gray = buf[0];\n      png_ptr->sig_bit.red = buf[0];\n      png_ptr->sig_bit.green = buf[0];\n      png_ptr->sig_bit.blue = buf[0];\n      png_ptr->sig_bit.alpha = buf[1];\n   }\n   png_set_sBIT(png_ptr, info_ptr, &(png_ptr->sig_bit));\n}\n#endif\n\n#ifdef PNG_READ_cHRM_SUPPORTED\nvoid /* PRIVATE */\npng_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_byte buf[32];\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y;\n#endif\n   png_fixed_point int_x_white, int_y_white, int_x_red, int_y_red, int_x_green,\n      int_y_green, int_x_blue, int_y_blue;\n\n   png_uint_32 uint_x, uint_y;\n\n   png_debug(1, \"in png_handle_cHRM\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before cHRM\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid cHRM after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (png_ptr->mode & PNG_HAVE_PLTE)\n      /* Should be an error, but we can cope with it */\n      png_warning(png_ptr, \"Missing PLTE before cHRM\");\n\n   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)\n#ifdef PNG_READ_sRGB_SUPPORTED\n      && !(info_ptr->valid & PNG_INFO_sRGB)\n#endif\n      )\n   {\n      png_warning(png_ptr, \"Duplicate cHRM chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (length != 32)\n   {\n      png_warning(png_ptr, \"Incorrect cHRM chunk length\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_crc_read(png_ptr, buf, 32);\n   if (png_crc_finish(png_ptr, 0))\n      return;\n\n   uint_x = png_get_uint_32(buf);\n   uint_y = png_get_uint_32(buf + 4);\n   int_x_white = (png_fixed_point)uint_x;\n   int_y_white = (png_fixed_point)uint_y;\n\n   uint_x = png_get_uint_32(buf + 8);\n   uint_y = png_get_uint_32(buf + 12);\n   int_x_red = (png_fixed_point)uint_x;\n   int_y_red = (png_fixed_point)uint_y;\n\n   uint_x = png_get_uint_32(buf + 16);\n   uint_y = png_get_uint_32(buf + 20);\n   int_x_green = (png_fixed_point)uint_x;\n   int_y_green = (png_fixed_point)uint_y;\n\n   uint_x = png_get_uint_32(buf + 24);\n   uint_y = png_get_uint_32(buf + 28);\n   int_x_blue = (png_fixed_point)uint_x;\n   int_y_blue = (png_fixed_point)uint_y;\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   white_x = (float)int_x_white / (float)100000.0;\n   white_y = (float)int_y_white / (float)100000.0;\n   red_x   = (float)int_x_red   / (float)100000.0;\n   red_y   = (float)int_y_red   / (float)100000.0;\n   green_x = (float)int_x_green / (float)100000.0;\n   green_y = (float)int_y_green / (float)100000.0;\n   blue_x  = (float)int_x_blue  / (float)100000.0;\n   blue_y  = (float)int_y_blue  / (float)100000.0;\n#endif\n\n#ifdef PNG_READ_sRGB_SUPPORTED\n   if ((info_ptr != NULL) && (info_ptr->valid & PNG_INFO_sRGB))\n      {\n      if (PNG_OUT_OF_RANGE(int_x_white, 31270,  1000) ||\n          PNG_OUT_OF_RANGE(int_y_white, 32900,  1000) ||\n          PNG_OUT_OF_RANGE(int_x_red,   64000L, 1000) ||\n          PNG_OUT_OF_RANGE(int_y_red,   33000,  1000) ||\n          PNG_OUT_OF_RANGE(int_x_green, 30000,  1000) ||\n          PNG_OUT_OF_RANGE(int_y_green, 60000L, 1000) ||\n          PNG_OUT_OF_RANGE(int_x_blue,  15000,  1000) ||\n          PNG_OUT_OF_RANGE(int_y_blue,   6000,  1000))\n         {\n            png_warning(png_ptr,\n              \"Ignoring incorrect cHRM value when sRGB is also present\");\n#ifdef PNG_CONSOLE_IO_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n            fprintf(stderr, \"wx=%f, wy=%f, rx=%f, ry=%f\\n\",\n               white_x, white_y, red_x, red_y);\n            fprintf(stderr, \"gx=%f, gy=%f, bx=%f, by=%f\\n\",\n               green_x, green_y, blue_x, blue_y);\n#else\n            fprintf(stderr, \"wx=%ld, wy=%ld, rx=%ld, ry=%ld\\n\",\n               (long)int_x_white, (long)int_y_white,\n               (long)int_x_red, (long)int_y_red);\n            fprintf(stderr, \"gx=%ld, gy=%ld, bx=%ld, by=%ld\\n\",\n               (long)int_x_green, (long)int_y_green,\n               (long)int_x_blue, (long)int_y_blue);\n#endif\n#endif /* PNG_CONSOLE_IO_SUPPORTED */\n         }\n         return;\n      }\n#endif /* PNG_READ_sRGB_SUPPORTED */\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   png_set_cHRM(png_ptr, info_ptr,\n      white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y);\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   png_set_cHRM_fixed(png_ptr, info_ptr,\n      int_x_white, int_y_white, int_x_red, int_y_red, int_x_green,\n      int_y_green, int_x_blue, int_y_blue);\n#endif\n}\n#endif\n\n#ifdef PNG_READ_sRGB_SUPPORTED\nvoid /* PRIVATE */\npng_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   int intent;\n   png_byte buf[1];\n\n   png_debug(1, \"in png_handle_sRGB\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before sRGB\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid sRGB after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (png_ptr->mode & PNG_HAVE_PLTE)\n      /* Should be an error, but we can cope with it */\n      png_warning(png_ptr, \"Out of place sRGB chunk\");\n\n   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB))\n   {\n      png_warning(png_ptr, \"Duplicate sRGB chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (length != 1)\n   {\n      png_warning(png_ptr, \"Incorrect sRGB chunk length\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_crc_read(png_ptr, buf, 1);\n   if (png_crc_finish(png_ptr, 0))\n      return;\n\n   intent = buf[0];\n   /* Check for bad intent */\n   if (intent >= PNG_sRGB_INTENT_LAST)\n   {\n      png_warning(png_ptr, \"Unknown sRGB intent\");\n      return;\n   }\n\n#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)\n   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA))\n   {\n   png_fixed_point igamma;\n#ifdef PNG_FIXED_POINT_SUPPORTED\n      igamma=info_ptr->int_gamma;\n#else\n#  ifdef PNG_FLOATING_POINT_SUPPORTED\n      igamma=(png_fixed_point)(info_ptr->gamma * 100000.);\n#  endif\n#endif\n      if (PNG_OUT_OF_RANGE(igamma, 45500L, 500))\n      {\n         png_warning(png_ptr,\n           \"Ignoring incorrect gAMA value when sRGB is also present\");\n#ifdef PNG_CONSOLE_IO_SUPPORTED\n#  ifdef PNG_FIXED_POINT_SUPPORTED\n         fprintf(stderr, \"incorrect gamma=(%d/100000)\\n\",\n            (int)png_ptr->int_gamma);\n#  else\n#    ifdef PNG_FLOATING_POINT_SUPPORTED\n         fprintf(stderr, \"incorrect gamma=%f\\n\", png_ptr->gamma);\n#    endif\n#  endif\n#endif\n      }\n   }\n#endif /* PNG_READ_gAMA_SUPPORTED */\n\n#ifdef PNG_READ_cHRM_SUPPORTED\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))\n      if (PNG_OUT_OF_RANGE(info_ptr->int_x_white, 31270,  1000) ||\n          PNG_OUT_OF_RANGE(info_ptr->int_y_white, 32900,  1000) ||\n          PNG_OUT_OF_RANGE(info_ptr->int_x_red,   64000L, 1000) ||\n          PNG_OUT_OF_RANGE(info_ptr->int_y_red,   33000,  1000) ||\n          PNG_OUT_OF_RANGE(info_ptr->int_x_green, 30000,  1000) ||\n          PNG_OUT_OF_RANGE(info_ptr->int_y_green, 60000L, 1000) ||\n          PNG_OUT_OF_RANGE(info_ptr->int_x_blue,  15000,  1000) ||\n          PNG_OUT_OF_RANGE(info_ptr->int_y_blue,   6000,  1000))\n         {\n            png_warning(png_ptr,\n              \"Ignoring incorrect cHRM value when sRGB is also present\");\n         }\n#endif /* PNG_FIXED_POINT_SUPPORTED */\n#endif /* PNG_READ_cHRM_SUPPORTED */\n\n   png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, intent);\n}\n#endif /* PNG_READ_sRGB_SUPPORTED */\n\n#ifdef PNG_READ_iCCP_SUPPORTED\nvoid /* PRIVATE */\npng_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n/* Note: this does not properly handle chunks that are > 64K under DOS */\n{\n   png_byte compression_type;\n   png_bytep pC;\n   png_charp profile;\n   png_uint_32 skip = 0;\n   png_uint_32 profile_size, profile_length;\n   png_size_t slength, prefix_length, data_length;\n\n   png_debug(1, \"in png_handle_iCCP\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before iCCP\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid iCCP after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (png_ptr->mode & PNG_HAVE_PLTE)\n      /* Should be an error, but we can cope with it */\n      png_warning(png_ptr, \"Out of place iCCP chunk\");\n\n   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP))\n   {\n      png_warning(png_ptr, \"Duplicate iCCP chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n#ifdef PNG_MAX_MALLOC_64K\n   if (length > (png_uint_32)65535L)\n   {\n      png_warning(png_ptr, \"iCCP chunk too large to fit in memory\");\n      skip = length - (png_uint_32)65535L;\n      length = (png_uint_32)65535L;\n   }\n#endif\n\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = (png_charp)png_malloc(png_ptr, length + 1);\n   slength = (png_size_t)length;\n   png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);\n\n   if (png_crc_finish(png_ptr, skip))\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   png_ptr->chunkdata[slength] = 0x00;\n\n   for (profile = png_ptr->chunkdata; *profile; profile++)\n      /* Empty loop to find end of name */ ;\n\n   ++profile;\n\n   /* There should be at least one zero (the compression type byte)\n    * following the separator, and we should be on it\n    */\n   if ( profile >= png_ptr->chunkdata + slength - 1)\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      png_warning(png_ptr, \"Malformed iCCP chunk\");\n      return;\n   }\n\n   /* Compression_type should always be zero */\n   compression_type = *profile++;\n   if (compression_type)\n   {\n      png_warning(png_ptr, \"Ignoring nonzero compression type in iCCP chunk\");\n      compression_type = 0x00;  /* Reset it to zero (libpng-1.0.6 through 1.0.8\n                                 wrote nonzero) */\n   }\n\n   prefix_length = profile - png_ptr->chunkdata;\n   png_decompress_chunk(png_ptr, compression_type,\n     slength, prefix_length, &data_length);\n\n   profile_length = data_length - prefix_length;\n\n   if ( prefix_length > data_length || profile_length < 4)\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      png_warning(png_ptr, \"Profile size field missing from iCCP chunk\");\n      return;\n   }\n\n   /* Check the profile_size recorded in the first 32 bits of the ICC profile */\n   pC = (png_bytep)(png_ptr->chunkdata + prefix_length);\n   profile_size = ((*(pC    ))<<24) |\n                  ((*(pC + 1))<<16) |\n                  ((*(pC + 2))<< 8) |\n                  ((*(pC + 3))    );\n\n   if (profile_size < profile_length)\n      profile_length = profile_size;\n\n   if (profile_size > profile_length)\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      png_warning(png_ptr, \"Ignoring truncated iCCP profile.\");\n      return;\n   }\n\n   png_set_iCCP(png_ptr, info_ptr, png_ptr->chunkdata,\n     compression_type, png_ptr->chunkdata + prefix_length, profile_length);\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = NULL;\n}\n#endif /* PNG_READ_iCCP_SUPPORTED */\n\n#ifdef PNG_READ_sPLT_SUPPORTED\nvoid /* PRIVATE */\npng_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n/* Note: this does not properly handle chunks that are > 64K under DOS */\n{\n   png_bytep entry_start;\n   png_sPLT_t new_palette;\n#ifdef PNG_POINTER_INDEXING_SUPPORTED\n   png_sPLT_entryp pp;\n#endif\n   int data_length, entry_size, i;\n   png_uint_32 skip = 0;\n   png_size_t slength;\n\n   png_debug(1, \"in png_handle_sPLT\");\n\n#ifdef PNG_USER_LIMITS_SUPPORTED\n\n   if (png_ptr->user_chunk_cache_max != 0)\n   {\n      if (png_ptr->user_chunk_cache_max == 1)\n      {\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n      if (--png_ptr->user_chunk_cache_max == 1)\n      {\n         png_warning(png_ptr, \"No space in chunk cache for sPLT\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n   }\n#endif\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before sPLT\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid sPLT after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n#ifdef PNG_MAX_MALLOC_64K\n   if (length > (png_uint_32)65535L)\n   {\n      png_warning(png_ptr, \"sPLT chunk too large to fit in memory\");\n      skip = length - (png_uint_32)65535L;\n      length = (png_uint_32)65535L;\n   }\n#endif\n\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = (png_charp)png_malloc(png_ptr, length + 1);\n   slength = (png_size_t)length;\n   png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);\n\n   if (png_crc_finish(png_ptr, skip))\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   png_ptr->chunkdata[slength] = 0x00;\n\n   for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start;\n       entry_start++)\n      /* Empty loop to find end of name */ ;\n   ++entry_start;\n\n   /* A sample depth should follow the separator, and we should be on it  */\n   if (entry_start > (png_bytep)png_ptr->chunkdata + slength - 2)\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      png_warning(png_ptr, \"malformed sPLT chunk\");\n      return;\n   }\n\n   new_palette.depth = *entry_start++;\n   entry_size = (new_palette.depth == 8 ? 6 : 10);\n   data_length = (slength - (entry_start - (png_bytep)png_ptr->chunkdata));\n\n   /* Integrity-check the data length */\n   if (data_length % entry_size)\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      png_warning(png_ptr, \"sPLT chunk has bad length\");\n      return;\n   }\n\n   new_palette.nentries = (png_int_32) ( data_length / entry_size);\n   if ((png_uint_32) new_palette.nentries >\n       (png_uint_32) (PNG_SIZE_MAX / png_sizeof(png_sPLT_entry)))\n   {\n       png_warning(png_ptr, \"sPLT chunk too long\");\n       return;\n   }\n   new_palette.entries = (png_sPLT_entryp)png_malloc_warn(\n       png_ptr, new_palette.nentries * png_sizeof(png_sPLT_entry));\n   if (new_palette.entries == NULL)\n   {\n       png_warning(png_ptr, \"sPLT chunk requires too much memory\");\n       return;\n   }\n\n#ifdef PNG_POINTER_INDEXING_SUPPORTED\n   for (i = 0; i < new_palette.nentries; i++)\n   {\n      pp = new_palette.entries + i;\n\n      if (new_palette.depth == 8)\n      {\n          pp->red = *entry_start++;\n          pp->green = *entry_start++;\n          pp->blue = *entry_start++;\n          pp->alpha = *entry_start++;\n      }\n      else\n      {\n          pp->red   = png_get_uint_16(entry_start); entry_start += 2;\n          pp->green = png_get_uint_16(entry_start); entry_start += 2;\n          pp->blue  = png_get_uint_16(entry_start); entry_start += 2;\n          pp->alpha = png_get_uint_16(entry_start); entry_start += 2;\n      }\n      pp->frequency = png_get_uint_16(entry_start); entry_start += 2;\n   }\n#else\n   pp = new_palette.entries;\n   for (i = 0; i < new_palette.nentries; i++)\n   {\n\n      if (new_palette.depth == 8)\n      {\n          pp[i].red   = *entry_start++;\n          pp[i].green = *entry_start++;\n          pp[i].blue  = *entry_start++;\n          pp[i].alpha = *entry_start++;\n      }\n      else\n      {\n          pp[i].red   = png_get_uint_16(entry_start); entry_start += 2;\n          pp[i].green = png_get_uint_16(entry_start); entry_start += 2;\n          pp[i].blue  = png_get_uint_16(entry_start); entry_start += 2;\n          pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2;\n      }\n      pp->frequency = png_get_uint_16(entry_start); entry_start += 2;\n   }\n#endif\n\n   /* Discard all chunk data except the name and stash that */\n   new_palette.name = png_ptr->chunkdata;\n\n   png_set_sPLT(png_ptr, info_ptr, &new_palette, 1);\n\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = NULL;\n   png_free(png_ptr, new_palette.entries);\n}\n#endif /* PNG_READ_sPLT_SUPPORTED */\n\n#ifdef PNG_READ_tRNS_SUPPORTED\nvoid /* PRIVATE */\npng_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_byte readbuf[PNG_MAX_PALETTE_LENGTH];\n\n   png_debug(1, \"in png_handle_tRNS\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before tRNS\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid tRNS after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))\n   {\n      png_warning(png_ptr, \"Duplicate tRNS chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)\n   {\n      png_byte buf[2];\n\n      if (length != 2)\n      {\n         png_warning(png_ptr, \"Incorrect tRNS chunk length\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n\n      png_crc_read(png_ptr, buf, 2);\n      png_ptr->num_trans = 1;\n      png_ptr->trans_values.gray = png_get_uint_16(buf);\n   }\n   else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)\n   {\n      png_byte buf[6];\n\n      if (length != 6)\n      {\n         png_warning(png_ptr, \"Incorrect tRNS chunk length\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n      png_crc_read(png_ptr, buf, (png_size_t)length);\n      png_ptr->num_trans = 1;\n      png_ptr->trans_values.red = png_get_uint_16(buf);\n      png_ptr->trans_values.green = png_get_uint_16(buf + 2);\n      png_ptr->trans_values.blue = png_get_uint_16(buf + 4);\n   }\n   else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n   {\n      if (!(png_ptr->mode & PNG_HAVE_PLTE))\n      {\n         /* Should be an error, but we can cope with it. */\n         png_warning(png_ptr, \"Missing PLTE before tRNS\");\n      }\n      if (length > (png_uint_32)png_ptr->num_palette ||\n          length > PNG_MAX_PALETTE_LENGTH)\n      {\n         png_warning(png_ptr, \"Incorrect tRNS chunk length\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n      if (length == 0)\n      {\n         png_warning(png_ptr, \"Zero length tRNS chunk\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n      png_crc_read(png_ptr, readbuf, (png_size_t)length);\n      png_ptr->num_trans = (png_uint_16)length;\n   }\n   else\n   {\n      png_warning(png_ptr, \"tRNS chunk not allowed with alpha channel\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (png_crc_finish(png_ptr, 0))\n   {\n      png_ptr->num_trans = 0;\n      return;\n   }\n\n   png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans,\n      &(png_ptr->trans_values));\n}\n#endif\n\n#ifdef PNG_READ_bKGD_SUPPORTED\nvoid /* PRIVATE */\npng_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_size_t truelen;\n   png_byte buf[6];\n\n   png_debug(1, \"in png_handle_bKGD\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before bKGD\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid bKGD after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&\n            !(png_ptr->mode & PNG_HAVE_PLTE))\n   {\n      png_warning(png_ptr, \"Missing PLTE before bKGD\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD))\n   {\n      png_warning(png_ptr, \"Duplicate bKGD chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      truelen = 1;\n   else if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)\n      truelen = 6;\n   else\n      truelen = 2;\n\n   if (length != truelen)\n   {\n      png_warning(png_ptr, \"Incorrect bKGD chunk length\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_crc_read(png_ptr, buf, truelen);\n   if (png_crc_finish(png_ptr, 0))\n      return;\n\n   /* We convert the index value into RGB components so that we can allow\n    * arbitrary RGB values for background when we have transparency, and\n    * so it is easy to determine the RGB values of the background color\n    * from the info_ptr struct. */\n   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n   {\n      png_ptr->background.index = buf[0];\n      if (info_ptr && info_ptr->num_palette)\n      {\n          if (buf[0] >= info_ptr->num_palette)\n          {\n             png_warning(png_ptr, \"Incorrect bKGD chunk index value\");\n             return;\n          }\n          png_ptr->background.red =\n             (png_uint_16)png_ptr->palette[buf[0]].red;\n          png_ptr->background.green =\n             (png_uint_16)png_ptr->palette[buf[0]].green;\n          png_ptr->background.blue =\n             (png_uint_16)png_ptr->palette[buf[0]].blue;\n      }\n   }\n   else if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) /* GRAY */\n   {\n      png_ptr->background.red =\n      png_ptr->background.green =\n      png_ptr->background.blue =\n      png_ptr->background.gray = png_get_uint_16(buf);\n   }\n   else\n   {\n      png_ptr->background.red = png_get_uint_16(buf);\n      png_ptr->background.green = png_get_uint_16(buf + 2);\n      png_ptr->background.blue = png_get_uint_16(buf + 4);\n   }\n\n   png_set_bKGD(png_ptr, info_ptr, &(png_ptr->background));\n}\n#endif\n\n#ifdef PNG_READ_hIST_SUPPORTED\nvoid /* PRIVATE */\npng_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   unsigned int num, i;\n   png_uint_16 readbuf[PNG_MAX_PALETTE_LENGTH];\n\n   png_debug(1, \"in png_handle_hIST\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before hIST\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid hIST after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (!(png_ptr->mode & PNG_HAVE_PLTE))\n   {\n      png_warning(png_ptr, \"Missing PLTE before hIST\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST))\n   {\n      png_warning(png_ptr, \"Duplicate hIST chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   num = length / 2 ;\n   if (num != (unsigned int) png_ptr->num_palette || num >\n      (unsigned int) PNG_MAX_PALETTE_LENGTH)\n   {\n      png_warning(png_ptr, \"Incorrect hIST chunk length\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   for (i = 0; i < num; i++)\n   {\n      png_byte buf[2];\n\n      png_crc_read(png_ptr, buf, 2);\n      readbuf[i] = png_get_uint_16(buf);\n   }\n\n   if (png_crc_finish(png_ptr, 0))\n      return;\n\n   png_set_hIST(png_ptr, info_ptr, readbuf);\n}\n#endif\n\n#ifdef PNG_READ_pHYs_SUPPORTED\nvoid /* PRIVATE */\npng_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_byte buf[9];\n   png_uint_32 res_x, res_y;\n   int unit_type;\n\n   png_debug(1, \"in png_handle_pHYs\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before pHYs\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid pHYs after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))\n   {\n      png_warning(png_ptr, \"Duplicate pHYs chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (length != 9)\n   {\n      png_warning(png_ptr, \"Incorrect pHYs chunk length\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_crc_read(png_ptr, buf, 9);\n   if (png_crc_finish(png_ptr, 0))\n      return;\n\n   res_x = png_get_uint_32(buf);\n   res_y = png_get_uint_32(buf + 4);\n   unit_type = buf[8];\n   png_set_pHYs(png_ptr, info_ptr, res_x, res_y, unit_type);\n}\n#endif\n\n#ifdef PNG_READ_oFFs_SUPPORTED\nvoid /* PRIVATE */\npng_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_byte buf[9];\n   png_int_32 offset_x, offset_y;\n   int unit_type;\n\n   png_debug(1, \"in png_handle_oFFs\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before oFFs\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid oFFs after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs))\n   {\n      png_warning(png_ptr, \"Duplicate oFFs chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (length != 9)\n   {\n      png_warning(png_ptr, \"Incorrect oFFs chunk length\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_crc_read(png_ptr, buf, 9);\n   if (png_crc_finish(png_ptr, 0))\n      return;\n\n   offset_x = png_get_int_32(buf);\n   offset_y = png_get_int_32(buf + 4);\n   unit_type = buf[8];\n   png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, unit_type);\n}\n#endif\n\n#ifdef PNG_READ_pCAL_SUPPORTED\n/* Read the pCAL chunk (described in the PNG Extensions document) */\nvoid /* PRIVATE */\npng_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_int_32 X0, X1;\n   png_byte type, nparams;\n   png_charp buf, units, endptr;\n   png_charpp params;\n   png_size_t slength;\n   int i;\n\n   png_debug(1, \"in png_handle_pCAL\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before pCAL\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid pCAL after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL))\n   {\n      png_warning(png_ptr, \"Duplicate pCAL chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_debug1(2, \"Allocating and reading pCAL chunk data (%lu bytes)\",\n      length + 1);\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);\n   if (png_ptr->chunkdata == NULL)\n     {\n       png_warning(png_ptr, \"No memory for pCAL purpose.\");\n       return;\n     }\n   slength = (png_size_t)length;\n   png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);\n\n   if (png_crc_finish(png_ptr, 0))\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */\n\n   png_debug(3, \"Finding end of pCAL purpose string\");\n   for (buf = png_ptr->chunkdata; *buf; buf++)\n      /* Empty loop */ ;\n\n   endptr = png_ptr->chunkdata + slength;\n\n   /* We need to have at least 12 bytes after the purpose string\n      in order to get the parameter information. */\n   if (endptr <= buf + 12)\n   {\n      png_warning(png_ptr, \"Invalid pCAL data\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   png_debug(3, \"Reading pCAL X0, X1, type, nparams, and units\");\n   X0 = png_get_int_32((png_bytep)buf+1);\n   X1 = png_get_int_32((png_bytep)buf+5);\n   type = buf[9];\n   nparams = buf[10];\n   units = buf + 11;\n\n   png_debug(3, \"Checking pCAL equation type and number of parameters\");\n   /* Check that we have the right number of parameters for known\n      equation types. */\n   if ((type == PNG_EQUATION_LINEAR && nparams != 2) ||\n       (type == PNG_EQUATION_BASE_E && nparams != 3) ||\n       (type == PNG_EQUATION_ARBITRARY && nparams != 3) ||\n       (type == PNG_EQUATION_HYPERBOLIC && nparams != 4))\n   {\n      png_warning(png_ptr, \"Invalid pCAL parameters for equation type\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n   else if (type >= PNG_EQUATION_LAST)\n   {\n      png_warning(png_ptr, \"Unrecognized equation type for pCAL chunk\");\n   }\n\n   for (buf = units; *buf; buf++)\n      /* Empty loop to move past the units string. */ ;\n\n   png_debug(3, \"Allocating pCAL parameters array\");\n   params = (png_charpp)png_malloc_warn(png_ptr,\n      (png_uint_32)(nparams * png_sizeof(png_charp))) ;\n   if (params == NULL)\n     {\n       png_free(png_ptr, png_ptr->chunkdata);\n       png_ptr->chunkdata = NULL;\n       png_warning(png_ptr, \"No memory for pCAL params.\");\n       return;\n     }\n\n   /* Get pointers to the start of each parameter string. */\n   for (i = 0; i < (int)nparams; i++)\n   {\n      buf++; /* Skip the null string terminator from previous parameter. */\n\n      png_debug1(3, \"Reading pCAL parameter %d\", i);\n      for (params[i] = buf; buf <= endptr && *buf != 0x00; buf++)\n         /* Empty loop to move past each parameter string */ ;\n\n      /* Make sure we haven't run out of data yet */\n      if (buf > endptr)\n      {\n         png_warning(png_ptr, \"Invalid pCAL data\");\n         png_free(png_ptr, png_ptr->chunkdata);\n         png_ptr->chunkdata = NULL;\n         png_free(png_ptr, params);\n         return;\n      }\n   }\n\n   png_set_pCAL(png_ptr, info_ptr, png_ptr->chunkdata, X0, X1, type, nparams,\n      units, params);\n\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = NULL;\n   png_free(png_ptr, params);\n}\n#endif\n\n#ifdef PNG_READ_sCAL_SUPPORTED\n/* Read the sCAL chunk */\nvoid /* PRIVATE */\npng_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_charp ep;\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   double width, height;\n   png_charp vp;\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   png_charp swidth, sheight;\n#endif\n#endif\n   png_size_t slength;\n\n   png_debug(1, \"in png_handle_sCAL\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before sCAL\");\n   else if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n      png_warning(png_ptr, \"Invalid sCAL after IDAT\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL))\n   {\n      png_warning(png_ptr, \"Duplicate sCAL chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_debug1(2, \"Allocating and reading sCAL chunk data (%lu bytes)\",\n      length + 1);\n   png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);\n   if (png_ptr->chunkdata == NULL)\n   {\n      png_warning(png_ptr, \"Out of memory while processing sCAL chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n   slength = (png_size_t)length;\n   png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);\n\n   if (png_crc_finish(png_ptr, 0))\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */\n\n   ep = png_ptr->chunkdata + 1;        /* Skip unit byte */\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   width = png_strtod(png_ptr, ep, &vp);\n   if (*vp)\n   {\n      png_warning(png_ptr, \"malformed width string in sCAL chunk\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   swidth = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1);\n   if (swidth == NULL)\n   {\n      png_warning(png_ptr, \"Out of memory while processing sCAL chunk width\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n   png_memcpy(swidth, ep, (png_size_t)png_strlen(ep));\n#endif\n#endif\n\n   for (ep = png_ptr->chunkdata; *ep; ep++)\n      /* Empty loop */ ;\n   ep++;\n\n   if (png_ptr->chunkdata + slength < ep)\n   {\n      png_warning(png_ptr, \"Truncated sCAL chunk\");\n#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)\n      png_free(png_ptr, swidth);\n#endif\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   height = png_strtod(png_ptr, ep, &vp);\n   if (*vp)\n   {\n      png_warning(png_ptr, \"malformed height string in sCAL chunk\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)\n      png_free(png_ptr, swidth);\n#endif\n      return;\n   }\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   sheight = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1);\n   if (sheight == NULL)\n   {\n      png_warning(png_ptr, \"Out of memory while processing sCAL chunk height\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)\n      png_free(png_ptr, swidth);\n#endif\n      return;\n   }\n   png_memcpy(sheight, ep, (png_size_t)png_strlen(ep));\n#endif\n#endif\n\n   if (png_ptr->chunkdata + slength < ep\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n      || width <= 0. || height <= 0.\n#endif\n      )\n   {\n      png_warning(png_ptr, \"Invalid sCAL data\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)\n      png_free(png_ptr, swidth);\n      png_free(png_ptr, sheight);\n#endif\n      return;\n   }\n\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   png_set_sCAL(png_ptr, info_ptr, png_ptr->chunkdata[0], width, height);\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   png_set_sCAL_s(png_ptr, info_ptr, png_ptr->chunkdata[0], swidth, sheight);\n#endif\n#endif\n\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = NULL;\n#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)\n   png_free(png_ptr, swidth);\n   png_free(png_ptr, sheight);\n#endif\n}\n#endif\n\n#ifdef PNG_READ_tIME_SUPPORTED\nvoid /* PRIVATE */\npng_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_byte buf[7];\n   png_time mod_time;\n\n   png_debug(1, \"in png_handle_tIME\");\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Out of place tIME chunk\");\n   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME))\n   {\n      png_warning(png_ptr, \"Duplicate tIME chunk\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   if (png_ptr->mode & PNG_HAVE_IDAT)\n      png_ptr->mode |= PNG_AFTER_IDAT;\n\n   if (length != 7)\n   {\n      png_warning(png_ptr, \"Incorrect tIME chunk length\");\n      png_crc_finish(png_ptr, length);\n      return;\n   }\n\n   png_crc_read(png_ptr, buf, 7);\n   if (png_crc_finish(png_ptr, 0))\n      return;\n\n   mod_time.second = buf[6];\n   mod_time.minute = buf[5];\n   mod_time.hour = buf[4];\n   mod_time.day = buf[3];\n   mod_time.month = buf[2];\n   mod_time.year = png_get_uint_16(buf);\n\n   png_set_tIME(png_ptr, info_ptr, &mod_time);\n}\n#endif\n\n#ifdef PNG_READ_tEXt_SUPPORTED\n/* Note: this does not properly handle chunks that are > 64K under DOS */\nvoid /* PRIVATE */\npng_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_textp text_ptr;\n   png_charp key;\n   png_charp text;\n   png_uint_32 skip = 0;\n   png_size_t slength;\n   int ret;\n\n   png_debug(1, \"in png_handle_tEXt\");\n\n#ifdef PNG_USER_LIMITS_SUPPORTED\n   if (png_ptr->user_chunk_cache_max != 0)\n   {\n      if (png_ptr->user_chunk_cache_max == 1)\n      {\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n      if (--png_ptr->user_chunk_cache_max == 1)\n      {\n         png_warning(png_ptr, \"No space in chunk cache for tEXt\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n   }\n#endif\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before tEXt\");\n\n   if (png_ptr->mode & PNG_HAVE_IDAT)\n      png_ptr->mode |= PNG_AFTER_IDAT;\n\n#ifdef PNG_MAX_MALLOC_64K\n   if (length > (png_uint_32)65535L)\n   {\n      png_warning(png_ptr, \"tEXt chunk too large to fit in memory\");\n      skip = length - (png_uint_32)65535L;\n      length = (png_uint_32)65535L;\n   }\n#endif\n\n   png_free(png_ptr, png_ptr->chunkdata);\n\n   png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);\n   if (png_ptr->chunkdata == NULL)\n   {\n     png_warning(png_ptr, \"No memory to process text chunk.\");\n     return;\n   }\n   slength = (png_size_t)length;\n   png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);\n\n   if (png_crc_finish(png_ptr, skip))\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   key = png_ptr->chunkdata;\n\n   key[slength] = 0x00;\n\n   for (text = key; *text; text++)\n      /* Empty loop to find end of key */ ;\n\n   if (text != key + slength)\n      text++;\n\n   text_ptr = (png_textp)png_malloc_warn(png_ptr,\n      (png_uint_32)png_sizeof(png_text));\n   if (text_ptr == NULL)\n   {\n     png_warning(png_ptr, \"Not enough memory to process text chunk.\");\n     png_free(png_ptr, png_ptr->chunkdata);\n     png_ptr->chunkdata = NULL;\n     return;\n   }\n   text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;\n   text_ptr->key = key;\n#ifdef PNG_iTXt_SUPPORTED\n   text_ptr->lang = NULL;\n   text_ptr->lang_key = NULL;\n   text_ptr->itxt_length = 0;\n#endif\n   text_ptr->text = text;\n   text_ptr->text_length = png_strlen(text);\n\n   ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);\n\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = NULL;\n   png_free(png_ptr, text_ptr);\n   if (ret)\n     png_warning(png_ptr, \"Insufficient memory to process text chunk.\");\n}\n#endif\n\n#ifdef PNG_READ_zTXt_SUPPORTED\n/* Note: this does not correctly handle chunks that are > 64K under DOS */\nvoid /* PRIVATE */\npng_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_textp text_ptr;\n   png_charp text;\n   int comp_type;\n   int ret;\n   png_size_t slength, prefix_len, data_len;\n\n   png_debug(1, \"in png_handle_zTXt\");\n\n#ifdef PNG_USER_LIMITS_SUPPORTED\n   if (png_ptr->user_chunk_cache_max != 0)\n   {\n      if (png_ptr->user_chunk_cache_max == 1)\n      {\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n      if (--png_ptr->user_chunk_cache_max == 1)\n      {\n         png_warning(png_ptr, \"No space in chunk cache for zTXt\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n   }\n#endif\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before zTXt\");\n\n   if (png_ptr->mode & PNG_HAVE_IDAT)\n      png_ptr->mode |= PNG_AFTER_IDAT;\n\n#ifdef PNG_MAX_MALLOC_64K\n   /* We will no doubt have problems with chunks even half this size, but\n      there is no hard and fast rule to tell us where to stop. */\n   if (length > (png_uint_32)65535L)\n   {\n     png_warning(png_ptr, \"zTXt chunk too large to fit in memory\");\n     png_crc_finish(png_ptr, length);\n     return;\n   }\n#endif\n\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);\n   if (png_ptr->chunkdata == NULL)\n   {\n     png_warning(png_ptr, \"Out of memory processing zTXt chunk.\");\n     return;\n   }\n   slength = (png_size_t)length;\n   png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);\n   if (png_crc_finish(png_ptr, 0))\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   png_ptr->chunkdata[slength] = 0x00;\n\n   for (text = png_ptr->chunkdata; *text; text++)\n      /* Empty loop */ ;\n\n   /* zTXt must have some text after the chunkdataword */\n   if (text >= png_ptr->chunkdata + slength - 2)\n   {\n      png_warning(png_ptr, \"Truncated zTXt chunk\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n   else\n   {\n       comp_type = *(++text);\n       if (comp_type != PNG_TEXT_COMPRESSION_zTXt)\n       {\n          png_warning(png_ptr, \"Unknown compression type in zTXt chunk\");\n          comp_type = PNG_TEXT_COMPRESSION_zTXt;\n       }\n       text++;        /* Skip the compression_method byte */\n   }\n   prefix_len = text - png_ptr->chunkdata;\n\n   png_decompress_chunk(png_ptr, comp_type,\n     (png_size_t)length, prefix_len, &data_len);\n\n   text_ptr = (png_textp)png_malloc_warn(png_ptr,\n      (png_uint_32)png_sizeof(png_text));\n   if (text_ptr == NULL)\n   {\n     png_warning(png_ptr, \"Not enough memory to process zTXt chunk.\");\n     png_free(png_ptr, png_ptr->chunkdata);\n     png_ptr->chunkdata = NULL;\n     return;\n   }\n   text_ptr->compression = comp_type;\n   text_ptr->key = png_ptr->chunkdata;\n#ifdef PNG_iTXt_SUPPORTED\n   text_ptr->lang = NULL;\n   text_ptr->lang_key = NULL;\n   text_ptr->itxt_length = 0;\n#endif\n   text_ptr->text = png_ptr->chunkdata + prefix_len;\n   text_ptr->text_length = data_len;\n\n   ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);\n\n   png_free(png_ptr, text_ptr);\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = NULL;\n   if (ret)\n     png_error(png_ptr, \"Insufficient memory to store zTXt chunk.\");\n}\n#endif\n\n#ifdef PNG_READ_iTXt_SUPPORTED\n/* Note: this does not correctly handle chunks that are > 64K under DOS */\nvoid /* PRIVATE */\npng_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_textp text_ptr;\n   png_charp key, lang, text, lang_key;\n   int comp_flag;\n   int comp_type = 0;\n   int ret;\n   png_size_t slength, prefix_len, data_len;\n\n   png_debug(1, \"in png_handle_iTXt\");\n\n#ifdef PNG_USER_LIMITS_SUPPORTED\n   if (png_ptr->user_chunk_cache_max != 0)\n   {\n      if (png_ptr->user_chunk_cache_max == 1)\n      {\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n      if (--png_ptr->user_chunk_cache_max == 1)\n      {\n         png_warning(png_ptr, \"No space in chunk cache for iTXt\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n   }\n#endif\n\n   if (!(png_ptr->mode & PNG_HAVE_IHDR))\n      png_error(png_ptr, \"Missing IHDR before iTXt\");\n\n   if (png_ptr->mode & PNG_HAVE_IDAT)\n      png_ptr->mode |= PNG_AFTER_IDAT;\n\n#ifdef PNG_MAX_MALLOC_64K\n   /* We will no doubt have problems with chunks even half this size, but\n      there is no hard and fast rule to tell us where to stop. */\n   if (length > (png_uint_32)65535L)\n   {\n     png_warning(png_ptr, \"iTXt chunk too large to fit in memory\");\n     png_crc_finish(png_ptr, length);\n     return;\n   }\n#endif\n\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);\n   if (png_ptr->chunkdata == NULL)\n   {\n     png_warning(png_ptr, \"No memory to process iTXt chunk.\");\n     return;\n   }\n   slength = (png_size_t)length;\n   png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);\n   if (png_crc_finish(png_ptr, 0))\n   {\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   png_ptr->chunkdata[slength] = 0x00;\n\n   for (lang = png_ptr->chunkdata; *lang; lang++)\n      /* Empty loop */ ;\n   lang++;        /* Skip NUL separator */\n\n   /* iTXt must have a language tag (possibly empty), two compression bytes,\n    * translated keyword (possibly empty), and possibly some text after the\n    * keyword\n    */\n\n   if (lang >= png_ptr->chunkdata + slength - 3)\n   {\n      png_warning(png_ptr, \"Truncated iTXt chunk\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n   else\n   {\n       comp_flag = *lang++;\n       comp_type = *lang++;\n   }\n\n   for (lang_key = lang; *lang_key; lang_key++)\n      /* Empty loop */ ;\n   lang_key++;        /* Skip NUL separator */\n\n   if (lang_key >= png_ptr->chunkdata + slength)\n   {\n      png_warning(png_ptr, \"Truncated iTXt chunk\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   for (text = lang_key; *text; text++)\n      /* Empty loop */ ;\n   text++;        /* Skip NUL separator */\n   if (text >= png_ptr->chunkdata + slength)\n   {\n      png_warning(png_ptr, \"Malformed iTXt chunk\");\n      png_free(png_ptr, png_ptr->chunkdata);\n      png_ptr->chunkdata = NULL;\n      return;\n   }\n\n   prefix_len = text - png_ptr->chunkdata;\n\n   key=png_ptr->chunkdata;\n   if (comp_flag)\n       png_decompress_chunk(png_ptr, comp_type,\n         (size_t)length, prefix_len, &data_len);\n   else\n       data_len = png_strlen(png_ptr->chunkdata + prefix_len);\n   text_ptr = (png_textp)png_malloc_warn(png_ptr,\n      (png_uint_32)png_sizeof(png_text));\n   if (text_ptr == NULL)\n   {\n     png_warning(png_ptr, \"Not enough memory to process iTXt chunk.\");\n     png_free(png_ptr, png_ptr->chunkdata);\n     png_ptr->chunkdata = NULL;\n     return;\n   }\n   text_ptr->compression = (int)comp_flag + 1;\n   text_ptr->lang_key = png_ptr->chunkdata + (lang_key - key);\n   text_ptr->lang = png_ptr->chunkdata + (lang - key);\n   text_ptr->itxt_length = data_len;\n   text_ptr->text_length = 0;\n   text_ptr->key = png_ptr->chunkdata;\n   text_ptr->text = png_ptr->chunkdata + prefix_len;\n\n   ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);\n\n   png_free(png_ptr, text_ptr);\n   png_free(png_ptr, png_ptr->chunkdata);\n   png_ptr->chunkdata = NULL;\n   if (ret)\n     png_error(png_ptr, \"Insufficient memory to store iTXt chunk.\");\n}\n#endif\n\n/* This function is called when we haven't found a handler for a\n   chunk.  If there isn't a problem with the chunk itself (ie bad\n   chunk name, CRC, or a critical chunk), the chunk is silently ignored\n   -- unless the PNG_FLAG_UNKNOWN_CHUNKS_SUPPORTED flag is on in which\n   case it will be saved away to be written out later. */\nvoid /* PRIVATE */\npng_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)\n{\n   png_uint_32 skip = 0;\n\n   png_debug(1, \"in png_handle_unknown\");\n\n#ifdef PNG_USER_LIMITS_SUPPORTED\n   if (png_ptr->user_chunk_cache_max != 0)\n   {\n      if (png_ptr->user_chunk_cache_max == 1)\n      {\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n      if (--png_ptr->user_chunk_cache_max == 1)\n      {\n         png_warning(png_ptr, \"No space in chunk cache for unknown chunk\");\n         png_crc_finish(png_ptr, length);\n         return;\n      }\n   }\n#endif\n\n   if (png_ptr->mode & PNG_HAVE_IDAT)\n   {\n#ifdef PNG_USE_LOCAL_ARRAYS\n      PNG_CONST PNG_IDAT;\n#endif\n      if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))  /* Not an IDAT */\n         png_ptr->mode |= PNG_AFTER_IDAT;\n   }\n\n   if (!(png_ptr->chunk_name[0] & 0x20))\n   {\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n      if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=\n           PNG_HANDLE_CHUNK_ALWAYS\n#ifdef PNG_READ_USER_CHUNKS_SUPPORTED\n           && png_ptr->read_user_chunk_fn == NULL\n#endif\n        )\n#endif\n          png_chunk_error(png_ptr, \"unknown critical chunk\");\n   }\n\n#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED\n   if ((png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)\n#ifdef PNG_READ_USER_CHUNKS_SUPPORTED\n       || (png_ptr->read_user_chunk_fn != NULL)\n#endif\n        )\n   {\n#ifdef PNG_MAX_MALLOC_64K\n       if (length > (png_uint_32)65535L)\n       {\n           png_warning(png_ptr, \"unknown chunk too large to fit in memory\");\n           skip = length - (png_uint_32)65535L;\n           length = (png_uint_32)65535L;\n       }\n#endif\n       png_memcpy((png_charp)png_ptr->unknown_chunk.name,\n                  (png_charp)png_ptr->chunk_name,\n                  png_sizeof(png_ptr->unknown_chunk.name));\n       png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1]\n           = '\\0';\n       png_ptr->unknown_chunk.size = (png_size_t)length;\n       if (length == 0)\n         png_ptr->unknown_chunk.data = NULL;\n       else\n       {\n         png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length);\n         png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);\n       }\n#ifdef PNG_READ_USER_CHUNKS_SUPPORTED\n       if (png_ptr->read_user_chunk_fn != NULL)\n       {\n          /* Callback to user unknown chunk handler */\n          int ret;\n          ret = (*(png_ptr->read_user_chunk_fn))\n            (png_ptr, &png_ptr->unknown_chunk);\n          if (ret < 0)\n             png_chunk_error(png_ptr, \"error in user chunk\");\n          if (ret == 0)\n          {\n             if (!(png_ptr->chunk_name[0] & 0x20))\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n                if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=\n                     PNG_HANDLE_CHUNK_ALWAYS)\n#endif\n                   png_chunk_error(png_ptr, \"unknown critical chunk\");\n             png_set_unknown_chunks(png_ptr, info_ptr,\n               &png_ptr->unknown_chunk, 1);\n          }\n       }\n       else\n#endif\n       png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);\n       png_free(png_ptr, png_ptr->unknown_chunk.data);\n       png_ptr->unknown_chunk.data = NULL;\n   }\n   else\n#endif\n      skip = length;\n\n   png_crc_finish(png_ptr, skip);\n\n#ifndef PNG_READ_USER_CHUNKS_SUPPORTED\n   info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */\n#endif\n}\n\n/* This function is called to verify that a chunk name is valid.\n   This function can't have the \"critical chunk check\" incorporated\n   into it, since in the future we will need to be able to call user\n   functions to handle unknown critical chunks after we check that\n   the chunk name itself is valid. */\n\n#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))\n\nvoid /* PRIVATE */\npng_check_chunk_name(png_structp png_ptr, png_bytep chunk_name)\n{\n   png_debug(1, \"in png_check_chunk_name\");\n   if (isnonalpha(chunk_name[0]) || isnonalpha(chunk_name[1]) ||\n       isnonalpha(chunk_name[2]) || isnonalpha(chunk_name[3]))\n   {\n      png_chunk_error(png_ptr, \"invalid chunk type\");\n   }\n}\n\n/* Combines the row recently read in with the existing pixels in the\n   row.  This routine takes care of alpha and transparency if requested.\n   This routine also handles the two methods of progressive display\n   of interlaced images, depending on the mask value.\n   The mask value describes which pixels are to be combined with\n   the row.  The pattern always repeats every 8 pixels, so just 8\n   bits are needed.  A one indicates the pixel is to be combined,\n   a zero indicates the pixel is to be skipped.  This is in addition\n   to any alpha or transparency value associated with the pixel.  If\n   you want all pixels to be combined, pass 0xff (255) in mask.  */\n\nvoid /* PRIVATE */\npng_combine_row(png_structp png_ptr, png_bytep row, int mask)\n{\n   png_debug(1, \"in png_combine_row\");\n   if (mask == 0xff)\n   {\n      png_memcpy(row, png_ptr->row_buf + 1,\n         PNG_ROWBYTES(png_ptr->row_info.pixel_depth, png_ptr->width));\n   }\n   else\n   {\n      switch (png_ptr->row_info.pixel_depth)\n      {\n         case 1:\n         {\n            png_bytep sp = png_ptr->row_buf + 1;\n            png_bytep dp = row;\n            int s_inc, s_start, s_end;\n            int m = 0x80;\n            int shift;\n            png_uint_32 i;\n            png_uint_32 row_width = png_ptr->width;\n\n#ifdef PNG_READ_PACKSWAP_SUPPORTED\n            if (png_ptr->transformations & PNG_PACKSWAP)\n            {\n                s_start = 0;\n                s_end = 7;\n                s_inc = 1;\n            }\n            else\n#endif\n            {\n                s_start = 7;\n                s_end = 0;\n                s_inc = -1;\n            }\n\n            shift = s_start;\n\n            for (i = 0; i < row_width; i++)\n            {\n               if (m & mask)\n               {\n                  int value;\n\n                  value = (*sp >> shift) & 0x01;\n                  *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);\n                  *dp |= (png_byte)(value << shift);\n               }\n\n               if (shift == s_end)\n               {\n                  shift = s_start;\n                  sp++;\n                  dp++;\n               }\n               else\n                  shift += s_inc;\n\n               if (m == 1)\n                  m = 0x80;\n               else\n                  m >>= 1;\n            }\n            break;\n         }\n         case 2:\n         {\n            png_bytep sp = png_ptr->row_buf + 1;\n            png_bytep dp = row;\n            int s_start, s_end, s_inc;\n            int m = 0x80;\n            int shift;\n            png_uint_32 i;\n            png_uint_32 row_width = png_ptr->width;\n            int value;\n\n#ifdef PNG_READ_PACKSWAP_SUPPORTED\n            if (png_ptr->transformations & PNG_PACKSWAP)\n            {\n               s_start = 0;\n               s_end = 6;\n               s_inc = 2;\n            }\n            else\n#endif\n            {\n               s_start = 6;\n               s_end = 0;\n               s_inc = -2;\n            }\n\n            shift = s_start;\n\n            for (i = 0; i < row_width; i++)\n            {\n               if (m & mask)\n               {\n                  value = (*sp >> shift) & 0x03;\n                  *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);\n                  *dp |= (png_byte)(value << shift);\n               }\n\n               if (shift == s_end)\n               {\n                  shift = s_start;\n                  sp++;\n                  dp++;\n               }\n               else\n                  shift += s_inc;\n               if (m == 1)\n                  m = 0x80;\n               else\n                  m >>= 1;\n            }\n            break;\n         }\n         case 4:\n         {\n            png_bytep sp = png_ptr->row_buf + 1;\n            png_bytep dp = row;\n            int s_start, s_end, s_inc;\n            int m = 0x80;\n            int shift;\n            png_uint_32 i;\n            png_uint_32 row_width = png_ptr->width;\n            int value;\n\n#ifdef PNG_READ_PACKSWAP_SUPPORTED\n            if (png_ptr->transformations & PNG_PACKSWAP)\n            {\n               s_start = 0;\n               s_end = 4;\n               s_inc = 4;\n            }\n            else\n#endif\n            {\n               s_start = 4;\n               s_end = 0;\n               s_inc = -4;\n            }\n            shift = s_start;\n\n            for (i = 0; i < row_width; i++)\n            {\n               if (m & mask)\n               {\n                  value = (*sp >> shift) & 0xf;\n                  *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);\n                  *dp |= (png_byte)(value << shift);\n               }\n\n               if (shift == s_end)\n               {\n                  shift = s_start;\n                  sp++;\n                  dp++;\n               }\n               else\n                  shift += s_inc;\n               if (m == 1)\n                  m = 0x80;\n               else\n                  m >>= 1;\n            }\n            break;\n         }\n         default:\n         {\n            png_bytep sp = png_ptr->row_buf + 1;\n            png_bytep dp = row;\n            png_size_t pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);\n            png_uint_32 i;\n            png_uint_32 row_width = png_ptr->width;\n            png_byte m = 0x80;\n\n\n            for (i = 0; i < row_width; i++)\n            {\n               if (m & mask)\n               {\n                  png_memcpy(dp, sp, pixel_bytes);\n               }\n\n               sp += pixel_bytes;\n               dp += pixel_bytes;\n\n               if (m == 1)\n                  m = 0x80;\n               else\n                  m >>= 1;\n            }\n            break;\n         }\n      }\n   }\n}\n\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n/* OLD pre-1.0.9 interface:\nvoid png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,\n   png_uint_32 transformations)\n */\nvoid /* PRIVATE */\npng_do_read_interlace(png_structp png_ptr)\n{\n   png_row_infop row_info = &(png_ptr->row_info);\n   png_bytep row = png_ptr->row_buf + 1;\n   int pass = png_ptr->pass;\n   png_uint_32 transformations = png_ptr->transformations;\n   /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */\n   /* Offset to next interlace block */\n   PNG_CONST int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};\n\n   png_debug(1, \"in png_do_read_interlace\");\n   if (row != NULL && row_info != NULL)\n   {\n      png_uint_32 final_width;\n\n      final_width = row_info->width * png_pass_inc[pass];\n\n      switch (row_info->pixel_depth)\n      {\n         case 1:\n         {\n            png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 3);\n            png_bytep dp = row + (png_size_t)((final_width - 1) >> 3);\n            int sshift, dshift;\n            int s_start, s_end, s_inc;\n            int jstop = png_pass_inc[pass];\n            png_byte v;\n            png_uint_32 i;\n            int j;\n\n#ifdef PNG_READ_PACKSWAP_SUPPORTED\n            if (transformations & PNG_PACKSWAP)\n            {\n                sshift = (int)((row_info->width + 7) & 0x07);\n                dshift = (int)((final_width + 7) & 0x07);\n                s_start = 7;\n                s_end = 0;\n                s_inc = -1;\n            }\n            else\n#endif\n            {\n                sshift = 7 - (int)((row_info->width + 7) & 0x07);\n                dshift = 7 - (int)((final_width + 7) & 0x07);\n                s_start = 0;\n                s_end = 7;\n                s_inc = 1;\n            }\n\n            for (i = 0; i < row_info->width; i++)\n            {\n               v = (png_byte)((*sp >> sshift) & 0x01);\n               for (j = 0; j < jstop; j++)\n               {\n                  *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff);\n                  *dp |= (png_byte)(v << dshift);\n                  if (dshift == s_end)\n                  {\n                     dshift = s_start;\n                     dp--;\n                  }\n                  else\n                     dshift += s_inc;\n               }\n               if (sshift == s_end)\n               {\n                  sshift = s_start;\n                  sp--;\n               }\n               else\n                  sshift += s_inc;\n            }\n            break;\n         }\n         case 2:\n         {\n            png_bytep sp = row + (png_uint_32)((row_info->width - 1) >> 2);\n            png_bytep dp = row + (png_uint_32)((final_width - 1) >> 2);\n            int sshift, dshift;\n            int s_start, s_end, s_inc;\n            int jstop = png_pass_inc[pass];\n            png_uint_32 i;\n\n#ifdef PNG_READ_PACKSWAP_SUPPORTED\n            if (transformations & PNG_PACKSWAP)\n            {\n               sshift = (int)(((row_info->width + 3) & 0x03) << 1);\n               dshift = (int)(((final_width + 3) & 0x03) << 1);\n               s_start = 6;\n               s_end = 0;\n               s_inc = -2;\n            }\n            else\n#endif\n            {\n               sshift = (int)((3 - ((row_info->width + 3) & 0x03)) << 1);\n               dshift = (int)((3 - ((final_width + 3) & 0x03)) << 1);\n               s_start = 0;\n               s_end = 6;\n               s_inc = 2;\n            }\n\n            for (i = 0; i < row_info->width; i++)\n            {\n               png_byte v;\n               int j;\n\n               v = (png_byte)((*sp >> sshift) & 0x03);\n               for (j = 0; j < jstop; j++)\n               {\n                  *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff);\n                  *dp |= (png_byte)(v << dshift);\n                  if (dshift == s_end)\n                  {\n                     dshift = s_start;\n                     dp--;\n                  }\n                  else\n                     dshift += s_inc;\n               }\n               if (sshift == s_end)\n               {\n                  sshift = s_start;\n                  sp--;\n               }\n               else\n                  sshift += s_inc;\n            }\n            break;\n         }\n         case 4:\n         {\n            png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1);\n            png_bytep dp = row + (png_size_t)((final_width - 1) >> 1);\n            int sshift, dshift;\n            int s_start, s_end, s_inc;\n            png_uint_32 i;\n            int jstop = png_pass_inc[pass];\n\n#ifdef PNG_READ_PACKSWAP_SUPPORTED\n            if (transformations & PNG_PACKSWAP)\n            {\n               sshift = (int)(((row_info->width + 1) & 0x01) << 2);\n               dshift = (int)(((final_width + 1) & 0x01) << 2);\n               s_start = 4;\n               s_end = 0;\n               s_inc = -4;\n            }\n            else\n#endif\n            {\n               sshift = (int)((1 - ((row_info->width + 1) & 0x01)) << 2);\n               dshift = (int)((1 - ((final_width + 1) & 0x01)) << 2);\n               s_start = 0;\n               s_end = 4;\n               s_inc = 4;\n            }\n\n            for (i = 0; i < row_info->width; i++)\n            {\n               png_byte v = (png_byte)((*sp >> sshift) & 0xf);\n               int j;\n\n               for (j = 0; j < jstop; j++)\n               {\n                  *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff);\n                  *dp |= (png_byte)(v << dshift);\n                  if (dshift == s_end)\n                  {\n                     dshift = s_start;\n                     dp--;\n                  }\n                  else\n                     dshift += s_inc;\n               }\n               if (sshift == s_end)\n               {\n                  sshift = s_start;\n                  sp--;\n               }\n               else\n                  sshift += s_inc;\n            }\n            break;\n         }\n         default:\n         {\n            png_size_t pixel_bytes = (row_info->pixel_depth >> 3);\n            png_bytep sp = row + (png_size_t)(row_info->width - 1)\n                * pixel_bytes;\n            png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes;\n\n            int jstop = png_pass_inc[pass];\n            png_uint_32 i;\n\n            for (i = 0; i < row_info->width; i++)\n            {\n               png_byte v[8];\n               int j;\n\n               png_memcpy(v, sp, pixel_bytes);\n               for (j = 0; j < jstop; j++)\n               {\n                  png_memcpy(dp, v, pixel_bytes);\n                  dp -= pixel_bytes;\n               }\n               sp -= pixel_bytes;\n            }\n            break;\n         }\n      }\n      row_info->width = final_width;\n      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width);\n   }\n#ifndef PNG_READ_PACKSWAP_SUPPORTED\n   transformations = transformations; /* Silence compiler warning */\n#endif\n}\n#endif /* PNG_READ_INTERLACING_SUPPORTED */\n\nvoid /* PRIVATE */\npng_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,\n   png_bytep prev_row, int filter)\n{\n   png_debug(1, \"in png_read_filter_row\");\n   png_debug2(2, \"row = %lu, filter = %d\", png_ptr->row_number, filter);\n   switch (filter)\n   {\n      case PNG_FILTER_VALUE_NONE:\n         break;\n      case PNG_FILTER_VALUE_SUB:\n      {\n         png_uint_32 i;\n         png_uint_32 istop = row_info->rowbytes;\n         png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;\n         png_bytep rp = row + bpp;\n         png_bytep lp = row;\n\n         for (i = bpp; i < istop; i++)\n         {\n            *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff);\n            rp++;\n         }\n         break;\n      }\n      case PNG_FILTER_VALUE_UP:\n      {\n         png_uint_32 i;\n         png_uint_32 istop = row_info->rowbytes;\n         png_bytep rp = row;\n         png_bytep pp = prev_row;\n\n         for (i = 0; i < istop; i++)\n         {\n            *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);\n            rp++;\n         }\n         break;\n      }\n      case PNG_FILTER_VALUE_AVG:\n      {\n         png_uint_32 i;\n         png_bytep rp = row;\n         png_bytep pp = prev_row;\n         png_bytep lp = row;\n         png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;\n         png_uint_32 istop = row_info->rowbytes - bpp;\n\n         for (i = 0; i < bpp; i++)\n         {\n            *rp = (png_byte)(((int)(*rp) +\n               ((int)(*pp++) / 2 )) & 0xff);\n            rp++;\n         }\n\n         for (i = 0; i < istop; i++)\n         {\n            *rp = (png_byte)(((int)(*rp) +\n               (int)(*pp++ + *lp++) / 2 ) & 0xff);\n            rp++;\n         }\n         break;\n      }\n      case PNG_FILTER_VALUE_PAETH:\n      {\n         png_uint_32 i;\n         png_bytep rp = row;\n         png_bytep pp = prev_row;\n         png_bytep lp = row;\n         png_bytep cp = prev_row;\n         png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;\n         png_uint_32 istop=row_info->rowbytes - bpp;\n\n         for (i = 0; i < bpp; i++)\n         {\n            *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);\n            rp++;\n         }\n\n         for (i = 0; i < istop; i++)   /* Use leftover rp,pp */\n         {\n            int a, b, c, pa, pb, pc, p;\n\n            a = *lp++;\n            b = *pp++;\n            c = *cp++;\n\n            p = b - c;\n            pc = a - c;\n\n#ifdef PNG_USE_ABS\n            pa = abs(p);\n            pb = abs(pc);\n            pc = abs(p + pc);\n#else\n            pa = p < 0 ? -p : p;\n            pb = pc < 0 ? -pc : pc;\n            pc = (p + pc) < 0 ? -(p + pc) : p + pc;\n#endif\n\n            /*\n               if (pa <= pb && pa <= pc)\n                  p = a;\n               else if (pb <= pc)\n                  p = b;\n               else\n                  p = c;\n             */\n\n            p = (pa <= pb && pa <= pc) ? a : (pb <= pc) ? b : c;\n\n            *rp = (png_byte)(((int)(*rp) + p) & 0xff);\n            rp++;\n         }\n         break;\n      }\n      default:\n         png_warning(png_ptr, \"Ignoring bad adaptive filter type\");\n         *row = 0;\n         break;\n   }\n}\n\n#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\nvoid /* PRIVATE */\npng_read_finish_row(png_structp png_ptr)\n{\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n   /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */\n\n   /* Start of interlace block */\n   PNG_CONST int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};\n\n   /* Offset to next interlace block */\n   PNG_CONST int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};\n\n   /* Start of interlace block in the y direction */\n   PNG_CONST int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};\n\n   /* Offset to next interlace block in the y direction */\n   PNG_CONST int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};\n#endif /* PNG_READ_INTERLACING_SUPPORTED */\n\n   png_debug(1, \"in png_read_finish_row\");\n   png_ptr->row_number++;\n   if (png_ptr->row_number < png_ptr->num_rows)\n      return;\n\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n   if (png_ptr->interlaced)\n   {\n      png_ptr->row_number = 0;\n      png_memset_check(png_ptr, png_ptr->prev_row, 0,\n         png_ptr->rowbytes + 1);\n      do\n      {\n         png_ptr->pass++;\n         if (png_ptr->pass >= 7)\n            break;\n         png_ptr->iwidth = (png_ptr->width +\n            png_pass_inc[png_ptr->pass] - 1 -\n            png_pass_start[png_ptr->pass]) /\n            png_pass_inc[png_ptr->pass];\n\n         if (!(png_ptr->transformations & PNG_INTERLACE))\n         {\n            png_ptr->num_rows = (png_ptr->height +\n               png_pass_yinc[png_ptr->pass] - 1 -\n               png_pass_ystart[png_ptr->pass]) /\n               png_pass_yinc[png_ptr->pass];\n            if (!(png_ptr->num_rows))\n               continue;\n         }\n         else  /* if (png_ptr->transformations & PNG_INTERLACE) */\n            break;\n      } while (png_ptr->iwidth == 0);\n\n      if (png_ptr->pass < 7)\n         return;\n   }\n#endif /* PNG_READ_INTERLACING_SUPPORTED */\n\n   if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))\n   {\n#ifdef PNG_USE_LOCAL_ARRAYS\n      PNG_CONST PNG_IDAT;\n#endif\n      char extra;\n      int ret;\n\n      png_ptr->zstream.next_out = (Byte *)&extra;\n      png_ptr->zstream.avail_out = (uInt)1;\n      for (;;)\n      {\n         if (!(png_ptr->zstream.avail_in))\n         {\n            while (!png_ptr->idat_size)\n            {\n               png_byte chunk_length[4];\n\n               png_crc_finish(png_ptr, 0);\n\n               png_read_data(png_ptr, chunk_length, 4);\n               png_ptr->idat_size = png_get_uint_31(png_ptr, chunk_length);\n               png_reset_crc(png_ptr);\n               png_crc_read(png_ptr, png_ptr->chunk_name, 4);\n               if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))\n                  png_error(png_ptr, \"Not enough image data\");\n\n            }\n            png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size;\n            png_ptr->zstream.next_in = png_ptr->zbuf;\n            if (png_ptr->zbuf_size > png_ptr->idat_size)\n               png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size;\n            png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zstream.avail_in);\n            png_ptr->idat_size -= png_ptr->zstream.avail_in;\n         }\n         ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);\n         if (ret == Z_STREAM_END)\n         {\n            if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in ||\n               png_ptr->idat_size)\n               png_warning(png_ptr, \"Extra compressed data.\");\n            png_ptr->mode |= PNG_AFTER_IDAT;\n            png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;\n            break;\n         }\n         if (ret != Z_OK)\n            png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :\n                      \"Decompression Error\");\n\n         if (!(png_ptr->zstream.avail_out))\n         {\n            png_warning(png_ptr, \"Extra compressed data.\");\n            png_ptr->mode |= PNG_AFTER_IDAT;\n            png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;\n            break;\n         }\n\n      }\n      png_ptr->zstream.avail_out = 0;\n   }\n\n   if (png_ptr->idat_size || png_ptr->zstream.avail_in)\n      png_warning(png_ptr, \"Extra compression data.\");\n\n   inflateReset(&png_ptr->zstream);\n\n   png_ptr->mode |= PNG_AFTER_IDAT;\n}\n#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */\n\nvoid /* PRIVATE */\npng_read_start_row(png_structp png_ptr)\n{\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n   /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */\n\n   /* Start of interlace block */\n   PNG_CONST int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};\n\n   /* Offset to next interlace block */\n   PNG_CONST int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};\n\n   /* Start of interlace block in the y direction */\n   PNG_CONST int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};\n\n   /* Offset to next interlace block in the y direction */\n   PNG_CONST int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};\n#endif\n\n   int max_pixel_depth;\n   png_size_t row_bytes;\n\n   png_debug(1, \"in png_read_start_row\");\n   png_ptr->zstream.avail_in = 0;\n   png_init_read_transformations(png_ptr);\n#ifdef PNG_READ_INTERLACING_SUPPORTED\n   if (png_ptr->interlaced)\n   {\n      if (!(png_ptr->transformations & PNG_INTERLACE))\n         png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -\n            png_pass_ystart[0]) / png_pass_yinc[0];\n      else\n         png_ptr->num_rows = png_ptr->height;\n\n      png_ptr->iwidth = (png_ptr->width +\n         png_pass_inc[png_ptr->pass] - 1 -\n         png_pass_start[png_ptr->pass]) /\n         png_pass_inc[png_ptr->pass];\n   }\n   else\n#endif /* PNG_READ_INTERLACING_SUPPORTED */\n   {\n      png_ptr->num_rows = png_ptr->height;\n      png_ptr->iwidth = png_ptr->width;\n   }\n   max_pixel_depth = png_ptr->pixel_depth;\n\n#ifdef PNG_READ_PACK_SUPPORTED\n   if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8)\n      max_pixel_depth = 8;\n#endif\n\n#ifdef PNG_READ_EXPAND_SUPPORTED\n   if (png_ptr->transformations & PNG_EXPAND)\n   {\n      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      {\n         if (png_ptr->num_trans)\n            max_pixel_depth = 32;\n         else\n            max_pixel_depth = 24;\n      }\n      else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)\n      {\n         if (max_pixel_depth < 8)\n            max_pixel_depth = 8;\n         if (png_ptr->num_trans)\n            max_pixel_depth *= 2;\n      }\n      else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)\n      {\n         if (png_ptr->num_trans)\n         {\n            max_pixel_depth *= 4;\n            max_pixel_depth /= 3;\n         }\n      }\n   }\n#endif\n\n#ifdef PNG_READ_FILLER_SUPPORTED\n   if (png_ptr->transformations & (PNG_FILLER))\n   {\n      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n         max_pixel_depth = 32;\n      else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)\n      {\n         if (max_pixel_depth <= 8)\n            max_pixel_depth = 16;\n         else\n            max_pixel_depth = 32;\n      }\n      else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)\n      {\n         if (max_pixel_depth <= 32)\n            max_pixel_depth = 32;\n         else\n            max_pixel_depth = 64;\n      }\n   }\n#endif\n\n#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\n   if (png_ptr->transformations & PNG_GRAY_TO_RGB)\n   {\n      if (\n#ifdef PNG_READ_EXPAND_SUPPORTED\n        (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) ||\n#endif\n#ifdef PNG_READ_FILLER_SUPPORTED\n        (png_ptr->transformations & (PNG_FILLER)) ||\n#endif\n        png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)\n      {\n         if (max_pixel_depth <= 16)\n            max_pixel_depth = 32;\n         else\n            max_pixel_depth = 64;\n      }\n      else\n      {\n         if (max_pixel_depth <= 8)\n           {\n             if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n               max_pixel_depth = 32;\n             else\n               max_pixel_depth = 24;\n           }\n         else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n            max_pixel_depth = 64;\n         else\n            max_pixel_depth = 48;\n      }\n   }\n#endif\n\n#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && \\\ndefined(PNG_USER_TRANSFORM_PTR_SUPPORTED)\n   if (png_ptr->transformations & PNG_USER_TRANSFORM)\n     {\n       int user_pixel_depth = png_ptr->user_transform_depth*\n         png_ptr->user_transform_channels;\n       if (user_pixel_depth > max_pixel_depth)\n         max_pixel_depth=user_pixel_depth;\n     }\n#endif\n\n   /* Align the width on the next larger 8 pixels.  Mainly used\n    * for interlacing\n    */\n   row_bytes = ((png_ptr->width + 7) & ~((png_uint_32)7));\n   /* Calculate the maximum bytes needed, adding a byte and a pixel\n    * for safety's sake\n    */\n   row_bytes = PNG_ROWBYTES(max_pixel_depth, row_bytes) +\n      1 + ((max_pixel_depth + 7) >> 3);\n#ifdef PNG_MAX_MALLOC_64K\n   if (row_bytes > (png_uint_32)65536L)\n      png_error(png_ptr, \"This image requires a row greater than 64KB\");\n#endif\n\n   if (row_bytes + 64 > png_ptr->old_big_row_buf_size)\n   {\n     png_free(png_ptr, png_ptr->big_row_buf);\n     if (png_ptr->interlaced)\n        png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr,\n            row_bytes + 64);\n     else\n        png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr,\n            row_bytes + 64);\n     png_ptr->old_big_row_buf_size = row_bytes + 64;\n\n     /* Use 32 bytes of padding before and after row_buf. */\n     png_ptr->row_buf = png_ptr->big_row_buf + 32;\n     png_ptr->old_big_row_buf_size = row_bytes + 64;\n   }\n\n#ifdef PNG_MAX_MALLOC_64K\n   if ((png_uint_32)row_bytes + 1 > (png_uint_32)65536L)\n      png_error(png_ptr, \"This image requires a row greater than 64KB\");\n#endif\n   if ((png_uint_32)row_bytes > (png_uint_32)(PNG_SIZE_MAX - 1))\n      png_error(png_ptr, \"Row has too many bytes to allocate in memory.\");\n\n   if (row_bytes + 1 > png_ptr->old_prev_row_size)\n   {\n      png_free(png_ptr, png_ptr->prev_row);\n      png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)(\n        row_bytes + 1));\n      png_memset_check(png_ptr, png_ptr->prev_row, 0, row_bytes + 1);\n      png_ptr->old_prev_row_size = row_bytes + 1;\n   }\n\n   png_ptr->rowbytes = row_bytes;\n\n   png_debug1(3, \"width = %lu,\", png_ptr->width);\n   png_debug1(3, \"height = %lu,\", png_ptr->height);\n   png_debug1(3, \"iwidth = %lu,\", png_ptr->iwidth);\n   png_debug1(3, \"num_rows = %lu,\", png_ptr->num_rows);\n   png_debug1(3, \"rowbytes = %lu,\", png_ptr->rowbytes);\n   png_debug1(3, \"irowbytes = %lu\",\n       PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1);\n\n   png_ptr->flags |= PNG_FLAG_ROW_INIT;\n}\n#endif /* PNG_READ_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngset.c",
    "content": "\n/* pngset.c - storage of image information into info struct\n *\n * Last changed in libpng 1.2.43 [February 25, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n * The functions here are used during reads to store data from the file\n * into the info struct, and during writes to store application data\n * into the info struct for writing into the file.  This abstracts the\n * info struct and allows us to change the structure in the future.\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)\n\n#ifdef PNG_bKGD_SUPPORTED\nvoid PNGAPI\npng_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)\n{\n   png_debug1(1, \"in %s storage function\", \"bKGD\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   png_memcpy(&(info_ptr->background), background, png_sizeof(png_color_16));\n   info_ptr->valid |= PNG_INFO_bKGD;\n}\n#endif\n\n#ifdef PNG_cHRM_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nvoid PNGAPI\npng_set_cHRM(png_structp png_ptr, png_infop info_ptr,\n   double white_x, double white_y, double red_x, double red_y,\n   double green_x, double green_y, double blue_x, double blue_y)\n{\n   png_debug1(1, \"in %s storage function\", \"cHRM\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   info_ptr->x_white = (float)white_x;\n   info_ptr->y_white = (float)white_y;\n   info_ptr->x_red   = (float)red_x;\n   info_ptr->y_red   = (float)red_y;\n   info_ptr->x_green = (float)green_x;\n   info_ptr->y_green = (float)green_y;\n   info_ptr->x_blue  = (float)blue_x;\n   info_ptr->y_blue  = (float)blue_y;\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5);\n   info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5);\n   info_ptr->int_x_red   = (png_fixed_point)(  red_x*100000.+0.5);\n   info_ptr->int_y_red   = (png_fixed_point)(  red_y*100000.+0.5);\n   info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5);\n   info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5);\n   info_ptr->int_x_blue  = (png_fixed_point)( blue_x*100000.+0.5);\n   info_ptr->int_y_blue  = (png_fixed_point)( blue_y*100000.+0.5);\n#endif\n   info_ptr->valid |= PNG_INFO_cHRM;\n}\n#endif /* PNG_FLOATING_POINT_SUPPORTED */\n\n#ifdef PNG_FIXED_POINT_SUPPORTED\nvoid PNGAPI\npng_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,\n   png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x,\n   png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y,\n   png_fixed_point blue_x, png_fixed_point blue_y)\n{\n   png_debug1(1, \"in %s storage function\", \"cHRM fixed\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n#ifdef PNG_CHECK_cHRM_SUPPORTED\n   if (png_check_cHRM_fixed(png_ptr,\n      white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y))\n#endif\n   {\n      info_ptr->int_x_white = white_x;\n      info_ptr->int_y_white = white_y;\n      info_ptr->int_x_red   = red_x;\n      info_ptr->int_y_red   = red_y;\n      info_ptr->int_x_green = green_x;\n      info_ptr->int_y_green = green_y;\n      info_ptr->int_x_blue  = blue_x;\n      info_ptr->int_y_blue  = blue_y;\n#ifdef  PNG_FLOATING_POINT_SUPPORTED\n      info_ptr->x_white = (float)(white_x/100000.);\n      info_ptr->y_white = (float)(white_y/100000.);\n      info_ptr->x_red   = (float)(  red_x/100000.);\n      info_ptr->y_red   = (float)(  red_y/100000.);\n      info_ptr->x_green = (float)(green_x/100000.);\n      info_ptr->y_green = (float)(green_y/100000.);\n      info_ptr->x_blue  = (float)( blue_x/100000.);\n      info_ptr->y_blue  = (float)( blue_y/100000.);\n#endif\n      info_ptr->valid |= PNG_INFO_cHRM;\n   }\n}\n#endif /* PNG_FIXED_POINT_SUPPORTED */\n#endif /* PNG_cHRM_SUPPORTED */\n\n#ifdef PNG_gAMA_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nvoid PNGAPI\npng_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)\n{\n   double png_gamma;\n\n   png_debug1(1, \"in %s storage function\", \"gAMA\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   /* Check for overflow */\n   if (file_gamma > 21474.83)\n   {\n      png_warning(png_ptr, \"Limiting gamma to 21474.83\");\n      png_gamma=21474.83;\n   }\n   else\n      png_gamma = file_gamma;\n   info_ptr->gamma = (float)png_gamma;\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   info_ptr->int_gamma = (int)(png_gamma*100000.+.5);\n#endif\n   info_ptr->valid |= PNG_INFO_gAMA;\n   if (png_gamma == 0.0)\n      png_warning(png_ptr, \"Setting gamma=0\");\n}\n#endif\nvoid PNGAPI\npng_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point\n   int_gamma)\n{\n   png_fixed_point png_gamma;\n\n   png_debug1(1, \"in %s storage function\", \"gAMA\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   if (int_gamma > (png_fixed_point)PNG_UINT_31_MAX)\n   {\n      png_warning(png_ptr, \"Limiting gamma to 21474.83\");\n      png_gamma=PNG_UINT_31_MAX;\n   }\n   else\n   {\n      if (int_gamma < 0)\n      {\n         png_warning(png_ptr, \"Setting negative gamma to zero\");\n         png_gamma = 0;\n      }\n      else\n         png_gamma = int_gamma;\n   }\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   info_ptr->gamma = (float)(png_gamma/100000.);\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   info_ptr->int_gamma = png_gamma;\n#endif\n   info_ptr->valid |= PNG_INFO_gAMA;\n   if (png_gamma == 0)\n      png_warning(png_ptr, \"Setting gamma=0\");\n}\n#endif\n\n#ifdef PNG_hIST_SUPPORTED\nvoid PNGAPI\npng_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)\n{\n   int i;\n\n   png_debug1(1, \"in %s storage function\", \"hIST\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   if (info_ptr->num_palette == 0 || info_ptr->num_palette\n       > PNG_MAX_PALETTE_LENGTH)\n   {\n      png_warning(png_ptr,\n         \"Invalid palette size, hIST allocation skipped.\");\n      return;\n   }\n\n#ifdef PNG_FREE_ME_SUPPORTED\n   png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);\n#endif\n   /* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in\n    * version 1.2.1\n    */\n   png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr,\n      (png_uint_32)(PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16)));\n   if (png_ptr->hist == NULL)\n   {\n      png_warning(png_ptr, \"Insufficient memory for hIST chunk data.\");\n      return;\n   }\n\n   for (i = 0; i < info_ptr->num_palette; i++)\n      png_ptr->hist[i] = hist[i];\n   info_ptr->hist = png_ptr->hist;\n   info_ptr->valid |= PNG_INFO_hIST;\n\n#ifdef PNG_FREE_ME_SUPPORTED\n   info_ptr->free_me |= PNG_FREE_HIST;\n#else\n   png_ptr->flags |= PNG_FLAG_FREE_HIST;\n#endif\n}\n#endif\n\nvoid PNGAPI\npng_set_IHDR(png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 width, png_uint_32 height, int bit_depth,\n   int color_type, int interlace_type, int compression_type,\n   int filter_type)\n{\n   png_debug1(1, \"in %s storage function\", \"IHDR\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   info_ptr->width = width;\n   info_ptr->height = height;\n   info_ptr->bit_depth = (png_byte)bit_depth;\n   info_ptr->color_type = (png_byte)color_type;\n   info_ptr->compression_type = (png_byte)compression_type;\n   info_ptr->filter_type = (png_byte)filter_type;\n   info_ptr->interlace_type = (png_byte)interlace_type;\n\n   png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height,\n       info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,\n       info_ptr->compression_type, info_ptr->filter_type);\n\n   if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      info_ptr->channels = 1;\n   else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)\n      info_ptr->channels = 3;\n   else\n      info_ptr->channels = 1;\n   if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)\n      info_ptr->channels++;\n   info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);\n\n   /* Check for potential overflow */\n   if (width > (PNG_UINT_32_MAX\n                 >> 3)      /* 8-byte RGBA pixels */\n                 - 64       /* bigrowbuf hack */\n                 - 1        /* filter byte */\n                 - 7*8      /* rounding of width to multiple of 8 pixels */\n                 - 8)       /* extra max_pixel_depth pad */\n      info_ptr->rowbytes = (png_size_t)0;\n   else\n      info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);\n}\n\n#ifdef PNG_oFFs_SUPPORTED\nvoid PNGAPI\npng_set_oFFs(png_structp png_ptr, png_infop info_ptr,\n   png_int_32 offset_x, png_int_32 offset_y, int unit_type)\n{\n   png_debug1(1, \"in %s storage function\", \"oFFs\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   info_ptr->x_offset = offset_x;\n   info_ptr->y_offset = offset_y;\n   info_ptr->offset_unit_type = (png_byte)unit_type;\n   info_ptr->valid |= PNG_INFO_oFFs;\n}\n#endif\n\n#ifdef PNG_pCAL_SUPPORTED\nvoid PNGAPI\npng_set_pCAL(png_structp png_ptr, png_infop info_ptr,\n   png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams,\n   png_charp units, png_charpp params)\n{\n   png_uint_32 length;\n   int i;\n\n   png_debug1(1, \"in %s storage function\", \"pCAL\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   length = png_strlen(purpose) + 1;\n   png_debug1(3, \"allocating purpose for info (%lu bytes)\",\n     (unsigned long)length);\n   info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length);\n   if (info_ptr->pcal_purpose == NULL)\n   {\n      png_warning(png_ptr, \"Insufficient memory for pCAL purpose.\");\n      return;\n   }\n   png_memcpy(info_ptr->pcal_purpose, purpose, (png_size_t)length);\n\n   png_debug(3, \"storing X0, X1, type, and nparams in info\");\n   info_ptr->pcal_X0 = X0;\n   info_ptr->pcal_X1 = X1;\n   info_ptr->pcal_type = (png_byte)type;\n   info_ptr->pcal_nparams = (png_byte)nparams;\n\n   length = png_strlen(units) + 1;\n   png_debug1(3, \"allocating units for info (%lu bytes)\",\n     (unsigned long)length);\n   info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length);\n   if (info_ptr->pcal_units == NULL)\n   {\n      png_warning(png_ptr, \"Insufficient memory for pCAL units.\");\n      return;\n   }\n   png_memcpy(info_ptr->pcal_units, units, (png_size_t)length);\n\n   info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr,\n      (png_uint_32)((nparams + 1) * png_sizeof(png_charp)));\n   if (info_ptr->pcal_params == NULL)\n   {\n      png_warning(png_ptr, \"Insufficient memory for pCAL params.\");\n      return;\n   }\n\n   png_memset(info_ptr->pcal_params, 0, (nparams + 1) * png_sizeof(png_charp));\n\n   for (i = 0; i < nparams; i++)\n   {\n      length = png_strlen(params[i]) + 1;\n      png_debug2(3, \"allocating parameter %d for info (%lu bytes)\", i,\n        (unsigned long)length);\n      info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length);\n      if (info_ptr->pcal_params[i] == NULL)\n      {\n         png_warning(png_ptr, \"Insufficient memory for pCAL parameter.\");\n         return;\n      }\n      png_memcpy(info_ptr->pcal_params[i], params[i], (png_size_t)length);\n   }\n\n   info_ptr->valid |= PNG_INFO_pCAL;\n#ifdef PNG_FREE_ME_SUPPORTED\n   info_ptr->free_me |= PNG_FREE_PCAL;\n#endif\n}\n#endif\n\n#if defined(PNG_READ_sCAL_SUPPORTED) || defined(PNG_WRITE_sCAL_SUPPORTED)\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nvoid PNGAPI\npng_set_sCAL(png_structp png_ptr, png_infop info_ptr,\n             int unit, double width, double height)\n{\n   png_debug1(1, \"in %s storage function\", \"sCAL\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   info_ptr->scal_unit = (png_byte)unit;\n   info_ptr->scal_pixel_width = width;\n   info_ptr->scal_pixel_height = height;\n\n   info_ptr->valid |= PNG_INFO_sCAL;\n}\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\nvoid PNGAPI\npng_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,\n             int unit, png_charp swidth, png_charp sheight)\n{\n   png_uint_32 length;\n\n   png_debug1(1, \"in %s storage function\", \"sCAL\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   info_ptr->scal_unit = (png_byte)unit;\n\n   length = png_strlen(swidth) + 1;\n   png_debug1(3, \"allocating unit for info (%u bytes)\",\n      (unsigned int)length);\n   info_ptr->scal_s_width = (png_charp)png_malloc_warn(png_ptr, length);\n   if (info_ptr->scal_s_width == NULL)\n   {\n      png_warning(png_ptr,\n         \"Memory allocation failed while processing sCAL.\");\n      return;\n   }\n   png_memcpy(info_ptr->scal_s_width, swidth, (png_size_t)length);\n\n   length = png_strlen(sheight) + 1;\n   png_debug1(3, \"allocating unit for info (%u bytes)\",\n      (unsigned int)length);\n   info_ptr->scal_s_height = (png_charp)png_malloc_warn(png_ptr, length);\n   if (info_ptr->scal_s_height == NULL)\n   {\n      png_free (png_ptr, info_ptr->scal_s_width);\n      info_ptr->scal_s_width = NULL;\n      png_warning(png_ptr,\n         \"Memory allocation failed while processing sCAL.\");\n      return;\n   }\n   png_memcpy(info_ptr->scal_s_height, sheight, (png_size_t)length);\n   info_ptr->valid |= PNG_INFO_sCAL;\n#ifdef PNG_FREE_ME_SUPPORTED\n   info_ptr->free_me |= PNG_FREE_SCAL;\n#endif\n}\n#endif\n#endif\n#endif\n\n#ifdef PNG_pHYs_SUPPORTED\nvoid PNGAPI\npng_set_pHYs(png_structp png_ptr, png_infop info_ptr,\n   png_uint_32 res_x, png_uint_32 res_y, int unit_type)\n{\n   png_debug1(1, \"in %s storage function\", \"pHYs\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   info_ptr->x_pixels_per_unit = res_x;\n   info_ptr->y_pixels_per_unit = res_y;\n   info_ptr->phys_unit_type = (png_byte)unit_type;\n   info_ptr->valid |= PNG_INFO_pHYs;\n}\n#endif\n\nvoid PNGAPI\npng_set_PLTE(png_structp png_ptr, png_infop info_ptr,\n   png_colorp palette, int num_palette)\n{\n\n   png_debug1(1, \"in %s storage function\", \"PLTE\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   if (num_palette < 0 || num_palette > PNG_MAX_PALETTE_LENGTH)\n   {\n      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n         png_error(png_ptr, \"Invalid palette length\");\n      else\n      {\n         png_warning(png_ptr, \"Invalid palette length\");\n         return;\n      }\n   }\n\n   /* It may not actually be necessary to set png_ptr->palette here;\n    * we do it for backward compatibility with the way the png_handle_tRNS\n    * function used to do the allocation.\n    */\n#ifdef PNG_FREE_ME_SUPPORTED\n   png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0);\n#endif\n\n   /* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead\n    * of num_palette entries, in case of an invalid PNG file that has\n    * too-large sample values.\n    */\n   png_ptr->palette = (png_colorp)png_calloc(png_ptr,\n      PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color));\n   png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof(png_color));\n   info_ptr->palette = png_ptr->palette;\n   info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;\n\n#ifdef PNG_FREE_ME_SUPPORTED\n   info_ptr->free_me |= PNG_FREE_PLTE;\n#else\n   png_ptr->flags |= PNG_FLAG_FREE_PLTE;\n#endif\n\n   info_ptr->valid |= PNG_INFO_PLTE;\n}\n\n#ifdef PNG_sBIT_SUPPORTED\nvoid PNGAPI\npng_set_sBIT(png_structp png_ptr, png_infop info_ptr,\n   png_color_8p sig_bit)\n{\n   png_debug1(1, \"in %s storage function\", \"sBIT\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   png_memcpy(&(info_ptr->sig_bit), sig_bit, png_sizeof(png_color_8));\n   info_ptr->valid |= PNG_INFO_sBIT;\n}\n#endif\n\n#ifdef PNG_sRGB_SUPPORTED\nvoid PNGAPI\npng_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)\n{\n   png_debug1(1, \"in %s storage function\", \"sRGB\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   info_ptr->srgb_intent = (png_byte)intent;\n   info_ptr->valid |= PNG_INFO_sRGB;\n}\n\nvoid PNGAPI\npng_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,\n   int intent)\n{\n#ifdef PNG_gAMA_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   float file_gamma;\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   png_fixed_point int_file_gamma;\n#endif\n#endif\n#ifdef PNG_cHRM_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y;\n#endif\n   png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y, int_green_x,\n      int_green_y, int_blue_x, int_blue_y;\n#endif\n   png_debug1(1, \"in %s storage function\", \"sRGB_gAMA_and_cHRM\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   png_set_sRGB(png_ptr, info_ptr, intent);\n\n#ifdef PNG_gAMA_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   file_gamma = (float).45455;\n   png_set_gAMA(png_ptr, info_ptr, file_gamma);\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   int_file_gamma = 45455L;\n   png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);\n#endif\n#endif\n\n#ifdef PNG_cHRM_SUPPORTED\n   int_white_x = 31270L;\n   int_white_y = 32900L;\n   int_red_x   = 64000L;\n   int_red_y   = 33000L;\n   int_green_x = 30000L;\n   int_green_y = 60000L;\n   int_blue_x  = 15000L;\n   int_blue_y  =  6000L;\n\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   white_x = (float).3127;\n   white_y = (float).3290;\n   red_x   = (float).64;\n   red_y   = (float).33;\n   green_x = (float).30;\n   green_y = (float).60;\n   blue_x  = (float).15;\n   blue_y  = (float).06;\n#endif\n\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   png_set_cHRM_fixed(png_ptr, info_ptr,\n       int_white_x, int_white_y, int_red_x, int_red_y, int_green_x,\n       int_green_y, int_blue_x, int_blue_y);\n#endif\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   png_set_cHRM(png_ptr, info_ptr,\n       white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y);\n#endif\n#endif /* cHRM */\n}\n#endif /* sRGB */\n\n\n#ifdef PNG_iCCP_SUPPORTED\nvoid PNGAPI\npng_set_iCCP(png_structp png_ptr, png_infop info_ptr,\n             png_charp name, int compression_type,\n             png_charp profile, png_uint_32 proflen)\n{\n   png_charp new_iccp_name;\n   png_charp new_iccp_profile;\n   png_uint_32 length;\n\n   png_debug1(1, \"in %s storage function\", \"iCCP\");\n\n   if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL)\n      return;\n\n   length = png_strlen(name)+1;\n   new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length);\n   if (new_iccp_name == NULL)\n   {\n        png_warning(png_ptr, \"Insufficient memory to process iCCP chunk.\");\n      return;\n   }\n   png_memcpy(new_iccp_name, name, length);\n   new_iccp_profile = (png_charp)png_malloc_warn(png_ptr, proflen);\n   if (new_iccp_profile == NULL)\n   {\n      png_free (png_ptr, new_iccp_name);\n      png_warning(png_ptr,\n          \"Insufficient memory to process iCCP profile.\");\n      return;\n   }\n   png_memcpy(new_iccp_profile, profile, (png_size_t)proflen);\n\n   png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0);\n\n   info_ptr->iccp_proflen = proflen;\n   info_ptr->iccp_name = new_iccp_name;\n   info_ptr->iccp_profile = new_iccp_profile;\n   /* Compression is always zero but is here so the API and info structure\n    * does not have to change if we introduce multiple compression types\n    */\n   info_ptr->iccp_compression = (png_byte)compression_type;\n#ifdef PNG_FREE_ME_SUPPORTED\n   info_ptr->free_me |= PNG_FREE_ICCP;\n#endif\n   info_ptr->valid |= PNG_INFO_iCCP;\n}\n#endif\n\n#ifdef PNG_TEXT_SUPPORTED\nvoid PNGAPI\npng_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,\n             int num_text)\n{\n   int ret;\n   ret = png_set_text_2(png_ptr, info_ptr, text_ptr, num_text);\n   if (ret)\n      png_error(png_ptr, \"Insufficient memory to store text\");\n}\n\nint /* PRIVATE */\npng_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,\n               int num_text)\n{\n   int i;\n\n   png_debug1(1, \"in %s storage function\", ((png_ptr == NULL ||\n      png_ptr->chunk_name[0] == '\\0') ?\n      \"text\" : (png_const_charp)png_ptr->chunk_name));\n\n   if (png_ptr == NULL || info_ptr == NULL || num_text == 0)\n      return(0);\n\n   /* Make sure we have enough space in the \"text\" array in info_struct\n    * to hold all of the incoming text_ptr objects.\n    */\n   if (info_ptr->num_text + num_text > info_ptr->max_text)\n   {\n      if (info_ptr->text != NULL)\n      {\n         png_textp old_text;\n         int old_max;\n\n         old_max = info_ptr->max_text;\n         info_ptr->max_text = info_ptr->num_text + num_text + 8;\n         old_text = info_ptr->text;\n         info_ptr->text = (png_textp)png_malloc_warn(png_ptr,\n            (png_uint_32)(info_ptr->max_text * png_sizeof(png_text)));\n         if (info_ptr->text == NULL)\n         {\n            png_free(png_ptr, old_text);\n            return(1);\n         }\n         png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max *\n            png_sizeof(png_text)));\n         png_free(png_ptr, old_text);\n      }\n      else\n      {\n         info_ptr->max_text = num_text + 8;\n         info_ptr->num_text = 0;\n         info_ptr->text = (png_textp)png_malloc_warn(png_ptr,\n            (png_uint_32)(info_ptr->max_text * png_sizeof(png_text)));\n         if (info_ptr->text == NULL)\n            return(1);\n#ifdef PNG_FREE_ME_SUPPORTED\n         info_ptr->free_me |= PNG_FREE_TEXT;\n#endif\n      }\n      png_debug1(3, \"allocated %d entries for info_ptr->text\",\n         info_ptr->max_text);\n   }\n   for (i = 0; i < num_text; i++)\n   {\n      png_size_t text_length, key_len;\n      png_size_t lang_len, lang_key_len;\n      png_textp textp = &(info_ptr->text[info_ptr->num_text]);\n\n      if (text_ptr[i].key == NULL)\n          continue;\n\n      key_len = png_strlen(text_ptr[i].key);\n\n      if (text_ptr[i].compression <= 0)\n      {\n         lang_len = 0;\n         lang_key_len = 0;\n      }\n\n      else\n#ifdef PNG_iTXt_SUPPORTED\n      {\n         /* Set iTXt data */\n\n         if (text_ptr[i].lang != NULL)\n            lang_len = png_strlen(text_ptr[i].lang);\n         else\n            lang_len = 0;\n         if (text_ptr[i].lang_key != NULL)\n            lang_key_len = png_strlen(text_ptr[i].lang_key);\n         else\n            lang_key_len = 0;\n      }\n#else /* PNG_iTXt_SUPPORTED */\n      {\n         png_warning(png_ptr, \"iTXt chunk not supported.\");\n         continue;\n      }\n#endif\n\n      if (text_ptr[i].text == NULL || text_ptr[i].text[0] == '\\0')\n      {\n         text_length = 0;\n#ifdef PNG_iTXt_SUPPORTED\n         if (text_ptr[i].compression > 0)\n            textp->compression = PNG_ITXT_COMPRESSION_NONE;\n         else\n#endif\n            textp->compression = PNG_TEXT_COMPRESSION_NONE;\n      }\n\n      else\n      {\n         text_length = png_strlen(text_ptr[i].text);\n         textp->compression = text_ptr[i].compression;\n      }\n\n      textp->key = (png_charp)png_malloc_warn(png_ptr,\n         (png_uint_32)\n         (key_len + text_length + lang_len + lang_key_len + 4));\n      if (textp->key == NULL)\n         return(1);\n      png_debug2(2, \"Allocated %lu bytes at %x in png_set_text\",\n                 (png_uint_32)\n                 (key_len + lang_len + lang_key_len + text_length + 4),\n                 (int)textp->key);\n\n      png_memcpy(textp->key, text_ptr[i].key,(png_size_t)(key_len));\n      *(textp->key + key_len) = '\\0';\n#ifdef PNG_iTXt_SUPPORTED\n      if (text_ptr[i].compression > 0)\n      {\n         textp->lang = textp->key + key_len + 1;\n         png_memcpy(textp->lang, text_ptr[i].lang, lang_len);\n         *(textp->lang + lang_len) = '\\0';\n         textp->lang_key = textp->lang + lang_len + 1;\n         png_memcpy(textp->lang_key, text_ptr[i].lang_key, lang_key_len);\n         *(textp->lang_key + lang_key_len) = '\\0';\n         textp->text = textp->lang_key + lang_key_len + 1;\n      }\n      else\n#endif\n      {\n#ifdef PNG_iTXt_SUPPORTED\n         textp->lang=NULL;\n         textp->lang_key=NULL;\n#endif\n         textp->text = textp->key + key_len + 1;\n      }\n      if (text_length)\n         png_memcpy(textp->text, text_ptr[i].text,\n            (png_size_t)(text_length));\n      *(textp->text + text_length) = '\\0';\n\n#ifdef PNG_iTXt_SUPPORTED\n      if (textp->compression > 0)\n      {\n         textp->text_length = 0;\n         textp->itxt_length = text_length;\n      }\n      else\n#endif\n\n      {\n         textp->text_length = text_length;\n#ifdef PNG_iTXt_SUPPORTED\n         textp->itxt_length = 0;\n#endif\n      }\n      info_ptr->num_text++;\n      png_debug1(3, \"transferred text chunk %d\", info_ptr->num_text);\n   }\n   return(0);\n}\n#endif\n\n#ifdef PNG_tIME_SUPPORTED\nvoid PNGAPI\npng_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)\n{\n   png_debug1(1, \"in %s storage function\", \"tIME\");\n\n   if (png_ptr == NULL || info_ptr == NULL ||\n       (png_ptr->mode & PNG_WROTE_tIME))\n      return;\n\n   png_memcpy(&(info_ptr->mod_time), mod_time, png_sizeof(png_time));\n   info_ptr->valid |= PNG_INFO_tIME;\n}\n#endif\n\n#ifdef PNG_tRNS_SUPPORTED\nvoid PNGAPI\npng_set_tRNS(png_structp png_ptr, png_infop info_ptr,\n   png_bytep trans, int num_trans, png_color_16p trans_values)\n{\n   png_debug1(1, \"in %s storage function\", \"tRNS\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   if (trans != NULL)\n   {\n       /* It may not actually be necessary to set png_ptr->trans here;\n        * we do it for backward compatibility with the way the png_handle_tRNS\n        * function used to do the allocation.\n        */\n\n#ifdef PNG_FREE_ME_SUPPORTED\n       png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);\n#endif\n\n       /* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */\n       png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr,\n           (png_uint_32)PNG_MAX_PALETTE_LENGTH);\n       if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH)\n          png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans);\n   }\n\n   if (trans_values != NULL)\n   {\n      int sample_max = (1 << info_ptr->bit_depth);\n      if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&\n          (int)trans_values->gray > sample_max) ||\n          (info_ptr->color_type == PNG_COLOR_TYPE_RGB &&\n          ((int)trans_values->red > sample_max ||\n          (int)trans_values->green > sample_max ||\n          (int)trans_values->blue > sample_max)))\n         png_warning(png_ptr,\n            \"tRNS chunk has out-of-range samples for bit_depth\");\n      png_memcpy(&(info_ptr->trans_values), trans_values,\n         png_sizeof(png_color_16));\n      if (num_trans == 0)\n         num_trans = 1;\n   }\n\n   info_ptr->num_trans = (png_uint_16)num_trans;\n   if (num_trans != 0)\n   {\n      info_ptr->valid |= PNG_INFO_tRNS;\n#ifdef PNG_FREE_ME_SUPPORTED\n      info_ptr->free_me |= PNG_FREE_TRNS;\n#else\n      png_ptr->flags |= PNG_FLAG_FREE_TRNS;\n#endif\n   }\n}\n#endif\n\n#ifdef PNG_sPLT_SUPPORTED\nvoid PNGAPI\npng_set_sPLT(png_structp png_ptr,\n             png_infop info_ptr, png_sPLT_tp entries, int nentries)\n/*\n *  entries        - array of png_sPLT_t structures\n *                   to be added to the list of palettes\n *                   in the info structure.\n *  nentries       - number of palette structures to be\n *                   added.\n */\n{\n   png_sPLT_tp np;\n   int i;\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   np = (png_sPLT_tp)png_malloc_warn(png_ptr,\n       (info_ptr->splt_palettes_num + nentries) *\n        (png_uint_32)png_sizeof(png_sPLT_t));\n   if (np == NULL)\n   {\n      png_warning(png_ptr, \"No memory for sPLT palettes.\");\n      return;\n   }\n\n   png_memcpy(np, info_ptr->splt_palettes,\n       info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t));\n   png_free(png_ptr, info_ptr->splt_palettes);\n   info_ptr->splt_palettes=NULL;\n\n   for (i = 0; i < nentries; i++)\n   {\n      png_sPLT_tp to = np + info_ptr->splt_palettes_num + i;\n      png_sPLT_tp from = entries + i;\n      png_uint_32 length;\n\n      length = png_strlen(from->name) + 1;\n      to->name = (png_charp)png_malloc_warn(png_ptr, length);\n      if (to->name == NULL)\n      {\n         png_warning(png_ptr,\n           \"Out of memory while processing sPLT chunk\");\n         continue;\n      }\n      png_memcpy(to->name, from->name, length);\n      to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr,\n          (png_uint_32)(from->nentries * png_sizeof(png_sPLT_entry)));\n      if (to->entries == NULL)\n      {\n         png_warning(png_ptr,\n           \"Out of memory while processing sPLT chunk\");\n         png_free(png_ptr, to->name);\n         to->name = NULL;\n         continue;\n      }\n      png_memcpy(to->entries, from->entries,\n          from->nentries * png_sizeof(png_sPLT_entry));\n      to->nentries = from->nentries;\n      to->depth = from->depth;\n   }\n\n   info_ptr->splt_palettes = np;\n   info_ptr->splt_palettes_num += nentries;\n   info_ptr->valid |= PNG_INFO_sPLT;\n#ifdef PNG_FREE_ME_SUPPORTED\n   info_ptr->free_me |= PNG_FREE_SPLT;\n#endif\n}\n#endif /* PNG_sPLT_SUPPORTED */\n\n#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\nvoid PNGAPI\npng_set_unknown_chunks(png_structp png_ptr,\n   png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)\n{\n   png_unknown_chunkp np;\n   int i;\n\n   if (png_ptr == NULL || info_ptr == NULL || num_unknowns == 0)\n      return;\n\n   np = (png_unknown_chunkp)png_malloc_warn(png_ptr,\n       (png_uint_32)((info_ptr->unknown_chunks_num + num_unknowns) *\n       png_sizeof(png_unknown_chunk)));\n   if (np == NULL)\n   {\n      png_warning(png_ptr,\n          \"Out of memory while processing unknown chunk.\");\n      return;\n   }\n\n   png_memcpy(np, info_ptr->unknown_chunks,\n       info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk));\n   png_free(png_ptr, info_ptr->unknown_chunks);\n   info_ptr->unknown_chunks = NULL;\n\n   for (i = 0; i < num_unknowns; i++)\n   {\n      png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i;\n      png_unknown_chunkp from = unknowns + i;\n\n      png_memcpy((png_charp)to->name, (png_charp)from->name,\n          png_sizeof(from->name));\n      to->name[png_sizeof(to->name)-1] = '\\0';\n      to->size = from->size;\n      /* Note our location in the read or write sequence */\n      to->location = (png_byte)(png_ptr->mode & 0xff);\n\n      if (from->size == 0)\n         to->data=NULL;\n      else\n      {\n         to->data = (png_bytep)png_malloc_warn(png_ptr,\n           (png_uint_32)from->size);\n         if (to->data == NULL)\n         {\n            png_warning(png_ptr,\n             \"Out of memory while processing unknown chunk.\");\n            to->size = 0;\n         }\n         else\n            png_memcpy(to->data, from->data, from->size);\n      }\n   }\n\n   info_ptr->unknown_chunks = np;\n   info_ptr->unknown_chunks_num += num_unknowns;\n#ifdef PNG_FREE_ME_SUPPORTED\n   info_ptr->free_me |= PNG_FREE_UNKN;\n#endif\n}\nvoid PNGAPI\npng_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr,\n   int chunk, int location)\n{\n   if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk <\n       (int)info_ptr->unknown_chunks_num)\n      info_ptr->unknown_chunks[chunk].location = (png_byte)location;\n}\n#endif\n\n#if defined(PNG_1_0_X) || defined(PNG_1_2_X)\n#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \\\n    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)\nvoid PNGAPI\npng_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)\n{\n   /* This function is deprecated in favor of png_permit_mng_features()\n      and will be removed from libpng-1.3.0 */\n\n   png_debug(1, \"in png_permit_empty_plte, DEPRECATED.\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->mng_features_permitted = (png_byte)\n     ((png_ptr->mng_features_permitted & (~PNG_FLAG_MNG_EMPTY_PLTE)) |\n     ((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE)));\n}\n#endif\n#endif\n\n#ifdef PNG_MNG_FEATURES_SUPPORTED\npng_uint_32 PNGAPI\npng_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features)\n{\n   png_debug(1, \"in png_permit_mng_features\");\n\n   if (png_ptr == NULL)\n      return (png_uint_32)0;\n   png_ptr->mng_features_permitted =\n     (png_byte)(mng_features & PNG_ALL_MNG_FEATURES);\n   return (png_uint_32)png_ptr->mng_features_permitted;\n}\n#endif\n\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\nvoid PNGAPI\npng_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep\n   chunk_list, int num_chunks)\n{\n   png_bytep new_list, p;\n   int i, old_num_chunks;\n   if (png_ptr == NULL)\n      return;\n   if (num_chunks == 0)\n   {\n      if (keep == PNG_HANDLE_CHUNK_ALWAYS || keep == PNG_HANDLE_CHUNK_IF_SAFE)\n         png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS;\n      else\n         png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS;\n\n      if (keep == PNG_HANDLE_CHUNK_ALWAYS)\n         png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS;\n      else\n         png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS;\n      return;\n   }\n   if (chunk_list == NULL)\n      return;\n   old_num_chunks = png_ptr->num_chunk_list;\n   new_list=(png_bytep)png_malloc(png_ptr,\n      (png_uint_32)\n       (5*(num_chunks + old_num_chunks)));\n   if (png_ptr->chunk_list != NULL)\n   {\n      png_memcpy(new_list, png_ptr->chunk_list,\n          (png_size_t)(5*old_num_chunks));\n      png_free(png_ptr, png_ptr->chunk_list);\n      png_ptr->chunk_list=NULL;\n   }\n   png_memcpy(new_list + 5*old_num_chunks, chunk_list,\n       (png_size_t)(5*num_chunks));\n   for (p = new_list + 5*old_num_chunks + 4, i = 0; i<num_chunks; i++, p += 5)\n      *p=(png_byte)keep;\n   png_ptr->num_chunk_list = old_num_chunks + num_chunks;\n   png_ptr->chunk_list = new_list;\n#ifdef PNG_FREE_ME_SUPPORTED\n   png_ptr->free_me |= PNG_FREE_LIST;\n#endif\n}\n#endif\n\n#ifdef PNG_READ_USER_CHUNKS_SUPPORTED\nvoid PNGAPI\npng_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr,\n   png_user_chunk_ptr read_user_chunk_fn)\n{\n   png_debug(1, \"in png_set_read_user_chunk_fn\");\n\n   if (png_ptr == NULL)\n      return;\n\n   png_ptr->read_user_chunk_fn = read_user_chunk_fn;\n   png_ptr->user_chunk_ptr = user_chunk_ptr;\n}\n#endif\n\n#ifdef PNG_INFO_IMAGE_SUPPORTED\nvoid PNGAPI\npng_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)\n{\n   png_debug1(1, \"in %s storage function\", \"rows\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   if (info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers))\n      png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);\n   info_ptr->row_pointers = row_pointers;\n   if (row_pointers)\n      info_ptr->valid |= PNG_INFO_IDAT;\n}\n#endif\n\nvoid PNGAPI\npng_set_compression_buffer_size(png_structp png_ptr,\n    png_uint_32 size)\n{\n    if (png_ptr == NULL)\n       return;\n    png_free(png_ptr, png_ptr->zbuf);\n    png_ptr->zbuf_size = (png_size_t)size;\n    png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size);\n    png_ptr->zstream.next_out = png_ptr->zbuf;\n    png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n}\n\nvoid PNGAPI\npng_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)\n{\n   if (png_ptr && info_ptr)\n      info_ptr->valid &= ~mask;\n}\n\n\n#ifndef PNG_1_0_X\n#ifdef PNG_ASSEMBLER_CODE_SUPPORTED\n/* Function was added to libpng 1.2.0 and should always exist by default */\nvoid PNGAPI\npng_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)\n{\n/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */\n    if (png_ptr != NULL)\n    png_ptr->asm_flags = 0;\n    asm_flags = asm_flags; /* Quiet the compiler */\n}\n\n/* This function was added to libpng 1.2.0 */\nvoid PNGAPI\npng_set_mmx_thresholds (png_structp png_ptr,\n                        png_byte mmx_bitdepth_threshold,\n                        png_uint_32 mmx_rowbytes_threshold)\n{\n/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */\n    if (png_ptr == NULL)\n       return;\n    /* Quiet the compiler */\n    mmx_bitdepth_threshold = mmx_bitdepth_threshold;\n    mmx_rowbytes_threshold = mmx_rowbytes_threshold;\n}\n#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */\n\n#ifdef PNG_SET_USER_LIMITS_SUPPORTED\n/* This function was added to libpng 1.2.6 */\nvoid PNGAPI\npng_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max,\n    png_uint_32 user_height_max)\n{\n   /* Images with dimensions larger than these limits will be\n    * rejected by png_set_IHDR().  To accept any PNG datastream\n    * regardless of dimensions, set both limits to 0x7ffffffL.\n    */\n   if (png_ptr == NULL)\n      return;\n   png_ptr->user_width_max = user_width_max;\n   png_ptr->user_height_max = user_height_max;\n}\n#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */\n\n\n#ifdef PNG_BENIGN_ERRORS_SUPPORTED\nvoid PNGAPI\npng_set_benign_errors(png_structp png_ptr, int allowed)\n{\n   png_debug(1, \"in png_set_benign_errors\");\n\n   if (allowed)\n      png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN;\n   else\n      png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN;\n}\n#endif /* PNG_BENIGN_ERRORS_SUPPORTED */\n#endif /* ?PNG_1_0_X */\n#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngtest.c",
    "content": "\n/* pngtest.c - a simple test program to test libpng\n *\n * Last changed in libpng 1.2.43 [February 25, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n * This program reads in a PNG image, writes it out again, and then\n * compares the two files.  If the files are identical, this shows that\n * the basic chunk handling, filtering, and (de)compression code is working\n * properly.  It does not currently test all of the transforms, although\n * it probably should.\n *\n * The program will report \"FAIL\" in certain legitimate cases:\n * 1) when the compression level or filter selection method is changed.\n * 2) when the maximum IDAT size (PNG_ZBUF_SIZE in pngconf.h) is not 8192.\n * 3) unknown unsafe-to-copy ancillary chunks or unknown critical chunks\n *    exist in the input file.\n * 4) others not listed here...\n * In these cases, it is best to check with another tool such as \"pngcheck\"\n * to see what the differences between the two files are.\n *\n * If a filename is given on the command-line, then this file is used\n * for the input, rather than the default \"pngtest.png\".  This allows\n * testing a wide variety of files easily.  You can also test a number\n * of files at once by typing \"pngtest -m file1.png file2.png ...\"\n */\n\n#define PNG_PEDANTIC_WARNINGS\n#include \"png.h\"\n\n#ifdef _WIN32_WCE\n#  if _WIN32_WCE < 211\n     __error__ (f|w)printf functions are not supported on old WindowsCE.;\n#  endif\n#  include <windows.h>\n#  include <stdlib.h>\n#  define READFILE(file, data, length, check) \\\n     if (ReadFile(file, data, length, &check, NULL)) check = 0\n#  define WRITEFILE(file, data, length, check)) \\\n     if (WriteFile(file, data, length, &check, NULL)) check = 0\n#  define FCLOSE(file) CloseHandle(file)\n#else\n#  include <stdio.h>\n#  include <stdlib.h>\n#  define READFILE(file, data, length, check) \\\n     check=(png_size_t)fread(data, (png_size_t)1, length, file)\n#  define WRITEFILE(file, data, length, check) \\\n     check=(png_size_t)fwrite(data, (png_size_t)1, length, file)\n#  define FCLOSE(file) fclose(file)\n#endif\n\n#ifndef PNG_STDIO_SUPPORTED\n#  ifdef _WIN32_WCE\n     typedef HANDLE                png_FILE_p;\n#  else\n     typedef FILE                * png_FILE_p;\n#  endif\n#endif\n\n/* Makes pngtest verbose so we can find problems (needs to be before png.h) */\n#ifndef PNG_DEBUG\n#  define PNG_DEBUG 0\n#endif\n\n#if !PNG_DEBUG\n#  define SINGLE_ROWBUF_ALLOC  /* Makes buffer overruns easier to nail */\n#endif\n\n/* Turn on CPU timing\n#define PNGTEST_TIMING\n*/\n\n#ifndef PNG_FLOATING_POINT_SUPPORTED\n#undef PNGTEST_TIMING\n#endif\n\n#ifdef PNGTEST_TIMING\nstatic float t_start, t_stop, t_decode, t_encode, t_misc;\n#include <time.h>\n#endif\n\n#ifdef PNG_TIME_RFC1123_SUPPORTED\n#define PNG_tIME_STRING_LENGTH 29\nstatic int tIME_chunk_present = 0;\nstatic char tIME_string[PNG_tIME_STRING_LENGTH] = \"tIME chunk is not present\";\n#endif\n\nstatic int verbose = 0;\n\nint test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname));\n\n#ifdef __TURBOC__\n#include <mem.h>\n#endif\n\n/* Defined so I can write to a file on gui/windowing platforms */\n/*  #define STDERR stderr  */\n#define STDERR stdout   /* For DOS */\n\n/* In case a system header (e.g., on AIX) defined jmpbuf */\n#ifdef jmpbuf\n#  undef jmpbuf\n#endif\n\n/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */\n#ifndef png_jmpbuf\n#  define png_jmpbuf(png_ptr) png_ptr->jmpbuf\n#endif\n\n/* Example of using row callbacks to make a simple progress meter */\nstatic int status_pass = 1;\nstatic int status_dots_requested = 0;\nstatic int status_dots = 1;\n\nvoid\n#ifdef PNG_1_0_X\nPNGAPI\n#endif\nread_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);\nvoid\n#ifdef PNG_1_0_X\nPNGAPI\n#endif\nread_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)\n{\n   if (png_ptr == NULL || row_number > PNG_UINT_31_MAX)\n      return;\n   if (status_pass != pass)\n   {\n      fprintf(stdout, \"\\n Pass %d: \", pass);\n      status_pass = pass;\n      status_dots = 31;\n   }\n   status_dots--;\n   if (status_dots == 0)\n   {\n      fprintf(stdout, \"\\n         \");\n      status_dots=30;\n   }\n   fprintf(stdout, \"r\");\n}\n\nvoid\n#ifdef PNG_1_0_X\nPNGAPI\n#endif\nwrite_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);\nvoid\n#ifdef PNG_1_0_X\nPNGAPI\n#endif\nwrite_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)\n{\n   if (png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7)\n      return;\n   fprintf(stdout, \"w\");\n}\n\n\n#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\n/* Example of using user transform callback (we don't transform anything,\n * but merely examine the row filters.  We set this to 256 rather than\n * 5 in case illegal filter values are present.)\n */\nstatic png_uint_32 filters_used[256];\nvoid\n#ifdef PNG_1_0_X\nPNGAPI\n#endif\ncount_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data);\nvoid\n#ifdef PNG_1_0_X\nPNGAPI\n#endif\ncount_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)\n{\n   if (png_ptr != NULL && row_info != NULL)\n      ++filters_used[*(data - 1)];\n}\n#endif\n\n#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED\n/* Example of using user transform callback (we don't transform anything,\n * but merely count the zero samples)\n */\n\nstatic png_uint_32 zero_samples;\n\nvoid\n#ifdef PNG_1_0_X\nPNGAPI\n#endif\ncount_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data);\nvoid\n#ifdef PNG_1_0_X\nPNGAPI\n#endif\ncount_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)\n{\n   png_bytep dp = data;\n   if (png_ptr == NULL)return;\n\n   /* Contents of row_info:\n    *  png_uint_32 width      width of row\n    *  png_uint_32 rowbytes   number of bytes in row\n    *  png_byte color_type    color type of pixels\n    *  png_byte bit_depth     bit depth of samples\n    *  png_byte channels      number of channels (1-4)\n    *  png_byte pixel_depth   bits per pixel (depth*channels)\n    */\n\n    /* Counts the number of zero samples (or zero pixels if color_type is 3 */\n\n    if (row_info->color_type == 0 || row_info->color_type == 3)\n    {\n       int pos = 0;\n       png_uint_32 n, nstop;\n       for (n = 0, nstop=row_info->width; n<nstop; n++)\n       {\n          if (row_info->bit_depth == 1)\n          {\n             if (((*dp << pos++ ) & 0x80) == 0)\n                zero_samples++;\n             if (pos == 8)\n             {\n                pos = 0;\n                dp++;\n             }\n          }\n          if (row_info->bit_depth == 2)\n          {\n             if (((*dp << (pos+=2)) & 0xc0) == 0)\n                zero_samples++;\n             if (pos == 8)\n             {\n                pos = 0;\n                dp++;\n             }\n          }\n          if (row_info->bit_depth == 4)\n          {\n             if (((*dp << (pos+=4)) & 0xf0) == 0)\n                zero_samples++;\n             if (pos == 8)\n             {\n                pos = 0;\n                dp++;\n             }\n          }\n          if (row_info->bit_depth == 8)\n             if (*dp++ == 0)\n                zero_samples++;\n          if (row_info->bit_depth == 16)\n          {\n             if ((*dp | *(dp+1)) == 0)\n                zero_samples++;\n             dp+=2;\n          }\n       }\n    }\n    else /* Other color types */\n    {\n       png_uint_32 n, nstop;\n       int channel;\n       int color_channels = row_info->channels;\n       if (row_info->color_type > 3)color_channels--;\n\n       for (n = 0, nstop=row_info->width; n<nstop; n++)\n       {\n          for (channel = 0; channel < color_channels; channel++)\n          {\n             if (row_info->bit_depth == 8)\n                if (*dp++ == 0)\n                   zero_samples++;\n             if (row_info->bit_depth == 16)\n             {\n                if ((*dp | *(dp+1)) == 0)\n                   zero_samples++;\n                dp+=2;\n             }\n          }\n          if (row_info->color_type > 3)\n          {\n             dp++;\n             if (row_info->bit_depth == 16)\n                dp++;\n          }\n       }\n    }\n}\n#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */\n\nstatic int wrote_question = 0;\n\n#ifndef PNG_STDIO_SUPPORTED\n/* START of code to validate stdio-free compilation */\n/* These copies of the default read/write functions come from pngrio.c and\n * pngwio.c.  They allow \"don't include stdio\" testing of the library.\n * This is the function that does the actual reading of data.  If you are\n * not reading from a standard C stream, you should create a replacement\n * read_data function and use it at run time with png_set_read_fn(), rather\n * than changing the library.\n */\n\n#ifndef USE_FAR_KEYWORD\nstatic void\npngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   png_size_t check = 0;\n   png_voidp io_ptr;\n\n   /* fread() returns 0 on error, so it is OK to store this in a png_size_t\n    * instead of an int, which is what fread() actually returns.\n    */\n   io_ptr = png_get_io_ptr(png_ptr);\n   if (io_ptr != NULL)\n   {\n      READFILE((png_FILE_p)io_ptr, data, length, check);\n   }\n\n   if (check != length)\n   {\n      png_error(png_ptr, \"Read Error!\");\n   }\n}\n#else\n/* This is the model-independent version. Since the standard I/O library\n   can't handle far buffers in the medium and small models, we have to copy\n   the data.\n*/\n\n#define NEAR_BUF_SIZE 1024\n#define MIN(a,b) (a <= b ? a : b)\n\nstatic void\npngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   int check;\n   png_byte *n_data;\n   png_FILE_p io_ptr;\n\n   /* Check if data really is near. If so, use usual code. */\n   n_data = (png_byte *)CVT_PTR_NOCHECK(data);\n   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);\n   if ((png_bytep)n_data == data)\n   {\n      READFILE(io_ptr, n_data, length, check);\n   }\n   else\n   {\n      png_byte buf[NEAR_BUF_SIZE];\n      png_size_t read, remaining, err;\n      check = 0;\n      remaining = length;\n      do\n      {\n         read = MIN(NEAR_BUF_SIZE, remaining);\n         READFILE(io_ptr, buf, 1, err);\n         png_memcpy(data, buf, read); /* Copy far buffer to near buffer */\n         if (err != read)\n            break;\n         else\n            check += err;\n         data += read;\n         remaining -= read;\n      }\n      while (remaining != 0);\n   }\n   if (check != length)\n      png_error(png_ptr, \"read Error\");\n}\n#endif /* USE_FAR_KEYWORD */\n\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\nstatic void\npngtest_flush(png_structp png_ptr)\n{\n   /* Do nothing; fflush() is said to be just a waste of energy. */\n   png_ptr = png_ptr;  /* Stifle compiler warning */\n}\n#endif\n\n/* This is the function that does the actual writing of data.  If you are\n * not writing to a standard C stream, you should create a replacement\n * write_data function and use it at run time with png_set_write_fn(), rather\n * than changing the library.\n */\n#ifndef USE_FAR_KEYWORD\nstatic void\npngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   png_uint_32 check;\n\n   WRITEFILE((png_FILE_p)png_ptr->io_ptr,  data, length, check);\n   if (check != length)\n   {\n      png_error(png_ptr, \"Write Error\");\n   }\n}\n#else\n/* This is the model-independent version. Since the standard I/O library\n   can't handle far buffers in the medium and small models, we have to copy\n   the data.\n*/\n\n#define NEAR_BUF_SIZE 1024\n#define MIN(a,b) (a <= b ? a : b)\n\nstatic void\npngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   png_uint_32 check;\n   png_byte *near_data;  /* Needs to be \"png_byte *\" instead of \"png_bytep\" */\n   png_FILE_p io_ptr;\n\n   /* Check if data really is near. If so, use usual code. */\n   near_data = (png_byte *)CVT_PTR_NOCHECK(data);\n   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);\n   if ((png_bytep)near_data == data)\n   {\n      WRITEFILE(io_ptr, near_data, length, check);\n   }\n   else\n   {\n      png_byte buf[NEAR_BUF_SIZE];\n      png_size_t written, remaining, err;\n      check = 0;\n      remaining = length;\n      do\n      {\n         written = MIN(NEAR_BUF_SIZE, remaining);\n         png_memcpy(buf, data, written); /* Copy far buffer to near buffer */\n         WRITEFILE(io_ptr, buf, written, err);\n         if (err != written)\n            break;\n         else\n            check += err;\n         data += written;\n         remaining -= written;\n      }\n      while (remaining != 0);\n   }\n   if (check != length)\n   {\n      png_error(png_ptr, \"Write Error\");\n   }\n}\n#endif /* USE_FAR_KEYWORD */\n\n/* This function is called when there is a warning, but the library thinks\n * it can continue anyway.  Replacement functions don't have to do anything\n * here if you don't want to.  In the default configuration, png_ptr is\n * not used, but it is passed in case it may be useful.\n */\nstatic void\npngtest_warning(png_structp png_ptr, png_const_charp message)\n{\n   PNG_CONST char *name = \"UNKNOWN (ERROR!)\";\n   char *test;\n   test = png_get_error_ptr(png_ptr);\n   if (test == NULL)\n     fprintf(STDERR, \"%s: libpng warning: %s\\n\", name, message);\n   else\n     fprintf(STDERR, \"%s: libpng warning: %s\\n\", test, message);\n}\n\n/* This is the default error handling function.  Note that replacements for\n * this function MUST NOT RETURN, or the program will likely crash.  This\n * function is used by default, or if the program supplies NULL for the\n * error function pointer in png_set_error_fn().\n */\nstatic void\npngtest_error(png_structp png_ptr, png_const_charp message)\n{\n   pngtest_warning(png_ptr, message);\n   /* We can return because png_error calls the default handler, which is\n    * actually OK in this case.\n    */\n}\n#endif /* !PNG_STDIO_SUPPORTED */\n/* END of code to validate stdio-free compilation */\n\n/* START of code to validate memory allocation and deallocation */\n#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG\n\n/* Allocate memory.  For reasonable files, size should never exceed\n * 64K.  However, zlib may allocate more then 64K if you don't tell\n * it not to.  See zconf.h and png.h for more information.  zlib does\n * need to allocate exactly 64K, so whatever you call here must\n * have the ability to do that.\n *\n * This piece of code can be compiled to validate max 64K allocations\n * by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K.\n */\ntypedef struct memory_information\n{\n   png_uint_32               size;\n   png_voidp                 pointer;\n   struct memory_information FAR *next;\n} memory_information;\ntypedef memory_information FAR *memory_infop;\n\nstatic memory_infop pinformation = NULL;\nstatic int current_allocation = 0;\nstatic int maximum_allocation = 0;\nstatic int total_allocation = 0;\nstatic int num_allocations = 0;\n\npng_voidp png_debug_malloc PNGARG((png_structp png_ptr, png_uint_32 size));\nvoid png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr));\n\npng_voidp\npng_debug_malloc(png_structp png_ptr, png_uint_32 size)\n{\n\n   /* png_malloc has already tested for NULL; png_create_struct calls\n    * png_debug_malloc directly, with png_ptr == NULL which is OK\n    */\n\n   if (size == 0)\n      return (NULL);\n\n   /* This calls the library allocator twice, once to get the requested\n      buffer and once to get a new free list entry. */\n   {\n      /* Disable malloc_fn and free_fn */\n      memory_infop pinfo;\n      png_set_mem_fn(png_ptr, NULL, NULL, NULL);\n      pinfo = (memory_infop)png_malloc(png_ptr,\n         (png_uint_32)png_sizeof(*pinfo));\n      pinfo->size = size;\n      current_allocation += size;\n      total_allocation += size;\n      num_allocations ++;\n      if (current_allocation > maximum_allocation)\n         maximum_allocation = current_allocation;\n      pinfo->pointer = (png_voidp)png_malloc(png_ptr, size);\n      /* Restore malloc_fn and free_fn */\n      png_set_mem_fn(png_ptr,\n          png_voidp_NULL, (png_malloc_ptr)png_debug_malloc,\n          (png_free_ptr)png_debug_free);\n      if (size != 0 && pinfo->pointer == NULL)\n      {\n         current_allocation -= size;\n         total_allocation -= size;\n         png_error(png_ptr,\n           \"out of memory in pngtest->png_debug_malloc.\");\n      }\n      pinfo->next = pinformation;\n      pinformation = pinfo;\n      /* Make sure the caller isn't assuming zeroed memory. */\n      png_memset(pinfo->pointer, 0xdd, pinfo->size);\n      if (verbose)\n         printf(\"png_malloc %lu bytes at %x\\n\", (unsigned long)size,\n            pinfo->pointer);\n      return (png_voidp)(pinfo->pointer);\n   }\n}\n\n/* Free a pointer.  It is removed from the list at the same time. */\nvoid\npng_debug_free(png_structp png_ptr, png_voidp ptr)\n{\n   if (png_ptr == NULL)\n      fprintf(STDERR, \"NULL pointer to png_debug_free.\\n\");\n   if (ptr == 0)\n   {\n#if 0 /* This happens all the time. */\n      fprintf(STDERR, \"WARNING: freeing NULL pointer\\n\");\n#endif\n      return;\n   }\n\n   /* Unlink the element from the list. */\n   {\n      memory_infop FAR *ppinfo = &pinformation;\n      for (;;)\n      {\n         memory_infop pinfo = *ppinfo;\n         if (pinfo->pointer == ptr)\n         {\n            *ppinfo = pinfo->next;\n            current_allocation -= pinfo->size;\n            if (current_allocation < 0)\n               fprintf(STDERR, \"Duplicate free of memory\\n\");\n            /* We must free the list element too, but first kill\n               the memory that is to be freed. */\n            png_memset(ptr, 0x55, pinfo->size);\n            png_free_default(png_ptr, pinfo);\n            pinfo = NULL;\n            break;\n         }\n         if (pinfo->next == NULL)\n         {\n            fprintf(STDERR, \"Pointer %x not found\\n\", (unsigned int)ptr);\n            break;\n         }\n         ppinfo = &pinfo->next;\n      }\n   }\n\n   /* Finally free the data. */\n   if (verbose)\n      printf(\"Freeing %x\\n\", ptr);\n   png_free_default(png_ptr, ptr);\n   ptr = NULL;\n}\n#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */\n/* END of code to test memory allocation/deallocation */\n\n\n/* Demonstration of user chunk support of the sTER and vpAg chunks */\n#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\n\n/* (sTER is a public chunk not yet known by libpng.  vpAg is a private\nchunk used in ImageMagick to store \"virtual page\" size).  */\n\nstatic png_uint_32 user_chunk_data[4];\n\n    /* 0: sTER mode + 1\n     * 1: vpAg width\n     * 2: vpAg height\n     * 3: vpAg units\n     */\n\nstatic int read_user_chunk_callback(png_struct *png_ptr,\n   png_unknown_chunkp chunk)\n{\n   png_uint_32\n     *my_user_chunk_data;\n\n   /* Return one of the following:\n    *    return (-n);  chunk had an error\n    *    return (0);  did not recognize\n    *    return (n);  success\n    *\n    * The unknown chunk structure contains the chunk data:\n    * png_byte name[5];\n    * png_byte *data;\n    * png_size_t size;\n    *\n    * Note that libpng has already taken care of the CRC handling.\n    */\n\n   if (chunk->name[0] == 115 && chunk->name[1] ==  84 &&     /* s  T */\n       chunk->name[2] ==  69 && chunk->name[3] ==  82)       /* E  R */\n      {\n         /* Found sTER chunk */\n         if (chunk->size != 1)\n            return (-1); /* Error return */\n         if (chunk->data[0] != 0 && chunk->data[0] != 1)\n            return (-1);  /* Invalid mode */\n         my_user_chunk_data=(png_uint_32 *) png_get_user_chunk_ptr(png_ptr);\n         my_user_chunk_data[0]=chunk->data[0]+1;\n         return (1);\n      }\n\n   if (chunk->name[0] != 118 || chunk->name[1] != 112 ||    /* v  p */\n       chunk->name[2] !=  65 || chunk->name[3] != 103)      /* A  g */\n      return (0); /* Did not recognize */\n\n   /* Found ImageMagick vpAg chunk */\n\n   if (chunk->size != 9)\n      return (-1); /* Error return */\n\n   my_user_chunk_data=(png_uint_32 *) png_get_user_chunk_ptr(png_ptr);\n\n   my_user_chunk_data[1]=png_get_uint_31(png_ptr, chunk->data);\n   my_user_chunk_data[2]=png_get_uint_31(png_ptr, chunk->data + 4);\n   my_user_chunk_data[3]=(png_uint_32)chunk->data[8];\n\n   return (1);\n\n}\n#endif\n/* END of code to demonstrate user chunk support */\n\n/* Test one file */\nint\ntest_one_file(PNG_CONST char *inname, PNG_CONST char *outname)\n{\n   static png_FILE_p fpin;\n   static png_FILE_p fpout;  /* \"static\" prevents setjmp corruption */\n   png_structp read_ptr;\n   png_infop read_info_ptr, end_info_ptr;\n#ifdef PNG_WRITE_SUPPORTED\n   png_structp write_ptr;\n   png_infop write_info_ptr;\n   png_infop write_end_info_ptr;\n#else\n   png_structp write_ptr = NULL;\n   png_infop write_info_ptr = NULL;\n   png_infop write_end_info_ptr = NULL;\n#endif\n   png_bytep row_buf;\n   png_uint_32 y;\n   png_uint_32 width, height;\n   int num_pass, pass;\n   int bit_depth, color_type;\n#ifdef PNG_SETJMP_SUPPORTED\n#ifdef USE_FAR_KEYWORD\n   jmp_buf jmpbuf;\n#endif\n#endif\n\n#ifdef _WIN32_WCE\n   TCHAR path[MAX_PATH];\n#endif\n   char inbuf[256], outbuf[256];\n\n   row_buf = NULL;\n\n#ifdef _WIN32_WCE\n   MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH);\n   if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0,\n       NULL)) == INVALID_HANDLE_VALUE)\n#else\n   if ((fpin = fopen(inname, \"rb\")) == NULL)\n#endif\n   {\n      fprintf(STDERR, \"Could not find input file %s\\n\", inname);\n      return (1);\n   }\n\n#ifdef _WIN32_WCE\n   MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH);\n   if ((fpout = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,\n       0, NULL)) == INVALID_HANDLE_VALUE)\n#else\n   if ((fpout = fopen(outname, \"wb\")) == NULL)\n#endif\n   {\n      fprintf(STDERR, \"Could not open output file %s\\n\", outname);\n      FCLOSE(fpin);\n      return (1);\n   }\n\n   png_debug(0, \"Allocating read and write structures\");\n#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG\n   read_ptr =\n      png_create_read_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL,\n      png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL,\n      (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free);\n#else\n   read_ptr =\n      png_create_read_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,\n      png_error_ptr_NULL, png_error_ptr_NULL);\n#endif\n#ifndef PNG_STDIO_SUPPORTED\n   png_set_error_fn(read_ptr, (png_voidp)inname, pngtest_error,\n       pngtest_warning);\n#endif\n\n#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\n   user_chunk_data[0] = 0;\n   user_chunk_data[1] = 0;\n   user_chunk_data[2] = 0;\n   user_chunk_data[3] = 0;\n   png_set_read_user_chunk_fn(read_ptr, user_chunk_data,\n     read_user_chunk_callback);\n\n#endif\n#ifdef PNG_WRITE_SUPPORTED\n#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG\n   write_ptr =\n      png_create_write_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL,\n      png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL,\n      (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free);\n#else\n   write_ptr =\n      png_create_write_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,\n      png_error_ptr_NULL, png_error_ptr_NULL);\n#endif\n#ifndef PNG_STDIO_SUPPORTED\n   png_set_error_fn(write_ptr, (png_voidp)inname, pngtest_error,\n       pngtest_warning);\n#endif\n#endif\n   png_debug(0, \"Allocating read_info, write_info and end_info structures\");\n   read_info_ptr = png_create_info_struct(read_ptr);\n   end_info_ptr = png_create_info_struct(read_ptr);\n#ifdef PNG_WRITE_SUPPORTED\n   write_info_ptr = png_create_info_struct(write_ptr);\n   write_end_info_ptr = png_create_info_struct(write_ptr);\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n   png_debug(0, \"Setting jmpbuf for read struct\");\n#ifdef USE_FAR_KEYWORD\n   if (setjmp(jmpbuf))\n#else\n   if (setjmp(png_jmpbuf(read_ptr)))\n#endif\n   {\n      fprintf(STDERR, \"%s -> %s: libpng read error\\n\", inname, outname);\n      png_free(read_ptr, row_buf);\n      row_buf = NULL;\n      png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);\n#ifdef PNG_WRITE_SUPPORTED\n      png_destroy_info_struct(write_ptr, &write_end_info_ptr);\n      png_destroy_write_struct(&write_ptr, &write_info_ptr);\n#endif\n      FCLOSE(fpin);\n      FCLOSE(fpout);\n      return (1);\n   }\n#ifdef USE_FAR_KEYWORD\n   png_memcpy(png_jmpbuf(read_ptr), jmpbuf, png_sizeof(jmp_buf));\n#endif\n\n#ifdef PNG_WRITE_SUPPORTED\n   png_debug(0, \"Setting jmpbuf for write struct\");\n#ifdef USE_FAR_KEYWORD\n   if (setjmp(jmpbuf))\n#else\n   if (setjmp(png_jmpbuf(write_ptr)))\n#endif\n   {\n      fprintf(STDERR, \"%s -> %s: libpng write error\\n\", inname, outname);\n      png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);\n      png_destroy_info_struct(write_ptr, &write_end_info_ptr);\n#ifdef PNG_WRITE_SUPPORTED\n      png_destroy_write_struct(&write_ptr, &write_info_ptr);\n#endif\n      FCLOSE(fpin);\n      FCLOSE(fpout);\n      return (1);\n   }\n#ifdef USE_FAR_KEYWORD\n   png_memcpy(png_jmpbuf(write_ptr), jmpbuf, png_sizeof(jmp_buf));\n#endif\n#endif\n#endif\n\n   png_debug(0, \"Initializing input and output streams\");\n#ifdef PNG_STDIO_SUPPORTED\n   png_init_io(read_ptr, fpin);\n#  ifdef PNG_WRITE_SUPPORTED\n   png_init_io(write_ptr, fpout);\n#  endif\n#else\n   png_set_read_fn(read_ptr, (png_voidp)fpin, pngtest_read_data);\n#  ifdef PNG_WRITE_SUPPORTED\n   png_set_write_fn(write_ptr, (png_voidp)fpout,  pngtest_write_data,\n#    ifdef PNG_WRITE_FLUSH_SUPPORTED\n      pngtest_flush);\n#    else\n      NULL);\n#    endif\n#  endif\n#endif\n   if (status_dots_requested == 1)\n   {\n#ifdef PNG_WRITE_SUPPORTED\n      png_set_write_status_fn(write_ptr, write_row_callback);\n#endif\n      png_set_read_status_fn(read_ptr, read_row_callback);\n   }\n   else\n   {\n#ifdef PNG_WRITE_SUPPORTED\n      png_set_write_status_fn(write_ptr, png_write_status_ptr_NULL);\n#endif\n      png_set_read_status_fn(read_ptr, png_read_status_ptr_NULL);\n   }\n\n#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\n   {\n      int i;\n      for (i = 0; i<256; i++)\n         filters_used[i] = 0;\n      png_set_read_user_transform_fn(read_ptr, count_filters);\n   }\n#endif\n#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED\n   zero_samples = 0;\n   png_set_write_user_transform_fn(write_ptr, count_zero_samples);\n#endif\n\n#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED\n#  ifndef PNG_HANDLE_CHUNK_ALWAYS\n#    define PNG_HANDLE_CHUNK_ALWAYS       3\n#  endif\n   png_set_keep_unknown_chunks(read_ptr, PNG_HANDLE_CHUNK_ALWAYS,\n      png_bytep_NULL, 0);\n#endif\n#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\n#  ifndef PNG_HANDLE_CHUNK_IF_SAFE\n#    define PNG_HANDLE_CHUNK_IF_SAFE      2\n#  endif\n   png_set_keep_unknown_chunks(write_ptr, PNG_HANDLE_CHUNK_IF_SAFE,\n      png_bytep_NULL, 0);\n#endif\n\n   png_debug(0, \"Reading info struct\");\n   png_read_info(read_ptr, read_info_ptr);\n\n   png_debug(0, \"Transferring info struct\");\n   {\n      int interlace_type, compression_type, filter_type;\n\n      if (png_get_IHDR(read_ptr, read_info_ptr, &width, &height, &bit_depth,\n          &color_type, &interlace_type, &compression_type, &filter_type))\n      {\n         png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth,\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n            color_type, interlace_type, compression_type, filter_type);\n#else\n            color_type, PNG_INTERLACE_NONE, compression_type, filter_type);\n#endif\n      }\n   }\n#ifdef PNG_FIXED_POINT_SUPPORTED\n#ifdef PNG_cHRM_SUPPORTED\n   {\n      png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x,\n         blue_y;\n      if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y,\n         &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y))\n      {\n         png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x,\n            red_y, green_x, green_y, blue_x, blue_y);\n      }\n   }\n#endif\n#ifdef PNG_gAMA_SUPPORTED\n   {\n      png_fixed_point gamma;\n\n      if (png_get_gAMA_fixed(read_ptr, read_info_ptr, &gamma))\n         png_set_gAMA_fixed(write_ptr, write_info_ptr, gamma);\n   }\n#endif\n#else /* Use floating point versions */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n#ifdef PNG_cHRM_SUPPORTED\n   {\n      double white_x, white_y, red_x, red_y, green_x, green_y, blue_x,\n         blue_y;\n      if (png_get_cHRM(read_ptr, read_info_ptr, &white_x, &white_y, &red_x,\n         &red_y, &green_x, &green_y, &blue_x, &blue_y))\n      {\n         png_set_cHRM(write_ptr, write_info_ptr, white_x, white_y, red_x,\n            red_y, green_x, green_y, blue_x, blue_y);\n      }\n   }\n#endif\n#ifdef PNG_gAMA_SUPPORTED\n   {\n      double gamma;\n\n      if (png_get_gAMA(read_ptr, read_info_ptr, &gamma))\n         png_set_gAMA(write_ptr, write_info_ptr, gamma);\n   }\n#endif\n#endif /* Floating point */\n#endif /* Fixed point */\n#ifdef PNG_iCCP_SUPPORTED\n   {\n      png_charp name;\n      png_charp profile;\n      png_uint_32 proflen;\n      int compression_type;\n\n      if (png_get_iCCP(read_ptr, read_info_ptr, &name, &compression_type,\n                      &profile, &proflen))\n      {\n         png_set_iCCP(write_ptr, write_info_ptr, name, compression_type,\n                      profile, proflen);\n      }\n   }\n#endif\n#ifdef PNG_sRGB_SUPPORTED\n   {\n      int intent;\n\n      if (png_get_sRGB(read_ptr, read_info_ptr, &intent))\n         png_set_sRGB(write_ptr, write_info_ptr, intent);\n   }\n#endif\n   {\n      png_colorp palette;\n      int num_palette;\n\n      if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette))\n         png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette);\n   }\n#ifdef PNG_bKGD_SUPPORTED\n   {\n      png_color_16p background;\n\n      if (png_get_bKGD(read_ptr, read_info_ptr, &background))\n      {\n         png_set_bKGD(write_ptr, write_info_ptr, background);\n      }\n   }\n#endif\n#ifdef PNG_hIST_SUPPORTED\n   {\n      png_uint_16p hist;\n\n      if (png_get_hIST(read_ptr, read_info_ptr, &hist))\n         png_set_hIST(write_ptr, write_info_ptr, hist);\n   }\n#endif\n#ifdef PNG_oFFs_SUPPORTED\n   {\n      png_int_32 offset_x, offset_y;\n      int unit_type;\n\n      if (png_get_oFFs(read_ptr, read_info_ptr, &offset_x, &offset_y,\n          &unit_type))\n      {\n         png_set_oFFs(write_ptr, write_info_ptr, offset_x, offset_y, unit_type);\n      }\n   }\n#endif\n#ifdef PNG_pCAL_SUPPORTED\n   {\n      png_charp purpose, units;\n      png_charpp params;\n      png_int_32 X0, X1;\n      int type, nparams;\n\n      if (png_get_pCAL(read_ptr, read_info_ptr, &purpose, &X0, &X1, &type,\n         &nparams, &units, &params))\n      {\n         png_set_pCAL(write_ptr, write_info_ptr, purpose, X0, X1, type,\n            nparams, units, params);\n      }\n   }\n#endif\n#ifdef PNG_pHYs_SUPPORTED\n   {\n      png_uint_32 res_x, res_y;\n      int unit_type;\n\n      if (png_get_pHYs(read_ptr, read_info_ptr, &res_x, &res_y, &unit_type))\n         png_set_pHYs(write_ptr, write_info_ptr, res_x, res_y, unit_type);\n   }\n#endif\n#ifdef PNG_sBIT_SUPPORTED\n   {\n      png_color_8p sig_bit;\n\n      if (png_get_sBIT(read_ptr, read_info_ptr, &sig_bit))\n         png_set_sBIT(write_ptr, write_info_ptr, sig_bit);\n   }\n#endif\n#ifdef PNG_sCAL_SUPPORTED\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n   {\n      int unit;\n      double scal_width, scal_height;\n\n      if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width,\n         &scal_height))\n      {\n         png_set_sCAL(write_ptr, write_info_ptr, unit, scal_width, scal_height);\n      }\n   }\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\n   {\n      int unit;\n      png_charp scal_width, scal_height;\n\n      if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width,\n          &scal_height))\n      {\n         png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width,\n             scal_height);\n      }\n   }\n#endif\n#endif\n#endif\n#ifdef PNG_TEXT_SUPPORTED\n   {\n      png_textp text_ptr;\n      int num_text;\n\n      if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0)\n      {\n         png_debug1(0, \"Handling %d iTXt/tEXt/zTXt chunks\", num_text);\n         png_set_text(write_ptr, write_info_ptr, text_ptr, num_text);\n      }\n   }\n#endif\n#ifdef PNG_tIME_SUPPORTED\n   {\n      png_timep mod_time;\n\n      if (png_get_tIME(read_ptr, read_info_ptr, &mod_time))\n      {\n         png_set_tIME(write_ptr, write_info_ptr, mod_time);\n#ifdef PNG_TIME_RFC1123_SUPPORTED\n         /* We have to use png_memcpy instead of \"=\" because the string\n          * pointed to by png_convert_to_rfc1123() gets free'ed before\n          * we use it.\n          */\n         png_memcpy(tIME_string,\n                    png_convert_to_rfc1123(read_ptr, mod_time),\n                    png_sizeof(tIME_string));\n         tIME_string[png_sizeof(tIME_string) - 1] = '\\0';\n         tIME_chunk_present++;\n#endif /* PNG_TIME_RFC1123_SUPPORTED */\n      }\n   }\n#endif\n#ifdef PNG_tRNS_SUPPORTED\n   {\n      png_bytep trans;\n      int num_trans;\n      png_color_16p trans_values;\n\n      if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans,\n         &trans_values))\n      {\n         int sample_max = (1 << bit_depth);\n         /* libpng doesn't reject a tRNS chunk with out-of-range samples */\n         if (!((color_type == PNG_COLOR_TYPE_GRAY &&\n             (int)trans_values->gray > sample_max) ||\n             (color_type == PNG_COLOR_TYPE_RGB &&\n             ((int)trans_values->red > sample_max ||\n             (int)trans_values->green > sample_max ||\n             (int)trans_values->blue > sample_max))))\n            png_set_tRNS(write_ptr, write_info_ptr, trans, num_trans,\n               trans_values);\n      }\n   }\n#endif\n#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\n   {\n      png_unknown_chunkp unknowns;\n      int num_unknowns = (int)png_get_unknown_chunks(read_ptr, read_info_ptr,\n         &unknowns);\n      if (num_unknowns)\n      {\n         png_size_t i;\n         png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns,\n           num_unknowns);\n         /* Copy the locations from the read_info_ptr.  The automatically\n          * generated locations in write_info_ptr are wrong because we\n          * haven't written anything yet.\n          */\n         for (i = 0; i < (png_size_t)num_unknowns; i++)\n           png_set_unknown_chunk_location(write_ptr, write_info_ptr, i,\n             unknowns[i].location);\n      }\n   }\n#endif\n\n#ifdef PNG_WRITE_SUPPORTED\n   png_debug(0, \"Writing info struct\");\n\n/* If we wanted, we could write info in two steps:\n * png_write_info_before_PLTE(write_ptr, write_info_ptr);\n */\n   png_write_info(write_ptr, write_info_ptr);\n\n#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\n   if (user_chunk_data[0] != 0)\n   {\n      png_byte png_sTER[5] = {115,  84,  69,  82, '\\0'};\n\n      unsigned char\n        ster_chunk_data[1];\n\n      if (verbose)\n         fprintf(STDERR, \"\\n stereo mode = %lu\\n\",\n           (unsigned long)(user_chunk_data[0] - 1));\n      ster_chunk_data[0]=(unsigned char)(user_chunk_data[0] - 1);\n      png_write_chunk(write_ptr, png_sTER, ster_chunk_data, 1);\n   }\n   if (user_chunk_data[1] != 0 || user_chunk_data[2] != 0)\n   {\n      png_byte png_vpAg[5] = {118, 112,  65, 103, '\\0'};\n\n      unsigned char\n        vpag_chunk_data[9];\n\n      if (verbose)\n         fprintf(STDERR, \" vpAg = %lu x %lu, units = %lu\\n\",\n           (unsigned long)user_chunk_data[1],\n           (unsigned long)user_chunk_data[2],\n           (unsigned long)user_chunk_data[3]);\n      png_save_uint_32(vpag_chunk_data, user_chunk_data[1]);\n      png_save_uint_32(vpag_chunk_data + 4, user_chunk_data[2]);\n      vpag_chunk_data[8] = (unsigned char)(user_chunk_data[3] & 0xff);\n      png_write_chunk(write_ptr, png_vpAg, vpag_chunk_data, 9);\n   }\n\n#endif\n#endif\n\n#ifdef SINGLE_ROWBUF_ALLOC\n   png_debug(0, \"Allocating row buffer...\");\n   row_buf = (png_bytep)png_malloc(read_ptr,\n      png_get_rowbytes(read_ptr, read_info_ptr));\n   png_debug1(0, \"0x%08lx\", (unsigned long)row_buf);\n#endif /* SINGLE_ROWBUF_ALLOC */\n   png_debug(0, \"Writing row data\");\n\n#if defined(PNG_READ_INTERLACING_SUPPORTED) || \\\n  defined(PNG_WRITE_INTERLACING_SUPPORTED)\n   num_pass = png_set_interlace_handling(read_ptr);\n#  ifdef PNG_WRITE_SUPPORTED\n   png_set_interlace_handling(write_ptr);\n#  endif\n#else\n   num_pass = 1;\n#endif\n\n#ifdef PNGTEST_TIMING\n   t_stop = (float)clock();\n   t_misc += (t_stop - t_start);\n   t_start = t_stop;\n#endif\n   for (pass = 0; pass < num_pass; pass++)\n   {\n      png_debug1(0, \"Writing row data for pass %d\", pass);\n      for (y = 0; y < height; y++)\n      {\n#ifndef SINGLE_ROWBUF_ALLOC\n         png_debug2(0, \"Allocating row buffer (pass %d, y = %ld)...\", pass, y);\n         row_buf = (png_bytep)png_malloc(read_ptr,\n            png_get_rowbytes(read_ptr, read_info_ptr));\n         png_debug2(0, \"0x%08lx (%ld bytes)\", (unsigned long)row_buf,\n            png_get_rowbytes(read_ptr, read_info_ptr));\n#endif /* !SINGLE_ROWBUF_ALLOC */\n         png_read_rows(read_ptr, (png_bytepp)&row_buf, png_bytepp_NULL, 1);\n\n#ifdef PNG_WRITE_SUPPORTED\n#ifdef PNGTEST_TIMING\n         t_stop = (float)clock();\n         t_decode += (t_stop - t_start);\n         t_start = t_stop;\n#endif\n         png_write_rows(write_ptr, (png_bytepp)&row_buf, 1);\n#ifdef PNGTEST_TIMING\n         t_stop = (float)clock();\n         t_encode += (t_stop - t_start);\n         t_start = t_stop;\n#endif\n#endif /* PNG_WRITE_SUPPORTED */\n\n#ifndef SINGLE_ROWBUF_ALLOC\n         png_debug2(0, \"Freeing row buffer (pass %d, y = %ld)\", pass, y);\n         png_free(read_ptr, row_buf);\n         row_buf = NULL;\n#endif /* !SINGLE_ROWBUF_ALLOC */\n      }\n   }\n\n#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED\n   png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1);\n#endif\n#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\n   png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1);\n#endif\n\n   png_debug(0, \"Reading and writing end_info data\");\n\n   png_read_end(read_ptr, end_info_ptr);\n#ifdef PNG_TEXT_SUPPORTED\n   {\n      png_textp text_ptr;\n      int num_text;\n\n      if (png_get_text(read_ptr, end_info_ptr, &text_ptr, &num_text) > 0)\n      {\n         png_debug1(0, \"Handling %d iTXt/tEXt/zTXt chunks\", num_text);\n         png_set_text(write_ptr, write_end_info_ptr, text_ptr, num_text);\n      }\n   }\n#endif\n#ifdef PNG_tIME_SUPPORTED\n   {\n      png_timep mod_time;\n\n      if (png_get_tIME(read_ptr, end_info_ptr, &mod_time))\n      {\n         png_set_tIME(write_ptr, write_end_info_ptr, mod_time);\n#ifdef PNG_TIME_RFC1123_SUPPORTED\n         /* We have to use png_memcpy instead of \"=\" because the string\n            pointed to by png_convert_to_rfc1123() gets free'ed before\n            we use it */\n         png_memcpy(tIME_string,\n                    png_convert_to_rfc1123(read_ptr, mod_time),\n                    png_sizeof(tIME_string));\n         tIME_string[png_sizeof(tIME_string) - 1] = '\\0';\n         tIME_chunk_present++;\n#endif /* PNG_TIME_RFC1123_SUPPORTED */\n      }\n   }\n#endif\n#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\n   {\n      png_unknown_chunkp unknowns;\n      int num_unknowns;\n      num_unknowns = (int)png_get_unknown_chunks(read_ptr, end_info_ptr,\n         &unknowns);\n      if (num_unknowns)\n      {\n         png_size_t i;\n         png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns,\n           num_unknowns);\n         /* Copy the locations from the read_info_ptr.  The automatically\n          * generated locations in write_end_info_ptr are wrong because we\n          * haven't written the end_info yet.\n          */\n         for (i = 0; i < (png_size_t)num_unknowns; i++)\n           png_set_unknown_chunk_location(write_ptr, write_end_info_ptr, i,\n             unknowns[i].location);\n      }\n   }\n#endif\n#ifdef PNG_WRITE_SUPPORTED\n   png_write_end(write_ptr, write_end_info_ptr);\n#endif\n\n#ifdef PNG_EASY_ACCESS_SUPPORTED\n   if (verbose)\n   {\n      png_uint_32 iwidth, iheight;\n      iwidth = png_get_image_width(write_ptr, write_info_ptr);\n      iheight = png_get_image_height(write_ptr, write_info_ptr);\n      fprintf(STDERR, \"\\n Image width = %lu, height = %lu\\n\",\n         (unsigned long)iwidth, (unsigned long)iheight);\n   }\n#endif\n\n   png_debug(0, \"Destroying data structs\");\n#ifdef SINGLE_ROWBUF_ALLOC\n   png_debug(1, \"destroying row_buf for read_ptr\");\n   png_free(read_ptr, row_buf);\n   row_buf = NULL;\n#endif /* SINGLE_ROWBUF_ALLOC */\n   png_debug(1, \"destroying read_ptr, read_info_ptr, end_info_ptr\");\n   png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);\n#ifdef PNG_WRITE_SUPPORTED\n   png_debug(1, \"destroying write_end_info_ptr\");\n   png_destroy_info_struct(write_ptr, &write_end_info_ptr);\n   png_debug(1, \"destroying write_ptr, write_info_ptr\");\n   png_destroy_write_struct(&write_ptr, &write_info_ptr);\n#endif\n   png_debug(0, \"Destruction complete.\");\n\n   FCLOSE(fpin);\n   FCLOSE(fpout);\n\n   png_debug(0, \"Opening files for comparison\");\n#ifdef _WIN32_WCE\n   MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH);\n   if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING,\n       0, NULL)) == INVALID_HANDLE_VALUE)\n#else\n   if ((fpin = fopen(inname, \"rb\")) == NULL)\n#endif\n   {\n      fprintf(STDERR, \"Could not find file %s\\n\", inname);\n      return (1);\n   }\n\n#ifdef _WIN32_WCE\n   MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH);\n   if ((fpout = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING,\n       0, NULL)) == INVALID_HANDLE_VALUE)\n#else\n   if ((fpout = fopen(outname, \"rb\")) == NULL)\n#endif\n   {\n      fprintf(STDERR, \"Could not find file %s\\n\", outname);\n      FCLOSE(fpin);\n      return (1);\n   }\n\n   for (;;)\n   {\n      png_size_t num_in, num_out;\n\n         READFILE(fpin, inbuf, 1, num_in);\n         READFILE(fpout, outbuf, 1, num_out);\n\n      if (num_in != num_out)\n      {\n         fprintf(STDERR, \"\\nFiles %s and %s are of a different size\\n\",\n                 inname, outname);\n         if (wrote_question == 0)\n         {\n            fprintf(STDERR,\n         \"   Was %s written with the same maximum IDAT chunk size (%d bytes),\",\n              inname, PNG_ZBUF_SIZE);\n            fprintf(STDERR,\n              \"\\n   filtering heuristic (libpng default), compression\");\n            fprintf(STDERR,\n              \" level (zlib default),\\n   and zlib version (%s)?\\n\\n\",\n              ZLIB_VERSION);\n            wrote_question = 1;\n         }\n         FCLOSE(fpin);\n         FCLOSE(fpout);\n         return (0);\n      }\n\n      if (!num_in)\n         break;\n\n      if (png_memcmp(inbuf, outbuf, num_in))\n      {\n         fprintf(STDERR, \"\\nFiles %s and %s are different\\n\", inname, outname);\n         if (wrote_question == 0)\n         {\n            fprintf(STDERR,\n         \"   Was %s written with the same maximum IDAT chunk size (%d bytes),\",\n                 inname, PNG_ZBUF_SIZE);\n            fprintf(STDERR,\n              \"\\n   filtering heuristic (libpng default), compression\");\n            fprintf(STDERR,\n              \" level (zlib default),\\n   and zlib version (%s)?\\n\\n\",\n              ZLIB_VERSION);\n            wrote_question = 1;\n         }\n         FCLOSE(fpin);\n         FCLOSE(fpout);\n         return (0);\n      }\n   }\n\n   FCLOSE(fpin);\n   FCLOSE(fpout);\n\n   return (0);\n}\n\n/* Input and output filenames */\n#ifdef RISCOS\nstatic PNG_CONST char *inname = \"pngtest/png\";\nstatic PNG_CONST char *outname = \"pngout/png\";\n#else\nstatic PNG_CONST char *inname = \"pngtest.png\";\nstatic PNG_CONST char *outname = \"pngout.png\";\n#endif\n\nint\nmain(int argc, char *argv[])\n{\n   int multiple = 0;\n   int ierror = 0;\n\n   fprintf(STDERR, \"\\n Testing libpng version %s\\n\", PNG_LIBPNG_VER_STRING);\n   fprintf(STDERR, \"   with zlib   version %s\\n\", ZLIB_VERSION);\n   fprintf(STDERR, \"%s\", png_get_copyright(NULL));\n   /* Show the version of libpng used in building the library */\n   fprintf(STDERR, \" library (%lu):%s\",\n      (unsigned long)png_access_version_number(),\n      png_get_header_version(NULL));\n   /* Show the version of libpng used in building the application */\n   fprintf(STDERR, \" pngtest (%lu):%s\", (unsigned long)PNG_LIBPNG_VER,\n      PNG_HEADER_VERSION_STRING);\n   fprintf(STDERR, \" sizeof(png_struct)=%ld, sizeof(png_info)=%ld\\n\",\n                    (long)png_sizeof(png_struct), (long)png_sizeof(png_info));\n\n   /* Do some consistency checking on the memory allocation settings, I'm\n    * not sure this matters, but it is nice to know, the first of these\n    * tests should be impossible because of the way the macros are set\n    * in pngconf.h\n    */\n#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)\n      fprintf(STDERR, \" NOTE: Zlib compiled for max 64k, libpng not\\n\");\n#endif\n   /* I think the following can happen. */\n#if !defined(MAXSEG_64K) && defined(PNG_MAX_MALLOC_64K)\n      fprintf(STDERR, \" NOTE: libpng compiled for max 64k, zlib not\\n\");\n#endif\n\n   if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING))\n   {\n      fprintf(STDERR,\n         \"Warning: versions are different between png.h and png.c\\n\");\n      fprintf(STDERR, \"  png.h version: %s\\n\", PNG_LIBPNG_VER_STRING);\n      fprintf(STDERR, \"  png.c version: %s\\n\\n\", png_libpng_ver);\n      ++ierror;\n   }\n\n   if (argc > 1)\n   {\n      if (strcmp(argv[1], \"-m\") == 0)\n      {\n         multiple = 1;\n         status_dots_requested = 0;\n      }\n      else if (strcmp(argv[1], \"-mv\") == 0 ||\n               strcmp(argv[1], \"-vm\") == 0 )\n      {\n         multiple = 1;\n         verbose = 1;\n         status_dots_requested = 1;\n      }\n      else if (strcmp(argv[1], \"-v\") == 0)\n      {\n         verbose = 1;\n         status_dots_requested = 1;\n         inname = argv[2];\n      }\n      else\n      {\n         inname = argv[1];\n         status_dots_requested = 0;\n      }\n   }\n\n   if (!multiple && argc == 3 + verbose)\n     outname = argv[2 + verbose];\n\n   if ((!multiple && argc > 3 + verbose) || (multiple && argc < 2))\n   {\n     fprintf(STDERR,\n       \"usage: %s [infile.png] [outfile.png]\\n\\t%s -m {infile.png}\\n\",\n        argv[0], argv[0]);\n     fprintf(STDERR,\n       \"  reads/writes one PNG file (without -m) or multiple files (-m)\\n\");\n     fprintf(STDERR,\n       \"  with -m %s is used as a temporary file\\n\", outname);\n     exit(1);\n   }\n\n   if (multiple)\n   {\n      int i;\n#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG\n      int allocation_now = current_allocation;\n#endif\n      for (i=2; i<argc; ++i)\n      {\n         int kerror;\n         fprintf(STDERR, \"\\n Testing %s:\", argv[i]);\n         kerror = test_one_file(argv[i], outname);\n         if (kerror == 0)\n         {\n#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\n            int k;\n#endif\n#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED\n            fprintf(STDERR, \"\\n PASS (%lu zero samples)\\n\",\n               (unsigned long)zero_samples);\n#else\n            fprintf(STDERR, \" PASS\\n\");\n#endif\n#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\n            for (k = 0; k<256; k++)\n               if (filters_used[k])\n                  fprintf(STDERR, \" Filter %d was used %lu times\\n\",\n                     k, (unsigned long)filters_used[k]);\n#endif\n#ifdef PNG_TIME_RFC1123_SUPPORTED\n         if (tIME_chunk_present != 0)\n            fprintf(STDERR, \" tIME = %s\\n\", tIME_string);\n         tIME_chunk_present = 0;\n#endif /* PNG_TIME_RFC1123_SUPPORTED */\n         }\n         else\n         {\n            fprintf(STDERR, \" FAIL\\n\");\n            ierror += kerror;\n         }\n#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG\n         if (allocation_now != current_allocation)\n            fprintf(STDERR, \"MEMORY ERROR: %d bytes lost\\n\",\n               current_allocation - allocation_now);\n         if (current_allocation != 0)\n         {\n            memory_infop pinfo = pinformation;\n\n            fprintf(STDERR, \"MEMORY ERROR: %d bytes still allocated\\n\",\n               current_allocation);\n            while (pinfo != NULL)\n            {\n               fprintf(STDERR, \" %lu bytes at %x\\n\",\n                 (unsigned long)pinfo->size,\n                 (unsigned int) pinfo->pointer);\n               pinfo = pinfo->next;\n            }\n         }\n#endif\n      }\n#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG\n         fprintf(STDERR, \" Current memory allocation: %10d bytes\\n\",\n            current_allocation);\n         fprintf(STDERR, \" Maximum memory allocation: %10d bytes\\n\",\n            maximum_allocation);\n         fprintf(STDERR, \" Total   memory allocation: %10d bytes\\n\",\n            total_allocation);\n         fprintf(STDERR, \"     Number of allocations: %10d\\n\",\n            num_allocations);\n#endif\n   }\n   else\n   {\n      int i;\n      for (i = 0; i<3; ++i)\n      {\n         int kerror;\n#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG\n         int allocation_now = current_allocation;\n#endif\n         if (i == 1) status_dots_requested = 1;\n         else if (verbose == 0)status_dots_requested = 0;\n         if (i == 0 || verbose == 1 || ierror != 0)\n            fprintf(STDERR, \"\\n Testing %s:\", inname);\n         kerror = test_one_file(inname, outname);\n         if (kerror == 0)\n         {\n            if (verbose == 1 || i == 2)\n            {\n#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\n                int k;\n#endif\n#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED\n                fprintf(STDERR, \"\\n PASS (%lu zero samples)\\n\",\n                   (unsigned long)zero_samples);\n#else\n                fprintf(STDERR, \" PASS\\n\");\n#endif\n#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\n                for (k = 0; k<256; k++)\n                   if (filters_used[k])\n                      fprintf(STDERR, \" Filter %d was used %lu times\\n\",\n                         k, (unsigned long)filters_used[k]);\n#endif\n#ifdef PNG_TIME_RFC1123_SUPPORTED\n             if (tIME_chunk_present != 0)\n                fprintf(STDERR, \" tIME = %s\\n\", tIME_string);\n#endif /* PNG_TIME_RFC1123_SUPPORTED */\n            }\n         }\n         else\n         {\n            if (verbose == 0 && i != 2)\n               fprintf(STDERR, \"\\n Testing %s:\", inname);\n            fprintf(STDERR, \" FAIL\\n\");\n            ierror += kerror;\n         }\n#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG\n         if (allocation_now != current_allocation)\n             fprintf(STDERR, \"MEMORY ERROR: %d bytes lost\\n\",\n               current_allocation - allocation_now);\n         if (current_allocation != 0)\n         {\n             memory_infop pinfo = pinformation;\n\n             fprintf(STDERR, \"MEMORY ERROR: %d bytes still allocated\\n\",\n                current_allocation);\n             while (pinfo != NULL)\n             {\n                fprintf(STDERR, \" %lu bytes at %x\\n\",\n                   (unsigned long)pinfo->size, (unsigned int)pinfo->pointer);\n                pinfo = pinfo->next;\n             }\n          }\n#endif\n       }\n#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG\n       fprintf(STDERR, \" Current memory allocation: %10d bytes\\n\",\n          current_allocation);\n       fprintf(STDERR, \" Maximum memory allocation: %10d bytes\\n\",\n          maximum_allocation);\n       fprintf(STDERR, \" Total   memory allocation: %10d bytes\\n\",\n          total_allocation);\n       fprintf(STDERR, \"     Number of allocations: %10d\\n\",\n            num_allocations);\n#endif\n   }\n\n#ifdef PNGTEST_TIMING\n   t_stop = (float)clock();\n   t_misc += (t_stop - t_start);\n   t_start = t_stop;\n   fprintf(STDERR, \" CPU time used = %.3f seconds\",\n      (t_misc+t_decode+t_encode)/(float)CLOCKS_PER_SEC);\n   fprintf(STDERR, \" (decoding %.3f,\\n\",\n      t_decode/(float)CLOCKS_PER_SEC);\n   fprintf(STDERR, \"        encoding %.3f ,\",\n      t_encode/(float)CLOCKS_PER_SEC);\n   fprintf(STDERR, \" other %.3f seconds)\\n\\n\",\n      t_misc/(float)CLOCKS_PER_SEC);\n#endif\n\n   if (ierror == 0)\n      fprintf(STDERR, \" libpng passes test\\n\");\n   else\n      fprintf(STDERR, \" libpng FAILS test\\n\");\n   return (int)(ierror != 0);\n}\n\n/* Generate a compiler error if there is an old png.h in the search path. */\ntypedef version_1_2_44 your_png_h_is_not_version_1_2_44;\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngtrans.c",
    "content": "\n/* pngtrans.c - transforms the data in a row (used by both readers and writers)\n *\n * Last changed in libpng 1.2.41 [December 3, 2009]\n * Copyright (c) 1998-2009 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)\n\n#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)\n/* Turn on BGR-to-RGB mapping */\nvoid PNGAPI\npng_set_bgr(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_bgr\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->transformations |= PNG_BGR;\n}\n#endif\n\n#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)\n/* Turn on 16 bit byte swapping */\nvoid PNGAPI\npng_set_swap(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_swap\");\n\n   if (png_ptr == NULL)\n      return;\n   if (png_ptr->bit_depth == 16)\n      png_ptr->transformations |= PNG_SWAP_BYTES;\n}\n#endif\n\n#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)\n/* Turn on pixel packing */\nvoid PNGAPI\npng_set_packing(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_packing\");\n\n   if (png_ptr == NULL)\n      return;\n   if (png_ptr->bit_depth < 8)\n   {\n      png_ptr->transformations |= PNG_PACK;\n      png_ptr->usr_bit_depth = 8;\n   }\n}\n#endif\n\n#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)\n/* Turn on packed pixel swapping */\nvoid PNGAPI\npng_set_packswap(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_packswap\");\n\n   if (png_ptr == NULL)\n      return;\n   if (png_ptr->bit_depth < 8)\n      png_ptr->transformations |= PNG_PACKSWAP;\n}\n#endif\n\n#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)\nvoid PNGAPI\npng_set_shift(png_structp png_ptr, png_color_8p true_bits)\n{\n   png_debug(1, \"in png_set_shift\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->transformations |= PNG_SHIFT;\n   png_ptr->shift = *true_bits;\n}\n#endif\n\n#if defined(PNG_READ_INTERLACING_SUPPORTED) || \\\n    defined(PNG_WRITE_INTERLACING_SUPPORTED)\nint PNGAPI\npng_set_interlace_handling(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_interlace handling\");\n\n   if (png_ptr && png_ptr->interlaced)\n   {\n      png_ptr->transformations |= PNG_INTERLACE;\n      return (7);\n   }\n\n   return (1);\n}\n#endif\n\n#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)\n/* Add a filler byte on read, or remove a filler or alpha byte on write.\n * The filler type has changed in v0.95 to allow future 2-byte fillers\n * for 48-bit input data, as well as to avoid problems with some compilers\n * that don't like bytes as parameters.\n */\nvoid PNGAPI\npng_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)\n{\n   png_debug(1, \"in png_set_filler\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->transformations |= PNG_FILLER;\n#ifdef PNG_LEGACY_SUPPORTED\n   png_ptr->filler = (png_byte)filler;\n#else\n   png_ptr->filler = (png_uint_16)filler;\n#endif\n   if (filler_loc == PNG_FILLER_AFTER)\n      png_ptr->flags |= PNG_FLAG_FILLER_AFTER;\n   else\n      png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER;\n\n   /* This should probably go in the \"do_read_filler\" routine.\n    * I attempted to do that in libpng-1.0.1a but that caused problems\n    * so I restored it in libpng-1.0.2a\n   */\n\n   if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)\n   {\n      png_ptr->usr_channels = 4;\n   }\n\n   /* Also I added this in libpng-1.0.2a (what happens when we expand\n    * a less-than-8-bit grayscale to GA? */\n\n   if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8)\n   {\n      png_ptr->usr_channels = 2;\n   }\n}\n\n#ifndef PNG_1_0_X\n/* Added to libpng-1.2.7 */\nvoid PNGAPI\npng_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc)\n{\n   png_debug(1, \"in png_set_add_alpha\");\n\n   if (png_ptr == NULL)\n      return;\n   png_set_filler(png_ptr, filler, filler_loc);\n   png_ptr->transformations |= PNG_ADD_ALPHA;\n}\n#endif\n\n#endif\n\n#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \\\n    defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)\nvoid PNGAPI\npng_set_swap_alpha(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_swap_alpha\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->transformations |= PNG_SWAP_ALPHA;\n}\n#endif\n\n#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \\\n    defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)\nvoid PNGAPI\npng_set_invert_alpha(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_invert_alpha\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->transformations |= PNG_INVERT_ALPHA;\n}\n#endif\n\n#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)\nvoid PNGAPI\npng_set_invert_mono(png_structp png_ptr)\n{\n   png_debug(1, \"in png_set_invert_mono\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->transformations |= PNG_INVERT_MONO;\n}\n\n/* Invert monochrome grayscale data */\nvoid /* PRIVATE */\npng_do_invert(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_invert\");\n\n  /* This test removed from libpng version 1.0.13 and 1.2.0:\n   *   if (row_info->bit_depth == 1 &&\n   */\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row == NULL || row_info == NULL)\n     return;\n#endif\n   if (row_info->color_type == PNG_COLOR_TYPE_GRAY)\n   {\n      png_bytep rp = row;\n      png_uint_32 i;\n      png_uint_32 istop = row_info->rowbytes;\n\n      for (i = 0; i < istop; i++)\n      {\n         *rp = (png_byte)(~(*rp));\n         rp++;\n      }\n   }\n   else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&\n      row_info->bit_depth == 8)\n   {\n      png_bytep rp = row;\n      png_uint_32 i;\n      png_uint_32 istop = row_info->rowbytes;\n\n      for (i = 0; i < istop; i+=2)\n      {\n         *rp = (png_byte)(~(*rp));\n         rp+=2;\n      }\n   }\n   else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&\n      row_info->bit_depth == 16)\n   {\n      png_bytep rp = row;\n      png_uint_32 i;\n      png_uint_32 istop = row_info->rowbytes;\n\n      for (i = 0; i < istop; i+=4)\n      {\n         *rp = (png_byte)(~(*rp));\n         *(rp+1) = (png_byte)(~(*(rp+1)));\n         rp+=4;\n      }\n   }\n}\n#endif\n\n#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)\n/* Swaps byte order on 16 bit depth images */\nvoid /* PRIVATE */\npng_do_swap(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_swap\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n       row_info->bit_depth == 16)\n   {\n      png_bytep rp = row;\n      png_uint_32 i;\n      png_uint_32 istop= row_info->width * row_info->channels;\n\n      for (i = 0; i < istop; i++, rp += 2)\n      {\n         png_byte t = *rp;\n         *rp = *(rp + 1);\n         *(rp + 1) = t;\n      }\n   }\n}\n#endif\n\n#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)\nstatic PNG_CONST png_byte onebppswaptable[256] = {\n   0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,\n   0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,\n   0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,\n   0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,\n   0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,\n   0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,\n   0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,\n   0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,\n   0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,\n   0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,\n   0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,\n   0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,\n   0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,\n   0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,\n   0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,\n   0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,\n   0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,\n   0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,\n   0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,\n   0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,\n   0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,\n   0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,\n   0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,\n   0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,\n   0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,\n   0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,\n   0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,\n   0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,\n   0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,\n   0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,\n   0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,\n   0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF\n};\n\nstatic PNG_CONST png_byte twobppswaptable[256] = {\n   0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0,\n   0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0,\n   0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4,\n   0x24, 0x64, 0xA4, 0xE4, 0x34, 0x74, 0xB4, 0xF4,\n   0x08, 0x48, 0x88, 0xC8, 0x18, 0x58, 0x98, 0xD8,\n   0x28, 0x68, 0xA8, 0xE8, 0x38, 0x78, 0xB8, 0xF8,\n   0x0C, 0x4C, 0x8C, 0xCC, 0x1C, 0x5C, 0x9C, 0xDC,\n   0x2C, 0x6C, 0xAC, 0xEC, 0x3C, 0x7C, 0xBC, 0xFC,\n   0x01, 0x41, 0x81, 0xC1, 0x11, 0x51, 0x91, 0xD1,\n   0x21, 0x61, 0xA1, 0xE1, 0x31, 0x71, 0xB1, 0xF1,\n   0x05, 0x45, 0x85, 0xC5, 0x15, 0x55, 0x95, 0xD5,\n   0x25, 0x65, 0xA5, 0xE5, 0x35, 0x75, 0xB5, 0xF5,\n   0x09, 0x49, 0x89, 0xC9, 0x19, 0x59, 0x99, 0xD9,\n   0x29, 0x69, 0xA9, 0xE9, 0x39, 0x79, 0xB9, 0xF9,\n   0x0D, 0x4D, 0x8D, 0xCD, 0x1D, 0x5D, 0x9D, 0xDD,\n   0x2D, 0x6D, 0xAD, 0xED, 0x3D, 0x7D, 0xBD, 0xFD,\n   0x02, 0x42, 0x82, 0xC2, 0x12, 0x52, 0x92, 0xD2,\n   0x22, 0x62, 0xA2, 0xE2, 0x32, 0x72, 0xB2, 0xF2,\n   0x06, 0x46, 0x86, 0xC6, 0x16, 0x56, 0x96, 0xD6,\n   0x26, 0x66, 0xA6, 0xE6, 0x36, 0x76, 0xB6, 0xF6,\n   0x0A, 0x4A, 0x8A, 0xCA, 0x1A, 0x5A, 0x9A, 0xDA,\n   0x2A, 0x6A, 0xAA, 0xEA, 0x3A, 0x7A, 0xBA, 0xFA,\n   0x0E, 0x4E, 0x8E, 0xCE, 0x1E, 0x5E, 0x9E, 0xDE,\n   0x2E, 0x6E, 0xAE, 0xEE, 0x3E, 0x7E, 0xBE, 0xFE,\n   0x03, 0x43, 0x83, 0xC3, 0x13, 0x53, 0x93, 0xD3,\n   0x23, 0x63, 0xA3, 0xE3, 0x33, 0x73, 0xB3, 0xF3,\n   0x07, 0x47, 0x87, 0xC7, 0x17, 0x57, 0x97, 0xD7,\n   0x27, 0x67, 0xA7, 0xE7, 0x37, 0x77, 0xB7, 0xF7,\n   0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x5B, 0x9B, 0xDB,\n   0x2B, 0x6B, 0xAB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB,\n   0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x5F, 0x9F, 0xDF,\n   0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF\n};\n\nstatic PNG_CONST png_byte fourbppswaptable[256] = {\n   0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70,\n   0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0,\n   0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71,\n   0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1,\n   0x02, 0x12, 0x22, 0x32, 0x42, 0x52, 0x62, 0x72,\n   0x82, 0x92, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0xF2,\n   0x03, 0x13, 0x23, 0x33, 0x43, 0x53, 0x63, 0x73,\n   0x83, 0x93, 0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3,\n   0x04, 0x14, 0x24, 0x34, 0x44, 0x54, 0x64, 0x74,\n   0x84, 0x94, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4,\n   0x05, 0x15, 0x25, 0x35, 0x45, 0x55, 0x65, 0x75,\n   0x85, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xE5, 0xF5,\n   0x06, 0x16, 0x26, 0x36, 0x46, 0x56, 0x66, 0x76,\n   0x86, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6,\n   0x07, 0x17, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77,\n   0x87, 0x97, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7,\n   0x08, 0x18, 0x28, 0x38, 0x48, 0x58, 0x68, 0x78,\n   0x88, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8,\n   0x09, 0x19, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79,\n   0x89, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9,\n   0x0A, 0x1A, 0x2A, 0x3A, 0x4A, 0x5A, 0x6A, 0x7A,\n   0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA,\n   0x0B, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B,\n   0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB,\n   0x0C, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C,\n   0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xDC, 0xEC, 0xFC,\n   0x0D, 0x1D, 0x2D, 0x3D, 0x4D, 0x5D, 0x6D, 0x7D,\n   0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD,\n   0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E,\n   0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE,\n   0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F,\n   0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF\n};\n\n/* Swaps pixel packing order within bytes */\nvoid /* PRIVATE */\npng_do_packswap(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_packswap\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n       row_info->bit_depth < 8)\n   {\n      png_bytep rp, end, table;\n\n      end = row + row_info->rowbytes;\n\n      if (row_info->bit_depth == 1)\n         table = (png_bytep)onebppswaptable;\n      else if (row_info->bit_depth == 2)\n         table = (png_bytep)twobppswaptable;\n      else if (row_info->bit_depth == 4)\n         table = (png_bytep)fourbppswaptable;\n      else\n         return;\n\n      for (rp = row; rp < end; rp++)\n         *rp = table[*rp];\n   }\n}\n#endif /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */\n\n#if defined(PNG_WRITE_FILLER_SUPPORTED) || \\\n    defined(PNG_READ_STRIP_ALPHA_SUPPORTED)\n/* Remove filler or alpha byte(s) */\nvoid /* PRIVATE */\npng_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)\n{\n   png_debug(1, \"in png_do_strip_filler\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL)\n#endif\n   {\n      png_bytep sp=row;\n      png_bytep dp=row;\n      png_uint_32 row_width=row_info->width;\n      png_uint_32 i;\n\n      if ((row_info->color_type == PNG_COLOR_TYPE_RGB ||\n          (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&\n          (flags & PNG_FLAG_STRIP_ALPHA))) &&\n          row_info->channels == 4)\n      {\n         if (row_info->bit_depth == 8)\n         {\n            /* This converts from RGBX or RGBA to RGB */\n            if (flags & PNG_FLAG_FILLER_AFTER)\n            {\n               dp+=3; sp+=4;\n               for (i = 1; i < row_width; i++)\n               {\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  sp++;\n               }\n            }\n            /* This converts from XRGB or ARGB to RGB */\n            else\n            {\n               for (i = 0; i < row_width; i++)\n               {\n                  sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n               }\n            }\n            row_info->pixel_depth = 24;\n            row_info->rowbytes = row_width * 3;\n         }\n         else /* if (row_info->bit_depth == 16) */\n         {\n            if (flags & PNG_FLAG_FILLER_AFTER)\n            {\n               /* This converts from RRGGBBXX or RRGGBBAA to RRGGBB */\n               sp += 8; dp += 6;\n               for (i = 1; i < row_width; i++)\n               {\n                  /* This could be (although png_memcpy is probably slower):\n                  png_memcpy(dp, sp, 6);\n                  sp += 8;\n                  dp += 6;\n                  */\n\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  sp += 2;\n               }\n            }\n            else\n            {\n               /* This converts from XXRRGGBB or AARRGGBB to RRGGBB */\n               for (i = 0; i < row_width; i++)\n               {\n                  /* This could be (although png_memcpy is probably slower):\n                  png_memcpy(dp, sp, 6);\n                  sp += 8;\n                  dp += 6;\n                  */\n\n                  sp+=2;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n               }\n            }\n            row_info->pixel_depth = 48;\n            row_info->rowbytes = row_width * 6;\n         }\n         row_info->channels = 3;\n      }\n      else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY ||\n         (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&\n         (flags & PNG_FLAG_STRIP_ALPHA))) &&\n          row_info->channels == 2)\n      {\n         if (row_info->bit_depth == 8)\n         {\n            /* This converts from GX or GA to G */\n            if (flags & PNG_FLAG_FILLER_AFTER)\n            {\n               for (i = 0; i < row_width; i++)\n               {\n                  *dp++ = *sp++;\n                  sp++;\n               }\n            }\n            /* This converts from XG or AG to G */\n            else\n            {\n               for (i = 0; i < row_width; i++)\n               {\n                  sp++;\n                  *dp++ = *sp++;\n               }\n            }\n            row_info->pixel_depth = 8;\n            row_info->rowbytes = row_width;\n         }\n         else /* if (row_info->bit_depth == 16) */\n         {\n            if (flags & PNG_FLAG_FILLER_AFTER)\n            {\n               /* This converts from GGXX or GGAA to GG */\n               sp += 4; dp += 2;\n               for (i = 1; i < row_width; i++)\n               {\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n                  sp += 2;\n               }\n            }\n            else\n            {\n               /* This converts from XXGG or AAGG to GG */\n               for (i = 0; i < row_width; i++)\n               {\n                  sp += 2;\n                  *dp++ = *sp++;\n                  *dp++ = *sp++;\n               }\n            }\n            row_info->pixel_depth = 16;\n            row_info->rowbytes = row_width * 2;\n         }\n         row_info->channels = 1;\n      }\n      if (flags & PNG_FLAG_STRIP_ALPHA)\n        row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;\n   }\n}\n#endif\n\n#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)\n/* Swaps red and blue bytes within a pixel */\nvoid /* PRIVATE */\npng_do_bgr(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_bgr\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n       (row_info->color_type & PNG_COLOR_MASK_COLOR))\n   {\n      png_uint_32 row_width = row_info->width;\n      if (row_info->bit_depth == 8)\n      {\n         if (row_info->color_type == PNG_COLOR_TYPE_RGB)\n         {\n            png_bytep rp;\n            png_uint_32 i;\n\n            for (i = 0, rp = row; i < row_width; i++, rp += 3)\n            {\n               png_byte save = *rp;\n               *rp = *(rp + 2);\n               *(rp + 2) = save;\n            }\n         }\n         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n         {\n            png_bytep rp;\n            png_uint_32 i;\n\n            for (i = 0, rp = row; i < row_width; i++, rp += 4)\n            {\n               png_byte save = *rp;\n               *rp = *(rp + 2);\n               *(rp + 2) = save;\n            }\n         }\n      }\n      else if (row_info->bit_depth == 16)\n      {\n         if (row_info->color_type == PNG_COLOR_TYPE_RGB)\n         {\n            png_bytep rp;\n            png_uint_32 i;\n\n            for (i = 0, rp = row; i < row_width; i++, rp += 6)\n            {\n               png_byte save = *rp;\n               *rp = *(rp + 4);\n               *(rp + 4) = save;\n               save = *(rp + 1);\n               *(rp + 1) = *(rp + 5);\n               *(rp + 5) = save;\n            }\n         }\n         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n         {\n            png_bytep rp;\n            png_uint_32 i;\n\n            for (i = 0, rp = row; i < row_width; i++, rp += 8)\n            {\n               png_byte save = *rp;\n               *rp = *(rp + 4);\n               *(rp + 4) = save;\n               save = *(rp + 1);\n               *(rp + 1) = *(rp + 5);\n               *(rp + 5) = save;\n            }\n         }\n      }\n   }\n}\n#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */\n\n#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\\n    defined(PNG_LEGACY_SUPPORTED) || \\\n    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)\nvoid PNGAPI\npng_set_user_transform_info(png_structp png_ptr, png_voidp\n   user_transform_ptr, int user_transform_depth, int user_transform_channels)\n{\n   png_debug(1, \"in png_set_user_transform_info\");\n\n   if (png_ptr == NULL)\n      return;\n#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED\n   png_ptr->user_transform_ptr = user_transform_ptr;\n   png_ptr->user_transform_depth = (png_byte)user_transform_depth;\n   png_ptr->user_transform_channels = (png_byte)user_transform_channels;\n#else\n   if (user_transform_ptr || user_transform_depth || user_transform_channels)\n      png_warning(png_ptr,\n        \"This version of libpng does not support user transform info\");\n#endif\n}\n#endif\n\n/* This function returns a pointer to the user_transform_ptr associated with\n * the user transform functions.  The application should free any memory\n * associated with this pointer before png_write_destroy and png_read_destroy\n * are called.\n */\npng_voidp PNGAPI\npng_get_user_transform_ptr(png_structp png_ptr)\n{\n   if (png_ptr == NULL)\n      return (NULL);\n#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED\n   return ((png_voidp)png_ptr->user_transform_ptr);\n#else\n   return (NULL);\n#endif\n}\n#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngvcrd.c",
    "content": "/* pnggvrd.c was removed from libpng-1.2.20. */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngwio.c",
    "content": "\n/* pngwio.c - functions for data output\n *\n * Last changed in libpng 1.2.41 [December 3, 2009]\n * Copyright (c) 1998-2009 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n *\n * This file provides a location for all output.  Users who need\n * special handling are expected to write functions that have the same\n * arguments as these and perform similar functions, but that possibly\n * use different output methods.  Note that you shouldn't change these\n * functions, but rather write replacement functions and then change\n * them at run time with png_set_write_fn(...).\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#ifdef PNG_WRITE_SUPPORTED\n\n/* Write the data to whatever output you are using.  The default routine\n * writes to a file pointer.  Note that this routine sometimes gets called\n * with very small lengths, so you should implement some kind of simple\n * buffering if you are using unbuffered writes.  This should never be asked\n * to write more than 64K on a 16 bit machine.\n */\n\nvoid /* PRIVATE */\npng_write_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   if (png_ptr->write_data_fn != NULL )\n      (*(png_ptr->write_data_fn))(png_ptr, data, length);\n   else\n      png_error(png_ptr, \"Call to NULL write function\");\n}\n\n#ifdef PNG_STDIO_SUPPORTED\n/* This is the function that does the actual writing of data.  If you are\n * not writing to a standard C stream, you should create a replacement\n * write_data function and use it at run time with png_set_write_fn(), rather\n * than changing the library.\n */\n#ifndef USE_FAR_KEYWORD\nvoid PNGAPI\npng_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   png_uint_32 check;\n\n   if (png_ptr == NULL)\n      return;\n#ifdef _WIN32_WCE\n   if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )\n      check = 0;\n#else\n   check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));\n#endif\n   if (check != length)\n      png_error(png_ptr, \"Write Error\");\n}\n#else\n/* This is the model-independent version. Since the standard I/O library\n * can't handle far buffers in the medium and small models, we have to copy\n * the data.\n */\n\n#define NEAR_BUF_SIZE 1024\n#define MIN(a,b) (a <= b ? a : b)\n\nvoid PNGAPI\npng_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   png_uint_32 check;\n   png_byte *near_data;  /* Needs to be \"png_byte *\" instead of \"png_bytep\" */\n   png_FILE_p io_ptr;\n\n   if (png_ptr == NULL)\n      return;\n   /* Check if data really is near. If so, use usual code. */\n   near_data = (png_byte *)CVT_PTR_NOCHECK(data);\n   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);\n   if ((png_bytep)near_data == data)\n   {\n#ifdef _WIN32_WCE\n      if ( !WriteFile(io_ptr, near_data, length, &check, NULL) )\n         check = 0;\n#else\n      check = fwrite(near_data, 1, length, io_ptr);\n#endif\n   }\n   else\n   {\n      png_byte buf[NEAR_BUF_SIZE];\n      png_size_t written, remaining, err;\n      check = 0;\n      remaining = length;\n      do\n      {\n         written = MIN(NEAR_BUF_SIZE, remaining);\n         png_memcpy(buf, data, written); /* Copy far buffer to near buffer */\n#ifdef _WIN32_WCE\n         if ( !WriteFile(io_ptr, buf, written, &err, NULL) )\n            err = 0;\n#else\n         err = fwrite(buf, 1, written, io_ptr);\n#endif\n         if (err != written)\n            break;\n\n         else\n            check += err;\n\n         data += written;\n         remaining -= written;\n      }\n      while (remaining != 0);\n   }\n   if (check != length)\n      png_error(png_ptr, \"Write Error\");\n}\n\n#endif\n#endif\n\n/* This function is called to output any data pending writing (normally\n * to disk).  After png_flush is called, there should be no data pending\n * writing in any buffers.\n */\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\nvoid /* PRIVATE */\npng_flush(png_structp png_ptr)\n{\n   if (png_ptr->output_flush_fn != NULL)\n      (*(png_ptr->output_flush_fn))(png_ptr);\n}\n\n#ifdef PNG_STDIO_SUPPORTED\nvoid PNGAPI\npng_default_flush(png_structp png_ptr)\n{\n#ifndef _WIN32_WCE\n   png_FILE_p io_ptr;\n#endif\n   if (png_ptr == NULL)\n      return;\n#ifndef _WIN32_WCE\n   io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));\n   fflush(io_ptr);\n#endif\n}\n#endif\n#endif\n\n/* This function allows the application to supply new output functions for\n * libpng if standard C streams aren't being used.\n *\n * This function takes as its arguments:\n * png_ptr       - pointer to a png output data structure\n * io_ptr        - pointer to user supplied structure containing info about\n *                 the output functions.  May be NULL.\n * write_data_fn - pointer to a new output function that takes as its\n *                 arguments a pointer to a png_struct, a pointer to\n *                 data to be written, and a 32-bit unsigned int that is\n *                 the number of bytes to be written.  The new write\n *                 function should call png_error(png_ptr, \"Error msg\")\n *                 to exit and output any fatal error messages.  May be\n *                 NULL, in which case libpng's default function will\n *                 be used.\n * flush_data_fn - pointer to a new flush function that takes as its\n *                 arguments a pointer to a png_struct.  After a call to\n *                 the flush function, there should be no data in any buffers\n *                 or pending transmission.  If the output method doesn't do\n *                 any buffering of output, a function prototype must still be\n *                 supplied although it doesn't have to do anything.  If\n *                 PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile\n *                 time, output_flush_fn will be ignored, although it must be\n *                 supplied for compatibility.  May be NULL, in which case\n *                 libpng's default function will be used, if\n *                 PNG_WRITE_FLUSH_SUPPORTED is defined.  This is not\n *                 a good idea if io_ptr does not point to a standard\n *                 *FILE structure.\n */\nvoid PNGAPI\npng_set_write_fn(png_structp png_ptr, png_voidp io_ptr,\n   png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)\n{\n   if (png_ptr == NULL)\n      return;\n\n   png_ptr->io_ptr = io_ptr;\n\n#ifdef PNG_STDIO_SUPPORTED\n   if (write_data_fn != NULL)\n      png_ptr->write_data_fn = write_data_fn;\n\n   else\n      png_ptr->write_data_fn = png_default_write_data;\n#else\n   png_ptr->write_data_fn = write_data_fn;\n#endif\n\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\n#ifdef PNG_STDIO_SUPPORTED\n   if (output_flush_fn != NULL)\n      png_ptr->output_flush_fn = output_flush_fn;\n\n   else\n      png_ptr->output_flush_fn = png_default_flush;\n#else\n   png_ptr->output_flush_fn = output_flush_fn;\n#endif\n#endif /* PNG_WRITE_FLUSH_SUPPORTED */\n\n   /* It is an error to read while writing a png file */\n   if (png_ptr->read_data_fn != NULL)\n   {\n      png_ptr->read_data_fn = NULL;\n      png_warning(png_ptr,\n         \"Attempted to set both read_data_fn and write_data_fn in\");\n      png_warning(png_ptr,\n         \"the same structure.  Resetting read_data_fn to NULL.\");\n   }\n}\n\n#ifdef USE_FAR_KEYWORD\n#ifdef _MSC_VER\nvoid *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)\n{\n   void *near_ptr;\n   void FAR *far_ptr;\n   FP_OFF(near_ptr) = FP_OFF(ptr);\n   far_ptr = (void FAR *)near_ptr;\n\n   if (check != 0)\n      if (FP_SEG(ptr) != FP_SEG(far_ptr))\n         png_error(png_ptr, \"segment lost in conversion\");\n\n   return(near_ptr);\n}\n#  else\nvoid *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)\n{\n   void *near_ptr;\n   void FAR *far_ptr;\n   near_ptr = (void FAR *)ptr;\n   far_ptr = (void FAR *)near_ptr;\n\n   if (check != 0)\n      if (far_ptr != ptr)\n         png_error(png_ptr, \"segment lost in conversion\");\n\n   return(near_ptr);\n}\n#   endif\n#   endif\n#endif /* PNG_WRITE_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngwrite.c",
    "content": "\n/* pngwrite.c - general routines to write a PNG file\n *\n * Last changed in libpng 1.2.42 [January 3, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n */\n\n/* Get internal access to png.h */\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#ifdef PNG_WRITE_SUPPORTED\n\n/* Writes all the PNG information.  This is the suggested way to use the\n * library.  If you have a new chunk to add, make a function to write it,\n * and put it in the correct location here.  If you want the chunk written\n * after the image data, put it in png_write_end().  I strongly encourage\n * you to supply a PNG_INFO_ flag, and check info_ptr->valid before writing\n * the chunk, as that will keep the code from breaking if you want to just\n * write a plain PNG file.  If you have long comments, I suggest writing\n * them in png_write_end(), and compressing them.\n */\nvoid PNGAPI\npng_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)\n{\n   png_debug(1, \"in png_write_info_before_PLTE\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n   if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))\n   {\n   /* Write PNG signature */\n   png_write_sig(png_ptr);\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n   if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \\\n      (png_ptr->mng_features_permitted))\n   {\n      png_warning(png_ptr, \"MNG features are not allowed in a PNG datastream\");\n      png_ptr->mng_features_permitted = 0;\n   }\n#endif\n   /* Write IHDR information. */\n   png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height,\n      info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type,\n      info_ptr->filter_type,\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n      info_ptr->interlace_type);\n#else\n      0);\n#endif\n   /* The rest of these check to see if the valid field has the appropriate\n    * flag set, and if it does, writes the chunk.\n    */\n#ifdef PNG_WRITE_gAMA_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_gAMA)\n   {\n#  ifdef PNG_FLOATING_POINT_SUPPORTED\n      png_write_gAMA(png_ptr, info_ptr->gamma);\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\n      png_write_gAMA_fixed(png_ptr, info_ptr->int_gamma);\n#  endif\n#endif\n   }\n#endif\n#ifdef PNG_WRITE_sRGB_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_sRGB)\n      png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent);\n#endif\n#ifdef PNG_WRITE_iCCP_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_iCCP)\n      png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE,\n                     info_ptr->iccp_profile, (int)info_ptr->iccp_proflen);\n#endif\n#ifdef PNG_WRITE_sBIT_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_sBIT)\n      png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type);\n#endif\n#ifdef PNG_WRITE_cHRM_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_cHRM)\n   {\n#ifdef PNG_FLOATING_POINT_SUPPORTED\n      png_write_cHRM(png_ptr,\n         info_ptr->x_white, info_ptr->y_white,\n         info_ptr->x_red, info_ptr->y_red,\n         info_ptr->x_green, info_ptr->y_green,\n         info_ptr->x_blue, info_ptr->y_blue);\n#else\n#  ifdef PNG_FIXED_POINT_SUPPORTED\n      png_write_cHRM_fixed(png_ptr,\n         info_ptr->int_x_white, info_ptr->int_y_white,\n         info_ptr->int_x_red, info_ptr->int_y_red,\n         info_ptr->int_x_green, info_ptr->int_y_green,\n         info_ptr->int_x_blue, info_ptr->int_y_blue);\n#  endif\n#endif\n   }\n#endif\n#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\n   if (info_ptr->unknown_chunks_num)\n   {\n      png_unknown_chunk *up;\n\n      png_debug(5, \"writing extra chunks\");\n\n      for (up = info_ptr->unknown_chunks;\n           up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;\n           up++)\n      {\n         int keep = png_handle_as_unknown(png_ptr, up->name);\n         if (keep != PNG_HANDLE_CHUNK_NEVER &&\n            up->location && !(up->location & PNG_HAVE_PLTE) &&\n            !(up->location & PNG_HAVE_IDAT) &&\n            ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||\n            (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))\n         {\n            if (up->size == 0)\n               png_warning(png_ptr, \"Writing zero-length unknown chunk\");\n            png_write_chunk(png_ptr, up->name, up->data, up->size);\n         }\n      }\n   }\n#endif\n      png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE;\n   }\n}\n\nvoid PNGAPI\npng_write_info(png_structp png_ptr, png_infop info_ptr)\n{\n#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)\n   int i;\n#endif\n\n   png_debug(1, \"in png_write_info\");\n\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   png_write_info_before_PLTE(png_ptr, info_ptr);\n\n   if (info_ptr->valid & PNG_INFO_PLTE)\n      png_write_PLTE(png_ptr, info_ptr->palette,\n         (png_uint_32)info_ptr->num_palette);\n   else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      png_error(png_ptr, \"Valid palette required for paletted images\");\n\n#ifdef PNG_WRITE_tRNS_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_tRNS)\n   {\n#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED\n      /* Invert the alpha channel (in tRNS) */\n      if ((png_ptr->transformations & PNG_INVERT_ALPHA) &&\n         info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n      {\n         int j;\n         for (j = 0; j<(int)info_ptr->num_trans; j++)\n            info_ptr->trans[j] = (png_byte)(255 - info_ptr->trans[j]);\n      }\n#endif\n      png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_values),\n         info_ptr->num_trans, info_ptr->color_type);\n   }\n#endif\n#ifdef PNG_WRITE_bKGD_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_bKGD)\n      png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type);\n#endif\n#ifdef PNG_WRITE_hIST_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_hIST)\n      png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette);\n#endif\n#ifdef PNG_WRITE_oFFs_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_oFFs)\n      png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset,\n         info_ptr->offset_unit_type);\n#endif\n#ifdef PNG_WRITE_pCAL_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_pCAL)\n      png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0,\n         info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams,\n         info_ptr->pcal_units, info_ptr->pcal_params);\n#endif\n\n#ifdef PNG_sCAL_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_sCAL)\n#ifdef PNG_WRITE_sCAL_SUPPORTED\n#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)\n      png_write_sCAL(png_ptr, (int)info_ptr->scal_unit,\n          info_ptr->scal_pixel_width, info_ptr->scal_pixel_height);\n#else /* !FLOATING_POINT */\n#ifdef PNG_FIXED_POINT_SUPPORTED\n      png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit,\n          info_ptr->scal_s_width, info_ptr->scal_s_height);\n#endif /* FIXED_POINT */\n#endif /* FLOATING_POINT */\n#else  /* !WRITE_sCAL */\n      png_warning(png_ptr,\n          \"png_write_sCAL not supported; sCAL chunk not written.\");\n#endif /* WRITE_sCAL */\n#endif /* sCAL */\n\n#ifdef PNG_WRITE_pHYs_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_pHYs)\n      png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit,\n         info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type);\n#endif /* pHYs */\n\n#ifdef PNG_WRITE_tIME_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_tIME)\n   {\n      png_write_tIME(png_ptr, &(info_ptr->mod_time));\n      png_ptr->mode |= PNG_WROTE_tIME;\n   }\n#endif /* tIME */\n\n#ifdef PNG_WRITE_sPLT_SUPPORTED\n   if (info_ptr->valid & PNG_INFO_sPLT)\n     for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)\n       png_write_sPLT(png_ptr, info_ptr->splt_palettes + i);\n#endif /* sPLT */\n\n#ifdef PNG_WRITE_TEXT_SUPPORTED\n   /* Check to see if we need to write text chunks */\n   for (i = 0; i < info_ptr->num_text; i++)\n   {\n      png_debug2(2, \"Writing header text chunk %d, type %d\", i,\n         info_ptr->text[i].compression);\n      /* An internationalized chunk? */\n      if (info_ptr->text[i].compression > 0)\n      {\n#ifdef PNG_WRITE_iTXt_SUPPORTED\n          /* Write international chunk */\n          png_write_iTXt(png_ptr,\n                         info_ptr->text[i].compression,\n                         info_ptr->text[i].key,\n                         info_ptr->text[i].lang,\n                         info_ptr->text[i].lang_key,\n                         info_ptr->text[i].text);\n#else\n          png_warning(png_ptr, \"Unable to write international text\");\n#endif\n          /* Mark this chunk as written */\n          info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;\n      }\n      /* If we want a compressed text chunk */\n      else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt)\n      {\n#ifdef PNG_WRITE_zTXt_SUPPORTED\n         /* Write compressed chunk */\n         png_write_zTXt(png_ptr, info_ptr->text[i].key,\n            info_ptr->text[i].text, 0,\n            info_ptr->text[i].compression);\n#else\n         png_warning(png_ptr, \"Unable to write compressed text\");\n#endif\n         /* Mark this chunk as written */\n         info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;\n      }\n      else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)\n      {\n#ifdef PNG_WRITE_tEXt_SUPPORTED\n         /* Write uncompressed chunk */\n         png_write_tEXt(png_ptr, info_ptr->text[i].key,\n                         info_ptr->text[i].text,\n                         0);\n         /* Mark this chunk as written */\n         info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;\n#else\n         /* Can't get here */\n         png_warning(png_ptr, \"Unable to write uncompressed text\");\n#endif\n      }\n   }\n#endif /* tEXt */\n\n#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\n   if (info_ptr->unknown_chunks_num)\n   {\n      png_unknown_chunk *up;\n\n      png_debug(5, \"writing extra chunks\");\n\n      for (up = info_ptr->unknown_chunks;\n           up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;\n           up++)\n      {\n         int keep = png_handle_as_unknown(png_ptr, up->name);\n         if (keep != PNG_HANDLE_CHUNK_NEVER &&\n            up->location && (up->location & PNG_HAVE_PLTE) &&\n            !(up->location & PNG_HAVE_IDAT) &&\n            ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||\n            (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))\n         {\n            png_write_chunk(png_ptr, up->name, up->data, up->size);\n         }\n      }\n   }\n#endif\n}\n\n/* Writes the end of the PNG file.  If you don't want to write comments or\n * time information, you can pass NULL for info.  If you already wrote these\n * in png_write_info(), do not write them again here.  If you have long\n * comments, I suggest writing them here, and compressing them.\n */\nvoid PNGAPI\npng_write_end(png_structp png_ptr, png_infop info_ptr)\n{\n   png_debug(1, \"in png_write_end\");\n\n   if (png_ptr == NULL)\n      return;\n   if (!(png_ptr->mode & PNG_HAVE_IDAT))\n      png_error(png_ptr, \"No IDATs written into file\");\n\n   /* See if user wants us to write information chunks */\n   if (info_ptr != NULL)\n   {\n#ifdef PNG_WRITE_TEXT_SUPPORTED\n      int i; /* local index variable */\n#endif\n#ifdef PNG_WRITE_tIME_SUPPORTED\n      /* Check to see if user has supplied a time chunk */\n      if ((info_ptr->valid & PNG_INFO_tIME) &&\n         !(png_ptr->mode & PNG_WROTE_tIME))\n         png_write_tIME(png_ptr, &(info_ptr->mod_time));\n#endif\n#ifdef PNG_WRITE_TEXT_SUPPORTED\n      /* Loop through comment chunks */\n      for (i = 0; i < info_ptr->num_text; i++)\n      {\n         png_debug2(2, \"Writing trailer text chunk %d, type %d\", i,\n            info_ptr->text[i].compression);\n         /* An internationalized chunk? */\n         if (info_ptr->text[i].compression > 0)\n         {\n#ifdef PNG_WRITE_iTXt_SUPPORTED\n            /* Write international chunk */\n            png_write_iTXt(png_ptr,\n                        info_ptr->text[i].compression,\n                        info_ptr->text[i].key,\n                        info_ptr->text[i].lang,\n                        info_ptr->text[i].lang_key,\n                        info_ptr->text[i].text);\n#else\n            png_warning(png_ptr, \"Unable to write international text\");\n#endif\n            /* Mark this chunk as written */\n            info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;\n         }\n         else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt)\n         {\n#ifdef PNG_WRITE_zTXt_SUPPORTED\n            /* Write compressed chunk */\n            png_write_zTXt(png_ptr, info_ptr->text[i].key,\n               info_ptr->text[i].text, 0,\n               info_ptr->text[i].compression);\n#else\n            png_warning(png_ptr, \"Unable to write compressed text\");\n#endif\n            /* Mark this chunk as written */\n            info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;\n         }\n         else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)\n         {\n#ifdef PNG_WRITE_tEXt_SUPPORTED\n            /* Write uncompressed chunk */\n            png_write_tEXt(png_ptr, info_ptr->text[i].key,\n               info_ptr->text[i].text, 0);\n#else\n            png_warning(png_ptr, \"Unable to write uncompressed text\");\n#endif\n\n            /* Mark this chunk as written */\n            info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;\n         }\n      }\n#endif\n#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\n   if (info_ptr->unknown_chunks_num)\n   {\n      png_unknown_chunk *up;\n\n      png_debug(5, \"writing extra chunks\");\n\n      for (up = info_ptr->unknown_chunks;\n           up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;\n           up++)\n      {\n         int keep = png_handle_as_unknown(png_ptr, up->name);\n         if (keep != PNG_HANDLE_CHUNK_NEVER &&\n            up->location && (up->location & PNG_AFTER_IDAT) &&\n            ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||\n            (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))\n         {\n            png_write_chunk(png_ptr, up->name, up->data, up->size);\n         }\n      }\n   }\n#endif\n   }\n\n   png_ptr->mode |= PNG_AFTER_IDAT;\n\n   /* Write end of PNG file */\n   png_write_IEND(png_ptr);\n   /* This flush, added in libpng-1.0.8, removed from libpng-1.0.9beta03,\n    * and restored again in libpng-1.2.30, may cause some applications that\n    * do not set png_ptr->output_flush_fn to crash.  If your application\n    * experiences a problem, please try building libpng with\n    * PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED defined, and report the event to\n    * png-mng-implement at lists.sf.net .\n    */\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\n#  ifdef PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED\n   png_flush(png_ptr);\n#  endif\n#endif\n}\n\n#ifdef PNG_CONVERT_tIME_SUPPORTED\n/* \"tm\" structure is not supported on WindowsCE */\nvoid PNGAPI\npng_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime)\n{\n   png_debug(1, \"in png_convert_from_struct_tm\");\n\n   ptime->year = (png_uint_16)(1900 + ttime->tm_year);\n   ptime->month = (png_byte)(ttime->tm_mon + 1);\n   ptime->day = (png_byte)ttime->tm_mday;\n   ptime->hour = (png_byte)ttime->tm_hour;\n   ptime->minute = (png_byte)ttime->tm_min;\n   ptime->second = (png_byte)ttime->tm_sec;\n}\n\nvoid PNGAPI\npng_convert_from_time_t(png_timep ptime, time_t ttime)\n{\n   struct tm *tbuf;\n\n   png_debug(1, \"in png_convert_from_time_t\");\n\n   tbuf = gmtime(&ttime);\n   png_convert_from_struct_tm(ptime, tbuf);\n}\n#endif\n\n/* Initialize png_ptr structure, and allocate any memory needed */\npng_structp PNGAPI\npng_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr,\n   png_error_ptr error_fn, png_error_ptr warn_fn)\n{\n#ifdef PNG_USER_MEM_SUPPORTED\n   return (png_create_write_struct_2(user_png_ver, error_ptr, error_fn,\n      warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL));\n}\n\n/* Alternate initialize png_ptr structure, and allocate any memory needed */\npng_structp PNGAPI\npng_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,\n   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,\n   png_malloc_ptr malloc_fn, png_free_ptr free_fn)\n{\n#endif /* PNG_USER_MEM_SUPPORTED */\n#ifdef PNG_SETJMP_SUPPORTED\n   volatile\n#endif\n   png_structp png_ptr;\n#ifdef PNG_SETJMP_SUPPORTED\n#ifdef USE_FAR_KEYWORD\n   jmp_buf jmpbuf;\n#endif\n#endif\n   int i;\n\n   png_debug(1, \"in png_create_write_struct\");\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,\n      (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);\n#else\n   png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);\n#endif /* PNG_USER_MEM_SUPPORTED */\n   if (png_ptr == NULL)\n      return (NULL);\n\n   /* Added at libpng-1.2.6 */\n#ifdef PNG_SET_USER_LIMITS_SUPPORTED\n   png_ptr->user_width_max = PNG_USER_WIDTH_MAX;\n   png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n#ifdef USE_FAR_KEYWORD\n   if (setjmp(jmpbuf))\n#else\n   if (setjmp(png_ptr->jmpbuf))\n#endif\n   {\n      png_free(png_ptr, png_ptr->zbuf);\n      png_ptr->zbuf = NULL;\n#ifdef PNG_USER_MEM_SUPPORTED\n      png_destroy_struct_2((png_voidp)png_ptr,\n         (png_free_ptr)free_fn, (png_voidp)mem_ptr);\n#else\n      png_destroy_struct((png_voidp)png_ptr);\n#endif\n      return (NULL);\n   }\n#ifdef USE_FAR_KEYWORD\n   png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf));\n#endif\n#endif\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn);\n#endif /* PNG_USER_MEM_SUPPORTED */\n   png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn);\n\n   if (user_png_ver)\n   {\n      i = 0;\n      do\n      {\n         if (user_png_ver[i] != png_libpng_ver[i])\n            png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;\n      } while (png_libpng_ver[i++]);\n   }\n\n   if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)\n   {\n     /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so\n      * we must recompile any applications that use any older library version.\n      * For versions after libpng 1.0, we will be compatible, so we need\n      * only check the first digit.\n      */\n     if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] ||\n         (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||\n         (user_png_ver[0] == '0' && user_png_ver[2] < '9'))\n     {\n#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)\n        char msg[80];\n        if (user_png_ver)\n        {\n           png_snprintf(msg, 80,\n              \"Application was compiled with png.h from libpng-%.20s\",\n              user_png_ver);\n           png_warning(png_ptr, msg);\n        }\n        png_snprintf(msg, 80,\n           \"Application  is  running with png.c from libpng-%.20s\",\n           png_libpng_ver);\n        png_warning(png_ptr, msg);\n#endif\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\n        png_ptr->flags = 0;\n#endif\n        png_error(png_ptr,\n           \"Incompatible libpng version in application and library\");\n     }\n   }\n\n   /* Initialize zbuf - compression buffer */\n   png_ptr->zbuf_size = PNG_ZBUF_SIZE;\n   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,\n     (png_uint_32)png_ptr->zbuf_size);\n\n   png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL,\n      png_flush_ptr_NULL);\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n   png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT,\n      1, png_doublep_NULL, png_doublep_NULL);\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n   /* Applications that neglect to set up their own setjmp() and then\n    * encounter a png_error() will longjmp here.  Since the jmpbuf is\n    * then meaningless we abort instead of returning.\n    */\n#ifdef USE_FAR_KEYWORD\n   if (setjmp(jmpbuf))\n      PNG_ABORT();\n   png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf));\n#else\n   if (setjmp(png_ptr->jmpbuf))\n      PNG_ABORT();\n#endif\n#endif\n   return (png_ptr);\n}\n\n/* Initialize png_ptr structure, and allocate any memory needed */\n#if defined(PNG_1_0_X) || defined(PNG_1_2_X)\n/* Deprecated. */\n#undef png_write_init\nvoid PNGAPI\npng_write_init(png_structp png_ptr)\n{\n   /* We only come here via pre-1.0.7-compiled applications */\n   png_write_init_2(png_ptr, \"1.0.6 or earlier\", 0, 0);\n}\n\nvoid PNGAPI\npng_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,\n   png_size_t png_struct_size, png_size_t png_info_size)\n{\n   /* We only come here via pre-1.0.12-compiled applications */\n   if (png_ptr == NULL) return;\n#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)\n   if (png_sizeof(png_struct) > png_struct_size ||\n      png_sizeof(png_info) > png_info_size)\n   {\n      char msg[80];\n      png_ptr->warning_fn = NULL;\n      if (user_png_ver)\n      {\n         png_snprintf(msg, 80,\n            \"Application was compiled with png.h from libpng-%.20s\",\n            user_png_ver);\n         png_warning(png_ptr, msg);\n      }\n      png_snprintf(msg, 80,\n         \"Application  is  running with png.c from libpng-%.20s\",\n         png_libpng_ver);\n      png_warning(png_ptr, msg);\n   }\n#endif\n   if (png_sizeof(png_struct) > png_struct_size)\n   {\n      png_ptr->error_fn = NULL;\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\n      png_ptr->flags = 0;\n#endif\n      png_error(png_ptr,\n      \"The png struct allocated by the application for writing is\"\n      \" too small.\");\n   }\n   if (png_sizeof(png_info) > png_info_size)\n   {\n      png_ptr->error_fn = NULL;\n#ifdef PNG_ERROR_NUMBERS_SUPPORTED\n      png_ptr->flags = 0;\n#endif\n      png_error(png_ptr,\n      \"The info struct allocated by the application for writing is\"\n      \" too small.\");\n   }\n   png_write_init_3(&png_ptr, user_png_ver, png_struct_size);\n}\n#endif /* PNG_1_0_X || PNG_1_2_X */\n\n\nvoid PNGAPI\npng_write_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,\n   png_size_t png_struct_size)\n{\n   png_structp png_ptr = *ptr_ptr;\n#ifdef PNG_SETJMP_SUPPORTED\n   jmp_buf tmp_jmp; /* to save current jump buffer */\n#endif\n\n   int i = 0;\n\n   if (png_ptr == NULL)\n      return;\n\n   do\n   {\n      if (user_png_ver[i] != png_libpng_ver[i])\n      {\n#ifdef PNG_LEGACY_SUPPORTED\n         png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;\n#else\n         png_ptr->warning_fn = NULL;\n         png_warning(png_ptr,\n \"Application uses deprecated png_write_init() and should be recompiled.\");\n#endif\n      }\n   } while (png_libpng_ver[i++]);\n\n   png_debug(1, \"in png_write_init_3\");\n\n#ifdef PNG_SETJMP_SUPPORTED\n   /* Save jump buffer and error functions */\n   png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf));\n#endif\n\n   if (png_sizeof(png_struct) > png_struct_size)\n   {\n      png_destroy_struct(png_ptr);\n      png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);\n      *ptr_ptr = png_ptr;\n   }\n\n   /* Reset all variables to 0 */\n   png_memset(png_ptr, 0, png_sizeof(png_struct));\n\n   /* Added at libpng-1.2.6 */\n#ifdef PNG_SET_USER_LIMITS_SUPPORTED\n   png_ptr->user_width_max = PNG_USER_WIDTH_MAX;\n   png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n   /* Restore jump buffer */\n   png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf));\n#endif\n\n   png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL,\n      png_flush_ptr_NULL);\n\n   /* Initialize zbuf - compression buffer */\n   png_ptr->zbuf_size = PNG_ZBUF_SIZE;\n   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,\n     (png_uint_32)png_ptr->zbuf_size);\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n   png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT,\n      1, png_doublep_NULL, png_doublep_NULL);\n#endif\n}\n\n/* Write a few rows of image data.  If the image is interlaced,\n * either you will have to write the 7 sub images, or, if you\n * have called png_set_interlace_handling(), you will have to\n * \"write\" the image seven times.\n */\nvoid PNGAPI\npng_write_rows(png_structp png_ptr, png_bytepp row,\n   png_uint_32 num_rows)\n{\n   png_uint_32 i; /* row counter */\n   png_bytepp rp; /* row pointer */\n\n   png_debug(1, \"in png_write_rows\");\n\n   if (png_ptr == NULL)\n      return;\n\n   /* Loop through the rows */\n   for (i = 0, rp = row; i < num_rows; i++, rp++)\n   {\n      png_write_row(png_ptr, *rp);\n   }\n}\n\n/* Write the image.  You only need to call this function once, even\n * if you are writing an interlaced image.\n */\nvoid PNGAPI\npng_write_image(png_structp png_ptr, png_bytepp image)\n{\n   png_uint_32 i; /* row index */\n   int pass, num_pass; /* pass variables */\n   png_bytepp rp; /* points to current row */\n\n   if (png_ptr == NULL)\n      return;\n\n   png_debug(1, \"in png_write_image\");\n\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n   /* Initialize interlace handling.  If image is not interlaced,\n    * this will set pass to 1\n    */\n   num_pass = png_set_interlace_handling(png_ptr);\n#else\n   num_pass = 1;\n#endif\n   /* Loop through passes */\n   for (pass = 0; pass < num_pass; pass++)\n   {\n      /* Loop through image */\n      for (i = 0, rp = image; i < png_ptr->height; i++, rp++)\n      {\n         png_write_row(png_ptr, *rp);\n      }\n   }\n}\n\n/* Called by user to write a row of image data */\nvoid PNGAPI\npng_write_row(png_structp png_ptr, png_bytep row)\n{\n   if (png_ptr == NULL)\n      return;\n\n   png_debug2(1, \"in png_write_row (row %ld, pass %d)\",\n      png_ptr->row_number, png_ptr->pass);\n\n   /* Initialize transformations and other stuff if first time */\n   if (png_ptr->row_number == 0 && png_ptr->pass == 0)\n   {\n      /* Make sure we wrote the header info */\n      if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))\n         png_error(png_ptr,\n            \"png_write_info was never called before png_write_row.\");\n\n      /* Check for transforms that have been set but were defined out */\n#if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED)\n      if (png_ptr->transformations & PNG_INVERT_MONO)\n         png_warning(png_ptr,\n             \"PNG_WRITE_INVERT_SUPPORTED is not defined.\");\n#endif\n#if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED)\n      if (png_ptr->transformations & PNG_FILLER)\n         png_warning(png_ptr,\n             \"PNG_WRITE_FILLER_SUPPORTED is not defined.\");\n#endif\n#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \\\n    defined(PNG_READ_PACKSWAP_SUPPORTED)\n      if (png_ptr->transformations & PNG_PACKSWAP)\n         png_warning(png_ptr,\n             \"PNG_WRITE_PACKSWAP_SUPPORTED is not defined.\");\n#endif\n#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED)\n      if (png_ptr->transformations & PNG_PACK)\n         png_warning(png_ptr, \"PNG_WRITE_PACK_SUPPORTED is not defined.\");\n#endif\n#if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED)\n      if (png_ptr->transformations & PNG_SHIFT)\n         png_warning(png_ptr, \"PNG_WRITE_SHIFT_SUPPORTED is not defined.\");\n#endif\n#if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED)\n      if (png_ptr->transformations & PNG_BGR)\n         png_warning(png_ptr, \"PNG_WRITE_BGR_SUPPORTED is not defined.\");\n#endif\n#if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED)\n      if (png_ptr->transformations & PNG_SWAP_BYTES)\n         png_warning(png_ptr, \"PNG_WRITE_SWAP_SUPPORTED is not defined.\");\n#endif\n\n      png_write_start_row(png_ptr);\n   }\n\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n   /* If interlaced and not interested in row, return */\n   if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))\n   {\n      switch (png_ptr->pass)\n      {\n         case 0:\n            if (png_ptr->row_number & 0x07)\n            {\n               png_write_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 1:\n            if ((png_ptr->row_number & 0x07) || png_ptr->width < 5)\n            {\n               png_write_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 2:\n            if ((png_ptr->row_number & 0x07) != 4)\n            {\n               png_write_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 3:\n            if ((png_ptr->row_number & 0x03) || png_ptr->width < 3)\n            {\n               png_write_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 4:\n            if ((png_ptr->row_number & 0x03) != 2)\n            {\n               png_write_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 5:\n            if ((png_ptr->row_number & 0x01) || png_ptr->width < 2)\n            {\n               png_write_finish_row(png_ptr);\n               return;\n            }\n            break;\n         case 6:\n            if (!(png_ptr->row_number & 0x01))\n            {\n               png_write_finish_row(png_ptr);\n               return;\n            }\n            break;\n      }\n   }\n#endif\n\n   /* Set up row info for transformations */\n   png_ptr->row_info.color_type = png_ptr->color_type;\n   png_ptr->row_info.width = png_ptr->usr_width;\n   png_ptr->row_info.channels = png_ptr->usr_channels;\n   png_ptr->row_info.bit_depth = png_ptr->usr_bit_depth;\n   png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth *\n      png_ptr->row_info.channels);\n\n   png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,\n      png_ptr->row_info.width);\n\n   png_debug1(3, \"row_info->color_type = %d\", png_ptr->row_info.color_type);\n   png_debug1(3, \"row_info->width = %lu\", png_ptr->row_info.width);\n   png_debug1(3, \"row_info->channels = %d\", png_ptr->row_info.channels);\n   png_debug1(3, \"row_info->bit_depth = %d\", png_ptr->row_info.bit_depth);\n   png_debug1(3, \"row_info->pixel_depth = %d\", png_ptr->row_info.pixel_depth);\n   png_debug1(3, \"row_info->rowbytes = %lu\", png_ptr->row_info.rowbytes);\n\n   /* Copy user's row into buffer, leaving room for filter byte. */\n   png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row,\n      png_ptr->row_info.rowbytes);\n\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n   /* Handle interlacing */\n   if (png_ptr->interlaced && png_ptr->pass < 6 &&\n      (png_ptr->transformations & PNG_INTERLACE))\n   {\n      png_do_write_interlace(&(png_ptr->row_info),\n         png_ptr->row_buf + 1, png_ptr->pass);\n      /* This should always get caught above, but still ... */\n      if (!(png_ptr->row_info.width))\n      {\n         png_write_finish_row(png_ptr);\n         return;\n      }\n   }\n#endif\n\n   /* Handle other transformations */\n   if (png_ptr->transformations)\n      png_do_write_transformations(png_ptr);\n\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n   /* Write filter_method 64 (intrapixel differencing) only if\n    * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and\n    * 2. Libpng did not write a PNG signature (this filter_method is only\n    *    used in PNG datastreams that are embedded in MNG datastreams) and\n    * 3. The application called png_permit_mng_features with a mask that\n    *    included PNG_FLAG_MNG_FILTER_64 and\n    * 4. The filter_method is 64 and\n    * 5. The color_type is RGB or RGBA\n    */\n   if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&\n      (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))\n   {\n      /* Intrapixel differencing */\n      png_do_write_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1);\n   }\n#endif\n\n   /* Find a filter if necessary, filter the row and write it out. */\n   png_write_find_filter(png_ptr, &(png_ptr->row_info));\n\n   if (png_ptr->write_row_fn != NULL)\n      (*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);\n}\n\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\n/* Set the automatic flush interval or 0 to turn flushing off */\nvoid PNGAPI\npng_set_flush(png_structp png_ptr, int nrows)\n{\n   png_debug(1, \"in png_set_flush\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->flush_dist = (nrows < 0 ? 0 : nrows);\n}\n\n/* Flush the current output buffers now */\nvoid PNGAPI\npng_write_flush(png_structp png_ptr)\n{\n   int wrote_IDAT;\n\n   png_debug(1, \"in png_write_flush\");\n\n   if (png_ptr == NULL)\n      return;\n   /* We have already written out all of the data */\n   if (png_ptr->row_number >= png_ptr->num_rows)\n      return;\n\n   do\n   {\n      int ret;\n\n      /* Compress the data */\n      ret = deflate(&png_ptr->zstream, Z_SYNC_FLUSH);\n      wrote_IDAT = 0;\n\n      /* Check for compression errors */\n      if (ret != Z_OK)\n      {\n         if (png_ptr->zstream.msg != NULL)\n            png_error(png_ptr, png_ptr->zstream.msg);\n         else\n            png_error(png_ptr, \"zlib error\");\n      }\n\n      if (!(png_ptr->zstream.avail_out))\n      {\n         /* Write the IDAT and reset the zlib output buffer */\n         png_write_IDAT(png_ptr, png_ptr->zbuf,\n                        png_ptr->zbuf_size);\n         png_ptr->zstream.next_out = png_ptr->zbuf;\n         png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n         wrote_IDAT = 1;\n      }\n   } while(wrote_IDAT == 1);\n\n   /* If there is any data left to be output, write it into a new IDAT */\n   if (png_ptr->zbuf_size != png_ptr->zstream.avail_out)\n   {\n      /* Write the IDAT and reset the zlib output buffer */\n      png_write_IDAT(png_ptr, png_ptr->zbuf,\n                     png_ptr->zbuf_size - png_ptr->zstream.avail_out);\n      png_ptr->zstream.next_out = png_ptr->zbuf;\n      png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n   }\n   png_ptr->flush_rows = 0;\n   png_flush(png_ptr);\n}\n#endif /* PNG_WRITE_FLUSH_SUPPORTED */\n\n/* Free all memory used by the write */\nvoid PNGAPI\npng_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)\n{\n   png_structp png_ptr = NULL;\n   png_infop info_ptr = NULL;\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_free_ptr free_fn = NULL;\n   png_voidp mem_ptr = NULL;\n#endif\n\n   png_debug(1, \"in png_destroy_write_struct\");\n\n   if (png_ptr_ptr != NULL)\n   {\n      png_ptr = *png_ptr_ptr;\n#ifdef PNG_USER_MEM_SUPPORTED\n      free_fn = png_ptr->free_fn;\n      mem_ptr = png_ptr->mem_ptr;\n#endif\n   }\n\n#ifdef PNG_USER_MEM_SUPPORTED\n   if (png_ptr != NULL)\n   {\n      free_fn = png_ptr->free_fn;\n      mem_ptr = png_ptr->mem_ptr;\n   }\n#endif\n\n   if (info_ptr_ptr != NULL)\n      info_ptr = *info_ptr_ptr;\n\n   if (info_ptr != NULL)\n   {\n      if (png_ptr != NULL)\n      {\n        png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);\n\n#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\n        if (png_ptr->num_chunk_list)\n        {\n           png_free(png_ptr, png_ptr->chunk_list);\n           png_ptr->chunk_list = NULL;\n           png_ptr->num_chunk_list = 0;\n        }\n#endif\n      }\n\n#ifdef PNG_USER_MEM_SUPPORTED\n      png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn,\n         (png_voidp)mem_ptr);\n#else\n      png_destroy_struct((png_voidp)info_ptr);\n#endif\n      *info_ptr_ptr = NULL;\n   }\n\n   if (png_ptr != NULL)\n   {\n      png_write_destroy(png_ptr);\n#ifdef PNG_USER_MEM_SUPPORTED\n      png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn,\n         (png_voidp)mem_ptr);\n#else\n      png_destroy_struct((png_voidp)png_ptr);\n#endif\n      *png_ptr_ptr = NULL;\n   }\n}\n\n\n/* Free any memory used in png_ptr struct (old method) */\nvoid /* PRIVATE */\npng_write_destroy(png_structp png_ptr)\n{\n#ifdef PNG_SETJMP_SUPPORTED\n   jmp_buf tmp_jmp; /* Save jump buffer */\n#endif\n   png_error_ptr error_fn;\n   png_error_ptr warning_fn;\n   png_voidp error_ptr;\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_free_ptr free_fn;\n#endif\n\n   png_debug(1, \"in png_write_destroy\");\n\n   /* Free any memory zlib uses */\n   deflateEnd(&png_ptr->zstream);\n\n   /* Free our memory.  png_free checks NULL for us. */\n   png_free(png_ptr, png_ptr->zbuf);\n   png_free(png_ptr, png_ptr->row_buf);\n#ifdef PNG_WRITE_FILTER_SUPPORTED\n   png_free(png_ptr, png_ptr->prev_row);\n   png_free(png_ptr, png_ptr->sub_row);\n   png_free(png_ptr, png_ptr->up_row);\n   png_free(png_ptr, png_ptr->avg_row);\n   png_free(png_ptr, png_ptr->paeth_row);\n#endif\n\n#ifdef PNG_TIME_RFC1123_SUPPORTED\n   png_free(png_ptr, png_ptr->time_buffer);\n#endif\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n   png_free(png_ptr, png_ptr->prev_filters);\n   png_free(png_ptr, png_ptr->filter_weights);\n   png_free(png_ptr, png_ptr->inv_filter_weights);\n   png_free(png_ptr, png_ptr->filter_costs);\n   png_free(png_ptr, png_ptr->inv_filter_costs);\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n   /* Reset structure */\n   png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf));\n#endif\n\n   error_fn = png_ptr->error_fn;\n   warning_fn = png_ptr->warning_fn;\n   error_ptr = png_ptr->error_ptr;\n#ifdef PNG_USER_MEM_SUPPORTED\n   free_fn = png_ptr->free_fn;\n#endif\n\n   png_memset(png_ptr, 0, png_sizeof(png_struct));\n\n   png_ptr->error_fn = error_fn;\n   png_ptr->warning_fn = warning_fn;\n   png_ptr->error_ptr = error_ptr;\n#ifdef PNG_USER_MEM_SUPPORTED\n   png_ptr->free_fn = free_fn;\n#endif\n\n#ifdef PNG_SETJMP_SUPPORTED\n   png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf));\n#endif\n}\n\n/* Allow the application to select one or more row filters to use. */\nvoid PNGAPI\npng_set_filter(png_structp png_ptr, int method, int filters)\n{\n   png_debug(1, \"in png_set_filter\");\n\n   if (png_ptr == NULL)\n      return;\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n   if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&\n      (method == PNG_INTRAPIXEL_DIFFERENCING))\n         method = PNG_FILTER_TYPE_BASE;\n#endif\n   if (method == PNG_FILTER_TYPE_BASE)\n   {\n      switch (filters & (PNG_ALL_FILTERS | 0x07))\n      {\n#ifdef PNG_WRITE_FILTER_SUPPORTED\n         case 5:\n         case 6:\n         case 7: png_warning(png_ptr, \"Unknown row filter for method 0\");\n#endif /* PNG_WRITE_FILTER_SUPPORTED */\n         case PNG_FILTER_VALUE_NONE:\n              png_ptr->do_filter = PNG_FILTER_NONE; break;\n#ifdef PNG_WRITE_FILTER_SUPPORTED\n         case PNG_FILTER_VALUE_SUB:\n              png_ptr->do_filter = PNG_FILTER_SUB; break;\n         case PNG_FILTER_VALUE_UP:\n              png_ptr->do_filter = PNG_FILTER_UP; break;\n         case PNG_FILTER_VALUE_AVG:\n              png_ptr->do_filter = PNG_FILTER_AVG; break;\n         case PNG_FILTER_VALUE_PAETH:\n              png_ptr->do_filter = PNG_FILTER_PAETH; break;\n         default: png_ptr->do_filter = (png_byte)filters; break;\n#else\n         default: png_warning(png_ptr, \"Unknown row filter for method 0\");\n#endif /* PNG_WRITE_FILTER_SUPPORTED */\n      }\n\n      /* If we have allocated the row_buf, this means we have already started\n       * with the image and we should have allocated all of the filter buffers\n       * that have been selected.  If prev_row isn't already allocated, then\n       * it is too late to start using the filters that need it, since we\n       * will be missing the data in the previous row.  If an application\n       * wants to start and stop using particular filters during compression,\n       * it should start out with all of the filters, and then add and\n       * remove them after the start of compression.\n       */\n      if (png_ptr->row_buf != NULL)\n      {\n#ifdef PNG_WRITE_FILTER_SUPPORTED\n         if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL)\n         {\n            png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,\n              (png_ptr->rowbytes + 1));\n            png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB;\n         }\n\n         if ((png_ptr->do_filter & PNG_FILTER_UP) && png_ptr->up_row == NULL)\n         {\n            if (png_ptr->prev_row == NULL)\n            {\n               png_warning(png_ptr, \"Can't add Up filter after starting\");\n               png_ptr->do_filter &= ~PNG_FILTER_UP;\n            }\n            else\n            {\n               png_ptr->up_row = (png_bytep)png_malloc(png_ptr,\n                  (png_ptr->rowbytes + 1));\n               png_ptr->up_row[0] = PNG_FILTER_VALUE_UP;\n            }\n         }\n\n         if ((png_ptr->do_filter & PNG_FILTER_AVG) && png_ptr->avg_row == NULL)\n         {\n            if (png_ptr->prev_row == NULL)\n            {\n               png_warning(png_ptr, \"Can't add Average filter after starting\");\n               png_ptr->do_filter &= ~PNG_FILTER_AVG;\n            }\n            else\n            {\n               png_ptr->avg_row = (png_bytep)png_malloc(png_ptr,\n                  (png_ptr->rowbytes + 1));\n               png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG;\n            }\n         }\n\n         if ((png_ptr->do_filter & PNG_FILTER_PAETH) &&\n             png_ptr->paeth_row == NULL)\n         {\n            if (png_ptr->prev_row == NULL)\n            {\n               png_warning(png_ptr, \"Can't add Paeth filter after starting\");\n               png_ptr->do_filter &= (png_byte)(~PNG_FILTER_PAETH);\n            }\n            else\n            {\n               png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr,\n                  (png_ptr->rowbytes + 1));\n               png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;\n            }\n         }\n\n         if (png_ptr->do_filter == PNG_NO_FILTERS)\n#endif /* PNG_WRITE_FILTER_SUPPORTED */\n            png_ptr->do_filter = PNG_FILTER_NONE;\n      }\n   }\n   else\n      png_error(png_ptr, \"Unknown custom filter method\");\n}\n\n/* This allows us to influence the way in which libpng chooses the \"best\"\n * filter for the current scanline.  While the \"minimum-sum-of-absolute-\n * differences metric is relatively fast and effective, there is some\n * question as to whether it can be improved upon by trying to keep the\n * filtered data going to zlib more consistent, hopefully resulting in\n * better compression.\n */\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED      /* GRR 970116 */\nvoid PNGAPI\npng_set_filter_heuristics(png_structp png_ptr, int heuristic_method,\n   int num_weights, png_doublep filter_weights,\n   png_doublep filter_costs)\n{\n   int i;\n\n   png_debug(1, \"in png_set_filter_heuristics\");\n\n   if (png_ptr == NULL)\n      return;\n   if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST)\n   {\n      png_warning(png_ptr, \"Unknown filter heuristic method\");\n      return;\n   }\n\n   if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT)\n   {\n      heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED;\n   }\n\n   if (num_weights < 0 || filter_weights == NULL ||\n      heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED)\n   {\n      num_weights = 0;\n   }\n\n   png_ptr->num_prev_filters = (png_byte)num_weights;\n   png_ptr->heuristic_method = (png_byte)heuristic_method;\n\n   if (num_weights > 0)\n   {\n      if (png_ptr->prev_filters == NULL)\n      {\n         png_ptr->prev_filters = (png_bytep)png_malloc(png_ptr,\n            (png_uint_32)(png_sizeof(png_byte) * num_weights));\n\n         /* To make sure that the weighting starts out fairly */\n         for (i = 0; i < num_weights; i++)\n         {\n            png_ptr->prev_filters[i] = 255;\n         }\n      }\n\n      if (png_ptr->filter_weights == NULL)\n      {\n         png_ptr->filter_weights = (png_uint_16p)png_malloc(png_ptr,\n            (png_uint_32)(png_sizeof(png_uint_16) * num_weights));\n\n         png_ptr->inv_filter_weights = (png_uint_16p)png_malloc(png_ptr,\n            (png_uint_32)(png_sizeof(png_uint_16) * num_weights));\n         for (i = 0; i < num_weights; i++)\n         {\n            png_ptr->inv_filter_weights[i] =\n            png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR;\n         }\n      }\n\n      for (i = 0; i < num_weights; i++)\n      {\n         if (filter_weights[i] < 0.0)\n         {\n            png_ptr->inv_filter_weights[i] =\n            png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR;\n         }\n         else\n         {\n            png_ptr->inv_filter_weights[i] =\n               (png_uint_16)((double)PNG_WEIGHT_FACTOR*filter_weights[i]+0.5);\n            png_ptr->filter_weights[i] =\n               (png_uint_16)((double)PNG_WEIGHT_FACTOR/filter_weights[i]+0.5);\n         }\n      }\n   }\n\n   /* If, in the future, there are other filter methods, this would\n    * need to be based on png_ptr->filter.\n    */\n   if (png_ptr->filter_costs == NULL)\n   {\n      png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr,\n         (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST));\n\n      png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr,\n         (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST));\n\n      for (i = 0; i < PNG_FILTER_VALUE_LAST; i++)\n      {\n         png_ptr->inv_filter_costs[i] =\n         png_ptr->filter_costs[i] = PNG_COST_FACTOR;\n      }\n   }\n\n   /* Here is where we set the relative costs of the different filters.  We\n    * should take the desired compression level into account when setting\n    * the costs, so that Paeth, for instance, has a high relative cost at low\n    * compression levels, while it has a lower relative cost at higher\n    * compression settings.  The filter types are in order of increasing\n    * relative cost, so it would be possible to do this with an algorithm.\n    */\n   for (i = 0; i < PNG_FILTER_VALUE_LAST; i++)\n   {\n      if (filter_costs == NULL || filter_costs[i] < 0.0)\n      {\n         png_ptr->inv_filter_costs[i] =\n         png_ptr->filter_costs[i] = PNG_COST_FACTOR;\n      }\n      else if (filter_costs[i] >= 1.0)\n      {\n         png_ptr->inv_filter_costs[i] =\n            (png_uint_16)((double)PNG_COST_FACTOR / filter_costs[i] + 0.5);\n         png_ptr->filter_costs[i] =\n            (png_uint_16)((double)PNG_COST_FACTOR * filter_costs[i] + 0.5);\n      }\n   }\n}\n#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */\n\nvoid PNGAPI\npng_set_compression_level(png_structp png_ptr, int level)\n{\n   png_debug(1, \"in png_set_compression_level\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL;\n   png_ptr->zlib_level = level;\n}\n\nvoid PNGAPI\npng_set_compression_mem_level(png_structp png_ptr, int mem_level)\n{\n   png_debug(1, \"in png_set_compression_mem_level\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL;\n   png_ptr->zlib_mem_level = mem_level;\n}\n\nvoid PNGAPI\npng_set_compression_strategy(png_structp png_ptr, int strategy)\n{\n   png_debug(1, \"in png_set_compression_strategy\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY;\n   png_ptr->zlib_strategy = strategy;\n}\n\nvoid PNGAPI\npng_set_compression_window_bits(png_structp png_ptr, int window_bits)\n{\n   if (png_ptr == NULL)\n      return;\n   if (window_bits > 15)\n      png_warning(png_ptr, \"Only compression windows <= 32k supported by PNG\");\n   else if (window_bits < 8)\n      png_warning(png_ptr, \"Only compression windows >= 256 supported by PNG\");\n#ifndef WBITS_8_OK\n   /* Avoid libpng bug with 256-byte windows */\n   if (window_bits == 8)\n     {\n       png_warning(png_ptr, \"Compression window is being reset to 512\");\n       window_bits = 9;\n     }\n#endif\n   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS;\n   png_ptr->zlib_window_bits = window_bits;\n}\n\nvoid PNGAPI\npng_set_compression_method(png_structp png_ptr, int method)\n{\n   png_debug(1, \"in png_set_compression_method\");\n\n   if (png_ptr == NULL)\n      return;\n   if (method != 8)\n      png_warning(png_ptr, \"Only compression method 8 is supported by PNG\");\n   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD;\n   png_ptr->zlib_method = method;\n}\n\nvoid PNGAPI\npng_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn)\n{\n   if (png_ptr == NULL)\n      return;\n   png_ptr->write_row_fn = write_row_fn;\n}\n\n#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED\nvoid PNGAPI\npng_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr\n   write_user_transform_fn)\n{\n   png_debug(1, \"in png_set_write_user_transform_fn\");\n\n   if (png_ptr == NULL)\n      return;\n   png_ptr->transformations |= PNG_USER_TRANSFORM;\n   png_ptr->write_user_transform_fn = write_user_transform_fn;\n}\n#endif\n\n\n#ifdef PNG_INFO_IMAGE_SUPPORTED\nvoid PNGAPI\npng_write_png(png_structp png_ptr, png_infop info_ptr,\n              int transforms, voidp params)\n{\n   if (png_ptr == NULL || info_ptr == NULL)\n      return;\n\n   /* Write the file header information. */\n   png_write_info(png_ptr, info_ptr);\n\n   /* ------ these transformations don't touch the info structure ------- */\n\n#ifdef PNG_WRITE_INVERT_SUPPORTED\n   /* Invert monochrome pixels */\n   if (transforms & PNG_TRANSFORM_INVERT_MONO)\n      png_set_invert_mono(png_ptr);\n#endif\n\n#ifdef PNG_WRITE_SHIFT_SUPPORTED\n   /* Shift the pixels up to a legal bit depth and fill in\n    * as appropriate to correctly scale the image.\n    */\n   if ((transforms & PNG_TRANSFORM_SHIFT)\n               && (info_ptr->valid & PNG_INFO_sBIT))\n      png_set_shift(png_ptr, &info_ptr->sig_bit);\n#endif\n\n#ifdef PNG_WRITE_PACK_SUPPORTED\n   /* Pack pixels into bytes */\n   if (transforms & PNG_TRANSFORM_PACKING)\n       png_set_packing(png_ptr);\n#endif\n\n#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED\n   /* Swap location of alpha bytes from ARGB to RGBA */\n   if (transforms & PNG_TRANSFORM_SWAP_ALPHA)\n      png_set_swap_alpha(png_ptr);\n#endif\n\n#ifdef PNG_WRITE_FILLER_SUPPORTED\n   /* Pack XRGB/RGBX/ARGB/RGBA into * RGB (4 channels -> 3 channels) */\n   if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER)\n      png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);\n   else if (transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE)\n      png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);\n#endif\n\n#ifdef PNG_WRITE_BGR_SUPPORTED\n   /* Flip BGR pixels to RGB */\n   if (transforms & PNG_TRANSFORM_BGR)\n      png_set_bgr(png_ptr);\n#endif\n\n#ifdef PNG_WRITE_SWAP_SUPPORTED\n   /* Swap bytes of 16-bit files to most significant byte first */\n   if (transforms & PNG_TRANSFORM_SWAP_ENDIAN)\n      png_set_swap(png_ptr);\n#endif\n\n#ifdef PNG_WRITE_PACKSWAP_SUPPORTED\n   /* Swap bits of 1, 2, 4 bit packed pixel formats */\n   if (transforms & PNG_TRANSFORM_PACKSWAP)\n      png_set_packswap(png_ptr);\n#endif\n\n#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED\n   /* Invert the alpha channel from opacity to transparency */\n   if (transforms & PNG_TRANSFORM_INVERT_ALPHA)\n      png_set_invert_alpha(png_ptr);\n#endif\n\n   /* ----------------------- end of transformations ------------------- */\n\n   /* Write the bits */\n   if (info_ptr->valid & PNG_INFO_IDAT)\n       png_write_image(png_ptr, info_ptr->row_pointers);\n\n   /* It is REQUIRED to call this to finish writing the rest of the file */\n   png_write_end(png_ptr, info_ptr);\n\n   transforms = transforms; /* Quiet compiler warnings */\n   params = params;\n}\n#endif\n#endif /* PNG_WRITE_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngwtran.c",
    "content": "\n/* pngwtran.c - transforms the data in a row for PNG writers\n *\n * Last changed in libpng 1.2.43 [February 25, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#ifdef PNG_WRITE_SUPPORTED\n\n/* Transform the data according to the user's wishes.  The order of\n * transformations is significant.\n */\nvoid /* PRIVATE */\npng_do_write_transformations(png_structp png_ptr)\n{\n   png_debug(1, \"in png_do_write_transformations\");\n\n   if (png_ptr == NULL)\n      return;\n\n#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED\n   if (png_ptr->transformations & PNG_USER_TRANSFORM)\n      if (png_ptr->write_user_transform_fn != NULL)\n        (*(png_ptr->write_user_transform_fn)) /* User write transform\n                                                 function */\n          (png_ptr,                    /* png_ptr */\n           &(png_ptr->row_info),       /* row_info:     */\n             /*  png_uint_32 width;          width of row */\n             /*  png_uint_32 rowbytes;       number of bytes in row */\n             /*  png_byte color_type;        color type of pixels */\n             /*  png_byte bit_depth;         bit depth of samples */\n             /*  png_byte channels;          number of channels (1-4) */\n             /*  png_byte pixel_depth;       bits per pixel (depth*channels) */\n           png_ptr->row_buf + 1);      /* start of pixel data for row */\n#endif\n#ifdef PNG_WRITE_FILLER_SUPPORTED\n   if (png_ptr->transformations & PNG_FILLER)\n      png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,\n         png_ptr->flags);\n#endif\n#ifdef PNG_WRITE_PACKSWAP_SUPPORTED\n   if (png_ptr->transformations & PNG_PACKSWAP)\n      png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n#ifdef PNG_WRITE_PACK_SUPPORTED\n   if (png_ptr->transformations & PNG_PACK)\n      png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1,\n         (png_uint_32)png_ptr->bit_depth);\n#endif\n#ifdef PNG_WRITE_SWAP_SUPPORTED\n   if (png_ptr->transformations & PNG_SWAP_BYTES)\n      png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n#ifdef PNG_WRITE_SHIFT_SUPPORTED\n   if (png_ptr->transformations & PNG_SHIFT)\n      png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,\n         &(png_ptr->shift));\n#endif\n#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED\n   if (png_ptr->transformations & PNG_SWAP_ALPHA)\n      png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED\n   if (png_ptr->transformations & PNG_INVERT_ALPHA)\n      png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n#ifdef PNG_WRITE_BGR_SUPPORTED\n   if (png_ptr->transformations & PNG_BGR)\n      png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n#ifdef PNG_WRITE_INVERT_SUPPORTED\n   if (png_ptr->transformations & PNG_INVERT_MONO)\n      png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);\n#endif\n}\n\n#ifdef PNG_WRITE_PACK_SUPPORTED\n/* Pack pixels into bytes.  Pass the true bit depth in bit_depth.  The\n * row_info bit depth should be 8 (one pixel per byte).  The channels\n * should be 1 (this only happens on grayscale and paletted images).\n */\nvoid /* PRIVATE */\npng_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)\n{\n   png_debug(1, \"in png_do_pack\");\n\n   if (row_info->bit_depth == 8 &&\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n      row_info->channels == 1)\n   {\n      switch ((int)bit_depth)\n      {\n         case 1:\n         {\n            png_bytep sp, dp;\n            int mask, v;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            sp = row;\n            dp = row;\n            mask = 0x80;\n            v = 0;\n\n            for (i = 0; i < row_width; i++)\n            {\n               if (*sp != 0)\n                  v |= mask;\n               sp++;\n               if (mask > 1)\n                  mask >>= 1;\n               else\n               {\n                  mask = 0x80;\n                  *dp = (png_byte)v;\n                  dp++;\n                  v = 0;\n               }\n            }\n            if (mask != 0x80)\n               *dp = (png_byte)v;\n            break;\n         }\n         case 2:\n         {\n            png_bytep sp, dp;\n            int shift, v;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            sp = row;\n            dp = row;\n            shift = 6;\n            v = 0;\n            for (i = 0; i < row_width; i++)\n            {\n               png_byte value;\n\n               value = (png_byte)(*sp & 0x03);\n               v |= (value << shift);\n               if (shift == 0)\n               {\n                  shift = 6;\n                  *dp = (png_byte)v;\n                  dp++;\n                  v = 0;\n               }\n               else\n                  shift -= 2;\n               sp++;\n            }\n            if (shift != 6)\n               *dp = (png_byte)v;\n            break;\n         }\n         case 4:\n         {\n            png_bytep sp, dp;\n            int shift, v;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            sp = row;\n            dp = row;\n            shift = 4;\n            v = 0;\n            for (i = 0; i < row_width; i++)\n            {\n               png_byte value;\n\n               value = (png_byte)(*sp & 0x0f);\n               v |= (value << shift);\n\n               if (shift == 0)\n               {\n                  shift = 4;\n                  *dp = (png_byte)v;\n                  dp++;\n                  v = 0;\n               }\n               else\n                  shift -= 4;\n\n               sp++;\n            }\n            if (shift != 4)\n               *dp = (png_byte)v;\n            break;\n         }\n      }\n      row_info->bit_depth = (png_byte)bit_depth;\n      row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels);\n      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,\n         row_info->width);\n   }\n}\n#endif\n\n#ifdef PNG_WRITE_SHIFT_SUPPORTED\n/* Shift pixel values to take advantage of whole range.  Pass the\n * true number of bits in bit_depth.  The row should be packed\n * according to row_info->bit_depth.  Thus, if you had a row of\n * bit depth 4, but the pixels only had values from 0 to 7, you\n * would pass 3 as bit_depth, and this routine would translate the\n * data to 0 to 15.\n */\nvoid /* PRIVATE */\npng_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)\n{\n   png_debug(1, \"in png_do_shift\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL &&\n#else\n   if (\n#endif\n      row_info->color_type != PNG_COLOR_TYPE_PALETTE)\n   {\n      int shift_start[4], shift_dec[4];\n      int channels = 0;\n\n      if (row_info->color_type & PNG_COLOR_MASK_COLOR)\n      {\n         shift_start[channels] = row_info->bit_depth - bit_depth->red;\n         shift_dec[channels] = bit_depth->red;\n         channels++;\n         shift_start[channels] = row_info->bit_depth - bit_depth->green;\n         shift_dec[channels] = bit_depth->green;\n         channels++;\n         shift_start[channels] = row_info->bit_depth - bit_depth->blue;\n         shift_dec[channels] = bit_depth->blue;\n         channels++;\n      }\n      else\n      {\n         shift_start[channels] = row_info->bit_depth - bit_depth->gray;\n         shift_dec[channels] = bit_depth->gray;\n         channels++;\n      }\n      if (row_info->color_type & PNG_COLOR_MASK_ALPHA)\n      {\n         shift_start[channels] = row_info->bit_depth - bit_depth->alpha;\n         shift_dec[channels] = bit_depth->alpha;\n         channels++;\n      }\n\n      /* With low row depths, could only be grayscale, so one channel */\n      if (row_info->bit_depth < 8)\n      {\n         png_bytep bp = row;\n         png_uint_32 i;\n         png_byte mask;\n         png_uint_32 row_bytes = row_info->rowbytes;\n\n         if (bit_depth->gray == 1 && row_info->bit_depth == 2)\n            mask = 0x55;\n         else if (row_info->bit_depth == 4 && bit_depth->gray == 3)\n            mask = 0x11;\n         else\n            mask = 0xff;\n\n         for (i = 0; i < row_bytes; i++, bp++)\n         {\n            png_uint_16 v;\n            int j;\n\n            v = *bp;\n            *bp = 0;\n            for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0])\n            {\n               if (j > 0)\n                  *bp |= (png_byte)((v << j) & 0xff);\n               else\n                  *bp |= (png_byte)((v >> (-j)) & mask);\n            }\n         }\n      }\n      else if (row_info->bit_depth == 8)\n      {\n         png_bytep bp = row;\n         png_uint_32 i;\n         png_uint_32 istop = channels * row_info->width;\n\n         for (i = 0; i < istop; i++, bp++)\n         {\n\n            png_uint_16 v;\n            int j;\n            int c = (int)(i%channels);\n\n            v = *bp;\n            *bp = 0;\n            for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])\n            {\n               if (j > 0)\n                  *bp |= (png_byte)((v << j) & 0xff);\n               else\n                  *bp |= (png_byte)((v >> (-j)) & 0xff);\n            }\n         }\n      }\n      else\n      {\n         png_bytep bp;\n         png_uint_32 i;\n         png_uint_32 istop = channels * row_info->width;\n\n         for (bp = row, i = 0; i < istop; i++)\n         {\n            int c = (int)(i%channels);\n            png_uint_16 value, v;\n            int j;\n\n            v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1));\n            value = 0;\n            for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])\n            {\n               if (j > 0)\n                  value |= (png_uint_16)((v << j) & (png_uint_16)0xffff);\n               else\n                  value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff);\n            }\n            *bp++ = (png_byte)(value >> 8);\n            *bp++ = (png_byte)(value & 0xff);\n         }\n      }\n   }\n}\n#endif\n\n#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED\nvoid /* PRIVATE */\npng_do_write_swap_alpha(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_write_swap_alpha\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL)\n#endif\n   {\n      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n      {\n         /* This converts from ARGB to RGBA */\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp, dp;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n            for (i = 0, sp = dp = row; i < row_width; i++)\n            {\n               png_byte save = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = save;\n            }\n         }\n         /* This converts from AARRGGBB to RRGGBBAA */\n         else\n         {\n            png_bytep sp, dp;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            for (i = 0, sp = dp = row; i < row_width; i++)\n            {\n               png_byte save[2];\n               save[0] = *(sp++);\n               save[1] = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = save[0];\n               *(dp++) = save[1];\n            }\n         }\n      }\n      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)\n      {\n         /* This converts from AG to GA */\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp, dp;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            for (i = 0, sp = dp = row; i < row_width; i++)\n            {\n               png_byte save = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = save;\n            }\n         }\n         /* This converts from AAGG to GGAA */\n         else\n         {\n            png_bytep sp, dp;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            for (i = 0, sp = dp = row; i < row_width; i++)\n            {\n               png_byte save[2];\n               save[0] = *(sp++);\n               save[1] = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = save[0];\n               *(dp++) = save[1];\n            }\n         }\n      }\n   }\n}\n#endif\n\n#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED\nvoid /* PRIVATE */\npng_do_write_invert_alpha(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_write_invert_alpha\");\n\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL)\n#endif\n   {\n      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n      {\n         /* This inverts the alpha channel in RGBA */\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp, dp;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n            for (i = 0, sp = dp = row; i < row_width; i++)\n            {\n               /* Does nothing\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               */\n               sp+=3; dp = sp;\n               *(dp++) = (png_byte)(255 - *(sp++));\n            }\n         }\n         /* This inverts the alpha channel in RRGGBBAA */\n         else\n         {\n            png_bytep sp, dp;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            for (i = 0, sp = dp = row; i < row_width; i++)\n            {\n               /* Does nothing\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               */\n               sp+=6; dp = sp;\n               *(dp++) = (png_byte)(255 - *(sp++));\n               *(dp++) = (png_byte)(255 - *(sp++));\n            }\n         }\n      }\n      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)\n      {\n         /* This inverts the alpha channel in GA */\n         if (row_info->bit_depth == 8)\n         {\n            png_bytep sp, dp;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            for (i = 0, sp = dp = row; i < row_width; i++)\n            {\n               *(dp++) = *(sp++);\n               *(dp++) = (png_byte)(255 - *(sp++));\n            }\n         }\n         /* This inverts the alpha channel in GGAA */\n         else\n         {\n            png_bytep sp, dp;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            for (i = 0, sp = dp = row; i < row_width; i++)\n            {\n               /* Does nothing\n               *(dp++) = *(sp++);\n               *(dp++) = *(sp++);\n               */\n               sp+=2; dp = sp;\n               *(dp++) = (png_byte)(255 - *(sp++));\n               *(dp++) = (png_byte)(255 - *(sp++));\n            }\n         }\n      }\n   }\n}\n#endif\n\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n/* Undoes intrapixel differencing  */\nvoid /* PRIVATE */\npng_do_write_intrapixel(png_row_infop row_info, png_bytep row)\n{\n   png_debug(1, \"in png_do_write_intrapixel\");\n\n   if (\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n       row != NULL && row_info != NULL &&\n#endif\n       (row_info->color_type & PNG_COLOR_MASK_COLOR))\n   {\n      int bytes_per_pixel;\n      png_uint_32 row_width = row_info->width;\n      if (row_info->bit_depth == 8)\n      {\n         png_bytep rp;\n         png_uint_32 i;\n\n         if (row_info->color_type == PNG_COLOR_TYPE_RGB)\n            bytes_per_pixel = 3;\n         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n            bytes_per_pixel = 4;\n         else\n            return;\n\n         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)\n         {\n            *(rp)   = (png_byte)((*rp     - *(rp+1))&0xff);\n            *(rp+2) = (png_byte)((*(rp+2) - *(rp+1))&0xff);\n         }\n      }\n      else if (row_info->bit_depth == 16)\n      {\n         png_bytep rp;\n         png_uint_32 i;\n\n         if (row_info->color_type == PNG_COLOR_TYPE_RGB)\n            bytes_per_pixel = 6;\n         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)\n            bytes_per_pixel = 8;\n         else\n            return;\n\n         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)\n         {\n            png_uint_32 s0   = (*(rp  ) << 8) | *(rp+1);\n            png_uint_32 s1   = (*(rp+2) << 8) | *(rp+3);\n            png_uint_32 s2   = (*(rp+4) << 8) | *(rp+5);\n            png_uint_32 red  = (png_uint_32)((s0 - s1) & 0xffffL);\n            png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL);\n            *(rp  ) = (png_byte)((red >> 8) & 0xff);\n            *(rp+1) = (png_byte)(red & 0xff);\n            *(rp+4) = (png_byte)((blue >> 8) & 0xff);\n            *(rp+5) = (png_byte)(blue & 0xff);\n         }\n      }\n   }\n}\n#endif /* PNG_MNG_FEATURES_SUPPORTED */\n#endif /* PNG_WRITE_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/libpng/pngwutil.c",
    "content": "\n/* pngwutil.c - utilities to write a PNG file\n *\n * Last changed in libpng 1.2.43 [February 25, 2010]\n * Copyright (c) 1998-2010 Glenn Randers-Pehrson\n * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\n * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\n *\n * This code is released under the libpng license.\n * For conditions of distribution and use, see the disclaimer\n * and license in png.h\n */\n\n#define PNG_INTERNAL\n#define PNG_NO_PEDANTIC_WARNINGS\n#include \"png.h\"\n#ifdef PNG_WRITE_SUPPORTED\n\n/* Place a 32-bit number into a buffer in PNG byte order.  We work\n * with unsigned numbers for convenience, although one supported\n * ancillary chunk uses signed (two's complement) numbers.\n */\nvoid PNGAPI\npng_save_uint_32(png_bytep buf, png_uint_32 i)\n{\n   buf[0] = (png_byte)((i >> 24) & 0xff);\n   buf[1] = (png_byte)((i >> 16) & 0xff);\n   buf[2] = (png_byte)((i >> 8) & 0xff);\n   buf[3] = (png_byte)(i & 0xff);\n}\n\n/* The png_save_int_32 function assumes integers are stored in two's\n * complement format.  If this isn't the case, then this routine needs to\n * be modified to write data in two's complement format.\n */\nvoid PNGAPI\npng_save_int_32(png_bytep buf, png_int_32 i)\n{\n   buf[0] = (png_byte)((i >> 24) & 0xff);\n   buf[1] = (png_byte)((i >> 16) & 0xff);\n   buf[2] = (png_byte)((i >> 8) & 0xff);\n   buf[3] = (png_byte)(i & 0xff);\n}\n\n/* Place a 16-bit number into a buffer in PNG byte order.\n * The parameter is declared unsigned int, not png_uint_16,\n * just to avoid potential problems on pre-ANSI C compilers.\n */\nvoid PNGAPI\npng_save_uint_16(png_bytep buf, unsigned int i)\n{\n   buf[0] = (png_byte)((i >> 8) & 0xff);\n   buf[1] = (png_byte)(i & 0xff);\n}\n\n/* Simple function to write the signature.  If we have already written\n * the magic bytes of the signature, or more likely, the PNG stream is\n * being embedded into another stream and doesn't need its own signature,\n * we should call png_set_sig_bytes() to tell libpng how many of the\n * bytes have already been written.\n */\nvoid /* PRIVATE */\npng_write_sig(png_structp png_ptr)\n{\n   png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};\n\n   /* Write the rest of the 8 byte signature */\n   png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes],\n      (png_size_t)(8 - png_ptr->sig_bytes));\n   if (png_ptr->sig_bytes < 3)\n      png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;\n}\n\n/* Write a PNG chunk all at once.  The type is an array of ASCII characters\n * representing the chunk name.  The array must be at least 4 bytes in\n * length, and does not need to be null terminated.  To be safe, pass the\n * pre-defined chunk names here, and if you need a new one, define it\n * where the others are defined.  The length is the length of the data.\n * All the data must be present.  If that is not possible, use the\n * png_write_chunk_start(), png_write_chunk_data(), and png_write_chunk_end()\n * functions instead.\n */\nvoid PNGAPI\npng_write_chunk(png_structp png_ptr, png_bytep chunk_name,\n   png_bytep data, png_size_t length)\n{\n   if (png_ptr == NULL)\n      return;\n   png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length);\n   png_write_chunk_data(png_ptr, data, (png_size_t)length);\n   png_write_chunk_end(png_ptr);\n}\n\n/* Write the start of a PNG chunk.  The type is the chunk type.\n * The total_length is the sum of the lengths of all the data you will be\n * passing in png_write_chunk_data().\n */\nvoid PNGAPI\npng_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,\n   png_uint_32 length)\n{\n   png_byte buf[8];\n\n   png_debug2(0, \"Writing %s chunk, length = %lu\", chunk_name,\n      (unsigned long)length);\n\n   if (png_ptr == NULL)\n      return;\n\n\n   /* Write the length and the chunk name */\n   png_save_uint_32(buf, length);\n   png_memcpy(buf + 4, chunk_name, 4);\n   png_write_data(png_ptr, buf, (png_size_t)8);\n   /* Put the chunk name into png_ptr->chunk_name */\n   png_memcpy(png_ptr->chunk_name, chunk_name, 4);\n   /* Reset the crc and run it over the chunk name */\n   png_reset_crc(png_ptr);\n   png_calculate_crc(png_ptr, chunk_name, (png_size_t)4);\n}\n\n/* Write the data of a PNG chunk started with png_write_chunk_start().\n * Note that multiple calls to this function are allowed, and that the\n * sum of the lengths from these calls *must* add up to the total_length\n * given to png_write_chunk_start().\n */\nvoid PNGAPI\npng_write_chunk_data(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n   /* Write the data, and run the CRC over it */\n   if (png_ptr == NULL)\n      return;\n   if (data != NULL && length > 0)\n   {\n      png_write_data(png_ptr, data, length);\n      /* Update the CRC after writing the data,\n       * in case that the user I/O routine alters it.\n       */\n      png_calculate_crc(png_ptr, data, length);\n   }\n}\n\n/* Finish a chunk started with png_write_chunk_start(). */\nvoid PNGAPI\npng_write_chunk_end(png_structp png_ptr)\n{\n   png_byte buf[4];\n\n   if (png_ptr == NULL) return;\n\n   /* Write the crc in a single operation */\n   png_save_uint_32(buf, png_ptr->crc);\n\n   png_write_data(png_ptr, buf, (png_size_t)4);\n}\n\n#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_iCCP_SUPPORTED)\n/* This pair of functions encapsulates the operation of (a) compressing a\n * text string, and (b) issuing it later as a series of chunk data writes.\n * The compression_state structure is shared context for these functions\n * set up by the caller in order to make the whole mess thread-safe.\n */\n\ntypedef struct\n{\n   char *input;   /* The uncompressed input data */\n   int input_len;   /* Its length */\n   int num_output_ptr; /* Number of output pointers used */\n   int max_output_ptr; /* Size of output_ptr */\n   png_charpp output_ptr; /* Array of pointers to output */\n} compression_state;\n\n/* Compress given text into storage in the png_ptr structure */\nstatic int /* PRIVATE */\npng_text_compress(png_structp png_ptr,\n        png_charp text, png_size_t text_len, int compression,\n        compression_state *comp)\n{\n   int ret;\n\n   comp->num_output_ptr = 0;\n   comp->max_output_ptr = 0;\n   comp->output_ptr = NULL;\n   comp->input = NULL;\n   comp->input_len = 0;\n\n   /* We may just want to pass the text right through */\n   if (compression == PNG_TEXT_COMPRESSION_NONE)\n   {\n       comp->input = text;\n       comp->input_len = text_len;\n       return((int)text_len);\n   }\n\n   if (compression >= PNG_TEXT_COMPRESSION_LAST)\n   {\n#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)\n      char msg[50];\n      png_snprintf(msg, 50, \"Unknown compression type %d\", compression);\n      png_warning(png_ptr, msg);\n#else\n      png_warning(png_ptr, \"Unknown compression type\");\n#endif\n   }\n\n   /* We can't write the chunk until we find out how much data we have,\n    * which means we need to run the compressor first and save the\n    * output.  This shouldn't be a problem, as the vast majority of\n    * comments should be reasonable, but we will set up an array of\n    * malloc'd pointers to be sure.\n    *\n    * If we knew the application was well behaved, we could simplify this\n    * greatly by assuming we can always malloc an output buffer large\n    * enough to hold the compressed text ((1001 * text_len / 1000) + 12)\n    * and malloc this directly.  The only time this would be a bad idea is\n    * if we can't malloc more than 64K and we have 64K of random input\n    * data, or if the input string is incredibly large (although this\n    * wouldn't cause a failure, just a slowdown due to swapping).\n    */\n\n   /* Set up the compression buffers */\n   png_ptr->zstream.avail_in = (uInt)text_len;\n   png_ptr->zstream.next_in = (Bytef *)text;\n   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n   png_ptr->zstream.next_out = (Bytef *)png_ptr->zbuf;\n\n   /* This is the same compression loop as in png_write_row() */\n   do\n   {\n      /* Compress the data */\n      ret = deflate(&png_ptr->zstream, Z_NO_FLUSH);\n      if (ret != Z_OK)\n      {\n         /* Error */\n         if (png_ptr->zstream.msg != NULL)\n            png_error(png_ptr, png_ptr->zstream.msg);\n         else\n            png_error(png_ptr, \"zlib error\");\n      }\n      /* Check to see if we need more room */\n      if (!(png_ptr->zstream.avail_out))\n      {\n         /* Make sure the output array has room */\n         if (comp->num_output_ptr >= comp->max_output_ptr)\n         {\n            int old_max;\n\n            old_max = comp->max_output_ptr;\n            comp->max_output_ptr = comp->num_output_ptr + 4;\n            if (comp->output_ptr != NULL)\n            {\n               png_charpp old_ptr;\n\n               old_ptr = comp->output_ptr;\n               comp->output_ptr = (png_charpp)png_malloc(png_ptr,\n                  (png_uint_32)\n                  (comp->max_output_ptr * png_sizeof(png_charpp)));\n               png_memcpy(comp->output_ptr, old_ptr, old_max\n                  * png_sizeof(png_charp));\n               png_free(png_ptr, old_ptr);\n            }\n            else\n               comp->output_ptr = (png_charpp)png_malloc(png_ptr,\n                  (png_uint_32)\n                  (comp->max_output_ptr * png_sizeof(png_charp)));\n         }\n\n         /* Save the data */\n         comp->output_ptr[comp->num_output_ptr] =\n            (png_charp)png_malloc(png_ptr,\n            (png_uint_32)png_ptr->zbuf_size);\n         png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf,\n            png_ptr->zbuf_size);\n         comp->num_output_ptr++;\n\n         /* and reset the buffer */\n         png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n         png_ptr->zstream.next_out = png_ptr->zbuf;\n      }\n   /* Continue until we don't have any more to compress */\n   } while (png_ptr->zstream.avail_in);\n\n   /* Finish the compression */\n   do\n   {\n      /* Tell zlib we are finished */\n      ret = deflate(&png_ptr->zstream, Z_FINISH);\n\n      if (ret == Z_OK)\n      {\n         /* Check to see if we need more room */\n         if (!(png_ptr->zstream.avail_out))\n         {\n            /* Check to make sure our output array has room */\n            if (comp->num_output_ptr >= comp->max_output_ptr)\n            {\n               int old_max;\n\n               old_max = comp->max_output_ptr;\n               comp->max_output_ptr = comp->num_output_ptr + 4;\n               if (comp->output_ptr != NULL)\n               {\n                  png_charpp old_ptr;\n\n                  old_ptr = comp->output_ptr;\n                  /* This could be optimized to realloc() */\n                  comp->output_ptr = (png_charpp)png_malloc(png_ptr,\n                     (png_uint_32)(comp->max_output_ptr *\n                     png_sizeof(png_charp)));\n                  png_memcpy(comp->output_ptr, old_ptr,\n                     old_max * png_sizeof(png_charp));\n                  png_free(png_ptr, old_ptr);\n               }\n               else\n                  comp->output_ptr = (png_charpp)png_malloc(png_ptr,\n                     (png_uint_32)(comp->max_output_ptr *\n                     png_sizeof(png_charp)));\n            }\n\n            /* Save the data */\n            comp->output_ptr[comp->num_output_ptr] =\n               (png_charp)png_malloc(png_ptr,\n               (png_uint_32)png_ptr->zbuf_size);\n            png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf,\n               png_ptr->zbuf_size);\n            comp->num_output_ptr++;\n\n            /* and reset the buffer pointers */\n            png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n            png_ptr->zstream.next_out = png_ptr->zbuf;\n         }\n      }\n      else if (ret != Z_STREAM_END)\n      {\n         /* We got an error */\n         if (png_ptr->zstream.msg != NULL)\n            png_error(png_ptr, png_ptr->zstream.msg);\n         else\n            png_error(png_ptr, \"zlib error\");\n      }\n   } while (ret != Z_STREAM_END);\n\n   /* Text length is number of buffers plus last buffer */\n   text_len = png_ptr->zbuf_size * comp->num_output_ptr;\n   if (png_ptr->zstream.avail_out < png_ptr->zbuf_size)\n      text_len += png_ptr->zbuf_size - (png_size_t)png_ptr->zstream.avail_out;\n\n   return((int)text_len);\n}\n\n/* Ship the compressed text out via chunk writes */\nstatic void /* PRIVATE */\npng_write_compressed_data_out(png_structp png_ptr, compression_state *comp)\n{\n   int i;\n\n   /* Handle the no-compression case */\n   if (comp->input)\n   {\n      png_write_chunk_data(png_ptr, (png_bytep)comp->input,\n                            (png_size_t)comp->input_len);\n      return;\n   }\n\n   /* Write saved output buffers, if any */\n   for (i = 0; i < comp->num_output_ptr; i++)\n   {\n      png_write_chunk_data(png_ptr, (png_bytep)comp->output_ptr[i],\n         (png_size_t)png_ptr->zbuf_size);\n      png_free(png_ptr, comp->output_ptr[i]);\n       comp->output_ptr[i]=NULL;\n   }\n   if (comp->max_output_ptr != 0)\n      png_free(png_ptr, comp->output_ptr);\n       comp->output_ptr=NULL;\n   /* Write anything left in zbuf */\n   if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size)\n      png_write_chunk_data(png_ptr, png_ptr->zbuf,\n         (png_size_t)(png_ptr->zbuf_size - png_ptr->zstream.avail_out));\n\n   /* Reset zlib for another zTXt/iTXt or image data */\n   deflateReset(&png_ptr->zstream);\n   png_ptr->zstream.data_type = Z_BINARY;\n}\n#endif\n\n/* Write the IHDR chunk, and update the png_struct with the necessary\n * information.  Note that the rest of this code depends upon this\n * information being correct.\n */\nvoid /* PRIVATE */\npng_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,\n   int bit_depth, int color_type, int compression_type, int filter_type,\n   int interlace_type)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_IHDR;\n#endif\n   int ret;\n\n   png_byte buf[13]; /* Buffer to store the IHDR info */\n\n   png_debug(1, \"in png_write_IHDR\");\n\n   /* Check that we have valid input data from the application info */\n   switch (color_type)\n   {\n      case PNG_COLOR_TYPE_GRAY:\n         switch (bit_depth)\n         {\n            case 1:\n            case 2:\n            case 4:\n            case 8:\n            case 16: png_ptr->channels = 1; break;\n            default: png_error(png_ptr,\n                         \"Invalid bit depth for grayscale image\");\n         }\n         break;\n      case PNG_COLOR_TYPE_RGB:\n         if (bit_depth != 8 && bit_depth != 16)\n            png_error(png_ptr, \"Invalid bit depth for RGB image\");\n         png_ptr->channels = 3;\n         break;\n      case PNG_COLOR_TYPE_PALETTE:\n         switch (bit_depth)\n         {\n            case 1:\n            case 2:\n            case 4:\n            case 8: png_ptr->channels = 1; break;\n            default: png_error(png_ptr, \"Invalid bit depth for paletted image\");\n         }\n         break;\n      case PNG_COLOR_TYPE_GRAY_ALPHA:\n         if (bit_depth != 8 && bit_depth != 16)\n            png_error(png_ptr, \"Invalid bit depth for grayscale+alpha image\");\n         png_ptr->channels = 2;\n         break;\n      case PNG_COLOR_TYPE_RGB_ALPHA:\n         if (bit_depth != 8 && bit_depth != 16)\n            png_error(png_ptr, \"Invalid bit depth for RGBA image\");\n         png_ptr->channels = 4;\n         break;\n      default:\n         png_error(png_ptr, \"Invalid image color type specified\");\n   }\n\n   if (compression_type != PNG_COMPRESSION_TYPE_BASE)\n   {\n      png_warning(png_ptr, \"Invalid compression type specified\");\n      compression_type = PNG_COMPRESSION_TYPE_BASE;\n   }\n\n   /* Write filter_method 64 (intrapixel differencing) only if\n    * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and\n    * 2. Libpng did not write a PNG signature (this filter_method is only\n    *    used in PNG datastreams that are embedded in MNG datastreams) and\n    * 3. The application called png_permit_mng_features with a mask that\n    *    included PNG_FLAG_MNG_FILTER_64 and\n    * 4. The filter_method is 64 and\n    * 5. The color_type is RGB or RGBA\n    */\n   if (\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n      !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&\n      ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&\n      (color_type == PNG_COLOR_TYPE_RGB ||\n       color_type == PNG_COLOR_TYPE_RGB_ALPHA) &&\n      (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) &&\n#endif\n      filter_type != PNG_FILTER_TYPE_BASE)\n   {\n      png_warning(png_ptr, \"Invalid filter type specified\");\n      filter_type = PNG_FILTER_TYPE_BASE;\n   }\n\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n   if (interlace_type != PNG_INTERLACE_NONE &&\n      interlace_type != PNG_INTERLACE_ADAM7)\n   {\n      png_warning(png_ptr, \"Invalid interlace type specified\");\n      interlace_type = PNG_INTERLACE_ADAM7;\n   }\n#else\n   interlace_type=PNG_INTERLACE_NONE;\n#endif\n\n   /* Save the relevent information */\n   png_ptr->bit_depth = (png_byte)bit_depth;\n   png_ptr->color_type = (png_byte)color_type;\n   png_ptr->interlaced = (png_byte)interlace_type;\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n   png_ptr->filter_type = (png_byte)filter_type;\n#endif\n   png_ptr->compression_type = (png_byte)compression_type;\n   png_ptr->width = width;\n   png_ptr->height = height;\n\n   png_ptr->pixel_depth = (png_byte)(bit_depth * png_ptr->channels);\n   png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width);\n   /* Set the usr info, so any transformations can modify it */\n   png_ptr->usr_width = png_ptr->width;\n   png_ptr->usr_bit_depth = png_ptr->bit_depth;\n   png_ptr->usr_channels = png_ptr->channels;\n\n   /* Pack the header information into the buffer */\n   png_save_uint_32(buf, width);\n   png_save_uint_32(buf + 4, height);\n   buf[8] = (png_byte)bit_depth;\n   buf[9] = (png_byte)color_type;\n   buf[10] = (png_byte)compression_type;\n   buf[11] = (png_byte)filter_type;\n   buf[12] = (png_byte)interlace_type;\n\n   /* Write the chunk */\n   png_write_chunk(png_ptr, (png_bytep)png_IHDR, buf, (png_size_t)13);\n\n   /* Initialize zlib with PNG info */\n   png_ptr->zstream.zalloc = png_zalloc;\n   png_ptr->zstream.zfree = png_zfree;\n   png_ptr->zstream.opaque = (voidpf)png_ptr;\n   if (!(png_ptr->do_filter))\n   {\n      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||\n         png_ptr->bit_depth < 8)\n         png_ptr->do_filter = PNG_FILTER_NONE;\n      else\n         png_ptr->do_filter = PNG_ALL_FILTERS;\n   }\n   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY))\n   {\n      if (png_ptr->do_filter != PNG_FILTER_NONE)\n         png_ptr->zlib_strategy = Z_FILTERED;\n      else\n         png_ptr->zlib_strategy = Z_DEFAULT_STRATEGY;\n   }\n   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_LEVEL))\n      png_ptr->zlib_level = Z_DEFAULT_COMPRESSION;\n   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL))\n      png_ptr->zlib_mem_level = 8;\n   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS))\n      png_ptr->zlib_window_bits = 15;\n   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD))\n      png_ptr->zlib_method = 8;\n   ret = deflateInit2(&png_ptr->zstream, png_ptr->zlib_level,\n         png_ptr->zlib_method, png_ptr->zlib_window_bits,\n         png_ptr->zlib_mem_level, png_ptr->zlib_strategy);\n   if (ret != Z_OK)\n   {\n      if (ret == Z_VERSION_ERROR) png_error(png_ptr,\n          \"zlib failed to initialize compressor -- version error\");\n      if (ret == Z_STREAM_ERROR) png_error(png_ptr,\n           \"zlib failed to initialize compressor -- stream error\");\n      if (ret == Z_MEM_ERROR) png_error(png_ptr,\n           \"zlib failed to initialize compressor -- mem error\");\n      png_error(png_ptr, \"zlib failed to initialize compressor\");\n   }\n   png_ptr->zstream.next_out = png_ptr->zbuf;\n   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n   /* libpng is not interested in zstream.data_type */\n   /* Set it to a predefined value, to avoid its evaluation inside zlib */\n   png_ptr->zstream.data_type = Z_BINARY;\n\n   png_ptr->mode = PNG_HAVE_IHDR;\n}\n\n/* Write the palette.  We are careful not to trust png_color to be in the\n * correct order for PNG, so people can redefine it to any convenient\n * structure.\n */\nvoid /* PRIVATE */\npng_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_PLTE;\n#endif\n   png_uint_32 i;\n   png_colorp pal_ptr;\n   png_byte buf[3];\n\n   png_debug(1, \"in png_write_PLTE\");\n\n   if ((\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n        !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) &&\n#endif\n        num_pal == 0) || num_pal > 256)\n   {\n     if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)\n     {\n        png_error(png_ptr, \"Invalid number of colors in palette\");\n     }\n     else\n     {\n        png_warning(png_ptr, \"Invalid number of colors in palette\");\n        return;\n     }\n   }\n\n   if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR))\n   {\n      png_warning(png_ptr,\n        \"Ignoring request to write a PLTE chunk in grayscale PNG\");\n      return;\n   }\n\n   png_ptr->num_palette = (png_uint_16)num_pal;\n   png_debug1(3, \"num_palette = %d\", png_ptr->num_palette);\n\n   png_write_chunk_start(png_ptr, (png_bytep)png_PLTE,\n     (png_uint_32)(num_pal * 3));\n#ifdef PNG_POINTER_INDEXING_SUPPORTED\n   for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++)\n   {\n      buf[0] = pal_ptr->red;\n      buf[1] = pal_ptr->green;\n      buf[2] = pal_ptr->blue;\n      png_write_chunk_data(png_ptr, buf, (png_size_t)3);\n   }\n#else\n   /* This is a little slower but some buggy compilers need to do this\n    * instead\n    */\n   pal_ptr=palette;\n   for (i = 0; i < num_pal; i++)\n   {\n      buf[0] = pal_ptr[i].red;\n      buf[1] = pal_ptr[i].green;\n      buf[2] = pal_ptr[i].blue;\n      png_write_chunk_data(png_ptr, buf, (png_size_t)3);\n   }\n#endif\n   png_write_chunk_end(png_ptr);\n   png_ptr->mode |= PNG_HAVE_PLTE;\n}\n\n/* Write an IDAT chunk */\nvoid /* PRIVATE */\npng_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_IDAT;\n#endif\n\n   png_debug(1, \"in png_write_IDAT\");\n\n   /* Optimize the CMF field in the zlib stream. */\n   /* This hack of the zlib stream is compliant to the stream specification. */\n   if (!(png_ptr->mode & PNG_HAVE_IDAT) &&\n       png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE)\n   {\n      unsigned int z_cmf = data[0];  /* zlib compression method and flags */\n      if ((z_cmf & 0x0f) == 8 && (z_cmf & 0xf0) <= 0x70)\n      {\n         /* Avoid memory underflows and multiplication overflows.\n          *\n          * The conditions below are practically always satisfied;\n          * however, they still must be checked.\n          */\n         if (length >= 2 &&\n             png_ptr->height < 16384 && png_ptr->width < 16384)\n         {\n            png_uint_32 uncompressed_idat_size = png_ptr->height *\n               ((png_ptr->width *\n               png_ptr->channels * png_ptr->bit_depth + 15) >> 3);\n            unsigned int z_cinfo = z_cmf >> 4;\n            unsigned int half_z_window_size = 1 << (z_cinfo + 7);\n            while (uncompressed_idat_size <= half_z_window_size &&\n                   half_z_window_size >= 256)\n            {\n               z_cinfo--;\n               half_z_window_size >>= 1;\n            }\n            z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4);\n            if (data[0] != (png_byte)z_cmf)\n            {\n               data[0] = (png_byte)z_cmf;\n               data[1] &= 0xe0;\n               data[1] += (png_byte)(0x1f - ((z_cmf << 8) + data[1]) % 0x1f);\n            }\n         }\n      }\n      else\n         png_error(png_ptr,\n            \"Invalid zlib compression method or flags in IDAT\");\n   }\n\n   png_write_chunk(png_ptr, (png_bytep)png_IDAT, data, length);\n   png_ptr->mode |= PNG_HAVE_IDAT;\n}\n\n/* Write an IEND chunk */\nvoid /* PRIVATE */\npng_write_IEND(png_structp png_ptr)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_IEND;\n#endif\n\n   png_debug(1, \"in png_write_IEND\");\n\n   png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL,\n     (png_size_t)0);\n   png_ptr->mode |= PNG_HAVE_IEND;\n}\n\n#ifdef PNG_WRITE_gAMA_SUPPORTED\n/* Write a gAMA chunk */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nvoid /* PRIVATE */\npng_write_gAMA(png_structp png_ptr, double file_gamma)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_gAMA;\n#endif\n   png_uint_32 igamma;\n   png_byte buf[4];\n\n   png_debug(1, \"in png_write_gAMA\");\n\n   /* file_gamma is saved in 1/100,000ths */\n   igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5);\n   png_save_uint_32(buf, igamma);\n   png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4);\n}\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\nvoid /* PRIVATE */\npng_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_gAMA;\n#endif\n   png_byte buf[4];\n\n   png_debug(1, \"in png_write_gAMA\");\n\n   /* file_gamma is saved in 1/100,000ths */\n   png_save_uint_32(buf, (png_uint_32)file_gamma);\n   png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4);\n}\n#endif\n#endif\n\n#ifdef PNG_WRITE_sRGB_SUPPORTED\n/* Write a sRGB chunk */\nvoid /* PRIVATE */\npng_write_sRGB(png_structp png_ptr, int srgb_intent)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_sRGB;\n#endif\n   png_byte buf[1];\n\n   png_debug(1, \"in png_write_sRGB\");\n\n   if (srgb_intent >= PNG_sRGB_INTENT_LAST)\n         png_warning(png_ptr,\n            \"Invalid sRGB rendering intent specified\");\n   buf[0]=(png_byte)srgb_intent;\n   png_write_chunk(png_ptr, (png_bytep)png_sRGB, buf, (png_size_t)1);\n}\n#endif\n\n#ifdef PNG_WRITE_iCCP_SUPPORTED\n/* Write an iCCP chunk */\nvoid /* PRIVATE */\npng_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,\n   png_charp profile, int profile_len)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_iCCP;\n#endif\n   png_size_t name_len;\n   png_charp new_name;\n   compression_state comp;\n   int embedded_profile_len = 0;\n\n   png_debug(1, \"in png_write_iCCP\");\n\n   comp.num_output_ptr = 0;\n   comp.max_output_ptr = 0;\n   comp.output_ptr = NULL;\n   comp.input = NULL;\n   comp.input_len = 0;\n\n   if ((name_len = png_check_keyword(png_ptr, name,\n      &new_name)) == 0)\n      return;\n\n   if (compression_type != PNG_COMPRESSION_TYPE_BASE)\n      png_warning(png_ptr, \"Unknown compression type in iCCP chunk\");\n\n   if (profile == NULL)\n      profile_len = 0;\n\n   if (profile_len > 3)\n      embedded_profile_len =\n          ((*( (png_bytep)profile    ))<<24) |\n          ((*( (png_bytep)profile + 1))<<16) |\n          ((*( (png_bytep)profile + 2))<< 8) |\n          ((*( (png_bytep)profile + 3))    );\n\n   if (embedded_profile_len < 0)\n   {\n      png_warning(png_ptr,\n        \"Embedded profile length in iCCP chunk is negative\");\n      png_free(png_ptr, new_name);\n      return;\n   }\n\n   if (profile_len < embedded_profile_len)\n   {\n      png_warning(png_ptr,\n        \"Embedded profile length too large in iCCP chunk\");\n      png_free(png_ptr, new_name);\n      return;\n   }\n\n   if (profile_len > embedded_profile_len)\n   {\n      png_warning(png_ptr,\n        \"Truncating profile to actual length in iCCP chunk\");\n      profile_len = embedded_profile_len;\n   }\n\n   if (profile_len)\n      profile_len = png_text_compress(png_ptr, profile,\n        (png_size_t)profile_len, PNG_COMPRESSION_TYPE_BASE, &comp);\n\n   /* Make sure we include the NULL after the name and the compression type */\n   png_write_chunk_start(png_ptr, (png_bytep)png_iCCP,\n          (png_uint_32)(name_len + profile_len + 2));\n   new_name[name_len + 1] = 0x00;\n   png_write_chunk_data(png_ptr, (png_bytep)new_name,\n     (png_size_t)(name_len + 2));\n\n   if (profile_len)\n      png_write_compressed_data_out(png_ptr, &comp);\n\n   png_write_chunk_end(png_ptr);\n   png_free(png_ptr, new_name);\n}\n#endif\n\n#ifdef PNG_WRITE_sPLT_SUPPORTED\n/* Write a sPLT chunk */\nvoid /* PRIVATE */\npng_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_sPLT;\n#endif\n   png_size_t name_len;\n   png_charp new_name;\n   png_byte entrybuf[10];\n   int entry_size = (spalette->depth == 8 ? 6 : 10);\n   int palette_size = entry_size * spalette->nentries;\n   png_sPLT_entryp ep;\n#ifndef PNG_POINTER_INDEXING_SUPPORTED\n   int i;\n#endif\n\n   png_debug(1, \"in png_write_sPLT\");\n\n   if ((name_len = png_check_keyword(png_ptr,spalette->name, &new_name))==0)\n      return;\n\n   /* Make sure we include the NULL after the name */\n   png_write_chunk_start(png_ptr, (png_bytep)png_sPLT,\n     (png_uint_32)(name_len + 2 + palette_size));\n   png_write_chunk_data(png_ptr, (png_bytep)new_name,\n     (png_size_t)(name_len + 1));\n   png_write_chunk_data(png_ptr, (png_bytep)&spalette->depth, (png_size_t)1);\n\n   /* Loop through each palette entry, writing appropriately */\n#ifdef PNG_POINTER_INDEXING_SUPPORTED\n   for (ep = spalette->entries; ep<spalette->entries + spalette->nentries; ep++)\n   {\n      if (spalette->depth == 8)\n      {\n          entrybuf[0] = (png_byte)ep->red;\n          entrybuf[1] = (png_byte)ep->green;\n          entrybuf[2] = (png_byte)ep->blue;\n          entrybuf[3] = (png_byte)ep->alpha;\n          png_save_uint_16(entrybuf + 4, ep->frequency);\n      }\n      else\n      {\n          png_save_uint_16(entrybuf + 0, ep->red);\n          png_save_uint_16(entrybuf + 2, ep->green);\n          png_save_uint_16(entrybuf + 4, ep->blue);\n          png_save_uint_16(entrybuf + 6, ep->alpha);\n          png_save_uint_16(entrybuf + 8, ep->frequency);\n      }\n      png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size);\n   }\n#else\n   ep=spalette->entries;\n   for (i=0; i>spalette->nentries; i++)\n   {\n      if (spalette->depth == 8)\n      {\n          entrybuf[0] = (png_byte)ep[i].red;\n          entrybuf[1] = (png_byte)ep[i].green;\n          entrybuf[2] = (png_byte)ep[i].blue;\n          entrybuf[3] = (png_byte)ep[i].alpha;\n          png_save_uint_16(entrybuf + 4, ep[i].frequency);\n      }\n      else\n      {\n          png_save_uint_16(entrybuf + 0, ep[i].red);\n          png_save_uint_16(entrybuf + 2, ep[i].green);\n          png_save_uint_16(entrybuf + 4, ep[i].blue);\n          png_save_uint_16(entrybuf + 6, ep[i].alpha);\n          png_save_uint_16(entrybuf + 8, ep[i].frequency);\n      }\n      png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size);\n   }\n#endif\n\n   png_write_chunk_end(png_ptr);\n   png_free(png_ptr, new_name);\n}\n#endif\n\n#ifdef PNG_WRITE_sBIT_SUPPORTED\n/* Write the sBIT chunk */\nvoid /* PRIVATE */\npng_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_sBIT;\n#endif\n   png_byte buf[4];\n   png_size_t size;\n\n   png_debug(1, \"in png_write_sBIT\");\n\n   /* Make sure we don't depend upon the order of PNG_COLOR_8 */\n   if (color_type & PNG_COLOR_MASK_COLOR)\n   {\n      png_byte maxbits;\n\n      maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 :\n                png_ptr->usr_bit_depth);\n      if (sbit->red == 0 || sbit->red > maxbits ||\n          sbit->green == 0 || sbit->green > maxbits ||\n          sbit->blue == 0 || sbit->blue > maxbits)\n      {\n         png_warning(png_ptr, \"Invalid sBIT depth specified\");\n         return;\n      }\n      buf[0] = sbit->red;\n      buf[1] = sbit->green;\n      buf[2] = sbit->blue;\n      size = 3;\n   }\n   else\n   {\n      if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth)\n      {\n         png_warning(png_ptr, \"Invalid sBIT depth specified\");\n         return;\n      }\n      buf[0] = sbit->gray;\n      size = 1;\n   }\n\n   if (color_type & PNG_COLOR_MASK_ALPHA)\n   {\n      if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth)\n      {\n         png_warning(png_ptr, \"Invalid sBIT depth specified\");\n         return;\n      }\n      buf[size++] = sbit->alpha;\n   }\n\n   png_write_chunk(png_ptr, (png_bytep)png_sBIT, buf, size);\n}\n#endif\n\n#ifdef PNG_WRITE_cHRM_SUPPORTED\n/* Write the cHRM chunk */\n#ifdef PNG_FLOATING_POINT_SUPPORTED\nvoid /* PRIVATE */\npng_write_cHRM(png_structp png_ptr, double white_x, double white_y,\n   double red_x, double red_y, double green_x, double green_y,\n   double blue_x, double blue_y)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_cHRM;\n#endif\n   png_byte buf[32];\n\n   png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y,\n      int_green_x, int_green_y, int_blue_x, int_blue_y;\n\n   png_debug(1, \"in png_write_cHRM\");\n\n   int_white_x = (png_uint_32)(white_x * 100000.0 + 0.5);\n   int_white_y = (png_uint_32)(white_y * 100000.0 + 0.5);\n   int_red_x   = (png_uint_32)(red_x   * 100000.0 + 0.5);\n   int_red_y   = (png_uint_32)(red_y   * 100000.0 + 0.5);\n   int_green_x = (png_uint_32)(green_x * 100000.0 + 0.5);\n   int_green_y = (png_uint_32)(green_y * 100000.0 + 0.5);\n   int_blue_x  = (png_uint_32)(blue_x  * 100000.0 + 0.5);\n   int_blue_y  = (png_uint_32)(blue_y  * 100000.0 + 0.5);\n\n#ifdef PNG_CHECK_cHRM_SUPPORTED\n   if (png_check_cHRM_fixed(png_ptr, int_white_x, int_white_y,\n      int_red_x, int_red_y, int_green_x, int_green_y, int_blue_x, int_blue_y))\n#endif\n   {\n      /* Each value is saved in 1/100,000ths */\n\n      png_save_uint_32(buf, int_white_x);\n      png_save_uint_32(buf + 4, int_white_y);\n\n      png_save_uint_32(buf + 8, int_red_x);\n      png_save_uint_32(buf + 12, int_red_y);\n\n      png_save_uint_32(buf + 16, int_green_x);\n      png_save_uint_32(buf + 20, int_green_y);\n\n      png_save_uint_32(buf + 24, int_blue_x);\n      png_save_uint_32(buf + 28, int_blue_y);\n\n      png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32);\n   }\n}\n#endif\n#ifdef PNG_FIXED_POINT_SUPPORTED\nvoid /* PRIVATE */\npng_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,\n   png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y,\n   png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x,\n   png_fixed_point blue_y)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_cHRM;\n#endif\n   png_byte buf[32];\n\n   png_debug(1, \"in png_write_cHRM\");\n\n   /* Each value is saved in 1/100,000ths */\n#ifdef PNG_CHECK_cHRM_SUPPORTED\n   if (png_check_cHRM_fixed(png_ptr, white_x, white_y, red_x, red_y,\n      green_x, green_y, blue_x, blue_y))\n#endif\n   {\n      png_save_uint_32(buf, (png_uint_32)white_x);\n      png_save_uint_32(buf + 4, (png_uint_32)white_y);\n\n      png_save_uint_32(buf + 8, (png_uint_32)red_x);\n      png_save_uint_32(buf + 12, (png_uint_32)red_y);\n\n      png_save_uint_32(buf + 16, (png_uint_32)green_x);\n      png_save_uint_32(buf + 20, (png_uint_32)green_y);\n\n      png_save_uint_32(buf + 24, (png_uint_32)blue_x);\n      png_save_uint_32(buf + 28, (png_uint_32)blue_y);\n\n      png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32);\n   }\n}\n#endif\n#endif\n\n#ifdef PNG_WRITE_tRNS_SUPPORTED\n/* Write the tRNS chunk */\nvoid /* PRIVATE */\npng_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,\n   int num_trans, int color_type)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_tRNS;\n#endif\n   png_byte buf[6];\n\n   png_debug(1, \"in png_write_tRNS\");\n\n   if (color_type == PNG_COLOR_TYPE_PALETTE)\n   {\n      if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette)\n      {\n         png_warning(png_ptr, \"Invalid number of transparent colors specified\");\n         return;\n      }\n      /* Write the chunk out as it is */\n      png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans,\n        (png_size_t)num_trans);\n   }\n   else if (color_type == PNG_COLOR_TYPE_GRAY)\n   {\n      /* One 16 bit value */\n      if (tran->gray >= (1 << png_ptr->bit_depth))\n      {\n         png_warning(png_ptr,\n           \"Ignoring attempt to write tRNS chunk out-of-range for bit_depth\");\n         return;\n      }\n      png_save_uint_16(buf, tran->gray);\n      png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2);\n   }\n   else if (color_type == PNG_COLOR_TYPE_RGB)\n   {\n      /* Three 16 bit values */\n      png_save_uint_16(buf, tran->red);\n      png_save_uint_16(buf + 2, tran->green);\n      png_save_uint_16(buf + 4, tran->blue);\n      if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))\n      {\n         png_warning(png_ptr,\n           \"Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8\");\n         return;\n      }\n      png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6);\n   }\n   else\n   {\n      png_warning(png_ptr, \"Can't write tRNS with an alpha channel\");\n   }\n}\n#endif\n\n#ifdef PNG_WRITE_bKGD_SUPPORTED\n/* Write the background chunk */\nvoid /* PRIVATE */\npng_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_bKGD;\n#endif\n   png_byte buf[6];\n\n   png_debug(1, \"in png_write_bKGD\");\n\n   if (color_type == PNG_COLOR_TYPE_PALETTE)\n   {\n      if (\n#ifdef PNG_MNG_FEATURES_SUPPORTED\n          (png_ptr->num_palette ||\n          (!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) &&\n#endif\n         back->index >= png_ptr->num_palette)\n      {\n         png_warning(png_ptr, \"Invalid background palette index\");\n         return;\n      }\n      buf[0] = back->index;\n      png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)1);\n   }\n   else if (color_type & PNG_COLOR_MASK_COLOR)\n   {\n      png_save_uint_16(buf, back->red);\n      png_save_uint_16(buf + 2, back->green);\n      png_save_uint_16(buf + 4, back->blue);\n      if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))\n      {\n         png_warning(png_ptr,\n           \"Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8\");\n         return;\n      }\n      png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6);\n   }\n   else\n   {\n      if (back->gray >= (1 << png_ptr->bit_depth))\n      {\n         png_warning(png_ptr,\n           \"Ignoring attempt to write bKGD chunk out-of-range for bit_depth\");\n         return;\n      }\n      png_save_uint_16(buf, back->gray);\n      png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2);\n   }\n}\n#endif\n\n#ifdef PNG_WRITE_hIST_SUPPORTED\n/* Write the histogram */\nvoid /* PRIVATE */\npng_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_hIST;\n#endif\n   int i;\n   png_byte buf[3];\n\n   png_debug(1, \"in png_write_hIST\");\n\n   if (num_hist > (int)png_ptr->num_palette)\n   {\n      png_debug2(3, \"num_hist = %d, num_palette = %d\", num_hist,\n         png_ptr->num_palette);\n      png_warning(png_ptr, \"Invalid number of histogram entries specified\");\n      return;\n   }\n\n   png_write_chunk_start(png_ptr, (png_bytep)png_hIST,\n     (png_uint_32)(num_hist * 2));\n   for (i = 0; i < num_hist; i++)\n   {\n      png_save_uint_16(buf, hist[i]);\n      png_write_chunk_data(png_ptr, buf, (png_size_t)2);\n   }\n   png_write_chunk_end(png_ptr);\n}\n#endif\n\n#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \\\n    defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)\n/* Check that the tEXt or zTXt keyword is valid per PNG 1.0 specification,\n * and if invalid, correct the keyword rather than discarding the entire\n * chunk.  The PNG 1.0 specification requires keywords 1-79 characters in\n * length, forbids leading or trailing whitespace, multiple internal spaces,\n * and the non-break space (0x80) from ISO 8859-1.  Returns keyword length.\n *\n * The new_key is allocated to hold the corrected keyword and must be freed\n * by the calling routine.  This avoids problems with trying to write to\n * static keywords without having to have duplicate copies of the strings.\n */\npng_size_t /* PRIVATE */\npng_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)\n{\n   png_size_t key_len;\n   png_charp kp, dp;\n   int kflag;\n   int kwarn=0;\n\n   png_debug(1, \"in png_check_keyword\");\n\n   *new_key = NULL;\n\n   if (key == NULL || (key_len = png_strlen(key)) == 0)\n   {\n      png_warning(png_ptr, \"zero length keyword\");\n      return ((png_size_t)0);\n   }\n\n   png_debug1(2, \"Keyword to be checked is '%s'\", key);\n\n   *new_key = (png_charp)png_malloc_warn(png_ptr, (png_uint_32)(key_len + 2));\n   if (*new_key == NULL)\n   {\n      png_warning(png_ptr, \"Out of memory while procesing keyword\");\n      return ((png_size_t)0);\n   }\n\n   /* Replace non-printing characters with a blank and print a warning */\n   for (kp = key, dp = *new_key; *kp != '\\0'; kp++, dp++)\n   {\n      if ((png_byte)*kp < 0x20 ||\n         ((png_byte)*kp > 0x7E && (png_byte)*kp < 0xA1))\n      {\n#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)\n         char msg[40];\n\n         png_snprintf(msg, 40,\n           \"invalid keyword character 0x%02X\", (png_byte)*kp);\n         png_warning(png_ptr, msg);\n#else\n         png_warning(png_ptr, \"invalid character in keyword\");\n#endif\n         *dp = ' ';\n      }\n      else\n      {\n         *dp = *kp;\n      }\n   }\n   *dp = '\\0';\n\n   /* Remove any trailing white space. */\n   kp = *new_key + key_len - 1;\n   if (*kp == ' ')\n   {\n      png_warning(png_ptr, \"trailing spaces removed from keyword\");\n\n      while (*kp == ' ')\n      {\n         *(kp--) = '\\0';\n         key_len--;\n      }\n   }\n\n   /* Remove any leading white space. */\n   kp = *new_key;\n   if (*kp == ' ')\n   {\n      png_warning(png_ptr, \"leading spaces removed from keyword\");\n\n      while (*kp == ' ')\n      {\n         kp++;\n         key_len--;\n      }\n   }\n\n   png_debug1(2, \"Checking for multiple internal spaces in '%s'\", kp);\n\n   /* Remove multiple internal spaces. */\n   for (kflag = 0, dp = *new_key; *kp != '\\0'; kp++)\n   {\n      if (*kp == ' ' && kflag == 0)\n      {\n         *(dp++) = *kp;\n         kflag = 1;\n      }\n      else if (*kp == ' ')\n      {\n         key_len--;\n         kwarn=1;\n      }\n      else\n      {\n         *(dp++) = *kp;\n         kflag = 0;\n      }\n   }\n   *dp = '\\0';\n   if (kwarn)\n      png_warning(png_ptr, \"extra interior spaces removed from keyword\");\n\n   if (key_len == 0)\n   {\n      png_free(png_ptr, *new_key);\n       *new_key=NULL;\n      png_warning(png_ptr, \"Zero length keyword\");\n   }\n\n   if (key_len > 79)\n   {\n      png_warning(png_ptr, \"keyword length must be 1 - 79 characters\");\n      (*new_key)[79] = '\\0';\n      key_len = 79;\n   }\n\n   return (key_len);\n}\n#endif\n\n#ifdef PNG_WRITE_tEXt_SUPPORTED\n/* Write a tEXt chunk */\nvoid /* PRIVATE */\npng_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,\n   png_size_t text_len)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_tEXt;\n#endif\n   png_size_t key_len;\n   png_charp new_key;\n\n   png_debug(1, \"in png_write_tEXt\");\n\n   if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0)\n      return;\n\n   if (text == NULL || *text == '\\0')\n      text_len = 0;\n   else\n      text_len = png_strlen(text);\n\n   /* Make sure we include the 0 after the key */\n   png_write_chunk_start(png_ptr, (png_bytep)png_tEXt,\n      (png_uint_32)(key_len + text_len + 1));\n   /*\n    * We leave it to the application to meet PNG-1.0 requirements on the\n    * contents of the text.  PNG-1.0 through PNG-1.2 discourage the use of\n    * any non-Latin-1 characters except for NEWLINE.  ISO PNG will forbid them.\n    * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.\n    */\n   png_write_chunk_data(png_ptr, (png_bytep)new_key,\n     (png_size_t)(key_len + 1));\n   if (text_len)\n      png_write_chunk_data(png_ptr, (png_bytep)text, (png_size_t)text_len);\n\n   png_write_chunk_end(png_ptr);\n   png_free(png_ptr, new_key);\n}\n#endif\n\n#ifdef PNG_WRITE_zTXt_SUPPORTED\n/* Write a compressed text chunk */\nvoid /* PRIVATE */\npng_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,\n   png_size_t text_len, int compression)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_zTXt;\n#endif\n   png_size_t key_len;\n   char buf[1];\n   png_charp new_key;\n   compression_state comp;\n\n   png_debug(1, \"in png_write_zTXt\");\n\n   comp.num_output_ptr = 0;\n   comp.max_output_ptr = 0;\n   comp.output_ptr = NULL;\n   comp.input = NULL;\n   comp.input_len = 0;\n\n   if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0)\n   {\n      png_free(png_ptr, new_key);\n      return;\n   }\n\n   if (text == NULL || *text == '\\0' || compression==PNG_TEXT_COMPRESSION_NONE)\n   {\n      png_write_tEXt(png_ptr, new_key, text, (png_size_t)0);\n      png_free(png_ptr, new_key);\n      return;\n   }\n\n   text_len = png_strlen(text);\n\n   /* Compute the compressed data; do it now for the length */\n   text_len = png_text_compress(png_ptr, text, text_len, compression,\n       &comp);\n\n   /* Write start of chunk */\n   png_write_chunk_start(png_ptr, (png_bytep)png_zTXt,\n     (png_uint_32)(key_len+text_len + 2));\n   /* Write key */\n   png_write_chunk_data(png_ptr, (png_bytep)new_key,\n     (png_size_t)(key_len + 1));\n   png_free(png_ptr, new_key);\n\n   buf[0] = (png_byte)compression;\n   /* Write compression */\n   png_write_chunk_data(png_ptr, (png_bytep)buf, (png_size_t)1);\n   /* Write the compressed data */\n   png_write_compressed_data_out(png_ptr, &comp);\n\n   /* Close the chunk */\n   png_write_chunk_end(png_ptr);\n}\n#endif\n\n#ifdef PNG_WRITE_iTXt_SUPPORTED\n/* Write an iTXt chunk */\nvoid /* PRIVATE */\npng_write_iTXt(png_structp png_ptr, int compression, png_charp key,\n    png_charp lang, png_charp lang_key, png_charp text)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_iTXt;\n#endif\n   png_size_t lang_len, key_len, lang_key_len, text_len;\n   png_charp new_lang;\n   png_charp new_key = NULL;\n   png_byte cbuf[2];\n   compression_state comp;\n\n   png_debug(1, \"in png_write_iTXt\");\n\n   comp.num_output_ptr = 0;\n   comp.max_output_ptr = 0;\n   comp.output_ptr = NULL;\n   comp.input = NULL;\n\n   if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0)\n      return;\n\n   if ((lang_len = png_check_keyword(png_ptr, lang, &new_lang))==0)\n   {\n      png_warning(png_ptr, \"Empty language field in iTXt chunk\");\n      new_lang = NULL;\n      lang_len = 0;\n   }\n\n   if (lang_key == NULL)\n      lang_key_len = 0;\n   else\n      lang_key_len = png_strlen(lang_key);\n\n   if (text == NULL)\n      text_len = 0;\n   else\n      text_len = png_strlen(text);\n\n   /* Compute the compressed data; do it now for the length */\n   text_len = png_text_compress(png_ptr, text, text_len, compression-2,\n      &comp);\n\n\n   /* Make sure we include the compression flag, the compression byte,\n    * and the NULs after the key, lang, and lang_key parts */\n\n   png_write_chunk_start(png_ptr, (png_bytep)png_iTXt,\n          (png_uint_32)(\n        5 /* comp byte, comp flag, terminators for key, lang and lang_key */\n        + key_len\n        + lang_len\n        + lang_key_len\n        + text_len));\n\n   /* We leave it to the application to meet PNG-1.0 requirements on the\n    * contents of the text.  PNG-1.0 through PNG-1.2 discourage the use of\n    * any non-Latin-1 characters except for NEWLINE.  ISO PNG will forbid them.\n    * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.\n    */\n   png_write_chunk_data(png_ptr, (png_bytep)new_key,\n     (png_size_t)(key_len + 1));\n\n   /* Set the compression flag */\n   if (compression == PNG_ITXT_COMPRESSION_NONE || \\\n       compression == PNG_TEXT_COMPRESSION_NONE)\n       cbuf[0] = 0;\n   else /* compression == PNG_ITXT_COMPRESSION_zTXt */\n       cbuf[0] = 1;\n   /* Set the compression method */\n   cbuf[1] = 0;\n   png_write_chunk_data(png_ptr, cbuf, (png_size_t)2);\n\n   cbuf[0] = 0;\n   png_write_chunk_data(png_ptr, (new_lang ? (png_bytep)new_lang : cbuf),\n     (png_size_t)(lang_len + 1));\n   png_write_chunk_data(png_ptr, (lang_key ? (png_bytep)lang_key : cbuf),\n     (png_size_t)(lang_key_len + 1));\n   png_write_compressed_data_out(png_ptr, &comp);\n\n   png_write_chunk_end(png_ptr);\n   png_free(png_ptr, new_key);\n   png_free(png_ptr, new_lang);\n}\n#endif\n\n#ifdef PNG_WRITE_oFFs_SUPPORTED\n/* Write the oFFs chunk */\nvoid /* PRIVATE */\npng_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,\n   int unit_type)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_oFFs;\n#endif\n   png_byte buf[9];\n\n   png_debug(1, \"in png_write_oFFs\");\n\n   if (unit_type >= PNG_OFFSET_LAST)\n      png_warning(png_ptr, \"Unrecognized unit type for oFFs chunk\");\n\n   png_save_int_32(buf, x_offset);\n   png_save_int_32(buf + 4, y_offset);\n   buf[8] = (png_byte)unit_type;\n\n   png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9);\n}\n#endif\n#ifdef PNG_WRITE_pCAL_SUPPORTED\n/* Write the pCAL chunk (described in the PNG extensions document) */\nvoid /* PRIVATE */\npng_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,\n   png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_pCAL;\n#endif\n   png_size_t purpose_len, units_len, total_len;\n   png_uint_32p params_len;\n   png_byte buf[10];\n   png_charp new_purpose;\n   int i;\n\n   png_debug1(1, \"in png_write_pCAL (%d parameters)\", nparams);\n\n   if (type >= PNG_EQUATION_LAST)\n      png_warning(png_ptr, \"Unrecognized equation type for pCAL chunk\");\n\n   purpose_len = png_check_keyword(png_ptr, purpose, &new_purpose) + 1;\n   png_debug1(3, \"pCAL purpose length = %d\", (int)purpose_len);\n   units_len = png_strlen(units) + (nparams == 0 ? 0 : 1);\n   png_debug1(3, \"pCAL units length = %d\", (int)units_len);\n   total_len = purpose_len + units_len + 10;\n\n   params_len = (png_uint_32p)png_malloc(png_ptr,\n      (png_uint_32)(nparams * png_sizeof(png_uint_32)));\n\n   /* Find the length of each parameter, making sure we don't count the\n      null terminator for the last parameter. */\n   for (i = 0; i < nparams; i++)\n   {\n      params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1);\n      png_debug2(3, \"pCAL parameter %d length = %lu\", i,\n        (unsigned long) params_len[i]);\n      total_len += (png_size_t)params_len[i];\n   }\n\n   png_debug1(3, \"pCAL total length = %d\", (int)total_len);\n   png_write_chunk_start(png_ptr, (png_bytep)png_pCAL, (png_uint_32)total_len);\n   png_write_chunk_data(png_ptr, (png_bytep)new_purpose,\n     (png_size_t)purpose_len);\n   png_save_int_32(buf, X0);\n   png_save_int_32(buf + 4, X1);\n   buf[8] = (png_byte)type;\n   buf[9] = (png_byte)nparams;\n   png_write_chunk_data(png_ptr, buf, (png_size_t)10);\n   png_write_chunk_data(png_ptr, (png_bytep)units, (png_size_t)units_len);\n\n   png_free(png_ptr, new_purpose);\n\n   for (i = 0; i < nparams; i++)\n   {\n      png_write_chunk_data(png_ptr, (png_bytep)params[i],\n         (png_size_t)params_len[i]);\n   }\n\n   png_free(png_ptr, params_len);\n   png_write_chunk_end(png_ptr);\n}\n#endif\n\n#ifdef PNG_WRITE_sCAL_SUPPORTED\n/* Write the sCAL chunk */\n#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)\nvoid /* PRIVATE */\npng_write_sCAL(png_structp png_ptr, int unit, double width, double height)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_sCAL;\n#endif\n   char buf[64];\n   png_size_t total_len;\n\n   png_debug(1, \"in png_write_sCAL\");\n\n   buf[0] = (char)unit;\n#ifdef _WIN32_WCE\n/* sprintf() function is not supported on WindowsCE */\n   {\n      wchar_t wc_buf[32];\n      size_t wc_len;\n      swprintf(wc_buf, TEXT(\"%12.12e\"), width);\n      wc_len = wcslen(wc_buf);\n      WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + 1, wc_len, NULL,\n          NULL);\n      total_len = wc_len + 2;\n      swprintf(wc_buf, TEXT(\"%12.12e\"), height);\n      wc_len = wcslen(wc_buf);\n      WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + total_len, wc_len,\n         NULL, NULL);\n      total_len += wc_len;\n   }\n#else\n   png_snprintf(buf + 1, 63, \"%12.12e\", width);\n   total_len = 1 + png_strlen(buf + 1) + 1;\n   png_snprintf(buf + total_len, 64-total_len, \"%12.12e\", height);\n   total_len += png_strlen(buf + total_len);\n#endif\n\n   png_debug1(3, \"sCAL total length = %u\", (unsigned int)total_len);\n   png_write_chunk(png_ptr, (png_bytep)png_sCAL, (png_bytep)buf, total_len);\n}\n#else\n#ifdef PNG_FIXED_POINT_SUPPORTED\nvoid /* PRIVATE */\npng_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,\n   png_charp height)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_sCAL;\n#endif\n   png_byte buf[64];\n   png_size_t wlen, hlen, total_len;\n\n   png_debug(1, \"in png_write_sCAL_s\");\n\n   wlen = png_strlen(width);\n   hlen = png_strlen(height);\n   total_len = wlen + hlen + 2;\n   if (total_len > 64)\n   {\n      png_warning(png_ptr, \"Can't write sCAL (buffer too small)\");\n      return;\n   }\n\n   buf[0] = (png_byte)unit;\n   png_memcpy(buf + 1, width, wlen + 1);      /* Append the '\\0' here */\n   png_memcpy(buf + wlen + 2, height, hlen);  /* Do NOT append the '\\0' here */\n\n   png_debug1(3, \"sCAL total length = %u\", (unsigned int)total_len);\n   png_write_chunk(png_ptr, (png_bytep)png_sCAL, buf, total_len);\n}\n#endif\n#endif\n#endif\n\n#ifdef PNG_WRITE_pHYs_SUPPORTED\n/* Write the pHYs chunk */\nvoid /* PRIVATE */\npng_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,\n   png_uint_32 y_pixels_per_unit,\n   int unit_type)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_pHYs;\n#endif\n   png_byte buf[9];\n\n   png_debug(1, \"in png_write_pHYs\");\n\n   if (unit_type >= PNG_RESOLUTION_LAST)\n      png_warning(png_ptr, \"Unrecognized unit type for pHYs chunk\");\n\n   png_save_uint_32(buf, x_pixels_per_unit);\n   png_save_uint_32(buf + 4, y_pixels_per_unit);\n   buf[8] = (png_byte)unit_type;\n\n   png_write_chunk(png_ptr, (png_bytep)png_pHYs, buf, (png_size_t)9);\n}\n#endif\n\n#ifdef PNG_WRITE_tIME_SUPPORTED\n/* Write the tIME chunk.  Use either png_convert_from_struct_tm()\n * or png_convert_from_time_t(), or fill in the structure yourself.\n */\nvoid /* PRIVATE */\npng_write_tIME(png_structp png_ptr, png_timep mod_time)\n{\n#ifdef PNG_USE_LOCAL_ARRAYS\n   PNG_tIME;\n#endif\n   png_byte buf[7];\n\n   png_debug(1, \"in png_write_tIME\");\n\n   if (mod_time->month  > 12 || mod_time->month  < 1 ||\n       mod_time->day    > 31 || mod_time->day    < 1 ||\n       mod_time->hour   > 23 || mod_time->second > 60)\n   {\n      png_warning(png_ptr, \"Invalid time specified for tIME chunk\");\n      return;\n   }\n\n   png_save_uint_16(buf, mod_time->year);\n   buf[2] = mod_time->month;\n   buf[3] = mod_time->day;\n   buf[4] = mod_time->hour;\n   buf[5] = mod_time->minute;\n   buf[6] = mod_time->second;\n\n   png_write_chunk(png_ptr, (png_bytep)png_tIME, buf, (png_size_t)7);\n}\n#endif\n\n/* Initializes the row writing capability of libpng */\nvoid /* PRIVATE */\npng_write_start_row(png_structp png_ptr)\n{\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n   /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */\n\n   /* Start of interlace block */\n   int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};\n\n   /* Offset to next interlace block */\n   int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};\n\n   /* Start of interlace block in the y direction */\n   int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};\n\n   /* Offset to next interlace block in the y direction */\n   int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};\n#endif\n\n   png_size_t buf_size;\n\n   png_debug(1, \"in png_write_start_row\");\n\n   buf_size = (png_size_t)(PNG_ROWBYTES(\n      png_ptr->usr_channels*png_ptr->usr_bit_depth, png_ptr->width) + 1);\n\n   /* Set up row buffer */\n   png_ptr->row_buf = (png_bytep)png_malloc(png_ptr,\n     (png_uint_32)buf_size);\n   png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE;\n\n#ifdef PNG_WRITE_FILTER_SUPPORTED\n   /* Set up filtering buffer, if using this filter */\n   if (png_ptr->do_filter & PNG_FILTER_SUB)\n   {\n      png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,\n         (png_uint_32)(png_ptr->rowbytes + 1));\n      png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB;\n   }\n\n   /* We only need to keep the previous row if we are using one of these. */\n   if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH))\n   {\n      /* Set up previous row buffer */\n      png_ptr->prev_row = (png_bytep)png_calloc(png_ptr,\n         (png_uint_32)buf_size);\n\n      if (png_ptr->do_filter & PNG_FILTER_UP)\n      {\n         png_ptr->up_row = (png_bytep)png_malloc(png_ptr,\n            (png_uint_32)(png_ptr->rowbytes + 1));\n         png_ptr->up_row[0] = PNG_FILTER_VALUE_UP;\n      }\n\n      if (png_ptr->do_filter & PNG_FILTER_AVG)\n      {\n         png_ptr->avg_row = (png_bytep)png_malloc(png_ptr,\n            (png_uint_32)(png_ptr->rowbytes + 1));\n         png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG;\n      }\n\n      if (png_ptr->do_filter & PNG_FILTER_PAETH)\n      {\n         png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr,\n            (png_uint_32)(png_ptr->rowbytes + 1));\n         png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;\n      }\n   }\n#endif /* PNG_WRITE_FILTER_SUPPORTED */\n\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n   /* If interlaced, we need to set up width and height of pass */\n   if (png_ptr->interlaced)\n   {\n      if (!(png_ptr->transformations & PNG_INTERLACE))\n      {\n         png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -\n            png_pass_ystart[0]) / png_pass_yinc[0];\n         png_ptr->usr_width = (png_ptr->width + png_pass_inc[0] - 1 -\n            png_pass_start[0]) / png_pass_inc[0];\n      }\n      else\n      {\n         png_ptr->num_rows = png_ptr->height;\n         png_ptr->usr_width = png_ptr->width;\n      }\n   }\n   else\n#endif\n   {\n      png_ptr->num_rows = png_ptr->height;\n      png_ptr->usr_width = png_ptr->width;\n   }\n   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n   png_ptr->zstream.next_out = png_ptr->zbuf;\n}\n\n/* Internal use only.  Called when finished processing a row of data. */\nvoid /* PRIVATE */\npng_write_finish_row(png_structp png_ptr)\n{\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n   /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */\n\n   /* Start of interlace block */\n   int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};\n\n   /* Offset to next interlace block */\n   int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};\n\n   /* Start of interlace block in the y direction */\n   int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};\n\n   /* Offset to next interlace block in the y direction */\n   int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};\n#endif\n\n   int ret;\n\n   png_debug(1, \"in png_write_finish_row\");\n\n   /* Next row */\n   png_ptr->row_number++;\n\n   /* See if we are done */\n   if (png_ptr->row_number < png_ptr->num_rows)\n      return;\n\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n   /* If interlaced, go to next pass */\n   if (png_ptr->interlaced)\n   {\n      png_ptr->row_number = 0;\n      if (png_ptr->transformations & PNG_INTERLACE)\n      {\n         png_ptr->pass++;\n      }\n      else\n      {\n         /* Loop until we find a non-zero width or height pass */\n         do\n         {\n            png_ptr->pass++;\n            if (png_ptr->pass >= 7)\n               break;\n            png_ptr->usr_width = (png_ptr->width +\n               png_pass_inc[png_ptr->pass] - 1 -\n               png_pass_start[png_ptr->pass]) /\n               png_pass_inc[png_ptr->pass];\n            png_ptr->num_rows = (png_ptr->height +\n               png_pass_yinc[png_ptr->pass] - 1 -\n               png_pass_ystart[png_ptr->pass]) /\n               png_pass_yinc[png_ptr->pass];\n            if (png_ptr->transformations & PNG_INTERLACE)\n               break;\n         } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0);\n\n      }\n\n      /* Reset the row above the image for the next pass */\n      if (png_ptr->pass < 7)\n      {\n         if (png_ptr->prev_row != NULL)\n            png_memset(png_ptr->prev_row, 0,\n               (png_size_t)(PNG_ROWBYTES(png_ptr->usr_channels*\n               png_ptr->usr_bit_depth, png_ptr->width)) + 1);\n         return;\n      }\n   }\n#endif\n\n   /* If we get here, we've just written the last row, so we need\n      to flush the compressor */\n   do\n   {\n      /* Tell the compressor we are done */\n      ret = deflate(&png_ptr->zstream, Z_FINISH);\n      /* Check for an error */\n      if (ret == Z_OK)\n      {\n         /* Check to see if we need more room */\n         if (!(png_ptr->zstream.avail_out))\n         {\n            png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);\n            png_ptr->zstream.next_out = png_ptr->zbuf;\n            png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n         }\n      }\n      else if (ret != Z_STREAM_END)\n      {\n         if (png_ptr->zstream.msg != NULL)\n            png_error(png_ptr, png_ptr->zstream.msg);\n         else\n            png_error(png_ptr, \"zlib error\");\n      }\n   } while (ret != Z_STREAM_END);\n\n   /* Write any extra space */\n   if (png_ptr->zstream.avail_out < png_ptr->zbuf_size)\n   {\n      png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size -\n         png_ptr->zstream.avail_out);\n   }\n\n   deflateReset(&png_ptr->zstream);\n   png_ptr->zstream.data_type = Z_BINARY;\n}\n\n#ifdef PNG_WRITE_INTERLACING_SUPPORTED\n/* Pick out the correct pixels for the interlace pass.\n * The basic idea here is to go through the row with a source\n * pointer and a destination pointer (sp and dp), and copy the\n * correct pixels for the pass.  As the row gets compacted,\n * sp will always be >= dp, so we should never overwrite anything.\n * See the default: case for the easiest code to understand.\n */\nvoid /* PRIVATE */\npng_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)\n{\n   /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */\n\n   /* Start of interlace block */\n   int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};\n\n   /* Offset to next interlace block */\n   int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};\n\n   png_debug(1, \"in png_do_write_interlace\");\n\n   /* We don't have to do anything on the last pass (6) */\n#ifdef PNG_USELESS_TESTS_SUPPORTED\n   if (row != NULL && row_info != NULL && pass < 6)\n#else\n   if (pass < 6)\n#endif\n   {\n      /* Each pixel depth is handled separately */\n      switch (row_info->pixel_depth)\n      {\n         case 1:\n         {\n            png_bytep sp;\n            png_bytep dp;\n            int shift;\n            int d;\n            int value;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            dp = row;\n            d = 0;\n            shift = 7;\n            for (i = png_pass_start[pass]; i < row_width;\n               i += png_pass_inc[pass])\n            {\n               sp = row + (png_size_t)(i >> 3);\n               value = (int)(*sp >> (7 - (int)(i & 0x07))) & 0x01;\n               d |= (value << shift);\n\n               if (shift == 0)\n               {\n                  shift = 7;\n                  *dp++ = (png_byte)d;\n                  d = 0;\n               }\n               else\n                  shift--;\n\n            }\n            if (shift != 7)\n               *dp = (png_byte)d;\n            break;\n         }\n         case 2:\n         {\n            png_bytep sp;\n            png_bytep dp;\n            int shift;\n            int d;\n            int value;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            dp = row;\n            shift = 6;\n            d = 0;\n            for (i = png_pass_start[pass]; i < row_width;\n               i += png_pass_inc[pass])\n            {\n               sp = row + (png_size_t)(i >> 2);\n               value = (*sp >> ((3 - (int)(i & 0x03)) << 1)) & 0x03;\n               d |= (value << shift);\n\n               if (shift == 0)\n               {\n                  shift = 6;\n                  *dp++ = (png_byte)d;\n                  d = 0;\n               }\n               else\n                  shift -= 2;\n            }\n            if (shift != 6)\n                   *dp = (png_byte)d;\n            break;\n         }\n         case 4:\n         {\n            png_bytep sp;\n            png_bytep dp;\n            int shift;\n            int d;\n            int value;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n\n            dp = row;\n            shift = 4;\n            d = 0;\n            for (i = png_pass_start[pass]; i < row_width;\n               i += png_pass_inc[pass])\n            {\n               sp = row + (png_size_t)(i >> 1);\n               value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f;\n               d |= (value << shift);\n\n               if (shift == 0)\n               {\n                  shift = 4;\n                  *dp++ = (png_byte)d;\n                  d = 0;\n               }\n               else\n                  shift -= 4;\n            }\n            if (shift != 4)\n               *dp = (png_byte)d;\n            break;\n         }\n         default:\n         {\n            png_bytep sp;\n            png_bytep dp;\n            png_uint_32 i;\n            png_uint_32 row_width = row_info->width;\n            png_size_t pixel_bytes;\n\n            /* Start at the beginning */\n            dp = row;\n            /* Find out how many bytes each pixel takes up */\n            pixel_bytes = (row_info->pixel_depth >> 3);\n            /* Loop through the row, only looking at the pixels that\n               matter */\n            for (i = png_pass_start[pass]; i < row_width;\n               i += png_pass_inc[pass])\n            {\n               /* Find out where the original pixel is */\n               sp = row + (png_size_t)i * pixel_bytes;\n               /* Move the pixel */\n               if (dp != sp)\n                  png_memcpy(dp, sp, pixel_bytes);\n               /* Next pixel */\n               dp += pixel_bytes;\n            }\n            break;\n         }\n      }\n      /* Set new row width */\n      row_info->width = (row_info->width +\n         png_pass_inc[pass] - 1 -\n         png_pass_start[pass]) /\n         png_pass_inc[pass];\n         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,\n            row_info->width);\n   }\n}\n#endif\n\n/* This filters the row, chooses which filter to use, if it has not already\n * been specified by the application, and then writes the row out with the\n * chosen filter.\n */\n#define PNG_MAXSUM (((png_uint_32)(-1)) >> 1)\n#define PNG_HISHIFT 10\n#define PNG_LOMASK ((png_uint_32)0xffffL)\n#define PNG_HIMASK ((png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT))\nvoid /* PRIVATE */\npng_write_find_filter(png_structp png_ptr, png_row_infop row_info)\n{\n   png_bytep best_row;\n#ifdef PNG_WRITE_FILTER_SUPPORTED\n   png_bytep prev_row, row_buf;\n   png_uint_32 mins, bpp;\n   png_byte filter_to_do = png_ptr->do_filter;\n   png_uint_32 row_bytes = row_info->rowbytes;\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n   int num_p_filters = (int)png_ptr->num_prev_filters;\n#endif \n\n   png_debug(1, \"in png_write_find_filter\");\n\n#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n  if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS)\n  {\n      /* These will never be selected so we need not test them. */\n      filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);\n  }\n#endif \n\n   /* Find out how many bytes offset each pixel is */\n   bpp = (row_info->pixel_depth + 7) >> 3;\n\n   prev_row = png_ptr->prev_row;\n#endif\n   best_row = png_ptr->row_buf;\n#ifdef PNG_WRITE_FILTER_SUPPORTED\n   row_buf = best_row;\n   mins = PNG_MAXSUM;\n\n   /* The prediction method we use is to find which method provides the\n    * smallest value when summing the absolute values of the distances\n    * from zero, using anything >= 128 as negative numbers.  This is known\n    * as the \"minimum sum of absolute differences\" heuristic.  Other\n    * heuristics are the \"weighted minimum sum of absolute differences\"\n    * (experimental and can in theory improve compression), and the \"zlib\n    * predictive\" method (not implemented yet), which does test compressions\n    * of lines using different filter methods, and then chooses the\n    * (series of) filter(s) that give minimum compressed data size (VERY\n    * computationally expensive).\n    *\n    * GRR 980525:  consider also\n    *   (1) minimum sum of absolute differences from running average (i.e.,\n    *       keep running sum of non-absolute differences & count of bytes)\n    *       [track dispersion, too?  restart average if dispersion too large?]\n    *  (1b) minimum sum of absolute differences from sliding average, probably\n    *       with window size <= deflate window (usually 32K)\n    *   (2) minimum sum of squared differences from zero or running average\n    *       (i.e., ~ root-mean-square approach)\n    */\n\n\n   /* We don't need to test the 'no filter' case if this is the only filter\n    * that has been chosen, as it doesn't actually do anything to the data.\n    */\n   if ((filter_to_do & PNG_FILTER_NONE) &&\n       filter_to_do != PNG_FILTER_NONE)\n   {\n      png_bytep rp;\n      png_uint_32 sum = 0;\n      png_uint_32 i;\n      int v;\n\n      for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++)\n      {\n         v = *rp;\n         sum += (v < 128) ? v : 256 - v;\n      }\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)\n      {\n         png_uint_32 sumhi, sumlo;\n         int j;\n         sumlo = sum & PNG_LOMASK;\n         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; /* Gives us some footroom */\n\n         /* Reduce the sum if we match any of the previous rows */\n         for (j = 0; j < num_p_filters; j++)\n         {\n            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE)\n            {\n               sumlo = (sumlo * png_ptr->filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n               sumhi = (sumhi * png_ptr->filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n            }\n         }\n\n         /* Factor in the cost of this filter (this is here for completeness,\n          * but it makes no sense to have a \"cost\" for the NONE filter, as\n          * it has the minimum possible computational cost - none).\n          */\n         sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >>\n            PNG_COST_SHIFT;\n         sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >>\n            PNG_COST_SHIFT;\n\n         if (sumhi > PNG_HIMASK)\n            sum = PNG_MAXSUM;\n         else\n            sum = (sumhi << PNG_HISHIFT) + sumlo;\n      }\n#endif\n      mins = sum;\n   }\n\n   /* Sub filter */\n   if (filter_to_do == PNG_FILTER_SUB)\n   /* It's the only filter so no testing is needed */\n   {\n      png_bytep rp, lp, dp;\n      png_uint_32 i;\n      for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp;\n           i++, rp++, dp++)\n      {\n         *dp = *rp;\n      }\n      for (lp = row_buf + 1; i < row_bytes;\n         i++, rp++, lp++, dp++)\n      {\n         *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff);\n      }\n      best_row = png_ptr->sub_row;\n   }\n\n   else if (filter_to_do & PNG_FILTER_SUB)\n   {\n      png_bytep rp, dp, lp;\n      png_uint_32 sum = 0, lmins = mins;\n      png_uint_32 i;\n      int v;\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n      /* We temporarily increase the \"minimum sum\" by the factor we\n       * would reduce the sum of this filter, so that we can do the\n       * early exit comparison without scaling the sum each time.\n       */\n      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)\n      {\n         int j;\n         png_uint_32 lmhi, lmlo;\n         lmlo = lmins & PNG_LOMASK;\n         lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK;\n\n         for (j = 0; j < num_p_filters; j++)\n         {\n            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB)\n            {\n               lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n               lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n            }\n         }\n\n         lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>\n            PNG_COST_SHIFT;\n         lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>\n            PNG_COST_SHIFT;\n\n         if (lmhi > PNG_HIMASK)\n            lmins = PNG_MAXSUM;\n         else\n            lmins = (lmhi << PNG_HISHIFT) + lmlo;\n      }\n#endif\n\n      for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp;\n           i++, rp++, dp++)\n      {\n         v = *dp = *rp;\n\n         sum += (v < 128) ? v : 256 - v;\n      }\n      for (lp = row_buf + 1; i < row_bytes;\n         i++, rp++, lp++, dp++)\n      {\n         v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff);\n\n         sum += (v < 128) ? v : 256 - v;\n\n         if (sum > lmins)  /* We are already worse, don't continue. */\n            break;\n      }\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)\n      {\n         int j;\n         png_uint_32 sumhi, sumlo;\n         sumlo = sum & PNG_LOMASK;\n         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK;\n\n         for (j = 0; j < num_p_filters; j++)\n         {\n            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB)\n            {\n               sumlo = (sumlo * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n               sumhi = (sumhi * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n            }\n         }\n\n         sumlo = (sumlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>\n            PNG_COST_SHIFT;\n         sumhi = (sumhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>\n            PNG_COST_SHIFT;\n\n         if (sumhi > PNG_HIMASK)\n            sum = PNG_MAXSUM;\n         else\n            sum = (sumhi << PNG_HISHIFT) + sumlo;\n      }\n#endif\n\n      if (sum < mins)\n      {\n         mins = sum;\n         best_row = png_ptr->sub_row;\n      }\n   }\n\n   /* Up filter */\n   if (filter_to_do == PNG_FILTER_UP)\n   {\n      png_bytep rp, dp, pp;\n      png_uint_32 i;\n\n      for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1,\n           pp = prev_row + 1; i < row_bytes;\n           i++, rp++, pp++, dp++)\n      {\n         *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff);\n      }\n      best_row = png_ptr->up_row;\n   }\n\n   else if (filter_to_do & PNG_FILTER_UP)\n   {\n      png_bytep rp, dp, pp;\n      png_uint_32 sum = 0, lmins = mins;\n      png_uint_32 i;\n      int v;\n\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)\n      {\n         int j;\n         png_uint_32 lmhi, lmlo;\n         lmlo = lmins & PNG_LOMASK;\n         lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK;\n\n         for (j = 0; j < num_p_filters; j++)\n         {\n            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP)\n            {\n               lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n               lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n            }\n         }\n\n         lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >>\n            PNG_COST_SHIFT;\n         lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >>\n            PNG_COST_SHIFT;\n\n         if (lmhi > PNG_HIMASK)\n            lmins = PNG_MAXSUM;\n         else\n            lmins = (lmhi << PNG_HISHIFT) + lmlo;\n      }\n#endif\n\n      for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1,\n           pp = prev_row + 1; i < row_bytes; i++)\n      {\n         v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);\n\n         sum += (v < 128) ? v : 256 - v;\n\n         if (sum > lmins)  /* We are already worse, don't continue. */\n            break;\n      }\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)\n      {\n         int j;\n         png_uint_32 sumhi, sumlo;\n         sumlo = sum & PNG_LOMASK;\n         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK;\n\n         for (j = 0; j < num_p_filters; j++)\n         {\n            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP)\n            {\n               sumlo = (sumlo * png_ptr->filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n               sumhi = (sumhi * png_ptr->filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n            }\n         }\n\n         sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >>\n            PNG_COST_SHIFT;\n         sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >>\n            PNG_COST_SHIFT;\n\n         if (sumhi > PNG_HIMASK)\n            sum = PNG_MAXSUM;\n         else\n            sum = (sumhi << PNG_HISHIFT) + sumlo;\n      }\n#endif\n\n      if (sum < mins)\n      {\n         mins = sum;\n         best_row = png_ptr->up_row;\n      }\n   }\n\n   /* Avg filter */\n   if (filter_to_do == PNG_FILTER_AVG)\n   {\n      png_bytep rp, dp, pp, lp;\n      png_uint_32 i;\n      for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1,\n           pp = prev_row + 1; i < bpp; i++)\n      {\n         *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff);\n      }\n      for (lp = row_buf + 1; i < row_bytes; i++)\n      {\n         *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2))\n                 & 0xff);\n      }\n      best_row = png_ptr->avg_row;\n   }\n\n   else if (filter_to_do & PNG_FILTER_AVG)\n   {\n      png_bytep rp, dp, pp, lp;\n      png_uint_32 sum = 0, lmins = mins;\n      png_uint_32 i;\n      int v;\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)\n      {\n         int j;\n         png_uint_32 lmhi, lmlo;\n         lmlo = lmins & PNG_LOMASK;\n         lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK;\n\n         for (j = 0; j < num_p_filters; j++)\n         {\n            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_AVG)\n            {\n               lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n               lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n            }\n         }\n\n         lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >>\n            PNG_COST_SHIFT;\n         lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >>\n            PNG_COST_SHIFT;\n\n         if (lmhi > PNG_HIMASK)\n            lmins = PNG_MAXSUM;\n         else\n            lmins = (lmhi << PNG_HISHIFT) + lmlo;\n      }\n#endif\n\n      for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1,\n           pp = prev_row + 1; i < bpp; i++)\n      {\n         v = *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff);\n\n         sum += (v < 128) ? v : 256 - v;\n      }\n      for (lp = row_buf + 1; i < row_bytes; i++)\n      {\n         v = *dp++ =\n          (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff);\n\n         sum += (v < 128) ? v : 256 - v;\n\n         if (sum > lmins)  /* We are already worse, don't continue. */\n            break;\n      }\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)\n      {\n         int j;\n         png_uint_32 sumhi, sumlo;\n         sumlo = sum & PNG_LOMASK;\n         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK;\n\n         for (j = 0; j < num_p_filters; j++)\n         {\n            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE)\n            {\n               sumlo = (sumlo * png_ptr->filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n               sumhi = (sumhi * png_ptr->filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n            }\n         }\n\n         sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >>\n            PNG_COST_SHIFT;\n         sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >>\n            PNG_COST_SHIFT;\n\n         if (sumhi > PNG_HIMASK)\n            sum = PNG_MAXSUM;\n         else\n            sum = (sumhi << PNG_HISHIFT) + sumlo;\n      }\n#endif\n\n      if (sum < mins)\n      {\n         mins = sum;\n         best_row = png_ptr->avg_row;\n      }\n   }\n\n   /* Paeth filter */\n   if (filter_to_do == PNG_FILTER_PAETH)\n   {\n      png_bytep rp, dp, pp, cp, lp;\n      png_uint_32 i;\n      for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1,\n           pp = prev_row + 1; i < bpp; i++)\n      {\n         *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);\n      }\n\n      for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++)\n      {\n         int a, b, c, pa, pb, pc, p;\n\n         b = *pp++;\n         c = *cp++;\n         a = *lp++;\n\n         p = b - c;\n         pc = a - c;\n\n#ifdef PNG_USE_ABS\n         pa = abs(p);\n         pb = abs(pc);\n         pc = abs(p + pc);\n#else\n         pa = p < 0 ? -p : p;\n         pb = pc < 0 ? -pc : pc;\n         pc = (p + pc) < 0 ? -(p + pc) : p + pc;\n#endif\n\n         p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;\n\n         *dp++ = (png_byte)(((int)*rp++ - p) & 0xff);\n      }\n      best_row = png_ptr->paeth_row;\n   }\n\n   else if (filter_to_do & PNG_FILTER_PAETH)\n   {\n      png_bytep rp, dp, pp, cp, lp;\n      png_uint_32 sum = 0, lmins = mins;\n      png_uint_32 i;\n      int v;\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)\n      {\n         int j;\n         png_uint_32 lmhi, lmlo;\n         lmlo = lmins & PNG_LOMASK;\n         lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK;\n\n         for (j = 0; j < num_p_filters; j++)\n         {\n            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH)\n            {\n               lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n               lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n            }\n         }\n\n         lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >>\n            PNG_COST_SHIFT;\n         lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >>\n            PNG_COST_SHIFT;\n\n         if (lmhi > PNG_HIMASK)\n            lmins = PNG_MAXSUM;\n         else\n            lmins = (lmhi << PNG_HISHIFT) + lmlo;\n      }\n#endif\n\n      for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1,\n           pp = prev_row + 1; i < bpp; i++)\n      {\n         v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);\n\n         sum += (v < 128) ? v : 256 - v;\n      }\n\n      for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++)\n      {\n         int a, b, c, pa, pb, pc, p;\n\n         b = *pp++;\n         c = *cp++;\n         a = *lp++;\n\n#ifndef PNG_SLOW_PAETH\n         p = b - c;\n         pc = a - c;\n#ifdef PNG_USE_ABS\n         pa = abs(p);\n         pb = abs(pc);\n         pc = abs(p + pc);\n#else\n         pa = p < 0 ? -p : p;\n         pb = pc < 0 ? -pc : pc;\n         pc = (p + pc) < 0 ? -(p + pc) : p + pc;\n#endif\n         p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;\n#else /* PNG_SLOW_PAETH */\n         p = a + b - c;\n         pa = abs(p - a);\n         pb = abs(p - b);\n         pc = abs(p - c);\n         if (pa <= pb && pa <= pc)\n            p = a;\n         else if (pb <= pc)\n            p = b;\n         else\n            p = c;\n#endif /* PNG_SLOW_PAETH */\n\n         v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff);\n\n         sum += (v < 128) ? v : 256 - v;\n\n         if (sum > lmins)  /* We are already worse, don't continue. */\n            break;\n      }\n\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)\n      {\n         int j;\n         png_uint_32 sumhi, sumlo;\n         sumlo = sum & PNG_LOMASK;\n         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK;\n\n         for (j = 0; j < num_p_filters; j++)\n         {\n            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH)\n            {\n               sumlo = (sumlo * png_ptr->filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n               sumhi = (sumhi * png_ptr->filter_weights[j]) >>\n                  PNG_WEIGHT_SHIFT;\n            }\n         }\n\n         sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >>\n            PNG_COST_SHIFT;\n         sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >>\n            PNG_COST_SHIFT;\n\n         if (sumhi > PNG_HIMASK)\n            sum = PNG_MAXSUM;\n         else\n            sum = (sumhi << PNG_HISHIFT) + sumlo;\n      }\n#endif\n\n      if (sum < mins)\n      {\n         best_row = png_ptr->paeth_row;\n      }\n   }\n#endif /* PNG_WRITE_FILTER_SUPPORTED */\n   /* Do the actual writing of the filtered row data from the chosen filter. */\n\n   png_write_filtered_row(png_ptr, best_row);\n\n#ifdef PNG_WRITE_FILTER_SUPPORTED\n#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\n   /* Save the type of filter we picked this time for future calculations */\n   if (png_ptr->num_prev_filters > 0)\n   {\n      int j;\n      for (j = 1; j < num_p_filters; j++)\n      {\n         png_ptr->prev_filters[j] = png_ptr->prev_filters[j - 1];\n      }\n      png_ptr->prev_filters[j] = best_row[0];\n   }\n#endif\n#endif /* PNG_WRITE_FILTER_SUPPORTED */\n}\n\n\n/* Do the actual writing of a previously filtered row. */\nvoid /* PRIVATE */\npng_write_filtered_row(png_structp png_ptr, png_bytep filtered_row)\n{\n   png_debug(1, \"in png_write_filtered_row\");\n\n   png_debug1(2, \"filter = %d\", filtered_row[0]);\n   /* Set up the zlib input buffer */\n\n   png_ptr->zstream.next_in = filtered_row;\n   png_ptr->zstream.avail_in = (uInt)png_ptr->row_info.rowbytes + 1;\n   /* Repeat until we have compressed all the data */\n   do\n   {\n      int ret; /* Return of zlib */\n\n      /* Compress the data */\n      ret = deflate(&png_ptr->zstream, Z_NO_FLUSH);\n      /* Check for compression errors */\n      if (ret != Z_OK)\n      {\n         if (png_ptr->zstream.msg != NULL)\n            png_error(png_ptr, png_ptr->zstream.msg);\n         else\n            png_error(png_ptr, \"zlib error\");\n      }\n\n      /* See if it is time to write another IDAT */\n      if (!(png_ptr->zstream.avail_out))\n      {\n         /* Write the IDAT and reset the zlib output buffer */\n         png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);\n         png_ptr->zstream.next_out = png_ptr->zbuf;\n         png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;\n      }\n   /* Repeat until all data has been compressed */\n   } while (png_ptr->zstream.avail_in);\n\n   /* Swap the current and previous rows */\n   if (png_ptr->prev_row != NULL)\n   {\n      png_bytep tptr;\n\n      tptr = png_ptr->prev_row;\n      png_ptr->prev_row = png_ptr->row_buf;\n      png_ptr->row_buf = tptr;\n   }\n\n   /* Finish row - updates counters and flushes zlib if last row */\n   png_write_finish_row(png_ptr);\n\n#ifdef PNG_WRITE_FLUSH_SUPPORTED\n   png_ptr->flush_rows++;\n\n   if (png_ptr->flush_dist > 0 &&\n       png_ptr->flush_rows >= png_ptr->flush_dist)\n   {\n      png_write_flush(png_ptr);\n   }\n#endif\n}\n#endif /* PNG_WRITE_SUPPORTED */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ANNOUNCE",
    "content": "\t     PTHREADS-WIN32 RELEASE 2.8.0 (2006-12-22)\n\t     -----------------------------------------\n\t Web Site: http://sources.redhat.com/pthreads-win32/\n\tFTP Site: ftp://sources.redhat.com/pub/pthreads-win32\n\t Maintainer: Ross Johnson <rpj@callisto.canberra.edu.au>\n\n\nWe are pleased to announce the availability of a new release of\nPthreads-win32, an Open Source Software implementation of the\nThreads component of the POSIX 1003.1 2001 Standard for Microsoft's\nWin32 environment. Some functions from other sections of POSIX\n1003.1 2001 are also supported including semaphores and scheduling\nfunctions.\n\nSome common non-portable functions are also implemented for\nadditional compatibility, as are a few functions specific\nto pthreads-win32 for easier integration with Win32 applications.\n\nPthreads-win32 is free software, distributed under the GNU Lesser\nGeneral Public License (LGPL).\n\n\nAcknowledgements\n----------------\nThis library is based originally on a Win32 pthreads\nimplementation contributed by John Bossom <John.Bossom@cognos.com>.\n\nThe implementation of Condition Variables uses algorithms developed\nby Alexander Terekhov and Louis Thomas.\n\nThe implementation of POSIX mutexes has been improved by Thomas Pfaff\nand later by Alexander Terekhov.\n\nThe implementation of Spinlocks and Barriers was contributed\nby Ross Johnson.\n\nThe implementation of read/write locks was contributed by\nAurelio Medina and improved by Alexander Terekhov.\n\nMany others have contributed significant time and effort to solve crutial\nproblems in order to make the library workable, robust and reliable.\n\nThanks to Xavier Leroy for granting permission to use and modify his\nLinuxThreads manual pages.\n\nThanks to The Open Group for making the Single Unix Specification\npublicly available - many of the manual pages included in the package\nwere extracted from it.\n\nThere is also a separate CONTRIBUTORS file. This file and others are\non the web site:\n\n\thttp://sources.redhat.com/pthreads-win32\n\nAs much as possible, the ChangeLog file acknowledges contributions to the\ncode base in more detail.\n\n\nChanges since the last release\n------------------------------\nThese are now documented in the NEWS file.\nSee the ChangeLog file also.\n\n\nKnown Bugs\n----------\nThese are now documented in the BUGS file.\n\n\nLevel of standards conformance\n------------------------------\n\nThe following POSIX 1003.1 2001 options are defined and set to 200112L:\n\n      _POSIX_THREADS\n      _POSIX_THREAD_SAFE_FUNCTIONS\n      _POSIX_THREAD_ATTR_STACKSIZE\n      _POSIX_THREAD_PRIORITY_SCHEDULING\n      _POSIX_SEMAPHORES\n      _POSIX_READER_WRITER_LOCKS\n      _POSIX_SPIN_LOCKS\n      _POSIX_BARRIERS\n\n\nThe following POSIX 1003.1 2001 options are defined and set to -1:\n\n      _POSIX_THREAD_ATTR_STACKADDR\n      _POSIX_THREAD_PRIO_INHERIT\n      _POSIX_THREAD_PRIO_PROTECT\n      _POSIX_THREAD_PROCESS_SHARED\n\n\nThe following POSIX 1003.1 2001 limits are defined and set:\n\n      _POSIX_THREAD_THREADS_MAX\n      _POSIX_SEM_VALUE_MAX\n      _POSIX_SEM_NSEMS_MAX\n      _POSIX_THREAD_KEYS_MAX\n      _POSIX_THREAD_DESTRUCTOR_ITERATIONS\n      PTHREAD_STACK_MIN\n      PTHREAD_THREADS_MAX\n      SEM_VALUE_MAX\n      SEM_NSEMS_MAX\n      PTHREAD_KEYS_MAX\n      PTHREAD_DESTRUCTOR_ITERATIONS\n\n\nThe following functions are implemented:\n\n      ---------------------------\n      PThreads\n      ---------------------------\n      pthread_attr_init\n      pthread_attr_destroy\n      pthread_attr_getdetachstate\n      pthread_attr_getstackaddr\n      pthread_attr_getstacksize\n      pthread_attr_setdetachstate\n      pthread_attr_setstackaddr\n      pthread_attr_setstacksize\n\n      pthread_create\n      pthread_detach\n      pthread_equal\n      pthread_exit\n      pthread_join\n      pthread_once\n      pthread_self\n\n      pthread_cancel\n      pthread_cleanup_pop\n      pthread_cleanup_push\n      pthread_setcancelstate\n      pthread_setcanceltype\n      pthread_testcancel\n\n      ---------------------------\n      Thread Specific Data\n      ---------------------------\n      pthread_key_create\n      pthread_key_delete\n      pthread_setspecific\n      pthread_getspecific\n\n      ---------------------------\n      Mutexes\n      ---------------------------\n      pthread_mutexattr_init\n      pthread_mutexattr_destroy\n      pthread_mutexattr_getpshared\n      pthread_mutexattr_setpshared\n      pthread_mutexattr_gettype\n      pthread_mutexattr_settype (types: PTHREAD_MUTEX_DEFAULT\n\t\t\t\t\tPTHREAD_MUTEX_NORMAL\n\t\t\t\t\tPTHREAD_MUTEX_ERRORCHECK\n\t\t\t\t\tPTHREAD_MUTEX_RECURSIVE  )\n      pthread_mutex_init\n      pthread_mutex_destroy\n      pthread_mutex_lock\n      pthread_mutex_trylock\n      pthread_mutex_timedlock\n      pthread_mutex_unlock\n\n      ---------------------------\n      Condition Variables\n      ---------------------------\n      pthread_condattr_init\n      pthread_condattr_destroy\n      pthread_condattr_getpshared\n      pthread_condattr_setpshared\n\n      pthread_cond_init\n      pthread_cond_destroy\n      pthread_cond_wait\n      pthread_cond_timedwait\n      pthread_cond_signal\n      pthread_cond_broadcast\n\n      ---------------------------\n      Read/Write Locks\n      ---------------------------\n      pthread_rwlock_init\n      pthread_rwlock_destroy\n      pthread_rwlock_tryrdlock\n      pthread_rwlock_trywrlock\n      pthread_rwlock_rdlock\n      pthread_rwlock_timedrdlock\n      pthread_rwlock_rwlock\n      pthread_rwlock_timedwrlock\n      pthread_rwlock_unlock\n      pthread_rwlockattr_init\n      pthread_rwlockattr_destroy\n      pthread_rwlockattr_getpshared\n      pthread_rwlockattr_setpshared\n\n      ---------------------------\n      Spin Locks\n      ---------------------------\n      pthread_spin_init\n      pthread_spin_destroy\n      pthread_spin_lock\n      pthread_spin_unlock\n      pthread_spin_trylock\n\n      ---------------------------\n      Barriers\n      ---------------------------\n      pthread_barrier_init\n      pthread_barrier_destroy\n      pthread_barrier_wait\n      pthread_barrierattr_init\n      pthread_barrierattr_destroy\n      pthread_barrierattr_getpshared\n      pthread_barrierattr_setpshared\n\n      ---------------------------\n      Semaphores\n      ---------------------------\n      sem_init\n      sem_destroy\n      sem_post\n      sem_wait\n      sem_trywait\n      sem_timedwait\n      sem_getvalue\t     (# free if +ve, # of waiters if -ve)\n      sem_open\t\t     (returns an error ENOSYS)\n      sem_close \t     (returns an error ENOSYS)\n      sem_unlink\t     (returns an error ENOSYS)\n\n      ---------------------------\n      RealTime Scheduling\n      ---------------------------\n      pthread_attr_getschedparam\n      pthread_attr_setschedparam\n      pthread_attr_getinheritsched\n      pthread_attr_setinheritsched\n      pthread_attr_getschedpolicy (only supports SCHED_OTHER)\n      pthread_attr_setschedpolicy (only supports SCHED_OTHER)\n      pthread_getschedparam\n      pthread_setschedparam\n      pthread_getconcurrency\n      pthread_setconcurrency\n      pthread_attr_getscope\n      pthread_attr_setscope  (only supports PTHREAD_SCOPE_SYSTEM)\n      sched_get_priority_max\n      sched_get_priority_min\n      sched_rr_get_interval  (returns an error ENOTSUP)\n      sched_setscheduler     (only supports SCHED_OTHER)\n      sched_getscheduler     (only supports SCHED_OTHER)\n      sched_yield\n\n      ---------------------------\n      Signals\n      ---------------------------\n      pthread_sigmask\n      pthread_kill           (only supports zero sig value,\n                              for thread validity checking)\n\n      ---------------------------\n      Non-portable routines (see the README.NONPORTABLE file for usage)\n      ---------------------------\n      pthread_getw32threadhandle_np\n      pthread_timechange_handler_np\n      pthread_delay_np\n      pthread_mutexattr_getkind_np\n      pthread_mutexattr_setkind_np\t(types: PTHREAD_MUTEX_FAST_NP,\n\t\t\t\t\t\tPTHREAD_MUTEX_ERRORCHECK_NP,\n\t\t\t\t\t\tPTHREAD_MUTEX_RECURSIVE_NP,\n\t\t\t\t\t\tPTHREAD_MUTEX_ADAPTIVE_NP,\n\t\t\t\t\t\tPTHREAD_MUTEX_TIMED_NP)\n      pthread_num_processors_np\n      pthread_win32_process_attach_np\t(Required when statically linking\n                                         the library)\n      pthread_win32_process_detach_np\t(Required when statically linking\n                                         the library)\n      pthread_win32_thread_attach_np\t(Required when statically linking\n                                         the library)\n      pthread_win32_thread_detach_np\t(Required when statically linking\n                                         the library)\n\n      ---------------------------\n      Static Initializers\n      ---------------------------\n      PTHREAD_ONCE_INIT\n      PTHREAD_MUTEX_INITIALIZER\n      PTHREAD_RECURSIVE_MUTEX_INITIALIZER\n      PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP\n      PTHREAD_ERRORCHECK_MUTEX_INITIALIZER\n      PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP\n      PTHREAD_COND_INITIALIZER\n      PTHREAD_RWLOCK_INITIALIZER\n      PTHREAD_SPINLOCK_INITIALIZER\n\n      ---------------------------\n      Thread-Safe C Runtime Library (macros)\n      ---------------------------\n      strtok_r\n      asctime_r\n      ctime_r\n      gmtime_r\n      localtime_r\n      rand_r\n\n\nThe following functions are not implemented:\n      \n      ---------------------------\n      RealTime Scheduling\n      ---------------------------\n      pthread_mutex_getprioceiling\n      pthread_mutex_setprioceiling\n      pthread_mutex_attr_getprioceiling\n      pthread_mutex_attr_getprotocol\n      pthread_mutex_attr_setprioceiling\n      pthread_mutex_attr_setprotocol\n\n      ---------------------------\n      Fork Handlers\n      ---------------------------\n      pthread_atfork\n\n      ---------------------------\n      Stdio\n      --------------------------- \n      flockfile\n      ftrylockfile\n      funlockfile\n      getc_unlocked\n      getchar_unlocked\t\n      putc_unlocked\n      putchar_unlocked\n\n      ---------------------------\n      Thread-Safe C Runtime Library\n      ---------------------------\n      readdir_r\n      getgrgid_r\n      getgrnam_r\n      getpwuid_r\n      getpwnam_r\n      \n      ---------------------------\n      Signals\n      ---------------------------\n      sigtimedwait\n      sigwait\n      sigwaitinfo\n\n      ---------------------------\n      General\n      ---------------------------\n      sysconf      \n\nThe library includes two non-API functions for creating cancellation\npoints in applications and libraries:\n      \n      pthreadCancelableWait\n      pthreadCancelableTimedWait\n\n      \nAvailability\n------------ \n\nThe prebuilt DLL, export libs (for both MSVC and Mingw32), and the header\nfiles (pthread.h, semaphore.h, sched.h) are available along with the\ncomplete source code.\n\nThe source code can be found at:\n\n\tftp://sources.redhat.com/pub/pthreads-win32\n\nand as individual source code files at\n\n\tftp://sources.redhat.com/pub/pthreads-win32/source\n\nThe pre-built DLL, export libraries and include files can be found at:\n\n\tftp://sources.redhat.com/pub/pthreads-win32/dll-latest\n\n\n      \nMailing List \n------------  \n      \nThere is a mailing list for discussing pthreads on Win32. To join,\nsend email to:\n\n\tpthreads-win32-subscribe@sourceware.cygnus.com\n      \n\nApplication Development Environments\n------------------------------------\n\nSee the README file for more information.\n      \nMSVC:\nMSVC using SEH works. Distribute pthreadVSE.dll with your application.\nMSVC using C++ EH works. Distribute pthreadVCE.dll with your application.\nMSVC using C setjmp/longjmp works. Distribute pthreadVC.dll with your application.\n\n\nMingw32:\nSee the FAQ, Questions 6 and 10.\n\nMingw using C++ EH works. Distribute pthreadGCE.dll with your application.\nMingw using C setjmp/longjmp works. Distribute pthreadGC.dll with your application.\n\n\nCygwin: (http://sourceware.cygnus.com/cygwin/)\nDevelopers using Cygwin will not need pthreads-win32 since it has POSIX threads\nsupport. Refer to its documentation for details and extent.\n\n\nUWIN:\nUWIN is a complete Unix-like environment for Windows from AT&T. Pthreads-win32\ndoesn't currently support UWIN (and vice versa), but that may change in the\nfuture.\n\nGenerally:\nFor convenience, the following pre-built files are available on the FTP site\n(see Availability above):\n\n\tpthread.h\t- for POSIX 1c threads\n\tsemaphore.h\t- for POSIX 1b semaphores\n\tsched.h \t- for POSIX 1b scheduling\n\tpthreadVCE.dll\t- built with MSVC++ compiler using C++ EH\n\tpthreadVCE.lib\n\tpthreadVC.dll\t- built with MSVC compiler using C setjmp/longjmp\n\tpthreadVC.lib\n\tpthreadVSE.dll\t- built with MSVC compiler using SEH\n\tpthreadVSE.lib\n\tpthreadGCE.dll\t- built with Mingw32 G++ 2.95.2-1\n\tpthreadGC.dll\t- built with Mingw32 GCC 2.95.2-1 using setjmp/longjmp\n\tlibpthreadGCE.a - derived from pthreadGCE.dll\n\tlibpthreadGC.a\t- derived from pthreadGC.dll\n\tgcc.dll \t- needed if distributing applications that use\n\t\t\t  pthreadGCE.dll (but see the FAQ Q 10 for the latest\n\t\t\t  related information)\n\nThese are the only files you need in order to build POSIX threads\napplications for Win32 using either MSVC or Mingw32.\n\nSee the FAQ file in the source tree for additional information.\n\n\nDocumentation\n-------------\n\nFor the authoritative reference, see the online POSIX\nstandard reference at:\n\n       http://www.OpenGroup.org\n\nFor POSIX Thread API programming, several reference books are\navailable:\n\n       Programming with POSIX Threads\n       David R. Butenhof\n       Addison-Wesley (pub)\n\n       Pthreads Programming\n       By Bradford Nichols, Dick Buttlar & Jacqueline Proulx Farrell\n       O'Reilly (pub)\n\nOn the web: see the links at the bottom of the pthreads-win32 site:\n\n       http://sources.redhat.com/pthreads-win32/\n\n       Currently, there is no documentation included in the package apart\n       from the copious comments in the source code.\n\n\n\nEnjoy!\n\nRoss Johnson\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/BUGS",
    "content": "----------\nKnown bugs\n----------\n\n1. Not strictly a bug, more of a gotcha.\n\n   Under MS VC++ (only tested with version 6.0), a term_func\n   set via the standard C++ set_terminate() function causes the\n   application to abort.\n\n   Notes from the MSVC++ manual:\n         1) A term_func() should call exit(), otherwise\n            abort() will be called on return to the caller.\n            A call to abort() raises SIGABRT and the default signal handler\n            for all signals terminates the calling program with\n            exit code 3.\n         2) A term_func() must not throw an exception. Therefore\n            term_func() should not call pthread_exit(), which\n            works by throwing an exception (pthreadVCE or pthreadVSE)\n            or by calling longjmp (pthreadVC).\n\n   Workaround: avoid using pthread_exit() in C++ applications. Exit\n   threads by dropping through the end of the thread routine.\n\n2. Cancellation problems in optimised code\n   - Milan Gardian\n\n   This is suspected to be a compiler bug in VC6.0, and also seen in\n   VC7.0 and VS .NET 2003. The GNU C++ compiler does not have a problem\n   with this, and it has been reported that the Intel C++ 8.1 compiler\n   and Visual C++ 2005 Express Edition Beta2 pass tests\\semaphore4.c\n   (which exposes the bug).\n\n   Workaround [rpj - 2 Feb 2002]\n   -----------------------------\n   [Please note: this workaround did not solve a similar problem in\n   snapshot-2004-11-03 or later, even though similar symptoms were seen.\n   tests\\semaphore4.c fails in that snapshot for the VCE version of the\n   DLL.]\n\n   The problem disappears when /Ob0 is used, i.e. /O2 /Ob0 works OK,\n   but if you want to use inlining optimisation you can be much more\n   specific about where it's switched off and on by using a pragma.\n\n   So the inlining optimisation is interfering with the way that cleanup\n   handlers are run. It appears to relate to auto-inlining of class methods\n   since this is the only auto inlining that is performed at /O1 optimisation\n   (functions with the \"inline\" qualifier are also inlined, but the problem\n   doesn't appear to involve any such functions in the library or testsuite).\n\n   In order to confirm the inlining culprit, the following use of pragmas\n   eliminate the problem but I don't know how to make it transparent, putting\n   it in, say, pthread.h where pthread_cleanup_push defined as a macro.\n\n   #pragma inline_depth(0)\n     pthread_cleanup_push(handlerFunc, (void *) &arg);\n\n        /* ... */\n\n     pthread_cleanup_pop(0);\n   #pragma inline_depth()\n\n   Note the empty () pragma value after the pop macro. This resets depth to the\n   default. Or you can specify a non-zero depth here.\n\n   The pragma is also needed (and now used) within the library itself wherever\n   cleanup handlers are used (condvar.c and rwlock.c).\n\n   Use of these pragmas allows compiler optimisations /O1 and /O2 to be\n   used for either or both the library and applications.\n\n   Experimenting further, I found that wrapping the actual cleanup handler\n   function with #pragma auto_inline(off|on) does NOT work.\n\n   MSVC6.0 doesn't appear to support the C99 standard's _Pragma directive,\n   however, later versions may. This form is embeddable inside #define\n   macros, which would be ideal because it would mean that it could be added\n   to the push/pop macro definitions in pthread.h and hidden from the\n   application programmer.\n\n   [/rpj]\n\n   Original problem description\n   ----------------------------\n\n   The cancellation (actually, cleanup-after-cancel) tests fail when using VC\n   (professional) optimisation switches (/O1 or /O2) in pthreads library. I\n   have not investigated which concrete optimisation technique causes this\n   problem (/Og, /Oi, /Ot, /Oy, /Ob1, /Gs, /Gf, /Gy, etc.), but here is a\n   summary of builds and corresponding failures:\n\n     * pthreads VSE (optimised tests): OK\n     * pthreads VCE (optimised tests): Failed \"cleanup1\" test (runtime)\n\n     * pthreads VSE (DLL in CRT, optimised tests): OK\n     * pthreads VCE (DLL in CRT, optimised tests): Failed \"cleanup1\" test\n   (runtime)\n\n   Please note that while in VSE version of the pthreads library the\n   optimisation does not really have any impact on the tests (they pass OK), in\n   VCE version addition of optimisation (/O2 in this case) causes the tests to\n   fail uniformly - either in \"cleanup0\" or \"cleanup1\" test cases.\n\n   Please note that all the tests above use default pthreads DLL (no\n   optimisations, linked with either static or DLL CRT, based on test type).\n   Therefore the problem lies not within the pthreads DLL but within the\n   compiled client code (the application using pthreads -> involvement of\n   \"pthread.h\").\n\n   I think the message of this section is that usage of VCE version of pthreads\n   in applications relying on cancellation/cleanup AND using optimisations for\n   creation of production code is highly unreliable for the current version of\n   the pthreads library.\n\n3. The Borland Builder 5.5 version of the library produces memory read exceptions\nin some tests.\n\n4. pthread_barrier_wait() can deadlock if the number of potential calling\nthreads for a particular barrier is greater than the barrier count parameter\ngiven to pthread_barrier_init() for that barrier.\n\nThis is due to the very lightweight implementation of pthread-win32 barriers.\nTo cope with more than \"count\" possible waiters, barriers must effectively\nimplement all the same safeguards as condition variables, making them much\n\"heavier\" than at present.\n\nThe workaround is to ensure that no more than \"count\" threads attempt to wait\nat the barrier.\n\n5. Canceling a thread blocked on pthread_once appears not to work in the MSVC++\nversion of the library \"pthreadVCE.dll\". The test case \"once3.c\" hangs. I have no\nclues on this at present. All other versions pass this test ok - pthreadsVC.dll,\npthreadsVSE.dll, pthreadsGC.dll and pthreadsGCE.dll. \n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/Bmakefile",
    "content": "# This makefile is compatible with BCB make.  Use \"make -fBMakefile\" to compile.\n# \n# The variables $DLLDEST and $LIBDEST hold the destination directories for the\n# dll and the lib, respectively. Probably all that needs to change is $DEVROOT.\n#\n# Currently only the recommended pthreadBC.dll is built by this makefile.\n#\n\n\nDLL_VER\t= 2\n\nDEVROOT\t= .\n\nDLLDEST\t= $(DEVROOT)\\DLL\nLIBDEST\t= $(DEVROOT)\\DLL\n\nDLLS\t= pthreadBC$(DLL_VER).dll\n\nOPTIM\t= /O2\n\nRC\t= brcc32\nRCFLAGS\t= -i.\n\nCFLAGS\t= /q /I. /D_WIN32_WINNT=0x400 /DHAVE_CONFIG_H=1 /4 /tWD /tWM \\\n\t  /w-aus /w-asc /w-par\n\n#C cleanup code\nBCFLAGS\t= $(PTW32_FLAGS) $(CFLAGS)\n\n# Agregate modules for inlinability\nDLL_OBJS\t= \\\n\t\tattr.obj \\\n\t\tbarrier.obj \\\n\t\tcancel.obj \\\n\t\tcleanup.obj \\\n\t\tcondvar.obj \\\n\t\tcreate.obj \\\n\t\tdll.obj \\\n\t\terrno.obj \\\n\t\texit.obj \\\n\t\tfork.obj \\\n\t\tglobal.obj \\\n\t\tmisc.obj \\\n\t\tmutex.obj \\\n\t\tnonportable.obj \\\n\t\tprivate.obj \\\n\t\trwlock.obj \\\n\t\tsched.obj \\\n\t\tsemaphore.obj \\\n\t\tsignal.obj \\\n\t\tspin.obj \\\n\t\tsync.obj \\\n\t\ttsd.obj\n\nINCL\t= config.h implement.h semaphore.h pthread.h need_errno.h\n\nATTR_SRCS\t= \\\n\t\tpthread_attr_init.c \\\n\t\tpthread_attr_destroy.c \\\n\t\tpthread_attr_getdetachstate.c \\\n\t\tpthread_attr_setdetachstate.c \\\n\t\tpthread_attr_getstackaddr.c \\\n\t\tpthread_attr_setstackaddr.c \\\n\t\tpthread_attr_getstacksize.c \\\n\t\tpthread_attr_setstacksize.c \\\n\t\tpthread_attr_getscope.c \\\n\t\tpthread_attr_setscope.c\n\nBARRIER_SRCS = \\\n\t\tpthread_barrier_init.c \\\n\t\tpthread_barrier_destroy.c \\\n\t\tpthread_barrier_wait.c \\\n\t\tpthread_barrierattr_init.c \\\n\t\tpthread_barrierattr_destroy.c \\\n\t\tpthread_barrierattr_setpshared.c \\\n\t\tpthread_barrierattr_getpshared.c\n\nCANCEL_SRCS\t= \\\n\t\tpthread_setcancelstate.c \\\n\t\tpthread_setcanceltype.c \\\n\t\tpthread_testcancel.c \\\n\t\tpthread_cancel.c \n\nCONDVAR_SRCS\t= \\\n\t\tptw32_cond_check_need_init.c \\\n\t\tpthread_condattr_destroy.c \\\n\t\tpthread_condattr_getpshared.c \\\n\t\tpthread_condattr_init.c \\\n\t\tpthread_condattr_setpshared.c \\\n\t\tpthread_cond_destroy.c \\\n\t\tpthread_cond_init.c \\\n\t\tpthread_cond_signal.c \\\n\t\tpthread_cond_wait.c\n\nEXIT_SRCS\t= \\\n\t\tpthread_exit.c\n\nMISC_SRCS\t= \\\n\t\tpthread_equal.c \\\n\t\tpthread_getconcurrency.c \\\n\t\tpthread_once.c \\\n\t\tpthread_self.c \\\n\t\tpthread_setconcurrency.c \\\n\t\tptw32_calloc.c \\\n\t\tptw32_MCS_lock.c \\\n\t\tptw32_new.c \\\n\t\tw32_CancelableWait.c\n\nMUTEX_SRCS\t= \\\n\t\tptw32_mutex_check_need_init.c \\\n\t\tpthread_mutex_init.c \\\n\t\tpthread_mutex_destroy.c \\\n\t\tpthread_mutexattr_init.c \\\n\t\tpthread_mutexattr_destroy.c \\\n\t\tpthread_mutexattr_getpshared.c \\\n\t\tpthread_mutexattr_setpshared.c \\\n\t\tpthread_mutexattr_settype.c \\\n\t\tpthread_mutexattr_gettype.c \\\n\t\tpthread_mutex_lock.c \\\n\t\tpthread_mutex_timedlock.c \\\n\t\tpthread_mutex_unlock.c \\\n\t\tpthread_mutex_trylock.c\n\nNONPORTABLE_SRCS = \\\n\t\tpthread_mutexattr_setkind_np.c \\\n\t\tpthread_mutexattr_getkind_np.c \\\n\t\tpthread_getw32threadhandle_np.c \\\n\t\tpthread_delay_np.c \\\n\t\tpthread_num_processors_np.c \\\n\t\tpthread_win32_attach_detach_np.c \\\n\t\tpthread_timechange_handler_np.c \n\nPRIVATE_SRCS\t= \\\n\t\tptw32_is_attr.c \\\n\t\tptw32_processInitialize.c \\\n\t\tptw32_processTerminate.c \\\n\t\tptw32_threadStart.c \\\n\t\tptw32_threadDestroy.c \\\n\t\tptw32_tkAssocCreate.c \\\n\t\tptw32_tkAssocDestroy.c \\\n\t\tptw32_callUserDestroyRoutines.c \\\n\t\tptw32_timespec.c \\\n\t\tptw32_relmillisecs.c \\\n\t\tptw32_throw.c \\\n\t\tptw32_InterlockedCompareExchange.c \\\n\t\tptw32_getprocessors.c\n\nRWLOCK_SRCS\t= \\\n\t\tptw32_rwlock_check_need_init.c \\\n\t\tptw32_rwlock_cancelwrwait.c \\\n\t\tpthread_rwlock_init.c \\\n\t\tpthread_rwlock_destroy.c \\\n\t\tpthread_rwlockattr_init.c \\\n\t\tpthread_rwlockattr_destroy.c \\\n\t\tpthread_rwlockattr_getpshared.c \\\n\t\tpthread_rwlockattr_setpshared.c \\\n\t\tpthread_rwlock_rdlock.c \\\n\t\tpthread_rwlock_timedrdlock.c \\\n\t\tpthread_rwlock_wrlock.c \\\n\t\tpthread_rwlock_timedwrlock.c \\\n\t\tpthread_rwlock_unlock.c \\\n\t\tpthread_rwlock_tryrdlock.c \\\n\t\tpthread_rwlock_trywrlock.c\n\nSCHED_SRCS\t= \\\n\t\tpthread_attr_setschedpolicy.c \\\n\t\tpthread_attr_getschedpolicy.c \\\n\t\tpthread_attr_setschedparam.c \\\n\t\tpthread_attr_getschedparam.c \\\n\t\tpthread_attr_setinheritsched.c \\\n\t\tpthread_attr_getinheritsched.c \\\n\t\tpthread_setschedparam.c \\\n\t\tpthread_getschedparam.c \\\n\t\tsched_get_priority_max.c \\\n\t\tsched_get_priority_min.c \\\n\t\tsched_setscheduler.c \\\n\t\tsched_getscheduler.c \\\n\t\tsched_yield.c\n\nSEMAPHORE_SRCS = \\\n\t\tsem_init.c \\\n\t\tsem_destroy.c \\\n\t\tsem_trywait.c \\\n\t\tsem_timedwait.c \\\n\t\tsem_wait.c \\\n\t\tsem_post.c \\\n\t\tsem_post_multiple.c \\\n\t\tsem_getvalue.c \\\n\t\tsem_open.c \\\n\t\tsem_close.c \\\n\t\tsem_unlink.c\n\nSPIN_SRCS\t= \\\n\t\tptw32_spinlock_check_need_init.c \\\n\t\tpthread_spin_init.c \\\n\t\tpthread_spin_destroy.c \\\n\t\tpthread_spin_lock.c \\\n\t\tpthread_spin_unlock.c \\\n\t\tpthread_spin_trylock.c\n\nSYNC_SRCS\t= \\\n\t\tpthread_detach.c \\\n\t\tpthread_join.c\n\nTSD_SRCS\t= \\\n\t\tpthread_key_create.c \\\n\t\tpthread_key_delete.c \\\n\t\tpthread_setspecific.c \\\n\t\tpthread_getspecific.c\n\n\nall: clean $(DLLS)\n\nrealclean: clean\n\tif exist pthread*.dll del pthread*.dll\n\tif exist pthread*.lib del pthread*.lib\n\tif exist *.stamp del *.stamp\n\nclean:\n\tif exist *.obj del *.obj\n\tif exist *.ilk del *.ilk\n\tif exist *.ilc del *.ilc\n\tif exist *.ild del *.ild\n\tif exist *.ilf del *.ilf\n\tif exist *.ils del *.ils\n\tif exist *.tds del *.tds\n\tif exist *.pdb del *.pdb\n\tif exist *.exp del *.exp\n\tif exist *.map del *.map\n\tif exist *.o del *.o\n\tif exist *.i del *.i\n\tif exist *.res del *.res\n\n\ninstall: $(DLLS)\n\tcopy pthread*.dll $(DLLDEST)\n\tcopy pthread*.lib $(LIBDEST)\n\n$(DLLS): $(DLL_OBJS) version.res\n\tilink32 /Tpd /Gi c0d32x.obj $(DLL_OBJS), \\\n\t\t$@, ,\\\n\t\tcw32mti.lib import32.lib, ,\\\n\t\tversion.res\n\n.c.obj:\n\t$(CC) $(OPTIM) $(BCFLAGS) -c $<\n\n.rc.res:\n\t$(RC) $(RCFLAGS) $<\n\nattr.obj:\tattr.c $(ATTR_SRCS) $(INCL)\nbarrier.obj:\tbarrier.c $(BARRIER_SRCS) $(INCL)\ncancel.obj:\tcancel.c $(CANCEL_SRCS) $(INCL)\ncondvar.obj:\tcondvar.c $(CONDVAR_SRCS) $(INCL)\nexit.obj:\texit.c $(EXIT_SRCS) $(INCL)\nmisc.obj:\tmisc.c $(MISC_SRCS) $(INCL)\nmutex.obj:\tmutex.c $(MUTEX_SRCS) $(INCL)\nnonportable.obj:\tnonportable.c $(NONPORTABLE_SRCS) $(INCL)\nprivate.obj:\tprivate.c $(PRIVATE_SRCS) $(INCL)\nrwlock.obj:\trwlock.c $(RWLOCK_SRCS) $(INCL)\nsched.obj:\tsched.c $(SCHED_SRCS) $(INCL)\nsemaphore.obj:\tsemaphore.c $(SEMAPHORE_SRCS) $(INCL)\nspin.obj:\tspin.c $(SPIN_SRCS) $(INCL)\nsync.obj:\tsync.c $(SYNC_SRCS) $(INCL)\ntsd.obj:\ttsd.c $(TSD_SRCS) $(INCL)\nversion.res:\tversion.rc $(INCL)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/CONTRIBUTORS",
    "content": "Contributors (in approximate order of appearance)\n\n[See also the ChangeLog file where individuals are\nattributed in log entries. Likewise in the FAQ file.]\n\nBen Elliston\t\tbje at cygnus dot com\n\t\t\t\t\tInitiated the project;\n\t\t\t\t\tsetup the project infrastructure (CVS, web page, etc.);\n\t\t\t\t\tearly prototype routines.\nRoss Johnson\t\trpj at callisto dot canberra dot edu dot au\n\t\t\t\t\tearly prototype routines;\n\t\t\t\t\tongoing project coordination/maintenance;\n\t\t\t\t\timplementation of spin locks and barriers;\n\t\t\t\t\tvarious enhancements;\n\t\t\t\t\tbug fixes;\n\t\t\t\t\tdocumentation;\n\t\t\t\t\ttestsuite.\nRobert Colquhoun\trjc at trump dot net dot au\n\t\t\t\t\tEarly bug fixes.\nJohn E. Bossom\t\tJohn dot Bossom at cognos dot com\n\t\t\t\t\tContributed substantial original working implementation;\n\t\t\t\t\tbug fixes;\n\t\t\t\t\tongoing guidance and standards interpretation.\nAnders Norlander\tanorland at hem2 dot passagen dot se\n\t\t\t\t\tEarly enhancements and runtime checking for supported\n\t\t\t\t\tWin32 routines.\nTor Lillqvist\t\ttml at iki dot fi\n\t\t\t\t\tGeneral enhancements;\n\t\t\t\t\tearly bug fixes to condition variables.\nScott Lightner\t\tscott at curriculum dot com\n\t\t\t\t\tBug fix.\nKevin Ruland\t\tKevin dot Ruland at anheuser-busch dot com\n\t\t\t\t\tVarious bug fixes.\nMike Russo\t\tmiker at eai dot com\n\t\t\t\t\tBug fix.\nMark E. Armstrong\tavail at pacbell dot net\n\t\t\t\t\tBug fixes.\nLorin Hochstein \tlmh at xiphos dot ca\n\t\t\t\t\tgeneral bug fixes; bug fixes to condition variables.\nPeter Slacik\t\tPeter dot Slacik at tatramed dot sk\n\t\t\t\t\tBug fixes.\nMumit Khan\t\tkhan at xraylith dot wisc dot edu\n\t\t\t\t\tFixes to work with Mingw32.\nMilan Gardian\t\tmg at tatramed dot sk\n\t\t\t\t\tBug fixes and reports/analyses of obscure problems.\nAurelio Medina\t\taureliom at crt dot com\n\t\t\t\t\tFirst implementation of read-write locks.\nGraham Dumpleton\tGraham dot Dumpleton at ra dot pad dot otc dot telstra dot com dot au\n\t\t\t\t\tBug fix in condition variables.\nTristan Savatier\ttristan at mpegtv dot com\n\t\t\t\t\tWinCE port.\nErik Hensema\t\terik at hensema dot xs4all dot nl\n\t\t\t\t\tBug fixes.\nRich Peters\t\trpeters at micro-magic dot com\nTodd Owen\t\ttowen at lucidcalm dot dropbear dot id dot au\n\t\t\t\t\tBug fixes to dll loading.\nJason Nye\t\tjnye at nbnet dot nb dot ca\n\t\t\t\t\tImplementation of async cancelation.\nFred Forester\t\tfforest at eticomm dot net\nKevin D. Clark\t\tkclark at cabletron dot com\nDavid Baggett\t\tdmb at itasoftware dot com\n\t\t\t\t\tBug fixes.\nPaul Redondo\t\tpaul at matchvision dot com\nScott McCaskill \tscott at 3dfx dot com\n\t\t\t\t\tBug fixes.\nJef Gearhart\t\tjgearhart at tpssys dot com\n\t\t\t\t\tBug fix.\nArthur Kantor\t\takantor at bexusa dot com\n\t\t\t\t\tMutex enhancements.\nSteven Reddie\t\tsmr at essemer dot com dot au\n\t\t\t\t\tBug fix.\nAlexander Terekhov\tTEREKHOV at de dot ibm dot com\n\t\t\t\t\tRe-implemented and improved read-write locks;\n\t\t\t\t\t(with Louis Thomas) re-implemented and improved\n\t\t\t\t\tcondition variables;\n\t\t\t\t\tenhancements to semaphores;\n\t\t\t\t\tenhancements to mutexes;\n\t\t\t\t\tnew mutex implementation in 'futex' style;\n\t\t\t\t\tsuggested a robust implementation of pthread_once\n\t\t\t\t\tsimilar to that implemented by V.Kliathcko;\n\t\t\t\t\tsystem clock change handling re CV timeouts;\n\t\t\t\t\tbug fixes.\nThomas Pfaff\t\ttpfaff at gmx dot net\n\t\t\t\t\tChanges to make C version usable with C++ applications;\n\t\t\t\t\tre-implemented mutex routines to avoid Win32 mutexes\n\t\t\t\t\tand TryEnterCriticalSection;\n\t\t\t\t\tprocedure to fix Mingw32 thread-safety issues.\nFranco Bez\t\tfranco dot bez at gmx dot de\n\t\t\t\t\tprocedure to fix Mingw32 thread-safety issues.\nLouis Thomas\t\tlthomas at arbitrade dot com\n\t\t\t\t\t(with Alexander Terekhov) re-implemented and improved\n\t\t\t\t\tcondition variables.\nDavid Korn\t\tdgk at research dot att dot com\n\t\t\t\t\tPorted to UWIN.\nPhil Frisbie, Jr.\tphil at hawksoft dot com\n\t\t\t\t\tBug fix.\nRalf Brese\t\tRalf dot Brese at pdb4 dot siemens dot de\n\t\t\t\t\tBug fix.\nprionx at juno dot com \tprionx at juno dot com\n\t\t\t\t\tBug fixes.\nMax Woodbury\t\tmtew at cds dot duke dot edu\n\t\t\t\t\tPOSIX versioning conditionals;\n\t\t\t\t\treduced namespace pollution;\n\t\t\t\t\tidea to separate routines to reduce statically\n\t\t\t\t\tlinked image sizes.\nRob Fanner\t\trfanner at stonethree dot com\n\t\t\t\t\tBug fix.\nMichael Johnson \tmichaelj at maine dot rr dot com\n\t\t\t\t\tBug fix.\nNicolas Barry\t\tboozai at yahoo dot com\n\t\t\t\t\tBug fixes.\nPiet van Bruggen\tpietvb at newbridges dot nl\n\t\t\t\t\tBug fix.\nMakoto Kato\t\traven at oldskool dot jp\n\t\t\t\t\tAMD64 port.\nPanagiotis E. Hadjidoukas\tpeh at hpclab dot ceid dot upatras dot gr\n\t\t\t\t\tContributed the QueueUserAPCEx package which\n\t\t\t\t\tmakes preemptive async cancelation possible.\nWill Bryant\t\twill dot bryant at ecosm dot com\n\t\t\t\t\tBorland compiler patch and makefile.\nAnuj Goyal\t\tanuj dot goyal at gmail dot com\n\t\t\t\t\tPort to Digital Mars compiler.\nGottlob Frege\t\tgottlobfrege at  gmail dot com\n\t\t\t\t\tre-implemented pthread_once (version 2)\n\t\t\t\t\t(pthread_once cancellation added by rpj).\nVladimir Kliatchko\tvladimir at kliatchko dot com\n\t\t\t\t\treimplemented pthread_once with the same form\n\t\t\t\t\tas described by A.Terekhov (later version 2);\n\t\t\t\t\timplementation of MCS (Mellor-Crummey/Scott) locks.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/COPYING",
    "content": "\tpthreads-win32 - a POSIX threads library for Microsoft Windows\n\n\nThis file is Copyrighted\n------------------------\n\n    This file is covered under the following Copyright:\n\n\tCopyright (C) 2001,2006 Ross P. Johnson\n\tAll rights reserved.\n\n\tEveryone is permitted to copy and distribute verbatim copies\n\tof this license document, but changing it is not allowed.\n\nPthreads-win32 is covered by the GNU Lesser General Public License\n------------------------------------------------------------------\n\n    Pthreads-win32 is open software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public License\n    as published by the Free Software Foundation version 2.1 of the\n    License.\n\n    Pthreads-win32 is several binary link libraries, several modules,\n    associated interface definition files and scripts used to control\n    its compilation and installation.\n\n    Pthreads-win32 is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU Lesser General Public License for more details.\n\n    A copy of the GNU Lesser General Public License is distributed with\n    pthreads-win32 under the filename:\n\n\t    COPYING.LIB\n\n    You should have received a copy of the version 2.1 GNU Lesser General\n    Public License with pthreads-win32; if not, write to:\n\n\t    Free Software Foundation, Inc.\n\t    59 Temple Place\n\t    Suite 330\n\t    Boston, MA\t02111-1307\n\t    USA\n\n    The contact addresses for pthreads-win32 is as follows:\n\n        Web:\thttp://sources.redhat.com/pthreads-win32\n        Email:  Ross Johnson\n                Please use: Firstname.Lastname@homemail.com.au\n\n\n\nPthreads-win32 copyrights and exception files\n---------------------------------------------\n\n    With the exception of the files listed below, Pthreads-win32\n    is covered under the following GNU Lesser General Public License\n    Copyrights:\n\n\tPthreads-win32 - POSIX Threads Library for Win32\n\tCopyright(C) 1998 John E. Bossom\n\tCopyright(C) 1999,2006 Pthreads-win32 contributors\n\n\tThe current list of contributors is contained\n        in the file CONTRIBUTORS included with the source\n\tcode distribution. The current list of CONTRIBUTORS\n\tcan also be seen at the following WWW location:\n        http://sources.redhat.com/pthreads-win32/contributors.html\n\n    Contact Email: Ross Johnson\n                   Please use: Firstname.Lastname@homemail.com.au\n\n    These files are not covered under one of the Copyrights listed above:\n\n            COPYING\n\t    COPYING.LIB\n            tests/rwlock7.c\n\n    This file, COPYING, is distributed under the Copyright found at the\n    top of this file.  It is important to note that you may distribute\n    verbatim copies of this file but you may not modify this file.\n\n    The file COPYING.LIB, which contains a copy of the version 2.1\n    GNU Lesser General Public License, is itself copyrighted by the\n    Free Software Foundation, Inc.  Please note that the Free Software\n    Foundation, Inc. does NOT have a copyright over Pthreads-win32,\n    only the COPYING.LIB that is supplied with pthreads-win32.\n\n    The file tests/rwlock7.c is derived from code written by\n    Dave Butenhof for his book 'Programming With POSIX(R) Threads'.\n    The original code was obtained by free download from his website\n    http://home.earthlink.net/~anneart/family/Threads/source.html\n    and did not contain a copyright or author notice. It is assumed to\n    be freely distributable.\n\n    In all cases one may use and distribute these exception files freely.\n    And because one may freely distribute the LGPL covered files, the\n    entire pthreads-win32 source may be freely used and distributed.\n\n\n\nGeneral Copyleft and License info\n---------------------------------\n\n    For general information on Copylefts, see:\n\n\thttp://www.gnu.org/copyleft/\n\n    For information on GNU Lesser General Public Licenses, see:\n\n\thttp://www.gnu.org/copyleft/lesser.html\n\thttp://www.gnu.org/copyleft/lesser.txt\n\n\nWhy pthreads-win32 did not use the GNU General Public License\n-------------------------------------------------------------\n\n    The goal of the pthreads-win32 project has been to\n    provide a quality and complete implementation of the POSIX\n    threads API for Microsoft Windows within the limits imposed\n    by virtue of it being a stand-alone library and not\n    linked directly to other POSIX compliant libraries. For\n    example, some functions and features, such as those based\n    on POSIX signals, are missing.\n\n    Pthreads-win32 is a library, available in several different\n    versions depending on supported compilers, and may be used\n    as a dynamically linked module or a statically linked set of\n    binary modules. It is not an application on it's own.\n\n    It was fully intended that pthreads-win32 be usable with\n    commercial software not covered by either the GPL or the LGPL\n    licenses. Pthreads-win32 has many contributors to it's\n    code base, many of whom have done so because they have\n    used the library in commercial or proprietry software\n    projects.\n\n    Releasing pthreads-win32 under the LGPL ensures that the\n    library can be used widely, while at the same time ensures\n    that bug fixes and improvements to the pthreads-win32 code\n    itself is returned to benefit all current and future users\n    of the library.\n\n    Although pthreads-win32 makes it possible for applications\n    that use POSIX threads to be ported to Win32 platforms, the\n    broader goal of the project is to encourage the use of open\n    standards, and in particular, to make it just a little easier\n    for developers writing Win32 applications to consider\n    widening the potential market for their products.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ChangeLog",
    "content": "2006-12-20  Ross Johnson <ross.johnson@homemail.com.au>\n\n        * sem_destroy.c: Fix the race involving invalidation of the sema;\n        fix incorrect return of EBUSY resulting from the mutex trylock\n        on the private mutex guard.\n        * sem_wait.c: Add check for invalid sem_t after acquiring the\n        sem_t state guard mutex and before affecting changes to sema state.\n        * sem_trywait.c: Likewise.\n        * sem_timedwait.c: Likewise.\n        * sem_getvalue.c: Likewise.\n        * sem_post.c: Similar.\n        * sem_post_multiple.c: Likewise.\n        * sem_init.c: Set max Win32 semaphore count to SEM_VALUE_MAX (was\n        _POSIX_SEM_VALUE_MAX, which is a lower value - the minimum).\n\n\t* pthread_win32_attach_detach_np.c (pthread_win32_process_attach_np):\n\tLoad COREDLL.DLL under WINCE to check existence of\n\tInterlockedCompareExchange() routine. This used to be done to test\n\tfor TryEnterCriticalSection() but was removed when this was no\n\tlonger needed.\n\n2006-01-25  Prashant Thakre <prashant.thakre at gmail.com>\n\n\t* pthread_cancel.c: Added _M_IA64 register context support.\n\n2005-05-13  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* pthread_kill.c (pthread_kill): Remove check for Win32 thread\n\tpriority (to confirm HANDLE validity). Useless since thread HANDLEs\n\ta not recycle-unique.\n\n2005-05-30  Vladimir Kliatchko  <vladimir at kliatchko.com>\n\n\t* pthread_once.c: Re-implement using an MCS queue-based lock. The form\n\tof pthread_once is as proposed by Alexander Terekhov (see entry of\n\t2005-03-13). The MCS lock implementation does not require a unique\n\t'name' to identify the lock between threads. Attempts to get the Event\n\tor Semaphore based versions of pthread_once to a satisfactory level\n\tof robustness have thus far failed. The last problem (avoiding races\n\tinvolving non recycle-unique Win32 HANDLEs) was giving everyone\n\tgrey hair trying to solve it.\n\n\t* ptw32_MCS_lock.c: New MCS queue-based lock implementation. These\n\tlocks are efficient: they have very low overhead in the uncontended case;\n\tare efficient in contention and minimise cache-coherence updates in\n\tmanaging the user level FIFO queue; do not require an ABI change in the\n\tlibrary.\n\n2005-05-27  Alexander Gottwald <alexander.gottwald at s1999.tu-chemnitz.de>\n\n\t* pthread.h: Some things, like HANDLE, were only defined if\n\tPTW32_LEVEL was >= 3. They should always be defined.\n\n2005-05-25  Vladimir Kliatchko  <vladimir at kliatchko.com>\n\n\t* pthread_once.c: Eliminate all priority operations and other\n\tcomplexity by replacing the event with a semaphore. The advantage\n\tof the change is the ability to release just one waiter if the\n\tinit_routine thread is cancelled yet still release all waiters when\n\tdone. Simplify once_control state checks to improve efficiency\n\tfurther.\n\n2005-05-24  Mikael Magnusson  <mikaelmagnusson at glocalnet.net>\n\n\t* GNUmakefile: Patched to allow cross-compile with mingw32 on Linux.\n\tIt uses macros instead of referencing dlltool, gcc and g++ directly;\n\tadded a call to ranlib. For example the GC static library can be\n\tbuilt with:\n\tmake CC=i586-mingw32msvc-gcc RC=i586-mingw32msvc-windres \\\n\tRANLIB=i586-mingw32msvc-ranlib clean GC-static\n\n2005-05-13  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* pthread_win32_attach_detach_np.c (pthread_win32_thread_detach_np):\n\tMove on-exit-only stuff from ptw32_threadDestroy() to here.\n\t* ptw32_threadDestroy.c: It's purpose is now only to reclaim thread\n\tresources for detached threads, or via pthread_join() or\n\tpthread_detach() on joinable threads.\n\t* ptw32_threadStart.c: Calling user destruct routines has moved to\n\tpthread_win32_thread_detach_np(); call pthread_win32_thread_detach_np()\n\tdirectly if statically linking, otherwise do so via dllMain; store\n\tthread return value in thread struct for all cases, including\n\tcancellation and exception exits; thread abnormal exits\tgo via\n\tpthread_win32_thread_detach_np.\n\t* pthread_join.c (pthread_join): Don't try to get return code from\n\tWin32 thread - always get it from he thread struct.\n\t* pthread_detach.c (pthread_detach): reduce extent of the thread\n\texistence check since we now don't care if the Win32 thread HANDLE has\n\tbeen closed; reclaim thread resources if the thread has exited already.\n\t* ptw32_throw.c (ptw32_throw): For Win32 threads that are not implicit,\n\tonly Call thread cleanup if statically linking, otherwise leave it to\n\tdllMain.\n\t* sem_post.c (_POSIX_SEM_VALUE_MAX): Change to SEM_VALUE_MAX.\n\t* sem_post_multiple.c: Likewise.\n\t* sem_init.c: Likewise.\n\n2005-05-10  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* pthread_join.c (pthread_join): Add missing check for thread ID\n\treference count in thread existence test; reduce extent of the\n\texistence test since we don't care if the Win32 thread HANDLE has\n\tbeen closed.\n\n2005-05-09  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* ptw32_callUserDestroyRoutines.c: Run destructor process (i.e.\n\tloop over all keys calling destructors) up to\n\tPTHREAD_DESTRUCTOR_ITERATIONS times if TSD value isn't NULL yet;\n\tmodify assoc management.\n\t* pthread_key_delete.c: Modify assoc management.\n\t* ptw32_tkAssocDestroy.c: Fix error in assoc removal from chains.\n\t* pthread.h\n\t(_POSIX_THREAD_DESTRUCTOR_ITERATIONS): Define to value specified by\n\tPOSIX.\n\t(_POSIX_THREAD_KEYS_MAX): Define to value specified by POSIX.\n\t(PTHREAD_KEYS_MAX): Redefine [upward] to minimum required by POSIX.\n\t(SEM_NSEMS_MAX): Define to implementation value.\n\t(SEM_VALUE_MAX): Define to implementation value.\n\t(_POSIX_SEM_NSEMS_MAX): Redefine to value specified by POSIX.\n\t(_POSIX_SEM_VALUE_MAX): Redefine to value specified by POSIX.\n\n2005-05-06  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* signal.c (sigwait): Add a cancellation point to this otherwise\n\tno-op.\n\t* sem_init.c (sem_init): Check for and return ERANGE error.\n\t* sem_post.c (sem_post): Likewise.\n\t* sem_post_multiple.c (sem_post_multiple): Likewise.\n\t* manual (directory): Added; see ChangeLog inside.\n\n2005-05-02  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* implement.h (struct pthread_key_t_): Change threadsLock to keyLock\n\tso as not to be confused with the per thread lock 'threadlock';\n\tchange all references to it.\n\t* implement.h (struct ThreadKeyAssoc): Remove lock; add prevKey\n\tand prevThread pointers; re-implemented all routines that use this\n\tstruct. The effect of this is to save one handle per association,\n\twhich could potentially equal the number of keys multiplied by the\n\tnumber of threads, accumulating over time - and to free the\n\tassociation memory as soon as it is no longer referenced by either\n\tthe key or the thread. Previously, the handle and memory were\n\treleased only after BOTH key and thread no longer referenced the\n\tassociation. That is, often no association resources were released\n\tuntil the process itself exited. In addition, at least one race\n\tcondition has been removed - where two threads could attempt to\n\trelease the association resources simultaneously - one via\n\tptw32_callUserDestroyRoutines and the other via\n\tpthread_key_delete.\n\t- thanks to Richard Hughes at Aculab for discovering the problem.\n\t* pthread_key_create.c: See above.\n\t* pthread_key_delete.c: See above.\n\t* pthread_setspecific.c: See above.\n\t* ptw32_callUserDestroyRoutines.c: See above.\n\t* ptw32_tkAssocCreate.c: See above.\n\t* ptw32_tkAssocDestroy.c: See above.\n\n2005-04-27  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* sem_wait.c (ptw32_sem_wait_cleanup): after cancellation re-attempt\n\tto acquire the semaphore to avoid a race with a late sem_post.\n\t* sem_timedwait.c: Modify comments.\n\n2005-04-25  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* ptw32_relmillisecs.c: New module; converts future abstime to \n\tmilliseconds relative to 'now'.\n\t* pthread_mutex_timedlock.c: Use new ptw32_relmillisecs routine in\n\tplace of internal code; remove the NEED_SEM code - this routine is now\n\timplemented for builds that define NEED_SEM (WinCE etc)\n\t* sem_timedwait.c: Likewise; after timeout or cancellation,\n\tre-attempt to acquire the semaphore in case one has been posted since\n\tthe timeout/cancel occurred. Thanks to Stefan Mueller.\n\t* Makefile: Add ptw32_relmillisecs.c module; remove\n\tptw32_{in,de}crease_semaphore.c modules.\n\t* GNUmakefile: Likewise.\n\t* Bmakefile: Likewise.\n\n\t* sem_init.c: Re-write the NEED_SEM code to be consistent with the\n\tnon-NEED_SEM code, but retaining use of an event in place of the w32 sema\n\tfor w32 systems that don't include semaphores (WinCE);\n\tthe NEED_SEM versions of semaphores has been broken for a long time but is\n\tnow fixed and supports all of the same routines as the non-NEED_SEM case.\n\t* sem_destroy.c: Likewise.\n\t* sem_wait.c: Likewise.\n\t* sem_post.c: Likewise.\n\t* sem_post_multple.c: Likewise.\n\t* implement.h: Likewise.\n\t* sem_timedwait.c: Likewise; this routine is now\n\timplemented for builds that define NEED_SEM (WinCE etc).\n\t* sem_trywait.c: Likewise.\n\t* sem_getvalue.c: Likewise.\n\n\t* pthread_once.c: Yet more changes, reverting closer to Gottlob Frege's\n\tfirst design, but retaining cancellation, priority boosting, and adding\n\tpreservation of W32 error codes to make pthread_once transparent to\n\tGetLastError.\n\n2005-04-11  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* pthread_once.c (pthread_once): Added priority boosting to\n\tsolve starvation problem after once_routine cancellation.\n\tSee notes in file.\n\n2005-04-06  Kevin Lussier <Kevin at codegreennetworks.com>\n\n\t* Makefile: Added debug targets for all versions of the library.\n\n2005-04-01  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* GNUmakefile: Add target to build libpthreadGC1.a as a static link\n\tlibrary.\n\t* Makefile: Likewise for pthreadGC1.lib.\n\n2005-04-01  Kevin Lussier <Kevin at codegreennetworks.com>\n\n\t* sem_timedwait.c (sem_timedwait): Increase size of temp variables to\n\tavoid int overflows for large timeout values.\n\t* implement.h (int64_t): Include or define.\n\n2005-03-31   Dimitar Panayotov <develop at mail.bg>^M\n\n\t* pthread.h: Fix conditional defines for static linking.\n\t* sched.h: Liekwise.\n\t* semaphore.h: Likewise.\n\t* dll.c (PTW32_STATIC_LIB): Module is conditionally included\n\tin the build.\n\n2005-03-16  Ross Johnson  <ross at callisto.canberra.edu.au>^M\n\n\t* pthread_setcancelstate.c: Undo the last change.\n\n2005-03-16  Ross Johnson  <ross at callisto.canberra.edu.au>^M\n\n\t* pthread_setcancelstate.c: Don't check for an async cancel event\n\tif the library is using alertable async cancel..\n\n2005-03-14  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* pthread_once.c (pthread_once): Downgrade interlocked operations to simple\n\tmemory operations where these are protected by the critical section; edit\n\tcomments.\n\n2005-03-13  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_once.c (pthread_once): Completely redesigned; a change was\n\trequired to the ABI (pthread_once_t_), and resulting in a version\n\tcompatibility index increment.\n\n\tNOTES:\n\tThe design (based on pseudo code contributed by Gottlob Frege) avoids\n\tcreating a kernel object if there is no contention. See URL for details:-\n\thttp://sources.redhat.com/ml/pthreads-win32/2005/msg00029.html\n\tThis uses late initialisation similar to the technique already used for\n\tpthreads-win32 mutexes and semaphores (from Alexander Terekhov).\n\n\tThe subsequent cancelation cleanup additions (by rpj) could not be implemented\n\twithout sacrificing some of the efficiency in Gottlob's design. In particular,\n\talthough each once_control uses it's own event to block on, a global CS is\n\trequired to manage it - since the event must be either re-usable or\n\tre-creatable under cancelation. This is not needed in the non-cancelable\n\tdesign because it is able to mark the event as closed (forever).\n\n\tWhen uncontested, a CS operation is equivalent to an Interlocked operation\n\tin speed. So, in the final design with cancelability, an uncontested\n\tonce_control operation involves a minimum of five interlocked operations\n\t(including the LeaveCS operation).\n\t\n\tALTERNATIVES:\n\tAn alternative design from Alexander Terekhov proposed using a named mutex,\n\tas sketched below:-\n\n\t  if (!once_control) { // May be in TLS\n\t    named_mutex::guard guard(&once_control2);\n\t      if (!once_control2) {\n\t         <init>\n\t         once_control2 = true;\n\t      }\n\t    once_control = true;\n\t  }\n\t\n\tA more detailed description of this can be found here:-\n\thttp://groups.yahoo.com/group/boost/message/15442\n\n\t[Although the definition of a suitable PTHREAD_ONCE_INIT precludes use of the\n\tTLS located flag, this is not critical.]\n\t\n\tThere are three primary concerns though:-\n\t1) The [named] mutex is 'created' even in the uncontended case.\n\t2) A system wide unique name must be generated.\n\t3) Win32 mutexes are VERY slow even in the uncontended \tcase. An uncontested\n\tWin32 mutex lock operation can be 50 (or more) times slower than an\n\tuncontested EnterCS operation.\n\n\tUltimately, the named mutex trick is making use of the global locks maintained\n\tby the kernel.\n\n\t* pthread.h (pthread_once_t_): One flag and an event HANDLE added.\n\t(PTHREAD_ONCE_INIT): Additional values included.\n\n2005-03-08  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_once.c (pthread_once): Redesigned to elliminate potential\n\tstarvation problem.\n\t- reported by Gottlob Frege  <gottlobfrege at gmail.com>\n\n\t* ptw32_threadDestroy.c (ptw32_threadDestroy): Implicit threads were\n\tnot closing their Win32 thread duplicate handle.\n\t- reported by Dmitrii Semii <bogolt at gmail.com>\n\n2005-01-25  Ralf Kubis  <RKubis at mc.com>\n\n\t* Attempted acquisition of recursive mutex was causing waiting\n\tthreads to not be woken when the mutex is released.\n\n\t* GNUmakefile (GCE): Generate correct version resource comments.\n\n2005-01-01  Konstantin Voronkov  <beowinkle at yahoo.com>\n\n\t* pthread_mutex_lock.c (pthread_mutex_lock): The new atomic exchange\n\tmutex algorithm is known to allow a thread to steal the lock off\n\tFIFO waiting threads. The next waiting FIFO thread gets a spurious\n\twake-up and must attempt to re-acquire the lock. The woken thread\n\twas setting itself as the mutex's owner before the re-acquisition.\n\n2004-11-22  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_cond_wait.c (ptw32_cond_wait_cleanup): Undo change\n\tfrom 2004-11-02.\n\t* Makefile (DLL_VER): Added for DLL naming suffix - see README.\n\t* GNUmakefile (DLL_VER): Likewise.\n\t* Wmakefile (DLL_VER): Likewise.\n\t* Bmakefile (DLL_VER): Likewise.\n\t* pthread.dsw (version.rc): Added to MSVS workspace.\n\n2004-11-20  Boudewijn Dekker  <b.dekker at ellipsis.nl>\n\n\t* pthread_getspecific.c (pthread_getspecific): Check for\n\tinvalid (NULL) key argument.\n\n2004-11-19  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* config.h (PTW32_THREAD_ID_REUSE_INCREMENT): Added to allow\n\tbuilding the library for either unique thread IDs like Solaris\n\tor non-unique thread IDs like Linux; allows application developers\n\tto override the library's default insensitivity to some apps\n\tthat may not be strictly POSIX compliant.\n\t* version.rc: New resource module to encode version information\n\twithin the DLL.\n\t* pthread.h: Added PTW32_VERSION* defines and grouped sections\n\trequired by resource compiler together; bulk of file is skipped\n\tif RC_INVOKED. Defined some error numbers and other names for\n\tBorland compiler.\n\n2004-11-02  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_cond_wait.c (ptw32_cond_wait_cleanup): Lock CV mutex at\n\tstart of cleanup handler rather than at the end.\n\t* implement.h (PTW32_THREAD_REUSE_EMPTY): Renamed from *_BOTTOM.\n\t(ptw32_threadReuseBottom): New global variable.\n\t* global.c (ptw32_threadReuseBottom): Declare new variable.\n\t* ptw32_reuse.c (ptw32_reuse): Change reuse LIFO stack to LILO queue\n\tto more evenly distribute use of reusable thread IDs; use renamed\n\tPTW32_THREAD_REUSE_EMPTY.\n\t* ptw32_processTerminate.c (ptw2_processTerminate): Use renamed\n\tPTW32_THREAD_REUSE_EMPTY.\n\n2004-10-31  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* implement.h (PThreadState): Add new state value\n\t'PThreadStateCancelPending'.\n\t* pthread_testcancel.c (pthread_testcancel): Use new thread\n\t'PThreadStateCancelPending' state as short cut to avoid entering\n\tkernel space via WaitForSingleObject() call. This was obviated\n\tby user space sema acquisition in sem_wait() and sem_timedwait(),\n\twhich are also cancelation points. A call to pthread_testcancel()\n\twas required, which introduced a kernel call, effectively nullifying\n\tany gains made by the user space sem acquisition checks.\n\t* pthread_cancel.c (pthread_cancel): Set new thread\n\t'PThreadStateCancelPending' state.\n\n2004-10-29  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* implement.h (pthread_t): Renamed to ptw32_thread_t; struct contains\n\tall thread state.\n\t* pthread.h (ptw32_handle_t): New general purpose struct to serve\n\tas a handle for various reusable object IDs - currently only used\n\tby pthread_t; contains a pointer to ptw32_thread_t (thread state)\n\tand a general purpose uint for use as a reuse counter or flags etc.\n\t(pthread_t): typedef'ed to ptw32_handle_t; the uint is the reuse\n\tcounter that allows the library to maintain unique POSIX thread IDs.\n\tWhen the pthread struct reuse stack was introduced, threads would\n\toften acquire an identical ID to a previously destroyed thread. The\n\tsame was true for the pre-reuse stack library, by virtue of pthread_t\n\tbeing the address of the thread struct. The new pthread_t retains\n\tthe reuse stack but provides virtually unique thread IDs.\n\t* sem_wait.c (ptw32_sem_wait_cleanup): New routine used for\n\tcancelation cleanup.\n\t* sem_timedwait.c (ptw32_sem_timedwait_cleanup): Likewise.\n\n2004-10-22  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* sem_init.c (sem_init): Introduce a 'lock' element in order to\n\treplace the interlocked operations with conventional serialisation.\n\tThis is needed in order to be able to atomically modify the sema\n\tvalue and perform Win32 sema release operations. Win32 semaphores are\n\tused instead of events in order to support efficient multiple posting.\n\tIf the whole modify/release isn't atomic, a race between\n\tsem_timedwait() and sem_post() could result in a release when there is\n\tno waiting semaphore, which would cause too many threads to proceed.\n\t* sem_wait.c (sem_wait): Use new 'lock'element.\n\t* sem_timedwait.c (sem_timedwait): Likewise.\n\t* sem_trywait.c (sem_trywait): Likewise.\n\t* sem_post.c (sem_post): Likewise.\n\t* sem_post_multiple.c (sem_post_multiple): Likewise.\n\t* sem_getvalue.c (sem_getvalue): Likewise.\n\t* ptw32_semwait.c (ptw32_semwait): Likewise.\n\t* sem_destroy.c (sem_destroy): Likewise; also tightened the conditions\n\tfor semaphore destruction; in particular, a semaphore will not be\n\tdestroyed if it has waiters.\n\t* sem_timedwait.c (sem_timedwait): Added cancel cleanup handler to\n\trestore sema value when cancelled.\n\t* sem_wait.c (sem_wait): Likewise.\n\n2004-10-21  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_mutex_unlock.c (pthread_mutex_unlock): Must use PulseEvent()\n\trather than SetEvent() to reset the event if there are no waiters.\n\n2004-10-19  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* sem_init.c (sem_init): New semaphore model based on the same idea\n\tas mutexes, i.e. user space interlocked check to avoid \n\tunnecessarily entering kernel space. Wraps the Win32 semaphore and\n\tkeeps it's own counter. Although the motivation to do this has existed\n\tfor a long time, credit goes to Alexander Terekhov for providing\n\tthe logic. I have deviated slightly from AT's logic to add the waiters\n\tcount, which has made the code more complicated by adding cancelation\n\tcleanup. This also appears to have broken the VCE (C++ EH) version of\n\tthe library (the same problem as previously reported - see BUGS #2),\n\tonly apparently not fixable using the usual workaround, nor by turning\n\tall optimisation off. The GCE version works fine, so it is presumed to\n\tbe a bug in MSVC++ 6.0. The cancelation exception is thrown and caught\n\tcorrectly, but the cleanup class destructor is never called. The failing\n\ttest is tests\\semaphore4.c.\n\t* sem_wait.c (sem_wait): Implemented user space check model.\n\t* sem_post.c (sem_post): Likewise.\n\t* sem_trywait.c (sem_trywait): Likewise.\n\t* sem_timedwait.c (sem_timedwait): Likewise.\n\t* sem_post_multiple.c (sem_post_multiple): Likewise.\n\t* sem_getvalue.c (sem_getvalue): Likewise.\n\t* ptw32_semwait.c (ptw32_semwait): Likewise.\n\t* implement.h (sem_t_): Add counter element.\n\n2004-10-15  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* implement.h (pthread_mutex_t_): Use an event in place of\n\tthe POSIX semaphore.\n\t* pthread_mutex_init.c: Create the event; remove semaphore init.\n\t* pthread_mutex_destroy.c: Delete the event.\n\t* pthread_mutex_lock.c: Replace the semaphore wait with the event wait.\n\t* pthread_mutex_trylock.c: Likewise.\n\t* pthread_mutex_timedlock.c: Likewise.\n\t* pthread_mutex_unlock.c: Set the event.\n\t\n2004-10-14  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_mutex_lock.c (pthread_mutex_lock): New algorithm using\n\tTerekhov's xchg based variation of Drepper's cmpxchg model.\n\tTheoretically, xchg uses fewer clock cycles than cmpxchg (using IA-32\n\tas a reference), however, in my opinion bus locking dominates the\n\tequation on smp systems, so the model with the least number of bus\n\tlock operations in the execution path should win, which is Terekhov's\n\tvariant. On IA-32 uni-processor systems, it's faster to use the\n\tCMPXCHG instruction without locking the bus than to use the XCHG\n\tinstruction, which always locks the bus. This makes the two variants\n\tequal for the non-contended lock (fast lane) execution path on up\n\tIA-32. Testing shows that the xchg variant is faster on up IA-32 as\n\twell if the test forces higher lock contention frequency, even though\n\tkernel calls should be dominating the times (on up IA-32, both\n\tvariants used CMPXCHG instructions and neither locked the bus).\n\t* pthread_mutex_timedlock.c pthread_mutex_timedlock(): Similarly.\n\t* pthread_mutex_trylock.c (pthread_mutex_trylock): Similarly.\n\t* pthread_mutex_unlock.c (pthread_mutex_unlock): Similarly.\n\t* ptw32_InterlockedCompareExchange.c (ptw32_InterlockExchange): New\n\tfunction.\n\t(PTW32_INTERLOCKED_EXCHANGE): Sets up macro to use inlined\n\tptw32_InterlockedExchange.\n\t* implement.h (PTW32_INTERLOCKED_EXCHANGE): Set default to\n\tInterlockedExchange().\n\t* Makefile: Building using /Ob2 so that asm sections within inline\n\tfunctions are inlined.\n\n2004-10-08  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_mutex_destroy.c (pthread_mutex_destroy): Critical Section\n\telement is no longer required.\n\t* pthread_mutex_init.c (pthread_mutex_init): Likewise.\n\t* pthread_mutex_lock.c (pthread_mutex_lock): New algorithm following\n\tDrepper's paper at http://people.redhat.com/drepper/futex.pdf, but\n\tusing the existing semaphore in place of the futex described in the\n\tpaper. Idea suggested by Alexander Terekhov - see:\n\thttp://sources.redhat.com/ml/pthreads-win32/2003/msg00108.html\n\t* pthread_mutex_timedlock.c pthread_mutex_timedlock(): Similarly.\n\t* pthread_mutex_trylock.c (pthread_mutex_trylock): Similarly.\n\t* pthread_mutex_unlock.c (pthread_mutex_unlock): Similarly.\n\t* pthread_barrier_wait.c (pthread_barrier_wait): Use inlined version\n\tof InterlockedCompareExchange() if possible - determined at\n\tbuild-time.\n\t* pthread_spin_destroy.c pthread_spin_destroy(): Likewise.\n\t* pthread_spin_lock.c pthread_spin_lock():Likewise.\n\t* pthread_spin_trylock.c (pthread_spin_trylock):Likewise.\n\t* pthread_spin_unlock.c (pthread_spin_unlock):Likewise.\n\t* ptw32_InterlockedCompareExchange.c: Sets up macro for inlined use.\n\t* implement.h (pthread_mutex_t_): Remove Critical Section element.\n\t(PTW32_INTERLOCKED_COMPARE_EXCHANGE): Set to default non-inlined\n\tversion of InterlockedCompareExchange().\n\t* private.c: Include ptw32_InterlockedCompareExchange.c first for\n\tinlining.\n\t* GNUmakefile: Add commandline option to use inlined\n\tInterlockedCompareExchange().\n\t* Makefile: Likewise.\n\n2004-09-27  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_mutex_lock.c (pthread_mutex_lock): Separate\n\tPTHREAD_MUTEX_NORMAL logic since we do not need to keep or check some\n\tstate required by other mutex types; do not check mutex pointer arg\n\tfor validity - leave this to the system since we are only checking\n\tfor NULL pointers. This should improve speed of NORMAL mutexes and\n\tmarginally improve speed of other type.\n\t* pthread_mutex_trylock.c (pthread_mutex_trylock): Likewise.\n\t* pthread_mutex_unlock.c (pthread_mutex_unlock): Likewise; also avoid\n\tentering the critical section for the no-waiters case, with approx.\n\t30% reduction in lock/unlock overhead for this case.\n\t* pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise; also\n\tno longer keeps mutex if post-timeout second attempt succeeds - this\n\twill assist applications that wish to impose strict lock deadlines,\n\trather than simply to escape from frozen locks.\n\n2004-09-09  Tristan Savatier  <tristan at mpegtv.com>\n\t* pthread.h (struct pthread_once_t_): Qualify the 'done' element\n\tas 'volatile'.\n\t* pthread_once.c: Concerned about possible race condition,\n\tspecifically on MPU systems re concurrent access to multibyte types.\n\t[Maintainer's note: the race condition is harmless on SPU systems\n\tand only a problem on MPU systems if concurrent access results in an\n\texception (presumably generated by a hardware interrupt). There are\n\tother instances of similar harmless race conditions that have not\n\tbeen identified as issues.]\n\n2004-09-09  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread.h: Declare additional types as volatile.\n\n2004-08-27  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_barrier_wait.c (pthread_barrier_wait): Remove excessive code\n\tby substituting the internal non-cancelable version of sem_wait\n\t(ptw32_semwait).\n\n2004-08-25  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_join.c (pthread_join): Rewrite and re-order the conditional\n\ttests in an attempt to improve efficiency and remove a race\n\tcondition.\n\n2004-08-23  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* create.c (pthread_create): Don't create a thread if the thread\n\tid pointer location (first arg) is inaccessible. A memory\n\tprotection fault will result if the thread id arg isn't an accessible\n\tlocation. This is consistent with GNU/Linux but different to\n\tSolaris or MKS (and possibly others), which accept NULL as meaning\n\t'don't return the created thread's ID'. Applications that run\n\tusing pthreads-win32 will run on all other POSIX threads\n\timplementations, at least w.r.t. this feature.\n\n\tIt was decided not to copy the Solaris et al behaviour because,\n\talthough it would have simplified some application porting (but only\n\tfrom Solaris to Windows), the feature is not technically necessary,\n\tand the alternative segfault behaviour helps avoid buggy application\n\tcode.\n\n2004-07-01  Anuj Goyal  <anuj.goyal at gmail.com>\n\n\t* builddmc.bat: New; Windows bat file to build the library.\n\t* config.h (__DMC__): Support for Digital Mars compiler.\n\t* create.c (__DMC__): Likewise.\n\t* pthread_exit.c (__DMC__): Likewise.\n\t* pthread_join.c (__DMC__): Likewise.\n\t* ptw32_threadDestroy.c (__DMC__): Likewise.\n\t* ptw32_threadStart.c (__DMC__): Likewise.\n\t* ptw32_throw.c (__DMC__): Likewise.\n\n2004-06-29  Anuj Goyal  <anuj.goyal at gmail.com>\n\n\t* pthread.h (__DMC__): Initial support for Digital Mars compiler.\n\n2004-06-29  Will Bryant  <will.bryant at ecosm.com>\n\n\t* README.Borland: New; description of Borland changes.\n\t* Bmakefile: New makefile for the Borland make utility.\n\t* ptw32_InterlockedCompareExchange.c:\n\tAdd Borland compatible asm code.\n\n2004-06-26  Jason Bard  <BardJA at Npt.NUWC.Navy.Mil>\n\n\t* pthread.h (HAVE_STRUCT_TIMESPEC): If undefined, define it\n\tto avoid timespec struct redefined errors elsewhere in an\n\tapplication.\n\n2004-06-21  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread.h (PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Mutex\n\tinitialiser added for compatibility with Linux threads and\n\tothers; currently not included in SUSV3.\n\t* pthread.h (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER): Likewise.\n\t* pthread.h (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.\n\t* pthread.h (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.\n\n\t* ptw32_mutex_check_need_init.c (ptw32_mutex_check_need_init): \n\tAdd new initialisers.\n\n\t* pthread_mutex_lock.c (pthread_mutex_lock): Check for new\n\tinitialisers.\n\t* pthread_mutex_trylock.c (pthread_mutex_trylock): Likewise.\n\t* pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.\n\t* pthread_mutex_unlock.c (pthread_mutex_unlock): Likewise.\n\t* pthread_mutex_destroy.c (pthread_mutex_destroy): Likewise.\n\n2004-05-20  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* README.NONPORTABLE: Document pthread_win32_test_features_np().\n\t* FAQ: Update various answers.\n\n2004-05-19  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* Makefile: Don't define _WIN32_WINNT on compiler command line.\n\t* GNUmakefile: Likewise.\n\n2004-05-16  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_cancel.c (pthread_cancel): Adapted to use auto-detected\n\tQueueUserAPCEx features at run-time.\n\t(ptw32_RegisterCancelation): Drop in replacement for QueueUserAPCEx()\n\tif it can't be used. Provides older style non-preemptive async\n\tcancelation.\n\t* pthread_win32_attach_detach_np.c (pthread_win32_attach_np):\n\tAuto-detect quserex.dll and the availability of alertdrv.sys;\n\tinitialise and close on process attach/detach.\n\t* global.c (ptw32_register_cancelation): Pointer to either\n\tQueueUserAPCEx() or ptw32_RegisterCancelation() depending on\n\tavailability. QueueUserAPCEx makes pre-emptive async cancelation\n\tpossible.\n\t* implement.h: Add definitions and prototypes related to QueueUserAPC.\n\n2004-05-16  Panagiotis E. Hadjidoukas <peh at hpclab.ceid.upatras.gr>\n\n\t* QueueUserAPCEx (separate contributed package): Provides preemptive\n\tAPC feature.\n\t* pthread_cancel.c (pthread_cancel): Initial integration of\n\tQueueUserAPCEx into pthreads-win32 to provide true pre-emptive\n\tasync cancelation of threads, including blocked threads.\n\n2004-05-06  Makoto Kato  <raven at oldskool.jp>\n\n\t* pthread.h (DWORD_PTR): Define typedef for older MSVC.\n\t* pthread_cancel.c (AMD64): Add architecture specific Context register.\n\t* ptw32_getprocessors.c: Use correct types (DWORD_PTR) for mask\n\tvariables.\n\n2004-04-06  P. van Bruggen  <pietvb at newbridges.nl>\n\n\t* ptw32_threadDestroy.c: Destroy threadLock mutex to\n\tclose a memory leak.\n\n2004-02-13  Gustav Hallberg  <gustav at virtutech.com>\n\n\t* pthread_equal.c: Remove redundant equality logic.\n\n2003-12-10  Philippe Di Cristo  <philipped at voicebox.com>\n\n\t* sem_timedwait.c (sem_timedwait): Fix timeout calculations.\n\n2003-10-20  Alexander Terekhov  <TEREKHOV at de.ibm.com>\n\n\t* pthread_mutex_timedlock.c (ptw32_semwait): Move to individual module.\n\t* ptw32_semwait.c: New module.\n\t* pthread_cond_wait.c (ptw32_cond_wait_cleanup): Replace cancelable\n\tsem_wait() call with non-cancelable ptw32_semwait() call.\n\t* pthread.c (private.c): Re-order for inlining. GNU C warned that\n\tfunction ptw32_semwait() was defined 'inline' after it was called.\n\t* pthread_cond_signal.c (ptw32_cond_unblock): Likewise.\n\t* pthread_delay_np.c: Disable Watcom warning with comment.\n\t* *.c (process.h): Remove include from .c files. This is conditionally\n\tincluded by the common project include files.\n\n2003-10-20  James Ewing  <james.ewing at sveasoft.com>\n\n\t* ptw32_getprocessors.c: Some Win32 environments don't have\n\tGetProcessAffinityMask(), so always return CPU count = 1 for them.\n\t* config.h (NEED_PROCESSOR_AFFINITY_MASK): Define for WinCE.\n\t\n2003-10-15  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* Re-indented all .c files using default GNU style to remove assorted\n\teditor ugliness (used GNU indent utility in default style).\n\n2003-10-15  Alex Blanco  <Alex.Blanco at motorola.com>\n\n\t* sem_init.c (sem_init): Would call CreateSemaphore even if the sema\n\tstruct calloc failed; was not freeing calloced memory if either\n\tCreateSemaphore or CreateEvent failed.\n\n2003-10-14  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* pthread.h: Add Watcom compiler compatibility. Esssentially just add\n\tthe cdecl attribute to all exposed function prototypes so that Watcom\n\tgenerates function call code compatible with non-Watcom built libraries.\n\tBy default, Watcom uses registers to pass function args if possible rather\n\tthan pushing to stack.\n\t* semaphore.h: Likewise.\n\t* sched.h: Likewise.\n\t* pthread_cond_wait.c (ptw32_cond_wait_cleanup): Define with cdecl attribute\n\tfor Watcom compatibility. This routine is called via pthread_cleanup_push so\n\tit had to match function arg definition.\n\t* Wmakefile: New makefile for Watcom builds.\n\n2003-09-14  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_setschedparam.c (pthread_setschedparam): Attempt to map\n\tall priority levels between max and min (as returned by\n\tsched_get_priority_min/max) to reasonable Win32 priority levels - i.e.\n\tlevels between THREAD_PRIORITY_LOWEST/IDLE to THREAD_PRIORITY_LOWEST and\n\tbetween THREAD_PRIORITY_HIGHEST/TIME_CRITICAL to THREAD_PRIORITY_HIGHEST\n\twhile others remain unchanged; record specified thread priority level\n\tfor return by pthread_getschedparam.\n\n\tNote that, previously, specified levels not matching Win32 priority levels\n\twould silently leave the current thread priority unaltered.\n\n\t* pthread_getschedparam.c (pthread_getschedparam): Return the priority\n\tlevel specified by the latest pthread_setschedparam or pthread_create rather\n\tthan the actual running thread priority as returned by GetThreadPriority - as\n\trequired by POSIX. I.e. temporary or adjusted actual priority levels are not\n\treturned by this routine.\n\n\t* pthread_create.c (pthread_create): For priority levels specified via\n\tpthread attributes, attempt to map all priority levels between max and\n\tmin (as returned by sched_get_priority_min/max) to reasonable Win32\n\tpriority levels; record priority level given via attributes, or\n\tinherited from parent thread, for later return by pthread_getschedparam.\n\n\t* ptw32_new.c (ptw32_new): Initialise pthread_t_ sched_priority element.\n\n\t* pthread_self.c (pthread_self): Set newly created implicit POSIX thread\n\tsched_priority to Win32 thread's current actual priority. Temporarily\n\taltered priorities can't be avoided in this case.\n\n\t* implement.h (struct pthread_t_): Add new sched_priority element.\n\n2003-09-12  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* sched_get_priority_min.c (sched_get_priority_min): On error should return -1\n\twith errno set.\n\t* sched_get_priority_max.c (sched_get_priority_max): Likewise.\n\n2003-09-03  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* w32_cancelableWait.c (ptw32_cancelable_wait): Allow cancelation\n\tof implicit POSIX threads as well.\n\n2003-09-02  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_win32_attach_detach_np.c (pthread_win32_thread_detach_np):\n\tAdd comment.\n\n\t* pthread_exit.c (pthread_exit): Fix to recycle the POSIX thread handle in\n\taddition to calling user TSD destructors. Move the implicit POSIX thread exit\n\thandling to ptw32_throw to centralise the logic.\n\n\t* ptw32_throw.c (ptw32_throw): Implicit POSIX threads have no point\n\tto jump or throw to, so cleanup and exit the thread here in this case. For\n\tprocesses using the C runtime, the exit code will be set to the POSIX\n\treason for the throw (i.e. PTHREAD_CANCEL or the value given to pthread_exit).\n\tNote that pthread_exit() already had similar logic, which has been moved to\n\there.\n\n\t* ptw32_threadDestroy.c (ptw32_threadDestroy): Don't close the Win32 handle\n\tof implicit POSIX threads - expect this to be done by Win32?\n\n2003-09-01  Ross Johnson  <rpj at callisto.canberra.edu.au>\n\n\t* pthread_self.c (pthread_self): The newly aquired pthread_t must be\n\tassigned to the reuse stack, not freed, if the routine fails somehow.\n\n2003-08-13  Ross Johnson  <rpj at ise.canberra.edu.au>\n\n\t* pthread_getschedparam.c (pthread_getschedparam): An invalid thread ID\n\tparameter was returning an incorrect error value; now uses a more exhaustive\n\tcheck for validity.\n\n\t* pthread_setschedparam.c (pthread_setschedparam): Likewise.\n\n\t* pthread_join.c (pthread_join): Now uses a more exhaustive\n\tcheck for validity.\n\n\t* pthread_detach.c (pthread_detach): Likewise.\n\n\t* pthread_cancel.c (pthread_cancel): Likewise.\n\n\t* ptw32_threadDestroy.c (ptw32_threadDestroy): pthread_t structs are\n\tnever freed - push them onto a stack for reuse.\n\n\t* ptw32_new.c (ptw32_new): Check for reusable pthread_t before dynamically\n\tallocating new memory for the struct.\n\n\t* pthread_kill.c (pthread_kill): New file; new routine; takes only a zero\n\tsignal arg so that applications can check the thread arg for validity; checks\n\tthat the underlying Win32 thread HANDLE is valid.\n\n\t* pthread.h (pthread_kill): Add prototype.\n\n\t* ptw32_reuse.c (ptw32_threadReusePop): New file; new routine; pop a\n\tpthread_t off the reuse stack. pthread_t_ structs that have been destroyed, i.e.\n\thave exited detached or have been joined, are cleaned up and put onto a reuse\n\tstack. Consequently, thread IDs are no longer freed once calloced. The library\n\twill attempt to get a struct off this stack before asking the system to alloc\n\tnew memory when creating threads. The stack is guarded by a global mutex.\n\t(ptw32_threadReusePush): New routine; push a pthread_t onto the reuse stack.\n\n\t* implement.h (ptw32_threadReusePush): Add new prototype.\n\t(ptw32_threadReusePop): Likewise.\n\t(pthread_t): Add new element.\n\n\t* ptw32_processTerminate.c (ptw32_processTerminate): Delete the thread\n\treuse lock; free all thread ID structs on the thread reuse stack.\n\n\t* ptw32_processInitialize.c (ptw32_processInitialize): Initialise the\n\tthread reuse lock.\n\n2003-07-19  Ross Johnson  <rpj at ise.canberra.edu.au>\n\n\t* GNUmakefile: modified to work under MsysDTK environment.\n\t* pthread_spin_lock.c (pthread_spin_lock): Check for NULL arg.\n\t* pthread_spin_unlock.c (pthread_spin_unlock): Likewise.\n\t* pthread_spin_trylock.c (pthread_spin_trylock): Likewise;\n\tfix incorrect pointer value if lock is dynamically initialised by\n\tthis function.\n\t* sem_init.c (sem_init): Initialise sem_t value to quell compiler warning.\n\t* sem_destroy.c (sem_destroy): Likewise.\n\t* ptw32_threadStart.c (non-MSVC code sections): Include <exception> rather\n\tthan old-style <new.h>; fix all std:: namespace entities such as\n\tstd::terminate_handler instances and associated methods.\n\t* ptw32_callUserDestroyRoutines.c (non-MSVC code sections): Likewise.\n\n2003-06-24  Piet van Bruggen  <pietvb at newbridges.nl>\n\n\t* pthread_spin_destroy.c (pthread_spin_destroy): Was not freeing the\n\tspinlock struct.\n\n2003-06-22  Nicolas Barry  <boozai at yahoo.com>\n\n\t* pthread_mutex_destroy.c (pthread_mutex_destroy): When called\n\twith a recursive mutex that was locked by the current thread, the\n\tfunction was failing with a success return code.\n\n2003-05-15  Steven Reddie  <Steven.Reddie at ca.com>\n\n\t* pthread_win32_attach_detach_np.c (pthread_win32_process_detach_np):\n\tNULLify ptw32_selfThreadKey after the thread is destroyed, otherwise\n\tdestructors calling pthreads routines might resurrect it again, creating\n\tmemory leaks. Call the underlying Win32 Tls routine directly rather than\n\tpthread_setspecific().\n\t(pthread_win32_thread_detach_np): Likewise.\n\n2003-05-14  Viv  <vcotirlea at hotmail.com>\n\n\t* pthread.dsp: Change /MT compile flag to /MD.\n\n2003-03-04  Alexander Terekhov  <TEREKHOV at de.ibm.com>\n\n\t* pthread_mutex_timedlock.c (pthread_mutex_timedlock): Fix failure to\n\tset ownership of mutex on second grab after abstime timeout.\n\t- bug reported by Robert Strycek <strycek at posam.sk>\n\n2002-12-17  Thomas Pfaff  <tpfaff at gmx.net>\n\n\t* pthread_mutex_lock.c (ptw32_semwait): New static routine to provide\n\ta non-cancelable sem_wait() function. This is consistent with the\n\tway that pthread_mutex_timedlock.c does it.\n\t(pthread_mutex_lock): Use ptw32_semwait() instead of sem_wait().\n\n2002-12-11  Thomas Pfaff  <tpfaff at gmx.net>\n\n\t* pthread_mutex_trylock.c: Should return EBUSY rather than EDEADLK.\n\t* pthread_mutex_destroy.c: Remove redundant ownership test (the\n\ttrylock call does this for us); do not destroy a recursively locked\n\tmutex.\n\n2002-09-20  Michael Johnson  <michaelj at maine.rr.com>\n\n\t* pthread_cond_destroy.c (pthread_cond_destroy): \n\tWhen two different threads exist, and one is attempting to\n\tdestroy a condition variable while the other is attempting to\n\tinitialize a condition variable that was created with\n\tPTHREAD_COND_INITIALIZER, a deadlock can occur. Shrink\n\tthe ptw32_cond_list_lock critical section to fix it.\n\n2002-07-31  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* ptw32_threadStart.c (ptw32_threadStart): Thread cancelLock\n\tdestruction moved to ptw32_threadDestroy().\n\n\t* ptw32_threadDestroy.c (ptw32_threadDestroy):  Destroy\n\tthe thread's cancelLock. Moved here from ptw32_threadStart.c\n\tto cleanup implicit threads as well.\n\n2002-07-30  Alexander Terekhov  <TEREKHOV at de.ibm.com>\n\n\t* pthread_cond_wait.c (ptw32_cond_wait_cleanup): \n\tRemove code designed to avoid/prevent spurious wakeup\n\tproblems. It is believed that the sem_timedwait() call\n\tis consuming a CV signal that it shouldn't and this is\n\tbreaking the avoidance logic.\n\n2002-07-30  Ross Johnson  <rpj at ise.canberra.edu.au>\n\n\t* sem_timedwait.c (sem_timedwait): Tighten checks for\n\tunreasonable abstime values - that would result in\n\tunexpected timeout values.\n\n\t* w32_CancelableWait.c (ptw32_cancelable_wait):\n\tTighten up return value checking and add comments.\n\n\n2002-06-08  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* sem_getvalue.c (sem_getvalue): Now returns a value for the\n\tNEED_SEM version (i.e. earlier versions of WinCE).\n\n\n2002-06-04  Rob Fanner  <rfanner at stonethree.com>\n\n\t* sem_getvalue.c (sem_getvalue): The Johnson M. Hart\n\tapproach didn't work - we are forced to take an\n\tintrusive approach. We try to decrement the sema\n\tand then immediately release it again to get the\n\tvalue. There is a small probability that this may\n\tblock other threads, but only momentarily.\n\n2002-06-03  Ross Johnson  <rpj at ise.canberra.edu.au>\n\n\t* sem_init.c (sem_init): Initialise Win32 semaphores\n\tto _POSIX_SEM_VALUE_MAX (which this implementation\n\tdefines in pthread.h) so that sem_getvalue() can use\n\tthe trick described in the comments in sem_getvalue().\n\t* pthread.h (_POSIX_SEM_VALUE_MAX): Defined.\n\t(_POSIX_SEM_NSEMS_MAX): Defined - not used but may be\n\tuseful for source code portability.\n\n2002-06-03  Rob Fanner  <rfanner at stonethree.com>\n\n\t* sem_getvalue.c (sem_getvalue): Did not work on NT.\n\tUse approach suggested by Johnson M. Hart in his book\n\t\"Win32 System Programming\".\n\n2002-02-28  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* errno.c: Compiler directive was incorrectly including code.\n\t* pthread.h: Conditionally added some #defines from config.h\n\tneeded when not building the library. e.g. NEED_ERRNO, NEED_SEM.\n\t(PTW32_DLLPORT): Now only defined if _DLL defined.\n\t(_errno): Compiler directive was incorrectly including prototype.\n\t* sched.h: Conditionally added some #defines from config.h\n\tneeded when not building the library.\n\t* semaphore.h: Replace an instance of NEED_SEM that should\n\thave been NEED_ERRNO. This change currently has nil effect.\n\n\t* GNUmakefile: Correct some recent changes.\n\n\t* Makefile: Add rule to generate pre-processor output.\n\n2002-02-23  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* pthread_rwlock_timedrdlock.c: New - untested.\n\t* pthread_rwlock_timedwrlock.c: New - untested.\n\t\n\t* Testsuite passed (except known MSVC++ problems)\n\n\t* pthread_cond_destroy.c: Expand the time change\n\tcritical section to solve deadlock problem.\n\n\t* pthread.c: Add all remaining C modules.\n\t* pthread.h: Use dllexport/dllimport attributes on functions\n\tto avoid using pthread.def.\n\t* sched.h: Likewise.\n\t* semaphore.h: Likewise.\n\t* GNUmakefile: Add new targets for single translation\n\tunit build to maximise inlining potential; generate\n\tpthread.def automatically.\n\t* Makefile: Likewise, but no longer uses pthread.def.\n\n2002-02-20  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* pthread_cond_destroy.c (pthread_cond_destroy):\n\tEnter the time change critical section earlier.\n\n2002-02-17  Ross Johnson  <rpj at setup1.ise.canberra.edu.au\n\n\t* Testsuite passed.\n\n\t* pthread_timechange_handler_np.c: New; following\n\ta suggestion from Alexander Terekhov that CVs should\n\tbe broadcast so that they all re-evaluate their\n\tcondition variables and reset a new timeout if\n\trequired, whenever an application receives a\n\tWM_TIMECHANGE message. This message indicates that\n\tthe system time has been changed. Therefore, CVs\n\twaiting for a timeout set as an abs_time will possibly\n\tnot wake up at the expected time. Some applications\n\tmay not be tolerant of this.\n\t* pthread_cond_init.c: Add CV to linked list.\n\t* pthread_cond_destroy.c: Remove CV from linked list.\n\t* global.c (ptw32_cond_list_head): New variable.\n\t(ptw32_cond_list_tail): New variable.\n\t(ptw32_cond_list_cs): New critical section.\n\t* ptw32_processInitialize (ptw32_cond_list_cs): Initialize.\n\t* ptw32_processTerminate (ptw32_cond_list_cs): Delete.\n\n\n\t* Reduce executable size.\n\t  -----------------------\n\tWhen linking with the static library, only those\n\troutines actually called, either directly or indirectly\n\tshould be included.\n\n\t[Gcc has the -ffunction-segments option to do this but MSVC\n\tdoesn't have this feature as far as I can determine. Other\n\tcompilers are undetermined as well. - rpj]\n\n\t* spin.c: Split file into function segments.\n\t* ptw32_spinlock_check_need_init.c: Separated routine from spin.c.\n\t* pthread_spin_init.c: Likewise.\n\t* pthread_spin_destroy.c: Likewise.\n\t* pthread_spin_lock.c: Likewise.\n\t* pthread_spin_unlock.c: Likewise.\n\t* pthread_spin_trylock.c: Likewise.\n\n\t* sync.c: Split file into function segments.\n\t* pthread_detach.c: Separated routine from sync.c.\n\t* pthread_join.c: Likewise.\n\n\t* tsd.c: Split file into function segments.\n\t* pthread_key_create.c: Separated routine from tsd.c.\n\t* pthread_key_delete.c: Likewise.\n\t* pthread_setspecific.c: Likewise.\n\t* pthread_getspecific.c: Likewise.\n\n\t* sched.c: Split file into function segments.\n\t* pthread_attr_setschedpolicy.c: Separated routine from sched.c.\n\t* pthread_attr_getschedpolicy.c: Likewise.\n\t* pthread_attr_setschedparam.c: Likewise.\n\t* pthread_attr_getschedparam.c: Likewise.\n\t* pthread_attr_setinheritsched.c: Likewise.\n\t* pthread_attr_getinheritsched.c: Likewise.\n\t* pthread_setschedparam.c: Likewise.\n\t* pthread_getschedparam.c: Likewise.\n\t* sched_get_priority_max.c: Likewise.\n\t* sched_get_priority_min.c: Likewise.\n\t* sched_setscheduler.c: Likewise.\n\t* sched_getscheduler.c: Likewise.\n\t* sched_yield.c: Likewise.\n\n\n2002-02-16  Ross Johnson  <rpj at setup1.ise.canberra.edu.au\n\n\tReduce executable size.\n\t-----------------------\n\tWhen linking with the static library, only those\n\troutines actually called, either directly or indirectly\n\tshould be included.\n\n\t[Gcc has the -ffunction-segments option to do this but MSVC\n\tdoesn't have this feature as far as I can determine. Other\n\tcompilers are undetermined as well. - rpj]\n\n\t* mutex.c: Split file into function segments.\n\t* pthread_mutexattr_destroy.c: Separated routine from mutex.c\n\t* pthread_mutexattr_getpshared.c: Likewise.\n\t* pthread_mutexattr_gettype.c: Likewise.\n\t* pthread_mutexattr_init.c: Likewise.\n\t* pthread_mutexattr_setpshared.c: Likewise.\n\t* pthread_mutexattr_settype.c: Likewise.\n\t* ptw32_mutex_check_need_init.c: Likewise.\n\t* pthread_mutex_destroy.c: Likewise.\n\t* pthread_mutex_init.c: Likewise.\n\t* pthread_mutex_lock.c: Likewise.\n\t* pthread_mutex_timedlock.c: Likewise.\n\t* pthread_mutex_trylock.c: Likewise.\n\t* pthread_mutex_unlock.c: Likewise.\n\t\n\t* private.c: Split file into function segments.\n\t* ptw32_InterlockedCompareExchange.c: Separated routine from private.c\n\t* ptw32_callUserDestroyRoutines.c: Likewise.\n\t* ptw32_getprocessors.c: Likewise.\n\t* ptw32_processInitialize.c: Likewise.\n\t* ptw32_processTerminate.c: Likewise.\n\t* ptw32_threadDestroy.c: Likewise.\n\t* ptw32_threadStart.c: Likewise.\n\t* ptw32_throw.c: Likewise.\n\t* ptw32_timespec.c: Likewise.\n\t* ptw32_tkAssocCreate.c: Likewise.\n\t* ptw32_tkAssocDestroy.c: Likewise.\n\n\t* rwlock.c: Split file into function segments.\n\t* pthread_rwlockattr_destroy.c: Separated routine from rwlock.c\n\t* pthread_rwlockattr_getpshared.c: Likewise.\n\t* pthread_rwlockattr_init.c: Likewise.\n\t* pthread_rwlockattr_setpshared.c: Likewise.\n\t* ptw32_rwlock_check_need_init.c: Likewise.\n\t* pthread_rwlock_destroy.c: Likewise.\n\t* pthread_rwlock_init.c: Likewise.\n\t* pthread_rwlock_rdlock.c: Likewise.\n\t* pthread_rwlock_tryrdlock.c: Likewise.\n\t* pthread_rwlock_trywrlock.c: Likewise.\n\t* pthread_rwlock_unlock.c: Likewise.\n\t* pthread_rwlock_wrlock.c: Likewise.\n\n2002-02-10  Ross Johnson  <rpj at setup1.ise.canberra.edu.au\n\n\tReduce executable size.\n\t-----------------------\n\tWhen linking with the static library, only those\n\troutines actually called, either directly or indirectly\n\tshould be included.\n\n\t[Gcc has the -ffunction-segments option to do this but MSVC\n\tdoesn't have this feature as far as I can determine. Other\n\tcompilers are undetermined as well. - rpj]\n\n\t* nonportable.c: Split file into function segments.\n\t* np_delay.c: Separated routine from nonportable.c\n\t* np_getw32threadhandle.c: Likewise.\n\t* np_mutexattr_setkind.c: Likewise.\n\t* np_mutexattr_getkind.c: Likewise.\n\t* np_num_processors.c: Likewise.\n\t* np_win32_attach_detach.c: Likewise.\n\n\t* misc.c: Split file into function segments.\n\t* pthread_equal.c: Separated routine from nonportable.c.\n\t* pthread_getconcurrency.c: Likewise.\n\t* pthread_once.c: Likewise.\n\t* pthread_self.c: Likewise.\n\t* pthread_setconcurrency.c: Likewise.\n\t* ptw32_calloc.c: Likewise.\n\t* ptw32_new.c: Likewise.\n\t* w32_CancelableWait.c: Likewise.\n\t\n2002-02-09  Ross Johnson  <rpj at setup1.ise.canberra.edu.au\n\n\tReduce executable size.\n\t-----------------------\n\tWhen linking with the static library, only those\n\troutines actually called, either directly or indirectly\n\tshould be included.\n\n\t[Gcc has the -ffunction-segments option to do this but MSVC\n\tdoesn't have this feature as far as I can determine. Other\n\tcompilers are undetermined as well. - rpj]\n\n\t* condvar.c: Split file into function segments.\n\t* pthread_condattr_destroy.c: Separated routine from condvar.c.\n\t* pthread_condattr_getpshared.c: Likewise.\n\t* pthread_condattr_init.c: Likewise.\n\t* pthread_condattr_setpshared.c: Likewise.\n\t* ptw32_cond_check_need_init.c: Likewise.\n\t* pthread_cond_destroy.c: Likewise.\n\t* pthread_cond_init.c: Likewise.\n\t* pthread_cond_signal.c: Likewise.\n\t* pthread_cond_wait.c: Likewise.\n\t\n2002-02-07  Alexander Terekhov<TEREKHOV at de.ibm.com>\n\n\t* nonportable.c (pthread_delay_np): Make a true\n\tcancelation point. Deferred cancels will interrupt the\n\twait.\n\n2002-02-07  Ross Johnson  <rpj at setup1.ise.canberra.edu.au\n\n\t* misc.c (ptw32_new): Add creation of cancelEvent so that\n\timplicit POSIX threads (Win32 threads with a POSIX face)\n\tare cancelable; mainly so that pthread_delay_np doesn't fail\n\tif called from the main thread.\n\t* create.c (pthread_create): Remove creation of cancelEvent\n\tfrom here; now in ptw32_new().\n\n\tReduce executable size.\n\t-----------------------\n\tWhen linking with the static library, only those\n\troutines actually called, either directly or indirectly\n\tshould be included.\n\n\t[Gcc has the -ffunction-segments option to do this but MSVC\n\tdoesn't have this feature as far as I can determine. Other\n\tcompilers are undetermined as well. - rpj]\n\n\t* barrier.c: All routines are now in separate compilation units;\n\tThis file is used to congregate the separate modules for\n\tpotential inline optimisation and backward build compatibility.\n\t* cancel.c: Likewise.\n\t* pthread_barrierattr_destroy.c: Separated routine from cancel.c.\n\t* pthread_barrierattr_getpshared.c: Likewise.\n\t* pthread_barrierattr_init.c: Likewise.\n\t* pthread_barrierattr_setpshared.c: Likewise.\n\t* pthread_barrier_destroy.c: Likewise.\n\t* pthread_barrier_init.c: Likewise.\n\t* pthread_barrier_wait.c: Likewise.\n\t* pthread_cancel.c: Likewise.\n\t* pthread_setcancelstate.c: Likewise.\n\t* pthread_setcanceltype.c: Likewise.\n\t* pthread_testcancel.c: Likewise.\n\n2002-02-04  Max Woodbury <mtew at cds.duke.edu>\n\n\tReduced name space pollution.\n\t-----------------------------\n\tWhen the appropriate symbols are defined, the headers\n\twill restrict the definitions of new names. In particular,\n\tit must be possible to NOT include the <windows.h>\n\theader and related definitions with some combination\n\tof symbol definitions. Secondly, it should be possible\n\tthat additional definitions should be limited to POSIX \n\tcompliant symbols by the definition of appropriate symbols.\n\n\t* pthread.h: POSIX conditionals.\n\t* sched.h: POSIX conditionals.\n\t* semaphore.h: POSIX conditionals.\n\n\t* semaphore.c: Included <limits.h>.\n\t(sem_init): Changed magic 0x7FFFFFFFL to INT_MAX.\n\t(sem_getvalue): Trial version.\n\n\tReduce executable size.\n\t-----------------------\n\tWhen linking with the static library, only those\n\troutines actually called, either directly or indirectly\n\tshould be included.\n\n\t[Gcc has the -ffunction-segments option to do this but MSVC\n\tdoesn't have this feature as far as I can determine. Other\n\tcompilers are undetermined as well. - rpj]\n\n\t* semaphore.c: All routines are now in separate compilation units;\n\tThis file is used to congregate the separate modules for\n\tpotential inline optimisation and backward build compatibility.\n\t* sem_close.c: Separated routine from semaphore.c.\n\t* ptw32_decrease_semaphore.c: Likewise.\n\t* sem_destroy.c: Likewise.\n\t* sem_getvalue.c: Likewise.\n\t* ptw32_increase_semaphore.c: Likewise.\n\t* sem_init.c: Likewise.\n\t* sem_open.c: Likewise.\n\t* sem_post.c: Likewise.\n\t* sem_post_multiple.c: Likewise.\n\t* sem_timedwait.c: Likewise.\n\t* sem_trywait.c: Likewise.\n\t* sem_unlink.c: Likewise.\n\t* sem_wait.c: Likewise.\n\n2002-02-04  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\tThe following extends the idea above to the rest of pthreads-win32 - rpj\n\t\n\t* attr.c: All routines are now in separate compilation units;\n\tThis file is used to congregate the separate modules for\n\tpotential inline optimisation and backward build compatibility.\n\t* pthread_attr_destroy.c: Separated routine from attr.c.\n\t* pthread_attr_getdetachstate.c: Likewise.\n\t* pthread_attr_getscope.c: Likewise.\n\t* pthread_attr_getstackaddr.c: Likewise.\n\t* pthread_attr_getstacksize.c: Likewise.\n\t* pthread_attr_init.c: Likewise.\n\t* pthread_attr_is_attr.c: Likewise.\n\t* pthread_attr_setdetachstate.c: Likewise.\n\t* pthread_attr_setscope.c: Likewise.\n\t* pthread_attr_setstackaddr.c: Likewise.\n\t* pthread_attr_setstacksize.c: Likewise.\n\n\t* pthread.c: Agregation of agregate modules for super-inlineability.\n\n2002-02-02  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* cancel.c: Rearranged some code and introduced checks\n\tto disable cancelation at the start of a thread's cancelation\n\trun to prevent double cancelation. The main problem\n\tarises if a thread is canceling and then receives a subsequent\n\tasync cancel request.\n\t* private.c: Likewise.\n\t* condvar.c: Place pragmas around cleanup_push/pop to turn\n\toff inline optimisation (/Obn where n>0 - MSVC only). Various\n\toptimisation switches in MSVC turn this on, which interferes with\n\tthe way that cleanup handlers are run in C++ EH and SEH\n\tcode. Application code compiled with inline optimisation must\n\talso wrap cleanup_push/pop blocks with the pragmas, e.g.\n\t  #pragma inline_depth(0)\n\t  pthread_cleanup_push(...)\n\t    ...\n\t  pthread_cleanup_pop(...)\n\t  #pragma inline_depth(8)\n\t* rwlock.c: Likewise.\n\t* mutex.c: Remove attempts to inline some functions.\n\t* signal.c: Modify misleading comment.\n\n2002-02-01  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* semaphore.c (sem_trywait): Fix missing errno return\n\tfor systems that define NEED_SEM (e.g. early WinCE).\n\t* mutex.c (pthread_mutex_timedlock): Return ENOTSUP\n\tfor systems that define NEED_SEM since they don't\n\thave sem_trywait().\n\n2002-01-27  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* mutex.c (pthread_mutex_timedlock): New function suggested by\n\tAlexander Terekhov. The logic required to implement this\n\tproperly came from Alexander, with some collaboration\n\twith Thomas Pfaff.\n\t(pthread_mutex_unlock): Wrap the waiters check and sema\n\tpost in a critical section to prevent a race with\n\tpthread_mutex_timedlock.\n\t(ptw32_timed_semwait): New function;\n\treturns a special result if the absolute timeout parameter\n\trepresents a time already passed when called; used by\n\tpthread_mutex_timedwait(). Have deliberately not reused\n\tthe name \"ptw32_sem_timedwait\" because they are not the same\n\troutine.\n\t* condvar.c (ptw32_cond_timedwait): Use the new sem_timedwait()\n\tinstead of ptw32_sem_timedwait(), which now has a different\n\tfunction. See previous.\n\t* implement.h: Remove prototype for ptw32_sem_timedwait.\n\tSee next.\n\t(pthread_mutex_t_): Add critical section element for access\n\tto lock_idx during mutex post-timeout processing.\n\t* semaphore.h (sem_timedwait): See next.\n\t* semaphore.c (sem_timedwait): See next.\n\t* private.c (ptw32_sem_timedwait): Move to semaphore.c\n\tand rename as sem_timedwait().\n\n2002-01-18  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* sync.c (pthread_join): Was getting the exit code from the\n\tcalling thread rather than the joined thread if\n\tdefined(__MINGW32__) && !defined(__MSVCRT__).\n\n2002-01-15  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* pthread.h: Unless the build explicitly defines __CLEANUP_SEH,\n\t__CLEANUP_CXX, or __CLEANUP_C, then the build defaults to\n\t__CLEANUP_C style cleanup. This style uses setjmp/longjmp\n\tin the cancelation and thread exit implementations and therefore\n\twon't do stack unwinding if linked to applications that have it\n\t(e.g. C++ apps). This is currently consistent with most/all\n\tcommercial Unix POSIX threads implementations.\n\n\t* spin.c (pthread_spin_init): Edit renamed function call.\n\t* nonportable.c (pthread_num_processors_np): New.\n\t(pthread_getprocessors_np): Renamed to ptw32_getprocessors\n\tand moved to private.c.\n\t* private.c (pthread_getprocessors): Moved here from\n\tnonportable.c.\n\t* pthread.def (pthread_getprocessors_np): Removed\n\tfrom export list.\n\n\t* rwlock.c (pthread_rwlockattr_init): New.\n\t(pthread_rwlockattr_destroy): New.\n\t(pthread_rwlockattr_getpshared): New.\n\t(pthread_rwlockattr_setpshared): New.\n\n2002-01-14  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* attr.c (pthread_attr_setscope): Fix struct pointer\n\tindirection error introduced 2002-01-04.\n\t(pthread_attr_getscope): Likewise.\n\n2002-01-12  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* pthread.dsp (SOURCE): Add missing source files.\n\n2002-01-08  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* mutex.c (pthread_mutex_trylock): use\n\tptw32_interlocked_compare_exchange function pointer\n\trather than ptw32_InterlockedCompareExchange() directly\n\tto retain portability to non-iX86 processors,\n\te.g. WinCE etc. The pointer will point to the native\n\tOS version of InterlockedCompareExchange() if the\n\tOS supports it (see ChangeLog entry of 2001-10-17).\n\n2002-01-07  Thomas Pfaff <tpfaff at gmx.net>, Alexander Terekhov <TEREKHOV at de.ibm.com>\n\n\t* mutex.c (pthread_mutex_init): Remove critical\n\tsection calls.\n\t(pthread_mutex_destroy): Likewise.\n\t(pthread_mutex_unlock): Likewise.\n\t(pthread_mutex_trylock): Likewise; uses\n\tptw32_InterlockedCompareExchange() to avoid need for\n\tcritical section; library is no longer i386 compatible;\n\trecursive mutexes now increment the lock count rather\n\tthan return EBUSY; errorcheck mutexes return EDEADLCK\n\trather than EBUSY. This behaviour is consistent with the\n\tSolaris pthreads implementation.\n\t* implement.h (pthread_mutex_t_): Remove critical\n\tsection element - no longer needed.\n\t\n\n2002-01-04  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* attr.c (pthread_attr_setscope): Add more error\n\tchecking and actually store the scope value even\n\tthough it's not really necessary.\n\t(pthread_attr_getscope): Return stored value.\n\t* implement.h (pthread_attr_t_): Add new scope element.\n\t* ANNOUNCE: Fix out of date comment next to\n\tpthread_attr_setscope in conformance section.\n\n2001-12-21  Alexander Terekhov <TEREKHOV at de.ibm.com>\n\n\t* mutex.c (pthread_mutex_lock): Decrementing lock_idx was\n\tnot thread-safe.\n\t(pthread_mutex_trylock): Likewise.\n\n2001-10-26  prionx@juno.com\n\n\t* semaphore.c (sem_init): Fix typo and missing bracket\n\tin conditionally compiled code. Only older versions of\n\tWinCE require this code, hence it doesn't normally get\n\ttested; somehow when sem_t reverted to an opaque struct\n\tthe calloc NULL check was left in the conditionally included\n\tsection.\n\t(sem_destroy): Likewise, the calloced sem_t wasn't being freed.\n\n2001-10-25  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* GNUmakefile (libwsock32): Add to linker flags for\n\tWSAGetLastError() and WSASetLastError().\n\t* Makefile (wsock32.lib): Likewise.\n\t* create.c: Minor mostly inert changes.\n\t* implement.h (PTW32_MAX): Move into here and renamed\n\tfrom sched.h.\n\t(PTW32_MIN): Likewise.\n\t* GNUmakefile (TEST_ICE): Define if testing internal\n\timplementation of InterlockedCompareExchange.\n\t* Makefile (TEST_ICE): Likewise.\n\t* private.c (TEST_ICE): Likewise.\n\t\n2001-10-24  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* attr.c (pthread_attr_setstacksize): Quell warning\n\tfrom LCC by conditionally compiling the stacksize\n\tvalidity check. LCC correctly warns that the condition\n\t(stacksize < PTHREAD_STACK_MIN) is suspicious\n\tbecause STACK_MIN is 0 and stacksize is of type\n\tsize_t (or unsigned int).\n\n2001-10-17  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* barrier.c: Move _LONG and _LPLONG defines into\n\timplement.h; rename to PTW32_INTERLOCKED_LONG and\n\tPTW32_INTERLOCKED_LPLONG respectively.\n\t* spin.c: Likewise; ptw32_interlocked_compare_exchange used\n\tin place of InterlockedCompareExchange directly.\n\t* global.c (ptw32_interlocked_compare_exchange): Add\n\tprototype for this new routine pointer to be used when\n\tInterlockedCompareExchange isn't supported by Windows.\n\t* nonportable.c (pthread_win32_process_attach_np): Check for\n\tsupport of InterlockedCompareExchange in kernel32 and assign its\n\taddress to ptw32_interlocked_compare_exchange if it exists, or\n\tour own ix86 specific implementation ptw32_InterlockedCompareExchange.\n\t*private.c (ptw32_InterlockedCompareExchange): An\n\timplementation of InterlockedCompareExchange() which is\n\tspecific to ix86; written directly in assembler for either\n\tMSVC or GNU C; needed because Windows 95 doesn't support\n\tInterlockedCompareExchange().\n\n\t* sched.c (sched_get_priority_min): Extend to return\n\tTHREAD_PRIORITY_IDLE.\n\t(sched_get_priority_max): Extend to return\n\tTHREAD_PRIORITY_CRITICAL.\n\n2001-10-15  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* spin.c (pthread_spin_lock): PTHREAD_SPINLOCK_INITIALIZER\n\twas causing a program fault.\n\t(pthread_spin_init): Could have alloced memory\n\twithout freeing under some error conditions.\n\n\t* mutex.c (pthread_mutex_init): Move memory\n\tallocation of mutex struct after checking for\n\tPROCESS_SHARED.\n\n2001-10-12  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* spin.c (pthread_spin_unlock): Was not returning\n\tEPERM if the spinlock was not locked, for multi CPU\n\tmachines.\n\n2001-10-08  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* spin.c (pthread_spin_trylock): Was not returning\n\tEBUSY for multi CPU machines.\n\n2001-08-24  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* condvar.c (pthread_cond_destroy): Remove cv element\n\tthat is no longer used.\n\t* implement.h: Likewise.\n\n2001-08-23  Alexander Terekhov <TEREKHOV at de.ibm.com>\n\n\t* condvar.c (pthread_cond_destroy): fix bug with\n\trespect to deadlock in the case of concurrent\n\t_destroy/_unblock; a condition variable can be destroyed\n\timmediately after all the threads that are blocked on\n\tit are awakened.\n\n2001-08-23  Phil Frisbie, Jr. <phil at hawksoft.com>\n\n\t* tsd.c (pthread_getspecific): Preserve the last\n\twinsock error [from WSAGetLastError()].\n\n2001-07-18  Scott McCaskill <scott at magruder.org>\n\n\t* mutex.c (pthread_mutexattr_init): Return ENOMEM\n\timmediately and don't dereference the NULL pointer\n\tif calloc fails.\n\t(pthread_mutexattr_getpshared): Don't dereference\n\ta pointer that is possibly NULL.\n\t* barrier.c (pthread_barrierattr_init): Likewise\n\t(pthread_barrierattr_getpshared): Don't dereference\n\ta pointer that is possibly NULL.\n\t* condvar.c (pthread_condattr_getpshared): Don't dereference\n\ta pointer that is possibly NULL.\n\n2001-07-15  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* rwlock.c (pthread_rwlock_wrlock): Is allowed to be\n\ta cancelation point; re-enable deferred cancelability\n\taround the CV call.\n\n2001-07-10  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* barrier.c: Still more revamping. The exclusive access\n\tmutex isn't really needed so it has been removed and replaced\n\tby an InterlockedDecrement(). nSerial has been removed.\n\tiStep is now dual-purpose. The process shared attribute\n\tis now stored in the barrier struct.\n\t* implement.h (pthread_barrier_t_): Lost some/gained one\n\telements.\n\t* private.c (ptw32_threadStart): Removed some comments.\n\n2001-07-10  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* barrier.c: Revamped to fix the race condition. Two alternating\n\tsemaphores are used instead of the PulseEvent. Also improved\n\toverall throughput by returning PTHREAD_BARRIER_SERIAL_THREAD\n\tto the first waking thread.\n\t* implement.h (pthread_barrier_t_): Revamped.\n\n2001-07-09  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* barrier.c: Fix several bugs in all routines. Now passes\n\ttests/barrier5.c which is fairly rigorous. There is still\n\ta non-optimal work-around for a race condition between\n\tthe barrier breeched event signal and event wait. Basically\n\tthe last (signalling) thread to hit the barrier yields\n\tto allow any other threads, which may have lost the race,\n\tto complete.\n\n2001-07-07  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* barrier.c: Changed synchronisation mechanism to a\n\tWin32 manual reset Event and use PulseEvent to signal\n\twaiting threads. If the implementation continued to use\n\ta semaphore it would require a second semaphore and\n\tsome management to use them alternately as barriers. A\n\tsingle semaphore allows threads to cascade from one barrier\n\tthrough the next, leaving some threads blocked at the first.\n\t* implement.h (pthread_barrier_t_): As per above.\n\t* general: Made a number of other routines inlinable.\n\n2001-07-07  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* spin.c: Revamped and working; included static initialiser.\n\tNow beta level.\n\t* barrier.c: Likewise.\n\t* condvar.c: Macro constant change; inline auto init routine.\n\t* mutex.c: Likewise.\n\t* rwlock.c: Likewise.\n\t* private.c: Add support for spinlock initialiser.\n\t* global.c: Likewise.\n\t* implement.h: Likewise.\n\t* pthread.h (PTHREAD_SPINLOCK_INITIALIZER): Fix typo.\n\n2001-07-05  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* barrier.c: Remove static initialisation - irrelevent\n\tfor this object.\n\t* pthread.h (PTHREAD_BARRIER_INITIALIZER): Removed.\n\t* rwlock.c (pthread_rwlock_wrlock): This routine is\n\tnot a cancelation point - disable deferred\n\tcancelation around call to pthread_cond_wait().\n\n2001-07-05  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* spin.c: New module implementing spin locks.\n\t* barrier.c: New module implementing barriers.\n\t* pthread.h (_POSIX_SPIN_LOCKS): defined.\n\t(_POSIX_BARRIERS): Defined.\n\t(pthread_spin_*): Defined.\n\t(pthread_barrier*): Defined.\n\t(PTHREAD_BARRIER_SERIAL_THREAD): Defined.\n\t* implement.h (pthread_spinlock_t_): Defined.\n\t(pthread_barrier_t_): Defined.\n\t(pthread_barrierattr_t_): Defined.\n\n\t* mutex.c (pthread_mutex_lock): Return with the error\n\tif an auto-initialiser initialisation fails.\n\n\t* nonportable.c (pthread_getprocessors_np): New; gets the\n\tnumber of available processors for the current process.\n\n2001-07-03  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* pthread.h (_POSIX_READER_WRITER_LOCKS): Define it\n\tif not already defined.\n\n2001-07-01  Alexander Terekhov <TEREKHOV at de.ibm.com>\n\n\t* condvar.c: Fixed lost signal bug reported by Timur Aydin\n\t(taydin@snet.net).\n\t[RPJ (me) didn't translate the original algorithm\n\tcorrectly.]\n\t* semaphore.c: Added sem_post_multiple; this is a useful\n\troutine, but it doesn't appear to be standard. For now it's\n\tnot an exported function.\n\t\n2001-06-25  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* create.c (pthread_create): Add priority inheritance\n\tattributes.\n\t* mutex.c (pthread_mutex_lock): Remove some overhead for\n\tPTHREAD_MUTEX_NORMAL mutex types. Specifically, avoid\n\tcalling pthread_self() and pthread_equal() to check/set\n\tthe mutex owner. Introduce a new pseudo owner for this\n\ttype. Test results suggest increases in speed of up to\n\t90% for non-blocking locks.\n\tThis is the default type of mutex used internally by other\n\tsynchronising objects, ie. condition variables and\n\tread-write locks. The test rwlock7.c shows about a\n\t30-35% speed increase over snapshot 2001-06-06. The\n\tprice of this is that the application developer\n\tmust ensure correct behaviour, or explicitly set the\n\tmutex to a safer type such as PTHREAD_MUTEX_ERRORCHECK.\n\tFor example, PTHREAD_MUTEX_NORMAL (or PTHREAD_MUTEX_DEFAULT)\n\ttype mutexes will not return an error if a thread which is not\n\tthe owner calls pthread_mutex_unlock. The call will succeed\n\tin unlocking the mutex if it is currently locked, but a\n\tsubsequent unlock by the true owner will then fail with EPERM.\n\tThis is however consistent with some other implementations.\n\t(pthread_mutex_unlock): Likewise.\n\t(pthread_mutex_trylock): Likewise.\n\t(pthread_mutex_destroy): Likewise.\n\t* attr.c (pthread_attr_init): PTHREAD_EXPLICIT_SCHED is the\n\tdefault inheritance attribute; THREAD_PRIORITY_NORMAL is\n\tthe default priority for new threads.\n\t* sched.c (pthread_attr_setschedpolicy): Added routine.\n\t(pthread_attr_getschedpolicy): Added routine.\n\t(pthread_attr_setinheritsched): Added routine.\n\t(pthread_attr_getinheritsched): Added routine.\n\t* pthread.h (sched_rr_set_interval): Added as a macro;\n\treturns -1 with errno set to ENOSYS.\n\n2001-06-23  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t*sched.c (pthread_attr_setschedparam): Add priority range\n\tcheck.\n\t(sched_setscheduler): New function; checks for a valid\n\tpid and policy; checks for permission to set information\n\tin the target process; expects pid to be a Win32 process ID,\n\tnot a process handle; the only scheduler policy allowed is\n\tSCHED_OTHER.\n\t(sched_getscheduler): Likewise, but checks for permission\n\tto query.\n\t* pthread.h (SCHED_*): Moved to sched.h as defined in the\n\tPOSIX standard.\n\t* sched.h (SCHED_*): Moved from pthread.h.\n\t(pid_t): Defined if necessary.\n\t(sched_setscheduler): Defined.\n\t(sched_getscheduler): Defined.\n\t* pthread.def (sched_setscheduler): Exported.\n\t(sched_getscheduler): Likewise.\n\n2001-06-23  Ralf Brese <Ralf.Brese at pdb4.siemens.de>\n\n\t* create.c (pthread_create): Set thread priority from\n\tthread attributes.\n\n2001-06-18  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* Made organisational-only changes to UWIN additions.\n\t* dll.c (dllMain): Moved UWIN process attach code\n\tto pthread_win32_process_attach_np(); moved\n\tinstance of pthread_count to global.c.\n\t* global.c (pthread_count): Moved from dll.c.\n\t* nonportable.c (pthread_win32_process_attach_np):\n\tMoved _UWIN code to here from dll.c.\n\t* implement.h (pthread_count): Define extern int.\n\t* create.c (pthread_count): Remove extern int.\n\t* private.c (pthread_count): Likewise.\n\t* exit.c (pthread_count): Likewise.\n\n2001-06-18  David Korn <dgk at research.att.com>\n\n\t* dll.c: Added changes necessary to work with UWIN.\n\t* create.c: Likewise.\n\t* pthread.h: Likewise.\n\t* misc.c: Likewise.\n\t* exit.c: Likewise.\n\t* private.c: Likewise.\n\t* implement.h: Likewise.\n\tThere is some room at the start of struct pthread_t_\n\tto implement the signal semantics in UWIN's posix.dll\n\talthough this is not yet complete.\n\t* Nmakefile: Compatible with UWIN's Nmake utility.\n\t* Nmakefile.tests: Likewise - for running the tests.\n\n2001-06-08  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* semaphore.h (sem_t): Fixed for compile and test.\n\t* implement.h (sem_t_): Likewise.\n\t* semaphore.c: Likewise.\n\t* private.c (ptw32_sem_timedwait): Updated to use new\n\topaque sem_t.\n\n2001-06-06  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* semaphore.h (sem_t): Is now an opaque pointer;\n\tmoved actual definition to implement.h.\n\t* implement.h (sem_t_): Move here from semaphore.h;\n\twas the definition of sem_t.\n\t* semaphore.c: Wherever necessary, changed use of sem\n\tfrom that of a pointer to a pointer-pointer; added\n\textra checks for a valid sem_t; NULL sem_t when\n\tit is destroyed; added extra checks when creating\n\tand destroying sem_t elements in the NEED_SEM\n\tcode branches; changed from using a pthread_mutex_t\n\t((*sem)->mutex) to CRITICAL_SECTION ((*sem)->sem_lock_cs)\n\tin NEED_SEM branches for access serialisation.\n\n2001-06-06  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* mutex.c (pthread_mutexattr_init): Remove \n\tptw32_mutex_default_kind.\n\t\n2001-06-05  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* nonportable.c (pthread_mutex_setdefaultkind_np):\n\tRemove - should not have been included in the first place.\n\t(pthread_mutex_getdefaultkind_np): Likewise.\n\t* global.c (ptw32_mutex_default_kind): Likewise.\n\t* mutex.c (pthread_mutex_init): Remove use of\n\tptw32_mutex_default_kind.\n\t* pthread.h (pthread_mutex_setdefaultkind_np): Likewise.\n\t(pthread_mutex_getdefaultkind_np): Likewise.\n\t* pthread.def (pthread_mutexattr_setkind_np): Added.\n\t(pthread_mutexattr_getkind_np): Likewise.\n\n\t* README: Many changes that should have gone in before\n\tthe last snapshot.\n\t* README.NONPORTABLE: New - referred to by ANNOUNCE\n\tbut never created; documents the non-portable routines\n\tincluded in the library - moved from README with new\n\troutines added.\n\t* ANNOUNCE (pthread_mutexattr_setkind_np): Added to\n\tcompliance list.\n\t(pthread_mutexattr_getkind_np): Likewise.\n\n2001-06-04  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* condvar.c: Add original description of the algorithm as\n\tdeveloped by Terekhov and Thomas, plus reference to\n\tREADME.CV.\n\n2001-06-03  Alexander Terekhov <TEREKHOV at de.ibm.com>, Louis Thomas <lthomas at arbitrade.com>\n\n\t* condvar.c (pthread_cond_init): Completely revamped.\n\t(pthread_cond_destroy): Likewise.\n\t(ptw32_cond_wait_cleanup): Likewise.\n\t(ptw32_cond_timedwait): Likewise.\n\t(ptw32_cond_unblock): New general signaling routine.\n\t(pthread_cond_signal): Now calls ptw32_cond_unblock.\n\t(pthread_cond_broadcast): Likewise.\n\t* implement.h (pthread_cond_t_): Revamped.\n\t* README.CV: New; explanation of the above changes.\n\n2001-05-30  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* pthread.h (rand_r): Fake using _seed argument to quell\n\tcompiler warning (compiler should optimise this away later).\n\n\t* GNUmakefile (OPT): Leave symbolic information out of the library\n\tand increase optimisation level - for smaller faster prebuilt\n\tdlls.\n\t\n2001-05-29  Milan Gardian <Milan.Gardian at LEIBINGER.com>\n\n\t* Makefile: fix typo.\n\t* pthreads.h: Fix problems with stdcall/cdecl conventions, in particular\n\tremove the need for PT_STDCALL everywhere; remove warning supression.\n\t* (errno): Fix the longstanding \"inconsistent dll linkage\" problem\n\twith errno; now also works with /MD debugging libs - \n\twarnings emerged when compiling pthreads library with /MD (or /MDd)\n\tcompiler switch, instead of /MT (or /MTd) (i.e. when compiling pthreads\n\tusing Multithreaded DLL CRT instead of Multithreaded statically linked\n\tCRT).\n\t* create.c (pthread_create): Likewise; fix typo.\n\t* private.c (ptw32_threadStart): Eliminate use of terminate() which doesn't\n\tthrow exceptions.\n\t* Remove unnecessary #includes from a number of modules -\n\t[I had to #include malloc.h in implement.h for gcc - rpj].\n\n2001-05-29  Thomas Pfaff <tpfaff at gmx.net>\n\n\t* pthread.h (PTHREAD_MUTEX_DEFAULT): New; equivalent to\n\tPTHREAD_MUTEX_DEFAULT_NP.\n\t* (PTHREAD_MUTEX_NORMAL): Similarly.\n\t* (PTHREAD_MUTEX_ERRORCHECK): Similarly.\n\t* (PTHREAD_MUTEX_RECURSIVE): Similarly.\n\t* (pthread_mutex_setdefaultkind_np): New; Linux compatibility stub\n\tfor pthread_mutexattr_settype.\n\t* (pthread_mutexattr_getkind_np): New; Linux compatibility stub\n\tfor pthread_mutexattr_gettype.\n\t* mutex.c (pthread_mutexattr_settype): New; allow\n\tthe following types of mutex:\n\t  PTHREAD_MUTEX_DEFAULT_NP\n\t  PTHREAD_MUTEX_NORMAL_NP\n\t  PTHREAD_MUTEX_ERRORCHECK_NP\n\t  PTHREAD_MUTEX_RECURSIVE_NP\n\t* Note that PTHREAD_MUTEX_DEFAULT is equivalent to\n\tPTHREAD_MUTEX_NORMAL - ie. mutexes should no longer\n\tbe recursive by default, and a thread will deadlock if it\n\ttries to relock a mutex it already owns. This is inline with\n\tother pthreads implementations.\n\t* (pthread_mutex_lock): Process the lock request\n\taccording to the mutex type.\n\t* (pthread_mutex_init): Eliminate use of Win32 mutexes as the\n\tbasis of POSIX mutexes - instead, a combination of one critical section\n\tand one semaphore are used in conjunction with Win32 Interlocked* routines.\n\t* (pthread_mutex_destroy): Likewise.\n\t* (pthread_mutex_lock): Likewise.\n\t* (pthread_mutex_trylock): Likewise.\n\t* (pthread_mutex_unlock): Likewise.\n\t* Use longjmp/setjmp to implement cancelation when building the library\n\tusing a C compiler which doesn't support exceptions, e.g. gcc -x c (note\n\tthat gcc -x c++ uses exceptions).\n\t* Also fixed some of the same typos and eliminated PT_STDCALL as\n\tMilan Gardian's patches above.\n\n2001-02-07  Alexander Terekhov <TEREKHOV at de.ibm.com>\n\n\t* rwlock.c: Revamped.\n\t* implement.h (pthread_rwlock_t_): Redefined.\n\tThis implementation does not have reader/writer starvation problem.\n\tRwlock attempts to behave more like a normal mutex with\n\traces and scheduling policy determining who is more important;\n\tIt also supports recursive locking,\n\thas less synchronization overhead (no broadcasts at all,\n\treaders are not blocked on any condition variable) and seem to\n\tbe faster than the current implementation [W98 appears to be\n\tapproximately 15 percent faster at least - on top of speed increase\n\tfrom Thomas Pfaff's changes to mutex.c - rpj].\n\n2000-12-29  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* Makefile: Back-out \"for\" loops which don't work.\n\n\t* GNUmakefile: Remove the fake.a target; add the \"realclean\"\n\ttarget; don't remove built libs under the \"clean\" target.\n\n\t* config.h: Add a guard against multiple inclusion.\n\n\t* semaphore.h: Add some defines from config.h to make\n\tsemaphore.h independent of config.h when building apps.\n\n\t* pthread.h (_errno): Back-out previous fix until we know how to\n\tfix it properly.\n\n\t* implement.h (lockCount): Add missing element to pthread_mutex_t_.\n\n\t* sync.c (pthread_join): Spelling fix in comment.\n\n\t* private.c (ptw32_threadStart): Reset original termination\n\tfunction (C++).\n\t(ptw32_threadStart): Cleanup detached threads early in case\n\tthe library is statically linked.\n\t(ptw32_callUserDestroyRoutines): Remove [SEH] __try block from\n\tdestructor call so that unhandled exceptions will be passed through\n\tto the \tsystem; call terminate() from [C++] try block for the same\n\treason.\n\n\t* tsd.c (pthread_getspecific): Add comment.\n\n\t* mutex.c (pthread_mutex_init): Initialise new elements in\n\tpthread_mutex_t.\n\t(pthread_mutex_unlock): Invert \"pthread_equal()\" test.\n\n2000-12-28  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* semaphore.c (mode_t): Use ifndef HAVE_MODE_T to include definition.\n\n\t* config.h.in (HAVE_MODE_T): Added.\n\t(_UWIN): Start adding defines for the UWIN package.\n\n\t* private.c (ptw32_threadStart): Unhandled exceptions are\n\tnow passed through to the system to deal with. This is consistent\n\twith normal Windows behaviour. C++ applications may use\n\tset_terminate() to override the default behaviour which is\n\tto call ptw32_terminate(). Ptw32_terminate() cleans up some\n\tPOSIX thread stuff before calling the system default function\n\twhich calls abort(). The users termination function should conform\n\tto standard C++ semantics which is to not return. It should\n\texit the thread (call pthread_exit()) or exit the application.\n\t* private.c (ptw32_terminate): Added as the default set_terminate()\n\tfunction. It calls the system default function after cleaning up\n\tsome POSIX thread stuff.\n\n\t* implement.h (ptw32_try_enter_critical_section): Move\n\tdeclaration.\n\t* global.c (ptw32_try_enter_critical_section): Moved\n\tfrom dll.c.\n\t* dll.c: Move process and thread attach/detach code into\n\tfunctions in nonportable.c.\n\t* nonportable.c (pthread_win32_process_attach_np): Process\n\tattach code from dll.c is now available to static linked\n\tapplications.\n\t* nonportable.c (pthread_win32_process_detach_np): Likewise.\n\t* nonportable.c (pthread_win32_thread_attach_np): Likewise.\n\t* nonportable.c (pthread_win32_thread_detach_np): Likewise.\n\n\t* pthread.h: Add new non-portable prototypes for static\n\tlinked applications.\n\n\t* GNUmakefile (OPT): Increase optimisation flag and remove\n\tdebug info flag.\n\n\t* pthread.def: Add new non-portable exports for static\n\tlinked applications.\n\n2000-12-11  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* FAQ: Update Answer 6 re getting a fully working\n\tMingw32 built library.\n\n2000-10-10  Steven Reddie <smr at essemer.com.au>\n \n        * misc.c (pthread_self): Restore Win32 \"last error\"\n        cleared by TlsGetValue() call in\n        pthread_getspecific()\n \n2000-09-20  Arthur Kantor <akantor at bexusa.com>\n \n        * mutex.c (pthread_mutex_lock): Record the owner\n        of the mutex. This requires also keeping count of\n        recursive locks ourselves rather than leaving it\n        to Win32 since we need to know when to NULL the\n        thread owner when the mutex is unlocked.\n        (pthread_mutex_trylock): Likewise.\n        (pthread_mutex_unlock): Check that the calling\n        thread owns the mutex, decrement the recursive\n        lock count, and NULL the owner if zero. Return\n        EPERM if the mutex is owned by another thread.\n        * implement.h (pthread_mutex_t_): Add ownerThread\n        and lockCount members.\n\n2000-09-13  Jef Gearhart <jgearhart at tpssys.com>\n\n\t* mutex.c (pthread_mutex_init): Call\n\tTryEnterCriticalSection through the pointer\n\trather than directly so that the dll can load\n\ton Windows versions that can't resolve the\n\tfunction, eg. Windows 95\n\n2000-09-09  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* pthread.h (ctime_r): Fix arg.\n\n2000-09-08  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* GNUmakefile(_WIN32_WINNT=0x400): Define in CFLAGS;\n\tdoesn't seem to be needed though.\n\n\t* cancel.c (pthread_cancel): Must get \"self\" through\n\tcalling pthread_self() which will ensure a POSIX thread\n\tstruct is built for non-POSIX threads; return an error\n\tif this fails\n\t- Ollie Leahy <ollie at mpt.ie>\n\t(pthread_setcancelstate): Likewise.\n\t(pthread_setcanceltype): Likewise.\n\t* misc.c (ptw32_cancelable_wait): Likewise.\n\n\t* private.c (ptw32_tkAssocCreate): Remove unused #if 0\n\twrapped code.\n\n\t* pthread.h (ptw32_get_exception_services_code):\n\tNeeded to be forward declared unconditionally.\n\n2000-09-06  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* cancel.c (pthread_cancel): If called from the main\n\tthread \"self\" would be NULL; get \"self\" via pthread_self()\n\tinstead of directly from TLS so that an implicit\n\tpthread object is created.\n\n\t* misc.c (pthread_equal): Strengthen test for NULLs.\n\n2000-09-02  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* condvar.c (ptw32_cond_wait_cleanup): Ensure that all\n\twaking threads check if they are the last, and notify\n\tthe broadcaster if so - even if an error occurs in the\n\twaiter.\n\n\t* semaphore.c (_decrease_semaphore): Should be\n\ta call to ptw32_decrease_semaphore.\n\t(_increase_semaphore): Should be a call to\n\tptw32_increase_semaphore.\n\n\t* misc.c (ptw32_cancelable_wait): Renamed from\n\tCancelableWait.\n\t* rwlock.c (_rwlock_check*): Renamed to\n\tptw32_rwlock_check*.\n\t* mutex.c (_mutex_check*): Renamed to ptw32_mutex_check*.\n\t* condvar.c (cond_timed*): Renamed to ptw32_cond_timed*.\n\t(_cond_check*): Renamed to ptw32_cond_check*.\n\t(cond_wait_cleanup*): Rename to ptw32_cond_wait_cleanup*.\n\t(ptw32_cond_timedwait): Add comments.\n\n2000-08-22  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* private.c (ptw32_throw): Fix exception test;\n\tmove exceptionInformation declaration.\n\n\t* tsd.c (pthread_key_create): newkey wrongly declared.\n\n\t* pthread.h: Fix comment block.\n\n2000-08-18  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* mutex.c (pthread_mutex_destroy): Check that the mutex isn't\n\theld; invalidate the mutex as early as possible to avoid\n\tcontention; not perfect - FIXME!\n\n\t* rwlock.c (pthread_rwlock_init): Remove redundant assignment\n\tto \"rw\".\n\t(pthread_rwlock_destroy): Invalidate the rwlock before\n\tfreeing up any of it's resources - to avoid contention.\n\n\t* private.c (ptw32_tkAssocCreate): Change assoc->lock\n\tto use a dynamically initialised mutex - only consumes\n\ta W32 mutex or critical section when first used,\n\tnot before.\n\n\t* mutex.c (pthread_mutex_init): Remove redundant assignment\n\tto \"mx\".\n\t(pthread_mutexattr_destroy): Set attribute to NULL\n\tbefore freeing it's memory - to avoid contention.\n\n\t* implement.h (PTW32_EPS_CANCEL/PTW32_EPS_EXIT):\n\tMust be defined for all compilers - used as generic\n\texception selectors by ptw32_throw().\n\n\t* Several: Fix typos from scripted edit session\n\tyesterday.\n\n\t* nonportable.c (pthread_mutexattr_setforcecs_np):\n\tMoved this function from mutex.c.\n\t(pthread_getw32threadhandle_np): New function to\n\treturn the win32 thread handle that the POSIX\n\tthread is using.\n\t* mutex.c (pthread_mutexattr_setforcecs_np):\n\tMoved to new file \"nonportable.c\".\n\n\t* pthread.h (PTW32_BUILD): Only\tredefine __except\n\tand catch compiler keywords if we aren't building\n\tthe library (ie. PTW32_BUILD is not defined) - \n\tthis is safer than defining and then undefining\n\tif not building the library.\n\t* implement.h: Remove __except and catch undefines.\n\t* Makefile (CFLAGS): Define PTW32_BUILD.\n\t* GNUmakefile (CFLAGS): Define PTW32_BUILD.\n\n\t* All appropriate: Change Pthread_exception* to\n\tptw32_exception* to be consistent with internal\n\tidentifier naming.\n\n\t* private.c (ptw32_throw): New function to provide\n\ta generic exception throw for all internal\n\texceptions and EH schemes.\n\t(ptw32_threadStart): pthread_exit() value is now\n\treturned via the thread structure exitStatus\n\telement.\n\t* exit.c (pthread_exit): pthread_exit() value is now\n\treturned via the thread structure exitStatus\n\telement.\n\t* cancel.c (ptw32_cancel_self): Now uses ptw32_throw.\n\t(pthread_setcancelstate): Ditto.\n\t(pthread_setcanceltype): Ditto.\n\t(pthread_testcancel): Ditto.\n\t(pthread_cancel): Ditto.\n\t* misc.c (CancelableWait): Ditto.\n\t* exit.c (pthread_exit): Ditto.\n\t* All applicable: Change PTW32_ prefix to\n\tPTW32_ prefix to remove leading underscores\n\tfrom private library identifiers.\n\n2000-08-17  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* All applicable: Change _pthread_ prefix to\n\tptw32_ prefix to remove leading underscores\n\tfrom private library identifiers (single\n\tand double leading underscores are reserved in the\n\tANSI C standard for compiler implementations).\n\n\t* tsd.c (pthread_create_key): Initialise temporary\n\tkey before returning it's address to avoid race\n\tconditions.\n\n2000-08-13  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* errno.c: Add _MD precompile condition; thus far\n\thad no effect when using /MD compile option but I\n\tthnk it should be there.\n\n\t* exit.c: Add __cplusplus to various #if lines;\n\twas compiling SEH code even when VC++ had\n\tC++ compile options.\n\n\t* private.c: ditto.\n\n\t* create.c (pthread_create): Add PT_STDCALL macro to\n\tfunction pointer arg in _beginthread().\n\n\t* pthread.h: PT_STDCALL really does need to be defined\n\tin both this and impliment.h; don't set it to __cdecl\n\t- this macro is only used to extend function pointer\n\tcasting for functions that will be passed as parameters.\n\t(~PThreadCleanup): add cast and group expression.\n\t(_errno): Add _MD compile conditional.\n\t(PtW32NoCatchWarn): Change pragma message.\n\n\t* implement.h: Move and change PT_STDCALL define.\n\n\t* need_errno.h: Add _MD to compilation conditional.\n\n\t* GNUmakefile: Substantial rewrite for new naming\n\tconvention; set for nil optimisation (turn it up\n\twhen we have a working library build; add target\n\t\"fake.a\" to build a libpthreadw32.a from the VC++\n\tbuilt DLL pthreadVCE.dll.\n\n\t* pthread.def (LIBRARY): Don't specify in the .def\n\tfile - it is specified on the linker command line\n\tsince we now use the same .def file for variously\n\tnamed .dlls.\n\n\t* Makefile: Substantial rewrite for new naming\n\tconvention; default nmake target only issues a\n\thelp message; run nmake with specific target\n\tcorresponding to the EH scheme being used.\n\n\t* README: Update information; add naming convention\n\texplanation.\n\n\t* ANNOUNCE: Update information.\n\n2000-08-12  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* pthread.h: Add compile-time message when using\n\tMSC_VER compiler and C++ EH to warn application\n\tprogrammers to use PtW32Catch instead of catch(...)\n\tif they want cancelation and pthread_exit to work.\n\n\t* implement.h: Remove #include <semaphore.h>; we\n\tuse our own local semaphore.h.\n\n2000-08-10  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* cleanup.c (pthread_pop_cleanup): Remove _pthread\n\tprefix from __except and catch keywords; implement.h\n\tnow simply undefines ptw32__except and\n\tptw32_catch if defined; VC++ was not textually\n\tsubstituting ptw32_catch etc back to catch as\n\tit was redefined; the reason for using the prefixed\n\tversion was to make it clear that it was not using\n\tthe pthread.h redefined catch keyword.\n\n\t* private.c (ptw32_threadStart): Ditto.\n\t(ptw32_callUserDestroyRoutines): Ditto.\n\n\t* implement.h (ptw32__except): Remove #define.\n\t(ptw32_catch): Remove #define.\n\n\t* GNUmakefile (pthread.a): New target to build\n\tlibpthread32.a from pthread.dll using dlltool.\n\n\t* buildlib.bat: Duplicate cl commands with args to\n\tbuild C++ EH version of pthread.dll; use of .bat\n\tfiles is redundant now that nmake compatible\n\tMakefile is included; used as a kludge only now.\n\n\t* Makefile: Localise some macros and fix up the clean:\n\ttarget to extend it and work properly.\n\n\t* CONTRIBUTORS: Add contributors.\n\n\t* ANNOUNCE: Updated.\n\n\t* README: Updated.\n\n2000-08-06  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* pthread.h: Remove #warning - VC++ doesn't accept it.\n\n2000-08-05  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* pthread.h (PtW32CatchAll): Add macro. When compiling\n\tapplications using VC++ with C++ EH rather than SEH\n\t'PtW32CatchAll' must be used in place of any 'catch( ... )'\n\tif the application wants pthread cancelation or\n\tpthread_exit() to work.\n\n2000-08-03  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* pthread.h: Add a base class ptw32_exception for\n\tlibrary internal exceptions and change the \"catch\"\n\tre-define macro to use it.\n\n2000-08-02  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* GNUmakefile (CFLAGS): Add -mthreads.\n\tAdd new targets to generate cpp and asm output.\n\n\t* sync.c (pthread_join): Remove dead code.\n\n2000-07-25  Tristan Savatier <tristan at mpegtv.com>\n\n\t* sched.c (sched_get_priority_max): Handle different WinCE and\n\tWin32 priority values together.\n\t(sched_get_priority_min): Ditto.\n\n2000-07-25  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* create.c (pthread_create): Force new threads to wait until\n\tpthread_create has the new thread's handle; we also retain\n\ta local copy of the handle for internal use until\n\tpthread_create returns.\n\n\t* private.c (ptw32_threadStart): Initialise ei[].\n\t(ptw32_threadStart): When beginthread is used to start the\n\tthread, force waiting until the creator thread had the \n\tthread handle.\n\n\t* cancel.c (ptw32_cancel_thread): Include context switch\n\tcode for defined(_X86_) environments in addition to _M_IX86.\n\n\t* rwlock.c (pthread_rwlock_destroy): Assignment changed\n\tto avoid compiler warning.\n\n\t* private.c (ptw32_get_exception_services_code): Cast\n\tNULL return value to avoid compiler warning.\n\n\t* cleanup.c (pthread_pop_cleanup): Initialise \"cleanup\" variable\n\tto avoid compiler warnings.\n\n\t* misc.c (ptw32_new): Change \"new\" variable to \"t\" to avoid\n\tconfusion with the C++ keyword of the same name.\n\n\t* condvar.c (cond_wait_cleanup): Initialise lastWaiter variable.\n\t(cond_timedwait): Remove unused local variables. to avoid\n\tcompiler warnings.\n\n\t* dll.c (dllMain): Remove 2000-07-21 change - problem\n\tappears to be in pthread_create().\n\n2000-07-22  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* tsd.c (pthread_key_create): If a destructor was given\n\tand the pthread_mutex_init failed, then would try to\n\treference a NULL pointer (*key); eliminate this section of\n\tcode by using a dynamically initialised mutex\n\t(PTHREAD_MUTEX_INITIALIZER).\n\n\t* tsd.c (pthread_setspecific): Return an error if\n\tunable to set the value; simplify cryptic conditional.\n\n\t* tsd.c (pthread_key_delete): Locking threadsLock relied\n\ton mutex_lock returning an error if the key has no destructor.\n\tThreadsLock is only initialised if the key has a destructor.\n\tMaking this mutex a static could reduce the number of mutexes\n\tused by an application since it is actually created only at\n\tfirst use and it's often destroyed soon after.\n\t\n2000-07-22  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* FAQ: Added Q5 and Q6.\n\n2000-07-21  David Baggett <dmb at itasoftware.com>\n\n\t* dll.c: Include resource leakage work-around. This is a\n\tpartial FIXME which doesn't stop all leakage. The real\n\tproblem needs to be found and fixed.\n\n2000-07-21  Ross Johnson  <rpj at setup1.ise.canberra.edu.au>\n\n\t* create.c (pthread_create): Set threadH to 0 (zero)\n\teverywhere. Some assignments were using NULL. Maybe\n\tit should be NULL everywhere - need to check. (I know\n\tthey are nearly always the same thing - but not by\n\tdefinition.)\n\n\t* misc.c (pthread_self): Try to catch NULL thread handles\n\tat the point where they might be generated, even though\n\tthey should always be valid at this point.\n\n\t* tsd.c (pthread_setspecific): return an error value if\n\tpthread_self() returns NULL.\n\n\t* sync.c (pthread_join): return an error value if\n\tpthread_self() returns NULL.\n\n\t* signal.c (pthread_sigmask): return an error value if\n\tpthread_self() returns NULL.\n\n2000-03-02  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* attr.c (pthread_attr_init): Set default stacksize to zero (0)\n\trather than PTHREAD_STACK_MIN even though these are now the same.\n\n\t* pthread.h (PTHREAD_STACK_MIN): Lowered to 0.\n\n2000-01-28  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* mutex.c (pthread_mutex_init): Free mutex if it has been alloced;\n\tif critical sections can be used instead of Win32 mutexes, test\n\tthat the critical section works and return an error if not.\n\n2000-01-07  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* cleanup.c (pthread_pop_cleanup): Include SEH code only if MSC is not\n\tcompiling as C++.\n\t(pthread_push_cleanup): Include SEH code only if MSC is not\n\tcompiling as C++.\n\n\t* pthread.h: Include SEH code only if MSC is not\n\tcompiling as C++.\n\n\t* implement.h: Include SEH code only if MSC is not\n\tcompiling as C++.\n\n\t* cancel.c (ptw32_cancel_thread): Add _M_IX86 check.\n\t(pthread_testcancel): Include SEH code only if MSC is not\n\tcompiling as C++.\n\t(ptw32_cancel_self): Include SEH code only if MSC is not\n\tcompiling as C++.\n\n2000-01-06  Erik Hensema <erik.hensema at group2000.nl>\n\n\t* Makefile: Remove inconsistencies in 'cl' args\n\n2000-01-04  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* private.c (ptw32_get_exception_services_code): New; returns\n\tvalue of EXCEPTION_PTW32_SERVICES.\n\t(ptw32_processInitialize): Remove initialisation of\n\tptw32_exception_services which is no longer needed.\n\n\t* pthread.h (ptw32_exception_services): Remove extern.\n\t(ptw32_get_exception_services_code): Add function prototype;\n\tuse this to return EXCEPTION_PTW32_SERVICES value instead of\n\tusing the ptw32_exception_services variable which I had\n\ttrouble exporting through pthread.def.\n\n\t* global.c (ptw32_exception_services): Remove declaration.\n\n1999-11-22  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* implement.h: Forward declare ptw32_new();\n\n\t* misc.c (ptw32_new): New; alloc and initialise a new pthread_t.\n\t(pthread_self): New thread struct is generated \tby new routine\n\tptw32_new().\n\n\t* create.c (pthread_create): New thread struct is generated\n\tby new routine ptw32_new().\n\n1999-11-21  Ross Johnson  <rpj at special.ise.canberra.edu.au>\n\n\t* global.c (ptw32_exception_services): Declare new variable. \n\n\t* private.c (ptw32_threadStart): Destroy thread's\n\tcancelLock mutex; make 'catch' and '__except' usageimmune to\n\tredfinitions in pthread.h.\n\t(ptw32_processInitialize): Init new constant ptw32_exception_services.\n\n\t* create.c (pthread_create): Initialise thread's cancelLock\n\tmutex.\n\n\t* cleanup.c (pthread_pop_cleanup): Make 'catch' and '__except'\n\tusage immune to redfinition s in pthread.h.\n\n\t* private.c: Ditto.\n\n\t* pthread.h (catch): Redefine 'catch' so that C++ applications\n\twon't catch our internal exceptions.\n\t(__except): ditto for __except.\n\n\t* implement.h (ptw32_catch): Define internal version\n\tof 'catch' because 'catch' is redefined by pthread.h.\n\t(__except): ditto for __except.\n\t(struct pthread_t_): Add cancelLock mutex for async cancel\n\tsafety.\n\n1999-11-21  Jason Nye <jnye at nbnet.nb.ca>, Erik Hensema <erik.hensema at group2000.nl>\n\n\t* cancel.c (ptw32_cancel_self): New; part of the async\n\tcancellation implementation.\n\t(ptw32_cancel_thread): Ditto; this function is X86\n\tprocessor specific.\n\t(pthread_setcancelstate): Add check for pending async\n\tcancel request and cancel the calling thread if\n\trequired; add async-cancel safety lock.\n\t(pthread_setcanceltype): Ditto.\n\n1999-11-13  Erik Hensema <erik.hensema at group2000.nl>\n\n\t* configure.in (AC_OUTPUT): Put generated output into GNUmakefile\n\trather than Makefile. Makefile will become the MSC nmake compatible\n\tversion\n\n1999-11-13  John Bossom (John.Bossom@cognos.com>\n\n\t* misc.c (pthread_self): Add a note about GetCurrentThread\n\treturning a pseudo-handle\n\n1999-11-10  Todd Owen <towen at lucidcalm.dropbear.id.au>\n\n\t* dll.c (dllMain): Free kernel32 ASAP.\n\tIf TryEnterCriticalSection is not being used, then free\n\tthe kernel32.dll handle now, rather than leaving it until\n\tDLL_PROCESS_DETACH.\n\n\tNote: this is not a pedantic exercise in freeing unused\n\tresources!  It is a work-around for a bug in Windows 95\n\t(see microsoft knowledge base article, Q187684) which\n\tdoes Bad Things when FreeLibrary is called within\n\tthe DLL_PROCESS_DETACH code, in certain situations.\n\tSince w95 just happens to be a platform which does not\n\tprovide TryEnterCriticalSection, the bug will be\n\teffortlessly avoided.\n\n1999-11-10  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* sync.c (pthread_join): Make it a deferred cancelation point.\n\n\t* misc.c (pthread_self): Explicitly initialise implicitly\n\tcreated thread state to default values.\n\n1999-11-05  Tristan Savatier <tristan at mpegtv.com>\n\n\t* pthread.h (winsock.h): Include unconditionally.\n\t(ETIMEDOUT): Change fallback value to that defined by winsock.h.\n\t\n\t* general: Patched for portability to WinCE. The details are\n\tdescribed in the file WinCE-PORT. Follow the instructions\n\tin README.WinCE to make the appropriate changes in config.h.\n\n1999-10-30  Erik Hensema <erik.hensema at group2000.nl>\n\n\t* create.c (pthread_create): Explicitly initialise thread state to\n\tdefault values.\n\n\t* cancel.c (pthread_setcancelstate): Check for NULL 'oldstate'\n\tfor compatibility with Solaris pthreads;\n\t(pthread_setcanceltype): ditto:\n\n1999-10-23  Erik Hensema <erik.hensema at group2000.nl>\n\n\t* pthread.h (ctime_r): Fix incorrect argument \"_tm\"\n\n1999-10-21  Aurelio Medina <aureliom at crt.com>\n\n\t* pthread.h (_POSIX_THREADS): Only define it if it isn't\n\talready defined. Projects may need to define this on\n\tthe CC command line under Win32 as it doesn't have unistd.h\n\n1999-10-17  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* rwlock.c (pthread_rwlock_destroy): Add cast to remove compile\n\twarning.\n\n\t* condvar.c (pthread_cond_broadcast): Only release semaphores\n\tif there are waiting threads.\n\n1999-10-15  Lorin Hochstein <lmh at xiphos.ca>, Peter Slacik <Peter.Slacik at tatramed.sk>\n\n\t* condvar.c (cond_wait_cleanup): New static cleanup handler for\n\tcond_timedwait;\n\t(cond_timedwait): pthread_cleanup_push args changed;\n\tcanceling a thread while it's in pthread_cond_wait\n\twill now decrement the waiters count and cleanup if it's the\n\tlast waiter.\n\n1999-10-15  Graham Dumpleton <Graham.Dumpleton at ra.pad.otc.telstra.com.au>\n\n\t* condvar.c (cond_wait_cleanup): the last waiter will now reset the CV's\n\twasBroadcast flag\n\nThu Sep 16 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* rwlock.c (pthread_rwlock_destroy): Add serialisation.\n\t(_rwlock_check_need_init): Check for detroyed rwlock.\n\t* rwlock.c: Check return codes from _rwlock_check_need_init();\n\tmodify comments; serialise access to rwlock objects during\n\toperations; rename rw_mutex to rw_lock.\n\t* implement.h: Rename rw_mutex to rw_lock.\n\t* mutex.c (pthread_mutex_destroy): Add serialisation.\n\t(_mutex_check_need_init): Check for detroyed mutex.\n\t* condvar.c (pthread_cond_destroy): Add serialisation.\n\t(_cond_check_need_init): Check for detroyed condvar.\n\t* mutex.c: Modify comments.\n\t* condvar.c: Modify comments.\n\n1999-08-10  Aurelio Medina  <aureliom at crt.com>\n\n\t* implement.h (pthread_rwlock_t_): Add.\n\t* pthread.h (pthread_rwlock_t): Add.\n\t(PTHREAD_RWLOCK_INITIALIZER): Add.\n\tAdd rwlock function prototypes.\n\t* rwlock.c: New module.\n\t* pthread.def: Add new rwlock functions.\n\t* private.c (ptw32_processInitialize): initialise\n\tptw32_rwlock_test_init_lock critical section.\n\t* global.c (ptw32_rwlock_test_init_lock): Add.\n\n\t* mutex.c (pthread_mutex_destroy): Don't free mutex memory\n\tif mutex is PTHREAD_MUTEX_INITIALIZER and has not been\n\tinitialised yet.\n\n1999-08-08 Milan Gardian <mg at tatramed.sk>\n\n\t* mutex.c (pthread_mutex_destroy): Free mutex memory.\n\n1999-08-22  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* exit.c (pthread_exit): Fix reference to potentially\n\tuninitialised pointer.\n\n1999-08-21  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* private.c (ptw32_threadStart): Apply fix of 1999-08-19\n\tthis time to C++ and non-trapped C versions. Ommitted to\n\tdo this the first time through.\n\n1999-08-19  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* private.c (ptw32_threadStart): Return exit status from\n\tthe application thread startup routine.\n\t- Milan Gardian <mg at tatramed.sk>\n\n1999-08-18  John Bossom <john.Bossom at cognos.com>\n\n\t* exit.c (pthread_exit): Put status into pthread_t->exitStatus\n\t* private.c (ptw32_threadStart): Set pthread->exitStatus\n\ton exit of try{} block.\n\t* sync.c (pthread_join): use pthread_exitStatus value if the\n\tthread exit doesn't return a value (for Mingw32 CRTDLL\n\twhich uses endthread instead of _endthreadex).\n\nTue Aug 17 20:17:58 CDT 1999  Mumit Khan  <khan at xraylith.wisc.edu>\n\n        * create.c (pthread_create): Add CRTDLL suppport.\n        * exit.c (pthread_exit): Likewise.\n        * private.c (ptw32_threadStart): Likewise.\n        (ptw32_threadDestroy): Likewise.\n        * sync.c (pthread_join): Likewise.\n        * tests/join1.c (main): Warn about partial support for CRTDLL.\n\nTue Aug 17 20:00:08 1999  Mumit Khan  <khan at xraylith.wisc.edu>\n\n        * Makefile.in (LD): Delete entry point.\n        * acconfig.h (STDCALL): Delete unused macro.\n        * configure.in: Remove test for STDCALL.\n        * config.h.in: Regenerate.\n        * errno.c (_errno): Fix self type.\n        * pthread.h (PT_STDCALL): Move from here to\n        * implement.h (PT_STDCALL): here.\n        (ptw32_threadStart): Fix prototype.\n        * private.c (ptw32_threadStart): Likewise.\n\n1999-08-14  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* exit.c (pthread_exit): Don't call pthread_self() but\n\tget thread handle directly from TSD for efficiency.\n\t\n1999-08-12  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* private.c (ptw32_threadStart): ei[] only declared if _MSC_VER.\n\n\t* exit.c (pthread_exit): Check for implicitly created threads\n\tto avoid raising an unhandled exception.\n\t\n1999-07-12  Peter Slacik <Peter.Slacik at tatramed.sk>\n\n\t* condvar.c (pthread_cond_destroy): Add critical section.\n\t(cond_timedwait): Add critical section; check for timeout\n\twaiting on semaphore.\n\t(pthread_cond_broadcast): Add critical section.\n\n1999-07-09  Lorin Hochstein <lmh at xiphos.ca>, John Bossom <John.Bossom at Cognos.COM>\n\n\tThe problem was that cleanup handlers were not executed when\n\tpthread_exit() was called.\n\n\t* implement.h (pthread_t_): Add exceptionInformation element for\n\tC++ per-thread exception information.\n\t(general): Define and rename exceptions.\n\n1999-07-09  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* misc.c (CancelableWait):  PTW32_EPS_CANCEL (SEH) and\n\tptw32_exception_cancel (C++) used to identify the exception.\n\n\t* cancel.c (pthread_testcancel): PTW32_EPS_CANCEL (SEH) and\n\tptw32_exception_cancel (C++) used to identify the exception.\n\n\t* exit.c (pthread_exit): throw/raise an exception to return to\n\tptw32_threadStart() to exit the thread. PTW32_EPS_EXIT (SEH)\n\tand ptw32_exception_exit (C++) used to identify the exception.\n\n\t* private.c (ptw32_threadStart): Add pthread_exit exception trap;\n\tclean up and exit the thread directly rather than via pthread_exit().\n\nSun May 30 00:25:02 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* semaphore.h (mode_t): Conditionally typedef it.\n\nFri May 28 13:33:05 1999  Mark E. Armstrong <avail at pacbell.net>\n\n\t* condvar.c (pthread_cond_broadcast): Fix possible memory fault\n\t\nThu May 27 13:08:46 1999  Peter Slacik <Peter.Slacik at tatramed.sk>\n\n\t* condvar.c (pthread_cond_broadcast): Fix logic bug\n\nThu May 27 13:08:46 1999  Bossom, John <John.Bossom at Cognos.COM>\n\n\t* condvar.c (pthread_cond_broadcast): optimise sem_post loop\n\nFri May 14 12:13:18 1999  Mike Russo <miker at eai.com>\n\n\t* attr.c (pthread_attr_setdetachstate): Fix logic bug\n\nSat May  8 09:42:30 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.def (sem_open): Add.\n\t(sem_close): Add.\n\t(sem_unlink): Add.\n\t(sem_getvalue): Add.\n\n\t* FAQ (Question 3): Add.\n\nThu Apr  8 01:16:23 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* semaphore.c (sem_open): New function; returns an error (ENOSYS).\n\t(sem_close): ditto.\n\t(sem_unlink): ditto.\n\t(sem_getvalue): ditto.\n\n\t* semaphore.h (_POSIX_SEMAPHORES): define.\n\t\nWed Apr  7 14:09:52 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* errno.c (_REENTRANT || _MT): Invert condition.\n\n\t* pthread.h (_errno): Conditionally include prototype.\n\nWed Apr  7 09:37:00 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* *.c (comments): Remove individual attributions - these are\n\tdocumented sufficiently elsewhere.\n\n\t* implement.h (pthread.h): Remove extraneous include.\n\nSun Apr  4 11:05:57 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* sched.c (sched.h): Include.\n\n\t* sched.h: New file for POSIX 1b scheduling.\n\n\t* pthread.h: Move opaque structures to implement.h; move sched_*\n\tprototypes out and into sched.h.\n\n\t* implement.h: Add opaque structures from pthread.h.\n\n\t* sched.c (sched_yield): New function.\n\n\t* condvar.c (ptw32_sem_*): Rename to sem_*; except for\n\tptw32_sem_timedwait which is an private function.\n\nSat Apr  3 23:28:00 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* Makefile.in (OBJS): Add errno.o.\n\nFri Apr  2 11:08:50 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h (ptw32_sem_*): Remove prototypes now defined in\n\tsemaphore.h.\n\n\t* pthread.h (sempahore.h): Include.\n\n\t* semaphore.h: New file for POSIX 1b semaphores.\n\n\t* semaphore.c (ptw32_sem_timedwait): Moved to private.c.\n\n\t* pthread.h (ptw32_sem_t): Change to sem_t. \n\n\t* private.c (ptw32_sem_timedwait): Moved from semaphore.c;\n\tset errno on error.\n\n\t* pthread.h (pthread_t_): Add per-thread errno element.\n\nFri Apr  2 11:08:50 1999  John Bossom <jebossom at cognos.com>\n\n\t* semaphore.c (ptw32_sem_*): Change to sem_*; these functions\n\twill be exported from the library; set errno on error.\n\n\t* errno.c (_errno): New file. New function.\n\nFri Mar 26 14:11:45 1999  Tor Lillqvist <tml at iki.fi>\n\n\t* semaphore.c (ptw32_sem_timedwait): Check for negative\n\tmilliseconds.\n\nWed Mar 24 11:32:07 1999  John Bossom <jebossom at cognos.com>\n\n\t* misc.c (CancelableWait): Initialise exceptionInformation[2].\n\t(pthread_self): Get a real Win32 thread handle for implicit threads.\n\n\t* cancel.c (pthread_testcancel): Initialise exceptionInformation[2].\n\n\t* implement.h (SE_INFORMATION): Fix values.\n\n\t* private.c (ptw32_threadDestroy): Close the thread handle.\n\nFri Mar 19 12:57:27 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* cancel.c (comments): Update and cleanup.\n\nFri Mar 19 09:12:59 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* private.c (ptw32_threadStart): status returns PTHREAD_CANCELED.\n\n\t* pthread.h (PTHREAD_CANCELED): defined.\n\nTue Mar 16  1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* all: Add GNU LGPL and Copyright and Warranty.\n\t\nMon Mar 15 00:20:13 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* condvar.c (pthread_cond_init): fix possible uninitialised use\n\tof cv.\n\nSun Mar 14 21:01:59 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* condvar.c (pthread_cond_destroy): don't do full cleanup if\n\tstatic initialised cv has never been used.\n\t(cond_timedwait): check result of auto-initialisation.\n\nThu Mar 11 09:01:48 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.h (pthread_mutex_t): revert to (pthread_mutex_t *);\n\tdefine a value to serve as PTHREAD_MUTEX_INITIALIZER.\n\t(pthread_mutex_t_): remove staticinit and valid elements.\n\t(pthread_cond_t): revert to (pthread_cond_t_ *);\n\tdefine a value to serve as PTHREAD_COND_INITIALIZER.\n\t(pthread_cond_t_): remove staticinit and valid elements.\n\n\t* mutex.c (pthread_mutex_t args): adjust indirection of references.\n\t(all functions): check for PTHREAD_MUTEX_INITIALIZER value;\n\tcheck for NULL (invalid).\n\n\t* condvar.c (pthread_cond_t args): adjust indirection of references.\n\t(all functions): check for PTHREAD_COND_INITIALIZER value;\n\tcheck for NULL (invalid).\n\nWed Mar 10 17:18:12 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* misc.c (CancelableWait): Undo changes from Mar 8 and 7.\n\nMon Mar  8 11:18:59 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* misc.c (CancelableWait): Ensure cancelEvent handle is the lowest\n\tindexed element in the handles array. Enhance test for abandoned\n\tobjects.\n\n\t* pthread.h (PTHREAD_MUTEX_INITIALIZER): Trailing elements not\n\tinitialised are set to zero by the compiler. This avoids the\n\tproblem of initialising the opaque critical section element in it.\n\t(PTHREAD_COND_INITIALIZER): Ditto.\n\n\t* semaphore.c (ptw32_sem_timedwait): Check sem == NULL earlier.\n\nSun Mar  7 12:31:14 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* condvar.c (pthread_cond_init): set semaphore initial value\n\tto 0, not 1. cond_timedwait was returning signaled immediately.\n\n\t* misc.c (CancelableWait): Place the cancel event handle first\n\tin the handle table for WaitForMultipleObjects. This ensures that\n\tthe cancel event is recognised and acted apon if both objects\n\thappen to be signaled together.\n\n\t* private.c (ptw32_cond_test_init_lock): Initialise and destroy.\n\n\t* implement.h (ptw32_cond_test_init_lock): Add extern.\n\n\t* global.c (ptw32_cond_test_init_lock): Add declaration. \n\n\t* condvar.c (pthread_cond_destroy): check for valid initialised CV;\n\tflag destroyed CVs as invalid.\n\t(pthread_cond_init): pthread_cond_t is no longer just a pointer.\n\tThis is because PTHREAD_COND_INITIALIZER needs state info to reside\n\tin pthread_cond_t so that it can initialise on first use. Will work on\n\tmaking pthread_cond_t (and other objects like it) opaque again, if\n\tpossible, later.\n\t(cond_timedwait): add check for statically initialisation of\n\tCV; initialise on first use.\n\t(pthread_cond_signal): check for valid CV.\n\t(pthread_cond_broadcast): check for valid CV.\n\t(_cond_check_need_init): Add.\n\n\t* pthread.h (PTHREAD_COND_INITIALIZER): Fix.\n\t(pthread_cond_t): no longer a pointer to pthread_cond_t_.\n\t(pthread_cond_t_): add 'staticinit' and 'valid' elements.\n\nSat Mar 6 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h: Undate comments.\n\nSun Feb 21 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.h (PTHREAD_MUTEX_INITIALIZER): missing braces around\n\tcs element initialiser.\n\n1999-02-21  Ben Elliston  <bje at cygnus.com>\n\n\t* pthread.h (pthread_exit): The return type of this function is\n\tvoid, not int.\n\n\t* exit.c (pthread_exit): Do not return 0.\n\nSat Feb 20 16:03:30 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* dll.c (DLLMain): Expand TryEnterCriticalSection support test.\n\n\t* mutex.c (pthread_mutex_trylock): The check for\n\tptw32_try_enter_critical_section == NULL should have been\n\tremoved long ago.\n\nFri Feb 19 16:03:30 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* sync.c (pthread_join): Fix pthread_equal() test.\n\n\t* mutex.c (pthread_mutex_trylock): Check mutex != NULL before\n\tusing it.\n\nThu Feb 18 16:17:30 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* misc.c (pthread_equal): Fix inverted result.\n\n\t* Makefile.in: Use libpthread32.a as the name of the DLL export\n\tlibrary instead of pthread.lib.\n\n\t* condvar.c (pthread_cond_init): cv could have been used unitialised;\n\tinitialise.\n\n\t* create.c (pthread_create): parms could have been used unitialised;\n\tinitialise.\n\n\t* pthread.h (struct pthread_once_t_): Remove redefinition.\n\nSat Feb 13 03:03:30 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.h (struct pthread_once_t_): Replaced.\n\n\t* misc.c (pthread_once): Replace with John Bossom's version;\n\thas lighter weight serialisation; fixes problem of not holding\n\tcompeting threads until after the init_routine completes.\n\nThu Feb 11 13:34:14 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* misc.c (CancelableWait): Change C++ exception throw.\n\n\t* sync.c (pthread_join): Change FIXME comment - issue resolved.\n\nWed Feb 10 12:49:11 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* configure: Various temporary changes.\n\t- Kevin Ruland <Kevin.Ruland at anheuser-busch.com>\n\n\t* README: Update.\n\n\t* pthread.def (pthread_attr_getstackaddr): uncomment\n\t(pthread_attr_setstackaddr): uncomment\n\nFri Feb  5 13:42:30 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* semaphore.c: Comment format changes.\n\nThu Feb  4 10:07:28 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* global.c: Remove ptw32_exception instantiation.\n\n\t* cancel.c (pthread_testcancel): Change C++ exception throw.\n\n\t* implement.h: Remove extern declaration.\n\nWed Feb  3 13:04:44 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* cleanup.c: Rename ptw32_*_cleanup() to pthread_*_cleanup().\n\n\t* pthread.def: Ditto.\n\t\n\t* pthread.h: Ditto.\n\n\t* pthread.def (pthread_cleanup_push): Remove from export list;\n\tthe function is defined as a macro under all compilers.\n\t(pthread_cleanup_pop): Ditto.\n\n\t* pthread.h: Remove #if defined().\n\nWed Feb  3 10:13:48 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* sync.c (pthread_join): Check for NULL value_ptr arg;\n\tcheck for detached threads.\n\nTue Feb  2 18:07:43 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* implement.h: Add #include <pthread.h>.\n\tChange sem_t to ptw32_sem_t.\n\nTue Feb  2 18:07:43 1999  Kevin Ruland <Kevin.Ruland at anheuser-busch.com>\n\n\t* signal.c (pthread_sigmask): Add and modify casts.\n\tReverse LHS/RHS bitwise assignments.\n\n\t* pthread.h: Remove #include <semaphore.h>.\n\t(PTW32_ATTR_VALID): Add cast.\n\t(struct pthread_t_): Add sigmask element.\n\n\t* dll.c: Add \"extern C\" for DLLMain.\n\t(DllMain): Add cast.\n\n\t* create.c (pthread_create): Set sigmask in thread.\n\n\t* condvar.c: Remove #include. Change sem_* to ptw32_sem_*.\n\n\t* attr.c: Changed #include.\n\n\t* Makefile.in: Additional targets and changes to build the library\n\tas a DLL.\n\nFri Jan 29 11:56:28 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* Makefile.in (OBJS): Add semaphore.o to list.\n\n\t* semaphore.c (ptw32_sem_timedwait): Move from private.c.\n\tRename sem_* to ptw32_sem_*.\n\n\t* pthread.h (pthread_cond_t): Change type of sem_t.\n\t_POSIX_SEMAPHORES no longer defined.\n\n\t* semaphore.h: Contents moved to implement.h.\n\tRemoved from source tree.\n\n\t* implement.h: Add semaphore function prototypes and rename all\n\tfunctions to prepend 'ptw32_'. They are\n\tnow private to the pthreads-win32 implementation.\n\n\t* private.c: Change #warning.\n\tMove ptw32_sem_timedwait() to semaphore.c.\n\n\t* cleanup.c: Change #warning.\n\n\t* misc.c: Remove #include <errno.h>\n\n\t* pthread.def: Cleanup CVS merge conflicts.\n\n\t* global.c: Ditto.\n\n\t* ChangeLog: Ditto.\n\n\t* cleanup.c: Ditto.\n\nSun Jan 24 01:34:52 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* semaphore.c (sem_wait): Remove second arg to \n\tpthreadCancelableWait() call.\n\nSat Jan 23 17:36:40 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.def: Add new functions to export list.\n\n\t* pthread.h (PTHREAD_MUTEX_AUTO_CS_NP): New.\n\t(PTHREAD_MUTEX_FORCE_CS_NP): New.\n\n\t* README: Updated.\n\nFri Jan 22 14:31:59 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* Makefile.in (CFLAGS): Remove -fhandle-exceptions. Not needed\n\twith egcs. Add -g for debugging.\n\n\t* create.c (pthread_create): Replace __stdcall with PT_STDCALL\n\tmacro. This is a hack and must be fixed.\n\n\t* misc.c (CancelableWait): Remove redundant statement.\n\n\t* mutex.c (pthread_mutexattr_init): Cast calloc return value.\n\n\t* misc.c (CancelableWait): Add cast.\n\t(pthread_self): Add cast.\n\n\t* exit.c (pthread_exit): Add cast.\n\n\t* condvar.c (pthread_condattr_init): Cast calloc return value.\n\n\t* cleanup.c: Reorganise conditional compilation.\n\n\t* attr.c (pthread_attr_init): Remove unused 'result'.\n\tCast malloc return value.\n\n\t* private.c (ptw32_callUserDestroyRoutines): Redo conditional\n\tcompilation.\n\n\t* misc.c (CancelableWait): C++ version uses 'throw'.\n\n\t* cancel.c (pthread_testcancel): Ditto.\n\n\t* implement.h (class ptw32_exception): Define for C++.\n\n\t* pthread.h: Fix C, C++, and Win32 SEH condition compilation\n\tmayhem around pthread_cleanup_* defines. C++ version now uses John\n\tBossom's cleanup handlers.\n\t(pthread_attr_t): Make 'valid' unsigned.\n\tDefine '_timeb' as 'timeb' for Ming32.\n\tDefine PT_STDCALL as nothing for Mingw32. May be temporary.\n\n\t* cancel.c (pthread_testcancel): Cast return value.\n\nWed Jan 20 09:31:28 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.h (pthread_mutexattr_t): Changed to a pointer.\n\n\t* mutex.c (pthread_mutex_init): Conditionally create Win32 mutex\n\t- from John Bossom's implementation.\n\t(pthread_mutex_destroy): Conditionally close Win32 mutex\n\t- from John Bossom's implementation.\n\t(pthread_mutexattr_init): Replaced by John Bossom's version.\n\t(pthread_mutexattr_destroy): Ditto.\n\t(pthread_mutexattr_getpshared): New function from John Bossom's\n\timplementation.\n\t(pthread_mutexattr_setpshared): New function from John Bossom's\n\timplementation.\n\nTue Jan 19 18:27:42 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* pthread.h (pthreadCancelableTimedWait): New prototype.\n\t(pthreadCancelableWait): Remove second argument.\n\n\t* misc.c (CancelableWait): New static function is \n\tpthreadCancelableWait() renamed.\n\t(pthreadCancelableWait): Now just calls CancelableWait() with\n\tINFINITE timeout.\n\t(pthreadCancelableTimedWait): Just calls CancelableWait()\n\twith passed in timeout.\n\nTue Jan 19 18:27:42 1999  Scott Lightner <scott at curriculum.com>\n\n\t* private.c (ptw32_sem_timedwait): 'abstime' arg really is\n\tabsolute time. Calculate relative time to wait from current\n\ttime before passing timeout to new routine \n\tpthreadCancelableTimedWait().\n\nTue Jan 19 10:27:39 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.h (pthread_mutexattr_setforcecs_np): New prototype.\n\t\n\t* mutex.c (pthread_mutexattr_init): Init 'pshared' and 'forcecs'\n\tattributes to 0.\n\t(pthread_mutexattr_setforcecs_np): New function (not portable).\n\n\t* pthread.h (pthread_mutex_t): \n\tAdd 'mutex' element. Set to NULL in PTHREAD_MUTEX_INITIALIZER.\n\tThe pthread_mutex_*() routines will try to optimise performance\n\tby choosing either mutexes or critical sections as the basis\n\tfor pthread mutexes for each indevidual mutex.\n\t(pthread_mutexattr_t_): Add 'forcecs' element.\n\tSome applications may choose to force use of critical sections\n\tif they know that:-\n\t     the mutex is PROCESS_PRIVATE and, \n\t         either the OS supports TryEnterCriticalSection() or\n\t         pthread_mutex_trylock() will never be called on the mutex.\n\tThis attribute will be setable via a non-portable routine.\n\n\tNote: We don't yet support PROCESS_SHARED mutexes, so the\n\timplementation as it stands will default to Win32 mutexes only if\n\tthe OS doesn't support TryEnterCriticalSection. On Win9x, and early\n\tversions of NT 'forcecs' will need to be set in order to get\n\tcritical section based mutexes.\n\nSun Jan 17 12:01:26 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.h (PTHREAD_MUTEX_INITIALIZER): Init new 'staticinit'\n\tvalue to '1' and existing 'valid' value to '1'.\n\n\t* global.c (ptw32_mutex_test_init_lock): Add.\n\n\t* implement.h (ptw32_mutex_test_init_lock.): Add extern.\n\n\t* private.c (ptw32_processInitialize): Init critical section for\n\tglobal lock used by _mutex_check_need_init().\n\t(ptw32_processTerminate): Ditto (:s/Init/Destroy/).\n\n\t* dll.c (dllMain): Move call to FreeLibrary() so that it is only\n\tcalled once when the process detaches.\n\n\t* mutex.c (_mutex_check_need_init): New static function to test\n\tand init PTHREAD_MUTEX_INITIALIZER mutexes. Provides serialised\n\taccess to the internal state of the uninitialised static mutex. \n\tCalled from pthread_mutex_trylock() and pthread_mutex_lock() which\n\tdo a quick unguarded test to check if _mutex_check_need_init()\n\tneeds to be called. This is safe as the test is conservative\n \tand is repeated inside the guarded section of \n\t_mutex_check_need_init(). Thus in all calls except the first\n\tcalls to lock static mutexes, the additional overhead to lock any\n\tmutex is a single memory fetch and test for zero.\n\n\t* pthread.h (pthread_mutex_t_): Add 'staticinit' member. Mutexes\n\tinitialised by PTHREAD_MUTEX_INITIALIZER aren't really initialised\n\tuntil the first attempt to lock it. Using the 'valid'\n\tflag (which flags the mutex as destroyed or not) to record this\n\tinformation would be messy. It is possible for a statically\n\tinitialised mutex such as this to be destroyed before ever being\n\tused.\n\n\t* mutex.c (pthread_mutex_trylock): Call _mutex_check_need_init()\n\tto test/init PTHREAD_MUTEX_INITIALIZER mutexes.\n\t(pthread_mutex_lock): Ditto.\n\t(pthread_mutex_unlock): Add check to ensure we don't try to unlock\n\tan unitialised static mutex.\n\t(pthread_mutex_destroy): Add check to ensure we don't try to delete\n\ta critical section that we never created. Allows us to destroy\n\ta static mutex that has never been locked (and hence initialised).\n\t(pthread_mutex_init): Set 'staticinit' flag to 0 for the new mutex.\n\nSun Jan 17 12:01:26 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* private.c (ptw32_sem_timedwait): Move from semaphore.c.\n\n\t* semaphore.c : Remove redundant #includes.\n\t(ptw32_sem_timedwait): Move to private.c.\n\t(sem_wait): Add missing abstime arg to pthreadCancelableWait() call.\n\nFri Jan 15 23:38:05 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* condvar.c (cond_timedwait): Remove comment.\n\nFri Jan 15 15:41:28 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* pthread.h: Add new 'abstime' arg to pthreadCancelableWait()\n\tprototype.\n\n\t* condvar.c (cond_timedwait): New generalised function called by\n\tboth pthread_cond_wait() and pthread_cond_timedwait(). This is\n\tessentially pthread_cond_wait() renamed and modified to add the\n\t'abstime' arg and call the new ptw32_sem_timedwait() instead of\n\tsem_wait().\n\t(pthread_cond_wait): Now just calls the internal static\n\tfunction cond_timedwait() with an INFINITE wait.\n\t(pthread_cond_timedwait): Now implemented. Calls the internal\n\tstatic function cond_timedwait().\n\n\t* implement.h (ptw32_sem_timedwait): New internal function\n\tprototype.\n\n\t* misc.c (pthreadCancelableWait): Added new 'abstime' argument\n\tto allow shorter than INFINITE wait.\n\n\t* semaphore.c (ptw32_sem_timedwait): New function for internal\n\tuse.  This is essentially sem_wait() modified to add the\n        'abstime' arg and call the modified (see above)\n        pthreadCancelableWait().\n\nThu Jan 14 14:27:13 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* cleanup.c: Correct _cplusplus to __cplusplus wherever used.\n\n\t* Makefile.in: Add CC=g++ and add -fhandle-exceptions to CFLAGS.\n\tThe derived Makefile will compile all units of the package as C++\n\tso that those which include try/catch exception handling should work\n\tproperly. The package should compile ok if CC=gcc, however, exception\n\thandling will not be included and thus thread cancellation, for\n \texample, will not work.\n\n\t* cleanup.c (ptw32_pop_cleanup): Add #warning to compile this\n \tfile as C++ if using a cygwin32 environment. Perhaps the whole package\n\tshould be compiled using g++ under cygwin.\n\n\t* private.c (ptw32_threadStart): Change #error directive\n\tinto #warning and bracket for __CYGWIN__ and derivative compilers.\n\nWed Jan 13 09:34:52 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* build.bat: Delete old binaries before compiling/linking.\n\nTue Jan 12 09:58:38 1999  Tor Lillqvist <tml at iki.fi>\n\n\t* dll.c: The Microsoft compiler pragmas probably are more\n\tappropriately protected by _MSC_VER than by _WIN32.\n\n\t* pthread.h: Define ETIMEDOUT. This should be returned by\n\tpthread_cond_timedwait which is not implemented yet as of\n\tsnapshot-1999-01-04-1305. It was implemented in the older version.\n\tThe Microsoft compiler pragmas probably are more appropriately\n\tprotected by _MSC_VER than by _WIN32.\n\n\t* pthread.def: pthread_mutex_destroy was missing from the def file\n\n\t* condvar.c (pthread_cond_broadcast): Ensure we only wait on threads\n\tif there were any waiting on the condition.\n\tI think pthread_cond_broadcast should do the WaitForSingleObject\n\tonly if cv->waiters > 0? Otherwise it seems to hang, at least in the\n\ttestg thread program from glib.\n\nTue Jan 12 09:58:38 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* condvar.c (pthread_cond_timedwait): Fix function description\n\tcomments.\n\n\t* semaphore.c (sem_post): Correct typo in comment.\n\nMon Jan 11 20:33:19 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.h: Re-arrange conditional compile of pthread_cleanup-*\n\tmacros.\n\n\t* cleanup.c (ptw32_push_cleanup): Provide conditional \n\tcompile of cleanup->prev.\n\n1999-01-11  Tor Lillqvist <tml at iki.fi>\n\n\t* condvar.c (pthread_cond_init): Invert logic when testing the\n\treturn value from calloc().\n\nSat Jan  9 14:32:08 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h: Compile-time switch for CYGWIN derived environments\n\tto use CreateThread instead of _beginthreadex. Ditto for ExitThread.\n\tPatch provided by Anders Norlander  <anorland at hem2.passagen.se>.\n\nTue Jan  5 16:33:04 1999  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* cleanup.c (ptw32_pop_cleanup): Add C++ version of __try/__except\n\tblock. Move trailing \"}\" out of #ifdef _WIN32 block left there by\n\t(rpj's) mistake.\n\n\t* private.c: Remove #include <errno.h> which is included by pthread.h.\n\n1998-12-11  Ben Elliston  <bje at toilet.to.cygnus.com>\n\n\t* README: Update info about subscribing to the mailing list.\n\nMon Jan  4 11:23:40 1999  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* all: No code changes, just cleanup.\n\t- remove #if 0 /* Pre Bossom */ enclosed code.\n\t- Remove some redundant #includes.\n\t* pthread.h: Update implemented/unimplemented routines list.\n\t* Tag the bossom merge branch getting ready to merge back to main\n\ttrunk.\n\nTue Dec 29 13:11:16 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h: Move the following struct definitions to pthread.h:\n\tpthread_t_, pthread_attr_t_, pthread_mutex_t_, pthread_mutex_t_,\n\tpthread_mutexattr_t_, pthread_key_t_, pthread_cond_t_,\n\tpthread_condattr_t_, pthread_once_t_.\n\n\t* pthread.h: Add \"_\" prefix to pthread_push_cleanup and \n\tpthread_pop_cleanup internal routines, and associated struct and\n\ttypedefs.\n\n\t* buildlib.bat: Add compile command for semaphore.c\n\n\t* pthread.def: Comment out pthread_atfork routine name. \n\tNow unimplemented.\n\n\t* tsd.c (pthread_setspecific): Rename tkAssocCreate to\n\tptw32_tkAssocCreate.\n\t(pthread_key_delete): Rename tkAssocDestroy to\n\tptw32_tkAssocDestroy.\n\n\t* sync.c (pthread_join): Rename threadDestroy to ptw32_threadDestroy\n\n\t* sched.c (is_attr): attr is now **attr (was *attr), so add extra\n\tNULL pointer test.\n\t(pthread_attr_setschedparam): Increase redirection for attr which is\n\tnow a **.\n\t(pthread_attr_getschedparam): Ditto.\n\t(pthread_setschedparam): Change thread validation and rename \"thread\"\n \tWin32 thread Handle element name to match John Bossom's version.\n\t(pthread_getschedparam): Ditto.\n\n\t* private.c (ptw32_threadDestroy): Rename call to\n\tcallUserDestroyRoutines() as ptw32_callUserDestroyRoutines()\n\n\t* misc.c: Add #include \"implement.h\".\n\n\t* dll.c: Remove defined(KLUDGE) wrapped code.\n\n\t* fork.c: Remove redefinition of ENOMEM.\n\tRemove pthread_atfork() and fork() with #if 0/#endif.\n\n\t* create.c (pthread_create): Rename threadStart and threadDestroy calls\n\tto ptw32_threadStart and ptw32_threadDestroy.\n\n\t* implement.h: Rename \"detachedstate\" to \"detachstate\".\n\n\t* attr.c: Rename \"detachedstate\" to \"detachstate\".\n\nMon Dec 28 09:54:39 1998  John Bossom\n\n\t* semaphore.c: Initial version.\n\t* semaphore.h: Initial version.\n\nMon Dec 28 09:54:39 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.h (pthread_attr_t_): Change to *pthread_attr_t.\n\nMon Dec 28 09:54:39 1998  John Bossom, Ben Elliston\n\n\t* attr.c (pthread_attr_setstacksize): Merge with John's version.\n\t(pthread_attr_getstacksize): Merge with John's version.\n\t(pthread_attr_setstackaddr): Merge with John's version.\n\t(pthread_attr_getstackaddr): Merge with John's version.\n\t(pthread_attr_init): Merge with John's version.\n\t(pthread_attr_destroy): Merge with John's version.\n\t(pthread_attr_getdetachstate): Merge with John's version.\n\t(pthread_attr_setdetachstate): Merge with John's version.\n\t(is_attr): attr is now **attr (was *attr), so add extra NULL pointer\n\ttest.\n\nMon Dec 28 09:54:39 1998  Ross Johnson\n\n\t* implement.h (pthread_attr_t_): Add and rename elements in JEB's\n\tversion to correspond to original, so that it can be used with\n\toriginal attr routines.\n\n\t* pthread.h: Add #endif at end which was truncated in merging.\n\nSun Dec 20 14:51:58 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* misc.c (pthreadCancelableWait): New function by John Bossom. Non-standard\n\tbut provides a hook that can be used to implement cancellation points in\n\tapplications that use this library.\n\n\t* pthread.h (pthread_cleanup_pop): C++ (non-WIN32) version uses\n\ttry/catch to emulate John Bossom's WIN32 __try/__finally behaviour.\n\tIn the WIN32 version __finally block, add a test for AbnormalTermination otherwise\n\tcleanup is only run if the cleanup_pop execute arg is non-zero. Cancellation\n\tshould cause the cleanup to run irrespective of the execute arg.\n\n\t* condvar.c (pthread_condattr_init): Replaced by John Bossom's version.\n\t(pthread_condattr_destroy): Replaced by John Bossom's version.\n\t(pthread_condattr_getpshared): Replaced by John Bossom's version.\n\t(pthread_condattr_setpshared): Replaced by John Bossom's version.\n\t(pthread_cond_init): Replaced by John Bossom's version.\n\tFix comment (refered to mutex rather than condition variable).\n\t(pthread_cond_destroy): Replaced by John Bossom's version.\n\t(pthread_cond_wait): Replaced by John Bossom's version.\n\t(pthread_cond_timedwait): Replaced by John Bossom's version.\n\t(pthread_cond_signal): Replaced by John Bossom's version.\n\t(pthread_cond_broadcast): Replaced by John Bossom's version.\n\nThu Dec 17 19:10:46 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* tsd.c (pthread_key_create): Replaced by John Bossom's version.\n\t(pthread_key_delete): Replaced by John Bossom's version.\n\t(pthread_setspecific): Replaced by John Bossom's version.\n\t(pthread_getspecific): Replaced by John Bossom's version.\n\nMon Dec  7 09:44:40 1998  John Bossom\n\n\t* cancel.c (pthread_setcancelstate): Replaced.\n\t(pthread_setcanceltype): Replaced.\n\t(pthread_testcancel): Replaced.\n\t(pthread_cancel): Replaced.\n\t\n\t* exit.c (pthread_exit): Replaced.\n\n\t* misc.c (pthread_self): Replaced.\n\t(pthread_equal): Replaced.\n\n\t* sync.c (pthread_detach): Replaced.\n\t(pthread_join): Replaced.\n\n\t* create.c (pthread_create): Replaced.\n\n\t* private.c (ptw32_processInitialize): New.\n\t(ptw32_processTerminate): New.\n\t(ptw32_threadStart): New.\n \t(ptw32_threadDestroy): New.\n\t(ptw32_cleanupStack): New.\n\t(ptw32_tkAssocCreate): New.\n\t(ptw32_tkAssocDestroy): New.\n\t(ptw32_callUserDestroyRoutines): New.\n\n\t* implement.h: Added non-API structures and declarations.\n\n\t* dll.c (PthreadsEntryPoint): Cast return value of GetProcAddress\n\tto resolve compile warning from MSVC.\n\n\t* dll.c (DLLmain): Replaced.\n\t* dll.c (PthreadsEntryPoint):\n\tRe-applied Anders Norlander's patch:-\n\tInitialize ptw32_try_enter_critical_section at startup\n\tand release kernel32 handle when DLL is being unloaded.\n\nSun Dec  6 21:54:35 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* buildlib.bat: Fix args to CL when building the .DLL\n\n\t* cleanup.c (ptw32_destructor_run_all): Fix TSD key management.\n\tThis is a tidy-up before TSD and Thread management is completely\n\treplaced by John Bossom's code.\n\n\t* tsd.c (pthread_key_create): Fix TSD key management.\n\n\t* global.c (ptw32_key_virgin_next): Initialise.\n\n\t* build.bat: New DOS script to compile and link a pthreads app\n\tusing Microsoft's CL compiler linker.\n\t* buildlib.bat: New DOS script to compile all the object files\n\tand create pthread.lib and pthread.dll using Microsoft's CL\n\tcompiler linker.\n\n1998-12-05  Anders Norlander  <anorland at hem2.passagen.se>\n\n\t* implement.h (ptw32_try_enter_critical_section): New extern\n\t* dll.c (ptw32_try_enter_critical_section): New pointer to\n\tTryEnterCriticalSection if it exists; otherwise NULL.\n\t* dll.c (PthreadsEntryPoint):\n\tInitialize ptw32_try_enter_critical_section at startup\n\tand release kernel32 handle when DLL is being unloaded.\n\t* mutex.c (pthread_mutex_trylock): Replaced check for NT with\n\ta check if ptw32_try_enter_critical_section is valid\n\tpointer to a function. Call ptw32_try_enter_critical_section\n\tinstead of TryEnterCriticalSection to avoid errors on Win95.\n\nThu Dec 3 13:32:00 1998  Ross Johnson  <rpj at ise.canberra.edu.au>\n\n\t* README: Correct cygwin32 compatibility statement.\n\nSun Nov 15 21:24:06 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* cleanup.c (ptw32_destructor_run_all): Declare missing void * arg.\n\tFixup CVS merge conflicts.\n\n1998-10-30  Ben Elliston  <bje at cygnus.com>\n\n\t* condvar.c (cond_wait): Fix semantic error. Test for equality\n\tinstead of making an assignment.\n\nFri Oct 30 15:15:50 1998  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* cleanup.c (ptw32_handler_push): Fixed bug appending new\n\thandler to list reported by Peter Slacik\n\t<Peter.Slacik at leibinger.freinet.de>.\n\t(new_thread): Rename poorly named local variable to\n\t\"new_handler\".\n\nSat Oct 24 18:34:59 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* global.c: Add TSD key management array and index declarations.\n\n\t* implement.h: Ditto for externs.\n\nFri Oct 23 00:08:09 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h (PTW32_TSD_KEY_REUSE): Add enum.\n\n\t* private.c (ptw32_delete_thread): Add call to\n\tptw32_destructor_run_all() to clean up the threads keys.\n\n\t* cleanup.c (ptw32_destructor_run_all): Check for no more dirty\n\tkeys to run destructors on. Assume that the destructor call always\n\tsucceeds and set the key value to NULL.\n\nThu Oct 22 21:44:44 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* tsd.c (pthread_setspecific): Add key management code.\n\t(pthread_key_create): Ditto.\n\t(pthread_key_delete): Ditto.\n\n\t* implement.h (struct ptw32_tsd_key): Add status member.\n\n\t* tsd.c: Add description of pthread_key_delete() from the\n\tstandard as a comment.\n\nFri Oct 16 17:38:47 1998  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* cleanup.c (ptw32_destructor_run_all): Fix and improve\n\tstepping through the key table.\n\nThu Oct 15 14:05:01 1998  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* private.c (ptw32_new_thread): Remove init of destructorstack.\n\tNo longer an element of pthread_t.\n\n\t* tsd.c (pthread_setspecific): Fix type declaration and cast.\n\t(pthread_getspecific): Ditto.\n\t(pthread_getspecific): Change error return value to NULL if key\n\tis not in use.\n\nThu Oct 15 11:53:21 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* global.c (ptw32_tsd_key_table): Fix declaration.\n\n\t* implement.h(ptw32_TSD_keys_TlsIndex): Add missing extern.\n\t(ptw32_tsd_mutex): Ditto.\n\n\t* create.c (ptw32_start_call): Fix \"keys\" array declaration.\n\tAdd comment.\n\n\t* tsd.c (pthread_setspecific): Fix type declaration and cast.\n\t(pthread_getspecific): Ditto.\n\n\t* cleanup.c (ptw32_destructor_run_all): Declare missing loop\n\tcounter.\n\nWed Oct 14 21:09:24 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* private.c (ptw32_new_thread): Increment ptw32_threads_count.\n\t(ptw32_delete_thread): Decrement ptw32_threads_count.\n\tRemove some comments.\n\n\t* exit.c (ptw32_exit): : Fix two pthread_mutex_lock() calls that\n \tshould have been pthread_mutex_unlock() calls.\n\t(ptw32_vacuum): Remove call to ptw32_destructor_pop_all().\n\n\t* create.c (pthread_create): Fix two pthread_mutex_lock() calls that\n \tshould have been pthread_mutex_unlock() calls.\n\n\t* global.c (ptw32_tsd_mutex): Add mutex for TSD operations.\n\n\t* tsd.c (pthread_key_create): Add critical section.\n\t(pthread_setspecific): Ditto.\n\t(pthread_getspecific): Ditto.\n\t(pthread_key_delete): Ditto.\n\n\t* sync.c (pthread_join): Fix two pthread_mutex_lock() calls that\n \tshould have been pthread_mutex_unlock() calls.\n\nMon Oct 12 00:00:44 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h (ptw32_tsd_key_table): New.\n\n\t* create.c (ptw32_start_call): Initialise per-thread TSD keys\n\tto NULL.\n\n\t* misc.c (pthread_once): Correct typo in comment.\n\n\t* implement.h (ptw32_destructor_push): Remove.\n\t(ptw32_destructor_pop): Remove.\n\t(ptw32_destructor_run_all): Rename from ptw32_destructor_pop_all.\n\t(PTW32_TSD_KEY_DELETED): Add enum.\n\t(PTW32_TSD_KEY_INUSE): Add enum.\n\n\t* cleanup.c (ptw32_destructor_push): Remove.\n\t(ptw32_destructor_pop): Remove.\n\t(ptw32_destructor_run_all): Totally revamped TSD.\n\n\t* dll.c (ptw32_TSD_keys_TlsIndex): Initialise.\n\n\t* tsd.c (pthread_setspecific): Totally revamped TSD.\n\t(pthread_getspecific): Ditto.\n\t(pthread_create): Ditto.\n\t(pthread_delete): Ditto.\n\nSun Oct 11 22:44:55 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* global.c (ptw32_tsd_key_table): Add new global.\n\n\t* implement.h (ptw32_tsd_key_t and struct ptw32_tsd_key):\n\tAdd.\n\t(struct _pthread): Remove destructorstack.\n\n\t* cleanup.c (ptw32_destructor_run_all): Rename from\n \tptw32_destructor_pop_all. The key destructor stack was made\n \tglobal rather than per-thread. No longer removes destructor nodes\n\tfrom the stack. Comments updated.\n\n1998-10-06  Ben Elliston  <bje at cygnus.com>\n\n\t* condvar.c (cond_wait): Use POSIX, not Win32 mutex calls.\n\t(pthread_cond_broadcast): Likewise.\n\t(pthread_cond_signal): Likewise.\n\n1998-10-05  Ben Elliston  <bje at cygnus.com>\n\n\t* pthread.def: Update. Some functions aren't available yet, others\n\tare macros in <pthread.h>.\n\n\t* tests/join.c: Remove; useless.\n\nMon Oct  5 14:25:08 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* pthread.def: New file for building the DLL.\n\n1998-10-05  Ben Elliston  <bje at cygnus.com>\n\n\t* misc.c (pthread_equal): Correct inverted logic bug.\n\t(pthread_once): Use the POSIX mutex primitives, not Win32. Remove\n\tirrelevant FIXME comment.\n\n\t* global.c (PTHREAD_MUTEX_INITIALIZER): Move to pthread.h.\n\n\t* pthread.h (PTHREAD_MUTEX_INITIALIZER): Define.\n\t(pthread_mutex_t): Reimplement as a struct containing a valid\n\tflag. If the flag is ever down upon entry to a mutex operation,\n\twe call pthread_mutex_create() to initialise the object. This\n\tfixes the problem of how to handle statically initialised objects\n\tthat can't call InitializeCriticalSection() due to their context.\n\t(PTHREAD_ONCE_INIT): Define.\n\n\t* mutex.c (pthread_mutex_init): Set valid flag.\n\t(pthread_mutex_destroy): Clear valid flag.\n\t(pthread_mutex_lock): Check and handle the valid flag.\n\t(pthread_mutex_unlock): Likewise.\n\t(pthread_mutex_trylock): Likewise.\n\n\t* tests/mutex3.c: New file; test for the static initialisation\n\tmacro. Passes.\n\n\t* tests/create1.c: New file; test pthread_create(). Passes.\n\t\n\t* tests/equal.c: Poor test; remove.\n\t\n\t* tests/equal1.c New file; test pthread_equal(). Passes.\n\n\t* tests/once1.c: New file; test for pthread_once(). Passes.\n\n\t* tests/self.c: Remove; rename to self1.c.\n\n\t* tests/self1.c: This is the old self.c.\n\n\t* tests/self2.c: New file. Test pthread_self() with a single\n\tthread. Passes.\n\n\t* tests/self3.c: New file. Test pthread_self() with a couple of\n\tthreads to ensure their thread IDs differ. Passes.\n\t\n1998-10-04  Ben Elliston  <bje at cygnus.com>\n\n\t* tests/mutex2.c: Test pthread_mutex_trylock(). Passes.\n\n\t* tests/mutex1.c: New basic test for mutex functions (it passes).\n\t(main): Eliminate warning.\n\n\t* configure.in: Test for __stdcall, not _stdcall. Typo.\n\n\t* configure: Regenerate.\n\n\t* attr.c (pthread_attr_setstackaddr): Remove FIXME comment. Win32\n\tdoes know about ENOSYS after all.\n\t(pthread_attr_setstackaddr): Likewise.\n\n1998-10-03  Ben Elliston  <bje at cygnus.com>\n\n\t* configure.in: Test for the `_stdcall' keyword.  Define `STDCALL'\n\tto `_stdcall' if we have it, null otherwise.\n\n\t* configure: Regenerate.\n\n\t* acconfig.h (STDCALL): New define.\n\n\t* config.h.in: Regenerate.\n\n\t* create.c (ptw32_start_call): Add STDCALL prefix.\n\t\n\t* mutex.c (pthread_mutex_init): Correct function signature.\n\n\t* attr.c (pthread_attr_init): Only zero out the `sigmask' member\n\tif we have the sigset_t type.\n\n\t* pthread.h: No need to include <unistd.h>.  It doesn't even exist\n\ton Win32! Again, an artifact of cross-compilation.\t\n\t(pthread_sigmask): Only provide if we have the sigset_t type.\n\n\t* process.h: Remove. This was a stand-in before we started doing\n\tnative compilation under Win32.\n\n\t* pthread.h (pthread_mutex_init): Make `attr' argument const.\n\n1998-10-02  Ben Elliston  <bje at cygnus.com>\n\n\t* COPYING: Remove.\n\n\t* COPYING.LIB: Add. This library is under the LGPL.\n\n1998-09-13  Ben Elliston  <bje at cygnus.com>\n\n\t* configure.in: Test for required system features.\n\n\t* configure: Generate. \n\n\t* acconfig.h: New file.\n\n\t* config.h.in: Generate.\n\n\t* Makefile.in: Renamed from Makefile.\n\n\t* COPYING: Import from a recent GNU package.\n\n\t* config.guess: Likewise.\n\n\t* config.sub: Likewise.\n\n\t* install-sh: Likewise.\n\n\t* config.h: Remove.  \n\n\t* Makefile: Likewise.\n\n1998-09-12  Ben Elliston  <bje at cygnus.com>\n\n\t* windows.h: No longer needed; remove.\n\n\t* windows.c: Likewise.\n\nSat Sep 12 20:09:24 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* windows.h: Remove error number definitions. These are in <errno.h>\n\t\n\t* tsd.c: Add comment explaining rationale for not building\n\tPOSIX TSD on top of Win32 TLS.\n\n1998-09-12  Ben Elliston  <bje at cygnus.com>\n\n\t* {most}.c: Include <errno.h> to get POSIX error values.\n\n\t* signal.c (pthread_sigmask): Only provide if HAVE_SIGSET_T is\n\tdefined.\n \n\t* config.h: #undef features, don't #define them.  This will be\n\tgenerated by autoconf very soon.\n\t\n1998-08-11  Ben Elliston  <bje at cygnus.com>\n\n\t* Makefile (LIB): Define.\n\t(clean): Define target.\n\t(all): Build a library not just the object files.\n\n\t* pthread.h: Provide a definition for struct timespec if we don't\n\talready have one.\n\n\t* windows.c (TlsGetValue): Bug fix.\n\t\nThu Aug  6 15:19:22 1998  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* misc.c (pthread_once): Fix arg 1 of EnterCriticalSection()\n \tand LeaveCriticalSection() calls to pass address-of lock.\n\n\t* fork.c (pthread_atfork): Typecast (void (*)(void *)) funcptr\n\tin each ptw32_handler_push() call.\n\n\t* exit.c (ptw32_exit): Fix attr arg in \n\tpthread_attr_getdetachstate() call.\n\n\t* private.c (ptw32_new_thread): Typecast (HANDLE) NULL.\n\t(ptw32_delete_thread): Ditto.\n\n\t* implement.h: (PTW32_MAX_THREADS): Add define. This keeps\n\tchanging in an attempt to make thread administration data types\n\topaque and cleanup DLL startup.\n\n\t* dll.c (PthreadsEntryPoint): \n\t(ptw32_virgins): Remove malloc() and free() calls.\n\t(ptw32_reuse): Ditto.\n\t(ptw32_win32handle_map): Ditto.\n\t(ptw32_threads_mutex_table): Ditto.\n\n\t* global.c (_POSIX_THREAD_THREADS_MAX): Initialise with \n\tPTW32_MAX_THREADS.\n\t(ptw32_virgins): Ditto.\n\t(ptw32_reuse): Ditto.\n\t(ptw32_win32handle_map): Ditto.\n\t(ptw32_threads_mutex_table): Ditto.\n\n\t* create.c (pthread_create): Typecast (HANDLE) NULL.\n\tTypecast (unsigned (*)(void *)) start_routine.\n\n\t* condvar.c (pthread_cond_init): Add address-of operator & to\n\targ 1 of pthread_mutex_init() call.\n\t(pthread_cond_destroy): Add address-of operator & to\n\targ 1 of pthread_mutex_destroy() call. \n\n\t* cleanup.c (ptw32_destructor_pop_all): Add (int) cast to \n\tpthread_getspecific() arg.\n\t(ptw32_destructor_pop): Add (void *) cast to \"if\" conditional.\n\t(ptw32_destructor_push): Add (void *) cast to\n\tptw32_handler_push() \"key\" arg.\n\t(malloc.h): Add include.\n\n\t* implement.h (ptw32_destructor_pop): Add prototype.\n\n\t* tsd.c (implement.h): Add include.\n\n\t* sync.c (pthread_join): Remove target_thread_mutex and it's\n\tinitialisation. Rename getdetachedstate to getdetachstate.\n\tRemove unused variable \"exitcode\".\n\t(pthread_detach): Remove target_thread_mutex and it's\n\tinitialisation. Rename getdetachedstate to getdetachstate.\n\tRename setdetachedstate to setdetachstate.\n\n\t* signal.c (pthread_sigmask): Rename SIG_SET to SIG_SETMASK.\n\tCast \"set\" to (long *) in assignment to passify compiler warning.\n\tAdd address-of operator & to thread->attr.sigmask in memcpy() call\n\tand assignment.\n\t(pthread_sigmask): Add address-of operator & to thread->attr.sigmask\n\tin memcpy() call and assignment.\n\n\t* windows.h (THREAD_PRIORITY_ERROR_RETURN): Add.\n\t(THREAD_PRIORITY_LOWEST): Add.\n\t(THREAD_PRIORITY_HIGHEST): Add.\n\n\t* sched.c (is_attr): Add function.\n\t(implement.h): Add include.\n\t(pthread_setschedparam): Rename all instances of \"sched_policy\"\n\tto \"sched_priority\".\n\t(pthread_getschedparam): Ditto.\n\nTue Aug  4 16:57:58 1998  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* private.c (ptw32_delete_thread): Fix typo. Add missing ';'.\n\n\t* global.c (ptw32_virgins): Change types from pointer to \n\tarray pointer.\n\t(ptw32_reuse): Ditto.\n\t(ptw32_win32handle_map): Ditto.\n\t(ptw32_threads_mutex_table): Ditto.\n\n\t* implement.h(ptw32_virgins): Change types from pointer to \n\tarray pointer.\n\t(ptw32_reuse): Ditto.\n\t(ptw32_win32handle_map): Ditto.\n\t(ptw32_threads_mutex_table): Ditto.\n\n\t* private.c (ptw32_delete_thread): Fix \"entry\" should be \"thread\".\n\n\t* misc.c (pthread_self): Add extern for ptw32_threadID_TlsIndex.\n\n\t* global.c: Add comment.\n\n\t* misc.c (pthread_once): Fix member -> dereferences.\n\tChange ptw32_once_flag to once_control->flag in \"if\" test.\n\nTue Aug  4 00:09:30 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h(ptw32_virgins): Add extern.\n\t(ptw32_virgin_next): Ditto.\n\t(ptw32_reuse): Ditto.\n\t(ptw32_reuse_top): Ditto.\n\t(ptw32_win32handle_map): Ditto.\n\t(ptw32_threads_mutex_table): Ditto.\n\n\t* global.c (ptw32_virgins): Changed from array to pointer.\n\tStorage allocation for the array moved into dll.c.\n\t(ptw32_reuse): Ditto.\n\t(ptw32_win32handle_map): Ditto.\n\t(ptw32_threads_mutex_table): Ditto.\n\n\t* dll.c (PthreadsEntryPoint): Set up thread admin storage when\n\tDLL is loaded.\n\n\t* fork.c (pthread_atfork): Fix function pointer arg to all\n\tptw32_handler_push() calls. Change \"arg\" arg to NULL in child push.\n\n\t* exit.c: Add windows.h and process.h includes.\n\t(ptw32_exit): Add local detachstate declaration.\n\t(ptw32_exit): Fix incorrect name for pthread_attr_getdetachstate().\n\n\t* pthread.h (_POSIX_THREAD_ATTR_STACKSIZE): Move from global.c\n\t(_POSIX_THREAD_ATTR_STACKADDR): Ditto.\n\n\t* create.c (pthread_create): Fix #if should be #ifdef.\n\t(ptw32_start_call): Remove usused variables.\n\n\t* process.h: Create.\n\n\t* windows.h: Move _beginthreadex and _endthreadex into\n\tprocess.h\n\nMon Aug  3 21:19:57 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* condvar.c (pthread_cond_init): Add NULL attr to\n\tpthread_mutex_init() call - default attributes will be used.\n\t(cond_wait): Fix typo.\n\t(cond_wait): Fix typo - cv was ev.\n\t(pthread_cond_broadcast): Fix two identical typos.\n\n\t* cleanup.c (ptw32_destructor_pop_all): Remove _ prefix from\n\tPTHREAD_DESTRUCTOR_ITERATIONS.\n\n\t* pthread.h: Move _POSIX_* values into posix.h\n\n\t* pthread.h: Fix typo in pthread_mutex_init() prototype.\n\n\t* attr.c (pthread_attr_init): Fix error in priority member init.\n\n\t* windows.h (THREAD_PRIORITY_NORMAL): Add.\n\n\t* pthread.h (sched_param): Add missing ';' to struct definition. \n\n\t* attr.c (pthread_attr_init): Remove obsolete pthread_attr_t\n\tmember initialisation - cancelstate, canceltype, cancel_pending.\n\t(is_attr): Make arg \"attr\" a const.\n\n\t* implement.h (PTW32_HANDLER_POP_LIFO): Remove definition.\n\t(PTW32_HANDLER_POP_FIFO): Ditto.\n\t(PTW32_VALID): Add missing newline escape (\\).\n\t(ptw32_handler_node): Make element \"next\" a pointer.\n\n1998-08-02  Ben Elliston  <bje at cygnus.com>\n\n\t* windows.h: Remove duplicate TlsSetValue() prototype.  Add \n\tTlsGetValue() prototype.\n\t(FALSE): Define.\n\t(TRUE): Likewise.\n\tAdd forgotten errno values.  Guard against multiple #includes.\n\n\t* windows.c: New file.  Implement stubs for Win32 functions.\n\n\t* Makefile (SRCS): Remove.  Not explicitly needed.\n\t(CFLAGS): Add -Wall for all warnings with GCC.\n\nSun Aug  2 19:03:42 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* config.h: Create. This is a temporary stand-in for autoconf yet\n\tto be done.\n \t(HAVE_SIGNAL_H): Add.\n\n\t* pthread.h: Minor rearrangement for temporary config.h.\n\nFri Jul 31 14:00:29 1998  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* cleanup.c (ptw32_destructor_pop): Implement. Removes\n\tdestructors associated with a key without executing them.\n\t(ptw32_destructor_pop_all): Add FIXME comment.\n\n\t* tsd.c (pthread_key_delete): Add call to ptw32_destructor_pop().\n\nFri Jul 31 00:05:45 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* tsd.c (pthread_key_create): Update to properly associate\n\tthe destructor routine with the key.\n\t(pthread_key_delete): Add FIXME comment.\n\n\t* exit.c (ptw32_vacuum): Add call to\n\tptw32_destructor_pop_all().\n\n\t* implement.h (ptw32_handler_pop_all): Add prototype.\n\t(ptw32_destructor_pop_all): Ditto.\n\n\t* cleanup.c (ptw32_destructor_push): Implement. This is just a\n\tcall to ptw32_handler_push().\n\t(ptw32_destructor_pop_all): Implement. This is significantly\n\tdifferent to ptw32_handler_pop_all().\n\n\t* Makefile (SRCS): Create. Preliminary.\n\n\t* windows.h: Create. Contains Win32 definitions for compile\n\ttesting. This is just a standin for the real one.\n\n\t* pthread.h (SIG_UNBLOCK): Fix typo. Was SIG_BLOCK.\n\t(windows.h): Add include. Required for CRITICAL_SECTION.\n\t(pthread_cond_t): Move enum declaration outside of struct\n\tdefinition.\n\t(unistd.h): Add include - may be temporary.\n\n\t* condvar.c (windows.h): Add include.\n\n\t* implement.h (PTW32_THIS): Remove - no longer required.\n\t(PTW32_STACK): Use pthread_self() instead of PTW32_THIS.\n\nThu Jul 30 23:12:45 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h: Remove ptw32_find_entry() prototype.\n\n\t* private.c: Extend comments.\n\tRemove ptw32_find_entry() - no longer needed.\n\n\t* create.c (ptw32_start_call): Add call to TlsSetValue() to\n\tstore the thread ID.\n\n\t* dll.c (PthreadsEntryPoint): Implement. This is called\n\twhenever a process loads the DLL. Used to initialise thread\n\tlocal storage.\n\n\t* implement.h: Add ptw32_threadID_TlsIndex.\n\tAdd ()s around PTW32_VALID expression.\n\n\t* misc.c (pthread_self): Re-implement using Win32 TLS to store\n\tthe threads own ID.\n\nWed Jul 29 11:39:03 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* private.c: Corrections in comments.\n\t(ptw32_new_thread): Alter \"if\" flow to be more natural.\n\n\t* cleanup.c (ptw32_handler_push): Same as below.\n\n\t* create.c (pthread_create): Same as below.\n\n\t* private.c (ptw32_new_thread): Rename \"new\" to \"new_thread\".\n\tSince when has a C programmer been required to know C++?\n\nTue Jul 28 14:04:29 1998  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* implement.h: Add PTW32_VALID macro.\n\n\t* sync.c (pthread_join): Modify to use the new thread\n\ttype and ptw32_delete_thread(). Rename \"target\" to \"thread\".\n\tRemove extra local variable \"target\".\n\t(pthread_detach): Ditto.\n\n\t* signal.c (pthread_sigmask): Move init of \"us\" out of inner block.\n\tFix instance of \"this\" should have been \"us\". Rename \"us\" to \"thread\".\n\n\t* sched.c (pthread_setschedparam): Modify to use the new thread\n\ttype.\n\t(pthread_getschedparam): Ditto.\n\n\t* private.c (ptw32_find_thread): Fix return type and arg.\n\n\t* implement.h: Remove PTW32_YES and PTW32_NO.\n\t(ptw32_new_thread): Add prototype.\n\t(ptw32_find_thread): Ditto.\n\t(ptw32_delete_thread): Ditto.\n\t(ptw32_new_thread_entry): Remove prototype.\n\t(ptw32_find_thread_entry): Ditto.\n\t(ptw32_delete_thread_entry): Ditto.\n\t(  PTW32_NEW, PTW32_INUSE, PTW32_EXITED, PTW32_REUSE):\n\tAdd.\n\n\n\t* create.c (pthread_create): Minor rename \"us\" to \"new\" (I need\n\tthese cues but it doesn't stop me coming out with some major bugs\n\tat times).\n\tLoad start_routine and arg into the thread so the wrapper can\n\tcall it.\n\n\t* exit.c (pthread_exit): Fix pthread_this should be pthread_self.\n\n\t* cancel.c (pthread_setcancelstate): Change\n \tptw32_threads_thread_t * to pthread_t and init with\n \tpthread_this().\n\t(pthread_setcanceltype): Ditto.\n\n\t* exit.c (ptw32_exit): Add new pthread_t arg.\n\tRename ptw32_delete_thread_entry to ptw32_delete_thread.\n\tRename \"us\" to \"thread\".\n\t(pthread_exit): Call ptw32_exit with added thread arg.\n\n\t* create.c (ptw32_start_call): Insert missing \")\".\n\tAdd \"us\" arg to ptw32_exit() call.\n\t(pthread_create): Modify to use new thread allocation scheme.\n\n\t* private.c: Added detailed explanation of the new thread\n\tallocation scheme.\n\t(ptw32_new_thread): Totally rewritten to use\n\tnew thread allocation scheme.\n\t(ptw32_delete_thread): Ditto.\n\t(ptw32_find_thread): Obsolete.\n\nMon Jul 27 17:46:37 1998  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* create.c (pthread_create): Start of rewrite. Not completed yet.\n\n\t* private.c (ptw32_new_thread_entry): Start of rewrite. Not\n\tcomplete.\n\n\t* implement.h (ptw32_threads_thread): Rename, remove thread\n\tmember, add win32handle and ptstatus members.\n\t(ptw32_t): Add.\n\n\t* pthread.h: pthread_t is no longer mapped directly to a Win32\n\tHANDLE type. This is so we can let the Win32 thread terminate and\n\treuse the HANDLE while pthreads holds it's own thread ID until\n\tthe last waiting join exits.\n\nMon Jul 27 00:20:37 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* private.c (ptw32_delete_thread_entry): Destroy the thread\n \tentry attribute object before deleting the thread entry itself.\n\n\t* attr.c (pthread_attr_init): Initialise cancel_pending = FALSE.\n\t(pthread_attr_setdetachstate): Rename \"detached\" to \"detachedstate\".\n\t(pthread_attr_getdetachstate): Ditto.\n\n\t* exit.c (ptw32_exit): Fix incorrect check for detachedstate.\n\n\t* implement.h (ptw32_call_t): Remove env member. \n\nSun Jul 26 13:06:12 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h (ptw32_new_thread_entry): Fix prototype.\n\t(ptw32_find_thread_entry): Ditto.\n\t(ptw32_delete_thread_entry): Ditto.\n\t(ptw32_exit): Add prototype.\n\n\t* exit.c (ptw32_exit): New function. Called from pthread_exit()\n\tand ptw32_start_call() to exit the thread. It allows an extra\n\targument which is the return code passed to _endthreadex().\n\t(ptw32_exit): Move thread entry delete call from ptw32_vacuum()\n\tinto here. Add more explanation of thread entry deletion.\n\t(ptw32_exit): Clarify comment.\n\n\t* create.c (ptw32_start_call): Change pthread_exit() call to\n\tptw32_exit() call.\n\n\t* exit.c (ptw32_vacuum): Add thread entry deletion code\n\tmoved from ptw32_start_call(). See next item.\n\t(pthread_exit): Remove longjmp(). Add mutex lock around thread table\n\tmanipulation code. This routine now calls _enthreadex().\n\n\t* create.c (ptw32_start_call): Remove setjmp() call and move\n\tcleanup code out. Call pthread_exit(NULL) to terminate the thread.\n\n1998-07-26  Ben Elliston  <bje at cygnus.com>\n\n\t* tsd.c (pthread_getspecific): Update comments.\n\n\t* mutex.c (pthread_mutexattr_setpshared): Not supported; remove.\n\t(pthread_mutexattr_getpshared): Likewise.\n\n\t* pthread.h (pthread_mutexattr_setpshared): Remove prototype.\n\t(pthread_mutexattr_getpshared): Likewise.\n\nSun Jul 26 00:09:59 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* sync.c: Rename all instances of ptw32_count_mutex to\n\tptw32_table_mutex.\n\n\t* implement.h: Rename ptw32_count_mutex to\n\tptw32_table_mutex.\n\n\t* global.c: Rename ptw32_count_mutex to\n\tptw32_table_mutex.\n\n\t* create.c (pthread_create): Add critical sections.\n\t(ptw32_start_call): Rename ptw32_count_mutex to\n\tptw32_table_mutex.\n\n\t* cancel.c (pthread_setcancelstate): Fix indirection bug and rename\n\t\"this\" to \"us\".\n\n\t* signal.c (pthread_sigmask): Rename \"this\" to \"us\" and fix some\n\tminor syntax errors. Declare \"us\" and initialise it.\n\n\t* sync.c (pthread_detach): Rename \"this\" to \"target\".\n\n\t* pthread.h: Converting PTHREAD_* defines to alias the (const int)\n\tvalues in global.c.\n\n\t* global.c: Started converting PTHREAD_* defines to (const int) as\n \ta part of making the eventual pthreads DLL binary compatible\n \tthrough version changes.\n\n\t* condvar.c (cond_wait): Add cancelation point. This applies the\n\tpoint to both pthread_cond_wait() and pthread_cond_timedwait().\n\n\t* exit.c (pthread_exit): Rename \"this\" to \"us\".\n\n\t* implement.h: Add comment.\n\n\t* sync.c (pthread_join): I've satisfied myself that pthread_detach()\n\tdoes set the detached attribute in the thread entry attributes\n\tto PTHREAD_CREATE_DETACHED. \"if\" conditions were changed to test\n\tthat attribute instead of a separate flag.\n\n\t* create.c (pthread_create): Rename \"this\" to \"us\".\n\t(pthread_create): cancelstate and canceltype are not attributes\n\tso the copy to thread entry attribute storage was removed.\n\tOnly the thread itself can change it's cancelstate or canceltype,\n\tie. the thread must exist already.\n\n\t* private.c (ptw32_delete_thread_entry): Mutex locks removed.\n\tMutexes must be applied at the caller level.\n\t(ptw32_new_thread_entry): Ditto.\n\t(ptw32_new_thread_entry): Init cancelstate, canceltype, and\n\tcancel_pending to default values.\n\t(ptw32_new_thread_entry): Rename \"this\" to \"new\".\n\t(ptw32_find_thread_entry): Rename \"this\" to \"entry\".\n\t(ptw32_delete_thread_entry): Rename \"thread_entry\" to \"entry\".\n\n\t* create.c (ptw32_start_call): Mutexes changed to\n\tptw32_count_mutex. All access to the threads table entries is\n\tunder the one mutex. Otherwise chaos reigns.\n\nSat Jul 25 23:16:51 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h (ptw32_threads_thread): Move cancelstate and\n \tcanceltype members out of pthread_attr_t into here.\n\n\t* fork.c (fork): Add comment.\n\n1998-07-25  Ben Elliston  <bje at cygnus.com>\n\n\t* fork.c (fork): Autoconfiscate.\n\nSat Jul 25 00:00:13 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* create.c (ptw32_start_call): Set thread priority.  Ensure our\n \tthread entry is removed from the thread table but only if\n \tpthread_detach() was called and there are no waiting joins.\n\t(pthread_create): Set detach flag in thread entry if the \n\tthread is created PTHREAD_CREATE_DETACHED.\n\n\t* pthread.h (pthread_attr_t): Rename member \"detachedstate\".\n\n\t* attr.c (pthread_attr_init): Rename attr members.\n\n\t* exit.c (pthread_exit): Fix indirection mistake.\n\n\t* implement.h (PTW32_THREADS_TABLE_INDEX): Add.\n\n\t* exit.c (ptw32_vacuum): Fix incorrect args to\n\tptw32_handler_pop_all() calls.\n\tMake thread entry removal conditional.\n\n\t* sync.c (pthread_join): Add multiple join and async detach handling.\n\n\t* implement.h (PTW32_THREADS_TABLE_INDEX): Add.\n\n\t* global.c (ptw32_threads_mutex_table): Add.\n\n\t* implement.h (ptw32_once_flag): Remove.\n\t(ptw32_once_lock): Ditto.\n\t(ptw32_threads_mutex_table): Add.\n\n\t* global.c (ptw32_once_flag): Remove.\n\t(ptw32_once_lock): Ditto.\n\n\t* sync.c (pthread_join): Fix tests involving new return value\n\tfrom ptw32_find_thread_entry().\n\t(pthread_detach): Ditto.\n\n\t* private.c (ptw32_find_thread_entry): Failure return code\n\tchanged from -1 to NULL.\n\nFri Jul 24 23:09:33 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* create.c (pthread_create): Change . to -> in sigmask memcpy() args.\n\n\t* pthread.h: (pthread_cancel): Add function prototype.\n\t(pthread_testcancel): Ditto.\n\n1998-07-24  Ben Elliston  <bje at cygnus.com>\n\n\t* pthread.h (pthread_condattr_t): Rename dummy structure member.\n\t(pthread_mutexattr_t): Likewise.\n\nFri Jul 24 21:13:55 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* cancel.c (pthread_cancel): Implement.\n\t(pthread_testcancel): Implement.\n\n\t* exit.c (pthread_exit): Add comment explaining the longjmp().\n\n\t* implement.h (ptw32_threads_thread_t): New member cancelthread.\n\t(PTW32_YES): Define.\n\t(PTW32_NO): Define.\n\t(RND_SIZEOF): Remove.\n\n\t* create.c (pthread_create): Rename cancelability to cancelstate.\n\n\t* pthread.h (pthread_attr_t): Rename cancelability to cancelstate.\n\t(PTHREAD_CANCELED): Define.\n\n1998-07-24  Ben Elliston  <bje at cygnus.com>\n\n\t* pthread.h (SIG_BLOCK): Define if not already defined.\n\t(SIG_UNBLOCK): Likewise.\n\t(SIG_SETMASK): Likewise.\n\t(pthread_attr_t): Add signal mask member.\n\t(pthread_sigmask): Add function prototype.\n\n\t* signal.c (pthread_sigmask): Implement.\n\n\t* create.c: #include <string.h> to get a prototype for memcpy().\n\t(pthread_create): New threads inherit their creator's signal\n\tmask.  Copy the signal mask to the new thread structure if we know\n\tabout signals.\n\t\nFri Jul 24 16:33:17 1998  Ross Johnson  <rpj at swan.canberra.edu.au>\n\n\t* fork.c (pthread_atfork): Add all the necessary push calls.\n\tLocal implementation semantics:\n\tIf we get an ENOMEM at any time then ALL handlers\n\t(including those from previous pthread_atfork() calls) will be\n\tpopped off each of the three atfork stacks before we return.\n\t(fork): Add all the necessary pop calls. Add the thread cancellation\n\tand join calls to the child fork.\n\tAdd #includes.\n\n\t* implement.h: (ptw32_handler_push): Fix return type and stack arg\n\ttype in prototype.\n\t(ptw32_handler_pop): Fix stack arg type in prototype.\n\t(ptw32_handler_pop_all): Fix stack arg type in prototype.\n\n\t* cleanup.c (ptw32_handler_push): Change return type to int and\n\treturn ENOMEM if malloc() fails.\n\n\t* sync.c (pthread_detach): Use equality test, not assignment.\n\n\t* create.c (ptw32_start_call): Add call to Win32 CloseHandle()\n\tif thread is detached.\n\n1998-07-24  Ben Elliston  <bje at cygnus.com>\n\n\t* sync.c (pthread_detach): Close the Win32 thread handle to\n\temulate detached (or daemon) threads.\n\nFri Jul 24 03:00:25 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* sync.c (pthread_join): Save valueptr arg in joinvalueptr for\n\tpthread_exit() to use.\n\n\t* private.c (ptw32_new_thread_entry): Initialise joinvalueptr to\n\tNULL.\n\n\t* create.c (ptw32_start_call): Rewrite to facilitate joins.\n\tpthread_exit() will do a longjmp() back to here. Does appropriate\n\tcleanup and exit/return from the thread.\n\t(pthread_create): _beginthreadex() now passes a pointer to our\n\tthread table entry instead of just the call member of that entry.\n\n\t* implement.h (ptw32_threads_thread): New member \n\tvoid ** joinvalueptr.\n\t(ptw32_call_t): New member jmpbuf env.\n\n\t* exit.c (pthread_exit): Major rewrite to handle joins and handing\n\tvalue pointer to joining thread. Uses longjmp() back to \n\tptw32_start_call().\n\n\t* create.c (pthread_create): Ensure values of new attribute members\n\tare copied to the thread attribute object.\n\n\t* attr.c (pthread_attr_destroy):  Fix merge conflicts.\n\t(pthread_attr_getdetachstate):  Fix merge conflicts.\n\t(pthread_attr_setdetachstate):  Fix merge conflicts.\n\n\t* pthread.h:  Fix merge conflicts.\n\n\t* sync.c (pthread_join): Fix merge conflicts.\n\nFri Jul 24 00:21:21 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* sync.c (pthread_join): Add check for valid and joinable\n\tthread.\n\t(pthread_detach): Implement. After checking for a valid and joinable\n\tthread, it's still a no-op.\n\n\t* private.c (ptw32_find_thread_entry): Bug prevented returning\n\tan error value in some cases.\n\n\t* attr.c (pthread_attr_setdetachedstate): Implement.\n\t(pthread_attr_getdetachedstate): Implement.\n\n\t* implement.h: Move more hidden definitions into here from\n\tpthread.h.\n\n1998-07-24  Ben Elliston  <bje at cygnus.com>\n\n\t* pthread.h (PTHREAD_CREATE_JOINABLE): Define.\n\t(PTHREAD_CREATE_DETACHED): Likewise.\n\t(pthread_attr_t): Add new structure member `detached'.\n\t(pthread_attr_getdetachstate): Add function prototype.\n\t(pthread_attr_setdetachstate): Likewise.\n\n\t* sync.c (pthread_join): Return if the target thread is detached.\n\n\t* attr.c (pthread_attr_init): Initialise cancelability and\n\tcanceltype structure members.\n\t(pthread_attr_getdetachstate): Implement.\n\t(pthread_attr_setdetachstate): Likewise.\n\n\t* implement.h (PTW32_CANCEL_DEFAULTS): Remove.  Bit fields\n\tproved to be too cumbersome.  Set the defaults in attr.c using the\n\tpublic PTHREAD_CANCEL_* constants.\n\n\t* cancel.c: New file.\n\n\t* pthread.h (sched_param): Define this type.\n\t(pthread_attr_getschedparam): Add function prototype.\n\t(pthread_attr_setschedparam): Likewise.\n\t(pthread_setcancelstate): Likewise.\n\t(pthread_setcanceltype): Likewise.\n\t(sched_get_priority_min): Likewise.\n\t(sched_get_priority_max): Likewise.\n\t(pthread_mutexattr_setprotocol): Remove; not supported.\n\t(pthread_mutexattr_getprotocol): Likewise.\n\t(pthread_mutexattr_setprioceiling): Likewise.\n\t(pthread_mutexattr_getprioceiling): Likewise.\n\t(pthread_attr_t): Add canceltype member.  Update comments.\n\t(SCHED_OTHER): Define this scheduling policy constant.\n\t(SCHED_FIFO): Likewise.\n\t(SCHED_RR): Likewise.\n\t(SCHED_MIN): Define the lowest possible value for this constant.\n\t(SCHED_MAX): Likewise, the maximum possible value.\n\t(PTHREAD_CANCEL_ASYNCHRONOUS): Redefine.\n\t(PTHREAD_CANCEL_DEFERRED): Likewise.\n\t\n\t* sched.c: New file.\n\t(pthread_setschedparam): Implement.\n\t(pthread_getschedparam): Implement.\n\t(sched_get_priority_max): Validate policy argument.\n\t(sched_get_priority_min): Likewise.\n\n\t* mutex.c (pthread_mutexattr_setprotocol): Remove; not supported.\n\t(pthread_mutexattr_getprotocol): Likewise.\n\t(pthread_mutexattr_setprioceiling): Likewise.\n\t(pthread_mutexattr_getprioceiling): Likewise.\n\nFri Jul 24 00:21:21 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* create.c (pthread_create): Arg to ptw32_new_thread_entry()\n\tchanged. See next entry. Move mutex locks out. Changes made yesterday\n\tand today allow us to start the new thread running rather than\n\ttemporarily suspended.\n\n\t* private.c (ptw32_new_thread_entry): ptw32_thread_table\n\twas changed back to a table of thread structures rather than pointers.\n\tAs such we're trading storage for increaded speed. This routine\n\twas modified to work with the new table. Mutex lock put in around\n\tglobal data accesses.\n\t(ptw32_find_thread_entry): Ditto\n\t(ptw32_delete_thread_entry): Ditto\n\nThu Jul 23 23:25:30 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* global.c: New. Global data objects declared here. These moved from\n\tpthread.h.\n\n\t* pthread.h: Move implementation hidden definitions into\n\timplement.h.\n\n\t* implement.h: Move implementation hidden definitions from\n\tpthread.h. Add constants to index into the different handler stacks.\n\n\t* cleanup.c (ptw32_handler_push): Simplify args. Restructure.\n\t(ptw32_handler_pop): Simplify args. Restructure.\n\t(ptw32_handler_pop_all): Simplify args. Restructure.\n\nWed Jul 22 00:16:22 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* attr.c, implement.h, pthread.h, ChangeLog: Resolve CVS merge\n\tconflicts.\n\n\t* private.c (ptw32_find_thread_entry): Changes to return type\n\tto support leaner ptw32_threads_table[] which now only stores\n\tptw32_thread_thread_t *.\n\t(ptw32_new_thread_entry): Internal changes.\n\t(ptw32_delete_thread_entry): Internal changes to avoid contention.\n \tCalling routines changed accordingly.\n\n\t* pthread.h: Modified cleanup macros to use new generic push and pop.\n\tAdded destructor and atfork stacks to ptw32_threads_thread_t.\n\n\t* cleanup.c (ptw32_handler_push, ptw32_handler_pop,\n\tptw32_handler_pop_all): Renamed cleanup push and pop routines\n\tand made generic to handle destructors and atfork handlers as\n\twell.\n\n\t* create.c (ptw32_start_call): New function is a wrapper for\n\tall new threads. It allows us to do some cleanup when the thread\n\treturns, ie. that is otherwise only done if the thread is cancelled.\n\n\t* exit.c (ptw32_vacuum): New function contains code from \n\tpthread_exit() that we need in the new ptw32_start_call()\n\tas well.\n\n\t* implement.h: Various additions and minor changes.\n\n\t* pthread.h: Various additions and minor changes.\n\tChange cleanup handler macros to use generic handler push and pop\n\tfunctions.\n\n\t* attr.c: Minor mods to all functions.\n\t(is_attr): Implemented missing function.\n\n\t* create.c (pthread_create): More clean up.\n\n\t* private.c (ptw32_find_thread_entry): Implement.\n\t(ptw32_delete_thread_entry): Implement.\n\t(ptw32_new_thread_entry): Implement.\n\tThese functions manipulate the implementations internal thread\n\ttable and are part of general code cleanup and modularisation.\n\tThey replace ptw32_getthreadindex() which was removed.\n\n\t* exit.c (pthread_exit): Changed to use the new code above.\n\n\t* pthread.h: Add cancelability constants. Update comments.\n\n1998-07-22  Ben Elliston  <bje at cygnus.com>\n\n\t* attr.c (pthread_setstacksize): Update test of attr argument.\n\t(pthread_getstacksize): Likewise.\n\t(pthread_setstackaddr): Likewise.\n\t(pthread_getstackaddr): Likewise.\n\t(pthread_attr_init): No need to allocate any storage.\n\t(pthread_attr_destroy): No need to free any storage.\n\n\t* mutex.c (is_attr): Not likely to be needed; remove.\n\t(remove_attr): Likewise.\n\t(insert_attr): Likewise.\n\n\t* implement.h (ptw32_mutexattr_t): Moved to a public definition\n\tin pthread.h.  There was little gain in hiding these details.\n\t(ptw32_condattr_t): Likewise.\n\t(ptw32_attr_t): Likewise.\n\n\t* pthread.h (pthread_atfork): Add function prototype.\n\t(pthread_attr_t): Moved here from implement.h.\n\n\t* fork.c (pthread_atfork): Preliminary implementation.\n\t(ptw32_fork): Likewise.\n\nWed Jul 22 00:16:22 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* cleanup.c (ptw32_cleanup_push): Implement.\n\t(ptw32_cleanup_pop): Implement.\n\t(ptw32_do_cancellation): Implement.\n\tThese are private to the implementation. The real cleanup functions\n\tare macros. See below.\n\n\t* pthread.h (pthread_cleanup_push): Implement as a macro.\n\t(pthread_cleanup_pop): Implement as a macro.\n\tBecause these are macros which start and end a block, the POSIX scoping\n\trequirement is observed. See the comment in the file.\n\n\t* exit.c (pthread_exit): Refine the code.\n\n\t* create.c (pthread_create): Code cleanup.\n\n\t* implement.h (RND_SIZEOF): Add RND_SIZEOF(T) to round sizeof(T)\n\tup to multiple of DWORD.\n\tAdd function prototypes.\n\n\t* private.c (ptw32_getthreadindex): \"*thread\" should have been \n\t\"thread\". Detect empty slot fail condition.\n\n1998-07-20  Ben Elliston  <bje at cygnus.com>\n\n\t* misc.c (pthread_once): Implement.  Don't use a per-application\n\tflag and mutex--make `pthread_once_t' contain these elements in\n\ttheir structure.  The earlier version had incorrect semantics.\n\t\n\t* pthread.h (ptw32_once_flag): Add new variable.  Remove.\n\t(ptw32_once_lock): Add new mutex lock to ensure integrity of\n\taccess to ptw32_once_flag.  Remove.\n\t(pthread_once): Add function prototype.\n\t(pthread_once_t): Define this type.\n\t\nMon Jul 20 02:31:05 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* private.c (ptw32_getthreadindex): Implement.\n\n\t* pthread.h: Add application static data dependent on\n\t_PTHREADS_BUILD_DLL define. This is needed to avoid allocating\n\tnon-sharable static data within the pthread DLL.\n\n\t* implement.h: Add ptw32_cleanup_stack_t, ptw32_cleanup_node_t\n\tand PTW32_HASH_INDEX.\n\n\t* exit.c (pthread_exit): Begin work on cleanup and de-allocate\n\tthread-private storage.\n\n\t* create.c (pthread_create): Add thread to thread table.\n\tKeep a thread-private copy of the attributes with default values\n\tfilled in when necessary. Same for the cleanup stack. Make \n\tpthread_create C run-time library friendly by using _beginthreadex()\n\tinstead of CreateThread(). Fix error returns.\n\nSun Jul 19 16:26:23 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h: Rename pthreads_thread_count to ptw32_threads_count.\n\tCreate ptw32_threads_thread_t struct to keep thread specific data.\n\n\t* create.c: Rename pthreads_thread_count to ptw32_threads_count.\n\t(pthread_create): Handle errors from CreateThread().\n\n1998-07-19  Ben Elliston  <bje at cygnus.com>\n\n\t* condvar.c (pthread_cond_wait): Generalise.  Moved from here ..\n\t(cond_wait): To here.\n\t(pthread_cond_timedwait): Implement; use generalised cond_wait().\n\n\t* pthread.h (pthread_key_t): Define this type.\n\t(pthread_key_create): Add function prototype.\n\t(pthread_setspecific): Likewise.\n\t(pthread_getspecific): Likwise.\n\t(pthread_key_delete): Likewise.\n\n\t* tsd.c (pthread_key_create): Implement.\n\t(pthread_setspecific): Likewise.\n\t(pthread_getspecific): Likewise.\n\t(pthread_key_delete): Likewise.\n\n\t* mutex.c (pthread_mutex_trylock): Return ENOSYS if this function\n\tis called on a Win32 platform which is not Windows NT.\n\n1998-07-18  Ben Elliston  <bje at cygnus.com>\n\n\t* condvar.c (pthread_condattr_init): Do not attempt to malloc any\n\tstorage; none is needed now that condattr_t is an empty struct.\n\t(pthread_condattr_destory): Likewise; do not free storage.\n\t(pthread_condattr_setpshared): No longer supported; return ENOSYS.\n\t(pthread_condattr_getpshared): Likewise.\n\t(pthread_cond_init): Implement with help from Douglas Schmidt.\n\tRemember to initialise the cv's internal mutex.\n\t(pthread_cond_wait): Likewise.\n\t(pthread_cond_signal): Likewise.\n\t(pthread_cond_broadcast): Likewise.\n\t(pthread_cond_timedwait): Preliminary implementation, but I need\n\tto see some API documentation for `WaitForMultipleObject'.\n\t(pthread_destory): Implement.\n\n\t* pthread.h (pthread_cond_init): Add function protoype.\n\t(pthread_cond_broadcast): Likewise.\n\t(pthread_cond_signal): Likewise.\n\t(pthread_cond_timedwait): Likewise.\n\t(pthread_cond_wait): Likewise.\n\t(pthread_cond_destroy): Likewise.\n\t(pthread_cond_t): Define this type.  Fix for u_int.  Do not assume\n\tthat the mutex contained withing the pthread_cond_t structure will\n\tbe a critical section.  Use our new POSIX type!\n\n\t* implement.h (ptw32_condattr_t): Remove shared attribute.\n\n1998-07-17  Ben Elliston  <bje at cygnus.com>\n\n\t* pthread.h (PTHREADS_PROCESS_PRIVATE): Remove.\n\t(PTHREAD_PROCESS_SHARED): Likewise.  No support for mutexes shared\n\tacross processes for now.\n\t(pthread_mutex_t): Use a Win32 CRITICAL_SECTION type for better\n\tperformance.\n\t\n\t* implement.h (ptw32_mutexattr_t): Remove shared attribute.\n\t\n\t* mutex.c (pthread_mutexattr_setpshared): This optional function\n\tis no longer supported, since we want to implement POSIX mutex\n\tvariables using the much more efficient Win32 critical section\n\tprimitives.  Critical section objects in Win32 cannot be shared\n\tbetween processes.\n\t(pthread_mutexattr_getpshared): Likewise.\n\t(pthread_mutexattr_init): No need to malloc any storage; the\n\tattributes structure is now empty.\n\t(pthread_mutexattr_destroy): This is now a nop.\n\t(pthread_mutex_init): Use InitializeCriticalSection().\n\t(pthread_mutex_destroy): Use DeleteCriticalSection().\n\t(pthread_mutex_lock): Use EnterCriticalSection().\n\t(pthread_mutex_trylock): Use TryEnterCriticalSection().  This is\n\tnot supported by Windows 9x, but trylock is a hack anyway, IMHO.\n\t(pthread_mutex_unlock): Use LeaveCriticalSection().\n\n1998-07-14  Ben Elliston  <bje at cygnus.com>\n\n\t* attr.c (pthread_attr_setstacksize): Implement.\n\t(pthread_attr_getstacksize): Likewise.\n\t(pthread_attr_setstackaddr): Likewise.\n\t(pthread_attr_getstackaddr): Likewise.\n\t(pthread_attr_init): Likewise.\n\t(pthread_attr_destroy): Likewise.\n\t\n\t* condvar.c (pthread_condattr_init): Add `_cond' to function name.\n\n\t* mutex.c (pthread_mutex_lock): Add `_mutex' to function name.\n\t(pthread_mutex_trylock): Likewise.\n\t(pthread_mutex_unlock): Likewise.\n\n\t* pthread.h (pthread_condattr_setpshared): Fix typo.\n\t(pthread_attr_init): Add function prototype.\n\t(pthread_attr_destroy): Likewise.\n\t(pthread_attr_setstacksize): Likewise.\n\t(pthread_attr_getstacksize): Likewise.\n\t(pthread_attr_setstackaddr): Likewise.\n\t(pthread_attr_getstackaddr): Likewise.\n\t\nMon Jul 13 01:09:55 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h: Wrap in #ifndef _IMPLEMENT_H\n\n\t* create.c (pthread_create): Map stacksize attr to Win32.\n\n\t* mutex.c: Include implement.h\n\n1998-07-13  Ben Elliston  <bje at cygnus.com>\n\n\t* condvar.c (pthread_condattr_init): Implement.\n\t(pthread_condattr_destroy): Likewise.\n\t(pthread_condattr_setpshared): Likewise.\n\t(pthread_condattr_getpshared): Likewise.\n\t\n\t* implement.h (PTHREAD_THREADS_MAX): Remove trailing semicolon.\n\t(PTHREAD_STACK_MIN): Specify; needs confirming.\n\t(ptw32_attr_t): Define this type.\n\t(ptw32_condattr_t): Likewise.\n\n\t* pthread.h (pthread_mutex_t): Define this type.\n\t(pthread_condattr_t): Likewise.\n\t(pthread_mutex_destroy): Add function prototype.\n\t(pthread_lock): Likewise.\n\t(pthread_trylock): Likewise.\n\t(pthread_unlock): Likewise.\n\t(pthread_condattr_init): Likewise.\n\t(pthread_condattr_destroy): Likewise.\n\t(pthread_condattr_setpshared): Likewise.\n\t(pthread_condattr_getpshared): Likewise.\n\n\t* mutex.c (pthread_mutex_init): Implement.\n\t(pthread_mutex_destroy): Likewise.\n\t(pthread_lock): Likewise.\n\t(pthread_trylock): Likewise.\n\t(pthread_unlock): Likewise.\n\n1998-07-12  Ben Elliston  <bje at cygnus.com>\n\n\t* implement.h (ptw32_mutexattr_t): Define this implementation\n\tinternal type.  Application programmers only see a mutex attribute\n\tobject as a void pointer.\n\n\t* pthread.h (pthread_mutexattr_t): Define this type.\n\t(pthread_mutexattr_init): Add function prototype.\n\t(pthread_mutexattr_destroy): Likewise.\n\t(pthread_mutexattr_setpshared): Likewise.\n\t(pthread_mutexattr_getpshared): Likewise.\n\t(pthread_mutexattr_setprotocol): Likewise.\n\t(pthread_mutexattr_getprotocol): Likewise.\n\t(pthread_mutexattr_setprioceiling): Likewise.\n\t(pthread_mutexattr_getprioceiling): Likewise.\n\t(PTHREAD_PROCESS_PRIVATE): Define.\n\t(PTHREAD_PROCESS_SHARED): Define.\n\n\t* mutex.c (pthread_mutexattr_init): Implement.\n\t(pthread_mutexattr_destroy): Implement.\n\t(pthread_mutexattr_setprotocol): Implement.\n\t(pthread_mutexattr_getprotocol): Likewise.\n\t(pthread_mutexattr_setprioceiling): Likewise.\n\t(pthread_mutexattr_getprioceiling): Likewise.\n\t(pthread_mutexattr_setpshared): Likewise.\n\t(pthread_mutexattr_getpshared): Likewise.\n\t(insert_attr): New function; very preliminary implementation!\n\t(is_attr): Likewise.\n\t(remove_attr): Likewise.\n\t\nSat Jul 11 14:48:54 1998  Ross Johnson  <rpj at ixobrychus.canberra.edu.au>\n\n\t* implement.h: Preliminary implementation specific defines.\n\n\t* create.c (pthread_create): Preliminary implementation.\n\n1998-07-11  Ben Elliston  <bje at cygnus.com>\n\n\t* sync.c (pthread_join): Implement.\n\n\t* misc.c (pthread_equal): Likewise.\n\t\n\t* pthread.h (pthread_join): Add function prototype.\n\t(pthread_equal): Likewise.\n\t\n1998-07-10  Ben Elliston  <bje at cygnus.com>\n\n\t* misc.c (pthread_self): Implement.\n\n\t* exit.c (pthread_exit): Implement.\n\n\t* pthread.h (pthread_exit): Add function prototype.\n\t(pthread_self): Likewise.\n\t(pthread_t): Define this type.\n\n1998-07-09  Ben Elliston  <bje at cygnus.com>\n\n\t* create.c (pthread_create): A dummy stub right now.\n\n\t* pthread.h (pthread_create): Add function prototype.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/FAQ",
    "content": "\t\t  =========================================\n\t\t  PTHREADS-WIN32 Frequently Asked Questions\n\t\t  =========================================\n\nINDEX\n-----\n\nQ 1\tWhat is it?\n\nQ 2\tWhich of the several dll versions do I use?\n\tor,\n\tWhat are all these pthread*.dll and pthread*.lib files?\n\nQ 3\tWhat is the library naming convention?\n\nQ 4\tCleanup code default style or: it used to work when I built\n\tthe library myself, but now it doesn't - why?\n\nQ 5\tWhy is the default library version now less exception-friendly?\n\nQ 6\tShould I use Cygwin or Mingw32 as a development environment?\n\nQ 7\tNow that pthreads-win32 builds under Mingw32, why do I get\n\tmemory access violations (segfaults)?\n\nQ 8\tHow do I use pthread.dll for Win32 (Visual C++ 5.0)\n\nQ 9\tCancelation doesn't work for me, why?\n\nQ 10\tHow do I generate pthreadGCE.dll and libpthreadw32.a for use\n\twith Mingw32?\n\n=============================================================================\n\nQ 1\tWhat is it?\n---\n\nPthreads-win32 is an Open Source Software implementation of the\nThreads component of the POSIX 1003.1c 1995 Standard for Microsoft's\nWin32 environment. Some functions from POSIX 1003.1b are also\nsupported including semaphores. Other related functions include\nthe set of read-write lock functions. The library also supports\nsome of the functionality of the Open Group's Single Unix\nspecification, version 2, namely mutex types.\n\nSee the file \"ANNOUNCE\" for more information including standards\nconformance details and list of supported routines.\n\n\n------------------------------------------------------------------------------\n\nQ 2\tWhich of the several dll versions do I use?\n---\tor,\n\tWhat are all these pthread*.dll and pthread*.lib files?\n\nSimply, you only use one of them, but you need to choose carefully.\n\nThe most important choice you need to make is whether to use a\nversion that uses exceptions internally, or not (there are versions\nof the library that use exceptions as part of the thread\ncancelation and cleanup implementation, and one that uses\nsetjmp/longjmp instead).\n\nThere is some contension amongst POSIX threads experts as\nto how POSIX threads cancelation and exit should work\nwith languages that include exceptions and handlers, e.g.\nC++ and even C (Microsoft's Structured Exceptions).\n\nThe issue is: should cancelation of a thread in, say,\na C++ application cause object destructors and C++ exception\nhandlers to be invoked as the stack unwinds during thread\nexit, or not?\n\nThere seems to be more opinion in favour of using the\nstandard C version of the library (no EH) with C++ applications\nsince this appears to be the assumption commercial pthreads\nimplementations make. Therefore, if you use an EH version\nof pthreads-win32 then you may be under the illusion that\nyour application will be portable, when in fact it is likely to\nbehave very differently linked with other pthreads libraries.\n\nNow you may be asking: why have you kept the EH versions of\nthe library?\n\nThere are a couple of reasons:\n- there is division amongst the experts and so the code may\n  be needed in the future. (Yes, it's in the repository and we\n  can get it out anytime in the future, but ...)\n- pthreads-win32 is one of the few implementations, and possibly\n  the only freely available one, that has EH versions. It may be\n  useful to people who want to play with or study application\n  behaviour under these conditions.\n\n\n------------------------------------------------------------------------------\n\nQ 3\tWhat is the library naming convention?\n---\n\nBecause the library is being built using various exception\nhandling schemes and compilers - and because the library\nmay not work reliably if these are mixed in an application,\neach different version of the library has it's own name.\n\nNote 1: the incompatibility is really between EH implementations\nof the different compilers. It should be possible to use the\nstandard C version from either compiler with C++ applications\nbuilt with a different compiler. If you use an EH version of\nthe library, then you must use the same compiler for the\napplication. This is another complication and dependency that\ncan be avoided by using only the standard C library version.\n\nNote 2: if you use a standard C pthread*.dll with a C++\napplication, then any functions that you define that are\nintended to be called via pthread_cleanup_push() must be\n__cdecl.\n\nNote 3: the intention is to also name either the VC or GC\nversion (it should be arbitrary) as pthread.dll, including\npthread.lib and libpthread.a as appropriate.\n\nIn general:\n\tpthread[VG]{SE,CE,C}.dll\n\tpthread[VG]{SE,CE,C}.lib\n\nwhere:\n\t[VG] indicates the compiler\n\tV\t- MS VC\n\tG\t- GNU C\n\n\t{SE,CE,C} indicates the exception handling scheme\n\tSE\t- Structured EH\n\tCE\t- C++ EH\n\tC\t- no exceptions - uses setjmp/longjmp\n\nFor example:\n\tpthreadVSE.dll\t(MSVC/SEH)\n\tpthreadGCE.dll\t(GNUC/C++ EH)\n\tpthreadGC.dll\t(GNUC/not dependent on exceptions)\n\nThe GNU library archive file names have changed to:\n\n\tlibpthreadGCE.a\n\tlibpthreadGC.a\n\n\n------------------------------------------------------------------------------\n\nQ 4\tCleanup code default style or: it used to work when I built\n---\tthe library myself, but now it doesn't - why?\n\nUp to and including snapshot 2001-07-12, if not defined, the cleanup\nstyle was determined automatically from the compiler used, and one\nof the following was defined accordingly:\n\n\t__CLEANUP_SEH\tMSVC only\n\t__CLEANUP_CXX\tC++, including MSVC++, GNU G++\n\t__CLEANUP_C\t\tC, including GNU GCC, not MSVC\n\nThese defines determine the style of cleanup (see pthread.h) and,\nmost importantly, the way that cancelation and thread exit (via\npthread_exit) is performed (see the routine ptw32_throw() in private.c).\n\nIn short, the exceptions versions of the library throw an exception\nwhen a thread is canceled or exits (via pthread_exit()), which is\ncaught by a handler in the thread startup routine, so that the\nthe correct stack unwinding occurs regardless of where the thread\nis when it's canceled or exits via pthread_exit().\n\nAfter snapshot 2001-07-12, unless your build explicitly defines (e.g.\nvia a compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then\nthe build now ALWAYS defaults to __CLEANUP_C style cleanup. This style\nuses setjmp/longjmp in the cancelation and pthread_exit implementations,\nand therefore won't do stack unwinding even when linked to applications\nthat have it (e.g. C++ apps). This is for consistency with most/all\ncommercial Unix POSIX threads implementations.\n\nAlthough it was not clearly documented before, it is still necessary to\nbuild your application using the same __CLEANUP_* define as was\nused for the version of the library that you link with, so that the\ncorrect parts of pthread.h are included. That is, the possible\ndefines require the following library versions:\n\n\t__CLEANUP_SEH\tpthreadVSE.dll\n\t__CLEANUP_CXX\tpthreadVCE.dll or pthreadGCE.dll\n\t__CLEANUP_C\t\tpthreadVC.dll or pthreadGC.dll\n\nTHE POINT OF ALL THIS IS: if you have not been defining one of these\nexplicitly, then the defaults have been set according to the compiler\nand language you are using, as described at the top of this\nsection.\n\nTHIS NOW CHANGES, as has been explained above. For example:\n\nIf you were building your application with MSVC++ i.e. using C++\nexceptions (rather than SEH) and not explicitly defining one of\n__CLEANUP_*, then __CLEANUP_C++ was defined for you in pthread.h.\nYou should have been linking with pthreadVCE.dll, which does\nstack unwinding.\n\nIf you now build your application as you had before, pthread.h will now\nset __CLEANUP_C as the default style, and you will need to link\nwith pthreadVC.dll. Stack unwinding will now NOT occur when a\nthread is canceled, nor when the thread calls pthread_exit().\n\nYour application will now most likely behave differently to previous\nversions, and in non-obvious ways. Most likely is that local\nobjects may not be destroyed or cleaned up after a thread\nis canceled.\n\nIf you want the same behaviour as before, then you must now define\n__CLEANUP_C++ explicitly using a compiler option and link with\npthreadVCE.dll as you did before.\n\n\n------------------------------------------------------------------------------\n\nQ 5\tWhy is the default library version now less exception-friendly?\n---\n\nBecause most commercial Unix POSIX threads implementations don't allow you to\nchoose to have stack unwinding. (Compaq's TRU64 Unix is possibly an exception.)\n\nTherefore, providing it in pthread-win32 as a default could be dangerous\nand non-portable. We still provide the choice but you must now consciously\nmake it.\n\nWHY NOT REMOVE THE EXCEPTIONS VERSIONS OF THE LIBRARY ALTOGETHER?\nThere are a few reasons:\n- because there are well respected POSIX threads people who believe\n  that POSIX threads implementations should be exceptions-aware and\n  do the expected thing in that context. (There are equally respected\n  people who believe it should not be easily accessible, if it's there\n  at all.)\n- because pthreads-win32 is one of the few implementations that has\n  the choice, perhaps the only freely available one, and so offers\n  a laboratory to people who may want to explore the effects;\n- although the code will always be around somewhere for anyone who\n  wants it, once it's removed from the current version it will not be\n  nearly as visible to people who may have a use for it.\n\n\n------------------------------------------------------------------------------\n\nQ 6\tShould I use Cygwin or Mingw32 as a development environment?\n---\n\nImportant: see Q7 also.\n\nUse Mingw32 with the MSVCRT library to build applications that use\nthe pthreads DLL.\n\nCygwin's own internal support for POSIX threads is growing.\nConsult that project's documentation for more information.\n\n------------------------------------------------------------------------------\n\nQ 7\tNow that pthreads-win32 builds under Mingw32, why do I get\n---\tmemory access violations (segfaults)?\n\nThe latest Mingw32 package has thread-safe exception handling (see Q10).\nAlso, see Q6 above.\n\n------------------------------------------------------------------------------\n\nQ 8\tHow do I use pthread.dll for Win32 (Visual C++ 5.0)\n---\t\n\n>\n> I'm a \"rookie\" when it comes to your pthread implementation.\tI'm currently\n> desperately trying to install the prebuilt .dll file into my MSVC compiler.\n> Could you please provide me with explicit instructions on how to do this (or\n> direct me to a resource(s) where I can acquire such information)?\n>\n> Thank you,\n>\n\nYou should have a .dll, .lib, .def, and three .h files. It is recommended\nthat you use pthreadVC.dll, rather than pthreadVCE.dll or pthreadVSE.dll\n(see Q2 above).\n\nThe .dll can go in any directory listed in your PATH environment\nvariable, so putting it into C:\\WINDOWS should work.\n\nThe .lib file can go in any directory listed in your LIB environment\nvariable.\n\nThe .h files can go in any directory listed in your INCLUDE\nenvironment variable.\n\nOr you might prefer to put the .lib and .h files into a new directory\nand add its path to LIB and INCLUDE. You can probably do this easiest\nby editing the file:-\n\nC:\\Program Files\\DevStudio\\vc\\bin\\vcvars32.bat\n\nThe .def file isn't used by anything in the pre-compiled version but \nis included for information.\n\nCheers.\nRoss\n\n------------------------------------------------------------------------------\n\nQ 9\tCancelation doesn't work for me, why?\n---\n\n> I'm investigating a problem regarding thread cancelation. The thread I want\n> to cancel has PTHREAD_CANCEL_ASYNCHRONOUS, however, this piece of code\n> blocks on the join():\n>\n>\t\tif ((retv = Pthread_cancel( recvThread )) == 0)\n>\t\t{\n>\t\t\tretv = Pthread_join( recvThread, 0 );\n>\t\t}\n>\n> Pthread_* are just macro's; they call pthread_*.\n>\n> The thread recvThread seems to block on a select() call. It doesn't get\n> cancelled.\n>\n> Two questions:\n>\n> 1) is this normal behaviour?\n>\n> 2) if not, how does the cancel mechanism work? I'm not very familliar to\n> win32 programming, so I don't really understand how the *Event() family of\n> calls work.\n\nThe answer to your first question is, normal POSIX behaviour would  \nbe to asynchronously cancel the thread. However, even that doesn't\nguarantee cancelation as the standard only says it should be\ncancelled as soon as possible.\n\nSnapshot 99-11-02 or earlier only partially supports asynchronous cancellation.\nSnapshots since then simulate async cancelation by poking the address of\na cancelation routine into the PC of the threads context. This requires\nthe thread to be resumed in some way for the cancelation to actually\nproceed. This is not true async cancelation, but it is as close as we've\nbeen able to get to it.\n\nIf the thread you're trying to cancel is blocked (for instance, it could be\nwaiting for data from the network), it will only get cancelled when it unblocks\n(when the data arrives). For true pre-emptive cancelation in these cases,\npthreads-win32 from snapshot 2004-05-16 can automatically recognise and use the\nQueueUserAPCEx package by Panagiotis E. Hadjidoukas. This package is available\nfrom the pthreads-win32 ftp site and is included in the pthreads-win32\nself-unpacking zip from 2004-05-16 onwards.\n\nUsing deferred cancelation would normally be the way to go, however,\neven though the POSIX threads standard lists a number of C library\nfunctions that are defined as deferred cancelation points, there is\nno hookup between those which are provided by Windows and the\npthreads-win32 library.\n\nIncidently, it's worth noting for code portability that the older POSIX\nthreads standards cancelation point lists didn't include \"select\" because\n(as I read in Butenhof) it wasn't part of POSIX. However, it does appear in\nthe SUSV3.\n\nEffectively, the only mandatory cancelation points that pthreads-win32\nrecognises are those the library implements itself, ie.\n\t\n\tpthread_testcancel\n\tpthread_cond_wait\n\tpthread_cond_timedwait\n\tpthread_join\n\tsem_wait\n\tsem_timedwait\n\tpthread_delay_np\n\nThe following routines from the non-mandatory list in SUSV3 are\ncancelation points in pthreads-win32:\n\n\tpthread_rwlock_wrlock\n\tpthread_rwlock_timedwrlock\n\nThe following routines from the non-mandatory list in SUSV3 are not\ncancelation points in pthreads-win32:\n\n\tpthread_rwlock_rdlock\n\tpthread_rwlock_timedrdlock\n\nPthreads-win32 also provides two functions that allow you to create\ncancelation points within your application, but only for cases where\na thread is going to block on a Win32 handle. These are:\n\n\tpthreadCancelableWait(HANDLE waitHandle) /* Infinite wait */\n \n\tpthreadCancelableTimedWait(HANDLE waitHandle, DWORD timeout)\n\n------------------------------------------------------------------------------\n \n\nQ 10\tHow do I create thread-safe applications using\n----\tpthreadGCE.dll, libpthreadw32.a and Mingw32?\n\nThis should not be a problem with recent versions of MinGW32.\n\nFor early versions, see Thomas Pfaff's email at:\nhttp://sources.redhat.com/ml/pthreads-win32/2002/msg00000.html\n------------------------------------------------------------------------------\n \n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/GNUmakefile",
    "content": "#\n# --------------------------------------------------------------------------\n#\n#      Pthreads-win32 - POSIX Threads Library for Win32\n#      Copyright(C) 1998 John E. Bossom\n#      Copyright(C) 1999,2005 Pthreads-win32 contributors\n# \n#      Contact Email: rpj@callisto.canberra.edu.au\n# \n#      The current list of contributors is contained\n#      in the file CONTRIBUTORS included with the source\n#      code distribution. The list can also be seen at the\n#      following World Wide Web location:\n#      http://sources.redhat.com/pthreads-win32/contributors.html\n# \n#      This library is free software; you can redistribute it and/or\n#      modify it under the terms of the GNU Lesser General Public\n#      License as published by the Free Software Foundation; either\n#      version 2 of the License, or (at your option) any later version.\n# \n#      This library is distributed in the hope that it will be useful,\n#      but WITHOUT ANY WARRANTY; without even the implied warranty of\n#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n#      Lesser General Public License for more details.\n# \n#      You should have received a copy of the GNU Lesser General Public\n#      License along with this library in the file COPYING.LIB;\n#      if not, write to the Free Software Foundation, Inc.,\n#      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n#\n\nDLL_VER\t= 2\nDLL_VERD= $(DLL_VER)d\n\nDEVROOT\t= C:\\PTHREADS\n\nDLLDEST\t= $(DEVROOT)\\DLL\nLIBDEST\t= $(DEVROOT)\\DLL\n\n# If Running MsysDTK\nRM\t= rm -f\nMV\t= mv -f\nCP\t= cp -f\n\n# If not.\n#RM\t= erase\n#MV\t= rename\n#CP\t= copy\n\n# For cross compiling use e.g.\n# make CROSS=i386-mingw32msvc- clean GC-inlined\nCROSS\t= \n\nAR\t= $(CROSS)ar\nDLLTOOL = $(CROSS)dlltool\nCC      = $(CROSS)gcc\nCXX     = $(CROSS)g++\nRANLIB  = $(CROSS)ranlib\nRC\t= $(CROSS)windres\n\nOPT\t= $(CLEANUP) -O3 -finline-functions\nDOPT\t= $(CLEANUP) -g -O0\nXOPT\t=\n\nRCFLAGS\t\t= --include-dir=.\nLFLAGS\t\t= -lwsock32\n\n# ----------------------------------------------------------------------\n# The library can be built with some alternative behaviour to\n# facilitate development of applications on Win32 that will be ported\n# to other POSIX systems. Nothing definable here will make the library\n# non-compliant, but applications that make assumptions that POSIX\n# does not garrantee may fail or misbehave under some settings.\n#\n# PTW32_THREAD_ID_REUSE_INCREMENT\n# Purpose:\n# POSIX says that applications should assume that thread IDs can be\n# recycled. However, Solaris and some other systems use a [very large]\n# sequence number as the thread ID, which provides virtual uniqueness.\n# Pthreads-win32 provides pseudo-unique IDs when the default increment\n# (1) is used, but pthread_t is not a scalar type like Solaris's.\n#\n# Usage:\n# Set to any value in the range: 0 <= value <= 2^wordsize\n#\n# Examples:\n# Set to 0 to emulate non recycle-unique behaviour like Linux or *BSD.\n# Set to 1 for recycle-unique thread IDs (this is the default).\n# Set to some other +ve value to emulate smaller word size types\n# (i.e. will wrap sooner).\n#\n#PTW32_FLAGS\t= \"-DPTW32_THREAD_ID_REUSE_INCREMENT=0\"\n#\n# ----------------------------------------------------------------------\n\nGC_CFLAGS\t= $(PTW32_FLAGS) \nGCE_CFLAGS\t= $(PTW32_FLAGS) -mthreads\n\n## Mingw32\nMAKE\t\t?= make\nCFLAGS\t= $(OPT) $(XOPT) -I. -DHAVE_CONFIG_H -Wall\n\nDLL_INLINED_OBJS\t= \\\n\t\tpthread.o \\\n\t\tversion.o\n\n# Agregate modules for inlinability\nDLL_OBJS\t= \\\n\t\tattr.o \\\n\t\tbarrier.o \\\n\t\tcancel.o \\\n\t\tcleanup.o \\\n\t\tcondvar.o \\\n\t\tcreate.o \\\n\t\tdll.o \\\n\t\terrno.o \\\n\t\texit.o \\\n\t\tfork.o \\\n\t\tglobal.o \\\n\t\tmisc.o \\\n\t\tmutex.o \\\n\t\tnonportable.o \\\n\t\tprivate.o \\\n\t\trwlock.o \\\n\t\tsched.o \\\n\t\tsemaphore.o \\\n\t\tsignal.o \\\n\t\tspin.o \\\n\t\tsync.o \\\n\t\ttsd.o \\\n\t\tversion.o\n\n# Separate modules for minimum size statically linked images\nSMALL_STATIC_OBJS\t= \\\n\t\tpthread_attr_init.o \\\n\t\tpthread_attr_destroy.o \\\n\t\tpthread_attr_getdetachstate.o \\\n\t\tpthread_attr_setdetachstate.o \\\n\t\tpthread_attr_getstackaddr.o \\\n\t\tpthread_attr_setstackaddr.o \\\n\t\tpthread_attr_getstacksize.o \\\n\t\tpthread_attr_setstacksize.o \\\n\t\tpthread_attr_getscope.o \\\n\t\tpthread_attr_setscope.o \\\n\t\tpthread_attr_setschedpolicy.o \\\n\t\tpthread_attr_getschedpolicy.o \\\n\t\tpthread_attr_setschedparam.o \\\n\t\tpthread_attr_getschedparam.o \\\n\t\tpthread_attr_setinheritsched.o \\\n\t\tpthread_attr_getinheritsched.o \\\n\t\tpthread_barrier_init.o \\\n\t\tpthread_barrier_destroy.o \\\n\t\tpthread_barrier_wait.o \\\n\t\tpthread_barrierattr_init.o \\\n\t\tpthread_barrierattr_destroy.o \\\n\t\tpthread_barrierattr_setpshared.o \\\n\t\tpthread_barrierattr_getpshared.o \\\n\t\tpthread_setcancelstate.o \\\n\t\tpthread_setcanceltype.o \\\n\t\tpthread_testcancel.o \\\n\t\tpthread_cancel.o \\\n\t\tcleanup.o \\\n\t\tpthread_condattr_destroy.o \\\n\t\tpthread_condattr_getpshared.o \\\n\t\tpthread_condattr_init.o \\\n\t\tpthread_condattr_setpshared.o \\\n\t\tpthread_cond_destroy.o \\\n\t\tpthread_cond_init.o \\\n\t\tpthread_cond_signal.o \\\n\t\tpthread_cond_wait.o \\\n\t\tcreate.o \\\n\t\tdll.o \\\n\t\terrno.o \\\n\t\tpthread_exit.o \\\n\t\tfork.o \\\n\t\tglobal.o \\\n\t\tpthread_mutex_init.o \\\n\t\tpthread_mutex_destroy.o \\\n\t\tpthread_mutexattr_init.o \\\n\t\tpthread_mutexattr_destroy.o \\\n\t\tpthread_mutexattr_getpshared.o \\\n\t\tpthread_mutexattr_setpshared.o \\\n\t\tpthread_mutexattr_settype.o \\\n\t\tpthread_mutexattr_gettype.o \\\n\t\tpthread_mutex_lock.o \\\n\t\tpthread_mutex_timedlock.o \\\n\t\tpthread_mutex_unlock.o \\\n\t\tpthread_mutex_trylock.o \\\n\t\tpthread_mutexattr_setkind_np.o \\\n\t\tpthread_mutexattr_getkind_np.o \\\n\t\tpthread_getw32threadhandle_np.o \\\n\t\tpthread_delay_np.o \\\n\t\tpthread_num_processors_np.o \\\n\t\tpthread_win32_attach_detach_np.o \\\n\t\tpthread_equal.o \\\n\t\tpthread_getconcurrency.o \\\n\t\tpthread_once.o \\\n\t\tpthread_self.o \\\n\t\tpthread_setconcurrency.o \\\n\t\tpthread_rwlock_init.o \\\n\t\tpthread_rwlock_destroy.o \\\n\t\tpthread_rwlockattr_init.o \\\n\t\tpthread_rwlockattr_destroy.o \\\n\t\tpthread_rwlockattr_getpshared.o \\\n\t\tpthread_rwlockattr_setpshared.o \\\n\t\tpthread_rwlock_rdlock.o \\\n\t\tpthread_rwlock_wrlock.o \\\n\t\tpthread_rwlock_unlock.o \\\n\t\tpthread_rwlock_tryrdlock.o \\\n\t\tpthread_rwlock_trywrlock.o \\\n\t\tpthread_setschedparam.o \\\n\t\tpthread_getschedparam.o \\\n\t\tpthread_timechange_handler_np.o \\\n\t\tptw32_is_attr.o \\\n\t\tptw32_cond_check_need_init.o \\\n\t\tptw32_MCS_lock.o \\\n\t\tptw32_mutex_check_need_init.o \\\n\t\tptw32_processInitialize.o \\\n\t\tptw32_processTerminate.o \\\n\t\tptw32_threadStart.o \\\n\t\tptw32_threadDestroy.o \\\n\t\tptw32_tkAssocCreate.o \\\n\t\tptw32_tkAssocDestroy.o \\\n\t\tptw32_callUserDestroyRoutines.o \\\n\t\tptw32_timespec.o \\\n\t\tptw32_throw.o \\\n\t\tptw32_InterlockedCompareExchange.o \\\n\t\tptw32_getprocessors.o \\\n\t\tptw32_calloc.o \\\n\t\tptw32_new.o \\\n\t\tptw32_reuse.o \\\n\t\tptw32_semwait.o \\\n\t\tptw32_relmillisecs.o \\\n\t\tptw32_rwlock_check_need_init.o \\\n\t\tsched_get_priority_max.o \\\n\t\tsched_get_priority_min.o \\\n\t\tsched_setscheduler.o \\\n\t\tsched_getscheduler.o \\\n\t\tsched_yield.o \\\n\t\tsem_init.o \\\n\t\tsem_destroy.o \\\n\t\tsem_trywait.o \\\n\t\tsem_timedwait.o \\\n\t\tsem_wait.o \\\n\t\tsem_post.o \\\n\t\tsem_post_multiple.o \\\n\t\tsem_getvalue.o \\\n\t\tsem_open.o \\\n\t\tsem_close.o \\\n\t\tsem_unlink.o \\\n\t\tsignal.o \\\n\t\tpthread_kill.o \\\n\t\tptw32_spinlock_check_need_init.o \\\n\t\tpthread_spin_init.o \\\n\t\tpthread_spin_destroy.o \\\n\t\tpthread_spin_lock.o \\\n\t\tpthread_spin_unlock.o \\\n\t\tpthread_spin_trylock.o \\\n\t\tpthread_detach.o \\\n\t\tpthread_join.o \\\n\t\tpthread_key_create.o \\\n\t\tpthread_key_delete.o \\\n\t\tpthread_setspecific.o \\\n\t\tpthread_getspecific.o \\\n\t\tw32_CancelableWait.o \\\n\t\tversion.o\n\nINCL\t= \\\n\t\tconfig.h \\\n\t\timplement.h \\\n\t\tsemaphore.h \\\n\t\tpthread.h \\\n\t\tneed_errno.h\n\nATTR_SRCS\t= \\\n\t\tpthread_attr_init.c \\\n\t\tpthread_attr_destroy.c \\\n\t\tpthread_attr_getdetachstate.c \\\n\t\tpthread_attr_setdetachstate.c \\\n\t\tpthread_attr_getstackaddr.c \\\n\t\tpthread_attr_setstackaddr.c \\\n\t\tpthread_attr_getstacksize.c \\\n\t\tpthread_attr_setstacksize.c \\\n\t\tpthread_attr_getscope.c \\\n\t\tpthread_attr_setscope.c\n\nBARRIER_SRCS = \\\n\t\tpthread_barrier_init.c \\\n\t\tpthread_barrier_destroy.c \\\n\t\tpthread_barrier_wait.c \\\n\t\tpthread_barrierattr_init.c \\\n\t\tpthread_barrierattr_destroy.c \\\n\t\tpthread_barrierattr_setpshared.c \\\n\t\tpthread_barrierattr_getpshared.c\n\nCANCEL_SRCS\t= \\\n\t\tpthread_setcancelstate.c \\\n\t\tpthread_setcanceltype.c \\\n\t\tpthread_testcancel.c \\\n\t\tpthread_cancel.c \n\nCONDVAR_SRCS\t= \\\n\t\tptw32_cond_check_need_init.c \\\n\t\tpthread_condattr_destroy.c \\\n\t\tpthread_condattr_getpshared.c \\\n\t\tpthread_condattr_init.c \\\n\t\tpthread_condattr_setpshared.c \\\n\t\tpthread_cond_destroy.c \\\n\t\tpthread_cond_init.c \\\n\t\tpthread_cond_signal.c \\\n\t\tpthread_cond_wait.c\n\nEXIT_SRCS\t= \\\n\t\tpthread_exit.c\n\nMISC_SRCS\t= \\\n\t\tpthread_equal.c \\\n\t\tpthread_getconcurrency.c \\\n\t\tpthread_kill.c \\\n\t\tpthread_once.c \\\n\t\tpthread_self.c \\\n\t\tpthread_setconcurrency.c \\\n\t\tptw32_calloc.c \\\n\t\tptw32_MCS_lock.c \\\n\t\tptw32_new.c \\\n\t\tptw32_reuse.c \\\n\t\tw32_CancelableWait.c\n\nMUTEX_SRCS\t= \\\n\t\tptw32_mutex_check_need_init.c \\\n\t\tpthread_mutex_init.c \\\n\t\tpthread_mutex_destroy.c \\\n\t\tpthread_mutexattr_init.c \\\n\t\tpthread_mutexattr_destroy.c \\\n\t\tpthread_mutexattr_getpshared.c \\\n\t\tpthread_mutexattr_setpshared.c \\\n\t\tpthread_mutexattr_settype.c \\\n\t\tpthread_mutexattr_gettype.c \\\n\t\tpthread_mutex_lock.c \\\n\t\tpthread_mutex_timedlock.c \\\n\t\tpthread_mutex_unlock.c \\\n\t\tpthread_mutex_trylock.c\n\nNONPORTABLE_SRCS = \\\n\t\tpthread_mutexattr_setkind_np.c \\\n\t\tpthread_mutexattr_getkind_np.c \\\n\t\tpthread_getw32threadhandle_np.c \\\n\t\tpthread_delay_np.c \\\n\t\tpthread_num_processors_np.c \\\n\t\tpthread_win32_attach_detach_np.c \\\n\t\tpthread_timechange_handler_np.c \n\nPRIVATE_SRCS\t= \\\n\t\tptw32_is_attr.c \\\n\t\tptw32_processInitialize.c \\\n\t\tptw32_processTerminate.c \\\n\t\tptw32_threadStart.c \\\n\t\tptw32_threadDestroy.c \\\n\t\tptw32_tkAssocCreate.c \\\n\t\tptw32_tkAssocDestroy.c \\\n\t\tptw32_callUserDestroyRoutines.c \\\n\t\tptw32_semwait.c \\\n\t\tptw32_relmillisecs.c \\\n\t\tptw32_timespec.c \\\n\t\tptw32_throw.c \\\n\t\tptw32_InterlockedCompareExchange.c \\\n\t\tptw32_getprocessors.c\n\nRWLOCK_SRCS\t= \\\n\t\tptw32_rwlock_check_need_init.c \\\n\t\tptw32_rwlock_cancelwrwait.c \\\n\t\tpthread_rwlock_init.c \\\n\t\tpthread_rwlock_destroy.c \\\n\t\tpthread_rwlockattr_init.c \\\n\t\tpthread_rwlockattr_destroy.c \\\n\t\tpthread_rwlockattr_getpshared.c \\\n\t\tpthread_rwlockattr_setpshared.c \\\n\t\tpthread_rwlock_rdlock.c \\\n\t\tpthread_rwlock_timedrdlock.c \\\n\t\tpthread_rwlock_wrlock.c \\\n\t\tpthread_rwlock_timedwrlock.c \\\n\t\tpthread_rwlock_unlock.c \\\n\t\tpthread_rwlock_tryrdlock.c \\\n\t\tpthread_rwlock_trywrlock.c\n\nSCHED_SRCS\t= \\\n\t\tpthread_attr_setschedpolicy.c \\\n\t\tpthread_attr_getschedpolicy.c \\\n\t\tpthread_attr_setschedparam.c \\\n\t\tpthread_attr_getschedparam.c \\\n\t\tpthread_attr_setinheritsched.c \\\n\t\tpthread_attr_getinheritsched.c \\\n\t\tpthread_setschedparam.c \\\n\t\tpthread_getschedparam.c \\\n\t\tsched_get_priority_max.c \\\n\t\tsched_get_priority_min.c \\\n\t\tsched_setscheduler.c \\\n\t\tsched_getscheduler.c \\\n\t\tsched_yield.c\n\nSEMAPHORE_SRCS = \\\n\t\tsem_init.c \\\n\t\tsem_destroy.c \\\n\t\tsem_trywait.c \\\n\t\tsem_timedwait.c \\\n\t\tsem_wait.c \\\n\t\tsem_post.c \\\n\t\tsem_post_multiple.c \\\n\t\tsem_getvalue.c \\\n\t\tsem_open.c \\\n\t\tsem_close.c \\\n\t\tsem_unlink.c\n\nSPIN_SRCS\t= \\\n\t\tptw32_spinlock_check_need_init.c \\\n\t\tpthread_spin_init.c \\\n\t\tpthread_spin_destroy.c \\\n\t\tpthread_spin_lock.c \\\n\t\tpthread_spin_unlock.c \\\n\t\tpthread_spin_trylock.c\n\nSYNC_SRCS\t= \\\n\t\tpthread_detach.c \\\n\t\tpthread_join.c\n\nTSD_SRCS\t= \\\n\t\tpthread_key_create.c \\\n\t\tpthread_key_delete.c \\\n\t\tpthread_setspecific.c \\\n\t\tpthread_getspecific.c\n\n\nGCE_DLL\t= pthreadGCE$(DLL_VER).dll\nGCED_DLL= pthreadGCE$(DLL_VERD).dll\nGCE_LIB\t= libpthreadGCE$(DLL_VER).a\nGCED_LIB= libpthreadGCE$(DLL_VERD).a\nGCE_INLINED_STAMP = pthreadGCE$(DLL_VER).stamp\nGCED_INLINED_STAMP = pthreadGCE$(DLL_VERD).stamp\n\nGC_DLL \t= pthreadGC$(DLL_VER).dll\nGCD_DLL\t= pthreadGC$(DLL_VERD).dll\nGC_LIB\t= libpthreadGC$(DLL_VER).a\nGCD_LIB\t= libpthreadGC$(DLL_VERD).a\nGC_INLINED_STAMP = pthreadGC$(DLL_VER).stamp\nGCD_INLINED_STAMP = pthreadGC$(DLL_VERD).stamp\nGC_STATIC_STAMP = libpthreadGC$(DLL_VER).stamp\nGCD_STATIC_STAMP = libpthreadGC$(DLL_VERD).stamp\n\nPTHREAD_DEF\t= pthread.def\n\nhelp:\n\t@ echo \"Run one of the following command lines:\"\n\t@ echo \"make clean GC            (to build the GNU C dll with C cleanup code)\"\n\t@ echo \"make clean GCE           (to build the GNU C dll with C++ exception handling)\"\n\t@ echo \"make clean GC-inlined    (to build the GNU C inlined dll with C cleanup code)\"\n\t@ echo \"make clean GCE-inlined   (to build the GNU C inlined dll with C++ exception handling)\"\n\t@ echo \"make clean GC-static     (to build the GNU C inlined static lib with C cleanup code)\"\n\t@ echo \"make clean GC-debug      (to build the GNU C debug dll with C cleanup code)\"\n\t@ echo \"make clean GCE-debug     (to build the GNU C debug dll with C++ exception handling)\"\n\t@ echo \"make clean GC-inlined-debug    (to build the GNU C inlined debug dll with C cleanup code)\"\n\t@ echo \"make clean GCE-inlined-debug   (to build the GNU C inlined debug dll with C++ exception handling)\"\n\t@ echo \"make clean GC-static-debug     (to build the GNU C inlined static debug lib with C cleanup code)\"\n\nall:\n\t@ $(MAKE) clean GCE\n\t@ $(MAKE) clean GC\n\nGC:\n\t\t$(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS=\"$(GC_CFLAGS)\" OBJ=\"$(DLL_OBJS)\" $(GC_DLL)\n\nGC-debug:\n\t\t$(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS=\"$(GC_CFLAGS)\" OBJ=\"$(DLL_OBJS)\" DLL_VER=$(DLL_VERD) OPT=\"$(DOPT)\" $(GCD_DLL)\n\nGCE:\n\t\t$(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS=\"$(GCE_CFLAGS)\" OBJ=\"$(DLL_OBJS)\" $(GCE_DLL)\n\nGCE-debug:\n\t\t$(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS=\"$(GCE_CFLAGS)\" OBJ=\"$(DLL_OBJS)\" DLL_VER=$(DLL_VERD) OPT=\"$(DOPT)\" $(GCED_DLL)\n\nGC-inlined:\n\t\t$(MAKE) XOPT=\"-DPTW32_BUILD_INLINED\" CLEANUP=-D__CLEANUP_C XC_FLAGS=\"$(GC_CFLAGS)\" OBJ=\"$(DLL_INLINED_OBJS)\" $(GC_INLINED_STAMP)\n\nGC-inlined-debug:\n\t\t$(MAKE) XOPT=\"-DPTW32_BUILD_INLINED\" CLEANUP=-D__CLEANUP_C XC_FLAGS=\"$(GC_CFLAGS)\" OBJ=\"$(DLL_INLINED_OBJS)\" DLL_VER=$(DLL_VERD) OPT=\"$(DOPT)\" $(GCD_INLINED_STAMP)\n\nGCE-inlined:\n\t\t$(MAKE) CC=$(CXX) XOPT=\"-DPTW32_BUILD_INLINED\" CLEANUP=-D__CLEANUP_CXX XC_FLAGS=\"$(GCE_CFLAGS)\" OBJ=\"$(DLL_INLINED_OBJS)\" $(GCE_INLINED_STAMP)\n\nGCE-inlined-debug:\n\t\t$(MAKE) CC=$(CXX) XOPT=\"-DPTW32_BUILD_INLINED\" CLEANUP=-D__CLEANUP_CXX XC_FLAGS=\"$(GCE_CFLAGS)\" OBJ=\"$(DLL_INLINED_OBJS)\" DLL_VER=$(DLL_VERD) OPT=\"$(DOPT)\" $(GCED_INLINED_STAMP)\n\nGC-static:\n\t\t$(MAKE) XOPT=\"-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB\" CLEANUP=-D__CLEANUP_C XC_FLAGS=\"$(GC_CFLAGS)\" OBJ=\"$(DLL_INLINED_OBJS)\" $(GC_STATIC_STAMP)\n\nGC-static-debug:\n\t\t$(MAKE) XOPT=\"-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB\" CLEANUP=-D__CLEANUP_C XC_FLAGS=\"$(GC_CFLAGS)\" OBJ=\"$(DLL_INLINED_OBJS)\" DLL_VER=$(DLL_VERD) OPT=\"$(DOPT)\" $(GCD_STATIC_STAMP)\n\ntests:\n\t@ cd tests\n\t@ $(MAKE) auto\n\n%.pre: %.c\n\t$(CC) -E -o $@ $(CFLAGS) $^\n\n%.s: %.c\n\t$(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@\n\n%.o: %.rc\n\t$(RC) $(RCFLAGS) $(CLEANUP) -o $@ $<\n\n.SUFFIXES: .dll .rc .c .o\n\n.c.o:;\t\t $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $<\n\n\n$(GC_DLL) $(GCD_DLL): $(DLL_OBJS)\n\t$(CC) $(OPT) -shared -o $(GC_DLL) $(DLL_OBJS) $(LFLAGS)\n\t$(DLLTOOL) -z pthread.def $(DLL_OBJS)\n\t$(DLLTOOL) -k --dllname $@ --output-lib $(GC_LIB) --def $(PTHREAD_DEF)\n\n$(GCE_DLL): $(DLL_OBJS)\n\t$(CC) $(OPT) -mthreads -shared -o $(GCE_DLL) $(DLL_OBJS) $(LFLAGS)\n\t$(DLLTOOL) -z pthread.def $(DLL_OBJS)\n\t$(DLLTOOL) -k --dllname $@ --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)\n\n$(GC_INLINED_STAMP) $(GCD_INLINED_STAMP): $(DLL_INLINED_OBJS)\n\t$(CC) $(OPT) $(XOPT) -shared -o $(GC_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)\n\t$(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)\n\t$(DLLTOOL) -k --dllname $(GC_DLL) --output-lib $(GC_LIB) --def $(PTHREAD_DEF)\n\techo touched > $(GC_INLINED_STAMP)\n\n$(GCE_INLINED_STAMP) $(GCED_INLINED_STAMP): $(DLL_INLINED_OBJS)\n\t$(CC) $(OPT) $(XOPT) -mthreads -shared -o $(GCE_DLL) $(DLL_INLINED_OBJS)  $(LFLAGS)\n\t$(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)\n\t$(DLLTOOL) -k --dllname $(GCE_DLL) --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)\n\techo touched > $(GCE_INLINED_STAMP)\n\n$(GC_STATIC_STAMP) $(GCD_STATIC_STAMP): $(DLL_INLINED_OBJS)\n\t$(RM) $(GC_LIB)\n\t$(AR) -rv $(GC_LIB) $(DLL_INLINED_OBJS)\n\t$(RANLIB) $(GC_LIB)\n\techo touched > $(GC_STATIC_STAMP)\n\nclean:\n\t-$(RM) *~\n\t-$(RM) *.i\n\t-$(RM) *.o\n\t-$(RM) *.obj\n\t-$(RM) *.exe\n\t-$(RM) $(PTHREAD_DEF)\n\nrealclean: clean\n\t-$(RM) $(GC_LIB)\n\t-$(RM) $(GCE_LIB)\n\t-$(RM) $(GC_DLL)\n\t-$(RM) $(GCE_DLL)\n\t-$(RM) $(GC_INLINED_STAMP)\n\t-$(RM) $(GCE_INLINED_STAMP)\n\t-$(RM) $(GC_STATIC_STAMP)\n\t-$(RM) $(GCD_LIB)\n\t-$(RM) $(GCED_LIB)\n\t-$(RM) $(GCD_DLL)\n\t-$(RM) $(GCED_DLL)\n\t-$(RM) $(GCD_INLINED_STAMP)\n\t-$(RM) $(GCED_INLINED_STAMP)\n\t-$(RM) $(GCD_STATIC_STAMP)\n\nattr.o:\t\tattr.c $(ATTR_SRCS) $(INCL)\nbarrier.o:\tbarrier.c $(BARRIER_SRCS) $(INCL)\ncancel.o:\tcancel.c $(CANCEL_SRCS) $(INCL)\ncondvar.o:\tcondvar.c $(CONDVAR_SRCS) $(INCL)\nexit.o:\t\texit.c $(EXIT_SRCS) $(INCL)\nmisc.o:\t\tmisc.c $(MISC_SRCS) $(INCL)\nmutex.o:\tmutex.c $(MUTEX_SRCS) $(INCL)\nnonportable.o:\tnonportable.c $(NONPORTABLE_SRCS) $(INCL)\nprivate.o:\tprivate.c $(PRIVATE_SRCS) $(INCL)\nrwlock.o:\trwlock.c $(RWLOCK_SRCS) $(INCL)\nsched.o:\tsched.c $(SCHED_SRCS) $(INCL)\nsemaphore.o:\tsemaphore.c $(SEMAPHORE_SRCS) $(INCL)\nspin.o:\t\tspin.c $(SPIN_SRCS) $(INCL)\nsync.o:\t\tsync.c $(SYNC_SRCS) $(INCL)\ntsd.o:\t\ttsd.c $(TSD_SRCS) $(INCL)\nversion.o:\tversion.rc $(INCL)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/MAINTAINERS",
    "content": "CVS Repository maintainers\n\nRoss Johnson\t\trpj@ise.canberra.edu.au\nBen Elliston\t\tbje@cygnus.com\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/Makefile",
    "content": "# This makefile is compatible with MS nmake and can be used as a\n# replacement for buildlib.bat. I've changed the target from an ordinary dll\n# (/LD) to a debugging dll (/LDd).\n# \n# The variables $DLLDEST and $LIBDEST hold the destination directories for the\n# dll and the lib, respectively. Probably all that needs to change is $DEVROOT.\n\n\n# DLL_VER:\n# See pthread.h and README - This number is computed as 'current - age'\nDLL_VER\t= 2\nDLL_VERD= $(DLL_VER)d\n\nDEVROOT\t= C:\\pthreads\n\nDLLDEST\t= $(DEVROOT)\\DLL\nLIBDEST\t= $(DEVROOT)\\LIB\nHDRDEST\t= $(DEVROOT)\\INCLUDE\n\nDLLS\t= pthreadVCE$(DLL_VER).dll pthreadVSE$(DLL_VER).dll pthreadVC$(DLL_VER).dll \\\n\t\t  pthreadVCE$(DLL_VERD).dll pthreadVSE$(DLL_VERD).dll pthreadVC$(DLL_VERD).dll\nINLINED_STAMPS\t= pthreadVCE$(DLL_VER).stamp pthreadVSE$(DLL_VER).stamp pthreadVC$(DLL_VER).stamp \\\n\t\t\t\t  pthreadVCE$(DLL_VERD).stamp pthreadVSE$(DLL_VERD).stamp pthreadVC$(DLL_VERD).stamp\nSTATIC_STAMPS\t= pthreadVCE$(DLL_VER).static pthreadVSE$(DLL_VER).static pthreadVC$(DLL_VER).static \\\n\t\t\t\t  pthreadVCE$(DLL_VERD).static pthreadVSE$(DLL_VERD).static pthreadVC$(DLL_VERD).static\n\nOPTIM\t= /O2 /Ob2\nOPTIMD\t=\n\nCFLAGS\t= /W3 /MT /nologo /Yd /I. /D_WIN32_WINNT=0x400 /DHAVE_CONFIG_H\nCFLAGSD\t= /Zi /MT $(CFLAGS)\n\n\n# Default cleanup style\nCLEANUP\t= __CLEANUP_C\n\n# C++ Exceptions\nVCEFLAGS\t= /GX /TP $(CFLAGS)\nVCEFLAGSD\t= /GX /TP $(CFLAGSD)\n#Structured Exceptions\nVSEFLAGS\t= $(CFLAGS)\nVSEFLAGSD\t= $(CFLAGSD)\n#C cleanup code\nVCFLAGS\t= $(CFLAGS)\nVCFLAGSD= $(CFLAGSD)\n\nDLL_INLINED_OBJS = \\\n\t\tpthread.obj \\\n\t\tversion.res\n\n# Aggregate modules for inlinability\nDLL_OBJS\t= \\\n\t\tattr.obj \\\n\t\tbarrier.obj \\\n\t\tcancel.obj \\\n\t\tcleanup.obj \\\n\t\tcondvar.obj \\\n\t\tcreate.obj \\\n\t\tdll.obj \\\n\t\terrno.obj \\\n\t\texit.obj \\\n\t\tfork.obj \\\n\t\tglobal.obj \\\n\t\tmisc.obj \\\n\t\tmutex.obj \\\n\t\tnonportable.obj \\\n\t\tprivate.obj \\\n\t\trwlock.obj \\\n\t\tsched.obj \\\n\t\tsemaphore.obj \\\n\t\tsignal.obj \\\n\t\tspin.obj \\\n\t\tsync.obj \\\n\t\ttsd.obj \\\n\t\tversion.res\n\n# Separate modules for minimising the size of statically linked images\nSMALL_STATIC_OBJS\t= \\\n\t\tpthread_attr_init.obj \\\n\t\tpthread_attr_destroy.obj \\\n\t\tpthread_attr_getdetachstate.obj \\\n\t\tpthread_attr_setdetachstate.obj \\\n\t\tpthread_attr_getstackaddr.obj \\\n\t\tpthread_attr_setstackaddr.obj \\\n\t\tpthread_attr_getstacksize.obj \\\n\t\tpthread_attr_setstacksize.obj \\\n\t\tpthread_attr_getscope.obj \\\n\t\tpthread_attr_setscope.obj \\\n\t\tpthread_attr_setschedpolicy.obj \\\n\t\tpthread_attr_getschedpolicy.obj \\\n\t\tpthread_attr_setschedparam.obj \\\n\t\tpthread_attr_getschedparam.obj \\\n\t\tpthread_attr_setinheritsched.obj \\\n\t\tpthread_attr_getinheritsched.obj \\\n\t\tpthread_barrier_init.obj \\\n\t\tpthread_barrier_destroy.obj \\\n\t\tpthread_barrier_wait.obj \\\n\t\tpthread_barrierattr_init.obj \\\n\t\tpthread_barrierattr_destroy.obj \\\n\t\tpthread_barrierattr_setpshared.obj \\\n\t\tpthread_barrierattr_getpshared.obj \\\n\t\tpthread_setcancelstate.obj \\\n\t\tpthread_setcanceltype.obj \\\n\t\tpthread_testcancel.obj \\\n\t\tpthread_cancel.obj \\\n\t\tcleanup.obj \\\n\t\tpthread_condattr_destroy.obj \\\n\t\tpthread_condattr_getpshared.obj \\\n\t\tpthread_condattr_init.obj \\\n\t\tpthread_condattr_setpshared.obj \\\n\t\tpthread_cond_destroy.obj \\\n\t\tpthread_cond_init.obj \\\n\t\tpthread_cond_signal.obj \\\n\t\tpthread_cond_wait.obj \\\n\t\tcreate.obj \\\n\t\tdll.obj \\\n\t\terrno.obj \\\n\t\tpthread_exit.obj \\\n\t\tfork.obj \\\n\t\tglobal.obj \\\n\t\tpthread_mutex_init.obj \\\n\t\tpthread_mutex_destroy.obj \\\n\t\tpthread_mutexattr_init.obj \\\n\t\tpthread_mutexattr_destroy.obj \\\n\t\tpthread_mutexattr_getpshared.obj \\\n\t\tpthread_mutexattr_setpshared.obj \\\n\t\tpthread_mutexattr_settype.obj \\\n\t\tpthread_mutexattr_gettype.obj \\\n\t\tpthread_mutex_lock.obj \\\n\t\tpthread_mutex_timedlock.obj \\\n\t\tpthread_mutex_unlock.obj \\\n\t\tpthread_mutex_trylock.obj \\\n\t\tpthread_mutexattr_setkind_np.obj \\\n\t\tpthread_mutexattr_getkind_np.obj \\\n\t\tpthread_getw32threadhandle_np.obj \\\n\t\tpthread_delay_np.obj \\\n\t\tpthread_num_processors_np.obj \\\n\t\tpthread_win32_attach_detach_np.obj \\\n\t\tpthread_equal.obj \\\n\t\tpthread_getconcurrency.obj \\\n\t\tpthread_once.obj \\\n\t\tpthread_self.obj \\\n\t\tpthread_setconcurrency.obj \\\n\t\tpthread_rwlock_init.obj \\\n\t\tpthread_rwlock_destroy.obj \\\n\t\tpthread_rwlockattr_init.obj \\\n\t\tpthread_rwlockattr_destroy.obj \\\n\t\tpthread_rwlockattr_getpshared.obj \\\n\t\tpthread_rwlockattr_setpshared.obj \\\n\t\tpthread_rwlock_rdlock.obj \\\n\t\tpthread_rwlock_wrlock.obj \\\n\t\tpthread_rwlock_unlock.obj \\\n\t\tpthread_rwlock_tryrdlock.obj \\\n\t\tpthread_rwlock_trywrlock.obj \\\n\t\tpthread_setschedparam.obj \\\n\t\tpthread_getschedparam.obj \\\n\t\tpthread_timechange_handler_np.obj \\\n\t\tptw32_is_attr.obj \\\n\t\tptw32_processInitialize.obj \\\n\t\tptw32_processTerminate.obj \\\n\t\tptw32_threadStart.obj \\\n\t\tptw32_threadDestroy.obj \\\n\t\tptw32_tkAssocCreate.obj \\\n\t\tptw32_tkAssocDestroy.obj \\\n\t\tptw32_callUserDestroyRoutines.obj \\\n\t\tptw32_timespec.obj \\\n\t\tptw32_throw.obj \\\n\t\tptw32_InterlockedCompareExchange.obj \\\n\t\tptw32_getprocessors.obj \\\n\t\tptw32_calloc.obj \\\n\t\tptw32_new.obj \\\n\t\tptw32_reuse.obj \\\n\t\tptw32_rwlock_check_need_init.obj \\\n\t\tptw32_cond_check_need_init.obj \\\n\t\tptw32_mutex_check_need_init.obj \\\n\t\tptw32_semwait.obj \\\n\t\tptw32_relmillisecs.obj \\\n\t\tptw32_MCS_lock.obj \\\n\t\tsched_get_priority_max.obj \\\n\t\tsched_get_priority_min.obj \\\n\t\tsched_setscheduler.obj \\\n\t\tsched_getscheduler.obj \\\n\t\tsched_yield.obj \\\n\t\tsem_init.obj \\\n\t\tsem_destroy.obj \\\n\t\tsem_trywait.obj \\\n\t\tsem_timedwait.obj \\\n\t\tsem_wait.obj \\\n\t\tsem_post.obj \\\n\t\tsem_post_multiple.obj \\\n\t\tsem_getvalue.obj \\\n\t\tsem_open.obj \\\n\t\tsem_close.obj \\\n\t\tsem_unlink.obj \\\n\t\tsignal.obj \\\n\t\tpthread_kill.obj \\\n\t\tptw32_spinlock_check_need_init.obj \\\n\t\tpthread_spin_init.obj \\\n\t\tpthread_spin_destroy.obj \\\n\t\tpthread_spin_lock.obj \\\n\t\tpthread_spin_unlock.obj \\\n\t\tpthread_spin_trylock.obj \\\n\t\tpthread_detach.obj \\\n\t\tpthread_join.obj \\\n\t\tpthread_key_create.obj \\\n\t\tpthread_key_delete.obj \\\n\t\tpthread_setspecific.obj \\\n\t\tpthread_getspecific.obj \\\n\t\tw32_CancelableWait.obj \\\n\t\tversion.res\n\nINCL\t= config.h implement.h semaphore.h pthread.h need_errno.h\n\nATTR_SRCS\t= \\\n\t\tpthread_attr_init.c \\\n\t\tpthread_attr_destroy.c \\\n\t\tpthread_attr_getdetachstate.c \\\n\t\tpthread_attr_setdetachstate.c \\\n\t\tpthread_attr_getstackaddr.c \\\n\t\tpthread_attr_setstackaddr.c \\\n\t\tpthread_attr_getstacksize.c \\\n\t\tpthread_attr_setstacksize.c \\\n\t\tpthread_attr_getscope.c \\\n\t\tpthread_attr_setscope.c\n\nBARRIER_SRCS = \\\n\t\tpthread_barrier_init.c \\\n\t\tpthread_barrier_destroy.c \\\n\t\tpthread_barrier_wait.c \\\n\t\tpthread_barrierattr_init.c \\\n\t\tpthread_barrierattr_destroy.c \\\n\t\tpthread_barrierattr_setpshared.c \\\n\t\tpthread_barrierattr_getpshared.c\n\nCANCEL_SRCS\t= \\\n\t\tpthread_setcancelstate.c \\\n\t\tpthread_setcanceltype.c \\\n\t\tpthread_testcancel.c \\\n\t\tpthread_cancel.c \n\nCONDVAR_SRCS\t= \\\n\t\tptw32_cond_check_need_init.c \\\n\t\tpthread_condattr_destroy.c \\\n\t\tpthread_condattr_getpshared.c \\\n\t\tpthread_condattr_init.c \\\n\t\tpthread_condattr_setpshared.c \\\n\t\tpthread_cond_destroy.c \\\n\t\tpthread_cond_init.c \\\n\t\tpthread_cond_signal.c \\\n\t\tpthread_cond_wait.c\n\nEXIT_SRCS\t= \\\n\t\tpthread_exit.c\n\nMISC_SRCS\t= \\\n\t\tpthread_equal.c \\\n\t\tpthread_getconcurrency.c \\\n\t\tpthread_kill.c \\\n\t\tpthread_once.c \\\n\t\tpthread_self.c \\\n\t\tpthread_setconcurrency.c \\\n\t\tptw32_calloc.c \\\n\t\tptw32_MCS_lock.c \\\n\t\tptw32_new.c \\\n\t\tptw32_reuse.c \\\n\t\tptw32_relmillisecs.c \\\n\t\tw32_CancelableWait.c\n\nMUTEX_SRCS\t= \\\n\t\tptw32_mutex_check_need_init.c \\\n\t\tpthread_mutex_init.c \\\n\t\tpthread_mutex_destroy.c \\\n\t\tpthread_mutexattr_init.c \\\n\t\tpthread_mutexattr_destroy.c \\\n\t\tpthread_mutexattr_getpshared.c \\\n\t\tpthread_mutexattr_setpshared.c \\\n\t\tpthread_mutexattr_settype.c \\\n\t\tpthread_mutexattr_gettype.c \\\n\t\tpthread_mutex_lock.c \\\n\t\tpthread_mutex_timedlock.c \\\n\t\tpthread_mutex_unlock.c \\\n\t\tpthread_mutex_trylock.c\n\nNONPORTABLE_SRCS = \\\n\t\tpthread_mutexattr_setkind_np.c \\\n\t\tpthread_mutexattr_getkind_np.c \\\n\t\tpthread_getw32threadhandle_np.c \\\n\t\tpthread_delay_np.c \\\n\t\tpthread_num_processors_np.c \\\n\t\tpthread_win32_attach_detach_np.c \\\n\t\tpthread_timechange_handler_np.c \n\nPRIVATE_SRCS\t= \\\n\t\tptw32_is_attr.c \\\n\t\tptw32_processInitialize.c \\\n\t\tptw32_processTerminate.c \\\n\t\tptw32_threadStart.c \\\n\t\tptw32_threadDestroy.c \\\n\t\tptw32_tkAssocCreate.c \\\n\t\tptw32_tkAssocDestroy.c \\\n\t\tptw32_callUserDestroyRoutines.c \\\n\t\tptw32_semwait.c \\\n\t\tptw32_timespec.c \\\n\t\tptw32_throw.c \\\n\t\tptw32_InterlockedCompareExchange.c \\\n\t\tptw32_getprocessors.c\n\nRWLOCK_SRCS\t= \\\n\t\tptw32_rwlock_check_need_init.c \\\n\t\tptw32_rwlock_cancelwrwait.c \\\n\t\tpthread_rwlock_init.c \\\n\t\tpthread_rwlock_destroy.c \\\n\t\tpthread_rwlockattr_init.c \\\n\t\tpthread_rwlockattr_destroy.c \\\n\t\tpthread_rwlockattr_getpshared.c \\\n\t\tpthread_rwlockattr_setpshared.c \\\n\t\tpthread_rwlock_rdlock.c \\\n\t\tpthread_rwlock_timedrdlock.c \\\n\t\tpthread_rwlock_wrlock.c \\\n\t\tpthread_rwlock_timedwrlock.c \\\n\t\tpthread_rwlock_unlock.c \\\n\t\tpthread_rwlock_tryrdlock.c \\\n\t\tpthread_rwlock_trywrlock.c\n\nSCHED_SRCS\t= \\\n\t\tpthread_attr_setschedpolicy.c \\\n\t\tpthread_attr_getschedpolicy.c \\\n\t\tpthread_attr_setschedparam.c \\\n\t\tpthread_attr_getschedparam.c \\\n\t\tpthread_attr_setinheritsched.c \\\n\t\tpthread_attr_getinheritsched.c \\\n\t\tpthread_setschedparam.c \\\n\t\tpthread_getschedparam.c \\\n\t\tsched_get_priority_max.c \\\n\t\tsched_get_priority_min.c \\\n\t\tsched_setscheduler.c \\\n\t\tsched_getscheduler.c \\\n\t\tsched_yield.c\n\nSEMAPHORE_SRCS = \\\n\t\tsem_init.c \\\n\t\tsem_destroy.c \\\n\t\tsem_trywait.c \\\n\t\tsem_timedwait.c \\\n\t\tsem_wait.c \\\n\t\tsem_post.c \\\n\t\tsem_post_multiple.c \\\n\t\tsem_getvalue.c \\\n\t\tsem_open.c \\\n\t\tsem_close.c \\\n\t\tsem_unlink.c\n\nSPIN_SRCS\t= \\\n\t\tptw32_spinlock_check_need_init.c \\\n\t\tpthread_spin_init.c \\\n\t\tpthread_spin_destroy.c \\\n\t\tpthread_spin_lock.c \\\n\t\tpthread_spin_unlock.c \\\n\t\tpthread_spin_trylock.c\n\nSYNC_SRCS\t= \\\n\t\tpthread_detach.c \\\n\t\tpthread_join.c\n\nTSD_SRCS\t= \\\n\t\tpthread_key_create.c \\\n\t\tpthread_key_delete.c \\\n\t\tpthread_setspecific.c \\\n\t\tpthread_getspecific.c\n\n\nhelp:\n\t@ echo Run one of the following command lines:\n\t@ echo nmake clean VCE   (to build the MSVC dll with C++ exception handling)\n\t@ echo nmake clean VSE   (to build the MSVC dll with structured exception handling)\n\t@ echo nmake clean VC    (to build the MSVC dll with C cleanup code)\n\t@ echo nmake clean VCE-inlined   (to build the MSVC inlined dll with C++ exception handling)\n\t@ echo nmake clean VSE-inlined   (to build the MSVC inlined dll with structured exception handling)\n\t@ echo nmake clean VC-inlined    (to build the MSVC inlined dll with C cleanup code)\n\t@ echo nmake clean VC-static     (to build the MSVC static lib with C cleanup code)\n\t@ echo nmake clean VCE-debug   (to build the debug MSVC dll with C++ exception handling)\n\t@ echo nmake clean VSE-debug   (to build the debug MSVC dll with structured exception handling)\n\t@ echo nmake clean VC-debug    (to build the debug MSVC dll with C cleanup code)\n\t@ echo nmake clean VCE-inlined-debug   (to build the debug MSVC inlined dll with C++ exception handling)\n\t@ echo nmake clean VSE-inlined-debug   (to build the debug MSVC inlined dll with structured exception handling)\n\t@ echo nmake clean VC-inlined-debug    (to build the debug MSVC inlined dll with C cleanup code)\n\t@ echo nmake clean VC-static-debug     (to build the debug MSVC static lib with C cleanup code)\n\nall:\n\t@ nmake clean VCE-inlined\n\t@ nmake clean VSE-inlined\n\t@ nmake clean VC-inlined\n\t@ nmake clean VCE-inlined-debug\n\t@ nmake clean VSE-inlined-debug\n\t@ nmake clean VC-inlined-debug\n\nVCE:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCEFLAGS)\" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).dll\n\nVCE-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VCEFLAGSD)\" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).dll\n\nVSE:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VSEFLAGS)\" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).dll\n\nVSE-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VSEFLAGSD)\" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).dll\n\nVC:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCFLAGS)\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).dll\n\nVC-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VCFLAGSD)\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).dll\n\n#\n# The so-called inlined DLL is just a single translation unit with\n# inlining optimisation turned on.\n#\nVCE-inlined:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCEFLAGS) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).stamp\n\nVCE-inlined-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VCEFLAGSD) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).stamp\n\nVSE-inlined:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VSEFLAGS) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).stamp\n\nVSE-inlined-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VSEFLAGSD) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).stamp\n\nVC-inlined:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCFLAGS) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).stamp\n\nVC-inlined-debug:\n\tnmake /nologo EHFLAGS=\"$(OPTIMD) $(VCFLAGSD) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).stamp\n\nVC-static:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCFLAGS) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).static\n\nVC-static-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VCFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).static\n\nrealclean: clean\n\tif exist pthread*.dll del pthread*.dll\n\tif exist pthread*.lib del pthread*.lib\n\tif exist *.stamp del *.stamp\n\nclean:\n\tif exist *.obj del *.obj\n\tif exist *.ilk del *.ilk\n\tif exist *.pdb del *.pdb\n\tif exist *.exp del *.exp\n\tif exist *.map del *.map\n\tif exist *.o del *.o\n\tif exist *.i del *.i\n\tif exist *.res del *.res\n\n\ninstall: $(DLLS)\n\tcopy pthread*.dll $(DLLDEST)\n\tcopy pthread*.lib $(LIBDEST)\n\tcopy pthread.h $(HDRDEST)\n\tcopy sched.h $(HDRDEST)\n\tcopy semaphore.h $(HDRDEST)\n\n$(DLLS): $(DLL_OBJS)\n\tcl /MT /LDd /Zi /nologo $(DLL_OBJS) \\\n\t\t/link /implib:$*.lib \\\n\t\twsock32.lib /out:$@\n\n$(INLINED_STAMPS): $(DLL_INLINED_OBJS)\n\tcl /MT /LDd /Zi /nologo $(DLL_INLINED_OBJS) \\\n\t\t/link /nodefaultlib:libcmt /implib:$*.lib \\\n\t\tmsvcrt.lib wsock32.lib /out:$*.dll\n\n$(STATIC_STAMPS): $(DLL_INLINED_OBJS)\n\tif exist $*.lib del $*.lib\n\tlib $(DLL_INLINED_OBJS) /out:$*.lib\n\n.c.obj:\n\tcl /MT $(EHFLAGS) /D$(CLEANUP) -c $<\n\n.rc.res:\n\trc /dPTW32_RC_MSC /d$(CLEANUP) $<\n\n.c.i:\n\tcl /MT /P /O2 /Ob1 $(VCFLAGS) $<\n\nattr.obj:\tattr.c $(ATTR_SRCS) $(INCL)\nbarrier.obj:\tbarrier.c $(BARRIER_SRCS) $(INCL)\ncancel.obj:\tcancel.c $(CANCEL_SRCS) $(INCL)\ncondvar.obj:\tcondvar.c $(CONDVAR_SRCS) $(INCL)\nexit.obj:\texit.c $(EXIT_SRCS) $(INCL)\nmisc.obj:\tmisc.c $(MISC_SRCS) $(INCL)\nmutex.obj:\tmutex.c $(MUTEX_SRCS) $(INCL)\nnonportable.obj:\tnonportable.c $(NONPORTABLE_SRCS) $(INCL)\nprivate.obj:\tprivate.c $(PRIVATE_SRCS) $(INCL)\nrwlock.obj:\trwlock.c $(RWLOCK_SRCS) $(INCL)\nsched.obj:\tsched.c $(SCHED_SRCS) $(INCL)\nsemaphore.obj:\tsemaphore.c $(SEMAPHORE_SRCS) $(INCL)\nspin.obj:\tspin.c $(SPIN_SRCS) $(INCL)\nsync.obj:\tsync.c $(SYNC_SRCS) $(INCL)\ntsd.obj:\ttsd.c $(TSD_SRCS) $(INCL)\nversion.res:\tversion.rc $(INCL)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/Makefile_copy",
    "content": "# This makefile is compatible with MS nmake and can be used as a\n# replacement for buildlib.bat. I've changed the target from an ordinary dll\n# (/LD) to a debugging dll (/LDd).\n# \n# The variables $DLLDEST and $LIBDEST hold the destination directories for the\n# dll and the lib, respectively. Probably all that needs to change is $DEVROOT.\n\n\n# DLL_VER:\n# See pthread.h and README - This number is computed as 'current - age'\nDLL_VER\t= 2\nDLL_VERD= $(DLL_VER)d\n\nDEVROOT\t= C:\\pthreads\n\nDLLDEST\t= $(DEVROOT)\\DLL\nLIBDEST\t= $(DEVROOT)\\LIB\nHDRDEST\t= $(DEVROOT)\\INCLUDE\n\nDLLS\t= pthreadVCE$(DLL_VER).dll pthreadVSE$(DLL_VER).dll pthreadVC$(DLL_VER).dll \\\n\t\t  pthreadVCE$(DLL_VERD).dll pthreadVSE$(DLL_VERD).dll pthreadVC$(DLL_VERD).dll\nINLINED_STAMPS\t= pthreadVCE$(DLL_VER).stamp pthreadVSE$(DLL_VER).stamp pthreadVC$(DLL_VER).stamp \\\n\t\t\t\t  pthreadVCE$(DLL_VERD).stamp pthreadVSE$(DLL_VERD).stamp pthreadVC$(DLL_VERD).stamp\nSTATIC_STAMPS\t= pthreadVCE$(DLL_VER).static pthreadVSE$(DLL_VER).static pthreadVC$(DLL_VER).static \\\n\t\t\t\t  pthreadVCE$(DLL_VERD).static pthreadVSE$(DLL_VERD).static pthreadVC$(DLL_VERD).static\n\nOPTIM\t= /O2 /Ob2\nOPTIMD\t=\n\nCFLAGS\t= /W3 /MD /nologo /Yd /I. /D_WIN32_WINNT=0x400 /DHAVE_CONFIG_H\nCFLAGSD\t= /Zi $(CFLAGS)\n\n\n# Default cleanup style\nCLEANUP\t= __CLEANUP_C\n\n# C++ Exceptions\nVCEFLAGS\t= /GX /TP $(CFLAGS)\nVCEFLAGSD\t= /GX /TP $(CFLAGSD)\n#Structured Exceptions\nVSEFLAGS\t= $(CFLAGS)\nVSEFLAGSD\t= $(CFLAGSD)\n#C cleanup code\nVCFLAGS\t= $(CFLAGS)\nVCFLAGSD= $(CFLAGSD)\n\nDLL_INLINED_OBJS = \\\n\t\tpthread.obj \\\n\t\tversion.res\n\n# Aggregate modules for inlinability\nDLL_OBJS\t= \\\n\t\tattr.obj \\\n\t\tbarrier.obj \\\n\t\tcancel.obj \\\n\t\tcleanup.obj \\\n\t\tcondvar.obj \\\n\t\tcreate.obj \\\n\t\tdll.obj \\\n\t\terrno.obj \\\n\t\texit.obj \\\n\t\tfork.obj \\\n\t\tglobal.obj \\\n\t\tmisc.obj \\\n\t\tmutex.obj \\\n\t\tnonportable.obj \\\n\t\tprivate.obj \\\n\t\trwlock.obj \\\n\t\tsched.obj \\\n\t\tsemaphore.obj \\\n\t\tsignal.obj \\\n\t\tspin.obj \\\n\t\tsync.obj \\\n\t\ttsd.obj \\\n\t\tversion.res\n\n# Separate modules for minimising the size of statically linked images\nSMALL_STATIC_OBJS\t= \\\n\t\tpthread_attr_init.obj \\\n\t\tpthread_attr_destroy.obj \\\n\t\tpthread_attr_getdetachstate.obj \\\n\t\tpthread_attr_setdetachstate.obj \\\n\t\tpthread_attr_getstackaddr.obj \\\n\t\tpthread_attr_setstackaddr.obj \\\n\t\tpthread_attr_getstacksize.obj \\\n\t\tpthread_attr_setstacksize.obj \\\n\t\tpthread_attr_getscope.obj \\\n\t\tpthread_attr_setscope.obj \\\n\t\tpthread_attr_setschedpolicy.obj \\\n\t\tpthread_attr_getschedpolicy.obj \\\n\t\tpthread_attr_setschedparam.obj \\\n\t\tpthread_attr_getschedparam.obj \\\n\t\tpthread_attr_setinheritsched.obj \\\n\t\tpthread_attr_getinheritsched.obj \\\n\t\tpthread_barrier_init.obj \\\n\t\tpthread_barrier_destroy.obj \\\n\t\tpthread_barrier_wait.obj \\\n\t\tpthread_barrierattr_init.obj \\\n\t\tpthread_barrierattr_destroy.obj \\\n\t\tpthread_barrierattr_setpshared.obj \\\n\t\tpthread_barrierattr_getpshared.obj \\\n\t\tpthread_setcancelstate.obj \\\n\t\tpthread_setcanceltype.obj \\\n\t\tpthread_testcancel.obj \\\n\t\tpthread_cancel.obj \\\n\t\tcleanup.obj \\\n\t\tpthread_condattr_destroy.obj \\\n\t\tpthread_condattr_getpshared.obj \\\n\t\tpthread_condattr_init.obj \\\n\t\tpthread_condattr_setpshared.obj \\\n\t\tpthread_cond_destroy.obj \\\n\t\tpthread_cond_init.obj \\\n\t\tpthread_cond_signal.obj \\\n\t\tpthread_cond_wait.obj \\\n\t\tcreate.obj \\\n\t\tdll.obj \\\n\t\terrno.obj \\\n\t\tpthread_exit.obj \\\n\t\tfork.obj \\\n\t\tglobal.obj \\\n\t\tpthread_mutex_init.obj \\\n\t\tpthread_mutex_destroy.obj \\\n\t\tpthread_mutexattr_init.obj \\\n\t\tpthread_mutexattr_destroy.obj \\\n\t\tpthread_mutexattr_getpshared.obj \\\n\t\tpthread_mutexattr_setpshared.obj \\\n\t\tpthread_mutexattr_settype.obj \\\n\t\tpthread_mutexattr_gettype.obj \\\n\t\tpthread_mutex_lock.obj \\\n\t\tpthread_mutex_timedlock.obj \\\n\t\tpthread_mutex_unlock.obj \\\n\t\tpthread_mutex_trylock.obj \\\n\t\tpthread_mutexattr_setkind_np.obj \\\n\t\tpthread_mutexattr_getkind_np.obj \\\n\t\tpthread_getw32threadhandle_np.obj \\\n\t\tpthread_delay_np.obj \\\n\t\tpthread_num_processors_np.obj \\\n\t\tpthread_win32_attach_detach_np.obj \\\n\t\tpthread_equal.obj \\\n\t\tpthread_getconcurrency.obj \\\n\t\tpthread_once.obj \\\n\t\tpthread_self.obj \\\n\t\tpthread_setconcurrency.obj \\\n\t\tpthread_rwlock_init.obj \\\n\t\tpthread_rwlock_destroy.obj \\\n\t\tpthread_rwlockattr_init.obj \\\n\t\tpthread_rwlockattr_destroy.obj \\\n\t\tpthread_rwlockattr_getpshared.obj \\\n\t\tpthread_rwlockattr_setpshared.obj \\\n\t\tpthread_rwlock_rdlock.obj \\\n\t\tpthread_rwlock_wrlock.obj \\\n\t\tpthread_rwlock_unlock.obj \\\n\t\tpthread_rwlock_tryrdlock.obj \\\n\t\tpthread_rwlock_trywrlock.obj \\\n\t\tpthread_setschedparam.obj \\\n\t\tpthread_getschedparam.obj \\\n\t\tpthread_timechange_handler_np.obj \\\n\t\tptw32_is_attr.obj \\\n\t\tptw32_processInitialize.obj \\\n\t\tptw32_processTerminate.obj \\\n\t\tptw32_threadStart.obj \\\n\t\tptw32_threadDestroy.obj \\\n\t\tptw32_tkAssocCreate.obj \\\n\t\tptw32_tkAssocDestroy.obj \\\n\t\tptw32_callUserDestroyRoutines.obj \\\n\t\tptw32_timespec.obj \\\n\t\tptw32_throw.obj \\\n\t\tptw32_InterlockedCompareExchange.obj \\\n\t\tptw32_getprocessors.obj \\\n\t\tptw32_calloc.obj \\\n\t\tptw32_new.obj \\\n\t\tptw32_reuse.obj \\\n\t\tptw32_rwlock_check_need_init.obj \\\n\t\tptw32_cond_check_need_init.obj \\\n\t\tptw32_mutex_check_need_init.obj \\\n\t\tptw32_semwait.obj \\\n\t\tptw32_relmillisecs.obj \\\n\t\tptw32_MCS_lock.obj \\\n\t\tsched_get_priority_max.obj \\\n\t\tsched_get_priority_min.obj \\\n\t\tsched_setscheduler.obj \\\n\t\tsched_getscheduler.obj \\\n\t\tsched_yield.obj \\\n\t\tsem_init.obj \\\n\t\tsem_destroy.obj \\\n\t\tsem_trywait.obj \\\n\t\tsem_timedwait.obj \\\n\t\tsem_wait.obj \\\n\t\tsem_post.obj \\\n\t\tsem_post_multiple.obj \\\n\t\tsem_getvalue.obj \\\n\t\tsem_open.obj \\\n\t\tsem_close.obj \\\n\t\tsem_unlink.obj \\\n\t\tsignal.obj \\\n\t\tpthread_kill.obj \\\n\t\tptw32_spinlock_check_need_init.obj \\\n\t\tpthread_spin_init.obj \\\n\t\tpthread_spin_destroy.obj \\\n\t\tpthread_spin_lock.obj \\\n\t\tpthread_spin_unlock.obj \\\n\t\tpthread_spin_trylock.obj \\\n\t\tpthread_detach.obj \\\n\t\tpthread_join.obj \\\n\t\tpthread_key_create.obj \\\n\t\tpthread_key_delete.obj \\\n\t\tpthread_setspecific.obj \\\n\t\tpthread_getspecific.obj \\\n\t\tw32_CancelableWait.obj \\\n\t\tversion.res\n\nINCL\t= config.h implement.h semaphore.h pthread.h need_errno.h\n\nATTR_SRCS\t= \\\n\t\tpthread_attr_init.c \\\n\t\tpthread_attr_destroy.c \\\n\t\tpthread_attr_getdetachstate.c \\\n\t\tpthread_attr_setdetachstate.c \\\n\t\tpthread_attr_getstackaddr.c \\\n\t\tpthread_attr_setstackaddr.c \\\n\t\tpthread_attr_getstacksize.c \\\n\t\tpthread_attr_setstacksize.c \\\n\t\tpthread_attr_getscope.c \\\n\t\tpthread_attr_setscope.c\n\nBARRIER_SRCS = \\\n\t\tpthread_barrier_init.c \\\n\t\tpthread_barrier_destroy.c \\\n\t\tpthread_barrier_wait.c \\\n\t\tpthread_barrierattr_init.c \\\n\t\tpthread_barrierattr_destroy.c \\\n\t\tpthread_barrierattr_setpshared.c \\\n\t\tpthread_barrierattr_getpshared.c\n\nCANCEL_SRCS\t= \\\n\t\tpthread_setcancelstate.c \\\n\t\tpthread_setcanceltype.c \\\n\t\tpthread_testcancel.c \\\n\t\tpthread_cancel.c \n\nCONDVAR_SRCS\t= \\\n\t\tptw32_cond_check_need_init.c \\\n\t\tpthread_condattr_destroy.c \\\n\t\tpthread_condattr_getpshared.c \\\n\t\tpthread_condattr_init.c \\\n\t\tpthread_condattr_setpshared.c \\\n\t\tpthread_cond_destroy.c \\\n\t\tpthread_cond_init.c \\\n\t\tpthread_cond_signal.c \\\n\t\tpthread_cond_wait.c\n\nEXIT_SRCS\t= \\\n\t\tpthread_exit.c\n\nMISC_SRCS\t= \\\n\t\tpthread_equal.c \\\n\t\tpthread_getconcurrency.c \\\n\t\tpthread_kill.c \\\n\t\tpthread_once.c \\\n\t\tpthread_self.c \\\n\t\tpthread_setconcurrency.c \\\n\t\tptw32_calloc.c \\\n\t\tptw32_MCS_lock.c \\\n\t\tptw32_new.c \\\n\t\tptw32_reuse.c \\\n\t\tptw32_relmillisecs.c \\\n\t\tw32_CancelableWait.c\n\nMUTEX_SRCS\t= \\\n\t\tptw32_mutex_check_need_init.c \\\n\t\tpthread_mutex_init.c \\\n\t\tpthread_mutex_destroy.c \\\n\t\tpthread_mutexattr_init.c \\\n\t\tpthread_mutexattr_destroy.c \\\n\t\tpthread_mutexattr_getpshared.c \\\n\t\tpthread_mutexattr_setpshared.c \\\n\t\tpthread_mutexattr_settype.c \\\n\t\tpthread_mutexattr_gettype.c \\\n\t\tpthread_mutex_lock.c \\\n\t\tpthread_mutex_timedlock.c \\\n\t\tpthread_mutex_unlock.c \\\n\t\tpthread_mutex_trylock.c\n\nNONPORTABLE_SRCS = \\\n\t\tpthread_mutexattr_setkind_np.c \\\n\t\tpthread_mutexattr_getkind_np.c \\\n\t\tpthread_getw32threadhandle_np.c \\\n\t\tpthread_delay_np.c \\\n\t\tpthread_num_processors_np.c \\\n\t\tpthread_win32_attach_detach_np.c \\\n\t\tpthread_timechange_handler_np.c \n\nPRIVATE_SRCS\t= \\\n\t\tptw32_is_attr.c \\\n\t\tptw32_processInitialize.c \\\n\t\tptw32_processTerminate.c \\\n\t\tptw32_threadStart.c \\\n\t\tptw32_threadDestroy.c \\\n\t\tptw32_tkAssocCreate.c \\\n\t\tptw32_tkAssocDestroy.c \\\n\t\tptw32_callUserDestroyRoutines.c \\\n\t\tptw32_semwait.c \\\n\t\tptw32_timespec.c \\\n\t\tptw32_throw.c \\\n\t\tptw32_InterlockedCompareExchange.c \\\n\t\tptw32_getprocessors.c\n\nRWLOCK_SRCS\t= \\\n\t\tptw32_rwlock_check_need_init.c \\\n\t\tptw32_rwlock_cancelwrwait.c \\\n\t\tpthread_rwlock_init.c \\\n\t\tpthread_rwlock_destroy.c \\\n\t\tpthread_rwlockattr_init.c \\\n\t\tpthread_rwlockattr_destroy.c \\\n\t\tpthread_rwlockattr_getpshared.c \\\n\t\tpthread_rwlockattr_setpshared.c \\\n\t\tpthread_rwlock_rdlock.c \\\n\t\tpthread_rwlock_timedrdlock.c \\\n\t\tpthread_rwlock_wrlock.c \\\n\t\tpthread_rwlock_timedwrlock.c \\\n\t\tpthread_rwlock_unlock.c \\\n\t\tpthread_rwlock_tryrdlock.c \\\n\t\tpthread_rwlock_trywrlock.c\n\nSCHED_SRCS\t= \\\n\t\tpthread_attr_setschedpolicy.c \\\n\t\tpthread_attr_getschedpolicy.c \\\n\t\tpthread_attr_setschedparam.c \\\n\t\tpthread_attr_getschedparam.c \\\n\t\tpthread_attr_setinheritsched.c \\\n\t\tpthread_attr_getinheritsched.c \\\n\t\tpthread_setschedparam.c \\\n\t\tpthread_getschedparam.c \\\n\t\tsched_get_priority_max.c \\\n\t\tsched_get_priority_min.c \\\n\t\tsched_setscheduler.c \\\n\t\tsched_getscheduler.c \\\n\t\tsched_yield.c\n\nSEMAPHORE_SRCS = \\\n\t\tsem_init.c \\\n\t\tsem_destroy.c \\\n\t\tsem_trywait.c \\\n\t\tsem_timedwait.c \\\n\t\tsem_wait.c \\\n\t\tsem_post.c \\\n\t\tsem_post_multiple.c \\\n\t\tsem_getvalue.c \\\n\t\tsem_open.c \\\n\t\tsem_close.c \\\n\t\tsem_unlink.c\n\nSPIN_SRCS\t= \\\n\t\tptw32_spinlock_check_need_init.c \\\n\t\tpthread_spin_init.c \\\n\t\tpthread_spin_destroy.c \\\n\t\tpthread_spin_lock.c \\\n\t\tpthread_spin_unlock.c \\\n\t\tpthread_spin_trylock.c\n\nSYNC_SRCS\t= \\\n\t\tpthread_detach.c \\\n\t\tpthread_join.c\n\nTSD_SRCS\t= \\\n\t\tpthread_key_create.c \\\n\t\tpthread_key_delete.c \\\n\t\tpthread_setspecific.c \\\n\t\tpthread_getspecific.c\n\n\nhelp:\n\t@ echo Run one of the following command lines:\n\t@ echo nmake clean VCE   (to build the MSVC dll with C++ exception handling)\n\t@ echo nmake clean VSE   (to build the MSVC dll with structured exception handling)\n\t@ echo nmake clean VC    (to build the MSVC dll with C cleanup code)\n\t@ echo nmake clean VCE-inlined   (to build the MSVC inlined dll with C++ exception handling)\n\t@ echo nmake clean VSE-inlined   (to build the MSVC inlined dll with structured exception handling)\n\t@ echo nmake clean VC-inlined    (to build the MSVC inlined dll with C cleanup code)\n\t@ echo nmake clean VC-static     (to build the MSVC static lib with C cleanup code)\n\t@ echo nmake clean VCE-debug   (to build the debug MSVC dll with C++ exception handling)\n\t@ echo nmake clean VSE-debug   (to build the debug MSVC dll with structured exception handling)\n\t@ echo nmake clean VC-debug    (to build the debug MSVC dll with C cleanup code)\n\t@ echo nmake clean VCE-inlined-debug   (to build the debug MSVC inlined dll with C++ exception handling)\n\t@ echo nmake clean VSE-inlined-debug   (to build the debug MSVC inlined dll with structured exception handling)\n\t@ echo nmake clean VC-inlined-debug    (to build the debug MSVC inlined dll with C cleanup code)\n\t@ echo nmake clean VC-static-debug     (to build the debug MSVC static lib with C cleanup code)\n\nall:\n\t@ nmake clean VCE-inlined\n\t@ nmake clean VSE-inlined\n\t@ nmake clean VC-inlined\n\t@ nmake clean VCE-inlined-debug\n\t@ nmake clean VSE-inlined-debug\n\t@ nmake clean VC-inlined-debug\n\nVCE:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCEFLAGS)\" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).dll\n\nVCE-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VCEFLAGSD)\" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).dll\n\nVSE:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VSEFLAGS)\" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).dll\n\nVSE-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VSEFLAGSD)\" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).dll\n\nVC:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCFLAGS)\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).dll\n\nVC-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VCFLAGSD)\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).dll\n\n#\n# The so-called inlined DLL is just a single translation unit with\n# inlining optimisation turned on.\n#\nVCE-inlined:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCEFLAGS) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).stamp\n\nVCE-inlined-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VCEFLAGSD) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).stamp\n\nVSE-inlined:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VSEFLAGS) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).stamp\n\nVSE-inlined-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VSEFLAGSD) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).stamp\n\nVC-inlined:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCFLAGS) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).stamp\n\nVC-inlined-debug:\n\tnmake /nologo EHFLAGS=\"$(OPTIMD) $(VCFLAGSD) /DPTW32_BUILD_INLINED\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).stamp\n\nVC-static:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIM) $(VCFLAGS) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).static\n\nVC-static-debug:\n\t@ nmake /nologo EHFLAGS=\"$(OPTIMD) $(VCFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB\" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).static\n\nrealclean: clean\n\tif exist pthread*.dll del pthread*.dll\n\tif exist pthread*.lib del pthread*.lib\n\tif exist *.stamp del *.stamp\n\nclean:\n\tif exist *.obj del *.obj\n\tif exist *.ilk del *.ilk\n\tif exist *.pdb del *.pdb\n\tif exist *.exp del *.exp\n\tif exist *.map del *.map\n\tif exist *.o del *.o\n\tif exist *.i del *.i\n\tif exist *.res del *.res\n\n\ninstall: $(DLLS)\n\tcopy pthread*.dll $(DLLDEST)\n\tcopy pthread*.lib $(LIBDEST)\n\tcopy pthread.h $(HDRDEST)\n\tcopy sched.h $(HDRDEST)\n\tcopy semaphore.h $(HDRDEST)\n\n$(DLLS): $(DLL_OBJS)\n\tcl /LDd /Zi /nologo $(DLL_OBJS) \\\n\t\t/link /nodefaultlib:libcmt /implib:$*.lib \\\n\t\tmsvcrt.lib wsock32.lib /out:$@\n\n$(INLINED_STAMPS): $(DLL_INLINED_OBJS)\n\tcl /LDd /Zi /nologo $(DLL_INLINED_OBJS) \\\n\t\t/link /nodefaultlib:libcmt /implib:$*.lib \\\n\t\tmsvcrt.lib wsock32.lib /out:$*.dll\n\n$(STATIC_STAMPS): $(DLL_INLINED_OBJS)\n\tif exist $*.lib del $*.lib\n\tlib $(DLL_INLINED_OBJS) /out:$*.lib\n\n.c.obj:\n\tcl $(EHFLAGS) /D$(CLEANUP) -c $<\n\n.rc.res:\n\trc /dPTW32_RC_MSC /d$(CLEANUP) $<\n\n.c.i:\n\tcl /P /O2 /Ob1 $(VCFLAGS) $<\n\nattr.obj:\tattr.c $(ATTR_SRCS) $(INCL)\nbarrier.obj:\tbarrier.c $(BARRIER_SRCS) $(INCL)\ncancel.obj:\tcancel.c $(CANCEL_SRCS) $(INCL)\ncondvar.obj:\tcondvar.c $(CONDVAR_SRCS) $(INCL)\nexit.obj:\texit.c $(EXIT_SRCS) $(INCL)\nmisc.obj:\tmisc.c $(MISC_SRCS) $(INCL)\nmutex.obj:\tmutex.c $(MUTEX_SRCS) $(INCL)\nnonportable.obj:\tnonportable.c $(NONPORTABLE_SRCS) $(INCL)\nprivate.obj:\tprivate.c $(PRIVATE_SRCS) $(INCL)\nrwlock.obj:\trwlock.c $(RWLOCK_SRCS) $(INCL)\nsched.obj:\tsched.c $(SCHED_SRCS) $(INCL)\nsemaphore.obj:\tsemaphore.c $(SEMAPHORE_SRCS) $(INCL)\nspin.obj:\tspin.c $(SPIN_SRCS) $(INCL)\nsync.obj:\tsync.c $(SYNC_SRCS) $(INCL)\ntsd.obj:\ttsd.c $(TSD_SRCS) $(INCL)\nversion.res:\tversion.rc $(INCL)\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/NEWS",
    "content": "RELEASE 2.8.0\n-------------\n(2006-12-22)\n\nGeneral\n-------\nNew bug fixes in this release since 2.7.0 have not been applied to the\nversion 1.x.x series. It is probably time to drop version 1.\n\nTesting and verification\n------------------------\nThis release has not yet been tested on SMP architechtures. All tests pass\non a uni-processor system.\n\nBug fixes\n---------\nSem_destroy could return EBUSY even though no threads were waiting on the \nsemaphore. Other races around invalidating semaphore structs (internally)\nhave been removed as well.\n\nNew tests\n---------\nsemaphore5.c - tests the bug fix referred to above.\n\n\nRELEASE 2.7.0\n-------------\n(2005-06-04)\n\nGeneral\n-------\nAll new features in this release have been back-ported in release 1.11.0,\nincluding the incorporation of MCS locks in pthread_once, however, versions\n1 and 2 remain incompatible even though they are now identical in\nperformance and functionality.\n\nTesting and verification\n------------------------\nThis release has been tested (passed the test suite) on both uni-processor\nand multi-processor systems.\n- Tim Theisen\n\nBug fixes\n---------\nPthread_once has been re-implemented to remove priority boosting and other\ncomplexity to improve robustness. Races for Win32 handles that are not\nrecycle-unique have been removed. The general form of pthread_once is now\nthe same as that suggested earlier by Alexander Terekhov, but instead of the\n'named mutex', a queue-based lock has been implemented which has the required\nproperties of dynamic self initialisation and destruction. This lock is also\nefficient. The ABI is unaffected in as much as the size of pthread_once_t has\nnot changed and PTHREAD_ONCE_INIT has not changed, however, applications that\npeek inside pthread_once_t, which is supposed to be opaque, will break.\n- Vladimir Kliatchko\n\nNew features\n------------\n* Support for Mingw cross development tools added to GNUmakefile.\nMingw cross tools allow building the libraries on Linux.\n- Mikael Magnusson\n\n\nRELEASE 2.6.0\n-------------\n(2005-05-19)\n\nGeneral\n-------\nAll of the bug fixes and new features in this release have been\nback-ported in release 1.10.0.\n\nTesting and verification\n------------------------\nThis release has been tested (passed the test suite) on both uni-processor\nand multi-processor systems. Thanks to Tim Theisen at TomoTherapy for\nexhaustively running the MP tests and for providing crutial observations\nand data when faults are detected.\n\nBugs fixed\n----------\n\n* pthread_detach() now reclaims remaining thread resources if called after\nthe target thread has terminated. Previously, this routine did nothing in\nthis case.\n\nNew tests\n---------\n\n* detach1.c - tests that pthread_detach properly invalidates the target\nthread, which indicates that the thread resources have been reclaimed.\n\n\nRELEASE 2.5.0\n-------------\n(2005-05-09)\n\nGeneral\n-------\n\nThe package now includes a reference documentation set consisting of\nHTML formatted Unix-style manual pages that have been edited for\nconsistency with Pthreads-w32. The set can also be read online at:\nhttp://sources.redhat.com/pthreads-win32/manual/index.html\n\nThanks again to Tim Theisen for running the test suite pre-release\non an MP system.\n\nAll of the bug fixes and new features in this release have been\nback-ported in release 1.9.0.\n\nBugs fixed\n----------\n\n* Thread Specific Data (TSD) key management has been ammended to\neliminate a source of (what was effectively) resource leakage (a HANDLE\nplus memory for each key destruct routine/thread association). This was\nnot a true leak because these resources were eventually reclaimed when\npthread_key_delete was run AND each thread referencing the key had exited.\nThe problem was that these two conditions are often not met until very\nlate, and often not until the process is about to exit.\n\nThe ammended implementation avoids the need for the problematic HANDLE\nand reclaims the memory as soon as either the key is deleted OR the\nthread exits, whichever is first.\n\nThanks to Richard Hughes at Aculab for identifying and locating the leak.\n\n* TSD key destructors are now processed up to PTHREAD_DESTRUCTOR_ITERATIONS\ntimes instead of just once. PTHREAD_DESTRUCTOR_ITERATIONS has been\ndefined in pthread.h for some time but not used.\n\n* Fix a semaphore accounting race between sem_post/sem_post_multiple\nand sem_wait cancellation. This is the same issue as with\nsem_timedwait that was fixed in the last release.\n\n* sem_init, sem_post, and sem_post_multiple now check that the\nsemaphore count never exceeds _POSIX_SEM_VALUE_MAX.\n\n* Although sigwait() is nothing more than a no-op, it should at least\nbe a cancellation point to be consistent with the standard.\n\nNew tests\n---------\n\n* stress1.c - attempts to expose problems in condition variable\nand semaphore timed wait logic. This test was inspired by Stephan\nMueller's sample test code used to identify the sem_timedwait bug\nfrom the last release. It's not a part of the regular test suite\nbecause it can take awhile to run. To run it:\nnmake clean VC-stress\n\n* tsd2.c - tests that key destructors are re-run if the tsd key value is\nnot NULL after the destructor routine has run. Also tests that\npthread_setspecific() and pthread_getspecific() are callable from\ndestructors.\n\n\nRELEASE 2.4.0\n-------------\n(2005-04-26)\n\nGeneral\n-------\n\nThere is now no plan to release a version 3.0.0 to fix problems in\npthread_once(). Other possible implementations of pthread_once\nwill still be investigated for a possible future release in an attempt\nto reduce the current implementation's complexity.\n\nAll of the bug fixes and new features in this release have been\nback-ported for release 1.8.0.\n\nBugs fixed\n----------\n\n* Fixed pthread_once race (failures on an MP system). Thanks to\nTim Theisen for running exhaustive pre-release testing on his MP system\nusing a range of compilers:\n  VC++ 6\n  VC++ 7.1\n  Intel C++ version 8.0\nAll tests passed.\nSome minor speed improvements were also done.\n\n* Fix integer overrun error in pthread_mutex_timedlock() - missed when\nsem_timedwait() was fixed in release 2.2.0. This routine no longer returns\nENOTSUP when NEED_SEM is defined - it is supported (NEED_SEM is only\nrequired for WinCE versions prior to 3.0).\n\n* Fix timeout bug in sem_timedwait().\n- Thanks to Stephan Mueller for reporting, providing diagnostic output\nand test code.\n\n* Fix several problems in the NEED_SEM conditionally included code.\nNEED_SEM included code is provided for systems that don't implement W32\nsemaphores, such as WinCE prior to version 3.0. An alternate implementation\nof POSIX semaphores is built using W32 events for these systems when\nNEED_SEM is defined. This code has been completely rewritten in this\nrelease to reuse most of the default POSIX semaphore code, and particularly,\nto implement all of the sem_* routines supported by pthreads-win32. Tim\nTheisen also run the test suite over the NEED_SEM code on his MP system. All\ntests passed.\n\n* The library now builds without errors for the Borland Builder 5.5 compiler.\n\nNew features\n------------\n\n* pthread_mutex_timedlock() and all sem_* routines provided by\npthreads-win32 are now implemented for WinCE versions prior to 3.0. Those\nversions did not implement W32 semaphores. Define NEED_SEM in config.h when\nbuilding the library for these systems.\n\nKnown issues in this release\n----------------------------\n\n* pthread_once is too complicated - but it works as far as testing can\ndetermine..\n\n* The Borland version of the dll fails some of the tests with a memory read\nexception. The cause is not yet known but a compiler bug has not been ruled\nout.\n\n\nRELEASE 2.3.0\n-------------\n(2005-04-12)\n\nGeneral\n-------\n\nRelease 1.7.0 is a backport of features and bug fixes new in\nthis release. See earlier notes under Release 2.0.0/General.\n\nBugs fixed\n----------\n\n* Fixed pthread_once potential for post once_routine cancellation\nhanging due to starvation. See comments in pthread_once.c.\nMomentary priority boosting is used to ensure that, after a\nonce_routine is cancelled, the thread that will run the\nonce_routine is not starved by higher priority waiting threads at\ncritical times. Priority boosting occurs only AFTER a once_routine \ncancellation, and is applied only to that once_control. The\nonce_routine is run at the thread's normal base priority.\n\nNew tests\n---------\n\n* once4.c: Aggressively tests pthread_once() under realtime\nconditions using threads with varying priorities. Windows'\nrandom priority boosting does not occur for threads with realtime\npriority levels.\n\n\nRELEASE 2.2.0\n-------------\n(2005-04-04)\n\nGeneral\n-------\n\n* Added makefile targets to build static link versions of the library.\nBoth MinGW and MSVC. Please note that this does not imply any change\nto the LGPL licensing, which still imposes psecific conditions on\ndistributing software that has been statically linked with this library.\n\n* There is a known bug in pthread_once(). Cancellation of the init_routine\nexposes a potential starvation (i.e. deadlock) problem if a waiting thread\nhas a higher priority than the initting thread. This problem will be fixed\nin version 3.0.0 of the library.\n\nBugs fixed\n----------\n\n* Fix integer overrun error in sem_timedwait().\nKevin Lussier\n\n* Fix preprocessor directives for static linking.\nDimitar Panayotov\n\n\nRELEASE 2.1.0\n-------------\n(2005-03-16)\n\nBugs fixed\n----------\n\n* Reverse change to pthread_setcancelstate() in 2.0.0.\n\n\nRELEASE 2.0.0\n-------------\n(2005-03-16)\n\nGeneral\n-------\n\nThis release represents an ABI change and the DLL version naming has\nincremented from 1 to 2, e.g. pthreadVC2.dll.\n\nVersion 1.4.0 back-ports the new functionality included in this\nrelease. Please distribute DLLs built from that version with updates\nto applications built on pthreads-win32 version 1.x.x.\n\nThe package naming has changed, replacing the snapshot date with \nthe version number + descriptive information. E.g. this\nrelease is \"pthreads-w32-2-0-0-release\".\n\nBugs fixed\n----------\n\n* pthread_setcancelstate() no longer checks for a pending\nasync cancel event if the library is using alertable async\ncancel. See the README file (Prerequisites section) for info\non adding alertable async cancelation.\n\nNew features\n------------\n\n* pthread_once() now supports init_routine cancellability.\n\nNew tests\n---------\n\n* Agressively test pthread_once() init_routine cancellability.\n\n\nSNAPSHOT 2005-03-08\n-------------------\nVersion 1.3.0\n\nBug reports (fixed)\n-------------------\n\n* Implicitly created threads leave Win32 handles behind after exiting.\n- Dmitrii Semii\n\n* pthread_once() starvation problem.\n- Gottlob Frege\n\nNew tests\n---------\n\n* More intense testing of pthread_once().\n\n\nSNAPSHOT 2005-01-25\n-------------------\nVersion 1.2.0\n\nBug fixes\n---------\n\n* Attempted acquisition of a recursive mutex could cause waiting threads\nto not be woken when the mutex was released.\n- Ralf Kubis  <RKubis at mc.com>\n\n* Various package omissions have been fixed.\n\n\nSNAPSHOT 2005-01-03\n-------------------\nVersion 1.1.0\n\nBug fixes\n---------\n\n* Unlocking recursive or errorcheck mutexes would sometimes\nunexpectedly return an EPERM error (bug introduced in\nsnapshot-2004-11-03).\n- Konstantin Voronkov  <beowinkle at yahoo.com>\n\n\nSNAPSHOT 2004-11-22\n-------------------\nVersion 1.0.0\n\nThis snapshot primarily fixes the condvar bug introduced in\nsnapshot-2004-11-03. DLL versioning has also been included to allow\napplications to runtime check the Microsoft compatible DLL version\ninformation, and to extend the DLL naming system for ABI and major\n(non-backward compatible) API changes. See the README file for details.\n\nBug fixes\n---------\n\n* Condition variables no longer deadlock (bug introduced in\nsnapshot-2004-11-03).\n- Alexander Kotliarov and Nicolas at saintmac\n\n* DLL naming extended to avoid 'DLL hell' in the future, and to\naccommodate the ABI change introduced in snapshot-2004-11-03. Snapshot\n2004-11-03 will be removed from FTP sites.\n\nNew features\n------------\n\n* A Microsoft-style version resource has been added to the DLL for\napplications that wish to check DLL compatibility at runtime.\n\n* Pthreads-win32 DLL naming has been extended to allow incompatible DLL\nversions to co-exist in the same filesystem. See the README file for details,\nbut briefly: while the version information inside the DLL will change with\neach release from now on, the DLL version names will only change if the new\nDLL is not backward compatible with older applications.\n\nThe versioning scheme has been borrowed from GNU Libtool, and the DLL\nnaming scheme is from Cygwin. Provided the Libtool-style numbering rules are\nhonoured, the Cygwin DLL naming scheme automatcally ensures that DLL name\nchanges are minimal and that applications will not load an incompatible\npthreads-win32 DLL.\n\nThose who use the pre-built DLLs will find that the DLL/LIB names have a new\nsuffix (1) in this snapshot. E.g. pthreadVC1.dll etc.\n\n* The POSIX thread ID reuse uniqueness feature introduced in the last snapshot\nhas been kept as default, but the behaviour can now be controlled when the DLL\nis built to effectively switch it off. This makes the library much more\nsensitive to applications that assume that POSIX thread IDs are unique, i.e.\nare not strictly compliant with POSIX. See the PTW32_THREAD_ID_REUSE_INCREMENT\nmacro comments in config.h for details.\n\nOther changes\n-------------\nCertain POSIX macros have changed.\n\nThese changes are intended to conform to the Single Unix Specification version 3,\nwhich states that, if set to 0 (zero) or not defined, then applications may use\nsysconf() to determine their values at runtime. Pthreads-win32 does not\nimplement sysconf().\n\nThe following macros are no longer undefined, but defined and set to -1\n(not implemented):\n\n      _POSIX_THREAD_ATTR_STACKADDR\n      _POSIX_THREAD_PRIO_INHERIT\n      _POSIX_THREAD_PRIO_PROTECT\n      _POSIX_THREAD_PROCESS_SHARED\n\nThe following macros are defined and set to 200112L (implemented):\n\n      _POSIX_THREADS\n      _POSIX_THREAD_SAFE_FUNCTIONS\n      _POSIX_THREAD_ATTR_STACKSIZE\n      _POSIX_THREAD_PRIORITY_SCHEDULING\n      _POSIX_SEMAPHORES\n      _POSIX_READER_WRITER_LOCKS\n      _POSIX_SPIN_LOCKS\n      _POSIX_BARRIERS\n\nThe following macros are defined and set to appropriate values:\n\n      _POSIX_THREAD_THREADS_MAX\n      _POSIX_SEM_VALUE_MAX\n      _POSIX_SEM_NSEMS_MAX\n      PTHREAD_DESTRUCTOR_ITERATIONS\n      PTHREAD_KEYS_MAX\n      PTHREAD_STACK_MIN\n      PTHREAD_THREADS_MAX\n\n\nSNAPSHOT 2004-11-03\n-------------------\n\nDLLs produced from this snapshot cannot be used with older applications without\nrecompiling the application, due to a change to pthread_t to provide unique POSIX\nthread IDs.\n\nAlthough this snapshot passes the extended test suite, many of the changes are\nfairly major, and some applications may show different behaviour than previously,\nso adopt with care. Hopefully, any changed behaviour will be due to the library\nbeing better at it's job, not worse.\n\nBug fixes\n---------\n\n* pthread_create() no longer accepts NULL as the thread reference arg.\nA segfault (memory access fault) will result, and no thread will be\ncreated.\n\n* pthread_barrier_wait() no longer acts as a cancelation point.\n\n* Fix potential race condition in pthread_once()\n- Tristan Savatier  <tristan at mpegtv.com>\n\n* Changes to pthread_cond_destroy() exposed some coding weaknesses in several\ntest suite mini-apps because pthread_cond_destroy() now returns EBUSY if the CV\nis still in use.\n\nNew features\n------------\n\n* Added for compatibility:\nPTHREAD_RECURSIVE_MUTEX_INITIALIZER,\nPTHREAD_ERRORCHECK_MUTEX_INITIALIZER,\nPTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,\nPTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP\n\n* Initial support for Digital Mars compiler\n- Anuj Goyal  <anuj.goyal at gmail.com>\n\n* Faster Mutexes. These have been been rewritten following a model provided by\nAlexander Terekhov that reduces kernel space checks, and eliminates some additional\ncritical sections used to manage a race between timedlock expiration and unlock.\nPlease be aware that the new mutexes do not enforce strict absolute FIFO scheduling\nof mutexes, however any out-of-order lock acquisition should be very rare.\n\n* Faster semaphores. Following a similar model to mutexes above, these have been\nrewritten to use preliminary users space checks.\n\n* sem_getvalue() now returns the number of waiters.\n\n* The POSIX thread ID now has much stronger uniqueness characteristics. The library\ngarrantees not to reuse the same thread ID for at least 2^(wordsize) thread\ndestruction/creation cycles.\n\nNew tests\n---------\n\n* semaphore4.c: Tests cancelation of the new sem_wait().\n\n* semaphore4t.c: Likewise for sem_timedwait().\n\n* rwlock8.c: Tests and times the slow execution paths of r/w locks, and the CVs,\nmutexes, and semaphores that they're built on.\n\n\nSNAPSHOT 2004-05-16\n-------------------\n\nAttempt to add Watcom to the list of compilers that can build the library.\nThis failed in the end due to it's non-thread-aware errno. The library\nbuilds but the test suite fails. See README.Watcom for more details.\n\nBug fixes\n---------\n* Bug and memory leak in sem_init()\n- Alex Blanco  <Alex.Blanco at motorola.com>\n\n* ptw32_getprocessors() now returns CPU count of 1 for WinCE.\n- James Ewing  <james.ewing at sveasoft.com>\n\n* pthread_cond_wait() could be canceled at a point where it should not\nbe cancelable. Fixed.\n- Alexander Terekhov  <TEREKHOV at de.ibm.com>\n\n* sem_timedwait() had an incorrect timeout calculation.\n- Philippe Di Cristo  <philipped at voicebox.com>\n\n* Fix a memory leak left behind after threads are destroyed.\n- P. van Bruggen  <pietvb at newbridges.nl>\n\nNew features\n------------\n* Ported to AMD64.\n- Makoto Kato  <raven at oldskool.jp>\n\n* True pre-emptive asynchronous cancelation of threads. This is optional\nand requires that Panagiotis E. Hadjidoukas's QueueUserAPCEx package be\ninstalled. This package is included in the pthreads-win32 self-unpacking\nZip archive starting from this snapshot. See the README.txt file inside\nthe package for installation details.\n\nNote: If you don't use async cancelation in your application, or don't need\nto cancel threads that are blocked on system resources such as network I/O,\nthen the default non-preemptive async cancelation is probably good enough.\nHowever, pthreads-win32 auto-detects the availability of these components\nat run-time, so you don't need to rebuild the library from source if you\nchange your mind later.\n\nAll of the advice available in books and elsewhere on the undesirability\nof using async cancelation in any application still stands, but this\nfeature is a welcome addition with respect to the library's conformance to\nthe POSIX standard.\n\nSNAPSHOT 2003-09-18\n-------------------\n\nCleanup of thread priority management. In particular, setting of thread\npriority now attempts to map invalid Win32 values within the range returned\nby sched_get_priority_min/max() to useful values. See README.NONPORTABLE\nunder \"Thread priority\".\n\nBug fixes\n---------\n* pthread_getschedparam() now returns the priority given by the most recent\ncall to pthread_setschedparam() or established by pthread_create(), as\nrequired by the standard. Previously, pthread_getschedparam() incorrectly\nreturned the running thread priority at the time of the call, which may have\nbeen adjusted or temporarily promoted/demoted.\n\n* sched_get_priority_min() and sched_get_priority_max() now return -1 on error\nand set errno. Previously, they incorrectly returned the error value directly.\n\n\nSNAPSHOT 2003-09-04\n-------------------\n\nBug fixes\n---------\n* ptw32_cancelableWait() now allows cancelation of waiting implicit POSIX\nthreads.\n\nNew test\n--------\n* cancel8.c tests cancelation of Win32 threads waiting at a POSIX cancelation\npoint.\n\n\nSNAPSHOT 2003-09-03\n-------------------\n\nBug fixes\n---------\n* pthread_self() would free the newly created implicit POSIX thread handle if\nDuplicateHandle failed instead of recycle it (very unlikely).\n\n* pthread_exit() was neither freeing nor recycling the POSIX thread struct\nfor implicit POSIX threads.\n\nNew feature - Cancelation of/by Win32 (non-POSIX) threads\n---------------------------------------------------------\nSince John Bossom's original implementation, the library has allowed non-POSIX\ninitialised threads (Win32 threads) to call pthreads-win32 routines and\ntherefore interact with POSIX threads. This is done by creating an on-the-fly\nPOSIX thread ID for the Win32 thread that, once created, allows fully\nreciprical interaction. This did not extend to thread cancelation (async or\ndeferred). Now it does.\n\nAny thread can be canceled by any other thread (Win32 or POSIX) if the former\nthread's POSIX pthread_t value is known. It's TSD destructors and POSIX\ncleanup handlers will be run before the thread exits with an exit code of\nPTHREAD_CANCELED (retrieved with GetExitCodeThread()).\n\nThis allows a Win32 thread to, for example, call POSIX CV routines in the same way\nthat POSIX threads would/should, with pthread_cond_wait() cancelability and\ncleanup handlers (pthread_cond_wait() is a POSIX cancelation point).\n\nBy adding cancelation, Win32 threads should now be able to call all POSIX\nthreads routines that make sense including semaphores, mutexes, condition\nvariables, read/write locks, barriers, spinlocks, tsd, cleanup push/pop,\ncancelation, pthread_exit, scheduling, etc.\n\nNote that these on-the-fly 'implicit' POSIX thread IDs are initialised as detached\n(not joinable) with deferred cancelation type. The POSIX thread ID will be created\nautomatically by any POSIX routines that need a POSIX handle (unless the routine\nneeds a pthread_t as a parameter of course). A Win32 thread can discover it's own\nPOSIX thread ID by calling pthread_self(), which will create the handle if\nnecessary and return the pthread_t value.\n\nNew tests\n---------\nTest the above new feature.\n\n\nSNAPSHOT 2003-08-19\n-------------------\n\nThis snapshot fixes some accidental corruption to new test case sources.\nThere are no changes to the library source code.\n\n\nSNAPSHOT 2003-08-15\n-------------------\n\nBug fixes\n---------\n\n* pthread.dsp now uses correct compile flags (/MD).\n- Viv  <vcotirlea@hotmail.com>\n\n* pthread_win32_process_detach_np() fixed memory leak.\n- Steven Reddie  <Steven.Reddie@ca.com>\n\n* pthread_mutex_destroy() fixed incorrect return code.\n- Nicolas Barry  <boozai@yahoo.com>\n\n* pthread_spin_destroy() fixed memory leak.\n- Piet van Bruggen  <pietvb@newbridges.nl>\n\n* Various changes to tighten arg checking, and to work with later versions of\nMinGW32 and MsysDTK.\n\n* pthread_getschedparam() etc, fixed dangerous thread validity checking.\n- Nicolas Barry  <boozai@yahoo.com>\n\n* POSIX thread handles are now reused and their memory is not freed on thread exit.\nThis allows for stronger thread validity checking.\n\nNew standard routine\n--------------------\n\n* pthread_kill() added to provide thread validity checking to applications.\nIt does not accept any non zero values for the signal arg.\n\nNew test cases\n--------------\n\n* New test cases to confirm validity checking, pthread_kill(), and thread reuse.\n\n\nSNAPSHOT 2003-05-10\n-------------------\n\nBug fixes\n---------\n\n* pthread_mutex_trylock() now returns correct error values.\npthread_mutex_destroy() will no longer destroy a recursively locked mutex.\npthread_mutex_lock() is no longer inadvertantly behaving as a cancelation point.\n- Thomas Pfaff  <tpfaff@gmx.net>\n\n* pthread_mutex_timedlock() no longer occasionally sets incorrect mutex\nownership, causing deadlocks in some applications.\n- Robert Strycek <strycek@posam.sk> and Alexander Terekhov  <TEREKHOV@de.ibm.com>\n\n\nSNAPSHOT 2002-11-04\n-------------------\n\nBug fixes\n---------\n\n* sem_getvalue() now returns the correct value under Win NT and WinCE.\n- Rob Fanner  <rfanner@stonethree.com>\n\n* sem_timedwait() now uses tighter checks for unreasonable\nabstime values - that would result in unexpected timeout values.\n\n* ptw32_cond_wait_cleanup() no longer mysteriously consumes\nCV signals but may produce more spurious wakeups. It is believed\nthat the sem_timedwait() call is consuming a CV signal that it\nshouldn't.\n- Alexander Terekhov  <TEREKHOV@de.ibm.com>\n\n* Fixed a memory leak in ptw32_threadDestroy() for implicit threads.\n\n* Fixed potential for deadlock in pthread_cond_destroy().\nA deadlock could occur for statically declared CVs (PTHREAD_COND_INITIALIZER),\nwhen one thread is attempting to destroy the condition variable while another\nis attempting to dynamically initialize it.\n- Michael Johnson  <michaelj@maine.rr.com>\n\n\nSNAPSHOT 2002-03-02\n-------------------\n\nCleanup code default style. (IMPORTANT)\n----------------------------------------------------------------------\nPreviously, if not defined, the cleanup style was determined automatically\nfrom the compiler/language, and one of the following was defined accordingly:\n\n        __CLEANUP_SEH   MSVC only\n        __CLEANUP_CXX   C++, including MSVC++, GNU G++\n        __CLEANUP_C             C, including GNU GCC, not MSVC\n\nThese defines determine the style of cleanup (see pthread.h) and,\nmost importantly, the way that cancelation and thread exit (via\npthread_exit) is performed (see the routine ptw32_throw() in private.c).\n\nIn short, the exceptions versions of the library throw an exception\nwhen a thread is canceled or exits (via pthread_exit()), which is\ncaught by a handler in the thread startup routine, so that the\nthe correct stack unwinding occurs regardless of where the thread\nis when it's canceled or exits via pthread_exit().\n\nIn this and future snapshots, unless the build explicitly defines (e.g.\nvia a compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then\nthe build NOW always defaults to __CLEANUP_C style cleanup. This style\nuses setjmp/longjmp in the cancelation and pthread_exit implementations,\nand therefore won't do stack unwinding even when linked to applications\nthat have it (e.g. C++ apps). This is for consistency with most\ncurrent commercial Unix POSIX threads implementations. Compaq's TRU64\nmay be an exception (no pun intended) and possible future trend.\n\nAlthough it was not clearly documented before, it is still necessary to\nbuild your application using the same __CLEANUP_* define as was\nused for the version of the library that you link with, so that the\ncorrect parts of pthread.h are included. That is, the possible\ndefines require the following library versions:\n\n        __CLEANUP_SEH   pthreadVSE.dll\n        __CLEANUP_CXX   pthreadVCE.dll or pthreadGCE.dll\n        __CLEANUP_C     pthreadVC.dll or pthreadGC.dll\n\nE.g. regardless of whether your app is C or C++, if you link with\npthreadVC.lib or libpthreadGC.a, then you must define __CLEANUP_C.\n\n\nTHE POINT OF ALL THIS IS: if you have not been defining one of these\nexplicitly, then the defaults as described at the top of this\nsection were being used.\n\nTHIS NOW CHANGES, as has been explained above, but to try to make this\nclearer here's an example:\n\nIf you were building your application with MSVC++ i.e. using C++\nexceptions and not explicitly defining one of __CLEANUP_*, then\n__CLEANUP_C++ was automatically defined for you in pthread.h.\nYou should have been linking with pthreadVCE.dll, which does\nstack unwinding.\n\nIf you now build your application as you had before, pthread.h will now\nautomatically set __CLEANUP_C as the default style, and you will need to\nlink with pthreadVC.dll. Stack unwinding will now NOT occur when a thread\nis canceled, or the thread calls pthread_exit().\n\nYour application will now most likely behave differently to previous\nversions, and in non-obvious ways. Most likely is that locally\ninstantiated objects may not be destroyed or cleaned up after a thread\nis canceled.\n\nIf you want the same behaviour as before, then you must now define\n__CLEANUP_C++ explicitly using a compiler option and link with\npthreadVCE.dll as you did before.\n\n\nWHY ARE WE MAKING THE DEFAULT STYLE LESS EXCEPTION-FRIENDLY?\nBecause no commercial Unix POSIX threads implementation allows you to\nchoose to have stack unwinding. Therefore, providing it in pthread-win32\nas a default is dangerous. We still provide the choice but unless\nyou consciously choose to do otherwise, your pthreads applications will\nnow run or crash in similar ways irrespective of the threads platform\nyou use. Or at least this is the hope.\n\n\nWHY NOT REMOVE THE EXCEPTIONS VERSIONS OF THE LIBRARY ALTOGETHER?\nThere are a few reasons:\n- because there are well respected POSIX threads people who believe\n  that POSIX threads implementations should be exceptions aware and\n  do the expected thing in that context. (There are equally respected\n  people who believe it should not be easily accessible, if it's there\n  at all, for unconditional conformity to other implementations.)\n- because pthreads-win32 is one of the few implementations that has\n  the choice, perhaps the only freely available one, and so offers\n  a laboratory to people who may want to explore the effects;\n- although the code will always be around somewhere for anyone who\n  wants it, once it's removed from the current version it will not be\n  nearly as visible to people who may have a use for it.\n\n\nSource module splitting\n-----------------------\nIn order to enable smaller image sizes to be generated\nfor applications that link statically with the library,\nmost routines have been separated out into individual\nsource code files.\n\nThis is being done in such a way as to be backward compatible.\nThe old source files are reused to congregate the individual\nroutine files into larger translation units (via a bunch of\n# includes) so that the compiler can still optimise wherever\npossible, e.g. through inlining, which can only be done\nwithin the same translation unit.\n\nIt is also possible to build the entire library by compiling\nthe single file named \"pthread.c\", which just #includes all\nthe secondary congregation source files. The compiler\nmay be able to use this to do more inlining of routines.\n\nAlthough the GNU compiler is able to produce libraries with\nthe necessary separation (the -ffunction-segments switch),\nAFAIK, the MSVC and other compilers don't have this feature.\n\nFinally, since I use makefiles and command-line compilation,\nI don't know what havoc this reorganisation may wreak amongst\nIDE project file users. You should be able to continue\nusing your existing project files without modification.\n\n\nNew non-portable functions\n--------------------------\npthread_num_processors_np():\n  Returns the number of processors in the system that are\n  available to the process, as determined from the processor\n  affinity mask.\n\npthread_timechange_handler_np():\n  To improve tolerance against operator or time service initiated\n  system clock changes.\n\n  This routine can be called by an application when it\n  receives a WM_TIMECHANGE message from the system. At present\n  it broadcasts all condition variables so that waiting threads\n  can wake up and re-evaluate their conditions and restart\n  their timed waits if required.\n  - Suggested by Alexander Terekhov\n\n\nPlatform dependence\n-------------------\nAs Win95 doesn't provide one, the library now contains\nit's own InterlockedCompareExchange() routine, which is used\nwhenever Windows doesn't provide it. InterlockedCompareExchange()\nis used to implement spinlocks and barriers, and also in mutexes.\nThis routine relies on the CMPXCHG machine instruction which\nis not available on i386 CPUs. This library (from snapshot\n20010712 onwards) is therefore no longer supported on i386\nprocessor platforms.\n\n\nNew standard routines\n---------------------\nFor source code portability only - rwlocks cannot be process shared yet.\n\n        pthread_rwlockattr_init()\n        pthread_rwlockattr_destroy()\n        pthread_rwlockattr_setpshared()\n        pthread_rwlockattr_getpshared()\n\nAs defined in the new POSIX standard, and the Single Unix Spec version 3:\n\n        sem_timedwait()\n        pthread_mutex_timedlock()    - Alexander Terekhov and Thomas Pfaff\n        pthread_rwlock_timedrdlock() - adapted from pthread_rwlock_rdlock()\n        pthread_rwlock_timedwrlock() - adapted from pthread_rwlock_wrlock()\n\n\npthread.h no longer includes windows.h\n--------------------------------------\n[Not yet for G++]\n\nThis was done to prevent conflicts.\n\nHANDLE, DWORD, and NULL are temporarily defined within pthread.h if\nthey are not already.\n\n\npthread.h, sched.h and semaphore.h now use dllexport/dllimport\n--------------------------------------------------------------\nNot only to avoid the need for the pthread.def file, but to\nimprove performance. Apparently, declaring functions with dllimport\ngenerates a direct call to the function and avoids the overhead\nof a stub function call.\n\nBug fixes\n---------\n* Fixed potential NULL pointer dereferences in pthread_mutexattr_init,\npthread_mutexattr_getpshared, pthread_barrierattr_init,\npthread_barrierattr_getpshared, and pthread_condattr_getpshared.\n- Scott McCaskill <scott@magruder.org>\n\n* Removed potential race condition in pthread_mutex_trylock and\npthread_mutex_lock;\n- Alexander Terekhov <TEREKHOV@de.ibm.com>\n\n* The behaviour of pthread_mutex_trylock in relation to\nrecursive mutexes was inconsistent with commercial implementations.\nTrylock would return EBUSY if the lock was owned already by the\ncalling thread regardless of mutex type. Trylock now increments the\nrecursion count and returns 0 for RECURSIVE mutexes, and will\nreturn EDEADLK rather than EBUSY for ERRORCHECK mutexes. This is\nconsistent with Solaris.\n- Thomas Pfaff <tpfaff@gmx.net>\n\n* Found a fix for the library and workaround for applications for\nthe known bug #2, i.e. where __CLEANUP_CXX or __CLEANUP_SEH is defined.\nSee the \"Known Bugs in this snapshot\" section below.\n\nThis could be made transparent to applications by replacing the macros that\ndefine the current C++ and SEH versions of pthread_cleanup_push/pop\nwith the C version, but AFAIK cleanup handlers would not then run in the\ncorrect sequence with destructors and exception cleanup handlers when\nan exception occurs.\n\n* Cancelation once started in a thread cannot now be inadvertantly\ndouble canceled. That is, once a thread begins it's cancelation run,\ncancelation is disabled and a subsequent cancel request will\nreturn an error (ESRCH).\n\n* errno: An incorrect compiler directive caused a local version\nof errno to be used instead of the Win32 errno. Both instances are\nthread-safe but applications checking errno after a pthreads-win32\ncall would be wrong. Fixing this also fixed a bad compiler\noption in the testsuite (/MT should have been /MD) which is\nneeded to link with the correct library MSVCRT.LIB.\n\n\nSNAPSHOT 2001-07-12\n-------------------\n\nTo be added\n\n\nSNAPSHOT 2001-07-03\n-------------------\n\nTo be added\n\n\nSNAPSHOT 2000-08-13\n-------------------\n\nNew:\n-       Renamed DLL and LIB files:\n                pthreadVSE.dll  (MS VC++/Structured EH)\n                pthreadVSE.lib\n                pthreadVCE.dll  (MS VC++/C++ EH)\n                pthreadVCE.lib\n                pthreadGCE.dll  (GNU G++/C++ EH)\n                libpthreadw32.a\n\n        Both your application and the pthread dll should use the\n        same exception handling scheme.\n\nBugs fixed:\n-       MSVC++ C++ exception handling.\n\nSome new tests have been added.\n\n\nSNAPSHOT 2000-08-10\n-------------------\n\nNew:\n-       asynchronous cancelation on X86 (Jason Nye)\n-       Makefile compatible with MS nmake to replace\n        buildlib.bat\n-       GNUmakefile for Mingw32\n-       tests/Makefile for MS nmake replaces runall.bat\n-       tests/GNUmakefile for Mingw32\n\nBugs fixed:\n-       kernel32 load/free problem\n-       attempt to hide internel exceptions from application\n        exception handlers (__try/__except and try/catch blocks)\n-       Win32 thread handle leakage bug\n        (David Baggett/Paul Redondo/Eyal Lebedinsky)\n\nSome new tests have been added.\n\n\nSNAPSHOT 1999-11-02\n-------------------\n\nBugs fixed:\n-       ctime_r macro had an incorrect argument (Erik Hensema),\n-       threads were not being created \n        PTHREAD_CANCEL_DEFERRED. This should have\n        had little effect as deferred is the only\n        supported type. (Ross Johnson).\n\nSome compatibility improvements added, eg.\n-       pthread_setcancelstate accepts NULL pointer\n        for the previous value argument. Ditto for\n        pthread_setcanceltype. This is compatible\n        with Solaris but should not affect\n        standard applications (Erik Hensema)\n\nSome new tests have been added.\n\n\nSNAPSHOT 1999-10-17\n-------------------\n\nBug fix - Cancelation of threads waiting on condition variables\nnow works properly (Lorin Hochstein and Peter Slacik)\n\n\nSNAPSHOT 1999-08-12\n-------------------\n\nFixed exception stack cleanup if calling pthread_exit()\n- (Lorin Hochstein and John Bossom).\n\nFixed bugs in condition variables - (Peter Slacik):\n        - additional contention checks\n        - properly adjust number of waiting threads after timed\n          condvar timeout.\n\n\nSNAPSHOT 1999-05-30\n-------------------\n\nSome minor bugs have been fixed. See the ChangeLog file for details.\n\nSome more POSIX 1b functions are now included but ony return an\nerror (ENOSYS) if called. They are:\n\n        sem_open\n        sem_close\n        sem_unlink\n        sem_getvalue\n\n\nSNAPSHOT 1999-04-07\n-------------------\n\nSome POSIX 1b functions which were internally supported are now\navailable as exported functions:\n\n        sem_init\n        sem_destroy\n        sem_wait\n        sem_trywait\n        sem_post\n        sched_yield\n        sched_get_priority_min\n        sched_get_priority_max\n\nSome minor bugs have been fixed. See the ChangeLog file for details.\n\n\nSNAPSHOT 1999-03-16\n-------------------\n\nInitial release.\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/Nmakefile",
    "content": "/*\n * nmake file for uwin pthread library\n */\n\nVERSION \t\t= -\nCCFLAGS \t\t= -V -g $(CC.DLL)\nHAVE_CONFIG_H\t== 1\n_MT\t\t\t== 1\n_timeb\t\t== timeb\n_ftime\t\t== ftime\n_errno\t\t== _ast_errno\n\n$(INCLUDEDIR)\t:INSTALLDIR:\tpthread.h sched.h\n\npthread $(VERSION) :LIBRARY: attr.c barrier.c cancel.c cleanup.c condvar.c \\\n\tcreate.c dll.c exit.c fork.c global.c misc.c mutex.c private.c \\\n\trwlock.c sched.c semaphore.c spin.c sync.c tsd.c nonportable.c\n\n:: ANNOUNCE CONTRIBUTORS COPYING.LIB ChangeLog FAQ GNUmakefile MAINTAINERS \\\n\tMakefile Makefile.in Makefile.vc NEWS PROGRESS README README.WinCE \\\n\tTODO WinCE-PORT install-sh errno.c tests tests.mk acconfig.h \\\n\tconfig.guess config.h.in config.sub configure configure.in signal.c \\\n\tREADME.CV README.NONPORTABLE pthread.dsp pthread.dsw\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/Nmakefile.tests",
    "content": "/* for running tests */\nCCFLAGS \t= -g \n_MT\t\t== 1\n_timeb\t== timeb\n_ftime\t== ftime \n\n.SOURCE:\ttests\n/*\n:PACKAGE:\tpthread\n*/\n\nset keepgoing\n\n\":test:\" : .MAKE .OPERATOR\n\tlocal I\n\t$(<:D:B:S=.pass) : .IMPLICIT $(>:D:B:S=.pass)\n\tfor I $(<) $(>)\n\t\t$(I:D:B:S=.pass) : .VIRTUAL .FORCE $(I)\n\t\t\t$(>)\n\tend\nsizes::\t\tsizes.c\nloadfree::\tloadfree.c\nmutex1::\tmutex1.c\nmutex1e::\tmutex1e.c\nmutex1n::\tmutex1n.c\nmutex1r::\tmutex1r.c\nmutex2::\tmutex2.c\nmutex2r::\tmutex2r.c\nmutex2e::\tmutex2e.c\nexit1::\texit1.c\ncondvar1::\tcondvar1.c\ncondvar1_1::\tcondvar1_1.c\ncondvar1_2::\tcondvar1_2.c\nself1::\t\tself1.c\ncondvar2::\tcondvar2.c\ncondvar2_1::\tcondvar2_1.c\ncondvar3_1::\tcondvar3_1.c\ncondvar3_2::\tcondvar3_2.c\ncondvar3_3::\tcondvar3_3.c\ncreate1.::\tcreate1.c\ncreate2.::\tcreate2.c\ncancel1::\tcancel1.c\ncancel2::\tcancel2.c\nmutex3::\tmutex3.c\nmutex3r::\tmutex3r.c\nmutex3e::\tmutex3e.c\nmutex4::\tmutex4.c\nmutex5::\tmutex5.c\nmutex6::\tmutex6.c\nmutex6e::\tmutex6e.c\nmutex6n::\tmutex6n.c\nmutex6r::\tmutex6r.c\nmutex7::\tmutex7.c\nmutex6s::\tmutex6s.c\nmutex6rs::\tmutex6rs.c\nmutex6es::\tmutex6es.c\nmutex7e::\tmutex7e.c\nmutex7n::\tmutex7n.c\nmutex7r::\tmutex7r.c\nmutex8::\tmutex8.c\nmutex8e::\tmutex8e.c\nmutex8n::\tmutex8n.c\nmutex8r::\tmutex8r.c\nequal1::\tequal1.c\nexit2::\t\texit2.c\nexit3::\t\texit3.c\nexit4::\t\texit4.c\nexit5::\t\texit5.c\njoin0::\t\tjoin0.c\njoin1::\t\tjoin1.c\njoin2::\t\tjoin2.c\njoin3::\t\tjoin3.c\nkill1::\t\tkill1.c\ncount1::\tcount1.c\nonce1::\t\tonce1.c\ntsd1::\t\ttsd1.c\nself2::\t\tself2.c\neyal1::\t\teyal1.c\ncondvar3::\tcondvar3.c\ncondvar4::\tcondvar4.c\ncondvar5::\tcondvar5.c\ncondvar6::\tcondvar6.c\ncondvar7::\tcondvar7.c\ncondvar8::\tcondvar8.c\ncondvar9::\tcondvar9.c\nerrno1::\terrno1.c\nreuse1.::\treuse1.c\nreuse2.::\treuse2.c\nrwlock1::\trwlock1.c\nrwlock2::\trwlock2.c\nrwlock3::\trwlock3.c\nrwlock4::\trwlock4.c\nrwlock5::\trwlock5.c\nrwlock6::\trwlock6.c\nrwlock7::\trwlock7.c\nrwlock8::\trwlock8.c\nrwlock2_t::\trwlock2_t.c\nrwlock3_t::\trwlock3_t.c\nrwlock4_t::\trwlock4_t.c\nrwlock5_t::\trwlock5_t.c\nrwlock6_t::\trwlock6_t.c\nrwlock6_t2::\trwlock6_t2.c\nsemaphore1::\tsemaphore1.c\nsemaphore2::\tsemaphore2.c\nsemaphore3::\tsemaphore3.c\ncontext1::\tcontext1.c\ncancel3::\tcancel3.c\ncancel4::\tcancel4.c\ncancel5::\tcancel5.c\ncancel6a::\tcancel6a.c\ncancel6d::\tcancel6d.c\ncancel7::\tcancel7.c\ncleanup0::\tcleanup0.c\ncleanup1::\tcleanup1.c\ncleanup2::\tcleanup2.c\ncleanup3::\tcleanup3.c\npriority1::     priority1.c\npriority2::     priority2.c\ninherit1::      inherit1.c\nspin1::         spin1.c\nspin2::         spin2.c\nspin3::         spin3.c\nspin4::         spin4.c\nbarrier1::      barrier1.c\nbarrier2::      barrier2.c\nbarrier3::      barrier3.c\nbarrier4::      barrier4.c\nbarrier5::      barrier5.c\nexception1::\texception1.c\nexception2::\texception2.c\nexception3::\texception3.c\nbenchtest1::    benchtest1.c\nbenchtest2::    benchtest2.c\nbenchtest3::    benchtest3.c\nbenchtest4::    benchtest4.c\nbenchtest5::    benchtest5.c\nvalid1::\tvalid1.c\nvalid2::\tvalid2.c\ncancel9::\tcancel9.c\n\nsizes:\t\t:test:\tsizes\nloadfree:\t:test:\nmutex5\t\t:test:\tloadfree\nmutex1\t\t:test:\tloadfree\nmutex1n\t\t:test:\tloadfree\nmutex1r\t\t:test:\tloadfree\nmutex1e\t\t:test:\tloadfree\nsemaphore1\t:test:\tloadfree\nsemaphore2\t:test:\tloadfree\nsemaphore3\t:test:\tloadfree\nmutex2\t\t:test:\tloadfree\nmutex2r\t\t:test:\tloadfree\nmutex2e\t\t:test:\tloadfree\nexit1\t\t:test:\tloadfree\ncondvar1\t:test:\tloadfree\nkill1\t\t:test:\tloadfree\ncondvar1_1\t:test:\tcondvar1\ncondvar1_2\t:test:\tjoin2\nself1\t\t:test:\tloadfree\ncondvar2\t:test:\tcondvar1\ncondvar2_1\t:test:\tcondvar2\ncreate1 \t:test:\tmutex2\ncreate2 \t:test:\tcreate1\nreuse1 \t\t:test:\tcreate2\nreuse2 \t\t:test:\treuse1\ncancel1\t\t:test:\tcreate1\ncancel2\t\t:test:\tcancel1\nmutex3\t\t:test:\tcreate1\nmutex3r\t\t:test:\tcreate1\nmutex3e\t\t:test:\tcreate1\nmutex4\t\t:test:\tmutex3\nmutex6\t\t:test:\tmutex4\nmutex6n\t\t:test:\tmutex4\nmutex6e\t\t:test:\tmutex4\nmutex6r\t\t:test:\tmutex4\nmutex6s\t\t:test:\tmutex6\nmutex6rs\t:test:\tmutex6r\nmutex6es\t:test:\tmutex6e\nmutex7\t\t:test:\tmutex6\nmutex7n\t\t:test:\tmutex6n\nmutex7e\t\t:test:\tmutex6e\nmutex7r\t\t:test:\tmutex6r\nmutex8\t\t:test:\tmutex7\nmutex8n\t\t:test:\tmutex7n\nmutex8e\t\t:test:\tmutex7e\nmutex8r\t\t:test:\tmutex7r\nequal1\t\t:test:\tcreate1\nexit2\t\t:test:\tcreate1\nexit3\t\t:test:\tcreate1\nexit4\t\t:test:\tkill1\nexit5\t\t:test:\texit4\njoin0\t\t:test:\tcreate1\njoin1\t\t:test:\tcreate1\njoin2\t\t:test:\tcreate1\njoin3\t\t:test:\tjoin2\ncount1\t\t:test:\tjoin1\nonce1\t\t:test:\tcreate1\ntsd1\t\t:test:\tjoin1\nself2\t\t:test:\tcreate1\neyal1\t\t:test:\ttsd1\ncondvar3\t:test:\tcreate1\ncondvar3_1\t:test:\tcondvar3\ncondvar3_2\t:test:\tcondvar3_1\ncondvar3_3\t:test:\tcondvar3_2\ncondvar4\t:test:\tcreate1\ncondvar5\t:test:\tcondvar4\ncondvar6\t:test:\tcondvar5\ncondvar7\t:test:\tcondvar6\tcleanup1\ncondvar8\t:test:\tcondvar7\ncondvar9\t:test:\tcondvar8\nerrno1\t\t:test:\tmutex3\nrwlock1\t\t:test:\tcondvar6\nrwlock2\t\t:test:\trwlock1\nrwlock3\t\t:test:\trwlock2\nrwlock4\t\t:test:\trwlock3\nrwlock5\t\t:test:\trwlock4\nrwlock6\t\t:test:\trwlock5\nrwlock7\t\t:test:\trwlock6\nrwlock8\t\t:test:\trwlock7\nrwlock2_t\t:test:\trwlock2\nrwlock3_t\t:test:\trwlock2_t\nrwlock4_t\t:test:\trwlock3_t\nrwlock5_t\t:test:\trwlock4_t\nrwlock6_t\t:test:\trwlock5_t\nrwlock6_t2\t:test:\trwlock6_t\ncontext1\t:test:\tcancel2\ncancel3\t\t:test:\tcontext1\ncancel4\t\t:test:\tcancel3\ncancel5\t\t:test:\tcancel3\ncancel6a\t:test:\tcancel3\ncancel6d\t:test:\tcancel3\ncancel7\t\t:test:\tkill1\ncleanup0\t:test:\tcancel5\ncleanup1\t:test:\tcleanup0\ncleanup2\t:test:\tcleanup1\ncleanup3\t:test:\tcleanup2\npriority1       :test:  join1\npriority2       :test:  priority1\ninherit1        :test:  join1\nspin1           :test:\nspin2           :test:  spin1.c\nspin3           :test:  spin2.c\nspin4           :test:  spin3.c\nbarrier1        :test:\nbarrier2        :test:  barrier1.c\nbarrier3        :test:  barrier2.c\nbarrier4        :test:  barrier3.c\nbarrier5        :test:  barrier4.c\nbenchtest1      :test:  mutex3\nbenchtest2      :test:  benchtest1\nbenchtest3      :test:  benchtest2\nbenchtest4      :test:  benchtest3\nbenchtest5      :test:  benchtest4\nexception1\t:test:\tcancel4\nexception2\t:test:\texception1\nexception3\t:test:\texception2\nexit4\t\t:test:\texit3\nvalid1\t\t:test:\tjoin1\nvalid2\t\t:test:\tvalid1\ncancel9\t\t:test:\tcancel8\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/PROGRESS",
    "content": "Please see the ANNOUNCE file \"Level of Standards Conformance\"\nor the web page:\n\nhttp://sources.redhat.com/pthreads-win32/conformance.html\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/README",
    "content": "PTHREADS-WIN32\n==============\n\nPthreads-win32 is free software, distributed under the GNU Lesser\nGeneral Public License (LGPL). See the file 'COPYING.LIB' for terms\nand conditions. Also see the file 'COPYING' for information\nspecific to pthreads-win32, copyrights and the LGPL.\n\n\nWhat is it?\n-----------\n\nPthreads-win32 is an Open Source Software implementation of the\nThreads component of the POSIX 1003.1c 1995 Standard (or later)\nfor Microsoft's Win32 environment. Some functions from POSIX\n1003.1b are also supported including semaphores. Other related\nfunctions include the set of read-write lock functions. The\nlibrary also supports some of the functionality of the Open\nGroup's Single Unix specification, version 2, namely mutex types,\nplus some common and pthreads-win32 specific non-portable\nroutines (see README.NONPORTABLE).\n\nSee the file \"ANNOUNCE\" for more information including standards\nconformance details and the list of supported and unsupported\nroutines.\n\n\nPrerequisites\n-------------\nMSVC or GNU C (MinGW32 MSys development kit)\n\tTo build from source.\n\nQueueUserAPCEx by Panagiotis E. Hadjidoukas\n\tFor true async cancelation of threads (including blocked threads).\n\tThis is a DLL and Windows driver that provides pre-emptive APC\n\tby forcing threads into an alertable state when the APC is queued.\n\tBoth the DLL and driver are provided with the pthreads-win32.exe\n\tself-unpacking ZIP, and on the pthreads-win32 FTP site  (in source\n\tand pre-built forms). Currently this is a separate LGPL package to\n\tpthreads-win32. See the README in the QueueUserAPCEx folder for\n\tinstallation instructions.\n\n\tPthreads-win32 will automatically detect if the QueueUserAPCEx DLL\n\tQuserEx.DLL is available and whether the driver AlertDrv.sys is\n\tloaded. If it is not available, pthreads-win32 will simulate async\n\tcancelation, which means that it can async cancel only threads that\n\tare runnable. The simulated async cancellation cannot cancel blocked\n\tthreads.\n\n\nLibrary naming\n--------------\n\nBecause the library is being built using various exception\nhandling schemes and compilers - and because the library\nmay not work reliably if these are mixed in an application,\neach different version of the library has it's own name.\n\nNote 1: the incompatibility is really between EH implementations\nof the different compilers. It should be possible to use the\nstandard C version from either compiler with C++ applications\nbuilt with a different compiler. If you use an EH version of\nthe library, then you must use the same compiler for the\napplication. This is another complication and dependency that\ncan be avoided by using only the standard C library version.\n\nNote 2: if you use a standard C pthread*.dll with a C++\napplication, then any functions that you define that are\nintended to be called via pthread_cleanup_push() must be\n__cdecl.\n\nNote 3: the intention was to also name either the VC or GC\nversion (it should be arbitrary) as pthread.dll, including\npthread.lib and libpthread.a as appropriate. This is no longer\nlikely to happen.\n\nNote 4: the compatibility number was added so that applications\ncan differentiate between binary incompatible versions of the\nlibs and dlls.\n\nIn general:\n\tpthread[VG]{SE,CE,C}c.dll\n\tpthread[VG]{SE,CE,C}c.lib\n\nwhere:\n\t[VG] indicates the compiler\n\tV\t- MS VC, or\n\tG\t- GNU C\n\n\t{SE,CE,C} indicates the exception handling scheme\n\tSE\t- Structured EH, or\n\tCE\t- C++ EH, or\n\tC\t- no exceptions - uses setjmp/longjmp\n\n\tc\t- DLL compatibility number indicating ABI and API\n\t\t  compatibility with applications built against\n\t\t  any snapshot with the same compatibility number.\n\t\t  See 'Version numbering' below.\n\nThe name may also be suffixed by a 'd' to indicate a debugging version\nof the library. E.g. pthreadVC2d.lib. Debugging versions contain\nadditional information for debugging (symbols etc) and are often not\noptimised in any way (compiled with optimisation turned off).\n\nFor example:\n\tpthreadVSE.dll\t(MSVC/SEH)\n\tpthreadGCE.dll\t(GNUC/C++ EH)\n\tpthreadGC.dll\t(GNUC/not dependent on exceptions)\n\tpthreadVC1.dll\t(MSVC/not dependent on exceptions - not binary\n\t\t\tcompatible with pthreadVC.dll)\n\tpthreadVC2.dll\t(MSVC/not dependent on exceptions - not binary\n\t\t\tcompatible with pthreadVC1.dll or pthreadVC.dll)\n\nThe GNU library archive file names have correspondingly changed to:\n\n\tlibpthreadGCEc.a\n\tlibpthreadGCc.a\n\n\nVersioning numbering\n--------------------\n\nVersion numbering is separate from the snapshot dating system, and\nis the canonical version identification system embedded within the\nDLL using the Microsoft version resource system. The versioning\nsystem chosen follows the GNU Libtool system. See\nhttp://www.gnu.org/software/libtool/manual.html section 6.2.\n\nSee the resource file 'version.rc'.\n\nMicrosoft version numbers use 4 integers:\n\n\t0.0.0.0\n\nPthreads-win32 uses the first 3 following the Libtool convention.\nThe fourth is commonly used for the build number, but will be reserved\nfor future use.\n\n\tcurrent.revision.age.0\n\nThe numbers are changed as follows:\n\n1. If the library source code has changed at all since the last update,\n   then increment revision (`c:r:a' becomes `c:r+1:a').\n2. If any interfaces have been added, removed, or changed since the last\n   update, increment current, and set revision to 0.\n3. If any interfaces have been added since the last public release, then\n   increment age.\n4. If any interfaces have been removed or changed since the last public\n   release, then set age to 0.\n\n\nDLL compatibility numbering is an attempt to ensure that applications\nalways load a compatible pthreads-win32 DLL by using a DLL naming system\nthat is consistent with the version numbering system. It also allows\nolder and newer DLLs to coexist in the same filesystem so that older\napplications can continue to be used. For pre .NET Windows systems,\nthis inevitably requires incompatible versions of the same DLLs to have\ndifferent names.\n\nPthreads-win32 has adopted the Cygwin convention of appending a single\ninteger number to the DLL name. The number used is based on the library\nversion number and is computed as 'current' - 'age'.\n\n(See http://home.att.net/~perlspinr/libversioning.html for a nicely\ndetailed explanation.)\n\nUsing this method, DLL name/s will only change when the DLL's\nbackwards compatibility changes. Note that the addition of new\n'interfaces' will not of itself change the DLL's compatibility for older\napplications.\n\n\nWhich of the several dll versions to use?\n-----------------------------------------\nor,\n---\nWhat are all these pthread*.dll and pthread*.lib files?\n-------------------------------------------------------\n\nSimple, use either pthreadGCv.* if you use GCC, or pthreadVCv.* if you\nuse MSVC - where 'v' is the DLL versioning (compatibility) number.\n\nOtherwise, you need to choose carefully and know WHY.\n\nThe most important choice you need to make is whether to use a\nversion that uses exceptions internally, or not. There are versions\nof the library that use exceptions as part of the thread\ncancelation and exit implementation. The default version uses\nsetjmp/longjmp.\n\nThere is some contension amongst POSIX threads experts as\nto how POSIX threads cancelation and exit should work\nwith languages that use exceptions, e.g. C++ and even C\n(Microsoft's Structured Exceptions).\n\nThe issue is: should cancelation of a thread in, say,\na C++ application cause object destructors and C++ exception\nhandlers to be invoked as the stack unwinds during thread\nexit, or not?\n\nThere seems to be more opinion in favour of using the\nstandard C version of the library (no EH) with C++ applications\nfor the reason that this appears to be the assumption commercial\npthreads implementations make. Therefore, if you use an EH version\nof pthreads-win32 then you may be under the illusion that\nyour application will be portable, when in fact it is likely to\nbehave differently when linked with other pthreads libraries.\n\nNow you may be asking: then why have you kept the EH versions of\nthe library?\n\nThere are a couple of reasons:\n- there is division amongst the experts and so the code may\n  be needed in the future. Yes, it's in the repository and we\n  can get it out anytime in the future, but it would be difficult\n  to find.\n- pthreads-win32 is one of the few implementations, and possibly\n  the only freely available one, that has EH versions. It may be\n  useful to people who want to play with or study application\n  behaviour under these conditions.\n\nNotes:\n\n[If you use either pthreadVCE or pthreadGCE]\n\n1. [See also the discussion in the FAQ file - Q2, Q4, and Q5]\n\nIf your application contains catch(...) blocks in your POSIX\nthreads then you will need to replace the \"catch(...)\" with the macro\n\"PtW32Catch\", eg.\n\n\t#ifdef PtW32Catch\n\t\tPtW32Catch {\n\t\t\t...\n\t\t}\n\t#else\n\t\tcatch(...) {\n\t\t\t...\n\t\t}\n\t#endif\n\nOtherwise neither pthreads cancelation nor pthread_exit() will work\nreliably when using versions of the library that use C++ exceptions\nfor cancelation and thread exit.\n\nThis is due to what is believed to be a C++ compliance error in VC++\nwhereby you may not have multiple handlers for the same exception in\nthe same try/catch block. GNU G++ doesn't have this restriction.\n\n\nOther name changes\n------------------\n\nAll snapshots prior to and including snapshot 2000-08-13\nused \"_pthread_\" as the prefix to library internal\nfunctions, and \"_PTHREAD_\" to many library internal\nmacros. These have now been changed to \"ptw32_\" and \"PTW32_\"\nrespectively so as to not conflict with the ANSI standard's\nreservation of identifiers beginning with \"_\" and \"__\" for\nuse by compiler implementations only.\n\nIf you have written any applications and you are linking\nstatically with the pthreads-win32 library then you may have\nincluded a call to _pthread_processInitialize. You will\nnow have to change that to ptw32_processInitialize.\n\n\nCleanup code default style\n--------------------------\n\nPreviously, if not defined, the cleanup style was determined automatically\nfrom the compiler used, and one of the following was defined accordingly:\n\n\t__CLEANUP_SEH\tMSVC only\n\t__CLEANUP_CXX\tC++, including MSVC++, GNU G++\n\t__CLEANUP_C\tC, including GNU GCC, not MSVC\n\nThese defines determine the style of cleanup (see pthread.h) and,\nmost importantly, the way that cancelation and thread exit (via\npthread_exit) is performed (see the routine ptw32_throw()).\n\nIn short, the exceptions versions of the library throw an exception\nwhen a thread is canceled, or exits via pthread_exit(). This exception is\ncaught by a handler in the thread startup routine, so that the\nthe correct stack unwinding occurs regardless of where the thread\nis when it's canceled or exits via pthread_exit().\n\nIn this snapshot, unless the build explicitly defines (e.g. via a\ncompiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then\nthe build NOW always defaults to __CLEANUP_C style cleanup. This style\nuses setjmp/longjmp in the cancelation and pthread_exit implementations,\nand therefore won't do stack unwinding even when linked to applications\nthat have it (e.g. C++ apps). This is for consistency with most/all\ncommercial Unix POSIX threads implementations.\n\nAlthough it was not clearly documented before, it is still necessary to\nbuild your application using the same __CLEANUP_* define as was\nused for the version of the library that you link with, so that the\ncorrect parts of pthread.h are included. That is, the possible\ndefines require the following library versions:\n\n\t__CLEANUP_SEH\tpthreadVSE.dll\n\t__CLEANUP_CXX\tpthreadVCE.dll or pthreadGCE.dll\n\t__CLEANUP_C\tpthreadVC.dll or pthreadGC.dll\n\nIt is recommended that you let pthread.h use it's default __CLEANUP_C\nfor both library and application builds. That is, don't define any of\nthe above, and then link with pthreadVC.lib (MSVC or MSVC++) and\nlibpthreadGC.a (MinGW GCC or G++). The reason is explained below, but\nanother reason is that the prebuilt pthreadVCE.dll is currently broken.\nVersions built with MSVC++ later than version 6 may not be broken, but I\ncan't verify this yet.\n\nWHY ARE WE MAKING THE DEFAULT STYLE LESS EXCEPTION-FRIENDLY?\nBecause no commercial Unix POSIX threads implementation allows you to\nchoose to have stack unwinding. Therefore, providing it in pthread-win32\nas a default is dangerous. We still provide the choice but unless\nyou consciously choose to do otherwise, your pthreads applications will\nnow run or crash in similar ways irrespective of the pthreads platform\nyou use. Or at least this is the hope.\n\n\nBuilding under VC++ using C++ EH, Structured EH, or just C\n----------------------------------------------------------\n\nFrom the source directory run nmake without any arguments to list\nhelp information. E.g.\n\n$ nmake\n\nMicrosoft (R) Program Maintenance Utility   Version 6.00.8168.0\nCopyright (C) Microsoft Corp 1988-1998. All rights reserved.\n\nRun one of the following command lines:\nnmake clean VCE (to build the MSVC dll with C++ exception handling)\nnmake clean VSE (to build the MSVC dll with structured exception handling)\nnmake clean VC (to build the MSVC dll with C cleanup code)\nnmake clean VCE-inlined (to build the MSVC inlined dll with C++ exception handling)\nnmake clean VSE-inlined (to build the MSVC inlined dll with structured exception handling)\nnmake clean VC-inlined (to build the MSVC inlined dll with C cleanup code)\nnmake clean VC-static (to build the MSVC static lib with C cleanup code)\nnmake clean VCE-debug (to build the debug MSVC dll with C++ exception handling)\nnmake clean VSE-debug (to build the debug MSVC dll with structured exception handling)\nnmake clean VC-debug (to build the debug MSVC dll with C cleanup code)\nnmake clean VCE-inlined-debug (to build the debug MSVC inlined dll with C++ exception handling)\nnmake clean VSE-inlined-debug (to build the debug MSVC inlined dll with structured exception handling)\nnmake clean VC-inlined-debug (to build the debug MSVC inlined dll with C cleanup code)\nnmake clean VC-static-debug (to build the debug MSVC static lib with C cleanup code)\n\n\nThe pre-built dlls are normally built using the *-inlined targets.\n\nYou can run the testsuite by changing to the \"tests\" directory and\nrunning nmake. E.g.:\n\n$ cd tests\n$ nmake\n\nMicrosoft (R) Program Maintenance Utility   Version 6.00.8168.0\nCopyright (C) Microsoft Corp 1988-1998. All rights reserved.\n\nRun one of the following command lines:\nnmake clean VC (to test using VC dll with VC (no EH) applications)\nnmake clean VCX (to test using VC dll with VC++ (EH) applications)\nnmake clean VCE (to test using the VCE dll with VC++ EH applications)\nnmake clean VSE (to test using VSE dll with VC (SEH) applications)\nnmake clean VC-bench (to benchtest using VC dll with C bench app)\nnmake clean VCX-bench (to benchtest using VC dll with C++ bench app)\nnmake clean VCE-bench (to benchtest using VCE dll with C++ bench app)\nnmake clean VSE-bench (to benchtest using VSE dll with SEH bench app)\nnmake clean VC-static (to test using VC static lib with VC (no EH) applications)\n\n\nBuilding under Mingw32\n----------------------\n\nThe dll can be built easily with recent versions of Mingw32.\n(The distributed versions are built using Mingw32 and MsysDTK\nfrom www.mingw32.org.)\n\nFrom the source directory, run make for help information. E.g.:\n\n$ make\nRun one of the following command lines:\nmake clean GC            (to build the GNU C dll with C cleanup code)\nmake clean GCE           (to build the GNU C dll with C++ exception handling)\nmake clean GC-inlined    (to build the GNU C inlined dll with C cleanup code)\nmake clean GCE-inlined   (to build the GNU C inlined dll with C++ exception handling)\nmake clean GC-static     (to build the GNU C inlined static lib with C cleanup code)\nmake clean GC-debug      (to build the GNU C debug dll with C cleanup code)\nmake clean GCE-debug     (to build the GNU C debug dll with C++ exception handling)\nmake clean GC-inlined-debug    (to build the GNU C inlined debug dll with C cleanup code)\nmake clean GCE-inlined-debug   (to build the GNU C inlined debug dll with C++ exception handling)\nmake clean GC-static-debug     (to build the GNU C inlined static debug lib with C cleanup code)\n\n\nThe pre-built dlls are normally built using the *-inlined targets.\n\nYou can run the testsuite by changing to the \"tests\" directory and\nrunning make for help information. E.g.:\n\n$ cd tests\n$ make\nRun one of the following command lines:\nmake clean GC    (to test using GC dll with C (no EH) applications)\nmake clean GCX   (to test using GC dll with C++ (EH) applications)\nmake clean GCE   (to test using GCE dll with C++ (EH) applications)\nmake clean GC-bench       (to benchtest using GNU C dll with C cleanup code)\nmake clean GCE-bench   (to benchtest using GNU C dll with C++ exception handling)\nmake clean GC-static   (to test using GC static lib with C (no EH) applications)\n\n\nBuilding under Linux using the Mingw32 cross development tools\n--------------------------------------------------------------\n\nYou can build the library without leaving Linux by using the Mingw32 cross\ndevelopment toolchain. See http://www.libsdl.org/extras/win32/cross/ for\ntools and info. The GNUmakefile contains some support for this, for example:\n\nmake CROSS=i386-mingw32msvc- clean GC-inlined\n\nwill build pthreadGCn.dll and libpthreadGCn.a (n=version#), provided your\ncross-tools/bin directory is in your PATH (or use the cross-make.sh script\nat the URL above).\n\n\nBuilding the library as a statically linkable library\n-----------------------------------------------------\n\nGeneral: PTW32_STATIC_LIB must be defined for both the library build and the\napplication build. The makefiles supplied and used by the following 'make'\ncommand lines will define this for you.\n\nMSVC (creates pthreadVCn.lib as a static link lib):\n\nnmake clean VC-static\n\n\nMinGW32 (creates libpthreadGCn.a as a static link lib):\n\nmake clean GC-static\n\n\nDefine PTW32_STATIC_LIB when building your application. Also, your\napplication must call a two non-portable routines to initialise the\nsome state on startup and cleanup before exit. One other routine needs\nto be called to cleanup after any Win32 threads have called POSIX API\nroutines. See README.NONPORTABLE or the html reference manual pages for\ndetails on these routines:\n\nBOOL pthread_win32_process_attach_np (void);\nBOOL pthread_win32_process_detach_np (void);\nBOOL pthread_win32_thread_attach_np (void); // Currently a no-op\nBOOL pthread_win32_thread_detach_np (void);\n\n\nThe tests makefiles have the same targets but only check that the\nstatic library is statically linkable. They don't run the full\ntestsuite. To run the full testsuite, build the dlls and run the\ndll test targets.\n\n\nBuilding the library under Cygwin\n---------------------------------\n\nCygwin is implementing it's own POSIX threads routines and these\nwill be the ones to use if you develop using Cygwin.\n\n\nReady to run binaries\n---------------------\n\nFor convenience, the following ready-to-run files can be downloaded\nfrom the FTP site (see under \"Availability\" below):\n\n\tpthread.h\n\tsemaphore.h\n\tsched.h\n\tpthreadVC.dll\t- built with MSVC compiler using C setjmp/longjmp\n\tpthreadVC.lib\n\tpthreadVCE.dll\t- built with MSVC++ compiler using C++ EH\n\tpthreadVCE.lib\n\tpthreadVSE.dll\t- built with MSVC compiler using SEH\n\tpthreadVSE.lib\n\tpthreadGC.dll\t- built with Mingw32 GCC\n\tlibpthreadGC.a\t- derived from pthreadGC.dll\n\tpthreadGCE.dll\t- built with Mingw32 G++\n\tlibpthreadGCE.a\t- derived from pthreadGCE.dll\n\nAs of August 2003 pthreads-win32 pthreadG* versions are built and tested\nusing the MinGW + MsysDTK environment current as of that date or later.\nThe following file MAY be needed for older MinGW environments.\n\n\tgcc.dll \t- needed to build and run applications that use\n\t\t\t  pthreadGCE.dll.\n\n\nBuilding applications with GNU compilers\n----------------------------------------\n\nIf you're using pthreadGC.dll:\n\nWith the three header files, pthreadGC.dll and libpthreadGC.a in the\nsame directory as your application myapp.c, you could compile, link\nand run myapp.c under Mingw32 as follows:\n\n\tgcc -o myapp.exe myapp.c -I. -L. -lpthreadGC\n\tmyapp\n\nOr put pthreadGC.dll in an appropriate directory in your PATH,\nput libpthreadGC.a in your system lib directory, and\nput the three header files in your system include directory,\nthen use:\n\n\tgcc -o myapp.exe myapp.c -lpthreadGC\n\tmyapp\n\n\nIf you're using pthreadGCE.dll:\n\nWith the three header files, pthreadGCE.dll, gcc.dll and libpthreadGCE.a\nin the same directory as your application myapp.c, you could compile,\nlink and run myapp.c under Mingw32 as follows:\n\n\tgcc -x c++ -o myapp.exe myapp.c -I. -L. -lpthreadGCE\n\tmyapp\n\nOr put pthreadGCE.dll and gcc.dll in an appropriate directory in\nyour PATH, put libpthreadGCE.a in your system lib directory, and\nput the three header files in your system include directory,\nthen use:\n\n\tgcc -x c++ -o myapp.exe myapp.c -lpthreadGCE\n\tmyapp\n\n\nAvailability\n------------\n\nThe complete source code in either unbundled, self-extracting\nZip file, or tar/gzipped format can be found at:\n\n\tftp://sources.redhat.com/pub/pthreads-win32\n\nThe pre-built DLL, export libraries and matching pthread.h can\nbe found at:\n\n\tftp://sources.redhat.com/pub/pthreads-win32/dll-latest\n\nHome page:\n\n\thttp://sources.redhat.com/pthreads-win32/\n\n\nMailing list\n------------\n\nThere is a mailing list for discussing pthreads on Win32.\nTo join, send email to:\n\n\tpthreads-win32-subscribe@sources.redhat.com\n\nUnsubscribe by sending mail to:\n\n\tpthreads-win32-unsubscribe@sources.redhat.com\n\n\nAcknowledgements\n----------------\n\nSee the ANNOUNCE file for acknowledgements.\nSee the 'CONTRIBUTORS' file for the list of contributors.\n\nAs much as possible, the ChangeLog file attributes\ncontributions and patches that have been incorporated\nin the library to the individuals responsible.\n\nFinally, thanks to all those who work on and contribute to the\nPOSIX and Single Unix Specification standards. The maturity of an\nindustry can be measured by it's open standards.\n\n----\nRoss Johnson\n<rpj@callisto.canberra.edu.au>\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/README.Borland",
    "content": "In ptw32_InterlockedCompareExchange.c, I've added a section for\nBorland's compiler; it's identical to that for the MS compiler except\nthat it uses /* ... */ comments instead of ; comments.\n\n[RPJ: need to define HAVE_TASM32 in config.h to use the above.]\n\n\nThe other file is a makefile suitable for use with Borland's compiler\n(run \"make -fBmakefile\" in the directory).  It builds a single version\nof the library, pthreadBC.dll and the corresponding pthreadBC.lib\nimport library, which is comparable to the pthreadVC version; I can't\npersonally see any demand for the versions that include structured or\nC++ exception cancellation handling so I haven't attempted to build\nthose versions of the library.  (I imagine a static version might be\nof use to some, but we can't legally use that on my commercial\nprojects so I can't try that out, unfortunately.)\n\n[RPJ: Added tests\\Bmakefile as well.]\n\nBorland C++ doesn't define the ENOSYS constant used by pthreads-win32;\nrather than make more extensive patches to the pthreads-win32 source I\nhave a mostly-arbitrary constant for it in the makefile.  However this\ndoesn't make it visible to the application using the library, so if\nanyone actually wants to use this constant in their apps (why?)\nsomeone might like to make a seperate NEED_BCC_something define to add\nthis stuff.\n\nThe makefile also #defines EDEADLK as EDEADLOCK, _timeb as timeb, and\n_ftime as ftime, to deal with the minor differences between the two\nRTLs' naming conventions, and sets the compiler flags as required to\nget a normal compile of the library.\n\n[RPJ: Moved errno values and _timeb etc to pthread.h, so apps will also\nuse them.]\n\n(While I'm on the subject, the reason Borland users should recompile\nthe library, rather than using the impdef/implib technique suggested\npreviously on the mailing list, is that a) the errno constants are\ndifferent, so the results returned by the pthread_* functions can be\nmeaningless, and b) the errno variable/pseudo-variable itself is\ndifferent in the MS & BCC runtimes, so you can't access the\npthreadVC's errno from a Borland C++-compiled host application\ncorrectly - I imagine there are other potential problems from the RTL\nmismatch too.)\n\n[RPJ: Make sure you use the same RTL in both dll and application builds.\nThe dll and tests Bmakefiles use cw32mti.lib. Having some trouble with\nmemory read exceptions running the test suite using BCC55.]\n\nBest regards,\nWill\n\n-- \nWill Bryant\nSystems Architect, eCOSM Limited\nCell +64 21 655 443, office +64 3 365 4176\nhttp://www.ecosm.com/\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/README.CV",
    "content": "README.CV -- Condition Variables\n--------------------------------\n\nThe original implementation of condition variables in\npthreads-win32 was based on a discussion paper:\n\n\"Strategies for Implementing POSIX Condition Variables\non Win32\": http://www.cs.wustl.edu/~schmidt/win32-cv-1.html\n\nThe changes suggested below were made on Feb 6 2001. This\nfile is included in the package for the benefit of anyone\ninterested in understanding the pthreads-win32 implementation\nof condition variables and the (sometimes subtle) issues that\nit attempts to resolve.\n\nThanks go to the individuals whose names appear throughout\nthe following text.\n\nRoss Johnson\n\n--------------------------------------------------------------------\n\nfyi.. (more detailed problem description/demos + possible fix/patch)\n\nregards,\nalexander.\n\n\nAlexander Terekhov\n31.01.2001 17:43\n\nTo:   ace-bugs@cs.wustl.edu\ncc:\nFrom: Alexander Terekhov/Germany/IBM@IBMDE\nSubject:  Implementation of POSIX CVs: spur.wakeups/lost\n      signals/deadlocks/unfairness\n\n\n\n    ACE VERSION:\n\n        5.1.12 (pthread-win32 snapshot 2000-12-29)\n\n    HOST MACHINE and OPERATING SYSTEM:\n\n        IBM IntelliStation Z Pro, 2 x XEON 1GHz, Win2K\n\n    TARGET MACHINE and OPERATING SYSTEM, if different from HOST:\n    COMPILER NAME AND VERSION (AND PATCHLEVEL):\n\n        Microsoft Visual C++ 6.0\n\n    AREA/CLASS/EXAMPLE AFFECTED:\n\n        Implementation of POSIX condition variables - OS.cpp/.h\n\n    DOES THE PROBLEM AFFECT:\n\n        EXECUTION? YES!\n\n    SYNOPSIS:\n\n        a) spurious wakeups (minor problem)\n        b) lost signals\n        c) broadcast deadlock\n        d) unfairness (minor problem)\n\n    DESCRIPTION:\n\n        Please see attached copy of discussion thread\n        from comp.programming.threads for more details on\n        some reported problems. (i've also posted a \"fyi\"\n        message to ace-users a week or two ago but\n        unfortunately did not get any response so far).\n\n        It seems that current implementation suffers from\n        two essential problems:\n\n        1) cond.waiters_count does not accurately reflect\n           number of waiters blocked on semaphore - w/o\n           proper synchronisation that could result (in the\n           time window when counter is not accurate)\n           in spurious wakeups organised by subsequent\n           _signals  and _broadcasts.\n\n        2) Always having (with no e.g. copy_and_clear/..)\n           the same queue in use (semaphore+counter)\n           neither signal nor broadcast provide 'atomic'\n           behaviour with respect to other threads/subsequent\n           calls to signal/broadcast/wait.\n\n        Each problem and combination of both could produce\n        various nasty things:\n\n        a) spurious wakeups (minor problem)\n\n             it is possible that waiter(s) which was already\n             unblocked even so is still counted as blocked\n             waiter. signal and broadcast will release\n             semaphore which will produce a spurious wakeup\n             for a 'real' waiter coming later.\n\n        b) lost signals\n\n             signalling thread ends up consuming its own\n             signal. please see demo/discussion below.\n\n        c) broadcast deadlock\n\n             last_waiter processing code does not correctly\n             handle the case with multiple threads\n             waiting for the end of broadcast.\n             please see demo/discussion below.\n\n        d) unfairness (minor problem)\n\n             without SignalObjectAndWait some waiter(s)\n             may end up consuming broadcasted signals\n             multiple times (spurious wakeups) because waiter\n             thread(s) can be preempted before they call\n             semaphore wait (but after count++ and mtx.unlock).\n\n    REPEAT BY:\n\n        See below... run problem demos programs (tennis.cpp and\n        tennisb.cpp) number of times concurrently (on multiprocessor)\n        and in multiple sessions or just add a couple of \"Sleep\"s\n        as described in the attached copy of discussion thread\n        from comp.programming.threads\n\n    SAMPLE FIX/WORKAROUND:\n\n        See attached patch to pthread-win32.. well, I can not\n        claim that it is completely bug free but at least my\n        test and tests provided by pthreads-win32 seem to work.\n        Perhaps that will help.\n\n        regards,\n        alexander.\n\n\n>> Forum: comp.programming.threads\n>> Thread: pthread_cond_* implementation questions\n.\n.\n.\nDavid Schwartz <davids@webmaster.com> wrote:\n\n> terekhov@my-deja.com wrote:\n>\n>> BTW, could you please also share your view on other perceived\n>> \"problems\" such as nested broadcast deadlock, spurious wakeups\n>> and (the latest one) lost signals??\n>\n>I'm not sure what you mean. The standard allows an implementation\n>to do almost whatever it likes. In fact, you could implement\n>pthread_cond_wait by releasing the mutex, sleeping a random\n>amount of time, and then reacquiring the mutex. Of course,\n>this would be a pretty poor implementation, but any code that\n>didn't work under that implementation wouldn't be strictly\n>compliant.\n\nThe implementation you suggested is indeed correct\none (yes, now I see it :). However it requires from\nsignal/broadcast nothing more than to \"{ return 0; }\"\nThat is not the case for pthread-win32 and ACE\nimplementations. I do think that these implementations\n(basically the same implementation) have some serious\nproblems with wait/signal/broadcast calls. I am looking\nfor help to clarify whether these problems are real\nor not. I think that I can demonstrate what I mean\nusing one or two small sample programs.\n.\n.\n.\n==========\ntennis.cpp\n==========\n\n#include \"ace/Synch.h\"\n#include \"ace/Thread.h\"\n\nenum GAME_STATE {\n\n  START_GAME,\n  PLAYER_A,     // Player A playes the ball\n  PLAYER_B,     // Player B playes the ball\n  GAME_OVER,\n  ONE_PLAYER_GONE,\n  BOTH_PLAYERS_GONE\n\n};\n\nenum GAME_STATE             eGameState;\nACE_Mutex*                  pmtxGameStateLock;\nACE_Condition< ACE_Mutex >* pcndGameStateChange;\n\nvoid*\n  playerA(\n    void* pParm\n  )\n{\n\n  // For access to game state variable\n  pmtxGameStateLock->acquire();\n\n  // Play loop\n  while ( eGameState < GAME_OVER ) {\n\n    // Play the ball\n    cout << endl << \"PLAYER-A\" << endl;\n\n    // Now its PLAYER-B's turn\n    eGameState = PLAYER_B;\n\n    // Signal to PLAYER-B that now it is his turn\n    pcndGameStateChange->signal();\n\n    // Wait until PLAYER-B finishes playing the ball\n    do {\n\n      pcndGameStateChange->wait();\n\n      if ( PLAYER_B == eGameState )\n        cout << endl << \"----PLAYER-A: SPURIOUS WAKEUP!!!\" << endl;\n\n    } while ( PLAYER_B == eGameState );\n\n  }\n\n  // PLAYER-A gone\n  eGameState = (GAME_STATE)(eGameState+1);\n  cout << endl << \"PLAYER-A GONE\" << endl;\n\n  // No more access to state variable needed\n  pmtxGameStateLock->release();\n\n  // Signal PLAYER-A gone event\n  pcndGameStateChange->broadcast();\n\n  return 0;\n\n}\n\nvoid*\n  playerB(\n    void* pParm\n  )\n{\n\n  // For access to game state variable\n  pmtxGameStateLock->acquire();\n\n  // Play loop\n  while ( eGameState < GAME_OVER ) {\n\n    // Play the ball\n    cout << endl << \"PLAYER-B\" << endl;\n\n    // Now its PLAYER-A's turn\n    eGameState = PLAYER_A;\n\n    // Signal to PLAYER-A that now it is his turn\n    pcndGameStateChange->signal();\n\n    // Wait until PLAYER-A finishes playing the ball\n    do {\n\n      pcndGameStateChange->wait();\n\n      if ( PLAYER_A == eGameState )\n        cout << endl << \"----PLAYER-B: SPURIOUS WAKEUP!!!\" << endl;\n\n    } while ( PLAYER_A == eGameState );\n\n  }\n\n  // PLAYER-B gone\n  eGameState = (GAME_STATE)(eGameState+1);\n  cout << endl << \"PLAYER-B GONE\" << endl;\n\n  // No more access to state variable needed\n  pmtxGameStateLock->release();\n\n  // Signal PLAYER-B gone event\n  pcndGameStateChange->broadcast();\n\n  return 0;\n\n}\n\n\nint\nmain (int, ACE_TCHAR *[])\n{\n\n  pmtxGameStateLock   = new ACE_Mutex();\n  pcndGameStateChange = new ACE_Condition< ACE_Mutex >( *pmtxGameStateLock\n);\n\n  // Set initial state\n  eGameState = START_GAME;\n\n  // Create players\n  ACE_Thread::spawn( playerA );\n  ACE_Thread::spawn( playerB );\n\n  // Give them 5 sec. to play\n  Sleep( 5000 );//sleep( 5 );\n\n  // Set game over state\n  pmtxGameStateLock->acquire();\n  eGameState = GAME_OVER;\n\n  // Let them know\n  pcndGameStateChange->broadcast();\n\n  // Wait for players to stop\n  do {\n\n    pcndGameStateChange->wait();\n\n  } while ( eGameState < BOTH_PLAYERS_GONE );\n\n  // Cleanup\n  cout << endl << \"GAME OVER\" << endl;\n  pmtxGameStateLock->release();\n  delete pcndGameStateChange;\n  delete pmtxGameStateLock;\n\n  return 0;\n\n}\n\n===========\ntennisb.cpp\n===========\n#include \"ace/Synch.h\"\n#include \"ace/Thread.h\"\n\nenum GAME_STATE {\n\n  START_GAME,\n  PLAYER_A,     // Player A playes the ball\n  PLAYER_B,     // Player B playes the ball\n  GAME_OVER,\n  ONE_PLAYER_GONE,\n  BOTH_PLAYERS_GONE\n\n};\n\nenum GAME_STATE             eGameState;\nACE_Mutex*                  pmtxGameStateLock;\nACE_Condition< ACE_Mutex >* pcndGameStateChange;\n\nvoid*\n  playerA(\n    void* pParm\n  )\n{\n\n  // For access to game state variable\n  pmtxGameStateLock->acquire();\n\n  // Play loop\n  while ( eGameState < GAME_OVER ) {\n\n    // Play the ball\n    cout << endl << \"PLAYER-A\" << endl;\n\n    // Now its PLAYER-B's turn\n    eGameState = PLAYER_B;\n\n    // Signal to PLAYER-B that now it is his turn\n    pcndGameStateChange->broadcast();\n\n    // Wait until PLAYER-B finishes playing the ball\n    do {\n\n      pcndGameStateChange->wait();\n\n      if ( PLAYER_B == eGameState )\n        cout << endl << \"----PLAYER-A: SPURIOUS WAKEUP!!!\" << endl;\n\n    } while ( PLAYER_B == eGameState );\n\n  }\n\n  // PLAYER-A gone\n  eGameState = (GAME_STATE)(eGameState+1);\n  cout << endl << \"PLAYER-A GONE\" << endl;\n\n  // No more access to state variable needed\n  pmtxGameStateLock->release();\n\n  // Signal PLAYER-A gone event\n  pcndGameStateChange->broadcast();\n\n  return 0;\n\n}\n\nvoid*\n  playerB(\n    void* pParm\n  )\n{\n\n  // For access to game state variable\n  pmtxGameStateLock->acquire();\n\n  // Play loop\n  while ( eGameState < GAME_OVER ) {\n\n    // Play the ball\n    cout << endl << \"PLAYER-B\" << endl;\n\n    // Now its PLAYER-A's turn\n    eGameState = PLAYER_A;\n\n    // Signal to PLAYER-A that now it is his turn\n    pcndGameStateChange->broadcast();\n\n    // Wait until PLAYER-A finishes playing the ball\n    do {\n\n      pcndGameStateChange->wait();\n\n      if ( PLAYER_A == eGameState )\n        cout << endl << \"----PLAYER-B: SPURIOUS WAKEUP!!!\" << endl;\n\n    } while ( PLAYER_A == eGameState );\n\n  }\n\n  // PLAYER-B gone\n  eGameState = (GAME_STATE)(eGameState+1);\n  cout << endl << \"PLAYER-B GONE\" << endl;\n\n  // No more access to state variable needed\n  pmtxGameStateLock->release();\n\n  // Signal PLAYER-B gone event\n  pcndGameStateChange->broadcast();\n\n  return 0;\n\n}\n\n\nint\nmain (int, ACE_TCHAR *[])\n{\n\n  pmtxGameStateLock   = new ACE_Mutex();\n  pcndGameStateChange = new ACE_Condition< ACE_Mutex >( *pmtxGameStateLock\n);\n\n  // Set initial state\n  eGameState = START_GAME;\n\n  // Create players\n  ACE_Thread::spawn( playerA );\n  ACE_Thread::spawn( playerB );\n\n  // Give them 5 sec. to play\n  Sleep( 5000 );//sleep( 5 );\n\n  // Make some noise\n  pmtxGameStateLock->acquire();\n  cout << endl << \"---Noise ON...\" << endl;\n  pmtxGameStateLock->release();\n  for ( int i = 0; i < 100000; i++ )\n    pcndGameStateChange->broadcast();\n  cout << endl << \"---Noise OFF\" << endl;\n\n  // Set game over state\n  pmtxGameStateLock->acquire();\n  eGameState = GAME_OVER;\n  cout << endl << \"---Stopping the game...\" << endl;\n\n  // Let them know\n  pcndGameStateChange->broadcast();\n\n  // Wait for players to stop\n  do {\n\n    pcndGameStateChange->wait();\n\n  } while ( eGameState < BOTH_PLAYERS_GONE );\n\n  // Cleanup\n  cout << endl << \"GAME OVER\" << endl;\n  pmtxGameStateLock->release();\n  delete pcndGameStateChange;\n  delete pmtxGameStateLock;\n\n  return 0;\n\n}\n.\n.\n.\nDavid Schwartz <davids@webmaster.com> wrote:\n>> > It's compliant\n>>\n>> That is really good.\n>\n>> Tomorrow (I have to go urgently now) I will try to\n>> demonstrate the lost-signal \"problem\" of current\n>> pthread-win32 and ACE-(variant w/o SingleObjectAndWait)\n>> implementations: players start suddenly drop their balls :-)\n>> (with no change in source code).\n>\n>Signals aren't lost, they're going to the main thread,\n>which isn't coded correctly to handle them. Try this:\n>\n>  // Wait for players to stop\n>  do {\n>\n>    pthread_cond_wait( &cndGameStateChange,&mtxGameStateLock );\n>printf(\"Main thread stole a signal\\n\");\n>\n>  } while ( eGameState < BOTH_PLAYERS_GONE );\n>\n>I bet everytime you thing a signal is lost, you'll see that printf.\n>The signal isn't lost, it was stolen by another thread.\n\nwell, you can probably loose your bet.. it was indeed stolen\nby \"another\" thread but not the one you seem to think of.\n\nI think that what actually happens is the following:\n\nH:\\SA\\UXX\\pt\\PTHREADS\\TESTS>tennis3.exe\n\nPLAYER-A\n\nPLAYER-B\n\n----PLAYER-B: SPURIOUS WAKEUP!!!\n\nPLAYER-A GONE\n\nPLAYER-B GONE\n\nGAME OVER\n\nH:\\SA\\UXX\\pt\\PTHREADS\\TESTS>\n\nhere you can see that PLAYER-B after playing his first\nball (which came via signal from PLAYER-A) just dropped\nit down. What happened is that his signal to player A\nwas consumed as spurious wakeup by himself (player B).\n\nThe implementation has a problem:\n\n================\nwaiting threads:\n================\n\n{ /** Critical Section\n\n  inc cond.waiters_count\n\n}\n\n  /*\n  /* Atomic only if using Win32 SignalObjectAndWait\n  /*\n  cond.mtx.release\n\n  /*** ^^-- A THREAD WHICH DID SIGNAL MAY ACQUIRE THE MUTEX,\n  /***      GO INTO WAIT ON THE SAME CONDITION AND OVERTAKE\n  /***      ORIGINAL WAITER(S) CONSUMING ITS OWN SIGNAL!\n\n  cond.sem.wait\n\nPlayer-A after playing game's initial ball went into\nwait (called _wait) but was pre-empted before reaching\nwait semaphore. He was counted as waiter but was not\nactually waiting/blocked yet.\n\n===============\nsignal threads:\n===============\n\n{ /** Critical Section\n\n  waiters_count = cond.waiters_count\n\n}\n\n  if ( waiters_count != 0 )\n\n    sem.post 1\n\n  endif\n\nPlayer-B after he received signal/ball from Player A\ncalled _signal. The _signal did see that there was\none waiter blocked on the condition (Player-A) and\nreleased the semaphore.. (but it did not unblock\nPlayer-A because he was not actually blocked).\nPlayer-B thread continued its execution, called _wait,\nwas counted as second waiter BUT was allowed to slip\nthrough opened semaphore gate (which was opened for\nPlayer-B) and received his own signal. Player B remained\nblocked followed by Player A. Deadlock happened which\nlasted until main thread came in and said game over.\n\nIt seems to me that the implementation fails to\ncorrectly implement the following statement\nfrom specification:\n\nhttp://www.opengroup.org/\nonlinepubs/007908799/xsh/pthread_cond_wait.html\n\n\"These functions atomically release mutex and cause\nthe calling thread to block on the condition variable\ncond; atomically here means \"atomically with respect\nto access by another thread to the mutex and then the\ncondition variable\". That is, if another thread is\nable to acquire the mutex after the about-to-block\nthread has released it, then a subsequent call to\npthread_cond_signal() or pthread_cond_broadcast()\nin that thread behaves as if it were issued after\nthe about-to-block thread has blocked.\"\n\nQuestion: Am I right?\n\n(I produced the program output above by simply\nadding ?Sleep( 1 )?:\n\n================\nwaiting threads:\n================\n\n{ /** Critical Section\n\n  inc cond.waiters_count\n\n}\n\n  /*\n  /* Atomic only if using Win32 SignalObjectAndWait\n  /*\n  cond.mtx.release\n\nSleep( 1 ); // Win32\n\n  /*** ^^-- A THREAD WHICH DID SIGNAL MAY ACQUIRE THE MUTEX,\n  /***      GO INTO WAIT ON THE SAME CONDITION AND OVERTAKE\n  /***      ORIGINAL WAITER(S) CONSUMING ITS OWN SIGNAL!\n\n  cond.sem.wait\n\nto the source code of pthread-win32 implementation:\n\nhttp://sources.redhat.com/cgi-bin/cvsweb.cgi/pthreads/\ncondvar.c?rev=1.36&content-type=text/\nx-cvsweb-markup&cvsroot=pthreads-win32\n\n\n  /*\n  * We keep the lock held just long enough to increment the count of\n  * waiters by one (above).\n  * Note that we can't keep it held across the\n  * call to sem_wait since that will deadlock other calls\n  * to pthread_cond_signal\n  */\n  cleanup_args.mutexPtr = mutex;\n  cleanup_args.cv = cv;\n  cleanup_args.resultPtr = &result;\n\n  pthread_cleanup_push (ptw32_cond_wait_cleanup, (void *)\n&cleanup_args);\n\n  if ((result = pthread_mutex_unlock (mutex)) == 0)\n    {((result\nSleep( 1 ); // @AT\n\n      /*\n      * Wait to be awakened by\n      *              pthread_cond_signal, or\n      *              pthread_cond_broadcast, or\n      *              a timeout\n      *\n      * Note:\n      *      ptw32_sem_timedwait is a cancelation point,\n      *      hence providing the\n      *      mechanism for making pthread_cond_wait a cancelation\n      *      point. We use the cleanup mechanism to ensure we\n      *      re-lock the mutex and decrement the waiters count\n      *      if we are canceled.\n      */\n      if (ptw32_sem_timedwait (&(cv->sema), abstime) == -1)         {\n          result = errno;\n        }\n    }\n\n  pthread_cleanup_pop (1);  /* Always cleanup */\n\n\nBTW, on my system (2 CPUs) I can manage to get\nsignals lost even without any source code modification\nif I run the tennis program many times in different\nshell sessions.\n.\n.\n.\nDavid Schwartz <davids@webmaster.com> wrote:\n>terekhov@my-deja.com wrote:\n>\n>> well, it might be that the program is in fact buggy.\n>> but you did not show me any bug.\n>\n>You're right. I was close but not dead on. I was correct, however,\n>that the code is buggy because it uses 'pthread_cond_signal' even\n>though not any thread waiting on the condition variable can do the\n>job. I was wrong in which thread could be waiting on the cv but\n>unable to do the job.\n\nOkay, lets change 'pthread_cond_signal' to 'pthread_cond_broadcast'\nbut also add some noise from main() right before declaring the game\nto be over (I need it in order to demonstrate another problem of\npthread-win32/ACE implementations - broadcast deadlock)...\n.\n.\n.\nIt is my understanding of POSIX conditions,\nthat on correct implementation added noise\nin form of unnecessary broadcasts from main,\nshould not break the tennis program. The\nonly 'side effect' of added noise on correct\nimplementation would be 'spurious wakeups' of\nplayers (in fact they are not spurious,\nplayers just see them as spurious) unblocked,\nnot by another player but by main before\nanother player had a chance to acquire the\nmutex and change the game state variable:\n.\n.\n.\n\nPLAYER-B\n\nPLAYER-A\n\n---Noise ON...\n\nPLAYER-B\n\nPLAYER-A\n\n.\n.\n.\n\nPLAYER-B\n\nPLAYER-A\n\n----PLAYER-A: SPURIOUS WAKEUP!!!\n\nPLAYER-B\n\nPLAYER-A\n\n---Noise OFF\n\nPLAYER-B\n\n---Stopping the game...\n\nPLAYER-A GONE\n\nPLAYER-B GONE\n\nGAME OVER\n\nH:\\SA\\UXX\\pt\\PTHREADS\\TESTS>\n\nOn pthread-win32/ACE implementations the\nprogram could stall:\n\n.\n.\n.\n\nPLAYER-A\n\nPLAYER-B\n\nPLAYER-A\n\nPLAYER-B\n\nPLAYER-A\n\nPLAYER-B\n\nPLAYER-A\n\nPLAYER-B\n\n---Noise ON...\n\nPLAYER-A\n\n---Noise OFF\n^C\nH:\\SA\\UXX\\pt\\PTHREADS\\TESTS>\n\n\nThe implementation has problems:\n\n================\nwaiting threads:\n================\n\n{ /** Critical Section\n\n  inc cond.waiters_count\n\n}\n\n  /*\n  /* Atomic only if using Win32 SignalObjectAndWait\n  /*\n  cond.mtx.release\n  cond.sem.wait\n\n  /*** ^^-- WAITER CAN BE PREEMPTED AFTER BEING UNBLOCKED...\n\n{ /** Critical Section\n\n  dec cond.waiters_count\n\n  /*** ^^- ...AND BEFORE DECREMENTING THE COUNT (1)\n\n  last_waiter = ( cond.was_broadcast &&\n                    cond.waiters_count == 0 )\n\n  if ( last_waiter )\n\n    cond.was_broadcast = FALSE\n\n  endif\n\n}\n\n  if ( last_waiter )\n\n    /*\n    /* Atomic only if using Win32 SignalObjectAndWait\n    /*\n    cond.auto_reset_event_or_sem.post /* Event for Win32\n    cond.mtx.acquire\n\n  /*** ^^-- ...AND BEFORE CALL TO mtx.acquire (2)\n\n  /*** ^^-- NESTED BROADCASTS RESULT IN A DEADLOCK\n\n\n  else\n\n    cond.mtx.acquire\n\n  /*** ^^-- ...AND BEFORE CALL TO mtx.acquire (3)\n\n  endif\n\n\n==================\nbroadcast threads:\n==================\n\n{ /** Critical Section\n\n  waiters_count = cond.waiters_count\n\n  if ( waiters_count != 0 )\n\n    cond.was_broadcast = TRUE\n\n  endif\n\n}\n\nif ( waiters_count != 0 )\n\n  cond.sem.post waiters_count\n\n  /*** ^^^^^--- SPURIOUS WAKEUPS DUE TO (1)\n\n  cond.auto_reset_event_or_sem.wait /* Event for Win32\n\n  /*** ^^^^^--- DEADLOCK FOR FURTHER BROADCASTS IF THEY\n                HAPPEN TO GO INTO WAIT WHILE PREVIOUS\n                BROADCAST IS STILL IN PROGRESS/WAITING\n\nendif\n\na) cond.waiters_count does not accurately reflect\nnumber of waiters blocked on semaphore - that could\nresult (in the time window when counter is not accurate)\nin spurios wakeups organised by subsequent _signals\nand _broadcasts. From standard compliance point of view\nthat is OK but that could be a real problem from\nperformance/efficiency point of view.\n\nb) If subsequent broadcast happen to go into wait on\ncond.auto_reset_event_or_sem before previous\nbroadcast was unblocked from cond.auto_reset_event_or_sem\nby its last waiter, one of two blocked threads will\nremain blocked because last_waiter processing code\nfails to unblock both threads.\n\nIn the situation with tennisb.c the Player-B was put\nin a deadlock by noise (broadcast) coming from main\nthread. And since Player-B holds the game state\nmutex when it calls broadcast, the whole program\nstalled: Player-A was deadlocked on mutex and\nmain thread after finishing with producing the noise\nwas deadlocked on mutex too (needed to declare the\ngame over)\n\n(I produced the program output above by simply\nadding ?Sleep( 1 )?:\n\n==================\nbroadcast threads:\n==================\n\n{ /** Critical Section\n\n  waiters_count = cond.waiters_count\n\n  if ( waiters_count != 0 )\n\n    cond.was_broadcast = TRUE\n\n  endif\n\n}\n\nif ( waiters_count != 0 )\n\nSleep( 1 ); //Win32\n\n  cond.sem.post waiters_count\n\n  /*** ^^^^^--- SPURIOUS WAKEUPS DUE TO (1)\n\n  cond.auto_reset_event_or_sem.wait /* Event for Win32\n\n  /*** ^^^^^--- DEADLOCK FOR FURTHER BROADCASTS IF THEY\n                HAPPEN TO GO INTO WAIT WHILE PREVIOUS\n                BROADCAST IS STILL IN PROGRESS/WAITING\n\nendif\n\nto the source code of pthread-win32 implementation:\n\nhttp://sources.redhat.com/cgi-bin/cvsweb.cgi/pthreads/\ncondvar.c?rev=1.36&content-type=text/\nx-cvsweb-markup&cvsroot=pthreads-win32\n\n  if (wereWaiters)\n    {(wereWaiters)sroot=pthreads-win32eb.cgi/pthreads/Yem...m\n      /*\n      * Wake up all waiters\n      */\n\nSleep( 1 ); //@AT\n\n#ifdef NEED_SEM\n\n      result = (ptw32_increase_semaphore( &cv->sema, cv->waiters )\n                 ? 0\n                : EINVAL);\n\n#else /* NEED_SEM */\n\n      result = (ReleaseSemaphore( cv->sema, cv->waiters, NULL )\n                 ? 0\n                : EINVAL);\n\n#endif /* NEED_SEM */\n\n    }\n\n  (void) pthread_mutex_unlock(&(cv->waitersLock));\n\n  if (wereWaiters && result == 0)\n    {(wereWaiters\n      /*\n       * Wait for all the awakened threads to acquire their part of\n       * the counting semaphore\n       */\n\n      if (WaitForSingleObject (cv->waitersDone, INFINITE)\n          == WAIT_OBJECT_0)\n        {\n          result = 0;\n        }\n      else\n        {\n          result = EINVAL;\n        }\n\n    }\n\n  return (result);\n\n}\n\nBTW, on my system (2 CPUs) I can manage to get\nthe program stalled even without any source code\nmodification if I run the tennisb program many\ntimes in different shell sessions.\n\n===================\npthread-win32 patch\n===================\nstruct pthread_cond_t_ {\n  long            nWaitersBlocked;   /* Number of threads blocked\n*/\n  long            nWaitersUnblocked; /* Number of threads unblocked\n*/\n  long            nWaitersToUnblock; /* Number of threads to unblock\n*/\n  sem_t           semBlockQueue;     /* Queue up threads waiting for the\n*/\n                                     /*   condition to become signalled\n*/\n  sem_t           semBlockLock;      /* Semaphore that guards access to\n*/\n                                     /* | waiters blocked count/block queue\n*/\n                                     /* +-> Mandatory Sync.LEVEL-1\n*/\n  pthread_mutex_t mtxUnblockLock;    /* Mutex that guards access to\n*/\n                                     /* | waiters (to)unblock(ed) counts\n*/\n                                     /* +-> Optional* Sync.LEVEL-2\n*/\n};                                   /* Opt*) for _timedwait and\ncancellation*/\n\nint\npthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr)\n  int result = EAGAIN;\n  pthread_cond_t cv = NULL;\n\n  if (cond == NULL)\n    {(cond\n      return EINVAL;\n    }\n\n  if ((attr != NULL && *attr != NULL) &&\n      ((*attr)->pshared == PTHREAD_PROCESS_SHARED))\n    {\n      /*\n       * Creating condition variable that can be shared between\n       * processes.\n       */\n      result = ENOSYS;\n\n      goto FAIL0;\n    }\n\n  cv = (pthread_cond_t) calloc (1, sizeof (*cv));\n\n  if (cv == NULL)\n    {(cv\n      result = ENOMEM;\n      goto FAIL0;\n    }\n\n  cv->nWaitersBlocked   = 0;\n  cv->nWaitersUnblocked = 0;\n  cv->nWaitersToUnblock = 0;\n\n  if (sem_init (&(cv->semBlockLock), 0, 1) != 0)\n    {(sem_init\n      goto FAIL0;\n    }\n\n  if (sem_init (&(cv->semBlockQueue), 0, 0) != 0)\n    {(sem_init\n      goto FAIL1;\n    }\n\n  if (pthread_mutex_init (&(cv->mtxUnblockLock), 0) != 0)\n    {(pthread_mutex_init\n      goto FAIL2;\n    }\n\n\n  result = 0;\n\n  goto DONE;\n\n  /*\n   * -------------\n   * Failed...\n   * -------------\n   */\nFAIL2:\n  (void) sem_destroy (&(cv->semBlockQueue));\n\nFAIL1:\n  (void) sem_destroy (&(cv->semBlockLock));\n\nFAIL0:\nDONE:\n  *cond = cv;\n\n  return (result);\n\n}                               /* pthread_cond_init */\n\nint\npthread_cond_destroy (pthread_cond_t * cond)\n{\n  int result = 0;\n  pthread_cond_t cv;\n\n  /*\n   * Assuming any race condition here is harmless.\n   */\n  if (cond == NULL\n      || *cond == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (*cond != (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)\n    {(*cond\n      cv = *cond;\n\n      /*\n       * Synchronize access to waiters blocked count (LEVEL-1)\n       */\n      if (sem_wait(&(cv->semBlockLock)) != 0)\n        {(sem_wait(&(cv->semBlockLock))\n          return errno;\n        }\n\n      /*\n       * Synchronize access to waiters (to)unblock(ed) counts (LEVEL-2)\n       */\n      if ((result = pthread_mutex_lock(&(cv->mtxUnblockLock))) != 0)\n        {((result\n          (void) sem_post(&(cv->semBlockLock));\n          return result;\n        }\n\n      /*\n       * Check whether cv is still busy (still has waiters blocked)\n       */\n      if (cv->nWaitersBlocked - cv->nWaitersUnblocked > 0)\n        {(cv->nWaitersBlocked\n          (void) sem_post(&(cv->semBlockLock));\n          (void) pthread_mutex_unlock(&(cv->mtxUnblockLock));\n          return EBUSY;\n        }\n\n      /*\n       * Now it is safe to destroy\n       */\n      (void) sem_destroy (&(cv->semBlockLock));\n      (void) sem_destroy (&(cv->semBlockQueue));\n      (void) pthread_mutex_unlock (&(cv->mtxUnblockLock));\n      (void) pthread_mutex_destroy (&(cv->mtxUnblockLock));\n\n      free(cv);\n      *cond = NULL;\n    }\n  else\n    {\n      /*\n       * See notes in ptw32_cond_check_need_init() above also.\n       */\n      EnterCriticalSection(&ptw32_cond_test_init_lock);\n\n      /*\n       * Check again.\n       */\n      if (*cond == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)\n        {(*cond\n          /*\n           * This is all we need to do to destroy a statically\n           * initialised cond that has not yet been used (initialised).\n           * If we get to here, another thread\n           * waiting to initialise this cond will get an EINVAL.\n           */\n          *cond = NULL;\n        }\n      else\n        {\n          /*\n           * The cv has been initialised while we were waiting\n           * so assume it's in use.\n           */\n          result = EBUSY;\n        }\n\n      LeaveCriticalSection(&ptw32_cond_test_init_lock);\n    }\n\n  return (result);\n}\n\n/*\n * Arguments for cond_wait_cleanup, since we can only pass a\n * single void * to it.\n */\ntypedef struct {\n  pthread_mutex_t * mutexPtr;\n  pthread_cond_t cv;\n  int * resultPtr;\n} ptw32_cond_wait_cleanup_args_t;\n\nstatic void\nptw32_cond_wait_cleanup(void * args)\n{\n  ptw32_cond_wait_cleanup_args_t * cleanup_args =\n(ptw32_cond_wait_cleanup_args_t *) args;\n  pthread_cond_t cv = cleanup_args->cv;\n  int * resultPtr = cleanup_args->resultPtr;\n  int eLastSignal; /* enum: 1=yes 0=no -1=cancelled/timedout w/o signal(s)\n*/\n  int result;\n\n  /*\n   * Whether we got here as a result of signal/broadcast or because of\n   * timeout on wait or thread cancellation we indicate that we are no\n   * longer waiting. The waiter is responsible for adjusting waiters\n   * (to)unblock(ed) counts (protected by unblock lock).\n   * Unblock lock/Sync.LEVEL-2 supports _timedwait and cancellation.\n   */\n  if ((result = pthread_mutex_lock(&(cv->mtxUnblockLock))) != 0)\n    {((result\n      *resultPtr = result;\n      return;\n    }\n\n  cv->nWaitersUnblocked++;\n\n  eLastSignal = (cv->nWaitersToUnblock == 0) ?\n                   -1 : (--cv->nWaitersToUnblock == 0);\n\n  /*\n   * No more LEVEL-2 access to waiters (to)unblock(ed) counts needed\n   */\n  if ((result = pthread_mutex_unlock(&(cv->mtxUnblockLock))) != 0)\n    {((result\n      *resultPtr = result;\n      return;\n    }\n\n  /*\n   * If last signal...\n   */\n  if (eLastSignal == 1)\n    {(eLastSignal\n     /*\n      * ...it means that we have end of 'atomic' signal/broadcast\n      */\n      if (sem_post(&(cv->semBlockLock)) != 0)\n        {(sem_post(&(cv->semBlockLock))\n          *resultPtr = errno;\n          return;\n        }\n    }\n  /*\n   * If not last signal and not timed out/cancelled wait w/o signal...\n   */\n  else if (eLastSignal == 0)\n    {\n     /*\n      * ...it means that next waiter can go through semaphore\n      */\n      if (sem_post(&(cv->semBlockQueue)) != 0)\n        {(sem_post(&(cv->semBlockQueue))\n          *resultPtr = errno;\n          return;\n        }\n    }\n\n  /*\n   * XSH: Upon successful return, the mutex has been locked and is owned\n   * by the calling thread\n   */\n  if ((result = pthread_mutex_lock(cleanup_args->mutexPtr)) != 0)\n    {((result\n      *resultPtr = result;\n    }\n\n}                               /* ptw32_cond_wait_cleanup */\n\nstatic int\nptw32_cond_timedwait (pthread_cond_t * cond,\n                      pthread_mutex_t * mutex,\n                      const struct timespec *abstime)\n{\n  int result = 0;\n  pthread_cond_t cv;\n  ptw32_cond_wait_cleanup_args_t cleanup_args;\n\n  if (cond == NULL || *cond == NULL)\n    {(cond\n      return EINVAL;\n    }\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static condition variable. We check\n   * again inside the guarded section of ptw32_cond_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*cond == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)\n    {(*cond\n      result = ptw32_cond_check_need_init(cond);\n    }\n\n  if (result != 0 && result != EBUSY)\n    {(result\n      return result;\n    }\n\n  cv = *cond;\n\n  /*\n   * Synchronize access to waiters blocked count (LEVEL-1)\n   */\n  if (sem_wait(&(cv->semBlockLock)) != 0)\n    {(sem_wait(&(cv->semBlockLock))\n      return errno;\n    }\n\n  cv->nWaitersBlocked++;\n\n  /*\n   * Thats it. Counted means waiting, no more access needed\n   */\n  if (sem_post(&(cv->semBlockLock)) != 0)\n    {(sem_post(&(cv->semBlockLock))\n      return errno;\n    }\n\n  /*\n   * Setup this waiter cleanup handler\n   */\n  cleanup_args.mutexPtr = mutex;\n  cleanup_args.cv = cv;\n  cleanup_args.resultPtr = &result;\n\n  pthread_cleanup_push (ptw32_cond_wait_cleanup, (void *) &cleanup_args);\n\n  /*\n   * Now we can release 'mutex' and...\n   */\n  if ((result = pthread_mutex_unlock (mutex)) == 0)\n    {((result\n\n      /*\n       * ...wait to be awakened by\n       *              pthread_cond_signal, or\n       *              pthread_cond_broadcast, or\n       *              timeout, or\n       *              thread cancellation\n       *\n       * Note:\n       *\n       *      ptw32_sem_timedwait is a cancellation point,\n       *      hence providing the mechanism for making\n       *      pthread_cond_wait a cancellation point.\n       *      We use the cleanup mechanism to ensure we\n       *      re-lock the mutex and adjust (to)unblock(ed) waiters\n       *      counts if we are cancelled, timed out or signalled.\n       */\n      if (ptw32_sem_timedwait (&(cv->semBlockQueue), abstime) != 0)\n        {(ptw32_sem_timedwait\n          result = errno;\n        }\n    }\n\n  /*\n   * Always cleanup\n   */\n  pthread_cleanup_pop (1);\n\n\n  /*\n   * \"result\" can be modified by the cleanup handler.\n   */\n  return (result);\n\n}                               /* ptw32_cond_timedwait */\n\n\nstatic int\nptw32_cond_unblock (pthread_cond_t * cond,\n                    int unblockAll)\n{\n  int result;\n  pthread_cond_t cv;\n\n  if (cond == NULL || *cond == NULL)\n    {(cond\n      return EINVAL;\n    }\n\n  cv = *cond;\n\n  /*\n   * No-op if the CV is static and hasn't been initialised yet.\n   * Assuming that any race condition is harmless.\n   */\n  if (cv == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)\n    {(cv\n      return 0;\n    }\n\n  /*\n   * Synchronize access to waiters blocked count (LEVEL-1)\n   */\n  if (sem_wait(&(cv->semBlockLock)) != 0)\n    {(sem_wait(&(cv->semBlockLock))\n      return errno;\n    }\n\n  /*\n   * Synchronize access to waiters (to)unblock(ed) counts (LEVEL-2)\n   * This sync.level supports _timedwait and cancellation\n   */\n  if ((result = pthread_mutex_lock(&(cv->mtxUnblockLock))) != 0)\n    {((result\n      return result;\n    }\n\n  /*\n   * Adjust waiters blocked and unblocked counts (collect garbage)\n   */\n  if (cv->nWaitersUnblocked != 0)\n    {(cv->nWaitersUnblocked\n      cv->nWaitersBlocked  -= cv->nWaitersUnblocked;\n      cv->nWaitersUnblocked = 0;\n    }\n\n  /*\n   * If (after adjustment) there are still some waiters blocked counted...\n   */\n  if ( cv->nWaitersBlocked > 0)\n    {(\n      /*\n       * We will unblock first waiter and leave semBlockLock/LEVEL-1 locked\n       * LEVEL-1 access is left disabled until last signal/unblock\ncompletes\n       */\n      cv->nWaitersToUnblock = (unblockAll) ? cv->nWaitersBlocked : 1;\n\n      /*\n       * No more LEVEL-2 access to waiters (to)unblock(ed) counts needed\n       * This sync.level supports _timedwait and cancellation\n       */\n      if ((result = pthread_mutex_unlock(&(cv->mtxUnblockLock))) != 0)\n        {((result\n          return result;\n        }\n\n\n      /*\n       * Now, with LEVEL-2 lock released let first waiter go through\nsemaphore\n       */\n      if (sem_post(&(cv->semBlockQueue)) != 0)\n        {(sem_post(&(cv->semBlockQueue))\n          return errno;\n        }\n    }\n  /*\n   * No waiter blocked - no more LEVEL-1 access to blocked count needed...\n   */\n  else if (sem_post(&(cv->semBlockLock)) != 0)\n    {\n      return errno;\n    }\n  /*\n   * ...and no more LEVEL-2 access to waiters (to)unblock(ed) counts needed\ntoo\n   * This sync.level supports _timedwait and cancellation\n   */\n  else\n    {\n      result = pthread_mutex_unlock(&(cv->mtxUnblockLock));\n    }\n\n  return(result);\n\n}                               /* ptw32_cond_unblock */\n\nint\npthread_cond_wait (pthread_cond_t * cond,\n                   pthread_mutex_t * mutex)\n{\n  /* The NULL abstime arg means INFINITE waiting. */\n  return(ptw32_cond_timedwait(cond, mutex, NULL));\n}                               /* pthread_cond_wait */\n\n\nint\npthread_cond_timedwait (pthread_cond_t * cond,\n                        pthread_mutex_t * mutex,\n                        const struct timespec *abstime)\n{\n  if (abstime == NULL)\n    {(abstime\n      return EINVAL;\n    }\n\n  return(ptw32_cond_timedwait(cond, mutex, abstime));\n}                               /* pthread_cond_timedwait */\n\n\nint\npthread_cond_signal (pthread_cond_t * cond)\n{\n  /* The '0'(FALSE) unblockAll arg means unblock ONE waiter. */\n  return(ptw32_cond_unblock(cond, 0));\n}                               /* pthread_cond_signal */\n\nint\npthread_cond_broadcast (pthread_cond_t * cond)\n{\n  /* The '1'(TRUE) unblockAll arg means unblock ALL waiters. */\n  return(ptw32_cond_unblock(cond, 1));\n}                               /* pthread_cond_broadcast */\n\n\n\n\nTEREKHOV@de.ibm.com on 17.01.2001 01:00:57\n\nPlease respond to TEREKHOV@de.ibm.com\n\nTo:   pthreads-win32@sourceware.cygnus.com\ncc:   schmidt@uci.edu\nSubject:  win32 conditions: sem+counter+event = broadcast_deadlock +\n      spur.wakeup/unfairness/incorrectness ??\n\n\n\n\n\n\n\nHi,\n\nProblem 1: broadcast_deadlock\n\nIt seems that current implementation does not provide \"atomic\"\nbroadcasts. That may lead to \"nested\" broadcasts... and it seems\nthat nested case is not handled correctly -> producing a broadcast\nDEADLOCK as a result.\n\nScenario:\n\nN (>1) waiting threads W1..N are blocked (in _wait) on condition's\nsemaphore.\n\nThread B1 calls pthread_cond_broadcast, which results in \"releasing\" N\nW threads via incrementing semaphore counter by N (stored in\ncv->waiters) BUT cv->waiters counter does not change!! The caller\nthread B1 remains blocked on cv->waitersDone event (auto-reset!!) BUT\ncondition is not protected from starting another broadcast (when called\non another thread) while still waiting for the \"old\" broadcast to\ncomplete on thread B1.\n\nM (>=0, <N) W threads are fast enough to go thru their _wait call and\ndecrement cv->waiters counter.\n\nL (N-M) \"late\" waiter W threads are a) still blocked/not returned from\ntheir semaphore wait call or b) were preempted after sem_wait but before\nlock( &cv->waitersLock ) or c) are blocked on cv->waitersLock.\n\ncv->waiters is still > 0 (= L).\n\nAnother thread B2 (or some W thread from M group) calls\npthread_cond_broadcast and gains access to counter... neither a) nor b)\nprevent thread B2 in pthread_cond_broadcast from gaining access to\ncounter and starting another broadcast ( for c) - it depends on\ncv->waitersLock scheduling rules: FIFO=OK, PRTY=PROBLEM,... )\n\nThat call to pthread_cond_broadcast (on thread B2) will result in\nincrementing semaphore by cv->waiters (=L) which is INCORRECT (all\nW1..N were in fact already released by thread B1) and waiting on\n_auto-reset_ event cv->waitersDone which is DEADLY WRONG (produces a\ndeadlock)...\n\nAll late W1..L threads now have a chance to complete their _wait call.\nLast W_L thread sets an auto-reselt event cv->waitersDone which will\nrelease either B1 or B2 leaving one of B threads in a deadlock.\n\nProblem 2: spur.wakeup/unfairness/incorrectness\n\nIt seems that:\n\na) because of the same problem with counter which does not reflect the\nactual number of NOT RELEASED waiters, the signal call may increment\na semaphore counter w/o having a waiter blocked on it. That will result\nin (best case) spurious wake ups - performance degradation due to\nunnecessary context switches and predicate re-checks and (in worth case)\nunfairness/incorrectness problem - see b)\n\nb) neither signal nor broadcast prevent other threads - \"new waiters\"\n(and in the case of signal, the caller thread as well) from going into\n_wait and overtaking \"old\" waiters (already released but still not returned\nfrom sem_wait on condition's semaphore). Win semaphore just [API DOC]:\n\"Maintains a count between zero and some maximum value, limiting the number\nof threads that are simultaneously accessing a shared resource.\" Calling\nReleaseSemaphore does not imply (at least not documented) that on return\nfrom ReleaseSemaphore all waiters will in fact become released (returned\nfrom their Wait... call) and/or that new waiters calling Wait... afterwards\nwill become less importance. It is NOT documented to be an atomic release\nof\nwaiters... And even if it would be there is still a problem with a thread\nbeing preempted after Wait on semaphore and before Wait on cv->waitersLock\nand scheduling rules for cv->waitersLock itself\n(??WaitForMultipleObjects??)\nThat may result in unfairness/incorrectness problem as described\nfor SetEvent impl. in \"Strategies for Implementing POSIX Condition\nVariables\non Win32\": http://www.cs.wustl.edu/~schmidt/win32-cv-1.html\n\nUnfairness -- The semantics of the POSIX pthread_cond_broadcast function is\nto wake up all threads currently blocked in wait calls on the condition\nvariable. The awakened threads then compete for the external_mutex. To\nensure\nfairness, all of these threads should be released from their\npthread_cond_wait calls and allowed to recheck their condition expressions\nbefore other threads can successfully complete a wait on the condition\nvariable.\n\nUnfortunately, the SetEvent implementation above does not guarantee that\nall\nthreads sleeping on the condition variable when cond_broadcast is called\nwill\nacquire the external_mutex and check their condition expressions. Although\nthe Pthreads specification does not mandate this degree of fairness, the\nlack of fairness can cause starvation.\n\nTo illustrate the unfairness problem, imagine there are 2 threads, C1 and\nC2,\nthat are blocked in pthread_cond_wait on condition variable not_empty_ that\nis guarding a thread-safe message queue. Another thread, P1 then places two\nmessages onto the queue and calls pthread_cond_broadcast. If C1 returns\nfrom\npthread_cond_wait, dequeues and processes the message, and immediately\nwaits\nagain then it and only it may end up acquiring both messages. Thus, C2 will\nnever get a chance to dequeue a message and run.\n\nThe following illustrates the sequence of events:\n\n1.   Thread C1 attempts to dequeue and waits on CV non_empty_\n2.   Thread C2 attempts to dequeue and waits on CV non_empty_\n3.   Thread P1 enqueues 2 messages and broadcasts to CV not_empty_\n4.   Thread P1 exits\n5.   Thread C1 wakes up from CV not_empty_, dequeues a message and runs\n6.   Thread C1 waits again on CV not_empty_, immediately dequeues the 2nd\n        message and runs\n7.   Thread C1 exits\n8.   Thread C2 is the only thread left and blocks forever since\n        not_empty_ will never be signaled\n\nDepending on the algorithm being implemented, this lack of fairness may\nyield\nconcurrent programs that have subtle bugs. Of course, application\ndevelopers\nshould not rely on the fairness semantics of pthread_cond_broadcast.\nHowever,\nthere are many cases where fair implementations of condition variables can\nsimplify application code.\n\nIncorrectness -- A variation on the unfairness problem described above\noccurs\nwhen a third consumer thread, C3, is allowed to slip through even though it\nwas not waiting on condition variable not_empty_ when a broadcast occurred.\n\nTo illustrate this, we will use the same scenario as above: 2 threads, C1\nand\nC2, are blocked dequeuing messages from the message queue. Another thread,\nP1\nthen places two messages onto the queue and calls pthread_cond_broadcast.\nC1\nreturns from pthread_cond_wait, dequeues and processes the message. At this\ntime, C3 acquires the external_mutex, calls pthread_cond_wait and waits on\nthe events in WaitForMultipleObjects. Since C2 has not had a chance to run\nyet, the BROADCAST event is still signaled. C3 then returns from\nWaitForMultipleObjects, and dequeues and processes the message in the\nqueue.\nThus, C2 will never get a chance to dequeue a message and run.\n\nThe following illustrates the sequence of events:\n\n1.   Thread C1 attempts to dequeue and waits on CV non_empty_\n2.   Thread C2 attempts to dequeue and waits on CV non_empty_\n3.   Thread P1 enqueues 2 messages and broadcasts to CV not_empty_\n4.   Thread P1 exits\n5.   Thread C1 wakes up from CV not_empty_, dequeues a message and runs\n6.   Thread C1 exits\n7.   Thread C3 waits on CV not_empty_, immediately dequeues the 2nd\n        message and runs\n8.   Thread C3 exits\n9.   Thread C2 is the only thread left and blocks forever since\n        not_empty_ will never be signaled\n\nIn the above case, a thread that was not waiting on the condition variable\nwhen a broadcast occurred was allowed to proceed. This leads to incorrect\nsemantics for a condition variable.\n\n\nCOMMENTS???\n\nregards,\nalexander.\n\n-----------------------------------------------------------------------------\n\nSubject: RE: FYI/comp.programming.threads/Re: pthread_cond_*\n     implementation questions\nDate: Wed, 21 Feb 2001 11:54:47 +0100\nFrom: TEREKHOV@de.ibm.com\nTo: lthomas@arbitrade.com\nCC: rpj@ise.canberra.edu.au, Thomas Pfaff <tpfaff@gmx.net>,\n     Nanbor Wang <nanbor@cs.wustl.edu>\n\nHi Louis,\n\ngeneration number 8..\n\nhad some time to revisit timeouts/spurious wakeup problem..\nfound some bugs (in 7.b/c/d) and something to improve\n(7a - using IPC semaphores but it should speedup Win32\nversion as well).\n\nregards,\nalexander.\n\n---------- Algorithm 8a / IMPL_SEM,UNBLOCK_STRATEGY == UNBLOCK_ALL ------\ngiven:\nsemBlockLock - bin.semaphore\nsemBlockQueue - semaphore\nmtxExternal - mutex or CS\nmtxUnblockLock - mutex or CS\nnWaitersGone - int\nnWaitersBlocked - int\nnWaitersToUnblock - int\n\nwait( timeout ) {\n\n  [auto: register int result          ]     // error checking omitted\n  [auto: register int nSignalsWasLeft ]\n  [auto: register int nWaitersWasGone ]\n\n  sem_wait( semBlockLock );\n  nWaitersBlocked++;\n  sem_post( semBlockLock );\n\n  unlock( mtxExternal );\n  bTimedOut = sem_wait( semBlockQueue,timeout );\n\n  lock( mtxUnblockLock );\n  if ( 0 != (nSignalsWasLeft = nWaitersToUnblock) ) {\n    if ( bTimeout ) {                       // timeout (or canceled)\n      if ( 0 != nWaitersBlocked ) {\n        nWaitersBlocked--;\n      }\n      else {\n        nWaitersGone++;                     // count spurious wakeups\n      }\n    }\n    if ( 0 == --nWaitersToUnblock ) {\n      if ( 0 != nWaitersBlocked ) {\n        sem_post( semBlockLock );           // open the gate\n        nSignalsWasLeft = 0;                // do not open the gate below\nagain\n      }\n      else if ( 0 != (nWaitersWasGone = nWaitersGone) ) {\n        nWaitersGone = 0;\n      }\n    }\n  }\n  else if ( INT_MAX/2 == ++nWaitersGone ) { // timeout/canceled or spurious\nsemaphore :-)\n    sem_wait( semBlockLock );\n    nWaitersBlocked -= nWaitersGone;        // something is going on here -\ntest of timeouts? :-)\n    sem_post( semBlockLock );\n    nWaitersGone = 0;\n  }\n  unlock( mtxUnblockLock );\n\n  if ( 1 == nSignalsWasLeft ) {\n    if ( 0 != nWaitersWasGone ) {\n      // sem_adjust( -nWaitersWasGone );\n      while ( nWaitersWasGone-- ) {\n        sem_wait( semBlockLock );          // better now than spurious\nlater\n      }\n    }\n    sem_post( semBlockLock );              // open the gate\n  }\n\n  lock( mtxExternal );\n\n  return ( bTimedOut ) ? ETIMEOUT : 0;\n}\n\nsignal(bAll) {\n\n  [auto: register int result         ]\n  [auto: register int nSignalsToIssue]\n\n  lock( mtxUnblockLock );\n\n  if ( 0 != nWaitersToUnblock ) { // the gate is closed!!!\n    if ( 0 == nWaitersBlocked ) { // NO-OP\n      return unlock( mtxUnblockLock );\n    }\n    if (bAll) {\n      nWaitersToUnblock += nSignalsToIssue=nWaitersBlocked;\n      nWaitersBlocked = 0;\n    }\n    else {\n      nSignalsToIssue = 1;\n      nWaitersToUnblock++;\n      nWaitersBlocked--;\n    }\n  }\n  else if ( nWaitersBlocked > nWaitersGone ) { // HARMLESS RACE CONDITION!\n    sem_wait( semBlockLock ); // close the gate\n    if ( 0 != nWaitersGone ) {\n      nWaitersBlocked -= nWaitersGone;\n      nWaitersGone = 0;\n    }\n    if (bAll) {\n      nSignalsToIssue = nWaitersToUnblock = nWaitersBlocked;\n      nWaitersBlocked = 0;\n    }\n    else {\n      nSignalsToIssue = nWaitersToUnblock = 1;\n      nWaitersBlocked--;\n    }\n  }\n  else { // NO-OP\n    return unlock( mtxUnblockLock );\n  }\n\n  unlock( mtxUnblockLock );\n  sem_post( semBlockQueue,nSignalsToIssue );\n  return result;\n}\n\n---------- Algorithm 8b / IMPL_SEM,UNBLOCK_STRATEGY == UNBLOCK_ONEBYONE\n------\ngiven:\nsemBlockLock - bin.semaphore\nsemBlockQueue - bin.semaphore\nmtxExternal - mutex or CS\nmtxUnblockLock - mutex or CS\nnWaitersGone - int\nnWaitersBlocked - int\nnWaitersToUnblock - int\n\nwait( timeout ) {\n\n  [auto: register int result          ]     // error checking omitted\n  [auto: register int nWaitersWasGone ]\n  [auto: register int nSignalsWasLeft ]\n\n  sem_wait( semBlockLock );\n  nWaitersBlocked++;\n  sem_post( semBlockLock );\n\n  unlock( mtxExternal );\n  bTimedOut = sem_wait( semBlockQueue,timeout );\n\n  lock( mtxUnblockLock );\n  if ( 0 != (nSignalsWasLeft = nWaitersToUnblock) ) {\n    if ( bTimeout ) {                       // timeout (or canceled)\n      if ( 0 != nWaitersBlocked ) {\n        nWaitersBlocked--;\n        nSignalsWasLeft = 0;                // do not unblock next waiter\nbelow (already unblocked)\n      }\n      else {\n        nWaitersGone = 1;                   // spurious wakeup pending!!\n      }\n    }\n    if ( 0 == --nWaitersToUnblock &&\n      if ( 0 != nWaitersBlocked ) {\n        sem_post( semBlockLock );           // open the gate\n        nSignalsWasLeft = 0;                // do not open the gate below\nagain\n      }\n      else if ( 0 != (nWaitersWasGone = nWaitersGone) ) {\n        nWaitersGone = 0;\n      }\n    }\n  }\n  else if ( INT_MAX/2 == ++nWaitersGone ) { // timeout/canceled or spurious\nsemaphore :-)\n    sem_wait( semBlockLock );\n    nWaitersBlocked -= nWaitersGone;        // something is going on here -\ntest of timeouts? :-)\n    sem_post( semBlockLock );\n    nWaitersGone = 0;\n  }\n  unlock( mtxUnblockLock );\n\n  if ( 1 == nSignalsWasLeft ) {\n    if ( 0 != nWaitersWasGone ) {\n      // sem_adjust( -1 );\n      sem_wait( semBlockQueue );           // better now than spurious\nlater\n    }\n    sem_post( semBlockLock );              // open the gate\n  }\n  else if ( 0 != nSignalsWasLeft ) {\n    sem_post( semBlockQueue );             // unblock next waiter\n  }\n\n  lock( mtxExternal );\n\n  return ( bTimedOut ) ? ETIMEOUT : 0;\n}\n\nsignal(bAll) {\n\n  [auto: register int result ]\n\n  lock( mtxUnblockLock );\n\n  if ( 0 != nWaitersToUnblock ) { // the gate is closed!!!\n    if ( 0 == nWaitersBlocked ) { // NO-OP\n      return unlock( mtxUnblockLock );\n    }\n    if (bAll) {\n      nWaitersToUnblock += nWaitersBlocked;\n      nWaitersBlocked = 0;\n    }\n    else {\n      nWaitersToUnblock++;\n      nWaitersBlocked--;\n    }\n    unlock( mtxUnblockLock );\n  }\n  else if ( nWaitersBlocked > nWaitersGone ) { // HARMLESS RACE CONDITION!\n    sem_wait( semBlockLock ); // close the gate\n    if ( 0 != nWaitersGone ) {\n      nWaitersBlocked -= nWaitersGone;\n      nWaitersGone = 0;\n    }\n    if (bAll) {\n      nWaitersToUnblock = nWaitersBlocked;\n      nWaitersBlocked = 0;\n    }\n    else {\n      nWaitersToUnblock = 1;\n      nWaitersBlocked--;\n    }\n    unlock( mtxUnblockLock );\n    sem_post( semBlockQueue );\n  }\n  else { // NO-OP\n    unlock( mtxUnblockLock );\n  }\n\n  return result;\n}\n\n---------- Algorithm 8c / IMPL_EVENT,UNBLOCK_STRATEGY == UNBLOCK_ONEBYONE\n---------\ngiven:\nhevBlockLock - auto-reset event\nhevBlockQueue - auto-reset event\nmtxExternal - mutex or CS\nmtxUnblockLock - mutex or CS\nnWaitersGone - int\nnWaitersBlocked - int\nnWaitersToUnblock - int\n\nwait( timeout ) {\n\n  [auto: register int result          ]     // error checking omitted\n  [auto: register int nSignalsWasLeft ]\n  [auto: register int nWaitersWasGone ]\n\n  wait( hevBlockLock,INFINITE );\n  nWaitersBlocked++;\n  set_event( hevBlockLock );\n\n  unlock( mtxExternal );\n  bTimedOut = wait( hevBlockQueue,timeout );\n\n  lock( mtxUnblockLock );\n  if ( 0 != (SignalsWasLeft = nWaitersToUnblock) ) {\n    if ( bTimeout ) {                       // timeout (or canceled)\n      if ( 0 != nWaitersBlocked ) {\n        nWaitersBlocked--;\n        nSignalsWasLeft = 0;                // do not unblock next waiter\nbelow (already unblocked)\n      }\n      else {\n        nWaitersGone = 1;                   // spurious wakeup pending!!\n      }\n    }\n    if ( 0 == --nWaitersToUnblock )\n      if ( 0 != nWaitersBlocked ) {\n        set_event( hevBlockLock );          // open the gate\n        nSignalsWasLeft = 0;                // do not open the gate below\nagain\n      }\n      else if ( 0 != (nWaitersWasGone = nWaitersGone) ) {\n        nWaitersGone = 0;\n      }\n    }\n  }\n  else if ( INT_MAX/2 == ++nWaitersGone ) { // timeout/canceled or spurious\nevent :-)\n    wait( hevBlockLock,INFINITE );\n    nWaitersBlocked -= nWaitersGone;        // something is going on here -\ntest of timeouts? :-)\n    set_event( hevBlockLock );\n    nWaitersGone = 0;\n  }\n  unlock( mtxUnblockLock );\n\n  if ( 1 == nSignalsWasLeft ) {\n    if ( 0 != nWaitersWasGone ) {\n      reset_event( hevBlockQueue );         // better now than spurious\nlater\n    }\n    set_event( hevBlockLock );              // open the gate\n  }\n  else if ( 0 != nSignalsWasLeft ) {\n    set_event( hevBlockQueue );             // unblock next waiter\n  }\n\n  lock( mtxExternal );\n\n  return ( bTimedOut ) ? ETIMEOUT : 0;\n}\n\nsignal(bAll) {\n\n  [auto: register int result ]\n\n  lock( mtxUnblockLock );\n\n  if ( 0 != nWaitersToUnblock ) { // the gate is closed!!!\n    if ( 0 == nWaitersBlocked ) { // NO-OP\n      return unlock( mtxUnblockLock );\n    }\n    if (bAll) {\n      nWaitersToUnblock += nWaitersBlocked;\n      nWaitersBlocked = 0;\n    }\n    else {\n      nWaitersToUnblock++;\n      nWaitersBlocked--;\n    }\n    unlock( mtxUnblockLock );\n  }\n  else if ( nWaitersBlocked > nWaitersGone ) { // HARMLESS RACE CONDITION!\n    wait( hevBlockLock,INFINITE ); // close the gate\n    if ( 0 != nWaitersGone ) {\n      nWaitersBlocked -= nWaitersGone;\n      nWaitersGone = 0;\n    }\n    if (bAll) {\n      nWaitersToUnblock = nWaitersBlocked;\n      nWaitersBlocked = 0;\n    }\n    else {\n      nWaitersToUnblock = 1;\n      nWaitersBlocked--;\n    }\n    unlock( mtxUnblockLock );\n    set_event( hevBlockQueue );\n  }\n  else { // NO-OP\n    unlock( mtxUnblockLock );\n  }\n\n  return result;\n}\n\n---------- Algorithm 8d / IMPL_EVENT,UNBLOCK_STRATEGY == UNBLOCK_ALL ------\ngiven:\nhevBlockLock - auto-reset event\nhevBlockQueueS - auto-reset event  // for signals\nhevBlockQueueB - manual-reset even // for broadcasts\nmtxExternal - mutex or CS\nmtxUnblockLock - mutex or CS\neBroadcast - int                   // 0: no broadcast, 1: broadcast, 2:\nbroadcast after signal(s)\nnWaitersGone - int\nnWaitersBlocked - int\nnWaitersToUnblock - int\n\nwait( timeout ) {\n\n  [auto: register int result          ]     // error checking omitted\n  [auto: register int eWasBroadcast   ]\n  [auto: register int nSignalsWasLeft ]\n  [auto: register int nWaitersWasGone ]\n\n  wait( hevBlockLock,INFINITE );\n  nWaitersBlocked++;\n  set_event( hevBlockLock );\n\n  unlock( mtxExternal );\n  bTimedOut = waitformultiple( hevBlockQueueS,hevBlockQueueB,timeout,ONE );\n\n  lock( mtxUnblockLock );\n  if ( 0 != (SignalsWasLeft = nWaitersToUnblock) ) {\n    if ( bTimeout ) {                       // timeout (or canceled)\n      if ( 0 != nWaitersBlocked ) {\n        nWaitersBlocked--;\n        nSignalsWasLeft = 0;                // do not unblock next waiter\nbelow (already unblocked)\n      }\n      else if ( 1 != eBroadcast ) {\n        nWaitersGone = 1;\n      }\n    }\n    if ( 0 == --nWaitersToUnblock ) {\n      if ( 0 != nWaitersBlocked ) {\n        set_event( hevBlockLock );           // open the gate\n        nSignalsWasLeft = 0;                 // do not open the gate below\nagain\n      }\n      else {\n        if ( 0 != (eWasBroadcast = eBroadcast) ) {\n          eBroadcast = 0;\n        }\n        if ( 0 != (nWaitersWasGone = nWaitersGone ) {\n          nWaitersGone = 0;\n        }\n      }\n    }\n    else if ( 0 != eBroadcast ) {\n      nSignalsWasLeft = 0;                  // do not unblock next waiter\nbelow (already unblocked)\n    }\n  }\n  else if ( INT_MAX/2 == ++nWaitersGone ) { // timeout/canceled or spurious\nevent :-)\n    wait( hevBlockLock,INFINITE );\n    nWaitersBlocked -= nWaitersGone;        // something is going on here -\ntest of timeouts? :-)\n    set_event( hevBlockLock );\n    nWaitersGone = 0;\n  }\n  unlock( mtxUnblockLock );\n\n  if ( 1 == nSignalsWasLeft ) {\n    if ( 0 != eWasBroadcast ) {\n      reset_event( hevBlockQueueB );\n    }\n    if ( 0 != nWaitersWasGone ) {\n      reset_event( hevBlockQueueS );        // better now than spurious\nlater\n    }\n    set_event( hevBlockLock );              // open the gate\n  }\n  else if ( 0 != nSignalsWasLeft ) {\n    set_event( hevBlockQueueS );            // unblock next waiter\n  }\n\n  lock( mtxExternal );\n\n  return ( bTimedOut ) ? ETIMEOUT : 0;\n}\n\nsignal(bAll) {\n\n  [auto: register int    result        ]\n  [auto: register HANDLE hevBlockQueue ]\n\n  lock( mtxUnblockLock );\n\n  if ( 0 != nWaitersToUnblock ) { // the gate is closed!!!\n    if ( 0 == nWaitersBlocked ) { // NO-OP\n      return unlock( mtxUnblockLock );\n    }\n    if (bAll) {\n      nWaitersToUnblock += nWaitersBlocked;\n      nWaitersBlocked = 0;\n      eBroadcast = 2;\n      hevBlockQueue = hevBlockQueueB;\n    }\n    else {\n      nWaitersToUnblock++;\n      nWaitersBlocked--;\n      return unlock( mtxUnblockLock );\n    }\n  }\n  else if ( nWaitersBlocked > nWaitersGone ) { // HARMLESS RACE CONDITION!\n    wait( hevBlockLock,INFINITE ); // close the gate\n    if ( 0 != nWaitersGone ) {\n      nWaitersBlocked -= nWaitersGone;\n      nWaitersGone = 0;\n    }\n    if (bAll) {\n      nWaitersToUnblock = nWaitersBlocked;\n      nWaitersBlocked = 0;\n      eBroadcast = 1;\n      hevBlockQueue = hevBlockQueueB;\n    }\n    else {\n      nWaitersToUnblock = 1;\n      nWaitersBlocked--;\n      hevBlockQueue = hevBlockQueueS;\n    }\n  }\n  else { // NO-OP\n    return unlock( mtxUnblockLock );\n  }\n\n  unlock( mtxUnblockLock );\n  set_event( hevBlockQueue );\n  return result;\n}\n---------------------- Forwarded by Alexander Terekhov/Germany/IBM on\n02/21/2001 09:13 AM ---------------------------\n\nAlexander Terekhov\n02/20/2001 04:33 PM\n\nTo:   Louis Thomas <lthomas@arbitrade.com>\ncc:\n\nFrom: Alexander Terekhov/Germany/IBM@IBMDE\nSubject:  RE: FYI/comp.programming.threads/Re: pthread_cond_* implementatio\n      n questions\nImportance:    Normal\n\n>Sorry, gotta take a break and work on something else for a while.\n>Real work\n>calls, unfortunately. I'll get back to you in two or three days.\n\nok. no problem. here is some more stuff for pauses you might have\nin between :)\n\n---------- Algorithm 7d / IMPL_EVENT,UNBLOCK_STRATEGY == UNBLOCK_ALL ------\ngiven:\nhevBlockLock - auto-reset event\nhevBlockQueueS - auto-reset event  // for signals\nhevBlockQueueB - manual-reset even // for broadcasts\nmtxExternal - mutex or CS\nmtxUnblockLock - mutex or CS\nbBroadcast - int\nnWaitersGone - int\nnWaitersBlocked - int\nnWaitersToUnblock - int\n\nwait( timeout ) {\n\n  [auto: register int result          ]     // error checking omitted\n  [auto: register int bWasBroadcast   ]\n  [auto: register int nSignalsWasLeft ]\n\n  wait( hevBlockLock,INFINITE );\n  nWaitersBlocked++;\n  set_event( hevBlockLock );\n\n  unlock( mtxExternal );\n  bTimedOut = waitformultiple( hevBlockQueueS,hevBlockQueueB,timeout,ONE );\n\n  lock( mtxUnblockLock );\n  if ( 0 != (SignalsWasLeft = nWaitersToUnblock) ) {\n    if ( bTimeout ) {                       // timeout (or canceled)\n      if ( 0 != nWaitersBlocked ) {\n        nWaitersBlocked--;\n        nSignalsWasLeft = 0;                // do not unblock next waiter\nbelow (already unblocked)\n      }\n      else if ( !bBroadcast ) {\n        wait( hevBlockQueueS,INFINITE );    // better now than spurious\nlater\n      }\n    }\n    if ( 0 == --nWaitersToUnblock ) {\n      if ( 0 != nWaitersBlocked ) {\n        if ( bBroadcast ) {\n          reset_event( hevBlockQueueB );\n          bBroadcast = false;\n        }\n        set_event( hevBlockLock );           // open the gate\n        nSignalsWasLeft = 0;                 // do not open the gate below\nagain\n      }\n      else if ( false != (bWasBroadcast = bBroadcast) ) {\n        bBroadcast = false;\n      }\n    }\n    else {\n      bWasBroadcast = bBroadcast;\n    }\n  }\n  else if ( INT_MAX/2 == ++nWaitersGone ) { // timeout/canceled or spurious\nevent :-)\n    wait( hevBlockLock,INFINITE );\n    nWaitersBlocked -= nWaitersGone;        // something is going on here -\ntest of timeouts? :-)\n    set_event( hevBlockLock );\n    nWaitersGone = 0;\n  }\n  unlock( mtxUnblockLock );\n\n  if ( 1 == nSignalsWasLeft ) {\n    if ( bWasBroadcast ) {\n      reset_event( hevBlockQueueB );\n    }\n    set_event( hevBlockLock );              // open the gate\n  }\n  else if ( 0 != nSignalsWasLeft && !bWasBroadcast ) {\n    set_event( hevBlockQueueS );            // unblock next waiter\n  }\n\n  lock( mtxExternal );\n\n  return ( bTimedOut ) ? ETIMEOUT : 0;\n}\n\nsignal(bAll) {\n\n  [auto: register int    result        ]\n  [auto: register HANDLE hevBlockQueue ]\n\n  lock( mtxUnblockLock );\n\n  if ( 0 != nWaitersToUnblock ) { // the gate is closed!!!\n    if ( 0 == nWaitersBlocked ) { // NO-OP\n      return unlock( mtxUnblockLock );\n    }\n    if (bAll) {\n      nWaitersToUnblock += nWaitersBlocked;\n      nWaitersBlocked = 0;\n      bBroadcast = true;\n      hevBlockQueue = hevBlockQueueB;\n    }\n    else {\n      nWaitersToUnblock++;\n      nWaitersBlocked--;\n      return unlock( mtxUnblockLock );\n    }\n  }\n  else if ( nWaitersBlocked > nWaitersGone ) { // HARMLESS RACE CONDITION!\n    wait( hevBlockLock,INFINITE ); // close the gate\n    if ( 0 != nWaitersGone ) {\n      nWaitersBlocked -= nWaitersGone;\n      nWaitersGone = 0;\n    }\n    if (bAll) {\n      nWaitersToUnblock = nWaitersBlocked;\n      nWaitersBlocked = 0;\n      bBroadcast = true;\n      hevBlockQueue = hevBlockQueueB;\n    }\n    else {\n      nWaitersToUnblock = 1;\n      nWaitersBlocked--;\n      hevBlockQueue = hevBlockQueueS;\n    }\n  }\n  else { // NO-OP\n    return unlock( mtxUnblockLock );\n  }\n\n  unlock( mtxUnblockLock );\n  set_event( hevBlockQueue );\n  return result;\n}\n\n\n----------------------------------------------------------------------------\n\nSubject: RE: FYI/comp.programming.threads/Re: pthread_cond_* implementatio\n     n questions\nDate: Mon, 26 Feb 2001 22:20:12 -0600\nFrom: Louis Thomas <lthomas@arbitrade.com>\nTo: \"'TEREKHOV@de.ibm.com'\" <TEREKHOV@de.ibm.com>\nCC: rpj@ise.canberra.edu.au, Thomas Pfaff <tpfaff@gmx.net>,\n     Nanbor Wang\n     <nanbor@cs.wustl.edu>\n\nSorry all. Busy week.\n\n> this insures the fairness\n> which POSIX does not (e.g. two subsequent broadcasts - the gate does\ninsure\n> that first wave waiters will start the race for the mutex before waiters\n> from the second wave - Linux pthreads process/unblock both waves\n> concurrently...)\n\nI'm not sure how we are any more fair about this than Linux. We certainly\ndon't guarantee that the threads released by the first broadcast will get\nthe external mutex before the threads of the second wave. In fact, it is\npossible that those threads will never get the external mutex if there is\nenough contention for it.\n\n> e.g. i was thinking about implementation with a pool of\n> N semaphores/counters [...]\n\nI considered that too. The problem is as you mentioned in a). You really\nneed to assign threads to semaphores once you know how you want to wake them\nup, not when they first begin waiting which is the only time you can assign\nthem.\n\n> well, i am not quite sure that i've fully understood your scenario,\n\nHmm. Well, it think it's an important example, so I'll try again. First, we\nhave thread A which we KNOW is waiting on a condition. As soon as it becomes\nunblocked for any reason, we will know because it will set a flag. Since the\nflag is not set, we are 100% confident that thread A is waiting on the\ncondition. We have another thread, thread B, which has acquired the mutex\nand is about to wait on the condition. Thus it is pretty clear that at any\npoint, either just A is waiting, or A and B are waiting. Now thread C comes\nalong. C is about to do a broadcast on the condition. A broadcast is\nguaranteed to unblock all threads currently waiting on a condition, right?\nAgain, we said that either just A is waiting, or A and B are both waiting.\nSo, when C does its broadcast, depending upon whether B has started waiting\nor not, thread C will unblock A or unblock A and B. Either way, C must\nunblock A, right?\n\nNow, you said anything that happens is correct so long as a) \"a signal is\nnot lost between unlocking the mutex and waiting on the condition\" and b) \"a\nthread must not steal a signal it sent\", correct? Requirement b) is easy to\nsatisfy: in this scenario, thread C will never wait on the condition, so it\nwon't steal any signals.  Requirement a) is not hard either. The only way we\ncould fail to meet requirement a) in this scenario is if thread B was\nstarted waiting but didn't wake up because a signal was lost. This will not\nhappen.\n\nNow, here is what happens. Assume thread C beats thread B. Thread C looks to\nsee how many threads are waiting on the condition. Thread C sees just one\nthread, thread A, waiting. It does a broadcast waking up just one thread\nbecause just one thread is waiting. Next, before A can become unblocked,\nthread B begins waiting. Now there are two threads waiting, but only one\nwill be unblocked. Suppose B wins. B will become unblocked. A will not\nbecome unblocked, because C only unblocked one thread (sema_post cond, 1).\nSo at the end, B finishes and A remains blocked.\n\nWe have met both of your requirements, so by your rules, this is an\nacceptable outcome. However, I think that the spec says this is an\nunacceptable outcome! We know for certain that A was waiting and that C did\na broadcast, but A did not become unblocked! Yet, the spec says that a\nbroadcast wakes up all waiting threads. This did not happen. Do you agree\nthat this shows your rules are not strict enough?\n\n> and what about N2? :) this one does allow almost everything.\n\nDon't get me started about rule #2. I'll NEVER advocate an algorithm that\nuses rule 2 as an excuse to suck!\n\n> but it is done (decrement)under mutex protection - this is not a subject\n> of a race condition.\n\nYou are correct. My mistake.\n\n> i would remove \"_bTimedOut=false\".. after all, it was a real timeout..\n\nI disagree. A thread that can't successfully retract its waiter status can't\nreally have timed out. If a thread can't return without executing extra code\nto deal with the fact that someone tried to unblock it, I think it is a poor\nidea to pretend we\ndidn't realize someone was trying to signal us. After all, a signal is more\nimportant than a time out.\n\n> when nSignaled != 0, it is possible to update nWaiters (--) and do not\n> touch nGone\n\nI realize this, but I was thinking that writing it the other ways saves\nanother if statement.\n\n> adjust only if nGone != 0 and save one cache memory write - probably much\nslower than 'if'\n\nHmm. You are probably right.\n\n> well, in a strange (e.g. timeout test) program you may (theoretically)\n> have an overflow of nWaiters/nGone counters (with waiters repeatedly\ntiming\n> out and no signals at all).\n\nAlso true. Not only that, but you also have the possibility that one could\noverflow the number of waiters as well! However, considering the limit you\nhave chosen for nWaitersGone, I suppose it is unlikely that anyone would be\nable to get INT_MAX/2 threads waiting on a single condition. :)\n\nAnalysis of 8a:\n\nIt looks correct to me.\n\nWhat are IPC semaphores?\n\nIn the line where you state, \"else if ( nWaitersBlocked > nWaitersGone ) {\n// HARMLESS RACE CONDITION!\" there is no race condition for nWaitersGone\nbecause nWaitersGone is never modified without holding mtxUnblockLock. You\nare correct that there is a harmless race on nWaitersBlocked, which can\nincrease and make the condition become true just after we check it. If this\nhappens, we interpret it as the wait starting after the signal.\n\nI like your optimization of this. You could improve Alg. 6 as follows:\n---------- Algorithm 6b ----------\nsignal(bAll) {\n  _nSig=0\n  lock counters\n  // this is safe because nWaiting can only be decremented by a thread that\n  // owns counters and nGone can only be changed by a thread that owns\ncounters.\n  if (nWaiting>nGone) {\n    if (0==nSignaled) {\n      sema_wait gate // close gate if not already closed\n    }\n    if (nGone>0) {\n      nWaiting-=nGone\n      nGone=0\n    }\n    _nSig=bAll?nWaiting:1\n    nSignaled+=_nSig\n    nWaiting-=_nSig\n  }\n  unlock counters\n  if (0!=_nSig) {\n    sema_post queue, _nSig\n  }\n}\n---------- ---------- ----------\nI guess this wouldn't apply to Alg 8a because nWaitersGone changes meanings\ndepending upon whether the gate is open or closed.\n\nIn the loop \"while ( nWaitersWasGone-- ) {\" you do a sema_wait on\nsemBlockLock. Perhaps waiting on semBlockQueue would be a better idea.\n\nWhat have you gained by making the last thread to be signaled do the waits\nfor all the timed out threads, besides added complexity? It took me a long\ntime to figure out what your objective was with this, to realize you were\nusing nWaitersGone to mean two different things, and to verify that you\nhadn't introduced any bug by doing this. Even now I'm not 100% sure.\n\nWhat has all this playing about with nWaitersGone really gained us besides a\nlot of complexity (it is much harder to verify that this solution is\ncorrect), execution overhead (we now have a lot more if statements to\nevaluate), and space overhead (more space for the extra code, and another\ninteger in our data)? We did manage to save a lock/unlock pair in an\nuncommon case (when a time out occurs) at the above mentioned expenses in\nthe common cases.\n\nAs for 8b, c, and d, they look ok though I haven't studied them thoroughly.\nWhat would you use them for?\n\n    Later,\n        -Louis! :)\n\n-----------------------------------------------------------------------------\n\nSubject: RE: FYI/comp.programming.threads/Re: pthread_cond_* implementatio\n     n questions\nDate: Tue, 27 Feb 2001 15:51:28 +0100\nFrom: TEREKHOV@de.ibm.com\nTo: Louis Thomas <lthomas@arbitrade.com>\nCC: rpj@ise.canberra.edu.au, Thomas Pfaff <tpfaff@gmx.net>,\n     Nanbor Wang <nanbor@cs.wustl.edu>\n\nHi Louis,\n\n>> that first wave waiters will start the race for the mutex before waiters\n>> from the second wave - Linux pthreads process/unblock both waves\n>> concurrently...)\n>\n>I'm not sure how we are any more fair about this than Linux. We certainly\n>don't guarantee that the threads released by the first broadcast will get\n>the external mutex before the threads of the second wave. In fact, it is\n>possible that those threads will never get the external mutex if there is\n>enough contention for it.\n\ncorrect. but gate is nevertheless more fair than Linux because of the\nbarrier it establishes between two races (1st and 2nd wave waiters) for\nthe mutex which under 'normal' circumstances (e.g. all threads of equal\npriorities,..) will 'probably' result in fair behaviour with respect to\nmutex ownership.\n\n>> well, i am not quite sure that i've fully understood your scenario,\n>\n>Hmm. Well, it think it's an important example, so I'll try again. ...\n\nok. now i seem to understand this example. well, now it seems to me\nthat the only meaningful rule is just:\n\na) \"a signal is not lost between unlocking the mutex and waiting on the\ncondition\"\n\nand that the rule\n\nb) \"a thread must not steal a signal it sent\"\n\nis not needed at all because a thread which violates b) also violates a).\n\ni'll try to explain..\n\ni think that the most important thing is how POSIX defines waiter's\nvisibility:\n\n\"if another thread is able to acquire the mutex after the about-to-block\nthread\nhas released it, then a subsequent call to pthread_cond_signal() or\npthread_cond_broadcast() in that thread behaves as if it were issued after\nthe about-to-block thread has blocked. \"\n\nmy understanding is the following:\n\n1) there is no guarantees whatsoever with respect to whether\nsignal/broadcast\nwill actually unblock any 'waiter' if it is done w/o acquiring the mutex\nfirst\n(note that a thread may release it before signal/broadcast - it does not\nmatter).\n\n2) it is guaranteed that waiters become 'visible' - eligible for unblock as\nsoon\nas signalling thread acquires the mutex (but not before!!)\n\nso..\n\n>So, when C does its broadcast, depending upon whether B has started\nwaiting\n>or not, thread C will unblock A or unblock A and B. Either way, C must\n>unblock A, right?\n\nright. but only if C did acquire the mutex prior to broadcast (it may\nrelease it before broadcast as well).\n\nimplementation will violate waiters visibility rule (signal will become\nlost)\nif C will not unblock A.\n\n>Now, here is what happens. Assume thread C beats thread B. Thread C looks\nto\n>see how many threads are waiting on the condition. Thread C sees just one\n>thread, thread A, waiting. It does a broadcast waking up just one thread\n>because just one thread is waiting. Next, before A can become unblocked,\n>thread B begins waiting. Now there are two threads waiting, but only one\n>will be unblocked. Suppose B wins. B will become unblocked. A will not\n>become unblocked, because C only unblocked one thread (sema_post cond, 1).\n>So at the end, B finishes and A remains blocked.\n\nthread C did acquire the mutex (\"Thread C sees just one thread, thread A,\nwaiting\"). beginning from that moment it is guaranteed that subsequent\nbroadcast will unblock A. Otherwise we will have a lost signal with respect\nto A. I do think that it does not matter whether the signal was physically\n(completely) lost or was just stolen by another thread (B) - in both cases\nit was simply lost with respect to A.\n\n>..Do you agree that this shows your rules are not strict enough?\n\nprobably the opposite.. :-) i think that it shows that the only meaningful\nrule is\n\na) \"a signal is not lost between unlocking the mutex and waiting on the\ncondition\"\n\nwith clarification of waiters visibility as defined by POSIX above.\n\n>> i would remove \"_bTimedOut=false\".. after all, it was a real timeout..\n>\n>I disagree. A thread that can't successfully retract its waiter status\ncan't\n>really have timed out. If a thread can't return without executing extra\ncode\n>to deal with the fact that someone tried to unblock it, I think it is a\npoor\n>idea to pretend we\n>didn't realize someone was trying to signal us. After all, a signal is\nmore\n>important than a time out.\n\na) POSIX does allow timed out thread to consume a signal (cancelled is\nnot).\nb) ETIMEDOUT status just says that: \"The time specified by abstime to\npthread_cond_timedwait() has passed.\"\nc) it seem to me that hiding timeouts would violate \"The\npthread_cond_timedwait()\nfunction is the same as pthread_cond_wait() except that an error is\nreturned if\nthe absolute time specified by abstime passes (that is, system time equals\nor\nexceeds abstime) before the condition cond is signaled or broadcasted\"\nbecause\nthe abs. time did really pass before cond was signaled (waiter was\nreleased via semaphore). however, if it really matters, i could imaging\nthat we\ncan save an abs. time of signal/broadcast and compare it with timeout after\nunblock to find out whether it was a 'real' timeout or not. absent this\ncheck\ni do think that hiding timeouts would result in technical violation of\nspecification.. but i think that this check is not important and we can\nsimply\ntrust timeout error code provided by wait since we are not trying to make\n'hard' realtime implementation.\n\n>What are IPC semaphores?\n\n<sys/sem.h>\nint   semctl(int, int, int, ...);\nint   semget(key_t, int, int);\nint   semop(int, struct sembuf *, size_t);\n\nthey support adjustment of semaphore counter (semvalue)\nin one single call - imaging Win32 ReleaseSemaphore( hsem,-N )\n\n>In the line where you state, \"else if ( nWaitersBlocked > nWaitersGone ) {\n>// HARMLESS RACE CONDITION!\" there is no race condition for nWaitersGone\n>because nWaitersGone is never modified without holding mtxUnblockLock. You\n>are correct that there is a harmless race on nWaitersBlocked, which can\n>increase and make the condition become true just after we check it. If\nthis\n>happens, we interpret it as the wait starting after the signal.\n\nwell, the reason why i've asked on comp.programming.threads whether this\nrace\ncondition is harmless or not is that in order to be harmless it should not\nviolate the waiters visibility rule (see above). Fortunately, we increment\nthe counter under protection of external mutex.. so that any (signalling)\nthread which will acquire the mutex next, should see the updated counter\n(in signal) according to POSIX memory visibility rules and mutexes\n(memory barriers). But i am not so sure how it actually works on\nWin32/INTEL\nwhich does not explicitly define any memory visibility rules :(\n\n>I like your optimization of this. You could improve Alg. 6 as follows:\n>---------- Algorithm 6b ----------\n>signal(bAll) {\n>  _nSig=0\n>  lock counters\n>  // this is safe because nWaiting can only be decremented by a thread\nthat\n>  // owns counters and nGone can only be changed by a thread that owns\n>counters.\n>  if (nWaiting>nGone) {\n>    if (0==nSignaled) {\n>      sema_wait gate // close gate if not already closed\n>    }\n>    if (nGone>0) {\n>      nWaiting-=nGone\n>      nGone=0\n>    }\n>    _nSig=bAll?nWaiting:1\n>    nSignaled+=_nSig\n>    nWaiting-=_nSig\n>  }\n>  unlock counters\n>  if (0!=_nSig) {\n>    sema_post queue, _nSig\n>  }\n>}\n>---------- ---------- ----------\n>I guess this wouldn't apply to Alg 8a because nWaitersGone changes\nmeanings\n>depending upon whether the gate is open or closed.\n\nagree.\n\n>In the loop \"while ( nWaitersWasGone-- ) {\" you do a sema_wait on\n>semBlockLock. Perhaps waiting on semBlockQueue would be a better idea.\n\nyou are correct. my mistake.\n\n>What have you gained by making the last thread to be signaled do the waits\n>for all the timed out threads, besides added complexity? It took me a long\n>time to figure out what your objective was with this, to realize you were\n>using nWaitersGone to mean two different things, and to verify that you\n>hadn't introduced any bug by doing this. Even now I'm not 100% sure.\n>\n>What has all this playing about with nWaitersGone really gained us besides\na\n>lot of complexity (it is much harder to verify that this solution is\n>correct), execution overhead (we now have a lot more if statements to\n>evaluate), and space overhead (more space for the extra code, and another\n>integer in our data)? We did manage to save a lock/unlock pair in an\n>uncommon case (when a time out occurs) at the above mentioned expenses in\n>the common cases.\n\nwell, please consider the following:\n\n1) with multiple waiters unblocked (but some timed out) the trick with\ncounter\nseem to ensure potentially higher level of concurrency by not delaying\nmost of unblocked waiters for semaphore cleanup - only the last one\nwill be delayed but all others would already contend/acquire/release\nthe external mutex - the critical section protected by mtxUnblockLock is\nmade smaller (increment + couple of IFs is faster than system/kernel call)\nwhich i think is good in general. however, you are right, this is done\nat expense of 'normal' waiters..\n\n2) some semaphore APIs (e.g. POSIX IPC sems) do allow to adjust the\nsemaphore counter in one call => less system/kernel calls.. imagine:\n\nif ( 1 == nSignalsWasLeft ) {\n    if ( 0 != nWaitersWasGone ) {\n      ReleaseSemaphore( semBlockQueue,-nWaitersWasGone );  // better now\nthan spurious later\n    }\n    sem_post( semBlockLock );              // open the gate\n  }\n\n3) even on win32 a single thread doing multiple cleanup calls (to wait)\nwill probably result in faster execution (because of processor caching)\nthan multiple threads each doing a single call to wait.\n\n>As for 8b, c, and d, they look ok though I haven't studied them\nthoroughly.\n>What would you use them for?\n\n8b) for semaphores which do not allow to unblock multiple waiters\nin a single call to post/release (e.g. POSIX realtime semaphores -\n<semaphore.h>)\n\n8c/8d) for WinCE prior to 3.0 (WinCE 3.0 does have semaphores)\n\nok. so, which one is the 'final' algorithm(s) which we should use in\npthreads-win32??\n\nregards,\nalexander.\n\n----------------------------------------------------------------------------\n\nLouis Thomas <lthomas@arbitrade.com> on 02/27/2001 05:20:12 AM\n\nPlease respond to Louis Thomas <lthomas@arbitrade.com>\n\nTo:   Alexander Terekhov/Germany/IBM@IBMDE\ncc:   rpj@ise.canberra.edu.au, Thomas Pfaff <tpfaff@gmx.net>, Nanbor Wang\n      <nanbor@cs.wustl.edu>\nSubject:  RE: FYI/comp.programming.threads/Re: pthread_cond_* implementatio\n      n questions\n\nSorry all. Busy week.\n\n> this insures the fairness\n> which POSIX does not (e.g. two subsequent broadcasts - the gate does\ninsure\n> that first wave waiters will start the race for the mutex before waiters\n> from the second wave - Linux pthreads process/unblock both waves\n> concurrently...)\n\nI'm not sure how we are any more fair about this than Linux. We certainly\ndon't guarantee that the threads released by the first broadcast will get\nthe external mutex before the threads of the second wave. In fact, it is\npossible that those threads will never get the external mutex if there is\nenough contention for it.\n\n> e.g. i was thinking about implementation with a pool of\n> N semaphores/counters [...]\n\nI considered that too. The problem is as you mentioned in a). You really\nneed to assign threads to semaphores once you know how you want to wake\nthem\nup, not when they first begin waiting which is the only time you can assign\nthem.\n\n> well, i am not quite sure that i've fully understood your scenario,\n\nHmm. Well, it think it's an important example, so I'll try again. First, we\nhave thread A which we KNOW is waiting on a condition. As soon as it\nbecomes\nunblocked for any reason, we will know because it will set a flag. Since\nthe\nflag is not set, we are 100% confident that thread A is waiting on the\ncondition. We have another thread, thread B, which has acquired the mutex\nand is about to wait on the condition. Thus it is pretty clear that at any\npoint, either just A is waiting, or A and B are waiting. Now thread C comes\nalong. C is about to do a broadcast on the condition. A broadcast is\nguaranteed to unblock all threads currently waiting on a condition, right?\nAgain, we said that either just A is waiting, or A and B are both waiting.\nSo, when C does its broadcast, depending upon whether B has started waiting\nor not, thread C will unblock A or unblock A and B. Either way, C must\nunblock A, right?\n\nNow, you said anything that happens is correct so long as a) \"a signal is\nnot lost between unlocking the mutex and waiting on the condition\" and b)\n\"a\nthread must not steal a signal it sent\", correct? Requirement b) is easy to\nsatisfy: in this scenario, thread C will never wait on the condition, so it\nwon't steal any signals.  Requirement a) is not hard either. The only way\nwe\ncould fail to meet requirement a) in this scenario is if thread B was\nstarted waiting but didn't wake up because a signal was lost. This will not\nhappen.\n\nNow, here is what happens. Assume thread C beats thread B. Thread C looks\nto\nsee how many threads are waiting on the condition. Thread C sees just one\nthread, thread A, waiting. It does a broadcast waking up just one thread\nbecause just one thread is waiting. Next, before A can become unblocked,\nthread B begins waiting. Now there are two threads waiting, but only one\nwill be unblocked. Suppose B wins. B will become unblocked. A will not\nbecome unblocked, because C only unblocked one thread (sema_post cond, 1).\nSo at the end, B finishes and A remains blocked.\n\nWe have met both of your requirements, so by your rules, this is an\nacceptable outcome. However, I think that the spec says this is an\nunacceptable outcome! We know for certain that A was waiting and that C did\na broadcast, but A did not become unblocked! Yet, the spec says that a\nbroadcast wakes up all waiting threads. This did not happen. Do you agree\nthat this shows your rules are not strict enough?\n\n> and what about N2? :) this one does allow almost everything.\n\nDon't get me started about rule #2. I'll NEVER advocate an algorithm that\nuses rule 2 as an excuse to suck!\n\n> but it is done (decrement)under mutex protection - this is not a subject\n> of a race condition.\n\nYou are correct. My mistake.\n\n> i would remove \"_bTimedOut=false\".. after all, it was a real timeout..\n\nI disagree. A thread that can't successfully retract its waiter status\ncan't\nreally have timed out. If a thread can't return without executing extra\ncode\nto deal with the fact that someone tried to unblock it, I think it is a\npoor\nidea to pretend we\ndidn't realize someone was trying to signal us. After all, a signal is more\nimportant than a time out.\n\n> when nSignaled != 0, it is possible to update nWaiters (--) and do not\n> touch nGone\n\nI realize this, but I was thinking that writing it the other ways saves\nanother if statement.\n\n> adjust only if nGone != 0 and save one cache memory write - probably much\nslower than 'if'\n\nHmm. You are probably right.\n\n> well, in a strange (e.g. timeout test) program you may (theoretically)\n> have an overflow of nWaiters/nGone counters (with waiters repeatedly\ntiming\n> out and no signals at all).\n\nAlso true. Not only that, but you also have the possibility that one could\noverflow the number of waiters as well! However, considering the limit you\nhave chosen for nWaitersGone, I suppose it is unlikely that anyone would be\nable to get INT_MAX/2 threads waiting on a single condition. :)\n\nAnalysis of 8a:\n\nIt looks correct to me.\n\nWhat are IPC semaphores?\n\nIn the line where you state, \"else if ( nWaitersBlocked > nWaitersGone ) {\n// HARMLESS RACE CONDITION!\" there is no race condition for nWaitersGone\nbecause nWaitersGone is never modified without holding mtxUnblockLock. You\nare correct that there is a harmless race on nWaitersBlocked, which can\nincrease and make the condition become true just after we check it. If this\nhappens, we interpret it as the wait starting after the signal.\n\nI like your optimization of this. You could improve Alg. 6 as follows:\n---------- Algorithm 6b ----------\nsignal(bAll) {\n  _nSig=0\n  lock counters\n  // this is safe because nWaiting can only be decremented by a thread that\n  // owns counters and nGone can only be changed by a thread that owns\ncounters.\n  if (nWaiting>nGone) {\n    if (0==nSignaled) {\n      sema_wait gate // close gate if not already closed\n    }\n    if (nGone>0) {\n      nWaiting-=nGone\n      nGone=0\n    }\n    _nSig=bAll?nWaiting:1\n    nSignaled+=_nSig\n    nWaiting-=_nSig\n  }\n  unlock counters\n  if (0!=_nSig) {\n    sema_post queue, _nSig\n  }\n}\n---------- ---------- ----------\nI guess this wouldn't apply to Alg 8a because nWaitersGone changes meanings\ndepending upon whether the gate is open or closed.\n\nIn the loop \"while ( nWaitersWasGone-- ) {\" you do a sema_wait on\nsemBlockLock. Perhaps waiting on semBlockQueue would be a better idea.\n\nWhat have you gained by making the last thread to be signaled do the waits\nfor all the timed out threads, besides added complexity? It took me a long\ntime to figure out what your objective was with this, to realize you were\nusing nWaitersGone to mean two different things, and to verify that you\nhadn't introduced any bug by doing this. Even now I'm not 100% sure.\n\nWhat has all this playing about with nWaitersGone really gained us besides\na\nlot of complexity (it is much harder to verify that this solution is\ncorrect), execution overhead (we now have a lot more if statements to\nevaluate), and space overhead (more space for the extra code, and another\ninteger in our data)? We did manage to save a lock/unlock pair in an\nuncommon case (when a time out occurs) at the above mentioned expenses in\nthe common cases.\n\nAs for 8b, c, and d, they look ok though I haven't studied them thoroughly.\nWhat would you use them for?\n\n    Later,\n        -Louis! :)\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/README.NONPORTABLE",
    "content": "This file documents non-portable functions and other issues.\n\nNon-portable functions included in pthreads-win32\n-------------------------------------------------\n\nBOOL\npthread_win32_test_features_np(int mask)\n\n\tThis routine allows an application to check which\n\trun-time auto-detected features are available within\n\tthe library.\n\n\tThe possible features are:\n\n\t\tPTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE\n\t\t\tReturn TRUE if the native version of\n\t\t\tInterlockedCompareExchange() is being used.\n\t\tPTW32_ALERTABLE_ASYNC_CANCEL\n\t\t\tReturn TRUE is the QueueUserAPCEx package\n\t\t\tQUSEREX.DLL is available and the AlertDrv.sys\n\t\t\tdriver is loaded into Windows, providing\n\t\t\talertable (pre-emptive) asyncronous threads\n\t\t\tcancelation. If this feature returns FALSE\n\t\t\tthen the default async cancel scheme is in\n\t\t\tuse, which cannot cancel blocked threads.\n\n\tFeatures may be Or'ed into the mask parameter, in which case\n\tthe routine returns TRUE if any of the Or'ed features would\n\treturn TRUE. At this stage it doesn't make sense to Or features\n\tbut it may some day.\n\n\nvoid *\npthread_timechange_handler_np(void *)\n\n        To improve tolerance against operator or time service\n        initiated system clock changes.\n\n        This routine can be called by an application when it\n        receives a WM_TIMECHANGE message from the system. At\n        present it broadcasts all condition variables so that\n        waiting threads can wake up and re-evaluate their\n        conditions and restart their timed waits if required.\n\n        It has the same return type and argument type as a\n        thread routine so that it may be called directly\n        through pthread_create(), i.e. as a separate thread.\n\n        Parameters\n\n        Although a parameter must be supplied, it is ignored.\n        The value NULL can be used.\n\n        Return values\n\n        It can return an error EAGAIN to indicate that not\n        all condition variables were broadcast for some reason.\n        Otherwise, 0 is returned.\n\n        If run as a thread, the return value is returned\n        through pthread_join().\n\n        The return value should be cast to an integer.\n\n\nHANDLE\npthread_getw32threadhandle_np(pthread_t thread);\n\n\tReturns the win32 thread handle that the POSIX\n\tthread \"thread\" is running as.\n\n\tApplications can use the win32 handle to set\n\twin32 specific attributes of the thread.\n\n\nint\npthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind)\n\nint\npthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind)\n\n        These two routines are included for Linux compatibility\n        and are direct equivalents to the standard routines\n                pthread_mutexattr_settype\n                pthread_mutexattr_gettype\n\n        pthread_mutexattr_setkind_np accepts the following\n        mutex kinds:\n                PTHREAD_MUTEX_FAST_NP\n                PTHREAD_MUTEX_ERRORCHECK_NP\n                PTHREAD_MUTEX_RECURSIVE_NP\n\n        These are really just equivalent to (respectively):\n                PTHREAD_MUTEX_NORMAL\n                PTHREAD_MUTEX_ERRORCHECK\n                PTHREAD_MUTEX_RECURSIVE\n\nint\npthread_delay_np (const struct timespec *interval);\n\n        This routine causes a thread to delay execution for a specific period of time.\n        This period ends at the current time plus the specified interval. The routine\n        will not return before the end of the period is reached, but may return an\n        arbitrary amount of time after the period has gone by. This can be due to\n        system load, thread priorities, and system timer granularity.\n\n        Specifying an interval of zero (0) seconds and zero (0) nanoseconds is\n        allowed and can be used to force the thread to give up the processor or to\n        deliver a pending cancelation request.\n\n        This routine is a cancelation point.\n\n        The timespec structure contains the following two fields:\n\n                tv_sec is an integer number of seconds.\n                tv_nsec is an integer number of nanoseconds. \n\n        Return Values\n\n        If an error condition occurs, this routine returns an integer value\n        indicating the type of error. Possible return values are as follows:\n\n        0          Successful completion. \n        [EINVAL]   The value specified by interval is invalid. \n\nint\npthread_num_processors_np\n\n        This routine (found on HPUX systems) returns the number of processors\n        in the system. This implementation actually returns the number of\n        processors available to the process, which can be a lower number\n        than the system's number, depending on the process's affinity mask.\n\nBOOL\npthread_win32_process_attach_np (void);\n\nBOOL\npthread_win32_process_detach_np (void);\n\nBOOL\npthread_win32_thread_attach_np (void);\n\nBOOL\npthread_win32_thread_detach_np (void);\n\n\tThese functions contain the code normally run via dllMain\n\twhen the library is used as a dll but which need to be\n\tcalled explicitly by an application when the library\n\tis statically linked.\n\n\tYou will need to call pthread_win32_process_attach_np() before\n\tyou can call any pthread routines when statically linking.\n\tYou should call pthread_win32_process_detach_np() before\n\texiting your application to clean up.\n\n\tpthread_win32_thread_attach_np() is currently a no-op, but\n\tpthread_win32_thread_detach_np() is needed to clean up\n\tthe implicit pthread handle that is allocated to a Win32 thread if\n\tit calls certain pthreads routines. Call this routine when the\n\tWin32 thread exits.\n\n\tThese functions invariably return TRUE except for\n\tpthread_win32_process_attach_np() which will return FALSE\n\tif pthreads-win32 initialisation fails.\n\nint\npthreadCancelableWait (HANDLE waitHandle);\n\nint\npthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout);\n\n\tThese two functions provide hooks into the pthread_cancel\n\tmechanism that will allow you to wait on a Windows handle\n\tand make it a cancellation point. Both functions block\n\tuntil either the given w32 handle is signaled, or\n\tpthread_cancel has been called. It is implemented using\n\tWaitForMultipleObjects on 'waitHandle' and a manually\n\treset w32 event used to implement pthread_cancel.\n\n\nNon-portable issues\n-------------------\n\nThread priority\n\n\tPOSIX defines a single contiguous range of numbers that determine a\n\tthread's priority. Win32 defines priority classes and priority\n\tlevels relative to these classes. Classes are simply priority base\n\tlevels that the defined priority levels are relative to such that,\n\tchanging a process's priority class will change the priority of all\n\tof it's threads, while the threads retain the same relativity to each\n\tother.\n\n\tA Win32 system defines a single contiguous monotonic range of values\n\tthat define system priority levels, just like POSIX. However, Win32\n\trestricts individual threads to a subset of this range on a\n\tper-process basis.\n\n\tThe following table shows the base priority levels for combinations\n\tof priority class and priority value in Win32.\n\t\n\t Process Priority Class               Thread Priority Level\n\t -----------------------------------------------------------------\n\t 1 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_IDLE\n\t 1 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_IDLE\n\t 1 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_IDLE\n\t 1 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_IDLE\n\t 1 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_IDLE\n\t 2 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_LOWEST\n\t 3 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_BELOW_NORMAL\n\t 4 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_NORMAL\n\t 4 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_LOWEST\n\t 5 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_ABOVE_NORMAL\n\t 5 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_BELOW_NORMAL\n\t 5 Background NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_LOWEST\n\t 6 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_HIGHEST\n\t 6 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_NORMAL\n\t 6 Background NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_BELOW_NORMAL\n\t 7 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_ABOVE_NORMAL\n\t 7 Background NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_NORMAL\n\t 7 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_LOWEST\n \t 8 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_HIGHEST\n\t 8 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_ABOVE_NORMAL\n\t 8 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_BELOW_NORMAL\n\t 8 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_LOWEST\n\t 9 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_HIGHEST\n\t 9 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_NORMAL\n\t 9 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_BELOW_NORMAL\n\t10 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_ABOVE_NORMAL\n\t10 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_NORMAL\n\t11 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_HIGHEST\n\t11 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_ABOVE_NORMAL\n\t11 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_LOWEST\n\t12 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_HIGHEST\n\t12 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_BELOW_NORMAL\n\t13 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_NORMAL\n\t14 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_ABOVE_NORMAL\n\t15 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_HIGHEST\n\t15 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_TIME_CRITICAL\n\t15 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_TIME_CRITICAL\n\t15 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_TIME_CRITICAL\n\t15 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_TIME_CRITICAL\n\t15 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_TIME_CRITICAL\n\t16 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_IDLE\n\t17 REALTIME_PRIORITY_CLASS            -7\n\t18 REALTIME_PRIORITY_CLASS            -6\n\t19 REALTIME_PRIORITY_CLASS            -5\n\t20 REALTIME_PRIORITY_CLASS            -4\n\t21 REALTIME_PRIORITY_CLASS            -3\n\t22 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_LOWEST\n\t23 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_BELOW_NORMAL\n\t24 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_NORMAL\n\t25 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_ABOVE_NORMAL\n\t26 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_HIGHEST\n\t27 REALTIME_PRIORITY_CLASS             3\n\t28 REALTIME_PRIORITY_CLASS             4\n\t29 REALTIME_PRIORITY_CLASS             5\n\t30 REALTIME_PRIORITY_CLASS             6\n\t31 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_TIME_CRITICAL\n\t\n\tWindows NT:  Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported.\n\n\n\tAs you can see, the real priority levels available to any individual\n\tWin32 thread are non-contiguous.\n\n\tAn application using pthreads-win32 should not make assumptions about\n\tthe numbers used to represent thread priority levels, except that they\n\tare monotonic between the values returned by sched_get_priority_min()\n\tand sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make\n\tavailable a non-contiguous range of numbers between -15 and 15, while\n\tat least one version of WinCE (3.0) defines the minimum priority\n\t(THREAD_PRIORITY_LOWEST) as 5, and the maximum priority\n\t(THREAD_PRIORITY_HIGHEST) as 1.\n\n\tInternally, pthreads-win32 maps any priority levels between\n\tTHREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST,\n\tor between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to\n\tTHREAD_PRIORITY_HIGHEST. Currently, this also applies to\n\tREALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6\n\tare supported.\n\n\tIf it wishes, a Win32 application using pthreads-win32 can use the Win32\n\tdefined priority macros THREAD_PRIORITY_IDLE through\n\tTHREAD_PRIORITY_TIME_CRITICAL.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/README.Watcom",
    "content": "Watcom compiler notes\n=====================\n\nStatus\n------\nNot yet usable. Although the library builds under Watcom it\nsubstantially fails the test suite.\n\nThere is a working Wmakefile for wmake for the library build.\n\ninvoke as any of:\nwmake -f Wmakefile clean WC\nwmake -f Wmakefile clean WC-inlined\nwmake -f Wmakefile clean WCE\nwmake -f Wmakefile clean WCE-inlined\n\nThese build pthreadWC.dll and pthreadWCE.dll.\n\nThere is a working Wmakefile for wmake for the test suite.\n\ninvoke as any of:\nwmake -f Wmakefile clean WC\nwmake -f Wmakefile clean WCX\nwmake -f Wmakefile clean WCE\nwmake -f Wmakefile clean WC-bench\nwmake -f Wmakefile clean WCX-bench\nwmake -f Wmakefile clean WCE-bench\n\n\nCurrent known problems\n----------------------\n\nLibrary build:\nThe Watcom compiler uses a different default call convention to MS C or GNU C and so\napplications are not compatible with pthreadVC.dll etc using pre 2003-10-14 versions\nof pthread.h, sched.h, or semaphore.h. The cdecl attribute can be used on exposed\nfunction prototypes to force compatibility with MS C built DLLs.\n\nHowever, there appear to be other incompatibilities. Errno.h, for example, defines\ndifferent values for the standard C and POSIX errors to those defined by the MS C\nerrno.h. It may be that references to Watcom's threads compatible 'errno' do set\nand return translated numbers consistently, but I have not verified this.\n\nWatcom defines errno as a dereferenced pointer returned by the function\n_get_errno_ptr(). This is similar to both the MS and GNU C environments for\nmultithreaded use. However, the Watcom version appears to have a number of problems:\n\n- different threads return the same pointer value. Compare with the MS and GNU C\nversions which correctly return different values (since each thread must maintain\na thread specific errno value).\n\n- an errno value set within the DLL appears as zero in the application even though\nboth share the same thread.\n\nTherefore applications built using the Watcom compiler may need to use\na Watcom built version of the library (pthreadWC.dll). If this is the case, then\nthe cdecl function attribute should not be required.\n\nApplication builds:\nThe test suite fails with the Watcom compiler.\n\nTest semaphore1.c fails for pthreadWC.dll because errno returns 0 instead of EAGAIN.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/README.WinCE",
    "content": "WinCE port\n----------\n(See the file WinCE-PORT for a detailed explanation.)\n\nMake sure you define \"WINCE\" amongst your compiler flags (eg. -DWINCE).\nThe config.h file will define all the necessary defines for you.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/TODO",
    "content": "                   Things that aren't done yet\n                   ---------------------------\n\n1. Implement PTHREAD_PROCESS_SHARED for semaphores, mutexes,\n   condition variables, read/write locks, barriers.\n\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/WinCE-PORT",
    "content": "NOTE: The comments in this file relate to the original WinCE port\ndone by Tristan Savatier. The semaphore routines have been \ncompletely rewritten since (2005-04-25), having been progressively\nbroken more and more by changes to the library. All of the semaphore\nroutines implemented for W9x/WNT/2000 and up should now also work for\nWinCE. Also, pthread_mutex_timedlock should now work. [RPJ]\n\n----\n\nSome interesting news:\n\nI have been able to port pthread-win32 to Windows-CE,\nwhich uses a subset of the WIN32 API.\n\nSince we intend to keep using pthread-win32 for our\nCommercial WinCE developments, I would be very interested\nif WinCE support could be added to the main source tree\nof pthread-win32.  Also, I would like to be credited\nfor this port :-)\n\nNow, here is the story...\n\nThe port was performed and tested on a Casio \"Cassiopeia\"\nPalmSize PC, which runs a MIP processor.  The OS in the\nCasio is WinCE version 2.11, but I used VC++ 6.0 with\nthe WinCE SDK for version 2.01.\n\nI used pthread-win32 to port a heavily multithreaded\ncommercial application (real-time MPEG video player)\nfrom Linux to WinCE.  I consider the changes that\nI have done to be quite well tested.\n\nOverall the modifications that we had to do are minor.\n\nThe WinCE port were based on pthread-win32-snap-1999-05-30,\nbut I am certain that they can be integrated very easiely\nto more recent versions of the source.\n\nI have attached the modified source code:\npthread-win32-snap-1999-05-30-WinCE.\n\nAll the changes do not affect the code compiled on non-WinCE\nenvironment, provided that the macros used for WinCE compilation\nare not used, of course!\n\nOverall description of the WinCE port:\n-------------------------------------\n\nMost of the changes had to be made in areas where\npthread-win32 was relying on some standard-C librairies\n(e.g. _ftime, calloc, errno), which are not available\non WinCE. We have changed the code to use native Win32\nAPI instead (or in some cases we made wrappers).\n\nThe Win32 Semaphores are not available,\nso we had to re-implement Semaphores using mutexes\nand events.\n\nLimitations / known problems of the WinCE port:\n----------------------------------------------\n\nNot all the semaphore routines have been ported\n(semaphores are defined by Posix but are not part\npf pthread).  I have just done enough to make\npthread routines (that rely internally on semaphores)\nwork, like signal conditions.\n\nI noticed that the Win32 threads work slightly\ndifferently on WinCE.  This may have some impact\non some tricky parts of pthread-win32, but I have\nnot really investigated.  For example, on WinCE,\nthe process is killed if the main thread falls off\nthe bottom (or calls pthread_exit), regardless\nof the existence of any other detached thread.\nMicrosoft manual indicates that this behavior is\ndeffirent from that of Windows Threads for other\nWin32 platforms.\n\n\nDetailed descriptions of the changes and rationals:\n\n------------------------------------\n- use a new macro NEED_ERRNO.\n\nIf defined, the code in errno.c that defines a reentrant errno\nis compiled, regardless of _MT and _REENTRANT.\n\nRational: On WinCE, there is no support for <stdio.h>, <errno.h> or\nany other standard C library, i.e. even if _MT or _REENTRANT\nis defined, errno is not provided by any library.  NEED_ERRNO\nmust be set to compile for WinCE.\n\n------------------------------------\n- In implement.h, change #include <semaphore.h> to #include \"semaphore.h\".\n\nRational: semaphore.h is provided in pthread-win32 and should not\nbe searched in the systems standard include.  would not compile.\nThis change does not seem to create problems on \"classic\" win32\n(e.g. win95).\n\n------------------------------------\n- use a new macro NEED_CALLOC.\n\nIf defined, some code in misc.c will provide a replacement\nfor calloc, which is not available on Win32.\n\n\n------------------------------------\n- use a new macro NEED_CREATETHREAD.\n\nIf defined, implement.h defines the macro _beginthreadex\nand _endthreadex.\n\nRational: On WinCE, the wrappers _beginthreadex and _endthreadex\ndo not exist. The native Win32 routines must be used.\n\n------------------------------------\n- in misc.c:\n\n#ifdef NEED_DUPLICATEHANDLE\n\t  /* DuplicateHandle does not exist on WinCE */\n\t  self->threadH = GetCurrentThread();\n#else\n\t  if( !DuplicateHandle(\n\t\t\t       GetCurrentProcess(),\n\t\t\t       GetCurrentThread(),\n\t\t\t       GetCurrentProcess(),\n\t\t\t       &self->threadH,\n\t\t\t       0,\n\t\t\t       FALSE,\n\t\t\t       DUPLICATE_SAME_ACCESS ) )\n\t    {\n\t      free( self );\n\t      return (NULL);\n\t    }\n#endif\n\nRational: On WinCE, DuplicateHandle does not exist.  I could not understand\nwhy DuplicateHandle must be used.  It seems to me that getting the current\nthread handle with GetCurrentThread() is sufficient, and it seems to work\nperfectly fine, so maybe DuplicateHandle was just plain useless to begin with ?\n\n------------------------------------\n- In private.c, added some code at the beginning of ptw32_processInitialize\nto detect the case of multiple calls to ptw32_processInitialize.\n\nRational: In order to debug pthread-win32, it is easier to compile\nit as a regular library (it is not possible to debug DLL's on winCE).\nIn that case, the application must call ptw32_rocessInitialize()\nexplicitely, to initialize pthread-win32.  It is safer in this circumstance\nto handle the case where ptw32_processInitialize() is called on\nan already initialized library:\n\nint\nptw32_processInitialize (void)\n{\n\tif (ptw32_processInitialized) {\n\t\t/* \n\t\t * ignore if already initialized. this is useful for \n\t\t * programs that uses a non-dll pthread\n\t\t * library. such programs must call ptw32_processInitialize() explicitely,\n\t\t * since this initialization routine is automatically called only when\n\t\t * the dll is loaded.\n\t\t */\n\t\treturn TRUE;\n\t}\n    ptw32_processInitialized = TRUE;\n  \t[...]\n}\n\n------------------------------------\n- in private.c, if macro NEED_FTIME is defined, add routines to\nconvert timespec_to_filetime and filetime_to_timespec, and modified\ncode that was using _ftime() to use Win32 API instead.\n\nRational: _ftime is not available on WinCE.  It is necessary to use\nthe native Win32 time API instead.\n\nNote: the routine timespec_to_filetime is provided as a convenience and a mean\nto test that filetime_to_timespec works, but it is not used by the library.\n\n------------------------------------\n- in semaphore.c, if macro NEED_SEM is defined, add code for the routines\n_increase_semaphore and _decrease_semaphore, and modify significantly\nthe implementation of the semaphores so that it does not use CreateSemaphore.\n\nRational: CreateSemaphore is not available on WinCE.  I had to re-implement\nsemaphores using mutexes and Events.\n\nNote: Only the semaphore routines that are used by pthread are implemented\n(i.e. signal conditions rely on a subset of the semaphores routines, and\nthis subset works). Some other semaphore routines (e.g. sem_trywait) are\nnot yet supported on my WinCE port (and since I don't need them, I am not\nplanning to do anything about them).\n\n------------------------------------\n- in tsd.c, changed the code that defines TLS_OUT_OF_INDEXES\n\n/* TLS_OUT_OF_INDEXES not defined on WinCE */\n#ifndef TLS_OUT_OF_INDEXES\n#define TLS_OUT_OF_INDEXES 0xffffffff\n#endif\n\nRational: TLS_OUT_OF_INDEXES is not defined in any standard include file\non WinCE.\n\n------------------------------------\n- added file need_errno.h\n\nRational: On WinCE, there is no errno.h file. need_errno.h is just a\ncopy of windows version of errno.h, with minor modifications due to the fact\nthat some of the error codes are defined by the WinCE socket library.\nIn pthread.h, if NEED_ERRNO is defined, the file need_errno.h is\nincluded (instead of <errno.h>).\n\n\n-- eof\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/attr.c",
    "content": "/*\n * attr.c\n *\n * Description:\n * This translation unit agregates operations on thread attribute objects.\n * It is used for inline optimisation.\n *\n * The included modules are used separately when static executable sizes\n * must be minimised.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n#include \"pthread_attr_init.c\"\n#include \"pthread_attr_destroy.c\"\n#include \"pthread_attr_getdetachstate.c\"\n#include \"pthread_attr_setdetachstate.c\"\n#include \"pthread_attr_getstackaddr.c\"\n#include \"pthread_attr_setstackaddr.c\"\n#include \"pthread_attr_getstacksize.c\"\n#include \"pthread_attr_setstacksize.c\"\n#include \"pthread_attr_getscope.c\"\n#include \"pthread_attr_setscope.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/barrier.c",
    "content": "/*\n * barrier.c\n *\n * Description:\n * This translation unit implements barrier primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n#include \"pthread_barrier_init.c\"\n#include \"pthread_barrier_destroy.c\"\n#include \"pthread_barrier_wait.c\"\n#include \"pthread_barrierattr_init.c\"\n#include \"pthread_barrierattr_destroy.c\"\n#include \"pthread_barrierattr_getpshared.c\"\n#include \"pthread_barrierattr_setpshared.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/builddmc.bat",
    "content": "; Build the pthreads library with the Digital Mars Compiler\n;\nset DMCDIR=c:\\dm\n\n;   RELEASE\n%DMCDIR%\\bin\\dmc -D_WIN32_WINNT -D_MT -DHAVE_CONFIG_H -I.;c:\\dm\\include -o+all -WD pthread.c user32.lib+kernel32.lib+wsock32.lib -L/impl -L/NODEBUG -L/SU:WINDOWS\n\n;   DEBUG\n%DMCDIR%\\bin\\dmc -g -D_WIN32_WINNT -D_MT -DHAVE_CONFIG_H -I.;c:\\dm\\include -o+all -WD pthread.c user32.lib+kernel32.lib+wsock32.lib -L/impl -L/SU:WINDOWS\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/cancel.c",
    "content": "/*\n * cancel.c\n *\n * Description:\n * POSIX thread functions related to thread cancellation.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n#include \"pthread_setcancelstate.c\"\n#include \"pthread_setcanceltype.c\"\n#include \"pthread_testcancel.c\"\n#include \"pthread_cancel.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/cleanup.c",
    "content": "/*\n * cleanup.c\n *\n * Description:\n * This translation unit implements routines associated\n * with cleaning up threads.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n/*\n * The functions ptw32_pop_cleanup and ptw32_push_cleanup\n * are implemented here for applications written in C with no\n * SEH or C++ destructor support. \n */\n\nptw32_cleanup_t *\nptw32_pop_cleanup (int execute)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function pops the most recently pushed cleanup\n      *      handler. If execute is nonzero, then the cleanup handler\n      *      is executed if non-null.\n      *\n      * PARAMETERS\n      *      execute\n      *              if nonzero, execute the cleanup handler\n      *\n      *\n      * DESCRIPTION\n      *      This function pops the most recently pushed cleanup\n      *      handler. If execute is nonzero, then the cleanup handler\n      *      is executed if non-null.\n      *      NOTE: specify 'execute' as nonzero to avoid duplication\n      *                of common cleanup code.\n      *\n      * RESULTS\n      *              N/A\n      *\n      * ------------------------------------------------------\n      */\n{\n  ptw32_cleanup_t *cleanup;\n\n  cleanup = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey);\n\n  if (cleanup != NULL)\n    {\n      if (execute && (cleanup->routine != NULL))\n\t{\n\n\t  (*cleanup->routine) (cleanup->arg);\n\n\t}\n\n      pthread_setspecific (ptw32_cleanupKey, (void *) cleanup->prev);\n\n    }\n\n  return (cleanup);\n\n}\t\t\t\t/* ptw32_pop_cleanup */\n\n\nvoid\nptw32_push_cleanup (ptw32_cleanup_t * cleanup,\n\t\t    ptw32_cleanup_callback_t routine, void *arg)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function pushes a new cleanup handler onto the thread's stack\n      *      of cleanup handlers. Each cleanup handler pushed onto the stack is\n      *      popped and invoked with the argument 'arg' when\n      *              a) the thread exits by calling 'pthread_exit',\n      *              b) when the thread acts on a cancellation request,\n      *              c) or when the thread calls pthread_cleanup_pop with a nonzero\n      *                 'execute' argument\n      *\n      * PARAMETERS\n      *      cleanup\n      *              a pointer to an instance of pthread_cleanup_t,\n      *\n      *      routine\n      *              pointer to a cleanup handler,\n      *\n      *      arg\n      *              parameter to be passed to the cleanup handler\n      *\n      *\n      * DESCRIPTION\n      *      This function pushes a new cleanup handler onto the thread's stack\n      *      of cleanup handlers. Each cleanup handler pushed onto the stack is\n      *      popped and invoked with the argument 'arg' when\n      *              a) the thread exits by calling 'pthread_exit',\n      *              b) when the thread acts on a cancellation request,\n      *              c) or when the thrad calls pthread_cleanup_pop with a nonzero\n      *                 'execute' argument\n      *      NOTE: pthread_push_cleanup, ptw32_pop_cleanup must be paired\n      *                in the same lexical scope.\n      *\n      * RESULTS\n      *              pthread_cleanup_t *\n      *                              pointer to the previous cleanup\n      *\n      * ------------------------------------------------------\n      */\n{\n  cleanup->routine = routine;\n  cleanup->arg = arg;\n\n  cleanup->prev = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey);\n\n  pthread_setspecific (ptw32_cleanupKey, (void *) cleanup);\n\n}\t\t\t\t/* ptw32_push_cleanup */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/condvar.c",
    "content": "/*\n * condvar.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n#include \"ptw32_cond_check_need_init.c\"\n#include \"pthread_condattr_init.c\"\n#include \"pthread_condattr_destroy.c\"\n#include \"pthread_condattr_getpshared.c\"\n#include \"pthread_condattr_setpshared.c\"\n#include \"pthread_cond_init.c\"\n#include \"pthread_cond_destroy.c\"\n#include \"pthread_cond_wait.c\"\n#include \"pthread_cond_signal.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/config.h",
    "content": "/* config.h  */\n\n#ifndef PTW32_CONFIG_H\n#define PTW32_CONFIG_H\n\n/*********************************************************************\n * Defaults: see target specific redefinitions below.\n *********************************************************************/\n\n/* We're building the pthreads-win32 library */\n#define PTW32_BUILD\n\n/* Do we know about the C type sigset_t? */\n#undef HAVE_SIGSET_T\n\n/* Define if you have the <signal.h> header file.  */\n#undef HAVE_SIGNAL_H\n\n/* Define if you have the Borland TASM32 or compatible assembler.  */\n#undef HAVE_TASM32\n\n/* Define if you don't have Win32 DuplicateHandle. (eg. WinCE) */\n#undef NEED_DUPLICATEHANDLE\n\n/* Define if you don't have Win32 _beginthreadex. (eg. WinCE) */\n#undef NEED_CREATETHREAD\n\n/* Define if you don't have Win32 errno. (eg. WinCE) */\n#undef NEED_ERRNO\n\n/* Define if you don't have Win32 calloc. (eg. WinCE)  */\n#undef NEED_CALLOC\n\n/* Define if you don't have Win32 ftime. (eg. WinCE)  */\n#undef NEED_FTIME\n\n/* Define if you don't have Win32 semaphores. (eg. WinCE 2.1 or earlier)  */\n#undef NEED_SEM\n\n/* Define if you need to convert string parameters to unicode. (eg. WinCE)  */\n#undef NEED_UNICODE_CONSTS\n\n/* Define if your C (not C++) compiler supports \"inline\" functions. */\n#undef HAVE_C_INLINE\n\n/* Do we know about type mode_t? */\n#undef HAVE_MODE_T\n\n/* Define if you have the timespec struct */\n#undef HAVE_STRUCT_TIMESPEC\n\n/* Define if you don't have the GetProcessAffinityMask() */\n#undef NEED_PROCESS_AFFINITY_MASK\n\n/*\n# ----------------------------------------------------------------------\n# The library can be built with some alternative behaviour to better\n# facilitate development of applications on Win32 that will be ported\n# to other POSIX systems.\n#\n# Nothing described here will make the library non-compliant and strictly\n# compliant applications will not be affected in any way, but\n# applications that make assumptions that POSIX does not guarantee are\n# not strictly compliant and may fail or misbehave with some settings.\n#\n# PTW32_THREAD_ID_REUSE_INCREMENT\n# Purpose:\n# POSIX says that applications should assume that thread IDs can be\n# recycled. However, Solaris (and some other systems) use a [very large]\n# sequence number as the thread ID, which provides virtual uniqueness.\n# This provides a very high but finite level of safety for applications\n# that are not meticulous in tracking thread lifecycles e.g. applications\n# that call functions which target detached threads without some form of\n# thread exit synchronisation.\n#\n# Usage:\n# Set to any value in the range: 0 <= value < 2^wordsize.\n# Set to 0 to emulate reusable thread ID behaviour like Linux or *BSD.\n# Set to 1 for unique thread IDs like Solaris (this is the default).\n# Set to some factor of 2^wordsize to emulate smaller word size types\n# (i.e. will wrap sooner). This might be useful to emulate some embedded\n# systems.\n#\n# define PTW32_THREAD_ID_REUSE_INCREMENT 0\n#\n# ----------------------------------------------------------------------\n */\n#undef PTW32_THREAD_ID_REUSE_INCREMENT\n\n\n/*********************************************************************\n * Target specific groups\n *\n * If you find that these are incorrect or incomplete please report it\n * to the pthreads-win32 maintainer. Thanks.\n *********************************************************************/\n#ifdef WINCE\n#define NEED_DUPLICATEHANDLE\n#define NEED_CREATETHREAD\n#define NEED_ERRNO\n#define NEED_CALLOC\n#define NEED_FTIME\n//#define NEED_SEM\n#define NEED_UNICODE_CONSTS\n#define NEED_PROCESS_AFFINITY_MASK\n#endif\n\n#ifdef _UWIN\n#define HAVE_MODE_T\n#define HAVE_STRUCT_TIMESPEC\n#endif\n\n#ifdef __GNUC__\n#define HAVE_C_INLINE\n#endif\n\n#ifdef __MINGW32__\n#define HAVE_MODE_T\n#endif\n\n#ifdef __BORLANDC__\n#endif\n\n#ifdef __WATCOMC__\n#endif\n\n#ifdef __DMC__\n#define HAVE_SIGNAL_H\n#define HAVE_C_INLINE\n#endif\n\n\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/create.c",
    "content": "/*\n * create.c\n *\n * Description:\n * This translation unit implements routines associated with spawning a new\n * thread.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#ifndef _UWIN\n#include <process.h>\n#endif\n\nint\npthread_create (pthread_t * tid,\n\t\tconst pthread_attr_t * attr,\n\t\tvoid *(*start) (void *), void *arg)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function creates a thread running the start function,\n      *      passing it the parameter value, 'arg'. The 'attr'\n      *      argument specifies optional creation attributes.\n      *      The identity of the new thread is returned\n      *      via 'tid', which should not be NULL.\n      *\n      * PARAMETERS\n      *      tid\n      *              pointer to an instance of pthread_t\n      *\n      *      attr\n      *              optional pointer to an instance of pthread_attr_t\n      *\n      *      start\n      *              pointer to the starting routine for the new thread\n      *\n      *      arg\n      *              optional parameter passed to 'start'\n      *\n      *\n      * DESCRIPTION\n      *      This function creates a thread running the start function,\n      *      passing it the parameter value, 'arg'. The 'attr'\n      *      argument specifies optional creation attributes.\n      *      The identity of the new thread is returned\n      *      via 'tid', which should not be the NULL pointer.\n      *\n      * RESULTS\n      *              0               successfully created thread,\n      *              EINVAL          attr invalid,\n      *              EAGAIN          insufficient resources.\n      *\n      * ------------------------------------------------------\n      */\n{\n  pthread_t thread;\n  ptw32_thread_t * tp;\n  register pthread_attr_t a;\n  HANDLE threadH = 0;\n  int result = EAGAIN;\n  int run = PTW32_TRUE;\n  ThreadParms *parms = NULL;\n  long stackSize;\n  int priority;\n  pthread_t self;\n\n  /*\n   * Before doing anything, check that tid can be stored through\n   * without invoking a memory protection error (segfault).\n   * Make sure that the assignment below can't be optimised out by the compiler.\n   * This is assured by conditionally assigning *tid again at the end.\n   */\n  tid->x = 0;\n\n  if (attr != NULL)\n    {\n      a = *attr;\n    }\n  else\n    {\n      a = NULL;\n    }\n\n  if ((thread = ptw32_new ()).p == NULL)\n    {\n      goto FAIL0;\n    }\n\n  tp = (ptw32_thread_t *) thread.p;\n\n  priority = tp->sched_priority;\n\n  if ((parms = (ThreadParms *) malloc (sizeof (*parms))) == NULL)\n    {\n      goto FAIL0;\n    }\n\n  parms->tid = thread;\n  parms->start = start;\n  parms->arg = arg;\n\n#if defined(HAVE_SIGSET_T)\n\n  /*\n   * Threads inherit their initial sigmask from their creator thread.\n   */\n  self = pthread_self();\n  tp->sigmask = ((ptw32_thread_t *)self.p)->sigmask;\n\n#endif /* HAVE_SIGSET_T */\n\n\n  if (a != NULL)\n    {\n      stackSize = a->stacksize;\n      tp->detachState = a->detachstate;\n      priority = a->param.sched_priority;\n\n#if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL)\n      /* WinCE */\n#else\n      /* Everything else */\n\n      /*\n       * Thread priority must be set to a valid system level\n       * without altering the value set by pthread_attr_setschedparam().\n       */\n\n      /*\n       * PTHREAD_EXPLICIT_SCHED is the default because Win32 threads\n       * don't inherit their creator's priority. They are started with\n       * THREAD_PRIORITY_NORMAL (win32 value). The result of not supplying\n       * an 'attr' arg to pthread_create() is equivalent to defaulting to\n       * PTHREAD_EXPLICIT_SCHED and priority THREAD_PRIORITY_NORMAL.\n       */\n      if (PTHREAD_INHERIT_SCHED == a->inheritsched)\n\t{\n\t  /*\n\t   * If the thread that called pthread_create() is a Win32 thread\n\t   * then the inherited priority could be the result of a temporary\n\t   * system adjustment. This is not the case for POSIX threads.\n\t   */\n#if ! defined(HAVE_SIGSET_T)\n\t  self = pthread_self ();\n#endif\n\t  priority = ((ptw32_thread_t *) self.p)->sched_priority;\n\t}\n\n#endif\n\n    }\n  else\n    {\n      /*\n       * Default stackSize\n       */\n      stackSize = PTHREAD_STACK_MIN;\n    }\n\n  tp->state = run ? PThreadStateInitial : PThreadStateSuspended;\n\n  tp->keys = NULL;\n\n  /*\n   * Threads must be started in suspended mode and resumed if necessary\n   * after _beginthreadex returns us the handle. Otherwise we set up a\n   * race condition between the creating and the created threads.\n   * Note that we also retain a local copy of the handle for use\n   * by us in case thread.p->threadH gets NULLed later but before we've\n   * finished with it here.\n   */\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) \n\n  tp->threadH =\n    threadH =\n    (HANDLE) _beginthreadex ((void *) NULL,\t/* No security info             */\n\t\t\t     (unsigned) stackSize,\t/* default stack size   */\n\t\t\t     ptw32_threadStart,\n\t\t\t     parms,\n\t\t\t     (unsigned)\n\t\t\t     CREATE_SUSPENDED,\n\t\t\t     (unsigned *) &(tp->thread));\n\n  if (threadH != 0)\n    {\n      if (a != NULL)\n\t{\n\t  (void) ptw32_setthreadpriority (thread, SCHED_OTHER, priority);\n\t}\n\n      if (run)\n\t{\n\t  ResumeThread (threadH);\n\t}\n    }\n\n#else /* __MINGW32__ && ! __MSVCRT__ */\n\n  /*\n   * This lock will force pthread_threadStart() to wait until we have\n   * the thread handle and have set the priority.\n   */\n  (void) pthread_mutex_lock (&tp->cancelLock);\n\n  tp->threadH =\n    threadH =\n    (HANDLE) _beginthread (ptw32_threadStart, (unsigned) stackSize,\t/* default stack size   */\n\t\t\t   parms);\n\n  /*\n   * Make the return code match _beginthreadex's.\n   */\n  if (threadH == (HANDLE) - 1L)\n    {\n      tp->threadH = threadH = 0;\n    }\n  else\n    {\n      if (!run)\n\t{\n\t  /* \n\t   * beginthread does not allow for create flags, so we do it now.\n\t   * Note that beginthread itself creates the thread in SUSPENDED\n\t   * mode, and then calls ResumeThread to start it.\n\t   */\n\t  SuspendThread (threadH);\n\t}\n\n      if (a != NULL)\n\t{\n\t  (void) ptw32_setthreadpriority (thread, SCHED_OTHER, priority);\n\t}\n    }\n\n  (void) pthread_mutex_unlock (&tp->cancelLock);\n\n#endif /* __MINGW32__ && ! __MSVCRT__ */\n\n  result = (threadH != 0) ? 0 : EAGAIN;\n\n  /*\n   * Fall Through Intentionally\n   */\n\n  /*\n   * ------------\n   * Failure Code\n   * ------------\n   */\n\nFAIL0:\n  if (result != 0)\n    {\n\n      ptw32_threadDestroy (thread);\n      tp = NULL;\n\n      if (parms != NULL)\n\t{\n\t  free (parms);\n\t}\n    }\n  else\n    {\n      *tid = thread;\n    }\n\n#ifdef _UWIN\n  if (result == 0)\n    pthread_count++;\n#endif\n  return (result);\n\n}\t\t\t\t/* pthread_create */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/dll.c",
    "content": "/*\n * dll.c\n *\n * Description:\n * This translation unit implements DLL initialisation.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#ifndef PTW32_STATIC_LIB\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n#ifdef _MSC_VER\n/* \n * lpvReserved yields an unreferenced formal parameter;\n * ignore it\n */\n#pragma warning( disable : 4100 )\n#endif\n\n#ifdef __cplusplus\n/*\n * Dear c++: Please don't mangle this name. -thanks\n */\nextern \"C\"\n#endif\t\t\t\t/* __cplusplus */\n  BOOL WINAPI\nDllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved)\n{\n  BOOL result = PTW32_TRUE;\n\n  switch (fdwReason)\n    {\n\n    case DLL_PROCESS_ATTACH:\n      result = pthread_win32_process_attach_np ();\n      break;\n\n    case DLL_THREAD_ATTACH:\n      /*\n       * A thread is being created\n       */\n      result = pthread_win32_thread_attach_np ();\n      break;\n\n    case DLL_THREAD_DETACH:\n      /*\n       * A thread is exiting cleanly\n       */\n      result = pthread_win32_thread_detach_np ();\n      break;\n\n    case DLL_PROCESS_DETACH:\n      (void) pthread_win32_thread_detach_np ();\n      result = pthread_win32_process_detach_np ();\n      break;\n    }\n\n  return (result);\n\n}\t\t\t\t/* DllMain */\n\n#endif /* PTW32_STATIC_LIB */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/errno.c",
    "content": "/*\n * errno.c\n *\n * Description:\n * This translation unit implements routines associated with spawning a new\n * thread.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#if defined(NEED_ERRNO)\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nstatic int reallyBad = ENOMEM;\n\n/*\n * Re-entrant errno.\n *\n * Each thread has it's own errno variable in pthread_t.\n *\n * The benefit of using the pthread_t structure\n * instead of another TSD key is TSD keys are limited\n * on Win32 to 64 per process. Secondly, to implement\n * it properly without using pthread_t you'd need\n * to dynamically allocate an int on starting the thread\n * and store it manually into TLS and then ensure that you free\n * it on thread termination. We get all that for free\n * by simply storing the errno on the pthread_t structure.\n *\n * MSVC and Mingw32 already have their own thread-safe errno.\n *\n * #if defined( _REENTRANT ) || defined( _MT )\n * #define errno *_errno()\n *\n * int *_errno( void );\n * #else\n * extern int errno;\n * #endif\n *\n */\n\nint *\n_errno (void)\n{\n  pthread_t self;\n  int *result;\n\n  if ((self = pthread_self ()) == NULL)\n    {\n      /*\n       * Yikes! unable to allocate a thread!\n       * Throw an exception? return an error?\n       */\n      result = &reallyBad;\n    }\n  else\n    {\n      result = &(self->ptErrno);\n    }\n\n  return (result);\n\n}\t\t\t\t/* _errno */\n\n#endif /* (NEED_ERRNO) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/exit.c",
    "content": "/*\n * exit.c\n *\n * Description:\n * This translation unit implements routines associated with exiting from\n * a thread.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#ifndef _UWIN\n#   include <process.h>\n#endif\n\n#include \"pthread_exit.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/fork.c",
    "content": "/*\n * fork.c\n *\n * Description:\n * Implementation of fork() for POSIX threads.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n\n#include \"pthread.h\"\n#include \"implement.h\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/global.c",
    "content": "/*\n * global.c\n *\n * Description:\n * This translation unit instantiates data associated with the implementation\n * as a whole.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint ptw32_processInitialized = PTW32_FALSE;\nptw32_thread_t * ptw32_threadReuseTop = PTW32_THREAD_REUSE_EMPTY;\nptw32_thread_t * ptw32_threadReuseBottom = PTW32_THREAD_REUSE_EMPTY;\npthread_key_t ptw32_selfThreadKey = NULL;\npthread_key_t ptw32_cleanupKey = NULL;\npthread_cond_t ptw32_cond_list_head = NULL;\npthread_cond_t ptw32_cond_list_tail = NULL;\n\nint ptw32_concurrency = 0;\n\n/* What features have been auto-detaected */\nint ptw32_features = 0;\n\nBOOL ptw32_smp_system = PTW32_TRUE;  /* Safer if assumed true initially. */\n\n/* \n * Function pointer to InterlockedCompareExchange if it exists, otherwise\n * it will be set at runtime to a substitute local version with the same\n * functionality but may be architecture specific.\n */\nPTW32_INTERLOCKED_LONG\n  (WINAPI * ptw32_interlocked_compare_exchange) (PTW32_INTERLOCKED_LPLONG,\n\t\t\t\t\t\t PTW32_INTERLOCKED_LONG,\n\t\t\t\t\t\t PTW32_INTERLOCKED_LONG) =\n  NULL;\n\n/* \n * Function pointer to QueueUserAPCEx if it exists, otherwise\n * it will be set at runtime to a substitute routine which cannot unblock\n * blocked threads.\n */\nDWORD (*ptw32_register_cancelation) (PAPCFUNC, HANDLE, DWORD) = NULL;\n\n/*\n * Global lock for managing pthread_t struct reuse.\n */\nCRITICAL_SECTION ptw32_thread_reuse_lock;\n\n/*\n * Global lock for testing internal state of statically declared mutexes.\n */\nCRITICAL_SECTION ptw32_mutex_test_init_lock;\n\n/*\n * Global lock for testing internal state of PTHREAD_COND_INITIALIZER\n * created condition variables.\n */\nCRITICAL_SECTION ptw32_cond_test_init_lock;\n\n/*\n * Global lock for testing internal state of PTHREAD_RWLOCK_INITIALIZER\n * created read/write locks.\n */\nCRITICAL_SECTION ptw32_rwlock_test_init_lock;\n\n/*\n * Global lock for testing internal state of PTHREAD_SPINLOCK_INITIALIZER\n * created spin locks.\n */\nCRITICAL_SECTION ptw32_spinlock_test_init_lock;\n\n/*\n * Global lock for condition variable linked list. The list exists\n * to wake up CVs when a WM_TIMECHANGE message arrives. See\n * w32_TimeChangeHandler.c.\n */\nCRITICAL_SECTION ptw32_cond_list_lock;\n\n#ifdef _UWIN\n/*\n * Keep a count of the number of threads.\n */\nint pthread_count = 0;\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/implement.h",
    "content": "/*\n * implement.h\n *\n * Definitions that don't need to be public.\n *\n * Keeps all the internals out of pthread.h\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#ifndef _IMPLEMENT_H\n#define _IMPLEMENT_H\n\n#ifdef _WIN32_WINNT\n#undef _WIN32_WINNT\n#endif\n#define _WIN32_WINNT 0x400\n\n#include <windows.h>\n\n/*\n * In case windows.h doesn't define it (e.g. WinCE perhaps)\n */\n#ifdef WINCE\ntypedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam);\n#endif\n\n/*\n * note: ETIMEDOUT is correctly defined in winsock.h\n */\n#include <winsock.h>\n\n/*\n * In case ETIMEDOUT hasn't been defined above somehow.\n */\n#ifndef ETIMEDOUT\n#  define ETIMEDOUT 10060\t/* This is the value in winsock.h. */\n#endif\n\n#if !defined(malloc)\n#include <malloc.h>\n#endif\n\n#if !defined(INT_MAX)\n#include <limits.h>\n#endif\n\n/* use local include files during development */\n#include \"semaphore.h\"\n#include \"sched.h\"\n\n#if defined(HAVE_C_INLINE) || defined(__cplusplus)\n#define INLINE inline\n#else\n#define INLINE\n#endif\n\n#if defined (__MINGW32__) || (_MSC_VER >= 1300)\n#define PTW32_INTERLOCKED_LONG long\n#define PTW32_INTERLOCKED_LPLONG long*\n#else\n#define PTW32_INTERLOCKED_LONG PVOID\n#define PTW32_INTERLOCKED_LPLONG PVOID*\n#endif\n\n#if defined(__MINGW32__)\n#include <stdint.h>\n#elif defined(__BORLANDC__)\n#define int64_t ULONGLONG\n#else\n#define int64_t _int64\n#endif\n\ntypedef enum\n{\n  /*\n   * This enumeration represents the state of the thread;\n   * The thread is still \"alive\" if the numeric value of the\n   * state is greater or equal \"PThreadStateRunning\".\n   */\n  PThreadStateInitial = 0,\t/* Thread not running                   */\n  PThreadStateRunning,\t\t/* Thread alive & kicking               */\n  PThreadStateSuspended,\t/* Thread alive but suspended           */\n  PThreadStateCancelPending,\t/* Thread alive but is                  */\n  /* has cancelation pending.        */\n  PThreadStateCanceling,\t/* Thread alive but is                  */\n  /* in the process of terminating        */\n  /* due to a cancellation request        */\n  PThreadStateException,\t/* Thread alive but exiting             */\n  /* due to an exception                  */\n  PThreadStateLast\n}\nPThreadState;\n\n\ntypedef struct ptw32_thread_t_ ptw32_thread_t;\n\nstruct ptw32_thread_t_\n{\n#ifdef _UWIN\n  DWORD dummy[5];\n#endif\n  DWORD thread;\n  HANDLE threadH;\t\t/* Win32 thread handle - POSIX thread is invalid if threadH == 0 */\n  pthread_t ptHandle;\t\t/* This thread's permanent pthread_t handle */\n  ptw32_thread_t * prevReuse;\t/* Links threads on reuse stack */\n  volatile PThreadState state;\n  void *exitStatus;\n  void *parms;\n  int ptErrno;\n  int detachState;\n  pthread_mutex_t threadLock;\t/* Used for serialised access to public thread state */\n  int sched_priority;\t\t/* As set, not as currently is */\n  pthread_mutex_t cancelLock;\t/* Used for async-cancel safety */\n  int cancelState;\n  int cancelType;\n  HANDLE cancelEvent;\n#ifdef __CLEANUP_C\n  jmp_buf start_mark;\n#endif\t\t\t\t/* __CLEANUP_C */\n#if HAVE_SIGSET_T\n  sigset_t sigmask;\n#endif\t\t\t\t/* HAVE_SIGSET_T */\n  int implicit:1;\n  void *keys;\n  void *nextAssoc;\n};\n\n\n/* \n * Special value to mark attribute objects as valid.\n */\n#define PTW32_ATTR_VALID ((unsigned long) 0xC4C0FFEE)\n\nstruct pthread_attr_t_\n{\n  unsigned long valid;\n  void *stackaddr;\n  size_t stacksize;\n  int detachstate;\n  struct sched_param param;\n  int inheritsched;\n  int contentionscope;\n#if HAVE_SIGSET_T\n  sigset_t sigmask;\n#endif\t\t\t\t/* HAVE_SIGSET_T */\n};\n\n\n/*\n * ====================\n * ====================\n * Semaphores, Mutexes and Condition Variables\n * ====================\n * ====================\n */\n\nstruct sem_t_\n{\n  int value;\n  pthread_mutex_t lock;\n  HANDLE sem;\n#ifdef NEED_SEM\n  int leftToUnblock;\n#endif\n};\n\n#define PTW32_OBJECT_AUTO_INIT ((void *) -1)\n#define PTW32_OBJECT_INVALID   NULL\n\nstruct pthread_mutex_t_\n{\n  LONG lock_idx;\t\t/* Provides exclusive access to mutex state\n\t\t\t\t   via the Interlocked* mechanism.\n\t\t\t\t    0: unlocked/free.\n\t\t\t\t    1: locked - no other waiters.\n\t\t\t\t   -1: locked - with possible other waiters.\n\t\t\t\t*/\n  int recursive_count;\t\t/* Number of unlocks a thread needs to perform\n\t\t\t\t   before the lock is released (recursive\n\t\t\t\t   mutexes only). */\n  int kind;\t\t\t/* Mutex type. */\n  pthread_t ownerThread;\n  HANDLE event;\t\t\t/* Mutex release notification to waiting\n\t\t\t\t   threads. */\n};\n\nstruct pthread_mutexattr_t_\n{\n  int pshared;\n  int kind;\n};\n\n/*\n * Possible values, other than PTW32_OBJECT_INVALID,\n * for the \"interlock\" element in a spinlock.\n *\n * In this implementation, when a spinlock is initialised,\n * the number of cpus available to the process is checked.\n * If there is only one cpu then \"interlock\" is set equal to\n * PTW32_SPIN_USE_MUTEX and u.mutex is a initialised mutex.\n * If the number of cpus is greater than 1 then \"interlock\"\n * is set equal to PTW32_SPIN_UNLOCKED and the number is\n * stored in u.cpus. This arrangement allows the spinlock\n * routines to attempt an InterlockedCompareExchange on \"interlock\"\n * immediately and, if that fails, to try the inferior mutex.\n *\n * \"u.cpus\" isn't used for anything yet, but could be used at\n * some point to optimise spinlock behaviour.\n */\n#define PTW32_SPIN_UNLOCKED    (1)\n#define PTW32_SPIN_LOCKED      (2)\n#define PTW32_SPIN_USE_MUTEX   (3)\n\nstruct pthread_spinlock_t_\n{\n  long interlock;\t\t/* Locking element for multi-cpus. */\n  union\n  {\n    int cpus;\t\t\t/* No. of cpus if multi cpus, or   */\n    pthread_mutex_t mutex;\t/* mutex if single cpu.            */\n  } u;\n};\n\nstruct pthread_barrier_t_\n{\n  unsigned int nCurrentBarrierHeight;\n  unsigned int nInitialBarrierHeight;\n  int iStep;\n  int pshared;\n  sem_t semBarrierBreeched[2];\n};\n\nstruct pthread_barrierattr_t_\n{\n  int pshared;\n};\n\nstruct pthread_key_t_\n{\n  DWORD key;\n  void (*destructor) (void *);\n  pthread_mutex_t keyLock;\n  void *threads;\n};\n\n\ntypedef struct ThreadParms ThreadParms;\ntypedef struct ThreadKeyAssoc ThreadKeyAssoc;\n\nstruct ThreadParms\n{\n  pthread_t tid;\n  void *(*start) (void *);\n  void *arg;\n};\n\n\nstruct pthread_cond_t_\n{\n  long nWaitersBlocked;\t\t/* Number of threads blocked            */\n  long nWaitersGone;\t\t/* Number of threads timed out          */\n  long nWaitersToUnblock;\t/* Number of threads to unblock         */\n  sem_t semBlockQueue;\t\t/* Queue up threads waiting for the     */\n  /*   condition to become signalled      */\n  sem_t semBlockLock;\t\t/* Semaphore that guards access to      */\n  /* | waiters blocked count/block queue  */\n  /* +-> Mandatory Sync.LEVEL-1           */\n  pthread_mutex_t mtxUnblockLock;\t/* Mutex that guards access to          */\n  /* | waiters (to)unblock(ed) counts     */\n  /* +-> Optional* Sync.LEVEL-2           */\n  pthread_cond_t next;\t\t/* Doubly linked list                   */\n  pthread_cond_t prev;\n};\n\n\nstruct pthread_condattr_t_\n{\n  int pshared;\n};\n\n#define PTW32_RWLOCK_MAGIC 0xfacade2\n\nstruct pthread_rwlock_t_\n{\n  pthread_mutex_t mtxExclusiveAccess;\n  pthread_mutex_t mtxSharedAccessCompleted;\n  pthread_cond_t cndSharedAccessCompleted;\n  int nSharedAccessCount;\n  int nExclusiveAccessCount;\n  int nCompletedSharedAccessCount;\n  int nMagic;\n};\n\nstruct pthread_rwlockattr_t_\n{\n  int pshared;\n};\n\n/*\n * MCS lock queue node - see ptw32_MCS_lock.c\n */\nstruct ptw32_mcs_node_t_\n{\n  struct ptw32_mcs_node_t_ **lock;        /* ptr to tail of queue */\n  struct ptw32_mcs_node_t_  *next;        /* ptr to successor in queue */\n  LONG                       readyFlag;   /* set after lock is released by\n                                             predecessor */\n  LONG                       nextFlag;    /* set after 'next' ptr is set by\n                                             successor */\n};\n\ntypedef struct ptw32_mcs_node_t_   ptw32_mcs_local_node_t;\ntypedef struct ptw32_mcs_node_t_  *ptw32_mcs_lock_t;\n\n\nstruct ThreadKeyAssoc\n{\n  /*\n   * Purpose:\n   *      This structure creates an association between a thread and a key.\n   *      It is used to implement the implicit invocation of a user defined\n   *      destroy routine for thread specific data registered by a user upon\n   *      exiting a thread.\n   *\n   *      Graphically, the arrangement is as follows, where:\n   *\n   *         K - Key with destructor\n   *            (head of chain is key->threads)\n   *         T - Thread that has called pthread_setspecific(Kn)\n   *            (head of chain is thread->keys)\n   *         A - Association. Each association is a node at the\n   *             intersection of two doubly-linked lists.\n   *\n   *                 T1    T2    T3\n   *                 |     |     |\n   *                 |     |     |\n   *         K1 -----+-----A-----A----->\n   *                 |     |     |\n   *                 |     |     |\n   *         K2 -----A-----A-----+----->\n   *                 |     |     |\n   *                 |     |     |\n   *         K3 -----A-----+-----A----->\n   *                 |     |     |\n   *                 |     |     |\n   *                 V     V     V\n   *\n   *      Access to the association is guarded by two locks: the key's\n   *      general lock (guarding the row) and the thread's general\n   *      lock (guarding the column). This avoids the need for a\n   *      dedicated lock for each association, which not only consumes\n   *      more handles but requires that: before the lock handle can\n   *      be released - both the key must be deleted and the thread\n   *      must have called the destructor. The two-lock arrangement\n   *      allows the resources to be freed as soon as either thread or\n   *      key is concluded.\n   *\n   *      To avoid deadlock: whenever both locks are required, the key\n   *      and thread locks are always acquired in the order: key lock\n   *      then thread lock. An exception to this exists when a thread\n   *      calls the destructors, however this is done carefully to\n   *      avoid deadlock.\n   *\n   *      An association is created when a thread first calls\n   *      pthread_setspecific() on a key that has a specified\n   *      destructor.\n   *\n   *      An association is destroyed either immediately after the\n   *      thread calls the key destructor function on thread exit, or\n   *      when the key is deleted.\n   *\n   * Attributes:\n   *      thread\n   *              reference to the thread that owns the\n   *              association. This is actually the pointer to the\n   *              thread struct itself. Since the association is\n   *              destroyed before the thread exits, this can never\n   *              point to a different logical thread to the one that\n   *              created the assoc, i.e. after thread struct reuse.\n   *\n   *      key\n   *              reference to the key that owns the association.\n   *\n   *      nextKey\n   *              The pthread_t->keys attribute is the head of a\n   *              chain of associations that runs through the nextKey\n   *              link. This chain provides the 1 to many relationship\n   *              between a pthread_t and all pthread_key_t on which\n   *              it called pthread_setspecific.\n   *\n   *      prevKey\n   *              Similarly.\n   *\n   *      nextThread\n   *              The pthread_key_t->threads attribute is the head of\n   *              a chain of assoctiations that runs through the\n   *              nextThreads link. This chain provides the 1 to many\n   *              relationship between a pthread_key_t and all the \n   *              PThreads that have called pthread_setspecific for\n   *              this pthread_key_t.\n   *\n   *      prevThread\n   *              Similarly.\n   *\n   * Notes:\n   *      1)      As soon as either the key or the thread is no longer\n   *              referencing the association, it can be destroyed. The\n   *              association will be removed from both chains.\n   *\n   *      2)      Under WIN32, an association is only created by\n   *              pthread_setspecific if the user provided a\n   *              destroyRoutine when they created the key.\n   *\n   *\n   */\n  ptw32_thread_t * thread;\n  pthread_key_t key;\n  ThreadKeyAssoc *nextKey;\n  ThreadKeyAssoc *nextThread;\n  ThreadKeyAssoc *prevKey;\n  ThreadKeyAssoc *prevThread;\n};\n\n\n#ifdef __CLEANUP_SEH\n/*\n * --------------------------------------------------------------\n * MAKE_SOFTWARE_EXCEPTION\n *      This macro constructs a software exception code following\n *      the same format as the standard Win32 error codes as defined\n *      in WINERROR.H\n *  Values are 32 bit values layed out as follows:\n *\n *   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0\n *  +---+-+-+-----------------------+-------------------------------+\n *  |Sev|C|R|     Facility          |               Code            |\n *  +---+-+-+-----------------------+-------------------------------+\n *\n * Severity Values:\n */\n#define SE_SUCCESS              0x00\n#define SE_INFORMATION          0x01\n#define SE_WARNING              0x02\n#define SE_ERROR                0x03\n\n#define MAKE_SOFTWARE_EXCEPTION( _severity, _facility, _exception ) \\\n( (DWORD) ( ( (_severity) << 30 ) |     /* Severity code        */ \\\n            ( 1 << 29 ) |               /* MS=0, User=1         */ \\\n            ( 0 << 28 ) |               /* Reserved             */ \\\n            ( (_facility) << 16 ) |     /* Facility Code        */ \\\n            ( (_exception) <<  0 )      /* Exception Code       */ \\\n            ) )\n\n/*\n * We choose one specific Facility/Error code combination to\n * identify our software exceptions vs. WIN32 exceptions.\n * We store our actual component and error code within\n * the optional information array.\n */\n#define EXCEPTION_PTW32_SERVICES        \\\n     MAKE_SOFTWARE_EXCEPTION( SE_ERROR, \\\n                              PTW32_SERVICES_FACILITY, \\\n                              PTW32_SERVICES_ERROR )\n\n#define PTW32_SERVICES_FACILITY         0xBAD\n#define PTW32_SERVICES_ERROR            0xDEED\n\n#endif /* __CLEANUP_SEH */\n\n/*\n * Services available through EXCEPTION_PTW32_SERVICES\n * and also used [as parameters to ptw32_throw()] as\n * generic exception selectors.\n */\n\n#define PTW32_EPS_EXIT                  (1)\n#define PTW32_EPS_CANCEL                (2)\n\n\n/* Useful macros */\n#define PTW32_MAX(a,b)  ((a)<(b)?(b):(a))\n#define PTW32_MIN(a,b)  ((a)>(b)?(b):(a))\n\n\n/* Declared in global.c */\nextern PTW32_INTERLOCKED_LONG (WINAPI *\n\t\t\t       ptw32_interlocked_compare_exchange)\n  (PTW32_INTERLOCKED_LPLONG, PTW32_INTERLOCKED_LONG, PTW32_INTERLOCKED_LONG);\n\n/* Declared in pthread_cancel.c */\nextern DWORD (*ptw32_register_cancelation) (PAPCFUNC, HANDLE, DWORD);\n\n/* Thread Reuse stack bottom marker. Must not be NULL or any valid pointer to memory. */\n#define PTW32_THREAD_REUSE_EMPTY ((ptw32_thread_t *) 1)\n\nextern int ptw32_processInitialized;\nextern ptw32_thread_t * ptw32_threadReuseTop;\nextern ptw32_thread_t * ptw32_threadReuseBottom;\nextern pthread_key_t ptw32_selfThreadKey;\nextern pthread_key_t ptw32_cleanupKey;\nextern pthread_cond_t ptw32_cond_list_head;\nextern pthread_cond_t ptw32_cond_list_tail;\n\nextern int ptw32_mutex_default_kind;\n\nextern int ptw32_concurrency;\n\nextern int ptw32_features;\n\nextern BOOL ptw32_smp_system;  /* True: SMP system, False: Uni-processor system */\n\nextern CRITICAL_SECTION ptw32_thread_reuse_lock;\nextern CRITICAL_SECTION ptw32_mutex_test_init_lock;\nextern CRITICAL_SECTION ptw32_cond_list_lock;\nextern CRITICAL_SECTION ptw32_cond_test_init_lock;\nextern CRITICAL_SECTION ptw32_rwlock_test_init_lock;\nextern CRITICAL_SECTION ptw32_spinlock_test_init_lock;\n\n#ifdef _UWIN\nextern int pthread_count;\n#endif\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\t\t\t\t/* __cplusplus */\n\n/*\n * =====================\n * =====================\n * Forward Declarations\n * =====================\n * =====================\n */\n\n  int ptw32_is_attr (const pthread_attr_t * attr);\n\n  int ptw32_cond_check_need_init (pthread_cond_t * cond);\n  int ptw32_mutex_check_need_init (pthread_mutex_t * mutex);\n  int ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock);\n\n  PTW32_INTERLOCKED_LONG WINAPI\n    ptw32_InterlockedCompareExchange (PTW32_INTERLOCKED_LPLONG location,\n\t\t\t\t      PTW32_INTERLOCKED_LONG value,\n\t\t\t\t      PTW32_INTERLOCKED_LONG comparand);\n\n  LONG WINAPI\n    ptw32_InterlockedExchange (LPLONG location,\n\t\t\t       LONG value);\n\n  DWORD\n    ptw32_RegisterCancelation (PAPCFUNC callback,\n\t\t\t       HANDLE threadH, DWORD callback_arg);\n\n  int ptw32_processInitialize (void);\n\n  void ptw32_processTerminate (void);\n\n  void ptw32_threadDestroy (pthread_t tid);\n\n  void ptw32_pop_cleanup_all (int execute);\n\n  pthread_t ptw32_new (void);\n\n  pthread_t ptw32_threadReusePop (void);\n\n  void ptw32_threadReusePush (pthread_t thread);\n\n  int ptw32_getprocessors (int *count);\n\n  int ptw32_setthreadpriority (pthread_t thread, int policy, int priority);\n\n  void ptw32_rwlock_cancelwrwait (void *arg);\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\n  unsigned __stdcall\n#else\n  void\n#endif\n    ptw32_threadStart (void *vthreadParms);\n\n  void ptw32_callUserDestroyRoutines (pthread_t thread);\n\n  int ptw32_tkAssocCreate (ptw32_thread_t * thread, pthread_key_t key);\n\n  void ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc);\n\n  int ptw32_semwait (sem_t * sem);\n\n  DWORD ptw32_relmillisecs (const struct timespec * abstime);\n\n  void ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node);\n\n  void ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node);\n\n#ifdef NEED_FTIME\n  void ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft);\n  void ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts);\n#endif\n\n/* Declared in misc.c */\n#ifdef NEED_CALLOC\n#define calloc(n, s) ptw32_calloc(n, s)\n  void *ptw32_calloc (size_t n, size_t s);\n#endif\n\n/* Declared in private.c */\n  void ptw32_throw (DWORD exception);\n\n#ifdef __cplusplus\n}\n#endif\t\t\t\t/* __cplusplus */\n\n\n#ifdef _UWIN_\n#   ifdef       _MT\n#       ifdef __cplusplus\nextern \"C\"\n{\n#       endif\n  _CRTIMP unsigned long __cdecl _beginthread (void (__cdecl *) (void *),\n\t\t\t\t\t      unsigned, void *);\n  _CRTIMP void __cdecl _endthread (void);\n  _CRTIMP unsigned long __cdecl _beginthreadex (void *, unsigned,\n\t\t\t\t\t\tunsigned (__stdcall *) (void *),\n\t\t\t\t\t\tvoid *, unsigned, unsigned *);\n  _CRTIMP void __cdecl _endthreadex (unsigned);\n#       ifdef __cplusplus\n}\n#       endif\n#   endif\n#else\n#   include <process.h>\n#endif\n\n\n/*\n * Defaults. Could be overridden when building the inlined version of the dll.\n * See ptw32_InterlockedCompareExchange.c\n */\n#ifndef PTW32_INTERLOCKED_COMPARE_EXCHANGE\n#define PTW32_INTERLOCKED_COMPARE_EXCHANGE ptw32_interlocked_compare_exchange\n#endif\n\n#ifndef PTW32_INTERLOCKED_EXCHANGE\n#define PTW32_INTERLOCKED_EXCHANGE InterlockedExchange\n#endif\n\n\n/*\n * Check for old and new versions of cygwin. See the FAQ file:\n *\n * Question 1 - How do I get pthreads-win32 to link under Cygwin or Mingw32?\n *\n * Patch by Anders Norlander <anorland@hem2.passagen.se>\n */\n#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(NEED_CREATETHREAD)\n\n/* \n * Macro uses args so we can cast start_proc to LPTHREAD_START_ROUTINE\n * in order to avoid warnings because of return type\n */\n\n#define _beginthreadex(security, \\\n                       stack_size, \\\n                       start_proc, \\\n                       arg, \\\n                       flags, \\\n                       pid) \\\n        CreateThread(security, \\\n                     stack_size, \\\n                     (LPTHREAD_START_ROUTINE) start_proc, \\\n                     arg, \\\n                     flags, \\\n                     pid)\n\n#define _endthreadex ExitThread\n\n#endif\t\t\t\t/* __CYGWIN32__ || __CYGWIN__ || NEED_CREATETHREAD */\n\n\n#endif\t\t\t\t/* _IMPLEMENT_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/ChangeLog",
    "content": "2005-05-06  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* PortabilityIssues.html: Was nonPortableIssues.html.\n\t* index.html: Updated; add table of contents at top.\n\t* *.html: Add Pthreads-win32 header info; add link back to the\n\tindex page 'index.html'.\n\n2005-05-06  Ross Johnson  <ross at callisto.canberra.edu.au>\n\n\t* index.html: New.\n\t* nonPortableIssues.html: New.\n\t* pthread_attr_init.html: New.\n\t* pthread_attr_setstackaddr.html: New.\n\t* pthread_attr_setstacksize.html: New.\n\t* pthread_barrierattr_init.html: New.\n\t* pthread_barrierattr_setpshared.html: New.\n\t* pthread_barrier_init.html: New.\n\t* pthread_barrier_wait.html: New.\n\t* pthreadCancelableWait.html: New.\n\t* pthread_cancel.html: New.\n\t* pthread_cleanup_push.html: New.\n\t* pthread_condattr_init.html: New.\n\t* pthread_condattr_setpshared.html: New.\n\t* pthread_cond_init.html: New.\n\t* pthread_create.html: New.\n\t* pthread_delay_np.html: New.\n\t* pthread_detach.html: New.\n\t* pthread_equal.html: New.\n\t* pthread_exit.html: New.\n\t* pthread_getw32threadhandle_np.html: New.\n\t* pthread_join.html: New.\n\t* pthread_key_create.html: New.\n\t* pthread_kill.html: New.\n\t* pthread_mutexattr_init.html: New.\n\t* pthread_mutexattr_setpshared.html: New.\n\t* pthread_mutex_init.html: New.\n\t* pthread_num_processors_np.html: New.\n\t* pthread_once.html: New.\n\t* pthread_rwlockattr_init.html: New.\n\t* pthread_rwlockattr_setpshared.html: New.\n\t* pthread_rwlock_init.html: New.\n\t* pthread_rwlock_rdlock.html: New.\n\t* pthread_rwlock_timedrdlock.html: New.\n\t* pthread_rwlock_timedwrlock.html: New.\n\t* pthread_rwlock_unlock.html: New.\n\t* pthread_rwlock_wrlock.html: New.\n\t* pthread_self.html: New.\n\t* pthread_setcancelstate.html: New.\n\t* pthread_setcanceltype.html: New.\n\t* pthread_setconcurrency.html: New.\n\t* pthread_setschedparam.html: New.\n\t* pthread_spin_init.html: New.\n\t* pthread_spin_lock.html: New.\n\t* pthread_spin_unlock.html: New.\n\t* pthread_timechange_handler_np.html: New.\n\t* pthread_win32_attach_detach_np.html: New.\n\t* pthread_win32_test_features_np.html: New.\n\t* sched_get_priority_max.html: New.\n\t* sched_getscheduler.html: New.\n\t* sched_setscheduler.html: New.\n\t* sched_yield.html: New.\n\t* sem_init.html: New.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/PortabilityIssues.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PORTABILITYISSUES manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;322600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050506;11580000\">\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<H4><A HREF=\"#toc\">Table of Contents</A></H4>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P STYLE=\"font-weight: medium\">Portability issues</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>Thread priority</B></P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<H3>Thread priority</H3>\n<P STYLE=\"margin-left: 2cm\">POSIX defines a single contiguous range\nof numbers that determine a thread's priority. Win32 defines priority\nclasses - and priority levels relative to these classes. Classes are\nsimply priority base levels that the defined priority levels are\nrelative to such that, changing a process's priority class will\nchange the priority of all of it's threads, while the threads retain\nthe same relativity to each other.</P>\n<P STYLE=\"margin-left: 2cm\">A Win32 system defines a single\ncontiguous monotonic range of values that define system priority\nlevels, just like POSIX. However, Win32 restricts individual threads\nto a subset of this range on a per-process basis.</P>\n<P STYLE=\"margin-left: 2cm\">The following table shows the base\npriority levels for combinations of priority class and priority value\nin Win32.</P>\n<DL>\n\t<DL>\n\t\t<DD>\n\t\t<TABLE WIDTH=742 BORDER=0 CELLPADDING=0 CELLSPACING=0 STYLE=\"page-break-inside: avoid\">\n\t\t\t<COL WIDTH=50>\n\t\t\t<COL WIDTH=356>\n\t\t\t<COL WIDTH=336>\n\t\t\t<THEAD>\n\t\t\t\t<TR VALIGN=TOP>\n\t\t\t\t\t<TD WIDTH=50>\n\t\t\t\t\t\t<P ALIGN=CENTER><BR>\n\t\t\t\t\t\t</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356>\n\t\t\t\t\t\t<P ALIGN=LEFT><B>Process Priority Class</B></P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336>\n\t\t\t\t\t\t<P ALIGN=LEFT><B>Thread Priority Level</B></P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t</THEAD>\n\t\t\t<TBODY>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"1\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>1</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>IDLE_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_IDLE</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"1\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>1</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>BELOW_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_IDLE</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"1\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>1</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_IDLE</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"1\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>1</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>ABOVE_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_IDLE</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"1\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>1</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>HIGH_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_IDLE</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"2\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>2</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>IDLE_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_LOWEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"3\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>3</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>IDLE_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_BELOW_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"4\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>4</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>IDLE_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"4\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>4</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>BELOW_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_LOWEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"5\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>5</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>IDLE_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_ABOVE_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"5\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>5</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>BELOW_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_BELOW_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"5\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>5</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>Background NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_LOWEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"6\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>6</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>IDLE_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_HIGHEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"6\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>6</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>BELOW_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"6\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>6</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>Background NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_BELOW_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"7\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>7</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>BELOW_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_ABOVE_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"7\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>7</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>Background NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"7\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>7</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>Foreground NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_LOWEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"8\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>8</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>BELOW_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_HIGHEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"8\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>8</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_ABOVE_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"8\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>8</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>Foreground NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_BELOW_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"8\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>8</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>ABOVE_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_LOWEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"9\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>9</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_HIGHEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"9\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>9</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>Foreground NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"9\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>9</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>ABOVE_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_BELOW_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"10\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>10</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>Foreground NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_ABOVE_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"10\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>10</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>ABOVE_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"11\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>11</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>Foreground NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_HIGHEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"11\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>11</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>ABOVE_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_ABOVE_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"11\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>11</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>HIGH_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_LOWEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"12\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>12</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>ABOVE_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_HIGHEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"12\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>12</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>HIGH_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_BELOW_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"13\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>13</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>HIGH_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"14\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>14</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>HIGH_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_ABOVE_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"15\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>15</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>HIGH_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_HIGHEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"15\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>15</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>HIGH_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_TIME_CRITICAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"15\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>15</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>IDLE_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_TIME_CRITICAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"15\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>15</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>BELOW_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_TIME_CRITICAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"15\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>15</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_TIME_CRITICAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"15\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>15</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>ABOVE_NORMAL_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_TIME_CRITICAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"16\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>16</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_IDLE</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"17\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>17</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=BOTTOM SDVAL=\"-7\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=LEFT>-7</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"18\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>18</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=BOTTOM SDVAL=\"-6\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=LEFT>-6</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"19\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>19</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=BOTTOM SDVAL=\"-5\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=LEFT>-5</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"20\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>20</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=BOTTOM SDVAL=\"-4\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=LEFT>-4</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"21\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>21</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=BOTTOM SDVAL=\"-3\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=LEFT>-3</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"22\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>22</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_LOWEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"23\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>23</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_BELOW_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"24\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>24</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"25\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>25</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_ABOVE_NORMAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"26\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>26</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_HIGHEST</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"27\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>27</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=BOTTOM SDVAL=\"3\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=LEFT>3</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"28\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>28</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=BOTTOM SDVAL=\"4\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=LEFT>4</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"29\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>29</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=BOTTOM SDVAL=\"5\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=LEFT>5</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"30\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>30</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=BOTTOM SDVAL=\"6\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=LEFT>6</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD WIDTH=50 VALIGN=BOTTOM SDVAL=\"31\" SDNUM=\"3081;\">\n\t\t\t\t\t\t<P ALIGN=CENTER>31</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=356 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>REALTIME_PRIORITY_CLASS</P>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD WIDTH=336 VALIGN=TOP>\n\t\t\t\t\t\t<P ALIGN=LEFT>THREAD_PRIORITY_TIME_CRITICAL</P>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t</TBODY>\n\t\t</TABLE>\n\t</DL>\n</DL>\n<P STYLE=\"margin-left: 2cm\">Windows NT: Values -7, -6, -5, -4, -3, 3,\n4, 5, and 6 are not supported.</P>\n<P STYLE=\"margin-left: 2cm\">As you can see, the real priority levels\navailable to any individual Win32 thread are non-contiguous.</P>\n<P STYLE=\"margin-left: 2cm\">An application using Pthreads-w32 should\nnot make assumptions about the numbers used to represent thread\npriority levels, except that they are monotonic between the values\nreturned by sched_get_priority_min() and sched_get_priority_max().\nE.g. Windows 95, 98, NT, 2000, XP make available a non-contiguous\nrange of numbers between -15 and 15, while at least one version of\nWinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as\n5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.</P>\n<P STYLE=\"margin-left: 2cm\">Internally, pthreads-win32 maps any\npriority levels between THREAD_PRIORITY_IDLE and\nTHREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between\nTHREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to\nTHREAD_PRIORITY_HIGHEST. Currently, this also applies to\nREALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5,\nand 6 are supported.</P>\n<P STYLE=\"margin-left: 2cm\">If it wishes, a Win32 application using\npthreads-w32 can use the Win32 defined priority macros\nTHREAD_PRIORITY_IDLE through THREAD_PRIORITY_TIME_CRITICAL.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Author</A></H2>\n<P>Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">See also</A></H2>\n<P><BR><BR>\n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect4\" NAME=\"toc4\">See also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/index.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE></TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;17350500\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050506;12240700\">\n</HEAD>\n<BODY LANG=\"en-GB\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<H3>Table of Contents</H3>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"#sect1\" NAME=\"toc1\">POSIX\nthreads API reference</A><BR><A HREF=\"#sect2\" NAME=\"toc2\">Miscellaneous\nPOSIX thread safe routines provided by Pthreads-w32</A><BR><A HREF=\"#sect3\" NAME=\"toc3\">Non-portable\nPthreads-w32 routines</A><BR><A HREF=\"#sect4\" NAME=\"toc4\">Other</A></P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">POSIX threads API reference</A></H2>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_getdetachstate</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_getinheritsched</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_getschedparam</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_getschedpolicy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_getscope</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_setstackaddr.html\"><B>pthread_attr_getstackaddr</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_setstacksize.html\"><B>pthread_attr_getstacksize</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_setdetachstate</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_setinheritsched</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_setschedparam</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_setschedpolicy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_setscope</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_setstackaddr.html\"><B>pthread_attr_setstackaddr</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_attr_setstacksize.html\"><B>pthread_attr_setstacksize</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_barrierattr_init.html\"><B>pthread_barrierattr_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_barrierattr_setpshared.html\"><B>pthread_barrierattr_getpshared</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_barrierattr_init.html\"><B>pthread_barrierattr_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_barrierattr_setpshared.html\"><B>pthread_barrierattr_setpshared</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_barrier_init.html\"><B>pthread_barrier_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_barrier_init.html\"><B>pthread_barrier_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_barrier_wait.html\"><B>pthread_barrier_wait</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cancel.html\"><B>pthread_cancel</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cleanup_push.html\"><B>pthread_cleanup_pop</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cleanup_push.html\"><B>pthread_cleanup_push</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_condattr_init.html\"><B>pthread_condattr_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_condattr_setpshared.html\"><B>pthread_condattr_getpshared</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_condattr_init.html\"><B>pthread_condattr_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_condattr_setpshared.html\"><B>pthread_condattr_setpshared</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_broadcast</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_signal</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_timedwait</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_wait</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_create.html\"><B>pthread_create</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_detach.html\"><B>pthread_detach</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_equal.html\"><B>pthread_equal</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_exit.html\"><B>pthread_exit</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_setconcurrency.html\"><B>pthread_getconcurrency</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_setschedparam.html\"><B>pthread_getschedparam</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_key_create.html\"><B>pthread_getspecific</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_join.html\"><B>pthread_join</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_key_create.html\"><B>pthread_key_create</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_key_create.html\"><B>pthread_key_delete</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_kill.html\"><B>pthread_kill</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_getkind_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutexattr_setpshared.html\"><B>pthread_mutexattr_getpshared</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_gettype</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_setkind_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutexattr_setpshared.html\"><B>pthread_mutexattr_setpshared</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_settype</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_lock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_timedlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_trylock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_unlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_once.html\"><B>pthread_once</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlockattr_init.html\"><B>pthread_rwlockattr_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlockattr_setpshared.html\"><B>pthread_rwlockattr_getpshared</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlockattr_init.html\"><B>pthread_rwlockattr_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlockattr_setpshared.html\"><B>pthread_rwlockattr_setpshared</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlock_init.html\"><B>pthread_rwlock_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlock_init.html\"><B>pthread_rwlock_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_rdlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlock_timedrdlock.html\"><B>pthread_rwlock_timedrdlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlock_timedwrlock.html\"><B>pthread_rwlock_timedwrlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_tryrdlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_trywrlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlock_unlock.html\"><B>pthread_rwlock_unlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_wrlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_self.html\"><B>pthread_self</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cancel.html\"><B>pthread_setcancelstate</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cancel.html\"><B>pthread_setcanceltype</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_setconcurrency.html\"><B>pthread_setconcurrency</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_setschedparam.html\"><B>pthread_setschedparam</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_key_create.html\"><B>pthread_setspecific</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_kill.html\"><B>pthread_sigmask</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_spin_init.html\"><B>pthread_spin_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_spin_init.html\"><B>pthread_spin_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_lock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_trylock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_spin_unlock.html\"><B>pthread_spin_unlock</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_cancel.html\"><B>pthread_testcancel</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sched_get_priority_max.html\"><B>sched_get_priority_max</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sched_get_priority_max.html\"><B>sched_get_priority_min</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sched_getscheduler.html\"><B>sched_getscheduler</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sched_setscheduler.html\"><B>sched_setscheduler</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sched_yield.html\"><B>sched_yield</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><B>sem_close</B></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sem_init.html\"><B>sem_destroy</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sem_init.html\"><B>sem_getvalue</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sem_init.html\"><B>sem_init</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><B>sem_open</B></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sem_init.html\"><B>sem_post</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sem_init.html\"><B>sem_post_multiple</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sem_init.html\"><B>sem_timedwait</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sem_init.html\"><B>sem_trywait</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><B>sem_unlink</B></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"sem_init.html\"><B>sem_wait</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_kill.html\"><B>sigwait</B></A></P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Miscellaneous POSIX thread safe\nroutines provided by Pthreads-w32</A></H2>\n<P STYLE=\"margin-left: 2cm\"><B>asctime_r</B></P>\n<P STYLE=\"margin-left: 2cm\"><B>ctime_r</B></P>\n<P STYLE=\"margin-left: 2cm\"><B>gmtime_r</B></P>\n<P STYLE=\"margin-left: 2cm\"><B>localtime_r</B></P>\n<P STYLE=\"margin-left: 2cm\"><B>rand_r</B></P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Non-portable Pthreads-w32 routines</A></H2>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthreadCancelableWait.html\"><B>pthreadCancelableTimedWait</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthreadCancelableWait.html\"><B>pthreadCancelableWait</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_delay_np.html\"><B>pthread_delay_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_getw32threadhandle_np.html\"><B>pthread_getw32threadhandle_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_num_processors_np.html\"><B>pthread_num_processors_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_win32_test_features_np.html\"><B>pthread_win32_test_features_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_timechange_handler_np.html\"><B>pthread_timechange_handler_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_win32_attach_detach_np.html\"><B>pthread_win32_process_attach_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_win32_attach_detach_np.html\"><B>pthread_win32_process_detach_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_win32_attach_detach_np.html\"><B>pthread_win32_thread_attach_np</B></A></P>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"pthread_win32_attach_detach_np.html\"><B>pthread_win32_thread_detach_np</B></A></P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Other</A></H2>\n<P STYLE=\"margin-left: 2cm\"><A HREF=\"PortabilityIssues.html\"><B>Portability\nissues</B></A></P>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthreadCancelableWait.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREADCANCELLABLEWAIT manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;322600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;23242300\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P STYLE=\"font-weight: medium\">pthreadCancelableTimedWait,\npthreadCancelableWait – provide cancellation hooks for user Win32\nroutines</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthreadCancelableTimedWait (HANDLE </B><I>waitHandle</I><B>,\nDWORD </B><I>timeout</I><B>);</B></P>\n<P><B>int pthreadCancelableWait (HANDLE </B><I>waitHandle</I><B>);</B></P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>These two functions provide hooks into the <A HREF=\"pthread_cancel.html\"><B>pthread_cancel</B></A>()\nmechanism that will allow you to wait on a Windows handle and make it\na cancellation point. Both functions block until either the given\nWin32 <B>HANDLE</B> is signalled, or <A HREF=\"pthread_cancel.html\"><B>pthread_cancel</B></A>()\nhas been called. They are implemented using <B>WaitForMultipleObjects</B>\non <I>waitHandle</I> and the manually reset Win32 event handle that\nis the target of <A HREF=\"pthread_cancel.html\"><B>pthread_cancel</B></A>().\nThese routines may be called from Win32 native threads but\n<A HREF=\"pthread_cancel.html\"><B>pthread_cancel</B></A>() will\nrequire that thread's POSIX thread ID that the thread must retrieve\nusing <A HREF=\"pthread_self.html\"><B>pthread_self</B></A>().</P>\n<P><B>pthreadCancelableTimedWait</B> is the timed version that will\nreturn with the code <B>ETIMEDOUT</B> if the interval <I>timeout</I>\nmilliseconds elapses before <I>waitHandle</I> is signalled.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P>These routines allow routines that block on Win32 HANDLEs to be\ncancellable via <A HREF=\"pthread_cancel.html\"><B>pthread_cancel</B></A>().</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Return Value</A></H2>\n<P><BR><BR>\n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<P>The <B>pthreadCancelableTimedWait</B> function returns the\nfollowing error code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ETIMEDOUT</B>\n\t\t\t\t</DT></DL>\n</DL>\n<P STYLE=\"margin-left: 2cm\">\nThe interval <I>timeout</I> milliseconds elapsed before <I>waitHandle</I>\nwas signalled.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">See also</A></H2>\n<P><A HREF=\"pthread_cancel.html\"><B>pthread_cancel()</B></A>,\n<A HREF=\"pthread_self.html\"><B>pthread_self()</B></A></P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\"></A><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A><A HREF=\"#sect4\" NAME=\"toc4\"></A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect7\" NAME=\"toc7\">See also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_attr_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_ATTR_INIT(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;10092900\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;16540200\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_attr_init, pthread_attr_destroy,\npthread_attr_setdetachstate, pthread_attr_getdetachstate,\npthread_attr_setschedparam, pthread_attr_getschedparam,\npthread_attr_setschedpolicy, pthread_attr_getschedpolicy,\npthread_attr_setinheritsched, pthread_attr_getinheritsched,\npthread_attr_setscope, pthread_attr_getscope - thread creation\nattributes \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_attr_init(pthread_attr_t *</B><I>attr</I><B>);</B> \n</P>\n<P><B>int pthread_attr_destroy(pthread_attr_t *</B><I>attr</I><B>);</B>\n</P>\n<P><B>int pthread_attr_setdetachstate(pthread_attr_t *</B><I>attr</I><B>,\nint </B><I>detachstate</I><B>);</B> \n</P>\n<P><B>int pthread_attr_getdetachstate(const pthread_attr_t *</B><I>attr</I><B>,\nint *</B><I>detachstate</I><B>);</B> \n</P>\n<P><B>int pthread_attr_setschedpolicy(pthread_attr_t *</B><I>attr</I><B>,\nint </B><I>policy</I><B>);</B> \n</P>\n<P><B>int pthread_attr_getschedpolicy(const pthread_attr_t *</B><I>attr</I><B>,\nint *</B><I>policy</I><B>);</B> \n</P>\n<P><B>int pthread_attr_setschedparam(pthread_attr_t *</B><I>attr</I><B>,\nconst struct sched_param *</B><I>param</I><B>);</B> \n</P>\n<P><B>int pthread_attr_getschedparam(const pthread_attr_t *</B><I>attr</I><B>,\nstruct sched_param *</B><I>param</I><B>);</B> \n</P>\n<P><B>int pthread_attr_setinheritsched(pthread_attr_t *</B><I>attr</I><B>,\nint </B><I>inherit</I><B>);</B> \n</P>\n<P><B>int pthread_attr_getinheritsched(const pthread_attr_t *</B><I>attr</I><B>,\nint *</B><I>inherit</I><B>);</B> \n</P>\n<P><B>int pthread_attr_setscope(pthread_attr_t *</B><I>attr</I><B>,\nint </B><I>scope</I><B>);</B> \n</P>\n<P><B>int pthread_attr_getscope(const pthread_attr_t *</B><I>attr</I><B>,\nint *</B><I>scope</I><B>);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Setting attributes for threads is achieved by filling a thread\nattribute object <I>attr</I> of type <B>pthread_attr_t</B>, then\npassing it as second argument to <A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A>\n. Passing <B>NULL</B> is equivalent to passing a thread attribute\nobject with all attributes set to their default values. \n</P>\n<P><B>pthread_attr_init</B> initializes the thread attribute object\n<I>attr</I> and fills it with default values for the attributes. (The\ndefault values are listed below for each attribute.) \n</P>\n<P>Each attribute <I>attrname</I> (see below for a list of all\nattributes) can be individually set using the function\n<B>pthread_attr_set</B><I>attrname</I> and retrieved using the\nfunction <B>pthread_attr_get</B><I>attrname.</I> \n</P>\n<P><B>pthread_attr_destroy</B> destroys a thread attribute object,\nwhich must not then be reused until it is reinitialized. \n</P>\n<P>Attribute objects are consulted only when creating a new thread.\nThe same attribute object can be used for creating several threads.\nModifying an attribute object after a call to <B>pthread_create</B>\ndoes not change the attributes of the thread previously created. \n</P>\n<P>The following thread attributes are supported: \n</P>\n<H3><A HREF=\"#toc3\" NAME=\"sect3\">detachstate</A></H3>\n<P>Control whether the thread is created in the joinable state (value\n<B>PTHREAD_CREATE_JOINABLE</B>) or in the detached state (\n<B>PTHREAD_CREATE_DETACHED</B>). \n</P>\n<P>Default value: <B>PTHREAD_CREATE_JOINABLE</B>. \n</P>\n<P>In the joinable state, another thread can synchronize on the\nthread termination and recover its termination code using\n<A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A> . When a\njoinable thread terminates, some of the thread resources are kept\nallocated, and released only when another thread performs\n<A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A> on that\nthread. \n</P>\n<P>In the detached state, the thread's resources are released\nimmediately when it terminates. <A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A>\ncannot be used to synchronize on the thread termination. \n</P>\n<P>A thread created in the joinable state can later be put in the\ndetached thread using <A HREF=\"pthread_detach.html\"><B>pthread_detach</B>(3)</A>\n. \n</P>\n<H3><A HREF=\"#toc4\" NAME=\"sect4\">schedpolicy</A></H3>\n<P>Select the scheduling policy for the thread: one of <B>SCHED_OTHER</B>\n(regular, non-real-time scheduling), <B>SCHED_RR</B> (real-time,\nround-robin) or <B>SCHED_FIFO</B> (real-time, first-in first-out). \n</P>\n<P><B>Pthreads-w32</B> only supports <B>SCHED_OTHER</B> - attempting\nto set one of the other policies will return an error ENOTSUP.</P>\n<P>Default value: <B>SCHED_OTHER</B>. \n</P>\n<P><B>Pthreads-w32</B> only supports <B>SCHED_OTHER</B> - attempting\nto set one of the other policies will return an error ENOTSUP.</P>\n<P>The scheduling policy of a thread can be changed after creation\nwith <A HREF=\"pthread_setschedparam.html\"><B>pthread_setschedparam</B>(3)</A>\n. \n</P>\n<H3><A HREF=\"#toc5\" NAME=\"sect5\">schedparam</A></H3>\n<P>Contain the scheduling parameters (essentially, the scheduling\npriority) for the thread.</P>\n<P><B>Pthreads-w32</B> supports the priority levels defined by the\nWindows system it is running on. Under Windows, thread priorities are\nrelative to the process priority class, which must be set via the\nWindows W32 API.</P>\n<P>Default value: priority is 0 (Win32 level <B>THREAD_PRIORITY_NORMAL</B>).\n</P>\n<P>The scheduling priority of a thread can be changed after creation\nwith <A HREF=\"pthread_setschedparam.html\"><B>pthread_setschedparam</B>(3)</A>\n. \n</P>\n<H3><A HREF=\"#toc6\" NAME=\"sect6\">inheritsched</A></H3>\n<P>Indicate whether the scheduling policy and scheduling parameters\nfor the newly created thread are determined by the values of the\n<I>schedpolicy</I> and <I>schedparam</I> attributes (value\n<B>PTHREAD_EXPLICIT_SCHED</B>) or are inherited from the parent\nthread (value <B>PTHREAD_INHERIT_SCHED</B>). \n</P>\n<P>Default value: <B>PTHREAD_EXPLICIT_SCHED</B>. \n</P>\n<H3><A HREF=\"#toc7\" NAME=\"sect7\">scope</A></H3>\n<P>Define the scheduling contention scope for the created thread. The\nonly value supported in the <B>Pthreads-w32</B> implementation is\n<B>PTHREAD_SCOPE_SYSTEM</B>, meaning that the threads contend for CPU\ntime with all processes running on the machine. The other value\nspecified by the standard, <B>PTHREAD_SCOPE_PROCESS</B>, means that\nscheduling contention occurs only between the threads of the running\nprocess.</P>\n<P><B>Pthreads-w32</B> only supports <B>PTHREAD_SCOPE_SYSTEM</B>.</P>\n<P>Default value: <B>PTHREAD_SCOPE_SYSTEM</B>. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Return Value</A></H2>\n<P>All functions return 0 on success and a non-zero error code on\nerror. On success, the <B>pthread_attr_get</B><I>attrname</I>\nfunctions also store the current value of the attribute <I>attrname</I>\nin the location pointed to by their second argument. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">Errors</A></H2>\n<P>The <B>pthread_attr_setdetachstate</B> function returns the\nfollowing error codes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe specified <I>detachstate</I> is not one of\n\t\t<B>PTHREAD_CREATE_JOINABLE</B> or <B>PTHREAD_CREATE_DETACHED</B>. \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_attr_setschedparam</B> function returns the following\nerror codes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe priority specified in <I>param</I> is outside the range of\n\t\tallowed priorities for the scheduling policy currently in <I>attr</I>\n\t\t(1 to 99 for <B>SCHED_FIFO</B> and <B>SCHED_RR</B>; 0 for\n\t\t<B>SCHED_OTHER</B>). \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_attr_setschedpolicy</B> function returns the following\nerror codes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe specified <I>policy</I> is not one of <B>SCHED_OTHER</B>,\n\t\t<B>SCHED_FIFO</B>, or <B>SCHED_RR</B>. \n\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>ENOTSUP</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<I>policy</I> is not <B>SCHED_OTHER</B>, the only value supported\n\t\tby <B>Pthreads-w32</B>.</DD></DL>\n</DL>\n<P>\nThe <B>pthread_attr_setinheritsched</B> function returns the\nfollowing error codes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe specified <I>inherit</I> is not one of <B>PTHREAD_INHERIT_SCHED</B>\n\t\tor <B>PTHREAD_EXPLICIT_SCHED</B>. \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_attr_setscope</B> function returns the following error\ncodes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe specified <I>scope</I> is not one of <B>PTHREAD_SCOPE_SYSTEM</B>\n\t\tor <B>PTHREAD_SCOPE_PROCESS</B>. \n\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>ENOTSUP</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe specified <I>scope</I> is <B>PTHREAD_SCOPE_PROCESS</B> (not\n\t\tsupported by <B>Pthreads-w32</B>). \n\t\t</DD></DL>\n</DL>\n<H2>\n<A HREF=\"#toc10\" NAME=\"sect10\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc11\" NAME=\"sect11\">See Also</A></H2>\n<P><A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A> ,\n<A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A> ,\n<A HREF=\"pthread_detach.html\"><B>pthread_detach</B>(3)</A> ,\n<A HREF=\"pthread_setschedparam.html\"><B>pthread_setschedparam</B>(3)</A>\n. \n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<UL>\n\t\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">detachstate</A>\n\t\t\t\t</P>\n\t\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">schedpolicy</A>\n\t\t\t\t</P>\n\t\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">schedparam</A>\n\t\t\t\t</P>\n\t\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">inheritsched</A>\n\t\t\t\t</P>\n\t\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">scope</A>\n\t\t\t\t</P>\n\t</UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect10\" NAME=\"toc10\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect11\" NAME=\"toc11\">See Also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_attr_setstackaddr.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_ATTR_GETSTACKADDR&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;11025500\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;17571400\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_attr_getstackaddr, pthread_attr_setstackaddr - get and set\nthe stackaddr attribute \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_attr_getstackaddr(const pthread_attr_t *restrict</B>\n<I>attr</I><B>, void **restrict</B> <I>stackaddr</I><B>); <BR>int\npthread_attr_setstackaddr(pthread_attr_t *</B><I>attr</I><B>, void\n*</B><I>stackaddr</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_attr_getstackaddr</B> and <B>pthread_attr_setstackaddr</B>\nfunctions, respectively, shall get and set the thread creation\n<I>stackaddr</I> attribute in the <I>attr</I> object. \n</P>\n<P>The <I>stackaddr</I> attribute specifies the location of storage\nto be used for the created thread’s stack. The size of the storage\nshall be at least {PTHREAD_STACK_MIN}. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_THREAD_ATTR_STACKADDR</B> in\npthread.h as -1 to indicate that these routines are implemented but\ncannot used to set or get the stack address. These routines always\nreturn the error ENOSYS when called.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, <B>pthread_attr_getstackaddr</B> and\n<B>pthread_attr_setstackaddr</B> shall return a value of 0;\notherwise, an error number shall be returned to indicate the error. \n</P>\n<P>The <B>pthread_attr_getstackaddr</B> function stores the <I>stackaddr</I>\nattribute value in <I>stackaddr</I> if successful. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_attr_setstackaddr</B> function always returns the\nfollowing error code: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ENOSYS</B></DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe function is not supported. \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_attr_getstackaddr</B> function always returns the\nfollowing error code: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ENOSYS</B></DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe function is not supported. \n\t\t</DD></DL>\n</DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>The specification of the <I>stackaddr</I> attribute presents\nseveral ambiguities that make portable use of these interfaces\nimpossible. The description of the single address parameter as a\n&quot;stack&quot; does not specify a particular relationship between\nthe address and the &quot;stack&quot; implied by that address. For\nexample, the address may be taken as the low memory address of a\nbuffer intended for use as a stack, or it may be taken as the address\nto be used as the initial stack pointer register value for the new\nthread. These two are not the same except for a machine on which the\nstack grows &quot;up&quot; from low memory to high, and on which a\n&quot;push&quot; operation first stores the value in memory and then\nincrements the stack pointer register. Further, on a machine where\nthe stack grows &quot;down&quot; from high memory to low,\ninterpretation of the address as the &quot;low memory&quot; address\nrequires a determination of the intended size of the stack.\nIEEE&nbsp;Std&nbsp;1003.1-2001 has introduced the new interfaces\n<A HREF=\"pthread_attr_setstack.html\"><B>pthread_attr_setstack</B>(3)</A>\nand <A HREF=\"pthread_attr_getstack.html\"><B>pthread_attr_getstack</B>(3)</A>\nto resolve these ambiguities. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_destroy</B>(3)</A>\n, <A HREF=\"pthread_attr_init.html\"><B>pthread_attr_getdetachstate</B>(3)</A>\n, <A HREF=\"pthread_attr_getstack.html\"><B>pthread_attr_getstack</B>(3)</A>\n, <A HREF=\"pthread_attr_getstacksize.html\"><B>pthread_attr_getstacksize</B>(3)</A>\n, <A HREF=\"pthread_attr_setstack.html\"><B>pthread_attr_setstack</B>(3)</A>\n, <A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A> , the\nBase Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;limits.h&gt;</I>, <I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_attr_setstacksize.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_ATTR_GETSTACKSIZE&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;11224900\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18003200\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_attr_getstacksize, pthread_attr_setstacksize - get and set\nthe stacksize attribute \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_attr_getstacksize(const pthread_attr_t *restrict</B>\n<I>attr</I><B>, size_t *restrict</B> <I>stacksize</I><B>); <BR>int\npthread_attr_setstacksize(pthread_attr_t *</B><I>attr</I><B>, size_t</B>\n<I>stacksize</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_attr_getstacksize</B> and <B>pthread_attr_setstacksize</B>\nfunctions, respectively, shall get and set the thread creation\n<I>stacksize</I> attribute in the <I>attr</I> object. \n</P>\n<P>The <I>stacksize</I> attribute shall define the minimum stack size\n(in bytes) allocated for the created threads stack. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_THREAD_ATTR_STACKSIZE</B> in\npthread.h to indicate that these routines are implemented and may be\nused to set or get the stack size.</P>\n<P>Default value: 0 (in Pthreads-w32 a value of 0 means the stack\nwill grow as required)</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, <B>pthread_attr_getstacksize</B> and\n<B>pthread_attr_setstacksize</B> shall return a value of 0;\notherwise, an error number shall be returned to indicate the error. \n</P>\n<P>The <B>pthread_attr_getstacksize</B> function stores the <I>stacksize</I>\nattribute value in <I>stacksize</I> if successful. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_attr_setstacksize</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value of <I>stacksize</I> is less than {PTHREAD_STACK_MIN} or\n\texceeds a system-imposed limit. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_attr_init.html\"><B>pthread_attr_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_attr_setstackaddr.html\"><B>pthread_attr_getstackaddr</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_attr_init.html\"><B>pthread_attr_getdetachstate</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A> <B>,</B>\nthe Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;limits.h&gt;</I>, <I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_barrier_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_BARRIER_DESTROY&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 2.0  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;11372800\">\n\t<META NAME=\"CHANGEDBY\" CONTENT=\"Ross Johnson\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20060408;9450100\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_barrier_destroy, pthread_barrier_init - destroy and\ninitialize a barrier object (<B>ADVANCED REALTIME THREADS</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_barrier_destroy(pthread_barrier_t *</B><I>barrier</I><B>);\n<BR>int pthread_barrier_init(pthread_barrier_t *restrict</B> <I>barrier</I><B>,\nconst pthread_barrierattr_t *restrict</B> <I>attr</I><B>, unsigned</B>\n<I>count</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_barrier_destroy</B> function shall destroy the\nbarrier referenced by <I>barrier</I> and release any resources used\nby the barrier. The effect of subsequent use of the barrier is\nundefined until the barrier is reinitialized by another call to\n<B>pthread_barrier_init</B> . An implementation may use this function\nto set <I>barrier</I> to an invalid value. The results are undefined\nif <B>pthread_barrier_destroy</B> is called when any thread is\nblocked on the barrier, or if this function is called with an\nuninitialized barrier. \n</P>\n<P>The <B>pthread_barrier_init</B> function shall allocate any\nresources required to use the barrier referenced by <I>barrier</I>\nand shall initialize the barrier with attributes referenced by <I>attr</I>.\nIf <I>attr</I> is NULL, the default barrier attributes shall be used;\nthe effect is the same as passing the address of a default barrier\nattributes object. The results are undefined if <B>pthread_barrier_init</B>\nis called when any thread is blocked on the barrier (that is, has not\nreturned from the <A HREF=\"pthread_barrier_wait.html\"><B>pthread_barrier_wait</B>(3)</A>\ncall). The results are undefined if a barrier is used without first\nbeing initialized. The results are undefined if <B>pthread_barrier_init</B>\nis called specifying an already initialized barrier. \n</P>\n<P>The <I>count</I> argument specifies the number of threads that\nmust call <A HREF=\"pthread_barrier_wait.html\"><B>pthread_barrier_wait</B>(3)</A>\nbefore any of them successfully return from the call. The value\nspecified by <I>count</I> must be greater than zero. \n</P>\n<P>If the <B>pthread_barrier_init</B> function fails, the barrier\nshall not be initialized and the contents of <I>barrier</I> are\nundefined. \n</P>\n<P>Only the object referenced by <I>barrier</I> may be used for\nperforming synchronization. The result of referring to copies of that\nobject in calls to <B>pthread_barrier_destroy</B> <B>or</B>\n<A HREF=\"pthread_barrier_wait.html\"><B>pthread_barrier_wait</B>(3)</A>\nis undefined.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, these functions shall return zero;\notherwise, an error number shall be returned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_barrier_destroy</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EBUSY</B> \n\t</DT><DD>\n\tThe implementation has detected an attempt to destroy a barrier\n\twhile it is in use (for example, while being used in a\n\t<A HREF=\"pthread_barrier_wait.html\"><B>pthread_barrier_wait</B>(3)</A>\n\tcall) by another thread. \n\t</DD><DT>\n\t<B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>barrier</I> is invalid. \n\t</DD></DL>\n<P>\nThe <B>pthread_barrier_init</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>EAGAIN</B> \n\t</DT><DD>\n\tThe system lacks the necessary resources to initialize another\n\tbarrier. \n\t</DD><DT>\n\t<B>EINVAL</B> \n\t</DT><DD>\n\tThe value specified by <I>count</I> is equal to zero. \n\t</DD><DT>\n\t<B>ENOMEM</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tInsufficient memory exists to initialize the barrier. \n\t</DD></DL>\n<P>\nThe <B>pthread_barrier_init</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EBUSY</B> \n\t</DT><DD>\n\tThe implementation has detected an attempt to reinitialize a barrier\n\twhile it is in use (for example, while being used in a\n\t<A HREF=\"pthread_barrier_wait.html\"><B>pthread_barrier_wait</B>(3)</A>\n\tcall) by another thread. \n\t</DD><DT>\n\t<B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> is invalid. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>The <B>pthread_barrier_destroy</B> and <B>pthread_barrier_init</B>\nfunctions are part of the Barriers option and need not be provided on\nall implementations. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_BARRIERS</B> to indicate\nthat these routines are implemented and may be used.</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc11\" NAME=\"sect11\">Known Bugs</A></H2>\n<DL>\n\t<DD STYLE=\"margin-left: 0cm; margin-bottom: 0.5cm\">In\n\t<B><SPAN LANG=\"en-GB\"><SPAN LANG=\"en-GB\">pthreads-win32</SPAN></SPAN></B>,\n\t<A HREF=\"pthread_barrier_wait.html\"></A><A HREF=\"pthread_barrier_wait.html\"><B>pthread_barrier_wait</B>(3)</A><A HREF=\"pthread_barrier_wait.html\"></A>\n\tmay deadlock if the number of running threads able to wait on the\n\tbarrier object exceeds the value given as the <I><SPAN LANG=\"en-GB\"><SPAN LANG=\"en-GB\">count</SPAN></SPAN></I>\n\tparameter in <B>pthread_barrier_init</B>. \n\t</DD></DL>\n<H2>\n<A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_barrier_wait.html\"><B>pthread_barrier_wait</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect11\" NAME=\"toc11\">Known\n\tBugs</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_barrier_wait.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_BARRIER_WAIT&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 2.0  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;11484200\">\n\t<META NAME=\"CHANGEDBY\" CONTENT=\"Ross Johnson\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20060408;9504600\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_barrier_wait - synchronize at a barrier (<B>ADVANCED\nREALTIME THREADS</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_barrier_wait(pthread_barrier_t *</B><I>barrier</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_barrier_wait</B> function shall synchronize\nparticipating threads at the barrier referenced by <I>barrier</I>.\nThe calling thread shall block until the required number of threads\nhave called <B>pthread_barrier_wait</B> specifying the barrier. \n</P>\n<P>When the required number of threads have called\n<B>pthread_barrier_wait</B> specifying the barrier, the constant\n<B>PTHREAD_BARRIER_SERIAL_THREAD</B> shall be returned to one\nunspecified thread and zero shall be returned to each of the\nremaining threads. At this point, the barrier shall be reset to the\nstate it had as a result of the most recent <A HREF=\"pthread_barrier_init.html\"><B>pthread_barrier_init</B>(3)</A>\nfunction that referenced it. \n</P>\n<P>The constant <B>PTHREAD_BARRIER_SERIAL_THREAD</B> is defined in\n<I>&lt;pthread.h&gt;</I> and its value shall be distinct from any\nother value returned by <B>pthread_barrier_wait</B> . \n</P>\n<P>The results are undefined if this function is called with an\nuninitialized barrier. \n</P>\n<P>If a signal is delivered to a thread blocked on a barrier, upon\nreturn from the signal handler the thread shall resume waiting at the\nbarrier if the barrier wait has not completed (that is, if the\nrequired number of threads have not arrived at the barrier during the\nexecution of the signal handler); otherwise, the thread shall\ncontinue as normal from the completed barrier wait. Until the thread\nin the signal handler returns from it, it is unspecified whether\nother threads may proceed past the barrier once they have all reached\nit. \n</P>\n<P>A thread that has blocked on a barrier shall not prevent any\nunblocked thread that is eligible to use the same processing\nresources from eventually making forward progress in its execution.\nEligibility for processing resources shall be determined by the\nscheduling policy. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, the <B>pthread_barrier_wait</B>\nfunction shall return <B>PTHREAD_BARRIER_SERIAL_THREAD</B> for a\nsingle (arbitrary) thread synchronized at the barrier and zero for\neach of the other threads. Otherwise, an error number shall be\nreturned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_barrier_wait</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>barrier</I> does not refer to an\n\tinitialized barrier object. \n\t</DD></DL>\n<P>\nThis function shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>Applications using this function may be subject to priority\ninversion, as discussed in the Base Definitions volume of\nIEEE&nbsp;Std&nbsp;1003.1-2001, Section 3.285, Priority Inversion. \n</P>\n<P>The <B>pthread_barrier_wait</B> function is part of the Barriers\noption and need not be provided on all implementations. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_BARRIERS</B> to indicate\nthat this routine is implemented and may be used.</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc11\" NAME=\"sect11\">Known Bugs</A></H2>\n<DL>\n\t<DD STYLE=\"margin-left: 0cm; margin-bottom: 0.5cm\">In\n\t<B><SPAN LANG=\"en-GB\">pthreads-win32</SPAN></B>,\n\t<B>pthread_barrier_wait</B> may deadlock if the number of running\n\tthreads able to wait on the barrier object exceeds the value given\n\tas the <I><SPAN LANG=\"en-GB\">count</SPAN></I> parameter in\n\t<A HREF=\"pthread_barrier_init.html\"><B>pthread_barrier_init(3)</B></A>.\n\t\t</DD></DL>\n<H2>\n<A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_barrier_init.html\"><B>pthread_barrier_destroy</B>(3)</A>,\n<A HREF=\"pthread_barrier_init.html\"><B>pthread_barrier_init(3)</B></A>,\nthe Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect11\" NAME=\"toc11\">Known\n\tBugs</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_barrierattr_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_BARRIERATTR_DESTROY&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;11502600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18032300\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_barrierattr_destroy, pthread_barrierattr_init - destroy\nand initialize the barrier attributes object (<B>ADVANCED REALTIME\nTHREADS</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P>i<B>nt pthread_barrierattr_destroy(pthread_barrierattr_t *</B><I>attr</I><B>);\n<BR>int pthread_barrierattr_init(pthread_barrierattr_t *</B><I>attr</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_barrierattr_destroy</B> function shall destroy a\nbarrier attributes object. A destroyed <I>attr</I> attributes object\ncan be reinitialized using <B>pthread_barrierattr_init</B> ; the\nresults of otherwise referencing the object after it has been\ndestroyed are undefined. An implementation may cause\n<B>pthread_barrierattr_destroy</B> to set the object referenced by\n<I>attr</I> to an invalid value. \n</P>\n<P>The <B>pthread_barrierattr_init</B> function shall initialize a\nbarrier attributes object <I>attr</I> with the default value for all\nof the attributes defined by the implementation. \n</P>\n<P>Results are undefined if <B>pthread_barrierattr_init</B> is called\nspecifying an already initialized <I>attr</I> attributes object. \n</P>\n<P>After a barrier attributes object has been used to initialize one\nor more barriers, any function affecting the attributes object\n(including destruction) shall not affect any previously initialized\nbarrier. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>If successful, the <B>pthread_barrierattr_destroy</B> and\n<B>pthread_barrierattr_init</B> functions shall return zero;\notherwise, an error number shall be returned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_barrierattr_destroy</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> is invalid. \n\t</DD></DL>\n<P>\nThe <B>pthread_barrierattr_init</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>ENOMEM</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tInsufficient memory exists to initialize the barrier attributes\n\tobject. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>The <B>pthread_barrierattr_destroy</B> and\n<B>pthread_barrierattr_init</B> functions are part of the Barriers\noption and need not be provided on all implementations. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_BARRIERS</B> to indicate\nthat these routines are implemented and may be used.</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_barrierattr_setpshared.html\"><B>pthread_barrierattr_getpshared</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_barrierattr_setpshared.html\"><B>pthread_barrierattr_setpshared</B>(3)</A>\n, the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I>. \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_barrierattr_setpshared.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_BARRIERATTR_GETPSHARED&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;11552100\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18080400\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_barrierattr_getpshared, pthread_barrierattr_setpshared -\nget and set the process-shared attribute of the barrier attributes\nobject (<B>ADVANCED REALTIME THREADS</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_barrierattr_getpshared(const pthread_barrierattr_t\n* restrict</B> <I>attr</I><B>, int *restrict</B> <I>pshared</I><B>);\n<BR>int pthread_barrierattr_setpshared(pthread_barrierattr_t *</B><I>attr</I><B>,\nint</B> <I>pshared</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_barrierattr_getpshared</B> function shall obtain\nthe value of the <I>process-shared</I> attribute from the attributes\nobject referenced by <I>attr</I>. The <B>pthread_barrierattr_setpshared</B>\nfunction shall set the <I>process-shared</I> attribute in an\ninitialized attributes object referenced by <I>attr</I>. \n</P>\n<P>The <I>process-shared</I> attribute is set to\nPTHREAD_PROCESS_SHARED to permit a barrier to be operated upon by any\nthread that has access to the memory where the barrier is allocated.\nIf the <I>process-shared</I> attribute is PTHREAD_PROCESS_PRIVATE,\nthe barrier shall only be operated upon by threads created within the\nsame process as the thread that initialized the barrier; if threads\nof different processes attempt to operate on such a barrier, the\nbehavior is undefined. The default value of the attribute shall be\nPTHREAD_PROCESS_PRIVATE. Both constants PTHREAD_PROCESS_SHARED and\nPTHREAD_PROCESS_PRIVATE are defined in <I>&lt;pthread.h&gt;</I>. \n</P>\n<P><B>Pthreads-w32</B> defines _<B>POSIX_THREAD_PROCESS_SHARED</B> in\npthread.h as -1 to indicate that these routines are implemented but\nthat the process shared attribute is not supported.</P>\n<P>Additional attributes, their default values, and the names of the\nassociated functions to get and set those attribute values are\nimplementation-defined. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>If successful, the <B>pthread_barrierattr_getpshared</B> function\nshall return zero and store the value of the <I>process-shared</I>\nattribute of <I>attr</I> into the object referenced by the <I>pshared</I>\nparameter. Otherwise, an error number shall be returned to indicate\nthe error. \n</P>\n<P>If successful, the <B>pthread_barrierattr_setpshared</B> function\nshall return zero; otherwise, an error number shall be returned to\nindicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>These functions may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> is invalid. \n\t</DD><DT>\n\tThe <B>pthread_barrierattr_setpshared</B> function may fail if: \n\t</DT><DT>\n\t<B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe new value specified for the <I>process-shared</I> attribute is\n\tnot one of the legal values <B>PTHREAD_PROCESS_SHARED</B> or\n\t<B>PTHREAD_PROCESS_PRIVATE</B>. \n\t</DD><DT>\n\t<B>ENOSYS</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> was <B>PTHREAD_PROCESS_SHARED</B>\n\t(Pthreads-w32).</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>The <B>pthread_barrierattr_getpshared</B> and\n<B>pthread_barrierattr_setpshared</B> functions are part of the\nBarriers option and need not be provided on all implementations. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_BARRIERS</B> and\n<B>_POSIX_THREAD_PROCESS_SHARED</B> in pthread.h as -1 to indicate\nthat these routines are implemented and may be used, but do not\nsupport the process shared option.</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_barrier_init.html\"><B>pthread_barrier_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_barrierattr_init.html\"><B>pthread_barrierattr_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_barrierattr_init.html\"><B>pthread_barrierattr_init</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_cancel.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_CANCEL(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;12090500\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18220000\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_cancel, pthread_setcancelstate, pthread_setcanceltype,\npthread_testcancel - thread cancellation \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_cancel(pthread_t </B><I>thread</I><B>);</B> \n</P>\n<P><B>int pthread_setcancelstate(int </B><I>state</I><B>, int\n*</B><I>oldstate</I><B>);</B> \n</P>\n<P><B>int pthread_setcanceltype(int </B><I>type</I><B>, int\n*</B><I>oldtype</I><B>);</B> \n</P>\n<P><B>void pthread_testcancel(void);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Cancellation is the mechanism by which a thread can terminate the\nexecution of another thread. More precisely, a thread can send a\ncancellation request to another thread. Depending on its settings,\nthe target thread can then either ignore the request, honor it\nimmediately, or defer it until it reaches a cancellation point. \n</P>\n<P>When a thread eventually honors a cancellation request, it\nperforms as if <B>pthread_exit(PTHREAD_CANCELED)</B> has been called\nat that point: all cleanup handlers are executed in reverse order,\ndestructor functions for thread-specific data are called, and finally\nthe thread stops executing with the return value <B>PTHREAD_CANCELED</B>.\nSee <A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> for more\ninformation. \n</P>\n<P><B>pthread_cancel</B> sends a cancellation request to the thread\ndenoted by the <I>thread</I> argument. \n</P>\n<P><B>pthread_setcancelstate</B> changes the cancellation state for\nthe calling thread -- that is, whether cancellation requests are\nignored or not. The <I>state</I> argument is the new cancellation\nstate: either <B>PTHREAD_CANCEL_ENABLE</B> to enable cancellation, or\n<B>PTHREAD_CANCEL_DISABLE</B> to disable cancellation (cancellation\nrequests are ignored). If <I>oldstate</I> is not <B>NULL</B>, the\nprevious cancellation state is stored in the location pointed to by\n<I>oldstate</I>, and can thus be restored later by another call to\n<B>pthread_setcancelstate</B>. \n</P>\n<P><B>pthread_setcanceltype</B> changes the type of responses to\ncancellation requests for the calling thread: asynchronous\n(immediate) or deferred. The <I>type</I> argument is the new\ncancellation type: either <B>PTHREAD_CANCEL_ASYNCHRONOUS</B> to\ncancel the calling thread as soon as the cancellation request is\nreceived, or <B>PTHREAD_CANCEL_DEFERRED</B> to keep the cancellation\nrequest pending until the next cancellation point. If <I>oldtype</I>\nis not <B>NULL</B>, the previous cancellation state is stored in the\nlocation pointed to by <I>oldtype</I>, and can thus be restored later\nby another call to <B>pthread_setcanceltype</B>. \n</P>\n<P><B>Pthreads-w32</B> provides two levels of support for\n<B>PTHREAD_CANCEL_ASYNCHRONOUS</B>: full and partial. Full support\nrequires an additional DLL and driver be installed on the Windows\nsystem (see the See Also section below) that allows blocked threads\nto be cancelled immediately. Partial support means that the target\nthread will not cancel until it resumes execution naturally. Partial\nsupport is provided if either the DLL or the driver are not\nautomatically detected by the pthreads-w32 library at run-time.</P>\n<P>Threads are always created by <A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A>\nwith cancellation enabled and deferred. That is, the initial\ncancellation state is <B>PTHREAD_CANCEL_ENABLE</B> and the initial\ntype is <B>PTHREAD_CANCEL_DEFERRED</B>. \n</P>\n<P>Cancellation points are those points in the program execution\nwhere a test for pending cancellation requests is performed and\ncancellation is executed if positive. The following POSIX threads\nfunctions are cancellation points: \n</P>\n<P><A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A>\n<BR><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_wait</B>(3)</A>\n<BR><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_timedwait</B>(3)</A>\n<BR><A HREF=\"\"><B>pthread_testcancel</B>(3)</A> <BR><A HREF=\"sem_init.html\"><B>sem_wait</B>(3)</A>\n<BR><A HREF=\"sem_init.html\"><B>sem_timedwait</B>(3)</A> <BR><A HREF=\"pthread_kill.html\"><B>sigwait</B>(3)</A></P>\n<P><B>Pthreads-w32</B> provides two functions to enable additional\ncancellation points to be created in user functions that block on\nWin32 HANDLEs:</P>\n<P><A HREF=\"pthreadCancelableWait.html\">pthreadCancelableWait()</A>\n<BR><A HREF=\"pthreadCancelableTimedWait.html\">pthreadCancelableTimedWait()</A></P>\n<P>All other POSIX threads functions are guaranteed not to be\ncancellation points. That is, they never perform cancellation in\ndeferred cancellation mode. \n</P>\n<P><B>pthread_testcancel</B> does nothing except testing for pending\ncancellation and executing it. Its purpose is to introduce explicit\nchecks for cancellation in long sequences of code that do not call\ncancellation point functions otherwise. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P><B>pthread_cancel</B>, <B>pthread_setcancelstate</B> and\n<B>pthread_setcanceltype</B> return 0 on success and a non-zero error\ncode on error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P><B>pthread_cancel</B> returns the following error code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ESRCH</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tno thread could be found corresponding to that specified by the\n\t\t<I>thread</I> ID. \n\t\t</DD></DL>\n</DL>\n<P>\n<B>pthread_setcancelstate</B> returns the following error code on\nerror: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe <I>state</I> argument is not \n\t\t</DD></DL>\n</DL>\n<BLOCKQUOTE>\n<B>PTHREAD_CANCEL_ENABLE</B> nor <B>PTHREAD_CANCEL_DISABLE</B> \n</BLOCKQUOTE>\n<P><B>pthread_setcanceltype</B> returns the following error code on\nerror: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe <I>type</I> argument is not \n\t\t</DD></DL>\n</DL>\n<BLOCKQUOTE>\n<B>PTHREAD_CANCEL_DEFERRED</B> nor <B>PTHREAD_CANCEL_ASYNCHRONOUS</B>\n</BLOCKQUOTE>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<P><A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> ,\n<A HREF=\"pthread_cleanup_push.html\"><B>pthread_cleanup_push</B>(3)</A>\n, <A HREF=\"pthread_cleanup_pop.html\"><B>pthread_cleanup_pop</B>(3)</A>\n, Pthreads-w32 package README file 'Prerequisites' section. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Bugs</A></H2>\n<P>POSIX specifies that a number of system calls (basically, all\nsystem calls that may block, such as <A HREF=\"read.html\"><B>read</B>(2)</A>\n, <A HREF=\"write.html\"><B>write</B>(2)</A> , <A HREF=\"wait.html\"><B>wait</B>(2)</A>\n, etc.) and library functions that may call these system calls (e.g.\n<A HREF=\"fprintf.html\"><B>fprintf</B>(3)</A> ) are cancellation\npoints. <B>Pthreads-win32</B> is not integrated enough with the C\nlibrary to implement this, and thus none of the C library functions\nis a cancellation point. \n</P>\n<P>A workaround for these calls is to temporarily switch to\nasynchronous cancellation (assuming full asynchronous cancellation\nsupport is installed). So, checking for cancellation during a <B>read</B>\nsystem call, for instance, can be achieved as follows: \n</P>\n<BLOCKQUOTE><BR><BR>\n</BLOCKQUOTE>\n<PRE STYLE=\"margin-left: 1cm; margin-right: 1cm\">pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &amp;oldCancelType);\nread(fd, buffer, length);\npthread_setcanceltype(oldCancelType, NULL);</PRE>\n<HR>\n<BLOCKQUOTE><A NAME=\"toc\"></A><B>Table of Contents</B></BLOCKQUOTE>\n<UL>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">See\n\tAlso</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE><A HREF=\"#sect7\" NAME=\"toc7\">Bugs</A> \n\t</BLOCKQUOTE>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_cleanup_push.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_CLEANUP(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;20152200\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18252600\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_cleanup_push, pthread_cleanup_pop - install and remove\ncleanup handlers \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>void pthread_cleanup_push(void (*</B><I>routine</I><B>) (void\n*), void *</B><I>arg</I><B>);</B> \n</P>\n<P><B>void pthread_cleanup_pop(int </B><I>execute</I><B>);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Cleanup handlers are functions that get called when a thread\nterminates, either by calling <A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A>\nor because of cancellation. Cleanup handlers are installed and\nremoved following a stack-like discipline. \n</P>\n<P>The purpose of cleanup handlers is to free the resources that a\nthread may hold at the time it terminates. In particular, if a thread\nexits or is cancelled while it owns a locked mutex, the mutex will\nremain locked forever and prevent other threads from executing\nnormally. The best way to avoid this is, just before locking the\nmutex, to install a cleanup handler whose effect is to unlock the\nmutex. Cleanup handlers can be used similarly to free blocks\nallocated with <A HREF=\"malloc.html\"><B>malloc</B>(3)</A> or close\nfile descriptors on thread termination. \n</P>\n<P><B>pthread_cleanup_push</B> installs the <I>routine</I> function\nwith argument <I>arg</I> as a cleanup handler. From this point on to\nthe matching <B>pthread_cleanup_pop</B>, the function <I>routine</I>\nwill be called with arguments <I>arg</I> when the thread terminates,\neither through <A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A>\nor by cancellation. If several cleanup handlers are active at that\npoint, they are called in LIFO order: the most recently installed\nhandler is called first. \n</P>\n<P><B>pthread_cleanup_pop</B> removes the most recently installed\ncleanup handler. If the <I>execute</I> argument is not 0, it also\nexecutes the handler, by calling the <I>routine</I> function with\narguments <I>arg</I>. If the <I>execute</I> argument is 0, the\nhandler is only removed but not executed. \n</P>\n<P>Matching pairs of <B>pthread_cleanup_push</B> and\n<B>pthread_cleanup_pop</B> must occur in the same function, at the\nsame level of block nesting. Actually, <B>pthread_cleanup_push</B>\nand <B>pthread_cleanup_pop</B> are macros, and the expansion of\n<B>pthread_cleanup_push</B> introduces an open brace <B>{</B> with\nthe matching closing brace <B>}</B> being introduced by the expansion\nof the matching <B>pthread_cleanup_pop</B>. \n</P>\n<H2 STYLE=\"margin-top: 0cm\"><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\">None. \n</BLOCKQUOTE>\n<H2 STYLE=\"margin-top: 0cm\"><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\">None. \n</BLOCKQUOTE>\n<H2 STYLE=\"margin-top: 0cm\"><A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\">Xavier Leroy\n&lt;Xavier.Leroy@inria.fr&gt; \n</BLOCKQUOTE>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\">Modified by\nRoss Johnson for use with Pthreads-w32.</BLOCKQUOTE>\n<H2 STYLE=\"margin-top: 0cm\"><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\"><A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A>\n, <A HREF=\"pthread_cancel.html\"><B>pthread_cancel</B>(3)</A> ,\n<A HREF=\"pthread_cancel.html\"><B>pthread_setcanceltype</B>(3)</A> . \n</BLOCKQUOTE>\n<H2 STYLE=\"margin-top: 0cm\"><A HREF=\"#toc7\" NAME=\"sect7\">Example</A></H2>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\">Here is how\nto lock a mutex <I>mut</I> in such a way that it will be unlocked if\nthe thread is canceled while <I>mut</I> is locked: \n</BLOCKQUOTE>\n<PRE>pthread_cleanup_push(pthread_mutex_unlock, (void *) &amp;mut);\npthread_mutex_lock(&amp;mut);\n/* do some work */\npthread_mutex_unlock(&amp;mut);\npthread_cleanup_pop(0);</PRE><BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\">\nEquivalently, the last two lines can be replaced by \n</BLOCKQUOTE>\n<PRE STYLE=\"margin-bottom: 0.5cm\">pthread_cleanup_pop(1);</PRE><BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\">\nNotice that the code above is safe only in deferred cancellation mode\n(see <A HREF=\"pthread_cancel.html\"><B>pthread_setcanceltype</B>(3)</A>\n). In asynchronous cancellation mode, a cancellation can occur\nbetween <B>pthread_cleanup_push</B> and <B>pthread_mutex_lock</B>, or\nbetween <B>pthread_mutex_unlock</B> and <B>pthread_cleanup_pop</B>,\nresulting in both cases in the thread trying to unlock a mutex not\nlocked by the current thread. This is the main reason why\nasynchronous cancellation is difficult to use. \n</BLOCKQUOTE>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\">If the code\nabove must also work in asynchronous cancellation mode, then it must\nswitch to deferred mode for locking and unlocking the mutex: \n</BLOCKQUOTE>\n<PRE>pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &amp;oldtype);\npthread_cleanup_push(pthread_mutex_unlock, (void *) &amp;mut);\npthread_mutex_lock(&amp;mut);\n/* do some work */\npthread_cleanup_pop(1);\npthread_setcanceltype(oldtype, NULL);</PRE>\n<HR>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\"><A NAME=\"toc\"></A>\n<B>Table of Contents</B></BLOCKQUOTE>\n<UL>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">See\n\tAlso</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Example</A>\n\t\t</BLOCKQUOTE>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_cond_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_COND(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;16454400\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;19004700\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_cond_init, pthread_cond_destroy, pthread_cond_signal,\npthread_cond_broadcast, pthread_cond_wait, pthread_cond_timedwait -\noperations on conditions \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>pthread_cond_t </B><I>cond</I> <B>= PTHREAD_COND_INITIALIZER;</B>\n</P>\n<P><B>int pthread_cond_init(pthread_cond_t *</B><I>cond</I><B>,\npthread_condattr_t *</B><I>cond_attr</I><B>);</B> \n</P>\n<P><B>int pthread_cond_signal(pthread_cond_t *</B><I>cond</I><B>);</B>\n</P>\n<P><B>int pthread_cond_broadcast(pthread_cond_t *</B><I>cond</I><B>);</B>\n</P>\n<P><B>int pthread_cond_wait(pthread_cond_t *</B><I>cond</I><B>,\npthread_mutex_t *</B><I>mutex</I><B>);</B> \n</P>\n<P><B>int pthread_cond_timedwait(pthread_cond_t *</B><I>cond</I><B>,\npthread_mutex_t *</B><I>mutex</I><B>, const struct timespec\n*</B><I>abstime</I><B>);</B> \n</P>\n<P><B>int pthread_cond_destroy(pthread_cond_t *</B><I>cond</I><B>);</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>A condition (short for ‘‘condition variable’’) is a\nsynchronization device that allows threads to suspend execution and\nrelinquish the processors until some predicate on shared data is\nsatisfied. The basic operations on conditions are: signal the\ncondition (when the predicate becomes true), and wait for the\ncondition, suspending the thread execution until another thread\nsignals the condition. \n</P>\n<P>A condition variable must always be associated with a mutex, to\navoid the race condition where a thread prepares to wait on a\ncondition variable and another thread signals the condition just\nbefore the first thread actually waits on it. \n</P>\n<P><B>pthread_cond_init</B> initializes the condition variable <I>cond</I>,\nusing the condition attributes specified in <I>cond_attr</I>, or\ndefault attributes if <I>cond_attr</I> is <B>NULL</B>. \n</P>\n<P>Variables of type <B>pthread_cond_t</B> can also be initialized\nstatically, using the constant <B>PTHREAD_COND_INITIALIZER</B>. In\nthe <B>Pthreads-w32</B> implementation, an application should still\ncall <B>pthread_cond_destroy</B> at some point to ensure that any\nresources consumed by the condition variable are released.</P>\n<P><B>pthread_cond_signal</B> restarts one of the threads that are\nwaiting on the condition variable <I>cond</I>. If no threads are\nwaiting on <I>cond</I>, nothing happens. If several threads are\nwaiting on <I>cond</I>, exactly one is restarted, but it is not\nspecified which. \n</P>\n<P><B>pthread_cond_broadcast</B> restarts all the threads that are\nwaiting on the condition variable <I>cond</I>. Nothing happens if no\nthreads are waiting on <I>cond</I>. \n</P>\n<P><B>pthread_cond_wait</B> atomically unlocks the <I>mutex</I> (as\nper <B>pthread_unlock_mutex</B>) and waits for the condition variable\n<I>cond</I> to be signalled. The thread execution is suspended and\ndoes not consume any CPU time until the condition variable is\nsignalled. The <I>mutex</I> must be locked by the calling thread on\nentrance to <B>pthread_cond_wait</B>. Before returning to the calling\nthread, <B>pthread_cond_wait</B> re-acquires <I>mutex</I> (as per\n<B>pthread_lock_mutex</B>). \n</P>\n<P>Unlocking the mutex and suspending on the condition variable is\ndone atomically. Thus, if all threads always acquire the mutex before\nsignalling the condition, this guarantees that the condition cannot\nbe signalled (and thus ignored) between the time a thread locks the\nmutex and the time it waits on the condition variable. \n</P>\n<P><B>pthread_cond_timedwait</B> atomically unlocks <I>mutex</I> and\nwaits on <I>cond</I>, as <B>pthread_cond_wait</B> does, but it also\nbounds the duration of the wait. If <I>cond</I> has not been\nsignalled within the amount of time specified by <I>abstime</I>, the\nmutex <I>mutex</I> is re-acquired and <B>pthread_cond_timedwait</B>\nreturns the error <B>ETIMEDOUT</B>. The <I>abstime</I> parameter\nspecifies an absolute time, with the same origin as <A HREF=\"time.html\"><B>time</B>(2)</A>\nand <A HREF=\"gettimeofday.html\"><B>gettimeofday</B>(2)</A>. \n</P>\n<P><B>pthread_cond_destroy</B> destroys a condition variable, freeing\nthe resources it might hold. No threads must be waiting on the\ncondition variable on entrance to <B>pthread_cond_destroy</B>.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P><B>pthread_cond_wait</B> and <B>pthread_cond_timedwait</B> are\ncancellation points. If a thread is cancelled while suspended in one\nof these functions, the thread immediately resumes execution, then\nlocks again the <I>mutex</I> argument to <B>pthread_cond_wait</B> and\n<B>pthread_cond_timedwait</B>, and finally executes the cancellation.\nConsequently, cleanup handlers are assured that <I>mutex</I> is\nlocked when they are called. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Async-signal Safety</A></H2>\n<P>The condition functions are not async-signal safe, and should not\nbe called from a signal handler. In particular, calling\n<B>pthread_cond_signal</B> or <B>pthread_cond_broadcast</B> from a\nsignal handler may deadlock the calling thread. \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Return Value</A></H2>\n<P>All condition variable functions return 0 on success and a\nnon-zero error code on error. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Errors</A></H2>\n<P><B>pthread_cond_init</B>, <B>pthread_cond_signal</B>,\n<B>pthread_cond_broadcast</B>, and <B>pthread_cond_wait</B> never\nreturn an error code. \n</P>\n<P>The <B>pthread_cond_init</B> function returns the following error\ncodes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe <I>cond</I> argument is invalid. \n\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>ENOMEM</B> \n\t\t</DT></DL>\n</DL>\n<BLOCKQUOTE STYLE=\"margin-left: 4cm\">\nThere was not enough memory to allocate the condition variable. \n</BLOCKQUOTE>\n<P>The <B>pthread_cond_signal</B> function returns the following\nerror codes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe <I>cond</I> argument is invalid. \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_cond_broadcast</B> function returns the following\nerror codes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe <I>cond</I> argument is invalid. \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_cond_wait</B> function returns the following error\ncodes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe <I>cond</I> argument is invalid. \n\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>ENOMEM</B> \n\t\t</DT></DL>\n</DL>\n<BLOCKQUOTE STYLE=\"margin-left: 4cm\">\nThere was not enough memory to allocate the statically initialised\ncondition variable. Statically initialised condition variables are\ndynamically allocated by the first thread to wait on them.</BLOCKQUOTE>\n<P>The <B>pthread_cond_timedwait</B> function returns the following\nerror codes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT></DL>\n</DL>\n<P STYLE=\"margin-left: 2cm\">\nThe <I>cond</I> argument is invalid. \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ETIMEDOUT</B>\n\t\t\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe condition variable was not signalled before the timeout\n\t\tspecified by <I>abstime</I> \n\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>ENOMEM</B> \n\t\t</DT></DL>\n</DL>\n<BLOCKQUOTE STYLE=\"margin-left: 4cm\">\nThere was not enough memory to allocate the statically initialised\ncondition variable. Statically initialised condition variables are\ndynamically allocated by the first thread to wait on them. \n</BLOCKQUOTE>\n<P>The <B>pthread_cond_destroy</B> function returns the following\nerror code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT></DL>\n</DL>\n<P STYLE=\"margin-left: 2cm; margin-right: 1cm\">\nThe <I>cond</I> argument is invalid. \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EBUSY</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tSome threads are currently waiting on <I>cond</I>. \n\t\t</DD></DL>\n</DL>\n<H2>\n<A HREF=\"#toc7\" NAME=\"sect7\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">See Also</A></H2>\n<P><A HREF=\"pthread_condattr_init.html\"><B>pthread_condattr_init</B>(3)</A>\n, <A HREF=\"pthread_mutex_lock.html\"><B>pthread_mutex_lock</B>(3)</A>\n, <A HREF=\"pthread_mutex_unlock.html\"><B>pthread_mutex_unlock</B>(3)</A>\n, <A HREF=\"pthread_cancel.html\"><B>pthread_cancel(3)</B></A>. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">Example</A></H2>\n<P>Consider two shared variables <I>x</I> and <I>y</I>, protected by\nthe mutex <I>mut</I>, and a condition variable <I>cond</I> that is to\nbe signaled whenever <I>x</I> becomes greater than <I>y</I>. \n</P>\n<PRE STYLE=\"margin-left: 1cm; margin-right: 1cm\">int x,y;\npthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;\npthread_cond_t cond = PTHREAD_COND_INITIALIZER;</PRE><BLOCKQUOTE>\nWaiting until <I>x</I> is greater than <I>y</I> is performed as\nfollows: \n</BLOCKQUOTE>\n<PRE STYLE=\"margin-left: 1.01cm\">pthread_mutex_lock(&amp;mut);\nwhile (x &lt;= y) {\n        pthread_cond_wait(&amp;cond, &amp;mut);\n}\n/* operate on x and y */\npthread_mutex_unlock(&amp;mut);</PRE><BLOCKQUOTE STYLE=\"margin-left: 3.01cm\">\nModifications on <I>x</I> and <I>y</I> that may cause <I>x</I> to\nbecome greater than <I>y</I> should signal the condition if needed: \n</BLOCKQUOTE>\n<PRE STYLE=\"margin-left: 1.01cm\">pthread_mutex_lock(&amp;mut);\n/* modify x and y */\nif (x &gt; y) pthread_cond_broadcast(&amp;cond);\npthread_mutex_unlock(&amp;mut);</PRE><BLOCKQUOTE STYLE=\"margin-left: 3.01cm\">\nIf it can be proved that at most one waiting thread needs to be waken\nup (for instance, if there are only two threads communicating through\n<I>x</I> and <I>y</I>), <B>pthread_cond_signal</B> can be used as a\nslightly more efficient alternative to <B>pthread_cond_broadcast</B>.\nIf in doubt, use <B>pthread_cond_broadcast</B>. \n</BLOCKQUOTE>\n<BLOCKQUOTE STYLE=\"margin-left: 3.01cm\">To wait for <I>x</I> to\nbecome greater than <I>y</I> with a timeout of 5 seconds, do: \n</BLOCKQUOTE>\n<PRE STYLE=\"margin-left: 1.01cm\">struct timeval now;\nstruct timespec timeout;\nint retcode;\npthread_mutex_lock(&amp;mut);\ngettimeofday(&amp;now);\ntimeout.tv_sec = now.tv_sec + 5;\ntimeout.tv_nsec = now.tv_usec * 1000;\nretcode = 0;\nwhile (x &lt;= y &amp;&amp; retcode != ETIMEDOUT) {\n        retcode = pthread_cond_timedwait(&amp;cond, &amp;mut, &amp;timeout);\n}\nif (retcode == ETIMEDOUT) {\n        /* timeout occurred */\n} else {\n        /* operate on x and y */\n}\npthread_mutex_unlock(&amp;mut);</PRE>\n<HR>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\"><A NAME=\"toc\"></A>\n<B>Table of Contents</B></BLOCKQUOTE>\n<UL>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Async-signal\n\tSafety</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Return\n\tValue</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Errors</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Author</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm; margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">See\n\tAlso</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">Example</A>\n\t\t</BLOCKQUOTE>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_condattr_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_CONDATTR(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;16375600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050504;16570300\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_condattr_init, pthread_condattr_destroy - condition\ncreation \n</P>\n<P>attributes \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_condattr_init(pthread_condattr_t *</B><I>attr</I><B>);</B>\n</P>\n<P><B>int pthread_condattr_destroy(pthread_condattr_t *</B><I>attr</I><B>);</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Condition attributes can be specified at condition creation time,\nby passing a condition attribute object as second argument to\n<A HREF=\"pthread_cond_init.html\"><B>pthread_cond_init</B>(3)</A> .\nPassing <B>NULL</B> is equivalent to passing a condition attribute\nobject with all attributes set to their default values. \n</P>\n<P><B>pthread_condattr_init</B> initializes the condition attribute\nobject <I>attr</I> and fills it with default values for the\nattributes. <B>pthread_condattr_destroy</B> destroys a condition\nattribute object, which must not be reused until it is reinitialized.</P>\n<P><B>Pthreads-w32</B> defines _<B>POSIX_THREAD_PROCESS_SHARED</B> in\npthread.h as -1 to indicate that the attribute routines are\nimplemented but that the process shared attribute is not supported.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>All condition variable functions return 0 on success and a\nnon-zero error code on error.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_condattr_init</B> function returns the following\nerror code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ENOMEM</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe was insufficient memory to create the attribute.<SPAN STYLE=\"font-weight: medium\">\n\t\t</SPAN>\n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_condattr_destroy</B> function returns the following\nerror code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe <I>attr</I> argument is not valid.<SPAN STYLE=\"font-weight: medium\">\n\t\t</SPAN>\n\t\t</DD></DL>\n</DL>\n<H2>\n<A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<P><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_init</B>(3)</A> .\n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">See Also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_condattr_setpshared.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_CONDATTR_GETPSHARED&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;17542300\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18293100\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_condattr_getpshared, pthread_condattr_setpshared - get and\nset the process-shared condition variable attributes \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_condattr_getpshared(const pthread_condattr_t\n*restrict</B> <I>attr</I><B>, int *restrict</B> <I>pshared</I><B>);\n<BR>int pthread_condattr_setpshared(pthread_condattr_t *</B><I>attr</I><B>,\nint</B> <I>pshared</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_condattr_getpshared</B> function shall obtain the\nvalue of the <I>process-shared</I> attribute from the attributes\nobject referenced by <I>attr</I>. The <B>pthread_condattr_setpshared</B>\nfunction shall set the <I>process-shared</I> attribute in an\ninitialized attributes object referenced by <I>attr</I>. \n</P>\n<P>The <I>process-shared</I> attribute is set to\n<B>PTHREAD_PROCESS_SHARED</B> to permit a condition variable to be\noperated upon by any thread that has access to the memory where the\ncondition variable is allocated, even if the condition variable is\nallocated in memory that is shared by multiple processes. If the\n<I>process-shared</I> attribute is <B>PTHREAD_PROCESS_PRIVATE</B>,\nthe condition variable shall only be operated upon by threads created\nwithin the same process as the thread that initialized the condition\nvariable; if threads of differing processes attempt to operate on\nsuch a condition variable, the behavior is undefined. The default\nvalue of the attribute is <B>PTHREAD_PROCESS_PRIVATE</B>. \n</P>\n<P><B>Pthreads-w32</B> defines _<B>POSIX_THREAD_PROCESS_SHARED</B> in\npthread.h as -1 to indicate that these routines are implemented but\nthat the process shared attribute is not supported.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>If successful, the <B>pthread_condattr_setpshared</B> function\nshall return zero; otherwise, an error number shall be returned to\nindicate the error. \n</P>\n<P>If successful, the <B>pthread_condattr_getpshared</B> function\nshall return zero and store the value of the <I>process-shared</I>\nattribute of <I>attr</I> into the object referenced by the <I>pshared</I>\nparameter. Otherwise, an error number shall be returned to indicate\nthe error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_condattr_getpshared</B> and\n<B>pthread_condattr_setpshared</B> functions may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> is invalid. \n\t</DD></DL>\n<P>\nThe <B>pthread_condattr_setpshared</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe new value specified for the attribute is outside the range of\n\tlegal values for that attribute. \n\t</DD><DT>\n\t<B>ENOSYS</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> was <B>PTHREAD_PROCESS_SHARED</B>\n\t(Pthreads-w32).</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_THREAD_PROCESS_SHARED</B> in\npthread.h as -1 to indicate that these routines are implemented and\nmay be used, but do not support the process shared option.</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A> <B>,</B>\n<A HREF=\"pthread_cond_init.html\"><B>pthread_cond_destroy</B>(3)</A> <B>,</B>\n<A HREF=\"pthread_condattr_init.html\"><B>pthread_condattr_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_destroy</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_create.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_CREATE(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;19394700\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050504;20140200\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_create - create a new thread \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_create(pthread_t * </B><I>thread</I><B>,\npthread_attr_t * </B><I>attr</I><B>, void * (*</B><I>start_routine</I><B>)(void\n*), void * </B><I>arg</I><B>);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P><B>pthread_create</B> creates a new thread of control that\nexecutes concurrently with the calling thread. The new thread applies\nthe function <I>start_routine</I> passing it <I>arg</I> as first\nargument. The new thread terminates either explicitly, by calling\n<A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> , or\nimplicitly, by returning from the <I>start_routine</I> function. The\nlatter case is equivalent to calling <A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A>\nwith the result returned by <I>start_routine</I> as exit code. \n</P>\n<P>The initial signal state of the new thread is inherited from it's\ncreating thread and there are no pending signals. <B>Pthreads-w32</B>\ndoes not yet implement signals.</P>\n<P>The <I>attr</I> argument specifies thread attributes to be applied\nto the new thread. See <A HREF=\"pthread_attr_init.html\"><B>pthread_attr_init</B>(3)</A>\nfor a complete list of thread attributes. The <I>attr</I> argument\ncan also be <B>NULL</B>, in which case default attributes are used:\nthe created thread is joinable (not detached) and has default (non\nreal-time) scheduling policy. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>On success, the identifier of the newly created thread is stored\nin the location pointed by the <I>thread</I> argument, and a 0 is\nreturned. On error, a non-zero error code is returned. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<DL>\n\t<DT><B>EAGAIN</B> \n\t</DT><DL>\n\t\t<DL>\n\t\t\t<DT>\n\t\t\tNot enough system resources to create a process for the new\n\t\t\tthread, or<BR>more than <B>PTHREAD_THREADS_MAX</B> threads are\n\t\t\talready active. \n\t\t\t</DT></DL>\n\t</DL>\n</DL>\n<H2>\n<A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<P><A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> ,\n<A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A> ,\n<A HREF=\"pthread_detach.html\"><B>pthread_detach</B>(3)</A> ,\n<A HREF=\"pthread_attr_init.html\"><B>pthread_attr_init</B>(3)</A> . \n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">See Also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_delay_np.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_DELAY_NP manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;322600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;21371500\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P STYLE=\"font-weight: medium\">pthread_delay_np – suspend the\nthread for a specified period</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_delay_np (const struct timespec *</B>interval<B>);</B></P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P><B>pthread_delay_np</B> causes a thread to delay execution for a\nspecific period of time. This period ends at the current time plus\nthe specified interval. The routine will not return before the end of\nthe period is reached, but may return an arbitrary amount of time\nafter the period has gone by. This can be due to system load, thread\npriorities, and system timer granularity.</P>\n<P>Specifying an interval of zero (0) seconds and zero (0)\nnanoseconds is allowed and can be used to force the thread to give up\nthe processor or to deliver a pending cancellation request.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P><B>pthread_delay_np </B>is a cancellation point.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Return Value</A></H2>\n<P>If an error condition occurs, <B>pthread_delay_np</B> returns an\ninteger value indicating the type of error.</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<P>The <B>pthread_delay_np</B> function returns the following error\ncode on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT></DL>\n</DL>\n<P STYLE=\"margin-left: 2cm\">\nThe value specified by interval is invalid.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">Author</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_detach.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_DETACH(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 2.0  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;18010700\">\n\t<META NAME=\"CHANGEDBY\" CONTENT=\"Ross Johnson\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20060408;9255600\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_detach - put a running thread in the detached state \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_detach(pthread_t </B><I>th</I><B>);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P><B>pthread_detach</B> puts the thread <I>th</I> in the detached\nstate. This guarantees that the resources consumed by <I>th</I> will\nbe freed immediately when <I>th</I> terminates. However, this\nprevents other threads from synchronizing on the termination of <I>th</I>\nusing <B>pthread_join</B>. If, when <B>pthread_detach</B> is called,\n<I>th</I> has already terminated, all of <I>th</I>'s remaining\nresources will be freed.</P>\n<P>A thread can be created initially in the detached state, using the\n<B>detachstate</B> attribute to <A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A>\n. In contrast, <B>pthread_detach</B> applies to threads created in\nthe joinable state, and which need to be put in the detached state\nlater. \n</P>\n<P>After <B>pthread_detach</B> completes, subsequent attempts to\nperform <B>pthread_join</B> on <I>th</I> will fail. If another thread\nis already joining the thread <I>th</I> at the time <B>pthread_detach</B>\nis called, <I>th</I> will be detached and <B>pthread_join</B> will\neventually return when <I>th</I> terminates but may not return with\n<I>th</I>'s correct return code. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>On success, 0 is returned. On error, a non-zero error code is\nreturned. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<DL>\n\t<DT><B>ESRCH</B> \n\t</DT><DD>\n\tNo thread could be found corresponding to that specified by <I>th</I>\n\t\t</DD><DT>\n\t<B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tthe thread <I>th</I> is already in the detached state \n\t</DD></DL>\n<H2>\n<A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with Pthreads-w32.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<P><A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A> ,\n<A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A> ,\n<A HREF=\"pthread_attr_init.html\"><B>pthread_attr_setdetachstate</B>(3)</A>\n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">See Also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_equal.html",
    "content": "<!-- manual page source format generated by PolyglotMan v3.2, -->\n<!-- available at http://polyglotman.sourceforge.net/ -->\n\n<html>\n<head>\n<title>PTHREAD_EQUAL(3) manual page</title>\n</head>\n<body bgcolor='white'>\n<a href='#toc'>Table of Contents</a><p>\n\n<p> \n<h2><a name='sect0' href='#toc0'>Name</a></h2>\npthread_equal - compare two thread identifiers \n<p> \n<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>\n<b>#include &lt;pthread.h&gt;</b>\n\n<p> <b>int pthread_equal(pthread_t </b><i>thread1</i><b>, pthread_t </b><i>thread2</i><b>);</b> \n<p> \n<h2><a name='sect2' href='#toc2'>Description</a></h2>\n<b>pthread_equal</b>\ndetermines if two thread identifiers refer to the same thread. \n<p> \n<h2><a name='sect3' href='#toc3'>Return Value</a></h2>\nA\nnon-zero value is returned if  <i>thread1</i> and  <i>thread2</i> refer to the same thread.\nOtherwise, 0 is returned. \n<p> \n<h2><a name='sect4' href='#toc4'>Author</a></h2>\nXavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n<p> \n<h2><a name='sect5' href='#toc5'>See Also</a></h2>\n<a href='file:pthread_self.html'><b>pthread_self</b>(3)</a>\n.\n<p>\n\n<hr><p>\n<a name='toc'><b>Table of Contents</b></a><p>\n<ul>\n<li><a name='toc0' href='#sect0'>Name</a></li>\n<li><a name='toc1' href='#sect1'>Synopsis</a></li>\n<li><a name='toc2' href='#sect2'>Description</a></li>\n<li><a name='toc3' href='#sect3'>Return Value</a></li>\n<li><a name='toc4' href='#sect4'>Author</a></li>\n<li><a name='toc5' href='#sect5'>See Also</a></li>\n</ul>\n</body>\n</html>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_exit.html",
    "content": "<!-- manual page source format generated by PolyglotMan v3.2, -->\n<!-- available at http://polyglotman.sourceforge.net/ -->\n\n<html>\n<head>\n<title>PTHREAD_EXIT(3) manual page</title>\n</head>\n<body bgcolor='white'>\n<a href='#toc'>Table of Contents</a><p>\n\n<p> \n<h2><a name='sect0' href='#toc0'>Name</a></h2>\npthread_exit - terminate the calling thread \n<p> \n<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>\n<b>#include &lt;pthread.h&gt;</b>\n\n<p> <b>void pthread_exit(void *</b><i>retval</i><b>);</b> \n<p> \n<h2><a name='sect2' href='#toc2'>Description</a></h2>\n<b>pthread_exit</b> terminates the\nexecution of the calling thread. All cleanup handlers that have been set\nfor the calling thread with <a href='file:pthread_cleanup_push.html'><b>pthread_cleanup_push</b>(3)</a>\n are executed in reverse\norder (the most recently pushed handler is executed first). Finalization\nfunctions for thread-specific data are then called for all keys that have\nnon- <b>NULL</b> values associated with them in the calling thread (see <a href='file:pthread_key_create.html'><b>pthread_key_create</b>(3)</a>\n).\nFinally, execution of the calling thread is stopped. \n<p> The  <i>retval</i> argument\nis the return value of the thread. It can be consulted from another thread\nusing  <a href='file:pthread_join.html'><b>pthread_join</b>(3)</a>\n. \n<p> \n<h2><a name='sect3' href='#toc3'>Return Value</a></h2>\nThe  <b>pthread_exit</b> function never returns.\n\n<p> \n<h2><a name='sect4' href='#toc4'>Author</a></h2>\nXavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n<p> \n<h2><a name='sect5' href='#toc5'>See Also</a></h2>\n<a href='file:pthread_create.html'><b>pthread_create</b>(3)</a>\n, <a href='file:pthread_join.html'><b>pthread_join</b>(3)</a>\n.\n<p>\n\n<hr><p>\n<a name='toc'><b>Table of Contents</b></a><p>\n<ul>\n<li><a name='toc0' href='#sect0'>Name</a></li>\n<li><a name='toc1' href='#sect1'>Synopsis</a></li>\n<li><a name='toc2' href='#sect2'>Description</a></li>\n<li><a name='toc3' href='#sect3'>Return Value</a></li>\n<li><a name='toc4' href='#sect4'>Author</a></li>\n<li><a name='toc5' href='#sect5'>See Also</a></li>\n</ul>\n</body>\n</html>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_getw32threadhandle_np.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_GETW32THREADHANDLE_NP manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;322600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;21523500\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P STYLE=\"font-weight: medium\">pthread_getw32threadhandle_np – get\nthe Win32 thread handle associated with a thread</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>HANDLE pthread_getw32threadhandle_np(pthread_t</B> <I>thread</I><B>);</B></P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Returns the Win32 native thread <B>HANDLE</B> that the POSIX\nthread <I>thread</I> is running as.</P>\n<P>Applications can use the Win32 handle to set Win32 specific\nattributes of the thread.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P>None.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Return Value</A></H2>\n<P><B>pthread_getw32threadhandle_np</B> returns the Win32 native\nthread <B>HANDLE</B> for the specified POSIX thread <I>thread</I>.</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<P>None.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">Author</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_join.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_JOIN(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;18232700\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050504;18421400\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_join - wait for termination of another thread \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_join(pthread_t </B><I>th</I><B>, void\n**</B><I>thread_return</I><B>);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P><B>pthread_join</B> suspends the execution of the calling thread\nuntil the thread identified by <I>th</I> terminates, either by\ncalling <A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> or by\nbeing cancelled. \n</P>\n<P>If <I>thread_return</I> is not <B>NULL</B>, the return value of <I>th</I>\nis stored in the location pointed to by <I>thread_return</I>. The\nreturn value of <I>th</I> is either the argument it gave to\n<A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> , or\n<B>PTHREAD_CANCELED</B> if <I>th</I> was cancelled. \n</P>\n<P>The joined thread <B>th</B> must be in the joinable state: it must\nnot have been detached using <A HREF=\"pthread_detach.html\"><B>pthread_detach</B>(3)</A>\nor the <B>PTHREAD_CREATE_DETACHED</B> attribute to <A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A>\n. \n</P>\n<P>When a joinable thread terminates, its memory resources (thread\ndescriptor and stack) are not deallocated until another thread\nperforms <B>pthread_join</B> on it. Therefore, <B>pthread_join</B>\nmust be called once for each joinable thread created to avoid memory\nleaks. \n</P>\n<P>At most one thread can wait for the termination of a given thread.\nCalling <B>pthread_join</B> on a thread <I>th</I> on which another\nthread is already waiting for termination returns an error. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P><B>pthread_join</B> is a cancellation point. If a thread is\ncancelled while suspended in <B>pthread_join</B>, the thread\nexecution resumes immediately and the cancellation is executed\nwithout waiting for the <I>th</I> thread to terminate. If\ncancellation occurs during <B>pthread_join</B>, the <I>th</I> thread\nremains not joined. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Return Value</A></H2>\n<P>On success, the return value of <I>th</I> is stored in the\nlocation pointed to by <I>thread_return</I>, and 0 is returned. On\nerror, a non-zero error code is returned. \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<DL>\n\t<DT><B>ESRCH</B> \n\t</DT><DD>\n\tNo thread could be found corresponding to that specified by <I>th</I>.\n\t\t</DD><DT>\n\t<B>EINVAL</B> \n\t</DT><DD>\n\tThe <I>th</I> thread has been detached. \n\t</DD><DT>\n\t<B>EINVAL</B> \n\t</DT><DD>\n\tAnother thread is already waiting on termination of <I>th</I>. \n\t</DD><DT>\n\t<B>EDEADLK</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe <I>th</I> argument refers to the calling thread. \n\t</DD></DL>\n<H2>\n<A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">See Also</A></H2>\n<P><A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> ,\n<A HREF=\"pthread_detach.html\"><B>pthread_detach</B>(3)</A> ,\n<A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A> ,\n<A HREF=\"pthread_attr_setdetachstate.html\"><B>pthread_attr_setdetachstate</B>(3)</A>\n, <A HREF=\"pthread_cleanup_push.html\"><B>pthread_cleanup_push</B>(3)</A>\n, <A HREF=\"pthread_key_create.html\"><B>pthread_key_create</B>(3)</A>\n. \n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect7\" NAME=\"toc7\">See Also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_key_create.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_SPECIFIC(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;18425400\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050509;18220200\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_key_create, pthread_key_delete, pthread_setspecific,\npthread_getspecific - management of thread-specific data \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_key_create(pthread_key_t *</B><I>key</I><B>, void\n(*</B><I>destr_function</I><B>) (void *));</B> \n</P>\n<P><B>int pthread_key_delete(pthread_key_t </B><I>key</I><B>);</B> \n</P>\n<P><B>int pthread_setspecific(pthread_key_t </B><I>key</I><B>, const\nvoid *</B><I>pointer</I><B>);</B> \n</P>\n<P><B>void * pthread_getspecific(pthread_key_t </B><I>key</I><B>);</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Programs often need global or static variables that have different\nvalues in different threads. Since threads share one memory space,\nthis cannot be achieved with regular variables. Thread-specific data\nis the POSIX threads answer to this need. \n</P>\n<P>Each thread possesses a private memory block, the thread-specific\ndata area, or TSD area for short. This area is indexed by TSD keys.\nThe TSD area associates values of type <B>void *</B> to TSD keys. TSD\nkeys are common to all threads, but the value associated with a given\nTSD key can be different in each thread. \n</P>\n<P>For concreteness, the TSD areas can be viewed as arrays of <B>void\n*</B> pointers, TSD keys as integer indices into these arrays, and\nthe value of a TSD key as the value of the corresponding array\nelement in the calling thread. \n</P>\n<P>When a thread is created, its TSD area initially associates <B>NULL</B>\nwith all keys. \n</P>\n<P><B>pthread_key_create</B> allocates a new TSD key. The key is\nstored in the location pointed to by <I>key</I>. There is a limit of\n<B>PTHREAD_KEYS_MAX</B> on the number of keys allocated at a given\ntime. The value initially associated with the returned key is <B>NULL</B>\nin all currently executing threads. \n</P>\n<P>The <I>destr_function</I> argument, if not <B>NULL</B>, specifies\na destructor function associated with the key. When a thread\nterminates via <B>pthread_exit</B> or by cancellation, <I>destr_function</I>\nis called with arguments the value associated with the key in that\nthread. The <I>destr_function</I> is not called if that value is <B>NULL</B><SPAN STYLE=\"font-weight: medium\">\nor the key has been deleted</SPAN>. The order in which destructor\nfunctions are called at thread termination time is unspecified. \n</P>\n<P>Before the destructor function is called, the <B>NULL</B> value is\nassociated with the key in the current thread. A destructor function\nmight, however, re-associate non- <B>NULL</B> values to that key or\nsome other key. To deal with this, if after all the destructors have\nbeen called for all non- <B>NULL</B> values, there are still some\nnon- <B>NULL</B> values with associated destructors, then the process\nis repeated.</P>\n<P><B>pthread_key_delete</B> deallocates a TSD key. It does not check\nwhether non- <B>NULL</B> values are associated with that key in the\ncurrently executing threads, nor call the destructor function\nassociated with the key. \n</P>\n<P><B>pthread_setspecific</B> changes the value associated with <I>key</I>\nin the calling thread, storing the given <I>pointer</I> instead. \n</P>\n<P><B>pthread_getspecific</B> returns the value currently associated\nwith <I>key</I> in the calling thread. \n</P>\n<P>The routines <B>pthread_setspecific</B>, <B>pthread_getspecific</B>,\nand <B>pthread_key_delete</B> can be called from <I>destr_function</I>\ntargeting any valid key including the key on which <I>destr_function</I>\nis currently operating. If <B>pthread_getspecific</B> is called on\nthe key whose thread specific data is being destroyed, the value NULL\nis returned, unless <B>pthread_setspecific</B> was called previously\non that key from within <I>destr_function</I> to set the value to\nnon-NULL. For some implementations the effect of calling\n<B>pthread_setspecific</B> from within <I>destr_function</I> can be\neither memory leakage or infinite loops if <I>destr_function</I> has\nalready been called at least <B>PTHREAD_DESTRUCTOR_ITERATIONS</B>\ntimes.</P>\n<P STYLE=\"font-weight: medium\"><B>Pthreads-w32</B> stops running key\n<I>destr_function</I> routines after <B>PTHREAD_DESTRUCTOR_ITERATIONS</B>\niterations, even if some non- <B>NULL</B> values with associated\ndescriptors remain. If memory is allocated and associated with a key\nfrom within <I>destr_function</I>, that memory may not be reclaimed\nbecause that key's <I>destr_function</I>, may not run again.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P><B>pthread_key_create</B>, <B>pthread_key_delete</B>, and\n<B>pthread_setspecific</B> return 0 on success and a non-zero error\ncode on failure. If successful, <B>pthread_key_create</B> stores the\nnewly allocated key in the location pointed to by its <I>key</I>\nargument. \n</P>\n<P><B>pthread_getspecific</B> returns the value associated with <I>key</I>\non success, and <B>NULL</B> on error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P><B>pthread_key_create</B> returns the following error code on\nerror: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EAGAIN</B> \n\t\t</DT></DL>\n</DL>\n<BLOCKQUOTE STYLE=\"margin-left: 5cm\">\n<B>PTHREAD_KEYS_MAX</B> keys are already allocated \n</BLOCKQUOTE>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ENOMEM</B> \n\t\t</DT></DL>\n</DL>\n<BLOCKQUOTE STYLE=\"margin-left: 5cm\">\nInsufficient memory to allocate the key. \n</BLOCKQUOTE>\n<P><B>pthread_key_delete</B> and <B>pthread_setspecific</B> return\nthe following error code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<I>key</I> is not a valid, allocated TSD key \n\t\t</DD></DL>\n</DL>\n<P>\n<B>pthread_getspecific</B> returns <B>NULL</B> if <I>key</I> is not a\nvalid, allocated TSD key. \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<P><A HREF=\"pthread_create.html\">pthread_create(3)</A> ,\n<A HREF=\"pthread_exit.html\">pthread_exit(3)</A> ,\n<A HREF=\"pthread_cancel.html\">pthread_testcancel(3)</A> . \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Example</A></H2>\n<P>The following code fragment allocates a thread-specific array of\n100 characters, with automatic reclamation at thread exit: \n</P>\n<BLOCKQUOTE><BR><BR>\n</BLOCKQUOTE>\n<PRE STYLE=\"margin-left: 1cm; margin-right: 1cm\">/* Key for the thread-specific buffer */\nstatic pthread_key_t buffer_key;\n/* Once-only initialisation of the key */\nstatic pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT;\n/* Allocate the thread-specific buffer */\nvoid buffer_alloc(void)\n{\n  pthread_once(&amp;buffer_key_once, buffer_key_alloc);\n  pthread_setspecific(buffer_key, malloc(100));\n}\n/* Return the thread-specific buffer */\nchar * get_buffer(void)\n{\n  return (char *) pthread_getspecific(buffer_key);\n}\n/* Allocate the key */\nstatic void buffer_key_alloc()\n{\n  pthread_key_create(&amp;buffer_key, buffer_destroy);\n}\n/* Free the thread-specific buffer */\nstatic void buffer_destroy(void * buf)\n{\n  free(buf);\n}</PRE>\n<HR>\n<BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\"><A NAME=\"toc\"></A>\n<B>Table of Contents</B></BLOCKQUOTE>\n<UL>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">See\n\tAlso</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE><A HREF=\"#sect7\" NAME=\"toc7\">Example</A> \n\t</BLOCKQUOTE>\n</UL>\n</BODY>\n</HTML>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_kill.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_SIGNAL(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;18500100\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050504;23005800\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_sigmask, pthread_kill, sigwait - handling of signals in\nthreads \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> <BR><B>#include &lt;signal.h&gt;</B>\n</P>\n<P><B>int pthread_sigmask(int </B><I>how</I><B>, const sigset_t\n*</B><I>newmask</I><B>, sigset_t *</B><I>oldmask</I><B>);</B> \n</P>\n<P><B>int pthread_kill(pthread_t </B><I>thread</I><B>, int </B><I>signo</I><B>);</B>\n</P>\n<P><B>int sigwait(const sigset_t *</B>set, <B>int</B> *sig);</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P><B>pthread_sigmask</B> changes the signal mask for the calling\nthread as described by the <I>how</I> and <I>newmask</I> arguments.\nIf <I>oldmask</I> is not <B>NULL</B>, the previous signal mask is\nstored in the location pointed to by <I>oldmask</I>. <B>Pthreads-w32</B>\nimplements this function but no other function uses the signal mask\nyet.</P>\n<P>The meaning of the <I>how</I> and <I>newmask</I> arguments is the\nsame as for <B><SPAN STYLE=\"font-style: normal\">sigprocmask</SPAN></B>(2).\nIf <I>how</I> is <B>SIG_SETMASK</B>, the signal mask is set to\n<I>newmask</I>. If <I>how</I> is <B>SIG_BLOCK</B>, the signals\nspecified to <I>newmask</I> are added to the current signal mask. If\n<I>how</I> is <B>SIG_UNBLOCK</B>, the signals specified to <I>newmask</I>\nare removed from the current signal mask. \n</P>\n<P>Recall that signal masks are set on a per-thread basis, but signal\nactions and signal handlers, as set with <B>sigaction</B>(2), are\nshared between all threads. \n</P>\n<P><B>pthread_kill</B> send signal number <I>signo</I> to the thread\n<I>thread</I>. <B>Pthreads-w32</B> only supports signal number 0,\nwhich does not send any signal but causes <B>pthread_kill</B> to\nreturn an error if <I>thread</I> is not valid.</P>\n<P><B>sigwait</B> suspends the calling thread until one of the\nsignals in <I>set</I> is delivered to the calling thread. It then\nstores the number of the signal received in the location pointed to\nby <I>sig</I> and returns. The signals in <I>set</I> must be blocked\nand not ignored on entrance to <B>sigwait</B>. If the delivered\nsignal has a signal handler function attached, that function is <I>not</I>\ncalled. <B>Pthreads-w32</B> implements this function as a\ncancellation point only - it does not wait for any signals and does\nnot change the location pointed to by <I>sig</I>.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P><B>sigwait</B> is a cancellation point. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Return Value</A></H2>\n<P>On success, 0 is returned. On failure, a non-zero error code is\nreturned. \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<P>The <B>pthread_sigmask</B> function returns the following error\ncodes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<I>how</I> is not one of <B>SIG_SETMASK</B>, <B>SIG_BLOCK</B>, or\n\t\t<B>SIG_UNBLOCK</B> \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_kill</B> function returns the following error codes on\nerror: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<I>signo</I> is not a valid signal number or is unsupported.</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>ESRCH</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe thread <I>thread</I> does not exist (e.g. it has already\n\t\tterminated) \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>sigwait</B> function never returns an error. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">See Also</A></H2>\n<P> \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Notes</A></H2>\n<P>In any implementation, for <B>sigwait</B> to work reliably, the\nsignals being waited for must be blocked in all threads, not only in\nthe calling thread, since otherwise the POSIX semantics for signal\ndelivery do not guarantee that it’s the thread doing the <B>sigwait</B>\nthat will receive the signal. The best way to achieve this is to\nblock those signals before any threads are created, and never unblock\nthem in the program other than by calling <B>sigwait</B>. This works\nbecause all threads inherit their initial sigmask from their creating\nthread.</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">Bugs</A></H2>\n<P><B>Pthreads-w32</B> does not implement signals yet and so these\nroutines have almost no use except to prevent the compiler or linker\nfrom complaining. <B>pthread_kill</B> is useful in determining if the\nthread is a valid thread, but since many threads implementations\nreuse thread IDs, the valid thread may no longer be the thread you\nthink it is, and so this method of determining thread validity is not\nportable, and very risky. <B>Pthreads-w32</B> from version 1.0.0\nonwards implements pseudo-unique thread IDs, so applications that use\nthis technique (but really shouldn't) have some protection.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Author</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">See\n\tAlso</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Notes</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect9\" NAME=\"toc9\">Bugs</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_mutex_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_MUTEX(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;5000\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;19000600\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_mutex_init, pthread_mutex_lock, pthread_mutex_trylock,\npthread_mutex_timedlock, pthread_mutex_unlock, pthread_mutex_destroy\n- operations on mutexes \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>#include &lt;time.h&gt;</B></P>\n<P><B>pthread_mutex_t </B><I>fastmutex</I> <B>=\nPTHREAD_MUTEX_INITIALIZER;</B> \n</P>\n<P><B>pthread_mutex_t </B><I>recmutex</I> <B>=\nPTHREAD_RECURSIVE_MUTEX_INITIALIZER;</B> \n</P>\n<P><B>pthread_mutex_t </B><I>errchkmutex</I> <B>=\nPTHREAD_ERRORCHECK_MUTEX_INITIALIZER;</B> \n</P>\n<P><B>pthread_mutex_t </B><I>recmutex</I> <B>=\nPTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;</B> \n</P>\n<P><B>pthread_mutex_t </B><I>errchkmutex</I> <B>=\nPTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;</B> \n</P>\n<P><B>int pthread_mutex_init(pthread_mutex_t *</B><I>mutex</I><B>,\nconst pthread_mutexattr_t *</B><I>mutexattr</I><B>);</B> \n</P>\n<P><B>int pthread_mutex_lock(pthread_mutex_t *</B><I>mutex</I><B>);</B>\n</P>\n<P><B>int pthread_mutex_trylock(pthread_mutex_t *</B><I>mutex</I><B>);</B>\n</P>\n<P><B>int pthread_mutex_timedlock(pthread_mutex_t *</B><I>mutex,\n</I><B>const struct timespec *</B><I>abs_timeout</I><B>);</B> \n</P>\n<P><B>int pthread_mutex_unlock(pthread_mutex_t *</B><I>mutex</I><B>);</B>\n</P>\n<P><B>int pthread_mutex_destroy(pthread_mutex_t *</B><I>mutex</I><B>);</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>A mutex is a MUTual EXclusion device, and is useful for protecting\nshared data structures from concurrent modifications, and\nimplementing critical sections and monitors. \n</P>\n<P>A mutex has two possible states: unlocked (not owned by any\nthread), and locked (owned by one thread). A mutex can never be owned\nby two different threads simultaneously. A thread attempting to lock\na mutex that is already locked by another thread is suspended until\nthe owning thread unlocks the mutex first. \n</P>\n<P><B>pthread_mutex_init</B> initializes the mutex object pointed to\nby <I>mutex</I> according to the mutex attributes specified in\n<I>mutexattr</I>. If <I>mutexattr</I> is <B>NULL</B>, default\nattributes are used instead. \n</P>\n<P>The type of a mutex determines whether it can be locked again by a\nthread that already owns it. The default type is “normal”. See\n<A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_init</B>(3)</A>\nfor more information on mutex attributes. \n</P>\n<P>Variables of type <B>pthread_mutex_t</B> can also be initialized\nstatically, using the constants <B>PTHREAD_MUTEX_INITIALIZER</B> (for\nnormal “fast” mutexes), <B>PTHREAD_RECURSIVE_MUTEX_INITIALIZER</B>\n(for recursive mutexes), and <B>PTHREAD_ERRORCHECK_MUTEX_INITIALIZER</B>\n(for error checking mutexes).  <SPAN STYLE=\"font-weight: medium\"> In\nthe <B>Pthreads-w32</B> implementation, an application should still\ncall <B>pthread_mutex_destroy</B> at some point to ensure that any\nresources consumed by the mutex are released.</SPAN></P>\n<P><B>pthread_mutex_lock</B> locks the given mutex. If the mutex is\ncurrently unlocked, it becomes locked and owned by the calling\nthread, and <B>pthread_mutex_lock</B> returns immediately. If the\nmutex is already locked by another thread, <B>pthread_mutex_lock</B>\nsuspends the calling thread until the mutex is unlocked. \n</P>\n<P>If the mutex is already locked by the calling thread, the behavior\nof <B>pthread_mutex_lock</B> depends on the type of the mutex. If the\nmutex is of the “normal” type, the calling thread is suspended\nuntil the mutex is unlocked, thus effectively causing the calling\nthread to deadlock. If the mutex is of the ‘‘error checking’’\ntype, <B>pthread_mutex_lock</B> returns immediately with the error\ncode <B>EDEADLK</B>. If the mutex is of the ‘‘recursive’’\ntype, <B>pthread_mutex_lock</B> succeeds and returns immediately,\nrecording the number of times the calling thread has locked the\nmutex. An equal number of <B>pthread_mutex_unlock</B> operations must\nbe performed before the mutex returns to the unlocked state. \n</P>\n<P><B>pthread_mutex_trylock</B> behaves identically to\n<B>pthread_mutex_lock</B>, except that it does not block the calling\nthread if the mutex is already locked by another thread (or by the\ncalling thread in the case of a “normal” mutex). Instead,\n<B>pthread_mutex_trylock</B> returns immediately with the error code\n<B>EBUSY</B>. \n</P>\n<P><B>pthread_mutex_timedlock</B> behaves identically to\n<B>pthread_mutex_lock</B>, except that if it cannot acquire the lock\nbefore the <I>abs_timeout</I> time, the call returns with the error\ncode <B>ETIMEDOUT</B>. If the mutex can be locked immediately it is,\nand the <B>abs_timeout</B> parameter is ignored.</P>\n<P><B>pthread_mutex_unlock</B> unlocks the given mutex. The mutex is\nassumed to be locked and owned by the calling thread on entrance to\n<B>pthread_mutex_unlock</B>. If the mutex is of the “normal”\ntype, <B>pthread_mutex_unlock</B> always returns it to the unlocked\nstate. If it is of the ‘‘recursive’’ type, it decrements the\nlocking count of the mutex (number of <B>pthread_mutex_lock</B>\noperations performed on it by the calling thread), and only when this\ncount reaches zero is the mutex actually unlocked. \n</P>\n<P>On ‘‘error checking’’ mutexes, <B>pthread_mutex_unlock</B>\nactually checks at run-time that the mutex is locked on entrance, and\nthat it was locked by the same thread that is now calling\n<B>pthread_mutex_unlock</B>. If these conditions are not met, an\nerror code is returned and the mutex remains unchanged. ‘‘Normal’’\nmutexes perform no such checks, thus allowing a locked mutex to be\nunlocked by a thread other than its owner. This is non-portable\nbehavior and is not meant to be used as a feature.</P>\n<P><B>pthread_mutex_destroy</B> destroys a mutex object, freeing the\nresources it might hold. The mutex must be unlocked on entrance.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P>None of the mutex functions is a cancellation point, not even\n<B>pthread_mutex_lock</B>, in spite of the fact that it can suspend a\nthread for arbitrary durations. This way, the status of mutexes at\ncancellation points is predictable, allowing cancellation handlers to\nunlock precisely those mutexes that need to be unlocked before the\nthread stops executing. Consequently, threads using deferred\ncancellation should never hold a mutex for extended periods of time. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Async-signal Safety</A></H2>\n<P>The mutex functions are not async-signal safe. What this means is\nthat they should not be called from a signal handler. In particular,\ncalling <B>pthread_mutex_lock</B> or <B>pthread_mutex_unlock</B> from\na signal handler may deadlock the calling thread. \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Return Value</A></H2>\n<P><B>pthread_mutex_init</B> always returns 0. The other mutex\nfunctions return 0 on success and a non-zero error code on error. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Errors</A></H2>\n<P>The <B>pthread_mutex_lock</B> function returns the following error\ncode on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe mutex has not been properly initialized. \n\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>EDEADLK</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe mutex is already locked by the calling thread (‘‘error\n\t\tchecking’’ mutexes only). \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_mutex_trylock</B> function returns the following error\ncodes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EBUSY</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe mutex could not be acquired because it was currently locked. \n\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe mutex has not been properly initialized. \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_mutex_timedlock</B> function returns the following\nerror codes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ETIMEDOUT</B>\n\t\t\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe mutex could not be acquired before the <I>abs_timeout</I> time\n\t\tarrived. \n\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe mutex has not been properly initialized. \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_mutex_unlock</B> function returns the following error\ncode on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe mutex has not been properly initialized. \n\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>EPERM</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe calling thread does not own the mutex (‘‘error checking’’\n\t\tmutexes only). \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>pthread_mutex_destroy</B> function returns the following error\ncode on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EBUSY</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe mutex is currently locked. \n\t\t</DD></DL>\n</DL>\n<H2>\n<A HREF=\"#toc7\" NAME=\"sect7\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">See Also</A></H2>\n<P><A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_init</B>(3)</A>\n, <A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_settype</B>(3)</A>\n, <A HREF=\"pthread_cancel.html\"><B>pthread_cancel</B>(3)</A> . \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">Example</A></H2>\n<P>A shared global variable <I>x</I> can be protected by a mutex as\nfollows: \n</P>\n<PRE STYLE=\"margin-left: 1cm; margin-right: 1cm\">int x;\npthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;</PRE><BLOCKQUOTE STYLE=\"margin-left: 0cm; margin-right: 0cm\">\nAll accesses and modifications to <I>x</I> should be bracketed by\ncalls to <B>pthread_mutex_lock</B> and <B>pthread_mutex_unlock</B> as\nfollows: \n</BLOCKQUOTE>\n<PRE STYLE=\"margin-left: 1.03cm; margin-right: 2cm\">pthread_mutex_lock(&amp;mut);\n/* operate on x */\npthread_mutex_unlock(&amp;mut);</PRE>\n<HR>\n<BLOCKQUOTE STYLE=\"margin-right: 4cm\"><A NAME=\"toc\"></A><B>Table of\nContents</B></BLOCKQUOTE>\n<UL>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm; margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm; margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm; margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm; margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm; margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Async-signal\n\tSafety</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm; margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Return\n\tValue</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm; margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Errors</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm; margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Author</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm; margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">See\n\tAlso</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-right: 4cm\"><A HREF=\"#sect9\" NAME=\"toc9\">Example</A>\n\t\t</BLOCKQUOTE>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_mutexattr_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_MUTEXATTR(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;23040500\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18370400\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_mutexattr_init, pthread_mutexattr_destroy,\npthread_mutexattr_settype, pthread_mutexattr_gettype - mutex creation\nattributes \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_mutexattr_init(pthread_mutexattr_t *</B><I>attr</I><B>);</B>\n</P>\n<P><B>int pthread_mutexattr_destroy(pthread_mutexattr_t *</B><I>attr</I><B>);</B>\n</P>\n<P><B>int pthread_mutexattr_settype(pthread_mutexattr_t *</B><I>attr</I><B>,\nint </B><I>type</I><B>);</B> \n</P>\n<P><B>int pthread_mutexattr_gettype(const pthread_mutexattr_t *</B><I>attr</I><B>,\nint *</B><I>type</I><B>);</B> \n</P>\n<P><B>int pthread_mutexattr_setkind_np(pthread_mutexattr_t *</B><I>attr</I><B>,\nint </B><I>type</I><B>);</B> \n</P>\n<P><B>int pthread_mutexattr_getkind_np(const pthread_mutexattr_t\n*</B><I>attr</I><B>, int *</B><I>type</I><B>);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Mutex attributes can be specified at mutex creation time, by\npassing a mutex attribute object as second argument to\n<A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_init</B>(3)</A> .\nPassing <B>NULL</B> is equivalent to passing a mutex attribute object\nwith all attributes set to their default values. \n</P>\n<P><B>pthread_mutexattr_init</B> initializes the mutex attribute\nobject <I>attr</I> and fills it with default values for the\nattributes. \n</P>\n<P><B>pthread_mutexattr_destroy</B> destroys a mutex attribute\nobject, which must not be reused until it is reinitialized.</P>\n<P>The following mutex types are supported:</P>\n<P STYLE=\"margin-left: 2cm\"><B>PTHREAD_MUTEX_NORMAL</B> - for\n‘‘fast’’ mutexes.</P>\n<P STYLE=\"margin-left: 2cm\"><B>PTHREAD_MUTEX_RECURSIVE</B> - for\n‘‘recursive’’ mutexes.</P>\n<P STYLE=\"margin-left: 2cm\"><B>PTHREAD_MUTEX_ERRORCHECK</B> - for\n‘‘error checking’’ mutexes.</P>\n<P>The mutex type determines what happens if a thread attempts to\nlock a mutex it already owns with <A HREF=\"pthread_mutex_lock.html\"><B>pthread_mutex_lock</B>(3)</A>\n. If the mutex is of the “normal” or “fast” type,\n<A HREF=\"pthread_mutex_lock.html\"><B>pthread_mutex_lock</B>(3)</A>\nsimply suspends the calling thread forever. If the mutex is of the\n‘‘error checking’’ type, <A HREF=\"pthread_mutex_lock.html\"><B>pthread_mutex_lock</B>(3)</A>\nreturns immediately with the error code <B>EDEADLK</B>. If the mutex\nis of the ‘‘recursive’’ type, the call to\n<A HREF=\"pthread_mutex_lock.html\"><B>pthread_mutex_lock</B>(3)</A>\nreturns immediately with a success return code. The number of times\nthe thread owning the mutex has locked it is recorded in the mutex.\nThe owning thread must call <A HREF=\"pthread_mutex_unlock.html\"><B>pthread_mutex_unlock</B>(3)</A>\nthe same number of times before the mutex returns to the unlocked\nstate. \n</P>\n<P>The default mutex type is <B>PTHREAD_MUTEX_NORMAL</B></P>\n<P><B>Pthreads-w32</B> also recognises the following equivalent types\nthat are used by Linux:</P>\n<P STYLE=\"margin-left: 2cm; font-weight: medium\"><B>PTHREAD_MUTEX_FAST_NP</B>\n– equivalent to <B>PTHREAD_MUTEX_NORMAL</B></P>\n<P STYLE=\"margin-left: 2cm\"><B>PTHREAD_MUTEX_RECURSIVE_NP</B></P>\n<P STYLE=\"margin-left: 2cm\"><B>PTHREAD_MUTEX_ERRORCHECK_NP</B></P>\n<P><B>pthread_mutexattr_settype</B> sets the mutex type attribute in\n<I>attr</I> to the value specified by <I>type</I>. \n</P>\n<P><B>pthread_mutexattr_gettype</B> retrieves the current value of\nthe mutex kind attribute in <I>attr</I> and stores it in the location\npointed to by <I>type</I>. \n</P>\n<P><B>Pthreads-w32</B> also recognises the following equivalent\nfunctions that are used in Linux:</P>\n<P><B>pthread_mutexattr_setkind_np</B> is an alias for\n<B>pthread_mutexattr_settype</B>. \n</P>\n<P STYLE=\"font-weight: medium\"><B>pthread_mutexattr_getkind_np</B> is\nan alias for <B>pthread_mutexattr_gettype</B>. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P><B>pthread_mutexattr_init</B>, <B>pthread_mutexattr_destroy</B>\nand <B>pthread_mutexattr_gettype</B> always return 0. \n</P>\n<P><B>pthread_mutexattr_settype</B> returns 0 on success and a\nnon-zero error code on error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>On error, <B>pthread_mutexattr_settype</B> returns the following\nerror code: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\t<I>type</I> is none of:<BR><B>PTHREAD_MUTEX_NORMAL</B>,\n\t<B>PTHREAD_MUTEX_FAST_NP</B>,<BR><B>PTHREAD_MUTEX_RECURSIVE</B>,\n\t<B>PTHREAD_MUTEX_RECURSIVE_NP,<BR>PTHREAD_MUTEX_ERRORCHECK</B>,\n\t<B>PTHREAD_MUTEX_ERRORCHECK_NP</B> \n\t</DD></DL>\n<H2>\n<A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<P><A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_init</B>(3)</A>\n, <A HREF=\"pthread_mutex_lock.html\"><B>pthread_mutex_lock</B>(3)</A>\n, <A HREF=\"pthread_mutex_unlock.html\"><B>pthread_mutex_unlock</B>(3)</A>\n. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\"><U><FONT COLOR=\"#000080\">Notes</FONT></U></A></H2>\n<P>For speed, <B>Pthreads-w32</B> never checks the thread ownership\nof mutexes of type <B>PTHREAD_MUTEX_NORMAL</B> (or\n<B>PTHREAD_MUTEX_FAST_NP</B>) when performing operations on the\nmutex. It is therefore possible for one thread to lock such a mutex\nand another to unlock it.</P>\n<P><SPAN STYLE=\"font-weight: medium\">When developing code, it is a\ncommon precaution to substitute the error checking type, and drop in\nthe normal type for release if the extra performance is required.</SPAN></P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">See\n\tAlso</A></P>\n\t<LI><P><A HREF=\"#sect7\" NAME=\"toc7\">Notes</A></P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_mutexattr_setpshared.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_MUTEXATTR_GETPSHARED&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;23480600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18381800\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_mutexattr_getpshared, pthread_mutexattr_setpshared - get\nand set the process-shared attribute \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_mutexattr_getpshared(const pthread_mutexattr_t *\nrestrict</B> <I>attr</I><B>, int *restrict</B> <I>pshared</I><B>);\n<BR>int pthread_mutexattr_setpshared(pthread_mutexattr_t *</B><I>attr</I><B>,\nint</B> <I>pshared</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_mutexattr_getpshared</B> function shall obtain the\nvalue of the <I>process-shared</I> attribute from the attributes\nobject referenced by <I>attr</I>. The <B>pthread_mutexattr_setpshared</B>\nfunction shall set the <I>process-shared</I> attribute in an\ninitialized attributes object referenced by <I>attr</I>. \n</P>\n<P>The <I>process-shared</I> attribute is set to\n<B>PTHREAD_PROCESS_SHARED</B> to permit a mutex to be operated upon\nby any thread that has access to the memory where the mutex is\nallocated, even if the mutex is allocated in memory that is shared by\nmultiple processes. If the <I>process-shared</I> attribute is\n<B>PTHREAD_PROCESS_PRIVATE</B>, the mutex shall only be operated upon\nby threads created within the same process as the thread that\ninitialized the mutex; if threads of differing processes attempt to\noperate on such a mutex, the behavior is undefined. The default value\nof the attribute shall be <B>PTHREAD_PROCESS_PRIVATE</B>. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_THREAD_PROCESS_SHARED</B> in\npthread.h as -1 to indicate that these routines are implemented but\nthe process shared option is not supported.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, <B>pthread_mutexattr_setpshared</B>\nshall return zero; otherwise, an error number shall be returned to\nindicate the error. \n</P>\n<P>Upon successful completion, <B>pthread_mutexattr_getpshared</B>\nshall return zero and store the value of the <I>process-shared</I>\nattribute of <I>attr</I> into the object referenced by the <I>pshared</I>\nparameter. Otherwise, an error number shall be returned to indicate\nthe error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_mutexattr_getpshared</B> and\n<B>pthread_mutexattr_setpshared</B> functions may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> is invalid. \n\t</DD></DL>\n<P>\nThe <B>pthread_mutexattr_setpshared</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe new value specified for the attribute is outside the range of\n\tlegal values for that attribute. \n\t</DD><DT>\n\t<B>ENOTSUP</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe new value specified for the attribute is PTHREAD_PROCESS_SHARED.\n\t\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_cond_init.html\"><B>pthread_cond_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A> <B>,</B>\n<A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_mutexattr_init.html\"><B>pthread_mutexattr_destroy</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_num_processors_np.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_NUM_PROCESSORS_NP manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;322600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;21514100\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P STYLE=\"font-weight: medium\">pthread_num_processors_np – get the\nnumber of processors (CPUs) in use by the process</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_num_processors_np(void);</B></P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P><B>pthread_num_processors_np </B>returns the number of processors\nin the system. This implementation actually returns the number of\nprocessors available to the process, which can be a lower number than\nthe system's number, depending on the process's affinity mask.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P>None.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\"><FONT COLOR=\"#000080\">Return Value</FONT></A></H2>\n<P><B>pthread_num_processors_np</B> returns the number of processors\ncurrently available to the process.</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<P>None.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">Author</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_once.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_ONCE(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;322600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050603;463100\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_once - once-only initialization \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>pthread_once_t </B><I>once_control</I> <B>= PTHREAD_ONCE_INIT;</B>\n</P>\n<P><B>int pthread_once(pthread_once_t *</B><I>once_control</I><B>,\nvoid (*</B><I>init_routine</I><B>) (void));</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The purpose of <B>pthread_once</B> is to ensure that a piece of\ninitialization code is executed at most once. The <I>once_control</I>\nargument points to a static or extern variable statically initialized\nto <B>PTHREAD_ONCE_INIT</B>. \n</P>\n<P>The first time <B>pthread_once</B> is called with a given\n<I>once_control</I> argument, it calls <I>init_routine</I> with no\nargument and changes the value of the <I>once_control</I> variable to\nrecord that initialization has been performed. Subsequent calls to\n<B>pthread_once</B> with the same <B>once_control</B> argument do\nnothing. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P>While <B>pthread_once</B> is not a cancellation point,\n<I>init_routine</I> can be. The effect on <I>once_control</I> of a\ncancellation inside the <I>init_routine</I> is to leave it as if\n<B>pthread_once</B> had not been called by the cancelled thread.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Return Value</A></H2>\n<P STYLE=\"text-decoration: none\"><FONT COLOR=\"#000000\"><B>pthread_once</B>\nreturns 0 on success, or an error code on failure.</FONT></P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<P>The <B>pthread_once</B> function returns the following error code\non error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT></DL>\n</DL>\n<P STYLE=\"margin-left: 2cm\">\nThe once_control or init_routine parameter is NULL.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">Author</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_rwlock_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_RWLOCK_DESTROY&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;10211800\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18563400\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_rwlock_destroy, pthread_rwlock_init - destroy and\ninitialize a read-write lock object \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>pthread_wrlock_t </B><I>rwlock</I> <B>=\nPTHREAD_RWLOCK_INITIALIZER;</B></P>\n<P><B>int pthread_rwlock_destroy(pthread_rwlock_t *</B><I>rwlock</I><B>);\n<BR>int pthread_rwlock_init(pthread_rwlock_t *restrict</B> <I>rwlock</I><B>,\nconst pthread_rwlockattr_t *restrict</B> <I>attr</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_rwlock_destroy</B> function shall destroy the\nread-write lock object referenced by <I>rwlock</I> and release any\nresources used by the lock. The effect of subsequent use of the lock\nis undefined until the lock is reinitialized by another call to\n<B>pthread_rwlock_init</B>. An implementation may cause\n<B>pthread_rwlock_destroy</B> to set the object referenced by <I>rwlock</I>\nto an invalid value. Results are undefined if <B>pthread_rwlock_destroy</B>\nis called when any thread holds <I>rwlock</I>. Attempting to destroy\nan uninitialized read-write lock results in undefined behavior. \n</P>\n<P>The <B>pthread_rwlock_init</B> function shall allocate any\nresources required to use the read-write lock referenced by <I>rwlock</I>\nand initializes the lock to an unlocked state with attributes\nreferenced by <I>attr</I>. If <I>attr</I> is NULL, the default\nread-write lock attributes shall be used; the effect is the same as\npassing the address of a default read-write lock attributes object.\nOnce initialized, the lock can be used any number of times without\nbeing reinitialized. Results are undefined if <B>pthread_rwlock_init</B>\nis called specifying an already initialized read-write lock. Results\nare undefined if a read-write lock is used without first being\ninitialized. \n</P>\n<P>If the <B>pthread_rwlock_init</B> function fails, <I>rwlock</I>\nshall not be initialized and the contents of <I>rwlock</I> are\nundefined. \n</P>\n<P><B>Pthreads-w32</B> supports statically initialized <I>rwlock</I>\nobjects using <B>PTHREAD_RWLOCK_INITIALIZER</B>. <SPAN STYLE=\"font-weight: medium\">\nAn application should still call <B>pthread_rwlock_destroy</B> at\nsome point to ensure that any resources consumed by the read/write\nlock are released.</SPAN></P>\n<P>Only the object referenced by <I>rwlock</I> may be used for\nperforming synchronization. The result of referring to copies of that\nobject in calls to <B>pthread_rwlock_destroy</B> ,\n<B>pthread_rwlock_rdlock</B> , <B>pthread_rwlock_timedrdlock</B> ,\n<B>pthread_rwlock_timedwrlock</B> , <B>pthread_rwlock_tryrdlock</B> ,\n<B>pthread_rwlock_trywrlock</B> , <B>pthread_rwlock_unlock</B> , or\n<B>pthread_rwlock_wrlock</B> is undefined. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_READER_WRITER_LOCKS</B> in\npthread.h as 200112L to indicate that the reader/writer routines are\nimplemented and may be used.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>If successful, the <B>pthread_rwlock_destroy</B> and\n<B>pthread_rwlock_init</B> functions shall return zero; otherwise, an\nerror number shall be returned to indicate the error. \n</P>\n<P>The [EBUSY] and [EINVAL] error checks, if implemented, act as if\nthey were performed immediately at the beginning of processing for\nthe function and caused an error return prior to modifying the state\nof the read-write lock specified by <I>rwlock</I>. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_rwlock_destroy</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EBUSY</B> \n\t</DT><DD>\n\tThe implementation has detected an attempt to destroy the object\n\treferenced by <I>rwlock</I> while it is locked. \n\t</DD><DT>\n\t<B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>rwlock</I> is invalid. \n\t</DD></DL>\n<P>\nThe <B>pthread_rwlock_init</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>EAGAIN</B> \n\t</DT><DD>\n\tThe system lacked the necessary resources (other than memory) to\n\tinitialize another read-write lock. \n\t</DD><DT>\n\t<B>ENOMEM</B> \n\t</DT><DD>\n\tInsufficient memory exists to initialize the read-write lock. \n\t</DD><DD STYLE=\"margin-left: 0cm; margin-bottom: 0.5cm\">\n\t<BR><BR>\n\t</DD></DL>\n<P>\nThe <B>pthread_rwlock_init</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> is invalid. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>Applications using these and related read-write lock functions may\nbe subject to priority inversion, as discussed in the Base\nDefinitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, Section 3.285,\nPriority Inversion. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_rdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedrdlock.html\"><B>pthread_rwlock_timedrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedwrlock.html\"><B>pthread_rwlock_timedwrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_tryrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_trywrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_unlock.html\"><B>pthread_rwlock_unlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_wrlock</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_rwlock_rdlock.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_RWLOCK_RDLOCK&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;10352600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;12554200\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_rwlock_rdlock, pthread_rwlock_tryrdlock - lock a\nread-write lock object for reading \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_rwlock_rdlock(pthread_rwlock_t <I>*</I></B><I>rwlock</I><B>);\n<BR></B>i<B>nt pthread_rwlock_tryrdlock(pthread_rwlock_t <I>*</I></B><I>rwlock</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_rwlock_rdlock</B> function shall apply a read lock\nto the read-write lock referenced by <I>rwlock</I>. The calling\nthread acquires the read lock if a writer does not hold the lock and\nthere are no writers blocked on the lock. \n</P>\n<P><B>Pthreads-win32</B> does not prefer either writers or readers in\nacquiring the lock – all threads enter a single prioritised FIFO\nqueue. While this may not be optimally efficient for some\napplications, it does ensure that one type does not starve the other.</P>\n<P>A thread may hold multiple concurrent read locks on <I>rwlock</I>\n(that is, successfully call the <B>pthread_rwlock_rdlock</B> function\n<I>n</I> times). If so, the application shall ensure that the thread\nperforms matching unlocks (that is, it calls the\n<A HREF=\"pthread_rwlock_unlock.html\"><B>pthread_rwlock_unlock</B>(3)</A>\nfunction <I>n</I> times). \n</P>\n<P>The <B>pthread_rwlock_tryrdlock</B> function shall apply a read\nlock as in the <B>pthread_rwlock_rdlock</B> function, with the\nexception that the function shall fail if the equivalent\n<B>pthread_rwlock_rdlock</B> call would have blocked the calling\nthread. In no case shall the <B>pthread_rwlock_tryrdlock</B> function\never block; it always either acquires the lock or fails and returns\nimmediately. \n</P>\n<P>Results are undefined if any of these functions are called with an\nuninitialized read-write lock. \n</P>\n<P><B>Pthreads-w32</B> does not detect deadlock if the thread already\nowns the lock for writing.</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_READER_WRITER_LOCKS</B> in\npthread.h as  200112L to indicate that the reader/writer routines are\nimplemented and may be used.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>If successful, the <B>pthread_rwlock_rdlock</B> function shall\nreturn zero; otherwise, an error number shall be returned to indicate\nthe error. \n</P>\n<P>The <B>pthread_rwlock_tryrdlock</B> function shall return zero if\nthe lock for reading on the read-write lock object referenced by\n<I>rwlock</I> is acquired. Otherwise, an error number shall be\nreturned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_rwlock_tryrdlock</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>EBUSY</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe read-write lock could not be acquired for reading because a\n\twriter holds the lock or a writer with the appropriate priority was\n\tblocked on it. \n\t</DD></DL>\n<P>\nThe <B>pthread_rwlock_rdlock</B> and <B>pthread_rwlock_tryrdlock</B>\nfunctions may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD>\n\tThe value specified by <I>rwlock</I> does not refer to an\n\tinitialized read-write lock object. \n\t</DD><DT>\n\t<B>EAGAIN</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe read lock could not be acquired because the maximum number of\n\tread locks for <I>rwlock</I> has been exceeded. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>Applications using these functions may be subject to priority\ninversion, as discussed in the Base Definitions volume of\nIEEE&nbsp;Std&nbsp;1003.1-2001, Section 3.285, Priority Inversion. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_rwlock_init.html\"><B>pthread_rwlock_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedrdlock.html\"><B>pthread_rwlock_timedrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedwrlock.html\"><B>pthread_rwlock_timedwrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_trywrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_unlock.html\"><B>pthread_rwlock_unlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_wrlock</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_rwlock_timedrdlock.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_RWLOCK_TIMEDRDLOCK&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;11101700\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;12560000\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_rwlock_timedrdlock - lock a read-write lock for reading \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; <BR></B>#include &lt;time.h&gt; \n</P>\n<P><B>int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict</B>\n<I>rwlock</I><B>, const struct timespec *restrict</B> <I>abs_timeout</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_rwlock_timedrdlock</B> function shall apply a read\nlock to the read-write lock referenced by <I>rwlock</I> as in the\n<A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_rdlock</B>(3)</A>\nfunction. However, if the lock cannot be acquired without waiting for\nother threads to unlock the lock, this wait shall be terminated when\nthe specified timeout expires. The timeout shall expire when the\nabsolute time specified by <I>abs_timeout</I> passes, as measured by\nthe clock on which timeouts are based (that is, when the value of\nthat clock equals or exceeds <I>abs_timeout</I>), or if the absolute\ntime specified by <I>abs_timeout</I> has already been passed at the\ntime of the call. \n</P>\n<P>The <B>timespec</B> data type is defined in the <I>&lt;time.h&gt;</I>\nheader. Under no circumstances shall the function fail with a timeout\nif the lock can be acquired immediately. The validity of the\n<I>abs_timeout</I> parameter need not be checked if the lock can be\nimmediately acquired. \n</P>\n<P>The calling thread may deadlock if at the time the call is made it\nholds a write lock on <I>rwlock</I>. The results are undefined if\nthis function is called with an uninitialized read-write lock. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_READER_WRITER_LOCKS</B> in\npthread.h as  200112L to indicate that the reader/writer routines are\nimplemented and may be used.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>The <B>pthread_rwlock_timedrdlock</B> function shall return zero\nif the lock for reading on the read-write lock object referenced by\n<I>rwlock</I> is acquired. Otherwise, an error number shall be\nreturned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_rwlock_timedrdlock</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>ETIMEDOUT</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe lock could not be acquired before the specified timeout expired.\n\t\t</DD></DL>\n<P>\nThe <B>pthread_rwlock_timedrdlock</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EAGAIN</B> \n\t</DT><DD>\n\tThe read lock could not be acquired because the maximum number of\n\tread locks for lock would be exceeded. \n\t</DD><DT>\n\t<B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>rwlock</I> does not refer to an\n\tinitialized read-write lock object, or the <I>abs_timeout</I>\n\tnanosecond value is less than zero or greater than or equal to 1000\n\tmillion. \n\t</DD></DL>\n<P>\nThis function shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>Applications using this function may be subject to priority\ninversion, as discussed in the Base Definitions volume of\nIEEE&nbsp;Std&nbsp;1003.1-2001, Section 3.285, Priority Inversion. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_rwlock_init.html\"><B>pthread_rwlock_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_rdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedwrlock.html\"><B>pthread_rwlock_timedwrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_tryrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_trywrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_unlock.html\"><B>pthread_rwlock_unlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_wrlock</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I>, <I>&lt;time.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_rwlock_timedwrlock.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_RWLOCK_TIMEDWRLOCK&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;11172800\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;12561600\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_rwlock_timedwrlock - lock a read-write lock for writing \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; <BR></B>#include &lt;time.h&gt; \n</P>\n<P><B>int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict</B>\n<I>rwlock</I><B>, const struct timespec *restrict</B> <I>abs_timeout</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_rwlock_timedwrlock</B> function shall apply a write\nlock to the read-write lock referenced by <I>rwlock</I> as in the\n<A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_wrlock</B>(3)</A>\nfunction. However, if the lock cannot be acquired without waiting for\nother threads to unlock the lock, this wait shall be terminated when\nthe specified timeout expires. The timeout shall expire when the\nabsolute time specified by <I>abs_timeout</I> passes, as measured by\nthe clock on which timeouts are based (that is, when the value of\nthat clock equals or exceeds <I>abs_timeout</I>), or if the absolute\ntime specified by <I>abs_timeout</I> has already been passed at the\ntime of the call. \n</P>\n<P>The <B>timespec</B> data type is defined in the <I>&lt;time.h&gt;</I>\nheader. Under no circumstances shall the function fail with a timeout\nif the lock can be acquired immediately. The validity of the\n<I>abs_timeout</I> parameter need not be checked if the lock can be\nimmediately acquired. \n</P>\n<P>The calling thread may deadlock if at the time the call is made it\nholds the read-write lock. The results are undefined if this function\nis called with an uninitialized read-write lock. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_READER_WRITER_LOCKS</B> in\npthread.h as  200112L to indicate that the reader/writer routines are\nimplemented and may be used.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>The <B>pthread_rwlock_timedwrlock</B> function shall return zero\nif the lock for writing on the read-write lock object referenced by\n<I>rwlock</I> is acquired. Otherwise, an error number shall be\nreturned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_rwlock_timedwrlock</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>ETIMEDOUT</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe lock could not be acquired before the specified timeout expired.\n\t\t</DD></DL>\n<P>\nThe <B>pthread_rwlock_timedwrlock</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by rwlock does not refer to an initialized\n\tread-write lock object, or the <I>abs_timeout</I> nanosecond value\n\tis less than zero or greater than or equal to 1000 million. \n\t</DD></DL>\n<P>\nThis function shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>Applications using this function may be subject to priority\ninversion, as discussed in the Base Definitions volume of\nIEEE&nbsp;Std&nbsp;1003.1-2001, Section 3.285, Priority Inversion. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_rwlock_init.html\"><B>pthread_rwlock_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_rdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedrdlock.html\"><B>pthread_rwlock_timedrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_tryrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_trywrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_unlock.html\"><B>pthread_rwlock_unlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_wrlock</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I>, <I>&lt;time.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_rwlock_unlock.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_RWLOCK_UNLOCK&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;11291100\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;12562700\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_rwlock_unlock - unlock a read-write lock object \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P>in<B>t pthread_rwlock_unlock(pthread_rwlock_t <I>*</I></B><I>rwlock</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_rwlock_unlock</B> function shall release a lock\nheld on the read-write lock object referenced by <I>rwlock</I>.\nResults are undefined if the read-write lock <I>rwlock</I> is not\nheld by the calling thread. \n</P>\n<P>If this function is called to release a read lock from the\nread-write lock object and there are other read locks currently held\non this read-write lock object, the read-write lock object remains in\nthe read locked state. If this function releases the last read lock\nfor this read-write lock object, the read-write lock object shall be\nput in the unlocked state with no owners. \n</P>\n<P>If this function is called to release a write lock for this\nread-write lock object, the read-write lock object shall be put in\nthe unlocked state. \n</P>\n<P><B>Pthreads-win32</B> does not prefer either writers or readers in\nacquiring the lock – all threads enter a single prioritised FIFO\nqueue. While this may not be optimally efficient for some\napplications, it does ensure that one type does not starve the other.</P>\n<P>Results are undefined if any of these functions are called with an\nuninitialized read-write lock. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_READER_WRITER_LOCKS</B> in\npthread.h as  200112L to indicate that the reader/writer routines are\nimplemented and may be used.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>If successful, the <B>pthread_rwlock_unlock</B> function shall\nreturn zero; otherwise, an error number shall be returned to indicate\nthe error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_rwlock_unlock</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD>\n\tThe value specified by <I>rwlock</I> does not refer to an\n\tinitialized read-write lock object. \n\t</DD><DD STYLE=\"margin-left: 0cm; margin-bottom: 0.5cm\">\n\t<BR><BR>\n\t</DD></DL>\n<P>\nThe <B>pthread_rwlock_unlock</B> function shall not return an error\ncode of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_rwlock_init.html\"><B>pthread_rwlock_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_rdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedrdlock.html\"><B>pthread_rwlock_timedrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedwrlock.html\"><B>pthread_rwlock_timedwrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_tryrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_trywrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_wrlock.html\"><B>pthread_rwlock_wrlock</B>(3)</A>\n, the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_rwlock_wrlock.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_RWLOCK_TRYWRLOCK&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;11221900\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;12563800\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_rwlock_trywrlock, pthread_rwlock_wrlock - lock a\nread-write lock object for writing \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_rwlock_trywrlock(pthread_rwlock_t <I>*</I></B><I>rwlock</I><B>);\n<BR>int pthread_rwlock_wrlock(pthread_rwlock_t <I>*</I></B><I>rwlock</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_rwlock_trywrlock</B> function shall apply a write\nlock like the <B>pthread_rwlock_wrlock</B> function, with the\nexception that the function shall fail if any thread currently holds\n<I>rwlock</I> (for reading or writing). \n</P>\n<P>The <B>pthread_rwlock_wrlock</B> function shall apply a write lock\nto the read-write lock referenced by <I>rwlock</I>. The calling\nthread acquires the write lock if no other thread (reader or writer)\nholds the read-write lock <I>rwlock</I>. Otherwise, the thread shall\nblock until it can acquire the lock. The calling thread may deadlock\nif at the time the call is made it holds the read-write lock (whether\na read or write lock). \n</P>\n<P><B>Pthreads-win32</B> does not prefer either writers or readers in\nacquiring the lock – all threads enter a single prioritised FIFO\nqueue. While this may not be optimally efficient for some\napplications, it does ensure that one type does not starve the other.</P>\n<P>Results are undefined if any of these functions are called with an\nuninitialized read-write lock. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_READER_WRITER_LOCKS</B> in\npthread.h as  200112L to indicate that the reader/writer routines are\nimplemented and may be used.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>The <B>pthread_rwlock_trywrlock</B> function shall return zero if\nthe lock for writing on the read-write lock object referenced by\n<I>rwlock</I> is acquired. Otherwise, an error number shall be\nreturned to indicate the error. \n</P>\n<P>If successful, the <B>pthread_rwlock_wrlock</B> function shall\nreturn zero; otherwise, an error number shall be returned to indicate\nthe error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_rwlock_trywrlock</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>EBUSY</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe read-write lock could not be acquired for writing because it was\n\talready locked for reading or writing. \n\t</DD></DL>\n<P>\nThe <B>pthread_rwlock_trywrlock</B> and <B>pthread_rwlock_wrlock</B>\nfunctions may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>rwlock</I> does not refer to an\n\tinitialized read-write lock object. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>Applications using these functions may be subject to priority\ninversion, as discussed in the Base Definitions volume of\nIEEE&nbsp;Std&nbsp;1003.1-2001, Section 3.285, Priority Inversion. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_rwlock_init.html\"><B>pthread_rwlock_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_rdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedrdlock.html\"><B>pthread_rwlock_timedrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_timedwrlock.html\"><B>pthread_rwlock_timedwrlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_rdlock.html\"><B>pthread_rwlock_tryrdlock</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlock_unlock.html\"><B>pthread_rwlock_unlock</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_rwlockattr_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_RWLOCKATTR_DESTROY&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;504000\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;18474200\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_rwlockattr_destroy, pthread_rwlockattr_init - destroy and\ninitialize the read-write lock attributes object \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_rwlockattr_destroy(pthread_rwlockattr_t <I>*</I></B><I>attr</I><B>);\n<BR>int pthread_rwlockattr_init(pthread_rwlockattr_t <I>*</I></B><I>attr</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_rwlockattr_destroy</B> function shall destroy a\nread-write lock attributes object. A destroyed <I>attr</I> attributes\nobject can be reinitialized using <B>pthread_rwlockattr_init</B> ;\nthe results of otherwise referencing the object after it has been\ndestroyed are undefined. An implementation may cause\n<B>pthread_rwlockattr_destroy</B> to set the object referenced by\n<I>attr</I> to an invalid value. \n</P>\n<P>The <B>pthread_rwlockattr_init</B> function shall initialize a\nread-write lock attributes object <I>attr</I> with the default value\nfor all of the attributes defined by the implementation. \n</P>\n<P>Results are undefined if <B>pthread_rwlockattr_init</B> is called\nspecifying an already initialized <I>attr</I> attributes object. \n</P>\n<P>After a read-write lock attributes object has been used to\ninitialize one or more read-write locks, any function affecting the\nattributes object (including destruction) shall not affect any\npreviously initialized read-write locks. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_READER_WRITER_LOCKS</B> in\npthread.h as 200112L to indicate that the reader/writer routines are\nimplemented and may be used.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>If successful, the <B>pthread_rwlockattr_destroy</B> and\n<B>pthread_rwlockattr_init</B> functions shall return zero;\notherwise, an error number shall be returned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_rwlockattr_destroy</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> is invalid. \n\t</DD></DL>\n<P>\nThe <B>pthread_rwlockattr_init</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>ENOMEM</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tInsufficient memory exists to initialize the read-write lock\n\tattributes object. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_rwlock_init.html\"><B>pthread_rwlock_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlockattr_setpshared.html\"><B>pthread_rwlockattr_getpshared</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlockattr_setpshared.html\"><B>pthread_rwlockattr_setpshared</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_rwlockattr_setpshared.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_RWLOCKATTR_GETPSHARED&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;10124400\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;12572100\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared - get\nand set the process-shared attribute of the read-write lock\nattributes object \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *\nrestrict </B><I>attr</I><B>, int *restrict</B> <I>pshared</I><B>);\n<BR>int pthread_rwlockattr_setpshared(pthread_rwlockattr_t <I>*</I></B><I>attr</I><B>,\nint</B> <I>pshared</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_rwlockattr_getpshared</B> function shall obtain the\nvalue of the <I>process-shared</I> attribute from the initialized\nattributes object referenced by <I>attr</I>. The\n<B>pthread_rwlockattr_setpshared</B> function shall set the\n<I>process-shared</I> attribute in an initialized attributes object\nreferenced by <I>attr</I>. \n</P>\n<P>The <I>process-shared</I> attribute shall be set to\n<B>PTHREAD_PROCESS_SHARED</B> to permit a read-write lock to be\noperated upon by any thread that has access to the memory where the\nread-write lock is allocated, even if the read-write lock is\nallocated in memory that is shared by multiple processes. If the\n<I>process-shared</I> attribute is <B>PTHREAD_PROCESS_PRIVATE</B>,\nthe read-write lock shall only be operated upon by threads created\nwithin the same process as the thread that initialized the read-write\nlock; if threads of differing processes attempt to operate on such a\nread-write lock, the behavior is undefined. The default value of the\n<I>process-shared</I> attribute shall be <B>PTHREAD_PROCESS_PRIVATE</B>.\n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_THREAD_PROCESS_SHARED</B> in\npthread.h as -1 to indicate that these routines are implemented but\nthey do not support the process shared option.</P>\n<P>Additional attributes, their default values, and the names of the\nassociated functions to get and set those attribute values are\nimplementation-defined. \n</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_READER_WRITER_LOCKS</B> in\npthread.h as  200112L to indicate that the reader/writer routines are\nimplemented and may be used.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, the <B>pthread_rwlockattr_getpshared</B>\nfunction shall return zero and store the value of the <I>process-shared</I>\nattribute of <I>attr</I> into the object referenced by the <I>pshared</I>\nparameter. Otherwise, an error number shall be returned to indicate\nthe error. \n</P>\n<P>If successful, the <B>pthread_rwlockattr_setpshared</B> function\nshall return zero; otherwise, an error number shall be returned to\nindicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_rwlockattr_getpshared</B> and\n<B>pthread_rwlockattr_setpshared</B> functions may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>attr</I> is invalid. \n\t</DD></DL>\n<P>\nThe <B>pthread_rwlockattr_setpshared</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe new value specified for the attribute is outside the range of\n\tlegal values for that attribute. \n\t</DD><DT>\n\t<B>ENOTSUP</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe new value specified for the attribute is <B>PTHREAD_PROCESS_SHARED</B>.\n\t\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_rwlock_init.html\"><B>pthread_rwlock_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlockattr_init.html\"><B>pthread_rwlockattr_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_rwlockattr_init.html\"><B>pthread_rwlockattr_init</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_self.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_SELF(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;11361600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;11575700\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_self - return identifier of current thread \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>pthread_t pthread_self(void);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P><B>pthread_self</B> return the thread identifier for the calling\nthread. \n</P>\n<P><B>Pthreads-w32</B> also provides support for <B>Win32</B> native\nthreads to interact with POSIX threads through the pthreads API.\nWhereas all threads created via a call to pthread_create have a POSIX\nthread ID and thread state, the library ensures that any Win32 native\nthreads that interact through the Pthreads API also generate a POSIX\nthread ID and thread state when and if necessary. This provides full\n<SPAN LANG=\"en-GB\">reciprocity</SPAN> between Win32 and POSIX\nthreads. Win32 native threads that generate a POSIX thread ID and\nstate are treated by the library as having been created with the\n<B>PTHREAD_CREATE_DETACHED</B> attribute.</P>\n<P>Any Win32 native thread may call <B>pthread_self</B> directly to\nreturn it's POSIX thread identifier. The ID and state will be\ngenerated if it does not already exist. Win32 native threads do not\nneed to call <B>pthread_self</B> before calling Pthreads-w32 routines\nunless that routine requires a pthread_t parameter.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">See Also</A></H2>\n<P><A HREF=\"pthread_equal.html\"><B>pthread_equal</B>(3)</A> ,\n<A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A> ,\n<A HREF=\"pthread_detach.html\"><B>pthread_detach</B>(3)</A> ,\n<A HREF=\"pthread_setschedparam.html\"><B>pthread_setschedparam</B>(3)</A>\n, <A HREF=\"pthread_setschedparam.html\"><B>pthread_getschedparam</B>(3)</A>\n. \n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect4\" NAME=\"toc4\">See Also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_setcancelstate.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_CANCEL(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;12090500\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050504;16361300\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_cancel, pthread_setcancelstate, pthread_setcanceltype,\npthread_testcancel - thread cancellation \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_cancel(pthread_t </B><I>thread</I><B>);</B> \n</P>\n<P><B>int pthread_setcancelstate(int </B><I>state</I><B>, int\n*</B><I>oldstate</I><B>);</B> \n</P>\n<P><B>int pthread_setcanceltype(int </B><I>type</I><B>, int\n*</B><I>oldtype</I><B>);</B> \n</P>\n<P><B>void pthread_testcancel(void);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Cancellation is the mechanism by which a thread can terminate the\nexecution of another thread. More precisely, a thread can send a\ncancellation request to another thread. Depending on its settings,\nthe target thread can then either ignore the request, honor it\nimmediately, or defer it until it reaches a cancellation point. \n</P>\n<P>When a thread eventually honors a cancellation request, it\nperforms as if <B>pthread_exit(PTHREAD_CANCELED)</B> has been called\nat that point: all cleanup handlers are executed in reverse order,\ndestructor functions for thread-specific data are called, and finally\nthe thread stops executing with the return value <B>PTHREAD_CANCELED</B>.\nSee <A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> for more\ninformation. \n</P>\n<P><B>pthread_cancel</B> sends a cancellation request to the thread\ndenoted by the <I>thread</I> argument. \n</P>\n<P><B>pthread_setcancelstate</B> changes the cancellation state for\nthe calling thread -- that is, whether cancellation requests are\nignored or not. The <I>state</I> argument is the new cancellation\nstate: either <B>PTHREAD_CANCEL_ENABLE</B> to enable cancellation, or\n<B>PTHREAD_CANCEL_DISABLE</B> to disable cancellation (cancellation\nrequests are ignored). If <I>oldstate</I> is not <B>NULL</B>, the\nprevious cancellation state is stored in the location pointed to by\n<I>oldstate</I>, and can thus be restored later by another call to\n<B>pthread_setcancelstate</B>. \n</P>\n<P><B>pthread_setcanceltype</B> changes the type of responses to\ncancellation requests for the calling thread: asynchronous\n(immediate) or deferred. The <I>type</I> argument is the new\ncancellation type: either <B>PTHREAD_CANCEL_ASYNCHRONOUS</B> to\ncancel the calling thread as soon as the cancellation request is\nreceived, or <B>PTHREAD_CANCEL_DEFERRED</B> to keep the cancellation\nrequest pending until the next cancellation point. If <I>oldtype</I>\nis not <B>NULL</B>, the previous cancellation state is stored in the\nlocation pointed to by <I>oldtype</I>, and can thus be restored later\nby another call to <B>pthread_setcanceltype</B>. \n</P>\n<P><B>Pthreads-w32</B> provides two levels of support for\n<B>PTHREAD_CANCEL_ASYNCHRONOUS</B>: full and partial. Full support\nrequires an additional DLL and driver be installed on the Windows\nsystem (see the See Also section below) that allows blocked threads\nto be cancelled immediately. Partial support means that the target\nthread will not cancel until it resumes execution naturally. Partial\nsupport is provided if either the DLL or the driver are not\nautomatically detected by the pthreads-w32 library at run-time.</P>\n<P>Threads are always created by <A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A>\nwith cancellation enabled and deferred. That is, the initial\ncancellation state is <B>PTHREAD_CANCEL_ENABLE</B> and the initial\ntype is <B>PTHREAD_CANCEL_DEFERRED</B>. \n</P>\n<P>Cancellation points are those points in the program execution\nwhere a test for pending cancellation requests is performed and\ncancellation is executed if positive. The following POSIX threads\nfunctions are cancellation points: \n</P>\n<P><A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A>\n<BR><A HREF=\"pthread_cond_wait.html\"><B>pthread_cond_wait</B>(3)</A>\n<BR><A HREF=\"pthread_cond_timedwait.html\"><B>pthread_cond_timedwait</B>(3)</A>\n<BR><A HREF=\"pthread_testcancel.html\"><B>pthread_testcancel</B>(3)</A>\n<BR><A HREF=\"sem_wait.html\"><B>sem_wait</B>(3)</A> <BR><A HREF=\"sem_timedwait.html\"><B>sem_timedwait</B>(3)</A>\n<BR><A HREF=\"sigwait.html\"><B>sigwait</B>(3)</A> (not supported under\n<B>Pthreads-w32</B>)</P>\n<P><B>Pthreads-w32</B> provides two functions to enable additional\ncancellation points to be created in user functions that block on\nWin32 HANDLEs:</P>\n<P><A HREF=\"pthreadCancelableWait.html\">pthreadCancelableWait()</A>\n<BR><A HREF=\"pthreadCancelableTimedWait.html\">pthreadCancelableTimedWait()</A></P>\n<P>All other POSIX threads functions are guaranteed not to be\ncancellation points. That is, they never perform cancellation in\ndeferred cancellation mode. \n</P>\n<P><B>pthread_testcancel</B> does nothing except testing for pending\ncancellation and executing it. Its purpose is to introduce explicit\nchecks for cancellation in long sequences of code that do not call\ncancellation point functions otherwise. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P><B>pthread_cancel</B>, <B>pthread_setcancelstate</B> and\n<B>pthread_setcanceltype</B> return 0 on success and a non-zero error\ncode on error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P><B>pthread_cancel</B> returns the following error code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ESRCH</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tno thread could be found corresponding to that specified by the\n\t\t<I>thread</I> ID. \n\t\t</DD></DL>\n</DL>\n<P>\n<B>pthread_setcancelstate</B> returns the following error code on\nerror: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe <I>state</I> argument is not \n\t\t</DD></DL>\n</DL>\n<BLOCKQUOTE>\n<B>PTHREAD_CANCEL_ENABLE</B> nor <B>PTHREAD_CANCEL_DISABLE</B> \n</BLOCKQUOTE>\n<P><B>pthread_setcanceltype</B> returns the following error code on\nerror: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe <I>type</I> argument is not \n\t\t</DD></DL>\n</DL>\n<BLOCKQUOTE>\n<B>PTHREAD_CANCEL_DEFERRED</B> nor <B>PTHREAD_CANCEL_ASYNCHRONOUS</B>\n</BLOCKQUOTE>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<P><A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> ,\n<A HREF=\"pthread_cleanup_push.html\"><B>pthread_cleanup_push</B>(3)</A>\n, <A HREF=\"pthread_cleanup_pop.html\"><B>pthread_cleanup_pop</B>(3)</A>\n, Pthreads-w32 package README file 'Prerequisites' section. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Bugs</A></H2>\n<P>POSIX specifies that a number of system calls (basically, all\nsystem calls that may block, such as <A HREF=\"read.html\"><B>read</B>(2)</A>\n, <A HREF=\"write.html\"><B>write</B>(2)</A> , <A HREF=\"wait.html\"><B>wait</B>(2)</A>\n, etc.) and library functions that may call these system calls (e.g.\n<A HREF=\"fprintf.html\"><B>fprintf</B>(3)</A> ) are cancellation\npoints. <B>Pthreads-win32</B> is not integrated enough with the C\nlibrary to implement this, and thus none of the C library functions\nis a cancellation point. \n</P>\n<P>A workaround for these calls is to temporarily switch to\nasynchronous cancellation (assuming full asynchronous cancellation\nsupport is installed). So, checking for cancellation during a <B>read</B>\nsystem call, for instance, can be achieved as follows: \n</P>\n<BLOCKQUOTE><BR><BR>\n</BLOCKQUOTE>\n<PRE STYLE=\"margin-left: 1cm; margin-right: 1cm\">pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &amp;oldCancelType);\nread(fd, buffer, length);\npthread_setcanceltype(oldCancelType, NULL);</PRE>\n<HR>\n<BLOCKQUOTE><A NAME=\"toc\"></A><B>Table of Contents</B></BLOCKQUOTE>\n<UL>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">See\n\tAlso</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE><A HREF=\"#sect7\" NAME=\"toc7\">Bugs</A> \n\t</BLOCKQUOTE>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_setcanceltype.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_CANCEL(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;12090500\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050504;16362800\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_cancel, pthread_setcancelstate, pthread_setcanceltype,\npthread_testcancel - thread cancellation \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_cancel(pthread_t </B><I>thread</I><B>);</B> \n</P>\n<P><B>int pthread_setcancelstate(int </B><I>state</I><B>, int\n*</B><I>oldstate</I><B>);</B> \n</P>\n<P><B>int pthread_setcanceltype(int </B><I>type</I><B>, int\n*</B><I>oldtype</I><B>);</B> \n</P>\n<P><B>void pthread_testcancel(void);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Cancellation is the mechanism by which a thread can terminate the\nexecution of another thread. More precisely, a thread can send a\ncancellation request to another thread. Depending on its settings,\nthe target thread can then either ignore the request, honor it\nimmediately, or defer it until it reaches a cancellation point. \n</P>\n<P>When a thread eventually honors a cancellation request, it\nperforms as if <B>pthread_exit(PTHREAD_CANCELED)</B> has been called\nat that point: all cleanup handlers are executed in reverse order,\ndestructor functions for thread-specific data are called, and finally\nthe thread stops executing with the return value <B>PTHREAD_CANCELED</B>.\nSee <A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> for more\ninformation. \n</P>\n<P><B>pthread_cancel</B> sends a cancellation request to the thread\ndenoted by the <I>thread</I> argument. \n</P>\n<P><B>pthread_setcancelstate</B> changes the cancellation state for\nthe calling thread -- that is, whether cancellation requests are\nignored or not. The <I>state</I> argument is the new cancellation\nstate: either <B>PTHREAD_CANCEL_ENABLE</B> to enable cancellation, or\n<B>PTHREAD_CANCEL_DISABLE</B> to disable cancellation (cancellation\nrequests are ignored). If <I>oldstate</I> is not <B>NULL</B>, the\nprevious cancellation state is stored in the location pointed to by\n<I>oldstate</I>, and can thus be restored later by another call to\n<B>pthread_setcancelstate</B>. \n</P>\n<P><B>pthread_setcanceltype</B> changes the type of responses to\ncancellation requests for the calling thread: asynchronous\n(immediate) or deferred. The <I>type</I> argument is the new\ncancellation type: either <B>PTHREAD_CANCEL_ASYNCHRONOUS</B> to\ncancel the calling thread as soon as the cancellation request is\nreceived, or <B>PTHREAD_CANCEL_DEFERRED</B> to keep the cancellation\nrequest pending until the next cancellation point. If <I>oldtype</I>\nis not <B>NULL</B>, the previous cancellation state is stored in the\nlocation pointed to by <I>oldtype</I>, and can thus be restored later\nby another call to <B>pthread_setcanceltype</B>. \n</P>\n<P><B>Pthreads-w32</B> provides two levels of support for\n<B>PTHREAD_CANCEL_ASYNCHRONOUS</B>: full and partial. Full support\nrequires an additional DLL and driver be installed on the Windows\nsystem (see the See Also section below) that allows blocked threads\nto be cancelled immediately. Partial support means that the target\nthread will not cancel until it resumes execution naturally. Partial\nsupport is provided if either the DLL or the driver are not\nautomatically detected by the pthreads-w32 library at run-time.</P>\n<P>Threads are always created by <A HREF=\"pthread_create.html\"><B>pthread_create</B>(3)</A>\nwith cancellation enabled and deferred. That is, the initial\ncancellation state is <B>PTHREAD_CANCEL_ENABLE</B> and the initial\ntype is <B>PTHREAD_CANCEL_DEFERRED</B>. \n</P>\n<P>Cancellation points are those points in the program execution\nwhere a test for pending cancellation requests is performed and\ncancellation is executed if positive. The following POSIX threads\nfunctions are cancellation points: \n</P>\n<P><A HREF=\"pthread_join.html\"><B>pthread_join</B>(3)</A>\n<BR><A HREF=\"pthread_cond_wait.html\"><B>pthread_cond_wait</B>(3)</A>\n<BR><A HREF=\"pthread_cond_timedwait.html\"><B>pthread_cond_timedwait</B>(3)</A>\n<BR><A HREF=\"pthread_testcancel.html\"><B>pthread_testcancel</B>(3)</A>\n<BR><A HREF=\"sem_wait.html\"><B>sem_wait</B>(3)</A> <BR><A HREF=\"sem_timedwait.html\"><B>sem_timedwait</B>(3)</A>\n<BR><A HREF=\"sigwait.html\"><B>sigwait</B>(3)</A> (not supported under\n<B>Pthreads-w32</B>)</P>\n<P><B>Pthreads-w32</B> provides two functions to enable additional\ncancellation points to be created in user functions that block on\nWin32 HANDLEs:</P>\n<P><A HREF=\"pthreadCancelableWait.html\">pthreadCancelableWait()</A>\n<BR><A HREF=\"pthreadCancelableTimedWait.html\">pthreadCancelableTimedWait()</A></P>\n<P>All other POSIX threads functions are guaranteed not to be\ncancellation points. That is, they never perform cancellation in\ndeferred cancellation mode. \n</P>\n<P><B>pthread_testcancel</B> does nothing except testing for pending\ncancellation and executing it. Its purpose is to introduce explicit\nchecks for cancellation in long sequences of code that do not call\ncancellation point functions otherwise. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P><B>pthread_cancel</B>, <B>pthread_setcancelstate</B> and\n<B>pthread_setcanceltype</B> return 0 on success and a non-zero error\ncode on error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P><B>pthread_cancel</B> returns the following error code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ESRCH</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tno thread could be found corresponding to that specified by the\n\t\t<I>thread</I> ID. \n\t\t</DD></DL>\n</DL>\n<P>\n<B>pthread_setcancelstate</B> returns the following error code on\nerror: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe <I>state</I> argument is not \n\t\t</DD></DL>\n</DL>\n<BLOCKQUOTE>\n<B>PTHREAD_CANCEL_ENABLE</B> nor <B>PTHREAD_CANCEL_DISABLE</B> \n</BLOCKQUOTE>\n<P><B>pthread_setcanceltype</B> returns the following error code on\nerror: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe <I>type</I> argument is not \n\t\t</DD></DL>\n</DL>\n<BLOCKQUOTE>\n<B>PTHREAD_CANCEL_DEFERRED</B> nor <B>PTHREAD_CANCEL_ASYNCHRONOUS</B>\n</BLOCKQUOTE>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<P><A HREF=\"pthread_exit.html\"><B>pthread_exit</B>(3)</A> ,\n<A HREF=\"pthread_cleanup_push.html\"><B>pthread_cleanup_push</B>(3)</A>\n, <A HREF=\"pthread_cleanup_pop.html\"><B>pthread_cleanup_pop</B>(3)</A>\n, Pthreads-w32 package README file 'Prerequisites' section. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Bugs</A></H2>\n<P>POSIX specifies that a number of system calls (basically, all\nsystem calls that may block, such as <A HREF=\"read.html\"><B>read</B>(2)</A>\n, <A HREF=\"write.html\"><B>write</B>(2)</A> , <A HREF=\"wait.html\"><B>wait</B>(2)</A>\n, etc.) and library functions that may call these system calls (e.g.\n<A HREF=\"fprintf.html\"><B>fprintf</B>(3)</A> ) are cancellation\npoints. <B>Pthreads-win32</B> is not integrated enough with the C\nlibrary to implement this, and thus none of the C library functions\nis a cancellation point. \n</P>\n<P>A workaround for these calls is to temporarily switch to\nasynchronous cancellation (assuming full asynchronous cancellation\nsupport is installed). So, checking for cancellation during a <B>read</B>\nsystem call, for instance, can be achieved as follows: \n</P>\n<BLOCKQUOTE><BR><BR>\n</BLOCKQUOTE>\n<PRE STYLE=\"margin-left: 1cm; margin-right: 1cm\">pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &amp;oldCancelType);\nread(fd, buffer, length);\npthread_setcanceltype(oldCancelType, NULL);</PRE>\n<HR>\n<BLOCKQUOTE><A NAME=\"toc\"></A><B>Table of Contents</B></BLOCKQUOTE>\n<UL>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">See\n\tAlso</A> \n\t</BLOCKQUOTE>\n\t<LI><BLOCKQUOTE><A HREF=\"#sect7\" NAME=\"toc7\">Bugs</A> \n\t</BLOCKQUOTE>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_setconcurrency.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_GETCONCURRENCY&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;19162600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;19223800\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_getconcurrency, pthread_setconcurrency - get and set the\nlevel of concurrency \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_getconcurrency(void);</B> <BR><B>int\npthread_setconcurrency(int</B> <I>new_level</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Unbound threads in a process may or may not be required to be\nsimultaneously active. By default, the threads implementation ensures\nthat a sufficient number of threads are active so that the process\ncan continue to make progress. While this conserves system resources,\nit may not produce the most effective level of concurrency. \n</P>\n<P>The <B>pthread_setconcurrency</B> function allows an application\nto inform the threads implementation of its desired concurrency\nlevel, <I>new_level</I>. The actual level of concurrency provided by\nthe implementation as a result of this function call is unspecified. \n</P>\n<P>If <I>new_level</I> is zero, it causes the implementation to\nmaintain the concurrency level at its discretion as if\n<B>pthread_setconcurrency</B> had never been called. \n</P>\n<P>The <B>pthread_getconcurrency</B> function shall return the value\nset by a previous call to the <B>pthread_setconcurrency</B> function.\nIf the <B>pthread_setconcurrency</B> function was not previously\ncalled, this function shall return zero to indicate that the\nimplementation is maintaining the concurrency level. \n</P>\n<P>A call to <B>pthread_setconcurrency</B> shall inform the\nimplementation of its desired concurrency level. The implementation\nshall use this as a hint, not a requirement. \n</P>\n<P>If an implementation does not support multiplexing of user threads\non top of several kernel-scheduled entities, the\n<B>pthread_setconcurrency</B> and <B>pthread_getconcurrency</B>\nfunctions are provided for source code compatibility but they shall\nhave no effect when called. To maintain the function semantics, the\n<I>new_level</I> parameter is saved when <B>pthread_setconcurrency</B>\nis called so that a subsequent call to <B>pthread_getconcurrency</B>\nshall return the same value. \n</P>\n<P><B>Pthreads-w32</B> provides these routines for source code\ncompatibility only, as described in the previous paragraph.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>If successful, the <B>pthread_setconcurrency</B> function shall\nreturn zero; otherwise, an error number shall be returned to indicate\nthe error. \n</P>\n<P>The <B>pthread_getconcurrency</B> function shall always return the\nconcurrency level set by a previous call to <B>pthread_setconcurrency</B>\n. If the <B>pthread_setconcurrency</B> function has never been\ncalled, <B>pthread_getconcurrency</B> shall return zero. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_setconcurrency</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD>\n\tThe value specified by <I>new_level</I> is negative. \n\t</DD><DT>\n\t<B>EAGAIN</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specific by <I>new_level</I> would cause a system resource\n\tto be exceeded. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>Use of these functions changes the state of the underlying\nconcurrency upon which the application depends. Library developers\nare advised to not use the <B>pthread_getconcurrency</B> and\n<B>pthread_setconcurrency</B> functions since their use may conflict\nwith an applications use of these functions. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P>The Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_setschedparam.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_SETSCHEDPARAM(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050504;18110100\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050614;14012300\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_setschedparam, pthread_getschedparam - control thread\nscheduling \n</P>\n<P>parameters \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>int pthread_setschedparam(pthread_t </B><I>target_thread</I><B>,\nint </B><I>policy</I><B>, const struct sched_param *</B><I>param</I><B>);</B>\n</P>\n<P><B>int pthread_getschedparam(pthread_t </B><I>target_thread</I><B>,\nint *</B><I>policy</I><B>, struct sched_param *</B><I>param</I><B>);</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P><B>pthread_setschedparam</B> sets the scheduling parameters for\nthe thread <I>target_thread</I> as indicated by <I>policy</I> and\n<I>param</I>. <I>policy</I> can be either <B>SCHED_OTHER</B>\n(regular, non-real-time scheduling), <B>SCHED_RR</B> (real-time,\nround-robin) or <B>SCHED_FIFO</B> (real-time, first-in first-out).\n<I>param</I> specifies the scheduling priority for the two real-time\npolicies.</P>\n<P><B>Pthreads-w32</B> only supports SCHED_OTHER and does not support\nthe real-time scheduling policies <B>SCHED_RR</B> and <B>SCHED_FIFO.</B>\n</P>\n<P><B>pthread_getschedparam</B> retrieves the scheduling policy and\nscheduling parameters for the thread <I>target_thread</I> and stores\nthem in the locations pointed to by <I>policy</I> and <I>param</I>,\nrespectively. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P><B>pthread_setschedparam</B> and <B>pthread_getschedparam</B>\nreturn 0 on success and a non-zero error code on error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>On error, <B>pthread_setschedparam</B> returns the following error\ncodes: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ENOTSUP</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<I>policy</I> is not <B>SCHED_OTHER.</B></DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tOne of the arguments is invalid, or the priority value specified by\n\t\t<I>param</I> is not valid for the specified policy.</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>ESRCH</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tThe <I>target_thread</I> is invalid or has already terminated \n\t\t</DD></DL>\n</DL>\n<P>\nOn error, <B>pthread_getschedparam</B> returns the following error\ncodes: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ESRCH</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tthe <I>target_thread</I> is invalid or has already terminated \n\t\t</DD></DL>\n</DL>\n<H2>\n<A HREF=\"#toc5\" NAME=\"sect5\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">See Also</A></H2>\n<P><A HREF=\"sched_setscheduler.html\"><B>sched_setscheduler</B>(2)</A>\n, <A HREF=\"sched_getscheduler.html\"><B>sched_getscheduler</B>(2)</A>\n, <A HREF=\"sched_getparam.html\"><B>sched_getparam</B>(2)</A> ,\n<A HREF=\"pthread_attr_setschedpolicy.html\"><B>pthread_attr_setschedpolicy</B>(3)</A>\n, <A HREF=\"pthread_attr_setschedparam.html\"><B>pthread_attr_setschedparam</B>(3)</A>\n. \n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">See Also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_spin_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_SPIN_DESTROY&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;12074100\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;19014200\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_spin_destroy, pthread_spin_init - destroy or initialize a\nspin lock object (<B>ADVANCED REALTIME THREADS</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>pthread_spinlock_t</B> <I>lock</I> <B>=\nPTHREAD_SPINLOCK_INITIALIZER;</B></P>\n<P><B>int pthread_spin_destroy(pthread_spinlock_t *</B><I>lock</I><B>);\n<BR>int pthread_spin_init(pthread_spinlock_t *</B><I>lock</I><B>, int</B>\n<I>pshared</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_spin_destroy</B> function shall destroy the spin\nlock referenced by <I>lock</I> and release any resources used by the\nlock. The effect of subsequent use of the lock is undefined until the\nlock is reinitialized by another call to <B>pthread_spin_init</B> .\nThe results are undefined if <B>pthread_spin_destroy</B> is called\nwhen a thread holds the lock, or if this function is called with an\nuninitialized thread spin lock. \n</P>\n<P>The <B>pthread_spin_init</B> function shall allocate any resources\nrequired to use the spin lock referenced by <I>lock</I> and\ninitialize the lock to an unlocked state. \n</P>\n<P><B>Pthreads-w32</B> supports single and multiple processor systems\nas well as process CPU affinity masking by checking the mask when the\nspin lock is initialized. If the process is using only a single\nprocessor at the time <B>pthread_spin_init</B> is called then the\nspin lock is initialized as a PTHREAD_MUTEX_NORMAL mutex object. A\nthread that calls <A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_lock(3)</B></A>\nwill block rather than spin in this case. If the process CPU affinity\nmask is altered after the spin lock has been initialised, the spin\nlock is not modified, and may no longer be optimal for the number of\nCPUs available.</P>\n<P><B>Pthreads-w32</B> defines <B>_POSIX_THREAD_PROCESS_SHARED</B> in\npthread.h as -1 to indicate that these routines do not support the\n<B>PTHREAD_PROCESS_SHARED</B> attribute. <B>pthread_spin_init</B>\nwill return the error <B>ENOTSUP</B> if the value of <I>pshared</I>\nis not <B>PTHREAD_PROCESS_PRIVATE</B>.</P>\n<P>The results are undefined if <B>pthread_spin_init</B> is called\nspecifying an already initialized spin lock. The results are\nundefined if a spin lock is used without first being initialized. \n</P>\n<P>If the <B>pthread_spin_init</B> function fails, the lock is not\ninitialized and the contents of <I>lock</I> are undefined. \n</P>\n<P>Only the object referenced by <I>lock</I> may be used for\nperforming synchronization. \n</P>\n<P>The result of referring to copies of that object in calls to\n<B>pthread_spin_destroy</B> , <A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_lock</B>(3)</A>\n, <A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_trylock</B>(3)</A>,\nor <A HREF=\"pthread_spin_unlock.html\"><B>pthread_spin_unlock</B>(3)</A>\nis undefined. \n</P>\n<P><B>Pthreads-w32</B> supports statically initialized spin locks\nusing <B>PTHREAD_SPINLOCK_INITIALIZER</B>. An application should\nstill call <B>pthread_spin_destroy</B> at some point to ensure that\nany resources consumed by the spin lock are released.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, these functions shall return zero;\notherwise, an error number shall be returned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>These functions may fail if: \n</P>\n<DL>\n\t<DT><B>EBUSY</B> \n\t</DT><DD>\n\tThe implementation has detected an attempt to initialize or destroy\n\ta spin lock while it is in use (for example, while being used in a\n\t<A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_lock</B>(3)</A>\n\tcall) by another thread. \n\t</DD><DT>\n\t<B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>lock</I> is invalid. \n\t</DD></DL>\n<P>\nThe <B>pthread_spin_init</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>ENOTSUP</B> \n\t</DT><DD>\n\tThe value of <I>pshared</I> is not <B>PTHREAD_PROCESS_PRIVATE</B>.</DD><DT>\n\t<B>ENOMEM</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tInsufficient memory exists to initialize the lock. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>The <B>pthread_spin_destroy</B> and <B>pthread_spin_init</B>\nfunctions are part of the Spin Locks option and need not be provided\non all implementations. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_lock</B>(3)</A> <B>,</B>\n<A HREF=\"pthread_spin_unlock.html\"><B>pthread_spin_unlock</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_spin_lock.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_SPIN_LOCK&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;12202300\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;19302300\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_spin_lock, pthread_spin_trylock - lock a spin lock object\n(<B>ADVANCED REALTIME THREADS</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_spin_lock(pthread_spinlock_t *</B><I>lock</I><B>);\n<BR>int pthread_spin_trylock(pthread_spinlock_t *</B><I>lock</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_spin_lock</B> function shall lock the spin lock\nreferenced by <I>lock</I>. The calling thread shall acquire the lock\nif it is not held by another thread. Otherwise, the thread shall spin\n(that is, shall not return from the <B>pthread_spin_lock</B> call)\nuntil the lock becomes available. The results are undefined if the\ncalling thread holds the lock at the time the call is made.</P>\n<P><B>Pthreads-w32</B> supports single and multiple processor systems\nas well as process CPU affinity masking by checking the mask when the\nspin lock is initialized. If the process is using only a single\nprocessor at the time <A HREF=\"pthread_spin_init.html\"><B>pthread_spin_init</B>(3)</A>\nis called then the spin lock is initialized as a PTHREAD_MUTEX_NORMAL\nmutex object. A thread that calls <B>pthread_spin_lock</B> will block\nrather than spin in this case. If the process CPU affinity mask is\naltered after the spin lock has been initialised, the spin lock is\nnot modified, and may no longer be optimal for the number of CPUs\navailable.</P>\n<P>The <B>pthread_spin_trylock</B> function shall lock the spin lock\nreferenced by <I>lock</I> if it is not held by any thread. Otherwise,\nthe function shall fail. \n</P>\n<P>The results are undefined if any of these functions is called with\nan uninitialized spin lock. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, these functions shall return zero;\notherwise, an error number shall be returned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>These functions may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value specified by <I>lock</I> does not refer to an initialized\n\tspin lock object. \n\t</DD></DL>\n<P>\nThe <B>pthread_spin_trylock</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>EBUSY</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tA thread currently holds the lock. \n\t</DD></DL>\n<P>\nThese functions shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>Applications using this function may be subject to priority\ninversion, as discussed in the Base Definitions volume of\nIEEE&nbsp;Std&nbsp;1003.1-2001, Section 3.285, Priority Inversion. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_spin_init.html\"><B>pthread_spin_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_spin_unlock.html\"><B>pthread_spin_unlock</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_spin_unlock.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;PTHREAD_SPIN_UNLOCK&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;12401400\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;12462400\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>pthread_spin_unlock - unlock a spin lock object (<B>ADVANCED\nREALTIME THREADS</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt; </B>\n</P>\n<P><B>int pthread_spin_unlock(pthread_spinlock_t *</B><I>lock</I><B>);\n</B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>pthread_spin_unlock</B> function shall release the spin\nlock referenced by <I>lock</I> which was locked via the\n<A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_lock</B>(3)</A> or\n<A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_trylock</B>(3)</A>\nfunctions. If there are threads spinning on the lock when\n<B>pthread_spin_unlock</B> is called, the lock becomes available and\nan unspecified spinning thread shall acquire the lock. \n</P>\n<P><B>Pthreads-w32</B> does not check ownership of the lock and it is\ntherefore possible for a thread other than the locker to unlock the\nspin lock. This is not a feature that should be exploited.</P>\n<P>The results are undefined if this function is called with an\nuninitialized thread spin lock. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, the <B>pthread_spin_unlock</B>\nfunction shall return zero; otherwise, an error number shall be\nreturned to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>pthread_spin_unlock</B> function may fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD>\n\tAn invalid argument was specified. \n\t</DD><DD STYLE=\"margin-left: -2cm\">\n\t<BR>\n\t</DD></DL>\n<P>\nThis function shall not return an error code of [EINTR]. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P><B>Pthreads-w32</B> does not check ownership of the lock and it is\ntherefore possible for a thread other than the locker to unlock the\nspin lock. This is not a feature that should be exploited.</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"pthread_spin_init.html\"><B>pthread_spin_destroy</B>(3)</A>\n<B>,</B> <A HREF=\"pthread_spin_lock.html\"><B>pthread_spin_lock</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;pthread.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_timechange_handler_np.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_TIMECHANGE_HANDLER_NP manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;322600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;22110600\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P STYLE=\"font-weight: medium\">pthread_timechange_handler_np –\nalert timed waiting condition variables to system time changes.</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>void * pthread_timechange_handler_np(void * </B><I>dummy</I><B>);</B></P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>To improve tolerance against operator or time service initiated\nsystem clock changes.</P>\n<P><B>pthread_timechange_handler_np </B>can be called by an\napplication when it receives a WM_TIMECHANGE message from the system.\nAt present it broadcasts all condition variables so that waiting\nthreads can wake up and re-evaluate their conditions and restart\ntheir timed waits if required.</P>\n<P><B>pthread_timechange_handler_np </B>has the same return type and\nargument type as a thread routine so that it may be called directly\nthrough pthread_create(), i.e. as a separate thread. If run as a\nthread, the return code must be retrieved through <A HREF=\"pthread_join.html\"><B>pthread_join</B>()</A>.</P>\n<P>Although the <I>dummy</I> parameter is required it is not used and\nany value including NULL can be given.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P>None.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\"><FONT COLOR=\"#000080\">Return Value</FONT></A></H2>\n<P><B>pthread_timechange_handler_np</B> returns 0 on success, or an\nerror code.</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<P>The <B>pthread_timechange_handler_np</B> function returns the\nfollowing error code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EAGAIN</B> \n\t\t</DT></DL>\n</DL>\n<P STYLE=\"margin-left: 2cm; margin-bottom: 0cm\">\nTo indicate that not all condition variables were signalled for some\nreason.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">Author</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_win32_attach_detach_np.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_WIN32_ATTACH_DETACH_NP manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;322600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;22415600\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P STYLE=\"font-weight: medium\">pthread_win32_process_attach_np,\npthread_win32_process_detach_np, pthread_win32_thread_attach_np,\npthread_win32_thread_detach_np – exposed versions of the\npthreads-w32 DLL dllMain() switch functionality for use when\nstatically linking the library.</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>BOOL pthread_win32_process_attach_np (void);</B></P>\n<P><B>BOOL pthread_win32_process_detach_np (void);</B></P>\n<P><B>BOOL pthread_win32_thread_attach_np (void);</B></P>\n<P><B>BOOL pthread_win32_thread_detach_np (void);</B></P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>These functions contain the code normally run via <B>dllMain</B>\nwhen the library is used as a dll but which need to be called\nexplicitly by an application when the library is statically linked.</P>\n<P>You will need to call <B>pthread_win32_process_attach_np</B>\nbefore you can call any pthread routines when statically linking. You\nshould call <B>pthread_win32_process_detach_np</B> before exiting\nyour application to clean up.</P>\n<P><B>pthread_win32_thread_attach_np</B> is currently a no-op, but\n<B>pthread_win32_thread_detach_np</B> is needed to clean up the\nimplicit  pthread handle that is allocated to a Win32 thread if it\ncalls certain pthreads routines. Call this routine when the Win32\nthread exits.</P>\n<P>These functions invariably return TRUE except for\n<B>pthread_win32_process_attach_np</B> which will return FALSE if\npthreads-w32 initialisation fails.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P>None.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\"><FONT COLOR=\"#000080\">Return Value</FONT></A></H2>\n<P>These routines return TRUE (non-zero) on success, or FALSE (0) if\nthey fail.</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<P>None.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">Author</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/pthread_win32_test_features_np.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>PTHREAD_WIN32_TEST_FEATURES_NP manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;322600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050510;17405600\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P STYLE=\"font-weight: medium\">pthread_win32_test_features_np –\nfind out what features were detected at process attach time.</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;pthread.h&gt;</B> \n</P>\n<P><B>BOOL pthread_win32_test_features_np(int</B> <I>mask</I><B>);</B></P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P><B>pthread_win32_test_features_np</B> allows an application to\ncheck which run-time auto-detected features are available within the\nlibrary.</P>\n<P>The possible features are:</P>\n<P><B>PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE</B></P>\n<P STYLE=\"margin-left: 2cm\">Return TRUE if the Win32 version of\nInterlockedCompareExchange() is being used. On IA32 systems the\nlibrary can use optimised and inlinable assembler versions of\nInterlockedExchange() and InterlockedCompareExchange().</P>\n<P><B>PTW32_ALERTABLE_ASYNC_CANCEL</B></P>\n<P STYLE=\"margin-left: 2cm\">Return TRUE if the QueueUserAPCEx package\nQUSEREX.DLL and the AlertDrv.sys driver was detected. This package\nprovides alertable (pre-emptive) asynchronous threads cancellation.\nIf this feature returns FALSE then the default async cancel scheme is\nin use, which cannot cancel blocked threads.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P>None.</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\"><FONT COLOR=\"#000080\">Return Value</FONT></A></H2>\n<P><B>pthread_win32_test_features_np</B> returns TRUE (non-zero) if\nthe specified feature is present, and FALSE (0) otherwise.</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Errors</A></H2>\n<P>None.</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Author</A></H2>\n<P>Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Errors</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect6\" NAME=\"toc6\">Author</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/sched_get_priority_max.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;SCHED_GET_PRIORITY_MAX&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;12575100\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050510;12533300\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>sched_get_priority_max, sched_get_priority_min - get priority\nlimits (<B>REALTIME</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;sched.h&gt; </B>\n</P>\n<P><B>int sched_get_priority_max(int</B> <I>policy</I><B>); <BR>int\nsched_get_priority_min(int</B> <I>policy</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>sched_get_priority_max</B> and <B>sched_get_priority_min</B>\nfunctions shall return the appropriate maximum or minimum,\nrespectively, for the scheduling policy specified by <I>policy</I>. \n</P>\n<P>The value of <I>policy</I> shall be one of the scheduling policy\nvalues defined in <I>&lt;sched.h&gt;</I>. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>If successful, the <B>sched_get_priority_max</B> and\n<B>sched_get_priority_min</B> functions shall return the appropriate\nmaximum or minimum values, respectively. If unsuccessful, they shall\nreturn a value of -1 and set <I>errno</I> to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>sched_get_priority_max</B> and <B>sched_get_priority_min</B>\nfunctions shall fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tThe value of the <I>policy</I> parameter does not represent a\n\tdefined scheduling policy. \n\t</DD></DL>\n<P>\n<I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"sched_getscheduler.html\"><B>sched_getscheduler</B>(3)</A>\n<B>,</B> <A HREF=\"sched_setscheduler.html\"><B>sched_setscheduler</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;sched.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/sched_getscheduler.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;SCHED_GETSCHEDULER&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;13153500\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;13202000\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>sched_getscheduler - get scheduling policy (<B>REALTIME</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;sched.h&gt; </B>\n</P>\n<P><B>int sched_getscheduler(pid_t</B> <I>pid</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>sched_getscheduler</B> function shall return the scheduling\npolicy of the process specified by <I>pid</I>. If the value of <I>pid</I>\nis negative, the behavior of the <B>sched_getscheduler</B> function\nis unspecified. \n</P>\n<P>The values that can be returned by <B>sched_getscheduler</B> are\ndefined in the <I>&lt;sched.h&gt;</I> header. \n</P>\n<P><B>Pthreads-w32</B> only supports the <B>SCHED_OTHER</B> policy,\nwhich is the only value that can be returned. However, checks on <I>pid</I>\nand permissions are performed first so that the other useful side\neffects of this routine are retained.</P>\n<P>If a process specified by <I>pid</I> exists, and if the calling\nprocess has permission, the scheduling policy shall be returned for\nthe process whose process ID is equal to <I>pid</I>. \n</P>\n<P>If <I>pid</I> is zero, the scheduling policy shall be returned for\nthe calling process. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, the <B>sched_getscheduler</B> function\nshall return the scheduling policy of the specified process. If\nunsuccessful, the function shall return -1 and set <I>errno</I> to\nindicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>sched_getscheduler</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>EPERM</B> \n\t</DT><DD>\n\tThe requesting process does not have permission to determine the\n\tscheduling policy of the specified process. \n\t</DD><DT>\n\t<B>ESRCH</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tNo process can be found corresponding to that specified by <I>pid</I>.\n\t\t</DD></DL>\n<P>\n<I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"sched_setscheduler.html\"><B>sched_setscheduler</B>(3)</A>\n, the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;sched.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/sched_setscheduler.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;SCHED_SETSCHEDULER&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;13012200\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;13193700\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>sched_setscheduler - set scheduling policy and parameters\n(<B>REALTIME</B>) \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;sched.h&gt; </B>\n</P>\n<P><B>int sched_setscheduler(pid_t</B> <I>pid</I><B>, int</B> <I>policy</I><B>,\nconst struct sched_param *</B><I>param</I><B>); </B>\n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>sched_setscheduler</B> function shall set the scheduling\npolicy and scheduling parameters of the process specified by <I>pid</I>\nto <I>policy</I> and the parameters specified in the <B>sched_param</B>\nstructure pointed to by <I>param</I>, respectively. The value of the\n<I>sched_priority</I> member in the <B>sched_param</B> structure\nshall be any integer within the inclusive priority range for the\nscheduling policy specified by <I>policy</I>. If the value of <I>pid</I>\nis negative, the behavior of the <B>sched_setscheduler</B> function\nis unspecified. \n</P>\n<P>The possible values for the <I>policy</I> parameter are defined in\nthe <I>&lt;sched.h&gt;</I> header. \n</P>\n<P><B>Pthreads-w32</B> only supports the <B>SCHED_OTHER</B> policy.\nAny other value for <I>policy</I> will return failure with errno set\nto <B>ENOSYS</B>. However, checks on <I>pid</I> and permissions are\nperformed first so that the other useful side effects of this routine\nare retained.</P>\n<P>If a process specified by <I>pid</I> exists, and if the calling\nprocess has permission, the scheduling policy and scheduling\nparameters shall be set for the process whose process ID is equal to\n<I>pid</I>. \n</P>\n<P>If <I>pid</I> is zero, the scheduling policy and scheduling\nparameters shall be set for the calling process. \n</P>\n<P>Implementations may require that the requesting process have\npermission to set its own scheduling parameters or those of another\nprocess. Additionally, implementation-defined restrictions may apply\nas to the appropriate privileges required to set a process’ own\nscheduling policy, or another process’ scheduling policy, to a\nparticular value. \n</P>\n<P>The <B>sched_setscheduler</B> function shall be considered\nsuccessful if it succeeds in setting the scheduling policy and\nscheduling parameters of the process specified by <I>pid</I> to the\nvalues specified by <I>policy</I> and the structure pointed to by\n<I>param</I>, respectively. \n</P>\n<P>The effect of this function on individual threads is dependent on\nthe scheduling contention scope of the threads: \n</P>\n<DL>\n\t<DT>* \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tFor threads with system scheduling contention scope, these functions\n\tshall have no effect on their scheduling. \n\t</DD><DT>\n\t* \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tFor threads with process scheduling contention scope, the threads’\n\tscheduling policy and associated parameters shall not be affected.\n\tHowever, the scheduling of these threads with respect to threads in\n\tother processes may be dependent on the scheduling parameters of\n\ttheir process, which are governed using these functions. \n\t</DD></DL>\n<P>\nThis function is not atomic with respect to other threads in the\nprocess. Threads may continue to execute while this function call is\nin the process of changing the scheduling policy and associated\nscheduling parameters for the underlying kernel-scheduled entities\nused by the process contention scope threads. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>Upon successful completion, the function shall return the former\nscheduling policy of the specified process. If the <B>sched_setscheduler</B>\nfunction fails to complete successfully, the policy and scheduling\nparameters shall remain unchanged, and the function shall return a\nvalue of -1 and set <I>errno</I> to indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>The <B>sched_setscheduler</B> function shall fail if: \n</P>\n<DL>\n\t<DT><B>EINVAL</B> \n\t</DT><DD>\n\tThe value of the <I>policy</I> parameter is invalid, or one or more\n\tof the parameters contained in <I>param</I> is outside the valid\n\trange for the specified scheduling policy. \n\t</DD><DT>\n\t<B>EPERM</B> \n\t</DT><DD>\n\tThe requesting process does not have permission to set either or\n\tboth of the scheduling parameters or the scheduling policy of the\n\tspecified process. \n\t</DD><DT>\n\t<B>ESRCH</B> \n\t</DT><DD STYLE=\"margin-bottom: 0.5cm\">\n\tNo process can be found corresponding to that specified by <I>pid</I>.\n\t\t</DD></DL>\n<P>\n<I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P><A HREF=\"sched_getscheduler.html\"><B>sched_getscheduler</B>(3)</A>\n<B>,</B> the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;sched.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/sched_yield.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>&quot;SCHED_YIELD&quot;(P) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;14034600\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050505;14050300\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>sched_yield - yield the processor \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;sched.h&gt; </B>\n</P>\n<P><B>int sched_yield(void);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>The <B>sched_yield</B> function shall force the running thread to\nrelinquish the processor until it again becomes the head of its\nthread list. It takes no arguments. \n</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Return Value</A></H2>\n<P>The <B>sched_yield</B> function shall return 0 if it completes\nsuccessfully; otherwise, it shall return a value of -1 and set <I>errno</I>\nto indicate the error. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Errors</A></H2>\n<P>No errors are defined. \n</P>\n<P><I>The following sections are informative.</I> \n</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Examples</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Application Usage</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc7\" NAME=\"sect7\">Rationale</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">Future Directions</A></H2>\n<P>None. \n</P>\n<H2><A HREF=\"#toc9\" NAME=\"sect9\">See Also</A></H2>\n<P>The Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,\n<I>&lt;sched.h&gt;</I> \n</P>\n<H2><A HREF=\"#toc10\" NAME=\"sect10\">Copyright</A></H2>\n<P>Portions of this text are reprinted and reproduced in electronic\nform from IEEE Std 1003.1, 2003 Edition, Standard for Information\nTechnology -- Portable Operating System Interface (POSIX), The Open\nGroup Base Specifications Issue 6, Copyright (C) 2001-2003 by the\nInstitute of Electrical and Electronics Engineers, Inc and The Open\nGroup. In the event of any discrepancy between this version and the\noriginal IEEE and The Open Group Standard, the original IEEE and The\nOpen Group Standard is the referee document. The original Standard\ncan be obtained online at <A HREF=\"http://www.opengroup.org/unix/online.html\">http://www.opengroup.org/unix/online.html</A>\n. \n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Examples</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Application\n\tUsage</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Rationale</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect8\" NAME=\"toc8\">Future\n\tDirections</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect9\" NAME=\"toc9\">See\n\tAlso</A> \n\t</P>\n\t<LI><P><A HREF=\"#sect10\" NAME=\"toc10\">Copyright</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/manual/sem_init.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML>\n<HEAD>\n\t<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>SEMAPHORES(3) manual page</TITLE>\n\t<META NAME=\"GENERATOR\" CONTENT=\"OpenOffice.org 1.1.3  (Linux)\">\n\t<META NAME=\"CREATED\" CONTENT=\"20050505;14061900\">\n\t<META NAME=\"CHANGED\" CONTENT=\"20050514;195200\">\n\t<!-- manual page source format generated by PolyglotMan v3.2, -->\n\t<!-- available at http://polyglotman.sourceforge.net/ -->\n</HEAD>\n<BODY LANG=\"en-GB\" BGCOLOR=\"#ffffff\" DIR=\"LTR\">\n<H4>POSIX Threads for Windows – REFERENCE - <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A></H4>\n<P><A HREF=\"index.html\">Reference Index</A></P>\n<P><A HREF=\"#toc\">Table of Contents</A></P>\n<H2><A HREF=\"#toc0\" NAME=\"sect0\">Name</A></H2>\n<P>sem_init, sem_wait, sem_trywait, sem_post, sem_getvalue,\nsem_destroy - operations on semaphores \n</P>\n<H2><A HREF=\"#toc1\" NAME=\"sect1\">Synopsis</A></H2>\n<P><B>#include &lt;semaphore.h&gt;</B> \n</P>\n<P><B>int sem_init(sem_t *</B><I>sem</I><B>, int </B><I>pshared</I><B>,\nunsigned int </B><I>value</I><B>);</B> \n</P>\n<P><B>int sem_wait(sem_t * </B><I>sem</I><B>);</B> \n</P>\n<P><B>int sem_timedwait(sem_t * </B><I>sem</I>, <B>const struct\ntimespec *</B><I>abstime</I><B>);</B> \n</P>\n<P><B>int sem_trywait(sem_t * </B><I>sem</I><B>);</B> \n</P>\n<P><B>int sem_post(sem_t * </B><I>sem</I><B>);</B> \n</P>\n<P><B>int sem_post_multiple(sem_t * </B><I>sem, </I><B>int</B>\n<I>number</I><B>);</B> \n</P>\n<P><B>int sem_getvalue(sem_t * </B><I>sem</I><B>, int * </B><I>sval</I><B>);</B>\n</P>\n<P><B>int sem_destroy(sem_t * </B><I>sem</I><B>);</B> \n</P>\n<H2><A HREF=\"#toc2\" NAME=\"sect2\">Description</A></H2>\n<P>Semaphores are counters for resources shared between threads. The\nbasic operations on semaphores are: increment the counter atomically,\nand wait until the counter is non-null and decrement it atomically. \n</P>\n<P><B>sem_init</B> initializes the semaphore object pointed to by\n<I>sem</I>. The count associated with the semaphore is set initially\nto <I>value</I>. The <I>pshared</I> argument indicates whether the\nsemaphore is local to the current process ( <I>pshared</I> is zero)\nor is to be shared between several processes ( <I>pshared</I> is not\nzero).</P>\n<P><B>Pthreads-w32</B> currently does not support process-shared\nsemaphores, thus <B>sem_init</B> always returns with error <B>EPERM</B>\nif <I>pshared</I> is not zero. \n</P>\n<P><B>sem_wait</B> atomically decrements <I>sem</I>'s count if it is\ngreater than 0 and returns immediately or it suspends the calling\nthread until it can resume following a call to <B>sem_post</B> or\n<B>sem_post_multiple</B>.</P>\n<P><B>sem_timedwait</B> atomically decrements <I>sem</I>'s count if\nit is greater than 0 and returns immediately, or it suspends the\ncalling thread. If <I>abstime</I> time arrives before the thread can\nresume following a call to <B>sem_post</B> or <B>sem_post_multiple</B>,\nthen <B>sem_timedwait</B> returns with a return code of -1 after\nhaving set <B>errno</B> to <B>ETIMEDOUT</B>. If the call can return\nwithout suspending then <I>abstime</I> is not checked.</P>\n<P><B>sem_trywait</B> atomically decrements <I>sem</I>'s count if it\nis greater than 0 and returns immediately, or it returns immediately\nwith a return code of -1 after having set <B>errno</B> to <B>EAGAIN</B>.\n<B>sem_trywait</B> never blocks.</P>\n<P><B>sem_post</B> either releases one thread if there are any\nwaiting on <I>sem</I>, or it atomically increments <I>sem</I>'s\ncount.</P>\n<P><B>sem_post_multiple</B> either releases multiple threads if there\nare any waiting on <I>sem</I> and/or it atomically increases <I>sem</I>'s\ncount. If there are currently <I>n</I> waiters, where <I>n</I> the\nlargest number less than or equal to <I>number</I>, then <I>n</I>\nwaiters are released and <I>sem</I>'s count is incremented by <I>number</I>\nminus <I>n</I>.</P>\n<P><B>sem_getvalue</B> stores in the location pointed to by <I>sval</I>\nthe current count of the semaphore <I>sem</I>. In the <B>Pthreads-w32</B>\nimplementation: if the value returned in <I>sval</I> is greater than\nor equal to 0 it was the <I>sem</I>'s count at some point during the\ncall to <B>sem_getvalue</B>. If the value returned in <I>sval</I> is\nless than 0 then it's absolute value represents the number of threads\nwaiting on <I>sem</I> at some point during the call to <B>sem_getvalue.\n</B>POSIX does not require an implementation of <B>sem_getvalue</B>\nto return a value in <I>sval</I> that is less than 0, but if it does\nthen it's absolute value must represent the number of waiters.</P>\n<P><B>sem_destroy</B> destroys a semaphore object, freeing the\nresources it might hold. No threads should be waiting on the\nsemaphore at the time <B>sem_destroy</B> is called.</P>\n<H2><A HREF=\"#toc3\" NAME=\"sect3\">Cancellation</A></H2>\n<P><B>sem_wait</B> and <B>sem_timedwait</B> are cancellation points. \n</P>\n<H2><A HREF=\"#toc4\" NAME=\"sect4\">Async-signal Safety</A></H2>\n<P>These routines are not async-cancel safe.</P>\n<H2><A HREF=\"#toc5\" NAME=\"sect5\">Return Value</A></H2>\n<P>All semaphore functions return 0 on success, or -1 on error in\nwhich case they write an error code in <B>errno</B>. \n</P>\n<H2><A HREF=\"#toc6\" NAME=\"sect6\">Errors</A></H2>\n<P>The <B>sem_init</B> function sets <B>errno</B> to the following\ncodes on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EINVAL</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<I>value</I> exceeds the maximal counter value <B>SEM_VALUE_MAX</B>\n\t\t\t\t</DD><DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\t<B>ENOSYS</B> \n\t\t</DT></DL>\n</DL>\n<BLOCKQUOTE STYLE=\"margin-left: 3cm\">\n<I>pshared</I> is not zero \n</BLOCKQUOTE>\n<P>The <B>sem_timedwait</B> function sets <B>errno</B> to the\nfollowing error code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ETIMEDOUT</B>\n\t\t\t\t</DT></DL>\n</DL>\n<BLOCKQUOTE STYLE=\"margin-left: 3cm\">\nif <I>abstime</I> arrives before the waiting thread can resume\nfollowing a call to <B>sem_post</B> or <B>sem_post_multiple</B>. \n</BLOCKQUOTE>\n<P>The <B>sem_trywait</B> function sets <B>errno</B> to the following\nerror code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EAGAIN</B> \n\t\t</DT></DL>\n</DL>\n<BLOCKQUOTE STYLE=\"margin-left: 3cm\">\nif the semaphore count is currently 0 \n</BLOCKQUOTE>\n<P>The <B>sem_post</B> and <B>sem_post_multiple</B> functions set\n<B>errno</B> to the following error code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>ERANGE</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tif after incrementing, the semaphore count would exceed\n\t\t<B>SEM_VALUE_MAX</B> (the semaphore count is left unchanged in this\n\t\tcase) \n\t\t</DD></DL>\n</DL>\n<P>\nThe <B>sem_destroy</B> function sets <B>errno</B> to the following\nerror code on error: \n</P>\n<DL>\n\t<DL>\n\t\t<DT STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\"><B>EBUSY</B> \n\t\t</DT><DD STYLE=\"margin-right: 1cm; margin-bottom: 0.5cm\">\n\t\tif some threads are currently blocked waiting on the semaphore. \n\t\t</DD></DL>\n</DL>\n<H2>\n<A HREF=\"#toc7\" NAME=\"sect7\">Author</A></H2>\n<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt; \n</P>\n<P>Modified by Ross Johnson for use with <A HREF=\"http://sources.redhat.com/pthreads-win32\">Pthreads-w32</A>.</P>\n<H2><A HREF=\"#toc8\" NAME=\"sect8\">See Also</A></H2>\n<P><A HREF=\"pthread_mutex_init.html\"><B>pthread_mutex_init</B>(3)</A>\n, <A HREF=\"pthread_cond_init.html\"><B>pthread_cond_init</B>(3)</A> ,\n<A HREF=\"pthread_cancel.html\"><B>pthread_cancel</B>(3)</A> . \n</P>\n<HR>\n<P><A NAME=\"toc\"></A><B>Table of Contents</B></P>\n<UL>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect0\" NAME=\"toc0\">Name</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect1\" NAME=\"toc1\">Synopsis</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect2\" NAME=\"toc2\">Description</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect3\" NAME=\"toc3\">Cancellation</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect4\" NAME=\"toc4\">Async-signal\n\tSafety</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect5\" NAME=\"toc5\">Return\n\tValue</A> \n\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect6\" NAME=\"toc6\">Errors</A>\n\t\t</P>\n\t<LI><P STYLE=\"margin-bottom: 0cm\"><A HREF=\"#sect7\" NAME=\"toc7\">Author</A>\n\t\t</P>\n\t<LI><P><A HREF=\"#sect8\" NAME=\"toc8\">See Also</A> \n\t</P>\n</UL>\n</BODY>\n</HTML>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/misc.c",
    "content": "/*\n * misc.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n#include \"pthread_kill.c\"\n#include \"pthread_once.c\"\n#include \"pthread_self.c\"\n#include \"pthread_equal.c\"\n#include \"pthread_setconcurrency.c\"\n#include \"pthread_getconcurrency.c\"\n#include \"ptw32_new.c\"\n#include \"ptw32_calloc.c\"\n#include \"ptw32_reuse.c\"\n#include \"w32_CancelableWait.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/mutex.c",
    "content": "/*\n * mutex.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#ifndef _UWIN\n#   include <process.h>\n#endif\n#ifndef NEED_FTIME\n#include <sys/timeb.h>\n#endif\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n#include \"ptw32_mutex_check_need_init.c\"\n#include \"pthread_mutex_init.c\"\n#include \"pthread_mutex_destroy.c\"\n#include \"pthread_mutexattr_init.c\"\n#include \"pthread_mutexattr_destroy.c\"\n#include \"pthread_mutexattr_getpshared.c\"\n#include \"pthread_mutexattr_setpshared.c\"\n#include \"pthread_mutexattr_settype.c\"\n#include \"pthread_mutexattr_gettype.c\"\n#include \"pthread_mutex_lock.c\"\n#include \"pthread_mutex_timedlock.c\"\n#include \"pthread_mutex_unlock.c\"\n#include \"pthread_mutex_trylock.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/need_errno.h",
    "content": "/***\n* errno.h - system wide error numbers (set by system calls)\n*\n*       Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.\n*\n* Purpose:\n*       This file defines the system-wide error numbers (set by\n*       system calls).  Conforms to the XENIX standard.  Extended\n*       for compatibility with Uniforum standard.\n*       [System V]\n*\n*       [Public]\n*\n****/\n\n#if     _MSC_VER > 1000\n#pragma once\n#endif\n\n#ifndef _INC_ERRNO\n#define _INC_ERRNO\n\n#if     !defined(_WIN32) && !defined(_MAC)\n#error ERROR: Only Mac or Win32 targets supported!\n#endif\n\n#include <winsock.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n\n\n/* Define _CRTIMP */\n\n#ifndef _CRTIMP\n#ifdef  _DLL\n#define _CRTIMP __declspec(dllimport)\n#else   /* ndef _DLL */\n#define _CRTIMP\n#endif  /* _DLL */\n#endif  /* _CRTIMP */\n\n\n/* Define __cdecl for non-Microsoft compilers */\n\n#if     ( !defined(_MSC_VER) && !defined(__cdecl) )\n#define __cdecl\n#endif\n\n/* Define _CRTAPI1 (for compatibility with the NT SDK) */\n\n#ifndef _CRTAPI1\n#if\t_MSC_VER >= 800 && _M_IX86 >= 300\n#define _CRTAPI1 __cdecl\n#else\n#define _CRTAPI1\n#endif\n#endif\n\n\n/* declare reference to errno */\n\n#if     (defined(_MT) || defined(_MD) || defined(_DLL)) && !defined(_MAC)\n_CRTIMP extern int * __cdecl _errno(void);\n#define errno   (*_errno())\n#else   /* ndef _MT && ndef _MD && ndef _DLL */\n_CRTIMP extern int errno;\n#endif  /* _MT || _MD || _DLL */\n\n/* Error Codes */\n\n#define EPERM           1\n#define ENOENT          2\n#define ESRCH           3\n#define EINTR           4\n#define EIO             5\n#define ENXIO           6\n#define E2BIG           7\n#define ENOEXEC         8\n#define EBADF           9\n#define ECHILD          10\n#define EAGAIN          11\n#define ENOMEM          12\n#define EACCES          13\n#define EFAULT          14\n#define EBUSY           16\n#define EEXIST          17\n#define EXDEV           18\n#define ENODEV          19\n#define ENOTDIR         20\n#define EISDIR          21\n#define EINVAL          22\n#define ENFILE          23\n#define EMFILE          24\n#define ENOTTY          25\n#define EFBIG           27\n#define ENOSPC          28\n#define ESPIPE          29\n#define EROFS           30\n#define EMLINK          31\n#define EPIPE           32\n#define EDOM            33\n#define ERANGE          34\n#define EDEADLK         36\n\n/* defined differently in winsock.h on WinCE */\n#ifndef ENAMETOOLONG\n#define ENAMETOOLONG    38\n#endif\n\n#define ENOLCK          39\n#define ENOSYS          40\n\n/* defined differently in winsock.h on WinCE */\n#ifndef ENOTEMPTY\n#define ENOTEMPTY       41\n#endif\n\n#define EILSEQ          42\n\n/*\n * Support EDEADLOCK for compatibiity with older MS-C versions.\n */\n#define EDEADLOCK       EDEADLK\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif  /* _INC_ERRNO */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/nonportable.c",
    "content": "/*\n * nonportable.c\n *\n * Description:\n * This translation unit implements non-portable thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n#include \"pthread_mutexattr_setkind_np.c\"\n#include \"pthread_mutexattr_getkind_np.c\"\n#include \"pthread_getw32threadhandle_np.c\"\n#include \"pthread_delay_np.c\"\n#include \"pthread_num_processors_np.c\"\n#include \"pthread_win32_attach_detach_np.c\"\n#include \"pthread_timechange_handler_np.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/private.c",
    "content": "/*\n * private.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/* Must be first to define HAVE_INLINABLE_INTERLOCKED_CMPXCHG */\n#include \"ptw32_InterlockedCompareExchange.c\"\n\n#include \"ptw32_MCS_lock.c\"\n#include \"ptw32_is_attr.c\"\n#include \"ptw32_processInitialize.c\"\n#include \"ptw32_processTerminate.c\"\n#include \"ptw32_threadStart.c\"\n#include \"ptw32_threadDestroy.c\"\n#include \"ptw32_tkAssocCreate.c\"\n#include \"ptw32_tkAssocDestroy.c\"\n#include \"ptw32_callUserDestroyRoutines.c\"\n#include \"ptw32_semwait.c\"\n#include \"ptw32_timespec.c\"\n#include \"ptw32_relmillisecs.c\"\n#include \"ptw32_throw.c\"\n#include \"ptw32_getprocessors.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread.c",
    "content": "/*\n * pthread.c\n *\n * Description:\n * This translation unit agregates pthreads-win32 translation units.\n * It is used for inline optimisation of the library,\n * maximising for speed at the expense of size.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/* The following are ordered for inlining */\n\n#include \"private.c\"\n#include \"attr.c\"\n#include \"barrier.c\"\n#include \"cancel.c\"\n#include \"cleanup.c\"\n#include \"condvar.c\"\n#include \"create.c\"\n#include \"dll.c\"\n#include \"errno.c\"\n#include \"exit.c\"\n#include \"fork.c\"\n#include \"global.c\"\n#include \"misc.c\"\n#include \"mutex.c\"\n#include \"nonportable.c\"\n#include \"rwlock.c\"\n#include \"sched.c\"\n#include \"semaphore.c\"\n#include \"signal.c\"\n#include \"spin.c\"\n#include \"sync.c\"\n#include \"tsd.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread.dsp",
    "content": "# Microsoft Developer Studio Project File - Name=\"pthread\" - Package Owner=<4>\n# Microsoft Developer Studio Generated Build File, Format Version 6.00\n# ** DO NOT EDIT **\n\n# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102\n\nCFG=pthread - Win32 Debug\n!MESSAGE This is not a valid makefile. To build this project using NMAKE,\n!MESSAGE use the Export Makefile command and run\n!MESSAGE \n!MESSAGE NMAKE /f \"pthread.mak\".\n!MESSAGE \n!MESSAGE You can specify a configuration when running NMAKE\n!MESSAGE by defining the macro CFG on the command line. For example:\n!MESSAGE \n!MESSAGE NMAKE /f \"pthread.mak\" CFG=\"pthread - Win32 Debug\"\n!MESSAGE \n!MESSAGE Possible choices for configuration are:\n!MESSAGE \n!MESSAGE \"pthread - Win32 Release\" (based on \"Win32 (x86) Dynamic-Link Library\")\n!MESSAGE \"pthread - Win32 Debug\" (based on \"Win32 (x86) Dynamic-Link Library\")\n!MESSAGE \n\n# Begin Project\n# PROP AllowPerConfigDependencies 0\n# PROP Scc_ProjName \"\"\n# PROP Scc_LocalPath \"\"\nCPP=cl.exe\nMTL=midl.exe\nRSC=rc.exe\n\n!IF  \"$(CFG)\" == \"pthread - Win32 Release\"\n\n# PROP BASE Use_MFC 0\n# PROP BASE Use_Debug_Libraries 0\n# PROP BASE Output_Dir \"Release\"\n# PROP BASE Intermediate_Dir \"Release\"\n# PROP BASE Target_Dir \"\"\n# PROP Use_MFC 0\n# PROP Use_Debug_Libraries 0\n# PROP Output_Dir \".\"\n# PROP Intermediate_Dir \".\"\n# PROP Ignore_Export_Lib 0\n# PROP Target_Dir \"\"\n# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"_MBCS\" /D \"_USRDLL\" /D \"PTW32_BUILD\" /YX /FD /c\n# ADD CPP /nologo /MD /W3 /GX /O2 /I \".\" /D \"__CLEANUP_C\" /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"_MBCS\" /D \"_USRDLL\" /D \"PTW32_BUILD\" /YX /FD /c\n# SUBTRACT CPP /u\n# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\n# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\n# ADD BASE RSC /l 0x809 /d \"NDEBUG\"\n# ADD RSC /l 0x409 /i \".\" /d \"NDEBUG\" /d \"PTW32_RC_MSC\"\nBSC32=bscmake.exe\n# ADD BASE BSC32 /nologo\n# ADD BSC32 /nologo\nLINK32=link.exe\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386\n# ADD LINK32 kernel32.lib user32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /out:\".\\pthreadVC2.dll\"\n\n!ELSEIF  \"$(CFG)\" == \"pthread - Win32 Debug\"\n\n# PROP BASE Use_MFC 0\n# PROP BASE Use_Debug_Libraries 1\n# PROP BASE Output_Dir \"Debug\"\n# PROP BASE Intermediate_Dir \"Debug\"\n# PROP BASE Target_Dir \"\"\n# PROP Use_MFC 0\n# PROP Use_Debug_Libraries 1\n# PROP Output_Dir \".\"\n# PROP Intermediate_Dir \".\"\n# PROP Ignore_Export_Lib 0\n# PROP Target_Dir \"\"\n# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"_MBCS\" /D \"_USRDLL\" /D \"PTW32_BUILD\" /YX /FD /GZ /c\n# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I \".\" /D \"__CLEANUP_C\" /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"_MBCS\" /D \"_USRDLL\" /D \"PTW32_BUILD\" /YX /FD /GZ /c\n# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n# ADD BASE RSC /l 0x809 /d \"_DEBUG\"\n# ADD RSC /l 0x409 /i \".\" /d \"_DEBUG\" /d \"PTW32_RC_MSC\"\nBSC32=bscmake.exe\n# ADD BASE BSC32 /nologo\n# ADD BSC32 /nologo\nLINK32=link.exe\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept\n# ADD LINK32 kernel32.lib user32.lib ws2_32.lib /nologo /dll /map /debug /machine:I386 /out:\".\\pthreadVC2.dll\" /pdbtype:sept\n# SUBTRACT LINK32 /pdb:none\n\n!ENDIF \n\n# Begin Target\n\n# Name \"pthread - Win32 Release\"\n# Name \"pthread - Win32 Debug\"\n# Begin Group \"Source Files\"\n\n# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\n# Begin Source File\n\nSOURCE=.\\pthread.c\n# End Source File\n# End Group\n# Begin Group \"Header Files\"\n\n# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\n# Begin Source File\n\nSOURCE=.\\implement.h\n# End Source File\n# Begin Source File\n\nSOURCE=.\\pthread.h\n# End Source File\n# Begin Source File\n\nSOURCE=.\\sched.h\n# End Source File\n# Begin Source File\n\nSOURCE=.\\semaphore.h\n# End Source File\n# End Group\n# Begin Group \"Resource Files\"\n\n# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\n# Begin Source File\n\nSOURCE=.\\version.rc\n\n!IF  \"$(CFG)\" == \"pthread - Win32 Release\"\n\n# ADD BASE RSC /l 0xc09\n# ADD RSC /l 0x409 /i \".\" /d \"PTW32_RC_MSC\"\n\n!ELSEIF  \"$(CFG)\" == \"pthread - Win32 Debug\"\n\n# ADD BASE RSC /l 0xc09\n# ADD RSC /l 0x409 /i \".\" /d \"PTW32_RC_MSC\"\n\n!ENDIF \n\n# End Source File\n# End Group\n# End Target\n# End Project\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread.dsw",
    "content": "Microsoft Developer Studio Workspace File, Format Version 6.00\n# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\n\n###############################################################################\n\nProject: \"pthread\"=.\\pthread.dsp - Package Owner=<4>\n\nPackage=<5>\n{{{\n}}}\n\nPackage=<4>\n{{{\n}}}\n\n###############################################################################\n\nGlobal:\n\nPackage=<5>\n{{{\n}}}\n\nPackage=<3>\n{{{\n}}}\n\n###############################################################################\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread.h",
    "content": "/* This is an implementation of the threads API of POSIX 1003.1-2001.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#if !defined( PTHREAD_H )\n#define PTHREAD_H\n\n/*\n * See the README file for an explanation of the pthreads-win32 version\n * numbering scheme and how the DLL is named etc.\n */\n#define PTW32_VERSION 2,8,0,0\n#define PTW32_VERSION_STRING \"2, 8, 0, 0\\0\"\n\n/* There are three implementations of cancel cleanup.\n * Note that pthread.h is included in both application\n * compilation units and also internally for the library.\n * The code here and within the library aims to work\n * for all reasonable combinations of environments.\n *\n * The three implementations are:\n *\n *   WIN32 SEH\n *   C\n *   C++\n *\n * Please note that exiting a push/pop block via\n * \"return\", \"exit\", \"break\", or \"continue\" will\n * lead to different behaviour amongst applications\n * depending upon whether the library was built\n * using SEH, C++, or C. For example, a library built\n * with SEH will call the cleanup routine, while both\n * C++ and C built versions will not.\n */\n\n/*\n * Define defaults for cleanup code.\n * Note: Unless the build explicitly defines one of the following, then\n * we default to standard C style cleanup. This style uses setjmp/longjmp\n * in the cancelation and thread exit implementations and therefore won't\n * do stack unwinding if linked to applications that have it (e.g.\n * C++ apps). This is currently consistent with most/all commercial Unix\n * POSIX threads implementations.\n */\n#if !defined( __CLEANUP_SEH ) && !defined( __CLEANUP_CXX ) && !defined( __CLEANUP_C )\n# define __CLEANUP_C\n#endif\n\n#if defined( __CLEANUP_SEH ) && ( !defined( _MSC_VER ) && !defined(PTW32_RC_MSC))\n#error ERROR [__FILE__, line __LINE__]: SEH is not supported for this compiler.\n#endif\n\n/*\n * Stop here if we are being included by the resource compiler.\n */\n#ifndef RC_INVOKED\n\n#undef PTW32_LEVEL\n\n#if defined(_POSIX_SOURCE)\n#define PTW32_LEVEL 0\n/* Early POSIX */\n#endif\n\n#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309\n#undef PTW32_LEVEL\n#define PTW32_LEVEL 1\n/* Include 1b, 1c and 1d */\n#endif\n\n#if defined(INCLUDE_NP)\n#undef PTW32_LEVEL\n#define PTW32_LEVEL 2\n/* Include Non-Portable extensions */\n#endif\n\n#define PTW32_LEVEL_MAX 3\n\n#if !defined(PTW32_LEVEL)\n#define PTW32_LEVEL PTW32_LEVEL_MAX\n/* Include everything */\n#endif\n\n#ifdef _UWIN\n#   define HAVE_STRUCT_TIMESPEC 1\n#   define HAVE_SIGNAL_H        1\n#   undef HAVE_CONFIG_H\n#   pragma comment(lib, \"pthread\")\n#endif\n\n/*\n * -------------------------------------------------------------\n *\n *\n * Module: pthread.h\n *\n * Purpose:\n *      Provides an implementation of PThreads based upon the\n *      standard:\n *\n *              POSIX 1003.1-2001\n *  and\n *    The Single Unix Specification version 3\n *\n *    (these two are equivalent)\n *\n *      in order to enhance code portability between Windows,\n *  various commercial Unix implementations, and Linux.\n *\n *      See the ANNOUNCE file for a full list of conforming\n *      routines and defined constants, and a list of missing\n *      routines and constants not defined in this implementation.\n *\n * Authors:\n *      There have been many contributors to this library.\n *      The initial implementation was contributed by\n *      John Bossom, and several others have provided major\n *      sections or revisions of parts of the implementation.\n *      Often significant effort has been contributed to\n *      find and fix important bugs and other problems to\n *      improve the reliability of the library, which sometimes\n *      is not reflected in the amount of code which changed as\n *      result.\n *      As much as possible, the contributors are acknowledged\n *      in the ChangeLog file in the source code distribution\n *      where their changes are noted in detail.\n *\n *      Contributors are listed in the CONTRIBUTORS file.\n *\n *      As usual, all bouquets go to the contributors, and all\n *      brickbats go to the project maintainer.\n *\n * Maintainer:\n *      The code base for this project is coordinated and\n *      eventually pre-tested, packaged, and made available by\n *\n *              Ross Johnson <rpj@callisto.canberra.edu.au>\n *\n * QA Testers:\n *      Ultimately, the library is tested in the real world by\n *      a host of competent and demanding scientists and\n *      engineers who report bugs and/or provide solutions\n *      which are then fixed or incorporated into subsequent\n *      versions of the library. Each time a bug is fixed, a\n *      test case is written to prove the fix and ensure\n *      that later changes to the code don't reintroduce the\n *      same error. The number of test cases is slowly growing\n *      and therefore so is the code reliability.\n *\n * Compliance:\n *      See the file ANNOUNCE for the list of implemented\n *      and not-implemented routines and defined options.\n *      Of course, these are all defined is this file as well.\n *\n * Web site:\n *      The source code and other information about this library\n *      are available from\n *\n *              http://sources.redhat.com/pthreads-win32/\n *\n * -------------------------------------------------------------\n */\n\n/* Try to avoid including windows.h */\n#if defined(__MINGW32__) && defined(__cplusplus)\n#define PTW32_INCLUDE_WINDOWS_H\n#endif\n\n#ifdef PTW32_INCLUDE_WINDOWS_H\n#include <windows.h>\n#endif\n\n#if defined(_MSC_VER) && _MSC_VER < 1300 || defined(__DMC__)\n/*\n * VC++6.0 or early compiler's header has no DWORD_PTR type.\n */\ntypedef unsigned long DWORD_PTR;\n#endif\n/*\n * -----------------\n * autoconf switches\n * -----------------\n */\n\n#if HAVE_CONFIG_H\n#include \"config.h\"\n#endif /* HAVE_CONFIG_H */\n\n#ifndef NEED_FTIME\n#include <time.h>\n#else /* NEED_FTIME */\n/* use native WIN32 time API */\n#endif /* NEED_FTIME */\n\n#if HAVE_SIGNAL_H\n#include <signal.h>\n#endif /* HAVE_SIGNAL_H */\n\n#include <setjmp.h>\n#include <limits.h>\n\n/*\n * Boolean values to make us independent of system includes.\n */\nenum {\n  PTW32_FALSE = 0,\n  PTW32_TRUE = (! PTW32_FALSE)\n};\n\n/*\n * This is a duplicate of what is in the autoconf config.h,\n * which is only used when building the pthread-win32 libraries.\n */\n\n#ifndef PTW32_CONFIG_H\n#  if defined(WINCE)\n#    define NEED_ERRNO\n#    define NEED_SEM\n#  endif\n#  if defined(_UWIN) || defined(__MINGW32__)\n#    define HAVE_MODE_T\n#  endif\n#endif\n\n/*\n *\n */\n\n#if PTW32_LEVEL >= PTW32_LEVEL_MAX\n#ifdef NEED_ERRNO\n#include \"need_errno.h\"\n#else\n#include <errno.h>\n#endif\n#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\n\n/*\n * Several systems don't define some error numbers.\n */\n#ifndef ENOTSUP\n#  define ENOTSUP 48   /* This is the value in Solaris. */\n#endif\n\n#ifndef ETIMEDOUT\n#  define ETIMEDOUT 10060     /* This is the value in winsock.h. */\n#endif\n\n#ifndef ENOSYS\n#  define ENOSYS 140     /* Semi-arbitrary value */\n#endif\n\n#ifndef EDEADLK\n#  ifdef EDEADLOCK\n#    define EDEADLK EDEADLOCK\n#  else\n#    define EDEADLK 36     /* This is the value in MSVC. */\n#  endif\n#endif\n\n#include <sched.h>\n\n/*\n * To avoid including windows.h we define only those things that we\n * actually need from it.\n */\n#ifndef PTW32_INCLUDE_WINDOWS_H\n#ifndef HANDLE\n# define PTW32__HANDLE_DEF\n# define HANDLE void *\n#endif\n#ifndef DWORD\n# define PTW32__DWORD_DEF\n# define DWORD unsigned long\n#endif\n#endif\n\n#ifndef HAVE_STRUCT_TIMESPEC\n#define HAVE_STRUCT_TIMESPEC 1\nstruct timespec {\n        long tv_sec;\n        long tv_nsec;\n};\n#endif /* HAVE_STRUCT_TIMESPEC */\n\n#ifndef SIG_BLOCK\n#define SIG_BLOCK 0\n#endif /* SIG_BLOCK */\n\n#ifndef SIG_UNBLOCK \n#define SIG_UNBLOCK 1\n#endif /* SIG_UNBLOCK */\n\n#ifndef SIG_SETMASK\n#define SIG_SETMASK 2\n#endif /* SIG_SETMASK */\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif                          /* __cplusplus */\n\n/*\n * -------------------------------------------------------------\n *\n * POSIX 1003.1-2001 Options\n * =========================\n *\n * Options are normally set in <unistd.h>, which is not provided\n * with pthreads-win32.\n *\n * For conformance with the Single Unix Specification (version 3), all of the\n * options below are defined, and have a value of either -1 (not supported)\n * or 200112L (supported).\n *\n * These options can neither be left undefined nor have a value of 0, because\n * either indicates that sysconf(), which is not implemented, may be used at\n * runtime to check the status of the option.\n *\n * _POSIX_THREADS (== 200112L)\n *                      If == 200112L, you can use threads\n *\n * _POSIX_THREAD_ATTR_STACKSIZE (== 200112L)\n *                      If == 200112L, you can control the size of a thread's\n *                      stack\n *                              pthread_attr_getstacksize\n *                              pthread_attr_setstacksize\n *\n * _POSIX_THREAD_ATTR_STACKADDR (== -1)\n *                      If == 200112L, you can allocate and control a thread's\n *                      stack. If not supported, the following functions\n *                      will return ENOSYS, indicating they are not\n *                      supported:\n *                              pthread_attr_getstackaddr\n *                              pthread_attr_setstackaddr\n *\n * _POSIX_THREAD_PRIORITY_SCHEDULING (== -1)\n *                      If == 200112L, you can use realtime scheduling.\n *                      This option indicates that the behaviour of some\n *                      implemented functions conforms to the additional TPS\n *                      requirements in the standard. E.g. rwlocks favour\n *                      writers over readers when threads have equal priority.\n *\n * _POSIX_THREAD_PRIO_INHERIT (== -1)\n *                      If == 200112L, you can create priority inheritance\n *                      mutexes.\n *                              pthread_mutexattr_getprotocol +\n *                              pthread_mutexattr_setprotocol +\n *\n * _POSIX_THREAD_PRIO_PROTECT (== -1)\n *                      If == 200112L, you can create priority ceiling mutexes\n *                      Indicates the availability of:\n *                              pthread_mutex_getprioceiling\n *                              pthread_mutex_setprioceiling\n *                              pthread_mutexattr_getprioceiling\n *                              pthread_mutexattr_getprotocol     +\n *                              pthread_mutexattr_setprioceiling\n *                              pthread_mutexattr_setprotocol     +\n *\n * _POSIX_THREAD_PROCESS_SHARED (== -1)\n *                      If set, you can create mutexes and condition\n *                      variables that can be shared with another\n *                      process.If set, indicates the availability\n *                      of:\n *                              pthread_mutexattr_getpshared\n *                              pthread_mutexattr_setpshared\n *                              pthread_condattr_getpshared\n *                              pthread_condattr_setpshared\n *\n * _POSIX_THREAD_SAFE_FUNCTIONS (== 200112L)\n *                      If == 200112L you can use the special *_r library\n *                      functions that provide thread-safe behaviour\n *\n * _POSIX_READER_WRITER_LOCKS (== 200112L)\n *                      If == 200112L, you can use read/write locks\n *\n * _POSIX_SPIN_LOCKS (== 200112L)\n *                      If == 200112L, you can use spin locks\n *\n * _POSIX_BARRIERS (== 200112L)\n *                      If == 200112L, you can use barriers\n *\n *      + These functions provide both 'inherit' and/or\n *        'protect' protocol, based upon these macro\n *        settings.\n *\n * -------------------------------------------------------------\n */\n\n/*\n * POSIX Options\n */\n#undef _POSIX_THREADS\n#define _POSIX_THREADS 200112L\n\n#undef _POSIX_READER_WRITER_LOCKS\n#define _POSIX_READER_WRITER_LOCKS 200112L\n\n#undef _POSIX_SPIN_LOCKS\n#define _POSIX_SPIN_LOCKS 200112L\n\n#undef _POSIX_BARRIERS\n#define _POSIX_BARRIERS 200112L\n\n#undef _POSIX_THREAD_SAFE_FUNCTIONS\n#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L\n\n#undef _POSIX_THREAD_ATTR_STACKSIZE\n#define _POSIX_THREAD_ATTR_STACKSIZE 200112L\n\n/*\n * The following options are not supported\n */\n#undef _POSIX_THREAD_ATTR_STACKADDR\n#define _POSIX_THREAD_ATTR_STACKADDR -1\n\n#undef _POSIX_THREAD_PRIO_INHERIT\n#define _POSIX_THREAD_PRIO_INHERIT -1\n\n#undef _POSIX_THREAD_PRIO_PROTECT\n#define _POSIX_THREAD_PRIO_PROTECT -1\n\n/* TPS is not fully supported.  */\n#undef _POSIX_THREAD_PRIORITY_SCHEDULING\n#define _POSIX_THREAD_PRIORITY_SCHEDULING -1\n\n#undef _POSIX_THREAD_PROCESS_SHARED\n#define _POSIX_THREAD_PROCESS_SHARED -1\n\n\n/*\n * POSIX 1003.1-2001 Limits\n * ===========================\n *\n * These limits are normally set in <limits.h>, which is not provided with\n * pthreads-win32.\n *\n * PTHREAD_DESTRUCTOR_ITERATIONS\n *                      Maximum number of attempts to destroy\n *                      a thread's thread-specific data on\n *                      termination (must be at least 4)\n *\n * PTHREAD_KEYS_MAX\n *                      Maximum number of thread-specific data keys\n *                      available per process (must be at least 128)\n *\n * PTHREAD_STACK_MIN\n *                      Minimum supported stack size for a thread\n *\n * PTHREAD_THREADS_MAX\n *                      Maximum number of threads supported per\n *                      process (must be at least 64).\n *\n * SEM_NSEMS_MAX\n *                      The maximum number of semaphores a process can have.\n *                      (must be at least 256)\n *\n * SEM_VALUE_MAX\n *                      The maximum value a semaphore can have.\n *                      (must be at least 32767)\n *\n */\n#undef _POSIX_THREAD_DESTRUCTOR_ITERATIONS\n#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS     4\n\n#undef PTHREAD_DESTRUCTOR_ITERATIONS\n#define PTHREAD_DESTRUCTOR_ITERATIONS           _POSIX_THREAD_DESTRUCTOR_ITERATIONS\n\n#undef _POSIX_THREAD_KEYS_MAX\n#define _POSIX_THREAD_KEYS_MAX                  128\n\n#undef PTHREAD_KEYS_MAX\n#define PTHREAD_KEYS_MAX                        _POSIX_THREAD_KEYS_MAX\n\n#undef PTHREAD_STACK_MIN\n#define PTHREAD_STACK_MIN                       0\n\n#undef _POSIX_THREAD_THREADS_MAX\n#define _POSIX_THREAD_THREADS_MAX               64\n\n  /* Arbitrary value */\n#undef PTHREAD_THREADS_MAX\n#define PTHREAD_THREADS_MAX                     2019\n\n#undef _POSIX_SEM_NSEMS_MAX\n#define _POSIX_SEM_NSEMS_MAX                    256\n\n  /* Arbitrary value */\n#undef SEM_NSEMS_MAX\n#define SEM_NSEMS_MAX                           1024\n\n#undef _POSIX_SEM_VALUE_MAX\n#define _POSIX_SEM_VALUE_MAX                    32767\n\n#undef SEM_VALUE_MAX\n#define SEM_VALUE_MAX                           INT_MAX\n\n\n#if __GNUC__ && ! defined (__declspec)\n# error Please upgrade your GNU compiler to one that supports __declspec.\n#endif\n\n/*\n * When building the DLL code, you should define PTW32_BUILD so that\n * the variables/functions are exported correctly. When using the DLL,\n * do NOT define PTW32_BUILD, and then the variables/functions will\n * be imported correctly.\n */\n\n#ifndef PTW32_STATIC_LIB\n#  ifdef PTW32_BUILD\n#    define PTW32_DLLPORT __declspec (dllexport)\n#  else\n#    define PTW32_DLLPORT __declspec (dllimport)\n#  endif\n#else\n#  define PTW32_DLLPORT\n#endif\n\n/*\n * The Open Watcom C/C++ compiler uses a non-standard calling convention\n * that passes function args in registers unless __cdecl is explicitly specified\n * in exposed function prototypes.\n *\n * We force all calls to cdecl even though this could slow Watcom code down\n * slightly. If you know that the Watcom compiler will be used to build both\n * the DLL and application, then you can probably define this as a null string.\n * Remember that pthread.h (this file) is used for both the DLL and application builds.\n */\n#define PTW32_CDECL __cdecl\n\n#if defined(_UWIN) && PTW32_LEVEL >= PTW32_LEVEL_MAX\n#   include     <sys/types.h>\n#else\n/*\n * Generic handle type - intended to extend uniqueness beyond\n * that available with a simple pointer. It should scale for either\n * IA-32 or IA-64.\n */\ntypedef struct {\n    void * p;                   /* Pointer to actual object */\n    unsigned int x;             /* Extra information - reuse count etc */\n} ptw32_handle_t;\n\ntypedef ptw32_handle_t pthread_t;\ntypedef struct pthread_attr_t_ * pthread_attr_t;\ntypedef struct pthread_once_t_ pthread_once_t;\ntypedef struct pthread_key_t_ * pthread_key_t;\ntypedef struct pthread_mutex_t_ * pthread_mutex_t;\ntypedef struct pthread_mutexattr_t_ * pthread_mutexattr_t;\ntypedef struct pthread_cond_t_ * pthread_cond_t;\ntypedef struct pthread_condattr_t_ * pthread_condattr_t;\n#endif\ntypedef struct pthread_rwlock_t_ * pthread_rwlock_t;\ntypedef struct pthread_rwlockattr_t_ * pthread_rwlockattr_t;\ntypedef struct pthread_spinlock_t_ * pthread_spinlock_t;\ntypedef struct pthread_barrier_t_ * pthread_barrier_t;\ntypedef struct pthread_barrierattr_t_ * pthread_barrierattr_t;\n\n/*\n * ====================\n * ====================\n * POSIX Threads\n * ====================\n * ====================\n */\n\nenum {\n/*\n * pthread_attr_{get,set}detachstate\n */\n  PTHREAD_CREATE_JOINABLE       = 0,  /* Default */\n  PTHREAD_CREATE_DETACHED       = 1,\n\n/*\n * pthread_attr_{get,set}inheritsched\n */\n  PTHREAD_INHERIT_SCHED         = 0,\n  PTHREAD_EXPLICIT_SCHED        = 1,  /* Default */\n\n/*\n * pthread_{get,set}scope\n */\n  PTHREAD_SCOPE_PROCESS         = 0,\n  PTHREAD_SCOPE_SYSTEM          = 1,  /* Default */\n\n/*\n * pthread_setcancelstate paramters\n */\n  PTHREAD_CANCEL_ENABLE         = 0,  /* Default */\n  PTHREAD_CANCEL_DISABLE        = 1,\n\n/*\n * pthread_setcanceltype parameters\n */\n  PTHREAD_CANCEL_ASYNCHRONOUS   = 0,\n  PTHREAD_CANCEL_DEFERRED       = 1,  /* Default */\n\n/*\n * pthread_mutexattr_{get,set}pshared\n * pthread_condattr_{get,set}pshared\n */\n  PTHREAD_PROCESS_PRIVATE       = 0,\n  PTHREAD_PROCESS_SHARED        = 1,\n\n/*\n * pthread_barrier_wait\n */\n  PTHREAD_BARRIER_SERIAL_THREAD = -1\n};\n\n/*\n * ====================\n * ====================\n * Cancelation\n * ====================\n * ====================\n */\n#define PTHREAD_CANCELED       ((void *) -1)\n\n\n/*\n * ====================\n * ====================\n * Once Key\n * ====================\n * ====================\n */\n#define PTHREAD_ONCE_INIT       { PTW32_FALSE, 0, 0, 0}\n\nstruct pthread_once_t_\n{\n  int          done;        /* indicates if user function has been executed */\n  void *       lock;\n  int          reserved1;\n  int          reserved2;\n};\n\n\n/*\n * ====================\n * ====================\n * Object initialisers\n * ====================\n * ====================\n */\n#define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t) -1)\n#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER ((pthread_mutex_t) -2)\n#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER ((pthread_mutex_t) -3)\n\n/*\n * Compatibility with LinuxThreads\n */\n#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP PTHREAD_RECURSIVE_MUTEX_INITIALIZER\n#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP PTHREAD_ERRORCHECK_MUTEX_INITIALIZER\n\n#define PTHREAD_COND_INITIALIZER ((pthread_cond_t) -1)\n\n#define PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t) -1)\n\n#define PTHREAD_SPINLOCK_INITIALIZER ((pthread_spinlock_t) -1)\n\n\n/*\n * Mutex types.\n */\nenum\n{\n  /* Compatibility with LinuxThreads */\n  PTHREAD_MUTEX_FAST_NP,\n  PTHREAD_MUTEX_RECURSIVE_NP,\n  PTHREAD_MUTEX_ERRORCHECK_NP,\n  PTHREAD_MUTEX_TIMED_NP = PTHREAD_MUTEX_FAST_NP,\n  PTHREAD_MUTEX_ADAPTIVE_NP = PTHREAD_MUTEX_FAST_NP,\n  /* For compatibility with POSIX */\n  PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_FAST_NP,\n  PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,\n  PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,\n  PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL\n};\n\n\ntypedef struct ptw32_cleanup_t ptw32_cleanup_t;\n\n#if defined(_MSC_VER)\n/* Disable MSVC 'anachronism used' warning */\n#pragma warning( disable : 4229 )\n#endif\n\ntypedef void (* PTW32_CDECL ptw32_cleanup_callback_t)(void *);\n\n#if defined(_MSC_VER)\n#pragma warning( default : 4229 )\n#endif\n\nstruct ptw32_cleanup_t\n{\n  ptw32_cleanup_callback_t routine;\n  void *arg;\n  struct ptw32_cleanup_t *prev;\n};\n\n#ifdef __CLEANUP_SEH\n        /*\n         * WIN32 SEH version of cancel cleanup.\n         */\n\n#define pthread_cleanup_push( _rout, _arg ) \\\n        { \\\n            ptw32_cleanup_t     _cleanup; \\\n            \\\n        _cleanup.routine        = (ptw32_cleanup_callback_t)(_rout); \\\n            _cleanup.arg        = (_arg); \\\n            __try \\\n              { \\\n\n#define pthread_cleanup_pop( _execute ) \\\n              } \\\n            __finally \\\n                { \\\n                    if( _execute || AbnormalTermination()) \\\n                      { \\\n                          (*(_cleanup.routine))( _cleanup.arg ); \\\n                      } \\\n                } \\\n        }\n\n#else /* __CLEANUP_SEH */\n\n#ifdef __CLEANUP_C\n\n        /*\n         * C implementation of PThreads cancel cleanup\n         */\n\n#define pthread_cleanup_push( _rout, _arg ) \\\n        { \\\n            ptw32_cleanup_t     _cleanup; \\\n            \\\n            ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) (_rout), (_arg) ); \\\n\n#define pthread_cleanup_pop( _execute ) \\\n            (void) ptw32_pop_cleanup( _execute ); \\\n        }\n\n#else /* __CLEANUP_C */\n\n#ifdef __CLEANUP_CXX\n\n        /*\n         * C++ version of cancel cleanup.\n         * - John E. Bossom.\n         */\n\n        class PThreadCleanup {\n          /*\n           * PThreadCleanup\n           *\n           * Purpose\n           *      This class is a C++ helper class that is\n           *      used to implement pthread_cleanup_push/\n           *      pthread_cleanup_pop.\n           *      The destructor of this class automatically\n           *      pops the pushed cleanup routine regardless\n           *      of how the code exits the scope\n           *      (i.e. such as by an exception)\n           */\n      ptw32_cleanup_callback_t cleanUpRout;\n          void    *       obj;\n          int             executeIt;\n\n        public:\n          PThreadCleanup() :\n            cleanUpRout( 0 ),\n            obj( 0 ),\n            executeIt( 0 )\n            /*\n             * No cleanup performed\n             */\n            {\n            }\n\n          PThreadCleanup(\n             ptw32_cleanup_callback_t routine,\n                         void    *       arg ) :\n            cleanUpRout( routine ),\n            obj( arg ),\n            executeIt( 1 )\n            /*\n             * Registers a cleanup routine for 'arg'\n             */\n            {\n            }\n\n          ~PThreadCleanup()\n            {\n              if ( executeIt && ((void *) cleanUpRout != (void *) 0) )\n                {\n                  (void) (*cleanUpRout)( obj );\n                }\n            }\n\n          void execute( int exec )\n            {\n              executeIt = exec;\n            }\n        };\n\n        /*\n         * C++ implementation of PThreads cancel cleanup;\n         * This implementation takes advantage of a helper\n         * class who's destructor automatically calls the\n         * cleanup routine if we exit our scope weirdly\n         */\n#define pthread_cleanup_push( _rout, _arg ) \\\n        { \\\n            PThreadCleanup  cleanup((ptw32_cleanup_callback_t)(_rout), \\\n                                    (void *) (_arg) );\n\n#define pthread_cleanup_pop( _execute ) \\\n            cleanup.execute( _execute ); \\\n        }\n\n#else\n\n#error ERROR [__FILE__, line __LINE__]: Cleanup type undefined.\n\n#endif /* __CLEANUP_CXX */\n\n#endif /* __CLEANUP_C */\n\n#endif /* __CLEANUP_SEH */\n\n/*\n * ===============\n * ===============\n * Methods\n * ===============\n * ===============\n */\n\n/*\n * PThread Attribute Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_init (pthread_attr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_destroy (pthread_attr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_getdetachstate (const pthread_attr_t * attr,\n                                         int *detachstate);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_getstackaddr (const pthread_attr_t * attr,\n                                       void **stackaddr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_getstacksize (const pthread_attr_t * attr,\n                                       size_t * stacksize);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_setdetachstate (pthread_attr_t * attr,\n                                         int detachstate);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_setstackaddr (pthread_attr_t * attr,\n                                       void *stackaddr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_setstacksize (pthread_attr_t * attr,\n                                       size_t stacksize);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedparam (const pthread_attr_t *attr,\n                                        struct sched_param *param);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedparam (pthread_attr_t *attr,\n                                        const struct sched_param *param);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedpolicy (pthread_attr_t *,\n                                         int);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedpolicy (pthread_attr_t *,\n                                         int *);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_setinheritsched(pthread_attr_t * attr,\n                                         int inheritsched);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_getinheritsched(pthread_attr_t * attr,\n                                         int * inheritsched);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_setscope (pthread_attr_t *,\n                                   int);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_attr_getscope (const pthread_attr_t *,\n                                   int *);\n\n/*\n * PThread Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_create (pthread_t * tid,\n                            const pthread_attr_t * attr,\n                            void *(*start) (void *),\n                            void *arg);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_detach (pthread_t tid);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_equal (pthread_t t1,\n                           pthread_t t2);\n\nPTW32_DLLPORT void PTW32_CDECL pthread_exit (void *value_ptr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_join (pthread_t thread,\n                          void **value_ptr);\n\nPTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_cancel (pthread_t thread);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_setcancelstate (int state,\n                                    int *oldstate);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_setcanceltype (int type,\n                                   int *oldtype);\n\nPTW32_DLLPORT void PTW32_CDECL pthread_testcancel (void);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_once (pthread_once_t * once_control,\n                          void (*init_routine) (void));\n\n#if PTW32_LEVEL >= PTW32_LEVEL_MAX\nPTW32_DLLPORT ptw32_cleanup_t * PTW32_CDECL ptw32_pop_cleanup (int execute);\n\nPTW32_DLLPORT void PTW32_CDECL ptw32_push_cleanup (ptw32_cleanup_t * cleanup,\n                                 void (*routine) (void *),\n                                 void *arg);\n#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\n\n/*\n * Thread Specific Data Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_key_create (pthread_key_t * key,\n                                void (*destructor) (void *));\n\nPTW32_DLLPORT int PTW32_CDECL pthread_key_delete (pthread_key_t key);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_setspecific (pthread_key_t key,\n                                 const void *value);\n\nPTW32_DLLPORT void * PTW32_CDECL pthread_getspecific (pthread_key_t key);\n\n\n/*\n * Mutex Attribute Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_init (pthread_mutexattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_destroy (pthread_mutexattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getpshared (const pthread_mutexattr_t\n                                          * attr,\n                                          int *pshared);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setpshared (pthread_mutexattr_t * attr,\n                                          int pshared);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_settype (pthread_mutexattr_t * attr, int kind);\nPTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_gettype (pthread_mutexattr_t * attr, int *kind);\n\n/*\n * Barrier Attribute Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_init (pthread_barrierattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_destroy (pthread_barrierattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_getpshared (const pthread_barrierattr_t\n                                            * attr,\n                                            int *pshared);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_setpshared (pthread_barrierattr_t * attr,\n                                            int pshared);\n\n/*\n * Mutex Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_mutex_init (pthread_mutex_t * mutex,\n                                const pthread_mutexattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_mutex_destroy (pthread_mutex_t * mutex);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_mutex_lock (pthread_mutex_t * mutex);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_mutex_timedlock(pthread_mutex_t *mutex,\n                                    const struct timespec *abstime);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_mutex_trylock (pthread_mutex_t * mutex);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_mutex_unlock (pthread_mutex_t * mutex);\n\n/*\n * Spinlock Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_spin_init (pthread_spinlock_t * lock, int pshared);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_spin_destroy (pthread_spinlock_t * lock);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_spin_lock (pthread_spinlock_t * lock);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_spin_trylock (pthread_spinlock_t * lock);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_spin_unlock (pthread_spinlock_t * lock);\n\n/*\n * Barrier Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_barrier_init (pthread_barrier_t * barrier,\n                                  const pthread_barrierattr_t * attr,\n                                  unsigned int count);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_barrier_destroy (pthread_barrier_t * barrier);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_barrier_wait (pthread_barrier_t * barrier);\n\n/*\n * Condition Variable Attribute Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_condattr_init (pthread_condattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_condattr_destroy (pthread_condattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_condattr_getpshared (const pthread_condattr_t * attr,\n                                         int *pshared);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_condattr_setpshared (pthread_condattr_t * attr,\n                                         int pshared);\n\n/*\n * Condition Variable Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_cond_init (pthread_cond_t * cond,\n                               const pthread_condattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_cond_destroy (pthread_cond_t * cond);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_cond_wait (pthread_cond_t * cond,\n                               pthread_mutex_t * mutex);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_cond_timedwait (pthread_cond_t * cond,\n                                    pthread_mutex_t * mutex,\n                                    const struct timespec *abstime);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_cond_signal (pthread_cond_t * cond);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_cond_broadcast (pthread_cond_t * cond);\n\n/*\n * Scheduling\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_setschedparam (pthread_t thread,\n                                   int policy,\n                                   const struct sched_param *param);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_getschedparam (pthread_t thread,\n                                   int *policy,\n                                   struct sched_param *param);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_setconcurrency (int);\n \nPTW32_DLLPORT int PTW32_CDECL pthread_getconcurrency (void);\n\n/*\n * Read-Write Lock Functions\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlock_init(pthread_rwlock_t *lock,\n                                const pthread_rwlockattr_t *attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlock_destroy(pthread_rwlock_t *lock);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlock_tryrdlock(pthread_rwlock_t *);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlock_trywrlock(pthread_rwlock_t *);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlock_rdlock(pthread_rwlock_t *lock);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedrdlock(pthread_rwlock_t *lock,\n                                       const struct timespec *abstime);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlock_wrlock(pthread_rwlock_t *lock);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedwrlock(pthread_rwlock_t *lock,\n                                       const struct timespec *abstime);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlock_unlock(pthread_rwlock_t *lock);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_init (pthread_rwlockattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_destroy (pthread_rwlockattr_t * attr);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * attr,\n                                           int *pshared);\n\nPTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_setpshared (pthread_rwlockattr_t * attr,\n                                           int pshared);\n\n#if PTW32_LEVEL >= PTW32_LEVEL_MAX - 1\n\n/*\n * Signal Functions. Should be defined in <signal.h> but MSVC and MinGW32\n * already have signal.h that don't define these.\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_kill(pthread_t thread, int sig);\n\n/*\n * Non-portable functions\n */\n\n/*\n * Compatibility with Linux.\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr,\n                                         int kind);\nPTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr,\n                                         int *kind);\n\n/*\n * Possibly supported by other POSIX threads implementations\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_delay_np (struct timespec * interval);\nPTW32_DLLPORT int PTW32_CDECL pthread_num_processors_np(void);\n\n/*\n * Useful if an application wants to statically link\n * the lib rather than load the DLL at run-time.\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_win32_process_attach_np(void);\nPTW32_DLLPORT int PTW32_CDECL pthread_win32_process_detach_np(void);\nPTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_attach_np(void);\nPTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_detach_np(void);\n\n/*\n * Features that are auto-detected at load/run time.\n */\nPTW32_DLLPORT int PTW32_CDECL pthread_win32_test_features_np(int);\nenum ptw32_features {\n  PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */\n  PTW32_ALERTABLE_ASYNC_CANCEL              = 0x0002  /* Can cancel blocked threads. */\n};\n\n/*\n * Register a system time change with the library.\n * Causes the library to perform various functions\n * in response to the change. Should be called whenever\n * the application's top level window receives a\n * WM_TIMECHANGE message. It can be passed directly to\n * pthread_create() as a new thread if desired.\n */\nPTW32_DLLPORT void * PTW32_CDECL pthread_timechange_handler_np(void *);\n\n#endif /*PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 */\n\n#if PTW32_LEVEL >= PTW32_LEVEL_MAX\n\n/*\n * Returns the Win32 HANDLE for the POSIX thread.\n */\nPTW32_DLLPORT HANDLE PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread);\n\n\n/*\n * Protected Methods\n *\n * This function blocks until the given WIN32 handle\n * is signaled or pthread_cancel had been called.\n * This function allows the caller to hook into the\n * PThreads cancel mechanism. It is implemented using\n *\n *              WaitForMultipleObjects\n *\n * on 'waitHandle' and a manually reset WIN32 Event\n * used to implement pthread_cancel. The 'timeout'\n * argument to TimedWait is simply passed to\n * WaitForMultipleObjects.\n */\nPTW32_DLLPORT int PTW32_CDECL pthreadCancelableWait (HANDLE waitHandle);\nPTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (HANDLE waitHandle,\n                                        DWORD timeout);\n\n#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\n\n/*\n * Thread-Safe C Runtime Library Mappings.\n */\n#ifndef _UWIN\n#  if defined(NEED_ERRNO)\n     PTW32_DLLPORT int * PTW32_CDECL _errno( void );\n#  else\n#    ifndef errno\n#      if (defined(_MT) || defined(_DLL))\n         __declspec(dllimport) extern int * __cdecl _errno(void);\n#        define errno   (*_errno())\n#      endif\n#    endif\n#  endif\n#endif\n\n/*\n * WIN32 C runtime library had been made thread-safe\n * without affecting the user interface. Provide\n * mappings from the UNIX thread-safe versions to\n * the standard C runtime library calls.\n * Only provide function mappings for functions that\n * actually exist on WIN32.\n */\n\n#if !defined(__MINGW32__)\n#define strtok_r( _s, _sep, _lasts ) \\\n        ( *(_lasts) = strtok( (_s), (_sep) ) )\n#endif /* !__MINGW32__ */\n\n#define asctime_r( _tm, _buf ) \\\n        ( strcpy( (_buf), asctime( (_tm) ) ), \\\n          (_buf) )\n\n#define ctime_r( _clock, _buf ) \\\n        ( strcpy( (_buf), ctime( (_clock) ) ),  \\\n          (_buf) )\n\n#define gmtime_r( _clock, _result ) \\\n        ( *(_result) = *gmtime( (_clock) ), \\\n          (_result) )\n\n#define localtime_r( _clock, _result ) \\\n        ( *(_result) = *localtime( (_clock) ), \\\n          (_result) )\n\n#define rand_r( _seed ) \\\n        ( _seed == _seed? rand() : rand() )\n\n\n/*\n * Some compiler environments don't define some things.\n */\n#if defined(__BORLANDC__)\n#  define _ftime ftime\n#  define _timeb timeb\n#endif\n\n#ifdef __cplusplus\n\n/*\n * Internal exceptions\n */\nclass ptw32_exception {};\nclass ptw32_exception_cancel : public ptw32_exception {};\nclass ptw32_exception_exit   : public ptw32_exception {};\n\n#endif\n\n#if PTW32_LEVEL >= PTW32_LEVEL_MAX\n\n/* FIXME: This is only required if the library was built using SEH */\n/*\n * Get internal SEH tag\n */\nPTW32_DLLPORT DWORD PTW32_CDECL ptw32_get_exception_services_code(void);\n\n#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\n\n#ifndef PTW32_BUILD\n\n#ifdef __CLEANUP_SEH\n\n/*\n * Redefine the SEH __except keyword to ensure that applications\n * propagate our internal exceptions up to the library's internal handlers.\n */\n#define __except( E ) \\\n        __except( ( GetExceptionCode() == ptw32_get_exception_services_code() ) \\\n                 ? EXCEPTION_CONTINUE_SEARCH : ( E ) )\n\n#endif /* __CLEANUP_SEH */\n\n#ifdef __CLEANUP_CXX\n\n/*\n * Redefine the C++ catch keyword to ensure that applications\n * propagate our internal exceptions up to the library's internal handlers.\n */\n#ifdef _MSC_VER\n        /*\n         * WARNING: Replace any 'catch( ... )' with 'PtW32CatchAll'\n         * if you want Pthread-Win32 cancelation and pthread_exit to work.\n         */\n\n#ifndef PtW32NoCatchWarn\n\n#pragma message(\"Specify \\\"/DPtW32NoCatchWarn\\\" compiler flag to skip this message.\")\n#pragma message(\"------------------------------------------------------------------\")\n#pragma message(\"When compiling applications with MSVC++ and C++ exception handling:\")\n#pragma message(\"  Replace any 'catch( ... )' in routines called from POSIX threads\")\n#pragma message(\"  with 'PtW32CatchAll' or 'CATCHALL' if you want POSIX thread\")\n#pragma message(\"  cancelation and pthread_exit to work. For example:\")\n#pragma message(\"\")\n#pragma message(\"    #ifdef PtW32CatchAll\")\n#pragma message(\"      PtW32CatchAll\")\n#pragma message(\"    #else\")\n#pragma message(\"      catch(...)\")\n#pragma message(\"    #endif\")\n#pragma message(\"        {\")\n#pragma message(\"          /* Catchall block processing */\")\n#pragma message(\"        }\")\n#pragma message(\"------------------------------------------------------------------\")\n\n#endif\n\n#define PtW32CatchAll \\\n        catch( ptw32_exception & ) { throw; } \\\n        catch( ... )\n\n#else /* _MSC_VER */\n\n#define catch( E ) \\\n        catch( ptw32_exception & ) { throw; } \\\n        catch( E )\n\n#endif /* _MSC_VER */\n\n#endif /* __CLEANUP_CXX */\n\n#endif /* ! PTW32_BUILD */\n\n#ifdef __cplusplus\n}                               /* End of extern \"C\" */\n#endif                          /* __cplusplus */\n\n#ifdef PTW32__HANDLE_DEF\n# undef HANDLE\n#endif\n#ifdef PTW32__DWORD_DEF\n# undef DWORD\n#endif\n\n#undef PTW32_LEVEL\n#undef PTW32_LEVEL_MAX\n\n#endif /* ! RC_INVOKED */\n\n#endif /* PTHREAD_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 11.00\n# Visual Studio 2010\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"pthread\", \"pthread.vcxproj\", \"{54BE23B5-DCA1-9E20-5C86-650DBB82A42F}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tRelease|Win32 = Release|Win32\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{54BE23B5-DCA1-9E20-5C86-650DBB82A42F}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{54BE23B5-DCA1-9E20-5C86-650DBB82A42F}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{54BE23B5-DCA1-9E20-5C86-650DBB82A42F}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{54BE23B5-DCA1-9E20-5C86-650DBB82A42F}.Release|Win32.Build.0 = Release|Win32\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <SccProjectName />\n    <SccLocalPath />\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseOfMfc>false</UseOfMfc>\n    <CharacterSet>MultiByte</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseOfMfc>false</UseOfMfc>\n    <CharacterSet>MultiByte</CharacterSet>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>.\\.\\</OutDir>\n    <IntDir>.\\.\\</IntDir>\n    <LinkIncremental>false</LinkIncremental>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>.\\.\\</OutDir>\n    <IntDir>.\\.\\</IntDir>\n    <LinkIncremental>true</LinkIncremental>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\n      <StringPooling>true</StringPooling>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <Optimization>MaxSpeed</Optimization>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions>\n      <PreprocessorDefinitions>__CLEANUP_C;WIN32;NDEBUG;_WINDOWS;_USRDLL;PTW32_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <AssemblerListingLocation>.\\.\\</AssemblerListingLocation>\n      <PrecompiledHeaderOutputFile>.\\.\\pthread.pch</PrecompiledHeaderOutputFile>\n      <ObjectFileName>.\\.\\</ObjectFileName>\n      <ProgramDataBaseFileName>.\\.\\</ProgramDataBaseFileName>\n    </ClCompile>\n    <Midl>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <TypeLibraryName>.\\.\\pthread.tlb</TypeLibraryName>\n      <MkTypLibCompatible>true</MkTypLibCompatible>\n      <TargetEnvironment>Win32</TargetEnvironment>\n    </Midl>\n    <ResourceCompile>\n      <Culture>0x0409</Culture>\n      <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>NDEBUG;PTW32_RC_MSC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ResourceCompile>\n    <Bscmake>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <OutputFile>.\\.\\pthread.bsc</OutputFile>\n    </Bscmake>\n    <Link>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <LinkDLL>true</LinkDLL>\n      <SubSystem>Console</SubSystem>\n      <OutputFile>.\\pthreadVC2.dll</OutputFile>\n      <ImportLibrary>.\\.\\pthreadVC2.lib</ImportLibrary>\n      <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <InlineFunctionExpansion>Default</InlineFunctionExpansion>\n      <FunctionLevelLinking>false</FunctionLevelLinking>\n      <Optimization>Disabled</Optimization>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <WarningLevel>Level3</WarningLevel>\n      <MinimalRebuild>true</MinimalRebuild>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>__CLEANUP_C;WIN32;_DEBUG;_WINDOWS;_USRDLL;PTW32_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <AssemblerListingLocation>.\\.\\</AssemblerListingLocation>\n      <PrecompiledHeaderOutputFile>.\\.\\pthread.pch</PrecompiledHeaderOutputFile>\n      <ObjectFileName>.\\.\\</ObjectFileName>\n      <ProgramDataBaseFileName>.\\.\\</ProgramDataBaseFileName>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Midl>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <TypeLibraryName>.\\.\\pthread.tlb</TypeLibraryName>\n      <MkTypLibCompatible>true</MkTypLibCompatible>\n      <TargetEnvironment>Win32</TargetEnvironment>\n    </Midl>\n    <ResourceCompile>\n      <Culture>0x0409</Culture>\n      <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_DEBUG;PTW32_RC_MSC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ResourceCompile>\n    <Bscmake>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <OutputFile>.\\.\\pthread.bsc</OutputFile>\n    </Bscmake>\n    <Link>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <LinkDLL>true</LinkDLL>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OutputFile>.\\pthreadVC2.dll</OutputFile>\n      <ImportLibrary>.\\.\\pthreadVC2.lib</ImportLibrary>\n      <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"pthread.c\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"implement.h\" />\n    <ClInclude Include=\"pthread.h\" />\n    <ClInclude Include=\"sched.h\" />\n    <ClInclude Include=\"semaphore.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"version.rc\">\n      <Culture Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">0x0409</Culture>\n      <Culture Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">0x0409</Culture>\n    </ResourceCompile>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Source Files\">\n      <UniqueIdentifier>{4f4d115b-dace-4c71-a2f9-370b6a75b6f1}</UniqueIdentifier>\n      <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>\n    </Filter>\n    <Filter Include=\"Header Files\">\n      <UniqueIdentifier>{4d3c5df3-f705-44ce-9d6c-70129bfc32f8}</UniqueIdentifier>\n      <Extensions>h;hpp;hxx;hm;inl</Extensions>\n    </Filter>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{3dcb75b1-45a9-46ae-858a-6366a9bb7458}</UniqueIdentifier>\n      <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"pthread.c\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"implement.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"pthread.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"sched.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"semaphore.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"version.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_destroy.c",
    "content": "/*\n * pthread_attr_destroy.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_attr_destroy (pthread_attr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Destroys a thread attributes object.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_attr_t\n      *\n      *\n      * DESCRIPTION\n      *      Destroys a thread attributes object.\n      *\n      *      NOTES:\n      *              1)      Does not affect threads created with 'attr'.\n      *\n      * RESULTS\n      *              0               successfully destroyed attr,\n      *              EINVAL          'attr' is invalid.\n      *\n      * ------------------------------------------------------\n      */\n{\n  if (ptw32_is_attr (attr) != 0)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * Set the attribute object to a specific invalid value.\n   */\n  (*attr)->valid = 0;\n  free (*attr);\n  *attr = NULL;\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_getdetachstate.c",
    "content": "/*\n * pthread_attr_getdetachstate.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_attr_getdetachstate (const pthread_attr_t * attr, int *detachstate)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function determines whether threads created with\n      *      'attr' will run detached.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_attr_t\n      *\n      *      detachstate\n      *              pointer to an integer into which is returned one\n      *              of:\n      *\n      *              PTHREAD_CREATE_JOINABLE\n      *                              Thread ID is valid, must be joined\n      *\n      *              PTHREAD_CREATE_DETACHED\n      *                              Thread ID is invalid, cannot be joined,\n      *                              canceled, or modified\n      *\n      *\n      * DESCRIPTION\n      *      This function determines whether threads created with\n      *      'attr' will run detached.\n      *\n      *      NOTES:\n      *              1)      You cannot join or cancel detached threads.\n      *\n      * RESULTS\n      *              0               successfully retrieved detach state,\n      *              EINVAL          'attr' is invalid\n      *\n      * ------------------------------------------------------\n      */\n{\n  if (ptw32_is_attr (attr) != 0 || detachstate == NULL)\n    {\n      *detachstate = PTHREAD_CREATE_DETACHED;\n      return EINVAL;\n    }\n\n  *detachstate = (*attr)->detachstate;\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_getinheritsched.c",
    "content": "/*\n * pthread_attr_getinheritsched.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\npthread_attr_getinheritsched (pthread_attr_t * attr, int *inheritsched)\n{\n  if (ptw32_is_attr (attr) != 0 || inheritsched == NULL)\n    {\n      return EINVAL;\n    }\n\n  *inheritsched = (*attr)->inheritsched;\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_getschedparam.c",
    "content": "/*\n * pthread_attr_getschedparam.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\npthread_attr_getschedparam (const pthread_attr_t * attr,\n\t\t\t    struct sched_param *param)\n{\n  if (ptw32_is_attr (attr) != 0 || param == NULL)\n    {\n      return EINVAL;\n    }\n\n  memcpy (param, &(*attr)->param, sizeof (*param));\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_getschedpolicy.c",
    "content": "/*\n * pthread_attr_getschedpolicy.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\npthread_attr_getschedpolicy (pthread_attr_t * attr, int *policy)\n{\n  if (ptw32_is_attr (attr) != 0 || policy == NULL)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * Validate the policy arg.\n   * Check that a policy constant wasn't passed rather than &policy.\n   */\n  if (policy <= (int *) SCHED_MAX)\n    {\n      return EINVAL;\n    }\n\n  *policy = SCHED_OTHER;\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_getscope.c",
    "content": "/*\n * pthread_attr_getscope.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/* ignore warning \"unreferenced formal parameter\" */\n#ifdef _MSC_VER\n#pragma warning( disable : 4100 )\n#endif\n\nint\npthread_attr_getscope (const pthread_attr_t * attr, int *contentionscope)\n{\n#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING\n  *contentionscope = (*attr)->contentionscope;\n  return 0;\n#else\n  return ENOSYS;\n#endif\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_getstackaddr.c",
    "content": "/*\n * pthread_attr_getstackaddr.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/* ignore warning \"unreferenced formal parameter\" */\n#ifdef _MSC_VER\n#pragma warning( disable : 4100 )\n#endif\n\nint\npthread_attr_getstackaddr (const pthread_attr_t * attr, void **stackaddr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function determines the address of the stack\n      *      on which threads created with 'attr' will run.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_attr_t\n      *\n      *      stackaddr\n      *              pointer into which is returned the stack address.\n      *\n      *\n      * DESCRIPTION\n      *      This function determines the address of the stack\n      *      on which threads created with 'attr' will run.\n      *\n      *      NOTES:\n      *              1)      Function supported only if this macro is\n      *                      defined:\n      *\n      *                              _POSIX_THREAD_ATTR_STACKADDR\n      *\n      *              2)      Create only one thread for each stack\n      *                      address..\n      *\n      * RESULTS\n      *              0               successfully retreived stack address,\n      *              EINVAL          'attr' is invalid\n      *              ENOSYS          function not supported\n      *\n      * ------------------------------------------------------\n      */\n{\n#if defined( _POSIX_THREAD_ATTR_STACKADDR )\n\n  if (ptw32_is_attr (attr) != 0)\n    {\n      return EINVAL;\n    }\n\n  *stackaddr = (*attr)->stackaddr;\n  return 0;\n\n#else\n\n  return ENOSYS;\n\n#endif /* _POSIX_THREAD_ATTR_STACKADDR */\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_getstacksize.c",
    "content": "/*\n * pthread_attr_getstacksize.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/* ignore warning \"unreferenced formal parameter\" */\n#ifdef _MSC_VER\n#pragma warning( disable : 4100 )\n#endif\n\nint\npthread_attr_getstacksize (const pthread_attr_t * attr, size_t * stacksize)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function determines the size of the stack on\n      *      which threads created with 'attr' will run.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_attr_t\n      *\n      *      stacksize\n      *              pointer to size_t into which is returned the\n      *              stack size, in bytes.\n      *\n      *\n      * DESCRIPTION\n      *      This function determines the size of the stack on\n      *      which threads created with 'attr' will run.\n      *\n      *      NOTES:\n      *              1)      Function supported only if this macro is\n      *                      defined:\n      *\n      *                              _POSIX_THREAD_ATTR_STACKSIZE\n      *\n      *              2)      Use on newly created attributes object to\n      *                      find the default stack size.\n      *\n      * RESULTS\n      *              0               successfully retrieved stack size,\n      *              EINVAL          'attr' is invalid\n      *              ENOSYS          function not supported\n      *\n      * ------------------------------------------------------\n      */\n{\n#ifdef _POSIX_THREAD_ATTR_STACKSIZE\n\n  if (ptw32_is_attr (attr) != 0)\n    {\n      return EINVAL;\n    }\n\n  /* Everything is okay. */\n  *stacksize = (*attr)->stacksize;\n  return 0;\n\n#else\n\n  return ENOSYS;\n\n#endif /* _POSIX_THREAD_ATTR_STACKSIZE */\n\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_init.c",
    "content": "/*\n * pthread_attr_init.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_attr_init (pthread_attr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Initializes a thread attributes object with default\n      *      attributes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_attr_t\n      *\n      *\n      * DESCRIPTION\n      *      Initializes a thread attributes object with default\n      *      attributes.\n      *\n      *      NOTES:\n      *              1)      Used to define thread attributes\n      *\n      * RESULTS\n      *              0               successfully initialized attr,\n      *              ENOMEM          insufficient memory for attr.\n      *\n      * ------------------------------------------------------\n      */\n{\n  pthread_attr_t attr_result;\n\n  if (attr == NULL)\n    {\n      /* This is disallowed. */\n      return EINVAL;\n    }\n\n  attr_result = (pthread_attr_t) malloc (sizeof (*attr_result));\n\n  if (attr_result == NULL)\n    {\n      return ENOMEM;\n    }\n\n#ifdef _POSIX_THREAD_ATTR_STACKSIZE\n  /*\n   * Default to zero size. Unless changed explicitly this\n   * will allow Win32 to set the size to that of the\n   * main thread.\n   */\n  attr_result->stacksize = 0;\n#endif\n\n#ifdef _POSIX_THREAD_ATTR_STACKADDR\n  /* FIXME: Set this to something sensible when we support it. */\n  attr_result->stackaddr = NULL;\n#endif\n\n  attr_result->detachstate = PTHREAD_CREATE_JOINABLE;\n\n#if HAVE_SIGSET_T\n  memset (&(attr_result->sigmask), 0, sizeof (sigset_t));\n#endif /* HAVE_SIGSET_T */\n\n  /*\n   * Win32 sets new threads to THREAD_PRIORITY_NORMAL and\n   * not to that of the parent thread. We choose to default to\n   * this arrangement.\n   */\n  attr_result->param.sched_priority = THREAD_PRIORITY_NORMAL;\n  attr_result->inheritsched = PTHREAD_EXPLICIT_SCHED;\n  attr_result->contentionscope = PTHREAD_SCOPE_SYSTEM;\n\n  attr_result->valid = PTW32_ATTR_VALID;\n\n  *attr = attr_result;\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_setdetachstate.c",
    "content": "/*\n * pthread_attr_setdetachstate.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_attr_setdetachstate (pthread_attr_t * attr, int detachstate)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function specifies whether threads created with\n      *      'attr' will run detached.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_attr_t\n      *\n      *      detachstate\n      *              an integer containing one of:\n      *\n      *              PTHREAD_CREATE_JOINABLE\n      *                              Thread ID is valid, must be joined\n      *\n      *              PTHREAD_CREATE_DETACHED\n      *                              Thread ID is invalid, cannot be joined,\n      *                              canceled, or modified\n      *\n      *\n      * DESCRIPTION\n      *      This function specifies whether threads created with\n      *      'attr' will run detached.\n      *\n      *      NOTES:\n      *              1)      You cannot join or cancel detached threads.\n      *\n      * RESULTS\n      *              0               successfully set detach state,\n      *              EINVAL          'attr' or 'detachstate' is invalid\n      *\n      * ------------------------------------------------------\n      */\n{\n  if (ptw32_is_attr (attr) != 0)\n    {\n      return EINVAL;\n    }\n\n  if (detachstate != PTHREAD_CREATE_JOINABLE &&\n      detachstate != PTHREAD_CREATE_DETACHED)\n    {\n      return EINVAL;\n    }\n\n  (*attr)->detachstate = detachstate;\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_setinheritsched.c",
    "content": "/*\n * pthread_attr_setinheritsched.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\npthread_attr_setinheritsched (pthread_attr_t * attr, int inheritsched)\n{\n  if (ptw32_is_attr (attr) != 0)\n    {\n      return EINVAL;\n    }\n\n  if (PTHREAD_INHERIT_SCHED != inheritsched\n      && PTHREAD_EXPLICIT_SCHED != inheritsched)\n    {\n      return EINVAL;\n    }\n\n  (*attr)->inheritsched = inheritsched;\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_setschedparam.c",
    "content": "/*\n * pthread_attr_setschedparam.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\npthread_attr_setschedparam (pthread_attr_t * attr,\n\t\t\t    const struct sched_param *param)\n{\n  int priority;\n\n  if (ptw32_is_attr (attr) != 0 || param == NULL)\n    {\n      return EINVAL;\n    }\n\n  priority = param->sched_priority;\n\n  /* Validate priority level. */\n  if (priority < sched_get_priority_min (SCHED_OTHER) ||\n      priority > sched_get_priority_max (SCHED_OTHER))\n    {\n      return EINVAL;\n    }\n\n  memcpy (&(*attr)->param, param, sizeof (*param));\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_setschedpolicy.c",
    "content": "/*\n * pthread_attr_setschedpolicy.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\npthread_attr_setschedpolicy (pthread_attr_t * attr, int policy)\n{\n  if (ptw32_is_attr (attr) != 0)\n    {\n      return EINVAL;\n    }\n\n  if (policy != SCHED_OTHER)\n    {\n      return ENOTSUP;\n    }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_setscope.c",
    "content": "/*\n * pthread_attr_setscope.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/* ignore warning \"unreferenced formal parameter\" */\n#ifdef _MSC_VER\n#pragma warning( disable : 4100 )\n#endif\n\nint\npthread_attr_setscope (pthread_attr_t * attr, int contentionscope)\n{\n#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING\n  switch (contentionscope)\n    {\n    case PTHREAD_SCOPE_SYSTEM:\n      (*attr)->contentionscope = contentionscope;\n      return 0;\n    case PTHREAD_SCOPE_PROCESS:\n      return ENOTSUP;\n    default:\n      return EINVAL;\n    }\n#else\n  return ENOSYS;\n#endif\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_setstackaddr.c",
    "content": "/*\n * pthread_attr_setstackaddr.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_attr_setstackaddr (pthread_attr_t * attr, void *stackaddr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Threads created with 'attr' will run on the stack\n      *      starting at 'stackaddr'.\n      *      Stack must be at least PTHREAD_STACK_MIN bytes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_attr_t\n      *\n      *      stacksize\n      *              stack size, in bytes.\n      *\n      *\n      * DESCRIPTION\n      *      Threads created with 'attr' will run on the stack\n      *      starting at 'stackaddr'.\n      *      Stack must be at least PTHREAD_STACK_MIN bytes.\n      *\n      *      NOTES:\n      *              1)      Function supported only if this macro is\n      *                      defined:\n      *\n      *                              _POSIX_THREAD_ATTR_STACKADDR\n      *\n      *              2)      Create only one thread for each stack\n      *                      address..\n      *\n      *              3)      Ensure that stackaddr is aligned.\n      *\n      * RESULTS\n      *              0               successfully set stack address,\n      *              EINVAL          'attr' is invalid\n      *              ENOSYS          function not supported\n      *\n      * ------------------------------------------------------\n      */\n{\n#if defined( _POSIX_THREAD_ATTR_STACKADDR )\n\n  if (ptw32_is_attr (attr) != 0)\n    {\n      return EINVAL;\n    }\n\n  (*attr)->stackaddr = stackaddr;\n  return 0;\n\n#else\n\n  return ENOSYS;\n\n#endif /* _POSIX_THREAD_ATTR_STACKADDR */\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_attr_setstacksize.c",
    "content": "/*\n * pthread_attr_setstacksize.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_attr_setstacksize (pthread_attr_t * attr, size_t stacksize)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function specifies the size of the stack on\n      *      which threads created with 'attr' will run.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_attr_t\n      *\n      *      stacksize\n      *              stack size, in bytes.\n      *\n      *\n      * DESCRIPTION\n      *      This function specifies the size of the stack on\n      *      which threads created with 'attr' will run.\n      *\n      *      NOTES:\n      *              1)      Function supported only if this macro is\n      *                      defined:\n      *\n      *                              _POSIX_THREAD_ATTR_STACKSIZE\n      *\n      *              2)      Find the default first (using\n      *                      pthread_attr_getstacksize), then increase\n      *                      by multiplying.\n      *\n      *              3)      Only use if thread needs more than the\n      *                      default.\n      *\n      * RESULTS\n      *              0               successfully set stack size,\n      *              EINVAL          'attr' is invalid or stacksize too\n      *                              small or too big.\n      *              ENOSYS          function not supported\n      *\n      * ------------------------------------------------------\n      */\n{\n#ifdef _POSIX_THREAD_ATTR_STACKSIZE\n\n#if PTHREAD_STACK_MIN > 0\n\n  /*  Verify that the stack size is within range. */\n  if (stacksize < PTHREAD_STACK_MIN)\n    {\n      return EINVAL;\n    }\n\n#endif\n\n  if (ptw32_is_attr (attr) != 0)\n    {\n      return EINVAL;\n    }\n\n  /* Everything is okay. */\n  (*attr)->stacksize = stacksize;\n  return 0;\n\n#else\n\n  return ENOSYS;\n\n#endif /* _POSIX_THREAD_ATTR_STACKSIZE */\n\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_barrier_destroy.c",
    "content": "/*\n * pthread_barrier_destroy.c\n *\n * Description:\n * This translation unit implements barrier primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_barrier_destroy (pthread_barrier_t * barrier)\n{\n  int result = 0;\n  pthread_barrier_t b;\n\n  if (barrier == NULL || *barrier == (pthread_barrier_t) PTW32_OBJECT_INVALID)\n    {\n      return EINVAL;\n    }\n\n  b = *barrier;\n  *barrier = NULL;\n\n  if (0 == (result = sem_destroy (&(b->semBarrierBreeched[0]))))\n    {\n      if (0 == (result = sem_destroy (&(b->semBarrierBreeched[1]))))\n\t{\n\t  (void) free (b);\n\t  return 0;\n\t}\n      (void) sem_init (&(b->semBarrierBreeched[0]), b->pshared, 0);\n    }\n\n  *barrier = b;\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_barrier_init.c",
    "content": "/*\n * pthread_barrier_init.c\n *\n * Description:\n * This translation unit implements barrier primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_barrier_init (pthread_barrier_t * barrier,\n\t\t      const pthread_barrierattr_t * attr, unsigned int count)\n{\n  pthread_barrier_t b;\n\n  if (barrier == NULL || count == 0)\n    {\n      return EINVAL;\n    }\n\n  if (NULL != (b = (pthread_barrier_t) calloc (1, sizeof (*b))))\n    {\n      b->pshared = (attr != NULL && *attr != NULL\n\t\t    ? (*attr)->pshared : PTHREAD_PROCESS_PRIVATE);\n\n      b->nCurrentBarrierHeight = b->nInitialBarrierHeight = count;\n      b->iStep = 0;\n\n      /*\n       * Two semaphores are used in the same way as two stepping\n       * stones might be used in crossing a stream. Once all\n       * threads are safely on one stone, the other stone can\n       * be moved ahead, and the threads can start moving to it.\n       * If some threads decide to eat their lunch before moving\n       * then the other threads have to wait.\n       */\n      if (0 == sem_init (&(b->semBarrierBreeched[0]), b->pshared, 0))\n\t{\n\t  if (0 == sem_init (&(b->semBarrierBreeched[1]), b->pshared, 0))\n\t    {\n\t      *barrier = b;\n\t      return 0;\n\t    }\n\t  (void) sem_destroy (&(b->semBarrierBreeched[0]));\n\t}\n      (void) free (b);\n    }\n\n  return ENOMEM;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_barrier_wait.c",
    "content": "/*\n * pthread_barrier_wait.c\n *\n * Description:\n * This translation unit implements barrier primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_barrier_wait (pthread_barrier_t * barrier)\n{\n  int result;\n  int step;\n  pthread_barrier_t b;\n\n  if (barrier == NULL || *barrier == (pthread_barrier_t) PTW32_OBJECT_INVALID)\n    {\n      return EINVAL;\n    }\n\n  b = *barrier;\n  step = b->iStep;\n\n  if (0 == InterlockedDecrement ((long *) &(b->nCurrentBarrierHeight)))\n    {\n      /* Must be done before posting the semaphore. */\n      b->nCurrentBarrierHeight = b->nInitialBarrierHeight;\n\n      /*\n       * There is no race condition between the semaphore wait and post\n       * because we are using two alternating semas and all threads have\n       * entered barrier_wait and checked nCurrentBarrierHeight before this\n       * barrier's sema can be posted. Any threads that have not quite\n       * entered sem_wait below when the multiple_post has completed\n       * will nevertheless continue through the semaphore (barrier)\n       * and will not be left stranded.\n       */\n      result = (b->nInitialBarrierHeight > 1\n\t\t? sem_post_multiple (&(b->semBarrierBreeched[step]),\n\t\t\t\t     b->nInitialBarrierHeight - 1) : 0);\n    }\n  else\n    {\n      /*\n       * Use the non-cancelable version of sem_wait().\n       */\n      result = ptw32_semwait (&(b->semBarrierBreeched[step]));\n    }\n\n  /*\n   * The first thread across will be the PTHREAD_BARRIER_SERIAL_THREAD.\n   * This also sets up the alternate semaphore as the next barrier.\n   */\n  if (0 == result)\n    {\n      result = ((PTW32_INTERLOCKED_LONG) step ==\n\t\tPTW32_INTERLOCKED_COMPARE_EXCHANGE ((PTW32_INTERLOCKED_LPLONG)\n\t\t\t\t\t\t    & (b->iStep),\n\t\t\t\t\t\t    (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t\t    (1L - step),\n\t\t\t\t\t\t    (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t\t    step) ?\n\t\tPTHREAD_BARRIER_SERIAL_THREAD : 0);\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_barrierattr_destroy.c",
    "content": "/*\n * pthread_barrier_attr_destroy.c\n *\n * Description:\n * This translation unit implements barrier primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_barrierattr_destroy (pthread_barrierattr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Destroys a barrier attributes object. The object can\n      *      no longer be used.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_barrierattr_t\n      *\n      *\n      * DESCRIPTION\n      *      Destroys a barrier attributes object. The object can\n      *      no longer be used.\n      *\n      *      NOTES:\n      *              1)      Does not affect barrieres created using 'attr'\n      *\n      * RESULTS\n      *              0               successfully released attr,\n      *              EINVAL          'attr' is invalid.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n\n  if (attr == NULL || *attr == NULL)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      pthread_barrierattr_t ba = *attr;\n\n      *attr = NULL;\n      free (ba);\n    }\n\n  return (result);\n}\t\t\t\t/* pthread_barrierattr_destroy */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_barrierattr_getpshared.c",
    "content": "/*\n * pthread_barrier_attr_getpshared.c\n *\n * Description:\n * This translation unit implements barrier primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_barrierattr_getpshared (const pthread_barrierattr_t * attr,\n\t\t\t\tint *pshared)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Determine whether barriers created with 'attr' can be\n      *      shared between processes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_barrierattr_t\n      *\n      *      pshared\n      *              will be set to one of:\n      *\n      *                      PTHREAD_PROCESS_SHARED\n      *                              May be shared if in shared memory\n      *\n      *                      PTHREAD_PROCESS_PRIVATE\n      *                              Cannot be shared.\n      *\n      *\n      * DESCRIPTION\n      *      Mutexes creatd with 'attr' can be shared between\n      *      processes if pthread_barrier_t variable is allocated\n      *      in memory shared by these processes.\n      *      NOTES:\n      *              1)      pshared barriers MUST be allocated in shared\n      *                      memory.\n      *              2)      The following macro is defined if shared barriers\n      *                      are supported:\n      *                              _POSIX_THREAD_PROCESS_SHARED\n      *\n      * RESULTS\n      *              0               successfully retrieved attribute,\n      *              EINVAL          'attr' is invalid,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n\n  if ((attr != NULL && *attr != NULL) && (pshared != NULL))\n    {\n      *pshared = (*attr)->pshared;\n      result = 0;\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return (result);\n}\t\t\t\t/* pthread_barrierattr_getpshared */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_barrierattr_init.c",
    "content": "/*\n * pthread_barrier_attr_init.c\n *\n * Description:\n * This translation unit implements barrier primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_barrierattr_init (pthread_barrierattr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Initializes a barrier attributes object with default\n      *      attributes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_barrierattr_t\n      *\n      *\n      * DESCRIPTION\n      *      Initializes a barrier attributes object with default\n      *      attributes.\n      *\n      *      NOTES:\n      *              1)      Used to define barrier types\n      *\n      * RESULTS\n      *              0               successfully initialized attr,\n      *              ENOMEM          insufficient memory for attr.\n      *\n      * ------------------------------------------------------\n      */\n{\n  pthread_barrierattr_t ba;\n  int result = 0;\n\n  ba = (pthread_barrierattr_t) calloc (1, sizeof (*ba));\n\n  if (ba == NULL)\n    {\n      result = ENOMEM;\n    }\n  else\n    {\n      ba->pshared = PTHREAD_PROCESS_PRIVATE;\n    }\n\n  *attr = ba;\n\n  return (result);\n}\t\t\t\t/* pthread_barrierattr_init */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_barrierattr_setpshared.c",
    "content": "/*\n * pthread_barrier_attr_setpshared.c\n *\n * Description:\n * This translation unit implements barrier primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_barrierattr_setpshared (pthread_barrierattr_t * attr, int pshared)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Barriers created with 'attr' can be shared between\n      *      processes if pthread_barrier_t variable is allocated\n      *      in memory shared by these processes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_barrierattr_t\n      *\n      *      pshared\n      *              must be one of:\n      *\n      *                      PTHREAD_PROCESS_SHARED\n      *                              May be shared if in shared memory\n      *\n      *                      PTHREAD_PROCESS_PRIVATE\n      *                              Cannot be shared.\n      *\n      * DESCRIPTION\n      *      Mutexes creatd with 'attr' can be shared between\n      *      processes if pthread_barrier_t variable is allocated\n      *      in memory shared by these processes.\n      *\n      *      NOTES:\n      *              1)      pshared barriers MUST be allocated in shared\n      *                      memory.\n      *\n      *              2)      The following macro is defined if shared barriers\n      *                      are supported:\n      *                              _POSIX_THREAD_PROCESS_SHARED\n      *\n      * RESULTS\n      *              0               successfully set attribute,\n      *              EINVAL          'attr' or pshared is invalid,\n      *              ENOSYS          PTHREAD_PROCESS_SHARED not supported,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n\n  if ((attr != NULL && *attr != NULL) &&\n      ((pshared == PTHREAD_PROCESS_SHARED) ||\n       (pshared == PTHREAD_PROCESS_PRIVATE)))\n    {\n      if (pshared == PTHREAD_PROCESS_SHARED)\n\t{\n\n#if !defined( _POSIX_THREAD_PROCESS_SHARED )\n\n\t  result = ENOSYS;\n\t  pshared = PTHREAD_PROCESS_PRIVATE;\n\n#else\n\n\t  result = 0;\n\n#endif /* _POSIX_THREAD_PROCESS_SHARED */\n\n\t}\n      else\n\t{\n\t  result = 0;\n\t}\n\n      (*attr)->pshared = pshared;\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return (result);\n\n}\t\t\t\t/* pthread_barrierattr_setpshared */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_cancel.c",
    "content": "/*\n * pthread_cancel.c\n *\n * Description:\n * POSIX thread functions related to thread cancellation.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n#if defined(_M_IX86) || defined(_X86_)\n#define PTW32_PROGCTR(Context)  ((Context).Eip)\n#endif\n\n#if defined (_M_IA64)\n#define PTW32_PROGCTR(Context)  ((Context).StIIP)\n#endif\n\n#if defined(_MIPS_)\n#define PTW32_PROGCTR(Context)  ((Context).Fir)\n#endif\n\n#if defined(_ALPHA_)\n#define PTW32_PROGCTR(Context)  ((Context).Fir)\n#endif\n\n#if defined(_PPC_)\n#define PTW32_PROGCTR(Context)  ((Context).Iar)\n#endif\n\n#if defined(_AMD64_)\n#define PTW32_PROGCTR(Context)  ((Context).Rip)\n#endif\n\n#if !defined(PTW32_PROGCTR)\n#error Module contains CPU-specific code; modify and recompile.\n#endif\n\nstatic void\nptw32_cancel_self (void)\n{\n  ptw32_throw (PTW32_EPS_CANCEL);\n\n  /* Never reached */\n}\n\nstatic void CALLBACK\nptw32_cancel_callback (DWORD unused)\n{\n  ptw32_throw (PTW32_EPS_CANCEL);\n\n  /* Never reached */\n}\n\n/*\n * ptw32_RegisterCancelation() -\n * Must have args of same type as QueueUserAPCEx because this function\n * is a substitute for QueueUserAPCEx if it's not available.\n */\nDWORD\nptw32_RegisterCancelation (PAPCFUNC unused1, HANDLE threadH, DWORD unused2)\n{\n  CONTEXT context;\n\n  context.ContextFlags = CONTEXT_CONTROL;\n  GetThreadContext (threadH, &context);\n  PTW32_PROGCTR (context) = (DWORD_PTR) ptw32_cancel_self;\n  SetThreadContext (threadH, &context);\n  return 0;\n}\n\nint\npthread_cancel (pthread_t thread)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function requests cancellation of 'thread'.\n      *\n      * PARAMETERS\n      *      thread\n      *              reference to an instance of pthread_t\n      *\n      *\n      * DESCRIPTION\n      *      This function requests cancellation of 'thread'.\n      *      NOTE: cancellation is asynchronous; use pthread_join to\n      *                wait for termination of 'thread' if necessary.\n      *\n      * RESULTS\n      *              0               successfully requested cancellation,\n      *              ESRCH           no thread found corresponding to 'thread',\n      *              ENOMEM          implicit self thread create failed.\n      * ------------------------------------------------------\n      */\n{\n  int result;\n  int cancel_self;\n  pthread_t self;\n  ptw32_thread_t * tp;\n\n  result = pthread_kill (thread, 0);\n\n  if (0 != result)\n    {\n      return result;\n    }\n\n  if ((self = pthread_self ()).p == NULL)\n    {\n      return ENOMEM;\n    };\n\n  /*\n   * FIXME!!\n   *\n   * Can a thread cancel itself?\n   *\n   * The standard doesn't\n   * specify an error to be returned if the target\n   * thread is itself.\n   *\n   * If it may, then we need to ensure that a thread can't\n   * deadlock itself trying to cancel itself asyncronously\n   * (pthread_cancel is required to be an async-cancel\n   * safe function).\n   */\n  cancel_self = pthread_equal (thread, self);\n\n  tp = (ptw32_thread_t *) thread.p;\n\n  /*\n   * Lock for async-cancel safety.\n   */\n  (void) pthread_mutex_lock (&tp->cancelLock);\n\n  if (tp->cancelType == PTHREAD_CANCEL_ASYNCHRONOUS\n      && tp->cancelState == PTHREAD_CANCEL_ENABLE\n      && tp->state < PThreadStateCanceling)\n    {\n      if (cancel_self)\n\t{\n\t  tp->state = PThreadStateCanceling;\n\t  tp->cancelState = PTHREAD_CANCEL_DISABLE;\n\n\t  (void) pthread_mutex_unlock (&tp->cancelLock);\n\t  ptw32_throw (PTW32_EPS_CANCEL);\n\n\t  /* Never reached */\n\t}\n      else\n\t{\n\t  HANDLE threadH = tp->threadH;\n\n\t  SuspendThread (threadH);\n\n\t  if (WaitForSingleObject (threadH, 0) == WAIT_TIMEOUT)\n\t    {\n\t      tp->state = PThreadStateCanceling;\n\t      tp->cancelState = PTHREAD_CANCEL_DISABLE;\n\t      /*\n\t       * If alertdrv and QueueUserAPCEx is available then the following\n\t       * will result in a call to QueueUserAPCEx with the args given, otherwise\n\t       * this will result in a call to ptw32_RegisterCancelation and only\n\t       * the threadH arg will be used.\n\t       */\n\t      ptw32_register_cancelation (ptw32_cancel_callback, threadH, 0);\n\t      (void) pthread_mutex_unlock (&tp->cancelLock);\n\t      ResumeThread (threadH);\n\t    }\n\t}\n    }\n  else\n    {\n      /*\n       * Set for deferred cancellation.\n       */\n      if (tp->state < PThreadStateCancelPending)\n\t{\n\t  tp->state = PThreadStateCancelPending;\n\t  if (!SetEvent (tp->cancelEvent))\n\t    {\n\t      result = ESRCH;\n\t    }\n\t}\n      else if (tp->state >= PThreadStateCanceling)\n\t{\n\t  result = ESRCH;\n\t}\n\n      (void) pthread_mutex_unlock (&tp->cancelLock);\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_cond_destroy.c",
    "content": "/*\n * pthread_cond_destroy.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_cond_destroy (pthread_cond_t * cond)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function destroys a condition variable\n      *\n      *\n      * PARAMETERS\n      *      cond\n      *              pointer to an instance of pthread_cond_t\n      *\n      *\n      * DESCRIPTION\n      *      This function destroys a condition variable.\n      *\n      *      NOTES:\n      *              1)      A condition variable can be destroyed\n      *                      immediately after all the threads that\n      *                      are blocked on it are awakened. e.g.\n      *\n      *                      struct list {\n      *                        pthread_mutex_t lm;\n      *                        ...\n      *                      }\n      *\n      *                      struct elt {\n      *                        key k;\n      *                        int busy;\n      *                        pthread_cond_t notbusy;\n      *                        ...\n      *                      }\n      *\n      *                      \n      *                      struct elt *\n      *                      list_find(struct list *lp, key k)\n      *                      {\n      *                        struct elt *ep;\n      *\n      *                        pthread_mutex_lock(&lp->lm);\n      *                        while ((ep = find_elt(l,k) != NULL) && ep->busy)\n      *                          pthread_cond_wait(&ep->notbusy, &lp->lm);\n      *                        if (ep != NULL)\n      *                          ep->busy = 1;\n      *                        pthread_mutex_unlock(&lp->lm);\n      *                        return(ep);\n      *                      }\n      *\n      *                      delete_elt(struct list *lp, struct elt *ep)\n      *                      {\n      *                        pthread_mutex_lock(&lp->lm);\n      *                        assert(ep->busy);\n      *                        ... remove ep from list ...\n      *                        ep->busy = 0;\n      *                    (A) pthread_cond_broadcast(&ep->notbusy);\n      *                        pthread_mutex_unlock(&lp->lm);\n      *                    (B) pthread_cond_destroy(&rp->notbusy);\n      *                        free(ep);\n      *                      }\n      *\n      *                      In this example, the condition variable\n      *                      and its list element may be freed (line B)\n      *                      immediately after all threads waiting for\n      *                      it are awakened (line A), since the mutex\n      *                      and the code ensure that no other thread\n      *                      can touch the element to be deleted.\n      *\n      * RESULTS\n      *              0               successfully released condition variable,\n      *              EINVAL          'cond' is invalid,\n      *              EBUSY           'cond' is in use,\n      *\n      * ------------------------------------------------------\n      */\n{\n  pthread_cond_t cv;\n  int result = 0, result1 = 0, result2 = 0;\n\n  /*\n   * Assuming any race condition here is harmless.\n   */\n  if (cond == NULL || *cond == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (*cond != PTHREAD_COND_INITIALIZER)\n    {\n      EnterCriticalSection (&ptw32_cond_list_lock);\n\n      cv = *cond;\n\n      /*\n       * Close the gate; this will synchronize this thread with\n       * all already signaled waiters to let them retract their\n       * waiter status - SEE NOTE 1 ABOVE!!!\n       */\n      if (sem_wait (&(cv->semBlockLock)) != 0)\n\t{\n\t  return errno;\n\t}\n\n      /*\n       * !TRY! lock mtxUnblockLock; try will detect busy condition\n       * and will not cause a deadlock with respect to concurrent\n       * signal/broadcast.\n       */\n      if ((result = pthread_mutex_trylock (&(cv->mtxUnblockLock))) != 0)\n\t{\n\t  (void) sem_post (&(cv->semBlockLock));\n\t  return result;\n\t}\n\n      /*\n       * Check whether cv is still busy (still has waiters)\n       */\n      if (cv->nWaitersBlocked > cv->nWaitersGone)\n\t{\n\t  if (sem_post (&(cv->semBlockLock)) != 0)\n\t    {\n\t      result = errno;\n\t    }\n\t  result1 = pthread_mutex_unlock (&(cv->mtxUnblockLock));\n\t  result2 = EBUSY;\n\t}\n      else\n\t{\n\t  /*\n\t   * Now it is safe to destroy\n\t   */\n\t  *cond = NULL;\n\n\t  if (sem_destroy (&(cv->semBlockLock)) != 0)\n\t    {\n\t      result = errno;\n\t    }\n\t  if (sem_destroy (&(cv->semBlockQueue)) != 0)\n\t    {\n\t      result1 = errno;\n\t    }\n\t  if ((result2 = pthread_mutex_unlock (&(cv->mtxUnblockLock))) == 0)\n\t    {\n\t      result2 = pthread_mutex_destroy (&(cv->mtxUnblockLock));\n\t    }\n\n\t  /* Unlink the CV from the list */\n\n\t  if (ptw32_cond_list_head == cv)\n\t    {\n\t      ptw32_cond_list_head = cv->next;\n\t    }\n\t  else\n\t    {\n\t      cv->prev->next = cv->next;\n\t    }\n\n\t  if (ptw32_cond_list_tail == cv)\n\t    {\n\t      ptw32_cond_list_tail = cv->prev;\n\t    }\n\t  else\n\t    {\n\t      cv->next->prev = cv->prev;\n\t    }\n\n\t  (void) free (cv);\n\t}\n\n      LeaveCriticalSection (&ptw32_cond_list_lock);\n    }\n  else\n    {\n      /*\n       * See notes in ptw32_cond_check_need_init() above also.\n       */\n      EnterCriticalSection (&ptw32_cond_test_init_lock);\n\n      /*\n       * Check again.\n       */\n      if (*cond == PTHREAD_COND_INITIALIZER)\n\t{\n\t  /*\n\t   * This is all we need to do to destroy a statically\n\t   * initialised cond that has not yet been used (initialised).\n\t   * If we get to here, another thread waiting to initialise\n\t   * this cond will get an EINVAL. That's OK.\n\t   */\n\t  *cond = NULL;\n\t}\n      else\n\t{\n\t  /*\n\t   * The cv has been initialised while we were waiting\n\t   * so assume it's in use.\n\t   */\n\t  result = EBUSY;\n\t}\n\n      LeaveCriticalSection (&ptw32_cond_test_init_lock);\n    }\n\n  return ((result != 0) ? result : ((result1 != 0) ? result1 : result2));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_cond_init.c",
    "content": "/*\n * pthread_cond_init.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function initializes a condition variable.\n      *\n      * PARAMETERS\n      *      cond\n      *              pointer to an instance of pthread_cond_t\n      *\n      *      attr\n      *              specifies optional creation attributes.\n      *\n      *\n      * DESCRIPTION\n      *      This function initializes a condition variable.\n      *\n      * RESULTS\n      *              0               successfully created condition variable,\n      *              EINVAL          'attr' is invalid,\n      *              EAGAIN          insufficient resources (other than\n      *                              memory,\n      *              ENOMEM          insufficient memory,\n      *              EBUSY           'cond' is already initialized,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n  pthread_cond_t cv = NULL;\n\n  if (cond == NULL)\n    {\n      return EINVAL;\n    }\n\n  if ((attr != NULL && *attr != NULL) &&\n      ((*attr)->pshared == PTHREAD_PROCESS_SHARED))\n    {\n      /*\n       * Creating condition variable that can be shared between\n       * processes.\n       */\n      result = ENOSYS;\n      goto DONE;\n    }\n\n  cv = (pthread_cond_t) calloc (1, sizeof (*cv));\n\n  if (cv == NULL)\n    {\n      result = ENOMEM;\n      goto DONE;\n    }\n\n  cv->nWaitersBlocked = 0;\n  cv->nWaitersToUnblock = 0;\n  cv->nWaitersGone = 0;\n\n  if (sem_init (&(cv->semBlockLock), 0, 1) != 0)\n    {\n      result = errno;\n      goto FAIL0;\n    }\n\n  if (sem_init (&(cv->semBlockQueue), 0, 0) != 0)\n    {\n      result = errno;\n      goto FAIL1;\n    }\n\n  if ((result = pthread_mutex_init (&(cv->mtxUnblockLock), 0)) != 0)\n    {\n      goto FAIL2;\n    }\n\n  result = 0;\n\n  goto DONE;\n\n  /*\n   * -------------\n   * Failed...\n   * -------------\n   */\nFAIL2:\n  (void) sem_destroy (&(cv->semBlockQueue));\n\nFAIL1:\n  (void) sem_destroy (&(cv->semBlockLock));\n\nFAIL0:\n  (void) free (cv);\n  cv = NULL;\n\nDONE:\n  if (0 == result)\n    {\n      EnterCriticalSection (&ptw32_cond_list_lock);\n\n      cv->next = NULL;\n      cv->prev = ptw32_cond_list_tail;\n\n      if (ptw32_cond_list_tail != NULL)\n\t{\n\t  ptw32_cond_list_tail->next = cv;\n\t}\n\n      ptw32_cond_list_tail = cv;\n\n      if (ptw32_cond_list_head == NULL)\n\t{\n\t  ptw32_cond_list_head = cv;\n\t}\n\n      LeaveCriticalSection (&ptw32_cond_list_lock);\n    }\n\n  *cond = cv;\n\n  return result;\n\n}\t\t\t\t/* pthread_cond_init */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_cond_signal.c",
    "content": "/*\n * pthread_cond_signal.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * -------------------------------------------------------------\n * Algorithm:\n * See the comments at the top of pthread_cond_wait.c.\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nstatic INLINE int\nptw32_cond_unblock (pthread_cond_t * cond, int unblockAll)\n     /*\n      * Notes.\n      *\n      * Does not use the external mutex for synchronisation,\n      * therefore semBlockLock is needed.\n      * mtxUnblockLock is for LEVEL-2 synch. LEVEL-2 is the\n      * state where the external mutex is not necessarily locked by\n      * any thread, ie. between cond_wait unlocking and re-acquiring\n      * the lock after having been signaled or a timeout or\n      * cancellation.\n      *\n      * Uses the following CV elements:\n      *   nWaitersBlocked\n      *   nWaitersToUnblock\n      *   nWaitersGone\n      *   mtxUnblockLock\n      *   semBlockLock\n      *   semBlockQueue\n      */\n{\n  int result;\n  pthread_cond_t cv;\n  int nSignalsToIssue;\n\n  if (cond == NULL || *cond == NULL)\n    {\n      return EINVAL;\n    }\n\n  cv = *cond;\n\n  /*\n   * No-op if the CV is static and hasn't been initialised yet.\n   * Assuming that any race condition is harmless.\n   */\n  if (cv == PTHREAD_COND_INITIALIZER)\n    {\n      return 0;\n    }\n\n  if ((result = pthread_mutex_lock (&(cv->mtxUnblockLock))) != 0)\n    {\n      return result;\n    }\n\n  if (0 != cv->nWaitersToUnblock)\n    {\n      if (0 == cv->nWaitersBlocked)\n\t{\n\t  return pthread_mutex_unlock (&(cv->mtxUnblockLock));\n\t}\n      if (unblockAll)\n\t{\n\t  cv->nWaitersToUnblock += (nSignalsToIssue = cv->nWaitersBlocked);\n\t  cv->nWaitersBlocked = 0;\n\t}\n      else\n\t{\n\t  nSignalsToIssue = 1;\n\t  cv->nWaitersToUnblock++;\n\t  cv->nWaitersBlocked--;\n\t}\n    }\n  else if (cv->nWaitersBlocked > cv->nWaitersGone)\n    {\n      /* Use the non-cancellable version of sem_wait() */\n      if (ptw32_semwait (&(cv->semBlockLock)) != 0)\n\t{\n\t  result = errno;\n\t  (void) pthread_mutex_unlock (&(cv->mtxUnblockLock));\n\t  return result;\n\t}\n      if (0 != cv->nWaitersGone)\n\t{\n\t  cv->nWaitersBlocked -= cv->nWaitersGone;\n\t  cv->nWaitersGone = 0;\n\t}\n      if (unblockAll)\n\t{\n\t  nSignalsToIssue = cv->nWaitersToUnblock = cv->nWaitersBlocked;\n\t  cv->nWaitersBlocked = 0;\n\t}\n      else\n\t{\n\t  nSignalsToIssue = cv->nWaitersToUnblock = 1;\n\t  cv->nWaitersBlocked--;\n\t}\n    }\n  else\n    {\n      return pthread_mutex_unlock (&(cv->mtxUnblockLock));\n    }\n\n  if ((result = pthread_mutex_unlock (&(cv->mtxUnblockLock))) == 0)\n    {\n      if (sem_post_multiple (&(cv->semBlockQueue), nSignalsToIssue) != 0)\n\t{\n\t  result = errno;\n\t}\n    }\n\n  return result;\n\n}\t\t\t\t/* ptw32_cond_unblock */\n\nint\npthread_cond_signal (pthread_cond_t * cond)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function signals a condition variable, waking\n      *      one waiting thread.\n      *      If SCHED_FIFO or SCHED_RR policy threads are waiting\n      *      the highest priority waiter is awakened; otherwise,\n      *      an unspecified waiter is awakened.\n      *\n      * PARAMETERS\n      *      cond\n      *              pointer to an instance of pthread_cond_t\n      *\n      *\n      * DESCRIPTION\n      *      This function signals a condition variable, waking\n      *      one waiting thread.\n      *      If SCHED_FIFO or SCHED_RR policy threads are waiting\n      *      the highest priority waiter is awakened; otherwise,\n      *      an unspecified waiter is awakened.\n      *\n      *      NOTES:\n      *\n      *      1)      Use when any waiter can respond and only one need\n      *              respond (all waiters being equal).\n      *\n      * RESULTS\n      *              0               successfully signaled condition,\n      *              EINVAL          'cond' is invalid,\n      *\n      * ------------------------------------------------------\n      */\n{\n  /*\n   * The '0'(FALSE) unblockAll arg means unblock ONE waiter.\n   */\n  return (ptw32_cond_unblock (cond, 0));\n\n}\t\t\t\t/* pthread_cond_signal */\n\nint\npthread_cond_broadcast (pthread_cond_t * cond)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function broadcasts the condition variable,\n      *      waking all current waiters.\n      *\n      * PARAMETERS\n      *      cond\n      *              pointer to an instance of pthread_cond_t\n      *\n      *\n      * DESCRIPTION\n      *      This function signals a condition variable, waking\n      *      all waiting threads.\n      *\n      *      NOTES:\n      *\n      *      1)      Use when more than one waiter may respond to\n      *              predicate change or if any waiting thread may\n      *              not be able to respond\n      *\n      * RESULTS\n      *              0               successfully signalled condition to all\n      *                              waiting threads,\n      *              EINVAL          'cond' is invalid\n      *              ENOSPC          a required resource has been exhausted,\n      *\n      * ------------------------------------------------------\n      */\n{\n  /*\n   * The TRUE unblockAll arg means unblock ALL waiters.\n   */\n  return (ptw32_cond_unblock (cond, PTW32_TRUE));\n\n}\t\t\t\t/* pthread_cond_broadcast */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_cond_wait.c",
    "content": "/*\n * pthread_cond_wait.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * -------------------------------------------------------------\n * Algorithm:\n * The algorithm used in this implementation is that developed by\n * Alexander Terekhov in colaboration with Louis Thomas. The bulk\n * of the discussion is recorded in the file README.CV, which contains\n * several generations of both colaborators original algorithms. The final\n * algorithm used here is the one referred to as\n *\n *     Algorithm 8a / IMPL_SEM,UNBLOCK_STRATEGY == UNBLOCK_ALL\n * \n * presented below in pseudo-code as it appeared:\n *\n *\n * given:\n * semBlockLock - bin.semaphore\n * semBlockQueue - semaphore\n * mtxExternal - mutex or CS\n * mtxUnblockLock - mutex or CS\n * nWaitersGone - int\n * nWaitersBlocked - int\n * nWaitersToUnblock - int\n * \n * wait( timeout ) {\n * \n *   [auto: register int result          ]     // error checking omitted\n *   [auto: register int nSignalsWasLeft ]\n *   [auto: register int nWaitersWasGone ]\n * \n *   sem_wait( semBlockLock );\n *   nWaitersBlocked++;\n *   sem_post( semBlockLock );\n * \n *   unlock( mtxExternal );\n *   bTimedOut = sem_wait( semBlockQueue,timeout );\n * \n *   lock( mtxUnblockLock );\n *   if ( 0 != (nSignalsWasLeft = nWaitersToUnblock) ) {\n *     if ( bTimeout ) {                       // timeout (or canceled)\n *       if ( 0 != nWaitersBlocked ) {\n *         nWaitersBlocked--;\n *       }\n *       else {\n *         nWaitersGone++;                     // count spurious wakeups.\n *       }\n *     }\n *     if ( 0 == --nWaitersToUnblock ) {\n *       if ( 0 != nWaitersBlocked ) {\n *         sem_post( semBlockLock );           // open the gate.\n *         nSignalsWasLeft = 0;                // do not open the gate\n *                                             // below again.\n *       }\n *       else if ( 0 != (nWaitersWasGone = nWaitersGone) ) {\n *         nWaitersGone = 0;\n *       }\n *     }\n *   }\n *   else if ( INT_MAX/2 == ++nWaitersGone ) { // timeout/canceled or\n *                                             // spurious semaphore :-)\n *     sem_wait( semBlockLock );\n *     nWaitersBlocked -= nWaitersGone;     // something is going on here\n *                                          //  - test of timeouts? :-)\n *     sem_post( semBlockLock );\n *     nWaitersGone = 0;\n *   }\n *   unlock( mtxUnblockLock );\n * \n *   if ( 1 == nSignalsWasLeft ) {\n *     if ( 0 != nWaitersWasGone ) {\n *       // sem_adjust( semBlockQueue,-nWaitersWasGone );\n *       while ( nWaitersWasGone-- ) {\n *         sem_wait( semBlockQueue );       // better now than spurious later\n *       }\n *     } sem_post( semBlockLock );          // open the gate\n *   }\n * \n *   lock( mtxExternal );\n * \n *   return ( bTimedOut ) ? ETIMEOUT : 0;\n * }\n * \n * signal(bAll) {\n * \n *   [auto: register int result         ]\n *   [auto: register int nSignalsToIssue]\n * \n *   lock( mtxUnblockLock );\n * \n *   if ( 0 != nWaitersToUnblock ) {        // the gate is closed!!!\n *     if ( 0 == nWaitersBlocked ) {        // NO-OP\n *       return unlock( mtxUnblockLock );\n *     }\n *     if (bAll) {\n *       nWaitersToUnblock += nSignalsToIssue=nWaitersBlocked;\n *       nWaitersBlocked = 0;\n *     }\n *     else {\n *       nSignalsToIssue = 1;\n *       nWaitersToUnblock++;\n *       nWaitersBlocked--;\n *     }\n *   }\n *   else if ( nWaitersBlocked > nWaitersGone ) { // HARMLESS RACE CONDITION!\n *     sem_wait( semBlockLock );                  // close the gate\n *     if ( 0 != nWaitersGone ) {\n *       nWaitersBlocked -= nWaitersGone;\n *       nWaitersGone = 0;\n *     }\n *     if (bAll) {\n *       nSignalsToIssue = nWaitersToUnblock = nWaitersBlocked;\n *       nWaitersBlocked = 0;\n *     }\n *     else {\n *       nSignalsToIssue = nWaitersToUnblock = 1;\n *       nWaitersBlocked--;\n *     }\n *   }\n *   else { // NO-OP\n *     return unlock( mtxUnblockLock );\n *   }\n * \n *   unlock( mtxUnblockLock );\n *   sem_post( semBlockQueue,nSignalsToIssue );\n *   return result;\n * }\n * -------------------------------------------------------------\n *\n *     Algorithm 9 / IMPL_SEM,UNBLOCK_STRATEGY == UNBLOCK_ALL\n * \n * presented below in pseudo-code; basically 8a...\n *                                      ...BUT W/O \"spurious wakes\" prevention:\n *\n *\n * given:\n * semBlockLock - bin.semaphore\n * semBlockQueue - semaphore\n * mtxExternal - mutex or CS\n * mtxUnblockLock - mutex or CS\n * nWaitersGone - int\n * nWaitersBlocked - int\n * nWaitersToUnblock - int\n * \n * wait( timeout ) {\n * \n *   [auto: register int result          ]     // error checking omitted\n *   [auto: register int nSignalsWasLeft ]\n * \n *   sem_wait( semBlockLock );\n *   ++nWaitersBlocked;\n *   sem_post( semBlockLock );\n * \n *   unlock( mtxExternal );\n *   bTimedOut = sem_wait( semBlockQueue,timeout );\n * \n *   lock( mtxUnblockLock );\n *   if ( 0 != (nSignalsWasLeft = nWaitersToUnblock) ) {\n *     --nWaitersToUnblock;\n *   }\n *   else if ( INT_MAX/2 == ++nWaitersGone ) { // timeout/canceled or\n *                                             // spurious semaphore :-)\n *     sem_wait( semBlockLock );\n *     nWaitersBlocked -= nWaitersGone;        // something is going on here\n *                                             //  - test of timeouts? :-)\n *     sem_post( semBlockLock );\n *     nWaitersGone = 0;\n *   }\n *   unlock( mtxUnblockLock );\n * \n *   if ( 1 == nSignalsWasLeft ) {\n *     sem_post( semBlockLock );               // open the gate\n *   }\n * \n *   lock( mtxExternal );\n * \n *   return ( bTimedOut ) ? ETIMEOUT : 0;\n * }\n * \n * signal(bAll) {\n * \n *   [auto: register int result         ]\n *   [auto: register int nSignalsToIssue]\n * \n *   lock( mtxUnblockLock );\n * \n *   if ( 0 != nWaitersToUnblock ) {        // the gate is closed!!!\n *     if ( 0 == nWaitersBlocked ) {        // NO-OP\n *       return unlock( mtxUnblockLock );\n *     }\n *     if (bAll) {\n *       nWaitersToUnblock += nSignalsToIssue=nWaitersBlocked;\n *       nWaitersBlocked = 0;\n *     }\n *     else {\n *       nSignalsToIssue = 1;\n *       ++nWaitersToUnblock;\n *       --nWaitersBlocked;\n *     }\n *   }\n *   else if ( nWaitersBlocked > nWaitersGone ) { // HARMLESS RACE CONDITION!\n *     sem_wait( semBlockLock );                  // close the gate\n *     if ( 0 != nWaitersGone ) {\n *       nWaitersBlocked -= nWaitersGone;\n *       nWaitersGone = 0;\n *     }\n *     if (bAll) {\n *       nSignalsToIssue = nWaitersToUnblock = nWaitersBlocked;\n *       nWaitersBlocked = 0;\n *     }\n *     else {\n *       nSignalsToIssue = nWaitersToUnblock = 1;\n *       --nWaitersBlocked;\n *     }\n *   }\n *   else { // NO-OP\n *     return unlock( mtxUnblockLock );\n *   }\n *\n *   unlock( mtxUnblockLock );\n *   sem_post( semBlockQueue,nSignalsToIssue );\n *   return result;\n * }\n * -------------------------------------------------------------\n *\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * Arguments for cond_wait_cleanup, since we can only pass a\n * single void * to it.\n */\ntypedef struct\n{\n  pthread_mutex_t *mutexPtr;\n  pthread_cond_t cv;\n  int *resultPtr;\n} ptw32_cond_wait_cleanup_args_t;\n\nstatic void PTW32_CDECL\nptw32_cond_wait_cleanup (void *args)\n{\n  ptw32_cond_wait_cleanup_args_t *cleanup_args =\n    (ptw32_cond_wait_cleanup_args_t *) args;\n  pthread_cond_t cv = cleanup_args->cv;\n  int *resultPtr = cleanup_args->resultPtr;\n  int nSignalsWasLeft;\n  int result;\n\n  /*\n   * Whether we got here as a result of signal/broadcast or because of\n   * timeout on wait or thread cancellation we indicate that we are no\n   * longer waiting. The waiter is responsible for adjusting waiters\n   * (to)unblock(ed) counts (protected by unblock lock).\n   */\n  if ((result = pthread_mutex_lock (&(cv->mtxUnblockLock))) != 0)\n    {\n      *resultPtr = result;\n      return;\n    }\n\n  if (0 != (nSignalsWasLeft = cv->nWaitersToUnblock))\n    {\n      --(cv->nWaitersToUnblock);\n    }\n  else if (INT_MAX / 2 == ++(cv->nWaitersGone))\n    {\n      /* Use the non-cancellable version of sem_wait() */\n      if (ptw32_semwait (&(cv->semBlockLock)) != 0)\n\t{\n\t  *resultPtr = errno;\n\t  /*\n\t   * This is a fatal error for this CV,\n\t   * so we deliberately don't unlock\n\t   * cv->mtxUnblockLock before returning.\n\t   */\n\t  return;\n\t}\n      cv->nWaitersBlocked -= cv->nWaitersGone;\n      if (sem_post (&(cv->semBlockLock)) != 0)\n\t{\n\t  *resultPtr = errno;\n\t  /*\n\t   * This is a fatal error for this CV,\n\t   * so we deliberately don't unlock\n\t   * cv->mtxUnblockLock before returning.\n\t   */\n\t  return;\n\t}\n      cv->nWaitersGone = 0;\n    }\n\n  if ((result = pthread_mutex_unlock (&(cv->mtxUnblockLock))) != 0)\n    {\n      *resultPtr = result;\n      return;\n    }\n\n  if (1 == nSignalsWasLeft)\n    {\n      if (sem_post (&(cv->semBlockLock)) != 0)\n\t{\n\t  *resultPtr = errno;\n\t  return;\n\t}\n    }\n\n  /*\n   * XSH: Upon successful return, the mutex has been locked and is owned\n   * by the calling thread.\n   */\n  if ((result = pthread_mutex_lock (cleanup_args->mutexPtr)) != 0)\n    {\n      *resultPtr = result;\n    }\n}\t\t\t\t/* ptw32_cond_wait_cleanup */\n\nstatic INLINE int\nptw32_cond_timedwait (pthread_cond_t * cond,\n\t\t      pthread_mutex_t * mutex, const struct timespec *abstime)\n{\n  int result = 0;\n  pthread_cond_t cv;\n  ptw32_cond_wait_cleanup_args_t cleanup_args;\n\n  if (cond == NULL || *cond == NULL)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static condition variable. We check\n   * again inside the guarded section of ptw32_cond_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*cond == PTHREAD_COND_INITIALIZER)\n    {\n      result = ptw32_cond_check_need_init (cond);\n    }\n\n  if (result != 0 && result != EBUSY)\n    {\n      return result;\n    }\n\n  cv = *cond;\n\n  /* Thread can be cancelled in sem_wait() but this is OK */\n  if (sem_wait (&(cv->semBlockLock)) != 0)\n    {\n      return errno;\n    }\n\n  ++(cv->nWaitersBlocked);\n\n  if (sem_post (&(cv->semBlockLock)) != 0)\n    {\n      return errno;\n    }\n\n  /*\n   * Setup this waiter cleanup handler\n   */\n  cleanup_args.mutexPtr = mutex;\n  cleanup_args.cv = cv;\n  cleanup_args.resultPtr = &result;\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n  pthread_cleanup_push (ptw32_cond_wait_cleanup, (void *) &cleanup_args);\n\n  /*\n   * Now we can release 'mutex' and...\n   */\n  if ((result = pthread_mutex_unlock (mutex)) == 0)\n    {\n\n      /*\n       * ...wait to be awakened by\n       *              pthread_cond_signal, or\n       *              pthread_cond_broadcast, or\n       *              timeout, or\n       *              thread cancellation\n       *\n       * Note:\n       *\n       *      sem_timedwait is a cancellation point,\n       *      hence providing the mechanism for making\n       *      pthread_cond_wait a cancellation point.\n       *      We use the cleanup mechanism to ensure we\n       *      re-lock the mutex and adjust (to)unblock(ed) waiters\n       *      counts if we are cancelled, timed out or signalled.\n       */\n      if (sem_timedwait (&(cv->semBlockQueue), abstime) != 0)\n\t{\n\t  result = errno;\n\t}\n    }\n\n  /*\n   * Always cleanup\n   */\n  pthread_cleanup_pop (1);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n  /*\n   * \"result\" can be modified by the cleanup handler.\n   */\n  return result;\n\n}\t\t\t\t/* ptw32_cond_timedwait */\n\n\nint\npthread_cond_wait (pthread_cond_t * cond, pthread_mutex_t * mutex)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function waits on a condition variable until\n      *      awakened by a signal or broadcast.\n      *\n      *      Caller MUST be holding the mutex lock; the\n      *      lock is released and the caller is blocked waiting\n      *      on 'cond'. When 'cond' is signaled, the mutex\n      *      is re-acquired before returning to the caller.\n      *\n      * PARAMETERS\n      *      cond\n      *              pointer to an instance of pthread_cond_t\n      *\n      *      mutex\n      *              pointer to an instance of pthread_mutex_t\n      *\n      *\n      * DESCRIPTION\n      *      This function waits on a condition variable until\n      *      awakened by a signal or broadcast.\n      *\n      *      NOTES:\n      *\n      *      1)      The function must be called with 'mutex' LOCKED\n      *              by the calling thread, or undefined behaviour\n      *              will result.\n      *\n      *      2)      This routine atomically releases 'mutex' and causes\n      *              the calling thread to block on the condition variable.\n      *              The blocked thread may be awakened by \n      *                      pthread_cond_signal or \n      *                      pthread_cond_broadcast.\n      *\n      * Upon successful completion, the 'mutex' has been locked and \n      * is owned by the calling thread.\n      *\n      *\n      * RESULTS\n      *              0               caught condition; mutex released,\n      *              EINVAL          'cond' or 'mutex' is invalid,\n      *              EINVAL          different mutexes for concurrent waits,\n      *              EINVAL          mutex is not held by the calling thread,\n      *\n      * ------------------------------------------------------\n      */\n{\n  /*\n   * The NULL abstime arg means INFINITE waiting.\n   */\n  return (ptw32_cond_timedwait (cond, mutex, NULL));\n\n}\t\t\t\t/* pthread_cond_wait */\n\n\nint\npthread_cond_timedwait (pthread_cond_t * cond,\n\t\t\tpthread_mutex_t * mutex,\n\t\t\tconst struct timespec *abstime)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function waits on a condition variable either until\n      *      awakened by a signal or broadcast; or until the time\n      *      specified by abstime passes.\n      *\n      * PARAMETERS\n      *      cond\n      *              pointer to an instance of pthread_cond_t\n      *\n      *      mutex\n      *              pointer to an instance of pthread_mutex_t\n      *\n      *      abstime\n      *              pointer to an instance of (const struct timespec)\n      *\n      *\n      * DESCRIPTION\n      *      This function waits on a condition variable either until\n      *      awakened by a signal or broadcast; or until the time\n      *      specified by abstime passes.\n      *\n      *      NOTES:\n      *      1)      The function must be called with 'mutex' LOCKED\n      *              by the calling thread, or undefined behaviour\n      *              will result.\n      *\n      *      2)      This routine atomically releases 'mutex' and causes\n      *              the calling thread to block on the condition variable.\n      *              The blocked thread may be awakened by \n      *                      pthread_cond_signal or \n      *                      pthread_cond_broadcast.\n      *\n      *\n      * RESULTS\n      *              0               caught condition; mutex released,\n      *              EINVAL          'cond', 'mutex', or abstime is invalid,\n      *              EINVAL          different mutexes for concurrent waits,\n      *              EINVAL          mutex is not held by the calling thread,\n      *              ETIMEDOUT       abstime ellapsed before cond was signaled.\n      *\n      * ------------------------------------------------------\n      */\n{\n  if (abstime == NULL)\n    {\n      return EINVAL;\n    }\n\n  return (ptw32_cond_timedwait (cond, mutex, abstime));\n\n}\t\t\t\t/* pthread_cond_timedwait */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_condattr_destroy.c",
    "content": "/*\n * condvar_attr_destroy.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_condattr_destroy (pthread_condattr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Destroys a condition variable attributes object.\n      *      The object can no longer be used.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_condattr_t\n      *\n      *\n      * DESCRIPTION\n      *      Destroys a condition variable attributes object.\n      *      The object can no longer be used.\n      *\n      *      NOTES:\n      *      1)      Does not affect condition variables created\n      *              using 'attr'\n      *\n      * RESULTS\n      *              0               successfully released attr,\n      *              EINVAL          'attr' is invalid.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n\n  if (attr == NULL || *attr == NULL)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      (void) free (*attr);\n\n      *attr = NULL;\n      result = 0;\n    }\n\n  return result;\n\n}\t\t\t\t/* pthread_condattr_destroy */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_condattr_getpshared.c",
    "content": "/*\n * pthread_condattr_getpshared.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_condattr_getpshared (const pthread_condattr_t * attr, int *pshared)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Determine whether condition variables created with 'attr'\n      *      can be shared between processes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_condattr_t\n      *\n      *      pshared\n      *              will be set to one of:\n      *\n      *                      PTHREAD_PROCESS_SHARED\n      *                              May be shared if in shared memory\n      *\n      *                      PTHREAD_PROCESS_PRIVATE\n      *                              Cannot be shared.\n      *\n      *\n      * DESCRIPTION\n      *      Condition Variables created with 'attr' can be shared\n      *      between processes if pthread_cond_t variable is allocated\n      *      in memory shared by these processes.\n      *      NOTES:\n      *      1)      pshared condition variables MUST be allocated in\n      *              shared memory.\n      *\n      *      2)      The following macro is defined if shared mutexes\n      *              are supported:\n      *                      _POSIX_THREAD_PROCESS_SHARED\n      *\n      * RESULTS\n      *              0               successfully retrieved attribute,\n      *              EINVAL          'attr' or 'pshared' is invalid,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n\n  if ((attr != NULL && *attr != NULL) && (pshared != NULL))\n    {\n      *pshared = (*attr)->pshared;\n      result = 0;\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return result;\n\n}\t\t\t\t/* pthread_condattr_getpshared */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_condattr_init.c",
    "content": "/*\n * pthread_condattr_init.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_condattr_init (pthread_condattr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Initializes a condition variable attributes object\n      *      with default attributes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_condattr_t\n      *\n      *\n      * DESCRIPTION\n      *      Initializes a condition variable attributes object\n      *      with default attributes.\n      *\n      *      NOTES:\n      *              1)      Use to define condition variable types\n      *              2)      It is up to the application to ensure\n      *                      that it doesn't re-init an attribute\n      *                      without destroying it first. Otherwise\n      *                      a memory leak is created.\n      *\n      * RESULTS\n      *              0               successfully initialized attr,\n      *              ENOMEM          insufficient memory for attr.\n      *\n      * ------------------------------------------------------\n      */\n{\n  pthread_condattr_t attr_result;\n  int result = 0;\n\n  attr_result = (pthread_condattr_t) calloc (1, sizeof (*attr_result));\n\n  if (attr_result == NULL)\n    {\n      result = ENOMEM;\n    }\n\n  *attr = attr_result;\n\n  return result;\n\n}\t\t\t\t/* pthread_condattr_init */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_condattr_setpshared.c",
    "content": "/*\n * pthread_condattr_setpshared.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_condattr_setpshared (pthread_condattr_t * attr, int pshared)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Mutexes created with 'attr' can be shared between\n      *      processes if pthread_mutex_t variable is allocated\n      *      in memory shared by these processes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_mutexattr_t\n      *\n      *      pshared\n      *              must be one of:\n      *\n      *                      PTHREAD_PROCESS_SHARED\n      *                              May be shared if in shared memory\n      *\n      *                      PTHREAD_PROCESS_PRIVATE\n      *                              Cannot be shared.\n      *\n      * DESCRIPTION\n      *      Mutexes creatd with 'attr' can be shared between\n      *      processes if pthread_mutex_t variable is allocated\n      *      in memory shared by these processes.\n      *\n      *      NOTES:\n      *              1)      pshared mutexes MUST be allocated in shared\n      *                      memory.\n      *\n      *              2)      The following macro is defined if shared mutexes\n      *                      are supported:\n      *                              _POSIX_THREAD_PROCESS_SHARED\n      *\n      * RESULTS\n      *              0               successfully set attribute,\n      *              EINVAL          'attr' or pshared is invalid,\n      *              ENOSYS          PTHREAD_PROCESS_SHARED not supported,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n\n  if ((attr != NULL && *attr != NULL)\n      && ((pshared == PTHREAD_PROCESS_SHARED)\n\t  || (pshared == PTHREAD_PROCESS_PRIVATE)))\n    {\n      if (pshared == PTHREAD_PROCESS_SHARED)\n\t{\n\n#if !defined( _POSIX_THREAD_PROCESS_SHARED )\n\t  result = ENOSYS;\n\t  pshared = PTHREAD_PROCESS_PRIVATE;\n#else\n\t  result = 0;\n\n#endif /* _POSIX_THREAD_PROCESS_SHARED */\n\n\t}\n      else\n\t{\n\t  result = 0;\n\t}\n\n      (*attr)->pshared = pshared;\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return result;\n\n}\t\t\t\t/* pthread_condattr_setpshared */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_delay_np.c",
    "content": "/*\n * pthreads_delay_np.c\n *\n * Description:\n * This translation unit implements non-portable thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * pthread_delay_np\n *\n * DESCRIPTION\n *\n *       This routine causes a thread to delay execution for a specific period of time.\n *       This period ends at the current time plus the specified interval. The routine\n *       will not return before the end of the period is reached, but may return an\n *       arbitrary amount of time after the period has gone by. This can be due to\n *       system load, thread priorities, and system timer granularity. \n *\n *       Specifying an interval of zero (0) seconds and zero (0) nanoseconds is\n *       allowed and can be used to force the thread to give up the processor or to\n *       deliver a pending cancelation request. \n *\n *       The timespec structure contains the following two fields: \n *\n *            tv_sec is an integer number of seconds. \n *            tv_nsec is an integer number of nanoseconds. \n *\n *  Return Values\n *\n *  If an error condition occurs, this routine returns an integer value indicating\n *  the type of error. Possible return values are as follows: \n *\n *  0 \n *           Successful completion.\n *  [EINVAL] \n *           The value specified by interval is invalid. \n *\n * Example\n *\n * The following code segment would wait for 5 and 1/2 seconds\n *\n *  struct timespec tsWait;\n *  int      intRC;\n *\n *  tsWait.tv_sec  = 5;\n *  tsWait.tv_nsec = 500000000L;\n *  intRC = pthread_delay_np(&tsWait);\n */\nint\npthread_delay_np (struct timespec *interval)\n{\n  DWORD wait_time;\n  DWORD secs_in_millisecs;\n  DWORD millisecs;\n  DWORD status;\n  pthread_t self;\n  ptw32_thread_t * sp;\n\n  if (interval == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (interval->tv_sec == 0L && interval->tv_nsec == 0L)\n    {\n      pthread_testcancel ();\n      Sleep (0);\n      pthread_testcancel ();\n      return (0);\n    }\n\n  /* convert secs to millisecs */\n  secs_in_millisecs = interval->tv_sec * 1000L;\n\n  /* convert nanosecs to millisecs (rounding up) */\n  millisecs = (interval->tv_nsec + 999999L) / 1000000L;\n\n#if defined(__WATCOMC__)\n#pragma disable_message (124)\n#endif\n\n  /*\n   * Most compilers will issue a warning 'comparison always 0'\n   * because the variable type is unsigned, but we need to keep this\n   * for some reason I can't recall now.\n   */\n  if (0 > (wait_time = secs_in_millisecs + millisecs))\n    {\n      return EINVAL;\n    }\n\n#if defined(__WATCOMC__)\n#pragma enable_message (124)\n#endif\n\n  if (NULL == (self = pthread_self ()).p)\n    {\n      return ENOMEM;\n    }\n\n  sp = (ptw32_thread_t *) self.p;\n\n  if (sp->cancelState == PTHREAD_CANCEL_ENABLE)\n    {\n      /*\n       * Async cancelation won't catch us until wait_time is up.\n       * Deferred cancelation will cancel us immediately.\n       */\n      if (WAIT_OBJECT_0 ==\n\t  (status = WaitForSingleObject (sp->cancelEvent, wait_time)))\n\t{\n\t  /*\n\t   * Canceling!\n\t   */\n\t  (void) pthread_mutex_lock (&sp->cancelLock);\n\t  if (sp->state < PThreadStateCanceling)\n\t    {\n\t      sp->state = PThreadStateCanceling;\n\t      sp->cancelState = PTHREAD_CANCEL_DISABLE;\n\t      (void) pthread_mutex_unlock (&sp->cancelLock);\n\n\t      ptw32_throw (PTW32_EPS_CANCEL);\n\t    }\n\n\t  (void) pthread_mutex_unlock (&sp->cancelLock);\n\t  return ESRCH;\n\t}\n      else if (status != WAIT_TIMEOUT)\n\t{\n\t  return EINVAL;\n\t}\n    }\n  else\n    {\n      Sleep (wait_time);\n    }\n\n  return (0);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_detach.c",
    "content": "/*\n * pthread_detach.c\n *\n * Description:\n * This translation unit implements functions related to thread\n * synchronisation.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * Not needed yet, but defining it should indicate clashes with build target\n * environment that should be fixed.\n */\n#include <signal.h>\n\n\nint\npthread_detach (pthread_t thread)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function detaches the given thread.\n      *\n      * PARAMETERS\n      *      thread\n      *              an instance of a pthread_t\n      *\n      *\n      * DESCRIPTION\n      *      This function detaches the given thread. You may use it to\n      *      detach the main thread or to detach a joinable thread.\n      *      NOTE:   detached threads cannot be joined;\n      *              storage is freed immediately on termination.\n      *\n      * RESULTS\n      *              0               successfully detached the thread,\n      *              EINVAL          thread is not a joinable thread,\n      *              ENOSPC          a required resource has been exhausted,\n      *              ESRCH           no thread could be found for 'thread',\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n  BOOL destroyIt = PTW32_FALSE;\n  ptw32_thread_t * tp = (ptw32_thread_t *) thread.p;\n\n  EnterCriticalSection (&ptw32_thread_reuse_lock);\n\n  if (NULL == tp\n      || thread.x != tp->ptHandle.x)\n    {\n      result = ESRCH;\n    }\n  else if (PTHREAD_CREATE_DETACHED == tp->detachState)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      /*\n       * Joinable ptw32_thread_t structs are not scavenged until\n       * a join or detach is done. The thread may have exited already,\n       * but all of the state and locks etc are still there.\n       */\n      result = 0;\n\n      if (pthread_mutex_lock (&tp->cancelLock) == 0)\n\t{\n\t  if (tp->state != PThreadStateLast)\n\t    {\n\t      tp->detachState = PTHREAD_CREATE_DETACHED;\n\t    }\n\t  else if (tp->detachState != PTHREAD_CREATE_DETACHED)\n\t    {\n\t      /*\n\t       * Thread is joinable and has exited or is exiting.\n\t       */\n\t      destroyIt = PTW32_TRUE;\n\t    }\n\t  (void) pthread_mutex_unlock (&tp->cancelLock);\n\t}\n      else\n\t{\n\t  /* cancelLock shouldn't fail, but if it does ... */\n\t  result = ESRCH;\n\t}\n    }\n\n  LeaveCriticalSection (&ptw32_thread_reuse_lock);\n\n  if (result == 0)\n    {\n      /* Thread is joinable */\n\n      if (destroyIt)\n\t{\n\t  /* The thread has exited or is exiting but has not been joined or\n\t   * detached. Need to wait in case it's still exiting.\n\t   */\n\t  (void) WaitForSingleObject(tp->threadH, INFINITE);\n\t  ptw32_threadDestroy (thread);\n\t}\n    }\n\n  return (result);\n\n}\t\t\t\t/* pthread_detach */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_equal.c",
    "content": "/*\n * pthread_equal.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_equal (pthread_t t1, pthread_t t2)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function returns nonzero if t1 and t2 are equal, else\n      *      returns nonzero\n      *\n      * PARAMETERS\n      *      t1,\n      *      t2\n      *              thread IDs\n      *\n      *\n      * DESCRIPTION\n      *      This function returns nonzero if t1 and t2 are equal, else\n      *      returns zero.\n      *\n      * RESULTS\n      *              non-zero        if t1 and t2 refer to the same thread,\n      *              0               t1 and t2 do not refer to the same thread\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n\n  /*\n   * We also accept NULL == NULL - treating NULL as a thread\n   * for this special case, because there is no error that we can return.\n   */\n  result = ( t1.p == t2.p && t1.x == t2.x );\n\n  return (result);\n\n}\t\t\t\t/* pthread_equal */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_exit.c",
    "content": "/*\n * pthread_exit.c\n *\n * Description:\n * This translation unit implements routines associated with exiting from\n * a thread.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#ifndef _UWIN\n//#   include <process.h>\n#endif\n\nvoid\npthread_exit (void *value_ptr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function terminates the calling thread, returning\n      *      the value 'value_ptr' to any joining thread.\n      *\n      * PARAMETERS\n      *      value_ptr\n      *              a generic data value (i.e. not the address of a value)\n      *\n      *\n      * DESCRIPTION\n      *      This function terminates the calling thread, returning\n      *      the value 'value_ptr' to any joining thread.\n      *      NOTE: thread should be joinable.\n      *\n      * RESULTS\n      *              N/A\n      *\n      * ------------------------------------------------------\n      */\n{\n  ptw32_thread_t * sp;\n\n  /*\n   * Don't use pthread_self() to avoid creating an implicit POSIX thread handle\n   * unnecessarily.\n   */\n  sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey);\n\n#ifdef _UWIN\n  if (--pthread_count <= 0)\n    exit ((int) value_ptr);\n#endif\n\n  if (NULL == sp)\n    {\n      /*\n       * A POSIX thread handle was never created. I.e. this is a\n       * Win32 thread that has never called a pthreads-win32 routine that\n       * required a POSIX handle.\n       *\n       * Implicit POSIX handles are cleaned up in ptw32_throw() now.\n       */\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)  || defined (__DMC__)\n      _endthreadex ((unsigned) value_ptr);\n#else\n      _endthread ();\n#endif\n\n      /* Never reached */\n    }\n\n  sp->exitStatus = value_ptr;\n\n  ptw32_throw (PTW32_EPS_EXIT);\n\n  /* Never reached. */\n\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_getconcurrency.c",
    "content": "/*\n * pthread_getconcurrency.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_getconcurrency (void)\n{\n  return ptw32_concurrency;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_getschedparam.c",
    "content": "/*\n * sched_getschedparam.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\npthread_getschedparam (pthread_t thread, int *policy,\n\t\t       struct sched_param *param)\n{\n  int result;\n\n  /* Validate the thread id. */\n  result = pthread_kill (thread, 0);\n  if (0 != result)\n    {\n      return result;\n    }\n\n  /*\n   * Validate the policy and param args.\n   * Check that a policy constant wasn't passed rather than &policy.\n   */\n  if (policy <= (int *) SCHED_MAX || param == NULL)\n    {\n      return EINVAL;\n    }\n\n  /* Fill out the policy. */\n  *policy = SCHED_OTHER;\n\n  /*\n   * This function must return the priority value set by\n   * the most recent pthread_setschedparam() or pthread_create()\n   * for the target thread. It must not return the actual thread\n   * priority as altered by any system priority adjustments etc.\n   */\n  param->sched_priority = ((ptw32_thread_t *)thread.p)->sched_priority;\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_getspecific.c",
    "content": "/*\n * pthread_getspecific.c\n *\n * Description:\n * POSIX thread functions which implement thread-specific data (TSD).\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nvoid *\npthread_getspecific (pthread_key_t key)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function returns the current value of key in the\n      *      calling thread. If no value has been set for 'key' in \n      *      the thread, NULL is returned.\n      *\n      * PARAMETERS\n      *      key\n      *              an instance of pthread_key_t\n      *\n      *\n      * DESCRIPTION\n      *      This function returns the current value of key in the\n      *      calling thread. If no value has been set for 'key' in \n      *      the thread, NULL is returned.\n      *\n      * RESULTS\n      *              key value or NULL on failure\n      *\n      * ------------------------------------------------------\n      */\n{\n  void * ptr;\n\n  if (key == NULL)\n    {\n      ptr = NULL;\n    }\n  else\n    {\n      int lasterror = GetLastError ();\n      int lastWSAerror = WSAGetLastError ();\n\n      ptr = TlsGetValue (key->key);\n\n      SetLastError (lasterror);\n      WSASetLastError (lastWSAerror);\n    }\n\n  return ptr;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_getw32threadhandle_np.c",
    "content": "/*\n * pthread_getw32threadhandle_np.c\n *\n * Description:\n * This translation unit implements non-portable thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * pthread_getw32threadhandle_np()\n *\n * Returns the win32 thread handle that the POSIX\n * thread \"thread\" is running as.\n *\n * Applications can use the win32 handle to set\n * win32 specific attributes of the thread.\n */\nHANDLE\npthread_getw32threadhandle_np (pthread_t thread)\n{\n  return ((ptw32_thread_t *)thread.p)->threadH;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_join.c",
    "content": "/*\n * pthread_join.c\n *\n * Description:\n * This translation unit implements functions related to thread\n * synchronisation.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * Not needed yet, but defining it should indicate clashes with build target\n * environment that should be fixed.\n */\n#include <signal.h>\n\n\nint\npthread_join (pthread_t thread, void **value_ptr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function waits for 'thread' to terminate and\n      *      returns the thread's exit value if 'value_ptr' is not\n      *      NULL. This also detaches the thread on successful\n      *      completion.\n      *\n      * PARAMETERS\n      *      thread\n      *              an instance of pthread_t\n      *\n      *      value_ptr\n      *              pointer to an instance of pointer to void\n      *\n      *\n      * DESCRIPTION\n      *      This function waits for 'thread' to terminate and\n      *      returns the thread's exit value if 'value_ptr' is not\n      *      NULL. This also detaches the thread on successful\n      *      completion.\n      *      NOTE:   detached threads cannot be joined or canceled\n      *\n      * RESULTS\n      *              0               'thread' has completed\n      *              EINVAL          thread is not a joinable thread,\n      *              ESRCH           no thread could be found with ID 'thread',\n      *              ENOENT          thread couldn't find it's own valid handle,\n      *              EDEADLK         attempt to join thread with self\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n  pthread_t self;\n  ptw32_thread_t * tp = (ptw32_thread_t *) thread.p;\n\n  EnterCriticalSection (&ptw32_thread_reuse_lock);\n\n  if (NULL == tp\n      || thread.x != tp->ptHandle.x)\n    {\n      result = ESRCH;\n    }\n  else if (PTHREAD_CREATE_DETACHED == tp->detachState)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      result = 0;\n    }\n\n  LeaveCriticalSection (&ptw32_thread_reuse_lock);\n\n  if (result == 0)\n    {\n      /* \n       * The target thread is joinable and can't be reused before we join it.\n       */\n      self = pthread_self();\n\n      if (NULL == self.p)\n\t{\n\t  result = ENOENT;\n\t}\n      else if (pthread_equal (self, thread))\n\t{\n\t  result = EDEADLK;\n\t}\n      else\n\t{\n\t  /*\n\t   * Pthread_join is a cancelation point.\n\t   * If we are canceled then our target thread must not be\n\t   * detached (destroyed). This is guarranteed because\n\t   * pthreadCancelableWait will not return if we\n\t   * are canceled.\n\t   */\n\t  result = pthreadCancelableWait (tp->threadH);\n\n\t  if (0 == result)\n\t    {\n\t      if (value_ptr != NULL)\n\t\t{\n\t\t  *value_ptr = tp->exitStatus;\n\t\t}\n\n\t      /*\n\t       * The result of making multiple simultaneous calls to\n\t       * pthread_join() or pthread_detach() specifying the same\n\t       * target is undefined.\n\t       */\n\t      result = pthread_detach (thread);\n\t    }\n\t  else\n\t    {\n\t      result = ESRCH;\n\t    }\n\t}\n    }\n\n  return (result);\n\n}\t\t\t\t/* pthread_join */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_key_create.c",
    "content": "/*\n * pthread_key_create.c\n *\n * Description:\n * POSIX thread functions which implement thread-specific data (TSD).\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n/* TLS_OUT_OF_INDEXES not defined on WinCE */\n#ifndef TLS_OUT_OF_INDEXES\n#define TLS_OUT_OF_INDEXES 0xffffffff\n#endif\n\nint\npthread_key_create (pthread_key_t * key, void (*destructor) (void *))\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function creates a thread-specific data key visible\n      *      to all threads. All existing and new threads have a value\n      *      NULL for key until set using pthread_setspecific. When any\n      *      thread with a non-NULL value for key terminates, 'destructor'\n      *      is called with key's current value for that thread.\n      *\n      * PARAMETERS\n      *      key\n      *              pointer to an instance of pthread_key_t\n      *\n      *\n      * DESCRIPTION\n      *      This function creates a thread-specific data key visible\n      *      to all threads. All existing and new threads have a value\n      *      NULL for key until set using pthread_setspecific. When any\n      *      thread with a non-NULL value for key terminates, 'destructor'\n      *      is called with key's current value for that thread.\n      *\n      * RESULTS\n      *              0               successfully created semaphore,\n      *              EAGAIN          insufficient resources or PTHREAD_KEYS_MAX\n      *                              exceeded,\n      *              ENOMEM          insufficient memory to create the key,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  pthread_key_t newkey;\n\n  if ((newkey = (pthread_key_t) calloc (1, sizeof (*newkey))) == NULL)\n    {\n      result = ENOMEM;\n    }\n  else if ((newkey->key = TlsAlloc ()) == TLS_OUT_OF_INDEXES)\n    {\n      result = EAGAIN;\n\n      free (newkey);\n      newkey = NULL;\n    }\n  else if (destructor != NULL)\n    {\n      /*\n       * Have to manage associations between thread and key;\n       * Therefore, need a lock that allows multiple threads\n       * to gain exclusive access to the key->threads list.\n       *\n       * The mutex will only be created when it is first locked.\n       */\n      newkey->keyLock = PTHREAD_MUTEX_INITIALIZER;\n      newkey->destructor = destructor;\n    }\n\n  *key = newkey;\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_key_delete.c",
    "content": "/*\n * pthread_key_delete.c\n *\n * Description:\n * POSIX thread functions which implement thread-specific data (TSD).\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_key_delete (pthread_key_t key)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function deletes a thread-specific data key. This\n      *      does not change the value of the thread specific data key\n      *      for any thread and does not run the key's destructor\n      *      in any thread so it should be used with caution.\n      *\n      * PARAMETERS\n      *      key\n      *              pointer to an instance of pthread_key_t\n      *\n      *\n      * DESCRIPTION\n      *      This function deletes a thread-specific data key. This\n      *      does not change the value of the thread specific data key\n      *      for any thread and does not run the key's destructor\n      *      in any thread so it should be used with caution.\n      *\n      * RESULTS\n      *              0               successfully deleted the key,\n      *              EINVAL          key is invalid,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n\n  if (key != NULL)\n    {\n      if (key->threads != NULL &&\n\t  key->destructor != NULL &&\n\t  pthread_mutex_lock (&(key->keyLock)) == 0)\n\t{\n\t  ThreadKeyAssoc *assoc;\n\t  /*\n\t   * Run through all Thread<-->Key associations\n\t   * for this key.\n\t   *\n\t   * While we hold at least one of the locks guarding\n\t   * the assoc, we know that the assoc pointed to by\n\t   * key->threads is valid.\n\t   */\n\t  while ((assoc = (ThreadKeyAssoc *) key->threads) != NULL)\n\t    {\n\t      ptw32_thread_t * thread = assoc->thread;\n\n\t      if (assoc == NULL)\n\t\t{\n\t\t  /* Finished */\n\t\t  break;\n\t\t}\n\n\t      if (pthread_mutex_lock (&(thread->threadLock)) == 0)\n\t\t{\n\t\t  /*\n\t\t   * Since we are starting at the head of the key's threads\n\t\t   * chain, this will also point key->threads at the next assoc.\n\t\t   * While we hold key->keyLock, no other thread can insert\n\t\t   * a new assoc via pthread_setspecific.\n\t\t   */\n\t\t  ptw32_tkAssocDestroy (assoc);\n\t\t  (void) pthread_mutex_unlock (&(thread->threadLock));\n\t\t}\n\t      else\n\t\t{\n\t\t  /* Thread or lock is no longer valid? */\n\t\t  ptw32_tkAssocDestroy (assoc);\n\t\t}\n\t    }\n\t  pthread_mutex_unlock (&(key->keyLock));\n\t}\n\n      TlsFree (key->key);\n      if (key->destructor != NULL)\n\t{\n\t  /* A thread could be holding the keyLock */\n\t  while (EBUSY == pthread_mutex_destroy (&(key->keyLock)))\n\t    {\n\t      Sleep(1); // Ugly.\n\t    }\n\t}\n\n#if defined( _DEBUG )\n      memset ((char *) key, 0, sizeof (*key));\n#endif\n      free (key);\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_kill.c",
    "content": "/*\n * pthread_kill.c\n *\n * Description:\n * This translation unit implements the pthread_kill routine.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * Not needed yet, but defining it should indicate clashes with build target\n * environment that should be fixed.\n */\n#include <signal.h>\n\nint\npthread_kill (pthread_t thread, int sig)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function requests that a signal be delivered to the\n      *      specified thread. If sig is zero, error checking is\n      *      performed but no signal is actually sent such that this\n      *      function can be used to check for a valid thread ID.\n      *\n      * PARAMETERS\n      *      thread  reference to an instances of pthread_t\n      *      sig     signal. Currently only a value of 0 is supported.\n      *\n      *\n      * DESCRIPTION\n      *      This function requests that a signal be delivered to the\n      *      specified thread. If sig is zero, error checking is\n      *      performed but no signal is actually sent such that this\n      *      function can be used to check for a valid thread ID.\n      *\n      * RESULTS\n      *              ESRCH           the thread is not a valid thread ID,\n      *              EINVAL          the value of the signal is invalid\n      *                              or unsupported.\n      *              0               the signal was successfully sent.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  ptw32_thread_t * tp;\n\n  EnterCriticalSection (&ptw32_thread_reuse_lock);\n\n  tp = (ptw32_thread_t *) thread.p;\n\n  if (NULL == tp\n      || thread.x != tp->ptHandle.x\n      || NULL == tp->threadH)\n    {\n      result = ESRCH;\n    }\n\n  LeaveCriticalSection (&ptw32_thread_reuse_lock);\n\n  if (0 == result && 0 != sig)\n    {\n      /*\n       * Currently does not support any signals.\n       */\n      result = EINVAL;\n    }\n\n  return result;\n\n}\t\t\t\t/* pthread_kill */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutex_destroy.c",
    "content": "/*\n * pthread_mutex_destroy.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutex_destroy (pthread_mutex_t * mutex)\n{\n  int result = 0;\n  pthread_mutex_t mx;\n\n  /*\n   * Let the system deal with invalid pointers.\n   */\n\n  /*\n   * Check to see if we have something to delete.\n   */\n  if (*mutex < PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)\n    {\n      mx = *mutex;\n\n      result = pthread_mutex_trylock (&mx);\n\n      /*\n       * If trylock succeeded and the mutex is not recursively locked it\n       * can be destroyed.\n       */\n      if (result == 0)\n\t{\n\t  if (mx->kind != PTHREAD_MUTEX_RECURSIVE || 1 == mx->recursive_count)\n\t    {\n\t      /*\n\t       * FIXME!!!\n\t       * The mutex isn't held by another thread but we could still\n\t       * be too late invalidating the mutex below since another thread\n\t       * may already have entered mutex_lock and the check for a valid\n\t       * *mutex != NULL.\n\t       *\n\t       * Note that this would be an unusual situation because it is not\n\t       * common that mutexes are destroyed while they are still in\n\t       * use by other threads.\n\t       */\n\t      *mutex = NULL;\n\n\t      result = pthread_mutex_unlock (&mx);\n\n\t      if (result == 0)\n\t\t{\n\t\t  if (!CloseHandle (mx->event))\n\t\t    {\n\t\t      *mutex = mx;\n\t\t      result = EINVAL;\n\t\t    }\n\t\t  else\n\t\t    {\n\t\t      free (mx);\n\t\t    }\n\t\t}\n\t      else\n\t\t{\n\t\t  /*\n\t\t   * Restore the mutex before we return the error.\n\t\t   */\n\t\t  *mutex = mx;\n\t\t}\n\t    }\n\t  else\t\t\t/* mx->recursive_count > 1 */\n\t    {\n\t      /*\n\t       * The mutex must be recursive and already locked by us (this thread).\n\t       */\n\t      mx->recursive_count--;\t/* Undo effect of pthread_mutex_trylock() above */\n\t      result = EBUSY;\n\t    }\n\t}\n    }\n  else\n    {\n      /*\n       * See notes in ptw32_mutex_check_need_init() above also.\n       */\n      EnterCriticalSection (&ptw32_mutex_test_init_lock);\n\n      /*\n       * Check again.\n       */\n      if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)\n\t{\n\t  /*\n\t   * This is all we need to do to destroy a statically\n\t   * initialised mutex that has not yet been used (initialised).\n\t   * If we get to here, another thread\n\t   * waiting to initialise this mutex will get an EINVAL.\n\t   */\n\t  *mutex = NULL;\n\t}\n      else\n\t{\n\t  /*\n\t   * The mutex has been initialised while we were waiting\n\t   * so assume it's in use.\n\t   */\n\t  result = EBUSY;\n\t}\n\n      LeaveCriticalSection (&ptw32_mutex_test_init_lock);\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutex_init.c",
    "content": "/*\n * pthread_mutex_init.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr)\n{\n  int result = 0;\n  pthread_mutex_t mx;\n\n  if (mutex == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (attr != NULL\n      && *attr != NULL && (*attr)->pshared == PTHREAD_PROCESS_SHARED)\n    {\n      /*\n       * Creating mutex that can be shared between\n       * processes.\n       */\n#if _POSIX_THREAD_PROCESS_SHARED >= 0\n\n      /*\n       * Not implemented yet.\n       */\n\n#error ERROR [__FILE__, line __LINE__]: Process shared mutexes are not supported yet.\n\n#else\n\n      return ENOSYS;\n\n#endif /* _POSIX_THREAD_PROCESS_SHARED */\n\n    }\n\n  mx = (pthread_mutex_t) calloc (1, sizeof (*mx));\n\n  if (mx == NULL)\n    {\n      result = ENOMEM;\n    }\n  else\n    {\n      mx->lock_idx = 0;\n      mx->recursive_count = 0;\n      mx->kind = (attr == NULL || *attr == NULL\n\t\t  ? PTHREAD_MUTEX_DEFAULT : (*attr)->kind);\n      mx->ownerThread.p = NULL;\n\n      mx->event = CreateEvent (NULL, PTW32_FALSE,    /* manual reset = No */\n                              PTW32_FALSE,           /* initial state = not signaled */\n                              NULL);                 /* event name */\n\n      if (0 == mx->event)\n        {\n          result = ENOSPC;\n          free (mx);\n          mx = NULL;\n        }\n    }\n\n  *mutex = mx;\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutex_lock.c",
    "content": "/*\n * pthread_mutex_lock.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#ifndef _UWIN\n//#   include <process.h>\n#endif\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_mutex_lock (pthread_mutex_t * mutex)\n{\n  int result = 0;\n  pthread_mutex_t mx;\n\n  /*\n   * Let the system deal with invalid pointers.\n   */\n  if (*mutex == NULL)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static mutex. We check\n   * again inside the guarded section of ptw32_mutex_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)\n    {\n      if ((result = ptw32_mutex_check_need_init (mutex)) != 0)\n\t{\n\t  return (result);\n\t}\n    }\n\n  mx = *mutex;\n\n  if (mx->kind == PTHREAD_MUTEX_NORMAL)\n    {\n      if ((LONG) PTW32_INTERLOCKED_EXCHANGE(\n\t\t   (LPLONG) &mx->lock_idx,\n\t\t   (LONG) 1) != 0)\n\t{\n\t  while ((LONG) PTW32_INTERLOCKED_EXCHANGE(\n                          (LPLONG) &mx->lock_idx,\n\t\t\t  (LONG) -1) != 0)\n\t    {\n\t      if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE))\n\t        {\n\t          result = EINVAL;\n\t\t  break;\n\t        }\n\t    }\n\t}\n    }\n  else\n    {\n      pthread_t self = pthread_self();\n\n      if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE(\n                   (PTW32_INTERLOCKED_LPLONG) &mx->lock_idx,\n\t\t   (PTW32_INTERLOCKED_LONG) 1,\n\t\t   (PTW32_INTERLOCKED_LONG) 0) == 0)\n\t{\n\t  mx->recursive_count = 1;\n\t  mx->ownerThread = self;\n\t}\n      else\n\t{\n\t  if (pthread_equal (mx->ownerThread, self))\n\t    {\n\t      if (mx->kind == PTHREAD_MUTEX_RECURSIVE)\n\t\t{\n\t\t  mx->recursive_count++;\n\t\t}\n\t      else\n\t\t{\n\t\t  result = EDEADLK;\n\t\t}\n\t    }\n\t  else\n\t    {\n\t      while ((LONG) PTW32_INTERLOCKED_EXCHANGE(\n                              (LPLONG) &mx->lock_idx,\n\t\t\t      (LONG) -1) != 0)\n\t\t{\n\t          if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE))\n\t\t    {\n\t              result = EINVAL;\n\t\t      break;\n\t\t    }\n\t\t}\n\n\t      if (0 == result)\n\t\t{\n\t\t  mx->recursive_count = 1;\n\t\t  mx->ownerThread = self;\n\t\t}\n\t    }\n\t}\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutex_timedlock.c",
    "content": "/*\n * pthread_mutex_timedlock.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nstatic INLINE int\nptw32_timed_eventwait (HANDLE event, const struct timespec *abstime)\n     /*\n      * ------------------------------------------------------\n      * DESCRIPTION\n      *      This function waits on an event until signaled or until\n      *      abstime passes.\n      *      If abstime has passed when this routine is called then\n      *      it returns a result to indicate this.\n      *\n      *      If 'abstime' is a NULL pointer then this function will\n      *      block until it can successfully decrease the value or\n      *      until interrupted by a signal.\n      *\n      *      This routine is not a cancelation point.\n      *\n      * RESULTS\n      *              0               successfully signaled,\n      *              ETIMEDOUT       abstime passed\n      *              EINVAL          'event' is not a valid event,\n      *\n      * ------------------------------------------------------\n      */\n{\n\n  DWORD milliseconds;\n  DWORD status;\n\n  if (event == NULL)\n    {\n      return EINVAL;\n    }\n  else\n    {\n      if (abstime == NULL)\n\t{\n\t  milliseconds = INFINITE;\n\t}\n      else\n\t{\n\t  /* \n\t   * Calculate timeout as milliseconds from current system time. \n\t   */\n\t  milliseconds = ptw32_relmillisecs (abstime);\n\t}\n\n      status = WaitForSingleObject (event, milliseconds);\n\n      if (status == WAIT_OBJECT_0)\n\t{\n\t  return 0;\n\t}\n      else if (status == WAIT_TIMEOUT)\n\t{\n\t  return ETIMEDOUT;\n\t}\n      else\n\t{\n\t  return EINVAL;\n\t}\n    }\n\n  return 0;\n\n}\t\t\t\t/* ptw32_timed_semwait */\n\n\nint\npthread_mutex_timedlock (pthread_mutex_t * mutex,\n\t\t\t const struct timespec *abstime)\n{\n  int result;\n  pthread_mutex_t mx;\n\n  /*\n   * Let the system deal with invalid pointers.\n   */\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static mutex. We check\n   * again inside the guarded section of ptw32_mutex_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)\n    {\n      if ((result = ptw32_mutex_check_need_init (mutex)) != 0)\n\t{\n\t  return (result);\n\t}\n    }\n\n  mx = *mutex;\n\n  if (mx->kind == PTHREAD_MUTEX_NORMAL)\n    {\n      if ((LONG) PTW32_INTERLOCKED_EXCHANGE(\n\t\t   (LPLONG) &mx->lock_idx,\n\t\t   (LONG) 1) != 0)\n\t{\n          while ((LONG) PTW32_INTERLOCKED_EXCHANGE(\n                          (LPLONG) &mx->lock_idx,\n\t\t\t  (LONG) -1) != 0)\n            {\n\t      if (0 != (result = ptw32_timed_eventwait (mx->event, abstime)))\n\t\t{\n\t\t  return result;\n\t\t}\n\t    }\n\t}\n    }\n  else\n    {\n      pthread_t self = pthread_self();\n\n      if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE(\n                   (PTW32_INTERLOCKED_LPLONG) &mx->lock_idx,\n\t\t   (PTW32_INTERLOCKED_LONG) 1,\n\t\t   (PTW32_INTERLOCKED_LONG) 0) == 0)\n\t{\n\t  mx->recursive_count = 1;\n\t  mx->ownerThread = self;\n\t}\n      else\n\t{\n\t  if (pthread_equal (mx->ownerThread, self))\n\t    {\n\t      if (mx->kind == PTHREAD_MUTEX_RECURSIVE)\n\t\t{\n\t\t  mx->recursive_count++;\n\t\t}\n\t      else\n\t\t{\n\t\t  return EDEADLK;\n\t\t}\n\t    }\n\t  else\n\t    {\n              while ((LONG) PTW32_INTERLOCKED_EXCHANGE(\n                              (LPLONG) &mx->lock_idx,\n\t\t\t      (LONG) -1) != 0)\n                {\n\t\t  if (0 != (result = ptw32_timed_eventwait (mx->event, abstime)))\n\t\t    {\n\t\t      return result;\n\t\t    }\n\t\t}\n\n\t      mx->recursive_count = 1;\n\t      mx->ownerThread = self;\n\t    }\n\t}\n    }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutex_trylock.c",
    "content": "/*\n * pthread_mutex_trylock.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutex_trylock (pthread_mutex_t * mutex)\n{\n  int result = 0;\n  pthread_mutex_t mx;\n\n  /*\n   * Let the system deal with invalid pointers.\n   */\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static mutex. We check\n   * again inside the guarded section of ptw32_mutex_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)\n    {\n      if ((result = ptw32_mutex_check_need_init (mutex)) != 0)\n\t{\n\t  return (result);\n\t}\n    }\n\n  mx = *mutex;\n\n  if (0 == (LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE (\n\t\t     (PTW32_INTERLOCKED_LPLONG) &mx->lock_idx,\n\t\t     (PTW32_INTERLOCKED_LONG) 1,\n\t\t     (PTW32_INTERLOCKED_LONG) 0))\n    {\n      if (mx->kind != PTHREAD_MUTEX_NORMAL)\n\t{\n\t  mx->recursive_count = 1;\n\t  mx->ownerThread = pthread_self ();\n\t}\n    }\n  else\n    {\n      if (mx->kind == PTHREAD_MUTEX_RECURSIVE &&\n\t  pthread_equal (mx->ownerThread, pthread_self ()))\n\t{\n\t  mx->recursive_count++;\n\t}\n      else\n\t{\n\t  result = EBUSY;\n\t}\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutex_unlock.c",
    "content": "/*\n * pthread_mutex_unlock.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutex_unlock (pthread_mutex_t * mutex)\n{\n  int result = 0;\n  pthread_mutex_t mx;\n\n  /*\n   * Let the system deal with invalid pointers.\n   */\n\n  mx = *mutex;\n\n  /*\n   * If the thread calling us holds the mutex then there is no\n   * race condition. If another thread holds the\n   * lock then we shouldn't be in here.\n   */\n  if (mx < PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)\n    {\n      if (mx->kind == PTHREAD_MUTEX_NORMAL)\n\t{\n\t  LONG idx;\n\n\t  idx = (LONG) PTW32_INTERLOCKED_EXCHANGE ((LPLONG) &mx->lock_idx,\n\t\t\t\t\t\t   (LONG) 0);\n\t  if (idx != 0)\n\t    {\n\t      if (idx < 0)\n\t\t{\n\t\t  /*\n\t\t   * Someone may be waiting on that mutex.\n\t\t   */\n\t\t  if (SetEvent (mx->event) == 0)\n\t\t    {\n\t\t      result = EINVAL;\n\t\t    }\n\t\t}\n\t    }\n\t  else\n\t    {\n\t      /*\n\t       * Was not locked (so can't be owned by us).\n\t       */\n\t      result = EPERM;\n\t    }\n\t}\n      else\n\t{\n\t  if (pthread_equal (mx->ownerThread, pthread_self ()))\n\t    {\n\t      if (mx->kind != PTHREAD_MUTEX_RECURSIVE\n\t\t  || 0 == --mx->recursive_count)\n\t\t{\n\t\t  mx->ownerThread.p = NULL;\n\n\t\t  if ((LONG) PTW32_INTERLOCKED_EXCHANGE ((LPLONG) &mx->lock_idx,\n\t\t\t\t\t\t\t (LONG) 0) < 0)\n\t\t    {\n\t\t      /* Someone may be waiting on that mutex */\n\t\t      if (SetEvent (mx->event) == 0)\n\t\t\t{\n\t\t\t  result = EINVAL;\n\t\t\t}\n\t\t    }\n\t\t}\n\t    }\n\t  else\n\t    {\n\t      result = EPERM;\n\t    }\n\t}\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutexattr_destroy.c",
    "content": "/*\n * pthread_mutexattr_destroy.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutexattr_destroy (pthread_mutexattr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Destroys a mutex attributes object. The object can\n      *      no longer be used.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_mutexattr_t\n      *\n      *\n      * DESCRIPTION\n      *      Destroys a mutex attributes object. The object can\n      *      no longer be used.\n      *\n      *      NOTES:\n      *              1)      Does not affect mutexes created using 'attr'\n      *\n      * RESULTS\n      *              0               successfully released attr,\n      *              EINVAL          'attr' is invalid.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n\n  if (attr == NULL || *attr == NULL)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      pthread_mutexattr_t ma = *attr;\n\n      *attr = NULL;\n      free (ma);\n    }\n\n  return (result);\n}\t\t\t\t/* pthread_mutexattr_destroy */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutexattr_getkind_np.c",
    "content": "/*\n * pthread_mutexattr_getkind_np.c\n *\n * Description:\n * This translation unit implements non-portable thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_mutexattr_getkind_np (pthread_mutexattr_t * attr, int *kind)\n{\n  return pthread_mutexattr_gettype (attr, kind);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutexattr_getpshared.c",
    "content": "/*\n * pthread_mutexattr_getpshared.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutexattr_getpshared (const pthread_mutexattr_t * attr, int *pshared)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Determine whether mutexes created with 'attr' can be\n      *      shared between processes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_mutexattr_t\n      *\n      *      pshared\n      *              will be set to one of:\n      *\n      *                      PTHREAD_PROCESS_SHARED\n      *                              May be shared if in shared memory\n      *\n      *                      PTHREAD_PROCESS_PRIVATE\n      *                              Cannot be shared.\n      *\n      *\n      * DESCRIPTION\n      *      Mutexes creatd with 'attr' can be shared between\n      *      processes if pthread_mutex_t variable is allocated\n      *      in memory shared by these processes.\n      *      NOTES:\n      *              1)      pshared mutexes MUST be allocated in shared\n      *                      memory.\n      *              2)      The following macro is defined if shared mutexes\n      *                      are supported:\n      *                              _POSIX_THREAD_PROCESS_SHARED\n      *\n      * RESULTS\n      *              0               successfully retrieved attribute,\n      *              EINVAL          'attr' is invalid,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n\n  if ((attr != NULL && *attr != NULL) && (pshared != NULL))\n    {\n      *pshared = (*attr)->pshared;\n      result = 0;\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return (result);\n\n}\t\t\t\t/* pthread_mutexattr_getpshared */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutexattr_gettype.c",
    "content": "/*\n * pthread_mutexattr_gettype.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutexattr_gettype (pthread_mutexattr_t * attr, int *kind)\n{\n  int result = 0;\n\n  if (attr != NULL && *attr != NULL && kind != NULL)\n    {\n      *kind = (*attr)->kind;\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutexattr_init.c",
    "content": "/*\n * pthread_mutexattr_init.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutexattr_init (pthread_mutexattr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Initializes a mutex attributes object with default\n      *      attributes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_mutexattr_t\n      *\n      *\n      * DESCRIPTION\n      *      Initializes a mutex attributes object with default\n      *      attributes.\n      *\n      *      NOTES:\n      *              1)      Used to define mutex types\n      *\n      * RESULTS\n      *              0               successfully initialized attr,\n      *              ENOMEM          insufficient memory for attr.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  pthread_mutexattr_t ma;\n\n  ma = (pthread_mutexattr_t) calloc (1, sizeof (*ma));\n\n  if (ma == NULL)\n    {\n      result = ENOMEM;\n    }\n  else\n    {\n      ma->pshared = PTHREAD_PROCESS_PRIVATE;\n      ma->kind = PTHREAD_MUTEX_DEFAULT;\n    }\n\n  *attr = ma;\n\n  return (result);\n}\t\t\t\t/* pthread_mutexattr_init */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutexattr_setkind_np.c",
    "content": "/*\n * pthread_mutexattr_setkind_np.c\n *\n * Description:\n * This translation unit implements non-portable thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_mutexattr_setkind_np (pthread_mutexattr_t * attr, int kind)\n{\n  return pthread_mutexattr_settype (attr, kind);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutexattr_setpshared.c",
    "content": "/*\n * pthread_mutexattr_setpshared.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutexattr_setpshared (pthread_mutexattr_t * attr, int pshared)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Mutexes created with 'attr' can be shared between\n      *      processes if pthread_mutex_t variable is allocated\n      *      in memory shared by these processes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_mutexattr_t\n      *\n      *      pshared\n      *              must be one of:\n      *\n      *                      PTHREAD_PROCESS_SHARED\n      *                              May be shared if in shared memory\n      *\n      *                      PTHREAD_PROCESS_PRIVATE\n      *                              Cannot be shared.\n      *\n      * DESCRIPTION\n      *      Mutexes creatd with 'attr' can be shared between\n      *      processes if pthread_mutex_t variable is allocated\n      *      in memory shared by these processes.\n      *\n      *      NOTES:\n      *              1)      pshared mutexes MUST be allocated in shared\n      *                      memory.\n      *\n      *              2)      The following macro is defined if shared mutexes\n      *                      are supported:\n      *                              _POSIX_THREAD_PROCESS_SHARED\n      *\n      * RESULTS\n      *              0               successfully set attribute,\n      *              EINVAL          'attr' or pshared is invalid,\n      *              ENOSYS          PTHREAD_PROCESS_SHARED not supported,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n\n  if ((attr != NULL && *attr != NULL) &&\n      ((pshared == PTHREAD_PROCESS_SHARED) ||\n       (pshared == PTHREAD_PROCESS_PRIVATE)))\n    {\n      if (pshared == PTHREAD_PROCESS_SHARED)\n\t{\n\n#if !defined( _POSIX_THREAD_PROCESS_SHARED )\n\n\t  result = ENOSYS;\n\t  pshared = PTHREAD_PROCESS_PRIVATE;\n\n#else\n\n\t  result = 0;\n\n#endif /* _POSIX_THREAD_PROCESS_SHARED */\n\n\t}\n      else\n\t{\n\t  result = 0;\n\t}\n\n      (*attr)->pshared = pshared;\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return (result);\n\n}\t\t\t\t/* pthread_mutexattr_setpshared */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_mutexattr_settype.c",
    "content": "/*\n * pthread_mutexattr_settype.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_mutexattr_settype (pthread_mutexattr_t * attr, int kind)\n     /*\n      * ------------------------------------------------------\n      *\n      * DOCPUBLIC\n      * The pthread_mutexattr_settype() and\n      * pthread_mutexattr_gettype() functions  respectively set and\n      * get the mutex type  attribute. This attribute is set in  the\n      * type parameter to these functions.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_mutexattr_t\n      *\n      *      type\n      *              must be one of:\n      *\n      *                      PTHREAD_MUTEX_DEFAULT\n      *\n      *                      PTHREAD_MUTEX_NORMAL\n      *\n      *                      PTHREAD_MUTEX_ERRORCHECK\n      *\n      *                      PTHREAD_MUTEX_RECURSIVE\n      *\n      * DESCRIPTION\n      * The pthread_mutexattr_settype() and\n      * pthread_mutexattr_gettype() functions  respectively set and\n      * get the mutex type  attribute. This attribute is set in  the\n      * type  parameter to these functions. The default value of the\n      * type  attribute is  PTHREAD_MUTEX_DEFAULT.\n      * \n      * The type of mutex is contained in the type  attribute of the\n      * mutex attributes. Valid mutex types include:\n      *\n      * PTHREAD_MUTEX_NORMAL\n      *          This type of mutex does  not  detect  deadlock.  A\n      *          thread  attempting  to  relock  this mutex without\n      *          first unlocking it will  deadlock.  Attempting  to\n      *          unlock  a  mutex  locked  by  a  different  thread\n      *          results  in  undefined  behavior.  Attempting   to\n      *          unlock  an  unlocked  mutex  results  in undefined\n      *          behavior.\n      * \n      * PTHREAD_MUTEX_ERRORCHECK\n      *          This type of  mutex  provides  error  checking.  A\n      *          thread  attempting  to  relock  this mutex without\n      *          first unlocking it will return with  an  error.  A\n      *          thread  attempting to unlock a mutex which another\n      *          thread has locked will return  with  an  error.  A\n      *          thread attempting to unlock an unlocked mutex will\n      *          return with an error.\n      *\n      * PTHREAD_MUTEX_DEFAULT\n      *          Same as PTHREAD_MUTEX_NORMAL.\n      * \n      * PTHREAD_MUTEX_RECURSIVE\n      *          A thread attempting to relock this  mutex  without\n      *          first  unlocking  it  will  succeed in locking the\n      *          mutex. The relocking deadlock which can occur with\n      *          mutexes of type  PTHREAD_MUTEX_NORMAL cannot occur\n      *          with this type of mutex. Multiple  locks  of  this\n      *          mutex  require  the  same  number  of  unlocks  to\n      *          release  the  mutex  before  another  thread   can\n      *          acquire the mutex. A thread attempting to unlock a\n      *          mutex which another thread has locked will  return\n      *          with  an  error. A thread attempting to  unlock an\n      *          unlocked mutex will return  with  an  error.  This\n      *          type  of mutex is only supported for mutexes whose\n      *          process        shared         attribute         is\n      *          PTHREAD_PROCESS_PRIVATE.\n      *\n      * RESULTS\n      *              0               successfully set attribute,\n      *              EINVAL          'attr' or 'type' is invalid,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n\n  if ((attr != NULL && *attr != NULL))\n    {\n      switch (kind)\n\t{\n\tcase PTHREAD_MUTEX_FAST_NP:\n\tcase PTHREAD_MUTEX_RECURSIVE_NP:\n\tcase PTHREAD_MUTEX_ERRORCHECK_NP:\n\t  (*attr)->kind = kind;\n\t  break;\n\tdefault:\n\t  result = EINVAL;\n\t  break;\n\t}\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return (result);\n}\t\t\t\t/* pthread_mutexattr_settype */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_num_processors_np.c",
    "content": "/*\n * pthread_num_processors_np.c\n *\n * Description:\n * This translation unit implements non-portable thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * pthread_num_processors_np()\n *\n * Get the number of CPUs available to the process.\n */\nint\npthread_num_processors_np (void)\n{\n  int count;\n\n  if (ptw32_getprocessors (&count) != 0)\n    {\n      count = 1;\n    }\n\n  return (count);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_once.c",
    "content": "/*\n * pthread_once.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nstatic void PTW32_CDECL\nptw32_once_on_init_cancel (void * arg)\n{\n  /* when the initting thread is cancelled we have to release the lock */\n  ptw32_mcs_local_node_t *node = (ptw32_mcs_local_node_t *)arg;\n  ptw32_mcs_lock_release(node);\n}\n\nint\npthread_once (pthread_once_t * once_control, void (*init_routine) (void))\n{\n  if (once_control == NULL || init_routine == NULL)\n    {\n      return EINVAL;\n    }\n  \n  if (!InterlockedExchangeAdd((LPLONG)&once_control->done, 0)) /* MBR fence */\n    {\n      ptw32_mcs_local_node_t node;\n\n      ptw32_mcs_lock_acquire((ptw32_mcs_lock_t *)&once_control->lock, &node);\n\n      if (!once_control->done)\n\t{\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n\n\t  pthread_cleanup_push(ptw32_once_on_init_cancel, (void *)&node);\n\t  (*init_routine)();\n\t  pthread_cleanup_pop(0);\n\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n\t  once_control->done = PTW32_TRUE;\n\t}\n\n\tptw32_mcs_lock_release(&node);\n    }\n\n  return 0;\n\n}\t\t\t\t/* pthread_once */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_once.x",
    "content": "/*\n * pthread_once.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nstatic void PTW32_CDECL\nptw32_once_init_routine_cleanup(void * arg)\n{\n  pthread_once_t * once_control = (pthread_once_t *) arg;\n\n  /*\n   * Continue to direct new threads into the wait path until the waiter that we\n   * release can reset state to INIT.\n   */\n  (void) PTW32_INTERLOCKED_EXCHANGE((LPLONG)&once_control->state, (LONG)PTW32_ONCE_CANCELLED);\n\n  if (InterlockedExchangeAdd((LPLONG)&once_control->semaphore, 0L)) /* MBR fence */\n    {\n      ReleaseSemaphore(once_control->semaphore, 1, NULL);\n    }\n}\n\nint\npthread_once (pthread_once_t * once_control, void (*init_routine) (void))\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      If any thread in a process  with  a  once_control  parameter\n      *      makes  a  call to pthread_once(), the first call will summon\n      *      the init_routine(), but  subsequent  calls  will  not. The\n      *      once_control  parameter  determines  whether  the associated\n      *      initialization routine has been called.  The  init_routine()\n      *      is complete upon return of pthread_once().\n      *      This function guarantees that one and only one thread\n      *      executes the initialization routine, init_routine when\n      *      access is controlled by the pthread_once_t control\n      *      key.\n      *\n      *      pthread_once() is not a cancelation point, but the init_routine\n      *      can be. If it's cancelled then the effect on the once_control is\n      *      as if pthread_once had never been entered.\n      *\n      *\n      * PARAMETERS\n      *      once_control\n      *              pointer to an instance of pthread_once_t\n      *\n      *      init_routine\n      *              pointer to an initialization routine\n      *\n      *\n      * DESCRIPTION\n      *      See above.\n      *\n      * RESULTS\n      *              0               success,\n      *              EINVAL          once_control or init_routine is NULL\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n  int state;\n  HANDLE sema;\n\n  if (once_control == NULL || init_routine == NULL)\n    {\n      result = EINVAL;\n      goto FAIL0;\n    }\n  else\n    {\n      result = 0;\n    }\n\n  while ((state = (int)\n\t  PTW32_INTERLOCKED_COMPARE_EXCHANGE((PTW32_INTERLOCKED_LPLONG)&once_control->state,\n\t\t\t\t\t     (PTW32_INTERLOCKED_LONG)PTW32_ONCE_STARTED,\n\t\t\t\t\t     (PTW32_INTERLOCKED_LONG)PTW32_ONCE_INIT))\n\t != PTW32_ONCE_DONE)\n    {\n      if (PTW32_ONCE_INIT == state)\n        {\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n\n          pthread_cleanup_push(ptw32_once_init_routine_cleanup, (void *) once_control);\n          (*init_routine)();\n          pthread_cleanup_pop(0);\n\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n          (void) PTW32_INTERLOCKED_EXCHANGE((LPLONG)&once_control->state, \n                                            (LONG)PTW32_ONCE_DONE);\n\n          /*\n           * we didn't create the semaphore.\n           * it is only there if there is someone waiting.\n           */\n          if (InterlockedExchangeAdd((LPLONG)&once_control->semaphore, 0L)) /* MBR fence */\n            {\n              ReleaseSemaphore(once_control->semaphore, \n                               once_control->numSemaphoreUsers, NULL);\n            }\n        }\n      else\n        {\n          if (1 == InterlockedIncrement((LPLONG)&once_control->numSemaphoreUsers))\n\n//          if (!InterlockedExchangeAdd((LPLONG)&once_control->semaphore, 0L)) /* MBR fence */\n            {\n              sema = CreateSemaphore(NULL, 0, INT_MAX, NULL);\n\n              if (PTW32_INTERLOCKED_COMPARE_EXCHANGE((PTW32_INTERLOCKED_LPLONG)&once_control->semaphore,\n\t\t\t\t\t\t     (PTW32_INTERLOCKED_LONG)sema,\n\t\t\t\t\t\t     (PTW32_INTERLOCKED_LONG)0))\n                {\n                  CloseHandle(sema);\n                }\n            }\n\n\t  /*\n\t   * If initter was cancelled then state is CANCELLED.\n\t   * Until state is reset to INIT, all new threads will enter the wait path.\n\t   * The woken waiter, if it exists, will also re-enter the wait path, but\n\t   * either it or a new thread will reset state = INIT here, continue around the Wait,\n\t   * and become the new initter. Any thread that is suspended in the wait path before\n\t   * this point will hit this check. Any thread suspended between this check and\n\t   * the Wait will wait on a valid semaphore, and possibly continue through it\n\t   * if the cancellation handler has incremented (released) it and there were\n\t   * no waiters.\n\t   */\n\t  (void) PTW32_INTERLOCKED_COMPARE_EXCHANGE((PTW32_INTERLOCKED_LPLONG)&once_control->state,\n\t\t\t\t\t\t    (PTW32_INTERLOCKED_LONG)PTW32_ONCE_INIT,\n\t\t\t\t\t\t    (PTW32_INTERLOCKED_LONG)PTW32_ONCE_CANCELLED);\n\n          /*\n           * Check 'state' again in case the initting thread has finished\n\t   * and left before seeing that there was a semaphore.\n\t   */\n          if (InterlockedExchangeAdd((LPLONG)&once_control->state, 0L) >= PTW32_ONCE_STARTED)\n            {\n              WaitForSingleObject(once_control->semaphore, INFINITE);\n            }\n\n          if (0 == InterlockedDecrement((LPLONG)&once_control->numSemaphoreUsers))\n            {\n              /* we were last */\n              if ((sema =\n\t\t   (HANDLE) PTW32_INTERLOCKED_EXCHANGE((LPLONG)&once_control->semaphore, (LONG)0)))\n                {\n                  CloseHandle(sema);\n                }\n            }\n        }\n    }\n\n  /*\n   * ------------\n   * Failure Code\n   * ------------\n   */\nFAIL0:\n  return (result);\n}                               /* pthread_once */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlock_destroy.c",
    "content": "/*\n * pthread_rwlock_destroy.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlock_destroy (pthread_rwlock_t * rwlock)\n{\n  pthread_rwlock_t rwl;\n  int result = 0, result1 = 0, result2 = 0;\n\n  if (rwlock == NULL || *rwlock == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (*rwlock != PTHREAD_RWLOCK_INITIALIZER)\n    {\n      rwl = *rwlock;\n\n      if (rwl->nMagic != PTW32_RWLOCK_MAGIC)\n\t{\n\t  return EINVAL;\n\t}\n\n      if ((result = pthread_mutex_lock (&(rwl->mtxExclusiveAccess))) != 0)\n\t{\n\t  return result;\n\t}\n\n      if ((result =\n\t   pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0)\n\t{\n\t  (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\t  return result;\n\t}\n\n      /*\n       * Check whether any threads own/wait for the lock (wait for ex.access);\n       * report \"BUSY\" if so.\n       */\n      if (rwl->nExclusiveAccessCount > 0\n\t  || rwl->nSharedAccessCount > rwl->nCompletedSharedAccessCount)\n\t{\n\t  result = pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted));\n\t  result1 = pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\t  result2 = EBUSY;\n\t}\n      else\n\t{\n\t  rwl->nMagic = 0;\n\n\t  if ((result =\n\t       pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted))) != 0)\n\t    {\n\t      pthread_mutex_unlock (&rwl->mtxExclusiveAccess);\n\t      return result;\n\t    }\n\n\t  if ((result =\n\t       pthread_mutex_unlock (&(rwl->mtxExclusiveAccess))) != 0)\n\t    {\n\t      return result;\n\t    }\n\n\t  *rwlock = NULL;\t/* Invalidate rwlock before anything else */\n\t  result = pthread_cond_destroy (&(rwl->cndSharedAccessCompleted));\n\t  result1 = pthread_mutex_destroy (&(rwl->mtxSharedAccessCompleted));\n\t  result2 = pthread_mutex_destroy (&(rwl->mtxExclusiveAccess));\n\t  (void) free (rwl);\n\t}\n    }\n  else\n    {\n      /*\n       * See notes in ptw32_rwlock_check_need_init() above also.\n       */\n      EnterCriticalSection (&ptw32_rwlock_test_init_lock);\n\n      /*\n       * Check again.\n       */\n      if (*rwlock == PTHREAD_RWLOCK_INITIALIZER)\n\t{\n\t  /*\n\t   * This is all we need to do to destroy a statically\n\t   * initialised rwlock that has not yet been used (initialised).\n\t   * If we get to here, another thread\n\t   * waiting to initialise this rwlock will get an EINVAL.\n\t   */\n\t  *rwlock = NULL;\n\t}\n      else\n\t{\n\t  /*\n\t   * The rwlock has been initialised while we were waiting\n\t   * so assume it's in use.\n\t   */\n\t  result = EBUSY;\n\t}\n\n      LeaveCriticalSection (&ptw32_rwlock_test_init_lock);\n    }\n\n  return ((result != 0) ? result : ((result1 != 0) ? result1 : result2));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlock_init.c",
    "content": "/*\n * pthread_rwlock_init.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlock_init (pthread_rwlock_t * rwlock,\n\t\t     const pthread_rwlockattr_t * attr)\n{\n  int result;\n  pthread_rwlock_t rwl = 0;\n\n  if (rwlock == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (attr != NULL && *attr != NULL)\n    {\n      result = EINVAL;\t\t/* Not supported */\n      goto DONE;\n    }\n\n  rwl = (pthread_rwlock_t) calloc (1, sizeof (*rwl));\n\n  if (rwl == NULL)\n    {\n      result = ENOMEM;\n      goto DONE;\n    }\n\n  rwl->nSharedAccessCount = 0;\n  rwl->nExclusiveAccessCount = 0;\n  rwl->nCompletedSharedAccessCount = 0;\n\n  result = pthread_mutex_init (&rwl->mtxExclusiveAccess, NULL);\n  if (result != 0)\n    {\n      goto FAIL0;\n    }\n\n  result = pthread_mutex_init (&rwl->mtxSharedAccessCompleted, NULL);\n  if (result != 0)\n    {\n      goto FAIL1;\n    }\n\n  result = pthread_cond_init (&rwl->cndSharedAccessCompleted, NULL);\n  if (result != 0)\n    {\n      goto FAIL2;\n    }\n\n  rwl->nMagic = PTW32_RWLOCK_MAGIC;\n\n  result = 0;\n  goto DONE;\n\nFAIL2:\n  (void) pthread_mutex_destroy (&(rwl->mtxSharedAccessCompleted));\n\nFAIL1:\n  (void) pthread_mutex_destroy (&(rwl->mtxExclusiveAccess));\n\nFAIL0:\n  (void) free (rwl);\n  rwl = NULL;\n\nDONE:\n  *rwlock = rwl;\n\n  return result;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlock_rdlock.c",
    "content": "/*\n * pthread_rwlock_rdlock.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlock_rdlock (pthread_rwlock_t * rwlock)\n{\n  int result;\n  pthread_rwlock_t rwl;\n\n  if (rwlock == NULL || *rwlock == NULL)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static rwlock. We check\n   * again inside the guarded section of ptw32_rwlock_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*rwlock == PTHREAD_RWLOCK_INITIALIZER)\n    {\n      result = ptw32_rwlock_check_need_init (rwlock);\n\n      if (result != 0 && result != EBUSY)\n\t{\n\t  return result;\n\t}\n    }\n\n  rwl = *rwlock;\n\n  if (rwl->nMagic != PTW32_RWLOCK_MAGIC)\n    {\n      return EINVAL;\n    }\n\n  if ((result = pthread_mutex_lock (&(rwl->mtxExclusiveAccess))) != 0)\n    {\n      return result;\n    }\n\n  if (++rwl->nSharedAccessCount == INT_MAX)\n    {\n      if ((result =\n\t   pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0)\n\t{\n\t  (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\t  return result;\n\t}\n\n      rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount;\n      rwl->nCompletedSharedAccessCount = 0;\n\n      if ((result =\n\t   pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted))) != 0)\n\t{\n\t  (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\t  return result;\n\t}\n    }\n\n  return (pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlock_timedrdlock.c",
    "content": "/*\n * pthread_rwlock_timedrdlock.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlock_timedrdlock (pthread_rwlock_t * rwlock,\n\t\t\t    const struct timespec *abstime)\n{\n  int result;\n  pthread_rwlock_t rwl;\n\n  if (rwlock == NULL || *rwlock == NULL)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static rwlock. We check\n   * again inside the guarded section of ptw32_rwlock_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*rwlock == PTHREAD_RWLOCK_INITIALIZER)\n    {\n      result = ptw32_rwlock_check_need_init (rwlock);\n\n      if (result != 0 && result != EBUSY)\n\t{\n\t  return result;\n\t}\n    }\n\n  rwl = *rwlock;\n\n  if (rwl->nMagic != PTW32_RWLOCK_MAGIC)\n    {\n      return EINVAL;\n    }\n\n  if ((result =\n       pthread_mutex_timedlock (&(rwl->mtxExclusiveAccess), abstime)) != 0)\n    {\n      return result;\n    }\n\n  if (++rwl->nSharedAccessCount == INT_MAX)\n    {\n      if ((result =\n\t   pthread_mutex_timedlock (&(rwl->mtxSharedAccessCompleted),\n\t\t\t\t    abstime)) != 0)\n\t{\n\t  if (result == ETIMEDOUT)\n\t    {\n\t      ++rwl->nCompletedSharedAccessCount;\n\t    }\n\t  (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\t  return result;\n\t}\n\n      rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount;\n      rwl->nCompletedSharedAccessCount = 0;\n\n      if ((result =\n\t   pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted))) != 0)\n\t{\n\t  (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\t  return result;\n\t}\n    }\n\n  return (pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlock_timedwrlock.c",
    "content": "/*\n * pthread_rwlock_timedwrlock.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlock_timedwrlock (pthread_rwlock_t * rwlock,\n\t\t\t    const struct timespec *abstime)\n{\n  int result;\n  pthread_rwlock_t rwl;\n\n  if (rwlock == NULL || *rwlock == NULL)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static rwlock. We check\n   * again inside the guarded section of ptw32_rwlock_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*rwlock == PTHREAD_RWLOCK_INITIALIZER)\n    {\n      result = ptw32_rwlock_check_need_init (rwlock);\n\n      if (result != 0 && result != EBUSY)\n\t{\n\t  return result;\n\t}\n    }\n\n  rwl = *rwlock;\n\n  if (rwl->nMagic != PTW32_RWLOCK_MAGIC)\n    {\n      return EINVAL;\n    }\n\n  if ((result =\n       pthread_mutex_timedlock (&(rwl->mtxExclusiveAccess), abstime)) != 0)\n    {\n      return result;\n    }\n\n  if ((result =\n       pthread_mutex_timedlock (&(rwl->mtxSharedAccessCompleted),\n\t\t\t\tabstime)) != 0)\n    {\n      (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n      return result;\n    }\n\n  if (rwl->nExclusiveAccessCount == 0)\n    {\n      if (rwl->nCompletedSharedAccessCount > 0)\n\t{\n\t  rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount;\n\t  rwl->nCompletedSharedAccessCount = 0;\n\t}\n\n      if (rwl->nSharedAccessCount > 0)\n\t{\n\t  rwl->nCompletedSharedAccessCount = -rwl->nSharedAccessCount;\n\n\t  /*\n\t   * This routine may be a cancelation point\n\t   * according to POSIX 1003.1j section 18.1.2.\n\t   */\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n\t  pthread_cleanup_push (ptw32_rwlock_cancelwrwait, (void *) rwl);\n\n\t  do\n\t    {\n\t      result =\n\t\tpthread_cond_timedwait (&(rwl->cndSharedAccessCompleted),\n\t\t\t\t\t&(rwl->mtxSharedAccessCompleted),\n\t\t\t\t\tabstime);\n\t    }\n\t  while (result == 0 && rwl->nCompletedSharedAccessCount < 0);\n\n\t  pthread_cleanup_pop ((result != 0) ? 1 : 0);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n\t  if (result == 0)\n\t    {\n\t      rwl->nSharedAccessCount = 0;\n\t    }\n\t}\n    }\n\n  if (result == 0)\n    {\n      rwl->nExclusiveAccessCount++;\n    }\n\n  return result;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlock_tryrdlock.c",
    "content": "/*\n * pthread_rwlock_tryrdlock.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlock_tryrdlock (pthread_rwlock_t * rwlock)\n{\n  int result;\n  pthread_rwlock_t rwl;\n\n  if (rwlock == NULL || *rwlock == NULL)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static rwlock. We check\n   * again inside the guarded section of ptw32_rwlock_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*rwlock == PTHREAD_RWLOCK_INITIALIZER)\n    {\n      result = ptw32_rwlock_check_need_init (rwlock);\n\n      if (result != 0 && result != EBUSY)\n\t{\n\t  return result;\n\t}\n    }\n\n  rwl = *rwlock;\n\n  if (rwl->nMagic != PTW32_RWLOCK_MAGIC)\n    {\n      return EINVAL;\n    }\n\n  if ((result = pthread_mutex_trylock (&(rwl->mtxExclusiveAccess))) != 0)\n    {\n      return result;\n    }\n\n  if (++rwl->nSharedAccessCount == INT_MAX)\n    {\n      if ((result =\n\t   pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0)\n\t{\n\t  (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\t  return result;\n\t}\n\n      rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount;\n      rwl->nCompletedSharedAccessCount = 0;\n\n      if ((result =\n\t   pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted))) != 0)\n\t{\n\t  (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\t  return result;\n\t}\n    }\n\n  return (pthread_mutex_unlock (&rwl->mtxExclusiveAccess));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlock_trywrlock.c",
    "content": "/*\n * pthread_rwlock_trywrlock.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlock_trywrlock (pthread_rwlock_t * rwlock)\n{\n  int result, result1;\n  pthread_rwlock_t rwl;\n\n  if (rwlock == NULL || *rwlock == NULL)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static rwlock. We check\n   * again inside the guarded section of ptw32_rwlock_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*rwlock == PTHREAD_RWLOCK_INITIALIZER)\n    {\n      result = ptw32_rwlock_check_need_init (rwlock);\n\n      if (result != 0 && result != EBUSY)\n\t{\n\t  return result;\n\t}\n    }\n\n  rwl = *rwlock;\n\n  if (rwl->nMagic != PTW32_RWLOCK_MAGIC)\n    {\n      return EINVAL;\n    }\n\n  if ((result = pthread_mutex_trylock (&(rwl->mtxExclusiveAccess))) != 0)\n    {\n      return result;\n    }\n\n  if ((result =\n       pthread_mutex_trylock (&(rwl->mtxSharedAccessCompleted))) != 0)\n    {\n      result1 = pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n      return ((result1 != 0) ? result1 : result);\n    }\n\n  if (rwl->nExclusiveAccessCount == 0)\n    {\n      if (rwl->nCompletedSharedAccessCount > 0)\n\t{\n\t  rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount;\n\t  rwl->nCompletedSharedAccessCount = 0;\n\t}\n\n      if (rwl->nSharedAccessCount > 0)\n\t{\n\t  if ((result =\n\t       pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted))) != 0)\n\t    {\n\t      (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\t      return result;\n\t    }\n\n\t  if ((result =\n\t       pthread_mutex_unlock (&(rwl->mtxExclusiveAccess))) == 0)\n\t    {\n\t      result = EBUSY;\n\t    }\n\t}\n      else\n\t{\n\t  rwl->nExclusiveAccessCount = 1;\n\t}\n    }\n  else\n    {\n      result = EBUSY;\n    }\n\n  return result;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlock_unlock.c",
    "content": "/*\n * pthread_rwlock_unlock.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlock_unlock (pthread_rwlock_t * rwlock)\n{\n  int result, result1;\n  pthread_rwlock_t rwl;\n\n  if (rwlock == NULL || *rwlock == NULL)\n    {\n      return (EINVAL);\n    }\n\n  if (*rwlock == PTHREAD_RWLOCK_INITIALIZER)\n    {\n      /*\n       * Assume any race condition here is harmless.\n       */\n      return 0;\n    }\n\n  rwl = *rwlock;\n\n  if (rwl->nMagic != PTW32_RWLOCK_MAGIC)\n    {\n      return EINVAL;\n    }\n\n  if (rwl->nExclusiveAccessCount == 0)\n    {\n      if ((result =\n\t   pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0)\n\t{\n\t  return result;\n\t}\n\n      if (++rwl->nCompletedSharedAccessCount == 0)\n\t{\n\t  result = pthread_cond_signal (&(rwl->cndSharedAccessCompleted));\n\t}\n\n      result1 = pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted));\n    }\n  else\n    {\n      rwl->nExclusiveAccessCount--;\n\n      result = pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted));\n      result1 = pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n\n    }\n\n  return ((result != 0) ? result : result1);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlock_wrlock.c",
    "content": "/*\n * pthread_rwlock_wrlock.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlock_wrlock (pthread_rwlock_t * rwlock)\n{\n  int result;\n  pthread_rwlock_t rwl;\n\n  if (rwlock == NULL || *rwlock == NULL)\n    {\n      return EINVAL;\n    }\n\n  /*\n   * We do a quick check to see if we need to do more work\n   * to initialise a static rwlock. We check\n   * again inside the guarded section of ptw32_rwlock_check_need_init()\n   * to avoid race conditions.\n   */\n  if (*rwlock == PTHREAD_RWLOCK_INITIALIZER)\n    {\n      result = ptw32_rwlock_check_need_init (rwlock);\n\n      if (result != 0 && result != EBUSY)\n\t{\n\t  return result;\n\t}\n    }\n\n  rwl = *rwlock;\n\n  if (rwl->nMagic != PTW32_RWLOCK_MAGIC)\n    {\n      return EINVAL;\n    }\n\n  if ((result = pthread_mutex_lock (&(rwl->mtxExclusiveAccess))) != 0)\n    {\n      return result;\n    }\n\n  if ((result = pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0)\n    {\n      (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n      return result;\n    }\n\n  if (rwl->nExclusiveAccessCount == 0)\n    {\n      if (rwl->nCompletedSharedAccessCount > 0)\n\t{\n\t  rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount;\n\t  rwl->nCompletedSharedAccessCount = 0;\n\t}\n\n      if (rwl->nSharedAccessCount > 0)\n\t{\n\t  rwl->nCompletedSharedAccessCount = -rwl->nSharedAccessCount;\n\n\t  /*\n\t   * This routine may be a cancelation point\n\t   * according to POSIX 1003.1j section 18.1.2.\n\t   */\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n\t  pthread_cleanup_push (ptw32_rwlock_cancelwrwait, (void *) rwl);\n\n\t  do\n\t    {\n\t      result = pthread_cond_wait (&(rwl->cndSharedAccessCompleted),\n\t\t\t\t\t  &(rwl->mtxSharedAccessCompleted));\n\t    }\n\t  while (result == 0 && rwl->nCompletedSharedAccessCount < 0);\n\n\t  pthread_cleanup_pop ((result != 0) ? 1 : 0);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n\t  if (result == 0)\n\t    {\n\t      rwl->nSharedAccessCount = 0;\n\t    }\n\t}\n    }\n\n  if (result == 0)\n    {\n      rwl->nExclusiveAccessCount++;\n    }\n\n  return result;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlockattr_destroy.c",
    "content": "/*\n * pthread_rwlockattr_destroy.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlockattr_destroy (pthread_rwlockattr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Destroys a rwlock attributes object. The object can\n      *      no longer be used.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_rwlockattr_t\n      *\n      *\n      * DESCRIPTION\n      *      Destroys a rwlock attributes object. The object can\n      *      no longer be used.\n      *\n      *      NOTES:\n      *              1)      Does not affect rwlockss created using 'attr'\n      *\n      * RESULTS\n      *              0               successfully released attr,\n      *              EINVAL          'attr' is invalid.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n\n  if (attr == NULL || *attr == NULL)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      pthread_rwlockattr_t rwa = *attr;\n\n      *attr = NULL;\n      free (rwa);\n    }\n\n  return (result);\n}\t\t\t\t/* pthread_rwlockattr_destroy */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlockattr_getpshared.c",
    "content": "/*\n * pthread_rwlockattr_getpshared.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlockattr_getpshared (const pthread_rwlockattr_t * attr,\n\t\t\t       int *pshared)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Determine whether rwlocks created with 'attr' can be\n      *      shared between processes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_rwlockattr_t\n      *\n      *      pshared\n      *              will be set to one of:\n      *\n      *                      PTHREAD_PROCESS_SHARED\n      *                              May be shared if in shared memory\n      *\n      *                      PTHREAD_PROCESS_PRIVATE\n      *                              Cannot be shared.\n      *\n      *\n      * DESCRIPTION\n      *      Rwlocks creatd with 'attr' can be shared between\n      *      processes if pthread_rwlock_t variable is allocated\n      *      in memory shared by these processes.\n      *      NOTES:\n      *              1)      pshared rwlocks MUST be allocated in shared\n      *                      memory.\n      *              2)      The following macro is defined if shared rwlocks\n      *                      are supported:\n      *                              _POSIX_THREAD_PROCESS_SHARED\n      *\n      * RESULTS\n      *              0               successfully retrieved attribute,\n      *              EINVAL          'attr' is invalid,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n\n  if ((attr != NULL && *attr != NULL) && (pshared != NULL))\n    {\n      *pshared = (*attr)->pshared;\n      result = 0;\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return (result);\n\n}\t\t\t\t/* pthread_rwlockattr_getpshared */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlockattr_init.c",
    "content": "/*\n * pthread_rwlockattr_init.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlockattr_init (pthread_rwlockattr_t * attr)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Initializes a rwlock attributes object with default\n      *      attributes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_rwlockattr_t\n      *\n      *\n      * DESCRIPTION\n      *      Initializes a rwlock attributes object with default\n      *      attributes.\n      *\n      * RESULTS\n      *              0               successfully initialized attr,\n      *              ENOMEM          insufficient memory for attr.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  pthread_rwlockattr_t rwa;\n\n  rwa = (pthread_rwlockattr_t) calloc (1, sizeof (*rwa));\n\n  if (rwa == NULL)\n    {\n      result = ENOMEM;\n    }\n  else\n    {\n      rwa->pshared = PTHREAD_PROCESS_PRIVATE;\n    }\n\n  *attr = rwa;\n\n  return (result);\n}\t\t\t\t/* pthread_rwlockattr_init */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_rwlockattr_setpshared.c",
    "content": "/*\n * pthread_rwlockattr_setpshared.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <errno.h>\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\npthread_rwlockattr_setpshared (pthread_rwlockattr_t * attr, int pshared)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Rwlocks created with 'attr' can be shared between\n      *      processes if pthread_rwlock_t variable is allocated\n      *      in memory shared by these processes.\n      *\n      * PARAMETERS\n      *      attr\n      *              pointer to an instance of pthread_rwlockattr_t\n      *\n      *      pshared\n      *              must be one of:\n      *\n      *                      PTHREAD_PROCESS_SHARED\n      *                              May be shared if in shared memory\n      *\n      *                      PTHREAD_PROCESS_PRIVATE\n      *                              Cannot be shared.\n      *\n      * DESCRIPTION\n      *      Rwlocks creatd with 'attr' can be shared between\n      *      processes if pthread_rwlock_t variable is allocated\n      *      in memory shared by these processes.\n      *\n      *      NOTES:\n      *              1)      pshared rwlocks MUST be allocated in shared\n      *                      memory.\n      *\n      *              2)      The following macro is defined if shared rwlocks\n      *                      are supported:\n      *                              _POSIX_THREAD_PROCESS_SHARED\n      *\n      * RESULTS\n      *              0               successfully set attribute,\n      *              EINVAL          'attr' or pshared is invalid,\n      *              ENOSYS          PTHREAD_PROCESS_SHARED not supported,\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result;\n\n  if ((attr != NULL && *attr != NULL) &&\n      ((pshared == PTHREAD_PROCESS_SHARED) ||\n       (pshared == PTHREAD_PROCESS_PRIVATE)))\n    {\n      if (pshared == PTHREAD_PROCESS_SHARED)\n\t{\n\n#if !defined( _POSIX_THREAD_PROCESS_SHARED )\n\n\t  result = ENOSYS;\n\t  pshared = PTHREAD_PROCESS_PRIVATE;\n\n#else\n\n\t  result = 0;\n\n#endif /* _POSIX_THREAD_PROCESS_SHARED */\n\n\t}\n      else\n\t{\n\t  result = 0;\n\t}\n\n      (*attr)->pshared = pshared;\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return (result);\n\n}\t\t\t\t/* pthread_rwlockattr_setpshared */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_self.c",
    "content": "/*\n * pthread_self.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\npthread_t\npthread_self (void)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function returns a reference to the current running\n      *      thread.\n      *\n      * PARAMETERS\n      *      N/A\n      *\n      *\n      * DESCRIPTION\n      *      This function returns a reference to the current running\n      *      thread.\n      *\n      * RESULTS\n      *              pthread_t       reference to the current thread\n      *\n      * ------------------------------------------------------\n      */\n{\n  pthread_t self;\n  pthread_t nil = {NULL, 0};\n  ptw32_thread_t * sp;\n\n#ifdef _UWIN\n  if (!ptw32_selfThreadKey)\n    return nil;\n#endif\n\n  sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey);\n\n  if (sp != NULL)\n    {\n      self = sp->ptHandle;\n    }\n  else\n    {\n      /*\n       * Need to create an implicit 'self' for the currently\n       * executing thread.\n       */\n      self = ptw32_new ();\n      sp = (ptw32_thread_t *) self.p;\n\n      if (sp != NULL)\n\t{\n\t  /*\n\t   * This is a non-POSIX thread which has chosen to call\n\t   * a POSIX threads function for some reason. We assume that\n\t   * it isn't joinable, but we do assume that it's\n\t   * (deferred) cancelable.\n\t   */\n\t  sp->implicit = 1;\n\t  sp->detachState = PTHREAD_CREATE_DETACHED;\n\t  sp->thread = GetCurrentThreadId ();\n\n#ifdef NEED_DUPLICATEHANDLE\n\t  /*\n\t   * DuplicateHandle does not exist on WinCE.\n\t   *\n\t   * NOTE:\n\t   * GetCurrentThread only returns a pseudo-handle\n\t   * which is only valid in the current thread context.\n\t   * Therefore, you should not pass the handle to\n\t   * other threads for whatever purpose.\n\t   */\n\t  sp->threadH = GetCurrentThread ();\n#else\n\t  if (!DuplicateHandle (GetCurrentProcess (),\n\t\t\t\tGetCurrentThread (),\n\t\t\t\tGetCurrentProcess (),\n\t\t\t\t&sp->threadH,\n\t\t\t\t0, FALSE, DUPLICATE_SAME_ACCESS))\n\t    {\n\t      /*\n\t       * Should not do this, but we have no alternative if\n\t       * we can't get a Win32 thread handle.\n\t       * Thread structs are never freed.\n\t       */\n\t      ptw32_threadReusePush (self);\n\t      return nil;\n\t    }\n#endif\n\n\t  /*\n\t   * No need to explicitly serialise access to sched_priority\n\t   * because the new handle is not yet public.\n\t   */\n\t  sp->sched_priority = GetThreadPriority (sp->threadH);\n\n          pthread_setspecific (ptw32_selfThreadKey, (void *) sp);\n\t}\n    }\n\n  return (self);\n\n}\t\t\t\t/* pthread_self */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_setcancelstate.c",
    "content": "/*\n * pthread_setcancelstate.c\n *\n * Description:\n * POSIX thread functions related to thread cancellation.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_setcancelstate (int state, int *oldstate)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function atomically sets the calling thread's\n      *      cancelability state to 'state' and returns the previous\n      *      cancelability state at the location referenced by\n      *      'oldstate'\n      *\n      * PARAMETERS\n      *      state,\n      *      oldstate\n      *              PTHREAD_CANCEL_ENABLE\n      *                      cancellation is enabled,\n      *\n      *              PTHREAD_CANCEL_DISABLE\n      *                      cancellation is disabled\n      *\n      *\n      * DESCRIPTION\n      *      This function atomically sets the calling thread's\n      *      cancelability state to 'state' and returns the previous\n      *      cancelability state at the location referenced by\n      *      'oldstate'.\n      *\n      *      NOTES:\n      *      1)      Use to disable cancellation around 'atomic' code that\n      *              includes cancellation points\n      *\n      * COMPATIBILITY ADDITIONS\n      *      If 'oldstate' is NULL then the previous state is not returned\n      *      but the function still succeeds. (Solaris)\n      *\n      * RESULTS\n      *              0               successfully set cancelability type,\n      *              EINVAL          'state' is invalid\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  pthread_t self = pthread_self ();\n  ptw32_thread_t * sp = (ptw32_thread_t *) self.p;\n\n  if (sp == NULL\n      || (state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE))\n    {\n      return EINVAL;\n    }\n\n  /*\n   * Lock for async-cancel safety.\n   */\n  (void) pthread_mutex_lock (&sp->cancelLock);\n\n  if (oldstate != NULL)\n    {\n      *oldstate = sp->cancelState;\n    }\n\n  sp->cancelState = state;\n\n  /*\n   * Check if there is a pending asynchronous cancel\n   */\n  if (state == PTHREAD_CANCEL_ENABLE\n      && sp->cancelType == PTHREAD_CANCEL_ASYNCHRONOUS\n      && WaitForSingleObject (sp->cancelEvent, 0) == WAIT_OBJECT_0)\n    {\n      sp->state = PThreadStateCanceling;\n      sp->cancelState = PTHREAD_CANCEL_DISABLE;\n      ResetEvent (sp->cancelEvent);\n      (void) pthread_mutex_unlock (&sp->cancelLock);\n      ptw32_throw (PTW32_EPS_CANCEL);\n\n      /* Never reached */\n    }\n\n  (void) pthread_mutex_unlock (&sp->cancelLock);\n\n  return (result);\n\n}\t\t\t\t/* pthread_setcancelstate */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_setcanceltype.c",
    "content": "/*\n * pthread_setcanceltype.c\n *\n * Description:\n * POSIX thread functions related to thread cancellation.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_setcanceltype (int type, int *oldtype)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function atomically sets the calling thread's\n      *      cancelability type to 'type' and returns the previous\n      *      cancelability type at the location referenced by\n      *      'oldtype'\n      *\n      * PARAMETERS\n      *      type,\n      *      oldtype\n      *              PTHREAD_CANCEL_DEFERRED\n      *                      only deferred cancelation is allowed,\n      *\n      *              PTHREAD_CANCEL_ASYNCHRONOUS\n      *                      Asynchronous cancellation is allowed\n      *\n      *\n      * DESCRIPTION\n      *      This function atomically sets the calling thread's\n      *      cancelability type to 'type' and returns the previous\n      *      cancelability type at the location referenced by\n      *      'oldtype'\n      *\n      *      NOTES:\n      *      1)      Use with caution; most code is not safe for use\n      *              with asynchronous cancelability.\n      *\n      * COMPATIBILITY ADDITIONS\n      *      If 'oldtype' is NULL then the previous type is not returned\n      *      but the function still succeeds. (Solaris)\n      *\n      * RESULTS\n      *              0               successfully set cancelability type,\n      *              EINVAL          'type' is invalid\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  pthread_t self = pthread_self ();\n  ptw32_thread_t * sp = (ptw32_thread_t *) self.p;\n\n  if (sp == NULL\n      || (type != PTHREAD_CANCEL_DEFERRED\n\t  && type != PTHREAD_CANCEL_ASYNCHRONOUS))\n    {\n      return EINVAL;\n    }\n\n  /*\n   * Lock for async-cancel safety.\n   */\n  (void) pthread_mutex_lock (&sp->cancelLock);\n\n  if (oldtype != NULL)\n    {\n      *oldtype = sp->cancelType;\n    }\n\n  sp->cancelType = type;\n\n  /*\n   * Check if there is a pending asynchronous cancel\n   */\n  if (sp->cancelState == PTHREAD_CANCEL_ENABLE\n      && type == PTHREAD_CANCEL_ASYNCHRONOUS\n      && WaitForSingleObject (sp->cancelEvent, 0) == WAIT_OBJECT_0)\n    {\n      sp->state = PThreadStateCanceling;\n      sp->cancelState = PTHREAD_CANCEL_DISABLE;\n      ResetEvent (sp->cancelEvent);\n      (void) pthread_mutex_unlock (&sp->cancelLock);\n      ptw32_throw (PTW32_EPS_CANCEL);\n\n      /* Never reached */\n    }\n\n  (void) pthread_mutex_unlock (&sp->cancelLock);\n\n  return (result);\n\n}\t\t\t\t/* pthread_setcanceltype */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_setconcurrency.c",
    "content": "/*\n * pthread_setconcurrency.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_setconcurrency (int level)\n{\n  if (level < 0)\n    {\n      return EINVAL;\n    }\n  else\n    {\n      ptw32_concurrency = level;\n      return 0;\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_setschedparam.c",
    "content": "/*\n * sched_setschedparam.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\npthread_setschedparam (pthread_t thread, int policy,\n\t\t       const struct sched_param *param)\n{\n  int result;\n\n  /* Validate the thread id. */\n  result = pthread_kill (thread, 0);\n  if (0 != result)\n    {\n      return result;\n    }\n\n  /* Validate the scheduling policy. */\n  if (policy < SCHED_MIN || policy > SCHED_MAX)\n    {\n      return EINVAL;\n    }\n\n  /* Ensure the policy is SCHED_OTHER. */\n  if (policy != SCHED_OTHER)\n    {\n      return ENOTSUP;\n    }\n\n  return (ptw32_setthreadpriority (thread, policy, param->sched_priority));\n}\n\n\nint\nptw32_setthreadpriority (pthread_t thread, int policy, int priority)\n{\n  int prio;\n  int result;\n  ptw32_thread_t * tp = (ptw32_thread_t *) thread.p;\n\n  prio = priority;\n\n  /* Validate priority level. */\n  if (prio < sched_get_priority_min (policy) ||\n      prio > sched_get_priority_max (policy))\n    {\n      return EINVAL;\n    }\n\n#if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL)\n/* WinCE */\n#else\n/* Everything else */\n\n  if (THREAD_PRIORITY_IDLE < prio && THREAD_PRIORITY_LOWEST > prio)\n    {\n      prio = THREAD_PRIORITY_LOWEST;\n    }\n  else if (THREAD_PRIORITY_TIME_CRITICAL > prio\n\t   && THREAD_PRIORITY_HIGHEST < prio)\n    {\n      prio = THREAD_PRIORITY_HIGHEST;\n    }\n\n#endif\n\n  result = pthread_mutex_lock (&tp->threadLock);\n\n  if (0 == result)\n    {\n      /* If this fails, the current priority is unchanged. */\n      if (0 == SetThreadPriority (tp->threadH, prio))\n\t{\n\t  result = EINVAL;\n\t}\n      else\n\t{\n\t  /*\n\t   * Must record the thread's sched_priority as given,\n\t   * not as finally adjusted.\n\t   */\n\t  tp->sched_priority = priority;\n\t}\n\n      (void) pthread_mutex_unlock (&tp->threadLock);\n    }\n\n  return result;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_setspecific.c",
    "content": "/*\n * pthread_setspecific.c\n *\n * Description:\n * POSIX thread functions which implement thread-specific data (TSD).\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_setspecific (pthread_key_t key, const void *value)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function sets the value of the thread specific\n      *      key in the calling thread.\n      *\n      * PARAMETERS\n      *      key\n      *              an instance of pthread_key_t\n      *      value\n      *              the value to set key to\n      *\n      *\n      * DESCRIPTION\n      *      This function sets the value of the thread specific\n      *      key in the calling thread.\n      *\n      * RESULTS\n      *              0               successfully set value\n      *              EAGAIN          could not set value\n      *              ENOENT          SERIOUS!!\n      *\n      * ------------------------------------------------------\n      */\n{\n  pthread_t self;\n  int result = 0;\n\n  if (key != ptw32_selfThreadKey)\n    {\n      /*\n       * Using pthread_self will implicitly create\n       * an instance of pthread_t for the current\n       * thread if one wasn't explicitly created\n       */\n      self = pthread_self ();\n      if (self.p == NULL)\n\t{\n\t  return ENOENT;\n\t}\n    }\n  else\n    {\n      /*\n       * Resolve catch-22 of registering thread with selfThread\n       * key\n       */\n      ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey);\n\n      if (sp == NULL)\n        {\n\t  if (value == NULL)\n\t    {\n\t      return ENOENT;\n\t    }\n          self = *((pthread_t *) value);\n        }\n      else\n        {\n\t  self = sp->ptHandle;\n        }\n    }\n\n  result = 0;\n\n  if (key != NULL)\n    {\n      if (self.p != NULL && key->destructor != NULL && value != NULL)\n\t{\n\t  /*\n\t   * Only require associations if we have to\n\t   * call user destroy routine.\n\t   * Don't need to locate an existing association\n\t   * when setting data to NULL for WIN32 since the\n\t   * data is stored with the operating system; not\n\t   * on the association; setting assoc to NULL short\n\t   * circuits the search.\n\t   */\n\t  ThreadKeyAssoc *assoc;\n\n\t  if (pthread_mutex_lock(&(key->keyLock)) == 0)\n\t    {\n\t      ptw32_thread_t * sp = (ptw32_thread_t *) self.p;\n\n\t      (void) pthread_mutex_lock(&(sp->threadLock));\n\n\t      assoc = (ThreadKeyAssoc *) sp->keys;\n\t      /*\n\t       * Locate existing association\n\t       */\n\t      while (assoc != NULL)\n\t\t{\n\t\t  if (assoc->key == key)\n\t\t    {\n\t\t      /*\n\t\t       * Association already exists\n\t\t       */\n\t\t      break;\n\t\t    }\n\t\t  assoc = assoc->nextKey;\n\t\t}\n\n\t      /*\n\t       * create an association if not found\n\t       */\n\t      if (assoc == NULL)\n\t\t{\n\t\t  result = ptw32_tkAssocCreate (sp, key);\n\t\t}\n\n\t      (void) pthread_mutex_unlock(&(sp->threadLock));\n\t    }\n\t  (void) pthread_mutex_unlock(&(key->keyLock));\n\t}\n\n\tif (result == 0)\n\t  {\n\t    if (!TlsSetValue (key->key, (LPVOID) value))\n\t      {\n\t\tresult = EAGAIN;\n\t      }\n\t  }\n    }\n\n  return (result);\n}\t\t\t\t/* pthread_setspecific */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_spin_destroy.c",
    "content": "/*\n * pthread_spin_destroy.c\n *\n * Description:\n * This translation unit implements spin lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_spin_destroy (pthread_spinlock_t * lock)\n{\n  register pthread_spinlock_t s;\n  int result = 0;\n\n  if (lock == NULL || *lock == NULL)\n    {\n      return EINVAL;\n    }\n\n  if ((s = *lock) != PTHREAD_SPINLOCK_INITIALIZER)\n    {\n      if (s->interlock == PTW32_SPIN_USE_MUTEX)\n\t{\n\t  result = pthread_mutex_destroy (&(s->u.mutex));\n\t}\n      else if ((PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED !=\n\t       PTW32_INTERLOCKED_COMPARE_EXCHANGE ((PTW32_INTERLOCKED_LPLONG)\n\t\t\t\t\t\t   & (s->interlock),\n\t\t\t\t\t\t   (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t\t   PTW32_OBJECT_INVALID,\n\t\t\t\t\t\t   (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t\t   PTW32_SPIN_UNLOCKED))\n\t{\n\t  result = EINVAL;\n\t}\n\n      if (0 == result)\n\t{\n\t  /*\n\t   * We are relying on the application to ensure that all other threads\n\t   * have finished with the spinlock before destroying it.\n\t   */\n\t  *lock = NULL;\n\t  (void) free (s);\n\t}\n    }\n  else\n    {\n      /*\n       * See notes in ptw32_spinlock_check_need_init() above also.\n       */\n      EnterCriticalSection (&ptw32_spinlock_test_init_lock);\n\n      /*\n       * Check again.\n       */\n      if (*lock == PTHREAD_SPINLOCK_INITIALIZER)\n\t{\n\t  /*\n\t   * This is all we need to do to destroy a statically\n\t   * initialised spinlock that has not yet been used (initialised).\n\t   * If we get to here, another thread\n\t   * waiting to initialise this mutex will get an EINVAL.\n\t   */\n\t  *lock = NULL;\n\t}\n      else\n\t{\n\t  /*\n\t   * The spinlock has been initialised while we were waiting\n\t   * so assume it's in use.\n\t   */\n\t  result = EBUSY;\n\t}\n\n      LeaveCriticalSection (&ptw32_spinlock_test_init_lock);\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_spin_init.c",
    "content": "/*\n * pthread_spin_init.c\n *\n * Description:\n * This translation unit implements spin lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_spin_init (pthread_spinlock_t * lock, int pshared)\n{\n  pthread_spinlock_t s;\n  int cpus = 0;\n  int result = 0;\n\n  if (lock == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (0 != ptw32_getprocessors (&cpus))\n    {\n      cpus = 1;\n    }\n\n  if (cpus > 1)\n    {\n      if (pshared == PTHREAD_PROCESS_SHARED)\n\t{\n\t  /*\n\t   * Creating spinlock that can be shared between\n\t   * processes.\n\t   */\n#if _POSIX_THREAD_PROCESS_SHARED >= 0\n\n\t  /*\n\t   * Not implemented yet.\n\t   */\n\n#error ERROR [__FILE__, line __LINE__]: Process shared spin locks are not supported yet.\n\n#else\n\n\t  return ENOSYS;\n\n#endif /* _POSIX_THREAD_PROCESS_SHARED */\n\n\t}\n    }\n\n  s = (pthread_spinlock_t) calloc (1, sizeof (*s));\n\n  if (s == NULL)\n    {\n      return ENOMEM;\n    }\n\n  if (cpus > 1)\n    {\n      s->u.cpus = cpus;\n      s->interlock = PTW32_SPIN_UNLOCKED;\n    }\n  else\n    {\n      pthread_mutexattr_t ma;\n      result = pthread_mutexattr_init (&ma);\n\n      if (0 == result)\n\t{\n\t  ma->pshared = pshared;\n\t  result = pthread_mutex_init (&(s->u.mutex), &ma);\n\t  if (0 == result)\n\t    {\n\t      s->interlock = PTW32_SPIN_USE_MUTEX;\n\t    }\n\t}\n      (void) pthread_mutexattr_destroy (&ma);\n    }\n\n  if (0 == result)\n    {\n      *lock = s;\n    }\n  else\n    {\n      (void) free (s);\n      *lock = NULL;\n    }\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_spin_lock.c",
    "content": "/*\n * pthread_spin_lock.c\n *\n * Description:\n * This translation unit implements spin lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_spin_lock (pthread_spinlock_t * lock)\n{\n  register pthread_spinlock_t s;\n\n  if (NULL == lock || NULL == *lock)\n    {\n      return (EINVAL);\n    }\n\n  if (*lock == PTHREAD_SPINLOCK_INITIALIZER)\n    {\n      int result;\n\n      if ((result = ptw32_spinlock_check_need_init (lock)) != 0)\n\t{\n\t  return (result);\n\t}\n    }\n\n  s = *lock;\n\n  while ((PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED ==\n\t PTW32_INTERLOCKED_COMPARE_EXCHANGE ((PTW32_INTERLOCKED_LPLONG) &\n\t\t\t\t\t     (s->interlock),\n\t\t\t\t\t     (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t     PTW32_SPIN_LOCKED,\n\t\t\t\t\t     (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t     PTW32_SPIN_UNLOCKED))\n    {\n    }\n\n  if (s->interlock == PTW32_SPIN_LOCKED)\n    {\n      return 0;\n    }\n  else if (s->interlock == PTW32_SPIN_USE_MUTEX)\n    {\n      return pthread_mutex_lock (&(s->u.mutex));\n    }\n\n  return EINVAL;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_spin_trylock.c",
    "content": "/*\n * pthread_spin_trylock.c\n *\n * Description:\n * This translation unit implements spin lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_spin_trylock (pthread_spinlock_t * lock)\n{\n  register pthread_spinlock_t s;\n\n  if (NULL == lock || NULL == *lock)\n    {\n      return (EINVAL);\n    }\n\n  if (*lock == PTHREAD_SPINLOCK_INITIALIZER)\n    {\n      int result;\n\n      if ((result = ptw32_spinlock_check_need_init (lock)) != 0)\n\t{\n\t  return (result);\n\t}\n    }\n\n  s = *lock;\n\n  switch ((long)\n\t  PTW32_INTERLOCKED_COMPARE_EXCHANGE ((PTW32_INTERLOCKED_LPLONG) &\n\t\t\t\t\t      (s->interlock),\n\t\t\t\t\t      (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t      PTW32_SPIN_LOCKED,\n\t\t\t\t\t      (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t      PTW32_SPIN_UNLOCKED))\n    {\n    case PTW32_SPIN_UNLOCKED:\n      return 0;\n    case PTW32_SPIN_LOCKED:\n      return EBUSY;\n    case PTW32_SPIN_USE_MUTEX:\n      return pthread_mutex_trylock (&(s->u.mutex));\n    }\n\n  return EINVAL;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_spin_unlock.c",
    "content": "/*\n * pthread_spin_unlock.c\n *\n * Description:\n * This translation unit implements spin lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\npthread_spin_unlock (pthread_spinlock_t * lock)\n{\n  register pthread_spinlock_t s;\n\n  if (NULL == lock || NULL == *lock)\n    {\n      return (EINVAL);\n    }\n\n  s = *lock;\n\n  if (s == PTHREAD_SPINLOCK_INITIALIZER)\n    {\n      return EPERM;\n    }\n\n  switch ((long)\n\t  PTW32_INTERLOCKED_COMPARE_EXCHANGE ((PTW32_INTERLOCKED_LPLONG) &\n\t\t\t\t\t      (s->interlock),\n\t\t\t\t\t      (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t      PTW32_SPIN_UNLOCKED,\n\t\t\t\t\t      (PTW32_INTERLOCKED_LONG)\n\t\t\t\t\t      PTW32_SPIN_LOCKED))\n    {\n    case PTW32_SPIN_LOCKED:\n      return 0;\n    case PTW32_SPIN_UNLOCKED:\n      return EPERM;\n    case PTW32_SPIN_USE_MUTEX:\n      return pthread_mutex_unlock (&(s->u.mutex));\n    }\n\n  return EINVAL;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_testcancel.c",
    "content": "/*\n * pthread_testcancel.c\n *\n * Description:\n * POSIX thread functions related to thread cancellation.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nvoid\npthread_testcancel (void)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function creates a deferred cancellation point\n      *      in the calling thread. The call has no effect if the\n      *      current cancelability state is\n      *              PTHREAD_CANCEL_DISABLE\n      *\n      * PARAMETERS\n      *      N/A\n      *\n      *\n      * DESCRIPTION\n      *      This function creates a deferred cancellation point\n      *      in the calling thread. The call has no effect if the\n      *      current cancelability state is\n      *              PTHREAD_CANCEL_DISABLE\n      *\n      *      NOTES:\n      *      1)      Cancellation is asynchronous. Use pthread_join\n      *              to wait for termination of thread if necessary\n      *\n      * RESULTS\n      *              N/A\n      *\n      * ------------------------------------------------------\n      */\n{\n  pthread_t self = pthread_self ();\n  ptw32_thread_t * sp = (ptw32_thread_t *) self.p;\n\n  if (sp == NULL)\n    {\n      return;\n    }\n\n  /*\n   * Pthread_cancel() will have set sp->state to PThreadStateCancelPending\n   * and set an event, so no need to enter kernel space if\n   * sp->state != PThreadStateCancelPending - that only slows us down.\n   */\n  if (sp->state != PThreadStateCancelPending)\n    {\n      return;\n    }\n\n  (void) pthread_mutex_lock (&sp->cancelLock);\n\n  if (sp->cancelState != PTHREAD_CANCEL_DISABLE)\n    {\n      ResetEvent(sp->cancelEvent);\n      sp->state = PThreadStateCanceling;\n      (void) pthread_mutex_unlock (&sp->cancelLock);\n      sp->cancelState = PTHREAD_CANCEL_DISABLE;\n      (void) pthread_mutex_unlock (&sp->cancelLock);\n      ptw32_throw (PTW32_EPS_CANCEL);\n    }\n\n  (void) pthread_mutex_unlock (&sp->cancelLock);\n}\t\t\t\t/* pthread_testcancel */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_timechange_handler_np.c",
    "content": "/*\n * pthread_timechange_handler_np.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * Notes on handling system time adjustments (especially negative ones).\n * ---------------------------------------------------------------------\n *\n * This solution was suggested by Alexander Terekhov, but any errors\n * in the implementation are mine - [Ross Johnson]\n *\n * 1) The problem: threads doing a timedwait on a CV may expect to timeout\n *    at a specific absolute time according to a system timer. If the\n *    system clock is adjusted backwards then those threads sleep longer than\n *    expected. Also, pthreads-win32 converts absolute times to intervals in\n *    order to make use of the underlying Win32, and so waiting threads may\n *    awake before their proper abstimes.\n *\n * 2) We aren't able to distinquish between threads on timed or untimed waits,\n *    so we wake them all at the time of the adjustment so that they can\n *    re-evaluate their conditions and re-compute their timeouts.\n *\n * 3) We rely on correctly written applications for this to work. Specifically,\n *    they must be able to deal properly with spurious wakeups. That is,\n *    they must re-test their condition upon wakeup and wait again if\n *    the condition is not satisfied.\n */\n\nvoid *\npthread_timechange_handler_np (void *arg)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      Broadcasts all CVs to force re-evaluation and\n      *      new timeouts if required.\n      *\n      * PARAMETERS\n      *      NONE\n      *\n      *\n      * DESCRIPTION\n      *      Broadcasts all CVs to force re-evaluation and\n      *      new timeouts if required.\n      *\n      *      This routine may be passed directly to pthread_create()\n      *      as a new thread in order to run asynchronously.\n      *\n      *\n      * RESULTS\n      *              0               successfully broadcast all CVs\n      *              EAGAIN          Not all CVs were broadcast\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  pthread_cond_t cv;\n\n  EnterCriticalSection (&ptw32_cond_list_lock);\n\n  cv = ptw32_cond_list_head;\n\n  while (cv != NULL && 0 == result)\n    {\n      result = pthread_cond_broadcast (&cv);\n      cv = cv->next;\n    }\n\n  LeaveCriticalSection (&ptw32_cond_list_lock);\n\n  return (void *) (result != 0 ? EAGAIN : 0);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/pthread_win32_attach_detach_np.c",
    "content": "/*\n * pthread_win32_attach_detach_np.c\n *\n * Description:\n * This translation unit implements non-portable thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * Handle to kernel32.dll \n */\nstatic HINSTANCE ptw32_h_kernel32;\n\n/*\n * Handle to quserex.dll \n */\nstatic HINSTANCE ptw32_h_quserex;\n\nBOOL\npthread_win32_process_attach_np ()\n{\n  BOOL result = TRUE;\n  DWORD_PTR vProcessCPUs;\n  DWORD_PTR vSystemCPUs;\n\n  result = ptw32_processInitialize ();\n\n#ifdef _UWIN\n  pthread_count++;\n#endif\n\n  ptw32_features = 0;\n\n\n#if defined(NEED_PROCESS_AFFINITY_MASK)\n\n  ptw32_smp_system = PTW32_FALSE;\n\n#else\n\n  if (GetProcessAffinityMask (GetCurrentProcess (),\n\t\t\t      &vProcessCPUs, &vSystemCPUs))\n    {\n      int CPUs = 0;\n      DWORD_PTR bit;\n\n      for (bit = 1; bit != 0; bit <<= 1)\n\t{\n\t  if (vSystemCPUs & bit)\n\t    {\n\t      CPUs++;\n\t    }\n\t}\n      ptw32_smp_system = (CPUs > 1);\n    }\n  else\n    {\n      ptw32_smp_system = PTW32_FALSE;\n    }\n\n#endif\n\n#ifdef WINCE\n\n  /*\n   * Load COREDLL and try to get address of InterlockedCompareExchange\n   */\n  ptw32_h_kernel32 = LoadLibrary (TEXT (\"COREDLL.DLL\"));\n\n#else\n\n  /*\n   * Load KERNEL32 and try to get address of InterlockedCompareExchange\n   */\n  ptw32_h_kernel32 = LoadLibrary (TEXT (\"KERNEL32.DLL\"));\n\n#endif\n\n  ptw32_interlocked_compare_exchange =\n    (PTW32_INTERLOCKED_LONG (WINAPI *)\n     (PTW32_INTERLOCKED_LPLONG, PTW32_INTERLOCKED_LONG,\n      PTW32_INTERLOCKED_LONG))\n#if defined(NEED_UNICODE_CONSTS)\n    GetProcAddress (ptw32_h_kernel32,\n\t\t    (const TCHAR *) TEXT (\"InterlockedCompareExchange\"));\n#else\n    GetProcAddress (ptw32_h_kernel32, (LPCSTR) \"InterlockedCompareExchange\");\n#endif\n\n  if (ptw32_interlocked_compare_exchange == NULL)\n    {\n      ptw32_interlocked_compare_exchange = ptw32_InterlockedCompareExchange;\n\n      /*\n       * If InterlockedCompareExchange is not being used, then free\n       * the kernel32.dll handle now, rather than leaving it until\n       * DLL_PROCESS_DETACH.\n       *\n       * Note: this is not a pedantic exercise in freeing unused\n       * resources!  It is a work-around for a bug in Windows 95\n       * (see microsoft knowledge base article, Q187684) which\n       * does Bad Things when FreeLibrary is called within\n       * the DLL_PROCESS_DETACH code, in certain situations.\n       * Since w95 just happens to be a platform which does not\n       * provide InterlockedCompareExchange, the bug will be\n       * effortlessly avoided.\n       */\n      (void) FreeLibrary (ptw32_h_kernel32);\n      ptw32_h_kernel32 = 0;\n    }\n  else\n    {\n      ptw32_features |= PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE;\n    }\n\n  /*\n   * Load QUSEREX.DLL and try to get address of QueueUserAPCEx\n   */\n  ptw32_h_quserex = LoadLibrary (TEXT (\"QUSEREX.DLL\"));\n\n  if (ptw32_h_quserex != NULL)\n    {\n      ptw32_register_cancelation = (DWORD (*)(PAPCFUNC, HANDLE, DWORD))\n#if defined(NEED_UNICODE_CONSTS)\n\tGetProcAddress (ptw32_h_quserex,\n\t\t\t(const TCHAR *) TEXT (\"QueueUserAPCEx\"));\n#else\n\tGetProcAddress (ptw32_h_quserex, (LPCSTR) \"QueueUserAPCEx\");\n#endif\n    }\n\n  if (NULL == ptw32_register_cancelation)\n    {\n      ptw32_register_cancelation = ptw32_RegisterCancelation;\n\n      if (ptw32_h_quserex != NULL)\n\t{\n\t  (void) FreeLibrary (ptw32_h_quserex);\n\t}\n      ptw32_h_quserex = 0;\n    }\n  else\n    {\n      /* Initialise QueueUserAPCEx */\n      BOOL (*queue_user_apc_ex_init) (VOID);\n\n      queue_user_apc_ex_init = (BOOL (*)(VOID))\n#if defined(NEED_UNICODE_CONSTS)\n\tGetProcAddress (ptw32_h_quserex,\n\t\t\t(const TCHAR *) TEXT (\"QueueUserAPCEx_Init\"));\n#else\n\tGetProcAddress (ptw32_h_quserex, (LPCSTR) \"QueueUserAPCEx_Init\");\n#endif\n\n      if (queue_user_apc_ex_init == NULL || !queue_user_apc_ex_init ())\n\t{\n\t  ptw32_register_cancelation = ptw32_RegisterCancelation;\n\n\t  (void) FreeLibrary (ptw32_h_quserex);\n\t  ptw32_h_quserex = 0;\n\t}\n    }\n\n  if (ptw32_h_quserex)\n    {\n      ptw32_features |= PTW32_ALERTABLE_ASYNC_CANCEL;\n    }\n\n  return result;\n}\n\n\nBOOL\npthread_win32_process_detach_np ()\n{\n  if (ptw32_processInitialized)\n    {\n      ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey);\n\n      if (sp != NULL)\n\t{\n\t  /*\n\t   * Detached threads have their resources automatically\n\t   * cleaned up upon exit (others must be 'joined').\n\t   */\n\t  if (sp->detachState == PTHREAD_CREATE_DETACHED)\n\t    {\n\t      ptw32_threadDestroy (sp->ptHandle);\n\t      TlsSetValue (ptw32_selfThreadKey->key, NULL);\n\t    }\n\t}\n\n      /*\n       * The DLL is being unmapped from the process's address space\n       */\n      ptw32_processTerminate ();\n\n      if (ptw32_h_quserex)\n\t{\n\t  /* Close QueueUserAPCEx */\n\t  BOOL (*queue_user_apc_ex_fini) (VOID);\n\n\t  queue_user_apc_ex_fini = (BOOL (*)(VOID))\n#if defined(NEED_UNICODE_CONSTS)\n\t    GetProcAddress (ptw32_h_quserex,\n\t\t\t    (const TCHAR *) TEXT (\"QueueUserAPCEx_Fini\"));\n#else\n\t    GetProcAddress (ptw32_h_quserex, (LPCSTR) \"QueueUserAPCEx_Fini\");\n#endif\n\n\t  if (queue_user_apc_ex_fini != NULL)\n\t    {\n\t      (void) queue_user_apc_ex_fini ();\n\t    }\n\t  (void) FreeLibrary (ptw32_h_quserex);\n\t}\n\n      if (ptw32_h_kernel32)\n\t{\n\t  (void) FreeLibrary (ptw32_h_kernel32);\n\t}\n    }\n\n  return TRUE;\n}\n\nBOOL\npthread_win32_thread_attach_np ()\n{\n  return TRUE;\n}\n\nBOOL\npthread_win32_thread_detach_np ()\n{\n  if (ptw32_processInitialized)\n    {\n      /*\n       * Don't use pthread_self() - to avoid creating an implicit POSIX thread handle\n       * unnecessarily.\n       */\n      ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey);\n\n      if (sp != NULL) // otherwise Win32 thread with no implicit POSIX handle.\n\t{\n\t  ptw32_callUserDestroyRoutines (sp->ptHandle);\n\n\t  (void) pthread_mutex_lock (&sp->cancelLock);\n\t  sp->state = PThreadStateLast;\n\t  /*\n\t   * If the thread is joinable at this point then it MUST be joined\n\t   * or detached explicitly by the application.\n\t   */\n\t  (void) pthread_mutex_unlock (&sp->cancelLock);\n\n\t  if (sp->detachState == PTHREAD_CREATE_DETACHED)\n\t    {\n\t      ptw32_threadDestroy (sp->ptHandle);\n\n\t      TlsSetValue (ptw32_selfThreadKey->key, NULL);\n\t    }\n\t}\n    }\n\n  return TRUE;\n}\n\nBOOL\npthread_win32_test_features_np (int feature_mask)\n{\n  return ((ptw32_features & feature_mask) == feature_mask);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_InterlockedCompareExchange.c",
    "content": "/*\n * ptw32_InterlockedCompareExchange.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n/*\n * ptw32_InterlockedCompareExchange --\n *\n * Originally needed because W9x doesn't support InterlockedCompareExchange.\n * We now use this version wherever possible so we can inline it.\n */\n\nPTW32_INTERLOCKED_LONG WINAPI\nptw32_InterlockedCompareExchange (PTW32_INTERLOCKED_LPLONG location,\n\t\t\t\t  PTW32_INTERLOCKED_LONG value,\n\t\t\t\t  PTW32_INTERLOCKED_LONG comparand)\n{\n\n#if defined(__WATCOMC__)\n/* Don't report that result is not assigned a value before being referenced */\n#pragma disable_message (200)\n#endif\n\n  PTW32_INTERLOCKED_LONG result;\n\n  /*\n   * Using the LOCK prefix on uni-processor machines is significantly slower\n   * and it is not necessary. The overhead of the conditional below is\n   * negligible in comparison. Since an optimised DLL will inline this\n   * routine, this will be faster than calling the system supplied\n   * Interlocked routine, which appears to avoid the LOCK prefix on\n   * uniprocessor systems. So one DLL works for all systems.\n   */\n  if (ptw32_smp_system)\n\n/* *INDENT-OFF* */\n\n#if defined(_M_IX86) || defined(_X86_)\n\n#if defined(_MSC_VER) || defined(__WATCOMC__) || (defined(__BORLANDC__) && defined(HAVE_TASM32))\n#define HAVE_INLINABLE_INTERLOCKED_CMPXCHG\n    {\n      _asm {\n\tPUSH         ecx\n\tPUSH         edx\n\tMOV          ecx,dword ptr [location]\n\tMOV          edx,dword ptr [value]\n\tMOV          eax,dword ptr [comparand]\n\tLOCK CMPXCHG dword ptr [ecx],edx\n\tMOV          dword ptr [result], eax\n\tPOP          edx\n\tPOP          ecx\n      }\n    }\n  else\n    {\n      _asm {\n\tPUSH         ecx\n\tPUSH         edx\n\tMOV          ecx,dword ptr [location]\n\tMOV          edx,dword ptr [value]\n\tMOV          eax,dword ptr [comparand]\n\tCMPXCHG      dword ptr [ecx],edx\n\tMOV          dword ptr [result], eax\n\tPOP          edx\n\tPOP          ecx\n      }\n    }\n\n#elif defined(__GNUC__)\n#define HAVE_INLINABLE_INTERLOCKED_CMPXCHG\n\n    {\n      __asm__ __volatile__\n\t(\n\t \"lock\\n\\t\"\n\t \"cmpxchgl       %2,%1\"      /* if (EAX == [location])  */\n\t                             /*   [location] = value    */\n                                     /* else                    */\n                                     /*   EAX = [location]      */\n\t :\"=a\" (result)\n\t :\"m\"  (*location), \"r\" (value), \"a\" (comparand));\n    }\n  else\n    {\n      __asm__ __volatile__\n\t(\n\t \"cmpxchgl       %2,%1\"      /* if (EAX == [location])  */\n\t                             /*   [location] = value    */\n                                     /* else                    */\n                                     /*   EAX = [location]      */\n\t :\"=a\" (result)\n\t :\"m\"  (*location), \"r\" (value), \"a\" (comparand));\n    }\n\n#endif\n\n#else\n\n  /*\n   * If execution gets to here then we're running on a currently\n   * unsupported processor or compiler.\n   */\n\n  result = 0;\n\n#endif\n\n/* *INDENT-ON* */\n\n  return result;\n\n#if defined(__WATCOMC__)\n#pragma enable_message (200)\n#endif\n\n}\n\n/*\n * ptw32_InterlockedExchange --\n *\n * We now use this version wherever possible so we can inline it.\n */\n\nLONG WINAPI\nptw32_InterlockedExchange (LPLONG location,\n\t\t\t   LONG value)\n{\n\n#if defined(__WATCOMC__)\n/* Don't report that result is not assigned a value before being referenced */\n#pragma disable_message (200)\n#endif\n\n  LONG result;\n\n  /*\n   * The XCHG instruction always locks the bus with or without the\n   * LOCKED prefix. This makes it significantly slower than CMPXCHG on\n   * uni-processor machines. The Windows InterlockedExchange function\n   * is nearly 3 times faster than the XCHG instruction, so this routine\n   * is not yet very useful for speeding up pthreads.\n   */\n  if (ptw32_smp_system)\n\n/* *INDENT-OFF* */\n\n#if defined(_M_IX86) || defined(_X86_)\n\n#if defined(_MSC_VER) || defined(__WATCOMC__) || (defined(__BORLANDC__) && defined(HAVE_TASM32))\n#define HAVE_INLINABLE_INTERLOCKED_XCHG\n\n    {\n      _asm {\n\tPUSH         ecx\n\tMOV          ecx,dword ptr [location]\n\tMOV          eax,dword ptr [value]\n\tXCHG         dword ptr [ecx],eax\n\tMOV          dword ptr [result], eax\n        POP          ecx\n      }\n    }\n  else\n    {\n      /*\n       * Faster version of XCHG for uni-processor systems because\n       * it doesn't lock the bus. If an interrupt or context switch\n       * occurs between the MOV and the CMPXCHG then the value in\n       * 'location' may have changed, in which case we will loop\n       * back to do the MOV again.\n       *\n       * FIXME! Need memory barriers for the MOV+CMPXCHG combo?\n       *\n       * Tests show that this routine has almost identical timing\n       * to Win32's InterlockedExchange(), which is much faster than\n       * using the inlined 'xchg' instruction above, so it's probably\n       * doing something similar to this (on UP systems).\n       *\n       * Can we do without the PUSH/POP instructions?\n       */\n      _asm {\n\tPUSH         ecx\n\tPUSH         edx\n\tMOV          ecx,dword ptr [location]\n\tMOV          edx,dword ptr [value]\nL1:\tMOV          eax,dword ptr [ecx]\n\tCMPXCHG      dword ptr [ecx],edx\n\tJNZ          L1\n\tMOV          dword ptr [result], eax\n\tPOP          edx\n        POP          ecx\n      }\n    }\n\n#elif defined(__GNUC__)\n#define HAVE_INLINABLE_INTERLOCKED_XCHG\n\n    {\n      __asm__ __volatile__\n\t(\n\t \"xchgl          %2,%1\"\n\t :\"=r\" (result)\n\t :\"m\"  (*location), \"0\" (value));\n    }\n  else\n    {\n      /*\n       * Faster version of XCHG for uni-processor systems because\n       * it doesn't lock the bus. If an interrupt or context switch\n       * occurs between the movl and the cmpxchgl then the value in\n       * 'location' may have changed, in which case we will loop\n       * back to do the movl again.\n       *\n       * FIXME! Need memory barriers for the MOV+CMPXCHG combo?\n       *\n       * Tests show that this routine has almost identical timing\n       * to Win32's InterlockedExchange(), which is much faster than\n       * using the an inlined 'xchg' instruction, so it's probably\n       * doing something similar to this (on UP systems).\n       */\n      __asm__ __volatile__\n\t(\n\t \"0:\\n\\t\"\n\t \"movl           %1,%%eax\\n\\t\"\n\t \"cmpxchgl       %2,%1\\n\\t\"\n\t \"jnz            0b\"\n\t :\"=&a\" (result)\n\t :\"m\"  (*location), \"r\" (value));\n    }\n\n#endif\n\n#else\n\n  /*\n   * If execution gets to here then we're running on a currently\n   * unsupported processor or compiler.\n   */\n\n  result = 0;\n\n#endif\n\n/* *INDENT-ON* */\n\n  return result;\n\n#if defined(__WATCOMC__)\n#pragma enable_message (200)\n#endif\n\n}\n\n\n#if 1\n\n#if defined(PTW32_BUILD_INLINED) && defined(HAVE_INLINABLE_INTERLOCKED_CMPXCHG)\n#undef PTW32_INTERLOCKED_COMPARE_EXCHANGE\n#define PTW32_INTERLOCKED_COMPARE_EXCHANGE ptw32_InterlockedCompareExchange\n#endif\n\n#if defined(PTW32_BUILD_INLINED) && defined(HAVE_INLINABLE_INTERLOCKED_XCHG)\n#undef PTW32_INTERLOCKED_EXCHANGE\n#define PTW32_INTERLOCKED_EXCHANGE ptw32_InterlockedExchange\n#endif\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_MCS_lock.c",
    "content": "/*\n * ptw32_MCS_lock.c\n *\n * Description:\n * This translation unit implements queue-based locks.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n/*\n * About MCS locks:\n *\n * MCS locks are queue-based locks, where the queue nodes are local to the\n * thread. The 'lock' is nothing more than a global pointer that points to\n * the last node in the queue, or is NULL if the queue is empty.\n * \n * Originally designed for use as spin locks requiring no kernel resources\n * for synchronisation or blocking, the implementation below has adapted\n * the MCS spin lock for use as a general mutex that will suspend threads\n * when there is lock contention.\n *\n * Because the queue nodes are thread-local, most of the memory read/write\n * operations required to add or remove nodes from the queue do not trigger\n * cache-coherence updates.\n *\n * Like 'named' mutexes, MCS locks consume system resources transiently -\n * they are able to acquire and free resources automatically - but MCS\n * locks do not require any unique 'name' to identify the lock to all\n * threads using it.\n *\n * Usage of MCS locks:\n *\n * - you need a global ptw32_mcs_lock_t instance initialised to 0 or NULL.\n * - you need a local thread-scope ptw32_mcs_local_node_t instance, which\n *   may serve several different locks but you need at least one node for\n *   every lock held concurrently by a thread.\n *\n * E.g.:\n * \n * ptw32_mcs_lock_t lock1 = 0;\n * ptw32_mcs_lock_t lock2 = 0;\n *\n * void *mythread(void *arg)\n * {\n *   ptw32_mcs_local_node_t node;\n *\n *   ptw32_mcs_acquire (&lock1, &node);\n *   ptw32_mcs_release (&node);\n *\n *   ptw32_mcs_acquire (&lock2, &node);\n *   ptw32_mcs_release (&node);\n *   {\n *      ptw32_mcs_local_node_t nodex;\n *\n *      ptw32_mcs_acquire (&lock1, &node);\n *      ptw32_mcs_acquire (&lock2, &nodex);\n *\n *      ptw32_mcs_release (&nodex);\n *      ptw32_mcs_release (&node);\n *   }\n *   return (void *)0;\n * }\n */\n\n#include \"implement.h\"\n#include \"pthread.h\"\n\n/*\n * ptw32_mcs_flag_set -- notify another thread about an event.\n * \n * Set event if an event handle has been stored in the flag, and\n * set flag to -1 otherwise. Note that -1 cannot be a valid handle value.\n */\nINLINE void \nptw32_mcs_flag_set (LONG * flag)\n{\n  HANDLE e = (HANDLE)PTW32_INTERLOCKED_COMPARE_EXCHANGE(\n\t\t\t\t\t\t(PTW32_INTERLOCKED_LPLONG)flag,\n\t\t\t\t\t\t(PTW32_INTERLOCKED_LONG)-1,\n\t\t\t\t\t\t(PTW32_INTERLOCKED_LONG)0);\n  if ((HANDLE)0 != e)\n    {\n      /* another thread has already stored an event handle in the flag */\n      SetEvent(e);\n    }\n}\n\n/*\n * ptw32_mcs_flag_set -- wait for notification from another.\n * \n * Store an event handle in the flag and wait on it if the flag has not been\n * set, and proceed without creating an event otherwise.\n */\nINLINE void \nptw32_mcs_flag_wait (LONG * flag)\n{\n  if (0 == InterlockedExchangeAdd((LPLONG)flag, 0)) /* MBR fence */\n    {\n      /* the flag is not set. create event. */\n\n      HANDLE e = CreateEvent(NULL, PTW32_FALSE, PTW32_FALSE, NULL);\n\n      if (0 == PTW32_INTERLOCKED_COMPARE_EXCHANGE(\n\t\t\t                  (PTW32_INTERLOCKED_LPLONG)flag,\n\t\t\t                  (PTW32_INTERLOCKED_LONG)e,\n\t\t\t                  (PTW32_INTERLOCKED_LONG)0))\n\t{\n\t  /* stored handle in the flag. wait on it now. */\n\t  WaitForSingleObject(e, INFINITE);\n\t}\n\n      CloseHandle(e);\n    }\n}\n\n/*\n * ptw32_mcs_lock_acquire -- acquire an MCS lock.\n * \n * See: \n * J. M. Mellor-Crummey and M. L. Scott.\n * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors.\n * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991.\n */\nINLINE void \nptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node)\n{\n  ptw32_mcs_local_node_t  *pred;\n  \n  node->lock = lock;\n  node->nextFlag = 0;\n  node->readyFlag = 0;\n  node->next = 0; /* initially, no successor */\n  \n  /* queue for the lock */\n  pred = (ptw32_mcs_local_node_t *)PTW32_INTERLOCKED_EXCHANGE((LPLONG)lock,\n\t\t\t\t\t\t              (LONG)node);\n\n  if (0 != pred)\n    {\n      /* the lock was not free. link behind predecessor. */\n      pred->next = node;\n      ptw32_mcs_flag_set(&pred->nextFlag);\n      ptw32_mcs_flag_wait(&node->readyFlag);\n    }\n}\n\n/*\n * ptw32_mcs_lock_release -- release an MCS lock.\n * \n * See: \n * J. M. Mellor-Crummey and M. L. Scott.\n * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors.\n * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991.\n */\nINLINE void \nptw32_mcs_lock_release (ptw32_mcs_local_node_t * node)\n{\n  ptw32_mcs_lock_t *lock = node->lock;\n  ptw32_mcs_local_node_t *next = (ptw32_mcs_local_node_t *)\n    InterlockedExchangeAdd((LPLONG)&node->next, 0); /* MBR fence */\n\n  if (0 == next)\n    {\n      /* no known successor */\n\n      if (node == (ptw32_mcs_local_node_t *)\n\t  PTW32_INTERLOCKED_COMPARE_EXCHANGE((PTW32_INTERLOCKED_LPLONG)lock,\n\t\t\t\t\t     (PTW32_INTERLOCKED_LONG)0,\n\t\t\t\t\t     (PTW32_INTERLOCKED_LONG)node))\n\t{\n\t  /* no successor, lock is free now */\n\t  return;\n\t}\n  \n      /* wait for successor */\n      ptw32_mcs_flag_wait(&node->nextFlag);\n      next = (ptw32_mcs_local_node_t *)\n\tInterlockedExchangeAdd((LPLONG)&node->next, 0); /* MBR fence */\n    }\n\n  /* pass the lock */\n  ptw32_mcs_flag_set(&next->readyFlag);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_callUserDestroyRoutines.c",
    "content": "/*\n * ptw32_callUserDestroyRoutines.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n#ifdef __cplusplus\n# if ! defined (_MSC_VER) && ! (defined(__GNUC__) && __GNUC__ < 3) && ! defined(__WATCOMC__)\nusing\n  std::terminate;\n# endif\n#endif\n\nvoid\nptw32_callUserDestroyRoutines (pthread_t thread)\n     /*\n      * -------------------------------------------------------------------\n      * DOCPRIVATE\n      *\n      * This the routine runs through all thread keys and calls\n      * the destroy routines on the user's data for the current thread.\n      * It simulates the behaviour of POSIX Threads.\n      *\n      * PARAMETERS\n      *              thread\n      *                      an instance of pthread_t\n      *\n      * RETURNS\n      *              N/A\n      * -------------------------------------------------------------------\n      */\n{\n  ThreadKeyAssoc * assoc;\n\n  if (thread.p != NULL)\n    {\n      int assocsRemaining;\n      int iterations = 0;\n      ptw32_thread_t * sp = (ptw32_thread_t *) thread.p;\n\n      /*\n       * Run through all Thread<-->Key associations\n       * for the current thread.\n       *\n       * Do this process at most PTHREAD_DESTRUCTOR_ITERATIONS times.\n       */\n      do\n\t{\n\t  assocsRemaining = 0;\n\t  iterations++;\n\n\t  (void) pthread_mutex_lock(&(sp->threadLock));\n\t  /*\n\t   * The pointer to the next assoc is stored in the thread struct so that\n\t   * the assoc destructor in pthread_key_delete can adjust it\n\t   * if it deletes this assoc. This can happen if we fail to acquire\n\t   * both locks below, and are forced to release all of our locks,\n\t   * leaving open the opportunity for pthread_key_delete to get in\n\t   * before us.\n\t   */\n\t  sp->nextAssoc = sp->keys;\n\t  (void) pthread_mutex_unlock(&(sp->threadLock));\n\n\t  for (;;)\n\t    {\n\t      void * value;\n\t      pthread_key_t k;\n\t      void (*destructor) (void *);\n\n\t      /*\n\t       * First we need to serialise with pthread_key_delete by locking\n\t       * both assoc guards, but in the reverse order to our convention,\n\t       * so we must be careful to avoid deadlock.\n\t       */\n\t      (void) pthread_mutex_lock(&(sp->threadLock));\n\n\t      if ((assoc = (ThreadKeyAssoc *)sp->nextAssoc) == NULL)\n\t\t{\n\t\t  /* Finished */\n\t\t  pthread_mutex_unlock(&(sp->threadLock));\n\t\t  break;\n\t\t}\n\t      else\n\t\t{\n\t\t  /*\n\t\t   * assoc->key must be valid because assoc can't change or be\n\t\t   * removed from our chain while we hold at least one lock. If\n\t\t   * the assoc was on our key chain then the key has not been\n\t\t   * deleted yet.\n\t\t   *\n\t\t   * Now try to acquire the second lock without deadlocking.\n\t\t   * If we fail, we need to relinquish the first lock and the\n\t\t   * processor and then try to acquire them all again.\n\t\t   */\n\t\t  if (pthread_mutex_trylock(&(assoc->key->keyLock)) == EBUSY)\n\t\t    {\n\t\t      pthread_mutex_unlock(&(sp->threadLock));\n\t\t      Sleep(1); // Ugly but necessary to avoid priority effects.\n\t\t      /*\n\t\t       * Go around again.\n\t\t       * If pthread_key_delete has removed this assoc in the meantime,\n\t\t       * sp->nextAssoc will point to a new assoc.\n\t\t       */\n\t\t      continue;\n\t\t    }\n\t\t}\n\n\t      /* We now hold both locks */\n\n\t      sp->nextAssoc = assoc->nextKey;\n\n\t      /*\n\t       * Key still active; pthread_key_delete\n\t       * will block on these same mutexes before\n\t       * it can release actual key; therefore,\n\t       * key is valid and we can call the destroy\n\t       * routine;\n\t       */\n\t      k = assoc->key;\n\t      destructor = k->destructor;\n\t      value = TlsGetValue(k->key);\n\t      TlsSetValue (k->key, NULL);\n\n\t      // Every assoc->key exists and has a destructor\n\t      if (value != NULL && iterations <= PTHREAD_DESTRUCTOR_ITERATIONS)\n\t\t{\n\t\t  /*\n\t\t   * Unlock both locks before the destructor runs.\n\t\t   * POSIX says pthread_key_delete can be run from destructors,\n\t\t   * and that probably includes with this key as target.\n\t\t   * pthread_setspecific can also be run from destructors and\n\t\t   * also needs to be able to access the assocs.\n\t\t   */\n\t\t  (void) pthread_mutex_unlock(&(sp->threadLock));\n\t\t  (void) pthread_mutex_unlock(&(k->keyLock));\n\n\t\t  assocsRemaining++;\n\n#ifdef __cplusplus\n\n\t\t  try\n\t\t    {\n\t\t      /*\n\t\t       * Run the caller's cleanup routine.\n\t\t       */\n\t\t      destructor (value);\n\t\t    }\n\t\t  catch (...)\n\t\t    {\n\t\t      /*\n\t\t       * A system unexpected exception has occurred\n\t\t       * running the user's destructor.\n\t\t       * We get control back within this block in case\n\t\t       * the application has set up it's own terminate\n\t\t       * handler. Since we are leaving the thread we\n\t\t       * should not get any internal pthreads\n\t\t       * exceptions.\n\t\t       */\n\t\t      terminate ();\n\t\t    }\n\n#else /* __cplusplus */\n\n\t\t  /*\n\t\t   * Run the caller's cleanup routine.\n\t\t   */\n\t\t  destructor (value);\n\n#endif /* __cplusplus */\n\n\t\t}\n\t      else\n\t\t{\n\t\t  /*\n\t\t   * Remove association from both the key and thread chains\n\t\t   * and reclaim it's memory resources.\n\t\t   */\n\t\t  ptw32_tkAssocDestroy (assoc);\n\t\t  (void) pthread_mutex_unlock(&(sp->threadLock));\n\t\t  (void) pthread_mutex_unlock(&(k->keyLock));\n\t\t}\n\t    }\n\t}\n      while (assocsRemaining);\n    }\n}\t\t\t\t/* ptw32_callUserDestroyRoutines */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_calloc.c",
    "content": "/*\n * ptw32_calloc.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n#ifdef NEED_CALLOC\nvoid *\nptw32_calloc (size_t n, size_t s)\n{\n  unsigned int m = n * s;\n  void *p;\n\n  p = malloc (m);\n  if (p == NULL)\n    return NULL;\n\n  memset (p, 0, m);\n\n  return p;\n}\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_cond_check_need_init.c",
    "content": "/*\n * ptw32_cond_check_need_init.c\n *\n * Description:\n * This translation unit implements condition variables and their primitives.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nINLINE int\nptw32_cond_check_need_init (pthread_cond_t * cond)\n{\n  int result = 0;\n\n  /*\n   * The following guarded test is specifically for statically\n   * initialised condition variables (via PTHREAD_OBJECT_INITIALIZER).\n   *\n   * Note that by not providing this synchronisation we risk\n   * introducing race conditions into applications which are\n   * correctly written.\n   *\n   * Approach\n   * --------\n   * We know that static condition variables will not be PROCESS_SHARED\n   * so we can serialise access to internal state using\n   * Win32 Critical Sections rather than Win32 Mutexes.\n   *\n   * If using a single global lock slows applications down too much,\n   * multiple global locks could be created and hashed on some random\n   * value associated with each mutex, the pointer perhaps. At a guess,\n   * a good value for the optimal number of global locks might be\n   * the number of processors + 1.\n   *\n   */\n  EnterCriticalSection (&ptw32_cond_test_init_lock);\n\n  /*\n   * We got here possibly under race\n   * conditions. Check again inside the critical section.\n   * If a static cv has been destroyed, the application can\n   * re-initialise it only by calling pthread_cond_init()\n   * explicitly.\n   */\n  if (*cond == PTHREAD_COND_INITIALIZER)\n    {\n      result = pthread_cond_init (cond, NULL);\n    }\n  else if (*cond == NULL)\n    {\n      /*\n       * The cv has been destroyed while we were waiting to\n       * initialise it, so the operation that caused the\n       * auto-initialisation should fail.\n       */\n      result = EINVAL;\n    }\n\n  LeaveCriticalSection (&ptw32_cond_test_init_lock);\n\n  return result;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_getprocessors.c",
    "content": "/*\n * ptw32_getprocessors.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n/*\n * ptw32_getprocessors()\n *\n * Get the number of CPUs available to the process.\n *\n * If the available number of CPUs is 1 then pthread_spin_lock()\n * will block rather than spin if the lock is already owned.\n *\n * pthread_spin_init() calls this routine when initialising\n * a spinlock. If the number of available processors changes\n * (after a call to SetProcessAffinityMask()) then only\n * newly initialised spinlocks will notice.\n */\nint\nptw32_getprocessors (int *count)\n{\n  DWORD_PTR vProcessCPUs;\n  DWORD_PTR vSystemCPUs;\n  int result = 0;\n\n#if defined(NEED_PROCESS_AFFINITY_MASK)\n\n  *count = 1;\n\n#else\n\n  if (GetProcessAffinityMask (GetCurrentProcess (),\n\t\t\t      &vProcessCPUs, &vSystemCPUs))\n    {\n      DWORD_PTR bit;\n      int CPUs = 0;\n\n      for (bit = 1; bit != 0; bit <<= 1)\n\t{\n\t  if (vProcessCPUs & bit)\n\t    {\n\t      CPUs++;\n\t    }\n\t}\n      *count = CPUs;\n    }\n  else\n    {\n      result = EAGAIN;\n    }\n\n#endif\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_is_attr.c",
    "content": "/*\n * ptw32_is_attr.c\n *\n * Description:\n * This translation unit implements operations on thread attribute objects.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nint\nptw32_is_attr (const pthread_attr_t * attr)\n{\n  /* Return 0 if the attr object is valid, non-zero otherwise. */\n\n  return (attr == NULL ||\n\t  *attr == NULL || (*attr)->valid != PTW32_ATTR_VALID);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_mutex_check_need_init.c",
    "content": "/*\n * ptw32_mutex_check_need_init.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nstatic struct pthread_mutexattr_t_ ptw32_recursive_mutexattr_s =\n  {PTHREAD_PROCESS_PRIVATE, PTHREAD_MUTEX_RECURSIVE};\nstatic struct pthread_mutexattr_t_ ptw32_errorcheck_mutexattr_s =\n  {PTHREAD_PROCESS_PRIVATE, PTHREAD_MUTEX_ERRORCHECK};\nstatic pthread_mutexattr_t ptw32_recursive_mutexattr = &ptw32_recursive_mutexattr_s;\nstatic pthread_mutexattr_t ptw32_errorcheck_mutexattr = &ptw32_errorcheck_mutexattr_s;\n\n\nINLINE int\nptw32_mutex_check_need_init (pthread_mutex_t * mutex)\n{\n  register int result = 0;\n  register pthread_mutex_t mtx;\n\n  /*\n   * The following guarded test is specifically for statically\n   * initialised mutexes (via PTHREAD_MUTEX_INITIALIZER).\n   *\n   * Note that by not providing this synchronisation we risk\n   * introducing race conditions into applications which are\n   * correctly written.\n   *\n   * Approach\n   * --------\n   * We know that static mutexes will not be PROCESS_SHARED\n   * so we can serialise access to internal state using\n   * Win32 Critical Sections rather than Win32 Mutexes.\n   *\n   * If using a single global lock slows applications down too much,\n   * multiple global locks could be created and hashed on some random\n   * value associated with each mutex, the pointer perhaps. At a guess,\n   * a good value for the optimal number of global locks might be\n   * the number of processors + 1.\n   *\n   */\n  EnterCriticalSection (&ptw32_mutex_test_init_lock);\n\n  /*\n   * We got here possibly under race\n   * conditions. Check again inside the critical section\n   * and only initialise if the mutex is valid (not been destroyed).\n   * If a static mutex has been destroyed, the application can\n   * re-initialise it only by calling pthread_mutex_init()\n   * explicitly.\n   */\n  mtx = *mutex;\n\n  if (mtx == PTHREAD_MUTEX_INITIALIZER)\n    {\n      result = pthread_mutex_init (mutex, NULL);\n    }\n  else if (mtx == PTHREAD_RECURSIVE_MUTEX_INITIALIZER)\n    {\n      result = pthread_mutex_init (mutex, &ptw32_recursive_mutexattr);\n    }\n  else if (mtx == PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)\n    {\n      result = pthread_mutex_init (mutex, &ptw32_errorcheck_mutexattr);\n    }\n  else if (mtx == NULL)\n    {\n      /*\n       * The mutex has been destroyed while we were waiting to\n       * initialise it, so the operation that caused the\n       * auto-initialisation should fail.\n       */\n      result = EINVAL;\n    }\n\n  LeaveCriticalSection (&ptw32_mutex_test_init_lock);\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_new.c",
    "content": "/*\n * ptw32_new.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\npthread_t\nptw32_new (void)\n{\n  pthread_t t;\n  pthread_t nil = {NULL, 0};\n  ptw32_thread_t * tp;\n\n  /*\n   * If there's a reusable pthread_t then use it.\n   */\n  t = ptw32_threadReusePop ();\n\n  if (NULL != t.p)\n    {\n      tp = (ptw32_thread_t *) t.p;\n    }\n  else\n    {\n      /* No reuse threads available */\n      tp = (ptw32_thread_t *) calloc (1, sizeof(ptw32_thread_t));\n\n      if (tp == NULL)\n\t{\n\t  return nil;\n\t}\n\n      /* ptHandle.p needs to point to it's parent ptw32_thread_t. */\n      t.p = tp->ptHandle.p = tp;\n      t.x = tp->ptHandle.x = 0;\n    }\n\n  /* Set default state. */\n  tp->sched_priority = THREAD_PRIORITY_NORMAL;\n  tp->detachState = PTHREAD_CREATE_JOINABLE;\n  tp->cancelState = PTHREAD_CANCEL_ENABLE;\n  tp->cancelType = PTHREAD_CANCEL_DEFERRED;\n  tp->cancelLock = PTHREAD_MUTEX_INITIALIZER;\n  tp->threadLock = PTHREAD_MUTEX_INITIALIZER;\n  tp->cancelEvent = CreateEvent (0, (int) PTW32_TRUE,\t/* manualReset  */\n\t\t\t\t (int) PTW32_FALSE,\t/* setSignaled  */\n\t\t\t\t NULL);\n\n  if (tp->cancelEvent == NULL)\n    {\n      ptw32_threadReusePush (tp->ptHandle);\n      return nil;\n    }\n\n  return t;\n\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_processInitialize.c",
    "content": "/*\n * ptw32_processInitialize.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\nptw32_processInitialize (void)\n     /*\n      * ------------------------------------------------------\n      * DOCPRIVATE\n      *      This function performs process wide initialization for\n      *      the pthread library.\n      *\n      * PARAMETERS\n      *      N/A\n      *\n      * DESCRIPTION\n      *      This function performs process wide initialization for\n      *      the pthread library.\n      *      If successful, this routine sets the global variable\n      *      ptw32_processInitialized to TRUE.\n      *\n      * RESULTS\n      *              TRUE    if successful,\n      *              FALSE   otherwise\n      *\n      * ------------------------------------------------------\n      */\n{\n  if (ptw32_processInitialized)\n    {\n      /* \n       * Ignore if already initialized. this is useful for \n       * programs that uses a non-dll pthread\n       * library. Such programs must call ptw32_processInitialize() explicitly,\n       * since this initialization routine is automatically called only when\n       * the dll is loaded.\n       */\n      return PTW32_TRUE;\n    }\n\n  ptw32_processInitialized = PTW32_TRUE;\n\n  /*\n   * Initialize Keys\n   */\n  if ((pthread_key_create (&ptw32_selfThreadKey, NULL) != 0) ||\n      (pthread_key_create (&ptw32_cleanupKey, NULL) != 0))\n    {\n\n      ptw32_processTerminate ();\n    }\n\n  /* \n   * Set up the global locks.\n   */\n  InitializeCriticalSection (&ptw32_thread_reuse_lock);\n  InitializeCriticalSection (&ptw32_mutex_test_init_lock);\n  InitializeCriticalSection (&ptw32_cond_list_lock);\n  InitializeCriticalSection (&ptw32_cond_test_init_lock);\n  InitializeCriticalSection (&ptw32_rwlock_test_init_lock);\n  InitializeCriticalSection (&ptw32_spinlock_test_init_lock);\n\n  return (ptw32_processInitialized);\n\n}\t\t\t\t/* processInitialize */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_processTerminate.c",
    "content": "/*\n * ptw32_processTerminate.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nvoid\nptw32_processTerminate (void)\n     /*\n      * ------------------------------------------------------\n      * DOCPRIVATE\n      *      This function performs process wide termination for\n      *      the pthread library.\n      *\n      * PARAMETERS\n      *      N/A\n      *\n      * DESCRIPTION\n      *      This function performs process wide termination for\n      *      the pthread library.\n      *      This routine sets the global variable\n      *      ptw32_processInitialized to FALSE\n      *\n      * RESULTS\n      *              N/A\n      *\n      * ------------------------------------------------------\n      */\n{\n  if (ptw32_processInitialized)\n    {\n      ptw32_thread_t * tp, * tpNext;\n\n      if (ptw32_selfThreadKey != NULL)\n\t{\n\t  /*\n\t   * Release ptw32_selfThreadKey\n\t   */\n\t  pthread_key_delete (ptw32_selfThreadKey);\n\n\t  ptw32_selfThreadKey = NULL;\n\t}\n\n      if (ptw32_cleanupKey != NULL)\n\t{\n\t  /*\n\t   * Release ptw32_cleanupKey\n\t   */\n\t  pthread_key_delete (ptw32_cleanupKey);\n\n\t  ptw32_cleanupKey = NULL;\n\t}\n\n      EnterCriticalSection (&ptw32_thread_reuse_lock);\n\n      tp = ptw32_threadReuseTop;\n      while (tp != PTW32_THREAD_REUSE_EMPTY)\n\t{\n\t  tpNext = tp->prevReuse;\n\t  free (tp);\n\t  tp = tpNext;\n\t}\n\n      LeaveCriticalSection (&ptw32_thread_reuse_lock);\n\n      /* \n       * Destroy the global locks and other objects.\n       */\n      DeleteCriticalSection (&ptw32_spinlock_test_init_lock);\n      DeleteCriticalSection (&ptw32_rwlock_test_init_lock);\n      DeleteCriticalSection (&ptw32_cond_test_init_lock);\n      DeleteCriticalSection (&ptw32_cond_list_lock);\n      DeleteCriticalSection (&ptw32_mutex_test_init_lock);\n      DeleteCriticalSection (&ptw32_thread_reuse_lock);\n\n      ptw32_processInitialized = PTW32_FALSE;\n    }\n\n}\t\t\t\t/* processTerminate */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_relmillisecs.c",
    "content": "/*\n * ptw32_relmillisecs.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#ifndef _UWIN\n//#include <process.h>\n#endif\n#include \"pthread.h\"\n#include \"implement.h\"\n#ifndef NEED_FTIME\n#include <sys/timeb.h>\n#endif\n\n\nINLINE DWORD\nptw32_relmillisecs (const struct timespec * abstime)\n{\n  const int64_t NANOSEC_PER_MILLISEC = 1000000;\n  const int64_t MILLISEC_PER_SEC = 1000;\n  DWORD milliseconds;\n  int64_t tmpAbsMilliseconds;\n  int64_t tmpCurrMilliseconds;\n#ifdef NEED_FTIME\n  struct timespec currSysTime;\n  FILETIME ft;\n  SYSTEMTIME st;\n#else /* ! NEED_FTIME */\n  struct _timeb currSysTime;\n#endif /* NEED_FTIME */\n\n\n  /* \n   * Calculate timeout as milliseconds from current system time. \n   */\n\n  /*\n   * subtract current system time from abstime in a way that checks\n   * that abstime is never in the past, or is never equivalent to the\n   * defined INFINITE value (0xFFFFFFFF).\n   *\n   * Assume all integers are unsigned, i.e. cannot test if less than 0.\n   */\n  tmpAbsMilliseconds =  (int64_t)abstime->tv_sec * MILLISEC_PER_SEC;\n  tmpAbsMilliseconds += ((int64_t)abstime->tv_nsec + (NANOSEC_PER_MILLISEC/2)) / NANOSEC_PER_MILLISEC;\n\n  /* get current system time */\n\n#ifdef NEED_FTIME\n\n  GetSystemTime(&st);\n  SystemTimeToFileTime(&st, &ft);\n  /*\n   * GetSystemTimeAsFileTime(&ft); would be faster,\n   * but it does not exist on WinCE\n   */\n\n  ptw32_filetime_to_timespec(&ft, &currSysTime);\n\n  tmpCurrMilliseconds = (int64_t)currSysTime.tv_sec * MILLISEC_PER_SEC;\n  tmpCurrMilliseconds += ((int64_t)currSysTime.tv_nsec + (NANOSEC_PER_MILLISEC/2))\n\t\t\t   / NANOSEC_PER_MILLISEC;\n\n#else /* ! NEED_FTIME */\n\n  _ftime(&currSysTime);\n\n  tmpCurrMilliseconds = (int64_t) currSysTime.time * MILLISEC_PER_SEC;\n  tmpCurrMilliseconds += (int64_t) currSysTime.millitm;\n\n#endif /* NEED_FTIME */\n\n  if (tmpAbsMilliseconds > tmpCurrMilliseconds)\n    {\n      milliseconds = (DWORD) (tmpAbsMilliseconds - tmpCurrMilliseconds);\n      if (milliseconds == INFINITE)\n        {\n          /* Timeouts must be finite */\n          milliseconds--;\n        }\n    }\n  else\n    {\n      /* The abstime given is in the past */\n      milliseconds = 0;\n    }\n\n  return milliseconds;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_reuse.c",
    "content": "/*\n * ptw32_threadReuse.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n/*\n * How it works:\n * A pthread_t is a struct (2x32 bit scalar types on IA-32, 2x64 bit on IA-64)\n * which is normally passed/returned by value to/from pthreads routines.\n * Applications are therefore storing a copy of the struct as it is at that\n * time.\n *\n * The original pthread_t struct plus all copies of it contain the address of\n * the thread state struct ptw32_thread_t_ (p), plus a reuse counter (x). Each\n * ptw32_thread_t contains the original copy of it's pthread_t.\n * Once malloced, a ptw32_thread_t_ struct is not freed until the process exits.\n * \n * The thread reuse stack is a simple LILO stack managed through a singly\n * linked list element in the ptw32_thread_t.\n *\n * Each time a thread is destroyed, the ptw32_thread_t address is pushed onto the\n * reuse stack after it's ptHandle's reuse counter has been incremented.\n * \n * The following can now be said from this:\n * - two pthread_t's are identical if their ptw32_thread_t reference pointers\n * are equal and their reuse counters are equal. That is,\n *\n *   equal = (a.p == b.p && a.x == b.x)\n *\n * - a pthread_t copy refers to a destroyed thread if the reuse counter in\n * the copy is not equal to the reuse counter in the original.\n *\n *   threadDestroyed = (copy.x != ((ptw32_thread_t *)copy.p)->ptHandle.x)\n *\n */\n\n/*\n * Pop a clean pthread_t struct off the reuse stack.\n */\npthread_t\nptw32_threadReusePop (void)\n{\n  pthread_t t = {NULL, 0};\n\n  EnterCriticalSection (&ptw32_thread_reuse_lock);\n\n  if (PTW32_THREAD_REUSE_EMPTY != ptw32_threadReuseTop)\n    {\n      ptw32_thread_t * tp;\n\n      tp = ptw32_threadReuseTop;\n\n      ptw32_threadReuseTop = tp->prevReuse;\n\n      if (PTW32_THREAD_REUSE_EMPTY == ptw32_threadReuseTop)\n        {\n          ptw32_threadReuseBottom = PTW32_THREAD_REUSE_EMPTY;\n        }\n\n      tp->prevReuse = NULL;\n\n      t = tp->ptHandle;\n    }\n\n  LeaveCriticalSection (&ptw32_thread_reuse_lock);\n\n  return t;\n\n}\n\n/*\n * Push a clean pthread_t struct onto the reuse stack.\n * Must be re-initialised when reused.\n * All object elements (mutexes, events etc) must have been either\n * detroyed before this, or never initialised.\n */\nvoid\nptw32_threadReusePush (pthread_t thread)\n{\n  ptw32_thread_t * tp = (ptw32_thread_t *) thread.p;\n  pthread_t t;\n\n  EnterCriticalSection (&ptw32_thread_reuse_lock);\n\n  t = tp->ptHandle;\n  memset(tp, 0, sizeof(ptw32_thread_t));\n\n  /* Must restore the original POSIX handle that we just wiped. */\n  tp->ptHandle = t;\n\n  /* Bump the reuse counter now */\n#ifdef PTW32_THREAD_ID_REUSE_INCREMENT\n  tp->ptHandle.x += PTW32_THREAD_ID_REUSE_INCREMENT;\n#else\n  tp->ptHandle.x++;\n#endif\n\n  tp->prevReuse = PTW32_THREAD_REUSE_EMPTY;\n\n  if (PTW32_THREAD_REUSE_EMPTY != ptw32_threadReuseBottom)\n    {\n      ptw32_threadReuseBottom->prevReuse = tp;\n    }\n  else\n    {\n      ptw32_threadReuseTop = tp;\n    }\n\n  ptw32_threadReuseBottom = tp;\n\n  LeaveCriticalSection (&ptw32_thread_reuse_lock);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_rwlock_cancelwrwait.c",
    "content": "/*\n * ptw32_rwlock_cancelwrwait.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nvoid\nptw32_rwlock_cancelwrwait (void *arg)\n{\n  pthread_rwlock_t rwl = (pthread_rwlock_t) arg;\n\n  rwl->nSharedAccessCount = -rwl->nCompletedSharedAccessCount;\n  rwl->nCompletedSharedAccessCount = 0;\n\n  (void) pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted));\n  (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_rwlock_check_need_init.c",
    "content": "/*\n * pthread_rwlock_check_need_init.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\nINLINE int\nptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock)\n{\n  int result = 0;\n\n  /*\n   * The following guarded test is specifically for statically\n   * initialised rwlocks (via PTHREAD_RWLOCK_INITIALIZER).\n   *\n   * Note that by not providing this synchronisation we risk\n   * introducing race conditions into applications which are\n   * correctly written.\n   *\n   * Approach\n   * --------\n   * We know that static rwlocks will not be PROCESS_SHARED\n   * so we can serialise access to internal state using\n   * Win32 Critical Sections rather than Win32 Mutexes.\n   *\n   * If using a single global lock slows applications down too much,\n   * multiple global locks could be created and hashed on some random\n   * value associated with each mutex, the pointer perhaps. At a guess,\n   * a good value for the optimal number of global locks might be\n   * the number of processors + 1.\n   *\n   */\n  EnterCriticalSection (&ptw32_rwlock_test_init_lock);\n\n  /*\n   * We got here possibly under race\n   * conditions. Check again inside the critical section\n   * and only initialise if the rwlock is valid (not been destroyed).\n   * If a static rwlock has been destroyed, the application can\n   * re-initialise it only by calling pthread_rwlock_init()\n   * explicitly.\n   */\n  if (*rwlock == PTHREAD_RWLOCK_INITIALIZER)\n    {\n      result = pthread_rwlock_init (rwlock, NULL);\n    }\n  else if (*rwlock == NULL)\n    {\n      /*\n       * The rwlock has been destroyed while we were waiting to\n       * initialise it, so the operation that caused the\n       * auto-initialisation should fail.\n       */\n      result = EINVAL;\n    }\n\n  LeaveCriticalSection (&ptw32_rwlock_test_init_lock);\n\n  return result;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_semwait.c",
    "content": "/*\n * ptw32_semwait.c\n *\n * Description:\n * This translation unit implements mutual exclusion (mutex) primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#ifndef _UWIN\n//#   include <process.h>\n#endif\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\nptw32_semwait (sem_t * sem)\n     /*\n      * ------------------------------------------------------\n      * DESCRIPTION\n      *      This function waits on a POSIX semaphore. If the\n      *      semaphore value is greater than zero, it decreases\n      *      its value by one. If the semaphore value is zero, then\n      *      the calling thread (or process) is blocked until it can\n      *      successfully decrease the value.\n      *\n      *      Unlike sem_wait(), this routine is non-cancelable.\n      *\n      * RESULTS\n      *              0               successfully decreased semaphore,\n      *              -1              failed, error in errno.\n      * ERRNO\n      *              EINVAL          'sem' is not a valid semaphore,\n      *              ENOSYS          semaphores are not supported,\n      *              EINTR           the function was interrupted by a signal,\n      *              EDEADLK         a deadlock condition was detected.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  sem_t s = *sem;\n\n  if (s == NULL)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      if ((result = pthread_mutex_lock (&s->lock)) == 0)\n        {\n          int v = --s->value;\n\n          (void) pthread_mutex_unlock (&s->lock);\n\n          if (v < 0)\n            {\n              /* Must wait */\n              if (WaitForSingleObject (s->sem, INFINITE) == WAIT_OBJECT_0)\n\t\t{\n#ifdef NEED_SEM\n\t\t  if (pthread_mutex_lock (&s->lock) == 0)\n\t\t    {\n\t\t      if (s->leftToUnblock > 0)\n\t\t\t{\n\t\t\t  --s->leftToUnblock;\n\t\t\t  SetEvent(s->sem);\n\t\t\t}\n\t\t      (void) pthread_mutex_unlock (&s->lock);\n\t\t    }\n#endif\n\t\t  return 0;\n\t\t}\n            }\n          else\n\t    {\n\t      return 0;\n\t    }\n        }\n    }\n\n  if (result != 0)\n    {\n      errno = result;\n      return -1;\n    }\n\n  return 0;\n\n}\t\t\t\t/* ptw32_semwait */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_spinlock_check_need_init.c",
    "content": "/*\n * ptw32_spinlock_check_need_init.c\n *\n * Description:\n * This translation unit implements spin lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nINLINE int\nptw32_spinlock_check_need_init (pthread_spinlock_t * lock)\n{\n  int result = 0;\n\n  /*\n   * The following guarded test is specifically for statically\n   * initialised spinlocks (via PTHREAD_SPINLOCK_INITIALIZER).\n   *\n   * Note that by not providing this synchronisation we risk\n   * introducing race conditions into applications which are\n   * correctly written.\n   */\n  EnterCriticalSection (&ptw32_spinlock_test_init_lock);\n\n  /*\n   * We got here possibly under race\n   * conditions. Check again inside the critical section\n   * and only initialise if the spinlock is valid (not been destroyed).\n   * If a static spinlock has been destroyed, the application can\n   * re-initialise it only by calling pthread_spin_init()\n   * explicitly.\n   */\n  if (*lock == PTHREAD_SPINLOCK_INITIALIZER)\n    {\n      result = pthread_spin_init (lock, PTHREAD_PROCESS_PRIVATE);\n    }\n  else if (*lock == NULL)\n    {\n      /*\n       * The spinlock has been destroyed while we were waiting to\n       * initialise it, so the operation that caused the\n       * auto-initialisation should fail.\n       */\n      result = EINVAL;\n    }\n\n  LeaveCriticalSection (&ptw32_spinlock_test_init_lock);\n\n  return (result);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_threadDestroy.c",
    "content": "/*\n * ptw32_threadDestroy.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nvoid\nptw32_threadDestroy (pthread_t thread)\n{\n  ptw32_thread_t * tp = (ptw32_thread_t *) thread.p;\n  ptw32_thread_t threadCopy;\n\n  if (tp != NULL)\n    {\n      /*\n       * Copy thread state so that the thread can be atomically NULLed.\n       */\n      memcpy (&threadCopy, tp, sizeof (threadCopy));\n\n      /*\n       * Thread ID structs are never freed. They're NULLed and reused.\n       * This also sets the thread to PThreadStateInitial (invalid).\n       */\n      ptw32_threadReusePush (thread);\n\n      /* Now work on the copy. */\n      if (threadCopy.cancelEvent != NULL)\n\t{\n\t  CloseHandle (threadCopy.cancelEvent);\n\t}\n\n      (void) pthread_mutex_destroy(&threadCopy.cancelLock);\n      (void) pthread_mutex_destroy(&threadCopy.threadLock);\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)\n      /*\n       * See documentation for endthread vs endthreadex.\n       */\n      if (threadCopy.threadH != 0)\n\t{\n\t  CloseHandle (threadCopy.threadH);\n\t}\n#endif\n\n    }\n}\t\t\t\t/* ptw32_threadDestroy */\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_threadStart.c",
    "content": "/*\n * ptw32_threadStart.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n#ifdef __CLEANUP_SEH\n\nstatic DWORD\nExceptionFilter (EXCEPTION_POINTERS * ep, DWORD * ei)\n{\n  switch (ep->ExceptionRecord->ExceptionCode)\n    {\n    case EXCEPTION_PTW32_SERVICES:\n      {\n\tDWORD param;\n\tDWORD numParams = ep->ExceptionRecord->NumberParameters;\n\n\tnumParams = (numParams > 3) ? 3 : numParams;\n\n\tfor (param = 0; param < numParams; param++)\n\t  {\n\t    ei[param] = ep->ExceptionRecord->ExceptionInformation[param];\n\t  }\n\n\treturn EXCEPTION_EXECUTE_HANDLER;\n\tbreak;\n      }\n    default:\n      {\n\t/*\n\t * A system unexpected exception has occurred running the user's\n\t * routine. We need to cleanup before letting the exception\n\t * out of thread scope.\n\t */\n\tpthread_t self = pthread_self ();\n\n\t(void) pthread_mutex_destroy (&((ptw32_thread_t *)self.p)->cancelLock);\n\tptw32_callUserDestroyRoutines (self);\n\n\treturn EXCEPTION_CONTINUE_SEARCH;\n\tbreak;\n      }\n    }\n}\n\n#elif defined(__CLEANUP_CXX)\n\n#if defined(_MSC_VER)\n# include <eh.h>\n#elif defined(__WATCOMC__)\n# include <eh.h>\n# include <exceptio.h>\ntypedef terminate_handler\n  terminate_function;\n#else\n# if defined(__GNUC__) && __GNUC__ < 3\n#   include <new.h>\n# else\n#   include <new>\nusing\n  std::terminate_handler;\nusing\n  std::terminate;\nusing\n  std::set_terminate;\n# endif\ntypedef terminate_handler\n  terminate_function;\n#endif\n\nstatic terminate_function\n  ptw32_oldTerminate;\n\nvoid\nptw32_terminate ()\n{\n  set_terminate (ptw32_oldTerminate);\n  (void) pthread_win32_thread_detach_np ();\n  terminate ();\n}\n\n#endif\n\n#if ! defined (__MINGW32__) || (defined (__MSVCRT__) && ! defined (__DMC__))\nunsigned\n  __stdcall\n#else\nvoid\n#endif\nptw32_threadStart (void *vthreadParms)\n{\n  ThreadParms * threadParms = (ThreadParms *) vthreadParms;\n  pthread_t self;\n  ptw32_thread_t * sp;\n  void *(*start) (void *);\n  void * arg;\n\n#ifdef __CLEANUP_SEH\n  DWORD\n  ei[] = { 0, 0, 0 };\n#endif\n\n#ifdef __CLEANUP_C\n  int setjmp_rc;\n#endif\n\n  void * status = (void *) 0;\n\n  self = threadParms->tid;\n  sp = (ptw32_thread_t *) self.p;\n  start = threadParms->start;\n  arg = threadParms->arg;\n\n  free (threadParms);\n\n#if defined (__MINGW32__) && ! defined (__MSVCRT__)\n  /*\n   * beginthread does not return the thread id and is running\n   * before it returns us the thread handle, and so we do it here.\n   */\n  sp->thread = GetCurrentThreadId ();\n  /*\n   * Here we're using cancelLock as a general-purpose lock\n   * to make the new thread wait until the creating thread\n   * has the new handle.\n   */\n  if (pthread_mutex_lock (&sp->cancelLock) == 0)\n    {\n      (void) pthread_mutex_unlock (&sp->cancelLock);\n    }\n#endif\n\n  pthread_setspecific (ptw32_selfThreadKey, sp);\n\n  sp->state = PThreadStateRunning;\n\n#ifdef __CLEANUP_SEH\n\n  __try\n  {\n    /*\n     * Run the caller's routine;\n     */\n    status = sp->exitStatus = (*start) (arg);\n\n#ifdef _UWIN\n    if (--pthread_count <= 0)\n      exit (0);\n#endif\n\n  }\n  __except (ExceptionFilter (GetExceptionInformation (), ei))\n  {\n    switch (ei[0])\n      {\n      case PTW32_EPS_CANCEL:\n\tstatus = sp->exitStatus = PTHREAD_CANCELED;\n#ifdef _UWIN\n\tif (--pthread_count <= 0)\n\t  exit (0);\n#endif\n\tbreak;\n      case PTW32_EPS_EXIT:\n\tstatus = sp->exitStatus;\n\tbreak;\n      default:\n\tstatus = sp->exitStatus = PTHREAD_CANCELED;\n\tbreak;\n      }\n  }\n\n#else /* __CLEANUP_SEH */\n\n#ifdef __CLEANUP_C\n\n  setjmp_rc = setjmp (sp->start_mark);\n\n  if (0 == setjmp_rc)\n    {\n\n      /*\n       * Run the caller's routine;\n       */\n      status = sp->exitStatus = (*start) (arg);\n    }\n  else\n    {\n      switch (setjmp_rc)\n\t{\n\tcase PTW32_EPS_CANCEL:\n\t  status = sp->exitStatus = PTHREAD_CANCELED;\n\t  break;\n\tcase PTW32_EPS_EXIT:\n\t  status = sp->exitStatus;\n\t  break;\n\tdefault:\n\t  status = sp->exitStatus = PTHREAD_CANCELED;\n\t  break;\n\t}\n    }\n\n#else /* __CLEANUP_C */\n\n#ifdef __CLEANUP_CXX\n\n  ptw32_oldTerminate = set_terminate (&ptw32_terminate);\n\n  try\n  {\n    /*\n     * Run the caller's routine in a nested try block so that we\n     * can run the user's terminate function, which may call\n     * pthread_exit() or be canceled.\n     */\n    try\n    {\n      status = sp->exitStatus = (*start) (arg);\n    }\n    catch (ptw32_exception &)\n    {\n      /*\n       * Pass these through to the outer block.\n       */\n      throw;\n    }\n    catch (...)\n    {\n      /*\n       * We want to run the user's terminate function if supplied.\n       * That function may call pthread_exit() or be canceled, which will\n       * be handled by the outer try block.\n       *\n       * ptw32_terminate() will be called if there is no user\n       * supplied function.\n       */\n\n      terminate_function\n\tterm_func = set_terminate (0);\n      set_terminate (term_func);\n\n      if (term_func != 0)\n\t{\n\t  term_func ();\n\t}\n\n      throw;\n    }\n  }\n  catch (ptw32_exception_cancel &)\n  {\n    /*\n     * Thread was canceled.\n     */\n    status = sp->exitStatus = PTHREAD_CANCELED;\n  }\n  catch (ptw32_exception_exit &)\n  {\n    /*\n     * Thread was exited via pthread_exit().\n     */\n    status = sp->exitStatus;\n  }\n  catch (...)\n  {\n    /*\n     * A system unexpected exception has occurred running the user's\n     * terminate routine. We get control back within this block - cleanup\n     * and release the exception out of thread scope.\n     */\n    status = sp->exitStatus = PTHREAD_CANCELED;\n    (void) pthread_mutex_lock (&sp->cancelLock);\n    sp->state = PThreadStateException;\n    (void) pthread_mutex_unlock (&sp->cancelLock);\n    (void) pthread_win32_thread_detach_np ();\n    (void) set_terminate (ptw32_oldTerminate);\n    throw;\n\n    /*\n     * Never reached.\n     */\n  }\n\n  (void) set_terminate (ptw32_oldTerminate);\n\n#else\n\n#error ERROR [__FILE__, line __LINE__]: Cleanup type undefined.\n\n#endif /* __CLEANUP_CXX */\n#endif /* __CLEANUP_C */\n#endif /* __CLEANUP_SEH */\n\n#if defined(PTW32_STATIC_LIB)\n  /*\n   * We need to cleanup the pthread now if we have\n   * been statically linked, in which case the cleanup\n   * in dllMain won't get done. Joinable threads will\n   * only be partially cleaned up and must be fully cleaned\n   * up by pthread_join() or pthread_detach().\n   *\n   * Note: if this library has been statically linked,\n   * implicitly created pthreads (those created\n   * for Win32 threads which have called pthreads routines)\n   * must be cleaned up explicitly by the application\n   * (by calling pthread_win32_thread_detach_np()).\n   * For the dll, dllMain will do the cleanup automatically.\n   */\n  (void) pthread_win32_thread_detach_np ();\n#endif\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)\n  _endthreadex ((unsigned) status);\n#else\n  _endthread ();\n#endif\n\n  /*\n   * Never reached.\n   */\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)\n  return (unsigned) status;\n#endif\n\n}\t\t\t\t/* ptw32_threadStart */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_throw.c",
    "content": "/*\n * ptw32_throw.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n/*\n * ptw32_throw\n *\n * All canceled and explicitly exited POSIX threads go through\n * here. This routine knows how to exit both POSIX initiated threads and\n * 'implicit' POSIX threads for each of the possible language modes (C,\n * C++, and SEH).\n */\nvoid\nptw32_throw (DWORD exception)\n{\n  /*\n   * Don't use pthread_self() to avoid creating an implicit POSIX thread handle\n   * unnecessarily.\n   */\n  ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey);\n\n#ifdef __CLEANUP_SEH\n  DWORD exceptionInformation[3];\n#endif\n\n  if (exception != PTW32_EPS_CANCEL && exception != PTW32_EPS_EXIT)\n    {\n      /* Should never enter here */\n      exit (1);\n    }\n\n  if (NULL == sp || sp->implicit)\n    {\n      /*\n       * We're inside a non-POSIX initialised Win32 thread\n       * so there is no point to jump or throw back to. Just do an\n       * explicit thread exit here after cleaning up POSIX\n       * residue (i.e. cleanup handlers, POSIX thread handle etc).\n       */\n      unsigned exitCode = 0;\n\n      switch (exception)\n\t{\n\tcase PTW32_EPS_CANCEL:\n\t  exitCode = (unsigned) PTHREAD_CANCELED;\n\t  break;\n\tcase PTW32_EPS_EXIT:\n\t  exitCode = (unsigned) sp->exitStatus;;\n\t  break;\n\t}\n\n#if defined(PTW32_STATIC_LIB)\n\n      pthread_win32_thread_detach_np ();\n\n#endif\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)\n      _endthreadex (exitCode);\n#else\n      _endthread ();\n#endif\n\n    }\n\n#ifdef __CLEANUP_SEH\n\n\n  exceptionInformation[0] = (DWORD) (exception);\n  exceptionInformation[1] = (DWORD) (0);\n  exceptionInformation[2] = (DWORD) (0);\n\n  RaiseException (EXCEPTION_PTW32_SERVICES, 0, 3, exceptionInformation);\n\n#else /* __CLEANUP_SEH */\n\n#ifdef __CLEANUP_C\n\n  ptw32_pop_cleanup_all (1);\n  longjmp (sp->start_mark, exception);\n\n#else /* __CLEANUP_C */\n\n#ifdef __CLEANUP_CXX\n\n  switch (exception)\n    {\n    case PTW32_EPS_CANCEL:\n      throw ptw32_exception_cancel ();\n      break;\n    case PTW32_EPS_EXIT:\n      throw ptw32_exception_exit ();\n      break;\n    }\n\n#else\n\n#error ERROR [__FILE__, line __LINE__]: Cleanup type undefined.\n\n#endif /* __CLEANUP_CXX */\n\n#endif /* __CLEANUP_C */\n\n#endif /* __CLEANUP_SEH */\n\n  /* Never reached */\n}\n\n\nvoid\nptw32_pop_cleanup_all (int execute)\n{\n  while (NULL != ptw32_pop_cleanup (execute))\n    {\n    }\n}\n\n\nDWORD\nptw32_get_exception_services_code (void)\n{\n#ifdef __CLEANUP_SEH\n\n  return EXCEPTION_PTW32_SERVICES;\n\n#else\n\n  return (DWORD) NULL;\n\n#endif\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_timespec.c",
    "content": "/*\n * ptw32_timespec.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n#ifdef NEED_FTIME\n\n/*\n * time between jan 1, 1601 and jan 1, 1970 in units of 100 nanoseconds\n */\n#define PTW32_TIMESPEC_TO_FILETIME_OFFSET \\\n\t  ( ((LONGLONG) 27111902 << 32) + (LONGLONG) 3577643008 )\n\nINLINE void\nptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft)\n     /*\n      * -------------------------------------------------------------------\n      * converts struct timespec\n      * where the time is expressed in seconds and nanoseconds from Jan 1, 1970.\n      * into FILETIME (as set by GetSystemTimeAsFileTime), where the time is\n      * expressed in 100 nanoseconds from Jan 1, 1601,\n      * -------------------------------------------------------------------\n      */\n{\n  *(LONGLONG *) ft = ts->tv_sec * 10000000\n    + (ts->tv_nsec + 50) / 100 + PTW32_TIMESPEC_TO_FILETIME_OFFSET;\n}\n\nINLINE void\nptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts)\n     /*\n      * -------------------------------------------------------------------\n      * converts FILETIME (as set by GetSystemTimeAsFileTime), where the time is\n      * expressed in 100 nanoseconds from Jan 1, 1601,\n      * into struct timespec\n      * where the time is expressed in seconds and nanoseconds from Jan 1, 1970.\n      * -------------------------------------------------------------------\n      */\n{\n  ts->tv_sec =\n    (int) ((*(LONGLONG *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET) / 10000000);\n  ts->tv_nsec =\n    (int) ((*(LONGLONG *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET -\n\t    ((LONGLONG) ts->tv_sec * (LONGLONG) 10000000)) * 100);\n}\n\n#endif /* NEED_FTIME */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_tkAssocCreate.c",
    "content": "/*\n * ptw32_tkAssocCreate.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nint\nptw32_tkAssocCreate (ptw32_thread_t * sp, pthread_key_t key)\n     /*\n      * -------------------------------------------------------------------\n      * This routine creates an association that\n      * is unique for the given (thread,key) combination.The association \n      * is referenced by both the thread and the key.\n      * This association allows us to determine what keys the\n      * current thread references and what threads a given key\n      * references.\n      * See the detailed description\n      * at the beginning of this file for further details.\n      *\n      * Notes:\n      *      1)      New associations are pushed to the beginning of the\n      *              chain so that the internal ptw32_selfThreadKey association\n      *              is always last, thus allowing selfThreadExit to\n      *              be implicitly called last by pthread_exit.\n      *      2)      \n      *\n      * Parameters:\n      *              thread\n      *                      current running thread.\n      *              key\n      *                      key on which to create an association.\n      * Returns:\n      *       0              - if successful,\n      *       ENOMEM         - not enough memory to create assoc or other object\n      *       EINVAL         - an internal error occurred\n      *       ENOSYS         - an internal error occurred\n      * -------------------------------------------------------------------\n      */\n{\n  ThreadKeyAssoc *assoc;\n\n  /*\n   * Have to create an association and add it\n   * to both the key and the thread.\n   *\n   * Both key->keyLock and thread->threadLock are locked on\n   * entry to this routine.\n   */\n  assoc = (ThreadKeyAssoc *) calloc (1, sizeof (*assoc));\n\n  if (assoc == NULL)\n    {\n      return ENOMEM;\n    }\n\n  assoc->thread = sp;\n  assoc->key = key;\n\n  /*\n   * Register assoc with key\n   */\n  assoc->prevThread = NULL;\n  assoc->nextThread = (ThreadKeyAssoc *) key->threads;\n  if (assoc->nextThread != NULL)\n    {\n      assoc->nextThread->prevThread = assoc;\n    }\n  key->threads = (void *) assoc;\n\n  /*\n   * Register assoc with thread\n   */\n  assoc->prevKey = NULL;\n  assoc->nextKey = (ThreadKeyAssoc *) sp->keys;\n  if (assoc->nextKey != NULL)\n    {\n      assoc->nextKey->prevKey = assoc;\n    }\n  sp->keys = (void *) assoc;\n\n  return (0);\n\n}\t\t\t\t/* ptw32_tkAssocCreate */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/ptw32_tkAssocDestroy.c",
    "content": "/*\n * ptw32_tkAssocDestroy.c\n *\n * Description:\n * This translation unit implements routines which are private to\n * the implementation and may be used throughout it.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nvoid\nptw32_tkAssocDestroy (ThreadKeyAssoc * assoc)\n     /*\n      * -------------------------------------------------------------------\n      * This routine releases all resources for the given ThreadKeyAssoc\n      * once it is no longer being referenced\n      * ie) either the key or thread has stopped referencing it.\n      *\n      * Parameters:\n      *              assoc\n      *                      an instance of ThreadKeyAssoc.\n      * Returns:\n      *      N/A\n      * -------------------------------------------------------------------\n      */\n{\n\n  /*\n   * Both key->keyLock and thread->threadLock are locked on\n   * entry to this routine.\n   */\n  if (assoc != NULL)\n    {\n      ThreadKeyAssoc * prev, * next;\n\n      /* Remove assoc from thread's keys chain */\n      prev = assoc->prevKey;\n      next = assoc->nextKey;\n      if (prev != NULL)\n\t{\n\t  prev->nextKey = next;\n\t}\n      if (next != NULL)\n\t{\n\t  next->prevKey = prev;\n\t}\n\n      if (assoc->thread->keys == assoc)\n\t{\n\t  /* We're at the head of the thread's keys chain */\n\t  assoc->thread->keys = next;\n\t}\n      if (assoc->thread->nextAssoc == assoc)\n\t{\n\t  /*\n\t   * Thread is exiting and we're deleting the assoc to be processed next.\n\t   * Hand thread the assoc after this one.\n\t   */\n\t  assoc->thread->nextAssoc = next;\n\t}\n\n      /* Remove assoc from key's threads chain */\n      prev = assoc->prevThread;\n      next = assoc->nextThread;\n      if (prev != NULL)\n\t{\n\t  prev->nextThread = next;\n\t}\n      if (next != NULL)\n\t{\n\t  next->prevThread = prev;\n\t}\n\n      if (assoc->key->threads == assoc)\n\t{\n\t  /* We're at the head of the key's threads chain */\n\t  assoc->key->threads = next;\n\t}\n\n      free (assoc);\n    }\n\n}\t\t\t\t/* ptw32_tkAssocDestroy */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/rwlock.c",
    "content": "/*\n * rwlock.c\n *\n * Description:\n * This translation unit implements read/write lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"ptw32_rwlock_check_need_init.c\"\n#include \"ptw32_rwlock_cancelwrwait.c\"\n#include \"pthread_rwlock_init.c\"\n#include \"pthread_rwlock_destroy.c\"\n#include \"pthread_rwlockattr_init.c\"\n#include \"pthread_rwlockattr_destroy.c\"\n#include \"pthread_rwlockattr_getpshared.c\"\n#include \"pthread_rwlockattr_setpshared.c\"\n#include \"pthread_rwlock_rdlock.c\"\n#include \"pthread_rwlock_timedrdlock.c\"\n#include \"pthread_rwlock_wrlock.c\"\n#include \"pthread_rwlock_timedwrlock.c\"\n#include \"pthread_rwlock_unlock.c\"\n#include \"pthread_rwlock_tryrdlock.c\"\n#include \"pthread_rwlock_trywrlock.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sched.c",
    "content": "/*\n * sched.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\n#include \"pthread_attr_setschedpolicy.c\"\n#include \"pthread_attr_getschedpolicy.c\"\n#include \"pthread_attr_setschedparam.c\"\n#include \"pthread_attr_getschedparam.c\"\n#include \"pthread_attr_setinheritsched.c\"\n#include \"pthread_attr_getinheritsched.c\"\n#include \"pthread_setschedparam.c\"\n#include \"pthread_getschedparam.c\"\n#include \"sched_get_priority_max.c\"\n#include \"sched_get_priority_min.c\"\n#include \"sched_setscheduler.c\"\n#include \"sched_getscheduler.c\"\n#include \"sched_yield.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sched.h",
    "content": "/*\n * Module: sched.h\n *\n * Purpose:\n *      Provides an implementation of POSIX realtime extensions\n *      as defined in \n *\n *              POSIX 1003.1b-1993      (POSIX.1b)\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n#ifndef _SCHED_H\n#define _SCHED_H\n\n#undef PTW32_LEVEL\n\n#if defined(_POSIX_SOURCE)\n#define PTW32_LEVEL 0\n/* Early POSIX */\n#endif\n\n#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309\n#undef PTW32_LEVEL\n#define PTW32_LEVEL 1\n/* Include 1b, 1c and 1d */\n#endif\n\n#if defined(INCLUDE_NP)\n#undef PTW32_LEVEL\n#define PTW32_LEVEL 2\n/* Include Non-Portable extensions */\n#endif\n\n#define PTW32_LEVEL_MAX 3\n\n#if !defined(PTW32_LEVEL)\n#define PTW32_LEVEL PTW32_LEVEL_MAX\n/* Include everything */\n#endif\n\n\n#if __GNUC__ && ! defined (__declspec)\n# error Please upgrade your GNU compiler to one that supports __declspec.\n#endif\n\n/*\n * When building the DLL code, you should define PTW32_BUILD so that\n * the variables/functions are exported correctly. When using the DLL,\n * do NOT define PTW32_BUILD, and then the variables/functions will\n * be imported correctly.\n */\n#ifndef PTW32_STATIC_LIB\n#  ifdef PTW32_BUILD\n#    define PTW32_DLLPORT __declspec (dllexport)\n#  else\n#    define PTW32_DLLPORT __declspec (dllimport)\n#  endif\n#else\n#  define PTW32_DLLPORT\n#endif\n\n/*\n * This is a duplicate of what is in the autoconf config.h,\n * which is only used when building the pthread-win32 libraries.\n */\n\n#ifndef PTW32_CONFIG_H\n#  if defined(WINCE)\n#    define NEED_ERRNO\n#    define NEED_SEM\n#  endif\n#  if defined(_UWIN) || defined(__MINGW32__)\n#    define HAVE_MODE_T\n#  endif\n#endif\n\n/*\n *\n */\n\n#if PTW32_LEVEL >= PTW32_LEVEL_MAX\n#ifdef NEED_ERRNO\n#include \"need_errno.h\"\n#else\n#include <errno.h>\n#endif\n#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\n\n#if defined(__MINGW32__) || defined(_UWIN)\n#if PTW32_LEVEL >= PTW32_LEVEL_MAX\n/* For pid_t */\n#  include <sys/types.h>\n/* Required by Unix 98 */\n#  include <time.h>\n#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\n#else\ntypedef int pid_t;\n#endif\n\n/* Thread scheduling policies */\n\nenum {\n  SCHED_OTHER = 0,\n  SCHED_FIFO,\n  SCHED_RR,\n  SCHED_MIN   = SCHED_OTHER,\n  SCHED_MAX   = SCHED_RR\n};\n\nstruct sched_param {\n  int sched_priority;\n};\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif                          /* __cplusplus */\n\nPTW32_DLLPORT int __cdecl sched_yield (void);\n\nPTW32_DLLPORT int __cdecl sched_get_priority_min (int policy);\n\nPTW32_DLLPORT int __cdecl sched_get_priority_max (int policy);\n\nPTW32_DLLPORT int __cdecl sched_setscheduler (pid_t pid, int policy);\n\nPTW32_DLLPORT int __cdecl sched_getscheduler (pid_t pid);\n\n/*\n * Note that this macro returns ENOTSUP rather than\n * ENOSYS as might be expected. However, returning ENOSYS\n * should mean that sched_get_priority_{min,max} are\n * not implemented as well as sched_rr_get_interval.\n * This is not the case, since we just don't support\n * round-robin scheduling. Therefore I have chosen to\n * return the same value as sched_setscheduler when\n * SCHED_RR is passed to it.\n */\n#define sched_rr_get_interval(_pid, _interval) \\\n  ( errno = ENOTSUP, (int) -1 )\n\n\n#ifdef __cplusplus\n}                               /* End of extern \"C\" */\n#endif                          /* __cplusplus */\n\n#undef PTW32_LEVEL\n#undef PTW32_LEVEL_MAX\n\n#endif                          /* !_SCHED_H */\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sched_get_priority_max.c",
    "content": "/*\n * sched_get_priority_max.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\n/*\n * On Windows98, THREAD_PRIORITY_LOWEST is (-2) and \n * THREAD_PRIORITY_HIGHEST is 2, and everything works just fine.\n * \n * On WinCE 3.0, it so happen that THREAD_PRIORITY_LOWEST is 5\n * and THREAD_PRIORITY_HIGHEST is 1 (yes, I know, it is funny:\n * highest priority use smaller numbers) and the following happens:\n * \n * sched_get_priority_min() returns 5\n * sched_get_priority_max() returns 1\n *\n * The following table shows the base priority levels for combinations\n * of priority class and priority value in Win32.\n *\n *   Process Priority Class               Thread Priority Level\n *   -----------------------------------------------------------------\n *   1 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_IDLE\n *   1 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_IDLE\n *   1 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_IDLE\n *   1 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_IDLE\n *   1 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_IDLE\n *   2 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_LOWEST\n *   3 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_BELOW_NORMAL\n *   4 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_NORMAL\n *   4 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_LOWEST\n *   5 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_ABOVE_NORMAL\n *   5 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_BELOW_NORMAL\n *   5 Background NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_LOWEST\n *   6 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_HIGHEST\n *   6 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_NORMAL\n *   6 Background NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_BELOW_NORMAL\n *   7 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_ABOVE_NORMAL\n *   7 Background NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_NORMAL\n *   7 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_LOWEST\n *   8 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_HIGHEST\n *   8 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_ABOVE_NORMAL\n *   8 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_BELOW_NORMAL\n *   8 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_LOWEST\n *   9 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_HIGHEST\n *   9 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_NORMAL\n *   9 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_BELOW_NORMAL\n *  10 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_ABOVE_NORMAL\n *  10 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_NORMAL\n *  11 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_HIGHEST\n *  11 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_ABOVE_NORMAL\n *  11 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_LOWEST\n *  12 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_HIGHEST\n *  12 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_BELOW_NORMAL\n *  13 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_NORMAL\n *  14 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_ABOVE_NORMAL\n *  15 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_HIGHEST\n *  15 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_TIME_CRITICAL\n *  15 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_TIME_CRITICAL\n *  15 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_TIME_CRITICAL\n *  15 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_TIME_CRITICAL\n *  15 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_TIME_CRITICAL\n *  16 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_IDLE\n *  17 REALTIME_PRIORITY_CLASS            -7\n *  18 REALTIME_PRIORITY_CLASS            -6\n *  19 REALTIME_PRIORITY_CLASS            -5\n *  20 REALTIME_PRIORITY_CLASS            -4\n *  21 REALTIME_PRIORITY_CLASS            -3\n *  22 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_LOWEST\n *  23 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_BELOW_NORMAL\n *  24 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_NORMAL\n *  25 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_ABOVE_NORMAL\n *  26 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_HIGHEST\n *  27 REALTIME_PRIORITY_CLASS             3\n *  28 REALTIME_PRIORITY_CLASS             4\n *  29 REALTIME_PRIORITY_CLASS             5\n *  30 REALTIME_PRIORITY_CLASS             6\n *  31 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_TIME_CRITICAL\n *\n * Windows NT:  Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported.\n */\n\n\nint\nsched_get_priority_max (int policy)\n{\n  if (policy < SCHED_MIN || policy > SCHED_MAX)\n    {\n      errno = EINVAL;\n      return -1;\n    }\n\n#if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL)\n  /* WinCE? */\n  return PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL);\n#else\n  /* This is independent of scheduling policy in Win32. */\n  return PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL);\n#endif\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sched_get_priority_min.c",
    "content": "/*\n * sched_get_priority_min.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\n/*\n * On Windows98, THREAD_PRIORITY_LOWEST is (-2) and \n * THREAD_PRIORITY_HIGHEST is 2, and everything works just fine.\n * \n * On WinCE 3.0, it so happen that THREAD_PRIORITY_LOWEST is 5\n * and THREAD_PRIORITY_HIGHEST is 1 (yes, I know, it is funny:\n * highest priority use smaller numbers) and the following happens:\n * \n * sched_get_priority_min() returns 5\n * sched_get_priority_max() returns 1\n *\n * The following table shows the base priority levels for combinations\n * of priority class and priority value in Win32.\n *\n *   Process Priority Class               Thread Priority Level\n *   -----------------------------------------------------------------\n *   1 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_IDLE\n *   1 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_IDLE\n *   1 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_IDLE\n *   1 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_IDLE\n *   1 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_IDLE\n *   2 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_LOWEST\n *   3 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_BELOW_NORMAL\n *   4 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_NORMAL\n *   4 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_LOWEST\n *   5 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_ABOVE_NORMAL\n *   5 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_BELOW_NORMAL\n *   5 Background NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_LOWEST\n *   6 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_HIGHEST\n *   6 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_NORMAL\n *   6 Background NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_BELOW_NORMAL\n *   7 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_ABOVE_NORMAL\n *   7 Background NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_NORMAL\n *   7 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_LOWEST\n *   8 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_HIGHEST\n *   8 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_ABOVE_NORMAL\n *   8 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_BELOW_NORMAL\n *   8 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_LOWEST\n *   9 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_HIGHEST\n *   9 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_NORMAL\n *   9 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_BELOW_NORMAL\n *  10 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_ABOVE_NORMAL\n *  10 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_NORMAL\n *  11 Foreground NORMAL_PRIORITY_CLASS   THREAD_PRIORITY_HIGHEST\n *  11 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_ABOVE_NORMAL\n *  11 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_LOWEST\n *  12 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_HIGHEST\n *  12 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_BELOW_NORMAL\n *  13 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_NORMAL\n *  14 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_ABOVE_NORMAL\n *  15 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_HIGHEST\n *  15 HIGH_PRIORITY_CLASS                THREAD_PRIORITY_TIME_CRITICAL\n *  15 IDLE_PRIORITY_CLASS                THREAD_PRIORITY_TIME_CRITICAL\n *  15 BELOW_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_TIME_CRITICAL\n *  15 NORMAL_PRIORITY_CLASS              THREAD_PRIORITY_TIME_CRITICAL\n *  15 ABOVE_NORMAL_PRIORITY_CLASS        THREAD_PRIORITY_TIME_CRITICAL\n *  16 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_IDLE\n *  17 REALTIME_PRIORITY_CLASS            -7\n *  18 REALTIME_PRIORITY_CLASS            -6\n *  19 REALTIME_PRIORITY_CLASS            -5\n *  20 REALTIME_PRIORITY_CLASS            -4\n *  21 REALTIME_PRIORITY_CLASS            -3\n *  22 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_LOWEST\n *  23 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_BELOW_NORMAL\n *  24 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_NORMAL\n *  25 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_ABOVE_NORMAL\n *  26 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_HIGHEST\n *  27 REALTIME_PRIORITY_CLASS             3\n *  28 REALTIME_PRIORITY_CLASS             4\n *  29 REALTIME_PRIORITY_CLASS             5\n *  30 REALTIME_PRIORITY_CLASS             6\n *  31 REALTIME_PRIORITY_CLASS            THREAD_PRIORITY_TIME_CRITICAL\n *\n * Windows NT:  Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported.\n *\n */\n\n\nint\nsched_get_priority_min (int policy)\n{\n  if (policy < SCHED_MIN || policy > SCHED_MAX)\n    {\n      errno = EINVAL;\n      return -1;\n    }\n\n#if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL)\n  /* WinCE? */\n  return PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL);\n#else\n  /* This is independent of scheduling policy in Win32. */\n  return PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL);\n#endif\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sched_getscheduler.c",
    "content": "/*\n * sched_getscheduler.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\nsched_getscheduler (pid_t pid)\n{\n  /*\n   * Win32 only has one policy which we call SCHED_OTHER.\n   * However, we try to provide other valid side-effects\n   * such as EPERM and ESRCH errors.\n   */\n  if (0 != pid)\n    {\n      int selfPid = (int) GetCurrentProcessId ();\n\n      if (pid != selfPid)\n\t{\n\t  HANDLE h =\n\t    OpenProcess (PROCESS_QUERY_INFORMATION, PTW32_FALSE, (DWORD) pid);\n\n\t  if (NULL == h)\n\t    {\n\t      errno =\n\t\t(GetLastError () ==\n\t\t (0xFF & ERROR_ACCESS_DENIED)) ? EPERM : ESRCH;\n\t      return -1;\n\t    }\n\t}\n    }\n\n  return SCHED_OTHER;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sched_setscheduler.c",
    "content": "/*\n * sched_setscheduler.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\nsched_setscheduler (pid_t pid, int policy)\n{\n  /*\n   * Win32 only has one policy which we call SCHED_OTHER.\n   * However, we try to provide other valid side-effects\n   * such as EPERM and ESRCH errors. Choosing to check\n   * for a valid policy last allows us to get the most value out\n   * of this function.\n   */\n  if (0 != pid)\n    {\n      int selfPid = (int) GetCurrentProcessId ();\n\n      if (pid != selfPid)\n\t{\n\t  HANDLE h =\n\t    OpenProcess (PROCESS_SET_INFORMATION, PTW32_FALSE, (DWORD) pid);\n\n\t  if (NULL == h)\n\t    {\n\t      errno =\n\t\t(GetLastError () ==\n\t\t (0xFF & ERROR_ACCESS_DENIED)) ? EPERM : ESRCH;\n\t      return -1;\n\t    }\n\t}\n    }\n\n  if (SCHED_OTHER != policy)\n    {\n      errno = ENOSYS;\n      return -1;\n    }\n\n  /*\n   * Don't set anything because there is nothing to set.\n   * Just return the current (the only possible) value.\n   */\n  return SCHED_OTHER;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sched_yield.c",
    "content": "/*\n * sched_yield.c\n * \n * Description:\n * POSIX thread functions that deal with thread scheduling.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n#include \"sched.h\"\n\nint\nsched_yield (void)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function indicates that the calling thread is\n      *      willing to give up some time slices to other threads.\n      *\n      * PARAMETERS\n      *      N/A\n      *\n      *\n      * DESCRIPTION\n      *      This function indicates that the calling thread is\n      *      willing to give up some time slices to other threads.\n      *      NOTE: Since this is part of POSIX 1003.1b\n      *                (realtime extensions), it is defined as returning\n      *                -1 if an error occurs and sets errno to the actual\n      *                error.\n      *\n      * RESULTS\n      *              0               successfully created semaphore,\n      *              ENOSYS          sched_yield not supported,\n      *\n      * ------------------------------------------------------\n      */\n{\n  Sleep (0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_close.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_close.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n/* ignore warning \"unreferenced formal parameter\" */\n#ifdef _MSC_VER\n#pragma warning( disable : 4100 )\n#endif\n\nint\nsem_close (sem_t * sem)\n{\n  errno = ENOSYS;\n  return -1;\n}\t\t\t\t/* sem_close */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_destroy.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_destroy.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n\nint\nsem_destroy (sem_t * sem)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function destroys an unnamed semaphore.\n      *\n      * PARAMETERS\n      *      sem\n      *              pointer to an instance of sem_t\n      *\n      * DESCRIPTION\n      *      This function destroys an unnamed semaphore.\n      *\n      * RESULTS\n      *              0               successfully destroyed semaphore,\n      *              -1              failed, error in errno\n      * ERRNO\n      *              EINVAL          'sem' is not a valid semaphore,\n      *              ENOSYS          semaphores are not supported,\n      *              EBUSY           threads (or processes) are currently\n      *                                      blocked on 'sem'\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  sem_t s = NULL;\n\n  if (sem == NULL || *sem == NULL)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      s = *sem;\n\n      if ((result = pthread_mutex_lock (&s->lock)) == 0)\n        {\n          if (s->value < 0)\n            {\n              (void) pthread_mutex_unlock (&s->lock);\n              result = EBUSY;\n            }\n          else\n            {\n              /* There are no threads currently blocked on this semaphore. */\n\n              if (!CloseHandle (s->sem))\n\t        {\n                  (void) pthread_mutex_unlock (&s->lock);\n\t          result = EINVAL;\n\t        }\n\t      else\n\t        {\n                  /*\n                   * Invalidate the semaphore handle when we have the lock.\n                   * Other sema operations should test this after acquiring the lock\n                   * to check that the sema is still valid, i.e. before performing any\n                   * operations. This may only be necessary before the sema op routine\n                   * returns so that the routine can return EINVAL - e.g. if setting\n                   * s->value to SEM_VALUE_MAX below does force a fall-through.\n                   */\n                  *sem = NULL;\n\n                  /* Prevent anyone else actually waiting on or posting this sema.\n                   */\n                  s->value = SEM_VALUE_MAX;\n\n                  (void) pthread_mutex_unlock (&s->lock);\n\n                  do\n                    {\n                      /* Give other threads a chance to run and exit any sema op\n                       * routines. Due to the SEM_VALUE_MAX value, if sem_post or\n                       * sem_wait were blocked by us they should fall through.\n                       */\n                      Sleep(0);\n                    }\n                  while (pthread_mutex_destroy (&s->lock) == EBUSY);\n                }\n            }\n        }\n    }\n\n  if (result != 0)\n    {\n      errno = result;\n      return -1;\n    }\n\n  free (s);\n\n  return 0;\n\n}\t\t\t\t/* sem_destroy */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_getvalue.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_getvalue.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of PThreads.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1-2001\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n\nint\nsem_getvalue (sem_t * sem, int *sval)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function stores the current count value of the\n      *      semaphore.\n      * RESULTS\n      *\n      * Return value\n      *\n      *       0                  sval has been set.\n      *      -1                  failed, error in errno\n      *\n      *  in global errno\n      *\n      *      EINVAL              'sem' is not a valid semaphore,\n      *      ENOSYS              this function is not supported,\n      *\n      *\n      * PARAMETERS\n      *\n      *      sem                 pointer to an instance of sem_t\n      *\n      *      sval                pointer to int.\n      *\n      * DESCRIPTION\n      *      This function stores the current count value of the semaphore\n      *      pointed to by sem in the int pointed to by sval.\n      */\n{\n  if (sem == NULL || *sem == NULL || sval == NULL)\n    {\n      errno = EINVAL;\n      return -1;\n    }\n  else\n    {\n      long value;\n      register sem_t s = *sem;\n      int result = 0;\n\n      if ((result = pthread_mutex_lock(&s->lock)) == 0)\n        {\n\t  /* See sem_destroy.c\n\t   */\n\t  if (*sem == NULL)\n\t    {\n\t      (void) pthread_mutex_unlock (&s->lock);\n\t      errno = EINVAL;\n\t      return -1;\n\t    }\n\n          value = s->value;\n          (void) pthread_mutex_unlock(&s->lock);\n          *sval = value;\n        }\n\n      return result;\n    }\n\n}\t\t\t\t/* sem_getvalue */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_init.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_init.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of PThreads.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1-2001\n *\n * -------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\nint\nsem_init (sem_t * sem, int pshared, unsigned int value)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function initializes a semaphore. The\n      *      initial value of the semaphore is 'value'\n      *\n      * PARAMETERS\n      *      sem\n      *              pointer to an instance of sem_t\n      *\n      *      pshared\n      *              if zero, this semaphore may only be shared between\n      *              threads in the same process.\n      *              if nonzero, the semaphore can be shared between\n      *              processes\n      *\n      *      value\n      *              initial value of the semaphore counter\n      *\n      * DESCRIPTION\n      *      This function initializes a semaphore. The\n      *      initial value of the semaphore is set to 'value'.\n      *\n      * RESULTS\n      *              0               successfully created semaphore,\n      *              -1              failed, error in errno\n      * ERRNO\n      *              EINVAL          'sem' is not a valid semaphore, or\n      *                              'value' >= SEM_VALUE_MAX\n      *              ENOMEM          out of memory,\n      *              ENOSPC          a required resource has been exhausted,\n      *              ENOSYS          semaphores are not supported,\n      *              EPERM           the process lacks appropriate privilege\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  sem_t s = NULL;\n\n  if (pshared != 0)\n    {\n      /*\n       * Creating a semaphore that can be shared between\n       * processes\n       */\n      result = EPERM;\n    }\n  else if (value > (unsigned int)SEM_VALUE_MAX)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      s = (sem_t) calloc (1, sizeof (*s));\n\n      if (NULL == s)\n\t{\n\t  result = ENOMEM;\n\t}\n      else\n\t{\n\n\t  s->value = value;\n\t  if (pthread_mutex_init(&s->lock, NULL) == 0)\n\t    {\n\n#ifdef NEED_SEM\n\n\t  s->sem = CreateEvent (NULL,\n\t\t\t\tPTW32_FALSE,\t/* auto (not manual) reset */\n\t\t\t\tPTW32_FALSE,\t/* initial state is unset */\n\t\t\t\tNULL);\n\n\t  if (0 == s->sem)\n\t    {\n\t      free (s);\n\t      (void) pthread_mutex_destroy(&s->lock);\n\t      result = ENOSPC;\n\t    }\n\t  else\n\t    {\n\t      s->leftToUnblock = 0;\n\t    }\n\n#else /* NEED_SEM */\n\n\t      if ((s->sem = CreateSemaphore (NULL,\t/* Always NULL */\n\t\t\t\t\t     (long) 0,\t/* Force threads to wait */\n\t\t\t\t\t     (long) SEM_VALUE_MAX,\t/* Maximum value */\n\t\t\t\t\t     NULL)) == 0)\t/* Name */\n\t\t{\n\t\t  (void) pthread_mutex_destroy(&s->lock);\n\t\t  result = ENOSPC;\n\t\t}\n\n#endif /* NEED_SEM */\n\n\t    }\n\t  else\n\t    {\n\t      result = ENOSPC;\n\t    }\n\n\t  if (result != 0)\n\t    {\n\t      free(s);\n\t    }\n\t}\n    }\n\n  if (result != 0)\n    {\n      errno = result;\n      return -1;\n    }\n\n  *sem = s;\n\n  return 0;\n\n}\t\t\t\t/* sem_init */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_open.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_open.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n/* ignore warning \"unreferenced formal parameter\" */\n#ifdef _MSC_VER\n#pragma warning( disable : 4100 )\n#endif\n\nint\nsem_open (const char *name, int oflag, mode_t mode, unsigned int value)\n{\n  errno = ENOSYS;\n  return -1;\n}\t\t\t\t/* sem_open */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_post.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_post.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n\nint\nsem_post (sem_t * sem)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function posts a wakeup to a semaphore.\n      *\n      * PARAMETERS\n      *      sem\n      *              pointer to an instance of sem_t\n      *\n      * DESCRIPTION\n      *      This function posts a wakeup to a semaphore. If there\n      *      are waiting threads (or processes), one is awakened;\n      *      otherwise, the semaphore value is incremented by one.\n      *\n      * RESULTS\n      *              0               successfully posted semaphore,\n      *              -1              failed, error in errno\n      * ERRNO\n      *              EINVAL          'sem' is not a valid semaphore,\n      *              ENOSYS          semaphores are not supported,\n      *              ERANGE          semaphore count is too big\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  sem_t s = *sem;\n\n  if (s == NULL)\n    {\n      result = EINVAL;\n    }\n  else if ((result = pthread_mutex_lock (&s->lock)) == 0)\n    {\n      /* See sem_destroy.c\n       */\n      if (*sem == NULL)\n        {\n          (void) pthread_mutex_unlock (&s->lock);\n          result = EINVAL;\n          return -1;\n        }\n\n      if (s->value < SEM_VALUE_MAX)\n\t{\n#ifdef NEED_SEM\n\t  if (++s->value <= 0\n\t      && !SetEvent(s->sem))\n\t    {\n\t      s->value--;\n\t      result = EINVAL;\n\t    }\n#else\n\t  if (++s->value <= 0\n\t      && !ReleaseSemaphore (s->sem, 1, NULL))\n\t    {\n\t      s->value--;\n\t      result = EINVAL;\n\t    }\n#endif /* NEED_SEM */\n\t}\n      else\n\t{\n\t  result = ERANGE;\n\t}\n\n      (void) pthread_mutex_unlock (&s->lock);\n    }\n\n  if (result != 0)\n    {\n      errno = result;\n      return -1;\n    }\n\n  return 0;\n\n}\t\t\t\t/* sem_post */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_post_multiple.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_post_multiple.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n\nint\nsem_post_multiple (sem_t * sem, int count)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function posts multiple wakeups to a semaphore.\n      *\n      * PARAMETERS\n      *      sem\n      *              pointer to an instance of sem_t\n      *\n      *      count\n      *              counter, must be greater than zero.\n      *\n      * DESCRIPTION\n      *      This function posts multiple wakeups to a semaphore. If there\n      *      are waiting threads (or processes), n <= count are awakened;\n      *      the semaphore value is incremented by count - n.\n      *\n      * RESULTS\n      *              0               successfully posted semaphore,\n      *              -1              failed, error in errno\n      * ERRNO\n      *              EINVAL          'sem' is not a valid semaphore\n      *                              or count is less than or equal to zero.\n      *              ERANGE          semaphore count is too big\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  long waiters;\n  sem_t s = *sem;\n\n  if (s == NULL || count <= 0)\n    {\n      result = EINVAL;\n    }\n  else if ((result = pthread_mutex_lock (&s->lock)) == 0)\n    {\n      /* See sem_destroy.c\n       */\n      if (*sem == NULL)\n        {\n          (void) pthread_mutex_unlock (&s->lock);\n          result = EINVAL;\n          return -1;\n        }\n\n      if (s->value <= (SEM_VALUE_MAX - count))\n\t{\n\t  waiters = -s->value;\n\t  s->value += count;\n\t  if (waiters > 0)\n\t    {\n#ifdef NEED_SEM\n\t      if (SetEvent(s->sem))\n\t\t{\n\t\t  waiters--;\n\t\t  s->leftToUnblock += count - 1;\n\t\t  if (s->leftToUnblock > waiters)\n\t\t    {\n\t\t      s->leftToUnblock = waiters;\n\t\t    }\n\t\t}\n#else\n\t      if (ReleaseSemaphore (s->sem,  (waiters<=count)?waiters:count, 0))\n\t\t{\n\t\t  /* No action */\n\t\t}\n#endif\n\t      else\n\t\t{\n\t\t  s->value -= count;\n\t\t  result = EINVAL;\n\t\t}\n\t    }\n\t}\n      else\n\t{\n\t  result = ERANGE;\n\t}\n      (void) pthread_mutex_unlock (&s->lock);\n    }\n\n  if (result != 0)\n    {\n      errno = result;\n      return -1;\n    }\n\n  return 0;\n\n}\t\t\t\t/* sem_post_multiple */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_timedwait.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_timedwait.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n\ntypedef struct {\n  sem_t sem;\n  int * resultPtr;\n} sem_timedwait_cleanup_args_t;\n\n\nstatic void PTW32_CDECL\nptw32_sem_timedwait_cleanup (void * args)\n{\n  sem_timedwait_cleanup_args_t * a = (sem_timedwait_cleanup_args_t *)args;\n  sem_t s = a->sem;\n\n  if (pthread_mutex_lock (&s->lock) == 0)\n    {\n      /*\n       * We either timed out or were cancelled.\n       * If someone has posted between then and now we try to take the semaphore.\n       * Otherwise the semaphore count may be wrong after we\n       * return. In the case of a cancellation, it is as if we\n       * were cancelled just before we return (after taking the semaphore)\n       * which is ok.\n       */\n      if (WaitForSingleObject(s->sem, 0) == WAIT_OBJECT_0)\n\t{\n\t  /* We got the semaphore on the second attempt */\n\t  *(a->resultPtr) = 0;\n\t}\n      else\n\t{\n\t  /* Indicate we're no longer waiting */\n\t  s->value++;\n#ifdef NEED_SEM\n\t  if (s->value > 0)\n\t    {\n\t      s->leftToUnblock = 0;\n\t    }\n#else\n          /*\n           * Don't release the W32 sema, it doesn't need adjustment\n           * because it doesn't record the number of waiters.\n           */\n#endif\n\t}\n      (void) pthread_mutex_unlock (&s->lock);\n    }\n}\n\n\nint\nsem_timedwait (sem_t * sem, const struct timespec *abstime)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function waits on a semaphore possibly until\n      *      'abstime' time.\n      *\n      * PARAMETERS\n      *      sem\n      *              pointer to an instance of sem_t\n      *\n      *      abstime\n      *              pointer to an instance of struct timespec\n      *\n      * DESCRIPTION\n      *      This function waits on a semaphore. If the\n      *      semaphore value is greater than zero, it decreases\n      *      its value by one. If the semaphore value is zero, then\n      *      the calling thread (or process) is blocked until it can\n      *      successfully decrease the value or until interrupted by\n      *      a signal.\n      *\n      *      If 'abstime' is a NULL pointer then this function will\n      *      block until it can successfully decrease the value or\n      *      until interrupted by a signal.\n      *\n      * RESULTS\n      *              0               successfully decreased semaphore,\n      *              -1              failed, error in errno\n      * ERRNO\n      *              EINVAL          'sem' is not a valid semaphore,\n      *              ENOSYS          semaphores are not supported,\n      *              EINTR           the function was interrupted by a signal,\n      *              EDEADLK         a deadlock condition was detected.\n      *              ETIMEDOUT       abstime elapsed before success.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  sem_t s = *sem;\n\n  pthread_testcancel();\n\n  if (sem == NULL)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      DWORD milliseconds;\n\n      if (abstime == NULL)\n\t{\n\t  milliseconds = INFINITE;\n\t}\n      else\n\t{\n\t  /* \n\t   * Calculate timeout as milliseconds from current system time. \n\t   */\n\t  milliseconds = ptw32_relmillisecs (abstime);\n\t}\n\n      if ((result = pthread_mutex_lock (&s->lock)) == 0)\n\t{\n\t  int v;\n\n\t  /* See sem_destroy.c\n\t   */\n\t  if (*sem == NULL)\n\t    {\n\t      (void) pthread_mutex_unlock (&s->lock);\n\t      errno = EINVAL;\n\t      return -1;\n\t    }\n\n\t  v = --s->value;\n\t  (void) pthread_mutex_unlock (&s->lock);\n\n\t  if (v < 0)\n\t    {\n#ifdef NEED_SEM\n\t      int timedout;\n#endif\n\t      sem_timedwait_cleanup_args_t cleanup_args;\n\n\t      cleanup_args.sem = s;\n\t      cleanup_args.resultPtr = &result;\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n\t      /* Must wait */\n              pthread_cleanup_push(ptw32_sem_timedwait_cleanup, (void *) &cleanup_args);\n#ifdef NEED_SEM\n\t      timedout =\n#endif\n\t      result = pthreadCancelableTimedWait (s->sem, milliseconds);\n\t      pthread_cleanup_pop(result);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n#ifdef NEED_SEM\n\n\t      if (!timedout && pthread_mutex_lock (&s->lock) == 0)\n\t        {\n        \t  if (*sem == NULL)\n        \t    {\n        \t      (void) pthread_mutex_unlock (&s->lock);\n        \t      errno = EINVAL;\n        \t      return -1;\n        \t    }\n\n\t          if (s->leftToUnblock > 0)\n\t            {\n\t\t      --s->leftToUnblock;\n\t\t      SetEvent(s->sem);\n\t\t    }\n\t          (void) pthread_mutex_unlock (&s->lock);\n\t        }\n\n#endif /* NEED_SEM */\n\n\t    }\n\t}\n\n    }\n\n  if (result != 0)\n    {\n\n      errno = result;\n      return -1;\n\n    }\n\n  return 0;\n\n}\t\t\t\t/* sem_timedwait */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_trywait.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_trywait.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n\nint\nsem_trywait (sem_t * sem)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function tries to wait on a semaphore.\n      *\n      * PARAMETERS\n      *      sem\n      *              pointer to an instance of sem_t\n      *\n      * DESCRIPTION\n      *      This function tries to wait on a semaphore. If the\n      *      semaphore value is greater than zero, it decreases\n      *      its value by one. If the semaphore value is zero, then\n      *      this function returns immediately with the error EAGAIN\n      *\n      * RESULTS\n      *              0               successfully decreased semaphore,\n      *              -1              failed, error in errno\n      * ERRNO\n      *              EAGAIN          the semaphore was already locked,\n      *              EINVAL          'sem' is not a valid semaphore,\n      *              ENOTSUP         sem_trywait is not supported,\n      *              EINTR           the function was interrupted by a signal,\n      *              EDEADLK         a deadlock condition was detected.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  sem_t s = *sem;\n\n  if (s == NULL)\n    {\n      result = EINVAL;\n    }\n  else if ((result = pthread_mutex_lock (&s->lock)) == 0)\n    {\n      /* See sem_destroy.c\n       */\n     if (*sem == NULL)\n        {\n          (void) pthread_mutex_unlock (&s->lock);\n          errno = EINVAL;\n          return -1;\n        }\n\n      if (s->value > 0)\n\t{\n\t  s->value--;\n\t}\n      else\n\t{\n\t  result = EAGAIN;\n\t}\n\n      (void) pthread_mutex_unlock (&s->lock);\n    }\n\n  if (result != 0)\n    {\n      errno = result;\n      return -1;\n    }\n\n  return 0;\n\n}\t\t\t\t/* sem_trywait */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_unlink.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_unlink.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n/* ignore warning \"unreferenced formal parameter\" */\n#ifdef _MSC_VER\n#pragma warning( disable : 4100 )\n#endif\n\nint\nsem_unlink (const char *name)\n{\n  errno = ENOSYS;\n  return -1;\n}\t\t\t\t/* sem_unlink */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sem_wait.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: sem_wait.c\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n\nstatic void PTW32_CDECL\nptw32_sem_wait_cleanup(void * sem)\n{\n  sem_t s = (sem_t) sem;\n\n  if (pthread_mutex_lock (&s->lock) == 0)\n    {\n      /*\n       * If sema is destroyed do nothing, otherwise:-\n       * If the sema is posted between us being cancelled and us locking\n       * the sema again above then we need to consume that post but cancel\n       * anyway. If we don't get the semaphore we indicate that we're no\n       * longer waiting.\n       */\n      if (*((sem_t *)sem) != NULL && !(WaitForSingleObject(s->sem, 0) == WAIT_OBJECT_0))\n\t{\n\t  ++s->value;\n#ifdef NEED_SEM\n\t  if (s->value > 0)\n\t    {\n\t      s->leftToUnblock = 0;\n\t    }\n#else\n\t  /*\n\t   * Don't release the W32 sema, it doesn't need adjustment\n\t   * because it doesn't record the number of waiters.\n\t   */\n#endif /* NEED_SEM */\n\t}\n      (void) pthread_mutex_unlock (&s->lock);\n    }\n}\n\nint\nsem_wait (sem_t * sem)\n     /*\n      * ------------------------------------------------------\n      * DOCPUBLIC\n      *      This function  waits on a semaphore.\n      *\n      * PARAMETERS\n      *      sem\n      *              pointer to an instance of sem_t\n      *\n      * DESCRIPTION\n      *      This function waits on a semaphore. If the\n      *      semaphore value is greater than zero, it decreases\n      *      its value by one. If the semaphore value is zero, then\n      *      the calling thread (or process) is blocked until it can\n      *      successfully decrease the value or until interrupted by\n      *      a signal.\n      *\n      * RESULTS\n      *              0               successfully decreased semaphore,\n      *              -1              failed, error in errno\n      * ERRNO\n      *              EINVAL          'sem' is not a valid semaphore,\n      *              ENOSYS          semaphores are not supported,\n      *              EINTR           the function was interrupted by a signal,\n      *              EDEADLK         a deadlock condition was detected.\n      *\n      * ------------------------------------------------------\n      */\n{\n  int result = 0;\n  sem_t s = *sem;\n\n  pthread_testcancel();\n\n  if (s == NULL)\n    {\n      result = EINVAL;\n    }\n  else\n    {\n      if ((result = pthread_mutex_lock (&s->lock)) == 0)\n\t{\n\t  int v;\n\n\t  /* See sem_destroy.c\n\t   */\n\t  if (*sem == NULL)\n\t    {\n\t      (void) pthread_mutex_unlock (&s->lock);\n\t      errno = EINVAL;\n\t      return -1;\n\t    }\n\n          v = --s->value;\n\t  (void) pthread_mutex_unlock (&s->lock);\n\n\t  if (v < 0)\n\t    {\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n\t      /* Must wait */\n\t      pthread_cleanup_push(ptw32_sem_wait_cleanup, (void *) s);\n\t      result = pthreadCancelableWait (s->sem);\n\t      /* Cleanup if we're canceled or on any other error */\n\t      pthread_cleanup_pop(result);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\t    }\n#ifdef NEED_SEM\n\n\t  if (!result && pthread_mutex_lock (&s->lock) == 0)\n\t    {\n\t      if (*sem == NULL)\n\t        {\n\t          (void) pthread_mutex_unlock (&s->lock);\n\t          errno = EINVAL;\n\t          return -1;\n\t        }\n\n\t      if (s->leftToUnblock > 0)\n\t\t{\n\t\t  --s->leftToUnblock;\n\t\t  SetEvent(s->sem);\n\t\t}\n\t      (void) pthread_mutex_unlock (&s->lock);\n\t    }\n\n#endif /* NEED_SEM */\n\n\t}\n\n    }\n\n  if (result != 0)\n    {\n      errno = result;\n      return -1;\n    }\n\n  return 0;\n\n}\t\t\t\t/* sem_wait */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/semaphore.c",
    "content": "/*\n * -------------------------------------------------------------\n *\n * Module: semaphore.c\n *\n * Purpose:\n *\tConcatenated version of separate modules to allow\n *\tinlining optimisation, which it is assumed can only\n *\tbe effective within a single module.\n *\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * -------------------------------------------------------------\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#ifndef NEED_FTIME\n#  include <sys/timeb.h>\n#endif\n\n#include <limits.h>\n\n#include \"pthread.h\"\n#include \"semaphore.h\"\n#include \"implement.h\"\n\n\n#include \"sem_init.c\"\n#include \"sem_destroy.c\"\n#include \"sem_trywait.c\"\n#include \"sem_wait.c\"\n#include \"sem_timedwait.c\"\n#include \"sem_post.c\"\n#include \"sem_post_multiple.c\"\n#include \"sem_getvalue.c\"\n#include \"sem_open.c\"\n#include \"sem_close.c\"\n#include \"sem_unlink.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/semaphore.h",
    "content": "/*\n * Module: semaphore.h\n *\n * Purpose:\n *\tSemaphores aren't actually part of the PThreads standard.\n *\tThey are defined by the POSIX Standard:\n *\n *\t\tPOSIX 1003.1b-1993\t(POSIX.1b)\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n#if !defined( SEMAPHORE_H )\n#define SEMAPHORE_H\n\n#undef PTW32_LEVEL\n\n#if defined(_POSIX_SOURCE)\n#define PTW32_LEVEL 0\n/* Early POSIX */\n#endif\n\n#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309\n#undef PTW32_LEVEL\n#define PTW32_LEVEL 1\n/* Include 1b, 1c and 1d */\n#endif\n\n#if defined(INCLUDE_NP)\n#undef PTW32_LEVEL\n#define PTW32_LEVEL 2\n/* Include Non-Portable extensions */\n#endif\n\n#define PTW32_LEVEL_MAX 3\n\n#if !defined(PTW32_LEVEL)\n#define PTW32_LEVEL PTW32_LEVEL_MAX\n/* Include everything */\n#endif\n\n#if __GNUC__ && ! defined (__declspec)\n# error Please upgrade your GNU compiler to one that supports __declspec.\n#endif\n\n/*\n * When building the DLL code, you should define PTW32_BUILD so that\n * the variables/functions are exported correctly. When using the DLL,\n * do NOT define PTW32_BUILD, and then the variables/functions will\n * be imported correctly.\n */\n#ifndef PTW32_STATIC_LIB\n#  ifdef PTW32_BUILD\n#    define PTW32_DLLPORT __declspec (dllexport)\n#  else\n#    define PTW32_DLLPORT __declspec (dllimport)\n#  endif\n#else\n#  define PTW32_DLLPORT\n#endif\n\n/*\n * This is a duplicate of what is in the autoconf config.h,\n * which is only used when building the pthread-win32 libraries.\n */\n\n#ifndef PTW32_CONFIG_H\n#  if defined(WINCE)\n#    define NEED_ERRNO\n#    define NEED_SEM\n#  endif\n#  if defined(_UWIN) || defined(__MINGW32__)\n#    define HAVE_MODE_T\n#  endif\n#endif\n\n/*\n *\n */\n\n#if PTW32_LEVEL >= PTW32_LEVEL_MAX\n#ifdef NEED_ERRNO\n#include \"need_errno.h\"\n#else\n#include <errno.h>\n#endif\n#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\n\n#define _POSIX_SEMAPHORES\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\t\t\t\t/* __cplusplus */\n\n#ifndef HAVE_MODE_T\ntypedef unsigned int mode_t;\n#endif\n\n\ntypedef struct sem_t_ * sem_t;\n\nPTW32_DLLPORT int __cdecl sem_init (sem_t * sem,\n\t\t\t    int pshared,\n\t\t\t    unsigned int value);\n\nPTW32_DLLPORT int __cdecl sem_destroy (sem_t * sem);\n\nPTW32_DLLPORT int __cdecl sem_trywait (sem_t * sem);\n\nPTW32_DLLPORT int __cdecl sem_wait (sem_t * sem);\n\nPTW32_DLLPORT int __cdecl sem_timedwait (sem_t * sem,\n\t\t\t\t const struct timespec * abstime);\n\nPTW32_DLLPORT int __cdecl sem_post (sem_t * sem);\n\nPTW32_DLLPORT int __cdecl sem_post_multiple (sem_t * sem,\n\t\t\t\t     int count);\n\nPTW32_DLLPORT int __cdecl sem_open (const char * name,\n\t\t\t    int oflag,\n\t\t\t    mode_t mode,\n\t\t\t    unsigned int value);\n\nPTW32_DLLPORT int __cdecl sem_close (sem_t * sem);\n\nPTW32_DLLPORT int __cdecl sem_unlink (const char * name);\n\nPTW32_DLLPORT int __cdecl sem_getvalue (sem_t * sem,\n\t\t\t\tint * sval);\n\n#ifdef __cplusplus\n}\t\t\t\t/* End of extern \"C\" */\n#endif\t\t\t\t/* __cplusplus */\n\n#undef PTW32_LEVEL\n#undef PTW32_LEVEL_MAX\n\n#endif\t\t\t\t/* !SEMAPHORE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/signal.c",
    "content": "/*\n * signal.c\n *\n * Description:\n * Thread-aware signal functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n/*\n * Possible future strategy for implementing pthread_kill()\n * ========================================================\n *\n * Win32 does not implement signals.\n * Signals are simply software interrupts.\n * pthread_kill() asks the system to deliver a specified\n * signal (interrupt) to a specified thread in the same\n * process.\n * Signals are always asynchronous (no deferred signals).\n * Pthread-win32 has an async cancelation mechanism.\n * A similar system can be written to deliver signals\n * within the same process (on ix86 processors at least).\n *\n * Each thread maintains information about which\n * signals it will respond to. Handler routines\n * are set on a per-process basis - not per-thread.\n * When signalled, a thread will check it's sigmask\n * and, if the signal is not being ignored, call the\n * handler routine associated with the signal. The\n * thread must then (except for some signals) return to\n * the point where it was interrupted.\n *\n * Ideally the system itself would check the target thread's\n * mask before possibly needlessly bothering the thread\n * itself. This could be done by pthread_kill(), that is,\n * in the signaling thread since it has access to\n * all pthread_t structures. It could also retrieve\n * the handler routine address to minimise the target\n * threads response overhead. This may also simplify\n * serialisation of the access to the per-thread signal\n * structures.\n *\n * pthread_kill() eventually calls a routine similar to\n * ptw32_cancel_thread() which manipulates the target\n * threads processor context to cause the thread to\n * run the handler launcher routine. pthread_kill() must\n * save the target threads current context so that the\n * handler launcher routine can restore the context after\n * the signal handler has returned. Some handlers will not\n * return, eg. the default SIGKILL handler may simply\n * call pthread_exit().\n *\n * The current context is saved in the target threads\n * pthread_t structure.\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n#if HAVE_SIGSET_T\n\nstatic void\nptw32_signal_thread ()\n{\n}\n\nstatic void\nptw32_signal_callhandler ()\n{\n}\n\nint\npthread_sigmask (int how, sigset_t const *set, sigset_t * oset)\n{\n  pthread_t thread = pthread_self ();\n\n  if (thread.p == NULL)\n    {\n      return ENOENT;\n    }\n\n  /* Validate the `how' argument. */\n  if (set != NULL)\n    {\n      switch (how)\n\t{\n\tcase SIG_BLOCK:\n\t  break;\n\tcase SIG_UNBLOCK:\n\t  break;\n\tcase SIG_SETMASK:\n\t  break;\n\tdefault:\n\t  /* Invalid `how' argument. */\n\t  return EINVAL;\n\t}\n    }\n\n  /* Copy the old mask before modifying it. */\n  if (oset != NULL)\n    {\n      memcpy (oset, &(thread.p->sigmask), sizeof (sigset_t));\n    }\n\n  if (set != NULL)\n    {\n      unsigned int i;\n\n      /* FIXME: this code assumes that sigmask is an even multiple of\n         the size of a long integer. */\n\n      unsigned long *src = (unsigned long const *) set;\n      unsigned long *dest = (unsigned long *) &(thread.p->sigmask);\n\n      switch (how)\n\t{\n\tcase SIG_BLOCK:\n\t  for (i = 0; i < (sizeof (sigset_t) / sizeof (unsigned long)); i++)\n\t    {\n\t      /* OR the bit field longword-wise. */\n\t      *dest++ |= *src++;\n\t    }\n\t  break;\n\tcase SIG_UNBLOCK:\n\t  for (i = 0; i < (sizeof (sigset_t) / sizeof (unsigned long)); i++)\n\t    {\n\t      /* XOR the bitfield longword-wise. */\n\t      *dest++ ^= *src++;\n\t    }\n\tcase SIG_SETMASK:\n\t  /* Replace the whole sigmask. */\n\t  memcpy (&(thread.p->sigmask), set, sizeof (sigset_t));\n\t  break;\n\t}\n    }\n\n  return 0;\n}\n\nint\nsigwait (const sigset_t * set, int *sig)\n{\n  /* This routine is a cancellation point */\n  pthread_test_cancel();\n}\n\nint\nsigaction (int signum, const struct sigaction *act, struct sigaction *oldact)\n{\n}\n\n#endif /* HAVE_SIGSET_T */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/spin.c",
    "content": "/*\n * spin.c\n *\n * Description:\n * This translation unit implements spin lock primitives.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n#include \"ptw32_spinlock_check_need_init.c\"\n#include \"pthread_spin_init.c\"\n#include \"pthread_spin_destroy.c\"\n#include \"pthread_spin_lock.c\"\n#include \"pthread_spin_unlock.c\"\n#include \"pthread_spin_trylock.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/sync.c",
    "content": "/*\n * sync.c\n *\n * Description:\n * This translation unit implements functions related to thread\n * synchronisation.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n#include \"pthread_detach.c\"\n#include \"pthread_join.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/Bmakefile",
    "content": "# Makefile for the pthreads test suite.\n# If all of the .pass files can be created, the test suite has passed.\n#\n# --------------------------------------------------------------------------\n#\n#      Pthreads-win32 - POSIX Threads Library for Win32\n#      Copyright(C) 1998 John E. Bossom\n#      Copyright(C) 1999,2005 Pthreads-win32 contributors\n# \n#      Contact Email: rpj@callisto.canberra.edu.au\n# \n#      The current list of contributors is contained\n#      in the file CONTRIBUTORS included with the source\n#      code distribution. The list can also be seen at the\n#      following World Wide Web location:\n#      http://sources.redhat.com/pthreads-win32/contributors.html\n# \n#      This library is free software; you can redistribute it and/or\n#      modify it under the terms of the GNU Lesser General Public\n#      License as published by the Free Software Foundation; either\n#      version 2 of the License, or (at your option) any later version.\n# \n#      This library is distributed in the hope that it will be useful,\n#      but WITHOUT ANY WARRANTY; without even the implied warranty of\n#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n#      Lesser General Public License for more details.\n# \n#      You should have received a copy of the GNU Lesser General Public\n#      License along with this library in the file COPYING.LIB;\n#      if not, write to the Free Software Foundation, Inc.,\n#      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n#\n\nDLL_VER\t= 2\n\nCP\t= copy\nRM\t= erase\nCAT\t= type\nMKDIR\t= mkdir\nTOUCH\t= echo Passed >\nECHO\t= @echo\n\nQAPC\t= ..\\QueueUserAPCEx\\User\\quserex.dll\n\nCPHDR\t= pthread.h semaphore.h sched.h\n\nOPTIM\t= -O2\n\nXXLIBS\t= cw32mti.lib ws2_32.lib\n\n# C++ Exceptions\nBCEFLAGS\t= -P -DPtW32NoCatchWarn -D__CLEANUP_CXX\nBCELIB\t= pthreadBCE$(DLL_VER).lib\nBCEDLL\t= pthreadBCE$(DLL_VER).dll\n# C cleanup code\nBCFLAGS\t= -D__CLEANUP_C\nBCLIB\t= pthreadBC$(DLL_VER).lib\nBCDLL\t= pthreadBC$(DLL_VER).dll\n# C++ Exceptions in application - using VC version of pthreads dll\nBCXFLAGS\t= -D__CLEANUP_C\n\n# Defaults\nCPLIB\t= $(BCLIB)\nCPDLL\t= $(BCDLL)\n\nCFLAGS= -q $(OPTIM) /D_WIN32_WINNT=0x400 -w -tWC -tWM -4 -w-aus -w-asc -w-par\nLFLAGS= \nINCLUDES=-I.\nBUILD_DIR=..\n\nCOPYFILES\t= $(CPHDR) $(CPLIB) $(CPDLL) $(QAPC)\n\nEHFLAGS\t=\n\n# If a test case returns a non-zero exit code to the shell, make will\n# stop.\n\nPASSES=   loadfree.pass \\\n\t  errno1.pass  \\\n\t  self1.pass  mutex5.pass  \\\n\t  mutex1.pass  mutex1n.pass  mutex1e.pass  mutex1r.pass  \\\n\t  semaphore1.pass  semaphore2.pass  semaphore3.pass  \\\n\t  mutex2.pass  mutex3.pass  \\\n\t  mutex2r.pass  mutex2e.pass  mutex3r.pass  mutex3e.pass  \\\n\t  condvar1.pass  condvar1_1.pass  condvar1_2.pass  condvar2.pass  condvar2_1.pass  \\\n\t  exit1.pass  create1.pass  create2.pass  reuse1.pass  reuse2.pass  equal1.pass  \\\n\t  kill1.pass  valid1.pass  valid2.pass  \\\n\t  exit2.pass  exit3.pass  exit4.pass  exit5.pass  \\\n\t  join0.pass  join1.pass  detach1.pass  join2.pass join3.pass  \\\n\t  mutex4.pass  mutex6.pass  mutex6n.pass  mutex6e.pass  mutex6r.pass  \\\n\t  mutex6s.pass  mutex6es.pass  mutex6rs.pass  \\\n\t  mutex7.pass  mutex7n.pass  mutex7e.pass  mutex7r.pass  \\\n\t  mutex8.pass  mutex8n.pass  mutex8e.pass  mutex8r.pass  \\\n\t  count1.pass  \\\n\t  once1.pass  once2.pass  once3.pass  once4.pass  \\\n\t  self2.pass  \\\n\t  cancel1.pass  cancel2.pass  \\\n\t  semaphore4.pass  semaphore4t.pass  semaphore5.pass  \\\n\t  barrier1.pass  barrier2.pass  barrier3.pass  barrier4.pass  barrier5.pass  \\\n\t  tsd1.pass  tsd2.pass  delay1.pass  delay2.pass  eyal1.pass  \\\n\t  condvar3.pass  condvar3_1.pass  condvar3_2.pass  condvar3_3.pass  \\\n\t  condvar4.pass  condvar5.pass  condvar6.pass  \\\n\t  condvar7.pass  condvar8.pass  condvar9.pass  \\\n\t  rwlock1.pass  rwlock2.pass  rwlock3.pass  rwlock4.pass  \\\n\t  rwlock5.pass  rwlock6.pass  rwlock7.pass  rwlock8.pass  \\\n\t  rwlock2_t.pass  rwlock3_t.pass  rwlock4_t.pass  rwlock5_t.pass  rwlock6_t.pass  rwlock6_t2.pass  \\\n\t  context1.pass  \\\n\t  cancel3.pass  cancel4.pass  cancel5.pass  cancel6a.pass  cancel6d.pass  \\\n\t  cancel7.pass  cancel8.pass  \\\n\t  cleanup0.pass  cleanup1.pass  cleanup2.pass  cleanup3.pass  \\\n\t  priority1.pass priority2.pass inherit1.pass  \\\n\t  spin1.pass  spin2.pass  spin3.pass  spin4.pass  \\\n\t  exception1.pass  exception2.pass  exception3.pass  \\\n\t  cancel9.pass  create3.pass  stress1.pass\n\nBENCHRESULTS = \\\n\t  benchtest1.bench benchtest2.bench benchtest3.bench benchtest4.bench benchtest5.bench\n\nhelp:\n\t@ $(ECHO) Run one of the following command lines:\n\t@ $(ECHO) make clean BC    (to test using BC dll with VC (no EH) applications)\n\t@ $(ECHO) make clean BCX   (to test using BC dll with VC++ (EH) applications)\n\t@ $(ECHO) make clean BCE   (to test using the BCE dll with VC++ EH applications)\n\t@ $(ECHO) make clean BC-bench    (to benchtest using BC dll with C bench app)\n\t@ $(ECHO) make clean BCX-bench   (to benchtest using BC dll with C++ bench app)\n\t@ $(ECHO) make clean BCE-bench   (to benchtest using BCE dll with C++ bench app)\n\nall:\n\t@ make clean BC\n\t@ make clean BCX\n\t@ make clean BCE\n\t@ make clean BC-bench\n\n# This allows an individual test application to be made using the default lib.\n# e.g. make clean test cancel3.exe\ntest: $(CPLIB) $(CPDLL) $(CPHDR) $(QAPC)\n\ntests: $(CPLIB) $(CPDLL) $(CPHDR) $(QAPC) sizes.pass $(PASSES)\n\t@ $(ECHO) ALL TESTS PASSED! Congratulations!\n\nbenchtests: $(CPLIB) $(CPDLL) $(CPHDR) $(BENCHRESULTS)\n\t@ $(ECHO) ALL BENCH TESTS DONE.\n\nsizes.pass: sizes.exe\n\t@ $(ECHO) ... Running $(TEST) test: $*.exe\n\t@ .\\$*.exe > SIZES.$(TEST)\n\t@ $(CAT) SIZES.$(TEST)\n\t@ $(ECHO) ...... Passed\n\t@ $(TOUCH) $*.pass\n\nBCE:\n\t@ make -f Bmakefile TEST=\"$@\" CPLIB=\"$(BCELIB)\" CPDLL=\"$(BCEDLL)\" EHFLAGS=\"$(BCEFLAGS)\" tests\n\nBC:\n\t@ make -f Bmakefile TEST=\"$@\" CPLIB=\"$(BCLIB)\" CPDLL=\"$(BCDLL)\" EHFLAGS=\"$(BCFLAGS)\" tests\n\nBCX:\n\t@ make -f Bmakefile TEST=\"$@\" CPLIB=\"$(BCLIB)\" CPDLL=\"$(BCDLL)\" EHFLAGS=\"$(BCXFLAGS)\" tests\n\nBCE-bench:\n\t@ make -f Bmakefile TEST=\"$@\" CPLIB=\"$(BCELIB)\" CPDLL=\"$(BCEDLL)\" EHFLAGS=\"$(BCEFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\nBC-bench:\n\t@ make -f Bmakefile TEST=\"$@\" CPLIB=\"$(BCLIB)\" CPDLL=\"$(BCDLL)\" EHFLAGS=\"$(BCFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\nBCX-bench:\n\t@ make -f Bmakefile TEST=\"$@\" CPLIB=\"$(BCLIB)\" CPDLL=\"$(BCDLL)\" EHFLAGS=\"$(BCXFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\n.exe.pass:\n\t@ $(ECHO) ... Running $(TEST) test: $<\n\t@ .\\$<\n\t@ $(ECHO) ...... Passed\n\t@ $(TOUCH) $@\n\n.exe.bench:\n\t@ $(ECHO) ... Running $(TEST) benchtest: $<\n\t@ .\\$<\n\t@ $(ECHO) ...... Done\n\t@ $(TOUCH) $@\n\n.c.exe:\n\t@ $(ECHO) $(CC) $(EHFLAGS) $(CFLAGS) $(INCLUDES) $< -e$@ $(LFLAGS) $(CPLIB) $(XXLIBS)\n\t@ $(CC) $(EHFLAGS) $(CFLAGS) $(INCLUDES) $< -e$@ $(LFLAGS) $(CPLIB) $(XXLIBS)\n\n.c.o:\n\t@ $(ECHO) $(CC) $(EHFLAGS) -c $(CFLAGS) $(INCLUDES) $< -o$@\n\t@ $(CC) $(EHFLAGS) $(CFLAGS) -c $(INCLUDES) $< -o$@\n\n\n.c.i:\n\t@ $(CC) /P $(EHFLAGS) $(CFLAGS) $(INCLUDES) $<\n\n$(COPYFILES):\n\t@ $(ECHO) Copying $@\n\t@ $(CP) $(BUILD_DIR)\\$@ .\n\npthread.dll: $(CPDLL)\n\t@ $(CP) $(CPDLL) pthread.dll\n\t@ $(CP) $(CPLIB) pthread.lib\n\nclean:\n\t- $(RM) *.dll\n\t- $(RM) *.lib\n\t- $(RM) pthread.h\n\t- $(RM) semaphore.h\n\t- $(RM) sched.h\n\t- $(RM) *.e\n\t- $(RM) *.i\n\t- $(RM) *.obj\n\t- $(RM) *.tds\n\t- $(RM) *.pdb\n\t- $(RM) *.o\n\t- $(RM) *.asm\n\t- $(RM) *.exe\n\t- $(RM) *.pass\n\t- $(RM) *.bench\n\t- $(RM) *.log\n\nbenchtest1.bench:\nbenchtest2.bench:\nbenchtest3.bench:\nbenchtest4.bench:\nbenchtest5.bench:\nbarrier1.pass: semaphore4.pass\nbarrier2.pass: barrier1.pass\nbarrier3.pass: barrier2.pass\nbarrier4.pass: barrier3.pass\nbarrier5.pass: barrier4.pass\ncancel1.pass: create1.pass\ncancel2.pass: cancel1.pass\ncancel3.pass: context1.pass\ncancel4.pass: cancel3.pass\ncancel5.pass: cancel3.pass\ncancel6a.pass: cancel3.pass\ncancel6d.pass: cancel3.pass\ncancel7.pass: kill1.pass\ncancel8.pass: cancel7.pass\ncancel9.pass: cancel8.pass\ncleanup0.pass: cancel5.pass\ncleanup1.pass: cleanup0.pass\ncleanup2.pass: cleanup1.pass\ncleanup3.pass: cleanup2.pass\ncondvar1.pass:\ncondvar1_1.pass: condvar1.pass\ncondvar1_2.pass: join2.pass\ncondvar2.pass: condvar1.pass\ncondvar2_1.pass: condvar2.pass join2.pass\ncondvar3.pass: create1.pass condvar2.pass\ncondvar3_1.pass: condvar3.pass join2.pass\ncondvar3_2.pass: condvar3_1.pass\ncondvar3_3.pass: condvar3_2.pass\ncondvar4.pass: create1.pass\ncondvar5.pass: condvar4.pass\ncondvar6.pass: condvar5.pass\ncondvar7.pass: condvar6.pass cleanup1.pass\ncondvar8.pass: condvar7.pass\ncondvar9.pass: condvar8.pass\ncontext1.pass: cancel2.pass\ncount1.pass: join1.pass\ncreate1.pass: mutex2.pass\ncreate2.pass: create1.pass\ncreate3.pass:\ndelay1.pass:\ndelay2.pass: delay1.pass\ndetach1.pass: join0.pass\nequal1.pass: create1.pass\nerrno1.pass: mutex3.pass\nexception1.pass: cancel4.pass\nexception2.pass: exception1.pass\nexception3.pass: exception2.pass\nexit1.pass:\nexit2.pass: create1.pass\nexit3.pass: create1.pass\nexit4.pass:\nexit5.pass: kill1.pass\neyal1.pass: tsd1.pass\ninherit1.pass: join1.pass priority1.pass\njoin0.pass: create1.pass\njoin1.pass: create1.pass\njoin2.pass: create1.pass\njoin3.pass: join2.pass\nkill1.pass: \nloadfree.pass: pthread.dll\nmutex1.pass: self1.pass\nmutex1n.pass: mutex1.pass\nmutex1e.pass: mutex1.pass\nmutex1r.pass: mutex1.pass\nmutex2.pass: mutex1.pass\nmutex2r.pass: mutex2.pass\nmutex2e.pass: mutex2.pass\nmutex3.pass: create1.pass\nmutex3r.pass: mutex3.pass\nmutex3e.pass: mutex3.pass\nmutex4.pass: mutex3.pass\nmutex5.pass:\nmutex6.pass: mutex4.pass\nmutex6n.pass: mutex4.pass\nmutex6e.pass: mutex4.pass\nmutex6r.pass: mutex4.pass\nmutex6s.pass: mutex6.pass\nmutex6rs.pass: mutex6r.pass\nmutex6es.pass: mutex6e.pass\nmutex7.pass: mutex6.pass\nmutex7n.pass: mutex6n.pass\nmutex7e.pass: mutex6e.pass\nmutex7r.pass: mutex6r.pass\nmutex8.pass: mutex7.pass\nmutex8n.pass: mutex7n.pass\nmutex8e.pass: mutex7e.pass\nmutex8r.pass: mutex7r.pass\nonce1.pass: create1.pass\nonce2.pass: once1.pass\nonce3.pass: once2.pass\nonce4.pass: once3.pass\npriority1.pass: join1.pass\npriority2.pass: priority1.pass barrier3.pass\nreuse1.pass: create2.pass\nreuse2.pass: reuse1.pass\nrwlock1.pass: condvar6.pass\nrwlock2.pass: rwlock1.pass\nrwlock3.pass: rwlock2.pass\nrwlock4.pass: rwlock3.pass\nrwlock5.pass: rwlock4.pass\nrwlock6.pass: rwlock5.pass\nrwlock7.pass: rwlock6.pass\nrwlock8.pass: rwlock7.pass\nrwlock2_t.pass: rwlock2.pass\nrwlock3_t.pass: rwlock2_t.pass\nrwlock4_t.pass: rwlock3_t.pass\nrwlock5_t.pass: rwlock4_t.pass\nrwlock6_t.pass: rwlock5_t.pass\nrwlock6_t2.pass: rwlock6_t.pass\nself1.pass:\nself2.pass: create1.pass\nsemaphore1.pass:\nsemaphore2.pass:\nsemaphore3.pass: semaphore2.pass\nsemaphore4.pass: semaphore3.pass cancel1.pass\nsemaphore4t.pass: semaphore4.pass\nsemaphore5.pass: semaphore4.pass\nsizes.pass:\nspin1.pass:\nspin2.pass: spin1.pass\nspin3.pass: spin2.pass\nspin4.pass: spin3.pass\nstress1.pass:\ntsd1.pass: barrier5.pass join1.pass\ntsd2.pass: tsd1.pass\nvalid1.pass: join1.pass\nvalid2.pass: valid1.pass\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/ChangeLog",
    "content": "2005-06-12  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* stress1.c (millisecondsFromNow): Remove limit 0 <= millisecs < 1000;\n\tnow works for -INT_MAX <= millisecs <= INT_MAX; not needed for\n\tstress1.c but should be general anyway.\n\n2005-05-18  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* reuse2.c (main): Must use a read with memory barrier semantics\n\twhen polling 'done' to force the cache into coherence on MP systems.\n\n2005-05-15  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* detach1.c: New test.\n\t* join1.c: Reduce sleep times.\n\t* join0.c: Remove MSVCRT conditional compile - join should always\n\treturn the thread exit code.\n\t* join1.c: Likewise.\n\t* join2.c: Likewise.\n\t* join3.c: Likewise.\n\n2005-04-18  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* condvar3.c: Remove locks from around signalling calls - should not\n\tbe required for normal operation and only serve to mask deficiencies;\n\tensure that CV destruction is not premature after removing guards.\n\t* condvar3_1.c: Likewise.\n\t* condvar3_2.c: Likewise.\n\t* condvar3_3.c: Likewise.\n\t* condvar4.c: Likewise.\n\t* condvar5.c: Likewise.\n\t* condvar6.c: Likewise.\n\t* condvar7.c: Likewise.\n\t* condvar8.c: Likewise.\n\t* condvar9.c: Likewise.\n\n2005-04-11  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n        * once4.c: New test; tries to test priority adjustments\n        in pthread_once(); set priority class to realtime so that\n        any failures can be seen.\n\n2005-04-06  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* cleanup0.c: Fix unguarded global variable accesses.\n\t* cleanup1.c: Likewise.\n\t* cleanup2.c: Likewise.\n\t* cleanup3.c: Likewise.\n\t* once2.c: Likewise.\n\t* once3.c: Likewise.\n\n2005-04-01  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* GNUmakefile: Add target to test linking static link library.\n\t* Makefile: Likewise.\n\t* self1.c: Run process attach/detach routines when static linked.\n\n2005-03-16  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* mutex5.c: Prevent optimiser from removing asserts.\n\n2005-03-12  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* once3.c: New test.\n\n2005-03-08  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n        * once2.c: New test.\n\n2004-11-19  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* Bmakefile: New makefile for Borland.\n\t* Makefile (DLL_VER): Added.\n\t* GNUmakefile (DLL_VER): Added.\n\t* Wmakefile (DLL_VER): Added.\n\n2004-10-29  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* semaphore4.c: New test.\n\t* semaphore4t.c: New test.\n\t* Debug.dsp (et al): Created MSVC Workspace project to aid debugging.\n\t* All: Many tests have been modified to work with the new pthread\n\tID type; some other corrections were made after some library\n\tfunctions were semantically strengthened. For example,\n\tpthread_cond_destroy() no longer destroys a busy CV, which\n\trequired minor redesigns of some tests, including some where\n\tthe mutex associated with the CV was not locked during\n\tsignaling and broadcasting.\n\n2004-10-23  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* condvar3.c: Fixed mutex operations that were incorrectly\n\tplaced in relation to their condition variable operations.\n\tThe error became evident after sem_destroy() was rewritten\n\tand conditions for destroing the semaphore were tightened.\n\tAs a result, pthread_cond_destroy() was not able to\n\tdestroy the cv queueing sempahore.\n\t* condvar3_1.c: Likewise.\n\t* condvar3_2.c: Likewise.\n\t* condvar4.c: Likewise.\n\t* condvar5.c: Likewise.\n\t* condvar6.c: Likewise.\n\t* condvar7.c: Likewise.\n\t* condvar8.c: Likewise.\n\t* condvar9.c: Likewise.\n\n2004-10-19  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* semaphore3.c: New test.\n\n2004-10-14  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* rwlock7.c (main): Tidy up statistics reporting; randomise\n\tupdate accesses.\n\t* rwlock8.c: New test.\n\n2004-09-08  Alexandre Girao  <alexgirao@gmail.com>\n\n\t* cancel7.c (main): Win98 wants a valid (non-NULL) location\n\tfor the last arg of _beginthreadex().\n\t* cancel8.c (main): Likewise.\n\t* exit4.c (main): Likewise.\n\t* exit5.c (main): Likewise.\n\n2004-08-26  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* create3.c: New test.\n\n2004-06-21  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* mutex2r.c: New test.\n\t* mutex2e.c: New test.\n\t* mutex3r.c: New test.\n\t* mutex3e.c: New test.\n\t* mutex6s.c: New test.\n\t* mutex6rs.c: New test.\n\t* mutex6es.c: New test.\n\n2004-05-21  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* join3.c: New test.\n\n2004-05-16  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* condvar2.c (WIN32_WINNT): Define to avoid redefinition warning\n\tfrom inclusion of implement.h.\n\t* convar2_1.c: Likewise.\n\t* condvar3_1.c: Likewise.\n\t* condvar3_2.c: Likewise.\n\t* context1.c: Likewise.\n\t* sizes.c: Likewise.\n\t* Makefile: Don't define _WIN32_WINNT on compiler command line.\n\t* GNUmakefile: Likewise.\n\t* priority1.c (main): Add column to output for actual win32\n\tpriority.\n\n2004-05-16  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* cancel9.c: New test.\n\t* cancel3.c: Remove inappropriate conditional compilation;\n\tGNU C version of test suite no longer quietly skips this test.\n\t* cancel5.c: Likewise.\n\t* GNUmakefile: Can now build individual test app using default\n\tC version of library using 'make clean testname.c'.\n\t* Makefile: Likewise for VC using 'nmake clean test testname.c'.\n\n2003-10-14  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* Wmakefile: New makefile for Watcom testing.\n\n2003-09-18  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* benchtest.h: Move old mutex code into benchlib.c.\n\t* benchlib.c: New statically linked module to ensure that\n\tbench apps don't inline the code and therefore have an unfair\n\tadvantage over the pthreads lib routines. Made little or no\n\tdifference.\n\t* benchtest1.c: Minor change to avoid compiler warnings.\n\t* benchtest5.c: Likewise.\n\t* benchtest2.c: Fix misinformation in output report.\n\t* README.BENCH: Add comments on results.\n\n2003-09-14  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* priority1.c: Reworked to comply with modified priority\n\tmanagement and provide additional output.\n\t* priority2.c: Likewise.\n\t* inherit1.c: Likewise.\n\n2003-09-03  Ross Johnson  <rpj@callisto.canberra.edu.au>\n\n\t* exit4.c: New test.\n\t* exit5.c: New test.\n\t* cancel7.c: New test.\n\t* cancel8.c: New test.\n\n2003-08-13  Ross Johnson  <rpj@ise.canberra.edu.au>\n\n\t* reuse1.c: New test.\n\t* reuse1.c: New test.\n\t* valid1.c: New test.\n\t* valid2.c: New test.\n\t* kill1.c: New test.\n \t* create2.c: Now included in test regime.\n\n2003-07-19  Ross Johnson  <rpj@ise.canberra.edu.au>\n\n\t* eyal1.c (waste_time): Make threads do more work to ensure that\n\tall threads get to do some work.\n\t* semaphore1.c: Make it clear that certain errors are expected.\n\t* exception2.c (non_MSVC code sections): Change to include\n\tC++ standard include file, i.e. change <new.h> to <exception>.\n\t* exception3.c (non_MSVC code sections): Likewise; qualify std::\n\tnamespace entities where necessary.\n\t* GNUmakefile: modified to work in the MsysDTK (newer MinGW)\n\tenvironment; define CC as gcc or g++ as appropriate because\n\tusing gcc -x c++ doesn't link with required c++ libs by default,\n\tbut g++ does.\n\n2002-12-11  Ross Johnson  <ross@special.ise.canberra.edu.au>\n\n\t* mutex7e.c: Assert EBUSY return instead of EDEADLK.\n\n2002-06-03  Ross Johnson  <rpj@digit.ise.canberra.edu.au>\n\n\t* semaphore2.c: New test.\n\n2002-03-02  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* Makefile (CFLAGS): Changed /MT to /MD to link with\n\tthe correct library MSVCRT.LIB. Otherwise errno doesn't\n\twork.\n\n2002-02-28  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* exception3.c: Correct recent change.\n\n\t* semaphore1.c: New test.\n\n\t* Makefile: Add rule to generate pre-processor output.\n\n2002-02-28  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* exception3.c (terminateFunction): For MSVC++, call\n\texit() rather than pthread_exit(). Add comments to explain\n\twhy.\n\t   * Notes from the MSVC++ manual:\n\t   *       1) A term_func() should call exit(), otherwise\n\t   *          abort() will be called on return to the caller.\n\t   *          abort() raises SIGABRT. The default signal handler\n\t   *          for all signals terminates the calling program with\n\t   *          exit code 3.\n\t   *       2) A term_func() must not throw an exception. Therefore\n\t   *          term_func() should not call pthread_exit() if an\n\t   *          an exception-using version of pthreads-win32 library\n\t   *          is being used (i.e. either pthreadVCE or pthreadVSE).\n\n\n2002-02-23  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* rwlock2_t.c: New test.\n\t* rwlock3_t.c: New test.\n\t* rwlock4_t.c: New test.\n\t* rwlock5_t.c: New test.\n\t* rwlock6_t.c: New test.\n\t* rwlock6_t2.c: New test.\n\t* rwlock6.c (main): Swap thread and result variables\n\tto correspond to actual thread functions.\n\t* rwlock1.c: Change test description comment to correspond\n\tto the actual test.\n\n\t* condvar1_2.c: Loop over the test many times in the hope\n\tof detecting any intermittent deadlocks. This is to\n\ttest a fixed problem in pthread_cond_destroy.c.\n\n\t* spin4.c: Remove unused variable.\n\n2002-02-17  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* condvar1_1.c: New test.\n\t* condvar1_2.c: New test.\n\n2002-02-07  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* delay1.c: New test.\n\t* delay2.c: New test.\n\t* exit4.c: New test.\n\n2002-02-02  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* mutex8: New test.\n\t* mutex8n: New test.\n\t* mutex8e: New test.\n\t* mutex8r: New test.\n\t* cancel6a: New test.\n\t* cancel6d: New test.\n\t* cleanup0.c: Add pragmas for inline optimisation control.\n\t* cleanup1.c: Add pragmas for inline optimisation control.\n\t* cleanup2.c: Add pragmas for inline optimisation control.\n\t* cleanup3.c: Add pragmas for inline optimisation control.\n\t* condvar7.c: Add pragmas for inline optimisation control.\n\t* condvar8.c: Add pragmas for inline optimisation control.\n\t* condvar9.c: Add pragmas for inline optimisation control.\n\n2002-01-30  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* cleanup1.c (): Must be declared __cdecl when compiled\n\tas C++ AND testing the standard C library version.\n\n2002-01-16  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* spin4.c (main): Fix renamed function call.\n\n2002-01-14  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* exception3.c (main): Shorten wait time.\n\n2002-01-09  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* mutex7.c: New test.\n\t* mutex7n.c: New test.\n\t* mutex7e.c: New test.\n\t* mutex7r.c: New test.\n\t* mutex6.c: Modified to avoid leaving the locked mutex\n\taround on exit.\n\n2001-10-25  Ross Johnson  <rpj@setup1.ise.canberra.edu.au>\n\n\t* condvar2.c: Remove reference to cv->nWaitersUnblocked.\n\t* condvar2_1.c: Likewise; lower NUMTHREADS from 60 to 30.\n\t* condvar3_1.c: Likewise.\n\t* condvar3_2.c: Likewise.\n\t* count1.c: lower NUMTHREADS from 60 to 30.\n\t* inherit1.c: Determine valid priority values and then\n\tassert values returned by POSIX routines are the same.\n\t* priority1.c: Likewise.\n\t* priority2.c: Likewise.\n\t\n2001-07-12  Ross Johnson  <rpj@setup1.ise.canberra.edu.au>\n\n\t* barrier5.c: Assert that precisely one thread receives\n\tPTHREAD_BARRIER_SERIAL_THREAD at each barrier.\n\n2001-07-09  Ross Johnson  <rpj@setup1.ise.canberra.edu.au>\n\n\t* barrier3.c: Fixed.\n\t* barrier4.c: Fixed.\n\t* barrier5.c: New; proves that all threads in the group\n\treaching the barrier wait and then resume together. Repeats the test\n\tusing groups of 1 to 16 threads. Each group of threads must negotiate\n\ta large number of barriers (10000).\n\t* spin4.c: Fixed.\n\t* test.h (error_string): Modified the success (0) value.\n\n2001-07-07  Ross Johnson  <rpj@setup1.ise.canberra.edu.au>\n\n\t* spin3.c: Changed test and fixed.\n\t* spin4.c: Fixed.\n\t* barrier3.c: Fixed.\n\t* barrier4.c: Fixed.\n\n2001-07-05  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* spin1.c: New; testing spinlocks.\n\t* spin2.c: New; testing spinlocks.\n\t* spin3.c: New; testing spinlocks.\n\t* spin4.c: New; testing spinlocks.\n\t* barrier1.c: New; testing barriers.\n\t* barrier2.c: New; testing barriers.\n\t* barrier3.c: New; testing barriers.\n\t* barrier4.c: New; testing barriers.\n\t* GNUmakefile: Add new tests.\n\t* Makefile: Add new tests.\n\n2001-07-01  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* benchtest3.c: New; timing mutexes.\n\t* benchtest4.c: New; time mutexes.\n\t* condvar3_1.c: Fixed bug - Alexander Terekhov\n\t* condvar3_3.c: New test.\n\n2001-06-25  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* priority1.c: New test.\n\t* priority2.c: New test.\n\t* inherit1.c: New test.\n\t* benchtest1.c: New; timing mutexes.\n\t* benchtest2.c: New; timing mutexes.\n\t* mutex4.c: Modified to test all mutex types.\n\n2001-06-8  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* mutex5.c: Insert inert change to quell compiler warnings.\n\t* condvar3_2.c: Remove unused variable.\n\t\n2001-06-3  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* condvar2_1.c: New test.\n\t* condvar3_1.c: New test.\n\t* condvar3_2.c: New test.\n\n2001-05-30  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* mutex1n.c: New test.\n\t* mutex1e.c: New test.\n\t* mutex1r.c: New test.\n\t* mutex4.c: Now locks and unlocks a mutex.\n\t* mutex5.c: New test.\n\t* mutex6.c: New test.\n\t* mutex6n.c: New test.\n\t* mutex6e.c: New test.\n\t* mutex6r.c: New test.\n\t* Makefile: Added new tests; reorganised.\n\t* GNUmakefile: Likewise.\n\t* rwlock6.c: Fix to properly prove read-while-write locking\n\tand single writer locking.\n\n2001-05-29  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* Makefile: Reorganisation.\n\t* GNUmakefile: Likewise.\n\t- Thomas Pfaff <tpfaff@gmx.net>\n\n\t* exception1.c: Add stdio.h include to define fprintf and stderr\n\tin non-exception C version of main().\n\t* exception2.c: Likewise.\n\t* exception3.c: Likewise.\n\n\t* Makefile (rwlock7): Add new test.\n\t* GNUmakefile (rwlock7): Add new test.\n\t* rwlock7.c: New test.\n\t* rwlock6.c: Changed to test that writer has priority.\n\n\t* eyal1.c (main): Unlock each mutex_start lock before destroying\n\tit.\n\n2000-12-29  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* GNUmakefile: Add mutex4 test; ensure libpthreadw32.a is\n\tremoved for \"clean\" target.\n\t* Makefile: Add mutex4 test.\n\n\t* exception3.c: Remove SEH code; automatically pass the test\n\tunder SEH (which is an N/A environment).\n\n\t* mutex4.c: New test.\n\n\t* eyal1.c (do_work_unit): Add a dummy \"if\" to force the\n\toptimiser to retain code; reduce thread work loads.\n\n\t* condvar8.c (main): Add an additional \"assert\" for debugging;\n\tincrease pthread_cond_signal timeout.\n\n2000-12-28  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* eyal1.c: Increase thread work loads.\n\t* exception2.c: New test.\n\t* exception3.c: New test.\n\t* Makefile: Add new tests exception2.c and exception3.c.\n\t* GNUmakefile: Likewise.\n\n2000-12-11  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* cleanup3.c: Remove unused variable.\n\t* cleanup2.c: Likewise.\n\t* exception1.c: Throw an exception rather than use\n\ta deliberate zero divide so that catch(...) will\n\thandle it under Mingw32. Mingw32 now builds the\n\tlibrary correctly to pass all tests - see Thomas\n\tPfaff's detailed instructions re needed changes\n\tto Mingw32 in the Pthreads-Win32 FAQ.\n\n2000-09-08  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* cancel5.c: New; tests calling pthread_cancel()\n\tfrom the main thread without first creating a\n\tPOSIX thread struct for the non-POSIX main thread\n\t- this forces pthread_cancel() to create one via\n\tpthread_self().\n\t* Makefile (cancel5): Add new test.\n\t* GNUmakefile (cancel5): Likewise.\n\n2000-08-17  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* create2.c: New; Test that pthread_t contains\n\tthe W32 HANDLE before it calls the thread routine\n\tproper.\n\n2000-08-13  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* condvar3.c: Minor change to eliminate compiler\n\twarning.\n\n\t* condvar4.c: ditto.\n\n\t* condvar5.c: ditto.\n\n\t* condvar6.c: ditto.\n\n\t* condvar7.c: ditto.\n\n\t* condvar8.c: ditto.\n\n\t* condvar9.c: ditto.\n\n\t* exit1.c: Function needed return statement.\n\n\t* cleanup1.c: Remove unnecessary printf arg.\n\n\t* cleanup2.c: Fix cast.\n\n\t* rwlock6.c: Fix casts.\n\n\t* exception1.c (PtW32CatchAll): Had the wrong name;\n\tfix casts.\n\n\t* cancel3.c: Remove unused waitLock variable.\n\n\t* GNUmakefile: Change library/dll naming; add new tests;\n\tgeneral minor changes.\n\n\t* Makefile: Change library/dll naming; add targets for\n\ttesting each of the two VC++ EH scheme versions;\n\tdefault target now issues help message; compile warnings\n\tnow interpreted as errors to stop the make; add new\n\ttests; restructure to remove prerequisites needed\n\totherwise.\n\n\t* README: Updated.\n\n\n2000-08-10  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* eyal1.c (main): Change implicit cast to explicit\n\tcast when passing \"print_server\" function pointer;\n\tG++ no longer allows implicit func parameter casts.\n\n\t* cleanup1.c: Remove unused \"waitLock\".\n\t(main): Fix implicit parameter cast.\n\n\t* cancel2.c (main): Fix implicit parameter cast.\n\n\t* cancel4.c (main): Fix implicit parameter cast.\n\n\t* cancel3.c (main): Fix implicit parameter cast.\n\n\t* GNUmakefile: Renamed from Makefile; Add missing\n\tcancel1 and cancel2 test targets.\n\n\t* Makefile: Converted for use with MS nmake.\n\n2000-08-06  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* ccl.bat: Add /nologo to remove extraneous output.\n\n\t* exception1.c (exceptionedThread): Init 'dummy';\n\tput expression into if condition to prevent optimising away;\n\tremove unused variable.\n\n\t* cancel4.c (mythread): Cast return value to avoid warnings.\n\n\t* cancel2.c (mythread): Missing #endif.\n\n\t* condvar9.c (mythread): Cast return value to avoid warnings.\n\n\t* condvar8.c (mythread): Cast return value to avoid warnings.\n\n\t* condvar7.c (mythread): Cast return value to avoid warnings.\n\n\t* cleanup3.c (mythread): Cast return value to avoid warnings.\n\n\t* cleanup2.c (mythread): Cast return value to avoid warnings.\n\n\t* cleanup1.c (mythread): Cast return value to avoid warnings.\n\n\t* condvar5.c (mythread): Cast return value to avoid warnings.\n\n\t* condvar3.c (mythread): Cast return value to avoid warnings.\n\n\t* condvar6.c (mythread): Cast return value to avoid warnings.\n\n\t* condvar4.c (mythread): Cast return value to avoid warnings.\n\n2000-08-05  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* cancel2.c: Use PtW32CatchAll macro if defined.\n\n\t* exception1.c: Use PtW32CatchAll macro if defined.\n\n2000-08-02  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* tsd1.c: Fix typecasts of &result [g++ is now very fussy].\n\t\n\t* test.h (assert): Return 0's explicitly to allay\n\tg++ errors.\n\t\n\t* join2.c: Add explicit typecasts.\n\t\n\t* join1.c: Add explicit typecasts.\n\t\n\t* join0.c: Add explicit typecasts.\n\t\n\t* eyal1.c: Add explicit typecasts.\n\t\n\t* count1.c (main): Add type cast to remove g++ parse warning\n\t[gcc-2.95.2 seems to have tightened up on this].\n\n\t* Makefile (GLANG): Use c++ explicitly.\n\tRemove MSVC sections (was commented out).\n\tAdd target to generate cpp output.\n\n2000-07-25  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* runtest.bat: modified to work under W98.\n\t\n\t* runall.bat: Add new tests; modified to work under W98.\n\tIt was ok under NT.\n\n\t* Makefile: Add new tests.\n\n\t* exception1.c: New; Test passing exceptions back to the\n\tapplication and retaining library internal exceptions.\n\n\t* join0.c: New; Test a single join.\n\n2000-01-06  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* cleanup1.c: New; Test cleanup handler executes (when thread is\n\tcanceled).\n\n\t* cleanup2.c: New; Test cleanup handler executes (when thread is\n\tnot canceled).\n\n\t* cleanup3.c: New; Test cleanup handler does not execute\n\t(when thread is not canceled).\n\n2000-01-04  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* cancel4.c: New; Test cancelation does not occur in deferred\n\tcancelation threads with no cancelation points.\n\n\t* cancel3.c: New; Test asynchronous cancelation.\n\n\t* context1.c: New; Test context switching method for async\n\tcancelation.\n\n1999-11-23  Ross Johnson  <rpj@special.ise.canberra.edu.au>\n\n\t* test.h: Add header includes; include local header versions rather\n\tthan system versions; rearrange the assert macro defines.\n\n1999-11-07  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* loadfree.c: New. Test loading and freeing the library (DLL).\n\n1999-10-30  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* cancel1.c: New. Test pthread_setcancelstate and\n\tpthread_setcanceltype functions.\n\t* eyal1.c (waste_time): Change calculation to avoid FP exception\n\ton Aplhas\n\t- Rich Peters <rpeters@micro-magic.com>\n\nOct 14 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* condvar7.c: New. Test broadcast after waiting thread is canceled.\n\t* condvar8.c: New. Test multiple broadcasts.\n\t* condvar9.c: New. Test multiple broadcasts with thread\n\tcancelation.\n\t\nSep 16 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* rwlock6.c: New test.\n\nSep 15 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* rwlock1.c: New test.\n\t* rwlock2.c: New test.\n\t* rwlock3.c: New test.\n\t* rwlock4.c: New test.\n\t* rwlock5.c: New test.\n\nAug 22 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* runall.bat (join2): Add test.\n\nAug 19 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* join2.c: New test.\n\nWed Aug 12 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* Makefile (LIBS): Add -L.\n\nMon May 31 10:25:01 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* Makefile (GLANG): Add GCC language option.\n\nSat May 29 23:29:04 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* runall.bat (condvar5): Add new test.\n\n\t* runall.bat (condvar6): Add new test.\n\n\t* Makefile (condvar5) : Add new test.\n\t\n\t* Makefile (condvar6) : Add new test.\n\t\n\t* condvar5.c: New test for pthread_cond_broadcast().\n\n\t* condvar6.c: New test for pthread_cond_broadcast().\n\nSun Apr  4 12:04:28 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* tsd1.c (mythread): Change Sleep(0) to sched_yield().\n\t(sched.h): Include.\n\n\t* condvar3.c (mythread): Remove redundant Sleep().\n\n\t* runtest.bat: Re-organised to make more informative.\n\nFri Mar 19 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* *.bat: redirect unwanted output to nul:\n\n\t* runall.bat: new.\n\n\t* cancel1.c: new. Not part of suite yet.\n\t\nMon Mar 15 00:17:55 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* mutex1.c: only test mutex init and destroy; add assertions.\n\n\t* count1.c: raise number of spawned threads to 60 (appears to\n\tbe the limit under Win98).\n\nSun Mar 14 21:31:02 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* test.h (assert): add assertion trace option.\n\tUse:\n\t\"#define ASSERT_TRACE 1\" to turn it on,\n\t\"#define ASSERT_TRACE 0\" to turn it off (default).\n\n\t* condvar3.c (main): add more assertions.\n\n\t* condvar4.c (main): add more assertions.\n\n\t* condvar1.c (main): add more assertions.\n\nFri Mar 12 08:34:15 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* condvar4.c (cvthing): switch the order of the INITIALIZERs.\n\n\t* eyal1.c (main): Fix trylock loop; was not waiting for thread to lock\n\tthe \"started\" mutex.\n\nWed Mar 10 10:41:52 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* tryentercs.c: Apply typo patch from bje.\n\n\t* tryentercs2.c: Ditto.\n\nSun Mar  7 10:41:52 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* Makefile (condvar3, condvar4): Add tests.\n\n\t* condvar4.c (General): Reduce to simple test case; prerequisite\n\tis condvar3.c; add description.\n\n\t* condvar3.c (General): Reduce to simple test case; prerequisite\n\tis condvar2.c; add description.\n\n\t* condvar2.c (General): Reduce to simple test case; prerequisite\n\tis condvar1.c; add description.\n\n\t* condvar1.c (General): Reduce to simple test case; add\n\tdescription.\n\n\t* Template.c (Comments): Add generic test detail.\n\n1999-02-23  Ross Johnson  <rpj@ise.canberra.edu.au>\n\n        * Template.c: Revamp.\n\n        * condvar1.c: Add.\n\n        * condvar2.c: Add.\n\n        * Makefile: Add condvar1 condvar2 tests.\n\n        * exit1.c, exit2.c, exit3.c: Cosmetic changes.\n\n1999-02-23  Ross Johnson  <rpj@ise.canberra.edu.au>\n\n\t* Makefile: Some refinement.\n\n\t* *.c: More exhaustive checking through assertions; clean up;\n\tadd some more tests.\n\n\t* Makefile: Now actually runs the tests.\n\n\t* tests.h: Define our own assert macro. The Mingw32\n\tversion pops up a dialog but we want to run non-interactively.\n\n\t* equal1.c: use assert a little more directly so that it\n\tprints the actual call statement.\n\n\t* exit1.c: Modify to return 0 on success, 1 on failure.\n\n1999-02-22  Ross Johnson  <rpj@ise.canberra.edu.au>\n\n\t* self2.c: Bring up to date.\n\n\t* self3.c: Ditto.\n\n1999-02-21  Ben Elliston  <bje@cygnus.com>\n\n\t* README: Update.\n\n\t* Makefile: New file. Run all tests automatically. Primitive tests\n\tare run first; more complex tests are run last.\n\n\t* count1.c: New test. Validate the thread count.\n\n\t* exit2.c: Perform a simpler test.\n\t\n\t* exit3.c: New test. Replaces exit2.c, since exit2.c needs to\n\tperform simpler checking first.\n\n\t* create1.c: Update to use the new testsuite exiting convention.\n\t\n\t* equal1.c: Likewise.\n\n\t* mutex1.c: Likewise.\n\n\t* mutex2.c: Likewise.\n\n\t* once1.c: Likewise.\n\n\t* self2.c: Likewise.\n\n\t* self3.c: Likewise.\n\n\t* tsd1.c: Likewise.\n\n1999-02-20  Ross Johnson  <rpj@ise.canberra.edu.au>\n\n\t* mutex2.c: Test static mutex initialisation.\n\n\t* test.h: New. Declares a table mapping error numbers to\n\terror names.\n\n1999-01-17  Ross Johnson  <rpj@ise.canberra.edu.au>\n\n\t* runtest: New script to build and run a test in the tests directory.\n\nWed Dec 30 11:22:44 1998  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* tsd1.c: Re-written. See comments at start of file.\n\t* Template.c: New. Contains skeleton code and comment template\n\tintended to fully document the test.\n\nFri Oct 16 17:59:49 1998  Ross Johnson  <rpj@swan.canberra.edu.au>\n\n\t* tsd1.c (destroy_key): Add function. Change diagnostics.\n\nThu Oct 15 17:42:37 1998  Ross Johnson  <rpj@swan.canberra.edu.au>\n\n\t* tsd1.c (mythread): Fix some casts and add some message\n\toutput. Fix inverted conditional.\n\nMon Oct 12 02:12:29 1998  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>\n\n\t* tsd1.c: New. Test TSD using 1 key and 2 threads.\n\n1998-09-13  Ben Elliston  <bje@cygnus.com>\n\n\t* eyal1.c: New file; contributed by Eyal Lebedinsky\n\t<eyal@eyal.emu.id.au>.\n\n1998-09-12  Ben Elliston  <bje@cygnus.com>\n\n\t* exit2.c (func): Return a value.\n\t(main): Call the right thread entry function.\n\n1998-07-22  Ben Elliston  <bje@cygnus.com>\n\n\t* exit2.c (main): Fix size of pthread_t array.\n\n1998-07-10  Ben Elliston  <bje@cygnus.com>\n\n\t* exit2.c: New file; test pthread_exit() harder.\n\n\t* exit1.c: New file; test pthread_exit().\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/Debug.dsp",
    "content": "# Microsoft Developer Studio Project File - Name=\"Debug\" - Package Owner=<4>\n# Microsoft Developer Studio Generated Build File, Format Version 6.00\n# ** DO NOT EDIT **\n\n# TARGTYPE \"Win32 (x86) Console Application\" 0x0103\n\nCFG=Debug - Win32 Debug\n!MESSAGE This is not a valid makefile. To build this project using NMAKE,\n!MESSAGE use the Export Makefile command and run\n!MESSAGE \n!MESSAGE NMAKE /f \"Debug.mak\".\n!MESSAGE \n!MESSAGE You can specify a configuration when running NMAKE\n!MESSAGE by defining the macro CFG on the command line. For example:\n!MESSAGE \n!MESSAGE NMAKE /f \"Debug.mak\" CFG=\"Debug - Win32 Debug\"\n!MESSAGE \n!MESSAGE Possible choices for configuration are:\n!MESSAGE \n!MESSAGE \"Debug - Win32 Release\" (based on \"Win32 (x86) Console Application\")\n!MESSAGE \"Debug - Win32 Debug\" (based on \"Win32 (x86) Console Application\")\n!MESSAGE \n\n# Begin Project\n# PROP AllowPerConfigDependencies 0\n# PROP Scc_ProjName \"\"\n# PROP Scc_LocalPath \"\"\nCPP=cl.exe\nRSC=rc.exe\n\n!IF  \"$(CFG)\" == \"Debug - Win32 Release\"\n\n# PROP BASE Use_MFC 0\n# PROP BASE Use_Debug_Libraries 0\n# PROP BASE Output_Dir \"Release\"\n# PROP BASE Intermediate_Dir \"Release\"\n# PROP BASE Target_Dir \"\"\n# PROP Use_MFC 0\n# PROP Use_Debug_Libraries 0\n# PROP Output_Dir \"Release\"\n# PROP Intermediate_Dir \"Release\"\n# PROP Target_Dir \"\"\n# ADD BASE CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /YX /FD /c\n# ADD CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /YX /FD /c\n# ADD BASE RSC /l 0xc09 /d \"NDEBUG\"\n# ADD RSC /l 0xc09 /d \"NDEBUG\"\nBSC32=bscmake.exe\n# ADD BASE BSC32 /nologo\n# ADD BSC32 /nologo\nLINK32=link.exe\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\n# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\n\n!ELSEIF  \"$(CFG)\" == \"Debug - Win32 Debug\"\n\n# PROP BASE Use_MFC 0\n# PROP BASE Use_Debug_Libraries 1\n# PROP BASE Output_Dir \"Debug\"\n# PROP BASE Intermediate_Dir \"Debug\"\n# PROP BASE Target_Dir \"\"\n# PROP Use_MFC 0\n# PROP Use_Debug_Libraries 1\n# PROP Output_Dir \"Debug\"\n# PROP Intermediate_Dir \"Debug\"\n# PROP Ignore_Export_Lib 0\n# PROP Target_Dir \"\"\n# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /YX /FD /GZ /c\n# ADD CPP /nologo /MDd /W3 /WX /Gm /ZI /Od /I \"..\" /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"CLEANUP_C\" /FR /YX /FD /GZ /c\n# ADD BASE RSC /l 0xc09 /d \"_DEBUG\"\n# ADD RSC /l 0xc09 /d \"_DEBUG\"\nBSC32=bscmake.exe\n# ADD BASE BSC32 /nologo\n# ADD BSC32 /nologo\nLINK32=link.exe\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\n# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pthreadVC2d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:\"..\"\n\n!ENDIF \n\n# Begin Target\n\n# Name \"Debug - Win32 Release\"\n# Name \"Debug - Win32 Debug\"\n# Begin Source File\n\nSOURCE=.\\Debug.txt\n# End Source File\n# Begin Source File\n\nSOURCE=.\\semaphore1.c\n# End Source File\n# End Target\n# End Project\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/Debug.dsw",
    "content": "Microsoft Developer Studio Workspace File, Format Version 6.00\n# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\n\n###############################################################################\n\nProject: \"Debug\"=.\\Debug.dsp - Package Owner=<4>\n\nPackage=<5>\n{{{\n}}}\n\nPackage=<4>\n{{{\n}}}\n\n###############################################################################\n\nGlobal:\n\nPackage=<5>\n{{{\n}}}\n\nPackage=<3>\n{{{\n}}}\n\n###############################################################################\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/Debug.plg",
    "content": "<html>\n<body>\n<pre>\n<h1>Build Log</h1>\n<h3>\n--------------------Configuration: Debug - Win32 Debug--------------------\n</h3>\n<h3>Command Lines</h3>\nCreating temporary file \"C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP9.tmp\" with contents\n[\n/nologo /MDd /W3 /WX /Gm /ZI /Od /I \"..\" /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"CLEANUP_C\" /FR\"Debug/\" /Fp\"Debug/Debug.pch\" /YX /Fo\"Debug/\" /Fd\"Debug/\" /FD /GZ /c \n\"E:\\PTHREADS\\pthreads.2\\tests\\semaphore1.c\"\n]\nCreating command line \"cl.exe @C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP9.tmp\" \nCreating temporary file \"C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSPA.tmp\" with contents\n[\nkernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pthreadVC2d.lib /nologo /subsystem:console /incremental:yes /pdb:\"Debug/Debug.pdb\" /debug /machine:I386 /out:\"Debug/Debug.exe\" /pdbtype:sept /libpath:\"..\" \n.\\Debug\\semaphore1.obj\n]\nCreating command line \"link.exe @C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSPA.tmp\"\n<h3>Output Window</h3>\nCompiling...\nsemaphore1.c\nLinking...\n\n\n\n<h3>Results</h3>\nDebug.exe - 0 error(s), 0 warning(s)\n</pre>\n</body>\n</html>\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/Debug.txt",
    "content": "This project is used to debug individual test case programs.\n\nTo build and debug a test case:\n- add the .c file to this project;\n- remove any .c files from other test cases from this project.\n- build and debug as usual."
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/GNUmakefile",
    "content": "# Makefile for the pthreads test suite.\n# If all of the .pass files can be created, the test suite has passed.\n#\n# --------------------------------------------------------------------------\n#\n#      Pthreads-win32 - POSIX Threads Library for Win32\n#      Copyright(C) 1998 John E. Bossom\n#      Copyright(C) 1999,2005 Pthreads-win32 contributors\n# \n#      Contact Email: rpj@callisto.canberra.edu.au\n# \n#      The current list of contributors is contained\n#      in the file CONTRIBUTORS included with the source\n#      code distribution. The list can also be seen at the\n#      following World Wide Web location:\n#      http://sources.redhat.com/pthreads-win32/contributors.html\n# \n#      This library is free software; you can redistribute it and/or\n#      modify it under the terms of the GNU Lesser General Public\n#      License as published by the Free Software Foundation; either\n#      version 2 of the License, or (at your option) any later version.\n# \n#      This library is distributed in the hope that it will be useful,\n#      but WITHOUT ANY WARRANTY; without even the implied warranty of\n#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n#      Lesser General Public License for more details.\n# \n#      You should have received a copy of the GNU Lesser General Public\n#      License along with this library in the file COPYING.LIB;\n#      if not, write to the Free Software Foundation, Inc.,\n#      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n#\n\nDLL_VER\t= 2\n\nCP\t= cp -f\nMV\t= mv -f\nRM\t= rm -f\nCAT\t= cat\n#CP\t= copy\n#MV\t= rename\n#RM\t= erase\n#CAT\t= type\nMKDIR\t= mkdir\nTOUCH\t= echo Passed >\nECHO\t= @echo\nMAKE\t= make\n\n#\n# Mingw32\n#\nXXCFLAGS\t= \nXXLIBS\t= -lws2_32\n#CFLAGS\t= -O3 -UNDEBUG -Wall $(XXCFLAGS)\nCFLAGS\t= -g -UNDEBUG -Wall $(XXCFLAGS)\nBUILD_DIR\t= ..\nINCLUDES\t= -I.\n\n\nTEST\t= GC\n\n# Default lib version\nGCX\t= $(TEST)$(DLL_VER)\n\n# Files we need to run the tests\n# - paths are relative to pthreads build dir.\nHDR\t= pthread.h semaphore.h sched.h\nLIB\t= libpthread$(GCX).a\nDLL\t= pthread$(GCX).dll\nQAPC\t= ../QueueUserAPCEx/User/quserex.dll\n\nCOPYFILES\t= $(HDR) $(LIB) $(DLL) $(QAPC)\n\n# If a test case returns a non-zero exit code to the shell, make will\n# stop.\n\nTESTS\t= sizes loadfree \\\n\t  self1 mutex5 mutex1 mutex1e mutex1n mutex1r \\\n\t  semaphore1 semaphore2 semaphore3 \\\n\t  condvar1 condvar1_1 condvar1_2 condvar2 condvar2_1 exit1 \\\n\t  create1 create2 reuse1 reuse2 equal1 \\\n\t  kill1 valid1 valid2 \\\n\t  exit2 exit3 exit4 exit5 \\\n\t  join0 join1 detach1 join2 join3 \\\n\t  mutex2 mutex2r mutex2e mutex3 mutex3r mutex3e \\\n\t  mutex4 mutex6 mutex6n mutex6e mutex6r \\\n\t  mutex6s mutex6es mutex6rs \\\n\t  mutex7 mutex7n mutex7e mutex7r mutex8 mutex8n mutex8e mutex8r \\\n\t  count1 \\\n\t  once1 once2 once3 once4 self2 \\\n\t  cancel1 cancel2 \\\n\t  semaphore4 semaphore4t semaphore5 \\\n\t  barrier1 barrier2 barrier3 barrier4 barrier5 \\\n\t  tsd1 tsd2 delay1 delay2 eyal1 \\\n\t  condvar3 condvar3_1 condvar3_2 condvar3_3 \\\n\t  condvar4 condvar5 condvar6 condvar7 condvar8 condvar9 \\\n\t  errno1 \\\n\t  rwlock1 rwlock2 rwlock3 rwlock4 rwlock5 rwlock6 rwlock7 rwlock8 \\\n\t  rwlock2_t rwlock3_t rwlock4_t rwlock5_t rwlock6_t rwlock6_t2 \\\n\t  context1 cancel3 cancel4 cancel5 cancel6a cancel6d \\\n\t  cancel7 cancel8 \\\n\t  cleanup0 cleanup1 cleanup2 cleanup3 \\\n\t  priority1 priority2 inherit1 \\\n\t  spin1 spin2 spin3 spin4 \\\n\t  exception1 exception2 exception3 \\\n\t  cancel9 create3 stress1\n\nSTRESSTESTS = \\\n\tstress1\n\nBENCHTESTS = \\\n\tbenchtest1 benchtest2 benchtest3 benchtest4 benchtest5\n\nSTATICTESTS = \\\n\tself1\n\nPASSES\t\t= $(TESTS:%=%.pass)\nBENCHRESULTS\t= $(BENCHTESTS:%=%.bench)\nSTRESSRESULTS\t= $(STRESSTESTS:%=%.pass)\nSTATICRESULTS\t= $(STATICTESTS:%=%.pass)\n\nhelp:\n\t@ $(ECHO) \"Run one of the following command lines:\"\n\t@ $(ECHO) \"make clean GC    (to test using GC dll with C (no EH) applications)\"\n\t@ $(ECHO) \"make clean GCX   (to test using GC dll with C++ (EH) applications)\"\n\t@ $(ECHO) \"make clean GCE   (to test using GCE dll with C++ (EH) applications)\"\n\t@ $(ECHO) \"make clean GC-bench\t  (to benchtest using GNU C dll with C cleanup code)\"\n\t@ $(ECHO) \"make clean GCE-bench   (to benchtest using GNU C dll with C++ exception handling)\"\n\t@ $(ECHO) \"make clean GC-stress\t  (to stresstest using GNU C dll with C cleanup code)\"\n\t@ $(ECHO) \"make clean GCE-stress   (to stresstest using GNU C dll with C++ exception handling)\"\n\t@ $(ECHO) \"make clean GC-static   (to test using GC static lib with C (no EH) applications)\"\n\nall:\n\t@ $(MAKE) clean GC\n\t@ $(MAKE) clean GCX\n\t@ $(MAKE) clean GCE\n\nGC:\n\t$(MAKE) TEST=GC CC=gcc XXCFLAGS=\"-D__CLEANUP_C\" all-pass\n\nGCE:\n\t$(MAKE) TEST=GCE CC=g++ XXCFLAGS=\"-mthreads -D__CLEANUP_CXX\" all-pass\n\nGCX:\n\t$(MAKE) TEST=GC CC=g++ XXCFLAGS=\"-mthreads -D__CLEANUP_C\" all-pass\n\nGC-bench:\n\t$(MAKE) TEST=GC CC=gcc XXCFLAGS=\"-D__CLEANUP_C\" XXLIBS=\"benchlib.o\" all-bench\n\nGCE-bench:\n\t$(MAKE) TEST=GCE  CC=g++ XXCFLAGS=\"-mthreads -D__CLEANUP_CXX\" XXLIBS=\"benchlib.\" all-bench\n\nGC-debug:\n\t$(MAKE) TEST=GC CC=gcc XXCFLAGS=\"-D__CLEANUP_C\" DLL_VER=\"$(DLL_VER)d\" all-pass\n\nGC-static:\n\t$(MAKE) TEST=GC CC=gcc XXCFLAGS=\"-D__CLEANUP_C -DPTW32_STATIC_LIB\" DLL=\"\" all-static\n\nGC-stress:\n\t$(ECHO) Stress tests can take a long time since they are trying to\n\t$(ECHO) expose weaknesses that may be intermittant or statistically rare.\n\t$(ECHO) A pass does not prove correctness, but may give greater confidence.\n\t$(MAKE) TEST=GC CC=gcc XXCFLAGS=\"-D__CLEANUP_C\" all-stress\n\nGCE-stress:\n\t$(MAKE) TEST=GCE  CC=g++ XXCFLAGS=\"-mthreads -D__CLEANUP_CXX\" all-stress\n\nall-pass: $(PASSES)\n\t@ $(ECHO) ALL TESTS PASSED! Congratulations!\n\nall-bench: $(BENCHRESULTS)\n\t@ $(ECHO) BENCH TESTS COMPLETED.\n\nall-stress: $(STRESSRESULTS)\n\t@ $(ECHO) STRESS TESTS COMPLETED.\n\nall-static: $(STATICRESULTS)\n\t@ $(ECHO) ALL STATIC TESTS PASSED! Congratulations!\n\t@ $(ECHO) Build and test the DLL to run all tests.\n\t@ $(ECHO) This test only confirms that the static lib links correctly.\n\nbenchtest1.bench:\nbenchtest2.bench:\nbenchtest3.bench:\nbenchtest4.bench:\nbenchtest5.bench:\n\nbarrier1.pass: semaphore4.pass\nbarrier2.pass: barrier1.pass\nbarrier3.pass: barrier2.pass\nbarrier4.pass: barrier3.pass\nbarrier5.pass: barrier4.pass\ncancel1.pass: create1.pass\ncancel2.pass: cancel1.pass\ncancel2_1.pass: cancel2.pass\ncancel3.pass: context1.pass\ncancel4.pass: cancel3.pass\ncancel5.pass: cancel3.pass\ncancel6a.pass: cancel3.pass\ncancel6d.pass: cancel3.pass\ncancel7.pass: kill1.pass\ncancel8.pass: cancel7.pass\ncancel9.pass: cancel8.pass\ncleanup0.pass: cancel5.pass\ncleanup1.pass: cleanup0.pass\ncleanup2.pass: cleanup1.pass\ncleanup3.pass: cleanup2.pass\ncondvar1.pass:\ncondvar1_1.pass: condvar1.pass\ncondvar1_2.pass: join2.pass\ncondvar2.pass: condvar1.pass\ncondvar2_1.pass: condvar2.pass join2.pass\ncondvar3.pass: create1.pass condvar2.pass\ncondvar3_1.pass: condvar3.pass join2.pass\ncondvar3_2.pass: condvar3_1.pass\ncondvar3_3.pass: condvar3_2.pass\ncondvar4.pass: create1.pass\ncondvar5.pass: condvar4.pass\ncondvar6.pass: condvar5.pass\ncondvar7.pass: condvar6.pass cleanup1.pass\ncondvar8.pass: condvar7.pass\ncondvar9.pass: condvar8.pass\ncontext1.pass: cancel2.pass\ncount1.pass: join1.pass\ncreate1.pass: mutex2.pass\ncreate2.pass: create1.pass\ncreate3.pass:\ndelay1.pass: cancel2.pass\ndelay2.pass: delay1.pass\ndetach1.pass: join0.pass\nequal1.pass: create1.pass\nerrno1.pass: mutex3.pass\nexception1.pass: cancel4.pass\nexception2.pass: exception1.pass\nexception3.pass: exception2.pass\nexit1.pass:\nexit2.pass: create1.pass\nexit3.pass: create1.pass\nexit4.pass:\nexit5.pass: exit4.pass kill1.pass\neyal1.pass: tsd1.pass\ninherit1.pass: join1.pass priority1.pass\njoin0.pass: create1.pass\njoin1.pass: create1.pass\njoin2.pass: create1.pass\njoin3.pass: join2.pass\nkill1.pass:\nloadfree.pass: pthread.dll\nmutex1.pass: self1.pass\nmutex1n.pass: mutex1.pass\nmutex1e.pass: mutex1.pass\nmutex1r.pass: mutex1.pass\nmutex2.pass: mutex1.pass\nmutex2r.pass: mutex2.pass\nmutex2e.pass: mutex2.pass\nmutex3.pass: create1.pass\nmutex3r.pass: mutex3.pass\nmutex3e.pass: mutex3.pass\nmutex4.pass: mutex3.pass\nmutex5.pass:\nmutex6.pass: mutex4.pass\nmutex6n.pass: mutex4.pass\nmutex6e.pass: mutex4.pass\nmutex6r.pass: mutex4.pass\nmutex6s.pass: mutex6.pass\nmutex6rs.pass: mutex6r.pass\nmutex6es.pass: mutex6e.pass\nmutex7.pass: mutex6.pass\nmutex7n.pass: mutex6n.pass\nmutex7e.pass: mutex6e.pass\nmutex7r.pass: mutex6r.pass\nmutex8.pass: mutex7.pass\nmutex8n.pass: mutex7n.pass\nmutex8e.pass: mutex7e.pass\nmutex8r.pass: mutex7r.pass\nonce1.pass: create1.pass\nonce2.pass: once1.pass\nonce3.pass: once2.pass\nonce4.pass: once3.pass\npriority1.pass: join1.pass\npriority2.pass: priority1.pass barrier3.pass\nreuse1.pass: create2.pass\nreuse2.pass: reuse1.pass\nrwlock1.pass: condvar6.pass\nrwlock2.pass: rwlock1.pass\nrwlock3.pass: rwlock2.pass\nrwlock4.pass: rwlock3.pass\nrwlock5.pass: rwlock4.pass\nrwlock6.pass: rwlock5.pass\nrwlock7.pass: rwlock6.pass\nrwlock8.pass: rwlock7.pass\nrwlock2_t.pass: rwlock2.pass\nrwlock3_t.pass: rwlock2_t.pass\nrwlock4_t.pass: rwlock3_t.pass\nrwlock5_t.pass: rwlock4_t.pass\nrwlock6_t.pass: rwlock5_t.pass\nrwlock6_t2.pass: rwlock6_t.pass\nself1.pass:\nself2.pass: create1.pass\nsemaphore1.pass:\nsemaphore2.pass:\nsemaphore3.pass: semaphore2.pass\nsemaphore4.pass: semaphore3.pass cancel1.pass\nsemaphore4t.pass: semaphore4.pass\nsemaphore5.pass: semaphore4.pass\nsizes.pass:\nspin1.pass:\nspin2.pass: spin1.pass\nspin3.pass: spin2.pass\nspin4.pass: spin3.pass\nstress1.pass:\ntsd1.pass: barrier5.pass join1.pass\ntsd2.pass: tsd1.pass\nvalid1.pass: join1.pass\nvalid2.pass: valid1.pass\n\nsizes.pass: sizes.exe\n\t@ $(ECHO) Running $*\n\t$< > SIZES.$(TEST)\n\t@ $(CAT) SIZES.$(TEST)\n\t@ $(ECHO) Passed\n\t@ $(TOUCH) $@\n\n%.pass: %.exe\n\t@ $(ECHO) Running $*\n\t$*\n\t@ $(ECHO) Passed\n\t@ $(TOUCH) $@\n\n%.bench: $(LIB) $(DLL) $(HDR) $(QAPC) $(XXLIBS) %.exe\n\t@ $(ECHO) Running $*\n\t$*\n\t@ $(ECHO) Done\n\t@ $(TOUCH) $@\n\n%.exe: %.c $(LIB) $(DLL) $(HDR) $(QAPC)\n\t@ $(ECHO) Compiling $@\n\t@ $(ECHO) $(CC) $(CFLAGS) -o $@ $< $(INCLUDES) -L. -lpthread$(GCX) -lsupc++ $(XXLIBS)\n\t@ $(CC) $(CFLAGS) -o $@ $< $(INCLUDES) -L. -lpthread$(GCX) -lsupc++ $(XXLIBS)\n\n%.pre: %.c $(HDR)\n\t@ $(CC) -E $(CFLAGS) -o $@ $< $(INCLUDES)\n\n%.s: %.c $(HDR)\n\t@ $(CC) -S $(CFLAGS) -o $@ $< $(INCLUDES)\n\n$(COPYFILES):\n\t@ $(ECHO) Copying $@\n\t@ $(CP) $(BUILD_DIR)/$@ .\n\nbenchlib.o: benchlib.c\n\t@ $(ECHO) Compiling $@\n\t@ $(ECHO) $(CC) -c $(CFLAGS) $< $(INCLUDES)\n\t@ $(CC) -c $(CFLAGS) $< $(INCLUDES)\n\npthread.dll: $(DLL)\n\t@ $(CP) $(DLL) $@\n\nclean:\n\t- $(RM) *.dll\n\t- $(RM) *.lib\n\t- $(RM) pthread.h\n\t- $(RM) semaphore.h\n\t- $(RM) sched.h\n\t- $(RM) *.a\n\t- $(RM) *.e\n\t- $(RM) *.i\n\t- $(RM) *.o\n\t- $(RM) *.obj\n\t- $(RM) *.pdb\n\t- $(RM) *.exe\n\t- $(RM) *.pass\n\t- $(RM) *.bench\n\t- $(RM) *.static\n\t- $(RM) *.log\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/Makefile",
    "content": "# Makefile for the pthreads test suite.\n# If all of the .pass files can be created, the test suite has passed.\n#\n# --------------------------------------------------------------------------\n#\n#      Pthreads-win32 - POSIX Threads Library for Win32\n#      Copyright(C) 1998 John E. Bossom\n#      Copyright(C) 1999,2005 Pthreads-win32 contributors\n# \n#      Contact Email: rpj@callisto.canberra.edu.au\n# \n#      The current list of contributors is contained\n#      in the file CONTRIBUTORS included with the source\n#      code distribution. The list can also be seen at the\n#      following World Wide Web location:\n#      http://sources.redhat.com/pthreads-win32/contributors.html\n# \n#      This library is free software; you can redistribute it and/or\n#      modify it under the terms of the GNU Lesser General Public\n#      License as published by the Free Software Foundation; either\n#      version 2 of the License, or (at your option) any later version.\n# \n#      This library is distributed in the hope that it will be useful,\n#      but WITHOUT ANY WARRANTY; without even the implied warranty of\n#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n#      Lesser General Public License for more details.\n# \n#      You should have received a copy of the GNU Lesser General Public\n#      License along with this library in the file COPYING.LIB;\n#      if not, write to the Free Software Foundation, Inc.,\n#      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n#\n\nDLL_VER\t= 2\n\nCP\t= copy\nRM\t= erase\nCAT\t= type\nMKDIR\t= mkdir\nTOUCH\t= echo Passed >\nECHO\t= @echo\n\nQAPC\t= ..\\QueueUserAPCEx\\User\\quserex.dll\n\nCPHDR\t= pthread.h semaphore.h sched.h\n\nOPTIM\t= /O2 /Ob0\n\nXXLIBS\t= ws2_32.lib\n\n# C++ Exceptions\nVCEFLAGS\t= /GX /TP /DPtW32NoCatchWarn /D__CLEANUP_CXX\nVCELIB\t= pthreadVCE$(DLL_VER).lib\nVCEDLL\t= pthreadVCE$(DLL_VER).dll\n# Structured Exceptions\nVSEFLAGS\t= /D__CLEANUP_SEH\nVSELIB\t= pthreadVSE$(DLL_VER).lib\nVSEDLL\t= pthreadVSE$(DLL_VER).dll\n# C cleanup code\nVCFLAGS\t= /D__CLEANUP_C\nVCLIB\t= pthreadVC$(DLL_VER).lib\nVCDLL\t= pthreadVC$(DLL_VER).dll\n# C++ Exceptions in application - using VC version of pthreads dll\nVCXFLAGS\t= /GX /TP /D__CLEANUP_C\n\n# Defaults\nCPLIB\t= $(VCLIB)\nCPDLL\t= $(VCDLL)\n\nCFLAGS= $(OPTIM) /W3 /WX /MD /nologo /Yd /Zi\nLFLAGS= /INCREMENTAL:NO\nINCLUDES=-I.\nBUILD_DIR=..\n\nCOPYFILES\t= $(CPHDR) $(CPLIB) $(CPDLL) $(QAPC)\n\nTEST\t\t=\nEHFLAGS\t=\n\n# If a test case returns a non-zero exit code to the shell, make will\n# stop.\n\nPASSES= sizes.pass  loadfree.pass \\\n\t  self1.pass  mutex5.pass  \\\n\t  mutex1.pass  mutex1n.pass  mutex1e.pass  mutex1r.pass  \\\n\t  semaphore1.pass  semaphore2.pass  semaphore3.pass  \\\n\t  mutex2.pass  mutex3.pass  \\\n\t  mutex2r.pass  mutex2e.pass  mutex3r.pass  mutex3e.pass  \\\n\t  condvar1.pass  condvar1_1.pass  condvar1_2.pass  condvar2.pass  condvar2_1.pass  \\\n\t  exit1.pass  create1.pass  create2.pass  reuse1.pass  reuse2.pass  equal1.pass  \\\n\t  kill1.pass  valid1.pass  valid2.pass  \\\n\t  exit2.pass  exit3.pass  exit4.pass  exit5.pass  \\\n\t  join0.pass  join1.pass  detach1.pass  join2.pass join3.pass  \\\n\t  mutex4.pass  mutex6.pass  mutex6n.pass  mutex6e.pass  mutex6r.pass  \\\n\t  mutex6s.pass  mutex6es.pass  mutex6rs.pass  \\\n\t  mutex7.pass  mutex7n.pass  mutex7e.pass  mutex7r.pass  \\\n\t  mutex8.pass  mutex8n.pass  mutex8e.pass  mutex8r.pass  \\\n\t  count1.pass  \\\n\t  once1.pass  once2.pass  once3.pass  once4.pass  \\\n\t  self2.pass  \\\n\t  cancel1.pass  cancel2.pass  \\\n\t  semaphore4.pass  semaphore4t.pass  semaphore5.pass  \\\n\t  barrier1.pass  barrier2.pass  barrier3.pass  barrier4.pass  barrier5.pass  \\\n\t  tsd1.pass  tsd2.pass  delay1.pass  delay2.pass  eyal1.pass  \\\n\t  condvar3.pass  condvar3_1.pass  condvar3_2.pass  condvar3_3.pass  \\\n\t  condvar4.pass  condvar5.pass  condvar6.pass  \\\n\t  condvar7.pass  condvar8.pass  condvar9.pass  \\\n\t  errno1.pass  \\\n\t  rwlock1.pass  rwlock2.pass  rwlock3.pass  rwlock4.pass  \\\n\t  rwlock5.pass  rwlock6.pass  rwlock7.pass  rwlock8.pass  \\\n\t  rwlock2_t.pass  rwlock3_t.pass  rwlock4_t.pass  rwlock5_t.pass  rwlock6_t.pass  rwlock6_t2.pass  \\\n\t  context1.pass  \\\n\t  cancel3.pass  cancel4.pass  cancel5.pass  cancel6a.pass  cancel6d.pass  \\\n\t  cancel7.pass  cancel8.pass  \\\n\t  cleanup0.pass  cleanup1.pass  cleanup2.pass  cleanup3.pass  \\\n\t  priority1.pass priority2.pass inherit1.pass  \\\n\t  spin1.pass  spin2.pass  spin3.pass  spin4.pass  \\\n\t  exception1.pass  exception2.pass  exception3.pass  \\\n\t  cancel9.pass  create3.pass  stress1.pass\n\nBENCHRESULTS = \\\n\t  benchtest1.bench benchtest2.bench benchtest3.bench benchtest4.bench benchtest5.bench\n\nSTRESSRESULTS = \\\n\t  stress1.stress\n\nSTATICRESULTS = \\\n\t  self1.pass\n\nhelp:\n\t@ $(ECHO) Run one of the following command lines:\n\t@ $(ECHO) nmake clean VC          (to test using VC dll with VC (no EH) apps)\n\t@ $(ECHO) nmake clean VC-bench    (to benchtest using VC dll with C bench apps)\n\t@ $(ECHO) nmake clean VC-stress   (to stresstest using VC dll with C stress apps)\n\t@ $(ECHO) nmake clean VC-static   (to test using VC static lib with VC (no EH) apps)\n\t@ $(ECHO) nmake clean VCX         (to test using VC dll with VC++ (EH) applications)\n\t@ $(ECHO) nmake clean VCX-bench   (to benchtest using VC dll with C++ bench apps)\n\t@ $(ECHO) nmake clean VCX-stress  (to stresstest using VC dll with C++ stress apps)\n\t@ $(ECHO) nmake clean VCE         (to test using the VCE dll with VC++ EH applications)\n\t@ $(ECHO) nmake clean VCE-bench   (to benchtest using VCE dll with C++ bench apps)\n\t@ $(ECHO) nmake clean VCE-stress  (to stresstest using VCE dll with C++ stress apps)\n\t@ $(ECHO) nmake clean VSE         (to test using VSE dll with VC (SEH) apps)\n\t@ $(ECHO) nmake clean VSE-bench   (to benchtest using VSE dll with SEH bench apps)\n\t@ $(ECHO) nmake clean VSE-stress  (to stresstest using VSE dll with SEH stress apps)\n\nall:\n\t@ nmake clean VC\n\t@ nmake clean VCX\n\t@ nmake clean VCE\n\t@ nmake clean VSE\n\t@ nmake clean VC-bench\n\t@ nmake clean VC-stress\n\n# This allows an individual test application to be made using the default lib.\n# e.g. nmake clean test cancel3.exe\ntest: $(CPLIB) $(CPDLL) $(CPHDR) $(QAPC)\n\ntests: $(CPLIB) $(CPDLL) $(CPHDR) $(QAPC) $(PASSES)\n\t@ $(ECHO) ALL TESTS PASSED! Congratulations!\n\nbenchtests: $(CPLIB) $(CPDLL) $(CPHDR) $(XXLIBS) $(BENCHRESULTS)\n\t@ $(ECHO) ALL BENCH TESTS DONE.\n\nstresstests: $(CPLIB) $(CPDLL) $(CPHDR) $(STRESSRESULTS)\n\t@ $(ECHO) ALL STRESS TESTS DONE.\n\nstatictests: $(CPLIB) $(CPDLL) $(CPHDR) $(STATICRESULTS)\n\t@ $(ECHO) ALL STATIC TESTS DONE.\n\t@ $(ECHO) Build and test the DLL to run all tests.\n\t@ $(ECHO) The static test only confirms that the .lib links correctly.\n\nsizes.pass: sizes.exe\n\t@ $(ECHO) ... Running $(TEST)$(DLL_VER) test: $*.exe\n\t@ .\\$*.exe > SIZES.$(TEST)\n\t@ $(CAT) SIZES.$(TEST)\n\t@ $(ECHO) ...... Passed\n\t@ $(TOUCH) $*.pass\n\n$(PASSES): $*.exe\n\t@ $(ECHO) ... Running $(TEST) test: $*.exe\n\t@ .\\$*.exe\n\t@ $(ECHO) ...... Passed\n\t@ $(TOUCH) $*.pass\n\n$(BENCHRESULTS): $*.exe\n\t@ $(ECHO) ... Running $(TEST) benchtest: $*.exe\n\t@ .\\$*.exe\n\t@ $(ECHO) ...... Done\n\t@ $(TOUCH) $*.bench\n\n$(STRESSRESULTS): $*.exe\n\t@ $(ECHO) ... Running $(TEST) stresstest: $*.exe\n\t@ .\\$*.exe\n\t@ $(ECHO) ...... Done\n\t@ $(TOUCH) $*.pass\n\nVC:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCLIB)\" CPDLL=\"$(VCDLL)\" EHFLAGS=\"$(VCFLAGS)\" tests\n\nVCE:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCELIB)\" CPDLL=\"$(VCEDLL)\" EHFLAGS=\"$(VCEFLAGS)\" tests\n\nVSE:\t\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VSELIB)\" CPDLL=\"$(VSEDLL)\" EHFLAGS=\"$(VSEFLAGS)\" tests\n\nVCX:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCLIB)\" CPDLL=\"$(VCDLL)\" EHFLAGS=\"$(VCXFLAGS)\" tests\n\nVC-bench:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCLIB)\" CPDLL=\"$(VCDLL)\" EHFLAGS=\"$(VCFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\nVCE-bench:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCELIB)\" CPDLL=\"$(VCEDLL)\" EHFLAGS=\"$(VCEFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\nVSE-bench:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VSELIB)\" CPDLL=\"$(VSEDLL)\" EHFLAGS=\"$(VSEFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\nVCX-bench:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCLIB)\" CPDLL=\"$(VCDLL)\" EHFLAGS=\"$(VCXFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\nVC-stress:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCLIB)\" CPDLL=\"$(VCDLL)\" EHFLAGS=\"$(VCFLAGS)\" stresstests\n\nVCE-stress:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCELIB)\" CPDLL=\"$(VCEDLL)\" EHFLAGS=\"$(VCEFLAGS)\" stresstests\n\nVSE-stress:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VSELIB)\" CPDLL=\"$(VSEDLL)\" EHFLAGS=\"$(VSEFLAGS)\" stresstests\n\nVCX-stress:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCLIB)\" CPDLL=\"$(VCDLL)\" EHFLAGS=\"$(VCXFLAGS)\" stresstests\n\nVC-static:\n\t@ nmake TEST=\"$@\" CPLIB=\"$(VCLIB)\" CPDLL=\"\" EHFLAGS=\"$(VCFLAGS) /DPTW32_STATIC_LIB\" statictests\n\n.c.exe:\n\t@ $(ECHO) $(CC) $(EHFLAGS) $(CFLAGS) $(INCLUDES) $< /Fe$@ /link $(LFLAGS) $(CPLIB) $(XXLIBS)\n\t@ $(CC) $(EHFLAGS) $(CFLAGS) $(INCLUDES) $< /Fe$@ /link $(LFLAGS) $(CPLIB) $(XXLIBS)\n\n.c.o:\n\t@ $(ECHO) $(CC) $(EHFLAGS) /c $(CFLAGS) $(INCLUDES) $< /Fo$@\n\t@ $(CC) $(EHFLAGS) $(CFLAGS) /c $(INCLUDES) $< /Fo$@\n\n.c.i:\n\t@ $(CC) /P $(EHFLAGS) $(CFLAGS) $(INCLUDES) $<\n\n$(COPYFILES):\n\t@ $(ECHO) Copying $@\n\t@ $(CP) $(BUILD_DIR)\\$@ .\n\npthread.dll: $(CPDLL)\n\t@ $(CP) $(CPDLL) pthread.dll\n\t@ $(CP) $(CPLIB) pthread.lib\n\nclean:\n\t- $(RM) *.dll\n\t- $(RM) *.lib\n\t- $(RM) pthread.h\n\t- $(RM) semaphore.h\n\t- $(RM) sched.h\n\t- $(RM) *.e\n\t- $(RM) *.i\n\t- $(RM) *.obj\n\t- $(RM) *.pdb\n\t- $(RM) *.o\n\t- $(RM) *.asm\n\t- $(RM) *.exe\n\t- $(RM) *.pass\n\t- $(RM) *.bench\n\t- $(RM) *.log\n\nbenchtest1.bench:\nbenchtest2.bench:\nbenchtest3.bench:\nbenchtest4.bench:\nbenchtest5.bench:\n\nbarrier1.pass: semaphore4.pass\nbarrier2.pass: barrier1.pass\nbarrier3.pass: barrier2.pass\nbarrier4.pass: barrier3.pass\nbarrier5.pass: barrier4.pass\ncancel1.pass: create1.pass\ncancel2.pass: cancel1.pass\ncancel3.pass: context1.pass\ncancel4.pass: cancel3.pass\ncancel5.pass: cancel3.pass\ncancel6a.pass: cancel3.pass\ncancel6d.pass: cancel3.pass\ncancel7.pass: kill1.pass\ncancel8.pass: cancel7.pass\ncancel9.pass: cancel8.pass\ncleanup0.pass: cancel5.pass\ncleanup1.pass: cleanup0.pass\ncleanup2.pass: cleanup1.pass\ncleanup3.pass: cleanup2.pass\ncondvar1.pass:\ncondvar1_1.pass: condvar1.pass\ncondvar1_2.pass: join2.pass\ncondvar2.pass: condvar1.pass\ncondvar2_1.pass: condvar2.pass join2.pass\ncondvar3.pass: create1.pass condvar2.pass\ncondvar3_1.pass: condvar3.pass join2.pass\ncondvar3_2.pass: condvar3_1.pass\ncondvar3_3.pass: condvar3_2.pass\ncondvar4.pass: create1.pass\ncondvar5.pass: condvar4.pass\ncondvar6.pass: condvar5.pass\ncondvar7.pass: condvar6.pass cleanup1.pass\ncondvar8.pass: condvar7.pass\ncondvar9.pass: condvar8.pass\ncontext1.pass: cancel2.pass\ncount1.pass: join1.pass\ncreate1.pass: mutex2.pass\ncreate2.pass: create1.pass\ncreate3.pass:\ndelay1.pass:\ndelay2.pass: delay1.pass\ndetach1.pass: join0.pass\nequal1.pass: create1.pass\nerrno1.pass: mutex3.pass\nexception1.pass: cancel4.pass\nexception2.pass: exception1.pass\nexception3.pass: exception2.pass\nexit1.pass:\nexit2.pass: create1.pass\nexit3.pass: create1.pass\nexit4.pass:\nexit5.pass: kill1.pass\neyal1.pass: tsd1.pass\ninherit1.pass: join1.pass priority1.pass\njoin0.pass: create1.pass\njoin1.pass: create1.pass\njoin2.pass: create1.pass\njoin3.pass: join2.pass\nkill1.pass: \nloadfree.pass: pthread.dll\nmutex1.pass: self1.pass\nmutex1n.pass: mutex1.pass\nmutex1e.pass: mutex1.pass\nmutex1r.pass: mutex1.pass\nmutex2.pass: mutex1.pass\nmutex2r.pass: mutex2.pass\nmutex2e.pass: mutex2.pass\nmutex3.pass: create1.pass\nmutex3r.pass: mutex3.pass\nmutex3e.pass: mutex3.pass\nmutex4.pass: mutex3.pass\nmutex5.pass:\nmutex6.pass: mutex4.pass\nmutex6n.pass: mutex4.pass\nmutex6e.pass: mutex4.pass\nmutex6r.pass: mutex4.pass\nmutex6s.pass: mutex6.pass\nmutex6rs.pass: mutex6r.pass\nmutex6es.pass: mutex6e.pass\nmutex7.pass: mutex6.pass\nmutex7n.pass: mutex6n.pass\nmutex7e.pass: mutex6e.pass\nmutex7r.pass: mutex6r.pass\nmutex8.pass: mutex7.pass\nmutex8n.pass: mutex7n.pass\nmutex8e.pass: mutex7e.pass\nmutex8r.pass: mutex7r.pass\nonce1.pass: create1.pass\nonce2.pass: once1.pass\nonce3.pass: once2.pass\nonce4.pass: once3.pass\npriority1.pass: join1.pass\npriority2.pass: priority1.pass barrier3.pass\nreuse1.pass: create2.pass\nreuse2.pass: reuse1.pass\nrwlock1.pass: condvar6.pass\nrwlock2.pass: rwlock1.pass\nrwlock3.pass: rwlock2.pass\nrwlock4.pass: rwlock3.pass\nrwlock5.pass: rwlock4.pass\nrwlock6.pass: rwlock5.pass\nrwlock7.pass: rwlock6.pass\nrwlock8.pass: rwlock7.pass\nrwlock2_t.pass: rwlock2.pass\nrwlock3_t.pass: rwlock2_t.pass\nrwlock4_t.pass: rwlock3_t.pass\nrwlock5_t.pass: rwlock4_t.pass\nrwlock6_t.pass: rwlock5_t.pass\nrwlock6_t2.pass: rwlock6_t.pass\nself1.pass:\nself2.pass: create1.pass\nsemaphore1.pass:\nsemaphore2.pass:\nsemaphore3.pass: semaphore2.pass\nsemaphore4.pass: semaphore3.pass cancel1.pass\nsemaphore4t.pass: semaphore4.pass\nsemaphore5.pass: semaphore4.pass\nsizes.pass:\nspin1.pass:\nspin2.pass: spin1.pass\nspin3.pass: spin2.pass\nspin4.pass: spin3.pass\nstress1.pass: condvar9.pass barrier5.pass\ntsd1.pass: barrier5.pass join1.pass\ntsd2.pass: tsd1.pass\nvalid1.pass: join1.pass\nvalid2.pass: valid1.pass\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/README.BENCHTESTS",
    "content": "\n------------\nBenchmarking\n------------\nThere is a set a benchmarking programs in the\n\"tests\" directory. These should be runnable using the\nfollowing command-lines corresponding to each of the possible\nlibrary builds:\n\nMSVC:\nnmake clean VC-bench\nnmake clean VCE-bench\nnmake clean VSE-bench\n\nMingw32:\nmake clean GC-bench\nmake clean GCE-bench\n\nUWIN:\nThe benchtests are run as part of the testsuite.\n\n\nMutex benchtests\n----------------\n\nbenchtest1 - Lock plus unlock on an unlocked mutex.\nbenchtest2 - Lock plus unlock on a locked mutex.\nbenchtest3 - Trylock on a locked mutex.\nbenchtest4 - Trylock plus unlock on an unlocked mutex.\n\n\nEach test times up to three alternate synchronisation\nimplementations as a reference, and then times each of\nthe four mutex types provided by the library. Each is\ndescribed below:\n\nSimple Critical Section\n- uses a simple Win32 critical section. There is no\nadditional overhead for this case as there is in the\nremaining cases.\n\nPOSIX mutex implemented using a Critical Section\n- The old implementation which uses runtime adaptation\ndepending on the Windows variant being run on. When\nthe pthreads DLL was run on WinNT or higher then\nPOSIX mutexes would use Win32 Critical Sections.\n\nPOSIX mutex implemented using a Win32 Mutex\n- The old implementation which uses runtime adaptation\ndepending on the Windows variant being run on. When\nthe pthreads DLL was run on Win9x then POSIX mutexes\nwould use Win32 Mutexes (because TryEnterCriticalSection\nis not implemented on Win9x).\n\nPTHREAD_MUTEX_DEFAULT\nPTHREAD_MUTEX_NORMAL\nPTHREAD_MUTEX_ERRORCHECK\nPTHREAD_MUTEX_RECURSIVE\n- The current implementation supports these mutex types.\nThe underlying basis of POSIX mutexes is now the same\nirrespective of the Windows variant, and should therefore\nhave consistent performance.\n\n\nSemaphore benchtests\n--------------------\n\nbenchtest5 - Timing for various uncontended cases.\n\n\nIn all benchtests, the operation is repeated a large\nnumber of times and an average is calculated. Loop\noverhead is measured and subtracted from all test times.\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/SIZES.VCE",
    "content": "Sizes of pthreads-win32 structs\n-------------------------------\n                     pthread_t    8\n                ptw32_thread_t   76\n               pthread_attr_t_   28\n                        sem_t_   12\n              pthread_mutex_t_   24\n          pthread_mutexattr_t_    8\n           pthread_spinlock_t_    8\n            pthread_barrier_t_   24\n        pthread_barrierattr_t_    4\n                pthread_key_t_   16\n               pthread_cond_t_   32\n           pthread_condattr_t_    4\n             pthread_rwlock_t_   28\n         pthread_rwlockattr_t_    4\n               pthread_once_t_   16\n               ptw32_cleanup_t   12\n             ptw32_mcs_node_t_   16\n                   sched_param    4\n-------------------------------\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/Wmakefile",
    "content": "# Watcom makefile for the pthreads test suite.\n# If all of the .pass files can be created, the test suite has passed.\n#\n# --------------------------------------------------------------------------\n#\n#      Pthreads-win32 - POSIX Threads Library for Win32\n#      Copyright(C) 1998 John E. Bossom\n#      Copyright(C) 1999,2005 Pthreads-win32 contributors\n# \n#      Contact Email: rpj@callisto.canberra.edu.au\n# \n#      The current list of contributors is contained\n#      in the file CONTRIBUTORS included with the source\n#      code distribution. The list can also be seen at the\n#     following World Wide Web location:\n#      http://sources.redhat.com/pthreads-win32/contributors.html\n# \n#      This library is free software; you can redistribute it and/or\n#      modify it under the terms of the GNU Lesser General Public\n#      License as published by the Free Software Foundation; either\n#      version 2 of the License, or (at your option) any later version.\n# \n#      This library is distributed in the hope that it will be useful,\n#      but WITHOUT ANY WARRANTY; without even the implied warranty of\n#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n#      Lesser General Public License for more details.\n# \n#      You should have received a copy of the GNU Lesser General Public\n#      License along with this library in the file COPYING.LIB;\n#      if not, write to the Free Software Foundation, Inc.,\n#      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n#\n\n\nDLL_VER\t= 2\n\n.EXTENSIONS:\n\n.EXTENSIONS: .pass .exe .obj .i .c\n\nCP\t= copy\nRM\t= erase\nCAT\t= type\nMKDIR\t= mkdir\nTOUCH\t= echo Passed >\nECHO\t= @echo\n\nCPHDR\t= pthread.h semaphore.h sched.h\n\nOPTIM\t= -od\n\nXXLIBS\t=\n\n# C++ Exceptions\nWCEFLAGS\t= -xs -dPtW32NoCatchWarn -d__CLEANUP_CXX\nWCELIB\t= pthreadWCE$(DLL_VER).lib\nWCEDLL\t= pthreadWCE$(DLL_VER).dll\n# C cleanup code\nWCFLAGS\t= -d__CLEANUP_C\nWCLIB\t= pthreadWC$(DLL_VER).lib\nWCDLL\t= pthreadWC$(DLL_VER).dll\n# C++ Exceptions in application - using WC version of pthreads dll\nWCXFLAGS\t= -xs -d__CLEANUP_C\n\nCFLAGS= -w4 -e25 -d_WIN32_WINNT=0x400 -d_REENTRANT -zq -bm $(OPTIM) -5r -bt=nt -mf -d2\n\nLFLAGS= \nINCLUDES= -i=.\nBUILD_DIR=..\n\nCOPYFILES\t= $(CPHDR) $(CPLIB) $(CPDLL)\n\nTEST\t\t=\nEHFLAGS\t=\n\n# If a test case returns a non-zero exit code to the shell, make will\n# stop.\n\nPASSES\t= sizes.pass  loadfree.pass &\n\t  self1.pass  mutex5.pass  &\n\t  mutex1.pass  mutex1n.pass  mutex1e.pass  mutex1r.pass &\n\t  semaphore1.pass  semaphore2.pass semaphore3.pass &\n\t  mutex2.pass  mutex3.pass  &\n\t  mutex2r.pass  mutex2e.pass  mutex3r.pass  mutex3e.pass  &\n\t  condvar1.pass  condvar1_1.pass  condvar1_2.pass  condvar2.pass  condvar2_1.pass  &\n\t  exit1.pass  create1.pass  create2.pass  reuse1.pass  reuse2.pass  equal1.pass  &\n\t  kill1.pass  valid1.pass  valid2.pass  &\n\t  exit2.pass  exit3.pass  exit4  exit5  &\n\t  join0.pass  join1.pass  detach1.pass  join2.pass join3.pass  &\n\t  mutex4.pass  mutex6.pass  mutex6n.pass  mutex6e.pass  mutex6r.pass  &\n\t  mutex6s.pass  mutex6es.pass  mutex6rs.pass  &\n\t  mutex7.pass  mutex7n.pass  mutex7e.pass  mutex7r.pass  &\n\t  mutex8.pass  mutex8n.pass  mutex8e.pass  mutex8r.pass  &\n\t  count1.pass  &\n\t  once1.pass  once2.pass  once3.pass  once4.pass  tsd1.pass  &\n\t  self2.pass  &\n\t  cancel1.pass  cancel2.pass  &\n\t  semaphore4.pass semaphore4t.pass semaphore5.pass &\n\t  delay1.pass  delay2.pass  eyal1.pass  &\n\t  condvar3.pass  condvar3_1.pass  condvar3_2.pass  condvar3_3.pass  &\n\t  condvar4.pass  condvar5.pass  condvar6.pass  &\n\t  condvar7.pass  condvar8.pass  condvar9.pass  &\n\t  errno1.pass  &\n\t  rwlock1.pass  rwlock2.pass  rwlock3.pass  rwlock4.pass  rwlock5.pass  &\n\t  rwlock6.pass  rwlock7.pass  rwlock8.pass  &\n\t  rwlock2_t.pass  rwlock3_t.pass  rwlock4_t.pass  rwlock5_t.pass  rwlock6_t.pass  rwlock6_t2.pass  &\n\t  context1.pass  &\n\t  cancel3.pass  cancel4.pass  cancel5.pass  cancel6a.pass  cancel6d.pass  &\n\t  cancel7  cancel8  &\n\t  cleanup0.pass  cleanup1.pass  cleanup2.pass  cleanup3.pass  &\n\t  priority1.pass priority2.pass inherit1.pass  &\n\t  spin1.pass  spin2.pass  spin3.pass  spin4.pass  &\n\t  barrier1.pass  barrier2.pass  barrier3.pass  barrier4.pass  barrier5.pass  &\n\t  exception1.pass  exception2.pass  exception3.pass  &\n\t  cancel9.pass  create3.pass  stress1.pass\n\nBENCHRESULTS = &\n\t  benchtest1.bench benchtest2.bench benchtest3.bench benchtest4.bench benchtest5.bench\n\nhelp: .SYMBOLIC\n\t@ $(ECHO) Run one of the following command lines:\n\t@ $(ECHO) wmake /f Wmakefile clean WC    (to test using WC dll with wcc386 (no EH) applications)\n\t@ $(ECHO) wmake /f Wmakefile clean WCX   (to test using WC dll with wpp386 (EH) applications)\n\t@ $(ECHO) wmake /f Wmakefile clean WCE   (to test using the WCE dll with wpp386 EH applications)\n\t@ $(ECHO) wmake /f Wmakefile clean WC-bench    (to benchtest using WC dll with C bench app)\n\t@ $(ECHO) wmake /f Wmakefile clean WCX-bench   (to benchtest using WC dll with C++ bench app)\n\t@ $(ECHO) wmake /f Wmakefile clean WCE-bench   (to benchtest using WCE dll with C++ bench app)\n\nall: .SYMBOLIC\n\t@ wmake /f Wmakefile clean WC\n\t@ wmake /f Wmakefile clean WCX\n\t@ wmake /f Wmakefile clean WCE\n\t@ wmake /f Wmakefile clean WSE\n\t@ wmake /f Wmakefile clean WC-bench\n\ntests: $(CPLIB) $(CPDLL) $(CPHDR) $(PASSES) .SYMBOLIC\n\t@ $(ECHO) ALL TESTS PASSED! Congratulations!\n\nbenchtests: $(CPLIB) $(CPDLL) $(CPHDR) $(XXLIBS) $(BENCHRESULTS) .SYMBOLIC\n\t@ $(ECHO) ALL BENCH TESTS DONE.\n\n$(BENCHRESULTS): ($[*).exe\n\t@ $(ECHO) ... Running $(TEST) benchtest: ($[*).exe\n\t@ .\\($[*).exe\n\t@ $(ECHO) ...... Done\n\t@ $(TOUCH) ($[*).bench\n\nWCE: .SYMBOLIC\n\t@ wmake /f Wmakefile CC=wpp386 TEST=\"$@\" CPLIB=\"$(WCELIB)\" CPDLL=\"$(WCEDLL)\" EHFLAGS=\"$(WCEFLAGS)\" tests\n\nWC: .SYMBOLIC\n\t@ wmake /f Wmakefile CC=wcc386 TEST=\"$@\" CPLIB=\"$(WCLIB)\" CPDLL=\"$(WCDLL)\" EHFLAGS=\"$(WCFLAGS)\" tests\n\nWCX: .SYMBOLIC\n\t@ wmake /f Wmakefile CC=wpp386 TEST=\"$@\" CPLIB=\"$(WCLIB)\" CPDLL=\"$(WCDLL)\" EHFLAGS=\"$(WCXFLAGS)\" tests\n\nWCE-bench: .SYMBOLIC\n\t@ wmake /f Wmakefile CC=wpp386 TEST=\"$@\" CPLIB=\"$(WCELIB)\" CPDLL=\"$(WCEDLL)\" EHFLAGS=\"$(WCEFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\nWC-bench: .SYMBOLIC\n\t@ wmake /f Wmakefile CC=wcc386 TEST=\"$@\" CPLIB=\"$(WCLIB)\" CPDLL=\"$(WCDLL)\" EHFLAGS=\"$(WCFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\nWCX-bench: .SYMBOLIC\n\t@ wmake /f Wmakefile CC=wpp386 TEST=\"$@\" CPLIB=\"$(WCLIB)\" CPDLL=\"$(WCDLL)\" EHFLAGS=\"$(WCXFLAGS)\" XXLIBS=\"benchlib.o\" benchtests\n\nsizes.pass: sizes.exe\n\t@ $(ECHO) ... Running $(TEST) test: $^*\n\t@ $[@ > SIZES.$(TEST)\n\t@ $(CAT) SIZES.$(TEST)\n\t@ $(ECHO) ...... Passed\n\t@ $(TOUCH) $^@\n\n.exe.pass:\n\t@ $(ECHO) ... Running $(TEST) test: $^*\n\t@ $[@\n\t@ $(ECHO) ...... Passed\n\t@ $(TOUCH) $^@\n\n.obj.exe:\n\t@ $(ECHO) wlink NAME $^@ FILE $[@ LIBRARY $(CPLIB) OPTION quiet\n\t@ wlink NAME $^@ FILE $[@ LIBRARY $(CPLIB) OPTION quiet\n\n.c.obj:\n\t@ $(ECHO) $(CC) $^* $(EHFLAGS) $(CFLAGS) $(INCLUDES)\n\t@ $(CC) $^* $(EHFLAGS) $(CFLAGS) $(INCLUDES)\n\n.c.i:\n\t@ $(CC) /P $(EHFLAGS) $(CFLAGS) $(INCLUDES) $<\n\n$(COPYFILES): .SYMBOLIC\n\t@ $(ECHO) Copying $@\n\t@ $(CP) $(BUILD_DIR)\\$@ .\n\npthread.dll:\n\t@ $(CP) $(CPDLL) $*.dll\n\t@ $(CP) $(CPLIB) $*.lib\n\nclean: .SYMBOLIC\n\t@ if exist *.dll $(RM) *.dll\n\t@ if exist *.lib $(RM) *.lib\n\t@ if exist *.err $(RM) *.err\n\t@ if exist pthread.h $(RM) pthread.h\n\t@ if exist semaphore.h $(RM) semaphore.h\n\t@ if exist sched.h $(RM) sched.h\n\t@ if exist *.e $(RM) *.e\n\t@ if exist *.i $(RM) *.i\n\t@ if exist *.obj $(RM) *.obj\n\t@ if exist *.pdb $(RM) *.pdb\n\t@ if exist *.o $(RM) *.o\n\t@ if exist *.asm $(RM) *.asm\n\t@ if exist *.exe $(RM) *.exe\n\t@ if exist *.pass $(RM) *.pass\n\t@ if exist *.bench $(RM) *.bench\n\t@ if exist *.log $(RM) *.log\n\t@ $(ECHO) Clean completed.\n\nbenchtest1.bench:\nbenchtest2.bench:\nbenchtest3.bench:\nbenchtest4.bench:\nbenchtest5.bench:\nbarrier1.pass:\nbarrier2.pass: barrier1.pass\nbarrier3.pass: barrier2.pass\nbarrier4.pass: barrier3.pass\nbarrier5.pass: barrier4.pass\ncancel1.pass: create1.pass\ncancel2.pass: cancel1.pass\ncancel3.pass: context1.pass\ncancel4.pass: cancel3.pass\ncancel5.pass: cancel3.pass\ncancel6a.pass: cancel3.pass\ncancel6d.pass: cancel3.pass\ncancel7.pass: kill1.pass\ncancel8.pass: cancel7.pass\ncleanup0.pass: cancel5.pass\ncleanup1.pass: cleanup0.pass\ncleanup2.pass: cleanup1.pass\ncleanup3.pass: cleanup2.pass\ncondvar1.pass:\ncondvar1_1.pass: condvar1.pass\ncondvar1_2.pass: join2.pass\ncondvar2.pass: condvar1.pass\ncondvar2_1.pass: condvar2.pass join2.pass\ncondvar3.pass: create1.pass condvar2.pass\ncondvar3_1.pass: condvar3.pass join2.pass\ncondvar3_2.pass: condvar3_1.pass\ncondvar3_3.pass: condvar3_2.pass\ncondvar4.pass: create1.pass\ncondvar5.pass: condvar4.pass\ncondvar6.pass: condvar5.pass\ncondvar7.pass: condvar6.pass cleanup1.pass\ncondvar8.pass: condvar7.pass\ncondvar9.pass: condvar8.pass\ncontext1.pass: cancel2.pass\ncount1.pass: join1.pass\ncreate1.pass: mutex2.pass\ncreate2.pass: create1.pass\ncreate3.pass:\ndelay1.pass:\ndelay2.pass: delay1.pass\ndetach1.pass: join0.pass\nequal1.pass: create1.pass\nerrno1.pass: mutex3.pass\nexception1.pass: cancel4.pass\nexception2.pass: exception1.pass\nexception3.pass: exception2.pass\nexit1.pass:\nexit2.pass: create1.pass\nexit3.pass: create1.pass\nexit4.pass:\nexit5.pass: kill1.pass\neyal1.pass: tsd1.pass\ninherit1.pass: join1.pass priority1.pass\njoin0.pass: create1.pass\njoin1.pass: create1.pass\njoin2.pass: create1.pass\njoin3.pass: join2.pass\nkill1.pass: \nloadfree.pass: pthread.dll\nmutex1.pass: self1.pass\nmutex1n.pass: mutex1.pass\nmutex1e.pass: mutex1.pass\nmutex1r.pass: mutex1.pass\nmutex2.pass: mutex1.pass\nmutex2r.pass: mutex2.pass\nmutex2e.pass: mutex2.pass\nmutex3.pass: create1.pass\nmutex3r.pass: mutex3.pass\nmutex3e.pass: mutex3.pass\nmutex4.pass: mutex3.pass\nmutex5.pass:\nmutex6.pass: mutex4.pass\nmutex6n.pass: mutex4.pass\nmutex6e.pass: mutex4.pass\nmutex6r.pass: mutex4.pass\nmutex6s.pass: mutex6.pass\nmutex6rs.pass: mutex6r.pass\nmutex6es.pass: mutex6e.pass\nmutex7.pass: mutex6.pass\nmutex7n.pass: mutex6n.pass\nmutex7e.pass: mutex6e.pass\nmutex7r.pass: mutex6r.pass\nmutex8.pass: mutex7.pass\nmutex8n.pass: mutex7n.pass\nmutex8e.pass: mutex7e.pass\nmutex8r.pass: mutex7r.pass\nonce1.pass: create1.pass\nonce2.pass: once1.pass\nonce3.pass: once2.pass\nonce4.pass: once3.pass\npriority1.pass: join1.pass\npriority2.pass: priority1.pass barrier3.pass\nreuse1.pass: create2.pass\nreuse2.pass: reuse1.pass\nrwlock1.pass: condvar6.pass\nrwlock2.pass: rwlock1.pass\nrwlock3.pass: rwlock2.pass\nrwlock4.pass: rwlock3.pass\nrwlock5.pass: rwlock4.pass\nrwlock6.pass: rwlock5.pass\nrwlock7.pass: rwlock6.pass\nrwlock2_t.pass: rwlock2.pass\nrwlock3_t.pass: rwlock2_t.pass\nrwlock4_t.pass: rwlock3_t.pass\nrwlock5_t.pass: rwlock4_t.pass\nrwlock6_t.pass: rwlock5_t.pass\nrwlock6_t2.pass: rwlock6_t.pass\nself1.pass:\nself2.pass: create1.pass\nsemaphore1.pass:\nsemaphore2.pass:\nsemaphore3.pass: semaphore2.pass\nsemaphore4.pass: semaphore3.pass cancel1.pass\nsemaphore4t.pass: semaphore4.pass\nsemaphore5.pass: semaphore4.pass\nsizes.pass:\nspin1.pass:\nspin2.pass: spin1.pass\nspin3.pass: spin2.pass\nspin4.pass: spin3.pass\nstress1.pass:\ntsd1.pass: join1.pass\nvalid1.pass: join1.pass\nvalid2.pass: valid1.pass\ncancel9.pass: cancel8.pass\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/barrier1.c",
    "content": "/* \n * barrier1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Create a barrier object and then destroy it.\n *\n */\n\n#include \"test.h\"\n\npthread_barrier_t barrier = NULL;\n\nint\nmain()\n{\n  assert(barrier == NULL);\n\n  assert(pthread_barrier_init(&barrier, NULL, 1) == 0);\n\n  assert(barrier != NULL);\n\n  assert(pthread_barrier_destroy(&barrier) == 0);\n\n  assert(barrier == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/barrier2.c",
    "content": "/* \n * barrier2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a single barrier object, wait on it, \n * and then destroy it.\n *\n */\n\n#include \"test.h\"\n \npthread_barrier_t barrier = NULL;\n\nint\nmain()\n{\n  assert(pthread_barrier_init(&barrier, NULL, 1) == 0);\n\n  assert(pthread_barrier_wait(&barrier) == PTHREAD_BARRIER_SERIAL_THREAD);\n\n  assert(pthread_barrier_destroy(&barrier) == 0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/barrier3.c",
    "content": "/*\n * barrier3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a single barrier object with barrier attribute, wait on it, \n * and then destroy it.\n *\n */\n\n#include \"test.h\"\n \npthread_barrier_t barrier = NULL;\nstatic int result = 1;\n\nvoid * func(void * arg)\n{\n  return (void *) pthread_barrier_wait(&barrier);\n}\n \nint\nmain()\n{\n  pthread_t t;\n  pthread_barrierattr_t ba;\n\n  assert(pthread_barrierattr_init(&ba) == 0);\n  assert(pthread_barrierattr_setpshared(&ba, PTHREAD_PROCESS_PRIVATE) == 0);\n  assert(pthread_barrier_init(&barrier, &ba, 1) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  assert(pthread_join(t, (void **) &result) == 0);\n\n  assert(result == PTHREAD_BARRIER_SERIAL_THREAD);\n\n  assert(pthread_barrier_destroy(&barrier) == 0);\n  assert(pthread_barrierattr_destroy(&ba) == 0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/barrier4.c",
    "content": "/*\n * barrier4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a single barrier object, multiple wait on it, \n * and then destroy it.\n *\n */\n\n#include \"test.h\"\n\nenum {\n  NUMTHREADS = 16\n};\n \npthread_barrier_t barrier = NULL;\npthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER;\nstatic int serialThreadCount = 0;\nstatic int otherThreadCount = 0;\n\nvoid *\nfunc(void * arg)\n{\n  int result = pthread_barrier_wait(&barrier);\n\n  assert(pthread_mutex_lock(&mx) == 0);\n\n  if (result == PTHREAD_BARRIER_SERIAL_THREAD)\n    {\n      serialThreadCount++;\n    }\n  else if (0 == result)\n    {\n      otherThreadCount++;\n    }\n  else\n    {\n      printf(\"Barrier wait failed: error = %s\\n\", error_string[result]);\n      fflush(stdout);\n      return NULL;\n    }\n  assert(pthread_mutex_unlock(&mx) == 0);\n\n  return NULL;\n}\n\nint\nmain()\n{\n  int i, j;\n  pthread_t t[NUMTHREADS + 1];\n\n  for (j = 1; j <= NUMTHREADS; j++)\n    {\n      printf(\"Barrier height = %d\\n\", j);\n\n      serialThreadCount = 0;\n\n      assert(pthread_barrier_init(&barrier, NULL, j) == 0);\n\n      for (i = 1; i <= j; i++)\n        {\n          assert(pthread_create(&t[i], NULL, func, NULL) == 0);\n        }\n\n      for (i = 1; i <= j; i++)\n        {\n          assert(pthread_join(t[i], NULL) == 0);\n        }\n\n      assert(serialThreadCount == 1);\n\n      assert(pthread_barrier_destroy(&barrier) == 0);\n    }\n\n  assert(pthread_mutex_destroy(&mx) == 0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/barrier5.c",
    "content": "/*\n * barrier5.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a single barrier object, set up a sequence of\n * barrier points to prove lockstepness, and then destroy it.\n *\n */\n\n#include \"test.h\"\n\nenum {\n  NUMTHREADS = 16,\n  BARRIERS = 10000\n};\n \npthread_barrier_t barrier = NULL;\npthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER;\n\nint barrierReleases[BARRIERS + 1];\n\nvoid *\nfunc(void * barrierHeight)\n{\n  int i;\n  int result;\n  int serialThreads = 0;\n\n  for (i = 1; i < BARRIERS; i++)\n    {\n      result = pthread_barrier_wait(&barrier);\n\n      assert(pthread_mutex_lock(&mx) == 0);\n      barrierReleases[i]++;\n      assert(pthread_mutex_unlock(&mx) == 0);\n      /*\n       * Confirm the correct number of releases from the previous\n       * barrier. We can't do the current barrier yet because there may\n       * still be threads waking up.\n       */\n      if (result == PTHREAD_BARRIER_SERIAL_THREAD)\n        {\n          serialThreads++;\n          assert(barrierReleases[i - 1] == (int) barrierHeight);\n          barrierReleases[i + 1] = 0;\n        }\n      else if (result != 0)\n        {\n          printf(\"Barrier failed: result = %s\\n\", error_string[result]);\n          fflush(stdout);\n          return NULL;\n        }\n    }\n\n  return (void *) serialThreads;\n}\n\nint\nmain()\n{\n  int i, j;\n  int result;\n  int serialThreadsTotal;\n  pthread_t t[NUMTHREADS + 1];\n\n  for (j = 1; j <= NUMTHREADS; j++)\n    {\n      printf(\"Barrier height = %d\\n\", j);\n\n      barrierReleases[0] = j;\n      barrierReleases[1] = 0;\n\n      assert(pthread_barrier_init(&barrier, NULL, j) == 0);\n\n      for (i = 1; i <= j; i++)\n        {\n          assert(pthread_create(&t[i], NULL, func, (void *) j) == 0);\n        }\n\n      serialThreadsTotal = 0;\n      for (i = 1; i <= j; i++)\n        {\n          assert(pthread_join(t[i], (void **) &result) == 0);\n          serialThreadsTotal += result;\n        }\n\n      assert(serialThreadsTotal == BARRIERS - 1);\n      assert(barrierReleases[BARRIERS - 1] == j);\n      assert(barrierReleases[BARRIERS] == 0);\n\n      assert(pthread_barrier_destroy(&barrier) == 0);\n    }\n\n  assert(pthread_mutex_destroy(&mx) == 0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/benchlib.c",
    "content": "/*\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n */\n\n#include \"../config.h\"\n\n#include \"pthread.h\"\n#include \"sched.h\"\n#include \"semaphore.h\"\n#include <windows.h>\n#include <stdio.h>\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#include \"benchtest.h\"\n\nint old_mutex_use = OLD_WIN32CS;\n\nBOOL (WINAPI *ptw32_try_enter_critical_section)(LPCRITICAL_SECTION) = NULL;\nHINSTANCE ptw32_h_kernel32;\n\nvoid\ndummy_call(int * a)\n{\n}\n\nvoid\ninterlocked_inc_with_conditionals(int * a)\n{\n  if (a != NULL)\n    if (InterlockedIncrement((long *) a) == -1)\n      {\n        *a = 0;\n      }\n}\n\nvoid\ninterlocked_dec_with_conditionals(int * a)\n{\n  if (a != NULL)\n    if (InterlockedDecrement((long *) a) == -1)\n      {\n        *a = 0;\n      }\n}\n\nint\nold_mutex_init(old_mutex_t *mutex, const old_mutexattr_t *attr)\n{\n  int result = 0;\n  old_mutex_t mx;\n\n  if (mutex == NULL)\n    {\n      return EINVAL;\n    }\n\n  mx = (old_mutex_t) calloc(1, sizeof(*mx));\n\n  if (mx == NULL)\n    {\n      result = ENOMEM;\n      goto FAIL0;\n    }\n\n  mx->mutex = 0;\n\n  if (attr != NULL\n      && *attr != NULL\n      && (*attr)->pshared == PTHREAD_PROCESS_SHARED\n      )\n    {\n      result = ENOSYS;\n    }\n  else\n    {\n        CRITICAL_SECTION cs;\n\n        /*\n         * Load KERNEL32 and try to get address of TryEnterCriticalSection\n         */\n        ptw32_h_kernel32 = LoadLibrary(TEXT(\"KERNEL32.DLL\"));\n        ptw32_try_enter_critical_section = (BOOL (WINAPI *)(LPCRITICAL_SECTION))\n\n#if defined(NEED_UNICODE_CONSTS)\n        GetProcAddress(ptw32_h_kernel32,\n                       (const TCHAR *)TEXT(\"TryEnterCriticalSection\"));\n#else\n        GetProcAddress(ptw32_h_kernel32,\n                       (LPCSTR) \"TryEnterCriticalSection\");\n#endif\n\n        if (ptw32_try_enter_critical_section != NULL)\n          {\n            InitializeCriticalSection(&cs);\n            if ((*ptw32_try_enter_critical_section)(&cs))\n              {\n                LeaveCriticalSection(&cs);\n              }\n            else\n              {\n                /*\n                 * Not really supported (Win98?).\n                 */\n                ptw32_try_enter_critical_section = NULL;\n              }\n            DeleteCriticalSection(&cs);\n          }\n\n        if (ptw32_try_enter_critical_section == NULL)\n          {\n            (void) FreeLibrary(ptw32_h_kernel32);\n            ptw32_h_kernel32 = 0;\n          }\n\n      if (old_mutex_use == OLD_WIN32CS)\n\t{\n\t  InitializeCriticalSection(&mx->cs);\n\t}\n      else if (old_mutex_use == OLD_WIN32MUTEX)\n      {\n\t  mx->mutex = CreateMutex (NULL,\n\t\t\t\t   FALSE,\n\t\t\t\t   NULL);\n\n\t  if (mx->mutex == 0)\n\t    {\n\t      result = EAGAIN;\n\t    }\n\t}\n      else\n\t{\n        result = EINVAL;\n      }\n    }\n\n  if (result != 0 && mx != NULL)\n    {\n      free(mx);\n      mx = NULL;\n    }\n\nFAIL0:\n  *mutex = mx;\n\n  return(result);\n}\n\n\nint\nold_mutex_lock(old_mutex_t *mutex)\n{\n  int result = 0;\n  old_mutex_t mx;\n\n  if (mutex == NULL || *mutex == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (*mutex == (old_mutex_t) PTW32_OBJECT_AUTO_INIT)\n    {\n      /*\n       * Don't use initialisers when benchtesting.\n       */\n      result = EINVAL;\n    }\n\n  mx = *mutex;\n\n  if (result == 0)\n    {\n      if (mx->mutex == 0)\n\t{\n\t  EnterCriticalSection(&mx->cs);\n\t}\n      else\n\t{\n\t  result = (WaitForSingleObject(mx->mutex, INFINITE) \n\t\t    == WAIT_OBJECT_0)\n\t    ? 0\n\t    : EINVAL;\n\t}\n    }\n\n  return(result);\n}\n\nint\nold_mutex_unlock(old_mutex_t *mutex)\n{\n  int result = 0;\n  old_mutex_t mx;\n\n  if (mutex == NULL || *mutex == NULL)\n    {\n      return EINVAL;\n    }\n\n  mx = *mutex;\n\n  if (mx != (old_mutex_t) PTW32_OBJECT_AUTO_INIT)\n    {\n      if (mx->mutex == 0)\n\t{\n\t  LeaveCriticalSection(&mx->cs);\n\t}\n      else\n\t{\n\t  result = (ReleaseMutex (mx->mutex) ? 0 : EINVAL);\n\t}\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  return(result);\n}\n\n\nint\nold_mutex_trylock(old_mutex_t *mutex)\n{\n  int result = 0;\n  old_mutex_t mx;\n\n  if (mutex == NULL || *mutex == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (*mutex == (old_mutex_t) PTW32_OBJECT_AUTO_INIT)\n    {\n      /*\n       * Don't use initialisers when benchtesting.\n       */\n      result = EINVAL;\n    }\n\n  mx = *mutex;\n\n  if (result == 0)\n    {\n      if (mx->mutex == 0)\n\t{\n\t  if (ptw32_try_enter_critical_section == NULL)\n          {\n            result = 0;\n          }\n        else if ((*ptw32_try_enter_critical_section)(&mx->cs) != TRUE)\n\t    {\n\t      result = EBUSY;\n\t    }\n\t}\n      else\n\t{\n\t  DWORD status;\n\n\t  status = WaitForSingleObject (mx->mutex, 0);\n\n\t  if (status != WAIT_OBJECT_0)\n\t    {\n\t      result = ((status == WAIT_TIMEOUT)\n\t\t\t? EBUSY\n\t\t\t: EINVAL);\n\t    }\n\t}\n    }\n\n  return(result);\n}\n\n\nint\nold_mutex_destroy(old_mutex_t *mutex)\n{\n  int result = 0;\n  old_mutex_t mx;\n\n  if (mutex == NULL\n      || *mutex == NULL)\n    {\n      return EINVAL;\n    }\n\n  if (*mutex != (old_mutex_t) PTW32_OBJECT_AUTO_INIT)\n    {\n      mx = *mutex;\n\n      if ((result = old_mutex_trylock(&mx)) == 0)\n        {\n          *mutex = NULL;\n\n          (void) old_mutex_unlock(&mx);\n\n          if (mx->mutex == 0)\n            {\n              DeleteCriticalSection(&mx->cs);\n            }\n          else\n            {\n              result = (CloseHandle (mx->mutex) ? 0 : EINVAL);\n            }\n\n          if (result == 0)\n            {\n              mx->mutex = 0;\n              free(mx);\n            }\n          else\n            {\n              *mutex = mx;\n            }\n        }\n    }\n  else\n    {\n      result = EINVAL;\n    }\n\n  if (ptw32_try_enter_critical_section != NULL)\n    {\n      (void) FreeLibrary(ptw32_h_kernel32);\n      ptw32_h_kernel32 = 0;\n    }\n\n  return(result);\n}\n\n/****************************************************************************************/\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/benchtest.h",
    "content": "/*\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n */\n\n#include \"../config.h\"\n\nenum {\n  OLD_WIN32CS,\n  OLD_WIN32MUTEX\n};\n\nextern int old_mutex_use;\n\nstruct old_mutex_t_ {\n  HANDLE mutex;\n  CRITICAL_SECTION cs;\n};\n\ntypedef struct old_mutex_t_ * old_mutex_t;\n\nstruct old_mutexattr_t_ {\n  int pshared;\n};\n\ntypedef struct old_mutexattr_t_ * old_mutexattr_t;\n\nextern BOOL (WINAPI *ptw32_try_enter_critical_section)(LPCRITICAL_SECTION);\nextern HINSTANCE ptw32_h_kernel32;\n\n#define PTW32_OBJECT_AUTO_INIT ((void *) -1)\n\nvoid dummy_call(int * a);\nvoid interlocked_inc_with_conditionals(int *a);\nvoid interlocked_dec_with_conditionals(int *a);\nint old_mutex_init(old_mutex_t *mutex, const old_mutexattr_t *attr);\nint old_mutex_lock(old_mutex_t *mutex);\nint old_mutex_unlock(old_mutex_t *mutex);\nint old_mutex_trylock(old_mutex_t *mutex);\nint old_mutex_destroy(old_mutex_t *mutex);\n/****************************************************************************************/\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/benchtest1.c",
    "content": "/*\n * benchtest1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Measure time taken to complete an elementary operation.\n *\n * - Mutex\n *   Single thread iteration over lock/unlock for each mutex type.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#include \"benchtest.h\"\n\n#define PTW32_MUTEX_TYPES\n#define ITERATIONS      10000000L\n\npthread_mutex_t mx;\npthread_mutexattr_t ma;\nstruct _timeb currSysTimeStart;\nstruct _timeb currSysTimeStop;\nlong durationMilliSecs;\nlong overHeadMilliSecs = 0;\nint one = 1;\nint zero = 0;\n\n#define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \\\n                                               - (_TStart.time*1000+_TStart.millitm))\n\n/*\n * Dummy use of j, otherwise the loop may be removed by the optimiser\n * when doing the overhead timing with an empty loop.\n */\n#define TESTSTART \\\n  { int i, j = 0, k = 0; _ftime(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++;\n\n#define TESTSTOP \\\n  }; _ftime(&currSysTimeStop); if (j + k == i) j++; }\n\n\nvoid\nrunTest (char * testNameString, int mType)\n{\n#ifdef PTW32_MUTEX_TYPES\n  assert(pthread_mutexattr_settype(&ma, mType) == 0);\n#endif\n  assert(pthread_mutex_init(&mx, &ma) == 0);\n\n  TESTSTART\n  assert(pthread_mutex_lock(&mx) == zero);\n  assert(pthread_mutex_unlock(&mx) == zero);\n  TESTSTOP\n\n  assert(pthread_mutex_destroy(&mx) == 0);\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    testNameString,\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n}\n\n\nint\nmain (int argc, char *argv[])\n{\n  int i = 0;\n  CRITICAL_SECTION cs;\n  old_mutex_t ox;\n  pthread_mutexattr_init(&ma);\n\n  printf( \"=============================================================================\\n\");\n  printf( \"\\nLock plus unlock on an unlocked mutex.\\n%ld iterations\\n\\n\",\n          ITERATIONS);\n  printf( \"%-45s %15s %15s\\n\",\n\t    \"Test\",\n\t    \"Total(msec)\",\n\t    \"average(usec)\");\n  printf( \"-----------------------------------------------------------------------------\\n\");\n\n  /*\n   * Time the loop overhead so we can subtract it from the actual test times.\n   */\n\n  TESTSTART\n  assert(1 == one);\n  assert(1 == one);\n  TESTSTOP\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  overHeadMilliSecs = durationMilliSecs;\n\n\n  TESTSTART\n  assert((dummy_call(&i), 1) == one);\n  assert((dummy_call(&i), 1) == one);\n  TESTSTOP\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Dummy call x 2\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n\n  TESTSTART\n  assert((interlocked_inc_with_conditionals(&i), 1) == one);\n  assert((interlocked_dec_with_conditionals(&i), 1) == one);\n  TESTSTOP\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Dummy call -> Interlocked with cond x 2\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n\n  TESTSTART\n  assert((InterlockedIncrement((LPLONG)&i), 1) == (LONG)one);\n  assert((InterlockedDecrement((LPLONG)&i), 1) == (LONG)one);\n  TESTSTOP\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"InterlockedOp x 2\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n\n  InitializeCriticalSection(&cs);\n\n  TESTSTART\n  assert((EnterCriticalSection(&cs), 1) == one);\n  assert((LeaveCriticalSection(&cs), 1) == one);\n  TESTSTOP\n\n  DeleteCriticalSection(&cs);\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Simple Critical Section\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n\n  old_mutex_use = OLD_WIN32CS;\n  assert(old_mutex_init(&ox, NULL) == 0);\n\n  TESTSTART\n  assert(old_mutex_lock(&ox) == zero);\n  assert(old_mutex_unlock(&ox) == zero);\n  TESTSTOP\n\n  assert(old_mutex_destroy(&ox) == 0);\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Old PT Mutex using a Critical Section (WNT)\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n\n  old_mutex_use = OLD_WIN32MUTEX;\n  assert(old_mutex_init(&ox, NULL) == 0);\n\n  TESTSTART\n  assert(old_mutex_lock(&ox) == zero);\n  assert(old_mutex_unlock(&ox) == zero);\n  TESTSTOP\n\n  assert(old_mutex_destroy(&ox) == 0);\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Old PT Mutex using a Win32 Mutex (W9x)\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n  printf( \".............................................................................\\n\");\n\n  /*\n   * Now we can start the actual tests\n   */\n#ifdef PTW32_MUTEX_TYPES\n  runTest(\"PTHREAD_MUTEX_DEFAULT (W9x,WNT)\", PTHREAD_MUTEX_DEFAULT);\n\n  runTest(\"PTHREAD_MUTEX_NORMAL (W9x,WNT)\", PTHREAD_MUTEX_NORMAL);\n\n  runTest(\"PTHREAD_MUTEX_ERRORCHECK (W9x,WNT)\", PTHREAD_MUTEX_ERRORCHECK);\n\n  runTest(\"PTHREAD_MUTEX_RECURSIVE (W9x,WNT)\", PTHREAD_MUTEX_RECURSIVE);\n#else\n  runTest(\"Non-blocking lock\", 0);\n#endif\n\n  printf( \"=============================================================================\\n\");\n\n  /*\n   * End of tests.\n   */\n\n  pthread_mutexattr_destroy(&ma);\n\n  one = i; /* Dummy assignment to avoid 'variable unused' warning */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/benchtest2.c",
    "content": "/*\n * benchtest1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Measure time taken to complete an elementary operation.\n *\n * - Mutex\n *   Two threads iterate over lock/unlock for each mutex type.\n *   The two threads are forced into lock-step using two mutexes,\n *   forcing the threads to block on each lock operation. The\n *   time measured is therefore the worst case senario.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#include \"benchtest.h\"\n\n#define PTW32_MUTEX_TYPES\n#define ITERATIONS      100000L\n\npthread_mutex_t gate1, gate2;\nold_mutex_t ox1, ox2;\nCRITICAL_SECTION cs1, cs2;\npthread_mutexattr_t ma;\nlong durationMilliSecs;\nlong overHeadMilliSecs = 0;\nstruct _timeb currSysTimeStart;\nstruct _timeb currSysTimeStop;\npthread_t worker;\nint running = 0;\n\n#define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \\\n                                               - (_TStart.time*1000+_TStart.millitm))\n\n/*\n * Dummy use of j, otherwise the loop may be removed by the optimiser\n * when doing the overhead timing with an empty loop.\n */\n#define TESTSTART \\\n  { int i, j = 0, k = 0; _ftime(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++;\n\n#define TESTSTOP \\\n  }; _ftime(&currSysTimeStop); if (j + k == i) j++; }\n\n\nvoid *\noverheadThread(void * arg)\n{\n  do\n    {\n      sched_yield();\n    }\n  while (running);\n\n  return NULL;\n}\n\n\nvoid *\noldThread(void * arg)\n{\n  do\n    {\n      (void) old_mutex_lock(&ox1);\n      (void) old_mutex_lock(&ox2);\n      (void) old_mutex_unlock(&ox1);\n      sched_yield();\n      (void) old_mutex_unlock(&ox2);\n    }\n  while (running);\n\n  return NULL;\n}\n\nvoid *\nworkerThread(void * arg)\n{\n  do\n    {\n      (void) pthread_mutex_lock(&gate1);\n      (void) pthread_mutex_lock(&gate2);\n      (void) pthread_mutex_unlock(&gate1);\n      sched_yield();\n      (void) pthread_mutex_unlock(&gate2);\n    }\n  while (running);\n\n  return NULL;\n}\n\nvoid *\nCSThread(void * arg)\n{\n  do\n    {\n      EnterCriticalSection(&cs1);\n      EnterCriticalSection(&cs2);\n      LeaveCriticalSection(&cs1);\n      sched_yield();\n      LeaveCriticalSection(&cs2);\n    }\n  while (running);\n\n  return NULL;\n}\n\nvoid\nrunTest (char * testNameString, int mType)\n{\n#ifdef PTW32_MUTEX_TYPES\n  assert(pthread_mutexattr_settype(&ma, mType) == 0);\n#endif\n  assert(pthread_mutex_init(&gate1, &ma) == 0);\n  assert(pthread_mutex_init(&gate2, &ma) == 0);\n  assert(pthread_mutex_lock(&gate1) == 0);\n  assert(pthread_mutex_lock(&gate2) == 0);\n  running = 1;\n  assert(pthread_create(&worker, NULL, workerThread, NULL) == 0);\n  TESTSTART\n  (void) pthread_mutex_unlock(&gate1);\n  sched_yield();\n  (void) pthread_mutex_unlock(&gate2);\n  (void) pthread_mutex_lock(&gate1);\n  (void) pthread_mutex_lock(&gate2);\n  TESTSTOP\n  running = 0;\n  assert(pthread_mutex_unlock(&gate2) == 0);\n  assert(pthread_mutex_unlock(&gate1) == 0);\n  assert(pthread_join(worker, NULL) == 0);\n  assert(pthread_mutex_destroy(&gate2) == 0);\n  assert(pthread_mutex_destroy(&gate1) == 0);\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    testNameString,\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS / 4   /* Four locks/unlocks per iteration */);\n}\n\n\nint\nmain (int argc, char *argv[])\n{\n  assert(pthread_mutexattr_init(&ma) == 0);\n\n  printf( \"=============================================================================\\n\");\n  printf( \"\\nLock plus unlock on a locked mutex.\\n\");\n  printf(\"%ld iterations, four locks/unlocks per iteration.\\n\\n\", ITERATIONS);\n\n  printf( \"%-45s %15s %15s\\n\",\n\t    \"Test\",\n\t    \"Total(msec)\",\n\t    \"average(usec)\");\n  printf( \"-----------------------------------------------------------------------------\\n\");\n\n  /*\n   * Time the loop overhead so we can subtract it from the actual test times.\n   */\n\n  running = 1;\n  assert(pthread_create(&worker, NULL, overheadThread, NULL) == 0);\n  TESTSTART\n  sched_yield();\n  sched_yield();\n  TESTSTOP\n  running = 0;\n  assert(pthread_join(worker, NULL) == 0);\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  overHeadMilliSecs = durationMilliSecs;\n\n\n  InitializeCriticalSection(&cs1);\n  InitializeCriticalSection(&cs2);\n  EnterCriticalSection(&cs1);\n  EnterCriticalSection(&cs2);\n  running = 1;\n  assert(pthread_create(&worker, NULL, CSThread, NULL) == 0);\n  TESTSTART\n  LeaveCriticalSection(&cs1);\n  sched_yield();\n  LeaveCriticalSection(&cs2);\n  EnterCriticalSection(&cs1);\n  EnterCriticalSection(&cs2);\n  TESTSTOP\n  running = 0;\n  LeaveCriticalSection(&cs2);\n  LeaveCriticalSection(&cs1);\n  assert(pthread_join(worker, NULL) == 0);\n  DeleteCriticalSection(&cs2);\n  DeleteCriticalSection(&cs1);\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Simple Critical Section\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS / 4 );\n\n\n  old_mutex_use = OLD_WIN32CS;\n  assert(old_mutex_init(&ox1, NULL) == 0);\n  assert(old_mutex_init(&ox2, NULL) == 0);\n  assert(old_mutex_lock(&ox1) == 0);\n  assert(old_mutex_lock(&ox2) == 0);\n  running = 1;\n  assert(pthread_create(&worker, NULL, oldThread, NULL) == 0);\n  TESTSTART\n  (void) old_mutex_unlock(&ox1);\n  sched_yield();\n  (void) old_mutex_unlock(&ox2);\n  (void) old_mutex_lock(&ox1);\n  (void) old_mutex_lock(&ox2);\n  TESTSTOP\n  running = 0;\n  assert(old_mutex_unlock(&ox1) == 0);\n  assert(old_mutex_unlock(&ox2) == 0);\n  assert(pthread_join(worker, NULL) == 0);\n  assert(old_mutex_destroy(&ox2) == 0);\n  assert(old_mutex_destroy(&ox1) == 0);\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Old PT Mutex using a Critical Section (WNT)\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS / 4);\n\n\n  old_mutex_use = OLD_WIN32MUTEX;\n  assert(old_mutex_init(&ox1, NULL) == 0);\n  assert(old_mutex_init(&ox2, NULL) == 0);\n  assert(old_mutex_lock(&ox1) == 0);\n  assert(old_mutex_lock(&ox2) == 0);\n  running = 1;\n  assert(pthread_create(&worker, NULL, oldThread, NULL) == 0);\n  TESTSTART\n  (void) old_mutex_unlock(&ox1);\n  sched_yield();\n  (void) old_mutex_unlock(&ox2);\n  (void) old_mutex_lock(&ox1);\n  (void) old_mutex_lock(&ox2);\n  TESTSTOP\n  running = 0;\n  assert(old_mutex_unlock(&ox1) == 0);\n  assert(old_mutex_unlock(&ox2) == 0);\n  assert(pthread_join(worker, NULL) == 0);\n  assert(old_mutex_destroy(&ox2) == 0);\n  assert(old_mutex_destroy(&ox1) == 0);\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Old PT Mutex using a Win32 Mutex (W9x)\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS / 4);\n\n  printf( \".............................................................................\\n\");\n\n  /*\n   * Now we can start the actual tests\n   */\n#ifdef PTW32_MUTEX_TYPES\n  runTest(\"PTHREAD_MUTEX_DEFAULT (W9x,WNT)\", PTHREAD_MUTEX_DEFAULT);\n\n  runTest(\"PTHREAD_MUTEX_NORMAL (W9x,WNT)\", PTHREAD_MUTEX_NORMAL);\n\n  runTest(\"PTHREAD_MUTEX_ERRORCHECK (W9x,WNT)\", PTHREAD_MUTEX_ERRORCHECK);\n\n  runTest(\"PTHREAD_MUTEX_RECURSIVE (W9x,WNT)\", PTHREAD_MUTEX_RECURSIVE);\n#else\n  runTest(\"Blocking locks\", 0);\n#endif\n\n  printf( \"=============================================================================\\n\");\n  /*\n   * End of tests.\n   */\n\n  pthread_mutexattr_destroy(&ma);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/benchtest3.c",
    "content": "/*\n * benchtest3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Measure time taken to complete an elementary operation.\n *\n * - Mutex\n *   Single thread iteration over a trylock on a locked mutex for each mutex type.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#include \"benchtest.h\"\n\n#define PTW32_MUTEX_TYPES\n#define ITERATIONS      10000000L\n\npthread_mutex_t mx;\nold_mutex_t ox;\npthread_mutexattr_t ma;\nstruct _timeb currSysTimeStart;\nstruct _timeb currSysTimeStop;\nlong durationMilliSecs;\nlong overHeadMilliSecs = 0;\n\n#define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \\\n                                               - (_TStart.time*1000+_TStart.millitm))\n\n/*\n * Dummy use of j, otherwise the loop may be removed by the optimiser\n * when doing the overhead timing with an empty loop.\n */\n#define TESTSTART \\\n  { int i, j = 0, k = 0; _ftime(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++;\n\n#define TESTSTOP \\\n  }; _ftime(&currSysTimeStop); if (j + k == i) j++; }\n\n\nvoid *\ntrylockThread (void * arg)\n{\n  TESTSTART\n  (void) pthread_mutex_trylock(&mx);\n  TESTSTOP\n\n  return NULL;\n}\n\n\nvoid *\noldTrylockThread (void * arg)\n{\n  TESTSTART\n  (void) old_mutex_trylock(&ox);\n  TESTSTOP\n\n  return NULL;\n}\n\n\nvoid\nrunTest (char * testNameString, int mType)\n{\n  pthread_t t;\n\n#ifdef PTW32_MUTEX_TYPES\n  (void) pthread_mutexattr_settype(&ma, mType);\n#endif\n  assert(pthread_mutex_init(&mx, &ma) == 0);\n  assert(pthread_mutex_lock(&mx) == 0);\n  assert(pthread_create(&t, NULL, trylockThread, 0) == 0);\n  assert(pthread_join(t, NULL) == 0);\n  assert(pthread_mutex_unlock(&mx) == 0);\n  assert(pthread_mutex_destroy(&mx) == 0);\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    testNameString,\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n}\n\n\nint\nmain (int argc, char *argv[])\n{\n  pthread_t t;\n\n  assert(pthread_mutexattr_init(&ma) == 0);\n\n  printf( \"=============================================================================\\n\");\n  printf( \"\\nTrylock on a locked mutex.\\n\");\n  printf( \"%ld iterations.\\n\\n\", ITERATIONS);\n  printf( \"%-45s %15s %15s\\n\",\n\t    \"Test\",\n\t    \"Total(msec)\",\n\t    \"average(usec)\");\n  printf( \"-----------------------------------------------------------------------------\\n\");\n\n  /*\n   * Time the loop overhead so we can subtract it from the actual test times.\n   */\n\n  TESTSTART\n  TESTSTOP\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  overHeadMilliSecs = durationMilliSecs;\n\n\n  old_mutex_use = OLD_WIN32CS;\n  assert(old_mutex_init(&ox, NULL) == 0);\n  assert(old_mutex_lock(&ox) == 0);\n  assert(pthread_create(&t, NULL, oldTrylockThread, 0) == 0);\n  assert(pthread_join(t, NULL) == 0);\n  assert(old_mutex_unlock(&ox) == 0);\n  assert(old_mutex_destroy(&ox) == 0);\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Old PT Mutex using a Critical Section (WNT)\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n  old_mutex_use = OLD_WIN32MUTEX;\n  assert(old_mutex_init(&ox, NULL) == 0);\n  assert(old_mutex_lock(&ox) == 0);\n  assert(pthread_create(&t, NULL, oldTrylockThread, 0) == 0);\n  assert(pthread_join(t, NULL) == 0);\n  assert(old_mutex_unlock(&ox) == 0);\n  assert(old_mutex_destroy(&ox) == 0);\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Old PT Mutex using a Win32 Mutex (W9x)\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n  printf( \".............................................................................\\n\");\n\n  /*\n   * Now we can start the actual tests\n   */\n#ifdef PTW32_MUTEX_TYPES\n  runTest(\"PTHREAD_MUTEX_DEFAULT (W9x,WNT)\", PTHREAD_MUTEX_DEFAULT);\n\n  runTest(\"PTHREAD_MUTEX_NORMAL (W9x,WNT)\", PTHREAD_MUTEX_NORMAL);\n\n  runTest(\"PTHREAD_MUTEX_ERRORCHECK (W9x,WNT)\", PTHREAD_MUTEX_ERRORCHECK);\n\n  runTest(\"PTHREAD_MUTEX_RECURSIVE (W9x,WNT)\", PTHREAD_MUTEX_RECURSIVE);\n#else\n  runTest(\"Non-blocking lock\", 0);\n#endif\n\n  printf( \"=============================================================================\\n\");\n\n  /*\n   * End of tests.\n   */\n\n  pthread_mutexattr_destroy(&ma);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/benchtest4.c",
    "content": "/*\n * benchtest4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Measure time taken to complete an elementary operation.\n *\n * - Mutex\n *   Single thread iteration over trylock/unlock for each mutex type.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#include \"benchtest.h\"\n\n#define PTW32_MUTEX_TYPES\n#define ITERATIONS      10000000L\n\npthread_mutex_t mx;\nold_mutex_t ox;\npthread_mutexattr_t ma;\nstruct _timeb currSysTimeStart;\nstruct _timeb currSysTimeStop;\nlong durationMilliSecs;\nlong overHeadMilliSecs = 0;\n\n#define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \\\n                                               - (_TStart.time*1000+_TStart.millitm))\n\n/*\n * Dummy use of j, otherwise the loop may be removed by the optimiser\n * when doing the overhead timing with an empty loop.\n */\n#define TESTSTART \\\n  { int i, j = 0, k = 0; _ftime(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++;\n\n#define TESTSTOP \\\n  }; _ftime(&currSysTimeStop); if (j + k == i) j++; }\n\n\nvoid\noldRunTest (char * testNameString, int mType)\n{\n}\n\n\nvoid\nrunTest (char * testNameString, int mType)\n{\n#ifdef PTW32_MUTEX_TYPES\n  pthread_mutexattr_settype(&ma, mType);\n#endif\n  pthread_mutex_init(&mx, &ma);\n\n  TESTSTART\n  (void) pthread_mutex_trylock(&mx);\n  (void) pthread_mutex_unlock(&mx);\n  TESTSTOP\n\n  pthread_mutex_destroy(&mx);\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    testNameString,\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n}\n\n\nint\nmain (int argc, char *argv[])\n{\n  pthread_mutexattr_init(&ma);\n\n  printf( \"=============================================================================\\n\");\n  printf( \"Trylock plus unlock on an unlocked mutex.\\n\");\n  printf( \"%ld iterations.\\n\\n\", ITERATIONS);\n  printf( \"%-45s %15s %15s\\n\",\n\t    \"Test\",\n\t    \"Total(msec)\",\n\t    \"average(usec)\");\n  printf( \"-----------------------------------------------------------------------------\\n\");\n\n  /*\n   * Time the loop overhead so we can subtract it from the actual test times.\n   */\n\n  TESTSTART\n  TESTSTOP\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  overHeadMilliSecs = durationMilliSecs;\n\n  old_mutex_use = OLD_WIN32CS;\n  assert(old_mutex_init(&ox, NULL) == 0);\n  TESTSTART\n  (void) old_mutex_trylock(&ox);\n  (void) old_mutex_unlock(&ox);\n  TESTSTOP\n  assert(old_mutex_destroy(&ox) == 0);\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Old PT Mutex using a Critical Section (WNT)\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n  old_mutex_use = OLD_WIN32MUTEX;\n  assert(old_mutex_init(&ox, NULL) == 0);\n  TESTSTART\n  (void) old_mutex_trylock(&ox);\n  (void) old_mutex_unlock(&ox);\n  TESTSTOP\n  assert(old_mutex_destroy(&ox) == 0);\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    \"Old PT Mutex using a Win32 Mutex (W9x)\",\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n\n  printf( \".............................................................................\\n\");\n\n  /*\n   * Now we can start the actual tests\n   */\n#ifdef PTW32_MUTEX_TYPES\n  runTest(\"PTHREAD_MUTEX_DEFAULT (W9x,WNT)\", PTHREAD_MUTEX_DEFAULT);\n\n  runTest(\"PTHREAD_MUTEX_NORMAL (W9x,WNT)\", PTHREAD_MUTEX_NORMAL);\n\n  runTest(\"PTHREAD_MUTEX_ERRORCHECK (W9x,WNT)\", PTHREAD_MUTEX_ERRORCHECK);\n\n  runTest(\"PTHREAD_MUTEX_RECURSIVE (W9x,WNT)\", PTHREAD_MUTEX_RECURSIVE);\n#else\n  runTest(\"Non-blocking lock\", 0);\n#endif\n\n  printf( \"=============================================================================\\n\");\n\n  /*\n   * End of tests.\n   */\n\n  pthread_mutexattr_destroy(&ma);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/benchtest5.c",
    "content": "/*\n * benchtest5.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Measure time taken to complete an elementary operation.\n *\n * - Semaphore\n *   Single thread iteration over post/wait for a semaphore.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#include \"benchtest.h\"\n\n#define ITERATIONS      1000000L\n\nsem_t sema;\nHANDLE w32sema;\n\nstruct _timeb currSysTimeStart;\nstruct _timeb currSysTimeStop;\nlong durationMilliSecs;\nlong overHeadMilliSecs = 0;\nint one = 1;\nint zero = 0;\n\n#define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \\\n                                               - (_TStart.time*1000+_TStart.millitm))\n\n/*\n * Dummy use of j, otherwise the loop may be removed by the optimiser\n * when doing the overhead timing with an empty loop.\n */\n#define TESTSTART \\\n  { int i, j = 0, k = 0; _ftime(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++;\n\n#define TESTSTOP \\\n  }; _ftime(&currSysTimeStop); if (j + k == i) j++; }\n\n\nvoid\nreportTest (char * testNameString)\n{\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n\n  printf( \"%-45s %15ld %15.3f\\n\",\n\t    testNameString,\n          durationMilliSecs,\n          (float) durationMilliSecs * 1E3 / ITERATIONS);\n}\n\n\nint\nmain (int argc, char *argv[])\n{\n  printf( \"=============================================================================\\n\");\n  printf( \"\\nOperations on a semaphore.\\n%ld iterations\\n\\n\",\n          ITERATIONS);\n  printf( \"%-45s %15s %15s\\n\",\n\t    \"Test\",\n\t    \"Total(msec)\",\n\t    \"average(usec)\");\n  printf( \"-----------------------------------------------------------------------------\\n\");\n\n  /*\n   * Time the loop overhead so we can subtract it from the actual test times.\n   */\n\n  TESTSTART\n  assert(1 == one);\n  TESTSTOP\n\n  durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;\n  overHeadMilliSecs = durationMilliSecs;\n\n\n  /*\n   * Now we can start the actual tests\n   */\n  assert((w32sema = CreateSemaphore(NULL, (long) 0, (long) ITERATIONS, NULL)) != 0);\n  TESTSTART\n  assert(ReleaseSemaphore(w32sema, 1, NULL) != zero);\n  TESTSTOP\n  assert(CloseHandle(w32sema) != 0);\n\n  reportTest(\"W32 Post with no waiters\");\n\n\n  assert((w32sema = CreateSemaphore(NULL, (long) ITERATIONS, (long) ITERATIONS, NULL)) != 0);\n  TESTSTART\n  assert(WaitForSingleObject(w32sema, INFINITE) == WAIT_OBJECT_0);\n  TESTSTOP\n  assert(CloseHandle(w32sema) != 0);\n\n  reportTest(\"W32 Wait without blocking\");\n\n\n  assert(sem_init(&sema, 0, 0) == 0);\n  TESTSTART\n  assert(sem_post(&sema) == zero);\n  TESTSTOP\n  assert(sem_destroy(&sema) == 0);\n\n  reportTest(\"POSIX Post with no waiters\");\n\n\n  assert(sem_init(&sema, 0, ITERATIONS) == 0);\n  TESTSTART\n  assert(sem_wait(&sema) == zero);\n  TESTSTOP\n  assert(sem_destroy(&sema) == 0);\n\n  reportTest(\"POSIX Wait without blocking\");\n\n\n  printf( \"=============================================================================\\n\");\n\n  /*\n   * End of tests.\n   */\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel1.c",
    "content": "/*\n * File: cancel1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test setting cancel state and cancel type.\n * - \n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * - pthread_setcancelstate function\n * - pthread_setcanceltype function\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - pthread_create, pthread_self work.\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 2\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\nvoid *\nmythread(void * arg)\n{\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* ... */\n  {\n    int oldstate;\n    int oldtype;\n\n    assert(pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate) == 0);\n    assert(oldstate == PTHREAD_CANCEL_ENABLE); /* Check default */\n    assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);\n    assert(pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL) == 0);\n    assert(pthread_setcancelstate(oldstate, &oldstate) == 0);\n    assert(oldstate == PTHREAD_CANCEL_DISABLE); /* Check setting */\n\n    assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype) == 0);\n    assert(oldtype == PTHREAD_CANCEL_DEFERRED); /* Check default */\n    assert(pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) == 0);\n    assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);\n    assert(pthread_setcanceltype(oldtype, &oldtype) == 0);\n    assert(oldtype == PTHREAD_CANCEL_ASYNCHRONOUS); /* Check setting */\n  }\n\n  return 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 1000);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      failed = !threadbag[i].started;\n\n      if (failed)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print ouput on failure.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      /* ... */\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel2.c",
    "content": "/*\n * File: cancel2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test SEH or C++ cancel exception handling within\n * application exception blocks.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#if defined(_MSC_VER) || defined(__cplusplus)\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 1\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\nstatic pthread_mutex_t waitLock = PTHREAD_MUTEX_INITIALIZER;\n\nvoid *\nmythread(void * arg)\n{\n  int result = 0;\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Set to known state and type */\n\n  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  switch (bag->threadnum % 2)\n    {\n    case 0:\n      assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);\n      result = 0;\n      break;\n    case 1:\n      assert(pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) == 0);\n      result = 1;\n      break;\n    }\n\n#if defined(_MSC_VER) && !defined(__cplusplus)\n  __try\n#else\n  try\n#endif\n    {\n      /* Wait for go from main */\n      assert(pthread_mutex_lock(&waitLock) == 0);\n      assert(pthread_mutex_unlock(&waitLock) == 0);\n      sched_yield();\n\n      for (;;)\n\t{\n\t  pthread_testcancel();\n\t}\n    }\n#if defined(_MSC_VER) && !defined(__cplusplus)\n  __except(EXCEPTION_EXECUTE_HANDLER)\n#else\n#if defined(PtW32CatchAll)\n  PtW32CatchAll\n#else\n  catch(...)\n#endif\n#endif\n    {\n      /*\n       * Should not get into here.\n       */\n      result += 100;\n    }\n\n  /* \n   * Should not get to here either.\n   */\n  result += 1000;\n\n  return (void *) result;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  assert((t[0] = pthread_self()).p != NULL);\n  assert(pthread_mutex_lock(&waitLock) == 0);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  assert(pthread_mutex_unlock(&waitLock) == 0);\n\n  Sleep(500);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_cancel(t[i]) == 0);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      assert(pthread_join(t[i], (void **) &result) == 0);\n      fail = (result != (int) PTHREAD_CANCELED);\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: location %d: cancel type %s\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  result,\n\t\t  ((result % 2) == 0) ? \"ASYNCHRONOUS\" : \"DEFERRED\");\n\t}\n      failed |= fail;\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n#else /* defined(_MSC_VER) || defined(__cplusplus) */\n\nint\nmain()\n{\n  return 0;\n}\n\n#endif /* defined(_MSC_VER) || defined(__cplusplus) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel3.c",
    "content": "/*\n * File: cancel3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test asynchronous cancelation (alertable or non-alertable).\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * - Async cancel if thread is not blocked (i.e. voluntarily resumes if blocked).\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join.\n * - quserex.dll and alertdrv.sys are not available.\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum\n{\n  NUMTHREADS = 4\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_\n{\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\nvoid *\nmythread (void *arg)\n{\n  int result = ((int) PTHREAD_CANCELED + 1);\n  bag_t *bag = (bag_t *) arg;\n\n  assert (bag == &threadbag[bag->threadnum]);\n  assert (bag->started == 0);\n  bag->started = 1;\n\n  /* Set to known state and type */\n\n  assert (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  assert (pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);\n\n  /*\n   * We wait up to 10 seconds, waking every 0.1 seconds,\n   * for a cancelation to be applied to us.\n   */\n  for (bag->count = 0; bag->count < 100; bag->count++)\n    Sleep (100);\n\n  return (void *) result;\n}\n\nint\nmain ()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  assert ((t[0] = pthread_self ()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert (pthread_create (&t[i], NULL, mythread, (void *) &threadbag[i])\n\t      == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep (500);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert (pthread_cancel (t[i]) == 0);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep (NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf (stderr, \"Thread %d: started %d\\n\", i,\n\t\t   threadbag[i].started);\n\t}\n    }\n\n  assert (!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      /*\n       * The thread does not contain any cancelation points, so\n       * a return value of PTHREAD_CANCELED confirms that async\n       * cancelation succeeded.\n       */\n      assert (pthread_join (t[i], (void **) &result) == 0);\n\n      fail = (result != (int) PTHREAD_CANCELED);\n\n      if (fail)\n\t{\n\t  fprintf (stderr, \"Thread %d: started %d: count %d\\n\",\n\t\t   i, threadbag[i].started, threadbag[i].count);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert (!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel4.c",
    "content": "/*\n * File: cancel4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test cancelation does not occur in deferred\n *                cancelation threads with no cancelation points.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - pthread_create\n *   pthread_self\n *   pthread_cancel\n *   pthread_join\n *   pthread_setcancelstate\n *   pthread_setcanceltype\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 4\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\nvoid *\nmythread(void * arg)\n{\n  int result = ((int)PTHREAD_CANCELED + 1);\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Set to known state and type */\n\n  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  assert(pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) == 0);\n\n  /*\n   * We wait up to 2 seconds, waking every 0.1 seconds,\n   * for a cancelation to be applied to us.\n   */\n  for (bag->count = 0; bag->count < 20; bag->count++)\n    Sleep(100);\n\n  return (void *) result;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_cancel(t[i]) == 0);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      /*\n       * The thread does not contain any cancelation points, so\n       * a return value of PTHREAD_CANCELED indicates that async\n       * cancelation occurred.\n       */\n      assert(pthread_join(t[i], (void **) &result) == 0);\n\n      fail = (result == (int) PTHREAD_CANCELED);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: count %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  threadbag[i].count);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel5.c",
    "content": "/*\n * File: cancel5.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test calling pthread_cancel from the main thread\n *                without calling pthread_self() in main.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum\n{\n  NUMTHREADS = 4\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_\n{\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\nvoid *\nmythread (void *arg)\n{\n  int result = ((int) PTHREAD_CANCELED + 1);\n  bag_t *bag = (bag_t *) arg;\n\n  assert (bag == &threadbag[bag->threadnum]);\n  assert (bag->started == 0);\n  bag->started = 1;\n\n  /* Set to known state and type */\n\n  assert (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  assert (pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);\n\n  /*\n   * We wait up to 10 seconds, waking every 0.1 seconds,\n   * for a cancelation to be applied to us.\n   */\n  for (bag->count = 0; bag->count < 100; bag->count++)\n    Sleep (100);\n\n  return (void *) result;\n}\n\nint\nmain ()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert (pthread_create (&t[i], NULL, mythread, (void *) &threadbag[i])\n\t      == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep (500);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert (pthread_cancel (t[i]) == 0);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep (NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf (stderr, \"Thread %d: started %d\\n\", i,\n\t\t   threadbag[i].started);\n\t}\n    }\n\n  assert (!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      /*\n       * The thread does not contain any cancelation points, so\n       * a return value of PTHREAD_CANCELED confirms that async\n       * cancelation succeeded.\n       */\n      assert (pthread_join (t[i], (void **) &result) == 0);\n\n      fail = (result != (int) PTHREAD_CANCELED);\n\n      if (fail)\n\t{\n\t  fprintf (stderr, \"Thread %d: started %d: count %d\\n\",\n\t\t   i, threadbag[i].started, threadbag[i].count);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert (!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel6a.c",
    "content": "/*\n * File: cancel6a.c\n *\n *\n * Pthreads-win32 - POSIX Threads Library for Win32\n * Copyright (C) 1998 Ben Elliston and Ross Johnson\n * Copyright (C) 1999,2000,2001 Ross Johnson\n *\n * Contact Email: rpj@ise.canberra.edu.au\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test double cancelation - asynchronous.\n * Second attempt should fail (ESRCH).\n *\n * Test Method (Validation or Falsification):\n * -\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 4\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\nvoid *\nmythread(void * arg)\n{\n  int result = ((int)PTHREAD_CANCELED + 1);\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Set to known state and type */\n\n  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);\n\n  /*\n   * We wait up to 10 seconds, waking every 0.1 seconds,\n   * for a cancelation to be applied to us.\n   */\n  for (bag->count = 0; bag->count < 100; bag->count++)\n    Sleep(100);\n\n  return (void *) result;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_cancel(t[i]) == 0);\n      assert(pthread_cancel(t[i]) == ESRCH);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      /*\n       * The thread does not contain any cancelation points, so\n       * a return value of PTHREAD_CANCELED confirms that async\n       * cancelation succeeded.\n       */\n      assert(pthread_join(t[i], (void **) &result) == 0);\n\n      fail = (result != (int) PTHREAD_CANCELED);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: count %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  threadbag[i].count);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel6d.c",
    "content": "/*\n * File: cancel6d.c\n *\n *\n * Pthreads-win32 - POSIX Threads Library for Win32\n * Copyright (C) 1998 Ben Elliston and Ross Johnson\n * Copyright (C) 1999,2000,2001 Ross Johnson\n *\n * Contact Email: rpj@ise.canberra.edu.au\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test double cancelation - deferred.\n * Second attempt should succeed (unless the canceled thread has started\n * cancelation already - not tested here).\n *\n * Test Method (Validation or Falsification):\n * -\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 4\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\nvoid *\nmythread(void * arg)\n{\n  int result = ((int)PTHREAD_CANCELED + 1);\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Set to known state and type */\n\n  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  assert(pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) == 0);\n\n  /*\n   * We wait up to 10 seconds, waking every 0.1 seconds,\n   * for a cancelation to be applied to us.\n   */\n  for (bag->count = 0; bag->count < 100; bag->count++)\n    {\n      Sleep(100);\n      pthread_testcancel();\n    }\n\n  return (void *) result;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_cancel(t[i]) == 0);\n      assert(pthread_cancel(t[i]) == 0);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      assert(pthread_join(t[i], (void **) &result) == 0);\n\n      fail = (result != (int) PTHREAD_CANCELED);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: count %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  threadbag[i].count);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel7.c",
    "content": "/*\n * File: cancel7.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test canceling a Win32 thread having created an\n * implicit POSIX handle for it.\n *\n * Test Method (Validation or Falsification):\n * - Validate return value and that POSIX handle is created and destroyed.\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#ifndef _UWIN\n#include <process.h>\n#endif\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 4\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n  pthread_t self;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\nunsigned __stdcall\n#else\nvoid\n#endif\nWin32thread(void * arg)\n{\n  int i;\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  assert((bag->self = pthread_self()).p != NULL);\n  assert(pthread_kill(bag->self, 0) == 0);\n\n  for (i = 0; i < 100; i++)\n    {\n      Sleep(100);\n      pthread_testcancel();\n    }\n\n  return 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  HANDLE h[NUMTHREADS + 1];\n  unsigned thrAddr; /* Dummy variable to pass a valid location to _beginthreadex (Win98). */\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\n      h[i] = (HANDLE) _beginthreadex(NULL, 0, Win32thread, (void *) &threadbag[i], 0, &thrAddr);\n#else\n      h[i] = (HANDLE) _beginthread(Win32thread, 0, (void *) &threadbag[i]);\n#endif\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  /*\n   * Cancel all threads.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_kill(threadbag[i].self, 0) == 0);\n      assert(pthread_cancel(threadbag[i].self) == 0);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\n      assert(GetExitCodeThread(h[i], (LPDWORD) &result) == TRUE);\n#else\n      /*\n       * Can't get a result code.\n       */\n      result = (int) PTHREAD_CANCELED;\n#endif\n\n      assert(threadbag[i].self.p != NULL);\n      assert(pthread_kill(threadbag[i].self, 0) == ESRCH);\n\n      fail = (result != (int) PTHREAD_CANCELED);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: count %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  threadbag[i].count);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel8.c",
    "content": "/*\n * File: cancel8.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test cancelling a blocked Win32 thread having created an\n * implicit POSIX handle for it.\n *\n * Test Method (Validation or Falsification):\n * - Validate return value and that POSIX handle is created and destroyed.\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#ifndef _UWIN\n#include <process.h>\n#endif\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 4\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n  pthread_t self;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\npthread_cond_t CV = PTHREAD_COND_INITIALIZER;\npthread_mutex_t CVLock = PTHREAD_MUTEX_INITIALIZER;\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\nunsigned __stdcall\n#else\nvoid\n#endif\nWin32thread(void * arg)\n{\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  assert((bag->self = pthread_self()).p != NULL);\n  assert(pthread_kill(bag->self, 0) == 0);\n\n  assert(pthread_mutex_lock(&CVLock) == 0);\n  pthread_cleanup_push(pthread_mutex_unlock, &CVLock);\n  pthread_cond_wait(&CV, &CVLock);\n  pthread_cleanup_pop(1);\n\n  return 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  HANDLE h[NUMTHREADS + 1];\n  unsigned thrAddr; /* Dummy variable to pass a valid location to _beginthreadex (Win98). */\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\n      h[i] = (HANDLE) _beginthreadex(NULL, 0, Win32thread, (void *) &threadbag[i], 0, &thrAddr);\n#else\n      h[i] = (HANDLE) _beginthread(Win32thread, 0, (void *) &threadbag[i]);\n#endif\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  /*\n   * Cancel all threads.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_kill(threadbag[i].self, 0) == 0);\n      assert(pthread_cancel(threadbag[i].self) == 0);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\n      assert(GetExitCodeThread(h[i], (LPDWORD) &result) == TRUE);\n#else\n      /*\n       * Can't get a result code.\n       */\n      result = (int) PTHREAD_CANCELED;\n#endif\n\n      assert(threadbag[i].self.p != NULL);\n      assert(pthread_kill(threadbag[i].self, 0) == ESRCH);\n\n      fail = (result != (int) PTHREAD_CANCELED);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: count %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  threadbag[i].count);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cancel9.c",
    "content": "/*\n * File: cancel9.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test true asynchronous cancelation with Alert driver.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * - Cancel threads, including those blocked on system recources\n *   such as network I/O.\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#include <windows.h>\n\n\nvoid *\ntest_udp (void *arg)\n{\n  struct sockaddr_in serverAddress;\n  struct sockaddr_in clientAddress;\n  SOCKET UDPSocket;\n  int addr_len;\n  int nbyte, bytes;\n  char buffer[4096];\n  WORD wsaVersion = MAKEWORD (2, 2);\n  WSADATA wsaData;\n\n  pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);\n  pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL);\n\n  if (WSAStartup (wsaVersion, &wsaData) != 0)\n    {\n      return NULL;\n    }\n\n  UDPSocket = socket (AF_INET, SOCK_DGRAM, 0);\n  if ((int)UDPSocket == -1)\n    {\n      printf (\"Server: socket ERROR \\n\");\n      exit (-1);\n    }\n\n  serverAddress.sin_family = AF_INET;\n  serverAddress.sin_addr.s_addr = INADDR_ANY;\n  serverAddress.sin_port = htons (9003);\n\n  if (bind\n      (UDPSocket, (struct sockaddr *) &serverAddress,\n       sizeof (struct sockaddr_in)))\n    {\n      printf (\"Server: ERROR can't bind UDPSocket\");\n      exit (-1);\n    }\n\n  addr_len = sizeof (struct sockaddr);\n\n  nbyte = 512;\n\n  bytes =\n    recvfrom (UDPSocket, (char *) buffer, nbyte, 0,\n\t      (struct sockaddr *) &clientAddress, &addr_len);\n\n  closesocket (UDPSocket);\n  WSACleanup ();\n\n  return NULL;\n}\n\n\nvoid *\ntest_sleep (void *arg)\n{\n  pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);\n  pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL);\n\n  Sleep (1000);\n  return NULL;\n\n}\n\nvoid *\ntest_wait (void *arg)\n{\n  HANDLE hEvent;\n  DWORD dwEvent;\n\n  pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);\n  pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL);\n\n  hEvent = CreateEvent (NULL, FALSE, FALSE, NULL);\n\n  dwEvent = WaitForSingleObject (hEvent, 1000);\t/* WAIT_IO_COMPLETION */\n\n  return NULL;\n}\n\n\nint\nmain ()\n{\n  pthread_t t;\n  void *result;\n\n  if (pthread_win32_test_features_np (PTW32_ALERTABLE_ASYNC_CANCEL))\n    {\n      printf (\"Cancel sleeping thread.\\n\");\n      assert (pthread_create (&t, NULL, test_sleep, NULL) == 0);\n      /* Sleep for a while; then cancel */\n      Sleep (100);\n      assert (pthread_cancel (t) == 0);\n      assert (pthread_join (t, &result) == 0);\n      assert (result == PTHREAD_CANCELED && \"test_sleep\" != NULL);\n\n      printf (\"Cancel waiting thread.\\n\");\n      assert (pthread_create (&t, NULL, test_wait, NULL) == 0);\n      /* Sleep for a while; then cancel. */\n      Sleep (100);\n      assert (pthread_cancel (t) == 0);\n      assert (pthread_join (t, &result) == 0);\n      assert (result == PTHREAD_CANCELED && \"test_wait\");\n\n      printf (\"Cancel blocked thread (blocked on network I/O).\\n\");\n      assert (pthread_create (&t, NULL, test_udp, NULL) == 0);\n      /* Sleep for a while; then cancel. */\n      Sleep (100);\n      assert (pthread_cancel (t) == 0);\n      assert (pthread_join (t, &result) == 0);\n      assert (result == PTHREAD_CANCELED && \"test_udp\" != NULL);\n    }\n  else\n    {\n      printf (\"Alertable async cancel not available.\\n\");\n    }\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cleanup0.c",
    "content": "/*\n * File: cleanup1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test cleanup handler executes (when thread is not canceled).\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#if defined(_MSC_VER) || defined(__cplusplus)\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 10\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\ntypedef struct {\n  int i;\n  CRITICAL_SECTION cs;\n} sharedInt_t;\n\nstatic sharedInt_t pop_count = {0, {0}};\n\nstatic void\nincrement_pop_count(void * arg)\n{\n  sharedInt_t * sI = (sharedInt_t *) arg;\n\n  EnterCriticalSection(&sI->cs);\n  sI->i++;\n  LeaveCriticalSection(&sI->cs);\n}\n\nvoid *\nmythread(void * arg)\n{\n  int result = 0;\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Set to known state and type */\n\n  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n  pthread_cleanup_push(increment_pop_count, (void *) &pop_count);\n\n  Sleep(100);\n\n  pthread_cleanup_pop(1);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n  return (void *) result;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  InitializeCriticalSection(&pop_count.cs);\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      assert(pthread_join(t[i], (void **) &result) == 0);\n\n      fail = (result == (int) PTHREAD_CANCELED);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: result %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\tresult);\n\t  fflush(stderr);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  assert(pop_count.i == NUMTHREADS);\n\n  DeleteCriticalSection(&pop_count.cs);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n#else /* defined(_MSC_VER) || defined(__cplusplus) */\n\nint\nmain()\n{\n  return 0;\n}\n\n#endif /* defined(_MSC_VER) || defined(__cplusplus) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cleanup1.c",
    "content": "/*\n * File: cleanup1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test cleanup handler executes (when thread is canceled).\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#if defined(_MSC_VER) || defined(__cplusplus)\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 10\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\ntypedef struct {\n  int i;\n  CRITICAL_SECTION cs;\n} sharedInt_t;\n\nstatic sharedInt_t pop_count = {0, {0}};\n\nstatic void\n#ifdef __CLEANUP_C\n__cdecl\n#endif\nincrement_pop_count(void * arg)\n{\n  sharedInt_t * sI = (sharedInt_t *) arg;\n\n  EnterCriticalSection(&sI->cs);\n  sI->i++;\n  LeaveCriticalSection(&sI->cs);\n}\n\nvoid *\nmythread(void * arg)\n{\n  int result = 0;\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Set to known state and type */\n\n  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n  pthread_cleanup_push(increment_pop_count, (void *) &pop_count);\n  /*\n   * We don't have true async cancelation - it relies on the thread\n   * at least re-entering the run state at some point.\n   * We wait up to 10 seconds, waking every 0.1 seconds,\n   * for a cancelation to be applied to us.\n   */\n  for (bag->count = 0; bag->count < 100; bag->count++)\n    Sleep(100);\n\n  pthread_cleanup_pop(0);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n  return (void *) result;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  InitializeCriticalSection(&pop_count.cs);\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_cancel(t[i]) == 0);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      assert(pthread_join(t[i], (void **) &result) == 0);\n\n      fail = (result != (int) PTHREAD_CANCELED);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: result %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  result);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  assert(pop_count.i == NUMTHREADS);\n\n  DeleteCriticalSection(&pop_count.cs);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n#else /* defined(_MSC_VER) || defined(__cplusplus) */\n\nint\nmain()\n{\n  return 0;\n}\n\n#endif /* defined(_MSC_VER) || defined(__cplusplus) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cleanup2.c",
    "content": "/*\n * File: cleanup2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test cleanup handler executes (when thread is not canceled).\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#if defined(_MSC_VER) || defined(__cplusplus)\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 10\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\ntypedef struct {\n  int i;\n  CRITICAL_SECTION cs;\n} sharedInt_t;\n\nstatic sharedInt_t pop_count = {0, {0}};\n\nstatic void\nincrement_pop_count(void * arg)\n{\n  sharedInt_t * sI = (sharedInt_t *) arg;\n\n  EnterCriticalSection(&sI->cs);\n  sI->i++;\n  LeaveCriticalSection(&sI->cs);\n}\n\nvoid *\nmythread(void * arg)\n{\n  int result = 0;\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n  pthread_cleanup_push(increment_pop_count, (void *) &pop_count);\n\n  sched_yield();\n\n  pthread_cleanup_pop(1);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n  return (void *) result;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  InitializeCriticalSection(&pop_count.cs);\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(1000);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      assert(pthread_join(t[i], (void **) &result) == 0);\n\n      fail = (result != 0);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: result: %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  result);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  assert(pop_count.i == NUMTHREADS);\n\n  DeleteCriticalSection(&pop_count.cs);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n#else /* defined(_MSC_VER) || defined(__cplusplus) */\n\nint\nmain()\n{\n  return 0;\n}\n\n#endif /* defined(_MSC_VER) || defined(__cplusplus) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/cleanup3.c",
    "content": "/*\n * File: cleanup3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test cleanup handler does not execute (when thread is\n * not canceled).\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#if defined(_MSC_VER) || defined(__cplusplus)\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 10\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\ntypedef struct {\n  int i;\n  CRITICAL_SECTION cs;\n} sharedInt_t;\n\nstatic sharedInt_t pop_count = {0, {0}};\n\nstatic void\nincrement_pop_count(void * arg)\n{\n  sharedInt_t * sI = (sharedInt_t *) arg;\n\n  EnterCriticalSection(&sI->cs);\n  sI->i++;\n  LeaveCriticalSection(&sI->cs);\n}\n\nvoid *\nmythread(void * arg)\n{\n  int result = 0;\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n  pthread_cleanup_push(increment_pop_count, (void *) &pop_count);\n\n  sched_yield();\n\n  EnterCriticalSection(&pop_count.cs);\n  pop_count.i--;\n  LeaveCriticalSection(&pop_count.cs);\n\n  pthread_cleanup_pop(0);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n  return (void *) result;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  InitializeCriticalSection(&pop_count.cs);\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(1000);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n      assert(pthread_join(t[i], (void **) &result) == 0);\n\n      fail = (result != 0);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: result: %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  result);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  assert(pop_count.i == -(NUMTHREADS));\n\n  DeleteCriticalSection(&pop_count.cs);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n#else /* defined(_MSC_VER) || defined(__cplusplus) */\n\nint\nmain()\n{\n  return 0;\n}\n\n#endif /* defined(_MSC_VER) || defined(__cplusplus) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar1.c",
    "content": "/*\n * File: condvar1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test initialisation and destruction of a CV.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Creates and then imediately destroys a CV. Does not\n *   test the CV.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - pthread_cond_init returns 0, and\n * - pthread_cond_destroy returns 0.\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - pthread_cond_init returns non-zero, or\n * - pthread_cond_destroy returns non-zero.\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\nstatic pthread_cond_t cv = NULL;\n\nint\nmain()\n{\n  assert(cv == NULL);\n\n  assert(pthread_cond_init(&cv, NULL) == 0);\n\n  assert(cv != NULL);\n\n  assert(pthread_cond_destroy(&cv) == 0);\n\n  assert(cv == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar1_1.c",
    "content": "/*\n * File: condvar1_1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test CV linked list management.\n *\n * Test Method (Validation or Falsification):\n * - Validation:\n *   Initiate and destroy several CVs in random order.\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Creates and then imediately destroys a CV. Does not\n *   test the CV.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - All initialised CVs destroyed without segfault.\n * - Successfully broadcasts all remaining CVs after\n *   each CV is removed.\n *\n * Fail Criteria:\n */\n\n#include <stdlib.h>\n#include \"test.h\"\n\nenum {\n  NUM_CV = 100\n};\n\nstatic pthread_cond_t cv[NUM_CV];\n\nint\nmain()\n{\n  int i, j;\n\n  for (i = 0; i < NUM_CV; i++)\n    {\n      /* Traverse the list before every init of a CV. */\n      assert(pthread_timechange_handler_np(NULL) == (void *) 0);\n      assert(pthread_cond_init(&cv[i], NULL) == 0);\n    }\n\n  j = NUM_CV;\n  (void) srand((unsigned)time(NULL));\n\n  do\n    {\n      i = (NUM_CV - 1) * rand() / RAND_MAX;\n      if (cv[i] != NULL)\n        {\n          j--;\n          assert(pthread_cond_destroy(&cv[i]) == 0);\n          /* Traverse the list every time we remove a CV. */\n          assert(pthread_timechange_handler_np(NULL) == (void *) 0);\n        }\n    }\n  while (j > 0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar1_2.c",
    "content": "/*\n * File: condvar1_2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test CV linked list management and serialisation.\n *\n * Test Method (Validation or Falsification):\n * - Validation:\n *   Initiate and destroy several CVs in random order.\n *   Asynchronously traverse the CV list and broadcast.\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Creates and then imediately destroys a CV. Does not\n *   test the CV.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - All initialised CVs destroyed without segfault.\n * - Successfully broadcasts all remaining CVs after\n *   each CV is removed.\n *\n * Fail Criteria:\n */\n\n#include <stdlib.h>\n#include \"test.h\"\n\nenum {\n  NUM_CV = 5,\n  NUM_LOOPS = 5\n};\n\nstatic pthread_cond_t cv[NUM_CV];\n\nint\nmain()\n{\n  int i, j, k;\n  int result = -1;\n  pthread_t t;\n\n  for (k = 0; k < NUM_LOOPS; k++)\n    {\n      for (i = 0; i < NUM_CV; i++)\n        {\n          assert(pthread_cond_init(&cv[i], NULL) == 0);\n        }\n\n      j = NUM_CV;\n      (void) srand((unsigned)time(NULL));\n\n      /* Traverse the list asynchronously. */\n      assert(pthread_create(&t, NULL, pthread_timechange_handler_np, NULL) == 0);\n\n      do\n        {\n          i = (NUM_CV - 1) * rand() / RAND_MAX;\n          if (cv[i] != NULL)\n            {\n              j--;\n              assert(pthread_cond_destroy(&cv[i]) == 0);\n            }\n        }\n      while (j > 0);\n\n      assert(pthread_join(t, (void **) &result) == 0);\n      assert (result == 0);\n    }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar2.c",
    "content": "/*\n * File: condvar2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test timed wait on a CV.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Because the CV is never signaled, we expect the wait to time out.\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - pthread_cond_timedwait returns ETIMEDOUT.\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - pthread_cond_timedwait does not return ETIMEDOUT.\n * - Process returns non-zero exit status.\n */\n\n#define _WIN32_WINNT 0x400\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\npthread_cond_t cv;\npthread_mutex_t mutex;\n\n#include \"../implement.h\"\n\nint\nmain()\n{\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  assert(pthread_cond_init(&cv, NULL) == 0);\n\n  assert(pthread_mutex_init(&mutex, NULL) == 0);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  /* get current system time */\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  assert(pthread_cond_timedwait(&cv, &mutex, &abstime) == ETIMEDOUT);\n  \n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  {\n  int result = pthread_cond_destroy(&cv);\n  if (result != 0)\n    {\n      fprintf(stderr, \"Result = %s\\n\", error_string[result]);\n\tfprintf(stderr, \"\\tWaitersBlocked = %ld\\n\", cv->nWaitersBlocked);\n\tfprintf(stderr, \"\\tWaitersGone = %ld\\n\", cv->nWaitersGone);\n\tfprintf(stderr, \"\\tWaitersToUnblock = %ld\\n\", cv->nWaitersToUnblock);\n\tfflush(stderr);\n    }\n  assert(result == 0);\n  }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar2_1.c",
    "content": "/*\n * File: condvar2_1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test timeout of multiple waits on a CV with no signal/broadcast.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Because the CV is never signaled, we expect the waits to time out.\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - pthread_cond_timedwait returns ETIMEDOUT.\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - pthread_cond_timedwait does not return ETIMEDOUT.\n * - Process returns non-zero exit status.\n */\n\n#define _WIN32_WINNT 0x400\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic pthread_cond_t cv;\nstatic pthread_mutex_t mutex;\nstatic struct timespec abstime = { 0, 0 };\n\nenum {\n  NUMTHREADS = 30\n};\n\nvoid *\nmythread(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(pthread_cond_timedwait(&cv, &mutex, &abstime) == ETIMEDOUT);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return arg;\n}\n\n#include \"../implement.h\"\n\nint\nmain()\n{\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n  int result = 0;\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  assert(pthread_cond_init(&cv, NULL) == 0);\n\n  assert(pthread_mutex_init(&mutex, NULL) == 0);\n\n  /* get current system time */\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 5;\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_create(&t[i], NULL, mythread, (void *) i) == 0);\n    }\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_join(t[i], (void **) &result) == 0);\n\tassert(result == i);\n    }\n\n  {\n  int result = pthread_cond_destroy(&cv);\n  if (result != 0)\n    {\n      fprintf(stderr, \"Result = %s\\n\", error_string[result]);\n\tfprintf(stderr, \"\\tWaitersBlocked = %ld\\n\", cv->nWaitersBlocked);\n\tfprintf(stderr, \"\\tWaitersGone = %ld\\n\", cv->nWaitersGone);\n\tfprintf(stderr, \"\\tWaitersToUnblock = %ld\\n\", cv->nWaitersToUnblock);\n\tfflush(stderr);\n    }\n  assert(result == 0);\n  }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar3.c",
    "content": "/*\n * File: condvar3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test basic function of a CV\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - The primary thread takes the lock before creating any threads.\n *   The secondary thread blocks on the lock allowing the primary\n *   thread to enter the cv wait state which releases the lock.\n *   The secondary thread then takes the lock and signals the waiting\n *   primary thread.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - pthread_cond_timedwait returns 0.\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - pthread_cond_timedwait returns ETIMEDOUT.\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic pthread_cond_t cv;\nstatic pthread_mutex_t mutex;\nstatic int shared = 0;\n\nenum {\n  NUMTHREADS = 2         /* Including the primary thread. */\n};\n\nvoid *\nmythread(void * arg)\n{\n  int result = 0;\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n  shared++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  if ((result = pthread_cond_signal(&cv)) != 0)\n    {\n      printf(\"Error = %s\\n\", error_string[result]);\n    }\n  assert(result == 0);\n\n\n  return (void *) 0;\n}\n\nint\nmain()\n{\n  pthread_t t[NUMTHREADS];\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  assert(pthread_cond_init(&cv, NULL) == 0);\n\n  assert(pthread_mutex_init(&mutex, NULL) == 0);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  /* get current system time */\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0);\n\n  abstime.tv_sec += 5;\n\n  while (! (shared > 0))\n    assert(pthread_cond_timedwait(&cv, &mutex, &abstime) == 0);\n\n  assert(shared > 0);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  assert(pthread_join(t[1], NULL) == 0);\n\n  assert(pthread_cond_destroy(&cv) == 0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar3_1.c",
    "content": "/*\n * File: condvar3_1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test timeout of multiple waits on a CV with some signaled.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Because some CVs are never signaled, we expect their waits to time out.\n *   Some are signaled, the rest time out. Pthread_cond_destroy() will fail\n *   unless all are accounted for, either signaled or timedout.\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - pthread_cond_timedwait returns ETIMEDOUT.\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - pthread_cond_timedwait does not return ETIMEDOUT.\n * - Process returns non-zero exit status.\n */\n\n#define _WIN32_WINNT 0x400\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic pthread_cond_t cv;\nstatic pthread_cond_t cv1;\nstatic pthread_mutex_t mutex;\nstatic pthread_mutex_t mutex1;\nstatic struct timespec abstime = { 0, 0 };\nstatic int timedout = 0;\nstatic int signaled = 0;\nstatic int awoken = 0;\nstatic int waiting = 0;\n\nenum {\n  NUMTHREADS = 30\n};\n\nvoid *\nmythread(void * arg)\n{\n  int result;\n\n  assert(pthread_mutex_lock(&mutex1) == 0);\n  ++waiting;\n  assert(pthread_mutex_unlock(&mutex1) == 0);\n  assert(pthread_cond_signal(&cv1) == 0);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n  result = pthread_cond_timedwait(&cv, &mutex, &abstime);\n  if (result == ETIMEDOUT)\n    {\n      timedout++;\n    }\n  else\n    {\n      awoken++;\n    }\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return arg;\n}\n\n#include \"../implement.h\"\n\nint\nmain()\n{\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n  int result = 0;\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  assert(pthread_cond_init(&cv, NULL) == 0);\n  assert(pthread_cond_init(&cv1, NULL) == 0);\n\n  assert(pthread_mutex_init(&mutex, NULL) == 0);\n  assert(pthread_mutex_init(&mutex1, NULL) == 0);\n\n  /* get current system time */\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 5;\n\n  assert(pthread_mutex_lock(&mutex1) == 0);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_create(&t[i], NULL, mythread, (void *) i) == 0);\n    }\n\n  do {\n    assert(pthread_cond_wait(&cv1,&mutex1) == 0);\n  } while ( NUMTHREADS > waiting );\n\n  assert(pthread_mutex_unlock(&mutex1) == 0);\n\n  for (i = NUMTHREADS/3; i <= 2*NUMTHREADS/3; i++)\n    {\n//      assert(pthread_mutex_lock(&mutex) == 0);\n      assert(pthread_cond_signal(&cv) == 0);\n//      assert(pthread_mutex_unlock(&mutex) == 0);\n\n      signaled++;\n    }\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_join(t[i], (void **) &result) == 0);\n        assert(result == i);\n    }\n\n      fprintf(stderr, \"awk = %d\\n\", awoken);\n      fprintf(stderr, \"sig = %d\\n\", signaled);\n      fprintf(stderr, \"tot = %d\\n\", timedout);\n\n  assert(signaled == awoken);\n  assert(timedout == NUMTHREADS - signaled);\n\n  assert(pthread_cond_destroy(&cv1) == 0);\n\n  {\n  int result = pthread_cond_destroy(&cv);\n  if (result != 0)\n    {\n      fprintf(stderr, \"Result = %s\\n\", error_string[result]);\n        fprintf(stderr, \"\\tWaitersBlocked = %ld\\n\", cv->nWaitersBlocked);\n        fprintf(stderr, \"\\tWaitersGone = %ld\\n\", cv->nWaitersGone);\n        fprintf(stderr, \"\\tWaitersToUnblock = %ld\\n\", cv->nWaitersToUnblock);\n        fflush(stderr);\n    }\n  assert(result == 0);\n  }\n\n  assert(pthread_mutex_destroy(&mutex1) == 0);\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar3_2.c",
    "content": "/*\n * File: condvar3_2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test timeout of multiple waits on a CV with remainder broadcast awoken.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Because some CVs are never signaled, we expect their waits to time out.\n *   Some time out, the rest are broadcast signaled. Pthread_cond_destroy() will fail\n *   unless all are accounted for, either signaled or timedout.\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - pthread_cond_timedwait returns ETIMEDOUT.\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - pthread_cond_timedwait does not return ETIMEDOUT.\n * - Process returns non-zero exit status.\n */\n\n#define _WIN32_WINNT 0x400\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic pthread_cond_t cv;\nstatic pthread_mutex_t mutex;\nstatic struct timespec abstime = { 0, 0 };\nstatic struct timespec abstime2 = { 0, 0 };\nstatic int timedout = 0;\nstatic int awoken = 0;\n\nenum {\n  NUMTHREADS = 30\n};\n\nvoid *\nmythread(void * arg)\n{\n  int result;\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  abstime2.tv_sec = abstime.tv_sec;\n\n  if ((int) arg % 3 == 0)\n    {\n      abstime2.tv_sec += 2;\n    }\n\n  result = pthread_cond_timedwait(&cv, &mutex, &abstime2);\n  assert(pthread_mutex_unlock(&mutex) == 0);\n  if (result == ETIMEDOUT)\n    {\n      InterlockedIncrement((LPLONG)&timedout);\n    }\n  else\n    {\n      InterlockedIncrement((LPLONG)&awoken);\n    }\n\n\n  return arg;\n}\n\n#include \"../implement.h\"\n\nint\nmain()\n{\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n  int result = 0;\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  assert(pthread_cond_init(&cv, NULL) == 0);\n\n  assert(pthread_mutex_init(&mutex, NULL) == 0);\n\n  /* get current system time */\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = abstime.tv_sec = currSysTime.time + 5;\n  abstime.tv_nsec = abstime2.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_create(&t[i], NULL, mythread, (void *) i) == 0);\n    }\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_join(t[i], (void **) &result) == 0);\n\tassert(result == i);\n      /*\n       * Approximately 2/3rds of the threads are expected to time out.\n       * Signal the remainder after some threads have woken up and exited\n       * and while some are still waking up after timeout.\n       * Also tests that redundant broadcasts don't return errors.\n       */\n\n//      assert(pthread_mutex_lock(&mutex) == 0);\n\n      if (InterlockedExchangeAdd((LPLONG)&awoken, 0L) > NUMTHREADS/3)\n        {\n          assert(pthread_cond_broadcast(&cv) == 0);\n        }\n\n//      assert(pthread_mutex_unlock(&mutex) == 0);\n\n    }\n\n  assert(awoken == NUMTHREADS - timedout);\n\n  {\n  int result = pthread_cond_destroy(&cv);\n  if (result != 0)\n    {\n      fprintf(stderr, \"Result = %s\\n\", error_string[result]);\n\tfprintf(stderr, \"\\tWaitersBlocked = %ld\\n\", cv->nWaitersBlocked);\n\tfprintf(stderr, \"\\tWaitersGone = %ld\\n\", cv->nWaitersGone);\n\tfprintf(stderr, \"\\tWaitersToUnblock = %ld\\n\", cv->nWaitersToUnblock);\n\tfflush(stderr);\n    }\n  assert(result == 0);\n  }\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar3_3.c",
    "content": "/*\n * File: condvar3_3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test timeouts and lost signals on a CV.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - pthread_cond_timedwait returns ETIMEDOUT.\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - pthread_cond_timedwait does not return ETIMEDOUT.\n * - Process returns non-zero exit status.\n */\n\n/* Timur Aydin (taydin@snet.net) */\n\n#include \"test.h\"\n\n#include <sys/timeb.h>\n\npthread_cond_t cnd;\npthread_mutex_t mtx;\n\nint main()\n{\n   int rc;\n\n   struct timespec abstime = { 0, 0 };\n   struct _timeb currSysTime;\n   const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n   assert(pthread_cond_init(&cnd, 0) == 0);\n   assert(pthread_mutex_init(&mtx, 0) == 0);\n\n   /* get current system time */\n   _ftime(&currSysTime);\n\n   abstime.tv_sec = currSysTime.time;\n   abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n   abstime.tv_sec += 1;\n\n   /* Here pthread_cond_timedwait should time out after one second. */\n\n   assert(pthread_mutex_lock(&mtx) == 0);\n\n   assert((rc = pthread_cond_timedwait(&cnd, &mtx, &abstime)) == ETIMEDOUT);\n\n   assert(pthread_mutex_unlock(&mtx) == 0);\n\n   /* Here, the condition variable is signaled, but there are no\n      threads waiting on it. The signal should be lost and\n      the next pthread_cond_timedwait should time out too. */\n\n//   assert(pthread_mutex_lock(&mtx) == 0);\n\n   assert((rc = pthread_cond_signal(&cnd)) == 0);\n\n//   assert(pthread_mutex_unlock(&mtx) == 0);\n\n   assert(pthread_mutex_lock(&mtx) == 0);\n\n   abstime.tv_sec = currSysTime.time;\n   abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n   abstime.tv_sec += 1;\n\n   assert((rc = pthread_cond_timedwait(&cnd, &mtx, &abstime)) == ETIMEDOUT);\n\n   assert(pthread_mutex_unlock(&mtx) == 0);\n\n   return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar4.c",
    "content": "/*\n * File: condvar4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test PTHREAD_COND_INITIALIZER.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Test basic CV function but starting with a static initialised\n *   CV.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - pthread_cond_timedwait returns 0.\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - pthread_cond_timedwait returns ETIMEDOUT.\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\ntypedef struct cvthing_t_ cvthing_t;\n\nstruct cvthing_t_ {\n  pthread_cond_t notbusy;\n  pthread_mutex_t lock;\n  int shared;\n};\n\nstatic cvthing_t cvthing = {\n  PTHREAD_COND_INITIALIZER,\n  PTHREAD_MUTEX_INITIALIZER,\n  0\n};\n\nenum {\n  NUMTHREADS = 2\n};\n\nvoid *\nmythread(void * arg)\n{\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n  cvthing.shared++;\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  assert(pthread_cond_signal(&cvthing.notbusy) == 0);\n\n  return (void *) 0;\n}\n\nint\nmain()\n{\n  pthread_t t[NUMTHREADS];\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  cvthing.shared = 0;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);\n\n  assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);\n\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n\n  assert(cvthing.lock != PTHREAD_MUTEX_INITIALIZER);\n\n  /* get current system time */\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 5;\n\n  assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == ETIMEDOUT);\n  \n  assert(cvthing.notbusy != PTHREAD_COND_INITIALIZER);\n\n  assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0);\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 5;\n\n  while (! (cvthing.shared > 0))\n    assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);\n\n  assert(cvthing.shared > 0);\n\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  assert(pthread_join(t[1], NULL) == 0);\n\n  assert(pthread_mutex_destroy(&cvthing.lock) == 0);\n\n  assert(cvthing.lock == NULL);\n\n  assert(pthread_cond_destroy(&cvthing.notbusy) == 0);\n\n  assert(cvthing.notbusy == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar5.c",
    "content": "/*\n * File: condvar5.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test pthread_cond_broadcast.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Test broadcast with one waiting CV.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - pthread_cond_timedwait returns 0.\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - pthread_cond_timedwait returns ETIMEDOUT.\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\ntypedef struct cvthing_t_ cvthing_t;\n\nstruct cvthing_t_ {\n  pthread_cond_t notbusy;\n  pthread_mutex_t lock;\n  int shared;\n};\n\nstatic cvthing_t cvthing = {\n  PTHREAD_COND_INITIALIZER,\n  PTHREAD_MUTEX_INITIALIZER,\n  0\n};\n\nenum {\n  NUMTHREADS = 2\n};\n\nvoid *\nmythread(void * arg)\n{\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n  cvthing.shared++;\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);\n\n  return (void *) 0;\n}\n\nint\nmain()\n{\n  pthread_t t[NUMTHREADS];\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  cvthing.shared = 0;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);\n\n  assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);\n\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n\n  assert(cvthing.lock != PTHREAD_MUTEX_INITIALIZER);\n\n  /* get current system time */\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 5;\n\n  assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == ETIMEDOUT);\n  \n  assert(cvthing.notbusy != PTHREAD_COND_INITIALIZER);\n\n  assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0);\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 5;\n\n  while (! (cvthing.shared > 0))\n    assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);\n\n  assert(cvthing.shared > 0);\n\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  assert(pthread_join(t[1], NULL) == 0);\n\n  assert(pthread_mutex_destroy(&cvthing.lock) == 0);\n\n  assert(cvthing.lock == NULL);\n\n  assert(pthread_cond_destroy(&cvthing.notbusy) == 0);\n\n  assert(cvthing.notbusy == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar6.c",
    "content": "/*\n * File: condvar6.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test pthread_cond_broadcast.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Test broadcast with NUMTHREADS (=5) waiting CVs.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 5\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\ntypedef struct cvthing_t_ cvthing_t;\n\nstruct cvthing_t_ {\n  pthread_cond_t notbusy;\n  pthread_mutex_t lock;\n  int shared;\n};\n\nstatic cvthing_t cvthing = {\n  PTHREAD_COND_INITIALIZER,\n  PTHREAD_MUTEX_INITIALIZER,\n  0\n};\n\nstatic pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER;\n\nstatic struct timespec abstime = { 0, 0 };\n\nstatic int awoken;\n\nvoid *\nmythread(void * arg)\n{\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Wait for the start gun */\n  assert(pthread_mutex_lock(&start_flag) == 0);\n  assert(pthread_mutex_unlock(&start_flag) == 0);\n\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n\n  while (! (cvthing.shared > 0))\n    assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);\n\n  assert(cvthing.shared > 0);\n\n  awoken++;\n\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  return (void *) 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  cvthing.shared = 0;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);\n\n  assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);\n\n  assert(pthread_mutex_lock(&start_flag) == 0);\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 5;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  awoken = 0;\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n\n  assert(pthread_mutex_unlock(&start_flag) == 0);\n\n  /*\n   * Give threads time to start.\n   */\n  Sleep(1000);\n\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n  cvthing.shared++;\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);\n\n  /*\n   * Give threads time to complete.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      assert(pthread_join(t[i], NULL) == 0);\n    }\n\n  /* \n   * Cleanup the CV.\n   */\n  \n  assert(pthread_mutex_destroy(&cvthing.lock) == 0);\n\n  assert(cvthing.lock == NULL);\n\n  assert(pthread_cond_destroy(&cvthing.notbusy) == 0);\n\n  assert(cvthing.notbusy == NULL);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      failed = !threadbag[i].started;\n\n      if (failed)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here.\n   */\n\n  assert(awoken == NUMTHREADS);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar7.c",
    "content": "/*\n * File: condvar7.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test pthread_cond_broadcast with thread cancelation.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Test broadcast with NUMTHREADS (=5) waiting CVs, one is canceled while waiting.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 5\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\ntypedef struct cvthing_t_ cvthing_t;\n\nstruct cvthing_t_ {\n  pthread_cond_t notbusy;\n  pthread_mutex_t lock;\n  int shared;\n};\n\nstatic cvthing_t cvthing = {\n  PTHREAD_COND_INITIALIZER,\n  PTHREAD_MUTEX_INITIALIZER,\n  0\n};\n\nstatic pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER;\n\nstatic struct timespec abstime = { 0, 0 };\n\nstatic int awoken;\n\nvoid *\nmythread(void * arg)\n{\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Wait for the start gun */\n  assert(pthread_mutex_lock(&start_flag) == 0);\n  assert(pthread_mutex_unlock(&start_flag) == 0);\n\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n  pthread_cleanup_push(pthread_mutex_unlock, (void *) &cvthing.lock);\n\n  while (! (cvthing.shared > 0))\n    assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);\n\n  pthread_cleanup_pop(0);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n  assert(cvthing.shared > 0);\n\n  awoken++;\n\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  return (void *) 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  cvthing.shared = 0;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);\n\n  assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);\n\n  assert(pthread_mutex_lock(&start_flag) == 0);\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 10;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  awoken = 0;\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n\n  assert(pthread_mutex_unlock(&start_flag) == 0);\n\n  /*\n   * Give threads time to start.\n   */\n  Sleep(1000);\n\n  /*\n   * Cancel one of the threads.\n   */\n  assert(pthread_cancel(t[1]) == 0);\n  assert(pthread_join(t[1], NULL) == 0);\n\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n  cvthing.shared++;\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  /*\n   * Signal all remaining waiting threads.\n   */\n  assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);\n\n  /*\n   * Wait for all threads to complete.\n   */\n  for (i = 2; i <= NUMTHREADS; i++)\n    assert(pthread_join(t[i], NULL) == 0);\n\n  /* \n   * Cleanup the CV.\n   */\n  \n  assert(pthread_mutex_destroy(&cvthing.lock) == 0);\n\n  assert(cvthing.lock == NULL);\n\n  assert(pthread_cond_destroy(&cvthing.notbusy) == 0);\n\n  assert(cvthing.notbusy == NULL);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      failed = !threadbag[i].started;\n\n      if (failed)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here.\n   */\n\n  assert(awoken == (NUMTHREADS - 1));\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar8.c",
    "content": "/*\n * File: condvar8.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test multiple pthread_cond_broadcasts.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Make NUMTHREADS threads wait on CV, broadcast signal them, and then repeat.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 5\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\ntypedef struct cvthing_t_ cvthing_t;\n\nstruct cvthing_t_ {\n  pthread_cond_t notbusy;\n  pthread_mutex_t lock;\n  int shared;\n};\n\nstatic cvthing_t cvthing = {\n  PTHREAD_COND_INITIALIZER,\n  PTHREAD_MUTEX_INITIALIZER,\n  0\n};\n\nstatic pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER;\n\nstatic struct timespec abstime = { 0, 0 };\n\nstatic int awoken;\n\nstatic void *\nmythread(void * arg)\n{\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Wait for the start gun */\n  assert(pthread_mutex_lock(&start_flag) == 0);\n  assert(pthread_mutex_unlock(&start_flag) == 0);\n\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n  pthread_cleanup_push(pthread_mutex_unlock, (void *) &cvthing.lock);\n\n  while (! (cvthing.shared > 0))\n    assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);\n\n  pthread_cleanup_pop(0);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n  assert(cvthing.shared > 0);\n\n  awoken++;\n\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  return (void *) 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  int first, last;\n  pthread_t t[NUMTHREADS + 1];\n\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);\n\n  assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 10;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  awoken = 0;\n\n  for (first = 1, last = NUMTHREADS / 2;\n       first < NUMTHREADS;\n       first = last + 1, last = NUMTHREADS)\n    {\n      assert(pthread_mutex_lock(&start_flag) == 0);\n\n      for (i = first; i <= last; i++)\n\t{\n\t  threadbag[i].started = 0;\n\t  threadbag[i].threadnum = i;\n\t  assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n\t}\n\n      /*\n       * Code to control or munipulate child threads should probably go here.\n       */\n      cvthing.shared = 0;\n\n      assert(pthread_mutex_unlock(&start_flag) == 0);\n\n      /*\n       * Give threads time to start.\n       */\n      Sleep(100);\n\n      assert(pthread_mutex_lock(&cvthing.lock) == 0);\n      cvthing.shared++;\n      assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n      assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);\n\n      /*\n       * Give threads time to complete.\n       */\n      for (i = first; i <= last; i++)\n\t{\n\t  assert(pthread_join(t[i], NULL) == 0);\n\t}\n\n      assert(awoken == (i - 1));\n    }\n\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      failed = !threadbag[i].started;\n\n      if (failed)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  /* \n   * Cleanup the CV.\n   */\n  \n  assert(pthread_mutex_destroy(&cvthing.lock) == 0);\n\n  assert(cvthing.lock == NULL);\n\n  assert(pthread_cond_destroy(&cvthing.notbusy) == 0);\n\n  assert(cvthing.notbusy == NULL);\n\n  assert(!failed);\n\n  /*\n   * Check any results here.\n   */\n\n  assert(awoken == NUMTHREADS);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/condvar9.c",
    "content": "/*\n * File: condvar9.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test multiple pthread_cond_broadcasts with thread cancelation.\n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - Make NUMTHREADS threads wait on CV, cancel one, broadcast signal them,\n *   and then repeat.\n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 9\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  int finished;\n  /* Add more per-thread state variables here */\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\ntypedef struct cvthing_t_ cvthing_t;\n\nstruct cvthing_t_ {\n  pthread_cond_t notbusy;\n  pthread_mutex_t lock;\n  int shared;\n};\n\nstatic cvthing_t cvthing = {\n  PTHREAD_COND_INITIALIZER,\n  PTHREAD_MUTEX_INITIALIZER,\n  0\n};\n\nstatic pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER;\n\nstatic struct timespec abstime = { 0, 0 };\n\nstatic int awoken;\n\nstatic void *\nmythread(void * arg)\n{\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /* Wait for the start gun */\n  assert(pthread_mutex_lock(&start_flag) == 0);\n  assert(pthread_mutex_unlock(&start_flag) == 0);\n\n  assert(pthread_mutex_lock(&cvthing.lock) == 0);\n\n  /*\n   * pthread_cond_timedwait is a cancelation point and we're\n   * going to cancel some threads deliberately.\n   */\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n  pthread_cleanup_push(pthread_mutex_unlock, (void *) &cvthing.lock);\n\n  while (! (cvthing.shared > 0))\n    assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);\n\n  pthread_cleanup_pop(0);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n  assert(cvthing.shared > 0);\n\n  awoken++;\n  bag->finished = 1;\n\n  assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n  return (void *) 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  int first, last;\n  int canceledThreads = 0;\n  pthread_t t[NUMTHREADS + 1];\n\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);\n\n  assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 5;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  awoken = 0;\n\n  for (first = 1, last = NUMTHREADS / 2;\n       first < NUMTHREADS;\n       first = last + 1, last = NUMTHREADS)\n    {\n      int ct;\n\n      assert(pthread_mutex_lock(&start_flag) == 0);\n\n      for (i = first; i <= last; i++)\n\t{\n\t  threadbag[i].started = threadbag[i].finished = 0;\n\t  threadbag[i].threadnum = i;\n\t  assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n\t}\n\n      /*\n       * Code to control or munipulate child threads should probably go here.\n       */\n      cvthing.shared = 0;\n\n      assert(pthread_mutex_unlock(&start_flag) == 0);\n\n      /*\n       * Give threads time to start.\n       */\n      Sleep(1000);\n\n      ct = (first + last) / 2;\n      assert(pthread_cancel(t[ct]) == 0);\n      canceledThreads++;\n      assert(pthread_join(t[ct], NULL) == 0);\n\n      assert(pthread_mutex_lock(&cvthing.lock) == 0);\n      cvthing.shared++;\n      assert(pthread_mutex_unlock(&cvthing.lock) == 0);\n\n      assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);\n\n      /*\n       * Standard check that all threads started - and wait for them to finish.\n       */\n      for (i = first; i <= last; i++)\n\t{ \n\t  failed = !threadbag[i].started;\n\n          if (failed)\n\t    {\n\t      fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t    }\n\t  else\n\t    {\n\t      assert(pthread_join(t[i], NULL) == 0 || threadbag[i].finished == 0);\n//\t      fprintf(stderr, \"Thread %d: finished %d\\n\", i, threadbag[i].finished);\n\t    }\n\t}\n    }\n\n  /* \n   * Cleanup the CV.\n   */\n\n  assert(pthread_mutex_destroy(&cvthing.lock) == 0);\n\n  assert(cvthing.lock == NULL);\n\n  assert_e(pthread_cond_destroy(&cvthing.notbusy), ==, 0);\n\n  assert(cvthing.notbusy == NULL);\n\n  assert(!failed);\n\n  /*\n   * Check any results here.\n   */\n\n  assert(awoken == NUMTHREADS - canceledThreads);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/context1.c",
    "content": "/*\n * File: context1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test context switching method.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - pthread_create\n *   pthread_exit\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#define _WIN32_WINNT 0x400\n\n#include \"test.h\"\n#include \"../implement.h\"\n\nstatic int washere = 0;\n\nstatic void * func(void * arg)\n{\n  washere = 1;\n\n  Sleep(1000);\n\n  return 0; \n}\n\nstatic void\nanotherEnding ()\n{\n  /*\n   * Switched context\n   */\n  washere++;\n\n  pthread_exit(0);\n}\n\nint\nmain()\n{\n  pthread_t t;\n  HANDLE hThread;\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  hThread = ((ptw32_thread_t *)t.p)->threadH;\n\n  Sleep(500);\n\n  SuspendThread(hThread);\n\n  if (WaitForSingleObject(hThread, 0) == WAIT_TIMEOUT) \n    {\n      /*\n       * Ok, thread did not exit before we got to it.\n       */\n      CONTEXT context;\n\n      context.ContextFlags = CONTEXT_CONTROL;\n\n      GetThreadContext(hThread, &context);\n      /*\n       *_x86 only!!!\n       */\n      context.Eip = (DWORD) anotherEnding;\n      SetThreadContext(hThread, &context);\n      ResumeThread(hThread);\n    }\n  else\n    {\n      printf(\"Exited early\\n\");\n      fflush(stdout);\n    }\n\n  Sleep(1000);\n\n  assert(washere == 2);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/count1.c",
    "content": "/*\n * count1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Description:\n * Test some basic assertions about the number of threads at runtime.\n */\n\n#include \"test.h\"\n\n#define NUMTHREADS (30)\n\nstatic pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;\nstatic pthread_t threads[NUMTHREADS];\nstatic unsigned numThreads = 0;\n\nvoid *\nmyfunc(void *arg)\n{\n  pthread_mutex_lock(&lock);\n  numThreads++;\n  pthread_mutex_unlock(&lock);\n\n  Sleep(1000);\n  return 0;\n}\nint\nmain()\n{\n  int i;\n  int maxThreads = sizeof(threads) / sizeof(pthread_t);\n\n  /*\n   * Spawn NUMTHREADS threads. Each thread should increment the\n   * numThreads variable, sleep for one second.\n   */\n  for (i = 0; i < maxThreads; i++)\n    {\n      assert(pthread_create(&threads[i], NULL, myfunc, 0) == 0);\n    }\n  \n  /*\n   * Wait for all the threads to exit.\n   */\n  for (i = 0; i < maxThreads; i++)\n    {\n      assert(pthread_join(threads[i], NULL) == 0);\n    }\n\n  /* \n   * Check the number of threads created.\n   */\n  assert((int) numThreads == maxThreads);\n  \n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/create1.c",
    "content": "/*\n * create1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Description:\n * Create a thread and check that it ran.\n *\n * Depends on API functions: None.\n */\n\n#include \"test.h\"\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  washere = 1;\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  /* A dirty hack, but we cannot rely on pthread_join in this\n     primitive test. */\n  Sleep(2000);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/create2.c",
    "content": "/*\n * File: create2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test that threads have a Win32 handle when started.\n *\n * Test Method (Validation or Falsification):\n * - Statistical, not absolute (depends on sample size).\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * -\n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\nenum {\n  NUMTHREADS = 10000\n};\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  washere = 1;\n  return (void *) 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n  pthread_attr_t attr;\n  void * result = NULL;\n  int i;\n\n  pthread_attr_init(&attr);\n  pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);\n\n  for (i = 0; i < NUMTHREADS; i++)\n    {\n      washere = 0;\n      assert(pthread_create(&t, &attr, func, NULL) == 0);\n      pthread_join(t, &result);\n      assert(washere == 1);\n    }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/create3.c",
    "content": "/*\n * File: create3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2003 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test passing NULL as thread id arg to pthread_create.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 1\n};\n\n\nvoid *\nthreadFunc(void * arg)\n{\n  return (void *) 0;\n}\n\nint\nmain(int argc, char * argv[])\n{\n  int i;\n  pthread_t mt;\n\n  if (argc <= 1)\n    {\n      int result;\n\n      printf(\"You should see an application memory write error message\\n\");\n      fflush(stdout);\n      result = system(\"create3.exe die\");\n      exit(0);\n    }\n\n  assert((mt = pthread_self()).p != NULL);\n\n  for (i = 0; i < NUMTHREADS; i++)\n    {\n      assert(pthread_create(NULL, NULL, threadFunc, NULL) == 0);\n    }\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/delay1.c",
    "content": "/*\n * delay1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions:\n *    pthread_delay_np\n */\n\n#include \"test.h\"\n\nint\nmain(int argc, char * argv[])\n{\n  struct timespec interval = {1L, 500000000L};\n\n  assert(pthread_delay_np(&interval) == 0);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/delay2.c",
    "content": "/*\n * delay1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions:\n *    pthread_delay_np\n */\n\n#include \"test.h\"\n\npthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER;\n\nvoid *\nfunc(void * arg)\n{\n  struct timespec interval = {5, 500000000L};\n\n  assert(pthread_mutex_lock(&mx) == 0);\n\n#ifdef _MSC_VER\n#pragma inline_depth(0)\n#endif\n  pthread_cleanup_push(pthread_mutex_unlock, &mx);\n  assert(pthread_delay_np(&interval) == 0);\n  pthread_cleanup_pop(1);\n#ifdef _MSC_VER\n#pragma inline_depth()\n#endif\n\n  return (void *) 1;\n}\n\nint\nmain(int argc, char * argv[])\n{\n  pthread_t t;\n  int result = 0;\n\n  assert(pthread_mutex_lock(&mx) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n  assert(pthread_cancel(t) == 0);\n\n  assert(pthread_mutex_unlock(&mx) == 0);\n\n  assert(pthread_join(t, (void **) &result) == 0);\n  assert(result == (int) PTHREAD_CANCELED);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/detach1.c",
    "content": "/*\n * Test for pthread_detach().\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions: pthread_create(), pthread_detach(), pthread_exit().\n */\n\n#include \"test.h\"\n\n\nenum {\n  NUMTHREADS = 100\n};\n\nvoid *\nfunc(void * arg)\n{\n    int i = (int) arg;\n\n    Sleep(i * 10);\n\n    pthread_exit(arg);\n\n    /* Never reached. */\n    exit(1);\n}\n\nint\nmain(int argc, char * argv[])\n{\n\tpthread_t id[NUMTHREADS];\n\tint i;\n\n\t/* Create a few threads and then exit. */\n\tfor (i = 0; i < NUMTHREADS; i++)\n\t  {\n\t    assert(pthread_create(&id[i], NULL, func, (void *) i) == 0);\n\t  }\n\n\t/* Some threads will finish before they are detached, some after. */\n\tSleep(NUMTHREADS/2 * 10 + 50);\n\n\tfor (i = 0; i < NUMTHREADS; i++)\n\t  {\n\t    assert(pthread_detach(id[i]) == 0);\n\t  }\n\n\tSleep(NUMTHREADS * 10 + 100);\n\n\t/*\n\t * Check that all threads are now invalid.\n\t * This relies on unique thread IDs - e.g. works with\n\t * pthreads-w32 or Solaris, but may not work for Linux, BSD etc.\n\t */\n\tfor (i = 0; i < NUMTHREADS; i++)\n\t  {\n\t    assert(pthread_kill(id[i], 0) == ESRCH);\n\t  }\n\n\t/* Success. */\n\treturn 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/equal1.c",
    "content": "/*\n * Test for pthread_equal.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on functions: pthread_create().\n */\n\n#include \"test.h\"\n\nvoid * func(void * arg)\n{\n  Sleep(2000);\n  return 0;\n}\n\nint \nmain()\n{\n  pthread_t t1, t2;\n\n  assert(pthread_create(&t1, NULL, func, (void *) 1) == 0);\n\n  assert(pthread_create(&t2, NULL, func, (void *) 2) == 0);\n\n  assert(pthread_equal(t1, t2) == 0);\n\n  assert(pthread_equal(t1,t1) != 0);\n\n  /* This is a hack. We don't want to rely on pthread_join\n     yet if we can help it. */\n   Sleep(4000);\n\n  /* Success. */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/errno1.c",
    "content": "/*\n * File: errno1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test thread-safety of errno\n * - \n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 3\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\npthread_mutex_t stop_here = PTHREAD_MUTEX_INITIALIZER;\n\nvoid *\nmythread(void * arg)\n{\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  errno = bag->threadnum;\n\n  Sleep(1000);\n\n  pthread_mutex_lock(&stop_here);\n\n  assert(errno == bag->threadnum);\n\n  pthread_mutex_unlock(&stop_here);\n\n  Sleep(1000);\n\n  return 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t t[NUMTHREADS + 1];\n\n  pthread_mutex_lock(&stop_here);\n  errno = 0;\n\n  assert((t[0] = pthread_self()).p != NULL);\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n      assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(2000);\n  pthread_mutex_unlock(&stop_here);\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 1000);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      failed = !threadbag[i].started;\n\n      if (failed)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print ouput on failure.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      /* ... */\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/exception1.c",
    "content": "/*\n * File: exception1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test passing of exceptions back to the application.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#if defined(_MSC_VER) || defined(__cplusplus)\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 4\n};\n\nvoid *\nexceptionedThread(void * arg)\n{\n  int dummy = 0;\n  int result = ((int)PTHREAD_CANCELED + 1);\n  /* Set to async cancelable */\n\n  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);\n\n  Sleep(100);\n\n#if defined(_MSC_VER) && !defined(__cplusplus)\n  __try\n  {\n    int zero = (int) arg; /* Passed in from arg to avoid compiler error */\n    int one = 1;\n    /*\n     * The deliberate exception condition (zero divide) is\n     * in an \"if\" to avoid being optimised out.\n     */\n    if (dummy == one/zero)\n      Sleep(0);\n  }\n  __except (EXCEPTION_EXECUTE_HANDLER)\n  {\n    /* Should get into here. */\n    result = ((int)PTHREAD_CANCELED + 2);\n  }\n#elif defined(__cplusplus)\n  try\n  {\n    /*\n     * I had a zero divide exception here but it\n     * wasn't being caught by the catch(...)\n     * below under Mingw32. That could be a problem.\n     */\n    throw dummy;\n  }\n#if defined(PtW32CatchAll)\n  PtW32CatchAll\n#else\n  catch (...)\n#endif\n  {\n    /* Should get into here. */\n    result = ((int)PTHREAD_CANCELED + 2);\n  }\n#endif\n\n  return (void *) result;\n}\n\nvoid *\ncanceledThread(void * arg)\n{\n  int result = ((int)PTHREAD_CANCELED + 1);\n  int count;\n\n  /* Set to async cancelable */\n\n  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);\n\n  assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);\n\n#if defined(_MSC_VER) && !defined(__cplusplus)\n  __try\n  {\n    /*\n     * We wait up to 10 seconds, waking every 0.1 seconds,\n     * for a cancelation to be applied to us.\n     */\n    for (count = 0; count < 100; count++)\n      Sleep(100);\n  }\n  __except (EXCEPTION_EXECUTE_HANDLER)\n  {\n    /* Should NOT get into here. */\n    result = ((int)PTHREAD_CANCELED + 2);\n  }\n#elif defined(__cplusplus)\n  try\n  {\n    /*\n     * We wait up to 10 seconds, waking every 0.1 seconds,\n     * for a cancelation to be applied to us.\n     */\n    for (count = 0; count < 100; count++)\n      Sleep(100);\n  }\n#if defined(PtW32CatchAll)\n  PtW32CatchAll\n#else\n  catch (...)\n#endif\n  {\n    /* Should NOT get into here. */\n    result = ((int)PTHREAD_CANCELED + 2);\n  }\n#endif\n\n  return (void *) result;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  pthread_t mt;\n  pthread_t et[NUMTHREADS];\n  pthread_t ct[NUMTHREADS];\n\n  assert((mt = pthread_self()).p != NULL);\n\n  for (i = 0; i < NUMTHREADS; i++)\n    {\n      assert(pthread_create(&et[i], NULL, exceptionedThread, (void *) 0) == 0);\n      assert(pthread_create(&ct[i], NULL, canceledThread, NULL) == 0);\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(1000);\n\n  for (i = 0; i < NUMTHREADS; i++)\n    {\n      assert(pthread_cancel(ct[i]) == 0);\n    }\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 1000);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 0; i < NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n\t/* Canceled thread */\n      assert(pthread_join(ct[i], (void **) &result) == 0);\n      assert(!(fail = (result != (int) PTHREAD_CANCELED)));\n\n      failed = (failed || fail);\n\n      /* Exceptioned thread */\n      assert(pthread_join(et[i], (void **) &result) == 0);\n      assert(!(fail = (result != ((int) PTHREAD_CANCELED + 2))));\n\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n#else /* defined(_MSC_VER) || defined(__cplusplus) */\n\n#include <stdio.h>\n\nint\nmain()\n{\n  fprintf(stderr, \"Test N/A for this compiler environment.\\n\");\n  return 0;\n}\n\n#endif /* defined(_MSC_VER) || defined(__cplusplus) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/exception2.c",
    "content": "/*\n * File: exception2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test passing of exceptions out of thread scope.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n\n#if defined(_MSC_VER) || defined(__cplusplus)\n\n#if defined(_MSC_VER) && defined(__cplusplus)\n#include <eh.h>\n#elif defined(__cplusplus)\n#include <exception>\n#endif\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#include \"test.h\"\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 1\n};\n\n\nvoid *\nexceptionedThread(void * arg)\n{\n  int dummy = 0x1;\n\n#if defined(_MSC_VER) && !defined(__cplusplus)\n\n  RaiseException(dummy, 0, 0, NULL);\n\n#elif defined(__cplusplus)\n\n  throw dummy;\n\n#endif\n\n  return (void *) 100;\n}\n\nint\nmain(int argc, char argv[])\n{\n  int i;\n  pthread_t mt;\n  pthread_t et[NUMTHREADS];\n\n  if (argc <= 1)\n    {\n      int result;\n\n      printf(\"You should see an \\\"abnormal termination\\\" message\\n\");\n      fflush(stdout);\n      result = system(\"exception2.exe die\");\n      exit(0);\n    }\n\n  assert((mt = pthread_self()).p != NULL);\n\n  for (i = 0; i < NUMTHREADS; i++)\n    {\n      assert(pthread_create(&et[i], NULL, exceptionedThread, NULL) == 0);\n    }\n\n  Sleep(1000);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n#else /* defined(_MSC_VER) || defined(__cplusplus) */\n\n#include <stdio.h>\n\nint\nmain()\n{\n  fprintf(stderr, \"Test N/A for this compiler environment.\\n\");\n  return 0;\n}\n\n#endif /* defined(_MSC_VER) || defined(__cplusplus) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/exception3.c",
    "content": "/*\n * File: exception3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test running of user supplied terminate() function.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n#if defined(__cplusplus)\n\n#if defined(_MSC_VER)\n# include <eh.h>\n#else\n# if defined(__GNUC__) && __GNUC__ < 3\n#   include <new.h>\n# else\n#   include <new>\n    using std::set_terminate;\n# endif\n#endif\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 1\n};\n\nint caught = 0;\npthread_mutex_t caughtLock;\n\nvoid\nterminateFunction ()\n{\n  assert(pthread_mutex_lock(&caughtLock) == 0);\n  caught++;\n#if 1\n  {\n     FILE * fp = fopen(\"pthread.log\", \"a\");\n     fprintf(fp, \"Caught = %d\\n\", caught);\n     fclose(fp);\n  }\n#endif\n  assert(pthread_mutex_unlock(&caughtLock) == 0);\n\n#if defined(__MINGW32__)\n  /*\n   * Seems to work. That is, threads exit and the process\n   * continues. Note: need to check correct POSIX behaviour.\n   * My guess is: this is because of the\n   * eh incompatibility between g++ and MSVC++. That is,\n   * an exception thrown in g++ code doesn't propogate\n   * through or to MSVC++ code, and vice versa.\n   * Applications should probably not depend on this.\n   */\n  pthread_exit((void *) 0);\n#else\n  /*\n   * Notes from the MSVC++ manual:\n   *       1) A term_func() should call exit(), otherwise\n   *          abort() will be called on return to the caller.\n   *          abort() raises SIGABRT. The default signal handler\n   *          for all signals terminates the calling program with\n   *          exit code 3.\n   *       2) A term_func() must not throw an exception. Therefore\n   *          term_func() should not call pthread_exit() if an\n   *          an exception-using version of pthreads-win32 library\n   *          is being used (i.e. either pthreadVCE or pthreadVSE).\n   */\n  exit(0);\n#endif\n}\n\nvoid *\nexceptionedThread(void * arg)\n{\n  int dummy = 0x1;\n\n  (void) set_terminate(&terminateFunction);\n\n  throw dummy;\n\n  return (void *) 0;\n}\n\nint\nmain()\n{\n  int i;\n  pthread_t mt;\n  pthread_t et[NUMTHREADS];\n  pthread_mutexattr_t ma;\n\n  assert((mt = pthread_self()).p != NULL);\n\n  printf(\"See the notes inside of exception3.c re term_funcs.\\n\");\n\n  assert(pthread_mutexattr_init(&ma) == 0);\n  assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_ERRORCHECK) == 0);\n  assert(pthread_mutex_init(&caughtLock, &ma) == 0);\n  assert(pthread_mutexattr_destroy(&ma) == 0);\n\n  for (i = 0; i < NUMTHREADS; i++)\n    {\n      assert(pthread_create(&et[i], NULL, exceptionedThread, NULL) == 0);\n    }\n\n  Sleep(5000);\n\n  assert(caught == NUMTHREADS);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n#else /* defined(__cplusplus) */\n\n#include <stdio.h>\n\nint\nmain()\n{\n  fprintf(stderr, \"Test N/A for this compiler environment.\\n\");\n  return 0;\n}\n\n#endif /* defined(__cplusplus) */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/exit1.c",
    "content": "/*\n * Test for pthread_exit().\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions: None.\n */\n\n#include \"test.h\"\n\nint\nmain(int argc, char * argv[])\n{\n\t/* A simple test first. */\n\tpthread_exit((void *) 0);\n\n\t/* Not reached */\n\tassert(0);\n\treturn 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/exit2.c",
    "content": "/*\n * Test for pthread_exit().\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions:\n *\tpthread_create()\n *\tpthread_exit()\n */\n\n#include \"test.h\"\n\nvoid *\nfunc(void * arg)\n{\n\tpthread_exit(arg);\n\n\t/* Never reached. */\n\tassert(0);\n\n\treturn NULL;\n}\n\nint\nmain(int argc, char * argv[])\n{\n  pthread_t t;\n\n  assert(pthread_create(&t, NULL, func, (void *) NULL) == 0);\n\n  Sleep(1000);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/exit3.c",
    "content": "/*\n * Test for pthread_exit().\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions: pthread_create().\n */\n\n#include \"test.h\"\n\nvoid *\nfunc(void * arg)\n{\n\tpthread_exit(arg);\n\n\t/* Never reached. */\n\tassert(0);\n\n\treturn NULL;\n}\n\nint\nmain(int argc, char * argv[])\n{\n\tpthread_t id[4];\n\tint i;\n\n\t/* Create a few threads and then exit. */\n\tfor (i = 0; i < 4; i++)\n\t  {\n\t    assert(pthread_create(&id[i], NULL, func, (void *) i) == 0);\n\t  }\n\n\tSleep(1000);\n\n\t/* Success. */\n\treturn 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/exit4.c",
    "content": "/*\n * File: exit4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test calling pthread_exit from a Win32 thread\n *                without having created an implicit POSIX handle for it.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#ifndef _UWIN\n#include <process.h>\n#endif\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 4\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\nunsigned __stdcall\n#else\nvoid\n#endif\nWin32thread(void * arg)\n{\n  int result = 1;\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  /*\n   * Doesn't return and doesn't create an implicit POSIX handle.\n   */\n  pthread_exit((void *) result);\n\n  return 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  HANDLE h[NUMTHREADS + 1];\n  unsigned thrAddr; /* Dummy variable to pass a valid location to _beginthreadex (Win98). */\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\n      h[i] = (HANDLE) _beginthreadex(NULL, 0, Win32thread, (void *) &threadbag[i], 0, &thrAddr);\n#else\n      h[i] = (HANDLE) _beginthread(Win32thread, 0, (void *) &threadbag[i]);\n#endif\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\n      assert(GetExitCodeThread(h[i], (LPDWORD) &result) == TRUE);\n#else\n      /*\n       * Can't get a result code.\n       */\n      result = 1;\n#endif\n\n      fail = (result != 1);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: count %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  threadbag[i].count);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/exit5.c",
    "content": "/*\n * File: exit5.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Test calling pthread_exit from a Win32 thread\n *                having created an implicit POSIX handle for it.\n *\n * Test Method (Validation or Falsification):\n * - Validate return value and that POSIX handle is created and destroyed.\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock\n *   pthread_testcancel, pthread_cancel, pthread_join\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n#ifndef _UWIN\n#include <process.h>\n#endif\n\n/*\n * Create NUMTHREADS threads in addition to the Main thread.\n */\nenum {\n  NUMTHREADS = 4\n};\n\ntypedef struct bag_t_ bag_t;\nstruct bag_t_ {\n  int threadnum;\n  int started;\n  /* Add more per-thread state variables here */\n  int count;\n  pthread_t self;\n};\n\nstatic bag_t threadbag[NUMTHREADS + 1];\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\nunsigned __stdcall\n#else\nvoid\n#endif\nWin32thread(void * arg)\n{\n  int result = 1;\n  bag_t * bag = (bag_t *) arg;\n\n  assert(bag == &threadbag[bag->threadnum]);\n  assert(bag->started == 0);\n  bag->started = 1;\n\n  assert((bag->self = pthread_self()).p != NULL);\n  assert(pthread_kill(bag->self, 0) == 0);\n\n  /*\n   * Doesn't return.\n   */\n  pthread_exit((void *) result);\n\n  return 0;\n}\n\nint\nmain()\n{\n  int failed = 0;\n  int i;\n  HANDLE h[NUMTHREADS + 1];\n  unsigned thrAddr; /* Dummy variable to pass a valid location to _beginthreadex (Win98). */\n\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      threadbag[i].started = 0;\n      threadbag[i].threadnum = i;\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\n      h[i] = (HANDLE) _beginthreadex(NULL, 0, Win32thread, (void *) &threadbag[i], 0, &thrAddr);\n#else\n      h[i] = (HANDLE) _beginthread(Win32thread, 0, (void *) &threadbag[i]);\n#endif\n    }\n\n  /*\n   * Code to control or munipulate child threads should probably go here.\n   */\n  Sleep(500);\n\n  /*\n   * Give threads time to run.\n   */\n  Sleep(NUMTHREADS * 100);\n\n  /*\n   * Standard check that all threads started.\n   */\n  for (i = 1; i <= NUMTHREADS; i++)\n    { \n      if (!threadbag[i].started)\n\t{\n\t  failed |= !threadbag[i].started;\n\t  fprintf(stderr, \"Thread %d: started %d\\n\", i, threadbag[i].started);\n\t}\n    }\n\n  assert(!failed);\n\n  /*\n   * Check any results here. Set \"failed\" and only print output on failure.\n   */\n  failed = 0;\n  for (i = 1; i <= NUMTHREADS; i++)\n    {\n      int fail = 0;\n      int result = 0;\n\n#if ! defined (__MINGW32__) || defined (__MSVCRT__)\n      assert(GetExitCodeThread(h[i], (LPDWORD) &result) == TRUE);\n#else\n      /*\n       * Can't get a result code.\n       */\n      result = 1;\n#endif\n\n      assert(threadbag[i].self.p != NULL && pthread_kill(threadbag[i].self, 0) == ESRCH);\n\n      fail = (result != 1);\n\n      if (fail)\n\t{\n\t  fprintf(stderr, \"Thread %d: started %d: count %d\\n\",\n\t\t  i,\n\t\t  threadbag[i].started,\n\t\t  threadbag[i].count);\n\t}\n      failed = (failed || fail);\n    }\n\n  assert(!failed);\n\n  /*\n   * Success.\n   */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/eyal1.c",
    "content": "/* Simple POSIX threads program.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Author: Eyal Lebedinsky eyal@eyal.emu.id.au\n * Written: Sep 1998.\n * Version Date: 12 Sep 1998\n *\n * Do we need to lock stdout or is it thread safe?\n *\n * Used:\n *\tpthread_t\n *\tpthread_attr_t\n *\tpthread_create()\n *\tpthread_join()\n *\tpthread_mutex_t\n *\tPTHREAD_MUTEX_INITIALIZER\n *\tpthread_mutex_init() [not used now]\n *\tpthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_trylock()\n *\tpthread_mutex_unlock()\n *\n * What this program does is establish a work queue (implemented using\n * four mutexes for each thread). It then schedules work (by storing\n * a number in 'todo') and releases the threads. When the work is done\n * the threads will block. The program then repeats the same thing once\n * more (just to test the logic) and when the work is done it destroyes\n * the threads.\n *\n * The 'work' we do is simply burning CPU cycles in a loop.\n * The 'todo' work queue is trivial - each threads pops one element\n * off it by incrementing it, the poped number is the 'work' to do.\n * When 'todo' reaches the limit (nwork) the queue is considered\n * empty.\n *\n * The number displayed at the end is the amount of work each thread\n * did, so we can see if the load was properly distributed.\n *\n * The program was written to test a threading setup (not seen here)\n * rather than to demonstrate correct usage of the pthread facilities.\n *\n * Note how each thread is given access to a thread control structure\n * (TC) which is used for communicating to/from the main program (e.g.\n * the threads knows its 'id' and also filles in the 'work' done).\n*/\n\n#include \"test.h\"\n\n#include <stdlib.h>\n#include <math.h>\n\nstruct thread_control {\n  int\t\tid;\n  pthread_t\tthread;\t\t/* thread id */\n  pthread_mutex_t\tmutex_start;\n  pthread_mutex_t\tmutex_started;\n  pthread_mutex_t\tmutex_end;\n  pthread_mutex_t\tmutex_ended;\n  long\t\twork;\t\t/* work done */\n  int\t\tstat;\t\t/* pthread_init status */\n};\n\ntypedef struct thread_control\tTC;\n\nstatic TC\t\t*tcs = NULL;\nstatic int\t\tnthreads = 10;\nstatic int\t\tnwork = 100;\nstatic int\t\tquiet = 0;\n\nstatic int\t\ttodo = -1;\n\nstatic pthread_mutex_t\tmutex_todo = PTHREAD_MUTEX_INITIALIZER;\nstatic pthread_mutex_t\tmutex_stdout = PTHREAD_MUTEX_INITIALIZER;\n\n\nstatic void\ndie (int ret)\n{\n  if (NULL != tcs)\n    {\n      free (tcs);\n      tcs = NULL;\n    }\n\n  if (ret)\n    exit (ret);\n}\n\n\nstatic double\nwaste_time (int n)\n{\n  int\t\ti;\n  double\tf, g, h, s;\n\n  s = 0.0;\n\n  /*\n   * Useless work.\n   */\n  for (i = n*100; i > 0; --i)\n    {\n      f = rand ();\n      g = rand ();\n      h = rand ();\n      s += 2.0 * f * g / (h != 0.0 ? (h * h) : 1.0);\n    }\n  return s;\n}\n\nstatic int\ndo_work_unit (int who, int n)\n{\n  int\t\ti;\n  static int\tnchars = 0;\n  double\tf = 0.0;\n\n  if (quiet)\n    i = 0;\n  else {\n    /*\n     * get lock on stdout\n     */\n    assert(pthread_mutex_lock (&mutex_stdout) == 0);\n\n    /*\n     * do our job\n     */\n    i = printf (\"%c\", \"0123456789abcdefghijklmnopqrstuvwxyz\"[who]);\n\n    if (!(++nchars % 50))\n      printf (\"\\n\");\n\n    fflush (stdout);\n\n    /*\n     * release lock on stdout\n     */\n    assert(pthread_mutex_unlock (&mutex_stdout) == 0);\n  }\n\n  n = rand () % 10000;\t/* ignore incoming 'n' */\n  f = waste_time (n);\n\n  /* This prevents the statement above from being optimised out */\n  if (f > 0.0)\n    return(n);\n\n  return (n);\n}\n\nstatic int\nprint_server (void *ptr)\n{\n  int\t\tmywork;\n  int\t\tn;\n  TC\t\t*tc = (TC *)ptr;\n\n  assert(pthread_mutex_lock (&tc->mutex_started) == 0);\n\n  for (;;)\n    {\n      assert(pthread_mutex_lock (&tc->mutex_start) == 0);\n      assert(pthread_mutex_unlock (&tc->mutex_start) == 0);\n      assert(pthread_mutex_lock (&tc->mutex_ended) == 0);\n      assert(pthread_mutex_unlock (&tc->mutex_started) == 0);\n\n      for (;;)\n\t{\n\n\t  /*\n\t   * get lock on todo list\n\t   */\n\t  assert(pthread_mutex_lock (&mutex_todo) == 0);\n\n\t  mywork = todo;\n\t  if (todo >= 0)\n\t    {\n\t      ++todo;\n\t      if (todo >= nwork)\n\t\ttodo = -1;\n\t    }\n\t  assert(pthread_mutex_unlock (&mutex_todo) == 0);\n\n\t  if (mywork < 0)\n\t    break;\n\n\t  assert((n = do_work_unit (tc->id, mywork)) >= 0);\n\t  tc->work += n;\n\t}\n\n      assert(pthread_mutex_lock (&tc->mutex_end) == 0);\n      assert(pthread_mutex_unlock (&tc->mutex_end) == 0);\n      assert(pthread_mutex_lock (&tc->mutex_started) == 0);\n      assert(pthread_mutex_unlock (&tc->mutex_ended) == 0);\n\n      if (-2 == mywork)\n\tbreak;\n    }\n\n  assert(pthread_mutex_unlock (&tc->mutex_started) == 0);\n\n  return (0);\n}\n\nstatic void\ndosync (void)\n{\n  int\t\ti;\n\n  for (i = 0; i < nthreads; ++i)\n    {\n      assert(pthread_mutex_lock (&tcs[i].mutex_end) == 0);\n      assert(pthread_mutex_unlock (&tcs[i].mutex_start) == 0);\n      assert(pthread_mutex_lock (&tcs[i].mutex_started) == 0);\n      assert(pthread_mutex_unlock (&tcs[i].mutex_started) == 0);\n    }\n\n  /*\n   * Now threads do their work\n   */\n  for (i = 0; i < nthreads; ++i)\n    {\n      assert(pthread_mutex_lock (&tcs[i].mutex_start) == 0);\n      assert(pthread_mutex_unlock (&tcs[i].mutex_end) == 0);\n      assert(pthread_mutex_lock (&tcs[i].mutex_ended) == 0);\n      assert(pthread_mutex_unlock (&tcs[i].mutex_ended) == 0);\n    }\n}\n\nstatic void\ndowork (void)\n{\n  todo = 0;\n  dosync();\n\n  todo = 0;\n  dosync();\n}\n\nint\nmain (int argc, char *argv[])\n{\n  int\t\ti;\n\n  assert(NULL != (tcs = (TC *) calloc (nthreads, sizeof (*tcs))));\n\n  /* \n   * Launch threads\n   */\n  for (i = 0; i < nthreads; ++i)\n    {\n      tcs[i].id = i;\n\n      assert(pthread_mutex_init (&tcs[i].mutex_start, NULL) == 0);\n      assert(pthread_mutex_init (&tcs[i].mutex_started, NULL) == 0);\n      assert(pthread_mutex_init (&tcs[i].mutex_end, NULL) == 0);\n      assert(pthread_mutex_init (&tcs[i].mutex_ended, NULL) == 0);\n\n      tcs[i].work = 0;  \n\n      assert(pthread_mutex_lock (&tcs[i].mutex_start) == 0);\n      assert((tcs[i].stat = \n\t      pthread_create (&tcs[i].thread,\n\t\t\t      NULL,\n                  (void *(*)(void *))print_server,\n                (void *) &tcs[i])\n\t      ) == 0);\n\n      /* \n       * Wait for thread initialisation\n       */\n      {\n\tint trylock = 0;\n\n\twhile (trylock == 0)\n\t  {\n\t    trylock = pthread_mutex_trylock(&tcs[i].mutex_started);\n\t    assert(trylock == 0 || trylock == EBUSY);\n\n\t    if (trylock == 0)\n\t      {\n\t\tassert(pthread_mutex_unlock (&tcs[i].mutex_started) == 0);\n\t      }\n\t  }\n      }\n    }\n\n  dowork ();\n\n  /*\n   * Terminate threads\n   */\n  todo = -2;\t/* please terminate */\n  dosync();\n\n  for (i = 0; i < nthreads; ++i)\n    {\n      if (0 == tcs[i].stat)\n\tassert(pthread_join (tcs[i].thread, NULL) == 0);\n    }\n\n  /* \n   * destroy locks\n   */\n  assert(pthread_mutex_destroy (&mutex_stdout) == 0);\n  assert(pthread_mutex_destroy (&mutex_todo) == 0);\n\n  /*\n   * Cleanup\n   */\n  printf (\"\\n\");\n\n  /*\n   * Show results\n   */\n  for (i = 0; i < nthreads; ++i)\n    {\n      printf (\"%2d \", i);\n      if (0 == tcs[i].stat)\n\tprintf (\"%10ld\\n\", tcs[i].work);\n      else\n\tprintf (\"failed %d\\n\", tcs[i].stat);\n\n      assert(pthread_mutex_unlock(&tcs[i].mutex_start) == 0);\n\n      assert(pthread_mutex_destroy (&tcs[i].mutex_start) == 0);\n      assert(pthread_mutex_destroy (&tcs[i].mutex_started) == 0);\n      assert(pthread_mutex_destroy (&tcs[i].mutex_end) == 0);\n      assert(pthread_mutex_destroy (&tcs[i].mutex_ended) == 0);\n    }\n\n  die (0);\n\n  return (0);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/inherit1.c",
    "content": "/*\n * File: inherit1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test thread priority inheritance.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * -\n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\nenum {\n  PTW32TEST_THREAD_INIT_PRIO = 0,\n  PTW32TEST_MAXPRIORITIES = 512\n};\n\nint minPrio;\nint maxPrio;\nint validPriorities[PTW32TEST_MAXPRIORITIES];\n\n\nvoid * func(void * arg)\n{\n  int policy;\n  struct sched_param param;\n\n  assert(pthread_getschedparam(pthread_self(), &policy, &param) == 0);\n  return (void *) param.sched_priority;\n}\n\n\nvoid *\ngetValidPriorities(void * arg)\n{\n  int prioSet;\n  pthread_t thread = pthread_self();\n  HANDLE threadH = pthread_getw32threadhandle_np(thread);\n  struct sched_param param;\n\n  for (prioSet = minPrio;\n       prioSet <= maxPrio;\n       prioSet++)\n    {\n        /*\n       * If prioSet is invalid then the threads priority is unchanged\n       * from the previous value. Make the previous value a known\n       * one so that we can check later.\n       */\n        param.sched_priority = prioSet;\n        assert(pthread_setschedparam(thread, SCHED_OTHER, &param) == 0);\n        validPriorities[prioSet+(PTW32TEST_MAXPRIORITIES/2)] = GetThreadPriority(threadH);\n    }\n\n  return (void *) 0;\n}\n\n\nint\nmain()\n{\n  pthread_t t;\n  pthread_t mainThread = pthread_self();\n  pthread_attr_t attr;\n  void * result = NULL;\n  struct sched_param param;\n  struct sched_param mainParam;\n  int prio;\n  int policy;\n  int inheritsched = -1;\n  pthread_t threadID = pthread_self();\n  HANDLE threadH = pthread_getw32threadhandle_np(threadID);\n\n  assert((maxPrio = sched_get_priority_max(SCHED_OTHER)) != -1);\n  assert((minPrio = sched_get_priority_min(SCHED_OTHER)) != -1);\n\n  assert(pthread_create(&t, NULL, getValidPriorities, NULL) == 0);\n  assert(pthread_join(t, &result) == 0);\n\n  assert(pthread_attr_init(&attr) == 0);\n  assert(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED) == 0);\n  assert(pthread_attr_getinheritsched(&attr, &inheritsched) == 0);\n  assert(inheritsched == PTHREAD_INHERIT_SCHED);\n\n  for (prio = minPrio; prio <= maxPrio; prio++)\n    {\n      mainParam.sched_priority = prio;\n\n      /* Set the thread's priority to a known initial value. */\n      SetThreadPriority(threadH, PTW32TEST_THREAD_INIT_PRIO);\n\n      /* Change the main thread priority */\n      assert(pthread_setschedparam(mainThread, SCHED_OTHER, &mainParam) == 0);\n      assert(pthread_getschedparam(mainThread, &policy, &mainParam) == 0);\n      assert(policy == SCHED_OTHER);\n      /* Priority returned below should be the level set by pthread_setschedparam(). */\n      assert(mainParam.sched_priority == prio);\n      assert(GetThreadPriority(threadH) ==\n               validPriorities[prio+(PTW32TEST_MAXPRIORITIES/2)]);\n\n      for (param.sched_priority = prio;\n           param.sched_priority <= maxPrio;\n           param.sched_priority++)\n        {\n          /* The new thread create should ignore this new priority */\n          assert(pthread_attr_setschedparam(&attr, &param) == 0);\n          assert(pthread_create(&t, &attr, func, NULL) == 0);\n          pthread_join(t, &result);\n          assert((int) result == mainParam.sched_priority);\n        }\n    }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/join0.c",
    "content": "/*\n * Test for pthread_join().\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions: pthread_create(), pthread_exit().\n */\n\n#include \"test.h\"\n\nvoid *\nfunc(void * arg)\n{\n  Sleep(2000);\n\n  pthread_exit(arg);\n\n  /* Never reached. */\n  exit(1);\n}\n\nint\nmain(int argc, char * argv[])\n{\n  pthread_t id;\n  int result;\n\n  /* Create a single thread and wait for it to exit. */\n  assert(pthread_create(&id, NULL, func, (void *) 123) == 0);\n\n  assert(pthread_join(id, (void **) &result) == 0);\n\n  assert(result == 123);\n\n  /* Success. */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/join1.c",
    "content": "/*\n * Test for pthread_join().\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions: pthread_create(), pthread_join(), pthread_exit().\n */\n\n#include \"test.h\"\n\nvoid *\nfunc(void * arg)\n{\n    int i = (int) arg;\n\n    Sleep(i * 100);\n\n    pthread_exit(arg);\n\n    /* Never reached. */\n    exit(1);\n}\n\nint\nmain(int argc, char * argv[])\n{\n\tpthread_t id[4];\n\tint i;\n\tint result;\n\n\t/* Create a few threads and then exit. */\n\tfor (i = 0; i < 4; i++)\n\t  {\n\t    assert(pthread_create(&id[i], NULL, func, (void *) i) == 0);\n\t  }\n\n\t/* Some threads will finish before they are joined, some after. */\n\tSleep(2 * 100 + 50);\n\n\tfor (i = 0; i < 4; i++)\n\t  {\n\t    assert(pthread_join(id[i], (void **) &result) == 0);\n\t    assert(result == i);\n\t  }\n\n\t/* Success. */\n\treturn 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/join2.c",
    "content": "/*\n * Test for pthread_join() returning return value from threads.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions: pthread_create().\n */\n\n#include \"test.h\"\n\nvoid *\nfunc(void * arg)\n{\n\tSleep(1000);\n\treturn arg;\n}\n\nint\nmain(int argc, char * argv[])\n{\n\tpthread_t id[4];\n\tint i;\n\tint result;\n\n\t/* Create a few threads and then exit. */\n\tfor (i = 0; i < 4; i++)\n\t  {\n\t    assert(pthread_create(&id[i], NULL, func, (void *) i) == 0);\n\t  }\n\n\tfor (i = 0; i < 4; i++)\n\t  {\n\t    assert(pthread_join(id[i], (void **) &result) == 0);\n\t    assert(result == i);\n\t  }\n\n\t/* Success. */\n\treturn 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/join3.c",
    "content": "/*\n * Test for pthread_join() returning return value from threads.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Depends on API functions: pthread_create().\n */\n\n#include \"test.h\"\n\nvoid *\nfunc(void * arg)\n{\n\tsched_yield();\n\treturn arg;\n}\n\nint\nmain(int argc, char * argv[])\n{\n\tpthread_t id[4];\n\tint i;\n\tint result;\n\n\t/* Create a few threads and then exit. */\n\tfor (i = 0; i < 4; i++)\n\t  {\n\t    assert(pthread_create(&id[i], NULL, func, (void *) i) == 0);\n\t  }\n\n\t/*\n\t * Let threads exit before we join them.\n\t * We should still retrieve the exit code for the threads.\n\t */\n\tSleep(1000);\n\n\tfor (i = 0; i < 4; i++)\n\t  {\n\t    assert(pthread_join(id[i], (void **) &result) == 0);\n\t    assert(result == i);\n\t  }\n\n\t/* Success. */\n\treturn 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/kill1.c",
    "content": "/*\n * File: kill1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - pthread_kill() does not support non zero signals..\n *\n * Test Method (Validation or Falsification):\n * -\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * -\n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n\nint\nmain()\n{\n  assert(pthread_kill(pthread_self(), 1) == EINVAL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/loadfree.c",
    "content": "/*\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n * From: Todd Owen <towen@lucidcalm.dropbear.id.au>\n * To: pthreads-win32@sourceware.cygnus.com\n * Subject: invalid page fault when using LoadLibrary/FreeLibrary\n * \n * hi,\n * for me, pthread.dll consistently causes an \"invalid page fault in\n * kernel32.dll\" when I load it \"explicitly\"...to be precise, loading (with\n * LoadLibrary) isn't a problem, it gives the error when I call FreeLibrary.\n * I guess that the dll's cleanup must be causing the error.\n * \n * Implicit linkage of the dll has never given me this problem.  Here's a\n * program (console application) that gives me the error.\n * \n * I compile with: mingw32 (gcc-2.95 release), with the MSVCRT add-on (not\n * that the compiler should make much difference in this case).\n * PTHREAD.DLL: is the precompiled 1999-11-02 one (I tried an older one as\n * well, with the same result).\n * \n * Fascinatingly, if you have your own dll (mycode.dll) which implicitly\n * loads pthread.dll, and then do LoadLibrary/FreeLibrary on _this_ dll, the\n * same thing happens.\n * \n */\n\n#include \"test.h\"\n\nint main() {\n  HINSTANCE hinst;\n\n  assert((hinst = LoadLibrary(\"pthread\")) != (HINSTANCE) 0);\n\n  Sleep(100);\n\n  FreeLibrary(hinst);\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/multiPCcaBetter.c",
    "content": "/* Session 7. multiPCca.c\t Lab 7-1\t\t\t*/\n/* Maintain a producer thread and several consumer threads\t*/\n/* The producer periodically creates checksummed data buffers, \t*/\n/* or \"message block\" which the consumers display as soon\t*/\n/* as possible. The conusmers read the NEXT complete\t \t*/\n/* set of data, and each consumer validates the data before\t*/\n/* before display.\t\t\t\t\t\t*/\n/* Consumers are created and cancelled on demand based\t\t*/\n/* user input.\t\t\t\t\t\t\t*/\n/* Usage: multiPCca maxconsumer \t\t\t\t*/\n\n#if defined (_MSC_VER)\n#include <windows.h>\n#define sleep(i) Sleep(i*1000)\n#endif\n#include <pthread.h>\n//#include \"errors.h\"\n//#include \"utility.h\"\n#include <stdio.h>\n#include <stdlib.h>\n#define DATA_SIZE 256\n\ntypedef struct msg_block_tag { /* Message block */\n\tpthread_mutex_t mguard;\t/* Guard the message block\t*/\n\tpthread_cond_t  mready; /* Message ready\t\t*/\n\tpthread_cond_t  mok;    /* Ok for the producer to produce */\n\tvolatile int f_ready;\n\tvolatile int f_stop;\n\t\t/* ready state flag; producer stopped flag\t*/\n\tvolatile int sequence; /* Message block sequence number\t*/\n\ttime_t timestamp;\n\tint checksum; /* Message contents checksum\t\t*/\n\tint data[DATA_SIZE]; /* Message Contents\t\t*/\n\n} msg_block_t;\n\n/* The invariant and condition variable predicates are:\t\t*/\n/*\tInvariant - \t\t\t\t\t \t*/\n/*\t  f_ready && data is valid\t\t\t\t*/\n/*\t   && checksum and timestamp are valid\t\t\t*/ \n/*\tCondition variable predicate\t\t\t\t*/\n/*\t  \tmready if and only if f_ready and a new message\t*/\n/*\t\thas just been generated\t\t\t\t*/\n\n\n/* Single message block, ready to fill with a new message \t*/\nstruct msg_block_tag mblock = { PTHREAD_MUTEX_INITIALIZER, \n\tPTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0, 0 }; \n\nvoid * produce (void *), * consume (void *);\nvoid message_fill (msg_block_t *);\nvoid message_display (int, msg_block_t *);\nstatic volatile int ShutDown = 0;\n\t\nint main (int argc, char * argv[])\n{\n\tint tstatus, nthread, ithread;\n\tint * f_consumer;    /* Array of flags to indicate corresponding thread exists */\n\tvoid *join_result;\n\tpthread_t *consume_t;\n\tchar command [10];\n\t\n\tif (argc != 2) {\n\t\tprintf (\"Usage: multiPCca maxconsumer\\n\");\n\t\treturn 1;\n\t}\n\t\n\tnthread = atoi(argv[1]);\n\tconsume_t = calloc (nthread, sizeof(pthread_t));\n\tf_consumer = (int *)calloc (nthread, sizeof(int));\n\t\n\twhile (!ShutDown) {\t\n\t\tprintf (\"Enter command: nc (new consumer), cc (cancel), \");\n\t\tprintf (\"pr (produce msg), sh (shutdown):\"); \n\t\tfflush (stdout);\n\t\tscanf (\"%s\", command);\n\t\tprintf (\"Command received: %s.\\n\", command); fflush (stdout);\n\t\tif (strcmp (command, \"nc\") == 0) { /* New consumer thread */\n\t\t\t/* Look for empty thread slot */\n\t\t\tfor (ithread = 0; ithread < nthread; ithread++) {\n\t\t\t\tif (!f_consumer[ithread]) break;\n\t\t\t}\n\t\t\tif (ithread >= nthread) {\n\t\t\t\tprintf (\"Maximum # consumers (%d) already exist\\n\", nthread);\n\t\t\t\tfflush (stdout);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\ttstatus = pthread_create (&consume_t[ithread], NULL, \n\t\t\t\t\t\t\t\t\t\tconsume, (void *)ithread);\n//\t\t\tif (tstatus != 0) \n//\t\t\t\terr_abort (tstatus, \"Cannot create consumer thread\");\n\t\t\tf_consumer[ithread] = 1;\n\t\t\tprintf (\"Consumer number %d created successfully.\\n\", ithread);\t\t\t\n\t\t\tfflush (stdout);\n\n\t\t} else if (strcmp (command, \"cc\") == 0) { /* cancel consumer thread */\n\t\t\tprintf (\"Enter consumer number: 0 to %d:\", nthread-1);\n\t\t\tfflush (stdout);\n\t\t\tscanf (\"%d\", &ithread);\n\t\t\tif (ithread < 0 || ithread >= nthread || !f_consumer[ithread]) {\n\t\t\t\tprintf (\"Thread %d does not exist.\\n\", ithread); fflush (stdout);\n\t\t\t\tfflush (stdout);\n\t\t\t} else {\n\t\t\t\tprintf (\"About to cancel thread # %d.\\n\", ithread); fflush (stdout);\n\t\t\t\ttstatus = pthread_cancel (consume_t[ithread]);\n\t\t\t\tprintf (\"Cancel status: %d. About to join thread # %d\\n\", tstatus, ithread); fflush (stdout);\n\t\t\t\ttstatus = pthread_join (consume_t[ithread], &join_result);\n\t\t\t\tprintf (\"Join status: %d after joining thread # %d. Result: %d\\n\", tstatus, ithread, (int) join_result); fflush (stdout);\n\t\t\t\tf_consumer[ithread] = 0;\n\t\t\t}\n\t\t\tcontinue;\n\n\t\t} else if (strcmp (command, \"pr\") == 0) { /* Produce a message */\n\t\t\tprintf (\"About to produce a new message.\\n\"); fflush (stdout);\n\t\t\tproduce(NULL);\n\t\t\t/* Note the race to prompt before/after message display */\n\t\t} else if (strcmp (command, \"sh\") == 0) { /* shutdown system */\n\t\t\tprintf (\"Shutdown command received\\n\");\n\t\t\tfor (ithread = 0; ithread < nthread; ithread++) \n\t\t\t\tprintf (\"Thread #: %d. Flag: %d.\\n\", ithread, f_consumer[ithread]);\n\n\t\t\tfflush (stdout);\n\t\t\tShutDown = 1; /* Cancel and join all running threads */\n\t\t\tfor (ithread = 0; ithread < nthread; ithread++) {\n\t\t\t\tprintf (\"Thread #: %d. Flag: %d.\\n\", ithread, f_consumer[ithread]);\n\t\t\t\tfflush (stdout);\n\t\t\t\tif (f_consumer[ithread]) {\n\t\t\t\t\tprintf (\"About to cancel consumer thread #: %d.\\n\", ithread);\n\t\t\t\t\tfflush (stdout);\n\t\t\t\t\ttstatus = pthread_cancel (consume_t[ithread]);\n\t\t\t\t\tif (tstatus != 0) \n\t\t\t\t\t\tprintf (\"Cannot cancel consumer thread %d\", ithread);\n\t\t\t\t\tprintf (\"About to join consumer thread #: %d.\\n\", ithread);\n\t\t\t\t\tfflush (stdout);\n\t\t\t\t\ttstatus = pthread_join (consume_t[ithread], &join_result);\n\t\t\t\t\tif (tstatus != 0 || join_result != PTHREAD_CANCELED) \n\t\t\t\t\t\tprintf (\"Error joining thread #: %d. tstatus: %d.\\n\",\n\t\t\t\t\t\t\t\tithread, tstatus);\n\t\t\t\t\tprintf (\"Joined consumer thread #: %d.\\n\", ithread);\n\t\t\t\t\tfflush (stdout);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tfflush (stdout);\n\t\t\tprintf (\"All consumer threads cancelled and joined.\\n\");\n\t\t\tfflush (stdout);\n\t\t\t\n\t\t} else { /* Illegal command */\n\t\t\tprintf (\"Illegal command. %s. Try again\\n\", command);\n\t\t\tfflush (stdout);\n\t\t}\n\t}\t\n\n\tfree (consume_t);\n\tprintf (\"Producer and consumer threads have terminated\\n\");\n\tfflush (stdout);\n\treturn 0;\n}\n\n\nvoid * produce (void *arg)\n/* Producer function.  Create new message when called, and notify consumers */\n/* The arg is there as this was derived from a thread function.             */\n{\n\tint tstatus = 1;\n\t/* Get the buffer, fill it,*/\n\t/* and inform all consumers with a broadcast\t\t*/\n\tprintf (\"Entering producer.\\n\"); fflush (stdout);\n\twhile (tstatus != 0) {\n\t\ttstatus = pthread_mutex_trylock (&mblock.mguard);\n\t\tprintf (\"Trylock status: %d\\n\", tstatus); fflush (stdout);\n\t\tif (tstatus != 0) sleep (1);\n\t}\n\tmessage_fill (&mblock);\n\tmblock.sequence++;\n\tmblock.f_ready = 1;\n\tpthread_cond_broadcast (&mblock.mready);\n\tprintf (\"Producer produced one message.\\n\"); fflush (stdout);\n\tpthread_mutex_unlock (&mblock.mguard);\n\treturn NULL;\n}\n\n/* Mutex cleanup handler used by the consumers */\nvoid free_mutex (void * arg)\n{\n\tint tstatus;\n\tprintf (\"Entering free_mutex cleanup handler.\\n\");\n\ttstatus = pthread_mutex_unlock ((pthread_mutex_t *)arg);\n\tprintf (\"Unlocked mutex. Status: %d\\n\", tstatus); fflush (stdout);\n}\n\n/* Cleanup handler for the consumer thread */\nvoid cancel_consumer (void * arg)\n{\n\tint ithread;\n\t\n\tithread = (int) arg;\n\tprintf (\"Thread number %d cancellation handler. Curently, does nothing.\\n\", ithread);\n\tfflush (stdout);\n}\n\nvoid *consume (void *arg)\n{\n\tint ithread, old_state, old_type;\n\tstruct timespec timeout;\n\ttimeout.tv_nsec = 0;\n\n\tithread = (int)arg;\n\n\tpthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &old_state);\n\tpthread_cleanup_push (cancel_consumer, (void *)ithread);\n\tpthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &old_type);\n\tpthread_setcancelstate (PTHREAD_CANCEL_ENABLE, &old_state);\n\t\n\t/* Consume the NEXT message  */\n\tdo { \n\t\tpthread_testcancel();\n\t\tpthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &old_state);\n\t\tpthread_mutex_lock (&mblock.mguard);\n\t\tpthread_cleanup_push (free_mutex, &mblock.mguard);\n\t\tpthread_setcancelstate (PTHREAD_CANCEL_ENABLE, &old_state);\n\t\tif (!mblock.f_stop) {\n\t\t\tdo {\t/* Wait for the NEXT message */\n\t\t\t\tpthread_testcancel();\n\t\t\t\tprintf (\"Thread #: %d about to wait for mready.\\n\", ithread);  fflush (stdout);\n\t\t\t\tpthread_cond_wait (&mblock.mready, &mblock.mguard);\n\t\t\t\tprintf (\"Thread #: %d after wait for mready.\\n\", ithread);  fflush (stdout);\n\t\t\t} while (!mblock.f_ready && !ShutDown);\n\t\t\tmessage_display (ithread, &mblock);\n\t\t\tpthread_testcancel();\n\t\t}\n\t\t/* Free the mutex through the free_mutex cleanup handler (a macro) */\n\t\tpthread_cleanup_pop (1);\n\t} while (!ShutDown);\n\tpthread_cleanup_pop(1);  /* NOTE: Try removing this!! Compiler error!\n\t\t\t\t\t\t\t    Why?? Because it's a macro                */\n\tprintf (\"Consumer number %d is shutting down\\n\", ithread);\n\tfflush (stdout);\n\treturn NULL;\t\t\n}\n\nvoid message_fill (msg_block_t *mblock)\n{\n\t/* Fill the message buffer, and include checksum and timestamp\t*/\n\t/* This function is called from the producer thread while it \t*/\n\t/* owns the message block mutex\t\t\t\t\t*/\n\t\n\tint i;\n\t\n\tmblock->checksum = 0;\t\n\tfor (i = 0; i < DATA_SIZE; i++) {\n\t\tmblock->data[i] = rand();\n\t\tmblock->checksum ^= mblock->data[i];\n\t}\n\tmblock->timestamp = time(NULL);\n\treturn;\n}\n\nvoid message_display (int ithread, msg_block_t *mblock)\n{\n\t/* Display message buffer and timestamp, validate checksum\t*/\n\t/* This function is called from the consumer thread while it \t*/\n\t/* owns the message block mutex\t\t\t\t\t*/\n\tint i, tcheck = 0;\n\t\n\tfor (i = 0; i < DATA_SIZE; i++) \n\t\ttcheck ^= mblock->data[i];\n\tprintf (\"\\nConsumer thread #: %d\\n\", ithread);\n\tprintf (\"Message number %d generated at: %s\", \n\t\tmblock->sequence, ctime (&(mblock->timestamp)));\n\tprintf (\"First and last entries: %x %x\\n\",\n\t\tmblock->data[0], mblock->data[DATA_SIZE-1]);\n\tfflush (stdout);\n\tif (tcheck == mblock->checksum)\n\t\tprintf (\"GOOD ->Checksum was validated.\\n\");\n\telse\n\t\tprintf (\"BAD  ->Checksum failed. message was corrupted\\n\");\n\tfflush (stdout);\t\n\treturn;\n\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex1.c",
    "content": "/* \n * mutex1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Create a simple mutex object, lock it, and then unlock it again.\n * This is the simplest test of the pthread mutex family that we can do.\n *\n * Depends on API functions:\n * \tpthread_mutex_init()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n *\tpthread_mutex_destroy()\n */\n\n#include \"test.h\"\n\npthread_mutex_t mutex = NULL;\n\nint\nmain()\n{\n  assert(mutex == NULL);\n\n  assert(pthread_mutex_init(&mutex, NULL) == 0);\n\n  assert(mutex != NULL);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  assert(mutex == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex1e.c",
    "content": "/* \n * mutex1e.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * As for mutex1.c but with type set to PTHREAD_MUTEX_ERRORCHECK.\n *\n * Create a simple mutex object, lock it, unlock it, then destroy it.\n * This is the simplest test of the pthread mutex family that we can do.\n *\n * Depends on API functions:\n *\tpthread_mutexattr_settype()\n * \tpthread_mutex_init()\n *\tpthread_mutex_destroy()\n */\n\n#include \"test.h\"\n\npthread_mutex_t mutex = NULL;\npthread_mutexattr_t mxAttr;\n\nint\nmain()\n{\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_ERRORCHECK) == 0);\n\n  assert(mutex == NULL);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(mutex != NULL);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  assert(mutex == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex1n.c",
    "content": "/* \n * mutex1n.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * As for mutex1.c but with type set to PTHREAD_MUTEX_NORMAL.\n *\n * Create a simple mutex object, lock it, unlock it, then destroy it.\n * This is the simplest test of the pthread mutex family that we can do.\n *\n * Depends on API functions:\n *\tpthread_mutexattr_settype()\n * \tpthread_mutex_init()\n *\tpthread_mutex_destroy()\n */\n\n#include \"test.h\"\n\npthread_mutex_t mutex = NULL;\npthread_mutexattr_t mxAttr;\n\nint\nmain()\n{\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_NORMAL) == 0);\n\n  assert(mutex == NULL);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(mutex != NULL);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  assert(mutex == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex1r.c",
    "content": "/* \n * mutex1r.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * As for mutex1.c but with type set to PTHREAD_MUTEX_RECURSIVE.\n *\n * Create a simple mutex object, lock it, unlock it, then destroy it.\n * This is the simplest test of the pthread mutex family that we can do.\n *\n * Depends on API functions:\n *\tpthread_mutexattr_settype()\n * \tpthread_mutex_init()\n *\tpthread_mutex_destroy()\n */\n\n#include \"test.h\"\n\npthread_mutex_t mutex = NULL;\npthread_mutexattr_t mxAttr;\n\nint\nmain()\n{\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_RECURSIVE) == 0);\n\n  assert(mutex == NULL);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(mutex != NULL);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  assert(mutex == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex2.c",
    "content": "/* \n * mutex2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static mutex object, lock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n \npthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;\n\nint\nmain()\n{\n  assert(mutex == PTHREAD_MUTEX_INITIALIZER);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(mutex != PTHREAD_MUTEX_INITIALIZER);\n\n  assert(mutex != NULL);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  assert(mutex == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex2e.c",
    "content": "/* \n * mutex2e.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static mutex object, lock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n \npthread_mutex_t mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER;\n\nint\nmain()\n{\n  assert(mutex == PTHREAD_ERRORCHECK_MUTEX_INITIALIZER);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(mutex != PTHREAD_ERRORCHECK_MUTEX_INITIALIZER);\n\n  assert(mutex != NULL);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  assert(mutex == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex2r.c",
    "content": "/* \n * mutex2r.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static mutex object, lock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n \npthread_mutex_t mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;\n\nint\nmain()\n{\n  assert(mutex == PTHREAD_RECURSIVE_MUTEX_INITIALIZER);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(mutex != PTHREAD_RECURSIVE_MUTEX_INITIALIZER);\n\n  assert(mutex != NULL);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  assert(mutex == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex3.c",
    "content": "/* \n * mutex3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static mutex object, lock it, trylock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_trylock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n \npthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_mutex_trylock(&mutex1) == EBUSY);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_mutex_lock(&mutex1) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n  assert(pthread_join(t, NULL) == 0);\n\n  assert(pthread_mutex_unlock(&mutex1) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex3e.c",
    "content": "/* \n * mutex3e.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static mutex object, lock it, trylock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_trylock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n \npthread_mutex_t mutex1 = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_mutex_trylock(&mutex1) == EBUSY);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_mutex_lock(&mutex1) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n  assert(pthread_join(t, NULL) == 0);\n\n  assert(pthread_mutex_unlock(&mutex1) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex3r.c",
    "content": "/* \n * mutex3r.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static mutex object, lock it, trylock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_trylock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n \npthread_mutex_t mutex1 = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_mutex_trylock(&mutex1) == EBUSY);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_mutex_lock(&mutex1) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n  assert(pthread_join(t, NULL) == 0);\n\n  assert(pthread_mutex_unlock(&mutex1) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex4.c",
    "content": "/* \n * mutex4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Thread A locks mutex - thread B tries to unlock.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_trylock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int wasHere = 0;\n\nstatic pthread_mutex_t mutex1;\n \nvoid * unlocker(void * arg)\n{\n  int expectedResult = (int) arg;\n\n  wasHere++;\n  assert(pthread_mutex_unlock(&mutex1) == expectedResult);\n  wasHere++;\n  return NULL;\n}\n \nint\nmain()\n{\n  pthread_t t;\n  pthread_mutexattr_t ma;\n\n  assert(pthread_mutexattr_init(&ma) == 0);\n\n  wasHere = 0;\n  assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_DEFAULT) == 0);\n  assert(pthread_mutex_init(&mutex1, &ma) == 0);\n  assert(pthread_mutex_lock(&mutex1) == 0);\n  /*\n   * NORMAL (fast) mutexes don't check ownership.\n   */\n  assert(pthread_create(&t, NULL, unlocker, (void *) 0) == 0);\n  assert(pthread_join(t, NULL) == 0);\n  assert(pthread_mutex_unlock(&mutex1) == EPERM);\n  assert(wasHere == 2);\n\n  wasHere = 0;\n  assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_NORMAL) == 0);\n  assert(pthread_mutex_init(&mutex1, &ma) == 0);\n  assert(pthread_mutex_lock(&mutex1) == 0);\n  /*\n   * NORMAL (fast) mutexes don't check ownership.\n   */\n  assert(pthread_create(&t, NULL, unlocker, (void *) 0) == 0);\n  assert(pthread_join(t, NULL) == 0);\n  assert(pthread_mutex_unlock(&mutex1) == EPERM);\n  assert(wasHere == 2);\n\n  wasHere = 0;\n  assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_ERRORCHECK) == 0);\n  assert(pthread_mutex_init(&mutex1, &ma) == 0);\n  assert(pthread_mutex_lock(&mutex1) == 0);\n  assert(pthread_create(&t, NULL, unlocker, (void *) EPERM) == 0);\n  assert(pthread_join(t, NULL) == 0);\n  assert(pthread_mutex_unlock(&mutex1) == 0);\n  assert(wasHere == 2);\n\n  wasHere = 0;\n  assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE) == 0);\n  assert(pthread_mutex_init(&mutex1, &ma) == 0);\n  assert(pthread_mutex_lock(&mutex1) == 0);\n  assert(pthread_create(&t, NULL, unlocker, (void *) EPERM) == 0);\n  assert(pthread_join(t, NULL) == 0);\n  assert(pthread_mutex_unlock(&mutex1) == 0);\n  assert(wasHere == 2);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex5.c",
    "content": "/* \n * mutex5.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Confirm the equality/inequality of the various mutex types,\n * and the default not-set value.\n */\n\n#include \"test.h\"\n\nstatic pthread_mutexattr_t mxAttr;\n\n/* Prevent optimiser from removing dead or obvious asserts. */\nint _optimiseFoil;\n#define FOIL(x) (_optimiseFoil = x)\n\nint\nmain()\n{\n  int mxType = -1;\n\n  assert(FOIL(PTHREAD_MUTEX_DEFAULT) == PTHREAD_MUTEX_NORMAL);\n  assert(FOIL(PTHREAD_MUTEX_DEFAULT) != PTHREAD_MUTEX_ERRORCHECK);\n  assert(FOIL(PTHREAD_MUTEX_DEFAULT) != PTHREAD_MUTEX_RECURSIVE);\n  assert(FOIL(PTHREAD_MUTEX_RECURSIVE) != PTHREAD_MUTEX_ERRORCHECK);\n\n  assert(FOIL(PTHREAD_MUTEX_NORMAL) == PTHREAD_MUTEX_FAST_NP);\n  assert(FOIL(PTHREAD_MUTEX_RECURSIVE) == PTHREAD_MUTEX_RECURSIVE_NP);\n  assert(FOIL(PTHREAD_MUTEX_ERRORCHECK) == PTHREAD_MUTEX_ERRORCHECK_NP);\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_NORMAL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex6.c",
    "content": "/* \n * mutex6.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test the default (type not set) mutex type.\n * Should be the same as PTHREAD_MUTEX_NORMAL.\n * Thread locks mutex twice (recursive lock).\n * Locking thread should deadlock on second attempt.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_trylock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n\n  /* Should wait here (deadlocked) */\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return 0;\n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_mutex_init(&mutex, NULL) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  Sleep(1000);\n\n  assert(lockCount == 1);\n\n  /*\n   * Should succeed even though we don't own the lock\n   * because FAST mutexes don't check ownership.\n   */\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  Sleep (1000);\n\n  assert(lockCount == 2);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex6e.c",
    "content": "/* \n * mutex6e.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_ERRORCHECK mutex type.\n * Thread locks mutex twice (recursive lock).\n * This should fail with an EDEADLK error.\n * The second unlock attempt should fail with an EPERM error.\n *\n * Depends on API functions: \n *      pthread_create()\n *      pthread_join()\n *      pthread_mutexattr_init()\n *      pthread_mutexattr_destroy()\n *      pthread_mutexattr_settype()\n *      pthread_mutexattr_gettype()\n *      pthread_mutex_init()\n *      pthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\nstatic pthread_mutexattr_t mxAttr;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_lock(&mutex) == EDEADLK);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n  assert(pthread_mutex_unlock(&mutex) == EPERM);\n\n  return (void *) 555;\n}\n \nint\nmain()\n{\n  pthread_t t;\n  int result = 0;\n  int mxType = -1;\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_ERRORCHECK) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_ERRORCHECK);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  assert(pthread_join(t, (void **) &result) == 0);\n  assert(result == 555);\n\n  assert(lockCount == 2);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n  assert(pthread_mutexattr_destroy(&mxAttr) == 0);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex6es.c",
    "content": "/* \n * mutex6es.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_ERRORCHECK static mutex type.\n * Thread locks mutex twice (recursive lock).\n * This should fail with an EDEADLK error.\n * The second unlock attempt should fail with an EPERM error.\n *\n * Depends on API functions: \n *      pthread_create()\n *      pthread_join()\n *      pthread_mutexattr_init()\n *      pthread_mutexattr_destroy()\n *      pthread_mutexattr_settype()\n *      pthread_mutexattr_gettype()\n *      pthread_mutex_init()\n *      pthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_lock(&mutex) == EDEADLK);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n  assert(pthread_mutex_unlock(&mutex) == EPERM);\n\n  return (void *) 555;\n}\n \nint\nmain()\n{\n  pthread_t t;\n  int result = 0;\n\n  assert(mutex == PTHREAD_ERRORCHECK_MUTEX_INITIALIZER);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  assert(pthread_join(t, (void **) &result) == 0);\n  assert(result == 555);\n\n  assert(lockCount == 2);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex6n.c",
    "content": "/* \n * mutex6n.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_NORMAL mutex type.\n * Thread locks mutex twice (recursive lock).\n * The thread should deadlock.\n *\n * Depends on API functions: \n *      pthread_create()\n *      pthread_mutexattr_init()\n *      pthread_mutexattr_settype()\n *      pthread_mutexattr_gettype()\n *      pthread_mutex_init()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\nstatic pthread_mutexattr_t mxAttr;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n\n  /* Should wait here (deadlocked) */\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return (void *) 555;\n}\n \nint\nmain()\n{\n  pthread_t t;\n  int mxType = -1;\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_NORMAL) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_NORMAL);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  Sleep(1000);\n\n  assert(lockCount == 1);\n\n  /*\n   * Should succeed even though we don't own the lock\n   * because FAST mutexes don't check ownership.\n   */\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  Sleep (1000);\n\n  assert(lockCount == 2);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex6r.c",
    "content": "/* \n * mutex6r.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_RECURSIVE mutex type.\n * Thread locks mutex twice (recursive lock).\n * Both locks and unlocks should succeed.\n *\n * Depends on API functions: \n *      pthread_create()\n *      pthread_join()\n *      pthread_mutexattr_init()\n *      pthread_mutexattr_destroy()\n *      pthread_mutexattr_settype()\n *      pthread_mutexattr_gettype()\n *      pthread_mutex_init()\n *      pthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\nstatic pthread_mutexattr_t mxAttr;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return (void *) 555;\n}\n \nint\nmain()\n{\n  pthread_t t;\n  int result = 0;\n  int mxType = -1;\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_RECURSIVE) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_RECURSIVE);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  assert(pthread_join(t, (void **) &result) == 0);\n  assert(result == 555);\n\n  assert(lockCount == 2);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n  assert(pthread_mutexattr_destroy(&mxAttr) == 0);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex6rs.c",
    "content": "/* \n * mutex6rs.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_RECURSIVE static mutex type.\n * Thread locks mutex twice (recursive lock).\n * Both locks and unlocks should succeed.\n *\n * Depends on API functions: \n *      pthread_create()\n *      pthread_join()\n *      pthread_mutexattr_init()\n *      pthread_mutexattr_destroy()\n *      pthread_mutexattr_settype()\n *      pthread_mutexattr_gettype()\n *      pthread_mutex_init()\n *      pthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return (void *) 555;\n}\n \nint\nmain()\n{\n  pthread_t t;\n  int result = 0;\n\n  assert(mutex == PTHREAD_RECURSIVE_MUTEX_INITIALIZER);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  assert(pthread_join(t, (void **) &result) == 0);\n  assert(result == 555);\n\n  assert(lockCount == 2);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex6s.c",
    "content": "/* \n * mutex6s.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test the default (type not set) static mutex type.\n * Should be the same as PTHREAD_MUTEX_NORMAL.\n * Thread locks mutex twice (recursive lock).\n * Locking thread should deadlock on second attempt.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_trylock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n\n  /* Should wait here (deadlocked) */\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return 0;\n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(mutex == PTHREAD_MUTEX_INITIALIZER);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  Sleep(1000);\n\n  assert(lockCount == 1);\n\n  /*\n   * Should succeed even though we don't own the lock\n   * because FAST mutexes don't check ownership.\n   */\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  Sleep (1000);\n\n  assert(lockCount == 2);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex7.c",
    "content": "/* \n * mutex7.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test the default (type not set) mutex type.\n * Should be the same as PTHREAD_MUTEX_NORMAL.\n * Thread locks then trylocks mutex (attempted recursive lock).\n * The thread should lock first time and EBUSY second time.\n *\n * Depends on API functions: \n *\tpthread_mutex_lock()\n *\tpthread_mutex_trylock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_trylock(&mutex) == EBUSY);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n  assert(pthread_mutex_unlock(&mutex) == EPERM);\n\n  return 0;\n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_mutex_init(&mutex, NULL) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  Sleep(1000);\n\n  assert(lockCount == 2);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex7e.c",
    "content": "/* \n * mutex7e.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_ERRORCHECK mutex type.\n * Thread locks and then trylocks mutex (attempted recursive lock).\n * Trylock should fail with an EBUSY error.\n * The second unlock attempt should fail with an EPERM error.\n *\n * Depends on API functions: \n *      pthread_create()\n *      pthread_join()\n *      pthread_mutexattr_init()\n *      pthread_mutexattr_destroy()\n *      pthread_mutexattr_settype()\n *      pthread_mutexattr_gettype()\n *      pthread_mutex_init()\n *      pthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\nstatic pthread_mutexattr_t mxAttr;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_trylock(&mutex) == EBUSY);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n  assert(pthread_mutex_unlock(&mutex) == EPERM);\n\n  return (void *) 555;\n}\n \nint\nmain()\n{\n  pthread_t t;\n  int result = 0;\n  int mxType = -1;\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_ERRORCHECK) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_ERRORCHECK);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  assert(pthread_join(t, (void **) &result) == 0);\n  assert(result == 555);\n\n  assert(lockCount == 2);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n  assert(pthread_mutexattr_destroy(&mxAttr) == 0);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex7n.c",
    "content": "/* \n * mutex7n.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_NORMAL mutex type.\n * Thread locks then trylocks mutex (attempted recursive lock).\n * The thread should lock first time and EBUSY second time.\n *\n * Depends on API functions: \n *      pthread_create()\n *      pthread_mutexattr_init()\n *      pthread_mutexattr_settype()\n *      pthread_mutexattr_gettype()\n *      pthread_mutex_init()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\nstatic pthread_mutexattr_t mxAttr;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_trylock(&mutex) == EBUSY);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n  assert(pthread_mutex_unlock(&mutex) == EPERM);\n\n  return (void *) 555;\n}\n \nint\nmain()\n{\n  pthread_t t;\n  int mxType = -1;\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_NORMAL) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_NORMAL);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  Sleep(1000);\n\n  assert(lockCount == 2);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex7r.c",
    "content": "/* \n * mutex7r.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_RECURSIVE mutex type.\n * Thread locks mutex then trylocks mutex (recursive lock twice).\n * Both locks and unlocks should succeed.\n *\n * Depends on API functions: \n *      pthread_create()\n *      pthread_join()\n *      pthread_mutexattr_init()\n *      pthread_mutexattr_destroy()\n *      pthread_mutexattr_settype()\n *      pthread_mutexattr_gettype()\n *      pthread_mutex_init()\n *      pthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\nstatic pthread_mutexattr_t mxAttr;\n\nvoid * locker(void * arg)\n{\n  assert(pthread_mutex_lock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_trylock(&mutex) == 0);\n  lockCount++;\n  assert(pthread_mutex_unlock(&mutex) == 0);\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return (void *) 555;\n}\n \nint\nmain()\n{\n  pthread_t t;\n  int result = 0;\n  int mxType = -1;\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_RECURSIVE) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_RECURSIVE);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  assert(pthread_join(t, (void **) &result) == 0);\n  assert(result == 555);\n\n  assert(lockCount == 2);\n\n  assert(pthread_mutex_destroy(&mutex) == 0);\n  assert(pthread_mutexattr_destroy(&mxAttr) == 0);\n\n  exit(0);\n\n  /* Never reached */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex8.c",
    "content": "/* \n * mutex8.c\n *\n *\n * Pthreads-win32 - POSIX Threads Library for Win32\n * Copyright (C) 1998 Ben Elliston and Ross Johnson\n * Copyright (C) 1999,2000,2001 Ross Johnson\n *\n * Contact Email: rpj@ise.canberra.edu.au\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n *\n * --------------------------------------------------------------------------\n *\n * Test the default (type not set) mutex type exercising timedlock.\n * Thread locks mutex, another thread timedlocks the mutex.\n * Timed thread should timeout.\n *\n * Depends on API functions:\n *\tpthread_mutex_lock()\n *\tpthread_mutex_timedlock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\n\nvoid * locker(void * arg)\n{\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  assert(pthread_mutex_timedlock(&mutex, &abstime) == ETIMEDOUT);\n\n  lockCount++;\n\n  return 0;\n}\n\nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_mutex_init(&mutex, NULL) == 0);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(lockCount == 1);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex8e.c",
    "content": "/* \n * mutex8e.c\n *\n *\n * Pthreads-win32 - POSIX Threads Library for Win32\n * Copyright (C) 1998 Ben Elliston and Ross Johnson\n * Copyright (C) 1999,2000,2001 Ross Johnson\n *\n * Contact Email: rpj@ise.canberra.edu.au\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_ERRORCHECK mutex type exercising timedlock.\n * Thread locks mutex, another thread timedlocks the mutex.\n * Timed thread should timeout.\n *\n * Depends on API functions:\n *\tpthread_create()\n *\tpthread_mutexattr_init()\n *\tpthread_mutexattr_destroy()\n *\tpthread_mutexattr_settype()\n *\tpthread_mutexattr_gettype()\n *\tpthread_mutex_init()\n *\tpthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_timedlock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\nstatic pthread_mutexattr_t mxAttr;\n\nvoid * locker(void * arg)\n{\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  assert(pthread_mutex_timedlock(&mutex, &abstime) == ETIMEDOUT);\n\n  lockCount++;\n\n  return 0;\n}\n\nint\nmain()\n{\n  pthread_t t;\n  int mxType = -1;\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_ERRORCHECK) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_ERRORCHECK);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(lockCount == 1);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex8n.c",
    "content": "/*\n * mutex8n.c\n *\n *\n * Pthreads-win32 - POSIX Threads Library for Win32\n * Copyright (C) 1998 Ben Elliston and Ross Johnson\n * Copyright (C) 1999,2000,2001 Ross Johnson\n *\n * Contact Email: rpj@ise.canberra.edu.au\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_NORMAL mutex type exercising timedlock.\n * Thread locks mutex, another thread timedlocks the mutex.\n * Timed thread should timeout.\n *\n * Depends on API functions:\n *\tpthread_create()\n *\tpthread_mutexattr_init()\n *\tpthread_mutexattr_destroy()\n *\tpthread_mutexattr_settype()\n *\tpthread_mutexattr_gettype()\n *\tpthread_mutex_init()\n *\tpthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_timedlock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\nstatic pthread_mutexattr_t mxAttr;\n\nvoid * locker(void * arg)\n{\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  assert(pthread_mutex_timedlock(&mutex, &abstime) == ETIMEDOUT);\n\n  lockCount++;\n\n  return 0;\n}\n\nint\nmain()\n{\n  pthread_t t;\n  int mxType = -1;\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_NORMAL) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_NORMAL);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(lockCount == 1);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/mutex8r.c",
    "content": "/* \n * mutex8r.c\n *\n *\n * Pthreads-win32 - POSIX Threads Library for Win32\n * Copyright (C) 1998 Ben Elliston and Ross Johnson\n * Copyright (C) 1999,2000,2001 Ross Johnson\n *\n * Contact Email: rpj@ise.canberra.edu.au\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n *\n * --------------------------------------------------------------------------\n *\n * Tests PTHREAD_MUTEX_RECURSIVE mutex type exercising timedlock.\n * Thread locks mutex, another thread timedlocks the mutex.\n * Timed thread should timeout.\n *\n * Depends on API functions:\n *\tpthread_create()\n *\tpthread_mutexattr_init()\n *\tpthread_mutexattr_destroy()\n *\tpthread_mutexattr_settype()\n *\tpthread_mutexattr_gettype()\n *\tpthread_mutex_init()\n *\tpthread_mutex_destroy()\n *\tpthread_mutex_lock()\n *\tpthread_mutex_timedlock()\n *\tpthread_mutex_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic int lockCount = 0;\n\nstatic pthread_mutex_t mutex;\nstatic pthread_mutexattr_t mxAttr;\n\nvoid * locker(void * arg)\n{\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  assert(pthread_mutex_timedlock(&mutex, &abstime) == ETIMEDOUT);\n\n  lockCount++;\n\n  return 0;\n}\n\nint\nmain()\n{\n  pthread_t t;\n  int mxType = -1;\n\n  assert(pthread_mutexattr_init(&mxAttr) == 0);\n  assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_RECURSIVE) == 0);\n  assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n  assert(mxType == PTHREAD_MUTEX_RECURSIVE);\n\n  assert(pthread_mutex_init(&mutex, &mxAttr) == 0);\n\n  assert(pthread_mutex_lock(&mutex) == 0);\n\n  assert(pthread_create(&t, NULL, locker, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(lockCount == 1);\n\n  assert(pthread_mutex_unlock(&mutex) == 0);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/once1.c",
    "content": "/*\n * once1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Create a static pthread_once and test that it calls myfunc once.\n *\n * Depends on API functions:\n *\tpthread_once()\n *\tpthread_create()\n */\n\n#include \"test.h\"\n\npthread_once_t once = PTHREAD_ONCE_INIT;\n\nstatic int washere = 0;\n\nvoid\nmyfunc(void)\n{\n  washere++;\n}\n\nvoid *\nmythread(void * arg)\n{\n   assert(pthread_once(&once, myfunc) == 0);\n\n   return 0;\n}\n\nint\nmain()\n{\n  pthread_t t1, t2;\n  \n  assert(pthread_create(&t1, NULL, mythread, NULL) == 0);\n\n  assert(pthread_create(&t2, NULL, mythread, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/once2.c",
    "content": "/*\n * once2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Create several static pthread_once objects and channel several threads\n * through each.\n *\n * Depends on API functions:\n *\tpthread_once()\n *\tpthread_create()\n */\n\n#include \"test.h\"\n\n#define NUM_THREADS 100 /* Targeting each once control */\n#define NUM_ONCE    10\n\npthread_once_t o = PTHREAD_ONCE_INIT;\npthread_once_t once[NUM_ONCE];\n\ntypedef struct {\n  int i;\n  CRITICAL_SECTION cs;\n} sharedInt_t;\n\nstatic sharedInt_t numOnce = {0, {0}};\nstatic sharedInt_t numThreads = {0, {0}};\n\nvoid\nmyfunc(void)\n{\n  EnterCriticalSection(&numOnce.cs);\n  numOnce.i++;\n  LeaveCriticalSection(&numOnce.cs);\n  /* Simulate slow once routine so that following threads pile up behind it */\n  Sleep(100);\n}\n\nvoid *\nmythread(void * arg)\n{\n   assert(pthread_once(&once[(int) arg], myfunc) == 0);\n   EnterCriticalSection(&numThreads.cs);\n   numThreads.i++;   \n   LeaveCriticalSection(&numThreads.cs);\n   return 0;\n}\n\nint\nmain()\n{\n  pthread_t t[NUM_THREADS][NUM_ONCE];\n  int i, j;\n  \n  InitializeCriticalSection(&numThreads.cs);\n  InitializeCriticalSection(&numOnce.cs);\n\n  for (j = 0; j < NUM_ONCE; j++)\n    {\n      once[j] = o;\n\n      for (i = 0; i < NUM_THREADS; i++)\n        assert(pthread_create(&t[i][j], NULL, mythread, (void *) j) == 0);\n    }\n\n  for (j = 0; j < NUM_ONCE; j++)\n    for (i = 0; i < NUM_THREADS; i++)\n      if (pthread_join(t[i][j], NULL) != 0)\n        printf(\"Join failed for [thread,once] = [%d,%d]\\n\", i, j);\n\n  assert(numOnce.i == NUM_ONCE);\n  assert(numThreads.i == NUM_THREADS * NUM_ONCE);\n\n  DeleteCriticalSection(&numOnce.cs);\n  DeleteCriticalSection(&numThreads.cs);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/once3.c",
    "content": "/*\n * once3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Create several pthread_once objects and channel several threads\n * through each. Make the init_routine cancelable and cancel them with\n * waiters waiting.\n *\n * Depends on API functions:\n *\tpthread_once()\n *\tpthread_create()\n *      pthread_testcancel()\n *      pthread_cancel()\n *      pthread_once()\n */\n\n#define ASSERT_TRACE\n\n#include \"test.h\"\n\n#define NUM_THREADS 100 /* Targeting each once control */\n#define NUM_ONCE    10\n\npthread_once_t o = PTHREAD_ONCE_INIT;\npthread_once_t once[NUM_ONCE];\n\ntypedef struct {\n  int i;\n  CRITICAL_SECTION cs;\n} sharedInt_t;\n\nstatic sharedInt_t numOnce = {0, {0}};\nstatic sharedInt_t numThreads = {0, {0}};\n\nvoid\nmyfunc(void)\n{\n  EnterCriticalSection(&numOnce.cs);\n  numOnce.i++;\n  assert(numOnce.i > 0);\n  LeaveCriticalSection(&numOnce.cs);\n  /* Simulate slow once routine so that following threads pile up behind it */\n  Sleep(10);\n  /* test for cancelation late so we're sure to have waiters. */\n  pthread_testcancel();\n}\n\nvoid *\nmythread(void * arg)\n{\n  /*\n   * Cancel every thread. These threads are deferred cancelable only, so\n   * only the thread performing the once routine (my_func) will see it (there are\n   * no other cancelation points here). The result will be that every thread\n   * eventually cancels only when it becomes the new once thread.\n   */\n  assert(pthread_cancel(pthread_self()) == 0);\n  assert(pthread_once(&once[(int) arg], myfunc) == 0);\n  EnterCriticalSection(&numThreads.cs);\n  numThreads.i++;\n  LeaveCriticalSection(&numThreads.cs);\n  return 0;\n}\n\nint\nmain()\n{\n  pthread_t t[NUM_THREADS][NUM_ONCE];\n  int i, j;\n  \n  InitializeCriticalSection(&numThreads.cs);\n  InitializeCriticalSection(&numOnce.cs);\n\n  for (j = 0; j < NUM_ONCE; j++)\n    {\n      once[j] = o;\n\n      for (i = 0; i < NUM_THREADS; i++)\n        {\n          assert(pthread_create(&t[i][j], NULL, mythread, (void *) j) == 0);\n        }\n    }\n\n  for (j = 0; j < NUM_ONCE; j++)\n    for (i = 0; i < NUM_THREADS; i++)\n      if (pthread_join(t[i][j], NULL) != 0)\n        printf(\"Join failed for [thread,once] = [%d,%d]\\n\", i, j);\n\n  /*\n   * All threads will cancel, none will return normally from\n   * pthread_once and so numThreads should never be incremented. However,\n   * numOnce should be incremented by every thread (NUM_THREADS*NUM_ONCE).\n   */\n  assert(numOnce.i == NUM_ONCE * NUM_THREADS);\n  assert(numThreads.i == 0);\n\n  DeleteCriticalSection(&numOnce.cs);\n  DeleteCriticalSection(&numThreads.cs);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/once4.c",
    "content": "/*\n * once4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Create several pthread_once objects and channel several threads\n * through each. Make the init_routine cancelable and cancel them\n * waiters waiting. Vary the priorities.\n *\n * Depends on API functions:\n *\tpthread_once()\n *\tpthread_create()\n *      pthread_testcancel()\n *      pthread_cancel()\n *      pthread_once()\n */\n\n#include \"test.h\"\n\n#define NUM_THREADS 100 /* Targeting each once control */\n#define NUM_ONCE    10\n\npthread_once_t o = PTHREAD_ONCE_INIT;\npthread_once_t once[NUM_ONCE];\n\ntypedef struct {\n  int i;\n  CRITICAL_SECTION cs;\n} sharedInt_t;\n\nstatic sharedInt_t numOnce = {0, {0}};\nstatic sharedInt_t numThreads = {0, {0}};\n\ntypedef struct {\n  int threadnum;\n  int oncenum;\n  int myPrio;\n  HANDLE w32Thread;\n} bag_t;\n\nstatic bag_t threadbag[NUM_THREADS][NUM_ONCE];\n\nCRITICAL_SECTION print_lock;\n\nvoid\nmycleanupfunc(void * arg)\n{\n  bag_t * bag = (bag_t *) arg;\n  EnterCriticalSection(&print_lock);\n  /*      once thrd  prio error */\n  printf(\"%4d %4d %4d %4d\\n\",\n\t bag->oncenum,\n\t bag->threadnum,\n\t bag->myPrio,\n\t bag->myPrio - GetThreadPriority(bag->w32Thread));\n  LeaveCriticalSection(&print_lock);\n}\n\nvoid\nmyinitfunc(void)\n{\n  EnterCriticalSection(&numOnce.cs);\n  numOnce.i++;\n  LeaveCriticalSection(&numOnce.cs);\n  /* Simulate slow once routine so that following threads pile up behind it */\n  Sleep(10);\n  /* test for cancelation late so we're sure to have waiters. */\n  pthread_testcancel();\n}\n\nvoid *\nmythread(void * arg)\n{\n  bag_t * bag = (bag_t *) arg;\n  struct sched_param param;\n\n  /*\n   * Cancel every thread. These threads are deferred cancelable only, so\n   * only the thread performing the init_routine will see it (there are\n   * no other cancelation points here). The result will be that every thread\n   * eventually cancels only when it becomes the new initter.\n   */\n  pthread_t self = pthread_self();\n  bag->w32Thread = pthread_getw32threadhandle_np(self);\n  /*\n   * Set priority between -2 and 2 inclusive.\n   */\n  bag->myPrio = (bag->threadnum % 5) - 2;\n  param.sched_priority = bag->myPrio;\n  pthread_setschedparam(self, SCHED_OTHER, &param);\n\n  /* Trigger a cancellation at the next cancellation point in this thread */\n  pthread_cancel(self);\n#if 0\n  pthread_cleanup_push(mycleanupfunc, arg);\n  assert(pthread_once(&once[bag->oncenum], myinitfunc) == 0);\n  pthread_cleanup_pop(1);\n#else\n  assert(pthread_once(&once[bag->oncenum], myinitfunc) == 0);\n#endif\n  EnterCriticalSection(&numThreads.cs);\n  numThreads.i++;\n  LeaveCriticalSection(&numThreads.cs);\n  return 0;\n}\n\nint\nmain()\n{\n  pthread_t t[NUM_THREADS][NUM_ONCE];\n  int i, j;\n  \n  InitializeCriticalSection(&print_lock);\n  InitializeCriticalSection(&numThreads.cs);\n  InitializeCriticalSection(&numOnce.cs);\n\n#if 0\n  /*       once thrd  prio change */\n  printf(\"once thrd  prio  error\\n\");\n#endif\n\n  /*\n   * Set the priority class to realtime - otherwise normal\n   * Windows random priority boosting will obscure any problems.\n   */\n  SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);\n  /* Set main thread to lower prio than threads */\n  SetThreadPriority(GetCurrentThread(), -2);\n\n  for (j = 0; j < NUM_ONCE; j++)\n    {\n      once[j] = o;\n\n      for (i = 0; i < NUM_THREADS; i++)\n        {\n\t  bag_t * bag = &threadbag[i][j];\n\t  bag->threadnum = i;\n\t  bag->oncenum = j;\n          assert(pthread_create(&t[i][j], NULL, mythread, (void *) bag) == 0);\n        }\n    }\n\n  for (j = 0; j < NUM_ONCE; j++)\n    for (i = 0; i < NUM_THREADS; i++)\n      if (pthread_join(t[i][j], NULL) != 0)\n        printf(\"Join failed for [thread,once] = [%d,%d]\\n\", i, j);\n\n  /*\n   * All threads will cancel, none will return normally from\n   * pthread_once and so numThreads should never be incremented. However,\n   * numOnce should be incremented by every thread (NUM_THREADS*NUM_ONCE).\n   */\n  assert(numOnce.i == NUM_ONCE * NUM_THREADS);\n  assert(numThreads.i == 0);\n\n  DeleteCriticalSection(&numOnce.cs);\n  DeleteCriticalSection(&numThreads.cs);\n  DeleteCriticalSection(&print_lock);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/priority1.c",
    "content": "/*\n * File: priority1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test thread priority explicit setting using thread attribute.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * -\n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\nenum {\n  PTW32TEST_THREAD_INIT_PRIO = 0,\n  PTW32TEST_MAXPRIORITIES = 512\n};\n\nint minPrio;\nint maxPrio;\nint validPriorities[PTW32TEST_MAXPRIORITIES];\n\nvoid *\nfunc(void * arg)\n{\n  int policy;\n  struct sched_param param;\n  pthread_t threadID = pthread_self();\n\n  assert(pthread_getschedparam(threadID, &policy, &param) == 0);\n  assert(policy == SCHED_OTHER);\n  return (void *) (param.sched_priority);\n}\n\nvoid *\ngetValidPriorities(void * arg)\n{\n  int prioSet;\n  pthread_t threadID = pthread_self();\n  HANDLE threadH = pthread_getw32threadhandle_np(threadID);\n\n  printf(\"Using GetThreadPriority\\n\");\n  printf(\"%10s %10s\\n\", \"Set value\", \"Get value\");\n\n  for (prioSet = minPrio;\n       prioSet <= maxPrio;\n       prioSet++)\n    {\n\t/*\n       * If prioSet is invalid then the threads priority is unchanged\n       * from the previous value. Make the previous value a known\n       * one so that we can check later.\n       */\n        if (prioSet < 0)\n\t  SetThreadPriority(threadH, THREAD_PRIORITY_LOWEST);\n        else\n\t  SetThreadPriority(threadH, THREAD_PRIORITY_HIGHEST);\n\tSetThreadPriority(threadH, prioSet);\n\tvalidPriorities[prioSet+(PTW32TEST_MAXPRIORITIES/2)] = GetThreadPriority(threadH);\n\tprintf(\"%10d %10d\\n\", prioSet, validPriorities[prioSet+(PTW32TEST_MAXPRIORITIES/2)]);\n    }\n\n  return (void *) 0;\n}\n\n\nint\nmain()\n{\n  pthread_t t;\n  pthread_attr_t attr;\n  void * result = NULL;\n  struct sched_param param;\n\n  assert((maxPrio = sched_get_priority_max(SCHED_OTHER)) != -1);\n  assert((minPrio = sched_get_priority_min(SCHED_OTHER)) != -1);\n\n  assert(pthread_create(&t, NULL, getValidPriorities, NULL) == 0);\n  assert(pthread_join(t, &result) == 0);\n\n  assert(pthread_attr_init(&attr) == 0);\n  assert(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0);\n\n  /* Set the thread's priority to a known initial value. */\n  SetThreadPriority(pthread_getw32threadhandle_np(pthread_self()),\n                    PTW32TEST_THREAD_INIT_PRIO);\n\n  printf(\"Using pthread_getschedparam\\n\");\n  printf(\"%10s %10s %10s\\n\", \"Set value\", \"Get value\", \"Win priority\");\n\n  for (param.sched_priority = minPrio;\n       param.sched_priority <= maxPrio;\n       param.sched_priority++)\n    {\n      int prio;\n\n      assert(pthread_attr_setschedparam(&attr, &param) == 0);\n      assert(pthread_create(&t, &attr, func, (void *) &attr) == 0);\n\n      assert((prio = GetThreadPriority(pthread_getw32threadhandle_np(t)))\n             == validPriorities[param.sched_priority+(PTW32TEST_MAXPRIORITIES/2)]);\n\n      assert(pthread_join(t, &result) == 0);\n\n      assert(param.sched_priority == (int) result);\n      printf(\"%10d %10d %10d\\n\", param.sched_priority, (int) result, prio);\n    }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/priority2.c",
    "content": "/*\n * File: priority2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test thread priority setting after creation.\n *\n * Test Method (Validation or Falsification):\n * - \n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * -\n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\nenum {\n  PTW32TEST_THREAD_INIT_PRIO = 0,\n  PTW32TEST_MAXPRIORITIES = 512\n};\n\nint minPrio;\nint maxPrio;\nint validPriorities[PTW32TEST_MAXPRIORITIES];\npthread_barrier_t startBarrier, endBarrier;\n\nvoid * func(void * arg)\n{\n  int policy;\n  int result;\n  struct sched_param param;\n\n  result = pthread_barrier_wait(&startBarrier);\n  assert(result == 0 || result == PTHREAD_BARRIER_SERIAL_THREAD);\n  assert(pthread_getschedparam(pthread_self(), &policy, &param) == 0);\n  assert(policy == SCHED_OTHER);\n  result = pthread_barrier_wait(&endBarrier);\n  assert(result == 0 || result == PTHREAD_BARRIER_SERIAL_THREAD);\n  return (void *) param.sched_priority;\n}\n\n\nvoid *\ngetValidPriorities(void * arg)\n{\n  int prioSet;\n  pthread_t thread = pthread_self();\n  HANDLE threadH = pthread_getw32threadhandle_np(thread);\n  struct sched_param param;\n\n  for (prioSet = minPrio;\n       prioSet <= maxPrio;\n       prioSet++)\n    {\n\t/*\n       * If prioSet is invalid then the threads priority is unchanged\n       * from the previous value. Make the previous value a known\n       * one so that we can check later.\n       */\n        param.sched_priority = prioSet;\n\tassert(pthread_setschedparam(thread, SCHED_OTHER, &param) == 0);\n\tvalidPriorities[prioSet+(PTW32TEST_MAXPRIORITIES/2)] = GetThreadPriority(threadH);\n    }\n\n  return (void *) 0;\n}\n\n\nint\nmain()\n{\n  pthread_t t;\n  void * result = NULL;\n  int result2;\n  struct sched_param param;\n\n  assert((maxPrio = sched_get_priority_max(SCHED_OTHER)) != -1);\n  assert((minPrio = sched_get_priority_min(SCHED_OTHER)) != -1);\n\n  assert(pthread_create(&t, NULL, getValidPriorities, NULL) == 0);\n  assert(pthread_join(t, &result) == 0);\n\n  assert(pthread_barrier_init(&startBarrier, NULL, 2) == 0);\n  assert(pthread_barrier_init(&endBarrier, NULL, 2) == 0);\n\n  /* Set the thread's priority to a known initial value.\n   * If the new priority is invalid then the threads priority\n   * is unchanged from the previous value.\n   */\n  SetThreadPriority(pthread_getw32threadhandle_np(pthread_self()),\n                    PTW32TEST_THREAD_INIT_PRIO);\n\n  for (param.sched_priority = minPrio;\n       param.sched_priority <= maxPrio;\n       param.sched_priority++)\n    {\n      assert(pthread_create(&t, NULL, func, NULL) == 0);\n      assert(pthread_setschedparam(t, SCHED_OTHER, &param) == 0);\n      result2 = pthread_barrier_wait(&startBarrier);\n      assert(result2 == 0 || result2 == PTHREAD_BARRIER_SERIAL_THREAD);\n      result2 = pthread_barrier_wait(&endBarrier);\n      assert(result2 == 0 || result2 == PTHREAD_BARRIER_SERIAL_THREAD);\n      assert(GetThreadPriority(pthread_getw32threadhandle_np(t)) ==\n\t  validPriorities[param.sched_priority+(PTW32TEST_MAXPRIORITIES/2)]);\n      pthread_join(t, &result);\n      assert(param.sched_priority == (int)result);\n    }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/readme",
    "content": "Running test cases in this directory\n------------------------------------\n\nThese make scripts expect to be able to copy the dll, library\nand header files from this directory's parent directory,\nwhich should be the pthreads-win32 source directory.\n\nMS VC nmake\n-------------\n\nRun the target corresponding to the DLL version being tested:\n \nnmake clean VC\n \nor:\n \nnmake clean VS\n\n\nGNU GCC make\n------------\n\nRun \"make clean\" and then \"make\". See the \"Known bugs\" section\nin ..\\README.\n\n\nWriting Test Cases\n------------------\n\nTests written in this test suite should behave in the following manner:\n\n\t* If a test fails, leave main() with a result of 1.\n\n\t* If a test succeeds, leave main() with a result of 0.\n\n\t* No diagnostic output should appear when the test is succeeding.\n\t  Diagnostic output may be emitted if something in the test\n\t  fails, to help determine the cause of the test failure.\n\nNotes:\n------\n\nMany test cases use knowledge of implementation internals which are supposed\nto be opaque to portable applications.\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/reuse1.c",
    "content": "/*\n * File: reuse1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Confirm that thread reuse works for joined threads.\n *\n * Test Method (Validation or Falsification):\n * -\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * -\n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\nenum {\n\tNUMTHREADS = 100\n};\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  washere = 1;\n  return arg; \n}\n \nint\nmain()\n{\n  pthread_t t,\n            last_t;\n  pthread_attr_t attr;\n  void * result = NULL;\n  int i;\n\n  assert(pthread_attr_init(&attr) == 0);;\n  assert(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE) == 0);\n\n  washere = 0;\n  assert(pthread_create(&t, &attr, func, NULL) == 0);\n  assert(pthread_join(t, &result) == 0);;\n  assert(result == 0);\n  assert(washere == 1);\n  last_t = t;\n\n  for (i = 1; i < NUMTHREADS; i++)\n    {\n      washere = 0;\n      assert(pthread_create(&t, &attr, func, (void *) i) == 0);\n      pthread_join(t, &result);\n      assert((int) result == i);\n      assert(washere == 1);\n      /* thread IDs should be unique */\n      assert(!pthread_equal(t, last_t));\n      /* thread struct pointers should be the same */\n      assert(t.p == last_t.p);\n      /* thread handle reuse counter should be different by one */\n      assert(t.x == last_t.x+1);\n      last_t = t;\n    }\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/reuse2.c",
    "content": "/*\n * File: reuse2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test that thread reuse works for detached threads.\n * - Analyse thread struct reuse.\n *\n * Test Method (Validation or Falsification):\n * -\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * -\n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * - This test is implementation specific\n * because it uses knowledge of internals that should be\n * opaque to an application.\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n/*\n */\n\nenum {\n\tNUMTHREADS = 10000\n};\n\n\nstatic long done = 0;\n\nvoid * func(void * arg)\n{\n  sched_yield();\n\n  InterlockedIncrement(&done);\n\n  return (void *) 0; \n}\n \nint\nmain()\n{\n  pthread_t t[NUMTHREADS];\n  pthread_attr_t attr;\n  int i;\n  unsigned int notUnique = 0,\n\t       totalHandles = 0,\n\t       reuseMax = 0,\n\t       reuseMin = NUMTHREADS;\n\n  assert(pthread_attr_init(&attr) == 0);\n  assert(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0);\n\n  for (i = 0; i < NUMTHREADS; i++)\n    {\n      assert(pthread_create(&t[i], &attr, func, NULL) == 0);\n    }\n\n  while (NUMTHREADS > InterlockedExchangeAdd((LPLONG)&done, 0L))\n    Sleep(100);\n\n  Sleep(100);\n\n  /*\n   * Analyse reuse by computing min and max number of times pthread_create()\n   * returned the same pthread_t value.\n   */\n  for (i = 0; i < NUMTHREADS; i++)\n    {\n      if (t[i].p != NULL)\n        {\n          unsigned int j, thisMax;\n\n          thisMax = t[i].x;\n\n          for (j = i+1; j < NUMTHREADS; j++)\n            if (t[i].p == t[j].p)\n              {\n\t\tif (t[i].x == t[j].x)\n\t\t  notUnique++;\n                if (thisMax < t[j].x)\n                  thisMax = t[j].x;\n                t[j].p = NULL;\n              }\n\n          if (reuseMin > thisMax)\n            reuseMin = thisMax;\n\n          if (reuseMax < thisMax)\n            reuseMax = thisMax;\n        }\n    }\n\n  for (i = 0; i < NUMTHREADS; i++)\n    if (t[i].p != NULL)\n      totalHandles++;\n\n  /*\n   * pthread_t reuse counts start at 0, so we need to add 1\n   * to the max and min values derived above.\n   */\n  printf(\"For %d total threads:\\n\", NUMTHREADS);\n  printf(\"Non-unique IDs = %d\\n\", notUnique);\n  printf(\"Reuse maximum  = %d\\n\", reuseMax + 1);\n  printf(\"Reuse minimum  = %d\\n\", reuseMin + 1);\n  printf(\"Total handles  = %d\\n\", totalHandles);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock1.c",
    "content": "/* \n * rwlock1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Create a simple rwlock object and then destroy it.\n *\n * Depends on API functions:\n * \tpthread_rwlock_init()\n *\tpthread_rwlock_destroy()\n */\n\n#include \"test.h\"\n\npthread_rwlock_t rwlock = NULL;\n\nint\nmain()\n{\n  assert(rwlock == NULL);\n\n  assert(pthread_rwlock_init(&rwlock, NULL) == 0);\n\n  assert(rwlock != NULL);\n\n  assert(pthread_rwlock_destroy(&rwlock) == 0);\n\n  assert(rwlock == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock2.c",
    "content": "/* \n * rwlock2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static rwlock object, lock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_rwlock_rdlock()\n *\tpthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n \npthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER;\n\nint\nmain()\n{\n  assert(rwlock == PTHREAD_RWLOCK_INITIALIZER);\n\n  assert(pthread_rwlock_rdlock(&rwlock) == 0);\n\n  assert(rwlock != PTHREAD_RWLOCK_INITIALIZER);\n\n  assert(rwlock != NULL);\n\n  assert(pthread_rwlock_unlock(&rwlock) == 0);\n\n  assert(pthread_rwlock_destroy(&rwlock) == 0);\n\n  assert(rwlock == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock2_t.c",
    "content": "/* \n * rwlock2_t.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static rwlock object, timed-lock it, \n * and then unlock it again.\n *\n * Depends on API functions:\n *\tpthread_rwlock_timedrdlock()\n *\tpthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\npthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER;\n\nint\nmain()\n{\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  assert(rwlock == PTHREAD_RWLOCK_INITIALIZER);\n\n  assert(pthread_rwlock_timedrdlock(&rwlock, &abstime) == 0);\n\n  assert(rwlock != PTHREAD_RWLOCK_INITIALIZER);\n\n  assert(rwlock != NULL);\n\n  assert(pthread_rwlock_unlock(&rwlock) == 0);\n\n  assert(pthread_rwlock_destroy(&rwlock) == 0);\n\n  assert(rwlock == NULL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock3.c",
    "content": "/* \n * rwlock3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static rwlock object, wrlock it, trywrlock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_rwlock_wrlock()\n *\tpthread_rwlock_trywrlock()\n *\tpthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n \npthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_rwlock_trywrlock(&rwlock1) == EBUSY);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_rwlock_wrlock(&rwlock1) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock3_t.c",
    "content": "/* \n * rwlock3_t.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static rwlock object, timed-wrlock it, trywrlock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_rwlock_timedwrlock()\n *\tpthread_rwlock_trywrlock()\n *\tpthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\npthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_rwlock_trywrlock(&rwlock1) == EBUSY);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  assert(pthread_rwlock_timedwrlock(&rwlock1, &abstime) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock4.c",
    "content": "/* \n * rwlock4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static rwlock object, rdlock it, trywrlock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_rwlock_rdlock()\n *\tpthread_rwlock_trywrlock()\n *\tpthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n \npthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_rwlock_trywrlock(&rwlock1) == EBUSY);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_rwlock_rdlock(&rwlock1) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock4_t.c",
    "content": "/* \n * rwlock4_t.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static rwlock object, timed-rdlock it, trywrlock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_rwlock_timedrdlock()\n *\tpthread_rwlock_trywrlock()\n *\tpthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\npthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_rwlock_trywrlock(&rwlock1) == EBUSY);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  assert(pthread_rwlock_timedrdlock(&rwlock1, &abstime) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock5.c",
    "content": "/* \n * rwlock5.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static rwlock object, rdlock it, tryrdlock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_rwlock_rdlock()\n *\tpthread_rwlock_tryrdlock()\n *\tpthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n \npthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_rwlock_tryrdlock(&rwlock1) == 0);\n\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_rwlock_rdlock(&rwlock1) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock5_t.c",
    "content": "/* \n * rwlock5_t.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static rwlock object, timed-rdlock it, tryrdlock it, \n * and then unlock it again.\n *\n * Depends on API functions: \n *\tpthread_rwlock_timedrdlock()\n *\tpthread_rwlock_tryrdlock()\n *\tpthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\npthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_rwlock_tryrdlock(&rwlock1) == 0);\n\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  assert(pthread_rwlock_timedrdlock(&rwlock1, &abstime) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  Sleep(2000);\n\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock6.c",
    "content": "/*\n * rwlock6.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Check writer and reader locking\n *\n * Depends on API functions:\n *      pthread_rwlock_rdlock()\n *      pthread_rwlock_wrlock()\n *      pthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n\nstatic pthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;\n\nstatic int bankAccount = 0;\n\nvoid * wrfunc(void * arg)\n{\n  int ba;\n\n  assert(pthread_rwlock_wrlock(&rwlock1) == 0);\n  Sleep(2000);\n  bankAccount += 10;\n  ba = bankAccount;\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  return ((void *) ba);\n}\n\nvoid * rdfunc(void * arg)\n{\n  int ba;\n\n  assert(pthread_rwlock_rdlock(&rwlock1) == 0);\n  ba = bankAccount;\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  return ((void *) ba);\n}\n\nint\nmain()\n{\n  pthread_t wrt1;\n  pthread_t wrt2;\n  pthread_t rdt;\n  int wr1Result = 0;\n  int wr2Result = 0;\n  int rdResult = 0;\n\n  bankAccount = 0;\n\n  assert(pthread_create(&wrt1, NULL, wrfunc, NULL) == 0);\n  Sleep(500);\n  assert(pthread_create(&rdt, NULL, rdfunc, NULL) == 0);\n  Sleep(500);\n  assert(pthread_create(&wrt2, NULL, wrfunc, NULL) == 0);\n\n  assert(pthread_join(wrt1, (void **) &wr1Result) == 0);\n  assert(pthread_join(rdt, (void **) &rdResult) == 0);\n  assert(pthread_join(wrt2, (void **) &wr2Result) == 0);\n\n  assert(wr1Result == 10);\n  assert(rdResult == 10);\n  assert(wr2Result == 20);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock6_t.c",
    "content": "/*\n * rwlock6_t.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Check writer and reader locking with reader timeouts\n *\n * Depends on API functions: \n *      pthread_rwlock_timedrdlock()\n *      pthread_rwlock_wrlock()\n *      pthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic pthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;\n\nstatic int bankAccount = 0;\n\nvoid * wrfunc(void * arg)\n{\n  assert(pthread_rwlock_wrlock(&rwlock1) == 0);\n  Sleep(2000);\n  bankAccount += 10;\n  assert(pthread_rwlock_unlock(&rwlock1) == 0);\n\n  return ((void *) bankAccount);\n}\n\nvoid * rdfunc(void * arg)\n{\n  int ba = -1;\n  struct timespec abstime = { 0, 0 };\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n\n  if ((int) arg == 1)\n    {\n      abstime.tv_sec += 1;\n      assert(pthread_rwlock_timedrdlock(&rwlock1, &abstime) == ETIMEDOUT);\n      ba = 0;\n    }\n  else if ((int) arg == 2)\n    {\n      abstime.tv_sec += 3;\n      assert(pthread_rwlock_timedrdlock(&rwlock1, &abstime) == 0);\n      ba = bankAccount;\n      assert(pthread_rwlock_unlock(&rwlock1) == 0);\n    }\n\n  return ((void *) ba);\n}\n\nint\nmain()\n{\n  pthread_t wrt1;\n  pthread_t wrt2;\n  pthread_t rdt1;\n  pthread_t rdt2;\n  int wr1Result = 0;\n  int wr2Result = 0;\n  int rd1Result = 0;\n  int rd2Result = 0;\n\n  bankAccount = 0;\n\n  assert(pthread_create(&wrt1, NULL, wrfunc, NULL) == 0);\n  Sleep(500);\n  assert(pthread_create(&rdt1, NULL, rdfunc, (void *) 1) == 0);\n  Sleep(500);\n  assert(pthread_create(&wrt2, NULL, wrfunc, NULL) == 0);\n  Sleep(500);\n  assert(pthread_create(&rdt2, NULL, rdfunc, (void *) 2) == 0);\n\n  assert(pthread_join(wrt1, (void **) &wr1Result) == 0);\n  assert(pthread_join(rdt1, (void **) &rd1Result) == 0);\n  assert(pthread_join(wrt2, (void **) &wr2Result) == 0);\n  assert(pthread_join(rdt2, (void **) &rd2Result) == 0);\n\n  assert(wr1Result == 10);\n  assert(rd1Result == 0);\n  assert(wr2Result == 20);\n  assert(rd2Result == 20);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock6_t2.c",
    "content": "/*\n * rwlock6_t2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Check writer and reader timeouts.\n *\n * Depends on API functions: \n *      pthread_rwlock_timedrdlock()\n *      pthread_rwlock_timedwrlock()\n *      pthread_rwlock_unlock()\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\nstatic pthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;\n\nstatic int bankAccount = 0;\nstruct timespec abstime = { 0, 0 };\n\nvoid * wrfunc(void * arg)\n{\n  int result;\n\n  result = pthread_rwlock_timedwrlock(&rwlock1, &abstime);\n  if ((int) arg == 1)\n    {\n      assert(result == 0);\n      Sleep(2000);\n      bankAccount += 10;\n      assert(pthread_rwlock_unlock(&rwlock1) == 0);\n      return ((void *) bankAccount);\n    }\n  else if ((int) arg == 2)\n    {\n      assert(result == ETIMEDOUT);\n      return ((void *) 100);\n    }\n\n  return ((void *) -1);\n}\n\nvoid * rdfunc(void * arg)\n{\n  int ba = 0;\n\n  assert(pthread_rwlock_timedrdlock(&rwlock1, &abstime) == ETIMEDOUT);\n\n  return ((void *) ba);\n}\n\nint\nmain()\n{\n  pthread_t wrt1;\n  pthread_t wrt2;\n  pthread_t rdt;\n  int wr1Result = 0;\n  int wr2Result = 0;\n  int rdResult = 0;\n  struct _timeb currSysTime;\n  const DWORD NANOSEC_PER_MILLISEC = 1000000;\n\n  _ftime(&currSysTime);\n\n  abstime.tv_sec = currSysTime.time;\n  abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;\n\n  abstime.tv_sec += 1;\n\n  bankAccount = 0;\n\n  assert(pthread_create(&wrt1, NULL, wrfunc, (void *) 1) == 0);\n  Sleep(100);\n  assert(pthread_create(&rdt, NULL, rdfunc, NULL) == 0);\n  Sleep(100);\n  assert(pthread_create(&wrt2, NULL, wrfunc, (void *) 2) == 0);\n\n  assert(pthread_join(wrt1, (void **) &wr1Result) == 0);\n  assert(pthread_join(rdt, (void **) &rdResult) == 0);\n  assert(pthread_join(wrt2, (void **) &wr2Result) == 0);\n\n  assert(wr1Result == 10);\n  assert(rdResult == 0);\n  assert(wr2Result == 100);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock7.c",
    "content": "/*\n * rwlock7.c\n *\n * Hammer on a bunch of rwlocks to test robustness and fairness.\n * Printed stats should be roughly even for each thread.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#define THREADS         5\n#define DATASIZE        7\n#define ITERATIONS      1000000\n\n/*\n * Keep statistics for each thread.\n */\ntypedef struct thread_tag {\n  int         thread_num;\n  pthread_t   thread_id;\n  int         updates;\n  int         reads;\n  int         changed;\n  int         seed;\n} thread_t;\n\n/*\n * Read-write lock and shared data\n */\ntypedef struct data_tag {\n  pthread_rwlock_t    lock;\n  int                 data;\n  int                 updates;\n} data_t;\n\nstatic thread_t threads[THREADS];\nstatic data_t data[DATASIZE];\n\n/*\n * Thread start routine that uses read-write locks\n */\nvoid *thread_routine (void *arg)\n{\n  thread_t *self = (thread_t*)arg;\n  int iteration;\n  int element = 0;\n  int seed = self->seed;\n  int interval = 1 + rand_r (&seed) % 71;\n\n  self->changed = 0;\n\n  for (iteration = 0; iteration < ITERATIONS; iteration++)\n    {\n      if (iteration % (ITERATIONS / 10) == 0)\n        {\n          putchar('.');\n          fflush(stdout);\n        }\n      /*\n       * Each \"self->interval\" iterations, perform an\n       * update operation (write lock instead of read\n       * lock).\n       */\n      if ((iteration % interval) == 0)\n        {\n          assert(pthread_rwlock_wrlock (&data[element].lock) == 0);\n          data[element].data = self->thread_num;\n          data[element].updates++;\n          self->updates++;\n\t  interval = 1 + rand_r (&seed) % 71;\n          assert(pthread_rwlock_unlock (&data[element].lock) == 0);\n        } else {\n          /*\n           * Look at the current data element to see whether\n           * the current thread last updated it. Count the\n           * times, to report later.\n           */\n          assert(pthread_rwlock_rdlock (&data[element].lock) == 0);\n\n          self->reads++;\n\n          if (data[element].data != self->thread_num)\n            {\n              self->changed++;\n\t      interval = 1 + self->changed % 71;\n            }\n\n          assert(pthread_rwlock_unlock (&data[element].lock) == 0);\n        }\n\n      element = (element + 1) % DATASIZE;\n\n    }\n\n  return NULL;\n}\n\nint\nmain (int argc, char *argv[])\n{\n  int count;\n  int data_count;\n  int thread_updates = 0;\n  int data_updates = 0;\n  int seed = 1;\n\n  struct _timeb currSysTime1;\n  struct _timeb currSysTime2;\n\n  /*\n   * Initialize the shared data.\n   */\n  for (data_count = 0; data_count < DATASIZE; data_count++)\n    {\n      data[data_count].data = 0;\n      data[data_count].updates = 0;\n\n      assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0);\n    }\n\n  _ftime(&currSysTime1);\n\n  /*\n   * Create THREADS threads to access shared data.\n   */\n  for (count = 0; count < THREADS; count++)\n    {\n      threads[count].thread_num = count;\n      threads[count].updates = 0;\n      threads[count].reads = 0;\n      threads[count].seed = 1 + rand_r (&seed) % 71;\n\n      assert(pthread_create (&threads[count].thread_id,\n                             NULL, thread_routine, (void*)&threads[count]) == 0);\n    }\n\n  /*\n   * Wait for all threads to complete, and collect\n   * statistics.\n   */\n  for (count = 0; count < THREADS; count++)\n    {\n      assert(pthread_join (threads[count].thread_id, NULL) == 0);\n    }\n\n  putchar('\\n');\n  fflush(stdout);\n\n  for (count = 0; count < THREADS; count++)\n    {\n      if (threads[count].changed > 0)\n        {\n          printf (\"Thread %d found changed elements %d times\\n\",\n                  count, threads[count].changed);\n        }\n    }\n\n  putchar('\\n');\n  fflush(stdout);\n\n  for (count = 0; count < THREADS; count++)\n    {\n      thread_updates += threads[count].updates;\n      printf (\"%02d: seed %d, updates %d, reads %d\\n\",\n              count, threads[count].seed,\n              threads[count].updates, threads[count].reads);\n    }\n\n  putchar('\\n');\n  fflush(stdout);\n\n  /*\n   * Collect statistics for the data.\n   */\n  for (data_count = 0; data_count < DATASIZE; data_count++)\n    {\n      data_updates += data[data_count].updates;\n      printf (\"data %02d: value %d, %d updates\\n\",\n              data_count, data[data_count].data, data[data_count].updates);\n      assert(pthread_rwlock_destroy (&data[data_count].lock) == 0);\n    }\n\n  printf (\"%d thread updates, %d data updates\\n\",\n          thread_updates, data_updates);\n\n  _ftime(&currSysTime2);\n\n  printf( \"\\nstart: %ld/%d, stop: %ld/%d, duration:%ld\\n\",\n          currSysTime1.time,currSysTime1.millitm,\n          currSysTime2.time,currSysTime2.millitm,\n          (currSysTime2.time*1000+currSysTime2.millitm) -\n          (currSysTime1.time*1000+currSysTime1.millitm));\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/rwlock8.c",
    "content": "/*\n * rwlock8.c\n *\n * Hammer on a bunch of rwlocks to test robustness and fairness.\n * Printed stats should be roughly even for each thread.\n *\n * Yield during each access to exercise lock contention code paths\n * more than rwlock7.c does (particularly on uni-processor systems).\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n\n#ifdef __GNUC__\n#include <stdlib.h>\n#endif\n\n#define THREADS         5\n#define DATASIZE        7\n#define ITERATIONS      100000\n\n/*\n * Keep statistics for each thread.\n */\ntypedef struct thread_tag {\n  int         thread_num;\n  pthread_t   thread_id;\n  int         updates;\n  int         reads;\n  int         changed;\n  int         seed;\n} thread_t;\n\n/*\n * Read-write lock and shared data\n */\ntypedef struct data_tag {\n  pthread_rwlock_t    lock;\n  int                 data;\n  int                 updates;\n} data_t;\n\nstatic thread_t threads[THREADS];\nstatic data_t data[DATASIZE];\n\n/*\n * Thread start routine that uses read-write locks\n */\nvoid *thread_routine (void *arg)\n{\n  thread_t *self = (thread_t*)arg;\n  int iteration;\n  int element = 0;\n  int seed = self->seed;\n  int interval = 1 + rand_r (&seed) % 71;\n\n  self->changed = 0;\n\n  for (iteration = 0; iteration < ITERATIONS; iteration++)\n    {\n      if (iteration % (ITERATIONS / 10) == 0)\n        {\n          putchar('.');\n          fflush(stdout);\n        }\n      /*\n       * Each \"self->interval\" iterations, perform an\n       * update operation (write lock instead of read\n       * lock).\n       */\n      if ((iteration % interval) == 0)\n        {\n          assert(pthread_rwlock_wrlock (&data[element].lock) == 0);\n          data[element].data = self->thread_num;\n          data[element].updates++;\n          self->updates++;\n\t  interval = 1 + rand_r (&seed) % 71;\n\t  sched_yield();\n          assert(pthread_rwlock_unlock (&data[element].lock) == 0);\n        } else {\n          /*\n           * Look at the current data element to see whether\n           * the current thread last updated it. Count the\n           * times, to report later.\n           */\n          assert(pthread_rwlock_rdlock (&data[element].lock) == 0);\n\n          self->reads++;\n\n          if (data[element].data != self->thread_num)\n            {\n              self->changed++;\n\t      interval = 1 + self->changed % 71;\n            }\n\n\t  sched_yield();\n\n          assert(pthread_rwlock_unlock (&data[element].lock) == 0);\n        }\n\n      element = (element + 1) % DATASIZE;\n\n    }\n\n  return NULL;\n}\n\nint\nmain (int argc, char *argv[])\n{\n  int count;\n  int data_count;\n  int thread_updates = 0;\n  int data_updates = 0;\n  int seed = 1;\n\n  struct _timeb currSysTime1;\n  struct _timeb currSysTime2;\n\n  /*\n   * Initialize the shared data.\n   */\n  for (data_count = 0; data_count < DATASIZE; data_count++)\n    {\n      data[data_count].data = 0;\n      data[data_count].updates = 0;\n\n      assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0);\n    }\n\n  _ftime(&currSysTime1);\n\n  /*\n   * Create THREADS threads to access shared data.\n   */\n  for (count = 0; count < THREADS; count++)\n    {\n      threads[count].thread_num = count;\n      threads[count].updates = 0;\n      threads[count].reads = 0;\n      threads[count].seed = 1 + rand_r (&seed) % 71;\n\n      assert(pthread_create (&threads[count].thread_id,\n                             NULL, thread_routine, (void*)&threads[count]) == 0);\n    }\n\n  /*\n   * Wait for all threads to complete, and collect\n   * statistics.\n   */\n  for (count = 0; count < THREADS; count++)\n    {\n      assert(pthread_join (threads[count].thread_id, NULL) == 0);\n    }\n\n  putchar('\\n');\n  fflush(stdout);\n\n  for (count = 0; count < THREADS; count++)\n    {\n      if (threads[count].changed > 0)\n        {\n          printf (\"Thread %d found changed elements %d times\\n\",\n                  count, threads[count].changed);\n        }\n    }\n\n  putchar('\\n');\n  fflush(stdout);\n\n  for (count = 0; count < THREADS; count++)\n    {\n      thread_updates += threads[count].updates;\n      printf (\"%02d: seed %d, updates %d, reads %d\\n\",\n              count, threads[count].seed,\n              threads[count].updates, threads[count].reads);\n    }\n\n  putchar('\\n');\n  fflush(stdout);\n\n  /*\n   * Collect statistics for the data.\n   */\n  for (data_count = 0; data_count < DATASIZE; data_count++)\n    {\n      data_updates += data[data_count].updates;\n      printf (\"data %02d: value %d, %d updates\\n\",\n              data_count, data[data_count].data, data[data_count].updates);\n      assert(pthread_rwlock_destroy (&data[data_count].lock) == 0);\n    }\n\n  printf (\"%d thread updates, %d data updates\\n\",\n          thread_updates, data_updates);\n\n  _ftime(&currSysTime2);\n\n  printf( \"\\nstart: %ld/%d, stop: %ld/%d, duration:%ld\\n\",\n          currSysTime1.time,currSysTime1.millitm,\n          currSysTime2.time,currSysTime2.millitm,\n          (currSysTime2.time*1000+currSysTime2.millitm) -\n          (currSysTime1.time*1000+currSysTime1.millitm));\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/self1.c",
    "content": "/*\n * self1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test for pthread_self().\n *\n * Depends on API functions:\n *\tpthread_self()\n *\n * Implicitly depends on:\n *\tpthread_getspecific()\n *\tpthread_setspecific()\n */\n\n#include \"test.h\"\n\nint\nmain(int argc, char * argv[])\n{\n\t/*\n\t * This should always succeed unless the system has no\n\t * resources (memory) left.\n\t */\n\tpthread_t self;\n\n#ifdef PTW32_STATIC_LIB\n\tpthread_win32_process_attach_np();\n#endif\n\n\tself = pthread_self();\n\n\tassert(self.p != NULL);\n\n#ifdef PTW32_STATIC_LIB\n\tpthread_win32_process_detach_np();\n#endif\n\treturn 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/self2.c",
    "content": "/*\n * self2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test for pthread_self().\n *\n * Depends on API functions:\n *\tpthread_create()\n *\tpthread_self()\n *\n * Implicitly depends on:\n *\tpthread_getspecific()\n *\tpthread_setspecific()\n */\n\n#include \"test.h\"\n#include <string.h>\n\nstatic pthread_t me;\n\nvoid *\nentry(void * arg)\n{\n  me = pthread_self();\n\n  return arg;\n}\n\nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_create(&t, NULL, entry, NULL) == 0);\n\n  Sleep(100);\n\n  assert(pthread_equal(t, me) != 0);\n\n  /* Success. */\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/semaphore1.c",
    "content": "/*\n * File: semaphore1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Verify trywait() returns -1 and sets EAGAIN.\n * - \n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\nvoid *\nthr(void * arg)\n{\n  sem_t s;\n  int result;\n\n  assert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, 0) == 0);\n\n  assert((result = sem_trywait(&s)) == -1);\n\n  if ( result == -1 )\n  {\n    int err = errno;\n    printf(\"thread: sem_trywait 1: expecting error %s: got %s\\n\",\n\t   error_string[EAGAIN], error_string[err]); fflush(stdout);\n    assert(err == EAGAIN);\n  }\n  else\n  {\n    printf(\"thread: ok 1\\n\");\n  }\n\n  assert((result = sem_post(&s)) == 0);\n\n  assert((result = sem_trywait(&s)) == 0);\n\n  if ( result == -1 )\n  {\n    perror(\"thread: sem_trywait 2\");\n  }\n  else\n  {\n    printf(\"thread: ok 2\\n\");\n  }\n\n  assert(sem_post(&s) == 0);\n\n  return 0;\n}\n\n\nint\nmain()\n{\n  pthread_t t;\n  sem_t s;\n  int result;\n\n  assert(pthread_create(&t, NULL, thr, NULL) == 0);\n  assert(pthread_join(t, (void **)&result) == 0);\n  assert(result == 0);\n\n  assert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, 0) == 0);\n\n  assert((result = sem_trywait(&s)) == -1);\n\n  if ( result == -1 )\n  {\n    int err = errno;\n    printf(\"main: sem_trywait 1: expecting error %s: got %s\\n\",\n\t   error_string[EAGAIN], error_string[err]); fflush(stdout);\n    assert(err == EAGAIN);\n  }\n  else\n  {\n    printf(\"main: ok 1\\n\");\n  }\n\n  assert((result = sem_post(&s)) == 0);\n\n  assert((result = sem_trywait(&s)) == 0);\n\n  if ( result == -1 )\n  {\n    perror(\"main: sem_trywait 2\");\n  }\n  else\n  {\n    printf(\"main: ok 2\\n\");\n  }\n\n  assert(sem_post(&s) == 0);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/semaphore2.c",
    "content": "/*\n * File: semaphore2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Verify sem_getvalue returns the correct value.\n * - \n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n#define MAX_COUNT 100\n\nint\nmain()\n{\n  sem_t s;\n\tint value = 0;\n\tint i;\n\n  assert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, MAX_COUNT) == 0);\n\tassert(sem_getvalue(&s, &value) == 0);\n\tassert(value == MAX_COUNT);\n//\t  printf(\"Value = %ld\\n\", value);\n\n\tfor (i = MAX_COUNT - 1; i >= 0; i--)\n\t\t{\n\t\t\tassert(sem_wait(&s) == 0);\n\t\t\tassert(sem_getvalue(&s, &value) == 0);\n//\t\t\t  printf(\"Value = %ld\\n\", value);\n\t\t\tassert(value == i);\n\t\t}\n\n\tfor (i = 1; i <= MAX_COUNT; i++)\n\t\t{\n\t\t\tassert(sem_post(&s) == 0);\n\t\t\tassert(sem_getvalue(&s, &value) == 0);\n//\t\t\t  printf(\"Value = %ld\\n\", value);\n\t\t\tassert(value == i);\n\t\t}\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/semaphore3.c",
    "content": "/*\n * File: semaphore3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Verify sem_getvalue returns the correct number of waiters.\n * - \n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n#define MAX_COUNT 100\n\nsem_t s;\n\nvoid *\nthr (void * arg)\n{\n  assert(sem_wait(&s) == 0);\n  assert(pthread_detach(pthread_self()) == 0);\n  return NULL;\n}\n\nint\nmain()\n{\n\tint value = 0;\n\tint i;\n\tpthread_t t[MAX_COUNT+1];\n\n\tassert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, 0) == 0);\n\tassert(sem_getvalue(&s, &value) == 0);\n//\tprintf(\"Value = %d\\n\", value);\tfflush(stdout);\n\tassert(value == 0);\n\n\tfor (i = 1; i <= MAX_COUNT; i++)\n\t\t{\n\t\t\tassert(pthread_create(&t[i], NULL, thr, NULL) == 0);\n\t\t\tdo {\n\t\t\t  sched_yield();\n\t\t\t  assert(sem_getvalue(&s, &value) == 0);\n\t\t\t} while (value != -i);\n//\t\t\tprintf(\"Value = %d\\n\", value); fflush(stdout);\n\t\t\tassert(-value == i);\n\t\t}\n\n\tfor (i = MAX_COUNT - 1; i >= 0; i--)\n\t\t{\n\t\t\tassert(sem_post(&s) == 0);\n\t\t\tassert(sem_getvalue(&s, &value) == 0);\n//\t\t\tprintf(\"Value = %d\\n\", value);\tfflush(stdout);\n\t\t\tassert(-value == i);\n\t\t}\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/semaphore4.c",
    "content": "/*\n * File: semaphore4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Verify sem_getvalue returns the correct number of waiters\n * after threads are cancelled.\n * - \n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n#define MAX_COUNT 100\n\nsem_t s;\n\nvoid *\nthr (void * arg)\n{\n  assert(sem_wait(&s) == 0);\n  return NULL;\n}\n\nint\nmain()\n{\n\tint value = 0;\n\tint i;\n\tpthread_t t[MAX_COUNT+1];\n\n\tassert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, 0) == 0);\n\tassert(sem_getvalue(&s, &value) == 0);\n//\tprintf(\"Value = %d\\n\", value);\tfflush(stdout);\n\tassert(value == 0);\n\n\tfor (i = 1; i <= MAX_COUNT; i++)\n\t\t{\n\t\t\tassert(pthread_create(&t[i], NULL, thr, NULL) == 0);\n\t\t\tdo {\n\t\t\t  sched_yield();\n\t\t\t  assert(sem_getvalue(&s, &value) == 0);\n\t\t\t} while (value != -i);\n//\t\t\tprintf(\"Value = %d\\n\", value); fflush(stdout);\n\t\t\tassert(-value == i);\n\t\t}\n\n\tassert(sem_getvalue(&s, &value) == 0);\n\tassert(-value == MAX_COUNT);\n//printf(\"value = %d\\n\", -value); fflush(stdout);\n\tassert(pthread_cancel(t[50]) == 0);\n\t  {\n\t    int result;\n\t    assert(pthread_join(t[50], (void **) &result) == 0);\n//\t    printf(\"result = %d\\n\", result); fflush(stdout);\n\t  }\n\tassert(sem_getvalue(&s, &value) == 0);\n//printf(\"value = %d\\n\", -value); fflush(stdout);\n\tassert(-value == (MAX_COUNT - 1));\n\n\tfor (i = MAX_COUNT - 2; i >= 0; i--)\n\t\t{\n\t\t\tassert(sem_post(&s) == 0);\n\t\t\tassert(sem_getvalue(&s, &value) == 0);\n//\t\t\tprintf(\"Value = %d\\n\", value);\tfflush(stdout);\n\t\t\tassert(-value == i);\n\t\t}\n\n\tfor (i = 1; i <= MAX_COUNT; i++)\n\t  if (i != 50)\n\t    assert(pthread_join(t[i], NULL) == 0);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/semaphore4t.c",
    "content": "/*\n * File: semaphore4t.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Verify sem_getvalue returns the correct number of waiters\n * after threads are cancelled.\n * - \n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - sem_timedwait cancellation.\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\n#define MAX_COUNT 100\n\nsem_t s;\n\nvoid *\nthr (void * arg)\n{\n  assert(sem_timedwait(&s, NULL) == 0);\n  return NULL;\n}\n\nint\nmain()\n{\n\tint value = 0;\n\tint i;\n\tpthread_t t[MAX_COUNT+1];\n\n\tassert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, 0) == 0);\n\tassert(sem_getvalue(&s, &value) == 0);\n//\tprintf(\"Value = %d\\n\", value);\tfflush(stdout);\n\tassert(value == 0);\n\n\tfor (i = 1; i <= MAX_COUNT; i++)\n\t\t{\n\t\t\tassert(pthread_create(&t[i], NULL, thr, NULL) == 0);\n\t\t\tdo {\n\t\t\t  sched_yield();\n\t\t\t  assert(sem_getvalue(&s, &value) == 0);\n\t\t\t} while (value != -i);\n//\t\t\tprintf(\"Value = %d\\n\", value); fflush(stdout);\n\t\t\tassert(-value == i);\n\t\t}\n\n\tassert(sem_getvalue(&s, &value) == 0);\n\tassert(-value == MAX_COUNT);\n\tassert(pthread_cancel(t[50]) == 0);\n\tassert(pthread_join(t[50], NULL) == 0);\n\tassert(sem_getvalue(&s, &value) == 0);\n\tassert(-value == MAX_COUNT - 1);\n\n\tfor (i = MAX_COUNT - 2; i >= 0; i--)\n\t\t{\n\t\t\tassert(sem_post(&s) == 0);\n\t\t\tassert(sem_getvalue(&s, &value) == 0);\n//\t\t\tprintf(\"Value = %d\\n\", value);\tfflush(stdout);\n\t\t\tassert(-value == i);\n\t\t}\n\n        for (i = 1; i <= MAX_COUNT; i++)\n          if (i != 50)\n            assert(pthread_join(t[i], NULL) == 0);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/semaphore5.c",
    "content": "/*\n * File: semaphore5.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis: Verify sem_destroy EBUSY race avoidance\n * - \n *\n * Test Method (Validation or Falsification):\n * - Validation\n *\n * Requirements Tested:\n * - \n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Description:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * - \n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n// #define ASSERT_TRACE\n\n#include \"test.h\"\n\nvoid *\nthr(void * arg)\n{\n  assert(sem_post((sem_t *)arg) == 0);\n\n  return 0;\n}\n\n\nint\nmain()\n{\n  pthread_t t;\n  sem_t s;\n\n  assert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, 0) == 0);\n  assert(pthread_create(&t, NULL, thr, (void *)&s) == 0);\n\n  assert(sem_wait(&s) == 0);\n  assert(sem_destroy(&s) == 0);\n\n  assert(pthread_join(t, NULL) == 0);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/sizes.c",
    "content": "#define _WIN32_WINNT 0x400\n\n#include \"test.h\"\n#include \"../implement.h\"\n\nint\nmain()\n{\n  printf(\"Sizes of pthreads-win32 structs\\n\");\n  printf(\"-------------------------------\\n\");\n  printf(\"%30s %4d\\n\", \"pthread_t\", sizeof(pthread_t));\n  printf(\"%30s %4d\\n\", \"ptw32_thread_t\", sizeof(ptw32_thread_t));\n  printf(\"%30s %4d\\n\", \"pthread_attr_t_\", sizeof(struct pthread_attr_t_));\n  printf(\"%30s %4d\\n\", \"sem_t_\", sizeof(struct sem_t_));\n  printf(\"%30s %4d\\n\", \"pthread_mutex_t_\", sizeof(struct pthread_mutex_t_));\n  printf(\"%30s %4d\\n\", \"pthread_mutexattr_t_\", sizeof(struct pthread_mutexattr_t_));\n  printf(\"%30s %4d\\n\", \"pthread_spinlock_t_\", sizeof(struct pthread_spinlock_t_));\n  printf(\"%30s %4d\\n\", \"pthread_barrier_t_\", sizeof(struct pthread_barrier_t_));\n  printf(\"%30s %4d\\n\", \"pthread_barrierattr_t_\", sizeof(struct pthread_barrierattr_t_));\n  printf(\"%30s %4d\\n\", \"pthread_key_t_\", sizeof(struct pthread_key_t_));\n  printf(\"%30s %4d\\n\", \"pthread_cond_t_\", sizeof(struct pthread_cond_t_));\n  printf(\"%30s %4d\\n\", \"pthread_condattr_t_\", sizeof(struct pthread_condattr_t_));\n  printf(\"%30s %4d\\n\", \"pthread_rwlock_t_\", sizeof(struct pthread_rwlock_t_));\n  printf(\"%30s %4d\\n\", \"pthread_rwlockattr_t_\", sizeof(struct pthread_rwlockattr_t_));\n  printf(\"%30s %4d\\n\", \"pthread_once_t_\", sizeof(struct pthread_once_t_));\n  printf(\"%30s %4d\\n\", \"ptw32_cleanup_t\", sizeof(struct ptw32_cleanup_t));\n  printf(\"%30s %4d\\n\", \"ptw32_mcs_node_t_\", sizeof(struct ptw32_mcs_node_t_));\n  printf(\"%30s %4d\\n\", \"sched_param\", sizeof(struct sched_param));\n  printf(\"-------------------------------\\n\");\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/sizes.gc",
    "content": "Sizes of pthreads-win32 structs\n-------------------------------\n                     pthread_t    8\n                ptw32_thread_t  140\n               pthread_attr_t_   28\n                        sem_t_   12\n              pthread_mutex_t_   24\n          pthread_mutexattr_t_    8\n           pthread_spinlock_t_    8\n            pthread_barrier_t_   24\n        pthread_barrierattr_t_    4\n                pthread_key_t_   16\n               pthread_cond_t_   32\n           pthread_condattr_t_    4\n             pthread_rwlock_t_   28\n         pthread_rwlockattr_t_    4\n               pthread_once_t_   16\n               ptw32_cleanup_t   12\n             ptw32_mcs_node_t_   16\n                   sched_param    4\n-------------------------------\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/sizes.gce",
    "content": "Sizes of pthreads-win32 structs\n-------------------------------\n                     pthread_t    8\n                ptw32_thread_t   76\n               pthread_attr_t_   28\n                        sem_t_   12\n              pthread_mutex_t_   24\n          pthread_mutexattr_t_    8\n           pthread_spinlock_t_    8\n            pthread_barrier_t_   24\n        pthread_barrierattr_t_    4\n                pthread_key_t_   16\n               pthread_cond_t_   32\n           pthread_condattr_t_    4\n             pthread_rwlock_t_   28\n         pthread_rwlockattr_t_    4\n               pthread_once_t_   16\n               ptw32_cleanup_t   12\n             ptw32_mcs_node_t_   16\n                   sched_param    4\n-------------------------------\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/sizes.vc",
    "content": "Sizes of pthreads-win32 structs\n-------------------------------\n                     pthread_t    8\n                ptw32_thread_t  140\n               pthread_attr_t_   28\n                        sem_t_   12\n              pthread_mutex_t_   24\n          pthread_mutexattr_t_    8\n           pthread_spinlock_t_    8\n            pthread_barrier_t_   24\n        pthread_barrierattr_t_    4\n                pthread_key_t_   16\n               pthread_cond_t_   32\n           pthread_condattr_t_    4\n             pthread_rwlock_t_   28\n         pthread_rwlockattr_t_    4\n               pthread_once_t_   16\n               ptw32_cleanup_t   12\n             ptw32_mcs_node_t_   16\n                   sched_param    4\n-------------------------------\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/sizes.vse",
    "content": "Sizes of pthreads-win32 structs\n-------------------------------\n                     pthread_t    8\n                ptw32_thread_t   76\n               pthread_attr_t_   28\n                        sem_t_   12\n              pthread_mutex_t_   24\n          pthread_mutexattr_t_    8\n           pthread_spinlock_t_    8\n            pthread_barrier_t_   24\n        pthread_barrierattr_t_    4\n                pthread_key_t_   16\n               pthread_cond_t_   32\n           pthread_condattr_t_    4\n             pthread_rwlock_t_   28\n         pthread_rwlockattr_t_    4\n               pthread_once_t_   16\n               ptw32_cleanup_t   12\n             ptw32_mcs_node_t_   16\n                   sched_param    4\n-------------------------------\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/spin1.c",
    "content": "/* \n * spin1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Create a simple spinlock object, lock it, and then unlock it again.\n * This is the simplest test of the pthread mutex family that we can do.\n *\n */\n\n#include \"test.h\"\n\npthread_spinlock_t lock;\n\nint\nmain()\n{\n  assert(pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE) == 0);\n\n  assert(pthread_spin_lock(&lock) == 0);\n\n  assert(pthread_spin_unlock(&lock) == 0);\n\n  assert(pthread_spin_destroy(&lock) == 0);\n\n  assert(pthread_spin_lock(&lock) == EINVAL);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/spin2.c",
    "content": "/* \n * spin2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a spinlock object, lock it, trylock it, \n * and then unlock it again.\n *\n */\n\n#include \"test.h\"\n \npthread_spinlock_t lock = NULL;\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  assert(pthread_spin_trylock(&lock) == EBUSY);\n\n  washere = 1;\n\n  return 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  assert(pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE) == 0);\n\n  assert(pthread_spin_lock(&lock) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n  assert(pthread_join(t, NULL) == 0);\n\n  assert(pthread_spin_unlock(&lock) == 0);\n\n  assert(pthread_spin_destroy(&lock) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/spin3.c",
    "content": "/* \n * spin3.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Thread A locks spin - thread B tries to unlock.\n * This should succeed, but it's undefined behaviour.\n *\n */\n\n#include \"test.h\"\n\nstatic int wasHere = 0;\n\nstatic pthread_spinlock_t spin;\n \nvoid * unlocker(void * arg)\n{\n  int expectedResult = (int) arg;\n\n  wasHere++;\n  assert(pthread_spin_unlock(&spin) == expectedResult);\n  wasHere++;\n  return NULL;\n}\n \nint\nmain()\n{\n  pthread_t t;\n\n  wasHere = 0;\n  assert(pthread_spin_init(&spin, PTHREAD_PROCESS_PRIVATE) == 0);\n  assert(pthread_spin_lock(&spin) == 0);\n  assert(pthread_create(&t, NULL, unlocker, (void *) 0) == 0);\n  assert(pthread_join(t, NULL) == 0);\n  assert(pthread_spin_unlock(&spin) == EPERM);\n  assert(pthread_spin_destroy(&spin) == 0);\n  assert(wasHere == 2);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/spin4.c",
    "content": "/* \n * spin4.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Declare a static spinlock object, lock it, spin on it, \n * and then unlock it again.\n */\n\n#include \"test.h\"\n#include <sys/timeb.h>\n \npthread_spinlock_t lock = PTHREAD_SPINLOCK_INITIALIZER;\nstruct _timeb currSysTimeStart;\nstruct _timeb currSysTimeStop;\n\n#define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \\\n\t\t\t\t\t       - (_TStart.time*1000+_TStart.millitm))\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  _ftime(&currSysTimeStart);\n  washere = 1;\n  assert(pthread_spin_lock(&lock) == 0);\n  assert(pthread_spin_unlock(&lock) == 0);\n  _ftime(&currSysTimeStop);\n\n  return (void *) GetDurationMilliSecs(currSysTimeStart, currSysTimeStop);\n}\n \nint\nmain()\n{\n  long result = 0;\n  pthread_t t;\n  int CPUs;\n  struct _timeb sysTime;\n\n  if ((CPUs = pthread_num_processors_np()) == 1)\n    {\n      printf(\"Test not run - it requires multiple CPUs.\\n\");\n\texit(0);\n    }\n\n  assert(pthread_spin_lock(&lock) == 0);\n\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n\n  while (washere == 0)\n    {\n      sched_yield();\n    }\n\n  do\n    {\n      sched_yield();\n      _ftime(&sysTime);\n    }\n  while (GetDurationMilliSecs(currSysTimeStart, sysTime) <= 1000);\n\n  assert(pthread_spin_unlock(&lock) == 0);\n\n  assert(pthread_join(t, (void **) &result) == 0);\n  assert(result > 1000);\n\n  assert(pthread_spin_destroy(&lock) == 0);\n\n  assert(washere == 1);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/stress1.c",
    "content": "/*\r\n * stress1.c\r\n *\r\n *\r\n * --------------------------------------------------------------------------\r\n *\r\n *      Pthreads-win32 - POSIX Threads Library for Win32\r\n *      Copyright(C) 1998 John E. Bossom\r\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\r\n * \r\n *      Contact Email: rpj@callisto.canberra.edu.au\r\n * \r\n *      The current list of contributors is contained\r\n *      in the file CONTRIBUTORS included with the source\r\n *      code distribution. The list can also be seen at the\r\n *      following World Wide Web location:\r\n *      http://sources.redhat.com/pthreads-win32/contributors.html\r\n * \r\n *      This library is free software; you can redistribute it and/or\r\n *      modify it under the terms of the GNU Lesser General Public\r\n *      License as published by the Free Software Foundation; either\r\n *      version 2 of the License, or (at your option) any later version.\r\n * \r\n *      This library is distributed in the hope that it will be useful,\r\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *      Lesser General Public License for more details.\r\n * \r\n *      You should have received a copy of the GNU Lesser General Public\r\n *      License along with this library in the file COPYING.LIB;\r\n *      if not, write to the Free Software Foundation, Inc.,\r\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\r\n *\r\n * --------------------------------------------------------------------------\r\n *\r\n * Test Synopsis:\r\n * - Stress test condition variables, mutexes, semaphores.\r\n *\r\n * Test Method (Validation or Falsification):\r\n * - Validation\r\n *\r\n * Requirements Tested:\r\n * - Correct accounting of semaphore and condition variable waiters.\r\n *\r\n * Features Tested:\r\n * - \r\n *\r\n * Cases Tested:\r\n * - \r\n *\r\n * Description:\r\n * Attempting to expose race conditions in cond vars, semaphores etc.\r\n * - Master attempts to signal slave close to when timeout is due.\r\n * - Master and slave do battle continuously until main tells them to stop.\r\n * - Afterwards, the CV must be successfully destroyed (will return an\r\n * error if there are waiters (including any internal semaphore waiters,\r\n * which, if there are, cannot not be real waiters).\r\n *\r\n * Environment:\r\n * - \r\n *\r\n * Input:\r\n * - None.\r\n *\r\n * Output:\r\n * - File name, Line number, and failed expression on failure.\r\n * - No output on success.\r\n *\r\n * Assumptions:\r\n * - \r\n *\r\n * Pass Criteria:\r\n * - CV is successfully destroyed.\r\n *\r\n * Fail Criteria:\r\n * - CV destroy fails.\r\n */\r\n\r\n#include \"test.h\"\r\n#include <string.h>\r\n#include <sys/timeb.h>\r\n\r\n\r\nconst unsigned int ITERATIONS = 1000;\r\n\r\nstatic pthread_t master, slave;\r\ntypedef struct {\r\n  int value;\r\n  pthread_cond_t cv;\r\n  pthread_mutex_t mx;\r\n} mysig_t;\r\n\r\nstatic int allExit;\r\nstatic mysig_t control = {0, PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER};\r\nstatic pthread_barrier_t startBarrier, readyBarrier, holdBarrier;\r\nstatic int timeoutCount = 0;\r\nstatic int signalsTakenCount = 0;\r\nstatic int signalsSent = 0;\r\nstatic int bias = 0;\r\nstatic int timeout = 10;\r // Must be > 0\r\n\r\nenum {\r\n  CTL_STOP     = -1\r\n};\r\n\r\n/*\r\n * Returns abstime 'milliseconds' from 'now'.\r\n *\r\n * Works for: -INT_MAX <= millisecs <= INT_MAX\r\n */\r\nstruct timespec *\r\nmillisecondsFromNow (struct timespec * time, int millisecs)\r\n{\r\n  struct _timeb currSysTime;\r\n  int64_t nanosecs, secs;\r\n  const int64_t NANOSEC_PER_MILLISEC = 1000000;\r\n  const int64_t NANOSEC_PER_SEC = 1000000000;\r\n\r\n  /* get current system time and add millisecs */\r\n  _ftime(&currSysTime);\r\n\r\n  secs = (int64_t)(currSysTime.time) + (millisecs / 1000);\r\n  nanosecs = ((int64_t) (millisecs%1000 + currSysTime.millitm)) * NANOSEC_PER_MILLISEC;\r\n  if (nanosecs >= NANOSEC_PER_SEC)\r\n    {\r\n      secs++;\r\n      nanosecs -= NANOSEC_PER_SEC;\r\n    }\r\n  else if (nanosecs < 0)\r\n    {\r\n      secs--;\r\n      nanosecs += NANOSEC_PER_SEC;\r\n    }\r\n\r\n  time->tv_nsec = (long)nanosecs;\r\n  time->tv_sec = (long)secs;\r\n\r\n  return time;\r\n}\r\n\r\nvoid *\r\nmasterThread (void * arg)\r\n{\r\n  int dither = (int) arg;\r\n\r\n  timeout = (int) arg;\r\n\r\n  pthread_barrier_wait(&startBarrier);\r\n\r\n  do\r\n    {\r\n      int sleepTime;\r\n\r\n      assert(pthread_mutex_lock(&control.mx) == 0);\r\n      control.value = timeout;\r\n      assert(pthread_mutex_unlock(&control.mx) == 0);\r\n\r\n      /*\r\n       * We are attempting to send the signal close to when the slave\r\n       * is due to timeout. We feel around by adding some [non-random] dither.\r\n       *\r\n       * dither is in the range 2*timeout peak-to-peak\r\n       * sleep time is the average of timeout plus dither.\r\n       * e.g.\r\n       * if timeout = 10 then dither = 20 and\r\n       * sleep millisecs is: 5 <= ms <= 15\r\n       *\r\n       * The bias value attempts to apply some negative feedback to keep\r\n       * the ratio of timeouts to signals taken close to 1:1.\r\n       * bias changes more slowly than dither so as to average more.\r\n       *\r\n       * Finally, if abs(bias) exceeds timeout then timeout is incremented.\r\n       */\r\n      if (signalsSent % timeout == 0)\r\n\t{\r\n          if (timeoutCount > signalsTakenCount)\r\n\t    {\r\n\t      bias++;\r\n\t    }\r\n          else if (timeoutCount < signalsTakenCount)\r\n\t    {\r\n\t      bias--;\r\n\t    }\r\n\t  if (bias < -timeout || bias > timeout)\r\n\t    {\r\n\t      timeout++;\r\n\t    }\r\n\t}\r\n      dither = (dither + 1 ) % (timeout * 2);\r\n      sleepTime = (timeout - bias + dither) / 2;\r\n      Sleep(sleepTime);\r\n      assert(pthread_cond_signal(&control.cv) == 0);\r\n      signalsSent++;\r\n\r\n      pthread_barrier_wait(&holdBarrier);\r\n      pthread_barrier_wait(&readyBarrier);\r\n    }\r\n  while (!allExit);\r\n\r\n  return NULL;\r\n}\r\n\r\nvoid *\r\nslaveThread (void * arg)\r\n{\r\n  struct timespec time;\r\n\r\n  pthread_barrier_wait(&startBarrier);\r\n\r\n  do\r\n    {\r\n      assert(pthread_mutex_lock(&control.mx) == 0);\r\n      if (pthread_cond_timedwait(&control.cv,\r\n\t\t\t\t &control.mx,\r\n\t\t\t\t millisecondsFromNow(&time, control.value)) == ETIMEDOUT)\r\n\t{\r\n\t  timeoutCount++;\r\n\t}\r\n      else\r\n\t{\r\n\t  signalsTakenCount++;\r\n\t}\r\n      assert(pthread_mutex_unlock(&control.mx) == 0);\r\n\r\n      pthread_barrier_wait(&holdBarrier);\r\n      pthread_barrier_wait(&readyBarrier);\r\n    }\r\n  while (!allExit);\r\n\r\n  return NULL;\r\n}\r\n\r\nint\r\nmain ()\r\n{\r\n  unsigned int i;\r\n\r\n  assert(pthread_barrier_init(&startBarrier, NULL, 3) == 0);\r\n  assert(pthread_barrier_init(&readyBarrier, NULL, 3) == 0);\r\n  assert(pthread_barrier_init(&holdBarrier, NULL, 3) == 0);\r\n\r\n  assert(pthread_create(&master, NULL, masterThread, (void *) timeout) == 0);\r\n  assert(pthread_create(&slave, NULL, slaveThread, NULL) == 0);\r\n\r\n  allExit = FALSE;\r\n\r\n  pthread_barrier_wait(&startBarrier);\r\n\r\n  for (i = 1; !allExit; i++)\r\n    {\r\n      pthread_barrier_wait(&holdBarrier);\r\n      if (i >= ITERATIONS)\r\n\t{\r\n\t  allExit = TRUE;\r\n\t}\r\n      pthread_barrier_wait(&readyBarrier);\r\n    }\r\n\r\n  assert(pthread_join(slave, NULL) == 0);\r\n  assert(pthread_join(master, NULL) == 0);\r\n\r\n  printf(\"Signals sent = %d\\nWait timeouts = %d\\nSignals taken = %d\\nBias = %d\\nTimeout = %d\\n\",\r\n\t signalsSent,\r\n\t timeoutCount,\r\n\t signalsTakenCount,\r\n\t (int) bias,\r\n\t timeout);\r\n\r\n  /* Cleanup */\r\n  assert(pthread_barrier_destroy(&holdBarrier) == 0);\r\n  assert(pthread_barrier_destroy(&readyBarrier) == 0);\r\n  assert(pthread_barrier_destroy(&startBarrier) == 0);\r\n  assert(pthread_cond_destroy(&control.cv) == 0);\r\n  assert(pthread_mutex_destroy(&control.mx) == 0);\r\n\r\n  /* Success. */\r\n  return 0;\r\n}\r\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/test.h",
    "content": "/* \n * test.h\n *\n * Useful definitions and declarations for tests.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n */\n\n#ifndef _PTHREAD_TEST_H_\n#define _PTHREAD_TEST_H_\n\n#include \"pthread.h\"\n#include \"sched.h\"\n#include \"semaphore.h\"\n\n#include <windows.h>\n#include <stdio.h>\n\n#define PTW32_THREAD_NULL_ID {NULL,0}\n\n#if defined(__MINGW32__)\n#include <stdint.h>\n#elif defined(__BORLANDC__)\n#define int64_t ULONGLONG\n#else\n#define int64_t _int64\n#endif\n\n\nchar * error_string[] = {\n  \"ZERO_or_EOK\",\n  \"EPERM\",\n  \"ENOFILE_or_ENOENT\",\n  \"ESRCH\",\n  \"EINTR\",\n  \"EIO\",\n  \"ENXIO\",\n  \"E2BIG\",\n  \"ENOEXEC\",\n  \"EBADF\",\n  \"ECHILD\",\n  \"EAGAIN\",\n  \"ENOMEM\",\n  \"EACCES\",\n  \"EFAULT\",\n  \"UNKNOWN_15\",\n  \"EBUSY\",\n  \"EEXIST\",\n  \"EXDEV\",\n  \"ENODEV\",\n  \"ENOTDIR\",\n  \"EISDIR\",\n  \"EINVAL\",\n  \"ENFILE\",\n  \"EMFILE\",\n  \"ENOTTY\",\n  \"UNKNOWN_26\",\n  \"EFBIG\",\n  \"ENOSPC\",\n  \"ESPIPE\",\n  \"EROFS\",\n  \"EMLINK\",\n  \"EPIPE\",\n  \"EDOM\",\n  \"ERANGE\",\n  \"UNKNOWN_35\",\n  \"EDEADLOCK_or_EDEADLK\",\n  \"UNKNOWN_37\",\n  \"ENAMETOOLONG\",\n  \"ENOLCK\",\n  \"ENOSYS\",\n  \"ENOTEMPTY\",\n  \"EILSEQ\",\n};\n\n/*\n * The Mingw32 assert macro calls the CRTDLL _assert function\n * which pops up a dialog. We want to run in batch mode so\n * we define our own assert macro.\n */\n#ifdef assert\n# undef assert\n#endif\n\n#ifndef ASSERT_TRACE\n# define ASSERT_TRACE 0\n#else\n# undef ASSERT_TRACE\n# define ASSERT_TRACE 1\n#endif\n\n# define assert(e) \\\n   ((e) ? ((ASSERT_TRACE) ? fprintf(stderr, \\\n                                    \"Assertion succeeded: (%s), file %s, line %d\\n\", \\\n\t\t\t            #e, __FILE__, (int) __LINE__), \\\n\t                            fflush(stderr) : \\\n                             0) : \\\n          (fprintf(stderr, \"Assertion failed: (%s), file %s, line %d\\n\", \\\n                   #e, __FILE__, (int) __LINE__), exit(1), 0))\n\nint assertE;\n# define assert_e(e, o, r) \\\n   (((assertE = e) o (r)) ? ((ASSERT_TRACE) ? fprintf(stderr, \\\n                                    \"Assertion succeeded: (%s), file %s, line %d\\n\", \\\n\t\t\t            #e, __FILE__, (int) __LINE__), \\\n\t                            fflush(stderr) : \\\n                             0) : \\\n          (fprintf(stderr, \"Assertion failed: (%s %s %s), file %s, line %d, error %s\\n\", \\\n                   #e,#o,#r, __FILE__, (int) __LINE__, error_string[assertE]), exit(1), 0))\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/tryentercs.c",
    "content": "/*\n * tryentercs.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * See if we have the TryEnterCriticalSection function.\n * Does not use any part of pthreads.\n */\n\n#include <windows.h>\n#include <process.h>\n#include <stdio.h>\n\n/*\n * Function pointer to TryEnterCriticalSection if it exists\n * - otherwise NULL\n */\nBOOL (WINAPI *_try_enter_critical_section)(LPCRITICAL_SECTION) =\nNULL;\n\n/*\n * Handle to kernel32.dll\n */\nstatic HINSTANCE _h_kernel32;\n\n\nint\nmain()\n{\n  CRITICAL_SECTION cs;\n\n  SetLastError(0);\n\n  printf(\"Last Error [main enter] %ld\\n\", (long) GetLastError());\n\n  /*\n   * Load KERNEL32 and try to get address of TryEnterCriticalSection\n   */\n  _h_kernel32 = LoadLibrary(TEXT(\"KERNEL32.DLL\"));\n  _try_enter_critical_section =\n        (BOOL (PT_STDCALL *)(LPCRITICAL_SECTION))\n        GetProcAddress(_h_kernel32,\n                         (LPCSTR) \"TryEnterCriticalSection\");\n\n  if (_try_enter_critical_section != NULL)\n    {\n      InitializeCriticalSection(&cs);\n\n      SetLastError(0);\n\n      if ((*_try_enter_critical_section)(&cs) != 0)\n        {\n          LeaveCriticalSection(&cs);\n        }\n\telse\n\t  {\n\t    printf(\"Last Error [try enter] %ld\\n\", (long) GetLastError());\n\n\t    _try_enter_critical_section = NULL;\n\t  }\n      DeleteCriticalSection(&cs);\n    }\n\n  (void) FreeLibrary(_h_kernel32);\n\n  printf(\"This system %s TryEnterCriticalSection.\\n\",\n         (_try_enter_critical_section == NULL) ? \"DOES NOT SUPPORT\" : \"SUPPORTS\");\n  printf(\"POSIX Mutexes will be based on Win32 %s.\\n\",\n         (_try_enter_critical_section == NULL) ? \"Mutexes\" : \"Critical Sections\");\n\n  return(0);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/tryentercs2.c",
    "content": "/*\n * tryentercs.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * See if we have the TryEnterCriticalSection function.\n * Does not use any part of pthreads.\n */\n\n#include <windows.h>\n#include <process.h>\n#include <stdio.h>\n\n/*\n * Function pointer to TryEnterCriticalSection if it exists\n * - otherwise NULL\n */\nBOOL (WINAPI *_try_enter_critical_section)(LPCRITICAL_SECTION) = NULL;\n\n/*\n * Handle to kernel32.dll\n */\nstatic HINSTANCE _h_kernel32;\n\n\nint\nmain()\n{\n  LPCRITICAL_SECTION lpcs = NULL;\n\n  SetLastError(0);\n\n  printf(\"Last Error [main enter] %ld\\n\", (long) GetLastError());\n\n  /*\n   * Load KERNEL32 and try to get address of TryEnterCriticalSection\n   */\n  _h_kernel32 = LoadLibrary(TEXT(\"KERNEL32.DLL\"));\n  _try_enter_critical_section =\n        (BOOL (PT_STDCALL *)(LPCRITICAL_SECTION))\n        GetProcAddress(_h_kernel32,\n                         (LPCSTR) \"TryEnterCriticalSection\");\n\n  if (_try_enter_critical_section != NULL)\n    {\n      SetLastError(0);\n\n      (*_try_enter_critical_section)(lpcs);\n\n      printf(\"Last Error [try enter] %ld\\n\", (long) GetLastError());\n    }\n\n  (void) FreeLibrary(_h_kernel32);\n\n  printf(\"This system %s TryEnterCriticalSection.\\n\",\n         (_try_enter_critical_section == NULL) ? \"DOES NOT SUPPORT\" : \"SUPPORTS\");\n  printf(\"POSIX Mutexes will be based on Win32 %s.\\n\",\n         (_try_enter_critical_section == NULL) ? \"Mutexes\" : \"Critical Sections\");\n\n  return(0);\n}\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/tsd1.c",
    "content": "/*\n * tsd1.c\n *\n * Test Thread Specific Data (TSD) key creation and destruction.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n *\n * --------------------------------------------------------------------------\n *\n * Description:\n * - \n *\n * Test Method (validation or falsification):\n * - validation\n *\n * Requirements Tested:\n * - keys are created for each existing thread including the main thread\n * - keys are created for newly created threads\n * - keys are thread specific\n * - destroy routine is called on each thread exit including the main thread\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - none\n *\n * Output:\n * - text to stdout\n *\n * Assumptions:\n * - already validated:     pthread_create()\n *                          pthread_once()\n * - main thread also has a POSIX thread identity\n *\n * Pass Criteria:\n * - stdout matches file reference/tsd1.out\n *\n * Fail Criteria:\n * - fails to match file reference/tsd1.out\n * - output identifies failed component\n */\n\n#include <sched.h>\n#include \"test.h\"\n\nenum {\n  NUM_THREADS = 100\n};\n\nstatic pthread_key_t key = NULL;\nstatic int accesscount[NUM_THREADS];\nstatic int thread_set[NUM_THREADS];\nstatic int thread_destroyed[NUM_THREADS];\nstatic pthread_barrier_t startBarrier;\n\nstatic void\ndestroy_key(void * arg)\n{\n  int * j = (int *) arg;\n\n  (*j)++;\n\n  assert(*j == 2);\n\n  thread_destroyed[j - accesscount] = 1;\n}\n\nstatic void\nsetkey(void * arg)\n{\n  int * j = (int *) arg;\n\n  thread_set[j - accesscount] = 1;\n\n  assert(*j == 0);\n\n  assert(pthread_getspecific(key) == NULL);\n\n  assert(pthread_setspecific(key, arg) == 0);\n  assert(pthread_setspecific(key, arg) == 0);\n  assert(pthread_setspecific(key, arg) == 0);\n\n  assert(pthread_getspecific(key) == arg);\n\n  (*j)++;\n\n  assert(*j == 1);\n}\n\nstatic void *\nmythread(void * arg)\n{\n  (void) pthread_barrier_wait(&startBarrier);\n\n  setkey(arg);\n\n  return 0;\n\n  /* Exiting the thread will call the key destructor. */\n}\n\nint\nmain()\n{\n  int i;\n  int fail = 0;\n  pthread_t thread[NUM_THREADS];\n\n  assert(pthread_barrier_init(&startBarrier, NULL, NUM_THREADS/2) == 0);\n\n  for (i = 1; i < NUM_THREADS/2; i++)\n    {\n      accesscount[i] = thread_set[i] = thread_destroyed[i] = 0;\n      assert(pthread_create(&thread[i], NULL, mythread, (void *)&accesscount[i]) == 0);\n    }\n\n  /*\n   * Here we test that existing threads will get a key created\n   * for them.\n   */\n  assert(pthread_key_create(&key, destroy_key) == 0);\n\n  (void) pthread_barrier_wait(&startBarrier);\n\n  /*\n   * Test main thread key.\n   */\n  accesscount[0] = 0;\n  setkey((void *) &accesscount[0]);\n\n  /*\n   * Here we test that new threads will get a key created\n   * for them.\n   */\n  for (i = NUM_THREADS/2; i < NUM_THREADS; i++)\n    {\n      accesscount[i] = thread_set[i] = thread_destroyed[i] = 0;\n      assert(pthread_create(&thread[i], NULL, mythread, (void *)&accesscount[i]) == 0);\n    }\n\n  /*\n   * Wait for all threads to complete.\n   */\n  for (i = 1; i < NUM_THREADS; i++)\n    {\n\tint result = 0;\n\n\tassert(pthread_join(thread[i], (void **) &result) == 0);\n    }\n\n  assert(pthread_key_delete(key) == 0);\n\n  assert(pthread_barrier_destroy(&startBarrier) == 0);\n\n  for (i = 1; i < NUM_THREADS; i++)\n    {\n\t/*\n\t * The counter is incremented once when the key is set to\n\t * a value, and again when the key is destroyed. If the key\n\t * doesn't get set for some reason then it will still be\n\t * NULL and the destroy function will not be called, and\n\t * hence accesscount will not equal 2.\n\t */\n\tif (accesscount[i] != 2)\n\t  {\n\t    fail++;\n\t    fprintf(stderr, \"Thread %d key, set = %d, destroyed = %d\\n\",\n\t\t\ti, thread_set[i], thread_destroyed[i]);\n\t  }\n    }\n\n  fflush(stderr);\n\n  return (fail);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/tsd2.c",
    "content": "/*\n * tsd2.c\n *\n * Test Thread Specific Data (TSD) key creation and destruction.\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n *\n * --------------------------------------------------------------------------\n *\n * Description:\n * - \n *\n * Test Method (validation or falsification):\n * - validation\n *\n * Requirements Tested:\n * - keys are created for each existing thread including the main thread\n * - keys are created for newly created threads\n * - keys are thread specific\n * - destroy routine is called on each thread exit including the main thread\n *\n * Features Tested:\n * - \n *\n * Cases Tested:\n * - \n *\n * Environment:\n * - \n *\n * Input:\n * - none\n *\n * Output:\n * - text to stdout\n *\n * Assumptions:\n * - already validated:     pthread_create()\n *                          pthread_once()\n * - main thread also has a POSIX thread identity\n *\n * Pass Criteria:\n * - stdout matches file reference/tsd1.out\n *\n * Fail Criteria:\n * - fails to match file reference/tsd1.out\n * - output identifies failed component\n */\n\n#include <sched.h>\n#include \"test.h\"\n\nenum {\n  NUM_THREADS = 100\n};\n\nstatic pthread_key_t key = NULL;\nstatic int accesscount[NUM_THREADS];\nstatic int thread_set[NUM_THREADS];\nstatic int thread_destroyed[NUM_THREADS];\nstatic pthread_barrier_t startBarrier;\n\nstatic void\ndestroy_key(void * arg)\n{\n  int * j = (int *) arg;\n\n  (*j)++;\n\n  /* Set TSD key from the destructor to test destructor iteration */\n  if (*j == 2)\n    assert(pthread_setspecific(key, arg) == 0);\n  else\n    assert(*j == 3);\n\n  thread_destroyed[j - accesscount] = 1;\n}\n\nstatic void\nsetkey(void * arg)\n{\n  int * j = (int *) arg;\n\n  thread_set[j - accesscount] = 1;\n\n  assert(*j == 0);\n\n  assert(pthread_getspecific(key) == NULL);\n\n  assert(pthread_setspecific(key, arg) == 0);\n  assert(pthread_setspecific(key, arg) == 0);\n  assert(pthread_setspecific(key, arg) == 0);\n\n  assert(pthread_getspecific(key) == arg);\n\n  (*j)++;\n\n  assert(*j == 1);\n}\n\nstatic void *\nmythread(void * arg)\n{\n  (void) pthread_barrier_wait(&startBarrier);\n\n  setkey(arg);\n\n  return 0;\n\n  /* Exiting the thread will call the key destructor. */\n}\n\nint\nmain()\n{\n  int i;\n  int fail = 0;\n  pthread_t thread[NUM_THREADS];\n\n  assert(pthread_barrier_init(&startBarrier, NULL, NUM_THREADS/2) == 0);\n\n  for (i = 1; i < NUM_THREADS/2; i++)\n    {\n      accesscount[i] = thread_set[i] = thread_destroyed[i] = 0;\n      assert(pthread_create(&thread[i], NULL, mythread, (void *)&accesscount[i]) == 0);\n    }\n\n  /*\n   * Here we test that existing threads will get a key created\n   * for them.\n   */\n  assert(pthread_key_create(&key, destroy_key) == 0);\n\n  (void) pthread_barrier_wait(&startBarrier);\n\n  /*\n   * Test main thread key.\n   */\n  accesscount[0] = 0;\n  setkey((void *) &accesscount[0]);\n\n  /*\n   * Here we test that new threads will get a key created\n   * for them.\n   */\n  for (i = NUM_THREADS/2; i < NUM_THREADS; i++)\n    {\n      accesscount[i] = thread_set[i] = thread_destroyed[i] = 0;\n      assert(pthread_create(&thread[i], NULL, mythread, (void *)&accesscount[i]) == 0);\n    }\n\n  /*\n   * Wait for all threads to complete.\n   */\n  for (i = 1; i < NUM_THREADS; i++)\n    {\n\tint result = 0;\n\n\tassert(pthread_join(thread[i], (void **) &result) == 0);\n    }\n\n  assert(pthread_key_delete(key) == 0);\n\n  assert(pthread_barrier_destroy(&startBarrier) == 0);\n\n  for (i = 1; i < NUM_THREADS; i++)\n    {\n\t/*\n\t * The counter is incremented once when the key is set to\n\t * a value, and again when the key is destroyed. If the key\n\t * doesn't get set for some reason then it will still be\n\t * NULL and the destroy function will not be called, and\n\t * hence accesscount will not equal 2.\n\t */\n\tif (accesscount[i] != 3)\n\t  {\n\t    fail++;\n\t    fprintf(stderr, \"Thread %d key, set = %d, destroyed = %d\\n\",\n\t\t\ti, thread_set[i], thread_destroyed[i]);\n\t  }\n    }\n\n  fflush(stderr);\n\n  return (fail);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/valid1.c",
    "content": "/*\n * File: valid1.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Test that thread validation works.\n *\n * Test Method (Validation or Falsification):\n * -\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * -\n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n\nenum {\n\tNUMTHREADS = 1\n};\n\nstatic int washere = 0;\n\nvoid * func(void * arg)\n{\n  washere = 1;\n  return (void *) 0; \n}\n \nint\nmain()\n{\n  pthread_t t;\n  void * result = NULL;\n\n  washere = 0;\n  assert(pthread_create(&t, NULL, func, NULL) == 0);\n  assert(pthread_join(t, &result) == 0);\n  assert(result == 0);\n  assert(washere == 1);\n  sched_yield();\n  assert(pthread_kill(t, 0) == ESRCH);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tests/valid2.c",
    "content": "/*\n * File: valid2.c\n *\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Test Synopsis:\n * - Confirm that thread validation fails for garbage thread ID.\n *\n * Test Method (Validation or Falsification):\n * -\n *\n * Requirements Tested:\n * -\n *\n * Features Tested:\n * -\n *\n * Cases Tested:\n * -\n *\n * Description:\n * -\n *\n * Environment:\n * -\n *\n * Input:\n * - None.\n *\n * Output:\n * - File name, Line number, and failed expression on failure.\n * - No output on success.\n *\n * Assumptions:\n * -\n *\n * Pass Criteria:\n * - Process returns zero exit status.\n *\n * Fail Criteria:\n * - Process returns non-zero exit status.\n */\n\n#include \"test.h\"\n \nint\nmain()\n{\n  pthread_t NullThread = PTW32_THREAD_NULL_ID;\n\n  assert(pthread_kill(NullThread, 0) == ESRCH);\n\n  return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/tsd.c",
    "content": "/*\n * tsd.c\n *\n * Description:\n * POSIX thread functions which implement thread-specific data (TSD).\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\n#include \"pthread_key_create.c\"\n#include \"pthread_key_delete.c\"\n#include \"pthread_setspecific.c\"\n#include \"pthread_getspecific.c\"\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/version.rc",
    "content": "/* This is an implementation of the threads API of POSIX 1003.1-2001.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include <winver.h>\n#include \"pthread.h\"\n\n/*\n * Note: the correct __CLEANUP_* macro must be defined corresponding to\n * the definition used for the object file builds. This is done in the\n * relevent makefiles for the command line builds, but users should ensure\n * that their resource compiler knows what it is too.\n * If using the default (no __CLEANUP_* defined), pthread.h will define it\n * as __CLEANUP_C.\n */\n\n#ifdef PTW32_RC_MSC\n#  if defined(__CLEANUP_C)\n#    define PTW32_VERSIONINFO_NAME \"pthreadVC\\0\"\n#    define PTW32_VERSIONINFO_COMMENT \"MS C build -- longjmp thread exiting\\0\"\n#  elif defined(__CLEANUP_CXX)\n#    define PTW32_VERSIONINFO_NAME \"pthreadVCE\\0\"\n#    define PTW32_VERSIONINFO_COMMENT \"MS C++ build -- C++ exception thread exiting\\0\"\n#  elif defined(__CLEANUP_SEH)\n#    define PTW32_VERSIONINFO_NAME \"pthreadVSE\\0\"\n#    define PTW32_VERSIONINFO_COMMENT \"MS C build -- structured exception thread exiting\\0\"\n#  else\n#    error Resource compiler doesn't know which cleanup style you're using - see version.rc\n#  endif\n#elif defined(__GNUC__)\n#  if defined(__CLEANUP_C)\n#    define PTW32_VERSIONINFO_NAME \"pthreadGC\\0\"\n#    define PTW32_VERSIONINFO_COMMENT \"GNU C build -- longjmp thread exiting\\0\"\n#  elif defined(__CLEANUP_CXX)\n#    define PTW32_VERSIONINFO_NAME \"pthreadGCE\\0\"\n#    define PTW32_VERSIONINFO_COMMENT \"GNU C++ build -- C++ exception thread exiting\\0\"\n#  else\n#    error Resource compiler doesn't know which cleanup style you're using - see version.rc\n#  endif\n#elif defined(__BORLANDC__)\n#  if defined(__CLEANUP_C)\n#    define PTW32_VERSIONINFO_NAME \"pthreadBC\\0\"\n#    define PTW32_VERSIONINFO_COMMENT \"BORLAND C build -- longjmp thread exiting\\0\"\n#  elif defined(__CLEANUP_CXX)\n#    define PTW32_VERSIONINFO_NAME \"pthreadBCE\\0\"\n#    define PTW32_VERSIONINFO_COMMENT \"BORLAND C++ build -- C++ exception thread exiting\\0\"\n#  else\n#    error Resource compiler doesn't know which cleanup style you're using - see version.rc\n#  endif\n#elif defined(__WATCOMC__)\n#  if defined(__CLEANUP_C)\n#    define PTW32_VERSIONINFO_NAME \"pthreadWC\\0\"\n#    define PTW32_VERSIONINFO_COMMENT \"WATCOM C build -- longjmp thread exiting\\0\"\n#  elif defined(__CLEANUP_CXX)\n#    define PTW32_VERSIONINFO_NAME \"pthreadWCE\\0\"\n#    define PTW32_VERSIONINFO_COMMENT \"WATCOM C++ build -- C++ exception thread exiting\\0\"\n#  else\n#    error Resource compiler doesn't know which cleanup style you're using - see version.rc\n#  endif\n#else\n#  error Resource compiler doesn't know which compiler you're using - see version.rc\n#endif\n\n\nVS_VERSION_INFO VERSIONINFO\n  FILEVERSION    PTW32_VERSION\n  PRODUCTVERSION PTW32_VERSION\n  FILEFLAGSMASK  VS_FFI_FILEFLAGSMASK\n  FILEFLAGS      0\n  FILEOS         VOS__WINDOWS32\n  FILETYPE       VFT_DLL\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"040904b0\"\n        BEGIN\n            VALUE \"FileDescription\", \"POSIX Threads for Windows32 Library\\0\"\n            VALUE \"ProductVersion\", PTW32_VERSION_STRING\n            VALUE \"FileVersion\", PTW32_VERSION_STRING\n            VALUE \"InternalName\", PTW32_VERSIONINFO_NAME\n            VALUE \"OriginalFilename\", PTW32_VERSIONINFO_NAME\n            VALUE \"CompanyName\", \"Open Source Software community project\\0\"\n            VALUE \"LegalCopyright\", \"Copyright (C) Project contributors 1998-2004\\0\"\n            VALUE \"Licence\", \"LGPL\\0\"\n            VALUE \"Info\", \"http://sources.redhat.com/pthreads-win32/\\0\"\n\t    VALUE \"Comment\", PTW32_VERSIONINFO_COMMENT\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x409, 1200\n    END\nEND\n\n/*\nVERSIONINFO Resource\n\nThe VERSIONINFO resource-definition statement creates a version-information\nresource. The resource contains such information about the file as its\nversion number, its intended operating system, and its original filename.\nThe resource is intended to be used with the Version Information functions.\n\nversionID VERSIONINFO fixed-info  { block-statement...}\n\nversionID\n    Version-information resource identifier. This value must be 1.\n\nfixed-info\n    Version information, such as the file version and the intended operating\n    system. This parameter consists of the following statements.\n\n\n    Statement \t\tDescription\n    --------------------------------------------------------------------------\n    FILEVERSION\n    version \t\tBinary version number for the file. The version\n\t\t\tconsists of two 32-bit integers, defined by four\n\t\t\t16-bit integers. For example, \"FILEVERSION 3,10,0,61\"\n\t\t\tis translated into two doublewords: 0x0003000a and\n\t\t\t0x0000003d, in that order. Therefore, if version is\n\t\t\tdefined by the DWORD values dw1 and dw2, they need\n\t\t\tto appear in the FILEVERSION statement as follows:\n\t\t\tHIWORD(dw1), LOWORD(dw1), HIWORD(dw2), LOWORD(dw2).\n    PRODUCTVERSION\n    version \t\tBinary version number for the product with which the\n\t\t\tfile is distributed. The version parameter is two\n\t\t\t32-bit integers, defined by four 16-bit integers.\n\t\t\tFor more information about version, see the\n\t\t\tFILEVERSION description.\n    FILEFLAGSMASK\n    fileflagsmask \tBits in the FILEFLAGS statement are valid. If a bit\n\t\t\tis set, the corresponding bit in FILEFLAGS is valid.\n    FILEFLAGSfileflags \tAttributes of the file. The fileflags parameter must\n\t\t\tbe the combination of all the file flags that are\n\t\t\tvalid at compile time. For 16-bit Windows, this\n\t\t\tvalue is 0x3f.\n    FILEOSfileos \tOperating system for which this file was designed.\n\t\t\tThe fileos parameter can be one of the operating\n\t\t\tsystem values given in the Remarks section.\n    FILETYPEfiletype \tGeneral type of file. The filetype parameter can be\n\t\t\tone of the file type values listed in the Remarks\n\t\t\tsection.\n    FILESUBTYPE\n    subtype \t\tFunction of the file. The subtype parameter is zero\n\t\t\tunless the type parameter in the FILETYPE statement\n\t\t\tis VFT_DRV, VFT_FONT, or VFT_VXD. For a list of file\n\t\t\tsubtype values, see the Remarks section.\n\nblock-statement\n    Specifies one or more version-information blocks. A block can contain\n    string information or variable information. For more information, see\n    StringFileInfo Block or VarFileInfo Block.\n\nRemarks\n\nTo use the constants specified with the VERSIONINFO statement, you must\ninclude the Winver.h or Windows.h header file in the resource-definition file.\n\nThe following list describes the parameters used in the VERSIONINFO statement:\n\nfileflags\n    A combination of the following values.\n\n    Value \t\tDescription\n\n    VS_FF_DEBUG \tFile contains debugging information or is compiled\n\t\t\twith debugging features enabled.\n    VS_FF_PATCHED \tFile has been modified and is not identical to the\n\t\t\toriginal shipping file of the same version number.\n    VS_FF_PRERELEASE \tFile is a development version, not a commercially\n\t\t\treleased product.\n    VS_FF_PRIVATEBUILD \tFile was not built using standard release procedures.\n\t\t\tIf this value is given, the StringFileInfo block must\n\t\t\tcontain a PrivateBuild string.\n    VS_FF_SPECIALBUILD \tFile was built by the original company using standard\n\t\t\trelease procedures but is a variation of the standard\n\t\t\tfile of the same version number. If this value is\n\t\t\tgiven, the StringFileInfo block must contain a\n\t\t\tSpecialBuild string.\n\nfileos\n    One of the following values.\n\n    Value \t\tDescription\n\n    VOS_UNKNOWN \tThe operating system for which the file was designed\n\t\t\tis unknown.\n    VOS_DOS \t\tFile was designed for MS-DOS.\n    VOS_NT \t\tFile was designed for Windows Server 2003 family,\n\t\t\tWindows XP, Windows 2000, or Windows NT.\n    VOS__WINDOWS16 \tFile was designed for 16-bit Windows.\n    VOS__WINDOWS32 \tFile was designed for 32-bit Windows.\n    VOS_DOS_WINDOWS16 \tFile was designed for 16-bit Windows running with\n\t\t\tMS-DOS.\n    VOS_DOS_WINDOWS32 \tFile was designed for 32-bit Windows running with\n\t\t\tMS-DOS.\n    VOS_NT_WINDOWS32 \tFile was designed for Windows Server 2003 family,\n\t\t\tWindows XP, Windows 2000, or Windows NT.\n\n    The values 0x00002L, 0x00003L, 0x20000L and 0x30000L are reserved.\n\nfiletype\n    One of the following values.\n\n    Value \t\tDescription\n\n    VFT_UNKNOWN \tFile type is unknown.\n    VFT_APP \t\tFile contains an application.\n    VFT_DLL \t\tFile contains a dynamic-link library (DLL).\n    VFT_DRV \t\tFile contains a device driver. If filetype is\n\t\t\tVFT_DRV, subtype contains a more specific\n\t\t\tdescription of the driver.\n    VFT_FONT \t\tFile contains a font. If filetype is VFT_FONT,\n\t\t\tsubtype contains a more specific description of the\n\t\t\tfont.\n    VFT_VXD \t\tFile contains a virtual device.\n    VFT_STATIC_LIB \tFile contains a static-link library.\n\n    All other values are reserved for use by Microsoft.\n\nsubtype\n    Additional information about the file type.\n\n    If filetype specifies VFT_DRV, this parameter can be one of the\n    following values.\n\n    Value \t\t\tDescription\n\n    VFT2_UNKNOWN \t\tDriver type is unknown.\n    VFT2_DRV_COMM \t\tFile contains a communications driver.\n    VFT2_DRV_PRINTER \t\tFile contains a printer driver.\n    VFT2_DRV_KEYBOARD \t\tFile contains a keyboard driver.\n    VFT2_DRV_LANGUAGE \t\tFile contains a language driver.\n    VFT2_DRV_DISPLAY \t\tFile contains a display driver.\n    VFT2_DRV_MOUSE \t\tFile contains a mouse driver.\n    VFT2_DRV_NETWORK \t\tFile contains a network driver.\n    VFT2_DRV_SYSTEM \t\tFile contains a system driver.\n    VFT2_DRV_INSTALLABLE \tFile contains an installable driver.\n    VFT2_DRV_SOUND \t\tFile contains a sound driver.\n    VFT2_DRV_VERSIONED_PRINTER \tFile contains a versioned printer driver.\n\n    If filetype specifies VFT_FONT, this parameter can be one of the\n    following values.\n\n    Value \t\tDescription\n\n    VFT2_UNKNOWN \tFont type is unknown.\n    VFT2_FONT_RASTER \tFile contains a raster font.\n    VFT2_FONT_VECTOR \tFile contains a vector font.\n    VFT2_FONT_TRUETYPE \tFile contains a TrueType font.\n\n    If filetype specifies VFT_VXD, this parameter must be the virtual-device\n    identifier included in the virtual-device control block.\n\n    All subtype values not listed here are reserved for use by Microsoft.\n\nlangID\n    One of the following language codes.\n\n    Code \tLanguage \t\tCode \tLanguage\n\n    0x0401 \tArabic \t\t\t0x0415 \tPolish\n    0x0402 \tBulgarian \t\t0x0416 \tPortuguese (Brazil)\n    0x0403 \tCatalan \t\t0x0417 \tRhaeto-Romanic\n    0x0404 \tTraditional Chinese \t0x0418 \tRomanian\n    0x0405 \tCzech \t\t\t0x0419 \tRussian\n    0x0406 \tDanish \t\t\t0x041A \tCroato-Serbian (Latin)\n    0x0407 \tGerman \t\t\t0x041B \tSlovak\n    0x0408 \tGreek \t\t\t0x041C \tAlbanian\n    0x0409 \tU.S. English \t\t0x041D \tSwedish\n    0x040A \tCastilian Spanish \t0x041E \tThai\n    0x040B \tFinnish \t\t0x041F \tTurkish\n    0x040C \tFrench \t\t\t0x0420 \tUrdu\n    0x040D \tHebrew \t\t\t0x0421 \tBahasa\n    0x040E \tHungarian \t\t0x0804 \tSimplified Chinese\n    0x040F \tIcelandic \t\t0x0807 \tSwiss German\n    0x0410 \tItalian \t\t0x0809 \tU.K. English\n    0x0411 \tJapanese \t\t0x080A \tMexican Spanish\n    0x0412 \tKorean \t\t\t0x080C \tBelgian French\n    0x0413 \tDutch \t\t\t0x0C0C \tCanadian French\n    0x0414 \tNorwegian – Bokmal \t0x100C \tSwiss French\n    0x0810 \tSwiss Italian \t\t0x0816 \tPortuguese (Portugal)\n    0x0813 \tBelgian Dutch \t\t0x081A \tSerbo-Croatian (Cyrillic)\n    0x0814 \tNorwegian – Nynorsk \t  \t \n\ncharsetID\n    One of the following character-set identifiers.\n\n    Identifier \tCharacter Set\n\n    0 \t\t7-bit ASCII\n    932 \tJapan (Shift \u001b%G–\u001b%@ JIS X-0208)\n    949 \tKorea (Shift \u001b%G–\u001b%@ KSC 5601)\n    950 \tTaiwan (Big5)\n    1200 \tUnicode\n    1250 \tLatin-2 (Eastern European)\n    1251 \tCyrillic\n    1252 \tMultilingual\n    1253 \tGreek\n    1254 \tTurkish\n    1255 \tHebrew\n    1256 \tArabic\n\nstring-name\n    One of the following predefined names.\n\n    Name \t\tDescription\n\n    Comments \t\tAdditional information that should be displayed for\n\t\t\tdiagnostic purposes.\n    CompanyName \tCompany that produced the file\u001b%G—\u001b%@for example,\n\t\t\t\"Microsoft Corporation\" or \"Standard Microsystems\n\t\t\tCorporation, Inc.\" This string is required.\n    FileDescription \tFile description to be presented to users. This\n\t\t\tstring may be displayed in a list box when the user\n\t\t\tis choosing files to install\u001b%G—\u001b%@for example,\n\t\t\t\"Keyboard Driver for AT-Style Keyboards\". This\n\t\t\tstring is required.\n    FileVersion \tVersion number of the file\u001b%G—\u001b%@for example,\n\t\t\t\"3.10\" or \"5.00.RC2\". This string is required.\n    InternalName \tInternal name of the file, if one exists — for\n\t\t\texample, a module name if the file is a dynamic-link\n\t\t\tlibrary. If the file has no internal name, this\n\t\t\tstring should be the original filename, without\n\t\t\textension. This string is required.\n    LegalCopyright \tCopyright notices that apply to the file. This\n\t\t\tshould include the full text of all notices, legal\n\t\t\tsymbols, copyright dates, and so on — for example,\n\t\t\t\"Copyright (C) Microsoft Corporation 1990–1999\".\n\t\t\tThis string is optional.\n    LegalTrademarks \tTrademarks and registered trademarks that apply to\n\t\t\tthe file. This should include the full text of all\n\t\t\tnotices, legal symbols, trademark numbers, and so on.\n\t\t\tThis string is optional.\n    OriginalFilename \tOriginal name of the file, not including a path.\n\t\t\tThis information enables an application to determine\n\t\t\twhether a file has been renamed by a user. The\n\t\t\tformat of the name depends on the file system for\n\t\t\twhich the file was created. This string is required.\n    PrivateBuild \tInformation about a private version of the file — for\n\t\t\texample, \"Built by TESTER1 on \\TESTBED\". This string\n\t\t\tshould be present only if VS_FF_PRIVATEBUILD is\n\t\t\tspecified in the fileflags parameter of the root\n\t\t\tblock.\n    ProductName \tName of the product with which the file is\n\t\t\tdistributed. This string is required.\n    ProductVersion \tVersion of the product with which the file is\n\t\t\tdistributed — for example, \"3.10\" or \"5.00.RC2\".\n\t\t\tThis string is required.\n    SpecialBuild \tText that indicates how this version of the file\n\t\t\tdiffers from the standard version — for example,\n\t\t\t\"Private build for TESTER1 solving mouse problems\n\t\t\ton M250 and M250E computers\". This string should be\n\t\t\tpresent only if VS_FF_SPECIALBUILD is specified in\n\t\t\tthe fileflags parameter of the root block.\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pthreads/w32_CancelableWait.c",
    "content": "/*\n * w32_CancelableWait.c\n *\n * Description:\n * This translation unit implements miscellaneous thread functions.\n *\n * --------------------------------------------------------------------------\n *\n *      Pthreads-win32 - POSIX Threads Library for Win32\n *      Copyright(C) 1998 John E. Bossom\n *      Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n *      Contact Email: rpj@callisto.canberra.edu.au\n * \n *      The current list of contributors is contained\n *      in the file CONTRIBUTORS included with the source\n *      code distribution. The list can also be seen at the\n *      following World Wide Web location:\n *      http://sources.redhat.com/pthreads-win32/contributors.html\n * \n *      This library is free software; you can redistribute it and/or\n *      modify it under the terms of the GNU Lesser General Public\n *      License as published by the Free Software Foundation; either\n *      version 2 of the License, or (at your option) any later version.\n * \n *      This library is distributed in the hope that it will be useful,\n *      but WITHOUT ANY WARRANTY; without even the implied warranty of\n *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *      Lesser General Public License for more details.\n * \n *      You should have received a copy of the GNU Lesser General Public\n *      License along with this library in the file COPYING.LIB;\n *      if not, write to the Free Software Foundation, Inc.,\n *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n */\n\n#include \"pthread.h\"\n#include \"implement.h\"\n\n\nstatic INLINE int\nptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout)\n     /*\n      * -------------------------------------------------------------------\n      * This provides an extra hook into the pthread_cancel\n      * mechanism that will allow you to wait on a Windows handle and make it a\n      * cancellation point. This function blocks until the given WIN32 handle is\n      * signaled or pthread_cancel has been called. It is implemented using\n      * WaitForMultipleObjects on 'waitHandle' and a manually reset WIN32\n      * event used to implement pthread_cancel.\n      * \n      * Given this hook it would be possible to implement more of the cancellation\n      * points.\n      * -------------------------------------------------------------------\n      */\n{\n  int result;\n  pthread_t self;\n  ptw32_thread_t * sp;\n  HANDLE handles[2];\n  DWORD nHandles = 1;\n  DWORD status;\n\n  handles[0] = waitHandle;\n\n  self = pthread_self();\n  sp = (ptw32_thread_t *) self.p;\n\n  if (sp != NULL)\n    {\n      /*\n       * Get cancelEvent handle\n       */\n      if (sp->cancelState == PTHREAD_CANCEL_ENABLE)\n\t{\n\n\t  if ((handles[1] = sp->cancelEvent) != NULL)\n\t    {\n\t      nHandles++;\n\t    }\n\t}\n    }\n  else\n    {\n      handles[1] = NULL;\n    }\n\n  status = WaitForMultipleObjects (nHandles, handles, PTW32_FALSE, timeout);\n\n  switch (status - WAIT_OBJECT_0)\n    {\n    case 0:\n      /*\n       * Got the handle.\n       * In the event that both handles are signalled, the smallest index\n       * value (us) is returned. As it has been arranged, this ensures that\n       * we don't drop a signal that we should act on (i.e. semaphore,\n       * mutex, or condition variable etc).\n       */\n      result = 0;\n      break;\n\n    case 1:\n      /*\n       * Got cancel request.\n       * In the event that both handles are signaled, the cancel will\n       * be ignored (see case 0 comment).\n       */\n      ResetEvent (handles[1]);\n\n      if (sp != NULL)\n\t{\n\t  /*\n\t   * Should handle POSIX and implicit POSIX threads..\n\t   * Make sure we haven't been async-canceled in the meantime.\n\t   */\n\t  (void) pthread_mutex_lock (&sp->cancelLock);\n\t  if (sp->state < PThreadStateCanceling)\n\t    {\n\t      sp->state = PThreadStateCanceling;\n\t      sp->cancelState = PTHREAD_CANCEL_DISABLE;\n\t      (void) pthread_mutex_unlock (&sp->cancelLock);\n\t      ptw32_throw (PTW32_EPS_CANCEL);\n\n\t      /* Never reached */\n\t    }\n\t  (void) pthread_mutex_unlock (&sp->cancelLock);\n\t}\n\n      /* Should never get to here. */\n      result = EINVAL;\n      break;\n\n    default:\n      if (status == WAIT_TIMEOUT)\n\t{\n\t  result = ETIMEDOUT;\n\t}\n      else\n\t{\n\t  result = EINVAL;\n\t}\n      break;\n    }\n\n  return (result);\n\n}\t\t\t\t/* CancelableWait */\n\nint\npthreadCancelableWait (HANDLE waitHandle)\n{\n  return (ptw32_cancelable_wait (waitHandle, INFINITE));\n}\n\nint\npthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout)\n{\n  return (ptw32_cancelable_wait (waitHandle, timeout));\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pugixml/CMakeLists.txt",
    "content": "add_library(pugixml STATIC)\nfile(GLOB_RECURSE pugixml_SOURCES \"*.cpp\" \"*.hpp\")\ntarget_sources(pugixml PRIVATE ${pugixml_SOURCES})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pugixml/pugiconfig.hpp",
    "content": "/*\n * pugixml parser - version 1.6\n * --------------------------------------------------------\n * Copyright (C) 2006-2015, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)\n * Report bugs and download new versions at http://pugixml.org/\n *\n * This library is distributed under the MIT License. See notice at the end\n * of this file.\n *\n * This work is based on the pugxml parser, which is:\n * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)\n */\n\n#ifndef HEADER_PUGICONFIG_HPP\n#define HEADER_PUGICONFIG_HPP\n\n// Uncomment this to enable wchar_t mode\n#define PUGIXML_WCHAR_MODE\n\n// Uncomment this to disable XPath\n// #define PUGIXML_NO_XPATH\n\n// Uncomment this to disable STL\n// #define PUGIXML_NO_STL\n\n// Uncomment this to disable exceptions\n// #define PUGIXML_NO_EXCEPTIONS\n\n// Set this to control attributes for public classes/functions, i.e.:\n// #define PUGIXML_API __declspec(dllexport) // to export all public symbols from DLL\n// #define PUGIXML_CLASS __declspec(dllimport) // to import all classes from DLL\n// #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall\n// In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead\n\n// Tune these constants to adjust memory-related behavior\n// #define PUGIXML_MEMORY_PAGE_SIZE 32768\n// #define PUGIXML_MEMORY_OUTPUT_STACK 10240\n// #define PUGIXML_MEMORY_XPATH_PAGE_SIZE 4096\n\n// Uncomment this to switch to header-only version\n// #define PUGIXML_HEADER_ONLY\n\n// Uncomment this to enable long long support\n// #define PUGIXML_HAS_LONG_LONG\n\n#endif\n\n/*\n * Copyright (c) 2006-2015 Arseny Kapoulkine\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pugixml/pugixml.cpp",
    "content": "/*\n * pugixml parser - version 1.6\n * --------------------------------------------------------\n * Copyright (C) 2006-2015, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)\n * Report bugs and download new versions at http://pugixml.org/\n *\n * This library is distributed under the MIT License. See notice at the end\n * of this file.\n *\n * This work is based on the pugxml parser, which is:\n * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)\n */\n\n#ifndef SOURCE_PUGIXML_CPP\n#define SOURCE_PUGIXML_CPP\n\n#include \"pugixml.hpp\"\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <assert.h>\n\n#ifdef PUGIXML_WCHAR_MODE\n#\tinclude <wchar.h>\n#endif\n\n#ifndef PUGIXML_NO_XPATH\n#\tinclude <math.h>\n#\tinclude <float.h>\n#\tifdef PUGIXML_NO_EXCEPTIONS\n#\t\tinclude <setjmp.h>\n#\tendif\n#endif\n\n#ifndef PUGIXML_NO_STL\n#\tinclude <istream>\n#\tinclude <ostream>\n#\tinclude <string>\n#endif\n\n// For placement new\n#include <new>\n\n#ifdef _MSC_VER\n#\tpragma warning(push)\n#\tpragma warning(disable: 4127) // conditional expression is constant\n#\tpragma warning(disable: 4324) // structure was padded due to __declspec(align())\n#\tpragma warning(disable: 4611) // interaction between '_setjmp' and C++ object destruction is non-portable\n#\tpragma warning(disable: 4702) // unreachable code\n#\tpragma warning(disable: 4996) // this function or variable may be unsafe\n#\tpragma warning(disable: 4793) // function compiled as native: presence of '_setjmp' makes a function unmanaged\n#endif\n\n#ifdef __INTEL_COMPILER\n#\tpragma warning(disable: 177) // function was declared but never referenced \n#\tpragma warning(disable: 279) // controlling expression is constant\n#\tpragma warning(disable: 1478 1786) // function was declared \"deprecated\"\n#\tpragma warning(disable: 1684) // conversion from pointer to same-sized integral type\n#endif\n\n#if defined(__BORLANDC__) && defined(PUGIXML_HEADER_ONLY)\n#\tpragma warn -8080 // symbol is declared but never used; disabling this inside push/pop bracket does not make the warning go away\n#endif\n\n#ifdef __BORLANDC__\n#\tpragma option push\n#\tpragma warn -8008 // condition is always false\n#\tpragma warn -8066 // unreachable code\n#endif\n\n#ifdef __SNC__\n// Using diag_push/diag_pop does not disable the warnings inside templates due to a compiler bug\n#\tpragma diag_suppress=178 // function was declared but never referenced\n#\tpragma diag_suppress=237 // controlling expression is constant\n#endif\n\n// Inlining controls\n#if defined(_MSC_VER) && _MSC_VER >= 1300\n#\tdefine PUGI__NO_INLINE __declspec(noinline)\n#elif defined(__GNUC__)\n#\tdefine PUGI__NO_INLINE __attribute__((noinline))\n#else\n#\tdefine PUGI__NO_INLINE \n#endif\n\n// Branch weight controls\n#if defined(__GNUC__)\n#\tdefine PUGI__UNLIKELY(cond) __builtin_expect(cond, 0)\n#else\n#\tdefine PUGI__UNLIKELY(cond) (cond)\n#endif\n\n// Simple static assertion\n#define PUGI__STATIC_ASSERT(cond) { static const char condition_failed[(cond) ? 1 : -1] = {0}; (void)condition_failed[0]; }\n\n// Digital Mars C++ bug workaround for passing char loaded from memory via stack\n#ifdef __DMC__\n#\tdefine PUGI__DMC_VOLATILE volatile\n#else\n#\tdefine PUGI__DMC_VOLATILE\n#endif\n\n// Borland C++ bug workaround for not defining ::memcpy depending on header include order (can't always use std::memcpy because some compilers don't have it at all)\n#if defined(__BORLANDC__) && !defined(__MEM_H_USING_LIST)\nusing std::memcpy;\nusing std::memmove;\n#endif\n\n// In some environments MSVC is a compiler but the CRT lacks certain MSVC-specific features\n#if defined(_MSC_VER) && !defined(__S3E__)\n#\tdefine PUGI__MSVC_CRT_VERSION _MSC_VER\n#endif\n\n#ifdef PUGIXML_HEADER_ONLY\n#\tdefine PUGI__NS_BEGIN namespace pugi { namespace impl {\n#\tdefine PUGI__NS_END } }\n#\tdefine PUGI__FN inline\n#\tdefine PUGI__FN_NO_INLINE inline\n#else\n#\tif defined(_MSC_VER) && _MSC_VER < 1300 // MSVC6 seems to have an amusing bug with anonymous namespaces inside namespaces\n#\t\tdefine PUGI__NS_BEGIN namespace pugi { namespace impl {\n#\t\tdefine PUGI__NS_END } }\n#\telse\n#\t\tdefine PUGI__NS_BEGIN namespace pugi { namespace impl { namespace {\n#\t\tdefine PUGI__NS_END } } }\n#\tendif\n#\tdefine PUGI__FN\n#\tdefine PUGI__FN_NO_INLINE PUGI__NO_INLINE\n#endif\n\n// uintptr_t\n#if !defined(_MSC_VER) || _MSC_VER >= 1600\n#\tinclude <stdint.h>\n#else\n#\tifndef _UINTPTR_T_DEFINED\n// No native uintptr_t in MSVC6 and in some WinCE versions\ntypedef size_t uintptr_t;\n#define _UINTPTR_T_DEFINED\n#\tendif\nPUGI__NS_BEGIN\n\ttypedef unsigned __int8 uint8_t;\n\ttypedef unsigned __int16 uint16_t;\n\ttypedef unsigned __int32 uint32_t;\nPUGI__NS_END\n#endif\n\n// Memory allocation\nPUGI__NS_BEGIN\n\tPUGI__FN void* default_allocate(size_t size)\n\t{\n\t\treturn malloc(size);\n\t}\n\n\tPUGI__FN void default_deallocate(void* ptr)\n\t{\n\t\tfree(ptr);\n\t}\n\n\ttemplate <typename T>\n\tstruct xml_memory_management_function_storage\n\t{\n\t\tstatic allocation_function allocate;\n\t\tstatic deallocation_function deallocate;\n\t};\n\n\t// Global allocation functions are stored in class statics so that in header mode linker deduplicates them\n\t// Without a template<> we'll get multiple definitions of the same static\n\ttemplate <typename T> allocation_function xml_memory_management_function_storage<T>::allocate = default_allocate;\n\ttemplate <typename T> deallocation_function xml_memory_management_function_storage<T>::deallocate = default_deallocate;\n\n\ttypedef xml_memory_management_function_storage<int> xml_memory;\nPUGI__NS_END\n\n// String utilities\nPUGI__NS_BEGIN\n\t// Get string length\n\tPUGI__FN size_t strlength(const char_t* s)\n\t{\n\t\tassert(s);\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn wcslen(s);\n\t#else\n\t\treturn strlen(s);\n\t#endif\n\t}\n\n\t// Compare two strings\n\tPUGI__FN bool strequal(const char_t* src, const char_t* dst)\n\t{\n\t\tassert(src && dst);\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn wcscmp(src, dst) == 0;\n\t#else\n\t\treturn strcmp(src, dst) == 0;\n\t#endif\n\t}\n\n\t// Compare lhs with [rhs_begin, rhs_end)\n\tPUGI__FN bool strequalrange(const char_t* lhs, const char_t* rhs, size_t count)\n\t{\n\t\tfor (size_t i = 0; i < count; ++i)\n\t\t\tif (lhs[i] != rhs[i])\n\t\t\t\treturn false;\n\t\n\t\treturn lhs[count] == 0;\n\t}\n\n\t// Get length of wide string, even if CRT lacks wide character support\n\tPUGI__FN size_t strlength_wide(const wchar_t* s)\n\t{\n\t\tassert(s);\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn wcslen(s);\n\t#else\n\t\tconst wchar_t* end = s;\n\t\twhile (*end) end++;\n\t\treturn static_cast<size_t>(end - s);\n\t#endif\n\t}\n\n#ifdef PUGIXML_WCHAR_MODE\n\t// Convert string to wide string, assuming all symbols are ASCII\n\tPUGI__FN void widen_ascii(wchar_t* dest, const char* source)\n\t{\n\t\tfor (const char* i = source; *i; ++i) *dest++ = *i;\n\t\t*dest = 0;\n\t}\n#endif\nPUGI__NS_END\n\n#if !defined(PUGIXML_NO_STL) || !defined(PUGIXML_NO_XPATH)\n// auto_ptr-like buffer holder for exception recovery\nPUGI__NS_BEGIN\n\tstruct buffer_holder\n\t{\n\t\tvoid* data;\n\t\tvoid (*deleter)(void*);\n\n\t\tbuffer_holder(void* data_, void (*deleter_)(void*)): data(data_), deleter(deleter_)\n\t\t{\n\t\t}\n\n\t\t~buffer_holder()\n\t\t{\n\t\t\tif (data) deleter(data);\n\t\t}\n\n\t\tvoid* release()\n\t\t{\n\t\t\tvoid* result = data;\n\t\t\tdata = 0;\n\t\t\treturn result;\n\t\t}\n\t};\nPUGI__NS_END\n#endif\n\nPUGI__NS_BEGIN\n\tstatic const size_t xml_memory_page_size =\n\t#ifdef PUGIXML_MEMORY_PAGE_SIZE\n\t\tPUGIXML_MEMORY_PAGE_SIZE\n\t#else\n\t\t32768\n\t#endif\n\t\t;\n\n\tstatic const uintptr_t xml_memory_page_alignment = 64;\n\tstatic const uintptr_t xml_memory_page_pointer_mask = ~(xml_memory_page_alignment - 1);\n\tstatic const uintptr_t xml_memory_page_contents_shared_mask = 32;\n\tstatic const uintptr_t xml_memory_page_name_allocated_mask = 16;\n\tstatic const uintptr_t xml_memory_page_value_allocated_mask = 8;\n\tstatic const uintptr_t xml_memory_page_type_mask = 7;\n\tstatic const uintptr_t xml_memory_page_name_allocated_or_shared_mask = xml_memory_page_name_allocated_mask | xml_memory_page_contents_shared_mask;\n\tstatic const uintptr_t xml_memory_page_value_allocated_or_shared_mask = xml_memory_page_value_allocated_mask | xml_memory_page_contents_shared_mask;\n\n\t#define PUGI__NODETYPE(n) static_cast<xml_node_type>(((n)->header & impl::xml_memory_page_type_mask) + 1)\n\n\tstruct xml_allocator;\n\n\tstruct xml_memory_page\n\t{\n\t\tstatic xml_memory_page* construct(void* memory)\n\t\t{\n\t\t\txml_memory_page* result = static_cast<xml_memory_page*>(memory);\n\n\t\t\tresult->allocator = 0;\n\t\t\tresult->prev = 0;\n\t\t\tresult->next = 0;\n\t\t\tresult->busy_size = 0;\n\t\t\tresult->freed_size = 0;\n\n\t\t\treturn result;\n\t\t}\n\n\t\txml_allocator* allocator;\n\n\t\txml_memory_page* prev;\n\t\txml_memory_page* next;\n\n\t\tsize_t busy_size;\n\t\tsize_t freed_size;\n\t};\n\n\tstruct xml_memory_string_header\n\t{\n\t\tuint16_t page_offset; // offset from page->data\n\t\tuint16_t full_size; // 0 if string occupies whole page\n\t};\n\n\tstruct xml_allocator\n\t{\n\t\txml_allocator(xml_memory_page* root): _root(root), _busy_size(root->busy_size)\n\t\t{\n\t\t}\n\n\t\txml_memory_page* allocate_page(size_t data_size)\n\t\t{\n\t\t\tsize_t size = sizeof(xml_memory_page) + data_size;\n\n\t\t\t// allocate block with some alignment, leaving memory for worst-case padding\n\t\t\tvoid* memory = xml_memory::allocate(size + xml_memory_page_alignment);\n\t\t\tif (!memory) return 0;\n\n\t\t\t// align to next page boundary (note: this guarantees at least 1 usable byte before the page)\n\t\t\tchar* page_memory = reinterpret_cast<char*>((reinterpret_cast<uintptr_t>(memory) + xml_memory_page_alignment) & ~(xml_memory_page_alignment - 1));\n\n\t\t\t// prepare page structure\n\t\t\txml_memory_page* page = xml_memory_page::construct(page_memory);\n\t\t\tassert(page);\n\n\t\t\tpage->allocator = _root->allocator;\n\n\t\t\t// record the offset for freeing the memory block\n\t\t\tassert(page_memory > memory && page_memory - static_cast<char*>(memory) <= 127);\n\t\t\tpage_memory[-1] = static_cast<char>(page_memory - static_cast<char*>(memory));\n\n\t\t\treturn page;\n\t\t}\n\n\t\tstatic void deallocate_page(xml_memory_page* page)\n\t\t{\n\t\t\tchar* page_memory = reinterpret_cast<char*>(page);\n\n\t\t\txml_memory::deallocate(page_memory - page_memory[-1]);\n\t\t}\n\n\t\tvoid* allocate_memory_oob(size_t size, xml_memory_page*& out_page);\n\n\t\tvoid* allocate_memory(size_t size, xml_memory_page*& out_page)\n\t\t{\n\t\t\tif (_busy_size + size > xml_memory_page_size) return allocate_memory_oob(size, out_page);\n\n\t\t\tvoid* buf = reinterpret_cast<char*>(_root) + sizeof(xml_memory_page) + _busy_size;\n\n\t\t\t_busy_size += size;\n\n\t\t\tout_page = _root;\n\n\t\t\treturn buf;\n\t\t}\n\n\t\tvoid deallocate_memory(void* ptr, size_t size, xml_memory_page* page)\n\t\t{\n\t\t\tif (page == _root) page->busy_size = _busy_size;\n\n\t\t\tassert(ptr >= reinterpret_cast<char*>(page) + sizeof(xml_memory_page) && ptr < reinterpret_cast<char*>(page) + sizeof(xml_memory_page) + page->busy_size);\n\t\t\t(void)!ptr;\n\n\t\t\tpage->freed_size += size;\n\t\t\tassert(page->freed_size <= page->busy_size);\n\n\t\t\tif (page->freed_size == page->busy_size)\n\t\t\t{\n\t\t\t\tif (page->next == 0)\n\t\t\t\t{\n\t\t\t\t\tassert(_root == page);\n\n\t\t\t\t\t// top page freed, just reset sizes\n\t\t\t\t\tpage->busy_size = page->freed_size = 0;\n\t\t\t\t\t_busy_size = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tassert(_root != page);\n\t\t\t\t\tassert(page->prev);\n\n\t\t\t\t\t// remove from the list\n\t\t\t\t\tpage->prev->next = page->next;\n\t\t\t\t\tpage->next->prev = page->prev;\n\n\t\t\t\t\t// deallocate\n\t\t\t\t\tdeallocate_page(page);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tchar_t* allocate_string(size_t length)\n\t\t{\n\t\t\tstatic const size_t max_encoded_offset = (1 << 16) * sizeof(void*);\n\n\t\t\tPUGI__STATIC_ASSERT(xml_memory_page_size <= max_encoded_offset);\n\n\t\t\t// allocate memory for string and header block\n\t\t\tsize_t size = sizeof(xml_memory_string_header) + length * sizeof(char_t);\n\t\t\t\n\t\t\t// round size up to pointer alignment boundary\n\t\t\tsize_t full_size = (size + (sizeof(void*) - 1)) & ~(sizeof(void*) - 1);\n\n\t\t\txml_memory_page* page;\n\t\t\txml_memory_string_header* header = static_cast<xml_memory_string_header*>(allocate_memory(full_size, page));\n\n\t\t\tif (!header) return 0;\n\n\t\t\t// setup header\n\t\t\tptrdiff_t page_offset = reinterpret_cast<char*>(header) - reinterpret_cast<char*>(page) - sizeof(xml_memory_page);\n\n\t\t\tassert(page_offset % sizeof(void*) == 0);\n\t\t\tassert(page_offset >= 0 && static_cast<size_t>(page_offset) < max_encoded_offset);\n\t\t\theader->page_offset = static_cast<uint16_t>(static_cast<size_t>(page_offset) / sizeof(void*));\n\n\t\t\t// full_size == 0 for large strings that occupy the whole page\n\t\t\tassert(full_size % sizeof(void*) == 0);\n\t\t\tassert(full_size < max_encoded_offset || (page->busy_size == full_size && page_offset == 0));\n\t\t\theader->full_size = static_cast<uint16_t>(full_size < max_encoded_offset ? full_size / sizeof(void*) : 0);\n\n\t\t\t// round-trip through void* to avoid 'cast increases required alignment of target type' warning\n\t\t\t// header is guaranteed a pointer-sized alignment, which should be enough for char_t\n\t\t\treturn static_cast<char_t*>(static_cast<void*>(header + 1));\n\t\t}\n\n\t\tvoid deallocate_string(char_t* string)\n\t\t{\n\t\t\t// this function casts pointers through void* to avoid 'cast increases required alignment of target type' warnings\n\t\t\t// we're guaranteed the proper (pointer-sized) alignment on the input string if it was allocated via allocate_string\n\n\t\t\t// get header\n\t\t\txml_memory_string_header* header = static_cast<xml_memory_string_header*>(static_cast<void*>(string)) - 1;\n\t\t\tassert(header);\n\n\t\t\t// deallocate\n\t\t\tsize_t page_offset = sizeof(xml_memory_page) + header->page_offset * sizeof(void*);\n\t\t\txml_memory_page* page = reinterpret_cast<xml_memory_page*>(static_cast<void*>(reinterpret_cast<char*>(header) - page_offset));\n\n\t\t\t// if full_size == 0 then this string occupies the whole page\n\t\t\tsize_t full_size = header->full_size == 0 ? page->busy_size : header->full_size * sizeof(void*);\n\n\t\t\tdeallocate_memory(header, full_size, page);\n\t\t}\n\n\t\txml_memory_page* _root;\n\t\tsize_t _busy_size;\n\t};\n\n\tPUGI__FN_NO_INLINE void* xml_allocator::allocate_memory_oob(size_t size, xml_memory_page*& out_page)\n\t{\n\t\tconst size_t large_allocation_threshold = xml_memory_page_size / 4;\n\n\t\txml_memory_page* page = allocate_page(size <= large_allocation_threshold ? xml_memory_page_size : size);\n\t\tout_page = page;\n\n\t\tif (!page) return 0;\n\n\t\tif (size <= large_allocation_threshold)\n\t\t{\n\t\t\t_root->busy_size = _busy_size;\n\n\t\t\t// insert page at the end of linked list\n\t\t\tpage->prev = _root;\n\t\t\t_root->next = page;\n\t\t\t_root = page;\n\n\t\t\t_busy_size = size;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// insert page before the end of linked list, so that it is deleted as soon as possible\n\t\t\t// the last page is not deleted even if it's empty (see deallocate_memory)\n\t\t\tassert(_root->prev);\n\n\t\t\tpage->prev = _root->prev;\n\t\t\tpage->next = _root;\n\n\t\t\t_root->prev->next = page;\n\t\t\t_root->prev = page;\n\t\t}\n\n\t\t// allocate inside page\n\t\tpage->busy_size = size;\n\n\t\treturn reinterpret_cast<char*>(page) + sizeof(xml_memory_page);\n\t}\nPUGI__NS_END\n\nnamespace pugi\n{\n\t/// A 'name=value' XML attribute structure.\n\tstruct xml_attribute_struct\n\t{\n\t\t/// Default ctor\n\t\txml_attribute_struct(impl::xml_memory_page* page): header(reinterpret_cast<uintptr_t>(page)), name(0), value(0), prev_attribute_c(0), next_attribute(0)\n\t\t{\n\t\t}\n\n\t\tuintptr_t header;\n\n\t\tchar_t* name;\t///< Pointer to attribute name.\n\t\tchar_t*\tvalue;\t///< Pointer to attribute value.\n\n\t\txml_attribute_struct* prev_attribute_c;\t///< Previous attribute (cyclic list)\n\t\txml_attribute_struct* next_attribute;\t///< Next attribute\n\t};\n\n\t/// An XML document tree node.\n\tstruct xml_node_struct\n\t{\n\t\t/// Default ctor\n\t\t/// \\param type - node type\n\t\txml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(reinterpret_cast<uintptr_t>(page) | (type - 1)), parent(0), name(0), value(0), first_child(0), prev_sibling_c(0), next_sibling(0), first_attribute(0)\n\t\t{\n\t\t}\n\n\t\tuintptr_t header;\n\n\t\txml_node_struct*\t\tparent;\t\t\t\t\t///< Pointer to parent\n\n\t\tchar_t*\t\t\t\t\tname;\t\t\t\t\t///< Pointer to element name.\n\t\tchar_t*\t\t\t\t\tvalue;\t\t\t\t\t///< Pointer to any associated string data.\n\n\t\txml_node_struct*\t\tfirst_child;\t\t\t///< First child\n\t\t\n\t\txml_node_struct*\t\tprev_sibling_c;\t\t\t///< Left brother (cyclic list)\n\t\txml_node_struct*\t\tnext_sibling;\t\t\t///< Right brother\n\t\t\n\t\txml_attribute_struct*\tfirst_attribute;\t\t///< First attribute\n\t};\n}\n\nPUGI__NS_BEGIN\n\tstruct xml_extra_buffer\n\t{\n\t\tchar_t* buffer;\n\t\txml_extra_buffer* next;\n\t};\n\n\tstruct xml_document_struct: public xml_node_struct, public xml_allocator\n\t{\n\t\txml_document_struct(xml_memory_page* page): xml_node_struct(page, node_document), xml_allocator(page), buffer(0), extra_buffers(0)\n\t\t{\n\t\t}\n\n\t\tconst char_t* buffer;\n\n\t\txml_extra_buffer* extra_buffers;\n\t};\n\n\tinline xml_allocator& get_allocator(const xml_node_struct* node)\n\t{\n\t\tassert(node);\n\n\t\treturn *reinterpret_cast<xml_memory_page*>(node->header & xml_memory_page_pointer_mask)->allocator;\n\t}\n\n\ttemplate <typename Object> inline xml_document_struct& get_document(const Object* object)\n\t{\n\t\tassert(object);\n\n\t\treturn *static_cast<xml_document_struct*>(reinterpret_cast<xml_memory_page*>(object->header & xml_memory_page_pointer_mask)->allocator);\n\t}\nPUGI__NS_END\n\n// Low-level DOM operations\nPUGI__NS_BEGIN\n\tinline xml_attribute_struct* allocate_attribute(xml_allocator& alloc)\n\t{\n\t\txml_memory_page* page;\n\t\tvoid* memory = alloc.allocate_memory(sizeof(xml_attribute_struct), page);\n\n\t\treturn new (memory) xml_attribute_struct(page);\n\t}\n\n\tinline xml_node_struct* allocate_node(xml_allocator& alloc, xml_node_type type)\n\t{\n\t\txml_memory_page* page;\n\t\tvoid* memory = alloc.allocate_memory(sizeof(xml_node_struct), page);\n\n\t\treturn new (memory) xml_node_struct(page, type);\n\t}\n\n\tinline void destroy_attribute(xml_attribute_struct* a, xml_allocator& alloc)\n\t{\n\t\tuintptr_t header = a->header;\n\n\t\tif (header & impl::xml_memory_page_name_allocated_mask) alloc.deallocate_string(a->name);\n\t\tif (header & impl::xml_memory_page_value_allocated_mask) alloc.deallocate_string(a->value);\n\n\t\talloc.deallocate_memory(a, sizeof(xml_attribute_struct), reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask));\n\t}\n\n\tinline void destroy_node(xml_node_struct* n, xml_allocator& alloc)\n\t{\n\t\tuintptr_t header = n->header;\n\n\t\tif (header & impl::xml_memory_page_name_allocated_mask) alloc.deallocate_string(n->name);\n\t\tif (header & impl::xml_memory_page_value_allocated_mask) alloc.deallocate_string(n->value);\n\n\t\tfor (xml_attribute_struct* attr = n->first_attribute; attr; )\n\t\t{\n\t\t\txml_attribute_struct* next = attr->next_attribute;\n\n\t\t\tdestroy_attribute(attr, alloc);\n\n\t\t\tattr = next;\n\t\t}\n\n\t\tfor (xml_node_struct* child = n->first_child; child; )\n\t\t{\n\t\t\txml_node_struct* next = child->next_sibling;\n\n\t\t\tdestroy_node(child, alloc);\n\n\t\t\tchild = next;\n\t\t}\n\n\t\talloc.deallocate_memory(n, sizeof(xml_node_struct), reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask));\n\t}\n\n\tinline void append_node(xml_node_struct* child, xml_node_struct* node)\n\t{\n\t\tchild->parent = node;\n\n\t\txml_node_struct* head = node->first_child;\n\n\t\tif (head)\n\t\t{\n\t\t\txml_node_struct* tail = head->prev_sibling_c;\n\n\t\t\ttail->next_sibling = child;\n\t\t\tchild->prev_sibling_c = tail;\n\t\t\thead->prev_sibling_c = child;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode->first_child = child;\n\t\t\tchild->prev_sibling_c = child;\n\t\t}\n\t}\n\n\tinline void prepend_node(xml_node_struct* child, xml_node_struct* node)\n\t{\n\t\tchild->parent = node;\n\n\t\txml_node_struct* head = node->first_child;\n\n\t\tif (head)\n\t\t{\n\t\t\tchild->prev_sibling_c = head->prev_sibling_c;\n\t\t\thead->prev_sibling_c = child;\n\t\t}\n\t\telse\n\t\t\tchild->prev_sibling_c = child;\n\n\t\tchild->next_sibling = head;\n\t\tnode->first_child = child;\n\t}\n\n\tinline void insert_node_after(xml_node_struct* child, xml_node_struct* node)\n\t{\n\t\txml_node_struct* parent = node->parent;\n\n\t\tchild->parent = parent;\n\n\t\tif (node->next_sibling)\n\t\t\tnode->next_sibling->prev_sibling_c = child;\n\t\telse\n\t\t\tparent->first_child->prev_sibling_c = child;\n\n\t\tchild->next_sibling = node->next_sibling;\n\t\tchild->prev_sibling_c = node;\n\n\t\tnode->next_sibling = child;\n\t}\n\n\tinline void insert_node_before(xml_node_struct* child, xml_node_struct* node)\n\t{\n\t\txml_node_struct* parent = node->parent;\n\n\t\tchild->parent = parent;\n\n\t\tif (node->prev_sibling_c->next_sibling)\n\t\t\tnode->prev_sibling_c->next_sibling = child;\n\t\telse\n\t\t\tparent->first_child = child;\n\n\t\tchild->prev_sibling_c = node->prev_sibling_c;\n\t\tchild->next_sibling = node;\n\n\t\tnode->prev_sibling_c = child;\n\t}\n\n\tinline void remove_node(xml_node_struct* node)\n\t{\n\t\txml_node_struct* parent = node->parent;\n\n\t\tif (node->next_sibling)\n\t\t\tnode->next_sibling->prev_sibling_c = node->prev_sibling_c;\n\t\telse\n\t\t\tparent->first_child->prev_sibling_c = node->prev_sibling_c;\n\n\t\tif (node->prev_sibling_c->next_sibling)\n\t\t\tnode->prev_sibling_c->next_sibling = node->next_sibling;\n\t\telse\n\t\t\tparent->first_child = node->next_sibling;\n\n\t\tnode->parent = 0;\n\t\tnode->prev_sibling_c = 0;\n\t\tnode->next_sibling = 0;\n\t}\n\n\tinline void append_attribute(xml_attribute_struct* attr, xml_node_struct* node)\n\t{\n\t\txml_attribute_struct* head = node->first_attribute;\n\n\t\tif (head)\n\t\t{\n\t\t\txml_attribute_struct* tail = head->prev_attribute_c;\n\n\t\t\ttail->next_attribute = attr;\n\t\t\tattr->prev_attribute_c = tail;\n\t\t\thead->prev_attribute_c = attr;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode->first_attribute = attr;\n\t\t\tattr->prev_attribute_c = attr;\n\t\t}\n\t}\n\n\tinline void prepend_attribute(xml_attribute_struct* attr, xml_node_struct* node)\n\t{\n\t\txml_attribute_struct* head = node->first_attribute;\n\n\t\tif (head)\n\t\t{\n\t\t\tattr->prev_attribute_c = head->prev_attribute_c;\n\t\t\thead->prev_attribute_c = attr;\n\t\t}\n\t\telse\n\t\t\tattr->prev_attribute_c = attr;\n\n\t\tattr->next_attribute = head;\n\t\tnode->first_attribute = attr;\n\t}\n\n\tinline void insert_attribute_after(xml_attribute_struct* attr, xml_attribute_struct* place, xml_node_struct* node)\n\t{\n\t\tif (place->next_attribute)\n\t\t\tplace->next_attribute->prev_attribute_c = attr;\n\t\telse\n\t\t\tnode->first_attribute->prev_attribute_c = attr;\n\n\t\tattr->next_attribute = place->next_attribute;\n\t\tattr->prev_attribute_c = place;\n\t\tplace->next_attribute = attr;\n\t}\n\n\tinline void insert_attribute_before(xml_attribute_struct* attr, xml_attribute_struct* place, xml_node_struct* node)\n\t{\n\t\tif (place->prev_attribute_c->next_attribute)\n\t\t\tplace->prev_attribute_c->next_attribute = attr;\n\t\telse\n\t\t\tnode->first_attribute = attr;\n\n\t\tattr->prev_attribute_c = place->prev_attribute_c;\n\t\tattr->next_attribute = place;\n\t\tplace->prev_attribute_c = attr;\n\t}\n\n\tinline void remove_attribute(xml_attribute_struct* attr, xml_node_struct* node)\n\t{\n\t\tif (attr->next_attribute)\n\t\t\tattr->next_attribute->prev_attribute_c = attr->prev_attribute_c;\n\t\telse\n\t\t\tnode->first_attribute->prev_attribute_c = attr->prev_attribute_c;\n\n\t\tif (attr->prev_attribute_c->next_attribute)\n\t\t\tattr->prev_attribute_c->next_attribute = attr->next_attribute;\n\t\telse\n\t\t\tnode->first_attribute = attr->next_attribute;\n\n\t\tattr->prev_attribute_c = 0;\n\t\tattr->next_attribute = 0;\n\t}\n\n\tPUGI__FN_NO_INLINE xml_node_struct* append_new_node(xml_node_struct* node, xml_allocator& alloc, xml_node_type type = node_element)\n\t{\n\t\txml_node_struct* child = allocate_node(alloc, type);\n\t\tif (!child) return 0;\n\n\t\tappend_node(child, node);\n\n\t\treturn child;\n\t}\n\n\tPUGI__FN_NO_INLINE xml_attribute_struct* append_new_attribute(xml_node_struct* node, xml_allocator& alloc)\n\t{\n\t\txml_attribute_struct* attr = allocate_attribute(alloc);\n\t\tif (!attr) return 0;\n\n\t\tappend_attribute(attr, node);\n\n\t\treturn attr;\n\t}\nPUGI__NS_END\n\n// Helper classes for code generation\nPUGI__NS_BEGIN\n\tstruct opt_false\n\t{\n\t\tenum { value = 0 };\n\t};\n\n\tstruct opt_true\n\t{\n\t\tenum { value = 1 };\n\t};\nPUGI__NS_END\n\n// Unicode utilities\nPUGI__NS_BEGIN\n\tinline uint16_t endian_swap(uint16_t value)\n\t{\n\t\treturn static_cast<uint16_t>(((value & 0xff) << 8) | (value >> 8));\n\t}\n\n\tinline uint32_t endian_swap(uint32_t value)\n\t{\n\t\treturn ((value & 0xff) << 24) | ((value & 0xff00) << 8) | ((value & 0xff0000) >> 8) | (value >> 24);\n\t}\n\n\tstruct utf8_counter\n\t{\n\t\ttypedef size_t value_type;\n\n\t\tstatic value_type low(value_type result, uint32_t ch)\n\t\t{\n\t\t\t// U+0000..U+007F\n\t\t\tif (ch < 0x80) return result + 1;\n\t\t\t// U+0080..U+07FF\n\t\t\telse if (ch < 0x800) return result + 2;\n\t\t\t// U+0800..U+FFFF\n\t\t\telse return result + 3;\n\t\t}\n\n\t\tstatic value_type high(value_type result, uint32_t)\n\t\t{\n\t\t\t// U+10000..U+10FFFF\n\t\t\treturn result + 4;\n\t\t}\n\t};\n\n\tstruct utf8_writer\n\t{\n\t\ttypedef uint8_t* value_type;\n\n\t\tstatic value_type low(value_type result, uint32_t ch)\n\t\t{\n\t\t\t// U+0000..U+007F\n\t\t\tif (ch < 0x80)\n\t\t\t{\n\t\t\t\t*result = static_cast<uint8_t>(ch);\n\t\t\t\treturn result + 1;\n\t\t\t}\n\t\t\t// U+0080..U+07FF\n\t\t\telse if (ch < 0x800)\n\t\t\t{\n\t\t\t\tresult[0] = static_cast<uint8_t>(0xC0 | (ch >> 6));\n\t\t\t\tresult[1] = static_cast<uint8_t>(0x80 | (ch & 0x3F));\n\t\t\t\treturn result + 2;\n\t\t\t}\n\t\t\t// U+0800..U+FFFF\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult[0] = static_cast<uint8_t>(0xE0 | (ch >> 12));\n\t\t\t\tresult[1] = static_cast<uint8_t>(0x80 | ((ch >> 6) & 0x3F));\n\t\t\t\tresult[2] = static_cast<uint8_t>(0x80 | (ch & 0x3F));\n\t\t\t\treturn result + 3;\n\t\t\t}\n\t\t}\n\n\t\tstatic value_type high(value_type result, uint32_t ch)\n\t\t{\n\t\t\t// U+10000..U+10FFFF\n\t\t\tresult[0] = static_cast<uint8_t>(0xF0 | (ch >> 18));\n\t\t\tresult[1] = static_cast<uint8_t>(0x80 | ((ch >> 12) & 0x3F));\n\t\t\tresult[2] = static_cast<uint8_t>(0x80 | ((ch >> 6) & 0x3F));\n\t\t\tresult[3] = static_cast<uint8_t>(0x80 | (ch & 0x3F));\n\t\t\treturn result + 4;\n\t\t}\n\n\t\tstatic value_type any(value_type result, uint32_t ch)\n\t\t{\n\t\t\treturn (ch < 0x10000) ? low(result, ch) : high(result, ch);\n\t\t}\n\t};\n\n\tstruct utf16_counter\n\t{\n\t\ttypedef size_t value_type;\n\n\t\tstatic value_type low(value_type result, uint32_t)\n\t\t{\n\t\t\treturn result + 1;\n\t\t}\n\n\t\tstatic value_type high(value_type result, uint32_t)\n\t\t{\n\t\t\treturn result + 2;\n\t\t}\n\t};\n\n\tstruct utf16_writer\n\t{\n\t\ttypedef uint16_t* value_type;\n\n\t\tstatic value_type low(value_type result, uint32_t ch)\n\t\t{\n\t\t\t*result = static_cast<uint16_t>(ch);\n\n\t\t\treturn result + 1;\n\t\t}\n\n\t\tstatic value_type high(value_type result, uint32_t ch)\n\t\t{\n\t\t\tuint32_t msh = static_cast<uint32_t>(ch - 0x10000) >> 10;\n\t\t\tuint32_t lsh = static_cast<uint32_t>(ch - 0x10000) & 0x3ff;\n\n\t\t\tresult[0] = static_cast<uint16_t>(0xD800 + msh);\n\t\t\tresult[1] = static_cast<uint16_t>(0xDC00 + lsh);\n\n\t\t\treturn result + 2;\n\t\t}\n\n\t\tstatic value_type any(value_type result, uint32_t ch)\n\t\t{\n\t\t\treturn (ch < 0x10000) ? low(result, ch) : high(result, ch);\n\t\t}\n\t};\n\n\tstruct utf32_counter\n\t{\n\t\ttypedef size_t value_type;\n\n\t\tstatic value_type low(value_type result, uint32_t)\n\t\t{\n\t\t\treturn result + 1;\n\t\t}\n\n\t\tstatic value_type high(value_type result, uint32_t)\n\t\t{\n\t\t\treturn result + 1;\n\t\t}\n\t};\n\n\tstruct utf32_writer\n\t{\n\t\ttypedef uint32_t* value_type;\n\n\t\tstatic value_type low(value_type result, uint32_t ch)\n\t\t{\n\t\t\t*result = ch;\n\n\t\t\treturn result + 1;\n\t\t}\n\n\t\tstatic value_type high(value_type result, uint32_t ch)\n\t\t{\n\t\t\t*result = ch;\n\n\t\t\treturn result + 1;\n\t\t}\n\n\t\tstatic value_type any(value_type result, uint32_t ch)\n\t\t{\n\t\t\t*result = ch;\n\n\t\t\treturn result + 1;\n\t\t}\n\t};\n\n\tstruct latin1_writer\n\t{\n\t\ttypedef uint8_t* value_type;\n\n\t\tstatic value_type low(value_type result, uint32_t ch)\n\t\t{\n\t\t\t*result = static_cast<uint8_t>(ch > 255 ? '?' : ch);\n\n\t\t\treturn result + 1;\n\t\t}\n\n\t\tstatic value_type high(value_type result, uint32_t ch)\n\t\t{\n\t\t\t(void)ch;\n\n\t\t\t*result = '?';\n\n\t\t\treturn result + 1;\n\t\t}\n\t};\n\n\ttemplate <size_t size> struct wchar_selector;\n\n\ttemplate <> struct wchar_selector<2>\n\t{\n\t\ttypedef uint16_t type;\n\t\ttypedef utf16_counter counter;\n\t\ttypedef utf16_writer writer;\n\t};\n\n\ttemplate <> struct wchar_selector<4>\n\t{\n\t\ttypedef uint32_t type;\n\t\ttypedef utf32_counter counter;\n\t\ttypedef utf32_writer writer;\n\t};\n\n\ttypedef wchar_selector<sizeof(wchar_t)>::counter wchar_counter;\n\ttypedef wchar_selector<sizeof(wchar_t)>::writer wchar_writer;\n\n\ttemplate <typename Traits, typename opt_swap = opt_false> struct utf_decoder\n\t{\n\t\tstatic inline typename Traits::value_type decode_utf8_block(const uint8_t* data, size_t size, typename Traits::value_type result)\n\t\t{\n\t\t\tconst uint8_t utf8_byte_mask = 0x3f;\n\n\t\t\twhile (size)\n\t\t\t{\n\t\t\t\tuint8_t lead = *data;\n\n\t\t\t\t// 0xxxxxxx -> U+0000..U+007F\n\t\t\t\tif (lead < 0x80)\n\t\t\t\t{\n\t\t\t\t\tresult = Traits::low(result, lead);\n\t\t\t\t\tdata += 1;\n\t\t\t\t\tsize -= 1;\n\n\t\t\t\t\t// process aligned single-byte (ascii) blocks\n\t\t\t\t\tif ((reinterpret_cast<uintptr_t>(data) & 3) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// round-trip through void* to silence 'cast increases required alignment of target type' warnings\n\t\t\t\t\t\twhile (size >= 4 && (*static_cast<const uint32_t*>(static_cast<const void*>(data)) & 0x80808080) == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tresult = Traits::low(result, data[0]);\n\t\t\t\t\t\t\tresult = Traits::low(result, data[1]);\n\t\t\t\t\t\t\tresult = Traits::low(result, data[2]);\n\t\t\t\t\t\t\tresult = Traits::low(result, data[3]);\n\t\t\t\t\t\t\tdata += 4;\n\t\t\t\t\t\t\tsize -= 4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// 110xxxxx -> U+0080..U+07FF\n\t\t\t\telse if (static_cast<unsigned int>(lead - 0xC0) < 0x20 && size >= 2 && (data[1] & 0xc0) == 0x80)\n\t\t\t\t{\n\t\t\t\t\tresult = Traits::low(result, ((lead & ~0xC0) << 6) | (data[1] & utf8_byte_mask));\n\t\t\t\t\tdata += 2;\n\t\t\t\t\tsize -= 2;\n\t\t\t\t}\n\t\t\t\t// 1110xxxx -> U+0800-U+FFFF\n\t\t\t\telse if (static_cast<unsigned int>(lead - 0xE0) < 0x10 && size >= 3 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80)\n\t\t\t\t{\n\t\t\t\t\tresult = Traits::low(result, ((lead & ~0xE0) << 12) | ((data[1] & utf8_byte_mask) << 6) | (data[2] & utf8_byte_mask));\n\t\t\t\t\tdata += 3;\n\t\t\t\t\tsize -= 3;\n\t\t\t\t}\n\t\t\t\t// 11110xxx -> U+10000..U+10FFFF\n\t\t\t\telse if (static_cast<unsigned int>(lead - 0xF0) < 0x08 && size >= 4 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80 && (data[3] & 0xc0) == 0x80)\n\t\t\t\t{\n\t\t\t\t\tresult = Traits::high(result, ((lead & ~0xF0) << 18) | ((data[1] & utf8_byte_mask) << 12) | ((data[2] & utf8_byte_mask) << 6) | (data[3] & utf8_byte_mask));\n\t\t\t\t\tdata += 4;\n\t\t\t\t\tsize -= 4;\n\t\t\t\t}\n\t\t\t\t// 10xxxxxx or 11111xxx -> invalid\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdata += 1;\n\t\t\t\t\tsize -= 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tstatic inline typename Traits::value_type decode_utf16_block(const uint16_t* data, size_t size, typename Traits::value_type result)\n\t\t{\n\t\t\tconst uint16_t* end = data + size;\n\n\t\t\twhile (data < end)\n\t\t\t{\n\t\t\t\tunsigned int lead = opt_swap::value ? endian_swap(*data) : *data;\n\n\t\t\t\t// U+0000..U+D7FF\n\t\t\t\tif (lead < 0xD800)\n\t\t\t\t{\n\t\t\t\t\tresult = Traits::low(result, lead);\n\t\t\t\t\tdata += 1;\n\t\t\t\t}\n\t\t\t\t// U+E000..U+FFFF\n\t\t\t\telse if (static_cast<unsigned int>(lead - 0xE000) < 0x2000)\n\t\t\t\t{\n\t\t\t\t\tresult = Traits::low(result, lead);\n\t\t\t\t\tdata += 1;\n\t\t\t\t}\n\t\t\t\t// surrogate pair lead\n\t\t\t\telse if (static_cast<unsigned int>(lead - 0xD800) < 0x400 && data + 1 < end)\n\t\t\t\t{\n\t\t\t\t\tuint16_t next = opt_swap::value ? endian_swap(data[1]) : data[1];\n\n\t\t\t\t\tif (static_cast<unsigned int>(next - 0xDC00) < 0x400)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = Traits::high(result, 0x10000 + ((lead & 0x3ff) << 10) + (next & 0x3ff));\n\t\t\t\t\t\tdata += 2;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdata += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdata += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tstatic inline typename Traits::value_type decode_utf32_block(const uint32_t* data, size_t size, typename Traits::value_type result)\n\t\t{\n\t\t\tconst uint32_t* end = data + size;\n\n\t\t\twhile (data < end)\n\t\t\t{\n\t\t\t\tuint32_t lead = opt_swap::value ? endian_swap(*data) : *data;\n\n\t\t\t\t// U+0000..U+FFFF\n\t\t\t\tif (lead < 0x10000)\n\t\t\t\t{\n\t\t\t\t\tresult = Traits::low(result, lead);\n\t\t\t\t\tdata += 1;\n\t\t\t\t}\n\t\t\t\t// U+10000..U+10FFFF\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult = Traits::high(result, lead);\n\t\t\t\t\tdata += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tstatic inline typename Traits::value_type decode_latin1_block(const uint8_t* data, size_t size, typename Traits::value_type result)\n\t\t{\n\t\t\tfor (size_t i = 0; i < size; ++i)\n\t\t\t{\n\t\t\t\tresult = Traits::low(result, data[i]);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tstatic inline typename Traits::value_type decode_wchar_block_impl(const uint16_t* data, size_t size, typename Traits::value_type result)\n\t\t{\n\t\t\treturn decode_utf16_block(data, size, result);\n\t\t}\n\n\t\tstatic inline typename Traits::value_type decode_wchar_block_impl(const uint32_t* data, size_t size, typename Traits::value_type result)\n\t\t{\n\t\t\treturn decode_utf32_block(data, size, result);\n\t\t}\n\n\t\tstatic inline typename Traits::value_type decode_wchar_block(const wchar_t* data, size_t size, typename Traits::value_type result)\n\t\t{\n\t\t\treturn decode_wchar_block_impl(reinterpret_cast<const wchar_selector<sizeof(wchar_t)>::type*>(data), size, result);\n\t\t}\n\t};\n\n\ttemplate <typename T> PUGI__FN void convert_utf_endian_swap(T* result, const T* data, size_t length)\n\t{\n\t\tfor (size_t i = 0; i < length; ++i) result[i] = endian_swap(data[i]);\n\t}\n\n#ifdef PUGIXML_WCHAR_MODE\n\tPUGI__FN void convert_wchar_endian_swap(wchar_t* result, const wchar_t* data, size_t length)\n\t{\n\t\tfor (size_t i = 0; i < length; ++i) result[i] = static_cast<wchar_t>(endian_swap(static_cast<wchar_selector<sizeof(wchar_t)>::type>(data[i])));\n\t}\n#endif\nPUGI__NS_END\n\nPUGI__NS_BEGIN\n\tenum chartype_t\n\t{\n\t\tct_parse_pcdata = 1,\t// \\0, &, \\r, <\n\t\tct_parse_attr = 2,\t\t// \\0, &, \\r, ', \"\n\t\tct_parse_attr_ws = 4,\t// \\0, &, \\r, ', \", \\n, tab\n\t\tct_space = 8,\t\t\t// \\r, \\n, space, tab\n\t\tct_parse_cdata = 16,\t// \\0, ], >, \\r\n\t\tct_parse_comment = 32,\t// \\0, -, >, \\r\n\t\tct_symbol = 64,\t\t\t// Any symbol > 127, a-z, A-Z, 0-9, _, :, -, .\n\t\tct_start_symbol = 128\t// Any symbol > 127, a-z, A-Z, _, :\n\t};\n\n\tstatic const unsigned char chartype_table[256] =\n\t{\n\t\t55,  0,   0,   0,   0,   0,   0,   0,      0,   12,  12,  0,   0,   63,  0,   0,   // 0-15\n\t\t0,   0,   0,   0,   0,   0,   0,   0,      0,   0,   0,   0,   0,   0,   0,   0,   // 16-31\n\t\t8,   0,   6,   0,   0,   0,   7,   6,      0,   0,   0,   0,   0,   96,  64,  0,   // 32-47\n\t\t64,  64,  64,  64,  64,  64,  64,  64,     64,  64,  192, 0,   1,   0,   48,  0,   // 48-63\n\t\t0,   192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192, // 64-79\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 0,   0,   16,  0,   192, // 80-95\n\t\t0,   192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192, // 96-111\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 0, 0, 0, 0, 0,           // 112-127\n\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192, // 128+\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192,\n\t\t192, 192, 192, 192, 192, 192, 192, 192,    192, 192, 192, 192, 192, 192, 192, 192\n\t};\n\n\tenum chartypex_t\n\t{\n\t\tctx_special_pcdata = 1,   // Any symbol >= 0 and < 32 (except \\t, \\r, \\n), &, <, >\n\t\tctx_special_attr = 2,     // Any symbol >= 0 and < 32 (except \\t), &, <, >, \"\n\t\tctx_start_symbol = 4,\t  // Any symbol > 127, a-z, A-Z, _\n\t\tctx_digit = 8,\t\t\t  // 0-9\n\t\tctx_symbol = 16\t\t\t  // Any symbol > 127, a-z, A-Z, 0-9, _, -, .\n\t};\n\t\n\tstatic const unsigned char chartypex_table[256] =\n\t{\n\t\t3,  3,  3,  3,  3,  3,  3,  3,     3,  0,  2,  3,  3,  2,  3,  3,     // 0-15\n\t\t3,  3,  3,  3,  3,  3,  3,  3,     3,  3,  3,  3,  3,  3,  3,  3,     // 16-31\n\t\t0,  0,  2,  0,  0,  0,  3,  0,     0,  0,  0,  0,  0, 16, 16,  0,     // 32-47\n\t\t24, 24, 24, 24, 24, 24, 24, 24,    24, 24, 0,  0,  3,  0,  3,  0,     // 48-63\n\n\t\t0,  20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,    // 64-79\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 0,  0,  0,  0,  20,    // 80-95\n\t\t0,  20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,    // 96-111\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 0,  0,  0,  0,  0,     // 112-127\n\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,    // 128+\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20,\n\t\t20, 20, 20, 20, 20, 20, 20, 20,    20, 20, 20, 20, 20, 20, 20, 20\n\t};\n\t\n#ifdef PUGIXML_WCHAR_MODE\n\t#define PUGI__IS_CHARTYPE_IMPL(c, ct, table) ((static_cast<unsigned int>(c) < 128 ? table[static_cast<unsigned int>(c)] : table[128]) & (ct))\n#else\n\t#define PUGI__IS_CHARTYPE_IMPL(c, ct, table) (table[static_cast<unsigned char>(c)] & (ct))\n#endif\n\n\t#define PUGI__IS_CHARTYPE(c, ct) PUGI__IS_CHARTYPE_IMPL(c, ct, chartype_table)\n\t#define PUGI__IS_CHARTYPEX(c, ct) PUGI__IS_CHARTYPE_IMPL(c, ct, chartypex_table)\n\n\tPUGI__FN bool is_little_endian()\n\t{\n\t\tunsigned int ui = 1;\n\n\t\treturn *reinterpret_cast<unsigned char*>(&ui) == 1;\n\t}\n\n\tPUGI__FN xml_encoding get_wchar_encoding()\n\t{\n\t\tPUGI__STATIC_ASSERT(sizeof(wchar_t) == 2 || sizeof(wchar_t) == 4);\n\n\t\tif (sizeof(wchar_t) == 2)\n\t\t\treturn is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\t\telse \n\t\t\treturn is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\t}\n\n\tPUGI__FN xml_encoding guess_buffer_encoding(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)\n\t{\n\t\t// look for BOM in first few bytes\n\t\tif (d0 == 0 && d1 == 0 && d2 == 0xfe && d3 == 0xff) return encoding_utf32_be;\n\t\tif (d0 == 0xff && d1 == 0xfe && d2 == 0 && d3 == 0) return encoding_utf32_le;\n\t\tif (d0 == 0xfe && d1 == 0xff) return encoding_utf16_be;\n\t\tif (d0 == 0xff && d1 == 0xfe) return encoding_utf16_le;\n\t\tif (d0 == 0xef && d1 == 0xbb && d2 == 0xbf) return encoding_utf8;\n\n\t\t// look for <, <? or <?xm in various encodings\n\t\tif (d0 == 0 && d1 == 0 && d2 == 0 && d3 == 0x3c) return encoding_utf32_be;\n\t\tif (d0 == 0x3c && d1 == 0 && d2 == 0 && d3 == 0) return encoding_utf32_le;\n\t\tif (d0 == 0 && d1 == 0x3c && d2 == 0 && d3 == 0x3f) return encoding_utf16_be;\n\t\tif (d0 == 0x3c && d1 == 0 && d2 == 0x3f && d3 == 0) return encoding_utf16_le;\n\t\tif (d0 == 0x3c && d1 == 0x3f && d2 == 0x78 && d3 == 0x6d) return encoding_utf8;\n\n\t\t// look for utf16 < followed by node name (this may fail, but is better than utf8 since it's zero terminated so early)\n\t\tif (d0 == 0 && d1 == 0x3c) return encoding_utf16_be;\n\t\tif (d0 == 0x3c && d1 == 0) return encoding_utf16_le;\n\n\t\t// no known BOM detected, assume utf8\n\t\treturn encoding_utf8;\n\t}\n\n\tPUGI__FN xml_encoding get_buffer_encoding(xml_encoding encoding, const void* contents, size_t size)\n\t{\n\t\t// replace wchar encoding with utf implementation\n\t\tif (encoding == encoding_wchar) return get_wchar_encoding();\n\n\t\t// replace utf16 encoding with utf16 with specific endianness\n\t\tif (encoding == encoding_utf16) return is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n\t\t// replace utf32 encoding with utf32 with specific endianness\n\t\tif (encoding == encoding_utf32) return is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n\t\t// only do autodetection if no explicit encoding is requested\n\t\tif (encoding != encoding_auto) return encoding;\n\n\t\t// skip encoding autodetection if input buffer is too small\n\t\tif (size < 4) return encoding_utf8;\n\n\t\t// try to guess encoding (based on XML specification, Appendix F.1)\n\t\tconst uint8_t* data = static_cast<const uint8_t*>(contents);\n\n\t\tPUGI__DMC_VOLATILE uint8_t d0 = data[0], d1 = data[1], d2 = data[2], d3 = data[3];\n\n\t\treturn guess_buffer_encoding(d0, d1, d2, d3);\n\t}\n\n\tPUGI__FN bool get_mutable_buffer(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)\n\t{\n\t\tsize_t length = size / sizeof(char_t);\n\n\t\tif (is_mutable)\n\t\t{\n\t\t\tout_buffer = static_cast<char_t*>(const_cast<void*>(contents));\n\t\t\tout_length = length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\t\tif (!buffer) return false;\n\n\t\t\tif (contents)\n\t\t\t\tmemcpy(buffer, contents, length * sizeof(char_t));\n\t\t\telse\n\t\t\t\tassert(length == 0);\n\n\t\t\tbuffer[length] = 0;\n\n\t\t\tout_buffer = buffer;\n\t\t\tout_length = length + 1;\n\t\t}\n\n\t\treturn true;\n\t}\n\n#ifdef PUGIXML_WCHAR_MODE\n\tPUGI__FN bool need_endian_swap_utf(xml_encoding le, xml_encoding re)\n\t{\n\t\treturn (le == encoding_utf16_be && re == encoding_utf16_le) || (le == encoding_utf16_le && re == encoding_utf16_be) ||\n\t\t\t   (le == encoding_utf32_be && re == encoding_utf32_le) || (le == encoding_utf32_le && re == encoding_utf32_be);\n\t}\n\n\tPUGI__FN bool convert_buffer_endian_swap(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)\n\t{\n\t\tconst char_t* data = static_cast<const char_t*>(contents);\n\t\tsize_t length = size / sizeof(char_t);\n\n\t\tif (is_mutable)\n\t\t{\n\t\t\tchar_t* buffer = const_cast<char_t*>(data);\n\n\t\t\tconvert_wchar_endian_swap(buffer, data, length);\n\n\t\t\tout_buffer = buffer;\n\t\t\tout_length = length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\t\tif (!buffer) return false;\n\n\t\t\tconvert_wchar_endian_swap(buffer, data, length);\n\t\t\tbuffer[length] = 0;\n\n\t\t\tout_buffer = buffer;\n\t\t\tout_length = length + 1;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool convert_buffer_utf8(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size)\n\t{\n\t\tconst uint8_t* data = static_cast<const uint8_t*>(contents);\n\t\tsize_t data_length = size;\n\n\t\t// first pass: get length in wchar_t units\n\t\tsize_t length = utf_decoder<wchar_counter>::decode_utf8_block(data, data_length, 0);\n\n\t\t// allocate buffer of suitable length\n\t\tchar_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\tif (!buffer) return false;\n\n\t\t// second pass: convert utf8 input to wchar_t\n\t\twchar_writer::value_type obegin = reinterpret_cast<wchar_writer::value_type>(buffer);\n\t\twchar_writer::value_type oend = utf_decoder<wchar_writer>::decode_utf8_block(data, data_length, obegin);\n\n\t\tassert(oend == obegin + length);\n\t\t*oend = 0;\n\n\t\tout_buffer = buffer;\n\t\tout_length = length + 1;\n\n\t\treturn true;\n\t}\n\n\ttemplate <typename opt_swap> PUGI__FN bool convert_buffer_utf16(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)\n\t{\n\t\tconst uint16_t* data = static_cast<const uint16_t*>(contents);\n\t\tsize_t data_length = size / sizeof(uint16_t);\n\n\t\t// first pass: get length in wchar_t units\n\t\tsize_t length = utf_decoder<wchar_counter, opt_swap>::decode_utf16_block(data, data_length, 0);\n\n\t\t// allocate buffer of suitable length\n\t\tchar_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\tif (!buffer) return false;\n\n\t\t// second pass: convert utf16 input to wchar_t\n\t\twchar_writer::value_type obegin = reinterpret_cast<wchar_writer::value_type>(buffer);\n\t\twchar_writer::value_type oend = utf_decoder<wchar_writer, opt_swap>::decode_utf16_block(data, data_length, obegin);\n\n\t\tassert(oend == obegin + length);\n\t\t*oend = 0;\n\n\t\tout_buffer = buffer;\n\t\tout_length = length + 1;\n\n\t\treturn true;\n\t}\n\n\ttemplate <typename opt_swap> PUGI__FN bool convert_buffer_utf32(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)\n\t{\n\t\tconst uint32_t* data = static_cast<const uint32_t*>(contents);\n\t\tsize_t data_length = size / sizeof(uint32_t);\n\n\t\t// first pass: get length in wchar_t units\n\t\tsize_t length = utf_decoder<wchar_counter, opt_swap>::decode_utf32_block(data, data_length, 0);\n\n\t\t// allocate buffer of suitable length\n\t\tchar_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\tif (!buffer) return false;\n\n\t\t// second pass: convert utf32 input to wchar_t\n\t\twchar_writer::value_type obegin = reinterpret_cast<wchar_writer::value_type>(buffer);\n\t\twchar_writer::value_type oend = utf_decoder<wchar_writer, opt_swap>::decode_utf32_block(data, data_length, obegin);\n\n\t\tassert(oend == obegin + length);\n\t\t*oend = 0;\n\n\t\tout_buffer = buffer;\n\t\tout_length = length + 1;\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool convert_buffer_latin1(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size)\n\t{\n\t\tconst uint8_t* data = static_cast<const uint8_t*>(contents);\n\t\tsize_t data_length = size;\n\n\t\t// get length in wchar_t units\n\t\tsize_t length = data_length;\n\n\t\t// allocate buffer of suitable length\n\t\tchar_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\tif (!buffer) return false;\n\n\t\t// convert latin1 input to wchar_t\n\t\twchar_writer::value_type obegin = reinterpret_cast<wchar_writer::value_type>(buffer);\n\t\twchar_writer::value_type oend = utf_decoder<wchar_writer>::decode_latin1_block(data, data_length, obegin);\n\n\t\tassert(oend == obegin + length);\n\t\t*oend = 0;\n\n\t\tout_buffer = buffer;\n\t\tout_length = length + 1;\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool convert_buffer(char_t*& out_buffer, size_t& out_length, xml_encoding encoding, const void* contents, size_t size, bool is_mutable)\n\t{\n\t\t// get native encoding\n\t\txml_encoding wchar_encoding = get_wchar_encoding();\n\n\t\t// fast path: no conversion required\n\t\tif (encoding == wchar_encoding) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable);\n\n\t\t// only endian-swapping is required\n\t\tif (need_endian_swap_utf(encoding, wchar_encoding)) return convert_buffer_endian_swap(out_buffer, out_length, contents, size, is_mutable);\n\n\t\t// source encoding is utf8\n\t\tif (encoding == encoding_utf8) return convert_buffer_utf8(out_buffer, out_length, contents, size);\n\n\t\t// source encoding is utf16\n\t\tif (encoding == encoding_utf16_be || encoding == encoding_utf16_le)\n\t\t{\n\t\t\txml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n\t\t\treturn (native_encoding == encoding) ?\n\t\t\t\tconvert_buffer_utf16(out_buffer, out_length, contents, size, opt_false()) :\n\t\t\t\tconvert_buffer_utf16(out_buffer, out_length, contents, size, opt_true());\n\t\t}\n\n\t\t// source encoding is utf32\n\t\tif (encoding == encoding_utf32_be || encoding == encoding_utf32_le)\n\t\t{\n\t\t\txml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n\t\t\treturn (native_encoding == encoding) ?\n\t\t\t\tconvert_buffer_utf32(out_buffer, out_length, contents, size, opt_false()) :\n\t\t\t\tconvert_buffer_utf32(out_buffer, out_length, contents, size, opt_true());\n\t\t}\n\n\t\t// source encoding is latin1\n\t\tif (encoding == encoding_latin1) return convert_buffer_latin1(out_buffer, out_length, contents, size);\n\n\t\tassert(!\"Invalid encoding\");\n\t\treturn false;\n\t}\n#else\n\ttemplate <typename opt_swap> PUGI__FN bool convert_buffer_utf16(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)\n\t{\n\t\tconst uint16_t* data = static_cast<const uint16_t*>(contents);\n\t\tsize_t data_length = size / sizeof(uint16_t);\n\n\t\t// first pass: get length in utf8 units\n\t\tsize_t length = utf_decoder<utf8_counter, opt_swap>::decode_utf16_block(data, data_length, 0);\n\n\t\t// allocate buffer of suitable length\n\t\tchar_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\tif (!buffer) return false;\n\n\t\t// second pass: convert utf16 input to utf8\n\t\tuint8_t* obegin = reinterpret_cast<uint8_t*>(buffer);\n\t\tuint8_t* oend = utf_decoder<utf8_writer, opt_swap>::decode_utf16_block(data, data_length, obegin);\n\n\t\tassert(oend == obegin + length);\n\t\t*oend = 0;\n\n\t\tout_buffer = buffer;\n\t\tout_length = length + 1;\n\n\t\treturn true;\n\t}\n\n\ttemplate <typename opt_swap> PUGI__FN bool convert_buffer_utf32(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)\n\t{\n\t\tconst uint32_t* data = static_cast<const uint32_t*>(contents);\n\t\tsize_t data_length = size / sizeof(uint32_t);\n\n\t\t// first pass: get length in utf8 units\n\t\tsize_t length = utf_decoder<utf8_counter, opt_swap>::decode_utf32_block(data, data_length, 0);\n\n\t\t// allocate buffer of suitable length\n\t\tchar_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\tif (!buffer) return false;\n\n\t\t// second pass: convert utf32 input to utf8\n\t\tuint8_t* obegin = reinterpret_cast<uint8_t*>(buffer);\n\t\tuint8_t* oend = utf_decoder<utf8_writer, opt_swap>::decode_utf32_block(data, data_length, obegin);\n\n\t\tassert(oend == obegin + length);\n\t\t*oend = 0;\n\n\t\tout_buffer = buffer;\n\t\tout_length = length + 1;\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN size_t get_latin1_7bit_prefix_length(const uint8_t* data, size_t size)\n\t{\n\t\tfor (size_t i = 0; i < size; ++i)\n\t\t\tif (data[i] > 127)\n\t\t\t\treturn i;\n\n\t\treturn size;\n\t}\n\n\tPUGI__FN bool convert_buffer_latin1(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)\n\t{\n\t\tconst uint8_t* data = static_cast<const uint8_t*>(contents);\n\t\tsize_t data_length = size;\n\n\t\t// get size of prefix that does not need utf8 conversion\n\t\tsize_t prefix_length = get_latin1_7bit_prefix_length(data, data_length);\n\t\tassert(prefix_length <= data_length);\n\n\t\tconst uint8_t* postfix = data + prefix_length;\n\t\tsize_t postfix_length = data_length - prefix_length;\n\n\t\t// if no conversion is needed, just return the original buffer\n\t\tif (postfix_length == 0) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable);\n\n\t\t// first pass: get length in utf8 units\n\t\tsize_t length = prefix_length + utf_decoder<utf8_counter>::decode_latin1_block(postfix, postfix_length, 0);\n\n\t\t// allocate buffer of suitable length\n\t\tchar_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\tif (!buffer) return false;\n\n\t\t// second pass: convert latin1 input to utf8\n\t\tmemcpy(buffer, data, prefix_length);\n\n\t\tuint8_t* obegin = reinterpret_cast<uint8_t*>(buffer);\n\t\tuint8_t* oend = utf_decoder<utf8_writer>::decode_latin1_block(postfix, postfix_length, obegin + prefix_length);\n\n\t\tassert(oend == obegin + length);\n\t\t*oend = 0;\n\n\t\tout_buffer = buffer;\n\t\tout_length = length + 1;\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool convert_buffer(char_t*& out_buffer, size_t& out_length, xml_encoding encoding, const void* contents, size_t size, bool is_mutable)\n\t{\n\t\t// fast path: no conversion required\n\t\tif (encoding == encoding_utf8) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable);\n\n\t\t// source encoding is utf16\n\t\tif (encoding == encoding_utf16_be || encoding == encoding_utf16_le)\n\t\t{\n\t\t\txml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n\t\t\treturn (native_encoding == encoding) ?\n\t\t\t\tconvert_buffer_utf16(out_buffer, out_length, contents, size, opt_false()) :\n\t\t\t\tconvert_buffer_utf16(out_buffer, out_length, contents, size, opt_true());\n\t\t}\n\n\t\t// source encoding is utf32\n\t\tif (encoding == encoding_utf32_be || encoding == encoding_utf32_le)\n\t\t{\n\t\t\txml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n\t\t\treturn (native_encoding == encoding) ?\n\t\t\t\tconvert_buffer_utf32(out_buffer, out_length, contents, size, opt_false()) :\n\t\t\t\tconvert_buffer_utf32(out_buffer, out_length, contents, size, opt_true());\n\t\t}\n\n\t\t// source encoding is latin1\n\t\tif (encoding == encoding_latin1) return convert_buffer_latin1(out_buffer, out_length, contents, size, is_mutable);\n\n\t\tassert(!\"Invalid encoding\");\n\t\treturn false;\n\t}\n#endif\n\n\tPUGI__FN size_t as_utf8_begin(const wchar_t* str, size_t length)\n\t{\n\t\t// get length in utf8 characters\n\t\treturn utf_decoder<utf8_counter>::decode_wchar_block(str, length, 0);\n\t}\n\n\tPUGI__FN void as_utf8_end(char* buffer, size_t size, const wchar_t* str, size_t length)\n\t{\n\t\t// convert to utf8\n\t\tuint8_t* begin = reinterpret_cast<uint8_t*>(buffer);\n\t\tuint8_t* end = utf_decoder<utf8_writer>::decode_wchar_block(str, length, begin);\n\t\n\t\tassert(begin + size == end);\n\t\t(void)!end;\n\n\t\t// zero-terminate\n\t\tbuffer[size] = 0;\n\t}\n\t\n#ifndef PUGIXML_NO_STL\n\tPUGI__FN std::string as_utf8_impl(const wchar_t* str, size_t length)\n\t{\n\t\t// first pass: get length in utf8 characters\n\t\tsize_t size = as_utf8_begin(str, length);\n\n\t\t// allocate resulting string\n\t\tstd::string result;\n\t\tresult.resize(size);\n\n\t\t// second pass: convert to utf8\n\t\tif (size > 0) as_utf8_end(&result[0], size, str, length);\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN std::basic_string<wchar_t> as_wide_impl(const char* str, size_t size)\n\t{\n\t\tconst uint8_t* data = reinterpret_cast<const uint8_t*>(str);\n\n\t\t// first pass: get length in wchar_t units\n\t\tsize_t length = utf_decoder<wchar_counter>::decode_utf8_block(data, size, 0);\n\n\t\t// allocate resulting string\n\t\tstd::basic_string<wchar_t> result;\n\t\tresult.resize(length);\n\n\t\t// second pass: convert to wchar_t\n\t\tif (length > 0)\n\t\t{\n\t\t\twchar_writer::value_type begin = reinterpret_cast<wchar_writer::value_type>(&result[0]);\n\t\t\twchar_writer::value_type end = utf_decoder<wchar_writer>::decode_utf8_block(data, size, begin);\n\n\t\t\tassert(begin + length == end);\n\t\t\t(void)!end;\n\t\t}\n\n\t\treturn result;\n\t}\n#endif\n\n\tinline bool strcpy_insitu_allow(size_t length, uintptr_t header, uintptr_t header_mask, char_t* target)\n\t{\n\t\t// never reuse shared memory\n\t\tif (header & xml_memory_page_contents_shared_mask) return false;\n\n\t\tsize_t target_length = strlength(target);\n\n\t\t// always reuse document buffer memory if possible\n\t\tif ((header & header_mask) == 0) return target_length >= length;\n\n\t\t// reuse heap memory if waste is not too great\n\t\tconst size_t reuse_threshold = 32;\n\n\t\treturn target_length >= length && (target_length < reuse_threshold || target_length - length < target_length / 2);\n\t}\n\n\tPUGI__FN bool strcpy_insitu(char_t*& dest, uintptr_t& header, uintptr_t header_mask, const char_t* source)\n\t{\n\t\tassert(header);\n\n\t\tsize_t source_length = strlength(source);\n\n\t\tif (source_length == 0)\n\t\t{\n\t\t\t// empty string and null pointer are equivalent, so just deallocate old memory\n\t\t\txml_allocator* alloc = reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask)->allocator;\n\n\t\t\tif (header & header_mask) alloc->deallocate_string(dest);\n\t\t\t\n\t\t\t// mark the string as not allocated\n\t\t\tdest = 0;\n\t\t\theader &= ~header_mask;\n\n\t\t\treturn true;\n\t\t}\n\t\telse if (dest && strcpy_insitu_allow(source_length, header, header_mask, dest))\n\t\t{\n\t\t\t// we can reuse old buffer, so just copy the new data (including zero terminator)\n\t\t\tmemcpy(dest, source, (source_length + 1) * sizeof(char_t));\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\txml_allocator* alloc = reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask)->allocator;\n\n\t\t\t// allocate new buffer\n\t\t\tchar_t* buf = alloc->allocate_string(source_length + 1);\n\t\t\tif (!buf) return false;\n\n\t\t\t// copy the string (including zero terminator)\n\t\t\tmemcpy(buf, source, (source_length + 1) * sizeof(char_t));\n\n\t\t\t// deallocate old buffer (*after* the above to protect against overlapping memory and/or allocation failures)\n\t\t\tif (header & header_mask) alloc->deallocate_string(dest);\n\t\t\t\n\t\t\t// the string is now allocated, so set the flag\n\t\t\tdest = buf;\n\t\t\theader |= header_mask;\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tstruct gap\n\t{\n\t\tchar_t* end;\n\t\tsize_t size;\n\t\t\t\n\t\tgap(): end(0), size(0)\n\t\t{\n\t\t}\n\t\t\t\n\t\t// Push new gap, move s count bytes further (skipping the gap).\n\t\t// Collapse previous gap.\n\t\tvoid push(char_t*& s, size_t count)\n\t\t{\n\t\t\tif (end) // there was a gap already; collapse it\n\t\t\t{\n\t\t\t\t// Move [old_gap_end, new_gap_start) to [old_gap_start, ...)\n\t\t\t\tassert(s >= end);\n\t\t\t\tmemmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));\n\t\t\t}\n\t\t\t\t\n\t\t\ts += count; // end of current gap\n\t\t\t\t\n\t\t\t// \"merge\" two gaps\n\t\t\tend = s;\n\t\t\tsize += count;\n\t\t}\n\t\t\t\n\t\t// Collapse all gaps, return past-the-end pointer\n\t\tchar_t* flush(char_t* s)\n\t\t{\n\t\t\tif (end)\n\t\t\t{\n\t\t\t\t// Move [old_gap_end, current_pos) to [old_gap_start, ...)\n\t\t\t\tassert(s >= end);\n\t\t\t\tmemmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));\n\n\t\t\t\treturn s - size;\n\t\t\t}\n\t\t\telse return s;\n\t\t}\n\t};\n\t\n\tPUGI__FN char_t* strconv_escape(char_t* s, gap& g)\n\t{\n\t\tchar_t* stre = s + 1;\n\n\t\tswitch (*stre)\n\t\t{\n\t\t\tcase '#':\t// &#...\n\t\t\t{\n\t\t\t\tunsigned int ucsc = 0;\n\n\t\t\t\tif (stre[1] == 'x') // &#x... (hex code)\n\t\t\t\t{\n\t\t\t\t\tstre += 2;\n\n\t\t\t\t\tchar_t ch = *stre;\n\n\t\t\t\t\tif (ch == ';') return stre;\n\n\t\t\t\t\tfor (;;)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (static_cast<unsigned int>(ch - '0') <= 9)\n\t\t\t\t\t\t\tucsc = 16 * ucsc + (ch - '0');\n\t\t\t\t\t\telse if (static_cast<unsigned int>((ch | ' ') - 'a') <= 5)\n\t\t\t\t\t\t\tucsc = 16 * ucsc + ((ch | ' ') - 'a' + 10);\n\t\t\t\t\t\telse if (ch == ';')\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse // cancel\n\t\t\t\t\t\t\treturn stre;\n\n\t\t\t\t\t\tch = *++stre;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t++stre;\n\t\t\t\t}\n\t\t\t\telse\t// &#... (dec code)\n\t\t\t\t{\n\t\t\t\t\tchar_t ch = *++stre;\n\n\t\t\t\t\tif (ch == ';') return stre;\n\n\t\t\t\t\tfor (;;)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (static_cast<unsigned int>(static_cast<unsigned int>(ch) - '0') <= 9)\n\t\t\t\t\t\t\tucsc = 10 * ucsc + (ch - '0');\n\t\t\t\t\t\telse if (ch == ';')\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse // cancel\n\t\t\t\t\t\t\treturn stre;\n\n\t\t\t\t\t\tch = *++stre;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t++stre;\n\t\t\t\t}\n\n\t\t\t#ifdef PUGIXML_WCHAR_MODE\n\t\t\t\ts = reinterpret_cast<char_t*>(wchar_writer::any(reinterpret_cast<wchar_writer::value_type>(s), ucsc));\n\t\t\t#else\n\t\t\t\ts = reinterpret_cast<char_t*>(utf8_writer::any(reinterpret_cast<uint8_t*>(s), ucsc));\n\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\tg.push(s, stre - s);\n\t\t\t\treturn stre;\n\t\t\t}\n\n\t\t\tcase 'a':\t// &a\n\t\t\t{\n\t\t\t\t++stre;\n\n\t\t\t\tif (*stre == 'm') // &am\n\t\t\t\t{\n\t\t\t\t\tif (*++stre == 'p' && *++stre == ';') // &amp;\n\t\t\t\t\t{\n\t\t\t\t\t\t*s++ = '&';\n\t\t\t\t\t\t++stre;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tg.push(s, stre - s);\n\t\t\t\t\t\treturn stre;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (*stre == 'p') // &ap\n\t\t\t\t{\n\t\t\t\t\tif (*++stre == 'o' && *++stre == 's' && *++stre == ';') // &apos;\n\t\t\t\t\t{\n\t\t\t\t\t\t*s++ = '\\'';\n\t\t\t\t\t\t++stre;\n\n\t\t\t\t\t\tg.push(s, stre - s);\n\t\t\t\t\t\treturn stre;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'g': // &g\n\t\t\t{\n\t\t\t\tif (*++stre == 't' && *++stre == ';') // &gt;\n\t\t\t\t{\n\t\t\t\t\t*s++ = '>';\n\t\t\t\t\t++stre;\n\t\t\t\t\t\n\t\t\t\t\tg.push(s, stre - s);\n\t\t\t\t\treturn stre;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'l': // &l\n\t\t\t{\n\t\t\t\tif (*++stre == 't' && *++stre == ';') // &lt;\n\t\t\t\t{\n\t\t\t\t\t*s++ = '<';\n\t\t\t\t\t++stre;\n\t\t\t\t\t\t\n\t\t\t\t\tg.push(s, stre - s);\n\t\t\t\t\treturn stre;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'q': // &q\n\t\t\t{\n\t\t\t\tif (*++stre == 'u' && *++stre == 'o' && *++stre == 't' && *++stre == ';') // &quot;\n\t\t\t\t{\n\t\t\t\t\t*s++ = '\"';\n\t\t\t\t\t++stre;\n\t\t\t\t\t\n\t\t\t\t\tg.push(s, stre - s);\n\t\t\t\t\treturn stre;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn stre;\n\t}\n\n\t// Parser utilities\n\t#define PUGI__ENDSWITH(c, e)        ((c) == (e) || ((c) == 0 && endch == (e)))\n\t#define PUGI__SKIPWS()              { while (PUGI__IS_CHARTYPE(*s, ct_space)) ++s; }\n\t#define PUGI__OPTSET(OPT)           ( optmsk & (OPT) )\n\t#define PUGI__PUSHNODE(TYPE)        { cursor = append_new_node(cursor, alloc, TYPE); if (!cursor) PUGI__THROW_ERROR(status_out_of_memory, s); }\n\t#define PUGI__POPNODE()             { cursor = cursor->parent; }\n\t#define PUGI__SCANFOR(X)            { while (*s != 0 && !(X)) ++s; }\n\t#define PUGI__SCANWHILE(X)          { while (X) ++s; }\n\t#define PUGI__SCANWHILE_UNROLL(X)   { for (;;) { char_t ss = s[0]; if (PUGI__UNLIKELY(!(X))) { break; } ss = s[1]; if (PUGI__UNLIKELY(!(X))) { s += 1; break; } ss = s[2]; if (PUGI__UNLIKELY(!(X))) { s += 2; break; } ss = s[3]; if (PUGI__UNLIKELY(!(X))) { s += 3; break; } s += 4; } }\n\t#define PUGI__ENDSEG()              { ch = *s; *s = 0; ++s; }\n\t#define PUGI__THROW_ERROR(err, m)   return error_offset = m, error_status = err, static_cast<char_t*>(0)\n\t#define PUGI__CHECK_ERROR(err, m)   { if (*s == 0) PUGI__THROW_ERROR(err, m); }\n\n\tPUGI__FN char_t* strconv_comment(char_t* s, char_t endch)\n\t{\n\t\tgap g;\n\t\t\n\t\twhile (true)\n\t\t{\n\t\t\tPUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_comment));\n\t\t\n\t\t\tif (*s == '\\r') // Either a single 0x0d or 0x0d 0x0a pair\n\t\t\t{\n\t\t\t\t*s++ = '\\n'; // replace first one with 0x0a\n\t\t\t\t\n\t\t\t\tif (*s == '\\n') g.push(s, 1);\n\t\t\t}\n\t\t\telse if (s[0] == '-' && s[1] == '-' && PUGI__ENDSWITH(s[2], '>')) // comment ends here\n\t\t\t{\n\t\t\t\t*g.flush(s) = 0;\n\t\t\t\t\n\t\t\t\treturn s + (s[2] == '>' ? 3 : 2);\n\t\t\t}\n\t\t\telse if (*s == 0)\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse ++s;\n\t\t}\n\t}\n\n\tPUGI__FN char_t* strconv_cdata(char_t* s, char_t endch)\n\t{\n\t\tgap g;\n\t\t\t\n\t\twhile (true)\n\t\t{\n\t\t\tPUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_cdata));\n\t\t\t\n\t\t\tif (*s == '\\r') // Either a single 0x0d or 0x0d 0x0a pair\n\t\t\t{\n\t\t\t\t*s++ = '\\n'; // replace first one with 0x0a\n\t\t\t\t\n\t\t\t\tif (*s == '\\n') g.push(s, 1);\n\t\t\t}\n\t\t\telse if (s[0] == ']' && s[1] == ']' && PUGI__ENDSWITH(s[2], '>')) // CDATA ends here\n\t\t\t{\n\t\t\t\t*g.flush(s) = 0;\n\t\t\t\t\n\t\t\t\treturn s + 1;\n\t\t\t}\n\t\t\telse if (*s == 0)\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse ++s;\n\t\t}\n\t}\n\t\n\ttypedef char_t* (*strconv_pcdata_t)(char_t*);\n\t\t\n\ttemplate <typename opt_trim, typename opt_eol, typename opt_escape> struct strconv_pcdata_impl\n\t{\n\t\tstatic char_t* parse(char_t* s)\n\t\t{\n\t\t\tgap g;\n\n\t\t\tchar_t* begin = s;\n\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\tPUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_pcdata));\n\n\t\t\t\tif (*s == '<') // PCDATA ends here\n\t\t\t\t{\n\t\t\t\t\tchar_t* end = g.flush(s);\n\n\t\t\t\t\tif (opt_trim::value)\n\t\t\t\t\t\twhile (end > begin && PUGI__IS_CHARTYPE(end[-1], ct_space))\n\t\t\t\t\t\t\t--end;\n\n\t\t\t\t\t*end = 0;\n\t\t\t\t\t\n\t\t\t\t\treturn s + 1;\n\t\t\t\t}\n\t\t\t\telse if (opt_eol::value && *s == '\\r') // Either a single 0x0d or 0x0d 0x0a pair\n\t\t\t\t{\n\t\t\t\t\t*s++ = '\\n'; // replace first one with 0x0a\n\t\t\t\t\t\n\t\t\t\t\tif (*s == '\\n') g.push(s, 1);\n\t\t\t\t}\n\t\t\t\telse if (opt_escape::value && *s == '&')\n\t\t\t\t{\n\t\t\t\t\ts = strconv_escape(s, g);\n\t\t\t\t}\n\t\t\t\telse if (*s == 0)\n\t\t\t\t{\n\t\t\t\t\tchar_t* end = g.flush(s);\n\n\t\t\t\t\tif (opt_trim::value)\n\t\t\t\t\t\twhile (end > begin && PUGI__IS_CHARTYPE(end[-1], ct_space))\n\t\t\t\t\t\t\t--end;\n\n\t\t\t\t\t*end = 0;\n\n\t\t\t\t\treturn s;\n\t\t\t\t}\n\t\t\t\telse ++s;\n\t\t\t}\n\t\t}\n\t};\n\t\n\tPUGI__FN strconv_pcdata_t get_strconv_pcdata(unsigned int optmask)\n\t{\n\t\tPUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_trim_pcdata == 0x0800);\n\n\t\tswitch (((optmask >> 4) & 3) | ((optmask >> 9) & 4)) // get bitmask for flags (eol escapes trim)\n\t\t{\n\t\tcase 0: return strconv_pcdata_impl<opt_false, opt_false, opt_false>::parse;\n\t\tcase 1: return strconv_pcdata_impl<opt_false, opt_false, opt_true>::parse;\n\t\tcase 2: return strconv_pcdata_impl<opt_false, opt_true, opt_false>::parse;\n\t\tcase 3: return strconv_pcdata_impl<opt_false, opt_true, opt_true>::parse;\n\t\tcase 4: return strconv_pcdata_impl<opt_true, opt_false, opt_false>::parse;\n\t\tcase 5: return strconv_pcdata_impl<opt_true, opt_false, opt_true>::parse;\n\t\tcase 6: return strconv_pcdata_impl<opt_true, opt_true, opt_false>::parse;\n\t\tcase 7: return strconv_pcdata_impl<opt_true, opt_true, opt_true>::parse;\n\t\tdefault: assert(false); return 0; // should not get here\n\t\t}\n\t}\n\n\ttypedef char_t* (*strconv_attribute_t)(char_t*, char_t);\n\t\n\ttemplate <typename opt_escape> struct strconv_attribute_impl\n\t{\n\t\tstatic char_t* parse_wnorm(char_t* s, char_t end_quote)\n\t\t{\n\t\t\tgap g;\n\n\t\t\t// trim leading whitespaces\n\t\t\tif (PUGI__IS_CHARTYPE(*s, ct_space))\n\t\t\t{\n\t\t\t\tchar_t* str = s;\n\t\t\t\t\n\t\t\t\tdo ++str;\n\t\t\t\twhile (PUGI__IS_CHARTYPE(*str, ct_space));\n\t\t\t\t\n\t\t\t\tg.push(s, str - s);\n\t\t\t}\n\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\tPUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr_ws | ct_space));\n\t\t\t\t\n\t\t\t\tif (*s == end_quote)\n\t\t\t\t{\n\t\t\t\t\tchar_t* str = g.flush(s);\n\t\t\t\t\t\n\t\t\t\t\tdo *str-- = 0;\n\t\t\t\t\twhile (PUGI__IS_CHARTYPE(*str, ct_space));\n\t\t\t\t\n\t\t\t\t\treturn s + 1;\n\t\t\t\t}\n\t\t\t\telse if (PUGI__IS_CHARTYPE(*s, ct_space))\n\t\t\t\t{\n\t\t\t\t\t*s++ = ' ';\n\t\t\n\t\t\t\t\tif (PUGI__IS_CHARTYPE(*s, ct_space))\n\t\t\t\t\t{\n\t\t\t\t\t\tchar_t* str = s + 1;\n\t\t\t\t\t\twhile (PUGI__IS_CHARTYPE(*str, ct_space)) ++str;\n\t\t\t\t\t\t\n\t\t\t\t\t\tg.push(s, str - s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (opt_escape::value && *s == '&')\n\t\t\t\t{\n\t\t\t\t\ts = strconv_escape(s, g);\n\t\t\t\t}\n\t\t\t\telse if (!*s)\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\telse ++s;\n\t\t\t}\n\t\t}\n\n\t\tstatic char_t* parse_wconv(char_t* s, char_t end_quote)\n\t\t{\n\t\t\tgap g;\n\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\tPUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr_ws));\n\t\t\t\t\n\t\t\t\tif (*s == end_quote)\n\t\t\t\t{\n\t\t\t\t\t*g.flush(s) = 0;\n\t\t\t\t\n\t\t\t\t\treturn s + 1;\n\t\t\t\t}\n\t\t\t\telse if (PUGI__IS_CHARTYPE(*s, ct_space))\n\t\t\t\t{\n\t\t\t\t\tif (*s == '\\r')\n\t\t\t\t\t{\n\t\t\t\t\t\t*s++ = ' ';\n\t\t\t\t\n\t\t\t\t\t\tif (*s == '\\n') g.push(s, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse *s++ = ' ';\n\t\t\t\t}\n\t\t\t\telse if (opt_escape::value && *s == '&')\n\t\t\t\t{\n\t\t\t\t\ts = strconv_escape(s, g);\n\t\t\t\t}\n\t\t\t\telse if (!*s)\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\telse ++s;\n\t\t\t}\n\t\t}\n\n\t\tstatic char_t* parse_eol(char_t* s, char_t end_quote)\n\t\t{\n\t\t\tgap g;\n\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\tPUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr));\n\t\t\t\t\n\t\t\t\tif (*s == end_quote)\n\t\t\t\t{\n\t\t\t\t\t*g.flush(s) = 0;\n\t\t\t\t\n\t\t\t\t\treturn s + 1;\n\t\t\t\t}\n\t\t\t\telse if (*s == '\\r')\n\t\t\t\t{\n\t\t\t\t\t*s++ = '\\n';\n\t\t\t\t\t\n\t\t\t\t\tif (*s == '\\n') g.push(s, 1);\n\t\t\t\t}\n\t\t\t\telse if (opt_escape::value && *s == '&')\n\t\t\t\t{\n\t\t\t\t\ts = strconv_escape(s, g);\n\t\t\t\t}\n\t\t\t\telse if (!*s)\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\telse ++s;\n\t\t\t}\n\t\t}\n\n\t\tstatic char_t* parse_simple(char_t* s, char_t end_quote)\n\t\t{\n\t\t\tgap g;\n\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\tPUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr));\n\t\t\t\t\n\t\t\t\tif (*s == end_quote)\n\t\t\t\t{\n\t\t\t\t\t*g.flush(s) = 0;\n\t\t\t\t\n\t\t\t\t\treturn s + 1;\n\t\t\t\t}\n\t\t\t\telse if (opt_escape::value && *s == '&')\n\t\t\t\t{\n\t\t\t\t\ts = strconv_escape(s, g);\n\t\t\t\t}\n\t\t\t\telse if (!*s)\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\telse ++s;\n\t\t\t}\n\t\t}\n\t};\n\n\tPUGI__FN strconv_attribute_t get_strconv_attribute(unsigned int optmask)\n\t{\n\t\tPUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_wconv_attribute == 0x40 && parse_wnorm_attribute == 0x80);\n\t\t\n\t\tswitch ((optmask >> 4) & 15) // get bitmask for flags (wconv wnorm eol escapes)\n\t\t{\n\t\tcase 0:  return strconv_attribute_impl<opt_false>::parse_simple;\n\t\tcase 1:  return strconv_attribute_impl<opt_true>::parse_simple;\n\t\tcase 2:  return strconv_attribute_impl<opt_false>::parse_eol;\n\t\tcase 3:  return strconv_attribute_impl<opt_true>::parse_eol;\n\t\tcase 4:  return strconv_attribute_impl<opt_false>::parse_wconv;\n\t\tcase 5:  return strconv_attribute_impl<opt_true>::parse_wconv;\n\t\tcase 6:  return strconv_attribute_impl<opt_false>::parse_wconv;\n\t\tcase 7:  return strconv_attribute_impl<opt_true>::parse_wconv;\n\t\tcase 8:  return strconv_attribute_impl<opt_false>::parse_wnorm;\n\t\tcase 9:  return strconv_attribute_impl<opt_true>::parse_wnorm;\n\t\tcase 10: return strconv_attribute_impl<opt_false>::parse_wnorm;\n\t\tcase 11: return strconv_attribute_impl<opt_true>::parse_wnorm;\n\t\tcase 12: return strconv_attribute_impl<opt_false>::parse_wnorm;\n\t\tcase 13: return strconv_attribute_impl<opt_true>::parse_wnorm;\n\t\tcase 14: return strconv_attribute_impl<opt_false>::parse_wnorm;\n\t\tcase 15: return strconv_attribute_impl<opt_true>::parse_wnorm;\n\t\tdefault: assert(false); return 0; // should not get here\n\t\t}\n\t}\n\n\tinline xml_parse_result make_parse_result(xml_parse_status status, ptrdiff_t offset = 0)\n\t{\n\t\txml_parse_result result;\n\t\tresult.status = status;\n\t\tresult.offset = offset;\n\n\t\treturn result;\n\t}\n\n\tstruct xml_parser\n\t{\n\t\txml_allocator alloc;\n\t\tchar_t* error_offset;\n\t\txml_parse_status error_status;\n\t\t\n\t\txml_parser(const xml_allocator& alloc_): alloc(alloc_), error_offset(0), error_status(status_ok)\n\t\t{\n\t\t}\n\n\t\t// DOCTYPE consists of nested sections of the following possible types:\n\t\t// <!-- ... -->, <? ... ?>, \"...\", '...'\n\t\t// <![...]]>\n\t\t// <!...>\n\t\t// First group can not contain nested groups\n\t\t// Second group can contain nested groups of the same type\n\t\t// Third group can contain all other groups\n\t\tchar_t* parse_doctype_primitive(char_t* s)\n\t\t{\n\t\t\tif (*s == '\"' || *s == '\\'')\n\t\t\t{\n\t\t\t\t// quoted string\n\t\t\t\tchar_t ch = *s++;\n\t\t\t\tPUGI__SCANFOR(*s == ch);\n\t\t\t\tif (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);\n\n\t\t\t\ts++;\n\t\t\t}\n\t\t\telse if (s[0] == '<' && s[1] == '?')\n\t\t\t{\n\t\t\t\t// <? ... ?>\n\t\t\t\ts += 2;\n\t\t\t\tPUGI__SCANFOR(s[0] == '?' && s[1] == '>'); // no need for ENDSWITH because ?> can't terminate proper doctype\n\t\t\t\tif (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);\n\n\t\t\t\ts += 2;\n\t\t\t}\n\t\t\telse if (s[0] == '<' && s[1] == '!' && s[2] == '-' && s[3] == '-')\n\t\t\t{\n\t\t\t\ts += 4;\n\t\t\t\tPUGI__SCANFOR(s[0] == '-' && s[1] == '-' && s[2] == '>'); // no need for ENDSWITH because --> can't terminate proper doctype\n\t\t\t\tif (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);\n\n\t\t\t\ts += 3;\n\t\t\t}\n\t\t\telse PUGI__THROW_ERROR(status_bad_doctype, s);\n\n\t\t\treturn s;\n\t\t}\n\n\t\tchar_t* parse_doctype_ignore(char_t* s)\n\t\t{\n\t\t\tsize_t depth = 0;\n\n\t\t\tassert(s[0] == '<' && s[1] == '!' && s[2] == '[');\n\t\t\ts += 3;\n\n\t\t\twhile (*s)\n\t\t\t{\n\t\t\t\tif (s[0] == '<' && s[1] == '!' && s[2] == '[')\n\t\t\t\t{\n\t\t\t\t\t// nested ignore section\n\t\t\t\t\ts += 3;\n\t\t\t\t\tdepth++;\n\t\t\t\t}\n\t\t\t\telse if (s[0] == ']' && s[1] == ']' && s[2] == '>')\n\t\t\t\t{\n\t\t\t\t\t// ignore section end\n\t\t\t\t\ts += 3;\n\n\t\t\t\t\tif (depth == 0)\n\t\t\t\t\t\treturn s;\n\n\t\t\t\t\tdepth--;\n\t\t\t\t}\n\t\t\t\telse s++;\n\t\t\t}\n\n\t\t\tPUGI__THROW_ERROR(status_bad_doctype, s);\n\t\t}\n\n\t\tchar_t* parse_doctype_group(char_t* s, char_t endch)\n\t\t{\n\t\t\tsize_t depth = 0;\n\n\t\t\tassert((s[0] == '<' || s[0] == 0) && s[1] == '!');\n\t\t\ts += 2;\n\n\t\t\twhile (*s)\n\t\t\t{\n\t\t\t\tif (s[0] == '<' && s[1] == '!' && s[2] != '-')\n\t\t\t\t{\n\t\t\t\t\tif (s[2] == '[')\n\t\t\t\t\t{\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t\ts = parse_doctype_ignore(s);\n\t\t\t\t\t\tif (!s) return s;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// some control group\n\t\t\t\t\t\ts += 2;\n\t\t\t\t\t\tdepth++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (s[0] == '<' || s[0] == '\"' || s[0] == '\\'')\n\t\t\t\t{\n\t\t\t\t\t// unknown tag (forbidden), or some primitive group\n\t\t\t\t\ts = parse_doctype_primitive(s);\n\t\t\t\t\tif (!s) return s;\n\t\t\t\t}\n\t\t\t\telse if (*s == '>')\n\t\t\t\t{\n\t\t\t\t\tif (depth == 0)\n\t\t\t\t\t\treturn s;\n\n\t\t\t\t\tdepth--;\n\t\t\t\t\ts++;\n\t\t\t\t}\n\t\t\t\telse s++;\n\t\t\t}\n\n\t\t\tif (depth != 0 || endch != '>') PUGI__THROW_ERROR(status_bad_doctype, s);\n\n\t\t\treturn s;\n\t\t}\n\n\t\tchar_t* parse_exclamation(char_t* s, xml_node_struct* cursor, unsigned int optmsk, char_t endch)\n\t\t{\n\t\t\t// parse node contents, starting with exclamation mark\n\t\t\t++s;\n\n\t\t\tif (*s == '-') // '<!-...'\n\t\t\t{\n\t\t\t\t++s;\n\n\t\t\t\tif (*s == '-') // '<!--...'\n\t\t\t\t{\n\t\t\t\t\t++s;\n\n\t\t\t\t\tif (PUGI__OPTSET(parse_comments))\n\t\t\t\t\t{\n\t\t\t\t\t\tPUGI__PUSHNODE(node_comment); // Append a new node on the tree.\n\t\t\t\t\t\tcursor->value = s; // Save the offset.\n\t\t\t\t\t}\n\n\t\t\t\t\tif (PUGI__OPTSET(parse_eol) && PUGI__OPTSET(parse_comments))\n\t\t\t\t\t{\n\t\t\t\t\t\ts = strconv_comment(s, endch);\n\n\t\t\t\t\t\tif (!s) PUGI__THROW_ERROR(status_bad_comment, cursor->value);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Scan for terminating '-->'.\n\t\t\t\t\t\tPUGI__SCANFOR(s[0] == '-' && s[1] == '-' && PUGI__ENDSWITH(s[2], '>'));\n\t\t\t\t\t\tPUGI__CHECK_ERROR(status_bad_comment, s);\n\n\t\t\t\t\t\tif (PUGI__OPTSET(parse_comments))\n\t\t\t\t\t\t\t*s = 0; // Zero-terminate this segment at the first terminating '-'.\n\n\t\t\t\t\t\ts += (s[2] == '>' ? 3 : 2); // Step over the '\\0->'.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse PUGI__THROW_ERROR(status_bad_comment, s);\n\t\t\t}\n\t\t\telse if (*s == '[')\n\t\t\t{\n\t\t\t\t// '<![CDATA[...'\n\t\t\t\tif (*++s=='C' && *++s=='D' && *++s=='A' && *++s=='T' && *++s=='A' && *++s == '[')\n\t\t\t\t{\n\t\t\t\t\t++s;\n\n\t\t\t\t\tif (PUGI__OPTSET(parse_cdata))\n\t\t\t\t\t{\n\t\t\t\t\t\tPUGI__PUSHNODE(node_cdata); // Append a new node on the tree.\n\t\t\t\t\t\tcursor->value = s; // Save the offset.\n\n\t\t\t\t\t\tif (PUGI__OPTSET(parse_eol))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ts = strconv_cdata(s, endch);\n\n\t\t\t\t\t\t\tif (!s) PUGI__THROW_ERROR(status_bad_cdata, cursor->value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Scan for terminating ']]>'.\n\t\t\t\t\t\t\tPUGI__SCANFOR(s[0] == ']' && s[1] == ']' && PUGI__ENDSWITH(s[2], '>'));\n\t\t\t\t\t\t\tPUGI__CHECK_ERROR(status_bad_cdata, s);\n\n\t\t\t\t\t\t\t*s++ = 0; // Zero-terminate this segment.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse // Flagged for discard, but we still have to scan for the terminator.\n\t\t\t\t\t{\n\t\t\t\t\t\t// Scan for terminating ']]>'.\n\t\t\t\t\t\tPUGI__SCANFOR(s[0] == ']' && s[1] == ']' && PUGI__ENDSWITH(s[2], '>'));\n\t\t\t\t\t\tPUGI__CHECK_ERROR(status_bad_cdata, s);\n\n\t\t\t\t\t\t++s;\n\t\t\t\t\t}\n\n\t\t\t\t\ts += (s[1] == '>' ? 2 : 1); // Step over the last ']>'.\n\t\t\t\t}\n\t\t\t\telse PUGI__THROW_ERROR(status_bad_cdata, s);\n\t\t\t}\n\t\t\telse if (s[0] == 'D' && s[1] == 'O' && s[2] == 'C' && s[3] == 'T' && s[4] == 'Y' && s[5] == 'P' && PUGI__ENDSWITH(s[6], 'E'))\n\t\t\t{\n\t\t\t\ts -= 2;\n\n\t\t\t\tif (cursor->parent) PUGI__THROW_ERROR(status_bad_doctype, s);\n\n\t\t\t\tchar_t* mark = s + 9;\n\n\t\t\t\ts = parse_doctype_group(s, endch);\n\t\t\t\tif (!s) return s;\n\n\t\t\t\tassert((*s == 0 && endch == '>') || *s == '>');\n\t\t\t\tif (*s) *s++ = 0;\n\n\t\t\t\tif (PUGI__OPTSET(parse_doctype))\n\t\t\t\t{\n\t\t\t\t\twhile (PUGI__IS_CHARTYPE(*mark, ct_space)) ++mark;\n\n\t\t\t\t\tPUGI__PUSHNODE(node_doctype);\n\n\t\t\t\t\tcursor->value = mark;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (*s == 0 && endch == '-') PUGI__THROW_ERROR(status_bad_comment, s);\n\t\t\telse if (*s == 0 && endch == '[') PUGI__THROW_ERROR(status_bad_cdata, s);\n\t\t\telse PUGI__THROW_ERROR(status_unrecognized_tag, s);\n\n\t\t\treturn s;\n\t\t}\n\n\t\tchar_t* parse_question(char_t* s, xml_node_struct*& ref_cursor, unsigned int optmsk, char_t endch)\n\t\t{\n\t\t\t// load into registers\n\t\t\txml_node_struct* cursor = ref_cursor;\n\t\t\tchar_t ch = 0;\n\n\t\t\t// parse node contents, starting with question mark\n\t\t\t++s;\n\n\t\t\t// read PI target\n\t\t\tchar_t* target = s;\n\n\t\t\tif (!PUGI__IS_CHARTYPE(*s, ct_start_symbol)) PUGI__THROW_ERROR(status_bad_pi, s);\n\n\t\t\tPUGI__SCANWHILE(PUGI__IS_CHARTYPE(*s, ct_symbol));\n\t\t\tPUGI__CHECK_ERROR(status_bad_pi, s);\n\n\t\t\t// determine node type; stricmp / strcasecmp is not portable\n\t\t\tbool declaration = (target[0] | ' ') == 'x' && (target[1] | ' ') == 'm' && (target[2] | ' ') == 'l' && target + 3 == s;\n\n\t\t\tif (declaration ? PUGI__OPTSET(parse_declaration) : PUGI__OPTSET(parse_pi))\n\t\t\t{\n\t\t\t\tif (declaration)\n\t\t\t\t{\n\t\t\t\t\t// disallow non top-level declarations\n\t\t\t\t\tif (cursor->parent) PUGI__THROW_ERROR(status_bad_pi, s);\n\n\t\t\t\t\tPUGI__PUSHNODE(node_declaration);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tPUGI__PUSHNODE(node_pi);\n\t\t\t\t}\n\n\t\t\t\tcursor->name = target;\n\n\t\t\t\tPUGI__ENDSEG();\n\n\t\t\t\t// parse value/attributes\n\t\t\t\tif (ch == '?')\n\t\t\t\t{\n\t\t\t\t\t// empty node\n\t\t\t\t\tif (!PUGI__ENDSWITH(*s, '>')) PUGI__THROW_ERROR(status_bad_pi, s);\n\t\t\t\t\ts += (*s == '>');\n\n\t\t\t\t\tPUGI__POPNODE();\n\t\t\t\t}\n\t\t\t\telse if (PUGI__IS_CHARTYPE(ch, ct_space))\n\t\t\t\t{\n\t\t\t\t\tPUGI__SKIPWS();\n\n\t\t\t\t\t// scan for tag end\n\t\t\t\t\tchar_t* value = s;\n\n\t\t\t\t\tPUGI__SCANFOR(s[0] == '?' && PUGI__ENDSWITH(s[1], '>'));\n\t\t\t\t\tPUGI__CHECK_ERROR(status_bad_pi, s);\n\n\t\t\t\t\tif (declaration)\n\t\t\t\t\t{\n\t\t\t\t\t\t// replace ending ? with / so that 'element' terminates properly\n\t\t\t\t\t\t*s = '/';\n\n\t\t\t\t\t\t// we exit from this function with cursor at node_declaration, which is a signal to parse() to go to LOC_ATTRIBUTES\n\t\t\t\t\t\ts = value;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// store value and step over >\n\t\t\t\t\t\tcursor->value = value;\n\t\t\t\t\t\tPUGI__POPNODE();\n\n\t\t\t\t\t\tPUGI__ENDSEG();\n\n\t\t\t\t\t\ts += (*s == '>');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse PUGI__THROW_ERROR(status_bad_pi, s);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// scan for tag end\n\t\t\t\tPUGI__SCANFOR(s[0] == '?' && PUGI__ENDSWITH(s[1], '>'));\n\t\t\t\tPUGI__CHECK_ERROR(status_bad_pi, s);\n\n\t\t\t\ts += (s[1] == '>' ? 2 : 1);\n\t\t\t}\n\n\t\t\t// store from registers\n\t\t\tref_cursor = cursor;\n\n\t\t\treturn s;\n\t\t}\n\n\t\tchar_t* parse_tree(char_t* s, xml_node_struct* root, unsigned int optmsk, char_t endch)\n\t\t{\n\t\t\tstrconv_attribute_t strconv_attribute = get_strconv_attribute(optmsk);\n\t\t\tstrconv_pcdata_t strconv_pcdata = get_strconv_pcdata(optmsk);\n\t\t\t\n\t\t\tchar_t ch = 0;\n\t\t\txml_node_struct* cursor = root;\n\t\t\tchar_t* mark = s;\n\n\t\t\twhile (*s != 0)\n\t\t\t{\n\t\t\t\tif (*s == '<')\n\t\t\t\t{\n\t\t\t\t\t++s;\n\n\t\t\t\tLOC_TAG:\n\t\t\t\t\tif (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) // '<#...'\n\t\t\t\t\t{\n\t\t\t\t\t\tPUGI__PUSHNODE(node_element); // Append a new node to the tree.\n\n\t\t\t\t\t\tcursor->name = s;\n\n\t\t\t\t\t\tPUGI__SCANWHILE_UNROLL(PUGI__IS_CHARTYPE(ss, ct_symbol)); // Scan for a terminator.\n\t\t\t\t\t\tPUGI__ENDSEG(); // Save char in 'ch', terminate & step over.\n\n\t\t\t\t\t\tif (ch == '>')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// end of tag\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (PUGI__IS_CHARTYPE(ch, ct_space))\n\t\t\t\t\t\t{\n\t\t\t\t\t\tLOC_ATTRIBUTES:\n\t\t\t\t\t\t\twhile (true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tPUGI__SKIPWS(); // Eat any whitespace.\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) // <... #...\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\txml_attribute_struct* a = append_new_attribute(cursor, alloc); // Make space for this attribute.\n\t\t\t\t\t\t\t\t\tif (!a) PUGI__THROW_ERROR(status_out_of_memory, s);\n\n\t\t\t\t\t\t\t\t\ta->name = s; // Save the offset.\n\n\t\t\t\t\t\t\t\t\tPUGI__SCANWHILE_UNROLL(PUGI__IS_CHARTYPE(ss, ct_symbol)); // Scan for a terminator.\n\t\t\t\t\t\t\t\t\tPUGI__ENDSEG(); // Save char in 'ch', terminate & step over.\n\n\t\t\t\t\t\t\t\t\tif (PUGI__IS_CHARTYPE(ch, ct_space))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tPUGI__SKIPWS(); // Eat any whitespace.\n\n\t\t\t\t\t\t\t\t\t\tch = *s;\n\t\t\t\t\t\t\t\t\t\t++s;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (ch == '=') // '<... #=...'\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tPUGI__SKIPWS(); // Eat any whitespace.\n\n\t\t\t\t\t\t\t\t\t\tif (*s == '\"' || *s == '\\'') // '<... #=\"...'\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tch = *s; // Save quote char to avoid breaking on \"''\" -or- '\"\"'.\n\t\t\t\t\t\t\t\t\t\t\t++s; // Step over the quote.\n\t\t\t\t\t\t\t\t\t\t\ta->value = s; // Save the offset.\n\n\t\t\t\t\t\t\t\t\t\t\ts = strconv_attribute(s, ch);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif (!s) PUGI__THROW_ERROR(status_bad_attribute, a->value);\n\n\t\t\t\t\t\t\t\t\t\t\t// After this line the loop continues from the start;\n\t\t\t\t\t\t\t\t\t\t\t// Whitespaces, / and > are ok, symbols and EOF are wrong,\n\t\t\t\t\t\t\t\t\t\t\t// everything else will be detected\n\t\t\t\t\t\t\t\t\t\t\tif (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) PUGI__THROW_ERROR(status_bad_attribute, s);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse PUGI__THROW_ERROR(status_bad_attribute, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse PUGI__THROW_ERROR(status_bad_attribute, s);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (*s == '/')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t++s;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (*s == '>')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tPUGI__POPNODE();\n\t\t\t\t\t\t\t\t\t\ts++;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (*s == 0 && endch == '>')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tPUGI__POPNODE();\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse PUGI__THROW_ERROR(status_bad_start_element, s);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (*s == '>')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t++s;\n\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (*s == 0 && endch == '>')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse PUGI__THROW_ERROR(status_bad_start_element, s);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// !!!\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (ch == '/') // '<#.../'\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!PUGI__ENDSWITH(*s, '>')) PUGI__THROW_ERROR(status_bad_start_element, s);\n\n\t\t\t\t\t\t\tPUGI__POPNODE(); // Pop.\n\n\t\t\t\t\t\t\ts += (*s == '>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (ch == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// we stepped over null terminator, backtrack & handle closing tag\n\t\t\t\t\t\t\t--s;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (endch != '>') PUGI__THROW_ERROR(status_bad_start_element, s);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse PUGI__THROW_ERROR(status_bad_start_element, s);\n\t\t\t\t\t}\n\t\t\t\t\telse if (*s == '/')\n\t\t\t\t\t{\n\t\t\t\t\t\t++s;\n\n\t\t\t\t\t\tchar_t* name = cursor->name;\n\t\t\t\t\t\tif (!name) PUGI__THROW_ERROR(status_end_element_mismatch, s);\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile (PUGI__IS_CHARTYPE(*s, ct_symbol))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (*s++ != *name++) PUGI__THROW_ERROR(status_end_element_mismatch, s);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (*name)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (*s == 0 && name[0] == endch && name[1] == 0) PUGI__THROW_ERROR(status_bad_end_element, s);\n\t\t\t\t\t\t\telse PUGI__THROW_ERROR(status_end_element_mismatch, s);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tPUGI__POPNODE(); // Pop.\n\n\t\t\t\t\t\tPUGI__SKIPWS();\n\n\t\t\t\t\t\tif (*s == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (endch != '>') PUGI__THROW_ERROR(status_bad_end_element, s);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (*s != '>') PUGI__THROW_ERROR(status_bad_end_element, s);\n\t\t\t\t\t\t\t++s;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (*s == '?') // '<?...'\n\t\t\t\t\t{\n\t\t\t\t\t\ts = parse_question(s, cursor, optmsk, endch);\n\t\t\t\t\t\tif (!s) return s;\n\n\t\t\t\t\t\tassert(cursor);\n\t\t\t\t\t\tif (PUGI__NODETYPE(cursor) == node_declaration) goto LOC_ATTRIBUTES;\n\t\t\t\t\t}\n\t\t\t\t\telse if (*s == '!') // '<!...'\n\t\t\t\t\t{\n\t\t\t\t\t\ts = parse_exclamation(s, cursor, optmsk, endch);\n\t\t\t\t\t\tif (!s) return s;\n\t\t\t\t\t}\n\t\t\t\t\telse if (*s == 0 && endch == '?') PUGI__THROW_ERROR(status_bad_pi, s);\n\t\t\t\t\telse PUGI__THROW_ERROR(status_unrecognized_tag, s);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmark = s; // Save this offset while searching for a terminator.\n\n\t\t\t\t\tPUGI__SKIPWS(); // Eat whitespace if no genuine PCDATA here.\n\n\t\t\t\t\tif (*s == '<' || !*s)\n\t\t\t\t\t{\n\t\t\t\t\t\t// We skipped some whitespace characters because otherwise we would take the tag branch instead of PCDATA one\n\t\t\t\t\t\tassert(mark != s);\n\n\t\t\t\t\t\tif (!PUGI__OPTSET(parse_ws_pcdata | parse_ws_pcdata_single) || PUGI__OPTSET(parse_trim_pcdata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (PUGI__OPTSET(parse_ws_pcdata_single))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (s[0] != '<' || s[1] != '/' || cursor->first_child) continue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!PUGI__OPTSET(parse_trim_pcdata))\n\t\t\t\t\t\ts = mark;\n\t\t\t\t\t\t\t\n\t\t\t\t\tif (cursor->parent || PUGI__OPTSET(parse_fragment))\n\t\t\t\t\t{\n\t\t\t\t\t\tPUGI__PUSHNODE(node_pcdata); // Append a new node on the tree.\n\t\t\t\t\t\tcursor->value = s; // Save the offset.\n\n\t\t\t\t\t\ts = strconv_pcdata(s);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tPUGI__POPNODE(); // Pop since this is a standalone.\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!*s) break;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tPUGI__SCANFOR(*s == '<'); // '...<'\n\t\t\t\t\t\tif (!*s) break;\n\t\t\t\t\t\t\n\t\t\t\t\t\t++s;\n\t\t\t\t\t}\n\n\t\t\t\t\t// We're after '<'\n\t\t\t\t\tgoto LOC_TAG;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check that last tag is closed\n\t\t\tif (cursor != root) PUGI__THROW_ERROR(status_end_element_mismatch, s);\n\n\t\t\treturn s;\n\t\t}\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\tstatic char_t* parse_skip_bom(char_t* s)\n\t\t{\n\t\t\tunsigned int bom = 0xfeff;\n\t\t\treturn (s[0] == static_cast<wchar_t>(bom)) ? s + 1 : s;\n\t\t}\n\t#else\n\t\tstatic char_t* parse_skip_bom(char_t* s)\n\t\t{\n\t\t\treturn (s[0] == '\\xef' && s[1] == '\\xbb' && s[2] == '\\xbf') ? s + 3 : s;\n\t\t}\n\t#endif\n\n\t\tstatic bool has_element_node_siblings(xml_node_struct* node)\n\t\t{\n\t\t\twhile (node)\n\t\t\t{\n\t\t\t\tif (PUGI__NODETYPE(node) == node_element) return true;\n\n\t\t\t\tnode = node->next_sibling;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tstatic xml_parse_result parse(char_t* buffer, size_t length, xml_document_struct* xmldoc, xml_node_struct* root, unsigned int optmsk)\n\t\t{\n\t\t\t// allocator object is a part of document object\n\t\t\txml_allocator& alloc_ = *static_cast<xml_allocator*>(xmldoc);\n\n\t\t\t// early-out for empty documents\n\t\t\tif (length == 0)\n\t\t\t\treturn make_parse_result(PUGI__OPTSET(parse_fragment) ? status_ok : status_no_document_element);\n\n\t\t\t// get last child of the root before parsing\n\t\t\txml_node_struct* last_root_child = root->first_child ? root->first_child->prev_sibling_c : 0;\n\t\n\t\t\t// create parser on stack\n\t\t\txml_parser parser(alloc_);\n\n\t\t\t// save last character and make buffer zero-terminated (speeds up parsing)\n\t\t\tchar_t endch = buffer[length - 1];\n\t\t\tbuffer[length - 1] = 0;\n\t\t\t\n\t\t\t// skip BOM to make sure it does not end up as part of parse output\n\t\t\tchar_t* buffer_data = parse_skip_bom(buffer);\n\n\t\t\t// perform actual parsing\n\t\t\tparser.parse_tree(buffer_data, root, optmsk, endch);\n\n\t\t\t// update allocator state\n\t\t\talloc_ = parser.alloc;\n\n\t\t\txml_parse_result result = make_parse_result(parser.error_status, parser.error_offset ? parser.error_offset - buffer : 0);\n\t\t\tassert(result.offset >= 0 && static_cast<size_t>(result.offset) <= length);\n\n\t\t\tif (result)\n\t\t\t{\n\t\t\t\t// since we removed last character, we have to handle the only possible false positive (stray <)\n\t\t\t\tif (endch == '<')\n\t\t\t\t\treturn make_parse_result(status_unrecognized_tag, length - 1);\n\n\t\t\t\t// check if there are any element nodes parsed\n\t\t\t\txml_node_struct* first_root_child_parsed = last_root_child ? last_root_child->next_sibling : root->first_child;\n\n\t\t\t\tif (!PUGI__OPTSET(parse_fragment) && !has_element_node_siblings(first_root_child_parsed))\n\t\t\t\t\treturn make_parse_result(status_no_document_element, length - 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// roll back offset if it occurs on a null terminator in the source buffer\n\t\t\t\tif (result.offset > 0 && static_cast<size_t>(result.offset) == length - 1 && endch == 0)\n\t\t\t\t\tresult.offset--;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t};\n\n\t// Output facilities\n\tPUGI__FN xml_encoding get_write_native_encoding()\n\t{\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn get_wchar_encoding();\n\t#else\n\t\treturn encoding_utf8;\n\t#endif\n\t}\n\n\tPUGI__FN xml_encoding get_write_encoding(xml_encoding encoding)\n\t{\n\t\t// replace wchar encoding with utf implementation\n\t\tif (encoding == encoding_wchar) return get_wchar_encoding();\n\n\t\t// replace utf16 encoding with utf16 with specific endianness\n\t\tif (encoding == encoding_utf16) return is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n\t\t// replace utf32 encoding with utf32 with specific endianness\n\t\tif (encoding == encoding_utf32) return is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n\t\t// only do autodetection if no explicit encoding is requested\n\t\tif (encoding != encoding_auto) return encoding;\n\n\t\t// assume utf8 encoding\n\t\treturn encoding_utf8;\n\t}\n\n#ifdef PUGIXML_WCHAR_MODE\n\tPUGI__FN size_t get_valid_length(const char_t* data, size_t length)\n\t{\n\t\tif (length < 1) return 0;\n\n\t\t// discard last character if it's the lead of a surrogate pair \n\t\treturn (sizeof(wchar_t) == 2 && static_cast<unsigned int>(static_cast<uint16_t>(data[length - 1]) - 0xD800) < 0x400) ? length - 1 : length;\n\t}\n\n\tPUGI__FN size_t convert_buffer_output(char_t* r_char, uint8_t* r_u8, uint16_t* r_u16, uint32_t* r_u32, const char_t* data, size_t length, xml_encoding encoding)\n\t{\n\t\t// only endian-swapping is required\n\t\tif (need_endian_swap_utf(encoding, get_wchar_encoding()))\n\t\t{\n\t\t\tconvert_wchar_endian_swap(r_char, data, length);\n\n\t\t\treturn length * sizeof(char_t);\n\t\t}\n\t\n\t\t// convert to utf8\n\t\tif (encoding == encoding_utf8)\n\t\t{\n\t\t\tuint8_t* dest = r_u8;\n\t\t\tuint8_t* end = utf_decoder<utf8_writer>::decode_wchar_block(data, length, dest);\n\n\t\t\treturn static_cast<size_t>(end - dest);\n\t\t}\n\n\t\t// convert to utf16\n\t\tif (encoding == encoding_utf16_be || encoding == encoding_utf16_le)\n\t\t{\n\t\t\tuint16_t* dest = r_u16;\n\n\t\t\t// convert to native utf16\n\t\t\tuint16_t* end = utf_decoder<utf16_writer>::decode_wchar_block(data, length, dest);\n\n\t\t\t// swap if necessary\n\t\t\txml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n\t\t\tif (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));\n\n\t\t\treturn static_cast<size_t>(end - dest) * sizeof(uint16_t);\n\t\t}\n\n\t\t// convert to utf32\n\t\tif (encoding == encoding_utf32_be || encoding == encoding_utf32_le)\n\t\t{\n\t\t\tuint32_t* dest = r_u32;\n\n\t\t\t// convert to native utf32\n\t\t\tuint32_t* end = utf_decoder<utf32_writer>::decode_wchar_block(data, length, dest);\n\n\t\t\t// swap if necessary\n\t\t\txml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n\t\t\tif (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));\n\n\t\t\treturn static_cast<size_t>(end - dest) * sizeof(uint32_t);\n\t\t}\n\n\t\t// convert to latin1\n\t\tif (encoding == encoding_latin1)\n\t\t{\n\t\t\tuint8_t* dest = r_u8;\n\t\t\tuint8_t* end = utf_decoder<latin1_writer>::decode_wchar_block(data, length, dest);\n\n\t\t\treturn static_cast<size_t>(end - dest);\n\t\t}\n\n\t\tassert(!\"Invalid encoding\");\n\t\treturn 0;\n\t}\n#else\n\tPUGI__FN size_t get_valid_length(const char_t* data, size_t length)\n\t{\n\t\tif (length < 5) return 0;\n\n\t\tfor (size_t i = 1; i <= 4; ++i)\n\t\t{\n\t\t\tuint8_t ch = static_cast<uint8_t>(data[length - i]);\n\n\t\t\t// either a standalone character or a leading one\n\t\t\tif ((ch & 0xc0) != 0x80) return length - i;\n\t\t}\n\n\t\t// there are four non-leading characters at the end, sequence tail is broken so might as well process the whole chunk\n\t\treturn length;\n\t}\n\n\tPUGI__FN size_t convert_buffer_output(char_t* /* r_char */, uint8_t* r_u8, uint16_t* r_u16, uint32_t* r_u32, const char_t* data, size_t length, xml_encoding encoding)\n\t{\n\t\tif (encoding == encoding_utf16_be || encoding == encoding_utf16_le)\n\t\t{\n\t\t\tuint16_t* dest = r_u16;\n\n\t\t\t// convert to native utf16\n\t\t\tuint16_t* end = utf_decoder<utf16_writer>::decode_utf8_block(reinterpret_cast<const uint8_t*>(data), length, dest);\n\n\t\t\t// swap if necessary\n\t\t\txml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;\n\n\t\t\tif (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));\n\n\t\t\treturn static_cast<size_t>(end - dest) * sizeof(uint16_t);\n\t\t}\n\n\t\tif (encoding == encoding_utf32_be || encoding == encoding_utf32_le)\n\t\t{\n\t\t\tuint32_t* dest = r_u32;\n\n\t\t\t// convert to native utf32\n\t\t\tuint32_t* end = utf_decoder<utf32_writer>::decode_utf8_block(reinterpret_cast<const uint8_t*>(data), length, dest);\n\n\t\t\t// swap if necessary\n\t\t\txml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;\n\n\t\t\tif (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));\n\n\t\t\treturn static_cast<size_t>(end - dest) * sizeof(uint32_t);\n\t\t}\n\n\t\tif (encoding == encoding_latin1)\n\t\t{\n\t\t\tuint8_t* dest = r_u8;\n\t\t\tuint8_t* end = utf_decoder<latin1_writer>::decode_utf8_block(reinterpret_cast<const uint8_t*>(data), length, dest);\n\n\t\t\treturn static_cast<size_t>(end - dest);\n\t\t}\n\n\t\tassert(!\"Invalid encoding\");\n\t\treturn 0;\n\t}\n#endif\n\n\tclass xml_buffered_writer\n\t{\n\t\txml_buffered_writer(const xml_buffered_writer&);\n\t\txml_buffered_writer& operator=(const xml_buffered_writer&);\n\n\tpublic:\n\t\txml_buffered_writer(xml_writer& writer_, xml_encoding user_encoding): writer(writer_), bufsize(0), encoding(get_write_encoding(user_encoding))\n\t\t{\n\t\t\tPUGI__STATIC_ASSERT(bufcapacity >= 8);\n\t\t}\n\n\t\t~xml_buffered_writer()\n\t\t{\n\t\t\tflush();\n\t\t}\n\n\t\tsize_t flush()\n\t\t{\n\t\t\tflush(buffer, bufsize);\n\t\t\tbufsize = 0;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvoid flush(const char_t* data, size_t size)\n\t\t{\n\t\t\tif (size == 0) return;\n\n\t\t\t// fast path, just write data\n\t\t\tif (encoding == get_write_native_encoding())\n\t\t\t\twriter.write(data, size * sizeof(char_t));\n\t\t\telse\n\t\t\t{\n\t\t\t\t// convert chunk\n\t\t\t\tsize_t result = convert_buffer_output(scratch.data_char, scratch.data_u8, scratch.data_u16, scratch.data_u32, data, size, encoding);\n\t\t\t\tassert(result <= sizeof(scratch));\n\n\t\t\t\t// write data\n\t\t\t\twriter.write(scratch.data_u8, result);\n\t\t\t}\n\t\t}\n\n\t\tvoid write_direct(const char_t* data, size_t length)\n\t\t{\n\t\t\t// flush the remaining buffer contents\n\t\t\tflush();\n\n\t\t\t// handle large chunks\n\t\t\tif (length > bufcapacity)\n\t\t\t{\n\t\t\t\tif (encoding == get_write_native_encoding())\n\t\t\t\t{\n\t\t\t\t\t// fast path, can just write data chunk\n\t\t\t\t\twriter.write(data, length * sizeof(char_t));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// need to convert in suitable chunks\n\t\t\t\twhile (length > bufcapacity)\n\t\t\t\t{\n\t\t\t\t\t// get chunk size by selecting such number of characters that are guaranteed to fit into scratch buffer\n\t\t\t\t\t// and form a complete codepoint sequence (i.e. discard start of last codepoint if necessary)\n\t\t\t\t\tsize_t chunk_size = get_valid_length(data, bufcapacity);\n\t\t\t\t\tassert(chunk_size);\n\n\t\t\t\t\t// convert chunk and write\n\t\t\t\t\tflush(data, chunk_size);\n\n\t\t\t\t\t// iterate\n\t\t\t\t\tdata += chunk_size;\n\t\t\t\t\tlength -= chunk_size;\n\t\t\t\t}\n\n\t\t\t\t// small tail is copied below\n\t\t\t\tbufsize = 0;\n\t\t\t}\n\n\t\t\tmemcpy(buffer + bufsize, data, length * sizeof(char_t));\n\t\t\tbufsize += length;\n\t\t}\n\n\t\tvoid write_buffer(const char_t* data, size_t length)\n\t\t{\n\t\t\tsize_t offset = bufsize;\n\n\t\t\tif (offset + length <= bufcapacity)\n\t\t\t{\n\t\t\t\tmemcpy(buffer + offset, data, length * sizeof(char_t));\n\t\t\t\tbufsize = offset + length;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twrite_direct(data, length);\n\t\t\t}\n\t\t}\n\n\t\tvoid write_string(const char_t* data)\n\t\t{\n\t\t\t// write the part of the string that fits in the buffer\n\t\t\tsize_t offset = bufsize;\n\n\t\t\twhile (*data && offset < bufcapacity)\n\t\t\t\tbuffer[offset++] = *data++;\n\n\t\t\t// write the rest\n\t\t\tif (offset < bufcapacity)\n\t\t\t{\n\t\t\t\tbufsize = offset;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// backtrack a bit if we have split the codepoint\n\t\t\t\tsize_t length = offset - bufsize;\n\t\t\t\tsize_t extra = length - get_valid_length(data - length, length);\n\n\t\t\t\tbufsize = offset - extra;\n\n\t\t\t\twrite_direct(data - extra, strlength(data) + extra);\n\t\t\t}\n\t\t}\n\n\t\tvoid write(char_t d0)\n\t\t{\n\t\t\tsize_t offset = bufsize;\n\t\t\tif (offset > bufcapacity - 1) offset = flush();\n\n\t\t\tbuffer[offset + 0] = d0;\n\t\t\tbufsize = offset + 1;\n\t\t}\n\n\t\tvoid write(char_t d0, char_t d1)\n\t\t{\n\t\t\tsize_t offset = bufsize;\n\t\t\tif (offset > bufcapacity - 2) offset = flush();\n\n\t\t\tbuffer[offset + 0] = d0;\n\t\t\tbuffer[offset + 1] = d1;\n\t\t\tbufsize = offset + 2;\n\t\t}\n\n\t\tvoid write(char_t d0, char_t d1, char_t d2)\n\t\t{\n\t\t\tsize_t offset = bufsize;\n\t\t\tif (offset > bufcapacity - 3) offset = flush();\n\n\t\t\tbuffer[offset + 0] = d0;\n\t\t\tbuffer[offset + 1] = d1;\n\t\t\tbuffer[offset + 2] = d2;\n\t\t\tbufsize = offset + 3;\n\t\t}\n\n\t\tvoid write(char_t d0, char_t d1, char_t d2, char_t d3)\n\t\t{\n\t\t\tsize_t offset = bufsize;\n\t\t\tif (offset > bufcapacity - 4) offset = flush();\n\n\t\t\tbuffer[offset + 0] = d0;\n\t\t\tbuffer[offset + 1] = d1;\n\t\t\tbuffer[offset + 2] = d2;\n\t\t\tbuffer[offset + 3] = d3;\n\t\t\tbufsize = offset + 4;\n\t\t}\n\n\t\tvoid write(char_t d0, char_t d1, char_t d2, char_t d3, char_t d4)\n\t\t{\n\t\t\tsize_t offset = bufsize;\n\t\t\tif (offset > bufcapacity - 5) offset = flush();\n\n\t\t\tbuffer[offset + 0] = d0;\n\t\t\tbuffer[offset + 1] = d1;\n\t\t\tbuffer[offset + 2] = d2;\n\t\t\tbuffer[offset + 3] = d3;\n\t\t\tbuffer[offset + 4] = d4;\n\t\t\tbufsize = offset + 5;\n\t\t}\n\n\t\tvoid write(char_t d0, char_t d1, char_t d2, char_t d3, char_t d4, char_t d5)\n\t\t{\n\t\t\tsize_t offset = bufsize;\n\t\t\tif (offset > bufcapacity - 6) offset = flush();\n\n\t\t\tbuffer[offset + 0] = d0;\n\t\t\tbuffer[offset + 1] = d1;\n\t\t\tbuffer[offset + 2] = d2;\n\t\t\tbuffer[offset + 3] = d3;\n\t\t\tbuffer[offset + 4] = d4;\n\t\t\tbuffer[offset + 5] = d5;\n\t\t\tbufsize = offset + 6;\n\t\t}\n\n\t\t// utf8 maximum expansion: x4 (-> utf32)\n\t\t// utf16 maximum expansion: x2 (-> utf32)\n\t\t// utf32 maximum expansion: x1\n\t\tenum\n\t\t{\n\t\t\tbufcapacitybytes =\n\t\t\t#ifdef PUGIXML_MEMORY_OUTPUT_STACK\n\t\t\t\tPUGIXML_MEMORY_OUTPUT_STACK\n\t\t\t#else\n\t\t\t\t10240\n\t\t\t#endif\n\t\t\t,\n\t\t\tbufcapacity = bufcapacitybytes / (sizeof(char_t) + 4)\n\t\t};\n\n\t\tchar_t buffer[bufcapacity];\n\n\t\tunion\n\t\t{\n\t\t\tuint8_t data_u8[4 * bufcapacity];\n\t\t\tuint16_t data_u16[2 * bufcapacity];\n\t\t\tuint32_t data_u32[bufcapacity];\n\t\t\tchar_t data_char[bufcapacity];\n\t\t} scratch;\n\n\t\txml_writer& writer;\n\t\tsize_t bufsize;\n\t\txml_encoding encoding;\n\t};\n\n\tPUGI__FN void text_output_escaped(xml_buffered_writer& writer, const char_t* s, chartypex_t type)\n\t{\n\t\twhile (*s)\n\t\t{\n\t\t\tconst char_t* prev = s;\n\t\t\t\n\t\t\t// While *s is a usual symbol\n\t\t\tPUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPEX(ss, type));\n\t\t\n\t\t\twriter.write_buffer(prev, static_cast<size_t>(s - prev));\n\n\t\t\tswitch (*s)\n\t\t\t{\n\t\t\t\tcase 0: break;\n\t\t\t\tcase '&':\n\t\t\t\t\twriter.write('&', 'a', 'm', 'p', ';');\n\t\t\t\t\t++s;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '<':\n\t\t\t\t\twriter.write('&', 'l', 't', ';');\n\t\t\t\t\t++s;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '>':\n\t\t\t\t\twriter.write('&', 'g', 't', ';');\n\t\t\t\t\t++s;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\"':\n\t\t\t\t\twriter.write('&', 'q', 'u', 'o', 't', ';');\n\t\t\t\t\t++s;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // s is not a usual symbol\n\t\t\t\t{\n\t\t\t\t\tunsigned int ch = static_cast<unsigned int>(*s++);\n\t\t\t\t\tassert(ch < 32);\n\n\t\t\t\t\twriter.write('&', '#', static_cast<char_t>((ch / 10) + '0'), static_cast<char_t>((ch % 10) + '0'), ';');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tPUGI__FN void text_output(xml_buffered_writer& writer, const char_t* s, chartypex_t type, unsigned int flags)\n\t{\n\t\tif (flags & format_no_escapes)\n\t\t\twriter.write_string(s);\n\t\telse\n\t\t\ttext_output_escaped(writer, s, type);\n\t}\n\n\tPUGI__FN void text_output_cdata(xml_buffered_writer& writer, const char_t* s)\n\t{\n\t\tdo\n\t\t{\n\t\t\twriter.write('<', '!', '[', 'C', 'D');\n\t\t\twriter.write('A', 'T', 'A', '[');\n\n\t\t\tconst char_t* prev = s;\n\n\t\t\t// look for ]]> sequence - we can't output it as is since it terminates CDATA\n\t\t\twhile (*s && !(s[0] == ']' && s[1] == ']' && s[2] == '>')) ++s;\n\n\t\t\t// skip ]] if we stopped at ]]>, > will go to the next CDATA section\n\t\t\tif (*s) s += 2;\n\n\t\t\twriter.write_buffer(prev, static_cast<size_t>(s - prev));\n\n\t\t\twriter.write(']', ']', '>');\n\t\t}\n\t\twhile (*s);\n\t}\n\n\tPUGI__FN void text_output_indent(xml_buffered_writer& writer, const char_t* indent, size_t indent_length, unsigned int depth)\n\t{\n\t\tswitch (indent_length)\n\t\t{\n\t\tcase 1:\n\t\t{\n\t\t\tfor (unsigned int i = 0; i < depth; ++i)\n\t\t\t\twriter.write(indent[0]);\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 2:\n\t\t{\n\t\t\tfor (unsigned int i = 0; i < depth; ++i)\n\t\t\t\twriter.write(indent[0], indent[1]);\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 3:\n\t\t{\n\t\t\tfor (unsigned int i = 0; i < depth; ++i)\n\t\t\t\twriter.write(indent[0], indent[1], indent[2]);\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 4:\n\t\t{\n\t\t\tfor (unsigned int i = 0; i < depth; ++i)\n\t\t\t\twriter.write(indent[0], indent[1], indent[2], indent[3]);\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t{\n\t\t\tfor (unsigned int i = 0; i < depth; ++i)\n\t\t\t\twriter.write_buffer(indent, indent_length);\n\t\t}\n\t\t}\n\t}\n\n\tPUGI__FN void node_output_comment(xml_buffered_writer& writer, const char_t* s)\n\t{\n\t\twriter.write('<', '!', '-', '-');\n\n\t\twhile (*s)\n\t\t{\n\t\t\tconst char_t* prev = s;\n\n\t\t\t// look for -\\0 or -- sequence - we can't output it since -- is illegal in comment body\n\t\t\twhile (*s && !(s[0] == '-' && (s[1] == '-' || s[1] == 0))) ++s;\n\n\t\t\twriter.write_buffer(prev, static_cast<size_t>(s - prev));\n\n\t\t\tif (*s)\n\t\t\t{\n\t\t\t\tassert(*s == '-');\n\n\t\t\t\twriter.write('-', ' ');\n\t\t\t\t++s;\n\t\t\t}\n\t\t}\n\n\t\twriter.write('-', '-', '>');\n\t}\n\n\tPUGI__FN void node_output_pi_value(xml_buffered_writer& writer, const char_t* s)\n\t{\n\t\twhile (*s)\n\t\t{\n\t\t\tconst char_t* prev = s;\n\n\t\t\t// look for ?> sequence - we can't output it since ?> terminates PI\n\t\t\twhile (*s && !(s[0] == '?' && s[1] == '>')) ++s;\n\n\t\t\twriter.write_buffer(prev, static_cast<size_t>(s - prev));\n\n\t\t\tif (*s)\n\t\t\t{\n\t\t\t\tassert(s[0] == '?' && s[1] == '>');\n\n\t\t\t\twriter.write('?', ' ', '>');\n\t\t\t\ts += 2;\n\t\t\t}\n\t\t}\n\t}\n\n\tPUGI__FN void node_output_attributes(xml_buffered_writer& writer, xml_node_struct* node, unsigned int flags)\n\t{\n\t\tconst char_t* default_name = PUGIXML_TEXT(\":anonymous\");\n\n\t\tfor (xml_attribute_struct* a = node->first_attribute; a; a = a->next_attribute)\n\t\t{\n\t\t\twriter.write(' ');\n\t\t\twriter.write_string(a->name ? a->name : default_name);\n\t\t\twriter.write('=', '\"');\n\n\t\t\tif (a->value)\n\t\t\t\ttext_output(writer, a->value, ctx_special_attr, flags);\n\n\t\t\twriter.write('\"');\n\t\t}\n\t}\n\n\tPUGI__FN bool node_output_start(xml_buffered_writer& writer, xml_node_struct* node, unsigned int flags)\n\t{\n\t\tconst char_t* default_name = PUGIXML_TEXT(\":anonymous\");\n\t\tconst char_t* name = node->name ? node->name : default_name;\n\n\t\twriter.write('<');\n\t\twriter.write_string(name);\n\n\t\tif (node->first_attribute)\n\t\t\tnode_output_attributes(writer, node, flags);\n\n\t\tif (!node->first_child)\n\t\t{\n\t\t\twriter.write(' ', '/', '>');\n\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twriter.write('>');\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tPUGI__FN void node_output_end(xml_buffered_writer& writer, xml_node_struct* node)\n\t{\n\t\tconst char_t* default_name = PUGIXML_TEXT(\":anonymous\");\n\t\tconst char_t* name = node->name ? node->name : default_name;\n\n\t\twriter.write('<', '/');\n\t\twriter.write_string(name);\n\t\twriter.write('>');\n\t}\n\n\tPUGI__FN void node_output_simple(xml_buffered_writer& writer, xml_node_struct* node, unsigned int flags)\n\t{\n\t\tconst char_t* default_name = PUGIXML_TEXT(\":anonymous\");\n\n\t\tswitch (PUGI__NODETYPE(node))\n\t\t{\n\t\t\tcase node_pcdata:\n\t\t\t\ttext_output(writer, node->value ? node->value : PUGIXML_TEXT(\"\"), ctx_special_pcdata, flags);\n\t\t\t\tbreak;\n\n\t\t\tcase node_cdata:\n\t\t\t\ttext_output_cdata(writer, node->value ? node->value : PUGIXML_TEXT(\"\"));\n\t\t\t\tbreak;\n\n\t\t\tcase node_comment:\n\t\t\t\tnode_output_comment(writer, node->value ? node->value : PUGIXML_TEXT(\"\"));\n\t\t\t\tbreak;\n\n\t\t\tcase node_pi:\n\t\t\t\twriter.write('<', '?');\n\t\t\t\twriter.write_string(node->name ? node->name : default_name);\n\n\t\t\t\tif (node->value)\n\t\t\t\t{\n\t\t\t\t\twriter.write(' ');\n\t\t\t\t\tnode_output_pi_value(writer, node->value);\n\t\t\t\t}\n\n\t\t\t\twriter.write('?', '>');\n\t\t\t\tbreak;\n\n\t\t\tcase node_declaration:\n\t\t\t\twriter.write('<', '?');\n\t\t\t\twriter.write_string(node->name ? node->name : default_name);\n\t\t\t\tnode_output_attributes(writer, node, flags);\n\t\t\t\twriter.write('?', '>');\n\t\t\t\tbreak;\n\n\t\t\tcase node_doctype:\n\t\t\t\twriter.write('<', '!', 'D', 'O', 'C');\n\t\t\t\twriter.write('T', 'Y', 'P', 'E');\n\n\t\t\t\tif (node->value)\n\t\t\t\t{\n\t\t\t\t\twriter.write(' ');\n\t\t\t\t\twriter.write_string(node->value);\n\t\t\t\t}\n\n\t\t\t\twriter.write('>');\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tassert(!\"Invalid node type\");\n\t\t}\n\t}\n\n\tenum indent_flags_t\n\t{\n\t\tindent_newline = 1,\n\t\tindent_indent = 2\n\t};\n\n\tPUGI__FN void node_output(xml_buffered_writer& writer, xml_node_struct* root, const char_t* indent, unsigned int flags, unsigned int depth)\n\t{\n\t\tsize_t indent_length = ((flags & (format_indent | format_raw)) == format_indent) ? strlength(indent) : 0;\n\t\tunsigned int indent_flags = indent_indent;\n\n\t\txml_node_struct* node = root;\n\n\t\tdo\n\t\t{\n\t\t\tassert(node);\n\n\t\t\t// begin writing current node\n\t\t\tif (PUGI__NODETYPE(node) == node_pcdata || PUGI__NODETYPE(node) == node_cdata)\n\t\t\t{\n\t\t\t\tnode_output_simple(writer, node, flags);\n\n\t\t\t\tindent_flags = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((indent_flags & indent_newline) && (flags & format_raw) == 0)\n\t\t\t\t\twriter.write('\\n');\n\n\t\t\t\tif ((indent_flags & indent_indent) && indent_length)\n\t\t\t\t\ttext_output_indent(writer, indent, indent_length, depth);\n\n\t\t\t\tif (PUGI__NODETYPE(node) == node_element)\n\t\t\t\t{\n\t\t\t\t\tindent_flags = indent_newline | indent_indent;\n\n\t\t\t\t\tif (node_output_start(writer, node, flags))\n\t\t\t\t\t{\n\t\t\t\t\t\tnode = node->first_child;\n\t\t\t\t\t\tdepth++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (PUGI__NODETYPE(node) == node_document)\n\t\t\t\t{\n\t\t\t\t\tindent_flags = indent_indent;\n\n\t\t\t\t\tif (node->first_child)\n\t\t\t\t\t{\n\t\t\t\t\t\tnode = node->first_child;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnode_output_simple(writer, node, flags);\n\n\t\t\t\t\tindent_flags = indent_newline | indent_indent;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// continue to the next node\n\t\t\twhile (node != root)\n\t\t\t{\n\t\t\t\tif (node->next_sibling)\n\t\t\t\t{\n\t\t\t\t\tnode = node->next_sibling;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tnode = node->parent;\n\n\t\t\t\t// write closing node\n\t\t\t\tif (PUGI__NODETYPE(node) == node_element)\n\t\t\t\t{\n\t\t\t\t\tdepth--;\n\n\t\t\t\t\tif ((indent_flags & indent_newline) && (flags & format_raw) == 0)\n\t\t\t\t\t\twriter.write('\\n');\n\n\t\t\t\t\tif ((indent_flags & indent_indent) && indent_length)\n\t\t\t\t\t\ttext_output_indent(writer, indent, indent_length, depth);\n\n\t\t\t\t\tnode_output_end(writer, node);\n\n\t\t\t\t\tindent_flags = indent_newline | indent_indent;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twhile (node != root);\n\n\t\tif ((indent_flags & indent_newline) && (flags & format_raw) == 0)\n\t\t\twriter.write('\\n');\n\t}\n\n\tPUGI__FN bool has_declaration(xml_node_struct* node)\n\t{\n\t\tfor (xml_node_struct* child = node->first_child; child; child = child->next_sibling)\n\t\t{\n\t\t\txml_node_type type = PUGI__NODETYPE(child);\n\n\t\t\tif (type == node_declaration) return true;\n\t\t\tif (type == node_element) return false;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tPUGI__FN bool is_attribute_of(xml_attribute_struct* attr, xml_node_struct* node)\n\t{\n\t\tfor (xml_attribute_struct* a = node->first_attribute; a; a = a->next_attribute)\n\t\t\tif (a == attr)\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}\n\n\tPUGI__FN bool allow_insert_attribute(xml_node_type parent)\n\t{\n\t\treturn parent == node_element || parent == node_declaration;\n\t}\n\n\tPUGI__FN bool allow_insert_child(xml_node_type parent, xml_node_type child)\n\t{\n\t\tif (parent != node_document && parent != node_element) return false;\n\t\tif (child == node_document || child == node_null) return false;\n\t\tif (parent != node_document && (child == node_declaration || child == node_doctype)) return false;\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool allow_move(xml_node parent, xml_node child)\n\t{\n\t\t// check that child can be a child of parent\n\t\tif (!allow_insert_child(parent.type(), child.type()))\n\t\t\treturn false;\n\n\t\t// check that node is not moved between documents\n\t\tif (parent.root() != child.root())\n\t\t\treturn false;\n\n\t\t// check that new parent is not in the child subtree\n\t\txml_node cur = parent;\n\n\t\twhile (cur)\n\t\t{\n\t\t\tif (cur == child)\n\t\t\t\treturn false;\n\n\t\t\tcur = cur.parent();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN void node_copy_string(char_t*& dest, uintptr_t& header, uintptr_t header_mask, char_t* source, uintptr_t& source_header, xml_allocator* alloc)\n\t{\n\t\tassert(!dest && (header & header_mask) == 0);\n\n\t\tif (source)\n\t\t{\n\t\t\tif (alloc && (source_header & header_mask) == 0)\n\t\t\t{\n\t\t\t\tdest = source;\n\n\t\t\t\t// since strcpy_insitu can reuse document buffer memory we need to mark both source and dest as shared\n\t\t\t\theader |= xml_memory_page_contents_shared_mask;\n\t\t\t\tsource_header |= xml_memory_page_contents_shared_mask;\n\t\t\t}\n\t\t\telse\n\t\t\t\tstrcpy_insitu(dest, header, header_mask, source);\n\t\t}\n\t}\n\n\tPUGI__FN void node_copy_contents(xml_node_struct* dn, xml_node_struct* sn, xml_allocator* shared_alloc)\n\t{\n\t\tnode_copy_string(dn->name, dn->header, xml_memory_page_name_allocated_mask, sn->name, sn->header, shared_alloc);\n\t\tnode_copy_string(dn->value, dn->header, xml_memory_page_value_allocated_mask, sn->value, sn->header, shared_alloc);\n\n\t\tfor (xml_attribute_struct* sa = sn->first_attribute; sa; sa = sa->next_attribute)\n\t\t{\n\t\t\txml_attribute_struct* da = append_new_attribute(dn, get_allocator(dn));\n\n\t\t\tif (da)\n\t\t\t{\n\t\t\t\tnode_copy_string(da->name, da->header, xml_memory_page_name_allocated_mask, sa->name, sa->header, shared_alloc);\n\t\t\t\tnode_copy_string(da->value, da->header, xml_memory_page_value_allocated_mask, sa->value, sa->header, shared_alloc);\n\t\t\t}\n\t\t}\n\t}\n\n\tPUGI__FN void node_copy_tree(xml_node_struct* dn, xml_node_struct* sn)\n\t{\n\t\txml_allocator& alloc = get_allocator(dn);\n\t\txml_allocator* shared_alloc = (&alloc == &get_allocator(sn)) ? &alloc : 0;\n\n\t\tnode_copy_contents(dn, sn, shared_alloc);\n\n\t\txml_node_struct* dit = dn;\n\t\txml_node_struct* sit = sn->first_child;\n\n\t\twhile (sit && sit != sn)\n\t\t{\n\t\t\tif (sit != dn)\n\t\t\t{\n\t\t\t\txml_node_struct* copy = append_new_node(dit, alloc, PUGI__NODETYPE(sit));\n\n\t\t\t\tif (copy)\n\t\t\t\t{\n\t\t\t\t\tnode_copy_contents(copy, sit, shared_alloc);\n\n\t\t\t\t\tif (sit->first_child)\n\t\t\t\t\t{\n\t\t\t\t\t\tdit = copy;\n\t\t\t\t\t\tsit = sit->first_child;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// continue to the next node\n\t\t\tdo\n\t\t\t{\n\t\t\t\tif (sit->next_sibling)\n\t\t\t\t{\n\t\t\t\t\tsit = sit->next_sibling;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tsit = sit->parent;\n\t\t\t\tdit = dit->parent;\n\t\t\t}\n\t\t\twhile (sit != sn);\n\t\t}\n\t}\n\n\tinline bool is_text_node(xml_node_struct* node)\n\t{\n\t\txml_node_type type = PUGI__NODETYPE(node);\n\n\t\treturn type == node_pcdata || type == node_cdata;\n\t}\n\n\t// get value with conversion functions\n\tPUGI__FN int get_integer_base(const char_t* value)\n\t{\n\t\tconst char_t* s = value;\n\n\t\twhile (PUGI__IS_CHARTYPE(*s, ct_space))\n\t\t\ts++;\n\n\t\tif (*s == '-')\n\t\t\ts++;\n\n\t\treturn (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) ? 16 : 10;\n\t}\n\n\tPUGI__FN int get_value_int(const char_t* value, int def)\n\t{\n\t\tif (!value) return def;\n\n\t\tint base = get_integer_base(value);\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn static_cast<int>(wcstol(value, 0, base));\n\t#else\n\t\treturn static_cast<int>(strtol(value, 0, base));\n\t#endif\n\t}\n\n\tPUGI__FN unsigned int get_value_uint(const char_t* value, unsigned int def)\n\t{\n\t\tif (!value) return def;\n\n\t\tint base = get_integer_base(value);\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn static_cast<unsigned int>(wcstoul(value, 0, base));\n\t#else\n\t\treturn static_cast<unsigned int>(strtoul(value, 0, base));\n\t#endif\n\t}\n\n\tPUGI__FN double get_value_double(const char_t* value, double def)\n\t{\n\t\tif (!value) return def;\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn wcstod(value, 0);\n\t#else\n\t\treturn strtod(value, 0);\n\t#endif\n\t}\n\n\tPUGI__FN float get_value_float(const char_t* value, float def)\n\t{\n\t\tif (!value) return def;\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn static_cast<float>(wcstod(value, 0));\n\t#else\n\t\treturn static_cast<float>(strtod(value, 0));\n\t#endif\n\t}\n\n\tPUGI__FN bool get_value_bool(const char_t* value, bool def)\n\t{\n\t\tif (!value) return def;\n\n\t\t// only look at first char\n\t\tchar_t first = *value;\n\n\t\t// 1*, t* (true), T* (True), y* (yes), Y* (YES)\n\t\treturn (first == '1' || first == 't' || first == 'T' || first == 'y' || first == 'Y');\n\t}\n\n#ifdef PUGIXML_HAS_LONG_LONG\n\tPUGI__FN long long get_value_llong(const char_t* value, long long def)\n\t{\n\t\tif (!value) return def;\n\n\t\tint base = get_integer_base(value);\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\t#ifdef PUGI__MSVC_CRT_VERSION\n\t\t\treturn _wcstoi64(value, 0, base);\n\t\t#else\n\t\t\treturn wcstoll(value, 0, base);\n\t\t#endif\n\t#else\n\t\t#ifdef PUGI__MSVC_CRT_VERSION\n\t\t\treturn _strtoi64(value, 0, base);\n\t\t#else\n\t\t\treturn strtoll(value, 0, base);\n\t\t#endif\n\t#endif\n\t}\n\n\tPUGI__FN unsigned long long get_value_ullong(const char_t* value, unsigned long long def)\n\t{\n\t\tif (!value) return def;\n\n\t\tint base = get_integer_base(value);\n\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\t#ifdef PUGI__MSVC_CRT_VERSION\n\t\t\treturn _wcstoui64(value, 0, base);\n\t\t#else\n\t\t\treturn wcstoull(value, 0, base);\n\t\t#endif\n\t#else\n\t\t#ifdef PUGI__MSVC_CRT_VERSION\n\t\t\treturn _strtoui64(value, 0, base);\n\t\t#else\n\t\t\treturn strtoull(value, 0, base);\n\t\t#endif\n\t#endif\n\t}\n#endif\n\n\t// set value with conversion functions\n\tPUGI__FN bool set_value_buffer(char_t*& dest, uintptr_t& header, uintptr_t header_mask, char (&buf)[128])\n\t{\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\tchar_t wbuf[128];\n\t\timpl::widen_ascii(wbuf, buf);\n\n\t\treturn strcpy_insitu(dest, header, header_mask, wbuf);\n\t#else\n\t\treturn strcpy_insitu(dest, header, header_mask, buf);\n\t#endif\n\t}\n\n\tPUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, int value)\n\t{\n\t\tchar buf[128];\n\t\tsprintf(buf, \"%d\", value);\n\t\n\t\treturn set_value_buffer(dest, header, header_mask, buf);\n\t}\n\n\tPUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, unsigned int value)\n\t{\n\t\tchar buf[128];\n\t\tsprintf(buf, \"%u\", value);\n\n\t\treturn set_value_buffer(dest, header, header_mask, buf);\n\t}\n\n\tPUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, float value)\n\t{\n\t\tchar buf[128];\n\t\tsprintf(buf, \"%.9g\", value);\n\n\t\treturn set_value_buffer(dest, header, header_mask, buf);\n\t}\n\t\n\tPUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, double value)\n\t{\n\t\tchar buf[128];\n\t\tsprintf(buf, \"%.17g\", value);\n\n\t\treturn set_value_buffer(dest, header, header_mask, buf);\n\t}\n\t\n\tPUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, bool value)\n\t{\n\t\treturn strcpy_insitu(dest, header, header_mask, value ? PUGIXML_TEXT(\"true\") : PUGIXML_TEXT(\"false\"));\n\t}\n\n#ifdef PUGIXML_HAS_LONG_LONG\n\tPUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, long long value)\n\t{\n\t\tchar buf[128];\n\t\tsprintf(buf, \"%lld\", value);\n\t\n\t\treturn set_value_buffer(dest, header, header_mask, buf);\n\t}\n\n\tPUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, unsigned long long value)\n\t{\n\t\tchar buf[128];\n\t\tsprintf(buf, \"%llu\", value);\n\t\n\t\treturn set_value_buffer(dest, header, header_mask, buf);\n\t}\n#endif\n\n\t// we need to get length of entire file to load it in memory; the only (relatively) sane way to do it is via seek/tell trick\n\tPUGI__FN xml_parse_status get_file_size(FILE* file, size_t& out_result)\n\t{\n\t#if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE)\n\t\t// there are 64-bit versions of fseek/ftell, let's use them\n\t\ttypedef __int64 length_type;\n\n\t\t_fseeki64(file, 0, SEEK_END);\n\t\tlength_type length = _ftelli64(file);\n\t\t_fseeki64(file, 0, SEEK_SET);\n\t#elif defined(__MINGW32__) && !defined(__NO_MINGW_LFS) && (!defined(__STRICT_ANSI__) || defined(__MINGW64_VERSION_MAJOR))\n\t\t// there are 64-bit versions of fseek/ftell, let's use them\n\t\ttypedef off64_t length_type;\n\n\t\tfseeko64(file, 0, SEEK_END);\n\t\tlength_type length = ftello64(file);\n\t\tfseeko64(file, 0, SEEK_SET);\n\t#else\n\t\t// if this is a 32-bit OS, long is enough; if this is a unix system, long is 64-bit, which is enough; otherwise we can't do anything anyway.\n\t\ttypedef long length_type;\n\n\t\tfseek(file, 0, SEEK_END);\n\t\tlength_type length = ftell(file);\n\t\tfseek(file, 0, SEEK_SET);\n\t#endif\n\n\t\t// check for I/O errors\n\t\tif (length < 0) return status_io_error;\n\t\t\n\t\t// check for overflow\n\t\tsize_t result = static_cast<size_t>(length);\n\n\t\tif (static_cast<length_type>(result) != length) return status_out_of_memory;\n\n\t\t// finalize\n\t\tout_result = result;\n\n\t\treturn status_ok;\n\t}\n\n\tPUGI__FN size_t zero_terminate_buffer(void* buffer, size_t size, xml_encoding encoding) \n\t{\n\t\t// We only need to zero-terminate if encoding conversion does not do it for us\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\txml_encoding wchar_encoding = get_wchar_encoding();\n\n\t\tif (encoding == wchar_encoding || need_endian_swap_utf(encoding, wchar_encoding))\n\t\t{\n\t\t\tsize_t length = size / sizeof(char_t);\n\n\t\t\tstatic_cast<char_t*>(buffer)[length] = 0;\n\t\t\treturn (length + 1) * sizeof(char_t);\n\t\t}\n\t#else\n\t\tif (encoding == encoding_utf8)\n\t\t{\n\t\t\tstatic_cast<char*>(buffer)[size] = 0;\n\t\t\treturn size + 1;\n\t\t}\n\t#endif\n\n\t\treturn size;\n\t}\n\n\tPUGI__FN xml_parse_result load_file_impl(xml_document& doc, FILE* file, unsigned int options, xml_encoding encoding)\n\t{\n\t\tif (!file) return make_parse_result(status_file_not_found);\n\n\t\t// get file size (can result in I/O errors)\n\t\tsize_t size = 0;\n\t\txml_parse_status size_status = get_file_size(file, size);\n\n\t\tif (size_status != status_ok)\n\t\t{\n\t\t\tfclose(file);\n\t\t\treturn make_parse_result(size_status);\n\t\t}\n\t\t\n\t\tsize_t max_suffix_size = sizeof(char_t);\n\n\t\t// allocate buffer for the whole file\n\t\tchar* contents = static_cast<char*>(xml_memory::allocate(size + max_suffix_size));\n\n\t\tif (!contents)\n\t\t{\n\t\t\tfclose(file);\n\t\t\treturn make_parse_result(status_out_of_memory);\n\t\t}\n\n\t\t// read file in memory\n\t\tsize_t read_size = fread(contents, 1, size, file);\n\t\tfclose(file);\n\n\t\tif (read_size != size)\n\t\t{\n\t\t\txml_memory::deallocate(contents);\n\t\t\treturn make_parse_result(status_io_error);\n\t\t}\n\n\t\txml_encoding real_encoding = get_buffer_encoding(encoding, contents, size);\n\t\t\n\t\treturn doc.load_buffer_inplace_own(contents, zero_terminate_buffer(contents, size, real_encoding), options, real_encoding);\n\t}\n\n#ifndef PUGIXML_NO_STL\n\ttemplate <typename T> struct xml_stream_chunk\n\t{\n\t\tstatic xml_stream_chunk* create()\n\t\t{\n\t\t\tvoid* memory = xml_memory::allocate(sizeof(xml_stream_chunk));\n\t\t\t\n\t\t\treturn new (memory) xml_stream_chunk();\n\t\t}\n\n\t\tstatic void destroy(void* ptr)\n\t\t{\n\t\t\txml_stream_chunk* chunk = static_cast<xml_stream_chunk*>(ptr);\n\n\t\t\t// free chunk chain\n\t\t\twhile (chunk)\n\t\t\t{\n\t\t\t\txml_stream_chunk* next_ = chunk->next;\n\n\t\t\t\txml_memory::deallocate(chunk);\n\n\t\t\t\tchunk = next_;\n\t\t\t}\n\t\t}\n\n\t\txml_stream_chunk(): next(0), size(0)\n\t\t{\n\t\t}\n\n\t\txml_stream_chunk* next;\n\t\tsize_t size;\n\n\t\tT data[xml_memory_page_size / sizeof(T)];\n\t};\n\n\ttemplate <typename T> PUGI__FN xml_parse_status load_stream_data_noseek(std::basic_istream<T>& stream, void** out_buffer, size_t* out_size)\n\t{\n\t\tbuffer_holder chunks(0, xml_stream_chunk<T>::destroy);\n\n\t\t// read file to a chunk list\n\t\tsize_t total = 0;\n\t\txml_stream_chunk<T>* last = 0;\n\n\t\twhile (!stream.eof())\n\t\t{\n\t\t\t// allocate new chunk\n\t\t\txml_stream_chunk<T>* chunk = xml_stream_chunk<T>::create();\n\t\t\tif (!chunk) return status_out_of_memory;\n\n\t\t\t// append chunk to list\n\t\t\tif (last) last = last->next = chunk;\n\t\t\telse chunks.data = last = chunk;\n\n\t\t\t// read data to chunk\n\t\t\tstream.read(chunk->data, static_cast<std::streamsize>(sizeof(chunk->data) / sizeof(T)));\n\t\t\tchunk->size = static_cast<size_t>(stream.gcount()) * sizeof(T);\n\n\t\t\t// read may set failbit | eofbit in case gcount() is less than read length, so check for other I/O errors\n\t\t\tif (stream.bad() || (!stream.eof() && stream.fail())) return status_io_error;\n\n\t\t\t// guard against huge files (chunk size is small enough to make this overflow check work)\n\t\t\tif (total + chunk->size < total) return status_out_of_memory;\n\t\t\ttotal += chunk->size;\n\t\t}\n\n\t\tsize_t max_suffix_size = sizeof(char_t);\n\n\t\t// copy chunk list to a contiguous buffer\n\t\tchar* buffer = static_cast<char*>(xml_memory::allocate(total + max_suffix_size));\n\t\tif (!buffer) return status_out_of_memory;\n\n\t\tchar* write = buffer;\n\n\t\tfor (xml_stream_chunk<T>* chunk = static_cast<xml_stream_chunk<T>*>(chunks.data); chunk; chunk = chunk->next)\n\t\t{\n\t\t\tassert(write + chunk->size <= buffer + total);\n\t\t\tmemcpy(write, chunk->data, chunk->size);\n\t\t\twrite += chunk->size;\n\t\t}\n\n\t\tassert(write == buffer + total);\n\n\t\t// return buffer\n\t\t*out_buffer = buffer;\n\t\t*out_size = total;\n\n\t\treturn status_ok;\n\t}\n\n\ttemplate <typename T> PUGI__FN xml_parse_status load_stream_data_seek(std::basic_istream<T>& stream, void** out_buffer, size_t* out_size)\n\t{\n\t\t// get length of remaining data in stream\n\t\ttypename std::basic_istream<T>::pos_type pos = stream.tellg();\n\t\tstream.seekg(0, std::ios::end);\n\t\tstd::streamoff length = stream.tellg() - pos;\n\t\tstream.seekg(pos);\n\n\t\tif (stream.fail() || pos < 0) return status_io_error;\n\n\t\t// guard against huge files\n\t\tsize_t read_length = static_cast<size_t>(length);\n\n\t\tif (static_cast<std::streamsize>(read_length) != length || length < 0) return status_out_of_memory;\n\n\t\tsize_t max_suffix_size = sizeof(char_t);\n\n\t\t// read stream data into memory (guard against stream exceptions with buffer holder)\n\t\tbuffer_holder buffer(xml_memory::allocate(read_length * sizeof(T) + max_suffix_size), xml_memory::deallocate);\n\t\tif (!buffer.data) return status_out_of_memory;\n\n\t\tstream.read(static_cast<T*>(buffer.data), static_cast<std::streamsize>(read_length));\n\n\t\t// read may set failbit | eofbit in case gcount() is less than read_length (i.e. line ending conversion), so check for other I/O errors\n\t\tif (stream.bad() || (!stream.eof() && stream.fail())) return status_io_error;\n\n\t\t// return buffer\n\t\tsize_t actual_length = static_cast<size_t>(stream.gcount());\n\t\tassert(actual_length <= read_length);\n\t\t\n\t\t*out_buffer = buffer.release();\n\t\t*out_size = actual_length * sizeof(T);\n\n\t\treturn status_ok;\n\t}\n\n\ttemplate <typename T> PUGI__FN xml_parse_result load_stream_impl(xml_document& doc, std::basic_istream<T>& stream, unsigned int options, xml_encoding encoding)\n\t{\n\t\tvoid* buffer = 0;\n\t\tsize_t size = 0;\n\t\txml_parse_status status = status_ok;\n\n\t\t// if stream has an error bit set, bail out (otherwise tellg() can fail and we'll clear error bits)\n\t\tif (stream.fail()) return make_parse_result(status_io_error);\n\n\t\t// load stream to memory (using seek-based implementation if possible, since it's faster and takes less memory)\n\t\tif (stream.tellg() < 0)\n\t\t{\n\t\t\tstream.clear(); // clear error flags that could be set by a failing tellg\n\t\t\tstatus = load_stream_data_noseek(stream, &buffer, &size);\n\t\t}\n\t\telse\n\t\t\tstatus = load_stream_data_seek(stream, &buffer, &size);\n\n\t\tif (status != status_ok) return make_parse_result(status);\n\n\t\txml_encoding real_encoding = get_buffer_encoding(encoding, buffer, size);\n\t\t\n\t\treturn doc.load_buffer_inplace_own(buffer, zero_terminate_buffer(buffer, size, real_encoding), options, real_encoding);\n\t}\n#endif\n\n#if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && (!defined(__STRICT_ANSI__) || defined(__MINGW64_VERSION_MAJOR)))\n\tPUGI__FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)\n\t{\n\t\treturn _wfopen(path, mode);\n\t}\n#else\n\tPUGI__FN char* convert_path_heap(const wchar_t* str)\n\t{\n\t\tassert(str);\n\n\t\t// first pass: get length in utf8 characters\n\t\tsize_t length = strlength_wide(str);\n\t\tsize_t size = as_utf8_begin(str, length);\n\n\t\t// allocate resulting string\n\t\tchar* result = static_cast<char*>(xml_memory::allocate(size + 1));\n\t\tif (!result) return 0;\n\n\t\t// second pass: convert to utf8\n\t\tas_utf8_end(result, size, str, length);\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)\n\t{\n\t\t// there is no standard function to open wide paths, so our best bet is to try utf8 path\n\t\tchar* path_utf8 = convert_path_heap(path);\n\t\tif (!path_utf8) return 0;\n\n\t\t// convert mode to ASCII (we mirror _wfopen interface)\n\t\tchar mode_ascii[4] = {0};\n\t\tfor (size_t i = 0; mode[i]; ++i) mode_ascii[i] = static_cast<char>(mode[i]);\n\n\t\t// try to open the utf8 path\n\t\tFILE* result = fopen(path_utf8, mode_ascii);\n\n\t\t// free dummy buffer\n\t\txml_memory::deallocate(path_utf8);\n\n\t\treturn result;\n\t}\n#endif\n\n\tPUGI__FN bool save_file_impl(const xml_document& doc, FILE* file, const char_t* indent, unsigned int flags, xml_encoding encoding)\n\t{\n\t\tif (!file) return false;\n\n\t\txml_writer_file writer(file);\n\t\tdoc.save(writer, indent, flags, encoding);\n\n\t\tint result = ferror(file);\n\n\t\tfclose(file);\n\n\t\treturn result == 0;\n\t}\n\n\tPUGI__FN xml_parse_result load_buffer_impl(xml_document_struct* doc, xml_node_struct* root, void* contents, size_t size, unsigned int options, xml_encoding encoding, bool is_mutable, bool own, char_t** out_buffer)\n\t{\n\t\t// check input buffer\n\t\tif (!contents && size) return make_parse_result(status_io_error);\n\n\t\t// get actual encoding\n\t\txml_encoding buffer_encoding = impl::get_buffer_encoding(encoding, contents, size);\n\n\t\t// get private buffer\n\t\tchar_t* buffer = 0;\n\t\tsize_t length = 0;\n\n\t\tif (!impl::convert_buffer(buffer, length, buffer_encoding, contents, size, is_mutable)) return impl::make_parse_result(status_out_of_memory);\n\t\t\n\t\t// delete original buffer if we performed a conversion\n\t\tif (own && buffer != contents && contents) impl::xml_memory::deallocate(contents);\n\n\t\t// store buffer for offset_debug\n\t\tdoc->buffer = buffer;\n\n\t\t// parse\n\t\txml_parse_result res = impl::xml_parser::parse(buffer, length, doc, root, options);\n\n\t\t// remember encoding\n\t\tres.encoding = buffer_encoding;\n\n\t\t// grab onto buffer if it's our buffer, user is responsible for deallocating contents himself\n\t\tif (own || buffer != contents) *out_buffer = buffer;\n\n\t\treturn res;\n\t}\nPUGI__NS_END\n\nnamespace pugi\n{\n\tPUGI__FN xml_writer_file::xml_writer_file(void* file_): file(file_)\n\t{\n\t}\n\n\tPUGI__FN void xml_writer_file::write(const void* data, size_t size)\n\t{\n\t\tsize_t result = fwrite(data, 1, size, static_cast<FILE*>(file));\n\t\t(void)!result; // unfortunately we can't do proper error handling here\n\t}\n\n#ifndef PUGIXML_NO_STL\n\tPUGI__FN xml_writer_stream::xml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream): narrow_stream(&stream), wide_stream(0)\n\t{\n\t}\n\n\tPUGI__FN xml_writer_stream::xml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream): narrow_stream(0), wide_stream(&stream)\n\t{\n\t}\n\n\tPUGI__FN void xml_writer_stream::write(const void* data, size_t size)\n\t{\n\t\tif (narrow_stream)\n\t\t{\n\t\t\tassert(!wide_stream);\n\t\t\tnarrow_stream->write(reinterpret_cast<const char*>(data), static_cast<std::streamsize>(size));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tassert(wide_stream);\n\t\t\tassert(size % sizeof(wchar_t) == 0);\n\n\t\t\twide_stream->write(reinterpret_cast<const wchar_t*>(data), static_cast<std::streamsize>(size / sizeof(wchar_t)));\n\t\t}\n\t}\n#endif\n\n\tPUGI__FN xml_tree_walker::xml_tree_walker(): _depth(0)\n\t{\n\t}\n\t\n\tPUGI__FN xml_tree_walker::~xml_tree_walker()\n\t{\n\t}\n\n\tPUGI__FN int xml_tree_walker::depth() const\n\t{\n\t\treturn _depth;\n\t}\n\n\tPUGI__FN bool xml_tree_walker::begin(xml_node&)\n\t{\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool xml_tree_walker::end(xml_node&)\n\t{\n\t\treturn true;\n\t}\n\n\tPUGI__FN xml_attribute::xml_attribute(): _attr(0)\n\t{\n\t}\n\n\tPUGI__FN xml_attribute::xml_attribute(xml_attribute_struct* attr): _attr(attr)\n\t{\n\t}\n\n\tPUGI__FN static void unspecified_bool_xml_attribute(xml_attribute***)\n\t{\n\t}\n\n\tPUGI__FN xml_attribute::operator xml_attribute::unspecified_bool_type() const\n\t{\n\t\treturn _attr ? unspecified_bool_xml_attribute : 0;\n\t}\n\n\tPUGI__FN bool xml_attribute::operator!() const\n\t{\n\t\treturn !_attr;\n\t}\n\n\tPUGI__FN bool xml_attribute::operator==(const xml_attribute& r) const\n\t{\n\t\treturn (_attr == r._attr);\n\t}\n\t\n\tPUGI__FN bool xml_attribute::operator!=(const xml_attribute& r) const\n\t{\n\t\treturn (_attr != r._attr);\n\t}\n\n\tPUGI__FN bool xml_attribute::operator<(const xml_attribute& r) const\n\t{\n\t\treturn (_attr < r._attr);\n\t}\n\t\n\tPUGI__FN bool xml_attribute::operator>(const xml_attribute& r) const\n\t{\n\t\treturn (_attr > r._attr);\n\t}\n\t\n\tPUGI__FN bool xml_attribute::operator<=(const xml_attribute& r) const\n\t{\n\t\treturn (_attr <= r._attr);\n\t}\n\t\n\tPUGI__FN bool xml_attribute::operator>=(const xml_attribute& r) const\n\t{\n\t\treturn (_attr >= r._attr);\n\t}\n\n\tPUGI__FN xml_attribute xml_attribute::next_attribute() const\n\t{\n\t\treturn _attr ? xml_attribute(_attr->next_attribute) : xml_attribute();\n\t}\n\n\tPUGI__FN xml_attribute xml_attribute::previous_attribute() const\n\t{\n\t\treturn _attr && _attr->prev_attribute_c->next_attribute ? xml_attribute(_attr->prev_attribute_c) : xml_attribute();\n\t}\n\n\tPUGI__FN const char_t* xml_attribute::as_string(const char_t* def) const\n\t{\n\t\treturn (_attr && _attr->value) ? _attr->value : def;\n\t}\n\n\tPUGI__FN int xml_attribute::as_int(int def) const\n\t{\n\t\treturn impl::get_value_int(_attr ? _attr->value : 0, def);\n\t}\n\n\tPUGI__FN unsigned int xml_attribute::as_uint(unsigned int def) const\n\t{\n\t\treturn impl::get_value_uint(_attr ? _attr->value : 0, def);\n\t}\n\n\tPUGI__FN double xml_attribute::as_double(double def) const\n\t{\n\t\treturn impl::get_value_double(_attr ? _attr->value : 0, def);\n\t}\n\n\tPUGI__FN float xml_attribute::as_float(float def) const\n\t{\n\t\treturn impl::get_value_float(_attr ? _attr->value : 0, def);\n\t}\n\n\tPUGI__FN bool xml_attribute::as_bool(bool def) const\n\t{\n\t\treturn impl::get_value_bool(_attr ? _attr->value : 0, def);\n\t}\n\n#ifdef PUGIXML_HAS_LONG_LONG\n\tPUGI__FN long long xml_attribute::as_llong(long long def) const\n\t{\n\t\treturn impl::get_value_llong(_attr ? _attr->value : 0, def);\n\t}\n\n\tPUGI__FN unsigned long long xml_attribute::as_ullong(unsigned long long def) const\n\t{\n\t\treturn impl::get_value_ullong(_attr ? _attr->value : 0, def);\n\t}\n#endif\n\n\tPUGI__FN bool xml_attribute::empty() const\n\t{\n\t\treturn !_attr;\n\t}\n\n\tPUGI__FN const char_t* xml_attribute::name() const\n\t{\n\t\treturn (_attr && _attr->name) ? _attr->name : PUGIXML_TEXT(\"\");\n\t}\n\n\tPUGI__FN const char_t* xml_attribute::value() const\n\t{\n\t\treturn (_attr && _attr->value) ? _attr->value : PUGIXML_TEXT(\"\");\n\t}\n\n\tPUGI__FN size_t xml_attribute::hash_value() const\n\t{\n\t\treturn static_cast<size_t>(reinterpret_cast<uintptr_t>(_attr) / sizeof(xml_attribute_struct));\n\t}\n\n\tPUGI__FN xml_attribute_struct* xml_attribute::internal_object() const\n\t{\n\t\treturn _attr;\n\t}\n\n\tPUGI__FN xml_attribute& xml_attribute::operator=(const char_t* rhs)\n\t{\n\t\tset_value(rhs);\n\t\treturn *this;\n\t}\n\t\n\tPUGI__FN xml_attribute& xml_attribute::operator=(int rhs)\n\t{\n\t\tset_value(rhs);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_attribute& xml_attribute::operator=(unsigned int rhs)\n\t{\n\t\tset_value(rhs);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_attribute& xml_attribute::operator=(double rhs)\n\t{\n\t\tset_value(rhs);\n\t\treturn *this;\n\t}\n\t\n\tPUGI__FN xml_attribute& xml_attribute::operator=(float rhs)\n\t{\n\t\tset_value(rhs);\n\t\treturn *this;\n\t}\n\t\n\tPUGI__FN xml_attribute& xml_attribute::operator=(bool rhs)\n\t{\n\t\tset_value(rhs);\n\t\treturn *this;\n\t}\n\n#ifdef PUGIXML_HAS_LONG_LONG\n\tPUGI__FN xml_attribute& xml_attribute::operator=(long long rhs)\n\t{\n\t\tset_value(rhs);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_attribute& xml_attribute::operator=(unsigned long long rhs)\n\t{\n\t\tset_value(rhs);\n\t\treturn *this;\n\t}\n#endif\n\n\tPUGI__FN bool xml_attribute::set_name(const char_t* rhs)\n\t{\n\t\tif (!_attr) return false;\n\t\t\n\t\treturn impl::strcpy_insitu(_attr->name, _attr->header, impl::xml_memory_page_name_allocated_mask, rhs);\n\t}\n\t\t\n\tPUGI__FN bool xml_attribute::set_value(const char_t* rhs)\n\t{\n\t\tif (!_attr) return false;\n\n\t\treturn impl::strcpy_insitu(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\t}\n\n\tPUGI__FN bool xml_attribute::set_value(int rhs)\n\t{\n\t\tif (!_attr) return false;\n\n\t\treturn impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\t}\n\n\tPUGI__FN bool xml_attribute::set_value(unsigned int rhs)\n\t{\n\t\tif (!_attr) return false;\n\n\t\treturn impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\t}\n\n\tPUGI__FN bool xml_attribute::set_value(double rhs)\n\t{\n\t\tif (!_attr) return false;\n\n\t\treturn impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\t}\n\t\n\tPUGI__FN bool xml_attribute::set_value(float rhs)\n\t{\n\t\tif (!_attr) return false;\n\n\t\treturn impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\t}\n\t\n\tPUGI__FN bool xml_attribute::set_value(bool rhs)\n\t{\n\t\tif (!_attr) return false;\n\n\t\treturn impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\t}\n\n#ifdef PUGIXML_HAS_LONG_LONG\n\tPUGI__FN bool xml_attribute::set_value(long long rhs)\n\t{\n\t\tif (!_attr) return false;\n\n\t\treturn impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\t}\n\n\tPUGI__FN bool xml_attribute::set_value(unsigned long long rhs)\n\t{\n\t\tif (!_attr) return false;\n\n\t\treturn impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\t}\n#endif\n\n#ifdef __BORLANDC__\n\tPUGI__FN bool operator&&(const xml_attribute& lhs, bool rhs)\n\t{\n\t\treturn (bool)lhs && rhs;\n\t}\n\n\tPUGI__FN bool operator||(const xml_attribute& lhs, bool rhs)\n\t{\n\t\treturn (bool)lhs || rhs;\n\t}\n#endif\n\n\tPUGI__FN xml_node::xml_node(): _root(0)\n\t{\n\t}\n\n\tPUGI__FN xml_node::xml_node(xml_node_struct* p): _root(p)\n\t{\n\t}\n\t\n\tPUGI__FN static void unspecified_bool_xml_node(xml_node***)\n\t{\n\t}\n\n\tPUGI__FN xml_node::operator xml_node::unspecified_bool_type() const\n\t{\n\t\treturn _root ? unspecified_bool_xml_node : 0;\n\t}\n\n\tPUGI__FN bool xml_node::operator!() const\n\t{\n\t\treturn !_root;\n\t}\n\n\tPUGI__FN xml_node::iterator xml_node::begin() const\n\t{\n\t\treturn iterator(_root ? _root->first_child : 0, _root);\n\t}\n\n\tPUGI__FN xml_node::iterator xml_node::end() const\n\t{\n\t\treturn iterator(0, _root);\n\t}\n\t\n\tPUGI__FN xml_node::attribute_iterator xml_node::attributes_begin() const\n\t{\n\t\treturn attribute_iterator(_root ? _root->first_attribute : 0, _root);\n\t}\n\n\tPUGI__FN xml_node::attribute_iterator xml_node::attributes_end() const\n\t{\n\t\treturn attribute_iterator(0, _root);\n\t}\n\t\n\tPUGI__FN xml_object_range<xml_node_iterator> xml_node::children() const\n\t{\n\t\treturn xml_object_range<xml_node_iterator>(begin(), end());\n\t}\n\n\tPUGI__FN xml_object_range<xml_named_node_iterator> xml_node::children(const char_t* name_) const\n\t{\n\t\treturn xml_object_range<xml_named_node_iterator>(xml_named_node_iterator(child(name_)._root, _root, name_), xml_named_node_iterator(0, _root, name_));\n\t}\n\n\tPUGI__FN xml_object_range<xml_attribute_iterator> xml_node::attributes() const\n\t{\n\t\treturn xml_object_range<xml_attribute_iterator>(attributes_begin(), attributes_end());\n\t}\n\n\tPUGI__FN bool xml_node::operator==(const xml_node& r) const\n\t{\n\t\treturn (_root == r._root);\n\t}\n\n\tPUGI__FN bool xml_node::operator!=(const xml_node& r) const\n\t{\n\t\treturn (_root != r._root);\n\t}\n\n\tPUGI__FN bool xml_node::operator<(const xml_node& r) const\n\t{\n\t\treturn (_root < r._root);\n\t}\n\t\n\tPUGI__FN bool xml_node::operator>(const xml_node& r) const\n\t{\n\t\treturn (_root > r._root);\n\t}\n\t\n\tPUGI__FN bool xml_node::operator<=(const xml_node& r) const\n\t{\n\t\treturn (_root <= r._root);\n\t}\n\t\n\tPUGI__FN bool xml_node::operator>=(const xml_node& r) const\n\t{\n\t\treturn (_root >= r._root);\n\t}\n\n\tPUGI__FN bool xml_node::empty() const\n\t{\n\t\treturn !_root;\n\t}\n\t\n\tPUGI__FN const char_t* xml_node::name() const\n\t{\n\t\treturn (_root && _root->name) ? _root->name : PUGIXML_TEXT(\"\");\n\t}\n\n\tPUGI__FN xml_node_type xml_node::type() const\n\t{\n\t\treturn _root ? PUGI__NODETYPE(_root) : node_null;\n\t}\n\t\n\tPUGI__FN const char_t* xml_node::value() const\n\t{\n\t\treturn (_root && _root->value) ? _root->value : PUGIXML_TEXT(\"\");\n\t}\n\t\n\tPUGI__FN xml_node xml_node::child(const char_t* name_) const\n\t{\n\t\tif (!_root) return xml_node();\n\n\t\tfor (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n\t\t\tif (i->name && impl::strequal(name_, i->name)) return xml_node(i);\n\n\t\treturn xml_node();\n\t}\n\n\tPUGI__FN xml_attribute xml_node::attribute(const char_t* name_) const\n\t{\n\t\tif (!_root) return xml_attribute();\n\n\t\tfor (xml_attribute_struct* i = _root->first_attribute; i; i = i->next_attribute)\n\t\t\tif (i->name && impl::strequal(name_, i->name))\n\t\t\t\treturn xml_attribute(i);\n\t\t\n\t\treturn xml_attribute();\n\t}\n\t\n\tPUGI__FN xml_node xml_node::next_sibling(const char_t* name_) const\n\t{\n\t\tif (!_root) return xml_node();\n\t\t\n\t\tfor (xml_node_struct* i = _root->next_sibling; i; i = i->next_sibling)\n\t\t\tif (i->name && impl::strequal(name_, i->name)) return xml_node(i);\n\n\t\treturn xml_node();\n\t}\n\n\tPUGI__FN xml_node xml_node::next_sibling() const\n\t{\n\t\treturn _root ? xml_node(_root->next_sibling) : xml_node();\n\t}\n\n\tPUGI__FN xml_node xml_node::previous_sibling(const char_t* name_) const\n\t{\n\t\tif (!_root) return xml_node();\n\t\t\n\t\tfor (xml_node_struct* i = _root->prev_sibling_c; i->next_sibling; i = i->prev_sibling_c)\n\t\t\tif (i->name && impl::strequal(name_, i->name)) return xml_node(i);\n\n\t\treturn xml_node();\n\t}\n\n\tPUGI__FN xml_node xml_node::previous_sibling() const\n\t{\n\t\tif (!_root) return xml_node();\n\t\t\n\t\tif (_root->prev_sibling_c->next_sibling) return xml_node(_root->prev_sibling_c);\n\t\telse return xml_node();\n\t}\n\n\tPUGI__FN xml_node xml_node::parent() const\n\t{\n\t\treturn _root ? xml_node(_root->parent) : xml_node();\n\t}\n\n\tPUGI__FN xml_node xml_node::root() const\n\t{\n\t\treturn _root ? xml_node(&impl::get_document(_root)) : xml_node();\n\t}\n\n\tPUGI__FN xml_text xml_node::text() const\n\t{\n\t\treturn xml_text(_root);\n\t}\n\n\tPUGI__FN const char_t* xml_node::child_value() const\n\t{\n\t\tif (!_root) return PUGIXML_TEXT(\"\");\n\t\t\n\t\tfor (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n\t\t\tif (i->value && impl::is_text_node(i))\n\t\t\t\treturn i->value;\n\n\t\treturn PUGIXML_TEXT(\"\");\n\t}\n\n\tPUGI__FN const char_t* xml_node::child_value(const char_t* name_) const\n\t{\n\t\treturn child(name_).child_value();\n\t}\n\n\tPUGI__FN xml_attribute xml_node::first_attribute() const\n\t{\n\t\treturn _root ? xml_attribute(_root->first_attribute) : xml_attribute();\n\t}\n\n\tPUGI__FN xml_attribute xml_node::last_attribute() const\n\t{\n\t\treturn _root && _root->first_attribute ? xml_attribute(_root->first_attribute->prev_attribute_c) : xml_attribute();\n\t}\n\n\tPUGI__FN xml_node xml_node::first_child() const\n\t{\n\t\treturn _root ? xml_node(_root->first_child) : xml_node();\n\t}\n\n\tPUGI__FN xml_node xml_node::last_child() const\n\t{\n\t\treturn _root && _root->first_child ? xml_node(_root->first_child->prev_sibling_c) : xml_node();\n\t}\n\n\tPUGI__FN bool xml_node::set_name(const char_t* rhs)\n\t{\n\t\tswitch (type())\n\t\t{\n\t\tcase node_pi:\n\t\tcase node_declaration:\n\t\tcase node_element:\n\t\t\treturn impl::strcpy_insitu(_root->name, _root->header, impl::xml_memory_page_name_allocated_mask, rhs);\n\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}\n\t\t\n\tPUGI__FN bool xml_node::set_value(const char_t* rhs)\n\t{\n\t\tswitch (type())\n\t\t{\n\t\tcase node_pi:\n\t\tcase node_cdata:\n\t\tcase node_pcdata:\n\t\tcase node_comment:\n\t\tcase node_doctype:\n\t\t\treturn impl::strcpy_insitu(_root->value, _root->header, impl::xml_memory_page_value_allocated_mask, rhs);\n\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tPUGI__FN xml_attribute xml_node::append_attribute(const char_t* name_)\n\t{\n\t\tif (!impl::allow_insert_attribute(type())) return xml_attribute();\n\t\t\n\t\txml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));\n\t\tif (!a) return xml_attribute();\n\n\t\timpl::append_attribute(a._attr, _root);\n\n\t\ta.set_name(name_);\n\t\t\n\t\treturn a;\n\t}\n\n\tPUGI__FN xml_attribute xml_node::prepend_attribute(const char_t* name_)\n\t{\n\t\tif (!impl::allow_insert_attribute(type())) return xml_attribute();\n\t\t\n\t\txml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));\n\t\tif (!a) return xml_attribute();\n\n\t\timpl::prepend_attribute(a._attr, _root);\n\n\t\ta.set_name(name_);\n\n\t\treturn a;\n\t}\n\n\tPUGI__FN xml_attribute xml_node::insert_attribute_after(const char_t* name_, const xml_attribute& attr)\n\t{\n\t\tif (!impl::allow_insert_attribute(type())) return xml_attribute();\n\t\tif (!attr || !impl::is_attribute_of(attr._attr, _root)) return xml_attribute();\n\t\t\n\t\txml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));\n\t\tif (!a) return xml_attribute();\n\n\t\timpl::insert_attribute_after(a._attr, attr._attr, _root);\n\n\t\ta.set_name(name_);\n\n\t\treturn a;\n\t}\n\n\tPUGI__FN xml_attribute xml_node::insert_attribute_before(const char_t* name_, const xml_attribute& attr)\n\t{\n\t\tif (!impl::allow_insert_attribute(type())) return xml_attribute();\n\t\tif (!attr || !impl::is_attribute_of(attr._attr, _root)) return xml_attribute();\n\t\t\n\t\txml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));\n\t\tif (!a) return xml_attribute();\n\n\t\timpl::insert_attribute_before(a._attr, attr._attr, _root);\n\n\t\ta.set_name(name_);\n\n\t\treturn a;\n\t}\n\n\tPUGI__FN xml_attribute xml_node::append_copy(const xml_attribute& proto)\n\t{\n\t\tif (!proto) return xml_attribute();\n\n\t\txml_attribute result = append_attribute(proto.name());\n\t\tresult.set_value(proto.value());\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN xml_attribute xml_node::prepend_copy(const xml_attribute& proto)\n\t{\n\t\tif (!proto) return xml_attribute();\n\n\t\txml_attribute result = prepend_attribute(proto.name());\n\t\tresult.set_value(proto.value());\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN xml_attribute xml_node::insert_copy_after(const xml_attribute& proto, const xml_attribute& attr)\n\t{\n\t\tif (!proto) return xml_attribute();\n\n\t\txml_attribute result = insert_attribute_after(proto.name(), attr);\n\t\tresult.set_value(proto.value());\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN xml_attribute xml_node::insert_copy_before(const xml_attribute& proto, const xml_attribute& attr)\n\t{\n\t\tif (!proto) return xml_attribute();\n\n\t\txml_attribute result = insert_attribute_before(proto.name(), attr);\n\t\tresult.set_value(proto.value());\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN xml_node xml_node::append_child(xml_node_type type_)\n\t{\n\t\tif (!impl::allow_insert_child(type(), type_)) return xml_node();\n\t\t\n\t\txml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n\t\tif (!n) return xml_node();\n\n\t\timpl::append_node(n._root, _root);\n\n\t\tif (type_ == node_declaration) n.set_name(PUGIXML_TEXT(\"xml\"));\n\n\t\treturn n;\n\t}\n\n\tPUGI__FN xml_node xml_node::prepend_child(xml_node_type type_)\n\t{\n\t\tif (!impl::allow_insert_child(type(), type_)) return xml_node();\n\t\t\n\t\txml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n\t\tif (!n) return xml_node();\n\n\t\timpl::prepend_node(n._root, _root);\n\t\t\t\t\n\t\tif (type_ == node_declaration) n.set_name(PUGIXML_TEXT(\"xml\"));\n\n\t\treturn n;\n\t}\n\n\tPUGI__FN xml_node xml_node::insert_child_before(xml_node_type type_, const xml_node& node)\n\t{\n\t\tif (!impl::allow_insert_child(type(), type_)) return xml_node();\n\t\tif (!node._root || node._root->parent != _root) return xml_node();\n\t\n\t\txml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n\t\tif (!n) return xml_node();\n\n\t\timpl::insert_node_before(n._root, node._root);\n\n\t\tif (type_ == node_declaration) n.set_name(PUGIXML_TEXT(\"xml\"));\n\n\t\treturn n;\n\t}\n\n\tPUGI__FN xml_node xml_node::insert_child_after(xml_node_type type_, const xml_node& node)\n\t{\n\t\tif (!impl::allow_insert_child(type(), type_)) return xml_node();\n\t\tif (!node._root || node._root->parent != _root) return xml_node();\n\t\n\t\txml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n\t\tif (!n) return xml_node();\n\n\t\timpl::insert_node_after(n._root, node._root);\n\n\t\tif (type_ == node_declaration) n.set_name(PUGIXML_TEXT(\"xml\"));\n\n\t\treturn n;\n\t}\n\n\tPUGI__FN xml_node xml_node::append_child(const char_t* name_)\n\t{\n\t\txml_node result = append_child(node_element);\n\n\t\tresult.set_name(name_);\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN xml_node xml_node::prepend_child(const char_t* name_)\n\t{\n\t\txml_node result = prepend_child(node_element);\n\n\t\tresult.set_name(name_);\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN xml_node xml_node::insert_child_after(const char_t* name_, const xml_node& node)\n\t{\n\t\txml_node result = insert_child_after(node_element, node);\n\n\t\tresult.set_name(name_);\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN xml_node xml_node::insert_child_before(const char_t* name_, const xml_node& node)\n\t{\n\t\txml_node result = insert_child_before(node_element, node);\n\n\t\tresult.set_name(name_);\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN xml_node xml_node::append_copy(const xml_node& proto)\n\t{\n\t\txml_node_type type_ = proto.type();\n\t\tif (!impl::allow_insert_child(type(), type_)) return xml_node();\n\n\t\txml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n\t\tif (!n) return xml_node();\n\n\t\timpl::append_node(n._root, _root);\n\t\timpl::node_copy_tree(n._root, proto._root);\n\n\t\treturn n;\n\t}\n\n\tPUGI__FN xml_node xml_node::prepend_copy(const xml_node& proto)\n\t{\n\t\txml_node_type type_ = proto.type();\n\t\tif (!impl::allow_insert_child(type(), type_)) return xml_node();\n\n\t\txml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n\t\tif (!n) return xml_node();\n\n\t\timpl::prepend_node(n._root, _root);\n\t\timpl::node_copy_tree(n._root, proto._root);\n\n\t\treturn n;\n\t}\n\n\tPUGI__FN xml_node xml_node::insert_copy_after(const xml_node& proto, const xml_node& node)\n\t{\n\t\txml_node_type type_ = proto.type();\n\t\tif (!impl::allow_insert_child(type(), type_)) return xml_node();\n\t\tif (!node._root || node._root->parent != _root) return xml_node();\n\n\t\txml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n\t\tif (!n) return xml_node();\n\n\t\timpl::insert_node_after(n._root, node._root);\n\t\timpl::node_copy_tree(n._root, proto._root);\n\n\t\treturn n;\n\t}\n\n\tPUGI__FN xml_node xml_node::insert_copy_before(const xml_node& proto, const xml_node& node)\n\t{\n\t\txml_node_type type_ = proto.type();\n\t\tif (!impl::allow_insert_child(type(), type_)) return xml_node();\n\t\tif (!node._root || node._root->parent != _root) return xml_node();\n\n\t\txml_node n(impl::allocate_node(impl::get_allocator(_root), type_));\n\t\tif (!n) return xml_node();\n\n\t\timpl::insert_node_before(n._root, node._root);\n\t\timpl::node_copy_tree(n._root, proto._root);\n\n\t\treturn n;\n\t}\n\n\tPUGI__FN xml_node xml_node::append_move(const xml_node& moved)\n\t{\n\t\tif (!impl::allow_move(*this, moved)) return xml_node();\n\n\t\t// disable document_buffer_order optimization since moving nodes around changes document order without changing buffer pointers\n\t\timpl::get_document(_root).header |= impl::xml_memory_page_contents_shared_mask;\n\n\t\timpl::remove_node(moved._root);\n\t\timpl::append_node(moved._root, _root);\n\n\t\treturn moved;\n\t}\n\n\tPUGI__FN xml_node xml_node::prepend_move(const xml_node& moved)\n\t{\n\t\tif (!impl::allow_move(*this, moved)) return xml_node();\n\n\t\t// disable document_buffer_order optimization since moving nodes around changes document order without changing buffer pointers\n\t\timpl::get_document(_root).header |= impl::xml_memory_page_contents_shared_mask;\n\n\t\timpl::remove_node(moved._root);\n\t\timpl::prepend_node(moved._root, _root);\n\n\t\treturn moved;\n\t}\n\n\tPUGI__FN xml_node xml_node::insert_move_after(const xml_node& moved, const xml_node& node)\n\t{\n\t\tif (!impl::allow_move(*this, moved)) return xml_node();\n\t\tif (!node._root || node._root->parent != _root) return xml_node();\n\t\tif (moved._root == node._root) return xml_node();\n\n\t\t// disable document_buffer_order optimization since moving nodes around changes document order without changing buffer pointers\n\t\timpl::get_document(_root).header |= impl::xml_memory_page_contents_shared_mask;\n\n\t\timpl::remove_node(moved._root);\n\t\timpl::insert_node_after(moved._root, node._root);\n\n\t\treturn moved;\n\t}\n\n\tPUGI__FN xml_node xml_node::insert_move_before(const xml_node& moved, const xml_node& node)\n\t{\n\t\tif (!impl::allow_move(*this, moved)) return xml_node();\n\t\tif (!node._root || node._root->parent != _root) return xml_node();\n\t\tif (moved._root == node._root) return xml_node();\n\n\t\t// disable document_buffer_order optimization since moving nodes around changes document order without changing buffer pointers\n\t\timpl::get_document(_root).header |= impl::xml_memory_page_contents_shared_mask;\n\n\t\timpl::remove_node(moved._root);\n\t\timpl::insert_node_before(moved._root, node._root);\n\n\t\treturn moved;\n\t}\n\n\tPUGI__FN bool xml_node::remove_attribute(const char_t* name_)\n\t{\n\t\treturn remove_attribute(attribute(name_));\n\t}\n\n\tPUGI__FN bool xml_node::remove_attribute(const xml_attribute& a)\n\t{\n\t\tif (!_root || !a._attr) return false;\n\t\tif (!impl::is_attribute_of(a._attr, _root)) return false;\n\n\t\timpl::remove_attribute(a._attr, _root);\n\t\timpl::destroy_attribute(a._attr, impl::get_allocator(_root));\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool xml_node::remove_child(const char_t* name_)\n\t{\n\t\treturn remove_child(child(name_));\n\t}\n\n\tPUGI__FN bool xml_node::remove_child(const xml_node& n)\n\t{\n\t\tif (!_root || !n._root || n._root->parent != _root) return false;\n\n\t\timpl::remove_node(n._root);\n\t\timpl::destroy_node(n._root, impl::get_allocator(_root));\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN xml_parse_result xml_node::append_buffer(const void* contents, size_t size, unsigned int options, xml_encoding encoding)\n\t{\n\t\t// append_buffer is only valid for elements/documents\n\t\tif (!impl::allow_insert_child(type(), node_element)) return impl::make_parse_result(status_append_invalid_root);\n\n\t\t// get document node\n\t\timpl::xml_document_struct* doc = &impl::get_document(_root);\n\n\t\t// disable document_buffer_order optimization since in a document with multiple buffers comparing buffer pointers does not make sense\n\t\tdoc->header |= impl::xml_memory_page_contents_shared_mask;\n\t\t\n\t\t// get extra buffer element (we'll store the document fragment buffer there so that we can deallocate it later)\n\t\timpl::xml_memory_page* page = 0;\n\t\timpl::xml_extra_buffer* extra = static_cast<impl::xml_extra_buffer*>(doc->allocate_memory(sizeof(impl::xml_extra_buffer), page));\n\t\t(void)page;\n\n\t\tif (!extra) return impl::make_parse_result(status_out_of_memory);\n\n\t\t// save name; name of the root has to be NULL before parsing - otherwise closing node mismatches will not be detected at the top level\n\t\tchar_t* rootname = _root->name;\n\t\t_root->name = 0;\n\n\t\t// parse\n\t\tchar_t* buffer = 0;\n\t\txml_parse_result res = impl::load_buffer_impl(doc, _root, const_cast<void*>(contents), size, options, encoding, false, false, &buffer);\n\n\t\t// restore name\n\t\t_root->name = rootname;\n\n\t\t// add extra buffer to the list\n\t\textra->buffer = buffer;\n\t\textra->next = doc->extra_buffers;\n\t\tdoc->extra_buffers = extra;\n\n\t\treturn res;\n\t}\n\n\tPUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* name_, const char_t* attr_name, const char_t* attr_value) const\n\t{\n\t\tif (!_root) return xml_node();\n\t\t\n\t\tfor (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n\t\t\tif (i->name && impl::strequal(name_, i->name))\n\t\t\t{\n\t\t\t\tfor (xml_attribute_struct* a = i->first_attribute; a; a = a->next_attribute)\n\t\t\t\t\tif (a->name && impl::strequal(attr_name, a->name) && impl::strequal(attr_value, a->value ? a->value : PUGIXML_TEXT(\"\")))\n\t\t\t\t\t\treturn xml_node(i);\n\t\t\t}\n\n\t\treturn xml_node();\n\t}\n\n\tPUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const\n\t{\n\t\tif (!_root) return xml_node();\n\t\t\n\t\tfor (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n\t\t\tfor (xml_attribute_struct* a = i->first_attribute; a; a = a->next_attribute)\n\t\t\t\tif (a->name && impl::strequal(attr_name, a->name) && impl::strequal(attr_value, a->value ? a->value : PUGIXML_TEXT(\"\")))\n\t\t\t\t\treturn xml_node(i);\n\n\t\treturn xml_node();\n\t}\n\n#ifndef PUGIXML_NO_STL\n\tPUGI__FN string_t xml_node::path(char_t delimiter) const\n\t{\n\t\txml_node cursor = *this; // Make a copy.\n\t\t\n\t\tstring_t result = cursor.name();\n\n\t\twhile (cursor.parent())\n\t\t{\n\t\t\tcursor = cursor.parent();\n\t\t\t\n\t\t\tstring_t temp = cursor.name();\n\t\t\ttemp += delimiter;\n\t\t\ttemp += result;\n\t\t\tresult.swap(temp);\n\t\t}\n\n\t\treturn result;\n\t}\n#endif\n\n\tPUGI__FN xml_node xml_node::first_element_by_path(const char_t* path_, char_t delimiter) const\n\t{\n\t\txml_node found = *this; // Current search context.\n\n\t\tif (!_root || !path_ || !path_[0]) return found;\n\n\t\tif (path_[0] == delimiter)\n\t\t{\n\t\t\t// Absolute path; e.g. '/foo/bar'\n\t\t\tfound = found.root();\n\t\t\t++path_;\n\t\t}\n\n\t\tconst char_t* path_segment = path_;\n\n\t\twhile (*path_segment == delimiter) ++path_segment;\n\n\t\tconst char_t* path_segment_end = path_segment;\n\n\t\twhile (*path_segment_end && *path_segment_end != delimiter) ++path_segment_end;\n\n\t\tif (path_segment == path_segment_end) return found;\n\n\t\tconst char_t* next_segment = path_segment_end;\n\n\t\twhile (*next_segment == delimiter) ++next_segment;\n\n\t\tif (*path_segment == '.' && path_segment + 1 == path_segment_end)\n\t\t\treturn found.first_element_by_path(next_segment, delimiter);\n\t\telse if (*path_segment == '.' && *(path_segment+1) == '.' && path_segment + 2 == path_segment_end)\n\t\t\treturn found.parent().first_element_by_path(next_segment, delimiter);\n\t\telse\n\t\t{\n\t\t\tfor (xml_node_struct* j = found._root->first_child; j; j = j->next_sibling)\n\t\t\t{\n\t\t\t\tif (j->name && impl::strequalrange(j->name, path_segment, static_cast<size_t>(path_segment_end - path_segment)))\n\t\t\t\t{\n\t\t\t\t\txml_node subsearch = xml_node(j).first_element_by_path(next_segment, delimiter);\n\n\t\t\t\t\tif (subsearch) return subsearch;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn xml_node();\n\t\t}\n\t}\n\n\tPUGI__FN bool xml_node::traverse(xml_tree_walker& walker)\n\t{\n\t\twalker._depth = -1;\n\t\t\n\t\txml_node arg_begin = *this;\n\t\tif (!walker.begin(arg_begin)) return false;\n\n\t\txml_node cur = first_child();\n\t\t\t\t\n\t\tif (cur)\n\t\t{\n\t\t\t++walker._depth;\n\n\t\t\tdo \n\t\t\t{\n\t\t\t\txml_node arg_for_each = cur;\n\t\t\t\tif (!walker.for_each(arg_for_each))\n\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\tif (cur.first_child())\n\t\t\t\t{\n\t\t\t\t\t++walker._depth;\n\t\t\t\t\tcur = cur.first_child();\n\t\t\t\t}\n\t\t\t\telse if (cur.next_sibling())\n\t\t\t\t\tcur = cur.next_sibling();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Borland C++ workaround\n\t\t\t\t\twhile (!cur.next_sibling() && cur != *this && !cur.parent().empty())\n\t\t\t\t\t{\n\t\t\t\t\t\t--walker._depth;\n\t\t\t\t\t\tcur = cur.parent();\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tif (cur != *this)\n\t\t\t\t\t\tcur = cur.next_sibling();\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (cur && cur != *this);\n\t\t}\n\n\t\tassert(walker._depth == -1);\n\n\t\txml_node arg_end = *this;\n\t\treturn walker.end(arg_end);\n\t}\n\n\tPUGI__FN size_t xml_node::hash_value() const\n\t{\n\t\treturn static_cast<size_t>(reinterpret_cast<uintptr_t>(_root) / sizeof(xml_node_struct));\n\t}\n\n\tPUGI__FN xml_node_struct* xml_node::internal_object() const\n\t{\n\t\treturn _root;\n\t}\n\n\tPUGI__FN void xml_node::print(xml_writer& writer, const char_t* indent, unsigned int flags, xml_encoding encoding, unsigned int depth) const\n\t{\n\t\tif (!_root) return;\n\n\t\timpl::xml_buffered_writer buffered_writer(writer, encoding);\n\n\t\timpl::node_output(buffered_writer, _root, indent, flags, depth);\n\t}\n\n#ifndef PUGIXML_NO_STL\n\tPUGI__FN void xml_node::print(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent, unsigned int flags, xml_encoding encoding, unsigned int depth) const\n\t{\n\t\txml_writer_stream writer(stream);\n\n\t\tprint(writer, indent, flags, encoding, depth);\n\t}\n\n\tPUGI__FN void xml_node::print(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent, unsigned int flags, unsigned int depth) const\n\t{\n\t\txml_writer_stream writer(stream);\n\n\t\tprint(writer, indent, flags, encoding_wchar, depth);\n\t}\n#endif\n\n\tPUGI__FN ptrdiff_t xml_node::offset_debug() const\n\t{\n\t\tif (!_root) return -1;\n\n\t\timpl::xml_document_struct& doc = impl::get_document(_root);\n\n\t\t// we can determine the offset reliably only if there is exactly once parse buffer\n\t\tif (!doc.buffer || doc.extra_buffers) return -1;\n\n\t\tswitch (type())\n\t\t{\n\t\tcase node_document:\n\t\t\treturn 0;\n\n\t\tcase node_element:\n\t\tcase node_declaration:\n\t\tcase node_pi:\n\t\t\treturn _root->name && (_root->header & impl::xml_memory_page_name_allocated_or_shared_mask) == 0 ? _root->name - doc.buffer : -1;\n\n\t\tcase node_pcdata:\n\t\tcase node_cdata:\n\t\tcase node_comment:\n\t\tcase node_doctype:\n\t\t\treturn _root->value && (_root->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0 ? _root->value - doc.buffer : -1;\n\n\t\tdefault:\n\t\t\treturn -1;\n\t\t}\n\t}\n\n#ifdef __BORLANDC__\n\tPUGI__FN bool operator&&(const xml_node& lhs, bool rhs)\n\t{\n\t\treturn (bool)lhs && rhs;\n\t}\n\n\tPUGI__FN bool operator||(const xml_node& lhs, bool rhs)\n\t{\n\t\treturn (bool)lhs || rhs;\n\t}\n#endif\n\n\tPUGI__FN xml_text::xml_text(xml_node_struct* root): _root(root)\n\t{\n\t}\n\n\tPUGI__FN xml_node_struct* xml_text::_data() const\n\t{\n\t\tif (!_root || impl::is_text_node(_root)) return _root;\n\n\t\tfor (xml_node_struct* node = _root->first_child; node; node = node->next_sibling)\n\t\t\tif (impl::is_text_node(node))\n\t\t\t\treturn node;\n\n\t\treturn 0;\n\t}\n\n\tPUGI__FN xml_node_struct* xml_text::_data_new()\n\t{\n\t\txml_node_struct* d = _data();\n\t\tif (d) return d;\n\n\t\treturn xml_node(_root).append_child(node_pcdata).internal_object();\n\t}\n\n\tPUGI__FN xml_text::xml_text(): _root(0)\n\t{\n\t}\n\n\tPUGI__FN static void unspecified_bool_xml_text(xml_text***)\n\t{\n\t}\n\n\tPUGI__FN xml_text::operator xml_text::unspecified_bool_type() const\n\t{\n\t\treturn _data() ? unspecified_bool_xml_text : 0;\n\t}\n\n\tPUGI__FN bool xml_text::operator!() const\n\t{\n\t\treturn !_data();\n\t}\n\n\tPUGI__FN bool xml_text::empty() const\n\t{\n\t\treturn _data() == 0;\n\t}\n\n\tPUGI__FN const char_t* xml_text::get() const\n\t{\n\t\txml_node_struct* d = _data();\n\n\t\treturn (d && d->value) ? d->value : PUGIXML_TEXT(\"\");\n\t}\n\n\tPUGI__FN const char_t* xml_text::as_string(const char_t* def) const\n\t{\n\t\txml_node_struct* d = _data();\n\n\t\treturn (d && d->value) ? d->value : def;\n\t}\n\n\tPUGI__FN int xml_text::as_int(int def) const\n\t{\n\t\txml_node_struct* d = _data();\n\n\t\treturn impl::get_value_int(d ? d->value : 0, def);\n\t}\n\n\tPUGI__FN unsigned int xml_text::as_uint(unsigned int def) const\n\t{\n\t\txml_node_struct* d = _data();\n\n\t\treturn impl::get_value_uint(d ? d->value : 0, def);\n\t}\n\n\tPUGI__FN double xml_text::as_double(double def) const\n\t{\n\t\txml_node_struct* d = _data();\n\n\t\treturn impl::get_value_double(d ? d->value : 0, def);\n\t}\n\n\tPUGI__FN float xml_text::as_float(float def) const\n\t{\n\t\txml_node_struct* d = _data();\n\n\t\treturn impl::get_value_float(d ? d->value : 0, def);\n\t}\n\n\tPUGI__FN bool xml_text::as_bool(bool def) const\n\t{\n\t\txml_node_struct* d = _data();\n\n\t\treturn impl::get_value_bool(d ? d->value : 0, def);\n\t}\n\n#ifdef PUGIXML_HAS_LONG_LONG\n\tPUGI__FN long long xml_text::as_llong(long long def) const\n\t{\n\t\txml_node_struct* d = _data();\n\n\t\treturn impl::get_value_llong(d ? d->value : 0, def);\n\t}\n\n\tPUGI__FN unsigned long long xml_text::as_ullong(unsigned long long def) const\n\t{\n\t\txml_node_struct* d = _data();\n\n\t\treturn impl::get_value_ullong(d ? d->value : 0, def);\n\t}\n#endif\n\n\tPUGI__FN bool xml_text::set(const char_t* rhs)\n\t{\n\t\txml_node_struct* dn = _data_new();\n\n\t\treturn dn ? impl::strcpy_insitu(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n\t}\n\n\tPUGI__FN bool xml_text::set(int rhs)\n\t{\n\t\txml_node_struct* dn = _data_new();\n\n\t\treturn dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n\t}\n\n\tPUGI__FN bool xml_text::set(unsigned int rhs)\n\t{\n\t\txml_node_struct* dn = _data_new();\n\n\t\treturn dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n\t}\n\n\tPUGI__FN bool xml_text::set(float rhs)\n\t{\n\t\txml_node_struct* dn = _data_new();\n\n\t\treturn dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n\t}\n\n\tPUGI__FN bool xml_text::set(double rhs)\n\t{\n\t\txml_node_struct* dn = _data_new();\n\n\t\treturn dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n\t}\n\n\tPUGI__FN bool xml_text::set(bool rhs)\n\t{\n\t\txml_node_struct* dn = _data_new();\n\n\t\treturn dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n\t}\n\n#ifdef PUGIXML_HAS_LONG_LONG\n\tPUGI__FN bool xml_text::set(long long rhs)\n\t{\n\t\txml_node_struct* dn = _data_new();\n\n\t\treturn dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n\t}\n\n\tPUGI__FN bool xml_text::set(unsigned long long rhs)\n\t{\n\t\txml_node_struct* dn = _data_new();\n\n\t\treturn dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;\n\t}\n#endif\n\n\tPUGI__FN xml_text& xml_text::operator=(const char_t* rhs)\n\t{\n\t\tset(rhs);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_text& xml_text::operator=(int rhs)\n\t{\n\t\tset(rhs);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_text& xml_text::operator=(unsigned int rhs)\n\t{\n\t\tset(rhs);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_text& xml_text::operator=(double rhs)\n\t{\n\t\tset(rhs);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_text& xml_text::operator=(float rhs)\n\t{\n\t\tset(rhs);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_text& xml_text::operator=(bool rhs)\n\t{\n\t\tset(rhs);\n\t\treturn *this;\n\t}\n\n#ifdef PUGIXML_HAS_LONG_LONG\n\tPUGI__FN xml_text& xml_text::operator=(long long rhs)\n\t{\n\t\tset(rhs);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_text& xml_text::operator=(unsigned long long rhs)\n\t{\n\t\tset(rhs);\n\t\treturn *this;\n\t}\n#endif\n\n\tPUGI__FN xml_node xml_text::data() const\n\t{\n\t\treturn xml_node(_data());\n\t}\n\n#ifdef __BORLANDC__\n\tPUGI__FN bool operator&&(const xml_text& lhs, bool rhs)\n\t{\n\t\treturn (bool)lhs && rhs;\n\t}\n\n\tPUGI__FN bool operator||(const xml_text& lhs, bool rhs)\n\t{\n\t\treturn (bool)lhs || rhs;\n\t}\n#endif\n\n\tPUGI__FN xml_node_iterator::xml_node_iterator()\n\t{\n\t}\n\n\tPUGI__FN xml_node_iterator::xml_node_iterator(const xml_node& node): _wrap(node), _parent(node.parent())\n\t{\n\t}\n\n\tPUGI__FN xml_node_iterator::xml_node_iterator(xml_node_struct* ref, xml_node_struct* parent): _wrap(ref), _parent(parent)\n\t{\n\t}\n\n\tPUGI__FN bool xml_node_iterator::operator==(const xml_node_iterator& rhs) const\n\t{\n\t\treturn _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root;\n\t}\n\t\n\tPUGI__FN bool xml_node_iterator::operator!=(const xml_node_iterator& rhs) const\n\t{\n\t\treturn _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root;\n\t}\n\n\tPUGI__FN xml_node& xml_node_iterator::operator*() const\n\t{\n\t\tassert(_wrap._root);\n\t\treturn _wrap;\n\t}\n\n\tPUGI__FN xml_node* xml_node_iterator::operator->() const\n\t{\n\t\tassert(_wrap._root);\n\t\treturn const_cast<xml_node*>(&_wrap); // BCC32 workaround\n\t}\n\n\tPUGI__FN const xml_node_iterator& xml_node_iterator::operator++()\n\t{\n\t\tassert(_wrap._root);\n\t\t_wrap._root = _wrap._root->next_sibling;\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_node_iterator xml_node_iterator::operator++(int)\n\t{\n\t\txml_node_iterator temp = *this;\n\t\t++*this;\n\t\treturn temp;\n\t}\n\n\tPUGI__FN const xml_node_iterator& xml_node_iterator::operator--()\n\t{\n\t\t_wrap = _wrap._root ? _wrap.previous_sibling() : _parent.last_child();\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_node_iterator xml_node_iterator::operator--(int)\n\t{\n\t\txml_node_iterator temp = *this;\n\t\t--*this;\n\t\treturn temp;\n\t}\n\n\tPUGI__FN xml_attribute_iterator::xml_attribute_iterator()\n\t{\n\t}\n\n\tPUGI__FN xml_attribute_iterator::xml_attribute_iterator(const xml_attribute& attr, const xml_node& parent): _wrap(attr), _parent(parent)\n\t{\n\t}\n\n\tPUGI__FN xml_attribute_iterator::xml_attribute_iterator(xml_attribute_struct* ref, xml_node_struct* parent): _wrap(ref), _parent(parent)\n\t{\n\t}\n\n\tPUGI__FN bool xml_attribute_iterator::operator==(const xml_attribute_iterator& rhs) const\n\t{\n\t\treturn _wrap._attr == rhs._wrap._attr && _parent._root == rhs._parent._root;\n\t}\n\t\n\tPUGI__FN bool xml_attribute_iterator::operator!=(const xml_attribute_iterator& rhs) const\n\t{\n\t\treturn _wrap._attr != rhs._wrap._attr || _parent._root != rhs._parent._root;\n\t}\n\n\tPUGI__FN xml_attribute& xml_attribute_iterator::operator*() const\n\t{\n\t\tassert(_wrap._attr);\n\t\treturn _wrap;\n\t}\n\n\tPUGI__FN xml_attribute* xml_attribute_iterator::operator->() const\n\t{\n\t\tassert(_wrap._attr);\n\t\treturn const_cast<xml_attribute*>(&_wrap); // BCC32 workaround\n\t}\n\n\tPUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator++()\n\t{\n\t\tassert(_wrap._attr);\n\t\t_wrap._attr = _wrap._attr->next_attribute;\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_attribute_iterator xml_attribute_iterator::operator++(int)\n\t{\n\t\txml_attribute_iterator temp = *this;\n\t\t++*this;\n\t\treturn temp;\n\t}\n\n\tPUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator--()\n\t{\n\t\t_wrap = _wrap._attr ? _wrap.previous_attribute() : _parent.last_attribute();\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_attribute_iterator xml_attribute_iterator::operator--(int)\n\t{\n\t\txml_attribute_iterator temp = *this;\n\t\t--*this;\n\t\treturn temp;\n\t}\n\n\tPUGI__FN xml_named_node_iterator::xml_named_node_iterator(): _name(0)\n\t{\n\t}\n\n\tPUGI__FN xml_named_node_iterator::xml_named_node_iterator(const xml_node& node, const char_t* name): _wrap(node), _parent(node.parent()), _name(name)\n\t{\n\t}\n\n\tPUGI__FN xml_named_node_iterator::xml_named_node_iterator(xml_node_struct* ref, xml_node_struct* parent, const char_t* name): _wrap(ref), _parent(parent), _name(name)\n\t{\n\t}\n\n\tPUGI__FN bool xml_named_node_iterator::operator==(const xml_named_node_iterator& rhs) const\n\t{\n\t\treturn _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root;\n\t}\n\n\tPUGI__FN bool xml_named_node_iterator::operator!=(const xml_named_node_iterator& rhs) const\n\t{\n\t\treturn _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root;\n\t}\n\n\tPUGI__FN xml_node& xml_named_node_iterator::operator*() const\n\t{\n\t\tassert(_wrap._root);\n\t\treturn _wrap;\n\t}\n\n\tPUGI__FN xml_node* xml_named_node_iterator::operator->() const\n\t{\n\t\tassert(_wrap._root);\n\t\treturn const_cast<xml_node*>(&_wrap); // BCC32 workaround\n\t}\n\n\tPUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator++()\n\t{\n\t\tassert(_wrap._root);\n\t\t_wrap = _wrap.next_sibling(_name);\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_named_node_iterator xml_named_node_iterator::operator++(int)\n\t{\n\t\txml_named_node_iterator temp = *this;\n\t\t++*this;\n\t\treturn temp;\n\t}\n\n\tPUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator--()\n\t{\n\t\tif (_wrap._root)\n\t\t\t_wrap = _wrap.previous_sibling(_name);\n\t\telse\n\t\t{\n\t\t\t_wrap = _parent.last_child();\n\n\t\t\tif (!impl::strequal(_wrap.name(), _name))\n\t\t\t\t_wrap = _wrap.previous_sibling(_name);\n\t\t}\n\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xml_named_node_iterator xml_named_node_iterator::operator--(int)\n\t{\n\t\txml_named_node_iterator temp = *this;\n\t\t--*this;\n\t\treturn temp;\n\t}\n\n\tPUGI__FN xml_parse_result::xml_parse_result(): status(status_internal_error), offset(0), encoding(encoding_auto)\n\t{\n\t}\n\n\tPUGI__FN xml_parse_result::operator bool() const\n\t{\n\t\treturn status == status_ok;\n\t}\n\n\tPUGI__FN const char* xml_parse_result::description() const\n\t{\n\t\tswitch (status)\n\t\t{\n\t\tcase status_ok: return \"No error\";\n\n\t\tcase status_file_not_found: return \"File was not found\";\n\t\tcase status_io_error: return \"Error reading from file/stream\";\n\t\tcase status_out_of_memory: return \"Could not allocate memory\";\n\t\tcase status_internal_error: return \"Internal error occurred\";\n\n\t\tcase status_unrecognized_tag: return \"Could not determine tag type\";\n\n\t\tcase status_bad_pi: return \"Error parsing document declaration/processing instruction\";\n\t\tcase status_bad_comment: return \"Error parsing comment\";\n\t\tcase status_bad_cdata: return \"Error parsing CDATA section\";\n\t\tcase status_bad_doctype: return \"Error parsing document type declaration\";\n\t\tcase status_bad_pcdata: return \"Error parsing PCDATA section\";\n\t\tcase status_bad_start_element: return \"Error parsing start element tag\";\n\t\tcase status_bad_attribute: return \"Error parsing element attribute\";\n\t\tcase status_bad_end_element: return \"Error parsing end element tag\";\n\t\tcase status_end_element_mismatch: return \"Start-end tags mismatch\";\n\n\t\tcase status_append_invalid_root: return \"Unable to append nodes: root is not an element or document\";\n\n\t\tcase status_no_document_element: return \"No document element found\";\n\n\t\tdefault: return \"Unknown error\";\n\t\t}\n\t}\n\n\tPUGI__FN xml_document::xml_document(): _buffer(0)\n\t{\n\t\tcreate();\n\t}\n\n\tPUGI__FN xml_document::~xml_document()\n\t{\n\t\tdestroy();\n\t}\n\n\tPUGI__FN void xml_document::reset()\n\t{\n\t\tdestroy();\n\t\tcreate();\n\t}\n\n\tPUGI__FN void xml_document::reset(const xml_document& proto)\n\t{\n\t\treset();\n\n\t\tfor (xml_node cur = proto.first_child(); cur; cur = cur.next_sibling())\n\t\t\tappend_copy(cur);\n\t}\n\n\tPUGI__FN void xml_document::create()\n\t{\n\t\tassert(!_root);\n\n\t\t// initialize sentinel page\n\t\tPUGI__STATIC_ASSERT(sizeof(impl::xml_memory_page) + sizeof(impl::xml_document_struct) + impl::xml_memory_page_alignment - sizeof(void*) <= sizeof(_memory));\n\n\t\t// align upwards to page boundary\n\t\tvoid* page_memory = reinterpret_cast<void*>((reinterpret_cast<uintptr_t>(_memory) + (impl::xml_memory_page_alignment - 1)) & ~(impl::xml_memory_page_alignment - 1));\n\n\t\t// prepare page structure\n\t\timpl::xml_memory_page* page = impl::xml_memory_page::construct(page_memory);\n\t\tassert(page);\n\n\t\tpage->busy_size = impl::xml_memory_page_size;\n\n\t\t// allocate new root\n\t\t_root = new (reinterpret_cast<char*>(page) + sizeof(impl::xml_memory_page)) impl::xml_document_struct(page);\n\t\t_root->prev_sibling_c = _root;\n\n\t\t// setup sentinel page\n\t\tpage->allocator = static_cast<impl::xml_document_struct*>(_root);\n\n\t\t// verify the document allocation\n\t\tassert(reinterpret_cast<char*>(_root) + sizeof(impl::xml_document_struct) <= _memory + sizeof(_memory));\n\t}\n\n\tPUGI__FN void xml_document::destroy()\n\t{\n\t\tassert(_root);\n\n\t\t// destroy static storage\n\t\tif (_buffer)\n\t\t{\n\t\t\timpl::xml_memory::deallocate(_buffer);\n\t\t\t_buffer = 0;\n\t\t}\n\n\t\t// destroy extra buffers (note: no need to destroy linked list nodes, they're allocated using document allocator)\n\t\tfor (impl::xml_extra_buffer* extra = static_cast<impl::xml_document_struct*>(_root)->extra_buffers; extra; extra = extra->next)\n\t\t{\n\t\t\tif (extra->buffer) impl::xml_memory::deallocate(extra->buffer);\n\t\t}\n\n\t\t// destroy dynamic storage, leave sentinel page (it's in static memory)\n\t\timpl::xml_memory_page* root_page = reinterpret_cast<impl::xml_memory_page*>(_root->header & impl::xml_memory_page_pointer_mask);\n\t\tassert(root_page && !root_page->prev);\n\t\tassert(reinterpret_cast<char*>(root_page) >= _memory && reinterpret_cast<char*>(root_page) < _memory + sizeof(_memory));\n\n\t\tfor (impl::xml_memory_page* page = root_page->next; page; )\n\t\t{\n\t\t\timpl::xml_memory_page* next = page->next;\n\n\t\t\timpl::xml_allocator::deallocate_page(page);\n\n\t\t\tpage = next;\n\t\t}\n\n\t\t_root = 0;\n\t}\n\n#ifndef PUGIXML_NO_STL\n\tPUGI__FN xml_parse_result xml_document::load(std::basic_istream<char, std::char_traits<char> >& stream, unsigned int options, xml_encoding encoding)\n\t{\n\t\treset();\n\n\t\treturn impl::load_stream_impl(*this, stream, options, encoding);\n\t}\n\n\tPUGI__FN xml_parse_result xml_document::load(std::basic_istream<wchar_t, std::char_traits<wchar_t> >& stream, unsigned int options)\n\t{\n\t\treset();\n\n\t\treturn impl::load_stream_impl(*this, stream, options, encoding_wchar);\n\t}\n#endif\n\n\tPUGI__FN xml_parse_result xml_document::load_string(const char_t* contents, unsigned int options)\n\t{\n\t\t// Force native encoding (skip autodetection)\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\txml_encoding encoding = encoding_wchar;\n\t#else\n\t\txml_encoding encoding = encoding_utf8;\n\t#endif\n\n\t\treturn load_buffer(contents, impl::strlength(contents) * sizeof(char_t), options, encoding);\n\t}\n\n\tPUGI__FN xml_parse_result xml_document::load(const char_t* contents, unsigned int options)\n\t{\n\t\treturn load_string(contents, options);\n\t}\n\n\tPUGI__FN xml_parse_result xml_document::load_file(const char* path_, unsigned int options, xml_encoding encoding)\n\t{\n\t\treset();\n\n\t\tFILE* file = fopen(path_, \"rb\");\n\n\t\treturn impl::load_file_impl(*this, file, options, encoding);\n\t}\n\n\tPUGI__FN xml_parse_result xml_document::load_file(const wchar_t* path_, unsigned int options, xml_encoding encoding)\n\t{\n\t\treset();\n\n\t\tFILE* file = impl::open_file_wide(path_, L\"rb\");\n\n\t\treturn impl::load_file_impl(*this, file, options, encoding);\n\t}\n\n\tPUGI__FN xml_parse_result xml_document::load_buffer(const void* contents, size_t size, unsigned int options, xml_encoding encoding)\n\t{\n\t\treset();\n\n\t\treturn impl::load_buffer_impl(static_cast<impl::xml_document_struct*>(_root), _root, const_cast<void*>(contents), size, options, encoding, false, false, &_buffer);\n\t}\n\n\tPUGI__FN xml_parse_result xml_document::load_buffer_inplace(void* contents, size_t size, unsigned int options, xml_encoding encoding)\n\t{\n\t\treset();\n\n\t\treturn impl::load_buffer_impl(static_cast<impl::xml_document_struct*>(_root), _root, contents, size, options, encoding, true, false, &_buffer);\n\t}\n\n\tPUGI__FN xml_parse_result xml_document::load_buffer_inplace_own(void* contents, size_t size, unsigned int options, xml_encoding encoding)\n\t{\n\t\treset();\n\n\t\treturn impl::load_buffer_impl(static_cast<impl::xml_document_struct*>(_root), _root, contents, size, options, encoding, true, true, &_buffer);\n\t}\n\n\tPUGI__FN void xml_document::save(xml_writer& writer, const char_t* indent, unsigned int flags, xml_encoding encoding) const\n\t{\n\t\timpl::xml_buffered_writer buffered_writer(writer, encoding);\n\n\t\tif ((flags & format_write_bom) && encoding != encoding_latin1)\n\t\t{\n\t\t\t// BOM always represents the codepoint U+FEFF, so just write it in native encoding\n\t\t#ifdef PUGIXML_WCHAR_MODE\n\t\t\tunsigned int bom = 0xfeff;\n\t\t\tbuffered_writer.write(static_cast<wchar_t>(bom));\n\t\t#else\n\t\t\tbuffered_writer.write('\\xef', '\\xbb', '\\xbf');\n\t\t#endif\n\t\t}\n\n\t\tif (!(flags & format_no_declaration) && !impl::has_declaration(_root))\n\t\t{\n\t\t\tbuffered_writer.write_string(PUGIXML_TEXT(\"<?xml version=\\\"1.0\\\"\"));\n\t\t\tif (encoding == encoding_latin1) buffered_writer.write_string(PUGIXML_TEXT(\" encoding=\\\"ISO-8859-1\\\"\"));\n\t\t\tbuffered_writer.write('?', '>');\n\t\t\tif (!(flags & format_raw)) buffered_writer.write('\\n');\n\t\t}\n\n\t\timpl::node_output(buffered_writer, _root, indent, flags, 0);\n\t}\n\n#ifndef PUGIXML_NO_STL\n\tPUGI__FN void xml_document::save(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent, unsigned int flags, xml_encoding encoding) const\n\t{\n\t\txml_writer_stream writer(stream);\n\n\t\tsave(writer, indent, flags, encoding);\n\t}\n\n\tPUGI__FN void xml_document::save(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent, unsigned int flags) const\n\t{\n\t\txml_writer_stream writer(stream);\n\n\t\tsave(writer, indent, flags, encoding_wchar);\n\t}\n#endif\n\n\tPUGI__FN bool xml_document::save_file(const char* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const\n\t{\n\t\tFILE* file = fopen(path_, (flags & format_save_file_text) ? \"w\" : \"wb\");\n\t\treturn impl::save_file_impl(*this, file, indent, flags, encoding);\n\t}\n\n\tPUGI__FN bool xml_document::save_file(const wchar_t* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const\n\t{\n\t\tFILE* file = impl::open_file_wide(path_, (flags & format_save_file_text) ? L\"w\" : L\"wb\");\n\t\treturn impl::save_file_impl(*this, file, indent, flags, encoding);\n\t}\n\n\tPUGI__FN xml_node xml_document::document_element() const\n\t{\n\t\tassert(_root);\n\n\t\tfor (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)\n\t\t\tif (PUGI__NODETYPE(i) == node_element)\n\t\t\t\treturn xml_node(i);\n\n\t\treturn xml_node();\n\t}\n\n#ifndef PUGIXML_NO_STL\n\tPUGI__FN std::string PUGIXML_FUNCTION as_utf8(const wchar_t* str)\n\t{\n\t\tassert(str);\n\n\t\treturn impl::as_utf8_impl(str, impl::strlength_wide(str));\n\t}\n\n\tPUGI__FN std::string PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t>& str)\n\t{\n\t\treturn impl::as_utf8_impl(str.c_str(), str.size());\n\t}\n\t\n\tPUGI__FN std::basic_string<wchar_t> PUGIXML_FUNCTION as_wide(const char* str)\n\t{\n\t\tassert(str);\n\n\t\treturn impl::as_wide_impl(str, strlen(str));\n\t}\n\t\n\tPUGI__FN std::basic_string<wchar_t> PUGIXML_FUNCTION as_wide(const std::string& str)\n\t{\n\t\treturn impl::as_wide_impl(str.c_str(), str.size());\n\t}\n#endif\n\n\tPUGI__FN void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate)\n\t{\n\t\timpl::xml_memory::allocate = allocate;\n\t\timpl::xml_memory::deallocate = deallocate;\n\t}\n\n\tPUGI__FN allocation_function PUGIXML_FUNCTION get_memory_allocation_function()\n\t{\n\t\treturn impl::xml_memory::allocate;\n\t}\n\n\tPUGI__FN deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()\n\t{\n\t\treturn impl::xml_memory::deallocate;\n\t}\n}\n\n#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))\nnamespace std\n{\n\t// Workarounds for (non-standard) iterator category detection for older versions (MSVC7/IC8 and earlier)\n\tPUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_node_iterator&)\n\t{\n\t\treturn std::bidirectional_iterator_tag();\n\t}\n\n\tPUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_attribute_iterator&)\n\t{\n\t\treturn std::bidirectional_iterator_tag();\n\t}\n\n\tPUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_named_node_iterator&)\n\t{\n\t\treturn std::bidirectional_iterator_tag();\n\t}\n}\n#endif\n\n#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)\nnamespace std\n{\n\t// Workarounds for (non-standard) iterator category detection\n\tPUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_node_iterator&)\n\t{\n\t\treturn std::bidirectional_iterator_tag();\n\t}\n\n\tPUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_attribute_iterator&)\n\t{\n\t\treturn std::bidirectional_iterator_tag();\n\t}\n\n\tPUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_named_node_iterator&)\n\t{\n\t\treturn std::bidirectional_iterator_tag();\n\t}\n}\n#endif\n\n#ifndef PUGIXML_NO_XPATH\n// STL replacements\nPUGI__NS_BEGIN\n\tstruct equal_to\n\t{\n\t\ttemplate <typename T> bool operator()(const T& lhs, const T& rhs) const\n\t\t{\n\t\t\treturn lhs == rhs;\n\t\t}\n\t};\n\n\tstruct not_equal_to\n\t{\n\t\ttemplate <typename T> bool operator()(const T& lhs, const T& rhs) const\n\t\t{\n\t\t\treturn lhs != rhs;\n\t\t}\n\t};\n\n\tstruct less\n\t{\n\t\ttemplate <typename T> bool operator()(const T& lhs, const T& rhs) const\n\t\t{\n\t\t\treturn lhs < rhs;\n\t\t}\n\t};\n\n\tstruct less_equal\n\t{\n\t\ttemplate <typename T> bool operator()(const T& lhs, const T& rhs) const\n\t\t{\n\t\t\treturn lhs <= rhs;\n\t\t}\n\t};\n\n\ttemplate <typename T> void swap(T& lhs, T& rhs)\n\t{\n\t\tT temp = lhs;\n\t\tlhs = rhs;\n\t\trhs = temp;\n\t}\n\n\ttemplate <typename I, typename Pred> I min_element(I begin, I end, const Pred& pred)\n\t{\n\t\tI result = begin;\n\n\t\tfor (I it = begin + 1; it != end; ++it)\n\t\t\tif (pred(*it, *result))\n\t\t\t\tresult = it;\n\n\t\treturn result;\n\t}\n\n\ttemplate <typename I> void reverse(I begin, I end)\n\t{\n\t\twhile (end - begin > 1) swap(*begin++, *--end);\n\t}\n\n\ttemplate <typename I> I unique(I begin, I end)\n\t{\n\t\t// fast skip head\n\t\twhile (end - begin > 1 && *begin != *(begin + 1)) begin++;\n\n\t\tif (begin == end) return begin;\n\n\t\t// last written element\n\t\tI write = begin++; \n\n\t\t// merge unique elements\n\t\twhile (begin != end)\n\t\t{\n\t\t\tif (*begin != *write)\n\t\t\t\t*++write = *begin++;\n\t\t\telse\n\t\t\t\tbegin++;\n\t\t}\n\n\t\t// past-the-end (write points to live element)\n\t\treturn write + 1;\n\t}\n\n\ttemplate <typename I> void copy_backwards(I begin, I end, I target)\n\t{\n\t\twhile (begin != end) *--target = *--end;\n\t}\n\n\ttemplate <typename I, typename Pred, typename T> void insertion_sort(I begin, I end, const Pred& pred, T*)\n\t{\n\t\tassert(begin != end);\n\n\t\tfor (I it = begin + 1; it != end; ++it)\n\t\t{\n\t\t\tT val = *it;\n\n\t\t\tif (pred(val, *begin))\n\t\t\t{\n\t\t\t\t// move to front\n\t\t\t\tcopy_backwards(begin, it, it + 1);\n\t\t\t\t*begin = val;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tI hole = it;\n\n\t\t\t\t// move hole backwards\n\t\t\t\twhile (pred(val, *(hole - 1)))\n\t\t\t\t{\n\t\t\t\t\t*hole = *(hole - 1);\n\t\t\t\t\thole--;\n\t\t\t\t}\n\n\t\t\t\t// fill hole with element\n\t\t\t\t*hole = val;\n\t\t\t}\n\t\t}\n\t}\n\n\t// std variant for elements with ==\n\ttemplate <typename I, typename Pred> void partition(I begin, I middle, I end, const Pred& pred, I* out_eqbeg, I* out_eqend)\n\t{\n\t\tI eqbeg = middle, eqend = middle + 1;\n\n\t\t// expand equal range\n\t\twhile (eqbeg != begin && *(eqbeg - 1) == *eqbeg) --eqbeg;\n\t\twhile (eqend != end && *eqend == *eqbeg) ++eqend;\n\n\t\t// process outer elements\n\t\tI ltend = eqbeg, gtbeg = eqend;\n\n\t\tfor (;;)\n\t\t{\n\t\t\t// find the element from the right side that belongs to the left one\n\t\t\tfor (; gtbeg != end; ++gtbeg)\n\t\t\t\tif (!pred(*eqbeg, *gtbeg))\n\t\t\t\t{\n\t\t\t\t\tif (*gtbeg == *eqbeg) swap(*gtbeg, *eqend++);\n\t\t\t\t\telse break;\n\t\t\t\t}\n\n\t\t\t// find the element from the left side that belongs to the right one\n\t\t\tfor (; ltend != begin; --ltend)\n\t\t\t\tif (!pred(*(ltend - 1), *eqbeg))\n\t\t\t\t{\n\t\t\t\t\tif (*eqbeg == *(ltend - 1)) swap(*(ltend - 1), *--eqbeg);\n\t\t\t\t\telse break;\n\t\t\t\t}\n\n\t\t\t// scanned all elements\n\t\t\tif (gtbeg == end && ltend == begin)\n\t\t\t{\n\t\t\t\t*out_eqbeg = eqbeg;\n\t\t\t\t*out_eqend = eqend;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// make room for elements by moving equal area\n\t\t\tif (gtbeg == end)\n\t\t\t{\n\t\t\t\tif (--ltend != --eqbeg) swap(*ltend, *eqbeg);\n\t\t\t\tswap(*eqbeg, *--eqend);\n\t\t\t}\n\t\t\telse if (ltend == begin)\n\t\t\t{\n\t\t\t\tif (eqend != gtbeg) swap(*eqbeg, *eqend);\n\t\t\t\t++eqend;\n\t\t\t\tswap(*gtbeg++, *eqbeg++);\n\t\t\t}\n\t\t\telse swap(*gtbeg++, *--ltend);\n\t\t}\n\t}\n\n\ttemplate <typename I, typename Pred> void median3(I first, I middle, I last, const Pred& pred)\n\t{\n\t\tif (pred(*middle, *first)) swap(*middle, *first);\n\t\tif (pred(*last, *middle)) swap(*last, *middle);\n\t\tif (pred(*middle, *first)) swap(*middle, *first);\n\t}\n\n\ttemplate <typename I, typename Pred> void median(I first, I middle, I last, const Pred& pred)\n\t{\n\t\tif (last - first <= 40)\n\t\t{\n\t\t\t// median of three for small chunks\n\t\t\tmedian3(first, middle, last, pred);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// median of nine\n\t\t\tsize_t step = (last - first + 1) / 8;\n\n\t\t\tmedian3(first, first + step, first + 2 * step, pred);\n\t\t\tmedian3(middle - step, middle, middle + step, pred);\n\t\t\tmedian3(last - 2 * step, last - step, last, pred);\n\t\t\tmedian3(first + step, middle, last - step, pred);\n\t\t}\n\t}\n\n\ttemplate <typename I, typename Pred> void sort(I begin, I end, const Pred& pred)\n\t{\n\t\t// sort large chunks\n\t\twhile (end - begin > 32)\n\t\t{\n\t\t\t// find median element\n\t\t\tI middle = begin + (end - begin) / 2;\n\t\t\tmedian(begin, middle, end - 1, pred);\n\n\t\t\t// partition in three chunks (< = >)\n\t\t\tI eqbeg, eqend;\n\t\t\tpartition(begin, middle, end, pred, &eqbeg, &eqend);\n\n\t\t\t// loop on larger half\n\t\t\tif (eqbeg - begin > end - eqend)\n\t\t\t{\n\t\t\t\tsort(eqend, end, pred);\n\t\t\t\tend = eqbeg;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsort(begin, eqbeg, pred);\n\t\t\t\tbegin = eqend;\n\t\t\t}\n\t\t}\n\n\t\t// insertion sort small chunk\n\t\tif (begin != end) insertion_sort(begin, end, pred, &*begin);\n\t}\nPUGI__NS_END\n\n// Allocator used for AST and evaluation stacks\nPUGI__NS_BEGIN\n\tstruct xpath_memory_block\n\t{\t\n\t\txpath_memory_block* next;\n\t\tsize_t capacity;\n\n\t\tchar data[\n\t#ifdef PUGIXML_MEMORY_XPATH_PAGE_SIZE\n\t\t\tPUGIXML_MEMORY_XPATH_PAGE_SIZE\n\t#else\n\t\t\t4096\n\t#endif\n\t\t];\n\t};\n\t\t\n\tclass xpath_allocator\n\t{\n\t\txpath_memory_block* _root;\n\t\tsize_t _root_size;\n\n\tpublic:\n\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\tjmp_buf* error_handler;\n\t#endif\n\n\t\txpath_allocator(xpath_memory_block* root, size_t root_size = 0): _root(root), _root_size(root_size)\n\t\t{\n\t\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\t\terror_handler = 0;\n\t\t#endif\n\t\t}\n\t\t\n\t\tvoid* allocate_nothrow(size_t size)\n\t\t{\n\t\t\t// align size so that we're able to store pointers in subsequent blocks\n\t\t\tsize = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);\n\n\t\t\tif (_root_size + size <= _root->capacity)\n\t\t\t{\n\t\t\t\tvoid* buf = _root->data + _root_size;\n\t\t\t\t_root_size += size;\n\t\t\t\treturn buf;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// make sure we have at least 1/4th of the page free after allocation to satisfy subsequent allocation requests\n\t\t\t\tsize_t block_capacity_base = sizeof(_root->data);\n\t\t\t\tsize_t block_capacity_req = size + block_capacity_base / 4;\n\t\t\t\tsize_t block_capacity = (block_capacity_base > block_capacity_req) ? block_capacity_base : block_capacity_req;\n\n\t\t\t\tsize_t block_size = block_capacity + offsetof(xpath_memory_block, data);\n\n\t\t\t\txpath_memory_block* block = static_cast<xpath_memory_block*>(xml_memory::allocate(block_size));\n\t\t\t\tif (!block) return 0;\n\t\t\t\t\n\t\t\t\tblock->next = _root;\n\t\t\t\tblock->capacity = block_capacity;\n\t\t\t\t\n\t\t\t\t_root = block;\n\t\t\t\t_root_size = size;\n\t\t\t\t\n\t\t\t\treturn block->data;\n\t\t\t}\n\t\t}\n\n\t\tvoid* allocate(size_t size)\n\t\t{\n\t\t\tvoid* result = allocate_nothrow(size);\n\n\t\t\tif (!result)\n\t\t\t{\n\t\t\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\t\t\tassert(error_handler);\n\t\t\t\tlongjmp(*error_handler, 1);\n\t\t\t#else\n\t\t\t\tthrow std::bad_alloc();\n\t\t\t#endif\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tvoid* reallocate(void* ptr, size_t old_size, size_t new_size)\n\t\t{\n\t\t\t// align size so that we're able to store pointers in subsequent blocks\n\t\t\told_size = (old_size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);\n\t\t\tnew_size = (new_size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);\n\n\t\t\t// we can only reallocate the last object\n\t\t\tassert(ptr == 0 || static_cast<char*>(ptr) + old_size == _root->data + _root_size);\n\n\t\t\t// adjust root size so that we have not allocated the object at all\n\t\t\tbool only_object = (_root_size == old_size);\n\n\t\t\tif (ptr) _root_size -= old_size;\n\n\t\t\t// allocate a new version (this will obviously reuse the memory if possible)\n\t\t\tvoid* result = allocate(new_size);\n\t\t\tassert(result);\n\n\t\t\t// we have a new block\n\t\t\tif (result != ptr && ptr)\n\t\t\t{\n\t\t\t\t// copy old data\n\t\t\t\tassert(new_size >= old_size);\n\t\t\t\tmemcpy(result, ptr, old_size);\n\n\t\t\t\t// free the previous page if it had no other objects\n\t\t\t\tif (only_object)\n\t\t\t\t{\n\t\t\t\t\tassert(_root->data == result);\n\t\t\t\t\tassert(_root->next);\n\n\t\t\t\t\txpath_memory_block* next = _root->next->next;\n\n\t\t\t\t\tif (next)\n\t\t\t\t\t{\n\t\t\t\t\t\t// deallocate the whole page, unless it was the first one\n\t\t\t\t\t\txml_memory::deallocate(_root->next);\n\t\t\t\t\t\t_root->next = next;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tvoid revert(const xpath_allocator& state)\n\t\t{\n\t\t\t// free all new pages\n\t\t\txpath_memory_block* cur = _root;\n\n\t\t\twhile (cur != state._root)\n\t\t\t{\n\t\t\t\txpath_memory_block* next = cur->next;\n\n\t\t\t\txml_memory::deallocate(cur);\n\n\t\t\t\tcur = next;\n\t\t\t}\n\n\t\t\t// restore state\n\t\t\t_root = state._root;\n\t\t\t_root_size = state._root_size;\n\t\t}\n\n\t\tvoid release()\n\t\t{\n\t\t\txpath_memory_block* cur = _root;\n\t\t\tassert(cur);\n\n\t\t\twhile (cur->next)\n\t\t\t{\n\t\t\t\txpath_memory_block* next = cur->next;\n\n\t\t\t\txml_memory::deallocate(cur);\n\n\t\t\t\tcur = next;\n\t\t\t}\n\t\t}\n\t};\n\n\tstruct xpath_allocator_capture\n\t{\n\t\txpath_allocator_capture(xpath_allocator* alloc): _target(alloc), _state(*alloc)\n\t\t{\n\t\t}\n\n\t\t~xpath_allocator_capture()\n\t\t{\n\t\t\t_target->revert(_state);\n\t\t}\n\n\t\txpath_allocator* _target;\n\t\txpath_allocator _state;\n\t};\n\n\tstruct xpath_stack\n\t{\n\t\txpath_allocator* result;\n\t\txpath_allocator* temp;\n\t};\n\n\tstruct xpath_stack_data\n\t{\n\t\txpath_memory_block blocks[2];\n\t\txpath_allocator result;\n\t\txpath_allocator temp;\n\t\txpath_stack stack;\n\n\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\tjmp_buf error_handler;\n\t#endif\n\n\t\txpath_stack_data(): result(blocks + 0), temp(blocks + 1)\n\t\t{\n\t\t\tblocks[0].next = blocks[1].next = 0;\n\t\t\tblocks[0].capacity = blocks[1].capacity = sizeof(blocks[0].data);\n\n\t\t\tstack.result = &result;\n\t\t\tstack.temp = &temp;\n\n\t\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\t\tresult.error_handler = temp.error_handler = &error_handler;\n\t\t#endif\n\t\t}\n\n\t\t~xpath_stack_data()\n\t\t{\n\t\t\tresult.release();\n\t\t\ttemp.release();\n\t\t}\n\t};\nPUGI__NS_END\n\n// String class\nPUGI__NS_BEGIN\n\tclass xpath_string\n\t{\n\t\tconst char_t* _buffer;\n\t\tbool _uses_heap;\n\t\tsize_t _length_heap;\n\n\t\tstatic char_t* duplicate_string(const char_t* string, size_t length, xpath_allocator* alloc)\n\t\t{\n\t\t\tchar_t* result = static_cast<char_t*>(alloc->allocate((length + 1) * sizeof(char_t)));\n\t\t\tassert(result);\n\n\t\t\tmemcpy(result, string, length * sizeof(char_t));\n\t\t\tresult[length] = 0;\n\n\t\t\treturn result;\n\t\t}\n\n\t\txpath_string(const char_t* buffer, bool uses_heap_, size_t length_heap): _buffer(buffer), _uses_heap(uses_heap_), _length_heap(length_heap)\n\t\t{\n\t\t}\n\n\tpublic:\n\t\tstatic xpath_string from_const(const char_t* str)\n\t\t{\n\t\t\treturn xpath_string(str, false, 0);\n\t\t}\n\n\t\tstatic xpath_string from_heap_preallocated(const char_t* begin, const char_t* end)\n\t\t{\n\t\t\tassert(begin <= end && *end == 0);\n\n\t\t\treturn xpath_string(begin, true, static_cast<size_t>(end - begin));\n\t\t}\n\n\t\tstatic xpath_string from_heap(const char_t* begin, const char_t* end, xpath_allocator* alloc)\n\t\t{\n\t\t\tassert(begin <= end);\n\n\t\t\tsize_t length = static_cast<size_t>(end - begin);\n\n\t\t\treturn length == 0 ? xpath_string() : xpath_string(duplicate_string(begin, length, alloc), true, length);\n\t\t}\n\n\t\txpath_string(): _buffer(PUGIXML_TEXT(\"\")), _uses_heap(false), _length_heap(0)\n\t\t{\n\t\t}\n\n\t\tvoid append(const xpath_string& o, xpath_allocator* alloc)\n\t\t{\n\t\t\t// skip empty sources\n\t\t\tif (!*o._buffer) return;\n\n\t\t\t// fast append for constant empty target and constant source\n\t\t\tif (!*_buffer && !_uses_heap && !o._uses_heap)\n\t\t\t{\n\t\t\t\t_buffer = o._buffer;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// need to make heap copy\n\t\t\t\tsize_t target_length = length();\n\t\t\t\tsize_t source_length = o.length();\n\t\t\t\tsize_t result_length = target_length + source_length;\n\n\t\t\t\t// allocate new buffer\n\t\t\t\tchar_t* result = static_cast<char_t*>(alloc->reallocate(_uses_heap ? const_cast<char_t*>(_buffer) : 0, (target_length + 1) * sizeof(char_t), (result_length + 1) * sizeof(char_t)));\n\t\t\t\tassert(result);\n\n\t\t\t\t// append first string to the new buffer in case there was no reallocation\n\t\t\t\tif (!_uses_heap) memcpy(result, _buffer, target_length * sizeof(char_t));\n\n\t\t\t\t// append second string to the new buffer\n\t\t\t\tmemcpy(result + target_length, o._buffer, source_length * sizeof(char_t));\n\t\t\t\tresult[result_length] = 0;\n\n\t\t\t\t// finalize\n\t\t\t\t_buffer = result;\n\t\t\t\t_uses_heap = true;\n\t\t\t\t_length_heap = result_length;\n\t\t\t}\n\t\t}\n\n\t\tconst char_t* c_str() const\n\t\t{\n\t\t\treturn _buffer;\n\t\t}\n\n\t\tsize_t length() const\n\t\t{\n\t\t\treturn _uses_heap ? _length_heap : strlength(_buffer);\n\t\t}\n\t\t\n\t\tchar_t* data(xpath_allocator* alloc)\n\t\t{\n\t\t\t// make private heap copy\n\t\t\tif (!_uses_heap)\n\t\t\t{\n\t\t\t\tsize_t length_ = strlength(_buffer);\n\n\t\t\t\t_buffer = duplicate_string(_buffer, length_, alloc);\n\t\t\t\t_uses_heap = true;\n\t\t\t\t_length_heap = length_;\n\t\t\t}\n\n\t\t\treturn const_cast<char_t*>(_buffer);\n\t\t}\n\n\t\tbool empty() const\n\t\t{\n\t\t\treturn *_buffer == 0;\n\t\t}\n\n\t\tbool operator==(const xpath_string& o) const\n\t\t{\n\t\t\treturn strequal(_buffer, o._buffer);\n\t\t}\n\n\t\tbool operator!=(const xpath_string& o) const\n\t\t{\n\t\t\treturn !strequal(_buffer, o._buffer);\n\t\t}\n\n\t\tbool uses_heap() const\n\t\t{\n\t\t\treturn _uses_heap;\n\t\t}\n\t};\nPUGI__NS_END\n\nPUGI__NS_BEGIN\n\tPUGI__FN bool starts_with(const char_t* string, const char_t* pattern)\n\t{\n\t\twhile (*pattern && *string == *pattern)\n\t\t{\n\t\t\tstring++;\n\t\t\tpattern++;\n\t\t}\n\n\t\treturn *pattern == 0;\n\t}\n\n\tPUGI__FN const char_t* find_char(const char_t* s, char_t c)\n\t{\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn wcschr(s, c);\n\t#else\n\t\treturn strchr(s, c);\n\t#endif\n\t}\n\n\tPUGI__FN const char_t* find_substring(const char_t* s, const char_t* p)\n\t{\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\t// MSVC6 wcsstr bug workaround (if s is empty it always returns 0)\n\t\treturn (*p == 0) ? s : wcsstr(s, p);\n\t#else\n\t\treturn strstr(s, p);\n\t#endif\n\t}\n\n\t// Converts symbol to lower case, if it is an ASCII one\n\tPUGI__FN char_t tolower_ascii(char_t ch)\n\t{\n\t\treturn static_cast<unsigned int>(ch - 'A') < 26 ? static_cast<char_t>(ch | ' ') : ch;\n\t}\n\n\tPUGI__FN xpath_string string_value(const xpath_node& na, xpath_allocator* alloc)\n\t{\n\t\tif (na.attribute())\n\t\t\treturn xpath_string::from_const(na.attribute().value());\n\t\telse\n\t\t{\n\t\t\txml_node n = na.node();\n\n\t\t\tswitch (n.type())\n\t\t\t{\n\t\t\tcase node_pcdata:\n\t\t\tcase node_cdata:\n\t\t\tcase node_comment:\n\t\t\tcase node_pi:\n\t\t\t\treturn xpath_string::from_const(n.value());\n\t\t\t\n\t\t\tcase node_document:\n\t\t\tcase node_element:\n\t\t\t{\n\t\t\t\txpath_string result;\n\n\t\t\t\txml_node cur = n.first_child();\n\t\t\t\t\n\t\t\t\twhile (cur && cur != n)\n\t\t\t\t{\n\t\t\t\t\tif (cur.type() == node_pcdata || cur.type() == node_cdata)\n\t\t\t\t\t\tresult.append(xpath_string::from_const(cur.value()), alloc);\n\n\t\t\t\t\tif (cur.first_child())\n\t\t\t\t\t\tcur = cur.first_child();\n\t\t\t\t\telse if (cur.next_sibling())\n\t\t\t\t\t\tcur = cur.next_sibling();\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (!cur.next_sibling() && cur != n)\n\t\t\t\t\t\t\tcur = cur.parent();\n\n\t\t\t\t\t\tif (cur != n) cur = cur.next_sibling();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\t\n\t\t\tdefault:\n\t\t\t\treturn xpath_string();\n\t\t\t}\n\t\t}\n\t}\n\t\n\tPUGI__FN bool node_is_before_sibling(xml_node_struct* ln, xml_node_struct* rn)\n\t{\n\t\tassert(ln->parent == rn->parent);\n\n\t\t// there is no common ancestor (the shared parent is null), nodes are from different documents\n\t\tif (!ln->parent) return ln < rn;\n\n\t\t// determine sibling order\n\t\txml_node_struct* ls = ln;\n\t\txml_node_struct* rs = rn;\n\n\t\twhile (ls && rs)\n\t\t{\n\t\t\tif (ls == rn) return true;\n\t\t\tif (rs == ln) return false;\n\n\t\t\tls = ls->next_sibling;\n\t\t\trs = rs->next_sibling;\n\t\t}\n\n\t\t// if rn sibling chain ended ln must be before rn\n\t\treturn !rs;\n\t}\n\t\n\tPUGI__FN bool node_is_before(xml_node_struct* ln, xml_node_struct* rn)\n\t{\n\t\t// find common ancestor at the same depth, if any\n\t\txml_node_struct* lp = ln;\n\t\txml_node_struct* rp = rn;\n\n\t\twhile (lp && rp && lp->parent != rp->parent)\n\t\t{\n\t\t\tlp = lp->parent;\n\t\t\trp = rp->parent;\n\t\t}\n\n\t\t// parents are the same!\n\t\tif (lp && rp) return node_is_before_sibling(lp, rp);\n\n\t\t// nodes are at different depths, need to normalize heights\n\t\tbool left_higher = !lp;\n\n\t\twhile (lp)\n\t\t{\n\t\t\tlp = lp->parent;\n\t\t\tln = ln->parent;\n\t\t}\n\n\t\twhile (rp)\n\t\t{\n\t\t\trp = rp->parent;\n\t\t\trn = rn->parent;\n\t\t}\n\n\t\t// one node is the ancestor of the other\n\t\tif (ln == rn) return left_higher;\n\n\t\t// find common ancestor... again\n\t\twhile (ln->parent != rn->parent)\n\t\t{\n\t\t\tln = ln->parent;\n\t\t\trn = rn->parent;\n\t\t}\n\n\t\treturn node_is_before_sibling(ln, rn);\n\t}\n\n\tPUGI__FN bool node_is_ancestor(xml_node_struct* parent, xml_node_struct* node)\n\t{\n\t\twhile (node && node != parent) node = node->parent;\n\n\t\treturn parent && node == parent;\n\t}\n\n\tPUGI__FN const void* document_buffer_order(const xpath_node& xnode)\n\t{\n\t\txml_node_struct* node = xnode.node().internal_object();\n\n\t\tif (node)\n\t\t{\n\t\t\tif ((get_document(node).header & xml_memory_page_contents_shared_mask) == 0)\n\t\t\t{\n\t\t\t\tif (node->name && (node->header & impl::xml_memory_page_name_allocated_or_shared_mask) == 0) return node->name;\n\t\t\t\tif (node->value && (node->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0) return node->value;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\txml_attribute_struct* attr = xnode.attribute().internal_object();\n\n\t\tif (attr)\n\t\t{\n\t\t\tif ((get_document(attr).header & xml_memory_page_contents_shared_mask) == 0)\n\t\t\t{\n\t\t\t\tif ((attr->header & impl::xml_memory_page_name_allocated_or_shared_mask) == 0) return attr->name;\n\t\t\t\tif ((attr->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0) return attr->value;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn 0;\n\t}\n\t\n\tstruct document_order_comparator\n\t{\n\t\tbool operator()(const xpath_node& lhs, const xpath_node& rhs) const\n\t\t{\n\t\t\t// optimized document order based check\n\t\t\tconst void* lo = document_buffer_order(lhs);\n\t\t\tconst void* ro = document_buffer_order(rhs);\n\n\t\t\tif (lo && ro) return lo < ro;\n\n\t\t\t// slow comparison\n\t\t\txml_node ln = lhs.node(), rn = rhs.node();\n\n\t\t\t// compare attributes\n\t\t\tif (lhs.attribute() && rhs.attribute())\n\t\t\t{\n\t\t\t\t// shared parent\n\t\t\t\tif (lhs.parent() == rhs.parent())\n\t\t\t\t{\n\t\t\t\t\t// determine sibling order\n\t\t\t\t\tfor (xml_attribute a = lhs.attribute(); a; a = a.next_attribute())\n\t\t\t\t\t\tif (a == rhs.attribute())\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// compare attribute parents\n\t\t\t\tln = lhs.parent();\n\t\t\t\trn = rhs.parent();\n\t\t\t}\n\t\t\telse if (lhs.attribute())\n\t\t\t{\n\t\t\t\t// attributes go after the parent element\n\t\t\t\tif (lhs.parent() == rhs.node()) return false;\n\t\t\t\t\n\t\t\t\tln = lhs.parent();\n\t\t\t}\n\t\t\telse if (rhs.attribute())\n\t\t\t{\n\t\t\t\t// attributes go after the parent element\n\t\t\t\tif (rhs.parent() == lhs.node()) return true;\n\t\t\t\t\n\t\t\t\trn = rhs.parent();\n\t\t\t}\n\n\t\t\tif (ln == rn) return false;\n\n\t\t\tif (!ln || !rn) return ln < rn;\n\t\t\t\n\t\t\treturn node_is_before(ln.internal_object(), rn.internal_object());\n\t\t}\n\t};\n\n\tstruct duplicate_comparator\n\t{\n\t\tbool operator()(const xpath_node& lhs, const xpath_node& rhs) const\n\t\t{\n\t\t\tif (lhs.attribute()) return rhs.attribute() ? lhs.attribute() < rhs.attribute() : true;\n\t\t\telse return rhs.attribute() ? false : lhs.node() < rhs.node();\n\t\t}\n\t};\n\t\n\tPUGI__FN double gen_nan()\n\t{\n\t#if defined(__STDC_IEC_559__) || ((FLT_RADIX - 0 == 2) && (FLT_MAX_EXP - 0 == 128) && (FLT_MANT_DIG - 0 == 24))\n\t\tunion { float f; uint32_t i; } u[sizeof(float) == sizeof(uint32_t) ? 1 : -1];\n\t\tu[0].i = 0x7fc00000;\n\t\treturn u[0].f;\n\t#else\n\t\t// fallback\n\t\tconst volatile double zero = 0.0;\n\t\treturn zero / zero;\n\t#endif\n\t}\n\t\n\tPUGI__FN bool is_nan(double value)\n\t{\n\t#if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__)\n\t\treturn !!_isnan(value);\n\t#elif defined(fpclassify) && defined(FP_NAN)\n\t\treturn fpclassify(value) == FP_NAN;\n\t#else\n\t\t// fallback\n\t\tconst volatile double v = value;\n\t\treturn v != v;\n\t#endif\n\t}\n\t\n\tPUGI__FN const char_t* convert_number_to_string_special(double value)\n\t{\n\t#if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__)\n\t\tif (_finite(value)) return (value == 0) ? PUGIXML_TEXT(\"0\") : 0;\n\t\tif (_isnan(value)) return PUGIXML_TEXT(\"NaN\");\n\t\treturn value > 0 ? PUGIXML_TEXT(\"Infinity\") : PUGIXML_TEXT(\"-Infinity\");\n\t#elif defined(fpclassify) && defined(FP_NAN) && defined(FP_INFINITE) && defined(FP_ZERO)\n\t\tswitch (fpclassify(value))\n\t\t{\n\t\tcase FP_NAN:\n\t\t\treturn PUGIXML_TEXT(\"NaN\");\n\n\t\tcase FP_INFINITE:\n\t\t\treturn value > 0 ? PUGIXML_TEXT(\"Infinity\") : PUGIXML_TEXT(\"-Infinity\");\n\n\t\tcase FP_ZERO:\n\t\t\treturn PUGIXML_TEXT(\"0\");\n\n\t\tdefault:\n\t\t\treturn 0;\n\t\t}\n\t#else\n\t\t// fallback\n\t\tconst volatile double v = value;\n\n\t\tif (v == 0) return PUGIXML_TEXT(\"0\");\n\t\tif (v != v) return PUGIXML_TEXT(\"NaN\");\n\t\tif (v * 2 == v) return value > 0 ? PUGIXML_TEXT(\"Infinity\") : PUGIXML_TEXT(\"-Infinity\");\n\t\treturn 0;\n\t#endif\n\t}\n\t\n\tPUGI__FN bool convert_number_to_boolean(double value)\n\t{\n\t\treturn (value != 0 && !is_nan(value));\n\t}\n\t\n\tPUGI__FN void truncate_zeros(char* begin, char* end)\n\t{\n\t\twhile (begin != end && end[-1] == '0') end--;\n\n\t\t*end = 0;\n\t}\n\n\t// gets mantissa digits in the form of 0.xxxxx with 0. implied and the exponent\n#if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE)\n\tPUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent)\n\t{\n\t\t// get base values\n\t\tint sign, exponent;\n\t\t_ecvt_s(buffer, buffer_size, value, DBL_DIG + 1, &exponent, &sign);\n\n\t\t// truncate redundant zeros\n\t\ttruncate_zeros(buffer, buffer + strlen(buffer));\n\n\t\t// fill results\n\t\t*out_mantissa = buffer;\n\t\t*out_exponent = exponent;\n\t}\n#else\n\tPUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent)\n\t{\n\t\t// get a scientific notation value with IEEE DBL_DIG decimals\n\t\tsprintf(buffer, \"%.*e\", DBL_DIG, value);\n\t\tassert(strlen(buffer) < buffer_size);\n\t\t(void)!buffer_size;\n\n\t\t// get the exponent (possibly negative)\n\t\tchar* exponent_string = strchr(buffer, 'e');\n\t\tassert(exponent_string);\n\n\t\tint exponent = atoi(exponent_string + 1);\n\n\t\t// extract mantissa string: skip sign\n\t\tchar* mantissa = buffer[0] == '-' ? buffer + 1 : buffer;\n\t\tassert(mantissa[0] != '0' && mantissa[1] == '.');\n\n\t\t// divide mantissa by 10 to eliminate integer part\n\t\tmantissa[1] = mantissa[0];\n\t\tmantissa++;\n\t\texponent++;\n\n\t\t// remove extra mantissa digits and zero-terminate mantissa\n\t\ttruncate_zeros(mantissa, exponent_string);\n\n\t\t// fill results\n\t\t*out_mantissa = mantissa;\n\t\t*out_exponent = exponent;\n\t}\n#endif\n\n\tPUGI__FN xpath_string convert_number_to_string(double value, xpath_allocator* alloc)\n\t{\n\t\t// try special number conversion\n\t\tconst char_t* special = convert_number_to_string_special(value);\n\t\tif (special) return xpath_string::from_const(special);\n\n\t\t// get mantissa + exponent form\n\t\tchar mantissa_buffer[32];\n\n\t\tchar* mantissa;\n\t\tint exponent;\n\t\tconvert_number_to_mantissa_exponent(value, mantissa_buffer, sizeof(mantissa_buffer), &mantissa, &exponent);\n\n\t\t// allocate a buffer of suitable length for the number\n\t\tsize_t result_size = strlen(mantissa_buffer) + (exponent > 0 ? exponent : -exponent) + 4;\n\t\tchar_t* result = static_cast<char_t*>(alloc->allocate(sizeof(char_t) * result_size));\n\t\tassert(result);\n\n\t\t// make the number!\n\t\tchar_t* s = result;\n\n\t\t// sign\n\t\tif (value < 0) *s++ = '-';\n\n\t\t// integer part\n\t\tif (exponent <= 0)\n\t\t{\n\t\t\t*s++ = '0';\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile (exponent > 0)\n\t\t\t{\n\t\t\t\tassert(*mantissa == 0 || static_cast<unsigned int>(static_cast<unsigned int>(*mantissa) - '0') <= 9);\n\t\t\t\t*s++ = *mantissa ? *mantissa++ : '0';\n\t\t\t\texponent--;\n\t\t\t}\n\t\t}\n\n\t\t// fractional part\n\t\tif (*mantissa)\n\t\t{\n\t\t\t// decimal point\n\t\t\t*s++ = '.';\n\n\t\t\t// extra zeroes from negative exponent\n\t\t\twhile (exponent < 0)\n\t\t\t{\n\t\t\t\t*s++ = '0';\n\t\t\t\texponent++;\n\t\t\t}\n\n\t\t\t// extra mantissa digits\n\t\t\twhile (*mantissa)\n\t\t\t{\n\t\t\t\tassert(static_cast<unsigned int>(*mantissa - '0') <= 9);\n\t\t\t\t*s++ = *mantissa++;\n\t\t\t}\n\t\t}\n\n\t\t// zero-terminate\n\t\tassert(s < result + result_size);\n\t\t*s = 0;\n\n\t\treturn xpath_string::from_heap_preallocated(result, s);\n\t}\n\t\n\tPUGI__FN bool check_string_to_number_format(const char_t* string)\n\t{\n\t\t// parse leading whitespace\n\t\twhile (PUGI__IS_CHARTYPE(*string, ct_space)) ++string;\n\n\t\t// parse sign\n\t\tif (*string == '-') ++string;\n\n\t\tif (!*string) return false;\n\n\t\t// if there is no integer part, there should be a decimal part with at least one digit\n\t\tif (!PUGI__IS_CHARTYPEX(string[0], ctx_digit) && (string[0] != '.' || !PUGI__IS_CHARTYPEX(string[1], ctx_digit))) return false;\n\n\t\t// parse integer part\n\t\twhile (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string;\n\n\t\t// parse decimal part\n\t\tif (*string == '.')\n\t\t{\n\t\t\t++string;\n\n\t\t\twhile (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string;\n\t\t}\n\n\t\t// parse trailing whitespace\n\t\twhile (PUGI__IS_CHARTYPE(*string, ct_space)) ++string;\n\n\t\treturn *string == 0;\n\t}\n\n\tPUGI__FN double convert_string_to_number(const char_t* string)\n\t{\n\t\t// check string format\n\t\tif (!check_string_to_number_format(string)) return gen_nan();\n\n\t\t// parse string\n\t#ifdef PUGIXML_WCHAR_MODE\n\t\treturn wcstod(string, 0);\n\t#else\n\t\treturn atof(string);\n\t#endif\n\t}\n\n\tPUGI__FN bool convert_string_to_number_scratch(char_t (&buffer)[32], const char_t* begin, const char_t* end, double* out_result)\n\t{\n\t\tsize_t length = static_cast<size_t>(end - begin);\n\t\tchar_t* scratch = buffer;\n\n\t\tif (length >= sizeof(buffer) / sizeof(buffer[0]))\n\t\t{\n\t\t\t// need to make dummy on-heap copy\n\t\t\tscratch = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\t\tif (!scratch) return false;\n\t\t}\n\n\t\t// copy string to zero-terminated buffer and perform conversion\n\t\tmemcpy(scratch, begin, length * sizeof(char_t));\n\t\tscratch[length] = 0;\n\n\t\t*out_result = convert_string_to_number(scratch);\n\n\t\t// free dummy buffer\n\t\tif (scratch != buffer) xml_memory::deallocate(scratch);\n\n\t\treturn true;\n\t}\n\t\n\tPUGI__FN double round_nearest(double value)\n\t{\n\t\treturn floor(value + 0.5);\n\t}\n\n\tPUGI__FN double round_nearest_nzero(double value)\n\t{\n\t\t// same as round_nearest, but returns -0 for [-0.5, -0]\n\t\t// ceil is used to differentiate between +0 and -0 (we return -0 for [-0.5, -0] and +0 for +0)\n\t\treturn (value >= -0.5 && value <= 0) ? ceil(value) : floor(value + 0.5);\n\t}\n\t\n\tPUGI__FN const char_t* qualified_name(const xpath_node& node)\n\t{\n\t\treturn node.attribute() ? node.attribute().name() : node.node().name();\n\t}\n\t\n\tPUGI__FN const char_t* local_name(const xpath_node& node)\n\t{\n\t\tconst char_t* name = qualified_name(node);\n\t\tconst char_t* p = find_char(name, ':');\n\t\t\n\t\treturn p ? p + 1 : name;\n\t}\n\n\tstruct namespace_uri_predicate\n\t{\n\t\tconst char_t* prefix;\n\t\tsize_t prefix_length;\n\n\t\tnamespace_uri_predicate(const char_t* name)\n\t\t{\n\t\t\tconst char_t* pos = find_char(name, ':');\n\n\t\t\tprefix = pos ? name : 0;\n\t\t\tprefix_length = pos ? static_cast<size_t>(pos - name) : 0;\n\t\t}\n\n\t\tbool operator()(xml_attribute a) const\n\t\t{\n\t\t\tconst char_t* name = a.name();\n\n\t\t\tif (!starts_with(name, PUGIXML_TEXT(\"xmlns\"))) return false;\n\n\t\t\treturn prefix ? name[5] == ':' && strequalrange(name + 6, prefix, prefix_length) : name[5] == 0;\n\t\t}\n\t};\n\n\tPUGI__FN const char_t* namespace_uri(xml_node node)\n\t{\n\t\tnamespace_uri_predicate pred = node.name();\n\t\t\n\t\txml_node p = node;\n\t\t\n\t\twhile (p)\n\t\t{\n\t\t\txml_attribute a = p.find_attribute(pred);\n\t\t\t\n\t\t\tif (a) return a.value();\n\t\t\t\n\t\t\tp = p.parent();\n\t\t}\n\t\t\n\t\treturn PUGIXML_TEXT(\"\");\n\t}\n\n\tPUGI__FN const char_t* namespace_uri(xml_attribute attr, xml_node parent)\n\t{\n\t\tnamespace_uri_predicate pred = attr.name();\n\t\t\n\t\t// Default namespace does not apply to attributes\n\t\tif (!pred.prefix) return PUGIXML_TEXT(\"\");\n\t\t\n\t\txml_node p = parent;\n\t\t\n\t\twhile (p)\n\t\t{\n\t\t\txml_attribute a = p.find_attribute(pred);\n\t\t\t\n\t\t\tif (a) return a.value();\n\t\t\t\n\t\t\tp = p.parent();\n\t\t}\n\t\t\n\t\treturn PUGIXML_TEXT(\"\");\n\t}\n\n\tPUGI__FN const char_t* namespace_uri(const xpath_node& node)\n\t{\n\t\treturn node.attribute() ? namespace_uri(node.attribute(), node.parent()) : namespace_uri(node.node());\n\t}\n\n\tPUGI__FN char_t* normalize_space(char_t* buffer)\n\t{\n\t\tchar_t* write = buffer;\n\n\t\tfor (char_t* it = buffer; *it; )\n\t\t{\n\t\t\tchar_t ch = *it++;\n\n\t\t\tif (PUGI__IS_CHARTYPE(ch, ct_space))\n\t\t\t{\n\t\t\t\t// replace whitespace sequence with single space\n\t\t\t\twhile (PUGI__IS_CHARTYPE(*it, ct_space)) it++;\n\n\t\t\t\t// avoid leading spaces\n\t\t\t\tif (write != buffer) *write++ = ' ';\n\t\t\t}\n\t\t\telse *write++ = ch;\n\t\t}\n\n\t\t// remove trailing space\n\t\tif (write != buffer && PUGI__IS_CHARTYPE(write[-1], ct_space)) write--;\n\n\t\t// zero-terminate\n\t\t*write = 0;\n\n\t\treturn write;\n\t}\n\n\tPUGI__FN char_t* translate(char_t* buffer, const char_t* from, const char_t* to, size_t to_length)\n\t{\n\t\tchar_t* write = buffer;\n\n\t\twhile (*buffer)\n\t\t{\n\t\t\tPUGI__DMC_VOLATILE char_t ch = *buffer++;\n\n\t\t\tconst char_t* pos = find_char(from, ch);\n\n\t\t\tif (!pos)\n\t\t\t\t*write++ = ch; // do not process\n\t\t\telse if (static_cast<size_t>(pos - from) < to_length)\n\t\t\t\t*write++ = to[pos - from]; // replace\n\t\t}\n\n\t\t// zero-terminate\n\t\t*write = 0;\n\n\t\treturn write;\n\t}\n\n\tPUGI__FN unsigned char* translate_table_generate(xpath_allocator* alloc, const char_t* from, const char_t* to)\n\t{\n\t\tunsigned char table[128] = {0};\n\n\t\twhile (*from)\n\t\t{\n\t\t\tunsigned int fc = static_cast<unsigned int>(*from);\n\t\t\tunsigned int tc = static_cast<unsigned int>(*to);\n\n\t\t\tif (fc >= 128 || tc >= 128)\n\t\t\t\treturn 0;\n\n\t\t\t// code=128 means \"skip character\"\n\t\t\tif (!table[fc])\n\t\t\t\ttable[fc] = static_cast<unsigned char>(tc ? tc : 128);\n\n\t\t\tfrom++;\n\t\t\tif (tc) to++;\n\t\t}\n\n\t\tfor (int i = 0; i < 128; ++i)\n\t\t\tif (!table[i])\n\t\t\t\ttable[i] = static_cast<unsigned char>(i);\n\n\t\tvoid* result = alloc->allocate_nothrow(sizeof(table));\n\n\t\tif (result)\n\t\t{\n\t\t\tmemcpy(result, table, sizeof(table));\n\t\t}\n\n\t\treturn static_cast<unsigned char*>(result);\n\t}\n\n\tPUGI__FN char_t* translate_table(char_t* buffer, const unsigned char* table)\n\t{\n\t\tchar_t* write = buffer;\n\n\t\twhile (*buffer)\n\t\t{\n\t\t\tchar_t ch = *buffer++;\n\t\t\tunsigned int index = static_cast<unsigned int>(ch);\n\n\t\t\tif (index < 128)\n\t\t\t{\n\t\t\t\tunsigned char code = table[index];\n\n\t\t\t\t// code=128 means \"skip character\" (table size is 128 so 128 can be a special value)\n\t\t\t\t// this code skips these characters without extra branches\n\t\t\t\t*write = static_cast<char_t>(code);\n\t\t\t\twrite += 1 - (code >> 7);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t*write++ = ch;\n\t\t\t}\n\t\t}\n\n\t\t// zero-terminate\n\t\t*write = 0;\n\n\t\treturn write;\n\t}\n\n\tinline bool is_xpath_attribute(const char_t* name)\n\t{\n\t\treturn !(starts_with(name, PUGIXML_TEXT(\"xmlns\")) && (name[5] == 0 || name[5] == ':'));\n\t}\n\n\tstruct xpath_variable_boolean: xpath_variable\n\t{\n\t\txpath_variable_boolean(): value(false)\n\t\t{\n\t\t}\n\n\t\tbool value;\n\t\tchar_t name[1];\n\t};\n\n\tstruct xpath_variable_number: xpath_variable\n\t{\n\t\txpath_variable_number(): value(0)\n\t\t{\n\t\t}\n\n\t\tdouble value;\n\t\tchar_t name[1];\n\t};\n\n\tstruct xpath_variable_string: xpath_variable\n\t{\n\t\txpath_variable_string(): value(0)\n\t\t{\n\t\t}\n\n\t\t~xpath_variable_string()\n\t\t{\n\t\t\tif (value) xml_memory::deallocate(value);\n\t\t}\n\n\t\tchar_t* value;\n\t\tchar_t name[1];\n\t};\n\n\tstruct xpath_variable_node_set: xpath_variable\n\t{\n\t\txpath_node_set value;\n\t\tchar_t name[1];\n\t};\n\n\tstatic const xpath_node_set dummy_node_set;\n\n\tPUGI__FN unsigned int hash_string(const char_t* str)\n\t{\n\t\t// Jenkins one-at-a-time hash (http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time)\n\t\tunsigned int result = 0;\n\n\t\twhile (*str)\n\t\t{\n\t\t\tresult += static_cast<unsigned int>(*str++);\n\t\t\tresult += result << 10;\n\t\t\tresult ^= result >> 6;\n\t\t}\n\t\n\t\tresult += result << 3;\n\t\tresult ^= result >> 11;\n\t\tresult += result << 15;\n\t\n\t\treturn result;\n\t}\n\n\ttemplate <typename T> PUGI__FN T* new_xpath_variable(const char_t* name)\n\t{\n\t\tsize_t length = strlength(name);\n\t\tif (length == 0) return 0; // empty variable names are invalid\n\n\t\t// $$ we can't use offsetof(T, name) because T is non-POD, so we just allocate additional length characters\n\t\tvoid* memory = xml_memory::allocate(sizeof(T) + length * sizeof(char_t));\n\t\tif (!memory) return 0;\n\n\t\tT* result = new (memory) T();\n\n\t\tmemcpy(result->name, name, (length + 1) * sizeof(char_t));\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN xpath_variable* new_xpath_variable(xpath_value_type type, const char_t* name)\n\t{\n\t\tswitch (type)\n\t\t{\n\t\tcase xpath_type_node_set:\n\t\t\treturn new_xpath_variable<xpath_variable_node_set>(name);\n\n\t\tcase xpath_type_number:\n\t\t\treturn new_xpath_variable<xpath_variable_number>(name);\n\n\t\tcase xpath_type_string:\n\t\t\treturn new_xpath_variable<xpath_variable_string>(name);\n\n\t\tcase xpath_type_boolean:\n\t\t\treturn new_xpath_variable<xpath_variable_boolean>(name);\n\n\t\tdefault:\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\ttemplate <typename T> PUGI__FN void delete_xpath_variable(T* var)\n\t{\n\t\tvar->~T();\n\t\txml_memory::deallocate(var);\n\t}\n\n\tPUGI__FN void delete_xpath_variable(xpath_value_type type, xpath_variable* var)\n\t{\n\t\tswitch (type)\n\t\t{\n\t\tcase xpath_type_node_set:\n\t\t\tdelete_xpath_variable(static_cast<xpath_variable_node_set*>(var));\n\t\t\tbreak;\n\n\t\tcase xpath_type_number:\n\t\t\tdelete_xpath_variable(static_cast<xpath_variable_number*>(var));\n\t\t\tbreak;\n\n\t\tcase xpath_type_string:\n\t\t\tdelete_xpath_variable(static_cast<xpath_variable_string*>(var));\n\t\t\tbreak;\n\n\t\tcase xpath_type_boolean:\n\t\t\tdelete_xpath_variable(static_cast<xpath_variable_boolean*>(var));\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tassert(!\"Invalid variable type\");\n\t\t}\n\t}\n\n\tPUGI__FN xpath_variable* get_variable_scratch(char_t (&buffer)[32], xpath_variable_set* set, const char_t* begin, const char_t* end)\n\t{\n\t\tsize_t length = static_cast<size_t>(end - begin);\n\t\tchar_t* scratch = buffer;\n\n\t\tif (length >= sizeof(buffer) / sizeof(buffer[0]))\n\t\t{\n\t\t\t// need to make dummy on-heap copy\n\t\t\tscratch = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));\n\t\t\tif (!scratch) return 0;\n\t\t}\n\n\t\t// copy string to zero-terminated buffer and perform lookup\n\t\tmemcpy(scratch, begin, length * sizeof(char_t));\n\t\tscratch[length] = 0;\n\n\t\txpath_variable* result = set->get(scratch);\n\n\t\t// free dummy buffer\n\t\tif (scratch != buffer) xml_memory::deallocate(scratch);\n\n\t\treturn result;\n\t}\nPUGI__NS_END\n\n// Internal node set class\nPUGI__NS_BEGIN\n\tPUGI__FN xpath_node_set::type_t xpath_get_order(const xpath_node* begin, const xpath_node* end)\n\t{\n\t\tif (end - begin < 2)\n\t\t\treturn xpath_node_set::type_sorted;\n\n\t\tdocument_order_comparator cmp;\n\n\t\tbool first = cmp(begin[0], begin[1]);\n\n\t\tfor (const xpath_node* it = begin + 1; it + 1 < end; ++it)\n\t\t\tif (cmp(it[0], it[1]) != first)\n\t\t\t\treturn xpath_node_set::type_unsorted;\n\n\t\treturn first ? xpath_node_set::type_sorted : xpath_node_set::type_sorted_reverse;\n\t}\n\n\tPUGI__FN xpath_node_set::type_t xpath_sort(xpath_node* begin, xpath_node* end, xpath_node_set::type_t type, bool rev)\n\t{\n\t\txpath_node_set::type_t order = rev ? xpath_node_set::type_sorted_reverse : xpath_node_set::type_sorted;\n\n\t\tif (type == xpath_node_set::type_unsorted)\n\t\t{\n\t\t\txpath_node_set::type_t sorted = xpath_get_order(begin, end);\n\n\t\t\tif (sorted == xpath_node_set::type_unsorted)\n\t\t\t{\n\t\t\t\tsort(begin, end, document_order_comparator());\n\n\t\t\t\ttype = xpath_node_set::type_sorted;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttype = sorted;\n\t\t}\n\t\t\n\t\tif (type != order) reverse(begin, end);\n\t\t\t\n\t\treturn order;\n\t}\n\n\tPUGI__FN xpath_node xpath_first(const xpath_node* begin, const xpath_node* end, xpath_node_set::type_t type)\n\t{\n\t\tif (begin == end) return xpath_node();\n\n\t\tswitch (type)\n\t\t{\n\t\tcase xpath_node_set::type_sorted:\n\t\t\treturn *begin;\n\n\t\tcase xpath_node_set::type_sorted_reverse:\n\t\t\treturn *(end - 1);\n\n\t\tcase xpath_node_set::type_unsorted:\n\t\t\treturn *min_element(begin, end, document_order_comparator());\n\n\t\tdefault:\n\t\t\tassert(!\"Invalid node set type\");\n\t\t\treturn xpath_node();\n\t\t}\n\t}\n\n\tclass xpath_node_set_raw\n\t{\n\t\txpath_node_set::type_t _type;\n\n\t\txpath_node* _begin;\n\t\txpath_node* _end;\n\t\txpath_node* _eos;\n\n\tpublic:\n\t\txpath_node_set_raw(): _type(xpath_node_set::type_unsorted), _begin(0), _end(0), _eos(0)\n\t\t{\n\t\t}\n\n\t\txpath_node* begin() const\n\t\t{\n\t\t\treturn _begin;\n\t\t}\n\n\t\txpath_node* end() const\n\t\t{\n\t\t\treturn _end;\n\t\t}\n\n\t\tbool empty() const\n\t\t{\n\t\t\treturn _begin == _end;\n\t\t}\n\n\t\tsize_t size() const\n\t\t{\n\t\t\treturn static_cast<size_t>(_end - _begin);\n\t\t}\n\n\t\txpath_node first() const\n\t\t{\n\t\t\treturn xpath_first(_begin, _end, _type);\n\t\t}\n\n\t\tvoid push_back_grow(const xpath_node& node, xpath_allocator* alloc);\n\n\t\tvoid push_back(const xpath_node& node, xpath_allocator* alloc)\n\t\t{\n\t\t\tif (_end != _eos)\n\t\t\t\t*_end++ = node;\n\t\t\telse\n\t\t\t\tpush_back_grow(node, alloc);\n\t\t}\n\n\t\tvoid append(const xpath_node* begin_, const xpath_node* end_, xpath_allocator* alloc)\n\t\t{\n\t\t\tif (begin_ == end_) return;\n\n\t\t\tsize_t size_ = static_cast<size_t>(_end - _begin);\n\t\t\tsize_t capacity = static_cast<size_t>(_eos - _begin);\n\t\t\tsize_t count = static_cast<size_t>(end_ - begin_);\n\n\t\t\tif (size_ + count > capacity)\n\t\t\t{\n\t\t\t\t// reallocate the old array or allocate a new one\n\t\t\t\txpath_node* data = static_cast<xpath_node*>(alloc->reallocate(_begin, capacity * sizeof(xpath_node), (size_ + count) * sizeof(xpath_node)));\n\t\t\t\tassert(data);\n\n\t\t\t\t// finalize\n\t\t\t\t_begin = data;\n\t\t\t\t_end = data + size_;\n\t\t\t\t_eos = data + size_ + count;\n\t\t\t}\n\n\t\t\tmemcpy(_end, begin_, count * sizeof(xpath_node));\n\t\t\t_end += count;\n\t\t}\n\n\t\tvoid sort_do()\n\t\t{\n\t\t\t_type = xpath_sort(_begin, _end, _type, false);\n\t\t}\n\n\t\tvoid truncate(xpath_node* pos)\n\t\t{\n\t\t\tassert(_begin <= pos && pos <= _end);\n\n\t\t\t_end = pos;\n\t\t}\n\n\t\tvoid remove_duplicates()\n\t\t{\n\t\t\tif (_type == xpath_node_set::type_unsorted)\n\t\t\t\tsort(_begin, _end, duplicate_comparator());\n\t\t\n\t\t\t_end = unique(_begin, _end);\n\t\t}\n\n\t\txpath_node_set::type_t type() const\n\t\t{\n\t\t\treturn _type;\n\t\t}\n\n\t\tvoid set_type(xpath_node_set::type_t value)\n\t\t{\n\t\t\t_type = value;\n\t\t}\n\t};\n\n\tPUGI__FN_NO_INLINE void xpath_node_set_raw::push_back_grow(const xpath_node& node, xpath_allocator* alloc)\n\t{\n\t\tsize_t capacity = static_cast<size_t>(_eos - _begin);\n\n\t\t// get new capacity (1.5x rule)\n\t\tsize_t new_capacity = capacity + capacity / 2 + 1;\n\n\t\t// reallocate the old array or allocate a new one\n\t\txpath_node* data = static_cast<xpath_node*>(alloc->reallocate(_begin, capacity * sizeof(xpath_node), new_capacity * sizeof(xpath_node)));\n\t\tassert(data);\n\n\t\t// finalize\n\t\t_begin = data;\n\t\t_end = data + capacity;\n\t\t_eos = data + new_capacity;\n\n\t\t// push\n\t\t*_end++ = node;\n\t}\nPUGI__NS_END\n\nPUGI__NS_BEGIN\n\tstruct xpath_context\n\t{\n\t\txpath_node n;\n\t\tsize_t position, size;\n\n\t\txpath_context(const xpath_node& n_, size_t position_, size_t size_): n(n_), position(position_), size(size_)\n\t\t{\n\t\t}\n\t};\n\n\tenum lexeme_t\n\t{\n\t\tlex_none = 0,\n\t\tlex_equal,\n\t\tlex_not_equal,\n\t\tlex_less,\n\t\tlex_greater,\n\t\tlex_less_or_equal,\n\t\tlex_greater_or_equal,\n\t\tlex_plus,\n\t\tlex_minus,\n\t\tlex_multiply,\n\t\tlex_union,\n\t\tlex_var_ref,\n\t\tlex_open_brace,\n\t\tlex_close_brace,\n\t\tlex_quoted_string,\n\t\tlex_number,\n\t\tlex_slash,\n\t\tlex_double_slash,\n\t\tlex_open_square_brace,\n\t\tlex_close_square_brace,\n\t\tlex_string,\n\t\tlex_comma,\n\t\tlex_axis_attribute,\n\t\tlex_dot,\n\t\tlex_double_dot,\n\t\tlex_double_colon,\n\t\tlex_eof\n\t};\n\n\tstruct xpath_lexer_string\n\t{\n\t\tconst char_t* begin;\n\t\tconst char_t* end;\n\n\t\txpath_lexer_string(): begin(0), end(0)\n\t\t{\n\t\t}\n\n\t\tbool operator==(const char_t* other) const\n\t\t{\n\t\t\tsize_t length = static_cast<size_t>(end - begin);\n\n\t\t\treturn strequalrange(other, begin, length);\n\t\t}\n\t};\n\n\tclass xpath_lexer\n\t{\n\t\tconst char_t* _cur;\n\t\tconst char_t* _cur_lexeme_pos;\n\t\txpath_lexer_string _cur_lexeme_contents;\n\n\t\tlexeme_t _cur_lexeme;\n\n\tpublic:\n\t\texplicit xpath_lexer(const char_t* query): _cur(query)\n\t\t{\n\t\t\tnext();\n\t\t}\n\t\t\n\t\tconst char_t* state() const\n\t\t{\n\t\t\treturn _cur;\n\t\t}\n\t\t\n\t\tvoid next()\n\t\t{\n\t\t\tconst char_t* cur = _cur;\n\n\t\t\twhile (PUGI__IS_CHARTYPE(*cur, ct_space)) ++cur;\n\n\t\t\t// save lexeme position for error reporting\n\t\t\t_cur_lexeme_pos = cur;\n\n\t\t\tswitch (*cur)\n\t\t\t{\n\t\t\tcase 0:\n\t\t\t\t_cur_lexeme = lex_eof;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase '>':\n\t\t\t\tif (*(cur+1) == '=')\n\t\t\t\t{\n\t\t\t\t\tcur += 2;\n\t\t\t\t\t_cur_lexeme = lex_greater_or_equal;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcur += 1;\n\t\t\t\t\t_cur_lexeme = lex_greater;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '<':\n\t\t\t\tif (*(cur+1) == '=')\n\t\t\t\t{\n\t\t\t\t\tcur += 2;\n\t\t\t\t\t_cur_lexeme = lex_less_or_equal;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcur += 1;\n\t\t\t\t\t_cur_lexeme = lex_less;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '!':\n\t\t\t\tif (*(cur+1) == '=')\n\t\t\t\t{\n\t\t\t\t\tcur += 2;\n\t\t\t\t\t_cur_lexeme = lex_not_equal;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t_cur_lexeme = lex_none;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '=':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_equal;\n\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase '+':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_plus;\n\n\t\t\t\tbreak;\n\n\t\t\tcase '-':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_minus;\n\n\t\t\t\tbreak;\n\n\t\t\tcase '*':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_multiply;\n\n\t\t\t\tbreak;\n\n\t\t\tcase '|':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_union;\n\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase '$':\n\t\t\t\tcur += 1;\n\n\t\t\t\tif (PUGI__IS_CHARTYPEX(*cur, ctx_start_symbol))\n\t\t\t\t{\n\t\t\t\t\t_cur_lexeme_contents.begin = cur;\n\n\t\t\t\t\twhile (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;\n\n\t\t\t\t\tif (cur[0] == ':' && PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // qname\n\t\t\t\t\t{\n\t\t\t\t\t\tcur++; // :\n\n\t\t\t\t\t\twhile (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;\n\t\t\t\t\t}\n\n\t\t\t\t\t_cur_lexeme_contents.end = cur;\n\t\t\t\t\n\t\t\t\t\t_cur_lexeme = lex_var_ref;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t_cur_lexeme = lex_none;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase '(':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_open_brace;\n\n\t\t\t\tbreak;\n\n\t\t\tcase ')':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_close_brace;\n\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase '[':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_open_square_brace;\n\n\t\t\t\tbreak;\n\n\t\t\tcase ']':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_close_square_brace;\n\n\t\t\t\tbreak;\n\n\t\t\tcase ',':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_comma;\n\n\t\t\t\tbreak;\n\n\t\t\tcase '/':\n\t\t\t\tif (*(cur+1) == '/')\n\t\t\t\t{\n\t\t\t\t\tcur += 2;\n\t\t\t\t\t_cur_lexeme = lex_double_slash;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcur += 1;\n\t\t\t\t\t_cur_lexeme = lex_slash;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\n\t\t\tcase '.':\n\t\t\t\tif (*(cur+1) == '.')\n\t\t\t\t{\n\t\t\t\t\tcur += 2;\n\t\t\t\t\t_cur_lexeme = lex_double_dot;\n\t\t\t\t}\n\t\t\t\telse if (PUGI__IS_CHARTYPEX(*(cur+1), ctx_digit))\n\t\t\t\t{\n\t\t\t\t\t_cur_lexeme_contents.begin = cur; // .\n\n\t\t\t\t\t++cur;\n\n\t\t\t\t\twhile (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++;\n\n\t\t\t\t\t_cur_lexeme_contents.end = cur;\n\t\t\t\t\t\n\t\t\t\t\t_cur_lexeme = lex_number;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcur += 1;\n\t\t\t\t\t_cur_lexeme = lex_dot;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '@':\n\t\t\t\tcur += 1;\n\t\t\t\t_cur_lexeme = lex_axis_attribute;\n\n\t\t\t\tbreak;\n\n\t\t\tcase '\"':\n\t\t\tcase '\\'':\n\t\t\t{\n\t\t\t\tchar_t terminator = *cur;\n\n\t\t\t\t++cur;\n\n\t\t\t\t_cur_lexeme_contents.begin = cur;\n\t\t\t\twhile (*cur && *cur != terminator) cur++;\n\t\t\t\t_cur_lexeme_contents.end = cur;\n\t\t\t\t\n\t\t\t\tif (!*cur)\n\t\t\t\t\t_cur_lexeme = lex_none;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcur += 1;\n\t\t\t\t\t_cur_lexeme = lex_quoted_string;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase ':':\n\t\t\t\tif (*(cur+1) == ':')\n\t\t\t\t{\n\t\t\t\t\tcur += 2;\n\t\t\t\t\t_cur_lexeme = lex_double_colon;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t_cur_lexeme = lex_none;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tif (PUGI__IS_CHARTYPEX(*cur, ctx_digit))\n\t\t\t\t{\n\t\t\t\t\t_cur_lexeme_contents.begin = cur;\n\n\t\t\t\t\twhile (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++;\n\t\t\t\t\n\t\t\t\t\tif (*cur == '.')\n\t\t\t\t\t{\n\t\t\t\t\t\tcur++;\n\n\t\t\t\t\t\twhile (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++;\n\t\t\t\t\t}\n\n\t\t\t\t\t_cur_lexeme_contents.end = cur;\n\n\t\t\t\t\t_cur_lexeme = lex_number;\n\t\t\t\t}\n\t\t\t\telse if (PUGI__IS_CHARTYPEX(*cur, ctx_start_symbol))\n\t\t\t\t{\n\t\t\t\t\t_cur_lexeme_contents.begin = cur;\n\n\t\t\t\t\twhile (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;\n\n\t\t\t\t\tif (cur[0] == ':')\n\t\t\t\t\t{\n\t\t\t\t\t\tif (cur[1] == '*') // namespace test ncname:*\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcur += 2; // :*\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // namespace test qname\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcur++; // :\n\n\t\t\t\t\t\t\twhile (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t_cur_lexeme_contents.end = cur;\n\t\t\t\t\n\t\t\t\t\t_cur_lexeme = lex_string;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t_cur_lexeme = lex_none;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_cur = cur;\n\t\t}\n\n\t\tlexeme_t current() const\n\t\t{\n\t\t\treturn _cur_lexeme;\n\t\t}\n\n\t\tconst char_t* current_pos() const\n\t\t{\n\t\t\treturn _cur_lexeme_pos;\n\t\t}\n\n\t\tconst xpath_lexer_string& contents() const\n\t\t{\n\t\t\tassert(_cur_lexeme == lex_var_ref || _cur_lexeme == lex_number || _cur_lexeme == lex_string || _cur_lexeme == lex_quoted_string);\n\n\t\t\treturn _cur_lexeme_contents;\n\t\t}\n\t};\n\n\tenum ast_type_t\n\t{\n\t\tast_unknown,\n\t\tast_op_or,\t\t\t\t\t\t// left or right\n\t\tast_op_and,\t\t\t\t\t\t// left and right\n\t\tast_op_equal,\t\t\t\t\t// left = right\n\t\tast_op_not_equal,\t\t\t\t// left != right\n\t\tast_op_less,\t\t\t\t\t// left < right\n\t\tast_op_greater,\t\t\t\t\t// left > right\n\t\tast_op_less_or_equal,\t\t\t// left <= right\n\t\tast_op_greater_or_equal,\t\t// left >= right\n\t\tast_op_add,\t\t\t\t\t\t// left + right\n\t\tast_op_subtract,\t\t\t\t// left - right\n\t\tast_op_multiply,\t\t\t\t// left * right\n\t\tast_op_divide,\t\t\t\t\t// left / right\n\t\tast_op_mod,\t\t\t\t\t\t// left % right\n\t\tast_op_negate,\t\t\t\t\t// left - right\n\t\tast_op_union,\t\t\t\t\t// left | right\n\t\tast_predicate,\t\t\t\t\t// apply predicate to set; next points to next predicate\n\t\tast_filter,\t\t\t\t\t\t// select * from left where right\n\t\tast_string_constant,\t\t\t// string constant\n\t\tast_number_constant,\t\t\t// number constant\n\t\tast_variable,\t\t\t\t\t// variable\n\t\tast_func_last,\t\t\t\t\t// last()\n\t\tast_func_position,\t\t\t\t// position()\n\t\tast_func_count,\t\t\t\t\t// count(left)\n\t\tast_func_id,\t\t\t\t\t// id(left)\n\t\tast_func_local_name_0,\t\t\t// local-name()\n\t\tast_func_local_name_1,\t\t\t// local-name(left)\n\t\tast_func_namespace_uri_0,\t\t// namespace-uri()\n\t\tast_func_namespace_uri_1,\t\t// namespace-uri(left)\n\t\tast_func_name_0,\t\t\t\t// name()\n\t\tast_func_name_1,\t\t\t\t// name(left)\n\t\tast_func_string_0,\t\t\t\t// string()\n\t\tast_func_string_1,\t\t\t\t// string(left)\n\t\tast_func_concat,\t\t\t\t// concat(left, right, siblings)\n\t\tast_func_starts_with,\t\t\t// starts_with(left, right)\n\t\tast_func_contains,\t\t\t\t// contains(left, right)\n\t\tast_func_substring_before,\t\t// substring-before(left, right)\n\t\tast_func_substring_after,\t\t// substring-after(left, right)\n\t\tast_func_substring_2,\t\t\t// substring(left, right)\n\t\tast_func_substring_3,\t\t\t// substring(left, right, third)\n\t\tast_func_string_length_0,\t\t// string-length()\n\t\tast_func_string_length_1,\t\t// string-length(left)\n\t\tast_func_normalize_space_0,\t\t// normalize-space()\n\t\tast_func_normalize_space_1,\t\t// normalize-space(left)\n\t\tast_func_translate,\t\t\t\t// translate(left, right, third)\n\t\tast_func_boolean,\t\t\t\t// boolean(left)\n\t\tast_func_not,\t\t\t\t\t// not(left)\n\t\tast_func_true,\t\t\t\t\t// true()\n\t\tast_func_false,\t\t\t\t\t// false()\n\t\tast_func_lang,\t\t\t\t\t// lang(left)\n\t\tast_func_number_0,\t\t\t\t// number()\n\t\tast_func_number_1,\t\t\t\t// number(left)\n\t\tast_func_sum,\t\t\t\t\t// sum(left)\n\t\tast_func_floor,\t\t\t\t\t// floor(left)\n\t\tast_func_ceiling,\t\t\t\t// ceiling(left)\n\t\tast_func_round,\t\t\t\t\t// round(left)\n\t\tast_step,\t\t\t\t\t\t// process set left with step\n\t\tast_step_root,\t\t\t\t\t// select root node\n\n\t\tast_opt_translate_table,\t\t// translate(left, right, third) where right/third are constants\n\t\tast_opt_compare_attribute\t\t// @name = 'string'\n\t};\n\n\tenum axis_t\n\t{\n\t\taxis_ancestor,\n\t\taxis_ancestor_or_self,\n\t\taxis_attribute,\n\t\taxis_child,\n\t\taxis_descendant,\n\t\taxis_descendant_or_self,\n\t\taxis_following,\n\t\taxis_following_sibling,\n\t\taxis_namespace,\n\t\taxis_parent,\n\t\taxis_preceding,\n\t\taxis_preceding_sibling,\n\t\taxis_self\n\t};\n\t\n\tenum nodetest_t\n\t{\n\t\tnodetest_none,\n\t\tnodetest_name,\n\t\tnodetest_type_node,\n\t\tnodetest_type_comment,\n\t\tnodetest_type_pi,\n\t\tnodetest_type_text,\n\t\tnodetest_pi,\n\t\tnodetest_all,\n\t\tnodetest_all_in_namespace\n\t};\n\n\tenum predicate_t\n\t{\n\t\tpredicate_default,\n\t\tpredicate_posinv,\n\t\tpredicate_constant,\n\t\tpredicate_constant_one\n\t};\n\n\tenum nodeset_eval_t\n\t{\n\t\tnodeset_eval_all,\n\t\tnodeset_eval_any,\n\t\tnodeset_eval_first\n\t};\n\n\ttemplate <axis_t N> struct axis_to_type\n\t{\n\t\tstatic const axis_t axis;\n\t};\n\n\ttemplate <axis_t N> const axis_t axis_to_type<N>::axis = N;\n\t\t\n\tclass xpath_ast_node\n\t{\n\tprivate:\n\t\t// node type\n\t\tchar _type;\n\t\tchar _rettype;\n\n\t\t// for ast_step\n\t\tchar _axis;\n\n\t\t// for ast_step/ast_predicate/ast_filter\n\t\tchar _test;\n\n\t\t// tree node structure\n\t\txpath_ast_node* _left;\n\t\txpath_ast_node* _right;\n\t\txpath_ast_node* _next;\n\n\t\tunion\n\t\t{\n\t\t\t// value for ast_string_constant\n\t\t\tconst char_t* string;\n\t\t\t// value for ast_number_constant\n\t\t\tdouble number;\n\t\t\t// variable for ast_variable\n\t\t\txpath_variable* variable;\n\t\t\t// node test for ast_step (node name/namespace/node type/pi target)\n\t\t\tconst char_t* nodetest;\n\t\t\t// table for ast_opt_translate_table\n\t\t\tconst unsigned char* table;\n\t\t} _data;\n\n\t\txpath_ast_node(const xpath_ast_node&);\n\t\txpath_ast_node& operator=(const xpath_ast_node&);\n\n\t\ttemplate <class Comp> static bool compare_eq(xpath_ast_node* lhs, xpath_ast_node* rhs, const xpath_context& c, const xpath_stack& stack, const Comp& comp)\n\t\t{\n\t\t\txpath_value_type lt = lhs->rettype(), rt = rhs->rettype();\n\n\t\t\tif (lt != xpath_type_node_set && rt != xpath_type_node_set)\n\t\t\t{\n\t\t\t\tif (lt == xpath_type_boolean || rt == xpath_type_boolean)\n\t\t\t\t\treturn comp(lhs->eval_boolean(c, stack), rhs->eval_boolean(c, stack));\n\t\t\t\telse if (lt == xpath_type_number || rt == xpath_type_number)\n\t\t\t\t\treturn comp(lhs->eval_number(c, stack), rhs->eval_number(c, stack));\n\t\t\t\telse if (lt == xpath_type_string || rt == xpath_type_string)\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\t\txpath_string ls = lhs->eval_string(c, stack);\n\t\t\t\t\txpath_string rs = rhs->eval_string(c, stack);\n\n\t\t\t\t\treturn comp(ls, rs);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (lt == xpath_type_node_set && rt == xpath_type_node_set)\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\txpath_node_set_raw ls = lhs->eval_node_set(c, stack, nodeset_eval_all);\n\t\t\t\txpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n\t\t\t\tfor (const xpath_node* li = ls.begin(); li != ls.end(); ++li)\n\t\t\t\t\tfor (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n\t\t\t\t\t{\n\t\t\t\t\t\txpath_allocator_capture cri(stack.result);\n\n\t\t\t\t\t\tif (comp(string_value(*li, stack.result), string_value(*ri, stack.result)))\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (lt == xpath_type_node_set)\n\t\t\t\t{\n\t\t\t\t\tswap(lhs, rhs);\n\t\t\t\t\tswap(lt, rt);\n\t\t\t\t}\n\n\t\t\t\tif (lt == xpath_type_boolean)\n\t\t\t\t\treturn comp(lhs->eval_boolean(c, stack), rhs->eval_boolean(c, stack));\n\t\t\t\telse if (lt == xpath_type_number)\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\t\tdouble l = lhs->eval_number(c, stack);\n\t\t\t\t\txpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n\t\t\t\t\tfor (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n\t\t\t\t\t{\n\t\t\t\t\t\txpath_allocator_capture cri(stack.result);\n\n\t\t\t\t\t\tif (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str())))\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse if (lt == xpath_type_string)\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\t\txpath_string l = lhs->eval_string(c, stack);\n\t\t\t\t\txpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n\t\t\t\t\tfor (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n\t\t\t\t\t{\n\t\t\t\t\t\txpath_allocator_capture cri(stack.result);\n\n\t\t\t\t\t\tif (comp(l, string_value(*ri, stack.result)))\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tassert(!\"Wrong types\");\n\t\t\treturn false;\n\t\t}\n\n\t\tstatic bool eval_once(xpath_node_set::type_t type, nodeset_eval_t eval)\n\t\t{\n\t\t\treturn type == xpath_node_set::type_sorted ? eval != nodeset_eval_all : eval == nodeset_eval_any;\n\t\t}\n\n\t\ttemplate <class Comp> static bool compare_rel(xpath_ast_node* lhs, xpath_ast_node* rhs, const xpath_context& c, const xpath_stack& stack, const Comp& comp)\n\t\t{\n\t\t\txpath_value_type lt = lhs->rettype(), rt = rhs->rettype();\n\n\t\t\tif (lt != xpath_type_node_set && rt != xpath_type_node_set)\n\t\t\t\treturn comp(lhs->eval_number(c, stack), rhs->eval_number(c, stack));\n\t\t\telse if (lt == xpath_type_node_set && rt == xpath_type_node_set)\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\txpath_node_set_raw ls = lhs->eval_node_set(c, stack, nodeset_eval_all);\n\t\t\t\txpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n\t\t\t\tfor (const xpath_node* li = ls.begin(); li != ls.end(); ++li)\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cri(stack.result);\n\n\t\t\t\t\tdouble l = convert_string_to_number(string_value(*li, stack.result).c_str());\n\n\t\t\t\t\tfor (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n\t\t\t\t\t{\n\t\t\t\t\t\txpath_allocator_capture crii(stack.result);\n\n\t\t\t\t\t\tif (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str())))\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if (lt != xpath_type_node_set && rt == xpath_type_node_set)\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\tdouble l = lhs->eval_number(c, stack);\n\t\t\t\txpath_node_set_raw rs = rhs->eval_node_set(c, stack, nodeset_eval_all);\n\n\t\t\t\tfor (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cri(stack.result);\n\n\t\t\t\t\tif (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str())))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if (lt == xpath_type_node_set && rt != xpath_type_node_set)\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\txpath_node_set_raw ls = lhs->eval_node_set(c, stack, nodeset_eval_all);\n\t\t\t\tdouble r = rhs->eval_number(c, stack);\n\n\t\t\t\tfor (const xpath_node* li = ls.begin(); li != ls.end(); ++li)\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cri(stack.result);\n\n\t\t\t\t\tif (comp(convert_string_to_number(string_value(*li, stack.result).c_str()), r))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tassert(!\"Wrong types\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tstatic void apply_predicate_boolean(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack, bool once)\n\t\t{\n\t\t\tassert(ns.size() >= first);\n\t\t\tassert(expr->rettype() != xpath_type_number);\n\n\t\t\tsize_t i = 1;\n\t\t\tsize_t size = ns.size() - first;\n\n\t\t\txpath_node* last = ns.begin() + first;\n\n\t\t\t// remove_if... or well, sort of\n\t\t\tfor (xpath_node* it = last; it != ns.end(); ++it, ++i)\n\t\t\t{\n\t\t\t\txpath_context c(*it, i, size);\n\n\t\t\t\tif (expr->eval_boolean(c, stack))\n\t\t\t\t{\n\t\t\t\t\t*last++ = *it;\n\n\t\t\t\t\tif (once) break;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tns.truncate(last);\n\t\t}\n\n\t\tstatic void apply_predicate_number(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack, bool once)\n\t\t{\n\t\t\tassert(ns.size() >= first);\n\t\t\tassert(expr->rettype() == xpath_type_number);\n\n\t\t\tsize_t i = 1;\n\t\t\tsize_t size = ns.size() - first;\n\n\t\t\txpath_node* last = ns.begin() + first;\n\n\t\t\t// remove_if... or well, sort of\n\t\t\tfor (xpath_node* it = last; it != ns.end(); ++it, ++i)\n\t\t\t{\n\t\t\t\txpath_context c(*it, i, size);\n\n\t\t\t\tif (expr->eval_number(c, stack) == i)\n\t\t\t\t{\n\t\t\t\t\t*last++ = *it;\n\n\t\t\t\t\tif (once) break;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tns.truncate(last);\n\t\t}\n\n\t\tstatic void apply_predicate_number_const(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack)\n\t\t{\n\t\t\tassert(ns.size() >= first);\n\t\t\tassert(expr->rettype() == xpath_type_number);\n\n\t\t\tsize_t size = ns.size() - first;\n\n\t\t\txpath_node* last = ns.begin() + first;\n\n\t\t\txpath_context c(xpath_node(), 1, size);\n\n\t\t\tdouble er = expr->eval_number(c, stack);\n\n\t\t\tif (er >= 1.0 && er <= size)\n\t\t\t{\n\t\t\t\tsize_t eri = static_cast<size_t>(er);\n\n\t\t\t\tif (er == eri)\n\t\t\t\t{\n\t\t\t\t\txpath_node r = last[eri - 1];\n\n\t\t\t\t\t*last++ = r;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tns.truncate(last);\n\t\t}\n\n\t\tvoid apply_predicate(xpath_node_set_raw& ns, size_t first, const xpath_stack& stack, bool once)\n\t\t{\n\t\t\tif (ns.size() == first) return;\n\n\t\t\tassert(_type == ast_filter || _type == ast_predicate);\n\n\t\t\tif (_test == predicate_constant || _test == predicate_constant_one)\n\t\t\t\tapply_predicate_number_const(ns, first, _right, stack);\n\t\t\telse if (_right->rettype() == xpath_type_number)\n\t\t\t\tapply_predicate_number(ns, first, _right, stack, once);\n\t\t\telse\n\t\t\t\tapply_predicate_boolean(ns, first, _right, stack, once);\n\t\t}\n\n\t\tvoid apply_predicates(xpath_node_set_raw& ns, size_t first, const xpath_stack& stack, nodeset_eval_t eval)\n\t\t{\n\t\t\tif (ns.size() == first) return;\n\n\t\t\tbool last_once = eval_once(ns.type(), eval);\n\n\t\t\tfor (xpath_ast_node* pred = _right; pred; pred = pred->_next)\n\t\t\t\tpred->apply_predicate(ns, first, stack, !pred->_next && last_once);\n\t\t}\n\n\t\tbool step_push(xpath_node_set_raw& ns, xml_attribute_struct* a, xml_node_struct* parent, xpath_allocator* alloc)\n\t\t{\n\t\t\tassert(a);\n\n\t\t\tconst char_t* name = a->name ? a->name : PUGIXML_TEXT(\"\");\n\n\t\t\tswitch (_test)\n\t\t\t{\n\t\t\tcase nodetest_name:\n\t\t\t\tif (strequal(name, _data.nodetest) && is_xpath_attribute(name))\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase nodetest_type_node:\n\t\t\tcase nodetest_all:\n\t\t\t\tif (is_xpath_attribute(name))\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase nodetest_all_in_namespace:\n\t\t\t\tif (starts_with(name, _data.nodetest) && is_xpath_attribute(name))\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tbool step_push(xpath_node_set_raw& ns, xml_node_struct* n, xpath_allocator* alloc)\n\t\t{\n\t\t\tassert(n);\n\n\t\t\txml_node_type type = PUGI__NODETYPE(n);\n\n\t\t\tswitch (_test)\n\t\t\t{\n\t\t\tcase nodetest_name:\n\t\t\t\tif (type == node_element && n->name && strequal(n->name, _data.nodetest))\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xml_node(n), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase nodetest_type_node:\n\t\t\t\tns.push_back(xml_node(n), alloc);\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\tcase nodetest_type_comment:\n\t\t\t\tif (type == node_comment)\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xml_node(n), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase nodetest_type_text:\n\t\t\t\tif (type == node_pcdata || type == node_cdata)\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xml_node(n), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase nodetest_type_pi:\n\t\t\t\tif (type == node_pi)\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xml_node(n), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\n\t\t\tcase nodetest_pi:\n\t\t\t\tif (type == node_pi && n->name && strequal(n->name, _data.nodetest))\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xml_node(n), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase nodetest_all:\n\t\t\t\tif (type == node_element)\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xml_node(n), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase nodetest_all_in_namespace:\n\t\t\t\tif (type == node_element && n->name && starts_with(n->name, _data.nodetest))\n\t\t\t\t{\n\t\t\t\t\tns.push_back(xml_node(n), alloc);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tassert(!\"Unknown axis\");\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\ttemplate <class T> void step_fill(xpath_node_set_raw& ns, xml_node_struct* n, xpath_allocator* alloc, bool once, T)\n\t\t{\n\t\t\tconst axis_t axis = T::axis;\n\n\t\t\tswitch (axis)\n\t\t\t{\n\t\t\tcase axis_attribute:\n\t\t\t{\n\t\t\t\tfor (xml_attribute_struct* a = n->first_attribute; a; a = a->next_attribute)\n\t\t\t\t\tif (step_push(ns, a, n, alloc) & once)\n\t\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase axis_child:\n\t\t\t{\n\t\t\t\tfor (xml_node_struct* c = n->first_child; c; c = c->next_sibling)\n\t\t\t\t\tif (step_push(ns, c, alloc) & once)\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase axis_descendant:\n\t\t\tcase axis_descendant_or_self:\n\t\t\t{\n\t\t\t\tif (axis == axis_descendant_or_self)\n\t\t\t\t\tif (step_push(ns, n, alloc) & once)\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\n\t\t\t\txml_node_struct* cur = n->first_child;\n\t\t\t\t\n\t\t\t\twhile (cur)\n\t\t\t\t{\n\t\t\t\t\tif (step_push(ns, cur, alloc) & once)\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\n\t\t\t\t\tif (cur->first_child)\n\t\t\t\t\t\tcur = cur->first_child;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (!cur->next_sibling)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcur = cur->parent;\n\n\t\t\t\t\t\t\tif (cur == n) return;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tcur = cur->next_sibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase axis_following_sibling:\n\t\t\t{\n\t\t\t\tfor (xml_node_struct* c = n->next_sibling; c; c = c->next_sibling)\n\t\t\t\t\tif (step_push(ns, c, alloc) & once)\n\t\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase axis_preceding_sibling:\n\t\t\t{\n\t\t\t\tfor (xml_node_struct* c = n->prev_sibling_c; c->next_sibling; c = c->prev_sibling_c)\n\t\t\t\t\tif (step_push(ns, c, alloc) & once)\n\t\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase axis_following:\n\t\t\t{\n\t\t\t\txml_node_struct* cur = n;\n\n\t\t\t\t// exit from this node so that we don't include descendants\n\t\t\t\twhile (!cur->next_sibling)\n\t\t\t\t{\n\t\t\t\t\tcur = cur->parent;\n\n\t\t\t\t\tif (!cur) return;\n\t\t\t\t}\n\n\t\t\t\tcur = cur->next_sibling;\n\n\t\t\t\twhile (cur)\n\t\t\t\t{\n\t\t\t\t\tif (step_push(ns, cur, alloc) & once)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\tif (cur->first_child)\n\t\t\t\t\t\tcur = cur->first_child;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (!cur->next_sibling)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcur = cur->parent;\n\n\t\t\t\t\t\t\tif (!cur) return;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcur = cur->next_sibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase axis_preceding:\n\t\t\t{\n\t\t\t\txml_node_struct* cur = n;\n\n\t\t\t\t// exit from this node so that we don't include descendants\n\t\t\t\twhile (!cur->prev_sibling_c->next_sibling)\n\t\t\t\t{\n\t\t\t\t\tcur = cur->parent;\n\n\t\t\t\t\tif (!cur) return;\n\t\t\t\t}\n\n\t\t\t\tcur = cur->prev_sibling_c;\n\n\t\t\t\twhile (cur)\n\t\t\t\t{\n\t\t\t\t\tif (cur->first_child)\n\t\t\t\t\t\tcur = cur->first_child->prev_sibling_c;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// leaf node, can't be ancestor\n\t\t\t\t\t\tif (step_push(ns, cur, alloc) & once)\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\twhile (!cur->prev_sibling_c->next_sibling)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcur = cur->parent;\n\n\t\t\t\t\t\t\tif (!cur) return;\n\n\t\t\t\t\t\t\tif (!node_is_ancestor(cur, n))\n\t\t\t\t\t\t\t\tif (step_push(ns, cur, alloc) & once)\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcur = cur->prev_sibling_c;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase axis_ancestor:\n\t\t\tcase axis_ancestor_or_self:\n\t\t\t{\n\t\t\t\tif (axis == axis_ancestor_or_self)\n\t\t\t\t\tif (step_push(ns, n, alloc) & once)\n\t\t\t\t\t\treturn;\n\n\t\t\t\txml_node_struct* cur = n->parent;\n\t\t\t\t\n\t\t\t\twhile (cur)\n\t\t\t\t{\n\t\t\t\t\tif (step_push(ns, cur, alloc) & once)\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\n\t\t\t\t\tcur = cur->parent;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase axis_self:\n\t\t\t{\n\t\t\t\tstep_push(ns, n, alloc);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase axis_parent:\n\t\t\t{\n\t\t\t\tif (n->parent)\n\t\t\t\t\tstep_push(ns, n->parent, alloc);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tassert(!\"Unimplemented axis\");\n\t\t\t}\n\t\t}\n\t\t\n\t\ttemplate <class T> void step_fill(xpath_node_set_raw& ns, xml_attribute_struct* a, xml_node_struct* p, xpath_allocator* alloc, bool once, T v)\n\t\t{\n\t\t\tconst axis_t axis = T::axis;\n\n\t\t\tswitch (axis)\n\t\t\t{\n\t\t\tcase axis_ancestor:\n\t\t\tcase axis_ancestor_or_self:\n\t\t\t{\n\t\t\t\tif (axis == axis_ancestor_or_self && _test == nodetest_type_node) // reject attributes based on principal node type test\n\t\t\t\t\tif (step_push(ns, a, p, alloc) & once)\n\t\t\t\t\t\treturn;\n\n\t\t\t\txml_node_struct* cur = p;\n\t\t\t\t\n\t\t\t\twhile (cur)\n\t\t\t\t{\n\t\t\t\t\tif (step_push(ns, cur, alloc) & once)\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\n\t\t\t\t\tcur = cur->parent;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase axis_descendant_or_self:\n\t\t\tcase axis_self:\n\t\t\t{\n\t\t\t\tif (_test == nodetest_type_node) // reject attributes based on principal node type test\n\t\t\t\t\tstep_push(ns, a, p, alloc);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase axis_following:\n\t\t\t{\n\t\t\t\txml_node_struct* cur = p;\n\t\t\t\t\n\t\t\t\twhile (cur)\n\t\t\t\t{\n\t\t\t\t\tif (cur->first_child)\n\t\t\t\t\t\tcur = cur->first_child;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (!cur->next_sibling)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcur = cur->parent;\n\n\t\t\t\t\t\t\tif (!cur) return;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcur = cur->next_sibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (step_push(ns, cur, alloc) & once)\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase axis_parent:\n\t\t\t{\n\t\t\t\tstep_push(ns, p, alloc);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase axis_preceding:\n\t\t\t{\n\t\t\t\t// preceding:: axis does not include attribute nodes and attribute ancestors (they are the same as parent's ancestors), so we can reuse node preceding\n\t\t\t\tstep_fill(ns, p, alloc, once, v);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tassert(!\"Unimplemented axis\");\n\t\t\t}\n\t\t}\n\n\t\ttemplate <class T> void step_fill(xpath_node_set_raw& ns, const xpath_node& xn, xpath_allocator* alloc, bool once, T v)\n\t\t{\n\t\t\tconst axis_t axis = T::axis;\n\t\t\tconst bool axis_has_attributes = (axis == axis_ancestor || axis == axis_ancestor_or_self || axis == axis_descendant_or_self || axis == axis_following || axis == axis_parent || axis == axis_preceding || axis == axis_self);\n\n\t\t\tif (xn.node())\n\t\t\t\tstep_fill(ns, xn.node().internal_object(), alloc, once, v);\n\t\t\telse if (axis_has_attributes && xn.attribute() && xn.parent())\n\t\t\t\tstep_fill(ns, xn.attribute().internal_object(), xn.parent().internal_object(), alloc, once, v);\n\t\t}\n\n\t\ttemplate <class T> xpath_node_set_raw step_do(const xpath_context& c, const xpath_stack& stack, nodeset_eval_t eval, T v)\n\t\t{\n\t\t\tconst axis_t axis = T::axis;\n\t\t\tconst bool axis_reverse = (axis == axis_ancestor || axis == axis_ancestor_or_self || axis == axis_preceding || axis == axis_preceding_sibling);\n\t\t\tconst xpath_node_set::type_t axis_type = axis_reverse ? xpath_node_set::type_sorted_reverse : xpath_node_set::type_sorted;\n\n\t\t\tbool once =\n\t\t\t\t(axis == axis_attribute && _test == nodetest_name) ||\n\t\t\t\t(!_right && eval_once(axis_type, eval)) ||\n\t\t\t\t(_right && !_right->_next && _right->_test == predicate_constant_one);\n\n\t\t\txpath_node_set_raw ns;\n\t\t\tns.set_type(axis_type);\n\n\t\t\tif (_left)\n\t\t\t{\n\t\t\t\txpath_node_set_raw s = _left->eval_node_set(c, stack, nodeset_eval_all);\n\n\t\t\t\t// self axis preserves the original order\n\t\t\t\tif (axis == axis_self) ns.set_type(s.type());\n\n\t\t\t\tfor (const xpath_node* it = s.begin(); it != s.end(); ++it)\n\t\t\t\t{\n\t\t\t\t\tsize_t size = ns.size();\n\n\t\t\t\t\t// in general, all axes generate elements in a particular order, but there is no order guarantee if axis is applied to two nodes\n\t\t\t\t\tif (axis != axis_self && size != 0) ns.set_type(xpath_node_set::type_unsorted);\n\t\t\t\t\t\n\t\t\t\t\tstep_fill(ns, *it, stack.result, once, v);\n\t\t\t\t\tif (_right) apply_predicates(ns, size, stack, eval);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstep_fill(ns, c.n, stack.result, once, v);\n\t\t\t\tif (_right) apply_predicates(ns, 0, stack, eval);\n\t\t\t}\n\n\t\t\t// child, attribute and self axes always generate unique set of nodes\n\t\t\t// for other axis, if the set stayed sorted, it stayed unique because the traversal algorithms do not visit the same node twice\n\t\t\tif (axis != axis_child && axis != axis_attribute && axis != axis_self && ns.type() == xpath_node_set::type_unsorted)\n\t\t\t\tns.remove_duplicates();\n\n\t\t\treturn ns;\n\t\t}\n\t\t\n\tpublic:\n\t\txpath_ast_node(ast_type_t type, xpath_value_type rettype_, const char_t* value):\n\t\t\t_type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0)\n\t\t{\n\t\t\tassert(type == ast_string_constant);\n\t\t\t_data.string = value;\n\t\t}\n\n\t\txpath_ast_node(ast_type_t type, xpath_value_type rettype_, double value):\n\t\t\t_type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0)\n\t\t{\n\t\t\tassert(type == ast_number_constant);\n\t\t\t_data.number = value;\n\t\t}\n\t\t\n\t\txpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_variable* value):\n\t\t\t_type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0)\n\t\t{\n\t\t\tassert(type == ast_variable);\n\t\t\t_data.variable = value;\n\t\t}\n\t\t\n\t\txpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_ast_node* left = 0, xpath_ast_node* right = 0):\n\t\t\t_type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(left), _right(right), _next(0)\n\t\t{\n\t\t}\n\n\t\txpath_ast_node(ast_type_t type, xpath_ast_node* left, axis_t axis, nodetest_t test, const char_t* contents):\n\t\t\t_type(static_cast<char>(type)), _rettype(xpath_type_node_set), _axis(static_cast<char>(axis)), _test(static_cast<char>(test)), _left(left), _right(0), _next(0)\n\t\t{\n\t\t\tassert(type == ast_step);\n\t\t\t_data.nodetest = contents;\n\t\t}\n\n\t\txpath_ast_node(ast_type_t type, xpath_ast_node* left, xpath_ast_node* right, predicate_t test):\n\t\t\t_type(static_cast<char>(type)), _rettype(xpath_type_node_set), _axis(0), _test(static_cast<char>(test)), _left(left), _right(right), _next(0)\n\t\t{\n\t\t\tassert(type == ast_filter || type == ast_predicate);\n\t\t}\n\n\t\tvoid set_next(xpath_ast_node* value)\n\t\t{\n\t\t\t_next = value;\n\t\t}\n\n\t\tvoid set_right(xpath_ast_node* value)\n\t\t{\n\t\t\t_right = value;\n\t\t}\n\n\t\tbool eval_boolean(const xpath_context& c, const xpath_stack& stack)\n\t\t{\n\t\t\tswitch (_type)\n\t\t\t{\n\t\t\tcase ast_op_or:\n\t\t\t\treturn _left->eval_boolean(c, stack) || _right->eval_boolean(c, stack);\n\t\t\t\t\n\t\t\tcase ast_op_and:\n\t\t\t\treturn _left->eval_boolean(c, stack) && _right->eval_boolean(c, stack);\n\t\t\t\t\n\t\t\tcase ast_op_equal:\n\t\t\t\treturn compare_eq(_left, _right, c, stack, equal_to());\n\n\t\t\tcase ast_op_not_equal:\n\t\t\t\treturn compare_eq(_left, _right, c, stack, not_equal_to());\n\t\n\t\t\tcase ast_op_less:\n\t\t\t\treturn compare_rel(_left, _right, c, stack, less());\n\t\t\t\n\t\t\tcase ast_op_greater:\n\t\t\t\treturn compare_rel(_right, _left, c, stack, less());\n\n\t\t\tcase ast_op_less_or_equal:\n\t\t\t\treturn compare_rel(_left, _right, c, stack, less_equal());\n\t\t\t\n\t\t\tcase ast_op_greater_or_equal:\n\t\t\t\treturn compare_rel(_right, _left, c, stack, less_equal());\n\n\t\t\tcase ast_func_starts_with:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\txpath_string lr = _left->eval_string(c, stack);\n\t\t\t\txpath_string rr = _right->eval_string(c, stack);\n\n\t\t\t\treturn starts_with(lr.c_str(), rr.c_str());\n\t\t\t}\n\n\t\t\tcase ast_func_contains:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\txpath_string lr = _left->eval_string(c, stack);\n\t\t\t\txpath_string rr = _right->eval_string(c, stack);\n\n\t\t\t\treturn find_substring(lr.c_str(), rr.c_str()) != 0;\n\t\t\t}\n\n\t\t\tcase ast_func_boolean:\n\t\t\t\treturn _left->eval_boolean(c, stack);\n\t\t\t\t\n\t\t\tcase ast_func_not:\n\t\t\t\treturn !_left->eval_boolean(c, stack);\n\t\t\t\t\n\t\t\tcase ast_func_true:\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\tcase ast_func_false:\n\t\t\t\treturn false;\n\n\t\t\tcase ast_func_lang:\n\t\t\t{\n\t\t\t\tif (c.n.attribute()) return false;\n\t\t\t\t\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\txpath_string lang = _left->eval_string(c, stack);\n\t\t\t\t\n\t\t\t\tfor (xml_node n = c.n.node(); n; n = n.parent())\n\t\t\t\t{\n\t\t\t\t\txml_attribute a = n.attribute(PUGIXML_TEXT(\"xml:lang\"));\n\t\t\t\t\t\n\t\t\t\t\tif (a)\n\t\t\t\t\t{\n\t\t\t\t\t\tconst char_t* value = a.value();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// strnicmp / strncasecmp is not portable\n\t\t\t\t\t\tfor (const char_t* lit = lang.c_str(); *lit; ++lit)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (tolower_ascii(*lit) != tolower_ascii(*value)) return false;\n\t\t\t\t\t\t\t++value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn *value == 0 || *value == '-';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tcase ast_opt_compare_attribute:\n\t\t\t{\n\t\t\t\tconst char_t* value = (_right->_type == ast_string_constant) ? _right->_data.string : _right->_data.variable->get_string();\n\n\t\t\t\txml_attribute attr = c.n.node().attribute(_left->_data.nodetest);\n\n\t\t\t\treturn attr && strequal(attr.value(), value) && is_xpath_attribute(attr.name());\n\t\t\t}\n\n\t\t\tcase ast_variable:\n\t\t\t{\n\t\t\t\tassert(_rettype == _data.variable->type());\n\n\t\t\t\tif (_rettype == xpath_type_boolean)\n\t\t\t\t\treturn _data.variable->get_boolean();\n\n\t\t\t\t// fallthrough to type conversion\n\t\t\t}\n\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tswitch (_rettype)\n\t\t\t\t{\n\t\t\t\tcase xpath_type_number:\n\t\t\t\t\treturn convert_number_to_boolean(eval_number(c, stack));\n\t\t\t\t\t\n\t\t\t\tcase xpath_type_string:\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\t\treturn !eval_string(c, stack).empty();\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tcase xpath_type_node_set:\t\t\t\t\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\t\treturn !eval_node_set(c, stack, nodeset_eval_any).empty();\n\t\t\t\t}\n\n\t\t\t\tdefault:\n\t\t\t\t\tassert(!\"Wrong expression for return type boolean\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdouble eval_number(const xpath_context& c, const xpath_stack& stack)\n\t\t{\n\t\t\tswitch (_type)\n\t\t\t{\n\t\t\tcase ast_op_add:\n\t\t\t\treturn _left->eval_number(c, stack) + _right->eval_number(c, stack);\n\t\t\t\t\n\t\t\tcase ast_op_subtract:\n\t\t\t\treturn _left->eval_number(c, stack) - _right->eval_number(c, stack);\n\n\t\t\tcase ast_op_multiply:\n\t\t\t\treturn _left->eval_number(c, stack) * _right->eval_number(c, stack);\n\n\t\t\tcase ast_op_divide:\n\t\t\t\treturn _left->eval_number(c, stack) / _right->eval_number(c, stack);\n\n\t\t\tcase ast_op_mod:\n\t\t\t\treturn fmod(_left->eval_number(c, stack), _right->eval_number(c, stack));\n\n\t\t\tcase ast_op_negate:\n\t\t\t\treturn -_left->eval_number(c, stack);\n\n\t\t\tcase ast_number_constant:\n\t\t\t\treturn _data.number;\n\n\t\t\tcase ast_func_last:\n\t\t\t\treturn static_cast<double>(c.size);\n\t\t\t\n\t\t\tcase ast_func_position:\n\t\t\t\treturn static_cast<double>(c.position);\n\n\t\t\tcase ast_func_count:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\treturn static_cast<double>(_left->eval_node_set(c, stack, nodeset_eval_all).size());\n\t\t\t}\n\t\t\t\n\t\t\tcase ast_func_string_length_0:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\treturn static_cast<double>(string_value(c.n, stack.result).length());\n\t\t\t}\n\t\t\t\n\t\t\tcase ast_func_string_length_1:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\treturn static_cast<double>(_left->eval_string(c, stack).length());\n\t\t\t}\n\t\t\t\n\t\t\tcase ast_func_number_0:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\treturn convert_string_to_number(string_value(c.n, stack.result).c_str());\n\t\t\t}\n\t\t\t\n\t\t\tcase ast_func_number_1:\n\t\t\t\treturn _left->eval_number(c, stack);\n\n\t\t\tcase ast_func_sum:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\tdouble r = 0;\n\t\t\t\t\n\t\t\t\txpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_all);\n\t\t\t\t\n\t\t\t\tfor (const xpath_node* it = ns.begin(); it != ns.end(); ++it)\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cri(stack.result);\n\n\t\t\t\t\tr += convert_string_to_number(string_value(*it, stack.result).c_str());\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn r;\n\t\t\t}\n\n\t\t\tcase ast_func_floor:\n\t\t\t{\n\t\t\t\tdouble r = _left->eval_number(c, stack);\n\t\t\t\t\n\t\t\t\treturn r == r ? floor(r) : r;\n\t\t\t}\n\n\t\t\tcase ast_func_ceiling:\n\t\t\t{\n\t\t\t\tdouble r = _left->eval_number(c, stack);\n\t\t\t\t\n\t\t\t\treturn r == r ? ceil(r) : r;\n\t\t\t}\n\n\t\t\tcase ast_func_round:\n\t\t\t\treturn round_nearest_nzero(_left->eval_number(c, stack));\n\t\t\t\n\t\t\tcase ast_variable:\n\t\t\t{\n\t\t\t\tassert(_rettype == _data.variable->type());\n\n\t\t\t\tif (_rettype == xpath_type_number)\n\t\t\t\t\treturn _data.variable->get_number();\n\n\t\t\t\t// fallthrough to type conversion\n\t\t\t}\n\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tswitch (_rettype)\n\t\t\t\t{\n\t\t\t\tcase xpath_type_boolean:\n\t\t\t\t\treturn eval_boolean(c, stack) ? 1 : 0;\n\t\t\t\t\t\n\t\t\t\tcase xpath_type_string:\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\t\treturn convert_string_to_number(eval_string(c, stack).c_str());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tcase xpath_type_node_set:\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\t\treturn convert_string_to_number(eval_string(c, stack).c_str());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tassert(!\"Wrong expression for return type number\");\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\txpath_string eval_string_concat(const xpath_context& c, const xpath_stack& stack)\n\t\t{\n\t\t\tassert(_type == ast_func_concat);\n\n\t\t\txpath_allocator_capture ct(stack.temp);\n\n\t\t\t// count the string number\n\t\t\tsize_t count = 1;\n\t\t\tfor (xpath_ast_node* nc = _right; nc; nc = nc->_next) count++;\n\n\t\t\t// gather all strings\n\t\t\txpath_string static_buffer[4];\n\t\t\txpath_string* buffer = static_buffer;\n\n\t\t\t// allocate on-heap for large concats\n\t\t\tif (count > sizeof(static_buffer) / sizeof(static_buffer[0]))\n\t\t\t{\n\t\t\t\tbuffer = static_cast<xpath_string*>(stack.temp->allocate(count * sizeof(xpath_string)));\n\t\t\t\tassert(buffer);\n\t\t\t}\n\n\t\t\t// evaluate all strings to temporary stack\n\t\t\txpath_stack swapped_stack = {stack.temp, stack.result};\n\n\t\t\tbuffer[0] = _left->eval_string(c, swapped_stack);\n\n\t\t\tsize_t pos = 1;\n\t\t\tfor (xpath_ast_node* n = _right; n; n = n->_next, ++pos) buffer[pos] = n->eval_string(c, swapped_stack);\n\t\t\tassert(pos == count);\n\n\t\t\t// get total length\n\t\t\tsize_t length = 0;\n\t\t\tfor (size_t i = 0; i < count; ++i) length += buffer[i].length();\n\n\t\t\t// create final string\n\t\t\tchar_t* result = static_cast<char_t*>(stack.result->allocate((length + 1) * sizeof(char_t)));\n\t\t\tassert(result);\n\n\t\t\tchar_t* ri = result;\n\n\t\t\tfor (size_t j = 0; j < count; ++j)\n\t\t\t\tfor (const char_t* bi = buffer[j].c_str(); *bi; ++bi)\n\t\t\t\t\t*ri++ = *bi;\n\n\t\t\t*ri = 0;\n\n\t\t\treturn xpath_string::from_heap_preallocated(result, ri);\n\t\t}\n\n\t\txpath_string eval_string(const xpath_context& c, const xpath_stack& stack)\n\t\t{\n\t\t\tswitch (_type)\n\t\t\t{\n\t\t\tcase ast_string_constant:\n\t\t\t\treturn xpath_string::from_const(_data.string);\n\t\t\t\n\t\t\tcase ast_func_local_name_0:\n\t\t\t{\n\t\t\t\txpath_node na = c.n;\n\t\t\t\t\n\t\t\t\treturn xpath_string::from_const(local_name(na));\n\t\t\t}\n\n\t\t\tcase ast_func_local_name_1:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\txpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);\n\t\t\t\txpath_node na = ns.first();\n\t\t\t\t\n\t\t\t\treturn xpath_string::from_const(local_name(na));\n\t\t\t}\n\n\t\t\tcase ast_func_name_0:\n\t\t\t{\n\t\t\t\txpath_node na = c.n;\n\t\t\t\t\n\t\t\t\treturn xpath_string::from_const(qualified_name(na));\n\t\t\t}\n\n\t\t\tcase ast_func_name_1:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\txpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);\n\t\t\t\txpath_node na = ns.first();\n\t\t\t\t\n\t\t\t\treturn xpath_string::from_const(qualified_name(na));\n\t\t\t}\n\n\t\t\tcase ast_func_namespace_uri_0:\n\t\t\t{\n\t\t\t\txpath_node na = c.n;\n\t\t\t\t\n\t\t\t\treturn xpath_string::from_const(namespace_uri(na));\n\t\t\t}\n\n\t\t\tcase ast_func_namespace_uri_1:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.result);\n\n\t\t\t\txpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);\n\t\t\t\txpath_node na = ns.first();\n\t\t\t\t\n\t\t\t\treturn xpath_string::from_const(namespace_uri(na));\n\t\t\t}\n\n\t\t\tcase ast_func_string_0:\n\t\t\t\treturn string_value(c.n, stack.result);\n\n\t\t\tcase ast_func_string_1:\n\t\t\t\treturn _left->eval_string(c, stack);\n\n\t\t\tcase ast_func_concat:\n\t\t\t\treturn eval_string_concat(c, stack);\n\n\t\t\tcase ast_func_substring_before:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.temp);\n\n\t\t\t\txpath_stack swapped_stack = {stack.temp, stack.result};\n\n\t\t\t\txpath_string s = _left->eval_string(c, swapped_stack);\n\t\t\t\txpath_string p = _right->eval_string(c, swapped_stack);\n\n\t\t\t\tconst char_t* pos = find_substring(s.c_str(), p.c_str());\n\t\t\t\t\n\t\t\t\treturn pos ? xpath_string::from_heap(s.c_str(), pos, stack.result) : xpath_string();\n\t\t\t}\n\t\t\t\n\t\t\tcase ast_func_substring_after:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.temp);\n\n\t\t\t\txpath_stack swapped_stack = {stack.temp, stack.result};\n\n\t\t\t\txpath_string s = _left->eval_string(c, swapped_stack);\n\t\t\t\txpath_string p = _right->eval_string(c, swapped_stack);\n\t\t\t\t\n\t\t\t\tconst char_t* pos = find_substring(s.c_str(), p.c_str());\n\t\t\t\tif (!pos) return xpath_string();\n\n\t\t\t\tconst char_t* rbegin = pos + p.length();\n\t\t\t\tconst char_t* rend = s.c_str() + s.length();\n\n\t\t\t\treturn s.uses_heap() ? xpath_string::from_heap(rbegin, rend, stack.result) : xpath_string::from_const(rbegin);\n\t\t\t}\n\n\t\t\tcase ast_func_substring_2:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.temp);\n\n\t\t\t\txpath_stack swapped_stack = {stack.temp, stack.result};\n\n\t\t\t\txpath_string s = _left->eval_string(c, swapped_stack);\n\t\t\t\tsize_t s_length = s.length();\n\n\t\t\t\tdouble first = round_nearest(_right->eval_number(c, stack));\n\t\t\t\t\n\t\t\t\tif (is_nan(first)) return xpath_string(); // NaN\n\t\t\t\telse if (first >= s_length + 1) return xpath_string();\n\t\t\t\t\n\t\t\t\tsize_t pos = first < 1 ? 1 : static_cast<size_t>(first);\n\t\t\t\tassert(1 <= pos && pos <= s_length + 1);\n\n\t\t\t\tconst char_t* rbegin = s.c_str() + (pos - 1);\n\t\t\t\tconst char_t* rend = s.c_str() + s.length();\n\t\t\t\t\n\t\t\t\treturn s.uses_heap() ? xpath_string::from_heap(rbegin, rend, stack.result) : xpath_string::from_const(rbegin);\n\t\t\t}\n\t\t\t\n\t\t\tcase ast_func_substring_3:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.temp);\n\n\t\t\t\txpath_stack swapped_stack = {stack.temp, stack.result};\n\n\t\t\t\txpath_string s = _left->eval_string(c, swapped_stack);\n\t\t\t\tsize_t s_length = s.length();\n\n\t\t\t\tdouble first = round_nearest(_right->eval_number(c, stack));\n\t\t\t\tdouble last = first + round_nearest(_right->_next->eval_number(c, stack));\n\t\t\t\t\n\t\t\t\tif (is_nan(first) || is_nan(last)) return xpath_string();\n\t\t\t\telse if (first >= s_length + 1) return xpath_string();\n\t\t\t\telse if (first >= last) return xpath_string();\n\t\t\t\telse if (last < 1) return xpath_string();\n\t\t\t\t\n\t\t\t\tsize_t pos = first < 1 ? 1 : static_cast<size_t>(first);\n\t\t\t\tsize_t end = last >= s_length + 1 ? s_length + 1 : static_cast<size_t>(last);\n\n\t\t\t\tassert(1 <= pos && pos <= end && end <= s_length + 1);\n\t\t\t\tconst char_t* rbegin = s.c_str() + (pos - 1);\n\t\t\t\tconst char_t* rend = s.c_str() + (end - 1);\n\n\t\t\t\treturn (end == s_length + 1 && !s.uses_heap()) ? xpath_string::from_const(rbegin) : xpath_string::from_heap(rbegin, rend, stack.result);\n\t\t\t}\n\n\t\t\tcase ast_func_normalize_space_0:\n\t\t\t{\n\t\t\t\txpath_string s = string_value(c.n, stack.result);\n\n\t\t\t\tchar_t* begin = s.data(stack.result);\n\t\t\t\tchar_t* end = normalize_space(begin);\n\n\t\t\t\treturn xpath_string::from_heap_preallocated(begin, end);\n\t\t\t}\n\n\t\t\tcase ast_func_normalize_space_1:\n\t\t\t{\n\t\t\t\txpath_string s = _left->eval_string(c, stack);\n\n\t\t\t\tchar_t* begin = s.data(stack.result);\n\t\t\t\tchar_t* end = normalize_space(begin);\n\t\t\t\n\t\t\t\treturn xpath_string::from_heap_preallocated(begin, end);\n\t\t\t}\n\n\t\t\tcase ast_func_translate:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.temp);\n\n\t\t\t\txpath_stack swapped_stack = {stack.temp, stack.result};\n\n\t\t\t\txpath_string s = _left->eval_string(c, stack);\n\t\t\t\txpath_string from = _right->eval_string(c, swapped_stack);\n\t\t\t\txpath_string to = _right->_next->eval_string(c, swapped_stack);\n\n\t\t\t\tchar_t* begin = s.data(stack.result);\n\t\t\t\tchar_t* end = translate(begin, from.c_str(), to.c_str(), to.length());\n\n\t\t\t\treturn xpath_string::from_heap_preallocated(begin, end);\n\t\t\t}\n\n\t\t\tcase ast_opt_translate_table:\n\t\t\t{\n\t\t\t\txpath_string s = _left->eval_string(c, stack);\n\n\t\t\t\tchar_t* begin = s.data(stack.result);\n\t\t\t\tchar_t* end = translate_table(begin, _data.table);\n\n\t\t\t\treturn xpath_string::from_heap_preallocated(begin, end);\n\t\t\t}\n\n\t\t\tcase ast_variable:\n\t\t\t{\n\t\t\t\tassert(_rettype == _data.variable->type());\n\n\t\t\t\tif (_rettype == xpath_type_string)\n\t\t\t\t\treturn xpath_string::from_const(_data.variable->get_string());\n\n\t\t\t\t// fallthrough to type conversion\n\t\t\t}\n\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tswitch (_rettype)\n\t\t\t\t{\n\t\t\t\tcase xpath_type_boolean:\n\t\t\t\t\treturn xpath_string::from_const(eval_boolean(c, stack) ? PUGIXML_TEXT(\"true\") : PUGIXML_TEXT(\"false\"));\n\t\t\t\t\t\n\t\t\t\tcase xpath_type_number:\n\t\t\t\t\treturn convert_number_to_string(eval_number(c, stack), stack.result);\n\t\t\t\t\t\n\t\t\t\tcase xpath_type_node_set:\n\t\t\t\t{\n\t\t\t\t\txpath_allocator_capture cr(stack.temp);\n\n\t\t\t\t\txpath_stack swapped_stack = {stack.temp, stack.result};\n\n\t\t\t\t\txpath_node_set_raw ns = eval_node_set(c, swapped_stack, nodeset_eval_first);\n\t\t\t\t\treturn ns.empty() ? xpath_string() : string_value(ns.first(), stack.result);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tassert(!\"Wrong expression for return type string\");\n\t\t\t\t\treturn xpath_string();\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\txpath_node_set_raw eval_node_set(const xpath_context& c, const xpath_stack& stack, nodeset_eval_t eval)\n\t\t{\n\t\t\tswitch (_type)\n\t\t\t{\n\t\t\tcase ast_op_union:\n\t\t\t{\n\t\t\t\txpath_allocator_capture cr(stack.temp);\n\n\t\t\t\txpath_stack swapped_stack = {stack.temp, stack.result};\n\n\t\t\t\txpath_node_set_raw ls = _left->eval_node_set(c, swapped_stack, eval);\n\t\t\t\txpath_node_set_raw rs = _right->eval_node_set(c, stack, eval);\n\n\t\t\t\t// we can optimize merging two sorted sets, but this is a very rare operation, so don't bother\n\t\t\t\trs.set_type(xpath_node_set::type_unsorted);\n\n\t\t\t\trs.append(ls.begin(), ls.end(), stack.result);\n\t\t\t\trs.remove_duplicates();\n\n\t\t\t\treturn rs;\n\t\t\t}\n\n\t\t\tcase ast_filter:\n\t\t\t{\n\t\t\t\txpath_node_set_raw set = _left->eval_node_set(c, stack, _test == predicate_constant_one ? nodeset_eval_first : nodeset_eval_all);\n\n\t\t\t\t// either expression is a number or it contains position() call; sort by document order\n\t\t\t\tif (_test != predicate_posinv) set.sort_do();\n\n\t\t\t\tbool once = eval_once(set.type(), eval);\n\n\t\t\t\tapply_predicate(set, 0, stack, once);\n\t\t\t\n\t\t\t\treturn set;\n\t\t\t}\n\t\t\t\n\t\t\tcase ast_func_id:\n\t\t\t\treturn xpath_node_set_raw();\n\t\t\t\n\t\t\tcase ast_step:\n\t\t\t{\n\t\t\t\tswitch (_axis)\n\t\t\t\t{\n\t\t\t\tcase axis_ancestor:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_ancestor>());\n\t\t\t\t\t\n\t\t\t\tcase axis_ancestor_or_self:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_ancestor_or_self>());\n\n\t\t\t\tcase axis_attribute:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_attribute>());\n\n\t\t\t\tcase axis_child:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_child>());\n\t\t\t\t\n\t\t\t\tcase axis_descendant:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_descendant>());\n\n\t\t\t\tcase axis_descendant_or_self:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_descendant_or_self>());\n\n\t\t\t\tcase axis_following:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_following>());\n\t\t\t\t\n\t\t\t\tcase axis_following_sibling:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_following_sibling>());\n\t\t\t\t\n\t\t\t\tcase axis_namespace:\n\t\t\t\t\t// namespaced axis is not supported\n\t\t\t\t\treturn xpath_node_set_raw();\n\t\t\t\t\n\t\t\t\tcase axis_parent:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_parent>());\n\t\t\t\t\n\t\t\t\tcase axis_preceding:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_preceding>());\n\n\t\t\t\tcase axis_preceding_sibling:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_preceding_sibling>());\n\t\t\t\t\n\t\t\t\tcase axis_self:\n\t\t\t\t\treturn step_do(c, stack, eval, axis_to_type<axis_self>());\n\n\t\t\t\tdefault:\n\t\t\t\t\tassert(!\"Unknown axis\");\n\t\t\t\t\treturn xpath_node_set_raw();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcase ast_step_root:\n\t\t\t{\n\t\t\t\tassert(!_right); // root step can't have any predicates\n\n\t\t\t\txpath_node_set_raw ns;\n\n\t\t\t\tns.set_type(xpath_node_set::type_sorted);\n\n\t\t\t\tif (c.n.node()) ns.push_back(c.n.node().root(), stack.result);\n\t\t\t\telse if (c.n.attribute()) ns.push_back(c.n.parent().root(), stack.result);\n\n\t\t\t\treturn ns;\n\t\t\t}\n\n\t\t\tcase ast_variable:\n\t\t\t{\n\t\t\t\tassert(_rettype == _data.variable->type());\n\n\t\t\t\tif (_rettype == xpath_type_node_set)\n\t\t\t\t{\n\t\t\t\t\tconst xpath_node_set& s = _data.variable->get_node_set();\n\n\t\t\t\t\txpath_node_set_raw ns;\n\n\t\t\t\t\tns.set_type(s.type());\n\t\t\t\t\tns.append(s.begin(), s.end(), stack.result);\n\n\t\t\t\t\treturn ns;\n\t\t\t\t}\n\n\t\t\t\t// fallthrough to type conversion\n\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\tassert(!\"Wrong expression for return type node set\");\n\t\t\t\treturn xpath_node_set_raw();\n\t\t\t}\n\t\t}\n\n\t\tvoid optimize(xpath_allocator* alloc)\n\t\t{\n\t\t\tif (_left) _left->optimize(alloc);\n\t\t\tif (_right) _right->optimize(alloc);\n\t\t\tif (_next) _next->optimize(alloc);\n\n\t\t\t// Rewrite [position()=expr] with [expr]\n\t\t\t// Note that this step has to go before classification to recognize [position()=1]\n\t\t\tif ((_type == ast_filter || _type == ast_predicate) &&\n\t\t\t\t_right->_type == ast_op_equal && _right->_left->_type == ast_func_position && _right->_right->_rettype == xpath_type_number)\n\t\t\t{\n\t\t\t\t_right = _right->_right;\n\t\t\t}\n\n\t\t\t// Classify filter/predicate ops to perform various optimizations during evaluation\n\t\t\tif (_type == ast_filter || _type == ast_predicate)\n\t\t\t{\n\t\t\t\tassert(_test == predicate_default);\n\n\t\t\t\tif (_right->_type == ast_number_constant && _right->_data.number == 1.0)\n\t\t\t\t\t_test = predicate_constant_one;\n\t\t\t\telse if (_right->_rettype == xpath_type_number && (_right->_type == ast_number_constant || _right->_type == ast_variable || _right->_type == ast_func_last))\n\t\t\t\t\t_test = predicate_constant;\n\t\t\t\telse if (_right->_rettype != xpath_type_number && _right->is_posinv_expr())\n\t\t\t\t\t_test = predicate_posinv;\n\t\t\t}\n\n\t\t\t// Rewrite descendant-or-self::node()/child::foo with descendant::foo\n\t\t\t// The former is a full form of //foo, the latter is much faster since it executes the node test immediately\n\t\t\t// Do a similar kind of rewrite for self/descendant/descendant-or-self axes\n\t\t\t// Note that we only rewrite positionally invariant steps (//foo[1] != /descendant::foo[1])\n\t\t\tif (_type == ast_step && (_axis == axis_child || _axis == axis_self || _axis == axis_descendant || _axis == axis_descendant_or_self) && _left &&\n\t\t\t\t_left->_type == ast_step && _left->_axis == axis_descendant_or_self && _left->_test == nodetest_type_node && !_left->_right &&\n\t\t\t\tis_posinv_step())\n\t\t\t{\n\t\t\t\tif (_axis == axis_child || _axis == axis_descendant)\n\t\t\t\t\t_axis = axis_descendant;\n\t\t\t\telse\n\t\t\t\t\t_axis = axis_descendant_or_self;\n\n\t\t\t\t_left = _left->_left;\n\t\t\t}\n\n\t\t\t// Use optimized lookup table implementation for translate() with constant arguments\n\t\t\tif (_type == ast_func_translate && _right->_type == ast_string_constant && _right->_next->_type == ast_string_constant)\n\t\t\t{\n\t\t\t\tunsigned char* table = translate_table_generate(alloc, _right->_data.string, _right->_next->_data.string);\n\n\t\t\t\tif (table)\n\t\t\t\t{\n\t\t\t\t\t_type = ast_opt_translate_table;\n\t\t\t\t\t_data.table = table;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Use optimized path for @attr = 'value' or @attr = $value\n\t\t\tif (_type == ast_op_equal &&\n\t\t\t\t_left->_type == ast_step && _left->_axis == axis_attribute && _left->_test == nodetest_name && !_left->_left && !_left->_right &&\n\t\t\t\t(_right->_type == ast_string_constant || (_right->_type == ast_variable && _right->_rettype == xpath_type_string)))\n\t\t\t{\n\t\t\t\t_type = ast_opt_compare_attribute;\n\t\t\t}\n\t\t}\n\t\t\n\t\tbool is_posinv_expr() const\n\t\t{\n\t\t\tswitch (_type)\n\t\t\t{\n\t\t\tcase ast_func_position:\n\t\t\tcase ast_func_last:\n\t\t\t\treturn false;\n\n\t\t\tcase ast_string_constant:\n\t\t\tcase ast_number_constant:\n\t\t\tcase ast_variable:\n\t\t\t\treturn true;\n\n\t\t\tcase ast_step:\n\t\t\tcase ast_step_root:\n\t\t\t\treturn true;\n\n\t\t\tcase ast_predicate:\n\t\t\tcase ast_filter:\n\t\t\t\treturn true;\n\n\t\t\tdefault:\n\t\t\t\tif (_left && !_left->is_posinv_expr()) return false;\n\t\t\t\t\n\t\t\t\tfor (xpath_ast_node* n = _right; n; n = n->_next)\n\t\t\t\t\tif (!n->is_posinv_expr()) return false;\n\t\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tbool is_posinv_step() const\n\t\t{\n\t\t\tassert(_type == ast_step);\n\n\t\t\tfor (xpath_ast_node* n = _right; n; n = n->_next)\n\t\t\t{\n\t\t\t\tassert(n->_type == ast_predicate);\n\n\t\t\t\tif (n->_test != predicate_posinv)\n\t\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\txpath_value_type rettype() const\n\t\t{\n\t\t\treturn static_cast<xpath_value_type>(_rettype);\n\t\t}\n\t};\n\n\tstruct xpath_parser\n\t{\n\t\txpath_allocator* _alloc;\n\t\txpath_lexer _lexer;\n\n\t\tconst char_t* _query;\n\t\txpath_variable_set* _variables;\n\n\t\txpath_parse_result* _result;\n\n\t\tchar_t _scratch[32];\n\n\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\tjmp_buf _error_handler;\n\t#endif\n\n\t\tvoid throw_error(const char* message)\n\t\t{\n\t\t\t_result->error = message;\n\t\t\t_result->offset = _lexer.current_pos() - _query;\n\n\t\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\t\tlongjmp(_error_handler, 1);\n\t\t#else\n\t\t\tthrow xpath_exception(*_result);\n\t\t#endif\n\t\t}\n\n\t\tvoid throw_error_oom()\n\t\t{\n\t\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\t\tthrow_error(\"Out of memory\");\n\t\t#else\n\t\t\tthrow std::bad_alloc();\n\t\t#endif\n\t\t}\n\n\t\tvoid* alloc_node()\n\t\t{\n\t\t\tvoid* result = _alloc->allocate_nothrow(sizeof(xpath_ast_node));\n\n\t\t\tif (!result) throw_error_oom();\n\n\t\t\treturn result;\n\t\t}\n\n\t\tconst char_t* alloc_string(const xpath_lexer_string& value)\n\t\t{\n\t\t\tif (value.begin)\n\t\t\t{\n\t\t\t\tsize_t length = static_cast<size_t>(value.end - value.begin);\n\n\t\t\t\tchar_t* c = static_cast<char_t*>(_alloc->allocate_nothrow((length + 1) * sizeof(char_t)));\n\t\t\t\tif (!c) throw_error_oom();\n\t\t\t\tassert(c); // workaround for clang static analysis\n\n\t\t\t\tmemcpy(c, value.begin, length * sizeof(char_t));\n\t\t\t\tc[length] = 0;\n\n\t\t\t\treturn c;\n\t\t\t}\n\t\t\telse return 0;\n\t\t}\n\n\t\txpath_ast_node* parse_function_helper(ast_type_t type0, ast_type_t type1, size_t argc, xpath_ast_node* args[2])\n\t\t{\n\t\t\tassert(argc <= 1);\n\n\t\t\tif (argc == 1 && args[0]->rettype() != xpath_type_node_set) throw_error(\"Function has to be applied to node set\");\n\n\t\t\treturn new (alloc_node()) xpath_ast_node(argc == 0 ? type0 : type1, xpath_type_string, args[0]);\n\t\t}\n\n\t\txpath_ast_node* parse_function(const xpath_lexer_string& name, size_t argc, xpath_ast_node* args[2])\n\t\t{\n\t\t\tswitch (name.begin[0])\n\t\t\t{\n\t\t\tcase 'b':\n\t\t\t\tif (name == PUGIXML_TEXT(\"boolean\") && argc == 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_boolean, xpath_type_boolean, args[0]);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'c':\n\t\t\t\tif (name == PUGIXML_TEXT(\"count\") && argc == 1)\n\t\t\t\t{\n\t\t\t\t\tif (args[0]->rettype() != xpath_type_node_set) throw_error(\"Function has to be applied to node set\");\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_count, xpath_type_number, args[0]);\n\t\t\t\t}\n\t\t\t\telse if (name == PUGIXML_TEXT(\"contains\") && argc == 2)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_contains, xpath_type_boolean, args[0], args[1]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"concat\") && argc >= 2)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_concat, xpath_type_string, args[0], args[1]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"ceiling\") && argc == 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_ceiling, xpath_type_number, args[0]);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'f':\n\t\t\t\tif (name == PUGIXML_TEXT(\"false\") && argc == 0)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_false, xpath_type_boolean);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"floor\") && argc == 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_floor, xpath_type_number, args[0]);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'i':\n\t\t\t\tif (name == PUGIXML_TEXT(\"id\") && argc == 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_id, xpath_type_node_set, args[0]);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'l':\n\t\t\t\tif (name == PUGIXML_TEXT(\"last\") && argc == 0)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_last, xpath_type_number);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"lang\") && argc == 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_lang, xpath_type_boolean, args[0]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"local-name\") && argc <= 1)\n\t\t\t\t\treturn parse_function_helper(ast_func_local_name_0, ast_func_local_name_1, argc, args);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'n':\n\t\t\t\tif (name == PUGIXML_TEXT(\"name\") && argc <= 1)\n\t\t\t\t\treturn parse_function_helper(ast_func_name_0, ast_func_name_1, argc, args);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"namespace-uri\") && argc <= 1)\n\t\t\t\t\treturn parse_function_helper(ast_func_namespace_uri_0, ast_func_namespace_uri_1, argc, args);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"normalize-space\") && argc <= 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_normalize_space_0 : ast_func_normalize_space_1, xpath_type_string, args[0], args[1]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"not\") && argc == 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_not, xpath_type_boolean, args[0]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"number\") && argc <= 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_number_0 : ast_func_number_1, xpath_type_number, args[0]);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'p':\n\t\t\t\tif (name == PUGIXML_TEXT(\"position\") && argc == 0)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_position, xpath_type_number);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'r':\n\t\t\t\tif (name == PUGIXML_TEXT(\"round\") && argc == 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_round, xpath_type_number, args[0]);\n\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 's':\n\t\t\t\tif (name == PUGIXML_TEXT(\"string\") && argc <= 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_0 : ast_func_string_1, xpath_type_string, args[0]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"string-length\") && argc <= 1)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_number, args[0]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"starts-with\") && argc == 2)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_starts_with, xpath_type_boolean, args[0], args[1]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"substring-before\") && argc == 2)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_substring_before, xpath_type_string, args[0], args[1]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"substring-after\") && argc == 2)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_substring_after, xpath_type_string, args[0], args[1]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"substring\") && (argc == 2 || argc == 3))\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(argc == 2 ? ast_func_substring_2 : ast_func_substring_3, xpath_type_string, args[0], args[1]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"sum\") && argc == 1)\n\t\t\t\t{\n\t\t\t\t\tif (args[0]->rettype() != xpath_type_node_set) throw_error(\"Function has to be applied to node set\");\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_sum, xpath_type_number, args[0]);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 't':\n\t\t\t\tif (name == PUGIXML_TEXT(\"translate\") && argc == 3)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_translate, xpath_type_string, args[0], args[1]);\n\t\t\t\telse if (name == PUGIXML_TEXT(\"true\") && argc == 0)\n\t\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_func_true, xpath_type_boolean);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tthrow_error(\"Unrecognized function or wrong parameter count\");\n\n\t\t\treturn 0;\n\t\t}\n\n\t\taxis_t parse_axis_name(const xpath_lexer_string& name, bool& specified)\n\t\t{\n\t\t\tspecified = true;\n\n\t\t\tswitch (name.begin[0])\n\t\t\t{\n\t\t\tcase 'a':\n\t\t\t\tif (name == PUGIXML_TEXT(\"ancestor\"))\n\t\t\t\t\treturn axis_ancestor;\n\t\t\t\telse if (name == PUGIXML_TEXT(\"ancestor-or-self\"))\n\t\t\t\t\treturn axis_ancestor_or_self;\n\t\t\t\telse if (name == PUGIXML_TEXT(\"attribute\"))\n\t\t\t\t\treturn axis_attribute;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'c':\n\t\t\t\tif (name == PUGIXML_TEXT(\"child\"))\n\t\t\t\t\treturn axis_child;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'd':\n\t\t\t\tif (name == PUGIXML_TEXT(\"descendant\"))\n\t\t\t\t\treturn axis_descendant;\n\t\t\t\telse if (name == PUGIXML_TEXT(\"descendant-or-self\"))\n\t\t\t\t\treturn axis_descendant_or_self;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'f':\n\t\t\t\tif (name == PUGIXML_TEXT(\"following\"))\n\t\t\t\t\treturn axis_following;\n\t\t\t\telse if (name == PUGIXML_TEXT(\"following-sibling\"))\n\t\t\t\t\treturn axis_following_sibling;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'n':\n\t\t\t\tif (name == PUGIXML_TEXT(\"namespace\"))\n\t\t\t\t\treturn axis_namespace;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'p':\n\t\t\t\tif (name == PUGIXML_TEXT(\"parent\"))\n\t\t\t\t\treturn axis_parent;\n\t\t\t\telse if (name == PUGIXML_TEXT(\"preceding\"))\n\t\t\t\t\treturn axis_preceding;\n\t\t\t\telse if (name == PUGIXML_TEXT(\"preceding-sibling\"))\n\t\t\t\t\treturn axis_preceding_sibling;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 's':\n\t\t\t\tif (name == PUGIXML_TEXT(\"self\"))\n\t\t\t\t\treturn axis_self;\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tspecified = false;\n\t\t\treturn axis_child;\n\t\t}\n\n\t\tnodetest_t parse_node_test_type(const xpath_lexer_string& name)\n\t\t{\n\t\t\tswitch (name.begin[0])\n\t\t\t{\n\t\t\tcase 'c':\n\t\t\t\tif (name == PUGIXML_TEXT(\"comment\"))\n\t\t\t\t\treturn nodetest_type_comment;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'n':\n\t\t\t\tif (name == PUGIXML_TEXT(\"node\"))\n\t\t\t\t\treturn nodetest_type_node;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'p':\n\t\t\t\tif (name == PUGIXML_TEXT(\"processing-instruction\"))\n\t\t\t\t\treturn nodetest_type_pi;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 't':\n\t\t\t\tif (name == PUGIXML_TEXT(\"text\"))\n\t\t\t\t\treturn nodetest_type_text;\n\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn nodetest_none;\n\t\t}\n\n\t\t// PrimaryExpr ::= VariableReference | '(' Expr ')' | Literal | Number | FunctionCall\n\t\txpath_ast_node* parse_primary_expression()\n\t\t{\n\t\t\tswitch (_lexer.current())\n\t\t\t{\n\t\t\tcase lex_var_ref:\n\t\t\t{\n\t\t\t\txpath_lexer_string name = _lexer.contents();\n\n\t\t\t\tif (!_variables)\n\t\t\t\t\tthrow_error(\"Unknown variable: variable set is not provided\");\n\n\t\t\t\txpath_variable* var = get_variable_scratch(_scratch, _variables, name.begin, name.end);\n\n\t\t\t\tif (!var)\n\t\t\t\t\tthrow_error(\"Unknown variable: variable set does not contain the given name\");\n\n\t\t\t\t_lexer.next();\n\n\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_variable, var->type(), var);\n\t\t\t}\n\n\t\t\tcase lex_open_brace:\n\t\t\t{\n\t\t\t\t_lexer.next();\n\n\t\t\t\txpath_ast_node* n = parse_expression();\n\n\t\t\t\tif (_lexer.current() != lex_close_brace)\n\t\t\t\t\tthrow_error(\"Unmatched braces\");\n\n\t\t\t\t_lexer.next();\n\n\t\t\t\treturn n;\n\t\t\t}\n\n\t\t\tcase lex_quoted_string:\n\t\t\t{\n\t\t\t\tconst char_t* value = alloc_string(_lexer.contents());\n\n\t\t\t\txpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_string_constant, xpath_type_string, value);\n\t\t\t\t_lexer.next();\n\n\t\t\t\treturn n;\n\t\t\t}\n\n\t\t\tcase lex_number:\n\t\t\t{\n\t\t\t\tdouble value = 0;\n\n\t\t\t\tif (!convert_string_to_number_scratch(_scratch, _lexer.contents().begin, _lexer.contents().end, &value))\n\t\t\t\t\tthrow_error_oom();\n\n\t\t\t\txpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_number_constant, xpath_type_number, value);\n\t\t\t\t_lexer.next();\n\n\t\t\t\treturn n;\n\t\t\t}\n\n\t\t\tcase lex_string:\n\t\t\t{\n\t\t\t\txpath_ast_node* args[2] = {0};\n\t\t\t\tsize_t argc = 0;\n\t\t\t\t\n\t\t\t\txpath_lexer_string function = _lexer.contents();\n\t\t\t\t_lexer.next();\n\t\t\t\t\n\t\t\t\txpath_ast_node* last_arg = 0;\n\t\t\t\t\n\t\t\t\tif (_lexer.current() != lex_open_brace)\n\t\t\t\t\tthrow_error(\"Unrecognized function call\");\n\t\t\t\t_lexer.next();\n\n\t\t\t\tif (_lexer.current() != lex_close_brace)\n\t\t\t\t\targs[argc++] = parse_expression();\n\n\t\t\t\twhile (_lexer.current() != lex_close_brace)\n\t\t\t\t{\n\t\t\t\t\tif (_lexer.current() != lex_comma)\n\t\t\t\t\t\tthrow_error(\"No comma between function arguments\");\n\t\t\t\t\t_lexer.next();\n\t\t\t\t\t\n\t\t\t\t\txpath_ast_node* n = parse_expression();\n\t\t\t\t\t\n\t\t\t\t\tif (argc < 2) args[argc] = n;\n\t\t\t\t\telse last_arg->set_next(n);\n\n\t\t\t\t\targc++;\n\t\t\t\t\tlast_arg = n;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_lexer.next();\n\n\t\t\t\treturn parse_function(function, argc, args);\n\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\tthrow_error(\"Unrecognizable primary expression\");\n\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// FilterExpr ::= PrimaryExpr | FilterExpr Predicate\n\t\t// Predicate ::= '[' PredicateExpr ']'\n\t\t// PredicateExpr ::= Expr\n\t\txpath_ast_node* parse_filter_expression()\n\t\t{\n\t\t\txpath_ast_node* n = parse_primary_expression();\n\n\t\t\twhile (_lexer.current() == lex_open_square_brace)\n\t\t\t{\n\t\t\t\t_lexer.next();\n\n\t\t\t\txpath_ast_node* expr = parse_expression();\n\n\t\t\t\tif (n->rettype() != xpath_type_node_set) throw_error(\"Predicate has to be applied to node set\");\n\n\t\t\t\tn = new (alloc_node()) xpath_ast_node(ast_filter, n, expr, predicate_default);\n\n\t\t\t\tif (_lexer.current() != lex_close_square_brace)\n\t\t\t\t\tthrow_error(\"Unmatched square brace\");\n\t\t\t\n\t\t\t\t_lexer.next();\n\t\t\t}\n\t\t\t\n\t\t\treturn n;\n\t\t}\n\t\t\n\t\t// Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep\n\t\t// AxisSpecifier ::= AxisName '::' | '@'?\n\t\t// NodeTest ::= NameTest | NodeType '(' ')' | 'processing-instruction' '(' Literal ')'\n\t\t// NameTest ::= '*' | NCName ':' '*' | QName\n\t\t// AbbreviatedStep ::= '.' | '..'\n\t\txpath_ast_node* parse_step(xpath_ast_node* set)\n\t\t{\n\t\t\tif (set && set->rettype() != xpath_type_node_set)\n\t\t\t\tthrow_error(\"Step has to be applied to node set\");\n\n\t\t\tbool axis_specified = false;\n\t\t\taxis_t axis = axis_child; // implied child axis\n\n\t\t\tif (_lexer.current() == lex_axis_attribute)\n\t\t\t{\n\t\t\t\taxis = axis_attribute;\n\t\t\t\taxis_specified = true;\n\t\t\t\t\n\t\t\t\t_lexer.next();\n\t\t\t}\n\t\t\telse if (_lexer.current() == lex_dot)\n\t\t\t{\n\t\t\t\t_lexer.next();\n\t\t\t\t\n\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_step, set, axis_self, nodetest_type_node, 0);\n\t\t\t}\n\t\t\telse if (_lexer.current() == lex_double_dot)\n\t\t\t{\n\t\t\t\t_lexer.next();\n\t\t\t\t\n\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_step, set, axis_parent, nodetest_type_node, 0);\n\t\t\t}\n\t\t\n\t\t\tnodetest_t nt_type = nodetest_none;\n\t\t\txpath_lexer_string nt_name;\n\t\t\t\n\t\t\tif (_lexer.current() == lex_string)\n\t\t\t{\n\t\t\t\t// node name test\n\t\t\t\tnt_name = _lexer.contents();\n\t\t\t\t_lexer.next();\n\n\t\t\t\t// was it an axis name?\n\t\t\t\tif (_lexer.current() == lex_double_colon)\n\t\t\t\t{\n\t\t\t\t\t// parse axis name\n\t\t\t\t\tif (axis_specified) throw_error(\"Two axis specifiers in one step\");\n\n\t\t\t\t\taxis = parse_axis_name(nt_name, axis_specified);\n\n\t\t\t\t\tif (!axis_specified) throw_error(\"Unknown axis\");\n\n\t\t\t\t\t// read actual node test\n\t\t\t\t\t_lexer.next();\n\n\t\t\t\t\tif (_lexer.current() == lex_multiply)\n\t\t\t\t\t{\n\t\t\t\t\t\tnt_type = nodetest_all;\n\t\t\t\t\t\tnt_name = xpath_lexer_string();\n\t\t\t\t\t\t_lexer.next();\n\t\t\t\t\t}\n\t\t\t\t\telse if (_lexer.current() == lex_string)\n\t\t\t\t\t{\n\t\t\t\t\t\tnt_name = _lexer.contents();\n\t\t\t\t\t\t_lexer.next();\n\t\t\t\t\t}\n\t\t\t\t\telse throw_error(\"Unrecognized node test\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (nt_type == nodetest_none)\n\t\t\t\t{\n\t\t\t\t\t// node type test or processing-instruction\n\t\t\t\t\tif (_lexer.current() == lex_open_brace)\n\t\t\t\t\t{\n\t\t\t\t\t\t_lexer.next();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (_lexer.current() == lex_close_brace)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_lexer.next();\n\n\t\t\t\t\t\t\tnt_type = parse_node_test_type(nt_name);\n\n\t\t\t\t\t\t\tif (nt_type == nodetest_none) throw_error(\"Unrecognized node type\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnt_name = xpath_lexer_string();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (nt_name == PUGIXML_TEXT(\"processing-instruction\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (_lexer.current() != lex_quoted_string)\n\t\t\t\t\t\t\t\tthrow_error(\"Only literals are allowed as arguments to processing-instruction()\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tnt_type = nodetest_pi;\n\t\t\t\t\t\t\tnt_name = _lexer.contents();\n\t\t\t\t\t\t\t_lexer.next();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (_lexer.current() != lex_close_brace)\n\t\t\t\t\t\t\t\tthrow_error(\"Unmatched brace near processing-instruction()\");\n\t\t\t\t\t\t\t_lexer.next();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow_error(\"Unmatched brace near node type test\");\n\n\t\t\t\t\t}\n\t\t\t\t\t// QName or NCName:*\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (nt_name.end - nt_name.begin > 2 && nt_name.end[-2] == ':' && nt_name.end[-1] == '*') // NCName:*\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnt_name.end--; // erase *\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnt_type = nodetest_all_in_namespace;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse nt_type = nodetest_name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (_lexer.current() == lex_multiply)\n\t\t\t{\n\t\t\t\tnt_type = nodetest_all;\n\t\t\t\t_lexer.next();\n\t\t\t}\n\t\t\telse throw_error(\"Unrecognized node test\");\n\t\t\t\n\t\t\txpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step, set, axis, nt_type, alloc_string(nt_name));\n\t\t\t\n\t\t\txpath_ast_node* last = 0;\n\t\t\t\n\t\t\twhile (_lexer.current() == lex_open_square_brace)\n\t\t\t{\n\t\t\t\t_lexer.next();\n\t\t\t\t\n\t\t\t\txpath_ast_node* expr = parse_expression();\n\n\t\t\t\txpath_ast_node* pred = new (alloc_node()) xpath_ast_node(ast_predicate, 0, expr, predicate_default);\n\t\t\t\t\n\t\t\t\tif (_lexer.current() != lex_close_square_brace)\n\t\t\t\t\tthrow_error(\"Unmatched square brace\");\n\t\t\t\t_lexer.next();\n\t\t\t\t\n\t\t\t\tif (last) last->set_next(pred);\n\t\t\t\telse n->set_right(pred);\n\t\t\t\t\n\t\t\t\tlast = pred;\n\t\t\t}\n\n\t\t\treturn n;\n\t\t}\n\t\t\n\t\t// RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | RelativeLocationPath '//' Step\n\t\txpath_ast_node* parse_relative_location_path(xpath_ast_node* set)\n\t\t{\n\t\t\txpath_ast_node* n = parse_step(set);\n\t\t\t\n\t\t\twhile (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash)\n\t\t\t{\n\t\t\t\tlexeme_t l = _lexer.current();\n\t\t\t\t_lexer.next();\n\n\t\t\t\tif (l == lex_double_slash)\n\t\t\t\t\tn = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);\n\t\t\t\t\n\t\t\t\tn = parse_step(n);\n\t\t\t}\n\t\t\t\n\t\t\treturn n;\n\t\t}\n\t\t\n\t\t// LocationPath ::= RelativeLocationPath | AbsoluteLocationPath\n\t\t// AbsoluteLocationPath ::= '/' RelativeLocationPath? | '//' RelativeLocationPath\n\t\txpath_ast_node* parse_location_path()\n\t\t{\n\t\t\tif (_lexer.current() == lex_slash)\n\t\t\t{\n\t\t\t\t_lexer.next();\n\t\t\t\t\n\t\t\t\txpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set);\n\n\t\t\t\t// relative location path can start from axis_attribute, dot, double_dot, multiply and string lexemes; any other lexeme means standalone root path\n\t\t\t\tlexeme_t l = _lexer.current();\n\n\t\t\t\tif (l == lex_string || l == lex_axis_attribute || l == lex_dot || l == lex_double_dot || l == lex_multiply)\n\t\t\t\t\treturn parse_relative_location_path(n);\n\t\t\t\telse\n\t\t\t\t\treturn n;\n\t\t\t}\n\t\t\telse if (_lexer.current() == lex_double_slash)\n\t\t\t{\n\t\t\t\t_lexer.next();\n\t\t\t\t\n\t\t\t\txpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set);\n\t\t\t\tn = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);\n\t\t\t\t\n\t\t\t\treturn parse_relative_location_path(n);\n\t\t\t}\n\n\t\t\t// else clause moved outside of if because of bogus warning 'control may reach end of non-void function being inlined' in gcc 4.0.1\n\t\t\treturn parse_relative_location_path(0);\n\t\t}\n\t\t\n\t\t// PathExpr ::= LocationPath\n\t\t//\t\t\t\t| FilterExpr\n\t\t//\t\t\t\t| FilterExpr '/' RelativeLocationPath\n\t\t//\t\t\t\t| FilterExpr '//' RelativeLocationPath\n\t\t// UnionExpr ::= PathExpr | UnionExpr '|' PathExpr\n\t\t// UnaryExpr ::= UnionExpr | '-' UnaryExpr\n\t\txpath_ast_node* parse_path_or_unary_expression()\n\t\t{\n\t\t\t// Clarification.\n\t\t\t// PathExpr begins with either LocationPath or FilterExpr.\n\t\t\t// FilterExpr begins with PrimaryExpr\n\t\t\t// PrimaryExpr begins with '$' in case of it being a variable reference,\n\t\t\t// '(' in case of it being an expression, string literal, number constant or\n\t\t\t// function call.\n\n\t\t\tif (_lexer.current() == lex_var_ref || _lexer.current() == lex_open_brace || \n\t\t\t\t_lexer.current() == lex_quoted_string || _lexer.current() == lex_number ||\n\t\t\t\t_lexer.current() == lex_string)\n\t\t\t{\n\t\t\t\tif (_lexer.current() == lex_string)\n\t\t\t\t{\n\t\t\t\t\t// This is either a function call, or not - if not, we shall proceed with location path\n\t\t\t\t\tconst char_t* state = _lexer.state();\n\t\t\t\t\t\n\t\t\t\t\twhile (PUGI__IS_CHARTYPE(*state, ct_space)) ++state;\n\t\t\t\t\t\n\t\t\t\t\tif (*state != '(') return parse_location_path();\n\n\t\t\t\t\t// This looks like a function call; however this still can be a node-test. Check it.\n\t\t\t\t\tif (parse_node_test_type(_lexer.contents()) != nodetest_none) return parse_location_path();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\txpath_ast_node* n = parse_filter_expression();\n\n\t\t\t\tif (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash)\n\t\t\t\t{\n\t\t\t\t\tlexeme_t l = _lexer.current();\n\t\t\t\t\t_lexer.next();\n\t\t\t\t\t\n\t\t\t\t\tif (l == lex_double_slash)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (n->rettype() != xpath_type_node_set) throw_error(\"Step has to be applied to node set\");\n\n\t\t\t\t\t\tn = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// select from location path\n\t\t\t\t\treturn parse_relative_location_path(n);\n\t\t\t\t}\n\n\t\t\t\treturn n;\n\t\t\t}\n\t\t\telse if (_lexer.current() == lex_minus)\n\t\t\t{\n\t\t\t\t_lexer.next();\n\n\t\t\t\t// precedence 7+ - only parses union expressions\n\t\t\t\txpath_ast_node* expr = parse_expression_rec(parse_path_or_unary_expression(), 7);\n\n\t\t\t\treturn new (alloc_node()) xpath_ast_node(ast_op_negate, xpath_type_number, expr);\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn parse_location_path();\n\t\t}\n\n\t\tstruct binary_op_t\n\t\t{\n\t\t\tast_type_t asttype;\n\t\t\txpath_value_type rettype;\n\t\t\tint precedence;\n\n\t\t\tbinary_op_t(): asttype(ast_unknown), rettype(xpath_type_none), precedence(0)\n\t\t\t{\n\t\t\t}\n\n\t\t\tbinary_op_t(ast_type_t asttype_, xpath_value_type rettype_, int precedence_): asttype(asttype_), rettype(rettype_), precedence(precedence_)\n\t\t\t{\n\t\t\t}\n\n\t\t\tstatic binary_op_t parse(xpath_lexer& lexer)\n\t\t\t{\n\t\t\t\tswitch (lexer.current())\n\t\t\t\t{\n\t\t\t\tcase lex_string:\n\t\t\t\t\tif (lexer.contents() == PUGIXML_TEXT(\"or\"))\n\t\t\t\t\t\treturn binary_op_t(ast_op_or, xpath_type_boolean, 1);\n\t\t\t\t\telse if (lexer.contents() == PUGIXML_TEXT(\"and\"))\n\t\t\t\t\t\treturn binary_op_t(ast_op_and, xpath_type_boolean, 2);\n\t\t\t\t\telse if (lexer.contents() == PUGIXML_TEXT(\"div\"))\n\t\t\t\t\t\treturn binary_op_t(ast_op_divide, xpath_type_number, 6);\n\t\t\t\t\telse if (lexer.contents() == PUGIXML_TEXT(\"mod\"))\n\t\t\t\t\t\treturn binary_op_t(ast_op_mod, xpath_type_number, 6);\n\t\t\t\t\telse\n\t\t\t\t\t\treturn binary_op_t();\n\n\t\t\t\tcase lex_equal:\n\t\t\t\t\treturn binary_op_t(ast_op_equal, xpath_type_boolean, 3);\n\n\t\t\t\tcase lex_not_equal:\n\t\t\t\t\treturn binary_op_t(ast_op_not_equal, xpath_type_boolean, 3);\n\n\t\t\t\tcase lex_less:\n\t\t\t\t\treturn binary_op_t(ast_op_less, xpath_type_boolean, 4);\n\n\t\t\t\tcase lex_greater:\n\t\t\t\t\treturn binary_op_t(ast_op_greater, xpath_type_boolean, 4);\n\n\t\t\t\tcase lex_less_or_equal:\n\t\t\t\t\treturn binary_op_t(ast_op_less_or_equal, xpath_type_boolean, 4);\n\n\t\t\t\tcase lex_greater_or_equal:\n\t\t\t\t\treturn binary_op_t(ast_op_greater_or_equal, xpath_type_boolean, 4);\n\n\t\t\t\tcase lex_plus:\n\t\t\t\t\treturn binary_op_t(ast_op_add, xpath_type_number, 5);\n\n\t\t\t\tcase lex_minus:\n\t\t\t\t\treturn binary_op_t(ast_op_subtract, xpath_type_number, 5);\n\n\t\t\t\tcase lex_multiply:\n\t\t\t\t\treturn binary_op_t(ast_op_multiply, xpath_type_number, 6);\n\n\t\t\t\tcase lex_union:\n\t\t\t\t\treturn binary_op_t(ast_op_union, xpath_type_node_set, 7);\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn binary_op_t();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\txpath_ast_node* parse_expression_rec(xpath_ast_node* lhs, int limit)\n\t\t{\n\t\t\tbinary_op_t op = binary_op_t::parse(_lexer);\n\n\t\t\twhile (op.asttype != ast_unknown && op.precedence >= limit)\n\t\t\t{\n\t\t\t\t_lexer.next();\n\n\t\t\t\txpath_ast_node* rhs = parse_path_or_unary_expression();\n\n\t\t\t\tbinary_op_t nextop = binary_op_t::parse(_lexer);\n\n\t\t\t\twhile (nextop.asttype != ast_unknown && nextop.precedence > op.precedence)\n\t\t\t\t{\n\t\t\t\t\trhs = parse_expression_rec(rhs, nextop.precedence);\n\n\t\t\t\t\tnextop = binary_op_t::parse(_lexer);\n\t\t\t\t}\n\n\t\t\t\tif (op.asttype == ast_op_union && (lhs->rettype() != xpath_type_node_set || rhs->rettype() != xpath_type_node_set))\n\t\t\t\t\tthrow_error(\"Union operator has to be applied to node sets\");\n\n\t\t\t\tlhs = new (alloc_node()) xpath_ast_node(op.asttype, op.rettype, lhs, rhs);\n\n\t\t\t\top = binary_op_t::parse(_lexer);\n\t\t\t}\n\n\t\t\treturn lhs;\n\t\t}\n\n\t\t// Expr ::= OrExpr\n\t\t// OrExpr ::= AndExpr | OrExpr 'or' AndExpr\n\t\t// AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr\n\t\t// EqualityExpr ::= RelationalExpr\n\t\t//\t\t\t\t\t| EqualityExpr '=' RelationalExpr\n\t\t//\t\t\t\t\t| EqualityExpr '!=' RelationalExpr\n\t\t// RelationalExpr ::= AdditiveExpr\n\t\t//\t\t\t\t\t  | RelationalExpr '<' AdditiveExpr\n\t\t//\t\t\t\t\t  | RelationalExpr '>' AdditiveExpr\n\t\t//\t\t\t\t\t  | RelationalExpr '<=' AdditiveExpr\n\t\t//\t\t\t\t\t  | RelationalExpr '>=' AdditiveExpr\n\t\t// AdditiveExpr ::= MultiplicativeExpr\n\t\t//\t\t\t\t\t| AdditiveExpr '+' MultiplicativeExpr\n\t\t//\t\t\t\t\t| AdditiveExpr '-' MultiplicativeExpr\n\t\t// MultiplicativeExpr ::= UnaryExpr\n\t\t//\t\t\t\t\t\t  | MultiplicativeExpr '*' UnaryExpr\n\t\t//\t\t\t\t\t\t  | MultiplicativeExpr 'div' UnaryExpr\n\t\t//\t\t\t\t\t\t  | MultiplicativeExpr 'mod' UnaryExpr\n\t\txpath_ast_node* parse_expression()\n\t\t{\n\t\t\treturn parse_expression_rec(parse_path_or_unary_expression(), 0);\n\t\t}\n\n\t\txpath_parser(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result): _alloc(alloc), _lexer(query), _query(query), _variables(variables), _result(result)\n\t\t{\n\t\t}\n\n\t\txpath_ast_node* parse()\n\t\t{\n\t\t\txpath_ast_node* result = parse_expression();\n\t\t\t\n\t\t\tif (_lexer.current() != lex_eof)\n\t\t\t{\n\t\t\t\t// there are still unparsed tokens left, error\n\t\t\t\tthrow_error(\"Incorrect query\");\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t}\n\n\t\tstatic xpath_ast_node* parse(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result)\n\t\t{\n\t\t\txpath_parser parser(query, variables, alloc, result);\n\n\t\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\t\tint error = setjmp(parser._error_handler);\n\n\t\t\treturn (error == 0) ? parser.parse() : 0;\n\t\t#else\n\t\t\treturn parser.parse();\n\t\t#endif\n\t\t}\n\t};\n\n\tstruct xpath_query_impl\n\t{\n\t\tstatic xpath_query_impl* create()\n\t\t{\n\t\t\tvoid* memory = xml_memory::allocate(sizeof(xpath_query_impl));\n\n\t\t\treturn new (memory) xpath_query_impl();\n\t\t}\n\n\t\tstatic void destroy(void* ptr)\n\t\t{\n\t\t\tif (!ptr) return;\n\t\t\t\n\t\t\t// free all allocated pages\n\t\t\tstatic_cast<xpath_query_impl*>(ptr)->alloc.release();\n\n\t\t\t// free allocator memory (with the first page)\n\t\t\txml_memory::deallocate(ptr);\n\t\t}\n\n\t\txpath_query_impl(): root(0), alloc(&block)\n\t\t{\n\t\t\tblock.next = 0;\n\t\t\tblock.capacity = sizeof(block.data);\n\t\t}\n\n\t\txpath_ast_node* root;\n\t\txpath_allocator alloc;\n\t\txpath_memory_block block;\n\t};\n\n\tPUGI__FN xpath_string evaluate_string_impl(xpath_query_impl* impl, const xpath_node& n, xpath_stack_data& sd)\n\t{\n\t\tif (!impl) return xpath_string();\n\n\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\tif (setjmp(sd.error_handler)) return xpath_string();\n\t#endif\n\n\t\txpath_context c(n, 1, 1);\n\n\t\treturn impl->root->eval_string(c, sd.stack);\n\t}\n\n\tPUGI__FN impl::xpath_ast_node* evaluate_node_set_prepare(xpath_query_impl* impl)\n\t{\n\t\tif (!impl) return 0;\n\n\t\tif (impl->root->rettype() != xpath_type_node_set)\n\t\t{\n\t\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\t\treturn 0;\n\t\t#else\n\t\t\txpath_parse_result res;\n\t\t\tres.error = \"Expression does not evaluate to node set\";\n\n\t\t\tthrow xpath_exception(res);\n\t\t#endif\n\t\t}\n\n\t\treturn impl->root;\n\t}\nPUGI__NS_END\n\nnamespace pugi\n{\n#ifndef PUGIXML_NO_EXCEPTIONS\n\tPUGI__FN xpath_exception::xpath_exception(const xpath_parse_result& result_): _result(result_)\n\t{\n\t\tassert(_result.error);\n\t}\n\t\n\tPUGI__FN const char* xpath_exception::what() const throw()\n\t{\n\t\treturn _result.error;\n\t}\n\n\tPUGI__FN const xpath_parse_result& xpath_exception::result() const\n\t{\n\t\treturn _result;\n\t}\n#endif\n\t\n\tPUGI__FN xpath_node::xpath_node()\n\t{\n\t}\n\t\t\n\tPUGI__FN xpath_node::xpath_node(const xml_node& node_): _node(node_)\n\t{\n\t}\n\t\t\n\tPUGI__FN xpath_node::xpath_node(const xml_attribute& attribute_, const xml_node& parent_): _node(attribute_ ? parent_ : xml_node()), _attribute(attribute_)\n\t{\n\t}\n\n\tPUGI__FN xml_node xpath_node::node() const\n\t{\n\t\treturn _attribute ? xml_node() : _node;\n\t}\n\t\t\n\tPUGI__FN xml_attribute xpath_node::attribute() const\n\t{\n\t\treturn _attribute;\n\t}\n\t\n\tPUGI__FN xml_node xpath_node::parent() const\n\t{\n\t\treturn _attribute ? _node : _node.parent();\n\t}\n\n\tPUGI__FN static void unspecified_bool_xpath_node(xpath_node***)\n\t{\n\t}\n\n\tPUGI__FN xpath_node::operator xpath_node::unspecified_bool_type() const\n\t{\n\t\treturn (_node || _attribute) ? unspecified_bool_xpath_node : 0;\n\t}\n\t\n\tPUGI__FN bool xpath_node::operator!() const\n\t{\n\t\treturn !(_node || _attribute);\n\t}\n\n\tPUGI__FN bool xpath_node::operator==(const xpath_node& n) const\n\t{\n\t\treturn _node == n._node && _attribute == n._attribute;\n\t}\n\t\n\tPUGI__FN bool xpath_node::operator!=(const xpath_node& n) const\n\t{\n\t\treturn _node != n._node || _attribute != n._attribute;\n\t}\n\n#ifdef __BORLANDC__\n\tPUGI__FN bool operator&&(const xpath_node& lhs, bool rhs)\n\t{\n\t\treturn (bool)lhs && rhs;\n\t}\n\n\tPUGI__FN bool operator||(const xpath_node& lhs, bool rhs)\n\t{\n\t\treturn (bool)lhs || rhs;\n\t}\n#endif\n\n\tPUGI__FN void xpath_node_set::_assign(const_iterator begin_, const_iterator end_)\n\t{\n\t\tassert(begin_ <= end_);\n\n\t\tsize_t size_ = static_cast<size_t>(end_ - begin_);\n\n\t\tif (size_ <= 1)\n\t\t{\n\t\t\t// deallocate old buffer\n\t\t\tif (_begin != &_storage) impl::xml_memory::deallocate(_begin);\n\n\t\t\t// use internal buffer\n\t\t\tif (begin_ != end_) _storage = *begin_;\n\n\t\t\t_begin = &_storage;\n\t\t\t_end = &_storage + size_;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// make heap copy\n\t\t\txpath_node* storage = static_cast<xpath_node*>(impl::xml_memory::allocate(size_ * sizeof(xpath_node)));\n\n\t\t\tif (!storage)\n\t\t\t{\n\t\t\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\t\t\treturn;\n\t\t\t#else\n\t\t\t\tthrow std::bad_alloc();\n\t\t\t#endif\n\t\t\t}\n\n\t\t\tmemcpy(storage, begin_, size_ * sizeof(xpath_node));\n\t\t\t\n\t\t\t// deallocate old buffer\n\t\t\tif (_begin != &_storage) impl::xml_memory::deallocate(_begin);\n\n\t\t\t// finalize\n\t\t\t_begin = storage;\n\t\t\t_end = storage + size_;\n\t\t}\n\t}\n\n\tPUGI__FN xpath_node_set::xpath_node_set(): _type(type_unsorted), _begin(&_storage), _end(&_storage)\n\t{\n\t}\n\n\tPUGI__FN xpath_node_set::xpath_node_set(const_iterator begin_, const_iterator end_, type_t type_): _type(type_), _begin(&_storage), _end(&_storage)\n\t{\n\t\t_assign(begin_, end_);\n\t}\n\n\tPUGI__FN xpath_node_set::~xpath_node_set()\n\t{\n\t\tif (_begin != &_storage) impl::xml_memory::deallocate(_begin);\n\t}\n\t\t\n\tPUGI__FN xpath_node_set::xpath_node_set(const xpath_node_set& ns): _type(ns._type), _begin(&_storage), _end(&_storage)\n\t{\n\t\t_assign(ns._begin, ns._end);\n\t}\n\t\n\tPUGI__FN xpath_node_set& xpath_node_set::operator=(const xpath_node_set& ns)\n\t{\n\t\tif (this == &ns) return *this;\n\t\t\n\t\t_type = ns._type;\n\t\t_assign(ns._begin, ns._end);\n\n\t\treturn *this;\n\t}\n\n\tPUGI__FN xpath_node_set::type_t xpath_node_set::type() const\n\t{\n\t\treturn _type;\n\t}\n\t\t\n\tPUGI__FN size_t xpath_node_set::size() const\n\t{\n\t\treturn _end - _begin;\n\t}\n\t\t\n\tPUGI__FN bool xpath_node_set::empty() const\n\t{\n\t\treturn _begin == _end;\n\t}\n\t\t\n\tPUGI__FN const xpath_node& xpath_node_set::operator[](size_t index) const\n\t{\n\t\tassert(index < size());\n\t\treturn _begin[index];\n\t}\n\n\tPUGI__FN xpath_node_set::const_iterator xpath_node_set::begin() const\n\t{\n\t\treturn _begin;\n\t}\n\t\t\n\tPUGI__FN xpath_node_set::const_iterator xpath_node_set::end() const\n\t{\n\t\treturn _end;\n\t}\n\t\n\tPUGI__FN void xpath_node_set::sort(bool reverse)\n\t{\n\t\t_type = impl::xpath_sort(_begin, _end, _type, reverse);\n\t}\n\n\tPUGI__FN xpath_node xpath_node_set::first() const\n\t{\n\t\treturn impl::xpath_first(_begin, _end, _type);\n\t}\n\n\tPUGI__FN xpath_parse_result::xpath_parse_result(): error(\"Internal error\"), offset(0)\n\t{\n\t}\n\n\tPUGI__FN xpath_parse_result::operator bool() const\n\t{\n\t\treturn error == 0;\n\t}\n\n\tPUGI__FN const char* xpath_parse_result::description() const\n\t{\n\t\treturn error ? error : \"No error\";\n\t}\n\n\tPUGI__FN xpath_variable::xpath_variable(): _type(xpath_type_none), _next(0)\n\t{\n\t}\n\n\tPUGI__FN const char_t* xpath_variable::name() const\n\t{\n\t\tswitch (_type)\n\t\t{\n\t\tcase xpath_type_node_set:\n\t\t\treturn static_cast<const impl::xpath_variable_node_set*>(this)->name;\n\n\t\tcase xpath_type_number:\n\t\t\treturn static_cast<const impl::xpath_variable_number*>(this)->name;\n\n\t\tcase xpath_type_string:\n\t\t\treturn static_cast<const impl::xpath_variable_string*>(this)->name;\n\n\t\tcase xpath_type_boolean:\n\t\t\treturn static_cast<const impl::xpath_variable_boolean*>(this)->name;\n\n\t\tdefault:\n\t\t\tassert(!\"Invalid variable type\");\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\tPUGI__FN xpath_value_type xpath_variable::type() const\n\t{\n\t\treturn _type;\n\t}\n\n\tPUGI__FN bool xpath_variable::get_boolean() const\n\t{\n\t\treturn (_type == xpath_type_boolean) ? static_cast<const impl::xpath_variable_boolean*>(this)->value : false;\n\t}\n\n\tPUGI__FN double xpath_variable::get_number() const\n\t{\n\t\treturn (_type == xpath_type_number) ? static_cast<const impl::xpath_variable_number*>(this)->value : impl::gen_nan();\n\t}\n\n\tPUGI__FN const char_t* xpath_variable::get_string() const\n\t{\n\t\tconst char_t* value = (_type == xpath_type_string) ? static_cast<const impl::xpath_variable_string*>(this)->value : 0;\n\t\treturn value ? value : PUGIXML_TEXT(\"\");\n\t}\n\n\tPUGI__FN const xpath_node_set& xpath_variable::get_node_set() const\n\t{\n\t\treturn (_type == xpath_type_node_set) ? static_cast<const impl::xpath_variable_node_set*>(this)->value : impl::dummy_node_set;\n\t}\n\n\tPUGI__FN bool xpath_variable::set(bool value)\n\t{\n\t\tif (_type != xpath_type_boolean) return false;\n\n\t\tstatic_cast<impl::xpath_variable_boolean*>(this)->value = value;\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool xpath_variable::set(double value)\n\t{\n\t\tif (_type != xpath_type_number) return false;\n\n\t\tstatic_cast<impl::xpath_variable_number*>(this)->value = value;\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool xpath_variable::set(const char_t* value)\n\t{\n\t\tif (_type != xpath_type_string) return false;\n\n\t\timpl::xpath_variable_string* var = static_cast<impl::xpath_variable_string*>(this);\n\n\t\t// duplicate string\n\t\tsize_t size = (impl::strlength(value) + 1) * sizeof(char_t);\n\n\t\tchar_t* copy = static_cast<char_t*>(impl::xml_memory::allocate(size));\n\t\tif (!copy) return false;\n\n\t\tmemcpy(copy, value, size);\n\n\t\t// replace old string\n\t\tif (var->value) impl::xml_memory::deallocate(var->value);\n\t\tvar->value = copy;\n\n\t\treturn true;\n\t}\n\n\tPUGI__FN bool xpath_variable::set(const xpath_node_set& value)\n\t{\n\t\tif (_type != xpath_type_node_set) return false;\n\n\t\tstatic_cast<impl::xpath_variable_node_set*>(this)->value = value;\n\t\treturn true;\n\t}\n\n\tPUGI__FN xpath_variable_set::xpath_variable_set()\n\t{\n\t\tfor (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i) _data[i] = 0;\n\t}\n\n\tPUGI__FN xpath_variable_set::~xpath_variable_set()\n\t{\n\t\tfor (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i)\n\t\t{\n\t\t\txpath_variable* var = _data[i];\n\n\t\t\twhile (var)\n\t\t\t{\n\t\t\t\txpath_variable* next = var->_next;\n\n\t\t\t\timpl::delete_xpath_variable(var->_type, var);\n\n\t\t\t\tvar = next;\n\t\t\t}\n\t\t}\n\t}\n\n\tPUGI__FN xpath_variable* xpath_variable_set::find(const char_t* name) const\n\t{\n\t\tconst size_t hash_size = sizeof(_data) / sizeof(_data[0]);\n\t\tsize_t hash = impl::hash_string(name) % hash_size;\n\n\t\t// look for existing variable\n\t\tfor (xpath_variable* var = _data[hash]; var; var = var->_next)\n\t\t\tif (impl::strequal(var->name(), name))\n\t\t\t\treturn var;\n\n\t\treturn 0;\n\t}\n\n\tPUGI__FN xpath_variable* xpath_variable_set::add(const char_t* name, xpath_value_type type)\n\t{\n\t\tconst size_t hash_size = sizeof(_data) / sizeof(_data[0]);\n\t\tsize_t hash = impl::hash_string(name) % hash_size;\n\n\t\t// look for existing variable\n\t\tfor (xpath_variable* var = _data[hash]; var; var = var->_next)\n\t\t\tif (impl::strequal(var->name(), name))\n\t\t\t\treturn var->type() == type ? var : 0;\n\n\t\t// add new variable\n\t\txpath_variable* result = impl::new_xpath_variable(type, name);\n\n\t\tif (result)\n\t\t{\n\t\t\tresult->_type = type;\n\t\t\tresult->_next = _data[hash];\n\n\t\t\t_data[hash] = result;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tPUGI__FN bool xpath_variable_set::set(const char_t* name, bool value)\n\t{\n\t\txpath_variable* var = add(name, xpath_type_boolean);\n\t\treturn var ? var->set(value) : false;\n\t}\n\n\tPUGI__FN bool xpath_variable_set::set(const char_t* name, double value)\n\t{\n\t\txpath_variable* var = add(name, xpath_type_number);\n\t\treturn var ? var->set(value) : false;\n\t}\n\n\tPUGI__FN bool xpath_variable_set::set(const char_t* name, const char_t* value)\n\t{\n\t\txpath_variable* var = add(name, xpath_type_string);\n\t\treturn var ? var->set(value) : false;\n\t}\n\n\tPUGI__FN bool xpath_variable_set::set(const char_t* name, const xpath_node_set& value)\n\t{\n\t\txpath_variable* var = add(name, xpath_type_node_set);\n\t\treturn var ? var->set(value) : false;\n\t}\n\n\tPUGI__FN xpath_variable* xpath_variable_set::get(const char_t* name)\n\t{\n\t\treturn find(name);\n\t}\n\n\tPUGI__FN const xpath_variable* xpath_variable_set::get(const char_t* name) const\n\t{\n\t\treturn find(name);\n\t}\n\n\tPUGI__FN xpath_query::xpath_query(const char_t* query, xpath_variable_set* variables): _impl(0)\n\t{\n\t\timpl::xpath_query_impl* qimpl = impl::xpath_query_impl::create();\n\n\t\tif (!qimpl)\n\t\t{\n\t\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\t\t_result.error = \"Out of memory\";\n\t\t#else\n\t\t\tthrow std::bad_alloc();\n\t\t#endif\n\t\t}\n\t\telse\n\t\t{\n\t\t\timpl::buffer_holder impl_holder(qimpl, impl::xpath_query_impl::destroy);\n\n\t\t\tqimpl->root = impl::xpath_parser::parse(query, variables, &qimpl->alloc, &_result);\n\n\t\t\tif (qimpl->root)\n\t\t\t{\n\t\t\t\tqimpl->root->optimize(&qimpl->alloc);\n\n\t\t\t\t_impl = static_cast<impl::xpath_query_impl*>(impl_holder.release());\n\t\t\t\t_result.error = 0;\n\t\t\t}\n\t\t}\n\t}\n\n\tPUGI__FN xpath_query::~xpath_query()\n\t{\n\t\timpl::xpath_query_impl::destroy(_impl);\n\t}\n\n\tPUGI__FN xpath_value_type xpath_query::return_type() const\n\t{\n\t\tif (!_impl) return xpath_type_none;\n\n\t\treturn static_cast<impl::xpath_query_impl*>(_impl)->root->rettype();\n\t}\n\n\tPUGI__FN bool xpath_query::evaluate_boolean(const xpath_node& n) const\n\t{\n\t\tif (!_impl) return false;\n\t\t\n\t\timpl::xpath_context c(n, 1, 1);\n\t\timpl::xpath_stack_data sd;\n\n\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\tif (setjmp(sd.error_handler)) return false;\n\t#endif\n\t\t\n\t\treturn static_cast<impl::xpath_query_impl*>(_impl)->root->eval_boolean(c, sd.stack);\n\t}\n\t\n\tPUGI__FN double xpath_query::evaluate_number(const xpath_node& n) const\n\t{\n\t\tif (!_impl) return impl::gen_nan();\n\t\t\n\t\timpl::xpath_context c(n, 1, 1);\n\t\timpl::xpath_stack_data sd;\n\n\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\tif (setjmp(sd.error_handler)) return impl::gen_nan();\n\t#endif\n\n\t\treturn static_cast<impl::xpath_query_impl*>(_impl)->root->eval_number(c, sd.stack);\n\t}\n\n#ifndef PUGIXML_NO_STL\n\tPUGI__FN string_t xpath_query::evaluate_string(const xpath_node& n) const\n\t{\n\t\timpl::xpath_stack_data sd;\n\n\t\timpl::xpath_string r = impl::evaluate_string_impl(static_cast<impl::xpath_query_impl*>(_impl), n, sd);\n\n\t\treturn string_t(r.c_str(), r.length());\n\t}\n#endif\n\n\tPUGI__FN size_t xpath_query::evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const\n\t{\n\t\timpl::xpath_stack_data sd;\n\n\t\timpl::xpath_string r = impl::evaluate_string_impl(static_cast<impl::xpath_query_impl*>(_impl), n, sd);\n\n\t\tsize_t full_size = r.length() + 1;\n\t\t\n\t\tif (capacity > 0)\n\t\t{\n\t\t\tsize_t size = (full_size < capacity) ? full_size : capacity;\n\t\t\tassert(size > 0);\n\n\t\t\tmemcpy(buffer, r.c_str(), (size - 1) * sizeof(char_t));\n\t\t\tbuffer[size - 1] = 0;\n\t\t}\n\t\t\n\t\treturn full_size;\n\t}\n\n\tPUGI__FN xpath_node_set xpath_query::evaluate_node_set(const xpath_node& n) const\n\t{\n\t\timpl::xpath_ast_node* root = impl::evaluate_node_set_prepare(static_cast<impl::xpath_query_impl*>(_impl));\n\t\tif (!root) return xpath_node_set();\n\n\t\timpl::xpath_context c(n, 1, 1);\n\t\timpl::xpath_stack_data sd;\n\n\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\tif (setjmp(sd.error_handler)) return xpath_node_set();\n\t#endif\n\n\t\timpl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_all);\n\n\t\treturn xpath_node_set(r.begin(), r.end(), r.type());\n\t}\n\n\tPUGI__FN xpath_node xpath_query::evaluate_node(const xpath_node& n) const\n\t{\n\t\timpl::xpath_ast_node* root = impl::evaluate_node_set_prepare(static_cast<impl::xpath_query_impl*>(_impl));\n\t\tif (!root) return xpath_node();\n\n\t\timpl::xpath_context c(n, 1, 1);\n\t\timpl::xpath_stack_data sd;\n\n\t#ifdef PUGIXML_NO_EXCEPTIONS\n\t\tif (setjmp(sd.error_handler)) return xpath_node();\n\t#endif\n\n\t\timpl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_first);\n\n\t\treturn r.first();\n\t}\n\n\tPUGI__FN const xpath_parse_result& xpath_query::result() const\n\t{\n\t\treturn _result;\n\t}\n\n\tPUGI__FN static void unspecified_bool_xpath_query(xpath_query***)\n\t{\n\t}\n\n\tPUGI__FN xpath_query::operator xpath_query::unspecified_bool_type() const\n\t{\n\t\treturn _impl ? unspecified_bool_xpath_query : 0;\n\t}\n\n\tPUGI__FN bool xpath_query::operator!() const\n\t{\n\t\treturn !_impl;\n\t}\n\n\tPUGI__FN xpath_node xml_node::select_node(const char_t* query, xpath_variable_set* variables) const\n\t{\n\t\txpath_query q(query, variables);\n\t\treturn select_node(q);\n\t}\n\n\tPUGI__FN xpath_node xml_node::select_node(const xpath_query& query) const\n\t{\n\t\treturn query.evaluate_node(*this);\n\t}\n\n\tPUGI__FN xpath_node_set xml_node::select_nodes(const char_t* query, xpath_variable_set* variables) const\n\t{\n\t\txpath_query q(query, variables);\n\t\treturn select_nodes(q);\n\t}\n\n\tPUGI__FN xpath_node_set xml_node::select_nodes(const xpath_query& query) const\n\t{\n\t\treturn query.evaluate_node_set(*this);\n\t}\n\n\tPUGI__FN xpath_node xml_node::select_single_node(const char_t* query, xpath_variable_set* variables) const\n\t{\n\t\txpath_query q(query, variables);\n\t\treturn select_single_node(q);\n\t}\n\n\tPUGI__FN xpath_node xml_node::select_single_node(const xpath_query& query) const\n\t{\n\t\treturn query.evaluate_node(*this);\n\t}\n}\n\n#endif\n\n#ifdef __BORLANDC__\n#\tpragma option pop\n#endif\n\n// Intel C++ does not properly keep warning state for function templates,\n// so popping warning state at the end of translation unit leads to warnings in the middle.\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#\tpragma warning(pop)\n#endif\n\n// Undefine all local macros (makes sure we're not leaking macros in header-only mode)\n#undef PUGI__NO_INLINE\n#undef PUGI__UNLIKELY\n#undef PUGI__STATIC_ASSERT\n#undef PUGI__DMC_VOLATILE\n#undef PUGI__MSVC_CRT_VERSION\n#undef PUGI__NS_BEGIN\n#undef PUGI__NS_END\n#undef PUGI__FN\n#undef PUGI__FN_NO_INLINE\n#undef PUGI__NODETYPE\n#undef PUGI__IS_CHARTYPE_IMPL\n#undef PUGI__IS_CHARTYPE\n#undef PUGI__IS_CHARTYPEX\n#undef PUGI__ENDSWITH\n#undef PUGI__SKIPWS\n#undef PUGI__OPTSET\n#undef PUGI__PUSHNODE\n#undef PUGI__POPNODE\n#undef PUGI__SCANFOR\n#undef PUGI__SCANWHILE\n#undef PUGI__SCANWHILE_UNROLL\n#undef PUGI__ENDSEG\n#undef PUGI__THROW_ERROR\n#undef PUGI__CHECK_ERROR\n\n#endif\n\n/*\n * Copyright (c) 2006-2015 Arseny Kapoulkine\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/pugixml/pugixml.hpp",
    "content": "/*\n * pugixml parser - version 1.6\n * --------------------------------------------------------\n * Copyright (C) 2006-2015, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)\n * Report bugs and download new versions at http://pugixml.org/\n *\n * This library is distributed under the MIT License. See notice at the end\n * of this file.\n *\n * This work is based on the pugxml parser, which is:\n * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)\n */\n\n#ifndef PUGIXML_VERSION\n// Define version macro; evaluates to major * 100 + minor so that it's safe to use in less-than comparisons\n#\tdefine PUGIXML_VERSION 160\n#endif\n\n// Include user configuration file (this can define various configuration macros)\n#include \"pugiconfig.hpp\"\n\n#ifndef HEADER_PUGIXML_HPP\n#define HEADER_PUGIXML_HPP\n\n// Include stddef.h for size_t and ptrdiff_t\n#include <stddef.h>\n\n// Include exception header for XPath\n#if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)\n#\tinclude <exception>\n#endif\n\n// Include STL headers\n#ifndef PUGIXML_NO_STL\n#\tinclude <iterator>\n#\tinclude <iosfwd>\n#\tinclude <string>\n#endif\n\n// Macro for deprecated features\n#ifndef PUGIXML_DEPRECATED\n#\tif defined(__GNUC__)\n#\t\tdefine PUGIXML_DEPRECATED __attribute__((deprecated))\n#\telif defined(_MSC_VER) && _MSC_VER >= 1300\n#\t\tdefine PUGIXML_DEPRECATED __declspec(deprecated)\n#\telse\n#\t\tdefine PUGIXML_DEPRECATED\n#\tendif\n#endif\n\n// If no API is defined, assume default\n#ifndef PUGIXML_API\n#\tdefine PUGIXML_API\n#endif\n\n// If no API for classes is defined, assume default\n#ifndef PUGIXML_CLASS\n#\tdefine PUGIXML_CLASS PUGIXML_API\n#endif\n\n// If no API for functions is defined, assume default\n#ifndef PUGIXML_FUNCTION\n#\tdefine PUGIXML_FUNCTION PUGIXML_API\n#endif\n\n// If the platform is known to have long long support, enable long long functions\n#ifndef PUGIXML_HAS_LONG_LONG\n#\tif defined(__cplusplus) && __cplusplus >= 201103\n#\t\tdefine PUGIXML_HAS_LONG_LONG\n#\telif defined(_MSC_VER) && _MSC_VER >= 1400\n#\t\tdefine PUGIXML_HAS_LONG_LONG\n#\tendif\n#endif\n\n// Character interface macros\n#ifdef PUGIXML_WCHAR_MODE\n#\tdefine PUGIXML_TEXT(t) L ## t\n#\tdefine PUGIXML_CHAR wchar_t\n#else\n#\tdefine PUGIXML_TEXT(t) t\n#\tdefine PUGIXML_CHAR char\n#endif\n\nnamespace pugi\n{\n\t// Character type used for all internal storage and operations; depends on PUGIXML_WCHAR_MODE\n\ttypedef PUGIXML_CHAR char_t;\n\n#ifndef PUGIXML_NO_STL\n\t// String type used for operations that work with STL string; depends on PUGIXML_WCHAR_MODE\n\ttypedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> > string_t;\n#endif\n}\n\n// The PugiXML namespace\nnamespace pugi\n{\n\t// Tree node types\n\tenum xml_node_type\n\t{\n\t\tnode_null,\t\t\t// Empty (null) node handle\n\t\tnode_document,\t\t// A document tree's absolute root\n\t\tnode_element,\t\t// Element tag, i.e. '<node/>'\n\t\tnode_pcdata,\t\t// Plain character data, i.e. 'text'\n\t\tnode_cdata,\t\t\t// Character data, i.e. '<![CDATA[text]]>'\n\t\tnode_comment,\t\t// Comment tag, i.e. '<!-- text -->'\n\t\tnode_pi,\t\t\t// Processing instruction, i.e. '<?name?>'\n\t\tnode_declaration,\t// Document declaration, i.e. '<?xml version=\"1.0\"?>'\n\t\tnode_doctype\t\t// Document type declaration, i.e. '<!DOCTYPE doc>'\n\t};\n\n\t// Parsing options\n\n\t// Minimal parsing mode (equivalent to turning all other flags off).\n\t// Only elements and PCDATA sections are added to the DOM tree, no text conversions are performed.\n\tconst unsigned int parse_minimal = 0x0000;\n\n\t// This flag determines if processing instructions (node_pi) are added to the DOM tree. This flag is off by default.\n\tconst unsigned int parse_pi = 0x0001;\n\n\t// This flag determines if comments (node_comment) are added to the DOM tree. This flag is off by default.\n\tconst unsigned int parse_comments = 0x0002;\n\n\t// This flag determines if CDATA sections (node_cdata) are added to the DOM tree. This flag is on by default.\n\tconst unsigned int parse_cdata = 0x0004;\n\n\t// This flag determines if plain character data (node_pcdata) that consist only of whitespace are added to the DOM tree.\n\t// This flag is off by default; turning it on usually results in slower parsing and more memory consumption.\n\tconst unsigned int parse_ws_pcdata = 0x0008;\n\n\t// This flag determines if character and entity references are expanded during parsing. This flag is on by default.\n\tconst unsigned int parse_escapes = 0x0010;\n\n\t// This flag determines if EOL characters are normalized (converted to #xA) during parsing. This flag is on by default.\n\tconst unsigned int parse_eol = 0x0020;\n\t\n\t// This flag determines if attribute values are normalized using CDATA normalization rules during parsing. This flag is on by default.\n\tconst unsigned int parse_wconv_attribute = 0x0040;\n\n\t// This flag determines if attribute values are normalized using NMTOKENS normalization rules during parsing. This flag is off by default.\n\tconst unsigned int parse_wnorm_attribute = 0x0080;\n\t\n\t// This flag determines if document declaration (node_declaration) is added to the DOM tree. This flag is off by default.\n\tconst unsigned int parse_declaration = 0x0100;\n\n\t// This flag determines if document type declaration (node_doctype) is added to the DOM tree. This flag is off by default.\n\tconst unsigned int parse_doctype = 0x0200;\n\n\t// This flag determines if plain character data (node_pcdata) that is the only child of the parent node and that consists only\n\t// of whitespace is added to the DOM tree.\n\t// This flag is off by default; turning it on may result in slower parsing and more memory consumption.\n\tconst unsigned int parse_ws_pcdata_single = 0x0400;\n\n\t// This flag determines if leading and trailing whitespace is to be removed from plain character data. This flag is off by default.\n\tconst unsigned int parse_trim_pcdata = 0x0800;\n\n\t// This flag determines if plain character data that does not have a parent node is added to the DOM tree, and if an empty document\n\t// is a valid document. This flag is off by default.\n\tconst unsigned int parse_fragment = 0x1000;\n\n\t// The default parsing mode.\n\t// Elements, PCDATA and CDATA sections are added to the DOM tree, character/reference entities are expanded,\n\t// End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.\n\tconst unsigned int parse_default = parse_cdata | parse_escapes | parse_wconv_attribute | parse_eol;\n\n\t// The full parsing mode.\n\t// Nodes of all types are added to the DOM tree, character/reference entities are expanded,\n\t// End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.\n\tconst unsigned int parse_full = parse_default | parse_pi | parse_comments | parse_declaration | parse_doctype;\n\n\t// These flags determine the encoding of input data for XML document\n\tenum xml_encoding\n\t{\n\t\tencoding_auto,\t\t// Auto-detect input encoding using BOM or < / <? detection; use UTF8 if BOM is not found\n\t\tencoding_utf8,\t\t// UTF8 encoding\n\t\tencoding_utf16_le,\t// Little-endian UTF16\n\t\tencoding_utf16_be,\t// Big-endian UTF16\n\t\tencoding_utf16,\t\t// UTF16 with native endianness\n\t\tencoding_utf32_le,\t// Little-endian UTF32\n\t\tencoding_utf32_be,\t// Big-endian UTF32\n\t\tencoding_utf32,\t\t// UTF32 with native endianness\n\t\tencoding_wchar,\t\t// The same encoding wchar_t has (either UTF16 or UTF32)\n\t\tencoding_latin1\n\t};\n\n\t// Formatting flags\n\t\n\t// Indent the nodes that are written to output stream with as many indentation strings as deep the node is in DOM tree. This flag is on by default.\n\tconst unsigned int format_indent = 0x01;\n\t\n\t// Write encoding-specific BOM to the output stream. This flag is off by default.\n\tconst unsigned int format_write_bom = 0x02;\n\n\t// Use raw output mode (no indentation and no line breaks are written). This flag is off by default.\n\tconst unsigned int format_raw = 0x04;\n\t\n\t// Omit default XML declaration even if there is no declaration in the document. This flag is off by default.\n\tconst unsigned int format_no_declaration = 0x08;\n\n\t// Don't escape attribute values and PCDATA contents. This flag is off by default.\n\tconst unsigned int format_no_escapes = 0x10;\n\n\t// Open file using text mode in xml_document::save_file. This enables special character (i.e. new-line) conversions on some systems. This flag is off by default.\n\tconst unsigned int format_save_file_text = 0x20;\n\n\t// The default set of formatting flags.\n\t// Nodes are indented depending on their depth in DOM tree, a default declaration is output if document has none.\n\tconst unsigned int format_default = format_indent;\n\t\t\n\t// Forward declarations\n\tstruct xml_attribute_struct;\n\tstruct xml_node_struct;\n\n\tclass xml_node_iterator;\n\tclass xml_attribute_iterator;\n\tclass xml_named_node_iterator;\n\n\tclass xml_tree_walker;\n\n\tstruct xml_parse_result;\n\n\tclass xml_node;\n\n\tclass xml_text;\n\t\n\t#ifndef PUGIXML_NO_XPATH\n\tclass xpath_node;\n\tclass xpath_node_set;\n\tclass xpath_query;\n\tclass xpath_variable_set;\n\t#endif\n\n\t// Range-based for loop support\n\ttemplate <typename It> class xml_object_range\n\t{\n\tpublic:\n\t\ttypedef It const_iterator;\n\t\ttypedef It iterator;\n\n\t\txml_object_range(It b, It e): _begin(b), _end(e)\n\t\t{\n\t\t}\n\n\t\tIt begin() const { return _begin; }\n\t\tIt end() const { return _end; }\n\n\tprivate:\n\t\tIt _begin, _end;\n\t};\n\n\t// Writer interface for node printing (see xml_node::print)\n\tclass PUGIXML_CLASS xml_writer\n\t{\n\tpublic:\n\t\tvirtual ~xml_writer() {}\n\n\t\t// Write memory chunk into stream/file/whatever\n\t\tvirtual void write(const void* data, size_t size) = 0;\n\t};\n\n\t// xml_writer implementation for FILE*\n\tclass PUGIXML_CLASS xml_writer_file: public xml_writer\n\t{\n\tpublic:\n\t\t// Construct writer from a FILE* object; void* is used to avoid header dependencies on stdio\n\t\txml_writer_file(void* file);\n\n\t\tvirtual void write(const void* data, size_t size);\n\n\tprivate:\n\t\tvoid* file;\n\t};\n\n\t#ifndef PUGIXML_NO_STL\n\t// xml_writer implementation for streams\n\tclass PUGIXML_CLASS xml_writer_stream: public xml_writer\n\t{\n\tpublic:\n\t\t// Construct writer from an output stream object\n\t\txml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream);\n\t\txml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream);\n\n\t\tvirtual void write(const void* data, size_t size);\n\n\tprivate:\n\t\tstd::basic_ostream<char, std::char_traits<char> >* narrow_stream;\n\t\tstd::basic_ostream<wchar_t, std::char_traits<wchar_t> >* wide_stream;\n\t};\n\t#endif\n\n\t// A light-weight handle for manipulating attributes in DOM tree\n\tclass PUGIXML_CLASS xml_attribute\n\t{\n\t\tfriend class xml_attribute_iterator;\n\t\tfriend class xml_node;\n\n\tprivate:\n\t\txml_attribute_struct* _attr;\n\t\n\t\ttypedef void (*unspecified_bool_type)(xml_attribute***);\n\n\tpublic:\n\t\t// Default constructor. Constructs an empty attribute.\n\t\txml_attribute();\n\t\t\n\t\t// Constructs attribute from internal pointer\n\t\texplicit xml_attribute(xml_attribute_struct* attr);\n\n\t\t// Safe bool conversion operator\n\t\toperator unspecified_bool_type() const;\n\n\t\t// Borland C++ workaround\n\t\tbool operator!() const;\n\n\t\t// Comparison operators (compares wrapped attribute pointers)\n\t\tbool operator==(const xml_attribute& r) const;\n\t\tbool operator!=(const xml_attribute& r) const;\n\t\tbool operator<(const xml_attribute& r) const;\n\t\tbool operator>(const xml_attribute& r) const;\n\t\tbool operator<=(const xml_attribute& r) const;\n\t\tbool operator>=(const xml_attribute& r) const;\n\n\t\t// Check if attribute is empty\n\t\tbool empty() const;\n\n\t\t// Get attribute name/value, or \"\" if attribute is empty\n\t\tconst char_t* name() const;\n\t\tconst char_t* value() const;\n\n\t\t// Get attribute value, or the default value if attribute is empty\n\t\tconst char_t* as_string(const char_t* def = PUGIXML_TEXT(\"\")) const;\n\n\t\t// Get attribute value as a number, or the default value if conversion did not succeed or attribute is empty\n\t\tint as_int(int def = 0) const;\n\t\tunsigned int as_uint(unsigned int def = 0) const;\n\t\tdouble as_double(double def = 0) const;\n\t\tfloat as_float(float def = 0) const;\n\n\t#ifdef PUGIXML_HAS_LONG_LONG\n\t\tlong long as_llong(long long def = 0) const;\n\t\tunsigned long long as_ullong(unsigned long long def = 0) const;\n\t#endif\n\n\t\t// Get attribute value as bool (returns true if first character is in '1tTyY' set), or the default value if attribute is empty\n\t\tbool as_bool(bool def = false) const;\n\n\t\t// Set attribute name/value (returns false if attribute is empty or there is not enough memory)\n\t\tbool set_name(const char_t* rhs);\n\t\tbool set_value(const char_t* rhs);\n\n\t\t// Set attribute value with type conversion (numbers are converted to strings, boolean is converted to \"true\"/\"false\")\n\t\tbool set_value(int rhs);\n\t\tbool set_value(unsigned int rhs);\n\t\tbool set_value(double rhs);\n\t\tbool set_value(float rhs);\n\t\tbool set_value(bool rhs);\n\n\t#ifdef PUGIXML_HAS_LONG_LONG\n\t\tbool set_value(long long rhs);\n\t\tbool set_value(unsigned long long rhs);\n\t#endif\n\n\t\t// Set attribute value (equivalent to set_value without error checking)\n\t\txml_attribute& operator=(const char_t* rhs);\n\t\txml_attribute& operator=(int rhs);\n\t\txml_attribute& operator=(unsigned int rhs);\n\t\txml_attribute& operator=(double rhs);\n\t\txml_attribute& operator=(float rhs);\n\t\txml_attribute& operator=(bool rhs);\n\n\t#ifdef PUGIXML_HAS_LONG_LONG\n\t\txml_attribute& operator=(long long rhs);\n\t\txml_attribute& operator=(unsigned long long rhs);\n\t#endif\n\n\t\t// Get next/previous attribute in the attribute list of the parent node\n\t\txml_attribute next_attribute() const;\n\t\txml_attribute previous_attribute() const;\n\n\t\t// Get hash value (unique for handles to the same object)\n\t\tsize_t hash_value() const;\n\n\t\t// Get internal pointer\n\t\txml_attribute_struct* internal_object() const;\n\t};\n\n#ifdef __BORLANDC__\n\t// Borland C++ workaround\n\tbool PUGIXML_FUNCTION operator&&(const xml_attribute& lhs, bool rhs);\n\tbool PUGIXML_FUNCTION operator||(const xml_attribute& lhs, bool rhs);\n#endif\n\n\t// A light-weight handle for manipulating nodes in DOM tree\n\tclass PUGIXML_CLASS xml_node\n\t{\n\t\tfriend class xml_attribute_iterator;\n\t\tfriend class xml_node_iterator;\n\t\tfriend class xml_named_node_iterator;\n\n\tprotected:\n\t\txml_node_struct* _root;\n\n\t\ttypedef void (*unspecified_bool_type)(xml_node***);\n\n\tpublic:\n\t\t// Default constructor. Constructs an empty node.\n\t\txml_node();\n\n\t\t// Constructs node from internal pointer\n\t\texplicit xml_node(xml_node_struct* p);\n\n\t\t// Safe bool conversion operator\n\t\toperator unspecified_bool_type() const;\n\n\t\t// Borland C++ workaround\n\t\tbool operator!() const;\n\t\n\t\t// Comparison operators (compares wrapped node pointers)\n\t\tbool operator==(const xml_node& r) const;\n\t\tbool operator!=(const xml_node& r) const;\n\t\tbool operator<(const xml_node& r) const;\n\t\tbool operator>(const xml_node& r) const;\n\t\tbool operator<=(const xml_node& r) const;\n\t\tbool operator>=(const xml_node& r) const;\n\n\t\t// Check if node is empty.\n\t\tbool empty() const;\n\n\t\t// Get node type\n\t\txml_node_type type() const;\n\n\t\t// Get node name, or \"\" if node is empty or it has no name\n\t\tconst char_t* name() const;\n\n\t\t// Get node value, or \"\" if node is empty or it has no value\n\t\t// Note: For <node>text</node> node.value() does not return \"text\"! Use child_value() or text() methods to access text inside nodes.\n\t\tconst char_t* value() const;\n\t\n\t\t// Get attribute list\n\t\txml_attribute first_attribute() const;\n\t\txml_attribute last_attribute() const;\n\n\t\t// Get children list\n\t\txml_node first_child() const;\n\t\txml_node last_child() const;\n\n\t\t// Get next/previous sibling in the children list of the parent node\n\t\txml_node next_sibling() const;\n\t\txml_node previous_sibling() const;\n\t\t\n\t\t// Get parent node\n\t\txml_node parent() const;\n\n\t\t// Get root of DOM tree this node belongs to\n\t\txml_node root() const;\n\n\t\t// Get text object for the current node\n\t\txml_text text() const;\n\n\t\t// Get child, attribute or next/previous sibling with the specified name\n\t\txml_node child(const char_t* name) const;\n\t\txml_attribute attribute(const char_t* name) const;\n\t\txml_node next_sibling(const char_t* name) const;\n\t\txml_node previous_sibling(const char_t* name) const;\n\n\t\t// Get child value of current node; that is, value of the first child node of type PCDATA/CDATA\n\t\tconst char_t* child_value() const;\n\n\t\t// Get child value of child with specified name. Equivalent to child(name).child_value().\n\t\tconst char_t* child_value(const char_t* name) const;\n\n\t\t// Set node name/value (returns false if node is empty, there is not enough memory, or node can not have name/value)\n\t\tbool set_name(const char_t* rhs);\n\t\tbool set_value(const char_t* rhs);\n\t\t\n\t\t// Add attribute with specified name. Returns added attribute, or empty attribute on errors.\n\t\txml_attribute append_attribute(const char_t* name);\n\t\txml_attribute prepend_attribute(const char_t* name);\n\t\txml_attribute insert_attribute_after(const char_t* name, const xml_attribute& attr);\n\t\txml_attribute insert_attribute_before(const char_t* name, const xml_attribute& attr);\n\n\t\t// Add a copy of the specified attribute. Returns added attribute, or empty attribute on errors.\n\t\txml_attribute append_copy(const xml_attribute& proto);\n\t\txml_attribute prepend_copy(const xml_attribute& proto);\n\t\txml_attribute insert_copy_after(const xml_attribute& proto, const xml_attribute& attr);\n\t\txml_attribute insert_copy_before(const xml_attribute& proto, const xml_attribute& attr);\n\n\t\t// Add child node with specified type. Returns added node, or empty node on errors.\n\t\txml_node append_child(xml_node_type type = node_element);\n\t\txml_node prepend_child(xml_node_type type = node_element);\n\t\txml_node insert_child_after(xml_node_type type, const xml_node& node);\n\t\txml_node insert_child_before(xml_node_type type, const xml_node& node);\n\n\t\t// Add child element with specified name. Returns added node, or empty node on errors.\n\t\txml_node append_child(const char_t* name);\n\t\txml_node prepend_child(const char_t* name);\n\t\txml_node insert_child_after(const char_t* name, const xml_node& node);\n\t\txml_node insert_child_before(const char_t* name, const xml_node& node);\n\n\t\t// Add a copy of the specified node as a child. Returns added node, or empty node on errors.\n\t\txml_node append_copy(const xml_node& proto);\n\t\txml_node prepend_copy(const xml_node& proto);\n\t\txml_node insert_copy_after(const xml_node& proto, const xml_node& node);\n\t\txml_node insert_copy_before(const xml_node& proto, const xml_node& node);\n\n\t\t// Move the specified node to become a child of this node. Returns moved node, or empty node on errors.\n\t\txml_node append_move(const xml_node& moved);\n\t\txml_node prepend_move(const xml_node& moved);\n\t\txml_node insert_move_after(const xml_node& moved, const xml_node& node);\n\t\txml_node insert_move_before(const xml_node& moved, const xml_node& node);\n\n\t\t// Remove specified attribute\n\t\tbool remove_attribute(const xml_attribute& a);\n\t\tbool remove_attribute(const char_t* name);\n\n\t\t// Remove specified child\n\t\tbool remove_child(const xml_node& n);\n\t\tbool remove_child(const char_t* name);\n\n\t\t// Parses buffer as an XML document fragment and appends all nodes as children of the current node.\n\t\t// Copies/converts the buffer, so it may be deleted or changed after the function returns.\n\t\t// Note: append_buffer allocates memory that has the lifetime of the owning document; removing the appended nodes does not immediately reclaim that memory.\n\t\txml_parse_result append_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n\t\t// Find attribute using predicate. Returns first attribute for which predicate returned true.\n\t\ttemplate <typename Predicate> xml_attribute find_attribute(Predicate pred) const\n\t\t{\n\t\t\tif (!_root) return xml_attribute();\n\t\t\t\n\t\t\tfor (xml_attribute attrib = first_attribute(); attrib; attrib = attrib.next_attribute())\n\t\t\t\tif (pred(attrib))\n\t\t\t\t\treturn attrib;\n\t\t\n\t\t\treturn xml_attribute();\n\t\t}\n\n\t\t// Find child node using predicate. Returns first child for which predicate returned true.\n\t\ttemplate <typename Predicate> xml_node find_child(Predicate pred) const\n\t\t{\n\t\t\tif (!_root) return xml_node();\n\t\n\t\t\tfor (xml_node node = first_child(); node; node = node.next_sibling())\n\t\t\t\tif (pred(node))\n\t\t\t\t\treturn node;\n\t\t\n\t\t\treturn xml_node();\n\t\t}\n\n\t\t// Find node from subtree using predicate. Returns first node from subtree (depth-first), for which predicate returned true.\n\t\ttemplate <typename Predicate> xml_node find_node(Predicate pred) const\n\t\t{\n\t\t\tif (!_root) return xml_node();\n\n\t\t\txml_node cur = first_child();\n\t\t\t\n\t\t\twhile (cur._root && cur._root != _root)\n\t\t\t{\n\t\t\t\tif (pred(cur)) return cur;\n\n\t\t\t\tif (cur.first_child()) cur = cur.first_child();\n\t\t\t\telse if (cur.next_sibling()) cur = cur.next_sibling();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twhile (!cur.next_sibling() && cur._root != _root) cur = cur.parent();\n\n\t\t\t\t\tif (cur._root != _root) cur = cur.next_sibling();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn xml_node();\n\t\t}\n\n\t\t// Find child node by attribute name/value\n\t\txml_node find_child_by_attribute(const char_t* name, const char_t* attr_name, const char_t* attr_value) const;\n\t\txml_node find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const;\n\n\t#ifndef PUGIXML_NO_STL\n\t\t// Get the absolute node path from root as a text string.\n\t\tstring_t path(char_t delimiter = '/') const;\n\t#endif\n\n\t\t// Search for a node by path consisting of node names and . or .. elements.\n\t\txml_node first_element_by_path(const char_t* path, char_t delimiter = '/') const;\n\n\t\t// Recursively traverse subtree with xml_tree_walker\n\t\tbool traverse(xml_tree_walker& walker);\n\t\n\t#ifndef PUGIXML_NO_XPATH\n\t\t// Select single node by evaluating XPath query. Returns first node from the resulting node set.\n\t\txpath_node select_node(const char_t* query, xpath_variable_set* variables = 0) const;\n\t\txpath_node select_node(const xpath_query& query) const;\n\n\t\t// Select node set by evaluating XPath query\n\t\txpath_node_set select_nodes(const char_t* query, xpath_variable_set* variables = 0) const;\n\t\txpath_node_set select_nodes(const xpath_query& query) const;\n\n\t\t// (deprecated: use select_node instead) Select single node by evaluating XPath query.\n\t\txpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const;\n\t\txpath_node select_single_node(const xpath_query& query) const;\n\n\t#endif\n\t\t\n\t\t// Print subtree using a writer object\n\t\tvoid print(xml_writer& writer, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;\n\n\t#ifndef PUGIXML_NO_STL\n\t\t// Print subtree to stream\n\t\tvoid print(std::basic_ostream<char, std::char_traits<char> >& os, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;\n\t\tvoid print(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& os, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, unsigned int depth = 0) const;\n\t#endif\n\n\t\t// Child nodes iterators\n\t\ttypedef xml_node_iterator iterator;\n\n\t\titerator begin() const;\n\t\titerator end() const;\n\n\t\t// Attribute iterators\n\t\ttypedef xml_attribute_iterator attribute_iterator;\n\n\t\tattribute_iterator attributes_begin() const;\n\t\tattribute_iterator attributes_end() const;\n\n\t\t// Range-based for support\n\t\txml_object_range<xml_node_iterator> children() const;\n\t\txml_object_range<xml_named_node_iterator> children(const char_t* name) const;\n\t\txml_object_range<xml_attribute_iterator> attributes() const;\n\n\t\t// Get node offset in parsed file/string (in char_t units) for debugging purposes\n\t\tptrdiff_t offset_debug() const;\n\n\t\t// Get hash value (unique for handles to the same object)\n\t\tsize_t hash_value() const;\n\n\t\t// Get internal pointer\n\t\txml_node_struct* internal_object() const;\n\t};\n\n#ifdef __BORLANDC__\n\t// Borland C++ workaround\n\tbool PUGIXML_FUNCTION operator&&(const xml_node& lhs, bool rhs);\n\tbool PUGIXML_FUNCTION operator||(const xml_node& lhs, bool rhs);\n#endif\n\n\t// A helper for working with text inside PCDATA nodes\n\tclass PUGIXML_CLASS xml_text\n\t{\n\t\tfriend class xml_node;\n\n\t\txml_node_struct* _root;\n\n\t\ttypedef void (*unspecified_bool_type)(xml_text***);\n\n\t\texplicit xml_text(xml_node_struct* root);\n\n\t\txml_node_struct* _data_new();\n\t\txml_node_struct* _data() const;\n\n\tpublic:\n\t\t// Default constructor. Constructs an empty object.\n\t\txml_text();\n\n\t\t// Safe bool conversion operator\n\t\toperator unspecified_bool_type() const;\n\n\t\t// Borland C++ workaround\n\t\tbool operator!() const;\n\n\t\t// Check if text object is empty\n\t\tbool empty() const;\n\n\t\t// Get text, or \"\" if object is empty\n\t\tconst char_t* get() const;\n\n\t\t// Get text, or the default value if object is empty\n\t\tconst char_t* as_string(const char_t* def = PUGIXML_TEXT(\"\")) const;\n\n\t\t// Get text as a number, or the default value if conversion did not succeed or object is empty\n\t\tint as_int(int def = 0) const;\n\t\tunsigned int as_uint(unsigned int def = 0) const;\n\t\tdouble as_double(double def = 0) const;\n\t\tfloat as_float(float def = 0) const;\n\n\t#ifdef PUGIXML_HAS_LONG_LONG\n\t\tlong long as_llong(long long def = 0) const;\n\t\tunsigned long long as_ullong(unsigned long long def = 0) const;\n\t#endif\n\n\t\t// Get text as bool (returns true if first character is in '1tTyY' set), or the default value if object is empty\n\t\tbool as_bool(bool def = false) const;\n\n\t\t// Set text (returns false if object is empty or there is not enough memory)\n\t\tbool set(const char_t* rhs);\n\n\t\t// Set text with type conversion (numbers are converted to strings, boolean is converted to \"true\"/\"false\")\n\t\tbool set(int rhs);\n\t\tbool set(unsigned int rhs);\n\t\tbool set(double rhs);\n\t\tbool set(float rhs);\n\t\tbool set(bool rhs);\n\n\t#ifdef PUGIXML_HAS_LONG_LONG\n\t\tbool set(long long rhs);\n\t\tbool set(unsigned long long rhs);\n\t#endif\n\n\t\t// Set text (equivalent to set without error checking)\n\t\txml_text& operator=(const char_t* rhs);\n\t\txml_text& operator=(int rhs);\n\t\txml_text& operator=(unsigned int rhs);\n\t\txml_text& operator=(double rhs);\n\t\txml_text& operator=(float rhs);\n\t\txml_text& operator=(bool rhs);\n\n\t#ifdef PUGIXML_HAS_LONG_LONG\n\t\txml_text& operator=(long long rhs);\n\t\txml_text& operator=(unsigned long long rhs);\n\t#endif\n\n\t\t// Get the data node (node_pcdata or node_cdata) for this object\n\t\txml_node data() const;\n\t};\n\n#ifdef __BORLANDC__\n\t// Borland C++ workaround\n\tbool PUGIXML_FUNCTION operator&&(const xml_text& lhs, bool rhs);\n\tbool PUGIXML_FUNCTION operator||(const xml_text& lhs, bool rhs);\n#endif\n\n\t// Child node iterator (a bidirectional iterator over a collection of xml_node)\n\tclass PUGIXML_CLASS xml_node_iterator\n\t{\n\t\tfriend class xml_node;\n\n\tprivate:\n\t\tmutable xml_node _wrap;\n\t\txml_node _parent;\n\n\t\txml_node_iterator(xml_node_struct* ref, xml_node_struct* parent);\n\n\tpublic:\n\t\t// Iterator traits\n\t\ttypedef ptrdiff_t difference_type;\n\t\ttypedef xml_node value_type;\n\t\ttypedef xml_node* pointer;\n\t\ttypedef xml_node& reference;\n\n\t#ifndef PUGIXML_NO_STL\n\t\ttypedef std::bidirectional_iterator_tag iterator_category;\n\t#endif\n\n\t\t// Default constructor\n\t\txml_node_iterator();\n\n\t\t// Construct an iterator which points to the specified node\n\t\txml_node_iterator(const xml_node& node);\n\n\t\t// Iterator operators\n\t\tbool operator==(const xml_node_iterator& rhs) const;\n\t\tbool operator!=(const xml_node_iterator& rhs) const;\n\n\t\txml_node& operator*() const;\n\t\txml_node* operator->() const;\n\n\t\tconst xml_node_iterator& operator++();\n\t\txml_node_iterator operator++(int);\n\n\t\tconst xml_node_iterator& operator--();\n\t\txml_node_iterator operator--(int);\n\t};\n\n\t// Attribute iterator (a bidirectional iterator over a collection of xml_attribute)\n\tclass PUGIXML_CLASS xml_attribute_iterator\n\t{\n\t\tfriend class xml_node;\n\n\tprivate:\n\t\tmutable xml_attribute _wrap;\n\t\txml_node _parent;\n\n\t\txml_attribute_iterator(xml_attribute_struct* ref, xml_node_struct* parent);\n\n\tpublic:\n\t\t// Iterator traits\n\t\ttypedef ptrdiff_t difference_type;\n\t\ttypedef xml_attribute value_type;\n\t\ttypedef xml_attribute* pointer;\n\t\ttypedef xml_attribute& reference;\n\n\t#ifndef PUGIXML_NO_STL\n\t\ttypedef std::bidirectional_iterator_tag iterator_category;\n\t#endif\n\n\t\t// Default constructor\n\t\txml_attribute_iterator();\n\n\t\t// Construct an iterator which points to the specified attribute\n\t\txml_attribute_iterator(const xml_attribute& attr, const xml_node& parent);\n\n\t\t// Iterator operators\n\t\tbool operator==(const xml_attribute_iterator& rhs) const;\n\t\tbool operator!=(const xml_attribute_iterator& rhs) const;\n\n\t\txml_attribute& operator*() const;\n\t\txml_attribute* operator->() const;\n\n\t\tconst xml_attribute_iterator& operator++();\n\t\txml_attribute_iterator operator++(int);\n\n\t\tconst xml_attribute_iterator& operator--();\n\t\txml_attribute_iterator operator--(int);\n\t};\n\n\t// Named node range helper\n\tclass PUGIXML_CLASS xml_named_node_iterator\n\t{\n\t\tfriend class xml_node;\n\n\tpublic:\n\t\t// Iterator traits\n\t\ttypedef ptrdiff_t difference_type;\n\t\ttypedef xml_node value_type;\n\t\ttypedef xml_node* pointer;\n\t\ttypedef xml_node& reference;\n\n\t#ifndef PUGIXML_NO_STL\n\t\ttypedef std::bidirectional_iterator_tag iterator_category;\n\t#endif\n\n\t\t// Default constructor\n\t\txml_named_node_iterator();\n\n\t\t// Construct an iterator which points to the specified node\n\t\txml_named_node_iterator(const xml_node& node, const char_t* name);\n\n\t\t// Iterator operators\n\t\tbool operator==(const xml_named_node_iterator& rhs) const;\n\t\tbool operator!=(const xml_named_node_iterator& rhs) const;\n\n\t\txml_node& operator*() const;\n\t\txml_node* operator->() const;\n\n\t\tconst xml_named_node_iterator& operator++();\n\t\txml_named_node_iterator operator++(int);\n\n\t\tconst xml_named_node_iterator& operator--();\n\t\txml_named_node_iterator operator--(int);\n\n\tprivate:\n\t\tmutable xml_node _wrap;\n\t\txml_node _parent;\n\t\tconst char_t* _name;\n\n\t\txml_named_node_iterator(xml_node_struct* ref, xml_node_struct* parent, const char_t* name);\n\t};\n\n\t// Abstract tree walker class (see xml_node::traverse)\n\tclass PUGIXML_CLASS xml_tree_walker\n\t{\n\t\tfriend class xml_node;\n\n\tprivate:\n\t\tint _depth;\n\t\n\tprotected:\n\t\t// Get current traversal depth\n\t\tint depth() const;\n\t\n\tpublic:\n\t\txml_tree_walker();\n\t\tvirtual ~xml_tree_walker();\n\n\t\t// Callback that is called when traversal begins\n\t\tvirtual bool begin(xml_node& node);\n\n\t\t// Callback that is called for each node traversed\n\t\tvirtual bool for_each(xml_node& node) = 0;\n\n\t\t// Callback that is called when traversal ends\n\t\tvirtual bool end(xml_node& node);\n\t};\n\n\t// Parsing status, returned as part of xml_parse_result object\n\tenum xml_parse_status\n\t{\n\t\tstatus_ok = 0,\t\t\t\t// No error\n\n\t\tstatus_file_not_found,\t\t// File was not found during load_file()\n\t\tstatus_io_error,\t\t\t// Error reading from file/stream\n\t\tstatus_out_of_memory,\t\t// Could not allocate memory\n\t\tstatus_internal_error,\t\t// Internal error occurred\n\n\t\tstatus_unrecognized_tag,\t// Parser could not determine tag type\n\n\t\tstatus_bad_pi,\t\t\t\t// Parsing error occurred while parsing document declaration/processing instruction\n\t\tstatus_bad_comment,\t\t\t// Parsing error occurred while parsing comment\n\t\tstatus_bad_cdata,\t\t\t// Parsing error occurred while parsing CDATA section\n\t\tstatus_bad_doctype,\t\t\t// Parsing error occurred while parsing document type declaration\n\t\tstatus_bad_pcdata,\t\t\t// Parsing error occurred while parsing PCDATA section\n\t\tstatus_bad_start_element,\t// Parsing error occurred while parsing start element tag\n\t\tstatus_bad_attribute,\t\t// Parsing error occurred while parsing element attribute\n\t\tstatus_bad_end_element,\t\t// Parsing error occurred while parsing end element tag\n\t\tstatus_end_element_mismatch,// There was a mismatch of start-end tags (closing tag had incorrect name, some tag was not closed or there was an excessive closing tag)\n\n\t\tstatus_append_invalid_root,\t// Unable to append nodes since root type is not node_element or node_document (exclusive to xml_node::append_buffer)\n\n\t\tstatus_no_document_element\t// Parsing resulted in a document without element nodes\n\t};\n\n\t// Parsing result\n\tstruct PUGIXML_CLASS xml_parse_result\n\t{\n\t\t// Parsing status (see xml_parse_status)\n\t\txml_parse_status status;\n\n\t\t// Last parsed offset (in char_t units from start of input data)\n\t\tptrdiff_t offset;\n\n\t\t// Source document encoding\n\t\txml_encoding encoding;\n\n\t\t// Default constructor, initializes object to failed state\n\t\txml_parse_result();\n\n\t\t// Cast to bool operator\n\t\toperator bool() const;\n\n\t\t// Get error description\n\t\tconst char* description() const;\n\t};\n\n\t// Document class (DOM tree root)\n\tclass PUGIXML_CLASS xml_document: public xml_node\n\t{\n\tprivate:\n\t\tchar_t* _buffer;\n\n\t\tchar _memory[192];\n\t\t\n\t\t// Non-copyable semantics\n\t\txml_document(const xml_document&);\n\t\tconst xml_document& operator=(const xml_document&);\n\n\t\tvoid create();\n\t\tvoid destroy();\n\n\tpublic:\n\t\t// Default constructor, makes empty document\n\t\txml_document();\n\n\t\t// Destructor, invalidates all node/attribute handles to this document\n\t\t~xml_document();\n\n\t\t// Removes all nodes, leaving the empty document\n\t\tvoid reset();\n\n\t\t// Removes all nodes, then copies the entire contents of the specified document\n\t\tvoid reset(const xml_document& proto);\n\n\t#ifndef PUGIXML_NO_STL\n\t\t// Load document from stream.\n\t\txml_parse_result load(std::basic_istream<char, std::char_traits<char> >& stream, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\t\txml_parse_result load(std::basic_istream<wchar_t, std::char_traits<wchar_t> >& stream, unsigned int options = parse_default);\n\t#endif\n\n\t\t// (deprecated: use load_string instead) Load document from zero-terminated string. No encoding conversions are applied.\n\t\txml_parse_result load(const char_t* contents, unsigned int options = parse_default);\n\n\t\t// Load document from zero-terminated string. No encoding conversions are applied.\n\t\txml_parse_result load_string(const char_t* contents, unsigned int options = parse_default);\n\n\t\t// Load document from file\n\t\txml_parse_result load_file(const char* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\t\txml_parse_result load_file(const wchar_t* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n\t\t// Load document from buffer. Copies/converts the buffer, so it may be deleted or changed after the function returns.\n\t\txml_parse_result load_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n\t\t// Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data).\n\t\t// You should ensure that buffer data will persist throughout the document's lifetime, and free the buffer memory manually once document is destroyed.\n\t\txml_parse_result load_buffer_inplace(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n\t\t// Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data).\n\t\t// You should allocate the buffer with pugixml allocation function; document will free the buffer when it is no longer needed (you can't use it anymore).\n\t\txml_parse_result load_buffer_inplace_own(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);\n\n\t\t// Save XML document to writer (semantics is slightly different from xml_node::print, see documentation for details).\n\t\tvoid save(xml_writer& writer, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;\n\n\t#ifndef PUGIXML_NO_STL\n\t\t// Save XML document to stream (semantics is slightly different from xml_node::print, see documentation for details).\n\t\tvoid save(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;\n\t\tvoid save(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default) const;\n\t#endif\n\n\t\t// Save XML to file\n\t\tbool save_file(const char* path, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;\n\t\tbool save_file(const wchar_t* path, const char_t* indent = PUGIXML_TEXT(\"\\t\"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;\n\n\t\t// Get document element\n\t\txml_node document_element() const;\n\t};\n\n#ifndef PUGIXML_NO_XPATH\n\t// XPath query return type\n\tenum xpath_value_type\n\t{\n\t\txpath_type_none,\t  // Unknown type (query failed to compile)\n\t\txpath_type_node_set,  // Node set (xpath_node_set)\n\t\txpath_type_number,\t  // Number\n\t\txpath_type_string,\t  // String\n\t\txpath_type_boolean\t  // Boolean\n\t};\n\n\t// XPath parsing result\n\tstruct PUGIXML_CLASS xpath_parse_result\n\t{\n\t\t// Error message (0 if no error)\n\t\tconst char* error;\n\n\t\t// Last parsed offset (in char_t units from string start)\n\t\tptrdiff_t offset;\n\n\t\t// Default constructor, initializes object to failed state\n\t\txpath_parse_result();\n\n\t\t// Cast to bool operator\n\t\toperator bool() const;\n\n\t\t// Get error description\n\t\tconst char* description() const;\n\t};\n\n\t// A single XPath variable\n\tclass PUGIXML_CLASS xpath_variable\n\t{\n\t\tfriend class xpath_variable_set;\n\n\tprotected:\n\t\txpath_value_type _type;\n\t\txpath_variable* _next;\n\n\t\txpath_variable();\n\n\t\t// Non-copyable semantics\n\t\txpath_variable(const xpath_variable&);\n\t\txpath_variable& operator=(const xpath_variable&);\n\t\t\n\tpublic:\n\t\t// Get variable name\n\t\tconst char_t* name() const;\n\n\t\t// Get variable type\n\t\txpath_value_type type() const;\n\n\t\t// Get variable value; no type conversion is performed, default value (false, NaN, empty string, empty node set) is returned on type mismatch error\n\t\tbool get_boolean() const;\n\t\tdouble get_number() const;\n\t\tconst char_t* get_string() const;\n\t\tconst xpath_node_set& get_node_set() const;\n\n\t\t// Set variable value; no type conversion is performed, false is returned on type mismatch error\n\t\tbool set(bool value);\n\t\tbool set(double value);\n\t\tbool set(const char_t* value);\n\t\tbool set(const xpath_node_set& value);\n\t};\n\n\t// A set of XPath variables\n\tclass PUGIXML_CLASS xpath_variable_set\n\t{\n\tprivate:\n\t\txpath_variable* _data[64];\n\n\t\t// Non-copyable semantics\n\t\txpath_variable_set(const xpath_variable_set&);\n\t\txpath_variable_set& operator=(const xpath_variable_set&);\n\n\t\txpath_variable* find(const char_t* name) const;\n\n\tpublic:\n\t\t// Default constructor/destructor\n\t\txpath_variable_set();\n\t\t~xpath_variable_set();\n\n\t\t// Add a new variable or get the existing one, if the types match\n\t\txpath_variable* add(const char_t* name, xpath_value_type type);\n\n\t\t// Set value of an existing variable; no type conversion is performed, false is returned if there is no such variable or if types mismatch\n\t\tbool set(const char_t* name, bool value);\n\t\tbool set(const char_t* name, double value);\n\t\tbool set(const char_t* name, const char_t* value);\n\t\tbool set(const char_t* name, const xpath_node_set& value);\n\n\t\t// Get existing variable by name\n\t\txpath_variable* get(const char_t* name);\n\t\tconst xpath_variable* get(const char_t* name) const;\n\t};\n\n\t// A compiled XPath query object\n\tclass PUGIXML_CLASS xpath_query\n\t{\n\tprivate:\n\t\tvoid* _impl;\n\t\txpath_parse_result _result;\n\n\t\ttypedef void (*unspecified_bool_type)(xpath_query***);\n\n\t\t// Non-copyable semantics\n\t\txpath_query(const xpath_query&);\n\t\txpath_query& operator=(const xpath_query&);\n\n\tpublic:\n\t\t// Construct a compiled object from XPath expression.\n\t\t// If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on compilation errors.\n\t\texplicit xpath_query(const char_t* query, xpath_variable_set* variables = 0);\n\n\t\t// Destructor\n\t\t~xpath_query();\n\n\t\t// Get query expression return type\n\t\txpath_value_type return_type() const;\n\t\t\n\t\t// Evaluate expression as boolean value in the specified context; performs type conversion if necessary.\n\t\t// If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.\n\t\tbool evaluate_boolean(const xpath_node& n) const;\n\t\t\n\t\t// Evaluate expression as double value in the specified context; performs type conversion if necessary.\n\t\t// If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.\n\t\tdouble evaluate_number(const xpath_node& n) const;\n\t\t\n\t#ifndef PUGIXML_NO_STL\n\t\t// Evaluate expression as string value in the specified context; performs type conversion if necessary.\n\t\t// If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.\n\t\tstring_t evaluate_string(const xpath_node& n) const;\n\t#endif\n\t\t\n\t\t// Evaluate expression as string value in the specified context; performs type conversion if necessary.\n\t\t// At most capacity characters are written to the destination buffer, full result size is returned (includes terminating zero).\n\t\t// If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.\n\t\t// If PUGIXML_NO_EXCEPTIONS is defined, returns empty  set instead.\n\t\tsize_t evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const;\n\n\t\t// Evaluate expression as node set in the specified context.\n\t\t// If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on type mismatch and std::bad_alloc on out of memory errors.\n\t\t// If PUGIXML_NO_EXCEPTIONS is defined, returns empty node set instead.\n\t\txpath_node_set evaluate_node_set(const xpath_node& n) const;\n\n\t\t// Evaluate expression as node set in the specified context.\n\t\t// Return first node in document order, or empty node if node set is empty.\n\t\t// If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on type mismatch and std::bad_alloc on out of memory errors.\n\t\t// If PUGIXML_NO_EXCEPTIONS is defined, returns empty node instead.\n\t\txpath_node evaluate_node(const xpath_node& n) const;\n\n\t\t// Get parsing result (used to get compilation errors in PUGIXML_NO_EXCEPTIONS mode)\n\t\tconst xpath_parse_result& result() const;\n\n\t\t// Safe bool conversion operator\n\t\toperator unspecified_bool_type() const;\n\n\t\t// Borland C++ workaround\n\t\tbool operator!() const;\n\t};\n\t\n\t#ifndef PUGIXML_NO_EXCEPTIONS\n\t// XPath exception class\n\tclass PUGIXML_CLASS xpath_exception: public std::exception\n\t{\n\tprivate:\n\t\txpath_parse_result _result;\n\n\tpublic:\n\t\t// Construct exception from parse result\n\t\texplicit xpath_exception(const xpath_parse_result& result);\n\n\t\t// Get error message\n\t\tvirtual const char* what() const throw();\n\n\t\t// Get parse result\n\t\tconst xpath_parse_result& result() const;\n\t};\n\t#endif\n\t\n\t// XPath node class (either xml_node or xml_attribute)\n\tclass PUGIXML_CLASS xpath_node\n\t{\n\tprivate:\n\t\txml_node _node;\n\t\txml_attribute _attribute;\n\t\n\t\ttypedef void (*unspecified_bool_type)(xpath_node***);\n\n\tpublic:\n\t\t// Default constructor; constructs empty XPath node\n\t\txpath_node();\n\t\t\n\t\t// Construct XPath node from XML node/attribute\n\t\txpath_node(const xml_node& node);\n\t\txpath_node(const xml_attribute& attribute, const xml_node& parent);\n\n\t\t// Get node/attribute, if any\n\t\txml_node node() const;\n\t\txml_attribute attribute() const;\n\t\t\n\t\t// Get parent of contained node/attribute\n\t\txml_node parent() const;\n\n\t\t// Safe bool conversion operator\n\t\toperator unspecified_bool_type() const;\n\t\t\n\t\t// Borland C++ workaround\n\t\tbool operator!() const;\n\n\t\t// Comparison operators\n\t\tbool operator==(const xpath_node& n) const;\n\t\tbool operator!=(const xpath_node& n) const;\n\t};\n\n#ifdef __BORLANDC__\n\t// Borland C++ workaround\n\tbool PUGIXML_FUNCTION operator&&(const xpath_node& lhs, bool rhs);\n\tbool PUGIXML_FUNCTION operator||(const xpath_node& lhs, bool rhs);\n#endif\n\n\t// A fixed-size collection of XPath nodes\n\tclass PUGIXML_CLASS xpath_node_set\n\t{\n\tpublic:\n\t\t// Collection type\n\t\tenum type_t\n\t\t{\n\t\t\ttype_unsorted,\t\t\t// Not ordered\n\t\t\ttype_sorted,\t\t\t// Sorted by document order (ascending)\n\t\t\ttype_sorted_reverse\t\t// Sorted by document order (descending)\n\t\t};\n\t\t\n\t\t// Constant iterator type\n\t\ttypedef const xpath_node* const_iterator;\n\n\t\t// We define non-constant iterator to be the same as constant iterator so that various generic algorithms (i.e. boost foreach) work\n\t\ttypedef const xpath_node* iterator;\n\t\n\t\t// Default constructor. Constructs empty set.\n\t\txpath_node_set();\n\n\t\t// Constructs a set from iterator range; data is not checked for duplicates and is not sorted according to provided type, so be careful\n\t\txpath_node_set(const_iterator begin, const_iterator end, type_t type = type_unsorted);\n\n\t\t// Destructor\n\t\t~xpath_node_set();\n\t\t\n\t\t// Copy constructor/assignment operator\n\t\txpath_node_set(const xpath_node_set& ns);\n\t\txpath_node_set& operator=(const xpath_node_set& ns);\n\n\t\t// Get collection type\n\t\ttype_t type() const;\n\t\t\n\t\t// Get collection size\n\t\tsize_t size() const;\n\n\t\t// Indexing operator\n\t\tconst xpath_node& operator[](size_t index) const;\n\t\t\n\t\t// Collection iterators\n\t\tconst_iterator begin() const;\n\t\tconst_iterator end() const;\n\n\t\t// Sort the collection in ascending/descending order by document order\n\t\tvoid sort(bool reverse = false);\n\t\t\n\t\t// Get first node in the collection by document order\n\t\txpath_node first() const;\n\t\t\n\t\t// Check if collection is empty\n\t\tbool empty() const;\n\t\n\tprivate:\n\t\ttype_t _type;\n\t\t\n\t\txpath_node _storage;\n\t\t\n\t\txpath_node* _begin;\n\t\txpath_node* _end;\n\n\t\tvoid _assign(const_iterator begin, const_iterator end);\n\t};\n#endif\n\n#ifndef PUGIXML_NO_STL\n\t// Convert wide string to UTF8\n\tstd::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const wchar_t* str);\n\tstd::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >& str);\n\t\n\t// Convert UTF8 to wide string\n\tstd::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const char* str);\n\tstd::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >& str);\n#endif\n\n\t// Memory allocation function interface; returns pointer to allocated memory or NULL on failure\n\ttypedef void* (*allocation_function)(size_t size);\n\t\n\t// Memory deallocation function interface\n\ttypedef void (*deallocation_function)(void* ptr);\n\n\t// Override default memory management functions. All subsequent allocations/deallocations will be performed via supplied functions.\n\tvoid PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate);\n\t\n\t// Get current memory management functions\n\tallocation_function PUGIXML_FUNCTION get_memory_allocation_function();\n\tdeallocation_function PUGIXML_FUNCTION get_memory_deallocation_function();\n}\n\n#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))\nnamespace std\n{\n\t// Workarounds for (non-standard) iterator category detection for older versions (MSVC7/IC8 and earlier)\n\tstd::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_node_iterator&);\n\tstd::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_attribute_iterator&);\n\tstd::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_named_node_iterator&);\n}\n#endif\n\n#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)\nnamespace std\n{\n\t// Workarounds for (non-standard) iterator category detection\n\tstd::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_node_iterator&);\n\tstd::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_attribute_iterator&);\n\tstd::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_named_node_iterator&);\n}\n#endif\n\n#endif\n\n// Make sure implementation is included in header-only mode\n// Use macro expansion in #include to work around QMake (QTBUG-11923)\n#if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE)\n#\tdefine PUGIXML_SOURCE \"pugixml.cpp\"\n#\tinclude PUGIXML_SOURCE\n#endif\n\n/*\n * Copyright (c) 2006-2015 Arseny Kapoulkine\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/allocators.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_ALLOCATORS_H_\n#define RAPIDJSON_ALLOCATORS_H_\n\n#include \"rapidjson.h\"\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n///////////////////////////////////////////////////////////////////////////////\n// Allocator\n\n/*! \\class rapidjson::Allocator\n    \\brief Concept for allocating, resizing and freeing memory block.\n    \n    Note that Malloc() and Realloc() are non-static but Free() is static.\n    \n    So if an allocator need to support Free(), it needs to put its pointer in \n    the header of memory block.\n\n\\code\nconcept Allocator {\n    static const bool kNeedFree;    //!< Whether this allocator needs to call Free().\n\n    // Allocate a memory block.\n    // \\param size of the memory block in bytes.\n    // \\returns pointer to the memory block.\n    void* Malloc(size_t size);\n\n    // Resize a memory block.\n    // \\param originalPtr The pointer to current memory block. Null pointer is permitted.\n    // \\param originalSize The current size in bytes. (Design issue: since some allocator may not book-keep this, explicitly pass to it can save memory.)\n    // \\param newSize the new size in bytes.\n    void* Realloc(void* originalPtr, size_t originalSize, size_t newSize);\n\n    // Free a memory block.\n    // \\param pointer to the memory block. Null pointer is permitted.\n    static void Free(void *ptr);\n};\n\\endcode\n*/\n\n\n/*! \\def RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief User-defined kDefaultChunkCapacity definition.\n\n    User can define this as any \\c size that is a power of 2.\n*/\n\n#ifndef RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY\n#define RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY (64 * 1024)\n#endif\n\n\n///////////////////////////////////////////////////////////////////////////////\n// CrtAllocator\n\n//! C-runtime library allocator.\n/*! This class is just wrapper for standard C library memory routines.\n    \\note implements Allocator concept\n*/\nclass CrtAllocator {\npublic:\n    static const bool kNeedFree = true;\n    void* Malloc(size_t size) { \n        if (size) //  behavior of malloc(0) is implementation defined.\n            return std::malloc(size);\n        else\n            return NULL; // standardize to returning NULL.\n    }\n    void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) {\n        (void)originalSize;\n        if (newSize == 0) {\n            std::free(originalPtr);\n            return NULL;\n        }\n        return std::realloc(originalPtr, newSize);\n    }\n    static void Free(void *ptr) { std::free(ptr); }\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// MemoryPoolAllocator\n\n//! Default memory allocator used by the parser and DOM.\n/*! This allocator allocate memory blocks from pre-allocated memory chunks. \n\n    It does not free memory blocks. And Realloc() only allocate new memory.\n\n    The memory chunks are allocated by BaseAllocator, which is CrtAllocator by default.\n\n    User may also supply a buffer as the first chunk.\n\n    If the user-buffer is full then additional chunks are allocated by BaseAllocator.\n\n    The user-buffer is not deallocated by this allocator.\n\n    \\tparam BaseAllocator the allocator type for allocating memory chunks. Default is CrtAllocator.\n    \\note implements Allocator concept\n*/\ntemplate <typename BaseAllocator = CrtAllocator>\nclass MemoryPoolAllocator {\npublic:\n    static const bool kNeedFree = false;    //!< Tell users that no need to call Free() with this allocator. (concept Allocator)\n\n    //! Constructor with chunkSize.\n    /*! \\param chunkSize The size of memory chunk. The default is kDefaultChunkSize.\n        \\param baseAllocator The allocator for allocating memory chunks.\n    */\n    MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) : \n        chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(0), baseAllocator_(baseAllocator), ownBaseAllocator_(0)\n    {\n    }\n\n    //! Constructor with user-supplied buffer.\n    /*! The user buffer will be used firstly. When it is full, memory pool allocates new chunk with chunk size.\n\n        The user buffer will not be deallocated when this allocator is destructed.\n\n        \\param buffer User supplied buffer.\n        \\param size Size of the buffer in bytes. It must at least larger than sizeof(ChunkHeader).\n        \\param chunkSize The size of memory chunk. The default is kDefaultChunkSize.\n        \\param baseAllocator The allocator for allocating memory chunks.\n    */\n    MemoryPoolAllocator(void *buffer, size_t size, size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :\n        chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(buffer), baseAllocator_(baseAllocator), ownBaseAllocator_(0)\n    {\n        RAPIDJSON_ASSERT(buffer != 0);\n        RAPIDJSON_ASSERT(size > sizeof(ChunkHeader));\n        chunkHead_ = reinterpret_cast<ChunkHeader*>(buffer);\n        chunkHead_->capacity = size - sizeof(ChunkHeader);\n        chunkHead_->size = 0;\n        chunkHead_->next = 0;\n    }\n\n    //! Destructor.\n    /*! This deallocates all memory chunks, excluding the user-supplied buffer.\n    */\n    ~MemoryPoolAllocator() {\n        Clear();\n        RAPIDJSON_DELETE(ownBaseAllocator_);\n    }\n\n    //! Deallocates all memory chunks, excluding the user-supplied buffer.\n    void Clear() {\n        while (chunkHead_ && chunkHead_ != userBuffer_) {\n            ChunkHeader* next = chunkHead_->next;\n            baseAllocator_->Free(chunkHead_);\n            chunkHead_ = next;\n        }\n        if (chunkHead_ && chunkHead_ == userBuffer_)\n            chunkHead_->size = 0; // Clear user buffer\n    }\n\n    //! Computes the total capacity of allocated memory chunks.\n    /*! \\return total capacity in bytes.\n    */\n    size_t Capacity() const {\n        size_t capacity = 0;\n        for (ChunkHeader* c = chunkHead_; c != 0; c = c->next)\n            capacity += c->capacity;\n        return capacity;\n    }\n\n    //! Computes the memory blocks allocated.\n    /*! \\return total used bytes.\n    */\n    size_t Size() const {\n        size_t size = 0;\n        for (ChunkHeader* c = chunkHead_; c != 0; c = c->next)\n            size += c->size;\n        return size;\n    }\n\n    //! Allocates a memory block. (concept Allocator)\n    void* Malloc(size_t size) {\n        if (!size)\n            return NULL;\n\n        size = RAPIDJSON_ALIGN(size);\n        if (chunkHead_ == 0 || chunkHead_->size + size > chunkHead_->capacity)\n            if (!AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size))\n                return NULL;\n\n        void *buffer = reinterpret_cast<char *>(chunkHead_) + RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + chunkHead_->size;\n        chunkHead_->size += size;\n        return buffer;\n    }\n\n    //! Resizes a memory block (concept Allocator)\n    void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) {\n        if (originalPtr == 0)\n            return Malloc(newSize);\n\n        if (newSize == 0)\n            return NULL;\n\n        originalSize = RAPIDJSON_ALIGN(originalSize);\n        newSize = RAPIDJSON_ALIGN(newSize);\n\n        // Do not shrink if new size is smaller than original\n        if (originalSize >= newSize)\n            return originalPtr;\n\n        // Simply expand it if it is the last allocation and there is sufficient space\n        if (originalPtr == reinterpret_cast<char *>(chunkHead_) + RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + chunkHead_->size - originalSize) {\n            size_t increment = static_cast<size_t>(newSize - originalSize);\n            if (chunkHead_->size + increment <= chunkHead_->capacity) {\n                chunkHead_->size += increment;\n                return originalPtr;\n            }\n        }\n\n        // Realloc process: allocate and copy memory, do not free original buffer.\n        if (void* newBuffer = Malloc(newSize)) {\n            if (originalSize)\n                std::memcpy(newBuffer, originalPtr, originalSize);\n            return newBuffer;\n        }\n        else\n            return NULL;\n    }\n\n    //! Frees a memory block (concept Allocator)\n    static void Free(void *ptr) { (void)ptr; } // Do nothing\n\nprivate:\n    //! Copy constructor is not permitted.\n    MemoryPoolAllocator(const MemoryPoolAllocator& rhs) /* = delete */;\n    //! Copy assignment operator is not permitted.\n    MemoryPoolAllocator& operator=(const MemoryPoolAllocator& rhs) /* = delete */;\n\n    //! Creates a new chunk.\n    /*! \\param capacity Capacity of the chunk in bytes.\n        \\return true if success.\n    */\n    bool AddChunk(size_t capacity) {\n        if (!baseAllocator_)\n            ownBaseAllocator_ = baseAllocator_ = RAPIDJSON_NEW(BaseAllocator)();\n        if (ChunkHeader* chunk = reinterpret_cast<ChunkHeader*>(baseAllocator_->Malloc(RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + capacity))) {\n            chunk->capacity = capacity;\n            chunk->size = 0;\n            chunk->next = chunkHead_;\n            chunkHead_ =  chunk;\n            return true;\n        }\n        else\n            return false;\n    }\n\n    static const int kDefaultChunkCapacity = RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY; //!< Default chunk capacity.\n\n    //! Chunk header for perpending to each chunk.\n    /*! Chunks are stored as a singly linked list.\n    */\n    struct ChunkHeader {\n        size_t capacity;    //!< Capacity of the chunk in bytes (excluding the header itself).\n        size_t size;        //!< Current size of allocated memory in bytes.\n        ChunkHeader *next;  //!< Next chunk in the linked list.\n    };\n\n    ChunkHeader *chunkHead_;    //!< Head of the chunk linked-list. Only the head chunk serves allocation.\n    size_t chunk_capacity_;     //!< The minimum capacity of chunk when they are allocated.\n    void *userBuffer_;          //!< User supplied buffer.\n    BaseAllocator* baseAllocator_;  //!< base allocator for allocating memory chunks.\n    BaseAllocator* ownBaseAllocator_;   //!< base allocator created by this object.\n};\n\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_ENCODINGS_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/cursorstreamwrapper.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n//\n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed\n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_CURSORSTREAMWRAPPER_H_\n#define RAPIDJSON_CURSORSTREAMWRAPPER_H_\n\n#include \"stream.h\"\n\n#if defined(__GNUC__)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(effc++)\n#endif\n\n#if defined(_MSC_VER) && _MSC_VER <= 1800\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(4702)  // unreachable code\nRAPIDJSON_DIAG_OFF(4512)  // assignment operator could not be generated\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n\n//! Cursor stream wrapper for counting line and column number if error exists.\n/*!\n    \\tparam InputStream     Any stream that implements Stream Concept\n*/\ntemplate <typename InputStream, typename Encoding = UTF8<> >\nclass CursorStreamWrapper : public GenericStreamWrapper<InputStream, Encoding> {\npublic:\n    typedef typename Encoding::Ch Ch;\n\n    CursorStreamWrapper(InputStream& is):\n        GenericStreamWrapper<InputStream, Encoding>(is), line_(1), col_(0) {}\n\n    // counting line and column number\n    Ch Take() {\n        Ch ch = this->is_.Take();\n        if(ch == '\\n') {\n            line_ ++;\n            col_ = 0;\n        } else {\n            col_ ++;\n        }\n        return ch;\n    }\n\n    //! Get the error line number, if error exists.\n    size_t GetLine() const { return line_; }\n    //! Get the error column number, if error exists.\n    size_t GetColumn() const { return col_; }\n\nprivate:\n    size_t line_;   //!< Current Line\n    size_t col_;    //!< Current Column\n};\n\n#if defined(_MSC_VER) && _MSC_VER <= 1800\nRAPIDJSON_DIAG_POP\n#endif\n\n#if defined(__GNUC__)\nRAPIDJSON_DIAG_POP\n#endif\n\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_CURSORSTREAMWRAPPER_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/document.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_DOCUMENT_H_\n#define RAPIDJSON_DOCUMENT_H_\n\n/*! \\file document.h */\n\n#include \"reader.h\"\n#include \"internal/meta.h\"\n#include \"internal/strfunc.h\"\n#include \"memorystream.h\"\n#include \"encodedstream.h\"\n#include <new>      // placement new\n#include <limits>\n#ifdef __cpp_lib_three_way_comparison\n#include <compare>\n#endif\n\nRAPIDJSON_DIAG_PUSH\n#ifdef __clang__\nRAPIDJSON_DIAG_OFF(padded)\nRAPIDJSON_DIAG_OFF(switch-enum)\nRAPIDJSON_DIAG_OFF(c++98-compat)\n#elif defined(_MSC_VER)\nRAPIDJSON_DIAG_OFF(4127) // conditional expression is constant\nRAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data\n#endif\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_OFF(effc++)\n#endif // __GNUC__\n\n#ifndef RAPIDJSON_NOMEMBERITERATORCLASS\n#include <iterator> // std::random_access_iterator_tag\n#endif\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n#include <utility> // std::move\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n// Forward declaration.\ntemplate <typename Encoding, typename Allocator>\nclass GenericValue;\n\ntemplate <typename Encoding, typename Allocator, typename StackAllocator>\nclass GenericDocument;\n\n/*! \\def RAPIDJSON_DEFAULT_ALLOCATOR\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief Allows to choose default allocator.\n\n    User can define this to use CrtAllocator or MemoryPoolAllocator.\n*/\n#ifndef RAPIDJSON_DEFAULT_ALLOCATOR\n#define RAPIDJSON_DEFAULT_ALLOCATOR MemoryPoolAllocator<CrtAllocator>\n#endif\n\n/*! \\def RAPIDJSON_DEFAULT_STACK_ALLOCATOR\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief Allows to choose default stack allocator for Document.\n\n    User can define this to use CrtAllocator or MemoryPoolAllocator.\n*/\n#ifndef RAPIDJSON_DEFAULT_STACK_ALLOCATOR\n#define RAPIDJSON_DEFAULT_STACK_ALLOCATOR CrtAllocator\n#endif\n\n/*! \\def RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief User defined kDefaultObjectCapacity value.\n\n    User can define this as any natural number.\n*/\n#ifndef RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY\n// number of objects that rapidjson::Value allocates memory for by default\n#define RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY 16\n#endif\n\n/*! \\def RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief User defined kDefaultArrayCapacity value.\n\n    User can define this as any natural number.\n*/\n#ifndef RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY\n// number of array elements that rapidjson::Value allocates memory for by default\n#define RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY 16\n#endif\n\n//! Name-value pair in a JSON object value.\n/*!\n    This class was internal to GenericValue. It used to be a inner struct.\n    But a compiler (IBM XL C/C++ for AIX) have reported to have problem with that so it moved as a namespace scope struct.\n    https://code.google.com/p/rapidjson/issues/detail?id=64\n*/\ntemplate <typename Encoding, typename Allocator> \nclass GenericMember {\npublic:\n    GenericValue<Encoding, Allocator> name;     //!< name of member (must be a string)\n    GenericValue<Encoding, Allocator> value;    //!< value of member.\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    //! Move constructor in C++11\n    GenericMember(GenericMember&& rhs) RAPIDJSON_NOEXCEPT\n        : name(std::move(rhs.name)),\n          value(std::move(rhs.value))\n    {\n    }\n\n    //! Move assignment in C++11\n    GenericMember& operator=(GenericMember&& rhs) RAPIDJSON_NOEXCEPT {\n        return *this = static_cast<GenericMember&>(rhs);\n    }\n#endif\n\n    //! Assignment with move semantics.\n    /*! \\param rhs Source of the assignment. Its name and value will become a null value after assignment.\n    */\n    GenericMember& operator=(GenericMember& rhs) RAPIDJSON_NOEXCEPT {\n        if (RAPIDJSON_LIKELY(this != &rhs)) {\n            name = rhs.name;\n            value = rhs.value;\n        }\n        return *this;\n    }\n\n    // swap() for std::sort() and other potential use in STL.\n    friend inline void swap(GenericMember& a, GenericMember& b) RAPIDJSON_NOEXCEPT {\n        a.name.Swap(b.name);\n        a.value.Swap(b.value);\n    }\n\nprivate:\n    //! Copy constructor is not permitted.\n    GenericMember(const GenericMember& rhs);\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericMemberIterator\n\n#ifndef RAPIDJSON_NOMEMBERITERATORCLASS\n\n//! (Constant) member iterator for a JSON object value\n/*!\n    \\tparam Const Is this a constant iterator?\n    \\tparam Encoding    Encoding of the value. (Even non-string values need to have the same encoding in a document)\n    \\tparam Allocator   Allocator type for allocating memory of object, array and string.\n\n    This class implements a Random Access Iterator for GenericMember elements\n    of a GenericValue, see ISO/IEC 14882:2003(E) C++ standard, 24.1 [lib.iterator.requirements].\n\n    \\note This iterator implementation is mainly intended to avoid implicit\n        conversions from iterator values to \\c NULL,\n        e.g. from GenericValue::FindMember.\n\n    \\note Define \\c RAPIDJSON_NOMEMBERITERATORCLASS to fall back to a\n        pointer-based implementation, if your platform doesn't provide\n        the C++ <iterator> header.\n\n    \\see GenericMember, GenericValue::MemberIterator, GenericValue::ConstMemberIterator\n */\ntemplate <bool Const, typename Encoding, typename Allocator>\nclass GenericMemberIterator {\n\n    friend class GenericValue<Encoding,Allocator>;\n    template <bool, typename, typename> friend class GenericMemberIterator;\n\n    typedef GenericMember<Encoding,Allocator> PlainType;\n    typedef typename internal::MaybeAddConst<Const,PlainType>::Type ValueType;\n\npublic:\n    //! Iterator type itself\n    typedef GenericMemberIterator Iterator;\n    //! Constant iterator type\n    typedef GenericMemberIterator<true,Encoding,Allocator>  ConstIterator;\n    //! Non-constant iterator type\n    typedef GenericMemberIterator<false,Encoding,Allocator> NonConstIterator;\n\n    /** \\name std::iterator_traits support */\n    //@{\n    typedef ValueType      value_type;\n    typedef ValueType *    pointer;\n    typedef ValueType &    reference;\n    typedef std::ptrdiff_t difference_type;\n    typedef std::random_access_iterator_tag iterator_category;\n    //@}\n\n    //! Pointer to (const) GenericMember\n    typedef pointer         Pointer;\n    //! Reference to (const) GenericMember\n    typedef reference       Reference;\n    //! Signed integer type (e.g. \\c ptrdiff_t)\n    typedef difference_type DifferenceType;\n\n    //! Default constructor (singular value)\n    /*! Creates an iterator pointing to no element.\n        \\note All operations, except for comparisons, are undefined on such values.\n     */\n    GenericMemberIterator() : ptr_() {}\n\n    //! Iterator conversions to more const\n    /*!\n        \\param it (Non-const) iterator to copy from\n\n        Allows the creation of an iterator from another GenericMemberIterator\n        that is \"less const\".  Especially, creating a non-constant iterator\n        from a constant iterator are disabled:\n        \\li const -> non-const (not ok)\n        \\li const -> const (ok)\n        \\li non-const -> const (ok)\n        \\li non-const -> non-const (ok)\n\n        \\note If the \\c Const template parameter is already \\c false, this\n            constructor effectively defines a regular copy-constructor.\n            Otherwise, the copy constructor is implicitly defined.\n    */\n    GenericMemberIterator(const NonConstIterator & it) : ptr_(it.ptr_) {}\n    Iterator& operator=(const NonConstIterator & it) { ptr_ = it.ptr_; return *this; }\n\n    //! @name stepping\n    //@{\n    Iterator& operator++(){ ++ptr_; return *this; }\n    Iterator& operator--(){ --ptr_; return *this; }\n    Iterator  operator++(int){ Iterator old(*this); ++ptr_; return old; }\n    Iterator  operator--(int){ Iterator old(*this); --ptr_; return old; }\n    //@}\n\n    //! @name increment/decrement\n    //@{\n    Iterator operator+(DifferenceType n) const { return Iterator(ptr_+n); }\n    Iterator operator-(DifferenceType n) const { return Iterator(ptr_-n); }\n\n    Iterator& operator+=(DifferenceType n) { ptr_+=n; return *this; }\n    Iterator& operator-=(DifferenceType n) { ptr_-=n; return *this; }\n    //@}\n\n    //! @name relations\n    //@{\n    template <bool Const_> bool operator==(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ == that.ptr_; }\n    template <bool Const_> bool operator!=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ != that.ptr_; }\n    template <bool Const_> bool operator<=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ <= that.ptr_; }\n    template <bool Const_> bool operator>=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ >= that.ptr_; }\n    template <bool Const_> bool operator< (const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ < that.ptr_; }\n    template <bool Const_> bool operator> (const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ > that.ptr_; }\n\n#ifdef __cpp_lib_three_way_comparison\n    template <bool Const_> std::strong_ordering operator<=>(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ <=> that.ptr_; }\n#endif\n    //@}\n\n    //! @name dereference\n    //@{\n    Reference operator*() const { return *ptr_; }\n    Pointer   operator->() const { return ptr_; }\n    Reference operator[](DifferenceType n) const { return ptr_[n]; }\n    //@}\n\n    //! Distance\n    DifferenceType operator-(ConstIterator that) const { return ptr_-that.ptr_; }\n\nprivate:\n    //! Internal constructor from plain pointer\n    explicit GenericMemberIterator(Pointer p) : ptr_(p) {}\n\n    Pointer ptr_; //!< raw pointer\n};\n\n#else // RAPIDJSON_NOMEMBERITERATORCLASS\n\n// class-based member iterator implementation disabled, use plain pointers\n\ntemplate <bool Const, typename Encoding, typename Allocator>\nclass GenericMemberIterator;\n\n//! non-const GenericMemberIterator\ntemplate <typename Encoding, typename Allocator>\nclass GenericMemberIterator<false,Encoding,Allocator> {\n    //! use plain pointer as iterator type\n    typedef GenericMember<Encoding,Allocator>* Iterator;\n};\n//! const GenericMemberIterator\ntemplate <typename Encoding, typename Allocator>\nclass GenericMemberIterator<true,Encoding,Allocator> {\n    //! use plain const pointer as iterator type\n    typedef const GenericMember<Encoding,Allocator>* Iterator;\n};\n\n#endif // RAPIDJSON_NOMEMBERITERATORCLASS\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericStringRef\n\n//! Reference to a constant string (not taking a copy)\n/*!\n    \\tparam CharType character type of the string\n\n    This helper class is used to automatically infer constant string\n    references for string literals, especially from \\c const \\b (!)\n    character arrays.\n\n    The main use is for creating JSON string values without copying the\n    source string via an \\ref Allocator.  This requires that the referenced\n    string pointers have a sufficient lifetime, which exceeds the lifetime\n    of the associated GenericValue.\n\n    \\b Example\n    \\code\n    Value v(\"foo\");   // ok, no need to copy & calculate length\n    const char foo[] = \"foo\";\n    v.SetString(foo); // ok\n\n    const char* bar = foo;\n    // Value x(bar); // not ok, can't rely on bar's lifetime\n    Value x(StringRef(bar)); // lifetime explicitly guaranteed by user\n    Value y(StringRef(bar, 3));  // ok, explicitly pass length\n    \\endcode\n\n    \\see StringRef, GenericValue::SetString\n*/\ntemplate<typename CharType>\nstruct GenericStringRef {\n    typedef CharType Ch; //!< character type of the string\n\n    //! Create string reference from \\c const character array\n#ifndef __clang__ // -Wdocumentation\n    /*!\n        This constructor implicitly creates a constant string reference from\n        a \\c const character array.  It has better performance than\n        \\ref StringRef(const CharType*) by inferring the string \\ref length\n        from the array length, and also supports strings containing null\n        characters.\n\n        \\tparam N length of the string, automatically inferred\n\n        \\param str Constant character array, lifetime assumed to be longer\n            than the use of the string in e.g. a GenericValue\n\n        \\post \\ref s == str\n\n        \\note Constant complexity.\n        \\note There is a hidden, private overload to disallow references to\n            non-const character arrays to be created via this constructor.\n            By this, e.g. function-scope arrays used to be filled via\n            \\c snprintf are excluded from consideration.\n            In such cases, the referenced string should be \\b copied to the\n            GenericValue instead.\n     */\n#endif\n    template<SizeType N>\n    GenericStringRef(const CharType (&str)[N]) RAPIDJSON_NOEXCEPT\n        : s(str), length(N-1) {}\n\n    //! Explicitly create string reference from \\c const character pointer\n#ifndef __clang__ // -Wdocumentation\n    /*!\n        This constructor can be used to \\b explicitly  create a reference to\n        a constant string pointer.\n\n        \\see StringRef(const CharType*)\n\n        \\param str Constant character pointer, lifetime assumed to be longer\n            than the use of the string in e.g. a GenericValue\n\n        \\post \\ref s == str\n\n        \\note There is a hidden, private overload to disallow references to\n            non-const character arrays to be created via this constructor.\n            By this, e.g. function-scope arrays used to be filled via\n            \\c snprintf are excluded from consideration.\n            In such cases, the referenced string should be \\b copied to the\n            GenericValue instead.\n     */\n#endif\n    explicit GenericStringRef(const CharType* str)\n        : s(str), length(NotNullStrLen(str)) {}\n\n    //! Create constant string reference from pointer and length\n#ifndef __clang__ // -Wdocumentation\n    /*! \\param str constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue\n        \\param len length of the string, excluding the trailing NULL terminator\n\n        \\post \\ref s == str && \\ref length == len\n        \\note Constant complexity.\n     */\n#endif\n    GenericStringRef(const CharType* str, SizeType len)\n        : s(RAPIDJSON_LIKELY(str) ? str : emptyString), length(len) { RAPIDJSON_ASSERT(str != 0 || len == 0u); }\n\n    GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}\n\n    //! implicit conversion to plain CharType pointer\n    operator const Ch *() const { return s; }\n\n    const Ch* const s; //!< plain CharType pointer\n    const SizeType length; //!< length of the string (excluding the trailing NULL terminator)\n\nprivate:\n    SizeType NotNullStrLen(const CharType* str) {\n        RAPIDJSON_ASSERT(str != 0);\n        return internal::StrLen(str);\n    }\n\n    /// Empty string - used when passing in a NULL pointer\n    static const Ch emptyString[];\n\n    //! Disallow construction from non-const array\n    template<SizeType N>\n    GenericStringRef(CharType (&str)[N]) /* = delete */;\n    //! Copy assignment operator not permitted - immutable type\n    GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */;\n};\n\ntemplate<typename CharType>\nconst CharType GenericStringRef<CharType>::emptyString[] = { CharType() };\n\n//! Mark a character pointer as constant string\n/*! Mark a plain character pointer as a \"string literal\".  This function\n    can be used to avoid copying a character string to be referenced as a\n    value in a JSON GenericValue object, if the string's lifetime is known\n    to be valid long enough.\n    \\tparam CharType Character type of the string\n    \\param str Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue\n    \\return GenericStringRef string reference object\n    \\relatesalso GenericStringRef\n\n    \\see GenericValue::GenericValue(StringRefType), GenericValue::operator=(StringRefType), GenericValue::SetString(StringRefType), GenericValue::PushBack(StringRefType, Allocator&), GenericValue::AddMember\n*/\ntemplate<typename CharType>\ninline GenericStringRef<CharType> StringRef(const CharType* str) {\n    return GenericStringRef<CharType>(str);\n}\n\n//! Mark a character pointer as constant string\n/*! Mark a plain character pointer as a \"string literal\".  This function\n    can be used to avoid copying a character string to be referenced as a\n    value in a JSON GenericValue object, if the string's lifetime is known\n    to be valid long enough.\n\n    This version has better performance with supplied length, and also\n    supports string containing null characters.\n\n    \\tparam CharType character type of the string\n    \\param str Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue\n    \\param length The length of source string.\n    \\return GenericStringRef string reference object\n    \\relatesalso GenericStringRef\n*/\ntemplate<typename CharType>\ninline GenericStringRef<CharType> StringRef(const CharType* str, size_t length) {\n    return GenericStringRef<CharType>(str, SizeType(length));\n}\n\n#if RAPIDJSON_HAS_STDSTRING\n//! Mark a string object as constant string\n/*! Mark a string object (e.g. \\c std::string) as a \"string literal\".\n    This function can be used to avoid copying a string to be referenced as a\n    value in a JSON GenericValue object, if the string's lifetime is known\n    to be valid long enough.\n\n    \\tparam CharType character type of the string\n    \\param str Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue\n    \\return GenericStringRef string reference object\n    \\relatesalso GenericStringRef\n    \\note Requires the definition of the preprocessor symbol \\ref RAPIDJSON_HAS_STDSTRING.\n*/\ntemplate<typename CharType>\ninline GenericStringRef<CharType> StringRef(const std::basic_string<CharType>& str) {\n    return GenericStringRef<CharType>(str.data(), SizeType(str.size()));\n}\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericValue type traits\nnamespace internal {\n\ntemplate <typename T, typename Encoding = void, typename Allocator = void>\nstruct IsGenericValueImpl : FalseType {};\n\n// select candidates according to nested encoding and allocator types\ntemplate <typename T> struct IsGenericValueImpl<T, typename Void<typename T::EncodingType>::Type, typename Void<typename T::AllocatorType>::Type>\n    : IsBaseOf<GenericValue<typename T::EncodingType, typename T::AllocatorType>, T>::Type {};\n\n// helper to match arbitrary GenericValue instantiations, including derived classes\ntemplate <typename T> struct IsGenericValue : IsGenericValueImpl<T>::Type {};\n\n} // namespace internal\n\n///////////////////////////////////////////////////////////////////////////////\n// TypeHelper\n\nnamespace internal {\n\ntemplate <typename ValueType, typename T>\nstruct TypeHelper {};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, bool> {\n    static bool Is(const ValueType& v) { return v.IsBool(); }\n    static bool Get(const ValueType& v) { return v.GetBool(); }\n    static ValueType& Set(ValueType& v, bool data) { return v.SetBool(data); }\n    static ValueType& Set(ValueType& v, bool data, typename ValueType::AllocatorType&) { return v.SetBool(data); }\n};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, int> {\n    static bool Is(const ValueType& v) { return v.IsInt(); }\n    static int Get(const ValueType& v) { return v.GetInt(); }\n    static ValueType& Set(ValueType& v, int data) { return v.SetInt(data); }\n    static ValueType& Set(ValueType& v, int data, typename ValueType::AllocatorType&) { return v.SetInt(data); }\n};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, unsigned> {\n    static bool Is(const ValueType& v) { return v.IsUint(); }\n    static unsigned Get(const ValueType& v) { return v.GetUint(); }\n    static ValueType& Set(ValueType& v, unsigned data) { return v.SetUint(data); }\n    static ValueType& Set(ValueType& v, unsigned data, typename ValueType::AllocatorType&) { return v.SetUint(data); }\n};\n\n#ifdef _MSC_VER\nRAPIDJSON_STATIC_ASSERT(sizeof(long) == sizeof(int));\ntemplate<typename ValueType>\nstruct TypeHelper<ValueType, long> {\n    static bool Is(const ValueType& v) { return v.IsInt(); }\n    static long Get(const ValueType& v) { return v.GetInt(); }\n    static ValueType& Set(ValueType& v, long data) { return v.SetInt(data); }\n    static ValueType& Set(ValueType& v, long data, typename ValueType::AllocatorType&) { return v.SetInt(data); }\n};\n\nRAPIDJSON_STATIC_ASSERT(sizeof(unsigned long) == sizeof(unsigned));\ntemplate<typename ValueType>\nstruct TypeHelper<ValueType, unsigned long> {\n    static bool Is(const ValueType& v) { return v.IsUint(); }\n    static unsigned long Get(const ValueType& v) { return v.GetUint(); }\n    static ValueType& Set(ValueType& v, unsigned long data) { return v.SetUint(data); }\n    static ValueType& Set(ValueType& v, unsigned long data, typename ValueType::AllocatorType&) { return v.SetUint(data); }\n};\n#endif\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, int64_t> {\n    static bool Is(const ValueType& v) { return v.IsInt64(); }\n    static int64_t Get(const ValueType& v) { return v.GetInt64(); }\n    static ValueType& Set(ValueType& v, int64_t data) { return v.SetInt64(data); }\n    static ValueType& Set(ValueType& v, int64_t data, typename ValueType::AllocatorType&) { return v.SetInt64(data); }\n};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, uint64_t> {\n    static bool Is(const ValueType& v) { return v.IsUint64(); }\n    static uint64_t Get(const ValueType& v) { return v.GetUint64(); }\n    static ValueType& Set(ValueType& v, uint64_t data) { return v.SetUint64(data); }\n    static ValueType& Set(ValueType& v, uint64_t data, typename ValueType::AllocatorType&) { return v.SetUint64(data); }\n};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, double> {\n    static bool Is(const ValueType& v) { return v.IsDouble(); }\n    static double Get(const ValueType& v) { return v.GetDouble(); }\n    static ValueType& Set(ValueType& v, double data) { return v.SetDouble(data); }\n    static ValueType& Set(ValueType& v, double data, typename ValueType::AllocatorType&) { return v.SetDouble(data); }\n};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, float> {\n    static bool Is(const ValueType& v) { return v.IsFloat(); }\n    static float Get(const ValueType& v) { return v.GetFloat(); }\n    static ValueType& Set(ValueType& v, float data) { return v.SetFloat(data); }\n    static ValueType& Set(ValueType& v, float data, typename ValueType::AllocatorType&) { return v.SetFloat(data); }\n};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, const typename ValueType::Ch*> {\n    typedef const typename ValueType::Ch* StringType;\n    static bool Is(const ValueType& v) { return v.IsString(); }\n    static StringType Get(const ValueType& v) { return v.GetString(); }\n    static ValueType& Set(ValueType& v, const StringType data) { return v.SetString(typename ValueType::StringRefType(data)); }\n    static ValueType& Set(ValueType& v, const StringType data, typename ValueType::AllocatorType& a) { return v.SetString(data, a); }\n};\n\n#if RAPIDJSON_HAS_STDSTRING\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, std::basic_string<typename ValueType::Ch> > {\n    typedef std::basic_string<typename ValueType::Ch> StringType;\n    static bool Is(const ValueType& v) { return v.IsString(); }\n    static StringType Get(const ValueType& v) { return StringType(v.GetString(), v.GetStringLength()); }\n    static ValueType& Set(ValueType& v, const StringType& data, typename ValueType::AllocatorType& a) { return v.SetString(data, a); }\n};\n#endif\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, typename ValueType::Array> {\n    typedef typename ValueType::Array ArrayType;\n    static bool Is(const ValueType& v) { return v.IsArray(); }\n    static ArrayType Get(ValueType& v) { return v.GetArray(); }\n    static ValueType& Set(ValueType& v, ArrayType data) { return v = data; }\n    static ValueType& Set(ValueType& v, ArrayType data, typename ValueType::AllocatorType&) { return v = data; }\n};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, typename ValueType::ConstArray> {\n    typedef typename ValueType::ConstArray ArrayType;\n    static bool Is(const ValueType& v) { return v.IsArray(); }\n    static ArrayType Get(const ValueType& v) { return v.GetArray(); }\n};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, typename ValueType::Object> {\n    typedef typename ValueType::Object ObjectType;\n    static bool Is(const ValueType& v) { return v.IsObject(); }\n    static ObjectType Get(ValueType& v) { return v.GetObject(); }\n    static ValueType& Set(ValueType& v, ObjectType data) { return v = data; }\n    static ValueType& Set(ValueType& v, ObjectType data, typename ValueType::AllocatorType&) { return v = data; }\n};\n\ntemplate<typename ValueType> \nstruct TypeHelper<ValueType, typename ValueType::ConstObject> {\n    typedef typename ValueType::ConstObject ObjectType;\n    static bool Is(const ValueType& v) { return v.IsObject(); }\n    static ObjectType Get(const ValueType& v) { return v.GetObject(); }\n};\n\n} // namespace internal\n\n// Forward declarations\ntemplate <bool, typename> class GenericArray;\ntemplate <bool, typename> class GenericObject;\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericValue\n\n//! Represents a JSON value. Use Value for UTF8 encoding and default allocator.\n/*!\n    A JSON value can be one of 7 types. This class is a variant type supporting\n    these types.\n\n    Use the Value if UTF8 and default allocator\n\n    \\tparam Encoding    Encoding of the value. (Even non-string values need to have the same encoding in a document)\n    \\tparam Allocator   Allocator type for allocating memory of object, array and string.\n*/\ntemplate <typename Encoding, typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR >\nclass GenericValue {\npublic:\n    //! Name-value pair in an object.\n    typedef GenericMember<Encoding, Allocator> Member;\n    typedef Encoding EncodingType;                  //!< Encoding type from template parameter.\n    typedef Allocator AllocatorType;                //!< Allocator type from template parameter.\n    typedef typename Encoding::Ch Ch;               //!< Character type derived from Encoding.\n    typedef GenericStringRef<Ch> StringRefType;     //!< Reference to a constant string\n    typedef typename GenericMemberIterator<false,Encoding,Allocator>::Iterator MemberIterator;  //!< Member iterator for iterating in object.\n    typedef typename GenericMemberIterator<true,Encoding,Allocator>::Iterator ConstMemberIterator;  //!< Constant member iterator for iterating in object.\n    typedef GenericValue* ValueIterator;            //!< Value iterator for iterating in array.\n    typedef const GenericValue* ConstValueIterator; //!< Constant value iterator for iterating in array.\n    typedef GenericValue<Encoding, Allocator> ValueType;    //!< Value type of itself.\n    typedef GenericArray<false, ValueType> Array;\n    typedef GenericArray<true, ValueType> ConstArray;\n    typedef GenericObject<false, ValueType> Object;\n    typedef GenericObject<true, ValueType> ConstObject;\n\n    //!@name Constructors and destructor.\n    //@{\n\n    //! Default constructor creates a null value.\n    GenericValue() RAPIDJSON_NOEXCEPT : data_() { data_.f.flags = kNullFlag; }\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    //! Move constructor in C++11\n    GenericValue(GenericValue&& rhs) RAPIDJSON_NOEXCEPT : data_(rhs.data_) {\n        rhs.data_.f.flags = kNullFlag; // give up contents\n    }\n#endif\n\nprivate:\n    //! Copy constructor is not permitted.\n    GenericValue(const GenericValue& rhs);\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    //! Moving from a GenericDocument is not permitted.\n    template <typename StackAllocator>\n    GenericValue(GenericDocument<Encoding,Allocator,StackAllocator>&& rhs);\n\n    //! Move assignment from a GenericDocument is not permitted.\n    template <typename StackAllocator>\n    GenericValue& operator=(GenericDocument<Encoding,Allocator,StackAllocator>&& rhs);\n#endif\n\npublic:\n\n    //! Constructor with JSON value type.\n    /*! This creates a Value of specified type with default content.\n        \\param type Type of the value.\n        \\note Default content for number is zero.\n    */\n    explicit GenericValue(Type type) RAPIDJSON_NOEXCEPT : data_() {\n        static const uint16_t defaultFlags[] = {\n            kNullFlag, kFalseFlag, kTrueFlag, kObjectFlag, kArrayFlag, kShortStringFlag,\n            kNumberAnyFlag\n        };\n        RAPIDJSON_NOEXCEPT_ASSERT(type >= kNullType && type <= kNumberType);\n        data_.f.flags = defaultFlags[type];\n\n        // Use ShortString to store empty string.\n        if (type == kStringType)\n            data_.ss.SetLength(0);\n    }\n\n    //! Explicit copy constructor (with allocator)\n    /*! Creates a copy of a Value by using the given Allocator\n        \\tparam SourceAllocator allocator of \\c rhs\n        \\param rhs Value to copy from (read-only)\n        \\param allocator Allocator for allocating copied elements and buffers. Commonly use GenericDocument::GetAllocator().\n        \\param copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer)\n        \\see CopyFrom()\n    */\n    template <typename SourceAllocator>\n    GenericValue(const GenericValue<Encoding,SourceAllocator>& rhs, Allocator& allocator, bool copyConstStrings = false) {\n        switch (rhs.GetType()) {\n        case kObjectType: {\n                SizeType count = rhs.data_.o.size;\n                Member* lm = reinterpret_cast<Member*>(allocator.Malloc(count * sizeof(Member)));\n                const typename GenericValue<Encoding,SourceAllocator>::Member* rm = rhs.GetMembersPointer();\n                for (SizeType i = 0; i < count; i++) {\n                    new (&lm[i].name) GenericValue(rm[i].name, allocator, copyConstStrings);\n                    new (&lm[i].value) GenericValue(rm[i].value, allocator, copyConstStrings);\n                }\n                data_.f.flags = kObjectFlag;\n                data_.o.size = data_.o.capacity = count;\n                SetMembersPointer(lm);\n            }\n            break;\n        case kArrayType: {\n                SizeType count = rhs.data_.a.size;\n                GenericValue* le = reinterpret_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));\n                const GenericValue<Encoding,SourceAllocator>* re = rhs.GetElementsPointer();\n                for (SizeType i = 0; i < count; i++)\n                    new (&le[i]) GenericValue(re[i], allocator, copyConstStrings);\n                data_.f.flags = kArrayFlag;\n                data_.a.size = data_.a.capacity = count;\n                SetElementsPointer(le);\n            }\n            break;\n        case kStringType:\n            if (rhs.data_.f.flags == kConstStringFlag && !copyConstStrings) {\n                data_.f.flags = rhs.data_.f.flags;\n                data_  = *reinterpret_cast<const Data*>(&rhs.data_);\n            }\n            else\n                SetStringRaw(StringRef(rhs.GetString(), rhs.GetStringLength()), allocator);\n            break;\n        default:\n            data_.f.flags = rhs.data_.f.flags;\n            data_  = *reinterpret_cast<const Data*>(&rhs.data_);\n            break;\n        }\n    }\n\n    //! Constructor for boolean value.\n    /*! \\param b Boolean value\n        \\note This constructor is limited to \\em real boolean values and rejects\n            implicitly converted types like arbitrary pointers.  Use an explicit cast\n            to \\c bool, if you want to construct a boolean JSON value in such cases.\n     */\n#ifndef RAPIDJSON_DOXYGEN_RUNNING // hide SFINAE from Doxygen\n    template <typename T>\n    explicit GenericValue(T b, RAPIDJSON_ENABLEIF((internal::IsSame<bool, T>))) RAPIDJSON_NOEXCEPT  // See #472\n#else\n    explicit GenericValue(bool b) RAPIDJSON_NOEXCEPT\n#endif\n        : data_() {\n            // safe-guard against failing SFINAE\n            RAPIDJSON_STATIC_ASSERT((internal::IsSame<bool,T>::Value));\n            data_.f.flags = b ? kTrueFlag : kFalseFlag;\n    }\n\n    //! Constructor for int value.\n    explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_() {\n        data_.n.i64 = i;\n        data_.f.flags = (i >= 0) ? (kNumberIntFlag | kUintFlag | kUint64Flag) : kNumberIntFlag;\n    }\n\n    //! Constructor for unsigned value.\n    explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_() {\n        data_.n.u64 = u; \n        data_.f.flags = (u & 0x80000000) ? kNumberUintFlag : (kNumberUintFlag | kIntFlag | kInt64Flag);\n    }\n\n    //! Constructor for int64_t value.\n    explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_() {\n        data_.n.i64 = i64;\n        data_.f.flags = kNumberInt64Flag;\n        if (i64 >= 0) {\n            data_.f.flags |= kNumberUint64Flag;\n            if (!(static_cast<uint64_t>(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000)))\n                data_.f.flags |= kUintFlag;\n            if (!(static_cast<uint64_t>(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))\n                data_.f.flags |= kIntFlag;\n        }\n        else if (i64 >= static_cast<int64_t>(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))\n            data_.f.flags |= kIntFlag;\n    }\n\n    //! Constructor for uint64_t value.\n    explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_() {\n        data_.n.u64 = u64;\n        data_.f.flags = kNumberUint64Flag;\n        if (!(u64 & RAPIDJSON_UINT64_C2(0x80000000, 0x00000000)))\n            data_.f.flags |= kInt64Flag;\n        if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000)))\n            data_.f.flags |= kUintFlag;\n        if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))\n            data_.f.flags |= kIntFlag;\n    }\n\n    //! Constructor for double value.\n    explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_() { data_.n.d = d; data_.f.flags = kNumberDoubleFlag; }\n\n    //! Constructor for float value.\n    explicit GenericValue(float f) RAPIDJSON_NOEXCEPT : data_() { data_.n.d = static_cast<double>(f); data_.f.flags = kNumberDoubleFlag; }\n\n    //! Constructor for constant string (i.e. do not make a copy of string)\n    GenericValue(const Ch* s, SizeType length) RAPIDJSON_NOEXCEPT : data_() { SetStringRaw(StringRef(s, length)); }\n\n    //! Constructor for constant string (i.e. do not make a copy of string)\n    explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_() { SetStringRaw(s); }\n\n    //! Constructor for copy-string (i.e. do make a copy of string)\n    GenericValue(const Ch* s, SizeType length, Allocator& allocator) : data_() { SetStringRaw(StringRef(s, length), allocator); }\n\n    //! Constructor for copy-string (i.e. do make a copy of string)\n    GenericValue(const Ch*s, Allocator& allocator) : data_() { SetStringRaw(StringRef(s), allocator); }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Constructor for copy-string from a string object (i.e. do make a copy of string)\n    /*! \\note Requires the definition of the preprocessor symbol \\ref RAPIDJSON_HAS_STDSTRING.\n     */\n    GenericValue(const std::basic_string<Ch>& s, Allocator& allocator) : data_() { SetStringRaw(StringRef(s), allocator); }\n#endif\n\n    //! Constructor for Array.\n    /*!\n        \\param a An array obtained by \\c GetArray().\n        \\note \\c Array is always pass-by-value.\n        \\note the source array is moved into this value and the sourec array becomes empty.\n    */\n    GenericValue(Array a) RAPIDJSON_NOEXCEPT : data_(a.value_.data_) {\n        a.value_.data_ = Data();\n        a.value_.data_.f.flags = kArrayFlag;\n    }\n\n    //! Constructor for Object.\n    /*!\n        \\param o An object obtained by \\c GetObject().\n        \\note \\c Object is always pass-by-value.\n        \\note the source object is moved into this value and the sourec object becomes empty.\n    */\n    GenericValue(Object o) RAPIDJSON_NOEXCEPT : data_(o.value_.data_) {\n        o.value_.data_ = Data();\n        o.value_.data_.f.flags = kObjectFlag;\n    }\n\n    //! Destructor.\n    /*! Need to destruct elements of array, members of object, or copy-string.\n    */\n    ~GenericValue() {\n        if (Allocator::kNeedFree) { // Shortcut by Allocator's trait\n            switch(data_.f.flags) {\n            case kArrayFlag:\n                {\n                    GenericValue* e = GetElementsPointer();\n                    for (GenericValue* v = e; v != e + data_.a.size; ++v)\n                        v->~GenericValue();\n                    Allocator::Free(e);\n                }\n                break;\n\n            case kObjectFlag:\n                for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m)\n                    m->~Member();\n                Allocator::Free(GetMembersPointer());\n                break;\n\n            case kCopyStringFlag:\n                Allocator::Free(const_cast<Ch*>(GetStringPointer()));\n                break;\n\n            default:\n                break;  // Do nothing for other types.\n            }\n        }\n    }\n\n    //@}\n\n    //!@name Assignment operators\n    //@{\n\n    //! Assignment with move semantics.\n    /*! \\param rhs Source of the assignment. It will become a null value after assignment.\n    */\n    GenericValue& operator=(GenericValue& rhs) RAPIDJSON_NOEXCEPT {\n        if (RAPIDJSON_LIKELY(this != &rhs)) {\n            this->~GenericValue();\n            RawAssign(rhs);\n        }\n        return *this;\n    }\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    //! Move assignment in C++11\n    GenericValue& operator=(GenericValue&& rhs) RAPIDJSON_NOEXCEPT {\n        return *this = rhs.Move();\n    }\n#endif\n\n    //! Assignment of constant string reference (no copy)\n    /*! \\param str Constant string reference to be assigned\n        \\note This overload is needed to avoid clashes with the generic primitive type assignment overload below.\n        \\see GenericStringRef, operator=(T)\n    */\n    GenericValue& operator=(StringRefType str) RAPIDJSON_NOEXCEPT {\n        GenericValue s(str);\n        return *this = s;\n    }\n\n    //! Assignment with primitive types.\n    /*! \\tparam T Either \\ref Type, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t\n        \\param value The value to be assigned.\n\n        \\note The source type \\c T explicitly disallows all pointer types,\n            especially (\\c const) \\ref Ch*.  This helps avoiding implicitly\n            referencing character strings with insufficient lifetime, use\n            \\ref SetString(const Ch*, Allocator&) (for copying) or\n            \\ref StringRef() (to explicitly mark the pointer as constant) instead.\n            All other pointer types would implicitly convert to \\c bool,\n            use \\ref SetBool() instead.\n    */\n    template <typename T>\n    RAPIDJSON_DISABLEIF_RETURN((internal::IsPointer<T>), (GenericValue&))\n    operator=(T value) {\n        GenericValue v(value);\n        return *this = v;\n    }\n\n    //! Deep-copy assignment from Value\n    /*! Assigns a \\b copy of the Value to the current Value object\n        \\tparam SourceAllocator Allocator type of \\c rhs\n        \\param rhs Value to copy from (read-only)\n        \\param allocator Allocator to use for copying\n        \\param copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer)\n     */\n    template <typename SourceAllocator>\n    GenericValue& CopyFrom(const GenericValue<Encoding, SourceAllocator>& rhs, Allocator& allocator, bool copyConstStrings = false) {\n        RAPIDJSON_ASSERT(static_cast<void*>(this) != static_cast<void const*>(&rhs));\n        this->~GenericValue();\n        new (this) GenericValue(rhs, allocator, copyConstStrings);\n        return *this;\n    }\n\n    //! Exchange the contents of this value with those of other.\n    /*!\n        \\param other Another value.\n        \\note Constant complexity.\n    */\n    GenericValue& Swap(GenericValue& other) RAPIDJSON_NOEXCEPT {\n        GenericValue temp;\n        temp.RawAssign(*this);\n        RawAssign(other);\n        other.RawAssign(temp);\n        return *this;\n    }\n\n    //! free-standing swap function helper\n    /*!\n        Helper function to enable support for common swap implementation pattern based on \\c std::swap:\n        \\code\n        void swap(MyClass& a, MyClass& b) {\n            using std::swap;\n            swap(a.value, b.value);\n            // ...\n        }\n        \\endcode\n        \\see Swap()\n     */\n    friend inline void swap(GenericValue& a, GenericValue& b) RAPIDJSON_NOEXCEPT { a.Swap(b); }\n\n    //! Prepare Value for move semantics\n    /*! \\return *this */\n    GenericValue& Move() RAPIDJSON_NOEXCEPT { return *this; }\n    //@}\n\n    //!@name Equal-to and not-equal-to operators\n    //@{\n    //! Equal-to operator\n    /*!\n        \\note If an object contains duplicated named member, comparing equality with any object is always \\c false.\n        \\note Complexity is quadratic in Object's member number and linear for the rest (number of all values in the subtree and total lengths of all strings).\n    */\n    template <typename SourceAllocator>\n    bool operator==(const GenericValue<Encoding, SourceAllocator>& rhs) const {\n        typedef GenericValue<Encoding, SourceAllocator> RhsType;\n        if (GetType() != rhs.GetType())\n            return false;\n\n        switch (GetType()) {\n        case kObjectType: // Warning: O(n^2) inner-loop\n            if (data_.o.size != rhs.data_.o.size)\n                return false;           \n            for (ConstMemberIterator lhsMemberItr = MemberBegin(); lhsMemberItr != MemberEnd(); ++lhsMemberItr) {\n                typename RhsType::ConstMemberIterator rhsMemberItr = rhs.FindMember(lhsMemberItr->name);\n                if (rhsMemberItr == rhs.MemberEnd() || lhsMemberItr->value != rhsMemberItr->value)\n                    return false;\n            }\n            return true;\n            \n        case kArrayType:\n            if (data_.a.size != rhs.data_.a.size)\n                return false;\n            for (SizeType i = 0; i < data_.a.size; i++)\n                if ((*this)[i] != rhs[i])\n                    return false;\n            return true;\n\n        case kStringType:\n            return StringEqual(rhs);\n\n        case kNumberType:\n            if (IsDouble() || rhs.IsDouble()) {\n                double a = GetDouble();     // May convert from integer to double.\n                double b = rhs.GetDouble(); // Ditto\n                return a >= b && a <= b;    // Prevent -Wfloat-equal\n            }\n            else\n                return data_.n.u64 == rhs.data_.n.u64;\n\n        default:\n            return true;\n        }\n    }\n\n    //! Equal-to operator with const C-string pointer\n    bool operator==(const Ch* rhs) const { return *this == GenericValue(StringRef(rhs)); }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Equal-to operator with string object\n    /*! \\note Requires the definition of the preprocessor symbol \\ref RAPIDJSON_HAS_STDSTRING.\n     */\n    bool operator==(const std::basic_string<Ch>& rhs) const { return *this == GenericValue(StringRef(rhs)); }\n#endif\n\n    //! Equal-to operator with primitive types\n    /*! \\tparam T Either \\ref Type, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t, \\c double, \\c true, \\c false\n    */\n    template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>,internal::IsGenericValue<T> >), (bool)) operator==(const T& rhs) const { return *this == GenericValue(rhs); }\n\n    //! Not-equal-to operator\n    /*! \\return !(*this == rhs)\n     */\n    template <typename SourceAllocator>\n    bool operator!=(const GenericValue<Encoding, SourceAllocator>& rhs) const { return !(*this == rhs); }\n\n    //! Not-equal-to operator with const C-string pointer\n    bool operator!=(const Ch* rhs) const { return !(*this == rhs); }\n\n    //! Not-equal-to operator with arbitrary types\n    /*! \\return !(*this == rhs)\n     */\n    template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator!=(const T& rhs) const { return !(*this == rhs); }\n\n    //! Equal-to operator with arbitrary types (symmetric version)\n    /*! \\return (rhs == lhs)\n     */\n    template <typename T> friend RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator==(const T& lhs, const GenericValue& rhs) { return rhs == lhs; }\n\n    //! Not-Equal-to operator with arbitrary types (symmetric version)\n    /*! \\return !(rhs == lhs)\n     */\n    template <typename T> friend RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator!=(const T& lhs, const GenericValue& rhs) { return !(rhs == lhs); }\n    //@}\n\n    //!@name Type\n    //@{\n\n    Type GetType()  const { return static_cast<Type>(data_.f.flags & kTypeMask); }\n    bool IsNull()   const { return data_.f.flags == kNullFlag; }\n    bool IsFalse()  const { return data_.f.flags == kFalseFlag; }\n    bool IsTrue()   const { return data_.f.flags == kTrueFlag; }\n    bool IsBool()   const { return (data_.f.flags & kBoolFlag) != 0; }\n    bool IsObject() const { return data_.f.flags == kObjectFlag; }\n    bool IsArray()  const { return data_.f.flags == kArrayFlag; }\n    bool IsNumber() const { return (data_.f.flags & kNumberFlag) != 0; }\n    bool IsInt()    const { return (data_.f.flags & kIntFlag) != 0; }\n    bool IsUint()   const { return (data_.f.flags & kUintFlag) != 0; }\n    bool IsInt64()  const { return (data_.f.flags & kInt64Flag) != 0; }\n    bool IsUint64() const { return (data_.f.flags & kUint64Flag) != 0; }\n    bool IsDouble() const { return (data_.f.flags & kDoubleFlag) != 0; }\n    bool IsString() const { return (data_.f.flags & kStringFlag) != 0; }\n\n    // Checks whether a number can be losslessly converted to a double.\n    bool IsLosslessDouble() const {\n        if (!IsNumber()) return false;\n        if (IsUint64()) {\n            uint64_t u = GetUint64();\n            volatile double d = static_cast<double>(u);\n            return (d >= 0.0)\n                && (d < static_cast<double>((std::numeric_limits<uint64_t>::max)()))\n                && (u == static_cast<uint64_t>(d));\n        }\n        if (IsInt64()) {\n            int64_t i = GetInt64();\n            volatile double d = static_cast<double>(i);\n            return (d >= static_cast<double>((std::numeric_limits<int64_t>::min)()))\n                && (d < static_cast<double>((std::numeric_limits<int64_t>::max)()))\n                && (i == static_cast<int64_t>(d));\n        }\n        return true; // double, int, uint are always lossless\n    }\n\n    // Checks whether a number is a float (possible lossy).\n    bool IsFloat() const  {\n        if ((data_.f.flags & kDoubleFlag) == 0)\n            return false;\n        double d = GetDouble();\n        return d >= -3.4028234e38 && d <= 3.4028234e38;\n    }\n    // Checks whether a number can be losslessly converted to a float.\n    bool IsLosslessFloat() const {\n        if (!IsNumber()) return false;\n        double a = GetDouble();\n        if (a < static_cast<double>(-(std::numeric_limits<float>::max)())\n                || a > static_cast<double>((std::numeric_limits<float>::max)()))\n            return false;\n        double b = static_cast<double>(static_cast<float>(a));\n        return a >= b && a <= b;    // Prevent -Wfloat-equal\n    }\n\n    //@}\n\n    //!@name Null\n    //@{\n\n    GenericValue& SetNull() { this->~GenericValue(); new (this) GenericValue(); return *this; }\n\n    //@}\n\n    //!@name Bool\n    //@{\n\n    bool GetBool() const { RAPIDJSON_ASSERT(IsBool()); return data_.f.flags == kTrueFlag; }\n    //!< Set boolean value\n    /*! \\post IsBool() == true */\n    GenericValue& SetBool(bool b) { this->~GenericValue(); new (this) GenericValue(b); return *this; }\n\n    //@}\n\n    //!@name Object\n    //@{\n\n    //! Set this value as an empty object.\n    /*! \\post IsObject() == true */\n    GenericValue& SetObject() { this->~GenericValue(); new (this) GenericValue(kObjectType); return *this; }\n\n    //! Get the number of members in the object.\n    SizeType MemberCount() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size; }\n\n    //! Get the capacity of object.\n    SizeType MemberCapacity() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.capacity; }\n\n    //! Check whether the object is empty.\n    bool ObjectEmpty() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size == 0; }\n\n    //! Get a value from an object associated with the name.\n    /*! \\pre IsObject() == true\n        \\tparam T Either \\c Ch or \\c const \\c Ch (template used for disambiguation with \\ref operator[](SizeType))\n        \\note In version 0.1x, if the member is not found, this function returns a null value. This makes issue 7.\n        Since 0.2, if the name is not correct, it will assert.\n        If user is unsure whether a member exists, user should use HasMember() first.\n        A better approach is to use FindMember().\n        \\note Linear time complexity.\n    */\n    template <typename T>\n    RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch> >),(GenericValue&)) operator[](T* name) {\n        GenericValue n(StringRef(name));\n        return (*this)[n];\n    }\n    template <typename T>\n    RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch> >),(const GenericValue&)) operator[](T* name) const { return const_cast<GenericValue&>(*this)[name]; }\n\n    //! Get a value from an object associated with the name.\n    /*! \\pre IsObject() == true\n        \\tparam SourceAllocator Allocator of the \\c name value\n\n        \\note Compared to \\ref operator[](T*), this version is faster because it does not need a StrLen().\n        And it can also handle strings with embedded null characters.\n\n        \\note Linear time complexity.\n    */\n    template <typename SourceAllocator>\n    GenericValue& operator[](const GenericValue<Encoding, SourceAllocator>& name) {\n        MemberIterator member = FindMember(name);\n        if (member != MemberEnd())\n            return member->value;\n        else {\n            RAPIDJSON_ASSERT(false);    // see above note\n\n            // This will generate -Wexit-time-destructors in clang\n            // static GenericValue NullValue;\n            // return NullValue;\n\n            // Use static buffer and placement-new to prevent destruction\n            static char buffer[sizeof(GenericValue)];\n            return *new (buffer) GenericValue();\n        }\n    }\n    template <typename SourceAllocator>\n    const GenericValue& operator[](const GenericValue<Encoding, SourceAllocator>& name) const { return const_cast<GenericValue&>(*this)[name]; }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Get a value from an object associated with name (string object).\n    GenericValue& operator[](const std::basic_string<Ch>& name) { return (*this)[GenericValue(StringRef(name))]; }\n    const GenericValue& operator[](const std::basic_string<Ch>& name) const { return (*this)[GenericValue(StringRef(name))]; }\n#endif\n\n    //! Const member iterator\n    /*! \\pre IsObject() == true */\n    ConstMemberIterator MemberBegin() const { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(GetMembersPointer()); }\n    //! Const \\em past-the-end member iterator\n    /*! \\pre IsObject() == true */\n    ConstMemberIterator MemberEnd() const   { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(GetMembersPointer() + data_.o.size); }\n    //! Member iterator\n    /*! \\pre IsObject() == true */\n    MemberIterator MemberBegin()            { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(GetMembersPointer()); }\n    //! \\em Past-the-end member iterator\n    /*! \\pre IsObject() == true */\n    MemberIterator MemberEnd()              { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(GetMembersPointer() + data_.o.size); }\n\n    //! Request the object to have enough capacity to store members.\n    /*! \\param newCapacity  The capacity that the object at least need to have.\n        \\param allocator    Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\note Linear time complexity.\n    */\n    GenericValue& MemberReserve(SizeType newCapacity, Allocator &allocator) {\n        RAPIDJSON_ASSERT(IsObject());\n        if (newCapacity > data_.o.capacity) {\n            SetMembersPointer(reinterpret_cast<Member*>(allocator.Realloc(GetMembersPointer(), data_.o.capacity * sizeof(Member), newCapacity * sizeof(Member))));\n            data_.o.capacity = newCapacity;\n        }\n        return *this;\n    }\n\n    //! Check whether a member exists in the object.\n    /*!\n        \\param name Member name to be searched.\n        \\pre IsObject() == true\n        \\return Whether a member with that name exists.\n        \\note It is better to use FindMember() directly if you need the obtain the value as well.\n        \\note Linear time complexity.\n    */\n    bool HasMember(const Ch* name) const { return FindMember(name) != MemberEnd(); }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Check whether a member exists in the object with string object.\n    /*!\n        \\param name Member name to be searched.\n        \\pre IsObject() == true\n        \\return Whether a member with that name exists.\n        \\note It is better to use FindMember() directly if you need the obtain the value as well.\n        \\note Linear time complexity.\n    */\n    bool HasMember(const std::basic_string<Ch>& name) const { return FindMember(name) != MemberEnd(); }\n#endif\n\n    //! Check whether a member exists in the object with GenericValue name.\n    /*!\n        This version is faster because it does not need a StrLen(). It can also handle string with null character.\n        \\param name Member name to be searched.\n        \\pre IsObject() == true\n        \\return Whether a member with that name exists.\n        \\note It is better to use FindMember() directly if you need the obtain the value as well.\n        \\note Linear time complexity.\n    */\n    template <typename SourceAllocator>\n    bool HasMember(const GenericValue<Encoding, SourceAllocator>& name) const { return FindMember(name) != MemberEnd(); }\n\n    //! Find member by name.\n    /*!\n        \\param name Member name to be searched.\n        \\pre IsObject() == true\n        \\return Iterator to member, if it exists.\n            Otherwise returns \\ref MemberEnd().\n\n        \\note Earlier versions of Rapidjson returned a \\c NULL pointer, in case\n            the requested member doesn't exist. For consistency with e.g.\n            \\c std::map, this has been changed to MemberEnd() now.\n        \\note Linear time complexity.\n    */\n    MemberIterator FindMember(const Ch* name) {\n        GenericValue n(StringRef(name));\n        return FindMember(n);\n    }\n\n    ConstMemberIterator FindMember(const Ch* name) const { return const_cast<GenericValue&>(*this).FindMember(name); }\n\n    //! Find member by name.\n    /*!\n        This version is faster because it does not need a StrLen(). It can also handle string with null character.\n        \\param name Member name to be searched.\n        \\pre IsObject() == true\n        \\return Iterator to member, if it exists.\n            Otherwise returns \\ref MemberEnd().\n\n        \\note Earlier versions of Rapidjson returned a \\c NULL pointer, in case\n            the requested member doesn't exist. For consistency with e.g.\n            \\c std::map, this has been changed to MemberEnd() now.\n        \\note Linear time complexity.\n    */\n    template <typename SourceAllocator>\n    MemberIterator FindMember(const GenericValue<Encoding, SourceAllocator>& name) {\n        RAPIDJSON_ASSERT(IsObject());\n        RAPIDJSON_ASSERT(name.IsString());\n        MemberIterator member = MemberBegin();\n        for ( ; member != MemberEnd(); ++member)\n            if (name.StringEqual(member->name))\n                break;\n        return member;\n    }\n    template <typename SourceAllocator> ConstMemberIterator FindMember(const GenericValue<Encoding, SourceAllocator>& name) const { return const_cast<GenericValue&>(*this).FindMember(name); }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Find member by string object name.\n    /*!\n        \\param name Member name to be searched.\n        \\pre IsObject() == true\n        \\return Iterator to member, if it exists.\n            Otherwise returns \\ref MemberEnd().\n    */\n    MemberIterator FindMember(const std::basic_string<Ch>& name) { return FindMember(GenericValue(StringRef(name))); }\n    ConstMemberIterator FindMember(const std::basic_string<Ch>& name) const { return FindMember(GenericValue(StringRef(name))); }\n#endif\n\n    //! Add a member (name-value pair) to the object.\n    /*! \\param name A string value as name of member.\n        \\param value Value of any type.\n        \\param allocator    Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\note The ownership of \\c name and \\c value will be transferred to this object on success.\n        \\pre  IsObject() && name.IsString()\n        \\post name.IsNull() && value.IsNull()\n        \\note Amortized Constant time complexity.\n    */\n    GenericValue& AddMember(GenericValue& name, GenericValue& value, Allocator& allocator) {\n        RAPIDJSON_ASSERT(IsObject());\n        RAPIDJSON_ASSERT(name.IsString());\n\n        ObjectData& o = data_.o;\n        if (o.size >= o.capacity)\n            MemberReserve(o.capacity == 0 ? kDefaultObjectCapacity : (o.capacity + (o.capacity + 1) / 2), allocator);\n        Member* members = GetMembersPointer();\n        members[o.size].name.RawAssign(name);\n        members[o.size].value.RawAssign(value);\n        o.size++;\n        return *this;\n    }\n\n    //! Add a constant string value as member (name-value pair) to the object.\n    /*! \\param name A string value as name of member.\n        \\param value constant string reference as value of member.\n        \\param allocator    Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\pre  IsObject()\n        \\note This overload is needed to avoid clashes with the generic primitive type AddMember(GenericValue&,T,Allocator&) overload below.\n        \\note Amortized Constant time complexity.\n    */\n    GenericValue& AddMember(GenericValue& name, StringRefType value, Allocator& allocator) {\n        GenericValue v(value);\n        return AddMember(name, v, allocator);\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Add a string object as member (name-value pair) to the object.\n    /*! \\param name A string value as name of member.\n        \\param value constant string reference as value of member.\n        \\param allocator    Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\pre  IsObject()\n        \\note This overload is needed to avoid clashes with the generic primitive type AddMember(GenericValue&,T,Allocator&) overload below.\n        \\note Amortized Constant time complexity.\n    */\n    GenericValue& AddMember(GenericValue& name, std::basic_string<Ch>& value, Allocator& allocator) {\n        GenericValue v(value, allocator);\n        return AddMember(name, v, allocator);\n    }\n#endif\n\n    //! Add any primitive value as member (name-value pair) to the object.\n    /*! \\tparam T Either \\ref Type, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t\n        \\param name A string value as name of member.\n        \\param value Value of primitive type \\c T as value of member\n        \\param allocator Allocator for reallocating memory. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\pre  IsObject()\n\n        \\note The source type \\c T explicitly disallows all pointer types,\n            especially (\\c const) \\ref Ch*.  This helps avoiding implicitly\n            referencing character strings with insufficient lifetime, use\n            \\ref AddMember(StringRefType, GenericValue&, Allocator&) or \\ref\n            AddMember(StringRefType, StringRefType, Allocator&).\n            All other pointer types would implicitly convert to \\c bool,\n            use an explicit cast instead, if needed.\n        \\note Amortized Constant time complexity.\n    */\n    template <typename T>\n    RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (GenericValue&))\n    AddMember(GenericValue& name, T value, Allocator& allocator) {\n        GenericValue v(value);\n        return AddMember(name, v, allocator);\n    }\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    GenericValue& AddMember(GenericValue&& name, GenericValue&& value, Allocator& allocator) {\n        return AddMember(name, value, allocator);\n    }\n    GenericValue& AddMember(GenericValue&& name, GenericValue& value, Allocator& allocator) {\n        return AddMember(name, value, allocator);\n    }\n    GenericValue& AddMember(GenericValue& name, GenericValue&& value, Allocator& allocator) {\n        return AddMember(name, value, allocator);\n    }\n    GenericValue& AddMember(StringRefType name, GenericValue&& value, Allocator& allocator) {\n        GenericValue n(name);\n        return AddMember(n, value, allocator);\n    }\n#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS\n\n\n    //! Add a member (name-value pair) to the object.\n    /*! \\param name A constant string reference as name of member.\n        \\param value Value of any type.\n        \\param allocator    Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\note The ownership of \\c value will be transferred to this object on success.\n        \\pre  IsObject()\n        \\post value.IsNull()\n        \\note Amortized Constant time complexity.\n    */\n    GenericValue& AddMember(StringRefType name, GenericValue& value, Allocator& allocator) {\n        GenericValue n(name);\n        return AddMember(n, value, allocator);\n    }\n\n    //! Add a constant string value as member (name-value pair) to the object.\n    /*! \\param name A constant string reference as name of member.\n        \\param value constant string reference as value of member.\n        \\param allocator    Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\pre  IsObject()\n        \\note This overload is needed to avoid clashes with the generic primitive type AddMember(StringRefType,T,Allocator&) overload below.\n        \\note Amortized Constant time complexity.\n    */\n    GenericValue& AddMember(StringRefType name, StringRefType value, Allocator& allocator) {\n        GenericValue v(value);\n        return AddMember(name, v, allocator);\n    }\n\n    //! Add any primitive value as member (name-value pair) to the object.\n    /*! \\tparam T Either \\ref Type, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t\n        \\param name A constant string reference as name of member.\n        \\param value Value of primitive type \\c T as value of member\n        \\param allocator Allocator for reallocating memory. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\pre  IsObject()\n\n        \\note The source type \\c T explicitly disallows all pointer types,\n            especially (\\c const) \\ref Ch*.  This helps avoiding implicitly\n            referencing character strings with insufficient lifetime, use\n            \\ref AddMember(StringRefType, GenericValue&, Allocator&) or \\ref\n            AddMember(StringRefType, StringRefType, Allocator&).\n            All other pointer types would implicitly convert to \\c bool,\n            use an explicit cast instead, if needed.\n        \\note Amortized Constant time complexity.\n    */\n    template <typename T>\n    RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (GenericValue&))\n    AddMember(StringRefType name, T value, Allocator& allocator) {\n        GenericValue n(name);\n        return AddMember(n, value, allocator);\n    }\n\n    //! Remove all members in the object.\n    /*! This function do not deallocate memory in the object, i.e. the capacity is unchanged.\n        \\note Linear time complexity.\n    */\n    void RemoveAllMembers() {\n        RAPIDJSON_ASSERT(IsObject()); \n        for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m)\n            m->~Member();\n        data_.o.size = 0;\n    }\n\n    //! Remove a member in object by its name.\n    /*! \\param name Name of member to be removed.\n        \\return Whether the member existed.\n        \\note This function may reorder the object members. Use \\ref\n            EraseMember(ConstMemberIterator) if you need to preserve the\n            relative order of the remaining members.\n        \\note Linear time complexity.\n    */\n    bool RemoveMember(const Ch* name) {\n        GenericValue n(StringRef(name));\n        return RemoveMember(n);\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    bool RemoveMember(const std::basic_string<Ch>& name) { return RemoveMember(GenericValue(StringRef(name))); }\n#endif\n\n    template <typename SourceAllocator>\n    bool RemoveMember(const GenericValue<Encoding, SourceAllocator>& name) {\n        MemberIterator m = FindMember(name);\n        if (m != MemberEnd()) {\n            RemoveMember(m);\n            return true;\n        }\n        else\n            return false;\n    }\n\n    //! Remove a member in object by iterator.\n    /*! \\param m member iterator (obtained by FindMember() or MemberBegin()).\n        \\return the new iterator after removal.\n        \\note This function may reorder the object members. Use \\ref\n            EraseMember(ConstMemberIterator) if you need to preserve the\n            relative order of the remaining members.\n        \\note Constant time complexity.\n    */\n    MemberIterator RemoveMember(MemberIterator m) {\n        RAPIDJSON_ASSERT(IsObject());\n        RAPIDJSON_ASSERT(data_.o.size > 0);\n        RAPIDJSON_ASSERT(GetMembersPointer() != 0);\n        RAPIDJSON_ASSERT(m >= MemberBegin() && m < MemberEnd());\n\n        MemberIterator last(GetMembersPointer() + (data_.o.size - 1));\n        if (data_.o.size > 1 && m != last)\n            *m = *last; // Move the last one to this place\n        else\n            m->~Member(); // Only one left, just destroy\n        --data_.o.size;\n        return m;\n    }\n\n    //! Remove a member from an object by iterator.\n    /*! \\param pos iterator to the member to remove\n        \\pre IsObject() == true && \\ref MemberBegin() <= \\c pos < \\ref MemberEnd()\n        \\return Iterator following the removed element.\n            If the iterator \\c pos refers to the last element, the \\ref MemberEnd() iterator is returned.\n        \\note This function preserves the relative order of the remaining object\n            members. If you do not need this, use the more efficient \\ref RemoveMember(MemberIterator).\n        \\note Linear time complexity.\n    */\n    MemberIterator EraseMember(ConstMemberIterator pos) {\n        return EraseMember(pos, pos +1);\n    }\n\n    //! Remove members in the range [first, last) from an object.\n    /*! \\param first iterator to the first member to remove\n        \\param last  iterator following the last member to remove\n        \\pre IsObject() == true && \\ref MemberBegin() <= \\c first <= \\c last <= \\ref MemberEnd()\n        \\return Iterator following the last removed element.\n        \\note This function preserves the relative order of the remaining object\n            members.\n        \\note Linear time complexity.\n    */\n    MemberIterator EraseMember(ConstMemberIterator first, ConstMemberIterator last) {\n        RAPIDJSON_ASSERT(IsObject());\n        RAPIDJSON_ASSERT(data_.o.size > 0);\n        RAPIDJSON_ASSERT(GetMembersPointer() != 0);\n        RAPIDJSON_ASSERT(first >= MemberBegin());\n        RAPIDJSON_ASSERT(first <= last);\n        RAPIDJSON_ASSERT(last <= MemberEnd());\n\n        MemberIterator pos = MemberBegin() + (first - MemberBegin());\n        for (MemberIterator itr = pos; itr != last; ++itr)\n            itr->~Member();\n        std::memmove(static_cast<void*>(&*pos), &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member));\n        data_.o.size -= static_cast<SizeType>(last - first);\n        return pos;\n    }\n\n    //! Erase a member in object by its name.\n    /*! \\param name Name of member to be removed.\n        \\return Whether the member existed.\n        \\note Linear time complexity.\n    */\n    bool EraseMember(const Ch* name) {\n        GenericValue n(StringRef(name));\n        return EraseMember(n);\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    bool EraseMember(const std::basic_string<Ch>& name) { return EraseMember(GenericValue(StringRef(name))); }\n#endif\n\n    template <typename SourceAllocator>\n    bool EraseMember(const GenericValue<Encoding, SourceAllocator>& name) {\n        MemberIterator m = FindMember(name);\n        if (m != MemberEnd()) {\n            EraseMember(m);\n            return true;\n        }\n        else\n            return false;\n    }\n\n    Object GetObject() { RAPIDJSON_ASSERT(IsObject()); return Object(*this); }\n    ConstObject GetObject() const { RAPIDJSON_ASSERT(IsObject()); return ConstObject(*this); }\n\n    //@}\n\n    //!@name Array\n    //@{\n\n    //! Set this value as an empty array.\n    /*! \\post IsArray == true */\n    GenericValue& SetArray() { this->~GenericValue(); new (this) GenericValue(kArrayType); return *this; }\n\n    //! Get the number of elements in array.\n    SizeType Size() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.size; }\n\n    //! Get the capacity of array.\n    SizeType Capacity() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.capacity; }\n\n    //! Check whether the array is empty.\n    bool Empty() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.size == 0; }\n\n    //! Remove all elements in the array.\n    /*! This function do not deallocate memory in the array, i.e. the capacity is unchanged.\n        \\note Linear time complexity.\n    */\n    void Clear() {\n        RAPIDJSON_ASSERT(IsArray()); \n        GenericValue* e = GetElementsPointer();\n        for (GenericValue* v = e; v != e + data_.a.size; ++v)\n            v->~GenericValue();\n        data_.a.size = 0;\n    }\n\n    //! Get an element from array by index.\n    /*! \\pre IsArray() == true\n        \\param index Zero-based index of element.\n        \\see operator[](T*)\n    */\n    GenericValue& operator[](SizeType index) {\n        RAPIDJSON_ASSERT(IsArray());\n        RAPIDJSON_ASSERT(index < data_.a.size);\n        return GetElementsPointer()[index];\n    }\n    const GenericValue& operator[](SizeType index) const { return const_cast<GenericValue&>(*this)[index]; }\n\n    //! Element iterator\n    /*! \\pre IsArray() == true */\n    ValueIterator Begin() { RAPIDJSON_ASSERT(IsArray()); return GetElementsPointer(); }\n    //! \\em Past-the-end element iterator\n    /*! \\pre IsArray() == true */\n    ValueIterator End() { RAPIDJSON_ASSERT(IsArray()); return GetElementsPointer() + data_.a.size; }\n    //! Constant element iterator\n    /*! \\pre IsArray() == true */\n    ConstValueIterator Begin() const { return const_cast<GenericValue&>(*this).Begin(); }\n    //! Constant \\em past-the-end element iterator\n    /*! \\pre IsArray() == true */\n    ConstValueIterator End() const { return const_cast<GenericValue&>(*this).End(); }\n\n    //! Request the array to have enough capacity to store elements.\n    /*! \\param newCapacity  The capacity that the array at least need to have.\n        \\param allocator    Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\note Linear time complexity.\n    */\n    GenericValue& Reserve(SizeType newCapacity, Allocator &allocator) {\n        RAPIDJSON_ASSERT(IsArray());\n        if (newCapacity > data_.a.capacity) {\n            SetElementsPointer(reinterpret_cast<GenericValue*>(allocator.Realloc(GetElementsPointer(), data_.a.capacity * sizeof(GenericValue), newCapacity * sizeof(GenericValue))));\n            data_.a.capacity = newCapacity;\n        }\n        return *this;\n    }\n\n    //! Append a GenericValue at the end of the array.\n    /*! \\param value        Value to be appended.\n        \\param allocator    Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().\n        \\pre IsArray() == true\n        \\post value.IsNull() == true\n        \\return The value itself for fluent API.\n        \\note The ownership of \\c value will be transferred to this array on success.\n        \\note If the number of elements to be appended is known, calls Reserve() once first may be more efficient.\n        \\note Amortized constant time complexity.\n    */\n    GenericValue& PushBack(GenericValue& value, Allocator& allocator) {\n        RAPIDJSON_ASSERT(IsArray());\n        if (data_.a.size >= data_.a.capacity)\n            Reserve(data_.a.capacity == 0 ? kDefaultArrayCapacity : (data_.a.capacity + (data_.a.capacity + 1) / 2), allocator);\n        GetElementsPointer()[data_.a.size++].RawAssign(value);\n        return *this;\n    }\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    GenericValue& PushBack(GenericValue&& value, Allocator& allocator) {\n        return PushBack(value, allocator);\n    }\n#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS\n\n    //! Append a constant string reference at the end of the array.\n    /*! \\param value        Constant string reference to be appended.\n        \\param allocator    Allocator for reallocating memory. It must be the same one used previously. Commonly use GenericDocument::GetAllocator().\n        \\pre IsArray() == true\n        \\return The value itself for fluent API.\n        \\note If the number of elements to be appended is known, calls Reserve() once first may be more efficient.\n        \\note Amortized constant time complexity.\n        \\see GenericStringRef\n    */\n    GenericValue& PushBack(StringRefType value, Allocator& allocator) {\n        return (*this).template PushBack<StringRefType>(value, allocator);\n    }\n\n    //! Append a primitive value at the end of the array.\n    /*! \\tparam T Either \\ref Type, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t\n        \\param value Value of primitive type T to be appended.\n        \\param allocator    Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().\n        \\pre IsArray() == true\n        \\return The value itself for fluent API.\n        \\note If the number of elements to be appended is known, calls Reserve() once first may be more efficient.\n\n        \\note The source type \\c T explicitly disallows all pointer types,\n            especially (\\c const) \\ref Ch*.  This helps avoiding implicitly\n            referencing character strings with insufficient lifetime, use\n            \\ref PushBack(GenericValue&, Allocator&) or \\ref\n            PushBack(StringRefType, Allocator&).\n            All other pointer types would implicitly convert to \\c bool,\n            use an explicit cast instead, if needed.\n        \\note Amortized constant time complexity.\n    */\n    template <typename T>\n    RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (GenericValue&))\n    PushBack(T value, Allocator& allocator) {\n        GenericValue v(value);\n        return PushBack(v, allocator);\n    }\n\n    //! Remove the last element in the array.\n    /*!\n        \\note Constant time complexity.\n    */\n    GenericValue& PopBack() {\n        RAPIDJSON_ASSERT(IsArray());\n        RAPIDJSON_ASSERT(!Empty());\n        GetElementsPointer()[--data_.a.size].~GenericValue();\n        return *this;\n    }\n\n    //! Remove an element of array by iterator.\n    /*!\n        \\param pos iterator to the element to remove\n        \\pre IsArray() == true && \\ref Begin() <= \\c pos < \\ref End()\n        \\return Iterator following the removed element. If the iterator pos refers to the last element, the End() iterator is returned.\n        \\note Linear time complexity.\n    */\n    ValueIterator Erase(ConstValueIterator pos) {\n        return Erase(pos, pos + 1);\n    }\n\n    //! Remove elements in the range [first, last) of the array.\n    /*!\n        \\param first iterator to the first element to remove\n        \\param last  iterator following the last element to remove\n        \\pre IsArray() == true && \\ref Begin() <= \\c first <= \\c last <= \\ref End()\n        \\return Iterator following the last removed element.\n        \\note Linear time complexity.\n    */\n    ValueIterator Erase(ConstValueIterator first, ConstValueIterator last) {\n        RAPIDJSON_ASSERT(IsArray());\n        RAPIDJSON_ASSERT(data_.a.size > 0);\n        RAPIDJSON_ASSERT(GetElementsPointer() != 0);\n        RAPIDJSON_ASSERT(first >= Begin());\n        RAPIDJSON_ASSERT(first <= last);\n        RAPIDJSON_ASSERT(last <= End());\n        ValueIterator pos = Begin() + (first - Begin());\n        for (ValueIterator itr = pos; itr != last; ++itr)\n            itr->~GenericValue();\n        std::memmove(static_cast<void*>(pos), last, static_cast<size_t>(End() - last) * sizeof(GenericValue));\n        data_.a.size -= static_cast<SizeType>(last - first);\n        return pos;\n    }\n\n    Array GetArray() { RAPIDJSON_ASSERT(IsArray()); return Array(*this); }\n    ConstArray GetArray() const { RAPIDJSON_ASSERT(IsArray()); return ConstArray(*this); }\n\n    //@}\n\n    //!@name Number\n    //@{\n\n    int GetInt() const          { RAPIDJSON_ASSERT(data_.f.flags & kIntFlag);   return data_.n.i.i;   }\n    unsigned GetUint() const    { RAPIDJSON_ASSERT(data_.f.flags & kUintFlag);  return data_.n.u.u;   }\n    int64_t GetInt64() const    { RAPIDJSON_ASSERT(data_.f.flags & kInt64Flag); return data_.n.i64; }\n    uint64_t GetUint64() const  { RAPIDJSON_ASSERT(data_.f.flags & kUint64Flag); return data_.n.u64; }\n\n    //! Get the value as double type.\n    /*! \\note If the value is 64-bit integer type, it may lose precision. Use \\c IsLosslessDouble() to check whether the converison is lossless.\n    */\n    double GetDouble() const {\n        RAPIDJSON_ASSERT(IsNumber());\n        if ((data_.f.flags & kDoubleFlag) != 0)                return data_.n.d;   // exact type, no conversion.\n        if ((data_.f.flags & kIntFlag) != 0)                   return data_.n.i.i; // int -> double\n        if ((data_.f.flags & kUintFlag) != 0)                  return data_.n.u.u; // unsigned -> double\n        if ((data_.f.flags & kInt64Flag) != 0)                 return static_cast<double>(data_.n.i64); // int64_t -> double (may lose precision)\n        RAPIDJSON_ASSERT((data_.f.flags & kUint64Flag) != 0);  return static_cast<double>(data_.n.u64); // uint64_t -> double (may lose precision)\n    }\n\n    //! Get the value as float type.\n    /*! \\note If the value is 64-bit integer type, it may lose precision. Use \\c IsLosslessFloat() to check whether the converison is lossless.\n    */\n    float GetFloat() const {\n        return static_cast<float>(GetDouble());\n    }\n\n    GenericValue& SetInt(int i)             { this->~GenericValue(); new (this) GenericValue(i);    return *this; }\n    GenericValue& SetUint(unsigned u)       { this->~GenericValue(); new (this) GenericValue(u);    return *this; }\n    GenericValue& SetInt64(int64_t i64)     { this->~GenericValue(); new (this) GenericValue(i64);  return *this; }\n    GenericValue& SetUint64(uint64_t u64)   { this->~GenericValue(); new (this) GenericValue(u64);  return *this; }\n    GenericValue& SetDouble(double d)       { this->~GenericValue(); new (this) GenericValue(d);    return *this; }\n    GenericValue& SetFloat(float f)         { this->~GenericValue(); new (this) GenericValue(static_cast<double>(f)); return *this; }\n\n    //@}\n\n    //!@name String\n    //@{\n\n    const Ch* GetString() const { RAPIDJSON_ASSERT(IsString()); return (data_.f.flags & kInlineStrFlag) ? data_.ss.str : GetStringPointer(); }\n\n    //! Get the length of string.\n    /*! Since rapidjson permits \"\\\\u0000\" in the json string, strlen(v.GetString()) may not equal to v.GetStringLength().\n    */\n    SizeType GetStringLength() const { RAPIDJSON_ASSERT(IsString()); return ((data_.f.flags & kInlineStrFlag) ? (data_.ss.GetLength()) : data_.s.length); }\n\n    //! Set this value as a string without copying source string.\n    /*! This version has better performance with supplied length, and also support string containing null character.\n        \\param s source string pointer. \n        \\param length The length of source string, excluding the trailing null terminator.\n        \\return The value itself for fluent API.\n        \\post IsString() == true && GetString() == s && GetStringLength() == length\n        \\see SetString(StringRefType)\n    */\n    GenericValue& SetString(const Ch* s, SizeType length) { return SetString(StringRef(s, length)); }\n\n    //! Set this value as a string without copying source string.\n    /*! \\param s source string reference\n        \\return The value itself for fluent API.\n        \\post IsString() == true && GetString() == s && GetStringLength() == s.length\n    */\n    GenericValue& SetString(StringRefType s) { this->~GenericValue(); SetStringRaw(s); return *this; }\n\n    //! Set this value as a string by copying from source string.\n    /*! This version has better performance with supplied length, and also support string containing null character.\n        \\param s source string. \n        \\param length The length of source string, excluding the trailing null terminator.\n        \\param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\post IsString() == true && GetString() != s && strcmp(GetString(),s) == 0 && GetStringLength() == length\n    */\n    GenericValue& SetString(const Ch* s, SizeType length, Allocator& allocator) { return SetString(StringRef(s, length), allocator); }\n\n    //! Set this value as a string by copying from source string.\n    /*! \\param s source string. \n        \\param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\post IsString() == true && GetString() != s && strcmp(GetString(),s) == 0 && GetStringLength() == length\n    */\n    GenericValue& SetString(const Ch* s, Allocator& allocator) { return SetString(StringRef(s), allocator); }\n\n    //! Set this value as a string by copying from source string.\n    /*! \\param s source string reference\n        \\param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\post IsString() == true && GetString() != s.s && strcmp(GetString(),s) == 0 && GetStringLength() == length\n    */\n    GenericValue& SetString(StringRefType s, Allocator& allocator) { this->~GenericValue(); SetStringRaw(s, allocator); return *this; }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Set this value as a string by copying from source string.\n    /*! \\param s source string.\n        \\param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().\n        \\return The value itself for fluent API.\n        \\post IsString() == true && GetString() != s.data() && strcmp(GetString(),s.data() == 0 && GetStringLength() == s.size()\n        \\note Requires the definition of the preprocessor symbol \\ref RAPIDJSON_HAS_STDSTRING.\n    */\n    GenericValue& SetString(const std::basic_string<Ch>& s, Allocator& allocator) { return SetString(StringRef(s), allocator); }\n#endif\n\n    //@}\n\n    //!@name Array\n    //@{\n\n    //! Templated version for checking whether this value is type T.\n    /*!\n        \\tparam T Either \\c bool, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t, \\c double, \\c float, \\c const \\c char*, \\c std::basic_string<Ch>\n    */\n    template <typename T>\n    bool Is() const { return internal::TypeHelper<ValueType, T>::Is(*this); }\n\n    template <typename T>\n    T Get() const { return internal::TypeHelper<ValueType, T>::Get(*this); }\n\n    template <typename T>\n    T Get() { return internal::TypeHelper<ValueType, T>::Get(*this); }\n\n    template<typename T>\n    ValueType& Set(const T& data) { return internal::TypeHelper<ValueType, T>::Set(*this, data); }\n\n    template<typename T>\n    ValueType& Set(const T& data, AllocatorType& allocator) { return internal::TypeHelper<ValueType, T>::Set(*this, data, allocator); }\n\n    //@}\n\n    //! Generate events of this value to a Handler.\n    /*! This function adopts the GoF visitor pattern.\n        Typical usage is to output this JSON value as JSON text via Writer, which is a Handler.\n        It can also be used to deep clone this value via GenericDocument, which is also a Handler.\n        \\tparam Handler type of handler.\n        \\param handler An object implementing concept Handler.\n    */\n    template <typename Handler>\n    bool Accept(Handler& handler) const {\n        switch(GetType()) {\n        case kNullType:     return handler.Null();\n        case kFalseType:    return handler.Bool(false);\n        case kTrueType:     return handler.Bool(true);\n\n        case kObjectType:\n            if (RAPIDJSON_UNLIKELY(!handler.StartObject()))\n                return false;\n            for (ConstMemberIterator m = MemberBegin(); m != MemberEnd(); ++m) {\n                RAPIDJSON_ASSERT(m->name.IsString()); // User may change the type of name by MemberIterator.\n                if (RAPIDJSON_UNLIKELY(!handler.Key(m->name.GetString(), m->name.GetStringLength(), (m->name.data_.f.flags & kCopyFlag) != 0)))\n                    return false;\n                if (RAPIDJSON_UNLIKELY(!m->value.Accept(handler)))\n                    return false;\n            }\n            return handler.EndObject(data_.o.size);\n\n        case kArrayType:\n            if (RAPIDJSON_UNLIKELY(!handler.StartArray()))\n                return false;\n            for (const GenericValue* v = Begin(); v != End(); ++v)\n                if (RAPIDJSON_UNLIKELY(!v->Accept(handler)))\n                    return false;\n            return handler.EndArray(data_.a.size);\n    \n        case kStringType:\n            return handler.String(GetString(), GetStringLength(), (data_.f.flags & kCopyFlag) != 0);\n    \n        default:\n            RAPIDJSON_ASSERT(GetType() == kNumberType);\n            if (IsDouble())         return handler.Double(data_.n.d);\n            else if (IsInt())       return handler.Int(data_.n.i.i);\n            else if (IsUint())      return handler.Uint(data_.n.u.u);\n            else if (IsInt64())     return handler.Int64(data_.n.i64);\n            else                    return handler.Uint64(data_.n.u64);\n        }\n    }\n\nprivate:\n    template <typename, typename> friend class GenericValue;\n    template <typename, typename, typename> friend class GenericDocument;\n\n    enum {\n        kBoolFlag       = 0x0008,\n        kNumberFlag     = 0x0010,\n        kIntFlag        = 0x0020,\n        kUintFlag       = 0x0040,\n        kInt64Flag      = 0x0080,\n        kUint64Flag     = 0x0100,\n        kDoubleFlag     = 0x0200,\n        kStringFlag     = 0x0400,\n        kCopyFlag       = 0x0800,\n        kInlineStrFlag  = 0x1000,\n\n        // Initial flags of different types.\n        kNullFlag = kNullType,\n        kTrueFlag = kTrueType | kBoolFlag,\n        kFalseFlag = kFalseType | kBoolFlag,\n        kNumberIntFlag = kNumberType | kNumberFlag | kIntFlag | kInt64Flag,\n        kNumberUintFlag = kNumberType | kNumberFlag | kUintFlag | kUint64Flag | kInt64Flag,\n        kNumberInt64Flag = kNumberType | kNumberFlag | kInt64Flag,\n        kNumberUint64Flag = kNumberType | kNumberFlag | kUint64Flag,\n        kNumberDoubleFlag = kNumberType | kNumberFlag | kDoubleFlag,\n        kNumberAnyFlag = kNumberType | kNumberFlag | kIntFlag | kInt64Flag | kUintFlag | kUint64Flag | kDoubleFlag,\n        kConstStringFlag = kStringType | kStringFlag,\n        kCopyStringFlag = kStringType | kStringFlag | kCopyFlag,\n        kShortStringFlag = kStringType | kStringFlag | kCopyFlag | kInlineStrFlag,\n        kObjectFlag = kObjectType,\n        kArrayFlag = kArrayType,\n\n        kTypeMask = 0x07\n    };\n\n    static const SizeType kDefaultArrayCapacity = RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY;\n    static const SizeType kDefaultObjectCapacity = RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY;\n\n    struct Flag {\n#if RAPIDJSON_48BITPOINTER_OPTIMIZATION\n        char payload[sizeof(SizeType) * 2 + 6];     // 2 x SizeType + lower 48-bit pointer\n#elif RAPIDJSON_64BIT\n        char payload[sizeof(SizeType) * 2 + sizeof(void*) + 6]; // 6 padding bytes\n#else\n        char payload[sizeof(SizeType) * 2 + sizeof(void*) + 2]; // 2 padding bytes\n#endif\n        uint16_t flags;\n    };\n\n    struct String {\n        SizeType length;\n        SizeType hashcode;  //!< reserved\n        const Ch* str;\n    };  // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode\n\n    // implementation detail: ShortString can represent zero-terminated strings up to MaxSize chars\n    // (excluding the terminating zero) and store a value to determine the length of the contained\n    // string in the last character str[LenPos] by storing \"MaxSize - length\" there. If the string\n    // to store has the maximal length of MaxSize then str[LenPos] will be 0 and therefore act as\n    // the string terminator as well. For getting the string length back from that value just use\n    // \"MaxSize - str[LenPos]\".\n    // This allows to store 13-chars strings in 32-bit mode, 21-chars strings in 64-bit mode,\n    // 13-chars strings for RAPIDJSON_48BITPOINTER_OPTIMIZATION=1 inline (for `UTF8`-encoded strings).\n    struct ShortString {\n        enum { MaxChars = sizeof(static_cast<Flag*>(0)->payload) / sizeof(Ch), MaxSize = MaxChars - 1, LenPos = MaxSize };\n        Ch str[MaxChars];\n\n        inline static bool Usable(SizeType len) { return                       (MaxSize >= len); }\n        inline void     SetLength(SizeType len) { str[LenPos] = static_cast<Ch>(MaxSize -  len); }\n        inline SizeType GetLength() const       { return  static_cast<SizeType>(MaxSize -  str[LenPos]); }\n    };  // at most as many bytes as \"String\" above => 12 bytes in 32-bit mode, 16 bytes in 64-bit mode\n\n    // By using proper binary layout, retrieval of different integer types do not need conversions.\n    union Number {\n#if RAPIDJSON_ENDIAN == RAPIDJSON_LITTLEENDIAN\n        struct I {\n            int i;\n            char padding[4];\n        }i;\n        struct U {\n            unsigned u;\n            char padding2[4];\n        }u;\n#else\n        struct I {\n            char padding[4];\n            int i;\n        }i;\n        struct U {\n            char padding2[4];\n            unsigned u;\n        }u;\n#endif\n        int64_t i64;\n        uint64_t u64;\n        double d;\n    };  // 8 bytes\n\n    struct ObjectData {\n        SizeType size;\n        SizeType capacity;\n        Member* members;\n    };  // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode\n\n    struct ArrayData {\n        SizeType size;\n        SizeType capacity;\n        GenericValue* elements;\n    };  // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode\n\n    union Data {\n        String s;\n        ShortString ss;\n        Number n;\n        ObjectData o;\n        ArrayData a;\n        Flag f;\n    };  // 16 bytes in 32-bit mode, 24 bytes in 64-bit mode, 16 bytes in 64-bit with RAPIDJSON_48BITPOINTER_OPTIMIZATION\n\n    RAPIDJSON_FORCEINLINE const Ch* GetStringPointer() const { return RAPIDJSON_GETPOINTER(Ch, data_.s.str); }\n    RAPIDJSON_FORCEINLINE const Ch* SetStringPointer(const Ch* str) { return RAPIDJSON_SETPOINTER(Ch, data_.s.str, str); }\n    RAPIDJSON_FORCEINLINE GenericValue* GetElementsPointer() const { return RAPIDJSON_GETPOINTER(GenericValue, data_.a.elements); }\n    RAPIDJSON_FORCEINLINE GenericValue* SetElementsPointer(GenericValue* elements) { return RAPIDJSON_SETPOINTER(GenericValue, data_.a.elements, elements); }\n    RAPIDJSON_FORCEINLINE Member* GetMembersPointer() const { return RAPIDJSON_GETPOINTER(Member, data_.o.members); }\n    RAPIDJSON_FORCEINLINE Member* SetMembersPointer(Member* members) { return RAPIDJSON_SETPOINTER(Member, data_.o.members, members); }\n\n    // Initialize this value as array with initial data, without calling destructor.\n    void SetArrayRaw(GenericValue* values, SizeType count, Allocator& allocator) {\n        data_.f.flags = kArrayFlag;\n        if (count) {\n            GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));\n            SetElementsPointer(e);\n            std::memcpy(static_cast<void*>(e), values, count * sizeof(GenericValue));\n        }\n        else\n            SetElementsPointer(0);\n        data_.a.size = data_.a.capacity = count;\n    }\n\n    //! Initialize this value as object with initial data, without calling destructor.\n    void SetObjectRaw(Member* members, SizeType count, Allocator& allocator) {\n        data_.f.flags = kObjectFlag;\n        if (count) {\n            Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));\n            SetMembersPointer(m);\n            std::memcpy(static_cast<void*>(m), members, count * sizeof(Member));\n        }\n        else\n            SetMembersPointer(0);\n        data_.o.size = data_.o.capacity = count;\n    }\n\n    //! Initialize this value as constant string, without calling destructor.\n    void SetStringRaw(StringRefType s) RAPIDJSON_NOEXCEPT {\n        data_.f.flags = kConstStringFlag;\n        SetStringPointer(s);\n        data_.s.length = s.length;\n    }\n\n    //! Initialize this value as copy string with initial data, without calling destructor.\n    void SetStringRaw(StringRefType s, Allocator& allocator) {\n        Ch* str = 0;\n        if (ShortString::Usable(s.length)) {\n            data_.f.flags = kShortStringFlag;\n            data_.ss.SetLength(s.length);\n            str = data_.ss.str;\n        } else {\n            data_.f.flags = kCopyStringFlag;\n            data_.s.length = s.length;\n            str = static_cast<Ch *>(allocator.Malloc((s.length + 1) * sizeof(Ch)));\n            SetStringPointer(str);\n        }\n        std::memcpy(str, s, s.length * sizeof(Ch));\n        str[s.length] = '\\0';\n    }\n\n    //! Assignment without calling destructor\n    void RawAssign(GenericValue& rhs) RAPIDJSON_NOEXCEPT {\n        data_ = rhs.data_;\n        // data_.f.flags = rhs.data_.f.flags;\n        rhs.data_.f.flags = kNullFlag;\n    }\n\n    template <typename SourceAllocator>\n    bool StringEqual(const GenericValue<Encoding, SourceAllocator>& rhs) const {\n        RAPIDJSON_ASSERT(IsString());\n        RAPIDJSON_ASSERT(rhs.IsString());\n\n        const SizeType len1 = GetStringLength();\n        const SizeType len2 = rhs.GetStringLength();\n        if(len1 != len2) { return false; }\n\n        const Ch* const str1 = GetString();\n        const Ch* const str2 = rhs.GetString();\n        if(str1 == str2) { return true; } // fast path for constant string\n\n        return (std::memcmp(str1, str2, sizeof(Ch) * len1) == 0);\n    }\n\n    Data data_;\n};\n\n//! GenericValue with UTF8 encoding\ntypedef GenericValue<UTF8<> > Value;\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericDocument \n\n//! A document for parsing JSON text as DOM.\n/*!\n    \\note implements Handler concept\n    \\tparam Encoding Encoding for both parsing and string storage.\n    \\tparam Allocator Allocator for allocating memory for the DOM\n    \\tparam StackAllocator Allocator for allocating memory for stack during parsing.\n    \\warning Although GenericDocument inherits from GenericValue, the API does \\b not provide any virtual functions, especially no virtual destructor.  To avoid memory leaks, do not \\c delete a GenericDocument object via a pointer to a GenericValue.\n*/\ntemplate <typename Encoding, typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR, typename StackAllocator = RAPIDJSON_DEFAULT_STACK_ALLOCATOR >\nclass GenericDocument : public GenericValue<Encoding, Allocator> {\npublic:\n    typedef typename Encoding::Ch Ch;                       //!< Character type derived from Encoding.\n    typedef GenericValue<Encoding, Allocator> ValueType;    //!< Value type of the document.\n    typedef Allocator AllocatorType;                        //!< Allocator type from template parameter.\n\n    //! Constructor\n    /*! Creates an empty document of specified type.\n        \\param type             Mandatory type of object to create.\n        \\param allocator        Optional allocator for allocating memory.\n        \\param stackCapacity    Optional initial capacity of stack in bytes.\n        \\param stackAllocator   Optional allocator for allocating memory for stack.\n    */\n    explicit GenericDocument(Type type, Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity, StackAllocator* stackAllocator = 0) :\n        GenericValue<Encoding, Allocator>(type),  allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_()\n    {\n        if (!allocator_)\n            ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();\n    }\n\n    //! Constructor\n    /*! Creates an empty document which type is Null. \n        \\param allocator        Optional allocator for allocating memory.\n        \\param stackCapacity    Optional initial capacity of stack in bytes.\n        \\param stackAllocator   Optional allocator for allocating memory for stack.\n    */\n    GenericDocument(Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity, StackAllocator* stackAllocator = 0) : \n        allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_()\n    {\n        if (!allocator_)\n            ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();\n    }\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    //! Move constructor in C++11\n    GenericDocument(GenericDocument&& rhs) RAPIDJSON_NOEXCEPT\n        : ValueType(std::forward<ValueType>(rhs)), // explicit cast to avoid prohibited move from Document\n          allocator_(rhs.allocator_),\n          ownAllocator_(rhs.ownAllocator_),\n          stack_(std::move(rhs.stack_)),\n          parseResult_(rhs.parseResult_)\n    {\n        rhs.allocator_ = 0;\n        rhs.ownAllocator_ = 0;\n        rhs.parseResult_ = ParseResult();\n    }\n#endif\n\n    ~GenericDocument() {\n        Destroy();\n    }\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    //! Move assignment in C++11\n    GenericDocument& operator=(GenericDocument&& rhs) RAPIDJSON_NOEXCEPT\n    {\n        // The cast to ValueType is necessary here, because otherwise it would\n        // attempt to call GenericValue's templated assignment operator.\n        ValueType::operator=(std::forward<ValueType>(rhs));\n\n        // Calling the destructor here would prematurely call stack_'s destructor\n        Destroy();\n\n        allocator_ = rhs.allocator_;\n        ownAllocator_ = rhs.ownAllocator_;\n        stack_ = std::move(rhs.stack_);\n        parseResult_ = rhs.parseResult_;\n\n        rhs.allocator_ = 0;\n        rhs.ownAllocator_ = 0;\n        rhs.parseResult_ = ParseResult();\n\n        return *this;\n    }\n#endif\n\n    //! Exchange the contents of this document with those of another.\n    /*!\n        \\param rhs Another document.\n        \\note Constant complexity.\n        \\see GenericValue::Swap\n    */\n    GenericDocument& Swap(GenericDocument& rhs) RAPIDJSON_NOEXCEPT {\n        ValueType::Swap(rhs);\n        stack_.Swap(rhs.stack_);\n        internal::Swap(allocator_, rhs.allocator_);\n        internal::Swap(ownAllocator_, rhs.ownAllocator_);\n        internal::Swap(parseResult_, rhs.parseResult_);\n        return *this;\n    }\n\n    // Allow Swap with ValueType.\n    // Refer to Effective C++ 3rd Edition/Item 33: Avoid hiding inherited names.\n    using ValueType::Swap;\n\n    //! free-standing swap function helper\n    /*!\n        Helper function to enable support for common swap implementation pattern based on \\c std::swap:\n        \\code\n        void swap(MyClass& a, MyClass& b) {\n            using std::swap;\n            swap(a.doc, b.doc);\n            // ...\n        }\n        \\endcode\n        \\see Swap()\n     */\n    friend inline void swap(GenericDocument& a, GenericDocument& b) RAPIDJSON_NOEXCEPT { a.Swap(b); }\n\n    //! Populate this document by a generator which produces SAX events.\n    /*! \\tparam Generator A functor with <tt>bool f(Handler)</tt> prototype.\n        \\param g Generator functor which sends SAX events to the parameter.\n        \\return The document itself for fluent API.\n    */\n    template <typename Generator>\n    GenericDocument& Populate(Generator& g) {\n        ClearStackOnExit scope(*this);\n        if (g(*this)) {\n            RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object\n            ValueType::operator=(*stack_.template Pop<ValueType>(1));// Move value from stack to document\n        }\n        return *this;\n    }\n\n    //!@name Parse from stream\n    //!@{\n\n    //! Parse JSON text from an input stream (with Encoding conversion)\n    /*! \\tparam parseFlags Combination of \\ref ParseFlag.\n        \\tparam SourceEncoding Encoding of input stream\n        \\tparam InputStream Type of input stream, implementing Stream concept\n        \\param is Input stream to be parsed.\n        \\return The document itself for fluent API.\n    */\n    template <unsigned parseFlags, typename SourceEncoding, typename InputStream>\n    GenericDocument& ParseStream(InputStream& is) {\n        GenericReader<SourceEncoding, Encoding, StackAllocator> reader(\n            stack_.HasAllocator() ? &stack_.GetAllocator() : 0);\n        ClearStackOnExit scope(*this);\n        parseResult_ = reader.template Parse<parseFlags>(is, *this);\n        if (parseResult_) {\n            RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object\n            ValueType::operator=(*stack_.template Pop<ValueType>(1));// Move value from stack to document\n        }\n        return *this;\n    }\n\n    //! Parse JSON text from an input stream\n    /*! \\tparam parseFlags Combination of \\ref ParseFlag.\n        \\tparam InputStream Type of input stream, implementing Stream concept\n        \\param is Input stream to be parsed.\n        \\return The document itself for fluent API.\n    */\n    template <unsigned parseFlags, typename InputStream>\n    GenericDocument& ParseStream(InputStream& is) {\n        return ParseStream<parseFlags, Encoding, InputStream>(is);\n    }\n\n    //! Parse JSON text from an input stream (with \\ref kParseDefaultFlags)\n    /*! \\tparam InputStream Type of input stream, implementing Stream concept\n        \\param is Input stream to be parsed.\n        \\return The document itself for fluent API.\n    */\n    template <typename InputStream>\n    GenericDocument& ParseStream(InputStream& is) {\n        return ParseStream<kParseDefaultFlags, Encoding, InputStream>(is);\n    }\n    //!@}\n\n    //!@name Parse in-place from mutable string\n    //!@{\n\n    //! Parse JSON text from a mutable string\n    /*! \\tparam parseFlags Combination of \\ref ParseFlag.\n        \\param str Mutable zero-terminated string to be parsed.\n        \\return The document itself for fluent API.\n    */\n    template <unsigned parseFlags>\n    GenericDocument& ParseInsitu(Ch* str) {\n        GenericInsituStringStream<Encoding> s(str);\n        return ParseStream<parseFlags | kParseInsituFlag>(s);\n    }\n\n    //! Parse JSON text from a mutable string (with \\ref kParseDefaultFlags)\n    /*! \\param str Mutable zero-terminated string to be parsed.\n        \\return The document itself for fluent API.\n    */\n    GenericDocument& ParseInsitu(Ch* str) {\n        return ParseInsitu<kParseDefaultFlags>(str);\n    }\n    //!@}\n\n    //!@name Parse from read-only string\n    //!@{\n\n    //! Parse JSON text from a read-only string (with Encoding conversion)\n    /*! \\tparam parseFlags Combination of \\ref ParseFlag (must not contain \\ref kParseInsituFlag).\n        \\tparam SourceEncoding Transcoding from input Encoding\n        \\param str Read-only zero-terminated string to be parsed.\n    */\n    template <unsigned parseFlags, typename SourceEncoding>\n    GenericDocument& Parse(const typename SourceEncoding::Ch* str) {\n        RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag));\n        GenericStringStream<SourceEncoding> s(str);\n        return ParseStream<parseFlags, SourceEncoding>(s);\n    }\n\n    //! Parse JSON text from a read-only string\n    /*! \\tparam parseFlags Combination of \\ref ParseFlag (must not contain \\ref kParseInsituFlag).\n        \\param str Read-only zero-terminated string to be parsed.\n    */\n    template <unsigned parseFlags>\n    GenericDocument& Parse(const Ch* str) {\n        return Parse<parseFlags, Encoding>(str);\n    }\n\n    //! Parse JSON text from a read-only string (with \\ref kParseDefaultFlags)\n    /*! \\param str Read-only zero-terminated string to be parsed.\n    */\n    GenericDocument& Parse(const Ch* str) {\n        return Parse<kParseDefaultFlags>(str);\n    }\n\n    template <unsigned parseFlags, typename SourceEncoding>\n    GenericDocument& Parse(const typename SourceEncoding::Ch* str, size_t length) {\n        RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag));\n        MemoryStream ms(reinterpret_cast<const char*>(str), length * sizeof(typename SourceEncoding::Ch));\n        EncodedInputStream<SourceEncoding, MemoryStream> is(ms);\n        ParseStream<parseFlags, SourceEncoding>(is);\n        return *this;\n    }\n\n    template <unsigned parseFlags>\n    GenericDocument& Parse(const Ch* str, size_t length) {\n        return Parse<parseFlags, Encoding>(str, length);\n    }\n    \n    GenericDocument& Parse(const Ch* str, size_t length) {\n        return Parse<kParseDefaultFlags>(str, length);\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    template <unsigned parseFlags, typename SourceEncoding>\n    GenericDocument& Parse(const std::basic_string<typename SourceEncoding::Ch>& str) {\n        // c_str() is constant complexity according to standard. Should be faster than Parse(const char*, size_t)\n        return Parse<parseFlags, SourceEncoding>(str.c_str());\n    }\n\n    template <unsigned parseFlags>\n    GenericDocument& Parse(const std::basic_string<Ch>& str) {\n        return Parse<parseFlags, Encoding>(str.c_str());\n    }\n\n    GenericDocument& Parse(const std::basic_string<Ch>& str) {\n        return Parse<kParseDefaultFlags>(str);\n    }\n#endif // RAPIDJSON_HAS_STDSTRING    \n\n    //!@}\n\n    //!@name Handling parse errors\n    //!@{\n\n    //! Whether a parse error has occurred in the last parsing.\n    bool HasParseError() const { return parseResult_.IsError(); }\n\n    //! Get the \\ref ParseErrorCode of last parsing.\n    ParseErrorCode GetParseError() const { return parseResult_.Code(); }\n\n    //! Get the position of last parsing error in input, 0 otherwise.\n    size_t GetErrorOffset() const { return parseResult_.Offset(); }\n\n    //! Implicit conversion to get the last parse result\n#ifndef __clang // -Wdocumentation\n    /*! \\return \\ref ParseResult of the last parse operation\n\n        \\code\n          Document doc;\n          ParseResult ok = doc.Parse(json);\n          if (!ok)\n            printf( \"JSON parse error: %s (%u)\\n\", GetParseError_En(ok.Code()), ok.Offset());\n        \\endcode\n     */\n#endif\n    operator ParseResult() const { return parseResult_; }\n    //!@}\n\n    //! Get the allocator of this document.\n    Allocator& GetAllocator() {\n        RAPIDJSON_ASSERT(allocator_);\n        return *allocator_;\n    }\n\n    //! Get the capacity of stack in bytes.\n    size_t GetStackCapacity() const { return stack_.GetCapacity(); }\n\nprivate:\n    // clear stack on any exit from ParseStream, e.g. due to exception\n    struct ClearStackOnExit {\n        explicit ClearStackOnExit(GenericDocument& d) : d_(d) {}\n        ~ClearStackOnExit() { d_.ClearStack(); }\n    private:\n        ClearStackOnExit(const ClearStackOnExit&);\n        ClearStackOnExit& operator=(const ClearStackOnExit&);\n        GenericDocument& d_;\n    };\n\n    // callers of the following private Handler functions\n    // template <typename,typename,typename> friend class GenericReader; // for parsing\n    template <typename, typename> friend class GenericValue; // for deep copying\n\npublic:\n    // Implementation of Handler\n    bool Null() { new (stack_.template Push<ValueType>()) ValueType(); return true; }\n    bool Bool(bool b) { new (stack_.template Push<ValueType>()) ValueType(b); return true; }\n    bool Int(int i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }\n    bool Uint(unsigned i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }\n    bool Int64(int64_t i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }\n    bool Uint64(uint64_t i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }\n    bool Double(double d) { new (stack_.template Push<ValueType>()) ValueType(d); return true; }\n\n    bool RawNumber(const Ch* str, SizeType length, bool copy) { \n        if (copy) \n            new (stack_.template Push<ValueType>()) ValueType(str, length, GetAllocator());\n        else\n            new (stack_.template Push<ValueType>()) ValueType(str, length);\n        return true;\n    }\n\n    bool String(const Ch* str, SizeType length, bool copy) { \n        if (copy) \n            new (stack_.template Push<ValueType>()) ValueType(str, length, GetAllocator());\n        else\n            new (stack_.template Push<ValueType>()) ValueType(str, length);\n        return true;\n    }\n\n    bool StartObject() { new (stack_.template Push<ValueType>()) ValueType(kObjectType); return true; }\n    \n    bool Key(const Ch* str, SizeType length, bool copy) { return String(str, length, copy); }\n\n    bool EndObject(SizeType memberCount) {\n        typename ValueType::Member* members = stack_.template Pop<typename ValueType::Member>(memberCount);\n        stack_.template Top<ValueType>()->SetObjectRaw(members, memberCount, GetAllocator());\n        return true;\n    }\n\n    bool StartArray() { new (stack_.template Push<ValueType>()) ValueType(kArrayType); return true; }\n    \n    bool EndArray(SizeType elementCount) {\n        ValueType* elements = stack_.template Pop<ValueType>(elementCount);\n        stack_.template Top<ValueType>()->SetArrayRaw(elements, elementCount, GetAllocator());\n        return true;\n    }\n\nprivate:\n    //! Prohibit copying\n    GenericDocument(const GenericDocument&);\n    //! Prohibit assignment\n    GenericDocument& operator=(const GenericDocument&);\n\n    void ClearStack() {\n        if (Allocator::kNeedFree)\n            while (stack_.GetSize() > 0)    // Here assumes all elements in stack array are GenericValue (Member is actually 2 GenericValue objects)\n                (stack_.template Pop<ValueType>(1))->~ValueType();\n        else\n            stack_.Clear();\n        stack_.ShrinkToFit();\n    }\n\n    void Destroy() {\n        RAPIDJSON_DELETE(ownAllocator_);\n    }\n\n    static const size_t kDefaultStackCapacity = 1024;\n    Allocator* allocator_;\n    Allocator* ownAllocator_;\n    internal::Stack<StackAllocator> stack_;\n    ParseResult parseResult_;\n};\n\n//! GenericDocument with UTF8 encoding\ntypedef GenericDocument<UTF8<> > Document;\n\n\n//! Helper class for accessing Value of array type.\n/*!\n    Instance of this helper class is obtained by \\c GenericValue::GetArray().\n    In addition to all APIs for array type, it provides range-based for loop if \\c RAPIDJSON_HAS_CXX11_RANGE_FOR=1.\n*/\ntemplate <bool Const, typename ValueT>\nclass GenericArray {\npublic:\n    typedef GenericArray<true, ValueT> ConstArray;\n    typedef GenericArray<false, ValueT> Array;\n    typedef ValueT PlainType;\n    typedef typename internal::MaybeAddConst<Const,PlainType>::Type ValueType;\n    typedef ValueType* ValueIterator;  // This may be const or non-const iterator\n    typedef const ValueT* ConstValueIterator;\n    typedef typename ValueType::AllocatorType AllocatorType;\n    typedef typename ValueType::StringRefType StringRefType;\n\n    template <typename, typename>\n    friend class GenericValue;\n\n    GenericArray(const GenericArray& rhs) : value_(rhs.value_) {}\n    GenericArray& operator=(const GenericArray& rhs) { value_ = rhs.value_; return *this; }\n    ~GenericArray() {}\n\n    SizeType Size() const { return value_.Size(); }\n    SizeType Capacity() const { return value_.Capacity(); }\n    bool Empty() const { return value_.Empty(); }\n    void Clear() const { value_.Clear(); }\n    ValueType& operator[](SizeType index) const {  return value_[index]; }\n    ValueIterator Begin() const { return value_.Begin(); }\n    ValueIterator End() const { return value_.End(); }\n    GenericArray Reserve(SizeType newCapacity, AllocatorType &allocator) const { value_.Reserve(newCapacity, allocator); return *this; }\n    GenericArray PushBack(ValueType& value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; }\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    GenericArray PushBack(ValueType&& value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; }\n#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    GenericArray PushBack(StringRefType value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; }\n    template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (const GenericArray&)) PushBack(T value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; }\n    GenericArray PopBack() const { value_.PopBack(); return *this; }\n    ValueIterator Erase(ConstValueIterator pos) const { return value_.Erase(pos); }\n    ValueIterator Erase(ConstValueIterator first, ConstValueIterator last) const { return value_.Erase(first, last); }\n\n#if RAPIDJSON_HAS_CXX11_RANGE_FOR\n    ValueIterator begin() const { return value_.Begin(); }\n    ValueIterator end() const { return value_.End(); }\n#endif\n\nprivate:\n    GenericArray();\n    GenericArray(ValueType& value) : value_(value) {}\n    ValueType& value_;\n};\n\n//! Helper class for accessing Value of object type.\n/*!\n    Instance of this helper class is obtained by \\c GenericValue::GetObject().\n    In addition to all APIs for array type, it provides range-based for loop if \\c RAPIDJSON_HAS_CXX11_RANGE_FOR=1.\n*/\ntemplate <bool Const, typename ValueT>\nclass GenericObject {\npublic:\n    typedef GenericObject<true, ValueT> ConstObject;\n    typedef GenericObject<false, ValueT> Object;\n    typedef ValueT PlainType;\n    typedef typename internal::MaybeAddConst<Const,PlainType>::Type ValueType;\n    typedef GenericMemberIterator<Const, typename ValueT::EncodingType, typename ValueT::AllocatorType> MemberIterator;  // This may be const or non-const iterator\n    typedef GenericMemberIterator<true, typename ValueT::EncodingType, typename ValueT::AllocatorType> ConstMemberIterator;\n    typedef typename ValueType::AllocatorType AllocatorType;\n    typedef typename ValueType::StringRefType StringRefType;\n    typedef typename ValueType::EncodingType EncodingType;\n    typedef typename ValueType::Ch Ch;\n\n    template <typename, typename>\n    friend class GenericValue;\n\n    GenericObject(const GenericObject& rhs) : value_(rhs.value_) {}\n    GenericObject& operator=(const GenericObject& rhs) { value_ = rhs.value_; return *this; }\n    ~GenericObject() {}\n\n    SizeType MemberCount() const { return value_.MemberCount(); }\n    SizeType MemberCapacity() const { return value_.MemberCapacity(); }\n    bool ObjectEmpty() const { return value_.ObjectEmpty(); }\n    template <typename T> ValueType& operator[](T* name) const { return value_[name]; }\n    template <typename SourceAllocator> ValueType& operator[](const GenericValue<EncodingType, SourceAllocator>& name) const { return value_[name]; }\n#if RAPIDJSON_HAS_STDSTRING\n    ValueType& operator[](const std::basic_string<Ch>& name) const { return value_[name]; }\n#endif\n    MemberIterator MemberBegin() const { return value_.MemberBegin(); }\n    MemberIterator MemberEnd() const { return value_.MemberEnd(); }\n    GenericObject MemberReserve(SizeType newCapacity, AllocatorType &allocator) const { value_.MemberReserve(newCapacity, allocator); return *this; }\n    bool HasMember(const Ch* name) const { return value_.HasMember(name); }\n#if RAPIDJSON_HAS_STDSTRING\n    bool HasMember(const std::basic_string<Ch>& name) const { return value_.HasMember(name); }\n#endif\n    template <typename SourceAllocator> bool HasMember(const GenericValue<EncodingType, SourceAllocator>& name) const { return value_.HasMember(name); }\n    MemberIterator FindMember(const Ch* name) const { return value_.FindMember(name); }\n    template <typename SourceAllocator> MemberIterator FindMember(const GenericValue<EncodingType, SourceAllocator>& name) const { return value_.FindMember(name); }\n#if RAPIDJSON_HAS_STDSTRING\n    MemberIterator FindMember(const std::basic_string<Ch>& name) const { return value_.FindMember(name); }\n#endif\n    GenericObject AddMember(ValueType& name, ValueType& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n    GenericObject AddMember(ValueType& name, StringRefType value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n#if RAPIDJSON_HAS_STDSTRING\n    GenericObject AddMember(ValueType& name, std::basic_string<Ch>& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n#endif\n    template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&)) AddMember(ValueType& name, T value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    GenericObject AddMember(ValueType&& name, ValueType&& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n    GenericObject AddMember(ValueType&& name, ValueType& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n    GenericObject AddMember(ValueType& name, ValueType&& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n    GenericObject AddMember(StringRefType name, ValueType&& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    GenericObject AddMember(StringRefType name, ValueType& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n    GenericObject AddMember(StringRefType name, StringRefType value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n    template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (GenericObject)) AddMember(StringRefType name, T value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }\n    void RemoveAllMembers() { value_.RemoveAllMembers(); }\n    bool RemoveMember(const Ch* name) const { return value_.RemoveMember(name); }\n#if RAPIDJSON_HAS_STDSTRING\n    bool RemoveMember(const std::basic_string<Ch>& name) const { return value_.RemoveMember(name); }\n#endif\n    template <typename SourceAllocator> bool RemoveMember(const GenericValue<EncodingType, SourceAllocator>& name) const { return value_.RemoveMember(name); }\n    MemberIterator RemoveMember(MemberIterator m) const { return value_.RemoveMember(m); }\n    MemberIterator EraseMember(ConstMemberIterator pos) const { return value_.EraseMember(pos); }\n    MemberIterator EraseMember(ConstMemberIterator first, ConstMemberIterator last) const { return value_.EraseMember(first, last); }\n    bool EraseMember(const Ch* name) const { return value_.EraseMember(name); }\n#if RAPIDJSON_HAS_STDSTRING\n    bool EraseMember(const std::basic_string<Ch>& name) const { return EraseMember(ValueType(StringRef(name))); }\n#endif\n    template <typename SourceAllocator> bool EraseMember(const GenericValue<EncodingType, SourceAllocator>& name) const { return value_.EraseMember(name); }\n\n#if RAPIDJSON_HAS_CXX11_RANGE_FOR\n    MemberIterator begin() const { return value_.MemberBegin(); }\n    MemberIterator end() const { return value_.MemberEnd(); }\n#endif\n\nprivate:\n    GenericObject();\n    GenericObject(ValueType& value) : value_(value) {}\n    ValueType& value_;\n};\n\nRAPIDJSON_NAMESPACE_END\nRAPIDJSON_DIAG_POP\n\n#endif // RAPIDJSON_DOCUMENT_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/encodedstream.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_ENCODEDSTREAM_H_\n#define RAPIDJSON_ENCODEDSTREAM_H_\n\n#include \"stream.h\"\n#include \"memorystream.h\"\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(effc++)\n#endif\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(padded)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Input byte stream wrapper with a statically bound encoding.\n/*!\n    \\tparam Encoding The interpretation of encoding of the stream. Either UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE.\n    \\tparam InputByteStream Type of input byte stream. For example, FileReadStream.\n*/\ntemplate <typename Encoding, typename InputByteStream>\nclass EncodedInputStream {\n    RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\npublic:\n    typedef typename Encoding::Ch Ch;\n\n    EncodedInputStream(InputByteStream& is) : is_(is) { \n        current_ = Encoding::TakeBOM(is_);\n    }\n\n    Ch Peek() const { return current_; }\n    Ch Take() { Ch c = current_; current_ = Encoding::Take(is_); return c; }\n    size_t Tell() const { return is_.Tell(); }\n\n    // Not implemented\n    void Put(Ch) { RAPIDJSON_ASSERT(false); }\n    void Flush() { RAPIDJSON_ASSERT(false); } \n    Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }\n\nprivate:\n    EncodedInputStream(const EncodedInputStream&);\n    EncodedInputStream& operator=(const EncodedInputStream&);\n\n    InputByteStream& is_;\n    Ch current_;\n};\n\n//! Specialized for UTF8 MemoryStream.\ntemplate <>\nclass EncodedInputStream<UTF8<>, MemoryStream> {\npublic:\n    typedef UTF8<>::Ch Ch;\n\n    EncodedInputStream(MemoryStream& is) : is_(is) {\n        if (static_cast<unsigned char>(is_.Peek()) == 0xEFu) is_.Take();\n        if (static_cast<unsigned char>(is_.Peek()) == 0xBBu) is_.Take();\n        if (static_cast<unsigned char>(is_.Peek()) == 0xBFu) is_.Take();\n    }\n    Ch Peek() const { return is_.Peek(); }\n    Ch Take() { return is_.Take(); }\n    size_t Tell() const { return is_.Tell(); }\n\n    // Not implemented\n    void Put(Ch) {}\n    void Flush() {} \n    Ch* PutBegin() { return 0; }\n    size_t PutEnd(Ch*) { return 0; }\n\n    MemoryStream& is_;\n\nprivate:\n    EncodedInputStream(const EncodedInputStream&);\n    EncodedInputStream& operator=(const EncodedInputStream&);\n};\n\n//! Output byte stream wrapper with statically bound encoding.\n/*!\n    \\tparam Encoding The interpretation of encoding of the stream. Either UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE.\n    \\tparam OutputByteStream Type of input byte stream. For example, FileWriteStream.\n*/\ntemplate <typename Encoding, typename OutputByteStream>\nclass EncodedOutputStream {\n    RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\npublic:\n    typedef typename Encoding::Ch Ch;\n\n    EncodedOutputStream(OutputByteStream& os, bool putBOM = true) : os_(os) { \n        if (putBOM)\n            Encoding::PutBOM(os_);\n    }\n\n    void Put(Ch c) { Encoding::Put(os_, c);  }\n    void Flush() { os_.Flush(); }\n\n    // Not implemented\n    Ch Peek() const { RAPIDJSON_ASSERT(false); return 0;}\n    Ch Take() { RAPIDJSON_ASSERT(false); return 0;}\n    size_t Tell() const { RAPIDJSON_ASSERT(false);  return 0; }\n    Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }\n\nprivate:\n    EncodedOutputStream(const EncodedOutputStream&);\n    EncodedOutputStream& operator=(const EncodedOutputStream&);\n\n    OutputByteStream& os_;\n};\n\n#define RAPIDJSON_ENCODINGS_FUNC(x) UTF8<Ch>::x, UTF16LE<Ch>::x, UTF16BE<Ch>::x, UTF32LE<Ch>::x, UTF32BE<Ch>::x\n\n//! Input stream wrapper with dynamically bound encoding and automatic encoding detection.\n/*!\n    \\tparam CharType Type of character for reading.\n    \\tparam InputByteStream type of input byte stream to be wrapped.\n*/\ntemplate <typename CharType, typename InputByteStream>\nclass AutoUTFInputStream {\n    RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\npublic:\n    typedef CharType Ch;\n\n    //! Constructor.\n    /*!\n        \\param is input stream to be wrapped.\n        \\param type UTF encoding type if it is not detected from the stream.\n    */\n    AutoUTFInputStream(InputByteStream& is, UTFType type = kUTF8) : is_(&is), type_(type), hasBOM_(false) {\n        RAPIDJSON_ASSERT(type >= kUTF8 && type <= kUTF32BE);        \n        DetectType();\n        static const TakeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Take) };\n        takeFunc_ = f[type_];\n        current_ = takeFunc_(*is_);\n    }\n\n    UTFType GetType() const { return type_; }\n    bool HasBOM() const { return hasBOM_; }\n\n    Ch Peek() const { return current_; }\n    Ch Take() { Ch c = current_; current_ = takeFunc_(*is_); return c; }\n    size_t Tell() const { return is_->Tell(); }\n\n    // Not implemented\n    void Put(Ch) { RAPIDJSON_ASSERT(false); }\n    void Flush() { RAPIDJSON_ASSERT(false); } \n    Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }\n\nprivate:\n    AutoUTFInputStream(const AutoUTFInputStream&);\n    AutoUTFInputStream& operator=(const AutoUTFInputStream&);\n\n    // Detect encoding type with BOM or RFC 4627\n    void DetectType() {\n        // BOM (Byte Order Mark):\n        // 00 00 FE FF  UTF-32BE\n        // FF FE 00 00  UTF-32LE\n        // FE FF        UTF-16BE\n        // FF FE        UTF-16LE\n        // EF BB BF     UTF-8\n\n        const unsigned char* c = reinterpret_cast<const unsigned char *>(is_->Peek4());\n        if (!c)\n            return;\n\n        unsigned bom = static_cast<unsigned>(c[0] | (c[1] << 8) | (c[2] << 16) | (c[3] << 24));\n        hasBOM_ = false;\n        if (bom == 0xFFFE0000)                  { type_ = kUTF32BE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); }\n        else if (bom == 0x0000FEFF)             { type_ = kUTF32LE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); }\n        else if ((bom & 0xFFFF) == 0xFFFE)      { type_ = kUTF16BE; hasBOM_ = true; is_->Take(); is_->Take();                           }\n        else if ((bom & 0xFFFF) == 0xFEFF)      { type_ = kUTF16LE; hasBOM_ = true; is_->Take(); is_->Take();                           }\n        else if ((bom & 0xFFFFFF) == 0xBFBBEF)  { type_ = kUTF8;    hasBOM_ = true; is_->Take(); is_->Take(); is_->Take();              }\n\n        // RFC 4627: Section 3\n        // \"Since the first two characters of a JSON text will always be ASCII\n        // characters [RFC0020], it is possible to determine whether an octet\n        // stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking\n        // at the pattern of nulls in the first four octets.\"\n        // 00 00 00 xx  UTF-32BE\n        // 00 xx 00 xx  UTF-16BE\n        // xx 00 00 00  UTF-32LE\n        // xx 00 xx 00  UTF-16LE\n        // xx xx xx xx  UTF-8\n\n        if (!hasBOM_) {\n            int pattern = (c[0] ? 1 : 0) | (c[1] ? 2 : 0) | (c[2] ? 4 : 0) | (c[3] ? 8 : 0);\n            switch (pattern) {\n            case 0x08: type_ = kUTF32BE; break;\n            case 0x0A: type_ = kUTF16BE; break;\n            case 0x01: type_ = kUTF32LE; break;\n            case 0x05: type_ = kUTF16LE; break;\n            case 0x0F: type_ = kUTF8;    break;\n            default: break; // Use type defined by user.\n            }\n        }\n\n        // Runtime check whether the size of character type is sufficient. It only perform checks with assertion.\n        if (type_ == kUTF16LE || type_ == kUTF16BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 2);\n        if (type_ == kUTF32LE || type_ == kUTF32BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 4);\n    }\n\n    typedef Ch (*TakeFunc)(InputByteStream& is);\n    InputByteStream* is_;\n    UTFType type_;\n    Ch current_;\n    TakeFunc takeFunc_;\n    bool hasBOM_;\n};\n\n//! Output stream wrapper with dynamically bound encoding and automatic encoding detection.\n/*!\n    \\tparam CharType Type of character for writing.\n    \\tparam OutputByteStream type of output byte stream to be wrapped.\n*/\ntemplate <typename CharType, typename OutputByteStream>\nclass AutoUTFOutputStream {\n    RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\npublic:\n    typedef CharType Ch;\n\n    //! Constructor.\n    /*!\n        \\param os output stream to be wrapped.\n        \\param type UTF encoding type.\n        \\param putBOM Whether to write BOM at the beginning of the stream.\n    */\n    AutoUTFOutputStream(OutputByteStream& os, UTFType type, bool putBOM) : os_(&os), type_(type) {\n        RAPIDJSON_ASSERT(type >= kUTF8 && type <= kUTF32BE);\n\n        // Runtime check whether the size of character type is sufficient. It only perform checks with assertion.\n        if (type_ == kUTF16LE || type_ == kUTF16BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 2);\n        if (type_ == kUTF32LE || type_ == kUTF32BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 4);\n\n        static const PutFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Put) };\n        putFunc_ = f[type_];\n\n        if (putBOM)\n            PutBOM();\n    }\n\n    UTFType GetType() const { return type_; }\n\n    void Put(Ch c) { putFunc_(*os_, c); }\n    void Flush() { os_->Flush(); } \n\n    // Not implemented\n    Ch Peek() const { RAPIDJSON_ASSERT(false); return 0;}\n    Ch Take() { RAPIDJSON_ASSERT(false); return 0;}\n    size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }\n    Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }\n\nprivate:\n    AutoUTFOutputStream(const AutoUTFOutputStream&);\n    AutoUTFOutputStream& operator=(const AutoUTFOutputStream&);\n\n    void PutBOM() { \n        typedef void (*PutBOMFunc)(OutputByteStream&);\n        static const PutBOMFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(PutBOM) };\n        f[type_](*os_);\n    }\n\n    typedef void (*PutFunc)(OutputByteStream&, Ch);\n\n    OutputByteStream* os_;\n    UTFType type_;\n    PutFunc putFunc_;\n};\n\n#undef RAPIDJSON_ENCODINGS_FUNC\n\nRAPIDJSON_NAMESPACE_END\n\n#ifdef __clang__\nRAPIDJSON_DIAG_POP\n#endif\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_FILESTREAM_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/encodings.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_ENCODINGS_H_\n#define RAPIDJSON_ENCODINGS_H_\n\n#include \"rapidjson.h\"\n\n#if defined(_MSC_VER) && !defined(__clang__)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(4244) // conversion from 'type1' to 'type2', possible loss of data\nRAPIDJSON_DIAG_OFF(4702)  // unreachable code\n#elif defined(__GNUC__)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(effc++)\nRAPIDJSON_DIAG_OFF(overflow)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n///////////////////////////////////////////////////////////////////////////////\n// Encoding\n\n/*! \\class rapidjson::Encoding\n    \\brief Concept for encoding of Unicode characters.\n\n\\code\nconcept Encoding {\n    typename Ch;    //! Type of character. A \"character\" is actually a code unit in unicode's definition.\n\n    enum { supportUnicode = 1 }; // or 0 if not supporting unicode\n\n    //! \\brief Encode a Unicode codepoint to an output stream.\n    //! \\param os Output stream.\n    //! \\param codepoint An unicode codepoint, ranging from 0x0 to 0x10FFFF inclusively.\n    template<typename OutputStream>\n    static void Encode(OutputStream& os, unsigned codepoint);\n\n    //! \\brief Decode a Unicode codepoint from an input stream.\n    //! \\param is Input stream.\n    //! \\param codepoint Output of the unicode codepoint.\n    //! \\return true if a valid codepoint can be decoded from the stream.\n    template <typename InputStream>\n    static bool Decode(InputStream& is, unsigned* codepoint);\n\n    //! \\brief Validate one Unicode codepoint from an encoded stream.\n    //! \\param is Input stream to obtain codepoint.\n    //! \\param os Output for copying one codepoint.\n    //! \\return true if it is valid.\n    //! \\note This function just validating and copying the codepoint without actually decode it.\n    template <typename InputStream, typename OutputStream>\n    static bool Validate(InputStream& is, OutputStream& os);\n\n    // The following functions are deal with byte streams.\n\n    //! Take a character from input byte stream, skip BOM if exist.\n    template <typename InputByteStream>\n    static CharType TakeBOM(InputByteStream& is);\n\n    //! Take a character from input byte stream.\n    template <typename InputByteStream>\n    static Ch Take(InputByteStream& is);\n\n    //! Put BOM to output byte stream.\n    template <typename OutputByteStream>\n    static void PutBOM(OutputByteStream& os);\n\n    //! Put a character to output byte stream.\n    template <typename OutputByteStream>\n    static void Put(OutputByteStream& os, Ch c);\n};\n\\endcode\n*/\n\n///////////////////////////////////////////////////////////////////////////////\n// UTF8\n\n//! UTF-8 encoding.\n/*! http://en.wikipedia.org/wiki/UTF-8\n    http://tools.ietf.org/html/rfc3629\n    \\tparam CharType Code unit for storing 8-bit UTF-8 data. Default is char.\n    \\note implements Encoding concept\n*/\ntemplate<typename CharType = char>\nstruct UTF8 {\n    typedef CharType Ch;\n\n    enum { supportUnicode = 1 };\n\n    template<typename OutputStream>\n    static void Encode(OutputStream& os, unsigned codepoint) {\n        if (codepoint <= 0x7F) \n            os.Put(static_cast<Ch>(codepoint & 0xFF));\n        else if (codepoint <= 0x7FF) {\n            os.Put(static_cast<Ch>(0xC0 | ((codepoint >> 6) & 0xFF)));\n            os.Put(static_cast<Ch>(0x80 | ((codepoint & 0x3F))));\n        }\n        else if (codepoint <= 0xFFFF) {\n            os.Put(static_cast<Ch>(0xE0 | ((codepoint >> 12) & 0xFF)));\n            os.Put(static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));\n            os.Put(static_cast<Ch>(0x80 | (codepoint & 0x3F)));\n        }\n        else {\n            RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);\n            os.Put(static_cast<Ch>(0xF0 | ((codepoint >> 18) & 0xFF)));\n            os.Put(static_cast<Ch>(0x80 | ((codepoint >> 12) & 0x3F)));\n            os.Put(static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));\n            os.Put(static_cast<Ch>(0x80 | (codepoint & 0x3F)));\n        }\n    }\n\n    template<typename OutputStream>\n    static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {\n        if (codepoint <= 0x7F) \n            PutUnsafe(os, static_cast<Ch>(codepoint & 0xFF));\n        else if (codepoint <= 0x7FF) {\n            PutUnsafe(os, static_cast<Ch>(0xC0 | ((codepoint >> 6) & 0xFF)));\n            PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint & 0x3F))));\n        }\n        else if (codepoint <= 0xFFFF) {\n            PutUnsafe(os, static_cast<Ch>(0xE0 | ((codepoint >> 12) & 0xFF)));\n            PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));\n            PutUnsafe(os, static_cast<Ch>(0x80 | (codepoint & 0x3F)));\n        }\n        else {\n            RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);\n            PutUnsafe(os, static_cast<Ch>(0xF0 | ((codepoint >> 18) & 0xFF)));\n            PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint >> 12) & 0x3F)));\n            PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));\n            PutUnsafe(os, static_cast<Ch>(0x80 | (codepoint & 0x3F)));\n        }\n    }\n\n    template <typename InputStream>\n    static bool Decode(InputStream& is, unsigned* codepoint) {\n#define RAPIDJSON_COPY() c = is.Take(); *codepoint = (*codepoint << 6) | (static_cast<unsigned char>(c) & 0x3Fu)\n#define RAPIDJSON_TRANS(mask) result &= ((GetRange(static_cast<unsigned char>(c)) & mask) != 0)\n#define RAPIDJSON_TAIL() RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x70)\n        typename InputStream::Ch c = is.Take();\n        if (!(c & 0x80)) {\n            *codepoint = static_cast<unsigned char>(c);\n            return true;\n        }\n\n        unsigned char type = GetRange(static_cast<unsigned char>(c));\n        if (type >= 32) {\n            *codepoint = 0;\n        } else {\n            *codepoint = (0xFFu >> type) & static_cast<unsigned char>(c);\n        }\n        bool result = true;\n        switch (type) {\n        case 2: RAPIDJSON_TAIL(); return result;\n        case 3: RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result;\n        case 4: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x50); RAPIDJSON_TAIL(); return result;\n        case 5: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x10); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result;\n        case 6: RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result;\n        case 10: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x20); RAPIDJSON_TAIL(); return result;\n        case 11: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x60); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result;\n        default: return false;\n        }\n#undef RAPIDJSON_COPY\n#undef RAPIDJSON_TRANS\n#undef RAPIDJSON_TAIL\n    }\n\n    template <typename InputStream, typename OutputStream>\n    static bool Validate(InputStream& is, OutputStream& os) {\n#define RAPIDJSON_COPY() os.Put(c = is.Take())\n#define RAPIDJSON_TRANS(mask) result &= ((GetRange(static_cast<unsigned char>(c)) & mask) != 0)\n#define RAPIDJSON_TAIL() RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x70)\n        Ch c;\n        RAPIDJSON_COPY();\n        if (!(c & 0x80))\n            return true;\n\n        bool result = true;\n        switch (GetRange(static_cast<unsigned char>(c))) {\n        case 2: RAPIDJSON_TAIL(); return result;\n        case 3: RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result;\n        case 4: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x50); RAPIDJSON_TAIL(); return result;\n        case 5: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x10); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result;\n        case 6: RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result;\n        case 10: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x20); RAPIDJSON_TAIL(); return result;\n        case 11: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x60); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result;\n        default: return false;\n        }\n#undef RAPIDJSON_COPY\n#undef RAPIDJSON_TRANS\n#undef RAPIDJSON_TAIL\n    }\n\n    static unsigned char GetRange(unsigned char c) {\n        // Referring to DFA of http://bjoern.hoehrmann.de/utf-8/decoder/dfa/\n        // With new mapping 1 -> 0x10, 7 -> 0x20, 9 -> 0x40, such that AND operation can test multiple types.\n        static const unsigned char type[] = {\n            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n            0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,\n            0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,\n            0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,\n            0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,\n            8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,  2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,\n            10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,\n        };\n        return type[c];\n    }\n\n    template <typename InputByteStream>\n    static CharType TakeBOM(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        typename InputByteStream::Ch c = Take(is);\n        if (static_cast<unsigned char>(c) != 0xEFu) return c;\n        c = is.Take();\n        if (static_cast<unsigned char>(c) != 0xBBu) return c;\n        c = is.Take();\n        if (static_cast<unsigned char>(c) != 0xBFu) return c;\n        c = is.Take();\n        return c;\n    }\n\n    template <typename InputByteStream>\n    static Ch Take(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        return static_cast<Ch>(is.Take());\n    }\n\n    template <typename OutputByteStream>\n    static void PutBOM(OutputByteStream& os) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xEFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xBBu));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xBFu));\n    }\n\n    template <typename OutputByteStream>\n    static void Put(OutputByteStream& os, Ch c) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>(c));\n    }\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// UTF16\n\n//! UTF-16 encoding.\n/*! http://en.wikipedia.org/wiki/UTF-16\n    http://tools.ietf.org/html/rfc2781\n    \\tparam CharType Type for storing 16-bit UTF-16 data. Default is wchar_t. C++11 may use char16_t instead.\n    \\note implements Encoding concept\n\n    \\note For in-memory access, no need to concern endianness. The code units and code points are represented by CPU's endianness.\n    For streaming, use UTF16LE and UTF16BE, which handle endianness.\n*/\ntemplate<typename CharType = wchar_t>\nstruct UTF16 {\n    typedef CharType Ch;\n    RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >= 2);\n\n    enum { supportUnicode = 1 };\n\n    template<typename OutputStream>\n    static void Encode(OutputStream& os, unsigned codepoint) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2);\n        if (codepoint <= 0xFFFF) {\n            RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair \n            os.Put(static_cast<typename OutputStream::Ch>(codepoint));\n        }\n        else {\n            RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);\n            unsigned v = codepoint - 0x10000;\n            os.Put(static_cast<typename OutputStream::Ch>((v >> 10) | 0xD800));\n            os.Put(static_cast<typename OutputStream::Ch>((v & 0x3FF) | 0xDC00));\n        }\n    }\n\n\n    template<typename OutputStream>\n    static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2);\n        if (codepoint <= 0xFFFF) {\n            RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair \n            PutUnsafe(os, static_cast<typename OutputStream::Ch>(codepoint));\n        }\n        else {\n            RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);\n            unsigned v = codepoint - 0x10000;\n            PutUnsafe(os, static_cast<typename OutputStream::Ch>((v >> 10) | 0xD800));\n            PutUnsafe(os, static_cast<typename OutputStream::Ch>((v & 0x3FF) | 0xDC00));\n        }\n    }\n\n    template <typename InputStream>\n    static bool Decode(InputStream& is, unsigned* codepoint) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 2);\n        typename InputStream::Ch c = is.Take();\n        if (c < 0xD800 || c > 0xDFFF) {\n            *codepoint = static_cast<unsigned>(c);\n            return true;\n        }\n        else if (c <= 0xDBFF) {\n            *codepoint = (static_cast<unsigned>(c) & 0x3FF) << 10;\n            c = is.Take();\n            *codepoint |= (static_cast<unsigned>(c) & 0x3FF);\n            *codepoint += 0x10000;\n            return c >= 0xDC00 && c <= 0xDFFF;\n        }\n        return false;\n    }\n\n    template <typename InputStream, typename OutputStream>\n    static bool Validate(InputStream& is, OutputStream& os) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 2);\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2);\n        typename InputStream::Ch c;\n        os.Put(static_cast<typename OutputStream::Ch>(c = is.Take()));\n        if (c < 0xD800 || c > 0xDFFF)\n            return true;\n        else if (c <= 0xDBFF) {\n            os.Put(c = is.Take());\n            return c >= 0xDC00 && c <= 0xDFFF;\n        }\n        return false;\n    }\n};\n\n//! UTF-16 little endian encoding.\ntemplate<typename CharType = wchar_t>\nstruct UTF16LE : UTF16<CharType> {\n    template <typename InputByteStream>\n    static CharType TakeBOM(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        CharType c = Take(is);\n        return static_cast<uint16_t>(c) == 0xFEFFu ? Take(is) : c;\n    }\n\n    template <typename InputByteStream>\n    static CharType Take(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        unsigned c = static_cast<uint8_t>(is.Take());\n        c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;\n        return static_cast<CharType>(c);\n    }\n\n    template <typename OutputByteStream>\n    static void PutBOM(OutputByteStream& os) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));\n    }\n\n    template <typename OutputByteStream>\n    static void Put(OutputByteStream& os, CharType c) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>(static_cast<unsigned>(c) & 0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>((static_cast<unsigned>(c) >> 8) & 0xFFu));\n    }\n};\n\n//! UTF-16 big endian encoding.\ntemplate<typename CharType = wchar_t>\nstruct UTF16BE : UTF16<CharType> {\n    template <typename InputByteStream>\n    static CharType TakeBOM(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        CharType c = Take(is);\n        return static_cast<uint16_t>(c) == 0xFEFFu ? Take(is) : c;\n    }\n\n    template <typename InputByteStream>\n    static CharType Take(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        unsigned c = static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;\n        c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take()));\n        return static_cast<CharType>(c);\n    }\n\n    template <typename OutputByteStream>\n    static void PutBOM(OutputByteStream& os) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));\n    }\n\n    template <typename OutputByteStream>\n    static void Put(OutputByteStream& os, CharType c) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>((static_cast<unsigned>(c) >> 8) & 0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>(static_cast<unsigned>(c) & 0xFFu));\n    }\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// UTF32\n\n//! UTF-32 encoding. \n/*! http://en.wikipedia.org/wiki/UTF-32\n    \\tparam CharType Type for storing 32-bit UTF-32 data. Default is unsigned. C++11 may use char32_t instead.\n    \\note implements Encoding concept\n\n    \\note For in-memory access, no need to concern endianness. The code units and code points are represented by CPU's endianness.\n    For streaming, use UTF32LE and UTF32BE, which handle endianness.\n*/\ntemplate<typename CharType = unsigned>\nstruct UTF32 {\n    typedef CharType Ch;\n    RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >= 4);\n\n    enum { supportUnicode = 1 };\n\n    template<typename OutputStream>\n    static void Encode(OutputStream& os, unsigned codepoint) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 4);\n        RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);\n        os.Put(codepoint);\n    }\n\n    template<typename OutputStream>\n    static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 4);\n        RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);\n        PutUnsafe(os, codepoint);\n    }\n\n    template <typename InputStream>\n    static bool Decode(InputStream& is, unsigned* codepoint) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 4);\n        Ch c = is.Take();\n        *codepoint = c;\n        return c <= 0x10FFFF;\n    }\n\n    template <typename InputStream, typename OutputStream>\n    static bool Validate(InputStream& is, OutputStream& os) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 4);\n        Ch c;\n        os.Put(c = is.Take());\n        return c <= 0x10FFFF;\n    }\n};\n\n//! UTF-32 little endian enocoding.\ntemplate<typename CharType = unsigned>\nstruct UTF32LE : UTF32<CharType> {\n    template <typename InputByteStream>\n    static CharType TakeBOM(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        CharType c = Take(is);\n        return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c;\n    }\n\n    template <typename InputByteStream>\n    static CharType Take(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        unsigned c = static_cast<uint8_t>(is.Take());\n        c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;\n        c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 16;\n        c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 24;\n        return static_cast<CharType>(c);\n    }\n\n    template <typename OutputByteStream>\n    static void PutBOM(OutputByteStream& os) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));\n    }\n\n    template <typename OutputByteStream>\n    static void Put(OutputByteStream& os, CharType c) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>(c & 0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>((c >> 8) & 0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>((c >> 16) & 0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>((c >> 24) & 0xFFu));\n    }\n};\n\n//! UTF-32 big endian encoding.\ntemplate<typename CharType = unsigned>\nstruct UTF32BE : UTF32<CharType> {\n    template <typename InputByteStream>\n    static CharType TakeBOM(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        CharType c = Take(is);\n        return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c; \n    }\n\n    template <typename InputByteStream>\n    static CharType Take(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        unsigned c = static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 24;\n        c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 16;\n        c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;\n        c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take()));\n        return static_cast<CharType>(c);\n    }\n\n    template <typename OutputByteStream>\n    static void PutBOM(OutputByteStream& os) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));\n        os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));\n    }\n\n    template <typename OutputByteStream>\n    static void Put(OutputByteStream& os, CharType c) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>((c >> 24) & 0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>((c >> 16) & 0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>((c >> 8) & 0xFFu));\n        os.Put(static_cast<typename OutputByteStream::Ch>(c & 0xFFu));\n    }\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// ASCII\n\n//! ASCII encoding.\n/*! http://en.wikipedia.org/wiki/ASCII\n    \\tparam CharType Code unit for storing 7-bit ASCII data. Default is char.\n    \\note implements Encoding concept\n*/\ntemplate<typename CharType = char>\nstruct ASCII {\n    typedef CharType Ch;\n\n    enum { supportUnicode = 0 };\n\n    template<typename OutputStream>\n    static void Encode(OutputStream& os, unsigned codepoint) {\n        RAPIDJSON_ASSERT(codepoint <= 0x7F);\n        os.Put(static_cast<Ch>(codepoint & 0xFF));\n    }\n\n    template<typename OutputStream>\n    static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {\n        RAPIDJSON_ASSERT(codepoint <= 0x7F);\n        PutUnsafe(os, static_cast<Ch>(codepoint & 0xFF));\n    }\n\n    template <typename InputStream>\n    static bool Decode(InputStream& is, unsigned* codepoint) {\n        uint8_t c = static_cast<uint8_t>(is.Take());\n        *codepoint = c;\n        return c <= 0X7F;\n    }\n\n    template <typename InputStream, typename OutputStream>\n    static bool Validate(InputStream& is, OutputStream& os) {\n        uint8_t c = static_cast<uint8_t>(is.Take());\n        os.Put(static_cast<typename OutputStream::Ch>(c));\n        return c <= 0x7F;\n    }\n\n    template <typename InputByteStream>\n    static CharType TakeBOM(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        uint8_t c = static_cast<uint8_t>(Take(is));\n        return static_cast<Ch>(c);\n    }\n\n    template <typename InputByteStream>\n    static Ch Take(InputByteStream& is) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);\n        return static_cast<Ch>(is.Take());\n    }\n\n    template <typename OutputByteStream>\n    static void PutBOM(OutputByteStream& os) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        (void)os;\n    }\n\n    template <typename OutputByteStream>\n    static void Put(OutputByteStream& os, Ch c) {\n        RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);\n        os.Put(static_cast<typename OutputByteStream::Ch>(c));\n    }\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// AutoUTF\n\n//! Runtime-specified UTF encoding type of a stream.\nenum UTFType {\n    kUTF8 = 0,      //!< UTF-8.\n    kUTF16LE = 1,   //!< UTF-16 little endian.\n    kUTF16BE = 2,   //!< UTF-16 big endian.\n    kUTF32LE = 3,   //!< UTF-32 little endian.\n    kUTF32BE = 4    //!< UTF-32 big endian.\n};\n\n//! Dynamically select encoding according to stream's runtime-specified UTF encoding type.\n/*! \\note This class can be used with AutoUTFInputtStream and AutoUTFOutputStream, which provides GetType().\n*/\ntemplate<typename CharType>\nstruct AutoUTF {\n    typedef CharType Ch;\n\n    enum { supportUnicode = 1 };\n\n#define RAPIDJSON_ENCODINGS_FUNC(x) UTF8<Ch>::x, UTF16LE<Ch>::x, UTF16BE<Ch>::x, UTF32LE<Ch>::x, UTF32BE<Ch>::x\n\n    template<typename OutputStream>\n    static RAPIDJSON_FORCEINLINE void Encode(OutputStream& os, unsigned codepoint) {\n        typedef void (*EncodeFunc)(OutputStream&, unsigned);\n        static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Encode) };\n        (*f[os.GetType()])(os, codepoint);\n    }\n\n    template<typename OutputStream>\n    static RAPIDJSON_FORCEINLINE void EncodeUnsafe(OutputStream& os, unsigned codepoint) {\n        typedef void (*EncodeFunc)(OutputStream&, unsigned);\n        static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(EncodeUnsafe) };\n        (*f[os.GetType()])(os, codepoint);\n    }\n\n    template <typename InputStream>\n    static RAPIDJSON_FORCEINLINE bool Decode(InputStream& is, unsigned* codepoint) {\n        typedef bool (*DecodeFunc)(InputStream&, unsigned*);\n        static const DecodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Decode) };\n        return (*f[is.GetType()])(is, codepoint);\n    }\n\n    template <typename InputStream, typename OutputStream>\n    static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) {\n        typedef bool (*ValidateFunc)(InputStream&, OutputStream&);\n        static const ValidateFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Validate) };\n        return (*f[is.GetType()])(is, os);\n    }\n\n#undef RAPIDJSON_ENCODINGS_FUNC\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// Transcoder\n\n//! Encoding conversion.\ntemplate<typename SourceEncoding, typename TargetEncoding>\nstruct Transcoder {\n    //! Take one Unicode codepoint from source encoding, convert it to target encoding and put it to the output stream.\n    template<typename InputStream, typename OutputStream>\n    static RAPIDJSON_FORCEINLINE bool Transcode(InputStream& is, OutputStream& os) {\n        unsigned codepoint;\n        if (!SourceEncoding::Decode(is, &codepoint))\n            return false;\n        TargetEncoding::Encode(os, codepoint);\n        return true;\n    }\n\n    template<typename InputStream, typename OutputStream>\n    static RAPIDJSON_FORCEINLINE bool TranscodeUnsafe(InputStream& is, OutputStream& os) {\n        unsigned codepoint;\n        if (!SourceEncoding::Decode(is, &codepoint))\n            return false;\n        TargetEncoding::EncodeUnsafe(os, codepoint);\n        return true;\n    }\n\n    //! Validate one Unicode codepoint from an encoded stream.\n    template<typename InputStream, typename OutputStream>\n    static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) {\n        return Transcode(is, os);   // Since source/target encoding is different, must transcode.\n    }\n};\n\n// Forward declaration.\ntemplate<typename Stream>\ninline void PutUnsafe(Stream& stream, typename Stream::Ch c);\n\n//! Specialization of Transcoder with same source and target encoding.\ntemplate<typename Encoding>\nstruct Transcoder<Encoding, Encoding> {\n    template<typename InputStream, typename OutputStream>\n    static RAPIDJSON_FORCEINLINE bool Transcode(InputStream& is, OutputStream& os) {\n        os.Put(is.Take());  // Just copy one code unit. This semantic is different from primary template class.\n        return true;\n    }\n    \n    template<typename InputStream, typename OutputStream>\n    static RAPIDJSON_FORCEINLINE bool TranscodeUnsafe(InputStream& is, OutputStream& os) {\n        PutUnsafe(os, is.Take());  // Just copy one code unit. This semantic is different from primary template class.\n        return true;\n    }\n    \n    template<typename InputStream, typename OutputStream>\n    static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) {\n        return Encoding::Validate(is, os);  // source/target encoding are the same\n    }\n};\n\nRAPIDJSON_NAMESPACE_END\n\n#if defined(__GNUC__) || (defined(_MSC_VER) && !defined(__clang__))\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_ENCODINGS_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/error/en.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_ERROR_EN_H_\n#define RAPIDJSON_ERROR_EN_H_\n\n#include \"error.h\"\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(switch-enum)\nRAPIDJSON_DIAG_OFF(covered-switch-default)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Maps error code of parsing into error message.\n/*!\n    \\ingroup RAPIDJSON_ERRORS\n    \\param parseErrorCode Error code obtained in parsing.\n    \\return the error message.\n    \\note User can make a copy of this function for localization.\n        Using switch-case is safer for future modification of error codes.\n*/\ninline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErrorCode) {\n    switch (parseErrorCode) {\n        case kParseErrorNone:                           return RAPIDJSON_ERROR_STRING(\"No error.\");\n\n        case kParseErrorDocumentEmpty:                  return RAPIDJSON_ERROR_STRING(\"The document is empty.\");\n        case kParseErrorDocumentRootNotSingular:        return RAPIDJSON_ERROR_STRING(\"The document root must not be followed by other values.\");\n    \n        case kParseErrorValueInvalid:                   return RAPIDJSON_ERROR_STRING(\"Invalid value.\");\n    \n        case kParseErrorObjectMissName:                 return RAPIDJSON_ERROR_STRING(\"Missing a name for object member.\");\n        case kParseErrorObjectMissColon:                return RAPIDJSON_ERROR_STRING(\"Missing a colon after a name of object member.\");\n        case kParseErrorObjectMissCommaOrCurlyBracket:  return RAPIDJSON_ERROR_STRING(\"Missing a comma or '}' after an object member.\");\n    \n        case kParseErrorArrayMissCommaOrSquareBracket:  return RAPIDJSON_ERROR_STRING(\"Missing a comma or ']' after an array element.\");\n\n        case kParseErrorStringUnicodeEscapeInvalidHex:  return RAPIDJSON_ERROR_STRING(\"Incorrect hex digit after \\\\u escape in string.\");\n        case kParseErrorStringUnicodeSurrogateInvalid:  return RAPIDJSON_ERROR_STRING(\"The surrogate pair in string is invalid.\");\n        case kParseErrorStringEscapeInvalid:            return RAPIDJSON_ERROR_STRING(\"Invalid escape character in string.\");\n        case kParseErrorStringMissQuotationMark:        return RAPIDJSON_ERROR_STRING(\"Missing a closing quotation mark in string.\");\n        case kParseErrorStringInvalidEncoding:          return RAPIDJSON_ERROR_STRING(\"Invalid encoding in string.\");\n\n        case kParseErrorNumberTooBig:                   return RAPIDJSON_ERROR_STRING(\"Number too big to be stored in double.\");\n        case kParseErrorNumberMissFraction:             return RAPIDJSON_ERROR_STRING(\"Miss fraction part in number.\");\n        case kParseErrorNumberMissExponent:             return RAPIDJSON_ERROR_STRING(\"Miss exponent in number.\");\n\n        case kParseErrorTermination:                    return RAPIDJSON_ERROR_STRING(\"Terminate parsing due to Handler error.\");\n        case kParseErrorUnspecificSyntaxError:          return RAPIDJSON_ERROR_STRING(\"Unspecific syntax error.\");\n\n        default:                                        return RAPIDJSON_ERROR_STRING(\"Unknown error.\");\n    }\n}\n\nRAPIDJSON_NAMESPACE_END\n\n#ifdef __clang__\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_ERROR_EN_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/error/error.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_ERROR_ERROR_H_\n#define RAPIDJSON_ERROR_ERROR_H_\n\n#include \"../rapidjson.h\"\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(padded)\n#endif\n\n/*! \\file error.h */\n\n/*! \\defgroup RAPIDJSON_ERRORS RapidJSON error handling */\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_ERROR_CHARTYPE\n\n//! Character type of error messages.\n/*! \\ingroup RAPIDJSON_ERRORS\n    The default character type is \\c char.\n    On Windows, user can define this macro as \\c TCHAR for supporting both\n    unicode/non-unicode settings.\n*/\n#ifndef RAPIDJSON_ERROR_CHARTYPE\n#define RAPIDJSON_ERROR_CHARTYPE char\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_ERROR_STRING\n\n//! Macro for converting string literial to \\ref RAPIDJSON_ERROR_CHARTYPE[].\n/*! \\ingroup RAPIDJSON_ERRORS\n    By default this conversion macro does nothing.\n    On Windows, user can define this macro as \\c _T(x) for supporting both\n    unicode/non-unicode settings.\n*/\n#ifndef RAPIDJSON_ERROR_STRING\n#define RAPIDJSON_ERROR_STRING(x) x\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n///////////////////////////////////////////////////////////////////////////////\n// ParseErrorCode\n\n//! Error code of parsing.\n/*! \\ingroup RAPIDJSON_ERRORS\n    \\see GenericReader::Parse, GenericReader::GetParseErrorCode\n*/\nenum ParseErrorCode {\n    kParseErrorNone = 0,                        //!< No error.\n\n    kParseErrorDocumentEmpty,                   //!< The document is empty.\n    kParseErrorDocumentRootNotSingular,         //!< The document root must not follow by other values.\n\n    kParseErrorValueInvalid,                    //!< Invalid value.\n\n    kParseErrorObjectMissName,                  //!< Missing a name for object member.\n    kParseErrorObjectMissColon,                 //!< Missing a colon after a name of object member.\n    kParseErrorObjectMissCommaOrCurlyBracket,   //!< Missing a comma or '}' after an object member.\n\n    kParseErrorArrayMissCommaOrSquareBracket,   //!< Missing a comma or ']' after an array element.\n\n    kParseErrorStringUnicodeEscapeInvalidHex,   //!< Incorrect hex digit after \\\\u escape in string.\n    kParseErrorStringUnicodeSurrogateInvalid,   //!< The surrogate pair in string is invalid.\n    kParseErrorStringEscapeInvalid,             //!< Invalid escape character in string.\n    kParseErrorStringMissQuotationMark,         //!< Missing a closing quotation mark in string.\n    kParseErrorStringInvalidEncoding,           //!< Invalid encoding in string.\n\n    kParseErrorNumberTooBig,                    //!< Number too big to be stored in double.\n    kParseErrorNumberMissFraction,              //!< Miss fraction part in number.\n    kParseErrorNumberMissExponent,              //!< Miss exponent in number.\n\n    kParseErrorTermination,                     //!< Parsing was terminated.\n    kParseErrorUnspecificSyntaxError            //!< Unspecific syntax error.\n};\n\n//! Result of parsing (wraps ParseErrorCode)\n/*!\n    \\ingroup RAPIDJSON_ERRORS\n    \\code\n        Document doc;\n        ParseResult ok = doc.Parse(\"[42]\");\n        if (!ok) {\n            fprintf(stderr, \"JSON parse error: %s (%u)\",\n                    GetParseError_En(ok.Code()), ok.Offset());\n            exit(EXIT_FAILURE);\n        }\n    \\endcode\n    \\see GenericReader::Parse, GenericDocument::Parse\n*/\nstruct ParseResult {\n    //!! Unspecified boolean type\n    typedef bool (ParseResult::*BooleanType)() const;\npublic:\n    //! Default constructor, no error.\n    ParseResult() : code_(kParseErrorNone), offset_(0) {}\n    //! Constructor to set an error.\n    ParseResult(ParseErrorCode code, size_t offset) : code_(code), offset_(offset) {}\n\n    //! Get the error code.\n    ParseErrorCode Code() const { return code_; }\n    //! Get the error offset, if \\ref IsError(), 0 otherwise.\n    size_t Offset() const { return offset_; }\n\n    //! Explicit conversion to \\c bool, returns \\c true, iff !\\ref IsError().\n    operator BooleanType() const { return !IsError() ? &ParseResult::IsError : NULL; }\n    //! Whether the result is an error.\n    bool IsError() const { return code_ != kParseErrorNone; }\n\n    bool operator==(const ParseResult& that) const { return code_ == that.code_; }\n    bool operator==(ParseErrorCode code) const { return code_ == code; }\n    friend bool operator==(ParseErrorCode code, const ParseResult & err) { return code == err.code_; }\n\n    bool operator!=(const ParseResult& that) const { return !(*this == that); }\n    bool operator!=(ParseErrorCode code) const { return !(*this == code); }\n    friend bool operator!=(ParseErrorCode code, const ParseResult & err) { return err != code; }\n\n    //! Reset error code.\n    void Clear() { Set(kParseErrorNone); }\n    //! Update error code and offset.\n    void Set(ParseErrorCode code, size_t offset = 0) { code_ = code; offset_ = offset; }\n\nprivate:\n    ParseErrorCode code_;\n    size_t offset_;\n};\n\n//! Function pointer type of GetParseError().\n/*! \\ingroup RAPIDJSON_ERRORS\n\n    This is the prototype for \\c GetParseError_X(), where \\c X is a locale.\n    User can dynamically change locale in runtime, e.g.:\n\\code\n    GetParseErrorFunc GetParseError = GetParseError_En; // or whatever\n    const RAPIDJSON_ERROR_CHARTYPE* s = GetParseError(document.GetParseErrorCode());\n\\endcode\n*/\ntypedef const RAPIDJSON_ERROR_CHARTYPE* (*GetParseErrorFunc)(ParseErrorCode);\n\nRAPIDJSON_NAMESPACE_END\n\n#ifdef __clang__\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_ERROR_ERROR_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/filereadstream.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_FILEREADSTREAM_H_\n#define RAPIDJSON_FILEREADSTREAM_H_\n\n#include \"stream.h\"\n#include <cstdio>\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(padded)\nRAPIDJSON_DIAG_OFF(unreachable-code)\nRAPIDJSON_DIAG_OFF(missing-noreturn)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! File byte stream for input using fread().\n/*!\n    \\note implements Stream concept\n*/\nclass FileReadStream {\npublic:\n    typedef char Ch;    //!< Character type (byte).\n\n    //! Constructor.\n    /*!\n        \\param fp File pointer opened for read.\n        \\param buffer user-supplied buffer.\n        \\param bufferSize size of buffer in bytes. Must >=4 bytes.\n    */\n    FileReadStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferSize_(bufferSize), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) { \n        RAPIDJSON_ASSERT(fp_ != 0);\n        RAPIDJSON_ASSERT(bufferSize >= 4);\n        Read();\n    }\n\n    Ch Peek() const { return *current_; }\n    Ch Take() { Ch c = *current_; Read(); return c; }\n    size_t Tell() const { return count_ + static_cast<size_t>(current_ - buffer_); }\n\n    // Not implemented\n    void Put(Ch) { RAPIDJSON_ASSERT(false); }\n    void Flush() { RAPIDJSON_ASSERT(false); } \n    Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }\n\n    // For encoding detection only.\n    const Ch* Peek4() const {\n        return (current_ + 4 - !eof_ <= bufferLast_) ? current_ : 0;\n    }\n\nprivate:\n    void Read() {\n        if (current_ < bufferLast_)\n            ++current_;\n        else if (!eof_) {\n            count_ += readCount_;\n            readCount_ = std::fread(buffer_, 1, bufferSize_, fp_);\n            bufferLast_ = buffer_ + readCount_ - 1;\n            current_ = buffer_;\n\n            if (readCount_ < bufferSize_) {\n                buffer_[readCount_] = '\\0';\n                ++bufferLast_;\n                eof_ = true;\n            }\n        }\n    }\n\n    std::FILE* fp_;\n    Ch *buffer_;\n    size_t bufferSize_;\n    Ch *bufferLast_;\n    Ch *current_;\n    size_t readCount_;\n    size_t count_;  //!< Number of characters read\n    bool eof_;\n};\n\nRAPIDJSON_NAMESPACE_END\n\n#ifdef __clang__\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_FILESTREAM_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/filewritestream.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_FILEWRITESTREAM_H_\n#define RAPIDJSON_FILEWRITESTREAM_H_\n\n#include \"stream.h\"\n#include <cstdio>\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(unreachable-code)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Wrapper of C file stream for output using fwrite().\n/*!\n    \\note implements Stream concept\n*/\nclass FileWriteStream {\npublic:\n    typedef char Ch;    //!< Character type. Only support char.\n\n    FileWriteStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferEnd_(buffer + bufferSize), current_(buffer_) { \n        RAPIDJSON_ASSERT(fp_ != 0);\n    }\n\n    void Put(char c) { \n        if (current_ >= bufferEnd_)\n            Flush();\n\n        *current_++ = c;\n    }\n\n    void PutN(char c, size_t n) {\n        size_t avail = static_cast<size_t>(bufferEnd_ - current_);\n        while (n > avail) {\n            std::memset(current_, c, avail);\n            current_ += avail;\n            Flush();\n            n -= avail;\n            avail = static_cast<size_t>(bufferEnd_ - current_);\n        }\n\n        if (n > 0) {\n            std::memset(current_, c, n);\n            current_ += n;\n        }\n    }\n\n    void Flush() {\n        if (current_ != buffer_) {\n            size_t result = std::fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_);\n            if (result < static_cast<size_t>(current_ - buffer_)) {\n                // failure deliberately ignored at this time\n                // added to avoid warn_unused_result build errors\n            }\n            current_ = buffer_;\n        }\n    }\n\n    // Not implemented\n    char Peek() const { RAPIDJSON_ASSERT(false); return 0; }\n    char Take() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }\n    char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; }\n\nprivate:\n    // Prohibit copy constructor & assignment operator.\n    FileWriteStream(const FileWriteStream&);\n    FileWriteStream& operator=(const FileWriteStream&);\n\n    std::FILE* fp_;\n    char *buffer_;\n    char *bufferEnd_;\n    char *current_;\n};\n\n//! Implement specialized version of PutN() with memset() for better performance.\ntemplate<>\ninline void PutN(FileWriteStream& stream, char c, size_t n) {\n    stream.PutN(c, n);\n}\n\nRAPIDJSON_NAMESPACE_END\n\n#ifdef __clang__\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_FILESTREAM_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/fwd.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_FWD_H_\n#define RAPIDJSON_FWD_H_\n\n#include \"rapidjson.h\"\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n// encodings.h\n\ntemplate<typename CharType> struct UTF8;\ntemplate<typename CharType> struct UTF16;\ntemplate<typename CharType> struct UTF16BE;\ntemplate<typename CharType> struct UTF16LE;\ntemplate<typename CharType> struct UTF32;\ntemplate<typename CharType> struct UTF32BE;\ntemplate<typename CharType> struct UTF32LE;\ntemplate<typename CharType> struct ASCII;\ntemplate<typename CharType> struct AutoUTF;\n\ntemplate<typename SourceEncoding, typename TargetEncoding>\nstruct Transcoder;\n\n// allocators.h\n\nclass CrtAllocator;\n\ntemplate <typename BaseAllocator>\nclass MemoryPoolAllocator;\n\n// stream.h\n\ntemplate <typename Encoding>\nstruct GenericStringStream;\n\ntypedef GenericStringStream<UTF8<char> > StringStream;\n\ntemplate <typename Encoding>\nstruct GenericInsituStringStream;\n\ntypedef GenericInsituStringStream<UTF8<char> > InsituStringStream;\n\n// stringbuffer.h\n\ntemplate <typename Encoding, typename Allocator>\nclass GenericStringBuffer;\n\ntypedef GenericStringBuffer<UTF8<char>, CrtAllocator> StringBuffer;\n\n// filereadstream.h\n\nclass FileReadStream;\n\n// filewritestream.h\n\nclass FileWriteStream;\n\n// memorybuffer.h\n\ntemplate <typename Allocator>\nstruct GenericMemoryBuffer;\n\ntypedef GenericMemoryBuffer<CrtAllocator> MemoryBuffer;\n\n// memorystream.h\n\nstruct MemoryStream;\n\n// reader.h\n\ntemplate<typename Encoding, typename Derived>\nstruct BaseReaderHandler;\n\ntemplate <typename SourceEncoding, typename TargetEncoding, typename StackAllocator>\nclass GenericReader;\n\ntypedef GenericReader<UTF8<char>, UTF8<char>, CrtAllocator> Reader;\n\n// writer.h\n\ntemplate<typename OutputStream, typename SourceEncoding, typename TargetEncoding, typename StackAllocator, unsigned writeFlags>\nclass Writer;\n\n// prettywriter.h\n\ntemplate<typename OutputStream, typename SourceEncoding, typename TargetEncoding, typename StackAllocator, unsigned writeFlags>\nclass PrettyWriter;\n\n// document.h\n\ntemplate <typename Encoding, typename Allocator> \nclass GenericMember;\n\ntemplate <bool Const, typename Encoding, typename Allocator>\nclass GenericMemberIterator;\n\ntemplate<typename CharType>\nstruct GenericStringRef;\n\ntemplate <typename Encoding, typename Allocator> \nclass GenericValue;\n\ntypedef GenericValue<UTF8<char>, MemoryPoolAllocator<CrtAllocator> > Value;\n\ntemplate <typename Encoding, typename Allocator, typename StackAllocator>\nclass GenericDocument;\n\ntypedef GenericDocument<UTF8<char>, MemoryPoolAllocator<CrtAllocator>, CrtAllocator> Document;\n\n// pointer.h\n\ntemplate <typename ValueType, typename Allocator>\nclass GenericPointer;\n\ntypedef GenericPointer<Value, CrtAllocator> Pointer;\n\n// schema.h\n\ntemplate <typename SchemaDocumentType>\nclass IGenericRemoteSchemaDocumentProvider;\n\ntemplate <typename ValueT, typename Allocator>\nclass GenericSchemaDocument;\n\ntypedef GenericSchemaDocument<Value, CrtAllocator> SchemaDocument;\ntypedef IGenericRemoteSchemaDocumentProvider<SchemaDocument> IRemoteSchemaDocumentProvider;\n\ntemplate <\n    typename SchemaDocumentType,\n    typename OutputHandler,\n    typename StateAllocator>\nclass GenericSchemaValidator;\n\ntypedef GenericSchemaValidator<SchemaDocument, BaseReaderHandler<UTF8<char>, void>, CrtAllocator> SchemaValidator;\n\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_RAPIDJSONFWD_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/biginteger.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_BIGINTEGER_H_\n#define RAPIDJSON_BIGINTEGER_H_\n\n#include \"../rapidjson.h\"\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_M_AMD64)\n#include <intrin.h> // for _umul128\n#pragma intrinsic(_umul128)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\nclass BigInteger {\npublic:\n    typedef uint64_t Type;\n\n    BigInteger(const BigInteger& rhs) : count_(rhs.count_) {\n        std::memcpy(digits_, rhs.digits_, count_ * sizeof(Type));\n    }\n\n    explicit BigInteger(uint64_t u) : count_(1) {\n        digits_[0] = u;\n    }\n\n    BigInteger(const char* decimals, size_t length) : count_(1) {\n        RAPIDJSON_ASSERT(length > 0);\n        digits_[0] = 0;\n        size_t i = 0;\n        const size_t kMaxDigitPerIteration = 19;  // 2^64 = 18446744073709551616 > 10^19\n        while (length >= kMaxDigitPerIteration) {\n            AppendDecimal64(decimals + i, decimals + i + kMaxDigitPerIteration);\n            length -= kMaxDigitPerIteration;\n            i += kMaxDigitPerIteration;\n        }\n\n        if (length > 0)\n            AppendDecimal64(decimals + i, decimals + i + length);\n    }\n    \n    BigInteger& operator=(const BigInteger &rhs)\n    {\n        if (this != &rhs) {\n            count_ = rhs.count_;\n            std::memcpy(digits_, rhs.digits_, count_ * sizeof(Type));\n        }\n        return *this;\n    }\n    \n    BigInteger& operator=(uint64_t u) {\n        digits_[0] = u;            \n        count_ = 1;\n        return *this;\n    }\n\n    BigInteger& operator+=(uint64_t u) {\n        Type backup = digits_[0];\n        digits_[0] += u;\n        for (size_t i = 0; i < count_ - 1; i++) {\n            if (digits_[i] >= backup)\n                return *this; // no carry\n            backup = digits_[i + 1];\n            digits_[i + 1] += 1;\n        }\n\n        // Last carry\n        if (digits_[count_ - 1] < backup)\n            PushBack(1);\n\n        return *this;\n    }\n\n    BigInteger& operator*=(uint64_t u) {\n        if (u == 0) return *this = 0;\n        if (u == 1) return *this;\n        if (*this == 1) return *this = u;\n\n        uint64_t k = 0;\n        for (size_t i = 0; i < count_; i++) {\n            uint64_t hi;\n            digits_[i] = MulAdd64(digits_[i], u, k, &hi);\n            k = hi;\n        }\n        \n        if (k > 0)\n            PushBack(k);\n\n        return *this;\n    }\n\n    BigInteger& operator*=(uint32_t u) {\n        if (u == 0) return *this = 0;\n        if (u == 1) return *this;\n        if (*this == 1) return *this = u;\n\n        uint64_t k = 0;\n        for (size_t i = 0; i < count_; i++) {\n            const uint64_t c = digits_[i] >> 32;\n            const uint64_t d = digits_[i] & 0xFFFFFFFF;\n            const uint64_t uc = u * c;\n            const uint64_t ud = u * d;\n            const uint64_t p0 = ud + k;\n            const uint64_t p1 = uc + (p0 >> 32);\n            digits_[i] = (p0 & 0xFFFFFFFF) | (p1 << 32);\n            k = p1 >> 32;\n        }\n        \n        if (k > 0)\n            PushBack(k);\n\n        return *this;\n    }\n\n    BigInteger& operator<<=(size_t shift) {\n        if (IsZero() || shift == 0) return *this;\n\n        size_t offset = shift / kTypeBit;\n        size_t interShift = shift % kTypeBit;\n        RAPIDJSON_ASSERT(count_ + offset <= kCapacity);\n\n        if (interShift == 0) {\n            std::memmove(digits_ + offset, digits_, count_ * sizeof(Type));\n            count_ += offset;\n        }\n        else {\n            digits_[count_] = 0;\n            for (size_t i = count_; i > 0; i--)\n                digits_[i + offset] = (digits_[i] << interShift) | (digits_[i - 1] >> (kTypeBit - interShift));\n            digits_[offset] = digits_[0] << interShift;\n            count_ += offset;\n            if (digits_[count_])\n                count_++;\n        }\n\n        std::memset(digits_, 0, offset * sizeof(Type));\n\n        return *this;\n    }\n\n    bool operator==(const BigInteger& rhs) const {\n        return count_ == rhs.count_ && std::memcmp(digits_, rhs.digits_, count_ * sizeof(Type)) == 0;\n    }\n\n    bool operator==(const Type rhs) const {\n        return count_ == 1 && digits_[0] == rhs;\n    }\n\n    BigInteger& MultiplyPow5(unsigned exp) {\n        static const uint32_t kPow5[12] = {\n            5,\n            5 * 5,\n            5 * 5 * 5,\n            5 * 5 * 5 * 5,\n            5 * 5 * 5 * 5 * 5,\n            5 * 5 * 5 * 5 * 5 * 5,\n            5 * 5 * 5 * 5 * 5 * 5 * 5,\n            5 * 5 * 5 * 5 * 5 * 5 * 5 * 5,\n            5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5,\n            5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5,\n            5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5,\n            5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5\n        };\n        if (exp == 0) return *this;\n        for (; exp >= 27; exp -= 27) *this *= RAPIDJSON_UINT64_C2(0X6765C793, 0XFA10079D); // 5^27\n        for (; exp >= 13; exp -= 13) *this *= static_cast<uint32_t>(1220703125u); // 5^13\n        if (exp > 0)                 *this *= kPow5[exp - 1];\n        return *this;\n    }\n\n    // Compute absolute difference of this and rhs.\n    // Assume this != rhs\n    bool Difference(const BigInteger& rhs, BigInteger* out) const {\n        int cmp = Compare(rhs);\n        RAPIDJSON_ASSERT(cmp != 0);\n        const BigInteger *a, *b;  // Makes a > b\n        bool ret;\n        if (cmp < 0) { a = &rhs; b = this; ret = true; }\n        else         { a = this; b = &rhs; ret = false; }\n\n        Type borrow = 0;\n        for (size_t i = 0; i < a->count_; i++) {\n            Type d = a->digits_[i] - borrow;\n            if (i < b->count_)\n                d -= b->digits_[i];\n            borrow = (d > a->digits_[i]) ? 1 : 0;\n            out->digits_[i] = d;\n            if (d != 0)\n                out->count_ = i + 1;\n        }\n\n        return ret;\n    }\n\n    int Compare(const BigInteger& rhs) const {\n        if (count_ != rhs.count_)\n            return count_ < rhs.count_ ? -1 : 1;\n\n        for (size_t i = count_; i-- > 0;)\n            if (digits_[i] != rhs.digits_[i])\n                return digits_[i] < rhs.digits_[i] ? -1 : 1;\n\n        return 0;\n    }\n\n    size_t GetCount() const { return count_; }\n    Type GetDigit(size_t index) const { RAPIDJSON_ASSERT(index < count_); return digits_[index]; }\n    bool IsZero() const { return count_ == 1 && digits_[0] == 0; }\n\nprivate:\n    void AppendDecimal64(const char* begin, const char* end) {\n        uint64_t u = ParseUint64(begin, end);\n        if (IsZero())\n            *this = u;\n        else {\n            unsigned exp = static_cast<unsigned>(end - begin);\n            (MultiplyPow5(exp) <<= exp) += u;   // *this = *this * 10^exp + u\n        }\n    }\n\n    void PushBack(Type digit) {\n        RAPIDJSON_ASSERT(count_ < kCapacity);\n        digits_[count_++] = digit;\n    }\n\n    static uint64_t ParseUint64(const char* begin, const char* end) {\n        uint64_t r = 0;\n        for (const char* p = begin; p != end; ++p) {\n            RAPIDJSON_ASSERT(*p >= '0' && *p <= '9');\n            r = r * 10u + static_cast<unsigned>(*p - '0');\n        }\n        return r;\n    }\n\n    // Assume a * b + k < 2^128\n    static uint64_t MulAdd64(uint64_t a, uint64_t b, uint64_t k, uint64_t* outHigh) {\n#if defined(_MSC_VER) && defined(_M_AMD64)\n        uint64_t low = _umul128(a, b, outHigh) + k;\n        if (low < k)\n            (*outHigh)++;\n        return low;\n#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__)\n        __extension__ typedef unsigned __int128 uint128;\n        uint128 p = static_cast<uint128>(a) * static_cast<uint128>(b);\n        p += k;\n        *outHigh = static_cast<uint64_t>(p >> 64);\n        return static_cast<uint64_t>(p);\n#else\n        const uint64_t a0 = a & 0xFFFFFFFF, a1 = a >> 32, b0 = b & 0xFFFFFFFF, b1 = b >> 32;\n        uint64_t x0 = a0 * b0, x1 = a0 * b1, x2 = a1 * b0, x3 = a1 * b1;\n        x1 += (x0 >> 32); // can't give carry\n        x1 += x2;\n        if (x1 < x2)\n            x3 += (static_cast<uint64_t>(1) << 32);\n        uint64_t lo = (x1 << 32) + (x0 & 0xFFFFFFFF);\n        uint64_t hi = x3 + (x1 >> 32);\n\n        lo += k;\n        if (lo < k)\n            hi++;\n        *outHigh = hi;\n        return lo;\n#endif\n    }\n\n    static const size_t kBitCount = 3328;  // 64bit * 54 > 10^1000\n    static const size_t kCapacity = kBitCount / sizeof(Type);\n    static const size_t kTypeBit = sizeof(Type) * 8;\n\n    Type digits_[kCapacity];\n    size_t count_;\n};\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_BIGINTEGER_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/clzll.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n//\n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed\n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_CLZLL_H_\n#define RAPIDJSON_CLZLL_H_\n\n#include \"../rapidjson.h\"\n\n#if defined(_MSC_VER)\n#include <intrin.h>\n#if defined(_WIN64)\n#pragma intrinsic(_BitScanReverse64)\n#else\n#pragma intrinsic(_BitScanReverse)\n#endif\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\ninline uint32_t clzll(uint64_t x) {\n    // Passing 0 to __builtin_clzll is UB in GCC and results in an\n    // infinite loop in the software implementation.\n    RAPIDJSON_ASSERT(x != 0);\n\n#if defined(_MSC_VER)\n    unsigned long r = 0;\n#if defined(_WIN64)\n    _BitScanReverse64(&r, x);\n#else\n    // Scan the high 32 bits.\n    if (_BitScanReverse(&r, static_cast<uint32_t>(x >> 32)))\n        return 63 - (r + 32);\n\n    // Scan the low 32 bits.\n    _BitScanReverse(&r, static_cast<uint32_t>(x & 0xFFFFFFFF));\n#endif // _WIN64\n\n    return 63 - r;\n#elif (defined(__GNUC__) && __GNUC__ >= 4) || RAPIDJSON_HAS_BUILTIN(__builtin_clzll)\n    // __builtin_clzll wrapper\n    return static_cast<uint32_t>(__builtin_clzll(x));\n#else\n    // naive version\n    uint32_t r;\n    while (!(x & (static_cast<uint64_t>(1) << 63))) {\n        x <<= 1;\n        ++r;\n    }\n\n    return r;\n#endif // _MSC_VER\n}\n\n#define RAPIDJSON_CLZLL RAPIDJSON_NAMESPACE::internal::clzll\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_CLZLL_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/diyfp.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n//\n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed\n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n\n// This is a C++ header-only implementation of Grisu2 algorithm from the publication:\n// Loitsch, Florian. \"Printing floating-point numbers quickly and accurately with\n// integers.\" ACM Sigplan Notices 45.6 (2010): 233-243.\n\n#ifndef RAPIDJSON_DIYFP_H_\n#define RAPIDJSON_DIYFP_H_\n\n#include \"../rapidjson.h\"\n#include \"clzll.h\"\n#include <limits>\n\n#if defined(_MSC_VER) && defined(_M_AMD64) && !defined(__INTEL_COMPILER)\n#include <intrin.h>\n#pragma intrinsic(_umul128)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(effc++)\n#endif\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(padded)\n#endif\n\nstruct DiyFp {\n    DiyFp() : f(), e() {}\n\n    DiyFp(uint64_t fp, int exp) : f(fp), e(exp) {}\n\n    explicit DiyFp(double d) {\n        union {\n            double d;\n            uint64_t u64;\n        } u = { d };\n\n        int biased_e = static_cast<int>((u.u64 & kDpExponentMask) >> kDpSignificandSize);\n        uint64_t significand = (u.u64 & kDpSignificandMask);\n        if (biased_e != 0) {\n            f = significand + kDpHiddenBit;\n            e = biased_e - kDpExponentBias;\n        }\n        else {\n            f = significand;\n            e = kDpMinExponent + 1;\n        }\n    }\n\n    DiyFp operator-(const DiyFp& rhs) const {\n        return DiyFp(f - rhs.f, e);\n    }\n\n    DiyFp operator*(const DiyFp& rhs) const {\n#if defined(_MSC_VER) && defined(_M_AMD64)\n        uint64_t h;\n        uint64_t l = _umul128(f, rhs.f, &h);\n        if (l & (uint64_t(1) << 63)) // rounding\n            h++;\n        return DiyFp(h, e + rhs.e + 64);\n#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__)\n        __extension__ typedef unsigned __int128 uint128;\n        uint128 p = static_cast<uint128>(f) * static_cast<uint128>(rhs.f);\n        uint64_t h = static_cast<uint64_t>(p >> 64);\n        uint64_t l = static_cast<uint64_t>(p);\n        if (l & (uint64_t(1) << 63)) // rounding\n            h++;\n        return DiyFp(h, e + rhs.e + 64);\n#else\n        const uint64_t M32 = 0xFFFFFFFF;\n        const uint64_t a = f >> 32;\n        const uint64_t b = f & M32;\n        const uint64_t c = rhs.f >> 32;\n        const uint64_t d = rhs.f & M32;\n        const uint64_t ac = a * c;\n        const uint64_t bc = b * c;\n        const uint64_t ad = a * d;\n        const uint64_t bd = b * d;\n        uint64_t tmp = (bd >> 32) + (ad & M32) + (bc & M32);\n        tmp += 1U << 31;  /// mult_round\n        return DiyFp(ac + (ad >> 32) + (bc >> 32) + (tmp >> 32), e + rhs.e + 64);\n#endif\n    }\n\n    DiyFp Normalize() const {\n        int s = static_cast<int>(clzll(f));\n        return DiyFp(f << s, e - s);\n    }\n\n    DiyFp NormalizeBoundary() const {\n        DiyFp res = *this;\n        while (!(res.f & (kDpHiddenBit << 1))) {\n            res.f <<= 1;\n            res.e--;\n        }\n        res.f <<= (kDiySignificandSize - kDpSignificandSize - 2);\n        res.e = res.e - (kDiySignificandSize - kDpSignificandSize - 2);\n        return res;\n    }\n\n    void NormalizedBoundaries(DiyFp* minus, DiyFp* plus) const {\n        DiyFp pl = DiyFp((f << 1) + 1, e - 1).NormalizeBoundary();\n        DiyFp mi = (f == kDpHiddenBit) ? DiyFp((f << 2) - 1, e - 2) : DiyFp((f << 1) - 1, e - 1);\n        mi.f <<= mi.e - pl.e;\n        mi.e = pl.e;\n        *plus = pl;\n        *minus = mi;\n    }\n\n    double ToDouble() const {\n        union {\n            double d;\n            uint64_t u64;\n        }u;\n        RAPIDJSON_ASSERT(f <= kDpHiddenBit + kDpSignificandMask);\n        if (e < kDpDenormalExponent) {\n            // Underflow.\n            return 0.0;\n        }\n        if (e >= kDpMaxExponent) {\n            // Overflow.\n            return std::numeric_limits<double>::infinity();\n        }\n        const uint64_t be = (e == kDpDenormalExponent && (f & kDpHiddenBit) == 0) ? 0 :\n            static_cast<uint64_t>(e + kDpExponentBias);\n        u.u64 = (f & kDpSignificandMask) | (be << kDpSignificandSize);\n        return u.d;\n    }\n\n    static const int kDiySignificandSize = 64;\n    static const int kDpSignificandSize = 52;\n    static const int kDpExponentBias = 0x3FF + kDpSignificandSize;\n    static const int kDpMaxExponent = 0x7FF - kDpExponentBias;\n    static const int kDpMinExponent = -kDpExponentBias;\n    static const int kDpDenormalExponent = -kDpExponentBias + 1;\n    static const uint64_t kDpExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000);\n    static const uint64_t kDpSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF);\n    static const uint64_t kDpHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000);\n\n    uint64_t f;\n    int e;\n};\n\ninline DiyFp GetCachedPowerByIndex(size_t index) {\n    // 10^-348, 10^-340, ..., 10^340\n    static const uint64_t kCachedPowers_F[] = {\n        RAPIDJSON_UINT64_C2(0xfa8fd5a0, 0x081c0288), RAPIDJSON_UINT64_C2(0xbaaee17f, 0xa23ebf76),\n        RAPIDJSON_UINT64_C2(0x8b16fb20, 0x3055ac76), RAPIDJSON_UINT64_C2(0xcf42894a, 0x5dce35ea),\n        RAPIDJSON_UINT64_C2(0x9a6bb0aa, 0x55653b2d), RAPIDJSON_UINT64_C2(0xe61acf03, 0x3d1a45df),\n        RAPIDJSON_UINT64_C2(0xab70fe17, 0xc79ac6ca), RAPIDJSON_UINT64_C2(0xff77b1fc, 0xbebcdc4f),\n        RAPIDJSON_UINT64_C2(0xbe5691ef, 0x416bd60c), RAPIDJSON_UINT64_C2(0x8dd01fad, 0x907ffc3c),\n        RAPIDJSON_UINT64_C2(0xd3515c28, 0x31559a83), RAPIDJSON_UINT64_C2(0x9d71ac8f, 0xada6c9b5),\n        RAPIDJSON_UINT64_C2(0xea9c2277, 0x23ee8bcb), RAPIDJSON_UINT64_C2(0xaecc4991, 0x4078536d),\n        RAPIDJSON_UINT64_C2(0x823c1279, 0x5db6ce57), RAPIDJSON_UINT64_C2(0xc2109436, 0x4dfb5637),\n        RAPIDJSON_UINT64_C2(0x9096ea6f, 0x3848984f), RAPIDJSON_UINT64_C2(0xd77485cb, 0x25823ac7),\n        RAPIDJSON_UINT64_C2(0xa086cfcd, 0x97bf97f4), RAPIDJSON_UINT64_C2(0xef340a98, 0x172aace5),\n        RAPIDJSON_UINT64_C2(0xb23867fb, 0x2a35b28e), RAPIDJSON_UINT64_C2(0x84c8d4df, 0xd2c63f3b),\n        RAPIDJSON_UINT64_C2(0xc5dd4427, 0x1ad3cdba), RAPIDJSON_UINT64_C2(0x936b9fce, 0xbb25c996),\n        RAPIDJSON_UINT64_C2(0xdbac6c24, 0x7d62a584), RAPIDJSON_UINT64_C2(0xa3ab6658, 0x0d5fdaf6),\n        RAPIDJSON_UINT64_C2(0xf3e2f893, 0xdec3f126), RAPIDJSON_UINT64_C2(0xb5b5ada8, 0xaaff80b8),\n        RAPIDJSON_UINT64_C2(0x87625f05, 0x6c7c4a8b), RAPIDJSON_UINT64_C2(0xc9bcff60, 0x34c13053),\n        RAPIDJSON_UINT64_C2(0x964e858c, 0x91ba2655), RAPIDJSON_UINT64_C2(0xdff97724, 0x70297ebd),\n        RAPIDJSON_UINT64_C2(0xa6dfbd9f, 0xb8e5b88f), RAPIDJSON_UINT64_C2(0xf8a95fcf, 0x88747d94),\n        RAPIDJSON_UINT64_C2(0xb9447093, 0x8fa89bcf), RAPIDJSON_UINT64_C2(0x8a08f0f8, 0xbf0f156b),\n        RAPIDJSON_UINT64_C2(0xcdb02555, 0x653131b6), RAPIDJSON_UINT64_C2(0x993fe2c6, 0xd07b7fac),\n        RAPIDJSON_UINT64_C2(0xe45c10c4, 0x2a2b3b06), RAPIDJSON_UINT64_C2(0xaa242499, 0x697392d3),\n        RAPIDJSON_UINT64_C2(0xfd87b5f2, 0x8300ca0e), RAPIDJSON_UINT64_C2(0xbce50864, 0x92111aeb),\n        RAPIDJSON_UINT64_C2(0x8cbccc09, 0x6f5088cc), RAPIDJSON_UINT64_C2(0xd1b71758, 0xe219652c),\n        RAPIDJSON_UINT64_C2(0x9c400000, 0x00000000), RAPIDJSON_UINT64_C2(0xe8d4a510, 0x00000000),\n        RAPIDJSON_UINT64_C2(0xad78ebc5, 0xac620000), RAPIDJSON_UINT64_C2(0x813f3978, 0xf8940984),\n        RAPIDJSON_UINT64_C2(0xc097ce7b, 0xc90715b3), RAPIDJSON_UINT64_C2(0x8f7e32ce, 0x7bea5c70),\n        RAPIDJSON_UINT64_C2(0xd5d238a4, 0xabe98068), RAPIDJSON_UINT64_C2(0x9f4f2726, 0x179a2245),\n        RAPIDJSON_UINT64_C2(0xed63a231, 0xd4c4fb27), RAPIDJSON_UINT64_C2(0xb0de6538, 0x8cc8ada8),\n        RAPIDJSON_UINT64_C2(0x83c7088e, 0x1aab65db), RAPIDJSON_UINT64_C2(0xc45d1df9, 0x42711d9a),\n        RAPIDJSON_UINT64_C2(0x924d692c, 0xa61be758), RAPIDJSON_UINT64_C2(0xda01ee64, 0x1a708dea),\n        RAPIDJSON_UINT64_C2(0xa26da399, 0x9aef774a), RAPIDJSON_UINT64_C2(0xf209787b, 0xb47d6b85),\n        RAPIDJSON_UINT64_C2(0xb454e4a1, 0x79dd1877), RAPIDJSON_UINT64_C2(0x865b8692, 0x5b9bc5c2),\n        RAPIDJSON_UINT64_C2(0xc83553c5, 0xc8965d3d), RAPIDJSON_UINT64_C2(0x952ab45c, 0xfa97a0b3),\n        RAPIDJSON_UINT64_C2(0xde469fbd, 0x99a05fe3), RAPIDJSON_UINT64_C2(0xa59bc234, 0xdb398c25),\n        RAPIDJSON_UINT64_C2(0xf6c69a72, 0xa3989f5c), RAPIDJSON_UINT64_C2(0xb7dcbf53, 0x54e9bece),\n        RAPIDJSON_UINT64_C2(0x88fcf317, 0xf22241e2), RAPIDJSON_UINT64_C2(0xcc20ce9b, 0xd35c78a5),\n        RAPIDJSON_UINT64_C2(0x98165af3, 0x7b2153df), RAPIDJSON_UINT64_C2(0xe2a0b5dc, 0x971f303a),\n        RAPIDJSON_UINT64_C2(0xa8d9d153, 0x5ce3b396), RAPIDJSON_UINT64_C2(0xfb9b7cd9, 0xa4a7443c),\n        RAPIDJSON_UINT64_C2(0xbb764c4c, 0xa7a44410), RAPIDJSON_UINT64_C2(0x8bab8eef, 0xb6409c1a),\n        RAPIDJSON_UINT64_C2(0xd01fef10, 0xa657842c), RAPIDJSON_UINT64_C2(0x9b10a4e5, 0xe9913129),\n        RAPIDJSON_UINT64_C2(0xe7109bfb, 0xa19c0c9d), RAPIDJSON_UINT64_C2(0xac2820d9, 0x623bf429),\n        RAPIDJSON_UINT64_C2(0x80444b5e, 0x7aa7cf85), RAPIDJSON_UINT64_C2(0xbf21e440, 0x03acdd2d),\n        RAPIDJSON_UINT64_C2(0x8e679c2f, 0x5e44ff8f), RAPIDJSON_UINT64_C2(0xd433179d, 0x9c8cb841),\n        RAPIDJSON_UINT64_C2(0x9e19db92, 0xb4e31ba9), RAPIDJSON_UINT64_C2(0xeb96bf6e, 0xbadf77d9),\n        RAPIDJSON_UINT64_C2(0xaf87023b, 0x9bf0ee6b)\n    };\n    static const int16_t kCachedPowers_E[] = {\n        -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007,  -980,\n        -954,  -927,  -901,  -874,  -847,  -821,  -794,  -768,  -741,  -715,\n        -688,  -661,  -635,  -608,  -582,  -555,  -529,  -502,  -475,  -449,\n        -422,  -396,  -369,  -343,  -316,  -289,  -263,  -236,  -210,  -183,\n        -157,  -130,  -103,   -77,   -50,   -24,     3,    30,    56,    83,\n        109,   136,   162,   189,   216,   242,   269,   295,   322,   348,\n        375,   402,   428,   455,   481,   508,   534,   561,   588,   614,\n        641,   667,   694,   720,   747,   774,   800,   827,   853,   880,\n        907,   933,   960,   986,  1013,  1039,  1066\n    };\n    RAPIDJSON_ASSERT(index < 87);\n    return DiyFp(kCachedPowers_F[index], kCachedPowers_E[index]);\n}\n\ninline DiyFp GetCachedPower(int e, int* K) {\n\n    //int k = static_cast<int>(ceil((-61 - e) * 0.30102999566398114)) + 374;\n    double dk = (-61 - e) * 0.30102999566398114 + 347;  // dk must be positive, so can do ceiling in positive\n    int k = static_cast<int>(dk);\n    if (dk - k > 0.0)\n        k++;\n\n    unsigned index = static_cast<unsigned>((k >> 3) + 1);\n    *K = -(-348 + static_cast<int>(index << 3));    // decimal exponent no need lookup table\n\n    return GetCachedPowerByIndex(index);\n}\n\ninline DiyFp GetCachedPower10(int exp, int *outExp) {\n    RAPIDJSON_ASSERT(exp >= -348);\n    unsigned index = static_cast<unsigned>(exp + 348) / 8u;\n    *outExp = -348 + static_cast<int>(index) * 8;\n    return GetCachedPowerByIndex(index);\n}\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_POP\n#endif\n\n#ifdef __clang__\nRAPIDJSON_DIAG_POP\nRAPIDJSON_DIAG_OFF(padded)\n#endif\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_DIYFP_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/dtoa.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n// This is a C++ header-only implementation of Grisu2 algorithm from the publication:\n// Loitsch, Florian. \"Printing floating-point numbers quickly and accurately with\n// integers.\" ACM Sigplan Notices 45.6 (2010): 233-243.\n\n#ifndef RAPIDJSON_DTOA_\n#define RAPIDJSON_DTOA_\n\n#include \"itoa.h\" // GetDigitsLut()\n#include \"diyfp.h\"\n#include \"ieee754.h\"\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(effc++)\nRAPIDJSON_DIAG_OFF(array-bounds) // some gcc versions generate wrong warnings https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124\n#endif\n\ninline void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w) {\n    while (rest < wp_w && delta - rest >= ten_kappa &&\n           (rest + ten_kappa < wp_w ||  /// closer\n            wp_w - rest > rest + ten_kappa - wp_w)) {\n        buffer[len - 1]--;\n        rest += ten_kappa;\n    }\n}\n\ninline int CountDecimalDigit32(uint32_t n) {\n    // Simple pure C++ implementation was faster than __builtin_clz version in this situation.\n    if (n < 10) return 1;\n    if (n < 100) return 2;\n    if (n < 1000) return 3;\n    if (n < 10000) return 4;\n    if (n < 100000) return 5;\n    if (n < 1000000) return 6;\n    if (n < 10000000) return 7;\n    if (n < 100000000) return 8;\n    // Will not reach 10 digits in DigitGen()\n    //if (n < 1000000000) return 9;\n    //return 10;\n    return 9;\n}\n\ninline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* K) {\n    static const uint32_t kPow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 };\n    const DiyFp one(uint64_t(1) << -Mp.e, Mp.e);\n    const DiyFp wp_w = Mp - W;\n    uint32_t p1 = static_cast<uint32_t>(Mp.f >> -one.e);\n    uint64_t p2 = Mp.f & (one.f - 1);\n    int kappa = CountDecimalDigit32(p1); // kappa in [0, 9]\n    *len = 0;\n\n    while (kappa > 0) {\n        uint32_t d = 0;\n        switch (kappa) {\n            case  9: d = p1 /  100000000; p1 %=  100000000; break;\n            case  8: d = p1 /   10000000; p1 %=   10000000; break;\n            case  7: d = p1 /    1000000; p1 %=    1000000; break;\n            case  6: d = p1 /     100000; p1 %=     100000; break;\n            case  5: d = p1 /      10000; p1 %=      10000; break;\n            case  4: d = p1 /       1000; p1 %=       1000; break;\n            case  3: d = p1 /        100; p1 %=        100; break;\n            case  2: d = p1 /         10; p1 %=         10; break;\n            case  1: d = p1;              p1 =           0; break;\n            default:;\n        }\n        if (d || *len)\n            buffer[(*len)++] = static_cast<char>('0' + static_cast<char>(d));\n        kappa--;\n        uint64_t tmp = (static_cast<uint64_t>(p1) << -one.e) + p2;\n        if (tmp <= delta) {\n            *K += kappa;\n            GrisuRound(buffer, *len, delta, tmp, static_cast<uint64_t>(kPow10[kappa]) << -one.e, wp_w.f);\n            return;\n        }\n    }\n\n    // kappa = 0\n    for (;;) {\n        p2 *= 10;\n        delta *= 10;\n        char d = static_cast<char>(p2 >> -one.e);\n        if (d || *len)\n            buffer[(*len)++] = static_cast<char>('0' + d);\n        p2 &= one.f - 1;\n        kappa--;\n        if (p2 < delta) {\n            *K += kappa;\n            int index = -kappa;\n            GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * (index < 9 ? kPow10[index] : 0));\n            return;\n        }\n    }\n}\n\ninline void Grisu2(double value, char* buffer, int* length, int* K) {\n    const DiyFp v(value);\n    DiyFp w_m, w_p;\n    v.NormalizedBoundaries(&w_m, &w_p);\n\n    const DiyFp c_mk = GetCachedPower(w_p.e, K);\n    const DiyFp W = v.Normalize() * c_mk;\n    DiyFp Wp = w_p * c_mk;\n    DiyFp Wm = w_m * c_mk;\n    Wm.f++;\n    Wp.f--;\n    DigitGen(W, Wp, Wp.f - Wm.f, buffer, length, K);\n}\n\ninline char* WriteExponent(int K, char* buffer) {\n    if (K < 0) {\n        *buffer++ = '-';\n        K = -K;\n    }\n\n    if (K >= 100) {\n        *buffer++ = static_cast<char>('0' + static_cast<char>(K / 100));\n        K %= 100;\n        const char* d = GetDigitsLut() + K * 2;\n        *buffer++ = d[0];\n        *buffer++ = d[1];\n    }\n    else if (K >= 10) {\n        const char* d = GetDigitsLut() + K * 2;\n        *buffer++ = d[0];\n        *buffer++ = d[1];\n    }\n    else\n        *buffer++ = static_cast<char>('0' + static_cast<char>(K));\n\n    return buffer;\n}\n\ninline char* Prettify(char* buffer, int length, int k, int maxDecimalPlaces) {\n    const int kk = length + k;  // 10^(kk-1) <= v < 10^kk\n\n    if (0 <= k && kk <= 21) {\n        // 1234e7 -> 12340000000\n        for (int i = length; i < kk; i++)\n            buffer[i] = '0';\n        buffer[kk] = '.';\n        buffer[kk + 1] = '0';\n        return &buffer[kk + 2];\n    }\n    else if (0 < kk && kk <= 21) {\n        // 1234e-2 -> 12.34\n        std::memmove(&buffer[kk + 1], &buffer[kk], static_cast<size_t>(length - kk));\n        buffer[kk] = '.';\n        if (0 > k + maxDecimalPlaces) {\n            // When maxDecimalPlaces = 2, 1.2345 -> 1.23, 1.102 -> 1.1\n            // Remove extra trailing zeros (at least one) after truncation.\n            for (int i = kk + maxDecimalPlaces; i > kk + 1; i--)\n                if (buffer[i] != '0')\n                    return &buffer[i + 1];\n            return &buffer[kk + 2]; // Reserve one zero\n        }\n        else\n            return &buffer[length + 1];\n    }\n    else if (-6 < kk && kk <= 0) {\n        // 1234e-6 -> 0.001234\n        const int offset = 2 - kk;\n        std::memmove(&buffer[offset], &buffer[0], static_cast<size_t>(length));\n        buffer[0] = '0';\n        buffer[1] = '.';\n        for (int i = 2; i < offset; i++)\n            buffer[i] = '0';\n        if (length - kk > maxDecimalPlaces) {\n            // When maxDecimalPlaces = 2, 0.123 -> 0.12, 0.102 -> 0.1\n            // Remove extra trailing zeros (at least one) after truncation.\n            for (int i = maxDecimalPlaces + 1; i > 2; i--)\n                if (buffer[i] != '0')\n                    return &buffer[i + 1];\n            return &buffer[3]; // Reserve one zero\n        }\n        else\n            return &buffer[length + offset];\n    }\n    else if (kk < -maxDecimalPlaces) {\n        // Truncate to zero\n        buffer[0] = '0';\n        buffer[1] = '.';\n        buffer[2] = '0';\n        return &buffer[3];\n    }\n    else if (length == 1) {\n        // 1e30\n        buffer[1] = 'e';\n        return WriteExponent(kk - 1, &buffer[2]);\n    }\n    else {\n        // 1234e30 -> 1.234e33\n        std::memmove(&buffer[2], &buffer[1], static_cast<size_t>(length - 1));\n        buffer[1] = '.';\n        buffer[length + 1] = 'e';\n        return WriteExponent(kk - 1, &buffer[0 + length + 2]);\n    }\n}\n\ninline char* dtoa(double value, char* buffer, int maxDecimalPlaces = 324) {\n    RAPIDJSON_ASSERT(maxDecimalPlaces >= 1);\n    Double d(value);\n    if (d.IsZero()) {\n        if (d.Sign())\n            *buffer++ = '-';     // -0.0, Issue #289\n        buffer[0] = '0';\n        buffer[1] = '.';\n        buffer[2] = '0';\n        return &buffer[3];\n    }\n    else {\n        if (value < 0) {\n            *buffer++ = '-';\n            value = -value;\n        }\n        int length, K;\n        Grisu2(value, buffer, &length, &K);\n        return Prettify(buffer, length, K, maxDecimalPlaces);\n    }\n}\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_POP\n#endif\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_DTOA_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/ieee754.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_IEEE754_\n#define RAPIDJSON_IEEE754_\n\n#include \"../rapidjson.h\"\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\nclass Double {\npublic:\n    Double() {}\n    Double(double d) : d_(d) {}\n    Double(uint64_t u) : u_(u) {}\n\n    double Value() const { return d_; }\n    uint64_t Uint64Value() const { return u_; }\n\n    double NextPositiveDouble() const {\n        RAPIDJSON_ASSERT(!Sign());\n        return Double(u_ + 1).Value();\n    }\n\n    bool Sign() const { return (u_ & kSignMask) != 0; }\n    uint64_t Significand() const { return u_ & kSignificandMask; }\n    int Exponent() const { return static_cast<int>(((u_ & kExponentMask) >> kSignificandSize) - kExponentBias); }\n\n    bool IsNan() const { return (u_ & kExponentMask) == kExponentMask && Significand() != 0; }\n    bool IsInf() const { return (u_ & kExponentMask) == kExponentMask && Significand() == 0; }\n    bool IsNanOrInf() const { return (u_ & kExponentMask) == kExponentMask; }\n    bool IsNormal() const { return (u_ & kExponentMask) != 0 || Significand() == 0; }\n    bool IsZero() const { return (u_ & (kExponentMask | kSignificandMask)) == 0; }\n\n    uint64_t IntegerSignificand() const { return IsNormal() ? Significand() | kHiddenBit : Significand(); }\n    int IntegerExponent() const { return (IsNormal() ? Exponent() : kDenormalExponent) - kSignificandSize; }\n    uint64_t ToBias() const { return (u_ & kSignMask) ? ~u_ + 1 : u_ | kSignMask; }\n\n    static int EffectiveSignificandSize(int order) {\n        if (order >= -1021)\n            return 53;\n        else if (order <= -1074)\n            return 0;\n        else\n            return order + 1074;\n    }\n\nprivate:\n    static const int kSignificandSize = 52;\n    static const int kExponentBias = 0x3FF;\n    static const int kDenormalExponent = 1 - kExponentBias;\n    static const uint64_t kSignMask = RAPIDJSON_UINT64_C2(0x80000000, 0x00000000);\n    static const uint64_t kExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000);\n    static const uint64_t kSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF);\n    static const uint64_t kHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000);\n\n    union {\n        double d_;\n        uint64_t u_;\n    };\n};\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_IEEE754_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/itoa.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n//\n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed\n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_ITOA_\n#define RAPIDJSON_ITOA_\n\n#include \"../rapidjson.h\"\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\ninline const char* GetDigitsLut() {\n    static const char cDigitsLut[200] = {\n        '0','0','0','1','0','2','0','3','0','4','0','5','0','6','0','7','0','8','0','9',\n        '1','0','1','1','1','2','1','3','1','4','1','5','1','6','1','7','1','8','1','9',\n        '2','0','2','1','2','2','2','3','2','4','2','5','2','6','2','7','2','8','2','9',\n        '3','0','3','1','3','2','3','3','3','4','3','5','3','6','3','7','3','8','3','9',\n        '4','0','4','1','4','2','4','3','4','4','4','5','4','6','4','7','4','8','4','9',\n        '5','0','5','1','5','2','5','3','5','4','5','5','5','6','5','7','5','8','5','9',\n        '6','0','6','1','6','2','6','3','6','4','6','5','6','6','6','7','6','8','6','9',\n        '7','0','7','1','7','2','7','3','7','4','7','5','7','6','7','7','7','8','7','9',\n        '8','0','8','1','8','2','8','3','8','4','8','5','8','6','8','7','8','8','8','9',\n        '9','0','9','1','9','2','9','3','9','4','9','5','9','6','9','7','9','8','9','9'\n    };\n    return cDigitsLut;\n}\n\ninline char* u32toa(uint32_t value, char* buffer) {\n    RAPIDJSON_ASSERT(buffer != 0);\n\n    const char* cDigitsLut = GetDigitsLut();\n\n    if (value < 10000) {\n        const uint32_t d1 = (value / 100) << 1;\n        const uint32_t d2 = (value % 100) << 1;\n\n        if (value >= 1000)\n            *buffer++ = cDigitsLut[d1];\n        if (value >= 100)\n            *buffer++ = cDigitsLut[d1 + 1];\n        if (value >= 10)\n            *buffer++ = cDigitsLut[d2];\n        *buffer++ = cDigitsLut[d2 + 1];\n    }\n    else if (value < 100000000) {\n        // value = bbbbcccc\n        const uint32_t b = value / 10000;\n        const uint32_t c = value % 10000;\n\n        const uint32_t d1 = (b / 100) << 1;\n        const uint32_t d2 = (b % 100) << 1;\n\n        const uint32_t d3 = (c / 100) << 1;\n        const uint32_t d4 = (c % 100) << 1;\n\n        if (value >= 10000000)\n            *buffer++ = cDigitsLut[d1];\n        if (value >= 1000000)\n            *buffer++ = cDigitsLut[d1 + 1];\n        if (value >= 100000)\n            *buffer++ = cDigitsLut[d2];\n        *buffer++ = cDigitsLut[d2 + 1];\n\n        *buffer++ = cDigitsLut[d3];\n        *buffer++ = cDigitsLut[d3 + 1];\n        *buffer++ = cDigitsLut[d4];\n        *buffer++ = cDigitsLut[d4 + 1];\n    }\n    else {\n        // value = aabbbbcccc in decimal\n\n        const uint32_t a = value / 100000000; // 1 to 42\n        value %= 100000000;\n\n        if (a >= 10) {\n            const unsigned i = a << 1;\n            *buffer++ = cDigitsLut[i];\n            *buffer++ = cDigitsLut[i + 1];\n        }\n        else\n            *buffer++ = static_cast<char>('0' + static_cast<char>(a));\n\n        const uint32_t b = value / 10000; // 0 to 9999\n        const uint32_t c = value % 10000; // 0 to 9999\n\n        const uint32_t d1 = (b / 100) << 1;\n        const uint32_t d2 = (b % 100) << 1;\n\n        const uint32_t d3 = (c / 100) << 1;\n        const uint32_t d4 = (c % 100) << 1;\n\n        *buffer++ = cDigitsLut[d1];\n        *buffer++ = cDigitsLut[d1 + 1];\n        *buffer++ = cDigitsLut[d2];\n        *buffer++ = cDigitsLut[d2 + 1];\n        *buffer++ = cDigitsLut[d3];\n        *buffer++ = cDigitsLut[d3 + 1];\n        *buffer++ = cDigitsLut[d4];\n        *buffer++ = cDigitsLut[d4 + 1];\n    }\n    return buffer;\n}\n\ninline char* i32toa(int32_t value, char* buffer) {\n    RAPIDJSON_ASSERT(buffer != 0);\n    uint32_t u = static_cast<uint32_t>(value);\n    if (value < 0) {\n        *buffer++ = '-';\n        u = ~u + 1;\n    }\n\n    return u32toa(u, buffer);\n}\n\ninline char* u64toa(uint64_t value, char* buffer) {\n    RAPIDJSON_ASSERT(buffer != 0);\n    const char* cDigitsLut = GetDigitsLut();\n    const uint64_t  kTen8 = 100000000;\n    const uint64_t  kTen9 = kTen8 * 10;\n    const uint64_t kTen10 = kTen8 * 100;\n    const uint64_t kTen11 = kTen8 * 1000;\n    const uint64_t kTen12 = kTen8 * 10000;\n    const uint64_t kTen13 = kTen8 * 100000;\n    const uint64_t kTen14 = kTen8 * 1000000;\n    const uint64_t kTen15 = kTen8 * 10000000;\n    const uint64_t kTen16 = kTen8 * kTen8;\n\n    if (value < kTen8) {\n        uint32_t v = static_cast<uint32_t>(value);\n        if (v < 10000) {\n            const uint32_t d1 = (v / 100) << 1;\n            const uint32_t d2 = (v % 100) << 1;\n\n            if (v >= 1000)\n                *buffer++ = cDigitsLut[d1];\n            if (v >= 100)\n                *buffer++ = cDigitsLut[d1 + 1];\n            if (v >= 10)\n                *buffer++ = cDigitsLut[d2];\n            *buffer++ = cDigitsLut[d2 + 1];\n        }\n        else {\n            // value = bbbbcccc\n            const uint32_t b = v / 10000;\n            const uint32_t c = v % 10000;\n\n            const uint32_t d1 = (b / 100) << 1;\n            const uint32_t d2 = (b % 100) << 1;\n\n            const uint32_t d3 = (c / 100) << 1;\n            const uint32_t d4 = (c % 100) << 1;\n\n            if (value >= 10000000)\n                *buffer++ = cDigitsLut[d1];\n            if (value >= 1000000)\n                *buffer++ = cDigitsLut[d1 + 1];\n            if (value >= 100000)\n                *buffer++ = cDigitsLut[d2];\n            *buffer++ = cDigitsLut[d2 + 1];\n\n            *buffer++ = cDigitsLut[d3];\n            *buffer++ = cDigitsLut[d3 + 1];\n            *buffer++ = cDigitsLut[d4];\n            *buffer++ = cDigitsLut[d4 + 1];\n        }\n    }\n    else if (value < kTen16) {\n        const uint32_t v0 = static_cast<uint32_t>(value / kTen8);\n        const uint32_t v1 = static_cast<uint32_t>(value % kTen8);\n\n        const uint32_t b0 = v0 / 10000;\n        const uint32_t c0 = v0 % 10000;\n\n        const uint32_t d1 = (b0 / 100) << 1;\n        const uint32_t d2 = (b0 % 100) << 1;\n\n        const uint32_t d3 = (c0 / 100) << 1;\n        const uint32_t d4 = (c0 % 100) << 1;\n\n        const uint32_t b1 = v1 / 10000;\n        const uint32_t c1 = v1 % 10000;\n\n        const uint32_t d5 = (b1 / 100) << 1;\n        const uint32_t d6 = (b1 % 100) << 1;\n\n        const uint32_t d7 = (c1 / 100) << 1;\n        const uint32_t d8 = (c1 % 100) << 1;\n\n        if (value >= kTen15)\n            *buffer++ = cDigitsLut[d1];\n        if (value >= kTen14)\n            *buffer++ = cDigitsLut[d1 + 1];\n        if (value >= kTen13)\n            *buffer++ = cDigitsLut[d2];\n        if (value >= kTen12)\n            *buffer++ = cDigitsLut[d2 + 1];\n        if (value >= kTen11)\n            *buffer++ = cDigitsLut[d3];\n        if (value >= kTen10)\n            *buffer++ = cDigitsLut[d3 + 1];\n        if (value >= kTen9)\n            *buffer++ = cDigitsLut[d4];\n\n        *buffer++ = cDigitsLut[d4 + 1];\n        *buffer++ = cDigitsLut[d5];\n        *buffer++ = cDigitsLut[d5 + 1];\n        *buffer++ = cDigitsLut[d6];\n        *buffer++ = cDigitsLut[d6 + 1];\n        *buffer++ = cDigitsLut[d7];\n        *buffer++ = cDigitsLut[d7 + 1];\n        *buffer++ = cDigitsLut[d8];\n        *buffer++ = cDigitsLut[d8 + 1];\n    }\n    else {\n        const uint32_t a = static_cast<uint32_t>(value / kTen16); // 1 to 1844\n        value %= kTen16;\n\n        if (a < 10)\n            *buffer++ = static_cast<char>('0' + static_cast<char>(a));\n        else if (a < 100) {\n            const uint32_t i = a << 1;\n            *buffer++ = cDigitsLut[i];\n            *buffer++ = cDigitsLut[i + 1];\n        }\n        else if (a < 1000) {\n            *buffer++ = static_cast<char>('0' + static_cast<char>(a / 100));\n\n            const uint32_t i = (a % 100) << 1;\n            *buffer++ = cDigitsLut[i];\n            *buffer++ = cDigitsLut[i + 1];\n        }\n        else {\n            const uint32_t i = (a / 100) << 1;\n            const uint32_t j = (a % 100) << 1;\n            *buffer++ = cDigitsLut[i];\n            *buffer++ = cDigitsLut[i + 1];\n            *buffer++ = cDigitsLut[j];\n            *buffer++ = cDigitsLut[j + 1];\n        }\n\n        const uint32_t v0 = static_cast<uint32_t>(value / kTen8);\n        const uint32_t v1 = static_cast<uint32_t>(value % kTen8);\n\n        const uint32_t b0 = v0 / 10000;\n        const uint32_t c0 = v0 % 10000;\n\n        const uint32_t d1 = (b0 / 100) << 1;\n        const uint32_t d2 = (b0 % 100) << 1;\n\n        const uint32_t d3 = (c0 / 100) << 1;\n        const uint32_t d4 = (c0 % 100) << 1;\n\n        const uint32_t b1 = v1 / 10000;\n        const uint32_t c1 = v1 % 10000;\n\n        const uint32_t d5 = (b1 / 100) << 1;\n        const uint32_t d6 = (b1 % 100) << 1;\n\n        const uint32_t d7 = (c1 / 100) << 1;\n        const uint32_t d8 = (c1 % 100) << 1;\n\n        *buffer++ = cDigitsLut[d1];\n        *buffer++ = cDigitsLut[d1 + 1];\n        *buffer++ = cDigitsLut[d2];\n        *buffer++ = cDigitsLut[d2 + 1];\n        *buffer++ = cDigitsLut[d3];\n        *buffer++ = cDigitsLut[d3 + 1];\n        *buffer++ = cDigitsLut[d4];\n        *buffer++ = cDigitsLut[d4 + 1];\n        *buffer++ = cDigitsLut[d5];\n        *buffer++ = cDigitsLut[d5 + 1];\n        *buffer++ = cDigitsLut[d6];\n        *buffer++ = cDigitsLut[d6 + 1];\n        *buffer++ = cDigitsLut[d7];\n        *buffer++ = cDigitsLut[d7 + 1];\n        *buffer++ = cDigitsLut[d8];\n        *buffer++ = cDigitsLut[d8 + 1];\n    }\n\n    return buffer;\n}\n\ninline char* i64toa(int64_t value, char* buffer) {\n    RAPIDJSON_ASSERT(buffer != 0);\n    uint64_t u = static_cast<uint64_t>(value);\n    if (value < 0) {\n        *buffer++ = '-';\n        u = ~u + 1;\n    }\n\n    return u64toa(u, buffer);\n}\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_ITOA_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/meta.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_INTERNAL_META_H_\n#define RAPIDJSON_INTERNAL_META_H_\n\n#include \"../rapidjson.h\"\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(effc++)\n#endif\n\n#if defined(_MSC_VER) && !defined(__clang__)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(6334)\n#endif\n\n#if RAPIDJSON_HAS_CXX11_TYPETRAITS\n#include <type_traits>\n#endif\n\n//@cond RAPIDJSON_INTERNAL\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\n// Helper to wrap/convert arbitrary types to void, useful for arbitrary type matching\ntemplate <typename T> struct Void { typedef void Type; };\n\n///////////////////////////////////////////////////////////////////////////////\n// BoolType, TrueType, FalseType\n//\ntemplate <bool Cond> struct BoolType {\n    static const bool Value = Cond;\n    typedef BoolType Type;\n};\ntypedef BoolType<true> TrueType;\ntypedef BoolType<false> FalseType;\n\n\n///////////////////////////////////////////////////////////////////////////////\n// SelectIf, BoolExpr, NotExpr, AndExpr, OrExpr\n//\n\ntemplate <bool C> struct SelectIfImpl { template <typename T1, typename T2> struct Apply { typedef T1 Type; }; };\ntemplate <> struct SelectIfImpl<false> { template <typename T1, typename T2> struct Apply { typedef T2 Type; }; };\ntemplate <bool C, typename T1, typename T2> struct SelectIfCond : SelectIfImpl<C>::template Apply<T1,T2> {};\ntemplate <typename C, typename T1, typename T2> struct SelectIf : SelectIfCond<C::Value, T1, T2> {};\n\ntemplate <bool Cond1, bool Cond2> struct AndExprCond : FalseType {};\ntemplate <> struct AndExprCond<true, true> : TrueType {};\ntemplate <bool Cond1, bool Cond2> struct OrExprCond : TrueType {};\ntemplate <> struct OrExprCond<false, false> : FalseType {};\n\ntemplate <typename C> struct BoolExpr : SelectIf<C,TrueType,FalseType>::Type {};\ntemplate <typename C> struct NotExpr  : SelectIf<C,FalseType,TrueType>::Type {};\ntemplate <typename C1, typename C2> struct AndExpr : AndExprCond<C1::Value, C2::Value>::Type {};\ntemplate <typename C1, typename C2> struct OrExpr  : OrExprCond<C1::Value, C2::Value>::Type {};\n\n\n///////////////////////////////////////////////////////////////////////////////\n// AddConst, MaybeAddConst, RemoveConst\ntemplate <typename T> struct AddConst { typedef const T Type; };\ntemplate <bool Constify, typename T> struct MaybeAddConst : SelectIfCond<Constify, const T, T> {};\ntemplate <typename T> struct RemoveConst { typedef T Type; };\ntemplate <typename T> struct RemoveConst<const T> { typedef T Type; };\n\n\n///////////////////////////////////////////////////////////////////////////////\n// IsSame, IsConst, IsMoreConst, IsPointer\n//\ntemplate <typename T, typename U> struct IsSame : FalseType {};\ntemplate <typename T> struct IsSame<T, T> : TrueType {};\n\ntemplate <typename T> struct IsConst : FalseType {};\ntemplate <typename T> struct IsConst<const T> : TrueType {};\n\ntemplate <typename CT, typename T>\nstruct IsMoreConst\n    : AndExpr<IsSame<typename RemoveConst<CT>::Type, typename RemoveConst<T>::Type>,\n              BoolType<IsConst<CT>::Value >= IsConst<T>::Value> >::Type {};\n\ntemplate <typename T> struct IsPointer : FalseType {};\ntemplate <typename T> struct IsPointer<T*> : TrueType {};\n\n///////////////////////////////////////////////////////////////////////////////\n// IsBaseOf\n//\n#if RAPIDJSON_HAS_CXX11_TYPETRAITS\n\ntemplate <typename B, typename D> struct IsBaseOf\n    : BoolType< ::std::is_base_of<B,D>::value> {};\n\n#else // simplified version adopted from Boost\n\ntemplate<typename B, typename D> struct IsBaseOfImpl {\n    RAPIDJSON_STATIC_ASSERT(sizeof(B) != 0);\n    RAPIDJSON_STATIC_ASSERT(sizeof(D) != 0);\n\n    typedef char (&Yes)[1];\n    typedef char (&No) [2];\n\n    template <typename T>\n    static Yes Check(const D*, T);\n    static No  Check(const B*, int);\n\n    struct Host {\n        operator const B*() const;\n        operator const D*();\n    };\n\n    enum { Value = (sizeof(Check(Host(), 0)) == sizeof(Yes)) };\n};\n\ntemplate <typename B, typename D> struct IsBaseOf\n    : OrExpr<IsSame<B, D>, BoolExpr<IsBaseOfImpl<B, D> > >::Type {};\n\n#endif // RAPIDJSON_HAS_CXX11_TYPETRAITS\n\n\n//////////////////////////////////////////////////////////////////////////\n// EnableIf / DisableIf\n//\ntemplate <bool Condition, typename T = void> struct EnableIfCond  { typedef T Type; };\ntemplate <typename T> struct EnableIfCond<false, T> { /* empty */ };\n\ntemplate <bool Condition, typename T = void> struct DisableIfCond { typedef T Type; };\ntemplate <typename T> struct DisableIfCond<true, T> { /* empty */ };\n\ntemplate <typename Condition, typename T = void>\nstruct EnableIf : EnableIfCond<Condition::Value, T> {};\n\ntemplate <typename Condition, typename T = void>\nstruct DisableIf : DisableIfCond<Condition::Value, T> {};\n\n// SFINAE helpers\nstruct SfinaeTag {};\ntemplate <typename T> struct RemoveSfinaeTag;\ntemplate <typename T> struct RemoveSfinaeTag<SfinaeTag&(*)(T)> { typedef T Type; };\n\n#define RAPIDJSON_REMOVEFPTR_(type) \\\n    typename ::RAPIDJSON_NAMESPACE::internal::RemoveSfinaeTag \\\n        < ::RAPIDJSON_NAMESPACE::internal::SfinaeTag&(*) type>::Type\n\n#define RAPIDJSON_ENABLEIF(cond) \\\n    typename ::RAPIDJSON_NAMESPACE::internal::EnableIf \\\n        <RAPIDJSON_REMOVEFPTR_(cond)>::Type * = NULL\n\n#define RAPIDJSON_DISABLEIF(cond) \\\n    typename ::RAPIDJSON_NAMESPACE::internal::DisableIf \\\n        <RAPIDJSON_REMOVEFPTR_(cond)>::Type * = NULL\n\n#define RAPIDJSON_ENABLEIF_RETURN(cond,returntype) \\\n    typename ::RAPIDJSON_NAMESPACE::internal::EnableIf \\\n        <RAPIDJSON_REMOVEFPTR_(cond), \\\n         RAPIDJSON_REMOVEFPTR_(returntype)>::Type\n\n#define RAPIDJSON_DISABLEIF_RETURN(cond,returntype) \\\n    typename ::RAPIDJSON_NAMESPACE::internal::DisableIf \\\n        <RAPIDJSON_REMOVEFPTR_(cond), \\\n         RAPIDJSON_REMOVEFPTR_(returntype)>::Type\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n//@endcond\n\n#if defined(_MSC_VER) && !defined(__clang__)\nRAPIDJSON_DIAG_POP\n#endif\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_INTERNAL_META_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/pow10.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_POW10_\n#define RAPIDJSON_POW10_\n\n#include \"../rapidjson.h\"\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\n//! Computes integer powers of 10 in double (10.0^n).\n/*! This function uses lookup table for fast and accurate results.\n    \\param n non-negative exponent. Must <= 308.\n    \\return 10.0^n\n*/\ninline double Pow10(int n) {\n    static const double e[] = { // 1e-0...1e308: 309 * 8 bytes = 2472 bytes\n        1e+0,  \n        1e+1,  1e+2,  1e+3,  1e+4,  1e+5,  1e+6,  1e+7,  1e+8,  1e+9,  1e+10, 1e+11, 1e+12, 1e+13, 1e+14, 1e+15, 1e+16, 1e+17, 1e+18, 1e+19, 1e+20, \n        1e+21, 1e+22, 1e+23, 1e+24, 1e+25, 1e+26, 1e+27, 1e+28, 1e+29, 1e+30, 1e+31, 1e+32, 1e+33, 1e+34, 1e+35, 1e+36, 1e+37, 1e+38, 1e+39, 1e+40,\n        1e+41, 1e+42, 1e+43, 1e+44, 1e+45, 1e+46, 1e+47, 1e+48, 1e+49, 1e+50, 1e+51, 1e+52, 1e+53, 1e+54, 1e+55, 1e+56, 1e+57, 1e+58, 1e+59, 1e+60,\n        1e+61, 1e+62, 1e+63, 1e+64, 1e+65, 1e+66, 1e+67, 1e+68, 1e+69, 1e+70, 1e+71, 1e+72, 1e+73, 1e+74, 1e+75, 1e+76, 1e+77, 1e+78, 1e+79, 1e+80,\n        1e+81, 1e+82, 1e+83, 1e+84, 1e+85, 1e+86, 1e+87, 1e+88, 1e+89, 1e+90, 1e+91, 1e+92, 1e+93, 1e+94, 1e+95, 1e+96, 1e+97, 1e+98, 1e+99, 1e+100,\n        1e+101,1e+102,1e+103,1e+104,1e+105,1e+106,1e+107,1e+108,1e+109,1e+110,1e+111,1e+112,1e+113,1e+114,1e+115,1e+116,1e+117,1e+118,1e+119,1e+120,\n        1e+121,1e+122,1e+123,1e+124,1e+125,1e+126,1e+127,1e+128,1e+129,1e+130,1e+131,1e+132,1e+133,1e+134,1e+135,1e+136,1e+137,1e+138,1e+139,1e+140,\n        1e+141,1e+142,1e+143,1e+144,1e+145,1e+146,1e+147,1e+148,1e+149,1e+150,1e+151,1e+152,1e+153,1e+154,1e+155,1e+156,1e+157,1e+158,1e+159,1e+160,\n        1e+161,1e+162,1e+163,1e+164,1e+165,1e+166,1e+167,1e+168,1e+169,1e+170,1e+171,1e+172,1e+173,1e+174,1e+175,1e+176,1e+177,1e+178,1e+179,1e+180,\n        1e+181,1e+182,1e+183,1e+184,1e+185,1e+186,1e+187,1e+188,1e+189,1e+190,1e+191,1e+192,1e+193,1e+194,1e+195,1e+196,1e+197,1e+198,1e+199,1e+200,\n        1e+201,1e+202,1e+203,1e+204,1e+205,1e+206,1e+207,1e+208,1e+209,1e+210,1e+211,1e+212,1e+213,1e+214,1e+215,1e+216,1e+217,1e+218,1e+219,1e+220,\n        1e+221,1e+222,1e+223,1e+224,1e+225,1e+226,1e+227,1e+228,1e+229,1e+230,1e+231,1e+232,1e+233,1e+234,1e+235,1e+236,1e+237,1e+238,1e+239,1e+240,\n        1e+241,1e+242,1e+243,1e+244,1e+245,1e+246,1e+247,1e+248,1e+249,1e+250,1e+251,1e+252,1e+253,1e+254,1e+255,1e+256,1e+257,1e+258,1e+259,1e+260,\n        1e+261,1e+262,1e+263,1e+264,1e+265,1e+266,1e+267,1e+268,1e+269,1e+270,1e+271,1e+272,1e+273,1e+274,1e+275,1e+276,1e+277,1e+278,1e+279,1e+280,\n        1e+281,1e+282,1e+283,1e+284,1e+285,1e+286,1e+287,1e+288,1e+289,1e+290,1e+291,1e+292,1e+293,1e+294,1e+295,1e+296,1e+297,1e+298,1e+299,1e+300,\n        1e+301,1e+302,1e+303,1e+304,1e+305,1e+306,1e+307,1e+308\n    };\n    RAPIDJSON_ASSERT(n >= 0 && n <= 308);\n    return e[n];\n}\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_POW10_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/regex.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_INTERNAL_REGEX_H_\n#define RAPIDJSON_INTERNAL_REGEX_H_\n\n#include \"../allocators.h\"\n#include \"../stream.h\"\n#include \"stack.h\"\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(padded)\nRAPIDJSON_DIAG_OFF(switch-enum)\n#elif defined(_MSC_VER)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated\n#endif\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(effc++)\n#endif\n\n#ifndef RAPIDJSON_REGEX_VERBOSE\n#define RAPIDJSON_REGEX_VERBOSE 0\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\n///////////////////////////////////////////////////////////////////////////////\n// DecodedStream\n\ntemplate <typename SourceStream, typename Encoding>\nclass DecodedStream {\npublic:\n    DecodedStream(SourceStream& ss) : ss_(ss), codepoint_() { Decode(); }\n    unsigned Peek() { return codepoint_; }\n    unsigned Take() {\n        unsigned c = codepoint_;\n        if (c) // No further decoding when '\\0'\n            Decode();\n        return c;\n    }\n\nprivate:\n    void Decode() {\n        if (!Encoding::Decode(ss_, &codepoint_))\n            codepoint_ = 0;\n    }\n\n    SourceStream& ss_;\n    unsigned codepoint_;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericRegex\n\nstatic const SizeType kRegexInvalidState = ~SizeType(0);  //!< Represents an invalid index in GenericRegex::State::out, out1\nstatic const SizeType kRegexInvalidRange = ~SizeType(0);\n\ntemplate <typename Encoding, typename Allocator>\nclass GenericRegexSearch;\n\n//! Regular expression engine with subset of ECMAscript grammar.\n/*!\n    Supported regular expression syntax:\n    - \\c ab     Concatenation\n    - \\c a|b    Alternation\n    - \\c a?     Zero or one\n    - \\c a*     Zero or more\n    - \\c a+     One or more\n    - \\c a{3}   Exactly 3 times\n    - \\c a{3,}  At least 3 times\n    - \\c a{3,5} 3 to 5 times\n    - \\c (ab)   Grouping\n    - \\c ^a     At the beginning\n    - \\c a$     At the end\n    - \\c .      Any character\n    - \\c [abc]  Character classes\n    - \\c [a-c]  Character class range\n    - \\c [a-z0-9_] Character class combination\n    - \\c [^abc] Negated character classes\n    - \\c [^a-c] Negated character class range\n    - \\c [\\b]   Backspace (U+0008)\n    - \\c \\\\| \\\\\\\\ ...  Escape characters\n    - \\c \\\\f Form feed (U+000C)\n    - \\c \\\\n Line feed (U+000A)\n    - \\c \\\\r Carriage return (U+000D)\n    - \\c \\\\t Tab (U+0009)\n    - \\c \\\\v Vertical tab (U+000B)\n\n    \\note This is a Thompson NFA engine, implemented with reference to \n        Cox, Russ. \"Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby,...).\", \n        https://swtch.com/~rsc/regexp/regexp1.html \n*/\ntemplate <typename Encoding, typename Allocator = CrtAllocator>\nclass GenericRegex {\npublic:\n    typedef Encoding EncodingType;\n    typedef typename Encoding::Ch Ch;\n    template <typename, typename> friend class GenericRegexSearch;\n\n    GenericRegex(const Ch* source, Allocator* allocator = 0) : \n        ownAllocator_(allocator ? 0 : RAPIDJSON_NEW(Allocator)()), allocator_(allocator ? allocator : ownAllocator_), \n        states_(allocator_, 256), ranges_(allocator_, 256), root_(kRegexInvalidState), stateCount_(), rangeCount_(), \n        anchorBegin_(), anchorEnd_()\n    {\n        GenericStringStream<Encoding> ss(source);\n        DecodedStream<GenericStringStream<Encoding>, Encoding> ds(ss);\n        Parse(ds);\n    }\n\n    ~GenericRegex()\n    {\n        RAPIDJSON_DELETE(ownAllocator_);\n    }\n\n    bool IsValid() const {\n        return root_ != kRegexInvalidState;\n    }\n\nprivate:\n    enum Operator {\n        kZeroOrOne,\n        kZeroOrMore,\n        kOneOrMore,\n        kConcatenation,\n        kAlternation,\n        kLeftParenthesis\n    };\n\n    static const unsigned kAnyCharacterClass = 0xFFFFFFFF;   //!< For '.'\n    static const unsigned kRangeCharacterClass = 0xFFFFFFFE;\n    static const unsigned kRangeNegationFlag = 0x80000000;\n\n    struct Range {\n        unsigned start; // \n        unsigned end;\n        SizeType next;\n    };\n\n    struct State {\n        SizeType out;     //!< Equals to kInvalid for matching state\n        SizeType out1;    //!< Equals to non-kInvalid for split\n        SizeType rangeStart;\n        unsigned codepoint;\n    };\n\n    struct Frag {\n        Frag(SizeType s, SizeType o, SizeType m) : start(s), out(o), minIndex(m) {}\n        SizeType start;\n        SizeType out; //!< link-list of all output states\n        SizeType minIndex;\n    };\n\n    State& GetState(SizeType index) {\n        RAPIDJSON_ASSERT(index < stateCount_);\n        return states_.template Bottom<State>()[index];\n    }\n\n    const State& GetState(SizeType index) const {\n        RAPIDJSON_ASSERT(index < stateCount_);\n        return states_.template Bottom<State>()[index];\n    }\n\n    Range& GetRange(SizeType index) {\n        RAPIDJSON_ASSERT(index < rangeCount_);\n        return ranges_.template Bottom<Range>()[index];\n    }\n\n    const Range& GetRange(SizeType index) const {\n        RAPIDJSON_ASSERT(index < rangeCount_);\n        return ranges_.template Bottom<Range>()[index];\n    }\n\n    template <typename InputStream>\n    void Parse(DecodedStream<InputStream, Encoding>& ds) {\n        Stack<Allocator> operandStack(allocator_, 256);    // Frag\n        Stack<Allocator> operatorStack(allocator_, 256);   // Operator\n        Stack<Allocator> atomCountStack(allocator_, 256);  // unsigned (Atom per parenthesis)\n\n        *atomCountStack.template Push<unsigned>() = 0;\n\n        unsigned codepoint;\n        while (ds.Peek() != 0) {\n            switch (codepoint = ds.Take()) {\n                case '^':\n                    anchorBegin_ = true;\n                    break;\n\n                case '$':\n                    anchorEnd_ = true;\n                    break;\n\n                case '|':\n                    while (!operatorStack.Empty() && *operatorStack.template Top<Operator>() < kAlternation)\n                        if (!Eval(operandStack, *operatorStack.template Pop<Operator>(1)))\n                            return;\n                    *operatorStack.template Push<Operator>() = kAlternation;\n                    *atomCountStack.template Top<unsigned>() = 0;\n                    break;\n\n                case '(':\n                    *operatorStack.template Push<Operator>() = kLeftParenthesis;\n                    *atomCountStack.template Push<unsigned>() = 0;\n                    break;\n\n                case ')':\n                    while (!operatorStack.Empty() && *operatorStack.template Top<Operator>() != kLeftParenthesis)\n                        if (!Eval(operandStack, *operatorStack.template Pop<Operator>(1)))\n                            return;\n                    if (operatorStack.Empty())\n                        return;\n                    operatorStack.template Pop<Operator>(1);\n                    atomCountStack.template Pop<unsigned>(1);\n                    ImplicitConcatenation(atomCountStack, operatorStack);\n                    break;\n\n                case '?':\n                    if (!Eval(operandStack, kZeroOrOne))\n                        return;\n                    break;\n\n                case '*':\n                    if (!Eval(operandStack, kZeroOrMore))\n                        return;\n                    break;\n\n                case '+':\n                    if (!Eval(operandStack, kOneOrMore))\n                        return;\n                    break;\n\n                case '{':\n                    {\n                        unsigned n, m;\n                        if (!ParseUnsigned(ds, &n))\n                            return;\n\n                        if (ds.Peek() == ',') {\n                            ds.Take();\n                            if (ds.Peek() == '}')\n                                m = kInfinityQuantifier;\n                            else if (!ParseUnsigned(ds, &m) || m < n)\n                                return;\n                        }\n                        else\n                            m = n;\n\n                        if (!EvalQuantifier(operandStack, n, m) || ds.Peek() != '}')\n                            return;\n                        ds.Take();\n                    }\n                    break;\n\n                case '.':\n                    PushOperand(operandStack, kAnyCharacterClass);\n                    ImplicitConcatenation(atomCountStack, operatorStack);\n                    break;\n\n                case '[':\n                    {\n                        SizeType range;\n                        if (!ParseRange(ds, &range))\n                            return;\n                        SizeType s = NewState(kRegexInvalidState, kRegexInvalidState, kRangeCharacterClass);\n                        GetState(s).rangeStart = range;\n                        *operandStack.template Push<Frag>() = Frag(s, s, s);\n                    }\n                    ImplicitConcatenation(atomCountStack, operatorStack);\n                    break;\n\n                case '\\\\': // Escape character\n                    if (!CharacterEscape(ds, &codepoint))\n                        return; // Unsupported escape character\n                    // fall through to default\n                    RAPIDJSON_DELIBERATE_FALLTHROUGH;\n\n                default: // Pattern character\n                    PushOperand(operandStack, codepoint);\n                    ImplicitConcatenation(atomCountStack, operatorStack);\n            }\n        }\n\n        while (!operatorStack.Empty())\n            if (!Eval(operandStack, *operatorStack.template Pop<Operator>(1)))\n                return;\n\n        // Link the operand to matching state.\n        if (operandStack.GetSize() == sizeof(Frag)) {\n            Frag* e = operandStack.template Pop<Frag>(1);\n            Patch(e->out, NewState(kRegexInvalidState, kRegexInvalidState, 0));\n            root_ = e->start;\n\n#if RAPIDJSON_REGEX_VERBOSE\n            printf(\"root: %d\\n\", root_);\n            for (SizeType i = 0; i < stateCount_ ; i++) {\n                State& s = GetState(i);\n                printf(\"[%2d] out: %2d out1: %2d c: '%c'\\n\", i, s.out, s.out1, (char)s.codepoint);\n            }\n            printf(\"\\n\");\n#endif\n        }\n    }\n\n    SizeType NewState(SizeType out, SizeType out1, unsigned codepoint) {\n        State* s = states_.template Push<State>();\n        s->out = out;\n        s->out1 = out1;\n        s->codepoint = codepoint;\n        s->rangeStart = kRegexInvalidRange;\n        return stateCount_++;\n    }\n\n    void PushOperand(Stack<Allocator>& operandStack, unsigned codepoint) {\n        SizeType s = NewState(kRegexInvalidState, kRegexInvalidState, codepoint);\n        *operandStack.template Push<Frag>() = Frag(s, s, s);\n    }\n\n    void ImplicitConcatenation(Stack<Allocator>& atomCountStack, Stack<Allocator>& operatorStack) {\n        if (*atomCountStack.template Top<unsigned>())\n            *operatorStack.template Push<Operator>() = kConcatenation;\n        (*atomCountStack.template Top<unsigned>())++;\n    }\n\n    SizeType Append(SizeType l1, SizeType l2) {\n        SizeType old = l1;\n        while (GetState(l1).out != kRegexInvalidState)\n            l1 = GetState(l1).out;\n        GetState(l1).out = l2;\n        return old;\n    }\n\n    void Patch(SizeType l, SizeType s) {\n        for (SizeType next; l != kRegexInvalidState; l = next) {\n            next = GetState(l).out;\n            GetState(l).out = s;\n        }\n    }\n\n    bool Eval(Stack<Allocator>& operandStack, Operator op) {\n        switch (op) {\n            case kConcatenation:\n                RAPIDJSON_ASSERT(operandStack.GetSize() >= sizeof(Frag) * 2);\n                {\n                    Frag e2 = *operandStack.template Pop<Frag>(1);\n                    Frag e1 = *operandStack.template Pop<Frag>(1);\n                    Patch(e1.out, e2.start);\n                    *operandStack.template Push<Frag>() = Frag(e1.start, e2.out, Min(e1.minIndex, e2.minIndex));\n                }\n                return true;\n\n            case kAlternation:\n                if (operandStack.GetSize() >= sizeof(Frag) * 2) {\n                    Frag e2 = *operandStack.template Pop<Frag>(1);\n                    Frag e1 = *operandStack.template Pop<Frag>(1);\n                    SizeType s = NewState(e1.start, e2.start, 0);\n                    *operandStack.template Push<Frag>() = Frag(s, Append(e1.out, e2.out), Min(e1.minIndex, e2.minIndex));\n                    return true;\n                }\n                return false;\n\n            case kZeroOrOne:\n                if (operandStack.GetSize() >= sizeof(Frag)) {\n                    Frag e = *operandStack.template Pop<Frag>(1);\n                    SizeType s = NewState(kRegexInvalidState, e.start, 0);\n                    *operandStack.template Push<Frag>() = Frag(s, Append(e.out, s), e.minIndex);\n                    return true;\n                }\n                return false;\n\n            case kZeroOrMore:\n                if (operandStack.GetSize() >= sizeof(Frag)) {\n                    Frag e = *operandStack.template Pop<Frag>(1);\n                    SizeType s = NewState(kRegexInvalidState, e.start, 0);\n                    Patch(e.out, s);\n                    *operandStack.template Push<Frag>() = Frag(s, s, e.minIndex);\n                    return true;\n                }\n                return false;\n\n            case kOneOrMore:\n                if (operandStack.GetSize() >= sizeof(Frag)) {\n                    Frag e = *operandStack.template Pop<Frag>(1);\n                    SizeType s = NewState(kRegexInvalidState, e.start, 0);\n                    Patch(e.out, s);\n                    *operandStack.template Push<Frag>() = Frag(e.start, s, e.minIndex);\n                    return true;\n                }\n                return false;\n\n            default: \n                // syntax error (e.g. unclosed kLeftParenthesis)\n                return false;\n        }\n    }\n\n    bool EvalQuantifier(Stack<Allocator>& operandStack, unsigned n, unsigned m) {\n        RAPIDJSON_ASSERT(n <= m);\n        RAPIDJSON_ASSERT(operandStack.GetSize() >= sizeof(Frag));\n\n        if (n == 0) {\n            if (m == 0)                             // a{0} not support\n                return false;\n            else if (m == kInfinityQuantifier)\n                Eval(operandStack, kZeroOrMore);    // a{0,} -> a*\n            else {\n                Eval(operandStack, kZeroOrOne);         // a{0,5} -> a?\n                for (unsigned i = 0; i < m - 1; i++)\n                    CloneTopOperand(operandStack);      // a{0,5} -> a? a? a? a? a?\n                for (unsigned i = 0; i < m - 1; i++)\n                    Eval(operandStack, kConcatenation); // a{0,5} -> a?a?a?a?a?\n            }\n            return true;\n        }\n\n        for (unsigned i = 0; i < n - 1; i++)        // a{3} -> a a a\n            CloneTopOperand(operandStack);\n\n        if (m == kInfinityQuantifier)\n            Eval(operandStack, kOneOrMore);         // a{3,} -> a a a+\n        else if (m > n) {\n            CloneTopOperand(operandStack);          // a{3,5} -> a a a a\n            Eval(operandStack, kZeroOrOne);         // a{3,5} -> a a a a?\n            for (unsigned i = n; i < m - 1; i++)\n                CloneTopOperand(operandStack);      // a{3,5} -> a a a a? a?\n            for (unsigned i = n; i < m; i++)\n                Eval(operandStack, kConcatenation); // a{3,5} -> a a aa?a?\n        }\n\n        for (unsigned i = 0; i < n - 1; i++)\n            Eval(operandStack, kConcatenation);     // a{3} -> aaa, a{3,} -> aaa+, a{3.5} -> aaaa?a?\n\n        return true;\n    }\n\n    static SizeType Min(SizeType a, SizeType b) { return a < b ? a : b; }\n\n    void CloneTopOperand(Stack<Allocator>& operandStack) {\n        const Frag src = *operandStack.template Top<Frag>(); // Copy constructor to prevent invalidation\n        SizeType count = stateCount_ - src.minIndex; // Assumes top operand contains states in [src->minIndex, stateCount_)\n        State* s = states_.template Push<State>(count);\n        memcpy(s, &GetState(src.minIndex), count * sizeof(State));\n        for (SizeType j = 0; j < count; j++) {\n            if (s[j].out != kRegexInvalidState)\n                s[j].out += count;\n            if (s[j].out1 != kRegexInvalidState)\n                s[j].out1 += count;\n        }\n        *operandStack.template Push<Frag>() = Frag(src.start + count, src.out + count, src.minIndex + count);\n        stateCount_ += count;\n    }\n\n    template <typename InputStream>\n    bool ParseUnsigned(DecodedStream<InputStream, Encoding>& ds, unsigned* u) {\n        unsigned r = 0;\n        if (ds.Peek() < '0' || ds.Peek() > '9')\n            return false;\n        while (ds.Peek() >= '0' && ds.Peek() <= '9') {\n            if (r >= 429496729 && ds.Peek() > '5') // 2^32 - 1 = 4294967295\n                return false; // overflow\n            r = r * 10 + (ds.Take() - '0');\n        }\n        *u = r;\n        return true;\n    }\n\n    template <typename InputStream>\n    bool ParseRange(DecodedStream<InputStream, Encoding>& ds, SizeType* range) {\n        bool isBegin = true;\n        bool negate = false;\n        int step = 0;\n        SizeType start = kRegexInvalidRange;\n        SizeType current = kRegexInvalidRange;\n        unsigned codepoint;\n        while ((codepoint = ds.Take()) != 0) {\n            if (isBegin) {\n                isBegin = false;\n                if (codepoint == '^') {\n                    negate = true;\n                    continue;\n                }\n            }\n\n            switch (codepoint) {\n            case ']':\n                if (start == kRegexInvalidRange)\n                    return false;   // Error: nothing inside []\n                if (step == 2) { // Add trailing '-'\n                    SizeType r = NewRange('-');\n                    RAPIDJSON_ASSERT(current != kRegexInvalidRange);\n                    GetRange(current).next = r;\n                }\n                if (negate)\n                    GetRange(start).start |= kRangeNegationFlag;\n                *range = start;\n                return true;\n\n            case '\\\\':\n                if (ds.Peek() == 'b') {\n                    ds.Take();\n                    codepoint = 0x0008; // Escape backspace character\n                }\n                else if (!CharacterEscape(ds, &codepoint))\n                    return false;\n                // fall through to default\n                RAPIDJSON_DELIBERATE_FALLTHROUGH;\n\n            default:\n                switch (step) {\n                case 1:\n                    if (codepoint == '-') {\n                        step++;\n                        break;\n                    }\n                    // fall through to step 0 for other characters\n                    RAPIDJSON_DELIBERATE_FALLTHROUGH;\n\n                case 0:\n                    {\n                        SizeType r = NewRange(codepoint);\n                        if (current != kRegexInvalidRange)\n                            GetRange(current).next = r;\n                        if (start == kRegexInvalidRange)\n                            start = r;\n                        current = r;\n                    }\n                    step = 1;\n                    break;\n\n                default:\n                    RAPIDJSON_ASSERT(step == 2);\n                    GetRange(current).end = codepoint;\n                    step = 0;\n                }\n            }\n        }\n        return false;\n    }\n    \n    SizeType NewRange(unsigned codepoint) {\n        Range* r = ranges_.template Push<Range>();\n        r->start = r->end = codepoint;\n        r->next = kRegexInvalidRange;\n        return rangeCount_++;\n    }\n\n    template <typename InputStream>\n    bool CharacterEscape(DecodedStream<InputStream, Encoding>& ds, unsigned* escapedCodepoint) {\n        unsigned codepoint;\n        switch (codepoint = ds.Take()) {\n            case '^':\n            case '$':\n            case '|':\n            case '(':\n            case ')':\n            case '?':\n            case '*':\n            case '+':\n            case '.':\n            case '[':\n            case ']':\n            case '{':\n            case '}':\n            case '\\\\':\n                *escapedCodepoint = codepoint; return true;\n            case 'f': *escapedCodepoint = 0x000C; return true;\n            case 'n': *escapedCodepoint = 0x000A; return true;\n            case 'r': *escapedCodepoint = 0x000D; return true;\n            case 't': *escapedCodepoint = 0x0009; return true;\n            case 'v': *escapedCodepoint = 0x000B; return true;\n            default:\n                return false; // Unsupported escape character\n        }\n    }\n\n    Allocator* ownAllocator_;\n    Allocator* allocator_;\n    Stack<Allocator> states_;\n    Stack<Allocator> ranges_;\n    SizeType root_;\n    SizeType stateCount_;\n    SizeType rangeCount_;\n\n    static const unsigned kInfinityQuantifier = ~0u;\n\n    // For SearchWithAnchoring()\n    bool anchorBegin_;\n    bool anchorEnd_;\n};\n\ntemplate <typename RegexType, typename Allocator = CrtAllocator>\nclass GenericRegexSearch {\npublic:\n    typedef typename RegexType::EncodingType Encoding;\n    typedef typename Encoding::Ch Ch;\n\n    GenericRegexSearch(const RegexType& regex, Allocator* allocator = 0) : \n        regex_(regex), allocator_(allocator), ownAllocator_(0),\n        state0_(allocator, 0), state1_(allocator, 0), stateSet_()\n    {\n        RAPIDJSON_ASSERT(regex_.IsValid());\n        if (!allocator_)\n            ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();\n        stateSet_ = static_cast<unsigned*>(allocator_->Malloc(GetStateSetSize()));\n        state0_.template Reserve<SizeType>(regex_.stateCount_);\n        state1_.template Reserve<SizeType>(regex_.stateCount_);\n    }\n\n    ~GenericRegexSearch() {\n        Allocator::Free(stateSet_);\n        RAPIDJSON_DELETE(ownAllocator_);\n    }\n\n    template <typename InputStream>\n    bool Match(InputStream& is) {\n        return SearchWithAnchoring(is, true, true);\n    }\n\n    bool Match(const Ch* s) {\n        GenericStringStream<Encoding> is(s);\n        return Match(is);\n    }\n\n    template <typename InputStream>\n    bool Search(InputStream& is) {\n        return SearchWithAnchoring(is, regex_.anchorBegin_, regex_.anchorEnd_);\n    }\n\n    bool Search(const Ch* s) {\n        GenericStringStream<Encoding> is(s);\n        return Search(is);\n    }\n\nprivate:\n    typedef typename RegexType::State State;\n    typedef typename RegexType::Range Range;\n\n    template <typename InputStream>\n    bool SearchWithAnchoring(InputStream& is, bool anchorBegin, bool anchorEnd) {\n        DecodedStream<InputStream, Encoding> ds(is);\n\n        state0_.Clear();\n        Stack<Allocator> *current = &state0_, *next = &state1_;\n        const size_t stateSetSize = GetStateSetSize();\n        std::memset(stateSet_, 0, stateSetSize);\n\n        bool matched = AddState(*current, regex_.root_);\n        unsigned codepoint;\n        while (!current->Empty() && (codepoint = ds.Take()) != 0) {\n            std::memset(stateSet_, 0, stateSetSize);\n            next->Clear();\n            matched = false;\n            for (const SizeType* s = current->template Bottom<SizeType>(); s != current->template End<SizeType>(); ++s) {\n                const State& sr = regex_.GetState(*s);\n                if (sr.codepoint == codepoint ||\n                    sr.codepoint == RegexType::kAnyCharacterClass || \n                    (sr.codepoint == RegexType::kRangeCharacterClass && MatchRange(sr.rangeStart, codepoint)))\n                {\n                    matched = AddState(*next, sr.out) || matched;\n                    if (!anchorEnd && matched)\n                        return true;\n                }\n                if (!anchorBegin)\n                    AddState(*next, regex_.root_);\n            }\n            internal::Swap(current, next);\n        }\n\n        return matched;\n    }\n\n    size_t GetStateSetSize() const {\n        return (regex_.stateCount_ + 31) / 32 * 4;\n    }\n\n    // Return whether the added states is a match state\n    bool AddState(Stack<Allocator>& l, SizeType index) {\n        RAPIDJSON_ASSERT(index != kRegexInvalidState);\n\n        const State& s = regex_.GetState(index);\n        if (s.out1 != kRegexInvalidState) { // Split\n            bool matched = AddState(l, s.out);\n            return AddState(l, s.out1) || matched;\n        }\n        else if (!(stateSet_[index >> 5] & (1u << (index & 31)))) {\n            stateSet_[index >> 5] |= (1u << (index & 31));\n            *l.template PushUnsafe<SizeType>() = index;\n        }\n        return s.out == kRegexInvalidState; // by using PushUnsafe() above, we can ensure s is not validated due to reallocation.\n    }\n\n    bool MatchRange(SizeType rangeIndex, unsigned codepoint) const {\n        bool yes = (regex_.GetRange(rangeIndex).start & RegexType::kRangeNegationFlag) == 0;\n        while (rangeIndex != kRegexInvalidRange) {\n            const Range& r = regex_.GetRange(rangeIndex);\n            if (codepoint >= (r.start & ~RegexType::kRangeNegationFlag) && codepoint <= r.end)\n                return yes;\n            rangeIndex = r.next;\n        }\n        return !yes;\n    }\n\n    const RegexType& regex_;\n    Allocator* allocator_;\n    Allocator* ownAllocator_;\n    Stack<Allocator> state0_;\n    Stack<Allocator> state1_;\n    uint32_t* stateSet_;\n};\n\ntypedef GenericRegex<UTF8<> > Regex;\ntypedef GenericRegexSearch<Regex> RegexSearch;\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_POP\n#endif\n\n#if defined(__clang__) || defined(_MSC_VER)\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_INTERNAL_REGEX_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/stack.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_INTERNAL_STACK_H_\n#define RAPIDJSON_INTERNAL_STACK_H_\n\n#include \"../allocators.h\"\n#include \"swap.h\"\n#include <cstddef>\n\n#if defined(__clang__)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(c++98-compat)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\n///////////////////////////////////////////////////////////////////////////////\n// Stack\n\n//! A type-unsafe stack for storing different types of data.\n/*! \\tparam Allocator Allocator for allocating stack memory.\n*/\ntemplate <typename Allocator>\nclass Stack {\npublic:\n    // Optimization note: Do not allocate memory for stack_ in constructor.\n    // Do it lazily when first Push() -> Expand() -> Resize().\n    Stack(Allocator* allocator, size_t stackCapacity) : allocator_(allocator), ownAllocator_(0), stack_(0), stackTop_(0), stackEnd_(0), initialCapacity_(stackCapacity) {\n    }\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    Stack(Stack&& rhs)\n        : allocator_(rhs.allocator_),\n          ownAllocator_(rhs.ownAllocator_),\n          stack_(rhs.stack_),\n          stackTop_(rhs.stackTop_),\n          stackEnd_(rhs.stackEnd_),\n          initialCapacity_(rhs.initialCapacity_)\n    {\n        rhs.allocator_ = 0;\n        rhs.ownAllocator_ = 0;\n        rhs.stack_ = 0;\n        rhs.stackTop_ = 0;\n        rhs.stackEnd_ = 0;\n        rhs.initialCapacity_ = 0;\n    }\n#endif\n\n    ~Stack() {\n        Destroy();\n    }\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    Stack& operator=(Stack&& rhs) {\n        if (&rhs != this)\n        {\n            Destroy();\n\n            allocator_ = rhs.allocator_;\n            ownAllocator_ = rhs.ownAllocator_;\n            stack_ = rhs.stack_;\n            stackTop_ = rhs.stackTop_;\n            stackEnd_ = rhs.stackEnd_;\n            initialCapacity_ = rhs.initialCapacity_;\n\n            rhs.allocator_ = 0;\n            rhs.ownAllocator_ = 0;\n            rhs.stack_ = 0;\n            rhs.stackTop_ = 0;\n            rhs.stackEnd_ = 0;\n            rhs.initialCapacity_ = 0;\n        }\n        return *this;\n    }\n#endif\n\n    void Swap(Stack& rhs) RAPIDJSON_NOEXCEPT {\n        internal::Swap(allocator_, rhs.allocator_);\n        internal::Swap(ownAllocator_, rhs.ownAllocator_);\n        internal::Swap(stack_, rhs.stack_);\n        internal::Swap(stackTop_, rhs.stackTop_);\n        internal::Swap(stackEnd_, rhs.stackEnd_);\n        internal::Swap(initialCapacity_, rhs.initialCapacity_);\n    }\n\n    void Clear() { stackTop_ = stack_; }\n\n    void ShrinkToFit() { \n        if (Empty()) {\n            // If the stack is empty, completely deallocate the memory.\n            Allocator::Free(stack_); // NOLINT (+clang-analyzer-unix.Malloc)\n            stack_ = 0;\n            stackTop_ = 0;\n            stackEnd_ = 0;\n        }\n        else\n            Resize(GetSize());\n    }\n\n    // Optimization note: try to minimize the size of this function for force inline.\n    // Expansion is run very infrequently, so it is moved to another (probably non-inline) function.\n    template<typename T>\n    RAPIDJSON_FORCEINLINE void Reserve(size_t count = 1) {\n         // Expand the stack if needed\n        if (RAPIDJSON_UNLIKELY(static_cast<std::ptrdiff_t>(sizeof(T) * count) > (stackEnd_ - stackTop_)))\n            Expand<T>(count);\n    }\n\n    template<typename T>\n    RAPIDJSON_FORCEINLINE T* Push(size_t count = 1) {\n        Reserve<T>(count);\n        return PushUnsafe<T>(count);\n    }\n\n    template<typename T>\n    RAPIDJSON_FORCEINLINE T* PushUnsafe(size_t count = 1) {\n        RAPIDJSON_ASSERT(stackTop_);\n        RAPIDJSON_ASSERT(static_cast<std::ptrdiff_t>(sizeof(T) * count) <= (stackEnd_ - stackTop_));\n        T* ret = reinterpret_cast<T*>(stackTop_);\n        stackTop_ += sizeof(T) * count;\n        return ret;\n    }\n\n    template<typename T>\n    T* Pop(size_t count) {\n        RAPIDJSON_ASSERT(GetSize() >= count * sizeof(T));\n        stackTop_ -= count * sizeof(T);\n        return reinterpret_cast<T*>(stackTop_);\n    }\n\n    template<typename T>\n    T* Top() { \n        RAPIDJSON_ASSERT(GetSize() >= sizeof(T));\n        return reinterpret_cast<T*>(stackTop_ - sizeof(T));\n    }\n\n    template<typename T>\n    const T* Top() const {\n        RAPIDJSON_ASSERT(GetSize() >= sizeof(T));\n        return reinterpret_cast<T*>(stackTop_ - sizeof(T));\n    }\n\n    template<typename T>\n    T* End() { return reinterpret_cast<T*>(stackTop_); }\n\n    template<typename T>\n    const T* End() const { return reinterpret_cast<T*>(stackTop_); }\n\n    template<typename T>\n    T* Bottom() { return reinterpret_cast<T*>(stack_); }\n\n    template<typename T>\n    const T* Bottom() const { return reinterpret_cast<T*>(stack_); }\n\n    bool HasAllocator() const {\n        return allocator_ != 0;\n    }\n\n    Allocator& GetAllocator() {\n        RAPIDJSON_ASSERT(allocator_);\n        return *allocator_;\n    }\n\n    bool Empty() const { return stackTop_ == stack_; }\n    size_t GetSize() const { return static_cast<size_t>(stackTop_ - stack_); }\n    size_t GetCapacity() const { return static_cast<size_t>(stackEnd_ - stack_); }\n\nprivate:\n    template<typename T>\n    void Expand(size_t count) {\n        // Only expand the capacity if the current stack exists. Otherwise just create a stack with initial capacity.\n        size_t newCapacity;\n        if (stack_ == 0) {\n            if (!allocator_)\n                ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();\n            newCapacity = initialCapacity_;\n        } else {\n            newCapacity = GetCapacity();\n            newCapacity += (newCapacity + 1) / 2;\n        }\n        size_t newSize = GetSize() + sizeof(T) * count;\n        if (newCapacity < newSize)\n            newCapacity = newSize;\n\n        Resize(newCapacity);\n    }\n\n    void Resize(size_t newCapacity) {\n        const size_t size = GetSize();  // Backup the current size\n        stack_ = static_cast<char*>(allocator_->Realloc(stack_, GetCapacity(), newCapacity));\n        stackTop_ = stack_ + size;\n        stackEnd_ = stack_ + newCapacity;\n    }\n\n    void Destroy() {\n        Allocator::Free(stack_);\n        RAPIDJSON_DELETE(ownAllocator_); // Only delete if it is owned by the stack\n    }\n\n    // Prohibit copy constructor & assignment operator.\n    Stack(const Stack&);\n    Stack& operator=(const Stack&);\n\n    Allocator* allocator_;\n    Allocator* ownAllocator_;\n    char *stack_;\n    char *stackTop_;\n    char *stackEnd_;\n    size_t initialCapacity_;\n};\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#if defined(__clang__)\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_STACK_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/strfunc.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_INTERNAL_STRFUNC_H_\n#define RAPIDJSON_INTERNAL_STRFUNC_H_\n\n#include \"../stream.h\"\n#include <cwchar>\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\n//! Custom strlen() which works on different character types.\n/*! \\tparam Ch Character type (e.g. char, wchar_t, short)\n    \\param s Null-terminated input string.\n    \\return Number of characters in the string. \n    \\note This has the same semantics as strlen(), the return value is not number of Unicode codepoints.\n*/\ntemplate <typename Ch>\ninline SizeType StrLen(const Ch* s) {\n    RAPIDJSON_ASSERT(s != 0);\n    const Ch* p = s;\n    while (*p) ++p;\n    return SizeType(p - s);\n}\n\ntemplate <>\ninline SizeType StrLen(const char* s) {\n    return SizeType(std::strlen(s));\n}\n\ntemplate <>\ninline SizeType StrLen(const wchar_t* s) {\n    return SizeType(std::wcslen(s));\n}\n\n//! Returns number of code points in a encoded string.\ntemplate<typename Encoding>\nbool CountStringCodePoint(const typename Encoding::Ch* s, SizeType length, SizeType* outCount) {\n    RAPIDJSON_ASSERT(s != 0);\n    RAPIDJSON_ASSERT(outCount != 0);\n    GenericStringStream<Encoding> is(s);\n    const typename Encoding::Ch* end = s + length;\n    SizeType count = 0;\n    while (is.src_ < end) {\n        unsigned codepoint;\n        if (!Encoding::Decode(is, &codepoint))\n            return false;\n        count++;\n    }\n    *outCount = count;\n    return true;\n}\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_INTERNAL_STRFUNC_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/strtod.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_STRTOD_\n#define RAPIDJSON_STRTOD_\n\n#include \"ieee754.h\"\n#include \"biginteger.h\"\n#include \"diyfp.h\"\n#include \"pow10.h\"\n#include <climits>\n#include <limits>\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\ninline double FastPath(double significand, int exp) {\n    if (exp < -308)\n        return 0.0;\n    else if (exp >= 0)\n        return significand * internal::Pow10(exp);\n    else\n        return significand / internal::Pow10(-exp);\n}\n\ninline double StrtodNormalPrecision(double d, int p) {\n    if (p < -308) {\n        // Prevent expSum < -308, making Pow10(p) = 0\n        d = FastPath(d, -308);\n        d = FastPath(d, p + 308);\n    }\n    else\n        d = FastPath(d, p);\n    return d;\n}\n\ntemplate <typename T>\ninline T Min3(T a, T b, T c) {\n    T m = a;\n    if (m > b) m = b;\n    if (m > c) m = c;\n    return m;\n}\n\ninline int CheckWithinHalfULP(double b, const BigInteger& d, int dExp) {\n    const Double db(b);\n    const uint64_t bInt = db.IntegerSignificand();\n    const int bExp = db.IntegerExponent();\n    const int hExp = bExp - 1;\n\n    int dS_Exp2 = 0, dS_Exp5 = 0, bS_Exp2 = 0, bS_Exp5 = 0, hS_Exp2 = 0, hS_Exp5 = 0;\n\n    // Adjust for decimal exponent\n    if (dExp >= 0) {\n        dS_Exp2 += dExp;\n        dS_Exp5 += dExp;\n    }\n    else {\n        bS_Exp2 -= dExp;\n        bS_Exp5 -= dExp;\n        hS_Exp2 -= dExp;\n        hS_Exp5 -= dExp;\n    }\n\n    // Adjust for binary exponent\n    if (bExp >= 0)\n        bS_Exp2 += bExp;\n    else {\n        dS_Exp2 -= bExp;\n        hS_Exp2 -= bExp;\n    }\n\n    // Adjust for half ulp exponent\n    if (hExp >= 0)\n        hS_Exp2 += hExp;\n    else {\n        dS_Exp2 -= hExp;\n        bS_Exp2 -= hExp;\n    }\n\n    // Remove common power of two factor from all three scaled values\n    int common_Exp2 = Min3(dS_Exp2, bS_Exp2, hS_Exp2);\n    dS_Exp2 -= common_Exp2;\n    bS_Exp2 -= common_Exp2;\n    hS_Exp2 -= common_Exp2;\n\n    BigInteger dS = d;\n    dS.MultiplyPow5(static_cast<unsigned>(dS_Exp5)) <<= static_cast<unsigned>(dS_Exp2);\n\n    BigInteger bS(bInt);\n    bS.MultiplyPow5(static_cast<unsigned>(bS_Exp5)) <<= static_cast<unsigned>(bS_Exp2);\n\n    BigInteger hS(1);\n    hS.MultiplyPow5(static_cast<unsigned>(hS_Exp5)) <<= static_cast<unsigned>(hS_Exp2);\n\n    BigInteger delta(0);\n    dS.Difference(bS, &delta);\n\n    return delta.Compare(hS);\n}\n\ninline bool StrtodFast(double d, int p, double* result) {\n    // Use fast path for string-to-double conversion if possible\n    // see http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/\n    if (p > 22  && p < 22 + 16) {\n        // Fast Path Cases In Disguise\n        d *= internal::Pow10(p - 22);\n        p = 22;\n    }\n\n    if (p >= -22 && p <= 22 && d <= 9007199254740991.0) { // 2^53 - 1\n        *result = FastPath(d, p);\n        return true;\n    }\n    else\n        return false;\n}\n\n// Compute an approximation and see if it is within 1/2 ULP\ninline bool StrtodDiyFp(const char* decimals, int dLen, int dExp, double* result) {\n    uint64_t significand = 0;\n    int i = 0;   // 2^64 - 1 = 18446744073709551615, 1844674407370955161 = 0x1999999999999999    \n    for (; i < dLen; i++) {\n        if (significand  >  RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) ||\n            (significand == RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) && decimals[i] > '5'))\n            break;\n        significand = significand * 10u + static_cast<unsigned>(decimals[i] - '0');\n    }\n    \n    if (i < dLen && decimals[i] >= '5') // Rounding\n        significand++;\n\n    int remaining = dLen - i;\n    const int kUlpShift = 3;\n    const int kUlp = 1 << kUlpShift;\n    int64_t error = (remaining == 0) ? 0 : kUlp / 2;\n\n    DiyFp v(significand, 0);\n    v = v.Normalize();\n    error <<= -v.e;\n\n    dExp += remaining;\n\n    int actualExp;\n    DiyFp cachedPower = GetCachedPower10(dExp, &actualExp);\n    if (actualExp != dExp) {\n        static const DiyFp kPow10[] = {\n            DiyFp(RAPIDJSON_UINT64_C2(0xa0000000, 0x00000000), -60),  // 10^1\n            DiyFp(RAPIDJSON_UINT64_C2(0xc8000000, 0x00000000), -57),  // 10^2\n            DiyFp(RAPIDJSON_UINT64_C2(0xfa000000, 0x00000000), -54),  // 10^3\n            DiyFp(RAPIDJSON_UINT64_C2(0x9c400000, 0x00000000), -50),  // 10^4\n            DiyFp(RAPIDJSON_UINT64_C2(0xc3500000, 0x00000000), -47),  // 10^5\n            DiyFp(RAPIDJSON_UINT64_C2(0xf4240000, 0x00000000), -44),  // 10^6\n            DiyFp(RAPIDJSON_UINT64_C2(0x98968000, 0x00000000), -40)   // 10^7\n        };\n        int adjustment = dExp - actualExp;\n        RAPIDJSON_ASSERT(adjustment >= 1 && adjustment < 8);\n        v = v * kPow10[adjustment - 1];\n        if (dLen + adjustment > 19) // has more digits than decimal digits in 64-bit\n            error += kUlp / 2;\n    }\n\n    v = v * cachedPower;\n\n    error += kUlp + (error == 0 ? 0 : 1);\n\n    const int oldExp = v.e;\n    v = v.Normalize();\n    error <<= oldExp - v.e;\n\n    const int effectiveSignificandSize = Double::EffectiveSignificandSize(64 + v.e);\n    int precisionSize = 64 - effectiveSignificandSize;\n    if (precisionSize + kUlpShift >= 64) {\n        int scaleExp = (precisionSize + kUlpShift) - 63;\n        v.f >>= scaleExp;\n        v.e += scaleExp; \n        error = (error >> scaleExp) + 1 + kUlp;\n        precisionSize -= scaleExp;\n    }\n\n    DiyFp rounded(v.f >> precisionSize, v.e + precisionSize);\n    const uint64_t precisionBits = (v.f & ((uint64_t(1) << precisionSize) - 1)) * kUlp;\n    const uint64_t halfWay = (uint64_t(1) << (precisionSize - 1)) * kUlp;\n    if (precisionBits >= halfWay + static_cast<unsigned>(error)) {\n        rounded.f++;\n        if (rounded.f & (DiyFp::kDpHiddenBit << 1)) { // rounding overflows mantissa (issue #340)\n            rounded.f >>= 1;\n            rounded.e++;\n        }\n    }\n\n    *result = rounded.ToDouble();\n\n    return halfWay - static_cast<unsigned>(error) >= precisionBits || precisionBits >= halfWay + static_cast<unsigned>(error);\n}\n\ninline double StrtodBigInteger(double approx, const char* decimals, int dLen, int dExp) {\n    RAPIDJSON_ASSERT(dLen >= 0);\n    const BigInteger dInt(decimals, static_cast<unsigned>(dLen));\n    Double a(approx);\n    int cmp = CheckWithinHalfULP(a.Value(), dInt, dExp);\n    if (cmp < 0)\n        return a.Value();  // within half ULP\n    else if (cmp == 0) {\n        // Round towards even\n        if (a.Significand() & 1)\n            return a.NextPositiveDouble();\n        else\n            return a.Value();\n    }\n    else // adjustment\n        return a.NextPositiveDouble();\n}\n\ninline double StrtodFullPrecision(double d, int p, const char* decimals, size_t length, size_t decimalPosition, int exp) {\n    RAPIDJSON_ASSERT(d >= 0.0);\n    RAPIDJSON_ASSERT(length >= 1);\n\n    double result = 0.0;\n    if (StrtodFast(d, p, &result))\n        return result;\n\n    RAPIDJSON_ASSERT(length <= INT_MAX);\n    int dLen = static_cast<int>(length);\n\n    RAPIDJSON_ASSERT(length >= decimalPosition);\n    RAPIDJSON_ASSERT(length - decimalPosition <= INT_MAX);\n    int dExpAdjust = static_cast<int>(length - decimalPosition);\n\n    RAPIDJSON_ASSERT(exp >= INT_MIN + dExpAdjust);\n    int dExp = exp - dExpAdjust;\n\n    // Make sure length+dExp does not overflow\n    RAPIDJSON_ASSERT(dExp <= INT_MAX - dLen);\n\n    // Trim leading zeros\n    while (dLen > 0 && *decimals == '0') {\n        dLen--;\n        decimals++;\n    }\n\n    // Trim trailing zeros\n    while (dLen > 0 && decimals[dLen - 1] == '0') {\n        dLen--;\n        dExp++;\n    }\n\n    if (dLen == 0) { // Buffer only contains zeros.\n        return 0.0;\n    }\n\n    // Trim right-most digits\n    const int kMaxDecimalDigit = 767 + 1;\n    if (dLen > kMaxDecimalDigit) {\n        dExp += dLen - kMaxDecimalDigit;\n        dLen = kMaxDecimalDigit;\n    }\n\n    // If too small, underflow to zero.\n    // Any x <= 10^-324 is interpreted as zero.\n    if (dLen + dExp <= -324)\n        return 0.0;\n\n    // If too large, overflow to infinity.\n    // Any x >= 10^309 is interpreted as +infinity.\n    if (dLen + dExp > 309)\n        return std::numeric_limits<double>::infinity();\n\n    if (StrtodDiyFp(decimals, dLen, dExp, &result))\n        return result;\n\n    // Use approximation from StrtodDiyFp and make adjustment with BigInteger comparison\n    return StrtodBigInteger(result, decimals, dLen, dExp);\n}\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_STRTOD_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/internal/swap.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n//\n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed\n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_INTERNAL_SWAP_H_\n#define RAPIDJSON_INTERNAL_SWAP_H_\n\n#include \"../rapidjson.h\"\n\n#if defined(__clang__)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(c++98-compat)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\nnamespace internal {\n\n//! Custom swap() to avoid dependency on C++ <algorithm> header\n/*! \\tparam T Type of the arguments to swap, should be instantiated with primitive C++ types only.\n    \\note This has the same semantics as std::swap().\n*/\ntemplate <typename T>\ninline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT {\n    T tmp = a;\n        a = b;\n        b = tmp;\n}\n\n} // namespace internal\nRAPIDJSON_NAMESPACE_END\n\n#if defined(__clang__)\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_INTERNAL_SWAP_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/istreamwrapper.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_ISTREAMWRAPPER_H_\n#define RAPIDJSON_ISTREAMWRAPPER_H_\n\n#include \"stream.h\"\n#include <iosfwd>\n#include <ios>\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(padded)\n#elif defined(_MSC_VER)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(4351) // new behavior: elements of array 'array' will be default initialized\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Wrapper of \\c std::basic_istream into RapidJSON's Stream concept.\n/*!\n    The classes can be wrapped including but not limited to:\n\n    - \\c std::istringstream\n    - \\c std::stringstream\n    - \\c std::wistringstream\n    - \\c std::wstringstream\n    - \\c std::ifstream\n    - \\c std::fstream\n    - \\c std::wifstream\n    - \\c std::wfstream\n\n    \\tparam StreamType Class derived from \\c std::basic_istream.\n*/\n   \ntemplate <typename StreamType>\nclass BasicIStreamWrapper {\npublic:\n    typedef typename StreamType::char_type Ch;\n\n    //! Constructor.\n    /*!\n        \\param stream stream opened for read.\n    */\n    BasicIStreamWrapper(StreamType &stream) : stream_(stream), buffer_(peekBuffer_), bufferSize_(4), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) { \n        Read();\n    }\n\n    //! Constructor.\n    /*!\n        \\param stream stream opened for read.\n        \\param buffer user-supplied buffer.\n        \\param bufferSize size of buffer in bytes. Must >=4 bytes.\n    */\n    BasicIStreamWrapper(StreamType &stream, char* buffer, size_t bufferSize) : stream_(stream), buffer_(buffer), bufferSize_(bufferSize), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) { \n        RAPIDJSON_ASSERT(bufferSize >= 4);\n        Read();\n    }\n\n    Ch Peek() const { return *current_; }\n    Ch Take() { Ch c = *current_; Read(); return c; }\n    size_t Tell() const { return count_ + static_cast<size_t>(current_ - buffer_); }\n\n    // Not implemented\n    void Put(Ch) { RAPIDJSON_ASSERT(false); }\n    void Flush() { RAPIDJSON_ASSERT(false); } \n    Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }\n\n    // For encoding detection only.\n    const Ch* Peek4() const {\n        return (current_ + 4 - !eof_ <= bufferLast_) ? current_ : 0;\n    }\n\nprivate:\n    BasicIStreamWrapper();\n    BasicIStreamWrapper(const BasicIStreamWrapper&);\n    BasicIStreamWrapper& operator=(const BasicIStreamWrapper&);\n\n    void Read() {\n        if (current_ < bufferLast_)\n            ++current_;\n        else if (!eof_) {\n            count_ += readCount_;\n            readCount_ = bufferSize_;\n            bufferLast_ = buffer_ + readCount_ - 1;\n            current_ = buffer_;\n\n            if (!stream_.read(buffer_, static_cast<std::streamsize>(bufferSize_))) {\n                readCount_ = static_cast<size_t>(stream_.gcount());\n                *(bufferLast_ = buffer_ + readCount_) = '\\0';\n                eof_ = true;\n            }\n        }\n    }\n\n    StreamType &stream_;\n    Ch peekBuffer_[4], *buffer_;\n    size_t bufferSize_;\n    Ch *bufferLast_;\n    Ch *current_;\n    size_t readCount_;\n    size_t count_;  //!< Number of characters read\n    bool eof_;\n};\n\ntypedef BasicIStreamWrapper<std::istream> IStreamWrapper;\ntypedef BasicIStreamWrapper<std::wistream> WIStreamWrapper;\n\n#if defined(__clang__) || defined(_MSC_VER)\nRAPIDJSON_DIAG_POP\n#endif\n\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_ISTREAMWRAPPER_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/memorybuffer.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_MEMORYBUFFER_H_\n#define RAPIDJSON_MEMORYBUFFER_H_\n\n#include \"stream.h\"\n#include \"internal/stack.h\"\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Represents an in-memory output byte stream.\n/*!\n    This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream.\n\n    It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file.\n\n    Differences between MemoryBuffer and StringBuffer:\n    1. StringBuffer has Encoding but MemoryBuffer is only a byte buffer. \n    2. StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator.\n\n    \\tparam Allocator type for allocating memory buffer.\n    \\note implements Stream concept\n*/\ntemplate <typename Allocator = CrtAllocator>\nstruct GenericMemoryBuffer {\n    typedef char Ch; // byte\n\n    GenericMemoryBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {}\n\n    void Put(Ch c) { *stack_.template Push<Ch>() = c; }\n    void Flush() {}\n\n    void Clear() { stack_.Clear(); }\n    void ShrinkToFit() { stack_.ShrinkToFit(); }\n    Ch* Push(size_t count) { return stack_.template Push<Ch>(count); }\n    void Pop(size_t count) { stack_.template Pop<Ch>(count); }\n\n    const Ch* GetBuffer() const {\n        return stack_.template Bottom<Ch>();\n    }\n\n    size_t GetSize() const { return stack_.GetSize(); }\n\n    static const size_t kDefaultCapacity = 256;\n    mutable internal::Stack<Allocator> stack_;\n};\n\ntypedef GenericMemoryBuffer<> MemoryBuffer;\n\n//! Implement specialized version of PutN() with memset() for better performance.\ntemplate<>\ninline void PutN(MemoryBuffer& memoryBuffer, char c, size_t n) {\n    std::memset(memoryBuffer.stack_.Push<char>(n), c, n * sizeof(c));\n}\n\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_MEMORYBUFFER_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/memorystream.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_MEMORYSTREAM_H_\n#define RAPIDJSON_MEMORYSTREAM_H_\n\n#include \"stream.h\"\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(unreachable-code)\nRAPIDJSON_DIAG_OFF(missing-noreturn)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Represents an in-memory input byte stream.\n/*!\n    This class is mainly for being wrapped by EncodedInputStream or AutoUTFInputStream.\n\n    It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file.\n\n    Differences between MemoryStream and StringStream:\n    1. StringStream has encoding but MemoryStream is a byte stream.\n    2. MemoryStream needs size of the source buffer and the buffer don't need to be null terminated. StringStream assume null-terminated string as source.\n    3. MemoryStream supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4().\n    \\note implements Stream concept\n*/\nstruct MemoryStream {\n    typedef char Ch; // byte\n\n    MemoryStream(const Ch *src, size_t size) : src_(src), begin_(src), end_(src + size), size_(size) {}\n\n    Ch Peek() const { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\\0' : *src_; }\n    Ch Take() { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\\0' : *src_++; }\n    size_t Tell() const { return static_cast<size_t>(src_ - begin_); }\n\n    Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    void Put(Ch) { RAPIDJSON_ASSERT(false); }\n    void Flush() { RAPIDJSON_ASSERT(false); }\n    size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }\n\n    // For encoding detection only.\n    const Ch* Peek4() const {\n        return Tell() + 4 <= size_ ? src_ : 0;\n    }\n\n    const Ch* src_;     //!< Current read position.\n    const Ch* begin_;   //!< Original head of the string.\n    const Ch* end_;     //!< End of stream.\n    size_t size_;       //!< Size of the stream.\n};\n\nRAPIDJSON_NAMESPACE_END\n\n#ifdef __clang__\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_MEMORYBUFFER_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/msinttypes/inttypes.h",
    "content": "// ISO C9x  compliant inttypes.h for Microsoft Visual Studio\n// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 \n// \n//  Copyright (c) 2006-2013 Alexander Chemeris\n// \n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n// \n//   1. Redistributions of source code must retain the above copyright notice,\n//      this list of conditions and the following disclaimer.\n// \n//   2. Redistributions in binary form must reproduce the above copyright\n//      notice, this list of conditions and the following disclaimer in the\n//      documentation and/or other materials provided with the distribution.\n// \n//   3. Neither the name of the product nor the names of its contributors may\n//      be used to endorse or promote products derived from this software\n//      without specific prior written permission.\n// \n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\n// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \n// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\n// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n// \n///////////////////////////////////////////////////////////////////////////////\n\n// The above software in this distribution may have been modified by \n// THL A29 Limited (\"Tencent Modifications\"). \n// All Tencent Modifications are Copyright (C) 2015 THL A29 Limited.\n\n#ifndef _MSC_VER // [\n#error \"Use this header only with Microsoft Visual C++ compilers!\"\n#endif // _MSC_VER ]\n\n#ifndef _MSC_INTTYPES_H_ // [\n#define _MSC_INTTYPES_H_\n\n#if _MSC_VER > 1000\n#pragma once\n#endif\n\n#include \"stdint.h\"\n\n// miloyip: VC supports inttypes.h since VC2013\n#if _MSC_VER >= 1800\n#include <inttypes.h>\n#else\n\n// 7.8 Format conversion of integer types\n\ntypedef struct {\n   intmax_t quot;\n   intmax_t rem;\n} imaxdiv_t;\n\n// 7.8.1 Macros for format specifiers\n\n#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [   See footnote 185 at page 198\n\n// The fprintf macros for signed integers are:\n#define PRId8       \"d\"\n#define PRIi8       \"i\"\n#define PRIdLEAST8  \"d\"\n#define PRIiLEAST8  \"i\"\n#define PRIdFAST8   \"d\"\n#define PRIiFAST8   \"i\"\n\n#define PRId16       \"hd\"\n#define PRIi16       \"hi\"\n#define PRIdLEAST16  \"hd\"\n#define PRIiLEAST16  \"hi\"\n#define PRIdFAST16   \"hd\"\n#define PRIiFAST16   \"hi\"\n\n#define PRId32       \"I32d\"\n#define PRIi32       \"I32i\"\n#define PRIdLEAST32  \"I32d\"\n#define PRIiLEAST32  \"I32i\"\n#define PRIdFAST32   \"I32d\"\n#define PRIiFAST32   \"I32i\"\n\n#define PRId64       \"I64d\"\n#define PRIi64       \"I64i\"\n#define PRIdLEAST64  \"I64d\"\n#define PRIiLEAST64  \"I64i\"\n#define PRIdFAST64   \"I64d\"\n#define PRIiFAST64   \"I64i\"\n\n#define PRIdMAX     \"I64d\"\n#define PRIiMAX     \"I64i\"\n\n#define PRIdPTR     \"Id\"\n#define PRIiPTR     \"Ii\"\n\n// The fprintf macros for unsigned integers are:\n#define PRIo8       \"o\"\n#define PRIu8       \"u\"\n#define PRIx8       \"x\"\n#define PRIX8       \"X\"\n#define PRIoLEAST8  \"o\"\n#define PRIuLEAST8  \"u\"\n#define PRIxLEAST8  \"x\"\n#define PRIXLEAST8  \"X\"\n#define PRIoFAST8   \"o\"\n#define PRIuFAST8   \"u\"\n#define PRIxFAST8   \"x\"\n#define PRIXFAST8   \"X\"\n\n#define PRIo16       \"ho\"\n#define PRIu16       \"hu\"\n#define PRIx16       \"hx\"\n#define PRIX16       \"hX\"\n#define PRIoLEAST16  \"ho\"\n#define PRIuLEAST16  \"hu\"\n#define PRIxLEAST16  \"hx\"\n#define PRIXLEAST16  \"hX\"\n#define PRIoFAST16   \"ho\"\n#define PRIuFAST16   \"hu\"\n#define PRIxFAST16   \"hx\"\n#define PRIXFAST16   \"hX\"\n\n#define PRIo32       \"I32o\"\n#define PRIu32       \"I32u\"\n#define PRIx32       \"I32x\"\n#define PRIX32       \"I32X\"\n#define PRIoLEAST32  \"I32o\"\n#define PRIuLEAST32  \"I32u\"\n#define PRIxLEAST32  \"I32x\"\n#define PRIXLEAST32  \"I32X\"\n#define PRIoFAST32   \"I32o\"\n#define PRIuFAST32   \"I32u\"\n#define PRIxFAST32   \"I32x\"\n#define PRIXFAST32   \"I32X\"\n\n#define PRIo64       \"I64o\"\n#define PRIu64       \"I64u\"\n#define PRIx64       \"I64x\"\n#define PRIX64       \"I64X\"\n#define PRIoLEAST64  \"I64o\"\n#define PRIuLEAST64  \"I64u\"\n#define PRIxLEAST64  \"I64x\"\n#define PRIXLEAST64  \"I64X\"\n#define PRIoFAST64   \"I64o\"\n#define PRIuFAST64   \"I64u\"\n#define PRIxFAST64   \"I64x\"\n#define PRIXFAST64   \"I64X\"\n\n#define PRIoMAX     \"I64o\"\n#define PRIuMAX     \"I64u\"\n#define PRIxMAX     \"I64x\"\n#define PRIXMAX     \"I64X\"\n\n#define PRIoPTR     \"Io\"\n#define PRIuPTR     \"Iu\"\n#define PRIxPTR     \"Ix\"\n#define PRIXPTR     \"IX\"\n\n// The fscanf macros for signed integers are:\n#define SCNd8       \"d\"\n#define SCNi8       \"i\"\n#define SCNdLEAST8  \"d\"\n#define SCNiLEAST8  \"i\"\n#define SCNdFAST8   \"d\"\n#define SCNiFAST8   \"i\"\n\n#define SCNd16       \"hd\"\n#define SCNi16       \"hi\"\n#define SCNdLEAST16  \"hd\"\n#define SCNiLEAST16  \"hi\"\n#define SCNdFAST16   \"hd\"\n#define SCNiFAST16   \"hi\"\n\n#define SCNd32       \"ld\"\n#define SCNi32       \"li\"\n#define SCNdLEAST32  \"ld\"\n#define SCNiLEAST32  \"li\"\n#define SCNdFAST32   \"ld\"\n#define SCNiFAST32   \"li\"\n\n#define SCNd64       \"I64d\"\n#define SCNi64       \"I64i\"\n#define SCNdLEAST64  \"I64d\"\n#define SCNiLEAST64  \"I64i\"\n#define SCNdFAST64   \"I64d\"\n#define SCNiFAST64   \"I64i\"\n\n#define SCNdMAX     \"I64d\"\n#define SCNiMAX     \"I64i\"\n\n#ifdef _WIN64 // [\n#  define SCNdPTR     \"I64d\"\n#  define SCNiPTR     \"I64i\"\n#else  // _WIN64 ][\n#  define SCNdPTR     \"ld\"\n#  define SCNiPTR     \"li\"\n#endif  // _WIN64 ]\n\n// The fscanf macros for unsigned integers are:\n#define SCNo8       \"o\"\n#define SCNu8       \"u\"\n#define SCNx8       \"x\"\n#define SCNX8       \"X\"\n#define SCNoLEAST8  \"o\"\n#define SCNuLEAST8  \"u\"\n#define SCNxLEAST8  \"x\"\n#define SCNXLEAST8  \"X\"\n#define SCNoFAST8   \"o\"\n#define SCNuFAST8   \"u\"\n#define SCNxFAST8   \"x\"\n#define SCNXFAST8   \"X\"\n\n#define SCNo16       \"ho\"\n#define SCNu16       \"hu\"\n#define SCNx16       \"hx\"\n#define SCNX16       \"hX\"\n#define SCNoLEAST16  \"ho\"\n#define SCNuLEAST16  \"hu\"\n#define SCNxLEAST16  \"hx\"\n#define SCNXLEAST16  \"hX\"\n#define SCNoFAST16   \"ho\"\n#define SCNuFAST16   \"hu\"\n#define SCNxFAST16   \"hx\"\n#define SCNXFAST16   \"hX\"\n\n#define SCNo32       \"lo\"\n#define SCNu32       \"lu\"\n#define SCNx32       \"lx\"\n#define SCNX32       \"lX\"\n#define SCNoLEAST32  \"lo\"\n#define SCNuLEAST32  \"lu\"\n#define SCNxLEAST32  \"lx\"\n#define SCNXLEAST32  \"lX\"\n#define SCNoFAST32   \"lo\"\n#define SCNuFAST32   \"lu\"\n#define SCNxFAST32   \"lx\"\n#define SCNXFAST32   \"lX\"\n\n#define SCNo64       \"I64o\"\n#define SCNu64       \"I64u\"\n#define SCNx64       \"I64x\"\n#define SCNX64       \"I64X\"\n#define SCNoLEAST64  \"I64o\"\n#define SCNuLEAST64  \"I64u\"\n#define SCNxLEAST64  \"I64x\"\n#define SCNXLEAST64  \"I64X\"\n#define SCNoFAST64   \"I64o\"\n#define SCNuFAST64   \"I64u\"\n#define SCNxFAST64   \"I64x\"\n#define SCNXFAST64   \"I64X\"\n\n#define SCNoMAX     \"I64o\"\n#define SCNuMAX     \"I64u\"\n#define SCNxMAX     \"I64x\"\n#define SCNXMAX     \"I64X\"\n\n#ifdef _WIN64 // [\n#  define SCNoPTR     \"I64o\"\n#  define SCNuPTR     \"I64u\"\n#  define SCNxPTR     \"I64x\"\n#  define SCNXPTR     \"I64X\"\n#else  // _WIN64 ][\n#  define SCNoPTR     \"lo\"\n#  define SCNuPTR     \"lu\"\n#  define SCNxPTR     \"lx\"\n#  define SCNXPTR     \"lX\"\n#endif  // _WIN64 ]\n\n#endif // __STDC_FORMAT_MACROS ]\n\n// 7.8.2 Functions for greatest-width integer types\n\n// 7.8.2.1 The imaxabs function\n#define imaxabs _abs64\n\n// 7.8.2.2 The imaxdiv function\n\n// This is modified version of div() function from Microsoft's div.c found\n// in %MSVC.NET%\\crt\\src\\div.c\n#ifdef STATIC_IMAXDIV // [\nstatic\n#else // STATIC_IMAXDIV ][\n_inline\n#endif // STATIC_IMAXDIV ]\nimaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)\n{\n   imaxdiv_t result;\n\n   result.quot = numer / denom;\n   result.rem = numer % denom;\n\n   if (numer < 0 && result.rem > 0) {\n      // did division wrong; must fix up\n      ++result.quot;\n      result.rem -= denom;\n   }\n\n   return result;\n}\n\n// 7.8.2.3 The strtoimax and strtoumax functions\n#define strtoimax _strtoi64\n#define strtoumax _strtoui64\n\n// 7.8.2.4 The wcstoimax and wcstoumax functions\n#define wcstoimax _wcstoi64\n#define wcstoumax _wcstoui64\n\n#endif // _MSC_VER >= 1800\n\n#endif // _MSC_INTTYPES_H_ ]\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/msinttypes/stdint.h",
    "content": "// ISO C9x  compliant stdint.h for Microsoft Visual Studio\n// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 \n// \n//  Copyright (c) 2006-2013 Alexander Chemeris\n// \n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n// \n//   1. Redistributions of source code must retain the above copyright notice,\n//      this list of conditions and the following disclaimer.\n// \n//   2. Redistributions in binary form must reproduce the above copyright\n//      notice, this list of conditions and the following disclaimer in the\n//      documentation and/or other materials provided with the distribution.\n// \n//   3. Neither the name of the product nor the names of its contributors may\n//      be used to endorse or promote products derived from this software\n//      without specific prior written permission.\n// \n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\n// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \n// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\n// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n// \n///////////////////////////////////////////////////////////////////////////////\n\n// The above software in this distribution may have been modified by \n// THL A29 Limited (\"Tencent Modifications\"). \n// All Tencent Modifications are Copyright (C) 2015 THL A29 Limited.\n\n#ifndef _MSC_VER // [\n#error \"Use this header only with Microsoft Visual C++ compilers!\"\n#endif // _MSC_VER ]\n\n#ifndef _MSC_STDINT_H_ // [\n#define _MSC_STDINT_H_\n\n#if _MSC_VER > 1000\n#pragma once\n#endif\n\n// miloyip: Originally Visual Studio 2010 uses its own stdint.h. However it generates warning with INT64_C(), so change to use this file for vs2010.\n#if _MSC_VER >= 1600 // [\n#include <stdint.h>\n\n#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [   See footnote 224 at page 260\n\n#undef INT8_C\n#undef INT16_C\n#undef INT32_C\n#undef INT64_C\n#undef UINT8_C\n#undef UINT16_C\n#undef UINT32_C\n#undef UINT64_C\n\n// 7.18.4.1 Macros for minimum-width integer constants\n\n#define INT8_C(val)  val##i8\n#define INT16_C(val) val##i16\n#define INT32_C(val) val##i32\n#define INT64_C(val) val##i64\n\n#define UINT8_C(val)  val##ui8\n#define UINT16_C(val) val##ui16\n#define UINT32_C(val) val##ui32\n#define UINT64_C(val) val##ui64\n\n// 7.18.4.2 Macros for greatest-width integer constants\n// These #ifndef's are needed to prevent collisions with <boost/cstdint.hpp>.\n// Check out Issue 9 for the details.\n#ifndef INTMAX_C //   [\n#  define INTMAX_C   INT64_C\n#endif // INTMAX_C    ]\n#ifndef UINTMAX_C //  [\n#  define UINTMAX_C  UINT64_C\n#endif // UINTMAX_C   ]\n\n#endif // __STDC_CONSTANT_MACROS ]\n\n#else // ] _MSC_VER >= 1700 [\n\n#include <limits.h>\n\n// For Visual Studio 6 in C++ mode and for many Visual Studio versions when\n// compiling for ARM we have to wrap <wchar.h> include with 'extern \"C++\" {}'\n// or compiler would give many errors like this:\n//   error C2733: second C linkage of overloaded function 'wmemchr' not allowed\n#if defined(__cplusplus) && !defined(_M_ARM)\nextern \"C\" {\n#endif\n#  include <wchar.h>\n#if defined(__cplusplus) && !defined(_M_ARM)\n}\n#endif\n\n// Define _W64 macros to mark types changing their size, like intptr_t.\n#ifndef _W64\n#  if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300\n#     define _W64 __w64\n#  else\n#     define _W64\n#  endif\n#endif\n\n\n// 7.18.1 Integer types\n\n// 7.18.1.1 Exact-width integer types\n\n// Visual Studio 6 and Embedded Visual C++ 4 doesn't\n// realize that, e.g. char has the same size as __int8\n// so we give up on __intX for them.\n#if (_MSC_VER < 1300)\n   typedef signed char       int8_t;\n   typedef signed short      int16_t;\n   typedef signed int        int32_t;\n   typedef unsigned char     uint8_t;\n   typedef unsigned short    uint16_t;\n   typedef unsigned int      uint32_t;\n#else\n   typedef signed __int8     int8_t;\n   typedef signed __int16    int16_t;\n   typedef signed __int32    int32_t;\n   typedef unsigned __int8   uint8_t;\n   typedef unsigned __int16  uint16_t;\n   typedef unsigned __int32  uint32_t;\n#endif\ntypedef signed __int64       int64_t;\ntypedef unsigned __int64     uint64_t;\n\n\n// 7.18.1.2 Minimum-width integer types\ntypedef int8_t    int_least8_t;\ntypedef int16_t   int_least16_t;\ntypedef int32_t   int_least32_t;\ntypedef int64_t   int_least64_t;\ntypedef uint8_t   uint_least8_t;\ntypedef uint16_t  uint_least16_t;\ntypedef uint32_t  uint_least32_t;\ntypedef uint64_t  uint_least64_t;\n\n// 7.18.1.3 Fastest minimum-width integer types\ntypedef int8_t    int_fast8_t;\ntypedef int16_t   int_fast16_t;\ntypedef int32_t   int_fast32_t;\ntypedef int64_t   int_fast64_t;\ntypedef uint8_t   uint_fast8_t;\ntypedef uint16_t  uint_fast16_t;\ntypedef uint32_t  uint_fast32_t;\ntypedef uint64_t  uint_fast64_t;\n\n// 7.18.1.4 Integer types capable of holding object pointers\n#ifdef _WIN64 // [\n   typedef signed __int64    intptr_t;\n   typedef unsigned __int64  uintptr_t;\n#else // _WIN64 ][\n   typedef _W64 signed int   intptr_t;\n   typedef _W64 unsigned int uintptr_t;\n#endif // _WIN64 ]\n\n// 7.18.1.5 Greatest-width integer types\ntypedef int64_t   intmax_t;\ntypedef uint64_t  uintmax_t;\n\n\n// 7.18.2 Limits of specified-width integer types\n\n#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [   See footnote 220 at page 257 and footnote 221 at page 259\n\n// 7.18.2.1 Limits of exact-width integer types\n#define INT8_MIN     ((int8_t)_I8_MIN)\n#define INT8_MAX     _I8_MAX\n#define INT16_MIN    ((int16_t)_I16_MIN)\n#define INT16_MAX    _I16_MAX\n#define INT32_MIN    ((int32_t)_I32_MIN)\n#define INT32_MAX    _I32_MAX\n#define INT64_MIN    ((int64_t)_I64_MIN)\n#define INT64_MAX    _I64_MAX\n#define UINT8_MAX    _UI8_MAX\n#define UINT16_MAX   _UI16_MAX\n#define UINT32_MAX   _UI32_MAX\n#define UINT64_MAX   _UI64_MAX\n\n// 7.18.2.2 Limits of minimum-width integer types\n#define INT_LEAST8_MIN    INT8_MIN\n#define INT_LEAST8_MAX    INT8_MAX\n#define INT_LEAST16_MIN   INT16_MIN\n#define INT_LEAST16_MAX   INT16_MAX\n#define INT_LEAST32_MIN   INT32_MIN\n#define INT_LEAST32_MAX   INT32_MAX\n#define INT_LEAST64_MIN   INT64_MIN\n#define INT_LEAST64_MAX   INT64_MAX\n#define UINT_LEAST8_MAX   UINT8_MAX\n#define UINT_LEAST16_MAX  UINT16_MAX\n#define UINT_LEAST32_MAX  UINT32_MAX\n#define UINT_LEAST64_MAX  UINT64_MAX\n\n// 7.18.2.3 Limits of fastest minimum-width integer types\n#define INT_FAST8_MIN    INT8_MIN\n#define INT_FAST8_MAX    INT8_MAX\n#define INT_FAST16_MIN   INT16_MIN\n#define INT_FAST16_MAX   INT16_MAX\n#define INT_FAST32_MIN   INT32_MIN\n#define INT_FAST32_MAX   INT32_MAX\n#define INT_FAST64_MIN   INT64_MIN\n#define INT_FAST64_MAX   INT64_MAX\n#define UINT_FAST8_MAX   UINT8_MAX\n#define UINT_FAST16_MAX  UINT16_MAX\n#define UINT_FAST32_MAX  UINT32_MAX\n#define UINT_FAST64_MAX  UINT64_MAX\n\n// 7.18.2.4 Limits of integer types capable of holding object pointers\n#ifdef _WIN64 // [\n#  define INTPTR_MIN   INT64_MIN\n#  define INTPTR_MAX   INT64_MAX\n#  define UINTPTR_MAX  UINT64_MAX\n#else // _WIN64 ][\n#  define INTPTR_MIN   INT32_MIN\n#  define INTPTR_MAX   INT32_MAX\n#  define UINTPTR_MAX  UINT32_MAX\n#endif // _WIN64 ]\n\n// 7.18.2.5 Limits of greatest-width integer types\n#define INTMAX_MIN   INT64_MIN\n#define INTMAX_MAX   INT64_MAX\n#define UINTMAX_MAX  UINT64_MAX\n\n// 7.18.3 Limits of other integer types\n\n#ifdef _WIN64 // [\n#  define PTRDIFF_MIN  _I64_MIN\n#  define PTRDIFF_MAX  _I64_MAX\n#else  // _WIN64 ][\n#  define PTRDIFF_MIN  _I32_MIN\n#  define PTRDIFF_MAX  _I32_MAX\n#endif  // _WIN64 ]\n\n#define SIG_ATOMIC_MIN  INT_MIN\n#define SIG_ATOMIC_MAX  INT_MAX\n\n#ifndef SIZE_MAX // [\n#  ifdef _WIN64 // [\n#     define SIZE_MAX  _UI64_MAX\n#  else // _WIN64 ][\n#     define SIZE_MAX  _UI32_MAX\n#  endif // _WIN64 ]\n#endif // SIZE_MAX ]\n\n// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>\n#ifndef WCHAR_MIN // [\n#  define WCHAR_MIN  0\n#endif  // WCHAR_MIN ]\n#ifndef WCHAR_MAX // [\n#  define WCHAR_MAX  _UI16_MAX\n#endif  // WCHAR_MAX ]\n\n#define WINT_MIN  0\n#define WINT_MAX  _UI16_MAX\n\n#endif // __STDC_LIMIT_MACROS ]\n\n\n// 7.18.4 Limits of other integer types\n\n#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [   See footnote 224 at page 260\n\n// 7.18.4.1 Macros for minimum-width integer constants\n\n#define INT8_C(val)  val##i8\n#define INT16_C(val) val##i16\n#define INT32_C(val) val##i32\n#define INT64_C(val) val##i64\n\n#define UINT8_C(val)  val##ui8\n#define UINT16_C(val) val##ui16\n#define UINT32_C(val) val##ui32\n#define UINT64_C(val) val##ui64\n\n// 7.18.4.2 Macros for greatest-width integer constants\n// These #ifndef's are needed to prevent collisions with <boost/cstdint.hpp>.\n// Check out Issue 9 for the details.\n#ifndef INTMAX_C //   [\n#  define INTMAX_C   INT64_C\n#endif // INTMAX_C    ]\n#ifndef UINTMAX_C //  [\n#  define UINTMAX_C  UINT64_C\n#endif // UINTMAX_C   ]\n\n#endif // __STDC_CONSTANT_MACROS ]\n\n#endif // _MSC_VER >= 1600 ]\n\n#endif // _MSC_STDINT_H_ ]\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/ostreamwrapper.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_OSTREAMWRAPPER_H_\n#define RAPIDJSON_OSTREAMWRAPPER_H_\n\n#include \"stream.h\"\n#include <iosfwd>\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(padded)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Wrapper of \\c std::basic_ostream into RapidJSON's Stream concept.\n/*!\n    The classes can be wrapped including but not limited to:\n\n    - \\c std::ostringstream\n    - \\c std::stringstream\n    - \\c std::wpstringstream\n    - \\c std::wstringstream\n    - \\c std::ifstream\n    - \\c std::fstream\n    - \\c std::wofstream\n    - \\c std::wfstream\n\n    \\tparam StreamType Class derived from \\c std::basic_ostream.\n*/\n   \ntemplate <typename StreamType>\nclass BasicOStreamWrapper {\npublic:\n    typedef typename StreamType::char_type Ch;\n    BasicOStreamWrapper(StreamType& stream) : stream_(stream) {}\n\n    void Put(Ch c) {\n        stream_.put(c);\n    }\n\n    void Flush() {\n        stream_.flush();\n    }\n\n    // Not implemented\n    char Peek() const { RAPIDJSON_ASSERT(false); return 0; }\n    char Take() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }\n    char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; }\n\nprivate:\n    BasicOStreamWrapper(const BasicOStreamWrapper&);\n    BasicOStreamWrapper& operator=(const BasicOStreamWrapper&);\n\n    StreamType& stream_;\n};\n\ntypedef BasicOStreamWrapper<std::ostream> OStreamWrapper;\ntypedef BasicOStreamWrapper<std::wostream> WOStreamWrapper;\n\n#ifdef __clang__\nRAPIDJSON_DIAG_POP\n#endif\n\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_OSTREAMWRAPPER_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/pointer.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_POINTER_H_\n#define RAPIDJSON_POINTER_H_\n\n#include \"document.h\"\n#include \"internal/itoa.h\"\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(switch-enum)\n#elif defined(_MSC_VER)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\nstatic const SizeType kPointerInvalidIndex = ~SizeType(0);  //!< Represents an invalid index in GenericPointer::Token\n\n//! Error code of parsing.\n/*! \\ingroup RAPIDJSON_ERRORS\n    \\see GenericPointer::GenericPointer, GenericPointer::GetParseErrorCode\n*/\nenum PointerParseErrorCode {\n    kPointerParseErrorNone = 0,                     //!< The parse is successful\n\n    kPointerParseErrorTokenMustBeginWithSolidus,    //!< A token must begin with a '/'\n    kPointerParseErrorInvalidEscape,                //!< Invalid escape\n    kPointerParseErrorInvalidPercentEncoding,       //!< Invalid percent encoding in URI fragment\n    kPointerParseErrorCharacterMustPercentEncode    //!< A character must percent encoded in URI fragment\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericPointer\n\n//! Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator.\n/*!\n    This class implements RFC 6901 \"JavaScript Object Notation (JSON) Pointer\" \n    (https://tools.ietf.org/html/rfc6901).\n\n    A JSON pointer is for identifying a specific value in a JSON document\n    (GenericDocument). It can simplify coding of DOM tree manipulation, because it\n    can access multiple-level depth of DOM tree with single API call.\n\n    After it parses a string representation (e.g. \"/foo/0\" or URI fragment \n    representation (e.g. \"#/foo/0\") into its internal representation (tokens),\n    it can be used to resolve a specific value in multiple documents, or sub-tree \n    of documents.\n\n    Contrary to GenericValue, Pointer can be copy constructed and copy assigned.\n    Apart from assignment, a Pointer cannot be modified after construction.\n\n    Although Pointer is very convenient, please aware that constructing Pointer\n    involves parsing and dynamic memory allocation. A special constructor with user-\n    supplied tokens eliminates these.\n\n    GenericPointer depends on GenericDocument and GenericValue.\n    \n    \\tparam ValueType The value type of the DOM tree. E.g. GenericValue<UTF8<> >\n    \\tparam Allocator The allocator type for allocating memory for internal representation.\n    \n    \\note GenericPointer uses same encoding of ValueType.\n    However, Allocator of GenericPointer is independent of Allocator of Value.\n*/\ntemplate <typename ValueType, typename Allocator = CrtAllocator>\nclass GenericPointer {\npublic:\n    typedef typename ValueType::EncodingType EncodingType;  //!< Encoding type from Value\n    typedef typename ValueType::Ch Ch;                      //!< Character type from Value\n\n    //! A token is the basic units of internal representation.\n    /*!\n        A JSON pointer string representation \"/foo/123\" is parsed to two tokens: \n        \"foo\" and 123. 123 will be represented in both numeric form and string form.\n        They are resolved according to the actual value type (object or array).\n\n        For token that are not numbers, or the numeric value is out of bound\n        (greater than limits of SizeType), they are only treated as string form\n        (i.e. the token's index will be equal to kPointerInvalidIndex).\n\n        This struct is public so that user can create a Pointer without parsing and \n        allocation, using a special constructor.\n    */\n    struct Token {\n        const Ch* name;             //!< Name of the token. It has null character at the end but it can contain null character.\n        SizeType length;            //!< Length of the name.\n        SizeType index;             //!< A valid array index, if it is not equal to kPointerInvalidIndex.\n    };\n\n    //!@name Constructors and destructor.\n    //@{\n\n    //! Default constructor.\n    GenericPointer(Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {}\n\n    //! Constructor that parses a string or URI fragment representation.\n    /*!\n        \\param source A null-terminated, string or URI fragment representation of JSON pointer.\n        \\param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one.\n    */\n    explicit GenericPointer(const Ch* source, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {\n        Parse(source, internal::StrLen(source));\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Constructor that parses a string or URI fragment representation.\n    /*!\n        \\param source A string or URI fragment representation of JSON pointer.\n        \\param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one.\n        \\note Requires the definition of the preprocessor symbol \\ref RAPIDJSON_HAS_STDSTRING.\n    */\n    explicit GenericPointer(const std::basic_string<Ch>& source, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {\n        Parse(source.c_str(), source.size());\n    }\n#endif\n\n    //! Constructor that parses a string or URI fragment representation, with length of the source string.\n    /*!\n        \\param source A string or URI fragment representation of JSON pointer.\n        \\param length Length of source.\n        \\param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one.\n        \\note Slightly faster than the overload without length.\n    */\n    GenericPointer(const Ch* source, size_t length, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {\n        Parse(source, length);\n    }\n\n    //! Constructor with user-supplied tokens.\n    /*!\n        This constructor let user supplies const array of tokens.\n        This prevents the parsing process and eliminates allocation.\n        This is preferred for memory constrained environments.\n\n        \\param tokens An constant array of tokens representing the JSON pointer.\n        \\param tokenCount Number of tokens.\n\n        \\b Example\n        \\code\n        #define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex }\n        #define INDEX(i) { #i, sizeof(#i) - 1, i }\n\n        static const Pointer::Token kTokens[] = { NAME(\"foo\"), INDEX(123) };\n        static const Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0]));\n        // Equivalent to static const Pointer p(\"/foo/123\");\n\n        #undef NAME\n        #undef INDEX\n        \\endcode\n    */\n    GenericPointer(const Token* tokens, size_t tokenCount) : allocator_(), ownAllocator_(), nameBuffer_(), tokens_(const_cast<Token*>(tokens)), tokenCount_(tokenCount), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {}\n\n    //! Copy constructor.\n    GenericPointer(const GenericPointer& rhs) : allocator_(rhs.allocator_), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {\n        *this = rhs;\n    }\n\n    //! Copy constructor.\n    GenericPointer(const GenericPointer& rhs, Allocator* allocator) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {\n        *this = rhs;\n    }\n\n    //! Destructor.\n    ~GenericPointer() {\n        if (nameBuffer_)    // If user-supplied tokens constructor is used, nameBuffer_ is nullptr and tokens_ are not deallocated.\n            Allocator::Free(tokens_);\n        RAPIDJSON_DELETE(ownAllocator_);\n    }\n\n    //! Assignment operator.\n    GenericPointer& operator=(const GenericPointer& rhs) {\n        if (this != &rhs) {\n            // Do not delete ownAllcator\n            if (nameBuffer_)\n                Allocator::Free(tokens_);\n\n            tokenCount_ = rhs.tokenCount_;\n            parseErrorOffset_ = rhs.parseErrorOffset_;\n            parseErrorCode_ = rhs.parseErrorCode_;\n\n            if (rhs.nameBuffer_)\n                CopyFromRaw(rhs); // Normally parsed tokens.\n            else {\n                tokens_ = rhs.tokens_; // User supplied const tokens.\n                nameBuffer_ = 0;\n            }\n        }\n        return *this;\n    }\n\n    //! Swap the content of this pointer with an other.\n    /*!\n        \\param other The pointer to swap with.\n        \\note Constant complexity.\n    */\n    GenericPointer& Swap(GenericPointer& other) RAPIDJSON_NOEXCEPT {\n        internal::Swap(allocator_, other.allocator_);\n        internal::Swap(ownAllocator_, other.ownAllocator_);\n        internal::Swap(nameBuffer_, other.nameBuffer_);\n        internal::Swap(tokens_, other.tokens_);\n        internal::Swap(tokenCount_, other.tokenCount_);\n        internal::Swap(parseErrorOffset_, other.parseErrorOffset_);\n        internal::Swap(parseErrorCode_, other.parseErrorCode_);\n        return *this;\n    }\n\n    //! free-standing swap function helper\n    /*!\n        Helper function to enable support for common swap implementation pattern based on \\c std::swap:\n        \\code\n        void swap(MyClass& a, MyClass& b) {\n            using std::swap;\n            swap(a.pointer, b.pointer);\n            // ...\n        }\n        \\endcode\n        \\see Swap()\n     */\n    friend inline void swap(GenericPointer& a, GenericPointer& b) RAPIDJSON_NOEXCEPT { a.Swap(b); }\n\n    //@}\n\n    //!@name Append token\n    //@{\n\n    //! Append a token and return a new Pointer\n    /*!\n        \\param token Token to be appended.\n        \\param allocator Allocator for the newly return Pointer.\n        \\return A new Pointer with appended token.\n    */\n    GenericPointer Append(const Token& token, Allocator* allocator = 0) const {\n        GenericPointer r;\n        r.allocator_ = allocator;\n        Ch *p = r.CopyFromRaw(*this, 1, token.length + 1);\n        std::memcpy(p, token.name, (token.length + 1) * sizeof(Ch));\n        r.tokens_[tokenCount_].name = p;\n        r.tokens_[tokenCount_].length = token.length;\n        r.tokens_[tokenCount_].index = token.index;\n        return r;\n    }\n\n    //! Append a name token with length, and return a new Pointer\n    /*!\n        \\param name Name to be appended.\n        \\param length Length of name.\n        \\param allocator Allocator for the newly return Pointer.\n        \\return A new Pointer with appended token.\n    */\n    GenericPointer Append(const Ch* name, SizeType length, Allocator* allocator = 0) const {\n        Token token = { name, length, kPointerInvalidIndex };\n        return Append(token, allocator);\n    }\n\n    //! Append a name token without length, and return a new Pointer\n    /*!\n        \\param name Name (const Ch*) to be appended.\n        \\param allocator Allocator for the newly return Pointer.\n        \\return A new Pointer with appended token.\n    */\n    template <typename T>\n    RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch> >), (GenericPointer))\n    Append(T* name, Allocator* allocator = 0) const {\n        return Append(name, internal::StrLen(name), allocator);\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Append a name token, and return a new Pointer\n    /*!\n        \\param name Name to be appended.\n        \\param allocator Allocator for the newly return Pointer.\n        \\return A new Pointer with appended token.\n    */\n    GenericPointer Append(const std::basic_string<Ch>& name, Allocator* allocator = 0) const {\n        return Append(name.c_str(), static_cast<SizeType>(name.size()), allocator);\n    }\n#endif\n\n    //! Append a index token, and return a new Pointer\n    /*!\n        \\param index Index to be appended.\n        \\param allocator Allocator for the newly return Pointer.\n        \\return A new Pointer with appended token.\n    */\n    GenericPointer Append(SizeType index, Allocator* allocator = 0) const {\n        char buffer[21];\n        char* end = sizeof(SizeType) == 4 ? internal::u32toa(index, buffer) : internal::u64toa(index, buffer);\n        SizeType length = static_cast<SizeType>(end - buffer);\n        buffer[length] = '\\0';\n\n        if (sizeof(Ch) == 1) {\n            Token token = { reinterpret_cast<Ch*>(buffer), length, index };\n            return Append(token, allocator);\n        }\n        else {\n            Ch name[21];\n            for (size_t i = 0; i <= length; i++)\n                name[i] = static_cast<Ch>(buffer[i]);\n            Token token = { name, length, index };\n            return Append(token, allocator);\n        }\n    }\n\n    //! Append a token by value, and return a new Pointer\n    /*!\n        \\param token token to be appended.\n        \\param allocator Allocator for the newly return Pointer.\n        \\return A new Pointer with appended token.\n    */\n    GenericPointer Append(const ValueType& token, Allocator* allocator = 0) const {\n        if (token.IsString())\n            return Append(token.GetString(), token.GetStringLength(), allocator);\n        else {\n            RAPIDJSON_ASSERT(token.IsUint64());\n            RAPIDJSON_ASSERT(token.GetUint64() <= SizeType(~0));\n            return Append(static_cast<SizeType>(token.GetUint64()), allocator);\n        }\n    }\n\n    //!@name Handling Parse Error\n    //@{\n\n    //! Check whether this is a valid pointer.\n    bool IsValid() const { return parseErrorCode_ == kPointerParseErrorNone; }\n\n    //! Get the parsing error offset in code unit.\n    size_t GetParseErrorOffset() const { return parseErrorOffset_; }\n\n    //! Get the parsing error code.\n    PointerParseErrorCode GetParseErrorCode() const { return parseErrorCode_; }\n\n    //@}\n\n    //! Get the allocator of this pointer.\n    Allocator& GetAllocator() { return *allocator_; }\n\n    //!@name Tokens\n    //@{\n\n    //! Get the token array (const version only).\n    const Token* GetTokens() const { return tokens_; }\n\n    //! Get the number of tokens.\n    size_t GetTokenCount() const { return tokenCount_; }\n\n    //@}\n\n    //!@name Equality/inequality operators\n    //@{\n\n    //! Equality operator.\n    /*!\n        \\note When any pointers are invalid, always returns false.\n    */\n    bool operator==(const GenericPointer& rhs) const {\n        if (!IsValid() || !rhs.IsValid() || tokenCount_ != rhs.tokenCount_)\n            return false;\n\n        for (size_t i = 0; i < tokenCount_; i++) {\n            if (tokens_[i].index != rhs.tokens_[i].index ||\n                tokens_[i].length != rhs.tokens_[i].length || \n                (tokens_[i].length != 0 && std::memcmp(tokens_[i].name, rhs.tokens_[i].name, sizeof(Ch)* tokens_[i].length) != 0))\n            {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    //! Inequality operator.\n    /*!\n        \\note When any pointers are invalid, always returns true.\n    */\n    bool operator!=(const GenericPointer& rhs) const { return !(*this == rhs); }\n\n    //! Less than operator.\n    /*!\n        \\note Invalid pointers are always greater than valid ones.\n    */\n    bool operator<(const GenericPointer& rhs) const {\n        if (!IsValid())\n            return false;\n        if (!rhs.IsValid())\n            return true;\n\n        if (tokenCount_ != rhs.tokenCount_)\n            return tokenCount_ < rhs.tokenCount_;\n\n        for (size_t i = 0; i < tokenCount_; i++) {\n            if (tokens_[i].index != rhs.tokens_[i].index)\n                return tokens_[i].index < rhs.tokens_[i].index;\n\n            if (tokens_[i].length != rhs.tokens_[i].length)\n                return tokens_[i].length < rhs.tokens_[i].length;\n\n            if (int cmp = std::memcmp(tokens_[i].name, rhs.tokens_[i].name, sizeof(Ch) * tokens_[i].length))\n                return cmp < 0;\n        }\n\n        return false;\n    }\n\n    //@}\n\n    //!@name Stringify\n    //@{\n\n    //! Stringify the pointer into string representation.\n    /*!\n        \\tparam OutputStream Type of output stream.\n        \\param os The output stream.\n    */\n    template<typename OutputStream>\n    bool Stringify(OutputStream& os) const {\n        return Stringify<false, OutputStream>(os);\n    }\n\n    //! Stringify the pointer into URI fragment representation.\n    /*!\n        \\tparam OutputStream Type of output stream.\n        \\param os The output stream.\n    */\n    template<typename OutputStream>\n    bool StringifyUriFragment(OutputStream& os) const {\n        return Stringify<true, OutputStream>(os);\n    }\n\n    //@}\n\n    //!@name Create value\n    //@{\n\n    //! Create a value in a subtree.\n    /*!\n        If the value is not exist, it creates all parent values and a JSON Null value.\n        So it always succeed and return the newly created or existing value.\n\n        Remind that it may change types of parents according to tokens, so it \n        potentially removes previously stored values. For example, if a document \n        was an array, and \"/foo\" is used to create a value, then the document \n        will be changed to an object, and all existing array elements are lost.\n\n        \\param root Root value of a DOM subtree to be resolved. It can be any value other than document root.\n        \\param allocator Allocator for creating the values if the specified value or its parents are not exist.\n        \\param alreadyExist If non-null, it stores whether the resolved value is already exist.\n        \\return The resolved newly created (a JSON Null value), or already exists value.\n    */\n    ValueType& Create(ValueType& root, typename ValueType::AllocatorType& allocator, bool* alreadyExist = 0) const {\n        RAPIDJSON_ASSERT(IsValid());\n        ValueType* v = &root;\n        bool exist = true;\n        for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {\n            if (v->IsArray() && t->name[0] == '-' && t->length == 1) {\n                v->PushBack(ValueType().Move(), allocator);\n                v = &((*v)[v->Size() - 1]);\n                exist = false;\n            }\n            else {\n                if (t->index == kPointerInvalidIndex) { // must be object name\n                    if (!v->IsObject())\n                        v->SetObject(); // Change to Object\n                }\n                else { // object name or array index\n                    if (!v->IsArray() && !v->IsObject())\n                        v->SetArray(); // Change to Array\n                }\n\n                if (v->IsArray()) {\n                    if (t->index >= v->Size()) {\n                        v->Reserve(t->index + 1, allocator);\n                        while (t->index >= v->Size())\n                            v->PushBack(ValueType().Move(), allocator);\n                        exist = false;\n                    }\n                    v = &((*v)[t->index]);\n                }\n                else {\n                    typename ValueType::MemberIterator m = v->FindMember(GenericValue<EncodingType>(GenericStringRef<Ch>(t->name, t->length)));\n                    if (m == v->MemberEnd()) {\n                        v->AddMember(ValueType(t->name, t->length, allocator).Move(), ValueType().Move(), allocator);\n                        m = v->MemberEnd();\n                        v = &(--m)->value; // Assumes AddMember() appends at the end\n                        exist = false;\n                    }\n                    else\n                        v = &m->value;\n                }\n            }\n        }\n\n        if (alreadyExist)\n            *alreadyExist = exist;\n\n        return *v;\n    }\n\n    //! Creates a value in a document.\n    /*!\n        \\param document A document to be resolved.\n        \\param alreadyExist If non-null, it stores whether the resolved value is already exist.\n        \\return The resolved newly created, or already exists value.\n    */\n    template <typename stackAllocator>\n    ValueType& Create(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, bool* alreadyExist = 0) const {\n        return Create(document, document.GetAllocator(), alreadyExist);\n    }\n\n    //@}\n\n    //!@name Query value\n    //@{\n\n    //! Query a value in a subtree.\n    /*!\n        \\param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.\n        \\param unresolvedTokenIndex If the pointer cannot resolve a token in the pointer, this parameter can obtain the index of unresolved token.\n        \\return Pointer to the value if it can be resolved. Otherwise null.\n\n        \\note\n        There are only 3 situations when a value cannot be resolved:\n        1. A value in the path is not an array nor object.\n        2. An object value does not contain the token.\n        3. A token is out of range of an array value.\n\n        Use unresolvedTokenIndex to retrieve the token index.\n    */\n    ValueType* Get(ValueType& root, size_t* unresolvedTokenIndex = 0) const {\n        RAPIDJSON_ASSERT(IsValid());\n        ValueType* v = &root;\n        for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {\n            switch (v->GetType()) {\n            case kObjectType:\n                {\n                    typename ValueType::MemberIterator m = v->FindMember(GenericValue<EncodingType>(GenericStringRef<Ch>(t->name, t->length)));\n                    if (m == v->MemberEnd())\n                        break;\n                    v = &m->value;\n                }\n                continue;\n            case kArrayType:\n                if (t->index == kPointerInvalidIndex || t->index >= v->Size())\n                    break;\n                v = &((*v)[t->index]);\n                continue;\n            default:\n                break;\n            }\n\n            // Error: unresolved token\n            if (unresolvedTokenIndex)\n                *unresolvedTokenIndex = static_cast<size_t>(t - tokens_);\n            return 0;\n        }\n        return v;\n    }\n\n    //! Query a const value in a const subtree.\n    /*!\n        \\param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.\n        \\return Pointer to the value if it can be resolved. Otherwise null.\n    */\n    const ValueType* Get(const ValueType& root, size_t* unresolvedTokenIndex = 0) const { \n        return Get(const_cast<ValueType&>(root), unresolvedTokenIndex);\n    }\n\n    //@}\n\n    //!@name Query a value with default\n    //@{\n\n    //! Query a value in a subtree with default value.\n    /*!\n        Similar to Get(), but if the specified value do not exists, it creates all parents and clone the default value.\n        So that this function always succeed.\n\n        \\param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.\n        \\param defaultValue Default value to be cloned if the value was not exists.\n        \\param allocator Allocator for creating the values if the specified value or its parents are not exist.\n        \\see Create()\n    */\n    ValueType& GetWithDefault(ValueType& root, const ValueType& defaultValue, typename ValueType::AllocatorType& allocator) const {\n        bool alreadyExist;\n        ValueType& v = Create(root, allocator, &alreadyExist);\n        return alreadyExist ? v : v.CopyFrom(defaultValue, allocator);\n    }\n\n    //! Query a value in a subtree with default null-terminated string.\n    ValueType& GetWithDefault(ValueType& root, const Ch* defaultValue, typename ValueType::AllocatorType& allocator) const {\n        bool alreadyExist;\n        ValueType& v = Create(root, allocator, &alreadyExist);\n        return alreadyExist ? v : v.SetString(defaultValue, allocator);\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Query a value in a subtree with default std::basic_string.\n    ValueType& GetWithDefault(ValueType& root, const std::basic_string<Ch>& defaultValue, typename ValueType::AllocatorType& allocator) const {\n        bool alreadyExist;\n        ValueType& v = Create(root, allocator, &alreadyExist);\n        return alreadyExist ? v : v.SetString(defaultValue, allocator);\n    }\n#endif\n\n    //! Query a value in a subtree with default primitive value.\n    /*!\n        \\tparam T Either \\ref Type, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t, \\c bool\n    */\n    template <typename T>\n    RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))\n    GetWithDefault(ValueType& root, T defaultValue, typename ValueType::AllocatorType& allocator) const {\n        return GetWithDefault(root, ValueType(defaultValue).Move(), allocator);\n    }\n\n    //! Query a value in a document with default value.\n    template <typename stackAllocator>\n    ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const ValueType& defaultValue) const {\n        return GetWithDefault(document, defaultValue, document.GetAllocator());\n    }\n\n    //! Query a value in a document with default null-terminated string.\n    template <typename stackAllocator>\n    ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const Ch* defaultValue) const {\n        return GetWithDefault(document, defaultValue, document.GetAllocator());\n    }\n    \n#if RAPIDJSON_HAS_STDSTRING\n    //! Query a value in a document with default std::basic_string.\n    template <typename stackAllocator>\n    ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const std::basic_string<Ch>& defaultValue) const {\n        return GetWithDefault(document, defaultValue, document.GetAllocator());\n    }\n#endif\n\n    //! Query a value in a document with default primitive value.\n    /*!\n        \\tparam T Either \\ref Type, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t, \\c bool\n    */\n    template <typename T, typename stackAllocator>\n    RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))\n    GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, T defaultValue) const {\n        return GetWithDefault(document, defaultValue, document.GetAllocator());\n    }\n\n    //@}\n\n    //!@name Set a value\n    //@{\n\n    //! Set a value in a subtree, with move semantics.\n    /*!\n        It creates all parents if they are not exist or types are different to the tokens.\n        So this function always succeeds but potentially remove existing values.\n\n        \\param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.\n        \\param value Value to be set.\n        \\param allocator Allocator for creating the values if the specified value or its parents are not exist.\n        \\see Create()\n    */\n    ValueType& Set(ValueType& root, ValueType& value, typename ValueType::AllocatorType& allocator) const {\n        return Create(root, allocator) = value;\n    }\n\n    //! Set a value in a subtree, with copy semantics.\n    ValueType& Set(ValueType& root, const ValueType& value, typename ValueType::AllocatorType& allocator) const {\n        return Create(root, allocator).CopyFrom(value, allocator);\n    }\n\n    //! Set a null-terminated string in a subtree.\n    ValueType& Set(ValueType& root, const Ch* value, typename ValueType::AllocatorType& allocator) const {\n        return Create(root, allocator) = ValueType(value, allocator).Move();\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Set a std::basic_string in a subtree.\n    ValueType& Set(ValueType& root, const std::basic_string<Ch>& value, typename ValueType::AllocatorType& allocator) const {\n        return Create(root, allocator) = ValueType(value, allocator).Move();\n    }\n#endif\n\n    //! Set a primitive value in a subtree.\n    /*!\n        \\tparam T Either \\ref Type, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t, \\c bool\n    */\n    template <typename T>\n    RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))\n    Set(ValueType& root, T value, typename ValueType::AllocatorType& allocator) const {\n        return Create(root, allocator) = ValueType(value).Move();\n    }\n\n    //! Set a value in a document, with move semantics.\n    template <typename stackAllocator>\n    ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, ValueType& value) const {\n        return Create(document) = value;\n    }\n\n    //! Set a value in a document, with copy semantics.\n    template <typename stackAllocator>\n    ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const ValueType& value) const {\n        return Create(document).CopyFrom(value, document.GetAllocator());\n    }\n\n    //! Set a null-terminated string in a document.\n    template <typename stackAllocator>\n    ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const Ch* value) const {\n        return Create(document) = ValueType(value, document.GetAllocator()).Move();\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    //! Sets a std::basic_string in a document.\n    template <typename stackAllocator>\n    ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const std::basic_string<Ch>& value) const {\n        return Create(document) = ValueType(value, document.GetAllocator()).Move();\n    }\n#endif\n\n    //! Set a primitive value in a document.\n    /*!\n    \\tparam T Either \\ref Type, \\c int, \\c unsigned, \\c int64_t, \\c uint64_t, \\c bool\n    */\n    template <typename T, typename stackAllocator>\n    RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))\n        Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, T value) const {\n            return Create(document) = value;\n    }\n\n    //@}\n\n    //!@name Swap a value\n    //@{\n\n    //! Swap a value with a value in a subtree.\n    /*!\n        It creates all parents if they are not exist or types are different to the tokens.\n        So this function always succeeds but potentially remove existing values.\n\n        \\param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.\n        \\param value Value to be swapped.\n        \\param allocator Allocator for creating the values if the specified value or its parents are not exist.\n        \\see Create()\n    */\n    ValueType& Swap(ValueType& root, ValueType& value, typename ValueType::AllocatorType& allocator) const {\n        return Create(root, allocator).Swap(value);\n    }\n\n    //! Swap a value with a value in a document.\n    template <typename stackAllocator>\n    ValueType& Swap(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, ValueType& value) const {\n        return Create(document).Swap(value);\n    }\n\n    //@}\n\n    //! Erase a value in a subtree.\n    /*!\n        \\param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.\n        \\return Whether the resolved value is found and erased.\n\n        \\note Erasing with an empty pointer \\c Pointer(\"\"), i.e. the root, always fail and return false.\n    */\n    bool Erase(ValueType& root) const {\n        RAPIDJSON_ASSERT(IsValid());\n        if (tokenCount_ == 0) // Cannot erase the root\n            return false;\n\n        ValueType* v = &root;\n        const Token* last = tokens_ + (tokenCount_ - 1);\n        for (const Token *t = tokens_; t != last; ++t) {\n            switch (v->GetType()) {\n            case kObjectType:\n                {\n                    typename ValueType::MemberIterator m = v->FindMember(GenericValue<EncodingType>(GenericStringRef<Ch>(t->name, t->length)));\n                    if (m == v->MemberEnd())\n                        return false;\n                    v = &m->value;\n                }\n                break;\n            case kArrayType:\n                if (t->index == kPointerInvalidIndex || t->index >= v->Size())\n                    return false;\n                v = &((*v)[t->index]);\n                break;\n            default:\n                return false;\n            }\n        }\n\n        switch (v->GetType()) {\n        case kObjectType:\n            return v->EraseMember(GenericStringRef<Ch>(last->name, last->length));\n        case kArrayType:\n            if (last->index == kPointerInvalidIndex || last->index >= v->Size())\n                return false;\n            v->Erase(v->Begin() + last->index);\n            return true;\n        default:\n            return false;\n        }\n    }\n\nprivate:\n    //! Clone the content from rhs to this.\n    /*!\n        \\param rhs Source pointer.\n        \\param extraToken Extra tokens to be allocated.\n        \\param extraNameBufferSize Extra name buffer size (in number of Ch) to be allocated.\n        \\return Start of non-occupied name buffer, for storing extra names.\n    */\n    Ch* CopyFromRaw(const GenericPointer& rhs, size_t extraToken = 0, size_t extraNameBufferSize = 0) {\n        if (!allocator_) // allocator is independently owned.\n            ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();\n\n        size_t nameBufferSize = rhs.tokenCount_; // null terminators for tokens\n        for (Token *t = rhs.tokens_; t != rhs.tokens_ + rhs.tokenCount_; ++t)\n            nameBufferSize += t->length;\n\n        tokenCount_ = rhs.tokenCount_ + extraToken;\n        tokens_ = static_cast<Token *>(allocator_->Malloc(tokenCount_ * sizeof(Token) + (nameBufferSize + extraNameBufferSize) * sizeof(Ch)));\n        nameBuffer_ = reinterpret_cast<Ch *>(tokens_ + tokenCount_);\n        if (rhs.tokenCount_ > 0) {\n            std::memcpy(tokens_, rhs.tokens_, rhs.tokenCount_ * sizeof(Token));\n        }\n        if (nameBufferSize > 0) {\n            std::memcpy(nameBuffer_, rhs.nameBuffer_, nameBufferSize * sizeof(Ch));\n        }\n\n        // Adjust pointers to name buffer\n        std::ptrdiff_t diff = nameBuffer_ - rhs.nameBuffer_;\n        for (Token *t = tokens_; t != tokens_ + rhs.tokenCount_; ++t)\n            t->name += diff;\n\n        return nameBuffer_ + nameBufferSize;\n    }\n\n    //! Check whether a character should be percent-encoded.\n    /*!\n        According to RFC 3986 2.3 Unreserved Characters.\n        \\param c The character (code unit) to be tested.\n    */\n    bool NeedPercentEncode(Ch c) const {\n        return !((c >= '0' && c <= '9') || (c >= 'A' && c <='Z') || (c >= 'a' && c <= 'z') || c == '-' || c == '.' || c == '_' || c =='~');\n    }\n\n    //! Parse a JSON String or its URI fragment representation into tokens.\n#ifndef __clang__ // -Wdocumentation\n    /*!\n        \\param source Either a JSON Pointer string, or its URI fragment representation. Not need to be null terminated.\n        \\param length Length of the source string.\n        \\note Source cannot be JSON String Representation of JSON Pointer, e.g. In \"/\\u0000\", \\u0000 will not be unescaped.\n    */\n#endif\n    void Parse(const Ch* source, size_t length) {\n        RAPIDJSON_ASSERT(source != NULL);\n        RAPIDJSON_ASSERT(nameBuffer_ == 0);\n        RAPIDJSON_ASSERT(tokens_ == 0);\n\n        // Create own allocator if user did not supply.\n        if (!allocator_)\n            ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();\n\n        // Count number of '/' as tokenCount\n        tokenCount_ = 0;\n        for (const Ch* s = source; s != source + length; s++) \n            if (*s == '/')\n                tokenCount_++;\n\n        Token* token = tokens_ = static_cast<Token *>(allocator_->Malloc(tokenCount_ * sizeof(Token) + length * sizeof(Ch)));\n        Ch* name = nameBuffer_ = reinterpret_cast<Ch *>(tokens_ + tokenCount_);\n        size_t i = 0;\n\n        // Detect if it is a URI fragment\n        bool uriFragment = false;\n        if (source[i] == '#') {\n            uriFragment = true;\n            i++;\n        }\n\n        if (i != length && source[i] != '/') {\n            parseErrorCode_ = kPointerParseErrorTokenMustBeginWithSolidus;\n            goto error;\n        }\n\n        while (i < length) {\n            RAPIDJSON_ASSERT(source[i] == '/');\n            i++; // consumes '/'\n\n            token->name = name;\n            bool isNumber = true;\n\n            while (i < length && source[i] != '/') {\n                Ch c = source[i];\n                if (uriFragment) {\n                    // Decoding percent-encoding for URI fragment\n                    if (c == '%') {\n                        PercentDecodeStream is(&source[i], source + length);\n                        GenericInsituStringStream<EncodingType> os(name);\n                        Ch* begin = os.PutBegin();\n                        if (!Transcoder<UTF8<>, EncodingType>().Validate(is, os) || !is.IsValid()) {\n                            parseErrorCode_ = kPointerParseErrorInvalidPercentEncoding;\n                            goto error;\n                        }\n                        size_t len = os.PutEnd(begin);\n                        i += is.Tell() - 1;\n                        if (len == 1)\n                            c = *name;\n                        else {\n                            name += len;\n                            isNumber = false;\n                            i++;\n                            continue;\n                        }\n                    }\n                    else if (NeedPercentEncode(c)) {\n                        parseErrorCode_ = kPointerParseErrorCharacterMustPercentEncode;\n                        goto error;\n                    }\n                }\n\n                i++;\n                \n                // Escaping \"~0\" -> '~', \"~1\" -> '/'\n                if (c == '~') {\n                    if (i < length) {\n                        c = source[i];\n                        if (c == '0')       c = '~';\n                        else if (c == '1')  c = '/';\n                        else {\n                            parseErrorCode_ = kPointerParseErrorInvalidEscape;\n                            goto error;\n                        }\n                        i++;\n                    }\n                    else {\n                        parseErrorCode_ = kPointerParseErrorInvalidEscape;\n                        goto error;\n                    }\n                }\n\n                // First check for index: all of characters are digit\n                if (c < '0' || c > '9')\n                    isNumber = false;\n\n                *name++ = c;\n            }\n            token->length = static_cast<SizeType>(name - token->name);\n            if (token->length == 0)\n                isNumber = false;\n            *name++ = '\\0'; // Null terminator\n\n            // Second check for index: more than one digit cannot have leading zero\n            if (isNumber && token->length > 1 && token->name[0] == '0')\n                isNumber = false;\n\n            // String to SizeType conversion\n            SizeType n = 0;\n            if (isNumber) {\n                for (size_t j = 0; j < token->length; j++) {\n                    SizeType m = n * 10 + static_cast<SizeType>(token->name[j] - '0');\n                    if (m < n) {   // overflow detection\n                        isNumber = false;\n                        break;\n                    }\n                    n = m;\n                }\n            }\n\n            token->index = isNumber ? n : kPointerInvalidIndex;\n            token++;\n        }\n\n        RAPIDJSON_ASSERT(name <= nameBuffer_ + length); // Should not overflow buffer\n        parseErrorCode_ = kPointerParseErrorNone;\n        return;\n\n    error:\n        Allocator::Free(tokens_);\n        nameBuffer_ = 0;\n        tokens_ = 0;\n        tokenCount_ = 0;\n        parseErrorOffset_ = i;\n        return;\n    }\n\n    //! Stringify to string or URI fragment representation.\n    /*!\n        \\tparam uriFragment True for stringifying to URI fragment representation. False for string representation.\n        \\tparam OutputStream type of output stream.\n        \\param os The output stream.\n    */\n    template<bool uriFragment, typename OutputStream>\n    bool Stringify(OutputStream& os) const {\n        RAPIDJSON_ASSERT(IsValid());\n\n        if (uriFragment)\n            os.Put('#');\n\n        for (Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {\n            os.Put('/');\n            for (size_t j = 0; j < t->length; j++) {\n                Ch c = t->name[j];\n                if (c == '~') {\n                    os.Put('~');\n                    os.Put('0');\n                }\n                else if (c == '/') {\n                    os.Put('~');\n                    os.Put('1');\n                }\n                else if (uriFragment && NeedPercentEncode(c)) { \n                    // Transcode to UTF8 sequence\n                    GenericStringStream<typename ValueType::EncodingType> source(&t->name[j]);\n                    PercentEncodeStream<OutputStream> target(os);\n                    if (!Transcoder<EncodingType, UTF8<> >().Validate(source, target))\n                        return false;\n                    j += source.Tell() - 1;\n                }\n                else\n                    os.Put(c);\n            }\n        }\n        return true;\n    }\n\n    //! A helper stream for decoding a percent-encoded sequence into code unit.\n    /*!\n        This stream decodes %XY triplet into code unit (0-255).\n        If it encounters invalid characters, it sets output code unit as 0 and \n        mark invalid, and to be checked by IsValid().\n    */\n    class PercentDecodeStream {\n    public:\n        typedef typename ValueType::Ch Ch;\n\n        //! Constructor\n        /*!\n            \\param source Start of the stream\n            \\param end Past-the-end of the stream.\n        */\n        PercentDecodeStream(const Ch* source, const Ch* end) : src_(source), head_(source), end_(end), valid_(true) {}\n\n        Ch Take() {\n            if (*src_ != '%' || src_ + 3 > end_) { // %XY triplet\n                valid_ = false;\n                return 0;\n            }\n            src_++;\n            Ch c = 0;\n            for (int j = 0; j < 2; j++) {\n                c = static_cast<Ch>(c << 4);\n                Ch h = *src_;\n                if      (h >= '0' && h <= '9') c = static_cast<Ch>(c + h - '0');\n                else if (h >= 'A' && h <= 'F') c = static_cast<Ch>(c + h - 'A' + 10);\n                else if (h >= 'a' && h <= 'f') c = static_cast<Ch>(c + h - 'a' + 10);\n                else {\n                    valid_ = false;\n                    return 0;\n                }\n                src_++;\n            }\n            return c;\n        }\n\n        size_t Tell() const { return static_cast<size_t>(src_ - head_); }\n        bool IsValid() const { return valid_; }\n\n    private:\n        const Ch* src_;     //!< Current read position.\n        const Ch* head_;    //!< Original head of the string.\n        const Ch* end_;     //!< Past-the-end position.\n        bool valid_;        //!< Whether the parsing is valid.\n    };\n\n    //! A helper stream to encode character (UTF-8 code unit) into percent-encoded sequence.\n    template <typename OutputStream>\n    class PercentEncodeStream {\n    public:\n        PercentEncodeStream(OutputStream& os) : os_(os) {}\n        void Put(char c) { // UTF-8 must be byte\n            unsigned char u = static_cast<unsigned char>(c);\n            static const char hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };\n            os_.Put('%');\n            os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u >> 4]));\n            os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u & 15]));\n        }\n    private:\n        OutputStream& os_;\n    };\n\n    Allocator* allocator_;                  //!< The current allocator. It is either user-supplied or equal to ownAllocator_.\n    Allocator* ownAllocator_;               //!< Allocator owned by this Pointer.\n    Ch* nameBuffer_;                        //!< A buffer containing all names in tokens.\n    Token* tokens_;                         //!< A list of tokens.\n    size_t tokenCount_;                     //!< Number of tokens in tokens_.\n    size_t parseErrorOffset_;               //!< Offset in code unit when parsing fail.\n    PointerParseErrorCode parseErrorCode_;  //!< Parsing error code.\n};\n\n//! GenericPointer for Value (UTF-8, default allocator).\ntypedef GenericPointer<Value> Pointer;\n\n//!@name Helper functions for GenericPointer\n//@{\n\n//////////////////////////////////////////////////////////////////////////////\n\ntemplate <typename T>\ntypename T::ValueType& CreateValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, typename T::AllocatorType& a) {\n    return pointer.Create(root, a);\n}\n\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType& CreateValueByPointer(T& root, const CharType(&source)[N], typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Create(root, a);\n}\n\n// No allocator parameter\n\ntemplate <typename DocumentType>\ntypename DocumentType::ValueType& CreateValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer) {\n    return pointer.Create(document);\n}\n\ntemplate <typename DocumentType, typename CharType, size_t N>\ntypename DocumentType::ValueType& CreateValueByPointer(DocumentType& document, const CharType(&source)[N]) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Create(document);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n\ntemplate <typename T>\ntypename T::ValueType* GetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, size_t* unresolvedTokenIndex = 0) {\n    return pointer.Get(root, unresolvedTokenIndex);\n}\n\ntemplate <typename T>\nconst typename T::ValueType* GetValueByPointer(const T& root, const GenericPointer<typename T::ValueType>& pointer, size_t* unresolvedTokenIndex = 0) {\n    return pointer.Get(root, unresolvedTokenIndex);\n}\n\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType* GetValueByPointer(T& root, const CharType (&source)[N], size_t* unresolvedTokenIndex = 0) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Get(root, unresolvedTokenIndex);\n}\n\ntemplate <typename T, typename CharType, size_t N>\nconst typename T::ValueType* GetValueByPointer(const T& root, const CharType(&source)[N], size_t* unresolvedTokenIndex = 0) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Get(root, unresolvedTokenIndex);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n\ntemplate <typename T>\ntypename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::ValueType& defaultValue, typename T::AllocatorType& a) {\n    return pointer.GetWithDefault(root, defaultValue, a);\n}\n\ntemplate <typename T>\ntypename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* defaultValue, typename T::AllocatorType& a) {\n    return pointer.GetWithDefault(root, defaultValue, a);\n}\n\n#if RAPIDJSON_HAS_STDSTRING\ntemplate <typename T>\ntypename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const std::basic_string<typename T::Ch>& defaultValue, typename T::AllocatorType& a) {\n    return pointer.GetWithDefault(root, defaultValue, a);\n}\n#endif\n\ntemplate <typename T, typename T2>\nRAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))\nGetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, T2 defaultValue, typename T::AllocatorType& a) {\n    return pointer.GetWithDefault(root, defaultValue, a);\n}\n\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::ValueType& defaultValue, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);\n}\n\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::Ch* defaultValue, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);\n}\n\n#if RAPIDJSON_HAS_STDSTRING\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const std::basic_string<typename T::Ch>& defaultValue, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);\n}\n#endif\n\ntemplate <typename T, typename CharType, size_t N, typename T2>\nRAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))\nGetValueByPointerWithDefault(T& root, const CharType(&source)[N], T2 defaultValue, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);\n}\n\n// No allocator parameter\n\ntemplate <typename DocumentType>\ntypename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::ValueType& defaultValue) {\n    return pointer.GetWithDefault(document, defaultValue);\n}\n\ntemplate <typename DocumentType>\ntypename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::Ch* defaultValue) {\n    return pointer.GetWithDefault(document, defaultValue);\n}\n\n#if RAPIDJSON_HAS_STDSTRING\ntemplate <typename DocumentType>\ntypename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const std::basic_string<typename DocumentType::Ch>& defaultValue) {\n    return pointer.GetWithDefault(document, defaultValue);\n}\n#endif\n\ntemplate <typename DocumentType, typename T2>\nRAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))\nGetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, T2 defaultValue) {\n    return pointer.GetWithDefault(document, defaultValue);\n}\n\ntemplate <typename DocumentType, typename CharType, size_t N>\ntypename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const typename DocumentType::ValueType& defaultValue) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);\n}\n\ntemplate <typename DocumentType, typename CharType, size_t N>\ntypename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const typename DocumentType::Ch* defaultValue) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);\n}\n\n#if RAPIDJSON_HAS_STDSTRING\ntemplate <typename DocumentType, typename CharType, size_t N>\ntypename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const std::basic_string<typename DocumentType::Ch>& defaultValue) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);\n}\n#endif\n\ntemplate <typename DocumentType, typename CharType, size_t N, typename T2>\nRAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))\nGetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], T2 defaultValue) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n\ntemplate <typename T>\ntypename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, typename T::ValueType& value, typename T::AllocatorType& a) {\n    return pointer.Set(root, value, a);\n}\n\ntemplate <typename T>\ntypename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::ValueType& value, typename T::AllocatorType& a) {\n    return pointer.Set(root, value, a);\n}\n\ntemplate <typename T>\ntypename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* value, typename T::AllocatorType& a) {\n    return pointer.Set(root, value, a);\n}\n\n#if RAPIDJSON_HAS_STDSTRING\ntemplate <typename T>\ntypename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const std::basic_string<typename T::Ch>& value, typename T::AllocatorType& a) {\n    return pointer.Set(root, value, a);\n}\n#endif\n\ntemplate <typename T, typename T2>\nRAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))\nSetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, T2 value, typename T::AllocatorType& a) {\n    return pointer.Set(root, value, a);\n}\n\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], typename T::ValueType& value, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);\n}\n\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::ValueType& value, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);\n}\n\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::Ch* value, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);\n}\n\n#if RAPIDJSON_HAS_STDSTRING\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const std::basic_string<typename T::Ch>& value, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);\n}\n#endif\n\ntemplate <typename T, typename CharType, size_t N, typename T2>\nRAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))\nSetValueByPointer(T& root, const CharType(&source)[N], T2 value, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);\n}\n\n// No allocator parameter\n\ntemplate <typename DocumentType>\ntypename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, typename DocumentType::ValueType& value) {\n    return pointer.Set(document, value);\n}\n\ntemplate <typename DocumentType>\ntypename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::ValueType& value) {\n    return pointer.Set(document, value);\n}\n\ntemplate <typename DocumentType>\ntypename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::Ch* value) {\n    return pointer.Set(document, value);\n}\n\n#if RAPIDJSON_HAS_STDSTRING\ntemplate <typename DocumentType>\ntypename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const std::basic_string<typename DocumentType::Ch>& value) {\n    return pointer.Set(document, value);\n}\n#endif\n\ntemplate <typename DocumentType, typename T2>\nRAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))\nSetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, T2 value) {\n    return pointer.Set(document, value);\n}\n\ntemplate <typename DocumentType, typename CharType, size_t N>\ntypename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], typename DocumentType::ValueType& value) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);\n}\n\ntemplate <typename DocumentType, typename CharType, size_t N>\ntypename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const typename DocumentType::ValueType& value) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);\n}\n\ntemplate <typename DocumentType, typename CharType, size_t N>\ntypename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const typename DocumentType::Ch* value) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);\n}\n\n#if RAPIDJSON_HAS_STDSTRING\ntemplate <typename DocumentType, typename CharType, size_t N>\ntypename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const std::basic_string<typename DocumentType::Ch>& value) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);\n}\n#endif\n\ntemplate <typename DocumentType, typename CharType, size_t N, typename T2>\nRAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))\nSetValueByPointer(DocumentType& document, const CharType(&source)[N], T2 value) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n\ntemplate <typename T>\ntypename T::ValueType& SwapValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, typename T::ValueType& value, typename T::AllocatorType& a) {\n    return pointer.Swap(root, value, a);\n}\n\ntemplate <typename T, typename CharType, size_t N>\ntypename T::ValueType& SwapValueByPointer(T& root, const CharType(&source)[N], typename T::ValueType& value, typename T::AllocatorType& a) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Swap(root, value, a);\n}\n\ntemplate <typename DocumentType>\ntypename DocumentType::ValueType& SwapValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, typename DocumentType::ValueType& value) {\n    return pointer.Swap(document, value);\n}\n\ntemplate <typename DocumentType, typename CharType, size_t N>\ntypename DocumentType::ValueType& SwapValueByPointer(DocumentType& document, const CharType(&source)[N], typename DocumentType::ValueType& value) {\n    return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Swap(document, value);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n\ntemplate <typename T>\nbool EraseValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer) {\n    return pointer.Erase(root);\n}\n\ntemplate <typename T, typename CharType, size_t N>\nbool EraseValueByPointer(T& root, const CharType(&source)[N]) {\n    return GenericPointer<typename T::ValueType>(source, N - 1).Erase(root);\n}\n\n//@}\n\nRAPIDJSON_NAMESPACE_END\n\n#if defined(__clang__) || defined(_MSC_VER)\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_POINTER_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/prettywriter.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_PRETTYWRITER_H_\n#define RAPIDJSON_PRETTYWRITER_H_\n\n#include \"writer.h\"\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(effc++)\n#endif\n\n#if defined(__clang__)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(c++98-compat)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Combination of PrettyWriter format flags.\n/*! \\see PrettyWriter::SetFormatOptions\n */\nenum PrettyFormatOptions {\n    kFormatDefault = 0,         //!< Default pretty formatting.\n    kFormatSingleLineArray = 1  //!< Format arrays on a single line.\n};\n\n//! Writer with indentation and spacing.\n/*!\n    \\tparam OutputStream Type of output os.\n    \\tparam SourceEncoding Encoding of source string.\n    \\tparam TargetEncoding Encoding of output stream.\n    \\tparam StackAllocator Type of allocator for allocating memory of stack.\n*/\ntemplate<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>\nclass PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> {\npublic:\n    typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> Base;\n    typedef typename Base::Ch Ch;\n\n    //! Constructor\n    /*! \\param os Output stream.\n        \\param allocator User supplied allocator. If it is null, it will create a private one.\n        \\param levelDepth Initial capacity of stack.\n    */\n    explicit PrettyWriter(OutputStream& os, StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) : \n        Base(os, allocator, levelDepth), indentChar_(' '), indentCharCount_(4), formatOptions_(kFormatDefault) {}\n\n\n    explicit PrettyWriter(StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) : \n        Base(allocator, levelDepth), indentChar_(' '), indentCharCount_(4), formatOptions_(kFormatDefault) {}\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    PrettyWriter(PrettyWriter&& rhs) :\n        Base(std::forward<PrettyWriter>(rhs)), indentChar_(rhs.indentChar_), indentCharCount_(rhs.indentCharCount_), formatOptions_(rhs.formatOptions_) {}\n#endif\n\n    //! Set custom indentation.\n    /*! \\param indentChar       Character for indentation. Must be whitespace character (' ', '\\\\t', '\\\\n', '\\\\r').\n        \\param indentCharCount  Number of indent characters for each indentation level.\n        \\note The default indentation is 4 spaces.\n    */\n    PrettyWriter& SetIndent(Ch indentChar, unsigned indentCharCount) {\n        RAPIDJSON_ASSERT(indentChar == ' ' || indentChar == '\\t' || indentChar == '\\n' || indentChar == '\\r');\n        indentChar_ = indentChar;\n        indentCharCount_ = indentCharCount;\n        return *this;\n    }\n\n    //! Set pretty writer formatting options.\n    /*! \\param options Formatting options.\n    */\n    PrettyWriter& SetFormatOptions(PrettyFormatOptions options) {\n        formatOptions_ = options;\n        return *this;\n    }\n\n    /*! @name Implementation of Handler\n        \\see Handler\n    */\n    //@{\n\n    bool Null()                 { PrettyPrefix(kNullType);   return Base::EndValue(Base::WriteNull()); }\n    bool Bool(bool b)           { PrettyPrefix(b ? kTrueType : kFalseType); return Base::EndValue(Base::WriteBool(b)); }\n    bool Int(int i)             { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteInt(i)); }\n    bool Uint(unsigned u)       { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteUint(u)); }\n    bool Int64(int64_t i64)     { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteInt64(i64)); }\n    bool Uint64(uint64_t u64)   { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteUint64(u64));  }\n    bool Double(double d)       { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteDouble(d)); }\n\n    bool RawNumber(const Ch* str, SizeType length, bool copy = false) {\n        RAPIDJSON_ASSERT(str != 0);\n        (void)copy;\n        PrettyPrefix(kNumberType);\n        return Base::EndValue(Base::WriteString(str, length));\n    }\n\n    bool String(const Ch* str, SizeType length, bool copy = false) {\n        RAPIDJSON_ASSERT(str != 0);\n        (void)copy;\n        PrettyPrefix(kStringType);\n        return Base::EndValue(Base::WriteString(str, length));\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    bool String(const std::basic_string<Ch>& str) {\n        return String(str.data(), SizeType(str.size()));\n    }\n#endif\n\n    bool StartObject() {\n        PrettyPrefix(kObjectType);\n        new (Base::level_stack_.template Push<typename Base::Level>()) typename Base::Level(false);\n        return Base::WriteStartObject();\n    }\n\n    bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }\n\n#if RAPIDJSON_HAS_STDSTRING\n    bool Key(const std::basic_string<Ch>& str) {\n        return Key(str.data(), SizeType(str.size()));\n    }\n#endif\n\t\n    bool EndObject(SizeType memberCount = 0) {\n        (void)memberCount;\n        RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level)); // not inside an Object\n        RAPIDJSON_ASSERT(!Base::level_stack_.template Top<typename Base::Level>()->inArray); // currently inside an Array, not Object\n        RAPIDJSON_ASSERT(0 == Base::level_stack_.template Top<typename Base::Level>()->valueCount % 2); // Object has a Key without a Value\n       \n        bool empty = Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;\n\n        if (!empty) {\n            Base::os_->Put('\\n');\n            WriteIndent();\n        }\n        bool ret = Base::EndValue(Base::WriteEndObject());\n        (void)ret;\n        RAPIDJSON_ASSERT(ret == true);\n        if (Base::level_stack_.Empty()) // end of json text\n            Base::Flush();\n        return true;\n    }\n\n    bool StartArray() {\n        PrettyPrefix(kArrayType);\n        new (Base::level_stack_.template Push<typename Base::Level>()) typename Base::Level(true);\n        return Base::WriteStartArray();\n    }\n\n    bool EndArray(SizeType memberCount = 0) {\n        (void)memberCount;\n        RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level));\n        RAPIDJSON_ASSERT(Base::level_stack_.template Top<typename Base::Level>()->inArray);\n        bool empty = Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;\n\n        if (!empty && !(formatOptions_ & kFormatSingleLineArray)) {\n            Base::os_->Put('\\n');\n            WriteIndent();\n        }\n        bool ret = Base::EndValue(Base::WriteEndArray());\n        (void)ret;\n        RAPIDJSON_ASSERT(ret == true);\n        if (Base::level_stack_.Empty()) // end of json text\n            Base::Flush();\n        return true;\n    }\n\n    //@}\n\n    /*! @name Convenience extensions */\n    //@{\n\n    //! Simpler but slower overload.\n    bool String(const Ch* str) { return String(str, internal::StrLen(str)); }\n    bool Key(const Ch* str) { return Key(str, internal::StrLen(str)); }\n\n    //@}\n\n    //! Write a raw JSON value.\n    /*!\n        For user to write a stringified JSON as a value.\n\n        \\param json A well-formed JSON value. It should not contain null character within [0, length - 1] range.\n        \\param length Length of the json.\n        \\param type Type of the root of json.\n        \\note When using PrettyWriter::RawValue(), the result json may not be indented correctly.\n    */\n    bool RawValue(const Ch* json, size_t length, Type type) {\n        RAPIDJSON_ASSERT(json != 0);\n        PrettyPrefix(type);\n        return Base::EndValue(Base::WriteRawValue(json, length));\n    }\n\nprotected:\n    void PrettyPrefix(Type type) {\n        (void)type;\n        if (Base::level_stack_.GetSize() != 0) { // this value is not at root\n            typename Base::Level* level = Base::level_stack_.template Top<typename Base::Level>();\n\n            if (level->inArray) {\n                if (level->valueCount > 0) {\n                    Base::os_->Put(','); // add comma if it is not the first element in array\n                    if (formatOptions_ & kFormatSingleLineArray)\n                        Base::os_->Put(' ');\n                }\n\n                if (!(formatOptions_ & kFormatSingleLineArray)) {\n                    Base::os_->Put('\\n');\n                    WriteIndent();\n                }\n            }\n            else {  // in object\n                if (level->valueCount > 0) {\n                    if (level->valueCount % 2 == 0) {\n                        Base::os_->Put(',');\n                        Base::os_->Put('\\n');\n                    }\n                    else {\n                        Base::os_->Put(':');\n                        Base::os_->Put(' ');\n                    }\n                }\n                else\n                    Base::os_->Put('\\n');\n\n                if (level->valueCount % 2 == 0)\n                    WriteIndent();\n            }\n            if (!level->inArray && level->valueCount % 2 == 0)\n                RAPIDJSON_ASSERT(type == kStringType);  // if it's in object, then even number should be a name\n            level->valueCount++;\n        }\n        else {\n            RAPIDJSON_ASSERT(!Base::hasRoot_);  // Should only has one and only one root.\n            Base::hasRoot_ = true;\n        }\n    }\n\n    void WriteIndent()  {\n        size_t count = (Base::level_stack_.GetSize() / sizeof(typename Base::Level)) * indentCharCount_;\n        PutN(*Base::os_, static_cast<typename OutputStream::Ch>(indentChar_), count);\n    }\n\n    Ch indentChar_;\n    unsigned indentCharCount_;\n    PrettyFormatOptions formatOptions_;\n\nprivate:\n    // Prohibit copy constructor & assignment operator.\n    PrettyWriter(const PrettyWriter&);\n    PrettyWriter& operator=(const PrettyWriter&);\n};\n\nRAPIDJSON_NAMESPACE_END\n\n#if defined(__clang__)\nRAPIDJSON_DIAG_POP\n#endif\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_RAPIDJSON_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/rapidjson.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_RAPIDJSON_H_\n#define RAPIDJSON_RAPIDJSON_H_\n\n/*!\\file rapidjson.h\n    \\brief common definitions and configuration\n    \n    \\see RAPIDJSON_CONFIG\n */\n\n/*! \\defgroup RAPIDJSON_CONFIG RapidJSON configuration\n    \\brief Configuration macros for library features\n\n    Some RapidJSON features are configurable to adapt the library to a wide\n    variety of platforms, environments and usage scenarios.  Most of the\n    features can be configured in terms of overridden or predefined\n    preprocessor macros at compile-time.\n\n    Some additional customization is available in the \\ref RAPIDJSON_ERRORS APIs.\n\n    \\note These macros should be given on the compiler command-line\n          (where applicable)  to avoid inconsistent values when compiling\n          different translation units of a single application.\n */\n\n#include <cstdlib>  // malloc(), realloc(), free(), size_t\n#include <cstring>  // memset(), memcpy(), memmove(), memcmp()\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_VERSION_STRING\n//\n// ALWAYS synchronize the following 3 macros with corresponding variables in /CMakeLists.txt.\n//\n\n//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN\n// token stringification\n#define RAPIDJSON_STRINGIFY(x) RAPIDJSON_DO_STRINGIFY(x)\n#define RAPIDJSON_DO_STRINGIFY(x) #x\n\n// token concatenation\n#define RAPIDJSON_JOIN(X, Y) RAPIDJSON_DO_JOIN(X, Y)\n#define RAPIDJSON_DO_JOIN(X, Y) RAPIDJSON_DO_JOIN2(X, Y)\n#define RAPIDJSON_DO_JOIN2(X, Y) X##Y\n//!@endcond\n\n/*! \\def RAPIDJSON_MAJOR_VERSION\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief Major version of RapidJSON in integer.\n*/\n/*! \\def RAPIDJSON_MINOR_VERSION\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief Minor version of RapidJSON in integer.\n*/\n/*! \\def RAPIDJSON_PATCH_VERSION\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief Patch version of RapidJSON in integer.\n*/\n/*! \\def RAPIDJSON_VERSION_STRING\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief Version of RapidJSON in \"<major>.<minor>.<patch>\" string format.\n*/\n#define RAPIDJSON_MAJOR_VERSION 1\n#define RAPIDJSON_MINOR_VERSION 1\n#define RAPIDJSON_PATCH_VERSION 0\n#define RAPIDJSON_VERSION_STRING \\\n    RAPIDJSON_STRINGIFY(RAPIDJSON_MAJOR_VERSION.RAPIDJSON_MINOR_VERSION.RAPIDJSON_PATCH_VERSION)\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_NAMESPACE_(BEGIN|END)\n/*! \\def RAPIDJSON_NAMESPACE\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief   provide custom rapidjson namespace\n\n    In order to avoid symbol clashes and/or \"One Definition Rule\" errors\n    between multiple inclusions of (different versions of) RapidJSON in\n    a single binary, users can customize the name of the main RapidJSON\n    namespace.\n\n    In case of a single nesting level, defining \\c RAPIDJSON_NAMESPACE\n    to a custom name (e.g. \\c MyRapidJSON) is sufficient.  If multiple\n    levels are needed, both \\ref RAPIDJSON_NAMESPACE_BEGIN and \\ref\n    RAPIDJSON_NAMESPACE_END need to be defined as well:\n\n    \\code\n    // in some .cpp file\n    #define RAPIDJSON_NAMESPACE my::rapidjson\n    #define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapidjson {\n    #define RAPIDJSON_NAMESPACE_END   } }\n    #include \"rapidjson/...\"\n    \\endcode\n\n    \\see rapidjson\n */\n/*! \\def RAPIDJSON_NAMESPACE_BEGIN\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief   provide custom rapidjson namespace (opening expression)\n    \\see RAPIDJSON_NAMESPACE\n*/\n/*! \\def RAPIDJSON_NAMESPACE_END\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief   provide custom rapidjson namespace (closing expression)\n    \\see RAPIDJSON_NAMESPACE\n*/\n#ifndef RAPIDJSON_NAMESPACE\n#define RAPIDJSON_NAMESPACE rapidjson\n#endif\n#ifndef RAPIDJSON_NAMESPACE_BEGIN\n#define RAPIDJSON_NAMESPACE_BEGIN namespace RAPIDJSON_NAMESPACE {\n#endif\n#ifndef RAPIDJSON_NAMESPACE_END\n#define RAPIDJSON_NAMESPACE_END }\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_HAS_STDSTRING\n\n#ifndef RAPIDJSON_HAS_STDSTRING\n#ifdef RAPIDJSON_DOXYGEN_RUNNING\n#define RAPIDJSON_HAS_STDSTRING 1 // force generation of documentation\n#else\n#define RAPIDJSON_HAS_STDSTRING 0 // no std::string support by default\n#endif\n/*! \\def RAPIDJSON_HAS_STDSTRING\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief Enable RapidJSON support for \\c std::string\n\n    By defining this preprocessor symbol to \\c 1, several convenience functions for using\n    \\ref rapidjson::GenericValue with \\c std::string are enabled, especially\n    for construction and comparison.\n\n    \\hideinitializer\n*/\n#endif // !defined(RAPIDJSON_HAS_STDSTRING)\n\n#if RAPIDJSON_HAS_STDSTRING\n#include <string>\n#endif // RAPIDJSON_HAS_STDSTRING\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_NO_INT64DEFINE\n\n/*! \\def RAPIDJSON_NO_INT64DEFINE\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief Use external 64-bit integer types.\n\n    RapidJSON requires the 64-bit integer types \\c int64_t and  \\c uint64_t types\n    to be available at global scope.\n\n    If users have their own definition, define RAPIDJSON_NO_INT64DEFINE to\n    prevent RapidJSON from defining its own types.\n*/\n#ifndef RAPIDJSON_NO_INT64DEFINE\n//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN\n#if defined(_MSC_VER) && (_MSC_VER < 1800)\t// Visual Studio 2013\n#include \"msinttypes/stdint.h\"\n#include \"msinttypes/inttypes.h\"\n#else\n// Other compilers should have this.\n#include <stdint.h>\n#include <inttypes.h>\n#endif\n//!@endcond\n#ifdef RAPIDJSON_DOXYGEN_RUNNING\n#define RAPIDJSON_NO_INT64DEFINE\n#endif\n#endif // RAPIDJSON_NO_INT64TYPEDEF\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_FORCEINLINE\n\n#ifndef RAPIDJSON_FORCEINLINE\n//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN\n#if defined(_MSC_VER) && defined(NDEBUG)\n#define RAPIDJSON_FORCEINLINE __forceinline\n#elif defined(__GNUC__) && __GNUC__ >= 4 && defined(NDEBUG)\n#define RAPIDJSON_FORCEINLINE __attribute__((always_inline))\n#else\n#define RAPIDJSON_FORCEINLINE\n#endif\n//!@endcond\n#endif // RAPIDJSON_FORCEINLINE\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_ENDIAN\n#define RAPIDJSON_LITTLEENDIAN  0   //!< Little endian machine\n#define RAPIDJSON_BIGENDIAN     1   //!< Big endian machine\n\n//! Endianness of the machine.\n/*!\n    \\def RAPIDJSON_ENDIAN\n    \\ingroup RAPIDJSON_CONFIG\n\n    GCC 4.6 provided macro for detecting endianness of the target machine. But other\n    compilers may not have this. User can define RAPIDJSON_ENDIAN to either\n    \\ref RAPIDJSON_LITTLEENDIAN or \\ref RAPIDJSON_BIGENDIAN.\n\n    Default detection implemented with reference to\n    \\li https://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html\n    \\li http://www.boost.org/doc/libs/1_42_0/boost/detail/endian.hpp\n*/\n#ifndef RAPIDJSON_ENDIAN\n// Detect with GCC 4.6's macro\n#  ifdef __BYTE_ORDER__\n#    if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__\n#      define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN\n#    elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__\n#      define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN\n#    else\n#      error Unknown machine endianness detected. User needs to define RAPIDJSON_ENDIAN.\n#    endif // __BYTE_ORDER__\n// Detect with GLIBC's endian.h\n#  elif defined(__GLIBC__)\n#    include <endian.h>\n#    if (__BYTE_ORDER == __LITTLE_ENDIAN)\n#      define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN\n#    elif (__BYTE_ORDER == __BIG_ENDIAN)\n#      define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN\n#    else\n#      error Unknown machine endianness detected. User needs to define RAPIDJSON_ENDIAN.\n#   endif // __GLIBC__\n// Detect with _LITTLE_ENDIAN and _BIG_ENDIAN macro\n#  elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)\n#    define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN\n#  elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)\n#    define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN\n// Detect with architecture macros\n#  elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__)\n#    define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN\n#  elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__)\n#    define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN\n#  elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))\n#    define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN\n#  elif defined(RAPIDJSON_DOXYGEN_RUNNING)\n#    define RAPIDJSON_ENDIAN\n#  else\n#    error Unknown machine endianness detected. User needs to define RAPIDJSON_ENDIAN.   \n#  endif\n#endif // RAPIDJSON_ENDIAN\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_64BIT\n\n//! Whether using 64-bit architecture\n#ifndef RAPIDJSON_64BIT\n#if defined(__LP64__) || (defined(__x86_64__) && defined(__ILP32__)) || defined(_WIN64) || defined(__EMSCRIPTEN__)\n#define RAPIDJSON_64BIT 1\n#else\n#define RAPIDJSON_64BIT 0\n#endif\n#endif // RAPIDJSON_64BIT\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_ALIGN\n\n//! Data alignment of the machine.\n/*! \\ingroup RAPIDJSON_CONFIG\n    \\param x pointer to align\n\n    Some machines require strict data alignment. The default is 8 bytes.\n    User can customize by defining the RAPIDJSON_ALIGN function macro.\n*/\n#ifndef RAPIDJSON_ALIGN\n#define RAPIDJSON_ALIGN(x) (((x) + static_cast<size_t>(7u)) & ~static_cast<size_t>(7u))\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_UINT64_C2\n\n//! Construct a 64-bit literal by a pair of 32-bit integer.\n/*!\n    64-bit literal with or without ULL suffix is prone to compiler warnings.\n    UINT64_C() is C macro which cause compilation problems.\n    Use this macro to define 64-bit constants by a pair of 32-bit integer.\n*/\n#ifndef RAPIDJSON_UINT64_C2\n#define RAPIDJSON_UINT64_C2(high32, low32) ((static_cast<uint64_t>(high32) << 32) | static_cast<uint64_t>(low32))\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_48BITPOINTER_OPTIMIZATION\n\n//! Use only lower 48-bit address for some pointers.\n/*!\n    \\ingroup RAPIDJSON_CONFIG\n\n    This optimization uses the fact that current X86-64 architecture only implement lower 48-bit virtual address.\n    The higher 16-bit can be used for storing other data.\n    \\c GenericValue uses this optimization to reduce its size form 24 bytes to 16 bytes in 64-bit architecture.\n*/\n#ifndef RAPIDJSON_48BITPOINTER_OPTIMIZATION\n#if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)\n#define RAPIDJSON_48BITPOINTER_OPTIMIZATION 1\n#else\n#define RAPIDJSON_48BITPOINTER_OPTIMIZATION 0\n#endif\n#endif // RAPIDJSON_48BITPOINTER_OPTIMIZATION\n\n#if RAPIDJSON_48BITPOINTER_OPTIMIZATION == 1\n#if RAPIDJSON_64BIT != 1\n#error RAPIDJSON_48BITPOINTER_OPTIMIZATION can only be set to 1 when RAPIDJSON_64BIT=1\n#endif\n#define RAPIDJSON_SETPOINTER(type, p, x) (p = reinterpret_cast<type *>((reinterpret_cast<uintptr_t>(p) & static_cast<uintptr_t>(RAPIDJSON_UINT64_C2(0xFFFF0000, 0x00000000))) | reinterpret_cast<uintptr_t>(reinterpret_cast<const void*>(x))))\n#define RAPIDJSON_GETPOINTER(type, p) (reinterpret_cast<type *>(reinterpret_cast<uintptr_t>(p) & static_cast<uintptr_t>(RAPIDJSON_UINT64_C2(0x0000FFFF, 0xFFFFFFFF))))\n#else\n#define RAPIDJSON_SETPOINTER(type, p, x) (p = (x))\n#define RAPIDJSON_GETPOINTER(type, p) (p)\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_SSE2/RAPIDJSON_SSE42/RAPIDJSON_NEON/RAPIDJSON_SIMD\n\n/*! \\def RAPIDJSON_SIMD\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief Enable SSE2/SSE4.2/Neon optimization.\n\n    RapidJSON supports optimized implementations for some parsing operations\n    based on the SSE2, SSE4.2 or NEon SIMD extensions on modern Intel\n    or ARM compatible processors.\n\n    To enable these optimizations, three different symbols can be defined;\n    \\code\n    // Enable SSE2 optimization.\n    #define RAPIDJSON_SSE2\n\n    // Enable SSE4.2 optimization.\n    #define RAPIDJSON_SSE42\n    \\endcode\n\n    // Enable ARM Neon optimization.\n    #define RAPIDJSON_NEON\n    \\endcode\n\n    \\c RAPIDJSON_SSE42 takes precedence over SSE2, if both are defined.\n\n    If any of these symbols is defined, RapidJSON defines the macro\n    \\c RAPIDJSON_SIMD to indicate the availability of the optimized code.\n*/\n#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42) \\\n    || defined(RAPIDJSON_NEON) || defined(RAPIDJSON_DOXYGEN_RUNNING)\n#define RAPIDJSON_SIMD\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_NO_SIZETYPEDEFINE\n\n#ifndef RAPIDJSON_NO_SIZETYPEDEFINE\n/*! \\def RAPIDJSON_NO_SIZETYPEDEFINE\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief User-provided \\c SizeType definition.\n\n    In order to avoid using 32-bit size types for indexing strings and arrays,\n    define this preprocessor symbol and provide the type rapidjson::SizeType\n    before including RapidJSON:\n    \\code\n    #define RAPIDJSON_NO_SIZETYPEDEFINE\n    namespace rapidjson { typedef ::std::size_t SizeType; }\n    #include \"rapidjson/...\"\n    \\endcode\n\n    \\see rapidjson::SizeType\n*/\n#ifdef RAPIDJSON_DOXYGEN_RUNNING\n#define RAPIDJSON_NO_SIZETYPEDEFINE\n#endif\nRAPIDJSON_NAMESPACE_BEGIN\n//! Size type (for string lengths, array sizes, etc.)\n/*! RapidJSON uses 32-bit array/string indices even on 64-bit platforms,\n    instead of using \\c size_t. Users may override the SizeType by defining\n    \\ref RAPIDJSON_NO_SIZETYPEDEFINE.\n*/\ntypedef unsigned SizeType;\nRAPIDJSON_NAMESPACE_END\n#endif\n\n// always import std::size_t to rapidjson namespace\nRAPIDJSON_NAMESPACE_BEGIN\nusing std::size_t;\nRAPIDJSON_NAMESPACE_END\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_ASSERT\n\n//! Assertion.\n/*! \\ingroup RAPIDJSON_CONFIG\n    By default, rapidjson uses C \\c assert() for internal assertions.\n    User can override it by defining RAPIDJSON_ASSERT(x) macro.\n\n    \\note Parsing errors are handled and can be customized by the\n          \\ref RAPIDJSON_ERRORS APIs.\n*/\n#ifndef RAPIDJSON_ASSERT\n#include <cassert>\n#define RAPIDJSON_ASSERT(x) assert(x)\n#endif // RAPIDJSON_ASSERT\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_STATIC_ASSERT\n\n// Prefer C++11 static_assert, if available\n#ifndef RAPIDJSON_STATIC_ASSERT\n#if __cplusplus >= 201103L || ( defined(_MSC_VER) && _MSC_VER >= 1800 )\n#define RAPIDJSON_STATIC_ASSERT(x) \\\n   static_assert(x, RAPIDJSON_STRINGIFY(x))\n#endif // C++11\n#endif // RAPIDJSON_STATIC_ASSERT\n\n// Adopt C++03 implementation from boost\n#ifndef RAPIDJSON_STATIC_ASSERT\n#ifndef __clang__\n//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN\n#endif\nRAPIDJSON_NAMESPACE_BEGIN\ntemplate <bool x> struct STATIC_ASSERTION_FAILURE;\ntemplate <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };\ntemplate <size_t x> struct StaticAssertTest {};\nRAPIDJSON_NAMESPACE_END\n\n#if defined(__GNUC__) || defined(__clang__)\n#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))\n#else\n#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE \n#endif\n#ifndef __clang__\n//!@endcond\n#endif\n\n/*! \\def RAPIDJSON_STATIC_ASSERT\n    \\brief (Internal) macro to check for conditions at compile-time\n    \\param x compile-time condition\n    \\hideinitializer\n */\n#define RAPIDJSON_STATIC_ASSERT(x) \\\n    typedef ::RAPIDJSON_NAMESPACE::StaticAssertTest< \\\n      sizeof(::RAPIDJSON_NAMESPACE::STATIC_ASSERTION_FAILURE<bool(x) >)> \\\n    RAPIDJSON_JOIN(StaticAssertTypedef, __LINE__) RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE\n#endif // RAPIDJSON_STATIC_ASSERT\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_LIKELY, RAPIDJSON_UNLIKELY\n\n//! Compiler branching hint for expression with high probability to be true.\n/*!\n    \\ingroup RAPIDJSON_CONFIG\n    \\param x Boolean expression likely to be true.\n*/\n#ifndef RAPIDJSON_LIKELY\n#if defined(__GNUC__) || defined(__clang__)\n#define RAPIDJSON_LIKELY(x) __builtin_expect(!!(x), 1)\n#else\n#define RAPIDJSON_LIKELY(x) (x)\n#endif\n#endif\n\n//! Compiler branching hint for expression with low probability to be true.\n/*!\n    \\ingroup RAPIDJSON_CONFIG\n    \\param x Boolean expression unlikely to be true.\n*/\n#ifndef RAPIDJSON_UNLIKELY\n#if defined(__GNUC__) || defined(__clang__)\n#define RAPIDJSON_UNLIKELY(x) __builtin_expect(!!(x), 0)\n#else\n#define RAPIDJSON_UNLIKELY(x) (x)\n#endif\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// Helpers\n\n//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN\n\n#define RAPIDJSON_MULTILINEMACRO_BEGIN do {  \n#define RAPIDJSON_MULTILINEMACRO_END \\\n} while((void)0, 0)\n\n// adopted from Boost\n#define RAPIDJSON_VERSION_CODE(x,y,z) \\\n  (((x)*100000) + ((y)*100) + (z))\n\n#if defined(__has_builtin)\n#define RAPIDJSON_HAS_BUILTIN(x) __has_builtin(x)\n#else\n#define RAPIDJSON_HAS_BUILTIN(x) 0\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_DIAG_PUSH/POP, RAPIDJSON_DIAG_OFF\n\n#if defined(__GNUC__)\n#define RAPIDJSON_GNUC \\\n    RAPIDJSON_VERSION_CODE(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__)\n#endif\n\n#if defined(__clang__) || (defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,2,0))\n\n#define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))\n#define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)\n#define RAPIDJSON_DIAG_OFF(x) \\\n    RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W,x)))\n\n// push/pop support in Clang and GCC>=4.6\n#if defined(__clang__) || (defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0))\n#define RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_PRAGMA(push)\n#define RAPIDJSON_DIAG_POP  RAPIDJSON_DIAG_PRAGMA(pop)\n#else // GCC >= 4.2, < 4.6\n#define RAPIDJSON_DIAG_PUSH /* ignored */\n#define RAPIDJSON_DIAG_POP /* ignored */\n#endif\n\n#elif defined(_MSC_VER)\n\n// pragma (MSVC specific)\n#define RAPIDJSON_PRAGMA(x) __pragma(x)\n#define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(warning(x))\n\n#define RAPIDJSON_DIAG_OFF(x) RAPIDJSON_DIAG_PRAGMA(disable: x)\n#define RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_PRAGMA(push)\n#define RAPIDJSON_DIAG_POP  RAPIDJSON_DIAG_PRAGMA(pop)\n\n#else\n\n#define RAPIDJSON_DIAG_OFF(x) /* ignored */\n#define RAPIDJSON_DIAG_PUSH   /* ignored */\n#define RAPIDJSON_DIAG_POP    /* ignored */\n\n#endif // RAPIDJSON_DIAG_*\n\n///////////////////////////////////////////////////////////////////////////////\n// C++11 features\n\n#ifndef RAPIDJSON_HAS_CXX11_RVALUE_REFS\n#if defined(__clang__)\n#if __has_feature(cxx_rvalue_references) && \\\n    (defined(_MSC_VER) || defined(_LIBCPP_VERSION) || defined(__GLIBCXX__) && __GLIBCXX__ >= 20080306)\n#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1\n#else\n#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 0\n#endif\n#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \\\n      (defined(_MSC_VER) && _MSC_VER >= 1600) || \\\n      (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5140 && defined(__GXX_EXPERIMENTAL_CXX0X__))\n\n#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1\n#else\n#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 0\n#endif\n#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS\n\n#ifndef RAPIDJSON_HAS_CXX11_NOEXCEPT\n#if defined(__clang__)\n#define RAPIDJSON_HAS_CXX11_NOEXCEPT __has_feature(cxx_noexcept)\n#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \\\n    (defined(_MSC_VER) && _MSC_VER >= 1900) || \\\n    (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5140 && defined(__GXX_EXPERIMENTAL_CXX0X__))\n#define RAPIDJSON_HAS_CXX11_NOEXCEPT 1\n#else\n#define RAPIDJSON_HAS_CXX11_NOEXCEPT 0\n#endif\n#endif\n#if RAPIDJSON_HAS_CXX11_NOEXCEPT\n#define RAPIDJSON_NOEXCEPT noexcept\n#else\n#define RAPIDJSON_NOEXCEPT /* noexcept */\n#endif // RAPIDJSON_HAS_CXX11_NOEXCEPT\n\n// no automatic detection, yet\n#ifndef RAPIDJSON_HAS_CXX11_TYPETRAITS\n#if (defined(_MSC_VER) && _MSC_VER >= 1700)\n#define RAPIDJSON_HAS_CXX11_TYPETRAITS 1\n#else\n#define RAPIDJSON_HAS_CXX11_TYPETRAITS 0\n#endif\n#endif\n\n#ifndef RAPIDJSON_HAS_CXX11_RANGE_FOR\n#if defined(__clang__)\n#define RAPIDJSON_HAS_CXX11_RANGE_FOR __has_feature(cxx_range_for)\n#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \\\n      (defined(_MSC_VER) && _MSC_VER >= 1700) || \\\n      (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5140 && defined(__GXX_EXPERIMENTAL_CXX0X__))\n#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1\n#else\n#define RAPIDJSON_HAS_CXX11_RANGE_FOR 0\n#endif\n#endif // RAPIDJSON_HAS_CXX11_RANGE_FOR\n\n///////////////////////////////////////////////////////////////////////////////\n// C++17 features\n\n#if defined(__has_cpp_attribute)\n# if __has_cpp_attribute(fallthrough)\n#  define RAPIDJSON_DELIBERATE_FALLTHROUGH [[fallthrough]]\n# else\n#  define RAPIDJSON_DELIBERATE_FALLTHROUGH\n# endif\n#else\n# define RAPIDJSON_DELIBERATE_FALLTHROUGH\n#endif\n\n//!@endcond\n\n//! Assertion (in non-throwing contexts).\n /*! \\ingroup RAPIDJSON_CONFIG\n    Some functions provide a \\c noexcept guarantee, if the compiler supports it.\n    In these cases, the \\ref RAPIDJSON_ASSERT macro cannot be overridden to\n    throw an exception.  This macro adds a separate customization point for\n    such cases.\n\n    Defaults to C \\c assert() (as \\ref RAPIDJSON_ASSERT), if \\c noexcept is\n    supported, and to \\ref RAPIDJSON_ASSERT otherwise.\n */\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_NOEXCEPT_ASSERT\n\n#ifndef RAPIDJSON_NOEXCEPT_ASSERT\n#ifdef RAPIDJSON_ASSERT_THROWS\n#if RAPIDJSON_HAS_CXX11_NOEXCEPT\n#define RAPIDJSON_NOEXCEPT_ASSERT(x)\n#else\n#include <cassert>\n#define RAPIDJSON_NOEXCEPT_ASSERT(x) assert(x)\n#endif // RAPIDJSON_HAS_CXX11_NOEXCEPT\n#else\n#define RAPIDJSON_NOEXCEPT_ASSERT(x) RAPIDJSON_ASSERT(x)\n#endif // RAPIDJSON_ASSERT_THROWS\n#endif // RAPIDJSON_NOEXCEPT_ASSERT\n\n///////////////////////////////////////////////////////////////////////////////\n// new/delete\n\n#ifndef RAPIDJSON_NEW\n///! customization point for global \\c new\n#define RAPIDJSON_NEW(TypeName) new TypeName\n#endif\n#ifndef RAPIDJSON_DELETE\n///! customization point for global \\c delete\n#define RAPIDJSON_DELETE(x) delete x\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// Type\n\n/*! \\namespace rapidjson\n    \\brief main RapidJSON namespace\n    \\see RAPIDJSON_NAMESPACE\n*/\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Type of JSON value\nenum Type {\n    kNullType = 0,      //!< null\n    kFalseType = 1,     //!< false\n    kTrueType = 2,      //!< true\n    kObjectType = 3,    //!< object\n    kArrayType = 4,     //!< array \n    kStringType = 5,    //!< string\n    kNumberType = 6     //!< number\n};\n\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_RAPIDJSON_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/reader.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n//\n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed\n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_READER_H_\n#define RAPIDJSON_READER_H_\n\n/*! \\file reader.h */\n\n#include \"allocators.h\"\n#include \"stream.h\"\n#include \"encodedstream.h\"\n#include \"internal/clzll.h\"\n#include \"internal/meta.h\"\n#include \"internal/stack.h\"\n#include \"internal/strtod.h\"\n#include <limits>\n\n#if defined(RAPIDJSON_SIMD) && defined(_MSC_VER)\n#include <intrin.h>\n#pragma intrinsic(_BitScanForward)\n#endif\n#ifdef RAPIDJSON_SSE42\n#include <nmmintrin.h>\n#elif defined(RAPIDJSON_SSE2)\n#include <emmintrin.h>\n#elif defined(RAPIDJSON_NEON)\n#include <arm_neon.h>\n#endif\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(old-style-cast)\nRAPIDJSON_DIAG_OFF(padded)\nRAPIDJSON_DIAG_OFF(switch-enum)\n#elif defined(_MSC_VER)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(4127)  // conditional expression is constant\nRAPIDJSON_DIAG_OFF(4702)  // unreachable code\n#endif\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(effc++)\n#endif\n\n//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN\n#define RAPIDJSON_NOTHING /* deliberately empty */\n#ifndef RAPIDJSON_PARSE_ERROR_EARLY_RETURN\n#define RAPIDJSON_PARSE_ERROR_EARLY_RETURN(value) \\\n    RAPIDJSON_MULTILINEMACRO_BEGIN \\\n    if (RAPIDJSON_UNLIKELY(HasParseError())) { return value; } \\\n    RAPIDJSON_MULTILINEMACRO_END\n#endif\n#define RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID \\\n    RAPIDJSON_PARSE_ERROR_EARLY_RETURN(RAPIDJSON_NOTHING)\n//!@endcond\n\n/*! \\def RAPIDJSON_PARSE_ERROR_NORETURN\n    \\ingroup RAPIDJSON_ERRORS\n    \\brief Macro to indicate a parse error.\n    \\param parseErrorCode \\ref rapidjson::ParseErrorCode of the error\n    \\param offset  position of the error in JSON input (\\c size_t)\n\n    This macros can be used as a customization point for the internal\n    error handling mechanism of RapidJSON.\n\n    A common usage model is to throw an exception instead of requiring the\n    caller to explicitly check the \\ref rapidjson::GenericReader::Parse's\n    return value:\n\n    \\code\n    #define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode,offset) \\\n       throw ParseException(parseErrorCode, #parseErrorCode, offset)\n\n    #include <stdexcept>               // std::runtime_error\n    #include \"rapidjson/error/error.h\" // rapidjson::ParseResult\n\n    struct ParseException : std::runtime_error, rapidjson::ParseResult {\n      ParseException(rapidjson::ParseErrorCode code, const char* msg, size_t offset)\n        : std::runtime_error(msg), ParseResult(code, offset) {}\n    };\n\n    #include \"rapidjson/reader.h\"\n    \\endcode\n\n    \\see RAPIDJSON_PARSE_ERROR, rapidjson::GenericReader::Parse\n */\n#ifndef RAPIDJSON_PARSE_ERROR_NORETURN\n#define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset) \\\n    RAPIDJSON_MULTILINEMACRO_BEGIN \\\n    RAPIDJSON_ASSERT(!HasParseError()); /* Error can only be assigned once */ \\\n    SetParseError(parseErrorCode, offset); \\\n    RAPIDJSON_MULTILINEMACRO_END\n#endif\n\n/*! \\def RAPIDJSON_PARSE_ERROR\n    \\ingroup RAPIDJSON_ERRORS\n    \\brief (Internal) macro to indicate and handle a parse error.\n    \\param parseErrorCode \\ref rapidjson::ParseErrorCode of the error\n    \\param offset  position of the error in JSON input (\\c size_t)\n\n    Invokes RAPIDJSON_PARSE_ERROR_NORETURN and stops the parsing.\n\n    \\see RAPIDJSON_PARSE_ERROR_NORETURN\n    \\hideinitializer\n */\n#ifndef RAPIDJSON_PARSE_ERROR\n#define RAPIDJSON_PARSE_ERROR(parseErrorCode, offset) \\\n    RAPIDJSON_MULTILINEMACRO_BEGIN \\\n    RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset); \\\n    RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; \\\n    RAPIDJSON_MULTILINEMACRO_END\n#endif\n\n#include \"error/error.h\" // ParseErrorCode, ParseResult\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n///////////////////////////////////////////////////////////////////////////////\n// ParseFlag\n\n/*! \\def RAPIDJSON_PARSE_DEFAULT_FLAGS\n    \\ingroup RAPIDJSON_CONFIG\n    \\brief User-defined kParseDefaultFlags definition.\n\n    User can define this as any \\c ParseFlag combinations.\n*/\n#ifndef RAPIDJSON_PARSE_DEFAULT_FLAGS\n#define RAPIDJSON_PARSE_DEFAULT_FLAGS kParseNoFlags\n#endif\n\n//! Combination of parseFlags\n/*! \\see Reader::Parse, Document::Parse, Document::ParseInsitu, Document::ParseStream\n */\nenum ParseFlag {\n    kParseNoFlags = 0,              //!< No flags are set.\n    kParseInsituFlag = 1,           //!< In-situ(destructive) parsing.\n    kParseValidateEncodingFlag = 2, //!< Validate encoding of JSON strings.\n    kParseIterativeFlag = 4,        //!< Iterative(constant complexity in terms of function call stack size) parsing.\n    kParseStopWhenDoneFlag = 8,     //!< After parsing a complete JSON root from stream, stop further processing the rest of stream. When this flag is used, parser will not generate kParseErrorDocumentRootNotSingular error.\n    kParseFullPrecisionFlag = 16,   //!< Parse number in full precision (but slower).\n    kParseCommentsFlag = 32,        //!< Allow one-line (//) and multi-line (/**/) comments.\n    kParseNumbersAsStringsFlag = 64,    //!< Parse all numbers (ints/doubles) as strings.\n    kParseTrailingCommasFlag = 128, //!< Allow trailing commas at the end of objects and arrays.\n    kParseNanAndInfFlag = 256,      //!< Allow parsing NaN, Inf, Infinity, -Inf and -Infinity as doubles.\n    kParseEscapedApostropheFlag = 512,  //!< Allow escaped apostrophe in strings.\n    kParseDefaultFlags = RAPIDJSON_PARSE_DEFAULT_FLAGS  //!< Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// Handler\n\n/*! \\class rapidjson::Handler\n    \\brief Concept for receiving events from GenericReader upon parsing.\n    The functions return true if no error occurs. If they return false,\n    the event publisher should terminate the process.\n\\code\nconcept Handler {\n    typename Ch;\n\n    bool Null();\n    bool Bool(bool b);\n    bool Int(int i);\n    bool Uint(unsigned i);\n    bool Int64(int64_t i);\n    bool Uint64(uint64_t i);\n    bool Double(double d);\n    /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)\n    bool RawNumber(const Ch* str, SizeType length, bool copy);\n    bool String(const Ch* str, SizeType length, bool copy);\n    bool StartObject();\n    bool Key(const Ch* str, SizeType length, bool copy);\n    bool EndObject(SizeType memberCount);\n    bool StartArray();\n    bool EndArray(SizeType elementCount);\n};\n\\endcode\n*/\n///////////////////////////////////////////////////////////////////////////////\n// BaseReaderHandler\n\n//! Default implementation of Handler.\n/*! This can be used as base class of any reader handler.\n    \\note implements Handler concept\n*/\ntemplate<typename Encoding = UTF8<>, typename Derived = void>\nstruct BaseReaderHandler {\n    typedef typename Encoding::Ch Ch;\n\n    typedef typename internal::SelectIf<internal::IsSame<Derived, void>, BaseReaderHandler, Derived>::Type Override;\n\n    bool Default() { return true; }\n    bool Null() { return static_cast<Override&>(*this).Default(); }\n    bool Bool(bool) { return static_cast<Override&>(*this).Default(); }\n    bool Int(int) { return static_cast<Override&>(*this).Default(); }\n    bool Uint(unsigned) { return static_cast<Override&>(*this).Default(); }\n    bool Int64(int64_t) { return static_cast<Override&>(*this).Default(); }\n    bool Uint64(uint64_t) { return static_cast<Override&>(*this).Default(); }\n    bool Double(double) { return static_cast<Override&>(*this).Default(); }\n    /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)\n    bool RawNumber(const Ch* str, SizeType len, bool copy) { return static_cast<Override&>(*this).String(str, len, copy); }\n    bool String(const Ch*, SizeType, bool) { return static_cast<Override&>(*this).Default(); }\n    bool StartObject() { return static_cast<Override&>(*this).Default(); }\n    bool Key(const Ch* str, SizeType len, bool copy) { return static_cast<Override&>(*this).String(str, len, copy); }\n    bool EndObject(SizeType) { return static_cast<Override&>(*this).Default(); }\n    bool StartArray() { return static_cast<Override&>(*this).Default(); }\n    bool EndArray(SizeType) { return static_cast<Override&>(*this).Default(); }\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// StreamLocalCopy\n\nnamespace internal {\n\ntemplate<typename Stream, int = StreamTraits<Stream>::copyOptimization>\nclass StreamLocalCopy;\n\n//! Do copy optimization.\ntemplate<typename Stream>\nclass StreamLocalCopy<Stream, 1> {\npublic:\n    StreamLocalCopy(Stream& original) : s(original), original_(original) {}\n    ~StreamLocalCopy() { original_ = s; }\n\n    Stream s;\n\nprivate:\n    StreamLocalCopy& operator=(const StreamLocalCopy&) /* = delete */;\n\n    Stream& original_;\n};\n\n//! Keep reference.\ntemplate<typename Stream>\nclass StreamLocalCopy<Stream, 0> {\npublic:\n    StreamLocalCopy(Stream& original) : s(original) {}\n\n    Stream& s;\n\nprivate:\n    StreamLocalCopy& operator=(const StreamLocalCopy&) /* = delete */;\n};\n\n} // namespace internal\n\n///////////////////////////////////////////////////////////////////////////////\n// SkipWhitespace\n\n//! Skip the JSON white spaces in a stream.\n/*! \\param is A input stream for skipping white spaces.\n    \\note This function has SSE2/SSE4.2 specialization.\n*/\ntemplate<typename InputStream>\nvoid SkipWhitespace(InputStream& is) {\n    internal::StreamLocalCopy<InputStream> copy(is);\n    InputStream& s(copy.s);\n\n    typename InputStream::Ch c;\n    while ((c = s.Peek()) == ' ' || c == '\\n' || c == '\\r' || c == '\\t')\n        s.Take();\n}\n\ninline const char* SkipWhitespace(const char* p, const char* end) {\n    while (p != end && (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t'))\n        ++p;\n    return p;\n}\n\n#ifdef RAPIDJSON_SSE42\n//! Skip whitespace with SSE 4.2 pcmpistrm instruction, testing 16 8-byte characters at once.\ninline const char *SkipWhitespace_SIMD(const char* p) {\n    // Fast return for single non-whitespace\n    if (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t')\n        ++p;\n    else\n        return p;\n\n    // 16-byte align to the next boundary\n    const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n    while (p != nextAligned)\n        if (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t')\n            ++p;\n        else\n            return p;\n\n    // The rest of string using SIMD\n    static const char whitespace[16] = \" \\n\\r\\t\";\n    const __m128i w = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespace[0]));\n\n    for (;; p += 16) {\n        const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));\n        const int r = _mm_cmpistri(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT | _SIDD_NEGATIVE_POLARITY);\n        if (r != 16)    // some of characters is non-whitespace\n            return p + r;\n    }\n}\n\ninline const char *SkipWhitespace_SIMD(const char* p, const char* end) {\n    // Fast return for single non-whitespace\n    if (p != end && (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t'))\n        ++p;\n    else\n        return p;\n\n    // The middle of string using SIMD\n    static const char whitespace[16] = \" \\n\\r\\t\";\n    const __m128i w = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespace[0]));\n\n    for (; p <= end - 16; p += 16) {\n        const __m128i s = _mm_loadu_si128(reinterpret_cast<const __m128i *>(p));\n        const int r = _mm_cmpistri(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT | _SIDD_NEGATIVE_POLARITY);\n        if (r != 16)    // some of characters is non-whitespace\n            return p + r;\n    }\n\n    return SkipWhitespace(p, end);\n}\n\n#elif defined(RAPIDJSON_SSE2)\n\n//! Skip whitespace with SSE2 instructions, testing 16 8-byte characters at once.\ninline const char *SkipWhitespace_SIMD(const char* p) {\n    // Fast return for single non-whitespace\n    if (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t')\n        ++p;\n    else\n        return p;\n\n    // 16-byte align to the next boundary\n    const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n    while (p != nextAligned)\n        if (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t')\n            ++p;\n        else\n            return p;\n\n    // The rest of string\n    #define C16(c) { c, c, c, c, c, c, c, c, c, c, c, c, c, c, c, c }\n    static const char whitespaces[4][16] = { C16(' '), C16('\\n'), C16('\\r'), C16('\\t') };\n    #undef C16\n\n    const __m128i w0 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[0][0]));\n    const __m128i w1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[1][0]));\n    const __m128i w2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[2][0]));\n    const __m128i w3 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[3][0]));\n\n    for (;; p += 16) {\n        const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));\n        __m128i x = _mm_cmpeq_epi8(s, w0);\n        x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w1));\n        x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w2));\n        x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w3));\n        unsigned short r = static_cast<unsigned short>(~_mm_movemask_epi8(x));\n        if (r != 0) {   // some of characters may be non-whitespace\n#ifdef _MSC_VER         // Find the index of first non-whitespace\n            unsigned long offset;\n            _BitScanForward(&offset, r);\n            return p + offset;\n#else\n            return p + __builtin_ffs(r) - 1;\n#endif\n        }\n    }\n}\n\ninline const char *SkipWhitespace_SIMD(const char* p, const char* end) {\n    // Fast return for single non-whitespace\n    if (p != end && (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t'))\n        ++p;\n    else\n        return p;\n\n    // The rest of string\n    #define C16(c) { c, c, c, c, c, c, c, c, c, c, c, c, c, c, c, c }\n    static const char whitespaces[4][16] = { C16(' '), C16('\\n'), C16('\\r'), C16('\\t') };\n    #undef C16\n\n    const __m128i w0 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[0][0]));\n    const __m128i w1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[1][0]));\n    const __m128i w2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[2][0]));\n    const __m128i w3 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[3][0]));\n\n    for (; p <= end - 16; p += 16) {\n        const __m128i s = _mm_loadu_si128(reinterpret_cast<const __m128i *>(p));\n        __m128i x = _mm_cmpeq_epi8(s, w0);\n        x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w1));\n        x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w2));\n        x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w3));\n        unsigned short r = static_cast<unsigned short>(~_mm_movemask_epi8(x));\n        if (r != 0) {   // some of characters may be non-whitespace\n#ifdef _MSC_VER         // Find the index of first non-whitespace\n            unsigned long offset;\n            _BitScanForward(&offset, r);\n            return p + offset;\n#else\n            return p + __builtin_ffs(r) - 1;\n#endif\n        }\n    }\n\n    return SkipWhitespace(p, end);\n}\n\n#elif defined(RAPIDJSON_NEON)\n\n//! Skip whitespace with ARM Neon instructions, testing 16 8-byte characters at once.\ninline const char *SkipWhitespace_SIMD(const char* p) {\n    // Fast return for single non-whitespace\n    if (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t')\n        ++p;\n    else\n        return p;\n\n    // 16-byte align to the next boundary\n    const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n    while (p != nextAligned)\n        if (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t')\n            ++p;\n        else\n            return p;\n\n    const uint8x16_t w0 = vmovq_n_u8(' ');\n    const uint8x16_t w1 = vmovq_n_u8('\\n');\n    const uint8x16_t w2 = vmovq_n_u8('\\r');\n    const uint8x16_t w3 = vmovq_n_u8('\\t');\n\n    for (;; p += 16) {\n        const uint8x16_t s = vld1q_u8(reinterpret_cast<const uint8_t *>(p));\n        uint8x16_t x = vceqq_u8(s, w0);\n        x = vorrq_u8(x, vceqq_u8(s, w1));\n        x = vorrq_u8(x, vceqq_u8(s, w2));\n        x = vorrq_u8(x, vceqq_u8(s, w3));\n\n        x = vmvnq_u8(x);                       // Negate\n        x = vrev64q_u8(x);                     // Rev in 64\n        uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0);   // extract\n        uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1);  // extract\n\n        if (low == 0) {\n            if (high != 0) {\n                uint32_t lz = internal::clzll(high);\n                return p + 8 + (lz >> 3);\n            }\n        } else {\n            uint32_t lz = internal::clzll(low);\n            return p + (lz >> 3);\n        }\n    }\n}\n\ninline const char *SkipWhitespace_SIMD(const char* p, const char* end) {\n    // Fast return for single non-whitespace\n    if (p != end && (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t'))\n        ++p;\n    else\n        return p;\n\n    const uint8x16_t w0 = vmovq_n_u8(' ');\n    const uint8x16_t w1 = vmovq_n_u8('\\n');\n    const uint8x16_t w2 = vmovq_n_u8('\\r');\n    const uint8x16_t w3 = vmovq_n_u8('\\t');\n\n    for (; p <= end - 16; p += 16) {\n        const uint8x16_t s = vld1q_u8(reinterpret_cast<const uint8_t *>(p));\n        uint8x16_t x = vceqq_u8(s, w0);\n        x = vorrq_u8(x, vceqq_u8(s, w1));\n        x = vorrq_u8(x, vceqq_u8(s, w2));\n        x = vorrq_u8(x, vceqq_u8(s, w3));\n\n        x = vmvnq_u8(x);                       // Negate\n        x = vrev64q_u8(x);                     // Rev in 64\n        uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0);   // extract\n        uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1);  // extract\n\n        if (low == 0) {\n            if (high != 0) {\n                uint32_t lz = internal::clzll(high);\n                return p + 8 + (lz >> 3);\n            }\n        } else {\n            uint32_t lz = internal::clzll(low);\n            return p + (lz >> 3);\n        }\n    }\n\n    return SkipWhitespace(p, end);\n}\n\n#endif // RAPIDJSON_NEON\n\n#ifdef RAPIDJSON_SIMD\n//! Template function specialization for InsituStringStream\ntemplate<> inline void SkipWhitespace(InsituStringStream& is) {\n    is.src_ = const_cast<char*>(SkipWhitespace_SIMD(is.src_));\n}\n\n//! Template function specialization for StringStream\ntemplate<> inline void SkipWhitespace(StringStream& is) {\n    is.src_ = SkipWhitespace_SIMD(is.src_);\n}\n\ntemplate<> inline void SkipWhitespace(EncodedInputStream<UTF8<>, MemoryStream>& is) {\n    is.is_.src_ = SkipWhitespace_SIMD(is.is_.src_, is.is_.end_);\n}\n#endif // RAPIDJSON_SIMD\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericReader\n\n//! SAX-style JSON parser. Use \\ref Reader for UTF8 encoding and default allocator.\n/*! GenericReader parses JSON text from a stream, and send events synchronously to an\n    object implementing Handler concept.\n\n    It needs to allocate a stack for storing a single decoded string during\n    non-destructive parsing.\n\n    For in-situ parsing, the decoded string is directly written to the source\n    text string, no temporary buffer is required.\n\n    A GenericReader object can be reused for parsing multiple JSON text.\n\n    \\tparam SourceEncoding Encoding of the input stream.\n    \\tparam TargetEncoding Encoding of the parse output.\n    \\tparam StackAllocator Allocator type for stack.\n*/\ntemplate <typename SourceEncoding, typename TargetEncoding, typename StackAllocator = CrtAllocator>\nclass GenericReader {\npublic:\n    typedef typename SourceEncoding::Ch Ch; //!< SourceEncoding character type\n\n    //! Constructor.\n    /*! \\param stackAllocator Optional allocator for allocating stack memory. (Only use for non-destructive parsing)\n        \\param stackCapacity stack capacity in bytes for storing a single decoded string.  (Only use for non-destructive parsing)\n    */\n    GenericReader(StackAllocator* stackAllocator = 0, size_t stackCapacity = kDefaultStackCapacity) :\n        stack_(stackAllocator, stackCapacity), parseResult_(), state_(IterativeParsingStartState) {}\n\n    //! Parse JSON text.\n    /*! \\tparam parseFlags Combination of \\ref ParseFlag.\n        \\tparam InputStream Type of input stream, implementing Stream concept.\n        \\tparam Handler Type of handler, implementing Handler concept.\n        \\param is Input stream to be parsed.\n        \\param handler The handler to receive events.\n        \\return Whether the parsing is successful.\n    */\n    template <unsigned parseFlags, typename InputStream, typename Handler>\n    ParseResult Parse(InputStream& is, Handler& handler) {\n        if (parseFlags & kParseIterativeFlag)\n            return IterativeParse<parseFlags>(is, handler);\n\n        parseResult_.Clear();\n\n        ClearStackOnExit scope(*this);\n\n        SkipWhitespaceAndComments<parseFlags>(is);\n        RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);\n\n        if (RAPIDJSON_UNLIKELY(is.Peek() == '\\0')) {\n            RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorDocumentEmpty, is.Tell());\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);\n        }\n        else {\n            ParseValue<parseFlags>(is, handler);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);\n\n            if (!(parseFlags & kParseStopWhenDoneFlag)) {\n                SkipWhitespaceAndComments<parseFlags>(is);\n                RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);\n\n                if (RAPIDJSON_UNLIKELY(is.Peek() != '\\0')) {\n                    RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorDocumentRootNotSingular, is.Tell());\n                    RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);\n                }\n            }\n        }\n\n        return parseResult_;\n    }\n\n    //! Parse JSON text (with \\ref kParseDefaultFlags)\n    /*! \\tparam InputStream Type of input stream, implementing Stream concept\n        \\tparam Handler Type of handler, implementing Handler concept.\n        \\param is Input stream to be parsed.\n        \\param handler The handler to receive events.\n        \\return Whether the parsing is successful.\n    */\n    template <typename InputStream, typename Handler>\n    ParseResult Parse(InputStream& is, Handler& handler) {\n        return Parse<kParseDefaultFlags>(is, handler);\n    }\n\n    //! Initialize JSON text token-by-token parsing\n    /*!\n     */\n    void IterativeParseInit() {\n        parseResult_.Clear();\n        state_ = IterativeParsingStartState;\n    }\n\n    //! Parse one token from JSON text\n    /*! \\tparam InputStream Type of input stream, implementing Stream concept\n        \\tparam Handler Type of handler, implementing Handler concept.\n        \\param is Input stream to be parsed.\n        \\param handler The handler to receive events.\n        \\return Whether the parsing is successful.\n     */\n    template <unsigned parseFlags, typename InputStream, typename Handler>\n    bool IterativeParseNext(InputStream& is, Handler& handler) {\n        while (RAPIDJSON_LIKELY(is.Peek() != '\\0')) {\n            SkipWhitespaceAndComments<parseFlags>(is);\n\n            Token t = Tokenize(is.Peek());\n            IterativeParsingState n = Predict(state_, t);\n            IterativeParsingState d = Transit<parseFlags>(state_, t, n, is, handler);\n\n            // If we've finished or hit an error...\n            if (RAPIDJSON_UNLIKELY(IsIterativeParsingCompleteState(d))) {\n                // Report errors.\n                if (d == IterativeParsingErrorState) {\n                    HandleError(state_, is);\n                    return false;\n                }\n\n                // Transition to the finish state.\n                RAPIDJSON_ASSERT(d == IterativeParsingFinishState);\n                state_ = d;\n\n                // If StopWhenDone is not set...\n                if (!(parseFlags & kParseStopWhenDoneFlag)) {\n                    // ... and extra non-whitespace data is found...\n                    SkipWhitespaceAndComments<parseFlags>(is);\n                    if (is.Peek() != '\\0') {\n                        // ... this is considered an error.\n                        HandleError(state_, is);\n                        return false;\n                    }\n                }\n\n                // Success! We are done!\n                return true;\n            }\n\n            // Transition to the new state.\n            state_ = d;\n\n            // If we parsed anything other than a delimiter, we invoked the handler, so we can return true now.\n            if (!IsIterativeParsingDelimiterState(n))\n                return true;\n        }\n\n        // We reached the end of file.\n        stack_.Clear();\n\n        if (state_ != IterativeParsingFinishState) {\n            HandleError(state_, is);\n            return false;\n        }\n\n        return true;\n    }\n\n    //! Check if token-by-token parsing JSON text is complete\n    /*! \\return Whether the JSON has been fully decoded.\n     */\n    RAPIDJSON_FORCEINLINE bool IterativeParseComplete() const {\n        return IsIterativeParsingCompleteState(state_);\n    }\n\n    //! Whether a parse error has occurred in the last parsing.\n    bool HasParseError() const { return parseResult_.IsError(); }\n\n    //! Get the \\ref ParseErrorCode of last parsing.\n    ParseErrorCode GetParseErrorCode() const { return parseResult_.Code(); }\n\n    //! Get the position of last parsing error in input, 0 otherwise.\n    size_t GetErrorOffset() const { return parseResult_.Offset(); }\n\nprotected:\n    void SetParseError(ParseErrorCode code, size_t offset) { parseResult_.Set(code, offset); }\n\nprivate:\n    // Prohibit copy constructor & assignment operator.\n    GenericReader(const GenericReader&);\n    GenericReader& operator=(const GenericReader&);\n\n    void ClearStack() { stack_.Clear(); }\n\n    // clear stack on any exit from ParseStream, e.g. due to exception\n    struct ClearStackOnExit {\n        explicit ClearStackOnExit(GenericReader& r) : r_(r) {}\n        ~ClearStackOnExit() { r_.ClearStack(); }\n    private:\n        GenericReader& r_;\n        ClearStackOnExit(const ClearStackOnExit&);\n        ClearStackOnExit& operator=(const ClearStackOnExit&);\n    };\n\n    template<unsigned parseFlags, typename InputStream>\n    void SkipWhitespaceAndComments(InputStream& is) {\n        SkipWhitespace(is);\n\n        if (parseFlags & kParseCommentsFlag) {\n            while (RAPIDJSON_UNLIKELY(Consume(is, '/'))) {\n                if (Consume(is, '*')) {\n                    while (true) {\n                        if (RAPIDJSON_UNLIKELY(is.Peek() == '\\0'))\n                            RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell());\n                        else if (Consume(is, '*')) {\n                            if (Consume(is, '/'))\n                                break;\n                        }\n                        else\n                            is.Take();\n                    }\n                }\n                else if (RAPIDJSON_LIKELY(Consume(is, '/')))\n                    while (is.Peek() != '\\0' && is.Take() != '\\n') {}\n                else\n                    RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell());\n\n                SkipWhitespace(is);\n            }\n        }\n    }\n\n    // Parse object: { string : value, ... }\n    template<unsigned parseFlags, typename InputStream, typename Handler>\n    void ParseObject(InputStream& is, Handler& handler) {\n        RAPIDJSON_ASSERT(is.Peek() == '{');\n        is.Take();  // Skip '{'\n\n        if (RAPIDJSON_UNLIKELY(!handler.StartObject()))\n            RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n\n        SkipWhitespaceAndComments<parseFlags>(is);\n        RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n\n        if (Consume(is, '}')) {\n            if (RAPIDJSON_UNLIKELY(!handler.EndObject(0)))  // empty object\n                RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n            return;\n        }\n\n        for (SizeType memberCount = 0;;) {\n            if (RAPIDJSON_UNLIKELY(is.Peek() != '\"'))\n                RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissName, is.Tell());\n\n            ParseString<parseFlags>(is, handler, true);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n\n            SkipWhitespaceAndComments<parseFlags>(is);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n\n            if (RAPIDJSON_UNLIKELY(!Consume(is, ':')))\n                RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissColon, is.Tell());\n\n            SkipWhitespaceAndComments<parseFlags>(is);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n\n            ParseValue<parseFlags>(is, handler);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n\n            SkipWhitespaceAndComments<parseFlags>(is);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n\n            ++memberCount;\n\n            switch (is.Peek()) {\n                case ',':\n                    is.Take();\n                    SkipWhitespaceAndComments<parseFlags>(is);\n                    RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n                    break;\n                case '}':\n                    is.Take();\n                    if (RAPIDJSON_UNLIKELY(!handler.EndObject(memberCount)))\n                        RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n                    return;\n                default:\n                    RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell()); break; // This useless break is only for making warning and coverage happy\n            }\n\n            if (parseFlags & kParseTrailingCommasFlag) {\n                if (is.Peek() == '}') {\n                    if (RAPIDJSON_UNLIKELY(!handler.EndObject(memberCount)))\n                        RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n                    is.Take();\n                    return;\n                }\n            }\n        }\n    }\n\n    // Parse array: [ value, ... ]\n    template<unsigned parseFlags, typename InputStream, typename Handler>\n    void ParseArray(InputStream& is, Handler& handler) {\n        RAPIDJSON_ASSERT(is.Peek() == '[');\n        is.Take();  // Skip '['\n\n        if (RAPIDJSON_UNLIKELY(!handler.StartArray()))\n            RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n\n        SkipWhitespaceAndComments<parseFlags>(is);\n        RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n\n        if (Consume(is, ']')) {\n            if (RAPIDJSON_UNLIKELY(!handler.EndArray(0))) // empty array\n                RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n            return;\n        }\n\n        for (SizeType elementCount = 0;;) {\n            ParseValue<parseFlags>(is, handler);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n\n            ++elementCount;\n            SkipWhitespaceAndComments<parseFlags>(is);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n\n            if (Consume(is, ',')) {\n                SkipWhitespaceAndComments<parseFlags>(is);\n                RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n            }\n            else if (Consume(is, ']')) {\n                if (RAPIDJSON_UNLIKELY(!handler.EndArray(elementCount)))\n                    RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n                return;\n            }\n            else\n                RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell());\n\n            if (parseFlags & kParseTrailingCommasFlag) {\n                if (is.Peek() == ']') {\n                    if (RAPIDJSON_UNLIKELY(!handler.EndArray(elementCount)))\n                        RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n                    is.Take();\n                    return;\n                }\n            }\n        }\n    }\n\n    template<unsigned parseFlags, typename InputStream, typename Handler>\n    void ParseNull(InputStream& is, Handler& handler) {\n        RAPIDJSON_ASSERT(is.Peek() == 'n');\n        is.Take();\n\n        if (RAPIDJSON_LIKELY(Consume(is, 'u') && Consume(is, 'l') && Consume(is, 'l'))) {\n            if (RAPIDJSON_UNLIKELY(!handler.Null()))\n                RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n        }\n        else\n            RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell());\n    }\n\n    template<unsigned parseFlags, typename InputStream, typename Handler>\n    void ParseTrue(InputStream& is, Handler& handler) {\n        RAPIDJSON_ASSERT(is.Peek() == 't');\n        is.Take();\n\n        if (RAPIDJSON_LIKELY(Consume(is, 'r') && Consume(is, 'u') && Consume(is, 'e'))) {\n            if (RAPIDJSON_UNLIKELY(!handler.Bool(true)))\n                RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n        }\n        else\n            RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell());\n    }\n\n    template<unsigned parseFlags, typename InputStream, typename Handler>\n    void ParseFalse(InputStream& is, Handler& handler) {\n        RAPIDJSON_ASSERT(is.Peek() == 'f');\n        is.Take();\n\n        if (RAPIDJSON_LIKELY(Consume(is, 'a') && Consume(is, 'l') && Consume(is, 's') && Consume(is, 'e'))) {\n            if (RAPIDJSON_UNLIKELY(!handler.Bool(false)))\n                RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());\n        }\n        else\n            RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell());\n    }\n\n    template<typename InputStream>\n    RAPIDJSON_FORCEINLINE static bool Consume(InputStream& is, typename InputStream::Ch expect) {\n        if (RAPIDJSON_LIKELY(is.Peek() == expect)) {\n            is.Take();\n            return true;\n        }\n        else\n            return false;\n    }\n\n    // Helper function to parse four hexadecimal digits in \\uXXXX in ParseString().\n    template<typename InputStream>\n    unsigned ParseHex4(InputStream& is, size_t escapeOffset) {\n        unsigned codepoint = 0;\n        for (int i = 0; i < 4; i++) {\n            Ch c = is.Peek();\n            codepoint <<= 4;\n            codepoint += static_cast<unsigned>(c);\n            if (c >= '0' && c <= '9')\n                codepoint -= '0';\n            else if (c >= 'A' && c <= 'F')\n                codepoint -= 'A' - 10;\n            else if (c >= 'a' && c <= 'f')\n                codepoint -= 'a' - 10;\n            else {\n                RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorStringUnicodeEscapeInvalidHex, escapeOffset);\n                RAPIDJSON_PARSE_ERROR_EARLY_RETURN(0);\n            }\n            is.Take();\n        }\n        return codepoint;\n    }\n\n    template <typename CharType>\n    class StackStream {\n    public:\n        typedef CharType Ch;\n\n        StackStream(internal::Stack<StackAllocator>& stack) : stack_(stack), length_(0) {}\n        RAPIDJSON_FORCEINLINE void Put(Ch c) {\n            *stack_.template Push<Ch>() = c;\n            ++length_;\n        }\n\n        RAPIDJSON_FORCEINLINE void* Push(SizeType count) {\n            length_ += count;\n            return stack_.template Push<Ch>(count);\n        }\n\n        size_t Length() const { return length_; }\n\n        Ch* Pop() {\n            return stack_.template Pop<Ch>(length_);\n        }\n\n    private:\n        StackStream(const StackStream&);\n        StackStream& operator=(const StackStream&);\n\n        internal::Stack<StackAllocator>& stack_;\n        SizeType length_;\n    };\n\n    // Parse string and generate String event. Different code paths for kParseInsituFlag.\n    template<unsigned parseFlags, typename InputStream, typename Handler>\n    void ParseString(InputStream& is, Handler& handler, bool isKey = false) {\n        internal::StreamLocalCopy<InputStream> copy(is);\n        InputStream& s(copy.s);\n\n        RAPIDJSON_ASSERT(s.Peek() == '\\\"');\n        s.Take();  // Skip '\\\"'\n\n        bool success = false;\n        if (parseFlags & kParseInsituFlag) {\n            typename InputStream::Ch *head = s.PutBegin();\n            ParseStringToStream<parseFlags, SourceEncoding, SourceEncoding>(s, s);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n            size_t length = s.PutEnd(head) - 1;\n            RAPIDJSON_ASSERT(length <= 0xFFFFFFFF);\n            const typename TargetEncoding::Ch* const str = reinterpret_cast<typename TargetEncoding::Ch*>(head);\n            success = (isKey ? handler.Key(str, SizeType(length), false) : handler.String(str, SizeType(length), false));\n        }\n        else {\n            StackStream<typename TargetEncoding::Ch> stackStream(stack_);\n            ParseStringToStream<parseFlags, SourceEncoding, TargetEncoding>(s, stackStream);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n            SizeType length = static_cast<SizeType>(stackStream.Length()) - 1;\n            const typename TargetEncoding::Ch* const str = stackStream.Pop();\n            success = (isKey ? handler.Key(str, length, true) : handler.String(str, length, true));\n        }\n        if (RAPIDJSON_UNLIKELY(!success))\n            RAPIDJSON_PARSE_ERROR(kParseErrorTermination, s.Tell());\n    }\n\n    // Parse string to an output is\n    // This function handles the prefix/suffix double quotes, escaping, and optional encoding validation.\n    template<unsigned parseFlags, typename SEncoding, typename TEncoding, typename InputStream, typename OutputStream>\n    RAPIDJSON_FORCEINLINE void ParseStringToStream(InputStream& is, OutputStream& os) {\n//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN\n#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n        static const char escape[256] = {\n            Z16, Z16, 0, 0,'\\\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '/',\n            Z16, Z16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\\\', 0, 0, 0,\n            0, 0,'\\b', 0, 0, 0,'\\f', 0, 0, 0, 0, 0, 0, 0,'\\n', 0,\n            0, 0,'\\r', 0,'\\t', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n            Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16\n        };\n#undef Z16\n//!@endcond\n\n        for (;;) {\n            // Scan and copy string before \"\\\\\\\"\" or < 0x20. This is an optional optimzation.\n            if (!(parseFlags & kParseValidateEncodingFlag))\n                ScanCopyUnescapedString(is, os);\n\n            Ch c = is.Peek();\n            if (RAPIDJSON_UNLIKELY(c == '\\\\')) {    // Escape\n                size_t escapeOffset = is.Tell();    // For invalid escaping, report the initial '\\\\' as error offset\n                is.Take();\n                Ch e = is.Peek();\n                if ((sizeof(Ch) == 1 || unsigned(e) < 256) && RAPIDJSON_LIKELY(escape[static_cast<unsigned char>(e)])) {\n                    is.Take();\n                    os.Put(static_cast<typename TEncoding::Ch>(escape[static_cast<unsigned char>(e)]));\n                }\n                else if ((parseFlags & kParseEscapedApostropheFlag) && RAPIDJSON_LIKELY(e == '\\'')) { // Allow escaped apostrophe\n                    is.Take();\n                    os.Put('\\'');\n                }\n                else if (RAPIDJSON_LIKELY(e == 'u')) {    // Unicode\n                    is.Take();\n                    unsigned codepoint = ParseHex4(is, escapeOffset);\n                    RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n                    if (RAPIDJSON_UNLIKELY(codepoint >= 0xD800 && codepoint <= 0xDBFF)) {\n                        // Handle UTF-16 surrogate pair\n                        if (RAPIDJSON_UNLIKELY(!Consume(is, '\\\\') || !Consume(is, 'u')))\n                            RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, escapeOffset);\n                        unsigned codepoint2 = ParseHex4(is, escapeOffset);\n                        RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;\n                        if (RAPIDJSON_UNLIKELY(codepoint2 < 0xDC00 || codepoint2 > 0xDFFF))\n                            RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, escapeOffset);\n                        codepoint = (((codepoint - 0xD800) << 10) | (codepoint2 - 0xDC00)) + 0x10000;\n                    }\n                    TEncoding::Encode(os, codepoint);\n                }\n                else\n                    RAPIDJSON_PARSE_ERROR(kParseErrorStringEscapeInvalid, escapeOffset);\n            }\n            else if (RAPIDJSON_UNLIKELY(c == '\"')) {    // Closing double quote\n                is.Take();\n                os.Put('\\0');   // null-terminate the string\n                return;\n            }\n            else if (RAPIDJSON_UNLIKELY(static_cast<unsigned>(c) < 0x20)) { // RFC 4627: unescaped = %x20-21 / %x23-5B / %x5D-10FFFF\n                if (c == '\\0')\n                    RAPIDJSON_PARSE_ERROR(kParseErrorStringMissQuotationMark, is.Tell());\n                else\n                    RAPIDJSON_PARSE_ERROR(kParseErrorStringInvalidEncoding, is.Tell());\n            }\n            else {\n                size_t offset = is.Tell();\n                if (RAPIDJSON_UNLIKELY((parseFlags & kParseValidateEncodingFlag ?\n                    !Transcoder<SEncoding, TEncoding>::Validate(is, os) :\n                    !Transcoder<SEncoding, TEncoding>::Transcode(is, os))))\n                    RAPIDJSON_PARSE_ERROR(kParseErrorStringInvalidEncoding, offset);\n            }\n        }\n    }\n\n    template<typename InputStream, typename OutputStream>\n    static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InputStream&, OutputStream&) {\n            // Do nothing for generic version\n    }\n\n#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42)\n    // StringStream -> StackStream<char>\n    static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(StringStream& is, StackStream<char>& os) {\n        const char* p = is.src_;\n\n        // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)\n        const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n        while (p != nextAligned)\n            if (RAPIDJSON_UNLIKELY(*p == '\\\"') || RAPIDJSON_UNLIKELY(*p == '\\\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {\n                is.src_ = p;\n                return;\n            }\n            else\n                os.Put(*p++);\n\n        // The rest of string using SIMD\n        static const char dquote[16] = { '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"' };\n        static const char bslash[16] = { '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\' };\n        static const char space[16]  = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F };\n        const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));\n        const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));\n        const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));\n\n        for (;; p += 16) {\n            const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));\n            const __m128i t1 = _mm_cmpeq_epi8(s, dq);\n            const __m128i t2 = _mm_cmpeq_epi8(s, bs);\n            const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F\n            const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);\n            unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));\n            if (RAPIDJSON_UNLIKELY(r != 0)) {   // some of characters is escaped\n                SizeType length;\n    #ifdef _MSC_VER         // Find the index of first escaped\n                unsigned long offset;\n                _BitScanForward(&offset, r);\n                length = offset;\n    #else\n                length = static_cast<SizeType>(__builtin_ffs(r) - 1);\n    #endif\n                if (length != 0) {\n                    char* q = reinterpret_cast<char*>(os.Push(length));\n                    for (size_t i = 0; i < length; i++)\n                        q[i] = p[i];\n\n                    p += length;\n                }\n                break;\n            }\n            _mm_storeu_si128(reinterpret_cast<__m128i *>(os.Push(16)), s);\n        }\n\n        is.src_ = p;\n    }\n\n    // InsituStringStream -> InsituStringStream\n    static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InsituStringStream& is, InsituStringStream& os) {\n        RAPIDJSON_ASSERT(&is == &os);\n        (void)os;\n\n        if (is.src_ == is.dst_) {\n            SkipUnescapedString(is);\n            return;\n        }\n\n        char* p = is.src_;\n        char *q = is.dst_;\n\n        // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)\n        const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n        while (p != nextAligned)\n            if (RAPIDJSON_UNLIKELY(*p == '\\\"') || RAPIDJSON_UNLIKELY(*p == '\\\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {\n                is.src_ = p;\n                is.dst_ = q;\n                return;\n            }\n            else\n                *q++ = *p++;\n\n        // The rest of string using SIMD\n        static const char dquote[16] = { '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"' };\n        static const char bslash[16] = { '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\' };\n        static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F };\n        const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));\n        const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));\n        const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));\n\n        for (;; p += 16, q += 16) {\n            const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));\n            const __m128i t1 = _mm_cmpeq_epi8(s, dq);\n            const __m128i t2 = _mm_cmpeq_epi8(s, bs);\n            const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F\n            const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);\n            unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));\n            if (RAPIDJSON_UNLIKELY(r != 0)) {   // some of characters is escaped\n                size_t length;\n#ifdef _MSC_VER         // Find the index of first escaped\n                unsigned long offset;\n                _BitScanForward(&offset, r);\n                length = offset;\n#else\n                length = static_cast<size_t>(__builtin_ffs(r) - 1);\n#endif\n                for (const char* pend = p + length; p != pend; )\n                    *q++ = *p++;\n                break;\n            }\n            _mm_storeu_si128(reinterpret_cast<__m128i *>(q), s);\n        }\n\n        is.src_ = p;\n        is.dst_ = q;\n    }\n\n    // When read/write pointers are the same for insitu stream, just skip unescaped characters\n    static RAPIDJSON_FORCEINLINE void SkipUnescapedString(InsituStringStream& is) {\n        RAPIDJSON_ASSERT(is.src_ == is.dst_);\n        char* p = is.src_;\n\n        // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)\n        const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n        for (; p != nextAligned; p++)\n            if (RAPIDJSON_UNLIKELY(*p == '\\\"') || RAPIDJSON_UNLIKELY(*p == '\\\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {\n                is.src_ = is.dst_ = p;\n                return;\n            }\n\n        // The rest of string using SIMD\n        static const char dquote[16] = { '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"' };\n        static const char bslash[16] = { '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\' };\n        static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F };\n        const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));\n        const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));\n        const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));\n\n        for (;; p += 16) {\n            const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));\n            const __m128i t1 = _mm_cmpeq_epi8(s, dq);\n            const __m128i t2 = _mm_cmpeq_epi8(s, bs);\n            const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F\n            const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);\n            unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));\n            if (RAPIDJSON_UNLIKELY(r != 0)) {   // some of characters is escaped\n                size_t length;\n#ifdef _MSC_VER         // Find the index of first escaped\n                unsigned long offset;\n                _BitScanForward(&offset, r);\n                length = offset;\n#else\n                length = static_cast<size_t>(__builtin_ffs(r) - 1);\n#endif\n                p += length;\n                break;\n            }\n        }\n\n        is.src_ = is.dst_ = p;\n    }\n#elif defined(RAPIDJSON_NEON)\n    // StringStream -> StackStream<char>\n    static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(StringStream& is, StackStream<char>& os) {\n        const char* p = is.src_;\n\n        // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)\n        const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n        while (p != nextAligned)\n            if (RAPIDJSON_UNLIKELY(*p == '\\\"') || RAPIDJSON_UNLIKELY(*p == '\\\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {\n                is.src_ = p;\n                return;\n            }\n            else\n                os.Put(*p++);\n\n        // The rest of string using SIMD\n        const uint8x16_t s0 = vmovq_n_u8('\"');\n        const uint8x16_t s1 = vmovq_n_u8('\\\\');\n        const uint8x16_t s2 = vmovq_n_u8('\\b');\n        const uint8x16_t s3 = vmovq_n_u8(32);\n\n        for (;; p += 16) {\n            const uint8x16_t s = vld1q_u8(reinterpret_cast<const uint8_t *>(p));\n            uint8x16_t x = vceqq_u8(s, s0);\n            x = vorrq_u8(x, vceqq_u8(s, s1));\n            x = vorrq_u8(x, vceqq_u8(s, s2));\n            x = vorrq_u8(x, vcltq_u8(s, s3));\n\n            x = vrev64q_u8(x);                     // Rev in 64\n            uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0);   // extract\n            uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1);  // extract\n\n            SizeType length = 0;\n            bool escaped = false;\n            if (low == 0) {\n                if (high != 0) {\n                    uint32_t lz = internal::clzll(high);\n                    length = 8 + (lz >> 3);\n                    escaped = true;\n                }\n            } else {\n                uint32_t lz = internal::clzll(low);\n                length = lz >> 3;\n                escaped = true;\n            }\n            if (RAPIDJSON_UNLIKELY(escaped)) {   // some of characters is escaped\n                if (length != 0) {\n                    char* q = reinterpret_cast<char*>(os.Push(length));\n                    for (size_t i = 0; i < length; i++)\n                        q[i] = p[i];\n\n                    p += length;\n                }\n                break;\n            }\n            vst1q_u8(reinterpret_cast<uint8_t *>(os.Push(16)), s);\n        }\n\n        is.src_ = p;\n    }\n\n    // InsituStringStream -> InsituStringStream\n    static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InsituStringStream& is, InsituStringStream& os) {\n        RAPIDJSON_ASSERT(&is == &os);\n        (void)os;\n\n        if (is.src_ == is.dst_) {\n            SkipUnescapedString(is);\n            return;\n        }\n\n        char* p = is.src_;\n        char *q = is.dst_;\n\n        // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)\n        const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n        while (p != nextAligned)\n            if (RAPIDJSON_UNLIKELY(*p == '\\\"') || RAPIDJSON_UNLIKELY(*p == '\\\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {\n                is.src_ = p;\n                is.dst_ = q;\n                return;\n            }\n            else\n                *q++ = *p++;\n\n        // The rest of string using SIMD\n        const uint8x16_t s0 = vmovq_n_u8('\"');\n        const uint8x16_t s1 = vmovq_n_u8('\\\\');\n        const uint8x16_t s2 = vmovq_n_u8('\\b');\n        const uint8x16_t s3 = vmovq_n_u8(32);\n\n        for (;; p += 16, q += 16) {\n            const uint8x16_t s = vld1q_u8(reinterpret_cast<uint8_t *>(p));\n            uint8x16_t x = vceqq_u8(s, s0);\n            x = vorrq_u8(x, vceqq_u8(s, s1));\n            x = vorrq_u8(x, vceqq_u8(s, s2));\n            x = vorrq_u8(x, vcltq_u8(s, s3));\n\n            x = vrev64q_u8(x);                     // Rev in 64\n            uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0);   // extract\n            uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1);  // extract\n\n            SizeType length = 0;\n            bool escaped = false;\n            if (low == 0) {\n                if (high != 0) {\n                    uint32_t lz = internal::clzll(high);\n                    length = 8 + (lz >> 3);\n                    escaped = true;\n                }\n            } else {\n                uint32_t lz = internal::clzll(low);\n                length = lz >> 3;\n                escaped = true;\n            }\n            if (RAPIDJSON_UNLIKELY(escaped)) {   // some of characters is escaped\n                for (const char* pend = p + length; p != pend; ) {\n                    *q++ = *p++;\n                }\n                break;\n            }\n            vst1q_u8(reinterpret_cast<uint8_t *>(q), s);\n        }\n\n        is.src_ = p;\n        is.dst_ = q;\n    }\n\n    // When read/write pointers are the same for insitu stream, just skip unescaped characters\n    static RAPIDJSON_FORCEINLINE void SkipUnescapedString(InsituStringStream& is) {\n        RAPIDJSON_ASSERT(is.src_ == is.dst_);\n        char* p = is.src_;\n\n        // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)\n        const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n        for (; p != nextAligned; p++)\n            if (RAPIDJSON_UNLIKELY(*p == '\\\"') || RAPIDJSON_UNLIKELY(*p == '\\\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {\n                is.src_ = is.dst_ = p;\n                return;\n            }\n\n        // The rest of string using SIMD\n        const uint8x16_t s0 = vmovq_n_u8('\"');\n        const uint8x16_t s1 = vmovq_n_u8('\\\\');\n        const uint8x16_t s2 = vmovq_n_u8('\\b');\n        const uint8x16_t s3 = vmovq_n_u8(32);\n\n        for (;; p += 16) {\n            const uint8x16_t s = vld1q_u8(reinterpret_cast<uint8_t *>(p));\n            uint8x16_t x = vceqq_u8(s, s0);\n            x = vorrq_u8(x, vceqq_u8(s, s1));\n            x = vorrq_u8(x, vceqq_u8(s, s2));\n            x = vorrq_u8(x, vcltq_u8(s, s3));\n\n            x = vrev64q_u8(x);                     // Rev in 64\n            uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0);   // extract\n            uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1);  // extract\n\n            if (low == 0) {\n                if (high != 0) {\n                    uint32_t lz = internal::clzll(high);\n                    p += 8 + (lz >> 3);\n                    break;\n                }\n            } else {\n                uint32_t lz = internal::clzll(low);\n                p += lz >> 3;\n                break;\n            }\n        }\n\n        is.src_ = is.dst_ = p;\n    }\n#endif // RAPIDJSON_NEON\n\n    template<typename InputStream, bool backup, bool pushOnTake>\n    class NumberStream;\n\n    template<typename InputStream>\n    class NumberStream<InputStream, false, false> {\n    public:\n        typedef typename InputStream::Ch Ch;\n\n        NumberStream(GenericReader& reader, InputStream& s) : is(s) { (void)reader;  }\n\n        RAPIDJSON_FORCEINLINE Ch Peek() const { return is.Peek(); }\n        RAPIDJSON_FORCEINLINE Ch TakePush() { return is.Take(); }\n        RAPIDJSON_FORCEINLINE Ch Take() { return is.Take(); }\n        RAPIDJSON_FORCEINLINE void Push(char) {}\n\n        size_t Tell() { return is.Tell(); }\n        size_t Length() { return 0; }\n        const char* Pop() { return 0; }\n\n    protected:\n        NumberStream& operator=(const NumberStream&);\n\n        InputStream& is;\n    };\n\n    template<typename InputStream>\n    class NumberStream<InputStream, true, false> : public NumberStream<InputStream, false, false> {\n        typedef NumberStream<InputStream, false, false> Base;\n    public:\n        NumberStream(GenericReader& reader, InputStream& is) : Base(reader, is), stackStream(reader.stack_) {}\n\n        RAPIDJSON_FORCEINLINE Ch TakePush() {\n            stackStream.Put(static_cast<char>(Base::is.Peek()));\n            return Base::is.Take();\n        }\n\n        RAPIDJSON_FORCEINLINE void Push(char c) {\n            stackStream.Put(c);\n        }\n\n        size_t Length() { return stackStream.Length(); }\n\n        const char* Pop() {\n            stackStream.Put('\\0');\n            return stackStream.Pop();\n        }\n\n    private:\n        StackStream<char> stackStream;\n    };\n\n    template<typename InputStream>\n    class NumberStream<InputStream, true, true> : public NumberStream<InputStream, true, false> {\n        typedef NumberStream<InputStream, true, false> Base;\n    public:\n        NumberStream(GenericReader& reader, InputStream& is) : Base(reader, is) {}\n\n        RAPIDJSON_FORCEINLINE Ch Take() { return Base::TakePush(); }\n    };\n\n    template<unsigned parseFlags, typename InputStream, typename Handler>\n    void ParseNumber(InputStream& is, Handler& handler) {\n        internal::StreamLocalCopy<InputStream> copy(is);\n        NumberStream<InputStream,\n            ((parseFlags & kParseNumbersAsStringsFlag) != 0) ?\n                ((parseFlags & kParseInsituFlag) == 0) :\n                ((parseFlags & kParseFullPrecisionFlag) != 0),\n            (parseFlags & kParseNumbersAsStringsFlag) != 0 &&\n                (parseFlags & kParseInsituFlag) == 0> s(*this, copy.s);\n\n        size_t startOffset = s.Tell();\n        double d = 0.0;\n        bool useNanOrInf = false;\n\n        // Parse minus\n        bool minus = Consume(s, '-');\n\n        // Parse int: zero / ( digit1-9 *DIGIT )\n        unsigned i = 0;\n        uint64_t i64 = 0;\n        bool use64bit = false;\n        int significandDigit = 0;\n        if (RAPIDJSON_UNLIKELY(s.Peek() == '0')) {\n            i = 0;\n            s.TakePush();\n        }\n        else if (RAPIDJSON_LIKELY(s.Peek() >= '1' && s.Peek() <= '9')) {\n            i = static_cast<unsigned>(s.TakePush() - '0');\n\n            if (minus)\n                while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                    if (RAPIDJSON_UNLIKELY(i >= 214748364)) { // 2^31 = 2147483648\n                        if (RAPIDJSON_LIKELY(i != 214748364 || s.Peek() > '8')) {\n                            i64 = i;\n                            use64bit = true;\n                            break;\n                        }\n                    }\n                    i = i * 10 + static_cast<unsigned>(s.TakePush() - '0');\n                    significandDigit++;\n                }\n            else\n                while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                    if (RAPIDJSON_UNLIKELY(i >= 429496729)) { // 2^32 - 1 = 4294967295\n                        if (RAPIDJSON_LIKELY(i != 429496729 || s.Peek() > '5')) {\n                            i64 = i;\n                            use64bit = true;\n                            break;\n                        }\n                    }\n                    i = i * 10 + static_cast<unsigned>(s.TakePush() - '0');\n                    significandDigit++;\n                }\n        }\n        // Parse NaN or Infinity here\n        else if ((parseFlags & kParseNanAndInfFlag) && RAPIDJSON_LIKELY((s.Peek() == 'I' || s.Peek() == 'N'))) {\n            if (Consume(s, 'N')) {\n                if (Consume(s, 'a') && Consume(s, 'N')) {\n                    d = std::numeric_limits<double>::quiet_NaN();\n                    useNanOrInf = true;\n                }\n            }\n            else if (RAPIDJSON_LIKELY(Consume(s, 'I'))) {\n                if (Consume(s, 'n') && Consume(s, 'f')) {\n                    d = (minus ? -std::numeric_limits<double>::infinity() : std::numeric_limits<double>::infinity());\n                    useNanOrInf = true;\n\n                    if (RAPIDJSON_UNLIKELY(s.Peek() == 'i' && !(Consume(s, 'i') && Consume(s, 'n')\n                                                                && Consume(s, 'i') && Consume(s, 't') && Consume(s, 'y')))) {\n                        RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell());\n                    }\n                }\n            }\n\n            if (RAPIDJSON_UNLIKELY(!useNanOrInf)) {\n                RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell());\n            }\n        }\n        else\n            RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell());\n\n        // Parse 64bit int\n        bool useDouble = false;\n        if (use64bit) {\n            if (minus)\n                while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                     if (RAPIDJSON_UNLIKELY(i64 >= RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC))) // 2^63 = 9223372036854775808\n                        if (RAPIDJSON_LIKELY(i64 != RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC) || s.Peek() > '8')) {\n                            d = static_cast<double>(i64);\n                            useDouble = true;\n                            break;\n                        }\n                    i64 = i64 * 10 + static_cast<unsigned>(s.TakePush() - '0');\n                    significandDigit++;\n                }\n            else\n                while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                    if (RAPIDJSON_UNLIKELY(i64 >= RAPIDJSON_UINT64_C2(0x19999999, 0x99999999))) // 2^64 - 1 = 18446744073709551615\n                        if (RAPIDJSON_LIKELY(i64 != RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) || s.Peek() > '5')) {\n                            d = static_cast<double>(i64);\n                            useDouble = true;\n                            break;\n                        }\n                    i64 = i64 * 10 + static_cast<unsigned>(s.TakePush() - '0');\n                    significandDigit++;\n                }\n        }\n\n        // Force double for big integer\n        if (useDouble) {\n            while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                d = d * 10 + (s.TakePush() - '0');\n            }\n        }\n\n        // Parse frac = decimal-point 1*DIGIT\n        int expFrac = 0;\n        size_t decimalPosition;\n        if (Consume(s, '.')) {\n            decimalPosition = s.Length();\n\n            if (RAPIDJSON_UNLIKELY(!(s.Peek() >= '0' && s.Peek() <= '9')))\n                RAPIDJSON_PARSE_ERROR(kParseErrorNumberMissFraction, s.Tell());\n\n            if (!useDouble) {\n#if RAPIDJSON_64BIT\n                // Use i64 to store significand in 64-bit architecture\n                if (!use64bit)\n                    i64 = i;\n\n                while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                    if (i64 > RAPIDJSON_UINT64_C2(0x1FFFFF, 0xFFFFFFFF)) // 2^53 - 1 for fast path\n                        break;\n                    else {\n                        i64 = i64 * 10 + static_cast<unsigned>(s.TakePush() - '0');\n                        --expFrac;\n                        if (i64 != 0)\n                            significandDigit++;\n                    }\n                }\n\n                d = static_cast<double>(i64);\n#else\n                // Use double to store significand in 32-bit architecture\n                d = static_cast<double>(use64bit ? i64 : i);\n#endif\n                useDouble = true;\n            }\n\n            while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                if (significandDigit < 17) {\n                    d = d * 10.0 + (s.TakePush() - '0');\n                    --expFrac;\n                    if (RAPIDJSON_LIKELY(d > 0.0))\n                        significandDigit++;\n                }\n                else\n                    s.TakePush();\n            }\n        }\n        else\n            decimalPosition = s.Length(); // decimal position at the end of integer.\n\n        // Parse exp = e [ minus / plus ] 1*DIGIT\n        int exp = 0;\n        if (Consume(s, 'e') || Consume(s, 'E')) {\n            if (!useDouble) {\n                d = static_cast<double>(use64bit ? i64 : i);\n                useDouble = true;\n            }\n\n            bool expMinus = false;\n            if (Consume(s, '+'))\n                ;\n            else if (Consume(s, '-'))\n                expMinus = true;\n\n            if (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                exp = static_cast<int>(s.Take() - '0');\n                if (expMinus) {\n                    // (exp + expFrac) must not underflow int => we're detecting when -exp gets\n                    // dangerously close to INT_MIN (a pessimistic next digit 9 would push it into\n                    // underflow territory):\n                    //\n                    //        -(exp * 10 + 9) + expFrac >= INT_MIN\n                    //   <=>  exp <= (expFrac - INT_MIN - 9) / 10\n                    RAPIDJSON_ASSERT(expFrac <= 0);\n                    int maxExp = (expFrac + 2147483639) / 10;\n\n                    while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                        exp = exp * 10 + static_cast<int>(s.Take() - '0');\n                        if (RAPIDJSON_UNLIKELY(exp > maxExp)) {\n                            while (RAPIDJSON_UNLIKELY(s.Peek() >= '0' && s.Peek() <= '9'))  // Consume the rest of exponent\n                                s.Take();\n                        }\n                    }\n                }\n                else {  // positive exp\n                    int maxExp = 308 - expFrac;\n                    while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {\n                        exp = exp * 10 + static_cast<int>(s.Take() - '0');\n                        if (RAPIDJSON_UNLIKELY(exp > maxExp))\n                            RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset);\n                    }\n                }\n            }\n            else\n                RAPIDJSON_PARSE_ERROR(kParseErrorNumberMissExponent, s.Tell());\n\n            if (expMinus)\n                exp = -exp;\n        }\n\n        // Finish parsing, call event according to the type of number.\n        bool cont = true;\n\n        if (parseFlags & kParseNumbersAsStringsFlag) {\n            if (parseFlags & kParseInsituFlag) {\n                s.Pop();  // Pop stack no matter if it will be used or not.\n                typename InputStream::Ch* head = is.PutBegin();\n                const size_t length = s.Tell() - startOffset;\n                RAPIDJSON_ASSERT(length <= 0xFFFFFFFF);\n                // unable to insert the \\0 character here, it will erase the comma after this number\n                const typename TargetEncoding::Ch* const str = reinterpret_cast<typename TargetEncoding::Ch*>(head);\n                cont = handler.RawNumber(str, SizeType(length), false);\n            }\n            else {\n                SizeType numCharsToCopy = static_cast<SizeType>(s.Length());\n                StringStream srcStream(s.Pop());\n                StackStream<typename TargetEncoding::Ch> dstStream(stack_);\n                while (numCharsToCopy--) {\n                    Transcoder<UTF8<>, TargetEncoding>::Transcode(srcStream, dstStream);\n                }\n                dstStream.Put('\\0');\n                const typename TargetEncoding::Ch* str = dstStream.Pop();\n                const SizeType length = static_cast<SizeType>(dstStream.Length()) - 1;\n                cont = handler.RawNumber(str, SizeType(length), true);\n            }\n        }\n        else {\n           size_t length = s.Length();\n           const char* decimal = s.Pop();  // Pop stack no matter if it will be used or not.\n\n           if (useDouble) {\n               int p = exp + expFrac;\n               if (parseFlags & kParseFullPrecisionFlag)\n                   d = internal::StrtodFullPrecision(d, p, decimal, length, decimalPosition, exp);\n               else\n                   d = internal::StrtodNormalPrecision(d, p);\n\n               // Use > max, instead of == inf, to fix bogus warning -Wfloat-equal\n               if (d > (std::numeric_limits<double>::max)()) {\n                   // Overflow\n                   // TODO: internal::StrtodX should report overflow (or underflow)\n                   RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset);\n               }\n\n               cont = handler.Double(minus ? -d : d);\n           }\n           else if (useNanOrInf) {\n               cont = handler.Double(d);\n           }\n           else {\n               if (use64bit) {\n                   if (minus)\n                       cont = handler.Int64(static_cast<int64_t>(~i64 + 1));\n                   else\n                       cont = handler.Uint64(i64);\n               }\n               else {\n                   if (minus)\n                       cont = handler.Int(static_cast<int32_t>(~i + 1));\n                   else\n                       cont = handler.Uint(i);\n               }\n           }\n        }\n        if (RAPIDJSON_UNLIKELY(!cont))\n            RAPIDJSON_PARSE_ERROR(kParseErrorTermination, startOffset);\n    }\n\n    // Parse any JSON value\n    template<unsigned parseFlags, typename InputStream, typename Handler>\n    void ParseValue(InputStream& is, Handler& handler) {\n        switch (is.Peek()) {\n            case 'n': ParseNull  <parseFlags>(is, handler); break;\n            case 't': ParseTrue  <parseFlags>(is, handler); break;\n            case 'f': ParseFalse <parseFlags>(is, handler); break;\n            case '\"': ParseString<parseFlags>(is, handler); break;\n            case '{': ParseObject<parseFlags>(is, handler); break;\n            case '[': ParseArray <parseFlags>(is, handler); break;\n            default :\n                      ParseNumber<parseFlags>(is, handler);\n                      break;\n\n        }\n    }\n\n    // Iterative Parsing\n\n    // States\n    enum IterativeParsingState {\n        IterativeParsingFinishState = 0, // sink states at top\n        IterativeParsingErrorState,      // sink states at top\n        IterativeParsingStartState,\n\n        // Object states\n        IterativeParsingObjectInitialState,\n        IterativeParsingMemberKeyState,\n        IterativeParsingMemberValueState,\n        IterativeParsingObjectFinishState,\n\n        // Array states\n        IterativeParsingArrayInitialState,\n        IterativeParsingElementState,\n        IterativeParsingArrayFinishState,\n\n        // Single value state\n        IterativeParsingValueState,\n\n        // Delimiter states (at bottom)\n        IterativeParsingElementDelimiterState,\n        IterativeParsingMemberDelimiterState,\n        IterativeParsingKeyValueDelimiterState,\n\n        cIterativeParsingStateCount\n    };\n\n    // Tokens\n    enum Token {\n        LeftBracketToken = 0,\n        RightBracketToken,\n\n        LeftCurlyBracketToken,\n        RightCurlyBracketToken,\n\n        CommaToken,\n        ColonToken,\n\n        StringToken,\n        FalseToken,\n        TrueToken,\n        NullToken,\n        NumberToken,\n\n        kTokenCount\n    };\n\n    RAPIDJSON_FORCEINLINE Token Tokenize(Ch c) const {\n\n//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN\n#define N NumberToken\n#define N16 N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N\n        // Maps from ASCII to Token\n        static const unsigned char tokenMap[256] = {\n            N16, // 00~0F\n            N16, // 10~1F\n            N, N, StringToken, N, N, N, N, N, N, N, N, N, CommaToken, N, N, N, // 20~2F\n            N, N, N, N, N, N, N, N, N, N, ColonToken, N, N, N, N, N, // 30~3F\n            N16, // 40~4F\n            N, N, N, N, N, N, N, N, N, N, N, LeftBracketToken, N, RightBracketToken, N, N, // 50~5F\n            N, N, N, N, N, N, FalseToken, N, N, N, N, N, N, N, NullToken, N, // 60~6F\n            N, N, N, N, TrueToken, N, N, N, N, N, N, LeftCurlyBracketToken, N, RightCurlyBracketToken, N, N, // 70~7F\n            N16, N16, N16, N16, N16, N16, N16, N16 // 80~FF\n        };\n#undef N\n#undef N16\n//!@endcond\n\n        if (sizeof(Ch) == 1 || static_cast<unsigned>(c) < 256)\n            return static_cast<Token>(tokenMap[static_cast<unsigned char>(c)]);\n        else\n            return NumberToken;\n    }\n\n    RAPIDJSON_FORCEINLINE IterativeParsingState Predict(IterativeParsingState state, Token token) const {\n        // current state x one lookahead token -> new state\n        static const char G[cIterativeParsingStateCount][kTokenCount] = {\n            // Finish(sink state)\n            {\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState\n            },\n            // Error(sink state)\n            {\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState\n            },\n            // Start\n            {\n                IterativeParsingArrayInitialState,  // Left bracket\n                IterativeParsingErrorState,         // Right bracket\n                IterativeParsingObjectInitialState, // Left curly bracket\n                IterativeParsingErrorState,         // Right curly bracket\n                IterativeParsingErrorState,         // Comma\n                IterativeParsingErrorState,         // Colon\n                IterativeParsingValueState,         // String\n                IterativeParsingValueState,         // False\n                IterativeParsingValueState,         // True\n                IterativeParsingValueState,         // Null\n                IterativeParsingValueState          // Number\n            },\n            // ObjectInitial\n            {\n                IterativeParsingErrorState,         // Left bracket\n                IterativeParsingErrorState,         // Right bracket\n                IterativeParsingErrorState,         // Left curly bracket\n                IterativeParsingObjectFinishState,  // Right curly bracket\n                IterativeParsingErrorState,         // Comma\n                IterativeParsingErrorState,         // Colon\n                IterativeParsingMemberKeyState,     // String\n                IterativeParsingErrorState,         // False\n                IterativeParsingErrorState,         // True\n                IterativeParsingErrorState,         // Null\n                IterativeParsingErrorState          // Number\n            },\n            // MemberKey\n            {\n                IterativeParsingErrorState,             // Left bracket\n                IterativeParsingErrorState,             // Right bracket\n                IterativeParsingErrorState,             // Left curly bracket\n                IterativeParsingErrorState,             // Right curly bracket\n                IterativeParsingErrorState,             // Comma\n                IterativeParsingKeyValueDelimiterState, // Colon\n                IterativeParsingErrorState,             // String\n                IterativeParsingErrorState,             // False\n                IterativeParsingErrorState,             // True\n                IterativeParsingErrorState,             // Null\n                IterativeParsingErrorState              // Number\n            },\n            // MemberValue\n            {\n                IterativeParsingErrorState,             // Left bracket\n                IterativeParsingErrorState,             // Right bracket\n                IterativeParsingErrorState,             // Left curly bracket\n                IterativeParsingObjectFinishState,      // Right curly bracket\n                IterativeParsingMemberDelimiterState,   // Comma\n                IterativeParsingErrorState,             // Colon\n                IterativeParsingErrorState,             // String\n                IterativeParsingErrorState,             // False\n                IterativeParsingErrorState,             // True\n                IterativeParsingErrorState,             // Null\n                IterativeParsingErrorState              // Number\n            },\n            // ObjectFinish(sink state)\n            {\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState\n            },\n            // ArrayInitial\n            {\n                IterativeParsingArrayInitialState,      // Left bracket(push Element state)\n                IterativeParsingArrayFinishState,       // Right bracket\n                IterativeParsingObjectInitialState,     // Left curly bracket(push Element state)\n                IterativeParsingErrorState,             // Right curly bracket\n                IterativeParsingErrorState,             // Comma\n                IterativeParsingErrorState,             // Colon\n                IterativeParsingElementState,           // String\n                IterativeParsingElementState,           // False\n                IterativeParsingElementState,           // True\n                IterativeParsingElementState,           // Null\n                IterativeParsingElementState            // Number\n            },\n            // Element\n            {\n                IterativeParsingErrorState,             // Left bracket\n                IterativeParsingArrayFinishState,       // Right bracket\n                IterativeParsingErrorState,             // Left curly bracket\n                IterativeParsingErrorState,             // Right curly bracket\n                IterativeParsingElementDelimiterState,  // Comma\n                IterativeParsingErrorState,             // Colon\n                IterativeParsingErrorState,             // String\n                IterativeParsingErrorState,             // False\n                IterativeParsingErrorState,             // True\n                IterativeParsingErrorState,             // Null\n                IterativeParsingErrorState              // Number\n            },\n            // ArrayFinish(sink state)\n            {\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState\n            },\n            // Single Value (sink state)\n            {\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,\n                IterativeParsingErrorState\n            },\n            // ElementDelimiter\n            {\n                IterativeParsingArrayInitialState,      // Left bracket(push Element state)\n                IterativeParsingArrayFinishState,       // Right bracket\n                IterativeParsingObjectInitialState,     // Left curly bracket(push Element state)\n                IterativeParsingErrorState,             // Right curly bracket\n                IterativeParsingErrorState,             // Comma\n                IterativeParsingErrorState,             // Colon\n                IterativeParsingElementState,           // String\n                IterativeParsingElementState,           // False\n                IterativeParsingElementState,           // True\n                IterativeParsingElementState,           // Null\n                IterativeParsingElementState            // Number\n            },\n            // MemberDelimiter\n            {\n                IterativeParsingErrorState,         // Left bracket\n                IterativeParsingErrorState,         // Right bracket\n                IterativeParsingErrorState,         // Left curly bracket\n                IterativeParsingObjectFinishState,  // Right curly bracket\n                IterativeParsingErrorState,         // Comma\n                IterativeParsingErrorState,         // Colon\n                IterativeParsingMemberKeyState,     // String\n                IterativeParsingErrorState,         // False\n                IterativeParsingErrorState,         // True\n                IterativeParsingErrorState,         // Null\n                IterativeParsingErrorState          // Number\n            },\n            // KeyValueDelimiter\n            {\n                IterativeParsingArrayInitialState,      // Left bracket(push MemberValue state)\n                IterativeParsingErrorState,             // Right bracket\n                IterativeParsingObjectInitialState,     // Left curly bracket(push MemberValue state)\n                IterativeParsingErrorState,             // Right curly bracket\n                IterativeParsingErrorState,             // Comma\n                IterativeParsingErrorState,             // Colon\n                IterativeParsingMemberValueState,       // String\n                IterativeParsingMemberValueState,       // False\n                IterativeParsingMemberValueState,       // True\n                IterativeParsingMemberValueState,       // Null\n                IterativeParsingMemberValueState        // Number\n            },\n        }; // End of G\n\n        return static_cast<IterativeParsingState>(G[state][token]);\n    }\n\n    // Make an advance in the token stream and state based on the candidate destination state which was returned by Transit().\n    // May return a new state on state pop.\n    template <unsigned parseFlags, typename InputStream, typename Handler>\n    RAPIDJSON_FORCEINLINE IterativeParsingState Transit(IterativeParsingState src, Token token, IterativeParsingState dst, InputStream& is, Handler& handler) {\n        (void)token;\n\n        switch (dst) {\n        case IterativeParsingErrorState:\n            return dst;\n\n        case IterativeParsingObjectInitialState:\n        case IterativeParsingArrayInitialState:\n        {\n            // Push the state(Element or MemeberValue) if we are nested in another array or value of member.\n            // In this way we can get the correct state on ObjectFinish or ArrayFinish by frame pop.\n            IterativeParsingState n = src;\n            if (src == IterativeParsingArrayInitialState || src == IterativeParsingElementDelimiterState)\n                n = IterativeParsingElementState;\n            else if (src == IterativeParsingKeyValueDelimiterState)\n                n = IterativeParsingMemberValueState;\n            // Push current state.\n            *stack_.template Push<SizeType>(1) = n;\n            // Initialize and push the member/element count.\n            *stack_.template Push<SizeType>(1) = 0;\n            // Call handler\n            bool hr = (dst == IterativeParsingObjectInitialState) ? handler.StartObject() : handler.StartArray();\n            // On handler short circuits the parsing.\n            if (!hr) {\n                RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorTermination, is.Tell());\n                return IterativeParsingErrorState;\n            }\n            else {\n                is.Take();\n                return dst;\n            }\n        }\n\n        case IterativeParsingMemberKeyState:\n            ParseString<parseFlags>(is, handler, true);\n            if (HasParseError())\n                return IterativeParsingErrorState;\n            else\n                return dst;\n\n        case IterativeParsingKeyValueDelimiterState:\n            RAPIDJSON_ASSERT(token == ColonToken);\n            is.Take();\n            return dst;\n\n        case IterativeParsingMemberValueState:\n            // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state.\n            ParseValue<parseFlags>(is, handler);\n            if (HasParseError()) {\n                return IterativeParsingErrorState;\n            }\n            return dst;\n\n        case IterativeParsingElementState:\n            // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state.\n            ParseValue<parseFlags>(is, handler);\n            if (HasParseError()) {\n                return IterativeParsingErrorState;\n            }\n            return dst;\n\n        case IterativeParsingMemberDelimiterState:\n        case IterativeParsingElementDelimiterState:\n            is.Take();\n            // Update member/element count.\n            *stack_.template Top<SizeType>() = *stack_.template Top<SizeType>() + 1;\n            return dst;\n\n        case IterativeParsingObjectFinishState:\n        {\n            // Transit from delimiter is only allowed when trailing commas are enabled\n            if (!(parseFlags & kParseTrailingCommasFlag) && src == IterativeParsingMemberDelimiterState) {\n                RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorObjectMissName, is.Tell());\n                return IterativeParsingErrorState;\n            }\n            // Get member count.\n            SizeType c = *stack_.template Pop<SizeType>(1);\n            // If the object is not empty, count the last member.\n            if (src == IterativeParsingMemberValueState)\n                ++c;\n            // Restore the state.\n            IterativeParsingState n = static_cast<IterativeParsingState>(*stack_.template Pop<SizeType>(1));\n            // Transit to Finish state if this is the topmost scope.\n            if (n == IterativeParsingStartState)\n                n = IterativeParsingFinishState;\n            // Call handler\n            bool hr = handler.EndObject(c);\n            // On handler short circuits the parsing.\n            if (!hr) {\n                RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorTermination, is.Tell());\n                return IterativeParsingErrorState;\n            }\n            else {\n                is.Take();\n                return n;\n            }\n        }\n\n        case IterativeParsingArrayFinishState:\n        {\n            // Transit from delimiter is only allowed when trailing commas are enabled\n            if (!(parseFlags & kParseTrailingCommasFlag) && src == IterativeParsingElementDelimiterState) {\n                RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorValueInvalid, is.Tell());\n                return IterativeParsingErrorState;\n            }\n            // Get element count.\n            SizeType c = *stack_.template Pop<SizeType>(1);\n            // If the array is not empty, count the last element.\n            if (src == IterativeParsingElementState)\n                ++c;\n            // Restore the state.\n            IterativeParsingState n = static_cast<IterativeParsingState>(*stack_.template Pop<SizeType>(1));\n            // Transit to Finish state if this is the topmost scope.\n            if (n == IterativeParsingStartState)\n                n = IterativeParsingFinishState;\n            // Call handler\n            bool hr = handler.EndArray(c);\n            // On handler short circuits the parsing.\n            if (!hr) {\n                RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorTermination, is.Tell());\n                return IterativeParsingErrorState;\n            }\n            else {\n                is.Take();\n                return n;\n            }\n        }\n\n        default:\n            // This branch is for IterativeParsingValueState actually.\n            // Use `default:` rather than\n            // `case IterativeParsingValueState:` is for code coverage.\n\n            // The IterativeParsingStartState is not enumerated in this switch-case.\n            // It is impossible for that case. And it can be caught by following assertion.\n\n            // The IterativeParsingFinishState is not enumerated in this switch-case either.\n            // It is a \"derivative\" state which cannot triggered from Predict() directly.\n            // Therefore it cannot happen here. And it can be caught by following assertion.\n            RAPIDJSON_ASSERT(dst == IterativeParsingValueState);\n\n            // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state.\n            ParseValue<parseFlags>(is, handler);\n            if (HasParseError()) {\n                return IterativeParsingErrorState;\n            }\n            return IterativeParsingFinishState;\n        }\n    }\n\n    template <typename InputStream>\n    void HandleError(IterativeParsingState src, InputStream& is) {\n        if (HasParseError()) {\n            // Error flag has been set.\n            return;\n        }\n\n        switch (src) {\n        case IterativeParsingStartState:            RAPIDJSON_PARSE_ERROR(kParseErrorDocumentEmpty, is.Tell()); return;\n        case IterativeParsingFinishState:           RAPIDJSON_PARSE_ERROR(kParseErrorDocumentRootNotSingular, is.Tell()); return;\n        case IterativeParsingObjectInitialState:\n        case IterativeParsingMemberDelimiterState:  RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissName, is.Tell()); return;\n        case IterativeParsingMemberKeyState:        RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissColon, is.Tell()); return;\n        case IterativeParsingMemberValueState:      RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell()); return;\n        case IterativeParsingKeyValueDelimiterState:\n        case IterativeParsingArrayInitialState:\n        case IterativeParsingElementDelimiterState: RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell()); return;\n        default: RAPIDJSON_ASSERT(src == IterativeParsingElementState); RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell()); return;\n        }\n    }\n\n    RAPIDJSON_FORCEINLINE bool IsIterativeParsingDelimiterState(IterativeParsingState s) const {\n        return s >= IterativeParsingElementDelimiterState;\n    }\n\n    RAPIDJSON_FORCEINLINE bool IsIterativeParsingCompleteState(IterativeParsingState s) const {\n        return s <= IterativeParsingErrorState;\n    }\n\n    template <unsigned parseFlags, typename InputStream, typename Handler>\n    ParseResult IterativeParse(InputStream& is, Handler& handler) {\n        parseResult_.Clear();\n        ClearStackOnExit scope(*this);\n        IterativeParsingState state = IterativeParsingStartState;\n\n        SkipWhitespaceAndComments<parseFlags>(is);\n        RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);\n        while (is.Peek() != '\\0') {\n            Token t = Tokenize(is.Peek());\n            IterativeParsingState n = Predict(state, t);\n            IterativeParsingState d = Transit<parseFlags>(state, t, n, is, handler);\n\n            if (d == IterativeParsingErrorState) {\n                HandleError(state, is);\n                break;\n            }\n\n            state = d;\n\n            // Do not further consume streams if a root JSON has been parsed.\n            if ((parseFlags & kParseStopWhenDoneFlag) && state == IterativeParsingFinishState)\n                break;\n\n            SkipWhitespaceAndComments<parseFlags>(is);\n            RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);\n        }\n\n        // Handle the end of file.\n        if (state != IterativeParsingFinishState)\n            HandleError(state, is);\n\n        return parseResult_;\n    }\n\n    static const size_t kDefaultStackCapacity = 256;    //!< Default stack capacity in bytes for storing a single decoded string.\n    internal::Stack<StackAllocator> stack_;  //!< A stack for storing decoded string temporarily during non-destructive parsing.\n    ParseResult parseResult_;\n    IterativeParsingState state_;\n}; // class GenericReader\n\n//! Reader with UTF8 encoding and default allocator.\ntypedef GenericReader<UTF8<>, UTF8<> > Reader;\n\nRAPIDJSON_NAMESPACE_END\n\n#if defined(__clang__) || defined(_MSC_VER)\nRAPIDJSON_DIAG_POP\n#endif\n\n\n#ifdef __GNUC__\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_READER_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/schema.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available->\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip-> All rights reserved->\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License-> You may obtain a copy of the License at\n//\n// http://opensource->org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied-> See the License for the \n// specific language governing permissions and limitations under the License->\n\n#ifndef RAPIDJSON_SCHEMA_H_\n#define RAPIDJSON_SCHEMA_H_\n\n#include \"document.h\"\n#include \"pointer.h\"\n#include \"stringbuffer.h\"\n#include <cmath> // abs, floor\n\n#if !defined(RAPIDJSON_SCHEMA_USE_INTERNALREGEX)\n#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 1\n#else\n#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 0\n#endif\n\n#if !RAPIDJSON_SCHEMA_USE_INTERNALREGEX && defined(RAPIDJSON_SCHEMA_USE_STDREGEX) && (__cplusplus >=201103L || (defined(_MSC_VER) && _MSC_VER >= 1800))\n#define RAPIDJSON_SCHEMA_USE_STDREGEX 1\n#else\n#define RAPIDJSON_SCHEMA_USE_STDREGEX 0\n#endif\n\n#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX\n#include \"internal/regex.h\"\n#elif RAPIDJSON_SCHEMA_USE_STDREGEX\n#include <regex>\n#endif\n\n#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX || RAPIDJSON_SCHEMA_USE_STDREGEX\n#define RAPIDJSON_SCHEMA_HAS_REGEX 1\n#else\n#define RAPIDJSON_SCHEMA_HAS_REGEX 0\n#endif\n\n#ifndef RAPIDJSON_SCHEMA_VERBOSE\n#define RAPIDJSON_SCHEMA_VERBOSE 0\n#endif\n\n#if RAPIDJSON_SCHEMA_VERBOSE\n#include \"stringbuffer.h\"\n#endif\n\nRAPIDJSON_DIAG_PUSH\n\n#if defined(__GNUC__)\nRAPIDJSON_DIAG_OFF(effc++)\n#endif\n\n#ifdef __clang__\nRAPIDJSON_DIAG_OFF(weak-vtables)\nRAPIDJSON_DIAG_OFF(exit-time-destructors)\nRAPIDJSON_DIAG_OFF(c++98-compat-pedantic)\nRAPIDJSON_DIAG_OFF(variadic-macros)\n#elif defined(_MSC_VER)\nRAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n///////////////////////////////////////////////////////////////////////////////\n// Verbose Utilities\n\n#if RAPIDJSON_SCHEMA_VERBOSE\n\nnamespace internal {\n\ninline void PrintInvalidKeyword(const char* keyword) {\n    printf(\"Fail keyword: %s\\n\", keyword);\n}\n\ninline void PrintInvalidKeyword(const wchar_t* keyword) {\n    wprintf(L\"Fail keyword: %ls\\n\", keyword);\n}\n\ninline void PrintInvalidDocument(const char* document) {\n    printf(\"Fail document: %s\\n\\n\", document);\n}\n\ninline void PrintInvalidDocument(const wchar_t* document) {\n    wprintf(L\"Fail document: %ls\\n\\n\", document);\n}\n\ninline void PrintValidatorPointers(unsigned depth, const char* s, const char* d) {\n    printf(\"S: %*s%s\\nD: %*s%s\\n\\n\", depth * 4, \" \", s, depth * 4, \" \", d);\n}\n\ninline void PrintValidatorPointers(unsigned depth, const wchar_t* s, const wchar_t* d) {\n    wprintf(L\"S: %*ls%ls\\nD: %*ls%ls\\n\\n\", depth * 4, L\" \", s, depth * 4, L\" \", d);\n}\n\n} // namespace internal\n\n#endif // RAPIDJSON_SCHEMA_VERBOSE\n\n///////////////////////////////////////////////////////////////////////////////\n// RAPIDJSON_INVALID_KEYWORD_RETURN\n\n#if RAPIDJSON_SCHEMA_VERBOSE\n#define RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword) internal::PrintInvalidKeyword(keyword)\n#else\n#define RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword)\n#endif\n\n#define RAPIDJSON_INVALID_KEYWORD_RETURN(keyword)\\\nRAPIDJSON_MULTILINEMACRO_BEGIN\\\n    context.invalidKeyword = keyword.GetString();\\\n    RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword.GetString());\\\n    return false;\\\nRAPIDJSON_MULTILINEMACRO_END\n\n///////////////////////////////////////////////////////////////////////////////\n// Forward declarations\n\ntemplate <typename ValueType, typename Allocator>\nclass GenericSchemaDocument;\n\nnamespace internal {\n\ntemplate <typename SchemaDocumentType>\nclass Schema;\n\n///////////////////////////////////////////////////////////////////////////////\n// ISchemaValidator\n\nclass ISchemaValidator {\npublic:\n    virtual ~ISchemaValidator() {}\n    virtual bool IsValid() const = 0;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// ISchemaStateFactory\n\ntemplate <typename SchemaType>\nclass ISchemaStateFactory {\npublic:\n    virtual ~ISchemaStateFactory() {}\n    virtual ISchemaValidator* CreateSchemaValidator(const SchemaType&) = 0;\n    virtual void DestroySchemaValidator(ISchemaValidator* validator) = 0;\n    virtual void* CreateHasher() = 0;\n    virtual uint64_t GetHashCode(void* hasher) = 0;\n    virtual void DestroryHasher(void* hasher) = 0;\n    virtual void* MallocState(size_t size) = 0;\n    virtual void FreeState(void* p) = 0;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// IValidationErrorHandler\n\ntemplate <typename SchemaType>\nclass IValidationErrorHandler {\npublic:\n    typedef typename SchemaType::Ch Ch;\n    typedef typename SchemaType::SValue SValue;\n\n    virtual ~IValidationErrorHandler() {}\n\n    virtual void NotMultipleOf(int64_t actual, const SValue& expected) = 0;\n    virtual void NotMultipleOf(uint64_t actual, const SValue& expected) = 0;\n    virtual void NotMultipleOf(double actual, const SValue& expected) = 0;\n    virtual void AboveMaximum(int64_t actual, const SValue& expected, bool exclusive) = 0;\n    virtual void AboveMaximum(uint64_t actual, const SValue& expected, bool exclusive) = 0;\n    virtual void AboveMaximum(double actual, const SValue& expected, bool exclusive) = 0;\n    virtual void BelowMinimum(int64_t actual, const SValue& expected, bool exclusive) = 0;\n    virtual void BelowMinimum(uint64_t actual, const SValue& expected, bool exclusive) = 0;\n    virtual void BelowMinimum(double actual, const SValue& expected, bool exclusive) = 0;\n\n    virtual void TooLong(const Ch* str, SizeType length, SizeType expected) = 0;\n    virtual void TooShort(const Ch* str, SizeType length, SizeType expected) = 0;\n    virtual void DoesNotMatch(const Ch* str, SizeType length) = 0;\n\n    virtual void DisallowedItem(SizeType index) = 0;\n    virtual void TooFewItems(SizeType actualCount, SizeType expectedCount) = 0;\n    virtual void TooManyItems(SizeType actualCount, SizeType expectedCount) = 0;\n    virtual void DuplicateItems(SizeType index1, SizeType index2) = 0;\n\n    virtual void TooManyProperties(SizeType actualCount, SizeType expectedCount) = 0;\n    virtual void TooFewProperties(SizeType actualCount, SizeType expectedCount) = 0;\n    virtual void StartMissingProperties() = 0;\n    virtual void AddMissingProperty(const SValue& name) = 0;\n    virtual bool EndMissingProperties() = 0;\n    virtual void PropertyViolations(ISchemaValidator** subvalidators, SizeType count) = 0;\n    virtual void DisallowedProperty(const Ch* name, SizeType length) = 0;\n\n    virtual void StartDependencyErrors() = 0;\n    virtual void StartMissingDependentProperties() = 0;\n    virtual void AddMissingDependentProperty(const SValue& targetName) = 0;\n    virtual void EndMissingDependentProperties(const SValue& sourceName) = 0;\n    virtual void AddDependencySchemaError(const SValue& souceName, ISchemaValidator* subvalidator) = 0;\n    virtual bool EndDependencyErrors() = 0;\n\n    virtual void DisallowedValue() = 0;\n    virtual void StartDisallowedType() = 0;\n    virtual void AddExpectedType(const typename SchemaType::ValueType& expectedType) = 0;\n    virtual void EndDisallowedType(const typename SchemaType::ValueType& actualType) = 0;\n    virtual void NotAllOf(ISchemaValidator** subvalidators, SizeType count) = 0;\n    virtual void NoneOf(ISchemaValidator** subvalidators, SizeType count) = 0;\n    virtual void NotOneOf(ISchemaValidator** subvalidators, SizeType count) = 0;\n    virtual void Disallowed() = 0;\n};\n\n\n///////////////////////////////////////////////////////////////////////////////\n// Hasher\n\n// For comparison of compound value\ntemplate<typename Encoding, typename Allocator>\nclass Hasher {\npublic:\n    typedef typename Encoding::Ch Ch;\n\n    Hasher(Allocator* allocator = 0, size_t stackCapacity = kDefaultSize) : stack_(allocator, stackCapacity) {}\n\n    bool Null() { return WriteType(kNullType); }\n    bool Bool(bool b) { return WriteType(b ? kTrueType : kFalseType); }\n    bool Int(int i) { Number n; n.u.i = i; n.d = static_cast<double>(i); return WriteNumber(n); }\n    bool Uint(unsigned u) { Number n; n.u.u = u; n.d = static_cast<double>(u); return WriteNumber(n); }\n    bool Int64(int64_t i) { Number n; n.u.i = i; n.d = static_cast<double>(i); return WriteNumber(n); }\n    bool Uint64(uint64_t u) { Number n; n.u.u = u; n.d = static_cast<double>(u); return WriteNumber(n); }\n    bool Double(double d) { \n        Number n; \n        if (d < 0) n.u.i = static_cast<int64_t>(d);\n        else       n.u.u = static_cast<uint64_t>(d); \n        n.d = d;\n        return WriteNumber(n);\n    }\n\n    bool RawNumber(const Ch* str, SizeType len, bool) {\n        WriteBuffer(kNumberType, str, len * sizeof(Ch));\n        return true;\n    }\n\n    bool String(const Ch* str, SizeType len, bool) {\n        WriteBuffer(kStringType, str, len * sizeof(Ch));\n        return true;\n    }\n\n    bool StartObject() { return true; }\n    bool Key(const Ch* str, SizeType len, bool copy) { return String(str, len, copy); }\n    bool EndObject(SizeType memberCount) { \n        uint64_t h = Hash(0, kObjectType);\n        uint64_t* kv = stack_.template Pop<uint64_t>(memberCount * 2);\n        for (SizeType i = 0; i < memberCount; i++)\n            h ^= Hash(kv[i * 2], kv[i * 2 + 1]);  // Use xor to achieve member order insensitive\n        *stack_.template Push<uint64_t>() = h;\n        return true;\n    }\n    \n    bool StartArray() { return true; }\n    bool EndArray(SizeType elementCount) { \n        uint64_t h = Hash(0, kArrayType);\n        uint64_t* e = stack_.template Pop<uint64_t>(elementCount);\n        for (SizeType i = 0; i < elementCount; i++)\n            h = Hash(h, e[i]); // Use hash to achieve element order sensitive\n        *stack_.template Push<uint64_t>() = h;\n        return true;\n    }\n\n    bool IsValid() const { return stack_.GetSize() == sizeof(uint64_t); }\n\n    uint64_t GetHashCode() const {\n        RAPIDJSON_ASSERT(IsValid());\n        return *stack_.template Top<uint64_t>();\n    }\n\nprivate:\n    static const size_t kDefaultSize = 256;\n    struct Number {\n        union U {\n            uint64_t u;\n            int64_t i;\n        }u;\n        double d;\n    };\n\n    bool WriteType(Type type) { return WriteBuffer(type, 0, 0); }\n    \n    bool WriteNumber(const Number& n) { return WriteBuffer(kNumberType, &n, sizeof(n)); }\n    \n    bool WriteBuffer(Type type, const void* data, size_t len) {\n        // FNV-1a from http://isthe.com/chongo/tech/comp/fnv/\n        uint64_t h = Hash(RAPIDJSON_UINT64_C2(0x84222325, 0xcbf29ce4), type);\n        const unsigned char* d = static_cast<const unsigned char*>(data);\n        for (size_t i = 0; i < len; i++)\n            h = Hash(h, d[i]);\n        *stack_.template Push<uint64_t>() = h;\n        return true;\n    }\n\n    static uint64_t Hash(uint64_t h, uint64_t d) {\n        static const uint64_t kPrime = RAPIDJSON_UINT64_C2(0x00000100, 0x000001b3);\n        h ^= d;\n        h *= kPrime;\n        return h;\n    }\n\n    Stack<Allocator> stack_;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// SchemaValidationContext\n\ntemplate <typename SchemaDocumentType>\nstruct SchemaValidationContext {\n    typedef Schema<SchemaDocumentType> SchemaType;\n    typedef ISchemaStateFactory<SchemaType> SchemaValidatorFactoryType;\n    typedef IValidationErrorHandler<SchemaType> ErrorHandlerType;\n    typedef typename SchemaType::ValueType ValueType;\n    typedef typename ValueType::Ch Ch;\n\n    enum PatternValidatorType {\n        kPatternValidatorOnly,\n        kPatternValidatorWithProperty,\n        kPatternValidatorWithAdditionalProperty\n    };\n\n    SchemaValidationContext(SchemaValidatorFactoryType& f, ErrorHandlerType& eh, const SchemaType* s) :\n        factory(f),\n        error_handler(eh),\n        schema(s),\n        valueSchema(),\n        invalidKeyword(),\n        hasher(),\n        arrayElementHashCodes(),\n        validators(),\n        validatorCount(),\n        patternPropertiesValidators(),\n        patternPropertiesValidatorCount(),\n        patternPropertiesSchemas(),\n        patternPropertiesSchemaCount(),\n        valuePatternValidatorType(kPatternValidatorOnly),\n        propertyExist(),\n        inArray(false),\n        valueUniqueness(false),\n        arrayUniqueness(false)\n    {\n    }\n\n    ~SchemaValidationContext() {\n        if (hasher)\n            factory.DestroryHasher(hasher);\n        if (validators) {\n            for (SizeType i = 0; i < validatorCount; i++)\n                factory.DestroySchemaValidator(validators[i]);\n            factory.FreeState(validators);\n        }\n        if (patternPropertiesValidators) {\n            for (SizeType i = 0; i < patternPropertiesValidatorCount; i++)\n                factory.DestroySchemaValidator(patternPropertiesValidators[i]);\n            factory.FreeState(patternPropertiesValidators);\n        }\n        if (patternPropertiesSchemas)\n            factory.FreeState(patternPropertiesSchemas);\n        if (propertyExist)\n            factory.FreeState(propertyExist);\n    }\n\n    SchemaValidatorFactoryType& factory;\n    ErrorHandlerType& error_handler;\n    const SchemaType* schema;\n    const SchemaType* valueSchema;\n    const Ch* invalidKeyword;\n    void* hasher; // Only validator access\n    void* arrayElementHashCodes; // Only validator access this\n    ISchemaValidator** validators;\n    SizeType validatorCount;\n    ISchemaValidator** patternPropertiesValidators;\n    SizeType patternPropertiesValidatorCount;\n    const SchemaType** patternPropertiesSchemas;\n    SizeType patternPropertiesSchemaCount;\n    PatternValidatorType valuePatternValidatorType;\n    PatternValidatorType objectPatternValidatorType;\n    SizeType arrayElementIndex;\n    bool* propertyExist;\n    bool inArray;\n    bool valueUniqueness;\n    bool arrayUniqueness;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// Schema\n\ntemplate <typename SchemaDocumentType>\nclass Schema {\npublic:\n    typedef typename SchemaDocumentType::ValueType ValueType;\n    typedef typename SchemaDocumentType::AllocatorType AllocatorType;\n    typedef typename SchemaDocumentType::PointerType PointerType;\n    typedef typename ValueType::EncodingType EncodingType;\n    typedef typename EncodingType::Ch Ch;\n    typedef SchemaValidationContext<SchemaDocumentType> Context;\n    typedef Schema<SchemaDocumentType> SchemaType;\n    typedef GenericValue<EncodingType, AllocatorType> SValue;\n    typedef IValidationErrorHandler<Schema> ErrorHandler;\n    friend class GenericSchemaDocument<ValueType, AllocatorType>;\n\n    Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) :\n        allocator_(allocator),\n        uri_(schemaDocument->GetURI(), *allocator),\n        pointer_(p, allocator),\n        typeless_(schemaDocument->GetTypeless()),\n        enum_(),\n        enumCount_(),\n        not_(),\n        type_((1 << kTotalSchemaType) - 1), // typeless\n        validatorCount_(),\n        notValidatorIndex_(),\n        properties_(),\n        additionalPropertiesSchema_(),\n        patternProperties_(),\n        patternPropertyCount_(),\n        propertyCount_(),\n        minProperties_(),\n        maxProperties_(SizeType(~0)),\n        additionalProperties_(true),\n        hasDependencies_(),\n        hasRequired_(),\n        hasSchemaDependencies_(),\n        additionalItemsSchema_(),\n        itemsList_(),\n        itemsTuple_(),\n        itemsTupleCount_(),\n        minItems_(),\n        maxItems_(SizeType(~0)),\n        additionalItems_(true),\n        uniqueItems_(false),\n        pattern_(),\n        minLength_(0),\n        maxLength_(~SizeType(0)),\n        exclusiveMinimum_(false),\n        exclusiveMaximum_(false),\n        defaultValueLength_(0)\n    {\n        typedef typename ValueType::ConstValueIterator ConstValueIterator;\n        typedef typename ValueType::ConstMemberIterator ConstMemberIterator;\n\n        if (!value.IsObject())\n            return;\n\n        if (const ValueType* v = GetMember(value, GetTypeString())) {\n            type_ = 0;\n            if (v->IsString())\n                AddType(*v);\n            else if (v->IsArray())\n                for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr)\n                    AddType(*itr);\n        }\n\n        if (const ValueType* v = GetMember(value, GetEnumString()))\n            if (v->IsArray() && v->Size() > 0) {\n                enum_ = static_cast<uint64_t*>(allocator_->Malloc(sizeof(uint64_t) * v->Size()));\n                for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr) {\n                    typedef Hasher<EncodingType, MemoryPoolAllocator<> > EnumHasherType;\n                    char buffer[256u + 24];\n                    MemoryPoolAllocator<> hasherAllocator(buffer, sizeof(buffer));\n                    EnumHasherType h(&hasherAllocator, 256);\n                    itr->Accept(h);\n                    enum_[enumCount_++] = h.GetHashCode();\n                }\n            }\n\n        if (schemaDocument) {\n            AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document);\n            AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document);\n            AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document);\n        }\n\n        if (const ValueType* v = GetMember(value, GetNotString())) {\n            schemaDocument->CreateSchema(&not_, p.Append(GetNotString(), allocator_), *v, document);\n            notValidatorIndex_ = validatorCount_;\n            validatorCount_++;\n        }\n\n        // Object\n\n        const ValueType* properties = GetMember(value, GetPropertiesString());\n        const ValueType* required = GetMember(value, GetRequiredString());\n        const ValueType* dependencies = GetMember(value, GetDependenciesString());\n        {\n            // Gather properties from properties/required/dependencies\n            SValue allProperties(kArrayType);\n\n            if (properties && properties->IsObject())\n                for (ConstMemberIterator itr = properties->MemberBegin(); itr != properties->MemberEnd(); ++itr)\n                    AddUniqueElement(allProperties, itr->name);\n            \n            if (required && required->IsArray())\n                for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr)\n                    if (itr->IsString())\n                        AddUniqueElement(allProperties, *itr);\n\n            if (dependencies && dependencies->IsObject())\n                for (ConstMemberIterator itr = dependencies->MemberBegin(); itr != dependencies->MemberEnd(); ++itr) {\n                    AddUniqueElement(allProperties, itr->name);\n                    if (itr->value.IsArray())\n                        for (ConstValueIterator i = itr->value.Begin(); i != itr->value.End(); ++i)\n                            if (i->IsString())\n                                AddUniqueElement(allProperties, *i);\n                }\n\n            if (allProperties.Size() > 0) {\n                propertyCount_ = allProperties.Size();\n                properties_ = static_cast<Property*>(allocator_->Malloc(sizeof(Property) * propertyCount_));\n                for (SizeType i = 0; i < propertyCount_; i++) {\n                    new (&properties_[i]) Property();\n                    properties_[i].name = allProperties[i];\n                    properties_[i].schema = typeless_;\n                }\n            }\n        }\n\n        if (properties && properties->IsObject()) {\n            PointerType q = p.Append(GetPropertiesString(), allocator_);\n            for (ConstMemberIterator itr = properties->MemberBegin(); itr != properties->MemberEnd(); ++itr) {\n                SizeType index;\n                if (FindPropertyIndex(itr->name, &index))\n                    schemaDocument->CreateSchema(&properties_[index].schema, q.Append(itr->name, allocator_), itr->value, document);\n            }\n        }\n\n        if (const ValueType* v = GetMember(value, GetPatternPropertiesString())) {\n            PointerType q = p.Append(GetPatternPropertiesString(), allocator_);\n            patternProperties_ = static_cast<PatternProperty*>(allocator_->Malloc(sizeof(PatternProperty) * v->MemberCount()));\n            patternPropertyCount_ = 0;\n\n            for (ConstMemberIterator itr = v->MemberBegin(); itr != v->MemberEnd(); ++itr) {\n                new (&patternProperties_[patternPropertyCount_]) PatternProperty();\n                patternProperties_[patternPropertyCount_].pattern = CreatePattern(itr->name);\n                schemaDocument->CreateSchema(&patternProperties_[patternPropertyCount_].schema, q.Append(itr->name, allocator_), itr->value, document);\n                patternPropertyCount_++;\n            }\n        }\n\n        if (required && required->IsArray())\n            for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr)\n                if (itr->IsString()) {\n                    SizeType index;\n                    if (FindPropertyIndex(*itr, &index)) {\n                        properties_[index].required = true;\n                        hasRequired_ = true;\n                    }\n                }\n\n        if (dependencies && dependencies->IsObject()) {\n            PointerType q = p.Append(GetDependenciesString(), allocator_);\n            hasDependencies_ = true;\n            for (ConstMemberIterator itr = dependencies->MemberBegin(); itr != dependencies->MemberEnd(); ++itr) {\n                SizeType sourceIndex;\n                if (FindPropertyIndex(itr->name, &sourceIndex)) {\n                    if (itr->value.IsArray()) {\n                        properties_[sourceIndex].dependencies = static_cast<bool*>(allocator_->Malloc(sizeof(bool) * propertyCount_));\n                        std::memset(properties_[sourceIndex].dependencies, 0, sizeof(bool)* propertyCount_);\n                        for (ConstValueIterator targetItr = itr->value.Begin(); targetItr != itr->value.End(); ++targetItr) {\n                            SizeType targetIndex;\n                            if (FindPropertyIndex(*targetItr, &targetIndex))\n                                properties_[sourceIndex].dependencies[targetIndex] = true;\n                        }\n                    }\n                    else if (itr->value.IsObject()) {\n                        hasSchemaDependencies_ = true;\n                        schemaDocument->CreateSchema(&properties_[sourceIndex].dependenciesSchema, q.Append(itr->name, allocator_), itr->value, document);\n                        properties_[sourceIndex].dependenciesValidatorIndex = validatorCount_;\n                        validatorCount_++;\n                    }\n                }\n            }\n        }\n\n        if (const ValueType* v = GetMember(value, GetAdditionalPropertiesString())) {\n            if (v->IsBool())\n                additionalProperties_ = v->GetBool();\n            else if (v->IsObject())\n                schemaDocument->CreateSchema(&additionalPropertiesSchema_, p.Append(GetAdditionalPropertiesString(), allocator_), *v, document);\n        }\n\n        AssignIfExist(minProperties_, value, GetMinPropertiesString());\n        AssignIfExist(maxProperties_, value, GetMaxPropertiesString());\n\n        // Array\n        if (const ValueType* v = GetMember(value, GetItemsString())) {\n            PointerType q = p.Append(GetItemsString(), allocator_);\n            if (v->IsObject()) // List validation\n                schemaDocument->CreateSchema(&itemsList_, q, *v, document);\n            else if (v->IsArray()) { // Tuple validation\n                itemsTuple_ = static_cast<const Schema**>(allocator_->Malloc(sizeof(const Schema*) * v->Size()));\n                SizeType index = 0;\n                for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr, index++)\n                    schemaDocument->CreateSchema(&itemsTuple_[itemsTupleCount_++], q.Append(index, allocator_), *itr, document);\n            }\n        }\n\n        AssignIfExist(minItems_, value, GetMinItemsString());\n        AssignIfExist(maxItems_, value, GetMaxItemsString());\n\n        if (const ValueType* v = GetMember(value, GetAdditionalItemsString())) {\n            if (v->IsBool())\n                additionalItems_ = v->GetBool();\n            else if (v->IsObject())\n                schemaDocument->CreateSchema(&additionalItemsSchema_, p.Append(GetAdditionalItemsString(), allocator_), *v, document);\n        }\n\n        AssignIfExist(uniqueItems_, value, GetUniqueItemsString());\n\n        // String\n        AssignIfExist(minLength_, value, GetMinLengthString());\n        AssignIfExist(maxLength_, value, GetMaxLengthString());\n\n        if (const ValueType* v = GetMember(value, GetPatternString()))\n            pattern_ = CreatePattern(*v);\n\n        // Number\n        if (const ValueType* v = GetMember(value, GetMinimumString()))\n            if (v->IsNumber())\n                minimum_.CopyFrom(*v, *allocator_);\n\n        if (const ValueType* v = GetMember(value, GetMaximumString()))\n            if (v->IsNumber())\n                maximum_.CopyFrom(*v, *allocator_);\n\n        AssignIfExist(exclusiveMinimum_, value, GetExclusiveMinimumString());\n        AssignIfExist(exclusiveMaximum_, value, GetExclusiveMaximumString());\n\n        if (const ValueType* v = GetMember(value, GetMultipleOfString()))\n            if (v->IsNumber() && v->GetDouble() > 0.0)\n                multipleOf_.CopyFrom(*v, *allocator_);\n\n        // Default\n        if (const ValueType* v = GetMember(value, GetDefaultValueString()))\n            if (v->IsString())\n                defaultValueLength_ = v->GetStringLength();\n\n    }\n\n    ~Schema() {\n        AllocatorType::Free(enum_);\n        if (properties_) {\n            for (SizeType i = 0; i < propertyCount_; i++)\n                properties_[i].~Property();\n            AllocatorType::Free(properties_);\n        }\n        if (patternProperties_) {\n            for (SizeType i = 0; i < patternPropertyCount_; i++)\n                patternProperties_[i].~PatternProperty();\n            AllocatorType::Free(patternProperties_);\n        }\n        AllocatorType::Free(itemsTuple_);\n#if RAPIDJSON_SCHEMA_HAS_REGEX\n        if (pattern_) {\n            pattern_->~RegexType();\n            AllocatorType::Free(pattern_);\n        }\n#endif\n    }\n\n    const SValue& GetURI() const {\n        return uri_;\n    }\n\n    const PointerType& GetPointer() const {\n        return pointer_;\n    }\n\n    bool BeginValue(Context& context) const {\n        if (context.inArray) {\n            if (uniqueItems_)\n                context.valueUniqueness = true;\n\n            if (itemsList_)\n                context.valueSchema = itemsList_;\n            else if (itemsTuple_) {\n                if (context.arrayElementIndex < itemsTupleCount_)\n                    context.valueSchema = itemsTuple_[context.arrayElementIndex];\n                else if (additionalItemsSchema_)\n                    context.valueSchema = additionalItemsSchema_;\n                else if (additionalItems_)\n                    context.valueSchema = typeless_;\n                else {\n                    context.error_handler.DisallowedItem(context.arrayElementIndex);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetItemsString());\n                }\n            }\n            else\n                context.valueSchema = typeless_;\n\n            context.arrayElementIndex++;\n        }\n        return true;\n    }\n\n    RAPIDJSON_FORCEINLINE bool EndValue(Context& context) const {\n        if (context.patternPropertiesValidatorCount > 0) {\n            bool otherValid = false;\n            SizeType count = context.patternPropertiesValidatorCount;\n            if (context.objectPatternValidatorType != Context::kPatternValidatorOnly)\n                otherValid = context.patternPropertiesValidators[--count]->IsValid();\n\n            bool patternValid = true;\n            for (SizeType i = 0; i < count; i++)\n                if (!context.patternPropertiesValidators[i]->IsValid()) {\n                    patternValid = false;\n                    break;\n                }\n\n            if (context.objectPatternValidatorType == Context::kPatternValidatorOnly) {\n                if (!patternValid) {\n                    context.error_handler.PropertyViolations(context.patternPropertiesValidators, count);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternPropertiesString());\n                }\n            }\n            else if (context.objectPatternValidatorType == Context::kPatternValidatorWithProperty) {\n                if (!patternValid || !otherValid) {\n                    context.error_handler.PropertyViolations(context.patternPropertiesValidators, count + 1);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternPropertiesString());\n                }\n            }\n            else if (!patternValid && !otherValid) { // kPatternValidatorWithAdditionalProperty)\n                context.error_handler.PropertyViolations(context.patternPropertiesValidators, count + 1);\n                RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternPropertiesString());\n            }\n        }\n\n        if (enum_) {\n            const uint64_t h = context.factory.GetHashCode(context.hasher);\n            for (SizeType i = 0; i < enumCount_; i++)\n                if (enum_[i] == h)\n                    goto foundEnum;\n            context.error_handler.DisallowedValue();\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetEnumString());\n            foundEnum:;\n        }\n\n        if (allOf_.schemas)\n            for (SizeType i = allOf_.begin; i < allOf_.begin + allOf_.count; i++)\n                if (!context.validators[i]->IsValid()) {\n                    context.error_handler.NotAllOf(&context.validators[allOf_.begin], allOf_.count);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetAllOfString());\n                }\n        \n        if (anyOf_.schemas) {\n            for (SizeType i = anyOf_.begin; i < anyOf_.begin + anyOf_.count; i++)\n                if (context.validators[i]->IsValid())\n                    goto foundAny;\n            context.error_handler.NoneOf(&context.validators[anyOf_.begin], anyOf_.count);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetAnyOfString());\n            foundAny:;\n        }\n\n        if (oneOf_.schemas) {\n            bool oneValid = false;\n            for (SizeType i = oneOf_.begin; i < oneOf_.begin + oneOf_.count; i++)\n                if (context.validators[i]->IsValid()) {\n                    if (oneValid) {\n                        context.error_handler.NotOneOf(&context.validators[oneOf_.begin], oneOf_.count);\n                        RAPIDJSON_INVALID_KEYWORD_RETURN(GetOneOfString());\n                    } else\n                        oneValid = true;\n                }\n            if (!oneValid) {\n                context.error_handler.NotOneOf(&context.validators[oneOf_.begin], oneOf_.count);\n                RAPIDJSON_INVALID_KEYWORD_RETURN(GetOneOfString());\n            }\n        }\n\n        if (not_ && context.validators[notValidatorIndex_]->IsValid()) {\n            context.error_handler.Disallowed();\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetNotString());\n        }\n\n        return true;\n    }\n\n    bool Null(Context& context) const {\n        if (!(type_ & (1 << kNullSchemaType))) {\n            DisallowedType(context, GetNullString());\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());\n        }\n        return CreateParallelValidator(context);\n    }\n    \n    bool Bool(Context& context, bool) const {\n        if (!(type_ & (1 << kBooleanSchemaType))) {\n            DisallowedType(context, GetBooleanString());\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());\n        }\n        return CreateParallelValidator(context);\n    }\n\n    bool Int(Context& context, int i) const {\n        if (!CheckInt(context, i))\n            return false;\n        return CreateParallelValidator(context);\n    }\n\n    bool Uint(Context& context, unsigned u) const {\n        if (!CheckUint(context, u))\n            return false;\n        return CreateParallelValidator(context);\n    }\n\n    bool Int64(Context& context, int64_t i) const {\n        if (!CheckInt(context, i))\n            return false;\n        return CreateParallelValidator(context);\n    }\n\n    bool Uint64(Context& context, uint64_t u) const {\n        if (!CheckUint(context, u))\n            return false;\n        return CreateParallelValidator(context);\n    }\n\n    bool Double(Context& context, double d) const {\n        if (!(type_ & (1 << kNumberSchemaType))) {\n            DisallowedType(context, GetNumberString());\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());\n        }\n\n        if (!minimum_.IsNull() && !CheckDoubleMinimum(context, d))\n            return false;\n\n        if (!maximum_.IsNull() && !CheckDoubleMaximum(context, d))\n            return false;\n        \n        if (!multipleOf_.IsNull() && !CheckDoubleMultipleOf(context, d))\n            return false;\n        \n        return CreateParallelValidator(context);\n    }\n    \n    bool String(Context& context, const Ch* str, SizeType length, bool) const {\n        if (!(type_ & (1 << kStringSchemaType))) {\n            DisallowedType(context, GetStringString());\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());\n        }\n\n        if (minLength_ != 0 || maxLength_ != SizeType(~0)) {\n            SizeType count;\n            if (internal::CountStringCodePoint<EncodingType>(str, length, &count)) {\n                if (count < minLength_) {\n                    context.error_handler.TooShort(str, length, minLength_);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinLengthString());\n                }\n                if (count > maxLength_) {\n                    context.error_handler.TooLong(str, length, maxLength_);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxLengthString());\n                }\n            }\n        }\n\n        if (pattern_ && !IsPatternMatch(pattern_, str, length)) {\n            context.error_handler.DoesNotMatch(str, length);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternString());\n        }\n\n        return CreateParallelValidator(context);\n    }\n\n    bool StartObject(Context& context) const {\n        if (!(type_ & (1 << kObjectSchemaType))) {\n            DisallowedType(context, GetObjectString());\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());\n        }\n\n        if (hasDependencies_ || hasRequired_) {\n            context.propertyExist = static_cast<bool*>(context.factory.MallocState(sizeof(bool) * propertyCount_));\n            std::memset(context.propertyExist, 0, sizeof(bool) * propertyCount_);\n        }\n\n        if (patternProperties_) { // pre-allocate schema array\n            SizeType count = patternPropertyCount_ + 1; // extra for valuePatternValidatorType\n            context.patternPropertiesSchemas = static_cast<const SchemaType**>(context.factory.MallocState(sizeof(const SchemaType*) * count));\n            context.patternPropertiesSchemaCount = 0;\n            std::memset(context.patternPropertiesSchemas, 0, sizeof(SchemaType*) * count);\n        }\n\n        return CreateParallelValidator(context);\n    }\n    \n    bool Key(Context& context, const Ch* str, SizeType len, bool) const {\n        if (patternProperties_) {\n            context.patternPropertiesSchemaCount = 0;\n            for (SizeType i = 0; i < patternPropertyCount_; i++)\n                if (patternProperties_[i].pattern && IsPatternMatch(patternProperties_[i].pattern, str, len)) {\n                    context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = patternProperties_[i].schema;\n                    context.valueSchema = typeless_;\n                }\n        }\n\n        SizeType index  = 0;\n        if (FindPropertyIndex(ValueType(str, len).Move(), &index)) {\n            if (context.patternPropertiesSchemaCount > 0) {\n                context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = properties_[index].schema;\n                context.valueSchema = typeless_;\n                context.valuePatternValidatorType = Context::kPatternValidatorWithProperty;\n            }\n            else\n                context.valueSchema = properties_[index].schema;\n\n            if (context.propertyExist)\n                context.propertyExist[index] = true;\n\n            return true;\n        }\n\n        if (additionalPropertiesSchema_) {\n            if (additionalPropertiesSchema_ && context.patternPropertiesSchemaCount > 0) {\n                context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = additionalPropertiesSchema_;\n                context.valueSchema = typeless_;\n                context.valuePatternValidatorType = Context::kPatternValidatorWithAdditionalProperty;\n            }\n            else\n                context.valueSchema = additionalPropertiesSchema_;\n            return true;\n        }\n        else if (additionalProperties_) {\n            context.valueSchema = typeless_;\n            return true;\n        }\n\n        if (context.patternPropertiesSchemaCount == 0) { // patternProperties are not additional properties\n            context.error_handler.DisallowedProperty(str, len);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetAdditionalPropertiesString());\n        }\n\n        return true;\n    }\n\n    bool EndObject(Context& context, SizeType memberCount) const {\n        if (hasRequired_) {\n            context.error_handler.StartMissingProperties();\n            for (SizeType index = 0; index < propertyCount_; index++)\n                if (properties_[index].required && !context.propertyExist[index])\n                    if (properties_[index].schema->defaultValueLength_ == 0 )\n                        context.error_handler.AddMissingProperty(properties_[index].name);\n            if (context.error_handler.EndMissingProperties())\n                RAPIDJSON_INVALID_KEYWORD_RETURN(GetRequiredString());\n        }\n\n        if (memberCount < minProperties_) {\n            context.error_handler.TooFewProperties(memberCount, minProperties_);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinPropertiesString());\n        }\n\n        if (memberCount > maxProperties_) {\n            context.error_handler.TooManyProperties(memberCount, maxProperties_);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxPropertiesString());\n        }\n\n        if (hasDependencies_) {\n            context.error_handler.StartDependencyErrors();\n            for (SizeType sourceIndex = 0; sourceIndex < propertyCount_; sourceIndex++) {\n                const Property& source = properties_[sourceIndex];\n                if (context.propertyExist[sourceIndex]) {\n                    if (source.dependencies) {\n                        context.error_handler.StartMissingDependentProperties();\n                        for (SizeType targetIndex = 0; targetIndex < propertyCount_; targetIndex++)\n                            if (source.dependencies[targetIndex] && !context.propertyExist[targetIndex])\n                                context.error_handler.AddMissingDependentProperty(properties_[targetIndex].name);\n                        context.error_handler.EndMissingDependentProperties(source.name);\n                    }\n                    else if (source.dependenciesSchema) {\n                        ISchemaValidator* dependenciesValidator = context.validators[source.dependenciesValidatorIndex];\n                        if (!dependenciesValidator->IsValid())\n                            context.error_handler.AddDependencySchemaError(source.name, dependenciesValidator);\n                    }\n                }\n            }\n            if (context.error_handler.EndDependencyErrors())\n                RAPIDJSON_INVALID_KEYWORD_RETURN(GetDependenciesString());\n        }\n\n        return true;\n    }\n\n    bool StartArray(Context& context) const {\n        if (!(type_ & (1 << kArraySchemaType))) {\n            DisallowedType(context, GetArrayString());\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());\n        }\n\n        context.arrayElementIndex = 0;\n        context.inArray = true;\n\n        return CreateParallelValidator(context);\n    }\n\n    bool EndArray(Context& context, SizeType elementCount) const {\n        context.inArray = false;\n        \n        if (elementCount < minItems_) {\n            context.error_handler.TooFewItems(elementCount, minItems_);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinItemsString());\n        }\n        \n        if (elementCount > maxItems_) {\n            context.error_handler.TooManyItems(elementCount, maxItems_);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxItemsString());\n        }\n\n        return true;\n    }\n\n    // Generate functions for string literal according to Ch\n#define RAPIDJSON_STRING_(name, ...) \\\n    static const ValueType& Get##name##String() {\\\n        static const Ch s[] = { __VA_ARGS__, '\\0' };\\\n        static const ValueType v(s, static_cast<SizeType>(sizeof(s) / sizeof(Ch) - 1));\\\n        return v;\\\n    }\n\n    RAPIDJSON_STRING_(Null, 'n', 'u', 'l', 'l')\n    RAPIDJSON_STRING_(Boolean, 'b', 'o', 'o', 'l', 'e', 'a', 'n')\n    RAPIDJSON_STRING_(Object, 'o', 'b', 'j', 'e', 'c', 't')\n    RAPIDJSON_STRING_(Array, 'a', 'r', 'r', 'a', 'y')\n    RAPIDJSON_STRING_(String, 's', 't', 'r', 'i', 'n', 'g')\n    RAPIDJSON_STRING_(Number, 'n', 'u', 'm', 'b', 'e', 'r')\n    RAPIDJSON_STRING_(Integer, 'i', 'n', 't', 'e', 'g', 'e', 'r')\n    RAPIDJSON_STRING_(Type, 't', 'y', 'p', 'e')\n    RAPIDJSON_STRING_(Enum, 'e', 'n', 'u', 'm')\n    RAPIDJSON_STRING_(AllOf, 'a', 'l', 'l', 'O', 'f')\n    RAPIDJSON_STRING_(AnyOf, 'a', 'n', 'y', 'O', 'f')\n    RAPIDJSON_STRING_(OneOf, 'o', 'n', 'e', 'O', 'f')\n    RAPIDJSON_STRING_(Not, 'n', 'o', 't')\n    RAPIDJSON_STRING_(Properties, 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')\n    RAPIDJSON_STRING_(Required, 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd')\n    RAPIDJSON_STRING_(Dependencies, 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'i', 'e', 's')\n    RAPIDJSON_STRING_(PatternProperties, 'p', 'a', 't', 't', 'e', 'r', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')\n    RAPIDJSON_STRING_(AdditionalProperties, 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')\n    RAPIDJSON_STRING_(MinProperties, 'm', 'i', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')\n    RAPIDJSON_STRING_(MaxProperties, 'm', 'a', 'x', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')\n    RAPIDJSON_STRING_(Items, 'i', 't', 'e', 'm', 's')\n    RAPIDJSON_STRING_(MinItems, 'm', 'i', 'n', 'I', 't', 'e', 'm', 's')\n    RAPIDJSON_STRING_(MaxItems, 'm', 'a', 'x', 'I', 't', 'e', 'm', 's')\n    RAPIDJSON_STRING_(AdditionalItems, 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'I', 't', 'e', 'm', 's')\n    RAPIDJSON_STRING_(UniqueItems, 'u', 'n', 'i', 'q', 'u', 'e', 'I', 't', 'e', 'm', 's')\n    RAPIDJSON_STRING_(MinLength, 'm', 'i', 'n', 'L', 'e', 'n', 'g', 't', 'h')\n    RAPIDJSON_STRING_(MaxLength, 'm', 'a', 'x', 'L', 'e', 'n', 'g', 't', 'h')\n    RAPIDJSON_STRING_(Pattern, 'p', 'a', 't', 't', 'e', 'r', 'n')\n    RAPIDJSON_STRING_(Minimum, 'm', 'i', 'n', 'i', 'm', 'u', 'm')\n    RAPIDJSON_STRING_(Maximum, 'm', 'a', 'x', 'i', 'm', 'u', 'm')\n    RAPIDJSON_STRING_(ExclusiveMinimum, 'e', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e', 'M', 'i', 'n', 'i', 'm', 'u', 'm')\n    RAPIDJSON_STRING_(ExclusiveMaximum, 'e', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e', 'M', 'a', 'x', 'i', 'm', 'u', 'm')\n    RAPIDJSON_STRING_(MultipleOf, 'm', 'u', 'l', 't', 'i', 'p', 'l', 'e', 'O', 'f')\n    RAPIDJSON_STRING_(DefaultValue, 'd', 'e', 'f', 'a', 'u', 'l', 't')\n\n#undef RAPIDJSON_STRING_\n\nprivate:\n    enum SchemaValueType {\n        kNullSchemaType,\n        kBooleanSchemaType,\n        kObjectSchemaType,\n        kArraySchemaType,\n        kStringSchemaType,\n        kNumberSchemaType,\n        kIntegerSchemaType,\n        kTotalSchemaType\n    };\n\n#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX\n        typedef internal::GenericRegex<EncodingType, AllocatorType> RegexType;\n#elif RAPIDJSON_SCHEMA_USE_STDREGEX\n        typedef std::basic_regex<Ch> RegexType;\n#else\n        typedef char RegexType;\n#endif\n\n    struct SchemaArray {\n        SchemaArray() : schemas(), count() {}\n        ~SchemaArray() { AllocatorType::Free(schemas); }\n        const SchemaType** schemas;\n        SizeType begin; // begin index of context.validators\n        SizeType count;\n    };\n\n    template <typename V1, typename V2>\n    void AddUniqueElement(V1& a, const V2& v) {\n        for (typename V1::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr)\n            if (*itr == v)\n                return;\n        V1 c(v, *allocator_);\n        a.PushBack(c, *allocator_);\n    }\n\n    static const ValueType* GetMember(const ValueType& value, const ValueType& name) {\n        typename ValueType::ConstMemberIterator itr = value.FindMember(name);\n        return itr != value.MemberEnd() ? &(itr->value) : 0;\n    }\n\n    static void AssignIfExist(bool& out, const ValueType& value, const ValueType& name) {\n        if (const ValueType* v = GetMember(value, name))\n            if (v->IsBool())\n                out = v->GetBool();\n    }\n\n    static void AssignIfExist(SizeType& out, const ValueType& value, const ValueType& name) {\n        if (const ValueType* v = GetMember(value, name))\n            if (v->IsUint64() && v->GetUint64() <= SizeType(~0))\n                out = static_cast<SizeType>(v->GetUint64());\n    }\n\n    void AssignIfExist(SchemaArray& out, SchemaDocumentType& schemaDocument, const PointerType& p, const ValueType& value, const ValueType& name, const ValueType& document) {\n        if (const ValueType* v = GetMember(value, name)) {\n            if (v->IsArray() && v->Size() > 0) {\n                PointerType q = p.Append(name, allocator_);\n                out.count = v->Size();\n                out.schemas = static_cast<const Schema**>(allocator_->Malloc(out.count * sizeof(const Schema*)));\n                memset(out.schemas, 0, sizeof(Schema*)* out.count);\n                for (SizeType i = 0; i < out.count; i++)\n                    schemaDocument.CreateSchema(&out.schemas[i], q.Append(i, allocator_), (*v)[i], document);\n                out.begin = validatorCount_;\n                validatorCount_ += out.count;\n            }\n        }\n    }\n\n#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX\n    template <typename ValueType>\n    RegexType* CreatePattern(const ValueType& value) {\n        if (value.IsString()) {\n            RegexType* r = new (allocator_->Malloc(sizeof(RegexType))) RegexType(value.GetString(), allocator_);\n            if (!r->IsValid()) {\n                r->~RegexType();\n                AllocatorType::Free(r);\n                r = 0;\n            }\n            return r;\n        }\n        return 0;\n    }\n\n    static bool IsPatternMatch(const RegexType* pattern, const Ch *str, SizeType) {\n        GenericRegexSearch<RegexType> rs(*pattern);\n        return rs.Search(str);\n    }\n#elif RAPIDJSON_SCHEMA_USE_STDREGEX\n    template <typename ValueType>\n    RegexType* CreatePattern(const ValueType& value) {\n        if (value.IsString()) {\n            RegexType *r = static_cast<RegexType*>(allocator_->Malloc(sizeof(RegexType)));\n            try {\n                return new (r) RegexType(value.GetString(), std::size_t(value.GetStringLength()), std::regex_constants::ECMAScript);\n            }\n            catch (const std::regex_error&) {\n                AllocatorType::Free(r);\n            }\n        }\n        return 0;\n    }\n\n    static bool IsPatternMatch(const RegexType* pattern, const Ch *str, SizeType length) {\n        std::match_results<const Ch*> r;\n        return std::regex_search(str, str + length, r, *pattern);\n    }\n#else\n    template <typename ValueType>\n    RegexType* CreatePattern(const ValueType&) { return 0; }\n\n    static bool IsPatternMatch(const RegexType*, const Ch *, SizeType) { return true; }\n#endif // RAPIDJSON_SCHEMA_USE_STDREGEX\n\n    void AddType(const ValueType& type) {\n        if      (type == GetNullString()   ) type_ |= 1 << kNullSchemaType;\n        else if (type == GetBooleanString()) type_ |= 1 << kBooleanSchemaType;\n        else if (type == GetObjectString() ) type_ |= 1 << kObjectSchemaType;\n        else if (type == GetArrayString()  ) type_ |= 1 << kArraySchemaType;\n        else if (type == GetStringString() ) type_ |= 1 << kStringSchemaType;\n        else if (type == GetIntegerString()) type_ |= 1 << kIntegerSchemaType;\n        else if (type == GetNumberString() ) type_ |= (1 << kNumberSchemaType) | (1 << kIntegerSchemaType);\n    }\n\n    bool CreateParallelValidator(Context& context) const {\n        if (enum_ || context.arrayUniqueness)\n            context.hasher = context.factory.CreateHasher();\n\n        if (validatorCount_) {\n            RAPIDJSON_ASSERT(context.validators == 0);\n            context.validators = static_cast<ISchemaValidator**>(context.factory.MallocState(sizeof(ISchemaValidator*) * validatorCount_));\n            context.validatorCount = validatorCount_;\n\n            if (allOf_.schemas)\n                CreateSchemaValidators(context, allOf_);\n\n            if (anyOf_.schemas)\n                CreateSchemaValidators(context, anyOf_);\n            \n            if (oneOf_.schemas)\n                CreateSchemaValidators(context, oneOf_);\n            \n            if (not_)\n                context.validators[notValidatorIndex_] = context.factory.CreateSchemaValidator(*not_);\n            \n            if (hasSchemaDependencies_) {\n                for (SizeType i = 0; i < propertyCount_; i++)\n                    if (properties_[i].dependenciesSchema)\n                        context.validators[properties_[i].dependenciesValidatorIndex] = context.factory.CreateSchemaValidator(*properties_[i].dependenciesSchema);\n            }\n        }\n\n        return true;\n    }\n\n    void CreateSchemaValidators(Context& context, const SchemaArray& schemas) const {\n        for (SizeType i = 0; i < schemas.count; i++)\n            context.validators[schemas.begin + i] = context.factory.CreateSchemaValidator(*schemas.schemas[i]);\n    }\n\n    // O(n)\n    bool FindPropertyIndex(const ValueType& name, SizeType* outIndex) const {\n        SizeType len = name.GetStringLength();\n        const Ch* str = name.GetString();\n        for (SizeType index = 0; index < propertyCount_; index++)\n            if (properties_[index].name.GetStringLength() == len && \n                (std::memcmp(properties_[index].name.GetString(), str, sizeof(Ch) * len) == 0))\n            {\n                *outIndex = index;\n                return true;\n            }\n        return false;\n    }\n\n    bool CheckInt(Context& context, int64_t i) const {\n        if (!(type_ & ((1 << kIntegerSchemaType) | (1 << kNumberSchemaType)))) {\n            DisallowedType(context, GetIntegerString());\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());\n        }\n\n        if (!minimum_.IsNull()) {\n            if (minimum_.IsInt64()) {\n                if (exclusiveMinimum_ ? i <= minimum_.GetInt64() : i < minimum_.GetInt64()) {\n                    context.error_handler.BelowMinimum(i, minimum_, exclusiveMinimum_);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString());\n                }\n            }\n            else if (minimum_.IsUint64()) {\n                context.error_handler.BelowMinimum(i, minimum_, exclusiveMinimum_);\n                RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString()); // i <= max(int64_t) < minimum.GetUint64()\n            }\n            else if (!CheckDoubleMinimum(context, static_cast<double>(i)))\n                return false;\n        }\n\n        if (!maximum_.IsNull()) {\n            if (maximum_.IsInt64()) {\n                if (exclusiveMaximum_ ? i >= maximum_.GetInt64() : i > maximum_.GetInt64()) {\n                    context.error_handler.AboveMaximum(i, maximum_, exclusiveMaximum_);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString());\n                }\n            }\n            else if (maximum_.IsUint64()) { }\n                /* do nothing */ // i <= max(int64_t) < maximum_.GetUint64()\n            else if (!CheckDoubleMaximum(context, static_cast<double>(i)))\n                return false;\n        }\n\n        if (!multipleOf_.IsNull()) {\n            if (multipleOf_.IsUint64()) {\n                if (static_cast<uint64_t>(i >= 0 ? i : -i) % multipleOf_.GetUint64() != 0) {\n                    context.error_handler.NotMultipleOf(i, multipleOf_);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetMultipleOfString());\n                }\n            }\n            else if (!CheckDoubleMultipleOf(context, static_cast<double>(i)))\n                return false;\n        }\n\n        return true;\n    }\n\n    bool CheckUint(Context& context, uint64_t i) const {\n        if (!(type_ & ((1 << kIntegerSchemaType) | (1 << kNumberSchemaType)))) {\n            DisallowedType(context, GetIntegerString());\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());\n        }\n\n        if (!minimum_.IsNull()) {\n            if (minimum_.IsUint64()) {\n                if (exclusiveMinimum_ ? i <= minimum_.GetUint64() : i < minimum_.GetUint64()) {\n                    context.error_handler.BelowMinimum(i, minimum_, exclusiveMinimum_);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString());\n                }\n            }\n            else if (minimum_.IsInt64())\n                /* do nothing */; // i >= 0 > minimum.Getint64()\n            else if (!CheckDoubleMinimum(context, static_cast<double>(i)))\n                return false;\n        }\n\n        if (!maximum_.IsNull()) {\n            if (maximum_.IsUint64()) {\n                if (exclusiveMaximum_ ? i >= maximum_.GetUint64() : i > maximum_.GetUint64()) {\n                    context.error_handler.AboveMaximum(i, maximum_, exclusiveMaximum_);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString());\n                }\n            }\n            else if (maximum_.IsInt64()) {\n                context.error_handler.AboveMaximum(i, maximum_, exclusiveMaximum_);\n                RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString()); // i >= 0 > maximum_\n            }\n            else if (!CheckDoubleMaximum(context, static_cast<double>(i)))\n                return false;\n        }\n\n        if (!multipleOf_.IsNull()) {\n            if (multipleOf_.IsUint64()) {\n                if (i % multipleOf_.GetUint64() != 0) {\n                    context.error_handler.NotMultipleOf(i, multipleOf_);\n                    RAPIDJSON_INVALID_KEYWORD_RETURN(GetMultipleOfString());\n                }\n            }\n            else if (!CheckDoubleMultipleOf(context, static_cast<double>(i)))\n                return false;\n        }\n\n        return true;\n    }\n\n    bool CheckDoubleMinimum(Context& context, double d) const {\n        if (exclusiveMinimum_ ? d <= minimum_.GetDouble() : d < minimum_.GetDouble()) {\n            context.error_handler.BelowMinimum(d, minimum_, exclusiveMinimum_);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString());\n        }\n        return true;\n    }\n\n    bool CheckDoubleMaximum(Context& context, double d) const {\n        if (exclusiveMaximum_ ? d >= maximum_.GetDouble() : d > maximum_.GetDouble()) {\n            context.error_handler.AboveMaximum(d, maximum_, exclusiveMaximum_);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString());\n        }\n        return true;\n    }\n\n    bool CheckDoubleMultipleOf(Context& context, double d) const {\n        double a = std::abs(d), b = std::abs(multipleOf_.GetDouble());\n        double q = std::floor(a / b);\n        double r = a - q * b;\n        if (r > 0.0) {\n            context.error_handler.NotMultipleOf(d, multipleOf_);\n            RAPIDJSON_INVALID_KEYWORD_RETURN(GetMultipleOfString());\n        }\n        return true;\n    }\n\n    void DisallowedType(Context& context, const ValueType& actualType) const {\n        ErrorHandler& eh = context.error_handler;\n        eh.StartDisallowedType();\n\n        if (type_ & (1 << kNullSchemaType)) eh.AddExpectedType(GetNullString());\n        if (type_ & (1 << kBooleanSchemaType)) eh.AddExpectedType(GetBooleanString());\n        if (type_ & (1 << kObjectSchemaType)) eh.AddExpectedType(GetObjectString());\n        if (type_ & (1 << kArraySchemaType)) eh.AddExpectedType(GetArrayString());\n        if (type_ & (1 << kStringSchemaType)) eh.AddExpectedType(GetStringString());\n\n        if (type_ & (1 << kNumberSchemaType)) eh.AddExpectedType(GetNumberString());\n        else if (type_ & (1 << kIntegerSchemaType)) eh.AddExpectedType(GetIntegerString());\n\n        eh.EndDisallowedType(actualType);\n    }\n\n    struct Property {\n        Property() : schema(), dependenciesSchema(), dependenciesValidatorIndex(), dependencies(), required(false) {}\n        ~Property() { AllocatorType::Free(dependencies); }\n        SValue name;\n        const SchemaType* schema;\n        const SchemaType* dependenciesSchema;\n        SizeType dependenciesValidatorIndex;\n        bool* dependencies;\n        bool required;\n    };\n\n    struct PatternProperty {\n        PatternProperty() : schema(), pattern() {}\n        ~PatternProperty() { \n            if (pattern) {\n                pattern->~RegexType();\n                AllocatorType::Free(pattern);\n            }\n        }\n        const SchemaType* schema;\n        RegexType* pattern;\n    };\n\n    AllocatorType* allocator_;\n    SValue uri_;\n    PointerType pointer_;\n    const SchemaType* typeless_;\n    uint64_t* enum_;\n    SizeType enumCount_;\n    SchemaArray allOf_;\n    SchemaArray anyOf_;\n    SchemaArray oneOf_;\n    const SchemaType* not_;\n    unsigned type_; // bitmask of kSchemaType\n    SizeType validatorCount_;\n    SizeType notValidatorIndex_;\n\n    Property* properties_;\n    const SchemaType* additionalPropertiesSchema_;\n    PatternProperty* patternProperties_;\n    SizeType patternPropertyCount_;\n    SizeType propertyCount_;\n    SizeType minProperties_;\n    SizeType maxProperties_;\n    bool additionalProperties_;\n    bool hasDependencies_;\n    bool hasRequired_;\n    bool hasSchemaDependencies_;\n\n    const SchemaType* additionalItemsSchema_;\n    const SchemaType* itemsList_;\n    const SchemaType** itemsTuple_;\n    SizeType itemsTupleCount_;\n    SizeType minItems_;\n    SizeType maxItems_;\n    bool additionalItems_;\n    bool uniqueItems_;\n\n    RegexType* pattern_;\n    SizeType minLength_;\n    SizeType maxLength_;\n\n    SValue minimum_;\n    SValue maximum_;\n    SValue multipleOf_;\n    bool exclusiveMinimum_;\n    bool exclusiveMaximum_;\n    \n    SizeType defaultValueLength_;\n};\n\ntemplate<typename Stack, typename Ch>\nstruct TokenHelper {\n    RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) {\n        *documentStack.template Push<Ch>() = '/';\n        char buffer[21];\n        size_t length = static_cast<size_t>((sizeof(SizeType) == 4 ? u32toa(index, buffer) : u64toa(index, buffer)) - buffer);\n        for (size_t i = 0; i < length; i++)\n            *documentStack.template Push<Ch>() = static_cast<Ch>(buffer[i]);\n    }\n};\n\n// Partial specialized version for char to prevent buffer copying.\ntemplate <typename Stack>\nstruct TokenHelper<Stack, char> {\n    RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) {\n        if (sizeof(SizeType) == 4) {\n            char *buffer = documentStack.template Push<char>(1 + 10); // '/' + uint\n            *buffer++ = '/';\n            const char* end = internal::u32toa(index, buffer);\n             documentStack.template Pop<char>(static_cast<size_t>(10 - (end - buffer)));\n        }\n        else {\n            char *buffer = documentStack.template Push<char>(1 + 20); // '/' + uint64\n            *buffer++ = '/';\n            const char* end = internal::u64toa(index, buffer);\n            documentStack.template Pop<char>(static_cast<size_t>(20 - (end - buffer)));\n        }\n    }\n};\n\n} // namespace internal\n\n///////////////////////////////////////////////////////////////////////////////\n// IGenericRemoteSchemaDocumentProvider\n\ntemplate <typename SchemaDocumentType>\nclass IGenericRemoteSchemaDocumentProvider {\npublic:\n    typedef typename SchemaDocumentType::Ch Ch;\n\n    virtual ~IGenericRemoteSchemaDocumentProvider() {}\n    virtual const SchemaDocumentType* GetRemoteDocument(const Ch* uri, SizeType length) = 0;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericSchemaDocument\n\n//! JSON schema document.\n/*!\n    A JSON schema document is a compiled version of a JSON schema.\n    It is basically a tree of internal::Schema.\n\n    \\note This is an immutable class (i.e. its instance cannot be modified after construction).\n    \\tparam ValueT Type of JSON value (e.g. \\c Value ), which also determine the encoding.\n    \\tparam Allocator Allocator type for allocating memory of this document.\n*/\ntemplate <typename ValueT, typename Allocator = CrtAllocator>\nclass GenericSchemaDocument {\npublic:\n    typedef ValueT ValueType;\n    typedef IGenericRemoteSchemaDocumentProvider<GenericSchemaDocument> IRemoteSchemaDocumentProviderType;\n    typedef Allocator AllocatorType;\n    typedef typename ValueType::EncodingType EncodingType;\n    typedef typename EncodingType::Ch Ch;\n    typedef internal::Schema<GenericSchemaDocument> SchemaType;\n    typedef GenericPointer<ValueType, Allocator> PointerType;\n    typedef GenericValue<EncodingType, Allocator> URIType;\n    friend class internal::Schema<GenericSchemaDocument>;\n    template <typename, typename, typename>\n    friend class GenericSchemaValidator;\n\n    //! Constructor.\n    /*!\n        Compile a JSON document into schema document.\n\n        \\param document A JSON document as source.\n        \\param uri The base URI of this schema document for purposes of violation reporting.\n        \\param uriLength Length of \\c name, in code points.\n        \\param remoteProvider An optional remote schema document provider for resolving remote reference. Can be null.\n        \\param allocator An optional allocator instance for allocating memory. Can be null.\n    */\n    explicit GenericSchemaDocument(const ValueType& document, const Ch* uri = 0, SizeType uriLength = 0,\n        IRemoteSchemaDocumentProviderType* remoteProvider = 0, Allocator* allocator = 0) :\n        remoteProvider_(remoteProvider),\n        allocator_(allocator),\n        ownAllocator_(),\n        root_(),\n        typeless_(),\n        schemaMap_(allocator, kInitialSchemaMapSize),\n        schemaRef_(allocator, kInitialSchemaRefSize)\n    {\n        if (!allocator_)\n            ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();\n\n        Ch noUri[1] = {0};\n        uri_.SetString(uri ? uri : noUri, uriLength, *allocator_);\n\n        typeless_ = static_cast<SchemaType*>(allocator_->Malloc(sizeof(SchemaType)));\n        new (typeless_) SchemaType(this, PointerType(), ValueType(kObjectType).Move(), ValueType(kObjectType).Move(), allocator_);\n\n        // Generate root schema, it will call CreateSchema() to create sub-schemas,\n        // And call AddRefSchema() if there are $ref.\n        CreateSchemaRecursive(&root_, PointerType(), document, document);\n\n        // Resolve $ref\n        while (!schemaRef_.Empty()) {\n            SchemaRefEntry* refEntry = schemaRef_.template Pop<SchemaRefEntry>(1);\n            if (const SchemaType* s = GetSchema(refEntry->target)) {\n                if (refEntry->schema)\n                    *refEntry->schema = s;\n\n                // Create entry in map if not exist\n                if (!GetSchema(refEntry->source)) {\n                    new (schemaMap_.template Push<SchemaEntry>()) SchemaEntry(refEntry->source, const_cast<SchemaType*>(s), false, allocator_);\n                }\n            }\n            else if (refEntry->schema)\n                *refEntry->schema = typeless_;\n\n            refEntry->~SchemaRefEntry();\n        }\n\n        RAPIDJSON_ASSERT(root_ != 0);\n\n        schemaRef_.ShrinkToFit(); // Deallocate all memory for ref\n    }\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    //! Move constructor in C++11\n    GenericSchemaDocument(GenericSchemaDocument&& rhs) RAPIDJSON_NOEXCEPT :\n        remoteProvider_(rhs.remoteProvider_),\n        allocator_(rhs.allocator_),\n        ownAllocator_(rhs.ownAllocator_),\n        root_(rhs.root_),\n        typeless_(rhs.typeless_),\n        schemaMap_(std::move(rhs.schemaMap_)),\n        schemaRef_(std::move(rhs.schemaRef_)),\n        uri_(std::move(rhs.uri_))\n    {\n        rhs.remoteProvider_ = 0;\n        rhs.allocator_ = 0;\n        rhs.ownAllocator_ = 0;\n        rhs.typeless_ = 0;\n    }\n#endif\n\n    //! Destructor\n    ~GenericSchemaDocument() {\n        while (!schemaMap_.Empty())\n            schemaMap_.template Pop<SchemaEntry>(1)->~SchemaEntry();\n\n        if (typeless_) {\n            typeless_->~SchemaType();\n            Allocator::Free(typeless_);\n        }\n\n        RAPIDJSON_DELETE(ownAllocator_);\n    }\n\n    const URIType& GetURI() const { return uri_; }\n\n    //! Get the root schema.\n    const SchemaType& GetRoot() const { return *root_; }\n\nprivate:\n    //! Prohibit copying\n    GenericSchemaDocument(const GenericSchemaDocument&);\n    //! Prohibit assignment\n    GenericSchemaDocument& operator=(const GenericSchemaDocument&);\n\n    struct SchemaRefEntry {\n        SchemaRefEntry(const PointerType& s, const PointerType& t, const SchemaType** outSchema, Allocator *allocator) : source(s, allocator), target(t, allocator), schema(outSchema) {}\n        PointerType source;\n        PointerType target;\n        const SchemaType** schema;\n    };\n\n    struct SchemaEntry {\n        SchemaEntry(const PointerType& p, SchemaType* s, bool o, Allocator* allocator) : pointer(p, allocator), schema(s), owned(o) {}\n        ~SchemaEntry() {\n            if (owned) {\n                schema->~SchemaType();\n                Allocator::Free(schema);\n            }\n        }\n        PointerType pointer;\n        SchemaType* schema;\n        bool owned;\n    };\n\n    void CreateSchemaRecursive(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document) {\n        if (schema)\n            *schema = typeless_;\n\n        if (v.GetType() == kObjectType) {\n            const SchemaType* s = GetSchema(pointer);\n            if (!s)\n                CreateSchema(schema, pointer, v, document);\n\n            for (typename ValueType::ConstMemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr)\n                CreateSchemaRecursive(0, pointer.Append(itr->name, allocator_), itr->value, document);\n        }\n        else if (v.GetType() == kArrayType)\n            for (SizeType i = 0; i < v.Size(); i++)\n                CreateSchemaRecursive(0, pointer.Append(i, allocator_), v[i], document);\n    }\n\n    void CreateSchema(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document) {\n        RAPIDJSON_ASSERT(pointer.IsValid());\n        if (v.IsObject()) {\n            if (!HandleRefSchema(pointer, schema, v, document)) {\n                SchemaType* s = new (allocator_->Malloc(sizeof(SchemaType))) SchemaType(this, pointer, v, document, allocator_);\n                new (schemaMap_.template Push<SchemaEntry>()) SchemaEntry(pointer, s, true, allocator_);\n                if (schema)\n                    *schema = s;\n            }\n        }\n    }\n\n    bool HandleRefSchema(const PointerType& source, const SchemaType** schema, const ValueType& v, const ValueType& document) {\n        static const Ch kRefString[] = { '$', 'r', 'e', 'f', '\\0' };\n        static const ValueType kRefValue(kRefString, 4);\n\n        typename ValueType::ConstMemberIterator itr = v.FindMember(kRefValue);\n        if (itr == v.MemberEnd())\n            return false;\n\n        if (itr->value.IsString()) {\n            SizeType len = itr->value.GetStringLength();\n            if (len > 0) {\n                const Ch* s = itr->value.GetString();\n                SizeType i = 0;\n                while (i < len && s[i] != '#') // Find the first #\n                    i++;\n\n                if (i > 0) { // Remote reference, resolve immediately\n                    if (remoteProvider_) {\n                        if (const GenericSchemaDocument* remoteDocument = remoteProvider_->GetRemoteDocument(s, i)) {\n                            PointerType pointer(&s[i], len - i, allocator_);\n                            if (pointer.IsValid()) {\n                                if (const SchemaType* sc = remoteDocument->GetSchema(pointer)) {\n                                    if (schema)\n                                        *schema = sc;\n                                    new (schemaMap_.template Push<SchemaEntry>()) SchemaEntry(source, const_cast<SchemaType*>(sc), false, allocator_);\n                                    return true;\n                                }\n                            }\n                        }\n                    }\n                }\n                else if (s[i] == '#') { // Local reference, defer resolution\n                    PointerType pointer(&s[i], len - i, allocator_);\n                    if (pointer.IsValid()) {\n                        if (const ValueType* nv = pointer.Get(document))\n                            if (HandleRefSchema(source, schema, *nv, document))\n                                return true;\n\n                        new (schemaRef_.template Push<SchemaRefEntry>()) SchemaRefEntry(source, pointer, schema, allocator_);\n                        return true;\n                    }\n                }\n            }\n        }\n        return false;\n    }\n\n    const SchemaType* GetSchema(const PointerType& pointer) const {\n        for (const SchemaEntry* target = schemaMap_.template Bottom<SchemaEntry>(); target != schemaMap_.template End<SchemaEntry>(); ++target)\n            if (pointer == target->pointer)\n                return target->schema;\n        return 0;\n    }\n\n    PointerType GetPointer(const SchemaType* schema) const {\n        for (const SchemaEntry* target = schemaMap_.template Bottom<SchemaEntry>(); target != schemaMap_.template End<SchemaEntry>(); ++target)\n            if (schema == target->schema)\n                return target->pointer;\n        return PointerType();\n    }\n\n    const SchemaType* GetTypeless() const { return typeless_; }\n\n    static const size_t kInitialSchemaMapSize = 64;\n    static const size_t kInitialSchemaRefSize = 64;\n\n    IRemoteSchemaDocumentProviderType* remoteProvider_;\n    Allocator *allocator_;\n    Allocator *ownAllocator_;\n    const SchemaType* root_;                //!< Root schema.\n    SchemaType* typeless_;\n    internal::Stack<Allocator> schemaMap_;  // Stores created Pointer -> Schemas\n    internal::Stack<Allocator> schemaRef_;  // Stores Pointer from $ref and schema which holds the $ref\n    URIType uri_;\n};\n\n//! GenericSchemaDocument using Value type.\ntypedef GenericSchemaDocument<Value> SchemaDocument;\n//! IGenericRemoteSchemaDocumentProvider using SchemaDocument.\ntypedef IGenericRemoteSchemaDocumentProvider<SchemaDocument> IRemoteSchemaDocumentProvider;\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericSchemaValidator\n\n//! JSON Schema Validator.\n/*!\n    A SAX style JSON schema validator.\n    It uses a \\c GenericSchemaDocument to validate SAX events.\n    It delegates the incoming SAX events to an output handler.\n    The default output handler does nothing.\n    It can be reused multiple times by calling \\c Reset().\n\n    \\tparam SchemaDocumentType Type of schema document.\n    \\tparam OutputHandler Type of output handler. Default handler does nothing.\n    \\tparam StateAllocator Allocator for storing the internal validation states.\n*/\ntemplate <\n    typename SchemaDocumentType,\n    typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>,\n    typename StateAllocator = CrtAllocator>\nclass GenericSchemaValidator :\n    public internal::ISchemaStateFactory<typename SchemaDocumentType::SchemaType>, \n    public internal::ISchemaValidator,\n    public internal::IValidationErrorHandler<typename SchemaDocumentType::SchemaType>\n{\npublic:\n    typedef typename SchemaDocumentType::SchemaType SchemaType;\n    typedef typename SchemaDocumentType::PointerType PointerType;\n    typedef typename SchemaType::EncodingType EncodingType;\n    typedef typename SchemaType::SValue SValue;\n    typedef typename EncodingType::Ch Ch;\n    typedef GenericStringRef<Ch> StringRefType;\n    typedef GenericValue<EncodingType, StateAllocator> ValueType;\n\n    //! Constructor without output handler.\n    /*!\n        \\param schemaDocument The schema document to conform to.\n        \\param allocator Optional allocator for storing internal validation states.\n        \\param schemaStackCapacity Optional initial capacity of schema path stack.\n        \\param documentStackCapacity Optional initial capacity of document path stack.\n    */\n    GenericSchemaValidator(\n        const SchemaDocumentType& schemaDocument,\n        StateAllocator* allocator = 0, \n        size_t schemaStackCapacity = kDefaultSchemaStackCapacity,\n        size_t documentStackCapacity = kDefaultDocumentStackCapacity)\n        :\n        schemaDocument_(&schemaDocument),\n        root_(schemaDocument.GetRoot()),\n        stateAllocator_(allocator),\n        ownStateAllocator_(0),\n        schemaStack_(allocator, schemaStackCapacity),\n        documentStack_(allocator, documentStackCapacity),\n        outputHandler_(0),\n        error_(kObjectType),\n        currentError_(),\n        missingDependents_(),\n        valid_(true)\n#if RAPIDJSON_SCHEMA_VERBOSE\n        , depth_(0)\n#endif\n    {\n    }\n\n    //! Constructor with output handler.\n    /*!\n        \\param schemaDocument The schema document to conform to.\n        \\param allocator Optional allocator for storing internal validation states.\n        \\param schemaStackCapacity Optional initial capacity of schema path stack.\n        \\param documentStackCapacity Optional initial capacity of document path stack.\n    */\n    GenericSchemaValidator(\n        const SchemaDocumentType& schemaDocument,\n        OutputHandler& outputHandler,\n        StateAllocator* allocator = 0, \n        size_t schemaStackCapacity = kDefaultSchemaStackCapacity,\n        size_t documentStackCapacity = kDefaultDocumentStackCapacity)\n        :\n        schemaDocument_(&schemaDocument),\n        root_(schemaDocument.GetRoot()),\n        stateAllocator_(allocator),\n        ownStateAllocator_(0),\n        schemaStack_(allocator, schemaStackCapacity),\n        documentStack_(allocator, documentStackCapacity),\n        outputHandler_(&outputHandler),\n        error_(kObjectType),\n        currentError_(),\n        missingDependents_(),\n        valid_(true)\n#if RAPIDJSON_SCHEMA_VERBOSE\n        , depth_(0)\n#endif\n    {\n    }\n\n    //! Destructor.\n    ~GenericSchemaValidator() {\n        Reset();\n        RAPIDJSON_DELETE(ownStateAllocator_);\n    }\n\n    //! Reset the internal states.\n    void Reset() {\n        while (!schemaStack_.Empty())\n            PopSchema();\n        documentStack_.Clear();\n        error_.SetObject();\n        currentError_.SetNull();\n        missingDependents_.SetNull();\n        valid_ = true;\n    }\n\n    //! Checks whether the current state is valid.\n    // Implementation of ISchemaValidator\n    virtual bool IsValid() const { return valid_; }\n\n    //! Gets the error object.\n    ValueType& GetError() { return error_; }\n    const ValueType& GetError() const { return error_; }\n\n    //! Gets the JSON pointer pointed to the invalid schema.\n    PointerType GetInvalidSchemaPointer() const {\n        return schemaStack_.Empty() ? PointerType() : CurrentSchema().GetPointer();\n    }\n\n    //! Gets the keyword of invalid schema.\n    const Ch* GetInvalidSchemaKeyword() const {\n        return schemaStack_.Empty() ? 0 : CurrentContext().invalidKeyword;\n    }\n\n    //! Gets the JSON pointer pointed to the invalid value.\n    PointerType GetInvalidDocumentPointer() const {\n        if (documentStack_.Empty()) {\n            return PointerType();\n        }\n        else {\n            return PointerType(documentStack_.template Bottom<Ch>(), documentStack_.GetSize() / sizeof(Ch));\n        }\n    }\n\n    void NotMultipleOf(int64_t actual, const SValue& expected) {\n        AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected);\n    }\n    void NotMultipleOf(uint64_t actual, const SValue& expected) {\n        AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected);\n    }\n    void NotMultipleOf(double actual, const SValue& expected) {\n        AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected);\n    }\n    void AboveMaximum(int64_t actual, const SValue& expected, bool exclusive) {\n        AddNumberError(SchemaType::GetMaximumString(), ValueType(actual).Move(), expected,\n            exclusive ? &SchemaType::GetExclusiveMaximumString : 0);\n    }\n    void AboveMaximum(uint64_t actual, const SValue& expected, bool exclusive) {\n        AddNumberError(SchemaType::GetMaximumString(), ValueType(actual).Move(), expected,\n            exclusive ? &SchemaType::GetExclusiveMaximumString : 0);\n    }\n    void AboveMaximum(double actual, const SValue& expected, bool exclusive) {\n        AddNumberError(SchemaType::GetMaximumString(), ValueType(actual).Move(), expected,\n            exclusive ? &SchemaType::GetExclusiveMaximumString : 0);\n    }\n    void BelowMinimum(int64_t actual, const SValue& expected, bool exclusive) {\n        AddNumberError(SchemaType::GetMinimumString(), ValueType(actual).Move(), expected,\n            exclusive ? &SchemaType::GetExclusiveMinimumString : 0);\n    }\n    void BelowMinimum(uint64_t actual, const SValue& expected, bool exclusive) {\n        AddNumberError(SchemaType::GetMinimumString(), ValueType(actual).Move(), expected,\n            exclusive ? &SchemaType::GetExclusiveMinimumString : 0);\n    }\n    void BelowMinimum(double actual, const SValue& expected, bool exclusive) {\n        AddNumberError(SchemaType::GetMinimumString(), ValueType(actual).Move(), expected,\n            exclusive ? &SchemaType::GetExclusiveMinimumString : 0);\n    }\n\n    void TooLong(const Ch* str, SizeType length, SizeType expected) {\n        AddNumberError(SchemaType::GetMaxLengthString(),\n            ValueType(str, length, GetStateAllocator()).Move(), SValue(expected).Move());\n    }\n    void TooShort(const Ch* str, SizeType length, SizeType expected) {\n        AddNumberError(SchemaType::GetMinLengthString(),\n            ValueType(str, length, GetStateAllocator()).Move(), SValue(expected).Move());\n    }\n    void DoesNotMatch(const Ch* str, SizeType length) {\n        currentError_.SetObject();\n        currentError_.AddMember(GetActualString(), ValueType(str, length, GetStateAllocator()).Move(), GetStateAllocator());\n        AddCurrentError(SchemaType::GetPatternString());\n    }\n\n    void DisallowedItem(SizeType index) {\n        currentError_.SetObject();\n        currentError_.AddMember(GetDisallowedString(), ValueType(index).Move(), GetStateAllocator());\n        AddCurrentError(SchemaType::GetAdditionalItemsString(), true);\n    }\n    void TooFewItems(SizeType actualCount, SizeType expectedCount) {\n        AddNumberError(SchemaType::GetMinItemsString(),\n            ValueType(actualCount).Move(), SValue(expectedCount).Move());\n    }\n    void TooManyItems(SizeType actualCount, SizeType expectedCount) {\n        AddNumberError(SchemaType::GetMaxItemsString(),\n            ValueType(actualCount).Move(), SValue(expectedCount).Move());\n    }\n    void DuplicateItems(SizeType index1, SizeType index2) {\n        ValueType duplicates(kArrayType);\n        duplicates.PushBack(index1, GetStateAllocator());\n        duplicates.PushBack(index2, GetStateAllocator());\n        currentError_.SetObject();\n        currentError_.AddMember(GetDuplicatesString(), duplicates, GetStateAllocator());\n        AddCurrentError(SchemaType::GetUniqueItemsString(), true);\n    }\n\n    void TooManyProperties(SizeType actualCount, SizeType expectedCount) {\n        AddNumberError(SchemaType::GetMaxPropertiesString(),\n            ValueType(actualCount).Move(), SValue(expectedCount).Move());\n    }\n    void TooFewProperties(SizeType actualCount, SizeType expectedCount) {\n        AddNumberError(SchemaType::GetMinPropertiesString(),\n            ValueType(actualCount).Move(), SValue(expectedCount).Move());\n    }\n    void StartMissingProperties() {\n        currentError_.SetArray();\n    }\n    void AddMissingProperty(const SValue& name) {\n        currentError_.PushBack(ValueType(name, GetStateAllocator()).Move(), GetStateAllocator());\n    }\n    bool EndMissingProperties() {\n        if (currentError_.Empty())\n            return false;\n        ValueType error(kObjectType);\n        error.AddMember(GetMissingString(), currentError_, GetStateAllocator());\n        currentError_ = error;\n        AddCurrentError(SchemaType::GetRequiredString());\n        return true;\n    }\n    void PropertyViolations(ISchemaValidator** subvalidators, SizeType count) {\n        for (SizeType i = 0; i < count; ++i)\n            MergeError(static_cast<GenericSchemaValidator*>(subvalidators[i])->GetError());\n    }\n    void DisallowedProperty(const Ch* name, SizeType length) {\n        currentError_.SetObject();\n        currentError_.AddMember(GetDisallowedString(), ValueType(name, length, GetStateAllocator()).Move(), GetStateAllocator());\n        AddCurrentError(SchemaType::GetAdditionalPropertiesString(), true);\n    }\n\n    void StartDependencyErrors() {\n        currentError_.SetObject();\n    }\n    void StartMissingDependentProperties() {\n        missingDependents_.SetArray();\n    }\n    void AddMissingDependentProperty(const SValue& targetName) {\n        missingDependents_.PushBack(ValueType(targetName, GetStateAllocator()).Move(), GetStateAllocator());\n    }\n    void EndMissingDependentProperties(const SValue& sourceName) {\n        if (!missingDependents_.Empty())\n            currentError_.AddMember(ValueType(sourceName, GetStateAllocator()).Move(),\n                missingDependents_, GetStateAllocator());\n    }\n    void AddDependencySchemaError(const SValue& sourceName, ISchemaValidator* subvalidator) {\n        currentError_.AddMember(ValueType(sourceName, GetStateAllocator()).Move(),\n            static_cast<GenericSchemaValidator*>(subvalidator)->GetError(), GetStateAllocator());\n    }\n    bool EndDependencyErrors() {\n        if (currentError_.ObjectEmpty())\n            return false;\n        ValueType error(kObjectType);\n        error.AddMember(GetErrorsString(), currentError_, GetStateAllocator());\n        currentError_ = error;\n        AddCurrentError(SchemaType::GetDependenciesString());\n        return true;\n    }\n\n    void DisallowedValue() {\n        currentError_.SetObject();\n        AddCurrentError(SchemaType::GetEnumString());\n    }\n    void StartDisallowedType() {\n        currentError_.SetArray();\n    }\n    void AddExpectedType(const typename SchemaType::ValueType& expectedType) {\n        currentError_.PushBack(ValueType(expectedType, GetStateAllocator()).Move(), GetStateAllocator());\n    }\n    void EndDisallowedType(const typename SchemaType::ValueType& actualType) {\n        ValueType error(kObjectType);\n        error.AddMember(GetExpectedString(), currentError_, GetStateAllocator());\n        error.AddMember(GetActualString(), ValueType(actualType, GetStateAllocator()).Move(), GetStateAllocator());\n        currentError_ = error;\n        AddCurrentError(SchemaType::GetTypeString());\n    }\n    void NotAllOf(ISchemaValidator** subvalidators, SizeType count) {\n        for (SizeType i = 0; i < count; ++i) {\n            MergeError(static_cast<GenericSchemaValidator*>(subvalidators[i])->GetError());\n        }\n    }\n    void NoneOf(ISchemaValidator** subvalidators, SizeType count) {\n        AddErrorArray(SchemaType::GetAnyOfString(), subvalidators, count);\n    }\n    void NotOneOf(ISchemaValidator** subvalidators, SizeType count) {\n        AddErrorArray(SchemaType::GetOneOfString(), subvalidators, count);\n    }\n    void Disallowed() {\n        currentError_.SetObject();\n        AddCurrentError(SchemaType::GetNotString());\n    }\n\n#define RAPIDJSON_STRING_(name, ...) \\\n    static const StringRefType& Get##name##String() {\\\n        static const Ch s[] = { __VA_ARGS__, '\\0' };\\\n        static const StringRefType v(s, static_cast<SizeType>(sizeof(s) / sizeof(Ch) - 1)); \\\n        return v;\\\n    }\n\n    RAPIDJSON_STRING_(InstanceRef, 'i', 'n', 's', 't', 'a', 'n', 'c', 'e', 'R', 'e', 'f')\n    RAPIDJSON_STRING_(SchemaRef, 's', 'c', 'h', 'e', 'm', 'a', 'R', 'e', 'f')\n    RAPIDJSON_STRING_(Expected, 'e', 'x', 'p', 'e', 'c', 't', 'e', 'd')\n    RAPIDJSON_STRING_(Actual, 'a', 'c', 't', 'u', 'a', 'l')\n    RAPIDJSON_STRING_(Disallowed, 'd', 'i', 's', 'a', 'l', 'l', 'o', 'w', 'e', 'd')\n    RAPIDJSON_STRING_(Missing, 'm', 'i', 's', 's', 'i', 'n', 'g')\n    RAPIDJSON_STRING_(Errors, 'e', 'r', 'r', 'o', 'r', 's')\n    RAPIDJSON_STRING_(Duplicates, 'd', 'u', 'p', 'l', 'i', 'c', 'a', 't', 'e', 's')\n\n#undef RAPIDJSON_STRING_\n\n#if RAPIDJSON_SCHEMA_VERBOSE\n#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_() \\\nRAPIDJSON_MULTILINEMACRO_BEGIN\\\n    *documentStack_.template Push<Ch>() = '\\0';\\\n    documentStack_.template Pop<Ch>(1);\\\n    internal::PrintInvalidDocument(documentStack_.template Bottom<Ch>());\\\nRAPIDJSON_MULTILINEMACRO_END\n#else\n#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_()\n#endif\n\n#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)\\\n    if (!valid_) return false; \\\n    if (!BeginValue() || !CurrentSchema().method arg1) {\\\n        RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_();\\\n        return valid_ = false;\\\n    }\n\n#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)\\\n    for (Context* context = schemaStack_.template Bottom<Context>(); context != schemaStack_.template End<Context>(); context++) {\\\n        if (context->hasher)\\\n            static_cast<HasherType*>(context->hasher)->method arg2;\\\n        if (context->validators)\\\n            for (SizeType i_ = 0; i_ < context->validatorCount; i_++)\\\n                static_cast<GenericSchemaValidator*>(context->validators[i_])->method arg2;\\\n        if (context->patternPropertiesValidators)\\\n            for (SizeType i_ = 0; i_ < context->patternPropertiesValidatorCount; i_++)\\\n                static_cast<GenericSchemaValidator*>(context->patternPropertiesValidators[i_])->method arg2;\\\n    }\n\n#define RAPIDJSON_SCHEMA_HANDLE_END_(method, arg2)\\\n    return valid_ = EndValue() && (!outputHandler_ || outputHandler_->method arg2)\n\n#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2) \\\n    RAPIDJSON_SCHEMA_HANDLE_BEGIN_   (method, arg1);\\\n    RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2);\\\n    RAPIDJSON_SCHEMA_HANDLE_END_     (method, arg2)\n\n    bool Null()             { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Null,   (CurrentContext()), ( )); }\n    bool Bool(bool b)       { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Bool,   (CurrentContext(), b), (b)); }\n    bool Int(int i)         { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int,    (CurrentContext(), i), (i)); }\n    bool Uint(unsigned u)   { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint,   (CurrentContext(), u), (u)); }\n    bool Int64(int64_t i)   { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int64,  (CurrentContext(), i), (i)); }\n    bool Uint64(uint64_t u) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint64, (CurrentContext(), u), (u)); }\n    bool Double(double d)   { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Double, (CurrentContext(), d), (d)); }\n    bool RawNumber(const Ch* str, SizeType length, bool copy)\n                                    { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); }\n    bool String(const Ch* str, SizeType length, bool copy)\n                                    { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); }\n\n    bool StartObject() {\n        RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartObject, (CurrentContext()));\n        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartObject, ());\n        return valid_ = !outputHandler_ || outputHandler_->StartObject();\n    }\n    \n    bool Key(const Ch* str, SizeType len, bool copy) {\n        if (!valid_) return false;\n        AppendToken(str, len);\n        if (!CurrentSchema().Key(CurrentContext(), str, len, copy)) return valid_ = false;\n        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(Key, (str, len, copy));\n        return valid_ = !outputHandler_ || outputHandler_->Key(str, len, copy);\n    }\n    \n    bool EndObject(SizeType memberCount) { \n        if (!valid_) return false;\n        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndObject, (memberCount));\n        if (!CurrentSchema().EndObject(CurrentContext(), memberCount)) return valid_ = false;\n        RAPIDJSON_SCHEMA_HANDLE_END_(EndObject, (memberCount));\n    }\n\n    bool StartArray() {\n        RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartArray, (CurrentContext()));\n        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartArray, ());\n        return valid_ = !outputHandler_ || outputHandler_->StartArray();\n    }\n    \n    bool EndArray(SizeType elementCount) {\n        if (!valid_) return false;\n        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndArray, (elementCount));\n        if (!CurrentSchema().EndArray(CurrentContext(), elementCount)) return valid_ = false;\n        RAPIDJSON_SCHEMA_HANDLE_END_(EndArray, (elementCount));\n    }\n\n#undef RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_\n#undef RAPIDJSON_SCHEMA_HANDLE_BEGIN_\n#undef RAPIDJSON_SCHEMA_HANDLE_PARALLEL_\n#undef RAPIDJSON_SCHEMA_HANDLE_VALUE_\n\n    // Implementation of ISchemaStateFactory<SchemaType>\n    virtual ISchemaValidator* CreateSchemaValidator(const SchemaType& root) {\n        return new (GetStateAllocator().Malloc(sizeof(GenericSchemaValidator))) GenericSchemaValidator(*schemaDocument_, root, documentStack_.template Bottom<char>(), documentStack_.GetSize(),\n#if RAPIDJSON_SCHEMA_VERBOSE\n        depth_ + 1,\n#endif\n        &GetStateAllocator());\n    }\n\n    virtual void DestroySchemaValidator(ISchemaValidator* validator) {\n        GenericSchemaValidator* v = static_cast<GenericSchemaValidator*>(validator);\n        v->~GenericSchemaValidator();\n        StateAllocator::Free(v);\n    }\n\n    virtual void* CreateHasher() {\n        return new (GetStateAllocator().Malloc(sizeof(HasherType))) HasherType(&GetStateAllocator());\n    }\n\n    virtual uint64_t GetHashCode(void* hasher) {\n        return static_cast<HasherType*>(hasher)->GetHashCode();\n    }\n\n    virtual void DestroryHasher(void* hasher) {\n        HasherType* h = static_cast<HasherType*>(hasher);\n        h->~HasherType();\n        StateAllocator::Free(h);\n    }\n\n    virtual void* MallocState(size_t size) {\n        return GetStateAllocator().Malloc(size);\n    }\n\n    virtual void FreeState(void* p) {\n        StateAllocator::Free(p);\n    }\n\nprivate:\n    typedef typename SchemaType::Context Context;\n    typedef GenericValue<UTF8<>, StateAllocator> HashCodeArray;\n    typedef internal::Hasher<EncodingType, StateAllocator> HasherType;\n\n    GenericSchemaValidator( \n        const SchemaDocumentType& schemaDocument,\n        const SchemaType& root,\n        const char* basePath, size_t basePathSize,\n#if RAPIDJSON_SCHEMA_VERBOSE\n        unsigned depth,\n#endif\n        StateAllocator* allocator = 0,\n        size_t schemaStackCapacity = kDefaultSchemaStackCapacity,\n        size_t documentStackCapacity = kDefaultDocumentStackCapacity)\n        :\n        schemaDocument_(&schemaDocument),\n        root_(root),\n        stateAllocator_(allocator),\n        ownStateAllocator_(0),\n        schemaStack_(allocator, schemaStackCapacity),\n        documentStack_(allocator, documentStackCapacity),\n        outputHandler_(0),\n        error_(kObjectType),\n        currentError_(),\n        missingDependents_(),\n        valid_(true)\n#if RAPIDJSON_SCHEMA_VERBOSE\n        , depth_(depth)\n#endif\n    {\n        if (basePath && basePathSize)\n            memcpy(documentStack_.template Push<char>(basePathSize), basePath, basePathSize);\n    }\n\n    StateAllocator& GetStateAllocator() {\n        if (!stateAllocator_)\n            stateAllocator_ = ownStateAllocator_ = RAPIDJSON_NEW(StateAllocator)();\n        return *stateAllocator_;\n    }\n\n    bool BeginValue() {\n        if (schemaStack_.Empty())\n            PushSchema(root_);\n        else {\n            if (CurrentContext().inArray)\n                internal::TokenHelper<internal::Stack<StateAllocator>, Ch>::AppendIndexToken(documentStack_, CurrentContext().arrayElementIndex);\n\n            if (!CurrentSchema().BeginValue(CurrentContext()))\n                return false;\n\n            SizeType count = CurrentContext().patternPropertiesSchemaCount;\n            const SchemaType** sa = CurrentContext().patternPropertiesSchemas;\n            typename Context::PatternValidatorType patternValidatorType = CurrentContext().valuePatternValidatorType;\n            bool valueUniqueness = CurrentContext().valueUniqueness;\n            RAPIDJSON_ASSERT(CurrentContext().valueSchema);\n            PushSchema(*CurrentContext().valueSchema);\n\n            if (count > 0) {\n                CurrentContext().objectPatternValidatorType = patternValidatorType;\n                ISchemaValidator**& va = CurrentContext().patternPropertiesValidators;\n                SizeType& validatorCount = CurrentContext().patternPropertiesValidatorCount;\n                va = static_cast<ISchemaValidator**>(MallocState(sizeof(ISchemaValidator*) * count));\n                for (SizeType i = 0; i < count; i++)\n                    va[validatorCount++] = CreateSchemaValidator(*sa[i]);\n            }\n\n            CurrentContext().arrayUniqueness = valueUniqueness;\n        }\n        return true;\n    }\n\n    bool EndValue() {\n        if (!CurrentSchema().EndValue(CurrentContext()))\n            return false;\n\n#if RAPIDJSON_SCHEMA_VERBOSE\n        GenericStringBuffer<EncodingType> sb;\n        schemaDocument_->GetPointer(&CurrentSchema()).Stringify(sb);\n\n        *documentStack_.template Push<Ch>() = '\\0';\n        documentStack_.template Pop<Ch>(1);\n        internal::PrintValidatorPointers(depth_, sb.GetString(), documentStack_.template Bottom<Ch>());\n#endif\n\n        uint64_t h = CurrentContext().arrayUniqueness ? static_cast<HasherType*>(CurrentContext().hasher)->GetHashCode() : 0;\n        \n        PopSchema();\n\n        if (!schemaStack_.Empty()) {\n            Context& context = CurrentContext();\n            if (context.valueUniqueness) {\n                HashCodeArray* a = static_cast<HashCodeArray*>(context.arrayElementHashCodes);\n                if (!a)\n                    CurrentContext().arrayElementHashCodes = a = new (GetStateAllocator().Malloc(sizeof(HashCodeArray))) HashCodeArray(kArrayType);\n                for (typename HashCodeArray::ConstValueIterator itr = a->Begin(); itr != a->End(); ++itr)\n                    if (itr->GetUint64() == h) {\n                        DuplicateItems(static_cast<SizeType>(itr - a->Begin()), a->Size());\n                        RAPIDJSON_INVALID_KEYWORD_RETURN(SchemaType::GetUniqueItemsString());\n                    }\n                a->PushBack(h, GetStateAllocator());\n            }\n        }\n\n        // Remove the last token of document pointer\n        while (!documentStack_.Empty() && *documentStack_.template Pop<Ch>(1) != '/')\n            ;\n\n        return true;\n    }\n\n    void AppendToken(const Ch* str, SizeType len) {\n        documentStack_.template Reserve<Ch>(1 + len * 2); // worst case all characters are escaped as two characters\n        *documentStack_.template PushUnsafe<Ch>() = '/';\n        for (SizeType i = 0; i < len; i++) {\n            if (str[i] == '~') {\n                *documentStack_.template PushUnsafe<Ch>() = '~';\n                *documentStack_.template PushUnsafe<Ch>() = '0';\n            }\n            else if (str[i] == '/') {\n                *documentStack_.template PushUnsafe<Ch>() = '~';\n                *documentStack_.template PushUnsafe<Ch>() = '1';\n            }\n            else\n                *documentStack_.template PushUnsafe<Ch>() = str[i];\n        }\n    }\n\n    RAPIDJSON_FORCEINLINE void PushSchema(const SchemaType& schema) { new (schemaStack_.template Push<Context>()) Context(*this, *this, &schema); }\n    \n    RAPIDJSON_FORCEINLINE void PopSchema() {\n        Context* c = schemaStack_.template Pop<Context>(1);\n        if (HashCodeArray* a = static_cast<HashCodeArray*>(c->arrayElementHashCodes)) {\n            a->~HashCodeArray();\n            StateAllocator::Free(a);\n        }\n        c->~Context();\n    }\n\n    void AddErrorLocation(ValueType& result, bool parent) {\n        GenericStringBuffer<EncodingType> sb;\n        PointerType instancePointer = GetInvalidDocumentPointer();\n        ((parent && instancePointer.GetTokenCount() > 0)\n            ? PointerType(instancePointer.GetTokens(), instancePointer.GetTokenCount() - 1)\n            : instancePointer).StringifyUriFragment(sb);\n        ValueType instanceRef(sb.GetString(), static_cast<SizeType>(sb.GetSize() / sizeof(Ch)),\n            GetStateAllocator());\n        result.AddMember(GetInstanceRefString(), instanceRef, GetStateAllocator());\n        sb.Clear();\n        memcpy(sb.Push(CurrentSchema().GetURI().GetStringLength()),\n            CurrentSchema().GetURI().GetString(),\n            CurrentSchema().GetURI().GetStringLength() * sizeof(Ch));\n        GetInvalidSchemaPointer().StringifyUriFragment(sb);\n        ValueType schemaRef(sb.GetString(), static_cast<SizeType>(sb.GetSize() / sizeof(Ch)),\n            GetStateAllocator());\n        result.AddMember(GetSchemaRefString(), schemaRef, GetStateAllocator());\n    }\n\n    void AddError(ValueType& keyword, ValueType& error) {\n        typename ValueType::MemberIterator member = error_.FindMember(keyword);\n        if (member == error_.MemberEnd())\n            error_.AddMember(keyword, error, GetStateAllocator());\n        else {\n            if (member->value.IsObject()) {\n                ValueType errors(kArrayType);\n                errors.PushBack(member->value, GetStateAllocator());\n                member->value = errors;\n            }\n            member->value.PushBack(error, GetStateAllocator());\n        }\n    }\n\n    void AddCurrentError(const typename SchemaType::ValueType& keyword, bool parent = false) {\n        AddErrorLocation(currentError_, parent);\n        AddError(ValueType(keyword, GetStateAllocator(), false).Move(), currentError_);\n    }\n\n    void MergeError(ValueType& other) {\n        for (typename ValueType::MemberIterator it = other.MemberBegin(), end = other.MemberEnd(); it != end; ++it) {\n            AddError(it->name, it->value);\n        }\n    }\n\n    void AddNumberError(const typename SchemaType::ValueType& keyword, ValueType& actual, const SValue& expected,\n        const typename SchemaType::ValueType& (*exclusive)() = 0) {\n        currentError_.SetObject();\n        currentError_.AddMember(GetActualString(), actual, GetStateAllocator());\n        currentError_.AddMember(GetExpectedString(), ValueType(expected, GetStateAllocator()).Move(), GetStateAllocator());\n        if (exclusive)\n            currentError_.AddMember(ValueType(exclusive(), GetStateAllocator()).Move(), true, GetStateAllocator());\n        AddCurrentError(keyword);\n    }\n\n    void AddErrorArray(const typename SchemaType::ValueType& keyword,\n        ISchemaValidator** subvalidators, SizeType count) {\n        ValueType errors(kArrayType);\n        for (SizeType i = 0; i < count; ++i)\n            errors.PushBack(static_cast<GenericSchemaValidator*>(subvalidators[i])->GetError(), GetStateAllocator());\n        currentError_.SetObject();\n        currentError_.AddMember(GetErrorsString(), errors, GetStateAllocator());\n        AddCurrentError(keyword);\n    }\n\n    const SchemaType& CurrentSchema() const { return *schemaStack_.template Top<Context>()->schema; }\n    Context& CurrentContext() { return *schemaStack_.template Top<Context>(); }\n    const Context& CurrentContext() const { return *schemaStack_.template Top<Context>(); }\n\n    static const size_t kDefaultSchemaStackCapacity = 1024;\n    static const size_t kDefaultDocumentStackCapacity = 256;\n    const SchemaDocumentType* schemaDocument_;\n    const SchemaType& root_;\n    StateAllocator* stateAllocator_;\n    StateAllocator* ownStateAllocator_;\n    internal::Stack<StateAllocator> schemaStack_;    //!< stack to store the current path of schema (BaseSchemaType *)\n    internal::Stack<StateAllocator> documentStack_;  //!< stack to store the current path of validating document (Ch)\n    OutputHandler* outputHandler_;\n    ValueType error_;\n    ValueType currentError_;\n    ValueType missingDependents_;\n    bool valid_;\n#if RAPIDJSON_SCHEMA_VERBOSE\n    unsigned depth_;\n#endif\n};\n\ntypedef GenericSchemaValidator<SchemaDocument> SchemaValidator;\n\n///////////////////////////////////////////////////////////////////////////////\n// SchemaValidatingReader\n\n//! A helper class for parsing with validation.\n/*!\n    This helper class is a functor, designed as a parameter of \\ref GenericDocument::Populate().\n\n    \\tparam parseFlags Combination of \\ref ParseFlag.\n    \\tparam InputStream Type of input stream, implementing Stream concept.\n    \\tparam SourceEncoding Encoding of the input stream.\n    \\tparam SchemaDocumentType Type of schema document.\n    \\tparam StackAllocator Allocator type for stack.\n*/\ntemplate <\n    unsigned parseFlags,\n    typename InputStream,\n    typename SourceEncoding,\n    typename SchemaDocumentType = SchemaDocument,\n    typename StackAllocator = CrtAllocator>\nclass SchemaValidatingReader {\npublic:\n    typedef typename SchemaDocumentType::PointerType PointerType;\n    typedef typename InputStream::Ch Ch;\n    typedef GenericValue<SourceEncoding, StackAllocator> ValueType;\n\n    //! Constructor\n    /*!\n        \\param is Input stream.\n        \\param sd Schema document.\n    */\n    SchemaValidatingReader(InputStream& is, const SchemaDocumentType& sd) : is_(is), sd_(sd), invalidSchemaKeyword_(), error_(kObjectType), isValid_(true) {}\n\n    template <typename Handler>\n    bool operator()(Handler& handler) {\n        GenericReader<SourceEncoding, typename SchemaDocumentType::EncodingType, StackAllocator> reader;\n        GenericSchemaValidator<SchemaDocumentType, Handler> validator(sd_, handler);\n        parseResult_ = reader.template Parse<parseFlags>(is_, validator);\n\n        isValid_ = validator.IsValid();\n        if (isValid_) {\n            invalidSchemaPointer_ = PointerType();\n            invalidSchemaKeyword_ = 0;\n            invalidDocumentPointer_ = PointerType();\n            error_.SetObject();\n        }\n        else {\n            invalidSchemaPointer_ = validator.GetInvalidSchemaPointer();\n            invalidSchemaKeyword_ = validator.GetInvalidSchemaKeyword();\n            invalidDocumentPointer_ = validator.GetInvalidDocumentPointer();\n            error_.CopyFrom(validator.GetError(), allocator_);\n        }\n\n        return parseResult_;\n    }\n\n    const ParseResult& GetParseResult() const { return parseResult_; }\n    bool IsValid() const { return isValid_; }\n    const PointerType& GetInvalidSchemaPointer() const { return invalidSchemaPointer_; }\n    const Ch* GetInvalidSchemaKeyword() const { return invalidSchemaKeyword_; }\n    const PointerType& GetInvalidDocumentPointer() const { return invalidDocumentPointer_; }\n    const ValueType& GetError() const { return error_; }\n\nprivate:\n    InputStream& is_;\n    const SchemaDocumentType& sd_;\n\n    ParseResult parseResult_;\n    PointerType invalidSchemaPointer_;\n    const Ch* invalidSchemaKeyword_;\n    PointerType invalidDocumentPointer_;\n    StackAllocator allocator_;\n    ValueType error_;\n    bool isValid_;\n};\n\nRAPIDJSON_NAMESPACE_END\nRAPIDJSON_DIAG_POP\n\n#endif // RAPIDJSON_SCHEMA_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/stream.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n//\n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed\n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n\n#include \"rapidjson.h\"\n\n#ifndef RAPIDJSON_STREAM_H_\n#define RAPIDJSON_STREAM_H_\n\n#include \"encodings.h\"\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n///////////////////////////////////////////////////////////////////////////////\n//  Stream\n\n/*! \\class rapidjson::Stream\n    \\brief Concept for reading and writing characters.\n\n    For read-only stream, no need to implement PutBegin(), Put(), Flush() and PutEnd().\n\n    For write-only stream, only need to implement Put() and Flush().\n\n\\code\nconcept Stream {\n    typename Ch;    //!< Character type of the stream.\n\n    //! Read the current character from stream without moving the read cursor.\n    Ch Peek() const;\n\n    //! Read the current character from stream and moving the read cursor to next character.\n    Ch Take();\n\n    //! Get the current read cursor.\n    //! \\return Number of characters read from start.\n    size_t Tell();\n\n    //! Begin writing operation at the current read pointer.\n    //! \\return The begin writer pointer.\n    Ch* PutBegin();\n\n    //! Write a character.\n    void Put(Ch c);\n\n    //! Flush the buffer.\n    void Flush();\n\n    //! End the writing operation.\n    //! \\param begin The begin write pointer returned by PutBegin().\n    //! \\return Number of characters written.\n    size_t PutEnd(Ch* begin);\n}\n\\endcode\n*/\n\n//! Provides additional information for stream.\n/*!\n    By using traits pattern, this type provides a default configuration for stream.\n    For custom stream, this type can be specialized for other configuration.\n    See TEST(Reader, CustomStringStream) in readertest.cpp for example.\n*/\ntemplate<typename Stream>\nstruct StreamTraits {\n    //! Whether to make local copy of stream for optimization during parsing.\n    /*!\n        By default, for safety, streams do not use local copy optimization.\n        Stream that can be copied fast should specialize this, like StreamTraits<StringStream>.\n    */\n    enum { copyOptimization = 0 };\n};\n\n//! Reserve n characters for writing to a stream.\ntemplate<typename Stream>\ninline void PutReserve(Stream& stream, size_t count) {\n    (void)stream;\n    (void)count;\n}\n\n//! Write character to a stream, presuming buffer is reserved.\ntemplate<typename Stream>\ninline void PutUnsafe(Stream& stream, typename Stream::Ch c) {\n    stream.Put(c);\n}\n\n//! Put N copies of a character to a stream.\ntemplate<typename Stream, typename Ch>\ninline void PutN(Stream& stream, Ch c, size_t n) {\n    PutReserve(stream, n);\n    for (size_t i = 0; i < n; i++)\n        PutUnsafe(stream, c);\n}\n\n///////////////////////////////////////////////////////////////////////////////\n// GenericStreamWrapper\n\n//! A Stream Wrapper\n/*! \\tThis string stream is a wrapper for any stream by just forwarding any\n    \\treceived message to the origin stream.\n    \\note implements Stream concept\n*/\n\n#if defined(_MSC_VER) && _MSC_VER <= 1800\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(4702)  // unreachable code\nRAPIDJSON_DIAG_OFF(4512)  // assignment operator could not be generated\n#endif\n\ntemplate <typename InputStream, typename Encoding = UTF8<> >\nclass GenericStreamWrapper {\npublic:\n    typedef typename Encoding::Ch Ch;\n    GenericStreamWrapper(InputStream& is): is_(is) {}\n\n    Ch Peek() const { return is_.Peek(); }\n    Ch Take() { return is_.Take(); }\n    size_t Tell() { return is_.Tell(); }\n    Ch* PutBegin() { return is_.PutBegin(); }\n    void Put(Ch ch) { is_.Put(ch); }\n    void Flush() { is_.Flush(); }\n    size_t PutEnd(Ch* ch) { return is_.PutEnd(ch); }\n\n    // wrapper for MemoryStream\n    const Ch* Peek4() const { return is_.Peek4(); }\n\n    // wrapper for AutoUTFInputStream\n    UTFType GetType() const { return is_.GetType(); }\n    bool HasBOM() const { return is_.HasBOM(); }\n\nprotected:\n    InputStream& is_;\n};\n\n#if defined(_MSC_VER) && _MSC_VER <= 1800\nRAPIDJSON_DIAG_POP\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n// StringStream\n\n//! Read-only string stream.\n/*! \\note implements Stream concept\n*/\ntemplate <typename Encoding>\nstruct GenericStringStream {\n    typedef typename Encoding::Ch Ch;\n\n    GenericStringStream(const Ch *src) : src_(src), head_(src) {}\n\n    Ch Peek() const { return *src_; }\n    Ch Take() { return *src_++; }\n    size_t Tell() const { return static_cast<size_t>(src_ - head_); }\n\n    Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }\n    void Put(Ch) { RAPIDJSON_ASSERT(false); }\n    void Flush() { RAPIDJSON_ASSERT(false); }\n    size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }\n\n    const Ch* src_;     //!< Current read position.\n    const Ch* head_;    //!< Original head of the string.\n};\n\ntemplate <typename Encoding>\nstruct StreamTraits<GenericStringStream<Encoding> > {\n    enum { copyOptimization = 1 };\n};\n\n//! String stream with UTF8 encoding.\ntypedef GenericStringStream<UTF8<> > StringStream;\n\n///////////////////////////////////////////////////////////////////////////////\n// InsituStringStream\n\n//! A read-write string stream.\n/*! This string stream is particularly designed for in-situ parsing.\n    \\note implements Stream concept\n*/\ntemplate <typename Encoding>\nstruct GenericInsituStringStream {\n    typedef typename Encoding::Ch Ch;\n\n    GenericInsituStringStream(Ch *src) : src_(src), dst_(0), head_(src) {}\n\n    // Read\n    Ch Peek() { return *src_; }\n    Ch Take() { return *src_++; }\n    size_t Tell() { return static_cast<size_t>(src_ - head_); }\n\n    // Write\n    void Put(Ch c) { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; }\n\n    Ch* PutBegin() { return dst_ = src_; }\n    size_t PutEnd(Ch* begin) { return static_cast<size_t>(dst_ - begin); }\n    void Flush() {}\n\n    Ch* Push(size_t count) { Ch* begin = dst_; dst_ += count; return begin; }\n    void Pop(size_t count) { dst_ -= count; }\n\n    Ch* src_;\n    Ch* dst_;\n    Ch* head_;\n};\n\ntemplate <typename Encoding>\nstruct StreamTraits<GenericInsituStringStream<Encoding> > {\n    enum { copyOptimization = 1 };\n};\n\n//! Insitu string stream with UTF8 encoding.\ntypedef GenericInsituStringStream<UTF8<> > InsituStringStream;\n\nRAPIDJSON_NAMESPACE_END\n\n#endif // RAPIDJSON_STREAM_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/stringbuffer.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_STRINGBUFFER_H_\n#define RAPIDJSON_STRINGBUFFER_H_\n\n#include \"stream.h\"\n#include \"internal/stack.h\"\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n#include <utility> // std::move\n#endif\n\n#include \"internal/stack.h\"\n\n#if defined(__clang__)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(c++98-compat)\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n//! Represents an in-memory output stream.\n/*!\n    \\tparam Encoding Encoding of the stream.\n    \\tparam Allocator type for allocating memory buffer.\n    \\note implements Stream concept\n*/\ntemplate <typename Encoding, typename Allocator = CrtAllocator>\nclass GenericStringBuffer {\npublic:\n    typedef typename Encoding::Ch Ch;\n\n    GenericStringBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {}\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    GenericStringBuffer(GenericStringBuffer&& rhs) : stack_(std::move(rhs.stack_)) {}\n    GenericStringBuffer& operator=(GenericStringBuffer&& rhs) {\n        if (&rhs != this)\n            stack_ = std::move(rhs.stack_);\n        return *this;\n    }\n#endif\n\n    void Put(Ch c) { *stack_.template Push<Ch>() = c; }\n    void PutUnsafe(Ch c) { *stack_.template PushUnsafe<Ch>() = c; }\n    void Flush() {}\n\n    void Clear() { stack_.Clear(); }\n    void ShrinkToFit() {\n        // Push and pop a null terminator. This is safe.\n        *stack_.template Push<Ch>() = '\\0';\n        stack_.ShrinkToFit();\n        stack_.template Pop<Ch>(1);\n    }\n\n    void Reserve(size_t count) { stack_.template Reserve<Ch>(count); }\n    Ch* Push(size_t count) { return stack_.template Push<Ch>(count); }\n    Ch* PushUnsafe(size_t count) { return stack_.template PushUnsafe<Ch>(count); }\n    void Pop(size_t count) { stack_.template Pop<Ch>(count); }\n\n    const Ch* GetString() const {\n        // Push and pop a null terminator. This is safe.\n        *stack_.template Push<Ch>() = '\\0';\n        stack_.template Pop<Ch>(1);\n\n        return stack_.template Bottom<Ch>();\n    }\n\n    //! Get the size of string in bytes in the string buffer.\n    size_t GetSize() const { return stack_.GetSize(); }\n\n    //! Get the length of string in Ch in the string buffer.\n    size_t GetLength() const { return stack_.GetSize() / sizeof(Ch); }\n\n    static const size_t kDefaultCapacity = 256;\n    mutable internal::Stack<Allocator> stack_;\n\nprivate:\n    // Prohibit copy constructor & assignment operator.\n    GenericStringBuffer(const GenericStringBuffer&);\n    GenericStringBuffer& operator=(const GenericStringBuffer&);\n};\n\n//! String buffer with UTF8 encoding\ntypedef GenericStringBuffer<UTF8<> > StringBuffer;\n\ntemplate<typename Encoding, typename Allocator>\ninline void PutReserve(GenericStringBuffer<Encoding, Allocator>& stream, size_t count) {\n    stream.Reserve(count);\n}\n\ntemplate<typename Encoding, typename Allocator>\ninline void PutUnsafe(GenericStringBuffer<Encoding, Allocator>& stream, typename Encoding::Ch c) {\n    stream.PutUnsafe(c);\n}\n\n//! Implement specialized version of PutN() with memset() for better performance.\ntemplate<>\ninline void PutN(GenericStringBuffer<UTF8<> >& stream, char c, size_t n) {\n    std::memset(stream.stack_.Push<char>(n), c, n * sizeof(c));\n}\n\nRAPIDJSON_NAMESPACE_END\n\n#if defined(__clang__)\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_STRINGBUFFER_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/rapidjson/include/rapidjson/writer.h",
    "content": "// Tencent is pleased to support the open source community by making RapidJSON available.\n// \n// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.\n//\n// Licensed under the MIT License (the \"License\"); you may not use this file except\n// in compliance with the License. You may obtain a copy of the License at\n//\n// http://opensource.org/licenses/MIT\n//\n// Unless required by applicable law or agreed to in writing, software distributed \n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n// CONDITIONS OF ANY KIND, either express or implied. See the License for the \n// specific language governing permissions and limitations under the License.\n\n#ifndef RAPIDJSON_WRITER_H_\n#define RAPIDJSON_WRITER_H_\n\n#include \"stream.h\"\n#include \"internal/clzll.h\"\n#include \"internal/meta.h\"\n#include \"internal/stack.h\"\n#include \"internal/strfunc.h\"\n#include \"internal/dtoa.h\"\n#include \"internal/itoa.h\"\n#include \"stringbuffer.h\"\n#include <new>      // placement new\n\n#if defined(RAPIDJSON_SIMD) && defined(_MSC_VER)\n#include <intrin.h>\n#pragma intrinsic(_BitScanForward)\n#endif\n#ifdef RAPIDJSON_SSE42\n#include <nmmintrin.h>\n#elif defined(RAPIDJSON_SSE2)\n#include <emmintrin.h>\n#elif defined(RAPIDJSON_NEON)\n#include <arm_neon.h>\n#endif\n\n#ifdef __clang__\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(padded)\nRAPIDJSON_DIAG_OFF(unreachable-code)\nRAPIDJSON_DIAG_OFF(c++98-compat)\n#elif defined(_MSC_VER)\nRAPIDJSON_DIAG_PUSH\nRAPIDJSON_DIAG_OFF(4127) // conditional expression is constant\n#endif\n\nRAPIDJSON_NAMESPACE_BEGIN\n\n///////////////////////////////////////////////////////////////////////////////\n// WriteFlag\n\n/*! \\def RAPIDJSON_WRITE_DEFAULT_FLAGS \n    \\ingroup RAPIDJSON_CONFIG\n    \\brief User-defined kWriteDefaultFlags definition.\n\n    User can define this as any \\c WriteFlag combinations.\n*/\n#ifndef RAPIDJSON_WRITE_DEFAULT_FLAGS\n#define RAPIDJSON_WRITE_DEFAULT_FLAGS kWriteNoFlags\n#endif\n\n//! Combination of writeFlags\nenum WriteFlag {\n    kWriteNoFlags = 0,              //!< No flags are set.\n    kWriteValidateEncodingFlag = 1, //!< Validate encoding of JSON strings.\n    kWriteNanAndInfFlag = 2,        //!< Allow writing of Infinity, -Infinity and NaN.\n    kWriteDefaultFlags = RAPIDJSON_WRITE_DEFAULT_FLAGS  //!< Default write flags. Can be customized by defining RAPIDJSON_WRITE_DEFAULT_FLAGS\n};\n\n//! JSON writer\n/*! Writer implements the concept Handler.\n    It generates JSON text by events to an output os.\n\n    User may programmatically calls the functions of a writer to generate JSON text.\n\n    On the other side, a writer can also be passed to objects that generates events, \n\n    for example Reader::Parse() and Document::Accept().\n\n    \\tparam OutputStream Type of output stream.\n    \\tparam SourceEncoding Encoding of source string.\n    \\tparam TargetEncoding Encoding of output stream.\n    \\tparam StackAllocator Type of allocator for allocating memory of stack.\n    \\note implements Handler concept\n*/\ntemplate<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>\nclass Writer {\npublic:\n    typedef typename SourceEncoding::Ch Ch;\n\n    static const int kDefaultMaxDecimalPlaces = 324;\n\n    //! Constructor\n    /*! \\param os Output stream.\n        \\param stackAllocator User supplied allocator. If it is null, it will create a private one.\n        \\param levelDepth Initial capacity of stack.\n    */\n    explicit\n    Writer(OutputStream& os, StackAllocator* stackAllocator = 0, size_t levelDepth = kDefaultLevelDepth) : \n        os_(&os), level_stack_(stackAllocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {}\n\n    explicit\n    Writer(StackAllocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth) :\n        os_(0), level_stack_(allocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {}\n\n#if RAPIDJSON_HAS_CXX11_RVALUE_REFS\n    Writer(Writer&& rhs) :\n        os_(rhs.os_), level_stack_(std::move(rhs.level_stack_)), maxDecimalPlaces_(rhs.maxDecimalPlaces_), hasRoot_(rhs.hasRoot_) {\n        rhs.os_ = 0;\n    }\n#endif\n\n    //! Reset the writer with a new stream.\n    /*!\n        This function reset the writer with a new stream and default settings,\n        in order to make a Writer object reusable for output multiple JSONs.\n\n        \\param os New output stream.\n        \\code\n        Writer<OutputStream> writer(os1);\n        writer.StartObject();\n        // ...\n        writer.EndObject();\n\n        writer.Reset(os2);\n        writer.StartObject();\n        // ...\n        writer.EndObject();\n        \\endcode\n    */\n    void Reset(OutputStream& os) {\n        os_ = &os;\n        hasRoot_ = false;\n        level_stack_.Clear();\n    }\n\n    //! Checks whether the output is a complete JSON.\n    /*!\n        A complete JSON has a complete root object or array.\n    */\n    bool IsComplete() const {\n        return hasRoot_ && level_stack_.Empty();\n    }\n\n    int GetMaxDecimalPlaces() const {\n        return maxDecimalPlaces_;\n    }\n\n    //! Sets the maximum number of decimal places for double output.\n    /*!\n        This setting truncates the output with specified number of decimal places.\n\n        For example, \n\n        \\code\n        writer.SetMaxDecimalPlaces(3);\n        writer.StartArray();\n        writer.Double(0.12345);                 // \"0.123\"\n        writer.Double(0.0001);                  // \"0.0\"\n        writer.Double(1.234567890123456e30);    // \"1.234567890123456e30\" (do not truncate significand for positive exponent)\n        writer.Double(1.23e-4);                 // \"0.0\"                  (do truncate significand for negative exponent)\n        writer.EndArray();\n        \\endcode\n\n        The default setting does not truncate any decimal places. You can restore to this setting by calling\n        \\code\n        writer.SetMaxDecimalPlaces(Writer::kDefaultMaxDecimalPlaces);\n        \\endcode\n    */\n    void SetMaxDecimalPlaces(int maxDecimalPlaces) {\n        maxDecimalPlaces_ = maxDecimalPlaces;\n    }\n\n    /*!@name Implementation of Handler\n        \\see Handler\n    */\n    //@{\n\n    bool Null()                 { Prefix(kNullType);   return EndValue(WriteNull()); }\n    bool Bool(bool b)           { Prefix(b ? kTrueType : kFalseType); return EndValue(WriteBool(b)); }\n    bool Int(int i)             { Prefix(kNumberType); return EndValue(WriteInt(i)); }\n    bool Uint(unsigned u)       { Prefix(kNumberType); return EndValue(WriteUint(u)); }\n    bool Int64(int64_t i64)     { Prefix(kNumberType); return EndValue(WriteInt64(i64)); }\n    bool Uint64(uint64_t u64)   { Prefix(kNumberType); return EndValue(WriteUint64(u64)); }\n\n    //! Writes the given \\c double value to the stream\n    /*!\n        \\param d The value to be written.\n        \\return Whether it is succeed.\n    */\n    bool Double(double d)       { Prefix(kNumberType); return EndValue(WriteDouble(d)); }\n\n    bool RawNumber(const Ch* str, SizeType length, bool copy = false) {\n        RAPIDJSON_ASSERT(str != 0);\n        (void)copy;\n        Prefix(kNumberType);\n        return EndValue(WriteString(str, length));\n    }\n\n    bool String(const Ch* str, SizeType length, bool copy = false) {\n        RAPIDJSON_ASSERT(str != 0);\n        (void)copy;\n        Prefix(kStringType);\n        return EndValue(WriteString(str, length));\n    }\n\n#if RAPIDJSON_HAS_STDSTRING\n    bool String(const std::basic_string<Ch>& str) {\n        return String(str.data(), SizeType(str.size()));\n    }\n#endif\n\n    bool StartObject() {\n        Prefix(kObjectType);\n        new (level_stack_.template Push<Level>()) Level(false);\n        return WriteStartObject();\n    }\n\n    bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }\n\n#if RAPIDJSON_HAS_STDSTRING\n    bool Key(const std::basic_string<Ch>& str)\n    {\n      return Key(str.data(), SizeType(str.size()));\n    }\n#endif\n\n    bool EndObject(SizeType memberCount = 0) {\n        (void)memberCount;\n        RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level)); // not inside an Object\n        RAPIDJSON_ASSERT(!level_stack_.template Top<Level>()->inArray); // currently inside an Array, not Object\n        RAPIDJSON_ASSERT(0 == level_stack_.template Top<Level>()->valueCount % 2); // Object has a Key without a Value\n        level_stack_.template Pop<Level>(1);\n        return EndValue(WriteEndObject());\n    }\n\n    bool StartArray() {\n        Prefix(kArrayType);\n        new (level_stack_.template Push<Level>()) Level(true);\n        return WriteStartArray();\n    }\n\n    bool EndArray(SizeType elementCount = 0) {\n        (void)elementCount;\n        RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level));\n        RAPIDJSON_ASSERT(level_stack_.template Top<Level>()->inArray);\n        level_stack_.template Pop<Level>(1);\n        return EndValue(WriteEndArray());\n    }\n    //@}\n\n    /*! @name Convenience extensions */\n    //@{\n\n    //! Simpler but slower overload.\n    bool String(const Ch* const& str) { return String(str, internal::StrLen(str)); }\n    bool Key(const Ch* const& str) { return Key(str, internal::StrLen(str)); }\n    \n    //@}\n\n    //! Write a raw JSON value.\n    /*!\n        For user to write a stringified JSON as a value.\n\n        \\param json A well-formed JSON value. It should not contain null character within [0, length - 1] range.\n        \\param length Length of the json.\n        \\param type Type of the root of json.\n    */\n    bool RawValue(const Ch* json, size_t length, Type type) {\n        RAPIDJSON_ASSERT(json != 0);\n        Prefix(type);\n        return EndValue(WriteRawValue(json, length));\n    }\n\n    //! Flush the output stream.\n    /*!\n        Allows the user to flush the output stream immediately.\n     */\n    void Flush() {\n        os_->Flush();\n    }\n\n    static const size_t kDefaultLevelDepth = 32;\n\nprotected:\n    //! Information for each nested level\n    struct Level {\n        Level(bool inArray_) : valueCount(0), inArray(inArray_) {}\n        size_t valueCount;  //!< number of values in this level\n        bool inArray;       //!< true if in array, otherwise in object\n    };\n\n    bool WriteNull()  {\n        PutReserve(*os_, 4);\n        PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 'l'); return true;\n    }\n\n    bool WriteBool(bool b)  {\n        if (b) {\n            PutReserve(*os_, 4);\n            PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'r'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'e');\n        }\n        else {\n            PutReserve(*os_, 5);\n            PutUnsafe(*os_, 'f'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 's'); PutUnsafe(*os_, 'e');\n        }\n        return true;\n    }\n\n    bool WriteInt(int i) {\n        char buffer[11];\n        const char* end = internal::i32toa(i, buffer);\n        PutReserve(*os_, static_cast<size_t>(end - buffer));\n        for (const char* p = buffer; p != end; ++p)\n            PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));\n        return true;\n    }\n\n    bool WriteUint(unsigned u) {\n        char buffer[10];\n        const char* end = internal::u32toa(u, buffer);\n        PutReserve(*os_, static_cast<size_t>(end - buffer));\n        for (const char* p = buffer; p != end; ++p)\n            PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));\n        return true;\n    }\n\n    bool WriteInt64(int64_t i64) {\n        char buffer[21];\n        const char* end = internal::i64toa(i64, buffer);\n        PutReserve(*os_, static_cast<size_t>(end - buffer));\n        for (const char* p = buffer; p != end; ++p)\n            PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));\n        return true;\n    }\n\n    bool WriteUint64(uint64_t u64) {\n        char buffer[20];\n        char* end = internal::u64toa(u64, buffer);\n        PutReserve(*os_, static_cast<size_t>(end - buffer));\n        for (char* p = buffer; p != end; ++p)\n            PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));\n        return true;\n    }\n\n    bool WriteDouble(double d) {\n        if (internal::Double(d).IsNanOrInf()) {\n            if (!(writeFlags & kWriteNanAndInfFlag))\n                return false;\n            if (internal::Double(d).IsNan()) {\n                PutReserve(*os_, 3);\n                PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N');\n                return true;\n            }\n            if (internal::Double(d).Sign()) {\n                PutReserve(*os_, 9);\n                PutUnsafe(*os_, '-');\n            }\n            else\n                PutReserve(*os_, 8);\n            PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f');\n            PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y');\n            return true;\n        }\n\n        char buffer[25];\n        char* end = internal::dtoa(d, buffer, maxDecimalPlaces_);\n        PutReserve(*os_, static_cast<size_t>(end - buffer));\n        for (char* p = buffer; p != end; ++p)\n            PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));\n        return true;\n    }\n\n    bool WriteString(const Ch* str, SizeType length)  {\n        static const typename OutputStream::Ch hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };\n        static const char escape[256] = {\n#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n            //0    1    2    3    4    5    6    7    8    9    A    B    C    D    E    F\n            'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'b', 't', 'n', 'u', 'f', 'r', 'u', 'u', // 00\n            'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', // 10\n              0,   0, '\"',   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, // 20\n            Z16, Z16,                                                                       // 30~4F\n              0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,'\\\\',   0,   0,   0, // 50\n            Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16                                // 60~FF\n#undef Z16\n        };\n\n        if (TargetEncoding::supportUnicode)\n            PutReserve(*os_, 2 + length * 6); // \"\\uxxxx...\"\n        else\n            PutReserve(*os_, 2 + length * 12);  // \"\\uxxxx\\uyyyy...\"\n\n        PutUnsafe(*os_, '\\\"');\n        GenericStringStream<SourceEncoding> is(str);\n        while (ScanWriteUnescapedString(is, length)) {\n            const Ch c = is.Peek();\n            if (!TargetEncoding::supportUnicode && static_cast<unsigned>(c) >= 0x80) {\n                // Unicode escaping\n                unsigned codepoint;\n                if (RAPIDJSON_UNLIKELY(!SourceEncoding::Decode(is, &codepoint)))\n                    return false;\n                PutUnsafe(*os_, '\\\\');\n                PutUnsafe(*os_, 'u');\n                if (codepoint <= 0xD7FF || (codepoint >= 0xE000 && codepoint <= 0xFFFF)) {\n                    PutUnsafe(*os_, hexDigits[(codepoint >> 12) & 15]);\n                    PutUnsafe(*os_, hexDigits[(codepoint >>  8) & 15]);\n                    PutUnsafe(*os_, hexDigits[(codepoint >>  4) & 15]);\n                    PutUnsafe(*os_, hexDigits[(codepoint      ) & 15]);\n                }\n                else {\n                    RAPIDJSON_ASSERT(codepoint >= 0x010000 && codepoint <= 0x10FFFF);\n                    // Surrogate pair\n                    unsigned s = codepoint - 0x010000;\n                    unsigned lead = (s >> 10) + 0xD800;\n                    unsigned trail = (s & 0x3FF) + 0xDC00;\n                    PutUnsafe(*os_, hexDigits[(lead >> 12) & 15]);\n                    PutUnsafe(*os_, hexDigits[(lead >>  8) & 15]);\n                    PutUnsafe(*os_, hexDigits[(lead >>  4) & 15]);\n                    PutUnsafe(*os_, hexDigits[(lead      ) & 15]);\n                    PutUnsafe(*os_, '\\\\');\n                    PutUnsafe(*os_, 'u');\n                    PutUnsafe(*os_, hexDigits[(trail >> 12) & 15]);\n                    PutUnsafe(*os_, hexDigits[(trail >>  8) & 15]);\n                    PutUnsafe(*os_, hexDigits[(trail >>  4) & 15]);\n                    PutUnsafe(*os_, hexDigits[(trail      ) & 15]);                    \n                }\n            }\n            else if ((sizeof(Ch) == 1 || static_cast<unsigned>(c) < 256) && RAPIDJSON_UNLIKELY(escape[static_cast<unsigned char>(c)]))  {\n                is.Take();\n                PutUnsafe(*os_, '\\\\');\n                PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(escape[static_cast<unsigned char>(c)]));\n                if (escape[static_cast<unsigned char>(c)] == 'u') {\n                    PutUnsafe(*os_, '0');\n                    PutUnsafe(*os_, '0');\n                    PutUnsafe(*os_, hexDigits[static_cast<unsigned char>(c) >> 4]);\n                    PutUnsafe(*os_, hexDigits[static_cast<unsigned char>(c) & 0xF]);\n                }\n            }\n            else if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ? \n                Transcoder<SourceEncoding, TargetEncoding>::Validate(is, *os_) :\n                Transcoder<SourceEncoding, TargetEncoding>::TranscodeUnsafe(is, *os_))))\n                return false;\n        }\n        PutUnsafe(*os_, '\\\"');\n        return true;\n    }\n\n    bool ScanWriteUnescapedString(GenericStringStream<SourceEncoding>& is, size_t length) {\n        return RAPIDJSON_LIKELY(is.Tell() < length);\n    }\n\n    bool WriteStartObject() { os_->Put('{'); return true; }\n    bool WriteEndObject()   { os_->Put('}'); return true; }\n    bool WriteStartArray()  { os_->Put('['); return true; }\n    bool WriteEndArray()    { os_->Put(']'); return true; }\n\n    bool WriteRawValue(const Ch* json, size_t length) {\n        PutReserve(*os_, length);\n        GenericStringStream<SourceEncoding> is(json);\n        while (RAPIDJSON_LIKELY(is.Tell() < length)) {\n            RAPIDJSON_ASSERT(is.Peek() != '\\0');\n            if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ? \n                Transcoder<SourceEncoding, TargetEncoding>::Validate(is, *os_) :\n                Transcoder<SourceEncoding, TargetEncoding>::TranscodeUnsafe(is, *os_))))\n                return false;\n        }\n        return true;\n    }\n\n    void Prefix(Type type) {\n        (void)type;\n        if (RAPIDJSON_LIKELY(level_stack_.GetSize() != 0)) { // this value is not at root\n            Level* level = level_stack_.template Top<Level>();\n            if (level->valueCount > 0) {\n                if (level->inArray) \n                    os_->Put(','); // add comma if it is not the first element in array\n                else  // in object\n                    os_->Put((level->valueCount % 2 == 0) ? ',' : ':');\n            }\n            if (!level->inArray && level->valueCount % 2 == 0)\n                RAPIDJSON_ASSERT(type == kStringType);  // if it's in object, then even number should be a name\n            level->valueCount++;\n        }\n        else {\n            RAPIDJSON_ASSERT(!hasRoot_);    // Should only has one and only one root.\n            hasRoot_ = true;\n        }\n    }\n\n    // Flush the value if it is the top level one.\n    bool EndValue(bool ret) {\n        if (RAPIDJSON_UNLIKELY(level_stack_.Empty()))   // end of json text\n            Flush();\n        return ret;\n    }\n\n    OutputStream* os_;\n    internal::Stack<StackAllocator> level_stack_;\n    int maxDecimalPlaces_;\n    bool hasRoot_;\n\nprivate:\n    // Prohibit copy constructor & assignment operator.\n    Writer(const Writer&);\n    Writer& operator=(const Writer&);\n};\n\n// Full specialization for StringStream to prevent memory copying\n\ntemplate<>\ninline bool Writer<StringBuffer>::WriteInt(int i) {\n    char *buffer = os_->Push(11);\n    const char* end = internal::i32toa(i, buffer);\n    os_->Pop(static_cast<size_t>(11 - (end - buffer)));\n    return true;\n}\n\ntemplate<>\ninline bool Writer<StringBuffer>::WriteUint(unsigned u) {\n    char *buffer = os_->Push(10);\n    const char* end = internal::u32toa(u, buffer);\n    os_->Pop(static_cast<size_t>(10 - (end - buffer)));\n    return true;\n}\n\ntemplate<>\ninline bool Writer<StringBuffer>::WriteInt64(int64_t i64) {\n    char *buffer = os_->Push(21);\n    const char* end = internal::i64toa(i64, buffer);\n    os_->Pop(static_cast<size_t>(21 - (end - buffer)));\n    return true;\n}\n\ntemplate<>\ninline bool Writer<StringBuffer>::WriteUint64(uint64_t u) {\n    char *buffer = os_->Push(20);\n    const char* end = internal::u64toa(u, buffer);\n    os_->Pop(static_cast<size_t>(20 - (end - buffer)));\n    return true;\n}\n\ntemplate<>\ninline bool Writer<StringBuffer>::WriteDouble(double d) {\n    if (internal::Double(d).IsNanOrInf()) {\n        // Note: This code path can only be reached if (RAPIDJSON_WRITE_DEFAULT_FLAGS & kWriteNanAndInfFlag).\n        if (!(kWriteDefaultFlags & kWriteNanAndInfFlag))\n            return false;\n        if (internal::Double(d).IsNan()) {\n            PutReserve(*os_, 3);\n            PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N');\n            return true;\n        }\n        if (internal::Double(d).Sign()) {\n            PutReserve(*os_, 9);\n            PutUnsafe(*os_, '-');\n        }\n        else\n            PutReserve(*os_, 8);\n        PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f');\n        PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y');\n        return true;\n    }\n    \n    char *buffer = os_->Push(25);\n    char* end = internal::dtoa(d, buffer, maxDecimalPlaces_);\n    os_->Pop(static_cast<size_t>(25 - (end - buffer)));\n    return true;\n}\n\n#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42)\ntemplate<>\ninline bool Writer<StringBuffer>::ScanWriteUnescapedString(StringStream& is, size_t length) {\n    if (length < 16)\n        return RAPIDJSON_LIKELY(is.Tell() < length);\n\n    if (!RAPIDJSON_LIKELY(is.Tell() < length))\n        return false;\n\n    const char* p = is.src_;\n    const char* end = is.head_ + length;\n    const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n    const char* endAligned = reinterpret_cast<const char*>(reinterpret_cast<size_t>(end) & static_cast<size_t>(~15));\n    if (nextAligned > end)\n        return true;\n\n    while (p != nextAligned)\n        if (*p < 0x20 || *p == '\\\"' || *p == '\\\\') {\n            is.src_ = p;\n            return RAPIDJSON_LIKELY(is.Tell() < length);\n        }\n        else\n            os_->PutUnsafe(*p++);\n\n    // The rest of string using SIMD\n    static const char dquote[16] = { '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"', '\\\"' };\n    static const char bslash[16] = { '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\', '\\\\' };\n    static const char space[16]  = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F };\n    const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));\n    const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));\n    const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));\n\n    for (; p != endAligned; p += 16) {\n        const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));\n        const __m128i t1 = _mm_cmpeq_epi8(s, dq);\n        const __m128i t2 = _mm_cmpeq_epi8(s, bs);\n        const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F\n        const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);\n        unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));\n        if (RAPIDJSON_UNLIKELY(r != 0)) {   // some of characters is escaped\n            SizeType len;\n#ifdef _MSC_VER         // Find the index of first escaped\n            unsigned long offset;\n            _BitScanForward(&offset, r);\n            len = offset;\n#else\n            len = static_cast<SizeType>(__builtin_ffs(r) - 1);\n#endif\n            char* q = reinterpret_cast<char*>(os_->PushUnsafe(len));\n            for (size_t i = 0; i < len; i++)\n                q[i] = p[i];\n\n            p += len;\n            break;\n        }\n        _mm_storeu_si128(reinterpret_cast<__m128i *>(os_->PushUnsafe(16)), s);\n    }\n\n    is.src_ = p;\n    return RAPIDJSON_LIKELY(is.Tell() < length);\n}\n#elif defined(RAPIDJSON_NEON)\ntemplate<>\ninline bool Writer<StringBuffer>::ScanWriteUnescapedString(StringStream& is, size_t length) {\n    if (length < 16)\n        return RAPIDJSON_LIKELY(is.Tell() < length);\n\n    if (!RAPIDJSON_LIKELY(is.Tell() < length))\n        return false;\n\n    const char* p = is.src_;\n    const char* end = is.head_ + length;\n    const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));\n    const char* endAligned = reinterpret_cast<const char*>(reinterpret_cast<size_t>(end) & static_cast<size_t>(~15));\n    if (nextAligned > end)\n        return true;\n\n    while (p != nextAligned)\n        if (*p < 0x20 || *p == '\\\"' || *p == '\\\\') {\n            is.src_ = p;\n            return RAPIDJSON_LIKELY(is.Tell() < length);\n        }\n        else\n            os_->PutUnsafe(*p++);\n\n    // The rest of string using SIMD\n    const uint8x16_t s0 = vmovq_n_u8('\"');\n    const uint8x16_t s1 = vmovq_n_u8('\\\\');\n    const uint8x16_t s2 = vmovq_n_u8('\\b');\n    const uint8x16_t s3 = vmovq_n_u8(32);\n\n    for (; p != endAligned; p += 16) {\n        const uint8x16_t s = vld1q_u8(reinterpret_cast<const uint8_t *>(p));\n        uint8x16_t x = vceqq_u8(s, s0);\n        x = vorrq_u8(x, vceqq_u8(s, s1));\n        x = vorrq_u8(x, vceqq_u8(s, s2));\n        x = vorrq_u8(x, vcltq_u8(s, s3));\n\n        x = vrev64q_u8(x);                     // Rev in 64\n        uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0);   // extract\n        uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1);  // extract\n\n        SizeType len = 0;\n        bool escaped = false;\n        if (low == 0) {\n            if (high != 0) {\n                uint32_t lz = internal::clzll(high);\n                len = 8 + (lz >> 3);\n                escaped = true;\n            }\n        } else {\n            uint32_t lz = internal::clzll(low);\n            len = lz >> 3;\n            escaped = true;\n        }\n        if (RAPIDJSON_UNLIKELY(escaped)) {   // some of characters is escaped\n            char* q = reinterpret_cast<char*>(os_->PushUnsafe(len));\n            for (size_t i = 0; i < len; i++)\n                q[i] = p[i];\n\n            p += len;\n            break;\n        }\n        vst1q_u8(reinterpret_cast<uint8_t *>(os_->PushUnsafe(16)), s);\n    }\n\n    is.src_ = p;\n    return RAPIDJSON_LIKELY(is.Tell() < length);\n}\n#endif // RAPIDJSON_NEON\n\nRAPIDJSON_NAMESPACE_END\n\n#if defined(_MSC_VER) || defined(__clang__)\nRAPIDJSON_DIAG_POP\n#endif\n\n#endif // RAPIDJSON_RAPIDJSON_H_\n"
  },
  {
    "path": "Framework/3rdPartyLibs/utf8cpp/utf8/checked.h",
    "content": "// Copyright 2006-2016 Nemanja Trifunovic\n\n/*\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\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, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n*/\n\n\n#ifndef UTF8_FOR_CPP_CHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731\n#define UTF8_FOR_CPP_CHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731\n\n#include \"core.h\"\n#include <stdexcept>\n\nnamespace utf8\n{\n    // Base for the exceptions that may be thrown from the library\n    class exception : public ::std::exception {\n    };\n\n    // Exceptions that may be thrown from the library functions.\n    class invalid_code_point : public exception {\n        uint32_t cp;\n    public:\n        invalid_code_point(uint32_t codepoint) : cp(codepoint) {}\n        virtual const char* what() const NOEXCEPT OVERRIDE { return \"Invalid code point\"; }\n        uint32_t code_point() const {return cp;}\n    };\n\n    class invalid_utf8 : public exception {\n        uint8_t u8;\n    public:\n        invalid_utf8 (uint8_t u) : u8(u) {}\n        virtual const char* what() const NOEXCEPT OVERRIDE { return \"Invalid UTF-8\"; }\n        uint8_t utf8_octet() const {return u8;}\n    };\n\n    class invalid_utf16 : public exception {\n        uint16_t u16;\n    public:\n        invalid_utf16 (uint16_t u) : u16(u) {}\n        virtual const char* what() const NOEXCEPT OVERRIDE { return \"Invalid UTF-16\"; }\n        uint16_t utf16_word() const {return u16;}\n    };\n\n    class not_enough_room : public exception {\n    public:\n        virtual const char* what() const NOEXCEPT OVERRIDE { return \"Not enough space\"; }\n    };\n\n    /// The library API - functions intended to be called by the users\n\n    template <typename octet_iterator>\n    octet_iterator append(uint32_t cp, octet_iterator result)\n    {\n        if (!utf8::internal::is_code_point_valid(cp))\n            throw invalid_code_point(cp);\n\n        if (cp < 0x80)                        // one octet\n            *(result++) = static_cast<uint8_t>(cp);\n        else if (cp < 0x800) {                // two octets\n            *(result++) = static_cast<uint8_t>((cp >> 6)            | 0xc0);\n            *(result++) = static_cast<uint8_t>((cp & 0x3f)          | 0x80);\n        }\n        else if (cp < 0x10000) {              // three octets\n            *(result++) = static_cast<uint8_t>((cp >> 12)           | 0xe0);\n            *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f)   | 0x80);\n            *(result++) = static_cast<uint8_t>((cp & 0x3f)          | 0x80);\n        }\n        else {                                // four octets\n            *(result++) = static_cast<uint8_t>((cp >> 18)           | 0xf0);\n            *(result++) = static_cast<uint8_t>(((cp >> 12) & 0x3f)  | 0x80);\n            *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f)   | 0x80);\n            *(result++) = static_cast<uint8_t>((cp & 0x3f)          | 0x80);\n        }\n        return result;\n    }\n\n    template <typename octet_iterator, typename output_iterator>\n    output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out, uint32_t replacement)\n    {\n        while (start != end) {\n            octet_iterator sequence_start = start;\n            internal::utf_error err_code = utf8::internal::validate_next(start, end);\n            switch (err_code) {\n                case internal::UTF8_OK :\n                    for (octet_iterator it = sequence_start; it != start; ++it)\n                        *out++ = *it;\n                    break;\n                case internal::NOT_ENOUGH_ROOM:\n                    out = utf8::append (replacement, out);\n                    start = end;\n                    break;\n                case internal::INVALID_LEAD:\n                    out = utf8::append (replacement, out);\n                    ++start;\n                    break;\n                case internal::INCOMPLETE_SEQUENCE:\n                case internal::OVERLONG_SEQUENCE:\n                case internal::INVALID_CODE_POINT:\n                    out = utf8::append (replacement, out);\n                    ++start;\n                    // just one replacement mark for the sequence\n                    while (start != end && utf8::internal::is_trail(*start))\n                        ++start;\n                    break;\n            }\n        }\n        return out;\n    }\n\n    template <typename octet_iterator, typename output_iterator>\n    inline output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out)\n    {\n        static const uint32_t replacement_marker = utf8::internal::mask16(0xfffd);\n        return utf8::replace_invalid(start, end, out, replacement_marker);\n    }\n\n    template <typename octet_iterator>\n    uint32_t next(octet_iterator& it, octet_iterator end)\n    {\n        uint32_t cp = 0;\n        internal::utf_error err_code = utf8::internal::validate_next(it, end, cp);\n        switch (err_code) {\n            case internal::UTF8_OK :\n                break;\n            case internal::NOT_ENOUGH_ROOM :\n                throw not_enough_room();\n            case internal::INVALID_LEAD :\n            case internal::INCOMPLETE_SEQUENCE :\n            case internal::OVERLONG_SEQUENCE :\n                throw invalid_utf8(*it);\n            case internal::INVALID_CODE_POINT :\n                throw invalid_code_point(cp);\n        }\n        return cp;\n    }\n\n    template <typename octet_iterator>\n    uint32_t peek_next(octet_iterator it, octet_iterator end)\n    {\n        return utf8::next(it, end);\n    }\n\n    template <typename octet_iterator>\n    uint32_t prior(octet_iterator& it, octet_iterator start)\n    {\n        // can't do much if it == start\n        if (it == start)\n            throw not_enough_room();\n\n        octet_iterator end = it;\n        // Go back until we hit either a lead octet or start\n        while (utf8::internal::is_trail(*(--it)))\n            if (it == start)\n                throw invalid_utf8(*it); // error - no lead byte in the sequence\n        return utf8::peek_next(it, end);\n    }\n\n    template <typename octet_iterator, typename distance_type>\n    void advance (octet_iterator& it, distance_type n, octet_iterator end)\n    {\n        const distance_type zero(0);\n        if (n < zero) {\n            // backward\n            for (distance_type i = n; i < zero; ++i)\n                utf8::prior(it, end);\n        } else {\n            // forward\n            for (distance_type i = zero; i < n; ++i)\n                utf8::next(it, end);\n        }\n    }\n\n    template <typename octet_iterator>\n    typename std::iterator_traits<octet_iterator>::difference_type\n    distance (octet_iterator first, octet_iterator last)\n    {\n        typename std::iterator_traits<octet_iterator>::difference_type dist;\n        for (dist = 0; first < last; ++dist)\n            utf8::next(first, last);\n        return dist;\n    }\n\n    template <typename u16bit_iterator, typename octet_iterator>\n    octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result)\n    {\n        while (start != end) {\n            uint32_t cp = utf8::internal::mask16(*start++);\n            // Take care of surrogate pairs first\n            if (utf8::internal::is_lead_surrogate(cp)) {\n                if (start != end) {\n                    uint32_t trail_surrogate = utf8::internal::mask16(*start++);\n                    if (utf8::internal::is_trail_surrogate(trail_surrogate))\n                        cp = (cp << 10) + trail_surrogate + internal::SURROGATE_OFFSET;\n                    else\n                        throw invalid_utf16(static_cast<uint16_t>(trail_surrogate));\n                }\n                else\n                    throw invalid_utf16(static_cast<uint16_t>(cp));\n\n            }\n            // Lone trail surrogate\n            else if (utf8::internal::is_trail_surrogate(cp))\n                throw invalid_utf16(static_cast<uint16_t>(cp));\n\n            result = utf8::append(cp, result);\n        }\n        return result;\n    }\n\n    template <typename u16bit_iterator, typename octet_iterator>\n    u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result)\n    {\n        while (start < end) {\n            uint32_t cp = utf8::next(start, end);\n            if (cp > 0xffff) { //make a surrogate pair\n                *result++ = static_cast<uint16_t>((cp >> 10)   + internal::LEAD_OFFSET);\n                *result++ = static_cast<uint16_t>((cp & 0x3ff) + internal::TRAIL_SURROGATE_MIN);\n            }\n            else\n                *result++ = static_cast<uint16_t>(cp);\n        }\n        return result;\n    }\n\n    template <typename octet_iterator, typename u32bit_iterator>\n    octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result)\n    {\n        while (start != end)\n            result = utf8::append(*(start++), result);\n\n        return result;\n    }\n\n    template <typename octet_iterator, typename u32bit_iterator>\n    u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result)\n    {\n        while (start < end)\n            (*result++) = utf8::next(start, end);\n\n        return result;\n    }\n\n    // The iterator class\n    template <typename octet_iterator>\n    class iterator {\n      octet_iterator it;\n      octet_iterator range_start;\n      octet_iterator range_end;\n      public:\n      typedef uint32_t value_type;\n      typedef uint32_t* pointer;\n      typedef uint32_t& reference;\n      typedef std::ptrdiff_t difference_type;\n      typedef std::bidirectional_iterator_tag iterator_category;\n      iterator () {}\n      explicit iterator (const octet_iterator& octet_it,\n                         const octet_iterator& rangestart,\n                         const octet_iterator& rangeend) :\n               it(octet_it), range_start(rangestart), range_end(rangeend)\n      {\n          if (it < range_start || it > range_end)\n              throw std::out_of_range(\"Invalid utf-8 iterator position\");\n      }\n      // the default \"big three\" are OK\n      octet_iterator base () const { return it; }\n      uint32_t operator * () const\n      {\n          octet_iterator temp = it;\n          return utf8::next(temp, range_end);\n      }\n      bool operator == (const iterator& rhs) const\n      {\n          if (range_start != rhs.range_start || range_end != rhs.range_end)\n              throw std::logic_error(\"Comparing utf-8 iterators defined with different ranges\");\n          return (it == rhs.it);\n      }\n      bool operator != (const iterator& rhs) const\n      {\n          return !(operator == (rhs));\n      }\n      iterator& operator ++ ()\n      {\n          utf8::next(it, range_end);\n          return *this;\n      }\n      iterator operator ++ (int)\n      {\n          iterator temp = *this;\n          utf8::next(it, range_end);\n          return temp;\n      }\n      iterator& operator -- ()\n      {\n          utf8::prior(it, range_start);\n          return *this;\n      }\n      iterator operator -- (int)\n      {\n          iterator temp = *this;\n          utf8::prior(it, range_start);\n          return temp;\n      }\n    }; // class iterator\n\n} // namespace utf8\n\n#if UTF_CPP_CPLUSPLUS >= 201103L // C++ 11 or later\n#include \"cpp11.h\"\n#endif // C++ 11 or later\n\n#endif //header guard\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/utf8cpp/utf8/core.h",
    "content": "// Copyright 2006 Nemanja Trifunovic\n\n/*\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\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, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n*/\n\n\n#ifndef UTF8_FOR_CPP_CORE_H_2675DCD0_9480_4c0c_B92A_CC14C027B731\n#define UTF8_FOR_CPP_CORE_H_2675DCD0_9480_4c0c_B92A_CC14C027B731\n\n#include <iterator>\n\n// Determine the C++ standard version.\n// If the user defines UTF_CPP_CPLUSPLUS, use that.\n// Otherwise, trust the unreliable predefined macro __cplusplus\n\n#if !defined UTF_CPP_CPLUSPLUS\n    #define UTF_CPP_CPLUSPLUS __cplusplus\n#endif\n\n#if UTF_CPP_CPLUSPLUS >= 201103L // C++ 11 or later\n    #define OVERRIDE override\n    #define NOEXCEPT noexcept\n#else // C++ 98/03\n    #define OVERRIDE\n    #define NOEXCEPT throw()\n#endif // C++ 11 or later\n\n\nnamespace utf8\n{\n    // The typedefs for 8-bit, 16-bit and 32-bit unsigned integers\n    // You may need to change them to match your system.\n    // These typedefs have the same names as ones from cstdint, or boost/cstdint\n    typedef unsigned char   uint8_t;\n    typedef unsigned short  uint16_t;\n    typedef unsigned int    uint32_t;\n\n// Helper code - not intended to be directly called by the library users. May be changed at any time\nnamespace internal\n{\n    // Unicode constants\n    // Leading (high) surrogates: 0xd800 - 0xdbff\n    // Trailing (low) surrogates: 0xdc00 - 0xdfff\n    const uint16_t LEAD_SURROGATE_MIN  = 0xd800u;\n    const uint16_t LEAD_SURROGATE_MAX  = 0xdbffu;\n    const uint16_t TRAIL_SURROGATE_MIN = 0xdc00u;\n    const uint16_t TRAIL_SURROGATE_MAX = 0xdfffu;\n    const uint16_t LEAD_OFFSET         = 0xd7c0u;       // LEAD_SURROGATE_MIN - (0x10000 >> 10)\n    const uint32_t SURROGATE_OFFSET    = 0xfca02400u;   // 0x10000u - (LEAD_SURROGATE_MIN << 10) - TRAIL_SURROGATE_MIN\n\n    // Maximum valid value for a Unicode code point\n    const uint32_t CODE_POINT_MAX      = 0x0010ffffu;\n\n    template<typename octet_type>\n    inline uint8_t mask8(octet_type oc)\n    {\n        return static_cast<uint8_t>(0xff & oc);\n    }\n    template<typename u16_type>\n    inline uint16_t mask16(u16_type oc)\n    {\n        return static_cast<uint16_t>(0xffff & oc);\n    }\n    template<typename octet_type>\n    inline bool is_trail(octet_type oc)\n    {\n        return ((utf8::internal::mask8(oc) >> 6) == 0x2);\n    }\n\n    template <typename u16>\n    inline bool is_lead_surrogate(u16 cp)\n    {\n        return (cp >= LEAD_SURROGATE_MIN && cp <= LEAD_SURROGATE_MAX);\n    }\n\n    template <typename u16>\n    inline bool is_trail_surrogate(u16 cp)\n    {\n        return (cp >= TRAIL_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX);\n    }\n\n    template <typename u16>\n    inline bool is_surrogate(u16 cp)\n    {\n        return (cp >= LEAD_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX);\n    }\n\n    template <typename u32>\n    inline bool is_code_point_valid(u32 cp)\n    {\n        return (cp <= CODE_POINT_MAX && !utf8::internal::is_surrogate(cp));\n    }\n\n    template <typename octet_iterator>\n    inline typename std::iterator_traits<octet_iterator>::difference_type\n    sequence_length(octet_iterator lead_it)\n    {\n        uint8_t lead = utf8::internal::mask8(*lead_it);\n        if (lead < 0x80)\n            return 1;\n        else if ((lead >> 5) == 0x6)\n            return 2;\n        else if ((lead >> 4) == 0xe)\n            return 3;\n        else if ((lead >> 3) == 0x1e)\n            return 4;\n        else\n            return 0;\n    }\n\n    template <typename octet_difference_type>\n    inline bool is_overlong_sequence(uint32_t cp, octet_difference_type length)\n    {\n        if (cp < 0x80) {\n            if (length != 1) \n                return true;\n        }\n        else if (cp < 0x800) {\n            if (length != 2) \n                return true;\n        }\n        else if (cp < 0x10000) {\n            if (length != 3) \n                return true;\n        }\n\n        return false;\n    }\n\n    enum utf_error {UTF8_OK, NOT_ENOUGH_ROOM, INVALID_LEAD, INCOMPLETE_SEQUENCE, OVERLONG_SEQUENCE, INVALID_CODE_POINT};\n\n    /// Helper for get_sequence_x\n    template <typename octet_iterator>\n    utf_error increase_safely(octet_iterator& it, octet_iterator end)\n    {\n        if (++it == end)\n            return NOT_ENOUGH_ROOM;\n\n        if (!utf8::internal::is_trail(*it))\n            return INCOMPLETE_SEQUENCE;\n\n        return UTF8_OK;\n    }\n\n    #define UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(IT, END) {utf_error ret = increase_safely(IT, END); if (ret != UTF8_OK) return ret;}    \n\n    /// get_sequence_x functions decode utf-8 sequences of the length x\n    template <typename octet_iterator>\n    utf_error get_sequence_1(octet_iterator& it, octet_iterator end, uint32_t& code_point)\n    {\n        if (it == end)\n            return NOT_ENOUGH_ROOM;\n\n        code_point = utf8::internal::mask8(*it);\n\n        return UTF8_OK;\n    }\n\n    template <typename octet_iterator>\n    utf_error get_sequence_2(octet_iterator& it, octet_iterator end, uint32_t& code_point)\n    {\n        if (it == end) \n            return NOT_ENOUGH_ROOM;\n\n        code_point = utf8::internal::mask8(*it);\n\n        UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)\n\n        code_point = ((code_point << 6) & 0x7ff) + ((*it) & 0x3f);\n\n        return UTF8_OK;\n    }\n\n    template <typename octet_iterator>\n    utf_error get_sequence_3(octet_iterator& it, octet_iterator end, uint32_t& code_point)\n    {\n        if (it == end)\n            return NOT_ENOUGH_ROOM;\n            \n        code_point = utf8::internal::mask8(*it);\n\n        UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)\n\n        code_point = ((code_point << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff);\n\n        UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)\n\n        code_point += (*it) & 0x3f;\n\n        return UTF8_OK;\n    }\n\n    template <typename octet_iterator>\n    utf_error get_sequence_4(octet_iterator& it, octet_iterator end, uint32_t& code_point)\n    {\n        if (it == end)\n           return NOT_ENOUGH_ROOM;\n\n        code_point = utf8::internal::mask8(*it);\n\n        UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)\n\n        code_point = ((code_point << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);\n\n        UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)\n\n        code_point += (utf8::internal::mask8(*it) << 6) & 0xfff;\n\n        UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)\n\n        code_point += (*it) & 0x3f;\n\n        return UTF8_OK;\n    }\n\n    #undef UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR\n\n    template <typename octet_iterator>\n    utf_error validate_next(octet_iterator& it, octet_iterator end, uint32_t& code_point)\n    {\n        if (it == end)\n            return NOT_ENOUGH_ROOM;\n\n        // Save the original value of it so we can go back in case of failure\n        // Of course, it does not make much sense with i.e. stream iterators\n        octet_iterator original_it = it;\n\n        uint32_t cp = 0;\n        // Determine the sequence length based on the lead octet\n        typedef typename std::iterator_traits<octet_iterator>::difference_type octet_difference_type;\n        const octet_difference_type length = utf8::internal::sequence_length(it);\n\n        // Get trail octets and calculate the code point\n        utf_error err = UTF8_OK;\n        switch (length) {\n            case 0:\n                return INVALID_LEAD;\n            case 1:\n                err = utf8::internal::get_sequence_1(it, end, cp);\n                break;\n            case 2:\n                err = utf8::internal::get_sequence_2(it, end, cp);\n            break;\n            case 3:\n                err = utf8::internal::get_sequence_3(it, end, cp);\n            break;\n            case 4:\n                err = utf8::internal::get_sequence_4(it, end, cp);\n            break;\n        }\n\n        if (err == UTF8_OK) {\n            // Decoding succeeded. Now, security checks...\n            if (utf8::internal::is_code_point_valid(cp)) {\n                if (!utf8::internal::is_overlong_sequence(cp, length)){\n                    // Passed! Return here.\n                    code_point = cp;\n                    ++it;\n                    return UTF8_OK;\n                }\n                else\n                    err = OVERLONG_SEQUENCE;\n            }\n            else \n                err = INVALID_CODE_POINT;\n        }\n\n        // Failure branch - restore the original value of the iterator\n        it = original_it;\n        return err;\n    }\n\n    template <typename octet_iterator>\n    inline utf_error validate_next(octet_iterator& it, octet_iterator end) {\n        uint32_t ignored;\n        return utf8::internal::validate_next(it, end, ignored);\n    }\n\n} // namespace internal\n\n    /// The library API - functions intended to be called by the users\n\n    // Byte order mark\n    const uint8_t bom[] = {0xef, 0xbb, 0xbf};\n\n    template <typename octet_iterator>\n    octet_iterator find_invalid(octet_iterator start, octet_iterator end)\n    {\n        octet_iterator result = start;\n        while (result != end) {\n            utf8::internal::utf_error err_code = utf8::internal::validate_next(result, end);\n            if (err_code != internal::UTF8_OK)\n                return result;\n        }\n        return result;\n    }\n\n    template <typename octet_iterator>\n    inline bool is_valid(octet_iterator start, octet_iterator end)\n    {\n        return (utf8::find_invalid(start, end) == end);\n    }\n\n    template <typename octet_iterator>\n    inline bool starts_with_bom (octet_iterator it, octet_iterator end)\n    {\n        return (\n            ((it != end) && (utf8::internal::mask8(*it++)) == bom[0]) &&\n            ((it != end) && (utf8::internal::mask8(*it++)) == bom[1]) &&\n            ((it != end) && (utf8::internal::mask8(*it))   == bom[2])\n           );\n    }\t\n} // namespace utf8\n\n#endif // header guard\n\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/utf8cpp/utf8/cpp11.h",
    "content": "// Copyright 2018 Nemanja Trifunovic\n\n/*\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\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, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n*/\n\n\n#ifndef UTF8_FOR_CPP_a184c22c_d012_11e8_a8d5_f2801f1b9fd1\n#define UTF8_FOR_CPP_a184c22c_d012_11e8_a8d5_f2801f1b9fd1\n\n#include \"checked.h\"\n#include <string>\n\nnamespace utf8\n{\n\n    inline void append(char32_t cp, std::string& s)\n    {\n        append(uint32_t(cp), std::back_inserter(s));\n    }\n\n    inline std::string utf16to8(const std::u16string& s)\n    {\n        std::string result;\n        utf16to8(s.begin(), s.end(), std::back_inserter(result));\n        return result;\n    }\n\n    inline std::u16string utf8to16(const std::string& s)\n    {\n        std::u16string result;\n        utf8to16(s.begin(), s.end(), std::back_inserter(result));\n        return result;\n    }\n\n    inline std::string utf32to8(const std::u32string& s)\n    {\n        std::string result;\n        utf32to8(s.begin(), s.end(), std::back_inserter(result));\n        return result;\n    }\n\n    inline std::u32string utf8to32(const std::string& s)\n    {\n        std::u32string result;\n        utf8to32(s.begin(), s.end(), std::back_inserter(result));\n        return result;\n    }\n\n    inline std::size_t find_invalid(const std::string& s)\n    {\n        std::string::const_iterator invalid = find_invalid(s.begin(), s.end());\n        return (invalid == s.end()) ? std::string::npos : (invalid - s.begin());\n    }\n\n    inline bool is_valid(const std::string& s)\n    {\n        return is_valid(s.begin(), s.end());\n    }\n\n    inline std::string replace_invalid(const std::string& s, char32_t replacement)\n    {\n        std::string result;\n        replace_invalid(s.begin(), s.end(), std::back_inserter(result), replacement);\n        return result;\n    }\n\n    inline std::string replace_invalid(const std::string& s)\n    {\n        std::string result;\n        replace_invalid(s.begin(), s.end(), std::back_inserter(result));\n        return result;\n    }\n\n    inline bool starts_with_bom(const std::string& s)\n    {\n        return starts_with_bom(s.begin(), s.end());\n    }\n \n} // namespace utf8\n\n#endif // header guard\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/utf8cpp/utf8/unchecked.h",
    "content": "// Copyright 2006 Nemanja Trifunovic\n\n/*\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\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, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n*/\n\n\n#ifndef UTF8_FOR_CPP_UNCHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731\n#define UTF8_FOR_CPP_UNCHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731\n\n#include \"core.h\"\n\nnamespace utf8\n{\n    namespace unchecked\n    {\n        template <typename octet_iterator>\n        octet_iterator append(uint32_t cp, octet_iterator result)\n        {\n            if (cp < 0x80)                        // one octet\n                *(result++) = static_cast<uint8_t>(cp);\n            else if (cp < 0x800) {                // two octets\n                *(result++) = static_cast<uint8_t>((cp >> 6)          | 0xc0);\n                *(result++) = static_cast<uint8_t>((cp & 0x3f)        | 0x80);\n            }\n            else if (cp < 0x10000) {              // three octets\n                *(result++) = static_cast<uint8_t>((cp >> 12)         | 0xe0);\n                *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);\n                *(result++) = static_cast<uint8_t>((cp & 0x3f)        | 0x80);\n            }\n            else {                                // four octets\n                *(result++) = static_cast<uint8_t>((cp >> 18)         | 0xf0);\n                *(result++) = static_cast<uint8_t>(((cp >> 12) & 0x3f)| 0x80);\n                *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);\n                *(result++) = static_cast<uint8_t>((cp & 0x3f)        | 0x80);\n            }\n            return result;\n        }\n\n        template <typename octet_iterator, typename output_iterator>\n        output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out, uint32_t replacement)\n        {\n            while (start != end) {\n                octet_iterator sequence_start = start;\n                internal::utf_error err_code = utf8::internal::validate_next(start, end);\n                switch (err_code) {\n                    case internal::UTF8_OK :\n                        for (octet_iterator it = sequence_start; it != start; ++it)\n                            *out++ = *it;\n                        break;\n                    case internal::NOT_ENOUGH_ROOM:\n                        out = utf8::unchecked::append (replacement, out);\n                        start = end;\n                        break;\n                    case internal::INVALID_LEAD:\n                        out = utf8::unchecked::append (replacement, out);\n                        ++start;\n                        break;\n                    case internal::INCOMPLETE_SEQUENCE:\n                    case internal::OVERLONG_SEQUENCE:\n                    case internal::INVALID_CODE_POINT:\n                        out = utf8::unchecked::append (replacement, out);\n                        ++start;\n                        // just one replacement mark for the sequence\n                        while (start != end && utf8::internal::is_trail(*start))\n                            ++start;\n                        break;\n                }\n            }\n            return out;\n        }\n\n        template <typename octet_iterator, typename output_iterator>\n        inline output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out)\n        {\n            static const uint32_t replacement_marker = utf8::internal::mask16(0xfffd);\n            return utf8::unchecked::replace_invalid(start, end, out, replacement_marker);\n        }\n\n        template <typename octet_iterator>\n        uint32_t next(octet_iterator& it)\n        {\n            uint32_t cp = utf8::internal::mask8(*it);\n            typename std::iterator_traits<octet_iterator>::difference_type length = utf8::internal::sequence_length(it);\n            switch (length) {\n                case 1:\n                    break;\n                case 2:\n                    it++;\n                    cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f);\n                    break;\n                case 3:\n                    ++it; \n                    cp = ((cp << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff);\n                    ++it;\n                    cp += (*it) & 0x3f;\n                    break;\n                case 4:\n                    ++it;\n                    cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);                \n                    ++it;\n                    cp += (utf8::internal::mask8(*it) << 6) & 0xfff;\n                    ++it;\n                    cp += (*it) & 0x3f; \n                    break;\n            }\n            ++it;\n            return cp;\n        }\n\n        template <typename octet_iterator>\n        uint32_t peek_next(octet_iterator it)\n        {\n            return utf8::unchecked::next(it);\n        }\n\n        template <typename octet_iterator>\n        uint32_t prior(octet_iterator& it)\n        {\n            while (utf8::internal::is_trail(*(--it))) ;\n            octet_iterator temp = it;\n            return utf8::unchecked::next(temp);\n        }\n\n        template <typename octet_iterator, typename distance_type>\n        void advance (octet_iterator& it, distance_type n)\n        {\n            const distance_type zero(0);\n            if (n < zero) {\n                // backward\n                for (distance_type i = n; i < zero; ++i)\n                    utf8::unchecked::prior(it);\n            } else {\n                // forward\n                for (distance_type i = zero; i < n; ++i)\n                    utf8::unchecked::next(it);\n            }\n        }\n\n        template <typename octet_iterator>\n        typename std::iterator_traits<octet_iterator>::difference_type\n        distance (octet_iterator first, octet_iterator last)\n        {\n            typename std::iterator_traits<octet_iterator>::difference_type dist;\n            for (dist = 0; first < last; ++dist) \n                utf8::unchecked::next(first);\n            return dist;\n        }\n\n        template <typename u16bit_iterator, typename octet_iterator>\n        octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result)\n        {\n            while (start != end) {\n                uint32_t cp = utf8::internal::mask16(*start++);\n            // Take care of surrogate pairs first\n                if (utf8::internal::is_lead_surrogate(cp)) {\n                    uint32_t trail_surrogate = utf8::internal::mask16(*start++);\n                    cp = (cp << 10) + trail_surrogate + internal::SURROGATE_OFFSET;\n                }\n                result = utf8::unchecked::append(cp, result);\n            }\n            return result;\n        }\n\n        template <typename u16bit_iterator, typename octet_iterator>\n        u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result)\n        {\n            while (start < end) {\n                uint32_t cp = utf8::unchecked::next(start);\n                if (cp > 0xffff) { //make a surrogate pair\n                    *result++ = static_cast<uint16_t>((cp >> 10)   + internal::LEAD_OFFSET);\n                    *result++ = static_cast<uint16_t>((cp & 0x3ff) + internal::TRAIL_SURROGATE_MIN);\n                }\n                else\n                    *result++ = static_cast<uint16_t>(cp);\n            }\n            return result;\n        }\n\n        template <typename octet_iterator, typename u32bit_iterator>\n        octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result)\n        {\n            while (start != end)\n                result = utf8::unchecked::append(*(start++), result);\n\n            return result;\n        }\n\n        template <typename octet_iterator, typename u32bit_iterator>\n        u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result)\n        {\n            while (start < end)\n                (*result++) = utf8::unchecked::next(start);\n\n            return result;\n        }\n\n        // The iterator class\n        template <typename octet_iterator>\n          class iterator {\n            octet_iterator it;\n            public:\n            typedef uint32_t value_type;\n            typedef uint32_t* pointer;\n            typedef uint32_t& reference;\n            typedef std::ptrdiff_t difference_type;\n            typedef std::bidirectional_iterator_tag iterator_category;\n            iterator () {}\n            explicit iterator (const octet_iterator& octet_it): it(octet_it) {}\n            // the default \"big three\" are OK\n            octet_iterator base () const { return it; }\n            uint32_t operator * () const\n            {\n                octet_iterator temp = it;\n                return utf8::unchecked::next(temp);\n            }\n            bool operator == (const iterator& rhs) const \n            { \n                return (it == rhs.it);\n            }\n            bool operator != (const iterator& rhs) const\n            {\n                return !(operator == (rhs));\n            }\n            iterator& operator ++ () \n            {\n                ::std::advance(it, utf8::internal::sequence_length(it));\n                return *this;\n            }\n            iterator operator ++ (int)\n            {\n                iterator temp = *this;\n                ::std::advance(it, utf8::internal::sequence_length(it));\n                return temp;\n            }  \n            iterator& operator -- ()\n            {\n                utf8::unchecked::prior(it);\n                return *this;\n            }\n            iterator operator -- (int)\n            {\n                iterator temp = *this;\n                utf8::unchecked::prior(it);\n                return temp;\n            }\n          }; // class iterator\n\n    } // namespace utf8::unchecked\n} // namespace utf8 \n\n\n#endif // header guard\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/utf8cpp/utf8.h",
    "content": "// Copyright 2006 Nemanja Trifunovic\n\n/*\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\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, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n*/\n\n\n#ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731\n#define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731\n\n#include \"utf8/checked.h\"\n#include \"utf8/unchecked.h\"\n\n#endif // header guard\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/CMakeLists.txt",
    "content": "add_library(zlib STATIC)\nfile(GLOB_RECURSE zlib_SOURCES \"*.c\" \"*.h\")\ntarget_sources(zlib PRIVATE ${zlib_SOURCES})\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/adler32.c",
    "content": "/* adler32.c -- compute the Adler-32 checksum of a data stream\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#define ZLIB_INTERNAL\n#include \"zlib.h\"\n\n#define BASE 65521UL    /* largest prime smaller than 65536 */\n#define NMAX 5552\n/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */\n\n#define DO1(buf,i)  {s1 += buf[i]; s2 += s1;}\n#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);\n#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);\n#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);\n#define DO16(buf)   DO8(buf,0); DO8(buf,8);\n\n#ifdef NO_DIVIDE\n#  define MOD(a) \\\n    do { \\\n        if (a >= (BASE << 16)) a -= (BASE << 16); \\\n        if (a >= (BASE << 15)) a -= (BASE << 15); \\\n        if (a >= (BASE << 14)) a -= (BASE << 14); \\\n        if (a >= (BASE << 13)) a -= (BASE << 13); \\\n        if (a >= (BASE << 12)) a -= (BASE << 12); \\\n        if (a >= (BASE << 11)) a -= (BASE << 11); \\\n        if (a >= (BASE << 10)) a -= (BASE << 10); \\\n        if (a >= (BASE << 9)) a -= (BASE << 9); \\\n        if (a >= (BASE << 8)) a -= (BASE << 8); \\\n        if (a >= (BASE << 7)) a -= (BASE << 7); \\\n        if (a >= (BASE << 6)) a -= (BASE << 6); \\\n        if (a >= (BASE << 5)) a -= (BASE << 5); \\\n        if (a >= (BASE << 4)) a -= (BASE << 4); \\\n        if (a >= (BASE << 3)) a -= (BASE << 3); \\\n        if (a >= (BASE << 2)) a -= (BASE << 2); \\\n        if (a >= (BASE << 1)) a -= (BASE << 1); \\\n        if (a >= BASE) a -= BASE; \\\n    } while (0)\n#else\n#  define MOD(a) a %= BASE\n#endif\n\n/* ========================================================================= */\nuLong ZEXPORT adler32(adler, buf, len)\n    uLong adler;\n    const Bytef *buf;\n    uInt len;\n{\n    unsigned long s1 = adler & 0xffff;\n    unsigned long s2 = (adler >> 16) & 0xffff;\n    int k;\n\n    if (buf == Z_NULL) return 1L;\n\n    while (len > 0) {\n        k = len < NMAX ? (int)len : NMAX;\n        len -= k;\n        while (k >= 16) {\n            DO16(buf);\n            buf += 16;\n            k -= 16;\n        }\n        if (k != 0) do {\n            s1 += *buf++;\n            s2 += s1;\n        } while (--k);\n        MOD(s1);\n        MOD(s2);\n    }\n    return (s2 << 16) | s1;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/compress.c",
    "content": "/* compress.c -- compress a memory buffer\n * Copyright (C) 1995-2002 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#define ZLIB_INTERNAL\n#include \"zlib.h\"\n\n/* ===========================================================================\n     Compresses the source buffer into the destination buffer. The level\n   parameter has the same meaning as in deflateInit.  sourceLen is the byte\n   length of the source buffer. Upon entry, destLen is the total size of the\n   destination buffer, which must be at least 0.1% larger than sourceLen plus\n   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.\n\n     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_BUF_ERROR if there was not enough room in the output buffer,\n   Z_STREAM_ERROR if the level parameter is invalid.\n*/\nint ZEXPORT compress2 (dest, destLen, source, sourceLen, level)\n    Bytef *dest;\n    uLongf *destLen;\n    const Bytef *source;\n    uLong sourceLen;\n    int level;\n{\n    z_stream stream;\n    int err;\n\n    stream.next_in = (Bytef*)source;\n    stream.avail_in = (uInt)sourceLen;\n#ifdef MAXSEG_64K\n    /* Check for source > 64K on 16-bit machine: */\n    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;\n#endif\n    stream.next_out = dest;\n    stream.avail_out = (uInt)*destLen;\n    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;\n\n    stream.zalloc = (alloc_func)0;\n    stream.zfree = (free_func)0;\n    stream.opaque = (voidpf)0;\n\n    err = deflateInit(&stream, level);\n    if (err != Z_OK) return err;\n\n    err = deflate(&stream, Z_FINISH);\n    if (err != Z_STREAM_END) {\n        deflateEnd(&stream);\n        return err == Z_OK ? Z_BUF_ERROR : err;\n    }\n    *destLen = stream.total_out;\n\n    err = deflateEnd(&stream);\n    return err;\n}\n\n/* ===========================================================================\n */\nint ZEXPORT compress (dest, destLen, source, sourceLen)\n    Bytef *dest;\n    uLongf *destLen;\n    const Bytef *source;\n    uLong sourceLen;\n{\n    return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);\n}\n\n/* ===========================================================================\n     If the default memLevel or windowBits for deflateInit() is changed, then\n   this function needs to be updated.\n */\nuLong ZEXPORT compressBound (sourceLen)\n    uLong sourceLen;\n{\n    return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/crc32.c",
    "content": "/* crc32.c -- compute the CRC-32 of a data stream\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n *\n * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster\n * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing\n * tables for updating the shift register in one step with three exclusive-ors\n * instead of four steps with four exclusive-ors.  This results about a factor\n * of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.\n */\n\n/* @(#) $Id$ */\n\n#ifdef MAKECRCH\n#  include <stdio.h>\n#  ifndef DYNAMIC_CRC_TABLE\n#    define DYNAMIC_CRC_TABLE\n#  endif /* !DYNAMIC_CRC_TABLE */\n#endif /* MAKECRCH */\n\n#include \"zutil.h\"      /* for STDC and FAR definitions */\n\n#define local static\n\n/* Find a four-byte integer type for crc32_little() and crc32_big(). */\n#ifndef NOBYFOUR\n#  ifdef STDC           /* need ANSI C limits.h to determine sizes */\n#    include <limits.h>\n#    define BYFOUR\n#    if (UINT_MAX == 0xffffffffUL)\n       typedef unsigned int u4;\n#    else\n#      if (ULONG_MAX == 0xffffffffUL)\n         typedef unsigned long u4;\n#      else\n#        if (USHRT_MAX == 0xffffffffUL)\n           typedef unsigned short u4;\n#        else\n#          undef BYFOUR     /* can't find a four-byte integer type! */\n#        endif\n#      endif\n#    endif\n#  endif /* STDC */\n#endif /* !NOBYFOUR */\n\n/* Definitions for doing the crc four data bytes at a time. */\n#ifdef BYFOUR\n#  define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \\\n                (((w)&0xff00)<<8)+(((w)&0xff)<<24))\n   local unsigned long crc32_little OF((unsigned long,\n                        const unsigned char FAR *, unsigned));\n   local unsigned long crc32_big OF((unsigned long,\n                        const unsigned char FAR *, unsigned));\n#  define TBLS 8\n#else\n#  define TBLS 1\n#endif /* BYFOUR */\n\n#ifdef DYNAMIC_CRC_TABLE\n\nlocal int crc_table_empty = 1;\nlocal unsigned long FAR crc_table[TBLS][256];\nlocal void make_crc_table OF((void));\n#ifdef MAKECRCH\n   local void write_table OF((FILE *, const unsigned long FAR *));\n#endif /* MAKECRCH */\n\n/*\n  Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:\n  x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.\n\n  Polynomials over GF(2) are represented in binary, one bit per coefficient,\n  with the lowest powers in the most significant bit.  Then adding polynomials\n  is just exclusive-or, and multiplying a polynomial by x is a right shift by\n  one.  If we call the above polynomial p, and represent a byte as the\n  polynomial q, also with the lowest power in the most significant bit (so the\n  byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,\n  where a mod b means the remainder after dividing a by b.\n\n  This calculation is done using the shift-register method of multiplying and\n  taking the remainder.  The register is initialized to zero, and for each\n  incoming bit, x^32 is added mod p to the register if the bit is a one (where\n  x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by\n  x (which is shifting right by one and adding x^32 mod p if the bit shifted\n  out is a one).  We start with the highest power (least significant bit) of\n  q and repeat for all eight bits of q.\n\n  The first table is simply the CRC of all possible eight bit values.  This is\n  all the information needed to generate CRCs on data a byte at a time for all\n  combinations of CRC register values and incoming bytes.  The remaining tables\n  allow for word-at-a-time CRC calculation for both big-endian and little-\n  endian machines, where a word is four bytes.\n*/\nlocal void make_crc_table()\n{\n    unsigned long c;\n    int n, k;\n    unsigned long poly;            /* polynomial exclusive-or pattern */\n    /* terms of polynomial defining this crc (except x^32): */\n    static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};\n\n    /* make exclusive-or pattern from polynomial (0xedb88320UL) */\n    poly = 0UL;\n    for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)\n        poly |= 1UL << (31 - p[n]);\n\n    /* generate a crc for every 8-bit value */\n    for (n = 0; n < 256; n++) {\n        c = (unsigned long)n;\n        for (k = 0; k < 8; k++)\n            c = c & 1 ? poly ^ (c >> 1) : c >> 1;\n        crc_table[0][n] = c;\n    }\n\n#ifdef BYFOUR\n    /* generate crc for each value followed by one, two, and three zeros, and\n       then the byte reversal of those as well as the first table */\n    for (n = 0; n < 256; n++) {\n        c = crc_table[0][n];\n        crc_table[4][n] = REV(c);\n        for (k = 1; k < 4; k++) {\n            c = crc_table[0][c & 0xff] ^ (c >> 8);\n            crc_table[k][n] = c;\n            crc_table[k + 4][n] = REV(c);\n        }\n    }\n#endif /* BYFOUR */\n\n  crc_table_empty = 0;\n\n#ifdef MAKECRCH\n    /* write out CRC tables to crc32.h */\n    {\n        FILE *out;\n\n        out = fopen(\"crc32.h\", \"w\");\n        if (out == NULL) return;\n        fprintf(out, \"/* crc32.h -- tables for rapid CRC calculation\\n\");\n        fprintf(out, \" * Generated automatically by crc32.c\\n */\\n\\n\");\n        fprintf(out, \"local const unsigned long FAR \");\n        fprintf(out, \"crc_table[TBLS][256] =\\n{\\n  {\\n\");\n        write_table(out, crc_table[0]);\n#  ifdef BYFOUR\n        fprintf(out, \"#ifdef BYFOUR\\n\");\n        for (k = 1; k < 8; k++) {\n            fprintf(out, \"  },\\n  {\\n\");\n            write_table(out, crc_table[k]);\n        }\n        fprintf(out, \"#endif\\n\");\n#  endif /* BYFOUR */\n        fprintf(out, \"  }\\n};\\n\");\n        fclose(out);\n    }\n#endif /* MAKECRCH */\n}\n\n#ifdef MAKECRCH\nlocal void write_table(out, table)\n    FILE *out;\n    const unsigned long FAR *table;\n{\n    int n;\n\n    for (n = 0; n < 256; n++)\n        fprintf(out, \"%s0x%08lxUL%s\", n % 5 ? \"\" : \"    \", table[n],\n                n == 255 ? \"\\n\" : (n % 5 == 4 ? \",\\n\" : \", \"));\n}\n#endif /* MAKECRCH */\n\n#else /* !DYNAMIC_CRC_TABLE */\n/* ========================================================================\n * Tables of CRC-32s of all single-byte values, made by make_crc_table().\n */\n#include \"crc32.h\"\n#endif /* DYNAMIC_CRC_TABLE */\n\n/* =========================================================================\n * This function can be used by asm versions of crc32()\n */\nconst unsigned long FAR * ZEXPORT get_crc_table()\n{\n#ifdef DYNAMIC_CRC_TABLE\n  if (crc_table_empty) make_crc_table();\n#endif /* DYNAMIC_CRC_TABLE */\n  return (const unsigned long FAR *)crc_table;\n}\n\n/* ========================================================================= */\n#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)\n#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1\n\n/* ========================================================================= */\nunsigned long ZEXPORT crc32(crc, buf, len)\n    unsigned long crc;\n    const unsigned char FAR *buf;\n    unsigned len;\n{\n    if (buf == Z_NULL) return 0UL;\n\n#ifdef DYNAMIC_CRC_TABLE\n    if (crc_table_empty)\n        make_crc_table();\n#endif /* DYNAMIC_CRC_TABLE */\n\n#ifdef BYFOUR\n    if (sizeof(void *) == sizeof(ptrdiff_t)) {\n        u4 endian;\n\n        endian = 1;\n        if (*((unsigned char *)(&endian)))\n            return crc32_little(crc, buf, len);\n        else\n            return crc32_big(crc, buf, len);\n    }\n#endif /* BYFOUR */\n    crc = crc ^ 0xffffffffUL;\n    while (len >= 8) {\n        DO8;\n        len -= 8;\n    }\n    if (len) do {\n        DO1;\n    } while (--len);\n    return crc ^ 0xffffffffUL;\n}\n\n#ifdef BYFOUR\n\n/* ========================================================================= */\n#define DOLIT4 c ^= *buf4++; \\\n        c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \\\n            crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]\n#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4\n\n/* ========================================================================= */\nlocal unsigned long crc32_little(crc, buf, len)\n    unsigned long crc;\n    const unsigned char FAR *buf;\n    unsigned len;\n{\n    register u4 c;\n    register const u4 FAR *buf4;\n\n    c = (u4)crc;\n    c = ~c;\n    while (len && ((ptrdiff_t)buf & 3)) {\n        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);\n        len--;\n    }\n\n    buf4 = (const u4 FAR *)buf;\n    while (len >= 32) {\n        DOLIT32;\n        len -= 32;\n    }\n    while (len >= 4) {\n        DOLIT4;\n        len -= 4;\n    }\n    buf = (const unsigned char FAR *)buf4;\n\n    if (len) do {\n        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);\n    } while (--len);\n    c = ~c;\n    return (unsigned long)c;\n}\n\n/* ========================================================================= */\n#define DOBIG4 c ^= *++buf4; \\\n        c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \\\n            crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]\n#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4\n\n/* ========================================================================= */\nlocal unsigned long crc32_big(crc, buf, len)\n    unsigned long crc;\n    const unsigned char FAR *buf;\n    unsigned len;\n{\n    register u4 c;\n    register const u4 FAR *buf4;\n\n    c = REV((u4)crc);\n    c = ~c;\n    while (len && ((ptrdiff_t)buf & 3)) {\n        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);\n        len--;\n    }\n\n    buf4 = (const u4 FAR *)buf;\n    buf4--;\n    while (len >= 32) {\n        DOBIG32;\n        len -= 32;\n    }\n    while (len >= 4) {\n        DOBIG4;\n        len -= 4;\n    }\n    buf4++;\n    buf = (const unsigned char FAR *)buf4;\n\n    if (len) do {\n        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);\n    } while (--len);\n    c = ~c;\n    return (unsigned long)(REV(c));\n}\n\n#endif /* BYFOUR */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/crc32.h",
    "content": "/* crc32.h -- tables for rapid CRC calculation\n * Generated automatically by crc32.c\n */\n\nlocal const unsigned long FAR crc_table[TBLS][256] =\n{\n  {\n    0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,\n    0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,\n    0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,\n    0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,\n    0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,\n    0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,\n    0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,\n    0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,\n    0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,\n    0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,\n    0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,\n    0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,\n    0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,\n    0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,\n    0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,\n    0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,\n    0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,\n    0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,\n    0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,\n    0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,\n    0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,\n    0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,\n    0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,\n    0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,\n    0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,\n    0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,\n    0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,\n    0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,\n    0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,\n    0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,\n    0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,\n    0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,\n    0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,\n    0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,\n    0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,\n    0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,\n    0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,\n    0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,\n    0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,\n    0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,\n    0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,\n    0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,\n    0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,\n    0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,\n    0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,\n    0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,\n    0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,\n    0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,\n    0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,\n    0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,\n    0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,\n    0x2d02ef8dUL\n#ifdef BYFOUR\n  },\n  {\n    0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,\n    0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,\n    0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,\n    0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,\n    0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,\n    0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,\n    0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,\n    0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,\n    0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,\n    0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,\n    0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,\n    0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,\n    0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,\n    0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,\n    0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,\n    0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,\n    0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,\n    0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,\n    0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,\n    0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,\n    0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,\n    0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,\n    0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,\n    0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,\n    0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,\n    0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,\n    0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,\n    0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,\n    0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,\n    0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,\n    0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,\n    0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,\n    0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,\n    0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,\n    0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,\n    0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,\n    0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,\n    0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,\n    0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,\n    0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,\n    0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,\n    0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,\n    0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,\n    0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,\n    0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,\n    0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,\n    0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,\n    0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,\n    0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,\n    0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,\n    0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,\n    0x9324fd72UL\n  },\n  {\n    0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,\n    0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,\n    0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,\n    0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,\n    0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,\n    0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,\n    0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,\n    0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,\n    0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,\n    0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,\n    0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,\n    0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,\n    0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,\n    0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,\n    0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,\n    0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,\n    0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,\n    0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,\n    0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,\n    0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,\n    0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,\n    0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,\n    0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,\n    0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,\n    0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,\n    0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,\n    0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,\n    0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,\n    0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,\n    0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,\n    0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,\n    0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,\n    0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,\n    0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,\n    0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,\n    0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,\n    0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,\n    0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,\n    0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,\n    0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,\n    0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,\n    0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,\n    0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,\n    0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,\n    0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,\n    0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,\n    0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,\n    0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,\n    0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,\n    0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,\n    0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,\n    0xbe9834edUL\n  },\n  {\n    0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,\n    0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,\n    0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,\n    0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,\n    0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,\n    0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,\n    0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,\n    0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,\n    0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,\n    0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,\n    0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,\n    0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,\n    0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,\n    0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,\n    0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,\n    0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,\n    0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,\n    0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,\n    0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,\n    0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,\n    0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,\n    0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,\n    0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,\n    0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,\n    0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,\n    0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,\n    0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,\n    0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,\n    0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,\n    0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,\n    0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,\n    0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,\n    0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,\n    0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,\n    0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,\n    0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,\n    0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,\n    0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,\n    0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,\n    0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,\n    0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,\n    0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,\n    0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,\n    0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,\n    0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,\n    0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,\n    0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,\n    0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,\n    0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,\n    0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,\n    0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,\n    0xde0506f1UL\n  },\n  {\n    0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,\n    0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,\n    0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,\n    0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,\n    0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,\n    0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,\n    0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,\n    0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,\n    0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,\n    0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,\n    0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,\n    0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,\n    0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,\n    0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,\n    0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,\n    0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,\n    0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,\n    0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,\n    0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,\n    0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,\n    0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,\n    0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,\n    0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,\n    0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,\n    0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,\n    0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,\n    0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,\n    0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,\n    0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,\n    0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,\n    0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,\n    0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,\n    0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,\n    0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,\n    0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,\n    0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,\n    0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,\n    0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,\n    0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,\n    0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,\n    0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,\n    0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,\n    0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,\n    0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,\n    0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,\n    0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,\n    0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,\n    0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,\n    0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,\n    0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,\n    0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,\n    0x8def022dUL\n  },\n  {\n    0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,\n    0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,\n    0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,\n    0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,\n    0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,\n    0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,\n    0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,\n    0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,\n    0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,\n    0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,\n    0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,\n    0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,\n    0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,\n    0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,\n    0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,\n    0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,\n    0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,\n    0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,\n    0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,\n    0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,\n    0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,\n    0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,\n    0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,\n    0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,\n    0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,\n    0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,\n    0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,\n    0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,\n    0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,\n    0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,\n    0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,\n    0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,\n    0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,\n    0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,\n    0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,\n    0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,\n    0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,\n    0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,\n    0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,\n    0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,\n    0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,\n    0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,\n    0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,\n    0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,\n    0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,\n    0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,\n    0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,\n    0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,\n    0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,\n    0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,\n    0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,\n    0x72fd2493UL\n  },\n  {\n    0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,\n    0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,\n    0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,\n    0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,\n    0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,\n    0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,\n    0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,\n    0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,\n    0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,\n    0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,\n    0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,\n    0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,\n    0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,\n    0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,\n    0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,\n    0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,\n    0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,\n    0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,\n    0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,\n    0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,\n    0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,\n    0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,\n    0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,\n    0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,\n    0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,\n    0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,\n    0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,\n    0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,\n    0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,\n    0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,\n    0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,\n    0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,\n    0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,\n    0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,\n    0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,\n    0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,\n    0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,\n    0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,\n    0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,\n    0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,\n    0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,\n    0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,\n    0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,\n    0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,\n    0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,\n    0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,\n    0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,\n    0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,\n    0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,\n    0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,\n    0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,\n    0xed3498beUL\n  },\n  {\n    0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,\n    0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,\n    0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,\n    0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,\n    0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,\n    0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,\n    0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,\n    0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,\n    0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,\n    0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,\n    0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,\n    0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,\n    0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,\n    0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,\n    0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,\n    0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,\n    0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,\n    0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,\n    0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,\n    0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,\n    0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,\n    0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,\n    0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,\n    0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,\n    0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,\n    0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,\n    0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,\n    0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,\n    0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,\n    0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,\n    0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,\n    0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,\n    0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,\n    0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,\n    0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,\n    0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,\n    0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,\n    0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,\n    0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,\n    0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,\n    0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,\n    0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,\n    0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,\n    0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,\n    0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,\n    0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,\n    0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,\n    0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,\n    0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,\n    0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,\n    0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,\n    0xf10605deUL\n#endif\n  }\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/crypt.h",
    "content": "/* crypt.h -- base code for crypt/uncrypt ZIPfile\n\n\n   Version 1.01e, February 12th, 2005\n\n   Copyright (C) 1998-2005 Gilles Vollant\n\n   This code is a modified version of crypting code in Infozip distribution\n\n   The encryption/decryption parts of this source code (as opposed to the\n   non-echoing password parts) were originally written in Europe.  The\n   whole source package can be freely distributed, including from the USA.\n   (Prior to January 2000, re-export from the US was a violation of US law.)\n\n   This encryption code is a direct transcription of the algorithm from\n   Roger Schlafly, described by Phil Katz in the file appnote.txt.  This\n   file (appnote.txt) is distributed with the PKZIP program (even in the\n   version without encryption capabilities).\n\n   If you don't need crypting in your application, just define symbols\n   NOCRYPT and NOUNCRYPT.\n\n   This code support the \"Traditional PKWARE Encryption\".\n\n   The new AES encryption added on Zip format by Winzip (see the page\n   http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong\n   Encryption is not supported.\n*/\n\n#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))\n\n/***********************************************************************\n * Return the next byte in the pseudo-random sequence\n */\nstatic int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)\n{\n    unsigned temp;  /* POTENTIAL BUG:  temp*(temp^1) may overflow in an\n                     * unpredictable manner on 16-bit systems; not a problem\n                     * with any known compiler so far, though */\n\n    temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;\n    return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);\n}\n\n/***********************************************************************\n * Update the encryption keys with the next byte of plain text\n */\nstatic int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)\n{\n    (*(pkeys+0)) = CRC32((*(pkeys+0)), c);\n    (*(pkeys+1)) += (*(pkeys+0)) & 0xff;\n    (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;\n    {\n      register int keyshift = (int)((*(pkeys+1)) >> 24);\n      (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);\n    }\n    return c;\n}\n\n\n/***********************************************************************\n * Initialize the encryption keys and the random header according to\n * the given password.\n */\nstatic void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)\n{\n    *(pkeys+0) = 305419896L;\n    *(pkeys+1) = 591751049L;\n    *(pkeys+2) = 878082192L;\n    while (*passwd != '\\0') {\n        update_keys(pkeys,pcrc_32_tab,(int)*passwd);\n        passwd++;\n    }\n}\n\n#define zdecode(pkeys,pcrc_32_tab,c) \\\n    (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))\n\n#define zencode(pkeys,pcrc_32_tab,c,t) \\\n    (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))\n\n#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED\n\n#define RAND_HEAD_LEN  12\n   /* \"last resort\" source for second part of crypt seed pattern */\n#  ifndef ZCR_SEED2\n#    define ZCR_SEED2 3141592654UL     /* use PI as default pattern */\n#  endif\n\nstatic int crypthead(const char* passwd,      /* password string */\n                     unsigned char* buf,      /* where to write header */\n                     int bufSize,\n                     unsigned long* pkeys,\n                     const unsigned long* pcrc_32_tab,\n                     unsigned long crcForCrypting)\n{\n    int n;                       /* index in random header */\n    int t;                       /* temporary */\n    int c;                       /* random byte */\n    unsigned char header[RAND_HEAD_LEN-2]; /* random header */\n    static unsigned calls = 0;   /* ensure different random header each time */\n\n    if (bufSize<RAND_HEAD_LEN)\n      return 0;\n\n    /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the\n     * output of rand() to get less predictability, since rand() is\n     * often poorly implemented.\n     */\n    if (++calls == 1)\n    {\n        srand((unsigned)(time(NULL) ^ ZCR_SEED2));\n    }\n    init_keys(passwd, pkeys, pcrc_32_tab);\n    for (n = 0; n < RAND_HEAD_LEN-2; n++)\n    {\n        c = (rand() >> 7) & 0xff;\n        header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);\n    }\n    /* Encrypt random header (last two bytes is high word of crc) */\n    init_keys(passwd, pkeys, pcrc_32_tab);\n    for (n = 0; n < RAND_HEAD_LEN-2; n++)\n    {\n        buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);\n    }\n    buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);\n    buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);\n    return n;\n}\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/deflate.c",
    "content": "/* deflate.c -- compress data using the deflation algorithm\n * Copyright (C) 1995-2003 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/*\n *  ALGORITHM\n *\n *      The \"deflation\" process depends on being able to identify portions\n *      of the input text which are identical to earlier input (within a\n *      sliding window trailing behind the input currently being processed).\n *\n *      The most straightforward technique turns out to be the fastest for\n *      most input files: try all possible matches and select the longest.\n *      The key feature of this algorithm is that insertions into the string\n *      dictionary are very simple and thus fast, and deletions are avoided\n *      completely. Insertions are performed at each input character, whereas\n *      string matches are performed only when the previous match ends. So it\n *      is preferable to spend more time in matches to allow very fast string\n *      insertions and avoid deletions. The matching algorithm for small\n *      strings is inspired from that of Rabin & Karp. A brute force approach\n *      is used to find longer strings when a small match has been found.\n *      A similar algorithm is used in comic (by Jan-Mark Wams) and freeze\n *      (by Leonid Broukhis).\n *         A previous version of this file used a more sophisticated algorithm\n *      (by Fiala and Greene) which is guaranteed to run in linear amortized\n *      time, but has a larger average cost, uses more memory and is patented.\n *      However the F&G algorithm may be faster for some highly redundant\n *      files if the parameter max_chain_length (described below) is too large.\n *\n *  ACKNOWLEDGEMENTS\n *\n *      The idea of lazy evaluation of matches is due to Jan-Mark Wams, and\n *      I found it in 'freeze' written by Leonid Broukhis.\n *      Thanks to many people for bug reports and testing.\n *\n *  REFERENCES\n *\n *      Deutsch, L.P.,\"DEFLATE Compressed Data Format Specification\".\n *      Available in http://www.ietf.org/rfc/rfc1951.txt\n *\n *      A description of the Rabin and Karp algorithm is given in the book\n *         \"Algorithms\" by R. Sedgewick, Addison-Wesley, p252.\n *\n *      Fiala,E.R., and Greene,D.H.\n *         Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595\n *\n */\n\n/* @(#) $Id$ */\n\n#include \"deflate.h\"\n\nconst char deflate_copyright[] =\n   \" deflate 1.2.1 Copyright 1995-2003 Jean-loup Gailly \";\n/*\n  If you use the zlib library in a product, an acknowledgment is welcome\n  in the documentation of your product. If for some reason you cannot\n  include such an acknowledgment, I would appreciate that you keep this\n  copyright string in the executable of your product.\n */\n\n/* ===========================================================================\n *  Function prototypes.\n */\ntypedef enum {\n    need_more,      /* block not completed, need more input or more output */\n    block_done,     /* block flush performed */\n    finish_started, /* finish started, need only more output at next deflate */\n    finish_done     /* finish done, accept no more input or output */\n} block_state;\n\ntypedef block_state (*compress_func) OF((deflate_state *s, int flush));\n/* Compression function. Returns the block state after the call. */\n\nlocal void fill_window    OF((deflate_state *s));\nlocal block_state deflate_stored OF((deflate_state *s, int flush));\nlocal block_state deflate_fast   OF((deflate_state *s, int flush));\n#ifndef FASTEST\nlocal block_state deflate_slow   OF((deflate_state *s, int flush));\n#endif\nlocal void lm_init        OF((deflate_state *s));\nlocal void putShortMSB    OF((deflate_state *s, uInt b));\nlocal void flush_pending  OF((z_streamp strm));\nlocal int read_buf        OF((z_streamp strm, Bytef *buf, unsigned size));\n#ifndef FASTEST\n#ifdef ASMV\n      void match_init OF((void)); /* asm code initialization */\n      uInt longest_match  OF((deflate_state *s, IPos cur_match));\n#else\nlocal uInt longest_match  OF((deflate_state *s, IPos cur_match));\n#endif\n#endif\nlocal uInt longest_match_fast OF((deflate_state *s, IPos cur_match));\n\n#ifdef DEBUG\nlocal  void check_match OF((deflate_state *s, IPos start, IPos match,\n                            int length));\n#endif\n\n/* ===========================================================================\n * Local data\n */\n\n#define NIL 0\n/* Tail of hash chains */\n\n#ifndef TOO_FAR\n#  define TOO_FAR 4096\n#endif\n/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */\n\n#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)\n/* Minimum amount of lookahead, except at the end of the input file.\n * See deflate.c for comments about the MIN_MATCH+1.\n */\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\ntypedef struct config_s {\n   ush good_length; /* reduce lazy search above this match length */\n   ush max_lazy;    /* do not perform lazy search above this match length */\n   ush nice_length; /* quit search above this match length */\n   ush max_chain;\n   compress_func func;\n} config;\n\n#ifdef FASTEST\nlocal const config configuration_table[2] = {\n/*      good lazy nice chain */\n/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */\n/* 1 */ {4,    4,  8,    4, deflate_fast}}; /* max speed, no lazy matches */\n#else\nlocal const config configuration_table[10] = {\n/*      good lazy nice chain */\n/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */\n/* 1 */ {4,    4,  8,    4, deflate_fast}, /* max speed, no lazy matches */\n/* 2 */ {4,    5, 16,    8, deflate_fast},\n/* 3 */ {4,    6, 32,   32, deflate_fast},\n\n/* 4 */ {4,    4, 16,   16, deflate_slow},  /* lazy matches */\n/* 5 */ {8,   16, 32,   32, deflate_slow},\n/* 6 */ {8,   16, 128, 128, deflate_slow},\n/* 7 */ {8,   32, 128, 256, deflate_slow},\n/* 8 */ {32, 128, 258, 1024, deflate_slow},\n/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */\n#endif\n\n/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4\n * For deflate_fast() (levels <= 3) good is ignored and lazy has a different\n * meaning.\n */\n\n#define EQUAL 0\n/* result of memcmp for equal strings */\n\n#ifndef NO_DUMMY_DECL\nstruct static_tree_desc_s {int dummy;}; /* for buggy compilers */\n#endif\n\n/* ===========================================================================\n * Update a hash value with the given input byte\n * IN  assertion: all calls to to UPDATE_HASH are made with consecutive\n *    input characters, so that a running hash key can be computed from the\n *    previous key instead of complete recalculation each time.\n */\n#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)\n\n\n/* ===========================================================================\n * Insert string str in the dictionary and set match_head to the previous head\n * of the hash chain (the most recent string with same hash key). Return\n * the previous length of the hash chain.\n * If this file is compiled with -DFASTEST, the compression level is forced\n * to 1, and no hash chains are maintained.\n * IN  assertion: all calls to to INSERT_STRING are made with consecutive\n *    input characters and the first MIN_MATCH bytes of str are valid\n *    (except for the last MIN_MATCH-1 bytes of the input file).\n */\n#ifdef FASTEST\n#define INSERT_STRING(s, str, match_head) \\\n   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \\\n    match_head = s->head[s->ins_h], \\\n    s->head[s->ins_h] = (Pos)(str))\n#else\n#define INSERT_STRING(s, str, match_head) \\\n   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \\\n    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \\\n    s->head[s->ins_h] = (Pos)(str))\n#endif\n\n/* ===========================================================================\n * Initialize the hash table (avoiding 64K overflow for 16 bit systems).\n * prev[] will be initialized on the fly.\n */\n#define CLEAR_HASH(s) \\\n    s->head[s->hash_size-1] = NIL; \\\n    zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));\n\n/* ========================================================================= */\nint ZEXPORT deflateInit_(strm, level, version, stream_size)\n    z_streamp strm;\n    int level;\n    const char *version;\n    int stream_size;\n{\n    return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,\n                         Z_DEFAULT_STRATEGY, version, stream_size);\n    /* To do: ignore strm->next_in if we use it as window */\n}\n\n/* ========================================================================= */\nint ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,\n                  version, stream_size)\n    z_streamp strm;\n    int  level;\n    int  method;\n    int  windowBits;\n    int  memLevel;\n    int  strategy;\n    const char *version;\n    int stream_size;\n{\n    deflate_state *s;\n    int wrap = 1;\n    static const char my_version[] = ZLIB_VERSION;\n\n    ushf *overlay;\n    /* We overlay pending_buf and d_buf+l_buf. This works since the average\n     * output size for (length,distance) codes is <= 24 bits.\n     */\n\n    if (version == Z_NULL || version[0] != my_version[0] ||\n        stream_size != sizeof(z_stream)) {\n        return Z_VERSION_ERROR;\n    }\n    if (strm == Z_NULL) return Z_STREAM_ERROR;\n\n    strm->msg = Z_NULL;\n    if (strm->zalloc == (alloc_func)0) {\n        strm->zalloc = zcalloc;\n        strm->opaque = (voidpf)0;\n    }\n    if (strm->zfree == (free_func)0) strm->zfree = zcfree;\n\n#ifdef FASTEST\n    if (level != 0) level = 1;\n#else\n    if (level == Z_DEFAULT_COMPRESSION) level = 6;\n#endif\n\n    if (windowBits < 0) { /* suppress zlib wrapper */\n        wrap = 0;\n        windowBits = -windowBits;\n    }\n#ifdef GZIP\n    else if (windowBits > 15) {\n        wrap = 2;       /* write gzip wrapper instead */\n        windowBits -= 16;\n    }\n#endif\n    if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||\n        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n        strategy < 0 || strategy > Z_RLE) {\n        return Z_STREAM_ERROR;\n    }\n    if (windowBits == 8) windowBits = 9;  /* until 256-byte window bug fixed */\n    s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));\n    if (s == Z_NULL) return Z_MEM_ERROR;\n    strm->state = (struct internal_state FAR *)s;\n    s->strm = strm;\n\n    s->wrap = wrap;\n    s->w_bits = windowBits;\n    s->w_size = 1 << s->w_bits;\n    s->w_mask = s->w_size - 1;\n\n    s->hash_bits = memLevel + 7;\n    s->hash_size = 1 << s->hash_bits;\n    s->hash_mask = s->hash_size - 1;\n    s->hash_shift =  ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);\n\n    s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));\n    s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));\n    s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));\n\n    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n    overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n    s->pending_buf = (uchf *) overlay;\n    s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);\n\n    if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||\n        s->pending_buf == Z_NULL) {\n        s->status = FINISH_STATE;\n        strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);\n        deflateEnd (strm);\n        return Z_MEM_ERROR;\n    }\n    s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n    s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n\n    s->level = level;\n    s->strategy = strategy;\n    s->method = (Byte)method;\n\n    return deflateReset(strm);\n}\n\n/* ========================================================================= */\nint ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)\n    z_streamp strm;\n    const Bytef *dictionary;\n    uInt  dictLength;\n{\n    deflate_state *s;\n    uInt length = dictLength;\n    uInt n;\n    IPos hash_head = 0;\n\n    if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||\n        strm->state->wrap == 2 ||\n        (strm->state->wrap == 1 && strm->state->status != INIT_STATE))\n        return Z_STREAM_ERROR;\n\n    s = strm->state;\n    if (s->wrap)\n        strm->adler = adler32(strm->adler, dictionary, dictLength);\n\n    if (length < MIN_MATCH) return Z_OK;\n    if (length > MAX_DIST(s)) {\n        length = MAX_DIST(s);\n#ifndef USE_DICT_HEAD\n        dictionary += dictLength - length; /* use the tail of the dictionary */\n#endif\n    }\n    zmemcpy(s->window, dictionary, length);\n    s->strstart = length;\n    s->block_start = (long)length;\n\n    /* Insert all strings in the hash table (except for the last two bytes).\n     * s->lookahead stays null, so s->ins_h will be recomputed at the next\n     * call of fill_window.\n     */\n    s->ins_h = s->window[0];\n    UPDATE_HASH(s, s->ins_h, s->window[1]);\n    for (n = 0; n <= length - MIN_MATCH; n++) {\n        INSERT_STRING(s, n, hash_head);\n    }\n    if (hash_head) hash_head = 0;  /* to make compiler happy */\n    return Z_OK;\n}\n\n/* ========================================================================= */\nint ZEXPORT deflateReset (strm)\n    z_streamp strm;\n{\n    deflate_state *s;\n\n    if (strm == Z_NULL || strm->state == Z_NULL ||\n        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {\n        return Z_STREAM_ERROR;\n    }\n\n    strm->total_in = strm->total_out = 0;\n    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */\n    strm->data_type = Z_UNKNOWN;\n\n    s = (deflate_state *)strm->state;\n    s->pending = 0;\n    s->pending_out = s->pending_buf;\n\n    if (s->wrap < 0) {\n        s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */\n    }\n    s->status = s->wrap ? INIT_STATE : BUSY_STATE;\n    strm->adler =\n#ifdef GZIP\n        s->wrap == 2 ? crc32(0L, Z_NULL, 0) :\n#endif\n        adler32(0L, Z_NULL, 0);\n    s->last_flush = Z_NO_FLUSH;\n\n    _tr_init(s);\n    lm_init(s);\n\n    return Z_OK;\n}\n\n/* ========================================================================= */\nint ZEXPORT deflatePrime (strm, bits, value)\n    z_streamp strm;\n    int bits;\n    int value;\n{\n    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;\n    strm->state->bi_valid = bits;\n    strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));\n    return Z_OK;\n}\n\n/* ========================================================================= */\nint ZEXPORT deflateParams(strm, level, strategy)\n    z_streamp strm;\n    int level;\n    int strategy;\n{\n    deflate_state *s;\n    compress_func func;\n    int err = Z_OK;\n\n    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;\n    s = strm->state;\n\n#ifdef FASTEST\n    if (level != 0) level = 1;\n#else\n    if (level == Z_DEFAULT_COMPRESSION) level = 6;\n#endif\n    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_RLE) {\n        return Z_STREAM_ERROR;\n    }\n    func = configuration_table[s->level].func;\n\n    if (func != configuration_table[level].func && strm->total_in != 0) {\n        /* Flush the last buffer: */\n        err = deflate(strm, Z_PARTIAL_FLUSH);\n    }\n    if (s->level != level) {\n        s->level = level;\n        s->max_lazy_match   = configuration_table[level].max_lazy;\n        s->good_match       = configuration_table[level].good_length;\n        s->nice_match       = configuration_table[level].nice_length;\n        s->max_chain_length = configuration_table[level].max_chain;\n    }\n    s->strategy = strategy;\n    return err;\n}\n\n/* =========================================================================\n * For the default windowBits of 15 and memLevel of 8, this function returns\n * a close to exact, as well as small, upper bound on the compressed size.\n * They are coded as constants here for a reason--if the #define's are\n * changed, then this function needs to be changed as well.  The return\n * value for 15 and 8 only works for those exact settings.\n *\n * For any setting other than those defaults for windowBits and memLevel,\n * the value returned is a conservative worst case for the maximum expansion\n * resulting from using fixed blocks instead of stored blocks, which deflate\n * can emit on compressed data for some combinations of the parameters.\n *\n * This function could be more sophisticated to provide closer upper bounds\n * for every combination of windowBits and memLevel, as well as wrap.\n * But even the conservative upper bound of about 14% expansion does not\n * seem onerous for output buffer allocation.\n */\nuLong ZEXPORT deflateBound(strm, sourceLen)\n    z_streamp strm;\n    uLong sourceLen;\n{\n    deflate_state *s;\n    uLong destLen;\n\n    /* conservative upper bound */\n    destLen = sourceLen +\n              ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;\n\n    /* if can't get parameters, return conservative bound */\n    if (strm == Z_NULL || strm->state == Z_NULL)\n        return destLen;\n\n    /* if not default parameters, return conservative bound */\n    s = strm->state;\n    if (s->w_bits != 15 || s->hash_bits != 8 + 7)\n        return destLen;\n\n    /* default settings: return tight bound for that case */\n    return compressBound(sourceLen);\n}\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nlocal void putShortMSB (s, b)\n    deflate_state *s;\n    uInt b;\n{\n    put_byte(s, (Byte)(b >> 8));\n    put_byte(s, (Byte)(b & 0xff));\n}\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->next_out buffer and copying into it.\n * (See also read_buf()).\n */\nlocal void flush_pending(strm)\n    z_streamp strm;\n{\n    unsigned len = strm->state->pending;\n\n    if (len > strm->avail_out) len = strm->avail_out;\n    if (len == 0) return;\n\n    zmemcpy(strm->next_out, strm->state->pending_out, len);\n    strm->next_out  += len;\n    strm->state->pending_out  += len;\n    strm->total_out += len;\n    strm->avail_out  -= len;\n    strm->state->pending -= len;\n    if (strm->state->pending == 0) {\n        strm->state->pending_out = strm->state->pending_buf;\n    }\n}\n\n/* ========================================================================= */\nint ZEXPORT deflate (strm, flush)\n    z_streamp strm;\n    int flush;\n{\n    int old_flush; /* value of flush param for previous deflate call */\n    deflate_state *s;\n\n    if (strm == Z_NULL || strm->state == Z_NULL ||\n        flush > Z_FINISH || flush < 0) {\n        return Z_STREAM_ERROR;\n    }\n    s = strm->state;\n\n    if (strm->next_out == Z_NULL ||\n        (strm->next_in == Z_NULL && strm->avail_in != 0) ||\n        (s->status == FINISH_STATE && flush != Z_FINISH)) {\n        ERR_RETURN(strm, Z_STREAM_ERROR);\n    }\n    if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);\n\n    s->strm = strm; /* just in case */\n    old_flush = s->last_flush;\n    s->last_flush = flush;\n\n    /* Write the header */\n    if (s->status == INIT_STATE) {\n#ifdef GZIP\n        if (s->wrap == 2) {\n            put_byte(s, 31);\n            put_byte(s, 139);\n            put_byte(s, 8);\n            put_byte(s, 0);\n            put_byte(s, 0);\n            put_byte(s, 0);\n            put_byte(s, 0);\n            put_byte(s, 0);\n            put_byte(s, s->level == 9 ? 2 :\n                        (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?\n                         4 : 0));\n            put_byte(s, 255);\n            s->status = BUSY_STATE;\n            strm->adler = crc32(0L, Z_NULL, 0);\n        }\n        else\n#endif\n        {\n            uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;\n            uInt level_flags;\n\n            if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)\n                level_flags = 0;\n            else if (s->level < 6)\n                level_flags = 1;\n            else if (s->level == 6)\n                level_flags = 2;\n            else\n                level_flags = 3;\n            header |= (level_flags << 6);\n            if (s->strstart != 0) header |= PRESET_DICT;\n            header += 31 - (header % 31);\n\n            s->status = BUSY_STATE;\n            putShortMSB(s, header);\n\n            /* Save the adler32 of the preset dictionary: */\n            if (s->strstart != 0) {\n                putShortMSB(s, (uInt)(strm->adler >> 16));\n                putShortMSB(s, (uInt)(strm->adler & 0xffff));\n            }\n            strm->adler = adler32(0L, Z_NULL, 0);\n        }\n    }\n\n    /* Flush as much pending output as possible */\n    if (s->pending != 0) {\n        flush_pending(strm);\n        if (strm->avail_out == 0) {\n            /* Since avail_out is 0, deflate will be called again with\n             * more output space, but possibly with both pending and\n             * avail_in equal to zero. There won't be anything to do,\n             * but this is not an error situation so make sure we\n             * return OK instead of BUF_ERROR at next call of deflate:\n             */\n            s->last_flush = -1;\n            return Z_OK;\n        }\n\n    /* Make sure there is something to do and avoid duplicate consecutive\n     * flushes. For repeated and useless calls with Z_FINISH, we keep\n     * returning Z_STREAM_END instead of Z_BUF_ERROR.\n     */\n    } else if (strm->avail_in == 0 && flush <= old_flush &&\n               flush != Z_FINISH) {\n        ERR_RETURN(strm, Z_BUF_ERROR);\n    }\n\n    /* User must not provide more input after the first FINISH: */\n    if (s->status == FINISH_STATE && strm->avail_in != 0) {\n        ERR_RETURN(strm, Z_BUF_ERROR);\n    }\n\n    /* Start a new block or continue the current one.\n     */\n    if (strm->avail_in != 0 || s->lookahead != 0 ||\n        (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {\n        block_state bstate;\n\n        bstate = (*(configuration_table[s->level].func))(s, flush);\n\n        if (bstate == finish_started || bstate == finish_done) {\n            s->status = FINISH_STATE;\n        }\n        if (bstate == need_more || bstate == finish_started) {\n            if (strm->avail_out == 0) {\n                s->last_flush = -1; /* avoid BUF_ERROR next call, see above */\n            }\n            return Z_OK;\n            /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n             * of deflate should use the same flush parameter to make sure\n             * that the flush is complete. So we don't have to output an\n             * empty block here, this will be done at next call. This also\n             * ensures that for a very small output buffer, we emit at most\n             * one empty block.\n             */\n        }\n        if (bstate == block_done) {\n            if (flush == Z_PARTIAL_FLUSH) {\n                _tr_align(s);\n            } else { /* FULL_FLUSH or SYNC_FLUSH */\n                _tr_stored_block(s, (char*)0, 0L, 0);\n                /* For a full flush, this empty block will be recognized\n                 * as a special marker by inflate_sync().\n                 */\n                if (flush == Z_FULL_FLUSH) {\n                    CLEAR_HASH(s);             /* forget history */\n                }\n            }\n            flush_pending(strm);\n            if (strm->avail_out == 0) {\n              s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n              return Z_OK;\n            }\n        }\n    }\n    Assert(strm->avail_out > 0, \"bug2\");\n\n    if (flush != Z_FINISH) return Z_OK;\n    if (s->wrap <= 0) return Z_STREAM_END;\n\n    /* Write the trailer */\n#ifdef GZIP\n    if (s->wrap == 2) {\n        put_byte(s, (Byte)(strm->adler & 0xff));\n        put_byte(s, (Byte)((strm->adler >> 8) & 0xff));\n        put_byte(s, (Byte)((strm->adler >> 16) & 0xff));\n        put_byte(s, (Byte)((strm->adler >> 24) & 0xff));\n        put_byte(s, (Byte)(strm->total_in & 0xff));\n        put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));\n        put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));\n        put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));\n    }\n    else\n#endif\n    {\n        putShortMSB(s, (uInt)(strm->adler >> 16));\n        putShortMSB(s, (uInt)(strm->adler & 0xffff));\n    }\n    flush_pending(strm);\n    /* If avail_out is zero, the application will call deflate again\n     * to flush the rest.\n     */\n    if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */\n    return s->pending != 0 ? Z_OK : Z_STREAM_END;\n}\n\n/* ========================================================================= */\nint ZEXPORT deflateEnd (strm)\n    z_streamp strm;\n{\n    int status;\n\n    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;\n\n    status = strm->state->status;\n    if (status != INIT_STATE && status != BUSY_STATE &&\n        status != FINISH_STATE) {\n      return Z_STREAM_ERROR;\n    }\n\n    /* Deallocate in reverse order of allocations: */\n    TRY_FREE(strm, strm->state->pending_buf);\n    TRY_FREE(strm, strm->state->head);\n    TRY_FREE(strm, strm->state->prev);\n    TRY_FREE(strm, strm->state->window);\n\n    ZFREE(strm, strm->state);\n    strm->state = Z_NULL;\n\n    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n}\n\n/* =========================================================================\n * Copy the source state to the destination state.\n * To simplify the source, this is not supported for 16-bit MSDOS (which\n * doesn't have enough memory anyway to duplicate compression states).\n */\nint ZEXPORT deflateCopy (dest, source)\n    z_streamp dest;\n    z_streamp source;\n{\n#ifdef MAXSEG_64K\n    return Z_STREAM_ERROR;\n#else\n    deflate_state *ds;\n    deflate_state *ss;\n    ushf *overlay;\n\n\n    if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {\n        return Z_STREAM_ERROR;\n    }\n\n    ss = source->state;\n\n    *dest = *source;\n\n    ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));\n    if (ds == Z_NULL) return Z_MEM_ERROR;\n    dest->state = (struct internal_state FAR *) ds;\n    *ds = *ss;\n    ds->strm = dest;\n\n    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));\n    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));\n    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));\n    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);\n    ds->pending_buf = (uchf *) overlay;\n\n    if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||\n        ds->pending_buf == Z_NULL) {\n        deflateEnd (dest);\n        return Z_MEM_ERROR;\n    }\n    /* following zmemcpy do not work for 16-bit MSDOS */\n    zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));\n    zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));\n    zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));\n    zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);\n\n    ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);\n    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);\n    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;\n\n    ds->l_desc.dyn_tree = ds->dyn_ltree;\n    ds->d_desc.dyn_tree = ds->dyn_dtree;\n    ds->bl_desc.dyn_tree = ds->bl_tree;\n\n    return Z_OK;\n#endif /* MAXSEG_64K */\n}\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read.  All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->next_in buffer and copying from it.\n * (See also flush_pending()).\n */\nlocal int read_buf(strm, buf, size)\n    z_streamp strm;\n    Bytef *buf;\n    unsigned size;\n{\n    unsigned len = strm->avail_in;\n\n    if (len > size) len = size;\n    if (len == 0) return 0;\n\n    strm->avail_in  -= len;\n\n    if (strm->state->wrap == 1) {\n        strm->adler = adler32(strm->adler, strm->next_in, len);\n    }\n#ifdef GZIP\n    else if (strm->state->wrap == 2) {\n        strm->adler = crc32(strm->adler, strm->next_in, len);\n    }\n#endif\n    zmemcpy(buf, strm->next_in, len);\n    strm->next_in  += len;\n    strm->total_in += len;\n\n    return (int)len;\n}\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nlocal void lm_init (s)\n    deflate_state *s;\n{\n    s->window_size = (ulg)2L*s->w_size;\n\n    CLEAR_HASH(s);\n\n    /* Set the default configuration parameters:\n     */\n    s->max_lazy_match   = configuration_table[s->level].max_lazy;\n    s->good_match       = configuration_table[s->level].good_length;\n    s->nice_match       = configuration_table[s->level].nice_length;\n    s->max_chain_length = configuration_table[s->level].max_chain;\n\n    s->strstart = 0;\n    s->block_start = 0L;\n    s->lookahead = 0;\n    s->match_length = s->prev_length = MIN_MATCH-1;\n    s->match_available = 0;\n    s->ins_h = 0;\n#ifdef ASMV\n    match_init(); /* initialize the asm code */\n#endif\n}\n\n#ifndef FASTEST\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\n#ifndef ASMV\n/* For 80x86 and 680x0, an optimized version will be provided in match.asm or\n * match.S. The code will be functionally equivalent.\n */\nlocal uInt longest_match(s, cur_match)\n    deflate_state *s;\n    IPos cur_match;                             /* current match */\n{\n    unsigned chain_length = s->max_chain_length;/* max hash chain length */\n    register Bytef *scan = s->window + s->strstart; /* current string */\n    register Bytef *match;                       /* matched string */\n    register int len;                           /* length of current match */\n    int best_len = s->prev_length;              /* best match length so far */\n    int nice_match = s->nice_match;             /* stop if match long enough */\n    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?\n        s->strstart - (IPos)MAX_DIST(s) : NIL;\n    /* Stop when cur_match becomes <= limit. To simplify the code,\n     * we prevent matches with the string of window index 0.\n     */\n    Posf *prev = s->prev;\n    uInt wmask = s->w_mask;\n\n#ifdef UNALIGNED_OK\n    /* Compare two bytes at a time. Note: this is not always beneficial.\n     * Try with and without -DUNALIGNED_OK to check.\n     */\n    register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;\n    register ush scan_start = *(ushf*)scan;\n    register ush scan_end   = *(ushf*)(scan+best_len-1);\n#else\n    register Bytef *strend = s->window + s->strstart + MAX_MATCH;\n    register Byte scan_end1  = scan[best_len-1];\n    register Byte scan_end   = scan[best_len];\n#endif\n\n    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n     * It is easy to get rid of this optimization if necessary.\n     */\n    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n    /* Do not waste too much time if we already have a good match: */\n    if (s->prev_length >= s->good_match) {\n        chain_length >>= 2;\n    }\n    /* Do not look for matches beyond the end of the input. This is necessary\n     * to make deflate deterministic.\n     */\n    if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;\n\n    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n    do {\n        Assert(cur_match < s->strstart, \"no future\");\n        match = s->window + cur_match;\n\n        /* Skip to next match if the match length cannot increase\n         * or if the match length is less than 2:\n         */\n#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)\n        /* This code assumes sizeof(unsigned short) == 2. Do not use\n         * UNALIGNED_OK if your compiler uses a different size.\n         */\n        if (*(ushf*)(match+best_len-1) != scan_end ||\n            *(ushf*)match != scan_start) continue;\n\n        /* It is not necessary to compare scan[2] and match[2] since they are\n         * always equal when the other bytes match, given that the hash keys\n         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at\n         * strstart+3, +5, ... up to strstart+257. We check for insufficient\n         * lookahead only every 4th comparison; the 128th check will be made\n         * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is\n         * necessary to put more guard bytes at the end of the window, or\n         * to check more often for insufficient lookahead.\n         */\n        Assert(scan[2] == match[2], \"scan[2]?\");\n        scan++, match++;\n        do {\n        } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&\n                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&\n                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&\n                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&\n                 scan < strend);\n        /* The funny \"do {}\" generates better code on most compilers */\n\n        /* Here, scan <= window+strstart+257 */\n        Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n        if (*scan == *match) scan++;\n\n        len = (MAX_MATCH - 1) - (int)(strend-scan);\n        scan = strend - (MAX_MATCH-1);\n\n#else /* UNALIGNED_OK */\n\n        if (match[best_len]   != scan_end  ||\n            match[best_len-1] != scan_end1 ||\n            *match            != *scan     ||\n            *++match          != scan[1])      continue;\n\n        /* The check at best_len-1 can be removed because it will be made\n         * again later. (This heuristic is not always a win.)\n         * It is not necessary to compare scan[2] and match[2] since they\n         * are always equal when the other bytes match, given that\n         * the hash keys are equal and that HASH_BITS >= 8.\n         */\n        scan += 2, match++;\n        Assert(*scan == *match, \"match[2]?\");\n\n        /* We check for insufficient lookahead only every 8th comparison;\n         * the 256th check will be made at strstart+258.\n         */\n        do {\n        } while (*++scan == *++match && *++scan == *++match &&\n                 *++scan == *++match && *++scan == *++match &&\n                 *++scan == *++match && *++scan == *++match &&\n                 *++scan == *++match && *++scan == *++match &&\n                 scan < strend);\n\n        Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n        len = MAX_MATCH - (int)(strend - scan);\n        scan = strend - MAX_MATCH;\n\n#endif /* UNALIGNED_OK */\n\n        if (len > best_len) {\n            s->match_start = cur_match;\n            best_len = len;\n            if (len >= nice_match) break;\n#ifdef UNALIGNED_OK\n            scan_end = *(ushf*)(scan+best_len-1);\n#else\n            scan_end1  = scan[best_len-1];\n            scan_end   = scan[best_len];\n#endif\n        }\n    } while ((cur_match = prev[cur_match & wmask]) > limit\n             && --chain_length != 0);\n\n    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;\n    return s->lookahead;\n}\n#endif /* ASMV */\n#endif /* FASTEST */\n\n/* ---------------------------------------------------------------------------\n * Optimized version for level == 1 or strategy == Z_RLE only\n */\nlocal uInt longest_match_fast(s, cur_match)\n    deflate_state *s;\n    IPos cur_match;                             /* current match */\n{\n    register Bytef *scan = s->window + s->strstart; /* current string */\n    register Bytef *match;                       /* matched string */\n    register int len;                           /* length of current match */\n    register Bytef *strend = s->window + s->strstart + MAX_MATCH;\n\n    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n     * It is easy to get rid of this optimization if necessary.\n     */\n    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n    Assert(cur_match < s->strstart, \"no future\");\n\n    match = s->window + cur_match;\n\n    /* Return failure if the match length is less than 2:\n     */\n    if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;\n\n    /* The check at best_len-1 can be removed because it will be made\n     * again later. (This heuristic is not always a win.)\n     * It is not necessary to compare scan[2] and match[2] since they\n     * are always equal when the other bytes match, given that\n     * the hash keys are equal and that HASH_BITS >= 8.\n     */\n    scan += 2, match += 2;\n    Assert(*scan == *match, \"match[2]?\");\n\n    /* We check for insufficient lookahead only every 8th comparison;\n     * the 256th check will be made at strstart+258.\n     */\n    do {\n    } while (*++scan == *++match && *++scan == *++match &&\n             *++scan == *++match && *++scan == *++match &&\n             *++scan == *++match && *++scan == *++match &&\n             *++scan == *++match && *++scan == *++match &&\n             scan < strend);\n\n    Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n    len = MAX_MATCH - (int)(strend - scan);\n\n    if (len < MIN_MATCH) return MIN_MATCH - 1;\n\n    s->match_start = cur_match;\n    return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;\n}\n\n#ifdef DEBUG\n/* ===========================================================================\n * Check that the match at match_start is indeed a match.\n */\nlocal void check_match(s, start, match, length)\n    deflate_state *s;\n    IPos start, match;\n    int length;\n{\n    /* check that the match is indeed a match */\n    if (zmemcmp(s->window + match,\n                s->window + start, length) != EQUAL) {\n        fprintf(stderr, \" start %u, match %u, length %d\\n\",\n                start, match, length);\n        do {\n            fprintf(stderr, \"%c%c\", s->window[match++], s->window[start++]);\n        } while (--length != 0);\n        z_error(\"invalid match\");\n    }\n    if (z_verbose > 1) {\n        fprintf(stderr,\"\\\\[%d,%d]\", start-match, length);\n        do { putc(s->window[start++], stderr); } while (--length != 0);\n    }\n}\n#else\n#  define check_match(s, start, match, length)\n#endif /* DEBUG */\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n *    At least one byte has been read, or avail_in == 0; reads are\n *    performed for at least two bytes (required for the zip translate_eol\n *    option -- not supported here).\n */\nlocal void fill_window(s)\n    deflate_state *s;\n{\n    register unsigned n, m;\n    register Posf *p;\n    unsigned more;    /* Amount of free space at the end of the window. */\n    uInt wsize = s->w_size;\n\n    do {\n        more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);\n\n        /* Deal with !@#$% 64K limit: */\n        if (sizeof(int) <= 2) {\n            if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n                more = wsize;\n\n            } else if (more == (unsigned)(-1)) {\n                /* Very unlikely, but possible on 16 bit machine if\n                 * strstart == 0 && lookahead == 1 (input done a byte at time)\n                 */\n                more--;\n            }\n        }\n\n        /* If the window is almost full and there is insufficient lookahead,\n         * move the upper half to the lower one to make room in the upper half.\n         */\n        if (s->strstart >= wsize+MAX_DIST(s)) {\n\n            zmemcpy(s->window, s->window+wsize, (unsigned)wsize);\n            s->match_start -= wsize;\n            s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */\n            s->block_start -= (long) wsize;\n\n            /* Slide the hash table (could be avoided with 32 bit values\n               at the expense of memory usage). We slide even when level == 0\n               to keep the hash table consistent if we switch back to level > 0\n               later. (Using level 0 permanently is not an optimal usage of\n               zlib, so we don't care about this pathological case.)\n             */\n            n = s->hash_size;\n            p = &s->head[n];\n            do {\n                m = *--p;\n                *p = (Pos)(m >= wsize ? m-wsize : NIL);\n            } while (--n);\n\n            n = wsize;\n#ifndef FASTEST\n            p = &s->prev[n];\n            do {\n                m = *--p;\n                *p = (Pos)(m >= wsize ? m-wsize : NIL);\n                /* If n is not on any hash chain, prev[n] is garbage but\n                 * its value will never be used.\n                 */\n            } while (--n);\n#endif\n            more += wsize;\n        }\n        if (s->strm->avail_in == 0) return;\n\n        /* If there was no sliding:\n         *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n         *    more == window_size - lookahead - strstart\n         * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n         * => more >= window_size - 2*WSIZE + 2\n         * In the BIG_MEM or MMAP case (not yet supported),\n         *   window_size == input_size + MIN_LOOKAHEAD  &&\n         *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n         * Otherwise, window_size == 2*WSIZE so more >= 2.\n         * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n         */\n        Assert(more >= 2, \"more < 2\");\n\n        n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);\n        s->lookahead += n;\n\n        /* Initialize the hash value now that we have some input: */\n        if (s->lookahead >= MIN_MATCH) {\n            s->ins_h = s->window[s->strstart];\n            UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);\n#if MIN_MATCH != 3\n            Call UPDATE_HASH() MIN_MATCH-3 more times\n#endif\n        }\n        /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n         * but this is not important since only literal bytes will be emitted.\n         */\n\n    } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);\n}\n\n/* ===========================================================================\n * Flush the current block, with given end-of-file flag.\n * IN assertion: strstart is set to the end of the current match.\n */\n#define FLUSH_BLOCK_ONLY(s, eof) { \\\n   _tr_flush_block(s, (s->block_start >= 0L ? \\\n                   (charf *)&s->window[(unsigned)s->block_start] : \\\n                   (charf *)Z_NULL), \\\n                (ulg)((long)s->strstart - s->block_start), \\\n                (eof)); \\\n   s->block_start = s->strstart; \\\n   flush_pending(s->strm); \\\n   Tracev((stderr,\"[FLUSH]\")); \\\n}\n\n/* Same but force premature exit if necessary. */\n#define FLUSH_BLOCK(s, eof) { \\\n   FLUSH_BLOCK_ONLY(s, eof); \\\n   if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \\\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nlocal block_state deflate_stored(s, flush)\n    deflate_state *s;\n    int flush;\n{\n    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n     * to pending_buf_size, and each stored block has a 5 byte header:\n     */\n    ulg max_block_size = 0xffff;\n    ulg max_start;\n\n    if (max_block_size > s->pending_buf_size - 5) {\n        max_block_size = s->pending_buf_size - 5;\n    }\n\n    /* Copy as much as possible from input to output: */\n    for (;;) {\n        /* Fill the window as much as possible: */\n        if (s->lookahead <= 1) {\n\n            Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n                   s->block_start >= (long)s->w_size, \"slide too late\");\n\n            fill_window(s);\n            if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;\n\n            if (s->lookahead == 0) break; /* flush the current block */\n        }\n        Assert(s->block_start >= 0L, \"block gone\");\n\n        s->strstart += s->lookahead;\n        s->lookahead = 0;\n\n        /* Emit a stored block if pending_buf will be full: */\n        max_start = s->block_start + max_block_size;\n        if (s->strstart == 0 || (ulg)s->strstart >= max_start) {\n            /* strstart == 0 is possible when wraparound on 16-bit machine */\n            s->lookahead = (uInt)(s->strstart - max_start);\n            s->strstart = (uInt)max_start;\n            FLUSH_BLOCK(s, 0);\n        }\n        /* Flush if we may have to slide, otherwise block_start may become\n         * negative and the data will be gone:\n         */\n        if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {\n            FLUSH_BLOCK(s, 0);\n        }\n    }\n    FLUSH_BLOCK(s, flush == Z_FINISH);\n    return flush == Z_FINISH ? finish_done : block_done;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nlocal block_state deflate_fast(s, flush)\n    deflate_state *s;\n    int flush;\n{\n    IPos hash_head = NIL; /* head of the hash chain */\n    int bflush;           /* set if current block must be flushed */\n\n    for (;;) {\n        /* Make sure that we always have enough lookahead, except\n         * at the end of the input file. We need MAX_MATCH bytes\n         * for the next match, plus MIN_MATCH bytes to insert the\n         * string following the next match.\n         */\n        if (s->lookahead < MIN_LOOKAHEAD) {\n            fill_window(s);\n            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n                return need_more;\n            }\n            if (s->lookahead == 0) break; /* flush the current block */\n        }\n\n        /* Insert the string window[strstart .. strstart+2] in the\n         * dictionary, and set hash_head to the head of the hash chain:\n         */\n        if (s->lookahead >= MIN_MATCH) {\n            INSERT_STRING(s, s->strstart, hash_head);\n        }\n\n        /* Find the longest match, discarding those <= prev_length.\n         * At this point we have always match_length < MIN_MATCH\n         */\n        if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {\n            /* To simplify the code, we prevent matches with the string\n             * of window index 0 (in particular we have to avoid a match\n             * of the string with itself at the start of the input file).\n             */\n#ifdef FASTEST\n            if ((s->strategy < Z_HUFFMAN_ONLY) ||\n                (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {\n                s->match_length = longest_match_fast (s, hash_head);\n            }\n#else\n            if (s->strategy < Z_HUFFMAN_ONLY) {\n                s->match_length = longest_match (s, hash_head);\n            } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {\n                s->match_length = longest_match_fast (s, hash_head);\n            }\n#endif\n            /* longest_match() or longest_match_fast() sets match_start */\n        }\n        if (s->match_length >= MIN_MATCH) {\n            check_match(s, s->strstart, s->match_start, s->match_length);\n\n            _tr_tally_dist(s, s->strstart - s->match_start,\n                           s->match_length - MIN_MATCH, bflush);\n\n            s->lookahead -= s->match_length;\n\n            /* Insert new strings in the hash table only if the match length\n             * is not too large. This saves time but degrades compression.\n             */\n#ifndef FASTEST\n            if (s->match_length <= s->max_insert_length &&\n                s->lookahead >= MIN_MATCH) {\n                s->match_length--; /* string at strstart already in table */\n                do {\n                    s->strstart++;\n                    INSERT_STRING(s, s->strstart, hash_head);\n                    /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n                     * always MIN_MATCH bytes ahead.\n                     */\n                } while (--s->match_length != 0);\n                s->strstart++;\n            } else\n#endif\n            {\n                s->strstart += s->match_length;\n                s->match_length = 0;\n                s->ins_h = s->window[s->strstart];\n                UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);\n#if MIN_MATCH != 3\n                Call UPDATE_HASH() MIN_MATCH-3 more times\n#endif\n                /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n                 * matter since it will be recomputed at next deflate call.\n                 */\n            }\n        } else {\n            /* No match, output a literal byte */\n            Tracevv((stderr,\"%c\", s->window[s->strstart]));\n            _tr_tally_lit (s, s->window[s->strstart], bflush);\n            s->lookahead--;\n            s->strstart++;\n        }\n        if (bflush) FLUSH_BLOCK(s, 0);\n    }\n    FLUSH_BLOCK(s, flush == Z_FINISH);\n    return flush == Z_FINISH ? finish_done : block_done;\n}\n\n#ifndef FASTEST\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nlocal block_state deflate_slow(s, flush)\n    deflate_state *s;\n    int flush;\n{\n    IPos hash_head = NIL;    /* head of hash chain */\n    int bflush;              /* set if current block must be flushed */\n\n    /* Process the input block. */\n    for (;;) {\n        /* Make sure that we always have enough lookahead, except\n         * at the end of the input file. We need MAX_MATCH bytes\n         * for the next match, plus MIN_MATCH bytes to insert the\n         * string following the next match.\n         */\n        if (s->lookahead < MIN_LOOKAHEAD) {\n            fill_window(s);\n            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n                return need_more;\n            }\n            if (s->lookahead == 0) break; /* flush the current block */\n        }\n\n        /* Insert the string window[strstart .. strstart+2] in the\n         * dictionary, and set hash_head to the head of the hash chain:\n         */\n        if (s->lookahead >= MIN_MATCH) {\n            INSERT_STRING(s, s->strstart, hash_head);\n        }\n\n        /* Find the longest match, discarding those <= prev_length.\n         */\n        s->prev_length = s->match_length, s->prev_match = s->match_start;\n        s->match_length = MIN_MATCH-1;\n\n        if (hash_head != NIL && s->prev_length < s->max_lazy_match &&\n            s->strstart - hash_head <= MAX_DIST(s)) {\n            /* To simplify the code, we prevent matches with the string\n             * of window index 0 (in particular we have to avoid a match\n             * of the string with itself at the start of the input file).\n             */\n            if (s->strategy < Z_HUFFMAN_ONLY) {\n                s->match_length = longest_match (s, hash_head);\n            } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {\n                s->match_length = longest_match_fast (s, hash_head);\n            }\n            /* longest_match() or longest_match_fast() sets match_start */\n\n            if (s->match_length <= 5 && (s->strategy == Z_FILTERED\n#if TOO_FAR <= 32767\n                || (s->match_length == MIN_MATCH &&\n                    s->strstart - s->match_start > TOO_FAR)\n#endif\n                )) {\n\n                /* If prev_match is also MIN_MATCH, match_start is garbage\n                 * but we will ignore the current match anyway.\n                 */\n                s->match_length = MIN_MATCH-1;\n            }\n        }\n        /* If there was a match at the previous step and the current\n         * match is not better, output the previous match:\n         */\n        if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {\n            uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;\n            /* Do not insert strings in hash table beyond this. */\n\n            check_match(s, s->strstart-1, s->prev_match, s->prev_length);\n\n            _tr_tally_dist(s, s->strstart -1 - s->prev_match,\n                           s->prev_length - MIN_MATCH, bflush);\n\n            /* Insert in hash table all strings up to the end of the match.\n             * strstart-1 and strstart are already inserted. If there is not\n             * enough lookahead, the last two strings are not inserted in\n             * the hash table.\n             */\n            s->lookahead -= s->prev_length-1;\n            s->prev_length -= 2;\n            do {\n                if (++s->strstart <= max_insert) {\n                    INSERT_STRING(s, s->strstart, hash_head);\n                }\n            } while (--s->prev_length != 0);\n            s->match_available = 0;\n            s->match_length = MIN_MATCH-1;\n            s->strstart++;\n\n            if (bflush) FLUSH_BLOCK(s, 0);\n\n        } else if (s->match_available) {\n            /* If there was no match at the previous position, output a\n             * single literal. If there was a match but the current match\n             * is longer, truncate the previous match to a single literal.\n             */\n            Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n            _tr_tally_lit(s, s->window[s->strstart-1], bflush);\n            if (bflush) {\n                FLUSH_BLOCK_ONLY(s, 0);\n            }\n            s->strstart++;\n            s->lookahead--;\n            if (s->strm->avail_out == 0) return need_more;\n        } else {\n            /* There is no previous match to compare with, wait for\n             * the next step to decide.\n             */\n            s->match_available = 1;\n            s->strstart++;\n            s->lookahead--;\n        }\n    }\n    Assert (flush != Z_NO_FLUSH, \"no flush?\");\n    if (s->match_available) {\n        Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n        _tr_tally_lit(s, s->window[s->strstart-1], bflush);\n        s->match_available = 0;\n    }\n    FLUSH_BLOCK(s, flush == Z_FINISH);\n    return flush == Z_FINISH ? finish_done : block_done;\n}\n#endif /* FASTEST */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/deflate.h",
    "content": "/* deflate.h -- internal compression state\n * Copyright (C) 1995-2002 Jean-loup Gailly\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\n/* @(#) $Id$ */\n\n#ifndef DEFLATE_H\n#define DEFLATE_H\n\n#include \"zutil.h\"\n\n/* define NO_GZIP when compiling if you want to disable gzip header and\n   trailer creation by deflate().  NO_GZIP would be used to avoid linking in\n   the crc code when it is not needed.  For shared libraries, gzip encoding\n   should be left enabled. */\n#ifndef NO_GZIP\n#  define GZIP\n#endif\n\n/* ===========================================================================\n * Internal compression state.\n */\n\n#define LENGTH_CODES 29\n/* number of length codes, not counting the special END_BLOCK code */\n\n#define LITERALS  256\n/* number of literal bytes 0..255 */\n\n#define L_CODES (LITERALS+1+LENGTH_CODES)\n/* number of Literal or Length codes, including the END_BLOCK code */\n\n#define D_CODES   30\n/* number of distance codes */\n\n#define BL_CODES  19\n/* number of codes used to transfer the bit lengths */\n\n#define HEAP_SIZE (2*L_CODES+1)\n/* maximum heap size */\n\n#define MAX_BITS 15\n/* All codes must not exceed MAX_BITS bits */\n\n#define INIT_STATE    42\n#define BUSY_STATE   113\n#define FINISH_STATE 666\n/* Stream status */\n\n\n/* Data structure describing a single value and its code string. */\ntypedef struct ct_data_s {\n    union {\n        ush  freq;       /* frequency count */\n        ush  code;       /* bit string */\n    } fc;\n    union {\n        ush  dad;        /* father node in Huffman tree */\n        ush  len;        /* length of bit string */\n    } dl;\n} FAR ct_data;\n\n#define Freq fc.freq\n#define Code fc.code\n#define Dad  dl.dad\n#define Len  dl.len\n\ntypedef struct static_tree_desc_s  static_tree_desc;\n\ntypedef struct tree_desc_s {\n    ct_data *dyn_tree;           /* the dynamic tree */\n    int     max_code;            /* largest code with non zero frequency */\n    static_tree_desc *stat_desc; /* the corresponding static tree */\n} FAR tree_desc;\n\ntypedef ush Pos;\ntypedef Pos FAR Posf;\ntypedef unsigned IPos;\n\n/* A Pos is an index in the character window. We use short instead of int to\n * save space in the various tables. IPos is used only for parameter passing.\n */\n\ntypedef struct internal_state {\n    z_streamp strm;      /* pointer back to this zlib stream */\n    int   status;        /* as the name implies */\n    Bytef *pending_buf;  /* output still pending */\n    ulg   pending_buf_size; /* size of pending_buf */\n    Bytef *pending_out;  /* next pending byte to output to the stream */\n    int   pending;       /* nb of bytes in the pending buffer */\n    int   wrap;          /* bit 0 true for zlib, bit 1 true for gzip */\n    Byte  data_type;     /* UNKNOWN, BINARY or ASCII */\n    Byte  method;        /* STORED (for zip only) or DEFLATED */\n    int   last_flush;    /* value of flush param for previous deflate call */\n\n                /* used by deflate.c: */\n\n    uInt  w_size;        /* LZ77 window size (32K by default) */\n    uInt  w_bits;        /* log2(w_size)  (8..16) */\n    uInt  w_mask;        /* w_size - 1 */\n\n    Bytef *window;\n    /* Sliding window. Input bytes are read into the second half of the window,\n     * and move to the first half later to keep a dictionary of at least wSize\n     * bytes. With this organization, matches are limited to a distance of\n     * wSize-MAX_MATCH bytes, but this ensures that IO is always\n     * performed with a length multiple of the block size. Also, it limits\n     * the window size to 64K, which is quite useful on MSDOS.\n     * To do: use the user input buffer as sliding window.\n     */\n\n    ulg window_size;\n    /* Actual size of window: 2*wSize, except when the user input buffer\n     * is directly used as sliding window.\n     */\n\n    Posf *prev;\n    /* Link to older string with same hash index. To limit the size of this\n     * array to 64K, this link is maintained only for the last 32K strings.\n     * An index in this array is thus a window index modulo 32K.\n     */\n\n    Posf *head; /* Heads of the hash chains or NIL. */\n\n    uInt  ins_h;          /* hash index of string to be inserted */\n    uInt  hash_size;      /* number of elements in hash table */\n    uInt  hash_bits;      /* log2(hash_size) */\n    uInt  hash_mask;      /* hash_size-1 */\n\n    uInt  hash_shift;\n    /* Number of bits by which ins_h must be shifted at each input\n     * step. It must be such that after MIN_MATCH steps, the oldest\n     * byte no longer takes part in the hash key, that is:\n     *   hash_shift * MIN_MATCH >= hash_bits\n     */\n\n    long block_start;\n    /* Window position at the beginning of the current output block. Gets\n     * negative when the window is moved backwards.\n     */\n\n    uInt match_length;           /* length of best match */\n    IPos prev_match;             /* previous match */\n    int match_available;         /* set if previous match exists */\n    uInt strstart;               /* start of string to insert */\n    uInt match_start;            /* start of matching string */\n    uInt lookahead;              /* number of valid bytes ahead in window */\n\n    uInt prev_length;\n    /* Length of the best match at previous step. Matches not greater than this\n     * are discarded. This is used in the lazy match evaluation.\n     */\n\n    uInt max_chain_length;\n    /* To speed up deflation, hash chains are never searched beyond this\n     * length.  A higher limit improves compression ratio but degrades the\n     * speed.\n     */\n\n    uInt max_lazy_match;\n    /* Attempt to find a better match only when the current match is strictly\n     * smaller than this value. This mechanism is used only for compression\n     * levels >= 4.\n     */\n#   define max_insert_length  max_lazy_match\n    /* Insert new strings in the hash table only if the match length is not\n     * greater than this length. This saves time but degrades compression.\n     * max_insert_length is used only for compression levels <= 3.\n     */\n\n    int level;    /* compression level (1..9) */\n    int strategy; /* favor or force Huffman coding*/\n\n    uInt good_match;\n    /* Use a faster search when the previous match is longer than this */\n\n    int nice_match; /* Stop searching when current match exceeds this */\n\n                /* used by trees.c: */\n    /* Didn't use ct_data typedef below to supress compiler warning */\n    struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */\n    struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n    struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */\n\n    struct tree_desc_s l_desc;               /* desc. for literal tree */\n    struct tree_desc_s d_desc;               /* desc. for distance tree */\n    struct tree_desc_s bl_desc;              /* desc. for bit length tree */\n\n    ush bl_count[MAX_BITS+1];\n    /* number of codes at each bit length for an optimal tree */\n\n    int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */\n    int heap_len;               /* number of elements in the heap */\n    int heap_max;               /* element of largest frequency */\n    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n     * The same heap array is used to build all trees.\n     */\n\n    uch depth[2*L_CODES+1];\n    /* Depth of each subtree used as tie breaker for trees of equal frequency\n     */\n\n    uchf *l_buf;          /* buffer for literals or lengths */\n\n    uInt  lit_bufsize;\n    /* Size of match buffer for literals/lengths.  There are 4 reasons for\n     * limiting lit_bufsize to 64K:\n     *   - frequencies can be kept in 16 bit counters\n     *   - if compression is not successful for the first block, all input\n     *     data is still in the window so we can still emit a stored block even\n     *     when input comes from standard input.  (This can also be done for\n     *     all blocks if lit_bufsize is not greater than 32K.)\n     *   - if compression is not successful for a file smaller than 64K, we can\n     *     even emit a stored file instead of a stored block (saving 5 bytes).\n     *     This is applicable only for zip (not gzip or zlib).\n     *   - creating new Huffman trees less frequently may not provide fast\n     *     adaptation to changes in the input data statistics. (Take for\n     *     example a binary file with poorly compressible code followed by\n     *     a highly compressible string table.) Smaller buffer sizes give\n     *     fast adaptation but have of course the overhead of transmitting\n     *     trees more frequently.\n     *   - I can't count above 4\n     */\n\n    uInt last_lit;      /* running index in l_buf */\n\n    ushf *d_buf;\n    /* Buffer for distances. To simplify the code, d_buf and l_buf have\n     * the same number of elements. To use different lengths, an extra flag\n     * array would be necessary.\n     */\n\n    ulg opt_len;        /* bit length of current block with optimal trees */\n    ulg static_len;     /* bit length of current block with static trees */\n    uInt matches;       /* number of string matches in current block */\n    int last_eob_len;   /* bit length of EOB code for last block */\n\n#ifdef DEBUG\n    ulg compressed_len; /* total bit length of compressed file mod 2^32 */\n    ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */\n#endif\n\n    ush bi_buf;\n    /* Output buffer. bits are inserted starting at the bottom (least\n     * significant bits).\n     */\n    int bi_valid;\n    /* Number of valid bits in bi_buf.  All bits above the last valid bit\n     * are always zero.\n     */\n\n} FAR deflate_state;\n\n/* Output a byte on the stream.\n * IN assertion: there is enough room in pending_buf.\n */\n#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}\n\n\n#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)\n/* Minimum amount of lookahead, except at the end of the input file.\n * See deflate.c for comments about the MIN_MATCH+1.\n */\n\n#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)\n/* In order to simplify the code, particularly on 16 bit machines, match\n * distances are limited to MAX_DIST instead of WSIZE.\n */\n\n        /* in trees.c */\nvoid _tr_init         OF((deflate_state *s));\nint  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));\nvoid _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,\n                          int eof));\nvoid _tr_align        OF((deflate_state *s));\nvoid _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,\n                          int eof));\n\n#define d_code(dist) \\\n   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])\n/* Mapping from a distance to a distance code. dist is the distance - 1 and\n * must not have side effects. _dist_code[256] and _dist_code[257] are never\n * used.\n */\n\n#ifndef DEBUG\n/* Inline versions of _tr_tally for speed: */\n\n#if defined(GEN_TREES_H) || !defined(STDC)\n  extern uch _length_code[];\n  extern uch _dist_code[];\n#else\n  extern const uch _length_code[];\n  extern const uch _dist_code[];\n#endif\n\n# define _tr_tally_lit(s, c, flush) \\\n  { uch cc = (c); \\\n    s->d_buf[s->last_lit] = 0; \\\n    s->l_buf[s->last_lit++] = cc; \\\n    s->dyn_ltree[cc].Freq++; \\\n    flush = (s->last_lit == s->lit_bufsize-1); \\\n   }\n# define _tr_tally_dist(s, distance, length, flush) \\\n  { uch len = (length); \\\n    ush dist = (distance); \\\n    s->d_buf[s->last_lit] = dist; \\\n    s->l_buf[s->last_lit++] = len; \\\n    dist--; \\\n    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \\\n    s->dyn_dtree[d_code(dist)].Freq++; \\\n    flush = (s->last_lit == s->lit_bufsize-1); \\\n  }\n#else\n# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)\n# define _tr_tally_dist(s, distance, length, flush) \\\n              flush = _tr_tally(s, distance, length)\n#endif\n\n#endif /* DEFLATE_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/gzio.c",
    "content": "/* gzio.c -- IO on .gz files\n * Copyright (C) 1995-2003 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n *\n * Compile this file with -DNO_GZCOMPRESS to avoid the compression code.\n */\n\n/* @(#) $Id$ */\n\n#include <stdio.h>\n\n#include \"zutil.h\"\n\n#ifdef NO_DEFLATE       /* for compatiblity with old definition */\n#  define NO_GZCOMPRESS\n#endif\n\n#ifndef NO_DUMMY_DECL\nstruct internal_state {int dummy;}; /* for buggy compilers */\n#endif\n\n#ifndef Z_BUFSIZE\n#  ifdef MAXSEG_64K\n#    define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */\n#  else\n#    define Z_BUFSIZE 16384\n#  endif\n#endif\n#ifndef Z_PRINTF_BUFSIZE\n#  define Z_PRINTF_BUFSIZE 4096\n#endif\n\n#ifdef __MVS__\n#  pragma map (fdopen , \"\\174\\174FDOPEN\")\n   FILE *fdopen(int, const char *);\n#endif\n\n#ifndef STDC\nextern voidp  malloc OF((uInt size));\nextern void   free   OF((voidpf ptr));\n#endif\n\n#define ALLOC(size) malloc(size)\n#define TRYFREE(p) {if (p) free(p);}\n\nstatic int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */\n\n/* gzip flag byte */\n#define ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */\n#define HEAD_CRC     0x02 /* bit 1 set: header CRC present */\n#define EXTRA_FIELD  0x04 /* bit 2 set: extra field present */\n#define ORIG_NAME    0x08 /* bit 3 set: original file name present */\n#define COMMENT      0x10 /* bit 4 set: file comment present */\n#define RESERVED     0xE0 /* bits 5..7: reserved */\n\ntypedef struct gz_stream {\n    z_stream stream;\n    int      z_err;   /* error code for last stream operation */\n    int      z_eof;   /* set if end of input file */\n    FILE     *file;   /* .gz file */\n    Byte     *inbuf;  /* input buffer */\n    Byte     *outbuf; /* output buffer */\n    uLong    crc;     /* crc32 of uncompressed data */\n    char     *msg;    /* error message */\n    char     *path;   /* path name for debugging only */\n    int      transparent; /* 1 if input file is not a .gz file */\n    char     mode;    /* 'w' or 'r' */\n    z_off_t  start;   /* start of compressed data in file (header skipped) */\n    z_off_t  in;      /* bytes into deflate or inflate */\n    z_off_t  out;     /* bytes out of deflate or inflate */\n    int      back;    /* one character push-back */\n    int      last;    /* true if push-back is last character */\n} gz_stream;\n\n\nlocal gzFile gz_open      OF((const char *path, const char *mode, int  fd));\nlocal int do_flush        OF((gzFile file, int flush));\nlocal int    get_byte     OF((gz_stream *s));\nlocal void   check_header OF((gz_stream *s));\nlocal int    destroy      OF((gz_stream *s));\nlocal void   putLong      OF((FILE *file, uLong x));\nlocal uLong  getLong      OF((gz_stream *s));\n\n/* ===========================================================================\n     Opens a gzip (.gz) file for reading or writing. The mode parameter\n   is as in fopen (\"rb\" or \"wb\"). The file is given either by file descriptor\n   or path name (if fd == -1).\n     gz_open returns NULL if the file could not be opened or if there was\n   insufficient memory to allocate the (de)compression state; errno\n   can be checked to distinguish the two cases (if errno is zero, the\n   zlib error is Z_MEM_ERROR).\n*/\nlocal gzFile gz_open (path, mode, fd)\n    const char *path;\n    const char *mode;\n    int  fd;\n{\n    int err;\n    int level = Z_DEFAULT_COMPRESSION; /* compression level */\n    int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */\n    char *p = (char*)mode;\n    gz_stream *s;\n    char fmode[80]; /* copy of mode, without the compression level */\n    char *m = fmode;\n\n    if (!path || !mode) return Z_NULL;\n\n    s = (gz_stream *)ALLOC(sizeof(gz_stream));\n    if (!s) return Z_NULL;\n\n    s->stream.zalloc = (alloc_func)0;\n    s->stream.zfree = (free_func)0;\n    s->stream.opaque = (voidpf)0;\n    s->stream.next_in = s->inbuf = Z_NULL;\n    s->stream.next_out = s->outbuf = Z_NULL;\n    s->stream.avail_in = s->stream.avail_out = 0;\n    s->file = NULL;\n    s->z_err = Z_OK;\n    s->z_eof = 0;\n    s->in = 0;\n    s->out = 0;\n    s->back = EOF;\n    s->crc = crc32(0L, Z_NULL, 0);\n    s->msg = NULL;\n    s->transparent = 0;\n\n    s->path = (char*)ALLOC(strlen(path)+1);\n    if (s->path == NULL) {\n        return destroy(s), (gzFile)Z_NULL;\n    }\n    strcpy(s->path, path); /* do this early for debugging */\n\n    s->mode = '\\0';\n    do {\n        if (*p == 'r') s->mode = 'r';\n        if (*p == 'w' || *p == 'a') s->mode = 'w';\n        if (*p >= '0' && *p <= '9') {\n            level = *p - '0';\n        } else if (*p == 'f') {\n          strategy = Z_FILTERED;\n        } else if (*p == 'h') {\n          strategy = Z_HUFFMAN_ONLY;\n        } else if (*p == 'R') {\n          strategy = Z_RLE;\n        } else {\n            *m++ = *p; /* copy the mode */\n        }\n    } while (*p++ && m != fmode + sizeof(fmode));\n    if (s->mode == '\\0') return destroy(s), (gzFile)Z_NULL;\n\n    if (s->mode == 'w') {\n#ifdef NO_GZCOMPRESS\n        err = Z_STREAM_ERROR;\n#else\n        err = deflateInit2(&(s->stream), level,\n                           Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy);\n        /* windowBits is passed < 0 to suppress zlib header */\n\n        s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);\n#endif\n        if (err != Z_OK || s->outbuf == Z_NULL) {\n            return destroy(s), (gzFile)Z_NULL;\n        }\n    } else {\n        s->stream.next_in  = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);\n\n        err = inflateInit2(&(s->stream), -MAX_WBITS);\n        /* windowBits is passed < 0 to tell that there is no zlib header.\n         * Note that in this case inflate *requires* an extra \"dummy\" byte\n         * after the compressed stream in order to complete decompression and\n         * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are\n         * present after the compressed stream.\n         */\n        if (err != Z_OK || s->inbuf == Z_NULL) {\n            return destroy(s), (gzFile)Z_NULL;\n        }\n    }\n    s->stream.avail_out = Z_BUFSIZE;\n\n    errno = 0;\n    s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);\n\n    if (s->file == NULL) {\n        return destroy(s), (gzFile)Z_NULL;\n    }\n    if (s->mode == 'w') {\n        /* Write a very simple .gz header:\n         */\n        fprintf(s->file, \"%c%c%c%c%c%c%c%c%c%c\", gz_magic[0], gz_magic[1],\n             Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);\n        s->start = 10L;\n        /* We use 10L instead of ftell(s->file) to because ftell causes an\n         * fflush on some systems. This version of the library doesn't use\n         * start anyway in write mode, so this initialization is not\n         * necessary.\n         */\n    } else {\n        check_header(s); /* skip the .gz header */\n        s->start = ftell(s->file) - s->stream.avail_in;\n    }\n\n    return (gzFile)s;\n}\n\n/* ===========================================================================\n     Opens a gzip (.gz) file for reading or writing.\n*/\ngzFile ZEXPORT gzopen (path, mode)\n    const char *path;\n    const char *mode;\n{\n    return gz_open (path, mode, -1);\n}\n\n/* ===========================================================================\n     Associate a gzFile with the file descriptor fd. fd is not dup'ed here\n   to mimic the behavio(u)r of fdopen.\n*/\ngzFile ZEXPORT gzdopen (fd, mode)\n    int fd;\n    const char *mode;\n{\n    char name[20];\n\n    if (fd < 0) return (gzFile)Z_NULL;\n    sprintf(name, \"<fd:%d>\", fd); /* for debugging */\n\n    return gz_open (name, mode, fd);\n}\n\n/* ===========================================================================\n * Update the compression level and strategy\n */\nint ZEXPORT gzsetparams (file, level, strategy)\n    gzFile file;\n    int level;\n    int strategy;\n{\n    gz_stream *s = (gz_stream*)file;\n\n    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;\n\n    /* Make room to allow flushing */\n    if (s->stream.avail_out == 0) {\n\n        s->stream.next_out = s->outbuf;\n        if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {\n            s->z_err = Z_ERRNO;\n        }\n        s->stream.avail_out = Z_BUFSIZE;\n    }\n\n    return deflateParams (&(s->stream), level, strategy);\n}\n\n/* ===========================================================================\n     Read a byte from a gz_stream; update next_in and avail_in. Return EOF\n   for end of file.\n   IN assertion: the stream s has been sucessfully opened for reading.\n*/\nlocal int get_byte(s)\n    gz_stream *s;\n{\n    if (s->z_eof) return EOF;\n    if (s->stream.avail_in == 0) {\n        errno = 0;\n        s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);\n        if (s->stream.avail_in == 0) {\n            s->z_eof = 1;\n            if (ferror(s->file)) s->z_err = Z_ERRNO;\n            return EOF;\n        }\n        s->stream.next_in = s->inbuf;\n    }\n    s->stream.avail_in--;\n    return *(s->stream.next_in)++;\n}\n\n/* ===========================================================================\n      Check the gzip header of a gz_stream opened for reading. Set the stream\n    mode to transparent if the gzip magic header is not present; set s->err\n    to Z_DATA_ERROR if the magic header is present but the rest of the header\n    is incorrect.\n    IN assertion: the stream s has already been created sucessfully;\n       s->stream.avail_in is zero for the first time, but may be non-zero\n       for concatenated .gz files.\n*/\nlocal void check_header(s)\n    gz_stream *s;\n{\n    int method; /* method byte */\n    int flags;  /* flags byte */\n    uInt len;\n    int c;\n\n    /* Assure two bytes in the buffer so we can peek ahead -- handle case\n       where first byte of header is at the end of the buffer after the last\n       gzip segment */\n    len = s->stream.avail_in;\n    if (len < 2) {\n        if (len) s->inbuf[0] = s->stream.next_in[0];\n        errno = 0;\n        len = fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file);\n        if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO;\n        s->stream.avail_in += len;\n        s->stream.next_in = s->inbuf;\n        if (s->stream.avail_in < 2) {\n            s->transparent = s->stream.avail_in;\n            return;\n        }\n    }\n\n    /* Peek ahead to check the gzip magic header */\n    if (s->stream.next_in[0] != gz_magic[0] ||\n        s->stream.next_in[1] != gz_magic[1]) {\n        s->transparent = 1;\n        return;\n    }\n    s->stream.avail_in -= 2;\n    s->stream.next_in += 2;\n\n    /* Check the rest of the gzip header */\n    method = get_byte(s);\n    flags = get_byte(s);\n    if (method != Z_DEFLATED || (flags & RESERVED) != 0) {\n        s->z_err = Z_DATA_ERROR;\n        return;\n    }\n\n    /* Discard time, xflags and OS code: */\n    for (len = 0; len < 6; len++) (void)get_byte(s);\n\n    if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */\n        len  =  (uInt)get_byte(s);\n        len += ((uInt)get_byte(s))<<8;\n        /* len is garbage if EOF but the loop below will quit anyway */\n        while (len-- != 0 && get_byte(s) != EOF) ;\n    }\n    if ((flags & ORIG_NAME) != 0) { /* skip the original file name */\n        while ((c = get_byte(s)) != 0 && c != EOF) ;\n    }\n    if ((flags & COMMENT) != 0) {   /* skip the .gz file comment */\n        while ((c = get_byte(s)) != 0 && c != EOF) ;\n    }\n    if ((flags & HEAD_CRC) != 0) {  /* skip the header crc */\n        for (len = 0; len < 2; len++) (void)get_byte(s);\n    }\n    s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;\n}\n\n /* ===========================================================================\n * Cleanup then free the given gz_stream. Return a zlib error code.\n   Try freeing in the reverse order of allocations.\n */\nlocal int destroy (s)\n    gz_stream *s;\n{\n    int err = Z_OK;\n\n    if (!s) return Z_STREAM_ERROR;\n\n    TRYFREE(s->msg);\n\n    if (s->stream.state != NULL) {\n        if (s->mode == 'w') {\n#ifdef NO_GZCOMPRESS\n            err = Z_STREAM_ERROR;\n#else\n            err = deflateEnd(&(s->stream));\n#endif\n        } else if (s->mode == 'r') {\n            err = inflateEnd(&(s->stream));\n        }\n    }\n    if (s->file != NULL && fclose(s->file)) {\n#ifdef ESPIPE\n        if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */\n#endif\n            err = Z_ERRNO;\n    }\n    if (s->z_err < 0) err = s->z_err;\n\n    TRYFREE(s->inbuf);\n    TRYFREE(s->outbuf);\n    TRYFREE(s->path);\n    TRYFREE(s);\n    return err;\n}\n\n/* ===========================================================================\n     Reads the given number of uncompressed bytes from the compressed file.\n   gzread returns the number of bytes actually read (0 for end of file).\n*/\nint ZEXPORT gzread (file, buf, len)\n    gzFile file;\n    voidp buf;\n    unsigned len;\n{\n    gz_stream *s = (gz_stream*)file;\n    Bytef *start = (Bytef*)buf; /* starting point for crc computation */\n    Byte  *next_out; /* == stream.next_out but not forced far (for MSDOS) */\n\n    if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;\n\n    if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;\n    if (s->z_err == Z_STREAM_END) return 0;  /* EOF */\n\n    next_out = (Byte*)buf;\n    s->stream.next_out = (Bytef*)buf;\n    s->stream.avail_out = len;\n\n    if (s->stream.avail_out && s->back != EOF) {\n        *next_out++ = s->back;\n        s->stream.next_out++;\n        s->stream.avail_out--;\n        s->back = EOF;\n        s->out++;\n        if (s->last) {\n            s->z_err = Z_STREAM_END;\n            return 1;\n        }\n    }\n\n    while (s->stream.avail_out != 0) {\n\n        if (s->transparent) {\n            /* Copy first the lookahead bytes: */\n            uInt n = s->stream.avail_in;\n            if (n > s->stream.avail_out) n = s->stream.avail_out;\n            if (n > 0) {\n                zmemcpy(s->stream.next_out, s->stream.next_in, n);\n                next_out += n;\n                s->stream.next_out = next_out;\n                s->stream.next_in   += n;\n                s->stream.avail_out -= n;\n                s->stream.avail_in  -= n;\n            }\n            if (s->stream.avail_out > 0) {\n                s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out,\n                                             s->file);\n            }\n            len -= s->stream.avail_out;\n            s->in  += len;\n            s->out += len;\n            if (len == 0) s->z_eof = 1;\n            return (int)len;\n        }\n        if (s->stream.avail_in == 0 && !s->z_eof) {\n\n            errno = 0;\n            s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);\n            if (s->stream.avail_in == 0) {\n                s->z_eof = 1;\n                if (ferror(s->file)) {\n                    s->z_err = Z_ERRNO;\n                    break;\n                }\n            }\n            s->stream.next_in = s->inbuf;\n        }\n        s->in += s->stream.avail_in;\n        s->out += s->stream.avail_out;\n        s->z_err = inflate(&(s->stream), Z_NO_FLUSH);\n        s->in -= s->stream.avail_in;\n        s->out -= s->stream.avail_out;\n\n        if (s->z_err == Z_STREAM_END) {\n            /* Check CRC and original size */\n            s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));\n            start = s->stream.next_out;\n\n            if (getLong(s) != s->crc) {\n                s->z_err = Z_DATA_ERROR;\n            } else {\n                (void)getLong(s);\n                /* The uncompressed length returned by above getlong() may be\n                 * different from s->out in case of concatenated .gz files.\n                 * Check for such files:\n                 */\n                check_header(s);\n                if (s->z_err == Z_OK) {\n                    inflateReset(&(s->stream));\n                    s->crc = crc32(0L, Z_NULL, 0);\n                }\n            }\n        }\n        if (s->z_err != Z_OK || s->z_eof) break;\n    }\n    s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));\n\n    return (int)(len - s->stream.avail_out);\n}\n\n\n/* ===========================================================================\n      Reads one byte from the compressed file. gzgetc returns this byte\n   or -1 in case of end of file or error.\n*/\nint ZEXPORT gzgetc(file)\n    gzFile file;\n{\n    unsigned char c;\n\n    return gzread(file, &c, 1) == 1 ? c : -1;\n}\n\n\n/* ===========================================================================\n      Push one byte back onto the stream.\n*/\nint ZEXPORT gzungetc(c, file)\n    int c;\n    gzFile file;\n{\n    gz_stream *s = (gz_stream*)file;\n\n    if (s == NULL || s->mode != 'r' || c == EOF || s->back != EOF) return EOF;\n    s->back = c;\n    s->out--;\n    s->last = (s->z_err == Z_STREAM_END);\n    if (s->last) s->z_err = Z_OK;\n    s->z_eof = 0;\n    return c;\n}\n\n\n/* ===========================================================================\n      Reads bytes from the compressed file until len-1 characters are\n   read, or a newline character is read and transferred to buf, or an\n   end-of-file condition is encountered.  The string is then terminated\n   with a null character.\n      gzgets returns buf, or Z_NULL in case of error.\n\n      The current implementation is not optimized at all.\n*/\nchar * ZEXPORT gzgets(file, buf, len)\n    gzFile file;\n    char *buf;\n    int len;\n{\n    char *b = buf;\n    if (buf == Z_NULL || len <= 0) return Z_NULL;\n\n    while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\\n') ;\n    *buf = '\\0';\n    return b == buf && len > 0 ? Z_NULL : b;\n}\n\n\n#ifndef NO_GZCOMPRESS\n/* ===========================================================================\n     Writes the given number of uncompressed bytes into the compressed file.\n   gzwrite returns the number of bytes actually written (0 in case of error).\n*/\nint ZEXPORT gzwrite (file, buf, len)\n    gzFile file;\n    voidpc buf;\n    unsigned len;\n{\n    gz_stream *s = (gz_stream*)file;\n\n    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;\n\n    s->stream.next_in = (Bytef*)buf;\n    s->stream.avail_in = len;\n\n    while (s->stream.avail_in != 0) {\n\n        if (s->stream.avail_out == 0) {\n\n            s->stream.next_out = s->outbuf;\n            if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {\n                s->z_err = Z_ERRNO;\n                break;\n            }\n            s->stream.avail_out = Z_BUFSIZE;\n        }\n        s->in += s->stream.avail_in;\n        s->out += s->stream.avail_out;\n        s->z_err = deflate(&(s->stream), Z_NO_FLUSH);\n        s->in -= s->stream.avail_in;\n        s->out -= s->stream.avail_out;\n        if (s->z_err != Z_OK) break;\n    }\n    s->crc = crc32(s->crc, (const Bytef *)buf, len);\n\n    return (int)(len - s->stream.avail_in);\n}\n\n\n/* ===========================================================================\n     Converts, formats, and writes the args to the compressed file under\n   control of the format string, as in fprintf. gzprintf returns the number of\n   uncompressed bytes actually written (0 in case of error).\n*/\n#ifdef STDC\n#include <stdarg.h>\n\nint ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)\n{\n    char buf[Z_PRINTF_BUFSIZE];\n    va_list va;\n    int len;\n\n    buf[sizeof(buf) - 1] = 0;\n    va_start(va, format);\n#ifdef NO_vsnprintf\n#  ifdef HAS_vsprintf_void\n    (void)vsprintf(buf, format, va);\n    va_end(va);\n    for (len = 0; len < sizeof(buf); len++)\n        if (buf[len] == 0) break;\n#  else\n    len = vsprintf(buf, format, va);\n    va_end(va);\n#  endif\n#else\n#  ifdef HAS_vsnprintf_void\n    (void)vsnprintf(buf, sizeof(buf), format, va);\n    va_end(va);\n    len = strlen(buf);\n#  else\n    len = vsnprintf(buf, sizeof(buf), format, va);\n    va_end(va);\n#  endif\n#endif\n    if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0)\n        return 0;\n    return gzwrite(file, buf, (unsigned)len);\n}\n#else /* not ANSI C */\n\nint ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,\n                       a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)\n    gzFile file;\n    const char *format;\n    int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,\n        a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;\n{\n    char buf[Z_PRINTF_BUFSIZE];\n    int len;\n\n    buf[sizeof(buf) - 1] = 0;\n#ifdef NO_snprintf\n#  ifdef HAS_sprintf_void\n    sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,\n            a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);\n    for (len = 0; len < sizeof(buf); len++)\n        if (buf[len] == 0) break;\n#  else\n    len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,\n                a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);\n#  endif\n#else\n#  ifdef HAS_snprintf_void\n    snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,\n             a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);\n    len = strlen(buf);\n#  else\n    len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,\n                 a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);\n#  endif\n#endif\n    if (len <= 0 || len >= sizeof(buf) || buf[sizeof(buf) - 1] != 0)\n        return 0;\n    return gzwrite(file, buf, len);\n}\n#endif\n\n/* ===========================================================================\n      Writes c, converted to an unsigned char, into the compressed file.\n   gzputc returns the value that was written, or -1 in case of error.\n*/\nint ZEXPORT gzputc(file, c)\n    gzFile file;\n    int c;\n{\n    unsigned char cc = (unsigned char) c; /* required for big endian systems */\n\n    return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1;\n}\n\n\n/* ===========================================================================\n      Writes the given null-terminated string to the compressed file, excluding\n   the terminating null character.\n      gzputs returns the number of characters written, or -1 in case of error.\n*/\nint ZEXPORT gzputs(file, s)\n    gzFile file;\n    const char *s;\n{\n    return gzwrite(file, (char*)s, (unsigned)strlen(s));\n}\n\n\n/* ===========================================================================\n     Flushes all pending output into the compressed file. The parameter\n   flush is as in the deflate() function.\n*/\nlocal int do_flush (file, flush)\n    gzFile file;\n    int flush;\n{\n    uInt len;\n    int done = 0;\n    gz_stream *s = (gz_stream*)file;\n\n    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;\n\n    s->stream.avail_in = 0; /* should be zero already anyway */\n\n    for (;;) {\n        len = Z_BUFSIZE - s->stream.avail_out;\n\n        if (len != 0) {\n            if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {\n                s->z_err = Z_ERRNO;\n                return Z_ERRNO;\n            }\n            s->stream.next_out = s->outbuf;\n            s->stream.avail_out = Z_BUFSIZE;\n        }\n        if (done) break;\n        s->out += s->stream.avail_out;\n        s->z_err = deflate(&(s->stream), flush);\n        s->out -= s->stream.avail_out;\n\n        /* Ignore the second of two consecutive flushes: */\n        if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;\n\n        /* deflate has finished flushing only when it hasn't used up\n         * all the available space in the output buffer:\n         */\n        done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);\n\n        if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;\n    }\n    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;\n}\n\nint ZEXPORT gzflush (file, flush)\n     gzFile file;\n     int flush;\n{\n    gz_stream *s = (gz_stream*)file;\n    int err = do_flush (file, flush);\n\n    if (err) return err;\n    fflush(s->file);\n    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;\n}\n#endif /* NO_GZCOMPRESS */\n\n/* ===========================================================================\n      Sets the starting position for the next gzread or gzwrite on the given\n   compressed file. The offset represents a number of bytes in the\n      gzseek returns the resulting offset location as measured in bytes from\n   the beginning of the uncompressed stream, or -1 in case of error.\n      SEEK_END is not implemented, returns error.\n      In this version of the library, gzseek can be extremely slow.\n*/\nz_off_t ZEXPORT gzseek (file, offset, whence)\n    gzFile file;\n    z_off_t offset;\n    int whence;\n{\n    gz_stream *s = (gz_stream*)file;\n\n    if (s == NULL || whence == SEEK_END ||\n        s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) {\n        return -1L;\n    }\n\n    if (s->mode == 'w') {\n#ifdef NO_GZCOMPRESS\n        return -1L;\n#else\n        if (whence == SEEK_SET) {\n            offset -= s->in;\n        }\n        if (offset < 0) return -1L;\n\n        /* At this point, offset is the number of zero bytes to write. */\n        if (s->inbuf == Z_NULL) {\n            s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */\n            if (s->inbuf == Z_NULL) return -1L;\n            zmemzero(s->inbuf, Z_BUFSIZE);\n        }\n        while (offset > 0)  {\n            uInt size = Z_BUFSIZE;\n            if (offset < Z_BUFSIZE) size = (uInt)offset;\n\n            size = gzwrite(file, s->inbuf, size);\n            if (size == 0) return -1L;\n\n            offset -= size;\n        }\n        return s->in;\n#endif\n    }\n    /* Rest of function is for reading only */\n\n    /* compute absolute position */\n    if (whence == SEEK_CUR) {\n        offset += s->out;\n    }\n    if (offset < 0) return -1L;\n\n    if (s->transparent) {\n        /* map to fseek */\n        s->back = EOF;\n        s->stream.avail_in = 0;\n        s->stream.next_in = s->inbuf;\n        if (fseek(s->file, offset, SEEK_SET) < 0) return -1L;\n\n        s->in = s->out = offset;\n        return offset;\n    }\n\n    /* For a negative seek, rewind and use positive seek */\n    if (offset >= s->out) {\n        offset -= s->out;\n    } else if (gzrewind(file) < 0) {\n        return -1L;\n    }\n    /* offset is now the number of bytes to skip. */\n\n    if (offset != 0 && s->outbuf == Z_NULL) {\n        s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);\n        if (s->outbuf == Z_NULL) return -1L;\n    }\n    if (offset && s->back != EOF) {\n        s->back = EOF;\n        s->out++;\n        offset--;\n        if (s->last) s->z_err = Z_STREAM_END;\n    }\n    while (offset > 0)  {\n        int size = Z_BUFSIZE;\n        if (offset < Z_BUFSIZE) size = (int)offset;\n\n        size = gzread(file, s->outbuf, (uInt)size);\n        if (size <= 0) return -1L;\n        offset -= size;\n    }\n    return s->out;\n}\n\n/* ===========================================================================\n     Rewinds input file.\n*/\nint ZEXPORT gzrewind (file)\n    gzFile file;\n{\n    gz_stream *s = (gz_stream*)file;\n\n    if (s == NULL || s->mode != 'r') return -1;\n\n    s->z_err = Z_OK;\n    s->z_eof = 0;\n    s->back = EOF;\n    s->stream.avail_in = 0;\n    s->stream.next_in = s->inbuf;\n    s->crc = crc32(0L, Z_NULL, 0);\n    if (!s->transparent) (void)inflateReset(&s->stream);\n    s->in = 0;\n    s->out = 0;\n    return fseek(s->file, s->start, SEEK_SET);\n}\n\n/* ===========================================================================\n     Returns the starting position for the next gzread or gzwrite on the\n   given compressed file. This position represents a number of bytes in the\n   uncompressed data stream.\n*/\nz_off_t ZEXPORT gztell (file)\n    gzFile file;\n{\n    return gzseek(file, 0L, SEEK_CUR);\n}\n\n/* ===========================================================================\n     Returns 1 when EOF has previously been detected reading the given\n   input stream, otherwise zero.\n*/\nint ZEXPORT gzeof (file)\n    gzFile file;\n{\n    gz_stream *s = (gz_stream*)file;\n\n    /* With concatenated compressed files that can have embedded\n     * crc trailers, z_eof is no longer the only/best indicator of EOF\n     * on a gz_stream. Handle end-of-stream error explicitly here.\n     */\n    if (s == NULL || s->mode != 'r') return 0;\n    if (s->z_eof) return 1;\n    return s->z_err == Z_STREAM_END;\n}\n\n/* ===========================================================================\n   Outputs a long in LSB order to the given file\n*/\nlocal void putLong (file, x)\n    FILE *file;\n    uLong x;\n{\n    int n;\n    for (n = 0; n < 4; n++) {\n        fputc((int)(x & 0xff), file);\n        x >>= 8;\n    }\n}\n\n/* ===========================================================================\n   Reads a long in LSB order from the given gz_stream. Sets z_err in case\n   of error.\n*/\nlocal uLong getLong (s)\n    gz_stream *s;\n{\n    uLong x = (uLong)get_byte(s);\n    int c;\n\n    x += ((uLong)get_byte(s))<<8;\n    x += ((uLong)get_byte(s))<<16;\n    c = get_byte(s);\n    if (c == EOF) s->z_err = Z_DATA_ERROR;\n    x += ((uLong)c)<<24;\n    return x;\n}\n\n/* ===========================================================================\n     Flushes all pending output if necessary, closes the compressed file\n   and deallocates all the (de)compression state.\n*/\nint ZEXPORT gzclose (file)\n    gzFile file;\n{\n    int err;\n    gz_stream *s = (gz_stream*)file;\n\n    if (s == NULL) return Z_STREAM_ERROR;\n\n    if (s->mode == 'w') {\n#ifdef NO_GZCOMPRESS\n        return Z_STREAM_ERROR;\n#else\n        err = do_flush (file, Z_FINISH);\n        if (err != Z_OK) return destroy((gz_stream*)file);\n\n        putLong (s->file, s->crc);\n        putLong (s->file, (uLong)(s->in & 0xffffffff));\n#endif\n    }\n    return destroy((gz_stream*)file);\n}\n\n/* ===========================================================================\n     Returns the error message for the last error which occured on the\n   given compressed file. errnum is set to zlib error number. If an\n   error occured in the file system and not in the compression library,\n   errnum is set to Z_ERRNO and the application may consult errno\n   to get the exact error code.\n*/\nconst char * ZEXPORT gzerror (file, errnum)\n    gzFile file;\n    int *errnum;\n{\n    char *m;\n    gz_stream *s = (gz_stream*)file;\n\n    if (s == NULL) {\n        *errnum = Z_STREAM_ERROR;\n        return (const char*)ERR_MSG(Z_STREAM_ERROR);\n    }\n    *errnum = s->z_err;\n    if (*errnum == Z_OK) return (const char*)\"\";\n\n    m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);\n\n    if (m == NULL || *m == '\\0') m = (char*)ERR_MSG(s->z_err);\n\n    TRYFREE(s->msg);\n    s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);\n    if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR);\n    strcpy(s->msg, s->path);\n    strcat(s->msg, \": \");\n    strcat(s->msg, m);\n    return (const char*)s->msg;\n}\n\n/* ===========================================================================\n     Clear the error and end-of-file flags, and do the same for the real file.\n*/\nvoid ZEXPORT gzclearerr (file)\n    gzFile file;\n{\n    gz_stream *s = (gz_stream*)file;\n\n    if (s == NULL) return;\n    if (s->z_err != Z_STREAM_END) s->z_err = Z_OK;\n    s->z_eof = 0;\n    clearerr(s->file);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/infback.c",
    "content": "/* infback.c -- inflate using a call-back interface\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/*\n   This code is largely copied from inflate.c.  Normally either infback.o or\n   inflate.o would be linked into an application--not both.  The interface\n   with inffast.c is retained so that optimized assembler-coded versions of\n   inflate_fast() can be used with either inflate.c or infback.c.\n */\n\n#include \"zutil.h\"\n#include \"inftrees.h\"\n#include \"inflate.h\"\n#include \"inffast.h\"\n\n/* function prototypes */\nlocal void fixedtables OF((struct inflate_state FAR *state));\n\n/*\n   strm provides memory allocation functions in zalloc and zfree, or\n   Z_NULL to use the library memory allocation functions.\n\n   windowBits is in the range 8..15, and window is a user-supplied\n   window and output buffer that is 2**windowBits bytes.\n */\nint ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)\nz_stream FAR *strm;\nint windowBits;\nunsigned char FAR *window;\nconst char *version;\nint stream_size;\n{\n    struct inflate_state FAR *state;\n\n    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||\n        stream_size != (int)(sizeof(z_stream)))\n        return Z_VERSION_ERROR;\n    if (strm == Z_NULL || window == Z_NULL ||\n        windowBits < 8 || windowBits > 15)\n        return Z_STREAM_ERROR;\n    strm->msg = Z_NULL;                 /* in case we return an error */\n    if (strm->zalloc == (alloc_func)0) {\n        strm->zalloc = zcalloc;\n        strm->opaque = (voidpf)0;\n    }\n    if (strm->zfree == (free_func)0) strm->zfree = zcfree;\n    state = (struct inflate_state FAR *)ZALLOC(strm, 1,\n                                               sizeof(struct inflate_state));\n    if (state == Z_NULL) return Z_MEM_ERROR;\n    Tracev((stderr, \"inflate: allocated\\n\"));\n    strm->state = (voidpf)state;\n    state->wbits = windowBits;\n    state->wsize = 1U << windowBits;\n    state->window = window;\n    state->write = 0;\n    state->whave = 0;\n    return Z_OK;\n}\n\n/*\n   Return state with length and distance decoding tables and index sizes set to\n   fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n   If BUILDFIXED is defined, then instead this routine builds the tables the\n   first time it's called, and returns those tables the first time and\n   thereafter.  This reduces the size of the code by about 2K bytes, in\n   exchange for a little execution time.  However, BUILDFIXED should not be\n   used for threaded applications, since the rewriting of the tables and virgin\n   may not be thread-safe.\n */\nlocal void fixedtables(state)\nstruct inflate_state FAR *state;\n{\n#ifdef BUILDFIXED\n    static int virgin = 1;\n    static code *lenfix, *distfix;\n    static code fixed[544];\n\n    /* build fixed huffman tables if first call (may not be thread safe) */\n    if (virgin) {\n        unsigned sym, bits;\n        static code *next;\n\n        /* literal/length table */\n        sym = 0;\n        while (sym < 144) state->lens[sym++] = 8;\n        while (sym < 256) state->lens[sym++] = 9;\n        while (sym < 280) state->lens[sym++] = 7;\n        while (sym < 288) state->lens[sym++] = 8;\n        next = fixed;\n        lenfix = next;\n        bits = 9;\n        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);\n\n        /* distance table */\n        sym = 0;\n        while (sym < 32) state->lens[sym++] = 5;\n        distfix = next;\n        bits = 5;\n        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);\n\n        /* do this just once */\n        virgin = 0;\n    }\n#else /* !BUILDFIXED */\n#   include \"inffixed.h\"\n#endif /* BUILDFIXED */\n    state->lencode = lenfix;\n    state->lenbits = 9;\n    state->distcode = distfix;\n    state->distbits = 5;\n}\n\n/* Macros for inflateBack(): */\n\n/* Load returned state from inflate_fast() */\n#define LOAD() \\\n    do { \\\n        put = strm->next_out; \\\n        left = strm->avail_out; \\\n        next = strm->next_in; \\\n        have = strm->avail_in; \\\n        hold = state->hold; \\\n        bits = state->bits; \\\n    } while (0)\n\n/* Set state from registers for inflate_fast() */\n#define RESTORE() \\\n    do { \\\n        strm->next_out = put; \\\n        strm->avail_out = left; \\\n        strm->next_in = next; \\\n        strm->avail_in = have; \\\n        state->hold = hold; \\\n        state->bits = bits; \\\n    } while (0)\n\n/* Clear the input bit accumulator */\n#define INITBITS() \\\n    do { \\\n        hold = 0; \\\n        bits = 0; \\\n    } while (0)\n\n/* Assure that some input is available.  If input is requested, but denied,\n   then return a Z_BUF_ERROR from inflateBack(). */\n#define PULL() \\\n    do { \\\n        if (have == 0) { \\\n            have = in(in_desc, &next); \\\n            if (have == 0) { \\\n                next = Z_NULL; \\\n                ret = Z_BUF_ERROR; \\\n                goto inf_leave; \\\n            } \\\n        } \\\n    } while (0)\n\n/* Get a byte of input into the bit accumulator, or return from inflateBack()\n   with an error if there is no input available. */\n#define PULLBYTE() \\\n    do { \\\n        PULL(); \\\n        have--; \\\n        hold += (unsigned long)(*next++) << bits; \\\n        bits += 8; \\\n    } while (0)\n\n/* Assure that there are at least n bits in the bit accumulator.  If there is\n   not enough available input to do that, then return from inflateBack() with\n   an error. */\n#define NEEDBITS(n) \\\n    do { \\\n        while (bits < (unsigned)(n)) \\\n            PULLBYTE(); \\\n    } while (0)\n\n/* Return the low n bits of the bit accumulator (n < 16) */\n#define BITS(n) \\\n    ((unsigned)hold & ((1U << (n)) - 1))\n\n/* Remove n bits from the bit accumulator */\n#define DROPBITS(n) \\\n    do { \\\n        hold >>= (n); \\\n        bits -= (unsigned)(n); \\\n    } while (0)\n\n/* Remove zero to seven bits as needed to go to a byte boundary */\n#define BYTEBITS() \\\n    do { \\\n        hold >>= bits & 7; \\\n        bits -= bits & 7; \\\n    } while (0)\n\n/* Assure that some output space is available, by writing out the window\n   if it's full.  If the write fails, return from inflateBack() with a\n   Z_BUF_ERROR. */\n#define ROOM() \\\n    do { \\\n        if (left == 0) { \\\n            put = state->window; \\\n            left = state->wsize; \\\n            state->whave = left; \\\n            if (out(out_desc, put, left)) { \\\n                ret = Z_BUF_ERROR; \\\n                goto inf_leave; \\\n            } \\\n        } \\\n    } while (0)\n\n/*\n   strm provides the memory allocation functions and window buffer on input,\n   and provides information on the unused input on return.  For Z_DATA_ERROR\n   returns, strm will also provide an error message.\n\n   in() and out() are the call-back input and output functions.  When\n   inflateBack() needs more input, it calls in().  When inflateBack() has\n   filled the window with output, or when it completes with data in the\n   window, it calls out() to write out the data.  The application must not\n   change the provided input until in() is called again or inflateBack()\n   returns.  The application must not change the window/output buffer until\n   inflateBack() returns.\n\n   in() and out() are called with a descriptor parameter provided in the\n   inflateBack() call.  This parameter can be a structure that provides the\n   information required to do the read or write, as well as accumulated\n   information on the input and output such as totals and check values.\n\n   in() should return zero on failure.  out() should return non-zero on\n   failure.  If either in() or out() fails, than inflateBack() returns a\n   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it\n   was in() or out() that caused in the error.  Otherwise,  inflateBack()\n   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format\n   error, or Z_MEM_ERROR if it could not allocate memory for the state.\n   inflateBack() can also return Z_STREAM_ERROR if the input parameters\n   are not correct, i.e. strm is Z_NULL or the state was not initialized.\n */\nint ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)\nz_stream FAR *strm;\nin_func in;\nvoid FAR *in_desc;\nout_func out;\nvoid FAR *out_desc;\n{\n    struct inflate_state FAR *state;\n    unsigned char FAR *next;    /* next input */\n    unsigned char FAR *put;     /* next output */\n    unsigned have, left;        /* available input and output */\n    unsigned long hold;         /* bit buffer */\n    unsigned bits;              /* bits in bit buffer */\n    unsigned copy;              /* number of stored or match bytes to copy */\n    unsigned char FAR *from;    /* where to copy match bytes from */\n    code this;                  /* current decoding table entry */\n    code last;                  /* parent table entry */\n    unsigned len;               /* length to copy for repeats, bits to drop */\n    int ret;                    /* return code */\n    static const unsigned short order[19] = /* permutation of code lengths */\n        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};\n\n    /* Check that the strm exists and that the state was initialized */\n    if (strm == Z_NULL || strm->state == Z_NULL)\n        return Z_STREAM_ERROR;\n    state = (struct inflate_state FAR *)strm->state;\n\n    /* Reset the state */\n    strm->msg = Z_NULL;\n    state->mode = TYPE;\n    state->last = 0;\n    state->whave = 0;\n    next = strm->next_in;\n    have = next != Z_NULL ? strm->avail_in : 0;\n    hold = 0;\n    bits = 0;\n    put = state->window;\n    left = state->wsize;\n\n    /* Inflate until end of block marked as last */\n    for (;;)\n        switch (state->mode) {\n        case TYPE:\n            /* determine and dispatch block type */\n            if (state->last) {\n                BYTEBITS();\n                state->mode = DONE;\n                break;\n            }\n            NEEDBITS(3);\n            state->last = BITS(1);\n            DROPBITS(1);\n            switch (BITS(2)) {\n            case 0:                             /* stored block */\n                Tracev((stderr, \"inflate:     stored block%s\\n\",\n                        state->last ? \" (last)\" : \"\"));\n                state->mode = STORED;\n                break;\n            case 1:                             /* fixed block */\n                fixedtables(state);\n                Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n                        state->last ? \" (last)\" : \"\"));\n                state->mode = LEN;              /* decode codes */\n                break;\n            case 2:                             /* dynamic block */\n                Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n                        state->last ? \" (last)\" : \"\"));\n                state->mode = TABLE;\n                break;\n            case 3:\n                strm->msg = (char *)\"invalid block type\";\n                state->mode = BAD;\n            }\n            DROPBITS(2);\n            break;\n\n        case STORED:\n            /* get and verify stored block length */\n            BYTEBITS();                         /* go to byte boundary */\n            NEEDBITS(32);\n            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {\n                strm->msg = (char *)\"invalid stored block lengths\";\n                state->mode = BAD;\n                break;\n            }\n            state->length = (unsigned)hold & 0xffff;\n            Tracev((stderr, \"inflate:       stored length %u\\n\",\n                    state->length));\n            INITBITS();\n\n            /* copy stored block from input to output */\n            while (state->length != 0) {\n                copy = state->length;\n                PULL();\n                ROOM();\n                if (copy > have) copy = have;\n                if (copy > left) copy = left;\n                zmemcpy(put, next, copy);\n                have -= copy;\n                next += copy;\n                left -= copy;\n                put += copy;\n                state->length -= copy;\n            }\n            Tracev((stderr, \"inflate:       stored end\\n\"));\n            state->mode = TYPE;\n            break;\n\n        case TABLE:\n            /* get dynamic table entries descriptor */\n            NEEDBITS(14);\n            state->nlen = BITS(5) + 257;\n            DROPBITS(5);\n            state->ndist = BITS(5) + 1;\n            DROPBITS(5);\n            state->ncode = BITS(4) + 4;\n            DROPBITS(4);\n#ifndef PKZIP_BUG_WORKAROUND\n            if (state->nlen > 286 || state->ndist > 30) {\n                strm->msg = (char *)\"too many length or distance symbols\";\n                state->mode = BAD;\n                break;\n            }\n#endif\n            Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n\n            /* get code length code lengths (not a typo) */\n            state->have = 0;\n            while (state->have < state->ncode) {\n                NEEDBITS(3);\n                state->lens[order[state->have++]] = (unsigned short)BITS(3);\n                DROPBITS(3);\n            }\n            while (state->have < 19)\n                state->lens[order[state->have++]] = 0;\n            state->next = state->codes;\n            state->lencode = (code const FAR *)(state->next);\n            state->lenbits = 7;\n            ret = inflate_table(CODES, state->lens, 19, &(state->next),\n                                &(state->lenbits), state->work);\n            if (ret) {\n                strm->msg = (char *)\"invalid code lengths set\";\n                state->mode = BAD;\n                break;\n            }\n            Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n\n            /* get length and distance code code lengths */\n            state->have = 0;\n            while (state->have < state->nlen + state->ndist) {\n                for (;;) {\n                    this = state->lencode[BITS(state->lenbits)];\n                    if ((unsigned)(this.bits) <= bits) break;\n                    PULLBYTE();\n                }\n                if (this.val < 16) {\n                    NEEDBITS(this.bits);\n                    DROPBITS(this.bits);\n                    state->lens[state->have++] = this.val;\n                }\n                else {\n                    if (this.val == 16) {\n                        NEEDBITS(this.bits + 2);\n                        DROPBITS(this.bits);\n                        if (state->have == 0) {\n                            strm->msg = (char *)\"invalid bit length repeat\";\n                            state->mode = BAD;\n                            break;\n                        }\n                        len = (unsigned)(state->lens[state->have - 1]);\n                        copy = 3 + BITS(2);\n                        DROPBITS(2);\n                    }\n                    else if (this.val == 17) {\n                        NEEDBITS(this.bits + 3);\n                        DROPBITS(this.bits);\n                        len = 0;\n                        copy = 3 + BITS(3);\n                        DROPBITS(3);\n                    }\n                    else {\n                        NEEDBITS(this.bits + 7);\n                        DROPBITS(this.bits);\n                        len = 0;\n                        copy = 11 + BITS(7);\n                        DROPBITS(7);\n                    }\n                    if (state->have + copy > state->nlen + state->ndist) {\n                        strm->msg = (char *)\"invalid bit length repeat\";\n                        state->mode = BAD;\n                        break;\n                    }\n                    while (copy--)\n                        state->lens[state->have++] = (unsigned short)len;\n                }\n            }\n\n            /* build code tables */\n            state->next = state->codes;\n            state->lencode = (code const FAR *)(state->next);\n            state->lenbits = 9;\n            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),\n                                &(state->lenbits), state->work);\n            if (ret) {\n                strm->msg = (char *)\"invalid literal/lengths set\";\n                state->mode = BAD;\n                break;\n            }\n            state->distcode = (code const FAR *)(state->next);\n            state->distbits = 6;\n            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,\n                            &(state->next), &(state->distbits), state->work);\n            if (ret) {\n                strm->msg = (char *)\"invalid distances set\";\n                state->mode = BAD;\n                break;\n            }\n            Tracev((stderr, \"inflate:       codes ok\\n\"));\n            state->mode = LEN;\n\n        case LEN:\n            /* use inflate_fast() if we have enough input and output */\n            if (have >= 6 && left >= 258) {\n                RESTORE();\n                if (state->whave < state->wsize)\n                    state->whave = state->wsize - left;\n                inflate_fast(strm, state->wsize);\n                LOAD();\n                break;\n            }\n\n            /* get a literal, length, or end-of-block code */\n            for (;;) {\n                this = state->lencode[BITS(state->lenbits)];\n                if ((unsigned)(this.bits) <= bits) break;\n                PULLBYTE();\n            }\n            if (this.op && (this.op & 0xf0) == 0) {\n                last = this;\n                for (;;) {\n                    this = state->lencode[last.val +\n                            (BITS(last.bits + last.op) >> last.bits)];\n                    if ((unsigned)(last.bits + this.bits) <= bits) break;\n                    PULLBYTE();\n                }\n                DROPBITS(last.bits);\n            }\n            DROPBITS(this.bits);\n            state->length = (unsigned)this.val;\n\n            /* process literal */\n            if (this.op == 0) {\n                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?\n                        \"inflate:         literal '%c'\\n\" :\n                        \"inflate:         literal 0x%02x\\n\", this.val));\n                ROOM();\n                *put++ = (unsigned char)(state->length);\n                left--;\n                state->mode = LEN;\n                break;\n            }\n\n            /* process end of block */\n            if (this.op & 32) {\n                Tracevv((stderr, \"inflate:         end of block\\n\"));\n                state->mode = TYPE;\n                break;\n            }\n\n            /* invalid code */\n            if (this.op & 64) {\n                strm->msg = (char *)\"invalid literal/length code\";\n                state->mode = BAD;\n                break;\n            }\n\n            /* length code -- get extra bits, if any */\n            state->extra = (unsigned)(this.op) & 15;\n            if (state->extra != 0) {\n                NEEDBITS(state->extra);\n                state->length += BITS(state->extra);\n                DROPBITS(state->extra);\n            }\n            Tracevv((stderr, \"inflate:         length %u\\n\", state->length));\n\n            /* get distance code */\n            for (;;) {\n                this = state->distcode[BITS(state->distbits)];\n                if ((unsigned)(this.bits) <= bits) break;\n                PULLBYTE();\n            }\n            if ((this.op & 0xf0) == 0) {\n                last = this;\n                for (;;) {\n                    this = state->distcode[last.val +\n                            (BITS(last.bits + last.op) >> last.bits)];\n                    if ((unsigned)(last.bits + this.bits) <= bits) break;\n                    PULLBYTE();\n                }\n                DROPBITS(last.bits);\n            }\n            DROPBITS(this.bits);\n            if (this.op & 64) {\n                strm->msg = (char *)\"invalid distance code\";\n                state->mode = BAD;\n                break;\n            }\n            state->offset = (unsigned)this.val;\n\n            /* get distance extra bits, if any */\n            state->extra = (unsigned)(this.op) & 15;\n            if (state->extra != 0) {\n                NEEDBITS(state->extra);\n                state->offset += BITS(state->extra);\n                DROPBITS(state->extra);\n            }\n            if (state->offset > state->wsize - (state->whave < state->wsize ?\n                                                left : 0)) {\n                strm->msg = (char *)\"invalid distance too far back\";\n                state->mode = BAD;\n                break;\n            }\n            Tracevv((stderr, \"inflate:         distance %u\\n\", state->offset));\n\n            /* copy match from window to output */\n            do {\n                ROOM();\n                copy = state->wsize - state->offset;\n                if (copy < left) {\n                    from = put + copy;\n                    copy = left - copy;\n                }\n                else {\n                    from = put - state->offset;\n                    copy = left;\n                }\n                if (copy > state->length) copy = state->length;\n                state->length -= copy;\n                left -= copy;\n                do {\n                    *put++ = *from++;\n                } while (--copy);\n            } while (state->length != 0);\n            break;\n\n        case DONE:\n            /* inflate stream terminated properly -- write leftover output */\n            ret = Z_STREAM_END;\n            if (left < state->wsize) {\n                if (out(out_desc, state->window, state->wsize - left))\n                    ret = Z_BUF_ERROR;\n            }\n            goto inf_leave;\n\n        case BAD:\n            ret = Z_DATA_ERROR;\n            goto inf_leave;\n\n        default:                /* can't happen, but makes compilers happy */\n            ret = Z_STREAM_ERROR;\n            goto inf_leave;\n        }\n\n    /* Return unused input */\n  inf_leave:\n    strm->next_in = next;\n    strm->avail_in = have;\n    return ret;\n}\n\nint ZEXPORT inflateBackEnd(strm)\nz_stream FAR *strm;\n{\n    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)\n        return Z_STREAM_ERROR;\n    ZFREE(strm, strm->state);\n    strm->state = Z_NULL;\n    Tracev((stderr, \"inflate: end\\n\"));\n    return Z_OK;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/inffast.c",
    "content": "/* inffast.c -- fast decoding\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n#include \"zutil.h\"\n#include \"inftrees.h\"\n#include \"inflate.h\"\n#include \"inffast.h\"\n\n#ifndef ASMINF\n\n/* Allow machine dependent optimization for post-increment or pre-increment.\n   Based on testing to date,\n   Pre-increment preferred for:\n   - PowerPC G3 (Adler)\n   - MIPS R5000 (Randers-Pehrson)\n   Post-increment preferred for:\n   - none\n   No measurable difference:\n   - Pentium III (Anderson)\n   - 68060 (Nikl)\n */\n#ifdef POSTINC\n#  define OFF 0\n#  define PUP(a) *(a)++\n#else\n#  define OFF 1\n#  define PUP(a) *++(a)\n#endif\n\n/*\n   Decode literal, length, and distance codes and write out the resulting\n   literal and match bytes until either not enough input or output is\n   available, an end-of-block is encountered, or a data error is encountered.\n   When large enough input and output buffers are supplied to inflate(), for\n   example, a 16K input buffer and a 64K output buffer, more than 95% of the\n   inflate execution time is spent in this routine.\n\n   Entry assumptions:\n\n        state->mode == LEN\n        strm->avail_in >= 6\n        strm->avail_out >= 258\n        start >= strm->avail_out\n        state->bits < 8\n\n   On return, state->mode is one of:\n\n        LEN -- ran out of enough output space or enough available input\n        TYPE -- reached end of block code, inflate() to interpret next block\n        BAD -- error in block data\n\n   Notes:\n\n    - The maximum input bits used by a length/distance pair is 15 bits for the\n      length code, 5 bits for the length extra, 15 bits for the distance code,\n      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.\n      Therefore if strm->avail_in >= 6, then there is enough input to avoid\n      checking for available input while decoding.\n\n    - The maximum bytes that a single length/distance pair can output is 258\n      bytes, which is the maximum length that can be coded.  inflate_fast()\n      requires strm->avail_out >= 258 for each loop to avoid checking for\n      output space.\n */\nvoid inflate_fast(strm, start)\nz_streamp strm;\nunsigned start;         /* inflate()'s starting value for strm->avail_out */\n{\n    struct inflate_state FAR *state;\n    unsigned char FAR *in;      /* local strm->next_in */\n    unsigned char FAR *last;    /* while in < last, enough input available */\n    unsigned char FAR *out;     /* local strm->next_out */\n    unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */\n    unsigned char FAR *end;     /* while out < end, enough space available */\n    unsigned wsize;             /* window size or zero if not using window */\n    unsigned whave;             /* valid bytes in the window */\n    unsigned write;             /* window write index */\n    unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */\n    unsigned long hold;         /* local strm->hold */\n    unsigned bits;              /* local strm->bits */\n    code const FAR *lcode;      /* local strm->lencode */\n    code const FAR *dcode;      /* local strm->distcode */\n    unsigned lmask;             /* mask for first level of length codes */\n    unsigned dmask;             /* mask for first level of distance codes */\n    code this;                  /* retrieved table entry */\n    unsigned op;                /* code bits, operation, extra bits, or */\n                                /*  window position, window bytes to copy */\n    unsigned len;               /* match length, unused bytes */\n    unsigned dist;              /* match distance */\n    unsigned char FAR *from;    /* where to copy match from */\n\n    /* copy state to local variables */\n    state = (struct inflate_state FAR *)strm->state;\n    in = strm->next_in - OFF;\n    last = in + (strm->avail_in - 5);\n    out = strm->next_out - OFF;\n    beg = out - (start - strm->avail_out);\n    end = out + (strm->avail_out - 257);\n    wsize = state->wsize;\n    whave = state->whave;\n    write = state->write;\n    window = state->window;\n    hold = state->hold;\n    bits = state->bits;\n    lcode = state->lencode;\n    dcode = state->distcode;\n    lmask = (1U << state->lenbits) - 1;\n    dmask = (1U << state->distbits) - 1;\n\n    /* decode literals and length/distances until end-of-block or not enough\n       input data or output space */\n    do {\n        if (bits < 15) {\n            hold += (unsigned long)(PUP(in)) << bits;\n            bits += 8;\n            hold += (unsigned long)(PUP(in)) << bits;\n            bits += 8;\n        }\n        this = lcode[hold & lmask];\n      dolen:\n        op = (unsigned)(this.bits);\n        hold >>= op;\n        bits -= op;\n        op = (unsigned)(this.op);\n        if (op == 0) {                          /* literal */\n            Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?\n                    \"inflate:         literal '%c'\\n\" :\n                    \"inflate:         literal 0x%02x\\n\", this.val));\n            PUP(out) = (unsigned char)(this.val);\n        }\n        else if (op & 16) {                     /* length base */\n            len = (unsigned)(this.val);\n            op &= 15;                           /* number of extra bits */\n            if (op) {\n                if (bits < op) {\n                    hold += (unsigned long)(PUP(in)) << bits;\n                    bits += 8;\n                }\n                len += (unsigned)hold & ((1U << op) - 1);\n                hold >>= op;\n                bits -= op;\n            }\n            Tracevv((stderr, \"inflate:         length %u\\n\", len));\n            if (bits < 15) {\n                hold += (unsigned long)(PUP(in)) << bits;\n                bits += 8;\n                hold += (unsigned long)(PUP(in)) << bits;\n                bits += 8;\n            }\n            this = dcode[hold & dmask];\n          dodist:\n            op = (unsigned)(this.bits);\n            hold >>= op;\n            bits -= op;\n            op = (unsigned)(this.op);\n            if (op & 16) {                      /* distance base */\n                dist = (unsigned)(this.val);\n                op &= 15;                       /* number of extra bits */\n                if (bits < op) {\n                    hold += (unsigned long)(PUP(in)) << bits;\n                    bits += 8;\n                    if (bits < op) {\n                        hold += (unsigned long)(PUP(in)) << bits;\n                        bits += 8;\n                    }\n                }\n                dist += (unsigned)hold & ((1U << op) - 1);\n                hold >>= op;\n                bits -= op;\n                Tracevv((stderr, \"inflate:         distance %u\\n\", dist));\n                op = (unsigned)(out - beg);     /* max distance in output */\n                if (dist > op) {                /* see if copy from window */\n                    op = dist - op;             /* distance back in window */\n                    if (op > whave) {\n                        strm->msg = (char *)\"invalid distance too far back\";\n                        state->mode = BAD;\n                        break;\n                    }\n                    from = window - OFF;\n                    if (write == 0) {           /* very common case */\n                        from += wsize - op;\n                        if (op < len) {         /* some from window */\n                            len -= op;\n                            do {\n                                PUP(out) = PUP(from);\n                            } while (--op);\n                            from = out - dist;  /* rest from output */\n                        }\n                    }\n                    else if (write < op) {      /* wrap around window */\n                        from += wsize + write - op;\n                        op -= write;\n                        if (op < len) {         /* some from end of window */\n                            len -= op;\n                            do {\n                                PUP(out) = PUP(from);\n                            } while (--op);\n                            from = window - OFF;\n                            if (write < len) {  /* some from start of window */\n                                op = write;\n                                len -= op;\n                                do {\n                                    PUP(out) = PUP(from);\n                                } while (--op);\n                                from = out - dist;      /* rest from output */\n                            }\n                        }\n                    }\n                    else {                      /* contiguous in window */\n                        from += write - op;\n                        if (op < len) {         /* some from window */\n                            len -= op;\n                            do {\n                                PUP(out) = PUP(from);\n                            } while (--op);\n                            from = out - dist;  /* rest from output */\n                        }\n                    }\n                    while (len > 2) {\n                        PUP(out) = PUP(from);\n                        PUP(out) = PUP(from);\n                        PUP(out) = PUP(from);\n                        len -= 3;\n                    }\n                    if (len) {\n                        PUP(out) = PUP(from);\n                        if (len > 1)\n                            PUP(out) = PUP(from);\n                    }\n                }\n                else {\n                    from = out - dist;          /* copy direct from output */\n                    do {                        /* minimum length is three */\n                        PUP(out) = PUP(from);\n                        PUP(out) = PUP(from);\n                        PUP(out) = PUP(from);\n                        len -= 3;\n                    } while (len > 2);\n                    if (len) {\n                        PUP(out) = PUP(from);\n                        if (len > 1)\n                            PUP(out) = PUP(from);\n                    }\n                }\n            }\n            else if ((op & 64) == 0) {          /* 2nd level distance code */\n                this = dcode[this.val + (hold & ((1U << op) - 1))];\n                goto dodist;\n            }\n            else {\n                strm->msg = (char *)\"invalid distance code\";\n                state->mode = BAD;\n                break;\n            }\n        }\n        else if ((op & 64) == 0) {              /* 2nd level length code */\n            this = lcode[this.val + (hold & ((1U << op) - 1))];\n            goto dolen;\n        }\n        else if (op & 32) {                     /* end-of-block */\n            Tracevv((stderr, \"inflate:         end of block\\n\"));\n            state->mode = TYPE;\n            break;\n        }\n        else {\n            strm->msg = (char *)\"invalid literal/length code\";\n            state->mode = BAD;\n            break;\n        }\n    } while (in < last && out < end);\n\n    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n    len = bits >> 3;\n    in -= len;\n    bits -= len << 3;\n    hold &= (1U << bits) - 1;\n\n    /* update state and return */\n    strm->next_in = in + OFF;\n    strm->next_out = out + OFF;\n    strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));\n    strm->avail_out = (unsigned)(out < end ?\n                                 257 + (end - out) : 257 - (out - end));\n    state->hold = hold;\n    state->bits = bits;\n    return;\n}\n\n/*\n   inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):\n   - Using bit fields for code structure\n   - Different op definition to avoid & for extra bits (do & for table bits)\n   - Three separate decoding do-loops for direct, window, and write == 0\n   - Special case for distance > 1 copies to do overlapped load and store copy\n   - Explicit branch predictions (based on measured branch probabilities)\n   - Deferring match copy and interspersed it with decoding subsequent codes\n   - Swapping literal/length else\n   - Swapping window/direct else\n   - Larger unrolled copy loops (three is about right)\n   - Moving len -= 3 statement into middle of loop\n */\n\n#endif /* !ASMINF */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/inffast.h",
    "content": "/* inffast.h -- header to use inffast.c\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\nvoid inflate_fast OF((z_streamp strm, unsigned start));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/inffixed.h",
    "content": "    /* inffixed.h -- table for decoding fixed codes\n     * Generated automatically by makefixed().\n     */\n\n    /* WARNING: this file should *not* be used by applications. It\n       is part of the implementation of the compression library and\n       is subject to change. Applications should only use zlib.h.\n     */\n\n    static const code lenfix[512] = {\n        {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},\n        {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},\n        {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},\n        {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},\n        {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},\n        {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},\n        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},\n        {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},\n        {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},\n        {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},\n        {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},\n        {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},\n        {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},\n        {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},\n        {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},\n        {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},\n        {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},\n        {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},\n        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},\n        {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},\n        {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},\n        {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},\n        {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},\n        {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},\n        {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},\n        {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},\n        {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},\n        {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},\n        {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},\n        {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},\n        {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},\n        {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},\n        {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},\n        {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},\n        {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},\n        {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},\n        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},\n        {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},\n        {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},\n        {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},\n        {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},\n        {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},\n        {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},\n        {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},\n        {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},\n        {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},\n        {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},\n        {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},\n        {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},\n        {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},\n        {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},\n        {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},\n        {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},\n        {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},\n        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},\n        {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},\n        {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},\n        {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},\n        {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},\n        {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},\n        {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},\n        {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},\n        {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},\n        {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},\n        {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},\n        {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},\n        {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},\n        {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},\n        {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},\n        {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},\n        {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},\n        {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},\n        {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},\n        {0,9,255}\n    };\n\n    static const code distfix[32] = {\n        {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},\n        {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},\n        {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},\n        {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},\n        {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},\n        {22,5,193},{64,5,0}\n    };\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/inflate.c",
    "content": "/* inflate.c -- zlib decompression\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/*\n * Change history:\n *\n * 1.2.beta0    24 Nov 2002\n * - First version -- complete rewrite of inflate to simplify code, avoid\n *   creation of window when not needed, minimize use of window when it is\n *   needed, make inffast.c even faster, implement gzip decoding, and to\n *   improve code readability and style over the previous zlib inflate code\n *\n * 1.2.beta1    25 Nov 2002\n * - Use pointers for available input and output checking in inffast.c\n * - Remove input and output counters in inffast.c\n * - Change inffast.c entry and loop from avail_in >= 7 to >= 6\n * - Remove unnecessary second byte pull from length extra in inffast.c\n * - Unroll direct copy to three copies per loop in inffast.c\n *\n * 1.2.beta2    4 Dec 2002\n * - Change external routine names to reduce potential conflicts\n * - Correct filename to inffixed.h for fixed tables in inflate.c\n * - Make hbuf[] unsigned char to match parameter type in inflate.c\n * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)\n *   to avoid negation problem on Alphas (64 bit) in inflate.c\n *\n * 1.2.beta3    22 Dec 2002\n * - Add comments on state->bits assertion in inffast.c\n * - Add comments on op field in inftrees.h\n * - Fix bug in reuse of allocated window after inflateReset()\n * - Remove bit fields--back to byte structure for speed\n * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths\n * - Change post-increments to pre-increments in inflate_fast(), PPC biased?\n * - Add compile time option, POSTINC, to use post-increments instead (Intel?)\n * - Make MATCH copy in inflate() much faster for when inflate_fast() not used\n * - Use local copies of stream next and avail values, as well as local bit\n *   buffer and bit count in inflate()--for speed when inflate_fast() not used\n *\n * 1.2.beta4    1 Jan 2003\n * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings\n * - Move a comment on output buffer sizes from inffast.c to inflate.c\n * - Add comments in inffast.c to introduce the inflate_fast() routine\n * - Rearrange window copies in inflate_fast() for speed and simplification\n * - Unroll last copy for window match in inflate_fast()\n * - Use local copies of window variables in inflate_fast() for speed\n * - Pull out common write == 0 case for speed in inflate_fast()\n * - Make op and len in inflate_fast() unsigned for consistency\n * - Add FAR to lcode and dcode declarations in inflate_fast()\n * - Simplified bad distance check in inflate_fast()\n * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new\n *   source file infback.c to provide a call-back interface to inflate for\n *   programs like gzip and unzip -- uses window as output buffer to avoid\n *   window copying\n *\n * 1.2.beta5    1 Jan 2003\n * - Improved inflateBack() interface to allow the caller to provide initial\n *   input in strm.\n * - Fixed stored blocks bug in inflateBack()\n *\n * 1.2.beta6    4 Jan 2003\n * - Added comments in inffast.c on effectiveness of POSTINC\n * - Typecasting all around to reduce compiler warnings\n * - Changed loops from while (1) or do {} while (1) to for (;;), again to\n *   make compilers happy\n * - Changed type of window in inflateBackInit() to unsigned char *\n *\n * 1.2.beta7    27 Jan 2003\n * - Changed many types to unsigned or unsigned short to avoid warnings\n * - Added inflateCopy() function\n *\n * 1.2.0        9 Mar 2003\n * - Changed inflateBack() interface to provide separate opaque descriptors\n *   for the in() and out() functions\n * - Changed inflateBack() argument and in_func typedef to swap the length\n *   and buffer address return values for the input function\n * - Check next_in and next_out for Z_NULL on entry to inflate()\n *\n * The history for versions after 1.2.0 are in ChangeLog in zlib distribution.\n */\n\n#include \"zutil.h\"\n#include \"inftrees.h\"\n#include \"inflate.h\"\n#include \"inffast.h\"\n\n#ifdef MAKEFIXED\n#  ifndef BUILDFIXED\n#    define BUILDFIXED\n#  endif\n#endif\n\n/* function prototypes */\nlocal void fixedtables OF((struct inflate_state FAR *state));\nlocal int updatewindow OF((z_streamp strm, unsigned out));\n#ifdef BUILDFIXED\n   void makefixed OF((void));\n#endif\nlocal unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,\n                              unsigned len));\n\nint ZEXPORT inflateReset(strm)\nz_streamp strm;\n{\n    struct inflate_state FAR *state;\n\n    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;\n    state = (struct inflate_state FAR *)strm->state;\n    strm->total_in = strm->total_out = state->total = 0;\n    strm->msg = Z_NULL;\n    state->mode = HEAD;\n    state->last = 0;\n    state->havedict = 0;\n    state->wsize = 0;\n    state->whave = 0;\n    state->hold = 0;\n    state->bits = 0;\n    state->lencode = state->distcode = state->next = state->codes;\n    Tracev((stderr, \"inflate: reset\\n\"));\n    return Z_OK;\n}\n\nint ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)\nz_streamp strm;\nint windowBits;\nconst char *version;\nint stream_size;\n{\n    struct inflate_state FAR *state;\n\n    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||\n        stream_size != (int)(sizeof(z_stream)))\n        return Z_VERSION_ERROR;\n    if (strm == Z_NULL) return Z_STREAM_ERROR;\n    strm->msg = Z_NULL;                 /* in case we return an error */\n    if (strm->zalloc == (alloc_func)0) {\n        strm->zalloc = zcalloc;\n        strm->opaque = (voidpf)0;\n    }\n    if (strm->zfree == (free_func)0) strm->zfree = zcfree;\n    state = (struct inflate_state FAR *)\n            ZALLOC(strm, 1, sizeof(struct inflate_state));\n    if (state == Z_NULL) return Z_MEM_ERROR;\n    Tracev((stderr, \"inflate: allocated\\n\"));\n    strm->state = (voidpf)state;\n    if (windowBits < 0) {\n        state->wrap = 0;\n        windowBits = -windowBits;\n    }\n    else {\n        state->wrap = (windowBits >> 4) + 1;\n#ifdef GUNZIP\n        if (windowBits < 48) windowBits &= 15;\n#endif\n    }\n    if (windowBits < 8 || windowBits > 15) {\n        ZFREE(strm, state);\n        strm->state = Z_NULL;\n        return Z_STREAM_ERROR;\n    }\n    state->wbits = (unsigned)windowBits;\n    state->window = Z_NULL;\n    return inflateReset(strm);\n}\n\nint ZEXPORT inflateInit_(strm, version, stream_size)\nz_streamp strm;\nconst char *version;\nint stream_size;\n{\n    return inflateInit2_(strm, DEF_WBITS, version, stream_size);\n}\n\n/*\n   Return state with length and distance decoding tables and index sizes set to\n   fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n   If BUILDFIXED is defined, then instead this routine builds the tables the\n   first time it's called, and returns those tables the first time and\n   thereafter.  This reduces the size of the code by about 2K bytes, in\n   exchange for a little execution time.  However, BUILDFIXED should not be\n   used for threaded applications, since the rewriting of the tables and virgin\n   may not be thread-safe.\n */\nlocal void fixedtables(state)\nstruct inflate_state FAR *state;\n{\n#ifdef BUILDFIXED\n    static int virgin = 1;\n    static code *lenfix, *distfix;\n    static code fixed[544];\n\n    /* build fixed huffman tables if first call (may not be thread safe) */\n    if (virgin) {\n        unsigned sym, bits;\n        static code *next;\n\n        /* literal/length table */\n        sym = 0;\n        while (sym < 144) state->lens[sym++] = 8;\n        while (sym < 256) state->lens[sym++] = 9;\n        while (sym < 280) state->lens[sym++] = 7;\n        while (sym < 288) state->lens[sym++] = 8;\n        next = fixed;\n        lenfix = next;\n        bits = 9;\n        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);\n\n        /* distance table */\n        sym = 0;\n        while (sym < 32) state->lens[sym++] = 5;\n        distfix = next;\n        bits = 5;\n        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);\n\n        /* do this just once */\n        virgin = 0;\n    }\n#else /* !BUILDFIXED */\n#   include \"inffixed.h\"\n#endif /* BUILDFIXED */\n    state->lencode = lenfix;\n    state->lenbits = 9;\n    state->distcode = distfix;\n    state->distbits = 5;\n}\n\n#ifdef MAKEFIXED\n#include <stdio.h>\n\n/*\n   Write out the inffixed.h that is #include'd above.  Defining MAKEFIXED also\n   defines BUILDFIXED, so the tables are built on the fly.  makefixed() writes\n   those tables to stdout, which would be piped to inffixed.h.  A small program\n   can simply call makefixed to do this:\n\n    void makefixed(void);\n\n    int main(void)\n    {\n        makefixed();\n        return 0;\n    }\n\n   Then that can be linked with zlib built with MAKEFIXED defined and run:\n\n    a.out > inffixed.h\n */\nvoid makefixed()\n{\n    unsigned low, size;\n    struct inflate_state state;\n\n    fixedtables(&state);\n    puts(\"    /* inffixed.h -- table for decoding fixed codes\");\n    puts(\"     * Generated automatically by makefixed().\");\n    puts(\"     */\");\n    puts(\"\");\n    puts(\"    /* WARNING: this file should *not* be used by applications.\");\n    puts(\"       It is part of the implementation of this library and is\");\n    puts(\"       subject to change. Applications should only use zlib.h.\");\n    puts(\"     */\");\n    puts(\"\");\n    size = 1U << 9;\n    printf(\"    static const code lenfix[%u] = {\", size);\n    low = 0;\n    for (;;) {\n        if ((low % 7) == 0) printf(\"\\n        \");\n        printf(\"{%u,%u,%d}\", state.lencode[low].op, state.lencode[low].bits,\n               state.lencode[low].val);\n        if (++low == size) break;\n        putchar(',');\n    }\n    puts(\"\\n    };\");\n    size = 1U << 5;\n    printf(\"\\n    static const code distfix[%u] = {\", size);\n    low = 0;\n    for (;;) {\n        if ((low % 6) == 0) printf(\"\\n        \");\n        printf(\"{%u,%u,%d}\", state.distcode[low].op, state.distcode[low].bits,\n               state.distcode[low].val);\n        if (++low == size) break;\n        putchar(',');\n    }\n    puts(\"\\n    };\");\n}\n#endif /* MAKEFIXED */\n\n/*\n   Update the window with the last wsize (normally 32K) bytes written before\n   returning.  If window does not exist yet, create it.  This is only called\n   when a window is already in use, or when output has been written during this\n   inflate call, but the end of the deflate stream has not been reached yet.\n   It is also called to create a window for dictionary data when a dictionary\n   is loaded.\n\n   Providing output buffers larger than 32K to inflate() should provide a speed\n   advantage, since only the last 32K of output is copied to the sliding window\n   upon return from inflate(), and since all distances after the first 32K of\n   output will fall in the output data, making match copies simpler and faster.\n   The advantage may be dependent on the size of the processor's data caches.\n */\nlocal int updatewindow(strm, out)\nz_streamp strm;\nunsigned out;\n{\n    struct inflate_state FAR *state;\n    unsigned copy, dist;\n\n    state = (struct inflate_state FAR *)strm->state;\n\n    /* if it hasn't been done already, allocate space for the window */\n    if (state->window == Z_NULL) {\n        state->window = (unsigned char FAR *)\n                        ZALLOC(strm, 1U << state->wbits,\n                               sizeof(unsigned char));\n        if (state->window == Z_NULL) return 1;\n    }\n\n    /* if window not in use yet, initialize */\n    if (state->wsize == 0) {\n        state->wsize = 1U << state->wbits;\n        state->write = 0;\n        state->whave = 0;\n    }\n\n    /* copy state->wsize or less output bytes into the circular window */\n    copy = out - strm->avail_out;\n    if (copy >= state->wsize) {\n        zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);\n        state->write = 0;\n        state->whave = state->wsize;\n    }\n    else {\n        dist = state->wsize - state->write;\n        if (dist > copy) dist = copy;\n        zmemcpy(state->window + state->write, strm->next_out - copy, dist);\n        copy -= dist;\n        if (copy) {\n            zmemcpy(state->window, strm->next_out - copy, copy);\n            state->write = copy;\n            state->whave = state->wsize;\n        }\n        else {\n            state->write += dist;\n            if (state->write == state->wsize) state->write = 0;\n            if (state->whave < state->wsize) state->whave += dist;\n        }\n    }\n    return 0;\n}\n\n/* Macros for inflate(): */\n\n/* check function to use adler32() for zlib or crc32() for gzip */\n#ifdef GUNZIP\n#  define UPDATE(check, buf, len) \\\n    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))\n#else\n#  define UPDATE(check, buf, len) adler32(check, buf, len)\n#endif\n\n/* check macros for header crc */\n#ifdef GUNZIP\n#  define CRC2(check, word) \\\n    do { \\\n        hbuf[0] = (unsigned char)(word); \\\n        hbuf[1] = (unsigned char)((word) >> 8); \\\n        check = crc32(check, hbuf, 2); \\\n    } while (0)\n\n#  define CRC4(check, word) \\\n    do { \\\n        hbuf[0] = (unsigned char)(word); \\\n        hbuf[1] = (unsigned char)((word) >> 8); \\\n        hbuf[2] = (unsigned char)((word) >> 16); \\\n        hbuf[3] = (unsigned char)((word) >> 24); \\\n        check = crc32(check, hbuf, 4); \\\n    } while (0)\n#endif\n\n/* Load registers with state in inflate() for speed */\n#define LOAD() \\\n    do { \\\n        put = strm->next_out; \\\n        left = strm->avail_out; \\\n        next = strm->next_in; \\\n        have = strm->avail_in; \\\n        hold = state->hold; \\\n        bits = state->bits; \\\n    } while (0)\n\n/* Restore state from registers in inflate() */\n#define RESTORE() \\\n    do { \\\n        strm->next_out = put; \\\n        strm->avail_out = left; \\\n        strm->next_in = next; \\\n        strm->avail_in = have; \\\n        state->hold = hold; \\\n        state->bits = bits; \\\n    } while (0)\n\n/* Clear the input bit accumulator */\n#define INITBITS() \\\n    do { \\\n        hold = 0; \\\n        bits = 0; \\\n    } while (0)\n\n/* Get a byte of input into the bit accumulator, or return from inflate()\n   if there is no input available. */\n#define PULLBYTE() \\\n    do { \\\n        if (have == 0) goto inf_leave; \\\n        have--; \\\n        hold += (unsigned long)(*next++) << bits; \\\n        bits += 8; \\\n    } while (0)\n\n/* Assure that there are at least n bits in the bit accumulator.  If there is\n   not enough available input to do that, then return from inflate(). */\n#define NEEDBITS(n) \\\n    do { \\\n        while (bits < (unsigned)(n)) \\\n            PULLBYTE(); \\\n    } while (0)\n\n/* Return the low n bits of the bit accumulator (n < 16) */\n#define BITS(n) \\\n    ((unsigned)hold & ((1U << (n)) - 1))\n\n/* Remove n bits from the bit accumulator */\n#define DROPBITS(n) \\\n    do { \\\n        hold >>= (n); \\\n        bits -= (unsigned)(n); \\\n    } while (0)\n\n/* Remove zero to seven bits as needed to go to a byte boundary */\n#define BYTEBITS() \\\n    do { \\\n        hold >>= bits & 7; \\\n        bits -= bits & 7; \\\n    } while (0)\n\n/* Reverse the bytes in a 32-bit value */\n#define REVERSE(q) \\\n    ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \\\n     (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))\n\n/*\n   inflate() uses a state machine to process as much input data and generate as\n   much output data as possible before returning.  The state machine is\n   structured roughly as follows:\n\n    for (;;) switch (state) {\n    ...\n    case STATEn:\n        if (not enough input data or output space to make progress)\n            return;\n        ... make progress ...\n        state = STATEm;\n        break;\n    ...\n    }\n\n   so when inflate() is called again, the same case is attempted again, and\n   if the appropriate resources are provided, the machine proceeds to the\n   next state.  The NEEDBITS() macro is usually the way the state evaluates\n   whether it can proceed or should return.  NEEDBITS() does the return if\n   the requested bits are not available.  The typical use of the BITS macros\n   is:\n\n        NEEDBITS(n);\n        ... do something with BITS(n) ...\n        DROPBITS(n);\n\n   where NEEDBITS(n) either returns from inflate() if there isn't enough\n   input left to load n bits into the accumulator, or it continues.  BITS(n)\n   gives the low n bits in the accumulator.  When done, DROPBITS(n) drops\n   the low n bits off the accumulator.  INITBITS() clears the accumulator\n   and sets the number of available bits to zero.  BYTEBITS() discards just\n   enough bits to put the accumulator on a byte boundary.  After BYTEBITS()\n   and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.\n\n   NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return\n   if there is no input available.  The decoding of variable length codes uses\n   PULLBYTE() directly in order to pull just enough bytes to decode the next\n   code, and no more.\n\n   Some states loop until they get enough input, making sure that enough\n   state information is maintained to continue the loop where it left off\n   if NEEDBITS() returns in the loop.  For example, want, need, and keep\n   would all have to actually be part of the saved state in case NEEDBITS()\n   returns:\n\n    case STATEw:\n        while (want < need) {\n            NEEDBITS(n);\n            keep[want++] = BITS(n);\n            DROPBITS(n);\n        }\n        state = STATEx;\n    case STATEx:\n\n   As shown above, if the next state is also the next case, then the break\n   is omitted.\n\n   A state may also return if there is not enough output space available to\n   complete that state.  Those states are copying stored data, writing a\n   literal byte, and copying a matching string.\n\n   When returning, a \"goto inf_leave\" is used to update the total counters,\n   update the check value, and determine whether any progress has been made\n   during that inflate() call in order to return the proper return code.\n   Progress is defined as a change in either strm->avail_in or strm->avail_out.\n   When there is a window, goto inf_leave will update the window with the last\n   output written.  If a goto inf_leave occurs in the middle of decompression\n   and there is no window currently, goto inf_leave will create one and copy\n   output to the window for the next call of inflate().\n\n   In this implementation, the flush parameter of inflate() only affects the\n   return code (per zlib.h).  inflate() always writes as much as possible to\n   strm->next_out, given the space available and the provided input--the effect\n   documented in zlib.h of Z_SYNC_FLUSH.  Furthermore, inflate() always defers\n   the allocation of and copying into a sliding window until necessary, which\n   provides the effect documented in zlib.h for Z_FINISH when the entire input\n   stream available.  So the only thing the flush parameter actually does is:\n   when flush is set to Z_FINISH, inflate() cannot return Z_OK.  Instead it\n   will return Z_BUF_ERROR if it has not reached the end of the stream.\n */\n\nint ZEXPORT inflate(strm, flush)\nz_streamp strm;\nint flush;\n{\n    struct inflate_state FAR *state;\n    unsigned char FAR *next;    /* next input */\n    unsigned char FAR *put;     /* next output */\n    unsigned have, left;        /* available input and output */\n    unsigned long hold;         /* bit buffer */\n    unsigned bits;              /* bits in bit buffer */\n    unsigned in, out;           /* save starting available input and output */\n    unsigned copy;              /* number of stored or match bytes to copy */\n    unsigned char FAR *from;    /* where to copy match bytes from */\n    code this;                  /* current decoding table entry */\n    code last;                  /* parent table entry */\n    unsigned len;               /* length to copy for repeats, bits to drop */\n    int ret;                    /* return code */\n#ifdef GUNZIP\n    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */\n#endif\n    static const unsigned short order[19] = /* permutation of code lengths */\n        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};\n\n    if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||\n        (strm->next_in == Z_NULL && strm->avail_in != 0))\n        return Z_STREAM_ERROR;\n\n    state = (struct inflate_state FAR *)strm->state;\n    if (state->mode == TYPE) state->mode = TYPEDO;      /* skip check */\n    LOAD();\n    in = have;\n    out = left;\n    ret = Z_OK;\n    for (;;)\n        switch (state->mode) {\n        case HEAD:\n            if (state->wrap == 0) {\n                state->mode = TYPEDO;\n                break;\n            }\n            NEEDBITS(16);\n#ifdef GUNZIP\n            if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */\n                state->check = crc32(0L, Z_NULL, 0);\n                CRC2(state->check, hold);\n                INITBITS();\n                state->mode = FLAGS;\n                break;\n            }\n            state->flags = 0;           /* expect zlib header */\n            if (!(state->wrap & 1) ||   /* check if zlib header allowed */\n#else\n            if (\n#endif\n                ((BITS(8) << 8) + (hold >> 8)) % 31) {\n                strm->msg = (char *)\"incorrect header check\";\n                state->mode = BAD;\n                break;\n            }\n            if (BITS(4) != Z_DEFLATED) {\n                strm->msg = (char *)\"unknown compression method\";\n                state->mode = BAD;\n                break;\n            }\n            DROPBITS(4);\n            if (BITS(4) + 8 > state->wbits) {\n                strm->msg = (char *)\"invalid window size\";\n                state->mode = BAD;\n                break;\n            }\n            Tracev((stderr, \"inflate:   zlib header ok\\n\"));\n            strm->adler = state->check = adler32(0L, Z_NULL, 0);\n            state->mode = hold & 0x200 ? DICTID : TYPE;\n            INITBITS();\n            break;\n#ifdef GUNZIP\n        case FLAGS:\n            NEEDBITS(16);\n            state->flags = (int)(hold);\n            if ((state->flags & 0xff) != Z_DEFLATED) {\n                strm->msg = (char *)\"unknown compression method\";\n                state->mode = BAD;\n                break;\n            }\n            if (state->flags & 0xe000) {\n                strm->msg = (char *)\"unknown header flags set\";\n                state->mode = BAD;\n                break;\n            }\n            if (state->flags & 0x0200) CRC2(state->check, hold);\n            INITBITS();\n            state->mode = TIME;\n        case TIME:\n            NEEDBITS(32);\n            if (state->flags & 0x0200) CRC4(state->check, hold);\n            INITBITS();\n            state->mode = OS;\n        case OS:\n            NEEDBITS(16);\n            if (state->flags & 0x0200) CRC2(state->check, hold);\n            INITBITS();\n            state->mode = EXLEN;\n        case EXLEN:\n            if (state->flags & 0x0400) {\n                NEEDBITS(16);\n                state->length = (unsigned)(hold);\n                if (state->flags & 0x0200) CRC2(state->check, hold);\n                INITBITS();\n            }\n            state->mode = EXTRA;\n        case EXTRA:\n            if (state->flags & 0x0400) {\n                copy = state->length;\n                if (copy > have) copy = have;\n                if (copy) {\n                    if (state->flags & 0x0200)\n                        state->check = crc32(state->check, next, copy);\n                    have -= copy;\n                    next += copy;\n                    state->length -= copy;\n                }\n                if (state->length) goto inf_leave;\n            }\n            state->mode = NAME;\n        case NAME:\n            if (state->flags & 0x0800) {\n                if (have == 0) goto inf_leave;\n                copy = 0;\n                do {\n                    len = (unsigned)(next[copy++]);\n                } while (len && copy < have);\n                if (state->flags & 0x02000)\n                    state->check = crc32(state->check, next, copy);\n                have -= copy;\n                next += copy;\n                if (len) goto inf_leave;\n            }\n            state->mode = COMMENT;\n        case COMMENT:\n            if (state->flags & 0x1000) {\n                if (have == 0) goto inf_leave;\n                copy = 0;\n                do {\n                    len = (unsigned)(next[copy++]);\n                } while (len && copy < have);\n                if (state->flags & 0x02000)\n                    state->check = crc32(state->check, next, copy);\n                have -= copy;\n                next += copy;\n                if (len) goto inf_leave;\n            }\n            state->mode = HCRC;\n        case HCRC:\n            if (state->flags & 0x0200) {\n                NEEDBITS(16);\n                if (hold != (state->check & 0xffff)) {\n                    strm->msg = (char *)\"header crc mismatch\";\n                    state->mode = BAD;\n                    break;\n                }\n                INITBITS();\n            }\n            strm->adler = state->check = crc32(0L, Z_NULL, 0);\n            state->mode = TYPE;\n            break;\n#endif\n        case DICTID:\n            NEEDBITS(32);\n            strm->adler = state->check = REVERSE(hold);\n            INITBITS();\n            state->mode = DICT;\n        case DICT:\n            if (state->havedict == 0) {\n                RESTORE();\n                return Z_NEED_DICT;\n            }\n            strm->adler = state->check = adler32(0L, Z_NULL, 0);\n            state->mode = TYPE;\n        case TYPE:\n            if (flush == Z_BLOCK) goto inf_leave;\n        case TYPEDO:\n            if (state->last) {\n                BYTEBITS();\n                state->mode = CHECK;\n                break;\n            }\n            NEEDBITS(3);\n            state->last = BITS(1);\n            DROPBITS(1);\n            switch (BITS(2)) {\n            case 0:                             /* stored block */\n                Tracev((stderr, \"inflate:     stored block%s\\n\",\n                        state->last ? \" (last)\" : \"\"));\n                state->mode = STORED;\n                break;\n            case 1:                             /* fixed block */\n                fixedtables(state);\n                Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n                        state->last ? \" (last)\" : \"\"));\n                state->mode = LEN;              /* decode codes */\n                break;\n            case 2:                             /* dynamic block */\n                Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n                        state->last ? \" (last)\" : \"\"));\n                state->mode = TABLE;\n                break;\n            case 3:\n                strm->msg = (char *)\"invalid block type\";\n                state->mode = BAD;\n            }\n            DROPBITS(2);\n            break;\n        case STORED:\n            BYTEBITS();                         /* go to byte boundary */\n            NEEDBITS(32);\n            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {\n                strm->msg = (char *)\"invalid stored block lengths\";\n                state->mode = BAD;\n                break;\n            }\n            state->length = (unsigned)hold & 0xffff;\n            Tracev((stderr, \"inflate:       stored length %u\\n\",\n                    state->length));\n            INITBITS();\n            state->mode = COPY;\n        case COPY:\n            copy = state->length;\n            if (copy) {\n                if (copy > have) copy = have;\n                if (copy > left) copy = left;\n                if (copy == 0) goto inf_leave;\n                zmemcpy(put, next, copy);\n                have -= copy;\n                next += copy;\n                left -= copy;\n                put += copy;\n                state->length -= copy;\n                break;\n            }\n            Tracev((stderr, \"inflate:       stored end\\n\"));\n            state->mode = TYPE;\n            break;\n        case TABLE:\n            NEEDBITS(14);\n            state->nlen = BITS(5) + 257;\n            DROPBITS(5);\n            state->ndist = BITS(5) + 1;\n            DROPBITS(5);\n            state->ncode = BITS(4) + 4;\n            DROPBITS(4);\n#ifndef PKZIP_BUG_WORKAROUND\n            if (state->nlen > 286 || state->ndist > 30) {\n                strm->msg = (char *)\"too many length or distance symbols\";\n                state->mode = BAD;\n                break;\n            }\n#endif\n            Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n            state->have = 0;\n            state->mode = LENLENS;\n        case LENLENS:\n            while (state->have < state->ncode) {\n                NEEDBITS(3);\n                state->lens[order[state->have++]] = (unsigned short)BITS(3);\n                DROPBITS(3);\n            }\n            while (state->have < 19)\n                state->lens[order[state->have++]] = 0;\n            state->next = state->codes;\n            state->lencode = (code const FAR *)(state->next);\n            state->lenbits = 7;\n            ret = inflate_table(CODES, state->lens, 19, &(state->next),\n                                &(state->lenbits), state->work);\n            if (ret) {\n                strm->msg = (char *)\"invalid code lengths set\";\n                state->mode = BAD;\n                break;\n            }\n            Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n            state->have = 0;\n            state->mode = CODELENS;\n        case CODELENS:\n            while (state->have < state->nlen + state->ndist) {\n                for (;;) {\n                    this = state->lencode[BITS(state->lenbits)];\n                    if ((unsigned)(this.bits) <= bits) break;\n                    PULLBYTE();\n                }\n                if (this.val < 16) {\n                    NEEDBITS(this.bits);\n                    DROPBITS(this.bits);\n                    state->lens[state->have++] = this.val;\n                }\n                else {\n                    if (this.val == 16) {\n                        NEEDBITS(this.bits + 2);\n                        DROPBITS(this.bits);\n                        if (state->have == 0) {\n                            strm->msg = (char *)\"invalid bit length repeat\";\n                            state->mode = BAD;\n                            break;\n                        }\n                        len = state->lens[state->have - 1];\n                        copy = 3 + BITS(2);\n                        DROPBITS(2);\n                    }\n                    else if (this.val == 17) {\n                        NEEDBITS(this.bits + 3);\n                        DROPBITS(this.bits);\n                        len = 0;\n                        copy = 3 + BITS(3);\n                        DROPBITS(3);\n                    }\n                    else {\n                        NEEDBITS(this.bits + 7);\n                        DROPBITS(this.bits);\n                        len = 0;\n                        copy = 11 + BITS(7);\n                        DROPBITS(7);\n                    }\n                    if (state->have + copy > state->nlen + state->ndist) {\n                        strm->msg = (char *)\"invalid bit length repeat\";\n                        state->mode = BAD;\n                        break;\n                    }\n                    while (copy--)\n                        state->lens[state->have++] = (unsigned short)len;\n                }\n            }\n\n            /* build code tables */\n            state->next = state->codes;\n            state->lencode = (code const FAR *)(state->next);\n            state->lenbits = 9;\n            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),\n                                &(state->lenbits), state->work);\n            if (ret) {\n                strm->msg = (char *)\"invalid literal/lengths set\";\n                state->mode = BAD;\n                break;\n            }\n            state->distcode = (code const FAR *)(state->next);\n            state->distbits = 6;\n            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,\n                            &(state->next), &(state->distbits), state->work);\n            if (ret) {\n                strm->msg = (char *)\"invalid distances set\";\n                state->mode = BAD;\n                break;\n            }\n            Tracev((stderr, \"inflate:       codes ok\\n\"));\n            state->mode = LEN;\n        case LEN:\n            if (have >= 6 && left >= 258) {\n                RESTORE();\n                inflate_fast(strm, out);\n                LOAD();\n                break;\n            }\n            for (;;) {\n                this = state->lencode[BITS(state->lenbits)];\n                if ((unsigned)(this.bits) <= bits) break;\n                PULLBYTE();\n            }\n            if (this.op && (this.op & 0xf0) == 0) {\n                last = this;\n                for (;;) {\n                    this = state->lencode[last.val +\n                            (BITS(last.bits + last.op) >> last.bits)];\n                    if ((unsigned)(last.bits + this.bits) <= bits) break;\n                    PULLBYTE();\n                }\n                DROPBITS(last.bits);\n            }\n            DROPBITS(this.bits);\n            state->length = (unsigned)this.val;\n            if ((int)(this.op) == 0) {\n                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?\n                        \"inflate:         literal '%c'\\n\" :\n                        \"inflate:         literal 0x%02x\\n\", this.val));\n                state->mode = LIT;\n                break;\n            }\n            if (this.op & 32) {\n                Tracevv((stderr, \"inflate:         end of block\\n\"));\n                state->mode = TYPE;\n                break;\n            }\n            if (this.op & 64) {\n                strm->msg = (char *)\"invalid literal/length code\";\n                state->mode = BAD;\n                break;\n            }\n            state->extra = (unsigned)(this.op) & 15;\n            state->mode = LENEXT;\n        case LENEXT:\n            if (state->extra) {\n                NEEDBITS(state->extra);\n                state->length += BITS(state->extra);\n                DROPBITS(state->extra);\n            }\n            Tracevv((stderr, \"inflate:         length %u\\n\", state->length));\n            state->mode = DIST;\n        case DIST:\n            for (;;) {\n                this = state->distcode[BITS(state->distbits)];\n                if ((unsigned)(this.bits) <= bits) break;\n                PULLBYTE();\n            }\n            if ((this.op & 0xf0) == 0) {\n                last = this;\n                for (;;) {\n                    this = state->distcode[last.val +\n                            (BITS(last.bits + last.op) >> last.bits)];\n                    if ((unsigned)(last.bits + this.bits) <= bits) break;\n                    PULLBYTE();\n                }\n                DROPBITS(last.bits);\n            }\n            DROPBITS(this.bits);\n            if (this.op & 64) {\n                strm->msg = (char *)\"invalid distance code\";\n                state->mode = BAD;\n                break;\n            }\n            state->offset = (unsigned)this.val;\n            state->extra = (unsigned)(this.op) & 15;\n            state->mode = DISTEXT;\n        case DISTEXT:\n            if (state->extra) {\n                NEEDBITS(state->extra);\n                state->offset += BITS(state->extra);\n                DROPBITS(state->extra);\n            }\n            if (state->offset > state->whave + out - left) {\n                strm->msg = (char *)\"invalid distance too far back\";\n                state->mode = BAD;\n                break;\n            }\n            Tracevv((stderr, \"inflate:         distance %u\\n\", state->offset));\n            state->mode = MATCH;\n        case MATCH:\n            if (left == 0) goto inf_leave;\n            copy = out - left;\n            if (state->offset > copy) {         /* copy from window */\n                copy = state->offset - copy;\n                if (copy > state->write) {\n                    copy -= state->write;\n                    from = state->window + (state->wsize - copy);\n                }\n                else\n                    from = state->window + (state->write - copy);\n                if (copy > state->length) copy = state->length;\n            }\n            else {                              /* copy from output */\n                from = put - state->offset;\n                copy = state->length;\n            }\n            if (copy > left) copy = left;\n            left -= copy;\n            state->length -= copy;\n            do {\n                *put++ = *from++;\n            } while (--copy);\n            if (state->length == 0) state->mode = LEN;\n            break;\n        case LIT:\n            if (left == 0) goto inf_leave;\n            *put++ = (unsigned char)(state->length);\n            left--;\n            state->mode = LEN;\n            break;\n        case CHECK:\n            if (state->wrap) {\n                NEEDBITS(32);\n                out -= left;\n                strm->total_out += out;\n                state->total += out;\n                if (out)\n                    strm->adler = state->check =\n                        UPDATE(state->check, put - out, out);\n                out = left;\n                if ((\n#ifdef GUNZIP\n                     state->flags ? hold :\n#endif\n                     REVERSE(hold)) != state->check) {\n                    strm->msg = (char *)\"incorrect data check\";\n                    state->mode = BAD;\n                    break;\n                }\n                INITBITS();\n                Tracev((stderr, \"inflate:   check matches trailer\\n\"));\n            }\n#ifdef GUNZIP\n            state->mode = LENGTH;\n        case LENGTH:\n            if (state->wrap && state->flags) {\n                NEEDBITS(32);\n                if (hold != (state->total & 0xffffffffUL)) {\n                    strm->msg = (char *)\"incorrect length check\";\n                    state->mode = BAD;\n                    break;\n                }\n                INITBITS();\n                Tracev((stderr, \"inflate:   length matches trailer\\n\"));\n            }\n#endif\n            state->mode = DONE;\n        case DONE:\n            ret = Z_STREAM_END;\n            goto inf_leave;\n        case BAD:\n            ret = Z_DATA_ERROR;\n            goto inf_leave;\n        case MEM:\n            return Z_MEM_ERROR;\n        case SYNC:\n        default:\n            return Z_STREAM_ERROR;\n        }\n\n    /*\n       Return from inflate(), updating the total counts and the check value.\n       If there was no progress during the inflate() call, return a buffer\n       error.  Call updatewindow() to create and/or update the window state.\n       Note: a memory error from inflate() is non-recoverable.\n     */\n  inf_leave:\n    RESTORE();\n    if (state->wsize || (state->mode < CHECK && out != strm->avail_out))\n        if (updatewindow(strm, out)) {\n            state->mode = MEM;\n            return Z_MEM_ERROR;\n        }\n    in -= strm->avail_in;\n    out -= strm->avail_out;\n    strm->total_in += in;\n    strm->total_out += out;\n    state->total += out;\n    if (state->wrap && out)\n        strm->adler = state->check =\n            UPDATE(state->check, strm->next_out - out, out);\n    strm->data_type = state->bits + (state->last ? 64 : 0) +\n                      (state->mode == TYPE ? 128 : 0);\n    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)\n        ret = Z_BUF_ERROR;\n    return ret;\n}\n\nint ZEXPORT inflateEnd(strm)\nz_streamp strm;\n{\n    struct inflate_state FAR *state;\n    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)\n        return Z_STREAM_ERROR;\n    state = (struct inflate_state FAR *)strm->state;\n    if (state->window != Z_NULL) ZFREE(strm, state->window);\n    ZFREE(strm, strm->state);\n    strm->state = Z_NULL;\n    Tracev((stderr, \"inflate: end\\n\"));\n    return Z_OK;\n}\n\nint ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)\nz_streamp strm;\nconst Bytef *dictionary;\nuInt dictLength;\n{\n    struct inflate_state FAR *state;\n    unsigned long id;\n\n    /* check state */\n    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;\n    state = (struct inflate_state FAR *)strm->state;\n    if (state->mode != DICT) return Z_STREAM_ERROR;\n\n    /* check for correct dictionary id */\n    id = adler32(0L, Z_NULL, 0);\n    id = adler32(id, dictionary, dictLength);\n    if (id != state->check) return Z_DATA_ERROR;\n\n    /* copy dictionary to window */\n    if (updatewindow(strm, strm->avail_out)) {\n        state->mode = MEM;\n        return Z_MEM_ERROR;\n    }\n    if (dictLength > state->wsize) {\n        zmemcpy(state->window, dictionary + dictLength - state->wsize,\n                state->wsize);\n        state->whave = state->wsize;\n    }\n    else {\n        zmemcpy(state->window + state->wsize - dictLength, dictionary,\n                dictLength);\n        state->whave = dictLength;\n    }\n    state->havedict = 1;\n    Tracev((stderr, \"inflate:   dictionary set\\n\"));\n    return Z_OK;\n}\n\n/*\n   Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff.  Return when found\n   or when out of input.  When called, *have is the number of pattern bytes\n   found in order so far, in 0..3.  On return *have is updated to the new\n   state.  If on return *have equals four, then the pattern was found and the\n   return value is how many bytes were read including the last byte of the\n   pattern.  If *have is less than four, then the pattern has not been found\n   yet and the return value is len.  In the latter case, syncsearch() can be\n   called again with more data and the *have state.  *have is initialized to\n   zero for the first call.\n */\nlocal unsigned syncsearch(have, buf, len)\nunsigned FAR *have;\nunsigned char FAR *buf;\nunsigned len;\n{\n    unsigned got;\n    unsigned next;\n\n    got = *have;\n    next = 0;\n    while (next < len && got < 4) {\n        if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))\n            got++;\n        else if (buf[next])\n            got = 0;\n        else\n            got = 4 - got;\n        next++;\n    }\n    *have = got;\n    return next;\n}\n\nint ZEXPORT inflateSync(strm)\nz_streamp strm;\n{\n    unsigned len;               /* number of bytes to look at or looked at */\n    unsigned long in, out;      /* temporary to save total_in and total_out */\n    unsigned char buf[4];       /* to restore bit buffer to byte string */\n    struct inflate_state FAR *state;\n\n    /* check parameters */\n    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;\n    state = (struct inflate_state FAR *)strm->state;\n    if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;\n\n    /* if first time, start search in bit buffer */\n    if (state->mode != SYNC) {\n        state->mode = SYNC;\n        state->hold <<= state->bits & 7;\n        state->bits -= state->bits & 7;\n        len = 0;\n        while (state->bits >= 8) {\n            buf[len++] = (unsigned char)(state->hold);\n            state->hold >>= 8;\n            state->bits -= 8;\n        }\n        state->have = 0;\n        syncsearch(&(state->have), buf, len);\n    }\n\n    /* search available input */\n    len = syncsearch(&(state->have), strm->next_in, strm->avail_in);\n    strm->avail_in -= len;\n    strm->next_in += len;\n    strm->total_in += len;\n\n    /* return no joy or set up to restart inflate() on a new block */\n    if (state->have != 4) return Z_DATA_ERROR;\n    in = strm->total_in;  out = strm->total_out;\n    inflateReset(strm);\n    strm->total_in = in;  strm->total_out = out;\n    state->mode = TYPE;\n    return Z_OK;\n}\n\n/*\n   Returns true if inflate is currently at the end of a block generated by\n   Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n   implementation to provide an additional safety check. PPP uses\n   Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored\n   block. When decompressing, PPP checks that at the end of input packet,\n   inflate is waiting for these length bytes.\n */\nint ZEXPORT inflateSyncPoint(strm)\nz_streamp strm;\n{\n    struct inflate_state FAR *state;\n\n    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;\n    state = (struct inflate_state FAR *)strm->state;\n    return state->mode == STORED && state->bits == 0;\n}\n\nint ZEXPORT inflateCopy(dest, source)\nz_streamp dest;\nz_streamp source;\n{\n    struct inflate_state FAR *state;\n    struct inflate_state FAR *copy;\n    unsigned char FAR *window;\n\n    /* check input */\n    if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||\n        source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)\n        return Z_STREAM_ERROR;\n    state = (struct inflate_state FAR *)source->state;\n\n    /* allocate space */\n    copy = (struct inflate_state FAR *)\n           ZALLOC(source, 1, sizeof(struct inflate_state));\n    if (copy == Z_NULL) return Z_MEM_ERROR;\n    window = Z_NULL;\n    if (state->window != Z_NULL) {\n        window = (unsigned char FAR *)\n                 ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));\n        if (window == Z_NULL) {\n            ZFREE(source, copy);\n            return Z_MEM_ERROR;\n        }\n    }\n\n    /* copy state */\n    *dest = *source;\n    *copy = *state;\n    copy->lencode = copy->codes + (state->lencode - state->codes);\n    copy->distcode = copy->codes + (state->distcode - state->codes);\n    copy->next = copy->codes + (state->next - state->codes);\n    if (window != Z_NULL)\n        zmemcpy(window, state->window, 1U << state->wbits);\n    copy->window = window;\n    dest->state = (voidpf)copy;\n    return Z_OK;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/inflate.h",
    "content": "/* inflate.h -- internal inflate state definition\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\n/* define NO_GZIP when compiling if you want to disable gzip header and\n   trailer decoding by inflate().  NO_GZIP would be used to avoid linking in\n   the crc code when it is not needed.  For shared libraries, gzip decoding\n   should be left enabled. */\n#ifndef NO_GZIP\n#  define GUNZIP\n#endif\n\n/* Possible inflate modes between inflate() calls */\ntypedef enum {\n    HEAD,       /* i: waiting for magic header */\n#ifdef GUNZIP\n    FLAGS,      /* i: waiting for method and flags (gzip) */\n    TIME,       /* i: waiting for modification time (gzip) */\n    OS,         /* i: waiting for extra flags and operating system (gzip) */\n    EXLEN,      /* i: waiting for extra length (gzip) */\n    EXTRA,      /* i: waiting for extra bytes (gzip) */\n    NAME,       /* i: waiting for end of file name (gzip) */\n    COMMENT,    /* i: waiting for end of comment (gzip) */\n    HCRC,       /* i: waiting for header crc (gzip) */\n#endif\n    DICTID,     /* i: waiting for dictionary check value */\n    DICT,       /* waiting for inflateSetDictionary() call */\n        TYPE,       /* i: waiting for type bits, including last-flag bit */\n        TYPEDO,     /* i: same, but skip check to exit inflate on new block */\n        STORED,     /* i: waiting for stored size (length and complement) */\n        COPY,       /* i/o: waiting for input or output to copy stored block */\n        TABLE,      /* i: waiting for dynamic block table lengths */\n        LENLENS,    /* i: waiting for code length code lengths */\n        CODELENS,   /* i: waiting for length/lit and distance code lengths */\n            LEN,        /* i: waiting for length/lit code */\n            LENEXT,     /* i: waiting for length extra bits */\n            DIST,       /* i: waiting for distance code */\n            DISTEXT,    /* i: waiting for distance extra bits */\n            MATCH,      /* o: waiting for output space to copy string */\n            LIT,        /* o: waiting for output space to write literal */\n    CHECK,      /* i: waiting for 32-bit check value */\n#ifdef GUNZIP\n    LENGTH,     /* i: waiting for 32-bit length (gzip) */\n#endif\n    DONE,       /* finished check, done -- remain here until reset */\n    BAD,        /* got a data error -- remain here until reset */\n    MEM,        /* got an inflate() memory error -- remain here until reset */\n    SYNC        /* looking for synchronization bytes to restart inflate() */\n} inflate_mode;\n\n/*\n    State transitions between above modes -\n\n    (most modes can go to the BAD or MEM mode -- not shown for clarity)\n\n    Process header:\n        HEAD -> (gzip) or (zlib)\n        (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME\n        NAME -> COMMENT -> HCRC -> TYPE\n        (zlib) -> DICTID or TYPE\n        DICTID -> DICT -> TYPE\n    Read deflate blocks:\n            TYPE -> STORED or TABLE or LEN or CHECK\n            STORED -> COPY -> TYPE\n            TABLE -> LENLENS -> CODELENS -> LEN\n    Read deflate codes:\n                LEN -> LENEXT or LIT or TYPE\n                LENEXT -> DIST -> DISTEXT -> MATCH -> LEN\n                LIT -> LEN\n    Process trailer:\n        CHECK -> LENGTH -> DONE\n */\n\n/* state maintained between inflate() calls.  Approximately 7K bytes. */\nstruct inflate_state {\n    inflate_mode mode;          /* current inflate mode */\n    int last;                   /* true if processing last block */\n    int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip */\n    int havedict;               /* true if dictionary provided */\n    int flags;                  /* gzip header method and flags (0 if zlib) */\n    unsigned long check;        /* protected copy of check value */\n    unsigned long total;        /* protected copy of output count */\n        /* sliding window */\n    unsigned wbits;             /* log base 2 of requested window size */\n    unsigned wsize;             /* window size or zero if not using window */\n    unsigned whave;             /* valid bytes in the window */\n    unsigned write;             /* window write index */\n    unsigned char FAR *window;  /* allocated sliding window, if needed */\n        /* bit accumulator */\n    unsigned long hold;         /* input bit accumulator */\n    unsigned bits;              /* number of bits in \"in\" */\n        /* for string and stored block copying */\n    unsigned length;            /* literal or length of data to copy */\n    unsigned offset;            /* distance back to copy string from */\n        /* for table and code decoding */\n    unsigned extra;             /* extra bits needed */\n        /* fixed and dynamic code tables */\n    code const FAR *lencode;    /* starting table for length/literal codes */\n    code const FAR *distcode;   /* starting table for distance codes */\n    unsigned lenbits;           /* index bits for lencode */\n    unsigned distbits;          /* index bits for distcode */\n        /* dynamic table building */\n    unsigned ncode;             /* number of code length code lengths */\n    unsigned nlen;              /* number of length code lengths */\n    unsigned ndist;             /* number of distance code lengths */\n    unsigned have;              /* number of code lengths in lens[] */\n    code FAR *next;             /* next available space in codes[] */\n    unsigned short lens[320];   /* temporary storage for code lengths */\n    unsigned short work[288];   /* work area for code table building */\n    code codes[ENOUGH];         /* space for code tables */\n};\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/inftrees.c",
    "content": "/* inftrees.c -- generate Huffman trees for efficient decoding\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n#include \"zutil.h\"\n#include \"inftrees.h\"\n\n#define MAXBITS 15\n\nconst char inflate_copyright[] =\n   \" inflate 1.2.1 Copyright 1995-2003 Mark Adler \";\n/*\n  If you use the zlib library in a product, an acknowledgment is welcome\n  in the documentation of your product. If for some reason you cannot\n  include such an acknowledgment, I would appreciate that you keep this\n  copyright string in the executable of your product.\n */\n\n/*\n   Build a set of tables to decode the provided canonical Huffman code.\n   The code lengths are lens[0..codes-1].  The result starts at *table,\n   whose indices are 0..2^bits-1.  work is a writable array of at least\n   lens shorts, which is used as a work area.  type is the type of code\n   to be generated, CODES, LENS, or DISTS.  On return, zero is success,\n   -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table\n   on return points to the next available entry's address.  bits is the\n   requested root table index bits, and on return it is the actual root\n   table index bits.  It will differ if the request is greater than the\n   longest code or if it is less than the shortest code.\n */\nint inflate_table(type, lens, codes, table, bits, work)\ncodetype type;\nunsigned short FAR *lens;\nunsigned codes;\ncode FAR * FAR *table;\nunsigned FAR *bits;\nunsigned short FAR *work;\n{\n    unsigned len;               /* a code's length in bits */\n    unsigned sym;               /* index of code symbols */\n    unsigned min, max;          /* minimum and maximum code lengths */\n    unsigned root;              /* number of index bits for root table */\n    unsigned curr;              /* number of index bits for current table */\n    unsigned drop;              /* code bits to drop for sub-table */\n    int left;                   /* number of prefix codes available */\n    unsigned used;              /* code entries in table used */\n    unsigned huff;              /* Huffman code */\n    unsigned incr;              /* for incrementing code, index */\n    unsigned fill;              /* index for replicating entries */\n    unsigned low;               /* low bits for current root entry */\n    unsigned mask;              /* mask for low root bits */\n    code this;                  /* table entry for duplication */\n    code FAR *next;             /* next available space in table */\n    const unsigned short FAR *base;     /* base value table to use */\n    const unsigned short FAR *extra;    /* extra bits table to use */\n    int end;                    /* use base and extra for symbol > end */\n    unsigned short count[MAXBITS+1];    /* number of codes of each length */\n    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */\n    static const unsigned short lbase[31] = { /* Length codes 257..285 base */\n        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};\n    static const unsigned short lext[31] = { /* Length codes 257..285 extra */\n        16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 76, 66};\n    static const unsigned short dbase[32] = { /* Distance codes 0..29 base */\n        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n        8193, 12289, 16385, 24577, 0, 0};\n    static const unsigned short dext[32] = { /* Distance codes 0..29 extra */\n        16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n        23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n        28, 28, 29, 29, 64, 64};\n\n    /*\n       Process a set of code lengths to create a canonical Huffman code.  The\n       code lengths are lens[0..codes-1].  Each length corresponds to the\n       symbols 0..codes-1.  The Huffman code is generated by first sorting the\n       symbols by length from short to long, and retaining the symbol order\n       for codes with equal lengths.  Then the code starts with all zero bits\n       for the first code of the shortest length, and the codes are integer\n       increments for the same length, and zeros are appended as the length\n       increases.  For the deflate format, these bits are stored backwards\n       from their more natural integer increment ordering, and so when the\n       decoding tables are built in the large loop below, the integer codes\n       are incremented backwards.\n\n       This routine assumes, but does not check, that all of the entries in\n       lens[] are in the range 0..MAXBITS.  The caller must assure this.\n       1..MAXBITS is interpreted as that code length.  zero means that that\n       symbol does not occur in this code.\n\n       The codes are sorted by computing a count of codes for each length,\n       creating from that a table of starting indices for each length in the\n       sorted table, and then entering the symbols in order in the sorted\n       table.  The sorted table is work[], with that space being provided by\n       the caller.\n\n       The length counts are used for other purposes as well, i.e. finding\n       the minimum and maximum length codes, determining if there are any\n       codes at all, checking for a valid set of lengths, and looking ahead\n       at length counts to determine sub-table sizes when building the\n       decoding tables.\n     */\n\n    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n    for (len = 0; len <= MAXBITS; len++)\n        count[len] = 0;\n    for (sym = 0; sym < codes; sym++)\n        count[lens[sym]]++;\n\n    /* bound code lengths, force root to be within code lengths */\n    root = *bits;\n    for (max = MAXBITS; max >= 1; max--)\n        if (count[max] != 0) break;\n    if (root > max) root = max;\n    if (max == 0) return -1;            /* no codes! */\n    for (min = 1; min <= MAXBITS; min++)\n        if (count[min] != 0) break;\n    if (root < min) root = min;\n\n    /* check for an over-subscribed or incomplete set of lengths */\n    left = 1;\n    for (len = 1; len <= MAXBITS; len++) {\n        left <<= 1;\n        left -= count[len];\n        if (left < 0) return -1;        /* over-subscribed */\n    }\n    if (left > 0 && (type == CODES || (codes - count[0] != 1)))\n        return -1;                      /* incomplete set */\n\n    /* generate offsets into symbol table for each length for sorting */\n    offs[1] = 0;\n    for (len = 1; len < MAXBITS; len++)\n        offs[len + 1] = offs[len] + count[len];\n\n    /* sort symbols by length, by symbol order within each length */\n    for (sym = 0; sym < codes; sym++)\n        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;\n\n    /*\n       Create and fill in decoding tables.  In this loop, the table being\n       filled is at next and has curr index bits.  The code being used is huff\n       with length len.  That code is converted to an index by dropping drop\n       bits off of the bottom.  For codes where len is less than drop + curr,\n       those top drop + curr - len bits are incremented through all values to\n       fill the table with replicated entries.\n\n       root is the number of index bits for the root table.  When len exceeds\n       root, sub-tables are created pointed to by the root entry with an index\n       of the low root bits of huff.  This is saved in low to check for when a\n       new sub-table should be started.  drop is zero when the root table is\n       being filled, and drop is root when sub-tables are being filled.\n\n       When a new sub-table is needed, it is necessary to look ahead in the\n       code lengths to determine what size sub-table is needed.  The length\n       counts are used for this, and so count[] is decremented as codes are\n       entered in the tables.\n\n       used keeps track of how many table entries have been allocated from the\n       provided *table space.  It is checked when a LENS table is being made\n       against the space in *table, ENOUGH, minus the maximum space needed by\n       the worst case distance code, MAXD.  This should never happen, but the\n       sufficiency of ENOUGH has not been proven exhaustively, hence the check.\n       This assumes that when type == LENS, bits == 9.\n\n       sym increments through all symbols, and the loop terminates when\n       all codes of length max, i.e. all codes, have been processed.  This\n       routine permits incomplete codes, so another loop after this one fills\n       in the rest of the decoding tables with invalid code markers.\n     */\n\n    /* set up for code type */\n    switch (type) {\n    case CODES:\n        base = extra = work;    /* dummy value--not used */\n        end = 19;\n        break;\n    case LENS:\n        base = lbase;\n        base -= 257;\n        extra = lext;\n        extra -= 257;\n        end = 256;\n        break;\n    default:            /* DISTS */\n        base = dbase;\n        extra = dext;\n        end = -1;\n    }\n\n    /* initialize state for loop */\n    huff = 0;                   /* starting code */\n    sym = 0;                    /* starting code symbol */\n    len = min;                  /* starting code length */\n    next = *table;              /* current table to fill in */\n    curr = root;                /* current table index bits */\n    drop = 0;                   /* current bits to drop from code for index */\n    low = (unsigned)(-1);       /* trigger new sub-table when len > root */\n    used = 1U << root;          /* use root table entries */\n    mask = used - 1;            /* mask for comparing low */\n\n    /* check available table space */\n    if (type == LENS && used >= ENOUGH - MAXD)\n        return 1;\n\n    /* process all codes and make table entries */\n    for (;;) {\n        /* create table entry */\n        this.bits = (unsigned char)(len - drop);\n        if ((int)(work[sym]) < end) {\n            this.op = (unsigned char)0;\n            this.val = work[sym];\n        }\n        else if ((int)(work[sym]) > end) {\n            this.op = (unsigned char)(extra[work[sym]]);\n            this.val = base[work[sym]];\n        }\n        else {\n            this.op = (unsigned char)(32 + 64);         /* end of block */\n            this.val = 0;\n        }\n\n        /* replicate for those indices with low len bits equal to huff */\n        incr = 1U << (len - drop);\n        fill = 1U << curr;\n        do {\n            fill -= incr;\n            next[(huff >> drop) + fill] = this;\n        } while (fill != 0);\n\n        /* backwards increment the len-bit code huff */\n        incr = 1U << (len - 1);\n        while (huff & incr)\n            incr >>= 1;\n        if (incr != 0) {\n            huff &= incr - 1;\n            huff += incr;\n        }\n        else\n            huff = 0;\n\n        /* go to next symbol, update count, len */\n        sym++;\n        if (--(count[len]) == 0) {\n            if (len == max) break;\n            len = lens[work[sym]];\n        }\n\n        /* create new sub-table if needed */\n        if (len > root && (huff & mask) != low) {\n            /* if first time, transition to sub-tables */\n            if (drop == 0)\n                drop = root;\n\n            /* increment past last table */\n            next += 1U << curr;\n\n            /* determine length of next table */\n            curr = len - drop;\n            left = (int)(1 << curr);\n            while (curr + drop < max) {\n                left -= count[curr + drop];\n                if (left <= 0) break;\n                curr++;\n                left <<= 1;\n            }\n\n            /* check for enough space */\n            used += 1U << curr;\n            if (type == LENS && used >= ENOUGH - MAXD)\n                return 1;\n\n            /* point entry in root table to sub-table */\n            low = huff & mask;\n            (*table)[low].op = (unsigned char)curr;\n            (*table)[low].bits = (unsigned char)root;\n            (*table)[low].val = (unsigned short)(next - *table);\n        }\n    }\n\n    /*\n       Fill in rest of table for incomplete codes.  This loop is similar to the\n       loop above in incrementing huff for table indices.  It is assumed that\n       len is equal to curr + drop, so there is no loop needed to increment\n       through high index bits.  When the current sub-table is filled, the loop\n       drops back to the root table to fill in any remaining entries there.\n     */\n    this.op = (unsigned char)64;                /* invalid code marker */\n    this.bits = (unsigned char)(len - drop);\n    this.val = (unsigned short)0;\n    while (huff != 0) {\n        /* when done with sub-table, drop back to root table */\n        if (drop != 0 && (huff & mask) != low) {\n            drop = 0;\n            len = root;\n            next = *table;\n            curr = root;\n            this.bits = (unsigned char)len;\n        }\n\n        /* put invalid code marker in table */\n        next[huff >> drop] = this;\n\n        /* backwards increment the len-bit code huff */\n        incr = 1U << (len - 1);\n        while (huff & incr)\n            incr >>= 1;\n        if (incr != 0) {\n            huff &= incr - 1;\n            huff += incr;\n        }\n        else\n            huff = 0;\n    }\n\n    /* set return parameters */\n    *table += used;\n    *bits = root;\n    return 0;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/inftrees.h",
    "content": "/* inftrees.h -- header to use inftrees.c\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\n/* Structure for decoding tables.  Each entry provides either the\n   information needed to do the operation requested by the code that\n   indexed that table entry, or it provides a pointer to another\n   table that indexes more bits of the code.  op indicates whether\n   the entry is a pointer to another table, a literal, a length or\n   distance, an end-of-block, or an invalid code.  For a table\n   pointer, the low four bits of op is the number of index bits of\n   that table.  For a length or distance, the low four bits of op\n   is the number of extra bits to get after the code.  bits is\n   the number of bits in this code or part of the code to drop off\n   of the bit buffer.  val is the actual byte to output in the case\n   of a literal, the base length or distance, or the offset from\n   the current table to the next table.  Each entry is four bytes. */\ntypedef struct {\n    unsigned char op;           /* operation, extra bits, table bits */\n    unsigned char bits;         /* bits in this part of the code */\n    unsigned short val;         /* offset in table or code value */\n} code;\n\n/* op values as set by inflate_table():\n    00000000 - literal\n    0000tttt - table link, tttt != 0 is the number of table index bits\n    0001eeee - length or distance, eeee is the number of extra bits\n    01100000 - end of block\n    01000000 - invalid code\n */\n\n/* Maximum size of dynamic tree.  The maximum found in a long but non-\n   exhaustive search was 1004 code structures (850 for length/literals\n   and 154 for distances, the latter actually the result of an\n   exhaustive search).  The true maximum is not known, but the value\n   below is more than safe. */\n#define ENOUGH 1440\n#define MAXD 154\n\n/* Type of code to build for inftable() */\ntypedef enum {\n    CODES,\n    LENS,\n    DISTS\n} codetype;\n\nextern int inflate_table OF((codetype type, unsigned short FAR *lens,\n                             unsigned codes, code FAR * FAR *table,\n                             unsigned FAR *bits, unsigned short FAR *work));\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/ioapi.c",
    "content": "/* ioapi.h -- IO base function header for compress/uncompress .zip\n   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Modifications for Zip64 support\n         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )\n\n         For more info read MiniZip_info.txt\n\n*/\n\n#if (defined(_WIN32))\n        #define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#include \"ioapi.h\"\n\n#ifdef __ANDROID__\n#  define fopen64 fopen\n#  ifdef __USE_FILE_OFFSET64\n#    define ftello64 ftello\n#    define fseeko64 fseeko\n#  else\n#    define ftello64 ftell\n#    define fseeko64 fseek\n#  endif\n#endif\n\nvoidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)\n{\n    if (pfilefunc->zfile_func64.zopen64_file != NULL)\n        return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);\n    else\n    {\n        return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode);\n    }\n}\n\nlong call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)\n{\n    if (pfilefunc->zfile_func64.zseek64_file != NULL)\n        return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin);\n    else\n    {\n        uLong offsetTruncated = (uLong)offset;\n        if (offsetTruncated != offset)\n            return -1;\n        else\n            return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin);\n    }\n}\n\nZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)\n{\n    if (pfilefunc->zfile_func64.zseek64_file != NULL)\n        return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream);\n    else\n    {\n        uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);\n        if ((tell_uLong) == ((uLong)-1))\n            return (ZPOS64_T)-1;\n        else\n            return tell_uLong;\n    }\n}\n\nvoid fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32)\n{\n    p_filefunc64_32->zfile_func64.zopen64_file = NULL;\n    p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file;\n    p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;\n    p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file;\n    p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file;\n    p_filefunc64_32->zfile_func64.ztell64_file = NULL;\n    p_filefunc64_32->zfile_func64.zseek64_file = NULL;\n    p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file;\n    p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;\n    p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque;\n    p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file;\n    p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file;\n}\n\n\n\nstatic voidpf  ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));\nstatic uLong   ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));\nstatic uLong   ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));\nstatic ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));\nstatic long    ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));\nstatic int     ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));\nstatic int     ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));\n\nstatic voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)\n{\n    FILE* file = NULL;\n    const char* mode_fopen = NULL;\n    if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)\n        mode_fopen = \"rb\";\n    else\n    if (mode & ZLIB_FILEFUNC_MODE_EXISTING)\n        mode_fopen = \"r+b\";\n    else\n    if (mode & ZLIB_FILEFUNC_MODE_CREATE)\n        mode_fopen = \"wb\";\n\n    if ((filename!=NULL) && (mode_fopen != NULL))\n        file = fopen(filename, mode_fopen);\n    return file;\n}\n\nstatic voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)\n{\n    FILE* file = NULL;\n    const char* mode_fopen = NULL;\n    if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)\n        mode_fopen = \"rb\";\n    else\n    if (mode & ZLIB_FILEFUNC_MODE_EXISTING)\n        mode_fopen = \"r+b\";\n    else\n    if (mode & ZLIB_FILEFUNC_MODE_CREATE)\n        mode_fopen = \"wb\";\n\n    if ((filename!=NULL) && (mode_fopen != NULL))\n        file = fopen((const char*)filename, mode_fopen);\n    return file;\n}\n\n\nstatic uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)\n{\n    uLong ret;\n    ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);\n    return ret;\n}\n\nstatic uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size)\n{\n    uLong ret;\n    ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);\n    return ret;\n}\n\nstatic long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)\n{\n    long ret;\n    ret = ftell((FILE *)stream);\n    return ret;\n}\n\n\nstatic ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)\n{\n    ZPOS64_T ret;\n    ret = ftello((FILE *)stream);\n    return ret;\n}\n\nstatic long ZCALLBACK fseek_file_func (voidpf  opaque, voidpf stream, uLong offset, int origin)\n{\n    int fseek_origin=0;\n    long ret;\n    switch (origin)\n    {\n    case ZLIB_FILEFUNC_SEEK_CUR :\n        fseek_origin = SEEK_CUR;\n        break;\n    case ZLIB_FILEFUNC_SEEK_END :\n        fseek_origin = SEEK_END;\n        break;\n    case ZLIB_FILEFUNC_SEEK_SET :\n        fseek_origin = SEEK_SET;\n        break;\n    default: return -1;\n    }\n    ret = 0;\n    if (fseek((FILE *)stream, offset, fseek_origin) != 0)\n        ret = -1;\n    return ret;\n}\n\nstatic long ZCALLBACK fseek64_file_func (voidpf  opaque, voidpf stream, ZPOS64_T offset, int origin)\n{\n    int fseek_origin=0;\n    long ret;\n    switch (origin)\n    {\n    case ZLIB_FILEFUNC_SEEK_CUR :\n        fseek_origin = SEEK_CUR;\n        break;\n    case ZLIB_FILEFUNC_SEEK_END :\n        fseek_origin = SEEK_END;\n        break;\n    case ZLIB_FILEFUNC_SEEK_SET :\n        fseek_origin = SEEK_SET;\n        break;\n    default: return -1;\n    }\n    ret = 0;\n\n    if(fseeko((FILE *)stream, offset, fseek_origin) != 0)\n                        ret = -1;\n\n    return ret;\n}\n\n\nstatic int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)\n{\n    int ret;\n    ret = fclose((FILE *)stream);\n    return ret;\n}\n\nstatic int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)\n{\n    int ret;\n    ret = ferror((FILE *)stream);\n    return ret;\n}\n\nvoid fill_fopen_filefunc (pzlib_filefunc_def)\n  zlib_filefunc_def* pzlib_filefunc_def;\n{\n    pzlib_filefunc_def->zopen_file = fopen_file_func;\n    pzlib_filefunc_def->zread_file = fread_file_func;\n    pzlib_filefunc_def->zwrite_file = fwrite_file_func;\n    pzlib_filefunc_def->ztell_file = ftell_file_func;\n    pzlib_filefunc_def->zseek_file = fseek_file_func;\n    pzlib_filefunc_def->zclose_file = fclose_file_func;\n    pzlib_filefunc_def->zerror_file = ferror_file_func;\n    pzlib_filefunc_def->opaque = NULL;\n}\n\nvoid fill_fopen64_filefunc (zlib_filefunc64_def*  pzlib_filefunc_def)\n{\n    pzlib_filefunc_def->zopen64_file = fopen64_file_func;\n    pzlib_filefunc_def->zread_file = fread_file_func;\n    pzlib_filefunc_def->zwrite_file = fwrite_file_func;\n    pzlib_filefunc_def->ztell64_file = ftell64_file_func;\n    pzlib_filefunc_def->zseek64_file = fseek64_file_func;\n    pzlib_filefunc_def->zclose_file = fclose_file_func;\n    pzlib_filefunc_def->zerror_file = ferror_file_func;\n    pzlib_filefunc_def->opaque = NULL;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/ioapi.h",
    "content": "/* ioapi.h -- IO base function header for compress/uncompress .zip\n   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Modifications for Zip64 support\n         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )\n\n         For more info read MiniZip_info.txt\n\n         Changes\n\n    Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this)\n    Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux.\n               More if/def section may be needed to support other platforms\n    Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows.\n                          (but you should use iowin32.c for windows instead)\n\n*/\n\n#ifndef _ZLIBIOAPI64_H\n#define _ZLIBIOAPI64_H\n\n#if (!defined(_WIN32)) && (!defined(WIN32))\n\n  // Linux needs this to support file operation on files larger then 4+GB\n  // But might need better if/def to select just the platforms that needs them.\n\n        #ifndef __USE_FILE_OFFSET64\n                #define __USE_FILE_OFFSET64\n        #endif\n        #ifndef __USE_LARGEFILE64\n                #define __USE_LARGEFILE64\n        #endif\n        #ifndef _LARGEFILE64_SOURCE\n                #define _LARGEFILE64_SOURCE\n        #endif\n        #ifndef _FILE_OFFSET_BIT\n                #define _FILE_OFFSET_BIT 64\n        #endif\n#endif\n\n#include <stdio.h>\n#include <stdlib.h>\n#include \"zlib.h\"\n\n#if defined(USE_FILE32API)\n#define fopen64 fopen\n#define ftello64 ftell\n#define fseeko64 fseek\n#else\n#ifdef _MSC_VER\n #define fopen64 fopen\n #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC)))\n  #define ftello64 _ftelli64\n  #define fseeko64 _fseeki64\n #else // old MSC\n  #define ftello64 ftell\n  #define fseeko64 fseek\n #endif\n#endif\n#endif\n\n/*\n#ifndef ZPOS64_T\n  #ifdef _WIN32\n                #define ZPOS64_T fpos_t\n  #else\n    #include <stdint.h>\n    #define ZPOS64_T uint64_t\n  #endif\n#endif\n*/\n\n#ifdef HAVE_MINIZIP64_CONF_H\n#include \"mz64conf.h\"\n#endif\n\n/* a type choosen by DEFINE */\n#ifdef HAVE_64BIT_INT_CUSTOM\ntypedef  64BIT_INT_CUSTOM_TYPE ZPOS64_T;\n#else\n#ifdef HAS_STDINT_H\n#include \"stdint.h\"\ntypedef uint64_t ZPOS64_T;\n#else\n\n\n#if defined(_MSC_VER) || defined(__BORLANDC__)\ntypedef unsigned __int64 ZPOS64_T;\n#else\ntypedef unsigned long long int ZPOS64_T;\n#endif\n#endif\n#endif\n\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n#define ZLIB_FILEFUNC_SEEK_CUR (1)\n#define ZLIB_FILEFUNC_SEEK_END (2)\n#define ZLIB_FILEFUNC_SEEK_SET (0)\n\n#define ZLIB_FILEFUNC_MODE_READ      (1)\n#define ZLIB_FILEFUNC_MODE_WRITE     (2)\n#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)\n\n#define ZLIB_FILEFUNC_MODE_EXISTING (4)\n#define ZLIB_FILEFUNC_MODE_CREATE   (8)\n\n\n#ifndef ZCALLBACK\n #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)\n   #define ZCALLBACK CALLBACK\n #else\n   #define ZCALLBACK\n #endif\n#endif\n\n\n\n\ntypedef voidpf   (ZCALLBACK *open_file_func)      OF((voidpf opaque, const char* filename, int mode));\ntypedef uLong    (ZCALLBACK *read_file_func)      OF((voidpf opaque, voidpf stream, void* buf, uLong size));\ntypedef uLong    (ZCALLBACK *write_file_func)     OF((voidpf opaque, voidpf stream, const void* buf, uLong size));\ntypedef int      (ZCALLBACK *close_file_func)     OF((voidpf opaque, voidpf stream));\ntypedef int      (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));\n\ntypedef long     (ZCALLBACK *tell_file_func)      OF((voidpf opaque, voidpf stream));\ntypedef long     (ZCALLBACK *seek_file_func)      OF((voidpf opaque, voidpf stream, uLong offset, int origin));\n\n\n/* here is the \"old\" 32 bits structure structure */\ntypedef struct zlib_filefunc_def_s\n{\n    open_file_func      zopen_file;\n    read_file_func      zread_file;\n    write_file_func     zwrite_file;\n    tell_file_func      ztell_file;\n    seek_file_func      zseek_file;\n    close_file_func     zclose_file;\n    testerror_file_func zerror_file;\n    voidpf              opaque;\n} zlib_filefunc_def;\n\ntypedef ZPOS64_T (ZCALLBACK *tell64_file_func)    OF((voidpf opaque, voidpf stream));\ntypedef long     (ZCALLBACK *seek64_file_func)    OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));\ntypedef voidpf   (ZCALLBACK *open64_file_func)    OF((voidpf opaque, const void* filename, int mode));\n\ntypedef struct zlib_filefunc64_def_s\n{\n    open64_file_func    zopen64_file;\n    read_file_func      zread_file;\n    write_file_func     zwrite_file;\n    tell64_file_func    ztell64_file;\n    seek64_file_func    zseek64_file;\n    close_file_func     zclose_file;\n    testerror_file_func zerror_file;\n    voidpf              opaque;\n} zlib_filefunc64_def;\n\nvoid fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));\nvoid fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));\n\n/* now internal definition, only for zip.c and unzip.h */\ntypedef struct zlib_filefunc64_32_def_s\n{\n    zlib_filefunc64_def zfile_func64;\n    open_file_func      zopen32_file;\n    tell_file_func      ztell32_file;\n    seek_file_func      zseek32_file;\n} zlib_filefunc64_32_def;\n\n\n#define ZREAD64(filefunc,filestream,buf,size)     ((*((filefunc).zfile_func64.zread_file))   ((filefunc).zfile_func64.opaque,filestream,buf,size))\n#define ZWRITE64(filefunc,filestream,buf,size)    ((*((filefunc).zfile_func64.zwrite_file))  ((filefunc).zfile_func64.opaque,filestream,buf,size))\n//#define ZTELL64(filefunc,filestream)            ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream))\n//#define ZSEEK64(filefunc,filestream,pos,mode)   ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode))\n#define ZCLOSE64(filefunc,filestream)             ((*((filefunc).zfile_func64.zclose_file))  ((filefunc).zfile_func64.opaque,filestream))\n#define ZERROR64(filefunc,filestream)             ((*((filefunc).zfile_func64.zerror_file))  ((filefunc).zfile_func64.opaque,filestream))\n\nvoidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));\nlong    call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));\nZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));\n\nvoid    fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32);\n\n#define ZOPEN64(filefunc,filename,mode)         (call_zopen64((&(filefunc)),(filename),(mode)))\n#define ZTELL64(filefunc,filestream)            (call_ztell64((&(filefunc)),(filestream)))\n#define ZSEEK64(filefunc,filestream,mPosition,mode)   (call_zseek64((&(filefunc)),(filestream),(mPosition),(mode)))\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/trees.c",
    "content": "/* trees.c -- output deflated data using Huffman coding\n * Copyright (C) 1995-2003 Jean-loup Gailly\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/*\n *  ALGORITHM\n *\n *      The \"deflation\" process uses several Huffman trees. The more\n *      common source values are represented by shorter bit sequences.\n *\n *      Each code tree is stored in a compressed form which is itself\n * a Huffman encoding of the lengths of all the code strings (in\n * ascending order by source values).  The actual code strings are\n * reconstructed from the lengths in the inflate process, as described\n * in the deflate specification.\n *\n *  REFERENCES\n *\n *      Deutsch, L.P.,\"'Deflate' Compressed Data Format Specification\".\n *      Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc\n *\n *      Storer, James A.\n *          Data Compression:  Methods and Theory, pp. 49-50.\n *          Computer Science Press, 1988.  ISBN 0-7167-8156-5.\n *\n *      Sedgewick, R.\n *          Algorithms, p290.\n *          Addison-Wesley, 1983. ISBN 0-201-06672-6.\n */\n\n/* @(#) $Id$ */\n\n/* #define GEN_TREES_H */\n\n#include \"deflate.h\"\n\n#ifdef DEBUG\n#  include <ctype.h>\n#endif\n\n/* ===========================================================================\n * Constants\n */\n\n#define MAX_BL_BITS 7\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\n#define END_BLOCK 256\n/* end of block literal code */\n\n#define REP_3_6      16\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\n#define REPZ_3_10    17\n/* repeat a zero length 3-10 times  (3 bits of repeat count) */\n\n#define REPZ_11_138  18\n/* repeat a zero length 11-138 times  (7 bits of repeat count) */\n\nlocal const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */\n   = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};\n\nlocal const int extra_dbits[D_CODES] /* extra bits for each distance code */\n   = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};\n\nlocal const int extra_blbits[BL_CODES]/* extra bits for each bit length code */\n   = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};\n\nlocal const uch bl_order[BL_CODES]\n   = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n#define Buf_size (8 * 2*sizeof(char))\n/* Number of bits used within bi_buf. (bi_buf might be implemented on\n * more than 16 bits on some systems.)\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n#define DIST_CODE_LEN  512 /* see definition of array dist_code below */\n\n#if defined(GEN_TREES_H) || !defined(STDC)\n/* non ANSI compilers may not accept trees.h */\n\nlocal ct_data static_ltree[L_CODES+2];\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nlocal ct_data static_dtree[D_CODES];\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nuch _dist_code[DIST_CODE_LEN];\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nuch _length_code[MAX_MATCH-MIN_MATCH+1];\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nlocal int base_length[LENGTH_CODES];\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nlocal int base_dist[D_CODES];\n/* First normalized distance for each code (0 = distance of 1) */\n\n#else\n#  include \"trees.h\"\n#endif /* GEN_TREES_H */\n\nstruct static_tree_desc_s {\n    const ct_data *static_tree;  /* static tree or NULL */\n    const intf *extra_bits;      /* extra bits for each code or NULL */\n    int     extra_base;          /* base index for extra_bits */\n    int     elems;               /* max number of elements in the tree */\n    int     max_length;          /* max bit length for the codes */\n};\n\nlocal static_tree_desc  static_l_desc =\n{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};\n\nlocal static_tree_desc  static_d_desc =\n{static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS};\n\nlocal static_tree_desc  static_bl_desc =\n{(const ct_data *)0, extra_blbits, 0,   BL_CODES, MAX_BL_BITS};\n\n/* ===========================================================================\n * Local (static) routines in this file.\n */\n\nlocal void tr_static_init OF((void));\nlocal void init_block     OF((deflate_state *s));\nlocal void pqdownheap     OF((deflate_state *s, ct_data *tree, int k));\nlocal void gen_bitlen     OF((deflate_state *s, tree_desc *desc));\nlocal void gen_codes      OF((ct_data *tree, int max_code, ushf *bl_count));\nlocal void build_tree     OF((deflate_state *s, tree_desc *desc));\nlocal void scan_tree      OF((deflate_state *s, ct_data *tree, int max_code));\nlocal void send_tree      OF((deflate_state *s, ct_data *tree, int max_code));\nlocal int  build_bl_tree  OF((deflate_state *s));\nlocal void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,\n                              int blcodes));\nlocal void compress_block OF((deflate_state *s, ct_data *ltree,\n                              ct_data *dtree));\nlocal void set_data_type  OF((deflate_state *s));\nlocal unsigned bi_reverse OF((unsigned value, int length));\nlocal void bi_windup      OF((deflate_state *s));\nlocal void bi_flush       OF((deflate_state *s));\nlocal void copy_block     OF((deflate_state *s, charf *buf, unsigned len,\n                              int header));\n\n#ifdef GEN_TREES_H\nlocal void gen_trees_header OF((void));\n#endif\n\n#ifndef DEBUG\n#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)\n   /* Send a code of the given tree. c and tree must not have side effects */\n\n#else /* DEBUG */\n#  define send_code(s, c, tree) \\\n     { if (z_verbose>2) fprintf(stderr,\"\\ncd %3d \",(c)); \\\n       send_bits(s, tree[c].Code, tree[c].Len); }\n#endif\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\n#define put_short(s, w) { \\\n    put_byte(s, (uch)((w) & 0xff)); \\\n    put_byte(s, (uch)((ush)(w) >> 8)); \\\n}\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\n#ifdef DEBUG\nlocal void send_bits      OF((deflate_state *s, int value, int length));\n\nlocal void send_bits(s, value, length)\n    deflate_state *s;\n    int value;  /* value to send */\n    int length; /* number of bits */\n{\n    Tracevv((stderr,\" l %2d v %4x \", length, value));\n    Assert(length > 0 && length <= 15, \"invalid length\");\n    s->bits_sent += (ulg)length;\n\n    /* If not enough room in bi_buf, use (valid) bits from bi_buf and\n     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))\n     * unused bits in value.\n     */\n    if (s->bi_valid > (int)Buf_size - length) {\n        s->bi_buf |= (value << s->bi_valid);\n        put_short(s, s->bi_buf);\n        s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);\n        s->bi_valid += length - Buf_size;\n    } else {\n        s->bi_buf |= value << s->bi_valid;\n        s->bi_valid += length;\n    }\n}\n#else /* !DEBUG */\n\n#define send_bits(s, value, length) \\\n{ int len = length;\\\n  if (s->bi_valid > (int)Buf_size - len) {\\\n    int val = value;\\\n    s->bi_buf |= (val << s->bi_valid);\\\n    put_short(s, s->bi_buf);\\\n    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\\\n    s->bi_valid += len - Buf_size;\\\n  } else {\\\n    s->bi_buf |= (value) << s->bi_valid;\\\n    s->bi_valid += len;\\\n  }\\\n}\n#endif /* DEBUG */\n\n\n/* the arguments must not have side effects */\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nlocal void tr_static_init()\n{\n#if defined(GEN_TREES_H) || !defined(STDC)\n    static int static_init_done = 0;\n    int n;        /* iterates over tree elements */\n    int bits;     /* bit counter */\n    int length;   /* length value */\n    int code;     /* code value */\n    int dist;     /* distance index */\n    ush bl_count[MAX_BITS+1];\n    /* number of codes at each bit length for an optimal tree */\n\n    if (static_init_done) return;\n\n    /* For some embedded targets, global variables are not initialized: */\n    static_l_desc.static_tree = static_ltree;\n    static_l_desc.extra_bits = extra_lbits;\n    static_d_desc.static_tree = static_dtree;\n    static_d_desc.extra_bits = extra_dbits;\n    static_bl_desc.extra_bits = extra_blbits;\n\n    /* Initialize the mapping length (0..255) -> length code (0..28) */\n    length = 0;\n    for (code = 0; code < LENGTH_CODES-1; code++) {\n        base_length[code] = length;\n        for (n = 0; n < (1<<extra_lbits[code]); n++) {\n            _length_code[length++] = (uch)code;\n        }\n    }\n    Assert (length == 256, \"tr_static_init: length != 256\");\n    /* Note that the length 255 (match length 258) can be represented\n     * in two different ways: code 284 + 5 bits or code 285, so we\n     * overwrite length_code[255] to use the best encoding:\n     */\n    _length_code[length-1] = (uch)code;\n\n    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n    dist = 0;\n    for (code = 0 ; code < 16; code++) {\n        base_dist[code] = dist;\n        for (n = 0; n < (1<<extra_dbits[code]); n++) {\n            _dist_code[dist++] = (uch)code;\n        }\n    }\n    Assert (dist == 256, \"tr_static_init: dist != 256\");\n    dist >>= 7; /* from now on, all distances are divided by 128 */\n    for ( ; code < D_CODES; code++) {\n        base_dist[code] = dist << 7;\n        for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {\n            _dist_code[256 + dist++] = (uch)code;\n        }\n    }\n    Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n    /* Construct the codes of the static literal tree */\n    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;\n    n = 0;\n    while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;\n    while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;\n    while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;\n    while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;\n    /* Codes 286 and 287 do not exist, but we must include them in the\n     * tree construction to get a canonical Huffman tree (longest code\n     * all ones)\n     */\n    gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);\n\n    /* The static distance tree is trivial: */\n    for (n = 0; n < D_CODES; n++) {\n        static_dtree[n].Len = 5;\n        static_dtree[n].Code = bi_reverse((unsigned)n, 5);\n    }\n    static_init_done = 1;\n\n#  ifdef GEN_TREES_H\n    gen_trees_header();\n#  endif\n#endif /* defined(GEN_TREES_H) || !defined(STDC) */\n}\n\n/* ===========================================================================\n * Genererate the file trees.h describing the static trees.\n */\n#ifdef GEN_TREES_H\n#  ifndef DEBUG\n#    include <stdio.h>\n#  endif\n\n#  define SEPARATOR(i, last, width) \\\n      ((i) == (last)? \"\\n};\\n\\n\" :    \\\n       ((i) % (width) == (width)-1 ? \",\\n\" : \", \"))\n\nvoid gen_trees_header()\n{\n    FILE *header = fopen(\"trees.h\", \"w\");\n    int i;\n\n    Assert (header != NULL, \"Can't open trees.h\");\n    fprintf(header,\n            \"/* header created automatically with -DGEN_TREES_H */\\n\\n\");\n\n    fprintf(header, \"local const ct_data static_ltree[L_CODES+2] = {\\n\");\n    for (i = 0; i < L_CODES+2; i++) {\n        fprintf(header, \"{{%3u},{%3u}}%s\", static_ltree[i].Code,\n                static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));\n    }\n\n    fprintf(header, \"local const ct_data static_dtree[D_CODES] = {\\n\");\n    for (i = 0; i < D_CODES; i++) {\n        fprintf(header, \"{{%2u},{%2u}}%s\", static_dtree[i].Code,\n                static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));\n    }\n\n    fprintf(header, \"const uch _dist_code[DIST_CODE_LEN] = {\\n\");\n    for (i = 0; i < DIST_CODE_LEN; i++) {\n        fprintf(header, \"%2u%s\", _dist_code[i],\n                SEPARATOR(i, DIST_CODE_LEN-1, 20));\n    }\n\n    fprintf(header, \"const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\\n\");\n    for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {\n        fprintf(header, \"%2u%s\", _length_code[i],\n                SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));\n    }\n\n    fprintf(header, \"local const int base_length[LENGTH_CODES] = {\\n\");\n    for (i = 0; i < LENGTH_CODES; i++) {\n        fprintf(header, \"%1u%s\", base_length[i],\n                SEPARATOR(i, LENGTH_CODES-1, 20));\n    }\n\n    fprintf(header, \"local const int base_dist[D_CODES] = {\\n\");\n    for (i = 0; i < D_CODES; i++) {\n        fprintf(header, \"%5u%s\", base_dist[i],\n                SEPARATOR(i, D_CODES-1, 10));\n    }\n\n    fclose(header);\n}\n#endif /* GEN_TREES_H */\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nvoid _tr_init(s)\n    deflate_state *s;\n{\n    tr_static_init();\n\n    s->l_desc.dyn_tree = s->dyn_ltree;\n    s->l_desc.stat_desc = &static_l_desc;\n\n    s->d_desc.dyn_tree = s->dyn_dtree;\n    s->d_desc.stat_desc = &static_d_desc;\n\n    s->bl_desc.dyn_tree = s->bl_tree;\n    s->bl_desc.stat_desc = &static_bl_desc;\n\n    s->bi_buf = 0;\n    s->bi_valid = 0;\n    s->last_eob_len = 8; /* enough lookahead for inflate */\n#ifdef DEBUG\n    s->compressed_len = 0L;\n    s->bits_sent = 0L;\n#endif\n\n    /* Initialize the first block of the first file: */\n    init_block(s);\n}\n\n/* ===========================================================================\n * Initialize a new block.\n */\nlocal void init_block(s)\n    deflate_state *s;\n{\n    int n; /* iterates over tree elements */\n\n    /* Initialize the trees. */\n    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;\n    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;\n    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;\n\n    s->dyn_ltree[END_BLOCK].Freq = 1;\n    s->opt_len = s->static_len = 0L;\n    s->last_lit = s->matches = 0;\n}\n\n#define SMALLEST 1\n/* Index within the heap array of least frequent node in the Huffman tree */\n\n\n/* ===========================================================================\n * Remove the smallest element from the heap and recreate the heap with\n * one less element. Updates heap and heap_len.\n */\n#define pqremove(s, tree, top) \\\n{\\\n    top = s->heap[SMALLEST]; \\\n    s->heap[SMALLEST] = s->heap[s->heap_len--]; \\\n    pqdownheap(s, tree, SMALLEST); \\\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\n#define smaller(tree, n, m, depth) \\\n   (tree[n].Freq < tree[m].Freq || \\\n   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nlocal void pqdownheap(s, tree, k)\n    deflate_state *s;\n    ct_data *tree;  /* the tree to restore */\n    int k;               /* node to move down */\n{\n    int v = s->heap[k];\n    int j = k << 1;  /* left son of k */\n    while (j <= s->heap_len) {\n        /* Set j to the smallest of the two sons: */\n        if (j < s->heap_len &&\n            smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {\n            j++;\n        }\n        /* Exit if v is smaller than both sons */\n        if (smaller(tree, v, s->heap[j], s->depth)) break;\n\n        /* Exchange v with the smallest son */\n        s->heap[k] = s->heap[j];  k = j;\n\n        /* And continue down the tree, setting j to the left son of k */\n        j <<= 1;\n    }\n    s->heap[k] = v;\n}\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n *    above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n *     array bl_count contains the frequencies for each bit length.\n *     The length opt_len is updated; static_len is also updated if stree is\n *     not null.\n */\nlocal void gen_bitlen(s, desc)\n    deflate_state *s;\n    tree_desc *desc;    /* the tree descriptor */\n{\n    ct_data *tree        = desc->dyn_tree;\n    int max_code         = desc->max_code;\n    const ct_data *stree = desc->stat_desc->static_tree;\n    const intf *extra    = desc->stat_desc->extra_bits;\n    int base             = desc->stat_desc->extra_base;\n    int max_length       = desc->stat_desc->max_length;\n    int h;              /* heap index */\n    int n, m;           /* iterate over the tree elements */\n    int bits;           /* bit length */\n    int xbits;          /* extra bits */\n    ush f;              /* frequency */\n    int overflow = 0;   /* number of elements with bit length too large */\n\n    for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;\n\n    /* In a first pass, compute the optimal bit lengths (which may\n     * overflow in the case of the bit length tree).\n     */\n    tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */\n\n    for (h = s->heap_max+1; h < HEAP_SIZE; h++) {\n        n = s->heap[h];\n        bits = tree[tree[n].Dad].Len + 1;\n        if (bits > max_length) bits = max_length, overflow++;\n        tree[n].Len = (ush)bits;\n        /* We overwrite tree[n].Dad which is no longer needed */\n\n        if (n > max_code) continue; /* not a leaf node */\n\n        s->bl_count[bits]++;\n        xbits = 0;\n        if (n >= base) xbits = extra[n-base];\n        f = tree[n].Freq;\n        s->opt_len += (ulg)f * (bits + xbits);\n        if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);\n    }\n    if (overflow == 0) return;\n\n    Trace((stderr,\"\\nbit length overflow\\n\"));\n    /* This happens for example on obj2 and pic of the Calgary corpus */\n\n    /* Find the first bit length which could increase: */\n    do {\n        bits = max_length-1;\n        while (s->bl_count[bits] == 0) bits--;\n        s->bl_count[bits]--;      /* move one leaf down the tree */\n        s->bl_count[bits+1] += 2; /* move one overflow item as its brother */\n        s->bl_count[max_length]--;\n        /* The brother of the overflow item also moves one step up,\n         * but this does not affect bl_count[max_length]\n         */\n        overflow -= 2;\n    } while (overflow > 0);\n\n    /* Now recompute all bit lengths, scanning in increasing frequency.\n     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n     * lengths instead of fixing only the wrong ones. This idea is taken\n     * from 'ar' written by Haruhiko Okumura.)\n     */\n    for (bits = max_length; bits != 0; bits--) {\n        n = s->bl_count[bits];\n        while (n != 0) {\n            m = s->heap[--h];\n            if (m > max_code) continue;\n            if (tree[m].Len != (unsigned) bits) {\n                Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n                s->opt_len += ((long)bits - (long)tree[m].Len)\n                              *(long)tree[m].Freq;\n                tree[m].Len = (ush)bits;\n            }\n            n--;\n        }\n    }\n}\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n *     zero code length.\n */\nlocal void gen_codes (tree, max_code, bl_count)\n    ct_data *tree;             /* the tree to decorate */\n    int max_code;              /* largest code with non zero frequency */\n    ushf *bl_count;            /* number of codes at each bit length */\n{\n    ush next_code[MAX_BITS+1]; /* next code value for each bit length */\n    ush code = 0;              /* running code value */\n    int bits;                  /* bit index */\n    int n;                     /* code index */\n\n    /* The distribution counts are first used to generate the code values\n     * without bit reversal.\n     */\n    for (bits = 1; bits <= MAX_BITS; bits++) {\n        next_code[bits] = code = (code + bl_count[bits-1]) << 1;\n    }\n    /* Check that the bit counts in bl_count are consistent. The last code\n     * must be all ones.\n     */\n    Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n            \"inconsistent bit counts\");\n    Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n    for (n = 0;  n <= max_code; n++) {\n        int len = tree[n].Len;\n        if (len == 0) continue;\n        /* Now reverse the bits */\n        tree[n].Code = bi_reverse(next_code[len]++, len);\n\n        Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n             n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n    }\n}\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n *     and corresponding code. The length opt_len is updated; static_len is\n *     also updated if stree is not null. The field max_code is set.\n */\nlocal void build_tree(s, desc)\n    deflate_state *s;\n    tree_desc *desc; /* the tree descriptor */\n{\n    ct_data *tree         = desc->dyn_tree;\n    const ct_data *stree  = desc->stat_desc->static_tree;\n    int elems             = desc->stat_desc->elems;\n    int n, m;          /* iterate over heap elements */\n    int max_code = -1; /* largest code with non zero frequency */\n    int node;          /* new node being created */\n\n    /* Construct the initial heap, with least frequent element in\n     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n     * heap[0] is not used.\n     */\n    s->heap_len = 0, s->heap_max = HEAP_SIZE;\n\n    for (n = 0; n < elems; n++) {\n        if (tree[n].Freq != 0) {\n            s->heap[++(s->heap_len)] = max_code = n;\n            s->depth[n] = 0;\n        } else {\n            tree[n].Len = 0;\n        }\n    }\n\n    /* The pkzip format requires that at least one distance code exists,\n     * and that at least one bit should be sent even if there is only one\n     * possible code. So to avoid special checks later on we force at least\n     * two codes of non zero frequency.\n     */\n    while (s->heap_len < 2) {\n        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);\n        tree[node].Freq = 1;\n        s->depth[node] = 0;\n        s->opt_len--; if (stree) s->static_len -= stree[node].Len;\n        /* node is 0 or 1 so it does not have extra bits */\n    }\n    desc->max_code = max_code;\n\n    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n     * establish sub-heaps of increasing lengths:\n     */\n    for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);\n\n    /* Construct the Huffman tree by repeatedly combining the least two\n     * frequent nodes.\n     */\n    node = elems;              /* next internal node of the tree */\n    do {\n        pqremove(s, tree, n);  /* n = node of least frequency */\n        m = s->heap[SMALLEST]; /* m = node of next least frequency */\n\n        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */\n        s->heap[--(s->heap_max)] = m;\n\n        /* Create a new node father of n and m */\n        tree[node].Freq = tree[n].Freq + tree[m].Freq;\n        s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?\n                                s->depth[n] : s->depth[m]) + 1);\n        tree[n].Dad = tree[m].Dad = (ush)node;\n#ifdef DUMP_BL_TREE\n        if (tree == s->bl_tree) {\n            fprintf(stderr,\"\\nnode %d(%d), sons %d(%d) %d(%d)\",\n                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);\n        }\n#endif\n        /* and insert the new node in the heap */\n        s->heap[SMALLEST] = node++;\n        pqdownheap(s, tree, SMALLEST);\n\n    } while (s->heap_len >= 2);\n\n    s->heap[--(s->heap_max)] = s->heap[SMALLEST];\n\n    /* At this point, the fields freq and dad are set. We can now\n     * generate the bit lengths.\n     */\n    gen_bitlen(s, (tree_desc *)desc);\n\n    /* The field len is now set, we can generate the bit codes */\n    gen_codes ((ct_data *)tree, max_code, s->bl_count);\n}\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nlocal void scan_tree (s, tree, max_code)\n    deflate_state *s;\n    ct_data *tree;   /* the tree to be scanned */\n    int max_code;    /* and its largest code of non zero frequency */\n{\n    int n;                     /* iterates over all tree elements */\n    int prevlen = -1;          /* last emitted length */\n    int curlen;                /* length of current code */\n    int nextlen = tree[0].Len; /* length of next code */\n    int count = 0;             /* repeat count of the current code */\n    int max_count = 7;         /* max repeat count */\n    int min_count = 4;         /* min repeat count */\n\n    if (nextlen == 0) max_count = 138, min_count = 3;\n    tree[max_code+1].Len = (ush)0xffff; /* guard */\n\n    for (n = 0; n <= max_code; n++) {\n        curlen = nextlen; nextlen = tree[n+1].Len;\n        if (++count < max_count && curlen == nextlen) {\n            continue;\n        } else if (count < min_count) {\n            s->bl_tree[curlen].Freq += count;\n        } else if (curlen != 0) {\n            if (curlen != prevlen) s->bl_tree[curlen].Freq++;\n            s->bl_tree[REP_3_6].Freq++;\n        } else if (count <= 10) {\n            s->bl_tree[REPZ_3_10].Freq++;\n        } else {\n            s->bl_tree[REPZ_11_138].Freq++;\n        }\n        count = 0; prevlen = curlen;\n        if (nextlen == 0) {\n            max_count = 138, min_count = 3;\n        } else if (curlen == nextlen) {\n            max_count = 6, min_count = 3;\n        } else {\n            max_count = 7, min_count = 4;\n        }\n    }\n}\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nlocal void send_tree (s, tree, max_code)\n    deflate_state *s;\n    ct_data *tree; /* the tree to be scanned */\n    int max_code;       /* and its largest code of non zero frequency */\n{\n    int n;                     /* iterates over all tree elements */\n    int prevlen = -1;          /* last emitted length */\n    int curlen;                /* length of current code */\n    int nextlen = tree[0].Len; /* length of next code */\n    int count = 0;             /* repeat count of the current code */\n    int max_count = 7;         /* max repeat count */\n    int min_count = 4;         /* min repeat count */\n\n    /* tree[max_code+1].Len = -1; */  /* guard already set */\n    if (nextlen == 0) max_count = 138, min_count = 3;\n\n    for (n = 0; n <= max_code; n++) {\n        curlen = nextlen; nextlen = tree[n+1].Len;\n        if (++count < max_count && curlen == nextlen) {\n            continue;\n        } else if (count < min_count) {\n            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);\n\n        } else if (curlen != 0) {\n            if (curlen != prevlen) {\n                send_code(s, curlen, s->bl_tree); count--;\n            }\n            Assert(count >= 3 && count <= 6, \" 3_6?\");\n            send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);\n\n        } else if (count <= 10) {\n            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);\n\n        } else {\n            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);\n        }\n        count = 0; prevlen = curlen;\n        if (nextlen == 0) {\n            max_count = 138, min_count = 3;\n        } else if (curlen == nextlen) {\n            max_count = 6, min_count = 3;\n        } else {\n            max_count = 7, min_count = 4;\n        }\n    }\n}\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nlocal int build_bl_tree(s)\n    deflate_state *s;\n{\n    int max_blindex;  /* index of last bit length code of non zero freq */\n\n    /* Determine the bit length frequencies for literal and distance trees */\n    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);\n    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);\n\n    /* Build the bit length tree: */\n    build_tree(s, (tree_desc *)(&(s->bl_desc)));\n    /* opt_len now includes the length of the tree representations, except\n     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n     */\n\n    /* Determine the number of bit length codes to send. The pkzip format\n     * requires that at least 4 bit length codes be sent. (appnote.txt says\n     * 3 but the actual value used is 4.)\n     */\n    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {\n        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;\n    }\n    /* Update opt_len to include the bit length tree and counts */\n    s->opt_len += 3*(max_blindex+1) + 5+5+4;\n    Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n            s->opt_len, s->static_len));\n\n    return max_blindex;\n}\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nlocal void send_all_trees(s, lcodes, dcodes, blcodes)\n    deflate_state *s;\n    int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n    int rank;                    /* index in bl_order */\n\n    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n            \"too many codes\");\n    Tracev((stderr, \"\\nbl counts: \"));\n    send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */\n    send_bits(s, dcodes-1,   5);\n    send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */\n    for (rank = 0; rank < blcodes; rank++) {\n        Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);\n    }\n    Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n    send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */\n    Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n    send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */\n    Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n/* ===========================================================================\n * Send a stored block\n */\nvoid _tr_stored_block(s, buf, stored_len, eof)\n    deflate_state *s;\n    charf *buf;       /* input block */\n    ulg stored_len;   /* length of input block */\n    int eof;          /* true if this is the last block for a file */\n{\n    send_bits(s, (STORED_BLOCK<<1)+eof, 3);  /* send block type */\n#ifdef DEBUG\n    s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;\n    s->compressed_len += (stored_len + 4) << 3;\n#endif\n    copy_block(s, buf, (unsigned)stored_len, 1); /* with header */\n}\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n * The current inflate code requires 9 bits of lookahead. If the\n * last two codes for the previous block (real code plus EOB) were coded\n * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n * the last real code. In this case we send two empty static blocks instead\n * of one. (There are no problems if the previous block is stored or fixed.)\n * To simplify the code, we assume the worst case of last real code encoded\n * on one bit only.\n */\nvoid _tr_align(s)\n    deflate_state *s;\n{\n    send_bits(s, STATIC_TREES<<1, 3);\n    send_code(s, END_BLOCK, static_ltree);\n#ifdef DEBUG\n    s->compressed_len += 10L; /* 3 for block type, 7 for EOB */\n#endif\n    bi_flush(s);\n    /* Of the 10 bits for the empty block, we have already sent\n     * (10 - bi_valid) bits. The lookahead for the last real code (before\n     * the EOB of the previous block) was thus at least one plus the length\n     * of the EOB plus what we have just sent of the empty static block.\n     */\n    if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {\n        send_bits(s, STATIC_TREES<<1, 3);\n        send_code(s, END_BLOCK, static_ltree);\n#ifdef DEBUG\n        s->compressed_len += 10L;\n#endif\n        bi_flush(s);\n    }\n    s->last_eob_len = 7;\n}\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nvoid _tr_flush_block(s, buf, stored_len, eof)\n    deflate_state *s;\n    charf *buf;       /* input block, or NULL if too old */\n    ulg stored_len;   /* length of input block */\n    int eof;          /* true if this is the last block for a file */\n{\n    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n    int max_blindex = 0;  /* index of last bit length code of non zero freq */\n\n    /* Build the Huffman trees unless a stored block is forced */\n    if (s->level > 0) {\n\n         /* Check if the file is ascii or binary */\n        if (s->data_type == Z_UNKNOWN) set_data_type(s);\n\n        /* Construct the literal and distance trees */\n        build_tree(s, (tree_desc *)(&(s->l_desc)));\n        Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n                s->static_len));\n\n        build_tree(s, (tree_desc *)(&(s->d_desc)));\n        Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n                s->static_len));\n        /* At this point, opt_len and static_len are the total bit lengths of\n         * the compressed block data, excluding the tree representations.\n         */\n\n        /* Build the bit length tree for the above two trees, and get the index\n         * in bl_order of the last bit length code to send.\n         */\n        max_blindex = build_bl_tree(s);\n\n        /* Determine the best encoding. Compute the block lengths in bytes. */\n        opt_lenb = (s->opt_len+3+7)>>3;\n        static_lenb = (s->static_len+3+7)>>3;\n\n        Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n                opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n                s->last_lit));\n\n        if (static_lenb <= opt_lenb) opt_lenb = static_lenb;\n\n    } else {\n        Assert(buf != (char*)0, \"lost buf\");\n        opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n    }\n\n#ifdef FORCE_STORED\n    if (buf != (char*)0) { /* force stored block */\n#else\n    if (stored_len+4 <= opt_lenb && buf != (char*)0) {\n                       /* 4: two words for the lengths */\n#endif\n        /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n         * Otherwise we can't have processed more than WSIZE input bytes since\n         * the last block flush, because compression would have been\n         * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n         * transform a block into a stored block.\n         */\n        _tr_stored_block(s, buf, stored_len, eof);\n\n#ifdef FORCE_STATIC\n    } else if (static_lenb >= 0) { /* force static trees */\n#else\n    } else if (static_lenb == opt_lenb) {\n#endif\n        send_bits(s, (STATIC_TREES<<1)+eof, 3);\n        compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);\n#ifdef DEBUG\n        s->compressed_len += 3 + s->static_len;\n#endif\n    } else {\n        send_bits(s, (DYN_TREES<<1)+eof, 3);\n        send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,\n                       max_blindex+1);\n        compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);\n#ifdef DEBUG\n        s->compressed_len += 3 + s->opt_len;\n#endif\n    }\n    Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n    /* The above check is made mod 2^32, for files larger than 512 MB\n     * and uLong implemented on 32 bits.\n     */\n    init_block(s);\n\n    if (eof) {\n        bi_windup(s);\n#ifdef DEBUG\n        s->compressed_len += 7;  /* align on byte boundary */\n#endif\n    }\n    Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n           s->compressed_len-7*eof));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nint _tr_tally (s, dist, lc)\n    deflate_state *s;\n    unsigned dist;  /* distance of matched string */\n    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n    s->d_buf[s->last_lit] = (ush)dist;\n    s->l_buf[s->last_lit++] = (uch)lc;\n    if (dist == 0) {\n        /* lc is the unmatched char */\n        s->dyn_ltree[lc].Freq++;\n    } else {\n        s->matches++;\n        /* Here, lc is the match length - MIN_MATCH */\n        dist--;             /* dist = match distance - 1 */\n        Assert((ush)dist < (ush)MAX_DIST(s) &&\n               (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n               (ush)d_code(dist) < (ush)D_CODES,  \"_tr_tally: bad match\");\n\n        s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;\n        s->dyn_dtree[d_code(dist)].Freq++;\n    }\n\n#ifdef TRUNCATE_BLOCK\n    /* Try to guess if it is profitable to stop the current block here */\n    if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {\n        /* Compute an upper bound for the compressed length */\n        ulg out_length = (ulg)s->last_lit*8L;\n        ulg in_length = (ulg)((long)s->strstart - s->block_start);\n        int dcode;\n        for (dcode = 0; dcode < D_CODES; dcode++) {\n            out_length += (ulg)s->dyn_dtree[dcode].Freq *\n                (5L+extra_dbits[dcode]);\n        }\n        out_length >>= 3;\n        Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n               s->last_lit, in_length, out_length,\n               100L - out_length*100L/in_length));\n        if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;\n    }\n#endif\n    return (s->last_lit == s->lit_bufsize-1);\n    /* We avoid equality with lit_bufsize because of wraparound at 64K\n     * on 16 bit machines and because stored blocks are restricted to\n     * 64K-1 bytes.\n     */\n}\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nlocal void compress_block(s, ltree, dtree)\n    deflate_state *s;\n    ct_data *ltree; /* literal tree */\n    ct_data *dtree; /* distance tree */\n{\n    unsigned dist;      /* distance of matched string */\n    int lc;             /* match length or unmatched char (if dist == 0) */\n    unsigned lx = 0;    /* running index in l_buf */\n    unsigned code;      /* the code to send */\n    int extra;          /* number of extra bits to send */\n\n    if (s->last_lit != 0) do {\n        dist = s->d_buf[lx];\n        lc = s->l_buf[lx++];\n        if (dist == 0) {\n            send_code(s, lc, ltree); /* send a literal byte */\n            Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n        } else {\n            /* Here, lc is the match length - MIN_MATCH */\n            code = _length_code[lc];\n            send_code(s, code+LITERALS+1, ltree); /* send the length code */\n            extra = extra_lbits[code];\n            if (extra != 0) {\n                lc -= base_length[code];\n                send_bits(s, lc, extra);       /* send the extra length bits */\n            }\n            dist--; /* dist is now the match distance - 1 */\n            code = d_code(dist);\n            Assert (code < D_CODES, \"bad d_code\");\n\n            send_code(s, code, dtree);       /* send the distance code */\n            extra = extra_dbits[code];\n            if (extra != 0) {\n                dist -= base_dist[code];\n                send_bits(s, dist, extra);   /* send the extra distance bits */\n            }\n        } /* literal or match pair ? */\n\n        /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n        Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n               \"pendingBuf overflow\");\n\n    } while (lx < s->last_lit);\n\n    send_code(s, END_BLOCK, ltree);\n    s->last_eob_len = ltree[END_BLOCK].Len;\n}\n\n/* ===========================================================================\n * Set the data type to ASCII or BINARY, using a crude approximation:\n * binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise.\n * IN assertion: the fields freq of dyn_ltree are set and the total of all\n * frequencies does not exceed 64K (to fit in an int on 16 bit machines).\n */\nlocal void set_data_type(s)\n    deflate_state *s;\n{\n    int n = 0;\n    unsigned ascii_freq = 0;\n    unsigned bin_freq = 0;\n    while (n < 7)        bin_freq += s->dyn_ltree[n++].Freq;\n    while (n < 128)    ascii_freq += s->dyn_ltree[n++].Freq;\n    while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq;\n    s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII);\n}\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nlocal unsigned bi_reverse(code, len)\n    unsigned code; /* the value to invert */\n    int len;       /* its bit length */\n{\n    register unsigned res = 0;\n    do {\n        res |= code & 1;\n        code >>= 1, res <<= 1;\n    } while (--len > 0);\n    return res >> 1;\n}\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nlocal void bi_flush(s)\n    deflate_state *s;\n{\n    if (s->bi_valid == 16) {\n        put_short(s, s->bi_buf);\n        s->bi_buf = 0;\n        s->bi_valid = 0;\n    } else if (s->bi_valid >= 8) {\n        put_byte(s, (Byte)s->bi_buf);\n        s->bi_buf >>= 8;\n        s->bi_valid -= 8;\n    }\n}\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nlocal void bi_windup(s)\n    deflate_state *s;\n{\n    if (s->bi_valid > 8) {\n        put_short(s, s->bi_buf);\n    } else if (s->bi_valid > 0) {\n        put_byte(s, (Byte)s->bi_buf);\n    }\n    s->bi_buf = 0;\n    s->bi_valid = 0;\n#ifdef DEBUG\n    s->bits_sent = (s->bits_sent+7) & ~7;\n#endif\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nlocal void copy_block(s, buf, len, header)\n    deflate_state *s;\n    charf    *buf;    /* the input data */\n    unsigned len;     /* its length */\n    int      header;  /* true if block header must be written */\n{\n    bi_windup(s);        /* align on byte boundary */\n    s->last_eob_len = 8; /* enough lookahead for inflate */\n\n    if (header) {\n        put_short(s, (ush)len);\n        put_short(s, (ush)~len);\n#ifdef DEBUG\n        s->bits_sent += 2*16;\n#endif\n    }\n#ifdef DEBUG\n    s->bits_sent += (ulg)len<<3;\n#endif\n    while (len--) {\n        put_byte(s, *buf++);\n    }\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/trees.h",
    "content": "/* header created automatically with -DGEN_TREES_H */\n\nlocal const ct_data static_ltree[L_CODES+2] = {\n{{ 12},{  8}}, {{140},{  8}}, {{ 76},{  8}}, {{204},{  8}}, {{ 44},{  8}},\n{{172},{  8}}, {{108},{  8}}, {{236},{  8}}, {{ 28},{  8}}, {{156},{  8}},\n{{ 92},{  8}}, {{220},{  8}}, {{ 60},{  8}}, {{188},{  8}}, {{124},{  8}},\n{{252},{  8}}, {{  2},{  8}}, {{130},{  8}}, {{ 66},{  8}}, {{194},{  8}},\n{{ 34},{  8}}, {{162},{  8}}, {{ 98},{  8}}, {{226},{  8}}, {{ 18},{  8}},\n{{146},{  8}}, {{ 82},{  8}}, {{210},{  8}}, {{ 50},{  8}}, {{178},{  8}},\n{{114},{  8}}, {{242},{  8}}, {{ 10},{  8}}, {{138},{  8}}, {{ 74},{  8}},\n{{202},{  8}}, {{ 42},{  8}}, {{170},{  8}}, {{106},{  8}}, {{234},{  8}},\n{{ 26},{  8}}, {{154},{  8}}, {{ 90},{  8}}, {{218},{  8}}, {{ 58},{  8}},\n{{186},{  8}}, {{122},{  8}}, {{250},{  8}}, {{  6},{  8}}, {{134},{  8}},\n{{ 70},{  8}}, {{198},{  8}}, {{ 38},{  8}}, {{166},{  8}}, {{102},{  8}},\n{{230},{  8}}, {{ 22},{  8}}, {{150},{  8}}, {{ 86},{  8}}, {{214},{  8}},\n{{ 54},{  8}}, {{182},{  8}}, {{118},{  8}}, {{246},{  8}}, {{ 14},{  8}},\n{{142},{  8}}, {{ 78},{  8}}, {{206},{  8}}, {{ 46},{  8}}, {{174},{  8}},\n{{110},{  8}}, {{238},{  8}}, {{ 30},{  8}}, {{158},{  8}}, {{ 94},{  8}},\n{{222},{  8}}, {{ 62},{  8}}, {{190},{  8}}, {{126},{  8}}, {{254},{  8}},\n{{  1},{  8}}, {{129},{  8}}, {{ 65},{  8}}, {{193},{  8}}, {{ 33},{  8}},\n{{161},{  8}}, {{ 97},{  8}}, {{225},{  8}}, {{ 17},{  8}}, {{145},{  8}},\n{{ 81},{  8}}, {{209},{  8}}, {{ 49},{  8}}, {{177},{  8}}, {{113},{  8}},\n{{241},{  8}}, {{  9},{  8}}, {{137},{  8}}, {{ 73},{  8}}, {{201},{  8}},\n{{ 41},{  8}}, {{169},{  8}}, {{105},{  8}}, {{233},{  8}}, {{ 25},{  8}},\n{{153},{  8}}, {{ 89},{  8}}, {{217},{  8}}, {{ 57},{  8}}, {{185},{  8}},\n{{121},{  8}}, {{249},{  8}}, {{  5},{  8}}, {{133},{  8}}, {{ 69},{  8}},\n{{197},{  8}}, {{ 37},{  8}}, {{165},{  8}}, {{101},{  8}}, {{229},{  8}},\n{{ 21},{  8}}, {{149},{  8}}, {{ 85},{  8}}, {{213},{  8}}, {{ 53},{  8}},\n{{181},{  8}}, {{117},{  8}}, {{245},{  8}}, {{ 13},{  8}}, {{141},{  8}},\n{{ 77},{  8}}, {{205},{  8}}, {{ 45},{  8}}, {{173},{  8}}, {{109},{  8}},\n{{237},{  8}}, {{ 29},{  8}}, {{157},{  8}}, {{ 93},{  8}}, {{221},{  8}},\n{{ 61},{  8}}, {{189},{  8}}, {{125},{  8}}, {{253},{  8}}, {{ 19},{  9}},\n{{275},{  9}}, {{147},{  9}}, {{403},{  9}}, {{ 83},{  9}}, {{339},{  9}},\n{{211},{  9}}, {{467},{  9}}, {{ 51},{  9}}, {{307},{  9}}, {{179},{  9}},\n{{435},{  9}}, {{115},{  9}}, {{371},{  9}}, {{243},{  9}}, {{499},{  9}},\n{{ 11},{  9}}, {{267},{  9}}, {{139},{  9}}, {{395},{  9}}, {{ 75},{  9}},\n{{331},{  9}}, {{203},{  9}}, {{459},{  9}}, {{ 43},{  9}}, {{299},{  9}},\n{{171},{  9}}, {{427},{  9}}, {{107},{  9}}, {{363},{  9}}, {{235},{  9}},\n{{491},{  9}}, {{ 27},{  9}}, {{283},{  9}}, {{155},{  9}}, {{411},{  9}},\n{{ 91},{  9}}, {{347},{  9}}, {{219},{  9}}, {{475},{  9}}, {{ 59},{  9}},\n{{315},{  9}}, {{187},{  9}}, {{443},{  9}}, {{123},{  9}}, {{379},{  9}},\n{{251},{  9}}, {{507},{  9}}, {{  7},{  9}}, {{263},{  9}}, {{135},{  9}},\n{{391},{  9}}, {{ 71},{  9}}, {{327},{  9}}, {{199},{  9}}, {{455},{  9}},\n{{ 39},{  9}}, {{295},{  9}}, {{167},{  9}}, {{423},{  9}}, {{103},{  9}},\n{{359},{  9}}, {{231},{  9}}, {{487},{  9}}, {{ 23},{  9}}, {{279},{  9}},\n{{151},{  9}}, {{407},{  9}}, {{ 87},{  9}}, {{343},{  9}}, {{215},{  9}},\n{{471},{  9}}, {{ 55},{  9}}, {{311},{  9}}, {{183},{  9}}, {{439},{  9}},\n{{119},{  9}}, {{375},{  9}}, {{247},{  9}}, {{503},{  9}}, {{ 15},{  9}},\n{{271},{  9}}, {{143},{  9}}, {{399},{  9}}, {{ 79},{  9}}, {{335},{  9}},\n{{207},{  9}}, {{463},{  9}}, {{ 47},{  9}}, {{303},{  9}}, {{175},{  9}},\n{{431},{  9}}, {{111},{  9}}, {{367},{  9}}, {{239},{  9}}, {{495},{  9}},\n{{ 31},{  9}}, {{287},{  9}}, {{159},{  9}}, {{415},{  9}}, {{ 95},{  9}},\n{{351},{  9}}, {{223},{  9}}, {{479},{  9}}, {{ 63},{  9}}, {{319},{  9}},\n{{191},{  9}}, {{447},{  9}}, {{127},{  9}}, {{383},{  9}}, {{255},{  9}},\n{{511},{  9}}, {{  0},{  7}}, {{ 64},{  7}}, {{ 32},{  7}}, {{ 96},{  7}},\n{{ 16},{  7}}, {{ 80},{  7}}, {{ 48},{  7}}, {{112},{  7}}, {{  8},{  7}},\n{{ 72},{  7}}, {{ 40},{  7}}, {{104},{  7}}, {{ 24},{  7}}, {{ 88},{  7}},\n{{ 56},{  7}}, {{120},{  7}}, {{  4},{  7}}, {{ 68},{  7}}, {{ 36},{  7}},\n{{100},{  7}}, {{ 20},{  7}}, {{ 84},{  7}}, {{ 52},{  7}}, {{116},{  7}},\n{{  3},{  8}}, {{131},{  8}}, {{ 67},{  8}}, {{195},{  8}}, {{ 35},{  8}},\n{{163},{  8}}, {{ 99},{  8}}, {{227},{  8}}\n};\n\nlocal const ct_data static_dtree[D_CODES] = {\n{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},\n{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},\n{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},\n{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},\n{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},\n{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}\n};\n\nconst uch _dist_code[DIST_CODE_LEN] = {\n 0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,\n 8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,\n10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,\n11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,\n12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,\n13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,\n13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,\n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,\n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,\n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,\n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,\n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,\n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  0,  0, 16, 17,\n18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,\n23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,\n26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,\n26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,\n27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,\n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,\n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,\n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29\n};\n\nconst uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n 0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,\n13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,\n17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,\n19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,\n21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,\n22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,\n23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,\n25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,\n26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,\n26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28\n};\n\nlocal const int base_length[LENGTH_CODES] = {\n0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,\n64, 80, 96, 112, 128, 160, 192, 224, 0\n};\n\nlocal const int base_dist[D_CODES] = {\n    0,     1,     2,     3,     4,     6,     8,    12,    16,    24,\n   32,    48,    64,    96,   128,   192,   256,   384,   512,   768,\n 1024,  1536,  2048,  3072,  4096,  6144,  8192, 12288, 16384, 24576\n};\n\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/uncompr.c",
    "content": "/* uncompr.c -- decompress a memory buffer\n * Copyright (C) 1995-2003 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#define ZLIB_INTERNAL\n#include \"zlib.h\"\n\n/* ===========================================================================\n     Decompresses the source buffer into the destination buffer.  sourceLen is\n   the byte length of the source buffer. Upon entry, destLen is the total\n   size of the destination buffer, which must be large enough to hold the\n   entire uncompressed data. (The size of the uncompressed data must have\n   been saved previously by the compressor and transmitted to the decompressor\n   by some mechanism outside the scope of this compression library.)\n   Upon exit, destLen is the actual size of the compressed buffer.\n     This function can be used to decompress a whole file at once if the\n   input file is mmap'ed.\n\n     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_BUF_ERROR if there was not enough room in the output\n   buffer, or Z_DATA_ERROR if the input data was corrupted.\n*/\nint ZEXPORT uncompress (dest, destLen, source, sourceLen)\n    Bytef *dest;\n    uLongf *destLen;\n    const Bytef *source;\n    uLong sourceLen;\n{\n    z_stream stream;\n    int err;\n\n    stream.next_in = (Bytef*)source;\n    stream.avail_in = (uInt)sourceLen;\n    /* Check for source > 64K on 16-bit machine: */\n    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;\n\n    stream.next_out = dest;\n    stream.avail_out = (uInt)*destLen;\n    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;\n\n    stream.zalloc = (alloc_func)0;\n    stream.zfree = (free_func)0;\n\n    err = inflateInit(&stream);\n    if (err != Z_OK) return err;\n\n    err = inflate(&stream, Z_FINISH);\n    if (err != Z_STREAM_END) {\n        inflateEnd(&stream);\n        if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))\n            return Z_DATA_ERROR;\n        return err;\n    }\n    *destLen = stream.total_out;\n\n    err = inflateEnd(&stream);\n    return err;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/unzip.c",
    "content": "/* unzip.c -- IO for uncompress .zip files using zlib\n   Version 1.1, February 14h, 2010\n   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Modifications of Unzip for Zip64\n         Copyright (C) 2007-2008 Even Rouault\n\n         Modifications for Zip64 support on both zip and unzip\n         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )\n\n         For more info read MiniZip_info.txt\n\n\n  ------------------------------------------------------------------------------------\n  Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of\n  compatibility with older software. The following is from the original crypt.c.\n  Code woven in by Terry Thorsen 1/2003.\n\n  Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.\n\n  See the accompanying file LICENSE, version 2000-Apr-09 or later\n  (the contents of which are also included in zip.h) for terms of use.\n  If, for some reason, all these files are missing, the Info-ZIP license\n  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html\n\n        crypt.c (full version) by Info-ZIP.      Last revised:  [see crypt.h]\n\n  The encryption/decryption parts of this source code (as opposed to the\n  non-echoing password parts) were originally written in Europe.  The\n  whole source package can be freely distributed, including from the USA.\n  (Prior to January 2000, re-export from the US was a violation of US law.)\n\n        This encryption code is a direct transcription of the algorithm from\n  Roger Schlafly, described by Phil Katz in the file appnote.txt.  This\n  file (appnote.txt) is distributed with the PKZIP program (even in the\n  version without encryption capabilities).\n\n        ------------------------------------------------------------------------------------\n\n        Changes in unzip.c\n\n        2007-2008 - Even Rouault - Addition of cpl_unzGetCurrentFileZStreamPos\n  2007-2008 - Even Rouault - Decoration of symbol names unz* -> cpl_unz*\n  2007-2008 - Even Rouault - Remove old C style function prototypes\n  2007-2008 - Even Rouault - Add unzip support for ZIP64\n\n        Copyright (C) 2007-2008 Even Rouault\n\n\n        Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again).\n  Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G\n                                should only read the compressed/uncompressed size from the Zip64 format if\n                                the size from normal header was 0xFFFFFFFF\n  Oct-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant\n        Oct-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required)\n                                Patch created by Daniel Borca\n\n  Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer\n\n  Copyright (C) 1998 - 2010 Gilles Vollant, Even Rouault, Mathias Svensson\n\n*/\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#ifndef NOUNCRYPT\n        //#define NOUNCRYPT\n#endif\n\n#include \"zlib.h\"\n#include \"unzip.h\"\n\n#ifdef STDC\n#  include <stddef.h>\n#  include <string.h>\n#  include <stdlib.h>\n#endif\n#ifdef NO_ERRNO_H\n    extern int errno;\n#else\n#   include <errno.h>\n#endif\n\n\n#ifndef local\n#  define local static\n#endif\n/* compile with -Dlocal if your debugger can't find static symbols */\n\n\n#ifndef CASESENSITIVITYDEFAULT_NO\n#  if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)\n#    define CASESENSITIVITYDEFAULT_NO\n#  endif\n#endif\n\n\n#ifndef UNZ_BUFSIZE\n#define UNZ_BUFSIZE (16384)\n#endif\n\n//#if defined (RAZOR)\n#ifndef UNZ_MAXFILENAMEINZIP\n#define UNZ_MAXFILENAMEINZIP (256)\n#endif\n//#endif \n\n#ifndef ALLOC\n# define ALLOC(size) (malloc(size))\n#endif\n#ifndef TRYFREE\n# define TRYFREE(p) {if (p) free(p);}\n#endif\n\n#define SIZECENTRALDIRITEM (0x2e)\n#define SIZEZIPLOCALHEADER (0x1e)\n\n\nconst char unz_copyright[] =\n   \" unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll\";\n\n\n//#if defined(RAZOR)\n/* unz_file_info_interntal contain internal info about a file in zipfile*/\ntypedef struct unz_file_info64_internal_s\n{\n    ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */\n} unz_file_info64_internal;\n\n//#endif // defined(RAZOR)\n\n/* file_in_zip_read_info_s contain internal information about a file in zipfile,\n    when reading and decompress it */\ntypedef struct\n{\n    char  *read_buffer;         /* internal buffer for compressed data */\n    z_stream stream;            /* zLib stream structure for inflate */\n\n#ifdef HAVE_BZIP2\n    bz_stream bstream;          /* bzLib stream structure for bziped */\n#endif\n\n    ZPOS64_T pos_in_zipfile;       /* position in byte on the zipfile, for fseek*/\n    uLong stream_initialised;   /* flag set if stream structure is initialised*/\n\n    ZPOS64_T offset_local_extrafield;/* offset of the local extra field */\n    uInt  size_local_extrafield;/* size of the local extra field */\n    ZPOS64_T pos_local_extrafield;   /* position in the local extra field in read*/\n    ZPOS64_T total_out_64;\n\n    uLong crc32;                /* crc32 of all data uncompressed */\n    uLong crc32_wait;           /* crc32 we must obtain after decompress all */\n    ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */\n    ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/\n    zlib_filefunc64_32_def z_filefunc;\n    voidpf filestream;        /* io structore of the zipfile */\n    uLong compression_method;   /* compression method (0==store) */\n    ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/\n    int   raw;\n} file_in_zip64_read_info_s;\n\n//#if defined(RAZOR)\n/* unz64_s contain internal information about the zipfile\n*/\ntypedef struct\n{\n    zlib_filefunc64_32_def z_filefunc;\n    int is64bitOpenFunction;\n    voidpf filestream;        /* io structore of the zipfile */\n    unz_global_info64 gi;       /* public global information */\n    ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/\n    ZPOS64_T num_file;             /* number of the current file in the zipfile*/\n    ZPOS64_T pos_in_central_dir;   /* pos of the current file in the central dir*/\n    ZPOS64_T current_file_ok;      /* flag about the usability of the current file*/\n    ZPOS64_T central_pos;          /* position of the beginning of the central dir*/\n\n    ZPOS64_T size_central_dir;     /* size of the central directory  */\n    ZPOS64_T offset_central_dir;   /* offset of start of central directory with\n                                   respect to the starting disk number */\n\n    unz_file_info64 cur_file_info; /* public info about the current file in zip*/\n    unz_file_info64_internal cur_file_info_internal; /* private info about it*/\n    file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current\n                                        file if we are decompressing it */\n    int encrypted;\n\n    int isZip64;\n\n#    ifndef NOUNCRYPT\n    unsigned long keys[3];     /* keys defining the pseudo-random sequence */\n    const unsigned long* pcrc_32_tab;\n#    endif\n} unz64_s;\n\n//#endif // defined(RAZOR)\n\n\n#ifndef NOUNCRYPT\n#include \"crypt.h\"\n#endif\n\n/* ===========================================================================\n     Read a byte from a gz_stream; update next_in and avail_in. Return EOF\n   for end of file.\n   IN assertion: the stream s has been sucessfully opened for reading.\n*/\n\n\nlocal int unz64local_getByte OF((\n    const zlib_filefunc64_32_def* pzlib_filefunc_def,\n    voidpf filestream,\n    int *pi));\n\nlocal int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)\n{\n    unsigned char c;\n    int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1);\n    if (err==1)\n    {\n        *pi = (int)c;\n        return UNZ_OK;\n    }\n    else\n    {\n        if (ZERROR64(*pzlib_filefunc_def,filestream))\n            return UNZ_ERRNO;\n        else\n            return UNZ_EOF;\n    }\n}\n\n\n/* ===========================================================================\n   Reads a long in LSB order from the given gz_stream. Sets\n*/\nlocal int unz64local_getShort OF((\n    const zlib_filefunc64_32_def* pzlib_filefunc_def,\n    voidpf filestream,\n    uLong *pX));\n\nlocal int unz64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def,\n                             voidpf filestream,\n                             uLong *pX)\n{\n    uLong x ;\n    int i = 0;\n    int err;\n\n    err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x = (uLong)i;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((uLong)i)<<8;\n\n    if (err==UNZ_OK)\n        *pX = x;\n    else\n        *pX = 0;\n    return err;\n}\n\nlocal int unz64local_getLong OF((\n    const zlib_filefunc64_32_def* pzlib_filefunc_def,\n    voidpf filestream,\n    uLong *pX));\n\nlocal int unz64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def,\n                            voidpf filestream,\n                            uLong *pX)\n{\n    uLong x ;\n    int i = 0;\n    int err;\n\n    err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x = (uLong)i;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((uLong)i)<<8;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((uLong)i)<<16;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x += ((uLong)i)<<24;\n\n    if (err==UNZ_OK)\n        *pX = x;\n    else\n        *pX = 0;\n    return err;\n}\n\nlocal int unz64local_getLong64 OF((\n    const zlib_filefunc64_32_def* pzlib_filefunc_def,\n    voidpf filestream,\n    ZPOS64_T *pX));\n\n\nlocal int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def,\n                            voidpf filestream,\n                            ZPOS64_T *pX)\n{\n    ZPOS64_T x ;\n    int i = 0;\n    int err;\n\n    err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x = (ZPOS64_T)i;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((ZPOS64_T)i)<<8;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((ZPOS64_T)i)<<16;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((ZPOS64_T)i)<<24;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((ZPOS64_T)i)<<32;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((ZPOS64_T)i)<<40;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((ZPOS64_T)i)<<48;\n\n    if (err==UNZ_OK)\n        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x |= ((ZPOS64_T)i)<<56;\n\n    if (err==UNZ_OK)\n        *pX = x;\n    else\n        *pX = 0;\n    return err;\n}\n\n/* My own strcmpi / strcasecmp */\nlocal int strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2)\n{\n    for (;;)\n    {\n        char c1=*(fileName1++);\n        char c2=*(fileName2++);\n        if ((c1>='a') && (c1<='z'))\n            c1 -= 0x20;\n        if ((c2>='a') && (c2<='z'))\n            c2 -= 0x20;\n        if (c1=='\\0')\n            return ((c2=='\\0') ? 0 : -1);\n        if (c2=='\\0')\n            return 1;\n        if (c1<c2)\n            return -1;\n        if (c1>c2)\n            return 1;\n    }\n}\n\n\n#ifdef  CASESENSITIVITYDEFAULT_NO\n#define CASESENSITIVITYDEFAULTVALUE 2\n#else\n#define CASESENSITIVITYDEFAULTVALUE 1\n#endif\n\n#ifndef STRCMPCASENOSENTIVEFUNCTION\n#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal\n#endif\n\n/*\n   Compare two filename (fileName1,fileName2).\n   If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)\n   If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi\n                                                                or strcasecmp)\n   If iCaseSenisivity = 0, case sensitivity is defaut of your operating system\n        (like 1 on Unix, 2 on Windows)\n\n*/\nextern int ZEXPORT unzStringFileNameCompare (const char*  fileName1,\n                                                 const char*  fileName2,\n                                                 int iCaseSensitivity)\n\n{\n    if (iCaseSensitivity==0)\n        iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;\n\n    if (iCaseSensitivity==1)\n        return strcmp(fileName1,fileName2);\n\n    return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);\n}\n\n#ifndef BUFREADCOMMENT\n#define BUFREADCOMMENT (0x400)\n#endif\n\n/*\n  Locate the Central directory of a zipfile (at the end, just before\n    the global comment)\n*/\nlocal ZPOS64_T unz64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));\nlocal ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)\n{\n    unsigned char* buf;\n    ZPOS64_T uSizeFile;\n    ZPOS64_T uBackRead;\n    ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */\n    ZPOS64_T uPosFound=0;\n\n    if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)\n        return 0;\n\n\n    uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);\n\n    if (uMaxBack>uSizeFile)\n        uMaxBack = uSizeFile;\n\n    buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);\n    if (buf==NULL)\n        return 0;\n\n    uBackRead = 4;\n    while (uBackRead<uMaxBack)\n    {\n        uLong uReadSize;\n        ZPOS64_T uReadPos ;\n        int i;\n        if (uBackRead+BUFREADCOMMENT>uMaxBack)\n            uBackRead = uMaxBack;\n        else\n            uBackRead+=BUFREADCOMMENT;\n        uReadPos = uSizeFile-uBackRead ;\n\n        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?\n                     (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);\n        if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)\n            break;\n\n        if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)\n            break;\n\n        for (i=(int)uReadSize-3; (i--)>0;)\n            if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&\n                ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))\n            {\n                uPosFound = uReadPos+i;\n                break;\n            }\n\n        if (uPosFound!=0)\n            break;\n    }\n    TRYFREE(buf);\n    return uPosFound;\n}\n\n\n/*\n  Locate the Central directory 64 of a zipfile (at the end, just before\n    the global comment)\n*/\nlocal ZPOS64_T unz64local_SearchCentralDir64 OF((\n    const zlib_filefunc64_32_def* pzlib_filefunc_def,\n    voidpf filestream));\n\nlocal ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def,\n                                      voidpf filestream)\n{\n    unsigned char* buf;\n    ZPOS64_T uSizeFile;\n    ZPOS64_T uBackRead;\n    ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */\n    ZPOS64_T uPosFound=0;\n    uLong uL;\n                ZPOS64_T relativeOffset;\n\n    if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)\n        return 0;\n\n\n    uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);\n\n    if (uMaxBack>uSizeFile)\n        uMaxBack = uSizeFile;\n\n    buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);\n    if (buf==NULL)\n        return 0;\n\n    uBackRead = 4;\n    while (uBackRead<uMaxBack)\n    {\n        uLong uReadSize;\n        ZPOS64_T uReadPos;\n        int i;\n        if (uBackRead+BUFREADCOMMENT>uMaxBack)\n            uBackRead = uMaxBack;\n        else\n            uBackRead+=BUFREADCOMMENT;\n        uReadPos = uSizeFile-uBackRead ;\n\n        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?\n                     (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);\n        if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)\n            break;\n\n        if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)\n            break;\n\n        for (i=(int)uReadSize-3; (i--)>0;)\n            if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&\n                ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))\n            {\n                uPosFound = uReadPos+i;\n                break;\n            }\n\n        if (uPosFound!=0)\n            break;\n    }\n    TRYFREE(buf);\n    if (uPosFound == 0)\n        return 0;\n\n    /* Zip64 end of central directory locator */\n    if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0)\n        return 0;\n\n    /* the signature, already checked */\n    if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)\n        return 0;\n\n    /* number of the disk with the start of the zip64 end of  central directory */\n    if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)\n        return 0;\n    if (uL != 0)\n        return 0;\n\n    /* relative offset of the zip64 end of central directory record */\n    if (unz64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=UNZ_OK)\n        return 0;\n\n    /* total number of disks */\n    if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)\n        return 0;\n    if (uL != 1)\n        return 0;\n\n    /* Goto end of central directory record */\n    if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0)\n        return 0;\n\n     /* the signature */\n    if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)\n        return 0;\n\n    if (uL != 0x06064b50)\n        return 0;\n\n    return relativeOffset;\n}\n\n/*\n  Open a Zip file. path contain the full pathname (by example,\n     on a Windows NT computer \"c:\\\\test\\\\zlib114.zip\" or on an Unix computer\n     \"zlib/zlib114.zip\".\n     If the zipfile cannot be opened (file doesn't exist or in not valid), the\n       return value is NULL.\n     Else, the return value is a unzFile Handle, usable with other function\n       of this unzip package.\n*/\nlocal unzFile unzOpenInternal (const void *path,\n                               zlib_filefunc64_32_def* pzlib_filefunc64_32_def,\n                               int is64bitOpenFunction)\n{\n    unz64_s us;\n    unz64_s *s;\n    ZPOS64_T central_pos;\n    uLong   uL;\n\n    uLong number_disk;          /* number of the current dist, used for\n                                   spaning ZIP, unsupported, always 0*/\n    uLong number_disk_with_CD;  /* number the the disk with central dir, used\n                                   for spaning ZIP, unsupported, always 0*/\n    ZPOS64_T number_entry_CD;      /* total number of entries in\n                                   the central dir\n                                   (same than number_entry on nospan) */\n\n    int err=UNZ_OK;\n\n    if (unz_copyright[0]!=' ')\n        return NULL;\n\n    us.z_filefunc.zseek32_file = NULL;\n    us.z_filefunc.ztell32_file = NULL;\n    if (pzlib_filefunc64_32_def==NULL)\n        fill_fopen64_filefunc(&us.z_filefunc.zfile_func64);\n    else\n        us.z_filefunc = *pzlib_filefunc64_32_def;\n    us.is64bitOpenFunction = is64bitOpenFunction;\n\n\n\n    us.filestream = ZOPEN64(us.z_filefunc,\n                                                 path,\n                                                 ZLIB_FILEFUNC_MODE_READ |\n                                                 ZLIB_FILEFUNC_MODE_EXISTING);\n    if (us.filestream==NULL)\n        return NULL;\n\n    central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream);\n    if (central_pos)\n    {\n        uLong uS;\n        ZPOS64_T uL64;\n\n        us.isZip64 = 1;\n\n        if (ZSEEK64(us.z_filefunc, us.filestream,\n                                      central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)\n        err=UNZ_ERRNO;\n\n        /* the signature, already checked */\n        if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* size of zip64 end of central directory record */\n        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&uL64)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* version made by */\n        if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* version needed to extract */\n        if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* number of this disk */\n        if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* number of the disk with the start of the central directory */\n        if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* total number of entries in the central directory on this disk */\n        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* total number of entries in the central directory */\n        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        if ((number_entry_CD!=us.gi.number_entry) ||\n            (number_disk_with_CD!=0) ||\n            (number_disk!=0))\n            err=UNZ_BADZIPFILE;\n\n        /* size of the central directory */\n        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* offset of start of central directory with respect to the\n          starting disk number */\n        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        us.gi.size_comment = 0;\n    }\n    else\n    {\n        central_pos = unz64local_SearchCentralDir(&us.z_filefunc,us.filestream);\n        if (central_pos==0)\n            err=UNZ_ERRNO;\n\n        us.isZip64 = 0;\n\n        if (ZSEEK64(us.z_filefunc, us.filestream,\n                                        central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)\n            err=UNZ_ERRNO;\n\n        /* the signature, already checked */\n        if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* number of this disk */\n        if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* number of the disk with the start of the central directory */\n        if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)\n            err=UNZ_ERRNO;\n\n        /* total number of entries in the central dir on this disk */\n        if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)\n            err=UNZ_ERRNO;\n        us.gi.number_entry = uL;\n\n        /* total number of entries in the central dir */\n        if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)\n            err=UNZ_ERRNO;\n        number_entry_CD = uL;\n\n        if ((number_entry_CD!=us.gi.number_entry) ||\n            (number_disk_with_CD!=0) ||\n            (number_disk!=0))\n            err=UNZ_BADZIPFILE;\n\n        /* size of the central directory */\n        if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)\n            err=UNZ_ERRNO;\n        us.size_central_dir = uL;\n\n        /* offset of start of central directory with respect to the\n            starting disk number */\n        if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)\n            err=UNZ_ERRNO;\n        us.offset_central_dir = uL;\n\n        /* zipfile comment length */\n        if (unz64local_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)\n            err=UNZ_ERRNO;\n    }\n\n    if ((central_pos<us.offset_central_dir+us.size_central_dir) &&\n        (err==UNZ_OK))\n        err=UNZ_BADZIPFILE;\n\n    if (err!=UNZ_OK)\n    {\n        ZCLOSE64(us.z_filefunc, us.filestream);\n        return NULL;\n    }\n\n    us.byte_before_the_zipfile = central_pos -\n                            (us.offset_central_dir+us.size_central_dir);\n    us.central_pos = central_pos;\n    us.pfile_in_zip_read = NULL;\n    us.encrypted = 0;\n\n\n    s=(unz64_s*)ALLOC(sizeof(unz64_s));\n    if( s != NULL)\n    {\n        *s=us;\n        unzGoToFirstFile((unzFile)s);\n    }\n    return (unzFile)s;\n}\n\n\nextern unzFile ZEXPORT unzOpen2 (const char *path,\n                                        zlib_filefunc_def* pzlib_filefunc32_def)\n{\n    if (pzlib_filefunc32_def != NULL)\n    {\n        zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;\n        fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def);\n        return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 0);\n    }\n    else\n        return unzOpenInternal(path, NULL, 0);\n}\n\nextern unzFile ZEXPORT unzOpen2_64 (const void *path,\n                                     zlib_filefunc64_def* pzlib_filefunc_def)\n{\n    if (pzlib_filefunc_def != NULL)\n    {\n        zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;\n        zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def;\n        zlib_filefunc64_32_def_fill.ztell32_file = NULL;\n        zlib_filefunc64_32_def_fill.zseek32_file = NULL;\n        return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 1);\n    }\n    else\n        return unzOpenInternal(path, NULL, 1);\n}\n\nextern unzFile ZEXPORT unzOpen (const char *path)\n{\n    return unzOpenInternal(path, NULL, 0);\n}\n\nextern unzFile ZEXPORT unzOpen64 (const void *path)\n{\n    return unzOpenInternal(path, NULL, 1);\n}\n\n/*\n  Close a ZipFile opened with unzipOpen.\n  If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),\n    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.\n  return UNZ_OK if there is no problem. */\nextern int ZEXPORT unzClose (unzFile file)\n{\n    unz64_s* s;\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n\n    if (s->pfile_in_zip_read!=NULL)\n        unzCloseCurrentFile(file);\n\n    ZCLOSE64(s->z_filefunc, s->filestream);\n    TRYFREE(s);\n    return UNZ_OK;\n}\n\n\n/*\n  Write info about the ZipFile in the *pglobal_info structure.\n  No preparation of the structure is needed\n  return UNZ_OK if there is no problem. */\nextern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info)\n{\n    unz64_s* s;\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    *pglobal_info=s->gi;\n    return UNZ_OK;\n}\n\nextern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info32)\n{\n    unz64_s* s;\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    /* to do : check if number_entry is not truncated */\n    pglobal_info32->number_entry = (uLong)s->gi.number_entry;\n    pglobal_info32->size_comment = s->gi.size_comment;\n    return UNZ_OK;\n}\n/*\n   Translate date/time from Dos format to tm_unz (readable more easilty)\n*/\nlocal void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm)\n{\n    ZPOS64_T uDate;\n    uDate = (ZPOS64_T)(ulDosDate>>16);\n    ptm->tm_mday = (uInt)(uDate&0x1f) ;\n    ptm->tm_mon =  (uInt)((((uDate)&0x1E0)/0x20)-1) ;\n    ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;\n\n    ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);\n    ptm->tm_min =  (uInt) ((ulDosDate&0x7E0)/0x20) ;\n    ptm->tm_sec =  (uInt) (2*(ulDosDate&0x1f)) ;\n}\n\n/*\n  Get Info about the current file in the zipfile, with internal only info\n*/\nlocal int unz64local_GetCurrentFileInfoInternal OF((unzFile file,\n                                                  unz_file_info64 *pfile_info,\n                                                  unz_file_info64_internal\n                                                  *pfile_info_internal,\n                                                  char *szFileName,\n                                                  uLong fileNameBufferSize,\n                                                  void *extraField,\n                                                  uLong extraFieldBufferSize,\n                                                  char *szComment,\n                                                  uLong commentBufferSize));\n\nlocal int unz64local_GetCurrentFileInfoInternal (unzFile file,\n                                                  unz_file_info64 *pfile_info,\n                                                  unz_file_info64_internal\n                                                  *pfile_info_internal,\n                                                  char *szFileName,\n                                                  uLong fileNameBufferSize,\n                                                  void *extraField,\n                                                  uLong extraFieldBufferSize,\n                                                  char *szComment,\n                                                  uLong commentBufferSize)\n{\n    unz64_s* s;\n    unz_file_info64 file_info;\n    unz_file_info64_internal file_info_internal;\n    int err=UNZ_OK;\n    uLong uMagic;\n    long lSeek=0;\n    uLong uL;\n\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    if (ZSEEK64(s->z_filefunc, s->filestream,\n              s->pos_in_central_dir+s->byte_before_the_zipfile,\n              ZLIB_FILEFUNC_SEEK_SET)!=0)\n        err=UNZ_ERRNO;\n\n\n    /* we check the magic */\n    if (err==UNZ_OK)\n    {\n        if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)\n            err=UNZ_ERRNO;\n        else if (uMagic!=0x02014b50)\n            err=UNZ_BADZIPFILE;\n    }\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);\n\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)\n        err=UNZ_ERRNO;\n    file_info.compressed_size = uL;\n\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)\n        err=UNZ_ERRNO;\n    file_info.uncompressed_size = uL;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n                // relative offset of local header\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)\n        err=UNZ_ERRNO;\n    file_info_internal.offset_curfile = uL;\n\n    lSeek+=file_info.size_filename;\n    if ((err==UNZ_OK) && (szFileName!=NULL))\n    {\n        uLong uSizeRead ;\n        if (file_info.size_filename<fileNameBufferSize)\n        {\n            *(szFileName+file_info.size_filename)='\\0';\n            uSizeRead = file_info.size_filename;\n        }\n        else\n            uSizeRead = fileNameBufferSize;\n\n        if ((file_info.size_filename>0) && (fileNameBufferSize>0))\n            if (ZREAD64(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)\n                err=UNZ_ERRNO;\n        lSeek -= uSizeRead;\n    }\n\n    // Read extrafield\n    if ((err==UNZ_OK) && (extraField!=NULL))\n    {\n        ZPOS64_T uSizeRead ;\n        if (file_info.size_file_extra<extraFieldBufferSize)\n            uSizeRead = file_info.size_file_extra;\n        else\n            uSizeRead = extraFieldBufferSize;\n\n        if (lSeek!=0)\n        {\n            if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)\n                lSeek=0;\n            else\n                err=UNZ_ERRNO;\n        }\n\n        if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))\n            if (ZREAD64(s->z_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead)\n                err=UNZ_ERRNO;\n\n        lSeek += file_info.size_file_extra - (uLong)uSizeRead;\n    }\n    else\n        lSeek += file_info.size_file_extra;\n\n\n    if ((err==UNZ_OK) && (file_info.size_file_extra != 0))\n    {\n                                uLong acc = 0;\n\n        // since lSeek now points to after the extra field we need to move back\n        lSeek -= file_info.size_file_extra;\n\n        if (lSeek!=0)\n        {\n            if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)\n                lSeek=0;\n            else\n                err=UNZ_ERRNO;\n        }\n\n        while(acc < file_info.size_file_extra)\n        {\n            uLong headerId;\n                                                uLong dataSize;\n\n            if (unz64local_getShort(&s->z_filefunc, s->filestream,&headerId) != UNZ_OK)\n                err=UNZ_ERRNO;\n\n            if (unz64local_getShort(&s->z_filefunc, s->filestream,&dataSize) != UNZ_OK)\n                err=UNZ_ERRNO;\n\n            /* ZIP64 extra fields */\n            if (headerId == 0x0001)\n            {\n                                                        uLong uL;\n\n                                                                if(file_info.uncompressed_size == (ZPOS64_T)(unsigned long)-1)\n                                                                {\n                                                                        if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)\n                                                                                        err=UNZ_ERRNO;\n                                                                }\n\n                                                                if(file_info.compressed_size == (ZPOS64_T)(unsigned long)-1)\n                                                                {\n                                                                        if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)\n                                                                                  err=UNZ_ERRNO;\n                                                                }\n\n                                                                if(file_info_internal.offset_curfile == (ZPOS64_T)(unsigned long)-1)\n                                                                {\n                                                                        /* Relative Header offset */\n                                                                        if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)\n                                                                                err=UNZ_ERRNO;\n                                                                }\n\n                                                                if(file_info.disk_num_start == (unsigned long)-1)\n                                                                {\n                                                                        /* Disk Start Number */\n                                                                        if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)\n                                                                                err=UNZ_ERRNO;\n                                                                }\n\n            }\n            else\n            {\n                if (ZSEEK64(s->z_filefunc, s->filestream,dataSize,ZLIB_FILEFUNC_SEEK_CUR)!=0)\n                    err=UNZ_ERRNO;\n            }\n\n            acc += 2 + 2 + dataSize;\n        }\n    }\n\n    if ((err==UNZ_OK) && (szComment!=NULL))\n    {\n        uLong uSizeRead ;\n        if (file_info.size_file_comment<commentBufferSize)\n        {\n            *(szComment+file_info.size_file_comment)='\\0';\n            uSizeRead = file_info.size_file_comment;\n        }\n        else\n            uSizeRead = commentBufferSize;\n\n        if (lSeek!=0)\n        {\n            if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)\n                lSeek=0;\n            else\n                err=UNZ_ERRNO;\n        }\n\n        if ((file_info.size_file_comment>0) && (commentBufferSize>0))\n            if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)\n                err=UNZ_ERRNO;\n        lSeek+=file_info.size_file_comment - uSizeRead;\n    }\n    else\n        lSeek+=file_info.size_file_comment;\n\n\n    if ((err==UNZ_OK) && (pfile_info!=NULL))\n        *pfile_info=file_info;\n\n    if ((err==UNZ_OK) && (pfile_info_internal!=NULL))\n        *pfile_info_internal=file_info_internal;\n\n    return err;\n}\n\n\n\n/*\n  Write info about the ZipFile in the *pglobal_info structure.\n  No preparation of the structure is needed\n  return UNZ_OK if there is no problem.\n*/\nextern int ZEXPORT unzGetCurrentFileInfo64 (unzFile file,\n                                          unz_file_info64 * pfile_info,\n                                          char * szFileName, uLong fileNameBufferSize,\n                                          void *extraField, uLong extraFieldBufferSize,\n                                          char* szComment,  uLong commentBufferSize)\n{\n    return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL,\n                                                szFileName,fileNameBufferSize,\n                                                extraField,extraFieldBufferSize,\n                                                szComment,commentBufferSize);\n}\n\nextern int ZEXPORT unzGetCurrentFileInfo (unzFile file,\n                                          unz_file_info * pfile_info,\n                                          char * szFileName, uLong fileNameBufferSize,\n                                          void *extraField, uLong extraFieldBufferSize,\n                                          char* szComment,  uLong commentBufferSize)\n{\n    int err;\n    unz_file_info64 file_info64;\n    err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL,\n                                                szFileName,fileNameBufferSize,\n                                                extraField,extraFieldBufferSize,\n                                                szComment,commentBufferSize);\n    if (err==UNZ_OK)\n    {\n        pfile_info->version = file_info64.version;\n        pfile_info->version_needed = file_info64.version_needed;\n        pfile_info->flag = file_info64.flag;\n        pfile_info->compression_method = file_info64.compression_method;\n        pfile_info->dosDate = file_info64.dosDate;\n        pfile_info->crc = file_info64.crc;\n\n        pfile_info->size_filename = file_info64.size_filename;\n        pfile_info->size_file_extra = file_info64.size_file_extra;\n        pfile_info->size_file_comment = file_info64.size_file_comment;\n\n        pfile_info->disk_num_start = file_info64.disk_num_start;\n        pfile_info->internal_fa = file_info64.internal_fa;\n        pfile_info->external_fa = file_info64.external_fa;\n\n        pfile_info->tmu_date = file_info64.tmu_date,\n\n\n        pfile_info->compressed_size = (uLong)file_info64.compressed_size;\n        pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size;\n\n    }\n    return err;\n}\n/*\n  Set the current file of the zipfile to the first file.\n  return UNZ_OK if there is no problem\n*/\nextern int ZEXPORT unzGoToFirstFile (unzFile file)\n{\n    int err=UNZ_OK;\n    unz64_s* s;\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    s->pos_in_central_dir=s->offset_central_dir;\n    s->num_file=0;\n    err=unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,\n                                             &s->cur_file_info_internal,\n                                             NULL,0,NULL,0,NULL,0);\n    s->current_file_ok = (err == UNZ_OK);\n    return err;\n}\n\n/*\n  Set the current file of the zipfile to the next file.\n  return UNZ_OK if there is no problem\n  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.\n*/\nextern int ZEXPORT unzGoToNextFile (unzFile  file)\n{\n    unz64_s* s;\n    int err;\n\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    if (!s->current_file_ok)\n        return UNZ_END_OF_LIST_OF_FILE;\n    if (s->gi.number_entry != 0xffff)    /* 2^16 files overflow hack */\n      if (s->num_file+1==s->gi.number_entry)\n        return UNZ_END_OF_LIST_OF_FILE;\n\n    s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +\n            s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;\n    s->num_file++;\n    err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,\n                                               &s->cur_file_info_internal,\n                                               NULL,0,NULL,0,NULL,0);\n    s->current_file_ok = (err == UNZ_OK);\n    return err;\n}\n\n\n/*\n  Try locate the file szFileName in the zipfile.\n  For the iCaseSensitivity signification, see unzipStringFileNameCompare\n\n  return value :\n  UNZ_OK if the file is found. It becomes the current file.\n  UNZ_END_OF_LIST_OF_FILE if the file is not found\n*/\nextern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity)\n{\n    unz64_s* s;\n    int err;\n\n    /* We remember the 'current' position in the file so that we can jump\n     * back there if we fail.\n     */\n    unz_file_info64 cur_file_infoSaved;\n    unz_file_info64_internal cur_file_info_internalSaved;\n    ZPOS64_T num_fileSaved;\n    ZPOS64_T pos_in_central_dirSaved;\n\n\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n\n    if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)\n        return UNZ_PARAMERROR;\n\n    s=(unz64_s*)file;\n    if (!s->current_file_ok)\n        return UNZ_END_OF_LIST_OF_FILE;\n\n    /* Save the current state */\n    num_fileSaved = s->num_file;\n    pos_in_central_dirSaved = s->pos_in_central_dir;\n    cur_file_infoSaved = s->cur_file_info;\n    cur_file_info_internalSaved = s->cur_file_info_internal;\n\n    err = unzGoToFirstFile(file);\n\n    while (err == UNZ_OK)\n    {\n        char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];\n        err = unzGetCurrentFileInfo64(file,NULL,\n                                    szCurrentFileName,sizeof(szCurrentFileName)-1,\n                                    NULL,0,NULL,0);\n        if (err == UNZ_OK)\n        {\n            if (unzStringFileNameCompare(szCurrentFileName,\n                                            szFileName,iCaseSensitivity)==0)\n                return UNZ_OK;\n            err = unzGoToNextFile(file);\n        }\n    }\n\n    /* We failed, so restore the state of the 'current file' to where we\n     * were.\n     */\n    s->num_file = num_fileSaved ;\n    s->pos_in_central_dir = pos_in_central_dirSaved ;\n    s->cur_file_info = cur_file_infoSaved;\n    s->cur_file_info_internal = cur_file_info_internalSaved;\n    return err;\n}\n\n\n/*\n///////////////////////////////////////////\n// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)\n// I need random access\n//\n// Further optimization could be realized by adding an ability\n// to cache the directory in memory. The goal being a single\n// comprehensive file read to put the file I need in a memory.\n*/\n\n/*\ntypedef struct unz_file_pos_s\n{\n    ZPOS64_T pos_in_zip_directory;   // offset in file\n    ZPOS64_T num_of_file;            // # of file\n} unz_file_pos;\n*/\n\nextern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos*  file_pos)\n{\n    unz64_s* s;\n\n    if (file==NULL || file_pos==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    if (!s->current_file_ok)\n        return UNZ_END_OF_LIST_OF_FILE;\n\n    file_pos->pos_in_zip_directory  = s->pos_in_central_dir;\n    file_pos->num_of_file           = s->num_file;\n\n    return UNZ_OK;\n}\n\nextern int ZEXPORT unzGetFilePos(\n    unzFile file,\n    unz_file_pos* file_pos)\n{\n    unz64_file_pos file_pos64;\n    int err = unzGetFilePos64(file,&file_pos64);\n    if (err==UNZ_OK)\n    {\n        file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory;\n        file_pos->num_of_file = (uLong)file_pos64.num_of_file;\n    }\n    return err;\n}\n\nextern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos)\n{\n    unz64_s* s;\n    int err;\n\n    if (file==NULL || file_pos==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n\n    /* jump to the right spot */\n    s->pos_in_central_dir = file_pos->pos_in_zip_directory;\n    s->num_file           = file_pos->num_of_file;\n\n    /* set the current file */\n    err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,\n                                               &s->cur_file_info_internal,\n                                               NULL,0,NULL,0,NULL,0);\n    /* return results */\n    s->current_file_ok = (err == UNZ_OK);\n    return err;\n}\n\nextern int ZEXPORT unzGoToFilePos(\n    unzFile file,\n    unz_file_pos* file_pos)\n{\n    unz64_file_pos file_pos64;\n    if (file_pos == NULL)\n        return UNZ_PARAMERROR;\n\n    file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory;\n    file_pos64.num_of_file = file_pos->num_of_file;\n    return unzGoToFilePos64(file,&file_pos64);\n}\n\n/*\n// Unzip Helper Functions - should be here?\n///////////////////////////////////////////\n*/\n\n/*\n  Read the local header of the current zipfile\n  Check the coherency of the local header and info in the end of central\n        directory about this file\n  store in *piSizeVar the size of extra info in local header\n        (filename and size of extra field data)\n*/\nlocal int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar,\n                                                    ZPOS64_T * poffset_local_extrafield,\n                                                    uInt  * psize_local_extrafield)\n{\n    uLong uMagic,uData,uFlags;\n    uLong size_filename;\n    uLong size_extra_field;\n    int err=UNZ_OK;\n\n    *piSizeVar = 0;\n    *poffset_local_extrafield = 0;\n    *psize_local_extrafield = 0;\n\n    if (ZSEEK64(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +\n                                s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)\n        return UNZ_ERRNO;\n\n\n    if (err==UNZ_OK)\n    {\n        if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)\n            err=UNZ_ERRNO;\n        else if (uMagic!=0x04034b50)\n            err=UNZ_BADZIPFILE;\n    }\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)\n        err=UNZ_ERRNO;\n/*\n    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))\n        err=UNZ_BADZIPFILE;\n*/\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)\n        err=UNZ_ERRNO;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)\n        err=UNZ_ERRNO;\n    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))\n        err=UNZ_BADZIPFILE;\n\n    if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&\n/* #ifdef HAVE_BZIP2 */\n                         (s->cur_file_info.compression_method!=Z_BZIP2ED) &&\n/* #endif */\n                         (s->cur_file_info.compression_method!=Z_DEFLATED))\n        err=UNZ_BADZIPFILE;\n\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */\n        err=UNZ_ERRNO;\n\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */\n        err=UNZ_ERRNO;\n    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0))\n        err=UNZ_BADZIPFILE;\n\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */\n        err=UNZ_ERRNO;\n    else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0))\n        err=UNZ_BADZIPFILE;\n\n    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */\n        err=UNZ_ERRNO;\n    else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0))\n        err=UNZ_BADZIPFILE;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)\n        err=UNZ_ERRNO;\n    else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))\n        err=UNZ_BADZIPFILE;\n\n    *piSizeVar += (uInt)size_filename;\n\n    if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)\n        err=UNZ_ERRNO;\n    *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +\n                                    SIZEZIPLOCALHEADER + size_filename;\n    *psize_local_extrafield = (uInt)size_extra_field;\n\n    *piSizeVar += (uInt)size_extra_field;\n\n    return err;\n}\n\n/*\n  Open for reading data the current file in the zipfile.\n  If there is no error and the file is opened, the return value is UNZ_OK.\n*/\nextern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,\n                                            int* level, int raw, const char* password)\n{\n    int err=UNZ_OK;\n    uInt iSizeVar;\n    unz64_s* s;\n    file_in_zip64_read_info_s* pfile_in_zip_read_info;\n    ZPOS64_T offset_local_extrafield;  /* offset of the local extra field */\n    uInt  size_local_extrafield;    /* size of the local extra field */\n#    ifndef NOUNCRYPT\n    char source[12];\n#    else\n    if (password != NULL)\n        return UNZ_PARAMERROR;\n#    endif\n\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    if (!s->current_file_ok)\n        return UNZ_PARAMERROR;\n\n    if (s->pfile_in_zip_read != NULL)\n        unzCloseCurrentFile(file);\n\n    if (unz64local_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)\n        return UNZ_BADZIPFILE;\n\n    pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s));\n    if (pfile_in_zip_read_info==NULL)\n        return UNZ_INTERNALERROR;\n\n    pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);\n    pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;\n    pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;\n    pfile_in_zip_read_info->pos_local_extrafield=0;\n    pfile_in_zip_read_info->raw=raw;\n\n    if (pfile_in_zip_read_info->read_buffer==NULL)\n    {\n        TRYFREE(pfile_in_zip_read_info);\n        return UNZ_INTERNALERROR;\n    }\n\n    pfile_in_zip_read_info->stream_initialised=0;\n\n    if (method!=NULL)\n        *method = (int)s->cur_file_info.compression_method;\n\n    if (level!=NULL)\n    {\n        *level = 6;\n        switch (s->cur_file_info.flag & 0x06)\n        {\n          case 6 : *level = 1; break;\n          case 4 : *level = 2; break;\n          case 2 : *level = 9; break;\n        }\n    }\n\n    if ((s->cur_file_info.compression_method!=0) &&\n/* #ifdef HAVE_BZIP2 */\n        (s->cur_file_info.compression_method!=Z_BZIP2ED) &&\n/* #endif */\n        (s->cur_file_info.compression_method!=Z_DEFLATED))\n\n        err=UNZ_BADZIPFILE;\n\n    pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;\n    pfile_in_zip_read_info->crc32=0;\n    pfile_in_zip_read_info->total_out_64=0;\n    pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method;\n    pfile_in_zip_read_info->filestream=s->filestream;\n    pfile_in_zip_read_info->z_filefunc=s->z_filefunc;\n    pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;\n\n    pfile_in_zip_read_info->stream.total_out = 0;\n\n    if ((s->cur_file_info.compression_method==Z_BZIP2ED) && (!raw))\n    {\n#ifdef HAVE_BZIP2\n      pfile_in_zip_read_info->bstream.bzalloc = (void *(*) (void *, int, int))0;\n      pfile_in_zip_read_info->bstream.bzfree = (free_func)0;\n      pfile_in_zip_read_info->bstream.opaque = (voidpf)0;\n      pfile_in_zip_read_info->bstream.state = (voidpf)0;\n\n      pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;\n      pfile_in_zip_read_info->stream.zfree = (free_func)0;\n      pfile_in_zip_read_info->stream.opaque = (voidpf)0;\n      pfile_in_zip_read_info->stream.next_in = (voidpf)0;\n      pfile_in_zip_read_info->stream.avail_in = 0;\n\n      err=BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0);\n      if (err == Z_OK)\n        pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED;\n      else\n      {\n        TRYFREE(pfile_in_zip_read_info);\n        return err;\n      }\n#else\n      pfile_in_zip_read_info->raw=1;\n#endif\n    }\n    else if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw))\n    {\n      pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;\n      pfile_in_zip_read_info->stream.zfree = (free_func)0;\n      pfile_in_zip_read_info->stream.opaque = (voidpf)0;\n      pfile_in_zip_read_info->stream.next_in = 0;\n      pfile_in_zip_read_info->stream.avail_in = 0;\n\n      err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);\n      if (err == Z_OK)\n        pfile_in_zip_read_info->stream_initialised=Z_DEFLATED;\n      else\n      {\n        TRYFREE(pfile_in_zip_read_info);\n        return err;\n      }\n        /* windowBits is passed < 0 to tell that there is no zlib header.\n         * Note that in this case inflate *requires* an extra \"dummy\" byte\n         * after the compressed stream in order to complete decompression and\n         * return Z_STREAM_END.\n         * In unzip, i don't wait absolutely Z_STREAM_END because I known the\n         * size of both compressed and uncompressed data\n         */\n    }\n    pfile_in_zip_read_info->rest_read_compressed =\n            s->cur_file_info.compressed_size ;\n    pfile_in_zip_read_info->rest_read_uncompressed =\n            s->cur_file_info.uncompressed_size ;\n\n\n    pfile_in_zip_read_info->pos_in_zipfile =\n            s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +\n              iSizeVar;\n\n    pfile_in_zip_read_info->stream.avail_in = (uInt)0;\n\n    s->pfile_in_zip_read = pfile_in_zip_read_info;\n                s->encrypted = 0;\n\n#    ifndef NOUNCRYPT\n    if (password != NULL)\n    {\n        int i;\n        s->pcrc_32_tab = get_crc_table();\n        init_keys(password,s->keys,s->pcrc_32_tab);\n        if (ZSEEK64(s->z_filefunc, s->filestream,\n                  s->pfile_in_zip_read->pos_in_zipfile +\n                     s->pfile_in_zip_read->byte_before_the_zipfile,\n                  SEEK_SET)!=0)\n            return UNZ_INTERNALERROR;\n        if(ZREAD64(s->z_filefunc, s->filestream,source, 12)<12)\n            return UNZ_INTERNALERROR;\n\n        for (i = 0; i<12; i++)\n            zdecode(s->keys,s->pcrc_32_tab,source[i]);\n\n        s->pfile_in_zip_read->pos_in_zipfile+=12;\n        s->encrypted=1;\n    }\n#    endif\n\n\n    return UNZ_OK;\n}\n\nextern int ZEXPORT unzOpenCurrentFile (unzFile file)\n{\n    return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);\n}\n\nextern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char*  password)\n{\n    return unzOpenCurrentFile3(file, NULL, NULL, 0, password);\n}\n\nextern int ZEXPORT unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw)\n{\n    return unzOpenCurrentFile3(file, method, level, raw, NULL);\n}\n\n/** Addition for GDAL : START */\n\nextern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file)\n{\n    unz64_s* s;\n    file_in_zip64_read_info_s* pfile_in_zip_read_info;\n    s=(unz64_s*)file;\n    if (file==NULL)\n        return 0; //UNZ_PARAMERROR;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n    if (pfile_in_zip_read_info==NULL)\n        return 0; //UNZ_PARAMERROR;\n    return pfile_in_zip_read_info->pos_in_zipfile +\n                         pfile_in_zip_read_info->byte_before_the_zipfile;\n}\n\n/** Addition for GDAL : END */\n\n/*\n  Read bytes from the current file.\n  buf contain buffer where data must be copied\n  len the size of buf.\n\n  return the number of byte copied if somes bytes are copied\n  return 0 if the end of file was reached\n  return <0 with error code if there is an error\n    (UNZ_ERRNO for IO error, or zLib error for uncompress error)\n*/\nextern int ZEXPORT unzReadCurrentFile  (unzFile file, voidp buf, unsigned len)\n{\n    int err=UNZ_OK;\n    uInt iRead = 0;\n    unz64_s* s;\n    file_in_zip64_read_info_s* pfile_in_zip_read_info;\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n    if (pfile_in_zip_read_info==NULL)\n        return UNZ_PARAMERROR;\n\n\n    if ((pfile_in_zip_read_info->read_buffer == NULL))\n        return UNZ_END_OF_LIST_OF_FILE;\n    if (len==0)\n        return 0;\n\n    pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;\n\n    pfile_in_zip_read_info->stream.avail_out = (uInt)len;\n\n    if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&\n        (!(pfile_in_zip_read_info->raw)))\n        pfile_in_zip_read_info->stream.avail_out =\n            (uInt)pfile_in_zip_read_info->rest_read_uncompressed;\n\n    if ((len>pfile_in_zip_read_info->rest_read_compressed+\n           pfile_in_zip_read_info->stream.avail_in) &&\n         (pfile_in_zip_read_info->raw))\n        pfile_in_zip_read_info->stream.avail_out =\n            (uInt)pfile_in_zip_read_info->rest_read_compressed+\n            pfile_in_zip_read_info->stream.avail_in;\n\n    while (pfile_in_zip_read_info->stream.avail_out>0)\n    {\n        if ((pfile_in_zip_read_info->stream.avail_in==0) &&\n            (pfile_in_zip_read_info->rest_read_compressed>0))\n        {\n            uInt uReadThis = UNZ_BUFSIZE;\n            if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)\n                uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;\n            if (uReadThis == 0)\n                return UNZ_EOF;\n            if (ZSEEK64(pfile_in_zip_read_info->z_filefunc,\n                      pfile_in_zip_read_info->filestream,\n                      pfile_in_zip_read_info->pos_in_zipfile +\n                         pfile_in_zip_read_info->byte_before_the_zipfile,\n                         ZLIB_FILEFUNC_SEEK_SET)!=0)\n                return UNZ_ERRNO;\n            if (ZREAD64(pfile_in_zip_read_info->z_filefunc,\n                      pfile_in_zip_read_info->filestream,\n                      pfile_in_zip_read_info->read_buffer,\n                      uReadThis)!=uReadThis)\n                return UNZ_ERRNO;\n\n\n#            ifndef NOUNCRYPT\n            if(s->encrypted)\n            {\n                uInt i;\n                for(i=0;i<uReadThis;i++)\n                  pfile_in_zip_read_info->read_buffer[i] =\n                      zdecode(s->keys,s->pcrc_32_tab,\n                              pfile_in_zip_read_info->read_buffer[i]);\n            }\n#            endif\n\n\n            pfile_in_zip_read_info->pos_in_zipfile += uReadThis;\n\n            pfile_in_zip_read_info->rest_read_compressed-=uReadThis;\n\n            pfile_in_zip_read_info->stream.next_in =\n                (Bytef*)pfile_in_zip_read_info->read_buffer;\n            pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;\n        }\n\n        if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))\n        {\n            uInt uDoCopy,i ;\n\n            if ((pfile_in_zip_read_info->stream.avail_in == 0) &&\n                (pfile_in_zip_read_info->rest_read_compressed == 0))\n                return (iRead==0) ? UNZ_EOF : iRead;\n\n            if (pfile_in_zip_read_info->stream.avail_out <\n                            pfile_in_zip_read_info->stream.avail_in)\n                uDoCopy = pfile_in_zip_read_info->stream.avail_out ;\n            else\n                uDoCopy = pfile_in_zip_read_info->stream.avail_in ;\n\n            for (i=0;i<uDoCopy;i++)\n                *(pfile_in_zip_read_info->stream.next_out+i) =\n                        *(pfile_in_zip_read_info->stream.next_in+i);\n\n            pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy;\n\n            pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,\n                                pfile_in_zip_read_info->stream.next_out,\n                                uDoCopy);\n            pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;\n            pfile_in_zip_read_info->stream.avail_in -= uDoCopy;\n            pfile_in_zip_read_info->stream.avail_out -= uDoCopy;\n            pfile_in_zip_read_info->stream.next_out += uDoCopy;\n            pfile_in_zip_read_info->stream.next_in += uDoCopy;\n            pfile_in_zip_read_info->stream.total_out += uDoCopy;\n            iRead += uDoCopy;\n        }\n        else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED)\n        {\n#ifdef HAVE_BZIP2\n            uLong uTotalOutBefore,uTotalOutAfter;\n            const Bytef *bufBefore;\n            uLong uOutThis;\n\n            pfile_in_zip_read_info->bstream.next_in        = (char*)pfile_in_zip_read_info->stream.next_in;\n            pfile_in_zip_read_info->bstream.avail_in       = pfile_in_zip_read_info->stream.avail_in;\n            pfile_in_zip_read_info->bstream.total_in_lo32  = pfile_in_zip_read_info->stream.total_in;\n            pfile_in_zip_read_info->bstream.total_in_hi32  = 0;\n            pfile_in_zip_read_info->bstream.next_out       = (char*)pfile_in_zip_read_info->stream.next_out;\n            pfile_in_zip_read_info->bstream.avail_out      = pfile_in_zip_read_info->stream.avail_out;\n            pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out;\n            pfile_in_zip_read_info->bstream.total_out_hi32 = 0;\n\n            uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32;\n            bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out;\n\n            err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream);\n\n            uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32;\n            uOutThis = uTotalOutAfter-uTotalOutBefore;\n\n            pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis;\n\n            pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis));\n            pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis;\n            iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);\n\n            pfile_in_zip_read_info->stream.next_in   = (Bytef*)pfile_in_zip_read_info->bstream.next_in;\n            pfile_in_zip_read_info->stream.avail_in  = pfile_in_zip_read_info->bstream.avail_in;\n            pfile_in_zip_read_info->stream.total_in  = pfile_in_zip_read_info->bstream.total_in_lo32;\n            pfile_in_zip_read_info->stream.next_out  = (Bytef*)pfile_in_zip_read_info->bstream.next_out;\n            pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out;\n            pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32;\n\n            if (err==BZ_STREAM_END)\n              return (iRead==0) ? UNZ_EOF : iRead;\n            if (err!=BZ_OK)\n              break;\n#endif\n        } // end Z_BZIP2ED\n        else\n        {\n            ZPOS64_T uTotalOutBefore,uTotalOutAfter;\n            const Bytef *bufBefore;\n            ZPOS64_T uOutThis;\n            int flush=Z_SYNC_FLUSH;\n\n            uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;\n            bufBefore = pfile_in_zip_read_info->stream.next_out;\n\n            /*\n            if ((pfile_in_zip_read_info->rest_read_uncompressed ==\n                     pfile_in_zip_read_info->stream.avail_out) &&\n                (pfile_in_zip_read_info->rest_read_compressed == 0))\n                flush = Z_FINISH;\n            */\n            err=inflate(&pfile_in_zip_read_info->stream,flush);\n\n            if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))\n              err = Z_DATA_ERROR;\n\n            uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;\n            uOutThis = uTotalOutAfter-uTotalOutBefore;\n\n            pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis;\n\n            pfile_in_zip_read_info->crc32 =\n                crc32(pfile_in_zip_read_info->crc32,bufBefore,\n                        (uInt)(uOutThis));\n\n            pfile_in_zip_read_info->rest_read_uncompressed -=\n                uOutThis;\n\n            iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);\n\n            if (err==Z_STREAM_END)\n                return (iRead==0) ? UNZ_EOF : iRead;\n            if (err!=Z_OK)\n                break;\n        }\n    }\n\n    if (err==Z_OK)\n        return iRead;\n    return err;\n}\n\n\n/*\n  Give the current position in uncompressed data\n*/\nextern z_off_t ZEXPORT unztell (unzFile file)\n{\n    unz64_s* s;\n    file_in_zip64_read_info_s* pfile_in_zip_read_info;\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n    if (pfile_in_zip_read_info==NULL)\n        return UNZ_PARAMERROR;\n\n    return (z_off_t)pfile_in_zip_read_info->stream.total_out;\n}\n\nextern ZPOS64_T ZEXPORT unztell64 (unzFile file)\n{\n\n    unz64_s* s;\n    file_in_zip64_read_info_s* pfile_in_zip_read_info;\n    if (file==NULL)\n        return (ZPOS64_T)-1;\n    s=(unz64_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n    if (pfile_in_zip_read_info==NULL)\n        return (ZPOS64_T)-1;\n\n    return pfile_in_zip_read_info->total_out_64;\n}\n\n\n/*\n  return 1 if the end of file was reached, 0 elsewhere\n*/\nextern int ZEXPORT unzeof (unzFile file)\n{\n    unz64_s* s;\n    file_in_zip64_read_info_s* pfile_in_zip_read_info;\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n    if (pfile_in_zip_read_info==NULL)\n        return UNZ_PARAMERROR;\n\n    if (pfile_in_zip_read_info->rest_read_uncompressed == 0)\n        return 1;\n    else\n        return 0;\n}\n\n\n\n/*\nRead extra field from the current file (opened by unzOpenCurrentFile)\nThis is the local-header version of the extra field (sometimes, there is\nmore info in the local-header version than in the central-header)\n\n  if buf==NULL, it return the size of the local extra field that can be read\n\n  if buf!=NULL, len is the size of the buffer, the extra header is copied in\n    buf.\n  the return value is the number of bytes copied in buf, or (if <0)\n    the error code\n*/\nextern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len)\n{\n    unz64_s* s;\n    file_in_zip64_read_info_s* pfile_in_zip_read_info;\n    uInt read_now;\n    ZPOS64_T size_to_read;\n\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n    if (pfile_in_zip_read_info==NULL)\n        return UNZ_PARAMERROR;\n\n    size_to_read = (pfile_in_zip_read_info->size_local_extrafield -\n                pfile_in_zip_read_info->pos_local_extrafield);\n\n    if (buf==NULL)\n        return (int)size_to_read;\n\n    if (len>size_to_read)\n        read_now = (uInt)size_to_read;\n    else\n        read_now = (uInt)len ;\n\n    if (read_now==0)\n        return 0;\n\n    if (ZSEEK64(pfile_in_zip_read_info->z_filefunc,\n              pfile_in_zip_read_info->filestream,\n              pfile_in_zip_read_info->offset_local_extrafield +\n              pfile_in_zip_read_info->pos_local_extrafield,\n              ZLIB_FILEFUNC_SEEK_SET)!=0)\n        return UNZ_ERRNO;\n\n    if (ZREAD64(pfile_in_zip_read_info->z_filefunc,\n              pfile_in_zip_read_info->filestream,\n              buf,read_now)!=read_now)\n        return UNZ_ERRNO;\n\n    return (int)read_now;\n}\n\n/*\n  Close the file in zip opened with unzipOpenCurrentFile\n  Return UNZ_CRCERROR if all the file was read but the CRC is not good\n*/\nextern int ZEXPORT unzCloseCurrentFile (unzFile file)\n{\n    int err=UNZ_OK;\n\n    unz64_s* s;\n    file_in_zip64_read_info_s* pfile_in_zip_read_info;\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n    if (pfile_in_zip_read_info==NULL)\n        return UNZ_PARAMERROR;\n\n\n    if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&\n        (!pfile_in_zip_read_info->raw))\n    {\n        if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)\n            err=UNZ_CRCERROR;\n    }\n\n\n    TRYFREE(pfile_in_zip_read_info->read_buffer);\n    pfile_in_zip_read_info->read_buffer = NULL;\n    if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED)\n        inflateEnd(&pfile_in_zip_read_info->stream);\n#ifdef HAVE_BZIP2\n    else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED)\n        BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream);\n#endif\n\n\n    pfile_in_zip_read_info->stream_initialised = 0;\n    TRYFREE(pfile_in_zip_read_info);\n\n    s->pfile_in_zip_read=NULL;\n\n    return err;\n}\n\n\n/*\n  Get the global comment string of the ZipFile, in the szComment buffer.\n  uSizeBuf is the size of the szComment buffer.\n  return the number of byte copied or an error code <0\n*/\nextern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uSizeBuf)\n{\n    unz64_s* s;\n    uLong uReadThis ;\n    if (file==NULL)\n        return (int)UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n\n    uReadThis = uSizeBuf;\n    if (uReadThis>s->gi.size_comment)\n        uReadThis = s->gi.size_comment;\n\n    if (ZSEEK64(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)\n        return UNZ_ERRNO;\n\n    if (uReadThis>0)\n    {\n      *szComment='\\0';\n      if (ZREAD64(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)\n        return UNZ_ERRNO;\n    }\n\n    if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))\n        *(szComment+s->gi.size_comment)='\\0';\n    return (int)uReadThis;\n}\n\n/* Additions by RX '2004 */\nextern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file)\n{\n    unz64_s* s;\n\n    if (file==NULL)\n          return 0; //UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n    if (!s->current_file_ok)\n      return 0;\n    if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)\n      if (s->num_file==s->gi.number_entry)\n         return 0;\n    return s->pos_in_central_dir;\n}\n\nextern uLong ZEXPORT unzGetOffset (unzFile file)\n{\n    ZPOS64_T offset64;\n\n    if (file==NULL)\n          return 0; //UNZ_PARAMERROR;\n    offset64 = unzGetOffset64(file);\n    return (uLong)offset64;\n}\n\nextern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos)\n{\n    unz64_s* s;\n    int err;\n\n    if (file==NULL)\n        return UNZ_PARAMERROR;\n    s=(unz64_s*)file;\n\n    s->pos_in_central_dir = pos;\n    s->num_file = s->gi.number_entry;      /* hack */\n    err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,\n                                              &s->cur_file_info_internal,\n                                              NULL,0,NULL,0,NULL,0);\n    s->current_file_ok = (err == UNZ_OK);\n    return err;\n}\n\nextern int ZEXPORT unzSetOffset (unzFile file, uLong pos)\n{\n    return unzSetOffset64(file,pos);\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/unzip.h",
    "content": "/* unzip.h -- IO for uncompress .zip files using zlib\n   Version 1.1, February 14h, 2010\n   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Modifications of Unzip for Zip64\n         Copyright (C) 2007-2008 Even Rouault\n\n         Modifications for Zip64 support on both zip and unzip\n         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )\n\n         For more info read MiniZip_info.txt\n\n         ---------------------------------------------------------------------------------\n\n        Condition of use and distribution are the same than zlib :\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n\n  ---------------------------------------------------------------------------------\n\n        Changes\n\n        See header of unzip64.c\n\n*/\n\n#ifndef _unz64_H\n#define _unz64_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef _ZLIB_H\n#include \"zlib.h\"\n#endif\n\n#ifndef  _ZLIBIOAPI_H\n#include \"ioapi.h\"\n#endif\n\n#ifdef HAVE_BZIP2\n#include \"bzlib.h\"\n#endif\n\n#define Z_BZIP2ED 12\n\n#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)\n/* like the STRICT of WIN32, we define a pointer that cannot be converted\n    from (void*) without cast */\ntypedef struct TagunzFile__ { int unused; } unzFile__;\ntypedef unzFile__ *unzFile;\n#else\ntypedef voidp unzFile;\n#endif\n\n\n#define UNZ_OK                          (0)\n#define UNZ_END_OF_LIST_OF_FILE         (-100)\n#define UNZ_ERRNO                       (Z_ERRNO)\n#define UNZ_EOF                         (0)\n#define UNZ_PARAMERROR                  (-102)\n#define UNZ_BADZIPFILE                  (-103)\n#define UNZ_INTERNALERROR               (-104)\n#define UNZ_CRCERROR                    (-105)\n\n/* tm_unz contain date/time info */\ntypedef struct tm_unz_s\n{\n    uInt tm_sec;            /* seconds after the minute - [0,59] */\n    uInt tm_min;            /* minutes after the hour - [0,59] */\n    uInt tm_hour;           /* hours since midnight - [0,23] */\n    uInt tm_mday;           /* day of the month - [1,31] */\n    uInt tm_mon;            /* months since January - [0,11] */\n    uInt tm_year;           /* years - [1980..2044] */\n} tm_unz;\n\n/* unz_global_info structure contain global data about the ZIPfile\n   These data comes from the end of central dir */\ntypedef struct unz_global_info64_s\n{\n    ZPOS64_T number_entry;         /* total number of entries in\n                                     the central dir on this disk */\n    uLong size_comment;         /* size of the global comment of the zipfile */\n} unz_global_info64;\n\ntypedef struct unz_global_info_s\n{\n    uLong number_entry;         /* total number of entries in\n                                     the central dir on this disk */\n    uLong size_comment;         /* size of the global comment of the zipfile */\n} unz_global_info;\n\n/* unz_file_info contain information about a file in the zipfile */\ntypedef struct unz_file_info64_s\n{\n    uLong version;              /* version made by                 2 bytes */\n    uLong version_needed;       /* version needed to extract       2 bytes */\n    uLong flag;                 /* general purpose bit flag        2 bytes */\n    uLong compression_method;   /* compression method              2 bytes */\n    uLong dosDate;              /* last mod file date in Dos fmt   4 bytes */\n    uLong crc;                  /* crc-32                          4 bytes */\n    ZPOS64_T compressed_size;   /* compressed size                 8 bytes */\n    ZPOS64_T uncompressed_size; /* uncompressed size               8 bytes */\n    uLong size_filename;        /* filename length                 2 bytes */\n    uLong size_file_extra;      /* extra field length              2 bytes */\n    uLong size_file_comment;    /* file comment length             2 bytes */\n\n    uLong disk_num_start;       /* disk number start               2 bytes */\n    uLong internal_fa;          /* internal file attributes        2 bytes */\n    uLong external_fa;          /* external file attributes        4 bytes */\n\n    tm_unz tmu_date;\n} unz_file_info64;\n\ntypedef struct unz_file_info_s\n{\n    uLong version;              /* version made by                 2 bytes */\n    uLong version_needed;       /* version needed to extract       2 bytes */\n    uLong flag;                 /* general purpose bit flag        2 bytes */\n    uLong compression_method;   /* compression method              2 bytes */\n    uLong dosDate;              /* last mod file date in Dos fmt   4 bytes */\n    uLong crc;                  /* crc-32                          4 bytes */\n    uLong compressed_size;      /* compressed size                 4 bytes */\n    uLong uncompressed_size;    /* uncompressed size               4 bytes */\n    uLong size_filename;        /* filename length                 2 bytes */\n    uLong size_file_extra;      /* extra field length              2 bytes */\n    uLong size_file_comment;    /* file comment length             2 bytes */\n\n    uLong disk_num_start;       /* disk number start               2 bytes */\n    uLong internal_fa;          /* internal file attributes        2 bytes */\n    uLong external_fa;          /* external file attributes        4 bytes */\n\n    tm_unz tmu_date;\n} unz_file_info;\n\nextern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,\n                                                 const char* fileName2,\n                                                 int iCaseSensitivity));\n/*\n   Compare two filename (fileName1,fileName2).\n   If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)\n   If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi\n                                or strcasecmp)\n   If iCaseSenisivity = 0, case sensitivity is defaut of your operating system\n    (like 1 on Unix, 2 on Windows)\n*/\n\n\nextern unzFile ZEXPORT unzOpen OF((const char *path));\nextern unzFile ZEXPORT unzOpen64 OF((const void *path));\n/*\n  Open a Zip file. path contain the full pathname (by example,\n     on a Windows XP computer \"c:\\\\zlib\\\\zlib113.zip\" or on an Unix computer\n     \"zlib/zlib113.zip\".\n     If the zipfile cannot be opened (file don't exist or in not valid), the\n       return value is NULL.\n     Else, the return value is a unzFile Handle, usable with other function\n       of this unzip package.\n     the \"64\" function take a const void* pointer, because the path is just the\n       value passed to the open64_file_func callback.\n     Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path\n       is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char*\n       does not describe the reality\n*/\n\n\nextern unzFile ZEXPORT unzOpen2 OF((const char *path,\n                                    zlib_filefunc_def* pzlib_filefunc_def));\n/*\n   Open a Zip file, like unzOpen, but provide a set of file low level API\n      for read/write the zip file (see ioapi.h)\n*/\n\nextern unzFile ZEXPORT unzOpen2_64 OF((const void *path,\n                                    zlib_filefunc64_def* pzlib_filefunc_def));\n/*\n   Open a Zip file, like unz64Open, but provide a set of file low level API\n      for read/write the zip file (see ioapi.h)\n*/\n\nextern int ZEXPORT unzClose OF((unzFile file));\n/*\n  Close a ZipFile opened with unzipOpen.\n  If there is files inside the .Zip opened with unzOpenCurrentFile (see later),\n    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.\n  return UNZ_OK if there is no problem. */\n\nextern int ZEXPORT unzGetGlobalInfo OF((unzFile file,\n                                        unz_global_info *pglobal_info));\n\nextern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file,\n                                        unz_global_info64 *pglobal_info));\n/*\n  Write info about the ZipFile in the *pglobal_info structure.\n  No preparation of the structure is needed\n  return UNZ_OK if there is no problem. */\n\n\nextern int ZEXPORT unzGetGlobalComment OF((unzFile file,\n                                           char *szComment,\n                                           uLong uSizeBuf));\n/*\n  Get the global comment string of the ZipFile, in the szComment buffer.\n  uSizeBuf is the size of the szComment buffer.\n  return the number of byte copied or an error code <0\n*/\n\n\n/***************************************************************************/\n/* Unzip package allow you browse the directory of the zipfile */\n\nextern int ZEXPORT unzGoToFirstFile OF((unzFile file));\n/*\n  Set the current file of the zipfile to the first file.\n  return UNZ_OK if there is no problem\n*/\n\nextern int ZEXPORT unzGoToNextFile OF((unzFile file));\n/*\n  Set the current file of the zipfile to the next file.\n  return UNZ_OK if there is no problem\n  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.\n*/\n\nextern int ZEXPORT unzLocateFile OF((unzFile file,\n                     const char *szFileName,\n                     int iCaseSensitivity));\n/*\n  Try locate the file szFileName in the zipfile.\n  For the iCaseSensitivity signification, see unzStringFileNameCompare\n\n  return value :\n  UNZ_OK if the file is found. It becomes the current file.\n  UNZ_END_OF_LIST_OF_FILE if the file is not found\n*/\n\n\n/* ****************************************** */\n/* Ryan supplied functions */\n/* unz_file_info contain information about a file in the zipfile */\ntypedef struct unz_file_pos_s\n{\n    uLong pos_in_zip_directory;   /* offset in zip file directory */\n    uLong num_of_file;            /* # of file */\n} unz_file_pos;\n\nextern int ZEXPORT unzGetFilePos(\n    unzFile file,\n    unz_file_pos* file_pos);\n\nextern int ZEXPORT unzGoToFilePos(\n    unzFile file,\n    unz_file_pos* file_pos);\n\ntypedef struct unz64_file_pos_s\n{\n    ZPOS64_T pos_in_zip_directory;   /* offset in zip file directory */\n    ZPOS64_T num_of_file;            /* # of file */\n} unz64_file_pos;\n\nextern int ZEXPORT unzGetFilePos64(\n    unzFile file,\n    unz64_file_pos* file_pos);\n\nextern int ZEXPORT unzGoToFilePos64(\n    unzFile file,\n    const unz64_file_pos* file_pos);\n\n/* ****************************************** */\n\nextern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file,\n                         unz_file_info64 *pfile_info,\n                         char *szFileName,\n                         uLong fileNameBufferSize,\n                         void *extraField,\n                         uLong extraFieldBufferSize,\n                         char *szComment,\n                         uLong commentBufferSize));\n\nextern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,\n                         unz_file_info *pfile_info,\n                         char *szFileName,\n                         uLong fileNameBufferSize,\n                         void *extraField,\n                         uLong extraFieldBufferSize,\n                         char *szComment,\n                         uLong commentBufferSize));\n/*\n  Get Info about the current file\n  if pfile_info!=NULL, the *pfile_info structure will contain somes info about\n        the current file\n  if szFileName!=NULL, the filemane string will be copied in szFileName\n            (fileNameBufferSize is the size of the buffer)\n  if extraField!=NULL, the extra field information will be copied in extraField\n            (extraFieldBufferSize is the size of the buffer).\n            This is the Central-header version of the extra field\n  if szComment!=NULL, the comment string of the file will be copied in szComment\n            (commentBufferSize is the size of the buffer)\n*/\n\n\n/** Addition for GDAL : START */\n\nextern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file));\n\n/** Addition for GDAL : END */\n\n\n/***************************************************************************/\n/* for reading the content of the current zipfile, you can open it, read data\n   from it, and close it (you can close it before reading all the file)\n   */\n\nextern int ZEXPORT unzOpenCurrentFile OF((unzFile file));\n/*\n  Open for reading data the current file in the zipfile.\n  If there is no error, the return value is UNZ_OK.\n*/\n\nextern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,\n                                                  const char* password));\n/*\n  Open for reading data the current file in the zipfile.\n  password is a crypting password\n  If there is no error, the return value is UNZ_OK.\n*/\n\nextern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,\n                                           int* method,\n                                           int* level,\n                                           int raw));\n/*\n  Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)\n    if raw==1\n  *method will receive method of compression, *level will receive level of\n     compression\n  note : you can set level parameter as NULL (if you did not want known level,\n         but you CANNOT set method parameter as NULL\n*/\n\nextern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,\n                                           int* method,\n                                           int* level,\n                                           int raw,\n                                           const char* password));\n/*\n  Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)\n    if raw==1\n  *method will receive method of compression, *level will receive level of\n     compression\n  note : you can set level parameter as NULL (if you did not want known level,\n         but you CANNOT set method parameter as NULL\n*/\n\n\nextern int ZEXPORT unzCloseCurrentFile OF((unzFile file));\n/*\n  Close the file in zip opened with unzOpenCurrentFile\n  Return UNZ_CRCERROR if all the file was read but the CRC is not good\n*/\n\nextern int ZEXPORT unzReadCurrentFile OF((unzFile file,\n                      voidp buf,\n                      unsigned len));\n/*\n  Read bytes from the current file (opened by unzOpenCurrentFile)\n  buf contain buffer where data must be copied\n  len the size of buf.\n\n  return the number of byte copied if somes bytes are copied\n  return 0 if the end of file was reached\n  return <0 with error code if there is an error\n    (UNZ_ERRNO for IO error, or zLib error for uncompress error)\n*/\n\nextern z_off_t ZEXPORT unztell OF((unzFile file));\n\nextern ZPOS64_T ZEXPORT unztell64 OF((unzFile file));\n/*\n  Give the current position in uncompressed data\n*/\n\nextern int ZEXPORT unzeof OF((unzFile file));\n/*\n  return 1 if the end of file was reached, 0 elsewhere\n*/\n\nextern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,\n                                             voidp buf,\n                                             unsigned len));\n/*\n  Read extra field from the current file (opened by unzOpenCurrentFile)\n  This is the local-header version of the extra field (sometimes, there is\n    more info in the local-header version than in the central-header)\n\n  if buf==NULL, it return the size of the local extra field\n\n  if buf!=NULL, len is the size of the buffer, the extra header is copied in\n    buf.\n  the return value is the number of bytes copied in buf, or (if <0)\n    the error code\n*/\n\n/***************************************************************************/\n\n/* Get the current file offset */\nextern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file);\nextern uLong ZEXPORT unzGetOffset (unzFile file);\n\n/* Set the current file offset */\nextern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos);\nextern int ZEXPORT unzSetOffset (unzFile file, uLong pos);\n\n\n#if defined(RAZOR)\n\n/* unz_file_info_interntal contain internal info about a file in zipfile*/\ntypedef struct unz_file_info64_internal_s\n{\n    ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */\n} unz_file_info64_internal;\n\n\n/* unz64_s contain internal information about the zipfile\n*/\ntypedef struct unz64_s\n{\n    zlib_filefunc64_32_def z_filefunc;\n    int is64bitOpenFunction;\n    voidpf filestream;        /* io structore of the zipfile */\n    unz_global_info64 gi;       /* public global information */\n    ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/\n    ZPOS64_T num_file;             /* number of the current file in the zipfile*/\n    ZPOS64_T pos_in_central_dir;   /* pos of the current file in the central dir*/\n    ZPOS64_T current_file_ok;      /* flag about the usability of the current file*/\n    ZPOS64_T central_pos;          /* position of the beginning of the central dir*/\n\n    ZPOS64_T size_central_dir;     /* size of the central directory  */\n    ZPOS64_T offset_central_dir;   /* offset of start of central directory with\n                                   respect to the starting disk number */\n\n    unz_file_info64 cur_file_info; /* public info about the current file in zip*/\n    unz_file_info64_internal cur_file_info_internal; /* private info about it*/\n    file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current\n                                        file if we are decompressing it */\n    int encrypted;\n\n    int isZip64;\n\n#    ifndef NOUNCRYPT\n    unsigned long keys[3];     /* keys defining the pseudo-random sequence */\n    const unsigned long* pcrc_32_tab;\n#    endif\n} unz64;\n\n#ifndef UNZ_MAXFILENAMEINZIP\n#define UNZ_MAXFILENAMEINZIP (256)\n#endif\n\n#endif // !defined(RAZOR)\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* _unz64_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/zconf.h",
    "content": "/* zconf.h -- configuration of the zlib compression library\n * Copyright (C) 1995-2003 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#ifndef ZCONF_H\n#define ZCONF_H\n\n/*\n * If you *really* need a unique prefix for all types and library functions,\n * compile with -DZ_PREFIX. The \"standard\" zlib should be compiled without it.\n */\n#ifdef Z_PREFIX\n#  define deflateInit_  z_deflateInit_\n#  define deflate       z_deflate\n#  define deflateEnd    z_deflateEnd\n#  define inflateInit_  z_inflateInit_\n#  define inflate       z_inflate\n#  define inflateEnd    z_inflateEnd\n#  define deflateInit2_ z_deflateInit2_\n#  define deflateSetDictionary z_deflateSetDictionary\n#  define deflateCopy   z_deflateCopy\n#  define deflateReset  z_deflateReset\n#  define deflatePrime  z_deflatePrime\n#  define deflateParams z_deflateParams\n#  define deflateBound  z_deflateBound\n#  define inflateInit2_ z_inflateInit2_\n#  define inflateSetDictionary z_inflateSetDictionary\n#  define inflateSync   z_inflateSync\n#  define inflateSyncPoint z_inflateSyncPoint\n#  define inflateCopy   z_inflateCopy\n#  define inflateReset  z_inflateReset\n#  define compress      z_compress\n#  define compress2     z_compress2\n#  define compressBound z_compressBound\n#  define uncompress    z_uncompress\n#  define adler32       z_adler32\n#  define crc32         z_crc32\n#  define get_crc_table z_get_crc_table\n\n#  define Byte          z_Byte\n#  define uInt          z_uInt\n#  define uLong         z_uLong\n#  define Bytef         z_Bytef\n#  define charf         z_charf\n#  define intf          z_intf\n#  define uIntf         z_uIntf\n#  define uLongf        z_uLongf\n#  define voidpf        z_voidpf\n#  define voidp         z_voidp\n#endif\n\n#if defined(__MSDOS__) && !defined(MSDOS)\n#  define MSDOS\n#endif\n#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)\n#  define OS2\n#endif\n#if defined(_WINDOWS) && !defined(WINDOWS)\n#  define WINDOWS\n#endif\n#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)\n#  define WIN32\n#endif\n#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)\n#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)\n#    ifndef SYS16BIT\n#      define SYS16BIT\n#    endif\n#  endif\n#endif\n\n/*\n * Compile with -DMAXSEG_64K if the alloc function cannot allocate more\n * than 64k bytes at a time (needed on systems with 16-bit int).\n */\n#ifdef SYS16BIT\n#  define MAXSEG_64K\n#endif\n#ifdef MSDOS\n#  define UNALIGNED_OK\n#endif\n\n#ifdef __STDC_VERSION__\n#  ifndef STDC\n#    define STDC\n#  endif\n#  if __STDC_VERSION__ >= 199901L\n#    ifndef STDC99\n#      define STDC99\n#    endif\n#  endif\n#endif\n#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))\n#  define STDC\n#endif\n#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))\n#  define STDC\n#endif\n#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))\n#  define STDC\n#endif\n#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))\n#  define STDC\n#endif\n\n#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */\n#  define STDC\n#endif\n\n#ifndef STDC\n#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */\n#    define const       /* note: need a more gentle solution here */\n#  endif\n#endif\n\n/* Some Mac compilers merge all .h files incorrectly: */\n#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)\n#  define NO_DUMMY_DECL\n#endif\n\n/* Maximum value for memLevel in deflateInit2 */\n#ifndef MAX_MEM_LEVEL\n#  ifdef MAXSEG_64K\n#    define MAX_MEM_LEVEL 8\n#  else\n#    define MAX_MEM_LEVEL 9\n#  endif\n#endif\n\n/* Maximum value for windowBits in deflateInit2 and inflateInit2.\n * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files\n * created by gzip. (Files created by minigzip can still be extracted by\n * gzip.)\n */\n#ifndef MAX_WBITS\n#  define MAX_WBITS   15 /* 32K LZ77 window */\n#endif\n\n/* The memory requirements for deflate are (in bytes):\n            (1 << (windowBits+2)) +  (1 << (memLevel+9))\n that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)\n plus a few kilobytes for small objects. For example, if you want to reduce\n the default memory requirements from 256K to 128K, compile with\n     make CFLAGS=\"-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7\"\n Of course this will generally degrade compression (there's no free lunch).\n\n   The memory requirements for inflate are (in bytes) 1 << windowBits\n that is, 32K for windowBits=15 (default value) plus a few kilobytes\n for small objects.\n*/\n\n                        /* Type declarations */\n\n#ifndef OF /* function prototypes */\n#  ifdef STDC\n#    define OF(args)  args\n#  else\n#    define OF(args)  ()\n#  endif\n#endif\n\n/* The following definitions for FAR are needed only for MSDOS mixed\n * model programming (small or medium model with some far allocations).\n * This was tested only with MSC; for other MSDOS compilers you may have\n * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,\n * just define FAR to be empty.\n */\n#ifdef SYS16BIT\n#  if defined(M_I86SM) || defined(M_I86MM)\n     /* MSC small or medium model */\n#    define SMALL_MEDIUM\n#    ifdef _MSC_VER\n#      define FAR _far\n#    else\n#      define FAR far\n#    endif\n#  endif\n#  if (defined(__SMALL__) || defined(__MEDIUM__))\n     /* Turbo C small or medium model */\n#    define SMALL_MEDIUM\n#    ifdef __BORLANDC__\n#      define FAR _far\n#    else\n#      define FAR far\n#    endif\n#  endif\n#endif\n\n#if defined(WINDOWS) || defined(WIN32)\n   /* If building or using zlib as a DLL, define ZLIB_DLL.\n    * This is not mandatory, but it offers a little performance increase.\n    */\n#  ifdef ZLIB_DLL\n#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))\n#      ifdef ZLIB_INTERNAL\n#        define ZEXTERN extern __declspec(dllexport)\n#      else\n#        define ZEXTERN extern __declspec(dllimport)\n#      endif\n#    endif\n#  endif  /* ZLIB_DLL */\n   /* If building or using zlib with the WINAPI/WINAPIV calling convention,\n    * define ZLIB_WINAPI.\n    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.\n    */\n#  ifdef ZLIB_WINAPI\n#    ifdef FAR\n#      undef FAR\n#    endif\n#    include <windows.h>\n     /* No need for _export, use ZLIB.DEF instead. */\n     /* For complete Windows compatibility, use WINAPI, not __stdcall. */\n#    define ZEXPORT WINAPI\n#    ifdef WIN32\n#      define ZEXPORTVA WINAPIV\n#    else\n#      define ZEXPORTVA FAR CDECL\n#    endif\n#  endif\n#endif\n\n#if defined (__BEOS__)\n#  ifdef ZLIB_DLL\n#    ifdef ZLIB_INTERNAL\n#      define ZEXPORT   __declspec(dllexport)\n#      define ZEXPORTVA __declspec(dllexport)\n#    else\n#      define ZEXPORT   __declspec(dllimport)\n#      define ZEXPORTVA __declspec(dllimport)\n#    endif\n#  endif\n#endif\n\n#ifndef ZEXTERN\n#  define ZEXTERN extern\n#endif\n#ifndef ZEXPORT\n#  define ZEXPORT\n#endif\n#ifndef ZEXPORTVA\n#  define ZEXPORTVA\n#endif\n\n#ifndef FAR\n#  define FAR\n#endif\n\n#if !defined(__MACTYPES__)\ntypedef unsigned char  Byte;  /* 8 bits */\n#endif\ntypedef unsigned int   uInt;  /* 16 bits or more */\ntypedef unsigned long  uLong; /* 32 bits or more */\n\n#ifdef SMALL_MEDIUM\n   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */\n#  define Bytef Byte FAR\n#else\n   typedef Byte  FAR Bytef;\n#endif\ntypedef char  FAR charf;\ntypedef int   FAR intf;\ntypedef uInt  FAR uIntf;\ntypedef uLong FAR uLongf;\n\n#ifdef STDC\n   typedef void const *voidpc;\n   typedef void FAR   *voidpf;\n   typedef void       *voidp;\n#else\n   typedef Byte const *voidpc;\n   typedef Byte FAR   *voidpf;\n   typedef Byte       *voidp;\n#endif\n\n#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */\n#  include <sys/types.h> /* for off_t */\n#  include <unistd.h>    /* for SEEK_* and off_t */\n#  ifdef VMS\n#    include <unixio.h>   /* for off_t */\n#  endif\n#  define z_off_t  off_t\n#endif\n#ifndef SEEK_SET\n#  define SEEK_SET        0       /* Seek from beginning of file.  */\n#  define SEEK_CUR        1       /* Seek from current position.  */\n#  define SEEK_END        2       /* Set file pointer to EOF plus \"offset\" */\n#endif\n#ifndef z_off_t\n#  define  z_off_t long\n#endif\n\n#if defined(__OS400__)\n#define NO_vsnprintf\n#endif\n\n#if defined(__MVS__)\n#  define NO_vsnprintf\n#  ifdef FAR\n#    undef FAR\n#  endif\n#endif\n\n/* MVS linker does not support external names larger than 8 bytes */\n#if defined(__MVS__)\n#   pragma map(deflateInit_,\"DEIN\")\n#   pragma map(deflateInit2_,\"DEIN2\")\n#   pragma map(deflateEnd,\"DEEND\")\n#   pragma map(deflateBound,\"DEBND\")\n#   pragma map(inflateInit_,\"ININ\")\n#   pragma map(inflateInit2_,\"ININ2\")\n#   pragma map(inflateEnd,\"INEND\")\n#   pragma map(inflateSync,\"INSY\")\n#   pragma map(inflateSetDictionary,\"INSEDI\")\n#   pragma map(compressBound,\"CMBND\")\n#   pragma map(inflate_table,\"INTABL\")\n#   pragma map(inflate_fast,\"INFA\")\n#   pragma map(inflate_copyright,\"INCOPY\")\n#endif\n\n#endif /* ZCONF_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/zconf.in.h",
    "content": "/* zconf.h -- configuration of the zlib compression library\n * Copyright (C) 1995-2003 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#ifndef ZCONF_H\n#define ZCONF_H\n\n/*\n * If you *really* need a unique prefix for all types and library functions,\n * compile with -DZ_PREFIX. The \"standard\" zlib should be compiled without it.\n */\n#ifdef Z_PREFIX\n#  define deflateInit_  z_deflateInit_\n#  define deflate       z_deflate\n#  define deflateEnd    z_deflateEnd\n#  define inflateInit_  z_inflateInit_\n#  define inflate       z_inflate\n#  define inflateEnd    z_inflateEnd\n#  define deflateInit2_ z_deflateInit2_\n#  define deflateSetDictionary z_deflateSetDictionary\n#  define deflateCopy   z_deflateCopy\n#  define deflateReset  z_deflateReset\n#  define deflatePrime  z_deflatePrime\n#  define deflateParams z_deflateParams\n#  define deflateBound  z_deflateBound\n#  define inflateInit2_ z_inflateInit2_\n#  define inflateSetDictionary z_inflateSetDictionary\n#  define inflateSync   z_inflateSync\n#  define inflateSyncPoint z_inflateSyncPoint\n#  define inflateCopy   z_inflateCopy\n#  define inflateReset  z_inflateReset\n#  define compress      z_compress\n#  define compress2     z_compress2\n#  define compressBound z_compressBound\n#  define uncompress    z_uncompress\n#  define adler32       z_adler32\n#  define crc32         z_crc32\n#  define get_crc_table z_get_crc_table\n\n#  define Byte          z_Byte\n#  define uInt          z_uInt\n#  define uLong         z_uLong\n#  define Bytef         z_Bytef\n#  define charf         z_charf\n#  define intf          z_intf\n#  define uIntf         z_uIntf\n#  define uLongf        z_uLongf\n#  define voidpf        z_voidpf\n#  define voidp         z_voidp\n#endif\n\n#if defined(__MSDOS__) && !defined(MSDOS)\n#  define MSDOS\n#endif\n#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)\n#  define OS2\n#endif\n#if defined(_WINDOWS) && !defined(WINDOWS)\n#  define WINDOWS\n#endif\n#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)\n#  define WIN32\n#endif\n#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)\n#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)\n#    ifndef SYS16BIT\n#      define SYS16BIT\n#    endif\n#  endif\n#endif\n\n/*\n * Compile with -DMAXSEG_64K if the alloc function cannot allocate more\n * than 64k bytes at a time (needed on systems with 16-bit int).\n */\n#ifdef SYS16BIT\n#  define MAXSEG_64K\n#endif\n#ifdef MSDOS\n#  define UNALIGNED_OK\n#endif\n\n#ifdef __STDC_VERSION__\n#  ifndef STDC\n#    define STDC\n#  endif\n#  if __STDC_VERSION__ >= 199901L\n#    ifndef STDC99\n#      define STDC99\n#    endif\n#  endif\n#endif\n#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))\n#  define STDC\n#endif\n#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))\n#  define STDC\n#endif\n#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))\n#  define STDC\n#endif\n#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))\n#  define STDC\n#endif\n\n#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */\n#  define STDC\n#endif\n\n#ifndef STDC\n#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */\n#    define const       /* note: need a more gentle solution here */\n#  endif\n#endif\n\n/* Some Mac compilers merge all .h files incorrectly: */\n#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)\n#  define NO_DUMMY_DECL\n#endif\n\n/* Maximum value for memLevel in deflateInit2 */\n#ifndef MAX_MEM_LEVEL\n#  ifdef MAXSEG_64K\n#    define MAX_MEM_LEVEL 8\n#  else\n#    define MAX_MEM_LEVEL 9\n#  endif\n#endif\n\n/* Maximum value for windowBits in deflateInit2 and inflateInit2.\n * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files\n * created by gzip. (Files created by minigzip can still be extracted by\n * gzip.)\n */\n#ifndef MAX_WBITS\n#  define MAX_WBITS   15 /* 32K LZ77 window */\n#endif\n\n/* The memory requirements for deflate are (in bytes):\n            (1 << (windowBits+2)) +  (1 << (memLevel+9))\n that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)\n plus a few kilobytes for small objects. For example, if you want to reduce\n the default memory requirements from 256K to 128K, compile with\n     make CFLAGS=\"-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7\"\n Of course this will generally degrade compression (there's no free lunch).\n\n   The memory requirements for inflate are (in bytes) 1 << windowBits\n that is, 32K for windowBits=15 (default value) plus a few kilobytes\n for small objects.\n*/\n\n                        /* Type declarations */\n\n#ifndef OF /* function prototypes */\n#  ifdef STDC\n#    define OF(args)  args\n#  else\n#    define OF(args)  ()\n#  endif\n#endif\n\n/* The following definitions for FAR are needed only for MSDOS mixed\n * model programming (small or medium model with some far allocations).\n * This was tested only with MSC; for other MSDOS compilers you may have\n * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,\n * just define FAR to be empty.\n */\n#ifdef SYS16BIT\n#  if defined(M_I86SM) || defined(M_I86MM)\n     /* MSC small or medium model */\n#    define SMALL_MEDIUM\n#    ifdef _MSC_VER\n#      define FAR _far\n#    else\n#      define FAR far\n#    endif\n#  endif\n#  if (defined(__SMALL__) || defined(__MEDIUM__))\n     /* Turbo C small or medium model */\n#    define SMALL_MEDIUM\n#    ifdef __BORLANDC__\n#      define FAR _far\n#    else\n#      define FAR far\n#    endif\n#  endif\n#endif\n\n#if defined(WINDOWS) || defined(WIN32)\n   /* If building or using zlib as a DLL, define ZLIB_DLL.\n    * This is not mandatory, but it offers a little performance increase.\n    */\n#  ifdef ZLIB_DLL\n#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))\n#      ifdef ZLIB_INTERNAL\n#        define ZEXTERN extern __declspec(dllexport)\n#      else\n#        define ZEXTERN extern __declspec(dllimport)\n#      endif\n#    endif\n#  endif  /* ZLIB_DLL */\n   /* If building or using zlib with the WINAPI/WINAPIV calling convention,\n    * define ZLIB_WINAPI.\n    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.\n    */\n#  ifdef ZLIB_WINAPI\n#    ifdef FAR\n#      undef FAR\n#    endif\n#    include <windows.h>\n     /* No need for _export, use ZLIB.DEF instead. */\n     /* For complete Windows compatibility, use WINAPI, not __stdcall. */\n#    define ZEXPORT WINAPI\n#    ifdef WIN32\n#      define ZEXPORTVA WINAPIV\n#    else\n#      define ZEXPORTVA FAR CDECL\n#    endif\n#  endif\n#endif\n\n#if defined (__BEOS__)\n#  ifdef ZLIB_DLL\n#    ifdef ZLIB_INTERNAL\n#      define ZEXPORT   __declspec(dllexport)\n#      define ZEXPORTVA __declspec(dllexport)\n#    else\n#      define ZEXPORT   __declspec(dllimport)\n#      define ZEXPORTVA __declspec(dllimport)\n#    endif\n#  endif\n#endif\n\n#ifndef ZEXTERN\n#  define ZEXTERN extern\n#endif\n#ifndef ZEXPORT\n#  define ZEXPORT\n#endif\n#ifndef ZEXPORTVA\n#  define ZEXPORTVA\n#endif\n\n#ifndef FAR\n#  define FAR\n#endif\n\n#if !defined(__MACTYPES__)\ntypedef unsigned char  Byte;  /* 8 bits */\n#endif\ntypedef unsigned int   uInt;  /* 16 bits or more */\ntypedef unsigned long  uLong; /* 32 bits or more */\n\n#ifdef SMALL_MEDIUM\n   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */\n#  define Bytef Byte FAR\n#else\n   typedef Byte  FAR Bytef;\n#endif\ntypedef char  FAR charf;\ntypedef int   FAR intf;\ntypedef uInt  FAR uIntf;\ntypedef uLong FAR uLongf;\n\n#ifdef STDC\n   typedef void const *voidpc;\n   typedef void FAR   *voidpf;\n   typedef void       *voidp;\n#else\n   typedef Byte const *voidpc;\n   typedef Byte FAR   *voidpf;\n   typedef Byte       *voidp;\n#endif\n\n#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */\n#  include <sys/types.h> /* for off_t */\n#  include <unistd.h>    /* for SEEK_* and off_t */\n#  ifdef VMS\n#    include <unixio.h>   /* for off_t */\n#  endif\n#  define z_off_t  off_t\n#endif\n#ifndef SEEK_SET\n#  define SEEK_SET        0       /* Seek from beginning of file.  */\n#  define SEEK_CUR        1       /* Seek from current position.  */\n#  define SEEK_END        2       /* Set file pointer to EOF plus \"offset\" */\n#endif\n#ifndef z_off_t\n#  define  z_off_t long\n#endif\n\n#if defined(__OS400__)\n#define NO_vsnprintf\n#endif\n\n#if defined(__MVS__)\n#  define NO_vsnprintf\n#  ifdef FAR\n#    undef FAR\n#  endif\n#endif\n\n/* MVS linker does not support external names larger than 8 bytes */\n#if defined(__MVS__)\n#   pragma map(deflateInit_,\"DEIN\")\n#   pragma map(deflateInit2_,\"DEIN2\")\n#   pragma map(deflateEnd,\"DEEND\")\n#   pragma map(deflateBound,\"DEBND\")\n#   pragma map(inflateInit_,\"ININ\")\n#   pragma map(inflateInit2_,\"ININ2\")\n#   pragma map(inflateEnd,\"INEND\")\n#   pragma map(inflateSync,\"INSY\")\n#   pragma map(inflateSetDictionary,\"INSEDI\")\n#   pragma map(compressBound,\"CMBND\")\n#   pragma map(inflate_table,\"INTABL\")\n#   pragma map(inflate_fast,\"INFA\")\n#   pragma map(inflate_copyright,\"INCOPY\")\n#endif\n\n#endif /* ZCONF_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/zip.c",
    "content": "/* zip.c -- IO on .zip files using zlib\n   Version 1.1, February 14h, 2010\n   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Modifications for Zip64 support\n         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )\n\n         For more info read MiniZip_info.txt\n\n         Changes\n   Oct-2009 - Mathias Svensson - Remove old C style function prototypes\n   Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives\n   Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions.\n   Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data\n                                 It is used when recreting zip archive with RAW when deleting items from a zip.\n                                 ZIP64 data is automaticly added to items that needs it, and existing ZIP64 data need to be removed.\n   Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required)\n   Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer\n\n*/\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include \"zlib.h\"\n#include \"zip.h\"\n\n#ifdef STDC\n#  include <stddef.h>\n#  include <string.h>\n#  include <stdlib.h>\n#endif\n#ifdef NO_ERRNO_H\n    extern int errno;\n#else\n#   include <errno.h>\n#endif\n\n\n#ifndef local\n#  define local static\n#endif\n/* compile with -Dlocal if your debugger can't find static symbols */\n\n#ifndef VERSIONMADEBY\n# define VERSIONMADEBY   (0x0) /* platform depedent */\n#endif\n\n#ifndef Z_BUFSIZE\n#define Z_BUFSIZE (64*1024) //(16384)\n#endif\n\n#ifndef Z_MAXFILENAMEINZIP\n#define Z_MAXFILENAMEINZIP (256)\n#endif\n\n#ifndef ALLOC\n# define ALLOC(size) (malloc(size))\n#endif\n#ifndef TRYFREE\n# define TRYFREE(p) {if (p) free(p);}\n#endif\n\n/*\n#define SIZECENTRALDIRITEM (0x2e)\n#define SIZEZIPLOCALHEADER (0x1e)\n*/\n\n/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */\n\n\n// NOT sure that this work on ALL platform\n#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32))\n\n#ifndef SEEK_CUR\n#define SEEK_CUR    1\n#endif\n\n#ifndef SEEK_END\n#define SEEK_END    2\n#endif\n\n#ifndef SEEK_SET\n#define SEEK_SET    0\n#endif\n\n#ifndef DEF_MEM_LEVEL\n#if MAX_MEM_LEVEL >= 8\n#  define DEF_MEM_LEVEL 8\n#else\n#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL\n#endif\n#endif\nconst char zip_copyright[] =\" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll\";\n\n\n#define SIZEDATA_INDATABLOCK (4096-(4*4))\n\n#define LOCALHEADERMAGIC    (0x04034b50)\n#define CENTRALHEADERMAGIC  (0x02014b50)\n#define ENDHEADERMAGIC      (0x06054b50)\n#define ZIP64ENDHEADERMAGIC      (0x6064b50)\n#define ZIP64ENDLOCHEADERMAGIC   (0x7064b50)\n\n#define FLAG_LOCALHEADER_OFFSET (0x06)\n#define CRC_LOCALHEADER_OFFSET  (0x0e)\n\n#define SIZECENTRALHEADER (0x2e) /* 46 */\n\ntypedef struct linkedlist_datablock_internal_s\n{\n  struct linkedlist_datablock_internal_s* next_datablock;\n  uLong  avail_in_this_block;\n  uLong  filled_in_this_block;\n  uLong  unused; /* for future use and alignement */\n  unsigned char data[SIZEDATA_INDATABLOCK];\n} linkedlist_datablock_internal;\n\ntypedef struct linkedlist_data_s\n{\n    linkedlist_datablock_internal* first_block;\n    linkedlist_datablock_internal* last_block;\n} linkedlist_data;\n\n\ntypedef struct\n{\n    z_stream stream;            /* zLib stream structure for inflate */\n#ifdef HAVE_BZIP2\n    bz_stream bstream;          /* bzLib stream structure for bziped */\n#endif\n\n    int  stream_initialised;    /* 1 is stream is initialised */\n    uInt pos_in_buffered_data;  /* last written byte in buffered_data */\n\n    ZPOS64_T pos_local_header;     /* offset of the local header of the file\n                                     currenty writing */\n    char* central_header;       /* central header data for the current file */\n    uLong size_centralExtra;\n    uLong size_centralheader;   /* size of the central header for cur file */\n    uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */\n    uLong flag;                 /* flag of the file currently writing */\n\n    int  method;                /* compression method of file currenty wr.*/\n    int  raw;                   /* 1 for directly writing raw data */\n    Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/\n    uLong dosDate;\n    uLong crc32;\n    int  encrypt;\n    int  zip64;               /* Add ZIP64 extened information in the extra field */\n    ZPOS64_T pos_zip64extrainfo;\n    ZPOS64_T totalCompressedData;\n    ZPOS64_T totalUncompressedData;\n#ifndef NOCRYPT\n    unsigned long keys[3];     /* keys defining the pseudo-random sequence */\n    const unsigned long* pcrc_32_tab;\n    int crypt_header_size;\n#endif\n} curfile64_info;\n\ntypedef struct\n{\n    zlib_filefunc64_32_def z_filefunc;\n    voidpf filestream;        /* io structore of the zipfile */\n    linkedlist_data central_dir;/* datablock with central dir in construction*/\n    int  in_opened_file_inzip;  /* 1 if a file in the zip is currently writ.*/\n    curfile64_info ci;            /* info on the file curretly writing */\n\n    ZPOS64_T begin_pos;            /* position of the beginning of the zipfile */\n    ZPOS64_T add_position_when_writting_offset;\n    ZPOS64_T number_entry;\n\n#ifndef NO_ADDFILEINEXISTINGZIP\n    char *globalcomment;\n#endif\n\n} zip64_internal;\n\n\n#ifndef NOCRYPT\n#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED\n#include \"crypt.h\"\n#endif\n\nlocal linkedlist_datablock_internal* allocate_new_datablock()\n{\n    linkedlist_datablock_internal* ldi;\n    ldi = (linkedlist_datablock_internal*)\n                 ALLOC(sizeof(linkedlist_datablock_internal));\n    if (ldi!=NULL)\n    {\n        ldi->next_datablock = NULL ;\n        ldi->filled_in_this_block = 0 ;\n        ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ;\n    }\n    return ldi;\n}\n\nlocal void free_datablock(linkedlist_datablock_internal* ldi)\n{\n    while (ldi!=NULL)\n    {\n        linkedlist_datablock_internal* ldinext = ldi->next_datablock;\n        TRYFREE(ldi);\n        ldi = ldinext;\n    }\n}\n\nlocal void init_linkedlist(linkedlist_data* ll)\n{\n    ll->first_block = ll->last_block = NULL;\n}\n\nlocal void free_linkedlist(linkedlist_data* ll)\n{\n    free_datablock(ll->first_block);\n    ll->first_block = ll->last_block = NULL;\n}\n\n\nlocal int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len)\n{\n    linkedlist_datablock_internal* ldi;\n    const unsigned char* from_copy;\n\n    if (ll==NULL)\n        return ZIP_INTERNALERROR;\n\n    if (ll->last_block == NULL)\n    {\n        ll->first_block = ll->last_block = allocate_new_datablock();\n        if (ll->first_block == NULL)\n            return ZIP_INTERNALERROR;\n    }\n\n    ldi = ll->last_block;\n    from_copy = (unsigned char*)buf;\n\n    while (len>0)\n    {\n        uInt copy_this;\n        uInt i;\n        unsigned char* to_copy;\n\n        if (ldi->avail_in_this_block==0)\n        {\n            ldi->next_datablock = allocate_new_datablock();\n            if (ldi->next_datablock == NULL)\n                return ZIP_INTERNALERROR;\n            ldi = ldi->next_datablock ;\n            ll->last_block = ldi;\n        }\n\n        if (ldi->avail_in_this_block < len)\n            copy_this = (uInt)ldi->avail_in_this_block;\n        else\n            copy_this = (uInt)len;\n\n        to_copy = &(ldi->data[ldi->filled_in_this_block]);\n\n        for (i=0;i<copy_this;i++)\n            *(to_copy+i)=*(from_copy+i);\n\n        ldi->filled_in_this_block += copy_this;\n        ldi->avail_in_this_block -= copy_this;\n        from_copy += copy_this ;\n        len -= copy_this;\n    }\n    return ZIP_OK;\n}\n\n\n\n/****************************************************************************/\n\n#ifndef NO_ADDFILEINEXISTINGZIP\n/* ===========================================================================\n   Inputs a long in LSB order to the given file\n   nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T)\n*/\n\nlocal int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte));\nlocal int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)\n{\n    unsigned char buf[8];\n    int n;\n    for (n = 0; n < nbByte; n++)\n    {\n        buf[n] = (unsigned char)(x & 0xff);\n        x >>= 8;\n    }\n    if (x != 0)\n      {     /* data overflow - hack for ZIP64 (X Roche) */\n      for (n = 0; n < nbByte; n++)\n        {\n          buf[n] = 0xff;\n        }\n      }\n\n    if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte)\n        return ZIP_ERRNO;\n    else\n        return ZIP_OK;\n}\n\nlocal void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte));\nlocal void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte)\n{\n    unsigned char* buf=(unsigned char*)dest;\n    int n;\n    for (n = 0; n < nbByte; n++) {\n        buf[n] = (unsigned char)(x & 0xff);\n        x >>= 8;\n    }\n\n    if (x != 0)\n    {     /* data overflow - hack for ZIP64 */\n       for (n = 0; n < nbByte; n++)\n       {\n          buf[n] = 0xff;\n       }\n    }\n}\n\n/****************************************************************************/\n\n\nlocal uLong zip64local_TmzDateToDosDate(const tm_zip* ptm)\n{\n    uLong year = (uLong)ptm->tm_year;\n    if (year>=1980)\n        year-=1980;\n    else if (year>=80)\n        year-=80;\n    return\n      (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) |\n        ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour));\n}\n\n\n/****************************************************************************/\n\nlocal int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi));\n\nlocal int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi)\n{\n    unsigned char c;\n    int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1);\n    if (err==1)\n    {\n        *pi = (int)c;\n        return ZIP_OK;\n    }\n    else\n    {\n        if (ZERROR64(*pzlib_filefunc_def,filestream))\n            return ZIP_ERRNO;\n        else\n            return ZIP_EOF;\n    }\n}\n\n\n/* ===========================================================================\n   Reads a long in LSB order from the given gz_stream. Sets\n*/\nlocal int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));\n\nlocal int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)\n{\n    uLong x ;\n    int i = 0;\n    int err;\n\n    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x = (uLong)i;\n\n    if (err==ZIP_OK)\n        err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x += ((uLong)i)<<8;\n\n    if (err==ZIP_OK)\n        *pX = x;\n    else\n        *pX = 0;\n    return err;\n}\n\nlocal int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));\n\nlocal int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)\n{\n    uLong x ;\n    int i = 0;\n    int err;\n\n    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x = (uLong)i;\n\n    if (err==ZIP_OK)\n        err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x += ((uLong)i)<<8;\n\n    if (err==ZIP_OK)\n        err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x += ((uLong)i)<<16;\n\n    if (err==ZIP_OK)\n        err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n    x += ((uLong)i)<<24;\n\n    if (err==ZIP_OK)\n        *pX = x;\n    else\n        *pX = 0;\n    return err;\n}\n\nlocal int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX));\n\n\nlocal int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)\n{\n  ZPOS64_T x;\n  int i = 0;\n  int err;\n\n  err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n  x = (ZPOS64_T)i;\n\n  if (err==ZIP_OK)\n    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n  x += ((ZPOS64_T)i)<<8;\n\n  if (err==ZIP_OK)\n    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n  x += ((ZPOS64_T)i)<<16;\n\n  if (err==ZIP_OK)\n    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n  x += ((ZPOS64_T)i)<<24;\n\n  if (err==ZIP_OK)\n    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n  x += ((ZPOS64_T)i)<<32;\n\n  if (err==ZIP_OK)\n    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n  x += ((ZPOS64_T)i)<<40;\n\n  if (err==ZIP_OK)\n    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n  x += ((ZPOS64_T)i)<<48;\n\n  if (err==ZIP_OK)\n    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);\n  x += ((ZPOS64_T)i)<<56;\n\n  if (err==ZIP_OK)\n    *pX = x;\n  else\n    *pX = 0;\n\n  return err;\n}\n\n#ifndef BUFREADCOMMENT\n#define BUFREADCOMMENT (0x400)\n#endif\n/*\n  Locate the Central directory of a zipfile (at the end, just before\n    the global comment)\n*/\nlocal ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));\n\nlocal ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)\n{\n  unsigned char* buf;\n  ZPOS64_T uSizeFile;\n  ZPOS64_T uBackRead;\n  ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */\n  ZPOS64_T uPosFound=0;\n\n  if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)\n    return 0;\n\n\n  uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);\n\n  if (uMaxBack>uSizeFile)\n    uMaxBack = uSizeFile;\n\n  buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);\n  if (buf==NULL)\n    return 0;\n\n  uBackRead = 4;\n  while (uBackRead<uMaxBack)\n  {\n    uLong uReadSize;\n    ZPOS64_T uReadPos ;\n    int i;\n    if (uBackRead+BUFREADCOMMENT>uMaxBack)\n      uBackRead = uMaxBack;\n    else\n      uBackRead+=BUFREADCOMMENT;\n    uReadPos = uSizeFile-uBackRead ;\n\n    uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?\n      (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);\n    if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)\n      break;\n\n    if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)\n      break;\n\n    for (i=(int)uReadSize-3; (i--)>0;)\n      if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&\n        ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))\n      {\n        uPosFound = uReadPos+i;\n        break;\n      }\n\n      if (uPosFound!=0)\n        break;\n  }\n  TRYFREE(buf);\n  return uPosFound;\n}\n\n/*\nLocate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before\nthe global comment)\n*/\nlocal ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));\n\nlocal ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)\n{\n  unsigned char* buf;\n  ZPOS64_T uSizeFile;\n  ZPOS64_T uBackRead;\n  ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */\n  ZPOS64_T uPosFound=0;\n  uLong uL;\n  ZPOS64_T relativeOffset;\n\n  if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)\n    return 0;\n\n  uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);\n\n  if (uMaxBack>uSizeFile)\n    uMaxBack = uSizeFile;\n\n  buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);\n  if (buf==NULL)\n    return 0;\n\n  uBackRead = 4;\n  while (uBackRead<uMaxBack)\n  {\n    uLong uReadSize;\n    ZPOS64_T uReadPos;\n    int i;\n    if (uBackRead+BUFREADCOMMENT>uMaxBack)\n      uBackRead = uMaxBack;\n    else\n      uBackRead+=BUFREADCOMMENT;\n    uReadPos = uSizeFile-uBackRead ;\n\n    uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?\n      (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);\n    if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)\n      break;\n\n    if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)\n      break;\n\n    for (i=(int)uReadSize-3; (i--)>0;)\n    {\n      // Signature \"0x07064b50\" Zip64 end of central directory locater\n      if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))\n      {\n        uPosFound = uReadPos+i;\n        break;\n      }\n    }\n\n      if (uPosFound!=0)\n        break;\n  }\n\n  TRYFREE(buf);\n  if (uPosFound == 0)\n    return 0;\n\n  /* Zip64 end of central directory locator */\n  if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0)\n    return 0;\n\n  /* the signature, already checked */\n  if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)\n    return 0;\n\n  /* number of the disk with the start of the zip64 end of  central directory */\n  if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)\n    return 0;\n  if (uL != 0)\n    return 0;\n\n  /* relative offset of the zip64 end of central directory record */\n  if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK)\n    return 0;\n\n  /* total number of disks */\n  if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)\n    return 0;\n  if (uL != 1)\n    return 0;\n\n  /* Goto Zip64 end of central directory record */\n  if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0)\n    return 0;\n\n  /* the signature */\n  if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)\n    return 0;\n\n  if (uL != 0x06064b50) // signature of 'Zip64 end of central directory'\n    return 0;\n\n  return relativeOffset;\n}\n\nint LoadCentralDirectoryRecord(zip64_internal* pziinit)\n{\n  int err=ZIP_OK;\n  ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/\n\n  ZPOS64_T size_central_dir;     /* size of the central directory  */\n  ZPOS64_T offset_central_dir;   /* offset of start of central directory */\n  ZPOS64_T central_pos;\n  uLong uL;\n\n  uLong number_disk;          /* number of the current dist, used for\n                              spaning ZIP, unsupported, always 0*/\n  uLong number_disk_with_CD;  /* number the the disk with central dir, used\n                              for spaning ZIP, unsupported, always 0*/\n  ZPOS64_T number_entry;\n  ZPOS64_T number_entry_CD;      /* total number of entries in\n                                the central dir\n                                (same than number_entry on nospan) */\n  uLong VersionMadeBy;\n  uLong VersionNeeded;\n  uLong size_comment;\n\n  int hasZIP64Record = 0;\n\n  // check first if we find a ZIP64 record\n  central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream);\n  if(central_pos > 0)\n  {\n    hasZIP64Record = 1;\n  }\n  else if(central_pos == 0)\n  {\n    central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream);\n  }\n\n/* disable to allow appending to empty ZIP archive\n        if (central_pos==0)\n            err=ZIP_ERRNO;\n*/\n\n  if(hasZIP64Record)\n  {\n    ZPOS64_T sizeEndOfCentralDirectory;\n    if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0)\n      err=ZIP_ERRNO;\n\n    /* the signature, already checked */\n    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* size of zip64 end of central directory record */\n    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* version made by */\n    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* version needed to extract */\n    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* number of this disk */\n    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* number of the disk with the start of the central directory */\n    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* total number of entries in the central directory on this disk */\n    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* total number of entries in the central directory */\n    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0))\n      err=ZIP_BADZIPFILE;\n\n    /* size of the central directory */\n    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* offset of start of central directory with respect to the\n    starting disk number */\n    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    // TODO..\n    // read the comment from the standard central header.\n    size_comment = 0;\n  }\n  else\n  {\n    // Read End of central Directory info\n    if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)\n      err=ZIP_ERRNO;\n\n    /* the signature, already checked */\n    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* number of this disk */\n    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* number of the disk with the start of the central directory */\n    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK)\n      err=ZIP_ERRNO;\n\n    /* total number of entries in the central dir on this disk */\n    number_entry = 0;\n    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)\n      err=ZIP_ERRNO;\n    else\n      number_entry = uL;\n\n    /* total number of entries in the central dir */\n    number_entry_CD = 0;\n    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)\n      err=ZIP_ERRNO;\n    else\n      number_entry_CD = uL;\n\n    if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0))\n      err=ZIP_BADZIPFILE;\n\n    /* size of the central directory */\n    size_central_dir = 0;\n    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)\n      err=ZIP_ERRNO;\n    else\n      size_central_dir = uL;\n\n    /* offset of start of central directory with respect to the starting disk number */\n    offset_central_dir = 0;\n    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)\n      err=ZIP_ERRNO;\n    else\n      offset_central_dir = uL;\n\n\n    /* zipfile global comment length */\n    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK)\n      err=ZIP_ERRNO;\n  }\n\n  if ((central_pos<offset_central_dir+size_central_dir) &&\n    (err==ZIP_OK))\n    err=ZIP_BADZIPFILE;\n\n  if (err!=ZIP_OK)\n  {\n    ZCLOSE64(pziinit->z_filefunc, pziinit->filestream);\n    return ZIP_ERRNO;\n  }\n\n  if (size_comment>0)\n  {\n    pziinit->globalcomment = (char*)ALLOC(size_comment+1);\n    if (pziinit->globalcomment)\n    {\n      size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment);\n      pziinit->globalcomment[size_comment]=0;\n    }\n  }\n\n  byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir);\n  pziinit->add_position_when_writting_offset = byte_before_the_zipfile;\n\n  {\n    ZPOS64_T size_central_dir_to_read = size_central_dir;\n    size_t buf_size = SIZEDATA_INDATABLOCK;\n    void* buf_read = (void*)ALLOC(buf_size);\n    if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0)\n      err=ZIP_ERRNO;\n\n    while ((size_central_dir_to_read>0) && (err==ZIP_OK))\n    {\n      ZPOS64_T read_this = SIZEDATA_INDATABLOCK;\n      if (read_this > size_central_dir_to_read)\n        read_this = size_central_dir_to_read;\n\n      if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this)\n        err=ZIP_ERRNO;\n\n      if (err==ZIP_OK)\n        err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this);\n\n      size_central_dir_to_read-=read_this;\n    }\n    TRYFREE(buf_read);\n  }\n  pziinit->begin_pos = byte_before_the_zipfile;\n  pziinit->number_entry = number_entry_CD;\n\n  if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0)\n    err=ZIP_ERRNO;\n\n  return err;\n}\n\n\n#endif /* !NO_ADDFILEINEXISTINGZIP*/\n\n\n/************************************************************/\nextern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def)\n{\n    zip64_internal ziinit;\n    zip64_internal* zi;\n    int err=ZIP_OK;\n\n    ziinit.z_filefunc.zseek32_file = NULL;\n    ziinit.z_filefunc.ztell32_file = NULL;\n    if (pzlib_filefunc64_32_def==NULL)\n        fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64);\n    else\n        ziinit.z_filefunc = *pzlib_filefunc64_32_def;\n\n    ziinit.filestream = ZOPEN64(ziinit.z_filefunc,\n                  pathname,\n                  (append == APPEND_STATUS_CREATE) ?\n                  (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) :\n                    (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING));\n\n    if (ziinit.filestream == NULL)\n        return NULL;\n\n    if (append == APPEND_STATUS_CREATEAFTER)\n        ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END);\n\n    ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream);\n    ziinit.in_opened_file_inzip = 0;\n    ziinit.ci.stream_initialised = 0;\n    ziinit.number_entry = 0;\n    ziinit.add_position_when_writting_offset = 0;\n    init_linkedlist(&(ziinit.central_dir));\n\n\n\n    zi = (zip64_internal*)ALLOC(sizeof(zip64_internal));\n    if (zi==NULL)\n    {\n        ZCLOSE64(ziinit.z_filefunc,ziinit.filestream);\n        return NULL;\n    }\n\n    /* now we add file in a zipfile */\n#    ifndef NO_ADDFILEINEXISTINGZIP\n    ziinit.globalcomment = NULL;\n    if (append == APPEND_STATUS_ADDINZIP)\n    {\n      // Read and Cache Central Directory Records\n      err = LoadCentralDirectoryRecord(&ziinit);\n    }\n\n    if (globalcomment)\n    {\n      *globalcomment = ziinit.globalcomment;\n    }\n#    endif /* !NO_ADDFILEINEXISTINGZIP*/\n\n    if (err != ZIP_OK)\n    {\n#    ifndef NO_ADDFILEINEXISTINGZIP\n        TRYFREE(ziinit.globalcomment);\n#    endif /* !NO_ADDFILEINEXISTINGZIP*/\n        TRYFREE(zi);\n        return NULL;\n    }\n    else\n    {\n        *zi = ziinit;\n        return (zipFile)zi;\n    }\n}\n\nextern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def)\n{\n    if (pzlib_filefunc32_def != NULL)\n    {\n        zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;\n        fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def);\n        return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill);\n    }\n    else\n        return zipOpen3(pathname, append, globalcomment, NULL);\n}\n\nextern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def)\n{\n    if (pzlib_filefunc_def != NULL)\n    {\n        zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;\n        zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def;\n        zlib_filefunc64_32_def_fill.ztell32_file = NULL;\n        zlib_filefunc64_32_def_fill.zseek32_file = NULL;\n        return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill);\n    }\n    else\n        return zipOpen3(pathname, append, globalcomment, NULL);\n}\n\n\n\nextern zipFile ZEXPORT zipOpen (const char* pathname, int append)\n{\n    return zipOpen3((const void*)pathname,append,NULL,NULL);\n}\n\nextern zipFile ZEXPORT zipOpen64 (const void* pathname, int append)\n{\n    return zipOpen3(pathname,append,NULL,NULL);\n}\n\nint Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local)\n{\n  /* write the local header */\n  int err;\n  uInt size_filename = (uInt)strlen(filename);\n  uInt size_extrafield = size_extrafield_local;\n\n  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4);\n\n  if (err==ZIP_OK)\n  {\n    if(zi->ci.zip64)\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */\n    else\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */\n  }\n\n  if (err==ZIP_OK)\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2);\n\n  if (err==ZIP_OK)\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2);\n\n  if (err==ZIP_OK)\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4);\n\n  // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later\n  if (err==ZIP_OK)\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */\n  if (err==ZIP_OK)\n  {\n    if(zi->ci.zip64)\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */\n    else\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */\n  }\n  if (err==ZIP_OK)\n  {\n    if(zi->ci.zip64)\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */\n    else\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */\n  }\n\n  if (err==ZIP_OK)\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2);\n\n  if(zi->ci.zip64)\n  {\n    size_extrafield += 20;\n  }\n\n  if (err==ZIP_OK)\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2);\n\n  if ((err==ZIP_OK) && (size_filename > 0))\n  {\n    if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename)\n      err = ZIP_ERRNO;\n  }\n\n  if ((err==ZIP_OK) && (size_extrafield_local > 0))\n  {\n    if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local)\n      err = ZIP_ERRNO;\n  }\n\n\n  if ((err==ZIP_OK) && (zi->ci.zip64))\n  {\n      // write the Zip64 extended info\n      short HeaderID = 1;\n      short DataSize = 16;\n      ZPOS64_T CompressedSize = 0;\n      ZPOS64_T UncompressedSize = 0;\n\n      // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file)\n      zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream);\n\n      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2);\n      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2);\n\n      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8);\n      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8);\n  }\n\n  return err;\n}\n\n/*\n NOTE.\n When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped\n before calling this function it can be done with zipRemoveExtraInfoBlock\n\n It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize\n unnecessary allocations.\n */\nextern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,\n                                         const void* extrafield_local, uInt size_extrafield_local,\n                                         const void* extrafield_global, uInt size_extrafield_global,\n                                         const char* comment, int method, int level, int raw,\n                                         int windowBits,int memLevel, int strategy,\n                                         const char* password, uLong crcForCrypting,\n                                         uLong versionMadeBy, uLong flagBase, int zip64)\n{\n    zip64_internal* zi;\n    uInt size_filename;\n    uInt size_comment;\n    uInt i;\n    int err = ZIP_OK;\n\n#    ifdef NOCRYPT\n    if (password != NULL)\n        return ZIP_PARAMERROR;\n#    endif\n\n    if (file == NULL)\n        return ZIP_PARAMERROR;\n\n#ifdef HAVE_BZIP2\n    if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED))\n      return ZIP_PARAMERROR;\n#else\n    if ((method!=0) && (method!=Z_DEFLATED))\n      return ZIP_PARAMERROR;\n#endif\n\n    zi = (zip64_internal*)file;\n\n    if (zi->in_opened_file_inzip == 1)\n    {\n        err = zipCloseFileInZip (file);\n        if (err != ZIP_OK)\n            return err;\n    }\n\n    if (filename==NULL)\n        filename=\"-\";\n\n    if (comment==NULL)\n        size_comment = 0;\n    else\n        size_comment = (uInt)strlen(comment);\n\n    size_filename = (uInt)strlen(filename);\n\n    if (zipfi == NULL)\n        zi->ci.dosDate = 0;\n    else\n    {\n        if (zipfi->dosDate != 0)\n            zi->ci.dosDate = zipfi->dosDate;\n        else\n          zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date);\n    }\n\n    zi->ci.flag = flagBase;\n    if ((level==8) || (level==9))\n      zi->ci.flag |= 2;\n    if ((level==2))\n      zi->ci.flag |= 4;\n    if ((level==1))\n      zi->ci.flag |= 6;\n    if (password != NULL)\n      zi->ci.flag |= 1;\n\n    zi->ci.crc32 = 0;\n    zi->ci.method = method;\n    zi->ci.encrypt = 0;\n    zi->ci.stream_initialised = 0;\n    zi->ci.pos_in_buffered_data = 0;\n    zi->ci.raw = raw;\n    zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream);\n\n    zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment;\n    zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data\n\n    zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree);\n\n    zi->ci.size_centralExtra = size_extrafield_global;\n    zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4);\n    /* version info */\n    zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2);\n    zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2);\n    zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2);\n    zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2);\n    zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4);\n    zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/\n    zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/\n    zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/\n    zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2);\n    zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2);\n    zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2);\n    zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/\n\n    if (zipfi==NULL)\n        zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2);\n    else\n        zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2);\n\n    if (zipfi==NULL)\n        zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4);\n    else\n        zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4);\n\n    if(zi->ci.pos_local_header >= 0xffffffff)\n      zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4);\n    else\n      zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writting_offset,4);\n\n    for (i=0;i<size_filename;i++)\n        *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i);\n\n    for (i=0;i<size_extrafield_global;i++)\n        *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+i) =\n              *(((const char*)extrafield_global)+i);\n\n    for (i=0;i<size_comment;i++)\n        *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+\n              size_extrafield_global+i) = *(comment+i);\n    if (zi->ci.central_header == NULL)\n        return ZIP_INTERNALERROR;\n\n    zi->ci.zip64 = zip64;\n    zi->ci.totalCompressedData = 0;\n    zi->ci.totalUncompressedData = 0;\n    zi->ci.pos_zip64extrainfo = 0;\n\n    err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local);\n\n#ifdef HAVE_BZIP2\n    zi->ci.bstream.avail_in = (uInt)0;\n    zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;\n    zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;\n    zi->ci.bstream.total_in_hi32 = 0;\n    zi->ci.bstream.total_in_lo32 = 0;\n    zi->ci.bstream.total_out_hi32 = 0;\n    zi->ci.bstream.total_out_lo32 = 0;\n#endif\n\n    zi->ci.stream.avail_in = (uInt)0;\n    zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;\n    zi->ci.stream.next_out = zi->ci.buffered_data;\n    zi->ci.stream.total_in = 0;\n    zi->ci.stream.total_out = 0;\n    zi->ci.stream.data_type = Z_BINARY;\n\n#ifdef HAVE_BZIP2\n    if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))\n#else\n    if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))\n#endif\n    {\n        if(zi->ci.method == Z_DEFLATED)\n        {\n          zi->ci.stream.zalloc = (alloc_func)0;\n          zi->ci.stream.zfree = (free_func)0;\n          zi->ci.stream.opaque = (voidpf)0;\n\n          if (windowBits>0)\n              windowBits = -windowBits;\n\n          err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy);\n\n          if (err==Z_OK)\n              zi->ci.stream_initialised = Z_DEFLATED;\n        }\n        else if(zi->ci.method == Z_BZIP2ED)\n        {\n#ifdef HAVE_BZIP2\n            // Init BZip stuff here\n          zi->ci.bstream.bzalloc = 0;\n          zi->ci.bstream.bzfree = 0;\n          zi->ci.bstream.opaque = (voidpf)0;\n\n          err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35);\n          if(err == BZ_OK)\n            zi->ci.stream_initialised = Z_BZIP2ED;\n#endif\n        }\n\n    }\n\n#    ifndef NOCRYPT\n    zi->ci.crypt_header_size = 0;\n    if ((err==Z_OK) && (password != NULL))\n    {\n        unsigned char bufHead[RAND_HEAD_LEN];\n        unsigned int sizeHead;\n        zi->ci.encrypt = 1;\n        zi->ci.pcrc_32_tab = get_crc_table();\n        /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/\n\n        sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting);\n        zi->ci.crypt_header_size = sizeHead;\n\n        if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead)\n                err = ZIP_ERRNO;\n    }\n#    endif\n\n    if (err==Z_OK)\n        zi->in_opened_file_inzip = 1;\n    return err;\n}\n\nextern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi,\n                                         const void* extrafield_local, uInt size_extrafield_local,\n                                         const void* extrafield_global, uInt size_extrafield_global,\n                                         const char* comment, int method, int level, int raw,\n                                         int windowBits,int memLevel, int strategy,\n                                         const char* password, uLong crcForCrypting,\n                                         uLong versionMadeBy, uLong flagBase)\n{\n    return zipOpenNewFileInZip4_64 (file, filename, zipfi,\n                                 extrafield_local, size_extrafield_local,\n                                 extrafield_global, size_extrafield_global,\n                                 comment, method, level, raw,\n                                 windowBits, memLevel, strategy,\n                                 password, crcForCrypting, versionMadeBy, flagBase, 0);\n}\n\nextern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi,\n                                         const void* extrafield_local, uInt size_extrafield_local,\n                                         const void* extrafield_global, uInt size_extrafield_global,\n                                         const char* comment, int method, int level, int raw,\n                                         int windowBits,int memLevel, int strategy,\n                                         const char* password, uLong crcForCrypting)\n{\n    return zipOpenNewFileInZip4_64 (file, filename, zipfi,\n                                 extrafield_local, size_extrafield_local,\n                                 extrafield_global, size_extrafield_global,\n                                 comment, method, level, raw,\n                                 windowBits, memLevel, strategy,\n                                 password, crcForCrypting, VERSIONMADEBY, 0, 0);\n}\n\nextern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,\n                                         const void* extrafield_local, uInt size_extrafield_local,\n                                         const void* extrafield_global, uInt size_extrafield_global,\n                                         const char* comment, int method, int level, int raw,\n                                         int windowBits,int memLevel, int strategy,\n                                         const char* password, uLong crcForCrypting, int zip64)\n{\n    return zipOpenNewFileInZip4_64 (file, filename, zipfi,\n                                 extrafield_local, size_extrafield_local,\n                                 extrafield_global, size_extrafield_global,\n                                 comment, method, level, raw,\n                                 windowBits, memLevel, strategy,\n                                 password, crcForCrypting, VERSIONMADEBY, 0, zip64);\n}\n\nextern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi,\n                                        const void* extrafield_local, uInt size_extrafield_local,\n                                        const void* extrafield_global, uInt size_extrafield_global,\n                                        const char* comment, int method, int level, int raw)\n{\n    return zipOpenNewFileInZip4_64 (file, filename, zipfi,\n                                 extrafield_local, size_extrafield_local,\n                                 extrafield_global, size_extrafield_global,\n                                 comment, method, level, raw,\n                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,\n                                 NULL, 0, VERSIONMADEBY, 0, 0);\n}\n\nextern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,\n                                        const void* extrafield_local, uInt size_extrafield_local,\n                                        const void* extrafield_global, uInt size_extrafield_global,\n                                        const char* comment, int method, int level, int raw, int zip64)\n{\n    return zipOpenNewFileInZip4_64 (file, filename, zipfi,\n                                 extrafield_local, size_extrafield_local,\n                                 extrafield_global, size_extrafield_global,\n                                 comment, method, level, raw,\n                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,\n                                 NULL, 0, VERSIONMADEBY, 0, zip64);\n}\n\nextern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,\n                                        const void* extrafield_local, uInt size_extrafield_local,\n                                        const void*extrafield_global, uInt size_extrafield_global,\n                                        const char* comment, int method, int level, int zip64)\n{\n    return zipOpenNewFileInZip4_64 (file, filename, zipfi,\n                                 extrafield_local, size_extrafield_local,\n                                 extrafield_global, size_extrafield_global,\n                                 comment, method, level, 0,\n                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,\n                                 NULL, 0, VERSIONMADEBY, 0, zip64);\n}\n\nextern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi,\n                                        const void* extrafield_local, uInt size_extrafield_local,\n                                        const void*extrafield_global, uInt size_extrafield_global,\n                                        const char* comment, int method, int level)\n{\n    return zipOpenNewFileInZip4_64 (file, filename, zipfi,\n                                 extrafield_local, size_extrafield_local,\n                                 extrafield_global, size_extrafield_global,\n                                 comment, method, level, 0,\n                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,\n                                 NULL, 0, VERSIONMADEBY, 0, 0);\n}\n\nlocal int zip64FlushWriteBuffer(zip64_internal* zi)\n{\n    int err=ZIP_OK;\n\n    if (zi->ci.encrypt != 0)\n    {\n#ifndef NOCRYPT\n        uInt i;\n        int t;\n        for (i=0;i<zi->ci.pos_in_buffered_data;i++)\n            zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t);\n#endif\n    }\n\n    if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data)\n      err = ZIP_ERRNO;\n\n    zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data;\n\n#ifdef HAVE_BZIP2\n    if(zi->ci.method == Z_BZIP2ED)\n    {\n      zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32;\n      zi->ci.bstream.total_in_lo32 = 0;\n      zi->ci.bstream.total_in_hi32 = 0;\n    }\n    else\n#endif\n    {\n      zi->ci.totalUncompressedData += zi->ci.stream.total_in;\n      zi->ci.stream.total_in = 0;\n    }\n\n\n    zi->ci.pos_in_buffered_data = 0;\n\n    return err;\n}\n\nextern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len)\n{\n    zip64_internal* zi;\n    int err=ZIP_OK;\n\n    if (file == NULL)\n        return ZIP_PARAMERROR;\n    zi = (zip64_internal*)file;\n\n    if (zi->in_opened_file_inzip == 0)\n        return ZIP_PARAMERROR;\n\n    zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len);\n\n#ifdef HAVE_BZIP2\n    if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw))\n    {\n      zi->ci.bstream.next_in = (void*)buf;\n      zi->ci.bstream.avail_in = len;\n      err = BZ_RUN_OK;\n\n      while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0))\n      {\n        if (zi->ci.bstream.avail_out == 0)\n        {\n          if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)\n            err = ZIP_ERRNO;\n          zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;\n          zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;\n        }\n\n\n        if(err != BZ_RUN_OK)\n          break;\n\n        if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))\n        {\n          uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32;\n//          uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32;\n          err=BZ2_bzCompress(&zi->ci.bstream,  BZ_RUN);\n\n          zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ;\n        }\n      }\n\n      if(err == BZ_RUN_OK)\n        err = ZIP_OK;\n    }\n    else\n#endif\n    {\n      zi->ci.stream.next_in = (Bytef*)buf;\n      zi->ci.stream.avail_in = len;\n\n      while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0))\n      {\n          if (zi->ci.stream.avail_out == 0)\n          {\n              if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)\n                  err = ZIP_ERRNO;\n              zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;\n              zi->ci.stream.next_out = zi->ci.buffered_data;\n          }\n\n\n          if(err != ZIP_OK)\n              break;\n\n          if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))\n          {\n              uLong uTotalOutBefore = zi->ci.stream.total_out;\n              err=deflate(&zi->ci.stream,  Z_NO_FLUSH);\n              if(uTotalOutBefore > zi->ci.stream.total_out)\n              {\n                int bBreak = 0;\n                bBreak++;\n              }\n\n              zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;\n          }\n          else\n          {\n              uInt copy_this,i;\n              if (zi->ci.stream.avail_in < zi->ci.stream.avail_out)\n                  copy_this = zi->ci.stream.avail_in;\n              else\n                  copy_this = zi->ci.stream.avail_out;\n\n              for (i = 0; i < copy_this; i++)\n                  *(((char*)zi->ci.stream.next_out)+i) =\n                      *(((const char*)zi->ci.stream.next_in)+i);\n              {\n                  zi->ci.stream.avail_in -= copy_this;\n                  zi->ci.stream.avail_out-= copy_this;\n                  zi->ci.stream.next_in+= copy_this;\n                  zi->ci.stream.next_out+= copy_this;\n                  zi->ci.stream.total_in+= copy_this;\n                  zi->ci.stream.total_out+= copy_this;\n                  zi->ci.pos_in_buffered_data += copy_this;\n              }\n          }\n      }// while(...)\n    }\n\n    return err;\n}\n\nextern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32)\n{\n    return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32);\n}\n\nextern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32)\n{\n    zip64_internal* zi;\n    ZPOS64_T compressed_size;\n    uLong invalidValue = 0xffffffff;\n    short datasize = 0;\n    int err=ZIP_OK;\n\n    if (file == NULL)\n        return ZIP_PARAMERROR;\n    zi = (zip64_internal*)file;\n\n    if (zi->in_opened_file_inzip == 0)\n        return ZIP_PARAMERROR;\n    zi->ci.stream.avail_in = 0;\n\n    if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))\n                {\n                        while (err==ZIP_OK)\n                        {\n                                uLong uTotalOutBefore;\n                                if (zi->ci.stream.avail_out == 0)\n                                {\n                                        if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)\n                                                err = ZIP_ERRNO;\n                                        zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;\n                                        zi->ci.stream.next_out = zi->ci.buffered_data;\n                                }\n                                uTotalOutBefore = zi->ci.stream.total_out;\n                                err=deflate(&zi->ci.stream,  Z_FINISH);\n                                zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;\n                        }\n                }\n    else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))\n    {\n#ifdef HAVE_BZIP2\n      err = BZ_FINISH_OK;\n      while (err==BZ_FINISH_OK)\n      {\n        uLong uTotalOutBefore;\n        if (zi->ci.bstream.avail_out == 0)\n        {\n          if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)\n            err = ZIP_ERRNO;\n          zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;\n          zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;\n        }\n        uTotalOutBefore = zi->ci.bstream.total_out_lo32;\n        err=BZ2_bzCompress(&zi->ci.bstream,  BZ_FINISH);\n        if(err == BZ_STREAM_END)\n          err = Z_STREAM_END;\n\n        zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore);\n      }\n\n      if(err == BZ_FINISH_OK)\n        err = ZIP_OK;\n#endif\n    }\n\n    if (err==Z_STREAM_END)\n        err=ZIP_OK; /* this is normal */\n\n    if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))\n                {\n        if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO)\n            err = ZIP_ERRNO;\n                }\n\n    if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))\n    {\n        int tmp_err = deflateEnd(&zi->ci.stream);\n        if (err == ZIP_OK)\n            err = tmp_err;\n        zi->ci.stream_initialised = 0;\n    }\n#ifdef HAVE_BZIP2\n    else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))\n    {\n      int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream);\n                        if (err==ZIP_OK)\n                                err = tmperr;\n                        zi->ci.stream_initialised = 0;\n    }\n#endif\n\n    if (!zi->ci.raw)\n    {\n        crc32 = (uLong)zi->ci.crc32;\n        uncompressed_size = zi->ci.totalUncompressedData;\n    }\n    compressed_size = zi->ci.totalCompressedData;\n\n#    ifndef NOCRYPT\n    compressed_size += zi->ci.crypt_header_size;\n#    endif\n\n    // update Current Item crc and sizes,\n    if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff)\n    {\n      /*version Made by*/\n      zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2);\n      /*version needed*/\n      zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2);\n\n    }\n\n    zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/\n\n\n    if(compressed_size >= 0xffffffff)\n      zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/\n    else\n      zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/\n\n    /// set internal file attributes field\n    if (zi->ci.stream.data_type == Z_ASCII)\n        zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2);\n\n    if(uncompressed_size >= 0xffffffff)\n      zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/\n    else\n      zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/\n\n    // Add ZIP64 extra info field for uncompressed size\n    if(uncompressed_size >= 0xffffffff)\n      datasize += 8;\n\n    // Add ZIP64 extra info field for compressed size\n    if(compressed_size >= 0xffffffff)\n      datasize += 8;\n\n    // Add ZIP64 extra info field for relative offset to local file header of current file\n    if(zi->ci.pos_local_header >= 0xffffffff)\n      datasize += 8;\n\n    if(datasize > 0)\n    {\n      char* p = NULL;\n\n      if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree)\n      {\n        // we can not write more data to the buffer that we have room for.\n        return ZIP_BADZIPFILE;\n      }\n\n      p = zi->ci.central_header + zi->ci.size_centralheader;\n\n      // Add Extra Information Header for 'ZIP64 information'\n      zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID\n      p += 2;\n      zip64local_putValue_inmemory(p, datasize, 2); // DataSize\n      p += 2;\n\n      if(uncompressed_size >= 0xffffffff)\n      {\n        zip64local_putValue_inmemory(p, uncompressed_size, 8);\n        p += 8;\n      }\n\n      if(compressed_size >= 0xffffffff)\n      {\n        zip64local_putValue_inmemory(p, compressed_size, 8);\n        p += 8;\n      }\n\n      if(zi->ci.pos_local_header >= 0xffffffff)\n      {\n        zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8);\n        p += 8;\n      }\n\n      // Update how much extra free space we got in the memory buffer\n      // and increase the centralheader size so the new ZIP64 fields are included\n      // ( 4 below is the size of HeaderID and DataSize field )\n      zi->ci.size_centralExtraFree -= datasize + 4;\n      zi->ci.size_centralheader += datasize + 4;\n\n      // Update the extra info size field\n      zi->ci.size_centralExtra += datasize + 4;\n      zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2);\n    }\n\n    if (err==ZIP_OK)\n        err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader);\n\n    free(zi->ci.central_header);\n\n    if (err==ZIP_OK)\n    {\n        // Update the LocalFileHeader with the new values.\n\n        ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream);\n\n        if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0)\n            err = ZIP_ERRNO;\n\n        if (err==ZIP_OK)\n            err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */\n\n        if(uncompressed_size >= 0xffffffff)\n        {\n          if(zi->ci.pos_zip64extrainfo > 0)\n          {\n            // Update the size in the ZIP64 extended field.\n            if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0)\n              err = ZIP_ERRNO;\n\n            if (err==ZIP_OK) /* compressed size, unknown */\n              err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8);\n\n            if (err==ZIP_OK) /* uncompressed size, unknown */\n              err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8);\n          }\n        }\n        else\n        {\n          if (err==ZIP_OK) /* compressed size, unknown */\n              err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4);\n\n          if (err==ZIP_OK) /* uncompressed size, unknown */\n              err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4);\n        }\n\n        if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0)\n            err = ZIP_ERRNO;\n    }\n\n    zi->number_entry ++;\n    zi->in_opened_file_inzip = 0;\n\n    return err;\n}\n\nextern int ZEXPORT zipCloseFileInZip (zipFile file)\n{\n    return zipCloseFileInZipRaw (file,0,0);\n}\n\nint Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip)\n{\n  int err = ZIP_OK;\n  ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writting_offset;\n\n  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4);\n\n  /*num disks*/\n    if (err==ZIP_OK) /* number of the disk with the start of the central directory */\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);\n\n  /*relative offset*/\n    if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8);\n\n  /*total disks*/ /* Do not support spawning of disk so always say 1 here*/\n    if (err==ZIP_OK) /* number of the disk with the start of the central directory */\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4);\n\n    return err;\n}\n\nint Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)\n{\n  int err = ZIP_OK;\n\n  uLong Zip64DataSize = 44;\n\n  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4);\n\n  if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ?\n\n  if (err==ZIP_OK) /* version made by */\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);\n\n  if (err==ZIP_OK) /* version needed */\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);\n\n  if (err==ZIP_OK) /* number of this disk */\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);\n\n  if (err==ZIP_OK) /* number of the disk with the start of the central directory */\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);\n\n  if (err==ZIP_OK) /* total number of entries in the central dir on this disk */\n    err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8);\n\n  if (err==ZIP_OK) /* total number of entries in the central dir */\n    err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8);\n\n  if (err==ZIP_OK) /* size of the central directory */\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8);\n\n  if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */\n  {\n    ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8);\n  }\n  return err;\n}\nint Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)\n{\n  int err = ZIP_OK;\n\n  /*signature*/\n  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4);\n\n  if (err==ZIP_OK) /* number of this disk */\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);\n\n  if (err==ZIP_OK) /* number of the disk with the start of the central directory */\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);\n\n  if (err==ZIP_OK) /* total number of entries in the central dir on this disk */\n  {\n    {\n      if(zi->number_entry >= 0xFFFF)\n        err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record\n      else\n        err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);\n    }\n  }\n\n  if (err==ZIP_OK) /* total number of entries in the central dir */\n  {\n    if(zi->number_entry >= 0xFFFF)\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record\n    else\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);\n  }\n\n  if (err==ZIP_OK) /* size of the central directory */\n    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4);\n\n  if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */\n  {\n    ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;\n    if(pos >= 0xffffffff)\n    {\n      err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4);\n    }\n    else\n                  err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4);\n  }\n\n   return err;\n}\n\nint Write_GlobalComment(zip64_internal* zi, const char* global_comment)\n{\n  int err = ZIP_OK;\n  uInt size_global_comment = 0;\n\n  if(global_comment != NULL)\n    size_global_comment = (uInt)strlen(global_comment);\n\n  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2);\n\n  if (err == ZIP_OK && size_global_comment > 0)\n  {\n    if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment)\n      err = ZIP_ERRNO;\n  }\n  return err;\n}\n\nextern int ZEXPORT zipClose (zipFile file, const char* global_comment)\n{\n    zip64_internal* zi;\n    int err = 0;\n    uLong size_centraldir = 0;\n    ZPOS64_T centraldir_pos_inzip;\n    ZPOS64_T pos;\n\n    if (file == NULL)\n        return ZIP_PARAMERROR;\n\n    zi = (zip64_internal*)file;\n\n    if (zi->in_opened_file_inzip == 1)\n    {\n        err = zipCloseFileInZip (file);\n    }\n\n#ifndef NO_ADDFILEINEXISTINGZIP\n    if (global_comment==NULL)\n        global_comment = zi->globalcomment;\n#endif\n\n    centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream);\n\n    if (err==ZIP_OK)\n    {\n        linkedlist_datablock_internal* ldi = zi->central_dir.first_block;\n        while (ldi!=NULL)\n        {\n            if ((err==ZIP_OK) && (ldi->filled_in_this_block>0))\n            {\n                if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block)\n                    err = ZIP_ERRNO;\n            }\n\n            size_centraldir += ldi->filled_in_this_block;\n            ldi = ldi->next_datablock;\n        }\n    }\n    free_linkedlist(&(zi->central_dir));\n\n    pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;\n    if(pos >= 0xffffffff)\n    {\n      ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream);\n      Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);\n\n      Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos);\n    }\n\n    if (err==ZIP_OK)\n      err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);\n\n    if(err == ZIP_OK)\n      err = Write_GlobalComment(zi, global_comment);\n\n    if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0)\n        if (err == ZIP_OK)\n            err = ZIP_ERRNO;\n\n#ifndef NO_ADDFILEINEXISTINGZIP\n    TRYFREE(zi->globalcomment);\n#endif\n    TRYFREE(zi);\n\n    return err;\n}\n\nextern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader)\n{\n  char* p = pData;\n  int size = 0;\n  char* pNewHeader;\n  char* pTmp;\n  short header;\n  short dataSize;\n\n  int retVal = ZIP_OK;\n\n  if(pData == NULL || *dataLen < 4)\n    return ZIP_PARAMERROR;\n\n  pNewHeader = (char*)ALLOC(*dataLen);\n  pTmp = pNewHeader;\n\n  while(p < (pData + *dataLen))\n  {\n    header = *(short*)p;\n    dataSize = *(((short*)p)+1);\n\n    if( header == sHeader ) // Header found.\n    {\n      p += dataSize + 4; // skip it. do not copy to temp buffer\n    }\n    else\n    {\n      // Extra Info block should not be removed, So copy it to the temp buffer.\n      memcpy(pTmp, p, dataSize + 4);\n      p += dataSize + 4;\n      size += dataSize + 4;\n    }\n\n  }\n\n  if(size < *dataLen)\n  {\n    // clean old extra info block.\n    memset(pData,0, *dataLen);\n\n    // copy the new extra info block over the old\n    if(size > 0)\n      memcpy(pData, pNewHeader, size);\n\n    // set the new extra info size\n    *dataLen = size;\n\n    retVal = ZIP_OK;\n  }\n  else\n    retVal = ZIP_ERRNO;\n\n  TRYFREE(pNewHeader);\n\n  return retVal;\n}\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/zip.h",
    "content": "/* zip.h -- IO on .zip files using zlib\n   Version 1.1, February 14h, 2010\n   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )\n\n         Modifications for Zip64 support\n         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )\n\n         For more info read MiniZip_info.txt\n\n         ---------------------------------------------------------------------------\n\n   Condition of use and distribution are the same than zlib :\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n\n        ---------------------------------------------------------------------------\n\n        Changes\n\n        See header of zip.h\n\n*/\n\n#ifndef _zip12_H\n#define _zip12_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n//#define HAVE_BZIP2\n\n#ifndef _ZLIB_H\n#include \"zlib.h\"\n#endif\n\n#ifndef _ZLIBIOAPI_H\n#include \"ioapi.h\"\n#endif\n\n#ifdef HAVE_BZIP2\n#include \"bzlib.h\"\n#endif\n\n#define Z_BZIP2ED 12\n\n#if defined(STRICTZIP) || defined(STRICTZIPUNZIP)\n/* like the STRICT of WIN32, we define a pointer that cannot be converted\n    from (void*) without cast */\ntypedef struct TagzipFile__ { int unused; } zipFile__;\ntypedef zipFile__ *zipFile;\n#else\ntypedef voidp zipFile;\n#endif\n\n#define ZIP_OK                          (0)\n#define ZIP_EOF                         (0)\n#define ZIP_ERRNO                       (Z_ERRNO)\n#define ZIP_PARAMERROR                  (-102)\n#define ZIP_BADZIPFILE                  (-103)\n#define ZIP_INTERNALERROR               (-104)\n\n#ifndef DEF_MEM_LEVEL\n#  if MAX_MEM_LEVEL >= 8\n#    define DEF_MEM_LEVEL 8\n#  else\n#    define DEF_MEM_LEVEL  MAX_MEM_LEVEL\n#  endif\n#endif\n/* default memLevel */\n\n/* tm_zip contain date/time info */\ntypedef struct tm_zip_s\n{\n    uInt tm_sec;            /* seconds after the minute - [0,59] */\n    uInt tm_min;            /* minutes after the hour - [0,59] */\n    uInt tm_hour;           /* hours since midnight - [0,23] */\n    uInt tm_mday;           /* day of the month - [1,31] */\n    uInt tm_mon;            /* months since January - [0,11] */\n    uInt tm_year;           /* years - [1980..2044] */\n} tm_zip;\n\ntypedef struct\n{\n    tm_zip      tmz_date;       /* date in understandable format           */\n    uLong       dosDate;       /* if dos_date == 0, tmu_date is used      */\n/*    uLong       flag;        */   /* general purpose bit flag        2 bytes */\n\n    uLong       internal_fa;    /* internal file attributes        2 bytes */\n    uLong       external_fa;    /* external file attributes        4 bytes */\n} zip_fileinfo;\n\ntypedef const char* zipcharpc;\n\n\n#define APPEND_STATUS_CREATE        (0)\n#define APPEND_STATUS_CREATEAFTER   (1)\n#define APPEND_STATUS_ADDINZIP      (2)\n\nextern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));\nextern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append));\n/*\n  Create a zipfile.\n     pathname contain on Windows XP a filename like \"c:\\\\zlib\\\\zlib113.zip\" or on\n       an Unix computer \"zlib/zlib113.zip\".\n     if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip\n       will be created at the end of the file.\n         (useful if the file contain a self extractor code)\n     if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will\n       add files in existing zip (be sure you don't add file that doesn't exist)\n     If the zipfile cannot be opened, the return value is NULL.\n     Else, the return value is a zipFile Handle, usable with other function\n       of this zip package.\n*/\n\n/* Note : there is no delete function into a zipfile.\n   If you want delete file into a zipfile, you must open a zipfile, and create another\n   Of couse, you can use RAW reading and writing to copy the file you did not want delte\n*/\n\nextern zipFile ZEXPORT zipOpen2 OF((const char *pathname,\n                                   int append,\n                                   zipcharpc* globalcomment,\n                                   zlib_filefunc_def* pzlib_filefunc_def));\n\nextern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname,\n                                   int append,\n                                   zipcharpc* globalcomment,\n                                   zlib_filefunc64_def* pzlib_filefunc_def));\n\nextern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,\n                       const char* filename,\n                       const zip_fileinfo* zipfi,\n                       const void* extrafield_local,\n                       uInt size_extrafield_local,\n                       const void* extrafield_global,\n                       uInt size_extrafield_global,\n                       const char* comment,\n                       int method,\n                       int level));\n\nextern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file,\n                       const char* filename,\n                       const zip_fileinfo* zipfi,\n                       const void* extrafield_local,\n                       uInt size_extrafield_local,\n                       const void* extrafield_global,\n                       uInt size_extrafield_global,\n                       const char* comment,\n                       int method,\n                       int level,\n                       int zip64));\n\n/*\n  Open a file in the ZIP for writing.\n  filename : the filename in zip (if NULL, '-' without quote will be used\n  *zipfi contain supplemental information\n  if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local\n    contains the extrafield data the the local header\n  if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global\n    contains the extrafield data the the local header\n  if comment != NULL, comment contain the comment string\n  method contain the compression method (0 for store, Z_DEFLATED for deflate)\n  level contain the level of compression (can be Z_DEFAULT_COMPRESSION)\n  zip64 is set to 1 if a zip64 extended information block should be added to the local file header.\n                    this MUST be '1' if the uncompressed size is >= 0xffffffff.\n\n*/\n\n\nextern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,\n                                            const char* filename,\n                                            const zip_fileinfo* zipfi,\n                                            const void* extrafield_local,\n                                            uInt size_extrafield_local,\n                                            const void* extrafield_global,\n                                            uInt size_extrafield_global,\n                                            const char* comment,\n                                            int method,\n                                            int level,\n                                            int raw));\n\n\nextern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file,\n                                            const char* filename,\n                                            const zip_fileinfo* zipfi,\n                                            const void* extrafield_local,\n                                            uInt size_extrafield_local,\n                                            const void* extrafield_global,\n                                            uInt size_extrafield_global,\n                                            const char* comment,\n                                            int method,\n                                            int level,\n                                            int raw,\n                                            int zip64));\n/*\n  Same than zipOpenNewFileInZip, except if raw=1, we write raw file\n */\n\nextern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,\n                                            const char* filename,\n                                            const zip_fileinfo* zipfi,\n                                            const void* extrafield_local,\n                                            uInt size_extrafield_local,\n                                            const void* extrafield_global,\n                                            uInt size_extrafield_global,\n                                            const char* comment,\n                                            int method,\n                                            int level,\n                                            int raw,\n                                            int windowBits,\n                                            int memLevel,\n                                            int strategy,\n                                            const char* password,\n                                            uLong crcForCrypting));\n\nextern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file,\n                                            const char* filename,\n                                            const zip_fileinfo* zipfi,\n                                            const void* extrafield_local,\n                                            uInt size_extrafield_local,\n                                            const void* extrafield_global,\n                                            uInt size_extrafield_global,\n                                            const char* comment,\n                                            int method,\n                                            int level,\n                                            int raw,\n                                            int windowBits,\n                                            int memLevel,\n                                            int strategy,\n                                            const char* password,\n                                            uLong crcForCrypting,\n                                            int zip64\n                                            ));\n\n/*\n  Same than zipOpenNewFileInZip2, except\n    windowBits,memLevel,,strategy : see parameter strategy in deflateInit2\n    password : crypting password (NULL for no crypting)\n    crcForCrypting : crc of file to compress (needed for crypting)\n */\n\nextern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file,\n                                            const char* filename,\n                                            const zip_fileinfo* zipfi,\n                                            const void* extrafield_local,\n                                            uInt size_extrafield_local,\n                                            const void* extrafield_global,\n                                            uInt size_extrafield_global,\n                                            const char* comment,\n                                            int method,\n                                            int level,\n                                            int raw,\n                                            int windowBits,\n                                            int memLevel,\n                                            int strategy,\n                                            const char* password,\n                                            uLong crcForCrypting,\n                                            uLong versionMadeBy,\n                                            uLong flagBase\n                                            ));\n\n\nextern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file,\n                                            const char* filename,\n                                            const zip_fileinfo* zipfi,\n                                            const void* extrafield_local,\n                                            uInt size_extrafield_local,\n                                            const void* extrafield_global,\n                                            uInt size_extrafield_global,\n                                            const char* comment,\n                                            int method,\n                                            int level,\n                                            int raw,\n                                            int windowBits,\n                                            int memLevel,\n                                            int strategy,\n                                            const char* password,\n                                            uLong crcForCrypting,\n                                            uLong versionMadeBy,\n                                            uLong flagBase,\n                                            int zip64\n                                            ));\n/*\n  Same than zipOpenNewFileInZip4, except\n    versionMadeBy : value for Version made by field\n    flag : value for flag field (compression level info will be added)\n */\n\n\nextern int ZEXPORT zipWriteInFileInZip OF((zipFile file,\n                       const void* buf,\n                       unsigned len));\n/*\n  Write data in the zipfile\n*/\n\nextern int ZEXPORT zipCloseFileInZip OF((zipFile file));\n/*\n  Close the current file in the zipfile\n*/\n\nextern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,\n                                            uLong uncompressed_size,\n                                            uLong crc32));\n\nextern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file,\n                                            ZPOS64_T uncompressed_size,\n                                            uLong crc32));\n\n/*\n  Close the current file in the zipfile, for file opened with\n    parameter raw=1 in zipOpenNewFileInZip2\n  uncompressed_size and crc32 are value for the uncompressed size\n*/\n\nextern int ZEXPORT zipClose OF((zipFile file,\n                const char* global_comment));\n/*\n  Close the zipfile\n*/\n\n\nextern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader));\n/*\n  zipRemoveExtraInfoBlock -  Added by Mathias Svensson\n\n  Remove extra information block from a extra information data for the local file header or central directory header\n\n  It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode.\n\n  0x0001 is the signature header for the ZIP64 extra information blocks\n\n  usage.\n                        Remove ZIP64 Extra information from a central director extra field data\n              zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001);\n\n                        Remove ZIP64 Extra information from a Local File Header extra field data\n        zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001);\n*/\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* _zip64_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/zlib.h",
    "content": "/* zlib.h -- interface of the 'zlib' general purpose compression library\n  version 1.2.1, November 17th, 2003\n\n  Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n\n  Jean-loup Gailly        Mark Adler\n  jloup@gzip.org          madler@alumni.caltech.edu\n\n\n  The data format used by the zlib library is described by RFCs (Request for\n  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt\n  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).\n*/\n\n#ifndef ZLIB_H\n#define ZLIB_H\n\n#include \"zconf.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define ZLIB_VERSION \"1.2.1\"\n#define ZLIB_VERNUM 0x1210\n\n/*\n     The 'zlib' compression library provides in-memory compression and\n  decompression functions, including integrity checks of the uncompressed\n  data.  This version of the library supports only one compression method\n  (deflation) but other algorithms will be added later and will have the same\n  stream interface.\n\n     Compression can be done in a single step if the buffers are large\n  enough (for example if an input file is mmap'ed), or can be done by\n  repeated calls of the compression function.  In the latter case, the\n  application must provide more input and/or consume the output\n  (providing more output space) before each call.\n\n     The compressed data format used by the in-memory functions is the zlib\n  format, which is a zlib wrapper documented in RFC 1950, wrapped around a\n  deflate stream, which is itself documented in RFC 1951.\n\n     The library also supports reading and writing files in gzip (.gz) format\n  with an interface similar to that of stdio using the functions that start\n  with \"gz\".  The gzip format is different from the zlib format.  gzip is a\n  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.\n\n     The zlib format was designed to be compact and fast for use in memory\n  and on communications channels.  The gzip format was designed for single-\n  file compression on file systems, has a larger header than zlib to maintain\n  directory information, and uses a different, slower check method than zlib.\n\n     This library does not provide any functions to write gzip files in memory.\n  However such functions could be easily written using zlib's deflate function,\n  the documentation in the gzip RFC, and the examples in gzio.c.\n\n     The library does not install any signal handler. The decoder checks\n  the consistency of the compressed data, so the library should never\n  crash even in case of corrupted input.\n*/\n\ntypedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));\ntypedef void   (*free_func)  OF((voidpf opaque, voidpf address));\n\nstruct internal_state;\n\ntypedef struct z_stream_s {\n    Bytef    *next_in;  /* next input byte */\n    uInt     avail_in;  /* number of bytes available at next_in */\n    uLong    total_in;  /* total nb of input bytes read so far */\n\n    Bytef    *next_out; /* next output byte should be put there */\n    uInt     avail_out; /* remaining free space at next_out */\n    uLong    total_out; /* total nb of bytes output so far */\n\n    char     *msg;      /* last error message, NULL if no error */\n    struct internal_state FAR *state; /* not visible by applications */\n\n    alloc_func zalloc;  /* used to allocate the internal state */\n    free_func  zfree;   /* used to free the internal state */\n    voidpf     opaque;  /* private data object passed to zalloc and zfree */\n\n    int     data_type;  /* best guess about the data type: ascii or binary */\n    uLong   adler;      /* adler32 value of the uncompressed data */\n    uLong   reserved;   /* reserved for future use */\n} z_stream;\n\ntypedef z_stream FAR *z_streamp;\n\n/*\n   The application must update next_in and avail_in when avail_in has\n   dropped to zero. It must update next_out and avail_out when avail_out\n   has dropped to zero. The application must initialize zalloc, zfree and\n   opaque before calling the init function. All other fields are set by the\n   compression library and must not be updated by the application.\n\n   The opaque value provided by the application will be passed as the first\n   parameter for calls of zalloc and zfree. This can be useful for custom\n   memory management. The compression library attaches no meaning to the\n   opaque value.\n\n   zalloc must return Z_NULL if there is not enough memory for the object.\n   If zlib is used in a multi-threaded application, zalloc and zfree must be\n   thread safe.\n\n   On 16-bit systems, the functions zalloc and zfree must be able to allocate\n   exactly 65536 bytes, but will not be required to allocate more than this\n   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,\n   pointers returned by zalloc for objects of exactly 65536 bytes *must*\n   have their offset normalized to zero. The default allocation function\n   provided by this library ensures this (see zutil.c). To reduce memory\n   requirements and avoid any allocation of 64K objects, at the expense of\n   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).\n\n   The fields total_in and total_out can be used for statistics or\n   progress reports. After compression, total_in holds the total size of\n   the uncompressed data and may be saved for use in the decompressor\n   (particularly if the decompressor wants to decompress everything in\n   a single step).\n*/\n\n                        /* constants */\n\n#define Z_NO_FLUSH      0\n#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */\n#define Z_SYNC_FLUSH    2\n#define Z_FULL_FLUSH    3\n#define Z_FINISH        4\n#define Z_BLOCK         5\n/* Allowed flush values; see deflate() and inflate() below for details */\n\n#define Z_OK            0\n#define Z_STREAM_END    1\n#define Z_NEED_DICT     2\n#define Z_ERRNO        (-1)\n#define Z_STREAM_ERROR (-2)\n#define Z_DATA_ERROR   (-3)\n#define Z_MEM_ERROR    (-4)\n#define Z_BUF_ERROR    (-5)\n#define Z_VERSION_ERROR (-6)\n/* Return codes for the compression/decompression functions. Negative\n * values are errors, positive values are used for special but normal events.\n */\n\n#define Z_NO_COMPRESSION         0\n#define Z_BEST_SPEED             1\n#define Z_BEST_COMPRESSION       9\n#define Z_DEFAULT_COMPRESSION  (-1)\n/* compression levels */\n\n#define Z_FILTERED            1\n#define Z_HUFFMAN_ONLY        2\n#define Z_RLE                 3\n#define Z_DEFAULT_STRATEGY    0\n/* compression strategy; see deflateInit2() below for details */\n\n#define Z_BINARY   0\n#define Z_ASCII    1\n#define Z_UNKNOWN  2\n/* Possible values of the data_type field (though see inflate()) */\n\n#define Z_DEFLATED   8\n/* The deflate compression method (the only one supported in this version) */\n\n#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */\n\n#define zlib_version zlibVersion()\n/* for compatibility with versions < 1.0.2 */\n\n                        /* basic functions */\n\nZEXTERN const char * ZEXPORT zlibVersion OF((void));\n/* The application can compare zlibVersion and ZLIB_VERSION for consistency.\n   If the first character differs, the library code actually used is\n   not compatible with the zlib.h header file used by the application.\n   This check is automatically made by deflateInit and inflateInit.\n */\n\n/*\nZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));\n\n     Initializes the internal stream state for compression. The fields\n   zalloc, zfree and opaque must be initialized before by the caller.\n   If zalloc and zfree are set to Z_NULL, deflateInit updates them to\n   use default allocation functions.\n\n     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:\n   1 gives best speed, 9 gives best compression, 0 gives no compression at\n   all (the input data is simply copied a block at a time).\n   Z_DEFAULT_COMPRESSION requests a default compromise between speed and\n   compression (currently equivalent to level 6).\n\n     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_STREAM_ERROR if level is not a valid compression level,\n   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible\n   with the version assumed by the caller (ZLIB_VERSION).\n   msg is set to null if there is no error message.  deflateInit does not\n   perform any compression: this will be done by deflate().\n*/\n\n\nZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));\n/*\n    deflate compresses as much data as possible, and stops when the input\n  buffer becomes empty or the output buffer becomes full. It may introduce some\n  output latency (reading input without producing any output) except when\n  forced to flush.\n\n    The detailed semantics are as follows. deflate performs one or both of the\n  following actions:\n\n  - Compress more input starting at next_in and update next_in and avail_in\n    accordingly. If not all input can be processed (because there is not\n    enough room in the output buffer), next_in and avail_in are updated and\n    processing will resume at this point for the next call of deflate().\n\n  - Provide more output starting at next_out and update next_out and avail_out\n    accordingly. This action is forced if the parameter flush is non zero.\n    Forcing flush frequently degrades the compression ratio, so this parameter\n    should be set only when necessary (in interactive applications).\n    Some output may be provided even if flush is not set.\n\n  Before the call of deflate(), the application should ensure that at least\n  one of the actions is possible, by providing more input and/or consuming\n  more output, and updating avail_in or avail_out accordingly; avail_out\n  should never be zero before the call. The application can consume the\n  compressed output when it wants, for example when the output buffer is full\n  (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK\n  and with zero avail_out, it must be called again after making room in the\n  output buffer because there might be more output pending.\n\n    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is\n  flushed to the output buffer and the output is aligned on a byte boundary, so\n  that the decompressor can get all input data available so far. (In particular\n  avail_in is zero after the call if enough output space has been provided\n  before the call.)  Flushing may degrade compression for some compression\n  algorithms and so it should be used only when necessary.\n\n    If flush is set to Z_FULL_FLUSH, all output is flushed as with\n  Z_SYNC_FLUSH, and the compression state is reset so that decompression can\n  restart from this point if previous compressed data has been damaged or if\n  random access is desired. Using Z_FULL_FLUSH too often can seriously degrade\n  the compression.\n\n    If deflate returns with avail_out == 0, this function must be called again\n  with the same value of the flush parameter and more output space (updated\n  avail_out), until the flush is complete (deflate returns with non-zero\n  avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that\n  avail_out is greater than six to avoid repeated flush markers due to\n  avail_out == 0 on return.\n\n    If the parameter flush is set to Z_FINISH, pending input is processed,\n  pending output is flushed and deflate returns with Z_STREAM_END if there\n  was enough output space; if deflate returns with Z_OK, this function must be\n  called again with Z_FINISH and more output space (updated avail_out) but no\n  more input data, until it returns with Z_STREAM_END or an error. After\n  deflate has returned Z_STREAM_END, the only possible operations on the\n  stream are deflateReset or deflateEnd.\n\n    Z_FINISH can be used immediately after deflateInit if all the compression\n  is to be done in a single step. In this case, avail_out must be at least\n  the value returned by deflateBound (see below). If deflate does not return\n  Z_STREAM_END, then it must be called again as described above.\n\n    deflate() sets strm->adler to the adler32 checksum of all input read\n  so far (that is, total_in bytes).\n\n    deflate() may update data_type if it can make a good guess about\n  the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered\n  binary. This field is only for information purposes and does not affect\n  the compression algorithm in any manner.\n\n    deflate() returns Z_OK if some progress has been made (more input\n  processed or more output produced), Z_STREAM_END if all input has been\n  consumed and all output has been produced (only when flush is set to\n  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example\n  if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible\n  (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not\n  fatal, and deflate() can be called again with more input and more output\n  space to continue compressing.\n*/\n\n\nZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));\n/*\n     All dynamically allocated data structures for this stream are freed.\n   This function discards any unprocessed input and does not flush any\n   pending output.\n\n     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the\n   stream state was inconsistent, Z_DATA_ERROR if the stream was freed\n   prematurely (some input or output was discarded). In the error case,\n   msg may be set but then points to a static string (which must not be\n   deallocated).\n*/\n\n\n/*\nZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));\n\n     Initializes the internal stream state for decompression. The fields\n   next_in, avail_in, zalloc, zfree and opaque must be initialized before by\n   the caller. If next_in is not Z_NULL and avail_in is large enough (the exact\n   value depends on the compression method), inflateInit determines the\n   compression method from the zlib header and allocates all data structures\n   accordingly; otherwise the allocation will be deferred to the first call of\n   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to\n   use default allocation functions.\n\n     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the\n   version assumed by the caller.  msg is set to null if there is no error\n   message. inflateInit does not perform any decompression apart from reading\n   the zlib header if present: this will be done by inflate().  (So next_in and\n   avail_in may be modified, but next_out and avail_out are unchanged.)\n*/\n\n\nZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));\n/*\n    inflate decompresses as much data as possible, and stops when the input\n  buffer becomes empty or the output buffer becomes full. It may introduce\n  some output latency (reading input without producing any output) except when\n  forced to flush.\n\n  The detailed semantics are as follows. inflate performs one or both of the\n  following actions:\n\n  - Decompress more input starting at next_in and update next_in and avail_in\n    accordingly. If not all input can be processed (because there is not\n    enough room in the output buffer), next_in is updated and processing\n    will resume at this point for the next call of inflate().\n\n  - Provide more output starting at next_out and update next_out and avail_out\n    accordingly.  inflate() provides as much output as possible, until there\n    is no more input data or no more space in the output buffer (see below\n    about the flush parameter).\n\n  Before the call of inflate(), the application should ensure that at least\n  one of the actions is possible, by providing more input and/or consuming\n  more output, and updating the next_* and avail_* values accordingly.\n  The application can consume the uncompressed output when it wants, for\n  example when the output buffer is full (avail_out == 0), or after each\n  call of inflate(). If inflate returns Z_OK and with zero avail_out, it\n  must be called again after making room in the output buffer because there\n  might be more output pending.\n\n    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,\n  Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much\n  output as possible to the output buffer. Z_BLOCK requests that inflate() stop\n  if and when it get to the next deflate block boundary. When decoding the zlib\n  or gzip format, this will cause inflate() to return immediately after the\n  header and before the first block. When doing a raw inflate, inflate() will\n  go ahead and process the first block, and will return when it gets to the end\n  of that block, or when it runs out of data.\n\n    The Z_BLOCK option assists in appending to or combining deflate streams.\n  Also to assist in this, on return inflate() will set strm->data_type to the\n  number of unused bits in the last byte taken from strm->next_in, plus 64\n  if inflate() is currently decoding the last block in the deflate stream,\n  plus 128 if inflate() returned immediately after decoding an end-of-block\n  code or decoding the complete header up to just before the first byte of the\n  deflate stream. The end-of-block will not be indicated until all of the\n  uncompressed data from that block has been written to strm->next_out.  The\n  number of unused bits may in general be greater than seven, except when\n  bit 7 of data_type is set, in which case the number of unused bits will be\n  less than eight.\n\n    inflate() should normally be called until it returns Z_STREAM_END or an\n  error. However if all decompression is to be performed in a single step\n  (a single call of inflate), the parameter flush should be set to\n  Z_FINISH. In this case all pending input is processed and all pending\n  output is flushed; avail_out must be large enough to hold all the\n  uncompressed data. (The size of the uncompressed data may have been saved\n  by the compressor for this purpose.) The next operation on this stream must\n  be inflateEnd to deallocate the decompression state. The use of Z_FINISH\n  is never required, but can be used to inform inflate that a faster approach\n  may be used for the single inflate() call.\n\n     In this implementation, inflate() always flushes as much output as\n  possible to the output buffer, and always uses the faster approach on the\n  first call. So the only effect of the flush parameter in this implementation\n  is on the return value of inflate(), as noted below, or when it returns early\n  because Z_BLOCK is used.\n\n     If a preset dictionary is needed after this call (see inflateSetDictionary\n  below), inflate sets strm-adler to the adler32 checksum of the dictionary\n  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets\n  strm->adler to the adler32 checksum of all output produced so far (that is,\n  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described\n  below. At the end of the stream, inflate() checks that its computed adler32\n  checksum is equal to that saved by the compressor and returns Z_STREAM_END\n  only if the checksum is correct.\n\n    inflate() will decompress and check either zlib-wrapped or gzip-wrapped\n  deflate data.  The header type is detected automatically.  Any information\n  contained in the gzip header is not retained, so applications that need that\n  information should instead use raw inflate, see inflateInit2() below, or\n  inflateBack() and perform their own processing of the gzip header and\n  trailer.\n\n    inflate() returns Z_OK if some progress has been made (more input processed\n  or more output produced), Z_STREAM_END if the end of the compressed data has\n  been reached and all uncompressed output has been produced, Z_NEED_DICT if a\n  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was\n  corrupted (input stream not conforming to the zlib format or incorrect check\n  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example\n  if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,\n  Z_BUF_ERROR if no progress is possible or if there was not enough room in the\n  output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and\n  inflate() can be called again with more input and more output space to\n  continue decompressing. If Z_DATA_ERROR is returned, the application may then\n  call inflateSync() to look for a good compression block if a partial recovery\n  of the data is desired.\n*/\n\n\nZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));\n/*\n     All dynamically allocated data structures for this stream are freed.\n   This function discards any unprocessed input and does not flush any\n   pending output.\n\n     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state\n   was inconsistent. In the error case, msg may be set but then points to a\n   static string (which must not be deallocated).\n*/\n\n                        /* Advanced functions */\n\n/*\n    The following functions are needed only in some special applications.\n*/\n\n/*\nZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,\n                                     int  level,\n                                     int  method,\n                                     int  windowBits,\n                                     int  memLevel,\n                                     int  strategy));\n\n     This is another version of deflateInit with more compression options. The\n   fields next_in, zalloc, zfree and opaque must be initialized before by\n   the caller.\n\n     The method parameter is the compression method. It must be Z_DEFLATED in\n   this version of the library.\n\n     The windowBits parameter is the base two logarithm of the window size\n   (the size of the history buffer). It should be in the range 8..15 for this\n   version of the library. Larger values of this parameter result in better\n   compression at the expense of memory usage. The default value is 15 if\n   deflateInit is used instead.\n\n     windowBits can also be -8..-15 for raw deflate. In this case, -windowBits\n   determines the window size. deflate() will then generate raw deflate data\n   with no zlib header or trailer, and will not compute an adler32 check value.\n\n     windowBits can also be greater than 15 for optional gzip encoding. Add\n   16 to windowBits to write a simple gzip header and trailer around the\n   compressed data instead of a zlib wrapper. The gzip header will have no\n   file name, no extra data, no comment, no modification time (set to zero),\n   no header crc, and the operating system will be set to 255 (unknown).\n\n     The memLevel parameter specifies how much memory should be allocated\n   for the internal compression state. memLevel=1 uses minimum memory but\n   is slow and reduces compression ratio; memLevel=9 uses maximum memory\n   for optimal speed. The default value is 8. See zconf.h for total memory\n   usage as a function of windowBits and memLevel.\n\n     The strategy parameter is used to tune the compression algorithm. Use the\n   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a\n   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no\n   string match), or Z_RLE to limit match distances to one (run-length\n   encoding). Filtered data consists mostly of small values with a somewhat\n   random distribution. In this case, the compression algorithm is tuned to\n   compress them better. The effect of Z_FILTERED is to force more Huffman\n   coding and less string matching; it is somewhat intermediate between\n   Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as\n   Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy\n   parameter only affects the compression ratio but not the correctness of the\n   compressed output even if it is not set appropriately.\n\n      deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid\n   method). msg is set to null if there is no error message.  deflateInit2 does\n   not perform any compression: this will be done by deflate().\n*/\n\nZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,\n                                             const Bytef *dictionary,\n                                             uInt  dictLength));\n/*\n     Initializes the compression dictionary from the given byte sequence\n   without producing any compressed output. This function must be called\n   immediately after deflateInit, deflateInit2 or deflateReset, before any\n   call of deflate. The compressor and decompressor must use exactly the same\n   dictionary (see inflateSetDictionary).\n\n     The dictionary should consist of strings (byte sequences) that are likely\n   to be encountered later in the data to be compressed, with the most commonly\n   used strings preferably put towards the end of the dictionary. Using a\n   dictionary is most useful when the data to be compressed is short and can be\n   predicted with good accuracy; the data can then be compressed better than\n   with the default empty dictionary.\n\n     Depending on the size of the compression data structures selected by\n   deflateInit or deflateInit2, a part of the dictionary may in effect be\n   discarded, for example if the dictionary is larger than the window size in\n   deflate or deflate2. Thus the strings most likely to be useful should be\n   put at the end of the dictionary, not at the front.\n\n     Upon return of this function, strm->adler is set to the adler32 value\n   of the dictionary; the decompressor may later use this value to determine\n   which dictionary has been used by the compressor. (The adler32 value\n   applies to the whole dictionary even if only a subset of the dictionary is\n   actually used by the compressor.) If a raw deflate was requested, then the\n   adler32 value is not computed and strm->adler is not set.\n\n     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a\n   parameter is invalid (such as NULL dictionary) or the stream state is\n   inconsistent (for example if deflate has already been called for this stream\n   or if the compression method is bsort). deflateSetDictionary does not\n   perform any compression: this will be done by deflate().\n*/\n\nZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,\n                                    z_streamp source));\n/*\n     Sets the destination stream as a complete copy of the source stream.\n\n     This function can be useful when several compression strategies will be\n   tried, for example when there are several ways of pre-processing the input\n   data with a filter. The streams that will be discarded should then be freed\n   by calling deflateEnd.  Note that deflateCopy duplicates the internal\n   compression state which can be quite large, so this strategy is slow and\n   can consume lots of memory.\n\n     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent\n   (such as zalloc being NULL). msg is left unchanged in both source and\n   destination.\n*/\n\nZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));\n/*\n     This function is equivalent to deflateEnd followed by deflateInit,\n   but does not free and reallocate all the internal compression state.\n   The stream will keep the same compression level and any other attributes\n   that may have been set by deflateInit2.\n\n      deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source\n   stream state was inconsistent (such as zalloc or state being NULL).\n*/\n\nZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,\n                                      int level,\n                                      int strategy));\n/*\n     Dynamically update the compression level and compression strategy.  The\n   interpretation of level and strategy is as in deflateInit2.  This can be\n   used to switch between compression and straight copy of the input data, or\n   to switch to a different kind of input data requiring a different\n   strategy. If the compression level is changed, the input available so far\n   is compressed with the old level (and may be flushed); the new level will\n   take effect only at the next call of deflate().\n\n     Before the call of deflateParams, the stream state must be set as for\n   a call of deflate(), since the currently available input may have to\n   be compressed and flushed. In particular, strm->avail_out must be non-zero.\n\n     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source\n   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR\n   if strm->avail_out was zero.\n*/\n\nZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,\n                                       uLong sourceLen));\n/*\n     deflateBound() returns an upper bound on the compressed size after\n   deflation of sourceLen bytes.  It must be called after deflateInit()\n   or deflateInit2().  This would be used to allocate an output buffer\n   for deflation in a single pass, and so would be called before deflate().\n*/\n\nZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,\n                                     int bits,\n                                     int value));\n/*\n     deflatePrime() inserts bits in the deflate output stream.  The intent\n  is that this function is used to start off the deflate output with the\n  bits leftover from a previous deflate stream when appending to it.  As such,\n  this function can only be used for raw deflate, and must be used before the\n  first deflate() call after a deflateInit2() or deflateReset().  bits must be\n  less than or equal to 16, and that many of the least significant bits of\n  value will be inserted in the output.\n\n      deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source\n   stream state was inconsistent.\n*/\n\n/*\nZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,\n                                     int  windowBits));\n\n     This is another version of inflateInit with an extra parameter. The\n   fields next_in, avail_in, zalloc, zfree and opaque must be initialized\n   before by the caller.\n\n     The windowBits parameter is the base two logarithm of the maximum window\n   size (the size of the history buffer).  It should be in the range 8..15 for\n   this version of the library. The default value is 15 if inflateInit is used\n   instead. windowBits must be greater than or equal to the windowBits value\n   provided to deflateInit2() while compressing, or it must be equal to 15 if\n   deflateInit2() was not used. If a compressed stream with a larger window\n   size is given as input, inflate() will return with the error code\n   Z_DATA_ERROR instead of trying to allocate a larger window.\n\n     windowBits can also be -8..-15 for raw inflate. In this case, -windowBits\n   determines the window size. inflate() will then process raw deflate data,\n   not looking for a zlib or gzip header, not generating a check value, and not\n   looking for any check values for comparison at the end of the stream. This\n   is for use with other formats that use the deflate compressed data format\n   such as zip.  Those formats provide their own check values. If a custom\n   format is developed using the raw deflate format for compressed data, it is\n   recommended that a check value such as an adler32 or a crc32 be applied to\n   the uncompressed data as is done in the zlib, gzip, and zip formats.  For\n   most applications, the zlib format should be used as is. Note that comments\n   above on the use in deflateInit2() applies to the magnitude of windowBits.\n\n     windowBits can also be greater than 15 for optional gzip decoding. Add\n   32 to windowBits to enable zlib and gzip decoding with automatic header\n   detection, or add 16 to decode only the gzip format (the zlib format will\n   return a Z_DATA_ERROR).\n\n     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative\n   memLevel). msg is set to null if there is no error message.  inflateInit2\n   does not perform any decompression apart from reading the zlib header if\n   present: this will be done by inflate(). (So next_in and avail_in may be\n   modified, but next_out and avail_out are unchanged.)\n*/\n\nZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,\n                                             const Bytef *dictionary,\n                                             uInt  dictLength));\n/*\n     Initializes the decompression dictionary from the given uncompressed byte\n   sequence. This function must be called immediately after a call of inflate\n   if this call returned Z_NEED_DICT. The dictionary chosen by the compressor\n   can be determined from the adler32 value returned by this call of\n   inflate. The compressor and decompressor must use exactly the same\n   dictionary (see deflateSetDictionary).\n\n     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a\n   parameter is invalid (such as NULL dictionary) or the stream state is\n   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the\n   expected one (incorrect adler32 value). inflateSetDictionary does not\n   perform any decompression: this will be done by subsequent calls of\n   inflate().\n*/\n\nZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));\n/*\n    Skips invalid compressed data until a full flush point (see above the\n  description of deflate with Z_FULL_FLUSH) can be found, or until all\n  available input is skipped. No output is provided.\n\n    inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR\n  if no more input was provided, Z_DATA_ERROR if no flush point has been found,\n  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success\n  case, the application may save the current current value of total_in which\n  indicates where valid compressed data was found. In the error case, the\n  application may repeatedly call inflateSync, providing more input each time,\n  until success or end of the input data.\n*/\n\nZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,\n                                    z_streamp source));\n/*\n     Sets the destination stream as a complete copy of the source stream.\n\n     This function can be useful when randomly accessing a large stream.  The\n   first pass through the stream can periodically record the inflate state,\n   allowing restarting inflate at those points when randomly accessing the\n   stream.\n\n     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent\n   (such as zalloc being NULL). msg is left unchanged in both source and\n   destination.\n*/\n\nZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));\n/*\n     This function is equivalent to inflateEnd followed by inflateInit,\n   but does not free and reallocate all the internal decompression state.\n   The stream will keep attributes that may have been set by inflateInit2.\n\n      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source\n   stream state was inconsistent (such as zalloc or state being NULL).\n*/\n\n/*\nZEXTERN int ZEXPORT inflateBackInit OF((z_stream FAR *strm, int windowBits,\n                                        unsigned char FAR *window));\n\n     Initialize the internal stream state for decompression using inflateBack()\n   calls.  The fields zalloc, zfree and opaque in strm must be initialized\n   before the call.  If zalloc and zfree are Z_NULL, then the default library-\n   derived memory allocation routines are used.  windowBits is the base two\n   logarithm of the window size, in the range 8..15.  window is a caller\n   supplied buffer of that size.  Except for special applications where it is\n   assured that deflate was used with small window sizes, windowBits must be 15\n   and a 32K byte window must be supplied to be able to decompress general\n   deflate streams.\n\n     See inflateBack() for the usage of these routines.\n\n     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of\n   the paramaters are invalid, Z_MEM_ERROR if the internal state could not\n   be allocated, or Z_VERSION_ERROR if the version of the library does not\n   match the version of the header file.\n*/\n\ntypedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));\ntypedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));\n\nZEXTERN int ZEXPORT inflateBack OF((z_stream FAR *strm,\n                                    in_func in, void FAR *in_desc,\n                                    out_func out, void FAR *out_desc));\n/*\n     inflateBack() does a raw inflate with a single call using a call-back\n   interface for input and output.  This is more efficient than inflate() for\n   file i/o applications in that it avoids copying between the output and the\n   sliding window by simply making the window itself the output buffer.  This\n   function trusts the application to not change the output buffer passed by\n   the output function, at least until inflateBack() returns.\n\n     inflateBackInit() must be called first to allocate the internal state\n   and to initialize the state with the user-provided window buffer.\n   inflateBack() may then be used multiple times to inflate a complete, raw\n   deflate stream with each call.  inflateBackEnd() is then called to free\n   the allocated state.\n\n     A raw deflate stream is one with no zlib or gzip header or trailer.\n   This routine would normally be used in a utility that reads zip or gzip\n   files and writes out uncompressed files.  The utility would decode the\n   header and process the trailer on its own, hence this routine expects\n   only the raw deflate stream to decompress.  This is different from the\n   normal behavior of inflate(), which expects either a zlib or gzip header and\n   trailer around the deflate stream.\n\n     inflateBack() uses two subroutines supplied by the caller that are then\n   called by inflateBack() for input and output.  inflateBack() calls those\n   routines until it reads a complete deflate stream and writes out all of the\n   uncompressed data, or until it encounters an error.  The function's\n   parameters and return types are defined above in the in_func and out_func\n   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the\n   number of bytes of provided input, and a pointer to that input in buf.  If\n   there is no input available, in() must return zero--buf is ignored in that\n   case--and inflateBack() will return a buffer error.  inflateBack() will call\n   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()\n   should return zero on success, or non-zero on failure.  If out() returns\n   non-zero, inflateBack() will return with an error.  Neither in() nor out()\n   are permitted to change the contents of the window provided to\n   inflateBackInit(), which is also the buffer that out() uses to write from.\n   The length written by out() will be at most the window size.  Any non-zero\n   amount of input may be provided by in().\n\n     For convenience, inflateBack() can be provided input on the first call by\n   setting strm->next_in and strm->avail_in.  If that input is exhausted, then\n   in() will be called.  Therefore strm->next_in must be initialized before\n   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called\n   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in\n   must also be initialized, and then if strm->avail_in is not zero, input will\n   initially be taken from strm->next_in[0 .. strm->avail_in - 1].\n\n     The in_desc and out_desc parameters of inflateBack() is passed as the\n   first parameter of in() and out() respectively when they are called.  These\n   descriptors can be optionally used to pass any information that the caller-\n   supplied in() and out() functions need to do their job.\n\n     On return, inflateBack() will set strm->next_in and strm->avail_in to\n   pass back any unused input that was provided by the last in() call.  The\n   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR\n   if in() or out() returned an error, Z_DATA_ERROR if there was a format\n   error in the deflate stream (in which case strm->msg is set to indicate the\n   nature of the error), or Z_STREAM_ERROR if the stream was not properly\n   initialized.  In the case of Z_BUF_ERROR, an input or output error can be\n   distinguished using strm->next_in which will be Z_NULL only if in() returned\n   an error.  If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to\n   out() returning non-zero.  (in() will always be called before out(), so\n   strm->next_in is assured to be defined if out() returns non-zero.)  Note\n   that inflateBack() cannot return Z_OK.\n*/\n\nZEXTERN int ZEXPORT inflateBackEnd OF((z_stream FAR *strm));\n/*\n     All memory allocated by inflateBackInit() is freed.\n\n     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream\n   state was inconsistent.\n*/\n\nZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));\n/* Return flags indicating compile-time options.\n\n    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:\n     1.0: size of uInt\n     3.2: size of uLong\n     5.4: size of voidpf (pointer)\n     7.6: size of z_off_t\n\n    Compiler, assembler, and debug options:\n     8: DEBUG\n     9: ASMV or ASMINF -- use ASM code\n     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention\n     11: 0 (reserved)\n\n    One-time table building (smaller code, but not thread-safe if true):\n     12: BUILDFIXED -- build static block decoding tables when needed\n     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed\n     14,15: 0 (reserved)\n\n    Library content (indicates missing functionality):\n     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking\n                          deflate code when not needed)\n     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect\n                    and decode gzip streams (to avoid linking crc code)\n     18-19: 0 (reserved)\n\n    Operation variations (changes in library functionality):\n     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate\n     21: FASTEST -- deflate algorithm with only one, lowest compression level\n     22,23: 0 (reserved)\n\n    The sprintf variant used by gzprintf (zero is best):\n     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format\n     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!\n     26: 0 = returns value, 1 = void -- 1 means inferred string length returned\n\n    Remainder:\n     27-31: 0 (reserved)\n */\n\n\n                        /* utility functions */\n\n/*\n     The following utility functions are implemented on top of the\n   basic stream-oriented functions. To simplify the interface, some\n   default options are assumed (compression level and memory usage,\n   standard memory allocation functions). The source code of these\n   utility functions can easily be modified if you need special options.\n*/\n\nZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,\n                                 const Bytef *source, uLong sourceLen));\n/*\n     Compresses the source buffer into the destination buffer.  sourceLen is\n   the byte length of the source buffer. Upon entry, destLen is the total\n   size of the destination buffer, which must be at least the value returned\n   by compressBound(sourceLen). Upon exit, destLen is the actual size of the\n   compressed buffer.\n     This function can be used to compress a whole file at once if the\n   input file is mmap'ed.\n     compress returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_BUF_ERROR if there was not enough room in the output\n   buffer.\n*/\n\nZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,\n                                  const Bytef *source, uLong sourceLen,\n                                  int level));\n/*\n     Compresses the source buffer into the destination buffer. The level\n   parameter has the same meaning as in deflateInit.  sourceLen is the byte\n   length of the source buffer. Upon entry, destLen is the total size of the\n   destination buffer, which must be at least the value returned by\n   compressBound(sourceLen). Upon exit, destLen is the actual size of the\n   compressed buffer.\n\n     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_BUF_ERROR if there was not enough room in the output buffer,\n   Z_STREAM_ERROR if the level parameter is invalid.\n*/\n\nZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));\n/*\n     compressBound() returns an upper bound on the compressed size after\n   compress() or compress2() on sourceLen bytes.  It would be used before\n   a compress() or compress2() call to allocate the destination buffer.\n*/\n\nZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,\n                                   const Bytef *source, uLong sourceLen));\n/*\n     Decompresses the source buffer into the destination buffer.  sourceLen is\n   the byte length of the source buffer. Upon entry, destLen is the total\n   size of the destination buffer, which must be large enough to hold the\n   entire uncompressed data. (The size of the uncompressed data must have\n   been saved previously by the compressor and transmitted to the decompressor\n   by some mechanism outside the scope of this compression library.)\n   Upon exit, destLen is the actual size of the compressed buffer.\n     This function can be used to decompress a whole file at once if the\n   input file is mmap'ed.\n\n     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not\n   enough memory, Z_BUF_ERROR if there was not enough room in the output\n   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.\n*/\n\n\ntypedef voidp gzFile;\n\nZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));\n/*\n     Opens a gzip (.gz) file for reading or writing. The mode parameter\n   is as in fopen (\"rb\" or \"wb\") but can also include a compression level\n   (\"wb9\") or a strategy: 'f' for filtered data as in \"wb6f\", 'h' for\n   Huffman only compression as in \"wb1h\", or 'R' for run-length encoding\n   as in \"wb1R\". (See the description of deflateInit2 for more information\n   about the strategy parameter.)\n\n     gzopen can be used to read a file which is not in gzip format; in this\n   case gzread will directly read from the file without decompression.\n\n     gzopen returns NULL if the file could not be opened or if there was\n   insufficient memory to allocate the (de)compression state; errno\n   can be checked to distinguish the two cases (if errno is zero, the\n   zlib error is Z_MEM_ERROR).  */\n\nZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));\n/*\n     gzdopen() associates a gzFile with the file descriptor fd.  File\n   descriptors are obtained from calls like open, dup, creat, pipe or\n   fileno (in the file has been previously opened with fopen).\n   The mode parameter is as in gzopen.\n     The next call of gzclose on the returned gzFile will also close the\n   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file\n   descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).\n     gzdopen returns NULL if there was insufficient memory to allocate\n   the (de)compression state.\n*/\n\nZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));\n/*\n     Dynamically update the compression level or strategy. See the description\n   of deflateInit2 for the meaning of these parameters.\n     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not\n   opened for writing.\n*/\n\nZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));\n/*\n     Reads the given number of uncompressed bytes from the compressed file.\n   If the input file was not in gzip format, gzread copies the given number\n   of bytes into the buffer.\n     gzread returns the number of uncompressed bytes actually read (0 for\n   end of file, -1 for error). */\n\nZEXTERN int ZEXPORT    gzwrite OF((gzFile file,\n                                   voidpc buf, unsigned len));\n/*\n     Writes the given number of uncompressed bytes into the compressed file.\n   gzwrite returns the number of uncompressed bytes actually written\n   (0 in case of error).\n*/\n\nZEXTERN int ZEXPORTVA   gzprintf OF((gzFile file, const char *format, ...));\n/*\n     Converts, formats, and writes the args to the compressed file under\n   control of the format string, as in fprintf. gzprintf returns the number of\n   uncompressed bytes actually written (0 in case of error).  The number of\n   uncompressed bytes written is limited to 4095. The caller should assure that\n   this limit is not exceeded. If it is exceeded, then gzprintf() will return\n   return an error (0) with nothing written. In this case, there may also be a\n   buffer overflow with unpredictable consequences, which is possible only if\n   zlib was compiled with the insecure functions sprintf() or vsprintf()\n   because the secure snprintf() or vsnprintf() functions were not available.\n*/\n\nZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));\n/*\n      Writes the given null-terminated string to the compressed file, excluding\n   the terminating null character.\n      gzputs returns the number of characters written, or -1 in case of error.\n*/\n\nZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));\n/*\n      Reads bytes from the compressed file until len-1 characters are read, or\n   a newline character is read and transferred to buf, or an end-of-file\n   condition is encountered.  The string is then terminated with a null\n   character.\n      gzgets returns buf, or Z_NULL in case of error.\n*/\n\nZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));\n/*\n      Writes c, converted to an unsigned char, into the compressed file.\n   gzputc returns the value that was written, or -1 in case of error.\n*/\n\nZEXTERN int ZEXPORT    gzgetc OF((gzFile file));\n/*\n      Reads one byte from the compressed file. gzgetc returns this byte\n   or -1 in case of end of file or error.\n*/\n\nZEXTERN int ZEXPORT    gzungetc OF((int c, gzFile file));\n/*\n      Push one character back onto the stream to be read again later.\n   Only one character of push-back is allowed.  gzungetc() returns the\n   character pushed, or -1 on failure.  gzungetc() will fail if a\n   character has been pushed but not read yet, or if c is -1. The pushed\n   character will be discarded if the stream is repositioned with gzseek()\n   or gzrewind().\n*/\n\nZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));\n/*\n     Flushes all pending output into the compressed file. The parameter\n   flush is as in the deflate() function. The return value is the zlib\n   error number (see function gzerror below). gzflush returns Z_OK if\n   the flush parameter is Z_FINISH and all output could be flushed.\n     gzflush should be called only when strictly necessary because it can\n   degrade compression.\n*/\n\nZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,\n                                      z_off_t offset, int whence));\n/*\n      Sets the starting position for the next gzread or gzwrite on the\n   given compressed file. The offset represents a number of bytes in the\n   uncompressed data stream. The whence parameter is defined as in lseek(2);\n   the value SEEK_END is not supported.\n     If the file is opened for reading, this function is emulated but can be\n   extremely slow. If the file is opened for writing, only forward seeks are\n   supported; gzseek then compresses a sequence of zeroes up to the new\n   starting position.\n\n      gzseek returns the resulting offset location as measured in bytes from\n   the beginning of the uncompressed stream, or -1 in case of error, in\n   particular if the file is opened for writing and the new starting position\n   would be before the current position.\n*/\n\nZEXTERN int ZEXPORT    gzrewind OF((gzFile file));\n/*\n     Rewinds the given file. This function is supported only for reading.\n\n   gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)\n*/\n\nZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));\n/*\n     Returns the starting position for the next gzread or gzwrite on the\n   given compressed file. This position represents a number of bytes in the\n   uncompressed data stream.\n\n   gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)\n*/\n\nZEXTERN int ZEXPORT gzeof OF((gzFile file));\n/*\n     Returns 1 when EOF has previously been detected reading the given\n   input stream, otherwise zero.\n*/\n\nZEXTERN int ZEXPORT    gzclose OF((gzFile file));\n/*\n     Flushes all pending output if necessary, closes the compressed file\n   and deallocates all the (de)compression state. The return value is the zlib\n   error number (see function gzerror below).\n*/\n\nZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));\n/*\n     Returns the error message for the last error which occurred on the\n   given compressed file. errnum is set to zlib error number. If an\n   error occurred in the file system and not in the compression library,\n   errnum is set to Z_ERRNO and the application may consult errno\n   to get the exact error code.\n*/\n\nZEXTERN void ZEXPORT gzclearerr OF((gzFile file));\n/*\n     Clears the error and end-of-file flags for file. This is analogous to the\n   clearerr() function in stdio. This is useful for continuing to read a gzip\n   file that is being written concurrently.\n*/\n\n                        /* checksum functions */\n\n/*\n     These functions are not related to compression but are exported\n   anyway because they might be useful in applications using the\n   compression library.\n*/\n\nZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));\n\n/*\n     Update a running Adler-32 checksum with the bytes buf[0..len-1] and\n   return the updated checksum. If buf is NULL, this function returns\n   the required initial value for the checksum.\n   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed\n   much faster. Usage example:\n\n     uLong adler = adler32(0L, Z_NULL, 0);\n\n     while (read_buffer(buffer, length) != EOF) {\n       adler = adler32(adler, buffer, length);\n     }\n     if (adler != original_adler) error();\n*/\n\nZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));\n/*\n     Update a running crc with the bytes buf[0..len-1] and return the updated\n   crc. If buf is NULL, this function returns the required initial value\n   for the crc. Pre- and post-conditioning (one's complement) is performed\n   within this function so it shouldn't be done by the application.\n   Usage example:\n\n     uLong crc = crc32(0L, Z_NULL, 0);\n\n     while (read_buffer(buffer, length) != EOF) {\n       crc = crc32(crc, buffer, length);\n     }\n     if (crc != original_crc) error();\n*/\n\n\n                        /* various hacks, don't look :) */\n\n/* deflateInit and inflateInit are macros to allow checking the zlib version\n * and the compiler's view of z_stream:\n */\nZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,\n                                     const char *version, int stream_size));\nZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,\n                                     const char *version, int stream_size));\nZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,\n                                      int windowBits, int memLevel,\n                                      int strategy, const char *version,\n                                      int stream_size));\nZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,\n                                      const char *version, int stream_size));\nZEXTERN int ZEXPORT inflateBackInit_ OF((z_stream FAR *strm, int windowBits,\n                                         unsigned char FAR *window,\n                                         const char *version,\n                                         int stream_size));\n#define deflateInit(strm, level) \\\n        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))\n#define inflateInit(strm) \\\n        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))\n#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \\\n        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\\\n                      (strategy),           ZLIB_VERSION, sizeof(z_stream))\n#define inflateInit2(strm, windowBits) \\\n        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))\n#define inflateBackInit(strm, windowBits, window) \\\n        inflateBackInit_((strm), (windowBits), (window), \\\n        ZLIB_VERSION, sizeof(z_stream))\n\n\n#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)\n    struct internal_state {int dummy;}; /* hack for buggy compilers */\n#endif\n\nZEXTERN const char   * ZEXPORT zError           OF((int err));\nZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));\nZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* ZLIB_H */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/zutil.c",
    "content": "/* zutil.c -- target dependent utility functions for the compression library\n * Copyright (C) 1995-2003 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#include \"zutil.h\"\n\n#ifndef NO_DUMMY_DECL\nstruct internal_state      {int dummy;}; /* for buggy compilers */\n#endif\n\n#ifndef STDC\nextern void exit OF((int));\n#endif\n\nconst char * const z_errmsg[10] = {\n\"need dictionary\",     /* Z_NEED_DICT       2  */\n\"stream end\",          /* Z_STREAM_END      1  */\n\"\",                    /* Z_OK              0  */\n\"file error\",          /* Z_ERRNO         (-1) */\n\"stream error\",        /* Z_STREAM_ERROR  (-2) */\n\"data error\",          /* Z_DATA_ERROR    (-3) */\n\"insufficient memory\", /* Z_MEM_ERROR     (-4) */\n\"buffer error\",        /* Z_BUF_ERROR     (-5) */\n\"incompatible version\",/* Z_VERSION_ERROR (-6) */\n\"\"};\n\n\nconst char * ZEXPORT zlibVersion()\n{\n    return ZLIB_VERSION;\n}\n\nuLong ZEXPORT zlibCompileFlags()\n{\n    uLong flags;\n\n    flags = 0;\n    switch (sizeof(uInt)) {\n    case 2:     break;\n    case 4:     flags += 1;     break;\n    case 8:     flags += 2;     break;\n    default:    flags += 3;\n    }\n    switch (sizeof(uLong)) {\n    case 2:     break;\n    case 4:     flags += 1 << 2;        break;\n    case 8:     flags += 2 << 2;        break;\n    default:    flags += 3 << 2;\n    }\n    switch (sizeof(voidpf)) {\n    case 2:     break;\n    case 4:     flags += 1 << 4;        break;\n    case 8:     flags += 2 << 4;        break;\n    default:    flags += 3 << 4;\n    }\n    switch (sizeof(z_off_t)) {\n    case 2:     break;\n    case 4:     flags += 1 << 6;        break;\n    case 8:     flags += 2 << 6;        break;\n    default:    flags += 3 << 6;\n    }\n#ifdef DEBUG\n    flags += 1 << 8;\n#endif\n#if defined(ASMV) || defined(ASMINF)\n    flags += 1 << 9;\n#endif\n#ifdef ZLIB_WINAPI\n    flags += 1 << 10;\n#endif\n#ifdef BUILDFIXED\n    flags += 1 << 12;\n#endif\n#ifdef DYNAMIC_CRC_TABLE\n    flags += 1 << 13;\n#endif\n#ifdef NO_GZCOMPRESS\n    flags += 1 << 16;\n#endif\n#ifdef NO_GZIP\n    flags += 1 << 17;\n#endif\n#ifdef PKZIP_BUG_WORKAROUND\n    flags += 1 << 20;\n#endif\n#ifdef FASTEST\n    flags += 1 << 21;\n#endif\n#ifdef STDC\n#  ifdef NO_vsnprintf\n        flags += 1 << 25;\n#    ifdef HAS_vsprintf_void\n        flags += 1 << 26;\n#    endif\n#  else\n#    ifdef HAS_vsnprintf_void\n        flags += 1 << 26;\n#    endif\n#  endif\n#else\n        flags += 1 << 24;\n#  ifdef NO_snprintf\n        flags += 1 << 25;\n#    ifdef HAS_sprintf_void\n        flags += 1 << 26;\n#    endif\n#  else\n#    ifdef HAS_snprintf_void\n        flags += 1 << 26;\n#    endif\n#  endif\n#endif\n    return flags;\n}\n\n#ifdef DEBUG\n\n#  ifndef verbose\n#    define verbose 0\n#  endif\nint z_verbose = verbose;\n\nvoid z_error (m)\n    char *m;\n{\n    fprintf(stderr, \"%s\\n\", m);\n    exit(1);\n}\n#endif\n\n/* exported to allow conversion of error code to string for compress() and\n * uncompress()\n */\nconst char * ZEXPORT zError(err)\n    int err;\n{\n    return ERR_MSG(err);\n}\n\n#if defined(_WIN32_WCE)\n    /* does not exist on WCE */\n    int errno = 0;\n#endif\n\n#ifndef HAVE_MEMCPY\n\nvoid zmemcpy(dest, source, len)\n    Bytef* dest;\n    const Bytef* source;\n    uInt  len;\n{\n    if (len == 0) return;\n    do {\n        *dest++ = *source++; /* ??? to be unrolled */\n    } while (--len != 0);\n}\n\nint zmemcmp(s1, s2, len)\n    const Bytef* s1;\n    const Bytef* s2;\n    uInt  len;\n{\n    uInt j;\n\n    for (j = 0; j < len; j++) {\n        if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;\n    }\n    return 0;\n}\n\nvoid zmemzero(dest, len)\n    Bytef* dest;\n    uInt  len;\n{\n    if (len == 0) return;\n    do {\n        *dest++ = 0;  /* ??? to be unrolled */\n    } while (--len != 0);\n}\n#endif\n\n\n#ifdef SYS16BIT\n\n#ifdef __TURBOC__\n/* Turbo C in 16-bit mode */\n\n#  define MY_ZCALLOC\n\n/* Turbo C malloc() does not allow dynamic allocation of 64K bytes\n * and farmalloc(64K) returns a pointer with an offset of 8, so we\n * must fix the pointer. Warning: the pointer must be put back to its\n * original form in order to free it, use zcfree().\n */\n\n#define MAX_PTR 10\n/* 10*64K = 640K */\n\nlocal int next_ptr = 0;\n\ntypedef struct ptr_table_s {\n    voidpf org_ptr;\n    voidpf new_ptr;\n} ptr_table;\n\nlocal ptr_table table[MAX_PTR];\n/* This table is used to remember the original form of pointers\n * to large buffers (64K). Such pointers are normalized with a zero offset.\n * Since MSDOS is not a preemptive multitasking OS, this table is not\n * protected from concurrent access. This hack doesn't work anyway on\n * a protected system like OS/2. Use Microsoft C instead.\n */\n\nvoidpf zcalloc (voidpf opaque, unsigned items, unsigned size)\n{\n    voidpf buf = opaque; /* just to make some compilers happy */\n    ulg bsize = (ulg)items*size;\n\n    /* If we allocate less than 65520 bytes, we assume that farmalloc\n     * will return a usable pointer which doesn't have to be normalized.\n     */\n    if (bsize < 65520L) {\n        buf = farmalloc(bsize);\n        if (*(ush*)&buf != 0) return buf;\n    } else {\n        buf = farmalloc(bsize + 16L);\n    }\n    if (buf == NULL || next_ptr >= MAX_PTR) return NULL;\n    table[next_ptr].org_ptr = buf;\n\n    /* Normalize the pointer to seg:0 */\n    *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;\n    *(ush*)&buf = 0;\n    table[next_ptr++].new_ptr = buf;\n    return buf;\n}\n\nvoid  zcfree (voidpf opaque, voidpf ptr)\n{\n    int n;\n    if (*(ush*)&ptr != 0) { /* object < 64K */\n        farfree(ptr);\n        return;\n    }\n    /* Find the original pointer */\n    for (n = 0; n < next_ptr; n++) {\n        if (ptr != table[n].new_ptr) continue;\n\n        farfree(table[n].org_ptr);\n        while (++n < next_ptr) {\n            table[n-1] = table[n];\n        }\n        next_ptr--;\n        return;\n    }\n    ptr = opaque; /* just to make some compilers happy */\n    Assert(0, \"zcfree: ptr not found\");\n}\n\n#endif /* __TURBOC__ */\n\n\n#ifdef M_I86\n/* Microsoft C in 16-bit mode */\n\n#  define MY_ZCALLOC\n\n#if (!defined(_MSC_VER) || (_MSC_VER <= 600))\n#  define _halloc  halloc\n#  define _hfree   hfree\n#endif\n\nvoidpf zcalloc (voidpf opaque, unsigned items, unsigned size)\n{\n    if (opaque) opaque = 0; /* to make compiler happy */\n    return _halloc((long)items, size);\n}\n\nvoid  zcfree (voidpf opaque, voidpf ptr)\n{\n    if (opaque) opaque = 0; /* to make compiler happy */\n    _hfree(ptr);\n}\n\n#endif /* M_I86 */\n\n#endif /* SYS16BIT */\n\n\n#ifndef MY_ZCALLOC /* Any system without a special alloc function */\n\n#ifndef STDC\nextern voidp  malloc OF((uInt size));\nextern voidp  calloc OF((uInt items, uInt size));\nextern void   free   OF((voidpf ptr));\n#endif\n\nvoidpf zcalloc (opaque, items, size)\n    voidpf opaque;\n    unsigned items;\n    unsigned size;\n{\n    if (opaque) items += size - size; /* make compiler happy */\n    return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :\n                              (voidpf)calloc(items, size);\n}\n\nvoid  zcfree (opaque, ptr)\n    voidpf opaque;\n    voidpf ptr;\n{\n    free(ptr);\n    if (opaque) return; /* make compiler happy */\n}\n\n#endif /* MY_ZCALLOC */\n"
  },
  {
    "path": "Framework/3rdPartyLibs/zlib/zutil.h",
    "content": "/* zutil.h -- internal interface and configuration of the compression library\n * Copyright (C) 1995-2003 Jean-loup Gailly.\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* WARNING: this file should *not* be used by applications. It is\n   part of the implementation of the compression library and is\n   subject to change. Applications should only use zlib.h.\n */\n\n/* @(#) $Id$ */\n\n#ifndef ZUTIL_H\n#define ZUTIL_H\n\n#define ZLIB_INTERNAL\n#include \"zlib.h\"\n\n#ifdef STDC\n#  include <stddef.h>\n#  include <string.h>\n#  include <stdlib.h>\n#endif\n#ifdef NO_ERRNO_H\n    extern int errno;\n#else\n#   include <errno.h>\n#endif\n\n#ifndef local\n#  define local static\n#endif\n/* compile with -Dlocal if your debugger can't find static symbols */\n\ntypedef unsigned char  uch;\ntypedef uch FAR uchf;\ntypedef unsigned short ush;\ntypedef ush FAR ushf;\ntypedef unsigned long  ulg;\n\nextern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */\n/* (size given to avoid silly warnings with Visual C++) */\n\n#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]\n\n#define ERR_RETURN(strm,err) \\\n  return (strm->msg = (char*)ERR_MSG(err), (err))\n/* To be used only when the state is known to be valid */\n\n        /* common constants */\n\n#ifndef DEF_WBITS\n#  define DEF_WBITS MAX_WBITS\n#endif\n/* default windowBits for decompression. MAX_WBITS is for compression only */\n\n#if MAX_MEM_LEVEL >= 8\n#  define DEF_MEM_LEVEL 8\n#else\n#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL\n#endif\n/* default memLevel */\n\n#define STORED_BLOCK 0\n#define STATIC_TREES 1\n#define DYN_TREES    2\n/* The three kinds of block type */\n\n#define MIN_MATCH  3\n#define MAX_MATCH  258\n/* The minimum and maximum match lengths */\n\n#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */\n\n        /* target dependencies */\n\n#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))\n#  define OS_CODE  0x00\n#  if defined(__TURBOC__) || defined(__BORLANDC__)\n#    if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))\n       /* Allow compilation with ANSI keywords only enabled */\n       void _Cdecl farfree( void *block );\n       void *_Cdecl farmalloc( unsigned long nbytes );\n#    else\n#      include <alloc.h>\n#    endif\n#  else /* MSC or DJGPP */\n#    include <malloc.h>\n#  endif\n#endif\n\n#ifdef AMIGA\n#  define OS_CODE  0x01\n#endif\n\n#if defined(VAXC) || defined(VMS)\n#  define OS_CODE  0x02\n#  define F_OPEN(name, mode) \\\n     fopen((name), (mode), \"mbc=60\", \"ctx=stm\", \"rfm=fix\", \"mrs=512\")\n#endif\n\n#if defined(ATARI) || defined(atarist)\n#  define OS_CODE  0x05\n#endif\n\n#ifdef OS2\n#  define OS_CODE  0x06\n#endif\n\n#if defined(MACOS) || defined(TARGET_OS_MAC)\n#  define OS_CODE  0x07\n#  if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os\n#    include <unix.h> /* for fdopen */\n#  else\n#    ifndef fdopen\n#      define fdopen(fd,mode) NULL /* No fdopen() */\n#    endif\n#  endif\n#endif\n\n#ifdef TOPS20\n#  define OS_CODE  0x0a\n#endif\n\n#ifdef WIN32\n#  ifndef __CYGWIN__  /* Cygwin is Unix, not Win32 */\n#    define OS_CODE  0x0b\n#  endif\n#endif\n\n#ifdef __50SERIES /* Prime/PRIMOS */\n#  define OS_CODE  0x0f\n#endif\n\n#if defined(_BEOS_) || defined(RISCOS)\n#  define fdopen(fd,mode) NULL /* No fdopen() */\n#endif\n\n#if (defined(_MSC_VER) && (_MSC_VER > 600))\n#  if defined(_WIN32_WCE)\n#    define fdopen(fd,mode) NULL /* No fdopen() */\n#    ifndef _PTRDIFF_T_DEFINED\n       typedef int ptrdiff_t;\n#      define _PTRDIFF_T_DEFINED\n#    endif\n#  else\n#    define fdopen(fd,type)  _fdopen(fd,type)\n#  endif\n#endif\n\n        /* common defaults */\n\n#ifndef OS_CODE\n#  define OS_CODE  0x03  /* assume Unix */\n#endif\n\n#ifndef F_OPEN\n#  define F_OPEN(name, mode) fopen((name), (mode))\n#endif\n\n         /* functions */\n\n#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)\n#  ifndef HAVE_VSNPRINTF\n#    define HAVE_VSNPRINTF\n#  endif\n#endif\n#if defined(__CYGWIN__)\n#  ifndef HAVE_VSNPRINTF\n#    define HAVE_VSNPRINTF\n#  endif\n#endif\n#ifndef HAVE_VSNPRINTF\n#  ifdef MSDOS\n     /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),\n        but for now we just assume it doesn't. */\n#    define NO_vsnprintf\n#  endif\n#  ifdef __TURBOC__\n#    define NO_vsnprintf\n#  endif\n#  ifdef WIN32\n     /* In Win32, vsnprintf is available as the \"non-ANSI\" _vsnprintf. */\n#    if !defined(vsnprintf) && !defined(NO_vsnprintf)\n#      define vsnprintf _vsnprintf\n#    endif\n#  endif\n#  ifdef __SASC\n#    define NO_vsnprintf\n#  endif\n#endif\n\n#ifdef HAVE_STRERROR\n   extern char *strerror OF((int));\n#  define zstrerror(errnum) strerror(errnum)\n#else\n#  define zstrerror(errnum) \"\"\n#endif\n\n#if defined(pyr)\n#  define NO_MEMCPY\n#endif\n#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)\n /* Use our own functions for small and medium model with MSC <= 5.0.\n  * You may have to use the same strategy for Borland C (untested).\n  * The __SC__ check is for Symantec.\n  */\n#  define NO_MEMCPY\n#endif\n#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)\n#  define HAVE_MEMCPY\n#endif\n#ifdef HAVE_MEMCPY\n#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */\n#    define zmemcpy _fmemcpy\n#    define zmemcmp _fmemcmp\n#    define zmemzero(dest, len) _fmemset(dest, 0, len)\n#  else\n#    define zmemcpy memcpy\n#    define zmemcmp memcmp\n#    define zmemzero(dest, len) memset(dest, 0, len)\n#  endif\n#else\n   extern void zmemcpy  OF((Bytef* dest, const Bytef* source, uInt len));\n   extern int  zmemcmp  OF((const Bytef* s1, const Bytef* s2, uInt len));\n   extern void zmemzero OF((Bytef* dest, uInt len));\n#endif\n\n/* Diagnostic functions */\n#ifdef DEBUG\n#  include <stdio.h>\n   extern int z_verbose;\n   extern void z_error    OF((char *m));\n#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}\n#  define Trace(x) {if (z_verbose>=0) fprintf x ;}\n#  define Tracev(x) {if (z_verbose>0) fprintf x ;}\n#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}\n#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}\n#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}\n#else\n#  define Assert(cond,msg)\n#  define Trace(x)\n#  define Tracev(x)\n#  define Tracevv(x)\n#  define Tracec(c,x)\n#  define Tracecv(c,x)\n#endif\n\n\nvoidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));\nvoid   zcfree  OF((voidpf opaque, voidpf ptr));\n\n#define ZALLOC(strm, items, size) \\\n           (*((strm)->zalloc))((strm)->opaque, (items), (size))\n#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))\n#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}\n\n#endif /* ZUTIL_H */\n"
  },
  {
    "path": "Framework/Assets/Scripts/Component.js",
    "content": "o2.Component = class Component\n{\n    _actor = {}\n}"
  },
  {
    "path": "Framework/Assets/Scripts/Math.js",
    "content": "class Vec2\n{\n\tconstructor(x = 0, y = 0)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}\n\n\tAdd(other)\n\t{\n\t\tlet res = new Vec2(this.x, this.y);\n\t\tres.x += other.x;\n\t\tres.y += other.y;\n\t\treturn res;\n\t}\n\n\tSub(other)\n\t{\n\t\tlet res = new Vec2(this.x, this.y);\n\t\tres.x -= other.x;\n\t\tres.y -= other.y;\n\t\treturn res;\n\t}\n\n\tMul(other)\n\t{\n\t\tlet res = new Vec2(this.x, this.y);\n\t\tres.x *= other.x;\n\t\tres.y *= other.y;\n\t\treturn res;\n\t}\n\n\tDiv(other)\n\t{\n\t\tlet res = new Vec2(this.x, this.y);\n\t\tres.x /= other.x;\n\t\tres.y /= other.y;\n\t\treturn res;\n\t}\n\n\tDot(other)\n\t{\n\t\treturn this.x*other.x + this.y*other.y;\n\t}\n\n\tCross(other)\n\t{\n\t\treturn this.x*other.x - this.y*other.y;\n\t}\n\n\tSqrLength()\n\t{\n\t\treturn this.x*this.x + this.y*this.y;\n\t}\n\n\tLength()\n\t{\n\t\treturn Math.sqrt(this.x*this.x + this.y*this.y);\n\t}\n}\n\nclass Rect\n{\n\tconstructor(left = 0, bottom = 0, right = 0, top = 0) \n\t{\n\t\tthis.left = left; \n\t\tthis.bottom = bottom;\n\t\tthis.right = right;\n\t\tthis.top = top;\n\t}\n\n\tWidth()\n\t{\n\t\treturn Math.abs(this.right - this.left);\n\t}\n\n\tHeight()\n\t{\n\t\treturn Math.abs(this.bottom - this.top);\n\t}\n\n\tSize()\n\t{\n\t\treturn new Vec2(this.Width(), this.Height());\n\t}\n\n\tCenter()\n\t{\n\t\treturn new Vec2((this.left + this.right)/2, (this.bottom + this.top)/2);\n\t}\n\n\tIsInside(vec)\n\t{\n\t\treturn vec.x > this.left && vec.x < this.right && vec.y > this.bottom && vec.y < this.top;\n\t}\n\n\tIsIntersects(other)\n\t{\n\t\treturn !(this.right < other.left || this.left > other.right || this.bottom > other.top || this.top < other.bottom);\n\t}\n\n\tLeftTop()\n\t{\n\t\treturn new Vec2(this.left, this.top);\n\t}\n\n\tLeftBottom()\n\t{\n\t\treturn new Vec2(this.left, this.bottom);\n\t}\n\n\tRightTop()\n\t{\n\t\treturn new Vec2(this.right, this.top);\n\t}\n\n\tRightBottom()\n\t{\n\t\treturn new Vec2(this.right, this.bottom);\n\t}\n}\n\nclass Border\n{\n\tconstructor(left = 0, bottom = 0, right = 0, top = 0) \n\t{\n\t\tthis.left = left; \n\t\tthis.bottom = bottom;\n\t\tthis.right = right;\n\t\tthis.top = top;\n\t}\n\n\tLeftTop()\n\t{\n\t\treturn new Vec2(this.left, this.top);\n\t}\n\n\tLeftBottom()\n\t{\n\t\treturn new Vec2(this.left, this.bottom);\n\t}\n\n\tRightTop()\n\t{\n\t\treturn new Vec2(this.right, this.top);\n\t}\n\n\tRightBottom()\n\t{\n\t\treturn new Vec2(this.right, this.bottom);\n\t}\n}\n\nclass Color4\n{\n\tconstructor(r = 255, g = 255, b = 255, a = 255) \n\t{\n\t\tthis.r = r; \n\t\tthis.g = g;\n\t\tthis.b = b;\n\t\tthis.a = a;\n\t}\n\n\tstatic Red() { return new Color4(255, 0, 0, 255); }\n\tstatic Green() { return new Color4(0, 255, 0, 255); }\n\tstatic Blue() { return new Color4(0, 0, 255, 255); }\n\tstatic White() { return new Color4(255, 255, 255, 255); }\n\tstatic Black() { return new Color4(0, 0, 0, 255); }\n}\n\nMath.randomBetween = function(a, b)\n{\n\treturn a + Math.random()*(b - a);\n}"
  },
  {
    "path": "Framework/Assets/Scripts/o2.js",
    "content": "o2 = {}"
  },
  {
    "path": "Framework/Assets/Shaders/Default.fsh",
    "content": "varying vec4 v_color;\nvarying vec2 v_texCoords;\n\nuniform sampler2D u_texture;\n\nvoid main()\n{\n    gl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n}\n"
  },
  {
    "path": "Framework/Assets/Shaders/Default.fsh.metal",
    "content": "fragment float4 fragmentShader(O2RasterizerData input [[stage_in]],\n                               texture2d<float> u_texture [[texture(0)]])\n{\n    constexpr sampler textureSampler(mag_filter::linear, min_filter::linear);\n    return input.color * u_texture.sample(textureSampler, input.texCoords);\n}"
  },
  {
    "path": "Framework/Assets/Shaders/Default.vsh",
    "content": "uniform mat4 u_transformMatrix;\n\nattribute vec4 a_position;\nattribute vec4 a_color;\nattribute vec2 a_texCoords;\n\nvarying vec4 v_color;\nvarying vec2 v_texCoords;\n\nvoid main()\n{\n    v_color = a_color;\n    v_texCoords = a_texCoords;\n    gl_Position = u_transformMatrix * a_position;\n}\n"
  },
  {
    "path": "Framework/Assets/Shaders/Default.vsh.metal",
    "content": "vertex O2RasterizerData vertexShader(uint vertexID [[vertex_id]],\n                                     constant O2VertexIn* vertices [[buffer(0)]],\n                                     constant O2Uniforms& uniforms [[buffer(1)]])\n{\n    O2VertexIn inputVertex = vertices[vertexID];\n\n    O2RasterizerData output;\n    output.position = uniforms.mvpMatrix * float4(inputVertex.x, inputVertex.y, inputVertex.z, 1.0);\n    output.color = o2_unpackColor(inputVertex.color);\n    output.texCoords = inputVertex.texCoord0;\n    output.texCoords2 = inputVertex.texCoord1;\n    output.texCoords3 = inputVertex.texCoord2;\n    output.normal = inputVertex.normal;\n    return output;\n}"
  },
  {
    "path": "Framework/Platforms/.lldbinit",
    "content": "# LLDB initialization file for o2 Framework\n# Auto-loads o2 type formatters\n\n# Import o2 formatters  \ncommand script import o2_lldb_formatters.py\n\n# Basic LLDB settings\nsettings set target.x86-disassembly-flavor intel\nsettings set frame-format \"frame #${frame.index}: ${frame.pc}{ ${module.file.basename}{:${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${line.file.basename}:${line.number}}{${function.is-optimized} [opt]}\\n\""
  },
  {
    "path": "Framework/Platforms/Windows/Framework.natvis",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<AutoVisualizer xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\n\t\t<Type Name=\"o2::UID\">\n\t\t\t\t<DisplayString>{((((int)data[0] &amp; 0xFF)) + (((int)data[1] &amp; 0xFF) &lt;&lt; 8) + (((int)data[2] &amp; 0xFF) &lt;&lt; 16) + (((int)data[3] &amp; 0xFF) &lt;&lt; 24)),X} - {((((int)data[4] &amp; 0xFF)) + (((int)data[5] &amp; 0xFF) &lt;&lt; 8) + (((int)data[6] &amp; 0xFF) &lt;&lt; 16) + (((int)data[7] &amp; 0xFF) &lt;&lt; 24)),X} - {((((int)data[8] &amp; 0xFF)) + (((int)data[9] &amp; 0xFF) &lt;&lt; 8) + (((int)data[10] &amp; 0xFF) &lt;&lt; 16) + (((int)data[11] &amp; 0xFF) &lt;&lt; 24)),X} - {((((int)data[12] &amp; 0xFF)) + (((int)data[13] &amp; 0xFF) &lt;&lt; 8) + (((int)data[14] &amp; 0xFF) &lt;&lt; 16) + (((int)data[15] &amp; 0xFF) &lt;&lt; 24)),X}</DisplayString>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Vec2&lt;*&gt;\">\n\t\t\t\t<DisplayString>{{ { x } { y } }}</DisplayString>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Rect&lt;*&gt;\">\n\t\t\t\t<DisplayString>{{ (L { left } B { bottom })-(R { right } T { top }) }}</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"left\" ExcludeView=\"simple\">left</Item>\n\t\t\t\t\t\t<Item Name=\"bottom\" ExcludeView=\"simple\">bottom</Item>\n\t\t\t\t\t\t<Item Name=\"right\" ExcludeView=\"simple\">right</Item>\n\t\t\t\t\t\t<Item Name=\"top\" ExcludeView=\"simple\">top</Item>\n\t\t\t\t\t\t<Item Name=\"width\" ExcludeView=\"simple\">right - left</Item>\n\t\t\t\t\t\t<Item Name=\"height\" ExcludeView=\"simple\">top - bottom</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Vertex\">\n\t\t\t\t<DisplayString>{{ x: { x } y: { y } z: { z } c: { color } u: { tu } v: { tv }}</DisplayString>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Color4\">\n\t\t\t\t<DisplayString>{{ { r } { g } { b } { a }}</DisplayString>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Mesh\">\n\t\t\t\t<DisplayString>{{ vertx = { vertexCount }/{ mMaxVertexCount } poly = { polyCount }/{ mMaxPolyCount } tex = { mTexture.mTexture } }}</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"texture\" ExcludeView=\"simple\">mTexture.mTexture</Item>\n\n\t\t\t\t\t\t<Synthetic Name=\"verticies\">\n\t\t\t\t\t\t\t\t<DisplayString>{ vertexCount }/{ mMaxVertexCount }</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>vertexCount</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>vertices</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"indexes\">\n\t\t\t\t\t\t\t\t<DisplayString>{ polyCount }/{ mMaxPolyCount }</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>polyCount*3</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>indexes</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::KeyValuePair&lt;*&gt;\">\n\t\t\t\t<DisplayString>{{ { mKey } { mValue } }}</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"key\" ExcludeView=\"simple\">mKey</Item>\n\t\t\t\t\t\t<Item Name=\"value\" ExcludeView=\"simple\">mValue</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Type\">\n\t\t\t\t<DisplayString>{{ { mName } }}</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"name\" ExcludeView=\"simple\">mName</Item>\n\t\t\t\t\t\t<Item Name=\"id\" ExcludeView=\"simple\">mId</Item>\n\t\t\t\t\t\t<Item Name=\"base types\" ExcludeView=\"simple\">mBaseTypes</Item>\n\t\t\t\t\t\t<Item Name=\"fields\" ExcludeView=\"simple\">mFields</Item>\n\t\t\t\t\t\t<Item Name=\"functions\" ExcludeView=\"simple\">mFunctions</Item>\n\t\t\t\t\t\t<Item Name=\"pointer\" ExcludeView=\"simple\">mPtrType</Item>\n\t\t\t\t\t\t<Item Name=\"size\" ExcludeView=\"simple\">mSize</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Dictionary&lt;*&gt;\">\n\t\t\t\t<DisplayString>{{ size={ mPairs._Mypair._Myval2._Mylast - mPairs._Mypair._Myval2._Myfirst } }}</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"size\" ExcludeView=\"simple\">mPairs._Mypair._Myval2._Mylast - mPairs._Mypair._Myval2._Myfirst</Item>\n\t\t\t\t\t\t<Item Name=\"capacity\" ExcludeView=\"simple\">mPairs._Mypair._Myval2._Myend - mPairs._Mypair._Myval2._Myfirst</Item>\n\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t<Size>mPairs._Mypair._Myval2._Mylast - mPairs._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t<ValuePointer>mPairs._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::FieldInfo&lt;*&gt;\">\n\t\t\t\t<DisplayString>{{ name={ mName } value={ mFieldRef } }}</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"name\">mName</Item>\n\t\t\t\t\t\t<Item Name=\"value\">mFieldRef</Item>\n\t\t\t\t\t\t<Item Name=\"owner\">mOwner</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::DataMember\">\n\t\t\t\t<DisplayString>{{{ name }:{ value } }}</DisplayString>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Ref&lt;*&gt;\">\n\t\t\t\t<DisplayString>{ mPtr }</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<ExpandedItem>mPtr</ExpandedItem>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::WeakRef&lt;*&gt;\">\n\t\t\t\t<DisplayString Condition=\"(mPtr != 0)\">{ mPtr }</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mPtr == 0)\">empty</DisplayString>\n\t\t\t\t\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<ExpandedItem Condition=\"(mPtr != 0)\">mPtr</ExpandedItem>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::DataValue\">\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Null) == o2::DataValue::Flags::Null\">null</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::BoolTrue) == o2::DataValue::Flags::BoolTrue\">true</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::BoolFalse) == o2::DataValue::Flags::BoolFalse\">false</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::ShortString) == o2::DataValue::Flags::ShortString\">{(const char*)mData.shortStringData.stringValue,na}</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::StringRef) == o2::DataValue::Flags::StringRef\">{(const char*)mData.stringPtrData.stringPtr,na}</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::StringCopy) == o2::DataValue::Flags::StringCopy\">{(const char*)mData.stringPtrData.stringPtr,na}</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Int) == o2::DataValue::Flags::Int\">{mData.intData.intValue}</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::UInt) == o2::DataValue::Flags::UInt\">{mData.intData.uintValue}</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Int64) == o2::DataValue::Flags::Int64\">{mData.int64Data.intValue}</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::UInt64) == o2::DataValue::Flags::UInt64\">{mData.int64Data.uintValue}</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Double) == o2::DataValue::Flags::Double\">{mData.doubleData.value}</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Object) == o2::DataValue::Flags::Object\">Object members={mData.objectData.count}</DisplayString>\n\t\t\t\t<DisplayString Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Array) == o2::DataValue::Flags::Array\">Array elements={mData.arrayData.count}</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Object) == o2::DataValue::Flags::Object\" Name=\"[size]\">mData.objectData.count</Item>\n\t\t\t\t\t\t<Item Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Object) == o2::DataValue::Flags::Object\" Name=\"[capacity]\">mData.objectData.capacity</Item>\n\t\t\t\t\t\t<ArrayItems Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Object) == o2::DataValue::Flags::Object\">\n\t\t\t\t\t\t\t\t<Size>mData.objectData.count</Size>\n\t\t\t\t\t\t\t\t<ValuePointer>mData.objectData.members</ValuePointer>\n\t\t\t\t\t\t</ArrayItems>\n\n\t\t\t\t\t\t<Item Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Array) == o2::DataValue::Flags::Array\" Name=\"[size]\">mData.arrayData.count</Item>\n\t\t\t\t\t\t<Item Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Array) == o2::DataValue::Flags::Array\" Name=\"[capacity]\">mData.arrayData.capacity</Item>\n\t\t\t\t\t\t<ArrayItems Condition=\"(mData.flagsData.flags &amp; o2::DataValue::Flags::Array) == o2::DataValue::Flags::Array\">\n\t\t\t\t\t\t\t\t<Size>mData.arrayData.count</Size>\n\t\t\t\t\t\t\t\t<ValuePointer>mData.arrayData.elements</ValuePointer>\n\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Widget\">\n\t\t\t\t<DisplayString>Widget \"{ mName }\" ({ (int)layout->mData->worldRectangle.left }, { (int)layout->mData->worldRectangle.bottom }, { (int)layout->mData->worldRectangle.right }, { (int)layout->mData->worldRectangle.top })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"id\" ExcludeView=\"simple\">mId</Item>\n\t\t\t\t\t\t<Item Name=\"name\" ExcludeView=\"simple\">mName</Item>\n\t\t\t\t\t\t<Item Name=\"layout\" ExcludeView=\"simple\">layout</Item>\n\t\t\t\t\t\t<Item Name=\"enabled\" ExcludeView=\"simple\">mEnabled</Item>\n\t\t\t\t\t\t<Item Name=\"layer\" ExcludeView=\"simple\">Actor::mLayerName</Item>\n\t\t\t\t\t\t<Item Name=\"layer ptr\" ExcludeView=\"simple\">Actor::mLayer</Item>\n\t\t\t\t\t\t<Item Name=\"tags\" ExcludeView=\"simple\">tags</Item>\n\t\t\t\t\t\t<Item Name=\"alpha\" ExcludeView=\"simple\">mTransparency</Item>\n\t\t\t\t\t\t<Item Name=\"clipped\" ExcludeView=\"simple\">mIsClipped</Item>\n\t\t\t\t\t\t<Item Name=\"children rect\" ExcludeView=\"simple\">layout->mData->childrenWorldRect</Item>\n\t\t\t\t\t\t<Item Name=\"state\" ExcludeView=\"simple\">Actor::mState</Item>\n\n\t\t\t\t\t\t<Synthetic Name=\"prototype\">\n\t\t\t\t\t\t\t\t<DisplayString>({ mPrototype })</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ExpandedItem>mPrototype</ExpandedItem>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"prototype link\">\n\t\t\t\t\t\t\t\t<DisplayString>({ mPrototypeLink.mActor })</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ExpandedItem>mPrototypeLink.mActor</ExpandedItem>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"components\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mComponents._Mypair._Myval2._Mylast - mComponents._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mComponents._Mypair._Myval2._Mylast - mComponents._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mComponents._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Item Name=\"parent\" ExcludeView=\"simple\">mParent</Item>\n\t\t\t\t\t\t<Synthetic Name=\"children\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mChildren._Mypair._Myval2._Mylast - mChildren._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mChildren._Mypair._Myval2._Mylast - mChildren._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mChildren._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"internal children\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mInternalWidgets._Mypair._Myval2._Mylast - mInternalWidgets._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mInternalWidgets._Mypair._Myval2._Mylast - mInternalWidgets._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mInternalWidgets._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"layers\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mLayers._Mypair._Myval2._Mylast - mLayers._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mLayers._Mypair._Myval2._Mylast - mLayers._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mLayers._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"states\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mStates._Mypair._Myval2._Mylast - mStates._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mStates._Mypair._Myval2._Mylast - mStates._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mStates._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Item Name=\"locked\" ExcludeView=\"simple\">mLocked</Item>\n\t\t\t\t\t\t<Item Name=\"enabled in hierarchy\" ExcludeView=\"simple\">mResEnabledInHierarchy</Item>\n\t\t\t\t\t\t<Item Name=\"res enabled\" ExcludeView=\"simple\">mResEnabled</Item>\n\t\t\t\t\t\t<Item Name=\"res alpha\" ExcludeView=\"simple\">mResTransparency</Item>\n\t\t\t\t\t\t<Item Name=\"override depth\" ExcludeView=\"simple\">mOverrideDepth</Item>\n\t\t\t\t\t\t<Item Name=\"is asset\" ExcludeView=\"simple\">mIsAsset</Item>\n\t\t\t\t\t\t<Item Name=\"asset id\" ExcludeView=\"simple\">mAssetId</Item>\n\n\t\t\t\t\t\t<Synthetic Name=\"draw layers\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mDrawingLayers._Mypair._Myval2._Mylast - mDrawingLayers._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mDrawingLayers._Mypair._Myval2._Mylast - mDrawingLayers._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mDrawingLayers._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"top draw layers\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mTopDrawingLayers._Mypair._Myval2._Mylast - mTopDrawingLayers._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mTopDrawingLayers._Mypair._Myval2._Mylast - mTopDrawingLayers._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mTopDrawingLayers._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"draw children\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mDrawingChildren._Mypair._Myval2._Mylast - mDrawingChildren._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mDrawingChildren._Mypair._Myval2._Mylast - mDrawingChildren._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mDrawingChildren._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Actor\">\n\t\t\t\t<DisplayString>Actor \"{ mName }\":{ mId }</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"name\" ExcludeView=\"simple\">mName</Item>\n\t\t\t\t\t\t<Item Name=\"id\" ExcludeView=\"simple\">mId</Item>\n\t\t\t\t\t\t<Item Name=\"enabled\" ExcludeView=\"simple\">mEnabled</Item>\n\n\t\t\t\t\t\t<Synthetic Name=\"prototype\">\n\t\t\t\t\t\t\t\t<DisplayString>({ mPrototype })</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ExpandedItem>mPrototype</ExpandedItem>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"prototype link\">\n\t\t\t\t\t\t\t\t<DisplayString>({ mPrototypeLink.mActor })</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ExpandedItem>mPrototypeLink.mActor</ExpandedItem>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"transform\">\n\t\t\t\t\t\t\t\t<DisplayString>(positon={ transform->mData->position }, size={ transform->mData->size }, scale={ transform->mData->scale }, pivot={ transform->mData->pivot }, angle={ transform->mData->angle })</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ExpandedItem>transform->mData</ExpandedItem>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Synthetic Name=\"components\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mComponents._Mypair._Myval2._Mylast - mComponents._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mComponents._Mypair._Myval2._Mylast - mComponents._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mComponents._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Item Name=\"parent\" ExcludeView=\"simple\">mParent</Item>\n\n\t\t\t\t\t\t<Synthetic Name=\"children\">\n\t\t\t\t\t\t\t\t<DisplayString>count={mChildren._Mypair._Myval2._Mylast - mChildren._Mypair._Myval2._Myfirst}</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>mChildren._Mypair._Myval2._Mylast - mChildren._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mChildren._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Item Name=\"locked\" ExcludeView=\"simple\">mLocked</Item>\n\t\t\t\t\t\t<Item Name=\"layer\" ExcludeView=\"simple\">mLayerName</Item>\n\t\t\t\t\t\t<Item Name=\"layer ptr\" ExcludeView=\"simple\">mLayer</Item>\n\t\t\t\t\t\t<Item Name=\"tags\" ExcludeView=\"simple\">tags</Item>\n\t\t\t\t\t\t<Item Name=\"state\" ExcludeView=\"simple\">mState</Item>\n\t\t\t\t\t\t<Item Name=\"is asset\" ExcludeView=\"simple\">mIsAsset</Item>\n\t\t\t\t\t\t<Item Name=\"asset id\" ExcludeView=\"simple\">mAssetId</Item>\n\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::ImageComponent\">\n\t\t\t\t<DisplayString>(ImageComponent ID:{ mId })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"id\" ExcludeView=\"simple\">mId</Item>\n\t\t\t\t\t\t<Item Name=\"owner\" ExcludeView=\"simple\">mOwner</Item>\n\t\t\t\t\t\t<Item Name=\"enabled\" ExcludeView=\"simple\">mEnabled</Item>\n\t\t\t\t\t\t<Item Name=\"sprite\" ExcludeView=\"simple\">mSprite</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::WidgetLayout\">\n\t\t\t\t<DisplayString>Widget layout ({ (int)mData->worldRectangle.left }, { (int)mData->worldRectangle.bottom }, { (int)mData->worldRectangle.right }, { (int)mData->worldRectangle.top })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"pivot\" ExcludeView=\"simple\">mData->pivot</Item>\n\t\t\t\t\t\t<Item Name=\"anchor min\" ExcludeView=\"simple\">mData->anchorMin</Item>\n\t\t\t\t\t\t<Item Name=\"anchor max\" ExcludeView=\"simple\">mData->anchorMax</Item>\n\t\t\t\t\t\t<Item Name=\"offset min\" ExcludeView=\"simple\">mData->offsetMin</Item>\n\t\t\t\t\t\t<Item Name=\"offset max\" ExcludeView=\"simple\">mData->offsetMax</Item>\n\t\t\t\t\t\t<Item Name=\"min size\" ExcludeView=\"simple\">mData->minSize</Item>\n\t\t\t\t\t\t<Item Name=\"max size\" ExcludeView=\"simple\">mData->maxSize</Item>\n\t\t\t\t\t\t<Item Name=\"weight\" ExcludeView=\"simple\">mData->weight</Item>\n\t\t\t\t\t\t<Item Name=\"driven by parent\" ExcludeView=\"simple\">mData->drivenByParent</Item>\n\t\t\t\t\t\t<Item Name=\"position\" ExcludeView=\"simple\">mData->position</Item>\n\t\t\t\t\t\t<Item Name=\"pivot\" ExcludeView=\"simple\">mData->pivot</Item>\n\t\t\t\t\t\t<Item Name=\"size\" ExcludeView=\"simple\">mData->size</Item>\n\t\t\t\t\t\t<Item Name=\"scale\" ExcludeView=\"simple\">mData->scale</Item>\n\t\t\t\t\t\t<Item Name=\"angle\" ExcludeView=\"simple\">mData->angle</Item>\n\t\t\t\t\t\t<Item Name=\"shear\" ExcludeView=\"simple\">mData->shear</Item>\n\t\t\t\t\t\t<Item Name=\"rectangle\" ExcludeView=\"simple\">mData->rectangle</Item>\n\t\t\t\t\t\t<Item Name=\"parent rectangle\" ExcludeView=\"simple\">mData->parentRectangle</Item>\n\t\t\t\t\t\t<Item Name=\"parent rectange position\" ExcludeView=\"simple\">mData->parentRectangePosition</Item>\n\t\t\t\t\t\t<Item Name=\"world rectangle\" ExcludeView=\"simple\">mData->worldRectangle</Item>\n\t\t\t\t\t\t<Item Name=\"transform\" ExcludeView=\"simple\">mData->transform</Item>\n\t\t\t\t\t\t<Item Name=\"non sized transform\" ExcludeView=\"simple\">mData->nonSizedTransform</Item>\n\t\t\t\t\t\t<Item Name=\"world non sized transform\" ExcludeView=\"simple\">mData->worldNonSizedTransform</Item>\n\t\t\t\t\t\t<Item Name=\"world transform\" ExcludeView=\"simple\">mData->worldTransform</Item>\n\t\t\t\t\t\t<Item Name=\"parent inverted transform\" ExcludeView=\"simple\">mData->parentInvertedTransform</Item>\n\t\t\t\t\t\t<Item Name=\"parent transform\" ExcludeView=\"simple\">mData->parentTransform</Item>\n\t\t\t\t\t\t<Item Name=\"parent inv transform actual frame\" ExcludeView=\"simple\">mData->parentInvTransformActualFrame</Item>\n\t\t\t\t\t\t<Item Name=\"owner\" ExcludeView=\"simple\">mData->owner</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::WidgetLayerLayout\">\n\t\t\t\t<DisplayString>({ mAnchorMin }, { mAnchorMax }, { mOffsetMin }, { mOffsetMax })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"anchor min\" ExcludeView=\"simple\">mAnchorMin</Item>\n\t\t\t\t\t\t<Item Name=\"anchor max\" ExcludeView=\"simple\">mAnchorMax</Item>\n\t\t\t\t\t\t<Item Name=\"offset min\" ExcludeView=\"simple\">mOffsetMin</Item>\n\t\t\t\t\t\t<Item Name=\"offset max\" ExcludeView=\"simple\">mOffsetMax</Item>\n\t\t\t\t\t\t<Item Name=\"owner\" ExcludeView=\"simple\">mWidgetLayer</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::WidgetLayer\">\n\t\t\t\t<DisplayString>Widget Layer \"{ name }\" ({ (int)mAbsolutePosition.left }, { (int)mAbsolutePosition.bottom }, { (int)mAbsolutePosition.right }, { (int)mAbsolutePosition.top })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"layout\" ExcludeView=\"simple\">layout</Item>\n\t\t\t\t\t\t<Item Name=\"name\" ExcludeView=\"simple\">name</Item>\n\t\t\t\t\t\t<Item Name=\"drawable\" ExcludeView=\"simple\">mDrawable</Item>\n\t\t\t\t\t\t<Item Name=\"prototype link\" ExcludeView=\"simple\">mPrototypeLink</Item>\n\t\t\t\t\t\t<Item Name=\"transparency\" ExcludeView=\"simple\">mTransparency</Item>\n\t\t\t\t\t\t<Item Name=\"absolute rect\" ExcludeView=\"simple\">mAbsolutePosition</Item>\n\t\t\t\t\t\t<Item Name=\"owner\" ExcludeView=\"simple\">mOwnerWidget</Item>\n\t\t\t\t\t\t<Item Name=\"parent\" ExcludeView=\"simple\">mParent</Item>\n\t\t\t\t\t\t<Item Name=\"children\" ExcludeView=\"simple\">mChildren</Item>\n\t\t\t\t\t\t<Item Name=\"interactable layout\" ExcludeView=\"simple\">interactableLayout</Item>\n\t\t\t\t\t\t<Item Name=\"res transparency\" ExcludeView=\"simple\">mResTransparency</Item>\n\t\t\t\t\t\t<Item Name=\"depth\" ExcludeView=\"simple\">mDepth</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Transform\">\n\t\t\t\t<DisplayString>(positon={ mPosition }, size={ mSize }, scale={ mScale }, pivot={ mPivot }, angle={ mAngle })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"position\" ExcludeView=\"simple\">mPosition</Item>\n\t\t\t\t\t\t<Item Name=\"pivot\" ExcludeView=\"simple\">mPivot</Item>\n\t\t\t\t\t\t<Item Name=\"size\" ExcludeView=\"simple\">mSize</Item>\n\t\t\t\t\t\t<Item Name=\"scale\" ExcludeView=\"simple\">mScale</Item>\n\t\t\t\t\t\t<Item Name=\"angle\" ExcludeView=\"simple\">mAngle</Item>\n\t\t\t\t\t\t<Item Name=\"shear\" ExcludeView=\"simple\">mShear</Item>\n\t\t\t\t\t\t<Item Name=\"transform\" ExcludeView=\"simple\">mTransform</Item>\n\t\t\t\t\t\t<Item Name=\"non sized transform\" ExcludeView=\"simple\">mNonSizedTransform</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::TimeStamp\">\n\t\t\t\t<DisplayString>({ mHour }:{ mMinute}:{ mSecond } { mDay }.{ mMonth }.{ mYear })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"year\" ExcludeView=\"simple\">mYear</Item>\n\t\t\t\t\t\t<Item Name=\"month\" ExcludeView=\"simple\">mMonth</Item>\n\t\t\t\t\t\t<Item Name=\"day\" ExcludeView=\"simple\">mDay</Item>\n\t\t\t\t\t\t<Item Name=\"hout\" ExcludeView=\"simple\">mHour</Item>\n\t\t\t\t\t\t<Item Name=\"minute\" ExcludeView=\"simple\">mMinute</Item>\n\t\t\t\t\t\t<Item Name=\"secont\" ExcludeView=\"simple\">mSecond</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Curve\">\n\t\t\t\t<DisplayString>(keys count={ mKeys._Mypair._Myval2._Mylast - mKeys._Mypair._Myval2._Myfirst })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t<Size>mKeys._Mypair._Myval2._Mylast - mKeys._Mypair._Myval2._Myfirst</Size>\n\t\t\t\t\t\t\t\t<ValuePointer>mKeys._Mypair._Myval2._Myfirst</ValuePointer>\n\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Curve::Key\">\n\t\t\t\t<DisplayString>({ position }:{ value })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"value\" ExcludeView=\"simple\">value</Item>\n\t\t\t\t\t\t<Item Name=\"position\" ExcludeView=\"simple\">position</Item>\n\t\t\t\t\t\t<Item Name=\"leftCoef\" ExcludeView=\"simple\">leftCoef</Item>\n\t\t\t\t\t\t<Item Name=\"leftCoefPosition\" ExcludeView=\"simple\">leftCoefPosition</Item>\n\t\t\t\t\t\t<Item Name=\"rightCoef\" ExcludeView=\"simple\">rightCoef</Item>\n\t\t\t\t\t\t<Item Name=\"rightCoefPosition\" ExcludeView=\"simple\">rightCoefPosition</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::Sprite\">\n\t\t\t\t<DisplayString>(positon={ mPosition }, size={ mSize }, scale={ mScale }, pivot={ mPivot }, angle={ mAngle })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"image\" ExcludeView=\"simple\">mImageAsset.mAssetPtr->mPath</Item>\n\t\t\t\t\t\t<Item Name=\"enabled\" ExcludeView=\"simple\">mEnabled</Item>\n\t\t\t\t\t\t<Item Name=\"position\" ExcludeView=\"simple\">mPosition</Item>\n\t\t\t\t\t\t<Item Name=\"pivot\" ExcludeView=\"simple\">mPivot</Item>\n\t\t\t\t\t\t<Item Name=\"size\" ExcludeView=\"simple\">mSize</Item>\n\t\t\t\t\t\t<Item Name=\"scale\" ExcludeView=\"simple\">mScale</Item>\n\t\t\t\t\t\t<Item Name=\"angle\" ExcludeView=\"simple\">mAngle</Item>\n\t\t\t\t\t\t<Item Name=\"shear\" ExcludeView=\"simple\">mShear</Item>\n\t\t\t\t\t\t<Item Name=\"alpha\" ExcludeView=\"simple\">mColor.a</Item>\n\t\t\t\t\t\t<Item Name=\"color\" ExcludeView=\"simple\">mColor</Item>\n\t\t\t\t\t\t<Item Name=\"texture src\" ExcludeView=\"simple\">mTextureSrcRect</Item>\n\t\t\t\t\t\t<Item Name=\"mode\" ExcludeView=\"simple\">mMode</Item>\n\t\t\t\t\t\t<Item Name=\"slices\" ExcludeView=\"simple\">mSlices</Item>\n\t\t\t\t\t\t<Item Name=\"fill\" ExcludeView=\"simple\">mFill</Item>\n\t\t\t\t\t\t<Item Name=\"asset\" ExcludeView=\"simple\">mImageAsset</Item>\n\t\t\t\t\t\t<Item Name=\"mesh\" ExcludeView=\"simple\">mMesh</Item>\n\n\t\t\t\t\t\t<Synthetic Name=\"corners' colors\">\n\t\t\t\t\t\t\t\t<DisplayString>LT { mCornersColors[0] }; RT { mCornersColors[1] }; RB { mCornersColors[2] }; LB { mCornersColors[3] }</DisplayString>\n\t\t\t\t\t\t\t\t<Expand>\n\t\t\t\t\t\t\t\t\t\t<ArrayItems>\n\t\t\t\t\t\t\t\t\t\t\t\t<Size>4</Size>\n\t\t\t\t\t\t\t\t\t\t\t\t<ValuePointer>mCornersColors</ValuePointer>\n\t\t\t\t\t\t\t\t\t\t</ArrayItems>\n\t\t\t\t\t\t\t\t</Expand>\n\t\t\t\t\t\t</Synthetic>\n\n\t\t\t\t\t\t<Item Name=\"transform\" ExcludeView=\"simple\">mTransform</Item>\n\t\t\t\t\t\t<Item Name=\"no size transform\" ExcludeView=\"simple\">mNonSizedTransform</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n\t\t<Type Name=\"o2::AssetInfo\">\n\t\t\t\t<DisplayString>({ path })</DisplayString>\n\t\t\t\t<Expand>\n\t\t\t\t\t\t<Item Name=\"tree\" ExcludeView=\"simple\">tree</Item>\n\t\t\t\t\t\t<Item Name=\"path\" ExcludeView=\"simple\">path</Item>\n\t\t\t\t\t\t<Item Name=\"id\" ExcludeView=\"simple\">meta->mId</Item>\n\t\t\t\t\t\t<Item Name=\"editTime\" ExcludeView=\"simple\">editTime</Item>\n\t\t\t\t\t\t<Item Name=\"meta\" ExcludeView=\"simple\">meta</Item>\n\t\t\t\t\t\t<Item Name=\"parent\" ExcludeView=\"simple\">parent</Item>\n\t\t\t\t\t\t<Item Name=\"children\" ExcludeView=\"simple\">mChildren</Item>\n\t\t\t\t\t\t<Item Name=\"ownChildren\" ExcludeView=\"simple\">mOwnChildren</Item>\n\t\t\t\t</Expand>\n\t\t</Type>\n\n</AutoVisualizer>"
  },
  {
    "path": "Framework/Platforms/o2_lldb_formatters.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nLLDB Formatters for o2 Framework Types  \nBased on Framework.natvis\n\"\"\"\n\nimport lldb\nimport struct\nimport traceback\n\ndef __lldb_init_module(debugger, internal_dict):\n    \"\"\"Called when module is imported by LLDB\"\"\"\n    \n    # UID formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.uid_summary \"o2::UID\"')\n    \n    # Vec2 formatter  \n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.vec2_summary -x \"^o2::Vec2<.+>$\"')\n    \n    # Rect formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.rect_summary -x \"^o2::Rect<.+>$\"')\n    \n    # Color4 formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.color4_summary \"o2::Color4\"')\n    \n    # Vertex formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.vertex_summary \"o2::Vertex\"')\n    \n    # Ref formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.ref_summary -x \"^o2::Ref<.+>$\"')\n    \n    # WeakRef formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.weakref_summary -x \"^o2::WeakRef<.+>$\"')\n    \n    # Transform formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.transform_summary \"o2::Transform\"')\n    \n    # TimeStamp formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.timestamp_summary \"o2::TimeStamp\"')\n    \n    # Widget formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.widget_summary \"o2::Widget\"')\n    \n    # Actor formatter \n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.actor_summary \"o2::Actor\"')\n    \n    # Sprite formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.sprite_summary \"o2::Sprite\"')\n    \n    # DataValue formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.datavalue_summary \"o2::DataValue\"')\n    debugger.HandleCommand('type synthetic add -l o2_lldb_formatters.DataValueSyntheticProvider \"o2::DataValue\"')\n    \n    # DataMember formatter\n    debugger.HandleCommand('type summary add -F o2_lldb_formatters.datamember_summary \"o2::DataMember\"')\n    \n    print(\"o2 Framework LLDB formatters loaded\")\n\n\ndef get_child_value(valobj, name):\n    \"\"\"Helper to safely get child value\"\"\"\n    try:\n        child = valobj.GetChildMemberWithName(name)\n        if child.IsValid():\n            return child.GetValue()\n        return \"?\"\n    except:\n        return \"?\"\n\n\ndef get_child_int(valobj, name):\n    \"\"\"Helper to safely get child integer value\"\"\"\n    try:\n        child = valobj.GetChildMemberWithName(name)\n        if child.IsValid():\n            return child.GetValueAsSigned()\n        return 0\n    except:\n        return 0\n\n\ndef uid_summary(valobj, internal_dict):\n    \"\"\"Format o2::UID\"\"\"\n    try:\n        data = valobj.GetChildMemberWithName(\"data\")\n        if not data.IsValid():\n            return \"UID(?)\"\n            \n        # Extract 4 32-bit values from 16 bytes\n        bytes_data = []\n        for i in range(16):\n            byte_val = data.GetChildAtIndex(i).GetValueAsUnsigned() & 0xFF\n            bytes_data.append(byte_val)\n        \n        part1 = bytes_data[0] | (bytes_data[1] << 8) | (bytes_data[2] << 16) | (bytes_data[3] << 24)\n        part2 = bytes_data[4] | (bytes_data[5] << 8) | (bytes_data[6] << 16) | (bytes_data[7] << 24)\n        part3 = bytes_data[8] | (bytes_data[9] << 8) | (bytes_data[10] << 16) | (bytes_data[11] << 24)\n        part4 = bytes_data[12] | (bytes_data[13] << 8) | (bytes_data[14] << 16) | (bytes_data[15] << 24)\n        \n        return f\"{part1:X} - {part2:X} - {part3:X} - {part4:X}\"\n    except:\n        return \"UID(?)\"\n\n\ndef vec2_summary(valobj, internal_dict):\n    \"\"\"Format o2::Vec2<T>\"\"\"\n    x = get_child_value(valobj, \"x\")\n    y = get_child_value(valobj, \"y\")\n    return f\"{{ {x} {y} }}\"\n\n\ndef rect_summary(valobj, internal_dict):\n    \"\"\"Format o2::Rect<T>\"\"\"\n    left = get_child_value(valobj, \"left\")\n    bottom = get_child_value(valobj, \"bottom\")\n    right = get_child_value(valobj, \"right\")\n    top = get_child_value(valobj, \"top\")\n    return f\"{{ (L {left} B {bottom})-(R {right} T {top}) }}\"\n\n\ndef color4_summary(valobj, internal_dict):\n    \"\"\"Format o2::Color4\"\"\"\n    r = get_child_value(valobj, \"r\")\n    g = get_child_value(valobj, \"g\")\n    b = get_child_value(valobj, \"b\")\n    a = get_child_value(valobj, \"a\")\n    return f\"{{ {r} {g} {b} {a} }}\"\n\n\ndef vertex_summary(valobj, internal_dict):\n    \"\"\"Format o2::Vertex\"\"\"\n    x = get_child_value(valobj, \"x\")\n    y = get_child_value(valobj, \"y\")\n    z = get_child_value(valobj, \"z\")\n    color = get_child_value(valobj, \"color\")\n    tu = get_child_value(valobj, \"tu\")\n    tv = get_child_value(valobj, \"tv\")\n    return f\"{{ x: {x} y: {y} z: {z} c: {color} u: {tu} v: {tv} }}\"\n\n\ndef ref_summary(valobj, internal_dict):\n    \"\"\"Format o2::Ref<T>\"\"\"\n    ptr = get_child_value(valobj, \"mPtr\")\n    return f\"{ptr}\"\n\n\ndef weakref_summary(valobj, internal_dict):\n    \"\"\"Format o2::WeakRef<T>\"\"\"\n    ptr_val = get_child_int(valobj, \"mPtr\")\n    if ptr_val == 0:\n        return \"empty\"\n    else:\n        ptr = get_child_value(valobj, \"mPtr\")\n        return f\"{ptr}\"\n\n\ndef transform_summary(valobj, internal_dict):\n    \"\"\"Format o2::Transform\"\"\"\n    pos = valobj.GetChildMemberWithName(\"mPosition\")\n    size = valobj.GetChildMemberWithName(\"mSize\")\n    scale = valobj.GetChildMemberWithName(\"mScale\")\n    pivot = valobj.GetChildMemberWithName(\"mPivot\")\n    angle = get_child_value(valobj, \"mAngle\")\n    \n    pos_str = vec2_summary(pos, {}) if pos.IsValid() else \"?\"\n    size_str = vec2_summary(size, {}) if size.IsValid() else \"?\"\n    scale_str = vec2_summary(scale, {}) if scale.IsValid() else \"?\"\n    pivot_str = vec2_summary(pivot, {}) if pivot.IsValid() else \"?\"\n    \n    return f\"(position={pos_str}, size={size_str}, scale={scale_str}, pivot={pivot_str}, angle={angle})\"\n\n\ndef timestamp_summary(valobj, internal_dict):\n    \"\"\"Format o2::TimeStamp\"\"\"\n    hour = get_child_value(valobj, \"mHour\")\n    minute = get_child_value(valobj, \"mMinute\")\n    second = get_child_value(valobj, \"mSecond\")\n    day = get_child_value(valobj, \"mDay\")\n    month = get_child_value(valobj, \"mMonth\")\n    year = get_child_value(valobj, \"mYear\")\n    return f\"({hour}:{minute}:{second} {day}.{month}.{year})\"\n\n\ndef widget_summary(valobj, internal_dict):\n    \"\"\"Format o2::Widget\"\"\"\n    name = get_child_value(valobj, \"mName\")\n    try:\n        layout = valobj.GetChildMemberWithName(\"layout\")\n        if layout.IsValid():\n            data = layout.GetChildMemberWithName(\"mData\")\n            if data.IsValid():\n                rect = data.GetChildMemberWithName(\"worldRectangle\")\n                if rect.IsValid():\n                    left = int(float(get_child_value(rect, \"left\")))\n                    bottom = int(float(get_child_value(rect, \"bottom\")))\n                    right = int(float(get_child_value(rect, \"right\")))\n                    top = int(float(get_child_value(rect, \"top\")))\n                    return f'Widget \"{name}\" ({left}, {bottom}, {right}, {top})'\n    except:\n        pass\n    return f'Widget \"{name}\"'\n\n\ndef actor_summary(valobj, internal_dict):\n    \"\"\"Format o2::Actor\"\"\"\n    name = get_child_value(valobj, \"mName\")\n    id_val = get_child_value(valobj, \"mId\")\n    return f'Actor \"{name}\":{id_val}'\n\n\ndef sprite_summary(valobj, internal_dict):\n    \"\"\"Format o2::Sprite\"\"\"\n    pos = valobj.GetChildMemberWithName(\"mPosition\")\n    size = valobj.GetChildMemberWithName(\"mSize\")\n    scale = valobj.GetChildMemberWithName(\"mScale\")\n    pivot = valobj.GetChildMemberWithName(\"mPivot\")\n    angle = get_child_value(valobj, \"mAngle\")\n    \n    pos_str = vec2_summary(pos, {}) if pos.IsValid() else \"?\"\n    size_str = vec2_summary(size, {}) if size.IsValid() else \"?\"\n    scale_str = vec2_summary(scale, {}) if scale.IsValid() else \"?\"\n    pivot_str = vec2_summary(pivot, {}) if pivot.IsValid() else \"?\"\n    \n    return f\"(position={pos_str}, size={size_str}, scale={scale_str}, pivot={pivot_str}, angle={angle})\"\n\n\ndef datamember_summary(valobj, internal_dict):\n    \"\"\"Format o2::DataMember\"\"\"\n    try:\n        target = valobj.GetTarget()\n        datavalue_type = target.FindFirstType(\"o2::DataValue\")\n        if not datavalue_type.IsValid():\n            return \"DataMember(? no type)\"\n        \n        datavalue_size = datavalue_type.GetByteSize()\n        \n        data_addr = valobj.GetLoadAddress()\n        if data_addr == lldb.LLDB_INVALID_ADDRESS:\n            addr = valobj.GetAddress()\n            if addr.IsValid():\n                data_addr = addr.GetLoadAddress(target)\n        \n        if data_addr == lldb.LLDB_INVALID_ADDRESS:\n            return \"DataMember(? no addr)\"\n        \n        name = valobj.CreateValueFromAddress(\"name\", data_addr, datavalue_type)\n        value = valobj.CreateValueFromAddress(\"value\", data_addr + datavalue_size, datavalue_type)\n        \n        if name.IsValid() and value.IsValid():\n            name_str = datavalue_summary(name, {})\n            value_str = datavalue_summary(value, {})\n            return f\"{{ {name_str} : {value_str} }}\"\n        \n        return \"DataMember(? invalid)\"\n    except Exception as e:\n        return f\"DataMember(? {str(e)[:30]})\"\n\n\ndef datavalue_summary(valobj, internal_dict):\n    \"\"\"Format o2::DataValue\"\"\"\n    debug = False\n    log = []\n    \n    try:\n        error = lldb.SBError()\n        process = valobj.GetProcess()\n        \n        data_addr = valobj.GetLoadAddress()\n        if data_addr == lldb.LLDB_INVALID_ADDRESS:\n            addr = valobj.GetAddress()\n            if addr.IsValid():\n                data_addr = addr.GetLoadAddress(valobj.GetTarget())\n        \n        if data_addr == lldb.LLDB_INVALID_ADDRESS:\n            return \"? (no addr)\"\n        \n        if debug:\n            log.append(f\"data_addr={hex(data_addr)}\")\n        \n        flags_offset = 16\n        flags_addr = data_addr + flags_offset\n        flags_data = process.ReadUnsignedFromMemory(flags_addr, 4, error)\n        \n        if not error.Success():\n            return f\"? (flags read error: {error.GetCString()})\"\n        \n        flags = flags_data\n        \n        if debug:\n            log.append(f\"flags={hex(flags)}\")\n        \n        if flags == 0:\n            return \"? (flags=0)\"\n        \n        Null = 1 << 10\n        BoolTrue = 1 << 11\n        BoolFalse = 1 << 12\n        ShortString = 1 << 13\n        StringRef = 1 << 14\n        StringCopy = 1 << 15\n        Int = 1 << 1\n        UInt = 1 << 2\n        Int64 = 1 << 3\n        UInt64 = 1 << 4\n        Double = 1 << 5\n        Object = 1 << 8\n        Array = 1 << 9\n        \n        if flags & Null:\n            return \"null\"\n        \n        if flags & BoolTrue:\n            return \"true\"\n        \n        if flags & BoolFalse:\n            return \"false\"\n        \n        if flags & ShortString:\n            result = process.ReadCStringFromMemory(data_addr, 15, error)\n            if error.Success() and result:\n                return f'\"{result}\"'\n            return f'? (ShortString error: {error.GetCString() if not error.Success() else \"empty\"})'\n        \n        if flags & (StringRef | StringCopy):\n            ptr_val = process.ReadPointerFromMemory(data_addr, error)\n            if not error.Success():\n                return f'? (StringPtr read error: {error.GetCString()})'\n            if ptr_val == 0:\n                return '? (StringPtr null)'\n            result = process.ReadCStringFromMemory(ptr_val, 256, error)\n            if error.Success() and result:\n                return f'\"{result}\"'\n            return f'? (String read error: {error.GetCString() if not error.Success() else \"empty\"})'\n        \n        if flags & Int:\n            int_val = process.ReadSignedFromMemory(data_addr, 4, error)\n            if error.Success():\n                return str(int_val)\n            return f\"? (Int error: {error.GetCString()})\"\n        \n        if flags & UInt:\n            uint_val = process.ReadUnsignedFromMemory(data_addr, 4, error)\n            if error.Success():\n                return str(uint_val)\n            return f\"? (UInt error: {error.GetCString()})\"\n        \n        if flags & Int64:\n            int64_val = process.ReadSignedFromMemory(data_addr, 8, error)\n            if error.Success():\n                return str(int64_val)\n            return f\"? (Int64 error: {error.GetCString()})\"\n        \n        if flags & UInt64:\n            uint64_val = process.ReadUnsignedFromMemory(data_addr, 8, error)\n            if error.Success():\n                return str(uint64_val)\n            return f\"? (UInt64 error: {error.GetCString()})\"\n        \n        if flags & Double:\n            data = process.ReadMemory(data_addr, 8, error)\n            if error.Success():\n                double_val = struct.unpack('d', data)[0]\n                return str(double_val)\n            return f\"? (Double error: {error.GetCString()})\"\n        \n        if flags & Object:\n            count = process.ReadUnsignedFromMemory(data_addr + 8, 4, error)\n            if error.Success():\n                return f\"Object members={count}\"\n            return f\"Object members=? (error: {error.GetCString()})\"\n        \n        if flags & Array:\n            count = process.ReadUnsignedFromMemory(data_addr + 8, 4, error)\n            if error.Success():\n                return f\"Array elements={count}\"\n            return f\"Array elements=? (error: {error.GetCString()})\"\n        \n        return f\"? (no matching flags: {hex(flags)})\"\n    except Exception as e:\n        tb = traceback.format_exc()\n        return f\"? (exception: {str(e)[:50]})\"\n\n\nclass DataValueSyntheticProvider:\n    \"\"\"Synthetic children provider for o2::DataValue\"\"\"\n    \n    def __init__(self, valobj, internal_dict):\n        self.valobj = valobj\n        self.update()\n    \n    def update(self):\n        \"\"\"Called when the variable changes\"\"\"\n        try:\n            error = lldb.SBError()\n            process = self.valobj.GetProcess()\n            \n            data_addr = self.valobj.GetLoadAddress()\n            if data_addr == lldb.LLDB_INVALID_ADDRESS:\n                addr = self.valobj.GetAddress()\n                if addr.IsValid():\n                    data_addr = addr.GetLoadAddress(self.valobj.GetTarget())\n            \n            if data_addr == lldb.LLDB_INVALID_ADDRESS:\n                self.count = 0\n                self.is_object = False\n                self.is_array = False\n                return\n            \n            flags_offset = 16\n            flags_addr = data_addr + flags_offset\n            flags = process.ReadUnsignedFromMemory(flags_addr, 4, error)\n            \n            if not error.Success():\n                self.count = 0\n                self.is_object = False\n                self.is_array = False\n                return\n            \n            Object = 1 << 8\n            Array = 1 << 9\n            \n            self.is_object = bool(flags & Object)\n            self.is_array = bool(flags & Array)\n            \n            if self.is_object:\n                ptr_addr = process.ReadPointerFromMemory(data_addr, error)\n                if error.Success() and ptr_addr != 0:\n                    self.count = process.ReadUnsignedFromMemory(data_addr + 8, 4, error)\n                    if error.Success():\n                        self.members_addr = ptr_addr\n                    else:\n                        self.count = 0\n                else:\n                    self.count = 0\n            elif self.is_array:\n                ptr_addr = process.ReadPointerFromMemory(data_addr, error)\n                if error.Success() and ptr_addr != 0:\n                    self.count = process.ReadUnsignedFromMemory(data_addr + 8, 4, error)\n                    if error.Success():\n                        self.elements_addr = ptr_addr\n                    else:\n                        self.count = 0\n                else:\n                    self.count = 0\n            else:\n                self.count = 0\n        except:\n            self.count = 0\n            self.is_object = False\n            self.is_array = False\n    \n    def num_children(self):\n        \"\"\"Return number of children\"\"\"\n        return self.count\n    \n    def has_children(self):\n        \"\"\"Return whether this value has children\"\"\"\n        return self.count > 0\n    \n    def get_child_index(self, name):\n        \"\"\"Return index of child with given name\"\"\"\n        try:\n            if name.startswith('[') and name.endswith(']'):\n                return int(name[1:-1])\n        except:\n            pass\n        return -1\n    \n    def get_child_at_index(self, index):\n        \"\"\"Return child at given index\"\"\"\n        if index < 0 or index >= self.count:\n            return None\n        \n        try:\n            target = self.valobj.GetTarget()\n            \n            if self.is_object:\n                if not hasattr(self, 'members_addr') or self.members_addr == 0:\n                    return None\n                \n                member_type = target.FindFirstType(\"o2::DataMember\")\n                if not member_type.IsValid():\n                    return None\n                \n                member_size = member_type.GetByteSize()\n                offset = index * member_size\n                member_addr = self.members_addr + offset\n                \n                return self.valobj.CreateValueFromAddress(f'[{index}]', member_addr, member_type)\n            \n            elif self.is_array:\n                if not hasattr(self, 'elements_addr') or self.elements_addr == 0:\n                    return None\n                \n                element_type = target.FindFirstType(\"o2::DataValue\")\n                if not element_type.IsValid():\n                    return None\n                \n                element_size = element_type.GetByteSize()\n                offset = index * element_size\n                element_addr = self.elements_addr + offset\n                \n                return self.valobj.CreateValueFromAddress(f'[{index}]', element_addr, element_type)\n        except:\n            pass\n        \n        return None"
  },
  {
    "path": "Framework/Sources/o2/Animation/Animate.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Animate.h\"\n\nnamespace o2\n{\n\n    Animate::Animate(IObject& object):\n        mTarget(&object)\n    {}\n\n    Animate::operator Ref<AnimationClip>() const\n    {\n        return mAnimation;\n    }\n\n    Animate& Animate::Wait(float seconds)\n    {\n        mTime += seconds;\n\n        for (auto& container : mKeyContainers)\n            container->Apply(mTime);\n\n        return *this;\n    }\n\n    Animate& Animate::For(float seconds)\n    {\n        mTime += seconds;\n        ApplyKeys();\n\n        return *this;\n    }\n\n    void Animate::ApplyKeys()\n    {\n        for (auto& container : mKeyContainers)\n            container->Apply(mTime);\n\n        mKeysApplied = true;\n    }\n\n    Animate& Animate::Then()\n    {\n        if (!mKeysApplied)\n            ApplyKeys();\n\n        return *this;\n    }\n\n    Animate& Animate::Move(float x, float y)\n    {\n        CheckPositionAnimatedValue();\n        CheckAppliedKeys();\n\n        auto container = mmake<KeyContainer<Vec2F>>();\n        container->animatedValue = mPositionAnimatedValue;\n        container->animatedValue->spline->AppendKey(Vec2F(x, y));\n        mKeyContainers.Add(container);\n\n        return *this;\n    }\n\n    Animate& Animate::Move(const Vec2F& point)\n    {\n        CheckPositionAnimatedValue();\n        CheckAppliedKeys();\n\n        auto container = mmake<KeyContainer<Vec2F>>();\n        container->animatedValue = mPositionAnimatedValue;\n        container->animatedValue->spline->AppendKey(point);\n        container->timeKey.position = mTime;\n        mKeyContainers.Add(container);\n\n        return *this;\n    }\n\n    Animate& Animate::Move(const Vector<Vec2F>& points)\n    {\n        return *this;\n    }\n\n    Animate& Animate::Alpha(float alpha)\n    {\n        CheckColorAnimatedValue();\n        CheckAppliedKeys();\n\n        auto container = mmake<KeyContainer<Color4>>();\n        container->animatedValue = mColorAnimatedValue;\n        container->key.value = Color4(1.0f, 1.0f, 1.0f, alpha);\n        mKeyContainers.Add(container);\n\n        return *this;\n    }\n\n    Animate& Animate::Show()\n    {\n        return Alpha(1.0f);\n    }\n\n    Animate& Animate::Hide()\n    {\n        return Alpha(0.0f);\n    }\n\n    Animate& Animate::Color(const Color4& color)\n    {\n        CheckColorAnimatedValue();\n        CheckAppliedKeys();\n\n        auto container = mmake<KeyContainer<Color4>>();\n        container->animatedValue = mColorAnimatedValue;\n        container->key.value = color;\n        mKeyContainers.Add(container);\n\n        return *this;\n    }\n\n    Animate& Animate::Color(int r, int g, int b, int a)\n    {\n        return Color(Color4(r, g, b, a));\n    }\n\n    Animate& Animate::Scale(float scale)\n    {\n        return Scale(Vec2F(scale, scale));\n    }\n\n    Animate& Animate::Scale(const Vec2F& scale)\n    {\n        CheckScaleAnimatedValue();\n        CheckAppliedKeys();\n\n        auto container = mmake<ScaleKeyContainer>();\n        container->animatedValueX = mScaleXAnimatedValue;\n        container->animatedValueY = mScaleYAnimatedValue;\n        container->keyX.value = scale.x;\n        container->keyY.value = scale.y;\n        mKeyContainers.Add(container);\n\n        return *this;\n    }\n\n    Animate& Animate::Rotate(float angle)\n    {\n        CheckRotateAnimatedValue();\n        CheckAppliedKeys();\n\n        auto container = mmake<KeyContainer<float>>();\n        container->animatedValue = mRotationAnimatedValue;\n        container->key.value = angle;\n        mKeyContainers.Add(container);\n\n        return *this;\n    }\n\n    Animate& Animate::Looped()\n    {\n        mAnimation->SetLoop(Loop::Repeat);\n        return *this;\n    }\n\n    Animate& Animate::PingPong()\n    {\n        mAnimation->SetLoop(Loop::PingPong);\n        return *this;\n    }\n\n    void Animate::CheckColorAnimatedValue()\n    {\n        if (mColorAnimatedValue)\n            return;\n\n        static Vector<String> nameVariants ={ \"color\", \"mColor\", \"m_color\", \"_color\" };\n\n        auto& targetObjType = dynamic_cast<const ObjectType&>(mTarget->GetType());\n        void* target = targetObjType.DynamicCastFromIObject(mTarget);\n        for (auto& nameVariant : nameVariants)\n        {\n            const FieldInfo* fi;\n            if (targetObjType.GetFieldPtr(target, nameVariant, fi))\n            {\n                mColorAnimatedValue = mAnimation->AddTrack<Color4>(nameVariant);\n                return;\n            }\n        }\n    }\n\n    void Animate::CheckPositionAnimatedValue()\n    {\n        if (mPositionAnimatedValue)\n            return;\n\n        static Vector<String> nameVariants ={ \"position\", \"mPosition\", \"m_position\", \"_position\", \"pos\" };\n\n        auto& targetObjType = dynamic_cast<const ObjectType&>(mTarget->GetType());\n        void* target = targetObjType.DynamicCastFromIObject(mTarget);\n        for (auto& nameVariant : nameVariants)\n        {\n            const FieldInfo* fi;\n            if (targetObjType.GetFieldPtr(target, nameVariant, fi))\n            {\n                mPositionAnimatedValue = mAnimation->AddTrack<Vec2F>(nameVariant);\n                return;\n            }\n        }\n    }\n\n    void Animate::CheckScaleAnimatedValue()\n    {\n        if (mScaleXAnimatedValue)\n            return;\n\n        static Vector<String> nameVariantsX = { \"scaleX\", \"mScaleX\", \"m_scaleX\", \"_scaleX\" };\n        static Vector<String> nameVariantsY = { \"scaleY\", \"mScaleY\", \"m_scaleY\", \"_scaleY\" };\n\n        auto& targetObjType = dynamic_cast<const ObjectType&>(mTarget->GetType());\n        void* target = targetObjType.DynamicCastFromIObject(mTarget);\n        for (auto& nameVariant : nameVariantsX)\n        {\n            const FieldInfo* fi;\n            if (targetObjType.GetFieldPtr(target, nameVariant, fi))\n            {\n                mScaleXAnimatedValue = mAnimation->AddTrack<float>(nameVariant);\n                break;\n            }\n        }\n\n        for (auto& nameVariant : nameVariantsY)\n        {\n            const FieldInfo* fi;\n            if (targetObjType.GetFieldPtr(target, nameVariant, fi))\n            {\n                mScaleYAnimatedValue = mAnimation->AddTrack<float>(nameVariant);\n                break;\n            }\n        }\n    }\n\n    void Animate::CheckRotateAnimatedValue()\n    {\n        if (mRotationAnimatedValue)\n            return;\n\n        static Vector<String> nameVariants ={ \"angle\", \"mAngle\", \"mRotation\", \"m_angle\", \"m_rotation\", \"rotation\", \"rot\" };\n        \n        auto& targetObjType = dynamic_cast<const ObjectType&>(mTarget->GetType());\n        void* target = targetObjType.DynamicCastFromIObject(mTarget);\n        for (auto& nameVariant : nameVariants)\n        {\n            const FieldInfo* fi;\n            if (targetObjType.GetFieldPtr(target, nameVariant, fi))\n            {\n                mRotationAnimatedValue = mAnimation->AddTrack<float>(nameVariant);\n                return;\n            }\n        }\n    }\n\n    void Animate::CheckAppliedKeys()\n    {\n        if (!mKeysApplied)\n            return;\n\n        mKeyContainers.Clear();\n        mFunction.Clear();\n\n        mKeysApplied = false;\n    }\n\n    void KeyContainer<Vec2F>::Apply(float time)\n    {\n        timeKey.value = 0.0f;\n        animatedValue->timeCurve->InsertKey(timeKey);\n\n        timeKey.position = time;\n        timeKey.value = 1.0f;\n        animatedValue->timeCurve->InsertKey(timeKey);\n    }\n\n    void ScaleKeyContainer::Apply(float time)\n    {\n        keyX.position = time;\n        keyX.supportsType = Curve::Key::Type::Free;\n        animatedValueX->AddKey(keyX);\n\n        keyY.position = time;\n        keyY.supportsType = Curve::Key::Type::Free;\n        animatedValueY->AddKey(keyY);\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Animate.h",
    "content": "#pragma once\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n#include \"o2/Animation/Tracks/AnimationVec2FTrack.h\"\n#include \"o2/Animation/Tracks/AnimationColor4Track.h\"\n\nnamespace o2\n{\n    // -----------------------\n    // Key container interface\n    // -----------------------\n    struct IKeyContainer: public RefCounterable\n    {\n        // Virtual destructor\n        virtual ~IKeyContainer() {}\n\n        // Applies stored key to animation\n        virtual void Apply(float time) = 0;\n    };\n\n    // ----------------------\n    // Template key container\n    // ----------------------\n    template <typename T>\n    struct KeyContainer : public IKeyContainer\n    {\n        typename AnimationTrack<T>::Key key;\n\n        Ref<AnimationTrack<T>> animatedValue;\n\n    public:\n        void Apply(float time);\n    };\n\n    // ---------------\n    // Vec2F container\n    // ---------------\n    template <>\n    struct KeyContainer<Vec2F> : public IKeyContainer\n    {\n        Curve::Key timeKey;\n\n        Ref<AnimationTrack<Vec2F>> animatedValue;\n\n    public:\n        void Apply(float time);\n    };\n\n    // -------------------\n    // Scale key container\n    // -------------------\n    struct ScaleKeyContainer : public IKeyContainer\n    {\n        AnimationTrack<float>::Key keyX;\n        AnimationTrack<float>::Key keyY;\n\n        Ref<AnimationTrack<float>> animatedValueX;\n        Ref<AnimationTrack<float>> animatedValueY;\n\n    public:\n        void Apply(float time);\n    };\n\n    // --------------------------------------------\n    // Class for building a simple animation sequence\n    // --------------------------------------------\n    class Animate\n    {\n    public:\n        // Constructor. Takes an object as a parameter\n        explicit Animate(IObject& object);\n\n        // Animation cast operator. Needed to store as an animation\n        operator Ref<AnimationClip>() const;\n\n        // Inserts a delay for seconds\n        Animate& Wait(float seconds);\n\n        // Applies stored transformations after seconds\n        Animate& For(float seconds);\n\n        // Splits the sequence\n        Animate& Then();\n\n        // Moves the object to (x,y)\n        Animate& Move(float x, float y);\n\n        // Moves the object into position\n        Animate& Move(const Vec2F& point);\n\n        // Moves the object along a path from points\n        Animate& Move(const Vector<Vec2F>& points);\n\n        // Changes alpha\n        Animate& Alpha(float alpha);\n\n        // Shows the object\n        Animate& Show();\n\n        // Hides the object\n        Animate& Hide();\n\n        // Sets color\n        Animate& Color(const Color4& color);\n\n        // Sets color\n        Animate& Color(int r, int g, int b, int a);\n\n        // Sets scale\n        Animate& Scale(float scale);\n\n        // Sets scale\n        Animate& Scale(const Vec2F& scale);\n\n        // Rotates the object\n        Animate& Rotate(float angle);\n\n        // Sets the animation to loop\n        Animate& Looped();\n\n        // Sets ping-pong loop\n        Animate& PingPong();\n\n        // Changes specified parameter\n        template<typename T>\n        Animate& Change(T* target, const T& value);\n\n    protected:\n        IObject* mTarget = nullptr; // Target object being animated\n\n        Ref<AnimationClip> mAnimation = mmake<AnimationClip>(); // Animation being built\n\n        bool  mKeysApplied = false; // Whether stored keys were applied\n        float mTime = 0.0f;         // Current sequence time\n\n        Vector<Ref<IKeyContainer>> mKeyContainers; // Stored keys that are applied in For()\n\n        Function<void()> mFunction; // Stored callback that is applied in For()\n\n        Ref<AnimationTrack<Color4>> mColorAnimatedValue;   // Color Animation track, stored when needed\n        Ref<AnimationTrack<Vec2F>> mPositionAnimatedValue; // Position Animation track, stored when needed\n        Ref<AnimationTrack<float>> mScaleXAnimatedValue;   // Scale X Animation track, stored when needed\n        Ref<AnimationTrack<float>> mScaleYAnimatedValue;   // Scale Y Animation track, stored when needed\n        Ref<AnimationTrack<float>> mRotationAnimatedValue; // Rotation Animation track, stored when needed\n\n    protected:\n        // Checks color Animation track: creates them if needed\n        void CheckColorAnimatedValue();\n\n        // Checks position Animation track: creates them if needed\n        void CheckPositionAnimatedValue();\n\n        // Checks scale Animation track: creates them if needed\n        void CheckScaleAnimatedValue();\n\n        // Checks rotation Animation track: creates it if needed\n        void CheckRotateAnimatedValue();\n\n        // Checks applied keys: if keys were applied, clears key containers\n        void CheckAppliedKeys();\n\n        // Applies keys and function to the animation at the current time\n        void ApplyKeys();\n    };\n\n    template<typename T>\n    Animate& Animate::Change(T* target, const T& value)\n    {\n        CheckAppliedKeys();\n\n        auto container = mmake<KeyContainer<T>>();\n        container->animatedValue = GetAnimatedValue(target);\n        container->key.value = value;\n        mKeyContainers.Add(container);\n\n        return *this;\n    }\n\n    template <typename T>\n    void KeyContainer<T>::Apply(float time)\n    {\n        key.position = time;\n        animatedValue->AddKey(key);\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationClip.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationClip.h\"\n\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n#include \"o2/Scene/Components/AnimationComponent.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    AnimationClip::AnimationClip(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {}\n\n    AnimationClip::AnimationClip(RefCounter* refCounter, const AnimationClip& other):\n        RefCounterable(refCounter)\n    {\n        for (auto& track : other.mTracks)\n        {\n            Ref<IAnimationTrack> newTrack = track->CloneAsRef<IAnimationTrack>();\n            mTracks.Add(newTrack);\n            OnTrackAdded(newTrack);\n        }\n\n        mLoop = other.mLoop;\n\n        RecalculateDuration();\n    }\n\n    AnimationClip::~AnimationClip()\n    {\n        Clear();\n    }\n\n    AnimationClip& AnimationClip::operator=(const AnimationClip& other)\n    {\n        Clear();\n\n        for (auto& track : other.mTracks)\n        {\n            Ref<IAnimationTrack> newTrack = track->CloneAsRef<IAnimationTrack>();\n            mTracks.Add(newTrack);\n            OnTrackAdded(newTrack);\n        }\n\n        mLoop = other.mLoop;\n\n        RecalculateDuration();\n\n        return *this;\n    }\n\n    void AnimationClip::Clear()\n    {\n        for (auto& track : mTracks)\n            track->onKeysChanged -= THIS_FUNC(OnTrackChanged);\n\n        mTracks.Clear();\n    }\n\n    float AnimationClip::GetDuration() const\n    {\n        return mDuration;\n    }\n\n    void AnimationClip::SetLoop(Loop loop)\n    {\n        mLoop = loop;\n    }\n\n    Loop AnimationClip::GetLoop() const\n    {\n        return mLoop;\n    }\n\n    Vector<Ref<IAnimationTrack>>& AnimationClip::GetTracks()\n    {\n        return mTracks;\n    }\n\n    const Vector<Ref<IAnimationTrack>>& AnimationClip::GetTracks() const\n    {\n        return mTracks;\n    }\n\n    bool AnimationClip::ContainsTrack(const String& path) const\n    {\n        for (auto& track : mTracks)\n        {\n            if (track->path == path)\n                return true;\n        }\n\n        return false;\n    }\n\n\tRef<IAnimationTrack> AnimationClip::GetTrack(const String& path)\n\t{\n        for (auto& track : mTracks)\n        {\n            if (track->path == path)\n                return track;\n\t\t}\n\n\t\treturn nullptr;\n\t}\n\n\tRef<IAnimationTrack> AnimationClip::AddTrack(const String& path, const Type& type)\n    {\n        const Type* animType = nullptr;\n\n        if (type.IsBasedOn(TypeOf(IAnimation)))\n            animType = &TypeOf(AnimationSubTrack);\n        else\n        {\n            auto animTypeName = \"o2::AnimationTrack<\" + type.GetName() + \">\";\n            animType = dynamic_cast<const ObjectType*>(o2Reflection.GetType(animTypeName));\n        }\n\n        if (!animType)\n        {\n            o2Debug.LogWarning(\"Can't create Animation track: can't find animation type \" + type.GetName());\n            return nullptr;\n        }\n\n        auto track = DynamicCast<IAnimationTrack>(animType->CreateSampleRef());\n        track->path = path;\n        track->onKeysChanged += THIS_FUNC(OnTrackChanged);\n\n        mTracks.Add(track);\n        OnTrackAdded(track);\n\n        return track;\n    }\n\n    void AnimationClip::RemoveTrack(const String& path)\n    {\n        for (auto& track : mTracks)\n        {\n            if (track->path == path)\n            {\n                onTrackRemove(track);\n\n                mTracks.Remove(track);\n\n                onChanged();\n                return;\n            }\n        }\n    }\n\n    void AnimationClip::OnTrackChanged()\n    {\n        RecalculateDuration();\n\n        onChanged();\n    }\n\n    void AnimationClip::RecalculateDuration()\n    {\n        float lastDuration = mDuration;\n        mDuration = 0.0f;\n\n        for (auto& track : mTracks)\n            mDuration = Math::Max(mDuration, track->GetDuration());\n\n        if (!Math::Equals(lastDuration, mDuration))\n            onDurationChange(mDuration);\n    }\n\n    void AnimationClip::OnDeserialized(const DataValue& node)\n    {\n        for (auto& track : mTracks)\n            track->onKeysChanged += THIS_FUNC(OnTrackChanged);\n\n        OnTrackChanged();\n    }\n\n    void AnimationClip::OnTrackAdded(const Ref<IAnimationTrack>& track)\n    {\n        track->onKeysChanged += THIS_FUNC(OnTrackChanged);\n        track->mOwnerClip = WeakRef(this);\n\n        onTrackAdded(track);\n        onChanged();\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationClip, o2__AnimationClip);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationClip.h",
    "content": "#pragma once\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    class IAnimationTrack;\n\n    template<typename _type>\n    class AnimationTrack;\n\n    // -----------------------------------------\n    // Animation clip. Contains animation tracks\n    // -----------------------------------------\n    class AnimationClip : public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        PROPERTIES(AnimationClip);\n        PROPERTY(Loop, loop, SetLoop, GetLoop); // Loop type property\n        GETTER(float, duration, GetDuration);   // Duration getter\n\n    public:\n        Function<void()> onChanged; // Called when some Animation track has changed @EDITOR_IGNORE\n\n        Function<void(float)> onDurationChange; // Called when duration has changed @EDITOR_IGNORE\n\n        Function<void(const Ref<IAnimationTrack>&)> onTrackAdded;  // Called when new track added @EDITOR_IGNORE\n        Function<void(const Ref<IAnimationTrack>&)> onTrackRemove; // Called when new track removing @EDITOR_IGNORE\n\n    public:\n        // Default constructor\n        AnimationClip(RefCounter* refCounter);\n\n        // Copy-constructor\n        AnimationClip(RefCounter* refCounter, const AnimationClip& other);\n\n        // Destructor\n        ~AnimationClip();\n\n        // Assign operator\n        AnimationClip& operator=(const AnimationClip& other);\n\n        // Removes and clears all Animation tracks\n        void Clear();\n\n        // Returns clip duration\n        float GetDuration() const;\n\n        // Sets loop\n        void SetLoop(Loop loop);\n\n        // Returns loop\n        Loop GetLoop() const;\n\n        // Returns animation tracks\n        Vector<Ref<IAnimationTrack>>& GetTracks();\n\n        // Returns animation tracks\n        const Vector<Ref<IAnimationTrack>>& GetTracks() const;\n\n        // Returns is contains Animation track by path (some like \"path/abc/cde\")\n        bool ContainsTrack(const String& path) const;\n\n\t\t// Returns Animation track by path (some like \"path/abc/cde\")\n\t\tRef<IAnimationTrack> GetTrack(const String& path);\n\n        // Returns Animation track by path (some like \"path/abc/cde\")\n        template<typename _type>\n        Ref<AnimationTrack<_type>> GetTrackByType(const String& path);\n\n        // Adds animation track with specified path\n        template<typename _type>\n        Ref<AnimationTrack<_type>> AddTrack(const String& path);\n\n        // Add animation track with specified path and type\n        Ref<IAnimationTrack> AddTrack(const String& path, const Type& type);\n\n        // Removes Animation track by path\n        void RemoveTrack(const String& path);\n\n        //insert animation\n\n        // Returns parametric specified animation\n        // Sample: Parametric(targetObjectPtr, targetValuePtr, someBegin, someEnd, 1.0f, 0.0f, 0.4f, 1.0f, 0.6f) \n        template<typename _type>\n        static Ref<AnimationClip> Parametric(const String& animatingValuePath,\n                                             const _type& begin, const _type& end, float duration,\n                                             float beginCoef, float beginCoefPosition,\n                                             float endCoef, float endCoefPosition);\n\n        // Returns animation from begin to end in duration with ease in\n        template<typename _type>\n        static Ref<AnimationClip> EaseIn(const String& animatingValuePath,\n                                         const _type& begin, const _type& end, float duration = 1.0f);\n\n        // Returns animation from begin to end in duration with ease out\n        template<typename _type>\n        static Ref<AnimationClip> EaseOut(const String& animatingValuePath,\n                                          const _type& begin, const _type& end, float duration = 1.0f);\n\n        // Returns animation from begin to end in duration with ease in-out\n        template<typename _type>\n        static Ref<AnimationClip> EaseInOut(const String& animatingValuePath,\n                                            const _type& begin, const _type& end, float duration = 1.0f);\n\n        // Returns animation from begin to end in duration with linear transition\n        template<typename _type>\n        static Ref<AnimationClip> Linear(const String& animatingValuePath,\n                                         const _type& begin, const _type& end, float duration = 1.0f);\n\n        SERIALIZABLE(AnimationClip);\n        CLONEABLE_REF(AnimationClip);\n\n    protected:\n        Vector<Ref<IAnimationTrack>> mTracks; // Animation track @SERIALIZABLE\n\n        float mDuration = 0.0f;   // Animation duration @SERIALIZABLE\n        Loop  mLoop = Loop::None; // Animation loop type @SERIALIZABLE\n\n    protected:\n        // Returns Animation track by path\n        template<typename _type>\n        Ref<AnimationTrack<_type>> FindTrack(const String& path);\n\n        // Called when some Animation track has changed\n        void OnTrackChanged();\n\n        // Recalculates maximum duration by Animation tracks\n        void RecalculateDuration();\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when Animation track was added. Need to register value agent in animation target\n        void OnTrackAdded(const Ref<IAnimationTrack>& track);\n\n        friend class Animate;\n        friend class AnimationComponent;\n        friend class AnimationPlayer;\n    };\n}\n\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n\nnamespace o2\n{\n    template<typename _type>\n    Ref<AnimationTrack<_type>> AnimationClip::FindTrack(const String& path)\n    {\n        for (auto& track : mTracks) {\n            if (track->path == path)\n                return dynamic_cast<AnimationTrack<_type>*>(track);\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    Ref<AnimationClip> AnimationClip::Parametric(const String& animatingValuePath,\n                                            const _type& begin, const _type& end, float duration,\n                                            float beginCoef, float beginCoefPosition, float endCoef, float endCoefPosition)\n    {\n        auto res = mmake<AnimationClip>();\n        *res->AddTrack<_type>(animatingValuePath) = AnimationTrack<_type>::Parametric(begin, end, duration,\n                                                                                     beginCoef, beginCoefPosition,\n                                                                                     endCoef, endCoefPosition);\n        return res;\n    }\n\n    template<typename _type>\n    Ref<AnimationClip> AnimationClip::EaseIn(const String& animatingValuePath,\n                                        const _type& begin, const _type& end, float duration /*= 1.0f*/)\n    {\n        auto res = mmake<AnimationClip>();\n        *res->AddTrack<_type>(animatingValuePath) = AnimationTrack<_type>::EaseIn(begin, end, duration);\n        return res;\n    }\n\n    template<typename _type>\n    Ref<AnimationClip> AnimationClip::EaseOut(const String& animatingValuePath,\n                                         const _type& begin, const _type& end, float duration /*= 1.0f*/)\n    {\n        auto res = mmake<AnimationClip>();\n        *res->AddTrack<_type>(animatingValuePath) = AnimationTrack<_type>::EaseOut(begin, end, duration);\n        return res;\n    }\n\n    template<typename _type>\n    Ref<AnimationClip> AnimationClip::EaseInOut(const String& animatingValuePath,\n                                           const _type& begin, const _type& end, float duration /*= 1.0f*/)\n    {\n        auto res = mmake<AnimationClip>();\n        *res->AddTrack<_type>(animatingValuePath) = AnimationTrack<_type>::EaseInOut(begin, end, duration);\n        return res;\n    }\n\n    template<typename _type>\n    Ref<AnimationClip> AnimationClip::Linear(const String& animatingValuePath,\n                                        const _type& begin, const _type& end, float duration /*= 1.0f*/)\n    {\n        auto res = mmake<AnimationClip>();\n        *res->AddTrack<_type>(animatingValuePath) = AnimationTrack<_type>::Linear(begin, end, duration);\n        return res;\n    }\n\n    template<typename _type>\n    Ref<AnimationTrack<_type>> AnimationClip::AddTrack(const String& path)\n    {\n        auto track = mmake<AnimationTrack<_type>>();\n        track->onKeysChanged += THIS_FUNC(OnTrackChanged);\n        track->path = path;\n\n        mTracks.Add(track);\n        OnTrackAdded(track);\n\n        return track;\n    }\n\n    template<typename _type>\n    Ref<AnimationTrack<_type>> AnimationClip::GetTrackByType(const String& path)\n    {\n        for (auto& track : mTracks) {\n            if (track->path == path)\n                return DynamicCast<AnimationTrack<_type>>(track);;\n        }\n\n        return nullptr;\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationClip)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationClip)\n{\n    FIELD().PUBLIC().NAME(loop);\n    FIELD().PUBLIC().NAME(duration);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onChanged);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onDurationChange);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onTrackAdded);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onTrackRemove);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mTracks);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mDuration);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Loop::None).NAME(mLoop);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationClip)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AnimationClip&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Clear);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLoop, Loop);\n    FUNCTION().PUBLIC().SIGNATURE(Loop, GetLoop);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<IAnimationTrack>>&, GetTracks);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<IAnimationTrack>>&, GetTracks);\n    FUNCTION().PUBLIC().SIGNATURE(bool, ContainsTrack, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationTrack>, GetTrack, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationTrack>, AddTrack, const String&, const Type&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTrack, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTrackChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, RecalculateDuration);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTrackAdded, const Ref<IAnimationTrack>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationMask.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationMask.h\"\n\nnamespace o2\n{\n    float AnimationMask::GetNodeWeight(const String& node) const\n    {\n        auto fnd = weights.find(node);\n        if (fnd != weights.End())\n            return fnd->second;\n\n        return 1.0f;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationMask, o2__AnimationMask);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationMask.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    // --------------------------\n    // Animation tree weight mask\n    // --------------------------\n    class AnimationMask: public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        Map<String, float> weights; // Masked nodes weights @SERIALIZABLE\n\n    public:\n        // Returns node masked weight. 1.0f is default\n        float GetNodeWeight(const String& node) const;\n\n        SERIALIZABLE(AnimationMask);\n        CLONEABLE_REF(AnimationMask);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationMask)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationMask)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(weights);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationMask)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(float, GetNodeWeight, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationPlayer.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationPlayer.h\"\n\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    FORWARD_REF_IMPL(AnimationClip);\n    FORWARD_REF_IMPL(AnimationState);\n\n    AnimationPlayer::AnimationPlayer(RefCounter* refCounter, IObject* target /*= nullptr*/, const Ref<AnimationClip>& clip /*= nullptr*/):\n        IAnimation(refCounter), mTarget(target), mClip(clip)\n    {\n        SetTarget(target);\n        SetClip(clip);\n    }\n\n    AnimationPlayer::~AnimationPlayer()\n    {\n        mTrackPlayers.Clear();\n\n        auto tmp = mClip;\n        SetClip(nullptr);\n    }\n\n    void AnimationPlayer::SetTarget(IObject* target, bool errors /*= true*/)\n    {\n        mTarget = target;\n        BindTracks(errors);\n    }\n\n    IObject* AnimationPlayer::GetTarget() const\n    {\n        return mTarget;\n    }\n\n    void AnimationPlayer::SetClip(const Ref<AnimationClip>& clip)\n    {\n        if (mClip)\n        {\n            mClip->onTrackAdded -= THIS_FUNC(OnClipTrackAdded);\n            mClip->onTrackRemove -= THIS_FUNC(OnClipTrackRemove);\n            mClip->onDurationChange -= THIS_FUNC(OnClipDurationChanged);\n        }\n\n        mClip = clip;\n\n        if (mClip)\n        {\n            mClip->onTrackAdded += THIS_FUNC(OnClipTrackAdded);\n            mClip->onTrackRemove += THIS_FUNC(OnClipTrackRemove);\n            mClip->onDurationChange += THIS_FUNC(OnClipDurationChanged);\n\n\t\t\tmLoop = mClip->mLoop;\n        }\n\n        BindTracks(true);\n    }\n\n    const Ref<AnimationClip>& AnimationPlayer::GetClip() const\n    {\n        return mClip;\n    }\n\n    const Vector<Ref<IAnimationTrack::IPlayer>>& AnimationPlayer::GetTrackPlayers() const\n    {\n        return mTrackPlayers;\n    }\n\n    void AnimationPlayer::BindTracks(bool errors)\n    {\n        for (auto& player : mTrackPlayers)\n            onTrackPlayerRemove(player);\n\n\t\tmTrackPlayers.Clear();\n\n        if (!mClip)\n            return;\n\n\t\tmLoop = mClip->mLoop;\n\t\tmDuration = mClip->GetDuration();\n\t\tmBeginTime = 0.0f;\n\t\tmEndTime = mDuration;\n\n        if (!mTarget)\n            return;\n\n        const ObjectType* type = dynamic_cast<const ObjectType*>(&mTarget->GetType());\n        void* castedTarget = type->DynamicCastFromIObject(mTarget);\n\n        for (auto& track : mClip->mTracks)\n            BindTrack(type, castedTarget, track, errors);\n    }\n\n    void AnimationPlayer::BindTrack(const ObjectType* type, void* castedTarget, const Ref<IAnimationTrack>& track, bool errors)\n    {\n        const FieldInfo* fieldInfo = nullptr;\n        auto targetPtr = type->GetFieldPtr(castedTarget, track->path, fieldInfo);\n\n        if (!fieldInfo)\n        {\n            if (errors)\n                o2Debug.LogWarning(\"Can't find '\" + track->path + \"' for animating\");\n        }\n        else\n        {\n            auto trackPlayer = track->CreatePlayer();\n            trackPlayer->SetTrack(track);\n            trackPlayer->mOwnerPlayer = WeakRef(this);\n\n            targetPtr = trackPlayer->AdjustTargetType(targetPtr, *fieldInfo->GetType());\n\n            if (fieldInfo->GetType()->GetUsage() == Type::Usage::Property)\n                trackPlayer->SetTargetProxy(fieldInfo->GetType()->GetValueProxy(targetPtr));\n            else\n                trackPlayer->SetTargetVoid(targetPtr);\n\n            mTrackPlayers.Add(trackPlayer);\n\n            onTrackPlayerAdded(trackPlayer);\n        }\n    }\n\n    void AnimationPlayer::OnClipTrackAdded(const Ref<IAnimationTrack>& track)\n    {\n        if (!mTarget)\n            return;\n\n        const ObjectType* type = dynamic_cast<const ObjectType*>(&mTarget->GetType());\n        void* castedTarget = type->DynamicCastFromIObject(mTarget);\n\n        BindTrack(type, castedTarget, track, false);\n    }\n\n    void AnimationPlayer::OnClipTrackRemove(const Ref<IAnimationTrack>& track)\n    {\n        mTrackPlayers.RemoveFirst([track, this](auto& x) { return x->GetTrack() == track; onTrackPlayerRemove(x); });\n    }\n\n    void AnimationPlayer::OnClipDurationChanged(float duration)\n    {\n        mDuration = duration;\n        mEndTime = duration;\n    }\n\n\tvoid AnimationPlayer::OnPlay()\n\t{\n        for (auto& track : mTrackPlayers)\n\t\t\ttrack->OnPlay();\n\t}\n\n\tvoid AnimationPlayer::Evaluate()\n    {\n        for (auto& trackPlayer : mTrackPlayers)\n            trackPlayer->ForceSetTime(mInDurationTime, mDuration);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationPlayer, o2__AnimationPlayer);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationPlayer.h",
    "content": "#pragma once\n#include \"o2/Animation/IAnimation.h\"\n#include \"o2/Animation/Tracks/IAnimationTrack.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(AnimationClip);\n    FORWARD_CLASS_REF(AnimationState);\n\n    // ---------------------\n    // Animation clip player\n    // ---------------------\n    class AnimationPlayer: public IAnimation, public ICloneableRef\n    {\n    public:\n        Function<void(const Ref<IAnimationTrack::IPlayer>&)> onTrackPlayerAdded;  // Called when new track added\n        Function<void(const Ref<IAnimationTrack::IPlayer>&)> onTrackPlayerRemove; // Called when new track removing\n\n    public:\n        // Default constructor\n        AnimationPlayer(RefCounter* refCounter, IObject* target = nullptr, const Ref<AnimationClip>& clip = nullptr);\n\n        // Destructor\n        ~AnimationPlayer();\n\n        // Sets animation target\n        // Bind all animation tracks to target's child fields (if it possible)\n        void SetTarget(IObject* target, bool errors = true);\n\n        // Returns animation's target\n        IObject* GetTarget() const;\n\n        // Sets animation clip\n        void SetClip(const Ref<AnimationClip>& clip);\n\n        // Returns animation clip\n        const Ref<AnimationClip>& GetClip() const;\n\n        // Returns track players list\n        const Vector<Ref<IAnimationTrack::IPlayer>>& GetTrackPlayers() const;\n\n        IOBJECT(AnimationPlayer);\n        CLONEABLE_REF(AnimationPlayer);\n\n    protected:\n        Ref<AnimationClip> mClip; // Animation clip\n\n        IObject* mTarget = nullptr; // Target object\n\n        Ref<AnimationState> mAnimationState = nullptr; // Animation state owner\n\n        Vector<Ref<IAnimationTrack::IPlayer>> mTrackPlayers; // Animation clip track players\n\n    protected:\n        // Called when animation starts playing\n        void OnPlay() override;\n\n        // Evaluates all Animation tracks by time\n        void Evaluate() override;\n\n        // Creates clip tracks players and bind to properties from target\n        void BindTracks(bool errors);\n\n        // Binds animation track\n        void BindTrack(const ObjectType* type, void* castedTarget, const Ref<IAnimationTrack>& track, bool errors);\n\n        // Called when added new track in clip\n        void OnClipTrackAdded(const Ref<IAnimationTrack>& track);\n\n        // Called when removing track from clip\n        void OnClipTrackRemove(const Ref<IAnimationTrack>& track);\n\n        // Called when clip duration changed\n        void OnClipDurationChanged(float duration);\n\n        friend class AnimationComponent;\n        friend class AnimationState;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationPlayer)\n{\n    BASE_CLASS(o2::IAnimation);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationPlayer)\n{\n    FIELD().PUBLIC().NAME(onTrackPlayerAdded);\n    FIELD().PUBLIC().NAME(onTrackPlayerRemove);\n    FIELD().PROTECTED().NAME(mClip);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mTarget);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mAnimationState);\n    FIELD().PROTECTED().NAME(mTrackPlayers);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationPlayer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, IObject*, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTarget, IObject*, bool);\n    FUNCTION().PUBLIC().SIGNATURE(IObject*, GetTarget);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetClip, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationClip>&, GetClip);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<IAnimationTrack::IPlayer>>&, GetTrackPlayers);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPlay);\n    FUNCTION().PROTECTED().SIGNATURE(void, Evaluate);\n    FUNCTION().PROTECTED().SIGNATURE(void, BindTracks, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, BindTrack, const ObjectType*, void*, const Ref<IAnimationTrack>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClipTrackAdded, const Ref<IAnimationTrack>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClipTrackRemove, const Ref<IAnimationTrack>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClipDurationChanged, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationState.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationState.h\"\n\n#include \"o2/Scene/Components/AnimationComponent.h\"\n\nnamespace o2\n{\n    FORWARD_REF_IMPL(AnimationComponent);\n\n\tIAnimationState::IAnimationState(const String& name) :\n\t\tname(name)\n\t{}\n\n\tIAnimationState::IAnimationState(const IAnimationState& other) :\n\t\tname(other.name), autoPlay(other.autoPlay)\n\t{}\n\n\tvoid IAnimationState::Update(float dt)\n\t{}\n\n\tIAnimation& IAnimationState::GetPlayer()\n\t{\n\t\tstatic IAnimation empty;\n\t\treturn empty;\n\t}\n\n\tfloat IAnimationState::GetDuration() const\n\t{\n\t\treturn 0.0f;\n\t}\n\n\tvoid IAnimationState::SetWeight(float weight)\n\t{}\n\n\tfloat IAnimationState::GetWeight() const\n\t{\n\t\treturn 1.0f;\n\t}\n\n\tvoid IAnimationState::SetLooped(bool looped)\n\t{}\n\n\tbool IAnimationState::IsLooped() const\n\t{\n\t\treturn false;\n\t}\n\n\tvoid IAnimationState::Register(const Ref<AnimationComponent>& owner)\n\t{\n\t\tmOwner = owner;\n\t}\n\n\tvoid IAnimationState::Unregister()\n\t{}\n\n    AnimationState::AnimationState(const String& name):\n        IAnimationState(name)\n    {\n        player->onTrackPlayerAdded = [&](auto track) { OnTrackPlayerAdded(track); };\n        player->onTrackPlayerRemove = [&](auto track) { OnTrackPlayerRemove(track); };\n    }\n\n\tAnimationState::AnimationState(const AnimationState& other):\n        IAnimationState(other.name), mAnimation(other.mAnimation), mWeight(other.mWeight)\n    {\n        player->onTrackPlayerAdded = [&](auto track) { OnTrackPlayerAdded(track); };\n        player->onTrackPlayerRemove = [&](auto track) { OnTrackPlayerRemove(track); };\n\t}\n\n\tvoid AnimationState::Update(float dt)\n    {\n        if (mInEditMode)\n\t\t\treturn;\n\n        if (mAnimation)\n            player->Update(dt);\n    }\n\n    IAnimation& AnimationState::GetPlayer()\n    {\n        return *player;\n    }\n\n\tfloat AnimationState::GetDuration() const\n\t{\n\t\treturn mAnimation ? mAnimation->animation->GetDuration() : 0.0f;\n\t}\n\n\tvoid AnimationState::SetWeight(float weight)\n    {\n        mWeight = weight;\n    }\n\n    float AnimationState::GetWeight() const\n    {\n        return mWeight;\n    }\n\n    void AnimationState::SetLooped(bool looped)\n    {\n        Loop loop = looped ? Loop::Repeat : Loop::None;\n\n        player->SetLoop(loop);\n\n        if (mAnimation)\n\t\t\tmAnimation->animation->SetLoop(loop);\n    }\n\n    bool AnimationState::IsLooped() const\n    {\n        return player->GetLoop() == Loop::Repeat;\n    }\n\n    void AnimationState::SetAnimation(const AssetRef<AnimationAsset>& animationAsset)\n    {\n        mAnimation = animationAsset;\n        player->SetClip(mAnimation ? mAnimation->animation : nullptr);\n    }\n\n    const AssetRef<AnimationAsset>& AnimationState::GetAnimation() const\n    {\n        return mAnimation;\n    }\n\n\tRefCounter* AnimationState::GetRefCounter() const\n\t{\n        return IAnimationState::GetRefCounter();\n\t}\n\n\tvoid AnimationState::Register(const Ref<AnimationComponent>& owner)\n\t{\n\t\tIAnimationState::Register(owner);\n\n        auto actor = mOwner.Lock()->GetActor();\n        if (!actor)\n            return;\n\n\t\tplayer->SetClip(mAnimation ? mAnimation->animation : nullptr);\n        player->SetTarget(static_cast<IObject*>(static_cast<ActorBase*>(actor.Get())));\n        player->mAnimationState = Ref(this);\n    }\n\n    void AnimationState::Unregister()\n    {\n        auto owner = mOwner.Lock();\n\n        for (auto& trackPlayer : player->mTrackPlayers)\n            owner->UnregTrack(trackPlayer, trackPlayer->GetTrack()->path);\n    }\n\n    void AnimationState::OnAnimationChanged()\n    {\n        player->SetClip(mAnimation ? mAnimation->animation : nullptr);\n    }\n\n    void AnimationState::OnTrackPlayerAdded(const Ref<IAnimationTrack::IPlayer>& trackPlayer)\n    {\n        if (auto owner = mOwner.Lock())\n            owner->OnStateAnimationTrackAdded(Ref(this), trackPlayer);\n    }\n\n    void AnimationState::OnTrackPlayerRemove(const Ref<IAnimationTrack::IPlayer>& trackPlayer)\n    {\n        if (auto owner = mOwner.Lock())\n            owner->OnStateAnimationTrackRemoved(Ref(this), trackPlayer);\n    }\n\n    void AnimationState::OnDeserialized(const DataValue& node)\n    {\n        player->SetClip(mAnimation ? mAnimation->animation : nullptr);\n\t}\n\n\tvoid AnimationState::BeginPreview()\n\t{\n        mInEditMode = true;\n\t}\n\n\tvoid AnimationState::EndPreview()\n\t{\n\t\tmInEditMode = false;\n\t}\n\n\tRef<Actor> AnimationState::GetPreviewActor() const\n\t{\n        if (auto owner = mOwner.Lock())\n            return owner->GetActor();\n        \n        return nullptr;\n\t}\n\n\tRef<IAnimation> AnimationState::GetPreviewPlayer() const\n\t{\n\t\treturn player;\n\t}\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::IAnimationState, o2__IAnimationState);\n\nDECLARE_CLASS(o2::AnimationState, o2__AnimationState);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationState.h",
    "content": "#pragma once\n\n#include \"o2/Animation/AnimationMask.h\"\n#include \"o2/Animation/AnimationPlayer.h\"\n#include \"o2/Assets/AssetRef.h\"\n#include \"o2/Assets/Types/AnimationAsset.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Editor/AssetEditablePreview.h\"\n#include \"o2/Utils/Editor/Attributes/InvokeOnChangeAttribute.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(AnimationComponent);\n\n    // -----------------------------------------------------\n    // Animation state interface. Can be updated and blended\n    // -----------------------------------------------------\n    class IAnimationState: public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        PROPERTIES(IAnimationState);\n        PROPERTY(float, weight, SetWeight, GetWeight); // State weight @RANGE(0.0f, 1.0f)\n\n    public:\n        String name;            // State name @SERIALIZABLE\n        bool   autoPlay = true; // True, if state should be played automatically @SERIALIZABLE\n\n    public:\n        // Default constructor\n        IAnimationState() = default;\n        \n\t\t// Copy-constructor\n\t\tIAnimationState(const IAnimationState& other);\n\n        // Constructor with name\n        IAnimationState(const String& name);\n\n        // Updates state\n        virtual void Update(float dt);\n\n        // Returns player\n        virtual IAnimation& GetPlayer();\n\n\t\t// Returns animation duration\n        virtual float GetDuration() const;\n\n        // Sets state weight (0...1) of blending\n        virtual void SetWeight(float weight);\n\n        // Returns state weight (0...1) of blending\n        virtual float GetWeight() const;\n\n        // Sets looped state\n        virtual void SetLooped(bool looped);\n\n        // Returns looped state\n        virtual bool IsLooped() const;\n\n        SERIALIZABLE(IAnimationState);\n        CLONEABLE_REF(IAnimationState);\n\n    protected:\n        WeakRef<AnimationComponent> mOwner; // Animation state owner component\n\n    protected:\n        // Registers animation in state\n        virtual void Register(const Ref<AnimationComponent>& owner);\n\n        // Removes animation state from component\n        virtual void Unregister();\n\n        friend class AnimationComponent;\n    };\n\n    // ---------------\n    // Animation state\n    // ---------------\n    class AnimationState: public IAnimationState, public AnimationAssetEditablePreview\n    {\n    public:\n        AnimationMask        mask;                              // Animation mask @SERIALIZABLE\n        Ref<AnimationPlayer> player = mmake<AnimationPlayer>(); // Animation player\n\n    public:\n        // Default constructor\n        AnimationState() = default;\n\n        // Copy-constructor\n        AnimationState(const AnimationState& other);\n\n        // Constructor with name\n        AnimationState(const String& name);\n\n        // Updates state\n        void Update(float dt) override;\n\n        // Returns player\n        IAnimation& GetPlayer() override;\n\n\t\t// Returns animation duration\n\t\tfloat GetDuration() const override;\n\n        // Sets state weight\n        void SetWeight(float weight) override;\n\n        // Returns state weight\n        float GetWeight() const override;\n\n        // Sets looped state\n        void SetLooped(bool looped) override;\n\n        // Returns looped state\n        bool IsLooped() const override;\n\n        // Sets animation\n        void SetAnimation(const AssetRef<AnimationAsset>& animationAsset);\n\n        // Returns animation\n        const AssetRef<AnimationAsset>& GetAnimation() const;\n\n\t\t// Returns ref counter\n\t\tRefCounter* GetRefCounter() const override;\n\n        SERIALIZABLE(AnimationState);\n        CLONEABLE_REF(AnimationState);\n\n    protected:\n        AssetRef<AnimationAsset> mAnimation; // Animation @SERIALIZABLE @EDITOR_PROPERTY @INVOKE_ON_CHANGE(OnAnimationChanged)\n\n\t\tfloat mWeight = 1.0f; // State weight @SERIALIZABLE\n\n\t\tbool mInEditMode = false; // True, if animation is in edit mode (previewing)\n\n    protected:\n        // Registers animation in state\n        void Register(const Ref<AnimationComponent>& owner) override;\n\n        // Removes animation state from component\n        void Unregister() override;\n\n        // Called when animation changed from editor\n        void OnAnimationChanged();\n\n        // Called when player has added new track\n        void OnTrackPlayerAdded(const Ref<IAnimationTrack::IPlayer>& trackPlayer);\n\n        // Called when player is removing track\n        void OnTrackPlayerRemove(const Ref<IAnimationTrack::IPlayer>& trackPlayer);\n\n        // It is called when object was deserialized; sets animation into player\n\t\tvoid OnDeserialized(const DataValue& node) override;\n\n\t\t// Called when animation started to edit. It means that animation must be deactivated\n\t\tvoid BeginPreview() override;\n\n\t\t// Called when animation finished editing. Animation must be reactivated\n\t\tvoid EndPreview() override;\n\n\t\t// Returns actor that is being previewed\n\t\tRef<Actor> GetPreviewActor() const override;\n\n\t\t// Returns animation player for previewing\n        Ref<IAnimation> GetPreviewPlayer() const override;\n\n        friend class AnimationComponent;\n        friend class AnimationClip;\n\n        template<typename _type>\n        friend class AnimationTrack;\n\n        friend class AnimationSubTrack;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::IAnimationState)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::IAnimationState)\n{\n    FIELD().PUBLIC().RANGE_ATTRIBUTE(0.0f, 1.0f).NAME(weight);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(name);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(autoPlay);\n    FIELD().PROTECTED().NAME(mOwner);\n}\nEND_META;\nCLASS_METHODS_META(o2::IAnimationState)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const IAnimationState&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(IAnimation&, GetPlayer);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWeight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetWeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLooped, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLooped);\n    FUNCTION().PROTECTED().SIGNATURE(void, Register, const Ref<AnimationComponent>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, Unregister);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AnimationState)\n{\n    BASE_CLASS(o2::IAnimationState);\n    BASE_CLASS(o2::AnimationAssetEditablePreview);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationState)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mask);\n    FIELD().PUBLIC().DEFAULT_VALUE(mmake<AnimationPlayer>()).NAME(player);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().INVOKE_ON_CHANGE_ATTRIBUTE(OnAnimationChanged).SERIALIZABLE_ATTRIBUTE().NAME(mAnimation);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mWeight);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mInEditMode);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationState)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationState&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(IAnimation&, GetPlayer);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWeight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetWeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLooped, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLooped);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnimation, const AssetRef<AnimationAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<AnimationAsset>&, GetAnimation);\n    FUNCTION().PUBLIC().SIGNATURE(RefCounter*, GetRefCounter);\n    FUNCTION().PROTECTED().SIGNATURE(void, Register, const Ref<AnimationComponent>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, Unregister);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAnimationChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTrackPlayerAdded, const Ref<IAnimationTrack::IPlayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTrackPlayerRemove, const Ref<IAnimationTrack::IPlayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginPreview);\n    FUNCTION().PROTECTED().SIGNATURE(void, EndPreview);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Actor>, GetPreviewActor);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<IAnimation>, GetPreviewPlayer);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationStateGraph.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationStateGraph.h\"\n\n#include \"o2/Assets/Types/AnimationStateGraphAsset.h\"\n\nnamespace o2\n{\n    void AnimationGraphState::Animation::OnChanged()\n    {\n        if (auto state = mState.Lock())\n            state->OnChanged();\n\n        onChanged();\n    }\n\n    void AnimationGraphState::Animation::SetName(const String& name)\n    {\n        mName = name;\n        OnChanged();\n    }\n\n    const String& AnimationGraphState::Animation::GetName() const\n    {\n        return mName;\n    }\n\n    void AnimationGraphState::Animation::SetWeight(float weight)\n    {\n        mWeight = weight;   \n        OnChanged();\n    }\n\n    float AnimationGraphState::Animation::GetWeight() const\n    {\n        return mWeight;\n    }\n\n    void AnimationGraphState::Animation::SetState(const Ref<AnimationGraphState>& state)\n    {\n        mState = state;\n    }\n\n    void AnimationGraphTransition::SetDestinationState(const Ref<AnimationGraphState>& state)\n    {\n        mDestinationState = state->GetUID();\n        mDestinationStateRef = state;\n        OnChanged();\n    }\n\n    Ref<AnimationGraphState> AnimationGraphTransition::GetDestinationState() const\n    {\n        return mDestinationStateRef.Lock();\n    }\n\n    Ref<AnimationGraphState> AnimationGraphTransition::GetSourceState() const\n    {\n        return mSourceStateRef.Lock();\n    }\n\n    void AnimationGraphTransition::SetState(const Ref<AnimationGraphState>& state)\n    {\n        mSourceStateRef = state;\n\n        if (state && state->mGraph)\n            mDestinationStateRef = state->mGraph.Lock()->GetState(mDestinationState);\n    }\n\n\tvoid AnimationGraphTransition::OnChanged()\n\t{\n\t\tif (auto sourceState = mSourceStateRef.Lock())\n\t\t{\n\t\t\tif (auto graph = sourceState->GetGraph())\n\t\t\t\tgraph->SetDirty();\n\t\t}\n\n        onChanged();\n\t}\n\n\tconst String& AnimationGraphState::GetName() const\n\t{\n        if (mAnimations.IsEmpty())\n            return String::empty;\n\n\t\treturn mAnimations[0]->GetName();\n\t}\n\n\tUID AnimationGraphState::GetUID() const\n    {\n        return mUID;\n    }\n\n    Ref<AnimationGraphState::Animation> AnimationGraphState::GetAnimation(const String& name)\n    {\n        for (auto& animation : mAnimations)\n        {\n            if (animation->GetName() == name)\n                return animation;\n        }\n\n        return nullptr;\n    }\n\n    Ref<AnimationGraphState::Animation> AnimationGraphState::AddAnimation(const String& name)\n    {\n        auto animation = mmake<Animation>();\n        animation->SetName(name);\n        animation->SetState(Ref(this));\n        mAnimations.Add(animation);\n        \n        OnChanged();\n\n        return animation;\n    }\n\n    void AnimationGraphState::RemoveAnimation(const String& name)\n    {\n        RemoveAnimation(GetAnimation(name));\n    }\n\n    void AnimationGraphState::RemoveAnimation(const Ref<Animation>& animation)\n    {\n\t\tmAnimations.Remove(animation);\n\t\tOnChanged();\n    }\n\n\tvoid AnimationGraphState::SetAnimations(const Vector<Ref<Animation>>& animations)\n\t{\n\t\tmAnimations = animations;\n        for (auto& animation : mAnimations)\n            animation->SetState(Ref(this));\n\n\t\tOnChanged();\n\t}\n\n\tconst Vector<Ref<AnimationGraphState::Animation>>& AnimationGraphState::GetAnimations() const\n    {\n        return mAnimations;\n    }\n\n    Ref<AnimationGraphTransition> AnimationGraphState::AddTransition(const Ref<AnimationGraphState>& destinationState)\n    {\n        auto transition = mmake<AnimationGraphTransition>();\n        transition->SetDestinationState(destinationState);\n        transition->SetState(Ref(this));\n\t\tmTransitions.Add(transition);\n\n\t\tOnChanged();\n\n        return transition;\n    }\n\n    void AnimationGraphState::RemoveTransition(const Ref<AnimationGraphTransition>& transition)\n    {\n\t\tmTransitions.Remove(transition);\n\t\tOnChanged();\n    }\n\n    const Vector<Ref<AnimationGraphTransition>>& AnimationGraphState::GetTransitions() const\n    {\n        return mTransitions;\n    }\n\n\tRef<AnimationStateGraphAsset> AnimationGraphState::GetGraph() const\n\t{\n\t\treturn mGraph.Lock();\n\t}\n\n\tvoid AnimationGraphState::SetPosition(const Vec2F& position)\n\t{\n\t\tmPosition = position;\n\t\tOnChanged();\n\t}\n\n\tVec2F AnimationGraphState::GetPosition() const\n\t{\n\t\treturn mPosition;\n\t}\n\n\tvoid AnimationGraphState::ReinitStatesAndTransitions()\n    {\n        for (auto& animation : mAnimations)\n        {\n            if (animation)\n                animation->SetState(Ref(this));\n        }\n\n        for (auto& transition : mTransitions)\n        {\n            if (transition)\n                transition->SetState(Ref(this));\n        }\n    }\n\n    void AnimationGraphState::SetGraph(const Ref<AnimationStateGraphAsset>& graph)\n    {\n        mGraph = graph;\n\n        ReinitStatesAndTransitions();\n    }\n\n\tvoid AnimationGraphState::OnChanged()\n\t{\n\t\tif (auto graph = mGraph.Lock())\n\t\t\tgraph->SetDirty();\n\n        onChanged();\n\t}\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationGraphTransition, o2__AnimationGraphTransition);\n\nDECLARE_CLASS(o2::AnimationGraphState, o2__AnimationGraphState);\n\nDECLARE_CLASS(o2::AnimationGraphState::Animation, o2__AnimationGraphState__Animation);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/AnimationStateGraph.h",
    "content": "#pragma once\n\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Math/Curve.h\"\n\nnamespace o2\n{    \n    class AnimationGraphState;\n    FORWARD_CLASS_REF(AnimationStateGraphAsset);\n\n    // -------------------------\n    // Transition between states\n    // -------------------------\n    class AnimationGraphTransition : public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        float duration = 0.0f;          // Duration of transition @SERIALIZABLE\n        float beginTimeRange = 0.0f;    // Begin time range of transition @SERIALIZABLE\n        float endTimeRange = 1.0f;      // End time range of transition @SERIALIZABLE\n        bool  backwardAvailable = true; // Is backward transition available @SERIALIZABLE\n\n        Ref<Curve> curve; // Curve of transition @SERIALIZABLE\n\n        PROPERTIES(AnimationGraphTransition);\n        PROPERTY(Ref<AnimationGraphState>, destinationState, SetDestinationState, GetDestinationState); // Destination state property @EDITOR_IGNORE\n\n        Function<void()> onChanged; // Function to call when transition changed\n\n    public:\n        // Sets destination state\n        void SetDestinationState(const Ref<AnimationGraphState>& state);\n\n        // Returns destination state\n        Ref<AnimationGraphState> GetDestinationState() const;\n\n        // Returns source state\n        Ref<AnimationGraphState> GetSourceState() const;\n\n        SERIALIZABLE(AnimationGraphTransition);\n        CLONEABLE_REF(AnimationGraphTransition);\n\n    protected:\n        UID mDestinationState; // To state UID @SERIALIZABLE\n\n        WeakRef<AnimationGraphState> mSourceStateRef;      // From state reference (owner)\n        WeakRef<AnimationGraphState> mDestinationStateRef; // To state reference\n\n    protected:\n        // Sets state and initializes references\n        void SetState(const Ref<AnimationGraphState>& state);\n\n\t\t// Called when transition changed, makes graph asset dirty\n        void OnChanged();\n\n        friend class AnimationGraphState;\n    };\n\n    // ---------------------------------------------------------------\n    // Animation state. Can contain multiple animations and blend them\n    // ---------------------------------------------------------------\n    class AnimationGraphState : public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        // ---------------------------------------------------------------\n        // Single animation from state. Contains animation name and weight\n        // ---------------------------------------------------------------\n        struct Animation : public ISerializable, public RefCounterable\n        {\n            PROPERTIES(Animation);\n            PROPERTY(String, name, SetName, GetName); // Name of animation\n            PROPERTY(float, weight, SetWeight, GetWeight); // Weight of animation @RANGE(0.0f, 1.0f)\n\n            Function<void()> onChanged; // Function to call when animation changed\n\n        public:\n            // Sets name of animation\n            void SetName(const String& name);\n\n            // Returns name of animation\n            const String& GetName() const;\n\n            // Sets weight of animation\n            void SetWeight(float weight);\n\n            // Returns weight of animation\n            float GetWeight() const;\n\n            // Sets state and initializes references\n            void SetState(const Ref<AnimationGraphState>& state);\n\n            SERIALIZABLE(Animation);;\n\n        protected:\n            WeakRef<AnimationGraphState> mState; // State reference @SERIALIZABLE\n\n            String mName;          // Name of animation @SERIALIZABLE\n            float  mWeight = 1.0f; // Weight of animation @SERIALIZABLE\n\n        protected:\n            // Called when animation changed, makes graph asset dirty\n            void OnChanged();\n        };\n\n    public:\n        Function<void()> onChanged; // Function to call when state changed\n\n    public:\n\t\t// Returns name of state. Name is the first animation name in animations list, if it is not empty\n        const String& GetName() const;\n\n        // Returns UID of state\n        UID GetUID() const;\n\n        // Returns animation by name\n        Ref<Animation> GetAnimation(const String& name);\n\n        // Adds animation to state\n        Ref<Animation> AddAnimation(const String& name);\n\n        // Removes animation from state\n        void RemoveAnimation(const String& name);\n\n        // Removes animation from state\n        void RemoveAnimation(const Ref<Animation>& animation);\n\n        // Sets animations\n\t\tvoid SetAnimations(const Vector<Ref<Animation>>& animations); \n\n        // Returns animations\n        const Vector<Ref<Animation>>& GetAnimations() const;\n\n        // Adds transition to state\n        Ref<AnimationGraphTransition> AddTransition(const Ref<AnimationGraphState>& destinationState);\n\n        // Removes transition from state\n        void RemoveTransition(const Ref<AnimationGraphTransition>& transition);\n\n        // Returns transitions\n        const Vector<Ref<AnimationGraphTransition>>& GetTransitions() const;\n\n\t\t// Returns graph reference\n        Ref<AnimationStateGraphAsset> GetGraph() const;\n\n\t\t// Sets position of state in graph\n        void SetPosition(const Vec2F& position);\n\n\t\t// Returns position of state in graph\n        Vec2F GetPosition() const;\n\n        SERIALIZABLE(AnimationGraphState);\n        CLONEABLE_REF(AnimationGraphState);\n\n    protected:\n        UID mUID; // UID of state @SERIALIZABLE\n\n        Vector<Ref<Animation>>                mAnimations;  // Animations @SERIALIZABLE @EDITOR_PROPERTY @INVOKE_ON_CHANGE(ReinitAnimations)\n        Vector<Ref<AnimationGraphTransition>> mTransitions; // Transitions @SERIALIZABLE @EDITOR_PROPERTY @INVOKE_ON_CHANGE(ReinitTransitions)\n\n        WeakRef<AnimationStateGraphAsset> mGraph; // Graph reference\n\n\t\tVec2F mPosition; // Position of state in graph @SERIALIZABLE @EDITOR_PROPERTY\n            \n    protected:\n        // Reinitializes states and transitions\n        void ReinitStatesAndTransitions();\n\n        // Sets graph and initializes references\n\t\tvoid SetGraph(const Ref<AnimationStateGraphAsset>& graph);\n\n\t\t// Called when state changed, makes graph asset dirty\n\t\tvoid OnChanged();\n\n        friend class AnimationGraphTransition;\n        friend class AnimationStateGraphAsset;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationGraphTransition)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationGraphTransition)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(duration);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(beginTimeRange);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(endTimeRange);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(backwardAvailable);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(curve);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(destinationState);\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mDestinationState);\n    FIELD().PROTECTED().NAME(mSourceStateRef);\n    FIELD().PROTECTED().NAME(mDestinationStateRef);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationGraphTransition)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDestinationState, const Ref<AnimationGraphState>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationGraphState>, GetDestinationState);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationGraphState>, GetSourceState);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetState, const Ref<AnimationGraphState>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChanged);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AnimationGraphState)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationGraphState)\n{\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mUID);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().INVOKE_ON_CHANGE_ATTRIBUTE(ReinitAnimations).SERIALIZABLE_ATTRIBUTE().NAME(mAnimations);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().INVOKE_ON_CHANGE_ATTRIBUTE(ReinitTransitions).SERIALIZABLE_ATTRIBUTE().NAME(mTransitions);\n    FIELD().PROTECTED().NAME(mGraph);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mPosition);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationGraphState)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(UID, GetUID);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Animation>, GetAnimation, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Animation>, AddAnimation, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAnimation, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAnimation, const Ref<Animation>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnimations, const Vector<Ref<Animation>>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<Animation>>&, GetAnimations);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationGraphTransition>, AddTransition, const Ref<AnimationGraphState>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTransition, const Ref<AnimationGraphTransition>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<AnimationGraphTransition>>&, GetTransitions);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationStateGraphAsset>, GetGraph);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetPosition);\n    FUNCTION().PROTECTED().SIGNATURE(void, ReinitStatesAndTransitions);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetGraph, const Ref<AnimationStateGraphAsset>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChanged);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AnimationGraphState::Animation)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationGraphState::Animation)\n{\n    FIELD().PUBLIC().NAME(name);\n    FIELD().PUBLIC().RANGE_ATTRIBUTE(0.0f, 1.0f).NAME(weight);\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mState);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mName);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mWeight);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationGraphState::Animation)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWeight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetWeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetState, const Ref<AnimationGraphState>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/IAnimation.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"IAnimation.h\"\n\n#include \"o2/Utils/Math/Math.h\"\n\nnamespace o2\n{\n    IAnimation::IAnimation()\n    {}\n\n    IAnimation::IAnimation(const IAnimation& other) :\n        IAnimation(nullptr, other)\n    {}\n\n    IAnimation::IAnimation(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {}\n\n    IAnimation::IAnimation(RefCounter* refCounter, const IAnimation& other):\n        RefCounterable(refCounter), mTime(other.mTime), mDuration(other.mDuration), mBeginTime(other.mBeginTime), mEndTime(other.mEndTime),\n        mDirection(other.mDirection), mSpeed(other.mSpeed), mLoop(other.mLoop),\n        mPlaying(other.mPlaying), mInDurationTime(other.mInDurationTime)\n    {}\n\n    IAnimation::~IAnimation()\n    {}\n\n    IAnimation& IAnimation::operator=(const IAnimation& other)\n    {\n        mTime = other.mTime;\n        mDuration = other.mDuration;\n        mBeginTime = other.mBeginTime;\n        mEndTime = other.mEndTime;\n        mDirection = other.mDirection;\n        mSpeed = other.mSpeed;\n        mLoop = other.mLoop;\n        mPlaying = other.mPlaying;\n        mInDurationTime = other.mInDurationTime;\n\n        return *this;\n    }\n\n    void IAnimation::Update(float dt)\n    {\n        if (!mPlaying || mSubControlled)\n            return;\n\n        mTime += mDirection*dt*mSpeed;\n\n        float lastInDurationTime = mInDurationTime;\n\n        UpdateTime();\n\n        float eventCheckBeg = Math::Min(lastInDurationTime, mInDurationTime);\n        float eventCheckEnd = Math::Max(lastInDurationTime, mInDurationTime);\n        for (auto& kv : mTimeEvents)\n        {\n            if (kv.first > eventCheckBeg && kv.first <= eventCheckEnd)\n                kv.second.Invoke();\n        }\n    }\n\n    void IAnimation::SetSubControlled(bool subControlled)\n    {\n        mSubControlled = subControlled;\n    }\n\n    bool IAnimation::IsSubControlled() const\n    {\n        return mSubControlled;\n    }\n\n    void IAnimation::UpdateTime()\n    {\n        if (mLoop == Loop::None)\n        {\n            if (mTime > mEndTime)\n            {\n                mTime = mEndTime;\n                mInDurationTime = mTime;\n                mPlaying = false;\n                Evaluate();\n\n                onStop();\n                onPlayed();\n                OnStop();\n            }\n            else if (mTime < mBeginTime)\n            {\n                mTime = mBeginTime;\n                mInDurationTime = mTime;\n                mPlaying = false;\n                Evaluate();\n\n                onStop();\n                onPlayed();\n                OnStop();\n            }\n            else\n            {\n                mInDurationTime = mTime;\n                Evaluate();\n            }\n        }\n        else if (mLoop == Loop::Repeat)\n        {\n            float x;\n            if (mTime > 0)\n                mInDurationTime = modff(mTime/mDuration, &x)*mDuration;\n            else\n                mInDurationTime = (1.0f - modff(-mTime/mDuration, &x))*mDuration;\n\n            Evaluate();\n        }\n        else //if (mLoop == Loop::PingPong)\n        {\n            float x;\n            if (mTime > 0)\n            {\n                mInDurationTime = modff(mTime/mDuration, &x)*mDuration;\n                if ((int)x%2 == 1)\n                    mInDurationTime = mDuration - mInDurationTime;\n            }\n            else\n            {\n                mInDurationTime = (1.0f - modff(-mTime/mDuration, &x))*mDuration;\n                if ((int)x%2 == 0)\n                    mInDurationTime = mDuration - mInDurationTime;\n            }\n\n            Evaluate();\n        }\n\n        onUpdate(mTime);\n    }\n\n    void IAnimation::Play()\n    {\n        if (mPlaying)\n            return;\n\n        Evaluate();\n\n        mPlaying = true;\n\n        onPlay();\n        OnPlay();\n    }\n\n    void IAnimation::PlayInBounds(float beginTime, float endTime)\n    {\n        mBeginTime = beginTime;\n        mEndTime = endTime;\n\n        Play();\n    }\n\n    void IAnimation::PlayBackInBounds(float beginTime, float endTime)\n    {\n        mBeginTime = beginTime;\n        mEndTime = endTime;\n\n        PlayBack();\n    }\n\n    void IAnimation::TogglePlay()\n    {\n        SetReverse(!IsReversed());\n        Play();\n    }\n\n    void IAnimation::RewindAndPlay()\n    {\n        GoToBegin();\n        Play();\n    }\n\n    void IAnimation::Stop()\n    {\n        if (!mPlaying)\n            return;\n\n        Evaluate();\n\n        mPlaying = false;\n\n        onStop();\n        OnStop();\n    }\n\n    void IAnimation::SetBeginBound(float time)\n    {\n        SetBounds(time, mEndTime);\n    }\n\n    float IAnimation::GetBeginBound() const\n    {\n        return mBeginTime;\n    }\n\n    void IAnimation::SetEndBound(float time)\n    {\n        SetBounds(mBeginTime, time);\n    }\n\n    float IAnimation::GetEndBound() const\n    {\n        return mEndTime;\n    }\n\n    void IAnimation::SetBounds(float beginTime, float endTime)\n    {\n        mBeginTime = Math::Min(beginTime, endTime);\n        mEndTime = Math::Max(beginTime, endTime);\n\n        SetReverse(beginTime > endTime);\n        mTime = Math::Clamp(mTime, mBeginTime, mEndTime);\n\n        Evaluate();\n    }\n\n    void IAnimation::ResetBounds()\n    {\n        mBeginTime = 0.0f;\n        mEndTime = mDuration;\n    }\n\n    void IAnimation::SetPlaying(bool playing)\n    {\n        if (playing)\n            Play();\n        else\n            Stop();\n    }\n\n    bool IAnimation::IsPlaying() const\n    {\n        return mPlaying;\n    }\n\n    void IAnimation::SetTime(float time)\n    {\n        mTime = time;\n        UpdateTime();\n    }\n\n    float IAnimation::GetTime() const\n    {\n        return mTime;\n    }\n\n    float IAnimation::GetLoopTime() const\n    {\n        float duration = GetDuration();\n\n        switch (mLoop) \n        {\n            case Loop::None:\n            return Math::Clamp(mTime, 0.0f, duration);\n\n            case Loop::PingPong:\n            return Math::Mod(mTime, duration)*((int)(mTime / duration) % 2 == 0 ? 1.0f : -1.0f);\n\n            case Loop::Repeat:\n            return Math::Mod(mTime, duration);\n        }\n\n        return mTime;\n    }\n\n    float IAnimation::GetDuration() const\n    {\n        return mEndTime - mBeginTime;\n    }\n\n    void IAnimation::SetRelTime(float relTime)\n    {\n        SetTime(Math::Lerp(mBeginTime, mEndTime, relTime));\n    }\n\n    float IAnimation::GetRelativeTime() const\n    {\n        return mTime/(mEndTime - mBeginTime);\n    }\n\n    float IAnimation::GetInDurationTime() const\n    {\n        return mInDurationTime;\n    }\n\n    void IAnimation::GoToBegin()\n    {\n        SetTime(mBeginTime);\n    }\n\n    void IAnimation::GoToEnd()\n    {\n        SetTime(mEndTime);\n    }\n\n    void IAnimation::PlayForward()\n    {\n        SetReverse(false);\n        Play();\n    }\n\n    void IAnimation::PlayBack()\n    {\n        SetReverse(true);\n        Play();\n    }\n\n    void IAnimation::SetReverse(bool reverse)\n    {\n        mDirection = reverse ? -1.0f : 1.0f;\n    }\n\n    bool IAnimation::IsReversed() const\n    {\n        return mDirection < 0.0f;\n    }\n\n    void IAnimation::SetSpeed(float speed)\n    {\n        mSpeed = speed;\n    }\n\n    float IAnimation::GetSpeed() const\n    {\n        return mSpeed;\n    }\n\n    void IAnimation::SetLoop(Loop loop /*= Loop::Repeat*/)\n    {\n        mLoop = loop;\n        OnLoopChanged();\n    }\n\n    Loop IAnimation::GetLoop() const\n    {\n        return mLoop;\n    }\n\n    void IAnimation::AddTimeEvent(float time, const Function<void()>& eventFunc)\n    {\n        mTimeEvents.Add({ time, eventFunc });\n    }\n\n    void IAnimation::RemoveTimeEvent(float time)\n    {\n        mTimeEvents.RemoveAll([&](auto& x) { return Math::Equals(x.first, time); });\n    }\n\n    void IAnimation::RemoveTimeEvent(const Function<void()>& eventFunc)\n    {\n        mTimeEvents.RemoveAll([=](auto& x) { return x.second == eventFunc; });\n    }\n\n    void IAnimation::RemoveAllTimeEvents()\n    {\n        mTimeEvents.Clear();\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::IAnimation, o2__IAnimation);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/IAnimation.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n\nnamespace o2\n{\n    // -------------------------\n    // Basic animation interface\n    // -------------------------\n    class IAnimation : virtual public ISerializable, public RefCounterable\n    {\n    public:\n        PROPERTIES(IAnimation);\n        PROPERTY(bool, playing, SetPlaying, IsPlaying);            // Is animation playing property\n        PROPERTY(bool, reversed, SetReverse, IsReversed);          // Is animation reversed property @EDITOR_IGNORE\n        PROPERTY(float, speed, SetSpeed, GetSpeed);                // Animation speed. 1.0 is default @EDITOR_IGNORE\n        PROPERTY(float, time, SetTime, GetTime);                   // Animation time @EDITOR_IGNORE\n        PROPERTY(float, relTime, SetRelTime, GetRelativeTime);          // Animation relative time. 0 - is start of animation, 1 - time at duration @EDITOR_IGNORE\n        PROPERTY(float, beginBound, SetBeginBound, GetBeginBound); // Begin playing time bound property @EDITOR_IGNORE\n        PROPERTY(float, endBound, SetEndBound, GetEndBound);       // End playing time bound property @EDITOR_IGNORE\n        PROPERTY(Loop, loop, SetLoop, GetLoop);                    // Loop animation property\n        GETTER(float, duration, GetDuration);                      // Animation duration property\n\n    public:\n        Function<void()>      onPlay;   // Event calling when starting playing\n        Function<void()>      onStop;   // Event calling when stopping playing\n        Function<void()>      onPlayed; // Event calling when finishing playing\n        Function<void(float)> onUpdate; // Event calling on animation update\n\n    public:\n        // Default constructor\n        IAnimation();\n\n        // Default constructor with ref counter\n        explicit IAnimation(RefCounter* refCounter);\n\n        // Copy-constructor\n        IAnimation(const IAnimation& other);\n\n        // Copy-constructor with ref counter\n        IAnimation(RefCounter* refCounter, const IAnimation& other);\n\n        // Virtual destructor\n        virtual ~IAnimation();\n\n        // Assign operator\n        IAnimation& operator=(const IAnimation& other);\n\n        // Updates animation mTime and mInDurationTime, stops and calls events\n        virtual void Update(float dt);\n\n        // Sets sub controlled flag\n        virtual void SetSubControlled(bool subControlled);\n\n        // Returns true if animation is sub controlled\n        virtual bool IsSubControlled() const;\n\n        // Starting playing animation \n        virtual void Play();\n\n        // Starting playing animation in bounds\n        virtual void PlayInBounds(float beginTime, float endTime);\n\n        // Starting playing animation back in bounds\n        virtual void PlayBackInBounds(float beginTime, float endTime);\n\n        // Toggles animation direction\n        virtual void TogglePlay();\n\n        // Rewinds to starts and play animation\n        virtual void RewindAndPlay();\n\n        // Stops animation\n        virtual void Stop();\n\n        // Sets begin time bound\n        virtual void SetBeginBound(float time);\n\n        // Returns begin time bound\n        virtual float GetBeginBound() const;\n\n        // Sets end time bound\n        virtual void SetEndBound(float time);\n\n        // Returns end time bound\n        virtual float GetEndBound() const;\n\n        // Sets animation time bounds\n        virtual void SetBounds(float beginTime, float endTime);\n\n        // Resets bound on range from 0 to duration\n        virtual void ResetBounds();\n\n        // Sets playing flag\n        virtual void SetPlaying(bool playing);\n\n        // Returns true if animation playing\n        virtual bool IsPlaying() const;\n\n        // Sets time\n        virtual void SetTime(float time);\n\n        // Returns time\n        virtual float GetTime() const;\n\n        // Returns time in loop\n        virtual float GetLoopTime() const;\n\n        // Returns duration\n        virtual float GetDuration() const;\n\n        // Sets relative time: 0 - is start of animation, 1 - time at duration\n        virtual void SetRelTime(float relTime);\n\n        // Returns relative time: 0 - is start of animation, 1 - time at duration\n        virtual float GetRelativeTime() const;\n\n        // Returns in duration time. When animtions is looped, in duration time is time from 0 to duration\n        virtual float GetInDurationTime() const;\n\n        // Sets animation time to begin\n        virtual void GoToBegin();\n\n        // Sets animatio time to end\n        virtual void GoToEnd();\n\n        // Starts playing animation forward\n        virtual void PlayForward();\n\n        // Starts animation playing reversed\n        virtual void PlayBack();\n\n        // Sets reverse animation flag\n        virtual void SetReverse(bool reverse);\n\n        // Returns true if animation reversed\n        virtual bool IsReversed() const;\n\n        // Sets animation speed. 1 is default\n        virtual void SetSpeed(float speed);\n\n        // Returns animation speed. 1 is default\n        virtual float GetSpeed() const;\n\n        // Sets animation loop type\n        virtual void SetLoop(Loop loop = Loop::Repeat);\n\n        // Returns animation loop type\n        virtual Loop GetLoop() const;\n\n        // Adds event on time line\n        virtual void AddTimeEvent(float time, const Function<void()>& eventFunc);\n\n        // Removes event by time\n        virtual void RemoveTimeEvent(float time);\n\n        // Removes event\n        virtual void RemoveTimeEvent(const Function<void()>& eventFunc);\n\n        // Removes all events\n        virtual void RemoveAllTimeEvents();\n\n        SERIALIZABLE(IAnimation);\n\n    protected:\n        float mTime = 0.0f;            // Current animation time, can be out of bounds\n        float mInDurationTime = 0.0f ; // In duration time\n        float mDuration = 0.0f;        // Animation duration @SERIALIZABLE\n        float mBeginTime = 0.0f;       // Begin time @SERIALIZABLE\n        float mEndTime = 0.0f;         // End time @SERIALIZABLE\n        float mDirection = 1.0f;       // Animation direction: 1 - forward, -1 - reversed\n        float mSpeed = 1.0f;           // Animation speed, 1 is default @SERIALIZABLE\n        Loop  mLoop = Loop::None;      // Loop type @SERIALIZABLE\n        bool  mPlaying = false;        // True if animation playing @SERIALIZABLE\n        bool  mSubControlled = false;  // True if animation is controlled by parent animation\n\n        Vector<Pair<float, Function<void()>>> mTimeEvents; // Animation time events\n\n    protected:\n        // Updates mTime and mInDurationTime\n        void UpdateTime();\n\n        // Called for updating animated object, after updating time\n        virtual void Evaluate() {}\n\n        // Called when animation starts playing\n        virtual void OnPlay() {}\n\n        // Called when animation stops playing\n        virtual void OnStop() {}\n\n        // Called when animation loop state changed\n        virtual void OnLoopChanged() {}\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::IAnimation)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::IAnimation)\n{\n    FIELD().PUBLIC().NAME(playing);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(reversed);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(speed);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(time);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(relTime);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(beginBound);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(endBound);\n    FIELD().PUBLIC().NAME(loop);\n    FIELD().PUBLIC().NAME(duration);\n    FIELD().PUBLIC().NAME(onPlay);\n    FIELD().PUBLIC().NAME(onStop);\n    FIELD().PUBLIC().NAME(onPlayed);\n    FIELD().PUBLIC().NAME(onUpdate);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mInDurationTime);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mDuration);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mBeginTime);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mEndTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(1.0f).NAME(mDirection);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mSpeed);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Loop::None).NAME(mLoop);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mPlaying);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mSubControlled);\n    FIELD().PROTECTED().NAME(mTimeEvents);\n}\nEND_META;\nCLASS_METHODS_META(o2::IAnimation)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const IAnimation&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const IAnimation&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSubControlled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSubControlled);\n    FUNCTION().PUBLIC().SIGNATURE(void, Play);\n    FUNCTION().PUBLIC().SIGNATURE(void, PlayInBounds, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, PlayBackInBounds, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, TogglePlay);\n    FUNCTION().PUBLIC().SIGNATURE(void, RewindAndPlay);\n    FUNCTION().PUBLIC().SIGNATURE(void, Stop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBeginBound, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBeginBound);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEndBound, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetEndBound);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBounds, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, ResetBounds);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPlaying, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPlaying);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTime, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetTime);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetLoopTime);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRelTime, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetRelativeTime);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInDurationTime);\n    FUNCTION().PUBLIC().SIGNATURE(void, GoToBegin);\n    FUNCTION().PUBLIC().SIGNATURE(void, GoToEnd);\n    FUNCTION().PUBLIC().SIGNATURE(void, PlayForward);\n    FUNCTION().PUBLIC().SIGNATURE(void, PlayBack);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetReverse, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsReversed);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSpeed, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSpeed);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLoop, Loop);\n    FUNCTION().PUBLIC().SIGNATURE(Loop, GetLoop);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddTimeEvent, float, const Function<void()>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTimeEvent, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTimeEvent, const Function<void()>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllTimeEvents);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTime);\n    FUNCTION().PROTECTED().SIGNATURE(void, Evaluate);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPlay);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStop);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLoopChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationColor4Track.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationColor4Track.h\"\n\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2/Scene/Components/AnimationComponent.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n\nnamespace o2\n{\n    AnimationTrack<Color4>::AnimationTrack()\n    {}\n\n    AnimationTrack<Color4>::AnimationTrack(const AnimationTrack<Color4>& other) :\n        IAnimationTrack(other), mKeys(other.mKeys)\n    {}\n\n    AnimationTrack<Color4>& AnimationTrack<Color4>::operator=(const AnimationTrack<Color4>& other)\n    {\n        IAnimationTrack::operator =(other);\n        mKeys = other.mKeys;\n\n        onKeysChanged();\n\n        return *this;\n    }\n\n    Color4 AnimationTrack<Color4>::GetValue(float position) const\n    {\n        int cacheKey = 0, cacheKeyApporx = 0;\n        return GetValue(position, true, cacheKey, cacheKeyApporx);\n    }\n\n    Color4 AnimationTrack<Color4>::GetValue(float position, bool direction, int& cacheKey, int& cacheKeyApprox) const\n    {\n        int count = mKeys.Count();\n\n        if (count == 1)\n            return mKeys[0].value;\n        else if (count == 0)\n            return Color4();\n\n        int prevCacheKey = cacheKey;\n        int keyLeftIdx = -1, rightKeyIdx = -1;\n        SearchKey(mKeys, count, position, keyLeftIdx, rightKeyIdx, direction, cacheKey);\n\n        if (keyLeftIdx < 0)\n            return Color4();\n\n        const Key& leftKey = mKeys[keyLeftIdx];\n        const Key& rightKey = mKeys[rightKeyIdx];\n\n        float coef = (position - leftKey.position)/(rightKey.position - leftKey.position);\n        return Math::Lerp(leftKey.value, rightKey.value, coef);\n    }\n\n    void AnimationTrack<Color4>::BeginKeysBatchChange()\n    {\n        mBatchChange = true;\n    }\n\n    void AnimationTrack<Color4>::CompleteKeysBatchingChange()\n    {\n        mBatchChange = false;\n        mChangedKeys = false;\n    }\n\n    float AnimationTrack<Color4>::GetDuration() const\n    {\n        return mKeys.IsEmpty() ? 0.0f : mKeys.Last().position;\n    }\n\n    Ref<IAnimationTrack::IPlayer> AnimationTrack<Color4>::CreatePlayer() const\n    {\n        return mmake<Player>();\n    }\n\n    void AnimationTrack<Color4>::AddKeys(const Vector<Key>& keys)\n    {\n        for (auto& key : keys)\n            AddKey(key);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            onKeysChanged();\n    }\n\n    int AnimationTrack<Color4>::AddKey(const Key& key)\n    {\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > key.position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        pos = Math::Clamp(pos, 0, mKeys.Count());\n        mKeys.Insert(key, pos);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            onKeysChanged();\n\n        return pos;\n    }\n\n    int AnimationTrack<Color4>::AddKey(const Key& key, float position)\n    {\n        Key newkey = key;\n        newkey.position = position;\n        return AddKey(newkey);\n    }\n\n    int AnimationTrack<Color4>::AddKey(float position, const Color4& value)\n    {\n        return AddKey(Key(position, value));\n    }\n\n    bool AnimationTrack<Color4>::RemoveKey(float position)\n    {\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (Math::Equals(mKeys[i].position, position))\n            {\n                mKeys.RemoveAt(i);\n\n                if (mBatchChange)\n                    mChangedKeys = true;\n                else\n                    onKeysChanged();\n\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    bool AnimationTrack<Color4>::RemoveKeyAt(int idx)\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return false;\n\n        mKeys.RemoveAt(idx);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            onKeysChanged();\n\n        return true;\n    }\n\n    void AnimationTrack<Color4>::RemoveAllKeys()\n    {\n        mKeys.Clear();\n        onKeysChanged();\n    }\n\n    bool AnimationTrack<Color4>::ContainsKey(float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return true;\n        }\n\n        return false;\n    }\n\n    const Vector<AnimationTrack<Color4>::Key>& AnimationTrack<Color4>::GetKeys() const\n    {\n        return mKeys;\n    }\n\n    AnimationTrack<Color4>::Key AnimationTrack<Color4>::GetKey(float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return key;\n        }\n\n        return Key();\n    }\n\n    AnimationTrack<Color4>::Key AnimationTrack<Color4>::GetKeyAt(int idx) const\n    {\n        return mKeys[idx];\n    }\n\n    void AnimationTrack<Color4>::SetKey(int idx, const Key& key)\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return;\n\n        mKeys[idx] = key;\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            onKeysChanged();\n    }\n\n    AnimationTrack<Color4>::Key AnimationTrack<Color4>::FindKey(UInt64 uid) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return key;\n        }\n\n        return Key();\n    }\n\n    int AnimationTrack<o2::Color4>::FindKeyIdx(UInt64 uid) const\n    {\n        int idx = 0;\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return idx;\n\n            idx++;\n        }\n\n        return -1;\n    }\n\n    void AnimationTrack<Color4>::SetKeys(const Vector<Key>& keys)\n    {\n        mKeys = keys;\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            onKeysChanged();\n    }\n\n    AnimationTrack<Color4>::Key AnimationTrack<Color4>::operator[](float position) const\n    {\n        return GetKey(position);\n    }\n\n    Vector<AnimationTrack<Color4>::Key> AnimationTrack<Color4>::GetKeysNonContant()\n    {\n        return mKeys;\n    }\n\n    AnimationTrack<Color4> AnimationTrack<Color4>::Linear(const Color4& begin, const Color4& end, float duration /*= 1.0f*/)\n    {\n        AnimationTrack<Color4> res;\n        res.AddKey(0.0f, begin);\n        res.AddKey(duration, end);\n        return res;\n    }\n\n    AnimationTrack<Color4>::Key::Key() :\n        uid(Math::Random()), position(0)\n    {}\n\n    AnimationTrack<Color4>::Key::Key(const Color4& value) :\n        uid(Math::Random()), position(0), value(value)\n    {}\n\n    AnimationTrack<Color4>::Key& AnimationTrack<Color4>::Key::operator=(const Color4& value)\n    {\n        this->value = value;\n        return *this;\n    }\n\n    AnimationTrack<Color4>::Key::operator Color4() const\n    {\n        return value;\n    }\n\n    AnimationTrack<Color4>::Key::Key(float position, const Color4& value) :\n        uid(Math::Random()), position(position), value(value)\n    {}\n\n    AnimationTrack<Color4>::Key::Key(const Key& other) :\n        uid(other.uid), position(other.position), value(other.value)\n    {}\n\n    AnimationTrack<Color4>::Key& AnimationTrack<Color4>::Key::operator=(const Key& other)\n    {\n        uid = other.uid;\n        position = other.position;\n        value = other.value;\n\n        return *this;\n    }\n\n    bool AnimationTrack<Color4>::Key::operator==(const Key& other) const\n    {\n        return position == other.position && value == other.value;\n    }\n\n    AnimationTrack<Color4>::Player::Player():\n        IPlayer()\n    {}\n\n    AnimationTrack<Color4>::Player::~Player()\n    {}\n\n    AnimationTrack<Color4>::Player::operator Color4() const\n    {\n        return mCurrentValue;\n    }\n\n    void AnimationTrack<Color4>::Player::SetTarget(Color4* value)\n    {\n        mTargetProxy = nullptr;\n        mTarget = value;\n    }\n\n    void AnimationTrack<Color4>::Player::SetTargetProxy(const Ref<IValueProxy<Color4>>& proxy)\n    {\n        mTarget = nullptr;\n        mTargetProxy = proxy;\n    }\n\n    void AnimationTrack<Color4>::Player::SetTrack(const Ref<AnimationTrack<Color4>>& track)\n    {\n        mTrack = track;\n        IPlayer::SetTrack(track);\n    }\n\n    void AnimationTrack<Color4>::Player::SetTargetVoid(void* target)\n    {\n        SetTarget((Color4*)target);\n    }\n\n    void AnimationTrack<Color4>::Player::SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy)\n    {\n        SetTargetProxy(DynamicCast<IValueProxy<Color4>>(targetProxy));\n    }\n\n    void AnimationTrack<Color4>::Player::SetTrack(const Ref<IAnimationTrack>& track)\n    {\n        SetTrack(DynamicCast<AnimationTrack<Color4>>(track));\n    }\n\n    Color4 AnimationTrack<Color4>::Player::GetValue() const\n    {\n        return mCurrentValue;\n    }\n\n    const Ref<AnimationTrack<Color4>>& AnimationTrack<Color4>::Player::GetTrackT() const\n    {\n        return mTrack;\n    }\n\n    Ref<IAnimationTrack> AnimationTrack<Color4>::Player::GetTrack() const\n    {\n        return mTrack;\n    }\n\n    void AnimationTrack<Color4>::Player::Evaluate()\n    {\n\n        mPrevInDurationTime = mInDurationTime;\n\n        if (mTrack->GetKeys().IsEmpty())\n        {\n            mCurrentValue = mTarget ? *mTarget : mTargetProxy ? mTargetProxy->GetValue() : Color4();\n            return;\n        }\n\n        mCurrentValue = mTrack->GetValue(mInDurationTime, mInDurationTime > mPrevInDurationTime, \n                                         mPrevKey, mPrevKeyApproximation);\n\n        if (mTarget)\n            *mTarget = mCurrentValue;\n        else if (mTargetProxy)\n            mTargetProxy->SetValue(mCurrentValue);\n    }\n\n    void AnimationTrack<Color4>::Player::RegMixer(const Ref<AnimationState>& state, const String& path)\n    {\n        state->mOwner.Lock()->RegValueTrack<Color4>(Ref(this), path, state);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationTrack<o2::Color4>, o2__AnimationTrack_o2__Color4_);\n\nDECLARE_CLASS(o2::AnimationTrack<o2::Color4>::Player, o2__AnimationTrack_o2__Color4___Player);\n\nDECLARE_CLASS(o2::AnimationTrack<o2::Color4>::Key, o2__AnimationTrack_o2__Color4___Key);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationColor4Track.h",
    "content": "#pragma once\n\n#include \"AnimationTrack.h\"\n#include \"o2/Utils/Math/Color.h\"\n\nnamespace o2\n{\n    // --------------------\n    // Animated Color4 value\n    // --------------------\n    template<>\n    class AnimationTrack<o2::Color4>: public IAnimationTrack\n    {\n    public:\n        typedef o2::Color4 ValueType;\n        class Key;\n\n    public:\n        PROPERTIES(AnimationTrack<o2::Color4>);\n        PROPERTY(Vector<Key>, keys, SetKeys, GetKeysNonContant); // Keys property\n\n    public:\n        // Default constructor\n        AnimationTrack();\n\n        // Copy-constructor\n        AnimationTrack(const AnimationTrack<Color4>& other);\n\n        // Assign operator\n        AnimationTrack<Color4>& operator=(const AnimationTrack<Color4>& other);\n\n        // Returns value at time\n        Color4 GetValue(float position) const;\n\n        // Returns value at time\n        Color4 GetValue(float position, bool direction, int& cacheKey, int& cacheKeyApprox) const;\n\n        // Called when beginning keys batch change. After this call all keys modifications will not be update approximation\n        // Used for optimizing many keys change\n        void BeginKeysBatchChange() override;\n\n        // Called when keys batch change completed. Updates approximation\n        void CompleteKeysBatchingChange() override;\n\n        // Returns track duration\n        float GetDuration() const override;\n\n        // Creates track-type specific player\n        Ref<IPlayer> CreatePlayer() const override;\n\n        // Adds keys\n        void AddKeys(const Vector<Key>& keys);\n\n        // Adds single key\n        int AddKey(const Key& key);\n\n        // Adds key at position\n        int AddKey(const Key& key, float position);\n\n        // Adds key\n        int AddKey(float position, const Color4& value);\n\n        // Removes key at position\n        bool RemoveKey(float position);\n\n        // Removes key by index\n        bool RemoveKeyAt(int idx);\n\n        // Removes all keys\n        void RemoveAllKeys();\n\n        // Returns true if animation contains key at position\n        bool ContainsKey(float position) const;\n\n        // Returns keys array\n        const Vector<Key>& GetKeys() const;\n\n        // Sets key at position\n        void SetKey(int idx, const Key& key);\n\n        // Returns key at position\n        Key GetKey(float position) const;\n\n        // Returns key at index\n        Key GetKeyAt(int idx) const;\n\n        // Returns key by uid\n        Key FindKey(UInt64 uid) const;\n\n        // Returns key index by uid\n        int FindKeyIdx(UInt64 uid) const;\n\n        // Sets keys\n        void SetKeys(const Vector<Key>& keys);\n\n        // Returns key by position\n        Key operator[](float position) const;\n\n        // Returns tween animation from begin to end in duration with linear transition\n        static AnimationTrack<Color4> Linear(const Color4& begin, const Color4& end, float duration = 1.0f);\n\n        SERIALIZABLE(AnimationTrack<Color4>);\n        CLONEABLE_REF(AnimationTrack<Color4>);\n\n    public:\n        // ----------------------\n        // Animation track player\n        // ----------------------\n        class Player: public IPlayer\n        {\n        public:\n            PROPERTIES(Player);\n            GETTER(o2::Color4, value, GetValue);    // Current value getter\n            SETTER(o2::Color4*, target, SetTarget); // Bind target setter\n\n        public:\n            // Default constructor\n            Player();\n\n            // Destructor\n            ~Player();\n\n            // Value type cast operator\n            operator Color4() const;\n\n            // Sets target pointer\n                void SetTarget(Color4* value);\n\n            // Sets target property pointer\n            void SetTargetProxy(const Ref<IValueProxy<Color4>>& setter);\n\n            // Sets animation track\n            void SetTrack(const Ref<AnimationTrack<Color4>>& track);\n\n            // Returns animation track\n            const Ref<AnimationTrack<Color4>>& GetTrackT() const;\n\n            // Sets target by void pointer\n            void SetTargetVoid(void* target) override;\n\n            // Sets target property by void pointer\n            void SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy) override;\n\n            // Sets animation track\n            void SetTrack(const Ref<IAnimationTrack>& track) override;\n\n            // Returns animation track\n            Ref<IAnimationTrack> GetTrack() const override;\n\n            // Returns current value\n            Color4 GetValue() const;\n\n            IOBJECT(Player);\n\n        protected:\n            Ref<AnimationTrack<Color4>> mTrack; // Animation track\n\n            Color4 mCurrentValue; // Current animation track\n\n            float mPrevInDurationTime = 0.0f; // Previous evaluation in duration time\n            int   mPrevKey = 0;               // Previous evaluation key index\n            int   mPrevKeyApproximation = 0;  // Previous evaluation key approximation index\n\n            Color4*                  mTarget = nullptr; // Animation target value pointer   \n            Ref<IValueProxy<Color4>> mTargetProxy;      // Animation target proxy pointer\n\n        protected:\n            // Evaluates value\n            void Evaluate() override;\n\n            // Registering this in animatable value agent\n            void RegMixer(const Ref<AnimationState>& state, const String& path) override;\n        };\n\n    public:\n        // -------------\n        // Animation key\n        // -------------\n        class Key: public ISerializable\n        {\n        public:\n            UInt64 uid;      // Random unique id @SERIALIZABLE\n            float  position; // Position on time line, in seconds @SERIALIZABLE\n            Color4  value;     // Value @SERIALIZABLE\n\n        public:\n            // Default constructor\n            Key();\n\n            // Constructor from value\n            Key(const Color4& value);\n\n            // Constructor from position and value\n            Key(float position, const Color4& value);\n\n            // Copy-constructor\n            Key(const Key& other);\n\n            // Assign operator from other key\n            Key& operator=(const Key& other);\n\n            // Assign operator from value\n            Key& operator=(const Color4& value);\n\n            // Value type cast operator\n            operator Color4() const;\n\n            // Equals operator\n            bool operator==(const Key& other) const;\n\n            SERIALIZABLE(Key);\n            };\n\n    protected:\n        bool mBatchChange = false; // It is true when began batch change\n        bool mChangedKeys = false; // It is true when some keys changed during batch change\n\n        Vector<Key> mKeys; // Animation keys @SERIALIZABLE\n\n    protected:\n        // Returns keys (for property)\n        Vector<Key> GetKeysNonContant();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationTrack<o2::Color4>)\n{\n    BASE_CLASS(o2::IAnimationTrack);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationTrack<o2::Color4>)\n{\n    FIELD().PUBLIC().NAME(keys);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mBatchChange);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mChangedKeys);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mKeys);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationTrack<o2::Color4>)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationTrack<Color4>&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetValue, float, bool, int&, int&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysBatchChange);\n    FUNCTION().PUBLIC().SIGNATURE(void, CompleteKeysBatchingChange);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IPlayer>, CreatePlayer);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, const Key&, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, float, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllKeys);\n    FUNCTION().PUBLIC().SIGNATURE(bool, ContainsKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Key>&, GetKeys);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKey, int, const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(Key, FindKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindKeyIdx, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<Color4>, Linear, const Color4&, const Color4&, float);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Key>, GetKeysNonContant);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AnimationTrack<o2::Color4>::Player)\n{\n    BASE_CLASS(IPlayer);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationTrack<o2::Color4>::Player)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(target);\n    FIELD().PROTECTED().NAME(mTrack);\n    FIELD().PROTECTED().NAME(mCurrentValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mPrevInDurationTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevKey);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevKeyApproximation);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mTarget);\n    FIELD().PROTECTED().NAME(mTargetProxy);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationTrack<o2::Color4>::Player)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTarget, Color4*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IValueProxy<Color4>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<AnimationTrack<Color4>>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationTrack<Color4>>&, GetTrackT);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetVoid, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<IAnimationTrack>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationTrack>, GetTrack);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetValue);\n    FUNCTION().PROTECTED().SIGNATURE(void, Evaluate);\n    FUNCTION().PROTECTED().SIGNATURE(void, RegMixer, const Ref<AnimationState>&, const String&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AnimationTrack<o2::Color4>::Key)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationTrack<o2::Color4>::Key)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(uid);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(position);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(value);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationTrack<o2::Color4>::Key)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Color4&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(float, const Color4&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Key&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationFloatTrack.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationFloatTrack.h\"\n\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2/Scene/Components/AnimationComponent.h\"\n\nnamespace o2\n{\n    AnimationTrack<float>::AnimationTrack()\n    {\n        curve->onKeysChanged.Add(this, &AnimationTrack<float>::OnCurveChanged);\n    }\n\n    AnimationTrack<float>::AnimationTrack(const AnimationTrack<float>& other):\n        IAnimationTrack(other), curve(other.curve)\n    {\n        curve->onKeysChanged.Add(this, &AnimationTrack<float>::OnCurveChanged);\n    }\n\n    AnimationTrack<float>& AnimationTrack<float>::operator=(const AnimationTrack<float>& other)\n    {\n        IAnimationTrack::operator=(other);\n        curve = other.curve;\n\n        onKeysChanged();\n\n        return *this;\n    }\n\n    float AnimationTrack<float>::GetValue(float position) const\n    {\n        int cacheKey = 0;\n        int cacheKeyApprox = 0;\n        return GetValue(position, true, cacheKey, cacheKeyApprox);\n    }\n\n    float AnimationTrack<float>::GetValue(float position, bool direction, int& cacheKey, int& cacheKeyApprox) const\n    {\n        return curve->Evaluate(position, 0.0f, direction, cacheKey, cacheKeyApprox);\n    }\n\n    void AnimationTrack<float>::BeginKeysBatchChange()\n    {\n        curve->BeginKeysBatchChange();\n    }\n\n    void AnimationTrack<float>::CompleteKeysBatchingChange()\n    {\n        curve->CompleteKeysBatchingChange();\n    }\n\n    float AnimationTrack<float>::GetDuration() const\n    {\n        return curve->Length();\n    }\n\n    Ref<IAnimationTrack::IPlayer> AnimationTrack<float>::CreatePlayer() const\n    {\n        return mmake<Player>();\n    }\n\n    void AnimationTrack<float>::AddKeys(Vector<Vec2F> values, float smooth /*= 1.0f*/)\n    {\n        curve->AppendKeys(values, smooth);\n    }\n\n    int AnimationTrack<float>::AddKey(const Key& key)\n    {\n        return curve->InsertKey(key);\n    }\n\n    int AnimationTrack<float>::AddKey(const Key& key, float position)\n    {\n        Key newKey = key;\n        newKey.position = position;\n        return curve->InsertKey(newKey);\n    }\n\n    int AnimationTrack<float>::AddSmoothKey(const Key& key, float smooth)\n    {\n        return curve->InsertKey(key.position, key.value, smooth);\n    }\n\n    int AnimationTrack<float>::AddKey(float position, float value, float leftCoef, float leftCoefPosition,\n                                      float rightCoef, float rightCoefPosition)\n    {\n        return curve->InsertKey(position, value, 0.0f, leftCoef, leftCoefPosition, rightCoef, rightCoefPosition);\n    }\n\n    int AnimationTrack<float>::AddKey(float position, float value, float smooth /*= 1.0f*/)\n    {\n        return curve->InsertKey(position, value, 0.0f, smooth);\n    }\n\n    bool AnimationTrack<float>::RemoveKey(float position)\n    {\n        return curve->RemoveKey(position);\n    }\n\n    bool AnimationTrack<float>::RemoveKeyAt(int idx)\n    {\n        return curve->RemoveKeyAt(idx);\n    }\n\n    void AnimationTrack<float>::RemoveAllKeys()\n    {\n        curve->RemoveAllKeys();\n    }\n\n    bool AnimationTrack<float>::ContainsKey(float position) const\n    {\n        return curve->ContainsKey(position);\n    }\n\n    const Vector<AnimationTrack<float>::Key>& AnimationTrack<float>::GetKeys() const\n    {\n        return curve->GetKeys();\n    }\n\n    AnimationTrack<float>::Key AnimationTrack<float>::GetKey(float position) const\n    {\n        return curve->GetKey(position);\n    }\n\n    AnimationTrack<float>::Key AnimationTrack<float>::GetKeyAt(int idx) const\n    {\n        return curve->GetKeyAt(idx);\n    }\n\n    void AnimationTrack<float>::SetKey(int idx, const Key& key)\n    {\n        curve->SetKey(key, idx);\n    }\n\n    AnimationTrack<float>::Key AnimationTrack<float>::FindKey(UInt64 uid) const\n    {\n        return curve->FindKey(uid);\n    }\n\n    int AnimationTrack<float>::FindKeyIdx(UInt64 uid) const\n    {\n        return curve->FindKeyIdx(uid);\n    }\n\n    void AnimationTrack<float>::SetKeys(const Vector<Key>& keys)\n    {\n        curve->SetKeys(keys);\n    }\n\n    void AnimationTrack<float>::SmoothKey(float position, float smooth)\n    {\n        curve->SmoothKey(position, smooth);\n    }\n\n    AnimationTrack<float>::Key AnimationTrack<float>::operator[](float position) const\n    {\n        return curve->GetKey(position);\n    }\n\n    Vector<AnimationTrack<float>::Key> AnimationTrack<float>::GetKeysNonContant()\n    {\n        return curve->GetKeys();\n    }\n\n    void AnimationTrack<float>::OnCurveChanged()\n    {\n        onKeysChanged();\n    }\n\n    void AnimationTrack<float>::OnDeserialized(const DataValue& node)\n\t{\n\t\tcurve->onKeysChanged.Add(this, &AnimationTrack<float>::OnCurveChanged);\n\t}\n\n    AnimationTrack<float> AnimationTrack<float>::Parametric(float begin, float end, float duration,\n                                                            float beginCoef, float beginCoefPosition,\n                                                            float endCoef, float endCoefPosition)\n    {\n        AnimationTrack<float> res;\n        res.curve = mmake<Curve>(Curve::Parametric(begin, end, duration, beginCoef, beginCoefPosition, endCoef, endCoefPosition));\n        return res;\n    }\n\n\n    AnimationTrack<float> AnimationTrack<float>::EaseIn(float begin /*= 0.0f*/, float end /*= 1.0f*/, float duration /*= 1.0f*/,\n                                                        float strongness /*= 0.4f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, strongness, 1.0f, 1.0f);\n    }\n\n    AnimationTrack<float> AnimationTrack<float>::EaseOut(float begin /*= 0.0f*/, float end /*= 1.0f*/, float duration /*= 1.0f*/,\n                                                         float strongness /*= 0.4f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.0f, 1.0f, strongness);\n    }\n\n    AnimationTrack<float> AnimationTrack<float>::EaseInOut(float begin /*= 0.0f*/, float end /*= 1.0f*/, float duration /*= 1.0f*/,\n                                                           float strongness /*= 0.4f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, strongness, 1.0f, 1.0f);\n    }\n\n    AnimationTrack<float> AnimationTrack<float>::Linear(float begin /*= 0.0f*/, float end /*= 1.0f*/, float duration /*= 1.0f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.0f, 1.0f, 1.0f);\n    }\n\n    AnimationTrack<float>::Player::Player():\n        IPlayer()\n    {}\n\n    AnimationTrack<float>::Player::~Player()\n    {}\n\n    AnimationTrack<float>::Player::operator float() const\n    {\n        return mCurrentValue;\n    }\n\n    void AnimationTrack<float>::Player::SetTarget(float* value)\n    {\n        mTargetProxy = nullptr;\n        mTarget = value;\n    }\n\n    void AnimationTrack<float>::Player::SetTargetProxy(const Ref<IValueProxy<float>>& proxy)\n    {\n        mTarget = nullptr;\n        mTargetProxy = proxy;\n    }\n\n    void AnimationTrack<float>::Player::SetTrack(const Ref<AnimationTrack<float>>& track)\n    {\n        mTrack = track;\n        IPlayer::SetTrack(track);\n    }\n\n    const Ref<AnimationTrack<float>>& AnimationTrack<float>::Player::GetTrackT() const\n    {\n        return mTrack;\n    }\n\n    void AnimationTrack<float>::Player::SetTargetVoid(void* target)\n    {\n        SetTarget((float*)target);\n    }\n\n    void AnimationTrack<float>::Player::SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy)\n    {\n        SetTargetProxy(DynamicCast<IValueProxy<float>>(targetProxy));\n    }\n\n    void AnimationTrack<float>::Player::SetTrack(const Ref<IAnimationTrack>& track)\n    {\n        SetTrack(DynamicCast<AnimationTrack<float>>(track));\n    }\n\n    Ref<IAnimationTrack> AnimationTrack<float>::Player::GetTrack() const\n    {\n        return mTrack;\n    }\n\n    float AnimationTrack<float>::Player::GetValue() const\n    {\n        return mCurrentValue;\n\t}\n\n\tvoid AnimationTrack<float>::Player::OnPlay()\n\t{\n        mRandomRangeCoef = Math::Random(0.0f, 1.0f);\n\t}\n\n    void AnimationTrack<float>::Player::Evaluate()\n    {\n        if (!mTrack)\n            return;\n\n        mPrevInDurationTime = mInDurationTime;\n\n        if (mTrack->curve->IsEmpty())\n        {\n            mCurrentValue = mTarget ? *mTarget : mTargetProxy ? mTargetProxy->GetValue() : 0.0f;\n            return;\n        }\n\n        mCurrentValue = mTrack->curve->Evaluate(mInDurationTime, mRandomRangeCoef, mInDurationTime > mPrevInDurationTime, mPrevKey, mPrevKeyApproximation);\n\n        if (mTarget)\n            *mTarget = mCurrentValue;\n        else if (mTargetProxy)\n            mTargetProxy->SetValue(mCurrentValue);\n    }\n\n    void AnimationTrack<float>::Player::RegMixer(const Ref<AnimationState>& state, const String& path)\n    {\n        state->mOwner.Lock()->RegValueTrack<float>(Ref(this), path, state);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationTrack<float>, o2__AnimationTrack_float_);\n\nDECLARE_CLASS(o2::AnimationTrack<float>::Player, o2__AnimationTrack_float___Player);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationFloatTrack.h",
    "content": "#pragma once\n\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n\nnamespace o2\n{\n    // ------------------------------\n    // Animated float value interface\n    // ------------------------------\n    template<>\n    class AnimationTrack<float>: public IAnimationTrack\n    {\n    public:\n        typedef float ValueType;\n        typedef Curve::Key Key;\n\n    public:\n        PROPERTIES(AnimationTrack<float>);\n        PROPERTY(Vector<Key>, keys, SetKeys, GetKeysNonContant); // Keys property\n\n    public:\n        Ref<Curve> curve = mmake<Curve>(); // Animation curve @SERIALIZABLE\n\n    public:\n        // Default constructor\n        AnimationTrack();\n\n        // Copy-constructor\n        AnimationTrack(const AnimationTrack<float>& other);\n\n        // Assign operator\n        AnimationTrack<float>& operator=(const AnimationTrack<float>& other);\n\n        // Returns value at time\n        float GetValue(float position) const;\n\n        // Returns value at time\n        float GetValue(float position, bool direction, int& cacheKey, int& cacheKeyApprox) const;\n\n        // Called when beginning keys batch change. After this call all keys modifications will not be update approximation\n        // Used for optimizing many keys change\n        void BeginKeysBatchChange() override;\n\n        // Called when keys batch change completed. Updates approximation\n        void CompleteKeysBatchingChange() override;\n\n        // Returns track duration\n        float GetDuration() const override;\n\n        // Creates track-type specific player\n        Ref<IPlayer> CreatePlayer() const override;\n\n        // Adds key with smoothing\n        void AddKeys(Vector<Vec2F> values, float smooth = 1.0f);\n\n        // Adds single key\n        int AddKey(const Key& key);\n\n        // Adds key at position\n        int AddKey(const Key& key, float position);\n\n        // Adds and smooths key\n        int AddSmoothKey(const Key& key, float smooth);\n\n        // Adds key\n        int AddKey(float position, float value, float leftCoef, float leftCoefPosition,\n                   float rightCoef, float rightCoefPosition);\n\n        // Adds key at position with value and smoothing\n        int AddKey(float position, float value, float smooth = 1.0f);\n\n        // Removes key at position\n        bool RemoveKey(float position);\n\n        // Removes key by index\n        bool RemoveKeyAt(int idx);\n\n        // Removes all keys\n        void RemoveAllKeys();\n\n        // Returns true if animation contains key at position\n        bool ContainsKey(float position) const;\n\n        // Returns keys array\n        const Vector<Key>& GetKeys() const;\n\n        // Sets key at position\n        void SetKey(int idx, const Key& key);\n\n        // Returns key at position\n        Key GetKey(float position) const;\n\n        // Returns key at index\n        Key GetKeyAt(int idx) const;\n\n        // Returns key by uid\n        Key FindKey(UInt64 uid) const;\n\n        // Returns key index by uid\n        int FindKeyIdx(UInt64 uid) const;\n\n        // Sets keys\n        void SetKeys(const Vector<Key>& keys);\n\n        // Smooths key at position\n        void SmoothKey(float position, float smooth);\n\n        // Returns key by position\n        Key operator[](float position) const;\n\n        // Returns parametric specified Animation track\n        // Sample: Parametric(someBegin, someEnd, 1.0f, 0.0f, 0.4f, 1.0f, 0.6f) \n        static AnimationTrack<float> Parametric(float begin, float end, float duration,\n                                                float beginCoef, float beginCoefPosition,\n                                                float endCoef, float endCoefPosition);\n\n        // Returns tween animation from begin to end in duration with ease in\n        static AnimationTrack<float> EaseIn(float begin = 0.0f, float end = 1.0f, float duration = 1.0f, float strongness = 0.4f);\n\n        // Returns tween animation from begin to end in duration with ease out\n        static AnimationTrack<float> EaseOut(float begin = 0.0f, float end = 1.0f, float duration = 1.0f, float strongness = 0.4f);\n\n        // Returns tween animation from begin to end in duration with ease in-out\n        static AnimationTrack<float> EaseInOut(float begin = 0.0f, float end = 1.0f, float duration = 1.0f, float strongness = 0.4f);\n\n        // Returns tween animation from begin to end in duration with linear transition\n        static AnimationTrack<float> Linear(float begin = 0.0f, float end = 1.0f, float duration = 1.0f);\n\n        SERIALIZABLE(AnimationTrack<float>);\n        CLONEABLE_REF(AnimationTrack<float>);\n\n    public:\n        class Player: public IPlayer\n        {\n        public:\n            PROPERTIES(Player);\n            GETTER(float, value, GetValue);    // Current value getter \n            SETTER(float*, target, SetTarget); // Bind target setter\n\n        public:\n            // Default constructor\n            Player();\n\n            // Destructor\n            ~Player();\n\n            // Value type cast operator\n            operator float() const;\n\n            // Sets target pointer\n            void SetTarget(float* value);\n\n            // Sets target property pointer\n            void SetTargetProxy(const Ref<IValueProxy<float>>& proxy);\n\n            // Sets animation track\n            void SetTrack(const Ref<AnimationTrack<float>>& track);\n\n            // Returns animation track\n            const Ref<AnimationTrack<float>>& GetTrackT() const;\n\n            // Sets target by void pointer\n            void SetTargetVoid(void* target) override;\n\n            // Sets target property by void pointer\n            void SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy) override;\n\n            // Sets animation track\n            void SetTrack(const Ref<IAnimationTrack>& track) override;\n\n            // Returns animation track\n            Ref<IAnimationTrack> GetTrack() const override;\n\n            // Returns current value\n            float GetValue() const;\n\n            IOBJECT(Player);\n\n        protected:\n            Ref<AnimationTrack<float>> mTrack = nullptr; // Animation track\n\n            float mCurrentValue; // Current animation track\n\n            float mPrevInDurationTime = 0.0f; // Previous evaluation in duration time\n            int   mPrevKey = 0;               // Previous evaluation key index\n\t\t\tint   mPrevKeyApproximation = 0;  // Previous evaluation key approximation index\n\n\t\t\tfloat mRandomRangeCoef = 0.0f; // Random range coefficient for value approximation\n\n            float*                  mTarget = nullptr; // Animation target value pointer\n            Ref<IValueProxy<float>> mTargetProxy;      // Animation target proxy pointer\n\n\t\tprotected:\n\t\t\t// Called when animation started playing, updates random range coefficient\n\t\t\tvoid OnPlay() override;\n\n            // Evaluates value\n            void Evaluate() override;\n\n            // Registering this in value mixer\n            void RegMixer(const Ref<AnimationState>& state, const String& path) override;\n        };\n\n    protected:\n        // Returns keys (for property)\n        Vector<Key> GetKeysNonContant();\n\n        // Called when curve updated keys and calculated duration\n        void OnCurveChanged();\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationTrack<float>)\n{\n    BASE_CLASS(o2::IAnimationTrack);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationTrack<float>)\n{\n    FIELD().PUBLIC().NAME(keys);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(mmake<Curve>()).NAME(curve);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationTrack<float>)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationTrack<float>&);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetValue, float, bool, int&, int&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysBatchChange);\n    FUNCTION().PUBLIC().SIGNATURE(void, CompleteKeysBatchingChange);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IPlayer>, CreatePlayer);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddKeys, Vector<Vec2F>, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, const Key&, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddSmoothKey, const Key&, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, float, float, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllKeys);\n    FUNCTION().PUBLIC().SIGNATURE(bool, ContainsKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Key>&, GetKeys);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKey, int, const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(Key, FindKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindKeyIdx, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SmoothKey, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<float>, Parametric, float, float, float, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<float>, EaseIn, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<float>, EaseOut, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<float>, EaseInOut, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<float>, Linear, float, float, float);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Key>, GetKeysNonContant);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurveChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AnimationTrack<float>::Player)\n{\n    BASE_CLASS(IPlayer);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationTrack<float>::Player)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(target);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mTrack);\n    FIELD().PROTECTED().NAME(mCurrentValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mPrevInDurationTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevKey);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevKeyApproximation);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mRandomRangeCoef);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mTarget);\n    FIELD().PROTECTED().NAME(mTargetProxy);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationTrack<float>::Player)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTarget, float*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IValueProxy<float>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<AnimationTrack<float>>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationTrack<float>>&, GetTrackT);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetVoid, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<IAnimationTrack>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationTrack>, GetTrack);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetValue);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPlay);\n    FUNCTION().PROTECTED().SIGNATURE(void, Evaluate);\n    FUNCTION().PROTECTED().SIGNATURE(void, RegMixer, const Ref<AnimationState>&, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationSubTrack.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationSubTrack.h\"\n\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2/Scene/Components/AnimationComponent.h\"\n\nnamespace o2\n{\n    AnimationSubTrack::AnimationSubTrack()\n    {}\n\n    AnimationSubTrack::AnimationSubTrack(const AnimationSubTrack& other):\n        IAnimationTrack(other), mSubTrackBeginTime(other.mSubTrackBeginTime), mSubTrackDuration(other.mSubTrackDuration),\n        mSubTrackBeginOffset(other.mSubTrackBeginOffset), mSubTrackEndOffset(other.mSubTrackEndOffset)\n    {}\n\n    AnimationSubTrack& AnimationSubTrack::operator=(const AnimationSubTrack& other)\n    {\n        IAnimationTrack::operator=(other);\n\n        mSubTrackBeginTime = other.mSubTrackBeginTime;\n        mSubTrackDuration = other.mSubTrackDuration;\n        mSubTrackBeginOffset = other.mSubTrackBeginOffset;\n        mSubTrackEndOffset = other.mSubTrackEndOffset;\n\n        onKeysChanged();\n\n        return *this;\n    }\n\n    float AnimationSubTrack::GetDuration() const\n    {\n        return mSubTrackDuration + mSubTrackBeginTime;\n    }\n\n    Ref<IAnimationTrack::IPlayer> AnimationSubTrack::CreatePlayer() const\n    {\n        return mmake<Player>();\n    }\n\n    void AnimationSubTrack::SetBeginTime(float beginTime)\n    {\n        mSubTrackBeginTime = beginTime;\n\n        onKeysChanged();\n    }\n\n    float AnimationSubTrack::GetBeginTime() const\n    {\n        return mSubTrackBeginTime;\n    }\n\n    float AnimationSubTrack::GetSubTrackDuration() const\n    {\n        return mSubTrackDuration;\n    }\n\n    void AnimationSubTrack::SetSubTrackBeginOffset(float offset)\n    {\n        mSubTrackBeginOffset = offset;\n\n        onKeysChanged();\n    }\n\n    float AnimationSubTrack::GetSubTrackBeginOffset() const\n    {\n        return mSubTrackBeginOffset;\n    }\n\n    void AnimationSubTrack::SetSubTrackEndOffset(float offset)\n    {\n        mSubTrackEndOffset = offset;\n\n        onKeysChanged();\n    }\n\n    float AnimationSubTrack::GetSubTrackEndOffset() const\n    {\n        return mSubTrackEndOffset;\n    }\n\n    void AnimationSubTrack::OnDeserialized(const DataValue& node)\n    {}\n\n    AnimationSubTrack::Player::Player():\n        IPlayer()\n    {}\n\n    AnimationSubTrack::Player::~Player()\n    {}\n\n    void AnimationSubTrack::Player::SetTarget(IAnimation* value)\n    {\n        mTarget = value;\n        mTarget->SetSubControlled(true);\n\n        UpdateSubTrackDuration();\n    }\n\n    void AnimationSubTrack::Player::SetTrack(const Ref<AnimationSubTrack>& track)\n    {\n        mTrack = track;\n        IPlayer::SetTrack(track);\n    }\n\n    void* AnimationSubTrack::Player::AdjustTargetType(void* target, const Type& type)\n    {\n        if (type == TypeOf(IAnimation))\n            return target;\n\n        const Type* originalType = &type;\n        if (originalType->GetUsage() == Type::Usage::StringAccessor)\n        {\n            originalType = dynamic_cast<const StringPointerAccessorType*>(originalType)->GetReturnType();\n\n            if (originalType->GetUsage() == Type::Usage::Reference)\n                originalType = dynamic_cast<const ReferenceType*>(originalType)->GetBaseType();\n        }\n        else if (originalType->GetUsage() == Type::Usage::Reference)\n        {\n            auto refType = dynamic_cast<const ReferenceType*>(originalType);\n            target = refType->GetObjectRawPtr(target);\n            originalType = refType->GetBaseType();\n        }\n\n        if (auto objectOriginalType = dynamic_cast<const ObjectType*>(originalType))\n        {\n            IObject* iobject = objectOriginalType->DynamicCastToIObject(target);\n            return dynamic_cast<IAnimation*>(iobject);\n        }\n\n        return nullptr;\n    }\n\n    const Ref<AnimationSubTrack>& AnimationSubTrack::Player::GetTrackT() const\n    {\n        return mTrack;\n    }\n\n    void AnimationSubTrack::Player::SetTargetVoid(void* target)\n    {\n        SetTarget((IAnimation*)target);\n    }\n\n    void AnimationSubTrack::Player::SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy)\n    {}\n\n    void AnimationSubTrack::Player::SetTrack(const Ref<IAnimationTrack>& track)\n    {\n        SetTrack(DynamicCast<AnimationSubTrack>(track));\n    }\n\n    Ref<IAnimationTrack> AnimationSubTrack::Player::GetTrack() const\n    {\n        return mTrack;\n    }\n\n    void AnimationSubTrack::Player::Evaluate()\n    {\n        if (!mTrack)\n            return;\n\n        if (mTarget)\n        {\n            if (mTime >= mTrack->mSubTrackBeginTime + mTrack->mSubTrackBeginOffset &&\n                mTime <= mTrack->mSubTrackBeginTime + mTrack->mSubTrackDuration - mTrack->mSubTrackEndOffset)\n            {\n                float subTrackTime = mTime - mTrack->mSubTrackBeginTime;\n                mTarget->SetTime(subTrackTime);\n            }\n        }\n    }\n\n    void AnimationSubTrack::Player::RegMixer(const Ref<AnimationState>& state, const String& path)\n    {\n        state->mOwner.Lock()->RegSubTrack(Ref(this), path, state);\n    }\n\n    void AnimationSubTrack::Player::UpdateSubTrackDuration()\n    {\n        if (mTrack && mTarget)\n            mTrack->mSubTrackDuration = mTarget->GetDuration();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationSubTrack, o2__AnimationSubTrack);\n\nDECLARE_CLASS(o2::AnimationSubTrack::Player, o2__AnimationSubTrack__Player);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationSubTrack.h",
    "content": "#pragma once\n\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------\n    // Animation sub track. Controls nested animation tracks\n    // -----------------------------------------------------\n    class AnimationSubTrack: public IAnimationTrack\n    {\n    public:\n        PROPERTIES(AnimationSubTrack);\n        PROPERTY(float, beginTime, SetBeginTime, GetBeginTime);                               // Begin time\n        GETTER(float, subTrackDuration, GetSubTrackDuration)                                  // Sub track duration    \n        PROPERTY(float, subTrackBeginOffset, SetSubTrackBeginOffset, GetSubTrackBeginOffset); // Sub track begin offset\n        PROPERTY(float, subTrackEndOffset, SetSubTrackEndOffset, GetSubTrackEndOffset);       // Sub track end offset\n\n    public:\n        // Default constructor\n        AnimationSubTrack();\n\n        // Copy-constructor\n        AnimationSubTrack(const AnimationSubTrack& other);\n\n        // Assign operator\n        AnimationSubTrack& operator=(const AnimationSubTrack& other);\n\n        // Returns track duration\n        float GetDuration() const override;\n\n        // Creates track-type specific player\n        Ref<IPlayer> CreatePlayer() const override;\n\n        // Sets track begin time\n        void SetBeginTime(float beginTime);\n\n        // Returns track begin time\n        float GetBeginTime() const;\n\n        // Returns sub track duration\n        float GetSubTrackDuration() const;\n\n        // Sets sub track begin offset\n        void SetSubTrackBeginOffset(float offset);\n\n        // Returns sub track begin offset\n        float GetSubTrackBeginOffset() const;\n\n        // Sets sub track end offset\n        void SetSubTrackEndOffset(float offset);\n\n        // Returns sub track end offset\n        float GetSubTrackEndOffset() const;\n\n        SERIALIZABLE(AnimationSubTrack);\n        CLONEABLE_REF(AnimationSubTrack);\n\n    public:\n        class Player: public IPlayer\n        {\n        public:\n            PROPERTIES(Player);\n            SETTER(IAnimation*, target, SetTarget); // Bind target setter\n\n        public:\n            // Default constructor\n            Player();\n\n            // Destructor\n            ~Player();\n\n            // Sets target pointer\n            void SetTarget(IAnimation* value);\n\n            // Sets animation track\n            void SetTrack(const Ref<AnimationSubTrack>& track);\n\n            // Returns animation track\n            const Ref<AnimationSubTrack>& GetTrackT() const;\n\n            // Sets target by void pointer\n            void SetTargetVoid(void* target) override;\n\n            // Sets target property by void pointer\n            void SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy) override;\n\n            // Sets animation track\n            void SetTrack(const Ref<IAnimationTrack>& track) override;\n\n            // Adjusts target type to correct one. Casts to IAnimation\n            void* AdjustTargetType(void* target, const Type& type) override;\n\n            // Returns animation track\n            Ref<IAnimationTrack> GetTrack() const override;\n\n            IOBJECT(Player);\n\n        protected:\n            Ref<AnimationSubTrack> mTrack = nullptr; // Animation track\n\n            float mPrevInDurationTime = 0.0f; // Previous evaluation in duration time\n\n            IAnimation* mTarget = nullptr; // Animation target value pointer\n\n        protected:\n            // Evaluates value\n            void Evaluate() override;\n\n            // Registering this in value mixer\n            void RegMixer(const Ref<AnimationState>& state, const String& path) override;\n\n            // Checks and updates sub track time\n            void UpdateSubTrackDuration();\n        };\n\n    protected:\n        float mSubTrackBeginTime = 0.0f;   // Begin sub tracktime @SERIALIZABLE\n        float mSubTrackDuration = 1.0f;    // Sub track duration @SERIALIZABLE\n        float mSubTrackBeginOffset = 0.0f; // Sub track begin offset @SERIALIZABLE\n        float mSubTrackEndOffset = 0.0f;   // Sub track end offset @SERIALIZABLE\n\n    protected:\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationSubTrack)\n{\n    BASE_CLASS(o2::IAnimationTrack);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationSubTrack)\n{\n    FIELD().PUBLIC().NAME(beginTime);\n    FIELD().PUBLIC().NAME(subTrackDuration);\n    FIELD().PUBLIC().NAME(subTrackEndOffset);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mSubTrackBeginTime);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mSubTrackDuration);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mSubTrackBeginOffset);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mSubTrackEndOffset);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationSubTrack)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationSubTrack&);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IPlayer>, CreatePlayer);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBeginTime, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBeginTime);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSubTrackDuration);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSubTrackBeginOffset, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSubTrackBeginOffset);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSubTrackEndOffset, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSubTrackEndOffset);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AnimationSubTrack::Player)\n{\n    BASE_CLASS(o2::IAnimationTrack::IPlayer);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationSubTrack::Player)\n{\n    FIELD().PUBLIC().NAME(target);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mTrack);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mPrevInDurationTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mTarget);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationSubTrack::Player)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTarget, IAnimation*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<AnimationSubTrack>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationSubTrack>&, GetTrackT);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetVoid, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<IAnimationTrack>&);\n    FUNCTION().PUBLIC().SIGNATURE(void*, AdjustTargetType, void*, const Type&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationTrack>, GetTrack);\n    FUNCTION().PROTECTED().SIGNATURE(void, Evaluate);\n    FUNCTION().PROTECTED().SIGNATURE(void, RegMixer, const Ref<AnimationState>&, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateSubTrackDuration);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationTrack.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationTrack.h\"\n\n#include \"o2/Scene/Components/AnimationComponent.h\"\n#include \"o2/Utils/Math/Color.h\"\n\nnamespace o2\n{\n    //FORWARD_REF_IMPL(AnimationState);\n}\n\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(o2::AnimationTrack<bool>, o2__AnimationTrack_bool_);\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(o2::AnimationTrack<bool>::Key, o2__AnimationTrack_bool___Key);\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(o2::AnimationTrack<bool>::Player, o2__AnimationTrack_bool___Player);\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(o2::AnimationTrack<int>, o2__AnimationTrack_int_);\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(o2::AnimationTrack<int>::Key, o2__AnimationTrack_int___Key);\nDECLARE_TEMPLATE_CLASS_MANUAL_ID(o2::AnimationTrack<int>::Player, o2__AnimationTrack_int___Player);\n\n\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationTrack.h",
    "content": "#pragma once\n\n#include \"o2/Animation/IAnimation.h\"\n#include \"o2/Animation/Tracks/IAnimationTrack.h\"\n#include \"o2/Utils/Math/Curve.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n#include \"o2/Utils/Memory/MemoryManager.h\"\n#include \"o2/Utils/Tools/KeySearch.h\"\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(AnimationState);\n    \n    // ------------------------\n    // Template Animation track\n    // ------------------------\n    template<typename _type>\n    class AnimationTrack: public IAnimationTrack\n    {\n    public:\n        typedef _type ValueType;\n        class Key;\n\n    public:\n        PROPERTIES(AnimationTrack<_type>);\n        PROPERTY(Vector<Key>, keys, SetKeys, GetKeysNonContant); // Keys property\n\n    public:\n        // Default constructor\n        AnimationTrack();\n\n        // Copy-constructor\n        AnimationTrack(const AnimationTrack<_type>& other);\n\n        // Assign operator\n        AnimationTrack<_type>& operator=(const AnimationTrack<_type>& other);\n\n        // Returns value at time\n        _type GetValue(float position) const;\n\n        // Returns value at time, with cached state\n        _type GetValue(float position, bool direction, int& cacheKey, int& cacheKeyApprox) const;\n\n        // Called when beginning keys batch change. After this call all keys modifications will not be update approximation\n        // Used for optimizing many keys change\n        void BeginKeysBatchChange() override;\n\n        // Called when keys batch change completed. Updates approximation\n        void CompleteKeysBatchingChange() override;\n\n        // Returns track duration\n        float GetDuration() const override;\n\n        // Creates track-type specific player\n        Ref<IPlayer> CreatePlayer() const override;\n\n        // Adds key with smoothing\n        void AddKeys(Vector<Key> keys, float smooth = 1.0f);\n\n        // Adds single key\n        int AddKey(const Key& key);\n\n        // Adds key at position\n        int AddKey(const Key& key, float position);\n\n        // Adds and smooths key\n        int AddSmoothKey(const Key& key, float smooth);\n\n        // Adds key\n        int AddKey(float position, const _type& value, float leftCoef, float leftCoefPosition,\n                   float rightCoef, float rightCoefPosition);\n\n        // Adds key at position with value and smoothing\n        int AddKey(float position, const _type& value, float smooth = 1.0f);\n\n        // Removes key at position\n        bool RemoveKey(float position);\n\n        // Removes key by index\n        bool RemoveKeyAt(int idx);\n\n        // Removes all keys\n        void RemoveAllKeys();\n\n        // Returns true if animation contains key at position\n        bool ContainsKey(float position) const;\n\n        // Returns keys array\n        const Vector<Key>& GetKeys() const;\n\n        // Sets key at position\n        void SetKey(int idx, const Key& key);\n\n        // Returns key at position\n        Key GetKey(float position) const;\n\n        // Returns key at index\n        Key GetKeyAt(int idx) const;\n\n        // Returns key by uid\n        Key FindKey(UInt64 uid) const;\n\n        // Returns key index by uid\n        int FindKeyIdx(UInt64 uid) const;\n\n        // Sets keys\n        void SetKeys(const Vector<Key>& keys);\n\n        // Smooths key at position\n        void SmoothKey(float position, float smooth);\n\n        // Returns key by position\n        Key operator[](float position) const;\n\n        // Returns parametric specified Animation track\n        // Sample: Parametric(someBegin, someEnd, 1.0f, 0.0f, 0.4f, 1.0f, 0.6f) \n        static AnimationTrack<_type> Parametric(const _type& begin, const _type& end, float duration,\n                                                float beginCoef, float beginCoefPosition,\n                                                float endCoef, float endCoefPosition);\n\n        // Returns tween animation from begin to end in duration with ease in\n        static AnimationTrack<_type> EaseIn(const _type& begin, const _type& end, float duration = 1.0f);\n\n        // Returns tween animation from begin to end in duration with ease out\n        static AnimationTrack<_type> EaseOut(const _type& begin, const _type& end, float duration = 1.0f);\n\n        // Returns tween animation from begin to end in duration with ease in-out\n        static AnimationTrack<_type> EaseInOut(const _type& begin, const _type& end, float duration = 1.0f);\n\n        // Returns tween animation from begin to end in duration with linear transition\n        static AnimationTrack<_type> Linear(const _type& begin, const _type& end, float duration = 1.0f);\n\n        SERIALIZABLE(AnimationTrack<_type>);\n        CLONEABLE_REF(AnimationTrack<_type>);\n\n    public:\n        // ----------------------\n        // Animation track player\n        // ----------------------\n        class Player: public IPlayer\n        {\n        public:\n            PROPERTIES(Player);\n            GETTER(_type, value, GetValue);    // Current value getter\n            SETTER(_type*, target, SetTarget); // Bind target setter\n\n        public:\n            // Default constructor\n            Player();\n\n            // Destructor\n            ~Player();\n\n            // Value type cast operator\n            operator _type() const;\n\n            // Sets target pointer\n            void SetTarget(_type* value);\n\n            // Sets target property pointer\n            void SetTargetProxy(const Ref<IValueProxy<_type>>& proxy);\n\n            // Sets animation track\n            void SetTrack(const Ref<AnimationTrack<_type>>& track);\n\n            // Returns animation track\n            const Ref<AnimationTrack<_type>>& GetTrackT() const;\n\n            // Sets target by void pointer\n            void SetTargetVoid(void* target) override;\n\n            // Sets target property by void pointer\n            void SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy) override;\n\n            // Sets animation track\n            void SetTrack(const Ref<IAnimationTrack>& track) override;\n\n            // Returns animation track\n            Ref<IAnimationTrack> GetTrack() const override;\n\n            // Returns current value\n            _type GetValue() const;\n\n            IOBJECT(Player);\n\n        protected:\n            Ref<AnimationTrack<_type>> mTrack; // Animation track\n\n            _type mCurrentValue; // Current animation track\n\n            float mPrevInDurationTime = 0.0f; // Previous evaluation in duration time\n            int   mPrevKey = 0;               // Previous evaluation key index\n            int   mPrevKeyApproximation = 0;  // Previous evaluation key approximation index\n\n            _type*                  mTarget = nullptr; // Animation target value pointer\n            Ref<IValueProxy<_type>> mTargetProxy;      // Animation target proxy pointer\n\n        protected:\n            // Evaluates value\n            void Evaluate() override;\n\n            // Registering this in animation component values mixer\n            void RegMixer(const Ref<AnimationState>& state, const String& path) override;\n        };\n\n        // -------------\n        // Animation key\n        // -------------\n        class Key: public ISerializable\n        {\n        public:\n            UInt64 uid;                  // Random unique id @SERIALIZABLE\n            float  position;             // Position on time line, in seconds @SERIALIZABLE\n            _type  value = _type();      // Value @SERIALIZABLE\n            float  leftSupportValue;     // Transition curve coefficient for previous animation segment @SERIALIZABLE\n            float  leftSupportPosition;  // Transition curve coefficient position for previous animation segment (must be in 0...1) @SERIALIZABLE\n            float  rightSupportValue;    // Transition curve coefficient for next animation segment @SERIALIZABLE\n            float  rightSupportPosition; // Transition curve coefficient position for next animation segment (must be in 0...1)@SERIALIZABLE\n\n        public:\n            // Default constructor\n            Key();\n\n            // Constructor from value\n            Key(const _type& value);\n\n            // Constructor from position and value\n            Key(float position, const _type& value);\n\n            // Constructor\n            Key(float position, const _type& value, float leftSupportValue, float leftSupportPosition,\n                float rightSupportValue, float rightSupportPosition);\n\n            // Copy-constructor\n            Key(const Key& other);\n\n            // Assign operator from other key\n            Key& operator=(const Key& other);\n\n            // Assign operator from value\n            Key& operator=(const _type& value);\n\n            // Value type cast operator\n            operator _type() const;\n\n            // Equals operator\n            bool operator==(const Key& other) const;\n\n            SERIALIZABLE(Key);\n\n        public:\n            static const int   mApproxValuesCount = 10;                // Transition curve approximation values count\n            ApproximationValue mCurveApproxValues[mApproxValuesCount]; // Transition curve approximation values\n        };\n\n    protected:\n        bool mBatchChange = false; // It is true when began batch change\n        bool mChangedKeys = false; // It is true when some keys changed during batch change\n\n        Vector<Key> mKeys; // Animation keys @SERIALIZABLE\n\n    protected:\n        // Returns keys (for property)\n        Vector<Key> GetKeysNonContant();\n\n        // Updates keys approximation\n        void UpdateApproximation();\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n    };\n}\n\nnamespace o2\n{\n    // ------------------------------\n    // Animation track implementation \n    // ------------------------------\n\n    template<typename _type>\n    AnimationTrack<_type>::AnimationTrack()\n    {}\n\n    template<typename _type>\n    AnimationTrack<_type>::AnimationTrack(const AnimationTrack<_type>& other):\n        IAnimationTrack(other), mKeys(other.mKeys)\n    {}\n\n    template<typename _type>\n    AnimationTrack<_type>& AnimationTrack<_type>::operator=(const AnimationTrack<_type>& other)\n    {\n        IAnimationTrack::operator=(other);\n        mKeys = other.mKeys;\n\n        onKeysChanged();\n\n        return *this;\n    }\n\n    template<typename _type>\n    _type AnimationTrack<_type>::GetValue(float position) const\n    {\n        int cacheKey = 0, cacheKeyApprox = 0;\n        return GetValue(position, true, cacheKey, cacheKeyApprox);\n    }\n\n    template<typename _type>\n    _type AnimationTrack<_type>::GetValue(float position, bool direction, int& cacheKey, int& cacheKeyApprox) const\n    {\n        int count = mKeys.Count();\n\n        if (count == 1)\n            return mKeys[0].value;\n        else if (count == 0)\n            return _type();\n\n        int prevCacheKey = cacheKey;\n        int keyLeftIdx = -1, keyRightIdx = -1;\n        SearchKey(mKeys, count, position, keyLeftIdx, keyRightIdx, direction, cacheKey);\n\n        if (keyLeftIdx < 0)\n            return _type();\n\n        const Key& leftKey = mKeys[keyLeftIdx];\n        const Key& rightKey = mKeys[keyRightIdx];\n\n        int segLeftIdx = 0;\n        int segRightIdx = 1;\n\n        if (keyLeftIdx != prevCacheKey)\n            cacheKeyApprox = 0;\n\n        SearchKey(rightKey.mCurveApproxValues, Key::mApproxValuesCount, position, segLeftIdx, segRightIdx, direction, cacheKeyApprox);\n\n        const ApproximationValue& segLeft = rightKey.mCurveApproxValues[segLeftIdx];\n        const ApproximationValue& segRight = rightKey.mCurveApproxValues[segRightIdx];\n\n        float dist = segRight.position - segLeft.position;\n        float coef = (position - segLeft.position) / dist;\n        float curveCoef = Math::Lerp(segLeft.value, segRight.value, coef);\n\n        return Math::Lerp(leftKey.value, rightKey.value, curveCoef);\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::BeginKeysBatchChange()\n    {\n        mBatchChange = true;\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::CompleteKeysBatchingChange()\n    {\n        UpdateApproximation();\n        mBatchChange = false;\n        mChangedKeys = false;\n    }\n\n    template<typename _type>\n    float AnimationTrack<_type>::GetDuration() const\n    {\n        return mKeys.IsEmpty() ? 0.0f : mKeys.Last().position;\n    }\n\n    template<typename _type>\n    Ref<IAnimationTrack::IPlayer> AnimationTrack<_type>::CreatePlayer() const\n    {\n        return mmake<Player>();\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::AddKeys(Vector<Key> keys, float smooth /*= 1.0f*/)\n    {\n        for (auto& key : keys)\n            AddKey(key, smooth);\n\n        for (auto& key : keys)\n            SmoothKey(key.position, smooth);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    template<typename _type>\n    int AnimationTrack<_type>::AddKey(const Key& key)\n    {\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > key.position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        pos = Math::Clamp(pos, 0, mKeys.Count());\n        mKeys.Insert(key, pos);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return pos;\n    }\n\n    template<typename _type>\n    int AnimationTrack<_type>::AddKey(const Key& key, float position)\n    {\n        Key newkey = key;\n        newkey.position = position;\n        return AddKey(newkey);\n    }\n\n    template<typename _type>\n    int AnimationTrack<_type>::AddSmoothKey(const Key& key, float smooth)\n    {\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > key.position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        pos = Math::Clamp(pos, 0, mKeys.Count());\n        mKeys.Insert(key, pos);\n\n        SmoothKey(key.position, smooth);\n\n        return pos;\n    }\n\n    template<typename _type>\n    int AnimationTrack<_type>::AddKey(float position, const _type& value,\n                                      float leftCoef, float leftCoefPosition,\n                                      float rightCoef, float rightCoefPosition)\n    {\n        return AddKey(Key(position, value, leftCoef, leftCoefPosition, rightCoef, rightCoefPosition));\n    }\n\n    template<typename _type>\n    int AnimationTrack<_type>::AddKey(float position, const _type& value, float smooth /*= 1.0f*/)\n    {\n        return AddSmoothKey(Key(position, value, 0.0f, 0.0f, 1.0f, 1.0f), smooth);\n    }\n\n    template<typename _type>\n    typename AnimationTrack<_type>::Key AnimationTrack<_type>::GetKey(float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return key;\n        }\n\n        return Key();\n    }\n\n    template<typename _type>\n    typename AnimationTrack<_type>::Key AnimationTrack<_type>::GetKeyAt(int idx) const\n    {\n        return mKeys[idx];\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::SetKey(int idx, const Key& key)\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return;\n\n        mKeys[idx] = key;\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    template<typename _type>\n    typename AnimationTrack<_type>::Key AnimationTrack<_type>::FindKey(UInt64 uid) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return key;\n        }\n\n        return Key();\n    }\n\n    template<typename _type>\n    int AnimationTrack<_type>::FindKeyIdx(UInt64 uid) const\n    {\n        int idx = 0;\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return idx;\n\n            idx++;\n        }\n\n        return -1;\n    }\n\n    template<typename _type>\n    bool AnimationTrack<_type>::RemoveKey(float position)\n    {\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (Math::Equals(mKeys[i].position, position))\n            {\n                mKeys.RemoveAt(i);\n\n                if (mBatchChange)\n                    mChangedKeys = true;\n                else\n                    UpdateApproximation();\n\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    template<typename _type>\n    bool AnimationTrack<_type>::RemoveKeyAt(int idx)\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return false;\n\n        mKeys.RemoveAt(idx);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return true;\n    }\n\n\n    template<typename _type>\n    void AnimationTrack<_type>::RemoveAllKeys()\n    {\n        mKeys.Clear();\n        onKeysChanged();\n    }\n\n    template<typename _type>\n    bool AnimationTrack<_type>::ContainsKey(float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return true;\n        }\n\n        return false;\n    }\n\n    template<typename _type>\n    const Vector<typename AnimationTrack<_type>::Key>& AnimationTrack<_type>::GetKeys() const\n    {\n        return mKeys;\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::SetKeys(const Vector<Key>& keys)\n    {\n        mKeys = keys;\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::SmoothKey(float position, float smooth)\n    {\n        int pos = 0;\n\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (Math::Equals(mKeys[i].position, position))\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        float baseSmooth = 0.4f;\n        float resSmooth = baseSmooth*smooth;\n\n        mKeys[pos].leftSupportValue = 1.0f;\n        mKeys[pos].leftSupportPosition = 1.0f - resSmooth;\n\n        mKeys[pos].rightSupportValue = 0.0f;\n        mKeys[pos].rightSupportPosition = resSmooth;\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    template<typename _type>\n    typename AnimationTrack<_type>::Key AnimationTrack<_type>::operator[](float position) const\n    {\n        return GetKey(position);\n    }\n\n    template<typename _type>\n    Vector<typename AnimationTrack<_type>::Key> AnimationTrack<_type>::GetKeysNonContant()\n    {\n        return mKeys;\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::UpdateApproximation()\n    {\n        for (int i = 1; i < mKeys.Count(); i++)\n        {\n            Key& beginKey = mKeys[i - 1];\n            Key& endKey = mKeys[i];\n\n            beginKey.leftSupportPosition = Math::Clamp01(beginKey.leftSupportPosition);\n            endKey.rightSupportPosition = Math::Clamp01(endKey.rightSupportPosition);\n\n            Vec2F curvea(beginKey.position, 0.0f);\n            Vec2F curveb(Math::Lerp(beginKey.position, endKey.position, beginKey.rightSupportPosition), beginKey.rightSupportValue);\n            Vec2F curvec(Math::Lerp(beginKey.position, endKey.position, endKey.leftSupportPosition), endKey.leftSupportValue);\n            Vec2F curved(endKey.position, 1.0f);\n\n            for (int j = 0; j < Key::mApproxValuesCount; j++)\n            {\n                float coef = (float)j/(float)(Key::mApproxValuesCount - 1); \\\n                    endKey.mCurveApproxValues[j] = Bezier(curvea, curveb, curvec, curved, coef);\n            }\n        }\n\n        onKeysChanged();\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::OnDeserialized(const DataValue& node)\n    {\n        UpdateApproximation();\n    }\n\n    template<typename _type>\n    AnimationTrack<_type> AnimationTrack<_type>::Parametric(const _type& begin, const _type& end, float duration,\n                                                            float beginCoef, float beginCoefPosition,\n                                                            float endCoef, float endCoefPosition)\n    {\n        AnimationTrack<_type> res;\n        res.AddKey(0.0f, begin, 0.0f, 0.0f, beginCoef, beginCoefPosition*duration);\n        res.AddKey(duration*duration, end, endCoef, endCoefPosition, 0.0f, 0.0f);\n        return res;\n    }\n\n    template<typename _type>\n    AnimationTrack<_type> AnimationTrack<_type>::EaseIn(const _type& begin, const _type& end, float duration /*= 1.0f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.5f, 1.0f, 1.0f);\n    }\n\n    template<typename _type>\n    AnimationTrack<_type> AnimationTrack<_type>::EaseOut(const _type& begin, const _type& end, float duration /*= 1.0f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.0f, 1.0f, 0.5f);\n    }\n\n    template<typename _type>\n    AnimationTrack<_type> AnimationTrack<_type>::EaseInOut(const _type& begin, const _type& end, float duration /*= 1.0f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.4f, 1.0f, 1.0f);\n    }\n\n    template<typename _type>\n    AnimationTrack<_type> AnimationTrack<_type>::Linear(const _type& begin, const _type& end, float duration /*= 1.0f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.0f, 1.0f, 1.0f);\n    }\n\n    // ----------------------------------\n    // Animation track key implementation\n    // ----------------------------------\n\n    template<typename _type>\n    AnimationTrack<_type>::Key::Key():\n        uid(Math::Random()), position(0), leftSupportValue(1.0f), leftSupportPosition(1.0f), rightSupportValue(0.0f), rightSupportPosition(0.0f)\n    {}\n\n    template<typename _type>\n    AnimationTrack<_type>::Key::Key(const _type& value) :\n        uid(Math::Random()), position(0), leftSupportValue(1.0f), leftSupportPosition(1.0f), rightSupportValue(0.0f), rightSupportPosition(0.0f),\n        value(value)\n    {}\n\n    template<typename _type>\n    AnimationTrack<_type>::Key::Key(float position, const _type& value):\n        uid(Math::Random()), position(position), leftSupportValue(1.0f), leftSupportPosition(1.0f), rightSupportValue(0.0f), rightSupportPosition(0.0f),\n        value(value)\n    {}\n\n    template<typename _type>\n    AnimationTrack<_type>::Key::Key(float position, const _type& value,\n                                    float leftSupportValue, float leftSupportPosition,\n                                    float rightSupportValue, float rightSupportPosition):\n        uid(Math::Random()), position(position), leftSupportValue(leftSupportValue), leftSupportPosition(leftSupportPosition),\n        rightSupportValue(rightSupportValue), rightSupportPosition(rightSupportPosition), value(value)\n    {}\n\n    template<typename _type>\n    AnimationTrack<_type>::Key::Key(const Key& other):\n        uid(other.uid), position(other.position), leftSupportValue(other.leftSupportValue), leftSupportPosition(other.leftSupportPosition),\n        rightSupportValue(other.rightSupportValue), rightSupportPosition(other.rightSupportPosition), value(other.value)\n    {\n        memcpy(mCurveApproxValues, other.mCurveApproxValues, mApproxValuesCount*sizeof(Vec2F));\n    }\n\n    template<typename _type>\n    typename AnimationTrack<_type>::Key& AnimationTrack<_type>::Key::operator=(const _type& value)\n    {\n        this->value = value;\n        return *this;\n    }\n\n    template<typename _type>\n    AnimationTrack<_type>::Key::operator _type() const\n    {\n        return value;\n    }\n\n    template<typename _type>\n    typename AnimationTrack<_type>::Key& AnimationTrack<_type>::Key::operator=(const Key& other)\n    {\n        uid = other.uid;\n        position = other.position;\n        value = other.value;\n        leftSupportValue = other.leftSupportValue;\n        leftSupportPosition = other.leftSupportPosition;\n        rightSupportValue = other.rightSupportValue;\n        rightSupportPosition = other.rightSupportPosition;\n\n        memcpy(mCurveApproxValues, other.mCurveApproxValues, mApproxValuesCount*sizeof(Vec2F));\n\n        return *this;\n    }\n\n    template<typename _type>\n    bool AnimationTrack<_type>::Key::operator==(const Key& other) const\n    {\n        return Math::Equals(position, other.position) && Math::Equals(value, other.value);\n    }\n\n    // ---------------------\n    // Player implementation\n    // ---------------------\n\n    template<typename _type>\n    AnimationTrack<_type>::Player::Player()\n    {}\n\n    template<typename _type>\n    AnimationTrack<_type>::Player::~Player()\n    {}\n\n    template<typename _type>\n    AnimationTrack<_type>::Player::operator _type() const\n    {\n        return mCurrentValue;\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::Player::SetTarget(_type* value)\n    {\n        mTargetProxy = nullptr;\n        mTarget = value;\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::Player::SetTargetProxy(const Ref<IValueProxy<_type>>& proxy)\n    {\n        mTarget = nullptr;\n        mTargetProxy = proxy;\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::Player::SetTargetVoid(void* target)\n    {\n        SetTarget((_type*)target);\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::Player::SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy)\n    {\n        SetTargetProxy(DynamicCast<IValueProxy<_type>>(targetProxy));\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::Player::SetTrack(const Ref<AnimationTrack<_type>>& track)\n    {\n        mTrack = track;\n        IPlayer::SetTrack(track);\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::Player::SetTrack(const Ref<IAnimationTrack>& track)\n    {\n        SetTrack(DynamicCast<AnimationTrack<_type>>(track));\n    }\n\n    template<typename _type>\n    Ref<IAnimationTrack> AnimationTrack<_type>::Player::GetTrack() const\n    {\n        return mTrack;\n    }\n\n    template<typename _type>\n    const Ref<AnimationTrack<_type>>& AnimationTrack<_type>::Player::GetTrackT() const\n    {\n        return mTrack;\n    }\n\n    template<typename _type>\n    _type AnimationTrack<_type>::Player::GetValue() const\n    {\n        return mCurrentValue;\n    }\n\n    template<typename _type>\n    void AnimationTrack<_type>::Player::Evaluate()\n    {\n        mPrevInDurationTime = mInDurationTime;\n\n        if (mTrack->GetKeys().IsEmpty())\n        {\n            mCurrentValue = mTarget ? *mTarget : mTargetProxy ? mTargetProxy->GetValue() : _type();\n            return;\n        }\n\n        mCurrentValue = mTrack->GetValue(mInDurationTime, mInDurationTime > mPrevInDurationTime,\n                                         mPrevKey, mPrevKeyApproximation);\n\n        if (mTarget)\n            *mTarget = mCurrentValue;\n        else if (mTargetProxy)\n            mTargetProxy->SetValue(mCurrentValue);\n    }\n};\n// --- META ---\n\nMETA_TEMPLATES(typename _type)\nCLASS_BASES_META(o2::AnimationTrack<_type>)\n{\n    BASE_CLASS(o2::IAnimationTrack);\n}\nEND_META;\nMETA_TEMPLATES(typename _type)\nCLASS_FIELDS_META(o2::AnimationTrack<_type>)\n{\n    FIELD().PUBLIC().NAME(keys);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mBatchChange);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mChangedKeys);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mKeys);\n}\nEND_META;\nMETA_TEMPLATES(typename _type)\nCLASS_METHODS_META(o2::AnimationTrack<_type>)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationTrack<_type>&);\n    FUNCTION().PUBLIC().SIGNATURE(_type, GetValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(_type, GetValue, float, bool, int&, int&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysBatchChange);\n    FUNCTION().PUBLIC().SIGNATURE(void, CompleteKeysBatchingChange);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IPlayer>, CreatePlayer);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddKeys, Vector<Key>, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, const Key&, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddSmoothKey, const Key&, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, float, const _type&, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddKey, float, const _type&, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllKeys);\n    FUNCTION().PUBLIC().SIGNATURE(bool, ContainsKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Key>&, GetKeys);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKey, int, const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(Key, FindKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindKeyIdx, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SmoothKey, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<_type>, Parametric, const _type&, const _type&, float, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<_type>, EaseIn, const _type&, const _type&, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<_type>, EaseOut, const _type&, const _type&, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<_type>, EaseInOut, const _type&, const _type&, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<_type>, Linear, const _type&, const _type&, float);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Key>, GetKeysNonContant);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateApproximation);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nMETA_TEMPLATES(typename _type)\nCLASS_BASES_META(o2::AnimationTrack<_type>::Player)\n{\n    BASE_CLASS(o2::IAnimationTrack::IPlayer);\n}\nEND_META;\nMETA_TEMPLATES(typename _type)\nCLASS_FIELDS_META(o2::AnimationTrack<_type>::Player)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(target);\n    FIELD().PROTECTED().NAME(mTrack);\n    FIELD().PROTECTED().NAME(mCurrentValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mPrevInDurationTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevKey);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevKeyApproximation);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mTarget);\n    FIELD().PROTECTED().NAME(mTargetProxy);\n}\nEND_META;\nMETA_TEMPLATES(typename _type)\nCLASS_METHODS_META(o2::AnimationTrack<_type>::Player)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTarget, _type*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IValueProxy<_type>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<AnimationTrack<_type>>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationTrack<_type>>&, GetTrackT);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetVoid, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<IAnimationTrack>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationTrack>, GetTrack);\n    FUNCTION().PUBLIC().SIGNATURE(_type, GetValue);\n    FUNCTION().PROTECTED().SIGNATURE(void, Evaluate);\n    FUNCTION().PROTECTED().SIGNATURE(void, RegMixer, const Ref<AnimationState>&, const String&);\n}\nEND_META;\n\nMETA_TEMPLATES(typename _type)\nCLASS_BASES_META(o2::AnimationTrack<_type>::Key)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nMETA_TEMPLATES(typename _type)\nCLASS_FIELDS_META(o2::AnimationTrack<_type>::Key)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(uid);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(position);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(_type()).NAME(value);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(leftSupportValue);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(leftSupportPosition);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(rightSupportValue);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(rightSupportPosition);\n    FIELD().PUBLIC().NAME(mCurveApproxValues);\n}\nEND_META;\nMETA_TEMPLATES(typename _type)\nCLASS_METHODS_META(o2::AnimationTrack<_type>::Key)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const _type&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(float, const _type&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(float, const _type&, float, float, float, float);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Key&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationVec2FTrack.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationVec2FTrack.h\"\n\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2/Scene/Components/AnimationComponent.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    AnimationTrack<Vec2F>::AnimationTrack()\n    {\n        timeCurve->onKeysChanged.Add(this, &AnimationTrack<Vec2F>::OnCurveChanged);\n        spline->onKeysChanged.Add(this, &AnimationTrack<Vec2F>::OnCurveChanged);\n    }\n\n    AnimationTrack<Vec2F>::AnimationTrack(const AnimationTrack<Vec2F>& other) :\n        IAnimationTrack(other), timeCurve(other.timeCurve), spline(other.spline)\n    {\n        timeCurve->onKeysChanged.Add(this, &AnimationTrack<Vec2F>::OnCurveChanged);\n        spline->onKeysChanged.Add(this, &AnimationTrack<Vec2F>::OnCurveChanged);\n    }\n\n    AnimationTrack<Vec2F>& AnimationTrack<Vec2F>::operator=(const AnimationTrack<Vec2F>& other)\n    {\n        IAnimationTrack::operator =(other);\n        timeCurve = other.timeCurve;\n        spline = other.spline;\n\n        onKeysChanged();\n\n        return *this;\n    }\n\n    Vec2F AnimationTrack<Vec2F>::GetValue(float position) const\n    {\n        int cacheKey = 0, cacheKeyApporx = 0;\n        return GetValue(position, 0.0f, true, cacheKey, cacheKeyApporx, cacheKey, cacheKeyApporx);\n    }\n\n    Vec2F AnimationTrack<Vec2F>::GetValue(float position, float randomRangeCoef, bool direction, int& cacheTimeKey, int& cacheTimeKeyApprox,\n                                          int& cacheSplineKey, int& cacheSplineKeyApprox) const\n    {\n        float timePos = timeCurve->Evaluate(position, randomRangeCoef, direction, cacheTimeKey, cacheTimeKeyApprox);\n        return spline->Evaluate(timePos*spline->Length(), randomRangeCoef, direction, cacheSplineKey, cacheTimeKeyApprox);\n    }\n\n    void AnimationTrack<Vec2F>::BeginKeysBatchChange()\n    {\n        timeCurve->BeginKeysBatchChange();\n        spline->BeginKeysBatchChange();\n    }\n\n    void AnimationTrack<Vec2F>::CompleteKeysBatchingChange()\n    {\n        timeCurve->CompleteKeysBatchingChange();\n        spline->CompleteKeysBatchingChange();\n    }\n\n    float AnimationTrack<Vec2F>::GetDuration() const\n    {\n        return timeCurve->Length();\n    }\n\n    Ref<IAnimationTrack::IPlayer> AnimationTrack<Vec2F>::CreatePlayer() const\n    {\n        return mmake<Player>();\n    }\n\n    void AnimationTrack<Vec2F>::OnCurveChanged()\n    {\n        onKeysChanged();\n    }\n\n    AnimationTrack<Vec2F> AnimationTrack<Vec2F>::Parametric(const Vec2F& begin, const Vec2F& end, float duration,\n                                                          float beginCoef, float beginCoefPosition,\n                                                          float endCoef, float endCoefPosition)\n    {\n        AnimationTrack<Vec2F> res;\n        res.spline->SetKeys({ Spline::Key(begin, 0.0f, Vec2F(), Vec2F()), Spline::Key(end, 0.0f, Vec2F(), Vec2F()) });\n        res.timeCurve = mmake<Curve>(Curve::Parametric(0.0f, 1.0f, duration, beginCoef, beginCoefPosition, endCoef, endCoefPosition));\n        return res;\n    }\n\n    AnimationTrack<Vec2F> AnimationTrack<Vec2F>::EaseIn(const Vec2F& begin, const Vec2F& end, float duration /*= 1.0f*/,\n                                                        float strongness /*= 0.4f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, strongness, 1.0f, 1.0f);\n    }\n\n    AnimationTrack<Vec2F> AnimationTrack<Vec2F>::EaseOut(const Vec2F& begin, const Vec2F& end, float duration /*= 1.0f*/,\n                                                         float strongness /*= 0.4f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.0f, 1.0f, strongness);\n    }\n\n    AnimationTrack<Vec2F> AnimationTrack<Vec2F>::EaseInOut(const Vec2F& begin, const Vec2F& end, float duration /*= 1.0f*/,\n                                                           float strongness /*= 0.4f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, strongness, 1.0f, 1.0f);\n    }\n\n    AnimationTrack<Vec2F> AnimationTrack<Vec2F>::Linear(const Vec2F& begin, const Vec2F& end, float duration /*= 1.0f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.0f, 1.0f, 1.0f);\n    }\n\n    AnimationTrack<Vec2F>::Player::Player():\n        IPlayer()\n    {}\n\n    AnimationTrack<Vec2F>::Player::~Player()\n    {}\n\n    AnimationTrack<Vec2F>::Player::operator Vec2F() const\n    {\n        return mCurrentValue;\n    }\n\n    void AnimationTrack<Vec2F>::Player::SetTarget(Vec2F* value)\n    {\n        mTargetProxy = nullptr;\n        mTarget = value;\n    }\n\n    void AnimationTrack<Vec2F>::Player::SetTargetProxy(const Ref<IValueProxy<Vec2F>>& proxy)\n    {\n        mTarget = nullptr;\n        mTargetProxy = proxy;\n    }\n\n    void AnimationTrack<Vec2F>::Player::SetTrack(const Ref<AnimationTrack<Vec2F>>& track)\n    {\n        mTrack = track;\n        IPlayer::SetTrack(track);\n    }\n\n    void AnimationTrack<Vec2F>::Player::SetTargetVoid(void* target)\n    {\n        SetTarget((Vec2F*)target);\n    }\n\n    void AnimationTrack<Vec2F>::Player::SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy)\n    {\n        SetTargetProxy(DynamicCast<IValueProxy<Vec2F>>(targetProxy));\n    }\n\n    void AnimationTrack<Vec2F>::Player::SetTrack(const Ref<IAnimationTrack>& track)\n    {\n        SetTrack(DynamicCast<AnimationTrack<Vec2F>>(track));\n    }\n\n    Vec2F AnimationTrack<Vec2F>::Player::GetValue() const\n    {\n        return mCurrentValue;\n    }\n\n    const Ref<AnimationTrack<Vec2F>>& AnimationTrack<Vec2F>::Player::GetTrackT() const\n    {\n        return mTrack;\n    }\n\n    Ref<IAnimationTrack> AnimationTrack<Vec2F>::Player::GetTrack() const\n    {\n        return mTrack;\n\t}\n\n\tvoid AnimationTrack<Vec2F>::Player::OnPlay()\n\t{\n        mRandomRangeCoef = Math::Random(0.0f, 1.0f);\n\t}\n\n    void AnimationTrack<Vec2F>::Player::Evaluate()\n    {\n        if (mTrack->timeCurve->IsEmpty())\n        {\n            mCurrentValue = mTarget ? *mTarget : mTargetProxy ? mTargetProxy->GetValue() : Vec2F();\n            return;\n        }\n\n        mCurrentValue = mTrack->GetValue(mInDurationTime, mRandomRangeCoef, mInDurationTime > mPrevInDurationTime, \n                          mPrevTimeKey, mPrevTimeKeyApproximation,\n                        mPrevSplineKey, mPrevSplineKeyApproximation);\n\n        mPrevInDurationTime = mInDurationTime;\n\n        if (mTarget)\n            *mTarget = mCurrentValue;\n        else if (mTargetProxy)\n            mTargetProxy->SetValue(mCurrentValue);\n    }\n\n    void AnimationTrack<Vec2F>::Player::RegMixer(const Ref<AnimationState>& state, const String& path)\n    {\n        state->mOwner.Lock()->RegValueTrack<Vec2F>(Ref(this), path, state);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationTrack<o2::Vec2F>, o2__AnimationTrack_o2__Vec2F_);\n\nDECLARE_CLASS(o2::AnimationTrack<o2::Vec2F>::Player, o2__AnimationTrack_o2__Vec2F___Player);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/AnimationVec2FTrack.h",
    "content": "#pragma once\n#include \"AnimationTrack.h\"\n#include \"o2/Utils/Math/Curve.h\"\n#include \"o2/Utils/Math/Spline.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    // --------------------\n    // Animated Vec2F value\n    // --------------------\n    template<>\n    class AnimationTrack<o2::Vec2F>: public IAnimationTrack\n    {\n    public:\n        typedef o2::Vec2F ValueType;\n\n    public:\n        Ref<Curve>  timeCurve = mmake<Curve>(); // Time curve. represents speed on spline @SERIALIZABLE\n        Ref<Spline> spline = mmake<Spline>();   // Movement trajectory spline @SERIALIZABLE\n\n    public:\n        // Default constructor\n        AnimationTrack();\n\n        // Copy-constructor\n        AnimationTrack(const AnimationTrack<Vec2F>& other);\n\n        // Assign operator\n        AnimationTrack<Vec2F>& operator=(const AnimationTrack<Vec2F>& other);\n\n        // Returns value at time\n        Vec2F GetValue(float position) const;\n\n        // Returns value at time with caching\n        Vec2F GetValue(float position, float randomRangeCoef, bool direction, int& cacheTimeKey, int& cacheTimeKeyApprox,\n                       int& cacheSplineKey, int& cacheSplineKeyApprox) const;\n\n        // Called when beginning keys batch change. After this call all keys modifications will not be update pproximation\n        // Used for optimizing many keys change\n        void BeginKeysBatchChange() override;\n\n        // Called when keys batch change completed. Updates approximation\n        void CompleteKeysBatchingChange() override;\n\n        // Returns track duration\n        float GetDuration() const override;\n\n        // Creates track-type specific player\n        Ref<IPlayer> CreatePlayer() const override;\n\n        // Returns parametric specified Animation track\n        // Sample: Parametric(someBegin, someEnd, 1.0f, 0.0f, 0.4f, 1.0f, 0.6f) \n        static AnimationTrack<Vec2F> Parametric(const Vec2F& begin, const Vec2F& end, float duration,\n                                                float beginCoef, float beginCoefPosition,\n                                                float endCoef, float endCoefPosition);\n\n        // Returns tween animation from begin to end in duration with ease in\n        static AnimationTrack<Vec2F> EaseIn(const Vec2F& begin, const Vec2F& end, float duration = 1.0f, float strongness = 0.4f);\n\n        // Returns tween animation from begin to end in duration with ease out\n        static AnimationTrack<Vec2F> EaseOut(const Vec2F& begin, const Vec2F& end, float duration = 1.0f, float strongness = 0.4f);\n\n        // Returns tween animation from begin to end in duration with ease in-out\n        static AnimationTrack<Vec2F> EaseInOut(const Vec2F& begin, const Vec2F& end, float duration = 1.0f, float strongness = 0.4f);\n\n        // Returns tween animation from begin to end in duration with linear transition\n        static AnimationTrack<Vec2F> Linear(const Vec2F& begin, const Vec2F& end, float duration = 1.0f);\n\n        SERIALIZABLE(AnimationTrack<Vec2F>);\n        CLONEABLE_REF(AnimationTrack<Vec2F>);\n\n    public:\n        // ----------------------\n        // Animation track player\n        // ----------------------\n        class Player: public IPlayer\n        {\n        public:\n            PROPERTIES(Player);\n            GETTER(o2::Vec2F, value, GetValue);    // Current value getter\n            SETTER(o2::Vec2F*, target, SetTarget); // Bind target setter\n\n        public:\n            // Default constructor\n            Player();\n\n            // Destructor\n            ~Player();\n\n            // Value type cast operator\n            operator Vec2F() const;\n\n            // Sets target pointer\n            void SetTarget(Vec2F* value);\n\n            // Sets target property pointer\n            void SetTargetProxy(const Ref<IValueProxy<Vec2F>>& setter);\n\n            // Sets animation track\n            void SetTrack(const Ref<AnimationTrack<Vec2F>>& track);\n\n            // Returns animation track\n            const Ref<AnimationTrack<Vec2F>>& GetTrackT() const;\n\n            // Sets target by void pointer\n            void SetTargetVoid(void* target) override;\n\n            // Sets target property by void pointer\n            void SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy) override;\n\n            // Sets animation track\n            void SetTrack(const Ref<IAnimationTrack>& track) override;\n\n            // Returns animation track\n            Ref<IAnimationTrack> GetTrack() const override;\n\n            // Returns current value\n            Vec2F GetValue() const;\n\n            IOBJECT(Player);\n\n        protected:\n            Ref<AnimationTrack<Vec2F>> mTrack; // Animation track\n\n            Vec2F mCurrentValue; // Current animation track value\n\n            float mPrevInDurationTime = 0.0f;       // Previous evaluation in duration time\n            int   mPrevTimeKey = 0;                 // Previous evaluation time key index\n            int   mPrevTimeKeyApproximation = 0;    // Previous evaluation time key approximation index\n            int   mPrevSplineKey = 0;               // Previous evaluation spline key index\n            int   mPrevSplineKeyApproximation = 0;  // Previous evaluation spline key approximation index\n\n\t\t\tfloat mRandomRangeCoef = 0.0f; // Random range coefficient for value approximation\n\n            Vec2F*                  mTarget = nullptr; // Animation target value pointer\n            Ref<IValueProxy<Vec2F>> mTargetProxy;      // Animation target proxy pointer\n\n\t\tprotected:\n\t\t\t// Called when animation started playing, updates random range coefficient`\n            void OnPlay() override;\n\n            // Evaluates value\n            void Evaluate() override;\n\n            // Registering this in animatable value agent\n            void RegMixer(const Ref<AnimationState>& state, const String& path) override;\n        };\n\n    protected:\n        // Called when curve updated keys and calculated duration\n        void OnCurveChanged();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationTrack<o2::Vec2F>)\n{\n    BASE_CLASS(o2::IAnimationTrack);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationTrack<o2::Vec2F>)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(mmake<Curve>()).NAME(timeCurve);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(mmake<Spline>()).NAME(spline);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationTrack<o2::Vec2F>)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationTrack<Vec2F>&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetValue, float, float, bool, int&, int&, int&, int&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysBatchChange);\n    FUNCTION().PUBLIC().SIGNATURE(void, CompleteKeysBatchingChange);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IPlayer>, CreatePlayer);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<Vec2F>, Parametric, const Vec2F&, const Vec2F&, float, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<Vec2F>, EaseIn, const Vec2F&, const Vec2F&, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<Vec2F>, EaseOut, const Vec2F&, const Vec2F&, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<Vec2F>, EaseInOut, const Vec2F&, const Vec2F&, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(AnimationTrack<Vec2F>, Linear, const Vec2F&, const Vec2F&, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCurveChanged);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AnimationTrack<o2::Vec2F>::Player)\n{\n    BASE_CLASS(IPlayer);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationTrack<o2::Vec2F>::Player)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(target);\n    FIELD().PROTECTED().NAME(mTrack);\n    FIELD().PROTECTED().NAME(mCurrentValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mPrevInDurationTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevTimeKey);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevTimeKeyApproximation);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevSplineKey);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevSplineKeyApproximation);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mRandomRangeCoef);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mTarget);\n    FIELD().PROTECTED().NAME(mTargetProxy);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationTrack<o2::Vec2F>::Player)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTarget, Vec2F*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IValueProxy<Vec2F>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<AnimationTrack<Vec2F>>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationTrack<Vec2F>>&, GetTrackT);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetVoid, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<IAnimationTrack>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationTrack>, GetTrack);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetValue);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPlay);\n    FUNCTION().PROTECTED().SIGNATURE(void, Evaluate);\n    FUNCTION().PROTECTED().SIGNATURE(void, RegMixer, const Ref<AnimationState>&, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/IAnimationTrack.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationTrack.h\"\n\n#include \"o2/Animation/AnimationPlayer.h\"\n#include \"o2/Animation/AnimationState.h\"\n\nnamespace o2\n{\n    //FORWARD_REF_IMPL(AnimationClip);\n    FORWARD_REF_IMPL(AnimationPlayer);\n    //FORWARD_REF_IMPL(AnimationState);\n\n    void IAnimationTrack::IPlayer::SetTrack(const Ref<IAnimationTrack>& track)\n    {\n        if (!track)\n            return;\n\n        mLoop = track->loop;\n        mDuration = track->GetDuration();\n        mBeginTime = 0;\n        mEndTime = mDuration;\n\n        track->onKeysChanged += [=]()\n        {\n            mDuration = track->GetDuration();\n            mEndTime = mDuration;\n        };\n    }\n\n    void IAnimationTrack::IPlayer::ForceSetTime(float time, float duration)\n    {\n        float lastTime = mTime;\n        mTime = time;\n\n        float lastInDurationTime = mInDurationTime;\n\n        if (mLoop == Loop::None)\n        {\n            mInDurationTime = Math::Clamp(mTime, mBeginTime, mEndTime);\n            Evaluate();\n\n            if (lastTime < mTime)\n            {\n                if (mEndTime > Math::Min(mTime, lastTime) && mEndTime <= Math::Max(mTime, lastTime))\n                {\n                    onStop();\n                    onPlayed();\n                }\n            }\n            else\n            {\n                if (mBeginTime > Math::Min(mTime, lastTime) && mBeginTime <= Math::Max(mTime, lastTime))\n                {\n                    onStop();\n                    onPlayed();\n                }\n            }\n        }\n        else if (mLoop == Loop::Repeat)\n        {\n            float x;\n            if (mTime > 0)\n                mInDurationTime = modff(mTime/mDuration, &x)*mDuration;\n            else\n                mInDurationTime = (1.0f - modff(-mTime/mDuration, &x))*mDuration;\n\n            mInDurationTime = Math::Clamp(mInDurationTime, mBeginTime, mEndTime);\n\n            Evaluate();\n        }\n        else //if (mLoop == Loop::PingPong)\n        {\n            float x;\n            if (mTime > 0)\n            {\n                mInDurationTime = modff(mTime/mDuration, &x)*mDuration;\n                if ((int)x%2 == 1)\n                    mInDurationTime = mDuration - mInDurationTime;\n            }\n            else\n            {\n                mInDurationTime = (1.0f - modff(-mTime/mDuration, &x))*mDuration;\n                if ((int)x%2 == 0)\n                    mInDurationTime = mDuration - mInDurationTime;\n            }\n\n            mInDurationTime = Math::Clamp(mInDurationTime, mBeginTime, mEndTime);\n\n            Evaluate();\n        }\n\n        onUpdate(mTime);\n\n        float eventCheckBeg = Math::Min(lastInDurationTime, mInDurationTime);\n        float eventCheckEnd = Math::Max(lastInDurationTime, mInDurationTime);\n        for (auto& kv : mTimeEvents)\n        {\n            if (kv.first > eventCheckBeg && kv.first <= eventCheckEnd)\n                kv.second.Invoke();\n        }\n    }\n\n    const WeakRef<AnimationPlayer>& IAnimationTrack::IPlayer::GetOwnerPlayer() const\n    {\n        return mOwnerPlayer;\n    }\n\n    IAnimationTrack& IAnimationTrack::operator=(const IAnimationTrack& other)\n    {\n        loop = other.loop;\n        return *this;\n    }\n\n    const WeakRef<AnimationClip>& IAnimationTrack::GetOwnerClip() const\n    {\n        return mOwnerClip;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::IAnimationTrack, o2__IAnimationTrack);\n\nDECLARE_CLASS(o2::IAnimationTrack::IPlayer, o2__IAnimationTrack__IPlayer);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Animation/Tracks/IAnimationTrack.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/WeakRef.h\"\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(AnimationClip);\n    FORWARD_CLASS_REF(AnimationPlayer);\n    FORWARD_CLASS_REF(AnimationState);\n\n    // -------------------------\n    // Animation track interface\n    // -------------------------\n    class IAnimationTrack: public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        // --------------------------------\n        // Animation track player interface\n        // --------------------------------\n        class IPlayer: public IAnimation\n        {\n        public:\n\t\t\t// Called when animation started playing\n            virtual void OnPlay() {}\n\n            // Sets target by void pointer\n            virtual void SetTargetVoid(void* target) {}\n\n            // Sets target property by void pointer\n            virtual void SetTargetProxy(const Ref<IAbstractValueProxy>& targetProxy) {}\n\n            // Sets animation track\n            virtual void SetTrack(const Ref<IAnimationTrack>& track);\n\n            // Adjusts target type to correct one\n            virtual void* AdjustTargetType(void* target, const Type& type) { return target; }\n\n            // Returns animation track\n            virtual Ref<IAnimationTrack> GetTrack() const { return nullptr; }\n\n            // Registering this in animation track agent\n            virtual void RegMixer(const Ref<AnimationState>& state, const String& path) {}\n\n            // Force setting time (using in Animation): works same as update, but by hard setting time\n            void ForceSetTime(float time, float duration);\n\n            //Returns owner player\n            const WeakRef<AnimationPlayer>& GetOwnerPlayer() const;\n\n            IOBJECT(IPlayer);\n\n        protected:\n            WeakRef<AnimationPlayer> mOwnerPlayer;\n\n            friend class AnimationPlayer;\n        };\n\n    public:\n        PROPERTIES(IAnimationTrack);\n        GETTER(float, duration, GetDuration);   // Animation duration getter\n\n        Loop loop = Loop::None; // Animation loop type @SERIALIZABLE\n\n        String path; // Animated property path @SERIALIZABLE\n\n    public:\n        Function<void()> onKeysChanged; // Called when keys has changed\n\n    public:\n        // Default constructor\n        IAnimationTrack() {}\n\n        // Copy-constructor\n        IAnimationTrack(const IAnimationTrack& other): loop(other.loop), path(other.path) {}\n\n        // Copy operator\n        IAnimationTrack& operator=(const IAnimationTrack& other);\n\n        // Called when beginning keys batch change. After this call all keys modifications will not be update approximation\n        // Used for optimizing many keys change\n        virtual void BeginKeysBatchChange() {}\n\n        // Called when keys batch change completed. Updates approximation\n        virtual void CompleteKeysBatchingChange() {}\n\n        // Returns track duration\n        virtual float GetDuration() const { return 0; }\n\n        // Creates track-type specific player\n        virtual Ref<IPlayer> CreatePlayer() const { return nullptr; }\n\n        // Returns owner clip\n        const WeakRef<AnimationClip>& GetOwnerClip() const;\n\n        SERIALIZABLE(IAnimationTrack);\n\n    protected:\n        WeakRef<AnimationClip> mOwnerClip;\n\n        friend class AnimationClip;\n    };\n};\n// --- META ---\n\nCLASS_BASES_META(o2::IAnimationTrack)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::IAnimationTrack)\n{\n    FIELD().PUBLIC().NAME(duration);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Loop::None).NAME(loop);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(path);\n    FIELD().PUBLIC().NAME(onKeysChanged);\n    FIELD().PROTECTED().NAME(mOwnerClip);\n}\nEND_META;\nCLASS_METHODS_META(o2::IAnimationTrack)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const IAnimationTrack&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysBatchChange);\n    FUNCTION().PUBLIC().SIGNATURE(void, CompleteKeysBatchingChange);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IPlayer>, CreatePlayer);\n    FUNCTION().PUBLIC().SIGNATURE(const WeakRef<AnimationClip>&, GetOwnerClip);\n}\nEND_META;\n\nCLASS_BASES_META(o2::IAnimationTrack::IPlayer)\n{\n    BASE_CLASS(o2::IAnimation);\n}\nEND_META;\nCLASS_FIELDS_META(o2::IAnimationTrack::IPlayer)\n{\n    FIELD().PROTECTED().NAME(mOwnerPlayer);\n}\nEND_META;\nCLASS_METHODS_META(o2::IAnimationTrack::IPlayer)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, OnPlay);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetVoid, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTargetProxy, const Ref<IAbstractValueProxy>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTrack, const Ref<IAnimationTrack>&);\n    FUNCTION().PUBLIC().SIGNATURE(void*, AdjustTargetType, void*, const Type&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationTrack>, GetTrack);\n    FUNCTION().PUBLIC().SIGNATURE(void, RegMixer, const Ref<AnimationState>&, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ForceSetTime, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(const WeakRef<AnimationPlayer>&, GetOwnerPlayer);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Android/AndroidPlatform.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_ANDROID\n\n#include <jni.h>\n#include <android/asset_manager.h>\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    // -------------------------------------------------------------------\n    // AndroidPlatform — глобальные платформенные параметры, приходящие из\n    // Java-слоя (JNI bridge). Заполняются из JavaBridge.cpp ДО вызова\n    // Application::Initialize(). Сам Application::Initialize() не\n    // принимает аргументов — он читает эти значения внутри\n    // InitializePlatform() (по образцу Windows/Mac/Web).\n    // -------------------------------------------------------------------\n    namespace AndroidPlatform\n    {\n        void SetJVM(JavaVM* jvm);\n        void SetActivity(jobject activity);\n        void SetAssetManager(AAssetManager* assetManager);\n        void SetDataPath(const String& dataPath);\n        void SetResolution(const Vec2I& resolution);\n\n        JavaVM*        GetJVM();\n        jobject        GetActivity();\n        AAssetManager* GetAssetManager();\n        String         GetDataPath();\n        Vec2I          GetResolution();\n    }\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Android/ApplicationBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_ANDROID\n\n#include <jni.h>\n#include <android/asset_manager.h>\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    // -------------------------------\n    // Android application base fields\n    // -------------------------------\n    class ApplicationBase\n    {\n    protected:\n        Vec2I mResolution;\n\n        JavaVM*        mJVM = nullptr;\n        jobject        mActivity = nullptr;\n        AAssetManager* mAssetManager = nullptr;\n        String         mDataPath;\n\n    public:\n        // Returns android Java virtual machine\n        JavaVM* GetJVM() const;\n\n        // Returns android activity\n        jobject GetActivity() const;\n\n        // Returns android asset manager\n        AAssetManager* GetAssetManager() const;\n\n        // Returns android data path\n        String GetDataPath() const;\n    };\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Android/ApplicationImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_ANDROID\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Android/AndroidPlatform.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    namespace AndroidPlatform\n    {\n        static JavaVM*        gJVM = nullptr;\n        static jobject        gActivity = nullptr;\n        static AAssetManager* gAssetManager = nullptr;\n        static String         gDataPath;\n        static Vec2I          gResolution = Vec2I(1280, 720);\n\n        void SetJVM(JavaVM* jvm)                     { gJVM = jvm; }\n        void SetActivity(jobject activity)           { gActivity = activity; }\n        void SetAssetManager(AAssetManager* manager) { gAssetManager = manager; }\n        void SetDataPath(const String& dataPath)     { gDataPath = dataPath; }\n        void SetResolution(const Vec2I& resolution)  { gResolution = resolution; }\n\n        JavaVM*        GetJVM()          { return gJVM; }\n        jobject        GetActivity()     { return gActivity; }\n        AAssetManager* GetAssetManager() { return gAssetManager; }\n        String         GetDataPath()     { return gDataPath; }\n        Vec2I          GetResolution()   { return gResolution; }\n    }\n\n    JavaVM* ApplicationBase::GetJVM() const\n    {\n        return mJVM;\n    }\n\n    jobject ApplicationBase::GetActivity() const\n    {\n        return mActivity;\n    }\n\n    AAssetManager* ApplicationBase::GetAssetManager() const\n    {\n        return mAssetManager;\n    }\n\n    String ApplicationBase::GetDataPath() const\n    {\n        return mDataPath;\n    }\n\n    void Application::Initialize()\n    {\n        BasicInitialize();\n    }\n\n    void Application::InitializePlatform()\n    {\n        // State that was injected from the Java side through AndroidPlatform::Set*\n        // before the call to Application::Initialize().\n        mJVM          = AndroidPlatform::GetJVM();\n        mActivity     = AndroidPlatform::GetActivity();\n        mAssetManager = AndroidPlatform::GetAssetManager();\n        mDataPath     = AndroidPlatform::GetDataPath();\n        mResolution   = AndroidPlatform::GetResolution();\n    }\n\n    void Application::Shutdown()\n    {}\n\n    void Application::SetFullscreen(bool fullscreen /*= true*/)\n    {}\n\n    void Application::CheckCursorInfiniteMode()\n    {}\n\n    void Application::Launch()\n    {\n        mLog->Out(\"Application launched!\");\n\n        OnStarted();\n        onStarted.Invoke();\n        o2Events.OnApplicationStarted();\n    }\n\n    void Application::Update()\n    {\n        ProcessFrame();\n    }\n\n    bool Application::IsFullScreen() const\n    {\n        return true;\n    }\n\n    void Application::Maximize()\n    {}\n\n    bool Application::IsMaximized() const\n    {\n        return true;\n    }\n\n    void Application::SetResizible(bool resizible)\n    {}\n\n    bool Application::IsResizible() const\n    {\n        return false;\n    }\n\n    void Application::SetWindowSizePlatform(const Vec2I& size)\n    {}\n\n    Vec2I Application::GetWindowSize() const\n    {\n        return mResolution;\n    }\n\n    void Application::SetWindowPosition(const Vec2I& position)\n    {}\n\n    Vec2I Application::GetWindowPosition() const\n    {\n        return Vec2I();\n    }\n\n    void Application::SetWindowCaption(const String& caption)\n    {}\n\n    String Application::GetWindowCaption() const\n    {\n        return \"\";\n    }\n\n    void Application::SetContentSize(const Vec2I& size)\n    {\n        mResolution = size;\n    }\n\n    Vec2I Application::GetContentSize() const\n    {\n        return mResolution;\n    }\n\n    Vec2I Application::GetScreenResolution() const\n    {\n        return mResolution;\n    }\n\n    void Application::SetCursor(CursorType type)\n    {}\n\n    void Application::SetCursorPosition(const Vec2F& position)\n    {}\n\n    String Application::GetBinPath() const\n    {\n        return \"\";\n    }\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Application.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"o2/Application/Application.h\"\n\nnamespace o2\n{\n    DECLARE_SINGLETON(Application);\n\n    Application::Application(RefCounter* refCounter):\n        Integration(refCounter)\n    {}\n\n    Application::~Application()\n    {}\n\n    void Application::OnResized(const Vec2I& size)\n    {\n        mWindowedSize = size;\n\n\t\tIntegration::OnResized(size);\n\n        if (mReady)\n        {\n            onResizing.Invoke();\n            OnResizing();\n        }\n    }\n\n    void Application::ProcessFrame()\n    {\n        if (!mReady)\n\t\t\treturn;\n\n\t\tif (mCursorInfiniteModeEnabled)\n\t\t\tCheckCursorInfiniteMode();\n\n\t\tIntegration::ProcessFrame();\n    }\n\n    void Application::SetCursorInfiniteMode(bool enabled)\n    {\n        mCursorInfiniteModeEnabled = enabled;\n    }\n\n    bool Application::IsCursorInfiniteModeOn() const\n    {\n        return mCursorInfiniteModeEnabled;\n    }\n    \n    float Application::GetGraphicsScale() const\n    {\n        return mGraphicsScale;\n    }\n\n    void Application::SetWindowSize(const Vec2I& size)\n    {\n        SetWindowSizePlatform(size);\n        OnResized(size);\n\t}\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Application, o2__Application);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Application.h",
    "content": "#pragma once\n\n#include \"o2/Integration.h\"\n\n#if defined PLATFORM_WINDOWS\n#include \"o2/Application/Windows/ApplicationBase.h\"\n#elif defined PLATFORM_ANDROID\n#include \"o2/Application/Android/ApplicationBase.h\"\n#include <jni.h>\n#include <android/asset_manager.h>\n#elif defined PLATFORM_MAC\n#include \"o2/Application/Mac/ApplicationBase.h\"\n#elif defined PLATFORM_IOS\n#include \"o2/Application/iOS/ApplicationBase.h\"\n#elif defined PLATFORM_WASM\n#include \"o2/Application/WebAssembly/ApplicationBase.h\"\n#elif defined PLATFORM_LINUX\n#include \"o2/Application/Linux/ApplicationBase.h\"\n#endif\n\n// Application access macros\n#define o2Application dynamic_cast<o2::Application&>(o2Integration)\n\nnamespace o2\n{\n    // -------------------------------------------------------------------------\n\t// Application. Exdends integration interface, used to handle engine systems\n\t// -------------------------------------------------------------------------\n    class Application: public ApplicationBase, public Integration\n    {\n    public:\n        PROPERTIES(Application);\n        PROPERTY(bool, fullscreen, SetFullscreen, IsFullScreen);               // Full screen/window changing property\n        PROPERTY(bool, resizible, SetResizible, IsResizible);                  // Resizible window property\n        PROPERTY(Vec2I, windowSize, SetWindowSize, GetWindowSize);             // Window frame size property\n        PROPERTY(Vec2I, windowContentSize, SetContentSize, GetContentSize);    // Window content frame size property\n        PROPERTY(Vec2I, windowPosition, SetWindowPosition, GetWindowPosition); // Window position on screen property\n        PROPERTY(String, windowCaption, SetWindowCaption, GetWindowCaption);   // Window caption property\n\n    public:\n        Function<void()> onActivated;   // On Activated event callbacks\n        Function<void()> onDeactivated; // On deactivated event callbacks\n        Function<void()> onStarted;     // On started event callbacks\n        Function<void()> onClosing;     // On closing event callbacks\n        Function<void()> onResizing;    // On resized app window callbacks. Ignoring on mobiles/tablets\n        Function<void()> onMoving;      // On moving app window callbacks. Ignoring on mobiles/tablets\n\n    public:\n        // Default constructor\n        Application(RefCounter* refCounter);\n\n        // Destructor \n        virtual ~Application();\n\n        // Shutting down application\n        virtual void Shutdown();\n\n        // Makes application fullscreen. On mobiles/tablets has no effect, just ignoring\n        virtual void SetFullscreen(bool fullscreen = true);\n\n        // Returns true if application is fullscreen. On mobiles/tablets always true\n        virtual bool IsFullScreen() const;\n\n        // Maximize application frame. Available only on PC\n        virtual void Maximize();\n\n        // Returns is frame maximized. Available only on PC\n        virtual bool IsMaximized() const;\n\n        // Sets application window as resizible. On mobiles/tablets has no effect, just ignoring\n        virtual void SetResizible(bool resizible);\n\n        // Returns true, if application is resizible. On mobiles/tablets always returns false\n        virtual bool IsResizible() const;\n\n        // Sets application window size. On mobiles/tablets has no effect, just ignoring\n        virtual void SetWindowSize(const Vec2I& size);\n\n        // Returns application window size. On mobiles/tablets returns content size\n        virtual Vec2I GetWindowSize() const;\n\n        // Sets application window position. On mobiles/tablets has no effect, just ignoring\n        virtual void SetWindowPosition(const Vec2I& position);\n\n        // Returns application window position. On mobiles/tablets returns zero vector\n        virtual Vec2I GetWindowPosition() const;\n\n        // Sets application window caption. On mobiles/tablets has no effect, just ignoring\n        virtual void SetWindowCaption(const String& caption);\n\n        // Returns application window caption. On mobiles/tablets returns empty string\n        virtual String GetWindowCaption() const;\n\n        // Sets inside content size\n        void SetContentSize(const Vec2I& size) override;\n\n        // Returns inside content size\n        Vec2I GetContentSize() const override;\n\n        // Returns device screen resolution\n        Vec2I GetScreenResolution() const override;\n\n        // Sets cursor type\n        void SetCursor(CursorType type) override;\n\n        // Sets cursor position\n        void SetCursorPosition(const Vec2F& position) override;\n\n        // Sets cursor infinite moves mode\n        void SetCursorInfiniteMode(bool enabled) override;\n\n        // Returns is cursor infinite mode enabled\n        bool IsCursorInfiniteModeOn() const override;\n        \n        // Returns graphics scale\n\t\tfloat GetGraphicsScale() const override;\n\n\t\t// Returns application's path\n\t\tString GetBinPath() const override;\n\n        IOBJECT(Application);\n\n#if defined PLATFORM_WINDOWS\n        // Initializes engine application\n        virtual void Initialize();\n\n        // Launching application cycle\n        virtual void Launch();\n\n#elif defined PLATFORM_ANDROID\n        // Initializes engine application\n        virtual void Initialize();\n\n        // Launching application cycle\n        virtual void Launch();\n\n        // Updates frame\n        void Update();\n\n#elif defined PLATFORM_MAC\n        // Initializes engine application\n        virtual void Initialize();\n        \n        // Launching application cycle\n        virtual void Launch();\n        \n        // Updates frame\n        void Update();\n        \n#elif defined PLATFORM_IOS\n        // Initializes engine and runs it\n        virtual void Run(int argc, char** argv);\n        \n        // Updates frame\n        void Update();\n        \n        // Launching application\n        virtual void Launch();\n\n#elif defined PLATFORM_LINUX\n        // Initializes engine application\n        virtual void Initialize();\n\n        // Launching application cycle\n        virtual void Launch();\n\n#elif defined PLATFORM_WASM\n        // Initializes engine application\n        virtual void Initialize();\n\n        // Launching application cycle\n        virtual void Launch();\n\n        // Updates frame\n        void Update();\n\n#endif\n    protected:\n        bool  mCursorInfiniteModeEnabled = false; // Is cursor infinite mode enabled\n        Vec2F mCursorCorrectionDelta;             // Cursor corrections delta - result of infinite cursors offset\n        \n        float mGraphicsScale = 1.0f; // Application graphics scale. Used in mac for retina displays\n\n        Vec2I  mWindowedSize; // Size of window\n\n    protected:        \n        // Platform-specific initializations\n        void InitializePlatform() override;\n\n        // Checks that cursor is near border and moves to opposite border if needs\n        void CheckCursorInfiniteMode();\n\n        // Platform-specific window size setting implementation\n\t\tvoid SetWindowSizePlatform(const Vec2I& size);\n\n\t\t// Processing frame update, drawing and input messages\n\t\tvoid ProcessFrame() override;\n\n\t\t// It is called when application frame resized\n\t\tvoid OnResized(const Vec2I& size) override;\n\n\t\t// Calling when application activated\n        virtual void OnActivated() {}\n\n\t\t// Calling when application deactivated\n        virtual void OnDeactivated() {}\n\n\t\t// Calling when application is starting\n        virtual void OnStarted() {}\n\n\t\t// Calling when application is closing\n        virtual void OnClosing() {}\n\n\t\t// Calling when application window resized. Ignoring on mobiles/tablets\n        virtual void OnResizing() {}\n\n\t\t// Calling when application window moved. Ignoring on mobiles/tablets\n        virtual void OnMoved() {}\n\n        friend class WndProcFunc;\n        friend struct ApplicationPlatformWrapper;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Application)\n{\n    BASE_CLASS(o2::ApplicationBase);\n    BASE_CLASS(o2::Integration);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Application)\n{\n    FIELD().PUBLIC().NAME(fullscreen);\n    FIELD().PUBLIC().NAME(resizible);\n    FIELD().PUBLIC().NAME(windowSize);\n    FIELD().PUBLIC().NAME(windowContentSize);\n    FIELD().PUBLIC().NAME(windowPosition);\n    FIELD().PUBLIC().NAME(windowCaption);\n    FIELD().PUBLIC().NAME(onActivated);\n    FIELD().PUBLIC().NAME(onDeactivated);\n    FIELD().PUBLIC().NAME(onStarted);\n    FIELD().PUBLIC().NAME(onClosing);\n    FIELD().PUBLIC().NAME(onResizing);\n    FIELD().PUBLIC().NAME(onMoving);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mCursorInfiniteModeEnabled);\n    FIELD().PROTECTED().NAME(mCursorCorrectionDelta);\n    FIELD().PROTECTED().DEFAULT_VALUE(1.0f).NAME(mGraphicsScale);\n    FIELD().PROTECTED().NAME(mWindowedSize);\n}\nEND_META;\nCLASS_METHODS_META(o2::Application)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Shutdown);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFullscreen, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFullScreen);\n    FUNCTION().PUBLIC().SIGNATURE(void, Maximize);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsMaximized);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetResizible, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsResizible);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWindowSize, const Vec2I&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetWindowSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWindowPosition, const Vec2I&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetWindowPosition);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWindowCaption, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetWindowCaption);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetContentSize, const Vec2I&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetContentSize);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetScreenResolution);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCursor, CursorType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCursorPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCursorInfiniteMode, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsCursorInfiniteModeOn);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetGraphicsScale);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetBinPath);\n#if  defined PLATFORM_WINDOWS\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize);\n    FUNCTION().PUBLIC().SIGNATURE(void, Launch);\n#endif\n#if  defined PLATFORM_ANDROID\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize);\n    FUNCTION().PUBLIC().SIGNATURE(void, Launch);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update);\n#endif\n#if  defined PLATFORM_MAC\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize);\n    FUNCTION().PUBLIC().SIGNATURE(void, Launch);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update);\n#endif\n#if  defined PLATFORM_IOS\n    FUNCTION().PUBLIC().SIGNATURE(void, Run, int, char**);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update);\n    FUNCTION().PUBLIC().SIGNATURE(void, Launch);\n#endif\n#if  defined PLATFORM_LINUX\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize);\n    FUNCTION().PUBLIC().SIGNATURE(void, Launch);\n#endif\n#if  defined PLATFORM_WASM\n    FUNCTION().PUBLIC().SIGNATURE(void, Initialize);\n    FUNCTION().PUBLIC().SIGNATURE(void, Launch);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update);\n#endif\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializePlatform);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckCursorInfiniteMode);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetWindowSizePlatform, const Vec2I&);\n    FUNCTION().PROTECTED().SIGNATURE(void, ProcessFrame);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnResized, const Vec2I&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnActivated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeactivated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStarted);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnClosing);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnResizing);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMoved);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Input.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Input.h\"\n\n#include \"o2/Application/VKCodes.h\"\n#include \"o2/Config/ProjectConfig.h\"\n#include \"o2/Utils/Debug/Profiling/SimpleProfiler.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    DECLARE_SINGLETON(Input);\n\n    Input::Input(RefCounter* refCounter):\n        Singleton<Input>(refCounter)\n    {\n        if (GetDeviceType() == DeviceType::PC)\n        {\n            mCursors.Add(Cursor());\n            mCursors.Last().isPressed = false;\n        }\n    }\n\n    bool Input::IsKeyPressed(KeyboardKey key) const\n    {\n        for (auto& ikey : mPressedKeys)\n        {\n            if (ikey.keyCode == key)\n                return true;\n        }\n\n        return false;\n    }\n\n    bool Input::IsKeyDown(KeyboardKey key) const\n    {\n        for (auto& ikey : mDownKeys)\n        {\n            if (ikey.keyCode == key)\n                return true;\n        }\n\n        return IsKeyPressed(key);\n    }\n\n    bool Input::IsKeyReleased(KeyboardKey key) const\n    {\n        for (auto& ikey : mReleasedKeys)\n        {\n            if (ikey.keyCode == key)\n                return true;\n        }\n\n        return false;\n    }\n\n    bool Input::IsKeyRepeating(KeyboardKey key, float delay /*= 0.1f*/, float beginDelay /*= 0.5f*/) const\n    {\n        float time = GetKeyPressingTime(key) - beginDelay;\n        float repeatTime = Math::Max(floor(time/delay)*delay, 0.0f);\n\n        return time - o2Time.GetDeltaTime() < repeatTime && time > repeatTime;\n    }\n\n    float Input::GetKeyPressingTime(KeyboardKey key) const\n    {\n        for (auto& ikey : mDownKeys)\n        {\n            if (ikey.keyCode == key)\n                return ikey.pressedTime;\n        }\n\n        return 0;\n    }\n\n    Vec2F Input::GetCursorPos(CursorId id /*= 0*/) const\n    {\n        for (auto& cursor : mCursors)\n        {\n            if (cursor.id == id)\n                return cursor.position;\n        }\n\n        if (id == 0)\n            return mMainCursorPos;\n\n        return Vec2F();\n    }\n\n    bool Input::IsCursorPressed(CursorId id /*= 0*/) const\n    {\n        for (auto& cursor : mCursors)\n        {\n            if (cursor.id == id && cursor.pressedTime < FLT_EPSILON && cursor.isPressed)\n                return true;\n        }\n\n        return false;\n    }\n\n    bool Input::IsCursorDown(CursorId id /*= 0*/) const\n    {\n        for (auto& cursor : mCursors)\n        {\n            if (cursor.id == id && cursor.isPressed)\n                return true;\n        }\n\n        return false;\n    }\n\n    bool Input::IsCursorReleased(CursorId id /*= 0*/) const\n    {\n        for (auto& cursor : mReleasedCursors)\n        {\n            if (cursor.id == id)\n                return true;\n        }\n\n        return false;\n    }\n\n    float Input::GetCursorPressingTime(CursorId id /*= 0*/) const\n    {\n        for (auto& cursor : mCursors)\n        {\n            if (cursor.id == id)\n                return cursor.pressedTime;\n        }\n\n        return 0;\n    }\n\n    Vec2F Input::GetCursorDelta(CursorId id /*= 0*/) const\n    {\n        for (auto& cursor : mCursors)\n        {\n            if (cursor.id == id)\n            {\n                return cursor.delta;\n            }\n        }\n\n        if (id == 0)\n            return mMainCursorDelta;\n\n        return Vec2F();\n    }\n\n    bool Input::IsRightMousePressed() const\n    {\n        return IsKeyPressed((KeyboardKey)-1);\n    }\n\n    bool Input::IsRightMouseDown() const\n    {\n        return IsKeyDown((KeyboardKey)-1);\n    }\n\n    bool Input::IsRightMouseReleased() const\n    {\n        return IsKeyReleased((KeyboardKey)-1);\n    }\n\n    float Input::GetRightMousePressedTime() const\n    {\n        return GetKeyPressingTime((KeyboardKey)-1);\n    }\n\n    bool Input::IsMiddleMousePressed() const\n    {\n        return IsKeyPressed((KeyboardKey)-2);\n    }\n\n    bool Input::IsMiddleMouseDown() const\n    {\n        return IsKeyDown((KeyboardKey)-2);\n    }\n\n    bool Input::IsMiddleMouseReleased() const\n    {\n        return IsKeyReleased((KeyboardKey)-2);\n    }\n\n    float Input::GetMiddleMousePressedTime() const\n    {\n        return GetKeyPressingTime((KeyboardKey)-2);\n    }\n\n    float Input::GetMouseWheelDelta() const\n    {\n        return mMouseWheelDelta;\n    }\n\n    Input::Cursor* Input::GetCursor(CursorId id)\n    {\n        for (auto& cursor : mCursors)\n            if (cursor.id == id)\n                return &cursor;\n\n        static Cursor dummy;\n        return &dummy;\n    }\n\n    const Vector<Input::Cursor>& Input::GetCursors() const\n    {\n        return mCursors;\n    }\n\n    const Vector<Input::Cursor>& Input::GetReleasedCursors() const\n    {\n        return mReleasedCursors;\n    }\n\n    Vector<Input::Key> const& Input::GetPressedKeys() const\n    {\n        return mPressedKeys;\n    }\n\n    Vector<Input::Key> const& Input::GetDownKeys() const\n    {\n        return mDownKeys;\n    }\n\n    Vector<Input::Key> const& Input::GetReleasedKeys() const\n    {\n        return mReleasedKeys;\n    }\n\n    void Input::PreUpdate()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        auto inputQueue = mInputQueue;\n        for (auto& msg : inputQueue)\n        {\n            if (msg->Apply())\n                mInputQueue.Remove(msg);\n        }\n    }\n\n    void Input::OnKeyPressed(KeyboardKey key)\n    {\n        //o2Debug.Log(\"OnKeyPressed: %d\", key);\n\n        auto msg = mmake<InputKeyPressedMsg>();\n        msg->key = key;\n        mInputQueue.Add(msg);\n    }\n\n    void Input::OnKeyReleased(KeyboardKey key)\n    {\n        //o2Debug.Log(\"OnKeyReleased: %d\", key);\n        \n        auto msg = mmake<InputKeyReleasedMsg>();\n        msg->key = key;\n        mInputQueue.Add(msg);\n    }\n\n    void Input::OnCursorPressed(const Vec2F& pos, CursorId id /*= 0*/)\n    {\n        auto msg = mmake<InputCursorPressedMsg>();\n        msg->position = pos;\n        msg->id = id;\n        mInputQueue.Add(msg);\n    }\n\n    void Input::OnCursorReleased(CursorId id /*= 0*/)\n    {\n        auto msg = mmake<InputCursorReleasedMsg>();\n        msg->id = id;\n        mInputQueue.Add(msg);\n    }\n\n    void Input::OnCursorMoved(const Vec2F& pos, CursorId id /*= 0*/, bool withDelta /*= true*/)\n    {\n        auto msg = mmake<InputCursorMovedMsg>();\n        msg->position = pos;\n        msg->id = id;\n        mInputQueue.Add(msg);\n    }\n\n    void Input::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        mDownKeys.Add(mPressedKeys);\n        mPressedKeys.Clear();\n        mReleasedKeys.Clear();\n\n        for (Key& ikey : mDownKeys)\n            ikey.pressedTime += dt;\n\n        for (Cursor& cursor : mCursors)\n        {\n            cursor.pressedTime += dt;\n            cursor.delta = Vec2F();\n        }\n\n        mMainCursorDelta = Vec2F();\n\n        mReleasedCursors.Clear();\n\n        mMouseWheelDelta = 0;\n    }\n\n    bool Input::IsMainCursorPressed()\n    {\n        return IsCursorPressed();\n    }\n\n    bool Input::IsMainCursorDown()\n    {\n        return IsCursorDown();\n    }\n\n    bool Input::IsMainCursorReleased()\n    {\n        return IsCursorReleased();\n    }\n\n    Vec2F Input::GetMainCursorPos()\n    {\n        return GetCursorPos();\n    }\n\n    Vec2F Input::GetMainCursorDelta()\n    {\n        return GetCursorDelta();\n    }\n\n    void Input::OnKeyPressedMsgApply(KeyboardKey key)\n    {\n        if (IsKeyDown(key) || IsKeyPressed(key))\n            return;\n\n        mPressedKeys.Add(Key(key));\n    }\n\n    bool Input::OnKeyReleasedMsgApply(KeyboardKey key)\n    {\n        for (auto& ikey : mPressedKeys)\n        {\n            if (ikey.keyCode == key)\n                return false;\n        }\n        \n        for (auto& ikey : mDownKeys)\n        {\n            if (ikey.keyCode == key)\n            {\n                mDownKeys.Remove(ikey);\n                mReleasedKeys.Add(Key(key));\n                return true;\n            }\n        }\n        \n        return true;\n    }\n\n    void Input::OnCursorPressedMsgApply(const Vec2F& pos, CursorId id /*= 0*/)\n    {\n        if (id == 0 && GetDeviceType() == DeviceType::PC)\n        {\n            mCursors[0].position = pos;\n            mCursors[0].isPressed = true;\n            mCursors[0].pressedTime = 0.0f;\n        }\n        else mCursors.Add(Cursor(pos, id));\n    }\n\n    void Input::OnCursorMovedMsgApply(const Vec2F& pos, CursorId id /*= 0*/, bool withDelta /*= true*/)\n    {\n        for (Cursor& cursor : mCursors)\n        {\n            if (cursor.id == id)\n            {\n                if (withDelta)\n                    cursor.delta += pos - cursor.position;\n\n                cursor.position = pos;\n                break;\n            }\n        }\n\n        if (id == 0)\n        {\n            if (withDelta)\n                mMainCursorDelta += pos - mMainCursorPos;\n\n            mMainCursorPos = pos;\n        }\n    }\n\n    void Input::OnCursorReleasedMsgApply(CursorId id /*= 0*/)\n    {\n        Cursor releasedCursor(Vec2F(), -100);\n        for (auto& cursor : mCursors)\n        {\n            if (cursor.id == id)\n            {\n                releasedCursor = cursor;\n\n                if (id == 0 && GetDeviceType() == DeviceType::PC)\n                    cursor.isPressed = false;\n                else\n                    mCursors.Remove(cursor);\n\n                break;\n            }\n        }\n\n        mReleasedCursors.Add(releasedCursor);\n    }\n\n    void Input::OnMouseWheelMsgApply(float delta)\n    {\n        mMouseWheelDelta += delta;\n    }\n\n    void Input::OnAltCursorPressed(const Vec2F& pos)\n    {\n        OnKeyPressed(-1);\n        OnCursorMoved(pos);\n    }\n\n    void Input::OnAltCursorReleased()\n    {\n        OnKeyReleased(-1);\n    }\n\n    void Input::OnAlt2CursorPressed(const Vec2F& pos)\n    {\n        OnKeyPressed(-2);\n        OnCursorMoved(pos);\n    }\n\n    void Input::OnAlt2CursorReleased()\n    {\n        OnKeyReleased(-2);\n    }\n\n    void Input::OnMouseWheel(float delta)\n    {\n        auto msg = mmake<InputMouseWheelMsg>();\n        msg->delta = delta;\n        mInputQueue.Add(msg);\n    }\n\n\n    bool Input::Cursor::operator==(const Cursor& other) const\n    {\n        return Math::Equals(position, other.position) && Math::Equals(delta, other.delta) && id == other.id &&\n            Math::Equals(pressedTime, other.pressedTime);\n    }\n\n    Input::Cursor::Cursor(const Vec2F& position /*= Vec2F()*/, CursorId id /*= 0*/):\n        position(position), delta(), id(id), pressedTime(0), isPressed(true)\n    {}\n\n\n    bool Input::Key::operator==(const Key& other) const\n    {\n        return keyCode == other.keyCode && Math::Equals(other.pressedTime, pressedTime);\n    }\n\n    Input::Key::Key(KeyboardKey key /*= 0*/):keyCode(key), pressedTime(0)\n    {}\n\n    bool Input::Key::operator==(KeyboardKey key) const\n    {\n        return keyCode == key;\n    }\n\n    bool Input::InputCursorPressedMsg::Apply()\n    {\n        o2Input.OnCursorPressedMsgApply(position, id);\n        return true;\n    }\n\n    bool Input::InputCursorMovedMsg::Apply()\n    {\n        o2Input.OnCursorMovedMsgApply(position, id);\n        return true;\n    }\n\n    bool Input::InputCursorReleasedMsg::Apply()\n    {\n        o2Input.OnCursorReleasedMsgApply(id);\n        return true;\n    }\n\n    bool Input::InputKeyPressedMsg::Apply()\n    {\n        o2Input.OnKeyPressedMsgApply(key);\n\n    #if defined PLATFORM_MAC\n        if (key == VK_COMMAND)\n            o2Input.OnKeyPressedMsgApply(VK_CTRL_CMD);\n    #elif defined PLATFORM_WINDOWS || defined PLATFORM_LINUX\n        if (key == VK_CONTROL)\n            o2Input.OnKeyPressedMsgApply(VK_CTRL_CMD);\n    #endif\n\n        return true;\n    }\n\n    bool Input::InputKeyReleasedMsg::Apply()\n    {\n        bool result = o2Input.OnKeyReleasedMsgApply(key);\n\n    #if defined PLATFORM_MAC\n        if (key == VK_COMMAND)\n            o2Input.OnKeyReleasedMsgApply(VK_CTRL_CMD);\n    #elif defined PLATFORM_WINDOWS || defined PLATFORM_LINUX\n        if (key == VK_CONTROL)\n            o2Input.OnKeyReleasedMsgApply(VK_CTRL_CMD);\n    #endif\n\n        return result;\n    }\n\n    bool Input::InputMouseWheelMsg::Apply()\n    {\n        o2Input.OnMouseWheelMsgApply(delta);\n        return true;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Input.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\n#if defined(PLATFORM_ANDROID) || defined(PLATFORM_MAC) || defined(PLATFORM_IOS) || defined(PLATFORM_LINUX)\n#include \"o2/Application/VKCodes.h\"\n#elif defined PLATFORM_WINDOWS\n#include <windows.h>\n#undef GetObject\n#endif\n\n// Input access macros\n#define o2Input o2::Input::Instance()\n\nnamespace o2\n{\n    // -------------------------------------------------------------------------\n    // Input message. Containing pressed, down, released keys, cursors positions\n    // -------------------------------------------------------------------------\n    class Input : public Singleton<Input>\n    {\n    public:\n        struct Cursor;\n        struct Key;\n\n    public:\n        PROPERTIES(Input);\n        GETTER(bool, cursorPressed, IsCursorPressed);            // Is cursor pressed at current frame getter\n        GETTER(bool, cursorDown, IsCursorDown);                  // Is cursor down at current frame getter\n        GETTER(bool, cursorReleased, IsCursorReleased);          // Is cursor released at current frame getter\n        GETTER(bool, altCursorPressed, IsRightMousePressed);     // Is alt cursor pressed at current frame getter (right mouse button)\n        GETTER(bool, altCursorDown, IsRightMouseDown);           // Is alt cursor down at current frame getter (right mouse button)\n        GETTER(bool, altCursorReleased, IsRightMouseReleased);   // Is alt cursor released at current frame getter (right mouse button)\n        GETTER(bool, alt2CursorPressed, IsMiddleMousePressed);   // Is alt2 cursor pressed at current frame getter (middle mouse button)\n        GETTER(bool, alt2CursorDown, IsMiddleMouseDown);         // Is alt2 cursor down at current frame getter (middle mouse button)\n        GETTER(bool, alt2CursorReleased, IsMiddleMouseReleased); // Is alt2 cursor released at current frame getter (middle mouse button)\n        GETTER(Vec2F, cursorPos, GetCursorPos);                  // Cursor position getter\n        GETTER(Vec2F, cursorDelta, GetCursorDelta);              // Cursor position delta getter\n\n    public:\n        // Default constructor\n        Input(RefCounter* refCounter);\n\n        // Returns true if key was pressed at current frame\n        bool IsKeyPressed(KeyboardKey key) const;\n\n        // Returns true if key was pressed some frames ago\n        bool IsKeyDown(KeyboardKey key) const;\n\n        // Returns true, if key was released at current frame\n        bool IsKeyReleased(KeyboardKey key) const;\n\n        // Returns true, if key was pressed and repeated after delay\n        bool IsKeyRepeating(KeyboardKey key, float delay = 0.04f, float beginDelay = 0.5f) const;\n\n        // Returns key pressing time. Returns 0 if key not pressed\n        float GetKeyPressingTime(KeyboardKey key) const;\n\n        // Returns position of cursor\n        Vec2F GetCursorPos(CursorId id = 0) const;\n\n        // Returns true, when cursor pressed at current frame\n        bool IsCursorPressed(CursorId id = 0) const;\n\n        // Returns true, when cursor is down\n        bool IsCursorDown(CursorId id = 0) const;\n\n        // Returns true, when cursor released at current frame\n        bool IsCursorReleased(CursorId id = 0) const;\n\n        // Returns cursor pressed time. 0 if cursor not pressed\n        float GetCursorPressingTime(CursorId id = 0) const;\n\n        // Returns cursor delta\n        Vec2F GetCursorDelta(CursorId id = 0) const;\n\n        // Returns true, when right mouse button pressed (right mouse button)\n        bool IsRightMousePressed() const;\n\n        // Returns true, when right mouse button down (right mouse button)\n        bool IsRightMouseDown() const;\n\n        // Returns true, when right mouse button released (right mouse button)\n        bool IsRightMouseReleased() const;\n\n        // Returns right mouse button pressed time (right mouse button). 0 if cursor not pressed\n        float GetRightMousePressedTime() const;\n\n        // Returns true, when middle mouse button pressed (medium mouse button)\n        bool IsMiddleMousePressed() const;\n\n        // Returns true, when middle mouse button down (medium mouse button)\n        bool IsMiddleMouseDown() const;\n\n        // Returns true, when middle mouse button released (medium mouse button)\n        bool IsMiddleMouseReleased() const;\n\n        // Returns middle mouse button pressed time (medium mouse button). 0 if cursor not pressed\n        float GetMiddleMousePressedTime() const;\n\n        // Returns mouse wheel delta at frame\n        float GetMouseWheelDelta() const;\n\n        // Returns cursor by id. Returns nullptr if no cursor with specified id\n        Cursor* GetCursor(CursorId id = 0);\n\n        // Returns cursors vector\n        const Vector<Cursor>& GetCursors() const;\n\n        // Returns released cursors vector\n        const Vector<Cursor>& GetReleasedCursors() const;\n\n        // Returns pressed keys\n        Vector<Key> const& GetPressedKeys() const;\n\n        // Returns pressed keys\n        Vector<Key> const& GetDownKeys() const;\n\n        // Returns pressed keys\n        Vector<Key> const& GetReleasedKeys() const;\n\n        // Call it when preparing to update frame\n        void PreUpdate();\n\n        // Call it after frame update\n        void Update(float dt);\n\n        // Platform inputs\n\n        // Call it when key pressed\n        void OnKeyPressed(KeyboardKey key);\n\n        // Call it when key released\n        void OnKeyReleased(KeyboardKey key);\n\n        // Call it when cursor pressed\n        void OnCursorPressed(const Vec2F& pos, CursorId id = 0);\n\n        // Call it when cursor changed position. Id - index of cursor*/\n        void OnCursorMoved(const Vec2F& pos, CursorId id = 0, bool withDelta = true);\n\n        // Call it when cursor released\n        void OnCursorReleased(CursorId id = 0);\n\n        // Call it when alt cursor pressed (right mouse button)\n        void OnAltCursorPressed(const Vec2F& pos);\n\n        // Call it when alt cursor released (right mouse button)\n        void OnAltCursorReleased();\n\n        // Call it when alt 2 cursor pressed (medium mouse button)\n        void OnAlt2CursorPressed(const Vec2F& pos);\n\n        // Call it when alt 2 cursor released (medium mouse button)\n        void OnAlt2CursorReleased();\n\n        // Call when changed mouse wheel delta\n        void OnMouseWheel(float delta);\n\n    public:\n        // -----------------\n        // Cursor definition\n        // -----------------\n        struct Cursor\n        {\n            Vec2F    position;    // Current cursor position, in pixels, from left top corner \n            Vec2F    delta;       // Cursor moving delta between frames\n            CursorId id;          // Cursor id\n            float    pressedTime; // Time until key is pressed in seconds\n            bool     isPressed;   // True when cursor is pressed down\n\n        public:\n            // Constructor\n            Cursor(const Vec2F& position = Vec2F(), CursorId id = 0);\n\n            // Equals operator\n            bool operator==(const Cursor& other) const;\n        };\n\n        // ---------------------\n        // Key with pressed time\n        // ---------------------\n        struct Key\n        {\n            KeyboardKey keyCode;     // Key id\n            float       pressedTime; // Key pressing time\n\n        public:\n            // Constructor\n            Key(KeyboardKey key = 0);\n\n            // Equals operator\n            bool operator==(const Key& other) const;\n\n            // Equals operator\n            bool operator==(KeyboardKey key) const;\n        };\n\n        // -----------------------\n        // Input message interface\n        // -----------------------\n        struct IInputMsg: public RefCounterable\n        {\n            // Virtual destructor\n            virtual ~IInputMsg() {}\n\n            // Applies input message. Returns true when message processed, and false when not and must be processed at next frame\n            virtual bool Apply() = 0;\n        };\n\n        struct InputCursorPressedMsg : public IInputMsg\n        {\n            int   id;\n            Vec2F position;\n\n            bool Apply() override;\n        };\n\n        struct InputCursorMovedMsg : public IInputMsg\n        {\n            int   id;\n            Vec2F position;\n\n            bool Apply() override;\n        };\n\n        struct InputCursorReleasedMsg : public IInputMsg\n        {\n            int id;\n\n            bool Apply() override;\n        };\n\n        struct InputKeyPressedMsg : public IInputMsg\n        {\n            KeyboardKey key;\n\n            bool Apply() override;\n        };\n\n        struct InputKeyReleasedMsg : public IInputMsg\n        {\n            KeyboardKey key;\n\n            bool Apply() override;\n        };\n\n        struct InputMouseWheelMsg : public IInputMsg\n        {\n            float delta;\n\n            bool Apply() override;\n        };\n\n    protected:\n        Vector<Ref<IInputMsg>> mInputQueue; // Input messages queue\n\n        Vector<Key> mPressedKeys;  // Pressed keys at current frame\n        Vector<Key> mDownKeys;     // Held down at current frame keys\n        Vector<Key> mReleasedKeys; // Released at current frame keys\n\n        Vector<Cursor> mCursors;         // Cursors. First - main cursor\n        Vector<Cursor> mReleasedCursors; // Released cursors. First - main cursor\n\n        Vec2F mMainCursorPos;   // Main cursor position\n        Vec2F mMainCursorDelta; // Main cursor delta\n\n        float mMouseWheelDelta = 0; // Mouse wheel delta at current frame\n\n    protected:\n        // Returns true, when cursor pressed at current frame\n        bool IsMainCursorPressed();\n\n        // Returns true, when cursor down at current frame\n        bool IsMainCursorDown();\n\n        // Returns true, when cursor released at current frame\n        bool IsMainCursorReleased();\n\n        // Returns main cursor position\n        Vec2F GetMainCursorPos();\n\n        // Returns main cursor delta\n        Vec2F GetMainCursorDelta();\n\n        // Called when key pressed message apply\n        void OnKeyPressedMsgApply(KeyboardKey key);\n\n        // Called when key released message apply\n        bool OnKeyReleasedMsgApply(KeyboardKey key);\n\n        // Called when cursor pressed message apply\n        void OnCursorPressedMsgApply(const Vec2F& pos, CursorId id = 0);\n\n        // Called when cursor changed position message apply. Id - index of cursor*/\n        void OnCursorMovedMsgApply(const Vec2F& pos, CursorId id = 0, bool withDelta = true);\n\n        // Called when cursor released message apply\n        void OnCursorReleasedMsgApply(CursorId id = 0);\n\n        // Called when changed mouse wheel delta message apply\n        void OnMouseWheelMsgApply(float delta);\n\n        friend class Application;\n        friend class WndProcFunc;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Linux/ApplicationBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_LINUX\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Types/String.h\"\n\n#if !defined(O2_RENDER_GLES2)\n#include <X11/Xlib.h>\n#endif\n\nnamespace o2\n{\n    class Application;\n\n    // -------------------------------\n    // Windows application base fields\n    // -------------------------------\n    class ApplicationBase\n    {\n    protected:\n#if !defined(O2_DISABLE_PLATFORM)\n        ::Window mWindow;         // X Window\n        Display* mDisplay;        // Display\n\n        XVisualInfo* mVisualInfo; // Window visual info\n#endif\n\n        bool   mWindowed;        // True if app in windowed mode, false if in fullscreen mode\n        bool   mWindowResizible; // True, if window can be sized by user\n        Vec2I  mWindowedPos;     // Position of window\n        String mWndCaption;      // Window caption\n        bool   mActive;          // True, if window is active\n\n        //HCURSOR mCurrentCursor;  // Current cursor type\n\n        bool mNeedPlatformInitialization = true; // True, if need to initialize platform: window and render\n\n    public:\n        friend class Render;\n        friend class FileSystem;\n    };\n}\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Linux/ApplicationImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_LINUX\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\n#if !defined(O2_RENDER_GLES2)\n#include <GL/glx.h>\n#endif\n\nnamespace o2\n{\n\n    void Application::Initialize()\n    {\n        BasicInitialize();\n    }\n\n    void Application::InitializePlatform()\n    {\n        mWindowed = true;\n        mWindowedSize = Vec2I(800, 600);\n        mWindowedPos = Vec2I(0, 0);\n        mWindowResizible = true;\n        mActive = false;\n\n#if !defined(O2_DISABLE_PLATFORM)\n        if (mNeedPlatformInitialization)\n        {\n            mLog->Out(\"Initializing window..\");\n\n            mDisplay = XOpenDisplay(NULL);\n            if (!mDisplay)\n            {\n                mLog->Error(\"Can't open display\");\n                return;\n            }\n\n            int screen = DefaultScreen(mDisplay);\n            Window rootWindow = RootWindow(mDisplay, screen);\n\n            GLint att[] = {GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, 0};\n            mVisualInfo = glXChooseVisual(mDisplay, 0, att);\n\n            Colormap cmap = XCreateColormap(mDisplay, rootWindow, mVisualInfo->visual, AllocNone);\n\n            XSetWindowAttributes winAttrs;\n            winAttrs.colormap = cmap;\n            winAttrs.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask |\n                                  ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask |\n                                  Button1MotionMask | VisibilityChangeMask | FocusChangeMask;\n\n            mWindow = XCreateWindow(mDisplay, rootWindow, mWindowedPos.x, mWindowedPos.y,\n                mWindowedSize.x, mWindowedSize.y, 0, mVisualInfo->depth, InputOutput, mVisualInfo->visual, CWColormap | CWEventMask, &winAttrs);\n\n            XStoreName(mDisplay, mWindow, \"o2 application\");\n            XMapWindow(mDisplay, mWindow);\n\n            mLog->Out(\"Window initialized!\");\n        }\n#endif\n    }\n\n    void Application::Shutdown()\n    {\n        //DestroyWindow(mHWnd);\n    }\n\n    void Application::SetFullscreen(bool fullscreen /*= true*/)\n    {\n//        if (fullscreen)\n//        {\n//            //mRenderSystem->FrameResized();\n//            mLog->Out(\"Setting full screen\");\n//        }\n//        else\n//        {\n//            mLog->Out(\"Setting windowed..\");\n//\n//            mWindowed = true;\n//\n//            RECT rt = { mWindowedPos.x, mWindowedPos.y, mWindowedPos.x + mWindowedSize.x, mWindowedPos.y + mWindowedSize.y };\n//            AdjustWindowRect(&rt, mWndStyle, false);\n//            SetWindowPos(mHWnd, HWND_NOTOPMOST, mWindowedPos.x, mWindowedPos.y,\n//                         mWindowedSize.x, mWindowedSize.y, SWP_SHOWWINDOW);\n//\n//            //mRenderSystem->FrameResized();\n//            mLog->Out(\"Complete\");\n//        }\n    }\n\n    void Application::CheckCursorInfiniteMode()\n    {\n//        int threshold = 10;\n//        POINT p, lp;\n//        GetCursorPos(&p);\n//        lp = p;\n//\n//        Vec2I resolution = GetScreenResolution();\n//\n//        if (p.x > resolution.x - threshold)\n//            p.x = threshold;\n//        else if (p.x < threshold)\n//            p.x = resolution.x - threshold;\n//\n//        if (p.y > resolution.y - threshold)\n//            p.y = threshold;\n//        else if (p.y < threshold)\n//            p.y = resolution.y - threshold;\n//\n//        SetCursorPos(p.x, p.y);\n//\n//        if (p.x != lp.x || p.y != lp.y)\n//            mCursorCorrectionDelta = Vec2F((float)(lp.x - p.x), (float)(lp.y - p.y));\n    }\n\n    void Application::Launch()\n    {\n        mLog->Out(\"Application launched!\");\n\n        OnStarted();\n        onStarted.Invoke();\n        o2Events.OnApplicationStarted();\n\n        //mTimer->Reset();\n        Vec2I cursorPos;\n\n#if !defined(O2_DISABLE_PLATFORM)\n        Atom wmDeleteMessage = XInternAtom(mDisplay, \"WM_DELETE_WINDOW\", False);\n        XSetWMProtocols(mDisplay, mWindow, &wmDeleteMessage, 1);\n\n        while (1)\n        {\n            bool breakCycle = false;\n            while (XPending(mDisplay) > 0)\n            {\n                XEvent xev;\n                XNextEvent( mDisplay, &xev );\n\n                //mLog->Out(\"event type \" + (String)xev.type);\n\n                if(xev.type == ClientMessage && xev.xclient.data.l[0] == wmDeleteMessage)\n                {\n                    // Exit the main loop if the close button is clicked\n                    breakCycle = true;\n                }\n\n                if(xev.type == KeyPress)\n                {\n                    int key = XLookupKeysym( &xev.xkey, 0 );\n                    mInput->OnKeyPressed( key );\n                }\n\n                if (xev.type == KeyRelease)\n                {\n                    int key = XLookupKeysym( &xev.xkey, 0 );\n                    mInput->OnKeyReleased( key );\n                }\n\n                if (xev.type == ButtonPress)\n                {\n                    int button = xev.xbutton.button;\n                    if(button == Button1)\n                        mInput->OnCursorPressed( cursorPos );\n                    else if(button == Button2)\n                        mInput->OnAlt2CursorPressed( cursorPos );\n                    else if(button == Button3)\n                        mInput->OnAltCursorPressed( cursorPos );\n                    if (xev.xbutton.button == Button4)\n                        mInput->OnMouseWheel(120);\n                    else if (xev.xbutton.button == Button5)\n                        mInput->OnMouseWheel(-120);\n                }\n\n                if (xev.type == ButtonRelease)\n                {\n                    int button = xev.xbutton.button;\n                    if(button == Button1)\n                        mInput->OnCursorReleased();\n                    else if(button == Button2)\n                        mInput->OnAlt2CursorReleased();\n                    else if(button == Button3)\n                        mInput->OnAltCursorReleased();\n                }\n\n                if (xev.type == MotionNotify)\n                {\n                    Vec2I pos( xev.xmotion.x, xev.xmotion.y );\n\n                    cursorPos = o2::Vec2I(pos.x - mWindowedSize.x / 2, mWindowedSize.y / 2 - pos.y);\n                    mInput->OnCursorMoved( cursorPos );\n                }\n\n                if(xev.type == ResizeRequest)\n                {\n                    OnResized( Vec2I( xev.xresizerequest.width, xev.xresizerequest.height ) );\n                }\n            }\n\n            XWindowAttributes gwa;\n            XGetWindowAttributes(mDisplay, mWindow, &gwa);\n            Vec2I windowedSize(gwa.width, gwa.height);\n            if (windowedSize != mWindowedSize)\n                OnResized(windowedSize);\n\n            ProcessFrame();\n\n            if (breakCycle)\n                break;\n        }\n#endif\n\n        o2Events.OnApplicationClosing();\n        OnClosing();\n        onClosing.Invoke();\n        \n        Deinitialize();\n    }\n\n    bool Application::IsFullScreen() const\n    {\n        return !mWindowed;\n    }\n\n    void Application::Maximize()\n    {\n        //ShowWindow(mHWnd, SW_MAXIMIZE);\n    }\n\n    bool Application::IsMaximized() const\n    {\n        return false;\n    }\n\n    void Application::SetResizible(bool resizible)\n    {\n        if (resizible == mWindowResizible)\n            return;\n\n        mWindowResizible = resizible;\n        mLog->Out(\"Set resizible: \" + ((mWindowResizible ? (String)\"true\" : (String)\"false\")));\n    }\n\n    bool Application::IsResizible() const\n    {\n        return mWindowResizible;\n    }\n\n    void Application::SetWindowSizePlatform(const Vec2I& size)\n    {\n        mWindowedSize = size;\n        mLog->Out(\"Set sindow size: %ix%i\", mWindowedSize.x, mWindowedSize.y);\n        SetFullscreen(!mWindowed);\n    }\n\n    Vec2I Application::GetWindowSize() const\n    {\n        return mWindowedSize;\n    }\n\n    void Application::SetWindowPosition(const Vec2I& position)\n    {\n        mWindowedPos = position;\n        mLog->Out(\"Set window position: %i, %i\", mWindowedPos.x, mWindowedPos.y);\n        SetFullscreen(!mWindowed);\n    }\n\n    Vec2I Application::GetWindowPosition() const\n    {\n        return mWindowedPos;\n    }\n\n    void Application::SetWindowCaption(const String& caption)\n    {\n        mWndCaption = caption;\n#if !defined(O2_DISABLE_PLATFORM)\n        if (mDisplay && mWindow)\n            XStoreName(mDisplay, mWindow, caption.Data());\n#endif\n    }\n\n    String Application::GetWindowCaption() const\n    {\n        return mWndCaption;\n    }\n\n    void Application::SetContentSize(const Vec2I& size)\n    {\n        Vec2I clientRectSize = size;\n\n        mWindowedSize = size;\n\n//        mWindowedPos = Vec2I(clientRect.left, clientRect.top);\n//        mWindowedSize = Vec2I(clientRect.right - clientRect.left, clientRect.bottom - clientRect.top);\n\n        mLog->Out(\"Set Content Size: %ix%i\", size.x, size.y);\n\n        SetFullscreen(!mWindowed);\n\n        mRender->OnFrameResized();\n        onResizing();\n    }\n\n    Vec2I Application::GetContentSize() const\n    {\n        return mWindowedSize;\n    }\n\n    Vec2I Application::GetScreenResolution() const\n    {\n\n#if !defined(O2_DISABLE_PLATFORM)\n        int screen = DefaultScreen(mDisplay);\n        return Vec2I(DisplayWidth(mDisplay, screen), DisplayHeight(mDisplay, screen));\n#else\n        return Vec2I(800, 600);\n#endif\n    }\n\n    void Application::SetCursor(CursorType type)\n    {\n    }\n\n    void Application::SetCursorPosition(const Vec2F& position)\n    {\n    }\n\n    String Application::GetBinPath() const\n    {\n        return \"\";\n    }\n}\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Mac/AppDelegate.h",
    "content": "#ifdef PLATFORM_MAC\n\n#import <Cocoa/Cocoa.h>\n\n@interface O2Application : NSApplication\n@end\n\n@interface AppDelegate : NSObject <NSApplicationDelegate>\n@end\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Mac/AppDelegate.mm",
    "content": "#ifdef PLATFORM_MAC\n\n#import \"AppDelegate.h\"\n#import <MetalKit/MetalKit.h>\n#import \"RendererView.h\"\n#include \"ApplicationPlatformWrapper.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\n@implementation O2Application\n\n- (void)sendEvent:(NSEvent *)event {\n    if ([event type] == NSEventTypeKeyUp && ([event modifierFlags] & NSEventModifierFlagCommand)) {\n        [[self keyWindow] sendEvent:event];\n    } else {\n        [super sendEvent:event];\n    }\n}\n\n@end\n\n@interface AppDelegate ()\n\n@end\n\n@implementation AppDelegate\n\n- (void)applicationWillTerminate:(NSNotification *)aNotification {\n    o2::ApplicationPlatformWrapper::Deinitialize();\n}\n\n- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {\n    return YES;\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Mac/ApplicationBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_MAC\n\nnamespace o2\n{\n    // -------------------------------\n    // Android application base fields\n    // -------------------------------\n    class ApplicationBase\n    {\n    };\n}\n\n#endif // PLATFORM_MAC\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Mac/ApplicationImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_MAC\n#import <Cocoa/Cocoa.h>\n#import \"o2/Application/Mac/RendererView.h\"\n#import \"o2/Application/Mac/AppDelegate.h\"\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Mac/ApplicationPlatformWrapper.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    NSWindow* ApplicationPlatformWrapper::window;\n    MTKView* ApplicationPlatformWrapper::view;\n    RendererView* ApplicationPlatformWrapper::renderer;\n    Vec2I ApplicationPlatformWrapper::resolution;\n\n    void ApplicationPlatformWrapper::OnWindowResized(const Vec2I& resolution)\n    {\n        ApplicationPlatformWrapper::resolution = resolution;\n        \n        if (Application::IsSingletonInitialzed())\n            o2Application.OnResized(resolution);\n    }\n    \n    void ApplicationPlatformWrapper::Deinitialize()\n    {\n        if (Application::IsSingletonInitialzed())\n            o2Application.Deinitialize();\n    }\n\n    void Application::Initialize()\n    {\n        BasicInitialize();\n    }\n    \n    void Application::InitializePlatform()\n    {\n        [O2Application sharedApplication];\n        [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];\n        [NSApp activateIgnoringOtherApps:YES];        \n        [NSApp setDelegate:[[AppDelegate alloc] init]];\n        \n        ApplicationPlatformWrapper::window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 960, 640)\n                                                                         styleMask:NSWindowStyleMaskClosable|NSWindowStyleMaskTitled|NSWindowStyleMaskResizable\n                                                                           backing:NSBackingStoreBuffered defer:NO];\n        \n        [ApplicationPlatformWrapper::window setTitle: [[NSProcessInfo processInfo] processName]];\n        [ApplicationPlatformWrapper::window makeKeyAndOrderFront:nil];\n        \n        ApplicationPlatformWrapper::view = [[ViewController alloc] init];\n        ApplicationPlatformWrapper::view.colorPixelFormat = MTLPixelFormatRGBA8Unorm;\n        ApplicationPlatformWrapper::view.device = MTLCreateSystemDefaultDevice();\n        \n        if(!ApplicationPlatformWrapper::view.device)\n        {\n            o2Debug.LogError(\"Metal is not supported on this device\");\n            return;\n        }\n\n        ApplicationPlatformWrapper::renderer = [[RendererView alloc] initWithMetalKitView:ApplicationPlatformWrapper::view];\n        [ApplicationPlatformWrapper::renderer mtkView:ApplicationPlatformWrapper::view drawableSizeWillChange:ApplicationPlatformWrapper::view.drawableSize];\n        ApplicationPlatformWrapper::view.delegate = ApplicationPlatformWrapper::renderer;\n        \n        [ApplicationPlatformWrapper::window setContentView:ApplicationPlatformWrapper::view];\n        [ApplicationPlatformWrapper::window setInitialFirstResponder:ApplicationPlatformWrapper::view];\n        \n        mGraphicsScale = [[ApplicationPlatformWrapper::view layer] contentsScale];\n        \n        [ApplicationPlatformWrapper::window makeFirstResponder:ApplicationPlatformWrapper::view];\n    }\n\n    void Application::Shutdown()\n    {}\n\n    void Application::SetFullscreen(bool fullscreen /*= true*/)\n    {}\n\n    void Application::CheckCursorInfiniteMode()\n    {}\n\n    void Application::Launch()\n    {\n        mLog->Out(\"Application launched!\");\n\n        OnStarted();\n        onStarted.Invoke();\n        o2Events.OnApplicationStarted();\n        \n        [(ViewController*)ApplicationPlatformWrapper::view initializeMouseTracking];\n        \n        [NSApp run];\n    }\n\n    void Application::Update()\n    {\n        ProcessFrame();\n    }\n\n    bool Application::IsFullScreen() const\n    {\n        return false;\n    }\n\n    void Application::Maximize()\n    {\n        [ApplicationPlatformWrapper::window zoom:nil];\n    }\n\n    bool Application::IsMaximized() const\n    {\n        return [ApplicationPlatformWrapper::window isZoomed];\n    }\n\n    void Application::SetResizible(bool resizible)\n    {\n        NSWindowStyleMask currentMask = [ApplicationPlatformWrapper::window styleMask];\n        if (resizible) {\n            [ApplicationPlatformWrapper::window setStyleMask:currentMask | NSWindowStyleMaskResizable];\n        } else {\n            [ApplicationPlatformWrapper::window setStyleMask:currentMask & ~NSWindowStyleMaskResizable];\n        }\n    }\n\n    bool Application::IsResizible() const\n    {\n        return ([ApplicationPlatformWrapper::window styleMask] & NSWindowStyleMaskResizable) != 0;\n    }\n\n    void Application::SetWindowSizePlatform(const Vec2I& size)\n    {\n        [ApplicationPlatformWrapper::window setContentSize:NSMakeSize(size.x, size.y)];\n    }\n\n    Vec2I Application::GetWindowSize() const\n    {\n        NSRect contentRect = [ApplicationPlatformWrapper::window contentRectForFrameRect:[ApplicationPlatformWrapper::window frame]];\n        return Vec2I(contentRect.size.width, contentRect.size.height);\n    }\n\n    void Application::SetWindowPosition(const Vec2I& position)\n    {\n        [ApplicationPlatformWrapper::window setFrameOrigin:NSMakePoint(position.x, position.y)];\n        [ApplicationPlatformWrapper::window makeKeyAndOrderFront:nil];\n    }\n\n    Vec2I Application::GetWindowPosition() const\n    {\n        NSRect frame = [ApplicationPlatformWrapper::window frame];\n        return Vec2I(frame.origin.x, frame.origin.y);\n    }\n\n    void Application::SetWindowCaption(const String& caption)\n    {\n        [ApplicationPlatformWrapper::window setTitle:[NSString stringWithUTF8String:caption.Data()]];\n    }\n\n    String Application::GetWindowCaption() const\n    {\n        return [[ApplicationPlatformWrapper::window title] UTF8String];\n    }\n\n    void Application::SetContentSize(const Vec2I& size)\n    {\n        [ApplicationPlatformWrapper::window setContentSize:NSMakeSize(size.x, size.y)];\n    }\n\n    Vec2I Application::GetContentSize() const\n    {\n        return ApplicationPlatformWrapper::resolution;\n    }\n\n    Vec2I Application::GetScreenResolution() const\n    {\n        NSScreen* mainScreen = [NSScreen mainScreen];\n        CGSize screenSize = [mainScreen frame].size;\n        return Vec2I(screenSize.width, screenSize.height);\n    }\n\n    void Application::SetCursor(CursorType type)\n    {\n        NSCursor* cursor = nil;\n        \n        switch (type)\n        {\n            case CursorType::AppStarting:\n                cursor = [NSCursor disappearingItemCursor];\n                break;\n                \n            case CursorType::Arrow:\n                cursor = [NSCursor arrowCursor];\n                break;\n                \n            case CursorType::Cross:\n                cursor = [NSCursor crosshairCursor];\n                break;\n                \n            case CursorType::Hand:\n                cursor = [NSCursor pointingHandCursor];\n                break;\n                \n            case CursorType::Help:\n                cursor = [NSCursor contextualMenuCursor];\n                break;\n                \n            case CursorType::IBeam:\n                cursor = [NSCursor IBeamCursor];\n                break;\n                \n            case CursorType::Icon:\n                cursor = [NSCursor arrowCursor];\n                break;\n                \n            case CursorType::No:\n                cursor = [NSCursor operationNotAllowedCursor];\n                break;\n                \n            case CursorType::SizeAll:\n                cursor = [NSCursor crosshairCursor];\n                break;\n                \n            case CursorType::SizeNeSw:\n                cursor = [[NSCursor class] performSelector:@selector(_windowResizeNorthEastSouthWestCursor)];\n                break;\n                \n            case CursorType::SizeNS:\n                cursor = [[NSCursor class] performSelector:@selector(_windowResizeNorthSouthCursor)];\n                break;\n                \n            case CursorType::SizeNwSe:\n                cursor = [[NSCursor class] performSelector:@selector(_windowResizeNorthWestSouthEastCursor)];\n                break;\n                \n            case CursorType::SizeWE:\n                cursor = [[NSCursor class] performSelector:@selector(_windowResizeEastWestCursor)];\n                break;\n                \n            case CursorType::UpArrow:\n                cursor = [NSCursor arrowCursor];\n                break;\n                \n            case CursorType::Wait:\n                cursor = [NSCursor disappearingItemCursor];\n                break;\n                \n            default:\n                cursor = [NSCursor arrowCursor];\n                break;\n        }\n        \n        if (cursor)\n        {\n            [cursor set];\n            [[ApplicationPlatformWrapper::view window] invalidateCursorRectsForView:ApplicationPlatformWrapper::view];\n            [ApplicationPlatformWrapper::view addCursorRect:[ApplicationPlatformWrapper::view bounds] cursor:cursor];\n        }\n    }\n\n    void Application::SetCursorPosition(const Vec2F& position)\n    {\n        CGPoint point = CGPointMake(position.x, position.y);\n        CGWarpMouseCursorPosition(point);\n    }\n\n    String Application::GetBinPath() const\n    {\n        return \"\";\n    }\n}\n\n#endif // PLATFORM_MAC\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Mac/ApplicationPlatformWrapper.h",
    "content": "#ifdef PLATFORM_MAC\n\n#import \"AppDelegate.h\"\n#import <MetalKit/MetalKit.h>\n#include \"o2/Utils/Math/Vector2.h\"\n\n@class RendererView;\n\nnamespace o2\n{\n    struct ApplicationPlatformWrapper\n    {\n        static NSWindow*     window;\n        static MTKView*      view;\n        static RendererView* renderer;\n        \n        static Vec2I resolution;\n\n        static void OnWindowResized(const Vec2I& resolution);\n        static void Deinitialize();\n    };\n}\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Mac/RendererView.h",
    "content": "#ifdef PLATFORM_MAC\n\n#import <MetalKit/MetalKit.h>\n\n@interface RendererView : NSObject <MTKViewDelegate>\n\n-(nonnull instancetype)initWithMetalKitView:(nonnull MTKView *)view;\n\n@end\n\n@interface ViewController : MTKView {\n    NSMutableSet<NSNumber *> *pressedKeysWithCmd;\n    NSMutableSet<NSNumber *> *currentlyPressedKeys;\n}\n\n- (void)initializeMouseTracking;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Mac/RendererView.mm",
    "content": "#ifdef PLATFORM_MAC\n\n#import \"RendererView.h\"\n\n#import \"o2/Render/Mac/ShaderTypes.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Mac/MetalWrappers.h\"\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Application/Mac/ApplicationPlatformWrapper.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\n@implementation RendererView\n\n-(nonnull instancetype)initWithMetalKitView:(nonnull MTKView *)view;\n{\n    self = [super init];\n    return self;\n}\n\n- (void)drawInMTKView:(nonnull MTKView *)view\n{\n    o2Application.Update();\n}\n\n- (void)mtkView:(nonnull MTKView *)view drawableSizeWillChange:(CGSize)size\n{\n    float scale = o2Application.GetGraphicsScale();\n            o2::ApplicationPlatformWrapper::OnWindowResized(o2::Vec2I(size.width/scale, size.height/scale));\n}\n\n@end\n\n@implementation ViewController\n\n- (instancetype)init {\n    self = [super init];\n    if (self) {\n        pressedKeysWithCmd = [[NSMutableSet alloc] init];\n        currentlyPressedKeys = [[NSMutableSet alloc] init];\n    }\n    return self;\n}\n\n- (instancetype)initWithFrame:(NSRect)frame {\n    self = [super initWithFrame:frame];\n    if (self) {\n        pressedKeysWithCmd = [[NSMutableSet alloc] init];\n        currentlyPressedKeys = [[NSMutableSet alloc] init];\n    }\n    return self;\n}\n\n- (instancetype)initWithCoder:(NSCoder *)coder {\n    self = [super initWithCoder:coder];\n    if (self) {\n        pressedKeysWithCmd = [[NSMutableSet alloc] init];\n        currentlyPressedKeys = [[NSMutableSet alloc] init];\n    }\n    return self;\n}\n\n- (BOOL)acceptsFirstResponder {\n    return YES;\n}\n\n- (BOOL)canBecomeKeyView {\n    return YES;\n}\n\n- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent {\n    return YES;\n}\n\n- (void)viewDidMoveToWindow {\n    [super viewDidMoveToWindow];\n    if (self.window) {\n        [self.window makeFirstResponder:self];\n        o2Debug.Log(\"View became first responder: %s\", [self.window firstResponder] == self ? \"YES\" : \"NO\");\n    }\n}\n\n- (void)awakeFromNib {\n    [super awakeFromNib];\n    if (self.window) {\n        [self.window makeFirstResponder:self];\n    }\n}\n\n\n\n- (void)initializeMouseTracking {\n    [self initTrackingArea];\n}\n\n- (void)updateTrackingAreas {\n    [super updateTrackingAreas];\n    \n    for (NSTrackingArea *area in [self trackingAreas]) {\n        [self removeTrackingArea:area];\n    }\n    \n    [self initTrackingArea];\n}\n\n-(void)initTrackingArea {\n    NSRect bounds = [self bounds];\n    \n    NSTrackingAreaOptions options = (NSTrackingActiveAlways | NSTrackingInVisibleRect |\n                                     NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved);\n    \n    NSTrackingArea *area = [[NSTrackingArea alloc] initWithRect:bounds\n                                                        options:options\n                                                          owner:self\n                                                       userInfo:nil];\n    \n    [self addTrackingArea:area];\n}\n\n- (void)resetCursorRects\n{\n    [super resetCursorRects];\n    [self addCursorRect:[self bounds] cursor:[NSCursor currentCursor]];\n}\n\n- (int)getKeyCode:(NSEvent *)event\n{\n    const auto keyFlags = [event modifierFlags];\n    if (!(keyFlags & NSEventModifierFlagFunction))\n    {\n        NSString *str = [event charactersIgnoringModifiers];\n        if (str && [str length] != 0)\n        {\n            const int charCode = [str characterAtIndex : 0];\n            if (charCode >= 0)\n            {\n                constexpr int keyBackspace = 0x7f;\n                constexpr int keyReturn = 0x0d;\n                constexpr int keyPadEnter = 0x03;\n                constexpr int keyEscape = 0x1b;\n                \n                if ((charCode != keyBackspace) && (charCode != keyReturn) && (charCode != keyPadEnter) && (charCode != keyEscape))\n                    return charCode;\n            }\n        }\n    }\n    \n    return -[event keyCode];\n}\n\n- (void)keyDown:(NSEvent *)event\n{\n    int keyCode = [self getKeyCode:event];\n    bool cmdPressed = (event.modifierFlags & NSEventModifierFlagCommand) != 0;\n    bool isRepeat = [event isARepeat];\n    \n    if (isRepeat || [currentlyPressedKeys containsObject:@(keyCode)]) {\n        return;\n    }\n    \n    [currentlyPressedKeys addObject:@(keyCode)];\n    o2Input.OnKeyPressed(keyCode);\n    \n    if (cmdPressed) {\n        [pressedKeysWithCmd addObject:@(keyCode)];\n    }\n}\n\n- (void)keyUp:(NSEvent *)event\n{\n    int keyCode = [self getKeyCode:event];\n    \n    [currentlyPressedKeys removeObject:@(keyCode)];\n    o2Input.OnKeyReleased(keyCode);\n    \n    [pressedKeysWithCmd removeObject:@(keyCode)];\n}\n\n- (void)flagsChanged:(NSEvent*)event\n{\n    bool shift = event.modifierFlags & NSEventModifierFlagShift;\n    bool alt = event.modifierFlags & NSEventModifierFlagOption;\n    bool ctrl = event.modifierFlags & NSEventModifierFlagControl;\n    bool command = event.modifierFlags & NSEventModifierFlagCommand;\n    \n    static bool prevShift = false;\n    static bool prevAlt = false;\n    static bool prevCtrl = false;\n    static bool prevCommand = false;\n    \n    if (shift != prevShift)\n        shift ? o2Input.OnKeyPressed(VK_SHIFT) : o2Input.OnKeyReleased(VK_SHIFT);\n    \n    if (alt != prevAlt)\n        alt ? o2Input.OnKeyPressed(VK_MENU) : o2Input.OnKeyReleased(VK_MENU);\n    \n    if (ctrl != prevCtrl)\n        ctrl ? o2Input.OnKeyPressed(VK_CONTROL) : o2Input.OnKeyReleased(VK_CONTROL);\n    \n    if (command != prevCommand) {\n        if (command) {\n            o2Input.OnKeyPressed(VK_COMMAND);\n        } else {\n            o2Input.OnKeyReleased(VK_COMMAND);\n            \n            for (NSNumber *keyCodeNumber in pressedKeysWithCmd) {\n                int keyCode = [keyCodeNumber intValue];\n                o2Input.OnKeyReleased(keyCode);\n                [currentlyPressedKeys removeObject:@(keyCode)];\n            }\n            [pressedKeysWithCmd removeAllObjects];\n        }\n    }\n    \n    prevShift = shift;\n    prevAlt = alt;\n    prevCtrl = ctrl;\n    prevCommand = command;\n}\n\n- (o2::Vec2F)getMousePos:(NSEvent *)event\n{\n    NSPoint pt = [self convertPoint:[event locationInWindow] fromView:nil];\n    NSRect viewRectPoints = [self bounds];\n    NSRect viewRectPixels = [self convertRectToBacking:viewRectPoints];\n    \n    float scale = o2Application.GetGraphicsScale();\n    auto screenPoint = o2::Vec2F(o2::Math::Floor(pt.x - viewRectPixels.size.width/2/scale),\n                                 o2::Math::Floor(pt.y - viewRectPixels.size.height/2/scale));\n    \n    return screenPoint;\n}\n\n- (void)mouseDown:(NSEvent *)event\n{\n    o2Input.OnCursorPressed([self getMousePos:event]);\n}\n\n- (void)mouseDragged:(NSEvent *)event\n{\n    o2Input.OnCursorMoved([self getMousePos:event], 0);\n}\n\n- (void)mouseMoved:(NSEvent *)event\n{\n    o2Input.OnCursorMoved([self getMousePos:event], 0);\n}\n\n- (void)mouseUp:(NSEvent *)event\n{\n    o2Input.OnCursorReleased();\n}\n\n- (void)rightMouseDown:(NSEvent *)event\n{\n    o2Input.OnAltCursorPressed([self getMousePos:event]);\n}\n\n- (void)rightMouseUp:(NSEvent *)event\n{\n    o2Input.OnAltCursorReleased();\n}\n\n- (void)rightMouseDragged:(NSEvent *)event\n{\n    o2Input.OnCursorMoved([self getMousePos:event], 0);\n}\n\n- (void)scrollWheel:(NSEvent *)event\n{\n    o2Input.OnMouseWheel((float)event.scrollingDeltaY);\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Application/VKCodes.h",
    "content": "#pragma once\n\n#if defined PLATFORM_WINDOWS\n\n#define VK_F1             0x70\n#define VK_F2             0x71\n#define VK_F3             0x72\n#define VK_F4             0x73\n#define VK_F5             0x74\n#define VK_F6             0x75\n#define VK_F7             0x76\n#define VK_F8             0x77\n#define VK_F9             0x78\n#define VK_F10            0x79\n#define VK_F11            0x7A\n#define VK_F12            0x7B\n\n#define VK_OEM_3          0xC0\n#define VK_OEM_MINUS      0xBD\n#define VK_OEM_PLUS       0xBB\n\n#define VK_OEM_4          0xDB\n#define VK_OEM_6          0xDD\n\n#define VK_OEM_1          0xBA\n#define VK_OEM_7          0xDE\n#define VK_OEM_5          0xDC\n\n#define VK_OEM_COMMA      0xBC\n#define VK_OEM_PERIOD     0xBE\n#define VK_OEM_2          0xBF\n\n#define VK_ESCAPE         0x1B\n\n#define VK_SCROLL         0x91\n#define VK_PAUSE          0x13\n\n#define VK_BACK           0x08\n#define VK_TAB            0x09\n#define VK_CAPITAL        0x14\n#define VK_SHIFT          0x10\n#define VK_CONTROL        0x11\n#define VK_MENU           0x12\n#define VK_LWIN           0x5B\n#define VK_RWIN           0x5C\n#define VK_RETURN         0x0D\n#define VK_SPACE          0x20\n\n#define VK_PRIOR          0x21\n#define VK_NEXT           0x22\n#define VK_END            0x23\n#define VK_HOME           0x24\n#define VK_INSERT         0x2D\n#define VK_DELETE         0x2E\n\n#define VK_LEFT           0x25\n#define VK_UP             0x26\n#define VK_RIGHT          0x27\n#define VK_DOWN           0x28\n\n#define VK_NUMLOCK        0x90\n#define VK_CLEAR          0x0C\n\n#define VK_NUMPAD0        0x60\n#define VK_NUMPAD1        0x61\n#define VK_NUMPAD2        0x62\n#define VK_NUMPAD3        0x63\n#define VK_NUMPAD4        0x64\n#define VK_NUMPAD5        0x65\n#define VK_NUMPAD6        0x66\n#define VK_NUMPAD7        0x67\n#define VK_NUMPAD8        0x68\n#define VK_NUMPAD9        0x69\n\n#define VK_MULTIPLY       0x6A\n#define VK_ADD            0x6B\n#define VK_SEPARATOR      0x6C\n#define VK_SUBTRACT       0x6D\n#define VK_DECIMAL        0x6E\n#define VK_DIVIDE         0x6F\n#define VK_RETURN_NUMPAD  0x0D\n\n#define VK_0 '0'\n#define VK_1 '1'\n#define VK_2 '2'\n#define VK_3 '3'\n#define VK_4 '4'\n#define VK_5 '5'\n#define VK_6 '6'\n#define VK_7 '7'\n#define VK_8 '8'\n#define VK_9 '9'\n#define VK_A 'A'\n#define VK_B 'B'\n#define VK_C 'C'\n#define VK_D 'D'\n#define VK_E 'E'\n#define VK_F 'F'\n#define VK_G 'G'\n#define VK_H 'H'\n#define VK_I 'I'\n#define VK_J 'J'\n#define VK_K 'K'\n#define VK_L 'L'\n#define VK_M 'M'\n#define VK_N 'N'\n#define VK_O 'O'\n#define VK_P 'P'\n#define VK_Q 'Q'\n#define VK_R 'R'\n#define VK_S 'S'\n#define VK_T 'T'\n#define VK_U 'U'\n#define VK_V 'V'\n#define VK_W 'W'\n#define VK_X 'X'\n#define VK_Y 'Y'\n#define VK_Z 'Z'\n\n#elif defined PLATFORM_LINUX\n\n#include <X11/keysym.h>\n\n#define VK_BACK           XK_BackSpace\n#define VK_TAB            XK_Tab\n#define VK_RETURN         XK_Return\n#define VK_SHIFT          XK_Shift_L\n#define VK_CONTROL        XK_Control_L\n#define VK_MENU           XK_Alt_L\n#define VK_CAPITAL        XK_Caps_Lock\n#define VK_ESCAPE         XK_Escape\n#define VK_SPACE          XK_space\n#define VK_END            XK_End\n#define VK_PRIOR          XK_Prior\n#define VK_NEXT           XK_Next\n#define VK_HOME           XK_Home\n#define VK_INSERT         XK_Insert\n#define VK_DELETE         XK_Delete\n#define VK_LEFT           XK_Left\n#define VK_UP             XK_Up\n#define VK_RIGHT          XK_Right\n#define VK_DOWN           XK_Down\n#define VK_NUMLOCK        XK_Num_Lock\n#define VK_CLEAR          XK_Clear\n#define VK_LWIN           XK_Super_L\n#define VK_RWIN           XK_Super_R\n#define VK_F1             XK_F1\n#define VK_F2             XK_F2\n#define VK_F3             XK_F3\n#define VK_F4             XK_F4\n#define VK_F5             XK_F5\n#define VK_F6             XK_F6\n#define VK_F7             XK_F7\n#define VK_F8             XK_F8\n#define VK_F9             XK_F9\n#define VK_F10            XK_F10\n#define VK_F11            XK_F11\n#define VK_F12            XK_F12\n#define VK_OEM_3          XK_quoteleft\n#define VK_OEM_MINUS      XK_minus\n#define VK_OEM_PLUS       XK_plus\n#define VK_OEM_4          XK_bracketleft\n#define VK_OEM_6          XK_bracketright\n#define VK_OEM_1          XK_semicolon\n#define VK_OEM_7          XK_quoteright\n#define VK_OEM_5          XK_backslash\n#define VK_OEM_COMMA      XK_comma\n#define VK_OEM_PERIOD     XK_period\n#define VK_OEM_2          XK_slash\n#define VK_SCROLL         XK_Scroll_Lock\n#define VK_PAUSE          XK_Pause\n#define VK_NUMPAD0        XK_KP_0\n#define VK_NUMPAD1        XK_KP_1\n#define VK_NUMPAD2        XK_KP_2\n#define VK_NUMPAD3        XK_KP_3\n#define VK_NUMPAD4        XK_KP_4\n#define VK_NUMPAD5        XK_KP_5\n#define VK_NUMPAD6        XK_KP_6\n#define VK_NUMPAD7        XK_KP_7\n#define VK_NUMPAD8        XK_KP_8\n#define VK_NUMPAD9        XK_KP_9\n#define VK_MULTIPLY       XK_KP_Multiply\n#define VK_ADD            XK_KP_Add\n#define VK_SEPARATOR      XK_KP_Separator\n#define VK_SUBTRACT       XK_KP_Subtract\n#define VK_DECIMAL        XK_KP_Decimal\n#define VK_DIVIDE         XK_KP_Divide\n#define VK_RETURN_NUMPAD  XK_KP_Enter\n#define VK_0              XK_0\n#define VK_1              XK_1\n#define VK_2              XK_2\n#define VK_3              XK_3\n#define VK_4              XK_4\n#define VK_5              XK_5\n#define VK_6              XK_6\n#define VK_7              XK_7\n#define VK_8              XK_8\n#define VK_9              XK_9\n#define VK_A              XK_a\n#define VK_B              XK_b\n#define VK_C              XK_c\n#define VK_D              XK_d\n#define VK_E              XK_e\n#define VK_F              XK_f\n#define VK_G              XK_g\n#define VK_H              XK_h\n#define VK_I              XK_i\n#define VK_J              XK_j\n#define VK_K              XK_k\n#define VK_L              XK_l\n#define VK_M              XK_m\n#define VK_N              XK_n\n#define VK_O              XK_o\n#define VK_P              XK_p\n#define VK_Q              XK_q\n#define VK_R              XK_r\n#define VK_S              XK_s\n#define VK_T              XK_t\n#define VK_U              XK_u\n#define VK_V              XK_v\n#define VK_W              XK_w\n#define VK_X              XK_x\n#define VK_Y              XK_y\n#define VK_Z              XK_z\n\n#elif defined PLATFORM_MAC || defined PLATFORM_IOS || defined PLATFORM_WASM || defined PLATFORM_ANDROID\n\n#define VK_F1             -122\n#define VK_F2             -120\n#define VK_F3             -99\n#define VK_F4             -118\n#define VK_F5             -96\n#define VK_F6             -97\n#define VK_F7             -98\n#define VK_F8             -100\n#define VK_F9             -101\n#define VK_F10            -109\n#define VK_F11            -103\n#define VK_F12            -111\n\n#define VK_OEM_3          -50\n#define VK_OEM_MINUS      -27\n#define VK_OEM_PLUS       -24\n\n#define VK_OEM_4          -33\n#define VK_OEM_6          -30\n\n#define VK_OEM_1          -41\n#define VK_OEM_7          -39\n#define VK_OEM_5          -42\n\n#define VK_OEM_COMMA      -43\n#define VK_OEM_PERIOD     -47\n#define VK_OEM_2          -44\n\n#define VK_ESCAPE         -53\n\n#define VK_BACK           -51\n#define VK_TAB            -48\n#define VK_SHIFT          -56\n#define VK_CONTROL        -59\n#define VK_MENU           -58\n#define VK_RETURN         -36\n#define VK_SPACE          -49\n\n#define VK_COMMAND        -60\n#define VK_SELECT         -110\n#define VK_SNAPSHOT       -105\n\n#define VK_PRIOR          -116\n#define VK_NEXT           -121\n#define VK_END            -119\n#define VK_HOME           -115\n#define VK_DELETE         -117\n\n#define VK_LEFT           -123\n#define VK_UP             -126\n#define VK_RIGHT          -124\n#define VK_DOWN           -125\n\n#define VK_NUMLOCK        -71\n#define VK_CLEAR          -87\n\n#define VK_NUMPAD0        -82\n#define VK_NUMPAD1        -83\n#define VK_NUMPAD2        -84\n#define VK_NUMPAD3        -85\n#define VK_NUMPAD4        -86\n#define VK_NUMPAD5        -87\n#define VK_NUMPAD6        -88\n#define VK_NUMPAD7        -89\n#define VK_NUMPAD8        -91\n#define VK_NUMPAD9        -92\n\n#define VK_MULTIPLY       -67\n#define VK_ADD            -69\n#define VK_SUBTRACT       -78\n#define VK_DECIMAL        -65\n#define VK_DIVIDE         -75\n#define VK_RETURN_NUMPAD  -76\n\n#define VK_0 48\n#define VK_1 49\n#define VK_2 50\n#define VK_3 51\n#define VK_4 52\n#define VK_5 53\n#define VK_6 54\n#define VK_7 55\n#define VK_8 56\n#define VK_9 57\n#define VK_A 'A'\n#define VK_B 'B'    \n#define VK_C 'C'\n#define VK_D 'D'\n#define VK_E 'E'\n#define VK_F 'F'\n#define VK_G 'G'\n#define VK_H 'H'\n#define VK_I 'I'\n#define VK_J 'J'\n#define VK_K 'K'\n#define VK_L 'L'\n#define VK_M 'M'\n#define VK_N 'N'\n#define VK_O 'O'\n#define VK_P 'P'\n#define VK_Q 'Q'\n#define VK_R 'R'\n#define VK_S 'S'\n#define VK_T 'T'\n#define VK_U 'U'\n#define VK_V 'V'\n#define VK_W 'W'\n#define VK_X 'X'\n#define VK_Y 'Y'\n#define VK_Z 'Z'\n\n#endif\n\n// Cross-platform virtual key codes\n#define VK_CTRL_CMD       -1000  // Ctrl on Windows/Linux, Cmd on Mac\n"
  },
  {
    "path": "Framework/Sources/o2/Application/WebAssembly/ApplicationBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WASM\n\nnamespace o2\n{\n    // ------------------------------------\n    // WebAssembly application base fields\n    // ------------------------------------\n    class ApplicationBase\n    {\n    };\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Application/WebAssembly/ApplicationImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WASM\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/WebAssembly/OpenGL.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\n#include <emscripten.h>\n#include <emscripten/html5.h>\n#include <cstring>\n\nnamespace o2\n{\n    namespace\n    {\n        Vec2I gCanvasResolution = Vec2I(960, 640);\n\n        KeyboardKey MapDomKeyToVK(const char* code)\n        {\n            if (!code) return 0;\n\n            if (std::strncmp(code, \"Key\", 3) == 0 && code[3] != 0)\n                return (KeyboardKey)code[3];\n\n            if (std::strncmp(code, \"Digit\", 5) == 0 && code[5] != 0)\n                return (KeyboardKey)code[5];\n\n            if (std::strcmp(code, \"ArrowLeft\") == 0)  return 0x25;\n            if (std::strcmp(code, \"ArrowUp\") == 0)    return 0x26;\n            if (std::strcmp(code, \"ArrowRight\") == 0) return 0x27;\n            if (std::strcmp(code, \"ArrowDown\") == 0)  return 0x28;\n\n            if (std::strcmp(code, \"Space\") == 0)     return 0x20;\n            if (std::strcmp(code, \"Enter\") == 0)     return 0x0D;\n            if (std::strcmp(code, \"Escape\") == 0)    return 0x1B;\n            if (std::strcmp(code, \"Backspace\") == 0) return 0x08;\n            if (std::strcmp(code, \"Tab\") == 0)       return 0x09;\n            if (std::strcmp(code, \"Delete\") == 0)    return 0x2E;\n            if (std::strcmp(code, \"Home\") == 0)      return 0x24;\n            if (std::strcmp(code, \"End\") == 0)       return 0x23;\n            if (std::strcmp(code, \"PageUp\") == 0)    return 0x21;\n            if (std::strcmp(code, \"PageDown\") == 0)  return 0x22;\n            if (std::strcmp(code, \"Insert\") == 0)    return 0x2D;\n\n            if (std::strcmp(code, \"ShiftLeft\") == 0 || std::strcmp(code, \"ShiftRight\") == 0) return 0x10;\n            if (std::strcmp(code, \"ControlLeft\") == 0 || std::strcmp(code, \"ControlRight\") == 0) return 0x11;\n            if (std::strcmp(code, \"AltLeft\") == 0 || std::strcmp(code, \"AltRight\") == 0) return 0x12;\n\n            if (std::strncmp(code, \"F\", 1) == 0 && code[1] >= '0' && code[1] <= '9')\n            {\n                int n = atoi(code + 1);\n                if (n >= 1 && n <= 12) return (KeyboardKey)(0x6F + n); // F1 = 0x70\n            }\n\n            return 0;\n        }\n\n        Vec2F GetCanvasCursorPos(double x, double y)\n        {\n            return Vec2F((float)(x - gCanvasResolution.x * 0.5),\n                         (float)(gCanvasResolution.y * 0.5 - y));\n        }\n\n        EM_BOOL OnKeyDown(int, const EmscriptenKeyboardEvent* e, void*)\n        {\n            if (Application::IsSingletonInitialzed())\n                o2Input.OnKeyPressed(MapDomKeyToVK(e->code));\n            return EM_TRUE;\n        }\n\n        EM_BOOL OnKeyUp(int, const EmscriptenKeyboardEvent* e, void*)\n        {\n            if (Application::IsSingletonInitialzed())\n                o2Input.OnKeyReleased(MapDomKeyToVK(e->code));\n            return EM_TRUE;\n        }\n\n        EM_BOOL OnMouseDown(int, const EmscriptenMouseEvent* e, void*)\n        {\n            if (!Application::IsSingletonInitialzed()) return EM_TRUE;\n            Vec2F p = GetCanvasCursorPos(e->targetX, e->targetY);\n            if (e->button == 0) o2Input.OnCursorPressed(p);\n            else if (e->button == 2) o2Input.OnAltCursorPressed(p);\n            return EM_TRUE;\n        }\n\n        EM_BOOL OnMouseUp(int, const EmscriptenMouseEvent* e, void*)\n        {\n            if (!Application::IsSingletonInitialzed()) return EM_TRUE;\n            if (e->button == 0) o2Input.OnCursorReleased();\n            else if (e->button == 2) o2Input.OnAltCursorReleased();\n            return EM_TRUE;\n        }\n\n        EM_BOOL OnMouseMove(int, const EmscriptenMouseEvent* e, void*)\n        {\n            if (Application::IsSingletonInitialzed())\n                o2Input.OnCursorMoved(GetCanvasCursorPos(e->targetX, e->targetY));\n            return EM_TRUE;\n        }\n\n        EM_BOOL OnWheel(int, const EmscriptenWheelEvent* e, void*)\n        {\n            // Input API has OnCursorWheelDelta — optional; ignore for minimal MVP\n            return EM_TRUE;\n        }\n\n        EM_BOOL OnTouchEvent(int eventType, const EmscriptenTouchEvent* e, void*)\n        {\n            if (!Application::IsSingletonInitialzed()) return EM_TRUE;\n\n            for (int i = 0; i < e->numTouches; i++)\n            {\n                const auto& t = e->touches[i];\n                if (!t.isChanged) continue;\n                Vec2F p = GetCanvasCursorPos(t.targetX, t.targetY);\n                CursorId id = (CursorId)t.identifier;\n                if (eventType == EMSCRIPTEN_EVENT_TOUCHSTART)      o2Input.OnCursorPressed(p, id);\n                else if (eventType == EMSCRIPTEN_EVENT_TOUCHMOVE)  o2Input.OnCursorMoved(p, id);\n                else /* end/cancel */                              o2Input.OnCursorReleased(id);\n            }\n            return EM_TRUE;\n        }\n\n        EM_BOOL OnResize(int, const EmscriptenUiEvent*, void*)\n        {\n            double w = 0, h = 0;\n            emscripten_get_element_css_size(\"#canvas\", &w, &h);\n            Vec2I newSize((int)w, (int)h);\n            if (newSize.x <= 0) newSize.x = 1;\n            if (newSize.y <= 0) newSize.y = 1;\n\n            if (newSize != gCanvasResolution)\n            {\n                gCanvasResolution = newSize;\n                emscripten_set_canvas_element_size(\"#canvas\", newSize.x, newSize.y);\n                if (Application::IsSingletonInitialzed())\n                    o2Application.SetWindowSize(newSize);\n            }\n            return EM_TRUE;\n        }\n\n        void MainLoopTick()\n        {\n            if (Application::IsSingletonInitialzed())\n                o2Application.Update();\n        }\n    }\n\n    void Application::Initialize()\n    {\n        BasicInitialize();\n    }\n\n    void Application::InitializePlatform()\n    {\n        double w = 0, h = 0;\n        emscripten_get_element_css_size(\"#canvas\", &w, &h);\n        if (w <= 0 || h <= 0) { w = 960; h = 640; }\n        gCanvasResolution = Vec2I((int)w, (int)h);\n        emscripten_set_canvas_element_size(\"#canvas\", gCanvasResolution.x, gCanvasResolution.y);\n\n        emscripten_set_keydown_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, nullptr, EM_TRUE, OnKeyDown);\n        emscripten_set_keyup_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, nullptr, EM_TRUE, OnKeyUp);\n        emscripten_set_mousedown_callback(\"#canvas\", nullptr, EM_TRUE, OnMouseDown);\n        emscripten_set_mouseup_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, nullptr, EM_TRUE, OnMouseUp);\n        emscripten_set_mousemove_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, nullptr, EM_TRUE, OnMouseMove);\n        emscripten_set_wheel_callback(\"#canvas\", nullptr, EM_TRUE, OnWheel);\n        emscripten_set_touchstart_callback(\"#canvas\", nullptr, EM_TRUE, OnTouchEvent);\n        emscripten_set_touchend_callback(\"#canvas\", nullptr, EM_TRUE, OnTouchEvent);\n        emscripten_set_touchmove_callback(\"#canvas\", nullptr, EM_TRUE, OnTouchEvent);\n        emscripten_set_touchcancel_callback(\"#canvas\", nullptr, EM_TRUE, OnTouchEvent);\n        emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, nullptr, EM_TRUE, OnResize);\n    }\n\n    void Application::Shutdown()\n    {}\n\n    void Application::Launch()\n    {\n        mLog->Out(\"Application launched!\");\n\n        OnStarted();\n        onStarted.Invoke();\n        o2Events.OnApplicationStarted();\n\n        emscripten_set_main_loop(&MainLoopTick, 0, EM_TRUE);\n    }\n\n    void Application::Update()\n    {\n        ProcessFrame();\n    }\n\n    void Application::SetFullscreen(bool fullscreen /*= true*/) {}\n    bool Application::IsFullScreen() const { return false; }\n    void Application::Maximize() {}\n    bool Application::IsMaximized() const { return true; }\n    void Application::SetResizible(bool resizible) {}\n    bool Application::IsResizible() const { return true; }\n    void Application::CheckCursorInfiniteMode() {}\n\n    void Application::SetWindowSizePlatform(const Vec2I& size) {}\n\n    Vec2I Application::GetWindowSize() const\n    {\n        return gCanvasResolution;\n    }\n\n    void Application::SetWindowPosition(const Vec2I& position) {}\n\n    Vec2I Application::GetWindowPosition() const\n    {\n        return Vec2I();\n    }\n\n    void Application::SetWindowCaption(const String& caption)\n    {\n        EM_ASM({ document.title = UTF8ToString($0); }, caption.Data());\n    }\n\n    String Application::GetWindowCaption() const { return \"\"; }\n\n    void Application::SetContentSize(const Vec2I& size)\n    {\n        gCanvasResolution = size;\n        emscripten_set_canvas_element_size(\"#canvas\", size.x, size.y);\n    }\n\n    Vec2I Application::GetContentSize() const\n    {\n        return gCanvasResolution;\n    }\n\n    Vec2I Application::GetScreenResolution() const\n    {\n        int w = EM_ASM_INT({ return window.screen.width; });\n        int h = EM_ASM_INT({ return window.screen.height; });\n        return Vec2I(w, h);\n    }\n\n    void Application::SetCursor(CursorType type) {}\n    void Application::SetCursorPosition(const Vec2F& position) {}\n\n    String Application::GetBinPath() const { return \"/\"; }\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Windows/ApplicationBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WINDOWS\n\n#include <Windows.h>\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Application;\n\n    // -------------------------------\n    // Windows application base fields\n    // -------------------------------\n    class ApplicationBase\n    {\n    protected:\n        HWND   mHWnd;            // Window handle\n        UInt   mWndStyle;        // Window styles data\n        bool   mWindowed;        // True if app in windowed mode, false if in fullscreen mode\n        bool   mWindowResizible; // True, if window can be sized by user\n        Vec2I  mWindowedPos;     // Position of window\n        String mWndCaption;      // Window caption\n        bool   mActive;          // True, if window is active\n\n        HCURSOR mCurrentCursor;  // Current cursor type\n\n        bool mNeedPlatformInitialization = true; // True, if need to initialize platform: window and render\n\n    public:\n        // Returns window handle\n        HWND GetWindowHandle() const { return mHWnd; }\n\n        friend class Render;\n        friend class FileSystem;\n    };\n}\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Application/Windows/ApplicationImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WINDOWS\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/Debug/StackTrace.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include <Windows.h>\n\nnamespace o2\n{\n    class WndProcFunc\n    {\n    public:\n        static LRESULT WndProc(HWND wnd, UINT uMsg, WPARAM wParam, LPARAM lParam);\n    };\n\n    void Application::Initialize()\n    {\n        BasicInitialize();\n    }\n\n    void Application::InitializePlatform()\n    {\n        mWindowed = true;\n        mWindowedSize = Vec2I(800, 600);\n        mWindowedPos = Vec2I(0, 0);\n        mWindowResizible = true;\n        mActive = false;\n\n        if (mNeedPlatformInitialization)\n        {\n            mLog->Out(\"Initializing window..\");\n\n            mWndStyle = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;\n\n            WNDCLASSEX wndClass;\n            wndClass.cbSize = sizeof(WNDCLASSEX);\n            wndClass.style = mWndStyle;\n            wndClass.lpfnWndProc = (WNDPROC)WndProcFunc::WndProc;\n            wndClass.cbClsExtra = 0;\n            wndClass.cbWndExtra = 0;\n            wndClass.hInstance = NULL;\n            wndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);\n            wndClass.hCursor = LoadCursor(NULL, IDC_ARROW);\n            wndClass.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);\n            wndClass.lpszMenuName = NULL;\n            wndClass.lpszClassName = \"o2App\";\n            wndClass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);\n\n            if (!RegisterClassEx(&wndClass))\n            {\n                mLog->Error(\"Can't register class\");\n                return;\n            }\n\n            if (!(mHWnd = CreateWindowEx(NULL, wndClass.lpszClassName, \"o2 application\",\n                                         WS_OVERLAPPEDWINDOW | WS_VISIBLE,\n                                         mWindowedPos.x, mWindowedPos.y, mWindowedSize.x, mWindowedSize.y,\n                                         NULL, NULL, NULL, NULL)))\n            {\n\n                mLog->Error(\"Can't create window (CreateWindowEx)\");\n                return;\n            }\n\n            mLog->Out(\"Window initialized!\");\n        }\n    }\n\n    void Application::Shutdown()\n    {\n        DestroyWindow(mHWnd);\n    }\n\n    void Application::SetFullscreen(bool fullscreen /*= true*/)\n    {\n        if (fullscreen)\n        {\n            mLog->Out(\"Setting full screen\");\n        }\n        else\n        {\n            mLog->Out(\"Setting windowed..\");\n\n            mWindowed = true;\n\n            RECT rt = { mWindowedPos.x, mWindowedPos.y, mWindowedPos.x + mWindowedSize.x, mWindowedPos.y + mWindowedSize.y };\n            AdjustWindowRect(&rt, mWndStyle, false);\n            SetWindowPos(mHWnd, HWND_NOTOPMOST, mWindowedPos.x, mWindowedPos.y,\n                         mWindowedSize.x, mWindowedSize.y, SWP_SHOWWINDOW);\n\n            mLog->Out(\"Complete\");\n        }\n    }\n\n    void Application::CheckCursorInfiniteMode()\n    {\n        int threshold = 10;\n        POINT p, lp;\n        GetCursorPos(&p);\n        lp = p;\n\n        Vec2I resolution = GetScreenResolution();\n\n        if (p.x > resolution.x - threshold)\n            p.x = threshold;\n        else if (p.x < threshold)\n            p.x = resolution.x - threshold;\n\n        if (p.y > resolution.y - threshold)\n            p.y = threshold;\n        else if (p.y < threshold)\n            p.y = resolution.y - threshold;\n\n        SetCursorPos(p.x, p.y);\n\n        if (p.x != lp.x || p.y != lp.y)\n            mCursorCorrectionDelta = Vec2F((float)(lp.x - p.x), (float)(lp.y - p.y));\n    }\n\n    void Application::Launch()\n    {\n        ShowWindow(mHWnd, SW_SHOW);\n\n        mLog->Out(\"Application launched!\");\n\n        OnStarted();\n        onStarted.Invoke();\n        o2Events.OnApplicationStarted();\n\n        MSG msg;\n        memset(&msg, 0, sizeof(msg));\n\n        //mTimer->Reset();\n\n        while (msg.message != WM_QUIT)\n        {\n            if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))\n            {\n                TranslateMessage(&msg);\n                DispatchMessage(&msg);\n            }\n            else\n            {\n                ProcessFrame();\n            }\n        }\n\n        o2Events.OnApplicationClosing();\n        OnClosing();\n        onClosing.Invoke();\n        \n        Deinitialize();\n    }\n\n    bool Application::IsFullScreen() const\n    {\n        return !mWindowed;\n    }\n\n    void Application::Maximize()\n    {\n        ShowWindow(mHWnd, SW_MAXIMIZE);\n    }\n\n    bool Application::IsMaximized() const\n    {\n        WINDOWPLACEMENT pl;\n        GetWindowPlacement(mHWnd, &pl);\n        return pl.showCmd == SW_MAXIMIZE;\n    }\n\n    void Application::SetResizible(bool resizible)\n    {\n        if (resizible == mWindowResizible)\n            return;\n\n        mWindowResizible = resizible;\n\n        if (mWindowResizible)\n            mWndStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SIZEBOX;\n        else\n            mWndStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_MINIMIZEBOX;\n\n        mLog->Out(\"Set resizible: \" + ((mWindowResizible ? (String)\"true\" : (String)\"false\")));\n\n        SetWindowLong(mHWnd, GWL_STYLE, mWndStyle);\n    }\n\n    bool Application::IsResizible() const\n    {\n        return mWindowResizible;\n    }\n\n    void Application::SetWindowSizePlatform(const Vec2I& size)\n    {\n        mWindowedSize = size;\n        mLog->Out(\"Set sindow size: %ix%i\", mWindowedSize.x, mWindowedSize.y);\n\t\tSetFullscreen(!mWindowed);\n    }\n\n    Vec2I Application::GetWindowSize() const\n    {\n        return mWindowedSize;\n    }\n\n    void Application::SetWindowPosition(const Vec2I& position)\n    {\n        mWindowedPos = position;\n        mLog->Out(\"Set window position: %i, %i\", mWindowedPos.x, mWindowedPos.y);\n        SetFullscreen(!mWindowed);\n    }\n\n    Vec2I Application::GetWindowPosition() const\n    {\n        return mWindowedPos;\n    }\n\n    void Application::SetWindowCaption(const String& caption)\n    {\n        mWndCaption = caption;\n        SetWindowText(mHWnd, mWndCaption.Data());\n    }\n\n    String Application::GetWindowCaption() const\n    {\n        return mWndCaption;\n    }\n\n    void Application::SetContentSize(const Vec2I& size)\n    {\n        Vec2I clientRectSize = size;\n\n        RECT clientRect;\n        GetClientRect(mHWnd, &clientRect);\n        clientRect.right = clientRect.left + size.x;\n        clientRect.bottom = clientRect.top + size.y;\n\n        AdjustWindowRect(&clientRect, mWndStyle, false);\n\n        mWindowedPos = Vec2I(clientRect.left, clientRect.top);\n        mWindowedSize = Vec2I(clientRect.right - clientRect.left, clientRect.bottom - clientRect.top);\n\n        mLog->Out(\"Set Content Size: %ix%i\", size.x, size.y);\n\n        SetFullscreen(!mWindowed);\n\n        mRender->OnFrameResized();\n        onResizing();\n    }\n\n    Vec2I Application::GetContentSize() const\n    {\n        RECT clientRect;\n        GetClientRect(mHWnd, &clientRect);\n        return Vec2I(clientRect.right - clientRect.left, clientRect.bottom - clientRect.top);\n    }\n\n    Vec2I Application::GetScreenResolution() const\n    {\n        int hor = GetSystemMetrics(SM_CXSCREEN), ver = GetSystemMetrics(SM_CYSCREEN);\n        return Vec2I(hor, ver);\n    }\n\n    void Application::SetCursor(CursorType type)\n    {\n        LPSTR cursorsIds[] = { IDC_APPSTARTING, IDC_ARROW, IDC_CROSS, IDC_HAND, IDC_HELP, IDC_IBEAM, IDC_ICON, IDC_NO,\n            IDC_SIZEALL, IDC_SIZENESW, IDC_SIZENS, IDC_SIZENWSE, IDC_SIZEWE, IDC_UPARROW, IDC_WAIT };\n\n        mCurrentCursor = LoadCursor(NULL, cursorsIds[(int)type]);\n        ::SetCursor(mCurrentCursor);\n        SetClassLongPtr(mHWnd, (int)GCLP_HCURSOR, (LONG_PTR)mCurrentCursor);\n    }\n\n    void Application::SetCursorPosition(const Vec2F& position)\n    {\n        SetCursorPos((int)position.x, (int)position.y);\n    }\n\n    String Application::GetBinPath() const\n    {\n        TCHAR szFileName[MAX_PATH];\n        GetModuleFileName(NULL, szFileName, MAX_PATH);\n        return o2FileSystem.CanonicalizePath(o2FileSystem.GetParentPath((String)szFileName));\n    }\n\n\n    LRESULT WndProcFunc::WndProc(HWND wnd, UINT uMsg, WPARAM wParam, LPARAM lParam)\n    {\n        auto& app = o2Application;\n\n        POINT pt;\n        RECT rt;\n        int key = 0;\n        Vec2I size, pos;\n        GetCursorPos(&pt);\n        ScreenToClient(wnd, &pt);\n        Vec2F cursorPos = Vec2F((float)pt.x, (float)-pt.y);\n\n        if (app.mRender)\n            cursorPos -= Vec2F(Math::Round(app.mRender->mResolution.x*0.5f),\n                               Math::Round(-app.mRender->mResolution.y*0.5f));\n\n        float wheelDelta;\n\n        if (app.IsReady())\n        {\n            switch (uMsg)\n            {\n            case WM_LBUTTONDOWN:\n            case WM_TOUCH:\n            SetCapture(app.mHWnd);\n            app.mInput->OnCursorPressed(cursorPos);\n            break;\n\n            case WM_LBUTTONUP:\n            app.mInput->OnCursorReleased();\n            ReleaseCapture();\n            break;\n\n            case WM_RBUTTONDOWN:\n            SetCapture(app.mHWnd);\n            app.mInput->OnAltCursorPressed(cursorPos);\n            break;\n\n            case WM_RBUTTONUP:\n            app.mInput->OnAltCursorReleased();\n            ReleaseCapture();\n            break;\n\n            case WM_MBUTTONDOWN:\n            SetCapture(app.mHWnd);\n            app.mInput->OnAlt2CursorPressed(cursorPos);\n            break;\n\n            case WM_MBUTTONUP:\n            app.mInput->OnAlt2CursorReleased();\n            ReleaseCapture();\n            break;\n\n            case WM_KEYDOWN:\n            case WM_SYSKEYDOWN:\n            key = (int)wParam;\n            app.mInput->OnKeyPressed(key);\n            break;\n\n            case WM_KEYUP:\n            case WM_SYSKEYUP:\n            app.mInput->OnKeyReleased((int)wParam);\n            break;\n\n            case WM_MOUSEMOVE:\n            app.mInput->OnCursorMoved(cursorPos, 0);\n            app.mInput->GetCursor()->delta -= app.mCursorCorrectionDelta;\n            app.mCursorCorrectionDelta = Vec2F();\n            break;\n\n            case WM_MOUSEWHEEL:\n            wheelDelta = GET_WHEEL_DELTA_WPARAM(wParam);\n            app.mInput->OnMouseWheel(wheelDelta);\n            break;\n\n            case WM_ACTIVATEAPP:\n            case WM_ENABLE:\n            if (wParam == TRUE)\n            {\n                app.mActive = true;\n                app.OnActivated();\n                app.onActivated.Invoke();\n                o2Events.OnApplicationActivated();\n            }\n            else\n            {\n                app.mActive = false;\n                app.OnDeactivated();\n                app.onDeactivated.Invoke();\n                o2Events.OnApplicationDeactivated();\n            }\n            break;\n\n            case WM_SIZE:\n            GetWindowRect(app.mHWnd, &rt);\n            size.x = rt.right - rt.left; size.y = rt.bottom - rt.top;\n\n            if (size.x > 0 && size.y > 0 && size != app.mWindowedSize)\n                app.OnResized(size);\n\n            app.ProcessFrame();\n\n            break;\n\n            case WM_MOVE:\n            GetWindowRect(app.mHWnd, &rt);\n            pos.x = rt.left; pos.y = rt.top;\n\n            if (pos.x < 10000 && pos.y < 10000 && pos != app.mWindowedPos)\n            {\n                app.mWindowedPos = pos;\n                app.OnMoved();\n                app.onMoving.Invoke();\n            }\n            break;\n\n            case WM_DESTROY:\n            PostQuitMessage(0);\n            return 0;\n            break;\n            }\n        }\n\n        return DefWindowProc(wnd, uMsg, wParam, lParam);\n    }\n}\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Application/iOS/AppDelegate.h",
    "content": "#ifdef PLATFORM_IOS\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Application/iOS/AppDelegate.mm",
    "content": "#ifdef PLATFORM_IOS\n#import \"AppDelegate.h\"\n#import <MetalKit/MetalKit.h>\n#import \"ApplicationPlatformWrapper.h\"\n#import \"RendererView.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/iOS/MetalWrappers.h\"\n#include \"o2/Application/Application.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\n@interface AppDelegate ()\n\n@end\n\n@implementation AppDelegate\n\n@synthesize window;\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n    window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];\n    \n    o2::ApplicationPlatformWrapper::viewController = [[RenderViewController alloc] init];\n    \n    auto view = [[RenderView alloc] init];\n    o2::ApplicationPlatformWrapper::view = view;\n    o2::ApplicationPlatformWrapper::viewController.view = view;\n    \n    view.device = MTLCreateSystemDefaultDevice();\n    if(!view.device)\n    {\n        o2Debug.LogError(\"Metal is not supported on this device\");\n        return NO;\n    }\n    \n    o2::ApplicationPlatformWrapper::renderer = [[RendererViewDelegate alloc] init];\n    [o2::ApplicationPlatformWrapper::renderer mtkView:view drawableSizeWillChange:view.drawableSize];\n    view.delegate = o2::ApplicationPlatformWrapper::renderer;\n    \n    o2::ApplicationPlatformWrapper::CallInitializePlatform();\n    o2::ApplicationPlatformWrapper::LaunchApplication();\n    \n    [window setRootViewController:o2::ApplicationPlatformWrapper::viewController];\n    [window makeKeyAndVisible];\n    return YES;\n}\n\n\n- (void)applicationWillResignActive:(UIApplication *)application {\n    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.\n    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.\n}\n\n\n- (void)applicationDidEnterBackground:(UIApplication *)application {\n    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.\n}\n\n\n- (void)applicationWillEnterForeground:(UIApplication *)application {\n    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.\n}\n\n\n- (void)applicationDidBecomeActive:(UIApplication *)application {\n    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Application/iOS/ApplicationBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_IOS\n\nnamespace o2\n{\n    // -------------------------------\n    // Android application base fields\n    // -------------------------------\n    class ApplicationBase\n    {\n    };\n}\n\n#endif // PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Application/iOS/ApplicationImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_IOS\n#import <UIKit/UIKit.h>\n#import \"o2/Application/iOS/RendererView.h\"\n#import \"o2/Application/iOS/AppDelegate.h\"\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/iOS/ApplicationPlatformWrapper.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n\nnamespace o2\n{\n    RenderView* ApplicationPlatformWrapper::view;\n    RenderViewController* ApplicationPlatformWrapper::viewController;\n    RendererViewDelegate* ApplicationPlatformWrapper::renderer;\n    Vec2I ApplicationPlatformWrapper::resolution;\n\n    void ApplicationPlatformWrapper::OnWindowResized(const Vec2I& resolution)\n    {\n        ApplicationPlatformWrapper::resolution = resolution;\n\n        if (Application::IsSingletonInitialzed())\n            o2Application.OnResized(resolution);\n    }\n\n    void ApplicationPlatformWrapper::InitializePlatform()\n    {\n        o2Application.Application::InitializePlatform();\n    }\n\n    void ApplicationPlatformWrapper::LaunchApplication()\n    {\n        o2Application.Launch();\n    }\n\n    void ApplicationPlatformWrapper::CallInitializePlatform()\n    {\n        if (Application::IsSingletonInitialzed())\n            o2Application.InitializePlatform();\n    }\n\n    void ApplicationPlatformWrapper::CallUpdate()\n    {\n        if (Application::IsSingletonInitialzed())\n            o2Application.Update();\n    }\n\n    void Application::Run(int argc, char** argv)\n    {\n        // Set working directory to the app bundle's resource path so relative asset paths work\n        NSString* resourcePath = [[NSBundle mainBundle] resourcePath];\n        chdir([resourcePath UTF8String]);\n\n        InitalizeSystems();\n        UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));\n    }\n\n    void Application::InitializePlatform()\n    {\n        mGraphicsScale = [[ApplicationPlatformWrapper::view layer] contentsScale];\n\n        InitiazeRender();\n        InitilizeUIStyles();\n\n        mReady = true;\n    }\n\n    void Application::Shutdown()\n    {}\n\n    void Application::SetFullscreen(bool fullscreen /*= true*/)\n    {}\n\n    void Application::CheckCursorInfiniteMode()\n    {}\n\n    void Application::Launch()\n    {\n        mLog->Out(\"Application launched!\");\n\n        OnStarted();\n        onStarted.Invoke();\n        o2Events.OnApplicationStarted();\n    }\n\n    void Application::Update()\n    {\n        ProcessFrame();\n    }\n\n    bool Application::IsFullScreen() const\n    {\n        return false;\n    }\n\n    void Application::Maximize()\n    {}\n\n    bool Application::IsMaximized() const\n    {\n        return true;\n    }\n\n    void Application::SetResizible(bool resizible)\n    {}\n\n    bool Application::IsResizible() const\n    {\n        return false;\n    }\n\n    void Application::SetWindowSizePlatform(const Vec2I& size)\n    {}\n\n    Vec2I Application::GetWindowSize() const\n    {\n        return Vec2I();\n    }\n\n    void Application::SetWindowPosition(const Vec2I& position)\n    {}\n\n    Vec2I Application::GetWindowPosition() const\n    {\n        return Vec2I();\n    }\n\n    void Application::SetWindowCaption(const String& caption)\n    {}\n\n    String Application::GetWindowCaption() const\n    {\n        return \"\";\n    }\n\n    void Application::SetContentSize(const Vec2I& size)\n    {}\n\n    Vec2I Application::GetContentSize() const\n    {\n        return ApplicationPlatformWrapper::resolution;\n    }\n\n    Vec2I Application::GetScreenResolution() const\n    {\n        CGRect bounds = [[UIScreen mainScreen] nativeBounds];\n        return Vec2I((int)bounds.size.width, (int)bounds.size.height);\n    }\n\n    void Application::SetCursor(CursorType type)\n    {}\n\n    void Application::SetCursorPosition(const Vec2F& position)\n    {}\n\n    String Application::GetBinPath() const\n    {\n        NSString* resourcePath = [[NSBundle mainBundle] resourcePath];\n        return String([resourcePath UTF8String]) + \"/\";\n    }\n}\n\n#endif // PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Application/iOS/ApplicationPlatformWrapper.h",
    "content": "#import \"AppDelegate.h\"\n#import <MetalKit/MetalKit.h>\n#import \"RendererView.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n\n@class RendererView;\n\nnamespace o2\n{\n    struct ApplicationPlatformWrapper\n    {\n        static RenderView*           view;\n        static RenderViewController* viewController;\n        static RendererViewDelegate* renderer;\n\n        static Vec2I resolution;\n\n        static void OnWindowResized(const Vec2I& resolution);\n        static void InitializePlatform();\n        static void LaunchApplication();\n\n        static void CallInitializePlatform();\n        static void CallUpdate();\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Application/iOS/RendererView.h",
    "content": "#import <MetalKit/MetalKit.h>\n\n#ifdef PLATFORM_IOS\n\n@interface RendererViewDelegate : NSObject <MTKViewDelegate>\n@end\n\n@interface RenderViewController : UIViewController\n@end\n\n@interface RenderView : MTKView\n@end\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Application/iOS/RendererView.mm",
    "content": "#ifdef PLATFORM_IOS\n#import \"RendererView.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/iOS/MetalWrappers.h\"\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Application/iOS/ApplicationPlatformWrapper.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\n@implementation RendererViewDelegate\n\n- (void)drawInMTKView:(nonnull MTKView *)view\n{\n    o2::ApplicationPlatformWrapper::CallUpdate();\n}\n\n- (void)mtkView:(nonnull MTKView *)view drawableSizeWillChange:(CGSize)size\n{\n    float scale = view.layer.contentsScale;\n    o2::ApplicationPlatformWrapper::OnWindowResized(o2::Vec2I(size.width/scale, size.height/scale));\n}\n\n@end\n\n@implementation RenderViewController\n\n@end\n\n@implementation RenderView\n\n- (o2::Vec2F)getTouchPosition:(UITouch *)touch\n{\n    o2::Vec2F res([touch locationInView:self].x - self.bounds.size.width/2,\n                  -([touch locationInView:self].y - self.bounds.size.height/2));\n    \n    return res;\n}\n\n- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent*) __unused event\n{\n    for (int i = 0; i < [touches count]; ++i)\n    {\n        UITouch *touch = [[touches allObjects] objectAtIndex:i];\n        o2Input.OnCursorPressed([self getTouchPosition:touch], i);\n    }\n}\n\n- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent*) __unused event\n{\n    for (int i = 0; i < [touches count]; ++i)\n    {\n        UITouch *touch = [[touches allObjects] objectAtIndex:i];\n        o2Input.OnCursorMoved([self getTouchPosition:touch], i);\n    }\n}\n\n- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent*) __unused event\n{\n    for (int i = 0; i < [touches count]; ++i)\n        o2Input.OnCursorReleased(i);\n}\n\n- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent*) __unused event\n{\n    for (int i = 0; i < [touches count]; ++i)\n        o2Input.OnCursorReleased(i);\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Asset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Asset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    Asset::Asset()\n    {}\n\n    Asset::Asset(const Asset& other):\n        Asset(nullptr, other)\n    {}\n\n    Asset::Asset(const Ref<AssetMeta>& meta):\n\t\tAsset(nullptr, meta)\n    {}\n\n\tAsset::Asset(RefCounter* refCounter):\n\t\tRefCounterable(refCounter)\n\t{}\n\n\tAsset::Asset(RefCounter* refCounter, const Asset& other):\n        RefCounterable(refCounter), mInfo(other.mInfo)\n\t{\n\t\tmInfo.meta->mId.Randomize();\n\t}\n\n\tAsset::Asset(RefCounter* refCounter, const Ref<AssetMeta>& meta):\n\t\tRefCounterable(refCounter)\n\t{\n\t\tmInfo.meta = meta;\n\t\tmInfo.meta->mId.Randomize();\n\t}\n\n\tvoid Asset::PostRefConstruct()\n    {\n        if (Assets::IsSingletonInitialzed())\n            o2Assets.AddAssetCache(this);\n    }\n\n    Asset& Asset::operator=(const Asset& other)\n    {\n        if (Assets::IsSingletonInitialzed())\n            o2Assets.RemoveAssetCache(this);\n\n        mInfo = other.mInfo;\n        return *this;\n    }\n\n    Asset::~Asset()\n    {\n        if (Assets::IsSingletonInitialzed())\n            o2Assets.RemoveAssetCache(this);\n    }\n\n    const String& Asset::GetPath() const\n    {\n        return mInfo.path;\n    }\n\n    void Asset::SetPath(const String& path)\n    {\n        auto oldPath = mInfo.path;\n        auto oldUID = mInfo.meta->mId;\n\n        mInfo.path = path;\n        mInfo.meta->mId.Randomize();\n\n        o2Assets.UpdateAssetCache(this, oldPath, oldUID);\n        OnUIDChanged(oldUID);\n    }\n\n    const UID& Asset::GetUID() const\n    {\n        return mInfo.meta->ID();\n    }\n\n    UID& Asset::ID()\n    {\n        return mInfo.meta->mId;\n    }\n\n    const Ref<AssetMeta>& Asset::GetMeta() const\n    {\n        return mInfo.meta;\n    }\n\n    const AssetInfo& Asset::GetInfo() const\n    {\n        return mInfo;\n    }\n\n#if IS_EDITOR\n    void Asset::SetEditorAsset(bool isEditor)\n    {\n        mInfo.tree = !isEditor ?\n            Ref(const_cast<AssetsTree*>(&o2Assets.GetAssetsTree())) :\n            o2Assets.GetAssetsTrees().FindOrDefault([](auto x) { return x != &o2Assets.GetAssetsTree(); });\n    }\n\n    bool Asset::IsEditorAsset() const\n    {\n        return mInfo.tree != &o2Assets.GetAssetsTree();\n    }\n#endif\n\n    void Asset::Load(const String& path)\n    {\n        auto info = o2Assets.GetAssetInfo(path);\n\n        if (info.meta->mId == UID::empty)\n        {\n            GetAssetsLogStream()->Error(\"Failed to load asset by path (\" + path + \"): asset isn't exist\");\n            return;\n        }\n\n        Load(info);\n    }\n\n    void Asset::Load(const UID& id)\n    {\n        auto& info = o2Assets.GetAssetInfo(id);\n\n        if (info.meta->mId == UID::empty)\n        {\n            GetAssetsLogStream()->Error(\"Failed to load asset by UID (\" + (WString)id + \"): asset isn't exist\");\n            return;\n        }\n\n        Load(info);\n    }\n\n    void Asset::Load(const AssetInfo& info)\n    {\n        auto oldPath = mInfo.path;\n        auto oldUID = mInfo.meta->mId;\n\n        mInfo = info;\n\n        o2Assets.UpdateAssetCache(this, oldPath, oldUID);\n\n        LoadData(GetBuiltFullPath());\n    }\n\n    void Asset::Reload()\n    {\n        LoadData(GetBuiltFullPath());\n    }\n\n    void Asset::Save(const String& path)\n    {\n        SetPath(path);\n        Save();\n    }\n\n    void Asset::Save()\n    {\n        if (ID() == UID::empty)\n            ID().Randomize();\n\n        UID destPathAssetId = o2Assets.GetAssetId(mInfo.path);\n        if (destPathAssetId != UID::empty && destPathAssetId != mInfo.meta->mId)\n        {\n            GetAssetsLogStream()->Error(\"Failed to save asset (\" + mInfo.path + \" - \" + (WString)mInfo.meta->mId +\n                                        \"): another asset exist in this path\");\n            return;\n        }\n\n        DataDocument metaData;\n        metaData.Set(mInfo.meta);\n        metaData.SaveToFile(GetMetaFullPath());\n\n        SaveData(GetFullPath());\n\n        mDirty = false;\n    }\n\n    void Asset::SetDirty(bool dirty /*= true*/)\n    {\n        mDirty = dirty;\n    }\n\n    bool Asset::IsDirty() const\n    {\n        return mDirty;\n    }\n\n    Vector<String> Asset::GetFileExtensions()\n    {\n        return {};\n    }\n\n    String Asset::GetFullPath() const\n    {\n        return (mInfo.tree ? mInfo.tree.Lock()->assetsPath : String()) + mInfo.path;\n    }\n\n    String Asset::GetBuiltFullPath() const\n    {\n        return (mInfo.tree ? mInfo.tree.Lock()->builtAssetsPath : String()) + mInfo.path;\n    }\n\n    String Asset::GetMetaFullPath() const\n    {\n        return GetFullPath() + \".meta\";\n    }\n\n    const Ref<LogStream>& Asset::GetAssetsLogStream() const\n    {\n        return o2Assets.mLog;\n    }\n\n    void Asset::SetMeta(const Ref<AssetMeta>& meta)\n    {}\n\n    void Asset::LoadData(const String& path)\n    {\n        DataDocument data;\n        data.LoadFromFile(path);\n        Deserialize(data);\n    }\n\n    void Asset::SaveData(const String& path) const\n    {\n        DataDocument data;\n        Serialize(data);\n        data.SaveToFile(path);\n    }\n\n    void Asset::OnUIDChanged(const UID& oldUID)\n    {}\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Asset, o2__Asset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Asset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/AssetInfo.h\"\n#include \"o2/Assets/Meta.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Editor/Attributes/DontDeleteAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/ExpandedByDefaultAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/NoHeaderAttribute.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    class Asset;\n\n//     template<>\n//     class AssetRef<Asset>;\n}\n\n#include \"o2/Assets/AssetRef.h\"\n\n\nnamespace o2\n{\n    // -------------------------------------------------------------------------------------------------\n    // Basic asset interface. Contains copy of asset, without caching. For regular use assets references\n    // -------------------------------------------------------------------------------------------------\n    class Asset : virtual public ISerializable, public RefCounterable, virtual public ICloneableRef\n    {\n    public:\n        typedef AssetMeta MetaType;\n\n    public:\n        PROPERTIES(Asset);\n        PROPERTY(String, path, SetPath, GetPath); // Asset path property @EDITOR_IGNORE\n        GETTER(String, fullPath, GetFullPath);    // Full asset path getter (from binary path)\n        GETTER(UID, id, GetUID);                  // Asset id getter\n        GETTER(Ref<AssetMeta>, meta, GetMeta);        // Asset meta information pointer getter\n\n    public:\n        // Default constructor\n        Asset();\n        \n\t\t// Default constructor with reference counter\n\t\texplicit Asset(RefCounter* refCounter);\n\n        // Virtual destructor\n        virtual ~Asset();\n\n        // It is called after reference initialization at object construction, registers asset cache\n        void PostRefConstruct();\n\n        // Assign operator\n        Asset& operator=(const Asset& asset);\n\n        // Returns path @SCRIPTABLE\n        const String& GetPath() const;\n\n        // Sets path @SCRIPTABLE\n        void SetPath(const String& path);\n\n        // Returns full asset path (from binary path) @SCRIPTABLE\n        String GetFullPath() const;\n\n        // Returns full built asset path (from binary) @SCRIPTABLE\n        String GetBuiltFullPath() const;\n\n        // Returns id of asset\n        const UID& GetUID() const;\n\n        // Returns meta information pointer\n        const Ref<AssetMeta>& GetMeta() const;\n\n        // Returns asset info\n        const AssetInfo& GetInfo() const;\n\n        // Loads asset from path\n        void Load(const String& path);\n\n        // Loads asset by id\n        void Load(const UID& id);\n\n        // Reloads asset\n        void Reload();\n\n        // Saves asset by path\n        void Save(const String& path);\n\n        // Saves asset\n        void Save();\n\n        // Sets asset dirty\n        void SetDirty(bool dirty = true);\n\n        // Returns is asset dirty\n        bool IsDirty() const;\n\n        // Returns extensions string (something like \"ext1 ext2 ent asf\")\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor icon\n        static String GetEditorIcon() { return \"ui/UI4_big_file_icon.png\"; }\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 1; }\n\n        // Is this asset type is available to create from editor's assets window\n        static bool IsAvailableToCreateFromEditor() { return false; }\n\n        // Is asset reference available to contain instance inside\n        static bool IsReferenceCanOwnInstance() { return false; }\n\n#if IS_EDITOR\n        // Does the asset for the editor or not\n        void SetEditorAsset(bool isEditor);\n\n        // Returns is asset for editor or not\n        bool IsEditorAsset() const;\n#endif\n\n        SERIALIZABLE(Asset);\n        CLONEABLE_REF(Asset);\n\n    protected:\n        PROPERTY(Ref<AssetMeta>, mMeta, SetMeta, GetMeta); // @EDITOR_PROPERTY @DONT_DELETE @EXPANDED_BY_DEFAULT\n\n        AssetInfo mInfo; // Asset info \n\n        bool mDirty = false; // Is asset was changed\n\n    protected:\n        // Constructor with meta, use it as default constructor\n        Asset(const Ref<AssetMeta>& meta);\n\n\t\t// Constructor with meta and reference counter, use it as default constructor\n\t\tAsset(RefCounter* refCounter, const Ref<AssetMeta>& meta);\n\n        // Copy-constructor\n        Asset(const Asset& other);\n\n\t\t// Copy-constructor with reference counter\n\t\tAsset(RefCounter* refCounter, const Asset& other);\n\n        // Returns meta full path (from binary path)\n        String GetMetaFullPath() const;\n\n        // Returns reference to id in meta\n        UID& ID();\n\n        // Returns assets log stream pointer\n        const Ref<LogStream>& GetAssetsLogStream() const;\n\n        // Meta setter, used for property\n        void SetMeta(const Ref<AssetMeta>& meta);\n\n        // Loads asset from path\n        void Load(const AssetInfo& info);\n\n        // Loads asset data, using DataValue and serialization\n        virtual void LoadData(const String& path);\n\n        // Saves asset data, using DataValue and serialization\n        virtual void SaveData(const String& path) const;\n\n        // It is called when UID has changed\n        virtual void OnUIDChanged(const UID& oldUID);\n\n        template<typename _asset_type>\n        friend class AssetRef;\n\n        friend class Assets;\n        friend class AssetsBuilder;\n\n        FRIEND_REF_MAKE();\n    };\n\n    // This macro defines asset type\n#define ASSET_TYPE(THIS_TYPE, META_TYPE) \\\nSERIALIZABLE(THIS_TYPE);                 \\\nCLONEABLE_REF(THIS_TYPE);                \\\ntypedef META_TYPE MetaType;                                         \n\n    // ----------------------------\n    // Base asset with default meta\n    // ----------------------------\n    template<typename T>\n    class AssetWithDefaultMeta: public Asset\n    {\n    public:\n        typedef DefaultAssetMeta<T> Meta;\n        typedef Meta MetaType;\n\n    public:\n        PROPERTIES(AssetWithDefaultMeta<T>);\n        GETTER(Ref<Meta>, meta, GetMeta);  // Meta information getter\n\n    public:\n\t\t// Default constructor, creates asset with default meta type\n        AssetWithDefaultMeta(): Asset(mmake<Meta>()) {}\n\n\t\t// Default constructor with reference counter, creates asset with default meta type\n\t\texplicit AssetWithDefaultMeta(RefCounter* refCounter) : Asset(refCounter, mmake<Meta>()) {}\n\n\t\t// Copy constructor, creates asset with default meta type\n        AssetWithDefaultMeta(const AssetWithDefaultMeta<T>& other) : Asset(other) {}\n\n\t\t// Copy constructor with reference counter, creates asset with default meta type\n\t\tAssetWithDefaultMeta(RefCounter* refCounter, const AssetWithDefaultMeta<T>& other) : Asset(refCounter, other) {}\n\n\t\t// Returns meta information pointer\n        Ref<Meta> GetMeta() const { return DynamicCast<Meta>(mInfo.meta); }\n\n        SERIALIZABLE(AssetWithDefaultMeta<T>);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Asset)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Asset)\n{\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(path);\n    FIELD().PUBLIC().NAME(fullPath);\n    FIELD().PUBLIC().NAME(id);\n    FIELD().PUBLIC().NAME(meta);\n    FIELD().PUBLIC().DONT_DELETE_ATTRIBUTE().EDITOR_PROPERTY_ATTRIBUTE().EXPANDED_BY_DEFAULT_ATTRIBUTE().NAME(mMeta);\n    FIELD().PROTECTED().NAME(mInfo);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mDirty);\n}\nEND_META;\nCLASS_METHODS_META(o2::Asset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, PostRefConstruct);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const String&, GetPath);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetPath, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(String, GetFullPath);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(String, GetBuiltFullPath);\n    FUNCTION().PUBLIC().SIGNATURE(const UID&, GetUID);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AssetMeta>&, GetMeta);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetInfo&, GetInfo);\n    FUNCTION().PUBLIC().SIGNATURE(void, Load, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Load, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Reload);\n    FUNCTION().PUBLIC().SIGNATURE(void, Save, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Save);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDirty, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsDirty);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsReferenceCanOwnInstance);\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEditorAsset, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEditorAsset);\n#endif\n    FUNCTION().PROTECTED().CONSTRUCTOR(const Ref<AssetMeta>&);\n    FUNCTION().PROTECTED().CONSTRUCTOR(RefCounter*, const Ref<AssetMeta>&);\n    FUNCTION().PROTECTED().CONSTRUCTOR(const Asset&);\n    FUNCTION().PROTECTED().CONSTRUCTOR(RefCounter*, const Asset&);\n    FUNCTION().PROTECTED().SIGNATURE(String, GetMetaFullPath);\n    FUNCTION().PROTECTED().SIGNATURE(UID&, ID);\n    FUNCTION().PROTECTED().SIGNATURE(const Ref<LogStream>&, GetAssetsLogStream);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetMeta, const Ref<AssetMeta>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, Load, const AssetInfo&);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUIDChanged, const UID&);\n}\nEND_META;\n\nMETA_TEMPLATES(typename T)\nCLASS_BASES_META(o2::AssetWithDefaultMeta<T>)\n{\n    BASE_CLASS(o2::Asset);\n}\nEND_META;\nMETA_TEMPLATES(typename T)\nCLASS_FIELDS_META(o2::AssetWithDefaultMeta<T>)\n{\n    FIELD().PUBLIC().NAME(meta);\n}\nEND_META;\nMETA_TEMPLATES(typename T)\nCLASS_METHODS_META(o2::AssetWithDefaultMeta<T>)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AssetWithDefaultMeta<T>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AssetWithDefaultMeta<T>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Meta>, GetMeta);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/AssetInfo.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AssetInfo.h\"\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetsTree.h\"\n#include \"o2/Assets/Assets.h\"\n\nnamespace o2\n{\n    FORWARD_REF_IMPL(AssetsTree);\n\n    AssetInfo::AssetInfo()\n    {\n        if (Assets::IsSingletonInitialzed())\n            tree = Ref(const_cast<AssetsTree*>(&o2Assets.GetAssetsTree()));\n    }\n\n    AssetInfo::AssetInfo(const AssetInfo& other):\n        path(other.path), editTime(other.editTime), tree(other.tree), meta(other.meta),\n        mChildren(other.mChildren)\n    {}\n\n    AssetInfo::AssetInfo(const Ref<AssetMeta>& meta):\n        meta(meta)\n    {\n        if (Assets::IsSingletonInitialzed())\n            tree = Ref(const_cast<AssetsTree*>(&o2Assets.GetAssetsTree()));\n    }\n\n    AssetInfo::~AssetInfo()\n    {\n    }\n\n    AssetInfo& AssetInfo::operator=(const AssetInfo& other)\n    {\n        meta = other.meta;\n        path = other.path;\n        editTime = other.editTime;\n        tree = other.tree;\n        mChildren = other.mChildren;\n\n        return *this;\n    }\n\n    AssetInfo::operator bool() const\n    {\n        return IsValid();\n    }\n\n    Ref<AssetInfo> AssetInfo::AddChild(const Ref<AssetInfo>& node)\n    {\n        if (node->parent)\n            node->parent.Lock()->RemoveChild(node);\n\n        node->parent = WeakRef(this);\n\n        mChildren.Add(node);\n\n        return node;\n    }\n\n    void AssetInfo::RemoveChild(const Ref<AssetInfo>& node)\n    {\n        node->parent = nullptr;\n\n        mChildren.Remove(node);\n    }\n\n    void AssetInfo::RemoveAllChildren()\n    {\n        mChildren.Clear();\n    }\n\n    void AssetInfo::SetParent(const Ref<AssetInfo>& parent)\n    {\n        if (parent)\n            parent->AddChild(Ref(this));\n    }\n\n    void AssetInfo::OnDeserialized(const DataValue& node)\n    {\n        auto thisRef = Ref(this);\n        for (auto& child : mChildren)\n            child->parent = thisRef;\n    }\n\n    void AssetInfo::SetTree(const Ref<AssetsTree>& tree)\n    {\n        this->tree = tree;\n        tree->allAssets.Add(WeakRef(this));\n        tree->allAssetsByPath[path] = WeakRef(this);\n\n        if (meta)\n            tree->allAssetsByUID[meta->ID()] = WeakRef(this);\n\n        for (auto& child : mChildren)\n            child->SetTree(tree);\n    }\n\n    const Vector<Ref<AssetInfo>>& AssetInfo::GetChildren() const\n    {\n        return mChildren;\n    }\n\n    bool AssetInfo::IsValid() const\n    {\n        return meta && meta->ID() != UID::empty;\n    }\n\n    AssetInfo AssetInfo::empty = AssetInfo(mmake<AssetMeta>());\n\n    bool AssetInfo::operator==(const AssetInfo& other) const\n    {\n        if (meta && other.meta)\n            return meta->ID() == other.meta->ID();\n\n        return path == other.path;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AssetInfo, o2__AssetInfo);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/AssetInfo.h",
    "content": "#pragma once\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/System/Time/TimeStamp.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(AssetsTree);\n    FORWARD_CLASS_REF(AssetMeta);\n\n    // -----------------\n    // Asset information\n    // -----------------\n    struct AssetInfo : public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        static AssetInfo empty; // Empty asset info\n\n    public:\n        WeakRef<AssetsTree> tree; // Owner asset tree\n        \n        String    path;     // Path of asset @SERIALIZABLE\n        TimeStamp editTime; // Asset edited time @SERIALIZABLE        \n\n        Ref<AssetMeta> meta; // Asset meta data @SERIALIZABLE\n\n        WeakRef<AssetInfo> parent; // Parent asset info\n\n    public:\n        // Default constructor\n        AssetInfo();\n\n        // Default constructor with meta\n        AssetInfo(const Ref<AssetMeta>& meta);\n\n        // Copy-constructor\n        AssetInfo(const AssetInfo& other);\n\n        // Destructor\n        ~AssetInfo();\n\n        // Copy-operator\n        AssetInfo& operator=(const AssetInfo& other);\n\n        // Check equal operator\n        bool operator==(const AssetInfo& other) const;\n\n        // Returns is asset info valid - checks id for empty\n        explicit operator bool() const;\n\n        // Adds new child node and returns him\n        Ref<AssetInfo> AddChild(const Ref<AssetInfo>& node);\n\n        // Remove child node and releases him if needs\n        void RemoveChild(const Ref<AssetInfo>& node);\n\n        // Removes all children\n        void RemoveAllChildren();\n\n        // Sets parent node\n        void SetParent(const Ref<AssetInfo>& parent);\n\n        // Sets asset tree, adds in tree's allAssets map\n        void SetTree(const Ref<AssetsTree>& tree);\n\n        // Returns children list. if it doesn't own children, then looks for the same in the tree and returns its children\n        const Vector<Ref<AssetInfo>>& GetChildren() const;\n\n        // Returns is asset valid - checks id for empty\n        bool IsValid() const;\n\n        SERIALIZABLE(AssetInfo);\n        CLONEABLE_REF(AssetInfo);\n\n    protected:\n        Vector<Ref<AssetInfo>> mChildren; // Children assets infos @SERIALIZABLE\n\n    protected:\n        // Completion deserialization callback, reads asset type name\n        void OnDeserialized(const DataValue& node) override;\n\n        friend class Asset;\n        friend class Assets;\n        friend class AssetsBuilder;\n        friend class AssetsTree;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AssetInfo)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AssetInfo)\n{\n    FIELD().PUBLIC().NAME(tree);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(path);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(editTime);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(meta);\n    FIELD().PUBLIC().NAME(parent);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mChildren);\n}\nEND_META;\nCLASS_METHODS_META(o2::AssetInfo)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<AssetMeta>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AssetInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AssetInfo>, AddChild, const Ref<AssetInfo>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveChild, const Ref<AssetInfo>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllChildren);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParent, const Ref<AssetInfo>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTree, const Ref<AssetsTree>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<AssetInfo>>&, GetChildren);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValid);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/AssetRef.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AssetRef.h\"\n\n#include \"o2/Assets/Assets.h\"\n\nnamespace o2\n{\n    const Type& BaseAssetRef::GetAssetType() const\n    {\n        return TypeOf(Asset);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::Asset>);\n// --- META ---\n\nDECLARE_CLASS(o2::BaseAssetRef, o2__BaseAssetRef);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/AssetRef.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/StringDef.h\"\n\nnamespace o2\n{\n    class Asset;\n\n    // -----------------------------------------------------------------------\n    // Basic asset reference interface. All Ref<AssetType> are derived from it\n    // -----------------------------------------------------------------------\n    class BaseAssetRef : public ISerializable\n    {\n    public:\n        // Returns asset type\n        virtual const Type& GetAssetType() const;\n\n        // Returns asset raw pointer\n        virtual const Asset* GetAssetBase() const { return nullptr; }\n\n        // Returns asset raw pointer\n        virtual Asset* GetAssetBase() { return nullptr; }\n\n        // Sets asset\n        virtual void SetAssetBase(Asset* asset) {}\n\n        // Sets asset instance\n        virtual void SetInstance(Asset* asset) {}\n\n        // Creates own asset instance. If asset is empty creates empty instance, copies asset if else\n        virtual void CreateInstance() {}\n\n        // Removes own asset instance\n        virtual void RemoveInstance() {}\n\n        // Saves asset instance\n        virtual void SaveInstance(const String& path) {}\n\n        // Is asset instance owner\n        virtual bool IsInstance() const { return false; }\n\n        SERIALIZABLE(BaseAssetRef);\n    };\n\n    // -----------------------------------------------------------------------------------\n    // Asset reference. Contains asset pointer. Can contain asset instance owned by itself\n    // -----------------------------------------------------------------------------------\n    template<typename _asset_type>\n    class AssetRef: public BaseAssetRef\n    {\n    public:\n        // Default constructor, no reference\n        AssetRef();\n\n        // Nullptr constructor\n        AssetRef(std::nullptr_t);\n\n        // Constructor from asset path\n        explicit AssetRef(const String& path);\n\n        // Constructor from asset id\n        explicit AssetRef(const UID& id);\n\n        // Constructor with asset pointer\n        explicit AssetRef(_asset_type* ptr);\n\n        // Copy constructor from other base reference\n        AssetRef(const BaseAssetRef& other);\n\n        // Copy constructor from other reference\n        AssetRef(const Ref<_asset_type>& other);\n\n        // Move constructor from other reference\n        AssetRef(Ref<_asset_type>&& other);\n\n        // Copy constructor from other asset reference\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _asset_type*>::value>::type>\n        AssetRef(const AssetRef<_other_type>& other);\n\n        // Move constructor from other asset reference\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _asset_type*>::value>::type>\n        AssetRef(AssetRef<_other_type>&& other);\n\n        // Equality operator\n        bool operator==(const AssetRef<_asset_type>& other) const;\n\n        // Equality operator\n        bool operator==(const _asset_type* other) const;\n\n        // Inequality operator\n        bool operator!=(const AssetRef<_asset_type>& other) const;\n\n        // Inequality operator\n        bool operator!=(const _asset_type* other) const;\n\n        // Copy operator from other asset reference\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _asset_type*>::value>::type>\n        AssetRef<_asset_type>& operator=(const AssetRef<_other_type>& other);\n\n\t\t// Copy operator from other asset reference\n\t\ttemplate<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _asset_type*>::value>::type>\n\t\tAssetRef<_asset_type>& operator=(const Ref<_other_type>& other);\n\n        // Move operator from nullptr\n        AssetRef<_asset_type>& operator=(std::nullptr_t);\n\n        // Less operator\n        bool operator<(const AssetRef<_asset_type>& other) const;\n\n        // Returns is reference is valid\n        bool IsValid() const;\n\n        // Returns is reference is valid\n        explicit operator bool() const;\n\n        // Returns asset reference\n        operator Ref<_asset_type>() const;\n\n        // Returns asset reference\n        _asset_type& operator*() const;\n\n        // Returns asset pointer\n        _asset_type* operator->() const;\n\n        // Returns asset pointer \n        _asset_type* Get();\n\n        // Returns asset pointer\n        const _asset_type* Get() const;\n\n        // Returns reference\n        Ref<_asset_type>& GetRef();\n\n        // Returns reference\n        const Ref<_asset_type>& GetRef() const;\n\n        // Returns asset type\n        const Type& GetAssetType() const override;\n\n        // Returns asset type\n        static const Type* GetAssetTypeStatic();\n\n        // Returns asset raw pointer\n        const Asset* GetAssetBase() const override;\n\n        // Returns asset raw pointer\n        Asset* GetAssetBase() override;\n\n        // Sets asset\n        void SetAssetBase(Asset* asset) override;\n\n        // Sets asset instance\n        void SetInstance(Asset* asset) override;\n\n        // Creates own asset instance. If asset is empty creates empty instance, copies asset if else\n        void CreateInstance() override;\n\n        // Removes own asset instance\n        void RemoveInstance() override;\n\n        // Saves asset instance\n        void SaveInstance(const String& path) override;\n\n        // Is asset instance owner\n        bool IsInstance() const override;\n\n        // Creates asset and returns reference\n        template<typename ... _args>\n        static AssetRef<_asset_type> CreateAsset(_args ... args);\n\n    protected:\n        bool             mIsInstance = false; // Is this reference owner of asset\n        Ref<_asset_type> mPtr;                // Asset reference\n\n    protected:\n        // Beginning serialization callback - writes path and id\n        void OnSerialize(DataValue& node) const override;\n\n        // Completion deserialization callback -  reads path and id and searches asset\n        void OnDeserialized(const DataValue& node) override;\n\n        // Beginning serialization delta callback\n        void OnSerializeDelta(DataValue& node, const IObject& origin) const override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n        // It is required to process asset reference as single object when searching deltas for prototypes\n        static bool IsDeltaAsSingleObject();\n\n    public:\n        using _this_type = AssetRef<_asset_type>;\n\n        SERIALIZABLE_MAIN(_this_type);\n        IOBJECT_SCRIPTING();\n\n        template<typename _type_processor>\n        static void ProcessBaseTypes(_this_type* object, _type_processor& processor)\n        {\n            typedef _this_type thisclass;\n            processor.template StartBases<_this_type>(object, type);\n\n            BASE_CLASS(BaseAssetRef);\n        }\n\n        template<typename _type_processor>\n        static void ProcessFields(_this_type* object, _type_processor& processor)\n        {\n            typedef _this_type thisclass;\n            processor.template StartFields<_this_type>(object, type);\n        }\n\n        template<typename _type_processor>\n        static void ProcessMethods(_this_type* object, _type_processor& processor)\n        {\n            typedef _this_type thisclass;\n            processor.template StartMethods<_this_type>(object, type);\n\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(const String&);\n\n            FUNCTION().PUBLIC().CONSTRUCTOR();\n            FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<_asset_type>&);\n            FUNCTION().PUBLIC().CONSTRUCTOR(_asset_type*);\n            FUNCTION().PUBLIC().CONSTRUCTOR(const UID&);\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsValid);\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(_asset_type*, Get);\n            FUNCTION().PUBLIC().SIGNATURE(const Type&, GetAssetType);\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetInstance, Asset*);\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, CreateInstance);\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveInstance);\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SaveInstance, const String&);\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsInstance);\n\n            FUNCTION().PUBLIC().SIGNATURE_STATIC(AssetRef<_asset_type>, CreateAsset);\n            FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetAssetTypeStatic);\n        }\n\n        template<typename _other_type>\n        friend class AssetRef;\n    };\n}\n\n#include \"o2/Assets/Assets.h\"\n\nnamespace o2\n{\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::AssetRef()\n    {}\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::AssetRef(std::nullptr_t) :\n        mPtr(nullptr)\n    {}\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::AssetRef(const String& path):\n        mPtr(o2Assets.GetAssetRefByType<_asset_type>(path))\n    {}\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::AssetRef(const UID& id):\n        mPtr(o2Assets.GetAssetRefByType<_asset_type>(id))\n    {}\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::AssetRef(_asset_type* ptr) :\n        mPtr(ptr)\n    {}\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::AssetRef(const BaseAssetRef& other)\n    {\n        mPtr = Ref(dynamic_cast<_asset_type*>(const_cast<Asset*>(other.GetAssetBase())));\n        mIsInstance = other.IsInstance();\n    }\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::AssetRef(const Ref<_asset_type>& other) :\n        mPtr(other)\n    {}\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::AssetRef(Ref<_asset_type>&& other) :\n        mPtr(std::move(other))\n    {}\n\n    template<typename _asset_type>\n    template<typename _other_type, typename _enable>\n    AssetRef<_asset_type>::AssetRef(const AssetRef<_other_type>& other) :\n        mPtr(other.mPtr), mIsInstance(other.mIsInstance)\n    {}\n\n    template<typename _asset_type>\n    template<typename _other_type, typename>\n    AssetRef<_asset_type>::AssetRef(AssetRef<_other_type>&& other) :\n        mPtr(std::move(other.mPtr)), mIsInstance(other.mIsInstance)\n    {}\n\n    template<typename _asset_type>\n    bool AssetRef<_asset_type>::operator==(const AssetRef<_asset_type>& other) const\n    {\n        return mPtr == other.mPtr && mIsInstance == other.mIsInstance;\n    }\n\n    template<typename _asset_type>\n    bool AssetRef<_asset_type>::operator==(const _asset_type* other) const\n    {\n        return mPtr == other;\n    }\n\n    template<typename _asset_type>\n    bool AssetRef<_asset_type>::operator!=(const AssetRef<_asset_type>& other) const\n    {\n        return mPtr != other.mPtr || mIsInstance != other.mIsInstance;\n    }\n\n    template<typename _asset_type>\n    bool AssetRef<_asset_type>::operator!=(const _asset_type* other) const\n    {\n        return mPtr != other;\n    }\n\n    template<typename _asset_type>\n    template<typename _other_type, typename _enable>\n    AssetRef<_asset_type>& AssetRef<_asset_type>::operator=(const AssetRef<_other_type>& other)\n    {\n        mPtr = other.mPtr;\n        mIsInstance = other.mIsInstance;\n        return *this;\n    }\n\n\ttemplate<typename _asset_type>\n\ttemplate<typename _other_type, typename _enable>\n\tAssetRef<_asset_type>& AssetRef<_asset_type>::operator=(const Ref<_other_type>& other)\n\t{\n\t\tmPtr = other;\n\t\tmIsInstance = false;\n\t\treturn *this;\n\t}\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>& AssetRef<_asset_type>::operator=(std::nullptr_t)\n    {\n        mPtr = nullptr;\n        return *this;\n    }\n\n    template<typename _asset_type>\n    bool AssetRef<_asset_type>::operator<(const AssetRef<_asset_type>& other) const\n    {\n        return mPtr < other.mPtr;\n    }\n\n    template<typename _asset_type>\n    bool AssetRef<_asset_type>::IsValid() const\n    {\n        return mPtr.IsValid();\n    }\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::operator bool() const\n    {\n        return IsValid();\n    }\n\n    template<typename _asset_type>\n    AssetRef<_asset_type>::operator Ref<_asset_type>() const\n    {\n        return mPtr;\n    }\n\n    template<typename _asset_type>\n    _asset_type& AssetRef<_asset_type>::operator*() const\n    {\n        return *mPtr;\n    }\n\n    template<typename _asset_type>\n    _asset_type* AssetRef<_asset_type>::operator->() const\n    {\n        return mPtr.Get();\n    }\n\n    template<typename _asset_type>\n    _asset_type* AssetRef<_asset_type>::Get()\n    {\n        return mPtr.Get();\n    }\n\n    template<typename _asset_type>\n    const _asset_type* AssetRef<_asset_type>::Get() const\n    {\n        return mPtr.Get();\n    }\n\n    template<typename _asset_type>\n    Ref<_asset_type>& AssetRef<_asset_type>::GetRef()\n    {\n        return mPtr;\n    }\n\n    template<typename _asset_type>\n    const Ref<_asset_type>& AssetRef<_asset_type>::GetRef() const\n    {\n        return mPtr;\n    }\n\n    template<typename _asset_type>\n    const Type& AssetRef<_asset_type>::GetAssetType() const\n    {\n        return TypeOf(_asset_type);\n    }\n\n    template<typename _asset_type>\n    const Type* AssetRef<_asset_type>::GetAssetTypeStatic()\n    {\n        return &TypeOf(_asset_type);\n    }\n\n    template<typename _asset_type>\n    const Asset* AssetRef<_asset_type>::GetAssetBase() const\n    {\n        return Get();\n    }\n\n    template<typename _asset_type>\n    Asset* AssetRef<_asset_type>::GetAssetBase()\n    {\n        return Get();\n    }\n\n    template<typename _asset_type>\n    void AssetRef<_asset_type>::SetAssetBase(Asset* asset)\n    {\n        mPtr = Ref(dynamic_cast<_asset_type*>(asset));\n        mIsInstance = false;\n    }\n\n    template<typename _asset_type>\n    void AssetRef<_asset_type>::SetInstance(Asset* asset)\n    {\n        mPtr = Ref(dynamic_cast<_asset_type*>(asset));\n        mIsInstance = true;\n    }\n\n    template<typename _asset_type>\n    void AssetRef<_asset_type>::CreateInstance()\n    {\n        Ref<_asset_type> asset;\n        if (mPtr)\n        {\n            asset = DynamicCast<_asset_type>(mPtr->template CloneAsRef<Asset>());\n        }\n        else\n        {\n            auto objectType = dynamic_cast<const ObjectType*>(&GetAssetType());\n            asset = DynamicCast<_asset_type>(objectType->CreateSampleRef());\n        }\n\n        SetInstance(asset.Get());\n    }\n\n    template<typename _asset_type>\n    void AssetRef<_asset_type>::RemoveInstance()\n    {\n        if (!mIsInstance)\n            return;\n\n        mIsInstance = false;\n        mPtr = nullptr;\n    }\n\n    template<typename _asset_type>\n    void AssetRef<_asset_type>::SaveInstance(const String& path)\n    {\n        mPtr->SetPath(path);\n        mPtr->Save();\n\n\t\tmIsInstance = false;\n    }\n\n    template<typename _asset_type>\n    bool AssetRef<_asset_type>::IsInstance() const\n    {\n        return mIsInstance;\n    }\n\n    template<typename _asset_type>\n    template<typename ... _args>\n    AssetRef<_asset_type> AssetRef<_asset_type>::CreateAsset(_args ... args)\n    {\n        return DynamicCast<_asset_type>(o2Assets.CreateAsset<_asset_type>(args ...).GetRef());\n    }\n\n    template<typename _asset_type>\n    void AssetRef<_asset_type>::OnSerialize(DataValue& node) const\n    {\n        if (mPtr)\n        {\n            if (mIsInstance)\n            {\n                mPtr->ID().Randomize(); // Randomize ID to avoid conflicts after loading same asset multiple times\n\n                node[\"instance\"] = mPtr;\n                node[\"meta\"] = mPtr->GetMeta();\n            }\n            else\n            {\n                node[\"id\"] = mPtr->GetUID().ToString();\n                node[\"path\"] = mPtr->GetPath();\n            }\n        }\n    }\n\n    template<typename _asset_type>\n    void AssetRef<_asset_type>::OnDeserialized(const DataValue& node)\n    {\n        mPtr = nullptr;\n        mIsInstance = false;\n\n        if (auto instanceNode = node.FindMember(\"instance\"))\n        {\n            mIsInstance = true;\n            instanceNode->Get(mPtr);\n\n            UID oldUid = mPtr->GetUID();\n            node.GetMember(\"meta\").Get(mPtr->mInfo.meta);\n            o2Assets.UpdateAssetCache(mPtr.Get(), \"\", oldUid);\n        }\n        else if (auto idNode = node.FindMember(\"id\"))\n        {\n            mPtr = o2Assets.GetAssetRefByType<_asset_type>((UID)(*idNode));\n        }\n        else if (auto pathNode = node.FindMember(\"path\"))\n        {\n            mPtr = o2Assets.GetAssetRefByType<_asset_type>((String)pathNode);\n        }\n    }\n\n    template<typename _asset_type>\n    void AssetRef<_asset_type>::OnSerializeDelta(DataValue& node, const IObject& origin) const\n    {\n        OnSerialize(node);\n    }\n\n    template<typename _asset_type>\n    void AssetRef<_asset_type>::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        OnDeserialized(node);\n    }\n\n    template<typename _asset_type>\n    bool AssetRef<_asset_type>::IsDeltaAsSingleObject()\n    {\n        return true;\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(o2::BaseAssetRef)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::BaseAssetRef)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::BaseAssetRef)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(const Type&, GetAssetType);\n    FUNCTION().PUBLIC().SIGNATURE(const Asset*, GetAssetBase);\n    FUNCTION().PUBLIC().SIGNATURE(Asset*, GetAssetBase);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAssetBase, Asset*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInstance, Asset*);\n    FUNCTION().PUBLIC().SIGNATURE(void, CreateInstance);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveInstance);\n    FUNCTION().PUBLIC().SIGNATURE(void, SaveInstance, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInstance);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Assets.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Assets.h\"\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/Types/BinaryAsset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Config/ProjectConfig.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/EngineSettings.h\"\n\nnamespace o2\n{\n    DECLARE_SINGLETON(Assets);\n\n    Assets::Assets(RefCounter* refCounter):\n        Singleton<Assets>(refCounter)\n    {\n        mReady = true;\n        \n        mLog = mmake<LogStream>(\"Assets\");\n        o2Debug.GetLog()->BindStream(mLog);\n\n        LoadAssetsTree();\n\n        mSpineManager = mmake<SpineManager>();\n    }\n\n    Assets::~Assets()\n    {\n        mReady = false;\n        \n        mCachedAssets.Clear();\n        mCachedAssetsByPath.Clear();\n        mCachedAssetsByUID.Clear();\n        mAssetsTrees.Clear();\n        mMainAssetsTree = nullptr;\n\n        SpineManager::DestroySingleton(mSpineManager);\n    }\n\n    String Assets::GetAssetsPath() const\n    {\n        return ::GetAssetsPath();\n    }\n\n    String Assets::GetBuiltAssetsPath() const\n    {\n        return ::GetBuiltAssetsPath();\n    }\n\n    const String& Assets::GetAssetPath(const UID& id) const\n    {\n        if (auto cached = FindAssetCache(id))\n            return cached->GetPath();\n\n        return GetAssetInfo(id).path;\n    }\n\n    const UID& Assets::GetAssetId(const String& path) const\n    {\n        if (auto cached = FindAssetCache(path))\n            return cached->GetUID();\n\n        auto& info = GetAssetInfo(path);\n        return info.meta ? info.meta->ID() : UID::empty;\n    }\n\n    const AssetInfo& Assets::GetAssetInfo(const UID& id) const\n    {\n        for (auto& tree : mAssetsTrees)\n        {\n            if (auto res = tree->Find(id))\n                return *res;\n        }\n\n        return AssetInfo::empty;\n    }\n\n    const AssetInfo& Assets::GetAssetInfo(const String& path) const\n    {\n        for (auto& tree : mAssetsTrees)\n        {\n            if (auto res = tree->Find(path))\n                return *res;\n        }\n\n        return AssetInfo::empty;\n    }\n\n    const Map<String, const Type*> Assets::GetAssetsExtensionsTypes()\n    {\n        static Map<String, const Type*> assetTypes;\n        if (assetTypes.IsEmpty())\n        {\n            auto derivedAssetTypes = TypeOf(Asset).GetDerivedTypes();\n\n            for (auto& type : derivedAssetTypes)\n            {\n                Vector<String> extensions = type->InvokeStatic<Vector<String>>(\"GetFileExtensions\");\n\n                for (const auto& ext : extensions)\n                {\n                    if (assetTypes.ContainsKey(ext))\n                    {\n                        o2Debug.LogWarning(\"Assets extensions duplicating: \" + ext + \", at \" + assetTypes[ext]->GetName() +\n                                           \" and \" + type->GetName());\n                        continue;\n                    }\n\n                    assetTypes.Add(ext, type);\n                }\n            }\n        }\n\n        return assetTypes;\n    }\n\n    const Type* Assets::GetStdAssetType()\n    {\n        return &TypeOf(BinaryAsset);\n    }\n\n    const Type* Assets::GetAssetTypeByExtension(const String& extension)\n    {\n        if (GetAssetsExtensionsTypes().ContainsKey(extension))\n            return GetAssetsExtensionsTypes().Get(extension);\n\n        return GetStdAssetType();\n    }\n\n    AssetRef<Asset> Assets::GetAssetRef(const String& path)\n    {\n        auto cached = FindAssetCache(path);\n\n        if (!cached)\n        {\n            auto& assetInfo = GetAssetInfo(path);\n            if (!assetInfo.IsValid())\n                return AssetRef<Asset>();\n\n            auto type = assetInfo.meta->GetAssetType();\n            auto asset = DynamicCast<Asset>(type->CreateSampleRef());\n            asset->Load(assetInfo);\n\n            cached = FindAssetCache(asset->GetUID());\n        }\n\n        return cached;\n    }\n\n    AssetRef<Asset> Assets::GetAssetRef(const UID& id)\n    {\n        auto cached = FindAssetCache(id);\n\n        if (!cached)\n        {\n            auto& assetInfo = GetAssetInfo(id);\n            if (!assetInfo.IsValid())\n            {\n                o2Debug.LogError(\"Can't load asset by id - \" + (String)id);\n                return AssetRef<Asset>();\n            }\n\n            auto asset = DynamicCast<Asset>(assetInfo.meta->GetAssetType()->CreateSampleRef());\n            asset->Load(assetInfo);\n\n            cached = FindAssetCache(id);\n        }\n\n        return cached;\n    }\n\n    bool Assets::IsAssetExist(const String& path) const\n    {\n        return GetAssetInfo(path).meta->ID() != UID::empty;\n    }\n\n    bool Assets::IsAssetExist(const UID& id) const\n    {\n        return GetAssetInfo(id).meta->ID() != UID::empty;\n    }\n\n    bool Assets::RemoveAsset(const AssetRef<Asset>& asset)\n    {\n        return RemoveAsset(asset->GetUID());\n    }\n\n    bool Assets::RemoveAsset(const String& path)\n    {\n        return RemoveAsset(GetAssetInfo(path));\n    }\n\n    bool Assets::RemoveAsset(const UID& id)\n    {\n        return RemoveAsset(GetAssetInfo(id));\n    }\n\n    bool Assets::RemoveAsset(const AssetInfo& info)\n    {\n        if (info.meta == nullptr)\n        {\n            mLog->Error(\"Can't remove asset '\" + info.path + \"' - asset isn't exist\");\n            return false;\n        }\n\n        o2FileSystem.FileDelete(GetAssetsPath() + info.path + \".meta\");\n\n        if (info.meta->GetAssetType() == &TypeOf(FolderAsset))\n            o2FileSystem.FolderRemove(GetAssetsPath() + info.path);\n        else\n            o2FileSystem.FileDelete(GetAssetsPath() + info.path);\n\n        return true;\n    }\n\n    bool Assets::CopyAsset(const AssetRef<Asset>& asset, const String& dest)\n    {\n        return CopyAsset(asset->GetUID(), dest);\n    }\n\n    bool Assets::CopyAsset(const String& path, const String& dest)\n    {\n        return CopyAsset(GetAssetInfo(path), dest);\n    }\n\n    bool Assets::CopyAsset(const UID& id, const String& dest)\n    {\n        return CopyAsset(GetAssetInfo(id), dest);\n    }\n\n    bool Assets::CopyAsset(const AssetInfo& info, const String& dest)\n    {\n        if (info.meta == nullptr)\n        {\n            mLog->Error(\"Can't copy asset '\" + info.path + \"' - asset isn't exist\");\n            return false;\n        }\n\n        if (IsAssetExist(dest) != 0)\n        {\n            mLog->Error(\"Can't copy asset '\" + info.path + \"' to new path '\" + dest + \"' - another asset exist in target path\");\n            return false;\n        }\n\n        if (info.meta->GetAssetType() == &TypeOf(FolderAsset))\n        {\n            o2FileSystem.FolderCreate(GetAssetsPath() + dest);\n            AssetRef<FolderAsset> folderAsset(info.path);\n\n            for (auto& inInfo : folderAsset->GetChildrenAssets())\n                CopyAsset(inInfo, dest + o2FileSystem.GetPathWithoutDirectories(inInfo->GetPath()));\n        }\n        else o2FileSystem.FileCopy(GetAssetsPath() + info.path, GetAssetsPath() + dest);\n\n        return true;\n    }\n\n    bool Assets::MoveAsset(const AssetRef<Asset>& asset, const String& newPath)\n    {\n        return MoveAsset(asset->GetUID(), newPath);\n    }\n\n    bool Assets::MoveAsset(const String& path, const String& newPath)\n    {\n        return MoveAsset(GetAssetInfo(path), newPath);\n    }\n\n    bool Assets::MoveAsset(const UID& id, const String& newPath)\n    {\n        return MoveAsset(GetAssetInfo(id), newPath);\n    }\n\n    bool Assets::MoveAsset(const AssetInfo& info, const String& newPath)\n    {\n        if (info.meta == nullptr)\n        {\n            mLog->Error(\"Can't remove asset '\" + info.path + \"' - asset isn't exist\");\n            return false;\n        }\n\n        if (GetAssetId(newPath) != UID::empty)\n        {\n            mLog->Error(\"Can't remove asset '\" + info.path + \"' to '\" + newPath + \"' - another asset exist in target path\");\n            return false;\n        }\n\n        o2FileSystem.FileMove(GetAssetsPath() + info.path + \".meta\", GetAssetsPath() + newPath + \".meta\");\n\n        if (info.meta->GetAssetType() == &TypeOf(FolderAsset))\n            o2FileSystem.FileMove(GetAssetsPath() + info.path, GetAssetsPath() + newPath);\n        else\n            o2FileSystem.FileMove(GetAssetsPath() + info.path, GetAssetsPath() + newPath);\n\n        return true;\n    }\n\n    bool Assets::MoveAssets(const Vector<UID>& assets, const String& destPath)\n    {\n        bool res = true;\n        for (auto& id : assets)\n        {\n            auto& info = GetAssetInfo(id);\n            if (!o2Assets.MoveAsset(id, destPath + \"/\" + o2FileSystem.GetPathWithoutDirectories(info.path)))\n                res = false;\n        }\n\n        return res;\n    }\n\n    bool Assets::RenameAsset(const AssetRef<Asset>& asset, const String& newName)\n    {\n        return RenameAsset(GetAssetInfo(asset->GetUID()), newName);\n    }\n\n    bool Assets::RenameAsset(const String& path, const String& newName)\n    {\n        return RenameAsset(GetAssetInfo(path), newName);\n    }\n\n    bool Assets::RenameAsset(const UID& id, const String& newName)\n    {\n        return RenameAsset(GetAssetInfo(id), newName);\n    }\n\n    bool Assets::RenameAsset(const AssetInfo& info, const String& newName)\n    {\n        if (info.meta == nullptr)\n        {\n            mLog->Error(\"Can't rename asset by path (\" + info.path + \") - asset isn't exist\");\n            return false;\n        }\n\n        String parentFolder = o2FileSystem.GetParentPath(info.path);\n        String newFullName = parentFolder + \"/\" + newName;\n\n        if (GetAssetId(newFullName) != UID::empty)\n        {\n            mLog->Error(\"Can't rename asset by path (\" + info.path + \") \\nto (\" + newName + \")\\n - another asset exist in target path\");\n            return false;\n        }\n\n        o2FileSystem.Rename(GetAssetsPath() + info.path + \".meta\", GetAssetsPath() + newFullName + \".meta\");\n        o2FileSystem.Rename(GetAssetsPath() + info.path, GetAssetsPath() + newFullName);\n\n        return true;\n    }\n\n    const Vector<Ref<AssetsTree>>& Assets::GetAssetsTrees() const\n    {\n        return mAssetsTrees;\n    }\n\n    const AssetsTree& Assets::GetAssetsTree() const\n    {\n        return *mMainAssetsTree;\n    }\n\n    String Assets::MakeUniqueAssetName(const String& path)\n    {\n        if (!IsAssetExist(path))\n            return path;\n\n        String extension = o2FileSystem.GetFileExtension(path);\n        String withoutExtension = o2FileSystem.GetFileNameWithoutExtension(path);\n\n        if (withoutExtension.EndsWith(\"copy\"))\n        {\n            if (extension.IsEmpty())\n                return MakeUniqueAssetName(withoutExtension.SubStr(0, withoutExtension.FindLast(\"copy\")) + \"copy 1\");\n            else\n                return MakeUniqueAssetName(withoutExtension.SubStr(0, withoutExtension.FindLast(\"copy\")) + \"copy 1.\" + extension);\n        }\n\n        int copyPos = withoutExtension.FindLast(\"copy\");\n        if (copyPos >= 0)\n        {\n            String end = withoutExtension.SubStr(copyPos + 4).Trimed(\" \");\n            int endNum = (int)end;\n\n            if (endNum > 0)\n            {\n                if (extension.IsEmpty())\n                    return MakeUniqueAssetName(withoutExtension.SubStr(0, copyPos) + \"copy \" + (String)(endNum + 1));\n                else\n                    return MakeUniqueAssetName(withoutExtension.SubStr(0, copyPos) + \"copy \" + (String)(endNum + 1) + \".\" + extension);\n            }\n        }\n\n        if (extension.IsEmpty())\n            return MakeUniqueAssetName(path + \" copy\");\n\n        return MakeUniqueAssetName(withoutExtension + \" copy.\" + extension);\n    }\n\n    void Assets::LoadAssetsTree()\n    {\n        mAssetsTrees.Clear();\n\n        mMainAssetsTree = mmake<AssetsTree>();\n        auto editorAssetsTree = mmake<AssetsTree>();\n\n        editorAssetsTree->DeserializeFromString(o2FileSystem.ReadFile(::GetEditorBuiltAssetsTreePath()));\n\n        {\n            String _mainData = o2FileSystem.ReadFile(::GetBuiltAssetsTreePath());\n            DataDocument _doc;\n            _doc.LoadFromData(_mainData);\n            mMainAssetsTree->Deserialize(_doc);\n        }\n\n        mMainAssetsTree->assetsPath = ::GetAssetsPath();\n        mMainAssetsTree->builtAssetsPath = ::GetBuiltAssetsPath();\n\n        mAssetsTrees.Add(mMainAssetsTree);\n        mAssetsTrees.Add(editorAssetsTree);\n    }\n\n    void Assets::CheckAssetsUnload()\n    {\n        return;\n\n        const bool checkDuplications = false;\n        if (checkDuplications)\n        {\n            for (int i = 0; i < mCachedAssets.Count(); i++)\n            {\n                auto cache = mCachedAssets[i];\n                for (int j = i + 1; j < mCachedAssets.Count(); j++)\n                {\n                    auto otherCache = mCachedAssets[j];\n\n                    if (!cache->GetPath().IsEmpty() && cache->GetPath() == otherCache->GetPath())\n                        o2Debug.LogError(\"Duplicate asset path \\\"\" + cache->GetPath() + \"\\\"\");\n\n                    if (cache->GetUID() == otherCache->GetUID())\n                        o2Debug.LogError(\"Duplicate asset UID \\\"\" + cache->GetPath() + \"\\\" - \" + cache->GetUID().ToString());\n\n                    if (cache == otherCache)\n                        o2Debug.LogError(\"Duplicate asset cache\");\n                }\n            }\n        }\n\n//         auto cachedAssets = mCachedAssets;\n//         for (auto& cached : cachedAssets)\n//         {\n//             if (cached->referencesCount <= 0)\n//                 delete cached->asset;\n//         }\n    }\n\n    AssetRef<Asset> Assets::FindAssetCache(const String& path) const\n    {\n        AssetRef<Asset> res;\n        mCachedAssetsByPath.TryGetValue(path, res);\n        return res;\n    }\n\n    AssetRef<Asset> Assets::FindAssetCache(const UID& id) const\n    {\n        AssetRef<Asset> res;\n        mCachedAssetsByUID.TryGetValue(id, res);\n        return res;\n    }\n\n    void Assets::ClearAssetsCache()\n    {\n        mCachedAssets.Clear();\n        mCachedAssetsByPath.Clear();\n        mCachedAssetsByUID.Clear();\n        mAssetsTrees.Clear();\n    }\n\n    AssetRef<Asset> Assets::AddAssetCache(Asset* asset)\n    {\n        if (!mReady)\n            return nullptr;\n        \n        AssetRef<Asset> assetRef(asset);\n        mCachedAssets.Add(assetRef);\n\n        if constexpr (IS_EDITOR)\n        {\n            if (mCachedAssetsByUID.ContainsKey(asset->GetUID()))\n                mLog->Error(\"Duplicated asset cache id: \" + (String)asset->GetUID() + \" - \\\"\" + asset->GetPath() + \"\\\"\");\n\n            if (!asset->GetPath().IsEmpty() && mCachedAssetsByPath.ContainsKey(asset->GetPath()))\n                mLog->Error(\"Duplicated asset cache path: \\\"\" + asset->GetPath() + \"\\\"\");\n        }\n\n        mCachedAssetsByPath[asset->GetPath()] = assetRef;\n        mCachedAssetsByUID[asset->GetUID()] = assetRef;\n\n        return assetRef;\n    }\n\n    void Assets::RemoveAssetCache(Asset* asset)\n    {\n        if (!mReady)\n            return;\n        \n        auto fnd = mCachedAssetsByUID.find(asset->GetUID());\n        if (fnd != mCachedAssetsByUID.end())\n            mCachedAssetsByUID.erase(fnd);\n\n        auto fnd2 = mCachedAssetsByPath.find(asset->GetPath());\n        if (fnd2 != mCachedAssetsByPath.end())\n            mCachedAssetsByPath.erase(fnd2);\n\n        mCachedAssets.RemoveFirst([=](const AssetRef<Asset>& x) { return x == asset; });\n    }\n\n    AssetRef<Asset> Assets::UpdateAssetCache(Asset* asset, const String& oldPath, const UID& oldUID)\n    {\n        if (!mReady)\n            return nullptr;\n        \n        AssetRef<Asset> cached;\n\n        auto fnd = mCachedAssetsByUID.find(oldUID);\n        if (fnd != mCachedAssetsByUID.end())\n        {\n            cached = fnd->second;\n            mCachedAssetsByUID.erase(fnd);\n        }\n\n        auto fnd2 = mCachedAssetsByPath.find(oldPath);\n        if (fnd2 != mCachedAssetsByPath.end())\n        {\n            mCachedAssetsByPath.erase(fnd2);\n        }\n\n        if (cached)\n        {\n            if (mCachedAssetsByUID.ContainsKey(asset->GetUID()))\n                mLog->Error(\"Duplicated asset cache id: \" + (String)asset->GetUID() + \" - \\\"\" + asset->GetPath() + \"\\\"\");\n\n            mCachedAssetsByUID[asset->GetUID()] = cached;\n            mCachedAssetsByPath[asset->GetPath()] = cached;\n        }\n        else\n        {\n            o2Debug.LogError(\"Can't find asset cache: \" + (String)asset->GetUID() + \" - \\\"\" + asset->GetPath() + \"\\\"\");\n        }\n\n        return cached;\n    }\n\n#if IS_EDITOR\n    void Assets::RebuildAssets(bool resetCache /*= false*/)\n    {\n#if PLATFORM_WINDOWS\n        String assetsBuilderPath = \"AssetsBuilder.exe\";\n        String platform = \"Windows\";\n#elif PLATFORM_LINUX\n        String assetsBuilderPath = \"AssetsBuilder\";\n        String platform = \"Linux\";\n#elif PLATFORM_MAC\n        String assetsBuilderPath = \"AssetsBuilder\";\n        String platform = \"Mac\";\n#endif\n\n        //-platform ${O2_PLATFORM} -source \"${CMAKE_CURRENT_SOURCE_DIR}/Assets/\" -target \"${CMAKE_CURRENT_SOURCE_DIR}/BuiltAssets/${O2_PLATFORM}/Data/\" -target-tree \"${CMAKE_CURRENT_SOURCE_DIR}/BuiltAssets/${O2_PLATFORM}/Data.json\" -compressor-config \"${CMAKE_CURRENT_SOURCE_DIR}/o2/CompressToolsConfig.json\"\n        String command = assetsBuilderPath +\n            \" -platform \" + platform +\n            \" -source \" + GetAssetsPath() +\n            \" -target \" + GetBuiltAssetsPath() +\n            \" -target-tree \" + GetBuiltAssetsTreePath() +\n            \" -compressor-config \" + GetEditorAssetsPath() + \"../../CompressToolsConfig.json\";\n\n        if (resetCache)\n            command += \" -forcible true\";\n\n        o2Debug.Log(\"Rebuild assets command: \" + command);\n\n        int res = system(command.Data());\n\n        auto changedAssetsUIDs = ReloadAssetsTree();\n\n        onAssetsRebuilt(changedAssetsUIDs);\n    }\n\n    Vector<UID> Assets::ReloadAssetsTree()\n    {\n        Ref<AssetsTree> newBuiltAssetsTree = mmake<AssetsTree>();\n        newBuiltAssetsTree->DeserializeFromString(o2FileSystem.ReadFile(::GetBuiltAssetsTreePath()));\n\n        Vector<UID> changedAssetsUIDs;\n\n        Function<void(Ref<AssetInfo> oldParent, Vector<Ref<AssetInfo>>& oldInfos, Ref<AssetInfo> newParent, Vector<Ref<AssetInfo>>& newInfos)> processFolder =\n            [&processFolder, this, &changedAssetsUIDs]\n        (Ref<AssetInfo> oldParent, Vector<Ref<AssetInfo>>& oldInfos, Ref<AssetInfo> newParent, Vector<Ref<AssetInfo>>& newInfos)\n        {\n            auto oldInfosCopy = oldInfos;\n            oldInfos.Clear();\n\n            auto copyNewInfos = newInfos;\n            for (auto& newAssetInfo : copyNewInfos)\n            {\n                Ref<AssetInfo> oldAssetInfo = mMainAssetsTree->allAssetsByUID[newAssetInfo->meta->ID()].Lock();\n\n                if (oldAssetInfo)\n                {\n                    oldInfos.Add(oldAssetInfo);\n                    if (oldParent)\n                        oldAssetInfo->parent = Ref(oldParent);\n\n                    if (newAssetInfo->editTime != oldAssetInfo->editTime || !newAssetInfo->meta->IsEqual(oldAssetInfo->meta.Get()))\n                        changedAssetsUIDs.Add(newAssetInfo->meta->ID());\n\n                    oldAssetInfo->path = newAssetInfo->path;\n\n                    oldInfosCopy.Remove(oldAssetInfo);\n                }\n                else\n                {\n                    AssetRef<Asset> cachedAsset;\n                    if (mCachedAssetsByUID.TryGetValue(newAssetInfo->meta->ID(), cachedAsset))\n                    {\n                        oldAssetInfo = cachedAsset->mInfo.CloneAsRef<AssetInfo>();\n                        oldAssetInfo->RemoveAllChildren();\n                        oldAssetInfo->path = newAssetInfo->path;\n                    }\n                    else\n                    {\n                        oldAssetInfo = newAssetInfo;\n                        newInfos.Remove(newAssetInfo);\n                    }\n\n                    changedAssetsUIDs.Add(newAssetInfo->meta->ID());\n\n                    oldInfos.Add(oldAssetInfo);\n                    if (oldParent)\n                        oldAssetInfo->parent = Ref(oldParent);\n                }\n\n                if (newAssetInfo->meta->GetAssetType() == &TypeOf(FolderAsset))\n                    processFolder(oldAssetInfo, oldAssetInfo->mChildren, newAssetInfo, newAssetInfo->mChildren);\n            }\n        };\n\n        processFolder(nullptr, mMainAssetsTree->rootAssets, nullptr, newBuiltAssetsTree->rootAssets);\n\n        auto oldAllAssets = mMainAssetsTree->allAssets;\n        mMainAssetsTree->allAssets.Clear();\n        mMainAssetsTree->allAssetsByPath.Clear();\n        mMainAssetsTree->allAssetsByUID.Clear();\n\n        for (auto& asset : mMainAssetsTree->rootAssets)\n            asset->SetTree(mMainAssetsTree);\n\n        for (auto& info : oldAllAssets)\n        {\n            auto infoRef = info.Lock();\n\n            if (!mMainAssetsTree->allAssetsByUID.ContainsKey(infoRef->meta->ID()))\n            {\n                changedAssetsUIDs.Add(infoRef->meta->ID());\n\n                infoRef->mChildren.Clear();\n                infoRef->parent = nullptr;\n            }\n        }\n\n        return changedAssetsUIDs;\n    }\n#endif\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Assets.h",
    "content": "#pragma once\n\n#include \"o2/Assets/AssetsTree.h\"\n#include \"o2/Render/Spine/SpineManager.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\n// Assets system access macros\n#define o2Assets o2::Assets::Instance()\n\nnamespace Editor\n{\n    class EditorApplication;\n}\n\nnamespace o2\n{\n    class LogStream;\n    class Render;\n    struct AssetInfo;\n\n    FORWARD_CLASS_REF(Asset);\n\n    // ----------------\n    // Assets utilities\n    // ----------------\n    class Assets : public Singleton<Assets>\n    {\n    public:\n        PROPERTIES(Assets);\n        GETTER(String, assetsPath, GetAssetsPath); // Assets path getter\n\n    public:\n        Function<void(const Vector<UID>&)> onAssetsRebuilt; // Assets rebuilding event\n\n    public:\n        // Default constructor\n        Assets(RefCounter* refCounter);\n\n        // Destructor\n        ~Assets();\n\n        // Returns assets path\n        String GetAssetsPath() const;\n\n        // Returns data path\n        String GetBuiltAssetsPath() const;\n\n        // Returns asset path by asset id\n        const String& GetAssetPath(const UID& id) const;\n\n        // Returns asset id by path\n        const UID& GetAssetId(const String& path) const;\n\n        // Returns asset info by id\n        const AssetInfo& GetAssetInfo(const UID& id) const;\n\n        // Returns asset info by path\n        const AssetInfo& GetAssetInfo(const String& path) const;\n\n        // Returns assets types and extensions dictionary. Key - extension, value - type of asset\n        static const Map<String, const Type*> GetAssetsExtensionsTypes();\n\n        // Returns standard asset type\n        static const Type* GetStdAssetType();\n\n        // Returns asset type for extension\n        static const Type* GetAssetTypeByExtension(const String& extension);\n\n        // Returns asset reference by path\n        AssetRef<Asset> GetAssetRef(const String& path);\n\n        // Returns asset reference by path\n        template<typename _asset_type>\n        AssetRef<_asset_type> GetAssetRefByType(const String& path);\n\n        // Returns asset reference by id\n        AssetRef<Asset> GetAssetRef(const UID& id);\n\n        // Returns asset reference by id\n        template<typename _asset_type>\n        AssetRef<_asset_type> GetAssetRefByType(const UID& id);\n\n        // Creates asset type _asset_type\n        template<typename _asset_type, typename ... _args>\n        AssetRef<Asset> CreateAsset(_args ... args);\n\n        // Returns true if asset exist by path\n        bool IsAssetExist(const String& path) const;\n\n        // Returns true if asset exist by id\n        bool IsAssetExist(const UID& id) const;\n\n        // Removes asset\n        bool RemoveAsset(const AssetRef<Asset>& asset);\n\n        // Removes asset by path\n        bool RemoveAsset(const String& path);\n\n        // Removes asset by id\n        bool RemoveAsset(const UID& id);\n\n        // Copies asset\n        bool CopyAsset(const AssetRef<Asset>& asset, const String& dest);\n\n        // Copies asset by path\n        bool CopyAsset(const String& path, const String& dest);\n\n        // Copies asset by id\n        bool CopyAsset(const UID& id, const String& dest);\n\n        // Moves asset to new path\n        bool MoveAsset(const AssetRef<Asset>& asset, const String& newPath);\n\n        // Moves asset by path to new path\n        bool MoveAsset(const String& path, const String& newPath);\n\n        // Moves asset by id to new path\n        bool MoveAsset(const UID& id, const String& newPath);\n\n        // Moves assets to new path\n        bool MoveAssets(const Vector<UID>& assets, const String& destPath);\n\n        // Renames asset to new path\n        bool RenameAsset(const AssetRef<Asset>& asset, const String& newName);\n\n        // Renames asset by path to new path\n        bool RenameAsset(const String& path, const String& newName);\n\n        // Renames asset by id to new path\n        bool RenameAsset(const UID& id, const String& newName);\n\n        // Returns all assets trees\n        const Vector<Ref<AssetsTree>>& GetAssetsTrees() const;\n\n        // Returns main tree\n        const AssetsTree& GetAssetsTree() const;\n\n        // Checks assets with zero references and removes them\n        void CheckAssetsUnload();\n\n        // Makes unique asset name from first path variant\n        String MakeUniqueAssetName(const String& path);\n\n#if IS_EDITOR\n        // Rebuilds assets\n        void RebuildAssets(bool resetCache = false);\n#endif\n\n    protected:\n        bool mReady = true; // Is assets manager ready to work\n        \n        Ref<AssetsTree>         mMainAssetsTree; // Main assets tree\n        Vector<Ref<AssetsTree>> mAssetsTrees;    // Assets trees\n\n        Ref<LogStream> mLog; // Log stream\n\n        Vector<AssetRef<Asset>>      mCachedAssets;       // Current cached assets\n        Map<String, AssetRef<Asset>> mCachedAssetsByPath; // Current cached assets by path\n        Map<UID, AssetRef<Asset>>    mCachedAssetsByUID;  // Current cached assets by uid\n\n        Ref<SpineManager> mSpineManager; // Spine manager\n\n    protected:\n        // Loads asset infos\n        void LoadAssetsTree();\n\n        // Returns asset cache by path\n        AssetRef<Asset> FindAssetCache(const String& path) const;\n\n        // Returns asset cache by id\n        AssetRef<Asset> FindAssetCache(const UID& id) const;\n\n        // Clears assets cache\n        void ClearAssetsCache();\n\n        // Adds asset to cache\n        AssetRef<Asset> AddAssetCache(Asset* asset);\n\n        // Removes asset from cache by UID and path\n        void RemoveAssetCache(Asset* asset);\n\n        // Updates asset cached path and id\n        AssetRef<Asset> UpdateAssetCache(Asset* asset, const String& oldPath, const UID& oldUID);\n\n        // Removes asset by info\n        bool RemoveAsset(const AssetInfo& info);\n\n        // Copies asset by info\n        bool CopyAsset(const AssetInfo& info, const String& dest);\n\n        // Moves asset to new path\n        bool MoveAsset(const AssetInfo& info, const String& newPath);\n\n        // Renames asset to new path\n        bool RenameAsset(const AssetInfo& info, const String& newName);\n\n#if IS_EDITOR\n        // Reloads asset infos and returns list of changed assets\n        Vector<UID> ReloadAssetsTree();\n#endif\n\n        template<typename _asset_type>\n        friend class AssetRef;\n\n        friend class Asset;\n        friend class FolderAsset;\n        friend class Render;\n        friend class Editor::EditorApplication;\n    };\n}\n\n#include \"o2/Assets/AssetRef.h\"\n\nnamespace o2\n{\n    template<typename _asset_type>\n    AssetRef<_asset_type> Assets::GetAssetRefByType(const String& path)\n    {\n        return DynamicCast<_asset_type>(GetAssetRef(path).GetRef());\n    }\n\n    template<typename _asset_type>\n    AssetRef<_asset_type> Assets::GetAssetRefByType(const UID& id)\n    {\n        return DynamicCast<_asset_type>(GetAssetRef(id).GetRef());\n    }\n\n    template<typename _asset_type, typename ... _args>\n    AssetRef<Asset> Assets::CreateAsset(_args ... args)\n    {\n        auto newAset = AssetRef(mmake<_asset_type>(args ...));\n\n        mCachedAssets.Add(newAset);\n        mCachedAssetsByUID[newAset->GetUID()] = newAset;\n\n        return newAset;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/AssetsTree.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AssetsTree.h\"\n\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    AssetsTree::AssetsTree() :\n        log(nullptr)\n    {}\n\n    AssetsTree::~AssetsTree()\n    {\n        Clear();\n    }\n\n    void AssetsTree::Build(const String& path)\n    {\n        this->assetsPath = path;\n\n        if (!o2FileSystem.IsFolderExist(path))\n            o2FileSystem.FolderCreate(path);\n\n        FolderInfo folderInfo = o2FileSystem.GetFolderInfo(path);\n        folderInfo.ClampPathNames();\n\n        LoadFolder(folderInfo, nullptr);\n\n        auto thisRef = Ref(this);\n        for (auto& asset : rootAssets)\n            asset->SetTree(thisRef);\n    }\n\n    void AssetsTree::Build(const FolderInfo& folderInfo)\n    {\n        LoadFolder(folderInfo, nullptr);\n\n        auto thisRef = Ref(this);\n        for (auto& asset : rootAssets)\n            asset->SetTree(thisRef);\n    }\n\n    void AssetsTree::Rebuild()\n    {\n        FolderInfo folderInfo = o2FileSystem.GetFolderInfo(assetsPath);\n        folderInfo.ClampPathNames();\n        LoadFolder(folderInfo, nullptr);\n\n        auto thisRef = Ref(this);\n        for (auto& asset : rootAssets)\n            asset->SetTree(thisRef);\n    }\n\n    void AssetsTree::SortAssets()\n    {\n        allAssets.Sort([](const WeakRef<AssetInfo>& a, const WeakRef<AssetInfo>& b) { return a.Lock()->path.Length() < b.Lock()->path.Length(); });\n    }\n\n    void AssetsTree::SortAssetsInverse()\n    {\n        allAssets.Sort([](const WeakRef<AssetInfo>& a, const WeakRef<AssetInfo>& b) { return a.Lock()->path.Length() > b.Lock()->path.Length(); });\n    }\n\n    Ref<AssetInfo> AssetsTree::Find(const String& path) const\n    {\n        WeakRef<AssetInfo> res;\n        allAssetsByPath.TryGetValue(path, res);\n        return res.Lock();\n    }\n\n    Ref<AssetInfo> AssetsTree::Find(const UID& id) const\n    {\n        WeakRef<AssetInfo> res;\n        allAssetsByUID.TryGetValue(id, res);\n        return res.Lock();\n    }\n\n    Ref<AssetInfo> AssetsTree::AddAsset(Ref<AssetInfo> asset)\n    {\n        int delPos = asset->path.FindLast(\"/\");\n        if (delPos < 0 || delPos == asset->path.Length() - 1)\n        {\n            rootAssets.Add(asset);\n            asset->SetTree(Ref(this));\n        }\n        else\n        {\n            String parentPath = asset->path.SubStr(0, delPos);\n            WeakRef<AssetInfo> parent;\n            allAssetsByPath.TryGetValue(parentPath, parent);\n\n            if (!parent)\n            {\n                if (log)\n                    log->Out(\"Failed to add built asset info: \" + asset->path);\n            }\n            else \n                parent.Lock()->AddChild(asset);\n\n            asset->SetTree(Ref(this));\n        }\n\n        return asset;\n    }\n\n    void AssetsTree::RemoveAsset(Ref<AssetInfo> asset)\n    {\n        if (allAssetsByPath[asset->path] == asset)\n            allAssetsByPath.Remove(asset->path);\n\n        if (asset->meta && allAssetsByUID[asset->meta->ID()] == asset)\n            allAssetsByUID.Remove(asset->meta->ID());\n\n        allAssets.Remove(asset);\n        rootAssets.Remove(asset);\n\n        if (asset->parent)\n            asset->parent.Lock()->RemoveChild(asset);\n\n        if (asset->meta->GetAssetType() == &TypeOf(FolderAsset))\n        {\n            auto& childs = asset->mChildren;\n            for (auto& ch : childs)\n                RemoveAsset(ch);\n        }\n    }\n\n    void AssetsTree::Clear()\n    {\n        rootAssets.Clear();\n        allAssets.Clear();\n        allAssetsByPath.Clear();\n        allAssetsByUID.Clear();\n    }\n\n    void AssetsTree::LoadFolder(const FolderInfo& folder, Ref<AssetInfo> parentAsset)\n    {\n        for (auto& fileInfo : folder.files)\n        {\n            String extension = o2FileSystem.GetFileExtension(fileInfo.path);\n\n            if (extension != \"meta\")\n            {\n                String assetFullPath = assetsPath + fileInfo.path;\n                String metaFullPath = assetFullPath + \".meta\";\n\n                bool isExistMetaForAsset = o2FileSystem.IsFileExist(metaFullPath);\n                if (!isExistMetaForAsset)\n                    continue;\n\n                LoadAssetNode(fileInfo.path, parentAsset, fileInfo.editDate);\n            }\n        }\n\n        for (auto& subFolder : folder.folders)\n        {\n            Ref<AssetInfo> asset;\n\n            String subFolderPath = subFolder.path;\n            if (subFolderPath.EndsWith(\"/\"))\n                subFolderPath.Erase(subFolderPath.Length() - 1);\n\n            String folderFullPath = assetsPath + subFolderPath;\n            String metaFullPath = folderFullPath + \".meta\";\n\n            bool isExistMetaForFolder = o2FileSystem.IsFileExist(metaFullPath);\n            if (!isExistMetaForFolder)\n            {\n                if (log)\n                    log->Warning(\"Can't load asset info for \" + subFolder.path + \" - missing meta file\");\n\n                continue;\n            }\n\n            asset = LoadAssetNode(subFolderPath, parentAsset, TimeStamp());\n\n            LoadFolder(subFolder, asset);\n        }\n    }\n\n    Ref<AssetInfo> AssetsTree::LoadAssetNode(const String& path, Ref<AssetInfo> parent, const TimeStamp& time)\n    {\n        DataDocument metaData;\n        if (!metaData.LoadFromFile(this->assetsPath + path + \".meta\"))\n        {\n            o2Debug.LogError(\"Failed to load asset meta: \" + path);\n        }\n\n        Ref<AssetMeta> mmeta;\n        metaData.Get<Ref<AssetMeta>>(mmeta);\n\n        Ref<AssetInfo> asset = mmake<AssetInfo>();\n\n        asset->meta = mmeta;\n        asset->path = path;\n        asset->editTime = time;\n        asset->SetParent(parent);\n\n        if (!parent)\n            rootAssets.Add(asset);\n\n        return asset;\n    }\n\n    void AssetsTree::OnDeserialized(const DataValue& node)\n    {\n        Ref<AssetsTree> thisRef(this);\n        for (auto& asset : rootAssets)\n            asset->SetTree(thisRef);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AssetsTree, o2__AssetsTree);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/AssetsTree.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetInfo.h\"\n#include \"o2/Utils/Basic/ITree.h\"\n#include \"o2/Utils/FileSystem/FileInfo.h\"\n\nnamespace o2\n{\n    class LogStream;\n\n    // --------------------------------\n    // Asset tree structure information\n    // --------------------------------\n    class AssetsTree: public ISerializable, public RefCounterable\n    {\n    public:\n        Ref<LogStream> log;  // Log stream\n\n        String assetsPath;      // Assets path @SERIALIZABLE\n        String builtAssetsPath; // Built assets path @SERIALIZABLE\n\n        Vector<Ref<AssetInfo>>          rootAssets;      // Root path assets @SERIALIZABLE\n        Vector<WeakRef<AssetInfo>>      allAssets;       // All assets\n        Map<String, WeakRef<AssetInfo>> allAssetsByPath; // All assets by path\n        Map<UID, WeakRef<AssetInfo>>    allAssetsByUID;  // All assets by UID\n\n    public:\n        // Default constructor\n        AssetsTree();\n\n        // Destructor\n        ~AssetsTree();\n\n        // Builds tree for folder\n        void Build(const String& path);\n\n        // Builds tree by folder info\n        void Build(const FolderInfo& folderInfo);\n\n        // Rebuilds tree for current folder\n        void Rebuild();\n\n        // Sorts all assets by path depth\n        void SortAssets();\n\n        // Sorts inverted all assets by depth\n        void SortAssetsInverse();\n\n        // Returns asset by path. (nullptr if not asset with path)\n        Ref<AssetInfo> Find(const String& path) const;\n\n        // Returns asset by id. (nullptr if not asset with id)\n        Ref<AssetInfo> Find(const UID& id) const;\n\n        // Adds asset node information into structure\n        Ref<AssetInfo> AddAsset(Ref<AssetInfo> asset);\n\n        // Removes asset node information from structure\n        void RemoveAsset(Ref<AssetInfo> asset);\n\n        // Clears all information\n        void Clear();\n\n        SERIALIZABLE(AssetsTree);\n\n    protected:\n        // Loads assets nodes from folder\n        void LoadFolder(const FolderInfo& folder, Ref<AssetInfo> parentAsset);\n\n        // Loads and returns asset by path\n        Ref<AssetInfo> LoadAssetNode(const String& path, Ref<AssetInfo> parent, const TimeStamp& time);\n\n        // Called when deserializing node, combine all nodes in mAllNodes\n        void OnDeserialized(const DataValue& node) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AssetsTree)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AssetsTree)\n{\n    FIELD().PUBLIC().NAME(log);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(assetsPath);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(builtAssetsPath);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(rootAssets);\n    FIELD().PUBLIC().NAME(allAssets);\n    FIELD().PUBLIC().NAME(allAssetsByPath);\n    FIELD().PUBLIC().NAME(allAssetsByUID);\n}\nEND_META;\nCLASS_METHODS_META(o2::AssetsTree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, Build, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Build, const FolderInfo&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Rebuild);\n    FUNCTION().PUBLIC().SIGNATURE(void, SortAssets);\n    FUNCTION().PUBLIC().SIGNATURE(void, SortAssetsInverse);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AssetInfo>, Find, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AssetInfo>, Find, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AssetInfo>, AddAsset, Ref<AssetInfo>);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAsset, Ref<AssetInfo>);\n    FUNCTION().PUBLIC().SIGNATURE(void, Clear);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadFolder, const FolderInfo&, Ref<AssetInfo>);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<AssetInfo>, LoadAssetNode, const String&, Ref<AssetInfo>, const TimeStamp&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Meta.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Meta.h\"\n\n#include \"o2/Assets/Asset.h\"\n\nnamespace o2\n{\n    AssetMeta::AssetMeta() :\n        mId(0)\n    {}\n\n    AssetMeta::~AssetMeta()\n    {}\n\n    const Type* AssetMeta::GetAssetType() const\n    {\n        return &TypeOf(Asset);\n    }\n\n    bool AssetMeta::IsEqual(AssetMeta* other) const\n    {\n        return GetAssetType() == other->GetAssetType() && mId == other->mId;\n    }\n\n    const UID& AssetMeta::ID() const\n    {\n        return mId;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AssetMeta, o2__AssetMeta);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Meta.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/UID.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nnamespace o2\n{\n    // --------------------------------------\n    // Basic asset meta information interface\n    // --------------------------------------\n    class AssetMeta : public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        // Default constructor\n        AssetMeta();\n\n        // Virtual destructor\n        virtual ~AssetMeta();\n\n        // Returns asset id\n        const UID& ID() const;\n\n        // Returns asset type id\n        virtual const Type* GetAssetType() const;\n\n        // Returns true if other meta is equal to this\n        virtual bool IsEqual(AssetMeta* other) const;\n\n        SERIALIZABLE(AssetMeta);\n        CLONEABLE_REF(AssetMeta);\n\n    private:\n        UID mId; // Id of asset @SERIALIZABLE\n\n        friend class Asset;\n    };\n    \n    // -----------------------------------------------\n    // Asset meta specialization. Use it as base class\n    // -----------------------------------------------\n    template<typename T>\n    class DefaultAssetMeta : public AssetMeta\n    {\n    public:\n        // Returns asset type id\n        const Type* GetAssetType() const override { return &TypeOf(T); }\n\n        SERIALIZABLE(DefaultAssetMeta<T>);\n        CLONEABLE_REF(DefaultAssetMeta<T>);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AssetMeta)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AssetMeta)\n{\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mId);\n}\nEND_META;\nCLASS_METHODS_META(o2::AssetMeta)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(const UID&, ID);\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetAssetType);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEqual, AssetMeta*);\n}\nEND_META;\n\nMETA_TEMPLATES(typename T)\nCLASS_BASES_META(o2::DefaultAssetMeta<T>)\n{\n    BASE_CLASS(o2::AssetMeta);\n}\nEND_META;\nMETA_TEMPLATES(typename T)\nCLASS_FIELDS_META(o2::DefaultAssetMeta<T>)\n{\n}\nEND_META;\nMETA_TEMPLATES(typename T)\nCLASS_METHODS_META(o2::DefaultAssetMeta<T>)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(const Type*, GetAssetType);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/ActorAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ActorAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Scene/Actor.h\"\n\n#include \"o2/Scripts/ScriptValue.h\"\n\nnamespace o2\n{\n    ActorAsset::ActorAsset():\n        mActor(mmake<Actor>(ActorCreateMode::NotInScene))\n    {\n        mActor->mIsAsset = true;\n        mActor->mAssetId = ID();\n    }\n\n    ActorAsset::ActorAsset(const ActorAsset& other):\n        AssetWithDefaultMeta<ActorAsset>(other)\n    {\n        mActor = other.mActor;\n    }\n\n    ActorAsset::ActorAsset(const Ref<Actor>& actor):\n        mActor(actor)\n    {\n        if (!actor->IsAsset())\n        {\n            mActor->RemoveFromScene();\n            mActor->mIsAsset = true;\n            mActor->mAssetId = ID();\n        }\n        else\n            ID() = mActor->mAssetId;\n    }\n\n    ActorAsset::~ActorAsset()\n    {\n    }\n\n    ActorAsset& ActorAsset::operator=(const ActorAsset& other)\n    {\n        Asset::operator=(other);\n\n        mActor = other.mActor;\n\n        return *this;\n    }\n\n    Ref<Actor> ActorAsset::Instantiate() const\n    {\n        if (!mActor)\n            return nullptr;\n\n        return mActor->CloneAsRef<Actor>();\n    }\n\n    Vector<String> ActorAsset::GetFileExtensions()\n    {\n        return { \"proto\" };\n    }\n\n    void ActorAsset::OnUIDChanged(const UID& oldUID)\n    {\n        if (mActor)\n            mActor->mAssetId = ID();\n    }\n\n    void ActorAsset::OnSerialize(DataValue& node) const\n    {\n        mActor->mIsAsset = false;\n        node[\"mActor\"] = mActor;\n        mActor->mIsAsset = true;\n    }\n\n    void ActorAsset::OnDeserialized(const DataValue& node)\n    {\n        node[\"mActor\"].Get(mActor);\n\n        ActorRefResolver::ResolveRefs(true);\n\n        if (mActor)\n        {\n            mActor->RemoveFromScene();\n            mActor->mIsAsset = true;\n            mActor->mAssetId = GetUID();\n        }\n    }\n\n    const Ref<Actor>& ActorAsset::GetActor() const\n    {\n        return mActor;\n    }\n\n    void ActorAsset::SetActor(const Ref<Actor>& actor)\n    {\n        mActor = actor;\n\n        if (mActor)\n        {\n            if (!actor->IsAsset())\n            {\n                mActor->RemoveFromScene();\n                mActor->mIsAsset = true;\n                mActor->mAssetId = ID();\n            }\n            else\n                ID() = mActor->mAssetId;\n        }\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::ActorAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::ActorAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::ActorAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::ActorAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::ActorAsset, o2__ActorAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/ActorAsset.h",
    "content": "#pragma once\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n#include \"o2/Scene/ActorLinkRef.h\"\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(Actor);\n\n    // -----------\n    // Actor asset\n    // -----------\n    class ActorAsset: public AssetWithDefaultMeta<ActorAsset>\n    {\n    public:\n        // Default constructor\n        ActorAsset();\n\n        // Constructor\n        ActorAsset(const Ref<Actor>& actor);\n\n        // Copy-constructor\n        ActorAsset(const ActorAsset& other);\n\n        // Destructor\n        ~ActorAsset();\n\n        // Check equals operator\n        ActorAsset& operator=(const ActorAsset& asset);\n\n        // Instantiates actor toscene @SCRIPTABLE\n        Ref<Actor> Instantiate() const;\n\n        // Returns actor\n        const Ref<Actor>& GetActor() const;\n\n        // Sets actor\n        void SetActor(const Ref<Actor>& actor);\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor icon\n        static String GetEditorIcon() { return \"ui/UI4_actor_icon.png\"; }\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 99; }\n\n        // Is this asset type is available to create from editor's assets window\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        SERIALIZABLE(ActorAsset);\n        CLONEABLE_REF(ActorAsset);\n\n    protected:\n        Ref<Actor> mActor; // Asset data \n\n    protected:\n        // Itis called when UID has changed; updates actor asset id\n        void OnUIDChanged(const UID& oldUID) override;\n\n        // Beginning serialization callback\n        void OnSerialize(DataValue& node) const override;\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ActorAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<ActorAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ActorAsset)\n{\n    FIELD().PROTECTED().NAME(mActor);\n}\nEND_META;\nCLASS_METHODS_META(o2::ActorAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<Actor>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ActorAsset&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Actor>, Instantiate);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Actor>&, GetActor);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetActor, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUIDChanged, const UID&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/AnimationAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n\nnamespace o2\n{\n    AnimationAsset::AnimationAsset()\n    {\n        animation = mmake<AnimationClip>();\n    }\n\n    AnimationAsset::AnimationAsset(const AnimationAsset& other):\n        AssetWithDefaultMeta<AnimationAsset>(other), animation(other.animation->CloneAsRef<AnimationClip>())\n    {}\n\n    AnimationAsset::AnimationAsset(const Ref<AnimationClip>& clip):\n        AssetWithDefaultMeta<AnimationAsset>(), animation(clip)\n    {}\n\n    AnimationAsset& AnimationAsset::operator=(const AnimationAsset& other)\n    {\n        Asset::operator=(other);\n        animation = other.animation->CloneAsRef<AnimationClip>();\n\n        return *this;\n    }\n\n    Vector<String> AnimationAsset::GetFileExtensions()\n    {\n        return { \"anim\" };\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::AnimationAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::AnimationAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AnimationAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::AnimationAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationAsset, o2__AnimationAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/AnimationAsset.h",
    "content": "#pragma once\n\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n#include \"o2/Utils/Editor/Attributes/ExpandedByDefaultAttribute.h\"\n\nnamespace o2\n{\n    // ---------------\n    // Animation asset\n    // ---------------\n    class AnimationAsset: public AssetWithDefaultMeta<AnimationAsset>\n    {\n    public:\n        Ref<AnimationClip> animation; // Asset data @SERIALIZABLE @EXPANDED_BY_DEFAULT\n\n    public:\n        // Default constructor\n        AnimationAsset();\n\n        // Copy-constructor\n        AnimationAsset(const AnimationAsset& asset);\n\n        // Constructor with animation clip\n        explicit AnimationAsset(const Ref<AnimationClip>& clip);\n\n        // Check equals operator\n        AnimationAsset& operator=(const AnimationAsset& asset);\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor icon\n        static String GetEditorIcon() { return \"ui/UI4_anim_file_icon.png\"; }\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 98; }\n\n        // Is this asset type is available to create from editor's assets window\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        // Is asset reference available to contain instance inside\n        static bool IsReferenceCanOwnInstance() { return true; }\n\n        SERIALIZABLE(AnimationAsset);\n        CLONEABLE_REF(AnimationAsset);\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<AnimationAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationAsset)\n{\n    FIELD().PUBLIC().EXPANDED_BY_DEFAULT_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(animation);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationAsset&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsReferenceCanOwnInstance);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/AnimationStateGraphAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationStateGraphAsset.h\"\n\nnamespace o2\n{\n    AnimationStateGraphAsset::AnimationStateGraphAsset()\n    {}\n\n    AnimationStateGraphAsset::AnimationStateGraphAsset(const AnimationStateGraphAsset& other):\n\t\tAnimationStateGraphAsset(nullptr, other)\n    {}\n\n\tAnimationStateGraphAsset::AnimationStateGraphAsset(RefCounter* refCounter):\n\t\tAssetWithDefaultMeta<AnimationStateGraphAsset>(refCounter)\n\t{}\n\n\tAnimationStateGraphAsset::AnimationStateGraphAsset(RefCounter* refCounter, const AnimationStateGraphAsset& other):\n\t\tAssetWithDefaultMeta<AnimationStateGraphAsset>(refCounter, other)\n\t{\n\t\tRemoveAllStates();\n\n\t\tfor (auto& state : other.mStates)\n\t\t{\n\t\t\tauto newState = state->CloneAsRef<AnimationGraphState>();\n\t\t\tAddState(newState);\n\t\t}\n\t}\n\n\tAnimationStateGraphAsset::~AnimationStateGraphAsset()\n    {\n        RemoveAllStates();\n    }\n\n    AnimationStateGraphAsset& AnimationStateGraphAsset::operator=(const AnimationStateGraphAsset& other)\n    {\n        RemoveAllStates();\n\n        Asset::operator=(other);\n\n        for (auto& state : other.mStates)\n        {\n            auto newState = state->CloneAsRef<AnimationGraphState>();\n            AddState(newState);\n\t\t}\n\n\t\tSetDirty();\n\n        return *this;\n    }\n\n    void AnimationStateGraphAsset::SetInitialState(const String& name)\n    {\n        mInitialState = name;\n\n\t\tonInitialStateChanged(mInitialState);\n\t\tSetDirty();\n    }\n\n    const String& AnimationStateGraphAsset::GetInitialState() const\n    {\n        return mInitialState;\n    }\n\n    Ref<AnimationGraphState> AnimationStateGraphAsset::AddState(const Ref<AnimationGraphState>& state)\n    {\n        mStates.Add(state);\n        state->SetGraph(Ref(this));\n\n\t\tonStateAdded(state);\n        SetDirty();\n\n\t\treturn state;\n    }\n\n    Ref<AnimationGraphState> AnimationStateGraphAsset::AddState(const Vector<String>& animations)\n    {\n        auto state = mmake<AnimationGraphState>();\n\n        for (auto& animation : animations)\n            state->AddAnimation(animation);\n\n        AddState(state);\n        return state;\n    }\n\n    void AnimationStateGraphAsset::RemoveState(const Ref<AnimationGraphState>& state)\n    {\n        mStates.Remove(state);\n\t\tonStateRemoved(state);\n\t\tSetDirty();\n    }\n\n    void AnimationStateGraphAsset::RemoveState(const String& name)\n    {\n        RemoveState(GetState(name));\n    }\n\n    void AnimationStateGraphAsset::RemoveAllStates()\n    {\n        for (auto& state : mStates)\n            onStateRemoved(state);\n\n\t\tmStates.Clear();\n\t\tSetDirty();\n    }\n\n    Ref<AnimationGraphState> AnimationStateGraphAsset::GetState(const String& name)\n    {\n        for (auto& state : mStates)\n        {\n            if (state->GetName() == name)\n                return state;\n        }\n\n        return nullptr;\n    }\n\n    Ref<AnimationGraphState> AnimationStateGraphAsset::GetState(const UID& uid)\n    {\n        for (auto& state : mStates)\n        {\n            if (state->GetUID() == uid)\n                return state;\n        }\n\n        return nullptr;\n    }\n\n    const Vector<Ref<AnimationGraphState>>& AnimationStateGraphAsset::GetStates() const\n    {\n        return mStates;\n    }\n\n    Vector<String> AnimationStateGraphAsset::GetStatesNames() const\n    {\n        Vector<String> names;\n        for (auto& state : mStates)\n            names.Add(state->GetName());\n\n        return names;\n    }\n\n    Vector<Ref<AnimationGraphTransition>> AnimationStateGraphAsset::CalculatePath(const Ref<AnimationGraphState>& from, \n                                                                                      const Ref<AnimationGraphState>& to)\n    {\n        Vector<Ref<AnimationGraphTransition>> path;\n\n        if (!from || !to)\n            return path;\n\n        Map<Ref<AnimationGraphState>, Ref<AnimationGraphTransition>> visited;\n        Vector<Ref<AnimationGraphState>> current = { from };\n\n        while (!current.empty())\n        {\n            Vector<Ref<AnimationGraphState>> next;\n\n            for (auto& state : current)\n            {\n                if (state == to)\n                {\n                    auto currentState = state;\n                    while (currentState != from)\n                    {\n                        auto passedStateTransition = visited[currentState];\n                        path.Add(passedStateTransition);\n                        currentState = passedStateTransition->GetSourceState();\n                    }\n\n\t\t\t\t\tpath.Reverse();\n                    return path;\n                }\n\n                for (auto& transition : state->GetTransitions())\n                {\n                    auto destinationState = transition->GetDestinationState();\n                    if (!visited.ContainsKey(destinationState))\n                    {\n                        visited[destinationState] = transition;\n                        next.Add(destinationState);\n                    }\n                }\n            }\n\n            current = next;\n        }\n\n        return path;\n    }\n\n    Vector<String> AnimationStateGraphAsset::GetFileExtensions()\n    {\n        return { \"asg\" };\n    }\n\n    void AnimationStateGraphAsset::OnDeserialized(const DataValue& node)\n    {\n        Asset::OnDeserialized(node);\n\n        for (auto& state : mStates)\n            state->SetGraph(Ref(this));\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::AnimationStateGraphAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::AnimationStateGraphAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AnimationStateGraphAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::AnimationStateGraphAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationStateGraphAsset, o2__AnimationStateGraphAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/AnimationStateGraphAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Animation/AnimationStateGraph.h\"\n\nnamespace o2\n{\n    // -----------\n    // Atlas asset\n    // -----------\n    class AnimationStateGraphAsset: public AssetWithDefaultMeta<AnimationStateGraphAsset>\n    {\n    public:\n        PROPERTIES(AnimationStateGraphAsset);\n\n\t\tFunction<void(const String& stateName)>               onInitialStateChanged; // Called when initial state changed \n\t\tFunction<void(const Ref<AnimationGraphState>& state)> onStateAdded;          // Called when state added\n\t\tFunction<void(const Ref<AnimationGraphState>& state)> onStateRemoved;        // Called when state removed\n\n    public:\n        // Default constructor\n        AnimationStateGraphAsset();\n\n\t\t// Default constructor with reference counter\n\t\texplicit AnimationStateGraphAsset(RefCounter* refCounter);\n\n        // Copy-constructor\n        AnimationStateGraphAsset(const AnimationStateGraphAsset& other);\n\n\t\t// Copy-constructor with reference counter\n\t\tAnimationStateGraphAsset(RefCounter* refCounter, const AnimationStateGraphAsset& other);\n\n        // Destructor\n        ~AnimationStateGraphAsset() override;\n\n        // Check equals operator\n        AnimationStateGraphAsset& operator=(const AnimationStateGraphAsset& asset);\n\n        // Sets initial state\n        void SetInitialState(const String& name);\n\n        // Returns initial state\n        const String& GetInitialState() const;\n\n        // Adds state to graph\n        Ref<AnimationGraphState> AddState(const Ref<AnimationGraphState>& state);\n\n        // Adds state to graph\n        Ref<AnimationGraphState> AddState(const Vector<String>& animations);\n\n        // Removes state from graph\n        void RemoveState(const Ref<AnimationGraphState>& state);\n\n        // Removes state from graph\n        void RemoveState(const String& name);\n\n        // Removes all states from graph\n        void RemoveAllStates();\n\n        // Returns state by name\n        Ref<AnimationGraphState> GetState(const String& name);\n\n        // Returns state by UID\n        Ref<AnimationGraphState> GetState(const UID& uid);\n\n        // Returns all states\n        const Vector<Ref<AnimationGraphState>>& GetStates() const;\n\n        // Returns all states names\n        Vector<String> GetStatesNames() const;\n\n        // Calculates path between two states\n        Vector<Ref<AnimationGraphTransition>> CalculatePath(const Ref<AnimationGraphState>& from, const Ref<AnimationGraphState>& to);\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 97; }\n\n        // Returns editor icon\n        static String GetEditorIcon() { return \"ui/UI4_graph_icon.png\"; }\n\n        // Is this asset type is available to create from editor's assets window\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        // Is asset reference available to contain instance inside\n        static bool IsReferenceCanOwnInstance() { return true; }\n\n        SERIALIZABLE(AnimationStateGraphAsset);\n        CLONEABLE_REF(AnimationStateGraphAsset);\n\n    protected:\n\t\tString mInitialState; // Initial state name @SERIALIZABLE @EDITOR_PROPERTY()\n\n        Vector<Ref<AnimationGraphState>> mStates; // Animation graph states @SERIALIZABLE @EDITOR_PROPERTY()\n\n    protected:\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationStateGraphAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<AnimationStateGraphAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationStateGraphAsset)\n{\n    FIELD().PUBLIC().NAME(onInitialStateChanged);\n    FIELD().PUBLIC().NAME(onStateAdded);\n    FIELD().PUBLIC().NAME(onStateRemoved);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mInitialState);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mStates);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationStateGraphAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationStateGraphAsset&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AnimationStateGraphAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialState, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetInitialState);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationGraphState>, AddState, const Ref<AnimationGraphState>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationGraphState>, AddState, const Vector<String>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveState, const Ref<AnimationGraphState>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveState, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllStates);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationGraphState>, GetState, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationGraphState>, GetState, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<AnimationGraphState>>&, GetStates);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<String>, GetStatesNames);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<AnimationGraphTransition>>, CalculatePath, const Ref<AnimationGraphState>&, const Ref<AnimationGraphState>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsReferenceCanOwnInstance);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/AtlasAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AtlasAsset.h\"\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    AtlasAsset::PlatformMeta AtlasAsset::Meta::GetResultPlatformMeta(Platform platform) const\n    {\n        PlatformMeta res = common;\n\n        switch (platform)\n        {\n            case Platform::iOS: if (ios) res = *ios; break;\n            case Platform::Android: if (android) res = *android; break;\n            case Platform::Mac: if (macOS) res = *macOS; break;\n            case Platform::Windows: if (windows) res = *windows; break;\n            case Platform::Linux: if (linuxOS) res = *linuxOS; break;\n        }\n\n        return res;\n    }\n\n    bool AtlasAsset::Meta::IsEqual(AssetMeta* other) const\n    {\n        if (!AssetMeta::IsEqual(other))\n            return false;\n\n        Meta* otherMeta = (Meta*)other;\n\n        if (!(common == otherMeta->common))\n            return false;\n\n        auto comparePlatformMeta = [](const Ref<PlatformMeta>& a, const Ref<PlatformMeta>& b)\n        {\n            if (a && b)\n            {\n                if (!(*a == *b))\n                    return false;\n            }\n            else if (a || b)\n                return false;\n\n            return true;\n        };\n\n        if (!comparePlatformMeta(ios, otherMeta->ios) ||\n            !comparePlatformMeta(android, otherMeta->android) ||\n            !comparePlatformMeta(macOS, otherMeta->macOS) ||\n            !comparePlatformMeta(windows, otherMeta->windows) ||\n            !comparePlatformMeta(linuxOS, otherMeta->linuxOS))\n        {\n            return false;\n        }\n\n        return true;\n    }\n\n    UInt AtlasAsset::Page::ID() const\n    {\n        return mId;\n    }\n\n    Vec2I AtlasAsset::Page::Size() const\n    {\n        return mSize;\n    }\n\n    TextureRef AtlasAsset::Page::GetTexture() const\n    {\n        return mTexture;\n    }\n\n    String AtlasAsset::Page::GetTextureFileName() const\n    {\n        return AtlasAsset::GetPageTextureFileName(mOwner.Lock()->mInfo, mId);\n    }\n\n    const Map<UID, RectI>& AtlasAsset::Page::ImagesRects() const\n    {\n        return mImagesRects;\n    }\n\n    bool AtlasAsset::Page::operator==(const Page& other) const\n    {\n        return mId == other.mId;\n    }\n\n    AtlasAsset::AtlasAsset() :\n        Asset(mmake<Meta>())\n    {}\n\n    AtlasAsset::AtlasAsset(const AtlasAsset& other) :\n        Asset(other), mImages(other.mImages), mPages(other.mPages)\n    {\n        for (auto& page : mPages)\n            page.mOwner = WeakRef(this);\n    }\n\n    AtlasAsset::~AtlasAsset()\n    {\n        o2Render.OnAtlasDestroyed(this);\n    }\n\n    void AtlasAsset::PostRefConstruct()\n    {\n        Asset::PostRefConstruct();\n        o2Render.OnAtlasCreated(this);\n    }\n\n    void AtlasAsset::OnDeserialized(const DataValue& node)\n    {\n        for (auto& page : mPages)\n        {\n            page.mOwner = WeakRef(this);\n            page.mTexture = GetPageTextureRef(mInfo, page.mId);\n        }\n    }\n\n    AtlasAsset& AtlasAsset::operator=(const AtlasAsset& other)\n    {\n        Asset::operator=(other);\n\n        mImages = other.mImages;\n        mPages = other.mPages;\n\n        return *this;\n    }\n\n    TextureSource AtlasAsset::GetSpriteSource(const AssetRef<ImageAsset>& image)\n    {\n        for (auto& page : mPages)\n        {\n            auto fnd = page.mImagesRects.find(image->GetUID());\n            if (fnd != page.mImagesRects.end())\n            {\n                return { page.mTexture, fnd->second };\n            }\n        }\n\n        return {};\n    }\n\n    const Vector<AssetRef<ImageAsset>>& AtlasAsset::GetImages() const\n    {\n        return mImages;\n    }\n\n    const Vector<AtlasAsset::Page>& AtlasAsset::GetPages() const\n    {\n        return mPages;\n    }\n\n    bool AtlasAsset::ContainsImage(const AssetRef<ImageAsset>& image)\n    {\n        return mImages.Contains(image);\n    }\n\n    void AtlasAsset::AddImage(const AssetRef<ImageAsset>& image)\n    {\n        if (!mImages.Contains(image))\n            mImages.Add(image);\n    }\n\n    void AtlasAsset::RemoveImage(const AssetRef<ImageAsset>& image)\n    {\n        mImages.Remove(image);\n    }\n\n    void AtlasAsset::RemoveAllImages()\n    {\n        mImages.Clear();\n    }\n\n    void AtlasAsset::ReloadPages()\n    {\n        Reload();\n\n        for (auto& img : mImages)\n            img->Reload();\n    }\n\n    Ref<AtlasAsset::Meta> AtlasAsset::GetMeta() const\n    {\n        return DynamicCast<Meta>(mInfo.meta);\n    }\n\n    Vector<String> AtlasAsset::GetFileExtensions()\n    {\n        return { \"atlas\" };\n    }\n\n    String AtlasAsset::GetPageTextureFileName(const AssetInfo& atlasInfo, UInt pageIdx)\n    {\n        auto meta = DynamicCast<AtlasAsset::Meta>(atlasInfo.meta);\n        String extension = Texture::formatFileExtensions.Get(meta->GetResultPlatformMeta(::GetEnginePlatform()).format);\n        return (atlasInfo.tree ? atlasInfo.tree.Lock()->builtAssetsPath : String()) + atlasInfo.path + (String)pageIdx + \".\" + extension;\n    }\n\n    TextureRef AtlasAsset::GetPageTextureRef(const AssetInfo& atlasInfo, UInt pageIdx)\n    {\n        return TextureRef(GetPageTextureFileName(atlasInfo, pageIdx));\n    }\n\n    bool AtlasAsset::PlatformMeta::operator==(const PlatformMeta& other) const\n    {\n        return maxSize == other.maxSize && format == other.format;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::AtlasAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AtlasAsset>);\n// --- META ---\n\nDECLARE_CLASS(o2::AtlasAsset, o2__AtlasAsset);\n\nDECLARE_CLASS(o2::AtlasAsset::PlatformMeta, o2__AtlasAsset__PlatformMeta);\n\nDECLARE_CLASS(o2::AtlasAsset::Meta, o2__AtlasAsset__Meta);\n\nDECLARE_CLASS(o2::AtlasAsset::Page, o2__AtlasAsset__Page);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/AtlasAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/TextureSource.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // -----------\n    // Atlas asset\n    // -----------\n    class AtlasAsset: public Asset\n    {\n    public: \n        class Meta;\n        class Page;\n\n    public:\n        PROPERTIES(AtlasAsset);\n        GETTER(Ref<Meta>, meta, GetMeta);                 // Meta information getter\n        GETTER(Vector<AssetRef<ImageAsset>>, images, GetImages); // Images assets getter\n        GETTER(Vector<Page>, pages, GetPages);            // Pages getter\n\n    public:\n        // Default constructor\n        AtlasAsset();\n\n        // Copy-constructor\n        AtlasAsset(const AtlasAsset& asset);\n\n        // Destructor\n        ~AtlasAsset() override;\n\n        // Check equals operator\n        AtlasAsset& operator=(const AtlasAsset& asset);\n\n        // Returns atlas sprite source\n        TextureSource GetSpriteSource(const AssetRef<ImageAsset>& image);\n\n        // Returns containing images assets\n        const Vector<AssetRef<ImageAsset>>& GetImages() const;\n\n        // Returns pages array\n        const Vector<Page>& GetPages() const;\n\n        // Is contains image\n        bool ContainsImage(const AssetRef<ImageAsset>& image);\n\n        // Adds image to atlas\n        void AddImage(const AssetRef<ImageAsset>& image);\n\n        // Removes image from atlas\n        void RemoveImage(const AssetRef<ImageAsset>& image);\n\n        // Removes all images from atlas\n        void RemoveAllImages();\n\n        // Reloads pages textures\n        void ReloadPages();\n\n        // Returns meta information\n        Ref<Meta> GetMeta() const;\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns atlas page's texture file name\n        static String GetPageTextureFileName(const AssetInfo& atlasInfo, UInt pageIdx);\n\n        // Returns atlas page's texture reference\n        static TextureRef GetPageTextureRef(const AssetInfo& atlasInfo, UInt pageIdx);\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 97; }\n\n        // Is this asset type is available to create from editor's assets window\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        ASSET_TYPE(AtlasAsset, Meta);\n\n    public:\n        // -----------------------------------\n        // Platform specified meta information\n        // -----------------------------------\n        struct PlatformMeta: public ISerializable, public RefCounterable, public ICloneableRef\n        {\n            Vec2I         maxSize = Vec2I(2048, 2048); // Maximal atlas size @SERIALIZABLE\n            TextureFormat format = TextureFormat::R8G8B8A8;  // Atlas format @SERIALIZABLE\n            int           border = 0;                        // Images pack border @SERIALIZABLE\n\n            bool operator==(const PlatformMeta& other) const;\n\n            SERIALIZABLE(PlatformMeta);\n            CLONEABLE_REF(PlatformMeta);\n        };\n\n        // ----------------\n        // Meta information\n        // ----------------\n        class Meta: public DefaultAssetMeta<AtlasAsset>\n        {\n        public:\n            PlatformMeta common; // Common meta @SERIALIZABLE\n\n            Ref<PlatformMeta> ios = nullptr;     // IOS specified meta @SERIALIZABLE\n            Ref<PlatformMeta> android = nullptr; // Android specified meta @SERIALIZABLE\n            Ref<PlatformMeta> macOS = nullptr;   // MacOS specified meta @SERIALIZABLE\n            Ref<PlatformMeta> windows = nullptr; // Windows specified meta @SERIALIZABLE\n            Ref<PlatformMeta> linuxOS = nullptr; // Linux specified meta @SERIALIZABLE\n\n        public:\n            // Returns platform meta for specified platform\n            PlatformMeta GetResultPlatformMeta(Platform platform) const;\n\n            // Returns true if other meta is equal to this\n            bool IsEqual(AssetMeta* other) const override;\n\n            SERIALIZABLE(Meta);\n            CLONEABLE_REF(Meta);\n        };\n\n        // ----------\n        // Atlas page\n        // ----------\n        class Page: public ISerializable\n        {\n        public:\n            // Returns number\n            UInt ID() const;\n\n            // Returns size\n            Vec2I Size() const;\n\n            // Returns texture reference\n            TextureRef GetTexture() const;\n\n            // Returns texture file name\n            String GetTextureFileName() const;\n\n            // Returns images rectangles\n            const Map<UID, RectI>& ImagesRects() const;\n\n            // Check equal operator\n            bool operator==(const Page& other) const;\n\n            SERIALIZABLE(Page);\n\n        private:\n            UInt  mId;   // Page number @SERIALIZABLE\n            Vec2I mSize; // Size of page @SERIALIZABLE\n\n            Map<UID, RectI> mImagesRects; // Images source rectangles @SERIALIZABLE\n            TextureRef      mTexture;     // Page texture\n\n            WeakRef<AtlasAsset> mOwner; // Owner atlas\n\n            friend class AtlasAssetConverter;\n            friend class AtlasAsset;\n        };\n\n    protected:\n        Vector<AssetRef<ImageAsset>>  mImages;  // Loaded image infos @SERIALIZABLE @EDITOR_PROPERTY\n        Vector<AssetRef<FolderAsset>> mFolders; // Folders, included in atlas @SERIALIZABLE @EDITOR_PROPERTY\n\n        Vector<Page> mPages; // Pages @SERIALIZABLE\n\n    protected:\n        // It is called after reference initialization at object construction, registers atlas in render\n        void PostRefConstruct();\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        friend class Assets;\n        friend class ImageAsset;\n\n        FRIEND_REF_MAKE();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AtlasAsset)\n{\n    BASE_CLASS(o2::Asset);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AtlasAsset)\n{\n    FIELD().PUBLIC().NAME(meta);\n    FIELD().PUBLIC().NAME(images);\n    FIELD().PUBLIC().NAME(pages);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mImages);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mFolders);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mPages);\n}\nEND_META;\nCLASS_METHODS_META(o2::AtlasAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AtlasAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(TextureSource, GetSpriteSource, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<AssetRef<ImageAsset>>&, GetImages);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Page>&, GetPages);\n    FUNCTION().PUBLIC().SIGNATURE(bool, ContainsImage, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddImage, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveImage, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllImages);\n    FUNCTION().PUBLIC().SIGNATURE(void, ReloadPages);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Meta>, GetMeta);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetPageTextureFileName, const AssetInfo&, UInt);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(TextureRef, GetPageTextureRef, const AssetInfo&, UInt);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostRefConstruct);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AtlasAsset::PlatformMeta)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AtlasAsset::PlatformMeta)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2I(2048, 2048)).NAME(maxSize);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(TextureFormat::R8G8B8A8).NAME(format);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(border);\n}\nEND_META;\nCLASS_METHODS_META(o2::AtlasAsset::PlatformMeta)\n{\n}\nEND_META;\n\nCLASS_BASES_META(o2::AtlasAsset::Meta)\n{\n    BASE_CLASS(o2::DefaultAssetMeta<AtlasAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AtlasAsset::Meta)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(common);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(ios);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(android);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(macOS);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(windows);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(linuxOS);\n}\nEND_META;\nCLASS_METHODS_META(o2::AtlasAsset::Meta)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(PlatformMeta, GetResultPlatformMeta, Platform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEqual, AssetMeta*);\n}\nEND_META;\n\nCLASS_BASES_META(o2::AtlasAsset::Page)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AtlasAsset::Page)\n{\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mId);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mSize);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mImagesRects);\n    FIELD().PRIVATE().NAME(mTexture);\n    FIELD().PRIVATE().NAME(mOwner);\n}\nEND_META;\nCLASS_METHODS_META(o2::AtlasAsset::Page)\n{\n\n    typedef const Map<UID, RectI>& _tmp1;\n\n    FUNCTION().PUBLIC().SIGNATURE(UInt, ID);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, Size);\n    FUNCTION().PUBLIC().SIGNATURE(TextureRef, GetTexture);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetTextureFileName);\n    FUNCTION().PUBLIC().SIGNATURE(_tmp1, ImagesRects);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/BinaryAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"BinaryAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    BinaryAsset::BinaryAsset()\n    {}\n\n    BinaryAsset::BinaryAsset(const BinaryAsset& other):\n        AssetWithDefaultMeta<BinaryAsset>(other)\n    {\n        if (other.mDataSize > 0)\n        {\n            mDataSize = other.mDataSize;\n            mData = mnew char[mDataSize];\n            memcpy(mData, other.mData, mDataSize);\n        }\n        else\n        {\n            mDataSize = 0;\n            mData = nullptr;\n        }\n    }\n\n    BinaryAsset::~BinaryAsset()\n    {\n        if (mData)\n            delete[] mData;\n    }\n\n    BinaryAsset& BinaryAsset::operator=(const BinaryAsset& other)\n    {\n        Asset::operator=(other);\n\n        if (mData)\n            delete[] mData;\n\n        if (other.mDataSize > 0)\n        {\n            mDataSize = other.mDataSize;\n            mData = mnew char[mDataSize];\n            memcpy(mData, other.mData, mDataSize);\n        }\n        else\n        {\n            mDataSize = 0;\n            mData = nullptr;\n        }\n\n        return *this;\n    }\n\n    char* BinaryAsset::GetData() const\n    {\n        return mData;\n    }\n\n    UInt BinaryAsset::GetDataSize() const\n    {\n        return mDataSize;\n    }\n\n    void BinaryAsset::SetData(char* data, UInt size)\n    {\n        if (mData)\n            delete[] mData;\n\n        if (size > 0)\n        {\n            mDataSize = size;\n            mData = mnew char[mDataSize];\n            memcpy(mData, data, mDataSize);\n        }\n        else\n        {\n            mDataSize = 0;\n            mData = nullptr;\n        }\n    }\n\n    Vector<String> BinaryAsset::GetFileExtensions()\n    {\n        return { \"bin\" };\n    }\n\n    void BinaryAsset::LoadData(const String& path)\n    {\n        InFile file(path);\n        if (!file.IsOpened())\n            GetAssetsLogStream()->Error(\"Failed to load binary asset data: can't open file \" + path);\n\n        mDataSize = file.GetDataSize();\n        mData = mnew char[mDataSize];\n        file.ReadFullData(mData);\n    }\n\n    void BinaryAsset::SaveData(const String& path) const\n    {\n        OutFile file(path);\n        if (mDataSize > 0 && mData)\n            file.WriteData(mData, mDataSize);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::BinaryAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::BinaryAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::BinaryAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::BinaryAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::BinaryAsset, o2__BinaryAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/BinaryAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n\nnamespace o2\n{\n    // -------------------\n    // Binary format asset\n    // -------------------\n    class BinaryAsset: public AssetWithDefaultMeta<BinaryAsset>\n    {\n    public:\n        PROPERTIES(BinaryAsset);\n        GETTER(char*, data, GetData);        // Data getter\n        GETTER(UInt, dataSize, GetDataSize); // Data size getter\n\n    public:\n        // Default constructor\n        BinaryAsset();\n\n        // Copy-constructor\n        BinaryAsset(const BinaryAsset& asset);\n\n        // Destructor\n        ~BinaryAsset();\n\n        // Check equals operator\n        BinaryAsset& operator=(const BinaryAsset& asset);\n\n        // Returns data pointer\n        char* GetData() const;\n\n        // Returns data size\n        UInt GetDataSize() const;\n\n        // Sets data and size\n        void SetData(char* data, UInt size);\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 96; }\n\n        SERIALIZABLE(BinaryAsset);\n        CLONEABLE_REF(BinaryAsset);\n\n    protected:\n        char* mData = nullptr; // Asset data\n        UInt  mDataSize = 0;   // Asset data size\n\n    protected:\n        // Loads asset data, using DataValue and serialization\n        void LoadData(const String& path) override;\n\n        // Saves asset data, using DataValue and serialization\n        void SaveData(const String& path) const override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::BinaryAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<BinaryAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::BinaryAsset)\n{\n    FIELD().PUBLIC().NAME(data);\n    FIELD().PUBLIC().NAME(dataSize);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mData);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mDataSize);\n}\nEND_META;\nCLASS_METHODS_META(o2::BinaryAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const BinaryAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(char*, GetData);\n    FUNCTION().PUBLIC().SIGNATURE(UInt, GetDataSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetData, char*, UInt);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/BitmapFontAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"BitmapFontAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Render/BitmapFont.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    BitmapFontAsset::BitmapFontAsset():\n        FontAsset(mmake<Meta>())\n    {}\n\n    BitmapFontAsset::BitmapFontAsset(const BitmapFontAsset& asset):\n        FontAsset(asset)\n    {}\n\n    BitmapFontAsset& BitmapFontAsset::operator=(const BitmapFontAsset& asset)\n    {\n        FontAsset::operator=(asset);\n        return *this;\n    }\n\n    Vector<String> BitmapFontAsset::GetFileExtensions()\n    {\n        return { \"fnt\" };\n    }\n\n    Ref<BitmapFontAsset::Meta> BitmapFontAsset::GetMeta() const\n    {\n        return DynamicCast<Meta>(mInfo.meta);\n    }\n\n    void BitmapFontAsset::LoadData(const String& path)\n    {\n        mFont = o2Render.mFonts.FindOrDefault([&](auto fnt) { return fnt->GetFileName() == path; });\n\n        if (!mFont)\n            mFont = mmake<BitmapFont>(path);\n    }\n}\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::BitmapFontAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::BitmapFontAsset>);\n// --- META ---\n\nDECLARE_CLASS(o2::BitmapFontAsset, o2__BitmapFontAsset);\n\nDECLARE_CLASS(o2::BitmapFontAsset::Meta, o2__BitmapFontAsset__Meta);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/BitmapFontAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/FontAsset.h\"\n\nnamespace o2\n{\n    // -----------------\n    // Bitmap font asset\n    // -----------------\n    class BitmapFontAsset: public FontAsset\n    {\n    public:\n        class Meta;\n\n    public:\n        PROPERTIES(BitmapFontAsset);\n        GETTER(Ref<Meta>, meta, GetMeta); // Meta information getter\n\n    public:\n        // Default constructor\n        BitmapFontAsset();\n\n        // Copy-constructor\n        BitmapFontAsset(const BitmapFontAsset& asset);\n\n        // Check equals operator\n        BitmapFontAsset& operator=(const BitmapFontAsset& asset);\n\n        // Returns meta information\n        Ref<Meta> GetMeta() const;\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 95; }\n\n        ASSET_TYPE(BitmapFontAsset, Meta);\n\n    public:\n        // ----------------\n        // Meta information\n        // ----------------\n        class Meta: public DefaultAssetMeta<BitmapFontAsset>\n        {\n        public:\n            SERIALIZABLE(Meta);\n            CLONEABLE_REF(Meta);\n        };\n\n    protected:\n        // Loads data\n        void LoadData(const String& path) override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::BitmapFontAsset)\n{\n    BASE_CLASS(o2::FontAsset);\n}\nEND_META;\nCLASS_FIELDS_META(o2::BitmapFontAsset)\n{\n    FIELD().PUBLIC().NAME(meta);\n}\nEND_META;\nCLASS_METHODS_META(o2::BitmapFontAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const BitmapFontAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Meta>, GetMeta);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::BitmapFontAsset::Meta)\n{\n    BASE_CLASS(o2::DefaultAssetMeta<BitmapFontAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::BitmapFontAsset::Meta)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::BitmapFontAsset::Meta)\n{\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/DataAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"DataAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n\nnamespace o2\n{\n    DataAsset::DataAsset()\n    {}\n\n    DataAsset::DataAsset(const DataAsset& other):\n        AssetWithDefaultMeta<DataAsset>(other), data(const_cast<DataDocument&>(other.data))\n    {}\n\n    DataAsset& DataAsset::operator=(const DataAsset& asset)\n    {\n        Asset::operator=(asset);\n        data = const_cast<DataDocument&>(asset.data);\n\n        return *this;\n    }\n\n    Vector<String> DataAsset::GetFileExtensions()\n    {\n        return { \"json\" };\n    }\n\n    void DataAsset::LoadData(const String& path)\n    {\n        data.Clear();\n        data.LoadFromFile(path);\n    }\n\n    void DataAsset::SaveData(const String& path) const\n    {\n        data.SaveToFile(path);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::DataAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::DataAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::DataAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::DataAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::DataAsset, o2__DataAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/DataAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n\nnamespace o2\n{\n    // ----------\n    // Data asset\n    // ----------\n    class DataAsset: public AssetWithDefaultMeta<DataAsset>\n    {\n    public:\n        DataDocument data; // Asset data\n\n    public:\n        // Default constructor\n        DataAsset();\n\n        // Copy-constructor\n        DataAsset(const DataAsset& asset);\n\n        // Check equals operator\n        DataAsset& operator=(const DataAsset& asset);\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor icon\n        static String GetEditorIcon() { return \"ui/UI4_big_text_file_icon.png\"; }\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 94; }\n\n        // Is this asset type is available to create from editor's assets window\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        SERIALIZABLE(DataAsset);\n        CLONEABLE_REF(DataAsset);\n\n    protected:\n        // Loads data\n        void LoadData(const String& path) override;\n\n        // Saves data\n        void SaveData(const String& path) const override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::DataAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<DataAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::DataAsset)\n{\n    FIELD().PUBLIC().NAME(data);\n}\nEND_META;\nCLASS_METHODS_META(o2::DataAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const DataAsset&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/FolderAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FolderAsset.h\"\n\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    FolderAsset::FolderAsset()\n    {}\n\n    FolderAsset::FolderAsset(const FolderAsset& asset):\n        AssetWithDefaultMeta<FolderAsset>(asset)\n    {}\n\n    FolderAsset& FolderAsset::operator=(const FolderAsset& asset)\n    {\n        Asset::operator=(asset);\n        return *this;\n    }\n\n    Vector<AssetRef<Asset>> FolderAsset::GetChildrenAssets() const\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        Vector<AssetRef<Asset>> res;\n\n        for (auto& asset : mInfo.GetChildren())\n        {\n            PROFILE_SAMPLE(\"Load sub asset\");\n            PROFILE_INFO(asset->path);\n\n            res.Add(AssetRef<Asset>(asset->meta->ID()));\n        }\n\n        return res;\n    }\n\n    void FolderAsset::LoadData(const String& path)\n    {}\n\n    void FolderAsset::SaveData(const String& path) const\n    {\n        if (!o2FileSystem.IsFolderExist(path))\n            o2FileSystem.FolderCreate(path);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::FolderAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::FolderAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::FolderAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::FolderAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::FolderAsset, o2__FolderAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/FolderAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n\nnamespace o2\n{\n    // ------------\n    // Folder asset\n    // ------------\n    class FolderAsset: public AssetWithDefaultMeta<FolderAsset>\n    {\n    public:\n        // Default constructor\n        FolderAsset();\n\n        // Copy-constructor\n        FolderAsset(const FolderAsset& asset);\n\n        // Check equals operator\n        FolderAsset& operator=(const FolderAsset& asset);\n\n        // Returns containing assets infos\n        Vector<AssetRef<Asset>> GetChildrenAssets() const;\n\n        // Returns editor icon\n        static String GetEditorIcon() { return \"ui/UI4_big_folder_icon.png\"; }\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 100; }\n\n        // Is this asset type is available to create from editor's assets window\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        SERIALIZABLE(FolderAsset);\n        CLONEABLE_REF(FolderAsset);\n\n    protected:\n        // Loads data\n        void LoadData(const String& path) override;\n\n        // Saves asset data\n        void SaveData(const String& path) const override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::FolderAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<FolderAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FolderAsset)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::FolderAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const FolderAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<AssetRef<Asset>>, GetChildrenAssets);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/FontAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FontAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    FontAsset::FontAsset():\n        Asset(nullptr)\n    {}\n\n    FontAsset::FontAsset(const FontAsset& other) :\n        Asset(other), mFont(other.mFont)\n    {}\n\n    FontAsset::FontAsset(const Ref<AssetMeta>& meta):\n        Asset(meta)\n    {}\n\n    Ref<Font> FontAsset::GetFont() const\n    {\n        return mFont;\n    }\n\n    FontAsset& FontAsset::operator=(const FontAsset& other)\n    {\n        Asset::operator=(other);\n        mFont = other.mFont;\n        return *this;\n    }\n}\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::FontAsset>);\n// --- META ---\n\nDECLARE_CLASS(o2::FontAsset, o2__FontAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/FontAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n#include \"o2/Render/Font.h\"\n\nnamespace o2\n{\n    // ----------\n    // Font asset\n    // ----------\n    class FontAsset: public Asset\n    {\n    public:\n        PROPERTIES(FontAsset);\n        GETTER(Ref<Font>, font, GetFont); // Font getter\n\n    public:\n        // Default constructor\n        FontAsset();\n\n        // Default constructor\n        FontAsset(const Ref<AssetMeta>& meta);\n\n        // Copy-constructor\n        FontAsset(const FontAsset& asset);\n\n        // Check equals operator\n        FontAsset& operator=(const FontAsset& asset);\n\n        // Returns font pointer\n        virtual Ref<Font> GetFont() const;\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 93; }\n\n        SERIALIZABLE(FontAsset);\n        CLONEABLE_REF(FontAsset);\n\n    protected:\n        Ref<Font> mFont;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::FontAsset)\n{\n    BASE_CLASS(o2::Asset);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FontAsset)\n{\n    FIELD().PUBLIC().NAME(font);\n    FIELD().PROTECTED().NAME(mFont);\n}\nEND_META;\nCLASS_METHODS_META(o2::FontAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<AssetMeta>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const FontAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Font>, GetFont);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/FragmentShaderAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FragmentShaderAsset.h\"\n\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    FragmentShaderAsset::FragmentShaderAsset():\n        ShaderAsset(mmake<Meta>())\n    {}\n\n    FragmentShaderAsset::FragmentShaderAsset(const FragmentShaderAsset& asset):\n        ShaderAsset(asset)\n    {}\n\n    FragmentShaderAsset& FragmentShaderAsset::operator=(const FragmentShaderAsset& asset)\n    {\n        ShaderAsset::operator=(asset);\n        return *this;\n    }\n\n    Ref<FragmentShaderAsset::Meta> FragmentShaderAsset::GetMeta() const\n    {\n        return DynamicCast<Meta>(mInfo.meta);\n    }\n\n    Vector<String> FragmentShaderAsset::GetFileExtensions()\n    {\n        return { \"frag\" };\n    }\n\n    void FragmentShaderAsset::LoadData(const String& path)\n    {\n        String sourcePath = Shader::ResolvePlatformSourcePath(path);\n        String source = o2FileSystem.ReadFile(sourcePath);\n\n        mShader = mmake<Shader>();\n        mShader->SetFileName(sourcePath);\n        mShader->Compile(source, Shader::Type::Fragment);\n\n#if IS_EDITOR\n        mShader->SetFileEditDate(o2FileSystem.GetFileInfo(sourcePath).editDate);\n#endif\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::FragmentShaderAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::FragmentShaderAsset>);\n// --- META ---\n\nDECLARE_CLASS(o2::FragmentShaderAsset, o2__FragmentShaderAsset);\n\nDECLARE_CLASS(o2::FragmentShaderAsset::Meta, o2__FragmentShaderAsset__Meta);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/FragmentShaderAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ShaderAsset.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------------------\n    // Fragment shader asset. Loads .fsh files and compiles them as\n    // fragment (pixel) shader stage.\n    // -----------------------------------------------------------------\n    class FragmentShaderAsset : public ShaderAsset\n    {\n    public:\n        class Meta;\n\n    public:\n        PROPERTIES(FragmentShaderAsset);\n        GETTER(Ref<Meta>, meta, GetMeta); // Meta information getter\n\n    public:\n        // Default constructor\n        FragmentShaderAsset();\n\n        // Copy-constructor\n        FragmentShaderAsset(const FragmentShaderAsset& asset);\n\n        // Assign operator\n        FragmentShaderAsset& operator=(const FragmentShaderAsset& asset);\n\n        // Returns meta information\n        Ref<Meta> GetMeta() const;\n\n        // Returns supported file extensions (.fsh)\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor icon for fragment shader asset\n        static String GetEditorIcon() { return \"ui/UI4_big_fragment_shader_icon.png\"; }\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 91; }\n\n        // Returns true because fragment shaders can be created from the editor\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        ASSET_TYPE(FragmentShaderAsset, Meta);\n\n    public:\n        // ----------------\n        // Meta information\n        // ----------------\n        class Meta : public DefaultAssetMeta<FragmentShaderAsset>\n        {\n        public:\n            SERIALIZABLE(Meta);\n            CLONEABLE_REF(Meta);\n        };\n\n    protected:\n        // Loads fragment shader source from file and compiles it\n        void LoadData(const String& path) override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::FragmentShaderAsset)\n{\n    BASE_CLASS(o2::ShaderAsset);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FragmentShaderAsset)\n{\n    FIELD().PUBLIC().NAME(meta);\n}\nEND_META;\nCLASS_METHODS_META(o2::FragmentShaderAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const FragmentShaderAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Meta>, GetMeta);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::FragmentShaderAsset::Meta)\n{\n    BASE_CLASS(o2::DefaultAssetMeta<FragmentShaderAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FragmentShaderAsset::Meta)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::FragmentShaderAsset::Meta)\n{\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/ImageAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ImageAsset.h\"\n\n#include \"o2/Assets/Types/AtlasAsset.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Utils/Bitmap/Bitmap.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\n//#undef LoadBitmap\n\nnamespace o2\n{\n    ImageAsset::ImageAsset():\n        Asset(mmake<Meta>())\n    {}\n\n    ImageAsset::ImageAsset(const ImageAsset& other):\n        Asset(other), mAtlasPage(other.mAtlasPage), mSourceRect(other.mSourceRect)\n    {\n        if (other.mBitmap)\n            mBitmap = Ref(other.mBitmap->Clone());\n        else\n            mBitmap = nullptr;\n\n        mAtlasPage = other.mAtlasPage;\n        mSourceRect = other.mSourceRect;\n    }\n\n    ImageAsset& ImageAsset::operator=(const ImageAsset& asset)\n    {\n        Asset::operator=(asset);\n\n        if (asset.mBitmap)\n            SetBitmap(asset.mBitmap);\n\n        mAtlasPage = asset.mAtlasPage;\n        mSourceRect = asset.mSourceRect;\n\n        return *this;\n    }\n\n    const Ref<Bitmap>& ImageAsset::GetBitmap()\n    {\n        if (!mBitmap)\n            LoadBitmap();\n\n        return mBitmap;\n    }\n\n    void ImageAsset::SetBitmap(Ref<Bitmap> bitmap)\n    {\n        mBitmap = bitmap;\n    }\n\n    UID ImageAsset::GetAtlasUID() const\n    {\n        return GetMeta()->atlasId;\n    }\n\n    void ImageAsset::SetAtlas(const UID& atlas)\n    {\n        AssetRef<ImageAsset> thisRef(GetUID());\n\n        if (auto prevAtlas = AssetRef<AtlasAsset>(GetMeta()->atlasId)) \n            prevAtlas->RemoveImage(thisRef);\n\n        GetMeta()->atlasId = atlas;\n\n        if (auto newAtlas = AssetRef<AtlasAsset>(GetMeta()->atlasId))\n            newAtlas->AddImage(thisRef);\n    }\n\n    bool ImageAsset::IsInAtlas() const\n    {\n        return GetAtlasUID() != UID::empty;\n    }\n\n    void ImageAsset::SetSliceBorder(const BorderI& border)\n    {\n        GetMeta()->sliceBorder = border;\n    }\n\n    BorderI ImageAsset::GetSliceBorder() const\n    {\n        return GetMeta()->sliceBorder;\n    }\n\n    void ImageAsset::SetDefaultMode(SpriteMode mode)\n    {\n        GetMeta()->defaultMode = mode;\n    }\n\n    SpriteMode ImageAsset::GetDefaultMode() const\n    {\n        return GetMeta()->defaultMode;\n    }\n\n    UInt ImageAsset::GetAtlasPage() const\n    {\n        return mAtlasPage;\n    }\n\n    RectI ImageAsset::GetAtlasRect() const\n    {\n        return mSourceRect;\n    }\n\n    Vec2F ImageAsset::GetSize() const\n    {\n        return mSourceRect.Size();\n    }\n\n    float ImageAsset::GetWidth() const\n    {\n        return GetSize().x;\n    }\n\n    float ImageAsset::GetHeight() const\n    {\n        return GetSize().y;\n    }\n\n    TextureSource ImageAsset::GetTextureSource() const\n    {\n        TextureRef texture; \n\n        if (!IsInAtlas())\n            texture = mTexture;\n        else\n        {\n            if (auto atlas = dynamic_cast<const AtlasAsset*>(mAtlas.Get()))\n            {\n                auto& pages = atlas->GetPages();\n                if (mAtlasPage < pages.Count())\n                    texture = pages[mAtlasPage].GetTexture();\n            }\n        }\n\n        return { texture, mSourceRect };\n    }\n\n    Ref<ImageAsset::Meta> ImageAsset::GetMeta() const\n    {\n        return DynamicCast<Meta>(mInfo.meta);\n    }\n\n    Vector<String> ImageAsset::GetFileExtensions()\n    {\n        return { \"png\", \"jpg\", \"bmp\" };\n    }\n\n    void ImageAsset::LoadData(const String& path)\n    {\n        if (!IsInAtlas())\n        {\n            mTexture = TextureRef(path);\n            mSourceRect = RectI(Vec2F(), mTexture->GetSize());\n            mAtlas = nullptr;\n        }\n        else\n        {\n            Asset::LoadData(path);\n            mAtlas = AssetRef<AtlasAsset>(GetAtlasUID());\n        }\n    }\n\n    void ImageAsset::SaveData(const String& path) const\n    {\n        if (mBitmap)\n            mBitmap->Save(GetFullPath(), Bitmap::ImageType::Png);\n    }\n\n    void ImageAsset::LoadBitmap()\n    {\n        String assetFullPath = GetFullPath();\n        mBitmap->Load(assetFullPath);\n    }\n\n    bool ImageAsset::PlatformMeta::operator==(const PlatformMeta& other) const\n    {\n        return format == other.format;\n    }\n\n    ImageAsset::PlatformMeta ImageAsset::Meta::GetResultPlatformMeta(Platform platform) const\n    {\n        PlatformMeta res = common;\n\n        switch (platform)\n        {\n            case Platform::iOS: if (ios) res = *ios; break;\n            case Platform::Android: if (android) res = *android; break;\n            case Platform::Mac: if (macOS) res = *macOS; break;\n            case Platform::Windows: if (windows) res = *windows; break;\n            case Platform::Linux: if (linuxOS) res = *linuxOS; break;\n        }\n\n        return res;\n    }\n\n    bool ImageAsset::Meta::IsEqual(AssetMeta* other) const\n    {\n        if (!AssetMeta::IsEqual(other))\n            return false;\n\n        Meta* otherMeta = (Meta*)other;\n        if (atlasId != otherMeta->atlasId ||\n            sliceBorder != otherMeta->sliceBorder ||\n            defaultMode != otherMeta->defaultMode)\n        {\n            return false;\n        }\n\n        if (!(common == otherMeta->common))\n            return false;\n\n        auto comparePlatformMeta = [](const Ref<PlatformMeta>& a, const Ref<PlatformMeta>& b)\n        {\n            if (a && b)\n            {\n                if (!(*a == *b))\n                    return false;\n            }\n            else if (a || b)\n                return false;\n\n            return true;\n        };\n\n        if (!comparePlatformMeta(ios, otherMeta->ios) ||\n            !comparePlatformMeta(android, otherMeta->android) ||\n            !comparePlatformMeta(macOS, otherMeta->macOS) ||\n            !comparePlatformMeta(windows, otherMeta->windows) ||\n            !comparePlatformMeta(linuxOS, otherMeta->linuxOS))\n        {\n            return false;\n        }\n\n        return true;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::ImageAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::ImageAsset>);\n// --- META ---\n\nDECLARE_CLASS(o2::ImageAsset, o2__ImageAsset);\n\nDECLARE_CLASS(o2::ImageAsset::PlatformMeta, o2__ImageAsset__PlatformMeta);\n\nDECLARE_CLASS(o2::ImageAsset::Meta, o2__ImageAsset__Meta);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/ImageAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n#include \"o2/Render/TextureSource.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Bitmap/Bitmap.h\"\n\nnamespace o2\n{\n    // -----------\n    // Image asset\n    // -----------\n    class ImageAsset: public Asset\n    {\n    public:\n        class Meta;\n\n    public:\n        PROPERTIES(ImageAsset);\n        PROPERTY(Ref<Bitmap>, bitmap, SetBitmap, GetBitmap); // Bitmap data property\n\n        PROPERTY(BorderI, sliceBorder, SetSliceBorder, GetSliceBorder);    // Slice border property\n        PROPERTY(SpriteMode, defaultMode, SetDefaultMode, GetDefaultMode); // Sprite default mode property\n\n        PROPERTY(UID, atlas, SetAtlas, GetAtlasUID); // Atlas owner asset property\n        GETTER(UInt, atlasPage, GetAtlasPage);    // Atlas page index getter\n        GETTER(RectI, atlasRect, GetAtlasRect);   // Atlas source image rectangle getter\n\n        GETTER(Vec2F, size, GetSize);     // Image size getter\n        GETTER(float, width, GetWidth);   // Image width getter\n        GETTER(float, height, GetHeight); // Image height getter\n\n        GETTER(Ref<Meta>, meta, GetMeta); // Meta information getter\n\n    public:\n        // Default constructor\n        ImageAsset();\n\n        // Copy-constructor\n        ImageAsset(const ImageAsset& asset);\n\n        // Check equals operator\n        ImageAsset& operator=(const ImageAsset& asset);\n\n        // Returns bitmap data\n        const Ref<Bitmap>& GetBitmap();\n\n        // Sets bitmap data\n        void SetBitmap(Ref<Bitmap> bitmap);\n\n        // Returns atlas asset\n        UID GetAtlasUID() const;\n\n        // Sets atlas\n        void SetAtlas(const UID& atlas);\n\n        // Returns is in atlas @SCRIPTABLE\n        bool IsInAtlas() const;\n\n        // Sets slice border @SCRIPTABLE\n        void SetSliceBorder(const BorderI& border);\n\n        // Returns slice border @SCRIPTABLE\n        BorderI GetSliceBorder() const;\n\n        // Sets default sprite mode @SCRIPTABLE\n        void SetDefaultMode(SpriteMode mode);\n\n        // Returns default sprite mode @SCRIPTABLE\n        SpriteMode GetDefaultMode() const;\n\n        // Returns atlas page @SCRIPTABLE\n        UInt GetAtlasPage() const;\n\n        // Returns atlas source rectangle @SCRIPTABLE\n        RectI GetAtlasRect() const;\n\n        // Returns image size @SCRIPTABLE\n        Vec2F GetSize() const;\n\n        // Returns image width @SCRIPTABLE\n        float GetWidth() const;\n\n        // Returns image height @SCRIPTABLE\n        float GetHeight() const;\n\n        // Returns atlas sprite source @SCRIPTABLE\n        TextureSource GetTextureSource() const;\n\n        // Returns meta information @SCRIPTABLE\n        Ref<Meta> GetMeta() const;\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        ASSET_TYPE(ImageAsset, Meta);\n\n    public:\n        // -----------------------\n        // Platform specified meta\n        // -----------------------\n        struct PlatformMeta: public ISerializable, public RefCounterable, public ICloneableRef\n        {\n            TextureFormat format = TextureFormat::R8G8B8A8; // Texture format @SERIALIZABLE\n\n            bool operator==(const PlatformMeta& other) const;\n\n            SERIALIZABLE(PlatformMeta);\n            CLONEABLE_REF(PlatformMeta);\n        };\n\n        // ----------------\n        // Meta information\n        // ----------------\n        class Meta: public DefaultAssetMeta<ImageAsset>\n        {\n        public:\n            UID atlasId = UID::empty; // Atlas owner id @SERIALIZABLE\n\n            PlatformMeta common; // Common platform meta @SERIALIZABLE\n\n            Ref<PlatformMeta> ios = nullptr;     // IOS specified meta @SERIALIZABLE\n            Ref<PlatformMeta> android = nullptr; // Android specified meta @SERIALIZABLE\n            Ref<PlatformMeta> macOS = nullptr;   // MacOS specified meta @SERIALIZABLE\n            Ref<PlatformMeta> windows = nullptr; // Windows specified meta @SERIALIZABLE\n            Ref<PlatformMeta> linuxOS = nullptr; // Linux specified meta @SERIALIZABLE\n\n            BorderI    sliceBorder;          // Default slice border @SERIALIZABLE @EDITOR_IGNORE\n            SpriteMode defaultMode;          // Default sprite mode @SERIALIZABLE @EDITOR_IGNORE\n\n        public:\n            // Returns platform meta for specified platform\n            PlatformMeta GetResultPlatformMeta(Platform platform) const;\n\n            // Returns true if other meta is equal to this\n            bool IsEqual(AssetMeta* other) const override;\n\n            SERIALIZABLE(Meta);\n            CLONEABLE_REF(Meta);\n        };\n\n    protected:\n        Ref<Bitmap> mBitmap = nullptr; // Image bitmap. Loading only when needs\n\n        TextureRef mTexture; // Texture reference, if image is not in atlas, it loads texture\n\n        AssetRef<Asset> mAtlas; // Owner atlas\n\n        UInt  mAtlasPage; // Owner atlas page index @SERIALIZABLE\n        RectI mSourceRect; // Owner atlas rectangle @SERIALIZABLE\n\n    protected:\n        // Loads texture if image is not in atlas, otherwise loads serializable data\n        void LoadData(const String& path) override;\n\n        // Saves data\n        void SaveData(const String& path) const override;\n\n        // Load bitmap\n        void LoadBitmap();\n\n        friend class AtlasAsset;\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ImageAsset)\n{\n    BASE_CLASS(o2::Asset);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ImageAsset)\n{\n    FIELD().PUBLIC().NAME(bitmap);\n    FIELD().PUBLIC().NAME(sliceBorder);\n    FIELD().PUBLIC().NAME(defaultMode);\n    FIELD().PUBLIC().NAME(atlas);\n    FIELD().PUBLIC().NAME(atlasPage);\n    FIELD().PUBLIC().NAME(atlasRect);\n    FIELD().PUBLIC().NAME(size);\n    FIELD().PUBLIC().NAME(width);\n    FIELD().PUBLIC().NAME(height);\n    FIELD().PUBLIC().NAME(meta);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mBitmap);\n    FIELD().PROTECTED().NAME(mTexture);\n    FIELD().PROTECTED().NAME(mAtlas);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mAtlasPage);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSourceRect);\n}\nEND_META;\nCLASS_METHODS_META(o2::ImageAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ImageAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Bitmap>&, GetBitmap);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBitmap, Ref<Bitmap>);\n    FUNCTION().PUBLIC().SIGNATURE(UID, GetAtlasUID);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAtlas, const UID&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsInAtlas);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetSliceBorder, const BorderI&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(BorderI, GetSliceBorder);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetDefaultMode, SpriteMode);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(SpriteMode, GetDefaultMode);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(UInt, GetAtlasPage);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(RectI, GetAtlasRect);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetSize);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetWidth);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetHeight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(TextureSource, GetTextureSource);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Meta>, GetMeta);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadBitmap);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ImageAsset::PlatformMeta)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ImageAsset::PlatformMeta)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(TextureFormat::R8G8B8A8).NAME(format);\n}\nEND_META;\nCLASS_METHODS_META(o2::ImageAsset::PlatformMeta)\n{\n}\nEND_META;\n\nCLASS_BASES_META(o2::ImageAsset::Meta)\n{\n    BASE_CLASS(o2::DefaultAssetMeta<ImageAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ImageAsset::Meta)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(UID::empty).NAME(atlasId);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(common);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(ios);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(android);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(macOS);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(windows);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(linuxOS);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(sliceBorder);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(defaultMode);\n}\nEND_META;\nCLASS_METHODS_META(o2::ImageAsset::Meta)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(PlatformMeta, GetResultPlatformMeta, Platform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEqual, AssetMeta*);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/JavaScriptAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"JavaScriptAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    JavaScriptAsset::JavaScriptAsset()\n    {}\n\n    JavaScriptAsset::JavaScriptAsset(const JavaScriptAsset& other):\n        AssetWithDefaultMeta<JavaScriptAsset>(other)\n    {}\n\n    ScriptParseResult JavaScriptAsset::Parse() const\n    {\n        InFile file(GetBuiltFullPath());\n        if (!file.IsOpened())\n        {\n            o2Debug.LogError(\"Failed to load script asset \" + GetBuiltFullPath());\n            return ScriptParseResult();\n        }\n\n        return o2Scripts.Parse(file.ReadFullData(), GetAssetsRootPath() + mInfo.path);\n    }\n\n    ScriptValue JavaScriptAsset::Run() const\n    {\n        auto parseRes = Parse();\n        if (parseRes.IsOk())\n            return o2Scripts.Run(parseRes);\n\n        return ScriptValue();\n    }\n\n    JavaScriptAsset& JavaScriptAsset::operator=(const JavaScriptAsset& asset)\n    {\n        Asset::operator=(asset);\n        return *this;\n    }\n\n    Vector<String> JavaScriptAsset::GetFileExtensions()\n    {\n        return { \"js\" };\n    }\n\n    String JavaScriptAsset::GetEditorIcon()\n    {\n        return \"ui/UI4_big_js_file_icon.png\";\n    }\n\n    int JavaScriptAsset::GetEditorSorting()\n    {\n        return 94;\n    }\n\n    void JavaScriptAsset::LoadData(const String& path)\n    {\n    }\n\n    void JavaScriptAsset::SaveData(const String& path) const\n    {\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::JavaScriptAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::JavaScriptAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::JavaScriptAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::JavaScriptAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::JavaScriptAsset, o2__JavaScriptAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/JavaScriptAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scripts/ScriptEngine.h\"\n#endif\n\nnamespace o2\n{\n    // -----------------\n    // Java Script asset\n    // -----------------\n    class JavaScriptAsset: public AssetWithDefaultMeta<JavaScriptAsset>\n    {\n    public:\n        // Default constructor\n        JavaScriptAsset();\n\n        // Copy-constructor\n        JavaScriptAsset(const JavaScriptAsset& asset);\n\n        // Check equals operator\n        JavaScriptAsset& operator=(const JavaScriptAsset& asset);\n\n        // Parse script and return parse result\n        ScriptParseResult Parse() const;\n\n        // Runs script and returns result\n        ScriptValue Run() const;\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor icon\n        static String GetEditorIcon();\n\n        // Returns editor sorting weight\n        static int GetEditorSorting();\n\n        // Is this asset type is available to create from editor's assets window\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        SERIALIZABLE(JavaScriptAsset);\n        CLONEABLE_REF(JavaScriptAsset);\n\n    protected:\n        // Loads data\n        void LoadData(const String& path) override;\n\n        // Saves data\n        void SaveData(const String& path) const override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::JavaScriptAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<JavaScriptAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::JavaScriptAsset)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::JavaScriptAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const JavaScriptAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(ScriptParseResult, Parse);\n    FUNCTION().PUBLIC().SIGNATURE(ScriptValue, Run);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/MaterialAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"MaterialAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n\nnamespace o2\n{\n    MaterialAsset::MaterialAsset():\n        AssetWithDefaultMeta<MaterialAsset>(),\n        Material()\n    {}\n\n    MaterialAsset::MaterialAsset(const MaterialAsset& asset):\n        AssetWithDefaultMeta<MaterialAsset>(asset),\n        Material(asset),\n        mVertexShaderAsset(asset.mVertexShaderAsset),\n        mFragmentShaderAsset(asset.mFragmentShaderAsset)\n    {\n        RebuildMaterial();\n    }\n\n    MaterialAsset& MaterialAsset::operator=(const MaterialAsset& asset)\n    {\n        Asset::operator=(asset);\n\n        mVertexShaderAsset = asset.mVertexShaderAsset;\n        mFragmentShaderAsset = asset.mFragmentShaderAsset;\n\n        Material::SetVertexShader(asset.Material::GetVertexShader());\n        Material::SetFragmentShader(asset.Material::GetFragmentShader());\n        SetTexture(asset.GetTexture());\n        Material::SetBlendMode(asset.Material::GetBlendMode());\n\n        mParams.Clear();\n        for (auto& param : asset.mParams)\n            mParams.Add(param->CloneAsRef<IShaderParam>());\n        mSamplers = asset.mSamplers;\n\n        RebuildMaterial();\n\n        return *this;\n    }\n\n    void MaterialAsset::SetVertexShader(const AssetRef<VertexShaderAsset>& shader)\n    {\n        mVertexShaderAsset = shader;\n        RebuildMaterial();\n    }\n\n    const AssetRef<VertexShaderAsset>& MaterialAsset::GetVertexShader() const\n    {\n        return mVertexShaderAsset;\n    }\n\n    void MaterialAsset::SetFragmentShader(const AssetRef<FragmentShaderAsset>& shader)\n    {\n        mFragmentShaderAsset = shader;\n        RebuildMaterial();\n    }\n\n    const AssetRef<FragmentShaderAsset>& MaterialAsset::GetFragmentShader() const\n    {\n        return mFragmentShaderAsset;\n    }\n\n    Vector<String> MaterialAsset::GetFileExtensions()\n    {\n        return { \"mat\" };\n    }\n\n    Ref<RefCounterable> MaterialAsset::CastToRefCounterable(const Ref<MaterialAsset>& ref)\n    {\n        return DynamicCast<Asset>(ref);\n    }\n\n    void MaterialAsset::RebuildMaterial()\n    {\n        if (mVertexShaderAsset && mVertexShaderAsset->GetShader())\n            Material::SetVertexShader(mVertexShaderAsset->GetShader());\n        else\n            Material::SetVertexShader(Ref<Shader>());\n\n        if (mFragmentShaderAsset && mFragmentShaderAsset->GetShader())\n            Material::SetFragmentShader(mFragmentShaderAsset->GetShader());\n        else\n            Material::SetFragmentShader(Ref<Shader>());\n\n        Build();\n    }\n\n\tvoid MaterialAsset::OnDeserialized(const DataValue& node)\n\t{\n\t\tRebuildMaterial();\n\t}\n\n\tvoid MaterialAsset::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n\t{\n        OnDeserialized(node);\n\t}\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::MaterialAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::MaterialAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::MaterialAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::MaterialAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::MaterialAsset, o2__MaterialAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/MaterialAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n#include \"o2/Assets/Types/VertexShaderAsset.h\"\n#include \"o2/Assets/Types/FragmentShaderAsset.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------------------\n    // Material asset. Inherits Material and adds asset serialization for\n    // vertex/fragment shader references. The asset itself IS the material.\n    // -----------------------------------------------------------------\n    class MaterialAsset : public AssetWithDefaultMeta<MaterialAsset>, public Material\n    {\n    public:\n        REF_COUNTERABLE_IMPL(Asset, Material);\n\n        PROPERTIES(MaterialAsset);\n\t\tPROPERTY(AssetRef<VertexShaderAsset>, vertexShader, SetVertexShader, GetVertexShader);         // Vertex shader asset reference @EDITOR_PROPERTY\n\t\tPROPERTY(AssetRef<FragmentShaderAsset>, fragmentShader, SetFragmentShader, GetFragmentShader); // Fragment shader asset reference @EDITOR_PROPERTY\n\n        template<typename _cast_type>\n        Ref<_cast_type> CloneAsRef() const\n        {\n            return this->AssetWithDefaultMeta<MaterialAsset>::template CloneAsRef<_cast_type>();\n        }\n\n    public:\n        // Default constructor\n        MaterialAsset();\n\n        // Copy-constructor\n        MaterialAsset(const MaterialAsset& asset);\n\n        // Assign operator\n        MaterialAsset& operator=(const MaterialAsset& asset);\n\n        // Sets the vertex shader asset reference and rebuilds the material\n        void SetVertexShader(const AssetRef<VertexShaderAsset>& shader);\n\n        // Returns the vertex shader asset reference\n        const AssetRef<VertexShaderAsset>& GetVertexShader() const;\n\n        // Sets the fragment shader asset reference and rebuilds the material\n        void SetFragmentShader(const AssetRef<FragmentShaderAsset>& shader);\n\n        // Returns the fragment shader asset reference\n        const AssetRef<FragmentShaderAsset>& GetFragmentShader() const;\n\n        // Returns supported file extensions (.mat)\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor icon for material asset\n        static String GetEditorIcon() { return \"ui/UI4_big_material_icon.png\"; }\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 89; }\n\n        // Returns true because materials can be created from the editor\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        // Is asset reference available to contain instance inside\n        static bool IsReferenceCanOwnInstance() { return true; }\n\n        // Resolves RefCounterable ambiguity for CloneRef (uses Asset base)\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<MaterialAsset>& ref);\n\n        ASSET_TYPE(MaterialAsset, Meta);\n\n    protected:\n        AssetRef<VertexShaderAsset>   mVertexShaderAsset;   // Vertex shader asset reference @SERIALIZABLE\n        AssetRef<FragmentShaderAsset> mFragmentShaderAsset; // Fragment shader asset reference @SERIALIZABLE\n\n    protected:\n        // Builds the material from current shader assets and parameters\n        void RebuildMaterial();\n\n        // Disambiguate On* callbacks from diamond ISerializable inheritance\n        void OnSerialize(DataValue& node) const override {}\n        void OnDeserialized(const DataValue& node) override;\n        void OnSerializeDelta(DataValue& node, const IObject& origin) const override {}\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n    public:\n#if IS_SCRIPTING_SUPPORTED\n        // Disambiguate GetScriptValue from diamond IObject inheritance\n        ScriptValue GetScriptValue() const override { return this->Asset::GetScriptValue(); }\n#endif\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::MaterialAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<MaterialAsset>);\n    BASE_CLASS(o2::Material);\n}\nEND_META;\nCLASS_FIELDS_META(o2::MaterialAsset)\n{\n    FIELD().PUBLIC().EDITOR_PROPERTY_ATTRIBUTE().NAME(vertexShader);\n    FIELD().PUBLIC().EDITOR_PROPERTY_ATTRIBUTE().NAME(fragmentShader);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mVertexShaderAsset);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mFragmentShaderAsset);\n}\nEND_META;\nCLASS_METHODS_META(o2::MaterialAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const MaterialAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVertexShader, const AssetRef<VertexShaderAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<VertexShaderAsset>&, GetVertexShader);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFragmentShader, const AssetRef<FragmentShaderAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<FragmentShaderAsset>&, GetFragmentShader);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsReferenceCanOwnInstance);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<MaterialAsset>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildMaterial);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerializeDelta, DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n#if  IS_SCRIPTING_SUPPORTED\n    FUNCTION().PUBLIC().SIGNATURE(ScriptValue, GetScriptValue);\n#endif\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/SceneAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SceneAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    SceneAsset::SceneAsset()\n    {}\n\n    SceneAsset::SceneAsset(const SceneAsset& other):\n        AssetWithDefaultMeta<SceneAsset>(other)\n    {}\n\n    SceneAsset::~SceneAsset()\n    {}\n\n    SceneAsset& SceneAsset::operator=(const SceneAsset& other)\n    {\n        Asset::operator=(other);\n        return *this;\n    }\n\n    void SceneAsset::Load() const\n    {\n        if (GetPath().IsEmpty())\n            o2Scene.Clear();\n        else    \n            o2Scene.Load(GetBuiltFullPath());\n    }\n\n    Vector<String> SceneAsset::GetFileExtensions()\n    {\n        return { \"scn\" };\n    }\n\n    void SceneAsset::LoadData(const String& path)\n    {}\n\n    void SceneAsset::SaveData(const String& path) const\n    {\n        o2Scene.Save(path);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::SceneAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::SceneAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::SceneAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::SceneAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::SceneAsset, o2__SceneAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/SceneAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n\nnamespace o2\n{\n    // ----------- \n    // Scene asset \n    // ----------- \n    class SceneAsset: public AssetWithDefaultMeta<SceneAsset>\n    {\n    public:\n        // Default constructor\n        SceneAsset();\n\n        // Copy-constructor\n        SceneAsset(const SceneAsset& asset);\n\n        // Destructor\n        ~SceneAsset();\n\n        // Check equals operator\n        SceneAsset& operator=(const SceneAsset& asset);\n\n        // Loads the scene\n        void Load() const;\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 96; }\n\n        SERIALIZABLE(SceneAsset);\n        CLONEABLE_REF(SceneAsset);\n\n    protected:\n        // Loads asset data, using DataValue and serialization\n        void LoadData(const String& path) override;\n\n        // Saves asset data, using DataValue and serialization\n        void SaveData(const String& path) const override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::SceneAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<SceneAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SceneAsset)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::SceneAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const SceneAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Load);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/ShaderAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ShaderAsset.h\"\n\nnamespace o2\n{\n    ShaderAsset::ShaderAsset():\n        Asset()\n    {}\n\n    ShaderAsset::ShaderAsset(const Ref<AssetMeta>& meta):\n        Asset(meta)\n    {}\n\n    ShaderAsset::ShaderAsset(const ShaderAsset& asset):\n        Asset(asset),\n        mShader(asset.mShader)\n    {}\n\n    ShaderAsset& ShaderAsset::operator=(const ShaderAsset& asset)\n    {\n        Asset::operator=(asset);\n        mShader = asset.mShader;\n        return *this;\n    }\n\n    Ref<Shader> ShaderAsset::GetShader() const\n    {\n        return mShader;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::ShaderAsset>);\n// --- META ---\n\nDECLARE_CLASS(o2::ShaderAsset, o2__ShaderAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/ShaderAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n#include \"o2/Render/Shader.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------------------\n    // Base shader asset. Wraps a compiled shader render primitive.\n    // Derived types (VertexShaderAsset, FragmentShaderAsset) specify\n    // the shader stage and file extension.\n    // -----------------------------------------------------------------\n    class ShaderAsset : public Asset\n    {\n    public:\n        PROPERTIES(ShaderAsset);\n        GETTER(Ref<Shader>, shader, GetShader); // Underlying shader render primitive\n\n    public:\n        // Default constructor\n        ShaderAsset();\n\n        // Constructor with meta\n        ShaderAsset(const Ref<AssetMeta>& meta);\n\n        // Copy-constructor\n        ShaderAsset(const ShaderAsset& asset);\n\n        // Assign operator\n        ShaderAsset& operator=(const ShaderAsset& asset);\n\n        // Returns the underlying compiled shader render primitive\n        virtual Ref<Shader> GetShader() const;\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 90; }\n\n        SERIALIZABLE(ShaderAsset);\n        CLONEABLE_REF(ShaderAsset);\n\n    protected:\n        Ref<Shader> mShader; // Compiled shader render primitive\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ShaderAsset)\n{\n    BASE_CLASS(o2::Asset);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ShaderAsset)\n{\n    FIELD().PUBLIC().NAME(shader);\n    FIELD().PROTECTED().NAME(mShader);\n}\nEND_META;\nCLASS_METHODS_META(o2::ShaderAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<AssetMeta>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ShaderAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Shader>, GetShader);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/Spine/SpineAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SpineAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/File.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\n#include \"spine/SkeletonJson.h\"\n\nnamespace o2\n{\n    SpineAsset::SpineAsset()\n    {}\n\n    SpineAsset::SpineAsset(const SpineAsset& other):\n        AssetWithDefaultMeta<SpineAsset>(other)\n    {}\n\n    SpineAsset::~SpineAsset()\n    {\n        if (mSkeletonData)\n        {\n            delete mSkeletonData;\n            mSkeletonData = nullptr;\n        }\n\n        if (mAnimationStateData)\n        {\n            delete mAnimationStateData;\n            mAnimationStateData = nullptr;\n        }\n    }\n\n    SpineAsset& SpineAsset::operator=(const SpineAsset& other)\n    {\n        Asset::operator=(other);\n        return *this;\n    }\n\n    spine::SkeletonData* SpineAsset::GetSpineSkeletonData()\n    {\n        return mSkeletonData;\n    }\n\n    spine::AnimationStateData* SpineAsset::GetSpineAnimationStateData()\n    {\n        return mAnimationStateData;\n    }\n\n    Vector<String> SpineAsset::GetFileExtensions()\n    {\n        return { \"spine-json\" };\n    }\n\n    void SpineAsset::LoadData(const String& path)\n    {\n        auto atlasAssetPath = o2FileSystem.GetFileNameWithoutExtension(GetPath()) + \".spine-atlas\";\n        auto atlasAsset = o2Assets.GetAssetRefByType<SpineAtlasAsset>(atlasAssetPath);\n\n        if (!atlasAsset)\n        {\n            o2Debug.LogError(\"Spine asset %s has no atlas\", atlasAssetPath.Data());\n            return;\n        }\n\n        auto spineAtlas = atlasAsset->GetSpineAtlas();\n        if (spineAtlas == nullptr)\n        {\n            o2Debug.LogError(\"Failed to load spine atlas for spine asset: %s\", path.Data());\n            return;\n        }\n\n        spine::SkeletonJson json(spineAtlas);\n#ifdef PLATFORM_ANDROID\n        // spine::SkeletonJson::readSkeletonDataFile uses fopen — can't reach APK assets.\n        InFile file(path);\n        if (!file.IsOpened())\n        {\n            o2Debug.LogError(\"Failed to open spine json file: %s\", path.Data());\n            return;\n        }\n        String jsonText = file.ReadFullData();\n        mSkeletonData = json.readSkeletonData(jsonText.Data());\n#else\n        mSkeletonData = json.readSkeletonDataFile(path.Data());\n#endif\n\n        if (!mSkeletonData)\n        {\n            o2Debug.LogError(\"Failed to load spine asset: %s\", path.Data());\n            return;\n        }\n\n        mAnimationStateData = new spine::AnimationStateData(mSkeletonData);\n    }\n\n    void SpineAsset::SaveData(const String& path) const\n    {}\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::SpineAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::SpineAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::SpineAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::SpineAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::SpineAsset, o2__SpineAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/Spine/SpineAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n#include \"SpineAtlasAsset.h\"\n\n#include \"spine/SkeletonData.h\"\n#include \"spine/AnimationStateData.h\"\n\nnamespace o2\n{\n    // ----------------------------\n    // EsotericSoftware spine asset \n    // ----------------------------\n    class SpineAsset : public AssetWithDefaultMeta<SpineAsset>\n    {\n    public:\n        PROPERTIES(SpineAsset);\n\n    public:\n        // Default constructor\n        SpineAsset();\n\n        // Copy-constructor\n        SpineAsset(const SpineAsset& asset);\n\n        // Destructor\n        ~SpineAsset();\n\n        // Check equals operator\n        SpineAsset& operator=(const SpineAsset& asset);\n\n        // Returns spine skeleton data\n        spine::SkeletonData* GetSpineSkeletonData();\n\n        // Returns spine animation state data\n        spine::AnimationStateData* GetSpineAnimationStateData();\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 96; }\n\n        SERIALIZABLE(SpineAsset);\n        CLONEABLE_REF(SpineAsset);\n\n    protected:\n        spine::SkeletonData*       mSkeletonData = nullptr;       // Spine skeleton data\n        spine::AnimationStateData* mAnimationStateData = nullptr; // Spine animation state data\n\n    protected:\n        // Loads asset data, using DataValue and serialization\n        void LoadData(const String& path) override;\n\n        // Saves asset data, using DataValue and serialization\n        void SaveData(const String& path) const override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::SpineAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<SpineAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SpineAsset)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mSkeletonData);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mAnimationStateData);\n}\nEND_META;\nCLASS_METHODS_META(o2::SpineAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const SpineAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(spine::SkeletonData*, GetSpineSkeletonData);\n    FUNCTION().PUBLIC().SIGNATURE(spine::AnimationStateData*, GetSpineAnimationStateData);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/Spine/SpineAtlasAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SpineAtlasAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/File.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Render/Spine/SpineManager.h\"\n\nnamespace o2\n{\n    SpineAtlasAsset::SpineAtlasAsset()\n    {}\n\n    SpineAtlasAsset::SpineAtlasAsset(const SpineAtlasAsset& other):\n        AssetWithDefaultMeta<SpineAtlasAsset>(other)\n    {}\n\n    SpineAtlasAsset::~SpineAtlasAsset()\n    {\n        if (mAtlas)\n        {\n            delete mAtlas;\n            mAtlas = nullptr;\n        }\n    }\n\n    SpineAtlasAsset& SpineAtlasAsset::operator=(const SpineAtlasAsset& other)\n    {\n        Asset::operator=(other);\n        return *this;\n    }\n\n    spine::Atlas* SpineAtlasAsset::GetSpineAtlas()\n    {\n        return mAtlas;\n    }\n\n    Vector<String> SpineAtlasAsset::GetFileExtensions()\n    {\n        return { \"spine-atlas\" };\n    }\n\n    void SpineAtlasAsset::LoadData(const String& path)\n    {\n#ifdef PLATFORM_ANDROID\n        // spine::Atlas(path, ...) uses fopen — can't reach APK assets on Android.\n        // Read bytes via our FileSystem (AAssetManager-aware), then use the\n        // (data, length, dir) constructor.\n        InFile file(path);\n        if (!file.IsOpened())\n        {\n            o2Debug.LogError(\"Failed to open spine atlas file: %s\", path.Data());\n            mAtlas = nullptr;\n            return;\n        }\n        UInt length = file.GetDataSize();\n        char* buffer = mnew char[length];\n        file.ReadData(buffer, length);\n        String dir = FileSystem::GetParentPath(path);\n        mAtlas = new spine::Atlas(buffer, (int)length, dir.Data(),\n                                  &SpineManager::Instance().textureLoader);\n        delete[] buffer;\n#else\n        mAtlas = new spine::Atlas(path.Data(), &SpineManager::Instance().textureLoader);\n#endif\n\n        if (mAtlas->getPages().size() == 0)\n        {\n            o2Debug.LogError(\"Failed to load spine atlas: %s\", path.Data());\n            delete mAtlas;\n            mAtlas = nullptr;\n        }\n    }\n\n    void SpineAtlasAsset::SaveData(const String& path) const\n    {}\n}\n\nDECLARE_TEMPLATE_CLASS(o2::AssetWithDefaultMeta<o2::SpineAtlasAsset>);\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::SpineAtlasAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::SpineAtlasAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::AssetWithDefaultMeta<o2::SpineAtlasAsset>>);\n// --- META ---\n\nDECLARE_CLASS(o2::SpineAtlasAsset, o2__SpineAtlasAsset);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/Spine/SpineAtlasAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/AssetRef.h\"\n\n#include \"spine/Atlas.h\"\n\nnamespace o2\n{\n    // -----------------------------------\n    // EsotericSowftware spine atlas asset \n    // -----------------------------------\n    class SpineAtlasAsset: public AssetWithDefaultMeta<SpineAtlasAsset>\n    {\n    public:\n        // Default constructor\n        SpineAtlasAsset();\n\n        // Copy-constructor\n        SpineAtlasAsset(const SpineAtlasAsset& asset);\n\n        // Destructor\n        ~SpineAtlasAsset();\n\n        // Check equals operator\n        SpineAtlasAsset& operator=(const SpineAtlasAsset& asset);\n\n        // Returns spine atlas\n        spine::Atlas* GetSpineAtlas();\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 96; }\n\n        SERIALIZABLE(SpineAtlasAsset);\n        CLONEABLE_REF(SpineAtlasAsset);\n\n    protected:\n        spine::Atlas* mAtlas = nullptr; // Spine atlas\n\n    protected:\n        // Loads asset data, using DataValue and serialization\n        void LoadData(const String& path) override;\n\n        // Saves asset data, using DataValue and serialization\n        void SaveData(const String& path) const override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::SpineAtlasAsset)\n{\n    BASE_CLASS(o2::AssetWithDefaultMeta<SpineAtlasAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SpineAtlasAsset)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mAtlas);\n}\nEND_META;\nCLASS_METHODS_META(o2::SpineAtlasAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const SpineAtlasAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(spine::Atlas*, GetSpineAtlas);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/VectorFontAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"VectorFontAsset.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    VectorFontAsset::Meta::Meta()\n    {}\n\n    VectorFontAsset::Meta::Meta(const Meta& other):\n        DefaultAssetMeta<VectorFontAsset>(other)\n    {\n        for (auto& eff : other.mEffects)\n            mEffects.Add(eff->CloneAsRef<VectorFont::Effect>());\n    }\n\n    bool VectorFontAsset::Meta::IsEqual(AssetMeta* other) const\n    {\n        if (!AssetMeta::IsEqual(other))\n            return false;\n\n        Meta* otherMeta = (Meta*)other;\n        for (auto& eff : mEffects)\n        {\n            bool found = false;\n            for (auto& otherEff : otherMeta->mEffects)\n            {\n                if (eff && otherEff && eff->IsEqual(otherEff.Get()))\n                {\n                    found = true;\n                    break;\n                }\n            }\n\n            if (!found)\n                return false;\n        }\n\n        return true;\n    }\n\n    void VectorFontAsset::Meta::UpdateFontEffects()\n    {\n        if (mAsset)\n            mAsset.Lock()->UpdateFontEffects();\n    }\n\n    VectorFontAsset::VectorFontAsset():\n        FontAsset(mmake<Meta>())\n    {}\n\n    VectorFontAsset::VectorFontAsset(const VectorFontAsset& asset):\n        FontAsset(asset)\n    {}\n\n    VectorFontAsset& VectorFontAsset::operator=(const VectorFontAsset& asset)\n    {\n        FontAsset::operator=(asset);\n        mFont = asset.mFont;\n        return *this;\n    }\n\n    const Vector<Ref<VectorFont::Effect>>& VectorFontAsset::GetEffects() const\n    {\n        return GetMeta()->mEffects;\n    }\n\n    void VectorFontAsset::AddEffect(const Ref<VectorFont::Effect>& effect)\n    {\n        GetMeta()->mEffects.Add(effect);\n        DynamicCast<VectorFont>(mFont)->AddEffect(effect);\n    }\n\n    void VectorFontAsset::RemoveEffect(const Ref<VectorFont::Effect>& effect)\n    {\n        GetMeta()->mEffects.Remove(effect);\n        DynamicCast<VectorFont>(mFont)->RemoveEffect(effect);\n    }\n\n    void VectorFontAsset::RemoveAllEffects()\n    {\n        GetMeta()->mEffects.Clear();\n\n        DynamicCast<VectorFont>(mFont)->RemoveAllEffects();\n    }\n\n    Vector<String> VectorFontAsset::GetFileExtensions()\n    {\n        return { \"ttf\" };\n    }\n\n    Ref<VectorFontAsset::Meta> VectorFontAsset::GetMeta() const\n    {\n        return DynamicCast<Meta>(mInfo.meta);\n    }\n\n    void VectorFontAsset::LoadData(const String& path)\n    {\n        mFont = o2Render.mFonts.FindOrDefault([&](auto fnt) { return fnt->GetFileName() == path; });\n\n        if (!mFont)\n        {\n            mFont = mmake<VectorFont>(path);\n            UpdateFontEffects();\n        }\n        \n        GetMeta()->mAsset = WeakRef(this);\n    }\n\n    void VectorFontAsset::SaveData(const String& path) const\n    {}\n\n    void VectorFontAsset::UpdateFontEffects()\n    {\n        Vector<Ref<VectorFont::Effect>> clonedEffects;;\n        for (auto& eff : GetMeta()->mEffects)\n        {\n            if (eff)\n                clonedEffects.Add(eff->CloneAsRef<VectorFont::Effect>());\n        }\n\n        DynamicCast<VectorFont>(mFont)->SetEffects(clonedEffects);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::VectorFontAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::VectorFontAsset>);\n// --- META ---\n\nDECLARE_CLASS(o2::VectorFontAsset, o2__VectorFontAsset);\n\nDECLARE_CLASS(o2::VectorFontAsset::Meta, o2__VectorFontAsset__Meta);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/VectorFontAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/FontAsset.h\"\n#include \"o2/Render/VectorFont.h\"\n#include \"o2/Utils/Editor/Attributes/InvokeOnChangeAttribute.h\"\n\nnamespace o2\n{\n    // -----------------\n    // Vector font asset\n    // -----------------\n    class VectorFontAsset: public FontAsset\n    {\n    public:\n        class Meta;\n\n    public:\n        PROPERTIES(VectorFontAsset);\n        GETTER(Ref<Meta>, meta, GetMeta); // Meta information getter\n\n    public:\n        // Default constructor\n        VectorFontAsset();\n\n        // Copy-constructor\n        VectorFontAsset(const VectorFontAsset& asset);\n\n        // Check equals operator\n        VectorFontAsset& operator=(const VectorFontAsset& asset);\n\n        // Returns meta information\n        Ref<Meta> GetMeta() const;\n\n        // Returns font effects array \n        const Vector<Ref<VectorFont::Effect>>& GetEffects() const;\n\n        // Adds effect to font\n        void AddEffect(const Ref<VectorFont::Effect>& effect);\n\n        // Adds effect to font\n        template<typename _type, typename ... _args>\n        void AddEffect(_args ... args);\n\n        // Removes effect from font\n        void RemoveEffect(const Ref<VectorFont::Effect>& effect);\n\n        // Removes all effects\n        void RemoveAllEffects();\n\n        // Returns extensions string\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 92; }\n\n        ASSET_TYPE(VectorFontAsset, Meta);\n\n    public:\n        // ----------------\n        // Meta information\n        // ----------------\n        class Meta: public DefaultAssetMeta<VectorFontAsset>\n        {\n        public:\n            // Default constructor\n            Meta();\n\n            // Copy-constructor\n            Meta(const Meta& other);\n\n            // Returns true if other meta is equal to this\n            bool IsEqual(AssetMeta* other) const override;\n\n            SERIALIZABLE(Meta);\n            CLONEABLE_REF(Meta);\n\n        protected:\n            Vector<Ref<VectorFont::Effect>> mEffects; // Font effects array @SERIALIZABLE @EDITOR_PROPERTY @EXPANDED_BY_DEFAULT @INVOKE_ON_CHANGE(UpdateFontEffects)\n            \n            WeakRef<VectorFontAsset> mAsset = nullptr; // Asset pointer\n\n        protected:\n            // Calls UpdateFontEffects from asset\n            void UpdateFontEffects();\n\n            friend class VectorFontAsset;\n        };\n\n    protected:\n        // Loads data\n        void LoadData(const String& path) override;\n\n        // Saves asset data, using DataValue and serialization\n        void SaveData(const String& path) const override;\n\n        // Updates font effects in \n        void UpdateFontEffects();\n\n        friend class Assets;\n    };\n\n    template<typename _type, typename ... _args>\n    void VectorFontAsset::AddEffect(_args ... args)\n    {\n        AddEffect(mmake<_type>(args ...));\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(o2::VectorFontAsset)\n{\n    BASE_CLASS(o2::FontAsset);\n}\nEND_META;\nCLASS_FIELDS_META(o2::VectorFontAsset)\n{\n    FIELD().PUBLIC().NAME(meta);\n}\nEND_META;\nCLASS_METHODS_META(o2::VectorFontAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const VectorFontAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Meta>, GetMeta);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<VectorFont::Effect>>&, GetEffects);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEffect, const Ref<VectorFont::Effect>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveEffect, const Ref<VectorFont::Effect>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllEffects);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SaveData, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateFontEffects);\n}\nEND_META;\n\nCLASS_BASES_META(o2::VectorFontAsset::Meta)\n{\n    BASE_CLASS(o2::DefaultAssetMeta<VectorFontAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::VectorFontAsset::Meta)\n{\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().EXPANDED_BY_DEFAULT_ATTRIBUTE().INVOKE_ON_CHANGE_ATTRIBUTE(UpdateFontEffects).SERIALIZABLE_ATTRIBUTE().NAME(mEffects);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mAsset);\n}\nEND_META;\nCLASS_METHODS_META(o2::VectorFontAsset::Meta)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Meta&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEqual, AssetMeta*);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateFontEffects);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/VertexShaderAsset.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"VertexShaderAsset.h\"\n\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    VertexShaderAsset::VertexShaderAsset():\n        ShaderAsset(mmake<Meta>())\n    {}\n\n    VertexShaderAsset::VertexShaderAsset(const VertexShaderAsset& asset):\n        ShaderAsset(asset)\n    {}\n\n    VertexShaderAsset& VertexShaderAsset::operator=(const VertexShaderAsset& asset)\n    {\n        ShaderAsset::operator=(asset);\n        return *this;\n    }\n\n    Ref<VertexShaderAsset::Meta> VertexShaderAsset::GetMeta() const\n    {\n        return DynamicCast<Meta>(mInfo.meta);\n    }\n\n    Vector<String> VertexShaderAsset::GetFileExtensions()\n    {\n        return { \"vert\" };\n    }\n\n    void VertexShaderAsset::LoadData(const String& path)\n    {\n        String sourcePath = Shader::ResolvePlatformSourcePath(path);\n        String source = o2FileSystem.ReadFile(sourcePath);\n\n        mShader = mmake<Shader>();\n        mShader->SetFileName(sourcePath);\n        mShader->Compile(source, Shader::Type::Vertex);\n\n#if IS_EDITOR\n        mShader->SetFileEditDate(o2FileSystem.GetFileInfo(sourcePath).editDate);\n#endif\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::DefaultAssetMeta<o2::VertexShaderAsset>);\nDECLARE_TEMPLATE_CLASS(o2::AssetRef<o2::VertexShaderAsset>);\n// --- META ---\n\nDECLARE_CLASS(o2::VertexShaderAsset, o2__VertexShaderAsset);\n\nDECLARE_CLASS(o2::VertexShaderAsset::Meta, o2__VertexShaderAsset__Meta);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Assets/Types/VertexShaderAsset.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ShaderAsset.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------------------\n    // Vertex shader asset. Loads .vsh files and compiles them as\n    // vertex shader stage.\n    // -----------------------------------------------------------------\n    class VertexShaderAsset : public ShaderAsset\n    {\n    public:\n        class Meta;\n\n    public:\n        PROPERTIES(VertexShaderAsset);\n        GETTER(Ref<Meta>, meta, GetMeta); // Meta information getter\n\n    public:\n        // Default constructor\n        VertexShaderAsset();\n\n        // Copy-constructor\n        VertexShaderAsset(const VertexShaderAsset& asset);\n\n        // Assign operator\n        VertexShaderAsset& operator=(const VertexShaderAsset& asset);\n\n        // Returns meta information\n        Ref<Meta> GetMeta() const;\n\n        // Returns supported file extensions (.vsh)\n        static Vector<String> GetFileExtensions();\n\n        // Returns editor icon for vertex shader asset\n        static String GetEditorIcon() { return \"ui/UI4_big_vertex_shader_icon.png\"; }\n\n        // Returns editor sorting weight\n        static int GetEditorSorting() { return 91; }\n\n        // Returns true because vertex shaders can be created from the editor\n        static bool IsAvailableToCreateFromEditor() { return true; }\n\n        ASSET_TYPE(VertexShaderAsset, Meta);\n\n    public:\n        // ----------------\n        // Meta information\n        // ----------------\n        class Meta : public DefaultAssetMeta<VertexShaderAsset>\n        {\n        public:\n            SERIALIZABLE(Meta);\n            CLONEABLE_REF(Meta);\n        };\n\n    protected:\n        // Loads vertex shader source from file and compiles it\n        void LoadData(const String& path) override;\n\n        friend class Assets;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::VertexShaderAsset)\n{\n    BASE_CLASS(o2::ShaderAsset);\n}\nEND_META;\nCLASS_FIELDS_META(o2::VertexShaderAsset)\n{\n    FIELD().PUBLIC().NAME(meta);\n}\nEND_META;\nCLASS_METHODS_META(o2::VertexShaderAsset)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const VertexShaderAsset&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Meta>, GetMeta);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vector<String>, GetFileExtensions);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetEditorIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(int, GetEditorSorting);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableToCreateFromEditor);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadData, const String&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::VertexShaderAsset::Meta)\n{\n    BASE_CLASS(o2::DefaultAssetMeta<VertexShaderAsset>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::VertexShaderAsset::Meta)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::VertexShaderAsset::Meta)\n{\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Config/PhysicsConfig.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"PhysicsConfig.h\"\n// --- META ---\n\nDECLARE_CLASS(o2::PhysicsConfig, o2__PhysicsConfig);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Config/PhysicsConfig.h",
    "content": "#pragma once\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nnamespace o2\n{\n    class PhysicsConfig: public ISerializable\n    {\n    public:\n        Vec2F gravity = Vec2F(0, -98.0f); // Gravity force @SERIALIZABLE\n\n        float scale = 10.0f; // World metrics to physics metrics scale @SERIALIZABLE\n\n        int velocityIterations = 8; // Number of velocity solver iterations @SERIALIZABLE\n        int positionIterations = 3; // Number of position solver iterations @SERIALIZABLE\n\n        float debugDrawAlpha = 0.5f; // Debug draw transparency @SERIALIZABLE\n\n        SERIALIZABLE(PhysicsConfig);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::PhysicsConfig)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::PhysicsConfig)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, -98.0f)).NAME(gravity);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(10.0f).NAME(scale);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(8).NAME(velocityIterations);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(3).NAME(positionIterations);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.5f).NAME(debugDrawAlpha);\n}\nEND_META;\nCLASS_METHODS_META(o2::PhysicsConfig)\n{\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Config/ProjectConfig.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ProjectConfig.h\"\n\n#include \"o2/EngineSettings.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    DECLARE_SINGLETON(ProjectConfig);\n\n    ProjectConfig::ProjectConfig(RefCounter* refCounter):\n        Singleton<ProjectConfig>(refCounter), mPlatform(GetEnginePlatform())\n    {\n        Load();\n    }\n\n    ProjectConfig::~ProjectConfig()\n    {\n        Save();\n    }\n\n    String ProjectConfig::GetProjectName() const\n    {\n        return mProjectName;\n    }\n\n    void ProjectConfig::SetProjectName(const String& name)\n    {\n        mProjectName = name;\n    }\n\n    Platform ProjectConfig::GetPlatform() const\n    {\n        return mPlatform;\n    }\n\n    void ProjectConfig::SetPlatform(Platform platform)\n    {\n        mPlatform = platform;\n    }\n\n    void ProjectConfig::Load()\n    {\n        DataDocument data;\n        if (!data.LoadFromFile(GetProjectSettingPath()))\n            return;\n\n        Deserialize(data);\n    }\n\n    void ProjectConfig::Save() const\n    {\n        DataDocument data;\n        Serialize(data);\n        data.SaveToFile(GetProjectSettingPath());\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ProjectConfig, o2__ProjectConfig);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Config/ProjectConfig.h",
    "content": "#pragma once\n\n#include \"o2/Config/PhysicsConfig.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n\n// Project configuration access macros\n#define o2Config o2::ProjectConfig::Instance()\n\nnamespace o2\n{\n    class ProjectBuildConfig;\n\n    // ---------------------\n    // Project configuration\n    // ---------------------\n    class ProjectConfig: public ISerializable, public Singleton<ProjectConfig>\n    {\n    public:\n        PROPERTIES(ProjectConfig);\n        PROPERTY(String, projectName, SetProjectName, GetProjectName); // Project name property\n        PROPERTY(Platform, currentPlatform, SetPlatform, GetPlatform); // Project platform property\n\n    public:\n        PhysicsConfig physics; // Physics world config @SERIALIZABLE\n\n    public:\n        // Default constructor\n        ProjectConfig(RefCounter* refCounter);\n\n        // Destructor\n        ~ProjectConfig();\n\n        // Returns project name \n        String GetProjectName() const;\n\n        // Sets project name\n        void SetProjectName(const String& name);\n\n        // Returns platform\n        Platform GetPlatform() const;\n\n        // Sets platform\n        void SetPlatform(Platform platform);\n\n        // Save config to file\n        void Save() const;\n\n        // Loads config file\n        void Load();\n\n        SERIALIZABLE(ProjectConfig);\n\n    protected:\n        String   mProjectName; // Current project name @SERIALIZABLE\n        Platform mPlatform;    // Current project target platform\n\n        friend class AssetBuildSystem;\n        friend class Application;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ProjectConfig)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::Singleton<ProjectConfig>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ProjectConfig)\n{\n    FIELD().PUBLIC().NAME(projectName);\n    FIELD().PUBLIC().NAME(currentPlatform);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(physics);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mProjectName);\n    FIELD().PROTECTED().NAME(mPlatform);\n}\nEND_META;\nCLASS_METHODS_META(o2::ProjectConfig)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetProjectName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetProjectName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Platform, GetPlatform);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPlatform, Platform);\n    FUNCTION().PUBLIC().SIGNATURE(void, Save);\n    FUNCTION().PUBLIC().SIGNATURE(void, Load);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/EditorStubs.cpp",
    "content": "// Stub implementations for editor-only class registrations that the auto-generated\n// o2Framework.cpp references unconditionally. These classes are only defined when\n// IS_EDITOR is true, but CodeTool generates registration calls for them regardless.\n\n#include \"o2/stdafx.h\"\n\n#if !IS_EDITOR\n\nvoid __RegisterClass__o2__SceneEditableObject() {}\nvoid __RegisterClass__o2__Widget__LayersEditable() {}\nvoid __RegisterClass__o2__Widget__InternalChildrenEditableEditable() {}\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/EngineSettings.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"EngineSettings.h\"\n\no2::Platform GetEnginePlatform()\n{\n#ifdef PLATFORM_WINDOWS\n    return o2::Platform::Windows;\n#elif defined PLATFORM_ANDROID\n    return o2::Platform::Android;\n#elif defined PLATFORM_MAC\n    return o2::Platform::Mac;\n#elif defined PLATFORM_IOS\n    return o2::Platform::iOS;\n#elif defined PLATFORM_LINUX\n    return o2::Platform::Linux;\n#elif defined PLATFORM_WASM\n    return o2::Platform::WebAssembly;\n#endif\n}\n\no2::DeviceType GetDeviceType()\n{\n    auto platform = GetEnginePlatform();\n    if (platform == o2::Platform::Windows || platform == o2::Platform::Mac || platform == o2::Platform::Linux)\n        return o2::DeviceType::PC;\n    \n    return o2::DeviceType::Phone;\n}\n\nconst char* GetProjectPath()\n{\n    if constexpr (IS_EDITOR)\n        return \"../..\";\n    else\n        return \"AndroidAssets/\";\n}\n\nconst char* GetProjectSettingPath()\n{\n#if defined PLATFORM_MAC || defined PLATFORM_WINDOWS || defined PLATFORM_LINUX\n    return \"../../ProjectSettings.json\";\n#elif defined PLATFORM_WASM\n    return \"/ProjectSettings.json\";\n#else\n    return \"ProjectSettings.json\";\n#endif\n}\n\nbool IsStoppingOnLogErrors()\n{\n    return false;\n}\n\nbool IsUIDebugEnabled()\n{\n    return false;\n}\n\nbool IsDevMode()\n{\n    return true;\n}\n\nbool IsReleaseBuild()\n{\n#ifdef DEBUG\n    return false;\n#else\n    return true;\n#endif\n}\n\nbool IsRenderDrawCallsDebugEnabled()\n{\n    return false;\n}\n\nconst char* GetProjectRootPath()\n{\n#if defined PLATFORM_MAC || defined PLATFORM_WINDOWS || defined PLATFORM_LINUX\n    return \"../../\";\n#elif defined PLATFORM_WASM\n    return \"/\";\n#else\n    return \"\";\n#endif\n}\n\nconst char* GetAssetsRootPath()\n{\n    return \"Assets/\";\n}\n\nconst char* GetAssetsPath()\n{\n    static char path[256] = \"\";\n    static bool initialized = false;\n    if (!initialized)\n    {\n        initialized = true;\n        strcat(path, GetProjectRootPath());\n        strcat(path, GetAssetsRootPath());\n    }\n\n    return path;\n}\n\nconst char* GetBuiltAssetsPath()\n{\n#if defined PLATFORM_WINDOWS\n    return \"../../BuiltAssets/Windows/Data/\";\n#elif defined PLATFORM_ANDROID\n    return \"Data/\";\n#elif defined PLATFORM_MAC\n    return \"../../BuiltAssets/Mac/Data/\";\n#elif defined PLATFORM_LINUX\n    return \"../../BuiltAssets/Linux/Data/\";\n#elif defined PLATFORM_IOS\n    return \"Data/\";\n#elif defined PLATFORM_WASM\n    return \"/Data/\";\n#endif\n}\n\nconst char* GetBasicAtlasPath()\n{\n    return \"BasicAtlas.atlas\";\n}\n\nconst char* GetBuiltAssetsTreePath()\n{\n#if defined PLATFORM_WINDOWS\n    return \"../../BuiltAssets/Windows/Data.json\";\n#elif defined PLATFORM_ANDROID\n    return \"Data.json\";\n#elif defined PLATFORM_MAC\n    return \"../../BuiltAssets/Mac/Data.json\";\n#elif defined PLATFORM_LINUX\n    return \"../../BuiltAssets/Linux/Data.json\";\n#elif defined PLATFORM_IOS\n    return \"Data.json\";\n#elif defined PLATFORM_WASM\n    return \"/Data.json\";\n#endif\n}\n\nconst char* GetEditorAssetsPath()\n{\n#if defined PLATFORM_WINDOWS || defined PLATFORM_MAC || defined PLATFORM_LINUX\n    return \"../../o2/Editor/Assets/\";\n#else\n    return \"\";\n#endif\n}\n\nconst char* GetEditorBuiltAssetsPath()\n{\n#if defined PLATFORM_WINDOWS\n    return \"../../BuiltAssets/Windows/EditorData/\";\n#elif defined PLATFORM_MAC\n    return \"../../BuiltAssets/Mac/EditorData/\";\n#elif defined PLATFORM_LINUX\n    return \"../../BuiltAssets/Linux/EditorData/\";\n#endif\n    return \"\";\n}\n\nconst char* GetEditorBuiltAssetsTreePath()\n{\n#if defined PLATFORM_WINDOWS\n    return \"../../BuiltAssets/Windows/EditorData.json\";\n#elif defined PLATFORM_MAC\n    return \"../../BuiltAssets/Mac/EditorData.json\";\n#elif defined PLATFORM_LINUX\n    return \"../../BuiltAssets/Linux/EditorData.json\";\n#endif\n    return \"\";\n}\n\nconst char* GetBuiltinAssetsPath()\n{\n#if defined PLATFORM_WINDOWS\n    return \"../../BuiltAssets/Windows/FrameworkData/\";\n#elif defined PLATFORM_MAC\n    return \"../../BuiltAssets/Mac/FrameworkData/\";\n#elif defined PLATFORM_LINUX\n    return \"../../BuiltAssets/Linux/FrameworkData/\";\n#elif defined PLATFORM_IOS\n    return \"FrameworkData/\";\n#elif defined PLATFORM_WASM\n    return \"/FrameworkData/\";\n#elif defined PLATFORM_ANDROID\n    return \"FrameworkData/\";\n#else\n    return \"FrameworkAssets/\";\n#endif\n}\n\n#ifdef PLATFORM_ANDROID\n\nconst char* GetAndroidAssetsPath()\n{\n    return \"AndroidAssets/\";\n}\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/EngineSettings.h",
    "content": "#pragma once\n#include \"o2/Utils/Types/CommonTypes.h\"\n\n#define DEBUG true\n\n// Enables memory managing\n#if defined DEBUG\n#define ENABLE_MEMORY_MANAGE true\n#else\n#define ENABLE_MEMORY_MANAGE false\n#endif\n\n// Enables render debugging\n#if defined DEBUG\n#define RENDER_DEBUG true\n#else\n#define RENDER_DEBUG true\n#endif\n\n#if defined MEMORY_ANALYZE_ENABLE\n#define ENABLE_MEMORY_ANALYZE true\n#else\n#define ENABLE_MEMORY_ANALYZE false\n#endif\n\n// Describes that engine running as editor or not\n#if defined O2_EDITOR_ENABLED\n#define IS_EDITOR true\n#else\n#define IS_EDITOR false\n#endif\n\n// Is enabled scripting engine\n#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n#define IS_SCRIPTING_SUPPORTED true\n#else\n#define IS_SCRIPTING_SUPPORTED false\n#endif\n\n#if defined(O2_PLATFORM_INITIALIZATION_ENABLED)\n#define IS_PLATFORM_INITIALIZATION_ENABLED true\n#else\n#define IS_PLATFORM_INITIALIZATION_ENABLED false\n#endif\n\n// Current working platform\no2::Platform GetEnginePlatform();\n\n// Returns current device type\no2::DeviceType GetDeviceType();\n\n// Project config file path. Relative from executable\nconst char* GetProjectSettingPath();\n\n// Enables stopping on log errors\nbool IsStoppingOnLogErrors();\n\n// Enables debug ui rectangles drawing\nbool IsUIDebugEnabled();\n\n// Is development mode\nbool IsDevMode();\n\n// Is build release\nbool IsReleaseBuild();\n\n// Is render draw calls debug enabled; Every drawn entity will be printed in console\nbool IsRenderDrawCallsDebugEnabled();\n\n// ----------------------------\n// Assets configuration section\n// ----------------------------\n\n// Project root path. Relative from executable\nconst char* GetProjectRootPath();\n\n// Assets path. Relative from project root\nconst char* GetAssetsRootPath();\n\n// Basic atlas path (from assets path)\nconst char* GetBasicAtlasPath();\n\n// Assets path. Relative from executable\nconst char* GetAssetsPath();\n\n// Built assets path with built assets. Relative from executable\nconst char* GetBuiltAssetsPath();\n\n// Built assets assets tree path\nconst char* GetBuiltAssetsTreePath();\n\n// Editor's assets path. Relative from executable\nconst char* GetEditorAssetsPath();\n\n// Editor's built assets path with built assets. Relative from executable\nconst char* GetEditorBuiltAssetsPath();\n\n// Editor's built assets assets tree path\nconst char* GetEditorBuiltAssetsTreePath();\n\n// Built in assets path. Relative from executable\nconst char* GetBuiltinAssetsPath();\n\n\n// ----------------------\n// Platform configuration\n// ----------------------\n\n#ifdef PLATFORM_ANDROID\n\n// Returns android assets path prefix\nconst char* GetAndroidAssetsPath();\n\n#endif\n\n// --------------------\n// Other configurations\n// --------------------\n"
  },
  {
    "path": "Framework/Sources/o2/Events/ApplicationEventsListener.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ApplicationEventsListener.h\"\n\n#include \"o2/Events/EventSystem.h\"\n\nnamespace o2\n{\n    ApplicationEventsListener::ApplicationEventsListener()\n    {}\n\n    void ApplicationEventsListener::PostRefConstruct()\n    {\n        EventSystem::RegApplicationListener(Ref(this));\n    }\n\n    ApplicationEventsListener::~ApplicationEventsListener()\n    {\n        EventSystem::UnregApplicationListener(this);\n    }\n\n    void ApplicationEventsListener::OnApplicationStarted()\n    {}\n\n    void ApplicationEventsListener::OnApplicationClosing()\n    {}\n\n    void ApplicationEventsListener::OnApplicationActivated()\n    {}\n\n    void ApplicationEventsListener::OnApplicationDeactivated()\n    {}\n\n    void ApplicationEventsListener::OnApplicationSized()\n    {}\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/ApplicationEventsListener.h",
    "content": "#pragma once\n\n#include \"o2/Events/IEventsListener.h\"\n\nnamespace o2\n{\n    // ---------------------------\n    // Application events listener\n    // ---------------------------\n    class ApplicationEventsListener: public IEventsListener\n    {\n    public:\n        // Default constructor\n        ApplicationEventsListener();\n\n        // Virtual destructor\n        virtual ~ApplicationEventsListener();\n\n        // Called when application was started\n        virtual void OnApplicationStarted();\n\n        // Called when application began closing\n        virtual void OnApplicationClosing();\n\n        // Called when application was activated\n        virtual void OnApplicationActivated();\n\n        // Called when application was deactivated\n        virtual void OnApplicationDeactivated();\n\n        // Called when application frame was resized\n        virtual void OnApplicationSized();\n\n    private:\n        // It is called after reference initialization at object construction, registers texture in render\n        void PostRefConstruct();\n\n        FRIEND_REF_MAKE();\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/CursorAreaEventsListener.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"CursorAreaEventsListener.h\"\n\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    CursorAreaEventsListener::CursorAreaEventsListener()\n    {}\n\n    CursorAreaEventsListener::CursorAreaEventsListener(const CursorAreaEventsListener& other)\n    {}\n\n    CursorAreaEventsListener::~CursorAreaEventsListener()\n    {\n        if (EventSystem::IsSingletonInitialzed())\n            o2Events.UnregCursorAreaListener(this);\n    }\n\n    bool CursorAreaEventsListener::IsUnderPoint(const Vec2F& point)\n    {\n        return true;\n    }\n\n    bool CursorAreaEventsListener::IsScrollable() const\n    {\n        return false;\n    }\n\n    void CursorAreaEventsListener::SetInteractable(bool interactable)\n    {\n        if (mInteractable == interactable)\n            return;\n\n        mInteractable = interactable;\n\n        if (mInteractable)\n            OnBecomeInteractable();\n        else\n            OnBecomeNotInteractable();\n    }\n\n    bool CursorAreaEventsListener::IsInteractable() const\n    {\n        return mInteractable;\n    }\n\n    bool CursorAreaEventsListener::IsInputTransparent() const\n    {\n        return false;\n    }\n\n    void CursorAreaEventsListener::OnDrawn()\n    {\n        if (!mInteractable)\n            return;\n\n        mScissorRect = o2Render.GetResScissorRect();\n        o2Events.DrawnCursorAreaListener(Ref(this));\n    }\n\n    void CursorAreaEventsListener::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorPressed(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorReleased(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorPressBreak(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorPressedOutside(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorPressedOutside(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorReleasedOutside(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorStillDown(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorMoved(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorMoved(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorEnter(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorExit(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorExit(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorDblClicked(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorRightMousePressed(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorRightMousePressed(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorRightMouseReleased(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorRightMouseStayDown(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorRightMouseStayDown(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorMiddleMousePressed(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorMiddleMousePressed(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorMiddleMouseStayDown(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorMiddleMouseStayDown(cursor);\n    }\n\n    void CursorAreaEventsListener::OnCursorMiddleMouseReleased(const Input::Cursor& cursor)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnCursorMiddleMouseReleased(cursor);\n    }\n\n    void CursorAreaEventsListener::OnScrolled(float scroll)\n    {\n        if (messageFallDownListener)\n            messageFallDownListener->OnScrolled(scroll);\n    }\n\n\tString CursorAreaEventsListener::GetDebugName() const\n\t{\n\t\treturn typeid(this).name();\n\t}\n\n\tbool CursorAreaEventsListener::IsPressed() const\n    {\n        return mIsPressed;\n    }\n\n    CursorEventsListener::CursorEventsListener(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {\n        if (EventSystem::IsSingletonInitialzed())\n            EventSystem::RegCursorListener(Ref(this));\n    }\n\n    CursorEventsListener::CursorEventsListener(RefCounter* refCounter, const CursorAreaEventsListener& other):\n        RefCounterable(refCounter)\n    {\n        if (EventSystem::IsSingletonInitialzed())\n            EventSystem::RegCursorListener(Ref(this));\n    }\n\n    CursorEventsListener::~CursorEventsListener()\n    {\n        EventSystem::UnregCursorListener(WeakRef(this));\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/CursorAreaEventsListener.h",
    "content": "#pragma once\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Events/IEventsListener.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    class IDrawable;\n\n    // -----------------------\n    // Cursors events listener\n    // -----------------------\n    class CursorAreaEventsListener: public IEventsListener\n    {\n    public:\n        PROPERTIES(CursorAreaEventsListener);\n        PROPERTY(bool, interactable, SetInteractable, IsInteractable); // Interactable flag property\n\n    public:\n        CursorAreaEventsListener* messageFallDownListener = nullptr; // Messages fall down listener. \n                                                                     // All messages received in this object \n                                                                     // will be delivered to messageFallDownListener\n\n    public:\n        // Default constructor\n        CursorAreaEventsListener();\n\n        // Copy-constructor\n        CursorAreaEventsListener(const CursorAreaEventsListener& other);\n\n        // Virtual destructor\n        virtual ~CursorAreaEventsListener();\n\n        // Returns true if point is in this object\n        virtual bool IsUnderPoint(const Vec2F& point);\n\n        // Returns is listener scrollable\n        virtual bool IsScrollable() const;\n\n        // Sets interactable flag\n        virtual void SetInteractable(bool interactable);\n\n        // Returns interactable flag\n        virtual bool IsInteractable() const;\n\n        // Returns true when input events can be handled by down listeners\n        virtual bool IsInputTransparent() const;\n\n        // Returns true if this was pressed by some cursor\n        bool IsPressed() const;\n\n        // Called when listener was drawn\n        virtual void OnDrawn();\n\n    protected:\n        // Called when cursor pressed on this\n        virtual void OnCursorPressed(const Input::Cursor& cursor);\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        virtual void OnCursorReleased(const Input::Cursor& cursor);\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        virtual void OnCursorPressBreak(const Input::Cursor& cursor);\n\n        // Called when cursor pressed outside this\n        virtual void OnCursorPressedOutside(const Input::Cursor& cursor);\n\n        // Called when cursor released outside this(only when cursor pressed this at previous time)\n        virtual void OnCursorReleasedOutside(const Input::Cursor& cursor);\n\n        // Called when cursor stay down during frame\n        virtual void OnCursorStillDown(const Input::Cursor& cursor);\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        virtual void OnCursorMoved(const Input::Cursor& cursor);\n\n        // Called when cursor enters this object\n        virtual void OnCursorEnter(const Input::Cursor& cursor);\n\n        // Called when cursor exits this object\n        virtual void OnCursorExit(const Input::Cursor& cursor);\n\n        // Called when cursor double clicked\n        virtual void OnCursorDblClicked(const Input::Cursor& cursor);\n\n        // Called when right mouse button was pressed on this\n        virtual void OnCursorRightMousePressed(const Input::Cursor& cursor);\n\n        // Called when right mouse button stay down on this\n        virtual void OnCursorRightMouseStayDown(const Input::Cursor& cursor);\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        virtual void OnCursorRightMouseReleased(const Input::Cursor& cursor);\n\n        // Called when middle mouse button was pressed on this\n        virtual void OnCursorMiddleMousePressed(const Input::Cursor& cursor);\n\n        // Called when middle mouse button stay down on this\n        virtual void OnCursorMiddleMouseStayDown(const Input::Cursor& cursor);\n\n        // Called when middle mouse button was released (only when middle mouse button pressed this at previous time)\n        virtual void OnCursorMiddleMouseReleased(const Input::Cursor& cursor);\n\n        // Called when scrolling\n        virtual void OnScrolled(float scroll);\n\n\t\t// Returns debug name\n\t\tvirtual String GetDebugName() const;\n        \n    protected:\n        RectF mScissorRect; // Scissor rect at drawing moment\n\n        bool mInteractable = true; // True when listener is interactable\n\n        bool mIsPressed = false;            // True when was pressed by cursor\n        bool mIsRightMousePressed = false;  // True when was pressed by right mouse button\n        bool mIsMiddleMousePressed = false; // True when was pressed by middle mouse button\n\n        float mLastPressedTime = -1.0f; // Last cursor pressed time\n\n    protected:\n        // Called when listener becomes interactable\n        virtual void OnBecomeInteractable() {}\n\n        // Called when listener stops interacting\n        virtual void OnBecomeNotInteractable() {}\n\n        friend class EventSystem;\n        friend class CursorAreaEventListenersLayer;\n    };\n\n    // -----------------------\n    // Cursors events listener\n    // -----------------------\n    class CursorEventsListener: public RefCounterable\n    {\n    public:\n        // Default constructor\n        CursorEventsListener(RefCounter* refCounter);\n\n        // Copy-constructor\n        CursorEventsListener(RefCounter* refCounter, const CursorAreaEventsListener& other);\n\n        // Virtual destructor\n        virtual ~CursorEventsListener();\n\n    protected:\n        // Called when cursor pressed on this\n        virtual void OnCursorPressed(const Input::Cursor& cursor) {}\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        virtual void OnCursorReleased(const Input::Cursor& cursor) {}\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        virtual void OnCursorPressBreak(const Input::Cursor& cursor) {}\n\n        // Called when cursor stay down during frame\n        virtual void OnCursorStillDown(const Input::Cursor& cursor) {}\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        virtual void OnCursorMoved(const Input::Cursor& cursor) {}\n\n        // Called when cursor double clicked\n        virtual void OnCursorDblClicked(const Input::Cursor& cursor) {}\n\n        // Called when right mouse button was pressed on this\n        virtual void OnCursorRightMousePressed(const Input::Cursor& cursor) {}\n\n        // Called when right mouse button stay down on this\n        virtual void OnCursorRightMouseStillDown(const Input::Cursor& cursor) {}\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        virtual void OnCursorRightMouseReleased(const Input::Cursor& cursor) {}\n\n        // Called when middle mouse button was pressed on this\n        virtual void OnCursorMiddleMousePressed(const Input::Cursor& cursor) {}\n\n        // Called when middle mouse button stay down on this\n        virtual void OnCursorMiddleMouseStillDown(const Input::Cursor& cursor) {}\n\n        // Called when middle mouse button was released (only when middle mouse button pressed this at previous time)\n        virtual void OnCursorMiddleMouseReleased(const Input::Cursor& cursor) {}\n\n        // Called when scrolling\n        virtual void OnScrolled(float scroll) {}\n\n        friend class EventSystem;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/CursorAreaEventsListenersLayer.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"CursorAreaEventsListenersLayer.h\"\n\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Utils/Editor/DragAndDrop.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    CursorAreaEventListenersLayer::~CursorAreaEventListenersLayer()\n    {\n        if (EventSystem::IsSingletonInitialzed())\n            o2Events.RemoveCursorAreaEventsListenersLayer(WeakRef(this));\n    }\n\n    void CursorAreaEventListenersLayer::OnBeginDraw()\n    {\n        //PROFILE_SAMPLE_FUNC();\n\n        viewPortBasis = o2Render.GetCamera().GetBasis();\n        o2Events.PushCursorAreaEventsListenersLayer(Ref(this));\n    }\n\n    void CursorAreaEventListenersLayer::OnEndDraw()\n    {\n        //PROFILE_SAMPLE_FUNC();\n\n        o2UI.DrawCurrentLayerTopWidgets();\n\n        renderBasis = o2Render.GetCamera().GetBasis();\n        o2Events.PopCursorAreaEventsListenersLayer();\n    }\n\n    void CursorAreaEventListenersLayer::OnDrawn(const Basis& transform)\n    {\n        //PROFILE_SAMPLE_FUNC();\n\n        isEditor = EditorScope::IsInScope();\n\n        drawnTransform = transform;\n        mLocalToWorldTransform = camera.GetBasis().Inverted()*renderBasis*viewPortBasis.Inverted()*drawnTransform;\n\n        CursorAreaEventsListener::OnDrawn();\n    }\n\n    Vec2F CursorAreaEventListenersLayer::ToLocal(const Vec2F& point) const\n    {\n        return point*mLocalToWorldTransform.Inverted();\n    }\n\n    Vec2F CursorAreaEventListenersLayer::FromLocal(const Vec2F& point) const\n    {\n        return point*mLocalToWorldTransform;\n    }\n\n    Vec2F CursorAreaEventListenersLayer::ScreenToLocal(const Vec2F& point) const\n    {\n        if (mParentLayer && mParentLayer != this)\n            return ToLocal(mParentLayer.Lock()->ScreenToLocal(point));\n        \n        return ToLocal(point);\n    }\n\n    Vec2F CursorAreaEventListenersLayer::ScreenFromLocal(const Vec2F& point) const\n    {\n        if (mParentLayer)\n            return FromLocal(mParentLayer.Lock()->ScreenFromLocal(point));\n\n        return FromLocal(point);\n    }\n    \n    const Basis& CursorAreaEventListenersLayer::GetLocalToWorldTransform() const\n    {\n        return mLocalToWorldTransform;\n    }\n    \n    void CursorAreaEventListenersLayer::Update()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        int editorScopeDepth = EditorScope::GetDepth();\n        if (!isEditor)\n            EditorScope::Exit(editorScopeDepth);\n\n        cursorEventAreaListeners.Reverse();\n        mDragListeners.Reverse();\n\n        mLastUnderCursorListeners = mUnderCursorListeners;\n        mUnderCursorListeners.Clear();\n\n        if (mEnabled)\n        {\n            for (const Input::Cursor& cursor : o2Input.GetCursors())\n                ProcessCursorTracing(cursor);\n        }\n\n        ProcessCursorExit();\n        ProcessCursorEnter();\n        ProcessScrolling();\n\n        for (const Input::Cursor& cursor : o2Input.GetCursors())\n        {\n            if (cursor.pressedTime < FLT_EPSILON && cursor.isPressed)\n                ProcessCursorPressed(cursor);\n            else\n                ProcessCursorDown(cursor);\n        }\n\n        for (const Input::Cursor& cursor : o2Input.GetReleasedCursors())\n        {\n            ProcessCursorReleased(cursor);\n            mPressedListeners.Remove(cursor.id);\n        }\n\n        for (const Input::Key& key : o2Input.GetPressedKeys())\n        {\n            if (key.keyCode == -1)\n                ProcessRBPressed();\n            else if (key.keyCode == -2)\n                ProcessMBPressed();\n        }\n\n        for (const Input::Key& key : o2Input.GetDownKeys())\n        {\n            if (key.keyCode == -1)\n                ProcessRBDown();\n            else if (key.keyCode == -2)\n                ProcessMBDown();\n        }\n\n        for (const Input::Key& key : o2Input.GetReleasedKeys())\n        {\n            if (key.keyCode == -1)\n                ProcessRBReleased();\n            else if (key.keyCode == -2)\n                ProcessMBReleased();\n        }\n\n        if (!isEditor)\n            EditorScope::Enter(editorScopeDepth);\n    }\n\n    void CursorAreaEventListenersLayer::PostUpdate()\n    {\n        mClearingBuffers = true;\n\n        cursorEventAreaListeners.Clear();\n        mDragListeners.Clear();\n\n        mClearingBuffers = false;\n    }\n\n    void CursorAreaEventListenersLayer::BreakCursorEvent()\n    {\n        for (auto& kv : mPressedListeners)\n        {\n            for (auto& listener : kv.second)\n            {\n                listener->OnCursorPressBreak(*o2Input.GetCursor(kv.first));\n                listener->mIsPressed = false;\n            }\n        }\n\n        mPressedListeners.Clear();\n    }\n\n    void CursorAreaEventListenersLayer::UnregCursorAreaListener(CursorAreaEventsListener* listener)\n    {\n        if (mClearingBuffers)\n\t\t\treturn;\n\n        cursorEventAreaListeners.RemoveFirst([&](auto& x) { return x == listener; });\n    }\n\n    void CursorAreaEventListenersLayer::UnregDragListener(DragableObject* listener)\n    {\n\t\tif (mClearingBuffers)\n\t\t\treturn;\n\n        mDragListeners.RemoveFirst([&](auto& x) { return x == listener; });\n    }\n\n    Vector<Ref<CursorAreaEventsListener>> CursorAreaEventListenersLayer::GetAllCursorListenersUnderCursor(const Vec2F& cursorPos) const\n    {\n        Vector<Ref<CursorAreaEventsListener>> res;\n        Vec2F localCursorPos = ToLocal(cursorPos);\n        for (auto& listener : cursorEventAreaListeners)\n        {\n            if (!listener || !listener->IsUnderPoint(localCursorPos) || !listener->mScissorRect.IsInside(localCursorPos) || !listener->mInteractable)\n                continue;\n\n            if (auto layer = DynamicCast<CursorAreaEventListenersLayer>(listener))\n                res += layer->GetAllCursorListenersUnderCursor(localCursorPos);\n            else\n                res.Add(listener);\n        }\n\n        return res;\n    }\n\n    bool CursorAreaEventListenersLayer::IsUnderPoint(const Vec2F& point)\n    {\n        return drawnTransform.IsPointInside(point);\n    }\n\n    bool CursorAreaEventListenersLayer::IsInputTransparent() const\n    {\n        return isTransparent;\n    }\n\n\tString CursorAreaEventListenersLayer::GetDebugName() const\n\t{\n\t\treturn CursorAreaEventsListener::GetDebugName() + \"(\" + name = \")\";\n\t}\n\n\tvoid CursorAreaEventListenersLayer::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        mEnabled = true;\n    }\n\n    void CursorAreaEventListenersLayer::OnCursorExit(const Input::Cursor& cursor)\n    {\n        mEnabled = false;\n    }\n\n    Input::Cursor CursorAreaEventListenersLayer::ConvertLocalCursor(const Input::Cursor& cursor) const\n    {\n        Input::Cursor localCursor = cursor;\n        localCursor.position = ScreenToLocal(cursor.position);\n        localCursor.delta = ScreenToLocal(cursor.position) - ScreenToLocal(cursor.position - cursor.delta);\n\n        return localCursor;\n    }\n\n    void CursorAreaEventListenersLayer::ProcessCursorTracing(const Input::Cursor& cursor)\n    {\n        auto localCursor = ConvertLocalCursor(cursor);\n\n        for (auto& listener : cursorEventAreaListeners)\n        {\n            if (!listener || !listener->IsUnderPoint(localCursor.position) || !listener->mScissorRect.IsInside(localCursor.position))\n                continue;\n\n            auto drag = DynamicCast<DragableObject>(listener);\n            if (drag && drag->IsDragging())\n                continue;\n\n            if (!mUnderCursorListeners.ContainsKey(localCursor.id))\n                mUnderCursorListeners.Add(localCursor.id, {});\n            \n            mUnderCursorListeners[localCursor.id].Add(listener);\n\n            if (!listener->IsInputTransparent())\n                return;\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessCursorEnter()\n    {\n        for (auto& underCursorListeners : mUnderCursorListeners)\n        {\n            bool lastListenersHasSameCursor = mLastUnderCursorListeners.ContainsKey(underCursorListeners.first);\n            for (auto& listener : underCursorListeners.second)\n            {\n                if (!lastListenersHasSameCursor || !mLastUnderCursorListeners[underCursorListeners.first].Contains(listener))\n                    listener->OnCursorEnter(ConvertLocalCursor(*o2Input.GetCursor(underCursorListeners.first)));\n            }\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessCursorExit()\n    {\n        for (auto& lastUnderCursorListeners : mLastUnderCursorListeners)\n        {\n            bool listenersHasSameCursor = mUnderCursorListeners.ContainsKey(lastUnderCursorListeners.first);\n            for (auto& listener : lastUnderCursorListeners.second)\n            {\n                if (!listenersHasSameCursor || !mUnderCursorListeners[lastUnderCursorListeners.first].Contains(listener))\n                    listener->OnCursorExit(ConvertLocalCursor(*o2Input.GetCursor(lastUnderCursorListeners.first)));\n            }\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessCursorPressed(const Input::Cursor& cursor)\n    {\n        auto localCursor = ConvertLocalCursor(cursor);\n\n        for (auto& listener : cursorEventAreaListeners)\n        {\n            if (listener && !listener->IsUnderPoint(localCursor.position))\n                listener->OnCursorPressedOutside(localCursor);\n        }\n\n        if (!mUnderCursorListeners.ContainsKey(localCursor.id))\n            return;\n\n        for (auto& listener : mUnderCursorListeners[localCursor.id])\n        {\n            float time = o2Time.GetApplicationTime();\n            float s = time - listener->mLastPressedTime;\n            float x = o2Events.GetDoubleClickTime();\n            float d = s - x;\n            if (d < 0)\n                listener->OnCursorDblClicked(localCursor);\n            else\n            {\n                if (!mPressedListeners.ContainsKey(localCursor.id))\n                    mPressedListeners.Add(localCursor.id, {});\n\n                mPressedListeners[localCursor.id].Add(listener);\n                listener->OnCursorPressed(localCursor);\n                listener->mIsPressed = true;\n                listener->mLastPressedTime = time;\n            }\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessCursorDown(const Input::Cursor& cursor)\n    {\n        auto localCursor = ConvertLocalCursor(cursor);\n\n        if (mPressedListeners.ContainsKey(localCursor.id))\n        {\n            bool broken = false;\n            for (auto it = mPressedListeners[localCursor.id].begin(); it != mPressedListeners[localCursor.id].end();)\n            {\n                if (!broken)\n                {\n                    (*it)->OnCursorStillDown(localCursor);\n\n                    if (!(*it)->IsInputTransparent())\n                        broken = true;\n\n                    ++it;\n                }\n                else\n                {\n                    (*it)->OnCursorPressBreak(*o2Input.GetCursor(localCursor.id));\n                    (*it)->mIsPressed = false;\n\n                    it = mPressedListeners[localCursor.id].Remove(it);\n                }\n            }\n        }\n\n        if (localCursor.delta.Length() > FLT_EPSILON)\n        {\n            if (mUnderCursorListeners.ContainsKey(localCursor.id))\n            {\n                for (auto& listener : mUnderCursorListeners[localCursor.id])\n                    listener->OnCursorMoved(localCursor);\n            }\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessCursorReleased(const Input::Cursor& cursor)\n    {\n        auto localCursor = ConvertLocalCursor(cursor);\n\n        for (auto& listener : cursorEventAreaListeners)\n        {\n            if (listener && !listener->IsUnderPoint(localCursor.position))\n                listener->OnCursorReleasedOutside(localCursor);\n        }\n\n        if (mPressedListeners.ContainsKey(localCursor.id))\n        {\n            for (auto& listener : mPressedListeners[localCursor.id])\n            {\n                listener->mIsPressed = false;\n                listener->OnCursorReleased(localCursor);\n            }\n\n            mPressedListeners.Remove(localCursor.id);\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessRBPressed()\n    {\n\t\tauto localCursor = ConvertLocalCursor(*o2Input.GetCursor(0));\n\n\t\tmRightButtonPressedListeners.Clear();\n\n        if (!mUnderCursorListeners.ContainsKey(localCursor.id))\n            return;\n\n        auto listeners = mUnderCursorListeners[localCursor.id];\n        for (auto& listener : listeners)\n        {\n            mRightButtonPressedListeners.Add(listener);\n\n            listener->OnCursorRightMousePressed(localCursor);\n            listener->mIsRightMousePressed = true;\n\n            if (!listener->IsInputTransparent())\n                break;\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessRBDown()\n    {\n        auto localCursor = ConvertLocalCursor(*o2Input.GetCursor(0));\n\n        bool broken = false;\n        for (auto it = mRightButtonPressedListeners.begin(); it != mRightButtonPressedListeners.end();)\n        {\n            if (!broken)\n            {\n                (*it)->OnCursorRightMouseStayDown(localCursor);\n\n                if (!(*it)->IsInputTransparent())\n                    broken = true;\n\n                ++it;\n            }\n            else\n            {\n                (*it)->OnCursorPressBreak(*o2Input.GetCursor(localCursor.id));\n                (*it)->mIsPressed = false;\n\n                it = mRightButtonPressedListeners.Remove(it);\n            }\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessRBReleased()\n    {\n        auto localCursor = ConvertLocalCursor(*o2Input.GetCursor(0));\n\n        for (auto& listener : mRightButtonPressedListeners)\n        {\n            listener->OnCursorRightMouseReleased(localCursor);\n            listener->mIsRightMousePressed = false;\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessMBPressed()\n    {\n\t\tauto localCursor = ConvertLocalCursor(*o2Input.GetCursor(0));\n\n\t\tmMiddleButtonPressedListeners.Clear();\n\n        if (!mUnderCursorListeners.ContainsKey(localCursor.id))\n            return;\n\n        auto listeners = mUnderCursorListeners[localCursor.id];\n        for (auto& listener : listeners)\n        {\n            mMiddleButtonPressedListeners.Add(listener);\n\n            listener->OnCursorMiddleMousePressed(localCursor);\n            listener->mIsMiddleMousePressed = true;\n\n            if (!listener->IsInputTransparent())\n                break;\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessMBDown()\n    {\n        auto localCursor = ConvertLocalCursor(*o2Input.GetCursor(0));\n\n        bool broken = false;\n        for (auto it = mMiddleButtonPressedListeners.begin(); it != mMiddleButtonPressedListeners.end();)\n        {\n            if (!broken)\n            {\n                (*it)->OnCursorMiddleMouseStayDown(localCursor);\n\n                if (!(*it)->IsInputTransparent())\n                    broken = true;\n\n                ++it;\n            }\n            else\n            {\n                (*it)->OnCursorPressBreak(*o2Input.GetCursor(localCursor.id));\n                (*it)->mIsMiddleMousePressed = false;\n\n                it = mMiddleButtonPressedListeners.Remove(it);\n            }\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessMBReleased()\n    {\n        auto localCursor = ConvertLocalCursor(*o2Input.GetCursor(0));\n\n        for (auto& listener : mMiddleButtonPressedListeners)\n        {\n            listener->OnCursorRightMouseReleased(localCursor);\n            listener->mIsMiddleMousePressed = false;\n        }\n    }\n\n    void CursorAreaEventListenersLayer::ProcessScrolling()\n    {\n        float scroll = o2Input.GetMouseWheelDelta();\n        if (!Math::Equals(scroll, 0.0f))\n        {\n            for (auto& kv : mUnderCursorListeners)\n            {\n                for (auto& listener : kv.second)\n                {\n                    if (!listener->IsScrollable())\n                        continue;\n\n                    listener->OnScrolled(scroll);\n\n                    if (!listener->IsInputTransparent())\n                        break;\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/CursorAreaEventsListenersLayer.h",
    "content": "#pragma once\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Render/Camera.h\"\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(DragableObject);\n\n    class CursorAreaEventListenersLayer: public RefCounterable, public CursorAreaEventsListener\n    {\n    public:\n\t\tBasis  drawnTransform; // Transform at drawing moment\n\t\tBasis  viewPortBasis;  // Camera view port basis before layer content drawing moment\n\t\tBasis  renderBasis;    // Camera render basis after layer content drawing moment\n\t\tCamera camera;         // Camera used to draw this layer\n\n\t\tVector<Ref<CursorAreaEventsListener>> cursorEventAreaListeners; // List of contained cursor event listeners\n\n        bool isEditor      = false; // Is this layer drawn in editor scope\n        bool isTransparent = false; // Is this layer transparent to input other listeners\n\n\t\tString name; // Layer name, used to debug\n\n    public:\n        // Destructor. Unregisters from events system\n        ~CursorAreaEventListenersLayer();\n\n        // Called when layer sub listeners has began draw with actual camera\n        void OnBeginDraw();\n\n        // Called when layer sub listeners has ended to draw\n        void OnEndDraw();\n\n        // Called when layer has drawn\n        void OnDrawn(const Basis& transform);\n\n        // Converts point to local coordinates from parent layer\n        Vec2F ToLocal(const Vec2F& point) const;\n\n        // Converts from local point from parent layer\n        Vec2F FromLocal(const Vec2F& point) const;\n\n        // Converts point to local coordinates from screen coordinates\n        Vec2F ScreenToLocal(const Vec2F& point) const;\n\n        // Converts from local point from screen coordinates\n        Vec2F ScreenFromLocal(const Vec2F& point) const;\n        \n        // Returns local to world transform\n        const Basis& GetLocalToWorldTransform() const;\n\n        // Updates and processes events\n        void Update();\n\n        // Post update events\n        void PostUpdate();\n\n        // Breaks cursor event. All pressed listeners will be unpressed with specific event OnPressBreak\n        void BreakCursorEvent();\n\n        // Unregistering cursor area events listener\n        void UnregCursorAreaListener(CursorAreaEventsListener* listener);\n\n        // Unregistering drag events listener\n        void UnregDragListener(DragableObject* listener);\n\n        // Returns all cursor listeners under cursor arranged by depth\n        Vector<Ref<CursorAreaEventsListener>> GetAllCursorListenersUnderCursor(const Vec2F& cursorPos) const;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n\t\t// Returns debug name\n\t\tString GetDebugName() const override;\n\n    private:\n        bool mEnabled = false;\n\n        Basis mLocalToWorldTransform = Basis::Identity();\n\n        WeakRef<CursorAreaEventListenersLayer> mParentLayer; // Layer in which this\n\n        Map<CursorId, Vector<Ref<CursorAreaEventsListener>>> mPressedListeners;             // Pressed listeners for all pressed cursors\n        Vector<Ref<CursorAreaEventsListener>>                mRightButtonPressedListeners;  // Right mouse button pressed listener\n        Vector<Ref<CursorAreaEventsListener>>                mMiddleButtonPressedListeners; // Middle mouse button pressed listener\n\n        Map<CursorId, Vector<Ref<CursorAreaEventsListener>>> mUnderCursorListeners;     // Under cursor listeners for each cursor\n        Map<CursorId, Vector<Ref<CursorAreaEventsListener>>> mLastUnderCursorListeners; // Under cursor listeners for each cursor on last frame\n\n        Vector<Ref<DragableObject>> mDragListeners; // Drag events listeners\n\n\t\tbool mClearingBuffers = false; // True when clearing buffers of cursor listeners lists. Used to avoid recursive calls\n\n    private:\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Converts cursor to local coordinates\n        Input::Cursor ConvertLocalCursor(const Input::Cursor& cursor) const;\n\n        // processes cursor tracing for cursor\n        void ProcessCursorTracing(const Input::Cursor& cursor);\n\n        // Processes cursor enter event\n        void ProcessCursorEnter();\n\n        // Processes cursor exit event\n        void ProcessCursorExit();\n\n        // Processes cursor pressed event\n        void ProcessCursorPressed(const Input::Cursor& cursor);\n\n        // Processes cursor down event\n        void ProcessCursorDown(const Input::Cursor& cursor);\n\n        // Processes cursor released event\n        void ProcessCursorReleased(const Input::Cursor& cursor);\n\n        // Processes mouse right button pressed event\n        void ProcessRBPressed();\n\n        // Processes mouse right button down event\n        void ProcessRBDown();\n\n        // Processes mouse right button released event\n        void ProcessRBReleased();\n\n        // Processes mouse middle button pressed event\n        void ProcessMBPressed();\n\n        // Processes mouse middle button down event\n        void ProcessMBDown();\n\n        // Processes mouse middle button released event\n        void ProcessMBReleased();\n\n        // Processes scrolling event\n        void ProcessScrolling();\n\n        REF_COUNTERABLE_IMPL(RefCounterable);\n\n        friend class EventSystem;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/CursorEventsArea.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"CursorEventsArea.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n\n    CursorEventsArea::CursorEventsArea():\n        cursorType(CursorType::Arrow)\n    {}\n\n    bool CursorEventsArea::IsUnderPoint(const Vec2F& point)\n    {\n        return isUnderPoint(point);\n    }\n\n    bool CursorEventsArea::IsInputTransparent() const\n    {\n        return isInputTransparent;\n    }\n\n    void CursorEventsArea::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        onCursorPressed(cursor);\n    }\n\n    void CursorEventsArea::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        onCursorReleased(cursor);\n        if (!IsUnderPoint(cursor.position))\n            o2Application.SetCursor(CursorType::Arrow);\n    }\n\n    void CursorEventsArea::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        onCursorReleased(cursor);\n        if (!IsUnderPoint(cursor.position))\n            o2Application.SetCursor(CursorType::Arrow);\n    }\n\n    void CursorEventsArea::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (cursor.delta != Vec2F())\n            onMoved(cursor);\n    }\n\n    void CursorEventsArea::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        onCursorEnter(cursor);\n        if (!cursor.isPressed)\n            o2Application.SetCursor(cursorType);\n    }\n\n    void CursorEventsArea::OnCursorExit(const Input::Cursor& cursor)\n    {\n        onCursorExit(cursor);\n        if (!IsPressed() && !cursor.isPressed)\n            o2Application.SetCursor(CursorType::Arrow);\n    }\n\n    void CursorEventsArea::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        onDblClicked(cursor);\n    }\n\n    void CursorEventsArea::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n        onCursorPressedOutside(cursor);\n    }\n\n    void CursorEventsArea::OnCursorRightMousePressed(const Input::Cursor& cursor)\n    {\n        onRightMousePressed(cursor);\n    }\n\n    void CursorEventsArea::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        onRightMouseReleased(cursor);\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/CursorEventsArea.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorAreaEventsListener.h\"\n\nnamespace o2\n{\n    // -----------------------------\n    // Functional cursor events area \n    // -----------------------------\n    class CursorEventsArea: public RefCounterable, public CursorAreaEventsListener\n    {\n    public:\n        Function<bool(const Vec2F&)>         isUnderPoint;           // Function for detecting collision (parameter - cursor position)\n\n        Function<void(const Input::Cursor&)> onMoved;                // Event when cursor was moved (parameter - cursor)\n        Function<void(const Input::Cursor&)> onCursorPressed;        // Event when cursor was pressed\n        Function<void(const Input::Cursor&)> onCursorPressedOutside; // Event when cursor was pressed outside\n        Function<void(const Input::Cursor&)> onCursorReleased;       // Event when cursor was released\n        Function<void(const Input::Cursor&)> onCursorEnter;          // Event when cursor was entered to handle\n        Function<void(const Input::Cursor&)> onCursorExit;           // Event when cursor was exited to handle\n        Function<void(const Input::Cursor&)> onDblClicked;           // Event when cursor double clicked on this\n\n        Function<void(const Input::Cursor&)> onRightMousePressed;    // Event when right mouse button pressed\n        Function<void(const Input::Cursor&)> onRightMouseReleased;   // Event when right mouse button released\n\n    public:\n        CursorType cursorType; // Cursor type when hovering and dragging\n\n        bool isInputTransparent = false; // Is input transparent, clicks pass through\n\n    public:\n        // Default constructor\n        CursorEventsArea();\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n    protected:\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when cursor double clicked\n        void OnCursorDblClicked(const Input::Cursor& cursor) override;\n\n        // Called when cursor released outside this(only when cursor pressed this at previous time)\n        void OnCursorReleasedOutside(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was pressed on this\n        void OnCursorRightMousePressed(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        REF_COUNTERABLE_IMPL(RefCounterable);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/DrawableCursorEventsListener.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"DrawableCursorEventsListener.h\"\n\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Utils/Function/Function.h\"\n\nnamespace o2\n{\n\n    DrawableCursorEventsListener::DrawableCursorEventsListener(IDrawable* drawable /*= nullptr*/):\n        mEventHandleDrawable(nullptr)\n    {\n        SetEventHandleDrawable(drawable);\n    }\n\n    DrawableCursorEventsListener::DrawableCursorEventsListener(const DrawableCursorEventsListener& other):\n        CursorAreaEventsListener(other), mEventHandleDrawable(nullptr)\n    {\n        SetEventHandleDrawable(other.mEventHandleDrawable);\n    }\n\n    DrawableCursorEventsListener::~DrawableCursorEventsListener()\n    {\n        if (mEventHandleDrawable)\n            mEventHandleDrawable->onDraw -= MakeFunction(this, &DrawableCursorEventsListener::OnDrawn);\n    }\n\n    void DrawableCursorEventsListener::SetEventHandleDrawable(IDrawable* drawable)\n    {\n        if (mEventHandleDrawable)\n            mEventHandleDrawable->onDraw -= MakeFunction(this, &DrawableCursorEventsListener::OnDrawn);\n\n        mEventHandleDrawable = drawable;\n\n        if (mEventHandleDrawable)\n            mEventHandleDrawable->onDraw += MakeFunction(this, &DrawableCursorEventsListener::OnDrawn);\n    }\n\n    IDrawable* DrawableCursorEventsListener::GetEventHandleDrawable() const\n    {\n        return mEventHandleDrawable;\n    }\n\n    bool DrawableCursorEventsListener::IsUnderPoint(const Vec2F& point)\n    {\n        return mEventHandleDrawable ? mEventHandleDrawable->IsUnderPoint(point) : false;\n    }\n\n    void DrawableCursorEventsListener::OnDrawn()\n    {\n        CursorAreaEventsListener::OnDrawn();\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/DrawableCursorEventsListener.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorAreaEventsListener.h\"\n\nnamespace o2\n{\n    // --------------------------------------------------------------------\n    // Drawable cursor events listener. Reacts to something drawable object\n    // --------------------------------------------------------------------\n    class DrawableCursorEventsListener: virtual public CursorAreaEventsListener\n    {\n    public:\n        PROPERTIES(DrawableCursorEventsListener);\n        PROPERTY(IDrawable*, eventHandleDrawable, SetEventHandleDrawable, GetEventHandleDrawable); // Target event handling drawable property\n\n    public:\n        // Default constructor\n        DrawableCursorEventsListener(IDrawable* drawable = nullptr);\n\n        // Copy-constructor\n        DrawableCursorEventsListener(const DrawableCursorEventsListener& other);\n\n        // Destructor\n        ~DrawableCursorEventsListener();\n\n        // Sets event handling drawable object\n        void SetEventHandleDrawable(IDrawable* drawable);\n\n        // Returns current event handling drawable object\n        IDrawable* GetEventHandleDrawable() const;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point);\n\n    protected:\n        IDrawable* mEventHandleDrawable;\n\n    protected:\n        // Called when listener was drawn\n        void OnDrawn();\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/EventSystem.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"EventSystem.h\"\n\n#include \"o2/Events/ApplicationEventsListener.h\"\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Events/ShortcutKeysListener.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Editor/DragAndDrop.h\"\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n#undef DrawText\n\n    DECLARE_SINGLETON(EventSystem);\n\n    FORWARD_REF_IMPL(ApplicationEventsListener);\n    FORWARD_REF_IMPL(CursorAreaEventsListener);\n    FORWARD_REF_IMPL(CursorEventsListener);\n    FORWARD_REF_IMPL(DragableObject);\n    FORWARD_REF_IMPL(KeyboardEventsListener);\n    FORWARD_REF_IMPL(ShortcutKeysListenersManager);\n\n    EventSystem::EventSystem(RefCounter* refCounter):\n        Singleton<EventSystem>(refCounter)\n    {\n        PushEditorScopeOnStack scope;\n\n        mCursorAreaListenersBasicLayer = mmake<CursorAreaEventListenersLayer>();\n        mShortcutEventsManager = mmake<ShortcutKeysListenersManager>();\n\n        mCurrentCursorAreaEventsLayer = mCursorAreaListenersBasicLayer;\n        mCursorAreaListenersBasicLayer->mEnabled = true;\n    }\n\n    EventSystem::~EventSystem()\n    {\n        mInstance = nullptr;\n    }\n\n    float EventSystem::GetDoubleClickTime() const\n    {\n        return mDblClickTime;\n    }\n\n    void EventSystem::Update()\n    {\n        for (auto& layer : mCursorAreaEventsListenersLayers)\n        {\n            if (auto layerPtr = layer.Lock())\n            {\n                mCurrentCursorAreaEventsLayer = layerPtr;\n                layerPtr->Update();\n            }\n        }\n\n        for (const Input::Cursor& cursor : o2Input.GetCursors())\n        {\n            if (cursor.pressedTime < FLT_EPSILON && cursor.isPressed)\n            {\n                for (auto& listener : mCursorListeners)\n                    listener.Lock()->OnCursorPressed(cursor);\n            }\n            else\n            {\n                for (auto& listener : mCursorListeners)\n                    listener.Lock()->OnCursorStillDown(cursor);\n            }\n        }\n\n        for (const Input::Cursor& cursor : o2Input.GetReleasedCursors())\n        {\n            for (auto& listener : mCursorListeners)\n                listener.Lock()->OnCursorReleased(cursor);\n        }\n\n        const Input::Cursor& cursor = *o2Input.GetCursor(0);\n\n        for (const Input::Key& key : o2Input.GetPressedKeys())\n        {\n            if (key.keyCode == -1)\n            {\n                for (auto& listener : mCursorListeners)\n                    listener.Lock()->OnCursorRightMousePressed(cursor);\n            }\n            else if (key.keyCode == -2)\n            {\n                for (auto& listener : mCursorListeners)\n                    listener.Lock()->OnCursorMiddleMousePressed(cursor);\n            }\n            else\n            {\n                ProcessKeyPressed(key);\n            }\n        }\n\n        for (const Input::Key& key : o2Input.GetDownKeys())\n        {\n            if (key.keyCode == -1)\n            {\n                for (auto& listener : mCursorListeners)\n                    listener.Lock()->OnCursorRightMouseStillDown(cursor);\n            }\n            else if (key.keyCode == -2)\n            {\n                for (auto& listener : mCursorListeners)\n                    listener.Lock()->OnCursorMiddleMouseStillDown(cursor);\n            }\n            else\n                ProcessKeyDown(key);\n        }\n\n        for (const Input::Key& key : o2Input.GetReleasedKeys())\n        {\n            if (key.keyCode == -1)\n            {\n                for (auto& listener : mCursorListeners)\n                    listener.Lock()->OnCursorRightMouseReleased(cursor);\n            }\n            else if (key.keyCode == -2)\n            {\n                for (auto& listener : mCursorListeners)\n                    listener.Lock()->OnCursorMiddleMouseReleased(cursor);\n            }\n            else\n                ProcessKeyReleased(key);\n        }\n        \n        float scroll = o2Input.GetMouseWheelDelta();\n        if (!Math::Equals(scroll, 0.0f))\n        {\n            for (auto& listener : mCursorListeners)\n                listener.Lock()->OnScrolled(scroll);\n        }\n\n        if (o2Input.IsKeyDown(VK_F1))\n        {\n            int line = 0;\n            auto allUnderCursor = o2Input.IsKeyDown(VK_CONTROL) ? \n                GetAllCursorListenersUnderCursor(0) : \n                mCursorAreaListenersBasicLayer->mUnderCursorListeners[0];\n\n            for (auto& listener : allUnderCursor)\n            {\n                String name = listener->GetDebugName();\n\n                if (auto widget = DynamicCast<Widget>(listener))\n                {\n                    String path;\n                    auto parent = widget;\n                    while (parent)\n                    {\n                        path = parent->GetName() + \"/\" + path;\n                        parent = parent->GetParentWidget().Lock();\n                    }\n\n                    name = path + \" : \" + widget->GetType().GetName();\n                    o2Debug.DrawRect(widget->layout->GetWorldRect(), Color4::Red());\n                }\n                else if (auto handle = DynamicCast<DragHandle>(listener))\n                {\n                    if (auto drawable = handle->GetRegularDrawable())\n                        o2Debug.DrawRect(drawable->GetAxisAlignedRect(), Color4::Red());\n                }\n\n                o2Debug.DrawText(Vec2F(-o2Render.GetResolution().x*0.5f, o2Render.GetResolution().y*0.5f - (float)line), name);\n\n                line += 20;\n            }\n        }\n\n        mCurrentCursorAreaEventsLayer = mCursorAreaListenersBasicLayer;\n    }\n\n    void EventSystem::PostUpdate()\n    {\n        for (auto& layer : mCursorAreaEventsListenersLayers)\n            layer.Lock()->PostUpdate();\n\n        mCursorAreaEventsListenersLayers.Clear();\n        mCursorAreaEventsListenersLayers.Add(mCursorAreaListenersBasicLayer);\n    }\n\n    void EventSystem::OnApplicationStarted()\n    {\n        for (auto& listener : mApplicationListeners)\n        {\n            if (listener.Lock()->IsListeningEvents())\n                listener.Lock()->OnApplicationStarted();\n        }\n    }\n\n    void EventSystem::OnApplicationClosing()\n    {\n        for (auto& listener : mApplicationListeners)\n        {\n            if (listener.Lock()->IsListeningEvents())\n                listener.Lock()->OnApplicationClosing();\n        }\n    }\n\n    void EventSystem::OnApplicationActivated()\n    {\n        for (auto& listener : mApplicationListeners)\n        {\n            if (listener.Lock()->IsListeningEvents())\n                listener.Lock()->OnApplicationActivated();\n        }\n    }\n\n    void EventSystem::OnApplicationDeactivated()\n    {\n        for (auto& listener : mApplicationListeners)\n        {\n            if (listener.Lock()->IsListeningEvents())\n                listener.Lock()->OnApplicationDeactivated();\n        }\n    }\n\n    void EventSystem::OnApplicationSized()\n    {\n        for (auto& listener : mApplicationListeners)\n        {\n            if (listener.Lock()->IsListeningEvents())\n                listener.Lock()->OnApplicationSized();\n        }\n    }\n\n    bool EventSystem::eventsListenersEnabledByDefault = true;\n\n    Vector<Ref<CursorAreaEventsListener>> EventSystem::GetAllCursorListenersUnderCursor(CursorId cursorId) const\n    {\n        return mCursorAreaListenersBasicLayer->GetAllCursorListenersUnderCursor(o2Input.GetCursorPos(cursorId));\n    }\n\n\tRef<CursorAreaEventListenersLayer> EventSystem::GetCurrentCursorAreaEventsLayer() const\n\t{\n\t\treturn mCurrentCursorAreaEventsLayer;\n\t}\n\n\tvoid EventSystem::BreakCursorEvent()\n    {\n        for (auto& layer : mCursorAreaEventsListenersLayers)\n            layer.Lock()->BreakCursorEvent();\n    }\n\n    void EventSystem::ProcessKeyPressed(const Input::Key& key)\n    {\n        auto listeners = mKeyboardListeners;\n        for (auto& listener : listeners)\n        {\n            if (listener.Lock()->mEnabledListeningEvents)\n                listener.Lock()->OnKeyPressed(key);\n        }\n    }\n\n    void EventSystem::ProcessKeyDown(const Input::Key& key)\n    {\n        auto listeners = mKeyboardListeners;\n        for (auto& listener : listeners)\n        {\n            if (listener.Lock()->mEnabledListeningEvents)\n                listener.Lock()->OnKeyStayDown(key);\n        }\n    }\n\n    void EventSystem::ProcessKeyReleased(const Input::Key& key)\n    {\n        auto listeners = mKeyboardListeners;\n        for (auto& listener : listeners)\n        {\n            if (listener.Lock()->mEnabledListeningEvents)\n                listener.Lock()->OnKeyReleased(key);\n        }\n    }\n\n    void EventSystem::PushCursorAreaEventsListenersLayer(const Ref<CursorAreaEventListenersLayer>& layer)\n    {\n        if (layer)\n        {\n            layer->mParentLayer = mInstance->mCurrentCursorAreaEventsLayer;\n\n            mInstance->mCurrentCursorAreaEventsLayer = layer;\n            mInstance->mCursorAreaEventsListenersLayers.Add(layer);\n            mInstance->mLayersStack.Add(layer);\n        }\n    }\n\n    void EventSystem::PopCursorAreaEventsListenersLayer()\n    {\n        mInstance->mLayersStack.PopBack();\n        if (!mInstance->mLayersStack.IsEmpty())\n            mInstance->mCurrentCursorAreaEventsLayer = mInstance->mLayersStack.Last();\n        else\n            mInstance->mCurrentCursorAreaEventsLayer = mInstance->mCursorAreaListenersBasicLayer;\n    }\n\n    void EventSystem::RemoveCursorAreaEventsListenersLayer(const WeakRef<CursorAreaEventListenersLayer>& layer)\n    {\n        mInstance->mCursorAreaEventsListenersLayers.Remove(layer);\n    }\n\n    void EventSystem::DrawnCursorAreaListener(const Ref<CursorAreaEventsListener>& listener)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (!listener->IsListeningEvents())\n            return;\n\n        mInstance->mCurrentCursorAreaEventsLayer->cursorEventAreaListeners.Add(listener);\n    }\n\n    void EventSystem::UnregCursorAreaListener(CursorAreaEventsListener* listener)\n    {\n        auto listenerLayer = dynamic_cast<CursorAreaEventListenersLayer*>(listener);\n        for (auto& layer : mInstance->mCursorAreaEventsListenersLayers)\n        {\n            if (layer != listenerLayer)\n                layer.Lock()->UnregCursorAreaListener(listener);\n        }\n    }\n\n    void EventSystem::RegCursorListener(const Ref<CursorEventsListener>& listener)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (mInstance)\n            mInstance->mCursorListeners.Add(listener);\n    }\n\n    void EventSystem::UnregCursorListener(const WeakRef<CursorEventsListener>& listener)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (mInstance)\n            mInstance->mCursorListeners.Remove(listener);\n    }\n\n    void EventSystem::RegDragListener(const Ref<DragableObject>& listener)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (mInstance)\n            mInstance->mCurrentCursorAreaEventsLayer->mDragListeners.Add(Ref(listener));\n    }\n\n    void EventSystem::UnregDragListener(DragableObject* listener)\n    {\n        if (mInstance)\n        {\n            for (auto& layer : mInstance->mCursorAreaEventsListenersLayers)\n                layer.Lock()->UnregDragListener(listener);\n        }\n    }\n\n    void EventSystem::RegKeyboardListener(const Ref<KeyboardEventsListener>& listener)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (mInstance)\n            mInstance->mKeyboardListeners.Add(Ref(listener));\n    }\n\n    void EventSystem::UnregKeyboardListener(KeyboardEventsListener* listener)\n    {\n        if (mInstance)\n            mInstance->mKeyboardListeners.RemoveFirst([&](auto& x) { return x == listener; });\n    }\n\n    void EventSystem::RegApplicationListener(const Ref<ApplicationEventsListener>& listener)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (mInstance)\n            mInstance->mApplicationListeners.Add(listener);\n    }\n\n    void EventSystem::UnregApplicationListener(ApplicationEventsListener* listener)\n    {\n        if (mInstance)\n            mInstance->mApplicationListeners.RemoveFirst([&](auto& x) { return x == listener; });\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/EventSystem.h",
    "content": "#pragma once\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Events/CursorAreaEventsListenersLayer.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\n// Events system accessor macros\n#define o2Events o2::EventSystem::Instance()\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(ApplicationEventsListener);\n    FORWARD_CLASS_REF(CursorAreaEventsListener);\n    FORWARD_CLASS_REF(CursorEventsListener);\n    FORWARD_CLASS_REF(DragableObject); \n    FORWARD_CLASS_REF(KeyboardEventsListener);\n    FORWARD_CLASS_REF(ShortcutKeysListenersManager);\n\n    // -----------------------\n    // Event processing system\n    // -----------------------\n    class EventSystem: public Singleton<EventSystem>\n    {\n    public:\n        static bool eventsListenersEnabledByDefault; // Then it is true, new events listeners will be enabled on initialization\n\n    public:\n        // Default constructor\n        EventSystem(RefCounter* refCounter);\n\n        // Destructor\n        ~EventSystem();\n\n        // Returns all cursor listeners under cursor arranged by depth\n        Vector<Ref<CursorAreaEventsListener>> GetAllCursorListenersUnderCursor(CursorId cursorId) const;\n\n\t\t// Returns current cursor area events listeners layer at time\n\t\tRef<CursorAreaEventListenersLayer> GetCurrentCursorAreaEventsLayer() const;\n\n        // Breaks cursor event. All pressed listeners will be unpressed with specific event OnPressBreak\n        void BreakCursorEvent();\n\n        // Updates and processes events\n        void Update();\n\n        // Post update events\n        void PostUpdate();\n\n    protected:\n        // Returns time between clicks for double click reaction\n        float GetDoubleClickTime() const;\n\n        // Called when application was started\n        void OnApplicationStarted();\n\n        // Called when application closing\n        void OnApplicationClosing();\n\n        // Called when application activated\n        void OnApplicationActivated();\n\n        // Called when application deactivated\n        void OnApplicationDeactivated();\n\n        // Called when application frame was sized\n        void OnApplicationSized();\n\n        // Processes key pressed event\n        void ProcessKeyPressed(const Input::Key& key);\n\n        // Processes key down event\n        void ProcessKeyDown(const Input::Key& key);\n\n        // Processes key released event\n        void ProcessKeyReleased(const Input::Key& key);\n\n    protected:\n        float mDblClickTime = 0.3f; // Time between clicks for double click reaction\n\n        Vector<WeakRef<CursorEventsListener>> mCursorListeners; // All cursor non area listeners\n\n        Vector<WeakRef<CursorAreaEventListenersLayer>> mCursorAreaEventsListenersLayers; // Drawn cursor area events listeners layers\n        \n        Ref<CursorAreaEventListenersLayer>         mCursorAreaListenersBasicLayer; // Basic cursor area events listeners layer, for main screen\n        Ref<CursorAreaEventListenersLayer>         mCurrentCursorAreaEventsLayer;  // Current list of area listeners\n        Vector<Ref<CursorAreaEventListenersLayer>> mLayersStack;                   // Input layers stack, in order they are pushed\n\n        Vector<WeakRef<KeyboardEventsListener>>    mKeyboardListeners;    // Keyboard events listeners\n        Vector<WeakRef<ApplicationEventsListener>> mApplicationListeners; // Application events listeners\n\n        Ref<ShortcutKeysListenersManager> mShortcutEventsManager; // Shortcut events manager\n\n    protected:\n        // Push current cursor area events listeners layer in layers stack\n        static void PushCursorAreaEventsListenersLayer(const Ref<CursorAreaEventListenersLayer>& layer);\n\n        // Pops current cursor area events listeners layer\n        static void PopCursorAreaEventsListenersLayer();\n\n        // Unregisters layer\n        static void RemoveCursorAreaEventsListenersLayer(const WeakRef<CursorAreaEventListenersLayer>& layer);\n\n        // Registering cursor area events listener\n        static void DrawnCursorAreaListener(const Ref<CursorAreaEventsListener>& listener);\n\n        // Unregistering cursor area events listener\n        static void UnregCursorAreaListener(CursorAreaEventsListener* listener);\n\n        // Registering cursor events listener\n        static void RegCursorListener(const Ref<CursorEventsListener>& listener);\n\n        // Unregistering cursor events listener\n        static void UnregCursorListener(const WeakRef<CursorEventsListener>& listener);\n\n        // Registering drag events listener\n        static void RegDragListener(const Ref<DragableObject>& listener);\n\n        // Unregistering drag events listener\n        static void UnregDragListener(DragableObject* listener);\n\n        // Registering keyboard events listener\n        static void RegKeyboardListener(const Ref<KeyboardEventsListener>& listener);\n\n        // Unregistering keyboard events listener\n        static void UnregKeyboardListener(KeyboardEventsListener* listener);\n\n        // Registering application events listener\n        static void RegApplicationListener(const Ref<ApplicationEventsListener>& listener);\n\n        // Unregistering application events listener\n        static void UnregApplicationListener(ApplicationEventsListener* listener);\n\n        friend class Application;\n        friend class ApplicationEventsListener;\n        friend class CursorAreaEventListenersLayer;\n        friend class CursorAreaEventsListener;\n        friend class CursorEventsListener;\n        friend class DragableObject;\n        friend class Integration;\n        friend class KeyboardEventsListener;\n        friend class WndProcFunc;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/IEventsListener.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"IEventsListener.h\"\n\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n\nnamespace o2\n{\n    IEventsListener::IEventsListener():\n        mEnabledListeningEvents(EventSystem::eventsListenersEnabledByDefault)\n    {\n#if IS_EDITOR\n        mIsEditorMode = EditorScope::IsInScope();\n#endif\n    }\n\n    IEventsListener::~IEventsListener()\n    { }\n\n    bool IEventsListener::IsListeningEvents() const\n    {\n#if IS_EDITOR\n        return mEnabledListeningEvents && mIsEditorMode == EditorScope::IsInScope();\n#else\n        return mEnabledListeningEvents;\n#endif\n    }\n\n    void IEventsListener::SetListeningEvents(bool isListening)\n    {\n        mEnabledListeningEvents = isListening;\n    }\n\n#if IS_EDITOR\n    bool IEventsListener::IsEditorMode() const\n    {\n        return mIsEditorMode;\n    }\n\n    void IEventsListener::SetEditorMode(bool isEditorMode)\n    {\n        mIsEditorMode = isEditorMode;\n    }\n#endif\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/IEventsListener.h",
    "content": "#pragma once\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // -------------------------------------------------------------------\n    // Basic events listener interface. Can be enabler or disabled, \n    // that setting up in constructor by global setting from events system\n    // -------------------------------------------------------------------\n    class IEventsListener: virtual public IRefCounterable\n    {\n    public:\n        // Default constructor. Takes global setting from events system and enables or disables this\n        IEventsListener();\n\n        // Virtual destructor\n        virtual ~IEventsListener();\n\n        // Returns is listener enabled\n        bool IsListeningEvents() const;\n\n        // Sets listener enabled to listen events\n        void SetListeningEvents(bool isListening);\n\n#if IS_EDITOR\n        // Returns is editor mode\n        bool IsEditorMode() const;\n\n        // Sets editor mode\n        void SetEditorMode(bool isEditorMode);\n#endif\n\n    protected:\n        bool mEnabledListeningEvents = true;\n\n#if IS_EDITOR\n        bool mIsEditorMode = false;\n#endif\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/KeyboardEventsListener.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"KeyboardEventsListener.h\"\n\n#include \"o2/Events/EventSystem.h\"\n\nnamespace o2\n{\n    KeyboardEventsListener::KeyboardEventsListener()\n    {\n    }\n\n    KeyboardEventsListener::~KeyboardEventsListener()\n    {\n        EventSystem::UnregKeyboardListener(this);\n    }\n\n    void KeyboardEventsListener::PostRefConstruct()\n    {\n        EventSystem::RegKeyboardListener(Ref(this));\n    }\n\n    void KeyboardEventsListener::OnKeyPressed(const Input::Key& key)\n    {}\n\n    void KeyboardEventsListener::OnKeyReleased(const Input::Key& key)\n    {}\n\n    void KeyboardEventsListener::OnKeyStayDown(const Input::Key& key)\n    {}\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/KeyboardEventsListener.h",
    "content": "#pragma once\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Events/IEventsListener.h\"\n\nnamespace o2\n{\n    // ------------------------\n    // Keyboard events listener\n    // ------------------------\n    class KeyboardEventsListener: public IEventsListener\n    {\n    public:\n        // Default constructor\n        KeyboardEventsListener();\n\n        // Virtual destructor\n        virtual ~KeyboardEventsListener();\n\n        void PostRefConstruct();\n\n    protected:\n        // Called when key was pressed\n        virtual void OnKeyPressed(const Input::Key& key);\n\n        // Called when key was released\n        virtual void OnKeyReleased(const Input::Key& key);\n\n        // Called when key stay down during frame\n        virtual void OnKeyStayDown(const Input::Key& key);\n\n        friend class EventSystem;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/ShortcutKeysListener.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ShortcutKeysListener.h\"\n\nnamespace o2\n{\n    DECLARE_SINGLETON(ShortcutKeysListenersManager);\n\n    ShortcutKeysListener::~ShortcutKeysListener()\n    {\n        ShortcutKeysListenersManager::UnRegister(mShortcut, this);\n    }\n\n    void ShortcutKeysListener::SetMaxPriority()\n    {\n        ShortcutKeysListenersManager::SetMaxPriority(mShortcut, Ref(this));\n    }\n\n    void ShortcutKeysListener::SetMinPriority()\n    {\n        ShortcutKeysListenersManager::SetMinPriority(mShortcut, Ref(this));\n    }\n\n    void ShortcutKeysListener::SetShortcut(const ShortcutKeys& shortcut)\n    {\n        ShortcutKeysListenersManager::UnRegister(mShortcut, this);\n        mShortcut = shortcut;\n        ShortcutKeysListenersManager::Register(mShortcut, Ref(this));\n    }\n\n    const ShortcutKeys& ShortcutKeysListener::GetShortcut() const\n    {\n        return mShortcut;\n    }\n\n    void ShortcutKeysListener::SetEnabled(bool enabled)\n    {\n        if (enabled == mEnabled)\n            return;\n\n        mEnabled = enabled;\n\n        if (mEnabled)\n            ShortcutKeysListenersManager::Register(mShortcut, Ref(this));\n        else\n            ShortcutKeysListenersManager::UnRegister(mShortcut, this);\n    }\n\n    bool ShortcutKeysListener::IsEnabled() const\n    {\n        return mEnabled;\n\t}\n\n\tFunctionalShortcutKeysListener::FunctionalShortcutKeysListener(const Function<void()>& onShortcutPressed):\n\t\tonShortcutPressed(onShortcutPressed)\n\t{}\n\n\tvoid FunctionalShortcutKeysListener::OnShortcutPressed()\n\t{\n        onShortcutPressed();\n\t}\n\n\tRefCounter* FunctionalShortcutKeysListener::GetRefCounter() const\n\t{\n\t\treturn RefCounterable::GetRefCounter();\n\t}\n\n\tShortcutKeysListenersManager::ShortcutKeysListenersManager(RefCounter* refCounter) :\n        Singleton<ShortcutKeysListenersManager>(refCounter)\n    {}\n\n    void ShortcutKeysListenersManager::Register(const ShortcutKeys& shortcut, const Ref<ShortcutKeysListener>& listener)\n    {\n        if (!mInstance)\n            return;\n\n        if (shortcut.IsEmpty())\n            return;\n\n        auto& listeners = mInstance->mListeners;\n\n        if (!listeners.ContainsKey(shortcut))\n            listeners.Add(shortcut, {});\n\n        listeners[shortcut].Insert(listener, 0);\n    }\n\n    void ShortcutKeysListenersManager::UnRegister(const ShortcutKeys& shortcut, ShortcutKeysListener* listener)\n    {\n        if (!mInstance)\n            return;\n\n        auto& listeners = mInstance->mListeners;\n\n        if (!listeners.ContainsKey(shortcut))\n            return;\n\n        listeners[shortcut].RemoveFirst([&](auto& x) { return x == listener; });\n\n        if (listeners[shortcut].IsEmpty())\n            listeners.Remove(shortcut);\n    }\n\n    void ShortcutKeysListenersManager::SetMinPriority(const ShortcutKeys& shortcut, const Ref<ShortcutKeysListener>& listener)\n    {\n        if (!mInstance)\n            return;\n\n        auto& listeners = mInstance->mListeners;\n\n        if (!listeners.ContainsKey(shortcut))\n            return;\n\n        listeners[shortcut].Remove(listener);\n        listeners[shortcut].Insert(listener, 0);\n    }\n\n    void ShortcutKeysListenersManager::SetMaxPriority(const ShortcutKeys& shortcut, const Ref<ShortcutKeysListener>& listener)\n    {\n        if (!mInstance)\n            return;\n\n        auto& listeners = mInstance->mListeners;\n\n        if (!listeners.ContainsKey(shortcut))\n            return;\n\n        listeners[shortcut].Remove(listener);\n        listeners[shortcut].Add(listener);\n    }\n\n    void ShortcutKeysListenersManager::OnKeyPressed(const Input::Key& key)\n    {\n        //o2Debug.Log(\"ShortcutKeysListenersManager::OnKeyPressed: \" + String(key.keyCode));\n\n        for (auto& kv : mListeners)\n        {\n            if (kv.first.IsPressed() && !kv.second.IsEmpty())\n            {\n                for (int i = kv.second.Count() - 1; i >= 0; i--)\n                {\n                    auto listener = kv.second[i].Lock();\n                    if (listener->IsListeningEvents())\n                    {\n                        listener->OnShortcutPressed();\n                        break;\n                    }\n                }\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Events/ShortcutKeysListener.h",
    "content": "#pragma once\n\n#include \"o2/Events/IEventsListener.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Utils/System/ShortcutKeys.h\"\n\nnamespace o2\n{\n    // ----------------------------------------------------------------------------------------\n    // Shortcut keys listener. Calls event when hit shortcut and this listener has max priority\n    // ----------------------------------------------------------------------------------------\n    class ShortcutKeysListener: public IEventsListener\n    {\n    public:\n        // Virtual destructor. Unregistering from manager\n        virtual ~ShortcutKeysListener();\n\n        // Sets maximum priority for this listener\n        void SetMaxPriority();\n\n        // Sets minimal priority\n        void SetMinPriority();\n\n        // Sets shortcut keys and registering in manager\n        void SetShortcut(const ShortcutKeys& shortcut);\n\n        // Returns shortcut keys\n        const ShortcutKeys& GetShortcut() const;\n\n        // Sets enable. Not enabled listeners doesn't react on shortcut\n        void SetEnabled(bool enabled);\n\n        // Returns is enabled. Not enabled listeners doesn't react on shortcut\n        bool IsEnabled() const; \n\n    private:\n        ShortcutKeys mShortcut;\n        bool         mEnabled = true;\n\n    protected:\n        // This event calling when shortcut hit and this listener has max priority\n        virtual void OnShortcutPressed() {}\n\n        friend class ShortcutKeysListenersManager;\n    };\n\n\t// -----------------------------------------------------------------------------------------------\n\t// Functional shortcut keys listener. Contains onShortcutPressed event, calls it when shortcut hit\n\t// -----------------------------------------------------------------------------------------------\n    class FunctionalShortcutKeysListener : public RefCounterable, public ShortcutKeysListener\n    {\n    public:\n\t\tFunction<void()> onShortcutPressed; \n\n    public:\n\t\t// Default constructor\n\t\tFunctionalShortcutKeysListener() = default;\n\n\t\t// Constructor with onShortcutPressed event\n\t\tFunctionalShortcutKeysListener(const Function<void()>& onShortcutPressed);\n\n\t\t// Returns reference counter\n\t\tRefCounter* GetRefCounter() const override;\n\n\tprotected:\n\t\t// This event calling when shortcut hit and this listener has max priority, calls onShortcutPressed event\n\t\tvoid OnShortcutPressed() override;\n    };\n\n\t// -------------------------------------------------------------------------------------\n\t// Shortcut keys listeners manager. Sends events to listeners when shortcut keys pressed\n\t// -------------------------------------------------------------------------------------\n    class ShortcutKeysListenersManager: public Singleton<ShortcutKeysListenersManager>, public KeyboardEventsListener\n    {\n    public:\n        // Default constructor\n        explicit ShortcutKeysListenersManager(RefCounter* refCounter);\n\n    protected:\n        Map<ShortcutKeys, Vector<WeakRef<ShortcutKeysListener>>> mListeners;\n\n    protected:\n        // Registers listener \n        static void Register(const ShortcutKeys& shortcut, const Ref<ShortcutKeysListener>& listener);\n\n        // Unregisters listener\n        static void UnRegister(const ShortcutKeys& shortcut, ShortcutKeysListener* listener);\n\n        // Set listener minimal priority\n        static void SetMinPriority(const ShortcutKeys& shortcut, const Ref<ShortcutKeysListener>& listener);\n\n        // Set listener maximal priority\n        static void SetMaxPriority(const ShortcutKeys& shortcut, const Ref<ShortcutKeysListener>& listener);\n\n        // Called when key was pressed, send event to most priority listener\n        void OnKeyPressed(const Input::Key& key) override;\n\n        REF_COUNTERABLE_IMPL(Singleton<ShortcutKeysListenersManager>);\n\n        friend class ShortcutKeysListener;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Integration.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"o2/Integration.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Config/ProjectConfig.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Physics/PhysicsWorld.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/ConsoleLogStream.h\"\n#include \"o2/Utils/Debug/Log/FileLogStream.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/Debug/Profiling/SimpleProfiler.h\"\n#include \"o2/Utils/Debug/StackTrace.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n#include \"o2/Utils/Tasks/TaskManager.h\"\n\n#include <chrono>\n#include <thread>\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scripts/ScriptEngine.h\"\n#endif\n\nnamespace o2\n{\n    FORWARD_REF_IMPL(Assets);\n    FORWARD_REF_IMPL(EventSystem);\n    FORWARD_REF_IMPL(FileSystem);\n    FORWARD_REF_IMPL(Input);\n    FORWARD_REF_IMPL(PhysicsWorld);\n    FORWARD_REF_IMPL(ProjectConfig);\n    FORWARD_REF_IMPL(Render);\n    FORWARD_REF_IMPL(Scene);\n    FORWARD_REF_IMPL(TaskManager);\n    FORWARD_REF_IMPL(Time);\n    FORWARD_REF_IMPL(UIManager);\n\n#if IS_SCRIPTING_SUPPORTED\n    FORWARD_REF_IMPL(ScriptEngine);\n#endif\n\n\tDECLARE_SINGLETON(Integration);\n\n\tIntegration::Integration(RefCounter* refCounter):\n        Singleton<Integration>(refCounter)\n    {}\n\n    Integration::~Integration()\n    {}\n\n\tvoid Integration::BasicInitialize()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        InitalizeSystems();\n        InitializePlatform();\n        InitiazeRender();\n\t\tInitilizeUIStyles();\n\n        mReady = true;\n    }\n     \n\tvoid Integration::InitializePlatform()\n\t{}\n\n\tvoid Integration::Deinitialize()\n    {\n        DeinitializeSystems();\n    }\n\n    void Integration::OnResized(const Vec2I& size)\n    {        \n        if (!mReady)\n            return;\n        \n        mRender->OnFrameResized();\n        o2Events.OnApplicationSized();\n    }\n\n    void Integration::UpdateScene(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n        mScene->Update(dt);\n    }\n\n    void Integration::FixedUpdateScene(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n        mScene->FixedUpdate(dt);\n    }\n\n    void Integration::PreUpdatePhysics()\n    {\n        PROFILE_SAMPLE_FUNC();\n        mPhysics->PreUpdate();\n    }\n\n    void Integration::UpdatePhysics(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n        mPhysics->Update(dt);\n    }\n\n    void Integration::PostUpdatePhysics()\n    {\n        PROFILE_SAMPLE_FUNC();\n        mPhysics->PostUpdate();\n    }\n\n    void Integration::UpdateTaskManager(float dt)\n    {\n        mTaskManager->Update(dt);\n    }\n\n    void Integration::InitalizeSystems()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        srand((UInt)time(NULL));\n\n        mTime = mmake<Time>();\n\n        mLog = mmake<LogStream>(\"Application\");\n        o2Debug.GetLog()->BindStream(mLog);\n\n        mProjectConfig = mmake<ProjectConfig>();\n\n        mAssets = mmake<Assets>();\n\n        mInput = mmake<Input>();\n        mMainListenersLayer = mmake<CursorAreaEventListenersLayer>();\n\n        mTaskManager = mmake<TaskManager>();\n\n        mTimer.Reset();\n\n        mEventSystem = mmake<EventSystem>();\n\n        mUIManager = mmake<UIManager>();\n\n        mScene = mmake<Scene>();\n\n        mPhysics = mmake<PhysicsWorld>();\n\n#if IS_SCRIPTING_SUPPORTED\n        mScriptingEngine = mmake<ScriptEngine>();\n#endif\n\n        mLog->Out(\"Initialized\");\n    }\n\n\tvoid Integration::InitiazeRender()\n\t{\n\t\tmRender = mmake<Render>();\n\n\t\to2Debug.InitializeFont();\n\t}\n\n\tvoid Integration::InitilizeUIStyles()\n\t{\n\t\to2UI.TryLoadStyle();\n\t}\n\n\tvoid Integration::DeinitializeSystems()\n    {\n        Scene::DestroySingleton(mScene);\n        Input::DestroySingleton(mInput);\n        ProjectConfig::DestroySingleton(mProjectConfig);\n        PhysicsWorld::DestroySingleton(mPhysics);\n        TaskManager::DestroySingleton(mTaskManager);\n        UIManager::DestroySingleton(mUIManager);\n        EventSystem::DestroySingleton(mEventSystem);\n\t\to2Debug.DeinitializeFont();\n\t\tAssets::DestroySingleton(mAssets);\n        Render::DestroySingleton(mRender);\n        Time::DestroySingleton(mTime);\n        \n        mLog = nullptr;\n    }\n\n    void Integration::ProcessFrame()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mReady)\n            return;\n\n        float dt = 0, realDt = 0;\n\t\tCalculateAndSyncFPS(dt, realDt);\n\n\t\tPreUpdateFrame(dt, realDt);\n        MainUpdateFrame(dt);\n\t\tUpdateFrameFixed(dt);\n\n\t\tPreDrawFrame();\n        DrawFrame();\n        PostDrawFrame();\n\n\t\tPostUpdateFrame(dt);\n\n        PROFILE_FRAME();\n    }\n\n\tvoid Integration::CalculateAndSyncFPS(float& dt, float& realDt)\n\t{\n\t\tPROFILE_SAMPLE(\"ProcessFrame:Begin\");\n\n\t\tfloat maxFPSDeltaTime = 1.0f / (float)maxFPS;\n\n\t\trealDt = mTimer.GetDeltaTime();\n\n\t\tif (realDt < maxFPSDeltaTime)\n\t\t{\n\t\t\tstd::this_thread::sleep_for(std::chrono::milliseconds((int)((maxFPSDeltaTime - realDt) * 1000.0f)));\n\t\t\trealDt = maxFPSDeltaTime;\n\t\t}\n\n\t\tdt = Math::Clamp(realDt, 0.001f, 0.05f);\n\t}\n\n\tvoid Integration::PreUpdateFrame(float dt, float realDt)\n\t{\n\t\tmInput->PreUpdate();\n\n\t\tmTime->Update(realDt);\n\t\tUpdateDebug(dt);\n\t\tUpdateTaskManager(dt);\n\t\tUpdateEventSystem();\n\t}\n\n\tvoid Integration::UpdateFrameFixed(float dt)\n\t{\n\t\tPROFILE_SAMPLE(\"ProcessFrame:Fixed update loop\");\n\n\t\tmAccumulatedDT += dt;\n\t\tfloat fixedDT = 1.0f / (float)fixedFPS;\n\t\twhile (mAccumulatedDT > fixedDT)\n\t\t{\n\t\t\tOnFixedUpdate(fixedDT);\n\t\t\tFixedUpdateScene(fixedDT);\n\n\t\t\tPreUpdatePhysics();\n\t\t\tUpdatePhysics(fixedDT);\n\t\t\tPostUpdatePhysics();\n\n\t\t\tmAccumulatedDT -= fixedDT;\n\t\t}\n\t}\n\n\tvoid Integration::MainUpdateFrame(float dt)\n\t{\n\t\tOnUpdate(dt);\n\t\tUpdateScene(dt);\n\n\t\tPostUpdateEventSystem();\n\t}\n\n\tvoid Integration::PreDrawFrame()\n\t{\n\t\tmRender->Begin();\n\n\t\tmMainListenersLayer->OnBeginDraw();\n\t\tmRender->SetCamera(Camera());\n\t\tmMainListenersLayer->camera = o2Render.GetCamera();\n\t}\n\n\tvoid Integration::DrawFrame()\n\t{\n\t\tDrawScene();\n\t\tOnDraw();\n\t\tDrawUIManager();\n\t\tDrawDebug();\n\t}\n\n\tvoid Integration::PostDrawFrame()\n\t{\n\t\tmMainListenersLayer->OnEndDraw();\n\t\tmMainListenersLayer->OnDrawn(Camera::Default().GetBasis());\n\n\t\tif (o2Input.IsKeyDown(VK_F1))\n\t\t\tmRender->DrawCross(o2Input.cursorPos.Get(), 20, Color4::Red());\n\n\t\tmRender->End();\n\t}\n\n\tvoid Integration::PostUpdateFrame(float dt)\n\t{\n\t\tmInput->Update(dt);\n\t\tmUIManager->Update();\n\n\t\tmAssets->CheckAssetsUnload();\n\t}\n\n\tvoid Integration::DrawScene()\n    {\n        PROFILE_SAMPLE_FUNC();\n        mScene->Draw();\n    }\n\n    void Integration::UpdateEventSystem()\n    {\n        PROFILE_SAMPLE_FUNC();\n        mEventSystem->Update();\n    }\n\n    void Integration::PostUpdateEventSystem()\n    {\n        PROFILE_SAMPLE_FUNC();\n        mEventSystem->PostUpdate();\n    }\n\n    void Integration::DrawUIManager()\n    {\n        PROFILE_SAMPLE_FUNC();\n        mUIManager->DrawCurrentLayerTopWidgets();\n    }\n\n    void Integration::DrawDebug()\n    {\n        o2Debug.Draw(false);\n    }\n\n    void Integration::UpdateDebug(float dt)\n    {\n        o2Debug.Update(false, dt);\n    }\n\n    bool Integration::IsReady()\n    {\n        return mReady;\n    }\n\n    bool Integration::IsEditor() const\n    {\n        return IS_EDITOR;\n    }\n\n    const Ref<LogStream>& Integration::GetLog() const\n    {\n        return mLog;\n    }\n\n    MemoryManager* MemoryManager::mInstance = new MemoryManager();\n    CREATE_SINGLETON(Debug);\n    CREATE_SINGLETON(FileSystem);\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Integration, o2__Integration);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Integration.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorAreaEventsListenersLayer.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n#include \"o2/Utils/Types/String.h\"\n\n// Integration access macros\n#define o2Integration o2::Integration::Instance()\n\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(Assets);\n    FORWARD_CLASS_REF(EventSystem);\n    FORWARD_CLASS_REF(FileSystem);\n    FORWARD_CLASS_REF(Input);\n    FORWARD_CLASS_REF(LogStream);\n    FORWARD_CLASS_REF(PhysicsWorld);\n    FORWARD_CLASS_REF(ProjectConfig);\n    FORWARD_CLASS_REF(Render);\n    FORWARD_CLASS_REF(Scene);\n    FORWARD_CLASS_REF(TaskManager);\n    FORWARD_CLASS_REF(Time);\n    FORWARD_CLASS_REF(UIManager);\n\n#if IS_SCRIPTING_SUPPORTED\n    FORWARD_CLASS_REF(ScriptEngine);\n#endif\n\n    // ----------------------------------------------------------------------------------\n\t// o2 engine integration class. Initializes and holds main systems, updates and draws\n\t// ----------------------------------------------------------------------------------\n    class Integration: public IObject, public Singleton<Integration>\n    {\n    public:\n        int maxFPS = 600;  // Maximum frames per second\n        int fixedFPS = 60; // Fixed frames per second\n\n    public:\n        // Default constructor\n        Integration(RefCounter* refCounter);\n\n        // Destructor \n        virtual ~Integration();\n\n        // Returns pointer to log object\n        virtual const Ref<LogStream>& GetLog() const;\n\n        // Is integration run in editor\n        virtual bool IsEditor() const;\n\n        // Returns is integration ready to use\n\t\tbool IsReady();\n\n\t\t// Sets inside content size\n        virtual void SetContentSize(const Vec2I& size) {}\n\n\t\t// Returns inside content size\n        virtual Vec2I GetContentSize() const { return Vec2I(); }\n\n\t\t// Returns device screen resolution\n        virtual Vec2I GetScreenResolution() const { return Vec2I(); }\n\n\t\t// Sets cursor type\n        virtual void SetCursor(CursorType type) {}\n\n\t\t// Sets cursor position\n        virtual void SetCursorPosition(const Vec2F& position) {}\n\n\t\t// Sets cursor infinite moves mode\n        virtual void SetCursorInfiniteMode(bool enabled) {}\n\n\t\t// Returns is cursor infinite mode enabled\n\t\tvirtual bool IsCursorInfiniteModeOn() const { return false; }\n\n\t\t// Returns graphics scale\n\t\tvirtual float GetGraphicsScale() const { return 1.0f; }\n\n\t\t// Returns application's path\n\t\tvirtual String GetBinPath() const { return String(); }\n\n        IOBJECT(Integration);\n\n    protected:\n        bool mReady = false; // Are all systems ready\n\n        Ref<Assets>        mAssets;        // Assets\n        Ref<EventSystem>   mEventSystem;   // Events processing system\n        Ref<FileSystem>    mFileSystem;    // File system\n        Ref<Input>         mInput;         // Whole application user input message\n        Ref<LogStream>     mLog;           // Log stream with id \"app\", using only for integration messages\n        Ref<PhysicsWorld>  mPhysics;       // Physics\n        Ref<ProjectConfig> mProjectConfig; // Project config\n        Ref<Render>        mRender;        // Graphics render\n        Ref<Scene>         mScene;         // Scene\n        Ref<TaskManager>   mTaskManager;   // Tasks manager\n        Ref<Time>          mTime;          // Time utilities\n        Ref<UIManager>     mUIManager;     // UI manager>\n\n#if IS_SCRIPTING_SUPPORTED\n        Ref<ScriptEngine>  mScriptingEngine; // Scripting engine\n#endif\n\n        Timer mTimer; // Timer for detecting delta time for update\n\n        float mAccumulatedDT = 0.0f; // Accumulated delta time for fixed FPS update\n        \n        Ref<CursorAreaEventListenersLayer> mMainListenersLayer; // Main listeners layer, required for processing default scaled camera\n\n\tprotected:\n\t\t// Basic initialization for all platforms\n\t\tvirtual void BasicInitialize();\n\n\t\t// Platform-specific initializations\n\t\tvirtual void InitializePlatform();\n\n\t\t// Initializes all systems and log. Called when creating integration\n\t\tvirtual void InitalizeSystems();\n\n\t\t// Initializes render system\n\t\tvirtual void InitiazeRender();\n\n\t\t// Initializes UI styles\n\t\tvirtual void InitilizeUIStyles();\n\n\t\t// Deinitializes integration\n\t\tvirtual void Deinitialize();\n\n\t\t// Deinitializing systems\n\t\tvirtual void DeinitializeSystems();\n\n\t\t// It is called when integration frame resized\n\t\tvirtual void OnResized(const Vec2I& size);\n\n\t\t// Processing frame update, drawing and input messages\n\t\tvirtual void ProcessFrame();\n\n\t\t// Calculates delta time and syncs to max FPS\n\t\tvirtual void CalculateAndSyncFPS(float& dt, float& realDt);\n\n\t\t// First stage of frame update\n\t\tvirtual void PreUpdateFrame(float dt, float realDt);\n\n\t\t// Updates scene with fixed delta time\n\t\tvirtual void UpdateFrameFixed(float dt);\n\n\t\t// Main stage of frame update\n\t\tvirtual void MainUpdateFrame(float dt);\n\n\t\t// Pre drawing frame\n        virtual void PreDrawFrame();\n\n\t\t// Drawing frame\n\t\tvirtual void DrawFrame();\n\n\t\t// Post drawing frame\n\t\tvirtual void PostDrawFrame();\n\n\t\t// Last stage of frame update\n\t\tvirtual void PostUpdateFrame(float dt);\n\n\t\t// Updates scene\n\t\tvirtual void UpdateScene(float dt);\n\n\t\t// Updates scene with fixed delta time\n\t\tvirtual void FixedUpdateScene(float dt);\n\n\t\t// Before update physics\n\t\tvirtual void PreUpdatePhysics();\n\n\t\t// Updates physics\n\t\tvirtual void UpdatePhysics(float dt);\n\n\t\t// After update physics\n\t\tvirtual void PostUpdatePhysics();\n\n\t\t// Updates task manager\n\t\tvirtual void UpdateTaskManager(float dt);\n\n\t\t// Draws scene\n\t\tvirtual void DrawScene();\n\n\t\t// Updates event system\n\t\tvirtual void UpdateEventSystem();\n\n\t\t// Post updates event system\n\t\tvirtual void PostUpdateEventSystem();\n\n\t\t// Draws UI manager\n\t\tvirtual void DrawUIManager();\n\n\t\t// Draws debug\n\t\tvirtual void DrawDebug();\n\n\t\t// Updates debug\n\t\tvirtual void UpdateDebug(float dt);\n\n\t\t// Calling on updating\n\t\tvirtual void OnUpdate(float dt) {}\n\n\t\t// Calling on updating by fixed FPS\n\t\tvirtual void OnFixedUpdate(float dt) {}\n\n\t\t// Calling on drawing\n\t\tvirtual void OnDraw() {}\n\n\t\tfriend class WndProcFunc;\n\t\tfriend struct ApplicationPlatformWrapper;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Integration)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::Singleton<Integration>);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Integration)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(600).NAME(maxFPS);\n    FIELD().PUBLIC().DEFAULT_VALUE(60).NAME(fixedFPS);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mReady);\n    FIELD().PROTECTED().NAME(mAssets);\n    FIELD().PROTECTED().NAME(mEventSystem);\n    FIELD().PROTECTED().NAME(mFileSystem);\n    FIELD().PROTECTED().NAME(mInput);\n    FIELD().PROTECTED().NAME(mLog);\n    FIELD().PROTECTED().NAME(mPhysics);\n    FIELD().PROTECTED().NAME(mProjectConfig);\n    FIELD().PROTECTED().NAME(mRender);\n    FIELD().PROTECTED().NAME(mScene);\n    FIELD().PROTECTED().NAME(mTaskManager);\n    FIELD().PROTECTED().NAME(mTime);\n    FIELD().PROTECTED().NAME(mUIManager);\n#if  IS_SCRIPTING_SUPPORTED\n    FIELD().PROTECTED().NAME(mScriptingEngine);\n#endif\n    FIELD().PROTECTED().NAME(mTimer);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mAccumulatedDT);\n    FIELD().PROTECTED().NAME(mMainListenersLayer);\n}\nEND_META;\nCLASS_METHODS_META(o2::Integration)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<LogStream>&, GetLog);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEditor);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsReady);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetContentSize, const Vec2I&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetContentSize);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetScreenResolution);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCursor, CursorType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCursorPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCursorInfiniteMode, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsCursorInfiniteModeOn);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetGraphicsScale);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetBinPath);\n    FUNCTION().PROTECTED().SIGNATURE(void, BasicInitialize);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializePlatform);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitalizeSystems);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitiazeRender);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitilizeUIStyles);\n    FUNCTION().PROTECTED().SIGNATURE(void, Deinitialize);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeinitializeSystems);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnResized, const Vec2I&);\n    FUNCTION().PROTECTED().SIGNATURE(void, ProcessFrame);\n    FUNCTION().PROTECTED().SIGNATURE(void, CalculateAndSyncFPS, float&, float&);\n    FUNCTION().PROTECTED().SIGNATURE(void, PreUpdateFrame, float, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateFrameFixed, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, MainUpdateFrame, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, PreDrawFrame);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawFrame);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostDrawFrame);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostUpdateFrame, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateScene, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, FixedUpdateScene, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, PreUpdatePhysics);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdatePhysics, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostUpdatePhysics);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTaskManager, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateEventSystem);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostUpdateEventSystem);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawUIManager);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawDebug);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateDebug, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFixedUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/O2.h",
    "content": "#pragma once\n\n#include \"EngineSettings.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\n#define INITIALIZE_O2 \\\no2::Reflection::InitializeTypes()\n"
  },
  {
    "path": "Framework/Sources/o2/Physics/PhysicsWorld.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"PhysicsWorld.h\"\n\n#include \"Box2D/Dynamics/b2Body.h\"\n#include \"o2/Config/ProjectConfig.h\"\n#include \"o2/Scene/Physics/ICollider.h\"\n#include \"o2/Scene/Physics/RigidBody.h\"\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    DECLARE_SINGLETON(PhysicsWorld);\n\n    PhysicsWorld::PhysicsWorld(RefCounter* refCounter):\n        Singleton<PhysicsWorld>(refCounter), mWorld(Vec2F())\n    {\n        auto debugDraw = mnew PhysicsDebugDraw();\n        mWorld.SetDebugDraw(debugDraw);\n        debugDraw->SetFlags(b2Draw::e_shapeBit | b2Draw::e_aabbBit | b2Draw::e_pairBit | b2Draw::e_centerOfMassBit | b2Draw::e_jointBit);\n\n        mPrevPhysicsScale = o2Config.physics.scale;\n    }\n\n    void PhysicsWorld::PreUpdate()\n    {\n        CheckPhysicsScale();\n\n        mIsUpdatingPhysicsNow = true;\n\n        mWorld.SetGravity(o2Config.physics.gravity);\n\n        float invScale = 1.0f/o2Config.physics.scale;\n\n        for (b2Body* body = mWorld.GetBodyList(); body; body = body->GetNext())\n        {\n            auto rigidBody = (RigidBody*)body->GetUserData();\n            auto transform = rigidBody->transform;\n\n            body->SetTransform(transform->GetWorldPosition()*invScale, transform->GetWorldAngle());\n        }\n    }\n\n    void PhysicsWorld::Update(float dt)\n    {\n        mWorld.Step(dt, o2Config.physics.velocityIterations, o2Config.physics.positionIterations);\n    }\n\n    void PhysicsWorld::PostUpdate()\n    {\n        float scale = o2Config.physics.scale;\n        for (b2Body* body = mWorld.GetBodyList(); body; body = body->GetNext())\n        {\n            auto rigidBody = (RigidBody*)body->GetUserData();\n            auto transform = rigidBody->transform;\n\n            transform->SetWorldPosition(Vec2F(body->GetPosition())*scale);\n            transform->SetWorldAngle(body->GetAngle());\n        }\n\n        mIsUpdatingPhysicsNow = false;\n    }\n\n    void PhysicsWorld::DrawDebug()\n    {\n        mWorld.DrawDebugData();\n    }\n\n    bool PhysicsWorld::IsUpdatingPhysicsNow() const\n    {\n        return mIsUpdatingPhysicsNow;\n    }\n\n    void PhysicsWorld::CheckPhysicsScale()\n    {\n        if (Math::Equals(mPrevPhysicsScale, o2Config.physics.scale))\n            return;\n\n        float scale = o2Config.physics.scale;\n        float invScale = 1.0f/scale;\n        for (b2Body* body = mWorld.GetBodyList(); body; body = body->GetNext())\n        {\n            auto rigidBody = (RigidBody*)body->GetUserData();\n            auto transform = rigidBody->transform;\n\n            body->SetTransform(transform->GetWorldPosition()*invScale, transform->GetWorldAngle());\n\n            auto colliders = rigidBody->mColliders;\n            for (auto& collider : colliders)\n                collider.Lock()->OnShapeChanged();\n        }\n\n        mPrevPhysicsScale = scale;\n    }\n\n    void PhysicsDebugDraw::DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color)\n    {\n        float scale = o2Config.physics.scale;\n        o2Render.DrawAACircle(Vec2F(center)*scale, radius*scale, Color4(color.r, color.g, color.b, o2Config.physics.debugDrawAlpha));\n    }\n\n    void PhysicsDebugDraw::DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color)\n    {\n        float scale = o2Config.physics.scale;\n\n        Vector<Vec2F> points; \n        points.Resize(vertexCount + 1);\n        for (int i = 0; i < vertexCount; i++)\n            points[i] = Vec2F(vertices[i])*scale;\n\n        points.Last() = Vec2F(vertices[0])*scale;\n\n        o2Render.DrawAALine(points, Color4(color.r, color.g, color.b, o2Config.physics.debugDrawAlpha));\n    }\n\n    void PhysicsDebugDraw::DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color)\n    {\n        float scale = o2Config.physics.scale;\n        o2Render.DrawAALine(Vec2F(p1)*scale, Vec2F(p2)*scale, Color4(color.r, color.g, color.b, o2Config.physics.debugDrawAlpha));\n    }\n\n    void PhysicsDebugDraw::DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color)\n    {\n        float scale = o2Config.physics.scale;\n        o2Render.DrawFilledCircle(Vec2F(center)*scale, radius*scale, Color4(color.r, color.g, color.b, o2Config.physics.debugDrawAlpha));\n    }\n\n    void PhysicsDebugDraw::DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color)\n    {\n        float scale = o2Config.physics.scale;\n\n        Vector<Vec2F> points;\n        points.Resize(vertexCount);\n        for (int i = 0; i < vertexCount; i++)\n            points[i] = Vec2F(vertices[i])*scale;\n\n        o2Render.DrawFilledPolygon(points, Color4(color.r, color.g, color.b, o2Config.physics.debugDrawAlpha));\n    }\n\n    void PhysicsDebugDraw::DrawTransform(const b2Transform& xf)\n    {\n        float scale = o2Config.physics.scale;\n        o2Render.DrawBasis(Basis(Vec2F(xf.p)*scale, Vec2F(xf.q.GetXAxis())*scale, Vec2F(xf.q.GetYAxis())*scale));\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Physics/PhysicsWorld.h",
    "content": "#pragma once\n\n#include \"Box2D/Common/b2Draw.h\"\n#include \"Box2D/Dynamics/b2World.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\n// Render physics macros\n#define o2Physics o2::PhysicsWorld::Instance()\n\nnamespace o2\n{\n    // -------------------\n    // Box2D Physics world\n    // -------------------\n    class PhysicsWorld : public Singleton<PhysicsWorld>\n    {\n    public:\n        // Default constructor\n        PhysicsWorld(RefCounter* refCounter);\n\n        // Synchronize physics bodies with actors\n        void PreUpdate();\n\n        // Updates physics world and sync bodies\n        void Update(float dt);\n\n        // Synchronize actors with bodies\n        void PostUpdate();\n\n        // Draws debug graphics\n        void DrawDebug();\n\n        // Returns True when PreUpdate has just called, until PostUpdate finished\n        bool IsUpdatingPhysicsNow() const;\n\n    private:\n        b2World mWorld;\n\n        bool mIsUpdatingPhysicsNow = false; // True when PreUpdate has just called, until PostUpdate finished\n\n        float mPrevPhysicsScale = 0.0f; // Previous physics scale\n\n    private:\n        // Checks phsyics scale config; updates bodies and colliders with new scale\n        void CheckPhysicsScale();\n\n        friend class RigidBody;\n    }; \n    \n    class PhysicsDebugDraw: public b2Draw\n    {\n    public:\n        float alpha = 0.5f;\n\n        void DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color) override;\n        void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) override;\n        void DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color) override;\n        void DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color) override;\n        void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) override;\n        void DrawTransform(const b2Transform& xf) override;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/MaterialBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_ANDROID\n\n#include \"o2/Render/Android/OpenGL.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    // Cached GL locations for an additional texture sampler\n    struct SamplerLocation\n    {\n        GLint samplerUniform = -1;     // Sampler uniform location\n        GLint texCoordsAttribute = -1; // Texcoord attribute location\n    };\n\n    // ----------------------------------------------------------------\n    // Platform-specific (Android/GLES2) material data and handles\n    // ----------------------------------------------------------------\n    class MaterialBase\n    {\n        friend class Render;\n\n    protected:\n        GLuint mProgram = 0; // OpenGL shader program handle\n\n        GLint mTransformUniform = -1;   // Location of u_transformMatrix uniform\n        GLint mTextureUniform = -1;     // Location of u_texture uniform (primary)\n        GLint mPositionAttribute = -1;  // Location of a_position attribute\n        GLint mColorAttribute = -1;     // Location of a_color attribute\n        GLint mTexCoordsAttribute = -1; // Location of a_texCoords attribute (primary)\n        GLint mNormalAttribute = -1;    // Location of a_normal attribute\n\n        mutable Vector<GLint> mParamUniformLocations;\n\n        Vector<SamplerLocation> mSamplerLocations;\n    };\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/MaterialImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_ANDROID\n\n#include \"o2/Render/Material.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    bool Material::PlatformBuild()\n    {\n        GLuint program = glCreateProgram();\n        if (program)\n        {\n            glAttachShader(program, mVertexShader->mHandle);\n            glAttachShader(program, mFragmentShader->mHandle);\n\n            GLint linkStatus;\n            glLinkProgram(program);\n            glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);\n\n            if (!linkStatus)\n            {\n                GLint infoLen = 0;\n                glGetProgramiv(program, GL_INFO_LOG_LENGTH, &infoLen);\n\n                if (infoLen > 0)\n                {\n                    char* infoLog = (char*)malloc(sizeof(char) * infoLen);\n                    glGetProgramInfoLog(program, infoLen, NULL, infoLog);\n                    o2Debug.LogError((String)\"Error linking material shader program:\\n\" + infoLog);\n                    free(infoLog);\n                }\n\n                glDeleteProgram(program);\n                return false;\n            }\n        }\n        else\n        {\n            return false;\n        }\n\n        mProgram = program;\n        mTransformUniform = glGetUniformLocation(program, \"u_transformMatrix\");\n        mTextureUniform = glGetUniformLocation(program, \"u_texture\");\n        mPositionAttribute = glGetAttribLocation(program, \"a_position\");\n        mColorAttribute = glGetAttribLocation(program, \"a_color\");\n        mTexCoordsAttribute = glGetAttribLocation(program, \"a_texCoords\");\n        mNormalAttribute = glGetAttribLocation(program, \"a_normal\");\n\n        mParamUniformLocations.Resize(mParams.Count());\n        for (int i = 0; i < mParams.Count(); i++)\n            mParamUniformLocations[i] = glGetUniformLocation(program, mParams[i]->GetName().Data());\n\n        mSamplerLocations.Resize(mSamplers.Count());\n        for (int i = 0; i < mSamplers.Count(); i++)\n        {\n            mSamplerLocations[i].samplerUniform = glGetUniformLocation(program, mSamplers[i].samplerUniformName.Data());\n            mSamplerLocations[i].texCoordsAttribute = glGetAttribLocation(program, mSamplers[i].texCoordsAttrName.Data());\n        }\n\n        return true;\n    }\n\n    void Material::PlatformDestroy()\n    {\n        if (mProgram)\n        {\n            glDeleteProgram(mProgram);\n            mProgram = 0;\n        }\n\n        mParamUniformLocations.Clear();\n        mSamplerLocations.Clear();\n        mReady = false;\n    }\n\n    void Material::PlatformApplyParams() const\n    {\n        if (mParamUniformLocations.Count() != mParams.Count())\n        {\n            mParamUniformLocations.Resize(mParams.Count());\n            for (int i = 0; i < mParams.Count(); i++)\n            {\n                if (mParams[i])\n                    mParamUniformLocations[i] = glGetUniformLocation(mProgram, mParams[i]->GetName().Data());\n            }\n        }\n\n        for (int i = 0; i < mParams.Count(); i++)\n        {\n            GLint loc = mParamUniformLocations[i];\n            if (loc < 0)\n                continue;\n\n            const auto& param = mParams[i];\n            if (auto* fp = dynamic_cast<ShaderParamFloat*>(param.Get()))\n                glUniform1f(loc, fp->GetValue());\n            else if (auto* v2p = dynamic_cast<ShaderParamVec2*>(param.Get()))\n                glUniform2f(loc, v2p->GetValue().x, v2p->GetValue().y);\n            else if (auto* cp = dynamic_cast<ShaderParamColor*>(param.Get()))\n                glUniform4f(loc, cp->GetValue().RF(), cp->GetValue().GF(), cp->GetValue().BF(), cp->GetValue().AF());\n            else if (auto* ip = dynamic_cast<ShaderParamInt*>(param.Get()))\n                glUniform1i(loc, ip->GetValue());\n        }\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/OpenGL.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_ANDROID\n\n#include \"o2/Render/Android/OpenGL.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nconst char* GetGLErrorDesc(GLenum errorId)\n{\n    switch (errorId)\n    {\n        case GL_NO_ERROR:                      return \"GL_NO_ERROR\";\n        case GL_INVALID_ENUM:                  return \"GL_INVALID_ENUM\";\n        case GL_INVALID_VALUE:                 return \"GL_INVALID_VALUE\";\n        case GL_INVALID_OPERATION:             return \"GL_INVALID_OPERATION\";\n        case GL_INVALID_FRAMEBUFFER_OPERATION: return \"GL_INVALID_FRAMEBUFFER_OPERATION\";\n        case GL_OUT_OF_MEMORY:                 return \"GL_OUT_OF_MEMORY\";\n        default:                               return \"Unknown GL error\";\n    }\n}\n\nvoid glCheckError(const char* filename /*= nullptr*/, unsigned int line /*= 0*/)\n{\n    GLenum err = glGetError();\n    if (err != GL_NO_ERROR)\n    {\n        o2::String msg = \"GL error: \";\n        msg += GetGLErrorDesc(err);\n        if (filename)\n        {\n            msg += \" at \";\n            msg += filename;\n            msg += \":\";\n            msg += o2::String((int)line);\n        }\n        o2Debug.LogError(msg);\n    }\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/OpenGL.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_ANDROID\n\n#include <GLES2/gl2.h>\n#include <GLES2/gl2ext.h>\n\nnamespace o2\n{\n    class LogStream;\n}\n\nconst char* GetGLErrorDesc(GLenum errorId);\n\nvoid glCheckError(const char* filename = nullptr, unsigned int line = 0);\n\n#if RENDER_DEBUG\n#    define GL_CHECK_ERROR() glCheckError(__FILE__, __LINE__);\n#else\n#    define GL_CHECK_ERROR()\n#endif\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/RenderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_ANDROID\n\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Render/Android/OpenGL.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\nnamespace o2\n{\n    class Texture;\n\n    class RenderBase\n    {\n    protected:\n        GLuint mActiveProgram = 0;          // Currently active shader program\n        GLint  mActiveMvpUniform = -1;      // Currently active transform uniform location\n        GLint  mActiveTextureSample = -1;   // Currently active texture sampler uniform location\n        GLint  mActivePosAttribute = -1;    // Currently active position attribute location\n        GLint  mActiveColorAttribute = -1;  // Currently active color attribute location\n        GLint  mActiveUVAttribute = -1;     // Currently active texcoords attribute location\n        GLint  mActiveNormalAttribute = -1; // Currently active normal attribute location\n\n        float mCurrentMvp[16]; // Cached MVP matrix for material rebinding\n\n        const static int mBuffersPoolsSize = 3;       // Count of buffers in pools\n        GLuint mVertexBuffersPool[mBuffersPoolsSize]; // GPU vertex buffer objects\n        GLuint mIndexBuffersPool[mBuffersPoolsSize];  // GPU index buffer objects\n        int    mCurrentBufferIdx = 0;                 // Current buffer pool index\n    };\n};\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/RenderImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_ANDROID\n#include \"o2/Render/Render.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/Math/Geometry.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n\nnamespace o2\n{\n    void Render::InitializePlatform()\n    {\n        mLog->Out(\"Initializing OpenGL ES 2 render (Android)..\");\n\n        // GL context is created by the Java-side GLSurfaceView; here we only\n        // configure state and allocate GPU resources.\n        GL_CHECK_ERROR();\n\n        mResolution = o2Application.GetContentSize();\n\n        mVertexBufferSize = USHRT_MAX;\n        mIndexBufferSize = USHRT_MAX;\n        mCurrentBatchVertexType = Vertex::Type();\n        mVertexBufferByteSize = mVertexBufferSize * sizeof(Vertex);\n\n        mVertexData = mnew UInt8[mVertexBufferByteSize];\n        mVertexIndexData = mnew VertexIndex[mIndexBufferSize];\n\n        for (int i = 0; i < mBuffersPoolsSize; i++)\n        {\n            glGenBuffers(1, &mVertexBuffersPool[i]);\n            glBindBuffer(GL_ARRAY_BUFFER, mVertexBuffersPool[i]);\n            glBufferData(GL_ARRAY_BUFFER, mVertexBufferByteSize, mVertexData, GL_DYNAMIC_DRAW);\n\n            glGenBuffers(1, &mIndexBuffersPool[i]);\n            glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffersPool[i]);\n            glBufferData(GL_ELEMENT_ARRAY_BUFFER, (GLsizeiptr)(mIndexBufferSize * sizeof(VertexIndex)),\n                         mVertexIndexData, GL_DYNAMIC_DRAW);\n        }\n\n        glEnable(GL_BLEND);\n        glDisable(GL_DEPTH_TEST);\n        glDisable(GL_CULL_FACE);\n        glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n\n        const GLubyte* vendor   = glGetString(GL_VENDOR);\n        const GLubyte* renderer = glGetString(GL_RENDERER);\n        const GLubyte* version  = glGetString(GL_VERSION);\n        if (vendor)   mLog->Out((String)\"GL_VENDOR: \"   + (const char*)vendor);\n        if (renderer) mLog->Out((String)\"GL_RENDERER: \" + (const char*)renderer);\n        if (version)  mLog->Out((String)\"GL_VERSION: \"  + (const char*)version);\n    }\n\n    void Render::DeinitializePlatform()\n    {\n        for (int i = 0; i < mBuffersPoolsSize; i++)\n        {\n            if (mVertexBuffersPool[i]) glDeleteBuffers(1, &mVertexBuffersPool[i]);\n            if (mIndexBuffersPool[i])  glDeleteBuffers(1, &mIndexBuffersPool[i]);\n            mVertexBuffersPool[i] = 0;\n            mIndexBuffersPool[i] = 0;\n        }\n    }\n\n    void Render::InitializeSandardShader() {}\n\n    void Render::PlatformInitializeDefaultMaterial()\n    {\n        String basePath = GetBuiltinAssetsPath();\n        String vSource = FileSystem::ReadFile(basePath + \"Shaders/Default.vsh\");\n        String fSource = FileSystem::ReadFile(basePath + \"Shaders/Default.fsh\");\n\n        if (vSource.IsEmpty() || fSource.IsEmpty())\n        {\n            o2Debug.LogError(\"Failed to load default shader files. Ensure BuiltAssets contains Shaders/Default.{vsh,fsh}.\");\n            return;\n        }\n\n        Ref<Shader> vShader = mmake<Shader>();\n        Ref<Shader> fShader = mmake<Shader>();\n        vShader->Compile(vSource, Shader::Type::Vertex);\n        fShader->Compile(fSource, Shader::Type::Fragment);\n\n        if (!vShader->IsReady() || !fShader->IsReady())\n        {\n            o2Debug.LogError(\"Failed to compile default shaders.\");\n            return;\n        }\n\n        mDefaultMaterial = mmake<Material>();\n        mDefaultMaterial->SetVertexShader(vShader);\n        mDefaultMaterial->SetFragmentShader(fShader);\n        mDefaultMaterial->SetBlendMode(BlendMode::Normal);\n        if (!mDefaultMaterial->Build())\n        {\n            o2Debug.LogError(\"Failed to build default material.\");\n            mDefaultMaterial = nullptr;\n        }\n    }\n\n    static void BindBatchAttributes(const VertexType& vtype, GLint pos, GLint color, GLint uv, GLint normal)\n    {\n        size_t stride = vtype.GetStride();\n        if (stride == 0) stride = sizeof(Vertex);\n\n        if (pos >= 0)\n        {\n            glVertexAttribPointer((GLuint)pos, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)vtype.GetParamOffset(VertexParam::Position));\n            glEnableVertexAttribArray((GLuint)pos);\n        }\n        if (color >= 0)\n        {\n            glVertexAttribPointer((GLuint)color, 4, GL_UNSIGNED_BYTE, GL_TRUE, (GLsizei)stride,\n                                  (void*)vtype.GetParamOffset(VertexParam::Color));\n            glEnableVertexAttribArray((GLuint)color);\n        }\n        if (uv >= 0)\n        {\n            glVertexAttribPointer((GLuint)uv, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)vtype.GetParamOffset(VertexParam::TexCoord0));\n            glEnableVertexAttribArray((GLuint)uv);\n        }\n        if (normal >= 0 && vtype.HasParam(VertexParam::Normal))\n        {\n            glVertexAttribPointer((GLuint)normal, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)vtype.GetParamOffset(VertexParam::Normal));\n            glEnableVertexAttribArray((GLuint)normal);\n        }\n    }\n\n    void Render::PlatformBindNextPoolBuffers()\n    {\n        mCurrentBufferIdx++;\n        if (mCurrentBufferIdx == mBuffersPoolsSize)\n            mCurrentBufferIdx = 0;\n\n        glBindBuffer(GL_ARRAY_BUFFER, mVertexBuffersPool[mCurrentBufferIdx]);\n        glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffersPool[mCurrentBufferIdx]);\n        GL_CHECK_ERROR();\n\n        BindBatchAttributes(mCurrentBatchVertexType,\n                            mActivePosAttribute, mActiveColorAttribute,\n                            mActiveUVAttribute, mActiveNormalAttribute);\n        GL_CHECK_ERROR();\n\n        mVertexBufferIdx = 0;\n        mIndexBufferIdx = 0;\n    }\n\n    void Render::PlatformBegin()\n    {\n        PlatformBindNextPoolBuffers();\n    }\n\n    void Render::PlatformDrawPrimitives()\n    {\n        static const GLenum primitiveType[3]{ GL_TRIANGLES, GL_TRIANGLES, GL_LINES };\n\n        size_t stride = mCurrentBatchVertexType.GetStride();\n\n        glBufferSubData(GL_ARRAY_BUFFER, mVertexBufferIdx * stride,\n                        mLastDrawVertex * stride, mVertexData);\n        glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, mIndexBufferIdx * sizeof(VertexIndex),\n                        mLastDrawIdx * sizeof(VertexIndex), mVertexIndexData);\n        GL_CHECK_ERROR();\n\n        glActiveTexture(GL_TEXTURE0);\n        glBindTexture(GL_TEXTURE_2D, mCurrentDrawTexture ? mCurrentDrawTexture->mHandle : mWhiteTexture->mHandle);\n        glUniform1i(mActiveTextureSample, 0);\n        GL_CHECK_ERROR();\n\n        glDrawElements(primitiveType[(int)mCurrentPrimitiveType], mLastDrawIdx,\n                       GL_UNSIGNED_INT, (void*)(mIndexBufferIdx * sizeof(VertexIndex)));\n        GL_CHECK_ERROR();\n\n        mVertexBufferIdx += mLastDrawVertex;\n        mIndexBufferIdx += mLastDrawIdx;\n    }\n\n    void Render::PlatformEnd()\n    {\n        GL_CHECK_ERROR();\n        // Presentation is handled by GLSurfaceView (eglSwapBuffers).\n    }\n\n    void Render::PlatformResetState()\n    {\n        glEnable(GL_BLEND);\n        glDisable(GL_DEPTH_TEST);\n        glDisable(GL_CULL_FACE);\n        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n        glDisable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n\n        BindMaterial(mDefaultMaterial);\n        PlatformBindNextPoolBuffers();\n\n        glActiveTexture(GL_TEXTURE0);\n        glBindTexture(GL_TEXTURE_2D, 0);\n        GL_CHECK_ERROR();\n\n        glUniform1i(mActiveTextureSample, 0);\n        GL_CHECK_ERROR();\n\n        BindBatchAttributes(mCurrentBatchVertexType,\n                            mActivePosAttribute, mActiveColorAttribute,\n                            mActiveUVAttribute, mActiveNormalAttribute);\n        GL_CHECK_ERROR();\n    }\n\n    VertexType Render::PlatformResolveBatchVertexType(const VertexType& sourceVertexType, const Ref<Material>& material) const\n    {\n        return ResolveBatchVertexTypeByMaterial(sourceVertexType, material);\n    }\n\n    void Render::Clear(const Color4& color /*= Color4::Blur()*/)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        glClearColor(color.RF(), color.GF(), color.BF(), color.AF());\n        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformSetupCameraTransforms(float* modelMatrix, float* viewMatrix, float* projMatrix)\n    {\n        float finalCamMtx[16];\n        Math::mtxMultiply(finalCamMtx, modelMatrix, viewMatrix);\n        Math::mtxMultiply(mCurrentMvp, projMatrix, finalCamMtx);\n\n        glViewport(0, 0, mCurrentResolution.x, mCurrentResolution.y);\n        glUniformMatrix4fv(mActiveMvpUniform, 1, GL_FALSE, mCurrentMvp);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformFlipVerticesUV()\n    {\n        size_t stride = mCurrentBatchVertexType.GetStride();\n        size_t tvOffset = mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0) + sizeof(float);\n\n        for (UInt i = 0; i < mLastDrawVertex; i++)\n        {\n            float& tv = *reinterpret_cast<float*>(&mVertexData[i * stride + tvOffset]);\n            tv = 1.0f - tv;\n        }\n    }\n\n    void Render::PlatformEnableScissorTest()\n    {\n        glEnable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformDisableScissorTest()\n    {\n        glDisable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformSetScissorRect(const RectI& rect)\n    {\n        glScissor((int)(rect.left + mCurrentResolution.x * 0.5f),\n                  (int)(rect.bottom + mCurrentResolution.y * 0.5f),\n                  (int)rect.Width(), (int)rect.Height());\n    }\n\n    void Render::PlatformBindRenderTarget(const TextureRef& renderTarget)\n    {\n        if (renderTarget)\n            glBindFramebuffer(GL_FRAMEBUFFER, renderTarget->mFrameBuffer);\n        else\n            glBindFramebuffer(GL_FRAMEBUFFER, 0);\n\n        GL_CHECK_ERROR();\n    }\n\n    Vec2I Render::GetPlatformMaxTextureSize()\n    {\n        int size = 0;\n        glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);\n        return Vec2I(size, size);\n    }\n\n    Vec2I Render::GetPlatformDPI()\n    {\n        // Android DisplayMetrics DPI is available via JNI; use a reasonable\n        // default here until we thread it through the Java bridge.\n        return Vec2I(160, 160);\n    }\n\n    void Render::PlatformBindMaterial(const Ref<Material>& material)\n    {\n        if (material->mProgram != mActiveProgram)\n        {\n            mActiveProgram = material->mProgram;\n            mActiveMvpUniform = material->mTransformUniform;\n            mActiveTextureSample = material->mTextureUniform;\n            mActivePosAttribute = material->mPositionAttribute;\n            mActiveColorAttribute = material->mColorAttribute;\n            mActiveUVAttribute = material->mTexCoordsAttribute;\n            mActiveNormalAttribute = material->mNormalAttribute;\n\n            glUseProgram(mActiveProgram);\n            GL_CHECK_ERROR();\n\n            BindBatchAttributes(mCurrentBatchVertexType,\n                                mActivePosAttribute, mActiveColorAttribute,\n                                mActiveUVAttribute, mActiveNormalAttribute);\n\n            const UInt texCoordParams[] = { VertexParam::TexCoord1, VertexParam::TexCoord2 };\n            size_t stride = mCurrentBatchVertexType.GetStride();\n            if (stride == 0) stride = sizeof(Vertex);\n            for (int i = 0; i < material->mSamplerLocations.Count(); i++)\n            {\n                GLint attrLoc = material->mSamplerLocations[i].texCoordsAttribute;\n                if (attrLoc >= 0 && i < 2 && mCurrentBatchVertexType.HasParam(texCoordParams[i]))\n                {\n                    glVertexAttribPointer((GLuint)attrLoc, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                          (void*)mCurrentBatchVertexType.GetParamOffset(texCoordParams[i]));\n                    glEnableVertexAttribArray((GLuint)attrLoc);\n                }\n            }\n\n            GL_CHECK_ERROR();\n\n            glUniformMatrix4fv(mActiveMvpUniform, 1, GL_FALSE, mCurrentMvp);\n            GL_CHECK_ERROR();\n        }\n\n        material->ApplyParams();\n\n        for (int i = 0; i < material->mSamplerLocations.Count() && i < material->mSamplers.Count(); i++)\n        {\n            const auto& loc = material->mSamplerLocations[i];\n            TextureRef tex = material->mSamplers[i].GetTexture();\n            if (!tex)\n                continue;\n\n            GLint texUnit = i + 1;\n            glActiveTexture(GL_TEXTURE0 + texUnit);\n            glBindTexture(GL_TEXTURE_2D, tex->mHandle);\n\n            if (loc.samplerUniform >= 0)\n                glUniform1i(loc.samplerUniform, texUnit);\n        }\n        glActiveTexture(GL_TEXTURE0);\n\n        if (material->GetBlendMode() == BlendMode::Add)\n            glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n        else\n            glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/ShaderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_ANDROID\n\n#include \"o2/Render/Android/OpenGL.h\"\n\nnamespace o2\n{\n    // --------------------------------------------------------------\n    // Platform-specific (Android/GLES2) shader data and handles\n    // --------------------------------------------------------------\n    class ShaderBase\n    {\n        friend class Render;\n        friend class Material;\n\n    protected:\n        GLuint mHandle = 0; // OpenGL shader object handle\n    };\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/ShaderImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_ANDROID\n\n#include \"o2/Render/Shader.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    bool Shader::PlatformCompile(const String& source, Type type)\n    {\n        GLenum glType = (type == Type::Vertex) ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER;\n        GLuint shader = glCreateShader(glType);\n\n        if (shader)\n        {\n            // GLSL ES requires fragment shaders to declare default float precision.\n            String patched = (type == Type::Fragment && !source.Contains(\"precision\"))\n                ? (String)\"precision mediump float;\\n\" + source\n                : source;\n            const char* src = patched.Data();\n            glShaderSource(shader, 1, &src, NULL);\n            glCompileShader(shader);\n\n            GLint compiled = 0;\n            glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);\n\n            if (!compiled)\n            {\n                GLint infoLen = 0;\n                glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);\n\n                if (infoLen > 0)\n                {\n                    char* infoLog = (char*)malloc(sizeof(char) * infoLen);\n                    glGetShaderInfoLog(shader, infoLen, NULL, infoLog);\n                    o2Debug.LogError((String)\"Error compiling shader \" + mFileName + \":\\n\" + infoLog);\n                    free(infoLog);\n                }\n\n                glDeleteShader(shader);\n                shader = 0;\n            }\n        }\n\n        mHandle = shader;\n        return shader != 0;\n    }\n\n    void Shader::PlatformDestroy()\n    {\n        if (mHandle)\n        {\n            glDeleteShader(mHandle);\n            mHandle = 0;\n        }\n\n        mReady = false;\n    }\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/TextureBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_ANDROID\n\n#include \"o2/Render/Android/OpenGL.h\"\n\nnamespace o2\n{\n    class TextureBase\n    {\n        friend class Render;\n        friend class VectorFont;\n\n    protected:\n        GLuint mHandle = 0;      // Texture handle\n        GLuint mFrameBuffer = 0; // Frame buffer for rendering into texture\n    };\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Android/TextureImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_ANDROID\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    static GLint MapTextureFormat(TextureFormat format)\n    {\n        switch (format)\n        {\n            case TextureFormat::R8G8B8A8: return GL_RGBA;\n            default:                      return GL_RGBA; // GLES2 has no DXT5; fall back to RGBA\n        }\n    }\n\n    bool Texture::PlatformCreate()\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n\n        glGenTextures(1, &mHandle);\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        GL_CHECK_ERROR();\n\n        GLint texFormat = MapTextureFormat(mFormat);\n        glTexImage2D(GL_TEXTURE_2D, 0, texFormat, (GLsizei)mSize.x, (GLsizei)mSize.y, 0, texFormat, GL_UNSIGNED_BYTE, NULL);\n        GL_CHECK_ERROR();\n\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n        GL_CHECK_ERROR();\n\n        if (mUsage == Usage::RenderTarget)\n        {\n            glGenFramebuffers(1, &mFrameBuffer);\n            glBindFramebuffer(GL_FRAMEBUFFER, mFrameBuffer);\n\n            glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mHandle, 0);\n\n            if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)\n            {\n                GLenum glError = glGetError();\n                o2Render.mLog->Error((String)\"Failed to create GL frame buffer object! GL Error \" + (int)glError + \" \" +\n                                     GetGLErrorDesc(glError));\n                glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n                return false;\n            }\n\n            glBindFramebuffer(GL_FRAMEBUFFER, 0);\n            GL_CHECK_ERROR();\n        }\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n        return true;\n    }\n\n    void Texture::PlatformDestroy()\n    {\n        if (mUsage == Usage::RenderTarget && mFrameBuffer)\n            glDeleteFramebuffers(1, &mFrameBuffer);\n\n        if (mHandle)\n            glDeleteTextures(1, &mHandle);\n    }\n\n    void Texture::PlatformUploadData(const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n\n        GLint texFormat = MapTextureFormat(format);\n        glTexImage2D(GL_TEXTURE_2D, 0, texFormat, (GLsizei)size.x, (GLsizei)size.y, 0, texFormat, GL_UNSIGNED_BYTE, data);\n        GL_CHECK_ERROR();\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformUploadRegionData(const Vec2I& offset, const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n\n        GLint texFormat = MapTextureFormat(format);\n        glTexSubImage2D(GL_TEXTURE_2D, 0, offset.x, offset.y, size.x, size.y, texFormat, GL_UNSIGNED_BYTE, data);\n        GL_CHECK_ERROR();\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::Copy(const Texture& from, const RectI& rect)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, from.mHandle);\n\n        GLint texFormat = MapTextureFormat(mFormat);\n        glCopyTexImage2D(GL_TEXTURE_2D, 0, texFormat, rect.left, rect.top, rect.Width(), rect.Height(), 0);\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformGetData(Byte* data)\n    {\n        // GLES2 has no glGetTexImage. Readback via FBO + glReadPixels\n        GLuint tmpFbo = 0;\n        glGenFramebuffers(1, &tmpFbo);\n        glBindFramebuffer(GL_FRAMEBUFFER, tmpFbo);\n        glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mHandle, 0);\n\n        if (glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE)\n            glReadPixels(0, 0, mSize.x, mSize.y, GL_RGBA, GL_UNSIGNED_BYTE, data);\n        else\n            o2Render.mLog->Error(\"Texture::PlatformGetData: framebuffer incomplete for readback\");\n\n        glBindFramebuffer(GL_FRAMEBUFFER, 0);\n        glDeleteFramebuffers(1, &tmpFbo);\n    }\n\n    void Texture::PlatformSetFilter()\n    {\n        GLint type = GL_LINEAR;\n        if (mFilter == Filter::Nearest)\n            type = GL_NEAREST;\n\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        o2Render.DrawPrimitives();\n\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, type);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, type);\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_ANDROID\n"
  },
  {
    "path": "Framework/Sources/o2/Render/BitmapFont.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"BitmapFont.h\"\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    BitmapFont::BitmapFont() :\n        Font()\n    {}\n\n    BitmapFont::BitmapFont(const String& fileName) :\n        Font()\n    {\n        Load(fileName);\n    }\n\n    bool BitmapFont::Load(const String& fileName)\n    {\n        mFileName = fileName;\n\n        DataDocument doc;\n        if (!doc.LoadFromFile(fileName))\n        {\n            o2Render.mLog->Error(\"Failed to load Bitmap Font file: \" + fileName);\n            return false;\n        }\n\n        if (auto common = doc.FindMember(\"common\"))\n        {\n            String textureName = (*common)[\"texture\"];\n            AssetRef<ImageAsset> image(textureName);\n            if (image)\n            {\n                TextureSource imageSource = image->GetTextureSource();\n                mTexture = imageSource.texture;\n                mTextureSrcRect = imageSource.sourceRect;\n\n                mBaseHeight = (*common)[\"base\"];\n                mLineHeight = (*common)[\"lineHeight\"];\n            }\n        }\n        else\n        {\n            o2Render.mLog->Error(\"Failed to get common info in font: \" + fileName + \". Bad file format\");\n            return false;\n        }\n\n        if (!mTexture)\n        {\n\t\t\to2Render.mLog->Error(\"Failed to load texture for Bitmap Font: \" + fileName + \". Texture not found\");\n\t\t\treturn false;\n        }\n\n        if (auto chars = doc.FindMember(\"chars\"))\n        {\n            Vec2F invTexSize = Vec2F(1, 1)/mTexture->GetSize();\n            Vec2F texOffs = Vec2F(mTextureSrcRect.LeftBottom())*invTexSize;\n            for (auto& child : *chars)\n            {\n                Character newChar;\n\n                newChar.mTexSrc.left = (float)child[\"x\"];\n                newChar.mTexSrc.top = (float)child[\"y\"];\n                newChar.mTexSrc.right = (float)child[\"width\"] + newChar.mTexSrc.left;\n                newChar.mTexSrc.bottom = (float)child[\"height\"] + newChar.mTexSrc.top;\n\n                newChar.mSize = newChar.mTexSrc.Size().InvertedY();\n\n                newChar.mTexSrc.left *= invTexSize.x;\n                newChar.mTexSrc.bottom *= invTexSize.y;\n                newChar.mTexSrc.right *= invTexSize.x;\n                newChar.mTexSrc.top *= invTexSize.y;\n\n                newChar.mTexSrc += texOffs;\n\n                newChar.mOrigin.x = -(float)(child[\"xoffset\"]);\n                newChar.mOrigin.y = mLineHeight - mBaseHeight;\n\n                newChar.mAdvance = child[\"xadvance\"];\n\n                newChar.mId = child[\"letter\"].GetString()[0];\n                 \n                newChar.mHeight = 0;\n\n                AddCharacter(newChar);\n            }\n        }\n        else\n        {\n            o2Render.mLog->Error(\"Failed to get characters node in BMFont file: \" + fileName + \". Bad file format\");\n            return false;\n        }\n\n        Vec2F invTexSize(1.0f / mTexture->GetSize().x, 1.0f / mTexture->GetSize().y);\n        for (auto& heightKV : mCharacters)\n        {\n            for (auto& charKV : heightKV.second)\n            {\n                charKV.second.mSize = charKV.second.mTexSrc.Size().InvertedY();\n                charKV.second.mTexSrc.left *= invTexSize.x;\n                charKV.second.mTexSrc.right *= invTexSize.x;\n                charKV.second.mTexSrc.top *= invTexSize.y;\n                charKV.second.mTexSrc.bottom *= invTexSize.y;\n            }\n        }\n\n        mReady = true;\n        return true;\n    }\n\n    String BitmapFont::GetFileName() const\n    {\n        return mFileName;\n    }\n\n    float BitmapFont::GetHeightPx(int height) const\n    {\n        return mBaseHeight;\n    }\n\n    float BitmapFont::GetLineHeightPx(int height) const\n    {\n        return mLineHeight;\n    }\n\n    const Font::Character& BitmapFont::GetCharacter(UInt16 id, int height)\n    {\n        return Font::GetCharacter(id, 0);\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/BitmapFont.h",
    "content": "#pragma once\n\n#include \"o2/Render/Font.h\"\n\nnamespace o2\n{\n    // -----------\n    // Bitmap font\n    // -----------\n    class BitmapFont: public Font\n    {\n    public:\n        // Default constructor\n        BitmapFont();\n\n        // Constructor with loading from file\n        BitmapFont(const String& fileName);\n\n        // Loads bitmap font data from file\n        bool Load(const String& fileName);\n\n        // Returns file name\n        String GetFileName() const;\n\n        // Returns base height in pixels for font with size\n        float GetHeightPx(int height) const;\n\n        // Returns line height in pixels for font with size\n        float GetLineHeightPx(int height) const;\n\n        // Returns character constant reference by id\n        const Character& GetCharacter(UInt16 id, int height);\n\n    protected:\n        String mFileName;   // Source file name\n        float  mBaseHeight; // Source font height\n        float  mLineHeight; // Source font line height\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Camera.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Camera.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    Camera::Camera(const Vec2F& position /*= Vec2F()*/, const Vec2F& size /*= o2Render.GetResolution()*/, \n                   float angle /*= 0.0f*/):\n        Transform(size, position, angle)\n    {\n        if (size == Vec2F() && Render::IsSingletonInitialzed())\n            SetSize(o2Render.GetCurrentResolution());\n    }\n\n    bool Camera::operator==(const Camera& other) const\n    {\n        return Transform::operator==(other);\n    }\n\n    bool Camera::operator!=(const Camera& other) const\n    {\n        return !Transform::operator==(other);\n    }\n\n    Camera Camera::Default()\n    {\n        return Camera();\n    }\n\n    Camera Camera::FixedSize(const Vec2F& size)\n    {        \n        return Camera(Vec2F(), size);\n    }\n\n    Camera Camera::FittedSize(const Vec2F& size)\n    {\n        Vec2F resolution = o2Render.GetCurrentResolution();\n\n        Vec2F scaledResolution = resolution*(size.x/resolution.x); \n        if (scaledResolution.y < size.y)\n            scaledResolution = resolution*(size.y/resolution.y);\n\n        return Camera(Vec2F(), scaledResolution);\n    }\n\n    Camera Camera::PhysicalCorrect(Units units)\n    {\n        Vec2F resolution = o2Render.GetCurrentResolution();\n        Vec2F dpi = o2Render.GetDPI();\n        float inchesInCentimeter = 2.5400013716f;\n\n        Vec2F pixelsInUnit(1.0f, 1.0f);\n        if (units == Units::Inches)\n            pixelsInUnit = dpi;\n        else if (units == Units::Centimeters)\n            pixelsInUnit = dpi/inchesInCentimeter;\n        else if (units == Units::Millimeters)\n            pixelsInUnit = dpi/inchesInCentimeter/10.0f;\n\n        return Camera(Vec2F(), resolution/pixelsInUnit);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Camera, o2__Camera);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Camera.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Transform.h\"\n\n\nnamespace o2\n{\n    class Texture;\n\n    // ------\n    // Camera\n    // ------\n    class Camera: public Transform\n    {\n    public:\n        // Constructor\n        Camera(const Vec2F& position = Vec2F(), const Vec2F& size = Vec2F(), float angle = 0.0f);\n\n        // Equals operator\n        bool operator==(const Camera& other) const;\n\n        // Not equals operator\n        bool operator!=(const Camera& other) const;\n\n        // Returns default camera\n        static Camera Default();\n\n        // Returns camera with fixed size\n        static Camera FixedSize(const Vec2F& size);\n\n        // Returns camera with fixed aspect\n        static Camera FittedSize(const Vec2F& size);\n\n        // Returns camera with physical correct units\n        static Camera PhysicalCorrect(Units units);\n\n        SERIALIZABLE(Camera);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Camera)\n{\n    BASE_CLASS(o2::Transform);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Camera)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::Camera)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vec2F&, const Vec2F&, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Camera, Default);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Camera, FixedSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Camera, FittedSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Camera, PhysicalCorrect, Units);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Font.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Font.h\"\n\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    Font::Font()\n    {}\n\n    Font::Font(const Font& font):\n        mCharacters(font.mCharacters), mTexture(font.mTexture), \n        mTextureSrcRect(font.mTextureSrcRect), mReady(font.mReady)\n    {}\n    \n    void Font::PostRefConstruct()\n    {\n        if (Render::IsSingletonInitialzed())\n            o2Render.OnFontCreated(this);\n    }\n\n    Font::~Font()\n    {\n\t\tif (Render::IsSingletonInitialzed())\n\t\t\to2Render.OnFontDestroyed(this);\n    }\n\n    float Font::GetHeightPx(int height) const\n    {\n        return 1.0f;\n    }\n\n    float Font::GetLineHeightPx(int height) const\n    {\n        return 1.0f;\n    }\n\n    const Font::Character& Font::GetCharacter(UInt16 id, int height)\n    {\n        auto fndHeight = mCharacters.find(height);\n        if (fndHeight != mCharacters.End())\n        {\n            auto fndChar = fndHeight->second.find(id);\n            if (fndChar != fndHeight->second.End())\n                return fndChar->second;\n        }\n\n        static Character empty;\n        return empty;\n    }\n\n    void Font::CheckCharacters(const WString& needChararacters, int height)\n    {}\n\n    String Font::GetFileName() const\n    {\n        return String();\n    }\n\n    const TextureRef& Font::GetTexture() const\n    {\n        return mTexture;\n    }\n\n    const RectI& Font::GetTextureSrcRect() const\n    {\n        return mTextureSrcRect;\n    }\n\n    void Font::AddCharacter(const Character& character)\n    {\n        mCharacters[character.mHeight][character.mId] = character;\n    }\n\n    bool Font::Character::operator==(const Character& other) const\n    {\n        return mId == other.mId && mHeight == other.mHeight;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Font.h",
    "content": "#pragma once\n\n#include \"3rdPartyLibs/FreeType/include/ft2build.h\"\n#include FT_FREETYPE_H\n\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Mesh;\n    class Render;\n\n    // -----------------------------------------------------------\n    // Font. Containing array of symbol glyphs, symbol index table\n    // -----------------------------------------------------------\n    class Font: public RefCounterable\n    {\n    protected:\n        struct Character;\n\n    public:\n        Function<void()> onCharactersRebuilt; // Called when characters was rebuilt\n\n    public:\n        // Default constructor\n        Font();\n\n        // Copy-constructor\n        Font(const Font& font);\n\n        // Destructor\n        virtual ~Font();\n\n        // Returns base height in pixels for font with size\n        virtual float GetHeightPx(int height) const;\n\n        // Returns line height in pixels for font with size\n        virtual float GetLineHeightPx(int height) const;\n\n        // Returns character constant reference by id\n        virtual const Character& GetCharacter(UInt16 id, int height);\n\n        // Checks characters for preloading\n        virtual void CheckCharacters(const WString& needChararacters, int height);\n\n        // Returns font file name\n        virtual String GetFileName() const;\n\n        // Returns texture\n        const TextureRef& GetTexture() const;\n\n        // Returns texture source rectangle\n        const RectI& GetTextureSrcRect() const;\n\n    protected:\n        // --------------------\n        // Character definition\n        // --------------------\n        struct Character\n        {\n            RectF  mTexSrc;  // texture source rect\n            Vec2F  mSize;    // Size of source rect\n            Vec2F  mOrigin;  // Symbol origin point\n            float  mAdvance; // Symbol advance\n            UInt16 mId;      // Character id\n            int    mHeight;  // Character height\n\n            bool operator==(const Character& other) const;\n        };\n\n    protected:\n        Map<int, Map<UInt16, Character>> mCharacters; // Characters map, int - height, uint16 - id\n\n        TextureRef mTexture;        // Texture\n        RectI        mTextureSrcRect; // Texture source rectangle\n\n        bool mReady = false; // True when font is ready to use\n\n    protected:\n        // It is called after reference initialization at object construction, registers texture in render\n        void PostRefConstruct();\n\n        // Adds character and registers in cache map\n        void AddCharacter(const Character& character);\n\n        friend class Text;\n        friend class Ref<Font>;\n        friend class Render;\n\n        FRIEND_REF_MAKE();\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/IDrawable.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"IDrawable.h\"\n\n#include \"o2/Render/Material.h\"\n#include \"Render.h\"\n\nnamespace o2\n{\n    IDrawable::~IDrawable()\n    {}\n\n    void IDrawable::Draw()\n    {\n        OnDrawn();\n    }\n\n    bool IDrawable::IsUnderPoint(const Vec2F& point)\n    {\n        return false;\n    }\n\n    void IDrawable::SetMaterial(const Ref<Material>& material)\n    {\n        mMaterial = material;\n        OnMaterialChanged();\n    }\n\n    Ref<Material> IDrawable::GetMaterial() const\n    {\n        return mMaterial;\n    }\n\n    void IDrawable::OnDrawn()\n    {\n        mDrawingScissorRect = o2Render.GetResScissorRect();\n        onDraw();\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/IDrawable.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    class Material;\n\n    // -------------------------------\n    // Basic drawable object interface\n    // -------------------------------\n    class IDrawable\n    {\n    public:\n        Function<void()> onDraw; // Draw event\n\n    public:\n        virtual ~IDrawable();\n\n        // Draws drawable\n        virtual void Draw();\n\n        // Returns true if point is under drawable\n        virtual bool IsUnderPoint(const Vec2F& point);\n\n        // Sets material for rendering. Pass nullptr for default material. Clears material asset (in derived classes that support it).\n        virtual void SetMaterial(const Ref<Material>& material);\n\n        // Returns current material (direct override; may be null)\n        virtual Ref<Material> GetMaterial() const;\n\n    protected:\n        RectF         mDrawingScissorRect; // Scissor rectangle at last drawing\n        Ref<Material> mMaterial;           // Direct material override\n\n    protected:\n        // Called when drawable was drawn. Storing render scissor rect, calling onDraw callback\n        virtual void OnDrawn();\n\n        // Called when material or material asset was changed (by user or code)\n        virtual void OnMaterialChanged() {}\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/IRectDrawable.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"IRectDrawable.h\"\n\n#include \"o2/Render/Material.h\"\n\nnamespace o2\n{\n    IRectDrawable::IRectDrawable(const Vec2F& size /*= Vec2F()*/, const Vec2F& position /*= Vec2F()*/,\n                                 float angle /*= 0.0f*/, const Vec2F& scale /*= Vec2F(1.0f, 1.0f)*/,\n                                 const Color4& color /*= Color4::White()*/, const Vec2F& pivot /*= Vec2F()*/):\n        Transform(size, position, angle, scale, pivot), mColor(color)\n    {}\n\n    IRectDrawable::IRectDrawable(const IRectDrawable& other) :\n        Transform(other.mSize, other.mPosition, other.mAngle, other.mScale, other.mPivot),\n        mColor(other.mColor), mEnabled(other.mEnabled), mMaterialAsset(other.mMaterialAsset)\n    {\n    }\n\n    IRectDrawable& IRectDrawable::operator=(const IRectDrawable& other)\n    {\n        Transform::operator=(other);\n\n        mColor = other.mColor;\n        mEnabled = other.mEnabled;\n\t\tmMaterialAsset = other.mMaterialAsset;\n\n        UpdateColor();\n\n\t\tOnEnableChanged();\n        OnMaterialChanged();\n\n        return *this;\n    }\n\n    bool IRectDrawable::operator==(const IRectDrawable& other) const\n    {\n        return Transform::operator==(other) && mColor == other.mColor && mEnabled == other.mEnabled\n            && mMaterialAsset == other.mMaterialAsset;\n    }\n\n    bool IRectDrawable::operator!=(const IRectDrawable& other) const\n    {\n        return !operator==(other);\n    }\n\n    void IRectDrawable::SetColor(const Color4& color)\n    {\n        mColor = color;\n        UpdateColor();\n    }\n\n    Color4 IRectDrawable::GetColor() const\n    {\n        return mColor;\n    }\n\n    void IRectDrawable::SetOverrideColor(const Color4 &color)\n    {\n        mOverrideColor = color;\n        UpdateColor();\n    }\n\n    Color4 IRectDrawable::GetOverrideColor() const\n    {\n        return mOverrideColor;\n    }\n\n    void IRectDrawable::SetTransparency(float transparency)\n    {\n        mColor.SetAF(transparency);\n        UpdateColor();\n    }\n\n    float IRectDrawable::GetTransparency() const\n    {\n        return mColor.AF();\n    }\n\n    void IRectDrawable::SetEnabled(bool enabled)\n    {\n        mEnabled = enabled;\n        OnEnableChanged();\n    }\n\n    bool IRectDrawable::IsEnabled() const\n    {\n        return mEnabled;\n    }\n\n    bool IRectDrawable::IsUnderPoint(const Vec2F& point)\n    {\n        return mDrawingScissorRect.IsInside(point) && Transform::IsPointInside(point);\n    }\n\n    void IRectDrawable::SetMaterialAsset(const AssetRef<MaterialAsset>& asset)\n    {\n        mMaterialAsset = asset;\n        IDrawable::SetMaterial(asset ? asset.GetRef() : Ref<Material>());\n    }\n\n    const AssetRef<MaterialAsset>& IRectDrawable::GetMaterialAsset() const\n    {\n        return mMaterialAsset;\n    }\n\n    void IRectDrawable::SetMaterial(const Ref<Material>& material)\n    {\n        mMaterialAsset = nullptr;\n        IDrawable::SetMaterial(material);\n    }\n\n    Ref<Material> IRectDrawable::GetMaterial() const\n    {\n        if (mMaterialAsset)\n            return mMaterialAsset.GetRef();\n\n        return IDrawable::GetMaterial();\n    }\n\n    Ref<IShaderParam> IRectDrawable::GetShaderParam(const String& name) const\n    {\n        auto mat = GetMaterial();\n        return mat ? mat->GetShaderParam(name) : nullptr;\n    }\n\n    Map<String, Ref<IShaderParam>> IRectDrawable::GetAllShaderParamsMap() const\n    {\n        auto mat = GetMaterial();\n        return mat ? mat->GetAllShaderParamsMap() : Map<String, Ref<IShaderParam>>();\n    }\n\n    void IRectDrawable::UpdateColor()\n    {\n        mResultColor = mColor * mOverrideColor;\n        OnColorChanged();\n    }\n\n\tvoid IRectDrawable::OnMaterialChanged()\n\t{\n\t}\n\n\tFunctionalRectDrawable::FunctionalRectDrawable(const Function<void(const Basis& transform, const Color4& color)>& draw,\n                                                   const Vec2F& size /*= Vec2F()*/, const Vec2F& position /*= Vec2F()*/, \n                                                   float angle /*= 0.0f*/, const Vec2F& scale /*= Vec2F(1.0f, 1.0f)*/, \n                                                   const Color4& color /*= Color4::White()*/, const Vec2F& pivot /*= Vec2F(0.5f, 0.5f)*/):\n        IRectDrawable(size, position, angle, scale, color, pivot), draw(draw)\n    {}\n\n    FunctionalRectDrawable::FunctionalRectDrawable(const FunctionalRectDrawable& other):\n        IRectDrawable(other), draw(other.draw)\n    {}\n\n    FunctionalRectDrawable::FunctionalRectDrawable() = default;\n\n    void FunctionalRectDrawable::Draw()\n    {\n        if (!mEnabled)\n            return;\n\n        draw(GetBasis(), mColor);\n\n        OnDrawn();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::IRectDrawable, o2__IRectDrawable);\n\nDECLARE_CLASS(o2::FunctionalRectDrawable, o2__FunctionalRectDrawable);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/IRectDrawable.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/MaterialAsset.h\"\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Utils/Editor/Attributes/RangeAttribute.h\"\n#include \"o2/Utils/Math/Color.h\"\n#include \"o2/Utils/Math/Transform.h\"\n#include \"o2/Utils/Property.h\"\n\nnamespace o2\n{\n    // -----------------------------\n    // Basic rect drawable interface\n    // -----------------------------\n    class IRectDrawable: public Transform, public virtual IDrawable, virtual public RefCounterable, virtual public ICloneableRef\n    {\n    public:\n\t\tPROPERTIES(IRectDrawable);\n\t\tPROPERTY(bool, enabled, SetEnabled, IsEnabled); // Enable property @SCRIPTABLE\n\n\t\tPROPERTY(Color4, color, SetColor, GetColor);                         // Color property @SCRIPTABLE\n\t\tPROPERTY(Color4, overrideColor, SetOverrideColor, GetOverrideColor); // Override color property, used to modify color from outside @SCRIPTABLE\n\t\tPROPERTY(float, transparency, SetTransparency, GetTransparency);     // Transparency property, changing alpha in color @SCRIPTABLE @RANGE(0, 1)\n\n\t\tPROPERTY(AssetRef<MaterialAsset>, material, SetMaterialAsset, GetMaterialAsset);         // Material (asset) for rendering @SCRIPTABLE\n\t\tACCESSOR(Ref<IShaderParam>, shaderParam, String, GetShaderParam, GetAllShaderParamsMap); // Shader parameter accessor by name\n\n    public:\n        // Constructor\n        IRectDrawable(const Vec2F& size = Vec2F(), const Vec2F& position = Vec2F(), float angle = 0.0f, \n                      const Vec2F& scale = Vec2F(1.0f, 1.0f), const Color4& color = Color4::White(), \n                      const Vec2F& pivot = Vec2F(0.5f, 0.5f));\n\n        // Copy-constructor\n        IRectDrawable(const IRectDrawable& other);\n\n        // Virtual destructor\n        ~IRectDrawable() override {}\n\n        // Assign operator\n        IRectDrawable& operator=(const IRectDrawable& other);\n\n        // Equals operator\n        bool operator==(const IRectDrawable& other) const;\n\n        // Not equals operator\n        bool operator!=(const IRectDrawable& other) const;\n\n        // Drawing\n        virtual void Draw() override {}\n\n        // Sets color\n        virtual void SetColor(const Color4& color);\n\n        // Returns color\n        virtual Color4 GetColor() const;\n\n        // Sets color override, used to modify color from outside\n        virtual void SetOverrideColor(const Color4& color);\n\n        // Returns color override, used to modify color from outside\n        virtual Color4 GetOverrideColor() const;\n\n        // Sets transparency. Changing color alpha\n        virtual void SetTransparency(float transparency);\n\n        // Returns transparency(color alpha)\n        virtual float GetTransparency() const;\n\n        // Sets enabled\n        virtual void SetEnabled(bool enabled);\n\n        // Returns enabled\n        virtual bool IsEnabled() const;\n\n        // Returns true if point is under drawable\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Sets material by asset reference. GetMaterial() will return asset's material.\n        void SetMaterialAsset(const AssetRef<MaterialAsset>& asset);\n\n        // Returns material asset reference, or null if not set. GetMaterial() will return asset's material if asset is set.\n        const AssetRef<MaterialAsset>& GetMaterialAsset() const;\n\n        // Sets material for rendering. Pass nullptr for default material. Clears material asset.\n        void SetMaterial(const Ref<Material>& material) override;\n\n        // Returns current material (from material asset if set, else direct override; may be null)\n        Ref<Material> GetMaterial() const override;\n\n        // Returns a shader parameter by uniform name from the current material, or nullptr if not found\n        Ref<IShaderParam> GetShaderParam(const String& name) const;\n\n        // Returns all shader parameters from the current material as a name-to-parameter map\n        Map<String, Ref<IShaderParam>> GetAllShaderParamsMap() const;\n\n        SERIALIZABLE(IRectDrawable);\n        CLONEABLE_REF(IRectDrawable);\n\n    protected:\n        Color4 mColor = Color4::White();          // Color @SERIALIZABLE\n        Color4 mOverrideColor = Color4::White();  // Override color, used to modify color from outside\n        Color4 mResultColor;                      // Result color, calculated from color and override color\n\n        bool mEnabled = true; // True, when drawable enabled and needs to draw @SERIALIZABLE\n\n        AssetRef<MaterialAsset> mMaterialAsset;   // Material asset (when set, GetMaterial uses its material) @SERIALIZABLE\n\n    protected:\n        // Updates result color from color and override color\n        void UpdateColor();\n\n        // Called when color was changed\n        virtual void OnColorChanged() {}\n\n        // Called when enabling changed\n        virtual void OnEnableChanged() {}\n\n\t\t// Called when material or material asset was changed (by user or code)\n        void OnMaterialChanged() override;\n    };\n\n    // -----------------------------\n    // Functional rectangle drawable\n    // -----------------------------\n    class FunctionalRectDrawable: public IRectDrawable\n    {\n    public:\n        Function<void(const Basis& transform, const Color4& color)> draw; // Draw function\n\n    public:\n        // Default constructor\n        FunctionalRectDrawable();\n\n        // Default constructor woth parameters\n        FunctionalRectDrawable(const Function<void(const Basis& transform, const Color4& color)>& draw,\n                               const Vec2F& size = Vec2F(), const Vec2F& position = Vec2F(), float angle = 0.0f,\n                               const Vec2F& scale = Vec2F(1.0f, 1.0f), const Color4& color = Color4::White(),\n                               const Vec2F& pivot = Vec2F(0.5f, 0.5f));\n\n        // Copy constructor\n        FunctionalRectDrawable(const FunctionalRectDrawable& other);\n\n        // Calls draw function to draw\n        void Draw() override;\n\n        SERIALIZABLE(FunctionalRectDrawable);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::IRectDrawable)\n{\n    BASE_CLASS(o2::Transform);\n    BASE_CLASS(o2::IDrawable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::IRectDrawable)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(enabled);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(color);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(overrideColor);\n    FIELD().PUBLIC().RANGE_ATTRIBUTE(0, 1).SCRIPTABLE_ATTRIBUTE().NAME(transparency);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(material);\n    FIELD().PUBLIC().NAME(shaderParam);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Color4::White()).NAME(mColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(Color4::White()).NAME(mOverrideColor);\n    FIELD().PROTECTED().NAME(mResultColor);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mEnabled);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mMaterialAsset);\n}\nEND_META;\nCLASS_METHODS_META(o2::IRectDrawable)\n{\n\n    typedef Map<String, Ref<IShaderParam>> _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vec2F&, const Vec2F&, float, const Vec2F&, const Color4&, const Vec2F&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const IRectDrawable&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetColor);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetOverrideColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetOverrideColor);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTransparency, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetTransparency);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaterialAsset, const AssetRef<MaterialAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<MaterialAsset>&, GetMaterialAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaterial, const Ref<Material>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Material>, GetMaterial);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IShaderParam>, GetShaderParam, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(_tmp1, GetAllShaderParamsMap);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateColor);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnColorChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnableChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMaterialChanged);\n}\nEND_META;\n\nCLASS_BASES_META(o2::FunctionalRectDrawable)\n{\n    BASE_CLASS(o2::IRectDrawable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FunctionalRectDrawable)\n{\n    FIELD().PUBLIC().NAME(draw);\n}\nEND_META;\nCLASS_METHODS_META(o2::FunctionalRectDrawable)\n{\n\n    typedef const Function<void(const Basis& transform, const Color4& color)>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(_tmp1, const Vec2F&, const Vec2F&, float, const Vec2F&, const Color4&, const Vec2F&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const FunctionalRectDrawable&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/MaterialBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_LINUX\n\n#include \"o2/Render/Linux/OpenGL.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    struct SamplerLocation\n    {\n        GLint samplerUniform = -1;\n        GLint texCoordsAttribute = -1;\n    };\n\n    class MaterialBase\n    {\n        friend class Render;\n\n    protected:\n        GLuint mProgram = 0;\n\n        GLint mTransformUniform = -1;\n        GLint mTextureUniform = -1;\n        GLint mPositionAttribute = -1;\n        GLint mColorAttribute = -1;\n        GLint mTexCoordsAttribute = -1;\n        GLint mNormalAttribute = -1;\n\n        mutable Vector<GLint> mParamUniformLocations;\n\n        Vector<SamplerLocation> mSamplerLocations;\n    };\n}\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/MaterialImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_LINUX\n\n#include \"o2/Render/Material.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    bool Material::PlatformBuild()\n    {\n        GLuint program = glCreateProgram();\n        if (program)\n        {\n            glAttachShader(program, mVertexShader->mHandle);\n            glAttachShader(program, mFragmentShader->mHandle);\n\n            GLint linkStatus;\n            glLinkProgram(program);\n            glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);\n\n            if (!linkStatus)\n            {\n                GLint infoLen = 0;\n                glGetProgramiv(program, GL_INFO_LOG_LENGTH, &infoLen);\n\n                if (infoLen > 0)\n                {\n                    char* infoLog = (char*)malloc(sizeof(char) * infoLen);\n                    glGetProgramInfoLog(program, infoLen, NULL, infoLog);\n                    o2Debug.LogError((String)\"Error linking material shader program:\\n\" + infoLog);\n                    free(infoLog);\n                }\n\n                glDeleteProgram(program);\n                return false;\n            }\n        }\n        else\n        {\n            return false;\n        }\n\n        mProgram = program;\n        mTransformUniform = glGetUniformLocation(program, \"u_transformMatrix\");\n        mTextureUniform = glGetUniformLocation(program, \"u_texture\");\n        mPositionAttribute = glGetAttribLocation(program, \"a_position\");\n        mColorAttribute = glGetAttribLocation(program, \"a_color\");\n        mTexCoordsAttribute = glGetAttribLocation(program, \"a_texCoords\");\n        mNormalAttribute = glGetAttribLocation(program, \"a_normal\");\n\n        mParamUniformLocations.Resize(mParams.Count());\n        for (int i = 0; i < mParams.Count(); i++)\n            mParamUniformLocations[i] = glGetUniformLocation(program, mParams[i]->GetName().Data());\n\n        mSamplerLocations.Resize(mSamplers.Count());\n        for (int i = 0; i < mSamplers.Count(); i++)\n        {\n            mSamplerLocations[i].samplerUniform = glGetUniformLocation(program, mSamplers[i].samplerUniformName.Data());\n            mSamplerLocations[i].texCoordsAttribute = glGetAttribLocation(program, mSamplers[i].texCoordsAttrName.Data());\n        }\n\n        return true;\n    }\n\n    void Material::PlatformDestroy()\n    {\n        if (mProgram)\n        {\n            glDeleteProgram(mProgram);\n            mProgram = 0;\n        }\n\n        mParamUniformLocations.Clear();\n        mSamplerLocations.Clear();\n        mReady = false;\n    }\n\n    void Material::PlatformApplyParams() const\n    {\n        if (mParamUniformLocations.Count() != mParams.Count())\n        {\n            mParamUniformLocations.Resize(mParams.Count());\n            for (int i = 0; i < mParams.Count(); i++)\n            {\n                if (mParams[i])\n                    mParamUniformLocations[i] = glGetUniformLocation(mProgram, mParams[i]->GetName().Data());\n            }\n        }\n\n        for (int i = 0; i < mParams.Count(); i++)\n        {\n            GLint loc = mParamUniformLocations[i];\n            if (loc < 0)\n                continue;\n\n            const auto& param = mParams[i];\n            if (auto* fp = dynamic_cast<ShaderParamFloat*>(param.Get()))\n                glUniform1f(loc, fp->GetValue());\n            else if (auto* v2p = dynamic_cast<ShaderParamVec2*>(param.Get()))\n                glUniform2f(loc, v2p->GetValue().x, v2p->GetValue().y);\n            else if (auto* cp = dynamic_cast<ShaderParamColor*>(param.Get()))\n                glUniform4f(loc, cp->GetValue().RF(), cp->GetValue().GF(), cp->GetValue().BF(), cp->GetValue().AF());\n            else if (auto* ip = dynamic_cast<ShaderParamInt*>(param.Get()))\n                glUniform1i(loc, ip->GetValue());\n        }\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/OpenGL.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#if defined(PLATFORM_LINUX) && !defined(O2_RENDER_GLES2)\n\n#include \"OpenGL.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nbool IsGLExtensionSupported(const char *extension)\n{\n    const GLubyte *extensions = NULL;\n    const GLubyte *start;\n\n    GLubyte *where, *terminator;\n    /* Extension names should not have spaces. */\n\n    where = (GLubyte *)strchr(extension, ' ');\n\n    if (where || *extension == '\\0')\n        return 0;\n\n    extensions = glGetString(GL_EXTENSIONS);\n\n    /* It takes a bit of care to be fool-proof about parsing the\n    OpenGL extensions string. Don't be fooled by sub-strings,\n    etc. */\n\n    start = extensions;\n    for (;;)\n    {\n        where = (GLubyte *)strstr((const char *)start, extension);\n\n        if (!where)\n            break;\n\n        terminator = where + strlen(extension);\n\n        if (where == start || *(where - 1) == ' ')\n            if (*terminator == ' ' || *terminator == '\\0')\n                return true;\n\n        start = terminator;\n    }\n\n    return false;\n}\n\nconst char* GetGLErrorDesc(GLenum errorId)\n{\n    if (errorId == GL_NO_ERROR) return \"GL_NO_ERROR\";\n    if (errorId == GL_INVALID_ENUM) return \"GL_INVALID_ENUM\";\n    if (errorId == GL_INVALID_VALUE) return \"GL_INVALID_VALUE\";\n    if (errorId == GL_INVALID_OPERATION) return \"GL_INVALID_OPERATION\";\n    if (errorId == GL_INVALID_FRAMEBUFFER_OPERATION) return \"GL_INVALID_FRAMEBUFFER_OPERATION\";\n    if (errorId == GL_OUT_OF_MEMORY) return \"GL_OUT_OF_MEMORY\";\n    if (errorId == GL_STACK_UNDERFLOW) return \"GL_STACK_UNDERFLOW\";\n    if (errorId == GL_STACK_OVERFLOW) return \"GL_STACK_OVERFLOW\";\n\n    return \"UNKNOWN\";\n}\n\nvoid glCheckError(const char* filename /*= nullptr*/, unsigned int line /*= 0*/)\n{\n    GLenum errId = glGetError();\n    if (errId != GL_NO_ERROR)\n    {\n        o2Debug.LogError(\"OpenGL ERROR \" + (o2::String)errId + \": \" + (o2::String)GetGLErrorDesc(errId) +\n                         \" at file: \" + (o2::String)(filename ? filename : \"unknown\") + \" line: \" + (o2::String)line);\n    }\n}\n// Returns address of function\nauto GetSafeWGLProcAddress(const char* id, o2::LogStream* log)\n{\n    auto res = glXGetProcAddress(reinterpret_cast<const GLubyte*>(id));\n    if (!res)\n        log->Error(\"Failed to get function address: \" + (o2::String)id);\n\n    return res;\n}\n\nvoid GetGLExtensions(o2::LogStream* log /*= nullptr*/)\n{\n    glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)GetSafeWGLProcAddress(\"glGenFramebuffersEXT\", log);\n    glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)GetSafeWGLProcAddress(\"glBindFramebufferEXT\", log);\n    glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC)GetSafeWGLProcAddress(\"glFramebufferTexture\", log);\n    glDrawBuffers = (PFNGLDRAWBUFFERSPROC)GetSafeWGLProcAddress(\"glDrawBuffers\", log);\n    glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)GetSafeWGLProcAddress(\"glDeleteBuffers\", log);\n    glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSPROC)GetSafeWGLProcAddress(\"glDeleteFramebuffersEXT\", log);\n    glCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)GetSafeWGLProcAddress(\"glCheckFramebufferStatusEXT\", log);\n    glGenBuffers = (PFNGLGENBUFFERSPROC)GetSafeWGLProcAddress(\"glGenBuffers\", log);\n    glBindBuffer = (PFNGLBINDBUFFERPROC)GetSafeWGLProcAddress(\"glBindBuffer\", log);\n    glBufferData = (PFNGLBUFFERDATAPROC)GetSafeWGLProcAddress(\"glBufferData\", log);\n    glCreateShader = (PFNGLCREATESHADERPROC)GetSafeWGLProcAddress(\"glCreateShader\", log);\n    glDeleteShader = (PFNGLDELETESHADERPROC)GetSafeWGLProcAddress(\"glDeleteShader\", log);\n    glShaderSource = (PFNGLSHADERSOURCEPROC)GetSafeWGLProcAddress(\"glShaderSource\", log);\n    glCompileShader = (PFNGLCOMPILESHADERPROC)GetSafeWGLProcAddress(\"glCompileShader\", log);\n    glGetShaderiv = (PFNGLGETSHADERIVPROC)GetSafeWGLProcAddress(\"glGetShaderiv\", log);\n    glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)GetSafeWGLProcAddress(\"glGetShaderInfoLog\", log);\n    glCreateProgram = (PFNGLCREATEPROGRAMPROC)GetSafeWGLProcAddress(\"glCreateProgram\", log);\n    glAttachShader = (PFNGLATTACHSHADERPROC)GetSafeWGLProcAddress(\"glAttachShader\", log);\n    glLinkProgram = (PFNGLLINKPROGRAMPROC)GetSafeWGLProcAddress(\"glLinkProgram\", log);\n    glGetProgramiv = (PFNGLGETPROGRAMIVPROC)GetSafeWGLProcAddress(\"glGetProgramiv\", log);\n    glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)GetSafeWGLProcAddress(\"glGetProgramInfoLog\", log);\n    glUseProgram = (PFNGLUSEPROGRAMPROC)GetSafeWGLProcAddress(\"glUseProgram\", log);\n    glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)GetSafeWGLProcAddress(\"glGetUniformLocation\", log);\n    glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)GetSafeWGLProcAddress(\"glGetAttribLocation\", log);\n    glDeleteProgram = (PFNGLDELETEPROGRAMPROC)GetSafeWGLProcAddress(\"glDeleteProgram\", log);\n    glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)GetSafeWGLProcAddress(\"glVertexAttribPointer\", log);\n    glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)GetSafeWGLProcAddress(\"glEnableVertexAttribArray\", log);\n    glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)GetSafeWGLProcAddress(\"glUniformMatrix4fv\", log);\n    glUniform1i = (PFNGLUNIFORM1IPROC)GetSafeWGLProcAddress(\"glUniform1i\", log);\n    glUniform1f = (PFNGLUNIFORM1FPROC)GetSafeWGLProcAddress(\"glUniform1f\", log);\n    glUniform2f = (PFNGLUNIFORM2FPROC)GetSafeWGLProcAddress(\"glUniform2f\", log);\n    glUniform4f = (PFNGLUNIFORM4FPROC)GetSafeWGLProcAddress(\"glUniform4f\", log);\n    glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)GetSafeWGLProcAddress(\"glBlendFuncSeparate\", log);\n    glBufferSubData = (PFNGLBUFFERSUBDATAPROC)GetSafeWGLProcAddress(\"glBufferSubData\", log);\n}\n\nPFNGLGENFRAMEBUFFERSEXTPROC        glGenFramebuffersEXT = NULL;\nPFNGLBINDFRAMEBUFFEREXTPROC        glBindFramebufferEXT = NULL;\nPFNGLFRAMEBUFFERTEXTUREPROC        glFramebufferTexture = NULL;\nPFNGLDRAWBUFFERSPROC               glDrawBuffers = NULL;\nPFNGLDELETEBUFFERSPROC             glDeleteBuffers = NULL;\nPFNGLDELETEFRAMEBUFFERSPROC        glDeleteFramebuffersEXT = NULL;\nPFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT = NULL;\nPFNGLGENBUFFERSPROC                glGenBuffers = NULL;\nPFNGLBINDBUFFERPROC                glBindBuffer = NULL;\nPFNGLBUFFERDATAPROC                glBufferData = NULL;\nPFNGLCREATESHADERPROC              glCreateShader = NULL;\nPFNGLDELETESHADERPROC              glDeleteShader = NULL;\nPFNGLSHADERSOURCEPROC              glShaderSource = NULL;\nPFNGLCOMPILESHADERPROC             glCompileShader = NULL;\nPFNGLGETSHADERIVPROC               glGetShaderiv = NULL;\nPFNGLGETSHADERINFOLOGPROC          glGetShaderInfoLog = NULL;\nPFNGLCREATEPROGRAMPROC             glCreateProgram = NULL;\nPFNGLATTACHSHADERPROC              glAttachShader = NULL;\nPFNGLLINKPROGRAMPROC               glLinkProgram = NULL;\nPFNGLGETPROGRAMIVPROC              glGetProgramiv = NULL;\nPFNGLGETPROGRAMINFOLOGPROC         glGetProgramInfoLog = NULL;\nPFNGLUSEPROGRAMPROC                glUseProgram = NULL;\nPFNGLGETUNIFORMLOCATIONPROC        glGetUniformLocation = NULL;\nPFNGLGETATTRIBLOCATIONPROC         glGetAttribLocation = NULL;\nPFNGLDELETEPROGRAMPROC             glDeleteProgram = NULL;\nPFNGLVERTEXATTRIBPOINTERPROC       glVertexAttribPointer = NULL;\nPFNGLENABLEVERTEXATTRIBARRAYPROC   glEnableVertexAttribArray = NULL;\nPFNGLUNIFORMMATRIX4FVPROC          glUniformMatrix4fv = NULL;\nPFNGLUNIFORM1IPROC                 glUniform1i = NULL;\nPFNGLUNIFORM1FPROC                 glUniform1f = NULL;\nPFNGLUNIFORM2FPROC                 glUniform2f = NULL;\nPFNGLUNIFORM4FPROC                 glUniform4f = NULL;\nPFNGLBLENDFUNCSEPARATEPROC         glBlendFuncSeparate = NULL;\nPFNGLBUFFERSUBDATAPROC             glBufferSubData = NULL;\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/OpenGL.h",
    "content": "#pragma once\n\n#if defined(PLATFORM_LINUX) && !defined(O2_RENDER_GLES2)\n\n#define Font XFont\n\n#include <GL/gl.h>\n#include <GL/glx.h>\n\n// Undef X-lib shit\n#undef Bool\n#undef None\n#undef CurrentTime\n#undef Font\n\nnamespace o2\n{\n    class LogStream;\n}\n\n// Getting openGL extensions\nvoid GetGLExtensions(o2::LogStream* log = nullptr);\n\n// Returns opengl error description by id\nconst char* GetGLErrorDesc(GLenum errorId);\n\n// Checks OpenGL extension supporting\nbool IsGLExtensionSupported(const char *extension);\n\n// Checks OpenGL error\nvoid glCheckError(const char* filename = nullptr, unsigned int line = 0);\n\n#if RENDER_DEBUG\n#    define GL_CHECK_ERROR() glCheckError(__FILE__, __LINE__);\n#else\n#    define GL_CHECK_ERROR()\n#endif\n\nextern PFNGLGENFRAMEBUFFERSEXTPROC        glGenFramebuffersEXT;\nextern PFNGLBINDFRAMEBUFFEREXTPROC        glBindFramebufferEXT;\nextern PFNGLFRAMEBUFFERTEXTUREPROC        glFramebufferTexture;\nextern PFNGLDRAWBUFFERSPROC               glDrawBuffers;\nextern PFNGLDELETEBUFFERSPROC             glDeleteBuffers;\nextern PFNGLDELETEFRAMEBUFFERSPROC        glDeleteFramebuffersEXT;\nextern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;\nextern PFNGLGENBUFFERSPROC                glGenBuffers;\nextern PFNGLBINDBUFFERPROC                   glBindBuffer;\nextern PFNGLBUFFERDATAPROC                glBufferData;\nextern PFNGLCREATESHADERPROC              glCreateShader;\nextern PFNGLDELETESHADERPROC              glDeleteShader;\nextern PFNGLSHADERSOURCEPROC              glShaderSource;\nextern PFNGLCOMPILESHADERPROC             glCompileShader;\nextern PFNGLGETSHADERIVPROC               glGetShaderiv;\nextern PFNGLGETSHADERINFOLOGPROC          glGetShaderInfoLog;\nextern PFNGLCREATEPROGRAMPROC             glCreateProgram;\nextern PFNGLATTACHSHADERPROC              glAttachShader;\nextern PFNGLLINKPROGRAMPROC               glLinkProgram;\nextern PFNGLGETPROGRAMIVPROC              glGetProgramiv;\nextern PFNGLGETPROGRAMINFOLOGPROC         glGetProgramInfoLog;\nextern PFNGLUSEPROGRAMPROC                glUseProgram;\nextern PFNGLGETUNIFORMLOCATIONPROC        glGetUniformLocation;\nextern PFNGLGETATTRIBLOCATIONPROC         glGetAttribLocation;\nextern PFNGLDELETEPROGRAMPROC             glDeleteProgram;\nextern PFNGLVERTEXATTRIBPOINTERPROC       glVertexAttribPointer;\nextern PFNGLENABLEVERTEXATTRIBARRAYPROC   glEnableVertexAttribArray;\nextern PFNGLUNIFORMMATRIX4FVPROC          glUniformMatrix4fv;\nextern PFNGLUNIFORM1IPROC                 glUniform1i;\nextern PFNGLUNIFORM1FPROC                 glUniform1f;\nextern PFNGLUNIFORM2FPROC                 glUniform2f;\nextern PFNGLUNIFORM4FPROC                 glUniform4f;\nextern PFNGLBLENDFUNCSEPARATEPROC         glBlendFuncSeparate;\nextern PFNGLBUFFERSUBDATAPROC             glBufferSubData;\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/RenderBase.h",
    "content": "#pragma once\n\n#if defined(PLATFORM_LINUX) && !defined(O2_RENDER_GLES2)\n\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Render/Linux/OpenGL.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\nnamespace o2\n{\n    class Texture;\n\n    class RenderBase\n    {\n    protected:\n        GLXContext mGLContext; // OpenGL context\n\n        GLuint mActiveProgram;              // Currently active shader program\n        GLint  mActiveMvpUniform;           // Currently active transform uniform location\n        GLint  mActiveTextureSample;        // Currently active texture sampler uniform location\n        GLint  mActivePosAttribute;         // Currently active position attribute location\n        GLint  mActiveColorAttribute;       // Currently active color attribute location\n        GLint  mActiveUVAttribute;          // Currently active texcoords attribute location\n        GLint  mActiveNormalAttribute = -1; // Currently active normal attribute location\n\n        float  mCurrentMvp[16];             // Cached MVP matrix for material rebinding\n\n        const static int mBuffersPoolsSize = 3;       // Count of buffers in pools\n        GLuint mVertexBuffersPool[mBuffersPoolsSize]; // GPU vertex buffer objects\n        GLuint mIndexBuffersPool[mBuffersPoolsSize];  // GPU index buffer objects\n        int    mCurrentBufferIdx = 0;                 // Current buffer pool index\n\n    protected:\n    };\n};\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/RenderImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#if defined(PLATFORM_LINUX) && !defined(O2_RENDER_GLES2)\n#include \"o2/Render/Render.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/Math/Geometry.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n\nnamespace o2\n{\n    void Render::InitializePlatform()\n    {\n        mLog->Out(\"Initializing OpenGL render..\");\n\n        if (o2Application.mNeedPlatformInitialization)\n        {\n            mGLContext = glXCreateContext(o2Application.mDisplay, o2Application.mVisualInfo, NULL, GL_TRUE);\n            glXMakeCurrent(o2Application.mDisplay, o2Application.mWindow, mGLContext);\n        }\n\n        GetGLExtensions(mLog.Get());\n\n        GL_CHECK_ERROR();\n\n        mVertexBufferSize = USHRT_MAX;\n        mIndexBufferSize = USHRT_MAX;\n        mCurrentBatchVertexType = Vertex::Type();\n        mVertexBufferByteSize = mVertexBufferSize * sizeof(Vertex);\n\n        mVertexData = mnew UInt8[mVertexBufferByteSize];\n        mVertexIndexData = mnew VertexIndex[mIndexBufferSize * sizeof(VertexIndex)];\n\n        for (int i = 0; i < mBuffersPoolsSize; i++)\n        {\n            glGenBuffers(1, &mVertexBuffersPool[i]);\n            glBindBuffer(GL_ARRAY_BUFFER, mVertexBuffersPool[i]);\n            glBufferData(GL_ARRAY_BUFFER, mVertexBufferByteSize, mVertexData, GL_DYNAMIC_DRAW);\n\n            glGenBuffers(1, &mIndexBuffersPool[i]);\n            glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffersPool[i]);\n            glBufferData(GL_ELEMENT_ARRAY_BUFFER, (GLsizeiptr)(mIndexBufferSize * sizeof(VertexIndex)), mVertexIndexData, GL_DYNAMIC_DRAW);\n        }\n\n        glEnable(GL_BLEND);\n        glDisable(GL_DEPTH_TEST);\n        glDisable(GL_CULL_FACE);\n        glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n        glLineWidth(1.0f);\n\n        mLog->Out(\"GL_VENDOR: \" + (String)(char*)glGetString(GL_VENDOR));\n        mLog->Out(\"GL_RENDERER: \" + (String)(char*)glGetString(GL_RENDERER));\n        mLog->Out(\"GL_VERSION: \" + (String)(char*)glGetString(GL_VERSION));\n    }\n\n    void Render::DeinitializePlatform()\n    {\n        if (mGLContext && o2Application.mDisplay)\n        {\n            glXMakeCurrent(o2Application.mDisplay, 0, NULL);\n            glXDestroyContext(o2Application.mDisplay, mGLContext);\n            mGLContext = NULL;\n        }\n    }\n\n    void Render::InitializeSandardShader()\n    {\n    }\n\n    void Render::PlatformInitializeDefaultMaterial()\n    {\n        String basePath = GetBuiltinAssetsPath();\n        String vSource = FileSystem::ReadFile(basePath + \"Shaders/Default.vsh\");\n        String fSource = FileSystem::ReadFile(basePath + \"Shaders/Default.fsh\");\n\n        if (vSource.IsEmpty() || fSource.IsEmpty())\n        {\n            o2Debug.LogError(\"Failed to load default shader files (FrameworkData/Shaders/Default.vsh, FrameworkData/Shaders/Default.fsh). \\n\"\n                             \"Ensure they are in BuiltAssets.\");\n            return;\n        }\n\n        Ref<Shader> vShader = mmake<Shader>();\n        Ref<Shader> fShader = mmake<Shader>();\n        vShader->Compile(vSource, Shader::Type::Vertex);\n        fShader->Compile(fSource, Shader::Type::Fragment);\n\n        if (!vShader->IsReady() || !fShader->IsReady())\n        {\n            o2Debug.LogError(\"Failed to compile default shaders (FrameworkData/Shaders/Default.vsh, FrameworkData/Shaders/Default.fsh).\");\n            return;\n        }\n\n        mDefaultMaterial = mmake<Material>();\n        mDefaultMaterial->SetVertexShader(vShader);\n        mDefaultMaterial->SetFragmentShader(fShader);\n        mDefaultMaterial->SetBlendMode(BlendMode::Normal);\n        if (!mDefaultMaterial->Build())\n        {\n            o2Debug.LogError(\"Failed to build default material from Shaders/Default.\");\n            mDefaultMaterial = nullptr;\n            return;\n        }\n    }\n\n    void Render::PlatformBindNextPoolBuffers()\n    {\n        mCurrentBufferIdx++;\n        if (mCurrentBufferIdx == mBuffersPoolsSize)\n            mCurrentBufferIdx = 0;\n\n        glBindBuffer(GL_ARRAY_BUFFER, mVertexBuffersPool[mCurrentBufferIdx]);\n        glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffersPool[mCurrentBufferIdx]);\n        GL_CHECK_ERROR();\n\n        size_t stride = mCurrentBatchVertexType.GetStride();\n        if (stride == 0) stride = sizeof(Vertex);\n\n        glVertexAttribPointer((GLuint)mActivePosAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Position));\n        glEnableVertexAttribArray((GLuint)mActivePosAttribute);\n        GL_CHECK_ERROR();\n\n        glVertexAttribPointer((GLuint)mActiveColorAttribute, 4, GL_UNSIGNED_BYTE, GL_TRUE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Color));\n        glEnableVertexAttribArray((GLuint)mActiveColorAttribute);\n        GL_CHECK_ERROR();\n\n        glVertexAttribPointer((GLuint)mActiveUVAttribute, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0));\n        glEnableVertexAttribArray((GLuint)mActiveUVAttribute);\n        GL_CHECK_ERROR();\n\n        if (mActiveNormalAttribute >= 0 && mCurrentBatchVertexType.HasParam(VertexParam::Normal))\n        {\n            glVertexAttribPointer((GLuint)mActiveNormalAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Normal));\n            glEnableVertexAttribArray((GLuint)mActiveNormalAttribute);\n            GL_CHECK_ERROR();\n        }\n\n        mVertexBufferIdx = 0;\n        mIndexBufferIdx = 0;\n    }\n\n    void Render::PlatformBegin()\n    {\n        PlatformBindNextPoolBuffers();\n    }\n\n    void Render::PlatformDrawPrimitives()\n    {\n        static const GLenum primitiveType[3]{ GL_TRIANGLES, GL_TRIANGLES, GL_LINES };\n\n        size_t stride = mCurrentBatchVertexType.GetStride();\n\n        glBufferSubData(GL_ARRAY_BUFFER, mVertexBufferIdx * stride, mLastDrawVertex * stride, mVertexData);\n        glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, mIndexBufferIdx * sizeof(VertexIndex), mLastDrawIdx * sizeof(VertexIndex), mVertexIndexData);\n        GL_CHECK_ERROR();\n\n        glActiveTexture(GL_TEXTURE0);\n        glBindTexture(GL_TEXTURE_2D, mCurrentDrawTexture ? mCurrentDrawTexture->mHandle : mWhiteTexture->mHandle);\n        glUniform1i(mActiveTextureSample, 0);\n        GL_CHECK_ERROR();\n\n        glDrawElements(primitiveType[(int)mCurrentPrimitiveType], mLastDrawIdx, GL_UNSIGNED_INT, (void*)(mIndexBufferIdx * sizeof(VertexIndex)));\n        GL_CHECK_ERROR();\n\n        mVertexBufferIdx += mLastDrawVertex;\n        mIndexBufferIdx += mLastDrawIdx;\n    }\n\n    void Render::PlatformEnd()\n    {\n        if (o2Application.mNeedPlatformInitialization)\n            glXSwapBuffers(o2Application.mDisplay, o2Application.mWindow);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformResetState()\n    {\n        glEnable(GL_BLEND);\n        glDisable(GL_DEPTH_TEST);\n        glDisable(GL_CULL_FACE);\n        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n        glDisable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n\n        BindMaterial(mDefaultMaterial);\n        PlatformBindNextPoolBuffers();\n\n        glActiveTexture(GL_TEXTURE0);\n        glBindTexture(GL_TEXTURE_2D, 0);\n        GL_CHECK_ERROR();\n\n        glUniform1i(mActiveTextureSample, 0);\n        GL_CHECK_ERROR();\n\n        size_t stride = mCurrentBatchVertexType.GetStride();\n        if (stride == 0) stride = sizeof(Vertex);\n\n        glVertexAttribPointer((GLuint)mActivePosAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Position));\n        glEnableVertexAttribArray((GLuint)mActivePosAttribute);\n        GL_CHECK_ERROR();\n\n        glVertexAttribPointer((GLuint)mActiveColorAttribute, 4, GL_UNSIGNED_BYTE, GL_TRUE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Color));\n        glEnableVertexAttribArray((GLuint)mActiveColorAttribute);\n        GL_CHECK_ERROR();\n\n        glVertexAttribPointer((GLuint)mActiveUVAttribute, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0));\n        glEnableVertexAttribArray((GLuint)mActiveUVAttribute);\n        GL_CHECK_ERROR();\n\n        if (mActiveNormalAttribute >= 0 && mCurrentBatchVertexType.HasParam(VertexParam::Normal))\n        {\n            glVertexAttribPointer((GLuint)mActiveNormalAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Normal));\n            glEnableVertexAttribArray((GLuint)mActiveNormalAttribute);\n            GL_CHECK_ERROR();\n        }\n    }\n\n    VertexType Render::PlatformResolveBatchVertexType(const VertexType& sourceVertexType, const Ref<Material>& material) const\n    {\n        return ResolveBatchVertexTypeByMaterial(sourceVertexType, material);\n    }\n\n    void Render::Clear(const Color4& color /*= Color4::Blur()*/)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        glClearColor(color.RF(), color.GF(), color.BF(), color.AF());\n        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformSetupCameraTransforms(float* modelMatrix, float* viewMatrix, float* projMatrix)\n    {\n        float finalCamMtx[16];\n        Math::mtxMultiply(finalCamMtx, modelMatrix, viewMatrix);\n        Math::mtxMultiply(mCurrentMvp, projMatrix, finalCamMtx);\n\n        glViewport(0, 0, mCurrentResolution.x, mCurrentResolution.y);\n        glUniformMatrix4fv(mActiveMvpUniform, 1, GL_FALSE, mCurrentMvp);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformFlipVerticesUV()\n    {\n        size_t stride = mCurrentBatchVertexType.GetStride();\n        size_t tvOffset = mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0) + sizeof(float);\n\n        for (UInt i = 0; i < mLastDrawVertex; i++)\n        {\n            float& tv = *reinterpret_cast<float*>(&mVertexData[i * stride + tvOffset]);\n            tv = 1.0f - tv;\n        }\n    }\n\n    void Render::PlatformEnableScissorTest()\n    {\n        glEnable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformDisableScissorTest()\n    {\n        glDisable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformSetScissorRect(const RectI& rect)\n    {\n        glScissor((int)(rect.left + mCurrentResolution.x * 0.5f), (int)(rect.bottom + mCurrentResolution.y * 0.5f),\n                  (int)rect.Width(), (int)rect.Height());\n    }\n\n    void Render::PlatformBindRenderTarget(const TextureRef& renderTarget)\n    {\n        if (renderTarget)\n            glBindFramebufferEXT(GL_FRAMEBUFFER, renderTarget->mFrameBuffer);\n        else\n            glBindFramebufferEXT(GL_FRAMEBUFFER, 0);\n\n        GL_CHECK_ERROR();\n    }\n\n    Vec2I Render::GetPlatformMaxTextureSize()\n    {\n        int size = 0;\n        glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);\n        return Vec2I(size, size);\n    }\n\n    Vec2I Render::GetPlatformDPI()\n    {\n        return Vec2I(90, 90);\n    }\n\n    void Render::PlatformBindMaterial(const Ref<Material>& material)\n    {\n        if (material->mProgram != mActiveProgram)\n        {\n            mActiveProgram = material->mProgram;\n            mActiveMvpUniform = material->mTransformUniform;\n            mActiveTextureSample = material->mTextureUniform;\n            mActivePosAttribute = material->mPositionAttribute;\n            mActiveColorAttribute = material->mColorAttribute;\n            mActiveUVAttribute = material->mTexCoordsAttribute;\n            mActiveNormalAttribute = material->mNormalAttribute;\n\n            glUseProgram(mActiveProgram);\n            GL_CHECK_ERROR();\n\n            size_t stride = mCurrentBatchVertexType.GetStride();\n            if (stride == 0)\n                stride = sizeof(Vertex);\n\n            glVertexAttribPointer((GLuint)mActivePosAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Position));\n            glEnableVertexAttribArray((GLuint)mActivePosAttribute);\n\n            glVertexAttribPointer((GLuint)mActiveColorAttribute, 4, GL_UNSIGNED_BYTE, GL_TRUE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Color));\n            glEnableVertexAttribArray((GLuint)mActiveColorAttribute);\n\n            glVertexAttribPointer((GLuint)mActiveUVAttribute, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0));\n            glEnableVertexAttribArray((GLuint)mActiveUVAttribute);\n\n            if (mActiveNormalAttribute >= 0 && mCurrentBatchVertexType.HasParam(VertexParam::Normal))\n            {\n                glVertexAttribPointer((GLuint)mActiveNormalAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                      (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Normal));\n                glEnableVertexAttribArray((GLuint)mActiveNormalAttribute);\n            }\n\n            const UInt texCoordParams[] = { VertexParam::TexCoord1, VertexParam::TexCoord2 };\n            for (int i = 0; i < material->mSamplerLocations.Count(); i++)\n            {\n                GLint attrLoc = material->mSamplerLocations[i].texCoordsAttribute;\n                if (attrLoc >= 0 && i < 2 && mCurrentBatchVertexType.HasParam(texCoordParams[i]))\n                {\n                    glVertexAttribPointer((GLuint)attrLoc, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                          (void*)mCurrentBatchVertexType.GetParamOffset(texCoordParams[i]));\n                    glEnableVertexAttribArray((GLuint)attrLoc);\n                }\n            }\n\n            GL_CHECK_ERROR();\n\n            glUniformMatrix4fv(mActiveMvpUniform, 1, GL_FALSE, mCurrentMvp);\n            GL_CHECK_ERROR();\n        }\n\n        material->ApplyParams();\n\n        for (int i = 0; i < material->mSamplerLocations.Count() && i < material->mSamplers.Count(); i++)\n        {\n            const auto& loc = material->mSamplerLocations[i];\n            TextureRef tex = material->mSamplers[i].GetTexture();\n            if (!tex)\n                continue;\n\n            GLint texUnit = i + 1;\n            glActiveTexture(GL_TEXTURE0 + texUnit);\n            glBindTexture(GL_TEXTURE_2D, tex->mHandle);\n\n            if (loc.samplerUniform >= 0)\n                glUniform1i(loc.samplerUniform, texUnit);\n        }\n        glActiveTexture(GL_TEXTURE0);\n\n        if (material->GetBlendMode() == BlendMode::Add)\n            glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n        else\n            glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/ShaderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_LINUX\n\n#include \"o2/Render/Linux/OpenGL.h\"\n\nnamespace o2\n{\n    class ShaderBase\n    {\n        friend class Render;\n        friend class Material;\n\n    protected:\n        GLuint mHandle = 0;\n    };\n}\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/ShaderImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_LINUX\n\n#include \"o2/Render/Shader.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    bool Shader::PlatformCompile(const String& source, Type type)\n    {\n        GLenum glType = (type == Type::Vertex) ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER;\n        GLuint shader = glCreateShader(glType);\n\n        if (shader)\n        {\n            const char* src = source.Data();\n            glShaderSource(shader, 1, &src, NULL);\n            glCompileShader(shader);\n\n            GLint compiled = 0;\n            glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);\n\n            if (!compiled)\n            {\n                GLint infoLen = 0;\n                glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);\n\n                if (infoLen > 0)\n                {\n                    char* infoLog = (char*)malloc(sizeof(char) * infoLen);\n                    glGetShaderInfoLog(shader, infoLen, NULL, infoLog);\n                    o2Debug.LogError((String)\"Error compiling shader \" + mFileName + \":\\n\" + infoLog);\n                    free(infoLog);\n                }\n\n                glDeleteShader(shader);\n                shader = 0;\n            }\n        }\n\n        mHandle = shader;\n        return shader != 0;\n    }\n\n    void Shader::PlatformDestroy()\n    {\n        if (mHandle)\n        {\n            glDeleteShader(mHandle);\n            mHandle = 0;\n        }\n\n        mReady = false;\n    }\n}\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/TextureBase.h",
    "content": "#pragma once\n\n#if defined(PLATFORM_LINUX) && !defined(O2_RENDER_GLES2)\n\n#include \"o2/Render/Linux/OpenGL.h\"\n\nnamespace o2\n{\n    class TextureBase\n    {\n        friend class Render;\n        friend class VectorFont;\n\n    protected:\n        GLuint mHandle;      // Texture handle\n        GLuint mFrameBuffer; // Frame buffer for rendering into texture\n    };\n}\n\n#endif // PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Linux/TextureImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#if defined(PLATFORM_LINUX) && !defined(O2_RENDER_GLES2)\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    Map<TextureFormat, GLint> formatMap =\n    {\n        { TextureFormat::R8G8B8A8, GL_RGBA },\n        { TextureFormat::DXT5, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT }\n    };\n\n    bool Texture::PlatformCreate()\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n\n        glGenTextures(1, &mHandle);\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        GL_CHECK_ERROR();\n\n        GLint texFormat = formatMap[format];\n        glTexImage2D(GL_TEXTURE_2D, 0, texFormat, (GLsizei)mSize.x, (GLsizei)mSize.y, 0, texFormat, GL_UNSIGNED_BYTE, NULL);\n        GL_CHECK_ERROR();\n\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n        GL_CHECK_ERROR();\n\n        if (mUsage == Usage::RenderTarget)\n        {\n            glGenFramebuffersEXT(1, &mFrameBuffer);\n            glBindFramebufferEXT(GL_FRAMEBUFFER, mFrameBuffer);\n\n            glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, mHandle, 0);\n\n            GLenum DrawBuffers[2] = { GL_COLOR_ATTACHMENT0 };\n            glDrawBuffers(1, DrawBuffers);\n\n            if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)\n            {\n                GLenum glError = glGetError();\n\n                o2Render.mLog->Error(\"Failed to create GL frame buffer object! GL Error %i %cs\", glError,\n                                     GetGLErrorDesc(glError));\n\n                glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n\n                return false;\n            }\n\n            glBindFramebufferEXT(GL_FRAMEBUFFER, 0);\n            GL_CHECK_ERROR();\n        }\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n\n        return true;\n    }\n\n    void Texture::PlatformDestroy()\n    {\n        if (mUsage == Usage::RenderTarget)\n            glDeleteFramebuffersEXT(1, &mFrameBuffer);\n\n        glDeleteTextures(1, &mHandle);\n    }\n\n    void Texture::PlatformUploadData(const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n\n        GLint texFormat = formatMap[format];\n\n        if (format == TextureFormat::DXT5)\n        {\n            int blockSize = 16;\n            int offset = 0;\n            int dataSize = ((size.x + 3) / 4) * ((size.y + 3) / 4) * blockSize;\n\n            glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, size.x, size.y, 0, dataSize, data);\n        }\n        else\n        {\n            glTexImage2D(GL_TEXTURE_2D, 0, texFormat, (GLsizei)size.x, (GLsizei)size.y, 0, texFormat, GL_UNSIGNED_BYTE, data);\n        }\n\n        GL_CHECK_ERROR();\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformUploadRegionData(const Vec2I& offset, const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n\n        GLint texFormat = formatMap[format];\n\n        glTexSubImage2D(GL_TEXTURE_2D, 0, offset.x, offset.y, size.x, size.y, texFormat, GL_UNSIGNED_BYTE,\n                        data);\n\n        GL_CHECK_ERROR();\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::Copy(const Texture& from, const RectI& rect)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, from.mHandle);\n\n        GLint texFormat = formatMap[format];\n\n        glCopyTexImage2D(GL_TEXTURE_2D, 0, texFormat, rect.left, rect.top, rect.Width(), rect.Height(), 0);\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformGetData(Byte* data)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformSetFilter()\n    {\n        GLint type = GL_LINEAR;\n        if (mFilter == Filter::Nearest)\n            type = GL_NEAREST;\n\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        o2Render.DrawPrimitives();\n\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, type);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, type);\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif //PLATFORM_LINUX\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/CMakeLists.txt",
    "content": "set(PET_STORY_SHADERS_SOURCES\n        Shaders.metal\n)\n\nadd_metal_shader_library(PetStoryShaders\n        STANDARD macos-metal2.1\n        ${PET_STORY_SHADERS_SOURCES}\n)"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/MaterialBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_MAC\n\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    struct MTLMaterialImpl;\n\n    struct SamplerLocation\n    {\n        int  textureIndex = -1;\n        UInt texCoordParam = VertexParam::TexCoord0;\n    };\n\n    class MaterialBase\n    {\n        friend class Render;\n\n    protected:\n        MTLMaterialImpl* mImpl = nullptr;\n\n        UInt mProgram = 0;\n\n        int mTransformUniform = -1;\n        int mTextureUniform = -1;\n        int mPositionAttribute = -1;\n        int mColorAttribute = -1;\n        int mTexCoordsAttribute = -1;\n        int mNormalAttribute = -1;\n\n        mutable Vector<int> mParamUniformLocations;\n        Vector<SamplerLocation> mSamplerLocations;\n    };\n}\n\n#endif // PLATFORM_MAC\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/MaterialImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_MAC\n\n#import <Foundation/Foundation.h>\n\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/Mac/MetalWrappers.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\n#include <algorithm>\n\nnamespace o2\n{\n    namespace\n    {\n        static UInt gNextMaterialProgramId = 1;\n\n        std::string ToStdString(const String& value)\n        {\n            return std::string(value.Data(), value.Length());\n        }\n\n        String ToString(NSString* value)\n        {\n            return value ? String(value.UTF8String) : String();\n        }\n\n        void SetupBlendState(MTLRenderPipelineColorAttachmentDescriptor* attachment, BlendMode blendMode)\n        {\n            attachment.blendingEnabled = YES;\n            attachment.rgbBlendOperation = MTLBlendOperationAdd;\n            attachment.alphaBlendOperation = MTLBlendOperationAdd;\n            attachment.sourceRGBBlendFactor = MTLBlendFactorSourceAlpha;\n            attachment.sourceAlphaBlendFactor = MTLBlendFactorOne;\n            attachment.destinationAlphaBlendFactor = MTLBlendFactorOneMinusSourceAlpha;\n            attachment.destinationRGBBlendFactor = blendMode == BlendMode::Add ? MTLBlendFactorOne : MTLBlendFactorOneMinusSourceAlpha;\n        }\n\n        UInt ResolveTexCoordParam(const String& attrName)\n        {\n            if (attrName == \"a_texCoords2\")\n                return VertexParam::TexCoord1;\n\n            if (attrName == \"a_texCoords3\")\n                return VertexParam::TexCoord2;\n\n            return VertexParam::TexCoord0;\n        }\n\n        void CollectTextureBindings(NSArray<MTLArgument*>* arguments, std::unordered_map<std::string, int>& textureBindings)\n        {\n            for (MTLArgument* argument in arguments)\n            {\n                if (argument.type != MTLArgumentTypeTexture)\n                    continue;\n\n                textureBindings[std::string(argument.name.UTF8String)] = (int)argument.index;\n            }\n        }\n\n        void CollectParamBindings(NSArray<MTLArgument*>* arguments, MTLMaterialImpl* materialImpl, bool bindToVertex)\n        {\n            for (MTLArgument* argument in arguments)\n            {\n                if (argument.type != MTLArgumentTypeBuffer || argument.index != 2 || argument.bufferDataType != MTLDataTypeStruct)\n                    continue;\n\n                materialImpl->materialParamsIndex = (int)argument.index;\n                materialImpl->materialParamsSize = std::max(materialImpl->materialParamsSize, argument.bufferDataSize);\n                materialImpl->bindParamsToVertex |= bindToVertex;\n                materialImpl->bindParamsToFragment |= !bindToVertex;\n\n                for (MTLStructMember* member in argument.bufferStructType.members)\n                {\n                    materialImpl->paramBindings[std::string(member.name.UTF8String)] = { member.offset, member.dataType };\n                }\n            }\n        }\n\n        void LogPipelineError(const String& message, NSError* error)\n        {\n            String result = message;\n            if (error)\n            {\n                NSString* description = [error localizedDescription];\n                if (description)\n                    result += \"\\n\" + ToString(description);\n            }\n\n            o2Debug.LogError(result);\n        }\n    }\n\n    bool Material::PlatformBuild()\n    {\n        PlatformDestroy();\n\n        if (!mVertexShader || !mVertexShader->mImpl || !mFragmentShader || !mFragmentShader->mImpl)\n            return false;\n\n        if (!RenderDevice::device || !RenderDevice::view)\n        {\n            o2Debug.LogError(\"Metal device or view is not initialized, can't build material\");\n            return false;\n        }\n\n        if (!mImpl)\n            mImpl = mnew MTLMaterialImpl();\n\n        MTLRenderPipelineDescriptor* descriptor = [[MTLRenderPipelineDescriptor alloc] init];\n        descriptor.label = @\"o2Material\";\n        descriptor.vertexFunction = mVertexShader->mImpl->function;\n        descriptor.fragmentFunction = mFragmentShader->mImpl->function;\n        descriptor.colorAttachments[0].pixelFormat = RenderDevice::view.colorPixelFormat;\n        SetupBlendState(descriptor.colorAttachments[0], mBlendMode);\n\n        NSError* error = nil;\n        MTLAutoreleasedRenderPipelineReflection reflection = nil;\n        id<MTLRenderPipelineState> pipelineState = [RenderDevice::device newRenderPipelineStateWithDescriptor:descriptor\n                                                                                                      options:MTLPipelineOptionArgumentInfo | MTLPipelineOptionBufferTypeInfo\n                                                                                                   reflection:&reflection\n                                                                                                        error:&error];\n        if (!pipelineState)\n        {\n            LogPipelineError(\"Failed to build Metal pipeline for material\", error);\n            PlatformDestroy();\n            return false;\n        }\n\n        mImpl->pipelineState = pipelineState;\n        mImpl->materialParamsIndex = -1;\n        mImpl->materialParamsSize = 0;\n        mImpl->bindParamsToVertex = false;\n        mImpl->bindParamsToFragment = false;\n        mImpl->paramBindings.clear();\n        mImpl->materialParamsData.clear();\n\n        std::unordered_map<std::string, int> textureBindings;\n        if (reflection)\n        {\n            CollectTextureBindings(reflection.fragmentArguments, textureBindings);\n            CollectParamBindings(reflection.vertexArguments, mImpl, true);\n            CollectParamBindings(reflection.fragmentArguments, mImpl, false);\n        }\n\n        if (mImpl->materialParamsSize > 0)\n        {\n            mImpl->materialParamsData.resize(mImpl->materialParamsSize);\n            std::fill(mImpl->materialParamsData.begin(), mImpl->materialParamsData.end(), Byte{ 0 });\n        }\n\n        mProgram = gNextMaterialProgramId++;\n        mTransformUniform = 1;\n        mTextureUniform = 0;\n        mPositionAttribute = 0;\n        mColorAttribute = 1;\n        mTexCoordsAttribute = 2;\n        mNormalAttribute = 5;\n\n        auto primaryTextureBinding = textureBindings.find(\"u_texture\");\n        if (primaryTextureBinding != textureBindings.end())\n            mTextureUniform = primaryTextureBinding->second;\n\n        mSamplerLocations.Clear();\n        for (int samplerIdx = 0; samplerIdx < mSamplers.Count(); samplerIdx++)\n        {\n            const auto& sampler = mSamplers[samplerIdx];\n            SamplerLocation location;\n            location.texCoordParam = ResolveTexCoordParam(sampler.texCoordsAttrName);\n            location.textureIndex = samplerIdx + 1;\n\n            auto textureBinding = textureBindings.find(ToStdString(sampler.samplerUniformName));\n            if (textureBinding != textureBindings.end())\n                location.textureIndex = textureBinding->second;\n\n            mSamplerLocations.Add(location);\n        }\n\n        mParamUniformLocations.Resize(mParams.Count());\n        for (int i = 0; i < mParams.Count(); i++)\n        {\n            auto binding = mImpl->paramBindings.find(ToStdString(mParams[i]->GetName()));\n            mParamUniformLocations[i] = binding != mImpl->paramBindings.end() ? (int)binding->second.offset : -1;\n        }\n\n        return true;\n    }\n\n    void Material::PlatformDestroy()\n    {\n        if (mImpl)\n        {\n            mImpl->pipelineState = nil;\n            delete mImpl;\n            mImpl = nullptr;\n        }\n\n        mProgram = 0;\n        mTransformUniform = -1;\n        mTextureUniform = -1;\n        mPositionAttribute = -1;\n        mColorAttribute = -1;\n        mTexCoordsAttribute = -1;\n        mNormalAttribute = -1;\n        mParamUniformLocations.Clear();\n        mSamplerLocations.Clear();\n        mReady = false;\n    }\n\n    void Material::PlatformApplyParams() const\n    {\n        if (!mImpl || mImpl->materialParamsData.empty())\n            return;\n\n        if (mParamUniformLocations.Count() != mParams.Count())\n        {\n            mParamUniformLocations.Resize(mParams.Count());\n            for (int i = 0; i < mParams.Count(); i++)\n            {\n                auto binding = mImpl->paramBindings.find(ToStdString(mParams[i]->GetName()));\n                mParamUniformLocations[i] = binding != mImpl->paramBindings.end() ? (int)binding->second.offset : -1;\n            }\n        }\n\n        std::fill(mImpl->materialParamsData.begin(), mImpl->materialParamsData.end(), Byte{ 0 });\n\n        for (int i = 0; i < mParams.Count(); i++)\n        {\n            const auto& param = mParams[i];\n            auto bindingIt = mImpl->paramBindings.find(ToStdString(param->GetName()));\n            if (bindingIt == mImpl->paramBindings.end())\n                continue;\n\n            const auto& binding = bindingIt->second;\n            Byte* dst = mImpl->materialParamsData.data() + binding.offset;\n\n            if (auto* floatParam = dynamic_cast<ShaderParamFloat*>(param.Get()))\n            {\n                if (binding.dataType == MTLDataTypeFloat)\n                {\n                    float value = floatParam->GetValue();\n                    memcpy(dst, &value, sizeof(value));\n                }\n            }\n            else if (auto* vec2Param = dynamic_cast<ShaderParamVec2*>(param.Get()))\n            {\n                if (binding.dataType == MTLDataTypeFloat2)\n                {\n                    float value[2] = { vec2Param->GetValue().x, vec2Param->GetValue().y };\n                    memcpy(dst, value, sizeof(value));\n                }\n            }\n            else if (auto* colorParam = dynamic_cast<ShaderParamColor*>(param.Get()))\n            {\n                if (binding.dataType == MTLDataTypeFloat4)\n                {\n                    float value[4] = { colorParam->GetValue().RF(), colorParam->GetValue().GF(),\n                                       colorParam->GetValue().BF(), colorParam->GetValue().AF() };\n                    memcpy(dst, value, sizeof(value));\n                }\n            }\n            else if (auto* intParam = dynamic_cast<ShaderParamInt*>(param.Get()))\n            {\n                if (binding.dataType == MTLDataTypeInt)\n                {\n                    int value = intParam->GetValue();\n                    memcpy(dst, &value, sizeof(value));\n                }\n            }\n        }\n    }\n}\n\n#endif // PLATFORM_MAC"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/MetalWrappers.h",
    "content": "#pragma once\n\n#import <MetalKit/MetalKit.h>\n\n#include \"o2/Utils/Types/CommonTypes.h\"\n\n#include <string>\n#include <unordered_map>\n#include <vector>\n\nnamespace o2\n{\n    struct RenderDevice\n    {\n    public:\n        // Initializes renderer\n        static void Initialize(UInt vertexBufferByteSize, UInt indexBufferSize);\n        \n    public:\n        static MTKView*                    view;\n        static id<MTLDevice>               device;\n        static id<MTLCommandQueue>         commandQueue;\n        static id<MTLCommandBuffer>        commandBuffer;\n        \n        static id<MTLBuffer> vertexBuffers[2];\n        static id<MTLBuffer> indexBuffers[2];\n        \n        static id<MTLBuffer> vertexBuffer;\n        static id<MTLBuffer> indexBuffer;\n        static int           currentBufferIndex;\n    };\n    \n    struct MTLTextureImpl\n    {\n        id<MTLTexture> texture;\n    };\n\n    struct MTLShaderImpl\n    {\n        id<MTLLibrary> library = nil;\n        id<MTLFunction> function = nil;\n    };\n\n    struct MetalParamBinding\n    {\n        NSUInteger offset = 0;\n        MTLDataType dataType = MTLDataTypeNone;\n    };\n\n    struct MTLMaterialImpl\n    {\n        id<MTLRenderPipelineState> pipelineState = nil;\n\n        int materialParamsIndex = -1;\n        bool bindParamsToVertex = false;\n        bool bindParamsToFragment = false;\n\n        NSUInteger materialParamsSize = 0;\n        std::unordered_map<std::string, MetalParamBinding> paramBindings;\n        std::vector<Byte> materialParamsData;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/RenderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_MAC\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Math/Color.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Render/TextureRef.h\"\n\nnamespace o2\n{\n    class RenderBase\n    {\n    protected:\n        UInt mVertexBufferSize = 1000000; // Maximum size of vertex buffer\n        UInt mIndexBufferSize = 3000000;  // Maximum size of index buffer\n        UInt mUniformBufferSize = 20000;    // Maximum size of uniforms buffer\n        \n        UInt mVertexBufferOffset = 0;\n        UInt mIndexBufferOffset = 0;\n        UInt mUniformBufferOffset = 0;\n\n        Color4 mClearColor; // Clear color for next pass\n        bool mNeedClear = false;\n        \n        float mMVPMatrix[16]; // Render model view projection matrix\n        \n        bool  mScissorEnabled = false;\n        RectI mScissorRect;\n        \n        TextureRef mWhiteTexture; // Default white texture\n        \n        friend struct RenderDevice;\n    };\n};\n\n#endif // PLATFORM_MAC\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/RenderImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_MAC\n#include <simd/matrix.h>\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Mac/ApplicationPlatformWrapper.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/Mac/MetalWrappers.h\"\n#include \"o2/Render/Mac/ShaderTypes.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    MTKView*                    RenderDevice::view;\n    id<MTLDevice>               RenderDevice::device;\n    id<MTLCommandQueue>         RenderDevice::commandQueue;\n    id<MTLCommandBuffer>        RenderDevice::commandBuffer;\n\n    id<MTLBuffer> RenderDevice::vertexBuffers[2];\n    id<MTLBuffer> RenderDevice::indexBuffers[2];\n\n    id<MTLBuffer> RenderDevice::vertexBuffer;\n    id<MTLBuffer> RenderDevice::indexBuffer;\n    int           RenderDevice::currentBufferIndex;\n\n    namespace\n    {\n        NSUInteger AlignBufferOffset(NSUInteger value)\n        {\n            static const NSUInteger alignment = 256;\n            return ((value + alignment - 1) / alignment) * alignment;\n        }\n\n        void MtxConvert(const float* origin, matrix_float4x4& dst)\n        {\n            dst.columns[0][0] = origin[0];  dst.columns[0][1] = origin[1];  dst.columns[0][2] = origin[2];  dst.columns[0][3] = origin[3];\n            dst.columns[1][0] = origin[4];  dst.columns[1][1] = origin[5];  dst.columns[1][2] = origin[6];  dst.columns[1][3] = origin[7];\n            dst.columns[2][0] = origin[8];  dst.columns[2][1] = origin[9];  dst.columns[2][2] = origin[10]; dst.columns[2][3] = origin[11];\n            dst.columns[3][0] = origin[12]; dst.columns[3][1] = origin[13]; dst.columns[3][2] = origin[14]; dst.columns[3][3] = origin[15];\n        }\n\n        String LoadResolvedShaderSource(const String& path)\n        {\n            return FileSystem::ReadFile(Shader::ResolvePlatformSourcePath(path));\n        }\n    }\n\n    void RenderDevice::Initialize(UInt vertexBufferByteSize, UInt indexBufferSize)\n    {\n        RenderDevice::view = ApplicationPlatformWrapper::view;\n        device = ApplicationPlatformWrapper::view.device;\n        commandQueue = [device newCommandQueue];\n        currentBufferIndex = 0;\n\n        NSUInteger vertexBufferLength = (NSUInteger)vertexBufferByteSize;\n        NSUInteger indexBufferLength = (NSUInteger)indexBufferSize * sizeof(VertexIndex);\n\n        for (int i = 0; i < 2; i++)\n        {\n            vertexBuffers[i] = [device newBufferWithLength:vertexBufferLength\n                                                   options:MTLResourceStorageModeShared];\n\n            indexBuffers[i] = [device newBufferWithLength:indexBufferLength\n                                                  options:MTLResourceStorageModeShared];\n        }\n\n        vertexBuffer = vertexBuffers[0];\n        indexBuffer = indexBuffers[0];\n    }\n\n    void Render::InitializePlatform()\n    {\n        mLog->Out(\"Initializing Metal render..\");\n\n        mVertexBufferSize = USHRT_MAX;\n        mIndexBufferSize = USHRT_MAX;\n        mVertexBufferByteSize = mVertexBufferSize * sizeof(Vertex3Tex);\n        mVertexData = mnew UInt8[mVertexBufferByteSize];\n        mVertexIndexData = mnew VertexIndex[mIndexBufferSize];\n        mCurrentBatchVertexType = Vertex3Tex::Type();\n\n        RenderDevice::Initialize(mVertexBufferByteSize, mIndexBufferSize);\n    }\n\n    void Render::DeinitializePlatform()\n    {\n        delete[] mVertexData;\n        delete[] mVertexIndexData;\n        mVertexData = nullptr;\n        mVertexIndexData = nullptr;\n\n        RenderDevice::commandBuffer = nil;\n        RenderDevice::vertexBuffer = nil;\n        RenderDevice::indexBuffer = nil;\n        RenderDevice::vertexBuffers[0] = nil;\n        RenderDevice::vertexBuffers[1] = nil;\n        RenderDevice::indexBuffers[0] = nil;\n        RenderDevice::indexBuffers[1] = nil;\n        RenderDevice::commandQueue = nil;\n        RenderDevice::device = nil;\n        RenderDevice::view = nil;\n    }\n\n    void Render::InitializeSandardShader()\n    {}\n\n    void Render::PlatformInitializeDefaultMaterial()\n    {\n        String basePath = GetBuiltinAssetsPath();\n        String vertexPath = Shader::ResolvePlatformSourcePath(basePath + \"Shaders/Default.vsh\");\n        String fragmentPath = Shader::ResolvePlatformSourcePath(basePath + \"Shaders/Default.fsh\");\n\n        String vertexSource = LoadResolvedShaderSource(basePath + \"Shaders/Default.vsh\");\n        String fragmentSource = LoadResolvedShaderSource(basePath + \"Shaders/Default.fsh\");\n\n        if (vertexSource.IsEmpty() || fragmentSource.IsEmpty())\n        {\n            o2Debug.LogError(\"Failed to load default Metal shader files (\" + vertexPath + \", \" + fragmentPath + \")\");\n            return;\n        }\n\n        Ref<Shader> vertexShader = mmake<Shader>();\n        Ref<Shader> fragmentShader = mmake<Shader>();\n        vertexShader->SetFileName(vertexPath);\n        fragmentShader->SetFileName(fragmentPath);\n        vertexShader->Compile(vertexSource, Shader::Type::Vertex);\n        fragmentShader->Compile(fragmentSource, Shader::Type::Fragment);\n\n        if (!vertexShader->IsReady() || !fragmentShader->IsReady())\n        {\n            o2Debug.LogError(\"Failed to compile default Metal shaders\");\n            return;\n        }\n\n        mDefaultMaterial = mmake<Material>();\n        mDefaultMaterial->SetVertexShader(vertexShader);\n        mDefaultMaterial->SetFragmentShader(fragmentShader);\n        mDefaultMaterial->SetBlendMode(BlendMode::Normal);\n        if (!mDefaultMaterial->Build())\n        {\n            o2Debug.LogError(\"Failed to build default Metal material\");\n            mDefaultMaterial = nullptr;\n        }\n    }\n\n    void Render::PlatformBegin()\n    {\n        RenderDevice::currentBufferIndex = (RenderDevice::currentBufferIndex + 1) % 2;\n        RenderDevice::vertexBuffer = RenderDevice::vertexBuffers[RenderDevice::currentBufferIndex];\n        RenderDevice::indexBuffer = RenderDevice::indexBuffers[RenderDevice::currentBufferIndex];\n        \n        RenderDevice::commandBuffer = [RenderDevice::commandQueue commandBuffer];\n        RenderDevice::commandBuffer.label = @\"Default\";\n        \n        mVertexBufferOffset = 0;\n        mIndexBufferOffset = 0;\n        mVertexBufferIdx = 0;\n        mIndexBufferIdx = 0;\n    }\n    \n    void Render::PlatformDrawPrimitives()\n    {\n        if (!mCurrentMaterial || !mCurrentMaterial->mImpl || !mCurrentMaterial->mImpl->pipelineState)\n            return;\n\n        MTLRenderPassDescriptor *renderPassDescriptor = RenderDevice::view.currentRenderPassDescriptor;\n        if (renderPassDescriptor != nil)\n        {\n            if (mNeedClear)\n            {\n                [renderPassDescriptor.colorAttachments[0] setClearColor:\n                 MTLClearColorMake(mClearColor.RF(), mClearColor.GF(), mClearColor.BF(), mClearColor.AF())];\n                [renderPassDescriptor.colorAttachments[0] setLoadAction:MTLLoadActionClear];\n                \n                mNeedClear = false;\n            }\n            else\n                [renderPassDescriptor.colorAttachments[0] setLoadAction:MTLLoadActionLoad];\n\n            [renderPassDescriptor.colorAttachments[0] setStoreAction:MTLStoreActionStore];\n            \n            if (mCurrentRenderTarget)\n                renderPassDescriptor.colorAttachments[0].texture = mCurrentRenderTarget->mImpl->texture;\n\n            NSUInteger vertexDataSize = (NSUInteger)mLastDrawVertex * sizeof(Vertex3Tex);\n            NSUInteger indexDataSize = (NSUInteger)mLastDrawIdx * sizeof(VertexIndex);\n            memcpy((Byte*)[RenderDevice::vertexBuffer contents] + mVertexBufferOffset, mVertexData, vertexDataSize);\n            memcpy((Byte*)[RenderDevice::indexBuffer contents] + mIndexBufferOffset, mVertexIndexData, indexDataSize);\n\n            auto renderEncoder = [RenderDevice::commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor];\n            renderEncoder.label = @\"Default\";\n            \n            float scale = mCurrentRenderTarget ? 1.0f : o2Application.GetGraphicsScale();\n            [renderEncoder setViewport:(MTLViewport){0.0, 0.0, (double)(mCurrentResolution.x * scale), (double)(mCurrentResolution.y * scale), 0.0, 1.0 }];\n            \n            if (mScissorEnabled && mCurrentRenderTarget == nullptr)\n            {\n                Vec2I resolution = mCurrentResolution*scale;\n                RectF scissorRectF = RectF(mScissorRect.left*scale, mScissorRect.top*scale, mScissorRect.right*scale, mScissorRect.bottom*scale)\n                    .Move(resolution/2);\n                \n                RectI scissorRect = scissorRectF;                \n                scissorRect.left = Math::Clamp(scissorRect.left, 0, resolution.x);\n                scissorRect.right = Math::Clamp(scissorRect.right, 0, resolution.x);\n                scissorRect.bottom = Math::Clamp(scissorRect.bottom, 0, resolution.y);\n                scissorRect.top = Math::Clamp(scissorRect.top, 0, resolution.y);\n                \n                [renderEncoder setScissorRect:(MTLScissorRect){\n                    (ULong)scissorRect.left,\n                    (ULong)(resolution.y - scissorRect.bottom - scissorRect.Height()),\n                    (ULong)scissorRect.Width(),\n                    (ULong)scissorRect.Height()\n                }];\n            }\n            \n            [renderEncoder setRenderPipelineState:mCurrentMaterial->mImpl->pipelineState];\n            \n            [renderEncoder setVertexBuffer:RenderDevice::vertexBuffer offset:mVertexBufferOffset atIndex:0];\n            \n            TextureRef primaryTexture = mCurrentDrawTexture ? mCurrentDrawTexture : mWhiteTexture;\n            if (primaryTexture && mCurrentMaterial->GetTextureUniform() >= 0)\n            {\n                [renderEncoder setFragmentTexture:primaryTexture->mImpl->texture atIndex:(NSUInteger)mCurrentMaterial->GetTextureUniform()];\n            }\n\n            for (int i = 0; i < mCurrentMaterial->mSamplerLocations.Count() && i < mCurrentMaterial->mSamplers.Count(); i++)\n            {\n                const auto& samplerLocation = mCurrentMaterial->mSamplerLocations[i];\n                if (samplerLocation.textureIndex < 0)\n                    continue;\n\n                TextureRef samplerTexture = mCurrentMaterial->mSamplers[i].GetTexture();\n                if (!samplerTexture)\n                    continue;\n\n                [renderEncoder setFragmentTexture:samplerTexture->mImpl->texture atIndex:(NSUInteger)samplerLocation.textureIndex];\n            }\n            \n            mCurrentMaterial->ApplyParams();\n\n            Uniforms uniforms;\n            MtxConvert(mMVPMatrix, uniforms.mvpMatrix);\n            [renderEncoder setVertexBytes:&uniforms length:sizeof(Uniforms) atIndex:1];\n\n            if (mCurrentMaterial->mImpl->materialParamsIndex >= 0 && !mCurrentMaterial->mImpl->materialParamsData.empty())\n            {\n                const void* paramsData = mCurrentMaterial->mImpl->materialParamsData.data();\n                NSUInteger paramsSize = mCurrentMaterial->mImpl->materialParamsSize;\n                NSUInteger paramsIndex = (NSUInteger)mCurrentMaterial->mImpl->materialParamsIndex;\n\n                if (mCurrentMaterial->mImpl->bindParamsToVertex)\n                    [renderEncoder setVertexBytes:paramsData length:paramsSize atIndex:paramsIndex];\n\n                if (mCurrentMaterial->mImpl->bindParamsToFragment)\n                    [renderEncoder setFragmentBytes:paramsData length:paramsSize atIndex:paramsIndex];\n            }\n            \n            static const MTLPrimitiveType primitiveType[3]{ MTLPrimitiveTypeTriangle, MTLPrimitiveTypeTriangle, MTLPrimitiveTypeLine };\n            \n            [renderEncoder drawIndexedPrimitives:primitiveType[(int)mCurrentPrimitiveType] indexCount:mLastDrawIdx\n                indexType:MTLIndexTypeUInt32 indexBuffer:RenderDevice::indexBuffer indexBufferOffset:mIndexBufferOffset];\n            \n            [renderEncoder endEncoding];\n        }\n\n        mVertexBufferOffset = AlignBufferOffset(mVertexBufferOffset + (NSUInteger)mLastDrawVertex * sizeof(Vertex3Tex));\n        mIndexBufferOffset = AlignBufferOffset(mIndexBufferOffset + (NSUInteger)mLastDrawIdx * sizeof(VertexIndex));\n    }\n\n    void Render::PlatformEnd()\n    {\n        if (!RenderDevice::commandBuffer)\n            return;\n\n        if (!mCurrentRenderTarget && RenderDevice::view.currentDrawable)\n            [RenderDevice::commandBuffer presentDrawable:RenderDevice::view.currentDrawable];\n\n        [RenderDevice::commandBuffer commit];\n    }\n\n    void Render::PlatformResetState()\n    {\n        mCurrentBatchVertexType = Vertex3Tex::Type();\n        mVertexBufferIdx = 0;\n        mIndexBufferIdx = 0;\n    }\n\n    VertexType Render::PlatformResolveBatchVertexType(const VertexType& sourceVertexType, const Ref<Material>& material) const\n    {\n        return Vertex3Tex::Type();\n    }\n\n    void Render::Clear(const Color4& color /*= Color4::Blur()*/)\n    {\n        mClearColor = color;\n        mNeedClear = true;\n    }\n\n    void Render::PlatformFlipVerticesUV()\n    {\n        Vertex3Tex* dstVertexBuffer = reinterpret_cast<Vertex3Tex*>(mVertexData);\n        for (UInt i = 0; i < mLastDrawVertex; i++)\n            dstVertexBuffer[i].tv = 1.0f - dstVertexBuffer[i].tv;\n    }\n\n    void Render::PlatformSetupCameraTransforms(float* modelMatrix, float* viewMatrix, float* projMatrix)\n    {\n        if (mCurrentRenderTarget)\n            modelMatrix[5] = -modelMatrix[5]; // Flip by Y for render targets\n        \n        float finalCamMtx[16];\n        Math::mtxMultiply(finalCamMtx, modelMatrix, viewMatrix);\n        Math::mtxMultiply(mMVPMatrix, projMatrix, finalCamMtx);\n\n        // Shared projection matrices are OpenGL-style and produce clip-space z in [-w, w].\n        // Metal expects clip-space z in [0, w], so convert it once at the platform level.\n        static const float metalClipSpaceFix[16] =\n        {\n            1.0f, 0.0f, 0.0f, 0.0f,\n            0.0f, 1.0f, 0.0f, 0.0f,\n            0.0f, 0.0f, 0.5f, 0.0f,\n            0.0f, 0.0f, 0.5f, 1.0f\n        };\n\n        float metalMvp[16];\n        Math::mtxMultiply(metalMvp, metalClipSpaceFix, mMVPMatrix);\n        memcpy(mMVPMatrix, metalMvp, sizeof(mMVPMatrix));\n    }\n\n    void Render::PlatformEnableScissorTest()\n    {\n        mScissorEnabled = true;\n    }\n\n    void Render::PlatformDisableScissorTest()\n    {\n        mScissorEnabled = false;\n    }\n\n    void Render::PlatformSetScissorRect(const RectI& rect)\n    {\n        mScissorRect = rect;\n    }\n\n    void Render::PlatformBindRenderTarget(const TextureRef& renderTarget)\n    {}\n\n    Vec2I Render::GetPlatformMaxTextureSize()\n    {\n        return Vec2I(4096, 4096);\n    }\n\n    Vec2I Render::GetPlatformDPI()\n    {\n        NSScreen *screen = [NSScreen mainScreen];\n        NSDictionary *description = [screen deviceDescription];\n        NSSize displayPixelSize = [[description objectForKey:NSDeviceSize] sizeValue];\n        CGSize displayPhysicalSize = CGDisplayScreenSize([[description objectForKey:@\"NSScreenNumber\"] unsignedIntValue]);\n        \n        float mmPerInch = 25.4f;\n        float scale = o2Application.GetGraphicsScale();\n        return Vec2I((displayPixelSize.width / displayPhysicalSize.width) * mmPerInch / scale,\n                     (displayPixelSize.height / displayPhysicalSize.height) * mmPerInch / scale);\n    }\n\n    void Render::PlatformBindMaterial(const Ref<Material>& material)\n    {}\n}\n\n#endif // PLATFORM_MAC\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/ShaderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_MAC\n\nnamespace o2\n{\n    struct MTLShaderImpl;\n\n    class ShaderBase\n    {\n        friend class Render;\n        friend class Material;\n\n    protected:\n        MTLShaderImpl* mImpl = nullptr;\n    };\n}\n\n#endif // PLATFORM_MAC\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/ShaderImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_MAC\n\n#import <Foundation/Foundation.h>\n\n#include \"o2/Render/Mac/MetalWrappers.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    namespace\n    {\n        String BuildMetalShaderSource(const String& source)\n        {\n            static const char* preamble = R\"metal(#include <metal_stdlib>\nusing namespace metal;\n\nstruct O2VertexIn\n{\n    float x;\n    float y;\n    float z;\n    uint color;\n    packed_float2 texCoord0;\n    packed_float2 texCoord1;\n    packed_float2 texCoord2;\n    packed_float3 normal;\n};\n\nstruct O2Uniforms\n{\n    float4x4 mvpMatrix;\n};\n\nstruct O2RasterizerData\n{\n    float4 position [[position]];\n    float4 color;\n    float2 texCoords;\n    float2 texCoords2;\n    float2 texCoords3;\n    float3 normal;\n};\n\ninline float4 o2_unpackColor(uint color)\n{\n    return float4(float(color & 0xFFu) / 255.0,\n                  float((color >> 8) & 0xFFu) / 255.0,\n                  float((color >> 16) & 0xFFu) / 255.0,\n                  float((color >> 24) & 0xFFu) / 255.0);\n}\n\n#line 1\n)metal\";\n\n            return String(preamble) + source;\n        }\n\n        NSString* ToNSString(const String& value)\n        {\n            const char* data = value.Data();\n            return [NSString stringWithUTF8String:data ? data : \"\"];\n        }\n\n        NSString* GetEntryPointName(Shader::Type type)\n        {\n            return type == Shader::Type::Vertex ? @\"vertexShader\" : @\"fragmentShader\";\n        }\n\n        String GetCompileErrorText(NSError* error)\n        {\n            if (!error)\n                return \"Unknown Metal compiler error\";\n\n            NSString* description = [error localizedDescription];\n            NSString* failureReason = [error localizedFailureReason];\n            NSString* recovery = [error localizedRecoverySuggestion];\n\n            String result = description ? description.UTF8String : \"Unknown Metal compiler error\";\n            if (failureReason && failureReason.length > 0)\n                result += \"\\n\" + String(failureReason.UTF8String);\n\n            if (recovery && recovery.length > 0)\n                result += \"\\n\" + String(recovery.UTF8String);\n\n            return result;\n        }\n    }\n\n    bool Shader::PlatformCompile(const String& source, Type type)\n    {\n        PlatformDestroy();\n\n        if (!RenderDevice::device)\n        {\n            o2Debug.LogError(\"Metal device is not initialized, can't compile shader \" + mFileName);\n            return false;\n        }\n\n        if (!mImpl)\n            mImpl = mnew MTLShaderImpl();\n\n        NSError* error = nil;\n        NSString* sourceString = ToNSString(BuildMetalShaderSource(source));\n        MTLCompileOptions* options = [[MTLCompileOptions alloc] init];\n        options.fastMathEnabled = YES;\n\n        id<MTLLibrary> library = [RenderDevice::device newLibraryWithSource:sourceString options:options error:&error];\n        if (!library)\n        {\n            String shaderName = mFileName.IsEmpty() ? String(\"<runtime>\" ) : mFileName;\n            o2Debug.LogError(\"Error compiling Metal shader \" + shaderName + \":\\n\" + GetCompileErrorText(error));\n            PlatformDestroy();\n            return false;\n        }\n\n        id<MTLFunction> function = [library newFunctionWithName:GetEntryPointName(type)];\n        if (!function)\n        {\n            String shaderName = mFileName.IsEmpty() ? String(\"<runtime>\") : mFileName;\n            o2Debug.LogError(\"Metal shader entry point wasn't found in \" + shaderName + \". Expected function name: \" +\n                             String(type == Type::Vertex ? \"vertexShader\" : \"fragmentShader\"));\n            PlatformDestroy();\n            return false;\n        }\n\n        mImpl->library = library;\n        mImpl->function = function;\n        return true;\n    }\n\n    void Shader::PlatformDestroy()\n    {\n        if (mImpl)\n        {\n            mImpl->function = nil;\n            mImpl->library = nil;\n            delete mImpl;\n            mImpl = nullptr;\n        }\n\n        mReady = false;\n    }\n}\n\n#endif // PLATFORM_MAC"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/ShaderTypes.h",
    "content": "#pragma once\n#include <simd/simd.h>\n\nstruct Uniforms\n{\n    matrix_float4x4 mvpMatrix;\n};\n\nstruct MetalVertex2\n{\n    float x, y, z;\n    vector_float4 color;\n    float tu, tv;\n};\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/Shaders.metal",
    "content": "#include <metal_stdlib>\n\nusing namespace metal;\n\n#include \"ShaderTypes.h\"\n\nstruct RasterizerData\n{\n\tfloat4 position [[position]];\n\tfloat4 color;\n\tfloat2 textureCoordinate;\n};\n\nvertex RasterizerData vertexShader(uint vertexID [[vertex_id]], constant MetalVertex2 *vertices [[buffer(0)]], constant Uniforms &uniforms [[buffer(1)]])\n{\n\tRasterizerData out;\n\t\n\tMetalVertex2 v = vertices[vertexID];\n\t\n\tout.position = uniforms.mvpMatrix*float4(v.x, v.y, v.z, 1);\n    out.position.z = 0.5;\n\tout.color = v.color;\n\tout.textureCoordinate = vector_float2(v.tu, v.tv);\n\t\n\treturn out;\n}\n\nfragment float4 fragmentShader(RasterizerData in [[stage_in]],\n\t\t\t\t\t\t\t   texture2d<half> colorTexture [[ texture(0) ]])\n{\n\tconstexpr sampler textureSampler (mag_filter::linear,\n\t\t\t\t\t\t\t\t\t  min_filter::linear);\n\t\n\tconst half4 colorSample = colorTexture.sample(textureSampler, in.textureCoordinate);\n    return float4(colorSample)*in.color;\n}\n\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/TextureBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_MAC\n\nnamespace o2\n{\n    struct MTLTextureImpl;\n    \n    class TextureBase\n    {\n        friend class Render;\n        friend class VectorFont;\n\n    protected:\n        TextureBase();\n        \n    protected:\n        MTLTextureImpl* mImpl;\n    };\n}\n\n#endif // PLATFORM_MAC\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mac/TextureImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_MAC\n#import <Cocoa/Cocoa.h>\n#import <MetalKit/MetalKit.h>\n\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Render/Mac/MetalWrappers.h\"\n\nnamespace o2\n{\n    TextureBase::TextureBase():\n        mImpl(mnew MTLTextureImpl())\n    {}\n    \n    // TODO: TextureBase destructor to destroy mImpl\n    \n    bool Texture::PlatformCreate()\n    {\n        if (!mImpl)\n            mImpl = mnew MTLTextureImpl();\n\n        MTLTextureDescriptor *textureDescriptor = [[MTLTextureDescriptor alloc] init];\n        textureDescriptor.pixelFormat = mUsage == Usage::RenderTarget ? RenderDevice::view.colorPixelFormat : MTLPixelFormatRGBA8Unorm;\n        textureDescriptor.width = mSize.x;\n        textureDescriptor.height = mSize.y;\n        \n        if (mUsage == Usage::RenderTarget)\n            textureDescriptor.usage = MTLTextureUsageRenderTarget|MTLTextureUsageShaderRead;\n        \n        mImpl->texture = [RenderDevice::device newTextureWithDescriptor:textureDescriptor];\n\n        return mImpl->texture != nil;\n    }\n\n    void Texture::PlatformDestroy()\n    {\n        if (mImpl)\n            mImpl->texture = nil;\n    }\n\n    void Texture::PlatformUploadData(const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        NSUInteger bytesPerRow = 4 * mSize.x;\n        MTLRegion region = { { 0, 0, 0 }, { (UInt)size.x, (UInt)size.y, 1 } };\n        [mImpl->texture replaceRegion:region\n                          mipmapLevel:0\n                            withBytes:data\n                          bytesPerRow:bytesPerRow];\n    }\n\n    void Texture::PlatformUploadRegionData(const Vec2I& offset, const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        NSUInteger bytesPerRow = 4 * size.x;\n        MTLRegion region = { { (UInt)offset.x, (UInt)offset.y, 0 }, { (UInt)size.x, (UInt)size.y, 1 } };\n        [mImpl->texture replaceRegion:region\n                          mipmapLevel:0\n                            withBytes:data\n                          bytesPerRow:bytesPerRow];\n    }\n\n    void Texture::Copy(const Texture& from, const RectI& rect)\n    {}\n\n    void Texture::PlatformGetData(Byte* data)\n    {}\n\n    void Texture::PlatformSetFilter()\n    {\n        // TODO\n    }\n}\n\n#endif //PLATFORM_MAC\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Material.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Material.h\"\n\n#include \"o2/Utils/Debug/Debug.h\"\n\n#include <functional>\n\nnamespace o2\n{\n\tconst String& IShaderParam::GetName() const\n\t{\n\t\treturn mName;\n\t}\n\n\tvoid IShaderParam::SetName(const String& name)\n\t{\n\t\tmName = name;\n\t}\n\n\tsize_t IShaderParam::ComputeHash() const\n\t{\n\t\treturn std::hash<std::string>()(std::string(mName.Data(), mName.Length()));\n\t}\n\n\tShaderParamFloat::ShaderParamFloat()\n\t{}\n\n\tShaderParamFloat::ShaderParamFloat(const String& name, float value)\n\t{\n\t\tmName = name;\n\t\tmValue = value;\n\t}\n\n\tfloat ShaderParamFloat::GetValue() const \n\t{ \n\t\treturn mValue; \n\t}\n\n\tvoid ShaderParamFloat::SetValue(float value)\n\t{ \n\t\tmValue = value; \n\t}\n\n\tsize_t ShaderParamFloat::ComputeHash() const\n\t{\n\t\tsize_t h = IShaderParam::ComputeHash();\n\t\th ^= std::hash<float>()(mValue) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\t\treturn h;\n\t}\n\n\tShaderParamVec2::ShaderParamVec2()\n\t{}\n\n\tShaderParamVec2::ShaderParamVec2(const String& name, const Vec2F& value)\n\t{\n\t\tmName = name;\n\t\tmValue = value;\n\t}\n\n\tconst Vec2F& ShaderParamVec2::GetValue() const { return mValue; }\n\tvoid ShaderParamVec2::SetValue(const Vec2F& value) { mValue = value; }\n\n\tsize_t ShaderParamVec2::ComputeHash() const\n\t{\n\t\tsize_t h = IShaderParam::ComputeHash();\n\t\th ^= std::hash<float>()(mValue.x) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\t\th ^= std::hash<float>()(mValue.y) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\t\treturn h;\n\t}\n\n\tShaderParamColor::ShaderParamColor()\n\t{}\n\n\tShaderParamColor::ShaderParamColor(const String& name, const Color4& value)\n\t{\n\t\tmName = name;\n\t\tmValue = value;\n\t}\n\n\tconst Color4& ShaderParamColor::GetValue() const \n\t{ \n\t\treturn mValue;\n\t}\n\n\tvoid ShaderParamColor::SetValue(const Color4& value) \n\t{ \n\t\tmValue = value; \n\t}\n\n\tsize_t ShaderParamColor::ComputeHash() const\n\t{\n\t\tsize_t h = IShaderParam::ComputeHash();\n\t\th ^= std::hash<ULong>()(mValue.ABGR()) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\t\treturn h;\n\t}\n\n\tShaderParamInt::ShaderParamInt() \n\t{}\n\n\tShaderParamInt::ShaderParamInt(const String& name, int value)\n\t{\n\t\tmName = name;\n\t\tmValue = value;\n\t}\n\n\tint ShaderParamInt::GetValue() const \n\t{ \n\t\treturn mValue; \n\t}\n\n\tvoid ShaderParamInt::SetValue(int value) \n\t{ \n\t\tmValue = value;\n\t}\n\n\tsize_t ShaderParamInt::ComputeHash() const\n\t{\n\t\tsize_t h = IShaderParam::ComputeHash();\n\t\th ^= std::hash<int>()(mValue) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\t\treturn h;\n\t}\n\n\tTextureRef TextureSampler::GetTexture() const\n\t{\n\t\tif (image)\n\t\t\treturn image->GetTextureSource().texture;\n\n\t\treturn TextureRef();\n\t}\n\n\tRectI TextureSampler::GetSrcRect() const\n\t{\n\t\tif (image)\n\t\t\treturn image->GetTextureSource().sourceRect;\n\n\t\treturn RectI();\n\t}\n\n\n\tbool TextureSampler::operator==(const TextureSampler& other) const\n\t{\n\t\treturn samplerUniformName == other.samplerUniformName &&\n\t\t\ttexCoordsAttrName == other.texCoordsAttrName &&\n\t\t\timage == other.image;\n\t}\n\n\tMaterial::Material()\n\t{}\n\n\tMaterial::Material(const Material& other):\n\t\tmVertexShader(other.mVertexShader), mFragmentShader(other.mFragmentShader), mTexture(other.mTexture),\n\t\tmBlendMode(other.mBlendMode), mSamplers(other.mSamplers), mHashDirty(true)\n\t{\n\t\tfor (auto& param : other.mParams)\n\t\t\tmParams.Add(param->CloneAsRef<IShaderParam>());\n\n\t\tif (other.mReady)\n\t\t\tBuild();\n\t}\n\n\tMaterial::~Material()\n\t{\n\t\tPlatformDestroy();\n\t}\n\n\tvoid Material::SetVertexShader(const Ref<Shader>& shader)\n\t{\n\t\tif (mVertexShader == shader)\n\t\t\treturn;\n\n\t\tPlatformDestroy();\n\t\tmReady = false;\n\t\tmVertexShader = shader;\n\t\tmHashDirty = true;\n\t}\n\n\tconst Ref<Shader>& Material::GetVertexShader() const\n\t{\n\t\treturn mVertexShader;\n\t}\n\n\tvoid Material::SetFragmentShader(const Ref<Shader>& shader)\n\t{\n\t\tif (mFragmentShader == shader)\n\t\t\treturn;\n\n\t\tPlatformDestroy();\n\t\tmReady = false;\n\t\tmFragmentShader = shader;\n\t\tmHashDirty = true;\n\t}\n\n\tconst Ref<Shader>& Material::GetFragmentShader() const\n\t{\n\t\treturn mFragmentShader;\n\t}\n\n\tvoid Material::SetTexture(const TextureRef& texture)\n\t{\n\t\tmTexture = texture;\n\t\tmHashDirty = true;\n\t}\n\n\tconst TextureRef& Material::GetTexture() const\n\t{\n\t\treturn mTexture;\n\t}\n\n\tvoid Material::SetBlendMode(BlendMode blendMode)\n\t{\n\t\tif (mBlendMode == blendMode)\n\t\t\treturn;\n\n\t\tPlatformDestroy();\n\t\tmReady = false;\n\t\tmBlendMode = blendMode;\n\t\tmHashDirty = true;\n\t}\n\n\tBlendMode Material::GetBlendMode() const\n\t{\n\t\treturn mBlendMode;\n\t}\n\n\tRef<IShaderParam> Material::GetShaderParam(const String& name) const\n\t{\n\t\tfor (auto& param : mParams)\n\t\t{\n\t\t\tif (param->GetName() == name)\n\t\t\t\treturn param;\n\t\t}\n\n\t\treturn nullptr;\n\t}\n\n\tMap<String, Ref<IShaderParam>> Material::GetAllShaderParamsMap() const\n\t{\n\t\tMap<String, Ref<IShaderParam>> result;\n\n\t\tfor (auto& param : mParams)\n\t\t\tresult[param->GetName()] = param;\n\n\t\treturn result;\n\t}\n\n\tvoid Material::AddParam(const Ref<IShaderParam>& param)\n\t{\n\t\tfor (int i = 0; i < mParams.Count(); i++)\n\t\t{\n\t\t\tif (mParams[i]->GetName() == param->GetName())\n\t\t\t{\n\t\t\t\tmParams[i] = param;\n\t\t\t\tmHashDirty = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tmParams.Add(param);\n\n\t\tmHashDirty = true;\n\t}\n\n\tvoid Material::RemoveParam(const String& name)\n\t{\n\t\tmParams.RemoveFirst([&](const Ref<IShaderParam>& p) { return p->GetName() == name; });\n\t\tmHashDirty = true;\n\t}\n\n\tconst Vector<Ref<IShaderParam>>& Material::GetParams() const\n\t{\n\t\treturn mParams;\n\t}\n\n\tvoid Material::SetParams(const Vector<Ref<IShaderParam>>& params)\n\t{\n\t\tmParams = params;\n\t\tmHashDirty = true;\n\t}\n\n\tvoid Material::AddTextureSampler(const TextureSampler& sampler)\n\t{\n\t\tfor (int i = 0; i < mSamplers.Count(); i++)\n\t\t{\n\t\t\tif (mSamplers[i].samplerUniformName == sampler.samplerUniformName)\n\t\t\t{\n\t\t\t\tPlatformDestroy();\n\t\t\t\tmReady = false;\n\t\t\t\tmSamplers[i] = sampler;\n\t\t\t\tmHashDirty = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tPlatformDestroy();\n\t\tmReady = false;\n\t\tmSamplers.Add(sampler);\n\n\t\tmHashDirty = true;\n\t}\n\n\tvoid Material::RemoveTextureSampler(const String& samplerUniformName)\n\t{\n\t\tint samplerIdx = mSamplers.IndexOf([&](const TextureSampler& s) { return s.samplerUniformName == samplerUniformName; });\n\t\tif (samplerIdx < 0)\n\t\t\treturn;\n\n\t\tmSamplers.RemoveAt(samplerIdx);\n\t\tPlatformDestroy();\n\t\tmReady = false;\n\t\tmHashDirty = true;\n\t}\n\n\tconst Vector<TextureSampler>& Material::GetTextureSamplers() const\n\t{\n\t\treturn mSamplers;\n\t}\n\n\tint Material::GetTotalTextureChannelsCount() const\n\t{\n\t\treturn 1 + mSamplers.Count();\n\t}\n\n\tbool Material::Build()\n\t{\n\t\tPlatformDestroy();\n\n\t\tif (!mVertexShader || !mVertexShader->IsReady() || !mFragmentShader || !mFragmentShader->IsReady())\n\t\t\treturn false;\n\n\t\tmReady = PlatformBuild();\n\t\tmHashDirty = true;\n\n\t\treturn mReady;\n\t}\n\n\tbool Material::IsReady() const\n\t{\n\t\treturn mReady;\n\t}\n\n\tsize_t Material::GetHash()\n\t{\n\t\tif (mHashDirty)\n\t\t{\n\t\t\tmHash = ComputeHash();\n\t\t\tmHashDirty = false;\n\t\t}\n\n\t\treturn mHash;\n\t}\n\n\tvoid Material::InvalidateHash()\n\t{\n\t\tmHashDirty = true;\n\t}\n\n\tint Material::GetTransformUniform() const\n\t{\n\t\treturn mTransformUniform;\n\t}\n\n\tint Material::GetTextureUniform() const\n\t{\n\t\treturn mTextureUniform;\n\t}\n\n\tint Material::GetPositionAttribute() const\n\t{\n\t\treturn mPositionAttribute;\n\t}\n\n\tint Material::GetColorAttribute() const\n\t{\n\t\treturn mColorAttribute;\n\t}\n\n\tint Material::GetTexCoordsAttribute() const\n\t{\n\t\treturn mTexCoordsAttribute;\n\t}\n\n\tint Material::GetNormalAttribute() const\n\t{\n\t\treturn mNormalAttribute;\n\t}\n\n\tvoid Material::ApplyParams() const\n\t{\n\t\tPlatformApplyParams();\n\t}\n\n\tsize_t Material::ComputeHash() const\n\t{\n\t\tsize_t h = 0;\n\t\th ^= std::hash<UInt>()(mProgram) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\n\t\tif (mVertexShader)\n\t\t\th ^= std::hash<size_t>()((size_t)mVertexShader.Get()) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\n\t\tif (mFragmentShader)\n\t\t\th ^= std::hash<size_t>()((size_t)mFragmentShader.Get()) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\n\t\tif (mTexture)\n\t\t\th ^= std::hash<size_t>()((size_t)mTexture.Get()) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\n\t\th ^= std::hash<int>()(static_cast<int>(mBlendMode)) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\n\t\tfor (const auto& sampler : mSamplers)\n\t\t{\n\t\t\th ^= std::hash<std::string>()(std::string(sampler.samplerUniformName.Data(), sampler.samplerUniformName.Length())) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\t\t\th ^= std::hash<std::string>()(std::string(sampler.texCoordsAttrName.Data(), sampler.texCoordsAttrName.Length())) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\n\t\t\tTextureRef samplerTexture = sampler.GetTexture();\n\t\t\tif (samplerTexture)\n\t\t\t\th ^= std::hash<size_t>()((size_t)samplerTexture.Get()) + 0x9e3779b9 + (h << 6) + (h >> 2);\n\t\t}\n\n\t\tfor (const auto& param : mParams)\n\t\t\th ^= param->ComputeHash() + 0x9e3779b9 + (h << 6) + (h >> 2);\n\n\t\treturn h;\n\t}\n\n\tvoid Material::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n\t{\n\t\tOnDeserialized(node);\n\t}\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::IShaderParam, o2__IShaderParam);\n\nDECLARE_CLASS(o2::ShaderParamFloat, o2__ShaderParamFloat);\n\nDECLARE_CLASS(o2::ShaderParamVec2, o2__ShaderParamVec2);\n\nDECLARE_CLASS(o2::ShaderParamColor, o2__ShaderParamColor);\n\nDECLARE_CLASS(o2::ShaderParamInt, o2__ShaderParamInt);\n\nDECLARE_CLASS(o2::TextureSampler, o2__TextureSampler);\n\nDECLARE_CLASS(o2::Material, o2__Material);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Material.h",
    "content": "#pragma once\n\n#if defined PLATFORM_WINDOWS\n#include \"o2/Render/Windows/MaterialBase.h\"\n#elif defined PLATFORM_ANDROID\n#include \"o2/Render/Android/MaterialBase.h\"\n#elif defined PLATFORM_MAC\n#include \"o2/Render/Mac/MaterialBase.h\"\n#elif defined PLATFORM_IOS\n#include \"o2/Render/iOS/MaterialBase.h\"\n#elif defined PLATFORM_WASM\n#include \"o2/Render/WebAssembly/MaterialBase.h\"\n#elif defined(PLATFORM_LINUX)\n#include \"o2/Render/Linux/MaterialBase.h\"\n#endif\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Render/TextureSource.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Math/Color.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\n#include <functional>\n\nnamespace o2\n{\n    class Render;\n    class Material;\n\n    // -----------------------------------------------------------------------\n    // Shader parameter interface. Stores a named value to be passed\n    // as a uniform to the GPU shader program. Supports serialization\n    // so material parameters can be saved/loaded through the asset system.\n    // -----------------------------------------------------------------------\n    class IShaderParam : public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        PROPERTIES(IShaderParam);\n        PROPERTY(String, name, SetName, GetName); // Uniform name property\n\n    public:\n        // Virtual destructor\n        virtual ~IShaderParam() {}\n\n        // Returns the uniform name this parameter is bound to\n        const String& GetName() const;\n\n        // Sets the uniform name this parameter is bound to\n        void SetName(const String& name);\n\n        // Computes a hash of the parameter name and value for batch comparison\n        virtual size_t ComputeHash() const;\n\n        SERIALIZABLE(IShaderParam);\n        CLONEABLE_REF(IShaderParam);\n\n    protected:\n        String mName; // Uniform name in the shader program @SERIALIZABLE\n    };\n\n    // -------------------------------------------------------\n    // Float shader parameter. Maps to a GLSL float uniform.\n    // -------------------------------------------------------\n    class ShaderParamFloat : public IShaderParam\n    {\n    public:\n        PROPERTIES(ShaderParamFloat);\n        PROPERTY(float, value, SetValue, GetValue);  // Float value property\n\n    public:\n        // Default constructor\n        ShaderParamFloat();\n\n        // Constructor with uniform name and initial value\n        ShaderParamFloat(const String& name, float value);\n\n        // Returns the float value\n        float GetValue() const;\n\n        // Sets the float value\n        void SetValue(float value);\n\n        // Computes hash from name and float value\n        size_t ComputeHash() const override;\n\n        SERIALIZABLE(ShaderParamFloat);\n        CLONEABLE_REF(ShaderParamFloat);\n\n    protected:\n        float mValue = 0.0f; // Float uniform value @SERIALIZABLE\n    };\n\n    // -------------------------------------------------------\n    // Vec2 shader parameter. Maps to a GLSL vec2 uniform.\n    // -------------------------------------------------------\n    class ShaderParamVec2 : public IShaderParam\n    {\n    public:\n        PROPERTIES(ShaderParamVec2);\n        PROPERTY(Vec2F, value, SetValue, GetValue);    // Vec2 value property\n\n    public:\n        // Default constructor\n        ShaderParamVec2();\n\n        // Constructor with uniform name and initial value\n        ShaderParamVec2(const String& name, const Vec2F& value);\n\n        // Returns the Vec2F value\n        const Vec2F& GetValue() const;\n\n        // Sets the Vec2F value\n        void SetValue(const Vec2F& value);\n\n        // Computes hash from name and vec2 value\n        size_t ComputeHash() const override;\n\n        SERIALIZABLE(ShaderParamVec2);\n        CLONEABLE_REF(ShaderParamVec2);\n\n    protected:\n        Vec2F mValue; // Vec2 uniform value @SERIALIZABLE\n    };\n\n    // -------------------------------------------------------\n    // Color shader parameter. Maps to a GLSL vec4 uniform\n    // representing an RGBA color.\n    // -------------------------------------------------------\n    class ShaderParamColor : public IShaderParam\n    {\n    public:\n        PROPERTIES(ShaderParamColor);\n        PROPERTY(Color4, value, SetValue, GetValue);     // Color value property\n\n    public:\n        // Default constructor\n        ShaderParamColor();\n\n        // Constructor with uniform name and initial color value\n        ShaderParamColor(const String& name, const Color4& value);\n\n        // Returns the Color4 value\n        const Color4& GetValue() const;\n\n        // Sets the Color4 value\n        void SetValue(const Color4& value);\n\n        // Computes hash from name and color ABGR representation\n        size_t ComputeHash() const override;\n\n        SERIALIZABLE(ShaderParamColor);\n        CLONEABLE_REF(ShaderParamColor);\n\n    protected:\n        Color4 mValue = Color4::White(); // Color uniform value @SERIALIZABLE\n    };\n\n    // -------------------------------------------------------\n    // Integer shader parameter. Maps to a GLSL int uniform.\n    // -------------------------------------------------------\n    class ShaderParamInt : public IShaderParam\n    {\n    public:\n        PROPERTIES(ShaderParamInt);\n        PROPERTY(int, value, SetValue, GetValue);    // Int value property\n\n    public:\n        // Default constructor\n        ShaderParamInt();\n\n        // Constructor with uniform name and initial value\n        ShaderParamInt(const String& name, int value);\n\n        // Returns the integer value\n        int GetValue() const;\n\n        // Sets the integer value\n        void SetValue(int value);\n\n        // Computes hash from name and int value\n        size_t ComputeHash() const override;\n\n        SERIALIZABLE(ShaderParamInt);\n        CLONEABLE_REF(ShaderParamInt);\n\n    protected:\n        int mValue = 0; // Int uniform value @SERIALIZABLE\n    };\n\n    // -----------------------------------------------------------------------\n    // Texture sampler attribute for a material. Binds a texture (from an\n    // ImageAsset) to a named sampler uniform in the shader, along with\n    // a texcoord attribute and src rect for UV remapping.\n    // -----------------------------------------------------------------------\n    struct TextureSampler : public ISerializable\n    {\n        String               samplerUniformName; // Shader uniform name (e.g. \"u_texture2\") @SERIALIZABLE\n        String               texCoordsAttrName;  // Shader attribute name (e.g. \"a_texCoords2\") @SERIALIZABLE\n        AssetRef<ImageAsset> image;              // Source image asset (provides texture + src rect) @SERIALIZABLE\n\n    public:\n\t\t// Returns the texture reference from the image asset, or null if no image\n        TextureRef GetTexture() const;\n\n\t\t// Returns the source rectangle from the image asset, or an empty rect if no image\n        RectI GetSrcRect() const;\n\n        bool operator==(const TextureSampler& other) const;\n\n        SERIALIZABLE(TextureSampler);\n    };\n\n    // -----------------------------------------------------------------------\n    // Material render primitive. Combines a vertex shader, a fragment shader,\n    // an optional texture, and a set of shader parameters into a single\n    // rendering state. Links shaders into a GPU program and caches uniform\n    // and attribute locations. Provides a hash for efficient batch comparison.\n    // -----------------------------------------------------------------------\n    class Material : public MaterialBase, virtual public ISerializable, public RefCounterable, virtual public ICloneableRef\n    {\n    public:\n        PROPERTIES(Material);\n        GETTER(bool, ready, IsReady);                                          // Ready state getter\n        PROPERTY(TextureRef, texture, SetTexture, GetTexture);                 // Material texture property @EDITOR_IGNORE\n        PROPERTY(BlendMode, blendMode, SetBlendMode, GetBlendMode); // Blend mode for rendering @SCRIPTABLE\n\n    public:\n        // Default constructor\n        Material();\n\n        // Copy-constructor, clones parameters and rebuilds the program\n        Material(const Material& other);\n\n        // Destructor, releases GPU program\n        ~Material();\n\n        // Sets the vertex shader. Invalidates the compiled program\n        void SetVertexShader(const Ref<Shader>& shader);\n\n        // Returns the vertex shader reference\n        const Ref<Shader>& GetVertexShader() const;\n\n        // Sets the fragment shader. Invalidates the compiled program\n        void SetFragmentShader(const Ref<Shader>& shader);\n\n        // Returns the fragment shader reference\n        const Ref<Shader>& GetFragmentShader() const;\n\n        // Sets the material texture\n        void SetTexture(const TextureRef& texture);\n\n        // Returns the material texture\n        const TextureRef& GetTexture() const;\n\n        // Sets blend mode for rendering\n        void SetBlendMode(BlendMode blendMode);\n\n        // Returns blend mode\n        BlendMode GetBlendMode() const;\n\n        // Returns a shader parameter by uniform name, or nullptr if not found\n        Ref<IShaderParam> GetShaderParam(const String& name) const;\n\n        // Returns all shader parameters as a name-to-parameter map\n        Map<String, Ref<IShaderParam>> GetAllShaderParamsMap() const;\n\n        // Adds a shader parameter, replacing any existing parameter with the same name\n        void AddParam(const Ref<IShaderParam>& param);\n\n        // Removes a shader parameter by uniform name\n        void RemoveParam(const String& name);\n\n        // Returns all shader parameters\n        const Vector<Ref<IShaderParam>>& GetParams() const;\n\n        // Replaces all shader parameters\n        void SetParams(const Vector<Ref<IShaderParam>>& params);\n\n        // Adds a texture sampler attribute. Invalidates the program\n        void AddTextureSampler(const TextureSampler& sampler);\n\n        // Removes a texture sampler by uniform name. Invalidates the program\n        void RemoveTextureSampler(const String& samplerUniformName);\n\n        // Returns all texture samplers\n        const Vector<TextureSampler>& GetTextureSamplers() const;\n\n        // Returns the total number of texture channels (1 primary + extra samplers)\n        int GetTotalTextureChannelsCount() const;\n\n        // Links the vertex and fragment shaders into a GPU program. Returns true on success\n        bool Build();\n\n        // Returns true when the shader program is compiled and ready for rendering\n        bool IsReady() const;\n\n        // Returns the cached material hash, recomputing if dirty\n        size_t GetHash();\n\n        // Marks the hash as needing recomputation (call after changing params at runtime)\n        void InvalidateHash();\n\n        // Applies custom shader parameters as uniforms on the currently active program\n        void ApplyParams() const;\n\n        // Returns transform matrix uniform location\n        int GetTransformUniform() const;\n\n        // Returns texture sampler uniform location\n        int GetTextureUniform() const;\n\n        // Returns vertex position attribute location\n        int GetPositionAttribute() const;\n\n        // Returns vertex color attribute location\n        int GetColorAttribute() const;\n\n        // Returns texture coordinate attribute location\n        int GetTexCoordsAttribute() const;\n\n        // Returns normal attribute location\n        int GetNormalAttribute() const;\n\n        SERIALIZABLE(Material);\n\n    protected:\n\t\tRef<Shader> mVertexShader;   // Vertex shader reference\n\t\tRef<Shader> mFragmentShader; // Fragment shader reference\n\n        TextureRef mTexture; // Optional primary material texture\n\n        BlendMode mBlendMode = BlendMode::Normal; // Blend mode for rendering @SERIALIZABLE\n\n\t\tVector<Ref<IShaderParam>> mParams;   // Shader parameter list @SERIALIZABLE @EDITOR_PROPERTY @EXPANDED_BY_DEFAULT\n\t\tVector<TextureSampler>    mSamplers; // Additional texture samplers @SERIALIZABLE @EDITOR_PROPERTY @EXPANDED_BY_DEFAULT\n\n        size_t mHash = 0;         // Cached material state hash\n        bool   mHashDirty = true; // True when hash needs recomputation\n        bool   mReady = false;    // True when program is linked successfully\n\n    protected:\n        // Platform-specific program linking\n        bool PlatformBuild();\n\n        // Platform-specific program destruction\n        void PlatformDestroy();\n\n        // Platform-specific uniform application\n        void PlatformApplyParams() const;\n\n        // Computes the material state hash using std::hash\n\t\tsize_t ComputeHash() const;\n\n\t\t// Completion deserialization delta callback\n\t\tvoid OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n        friend class Render;\n        friend class Ref<Material>;\n        FRIEND_REF_MAKE();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::IShaderParam)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::IShaderParam)\n{\n    FIELD().PUBLIC().NAME(name);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mName);\n}\nEND_META;\nCLASS_METHODS_META(o2::IShaderParam)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(size_t, ComputeHash);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ShaderParamFloat)\n{\n    BASE_CLASS(o2::IShaderParam);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ShaderParamFloat)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mValue);\n}\nEND_META;\nCLASS_METHODS_META(o2::ShaderParamFloat)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(size_t, ComputeHash);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ShaderParamVec2)\n{\n    BASE_CLASS(o2::IShaderParam);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ShaderParamVec2)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mValue);\n}\nEND_META;\nCLASS_METHODS_META(o2::ShaderParamVec2)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vec2F&, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(size_t, ComputeHash);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ShaderParamColor)\n{\n    BASE_CLASS(o2::IShaderParam);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ShaderParamColor)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Color4::White()).NAME(mValue);\n}\nEND_META;\nCLASS_METHODS_META(o2::ShaderParamColor)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(const Color4&, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(size_t, ComputeHash);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ShaderParamInt)\n{\n    BASE_CLASS(o2::IShaderParam);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ShaderParamInt)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(mValue);\n}\nEND_META;\nCLASS_METHODS_META(o2::ShaderParamInt)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(size_t, ComputeHash);\n}\nEND_META;\n\nCLASS_BASES_META(o2::TextureSampler)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::TextureSampler)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(samplerUniformName);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(texCoordsAttrName);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(image);\n}\nEND_META;\nCLASS_METHODS_META(o2::TextureSampler)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(TextureRef, GetTexture);\n    FUNCTION().PUBLIC().SIGNATURE(RectI, GetSrcRect);\n}\nEND_META;\n\nCLASS_BASES_META(o2::Material)\n{\n    BASE_CLASS(o2::MaterialBase);\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Material)\n{\n    FIELD().PUBLIC().NAME(ready);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(texture);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(blendMode);\n    FIELD().PROTECTED().NAME(mVertexShader);\n    FIELD().PROTECTED().NAME(mFragmentShader);\n    FIELD().PROTECTED().NAME(mTexture);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(BlendMode::Normal).NAME(mBlendMode);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().EXPANDED_BY_DEFAULT_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mParams);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().EXPANDED_BY_DEFAULT_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mSamplers);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mHash);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mHashDirty);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mReady);\n}\nEND_META;\nCLASS_METHODS_META(o2::Material)\n{\n\n    typedef Map<String, Ref<IShaderParam>> _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Material&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVertexShader, const Ref<Shader>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Shader>&, GetVertexShader);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFragmentShader, const Ref<Shader>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Shader>&, GetFragmentShader);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTexture, const TextureRef&);\n    FUNCTION().PUBLIC().SIGNATURE(const TextureRef&, GetTexture);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBlendMode, BlendMode);\n    FUNCTION().PUBLIC().SIGNATURE(BlendMode, GetBlendMode);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IShaderParam>, GetShaderParam, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(_tmp1, GetAllShaderParamsMap);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddParam, const Ref<IShaderParam>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveParam, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<IShaderParam>>&, GetParams);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParams, const Vector<Ref<IShaderParam>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddTextureSampler, const TextureSampler&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTextureSampler, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<TextureSampler>&, GetTextureSamplers);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetTotalTextureChannelsCount);\n    FUNCTION().PUBLIC().SIGNATURE(bool, Build);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsReady);\n    FUNCTION().PUBLIC().SIGNATURE(size_t, GetHash);\n    FUNCTION().PUBLIC().SIGNATURE(void, InvalidateHash);\n    FUNCTION().PUBLIC().SIGNATURE(void, ApplyParams);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetTransformUniform);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetTextureUniform);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetPositionAttribute);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetColorAttribute);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetTexCoordsAttribute);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetNormalAttribute);\n    FUNCTION().PROTECTED().SIGNATURE(bool, PlatformBuild);\n    FUNCTION().PROTECTED().SIGNATURE(void, PlatformDestroy);\n    FUNCTION().PROTECTED().SIGNATURE(void, PlatformApplyParams);\n    FUNCTION().PROTECTED().SIGNATURE(size_t, ComputeHash);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mesh.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Mesh.h\"\n\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n\tMesh::Mesh(TextureRef texture /*= TextureRef()*/, UInt vertexCount /*= 4*/, UInt polyCount /*= 2*/):\n\t\tmVertexType(Vertex::Type())\n\t{\n\t\tSetTexture(texture);\n\t\tResize(vertexCount, polyCount);\n\t}\n\n\tMesh::Mesh(const Mesh& mesh):\n\t\tmVertexType(mesh.mVertexType)\n\t{\n\t\tSetTexture(mesh.mTexture);\n\t\tmTextureSrcRect = mesh.mTextureSrcRect;\n\n\t\tsize_t stride = mVertexType.GetStride();\n\n\t\tmVertexData = mnew UInt8[mesh.mMaxVertexCount * stride];\n\t\tmIndexData = mnew VertexIndex[mesh.mMaxPolyCount * 3];\n\n\t\tmMaxVertexCount = mesh.mMaxVertexCount;\n\t\tmMaxPolyCount = mesh.mMaxPolyCount;\n\n\t\tvertexCount = mesh.vertexCount;\n\t\tpolyCount = mesh.polyCount;\n\n\t\tmemcpy(mVertexData, mesh.mVertexData, mesh.mMaxVertexCount * stride);\n\t\tmemcpy(mIndexData, mesh.mIndexData, mesh.mMaxPolyCount * 3 * sizeof(VertexIndex));\n\t}\n\n\tMesh::~Mesh()\n\t{\n\t\tdelete[] mVertexData;\n\t\tdelete[] mIndexData;\n\t}\n\n\tMesh& Mesh::operator=(const Mesh& other)\n\t{\n\t\tSetTexture(other.mTexture);\n\t\tmTextureSrcRect = other.mTextureSrcRect;\n\t\tmVertexType = other.mVertexType;\n\n\t\tsize_t stride = mVertexType.GetStride();\n\n\t\tif (mVertexData)\n\t\t\tdelete[] mVertexData;\n\n\t\tif (mIndexData)\n\t\t\tdelete[] mIndexData;\n\n\t\tmVertexData = mnew UInt8[other.mMaxVertexCount * stride];\n\t\tmIndexData = mnew VertexIndex[other.mMaxPolyCount * 3];\n\n\t\tmMaxVertexCount = other.mMaxVertexCount;\n\t\tmMaxPolyCount = other.mMaxPolyCount;\n\n\t\tvertexCount = other.vertexCount;\n\t\tpolyCount = other.polyCount;\n\n\t\tmemcpy(mVertexData, other.mVertexData, other.mMaxVertexCount * stride);\n\t\tmemcpy(mIndexData, other.mIndexData, other.mMaxPolyCount * 3 * sizeof(VertexIndex));\n\n\t\treturn *this;\n\t}\n\n\tvoid Mesh::Resize(UInt vertexCount, UInt polyCount)\n\t{\n\t\tsize_t stride = mVertexType.GetStride();\n\n\t\tif (mVertexData)\n\t\t\tdelete[] mVertexData;\n\n\t\tif (mIndexData)\n\t\t\tdelete[] mIndexData;\n\n\t\tmVertexData = mnew UInt8[vertexCount * stride];\n\t\tmIndexData = mnew VertexIndex[polyCount * 3];\n\n\t\tmMaxVertexCount = vertexCount;\n\t\tmMaxPolyCount = polyCount;\n\n\t\tthis->vertexCount = 0;\n\t\tthis->polyCount = 0;\n\t}\n\n\tUInt8* Mesh::GetVertexData()\n\t{ \n\t\treturn mVertexData;\n\t}\n\n\tconst UInt8* Mesh::GetVertexData() const\n\t{ \n\t\treturn mVertexData;\n\t}\n\n\tconst VertexType& Mesh::GetVertexType() const \n\t{ \n\t\treturn mVertexType; \n\t}\n\n\tVertexIndex* Mesh::GetIndexes()\n\t{ \n\t\treturn mIndexData; \n\t}\n\n\tconst VertexIndex* Mesh::GetIndexes() const \n\t{ \n\t\treturn mIndexData;\n\t}\n\n\tvoid Mesh::Draw()\n\t{\n\t\to2Render.DrawMesh(this);\n\t\tOnDrawn();\n\t}\n\n\tvoid Mesh::SetTexture(const TextureRef& texture)\n\t{\n\t\tmTexture = texture;\n\t}\n\n\tconst TextureRef& Mesh::GetTexture() const\n\t{\n\t\treturn mTexture;\n\t}\n\n\tvoid Mesh::SetTextureSrcRect(const RectI& rect)\n\t{\n\t\tmTextureSrcRect = rect;\n\t}\n\n\tconst RectI& Mesh::GetTextureSrcRect() const\n\t{\n\t\treturn mTextureSrcRect;\n\t}\n\n\tvoid Mesh::SetMaxVertexCount(const UInt& count)\n\t{\n\t\tdelete[] mVertexData;\n\t\tmVertexData = mnew UInt8[count * mVertexType.GetStride()];\n\t\tmMaxVertexCount = count;\n\t\tvertexCount = 0;\n\t}\n\n\tvoid Mesh::SetMaxPolyCount(const UInt& count)\n\t{\n\t\tdelete[] mIndexData;\n\t\tmIndexData = mnew VertexIndex[count * 3];\n\t\tmMaxPolyCount = count;\n\t\tpolyCount = 0;\n\t}\n\n\tUInt Mesh::GetMaxVertexCount() const\n\t{\n\t\treturn mMaxVertexCount;\n\t}\n\n\tUInt Mesh::GetMaxPolyCount() const\n\t{\n\t\treturn mMaxPolyCount;\n\t}\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Mesh.h",
    "content": "#pragma once\n\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Debug/Assert.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------------------\n    // Triangles mesh. Containing vertices, indexes of polygons, texture\n    // -----------------------------------------------------------------\n    class Mesh: public virtual IDrawable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        PROPERTIES(Mesh);\n        PROPERTY(TextureRef, texture, SetTexture, GetTexture);                // Texture property\n        PROPERTY(UInt, maxVertexCount, SetMaxVertexCount, GetMaxVertexCount); // Max vertex count property\n        PROPERTY(UInt, maxPolyCount, SetMaxPolyCount, GetMaxPolyCount);       // Max polygons count property\n\n    public:\n        UInt vertexCount = 0; // Current vertices count\n        UInt polyCount = 0;   // Current polygons in mesh\n\n    public:\n        // Constructor, creates mesh with Vertex type by default\n        Mesh(TextureRef texture = TextureRef(), UInt vertexCount = 4, UInt polyCount = 2);\n\n        // Copy-constructor\n        Mesh(const Mesh& mesh);\n\n        // Destructor\n        ~Mesh();\n\n        // Assign operator\n        Mesh& operator=(const Mesh& other);\n\n        // Resizing mesh buffers with current vertex type, loses data\n        void Resize(UInt vertexCount, UInt polyCount);\n\n        // Resizing mesh buffers with specified vertex type, loses data\n        template<typename VertexStruct>\n        void Resize(UInt vertexCount, UInt polyCount);\n\n        // Returns typed pointer to vertex buffer with type assertion\n        template<typename VertexStruct>\n        VertexStruct* GetVertices();\n\n        // Returns const typed pointer to vertex buffer with type assertion\n        template<typename VertexStruct>\n        const VertexStruct* GetVertices() const;\n\n        // Returns raw vertex data pointer\n        UInt8* GetVertexData();\n\n\t\t// Returns const raw vertex data pointer\n        const UInt8* GetVertexData() const;\n\n        // Returns vertex type descriptor\n        const VertexType& GetVertexType() const;\n\n        // Returns index buffer pointer\n        VertexIndex* GetIndexes();\n\n\t\t// Returns const index buffer pointer\n        const VertexIndex* GetIndexes() const;\n\n        // Sets max vertex count buffer\n        void SetMaxVertexCount(const UInt& count);\n\n        // Sets max polygons count buffer\n        void SetMaxPolyCount(const UInt& count);\n\n        // Returns max vertex buffer size\n        UInt GetMaxVertexCount() const;\n\n        // Returns max polygons count\n\t\tUInt GetMaxPolyCount() const;\n\n\t\t// Drawing mesh\n\t\tvoid Draw();\n\n\t\t// Sets texture\n\t\tvoid SetTexture(const TextureRef& texture);\n\n\t\t// Returns texture ptr\n\t\tconst TextureRef& GetTexture() const;\n\n\t\t// Sets texture source rect in pixel coordinates (for atlas sub-images)\n\t\tvoid SetTextureSrcRect(const RectI& rect);\n\n\t\t// Returns texture source rect\n\t\tconst RectI& GetTextureSrcRect() const;\n\n        CLONEABLE_REF(Mesh);\n\n    protected:\n        UInt8*       mVertexData = nullptr;  // Vertex data buffer (opaque bytes)\n        VertexIndex* mIndexData = nullptr;   // Index buffer\n        VertexType   mVertexType = Vertex::Type(); // Current vertex type descriptor\n\n\t\tTextureRef mTexture;        // Texture\n\t\tRectI      mTextureSrcRect; // Texture source rect in pixel coordinates\n\n        UInt mMaxVertexCount = 0; // Max size of vertex buffer\n        UInt mMaxPolyCount = 0;   // Max polygons count, mMaxPolyCount*3 - is index buffer max size\n\n        friend class Render;\n        friend class Sprite;\n    };\n\n    // --- Template implementations ---\n\n    template<typename VertexStruct>\n    void Mesh::Resize(UInt vertexCount, UInt polyCount)\n    {\n        if (mVertexData)\n            delete[] mVertexData;\n\n        if (mIndexData)\n            delete[] mIndexData;\n\n        mVertexType = VertexStruct::Type();\n\n        mVertexData = mnew UInt8[vertexCount * mVertexType.GetStride()];\n        mIndexData = mnew VertexIndex[polyCount * 3];\n\n        mMaxVertexCount = vertexCount;\n        mMaxPolyCount = polyCount;\n\n        this->vertexCount = 0;\n        this->polyCount = 0;\n    }\n\n    template<typename VertexStruct>\n    VertexStruct* Mesh::GetVertices()\n    {\n        Assert(mVertexType == VertexStruct::Type(), \"Mesh vertex type mismatch\");\n        return reinterpret_cast<VertexStruct*>(mVertexData);\n    }\n\n    template<typename VertexStruct>\n    const VertexStruct* Mesh::GetVertices() const\n    {\n        Assert(mVertexType == VertexStruct::Type(), \"Mesh vertex type mismatch\");\n        return reinterpret_cast<const VertexStruct*>(mVertexData);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Particles/Particle.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Color.h\"\n\nnamespace o2\n{\n    class Particle\n    {\n    public:\n        int index = 0; // Index of particle in container\n\n        Vec2F position; // Position of particle center\n        Vec2F velocity; // Particle velocity\n\n        float angle = 0;      // Particle angle in radians\n        float angleSpeed = 0; // Angle speed in radians/sec\n\n        Vec2F size; // Size of particle\n\n        Color4 color; // Particle's color\n\n        float timeLeft = 0; // Estimate life time\n        float lifetime = 0; // Total life time\n\n        bool alive = false; // Is particle alive\n\n    public:\n        bool operator==(const Particle& other) const\n        {\n            return position == position && velocity == velocity && Math::Equals(angle, other.angle) &&\n                Math::Equals(angleSpeed, other.angleSpeed) && Math::Equals(timeLeft, other.timeLeft) && size == other.size &&\n                color == other.color && alive == other.alive;\n        }\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Particles/ParticlesContainer.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ParticlesContainer.h\"\n\nnamespace o2\n{\n    void SingleSpriteParticlesContainer::SetMaterial(const Ref<Material>& material)\n    {\n        mParticlesMesh.SetMaterial(material);\n    }\n\n    void SingleSpriteParticlesContainer::Update(Vector<Particle>& particles, int maxParticles)\n    {\n        if (mParticlesMesh.GetMaxVertexCount() < (UInt)maxParticles * 4)\n            mParticlesMesh.Resize(maxParticles * 4, maxParticles * 2);\n\n        mParticlesMesh.vertexCount = 0;\n        mParticlesMesh.polyCount = 0;\n        int polyIndex = 0;\n        VertexIndex* idx = mParticlesMesh.GetIndexes();\n\n        RectF textureSrcRect;\n        Vec2F imageSize(10, 10);\n        Vec2F invTexSize(1.0f, 1.0f);\n\n        auto imageAsset = source->image;\n        if (imageAsset)\n        {\n            auto textureSource = imageAsset->GetTextureSource();\n            mParticlesMesh.SetTexture(textureSource.texture);\n\n            invTexSize = Vec2F(1.0f / textureSource.texture->GetSize().x, 1.0f / textureSource.texture->GetSize().y);\n            textureSrcRect = textureSource.sourceRect;\n            imageSize = imageAsset->GetSize();\n        }\n        else\n            mParticlesMesh.SetTexture(TextureRef::Null());\n\n        float uvLeft = textureSrcRect.left * invTexSize.x;\n        float uvRight = textureSrcRect.right * invTexSize.x;\n        float uvUp = 1.0f - textureSrcRect.bottom * invTexSize.y;\n        float uvDown = 1.0f - textureSrcRect.top * invTexSize.y;\n\n        for (auto& particle : particles)\n        {\n            if (!particle.alive)\n                continue;\n\n            float sn = Math::Sin(particle.angle), cs = Math::Cos(particle.angle);\n            Vec2F hs = imageSize * particle.size * 0.5f;\n            Vec2F xv(cs * hs.x, sn * hs.x);\n            Vec2F yv(-sn * hs.y, cs * hs.y);\n            Vec2F o(particle.position);\n            ULong colr = particle.color.ABGR();\n\n            Vertex* verts = mParticlesMesh.GetVertices<Vertex>();\n            verts[mParticlesMesh.vertexCount++].Set(o - xv + yv, colr, uvLeft, uvUp);\n            verts[mParticlesMesh.vertexCount++].Set(o + xv + yv, colr, uvRight, uvUp);\n            verts[mParticlesMesh.vertexCount++].Set(o + xv - yv, colr, uvRight, uvDown);\n            verts[mParticlesMesh.vertexCount++].Set(o - xv - yv, colr, uvLeft, uvDown);\n\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 4;\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 3;\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 2;\n\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 4;\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 2;\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 1;\n            mParticlesMesh.polyCount += 2;\n        }\n    }\n\n    void SingleSpriteParticlesContainer::Draw()\n    {\n        mParticlesMesh.Draw();\n    }\n\n    Ref<ParticlesContainer> SingleSpriteParticleSource::CreateContainer()\n    {\n        auto container = mmake<SingleSpriteParticlesContainer>();\n        container->source = Ref(this);\n        return container;\n    }\n\n    void MultiSpriteParticlesContainer::SetMaterial(const Ref<Material>& material)\n    {\n        mParticlesMesh.SetMaterial(material);\n    }\n\n    void MultiSpriteParticlesContainer::Update(Vector<Particle>& particles, int maxParticles)\n    {\n        if (mParticlesMesh.GetMaxVertexCount() < (UInt)maxParticles * 4)\n            mParticlesMesh.Resize(maxParticles * 4, maxParticles * 2);\n\n        mParticlesMesh.vertexCount = 0;\n        mParticlesMesh.polyCount = 0;\n        int polyIndex = 0;\n        VertexIndex* idx = mParticlesMesh.GetIndexes();\n\n        Vec2F invTexSize(1.0f, 1.0f);\n\n        auto imageAsset = source->images.IsEmpty() ? nullptr : source->images[0];\n        if (imageAsset)\n        {\n            auto texture = TextureRef(imageAsset->GetAtlasUID(), imageAsset->GetAtlasPage());\n            mParticlesMesh.SetTexture(texture);\n\n            invTexSize = Vec2F(1.0f / texture->GetSize().x, 1.0f / texture->GetSize().y);\n        }\n        else\n            mParticlesMesh.SetTexture(TextureRef::Null());\n\n        mImagesCache.Clear();\n        for (auto& imageAsset : source->images)\n        {\n            ImageInfo info;\n\n            info.texSize = imageAsset->GetSize();\n\n            RectF textureSrcRect = imageAsset->GetAtlasRect();\n            info.uv.left = textureSrcRect.left * invTexSize.x;\n            info.uv.right = textureSrcRect.right * invTexSize.x;\n            info.uv.top = 1.0f - textureSrcRect.bottom * invTexSize.y;\n            info.uv.bottom = 1.0f - textureSrcRect.top * invTexSize.y;\n\n            mImagesCache.push_back(info);\n        }\n\n        float maxImageIdx = (float)(mImagesCache.Count() - 1);\n\n        for (auto& particle : particles)\n        {\n            if (!particle.alive)\n                continue;\n\n            int imageIdx = Math::RoundToInt((1.0f - particle.timeLeft/particle.lifetime)*maxImageIdx);\n            auto& imageInfo = mImagesCache[imageIdx];\n\n            float sn = Math::Sin(particle.angle), cs = Math::Cos(particle.angle);\n            Vec2F hs = imageInfo.texSize * particle.size * 0.5f;\n            Vec2F xv(cs * hs.x, sn * hs.x);\n            Vec2F yv(-sn * hs.y, cs * hs.y);\n            Vec2F o(particle.position);\n            ULong colr = particle.color.ABGR();\n\n            Vertex* verts = mParticlesMesh.GetVertices<Vertex>();\n            verts[mParticlesMesh.vertexCount++].Set(o - xv + yv, colr, imageInfo.uv.left, imageInfo.uv.top);\n            verts[mParticlesMesh.vertexCount++].Set(o + xv + yv, colr, imageInfo.uv.right, imageInfo.uv.top);\n            verts[mParticlesMesh.vertexCount++].Set(o + xv - yv, colr, imageInfo.uv.right, imageInfo.uv.bottom);\n            verts[mParticlesMesh.vertexCount++].Set(o - xv - yv, colr, imageInfo.uv.left, imageInfo.uv.bottom);\n\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 4;\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 3;\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 2;\n\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 4;\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 2;\n            idx[polyIndex++] = mParticlesMesh.vertexCount - 1;\n            mParticlesMesh.polyCount += 2;\n        }\n    }\n\n    void MultiSpriteParticlesContainer::Draw()\n    {\n        mParticlesMesh.Draw();\n    }\n\n    Ref<ParticlesContainer> MultiSpriteParticleSource::CreateContainer()\n    {\n        auto container = mmake<MultiSpriteParticlesContainer>();\n        container->source = Ref(this);\n        return container;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ParticleSource, o2__ParticleSource);\n\nDECLARE_CLASS(o2::SingleSpriteParticleSource, o2__SingleSpriteParticleSource);\n\nDECLARE_CLASS(o2::MultiSpriteParticleSource, o2__MultiSpriteParticleSource);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Particles/ParticlesContainer.h",
    "content": "#pragma once\n\n#include \"o2/Assets/AssetRef.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Particles/Particle.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    class ParticlesEmitter;\n\n    // ------------------------------------------------------------------------------------------------------\n    // Basic particles container interface. Keeps list of particles, pooling, synchronizing particle graphics\n    // ------------------------------------------------------------------------------------------------------\n    class ParticlesContainer : public RefCounterable\n    {\n    public:\n        ParticlesEmitter* emitter = nullptr; // Emitter that uses this source\n\n    public:\n        virtual void OnParticleEmitted(Particle& particle) {}\n        virtual void OnParticleDied(Particle& particle) {}\n        virtual void SetMaterial(const Ref<Material>& material) {}\n\n        virtual void Update(Vector<Particle>& particles, int maxParticles) = 0;\n        virtual void Draw() = 0;\n    };\n\n    // --------------------------------------\n    // Particles emitter shape base interface\n    // --------------------------------------\n    class ParticleSource: public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        virtual ~ParticleSource() {}\n\n        virtual Ref<ParticlesContainer> CreateContainer() { return nullptr; }\n\n        SERIALIZABLE(ParticleSource);\n        CLONEABLE_REF(ParticleSource);\n    };\n\n    // ---------------------------------------------------------------------------\n    // Single sprite particle source. Generates particles with single sprite image\n    // ---------------------------------------------------------------------------\n    class SingleSpriteParticleSource : public ParticleSource\n    {\n    public:\n        AssetRef<ImageAsset> image; // Particle sprite image @SERIALIZABLE\n\n    public:\n        Ref<ParticlesContainer> CreateContainer() override;\n\n        SERIALIZABLE(SingleSpriteParticleSource);\n        CLONEABLE_REF(SingleSpriteParticleSource);\n    };\n\n    // ----------------------------------------------------------------------------\n    // Single sprite particles container. Contains mesh and rebuilds it every frame\n    // ----------------------------------------------------------------------------\n    class SingleSpriteParticlesContainer : public ParticlesContainer\n    {\n    public:\n        Ref<SingleSpriteParticleSource> source; // Source of particles\n\n    public:\n        void SetMaterial(const Ref<Material>& material) override;\n        void Update(Vector<Particle>& particles, int maxParticles) override;\n        void Draw() override;\n\n    private:\n        Mesh mParticlesMesh; // Particles mesh\n    };\n\n    // ---------------------------------------------------------------------------------------\n    // Multi sprite particle source. Generates particles woth changing image sprites over time\n    // ---------------------------------------------------------------------------------------\n    class MultiSpriteParticleSource : public ParticleSource\n    {\n    public:\n        Vector<AssetRef<ImageAsset>> images; // Particle sprite images @SERIALIZABLE\n\n    public:\n        Ref<ParticlesContainer> CreateContainer() override;\n\n        SERIALIZABLE(MultiSpriteParticleSource);\n        CLONEABLE_REF(MultiSpriteParticleSource);\n    };\n\n    // ----------------------------------------------------------------------------\n    // Multi sprite particles container. Contains mesh and rebuilds it every frame\n    // ----------------------------------------------------------------------------\n    class MultiSpriteParticlesContainer : public ParticlesContainer\n    {\n    public:\n        Ref<MultiSpriteParticleSource> source; // Source of particles\n\n    public:\n        void SetMaterial(const Ref<Material>& material) override;\n        void Update(Vector<Particle>& particles, int maxParticles) override;\n        void Draw() override;\n\n    private:\n        struct ImageInfo\n        {\n            RectF uv;\n            Vec2F texSize;\n        };\n\n        Mesh mParticlesMesh; // Particles mesh\n\n        Vector<ImageInfo> mImagesCache; // Cached images info\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ParticleSource)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticleSource)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticleSource)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Ref<ParticlesContainer>, CreateContainer);\n}\nEND_META;\n\nCLASS_BASES_META(o2::SingleSpriteParticleSource)\n{\n    BASE_CLASS(o2::ParticleSource);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SingleSpriteParticleSource)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(image);\n}\nEND_META;\nCLASS_METHODS_META(o2::SingleSpriteParticleSource)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Ref<ParticlesContainer>, CreateContainer);\n}\nEND_META;\n\nCLASS_BASES_META(o2::MultiSpriteParticleSource)\n{\n    BASE_CLASS(o2::ParticleSource);\n}\nEND_META;\nCLASS_FIELDS_META(o2::MultiSpriteParticleSource)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(images);\n}\nEND_META;\nCLASS_METHODS_META(o2::MultiSpriteParticleSource)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Ref<ParticlesContainer>, CreateContainer);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Particles/ParticlesEffects.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ParticlesEffects.h\"\n\n#include \"o2/Render/Particles/ParticlesEmitter.h\"\n\nnamespace o2\n{\n    void ParticlesEffect::Update(float dt, ParticlesEmitter* emitter)\n    {}\n\n    Vector<Particle>& ParticlesEffect::GetParticlesDirect(ParticlesEmitter* emitter)\n    {\n        return emitter->mParticles;\n    }\n\n    Ref<ParticlesEmitter> ParticlesEffect::GetEmitter() const\n    {\n        return mEmitter.Lock();\n    }\n\n    void ParticlesEffect::OnChanged()\n    {\n#if IS_EDITOR\n        if (mEmitter)\n            mEmitter.Lock() ->InvalidateBakedFrames();\n#endif\n    }\n\n    void ParticlesGravityEffect::Update(float dt, ParticlesEmitter* emitter)\n    {\n        Vec2F v = mGravity*dt;\n        for (auto& p : GetParticlesDirect(emitter))\n            p.velocity += v;\n    }\n\n    ParticlesColorEffect::ParticlesColorEffect()\n    {\n        colorGradient = mmake<ColorGradient>();\n        colorGradient->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    void ParticlesColorEffect::OnParticleEmitted(Particle& particle)\n    {\n        int particleIndex = particle.index;\n\n        CheckDataBufferSize(particleIndex);\n\n        mColorData[particleIndex].cacheKey = 0;\n    }\n\n    void ParticlesColorEffect::Update(float dt, ParticlesEmitter* emitter)\n    {\n        if (!colorGradient)\n            return;\n\n        auto& particles = GetParticlesDirect(emitter);\n\n        CheckDataBufferSize(particles.Count());\n\n        for (auto& p : particles)\n        {\n            int particleIndex = p.index;\n\n            auto& colorData = mColorData[particleIndex];\n            float lifeTimeCoef = 1.0f - p.timeLeft / p.lifetime;\n            //o2Debug.Log(\"lifeTimeCoef: %f (%f, %f), particle id: %i\", lifeTimeCoef, p.timeLeft, p.lifetime, particleIndex);\n            p.color = colorGradient->Evaluate(lifeTimeCoef, true, colorData.cacheKey);\n        }\n    }\n\n    void ParticlesColorEffect::CheckDataBufferSize(int particlesCount)\n    {\n        for (int i = mColorData.size(); i <= particlesCount; i++)\n            mColorData.Add(ParticleColorData());\n    }\n\n    void ParticlesColorEffect::OnDeserialized(const DataValue& node)\n    {\n        colorGradient->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    ParticlesRandomColorEffect::ParticlesRandomColorEffect()\n    {\n        colorGradientA = mmake<ColorGradient>();\n        colorGradientB = mmake<ColorGradient>();\n\n        colorGradientA->onKeysChanged += [this]() { OnChanged(); };\n        colorGradientB->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    void ParticlesRandomColorEffect::CheckDataBufferSize(int particlesCount)\n    {\n        for (int i = mColorData.size(); i <= particlesCount; i++)\n            mColorData.Add(ParticleColorData());\n    }\n\n    void ParticlesRandomColorEffect::OnDeserialized(const DataValue& node)\n    {\n        colorGradientA->onKeysChanged += [this]() { OnChanged(); };\n        colorGradientB->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    void ParticlesRandomColorEffect::OnParticleEmitted(Particle& particle)\n    {\n        int particleIndex = particle.index;\n\n        CheckDataBufferSize(particleIndex);\n\n        auto& colorData = mColorData[particleIndex];\n        colorData.cacheKeyA = 0;\n        colorData.cacheKeyB = 0;\n        colorData.coef = Math::Random(0.0f, 1.0f);\n    }\n\n    void ParticlesRandomColorEffect::Update(float dt, ParticlesEmitter* emitter)\n    {\n        auto& particles = GetParticlesDirect(emitter);\n\n        CheckDataBufferSize(particles.Count());\n\n        for (auto& p : particles)\n        {\n            int particleIndex = p.index;\n\n            auto& colorData = mColorData[particleIndex];\n            auto lifeTimeCoef = 1.0f - p.timeLeft / p.lifetime;\n            auto colorA = colorGradientA->Evaluate(lifeTimeCoef, true, colorData.cacheKeyA);\n            auto colorB = colorGradientB->Evaluate(lifeTimeCoef, true, colorData.cacheKeyB);\n            p.color = Math::Lerp(colorA, colorB, colorData.coef);\n        }\n    }\n\n    ParticlesSizeEffect::ParticlesSizeEffect()\n    {\n        curve = mmake<Curve>(Curve::Linear(0.0f, 1.0f));\n        curve->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    void ParticlesSizeEffect::OnParticleEmitted(Particle& particle)\n    {\n        int particleIndex = particle.index;\n\n        CheckDataBufferSize(particleIndex);\n\n        mData[particleIndex].initialSize = particle.size;\n        mData[particleIndex].cacheKey = 0;\n        mData[particleIndex].cacheKeyApprox = 0;\n        mData[particleIndex].randomCoef = Math::Random(0.0f, 1.0f);\n    }\n\n    void ParticlesSizeEffect::Update(float dt, ParticlesEmitter* emitter)\n    {\n        auto& particles = GetParticlesDirect(emitter);\n\n        CheckDataBufferSize(particles.Count());\n\n        for (auto& p : particles)\n        {\n            int particleIndex = p.index;\n\n            auto& sizeData = mData[particleIndex];\n            p.size = sizeData.initialSize*curve->Evaluate(1.0f - p.timeLeft/p.lifetime, sizeData.randomCoef, true, sizeData.cacheKey, sizeData.cacheKeyApprox);\n        }\n    }\n\n    void ParticlesSizeEffect::CheckDataBufferSize(int particlesCount)\n    {\n        for (int i = mData.size(); i <= particlesCount; i++)\n            mData.Add(ParticleData());\n    }\n\n    void ParticlesSizeEffect::OnDeserialized(const DataValue& node)\n    {\n        curve->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    ParticlesAngleEffect::ParticlesAngleEffect()\n    {\n        curve = mmake<Curve>(Curve::Linear(0.0f, 360.0f));\n        curve->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    void ParticlesAngleEffect::OnParticleEmitted(Particle& particle)\n    {\n        int particleIndex = particle.index;\n\n        CheckDataBufferSize(particleIndex);\n\n        mData[particleIndex].initialAngle = particle.angle;\n        mData[particleIndex].cacheKey = 0;\n        mData[particleIndex].cacheKeyApprox = 0;\n        mData[particleIndex].randomCoef = Math::Random(0.0f, 1.0f);\n    }\n\n    void ParticlesAngleEffect::Update(float dt, ParticlesEmitter* emitter)\n    {\n        auto& particles = GetParticlesDirect(emitter);\n\n        CheckDataBufferSize(particles.Count());\n\n        for (auto& p : particles)\n        {\n            int particleIndex = p.index;\n\n            auto& data = mData[particleIndex];\n            p.angle = data.initialAngle + curve->Evaluate(1.0f - p.timeLeft/p.lifetime, data.randomCoef, true, data.cacheKey, data.cacheKeyApprox);\n        }\n    }\n\n    void ParticlesAngleEffect::CheckDataBufferSize(int particlesCount)\n    {\n        for (int i = mData.size(); i <= particlesCount; i++)\n            mData.Add(ParticleData());\n    }\n\n    void ParticlesAngleEffect::OnDeserialized(const DataValue& node)\n    {\n        curve->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    ParticlesAngleSpeedEffect::ParticlesAngleSpeedEffect()\n    {\n        curve = mmake<Curve>(Curve::Linear(0.0f, 360.0f));\n        curve->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    void ParticlesAngleSpeedEffect::OnParticleEmitted(Particle& particle)\n    {\n        int particleIndex = particle.index;\n\n        CheckDataBufferSize(particleIndex);\n\n        mData[particleIndex].initialSpeed = particle.angleSpeed;\n        mData[particleIndex].cacheKey = 0;\n        mData[particleIndex].cacheKeyApprox = 0;\n        mData[particleIndex].randomCoef = Math::Random(0.0f, 1.0f);\n    }\n\n    void ParticlesAngleSpeedEffect::Update(float dt, ParticlesEmitter* emitter)\n    {\n        auto& particles = GetParticlesDirect(emitter);\n\n        CheckDataBufferSize(particles.Count());\n\n        for (auto& p : particles)\n        {\n            int particleIndex = p.index;\n\n            auto& data = mData[particleIndex];\n            p.angleSpeed = data.initialSpeed + curve->Evaluate(1.0f - p.timeLeft/p.lifetime, data.randomCoef, true, data.cacheKey, data.cacheKeyApprox);\n        }\n    }\n\n    void ParticlesAngleSpeedEffect::CheckDataBufferSize(int particlesCount)\n    {\n        for (int i = mData.size(); i <= particlesCount; i++)\n            mData.Add(ParticleData());\n    }\n\n    void ParticlesAngleSpeedEffect::OnDeserialized(const DataValue& node)\n    {\n        curve->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    ParticlesVelocityEffect::ParticlesVelocityEffect()\n    {\n        XCurve = mmake<Curve>(Curve::Linear(0.0f, 10.0f));\n        XCurve->onKeysChanged += [this]() { OnChanged(); };\n\n        YCurve = mmake<Curve>(Curve::Linear(0.0f, 10.0f));\n        YCurve->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    void ParticlesVelocityEffect::OnParticleEmitted(Particle& particle)\n    {\n        int particleIndex = particle.index;\n\n        CheckDataBufferSize(particleIndex);\n\n        mData[particleIndex].initialVelocity = particle.velocity;\n\n        mData[particleIndex].cacheXKey = 0;\n        mData[particleIndex].cacheXKeyApprox = 0;\n        mData[particleIndex].randomXCoef = Math::Random(0.0f, 1.0f);\n\n        mData[particleIndex].cacheYKey = 0;\n        mData[particleIndex].cacheYKeyApprox = 0;\n        mData[particleIndex].randomYCoef = Math::Random(0.0f, 1.0f);\n    }\n\n    void ParticlesVelocityEffect::Update(float dt, ParticlesEmitter* emitter)\n    {\n        auto& particles = GetParticlesDirect(emitter);\n\n        CheckDataBufferSize(particles.Count());\n\n        for (auto& p : particles)\n        {\n            int particleIndex = p.index;\n\n            auto& data = mData[particleIndex];\n            float x = XCurve->Evaluate(1.0f - p.timeLeft/p.lifetime, data.randomXCoef, true, data.cacheXKey, data.cacheXKeyApprox);\n            float y = YCurve->Evaluate(1.0f - p.timeLeft/p.lifetime, data.randomYCoef, true, data.cacheYKey, data.cacheYKeyApprox);\n\n            p.velocity = data.initialVelocity + Vec2F(x, y);\n        }\n    }\n\n    void ParticlesVelocityEffect::CheckDataBufferSize(int particlesCount)\n    {\n        for (int i = mData.size(); i <= particlesCount; i++)\n            mData.Add(ParticleData());\n    }\n\n    void ParticlesVelocityEffect::OnDeserialized(const DataValue& node)\n    {\n        XCurve->onKeysChanged += [this]() { OnChanged(); };\n        YCurve->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    ParticlesSplineEffect::ParticlesSplineEffect()\n    {\n        timeCurve = mmake<Curve>(Curve::EaseInOut());\n        timeCurve->onKeysChanged += [this]() { OnChanged(); };\n\n        spline = mmake<Spline>(Vector<Vec2F>{ Vec2F(), Vec2F(100, 0) });\n        spline->onKeysChanged += [this]() { OnChanged(); };\n    }\n\n    void ParticlesSplineEffect::OnParticleEmitted(Particle& particle)\n    {\n        int particleIndex = particle.index;\n\n        CheckDataBufferSize(particleIndex);\n\n        mData[particleIndex].initialPosition = particle.position;\n\n        mData[particleIndex].timeCacheKey = 0;\n        mData[particleIndex].timeCacheKeyApprox = 0;\n        mData[particleIndex].timeRandomCoef = Math::Random(0.0f, 1.0f);\n\n        mData[particleIndex].splineCacheKey = 0;\n        mData[particleIndex].splineCacheKeyApprox = 0;\n        mData[particleIndex].splineRandomCoef = Math::Random(0.0f, 1.0f);\n    }\n\n    void ParticlesSplineEffect::Update(float dt, ParticlesEmitter* emitter)\n    {\n        auto& particles = GetParticlesDirect(emitter);\n\n        CheckDataBufferSize(particles.Count());\n\n        float splineLength = spline->Length();\n\n        for (auto& p : particles)\n        {\n            int particleIndex = p.index;\n\n            auto& data = mData[particleIndex];\n            float t = timeCurve->Evaluate(1.0f - p.timeLeft/p.lifetime, data.timeRandomCoef, true, data.timeCacheKey, data.timeCacheKeyApprox);\n\n            p.position = data.initialPosition + spline->Evaluate(t*splineLength, data.splineRandomCoef, true, \n                                                                 data.splineCacheKey, data.splineCacheKeyApprox);\n        }\n    }\n\n    void ParticlesSplineEffect::CheckDataBufferSize(int particlesCount)\n    {\n        for (int i = mData.size(); i <= particlesCount; i++)\n            mData.Add(ParticleData());\n    }\n\n    void ParticlesSplineEffect::OnDeserialized(const DataValue& node)\n    {\n        timeCurve->onKeysChanged += [this]() { OnChanged(); };\n        spline->onKeysChanged += [this]() { OnChanged(); };\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ParticlesEffect, o2__ParticlesEffect);\n\nDECLARE_CLASS(o2::ParticlesGravityEffect, o2__ParticlesGravityEffect);\n\nDECLARE_CLASS(o2::ParticlesColorEffect, o2__ParticlesColorEffect);\n\nDECLARE_CLASS(o2::ParticlesRandomColorEffect, o2__ParticlesRandomColorEffect);\n\nDECLARE_CLASS(o2::ParticlesSizeEffect, o2__ParticlesSizeEffect);\n\nDECLARE_CLASS(o2::ParticlesAngleEffect, o2__ParticlesAngleEffect);\n\nDECLARE_CLASS(o2::ParticlesAngleSpeedEffect, o2__ParticlesAngleSpeedEffect);\n\nDECLARE_CLASS(o2::ParticlesVelocityEffect, o2__ParticlesVelocityEffect);\n\nDECLARE_CLASS(o2::ParticlesSplineEffect, o2__ParticlesSplineEffect);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Particles/ParticlesEffects.h",
    "content": "#pragma once\n\n#include \"o2/Render/Particles/Particle.h\"\n#include \"o2/Utils/Math/ColorGradient.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    class ParticlesEmitter;\n\n    // -------------------------------\n    // Particles effect base interface\n    // -------------------------------\n    class ParticlesEffect: public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        // Called when particle is emitted, used to initialize effect data\n        virtual void OnParticleEmitted(Particle& particle) {}\n\n        // Called when particle is died, used to cleanup effect data\n        virtual void OnParticleDied(Particle& particle) {}\n\n        // Called each frame to update effect data\n        virtual void Update(float dt, ParticlesEmitter* emitter);\n\n        // Get particles directly from emitter\n        Vector<Particle>& GetParticlesDirect(ParticlesEmitter* emitter);\n\n        // Returns owning emitter    \n        Ref<ParticlesEmitter> GetEmitter() const;\n\n        SERIALIZABLE(ParticlesEffect);\n        CLONEABLE_REF(ParticlesEffect);\n\n    protected:\n        WeakRef<ParticlesEmitter> mEmitter; // Owning emitter\n\n    protected:\n        // Called  when particle effect parameters are changed, used to invalidate baked frames\n        void OnChanged();\n\n        friend class ParticlesEmitter;\n    };\n\n    // ------------------------\n    // Particles gravity effect\n    // ------------------------\n    class ParticlesGravityEffect : public ParticlesEffect\n    {\n    public:\n        PROPERTIES(ParticlesGravityEffect);\n        PROPERTY(Vec2F, gravity, SetGravity, GetGravity);\n\n    public:\n        // Set gravity vector\n        void SetGravity(const Vec2F& gravity) { mGravity = gravity; OnChanged(); }\n\n        // Get gravity vector\n        const Vec2F& GetGravity() const { return mGravity; }\n\n        // Update particles velocity with gravity vector\n        void Update(float dt, ParticlesEmitter* emitter) override;\n\n        SERIALIZABLE(ParticlesGravityEffect);\n        CLONEABLE_REF(ParticlesGravityEffect);\n\n    protected:\n        Vec2F mGravity; // Vector of gravity @SERIALIZABLE\n    };\n\n    // --------------------------------\n    // Particles color over time effect\n    // --------------------------------\n    class ParticlesColorEffect : public ParticlesEffect\n    {\n    public:\n        Ref<ColorGradient> colorGradient; // Color gradient @SERIALIZABLE\n\n    public:\n        ParticlesColorEffect();\n\n        // Called when particle is emitted, used to initialize effect data\n        void OnParticleEmitted(Particle& particle) override;\n\n        // Update particles color over time\n        void Update(float dt, ParticlesEmitter* emitter) override;\n\n        SERIALIZABLE(ParticlesColorEffect);\n        CLONEABLE_REF(ParticlesColorEffect);\n\n    private:\n        struct ParticleColorData\n        {\n            int cacheKey = 0;\n\n            bool operator==(const ParticleColorData& other) const\n            {\n                return cacheKey == other.cacheKey;\n            }\n        };\n\n        Vector<ParticleColorData> mColorData; // Color data buffer\n\n    private:\n        // Check if color data buffer size is enough\n        void CheckDataBufferSize(int particlesCount);\n\n        // Called when deserialization is done, used to subscribe to color gradient changes\n        void OnDeserialized(const DataValue& node) override;\n    };\n\n    // ---------------------------------------------------\n    // Particles random color between two over time effect\n    // ---------------------------------------------------\n    class ParticlesRandomColorEffect : public ParticlesEffect\n    {\n    public:\n        Ref<ColorGradient> colorGradientA; // Color gradient A @SERIALIZABLE\n        Ref<ColorGradient> colorGradientB; // Color gradient B @SERIALIZABLE\n\n    public:\n        // Default constructor\n        ParticlesRandomColorEffect();\n\n        // Called when particle is emitted, used to initialize effect data\n        void OnParticleEmitted(Particle& particle) override;\n\n        // Update particles color between two gradients over time\n        void Update(float dt, ParticlesEmitter* emitter) override;\n\n        SERIALIZABLE(ParticlesRandomColorEffect);\n        CLONEABLE_REF(ParticlesRandomColorEffect);\n\n    private:\n        struct ParticleColorData\n        {\n            int cacheKeyA = 0;\n            int cacheKeyB = 0;\n\n            float coef = 0.0f;\n\n            bool operator==(const ParticleColorData& other) const\n            {\n                return cacheKeyA == other.cacheKeyA && cacheKeyB == other.cacheKeyB && coef == other.coef;\n            }\n        };\n\n        Vector<ParticleColorData> mColorData; // Color data buffer\n\n    private:\n        void CheckDataBufferSize(int particlesCount);\n\n        // Called when deserialization is done, used to subscribe to color gradient changes\n        void OnDeserialized(const DataValue& node) override;\n    };\n\n    // -------------------------------\n    // Particles size over time effect\n    // -------------------------------\n    class ParticlesSizeEffect : public ParticlesEffect\n    {\n    public:\n        Ref<Curve> curve; // Size curve @SERIALIZABLE\n\n    public:\n        // Default constructor\n        ParticlesSizeEffect();\n\n        // Called when particle is emitted, used to initialize effect data\n        void OnParticleEmitted(Particle& particle) override;\n\n        // Update particles size over time\n        void Update(float dt, ParticlesEmitter* emitter) override;\n\n        SERIALIZABLE(ParticlesSizeEffect);\n        CLONEABLE_REF(ParticlesSizeEffect);\n\n    private:\n        struct ParticleData\n        {\n            Vec2F initialSize;\n\n            int cacheKey = 0;\n            int cacheKeyApprox = 0;\n\n            float randomCoef = 0.0f;\n\n            bool operator==(const ParticleData& other) const\n            {\n                return cacheKey == other.cacheKey;\n            }\n        };\n\n        Vector<ParticleData> mData; // Particles data buffer\n\n    private:\n        void CheckDataBufferSize(int particlesCount);\n\n        // Called when deserialization is done, used to subscribe to size curve changes\n        void OnDeserialized(const DataValue& node) override;\n    };\n\n    // -------------------------------\n    // Particles angle over time effect\n    // -------------------------------\n    class ParticlesAngleEffect : public ParticlesEffect\n    {\n    public:\n        Ref<Curve> curve; // Angle curve @SERIALIZABLE\n\n    public:\n        // Default constructor\n        ParticlesAngleEffect();\n\n        // Called when particle is emitted, used to initialize effect data\n        void OnParticleEmitted(Particle& particle) override;\n\n        // Update particles size over time\n        void Update(float dt, ParticlesEmitter* emitter) override;\n\n        SERIALIZABLE(ParticlesAngleEffect);\n        CLONEABLE_REF(ParticlesAngleEffect);\n\n    private:\n        struct ParticleData\n        {\n            float initialAngle = 0.0f;\n\n            int cacheKey = 0;\n            int cacheKeyApprox = 0;\n\n            float randomCoef = 0.0f;\n\n            bool operator==(const ParticleData& other) const\n            {\n                return cacheKey == other.cacheKey;\n            }\n        };\n\n        Vector<ParticleData> mData; // Particles data buffer\n\n    private:\n        void CheckDataBufferSize(int particlesCount);\n\n        // Called when deserialization is done, used to subscribe to size curve changes\n        void OnDeserialized(const DataValue& node) override;\n    };\n\n    // --------------------------------------\n    // Particles angle speed over time effect\n    // --------------------------------------\n    class ParticlesAngleSpeedEffect : public ParticlesEffect\n    {\n    public:\n        Ref<Curve> curve; // Angle speed curve @SERIALIZABLE\n\n    public:\n        // Default constructor\n        ParticlesAngleSpeedEffect();\n\n        // Called when particle is emitted, used to initialize effect data\n        void OnParticleEmitted(Particle& particle) override;\n\n        // Update particles size over time\n        void Update(float dt, ParticlesEmitter* emitter) override;\n\n        SERIALIZABLE(ParticlesAngleSpeedEffect);\n        CLONEABLE_REF(ParticlesAngleSpeedEffect);\n\n    private:\n        struct ParticleData\n        {\n            float initialSpeed = 0.0f;\n\n            int cacheKey = 0;\n            int cacheKeyApprox = 0;\n\n            float randomCoef = 0.0f;\n\n            bool operator==(const ParticleData& other) const\n            {\n                return cacheKey == other.cacheKey;\n            }\n        };\n\n        Vector<ParticleData> mData; // Particles data buffer\n\n    private:\n        void CheckDataBufferSize(int particlesCount);\n\n        // Called when deserialization is done, used to subscribe to size curve changes\n        void OnDeserialized(const DataValue& node) override;\n    };\n\n    // --------------------------------------\n    // Particles velocity over time effect\n    // --------------------------------------\n    class ParticlesVelocityEffect : public ParticlesEffect\n    {\n    public:\n        Ref<Curve> XCurve; // Velocity by X curve @SERIALIZABLE\n        Ref<Curve> YCurve; // Velocity by X curve @SERIALIZABLE\n\n    public:\n        // Default constructor\n        ParticlesVelocityEffect();\n\n        // Called when particle is emitted, used to initialize effect data\n        void OnParticleEmitted(Particle& particle) override;\n\n        // Update particles size over time\n        void Update(float dt, ParticlesEmitter* emitter) override;\n\n        SERIALIZABLE(ParticlesVelocityEffect);\n        CLONEABLE_REF(ParticlesVelocityEffect);\n\n    private:\n        struct ParticleData\n        {\n            Vec2F initialVelocity;\n\n            int cacheXKey = 0;\n            int cacheXKeyApprox = 0;\n            float randomXCoef = 0.0f;\n\n            int cacheYKey = 0;\n            int cacheYKeyApprox = 0;\n            float randomYCoef = 0.0f;\n\n            bool operator==(const ParticleData& other) const\n            {\n                return cacheXKey == other.cacheXKey && cacheYKey == other.cacheYKey;\n            }\n        };\n\n        Vector<ParticleData> mData; // Particles data buffer\n\n    private:\n        void CheckDataBufferSize(int particlesCount);\n\n        // Called when deserialization is done, used to subscribe to size curve changes\n        void OnDeserialized(const DataValue& node) override;\n    };\n\n    // ---------------------------------------------\n    // Particles position over time on spline effect\n    // ---------------------------------------------\n    class ParticlesSplineEffect : public ParticlesEffect\n    {\n    public:\n        Ref<Curve>  timeCurve; // Time movement curve @SERIALIZABLE\n        Ref<Spline> spline;    // Trajectory spline @SERIALIZABLE\n\n    public:\n        // Default constructor\n        ParticlesSplineEffect();\n\n        // Called when particle is emitted, used to initialize effect data\n        void OnParticleEmitted(Particle& particle) override;\n\n        // Update particles size over time\n        void Update(float dt, ParticlesEmitter* emitter) override;\n\n        SERIALIZABLE(ParticlesSplineEffect);\n        CLONEABLE_REF(ParticlesSplineEffect);\n\n    private:\n        struct ParticleData\n        {\n            Vec2F initialPosition;\n\n            int timeCacheKey = 0;\n            int timeCacheKeyApprox = 0;\n            float timeRandomCoef = 0.0f;\n\n            int splineCacheKey = 0;\n            int splineCacheKeyApprox = 0;\n            float splineRandomCoef = 0.0f;\n\n            bool operator==(const ParticleData& other) const\n            {\n                return timeCacheKey == other.timeCacheKey && splineCacheKey == other.splineCacheKey;\n            }\n        };\n\n        Vector<ParticleData> mData; // Particles data buffer\n\n    private:\n        void CheckDataBufferSize(int particlesCount);\n\n        // Called when deserialization is done, used to subscribe to size curve changes\n        void OnDeserialized(const DataValue& node) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ParticlesEffect)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesEffect)\n{\n    FIELD().PROTECTED().NAME(mEmitter);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesEffect)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, OnParticleEmitted, Particle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnParticleDied, Particle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float, ParticlesEmitter*);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Particle>&, GetParticlesDirect, ParticlesEmitter*);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<ParticlesEmitter>, GetEmitter);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChanged);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ParticlesGravityEffect)\n{\n    BASE_CLASS(o2::ParticlesEffect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesGravityEffect)\n{\n    FIELD().PUBLIC().NAME(gravity);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mGravity);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesGravityEffect)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, SetGravity, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vec2F&, GetGravity);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float, ParticlesEmitter*);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ParticlesColorEffect)\n{\n    BASE_CLASS(o2::ParticlesEffect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesColorEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(colorGradient);\n    FIELD().PRIVATE().NAME(mColorData);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesColorEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, OnParticleEmitted, Particle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float, ParticlesEmitter*);\n    FUNCTION().PRIVATE().SIGNATURE(void, CheckDataBufferSize, int);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ParticlesRandomColorEffect)\n{\n    BASE_CLASS(o2::ParticlesEffect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesRandomColorEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(colorGradientA);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(colorGradientB);\n    FIELD().PRIVATE().NAME(mColorData);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesRandomColorEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, OnParticleEmitted, Particle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float, ParticlesEmitter*);\n    FUNCTION().PRIVATE().SIGNATURE(void, CheckDataBufferSize, int);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ParticlesSizeEffect)\n{\n    BASE_CLASS(o2::ParticlesEffect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesSizeEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(curve);\n    FIELD().PRIVATE().NAME(mData);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesSizeEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, OnParticleEmitted, Particle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float, ParticlesEmitter*);\n    FUNCTION().PRIVATE().SIGNATURE(void, CheckDataBufferSize, int);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ParticlesAngleEffect)\n{\n    BASE_CLASS(o2::ParticlesEffect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesAngleEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(curve);\n    FIELD().PRIVATE().NAME(mData);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesAngleEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, OnParticleEmitted, Particle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float, ParticlesEmitter*);\n    FUNCTION().PRIVATE().SIGNATURE(void, CheckDataBufferSize, int);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ParticlesAngleSpeedEffect)\n{\n    BASE_CLASS(o2::ParticlesEffect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesAngleSpeedEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(curve);\n    FIELD().PRIVATE().NAME(mData);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesAngleSpeedEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, OnParticleEmitted, Particle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float, ParticlesEmitter*);\n    FUNCTION().PRIVATE().SIGNATURE(void, CheckDataBufferSize, int);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ParticlesVelocityEffect)\n{\n    BASE_CLASS(o2::ParticlesEffect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesVelocityEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(XCurve);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(YCurve);\n    FIELD().PRIVATE().NAME(mData);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesVelocityEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, OnParticleEmitted, Particle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float, ParticlesEmitter*);\n    FUNCTION().PRIVATE().SIGNATURE(void, CheckDataBufferSize, int);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ParticlesSplineEffect)\n{\n    BASE_CLASS(o2::ParticlesEffect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesSplineEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(timeCurve);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(spline);\n    FIELD().PRIVATE().NAME(mData);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesSplineEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, OnParticleEmitted, Particle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float, ParticlesEmitter*);\n    FUNCTION().PRIVATE().SIGNATURE(void, CheckDataBufferSize, int);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Particles/ParticlesEmitter.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ParticlesEmitter.h\"\n\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Particles/ParticlesEffects.h\"\n#include \"o2/Render/Particles/ParticlesEmitterShapes.h\"\n\nnamespace o2\n{\n    ParticlesEmitter::ParticlesEmitter() :\n        IRectDrawable(), mShape(mmake<CircleParticlesEmitterShape>())\n    {\n        mLastTransform = mTransform;\n        UpdateDuration();\n    }\n\n    ParticlesEmitter::~ParticlesEmitter()\n    {}\n\n    ParticlesEmitter::ParticlesEmitter(const ParticlesEmitter& other) :\n        IRectDrawable(other), IAnimation(other), mParticlesSource(other.mParticlesSource->CloneAsRef<ParticleSource>()),\n        mShape(other.mShape->CloneAsRef<ParticlesEmitterShape>()),\n        mParticlesNumLimit(other.mParticlesNumLimit), mEmitParticlesFromShell(other.mEmitParticlesFromShell),\n        mEmittingCoefficient(other.mEmittingCoefficient), mIsParticlesRelative(other.mIsParticlesRelative),\n        mParticlesLifetime(other.mParticlesLifetime), mEmitParticlesPerSecond(other.mEmitParticlesPerSecond),\n        mInitialAngle(other.mInitialAngle), mInitialAngleRange(other.mInitialAngleRange),\n        mInitialSize(other.mInitialSize), mInitialSizeRange(other.mInitialSizeRange),\n        mInitialSpeed(other.mInitialSpeed), mInitialSpeedRangle(other.mInitialSpeedRangle),\n        mInitialMoveDirection(other.mInitialMoveDirection), mInitialMoveDirectionRange(other.mInitialMoveDirectionRange)\n    {\n        for (auto& effect : other.mEffects)\n            AddEffect(effect->CloneAsRef<ParticlesEffect>());\n\n\t\tmLastTransform = mTransform;\n\t\tUpdateDuration();\n    }\n\n    ParticlesEmitter& ParticlesEmitter::operator=(const ParticlesEmitter& other)\n    {\n        RemoveAllEffects();\n        mShape = nullptr;\n\n        int idx = 0;\n        for (auto& particle : mParticles)\n        {\n            if (particle.alive)\n            {\n                mDeadParticles.Add(idx);\n                particle.alive = false;\n            }\n\n            idx++;\n        }\n        mNumAliveParticles = 0;\n\n        IRectDrawable::operator=(other);\n        IAnimation::operator=(other);\n\n        mParticlesSource = other.mParticlesSource;\n        CreateParticlesContainer();\n\n        mShape = other.mShape->CloneAsRef<ParticlesEmitterShape>();\n\n        for (auto& effect : other.mEffects)\n            AddEffect(effect->CloneAsRef<ParticlesEffect>());\n\n        mEmitParticlesFromShell = other.mEmitParticlesFromShell;\n\n        mParticlesNumLimit = other.mParticlesNumLimit;\n\n        mEmittingCoefficient = other.mEmittingCoefficient;\n        mIsParticlesRelative = other.mIsParticlesRelative;\n\n\t\tUpdateDuration();\n\n        mEmissionDuration = other.mEmissionDuration;\n        mParticlesLifetime = other.mParticlesLifetime;\n        mEmitParticlesPerSecond = other.mEmitParticlesPerSecond;\n\n        mInitialAngle = other.mInitialAngle;\n        mInitialAngleRange = other.mInitialAngleRange;\n\n        mInitialSize = other.mInitialSize;\n        mInitialSizeRange = other.mInitialSizeRange;\n\n        mInitialSpeed = other.mInitialSpeed;\n        mInitialSpeedRangle = other.mInitialSpeedRangle;\n\n        mInitialMoveDirection = other.mInitialMoveDirection;\n        mInitialMoveDirectionRange = other.mInitialMoveDirectionRange;\n\n        mLastTransform = mTransform;\n\n        OnChanged();\n\n        return *this;\n    }\n\n    void ParticlesEmitter::Draw()\n    {\n        if (mParticlesContainer)\n            mParticlesContainer->Draw();\n    }\n\n    void ParticlesEmitter::Update(float dt)\n    {\n        if (!mEnabled)\n            return;\n\n#if IS_EDITOR\n        mIsUpdating = true;\n\n        if (mRandomSeed == 0)\n        {\n            mRandomSeed = ::time(0);\n            srand(mRandomSeed);\n        }\n#endif\n\n        if (!mParticlesContainer)\n            CreateParticlesContainer();\n\n        if (!mSubControlled)\n        {\n#if IS_EDITOR\n            if (!mParticlesPaused)\n#endif\n            {\n                float prewardDt = 1.0f / 30.0f;\n                while (mPrewarmTimeout > 0.0f)\n                {\n                    UpdateEmitting(prewardDt);\n                    UpdateEffects(prewardDt);\n                    UpdateParticles(prewardDt);\n                    mPrewarmTimeout -= prewardDt;\n                }\n\n                UpdateEmitting(dt);\n                UpdateEffects(dt);\n                UpdateParticles(dt);\n            }\n        }\n\n        IAnimation::Update(dt);\n\n        mParticlesContainer->Update(mParticles, mParticlesNumLimit);\n\n#if IS_EDITOR\n        mIsUpdating = false;\n#endif\n    }\n\n    void ParticlesEmitter::OnMaterialChanged()\n    {\n        if (mParticlesContainer)\n            mParticlesContainer->SetMaterial(GetMaterial());\n    }\n\n    void ParticlesEmitter::OnSerialize(o2::DataValue& node) const\n    {\n        IRectDrawable::OnSerialize(node);\n        IAnimation::OnSerialize(node);\n    }\n\n    void ParticlesEmitter::OnDeserialized(const DataValue& node)\n    {\n        CreateParticlesContainer();\n\n        IRectDrawable::OnDeserialized(node);\n        IAnimation::OnDeserialized(node);\n\n\t\tUpdateDuration();\n\n        OnEffectsListChanged();\n        OnChanged();\n    }\n\n    void ParticlesEmitter::OnSerializeDelta(DataValue& node, const IObject& origin) const\n    {\n        IRectDrawable::OnSerializeDelta(node, origin);\n        IAnimation::OnSerializeDelta(node, origin);\n    }\n\n    void ParticlesEmitter::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        CreateParticlesContainer();\n        IRectDrawable::OnDeserializedDelta(node, origin);\n        IAnimation::OnDeserializedDelta(node, origin);\n        OnEffectsListChanged();\n        OnChanged();\n    }\n\n\tvoid ParticlesEmitter::UpdateDuration()\n\t{\n        if (mLoop == Loop::None)\n            mDuration = mEmissionDuration + mParticlesLifetime;\n        else if (mLoop == Loop::Repeat)\n            mDuration = mEmissionDuration;\n\n        ResetBounds();\n\t}\n\n\tvoid ParticlesEmitter::CreateParticlesContainer()\n    {\n        mParticlesContainer = mParticlesSource->CreateContainer();\n        mParticlesContainer->emitter = this;\n    }\n\n    void ParticlesEmitter::UpdateEmitting(float dt)\n    {\n        if (!mPlaying)\n            return;\n\n        if (mLoop == Loop::None && mTime > mEmissionDuration)\n            return;\n\n        mEmitTimeBuffer += dt;\n\n        float currentParticlesPerSecond = mEmitParticlesPerSecond*mEmittingCoefficient;\n        float particlesDelay = 1.0f/currentParticlesPerSecond;\n\n        float initialAngle = Math::Deg2rad(mInitialAngle);\n        float halfAngleRange = Math::Deg2rad(mInitialAngleRange)*0.5f;\n\n        float halfSizeRange = mInitialSizeRange*0.5f;\n        float halfWidthScaleRange = mInitialWidthScaleRange*0.5f;\n\n        float halfSpeedRange = mInitialSpeedRangle*0.5f;\n\n        float initialMoveDirection = Math::Deg2rad(mInitialMoveDirection);\n        float halfDirRange = Math::Deg2rad(mInitialMoveDirectionRange)*0.5f;\n\n        float initialAngleSpeed = Math::Deg2rad(mInitialAngleSpeed);\n        float halfAngleSpeedRange = Math::Deg2rad(mInitialAngleSpeedRange)*0.5f;\n\n        float halfLifetimeRange = mParticlesLifetimeRange * 0.5f;\n\n        while (mEmitTimeBuffer > particlesDelay)\n        {\n            if (mNumAliveParticles < mParticlesNumLimit)\n            {\n                Particle* particle;\n                int particleIndex;\n\n                // Allocate particle\n                if (mDeadParticles.IsEmpty())\n                {\n                    mParticles.Add(Particle());\n                    particle = &mParticles.Last();\n                    particleIndex = mParticles.Count() - 1;\n                }\n                else\n                {\n                    particleIndex = mDeadParticles.PopBack();\n                    particle = &mParticles[particleIndex];\n                }\n\n                // Initialize particle\n                particle->index = particleIndex;\n\n                particle->position = mShape->GetEmittinPoint(mTransform, mEmitParticlesFromShell);\n                particle->angle = initialAngle + Math::Random(-halfAngleRange, halfAngleRange);\n\n                float randomSize = mInitialSize + Math::Random(-halfSizeRange, halfSizeRange);\n                float randomWidthScale = mInitialWidthScale + Math::Random(-halfWidthScaleRange, halfWidthScaleRange);\n                particle->size = Vec2F(randomSize, randomSize*randomWidthScale);\n\n                particle->velocity = Vec2F::Rotated(initialMoveDirection + Math::Random(-halfDirRange, halfDirRange))*\n                    (mInitialSpeed + Math::Random(-halfSpeedRange, halfSpeedRange));\n\n                particle->angleSpeed = initialAngleSpeed + Math::Random(-halfAngleSpeedRange, halfAngleSpeedRange);\n\n                particle->color = Color4::White();\n\n                particle->timeLeft = mParticlesLifetime + Math::Random(-halfLifetimeRange, halfLifetimeRange);\n                particle->lifetime = particle->timeLeft;\n\n                particle->alive = true;\n\n                // Notify container and effects\n                mParticlesContainer->OnParticleEmitted(*particle);\n\n                for (auto& effect : mEffects)\n                {\n                    if (effect)\n                        effect->OnParticleEmitted(*particle);\n                }\n\n                mNumAliveParticles++;\n            }\n\n            mEmitTimeBuffer -= particlesDelay;\n        }\n    }\n\n    void ParticlesEmitter::UpdateEffects(float dt)\n    {\n        for (auto& effect : mEffects)\n        {\n            if (effect)\n                effect->Update(dt, this);\n        }\n    }\n\n    void ParticlesEmitter::UpdateParticles(float dt)\n    {\n        int idx = 0;\n        for (auto& particle : mParticles)\n        {\n            if (!particle.alive)\n            {\n                idx++;\n                continue;\n            }\n\n            particle.position += particle.velocity*dt;\n            particle.angle += particle.angleSpeed*dt;\n\n            particle.timeLeft -= dt;\n\n            if (particle.timeLeft < 0)\n            {\n                particle.alive = false;\n\n                mParticlesContainer->OnParticleDied(particle);\n\n                for (auto& effect : mEffects)\n                {\n                    if (effect)\n                        effect->OnParticleDied(particle);\n                }\n\n                mDeadParticles.Add(idx);\n                mNumAliveParticles--;\n            }\n\n            idx++;\n        }\n    }\n\n    void ParticlesEmitter::BasisChanged()\n    {\n        if (!mIsParticlesRelative)\n            return;\n\n        Basis change = mLastTransform.Inverted()*mTransform;\n        for (auto& particle : mParticles)\n            particle.position = change.Transform(particle.position);\n\n        mLastTransform = mTransform;\n    }\n\n    void ParticlesEmitter::Play()\n    {\n        IAnimation::Play();\n\n        mEmitTimeBuffer = 0.0f;\n        mPrewarmTimeout = mPrewarmTime;\n#if IS_EDITOR\n        mBakedFrames.Clear();\n#endif\n    }\n\n    void ParticlesEmitter::Stop()\n    {\n        IAnimation::Stop();\n    }\n\n    void ParticlesEmitter::SetDuration(float duration)\n    {\n        if (mLoop == Loop::None)\n            mParticlesLifetime = duration - mEmissionDuration;\n        else if (mLoop == Loop::Repeat)\n\t\t\tmParticlesLifetime = duration;\n\n\t\tUpdateDuration();\n\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetDuration() const\n    {\n        return mEmissionDuration + mParticlesLifetime;\n    }\n\n    void ParticlesEmitter::SetTime(float time)\n    {\n        mTime = time;\n        UpdateTime();\n    }\n\n    void ParticlesEmitter::SetParticlesSource(const Ref<ParticleSource>& source)\n    {\n        mParticlesSource = source;\n        CreateParticlesContainer();\n        OnChanged();\n    }\n\n    const Ref<ParticleSource>& ParticlesEmitter::GetParticlesSource() const\n    {\n        return mParticlesSource;\n    }\n\n    void ParticlesEmitter::SetEmittingCoef(float coef)\n    {\n        mEmittingCoefficient = coef;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetEmittingCoef() const\n    {\n        return mEmittingCoefficient;\n    }\n\n    void ParticlesEmitter::SetShape(const Ref<ParticlesEmitterShape>& shape)\n    {\n        mShape = shape;\n        OnChanged();\n    }\n\n    const Ref<ParticlesEmitterShape>& ParticlesEmitter::GetShape() const\n    {\n        return mShape;\n    }\n\n    void ParticlesEmitter::AddEffect(const Ref<ParticlesEffect>& effect)\n    {\n        mEffects.Add(effect);\n        OnChanged();\n    }\n\n    const Vector<Ref<ParticlesEffect>>& ParticlesEmitter::GetEffects() const\n    {\n        return mEffects;\n    }\n\n    void ParticlesEmitter::RemoveEffect(const Ref<ParticlesEffect>& effect)\n    {\n        mEffects.Remove(effect);\n        OnChanged();\n    }\n\n    void ParticlesEmitter::RemoveAllEffects()\n    {\n        mEffects.Clear();\n        OnChanged();\n    }\n\n    void ParticlesEmitter::SetMaxParticles(int count)\n    {\n        mParticlesNumLimit = count;\n\n        int idx = 0;\n        while (mNumAliveParticles > mParticlesNumLimit)\n        {\n            if (mParticles[idx].alive)\n            {\n                mParticles[idx].alive = false;\n                mDeadParticles.Add(idx);\n                mNumAliveParticles--;\n            }\n\n            idx++;\n        }\n\n        OnChanged();\n    }\n\n    int ParticlesEmitter::GetMaxParticles() const\n    {\n        return mParticlesNumLimit;\n    }\n\n    int ParticlesEmitter::GetParticlesCount() const\n    {\n        return mNumAliveParticles;\n    }\n\n    bool ParticlesEmitter::IsAliveParticles() const\n    {\n        return mNumAliveParticles > 0;\n    }\n\n    const Vector<Particle>& ParticlesEmitter::GetParticles() const\n    {\n        return mParticles;\n    }\n\n    void ParticlesEmitter::SetParticlesRelativity(bool relative)\n    {\n        mIsParticlesRelative = relative;\n        OnChanged();\n    }\n\n    bool ParticlesEmitter::IsParticlesRelative() const\n    {\n        return mIsParticlesRelative;\n    }\n\n    void ParticlesEmitter::SetParticlesEmitFromShell(bool fromShell)\n    {\n        mEmitParticlesFromShell = fromShell;\n        OnChanged();\n    }\n\n    bool ParticlesEmitter::IsParticlesEmitFromShell() const\n    {\n        return mEmitParticlesFromShell;\n    }\n\n    void ParticlesEmitter::SetEmissionDuration(float duration)\n    {\n\t\tmEmissionDuration = duration;\n\t\tUpdateDuration();\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetEmissionDuration() const\n    {\n        return mEmissionDuration;\n    }\n\n    void ParticlesEmitter::SetParticlesLifetime(float lifetime)\n    {\n\t\tmParticlesLifetime = lifetime;\n\t\tUpdateDuration();\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetParticlesLifetime() const\n    {\n        return mParticlesLifetime;\n    }\n\n    void ParticlesEmitter::SetParticlesPerSecond(float numParticles)\n    {\n        mEmitParticlesPerSecond = numParticles;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetParticlesPerSecond() const\n    {\n        return mEmitParticlesPerSecond;\n    }\n\n    void ParticlesEmitter::SetPrewarmTime(float time)\n    {\n        mPrewarmTime = time;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetPrewarmTime() const\n    {\n        return mPrewarmTime;\n    }\n\n    void ParticlesEmitter::SetInitialAngle(float angle)\n    {\n        mInitialAngle = angle;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialAngle() const\n    {\n        return mInitialAngle;\n    }\n\n    void ParticlesEmitter::SetInitialAngleRange(float range)\n    {\n        mInitialAngleRange = range;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialAngleRange() const\n    {\n        return mInitialAngleRange;\n    }\n\n    void ParticlesEmitter::SetInitialSize(float size)\n    {\n        mInitialSize = size;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialSize() const\n    {\n        return mInitialSize;\n    }\n\n    void ParticlesEmitter::SetInitialSizeRange(float range)\n    {\n        mInitialSizeRange = range;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialSizeRange() const\n    {\n        return mInitialSizeRange;\n    }\n\n    void ParticlesEmitter::SetInitialWidthScale(float scale)\n    {\n        mInitialWidthScale = scale;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialWidthScale() const\n    {\n        return mInitialWidthScale;\n    }\n\n    void ParticlesEmitter::SetInitialWidthScaleRange(float scaleRange)\n    {\n        mInitialWidthScaleRange = scaleRange;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialWidthScaleRange() const\n    {\n        return mInitialWidthScaleRange;\n    }\n\n    void ParticlesEmitter::SetInitialAngleSpeed(float speed)\n    {\n        mInitialAngleSpeed = speed;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialAngleSpeed() const\n    {\n        return mInitialAngleSpeed;\n    }\n\n    void ParticlesEmitter::SetInitialAngleSpeedRange(float speedRange)\n    {\n        mInitialAngleSpeedRange = speedRange;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialAngleSpeedRange() const\n    {\n        return mInitialAngleSpeedRange;\n    }\n\n    void ParticlesEmitter::SetInitialSpeed(float speed)\n    {\n        mInitialSpeed = speed;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialSpeed() const\n    {\n        return mInitialSpeed;\n    }\n\n    void ParticlesEmitter::SetInitialSpeedRange(float speedRange)\n    {\n        mInitialSpeedRangle = speedRange;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetInitialSpeedRange() const\n    {\n        return mInitialSpeedRangle;\n    }\n\n    void ParticlesEmitter::SetEmitParticlesMoveDirection(float direction)\n    {\n        mInitialMoveDirection = direction;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetEmitParticlesMoveDirection() const\n    {\n        return mInitialMoveDirection;\n    }\n\n    void ParticlesEmitter::SetEmitParticlesMoveDirectionRange(float directionRange)\n    {\n        mInitialMoveDirectionRange = directionRange;\n        OnChanged();\n    }\n\n    float ParticlesEmitter::GetEmitParticlesMoveDirectionRange() const\n    {\n        return mInitialMoveDirectionRange;\n    }\n\n    Ref<RefCounterable> ParticlesEmitter::CastToRefCounterable(const Ref<ParticlesEmitter>& ref)\n    {\n        return DynamicCast<IAnimation>(ref);\n    }\n\n    void ParticlesEmitter::OnEffectsListChanged()\n    {\n        for (auto& effect : mEffects)\n        {\n            if (effect)\n                effect->mEmitter = Ref(this);\n        }\n\n        if (mShape)\n            mShape->mEmitter = Ref(this);\n    }\n\n    void ParticlesEmitter::OnChanged()\n    {\n#if IS_EDITOR\n        InvalidateBakedFrames();\n#endif\n    }\n\n#if IS_EDITOR\n    int ParticlesEmitter::mBakedFPS = 60;\n\n    void ParticlesEmitter::SetParticlesPause(bool paused)\n    {\n        mParticlesPaused = paused;\n    }\n\n    void ParticlesEmitter::InvalidateBakedFrames()\n    {\n        mBakedFrames.Clear();\n\n        if (!mPlaying)\n        {\n            srand(mRandomSeed);\n\n            if (mLoop == Loop::Repeat && GetRelativeTime() > 1.0f)\n                mTime = Math::Mod(mTime, GetDuration());\n\n            RestoreBakedFrame(GetBakedFrameIndex(mTime));\n        }\n    }\n\n    void ParticlesEmitter::Evaluate()\n    {\n        if (mIsUpdating)\n        {\n            int frameIdx = GetBakedFrameIndex(mTime);\n\n            if (mBakedFrames.Count() <= frameIdx)\n                mBakedFrames.Resize(frameIdx + 1);\n\n            mBakedFrames[frameIdx].particles = mParticles;\n            mBakedFrames[frameIdx].deadParticles = mDeadParticles;\n            mBakedFrames[frameIdx].numAliveParticles = mNumAliveParticles;\n            mBakedFrames[frameIdx].emitTimeBuffer = mEmitTimeBuffer;\n\n            //o2Debug.Log(\"Baked frame %i with %i particles, time: %f\", frameIdx, mParticles.Count(), mTime);\n        }\n        else\n        {\n            RestoreBakedFrame(GetBakedFrameIndex(mTime));\n        }\n    }\n\n    int ParticlesEmitter::GetBakedFrameIndex(float time) const\n    {\n        return Math::RoundToInt(time*mBakedFPS);\n    }\n\n    void ParticlesEmitter::CheckBakedFrames(int maxFrameIdx)\n    {\n        //o2Debug.Log(\"Baked frames count: %i, max frame index: %i\", mBakedFrames.Count(), maxFrameIdx);\n\n        if (mBakedFrames.Count() > maxFrameIdx || maxFrameIdx < 1)\n            return;\n\n        //o2Debug.Log(\"Baked frames count: %i, max frame index: %i\", mBakedFrames.Count(), maxFrameIdx);\n\n        int startIdx = Math::Max(0, mBakedFrames.Count() - 1);\n        mBakedFrames.Resize(maxFrameIdx + 1);\n\n        float prevTime = mTime;\n        mTime = (float)startIdx/(float)mBakedFPS;\n\n        // Reset particles to previous state\n        auto prevParticles = mParticles;\n        auto prevDeadParticles = mDeadParticles;\n        auto prevNumAliveParticles = mNumAliveParticles;\n        auto prevEmitTimeBuffer = mEmitTimeBuffer;\n        auto prevSubControlled = mSubControlled;\n\n        if (startIdx >= 0)\n        {\n            mParticles = mBakedFrames[startIdx].particles;\n            mDeadParticles = mBakedFrames[startIdx].deadParticles;\n            mNumAliveParticles = mBakedFrames[startIdx].numAliveParticles;\n            mEmitTimeBuffer = mBakedFrames[startIdx].emitTimeBuffer;\n\n//             o2Debug.Log(\"Setup particles: %i\", mNumAliveParticles);\n//             for (auto& p : mParticles)\n//                 o2Debug.Log(\"   Particle: %i, %f, %f\", p.index, p.timeLeft, p.lifetime);\n        }\n        else\n        {\n            mParticles.Clear();\n            mDeadParticles.Clear();\n            mNumAliveParticles = 0;\n            mEmitTimeBuffer = 0.0f;\n        }\n\n        //o2Debug.Log(\"Start baked frame index: %i, time: %f\", startIdx, mTime);\n\n        // Prepare to update particles\n        bool prevPlaying = mPlaying;\n        mPlaying = true;\n\n        bool prevPaused = mParticlesPaused;\n        mParticlesPaused = false;\n\n        if (startIdx == 0)\n            mPrewarmTimeout = mPrewarmTime;\n\n        mSubControlled = false;\n\n        // Update and bake frames\n        for (int i = startIdx; i <= maxFrameIdx; i++)\n        {\n            //o2Debug.Log(\"To bake frame: %i\", i);\n            Update(1.0f/(float)mBakedFPS);\n        }\n\n        // Restore previous state\n        mTime = prevTime;\n        mPlaying = prevPlaying;\n        mParticlesPaused = prevPaused;\n        mParticles = prevParticles;\n        mDeadParticles = prevDeadParticles;\n        mNumAliveParticles = prevNumAliveParticles;\n        mEmitTimeBuffer = prevEmitTimeBuffer;\n        mSubControlled = prevSubControlled;\n    }\n\n    void ParticlesEmitter::RestoreBakedFrame(int frameIdx)\n    {\n        //o2Debug.Log(\"\\n------------------------\\nRestore baked frame %i\", frameIdx);\n\n        CheckBakedFrames(frameIdx);\n\n        if (frameIdx == 0)\n        {\n            mParticles.Clear();\n            mDeadParticles.Clear();\n            mNumAliveParticles = 0;\n            mEmitTimeBuffer = 0.0f;\n        }\n        else\n        {\n            mParticles = mBakedFrames[frameIdx].particles;\n            mDeadParticles = mBakedFrames[frameIdx].deadParticles;\n            mNumAliveParticles = mBakedFrames[frameIdx].numAliveParticles;\n            mEmitTimeBuffer = mBakedFrames[frameIdx].emitTimeBuffer;\n        }\n    }\n\n#endif\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ParticlesEmitter, o2__ParticlesEmitter);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Particles/ParticlesEmitter.h",
    "content": "#pragma once\n\n#include \"o2/Animation/IAnimation.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Particles/Particle.h\"\n#include \"o2/Render/Particles/ParticlesContainer.h\"\n#include \"o2/Render/Particles/ParticlesEffects.h\"\n#include \"o2/Render/Particles/ParticlesEmitterShapes.h\"\n#include \"o2/Render/IRectDrawable.h\"\n#include \"o2/Utils/Editor/Attributes/GroupAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/NameAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/RangeAttribute.h\"\n#include \"o2/Utils/Math/ColorGradient.h\"\n#include \"o2/Utils/Math/Curve.h\"\n\nnamespace o2\n{\n    class Mesh;\n\n    // ------------------------------------------------------\n    // Particles emitter. Emits, updates and manage particles\n    // ------------------------------------------------------\n    class ParticlesEmitter: public IRectDrawable, public IAnimation\n    {\n    public:\n        PROPERTIES(ParticlesEmitter);\n\n        PROPERTY(float, duration, SetDuration, GetDuration); // Animation duration property @RANGE(0, 5)\n\n        PROPERTY(Ref<ParticleSource>, particlesSource, SetParticlesSource, GetParticlesSource); // Particles source property @EXPANDED_BY_DEFAULT @DONT_DELETE @DEFAULT_TYPE(o2::SingleSpriteParticleSource) @GROUP(\"Emission\")\n\n        PROPERTY(Ref<ParticlesEmitterShape>, shape, SetShape, GetShape);                    // Emitting shape property @EXPANDED_BY_DEFAULT @DONT_DELETE @DEFAULT_TYPE(o2::CircleParticlesEmitterShape) @GROUP(\"Emission\")\n        PROPERTY(bool, emitFromShell, SetParticlesEmitFromShell, IsParticlesEmitFromShell); // Emitting particles from shell of shape property @GROUP(\"Emission\")\n                \n        PROPERTY(float, particlesPerSecond, SetParticlesPerSecond, GetParticlesPerSecond); // Amount of particles emitting in one second property @RANGE(0, 100) @GROUP(\"Emission\")\n        PROPERTY(int, maxParticles, SetMaxParticles, GetMaxParticles);                     // Number of maximum particles in emitter property @GROUP(\"Emission\")\n        PROPERTY(float, emissionDuration, SetEmissionDuration, GetEmissionDuration);       // Emitting particles duration in seconds property @RANGE(0, 10) @GROUP(\"Emission\")\n        PROPERTY(float, particlesLifetime, SetParticlesLifetime, GetParticlesLifetime);    // Particles lifetime in seconds property @RANGE(0, 10) @GROUP(\"Emission\")\n\n        PROPERTY(bool, particlesRelative, SetParticlesRelativity, IsParticlesRelative); // Is particles relative to emitter @GROUP(\"Emission\")\n\n        PROPERTY(float, emittingCoefficient, SetEmittingCoef, GetEmittingCoef); // Particles emitting coefficient property (0...1) @RANGE(0, 1) @GROUP(\"Emission\")\n\n        PROPERTY(float, prewarmTime, SetPrewarmTime, GetPrewarmTime); // Emitting particles prewarm time property @RANGE(0, 1) @GROUP(\"Emission\")\n        \n        PROPERTY(float, initialAngle, SetInitialAngle, GetInitialAngle);                // Emitting particle angle property in degrees @RANGE(0, 360) @GROUP(\"Initial parameters\") @NAME(\"Angle\")\n        PROPERTY(float, initialAngleRange, SetInitialAngleRange, GetInitialAngleRange); // Emitting particle angle range property in degrees @RANGE(0, 360) @GROUP(\"Initial parameters\") @NAME(\"Angle range\")\n        \n        PROPERTY(float, initialSize, SetInitialSize, GetInitialSize);                // Emitting particle size property @RANGE(0, 3) @GROUP(\"Initial parameters\") @NAME(\"Size\")\n        PROPERTY(float, initialSizeRange, SetInitialSizeRange, GetInitialSizeRange); // Emitting particle size range property @RANGE(0, 2) @GROUP(\"Initial parameters\") @NAME(\"Size range\")\n\n        PROPERTY(float, initialWidthScale, SetInitialWidthScale, GetInitialWidthScale);                // Emitting particle width scale property @RANGE(0, 3) @GROUP(\"Initial parameters\") @NAME(\"Width scale\")\n        PROPERTY(float, initialWidthScaleRange, SetInitialWidthScaleRange, GetInitialWidthScaleRange); // Emitting particle width scale range property @RANGE(0, 2) @GROUP(\"Initial parameters\") @NAME(\"Width scale range\")\n        \n        PROPERTY(float, initialSpeed, SetInitialSpeed, GetInitialSpeed);                // Emitting particle angle speed property in degrees/sec @RANGE(0, 360) @GROUP(\"Initial parameters\") @NAME(\"Speed\")\n        PROPERTY(float, initialSpeedRange, SetInitialSpeedRange, GetInitialSpeedRange); // Emitting particle angle speed range in degrees/sec @RANGE(0, 360) @GROUP(\"Initial parameters\") @NAME(\"Speed range\")\n        \n        PROPERTY(float, initialAngleSpeed, SetInitialAngleSpeed, GetInitialAngleSpeed);                // Emitting particle speed property @RANGE(0, 720) @GROUP(\"Initial parameters\") @NAME(\"Angle speed\")\n        PROPERTY(float, initialAngleSpeedRange, SetInitialAngleSpeedRange, GetInitialAngleSpeedRange); // Emitting particle speed range @RANGE(0, 720) @GROUP(\"Initial parameters\") @NAME(\"Angle speed range\")\n       \n        PROPERTY(float, moveDirection, SetEmitParticlesMoveDirection, GetEmitParticlesMoveDirection);                // Emitting particle moving direction in degrees @RANGE(0, 360) @GROUP(\"Initial parameters\")\n        PROPERTY(float, moveDirectionRange, SetEmitParticlesMoveDirectionRange, GetEmitParticlesMoveDirectionRange); // Emitting particle moving direction range in degrees property @RANGE(0, 360) @GROUP(\"Initial parameters\")\n\n    public:\n        // Default constructor\n        ParticlesEmitter();\n\n        // Copy-constructor\n        ParticlesEmitter(const ParticlesEmitter& other);\n\n        // Destructor\n        ~ParticlesEmitter();\n\n        // Copy-operator\n        ParticlesEmitter& operator=(const ParticlesEmitter& other);\n\n        // DRaws particles\n        void Draw() override;\n\n        // Updates particles\n        void Update(float dt);\n\n        // Starts playing\n        void Play();\n\n        // Stops playing\n        void Stop();\n\n        // Sets duration of emitter (emission duration + particles lifetime)\n        void SetDuration(float duration);\n\n        // Returns duration (emission duration + particles lifetime)\n        float GetDuration() const override;\n\n        // Sets time of emitter\n        void SetTime(float time) override;\n\n        // Sets particles source\n        void SetParticlesSource(const Ref<ParticleSource>& source);\n\n        // Returns particles source\n        const Ref<ParticleSource>& GetParticlesSource() const;\n\n        // Sets particles emitting coefficient (0...1)\n        void SetEmittingCoef(float coef);\n\n        // Returns particles emitting coefficient\n        float GetEmittingCoef() const;\n\n        // Sets emitting shape\n        void SetShape(const Ref<ParticlesEmitterShape>& shape);\n\n        // Return emitting shape\n        const Ref<ParticlesEmitterShape>& GetShape() const;\n\n        // Adds effect\n        void AddEffect(const Ref<ParticlesEffect>& effect);\n\n        // Adds effect\n        template<typename _type, typename ... _args>\n        void AddEffect(_args ... args);\n\n        // Returns list of effects\n        const Vector<Ref<ParticlesEffect>>& GetEffects() const;\n\n        // Removes effect\n        void RemoveEffect(const Ref<ParticlesEffect>& effect);\n\n        // Removes all effects\n        void RemoveAllEffects();\n\n        // Set particles limit number\n        void SetMaxParticles(int count);\n\n        // Returns particles limit number\n        int GetMaxParticles() const;\n\n        // Returns current particles count\n        int GetParticlesCount() const;\n\n        // Returns has alive particles\n        bool IsAliveParticles() const;\n\n        // Returns particles list\n        const Vector<Particle>& GetParticles() const;\n\n        // Sets particles relativity\n        void SetParticlesRelativity(bool relative);\n\n        // Is particles relative to emitter\n        bool IsParticlesRelative() const;\n\n        // Sets particles emit from shell\n        void SetParticlesEmitFromShell(bool fromShell);\n\n        // Is particles emit from shell\n        bool IsParticlesEmitFromShell() const;\n\n        // Sets emitting particles duration in seconds\n        void SetEmissionDuration(float duration);\n\n        // Returns emitting particles duration in seconds\n        float GetEmissionDuration() const;\n\n        // Sets particles lifetime in seconds\n        void SetParticlesLifetime(float lifetime);\n\n        // Returns particles lifetime in seconds\n        float GetParticlesLifetime() const;\n\n        // Sets number of particles emitting per second\n        void SetParticlesPerSecond(float numParticles);\n\n        // Returns number of particles emitting per second\n        float GetParticlesPerSecond() const;\n\n        // Sets emitting particles prewarm time\n        void SetPrewarmTime(float time);\n\n        // Returns emitting particles prewarm time\n        float GetPrewarmTime() const;\n\n        // Sets emitting particles rotation angle in degrees\n        void SetInitialAngle(float angle);\n\n        // Returns emitting particles rotation angle in degrees\n        float GetInitialAngle() const;\n\n        // Sets emitting particles rotation angle range in degrees\n        void SetInitialAngleRange(float range);\n\n        // Returns emitting particles rotation angle range in degrees\n        float GetInitialAngleRange() const;\n\n        // Sets emitting particles size\n        void SetInitialSize(float size);\n\n        // Returns emitting particles size\n        float GetInitialSize() const;\n\n        // Sets emitting particles size range\n        void SetInitialSizeRange(float range);\n\n        // Returns emitting particles size range\n        float GetInitialSizeRange() const;\n\n        // Sets emitting particles width scale\n        void SetInitialWidthScale(float scale);\n\n        // Returns emitting particles width scale\n        float GetInitialWidthScale() const;\n\n        // Sets emitting particles width scale range\n        void SetInitialWidthScaleRange(float scaleRange);\n\n        // Returns emitting particles width scale range\n        float GetInitialWidthScaleRange() const;\n\n        // Sets emitting particles angle speed in degrees/sec\n        void SetInitialAngleSpeed(float speed);\n\n        // Returns emitting particles angle speed in degrees/sec\n        float GetInitialAngleSpeed() const;\n\n        // Sets emitting particles angle speed range in degrees/sec\n        void SetInitialAngleSpeedRange(float speedRange);\n\n        // Returns emitting particles angle speed range in degrees/sec\n        float GetInitialAngleSpeedRange() const;\n\n        // Sets emitting particles speed\n        void SetInitialSpeed(float speed);\n\n        // Returns emitting particles speed\n        float GetInitialSpeed() const;\n\n        // Sets emitting particles speed range\n        void SetInitialSpeedRange(float speedRange);\n\n        // Returns emitting particles speed range\n        float GetInitialSpeedRange() const;\n\n        // Sets emitting particles moving direction angle in degrees\n        void SetEmitParticlesMoveDirection(float direction);\n\n        // Returns emitting particles moving direction angle in degrees\n        float GetEmitParticlesMoveDirection() const;\n\n        // Sets emitting particles moving direction angle range in degrees\n        void SetEmitParticlesMoveDirectionRange(float directionRange);\n\n        // Returns emitting particles moving direction angle range in degrees\n        float GetEmitParticlesMoveDirectionRange() const;\n\n        // Dynamic cast to RefCounterable via IAnimation\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<ParticlesEmitter>& ref);\n\n        SERIALIZABLE(ParticlesEmitter);\n        CLONEABLE_REF(ParticlesEmitter);\n\n        REF_COUNTERABLE_IMPL(IRectDrawable, IAnimation);\n\n    protected:\n        Ref<ParticleSource> mParticlesSource = mmake<SingleSpriteParticleSource>(); // Source of particles @SERIALIZABLE \n\n        Ref<ParticlesContainer> mParticlesContainer; // Particles container, stores and updates particles, created from particles source\n\n        Ref<ParticlesEmitterShape> mShape = nullptr; // Particles emitting shape @SERIALIZABLE \n\n        bool mEmitParticlesFromShell = false; // Emitting particles from shell of shape @SERIALIZABLE\n\n        Vector<Ref<ParticlesEffect>> mEffects; // Particles effect @SERIALIZABLE @EDITOR_PROPERTY @EXPANDED_BY_DEFAULT @DONT_DELETE @INVOKE_ON_CHANGED(OnEffectsListChanged)\n                                                                         \n        int mParticlesNumLimit = 100; // Max available visible particles @SERIALIZABLE\n                                       \n        float mEmittingCoefficient = 1.0f; // Emitting particles number coefficient (0...1) @SERIALIZABLE\n        bool  mIsParticlesRelative = true; // Is particles relative to emitter or global @SERIALIZABLE\n\n        float mEmissionDuration = 0.1f; // Emission duration in seconds @SERIALIZABLE\n                                                                  \n        float mParticlesLifetime = 0.5f;      // Particles lifetime in seconds @SERIALIZABLE\n        float mParticlesLifetimeRange = 0.0f; // Particles lifetime range in seconds @SERIALIZABLE\n        float mEmitParticlesPerSecond = 10;   // Number of particles emitting in one second @SERIALIZABLE\n\n        float mPrewarmTime = 0.0f;    // Particles prewarm time (updates particles before start) @SERIALIZABLE\n        float mPrewarmTimeout = 0.0f; // Particles prewarm timeout. Starts from prewarm time and decreases to 0\n                                                          \n        float mInitialAngle = 0;          // Emitting particles angle in degrees @SERIALIZABLE\n        float mInitialAngleRange = 45.0f; // Emitting particles angle in degrees randomize range @SERIALIZABLE\n                                                        \n        float mInitialSize = 1.0f;      // Emitting particles size @SERIALIZABLE\n        float mInitialSizeRange = 0.3f; // Emitting particles size randomize range @SERIALIZABLE\n\n        float mInitialWidthScale = 1.0f;  // Emitting particles width scale @SERIALIZABLE\n        float mInitialWidthScaleRange = 0; // Emitting particles width scale randomize range @SERIALIZABLE\n                                                        \n        float mInitialSpeed = 10;      // Emitting particles speed @SERIALIZABLE\n        float mInitialSpeedRangle = 5; // Emitting particles speed range @SERIALIZABLE\n                                                        \n        float mInitialMoveDirection = 0;          // Emitting particles direction in degrees @SERIALIZABLE\n        float mInitialMoveDirectionRange = 45.0f; // Emitting particles direction range in degrees @SERIALIZABLE\n              \n        float mInitialAngleSpeed = 0;      // Emitting particles angle speed in degrees/sec\n        float mInitialAngleSpeedRange = 0; // Emitting particles angle speed range in degrees/sec\n\n        float            mEmitTimeBuffer = 0;    // Emitting next particle time buffer\n        Vector<Particle> mParticles;             // Working particles\n        Vector<int>      mDeadParticles;         // Dead particles indexes\n        int              mNumAliveParticles = 0; // Count of current alive particles\n        Basis            mLastTransform;         // Last transformation\n\n    protected:\n        // Called when blend mode was changed\n        void OnMaterialChanged() override;\n\n        // Beginning serialization callback\n        void OnSerialize(DataValue& node) const override;\n\n        // Completion deserialization callback, initializes particles container\n        void OnDeserialized(const DataValue& node) override;\n\n        // Beginning serialization delta callback\n        void OnSerializeDelta(DataValue& node, const IObject& origin) const override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n\t\t// Recalculates particles duration from emission duration and particles lifetime\n        void UpdateDuration();\n\n        // Checks is particles container initialized\n        void CreateParticlesContainer();\n\n        // Emits particles hen updating\n        void UpdateEmitting(float dt);\n\n        // Applies and updates particles effects\n        void UpdateEffects(float dt);\n\n        // Updates particles\n        void UpdateParticles(float dt);\n        \n        // Called when basis was changed, updates particles positions from last transform\n        void BasisChanged() override;\n\n        // Called when effects list changed, updates emitter reference in effects\n        void OnEffectsListChanged();\n\n        // Called when something changed, invalidates baked frames when particles paused\n        void OnChanged();\n\n        friend class ParticlesEffect;\n        friend class ParticlesEmitterShape;\n\n#if IS_EDITOR\n    public:\n        // Sets particles pause for editor\n        void SetParticlesPause(bool paused);\n\n    protected:\n        struct BakedFrame\n        {\n            Vector<Particle> particles;             // Baked particles frame\n            Vector<int>      deadParticles;         // Dead particles indexes\n            int              numAliveParticles = 0; // Count of current alive particles\n            float            emitTimeBuffer = 0;    // Emitting next particle time buffer\n\n            bool operator==(const BakedFrame& other) const { return false; }\n        };\n\n    protected:\n        static int mBakedFPS; // Baked particles frames per second\n\n        Vector<BakedFrame> mBakedFrames; // Baked particles frames for editor\n\n        size_t mRandomSeed = 0; // Random seed for particles emitting\n\n        bool mIsUpdating = false;      // Is updating particles now. Used to detect separated Evaluate calls when time changed\n        bool mParticlesPaused = false; // Is particles paused for editor\n\n    protected:\n        // Invalidates baked frames\n        void InvalidateBakedFrames();\n\n        // Called when updated or time changed, updates baked particles for editor\n        void Evaluate() override;\n\n        // Returns baked frame index by time\n        int GetBakedFrameIndex(float time) const;\n\n        // Checks that baked enough frames\n        void CheckBakedFrames(int maxFrameIdx);\n\n        // Restores baked frame by index\n        void RestoreBakedFrame(int frameIdx);\n#endif\n    };\n\n    template<typename _type, typename ... _args>\n    void ParticlesEmitter::AddEffect(_args ... args)\n    {\n        AddEffect(mmake<_type>(args ...));\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ParticlesEmitter)\n{\n    BASE_CLASS(o2::IRectDrawable);\n    BASE_CLASS(o2::IAnimation);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesEmitter)\n{\n    FIELD().PUBLIC().RANGE_ATTRIBUTE(0, 5).NAME(duration);\n    FIELD().PUBLIC().DEFAULT_TYPE_ATTRIBUTE(o2::SingleSpriteParticleSource).DONT_DELETE_ATTRIBUTE().EXPANDED_BY_DEFAULT_ATTRIBUTE().GROUP_ATTRIBUTE(\"Emission\").NAME(particlesSource);\n    FIELD().PUBLIC().DEFAULT_TYPE_ATTRIBUTE(o2::CircleParticlesEmitterShape).DONT_DELETE_ATTRIBUTE().EXPANDED_BY_DEFAULT_ATTRIBUTE().GROUP_ATTRIBUTE(\"Emission\").NAME(shape);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Emission\").NAME(emitFromShell);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Emission\").RANGE_ATTRIBUTE(0, 100).NAME(particlesPerSecond);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Emission\").NAME(maxParticles);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Emission\").RANGE_ATTRIBUTE(0, 10).NAME(emissionDuration);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Emission\").RANGE_ATTRIBUTE(0, 10).NAME(particlesLifetime);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Emission\").NAME(particlesRelative);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Emission\").RANGE_ATTRIBUTE(0, 1).NAME(emittingCoefficient);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Emission\").RANGE_ATTRIBUTE(0, 1).NAME(prewarmTime);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Angle\").RANGE_ATTRIBUTE(0, 360).NAME(initialAngle);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Angle range\").RANGE_ATTRIBUTE(0, 360).NAME(initialAngleRange);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Size\").RANGE_ATTRIBUTE(0, 3).NAME(initialSize);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Size range\").RANGE_ATTRIBUTE(0, 2).NAME(initialSizeRange);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Width scale\").RANGE_ATTRIBUTE(0, 3).NAME(initialWidthScale);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Width scale range\").RANGE_ATTRIBUTE(0, 2).NAME(initialWidthScaleRange);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Speed\").RANGE_ATTRIBUTE(0, 360).NAME(initialSpeed);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Speed range\").RANGE_ATTRIBUTE(0, 360).NAME(initialSpeedRange);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Angle speed\").RANGE_ATTRIBUTE(0, 720).NAME(initialAngleSpeed);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").NAME_ATTRIBUTE(\"Angle speed range\").RANGE_ATTRIBUTE(0, 720).NAME(initialAngleSpeedRange);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").RANGE_ATTRIBUTE(0, 360).NAME(moveDirection);\n    FIELD().PUBLIC().GROUP_ATTRIBUTE(\"Initial parameters\").RANGE_ATTRIBUTE(0, 360).NAME(moveDirectionRange);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(mmake<SingleSpriteParticleSource>()).NAME(mParticlesSource);\n    FIELD().PROTECTED().NAME(mParticlesContainer);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(nullptr).NAME(mShape);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mEmitParticlesFromShell);\n    FIELD().PROTECTED().DONT_DELETE_ATTRIBUTE().EDITOR_PROPERTY_ATTRIBUTE().EXPANDED_BY_DEFAULT_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mEffects);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(100).NAME(mParticlesNumLimit);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mEmittingCoefficient);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mIsParticlesRelative);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.1f).NAME(mEmissionDuration);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.5f).NAME(mParticlesLifetime);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mParticlesLifetimeRange);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(10).NAME(mEmitParticlesPerSecond);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mPrewarmTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mPrewarmTimeout);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(mInitialAngle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(45.0f).NAME(mInitialAngleRange);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mInitialSize);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.3f).NAME(mInitialSizeRange);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mInitialWidthScale);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(mInitialWidthScaleRange);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(10).NAME(mInitialSpeed);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(5).NAME(mInitialSpeedRangle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(mInitialMoveDirection);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(45.0f).NAME(mInitialMoveDirectionRange);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mInitialAngleSpeed);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mInitialAngleSpeedRange);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mEmitTimeBuffer);\n    FIELD().PROTECTED().NAME(mParticles);\n    FIELD().PROTECTED().NAME(mDeadParticles);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mNumAliveParticles);\n    FIELD().PROTECTED().NAME(mLastTransform);\n#if  IS_EDITOR\n    FIELD().PROTECTED().NAME(mBakedFrames);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mRandomSeed);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsUpdating);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mParticlesPaused);\n#endif\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesEmitter)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ParticlesEmitter&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Play);\n    FUNCTION().PUBLIC().SIGNATURE(void, Stop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDuration, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTime, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParticlesSource, const Ref<ParticleSource>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ParticleSource>&, GetParticlesSource);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEmittingCoef, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetEmittingCoef);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetShape, const Ref<ParticlesEmitterShape>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ParticlesEmitterShape>&, GetShape);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEffect, const Ref<ParticlesEffect>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<ParticlesEffect>>&, GetEffects);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveEffect, const Ref<ParticlesEffect>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllEffects);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxParticles, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetMaxParticles);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetParticlesCount);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsAliveParticles);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Particle>&, GetParticles);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParticlesRelativity, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsParticlesRelative);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParticlesEmitFromShell, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsParticlesEmitFromShell);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEmissionDuration, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetEmissionDuration);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParticlesLifetime, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetParticlesLifetime);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParticlesPerSecond, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetParticlesPerSecond);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPrewarmTime, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetPrewarmTime);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialAngle, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialAngle);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialAngleRange, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialAngleRange);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialSize, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialSizeRange, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialSizeRange);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialWidthScale, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialWidthScale);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialWidthScaleRange, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialWidthScaleRange);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialAngleSpeed, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialAngleSpeed);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialAngleSpeedRange, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialAngleSpeedRange);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialSpeed, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialSpeed);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInitialSpeedRange, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInitialSpeedRange);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEmitParticlesMoveDirection, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetEmitParticlesMoveDirection);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEmitParticlesMoveDirectionRange, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetEmitParticlesMoveDirectionRange);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<ParticlesEmitter>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMaterialChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerializeDelta, DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateDuration);\n    FUNCTION().PROTECTED().SIGNATURE(void, CreateParticlesContainer);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateEmitting, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateEffects, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateParticles, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, BasisChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEffectsListChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChanged);\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(void, SetParticlesPause, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, InvalidateBakedFrames);\n    FUNCTION().PROTECTED().SIGNATURE(void, Evaluate);\n    FUNCTION().PROTECTED().SIGNATURE(int, GetBakedFrameIndex, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckBakedFrames, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, RestoreBakedFrame, int);\n#endif\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Particles/ParticlesEmitterShapes.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ParticlesEmitterShapes.h\"\n\n#include \"o2/Render/Particles/ParticlesEmitter.h\"\n\nnamespace o2\n{\n    Vec2F ParticlesEmitterShape::GetEmittinPoint(const Basis& transform, bool fromShell)\n    {\n        return Vec2F();\n    }\n\n    void ParticlesEmitterShape::OnChanged()\n    {\n#if IS_EDITOR\n        if (mEmitter)\n            mEmitter.Lock()->InvalidateBakedFrames();\n#endif\n    }\n\n    Vec2F CircleParticlesEmitterShape::GetEmittinPoint(const Basis& transform, bool fromShell)\n    {\n        if (fromShell)\n        {\n            Vec2F localPoint = Vec2F::Rotated(Math::Random(0.0f, Math::PI()*2.0f))*0.5f + Vec2F(0.5f, 0.5f);\n            return localPoint*transform;\n        }\n        else\n        {\n            Vec2F localPoint = Vec2F::Rotated(Math::Random(0.0f, Math::PI()*2.0f))*Math::Random(0.0f, 0.5f) + Vec2F(0.5f, 0.5f);\n            return localPoint*transform;\n        }\n    }\n\n    Vec2F SquareParticlesEmitterShape::GetEmittinPoint(const Basis& transform, bool fromShell)\n    {\n        if (fromShell)\n        {\n            Vec2F localPoint = Vec2F(Math::Random(0.0f, 1.0f), Math::Random(0.0f, 1.0f));\n\n            if (Math::Random(0, 100) > 50)\n                localPoint.x = Math::Round(localPoint.x);\n            else\n                localPoint.y = Math::Round(localPoint.y);\n\n            return localPoint*transform;\n        }\n        else\n        {\n            Vec2F localPoint = Vec2F(Math::Random(0.0f, 1.0f), Math::Random(0.0f, 1.0f));\n            return localPoint*transform;\n        }\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ParticlesEmitterShape, o2__ParticlesEmitterShape);\n\nDECLARE_CLASS(o2::CircleParticlesEmitterShape, o2__CircleParticlesEmitterShape);\n\nDECLARE_CLASS(o2::SquareParticlesEmitterShape, o2__SquareParticlesEmitterShape);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Particles/ParticlesEmitterShapes.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    class ParticlesEmitter;\n\n    // --------------------------------------\n    // Particles emitter shape base interface\n    // --------------------------------------\n    class ParticlesEmitterShape: public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n        // Virtual destructor\n        virtual ~ParticlesEmitterShape() {}\n\n        // Returns random emitting point in shape\n        virtual Vec2F GetEmittinPoint(const Basis& transform, bool fromShell);\n\n        SERIALIZABLE(ParticlesEmitterShape);\n\n    protected:\n        WeakRef<ParticlesEmitter> mEmitter; // Owning emitter\n\n    protected:\n        // Called  when particle effect parameters are changed, used to invalidate baked frames\n        void OnChanged();\n\n        friend class ParticlesEmitter;\n    };\n\n    // ---------------------------------\n    // Circle with radius emitting shape\n    // ---------------------------------\n    class CircleParticlesEmitterShape: public ParticlesEmitterShape\n    {\n    public:\n        // Returns random emitting point in circle\n        Vec2F GetEmittinPoint(const Basis& transform, bool fromShell) override;\n\n        SERIALIZABLE(CircleParticlesEmitterShape);\n        CLONEABLE_REF(CircleParticlesEmitterShape);\n    };\n\n    // ---------------------------------\n    // Square with radius emitting shape\n    // ---------------------------------\n    class SquareParticlesEmitterShape: public ParticlesEmitterShape\n    {\n    public:\n        // Returns random emitting point in square\n        Vec2F GetEmittinPoint(const Basis& transform, bool fromShell) override;\n\n        SERIALIZABLE(SquareParticlesEmitterShape);\n        CLONEABLE_REF(SquareParticlesEmitterShape);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ParticlesEmitterShape)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesEmitterShape)\n{\n    FIELD().PROTECTED().NAME(mEmitter);\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesEmitterShape)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetEmittinPoint, const Basis&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChanged);\n}\nEND_META;\n\nCLASS_BASES_META(o2::CircleParticlesEmitterShape)\n{\n    BASE_CLASS(o2::ParticlesEmitterShape);\n}\nEND_META;\nCLASS_FIELDS_META(o2::CircleParticlesEmitterShape)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::CircleParticlesEmitterShape)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetEmittinPoint, const Basis&, bool);\n}\nEND_META;\n\nCLASS_BASES_META(o2::SquareParticlesEmitterShape)\n{\n    BASE_CLASS(o2::ParticlesEmitterShape);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SquareParticlesEmitterShape)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::SquareParticlesEmitterShape)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetEmittinPoint, const Basis&, bool);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Render.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"o2/Render/Render.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/AtlasAsset.h\"\n#include \"o2/Assets/Types/MaterialAsset.h\"\n#include \"o2/Assets/Types/ShaderAsset.h\"\n#include \"o2/Integration.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/Math/Geometry.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n\nnamespace o2\n{\n\tDECLARE_SINGLETON(Render);\n\n\tFORWARD_REF_IMPL(AtlasAsset);\n\n\tRender::Render(RefCounter* refCounter):\n\t\tSingleton<Render>(refCounter)\n\t{\n\t\tmLog = mmake<LogStream>(\"Render\");\n\t\to2Debug.GetLog()->BindStream(mLog);\n\n\t\tInitializePlatform();\n\n\t\tmResolution = o2Integration.GetContentSize();\n\t\tmMaxTextureSize = GetPlatformMaxTextureSize();\n\t\tmDPI = GetPlatformDPI();\n\n\t\tInitializeDefaultMaterial();\n\t\tInitializeWhiteTexture();\n\t\tInitializeFreeType();\n\t\tInitializeLinesIndexBuffer();\n\t\tInitializeLinesTextures();\n\n\t\tif (IsDevMode())\n\t\t\to2Assets.onAssetsRebuilt += MakeFunction(this, &Render::OnAssetsRebuilt);\n\n#if IS_EDITOR\n\t\to2Application.onActivated += MakeFunction(this, &Render::ReloadAssetsOnActivation);\n#endif\n\n\t\tmReady = true;\n\t}\n\n\tRender::~Render()\n\t{\n\t\tif (!mReady)\n\t\t\treturn;\n\n\t\tmSolidLineTexture = nullptr;\n\t\tmDashLineTexture = nullptr;\n\n\t\tmCurrentMaterial = nullptr;\n\t\tmDefaultMaterial = nullptr;\n\n\t\tDeinitializePlatform();\n\n\t\tauto fontsToDelete = mFonts;\n\t\tmFonts.Clear();\n\t\tfontsToDelete.Clear();\n\n\t\tauto texturesToDelete = mTextures;\n\t\tmTextures.Clear();\n\t\ttexturesToDelete.Clear();\n\n\t\tDeinitializeFreeType();\n\n\t\tmReady = false;\n\t}\n\n\tvoid Render::InitializeWhiteTexture()\n\t{\n\t\tBitmap whiteBitmap(PixelFormat::R8G8B8A8, Vec2I(16, 16));\n\t\twhiteBitmap.Fill(Color4::White());\n\t\tmWhiteTexture = TextureRef(whiteBitmap);\n\t}\n\n\tvoid Render::InitializeLinesTextures()\n\t{\n\t\tmSolidLineTexture = TextureRef::Null();\n\n\t\tBitmap bitmap(PixelFormat::R8G8B8A8, Vec2I(32, 32));\n\t\tbitmap.Fill(Color4(255, 255, 255, 255));\n\t\tbitmap.FillRect(0, 32, 16, 0, Color4(255, 255, 255, 0));\n\t\tmDashLineTexture = mmake<Texture>(bitmap);\n\t}\n\n\tvoid Render::InitializeLinesIndexBuffer()\n\t{\n\t\tmHardLinesIndexData = mnew VertexIndex[USHRT_MAX];\n\n\t\tfor (UInt i = 0; i < USHRT_MAX / 2; i++)\n\t\t{\n\t\t\tmHardLinesIndexData[i * 2] = i;\n\t\t\tmHardLinesIndexData[i * 2 + 1] = i + 1;\n\t\t}\n\t}\n\n\tvoid Render::InitializeFreeType()\n\t{\n\t\tFT_Error error = FT_Init_FreeType(&mFreeTypeLib);\n\t\tif (error)\n\t\t\tmLog->Out(\"Failed to initialize FreeType: %i\", error);\n\t}\n\n\tvoid Render::DeinitializeFreeType()\n\t{\n\t\tFT_Done_FreeType(mFreeTypeLib);\n\t}\n\n\tvoid Render::InitializeDefaultMaterial()\n\t{\n\t\tPlatformInitializeDefaultMaterial();\n\t}\n\n\tvoid Render::Begin()\n\t{\n\t\tPROFILE_SAMPLE_FUNC();\n\n\t\tif (!mReady)\n\t\t\treturn;\n\n\t\tmCurrentDrawTexture = nullptr;\n\t\tmLastDrawVertex = 0;\n\t\tmLastDrawIdx = 0;\n\t\tmTrianglesCount = 0;\n\t\tmFrameTrianglesCount = 0;\n\t\tmDrawCallsCount = 0;\n\t\tmCurrentPrimitiveType = PrimitiveType::Polygon;\n\t\tmCurrentBatchVertexType = Vertex::Type();\n\t\tmDrawingDepth = 0.0f;\n\t\tmClippingEverything = false;\n\n\t\tmScissorInfos.Clear();\n\t\tmStackScissors.Clear();\n\n\t\tBindMaterial(mDefaultMaterial);\n\n\t\tPlatformBegin();\n\t\tSetupViewMatrix(mResolution);\n\t\tUpdateCameraTransforms();\n\n\t\tpreRender();\n\n\t\tif (IsRenderDrawCallsDebugEnabled())\n\t\t\tmLog->OutStr(\"==== New Frame ====\");\n\t}\n\n\tvoid Render::DrawBuffer(PrimitiveType primitiveType, const Vertex* vertices, UInt verticesCount,\n\t\t\t\t\t\t\tVertexIndex* indexes, UInt elementsCount,\n\t\t\t\t\t\t\tconst Ref<Material>& material, const TextureRef& overrideTexture, const RectI& texSrcRect /*= RectI()*/,\n\t\t\t\t\t\t\tbool allowVertexConversion /*= false*/)\n\t{\n\t\tDrawBuffer(primitiveType, reinterpret_cast<const UInt8*>(vertices), verticesCount,\n\t\t\t\t   Vertex::Type(), indexes, elementsCount, material, overrideTexture,\n\t\t\t\t   texSrcRect, allowVertexConversion);\n\t}\n\n\tvoid Render::DrawBuffer(PrimitiveType primitiveType, const UInt8* vertices, UInt verticesCount, const VertexType& vertexType,\n\t\t\t\t\t\t\tVertexIndex* indexes, UInt elementsCount,\n\t\t\t\t\t\t\tconst Ref<Material>& material, const TextureRef& overrideTexture, const RectI& texSrcRect /*= RectI()*/,\n\t\t\t\t\t\t\tbool allowVertexConversion /*= false*/)\n\t{\n\t\tif (!mReady)\n\t\t\treturn;\n\n\t\tmDrawingDepth += 1.0f;\n\n\t\tif (mClippingEverything)\n\t\t\treturn;\n\n\t\tUInt indexesCount;\n\t\tif (primitiveType == PrimitiveType::Line)\n\t\t\tindexesCount = elementsCount * 2;\n\t\telse\n\t\t\tindexesCount = elementsCount * 3;\n\n\t\tRef<Material> drawMaterial = material ? material : mDefaultMaterial;\n\t\tif (!drawMaterial)\n\t\t{\n\t\t\tmLog->Error(\"DrawBuffer skipped: no material is available for the current draw call\");\n\t\t\treturn;\n\t\t}\n\n\t\tTextureRef texture = overrideTexture ? overrideTexture : drawMaterial->GetTexture();\n\n\t\t// Determine batch vertex type: expand with extra texcoords if material needs them\n\t\tVertexType batchVertexType = PlatformResolveBatchVertexType(vertexType, drawMaterial);\n\n\t\tif (CheckBatchBreak(texture, primitiveType, drawMaterial, batchVertexType, verticesCount, indexesCount))\n\t\t{\n\t\t\tDrawPrimitives();\n\n\t\t\tmCurrentDrawTexture = texture;\n\t\t\tmCurrentPrimitiveType = primitiveType;\n\t\t\tmCurrentBatchVertexType = batchVertexType;\n\n\t\t\tBindMaterial(drawMaterial);\n\t\t}\n\n\t\tUploadBuffers(vertices, verticesCount, vertexType, indexes, indexesCount, texSrcRect, texture, allowVertexConversion);\n\n\t\tmLastDrawVertex += verticesCount;\n\t\tmLastDrawIdx += indexesCount;\n\n\t\tif (primitiveType != PrimitiveType::Line)\n\t\t\tmTrianglesCount += elementsCount;\n\t}\n\n\tbool Render::CheckBatchBreak(const TextureRef& texture, PrimitiveType primitiveType,\n\t\t\t\t\t\t\t\t const Ref<Material>& material, const VertexType& batchVertexType,\n\t\t\t\t\t\t\t\t UInt verticesCount, UInt indexesCount) const\n\t{\n\t\tsize_t materialHash = material ? material->GetHash() : 0;\n\t\tsize_t currentBatchMaterialHash = mCurrentMaterial ? mCurrentMaterial->GetHash() : 0;\n\n\t\tsize_t batchStride = batchVertexType.GetStride();\n\t\tUInt effectiveVertexCapacity = (UInt)(mVertexBufferByteSize / batchStride);\n\n\t\treturn mCurrentDrawTexture != texture ||\n\t\t\tmCurrentPrimitiveType != primitiveType ||\n\t\t\tmCurrentBatchVertexType != batchVertexType ||\n\t\t\tcurrentBatchMaterialHash != materialHash ||\n\t\t\tmLastDrawVertex + verticesCount >= effectiveVertexCapacity ||\n\t\t\tmLastDrawIdx + indexesCount >= mIndexBufferSize;\n\t}\n\n\tVertexType Render::ResolveBatchVertexTypeByMaterial(const VertexType& sourceVertexType,\n\t\t\t\t\t\t\t\t\t\t\t const Ref<Material>& material) const\n\t{\n\t\tVertexType batchVertexType = sourceVertexType;\n\n\t\tint materialTexChannels = material ? material->GetTotalTextureChannelsCount() : 1;\n\t\tif (materialTexChannels > 1 && !batchVertexType.HasParam(VertexParam::TexCoord1))\n\t\t\tbatchVertexType = Vertex2Tex::Type();\n\n\t\tif (materialTexChannels > 2 && !batchVertexType.HasParam(VertexParam::TexCoord2))\n\t\t\tbatchVertexType = Vertex3Tex::Type();\n\n\t\treturn batchVertexType;\n\t}\n\n\tvoid Render::UploadBuffers(const UInt8* vertices, UInt verticesCount, const VertexType& srcVertexType,\n\t\t\t\t\t\t\t   VertexIndex* indexes, UInt indexesCount, const RectI& texSrcRect,\n\t\t\t\t\t\t\t   const TextureRef& texture, bool allowVertexConversion)\n\t{\n\t\tsize_t srcStride = srcVertexType.GetStride();\n\t\tsize_t dstStride = mCurrentBatchVertexType.GetStride();\n\t\tbool needsUVRemap = (texSrcRect != RectI()) && texture;\n\n\t\tint materialTexChannels = mCurrentMaterial ? mCurrentMaterial->GetTotalTextureChannelsCount() : 1;\n\t\tint srcTexCoords = srcVertexType.GetTexCoordsCount();\n\t\tbool needsConversion = srcTexCoords < materialTexChannels;\n\n\t\tif (needsConversion)\n\t\t{\n\t\t\tAssert(allowVertexConversion, \"Vertex type has fewer texcoord sets than material requires, and conversion is not allowed\");\n\t\t}\n\n\t\tif (srcVertexType == mCurrentBatchVertexType && !needsUVRemap)\n\t\t{\n\t\t\tmemcpy(&mVertexData[mLastDrawVertex * dstStride], vertices, srcStride * verticesCount);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbool srcHasUV = srcVertexType.HasParam(VertexParam::TexCoord0);\n\t\t\tsize_t srcUVOffset = srcHasUV ? srcVertexType.GetParamOffset(VertexParam::TexCoord0) : 0;\n\n\t\t\tVec2F primaryInvTexSize(1.0f, 1.0f);\n\t\t\tif (texture)\n\t\t\t{\n\t\t\t\tVec2F texSize = texture->GetSize();\n\t\t\t\tprimaryInvTexSize.Set(1.0f / texSize.x, 1.0f / texSize.y);\n\t\t\t}\n\n\t\t\tstatic const Vector<TextureSampler> emptySamplers;\n\t\t\tconst auto& samplers = mCurrentMaterial ? mCurrentMaterial->GetTextureSamplers() : emptySamplers;\n\n\t\t\tUInt8* dst = &mVertexData[mLastDrawVertex * dstStride];\n\n\t\t\tfor (UInt i = 0; i < verticesCount; i++)\n\t\t\t{\n\t\t\t\tconst UInt8* srcVtx = vertices + i * srcStride;\n\t\t\t\tUInt8* dstVtx = dst + i * dstStride;\n\n\t\t\t\tif (mCurrentBatchVertexType.HasParam(VertexParam::Position) && srcVertexType.HasParam(VertexParam::Position))\n\t\t\t\t{\n\t\t\t\t\tmemcpy(dstVtx + mCurrentBatchVertexType.GetParamOffset(VertexParam::Position),\n\t\t\t\t\t\t   srcVtx + srcVertexType.GetParamOffset(VertexParam::Position),\n\t\t\t\t\t\t   VertexParam::ParamSize(VertexParam::Position));\n\t\t\t\t}\n\n\t\t\t\tif (mCurrentBatchVertexType.HasParam(VertexParam::Color) && srcVertexType.HasParam(VertexParam::Color))\n\t\t\t\t{\n\t\t\t\t\tmemcpy(dstVtx + mCurrentBatchVertexType.GetParamOffset(VertexParam::Color),\n\t\t\t\t\t\t   srcVtx + srcVertexType.GetParamOffset(VertexParam::Color),\n\t\t\t\t\t\t   VertexParam::ParamSize(VertexParam::Color));\n\t\t\t\t}\n\n\t\t\t\tfloat srcU = 0.0f, srcV = 0.0f;\n\t\t\t\tif (srcHasUV)\n\t\t\t\t{\n\t\t\t\t\tsrcU = *(const float*)(srcVtx + srcUVOffset);\n\t\t\t\t\tsrcV = *(const float*)(srcVtx + srcUVOffset + sizeof(float));\n\t\t\t\t}\n\n\t\t\t\t// TexCoord0: remap through primary texture srcRect\n\t\t\t\tif (mCurrentBatchVertexType.HasParam(VertexParam::TexCoord0))\n\t\t\t\t{\n\t\t\t\t\tfloat* dstUV = (float*)(dstVtx + mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0));\n\t\t\t\t\tif (needsUVRemap)\n\t\t\t\t\t\tRemapUV(srcU, srcV, texSrcRect, primaryInvTexSize, dstUV[0], dstUV[1]);\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdstUV[0] = srcU;\n\t\t\t\t\t\tdstUV[1] = srcV;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// TexCoord1, TexCoord2: remap through additional sampler srcRects\n\t\t\t\tconst UInt texCoordParams[] = { VertexParam::TexCoord1, VertexParam::TexCoord2 };\n\t\t\t\tfor (int s = 0; s < samplers.Count() && s < 2; s++)\n\t\t\t\t{\n\t\t\t\t\tif (!mCurrentBatchVertexType.HasParam(texCoordParams[s]))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tfloat* dstUV = (float*)(dstVtx + mCurrentBatchVertexType.GetParamOffset(texCoordParams[s]));\n\n\t\t\t\t\tRectI samplerSrcRect = samplers[s].GetSrcRect();\n\t\t\t\t\tif (samplerSrcRect != RectI())\n\t\t\t\t\t{\n\t\t\t\t\t\tTextureRef samplerTex = samplers[s].GetTexture();\n\t\t\t\t\t\tVec2F samplerInvTexSize(1.0f, 1.0f);\n\t\t\t\t\t\tif (samplerTex)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tVec2F sz = samplerTex->GetSize();\n\t\t\t\t\t\t\tsamplerInvTexSize.Set(1.0f / sz.x, 1.0f / sz.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tRemapUV(srcU, srcV, samplerSrcRect, samplerInvTexSize, dstUV[0], dstUV[1]);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdstUV[0] = srcU;\n\t\t\t\t\t\tdstUV[1] = srcV;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (mCurrentBatchVertexType.HasParam(VertexParam::Normal) && srcVertexType.HasParam(VertexParam::Normal))\n\t\t\t\t{\n\t\t\t\t\tmemcpy(dstVtx + mCurrentBatchVertexType.GetParamOffset(VertexParam::Normal),\n\t\t\t\t\t\t   srcVtx + srcVertexType.GetParamOffset(VertexParam::Normal),\n\t\t\t\t\t\t   VertexParam::ParamSize(VertexParam::Normal));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (UInt i = mLastDrawIdx, j = 0; j < indexesCount; i++, j++)\n\t\t\tmVertexIndexData[i] = mVertexBufferIdx + mLastDrawVertex + indexes[j];\n\t}\n\n\tvoid Render::RemapUV(float srcU, float srcV, const RectI& srcRect,\n\t\t\t\t\t\t const Vec2F& invTexSize, float& outU, float& outV)\n\t{\n\t\tfloat u0 = srcRect.left * invTexSize.x;\n\t\tfloat v0 = srcRect.top * invTexSize.y;\n\t\tfloat u1 = srcRect.right * invTexSize.x;\n\t\tfloat v1 = srcRect.bottom * invTexSize.y;\n\n\t\toutU = u0 + srcU * (u1 - u0);\n\t\toutV = 1.0f - (v1 - srcV * (v1 - v0));\n\t}\n\n\tvoid Render::DrawPrimitives()\n\t{\n\t\tPROFILE_SAMPLE_FUNC();\n\n\t\tif (mLastDrawVertex < 1)\n\t\t\treturn;\n\n\t\tCheckVertexBufferTexCoordFlipByTextureFormat();\n\n\t\tPlatformDrawPrimitives();\n\n\t\tmFrameTrianglesCount += mTrianglesCount;\n\t\tmLastDrawVertex = mTrianglesCount = mLastDrawIdx = 0;\n\n\t\tmDrawCallsCount++;\n\n\t\tif (IsRenderDrawCallsDebugEnabled())\n\t\t\tmLog->OutStr(\"#DC \" + (String)mDrawCallsCount + \"; with texture\\\"\" + mCurrentDrawTexture->GetFileName() + \"\\\"\");\n\t}\n\n\tvoid Render::CheckVertexBufferTexCoordFlipByTextureFormat()\n\t{\n\t\tPROFILE_SAMPLE_FUNC();\n\n\t\tstatic const Vector<TextureFormat> flipFormats = { TextureFormat::DXT5 };\n\n\t\tif (mCurrentDrawTexture && flipFormats.Contains(mCurrentDrawTexture->GetFormat()))\n\t\t\tPlatformFlipVerticesUV();\n\t}\n\n\tvoid Render::SetupViewMatrix(const Vec2I& viewSize)\n\t{\n\t\tmCurrentResolution = viewSize;\n\t\tUpdateCameraTransforms();\n\t}\n\n\tvoid Render::End()\n\t{\n\t\tPROFILE_SAMPLE_FUNC();\n\n\t\tif (!mReady)\n\t\t\treturn;\n\n\t\tpostRender();\n\t\tpostRender.Clear();\n\n\t\tDrawPrimitives();\n\n\t\tPlatformEnd();\n\n\t\tCheckTexturesUnloading();\n\t\tCheckFontsUnloading();\n\t}\n\n\tvoid Render::BindMaterial(const Ref<Material>& material)\n\t{\n\t\tif (!material)\n\t\t\treturn;\n\n\t\tif (!material->IsReady())\n\t\t\tmaterial->Build();\n\n\t\tif (!material->IsReady())\n\t\t\treturn;\n\n\t\tif (material == mCurrentMaterial)\n\t\t\treturn;\n\n\t\tmCurrentMaterial = material;\n\n\t\tPlatformBindMaterial(material);\n\t}\n\n\tconst Ref<Material>& Render::GetCurrentMaterial() const\n\t{\n\t\treturn mCurrentMaterial;\n\t}\n\n\tconst Ref<Material>& Render::GetDefaultMaterial() const\n\t{\n\t\treturn mDefaultMaterial;\n\t}\n\n\tvoid Render::BeginCustomRender()\n\t{\n\t\tDrawPrimitives();\n\t}\n\n\tvoid Render::ResetState()\n\t{\n\t\tPROFILE_SAMPLE_FUNC();\n\n\t\tmCurrentDrawTexture = nullptr;\n\t\tmCurrentBatchVertexType = Vertex::Type();\n\n\t\tPlatformResetState();\n\t\tSetupViewMatrix(mResolution);\n\t\tUpdateCameraTransforms();\n\t}\n\n\tvoid Render::EndCustomRender()\n\t{\n\t\tResetState();\n\t}\n\n\tvoid Render::UpdateCameraTransforms()\n\t{\n\t\tPROFILE_SAMPLE_FUNC();\n\n\t\tif (mCurrentResolution == mPrevResolution && mCamera == mPrevCamera)\n\t\t\treturn;\n\n\t\tDrawPrimitives();\n\n\t\tVec2F resf = (Vec2F)mCurrentResolution;\n\t\tVec2F halfRes(Math::Round(resf.x / 2.0f), Math::Round(resf.y / 2.0f));\n\n\t\tfloat projMatrix[16];\n\t\tMath::OrthoProjMatrix(projMatrix, 0.0f, (float)mCurrentResolution.x, (float)mCurrentResolution.y, 0.0f, 0.0f, 10.0f);\n\n\t\tfloat modelMatrix[16] =\n\t\t{\n\t\t\t1,         0,          0, 0,\n\t\t\t0,        -1,          0, 0,\n\t\t\t0,         0,          1, 0,\n\t\t\thalfRes.x, halfRes.y, -1, 1\n\t\t};\n\n\t\tBasis defaultCameraBasis((Vec2F)mCurrentResolution * -0.5f, Vec2F::Right() * resf.x, Vec2F().Up() * resf.y);\n\t\tBasis camTransf = mCamera.GetBasis().Inverted() * defaultCameraBasis;\n\t\tmViewScale = Vec2F(camTransf.xv.Length(), camTransf.yv.Length());\n\t\tmInvViewScale = Vec2F(1.0f / mViewScale.x, 1.0f / mViewScale.y);\n\n\t\tfloat viewMatrix[16] =\n\t\t{\n\t\t\tcamTransf.xv.x,     camTransf.xv.y,     0, 0,\n\t\t\tcamTransf.yv.x,     camTransf.yv.y,     0, 0,\n\t\t\t0,                  0,                  0, 0,\n\t\t\tcamTransf.origin.x, camTransf.origin.y, 0, 1\n\t\t};\n\n\t\tPlatformSetupCameraTransforms(modelMatrix, viewMatrix, projMatrix);\n\n\t\tmPrevCamera = mCamera;\n\t\tmPrevResolution = mCurrentResolution;\n\t}\n\n\tvoid Render::EnableScissorTest(const RectI& rect)\n\t{\n\t\tfloat scale = mCurrentRenderTarget ? 1.0f : o2Integration.GetGraphicsScale();\n\t\tVec2I resolution = Vec2I(Vec2F(mCurrentResolution) * scale);\n\t\tRectI invRect(rect.left * 2, -rect.top * 2, rect.right * 2, -rect.bottom * 2);\n\n\t\tDrawPrimitives();\n\n\t\tRectI summaryScissorRect = rect;\n\t\tif (!mStackScissors.IsEmpty())\n\t\t{\n\t\t\tmScissorInfos.Last().endDepth = mDrawingDepth;\n\n\t\t\tif (!mStackScissors.Last().renderTarget)\n\t\t\t{\n\t\t\t\tRectI lastSummaryClipRect = mStackScissors.Last().summaryScissorRect;\n\t\t\t\tmClippingEverything = !summaryScissorRect.IsIntersects(lastSummaryClipRect);\n\t\t\t\tsummaryScissorRect = summaryScissorRect.GetIntersection(lastSummaryClipRect);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tPlatformEnableScissorTest();\n\t\t\t\tmClippingEverything = false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPlatformEnableScissorTest();\n\t\t\tmClippingEverything = false;\n\t\t}\n\n\t\tmScissorInfos.Add(ScissorInfo(summaryScissorRect, mDrawingDepth));\n\t\tmStackScissors.Add(ScissorStackEntry(rect, summaryScissorRect));\n\n\t\tRectI screenScissorRect = CalculateScreenSpaceScissorRect(summaryScissorRect);\n\t\tPlatformSetScissorRect(screenScissorRect);\n\t}\n\n\tvoid Render::DisableScissorTest(bool forcible /*= false*/)\n\t{\n\t\tif (mStackScissors.IsEmpty())\n\t\t{\n\t\t\tmLog->WarningStr(\"Can't disable scissor test - no scissor were enabled!\");\n\t\t\treturn;\n\t\t}\n\n\t\tDrawPrimitives();\n\n\t\tif (forcible)\n\t\t{\n\t\t\tPlatformDisableScissorTest();\n\n\t\t\twhile (!mStackScissors.IsEmpty() && !mStackScissors.Last().renderTarget)\n\t\t\t\tmStackScissors.PopBack();\n\n\t\t\tmScissorInfos.Last().endDepth = mDrawingDepth;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (mStackScissors.Count() == 1)\n\t\t\t{\n\t\t\t\tPlatformDisableScissorTest();\n\t\t\t\tmStackScissors.PopBack();\n\n\t\t\t\tmScissorInfos.Last().endDepth = mDrawingDepth;\n\t\t\t\tmClippingEverything = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmStackScissors.PopBack();\n\t\t\t\tRectI lastClipRect = mStackScissors.Last().summaryScissorRect;\n\n\t\t\t\tmScissorInfos.Last().endDepth = mDrawingDepth;\n\t\t\t\tmScissorInfos.Add(ScissorInfo(lastClipRect, mDrawingDepth));\n\n\t\t\t\tif (mStackScissors.Last().renderTarget)\n\t\t\t\t{\n\t\t\t\t\tPlatformDisableScissorTest();\n\t\t\t\t\tmClippingEverything = false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tRectI screenScissorRect = CalculateScreenSpaceScissorRect(lastClipRect);\n\t\t\t\t\tPlatformSetScissorRect(screenScissorRect);\n\n\t\t\t\t\tmClippingEverything = lastClipRect == RectI();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid Render::BindRenderTexture(TextureRef renderTarget)\n\t{\n\t\tif (!renderTarget)\n\t\t{\n\t\t\tUnbindRenderTexture();\n\t\t\treturn;\n\t\t}\n\n\t\tif (renderTarget->mUsage != Texture::Usage::RenderTarget)\n\t\t{\n\t\t\tmLog->Error(\"Can't set texture as render target: not render target texture\");\n\t\t\tUnbindRenderTexture();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!renderTarget->IsReady())\n\t\t{\n\t\t\tmLog->Error(\"Can't set texture as render target: texture isn't ready\");\n\t\t\tUnbindRenderTexture();\n\t\t\treturn;\n\t\t}\n\n\t\tDrawPrimitives();\n\n\t\tif (!mStackScissors.IsEmpty())\n\t\t{\n\t\t\tmScissorInfos.Last().endDepth = mDrawingDepth;\n\t\t\tPlatformDisableScissorTest();\n\t\t}\n\n\t\tmStackScissors.Add(ScissorStackEntry(RectI(), RectI(), true));\n\n\t\tmCurrentRenderTarget = renderTarget;\n\n\t\tPlatformBindRenderTarget(renderTarget);\n\t\tSetupViewMatrix(renderTarget->GetSize());\n\t}\n\n\tvoid Render::UnbindRenderTexture()\n\t{\n\t\tif (!mCurrentRenderTarget)\n\t\t\treturn;\n\n\t\tDrawPrimitives();\n\t\tPlatformBindRenderTarget(nullptr);\n\n\t\tmCurrentRenderTarget = TextureRef();\n\n\t\tSetupViewMatrix(mResolution);\n\t\tSetCamera(Camera());\n\n\t\tDisableScissorTest(true);\n\t\tmStackScissors.PopBack();\n\t\tif (!mStackScissors.IsEmpty())\n\t\t{\n\t\t\tauto clipRect = mStackScissors.Last().summaryScissorRect;\n\n\t\t\tPlatformEnableScissorTest();\n\t\t\tPlatformSetScissorRect(clipRect);\n\n\t\t\tmClippingEverything = clipRect == RectI();\n\t\t}\n\t}\n\n\tvoid Render::OnFrameResized()\n\t{\n\t\tmResolution = o2Integration.GetContentSize();\n\t}\n\n\tVec2I Render::GetResolution() const\n\t{\n\t\treturn mResolution;\n\t}\n\n\tVec2I Render::GetCurrentResolution() const\n\t{\n\t\treturn mCurrentResolution;\n\t}\n\n\tVec2I Render::GetDPI() const\n\t{\n\t\treturn mDPI;\n\t}\n\n\tint Render::GetDrawCallsCount() const\n\t{\n\t\treturn mDrawCallsCount;\n\t}\n\n\tint Render::GetDrawnPrimitives() const\n\t{\n\t\treturn mFrameTrianglesCount;\n\t}\n\n\tvoid Render::SetCamera(const Camera& camera)\n\t{\n\t\tDrawPrimitives();\n\t\tmCamera = camera;\n\t\tUpdateCameraTransforms();\n\t}\n\n\tCamera Render::GetCamera() const\n\t{\n\t\treturn mCamera;\n\t}\n\n\tvoid Render::DrawFilledPolygon(const Vertex* verticies, int vertexCount)\n\t{\n\t\tstatic Mesh mesh(TextureRef(), 1024, 1024);\n\n\t\tint polyCount = vertexCount - 2;\n\t\tif (mesh.GetMaxVertexCount() < (UInt)vertexCount || mesh.GetMaxPolyCount() < (UInt)polyCount)\n\t\t\tmesh.Resize(vertexCount, polyCount);\n\n\t\tVertex* meshVerts = mesh.GetVertices<Vertex>();\n\t\tmemcpy(meshVerts, verticies, sizeof(Vertex) * vertexCount);\n\n\t\tfor (int i = 2; i < vertexCount; i++)\n\t\t{\n\t\t\tint ii = (i - 2) * 3;\n\t\t\tmesh.mIndexData[ii] = i - 1;\n\t\t\tmesh.mIndexData[ii + 1] = i;\n\t\t\tmesh.mIndexData[ii + 2] = 0;\n\t\t}\n\n\t\tmesh.vertexCount = vertexCount;\n\t\tmesh.polyCount = polyCount;\n\t\tmesh.Draw();\n\t}\n\n\tvoid Render::DrawFilledPolygon(const Vector<Vec2F>& points, const Color4& color /*= Color4::White()*/)\n\t{\n\t\tstatic Mesh mesh(TextureRef(), 1024, 1024);\n\n\t\tint vertexCount = points.Count();\n\t\tint polyCount = points.Count() - 2;\n\t\tif (mesh.GetMaxVertexCount() < points.Count() || mesh.GetMaxPolyCount() < polyCount)\n\t\t\tmesh.Resize(points.Count(), polyCount);\n\n\t\tULong dcolor = color.ABGR();\n\t\tVertex* meshVerts = mesh.GetVertices<Vertex>();\n\t\tfor (int i = 0; i < points.Count(); i++)\n\t\t\tmeshVerts[i] = Vertex(points[i], dcolor, 0.0f, 0.0f);\n\n\t\tfor (int i = 2; i < points.Count(); i++)\n\t\t{\n\t\t\tint ii = (i - 2) * 3;\n\t\t\tmesh.mIndexData[ii] = i - 1;\n\t\t\tmesh.mIndexData[ii + 1] = i;\n\t\t\tmesh.mIndexData[ii + 2] = 0;\n\t\t}\n\n\t\tmesh.vertexCount = vertexCount;\n\t\tmesh.polyCount = polyCount;\n\t\tmesh.Draw();\n\t}\n\n\tRectI Render::CalculateScreenSpaceScissorRect(const RectF& cameraSpaceScissorRect) const\n\t{\n\t\tfloat scale = mCurrentRenderTarget ? o2Integration.GetGraphicsScale() : 1.0f;\n\t\tVec2I resolution = Vec2I(Vec2F(mCurrentResolution) * scale);\n\n\t\tBasis defaultCameraBasis((Vec2F)resolution * -0.5f, Vec2F((float)resolution.x, 0.0f), Vec2F(0.0f, (float)resolution.y));\n\t\tBasis camTransf = mCamera.GetBasis().Inverted() * defaultCameraBasis;\n\t\tBasis scissorBasis(cameraSpaceScissorRect.LeftBottom(), Vec2F(cameraSpaceScissorRect.Width(), 0.0f), Vec2F(0.0f, cameraSpaceScissorRect.Height()));\n\t\tBasis screenScissorBasis = scissorBasis * camTransf;\n\t\tRectI screenScissorRect = screenScissorBasis.AABB();\n\n\t\treturn screenScissorRect;\n\t}\n\n\tvoid Render::CheckTexturesUnloading()\n\t{}\n\n\tvoid Render::CheckFontsUnloading()\n\t{}\n\n\tvoid Render::OnAssetsRebuilt(const Vector<UID>& changedAssets)\n\t{\n\t\tfor (auto& tex : mTextures)\n\t\t\ttex->Reload();\n\n\t\tfor (auto& atlas : mAtlases)\n\t\t\tatlas->ReloadPages();\n\n\t\tfor (auto& spr : mSprites)\n\t\t\tspr->ReloadImage();\n\t}\n\n\tvoid Render::OnSpriteCreated(Sprite* sprite)\n\t{\n\t\tif (!IsSingletonInitialzed())\n\t\t\treturn;\n\n\t\tInstance().mSprites.Add(sprite);\n\t}\n\n\tvoid Render::OnSpriteDestroyed(Sprite* sprite)\n\t{\n\t\tif (!IsSingletonInitialzed())\n\t\t\treturn;\n\n\t\tInstance().mSprites.Remove(sprite);\n\t}\n\n\tvoid Render::OnTextureCreated(Texture* texture)\n\t{\n\t\tmTextures.Add(Ref(texture));\n\t}\n\n\tvoid Render::OnTextureDestroyed(Texture* texture)\n\t{\n\t\tmTextures.RemoveFirst([=](const TextureRef& x) { return x == texture; });\n\t}\n\n\tvoid Render::OnAtlasCreated(AtlasAsset* atlas)\n\t{\n\t\tmAtlases.Add(Ref(atlas));\n\t}\n\n\tvoid Render::OnAtlasDestroyed(AtlasAsset* atlas)\n\t{\n\t\tmAtlases.RemoveFirst([=](const AssetRef<AtlasAsset>& x) { return x == atlas; });\n\t}\n\n\tvoid Render::OnFontCreated(Font* font)\n\t{\n\t\tmFonts.Add(Ref(font));\n\t}\n\n\tvoid Render::OnFontDestroyed(Font* font)\n\t{\n\t\tmFonts.RemoveFirst([=](const Ref<Font>& x) { return x == font; });\n\t}\n\n\tvoid Render::DrawAALine(const Vec2F& a, const Vec2F& b, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\tfloat width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\tbool scaleToScreenSpace /*= true*/)\n\t{\n\t\tULong dcolor = color.ABGR();\n\t\tVertex v[] = { Vertex(a.x, a.y, dcolor, 0, 0), Vertex(b.x, b.y, dcolor, 0, 0) };\n\t\tDrawAAPolyLine(v, 2, width, lineType, scaleToScreenSpace);\n\t}\n\n\tvoid Render::DrawAALine(const Vector<Vec2F>& points, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\tfloat width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\tbool scaleToScreenSpace /*= true*/)\n\t{\n\t\tULong dcolor = color.ABGR();\n\t\tVertex* v = mnew Vertex[points.Count()];\n\t\tfor (int i = 0; i < points.Count(); i++)\n\t\t\tv[i] = Vertex(points[i], dcolor, 0, 0);\n\n\t\tDrawAAPolyLine(v, points.Count(), width, lineType, scaleToScreenSpace);\n\t\tdelete[] v;\n\t}\n\n\tvoid Render::DrawAAArrow(const Vec2F& a, const Vec2F& b, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\t const Vec2F& arrowSize /*= Vec2F(10, 10)*/,\n\t\t\t\t\t\t\t float width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\t bool scaleToScreenSpace /*= true*/)\n\t{\n\t\tULong dcolor = color.ABGR();\n\t\tVec2F dir = (b - a).Normalized();\n\t\tVec2F ndir = dir.Perpendicular();\n\n\t\tVertex v[] = {\n\t\t\tVertex(a, dcolor, 0, 0), Vertex(b, dcolor, 0, 0),\n\t\t\tVertex(b - dir * arrowSize.x + ndir * arrowSize.y, dcolor, 0, 0), Vertex(b, dcolor, 0, 0),\n\t\t\tVertex(b - dir * arrowSize.x - ndir * arrowSize.y, dcolor, 0, 0), Vertex(b, dcolor, 0, 0) };\n\n\t\tDrawAAPolyLine(v, 6, width, lineType, scaleToScreenSpace);\n\t}\n\n\tvoid Render::DrawAARectFrame(const Vec2F& minp, const Vec2F& maxp, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\t\t float width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\t\t bool scaleToScreenSpace /*= true*/)\n\t{\n\t\tULong dcolor = color.ABGR();\n\t\tVertex v[] = {\n\t\t\tVertex(minp.x, minp.y, dcolor, 0, 0),\n\t\t\tVertex(maxp.x, minp.y, dcolor, 0, 0),\n\t\t\tVertex(maxp.x, maxp.y, dcolor, 0, 0),\n\t\t\tVertex(minp.x, maxp.y, dcolor, 0, 0),\n\t\t\tVertex(minp.x, minp.y, dcolor, 0, 0)\n\t\t};\n\n\t\tDrawAAPolyLine(v, 5, width, lineType, scaleToScreenSpace);\n\t}\n\n\tvoid Render::DrawAARectFrame(const RectF& rect, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\t\t float width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\t\t bool scaleToScreenSpace /*= true*/)\n\t{\n\t\tDrawAARectFrame(rect.LeftBottom(), rect.RightTop(), color, width, lineType, scaleToScreenSpace);\n\t}\n\n\tvoid Render::DrawAABasis(const Basis& basis, const Color4& xcolor /*= Color4::Red()*/,\n\t\t\t\t\t\t\t const Color4& ycolor /*= Color4::Blue()*/, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\t float width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\t bool scaleToScreenSpace /*= true*/)\n\t{\n\t\tDrawAALine(basis.origin, basis.origin + basis.xv, xcolor, width, lineType, scaleToScreenSpace);\n\t\tDrawAALine(basis.origin, basis.origin + basis.yv, ycolor, width, lineType, scaleToScreenSpace);\n\n\t\tVertex v[] =\n\t\t{\n\t\t\tVertex(basis.origin + basis.xv, color.ABGR(), 0, 0),\n\t\t\tVertex(basis.origin + basis.yv + basis.xv, color.ABGR(), 0, 0),\n\t\t\tVertex(basis.origin + basis.yv, color.ABGR(), 0, 0)\n\t\t};\n\n\t\tDrawAAPolyLine(v, 3, width, lineType, scaleToScreenSpace);\n\t}\n\n\tvoid Render::DrawAACross(const Vec2F& pos, float size /*= 5*/, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\t float width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\t bool scaleToScreenSpace /*= true*/)\n\t{\n\t\tDrawAALine(Vec2F(pos.x - size, pos.y), Vec2F(pos.x + size, pos.y), color, width, lineType, scaleToScreenSpace);\n\t\tDrawAALine(Vec2F(pos.x, pos.y - size), Vec2F(pos.x, pos.y + size), color, width, lineType, scaleToScreenSpace);\n\t}\n\n\tvoid Render::DrawAACircle(const Vec2F& pos, float radius /*= 5*/, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\t  int segCount /*= 20*/,\n\t\t\t\t\t\t\t  float width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\t  bool scaleToScreenSpace /*= true*/)\n\t{\n\t\tVertex* v = mnew Vertex[segCount + 1];\n\t\tULong dcolor = color.ABGR();\n\n\t\tfloat angleSeg = 2.0f * Math::PI() / (float)(segCount - 1);\n\t\tfor (int i = 0; i < segCount + 1; i++)\n\t\t{\n\t\t\tfloat a = (float)i * angleSeg;\n\t\t\tv[i] = Vertex(Vec2F::Rotated(a) * radius + pos, dcolor, 0, 0);\n\t\t}\n\n\t\tDrawAAPolyLine(v, segCount + 1, width, lineType, scaleToScreenSpace);\n\t\tdelete[] v;\n\t}\n\n\tvoid Render::DrawAABezierCurve(const Vec2F& p1, const Vec2F& p2, const Vec2F& p3, const Vec2F& p4,\n\t\t\t\t\t\t\t\t   const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\t\t   float width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\t\t   bool scaleToScreenSpace /*= true*/)\n\t{\n\t\tconst int segCount = 20;\n\t\tVertex v[segCount + 1];\n\t\tULong dcolor = color.ABGR();\n\n\t\tfor (int i = 0; i < segCount + 1; i++)\n\t\t{\n\t\t\tfloat coef = (float)i / (float)segCount;\n\t\t\tVec2F p = Bezier(p1, p2, p3, p4, coef);\n\t\t\tv[i] = Vertex(p, dcolor, 0, 0);\n\t\t}\n\n\t\tDrawAAPolyLine(v, segCount + 1, width, lineType, scaleToScreenSpace);\n\t}\n\n\tvoid Render::DrawAABezierCurveArrow(const Vec2F& p1, const Vec2F& p2, const Vec2F& p3, const Vec2F& p4,\n\t\t\t\t\t\t\t\t\t\tconst Color4& color /*= Color4::White()*/, const Vec2F& arrowSize /*= Vec2F(10, 10)*/,\n\t\t\t\t\t\t\t\t\t\tfloat width /*= 1.0f*/, LineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\t\t\t\tbool scaleToScreenSpace /*= true*/)\n\t{\n\t\tconst int segCount = 20;\n\t\tVertex v[segCount + 1];\n\t\tULong dcolor = color.ABGR();\n\n\t\tVec2F lastp = p1;\n\t\tVec2F dir;\n\t\tfor (int i = 0; i < segCount + 1; i++)\n\t\t{\n\t\t\tfloat coef = (float)i / (float)segCount;\n\t\t\tVec2F p = Bezier(p1, p2, p3, p4, coef);\n\t\t\tv[i] = Vertex(p, dcolor, 0, 0);\n\t\t\tdir = p - lastp;\n\t\t\tlastp = p;\n\t\t}\n\n\t\tDrawAAPolyLine(v, segCount + 1, width, lineType, scaleToScreenSpace);\n\n\t\tdir.Normalize();\n\t\tVec2F ndir = dir.Perpendicular();\n\n\t\tVertex va[] =\n\t\t{\n\t\t\tVertex(p4 - dir * arrowSize.x + ndir * arrowSize.y, dcolor, 0, 0),\n\t\t\tVertex(p4, dcolor, 0, 0),\n\t\t\tVertex(p4 - dir * arrowSize.x - ndir * arrowSize.y, dcolor, 0, 0)\n\t\t};\n\t\tDrawAAPolyLine(va, 3, width, lineType, scaleToScreenSpace);\n\t}\n\n\tvoid Render::DrawLine(const Vec2F& a, const Vec2F& b, const Color4& color /*= Color4::White()*/)\n\t{\n\t\tULong dcolor = color.ABGR();\n\t\tVertex v[] = { Vertex(a.x, a.y, dcolor, 0, 0), Vertex(b.x, b.y, dcolor, 0, 0) };\n\t\tDrawPolyLine(v, 2);\n\t}\n\n\tvoid Render::DrawLine(const Vector<Vec2F>& points, const Color4& color /*= Color4::White()*/)\n\t{\n\t\tULong dcolor = color.ABGR();\n\t\tVertex* v = mnew Vertex[points.Count()];\n\t\tfor (int i = 0; i < points.Count(); i++)\n\t\t\tv[i] = Vertex(points[i], dcolor, 0, 0);\n\n\t\tDrawPolyLine(v, points.Count());\n\t\tdelete[] v;\n\t}\n\n\tvoid Render::DrawArrow(const Vec2F& a, const Vec2F& b, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t   const Vec2F& arrowSize /*= Vec2F(10, 10)*/)\n\t{\n\t\tULong dcolor = color.ABGR();\n\t\tVec2F dir = (b - a).Normalized();\n\t\tVec2F ndir = dir.Perpendicular();\n\n\t\tVertex v[] = {\n\t\t\tVertex(a, dcolor, 0, 0), Vertex(b, dcolor, 0, 0),\n\t\t\tVertex(b - dir * arrowSize.x + ndir * arrowSize.y, dcolor, 0, 0), Vertex(b, dcolor, 0, 0),\n\t\t\tVertex(b - dir * arrowSize.x - ndir * arrowSize.y, dcolor, 0, 0), Vertex(b, dcolor, 0, 0) };\n\n\t\tDrawPolyLine(v, 6);\n\t}\n\n\tvoid Render::DrawRectFrame(const Vec2F& minp, const Vec2F& maxp, const Color4& color /*= Color4::White()*/)\n\t{\n\t\tULong dcolor = color.ABGR();\n\t\tVertex v[] = {\n\t\t\tVertex(minp.x, minp.y, dcolor, 0, 0),\n\t\t\tVertex(maxp.x, minp.y, dcolor, 0, 0),\n\t\t\tVertex(maxp.x, maxp.y, dcolor, 0, 0),\n\t\t\tVertex(minp.x, maxp.y, dcolor, 0, 0),\n\t\t\tVertex(minp.x, minp.y, dcolor, 0, 0)\n\t\t};\n\t\tDrawPolyLine(v, 5);\n\t}\n\n\tvoid Render::DrawRectFrame(const RectF& rect, const Color4& color /*= Color4::White()*/)\n\t{\n\t\tDrawRectFrame(rect.LeftBottom(), rect.RightTop(), color);\n\t}\n\n\tvoid Render::DrawBasis(const Basis& basis, const Color4& xcolor /*= Color4::Red()*/,\n\t\t\t\t\t\t   const Color4& ycolor /*= Color4::Blue()*/, const Color4& color /*= Color4::White()*/)\n\t{\n\t\tDrawLine(basis.origin, basis.origin + basis.xv, xcolor);\n\t\tDrawLine(basis.origin, basis.origin + basis.yv, ycolor);\n\n\t\tVertex v[] =\n\t\t{\n\t\t\tVertex(basis.origin + basis.xv, color.ABGR(), 0, 0),\n\t\t\tVertex(basis.origin + basis.yv + basis.xv, color.ABGR(), 0, 0),\n\t\t\tVertex(basis.origin + basis.yv, color.ABGR(), 0, 0)\n\t\t};\n\n\t\tDrawPolyLine(v, 3);\n\t}\n\n\tvoid Render::DrawCross(const Vec2F& pos, float size /*= 5*/, const Color4& color /*= Color4::White()*/)\n\t{\n\t\tDrawLine(Vec2F(pos.x - size, pos.y), Vec2F(pos.x + size, pos.y), color);\n\t\tDrawLine(Vec2F(pos.x, pos.y - size), Vec2F(pos.x, pos.y + size), color);\n\t}\n\n\tvoid Render::DrawCircle(const Vec2F& pos, float radius /*= 5*/, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\tint segCount /*= 20*/)\n\t{\n\t\tstatic int vertexBufferSize = segCount + 1;\n\t\tstatic Vertex* vertexBuffer = mnew Vertex[vertexBufferSize];\n\n\t\tint vertexCount = segCount + 1;\n\t\tif (vertexCount > vertexBufferSize)\n\t\t{\n\t\t\tdelete[] vertexBuffer;\n\t\t\tvertexBufferSize = vertexCount;\n\t\t\tvertexBuffer = mnew Vertex[vertexBufferSize];\n\t\t}\n\n\t\tULong dcolor = color.ABGR();\n\n\t\tfloat angleSeg = 2.0f * Math::PI() / (float)(segCount - 1);\n\t\tfor (int i = 0; i < segCount + 1; i++)\n\t\t{\n\t\t\tfloat a = (float)i * angleSeg;\n\t\t\tvertexBuffer[i] = Vertex(Vec2F::Rotated(a) * radius + pos, dcolor, 0, 0);\n\t\t}\n\n\t\tDrawPolyLine(vertexBuffer, segCount + 1);\n\t}\n\n\tvoid Render::DrawFilledCircle(const Vec2F& pos, float radius /*= 5*/, const Color4& color /*= Color4::White()*/,\n\t\t\t\t\t\t\t\t  int segCount /*= 20*/)\n\t{\n\t\tstatic int vertexBufferSize = segCount + 1;\n\t\tstatic Vertex* vertexBuffer = mnew Vertex[vertexBufferSize];\n\n\t\tint vertexCount = segCount + 1;\n\t\tif (vertexCount > vertexBufferSize)\n\t\t{\n\t\t\tdelete[] vertexBuffer;\n\t\t\tvertexBufferSize = vertexCount;\n\t\t\tvertexBuffer = mnew Vertex[vertexBufferSize];\n\t\t}\n\n\t\tULong dcolor = color.ABGR();\n\n\t\tfloat angleSeg = 2.0f * Math::PI() / (float)(segCount - 1);\n\t\tfor (int i = 0; i < segCount + 1; i++)\n\t\t{\n\t\t\tfloat a = (float)i * angleSeg;\n\t\t\tvertexBuffer[i] = Vertex(Vec2F::Rotated(a) * radius + pos, dcolor, 0, 0);\n\t\t}\n\n\t\tDrawFilledPolygon(vertexBuffer, vertexCount);\n\t}\n\n\tvoid Render::DrawBezierCurve(const Vec2F& p1, const Vec2F& p2, const Vec2F& p3, const Vec2F& p4,\n\t\t\t\t\t\t\t\t const Color4& color /*= Color4::White()*/)\n\t{\n\t\tconst int segCount = 20;\n\t\tVertex v[segCount + 1];\n\t\tULong dcolor = color.ABGR();\n\n\t\tfor (int i = 0; i < segCount + 1; i++)\n\t\t{\n\t\t\tfloat coef = (float)i / (float)segCount;\n\t\t\tVec2F p = Bezier(p1, p2, p3, p4, coef);\n\t\t\tv[i] = Vertex(p, dcolor, 0, 0);\n\t\t}\n\n\t\tDrawPolyLine(v, segCount + 1);\n\t}\n\n\tvoid Render::DrawBezierCurveArrow(const Vec2F& p1, const Vec2F& p2, const Vec2F& p3, const Vec2F& p4,\n\t\t\t\t\t\t\t\t\t  const Color4& color /*= Color4::White()*/, const Vec2F& arrowSize /*= Vec2F(10, 10)*/)\n\t{\n\t\tconst int segCount = 20;\n\t\tVertex v[segCount + 1];\n\t\tULong dcolor = color.ABGR();\n\n\t\tVec2F lastp = p1;\n\t\tVec2F dir;\n\t\tfor (int i = 0; i < segCount + 1; i++)\n\t\t{\n\t\t\tfloat coef = (float)i / (float)segCount;\n\t\t\tVec2F p = Bezier(p1, p2, p3, p4, coef);\n\t\t\tv[i] = Vertex(p, dcolor, 0, 0);\n\t\t\tdir = p - lastp;\n\t\t\tlastp = p;\n\t\t}\n\n\t\tDrawPolyLine(v, segCount + 1);\n\n\t\tdir.Normalize();\n\t\tVec2F ndir = dir.Perpendicular();\n\n\t\tVertex va[] =\n\t\t{\n\t\t\tVertex(p4 - dir * arrowSize.x + ndir * arrowSize.y, dcolor, 0, 0),\n\t\t\tVertex(p4, dcolor, 0, 0),\n\t\t\tVertex(p4 - dir * arrowSize.x - ndir * arrowSize.y, dcolor, 0, 0)\n\t\t};\n\t\tDrawPolyLine(va, 3);\n\t}\n\n\tRectI Render::GetScissorRect() const\n\t{\n\t\tif (mStackScissors.IsEmpty())\n\t\t\treturn RectI(-(int)(mCurrentResolution.x * 0.5f), -(int)(mCurrentResolution.y * 0.5f),\n\t\t\t\t\t\t (int)(mCurrentResolution.x * 0.5f), (int)(mCurrentResolution.y * 0.5f));\n\n\t\treturn (RectI)(mStackScissors.Last().scissorRect);\n\t}\n\n\tRectI Render::GetResScissorRect() const\n\t{\n\t\tif (mStackScissors.IsEmpty() || mStackScissors.Last().renderTarget)\n\t\t\treturn RectI(INT_MIN, INT_MIN, INT_MAX, INT_MAX);\n\n\t\treturn (RectI)(mStackScissors.Last().summaryScissorRect);\n\t}\n\n\tconst Vector<Render::ScissorStackEntry>& Render::GetScissorsStack() const\n\t{\n\t\treturn mStackScissors;\n\t}\n\n\tbool Render::IsScissorTestEnabled() const\n\t{\n\t\treturn !mStackScissors.IsEmpty();\n\t}\n\n\tbool Render::IsClippedByScissor(const RectF& rect) const\n\t{\n\t\treturn !GetScissorRect().IsIntersects(rect);\n\t}\n\n\tbool Render::IsClippedByScissor(const Vec2F& point) const\n\t{\n\t\treturn !GetScissorRect().IsInside(point);\n\t}\n\n\tvoid Render::DrawMesh(Mesh* mesh)\n\t{\n\t\tif (mesh->polyCount > 0)\n\t\t{\n\t\t\tDrawBuffer(PrimitiveType::Polygon, mesh->GetVertexData(), mesh->vertexCount,\n\t\t\t\t\t   mesh->mVertexType, mesh->mIndexData, mesh->polyCount,\n\t\t\t\t\t   mesh->GetMaterial(), mesh->mTexture, mesh->mTextureSrcRect, true);\n\t\t}\n\t}\n\n\tvoid Render::DrawMeshWire(Mesh* mesh, const Color4& color /*= Color4::White()*/)\n\t{\n\t\tVertex* vertices = mesh->GetVertices<Vertex>();\n\t\tDrawMeshBufferWire(vertices, mesh->vertexCount, mesh->mIndexData, mesh->polyCount, color);\n\t}\n\n\tvoid Render::DrawMeshBufferWire(Vertex* vertices, UInt verticesCount, VertexIndex* indexes, UInt elementsCount,\n\t\t\t\t\t\t\t\t\tconst Color4& color /*= Color4::White()*/)\n\t{\n\t\tauto dcolor = color.ABGR();\n\n\t\tfor (UInt i = 0; i < elementsCount; i++)\n\t\t{\n\t\t\tVertex v[] =\n\t\t\t{\n\t\t\t\tvertices[indexes[i * 3]],\n\t\t\t\tvertices[indexes[i * 3 + 1]],\n\t\t\t\tvertices[indexes[i * 3 + 2]],\n\t\t\t\tvertices[indexes[i * 3]]\n\t\t\t};\n\n\t\t\tv[0].color = dcolor;\n\t\t\tv[1].color = dcolor;\n\t\t\tv[2].color = dcolor;\n\t\t\tv[3].color = dcolor;\n\n\t\t\tDrawPolyLine(v, 4);\n\t\t}\n\t}\n\n\tvoid Render::DrawPolyLine(Vertex* vertices, int count, float width /*= 1.0f*/)\n\t{\n\t\tDrawBuffer(PrimitiveType::Line, vertices, count, mHardLinesIndexData, count - 1, mDefaultMaterial, mSolidLineTexture);\n\t}\n\n\tvoid Render::DrawAAPolyLine(Vertex* vertices, int count, float width /*= 1.0f*/,\n\t\t\t\t\t\t\t\tLineType lineType /*= LineType::Solid*/,\n\t\t\t\t\t\t\t\tbool scaleToScreenSpace /*= true*/)\n\t{\n\t\tstatic Vertex* lineVerts = mnew Vertex[4096];\n\t\tstatic VertexIndex* lineIndexes = mnew VertexIndex[4096 * 3];\n\t\tstatic UInt lineMaxVertexCount = 4096;\n\t\tstatic UInt lineMaxPolyCount = 4096;\n\n\t\tUInt lineVertexCount = 0, linePolyCount = 0;\n\n\t\tTextureRef texture = lineType == LineType::Solid ? mSolidLineTexture : mDashLineTexture;\n\t\tVec2I texSize = lineType == LineType::Solid ? Vec2I(1, 1) : mDashLineTexture->GetSize();\n\n\t\tif (scaleToScreenSpace)\n\t\t{\n\t\t\tGeometry::CreatePolyLineMesh(vertices, count,\n\t\t\t\t\t\t\t\t\t\t lineVerts, lineVertexCount, lineMaxVertexCount,\n\t\t\t\t\t\t\t\t\t\t lineIndexes, linePolyCount, lineMaxPolyCount,\n\t\t\t\t\t\t\t\t\t\t width - 0.5f, 0.5f, 0.5f, texSize, mInvViewScale);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tGeometry::CreatePolyLineMesh(vertices, count,\n\t\t\t\t\t\t\t\t\t\t lineVerts, lineVertexCount, lineMaxVertexCount,\n\t\t\t\t\t\t\t\t\t\t lineIndexes, linePolyCount, lineMaxPolyCount,\n\t\t\t\t\t\t\t\t\t\t width, 0.5f, 0.5f, texSize, Vec2F(1, 1));\n\t\t}\n\n\t\tDrawBuffer(PrimitiveType::Polygon, lineVerts, lineVertexCount,\n\t\t\t\t   lineIndexes, linePolyCount, mDefaultMaterial, texture);\n\t}\n\n\tTextureRef Render::GetRenderTexture() const\n\t{\n\t\treturn mCurrentRenderTarget;\n\t}\n\n\tVec2I Render::GetMaxTextureSize() const\n\t{\n\t\treturn mMaxTextureSize;\n\t}\n\n\tfloat Render::GetDrawingDepth()\n\t{\n\t\tmDrawingDepth += 1.0f;\n\t\treturn mDrawingDepth;\n\t}\n\n\tconst Vector<Render::ScissorInfo>& Render::GetScissorInfos() const\n\t{\n\t\treturn mScissorInfos;\n\t}\n\n\tRender& Render::operator=(const Render& other)\n\t{\n\t\treturn *this;\n\t}\n\n\tRender::ScissorInfo::ScissorInfo():\n\t\tbeginDepth(0), endDepth(0)\n\t{}\n\n\tRender::ScissorInfo::ScissorInfo(const RectI& rect, float beginDepth):\n\t\tscissorRect(rect), beginDepth(beginDepth), endDepth(beginDepth)\n\t{}\n\n\tbool Render::ScissorInfo::operator==(const ScissorInfo& other) const\n\t{\n\t\treturn Math::Equals(beginDepth, other.beginDepth) && Math::Equals(endDepth, other.endDepth) &&\n\t\t\tscissorRect == other.scissorRect;\n\t}\n\n\tRender::ScissorStackEntry::ScissorStackEntry()\n\t{}\n\n\tRender::ScissorStackEntry::ScissorStackEntry(const RectI& rect, const RectI& summaryRect, bool renderTarget /*= false*/):\n\t\tscissorRect(rect), summaryScissorRect(summaryRect), renderTarget(renderTarget)\n\t{}\n\n\tbool Render::ScissorStackEntry::operator==(const ScissorStackEntry& other) const\n\t{\n\t\treturn scissorRect == other.scissorRect;\n\t}\n\n#if IS_EDITOR\n\tvoid Render::ReloadAssetsOnActivation()\n\t{\n\t\to2Assets.RebuildAssets();\n\n\t\tint reloadedShaders = 0;\n\t\tfor (auto& asset : o2Assets.mCachedAssets)\n\t\t{\n\t\t\tauto shaderAsset = DynamicCast<ShaderAsset>(asset.GetRef());\n\t\t\tif (!shaderAsset || !shaderAsset->GetShader())\n\t\t\t\tcontinue;\n\n\t\t\tString path = Shader::ResolvePlatformSourcePath(shaderAsset->GetFullPath());\n\t\t\tTimeStamp currentDate = o2FileSystem.GetFileInfo(path).editDate;\n\t\t\tif (currentDate == shaderAsset->GetShader()->GetFileEditDate())\n\t\t\t\tcontinue;\n\n\t\t\tString source = o2FileSystem.ReadFile(path);\n\t\t\tif (source.IsEmpty())\n\t\t\t\tcontinue;\n\n\t\t\tauto shader = shaderAsset->GetShader();\n\t\t\tif (shader->Compile(source, shader->GetShaderType()))\n\t\t\t{\n\t\t\t\tshader->SetFileEditDate(currentDate);\n\t\t\t\treloadedShaders++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tmLog->Error(\"Failed to recompile shader: \" + shaderAsset->GetPath());\n\t\t}\n\n\t\tif (reloadedShaders > 0)\n\t\t{\n\t\t\tfor (auto& asset : o2Assets.mCachedAssets)\n\t\t\t{\n\t\t\t\tauto materialAsset = DynamicCast<MaterialAsset>(asset.GetRef());\n\t\t\t\tif (materialAsset)\n\t\t\t\t\tmaterialAsset->Build();\n\t\t\t}\n\n\t\t\tif (mDefaultMaterial)\n\t\t\t\tmDefaultMaterial->Build();\n\n\t\t\tmCurrentMaterial = nullptr;\n\t\t}\n\n\t\tint reloadedTextures = 0;\n\t\tfor (auto& tex : mTextures)\n\t\t{\n\t\t\tif (!tex || tex->GetFileName().IsEmpty())\n\t\t\t\tcontinue;\n\n\t\t\tTimeStamp currentDate = o2FileSystem.GetFileInfo(tex->GetFileName()).editDate;\n\t\t\tif (currentDate == tex->GetFileEditDate())\n\t\t\t\tcontinue;\n\n\t\t\ttex->Reload();\n\t\t\treloadedTextures++;\n\t\t}\n\n\t\tif (reloadedTextures > 0)\n\t\t{\n\t\t\tfor (auto& atlas : mAtlases)\n\t\t\t\tatlas->ReloadPages();\n\n\t\t\tfor (auto& spr : mSprites)\n\t\t\t\tspr->ReloadImage();\n\t\t}\n\n\t\tif (reloadedShaders > 0 || reloadedTextures > 0)\n\t\t\tmLog->Out(\"Reloaded \" + (String)reloadedShaders + \" shaders, \" + (String)reloadedTextures + \" textures\");\n\t}\n#endif\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Render.h",
    "content": "#pragma once\n\n#include \"ft2build.h\"\n#include FT_FREETYPE_H\n\n#if defined PLATFORM_WINDOWS\n#include \"o2/Render/Windows/RenderBase.h\"\n#elif defined PLATFORM_ANDROID\n#include \"o2/Render/Android/RenderBase.h\"\n#elif defined PLATFORM_MAC\n#include \"o2/Render/Mac/RenderBase.h\"\n#elif defined PLATFORM_IOS\n#include \"o2/Render/iOS/RenderBase.h\"\n#elif defined PLATFORM_WASM\n#include \"o2/Render/WebAssembly/RenderBase.h\"\n#elif defined(PLATFORM_LINUX)\n#if defined(O2_RENDER_GLES2)\n#include \"o2/Render/Linux GLES2/RenderBase.h\"\n#else\n#include \"o2/Render/Linux/RenderBase.h\"\n#endif\n#endif\n\n#include \"o2/Render/Camera.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\n// Render access macros\n#define o2Render o2::Render::Instance()\n\nnamespace o2\n{\n\tFORWARD_CLASS_REF(AtlasAsset);\n\n\tclass CursorAreaEventListenersLayer;\n\tclass Font;\n\tclass Material;\n\tclass Mesh;\n\tclass Shader;\n\tclass Sprite;\n\n\t// ------------------\n\t// 2D Graphics render\n\t// ------------------\n\tclass Render: public RenderBase, public Singleton<Render>\n\t{\n\tpublic:\n\t\t// ---------------------\n\t\t// Scissor clipping info\n\t\t// ---------------------\n\t\tstruct ScissorInfo\n\t\t{\n\t\t\tfloat beginDepth = 0.0f; // Drawing depth on enabling clipping\n\t\t\tfloat endDepth = 0.0f;   // Drawing depth on disabling clipping\n\t\t\tRectI scissorRect;       // Scissor clipping rectangle\n\n\t\tpublic:\n\t\t\tScissorInfo();\n\t\t\tScissorInfo(const RectI& rect, float beginDepth);\n\n\t\t\tbool operator==(const ScissorInfo& other) const;\n\t\t};\n\n\t\t// --------------------------------\n\t\t// Scissor clipping stack info item\n\t\t// --------------------------------\n\t\tstruct ScissorStackEntry\n\t\t{\n\t\t\tRectI scissorRect;          // Clipping scissor rectangle\n\t\t\tRectI summaryScissorRect;   // Real clipping rectangle: summary of top clipping rectangles\n\t\t\tbool  renderTarget = false; // Is render target turned on this step\n\n\t\tpublic:\n\t\t\tScissorStackEntry();\n\t\t\tScissorStackEntry(const RectI& rect, const RectI& summaryRect, bool renderTarget = false);\n\n\t\t\tbool operator==(const ScissorStackEntry& other) const;\n\t\t};\n\n\tpublic:\n\t\tPROPERTIES(Render);\n\t\tPROPERTY(Camera, camera, SetCamera, GetCamera);                           // Current camera property\n\t\tPROPERTY(RectI, scissorRect, EnableScissorTest, GetScissorRect);          // Scissor rect property\n\t\tPROPERTY(TextureRef, renderTexture, BindRenderTexture, GetRenderTexture); // Render target texture property\n\t\tGETTER(Vec2I, resolution, GetResolution);                                 // Screen resolution getter\n\t\tGETTER(Vec2I, maxTextureSize, GetMaxTextureSize);                         // Maximal texture size getter\n\n\tpublic:\n\t\tFunction<void()> preRender;  // Pre rendering event. Call after beginning drawing. Clearing every frame\n\t\tFunction<void()> postRender; // Post rendering event. Call before ending drawing. Clearing every frame\n\n\tpublic:\n\t\t// Default constructor\n\t\tRender(RefCounter* refCounter);\n\n\t\t// Destructor\n\t\t~Render();\n\n\t\t// Beginning rendering\n\t\tvoid Begin();\n\n\t\t// Finishing rendering\n\t\tvoid End();\n\n\t\t// Flushes current state and gets ready to draw manually\n\t\tvoid BeginCustomRender();\n\n\t\t// Finishes custom rendering, restores state and cameras\n\t\tvoid EndCustomRender();\n\n\t\t// Resets render's state\n\t\tvoid ResetState();\n\n\t\t// Clearing current frame buffer with color\n\t\tvoid Clear(const Color4& color = Color4::Gray());\n\n\t\t// Returns resolution of rendering frame\n\t\tVec2I GetResolution() const;\n\n\t\t// Returns current buffer resolution\n\t\tVec2I GetCurrentResolution() const;\n\n\t\t// Returns device's screen dpi\n\t\tVec2I GetDPI() const;\n\n\t\t// Returns current draw calls count \n\t\tint GetDrawCallsCount() const;\n\n\t\t// Returns current drawn primitives\n\t\tint GetDrawnPrimitives() const;\n\n\t\t// Binding camera. NULL - standard camera\n\t\tvoid SetCamera(const Camera& camera);\n\n\t\t// Returns current camera\n\t\tCamera GetCamera() const;\n\n\t\t// Draws polygon\n\t\tvoid DrawFilledPolygon(const Vector<Vec2F>& points, const Color4& color = Color4::White());\n\n\t\t// Draws polygon\n\t\tvoid DrawFilledPolygon(const Vertex* points, int vertexCount);\n\n\t\t// Draws single line with color\n\t\tvoid DrawLine(const Vec2F& a, const Vec2F& b, const Color4& color = Color4::White());\n\n\t\t// Draws single line with color\n\t\tvoid DrawArrow(const Vec2F& a, const Vec2F& b, const Color4& color = Color4::White(),\n\t\t\t\t\t   const Vec2F& arrowSize = Vec2F(10, 10));\n\n\t\t// Draws single line with color\n\t\tvoid DrawLine(const Vector<Vec2F>& points, const Color4& color = Color4::White());\n\n\t\t// Draws rect frame with color\n\t\tvoid DrawRectFrame(const Vec2F& minp, const Vec2F& maxp, const Color4& color = Color4::White());\n\n\t\t// Draws rect frame with color\n\t\tvoid DrawRectFrame(const RectF& rect, const Color4& color = Color4::White());\n\n\t\t// Draws basis frame\n\t\tvoid DrawBasis(const Basis& basis, const Color4& xcolor = Color4::Red(), const Color4& ycolor = Color4::Blue(),\n\t\t\t\t\t   const Color4& color = Color4::White());\n\n\t\t// Draws cross with color\n\t\tvoid DrawCross(const Vec2F& pos, float size = 5, const Color4& color = Color4::White());\n\n\t\t// Draws circle with color\n\t\tvoid DrawCircle(const Vec2F& pos, float radius = 5, const Color4& color = Color4::White(), int segCount = 20);\n\n\t\t// Draws filled circle with color\n\t\tvoid DrawFilledCircle(const Vec2F& pos, float radius = 5, const Color4& color = Color4::White(), int segCount = 20);\n\n\t\t// Draws bezier curve with color\n\t\tvoid DrawBezierCurve(const Vec2F& p1, const Vec2F& p2, const Vec2F& p3, const Vec2F& p4,\n\t\t\t\t\t\t\t const Color4& color = Color4::White());\n\n\t\t// Draws bezier curve with color\n\t\tvoid DrawBezierCurveArrow(const Vec2F& p1, const Vec2F& p2, const Vec2F& p3, const Vec2F& p4,\n\t\t\t\t\t\t\t\t  const Color4& color = Color4::White(), const Vec2F& arrowSize = Vec2F(10, 10));\n\n\t\t// Draws anti-aliased single line with color\n\t\tvoid DrawAALine(const Vec2F& a, const Vec2F& b, const Color4& color = Color4::White(),\n\t\t\t\t\t\tfloat width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Draws anti-aliased single line with color\n\t\tvoid DrawAAArrow(const Vec2F& a, const Vec2F& b, const Color4& color = Color4::White(),\n\t\t\t\t\t\t const Vec2F& arrowSize = Vec2F(10, 10),\n\t\t\t\t\t\t float width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Draws anti-aliased single line with color\n\t\tvoid DrawAALine(const Vector<Vec2F>& points, const Color4& color = Color4::White(),\n\t\t\t\t\t\tfloat width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Draws anti-aliased rect frame with color\n\t\tvoid DrawAARectFrame(const Vec2F& minp, const Vec2F& maxp, const Color4& color = Color4::White(),\n\t\t\t\t\t\t\t float width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Draws anti-aliased rect frame with color\n\t\tvoid DrawAARectFrame(const RectF& rect, const Color4& color = Color4::White(),\n\t\t\t\t\t\t\t float width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Draws anti-aliased basis frame\n\t\tvoid DrawAABasis(const Basis& basis, const Color4& xcolor = Color4::Red(), const Color4& ycolor = Color4::Blue(),\n\t\t\t\t\t\t const Color4& color = Color4::White(),\n\t\t\t\t\t\t float width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Draws anti-aliased cross with color\n\t\tvoid DrawAACross(const Vec2F& pos, float size = 5, const Color4& color = Color4::White(),\n\t\t\t\t\t\t float width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Draws anti-aliased circle with color\n\t\tvoid DrawAACircle(const Vec2F& pos, float radius = 5, const Color4& color = Color4::White(), int segCount = 20,\n\t\t\t\t\t\t  float width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Draws anti-aliased bezier curve with color\n\t\tvoid DrawAABezierCurve(const Vec2F& p1, const Vec2F& p2, const Vec2F& p3, const Vec2F& p4,\n\t\t\t\t\t\t\t   const Color4& color = Color4::White(),\n\t\t\t\t\t\t\t   float width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Draws anti-aliased bezier curve with color\n\t\tvoid DrawAABezierCurveArrow(const Vec2F& p1, const Vec2F& p2, const Vec2F& p3, const Vec2F& p4,\n\t\t\t\t\t\t\t\t\tconst Color4& color = Color4::White(), const Vec2F& arrowSize = Vec2F(10, 10),\n\t\t\t\t\t\t\t\t\tfloat width = 1.0f, LineType lineType = LineType::Solid, bool scaleToScreenSpace = true);\n\n\t\t// Returns scissor rect\n\t\tRectI GetScissorRect() const;\n\n\t\t// Returns result scissor rect of all scissor stack\n\t\tRectI GetResScissorRect() const;\n\n\t\t// Returns scissors stack\n\t\tconst Vector<ScissorStackEntry>& GetScissorsStack() const;\n\n\t\t// Enabling scissor test\n\t\tvoid EnableScissorTest(const RectI& rect);\n\n\t\t// Disabling scissor test\n\t\tvoid DisableScissorTest(bool forcible = false);\n\n\t\t// Returns true, if scissor test enabled\n\t\tbool IsScissorTestEnabled() const;\n\n\t\t// Returns true when specified rectangle is fully clipped by current scissor test\n\t\tbool IsClippedByScissor(const RectF& rect) const;\n\n\t\t// Returns true when specified point is clipped by current scissor test\n\t\tbool IsClippedByScissor(const Vec2F& point) const;\n\n\t\t// Draws mesh\n\t\tvoid DrawMesh(Mesh* mesh);\n\n\t\t// Draws data from buffer. Vertex type describes the source vertex format.\n\t\t// If allowVertexConversion is true, vertices will be converted to match the material's texcoord requirements\n\t\t// by remapping 0..1 UVs through texSrcRect. If false and types don't match, asserts.\n\t\tvoid DrawBuffer(PrimitiveType primitiveType, const UInt8* vertices, UInt verticesCount, const VertexType& vertexType,\n\t\t\t\t\t\tVertexIndex* indexes, UInt elementsCount,\n\t\t\t\t\t\tconst Ref<Material>& material, const TextureRef& overrideTexture, const RectI& texSrcRect = RectI(), \n\t\t\t\t\t\tbool allowVertexConversion = false);\n\n\t\t// Convenience overload for typed Vertex data\n\t\tvoid DrawBuffer(PrimitiveType primitiveType, const Vertex* vertices, UInt verticesCount,\n\t\t\t\t\t\tVertexIndex* indexes, UInt elementsCount, \n\t\t\t\t\t\tconst Ref<Material>& material, const TextureRef& overrideTexture, const RectI& texSrcRect = RectI(),\n\t\t\t\t\t\tbool allowVertexConversion = false);\n\n\t\t// Fills the CPU-side batch buffer with vertex/index data, applying UV remapping if needed\n\t\tvoid UploadBuffers(const UInt8* vertices, UInt verticesCount, const VertexType& srcVertexType,\n\t\t\t\t\t\t   VertexIndex* indexes, UInt indexesCount, const RectI& texSrcRect,\n\t\t\t\t\t\t   const TextureRef& texture, bool allowVertexConversion);\n\n\t\t// Draws mesh wire\n\t\tvoid DrawMeshWire(Mesh* mesh, const Color4& color = Color4::White());\n\n\t\t// Draws mesh buffer wire\n\t\tvoid DrawMeshBufferWire(Vertex* vertices, UInt verticesCount, VertexIndex* indexes, UInt elementsCount,\n\t\t\t\t\t\t\t\tconst Color4& color = Color4::White());\n\n\t\t// Draws hard poly line. Vertices - buffer of vertex pairs for each line\n\t\tvoid DrawPolyLine(Vertex* vertices, int count, float width = 1.0f);\n\n\t\t// Draws anti-aliased lines\n\t\tvoid DrawAAPolyLine(Vertex* vertices, int count, float width = 1.0f, LineType lineType = LineType::Solid,\n\t\t\t\t\t\t\tbool scaleToScreenSpace = true);\n\n\t\t// Binding render target\n\t\tvoid BindRenderTexture(TextureRef renderTarget);\n\n\t\t// Unbinding render target\n\t\tvoid UnbindRenderTexture();\n\n\t\t// Returns current render target. Returns NULL if no render target\n\t\tTextureRef GetRenderTexture() const;\n\n\t\t// Returns maximum texture size\n\t\tVec2I GetMaxTextureSize() const;\n\n\t\t// Returns last draw depth of mesh\n\t\tfloat GetDrawingDepth();\n\n\t\t// Returns scissor infos at current frame\n\t\tconst Vector<ScissorInfo>& GetScissorInfos() const;\n\n\t\t// Binds material for rendering. nullptr is ignored (no-op).\n\t\tvoid BindMaterial(const Ref<Material>& material);\n\n\t\t// Returns current bound material\n\t\tconst Ref<Material>& GetCurrentMaterial() const;\n\n\t\t// Returns default material\n\t\tconst Ref<Material>& GetDefaultMaterial() const;\n\n#if IS_EDITOR\n\t\t// Reloads all shader and texture assets from disk on editor activation\n\t\tvoid ReloadAssetsOnActivation();\n#endif\n\n\tprotected:\n\t\tPrimitiveType mCurrentPrimitiveType = PrimitiveType::Polygon; // Type of drawing primitives for next DIP\n\n\t\tTextureRef mCurrentDrawTexture = nullptr; // Stored texture ptr from last DIP\n\t\tVertexType mCurrentBatchVertexType;       // Vertex type of the current batch\n\t\tUInt       mLastDrawVertex = 0;           // Last vertex idx for next DIP\n\t\tUInt       mLastDrawIdx = 0;              // Last vertex index for next DIP\n\t\tUInt       mTrianglesCount = 0;           // Triangles count for next DIP\n\t\tUInt       mFrameTrianglesCount = 0;      // Total triangles at current frame\n\t\tUInt       mDrawCallsCount = 0;           // DrawIndexedPrimitives calls count\n\n\t\tUInt8*       mVertexData = nullptr;       // CPU-side vertex batch buffer\n\t\tUInt         mVertexBufferSize = 0;       // Max vertex count in batch buffer\n\t\tUInt         mVertexBufferByteSize = 0;   // Max byte size of vertex batch buffer\n\t\tVertexIndex* mVertexIndexData = nullptr;  // CPU-side index batch buffer\n\t\tint          mVertexBufferIdx = 0;        // Current vertex offset in batch (for GPU upload)\n\t\tUInt         mIndexBufferSize = 0;        // Max index count in batch buffer\n\t\tint          mIndexBufferIdx = 0;         // Current index offset in batch (for GPU upload)\n\n\t\tRef<Material> mDefaultMaterial; // Default material, loaded from Shaders/Default \n\t\tRef<Material> mCurrentMaterial; // Currently bound material\n\n\t\tRef<LogStream> mLog; // Render log stream\n\n\t\tTextureRef mWhiteTexture; // Default white texture\n\n\t\tVector<TextureRef> mTextures; // Loaded textures\n\t\tVector<Ref<Font>>  mFonts;    // Loaded fonts\n\n\t\tCamera mCamera;     // Camera transformation\n\t\tCamera mPrevCamera; // Previous camera transformation\n\n\t\tVec2I  mResolution;        // Primary back buffer size\n\t\tVec2I  mCurrentResolution; // Current back buffer size\n\t\tVec2I  mPrevResolution;    // Previous back buffer size\n\n\t\tVec2F  mViewScale;         // Current view scale, depends on camera\n\t\tVec2F  mInvViewScale;      // Inverted mViewScale\n\t\tVec2I  mDPI;               // Current device screen DPI\n\n\t\tVector<ScissorInfo>       mScissorInfos;               // Scissor clipping depth infos vector\n\t\tVector<ScissorStackEntry> mStackScissors;              // Stack of scissors clippings\n\t\tbool                      mClippingEverything = false; // Is everything clipped\n\n\t\tTextureRef mCurrentRenderTarget; // Current render target. NULL if rendering in back buffer\n\n\t\tfloat mDrawingDepth = 0.0f; // Current drawing depth, increments after each drawing drawables\n\n\t\tFT_Library mFreeTypeLib; // FreeType library, for rendering fonts\n\n\t\tVector<Sprite*>         mSprites; // All sprites\n\t\tVector<Ref<AtlasAsset>> mAtlases; // All atlases\n\n\t\tVertexIndex* mHardLinesIndexData = nullptr; // Index data buffer\n\t\tTextureRef   mSolidLineTexture;             // Solid line texture\n\t\tTextureRef   mDashLineTexture;              // Dash line texture\n\n\t\tVec2I mMaxTextureSize; // Max texture size\n\n\t\tbool mReady = false; // True, if render is ready to draw\n\n\tprotected:\n\t\t// Don't copy\n\t\tRender(const Render& other) = delete;\n\n\t\t// Don't copy\n\t\tRender& operator=(const Render& other);\n\n\t\t// Initializes platform specific part of render\n\t\tvoid InitializePlatform();\n\n\t\t// Initialized white texture\n\t\tvoid InitializeWhiteTexture();\n\n\t\t// Initializes index buffer for drawing lines - pairs of lines beginnings and ends\n\t\tvoid InitializeLinesIndexBuffer();\n\n\t\t// Initializes lines textures\n\t\tvoid InitializeLinesTextures();\n\n\t\t// Initializes free type library\n\t\tvoid InitializeFreeType();\n\n\t\t// Initializes standard shader\n\t\tvoid InitializeSandardShader();\n\n\t\t// Deinitializes platform specific part of render\n\t\tvoid DeinitializePlatform();\n\n\t\t// Deinitializes free type library\n\t\tvoid DeinitializeFreeType();\n\n\t\t// Returns platform specific max texture size\n\t\tVec2I GetPlatformMaxTextureSize();\n\n\t\t// Returns platform specific DPI\n\t\tVec2I GetPlatformDPI();\n\n\t\t// Called when target frame or window was resized\n\t\tvoid OnFrameResized();\n\n\t\t// Platform specific: binds next GPU buffer from pool and configures vertex attributes\n\t\tvoid PlatformBindNextPoolBuffers();\n\n\t\t// Platform specific begin of rendering\n\t\tvoid PlatformBegin();\n\n\t\t// Platform specific end of rendering\n\t\tvoid PlatformEnd();\n\n\t\t// Checks whether a batch break is needed for the given draw state\n\t\tbool CheckBatchBreak(const TextureRef& texture, PrimitiveType primitiveType,\n\t\t\t\t\t\t\t const Ref<Material>& material, const VertexType& batchVertexType,\n\t\t\t\t\t\t\t UInt verticesCount, UInt indexesCount) const;\n\n\t\t// Resolves a batch vertex layout using the default material-driven texcoord expansion rules\n\t\tVertexType ResolveBatchVertexTypeByMaterial(const VertexType& sourceVertexType,\n\t\t\t\t\t\t\t\t\t\t\t        const Ref<Material>& material) const;\n\n\t\t// Initializes default material (calls platform to load shaders and set mDefaultMaterial, mStdShader*)\n\t\tvoid InitializeDefaultMaterial();\n\n\t\t// Platform: load default shader files, compile, create default material, set mDefaultMaterial and mStdShader*\n\t\tvoid PlatformInitializeDefaultMaterial();\n\n\t\t// Platform specific material binding\n\t\tvoid PlatformBindMaterial(const Ref<Material>& material);\n\n\t\t// Platform specific batch vertex layout selection\n\t\tVertexType PlatformResolveBatchVertexType(const VertexType& sourceVertexType,\n\t\t\t\t\t\t\t\t\t\t          const Ref<Material>& material) const;\n\n\t\t// Send buffers to draw\n\t\tvoid DrawPrimitives();\n\n\t\t// Platform specific draw primitives (draw call)\n\t\tvoid PlatformDrawPrimitives();\n\n\t\t// Checks vertex buffer for texture coordinate flip by texture format\n\t\tvoid CheckVertexBufferTexCoordFlipByTextureFormat();\n\n\t\t// Platform specific flips current vertex buffer UX by Y\n\t\tvoid PlatformFlipVerticesUV();\n\n\t\t// Platform specific reset renderer state\n\t\tvoid PlatformResetState();\n\n\t\t// Sets orthographic view matrix by view size\n\t\tvoid SetupViewMatrix(const Vec2I& viewSize);\n\n\t\t// Updates render transformations for camera\n\t\tvoid UpdateCameraTransforms();\n\n\t\t// Platform specific setup camera transforms\n\t\tvoid PlatformSetupCameraTransforms(float* modelMatrix, float* viewMatrix, float* projMatrix);\n\n\t\t// Platform specific enable scissor test\n\t\tvoid PlatformEnableScissorTest();\n\n\t\t// Platform specific disable scissor test\n\t\tvoid PlatformDisableScissorTest();\n\n\t\t// Platform specific set scissor rect\n\t\tvoid PlatformSetScissorRect(const RectI& rect);\n\n\t\t// Platform specific bind render target\n\t\tvoid PlatformBindRenderTarget(const TextureRef& renderTarget);\n\n\t\t// Remaps UV coordinates from 0..1 range to texture source rect\n\t\tstatic void RemapUV(float srcU, float srcV, const RectI& srcRect,\n\t\t\t\t\t\t\tconst Vec2F& invTexSize, float& outU, float& outV);\n\n\t\t// Calculates screen space scissor clipping rectangle from camera space rectangle\n\t\tRectI CalculateScreenSpaceScissorRect(const RectF& cameraSpaceScissorRect) const;\n\n\t\t// Check textures for unloading\n\t\tvoid CheckTexturesUnloading();\n\n\t\t// Checks font for unloading\n\t\tvoid CheckFontsUnloading();\n\n\t\t// Called when assets was rebuilded\n\t\tvoid OnAssetsRebuilt(const Vector<UID>& changedAssets);\n\n\t\t// Called when sprite created, registers it in render\n\t\tstatic void OnSpriteCreated(Sprite* sprite);\n\n\t\t// Called when sprite destroyed, unregisters it from render\n\t\tstatic void OnSpriteDestroyed(Sprite* sprite);\n\n\t\t// Called when texture created, registers it in render\n\t\tvoid OnTextureCreated(Texture* texture);\n\n\t\t// Called when texture destroyed, unregisters it from render\n\t\tvoid OnTextureDestroyed(Texture* texture);\n\n\t\t// Called when atlas created, registers it in render\n\t\tvoid OnAtlasCreated(AtlasAsset* atlas);\n\n\t\t// Called when atlas destroyed, unregisters it from render\n\t\tvoid OnAtlasDestroyed(AtlasAsset* atlas);\n\n\t\t// Called when font created, registers it in render\n\t\tvoid OnFontCreated(Font* font);\n\n\t\t// Called when font destroyed, unregisters it from render\n\t\tvoid OnFontDestroyed(Font* font);\n\n\t\tfriend class Application;\n\t\tfriend class AtlasAsset;\n\t\tfriend class BitmapFont;\n\t\tfriend class BitmapFontAsset;\n\t\tfriend class Font;\n\t\tfriend class Integration;\n\t\tfriend class Material;\n\t\tfriend class RenderBase;\n\t\tfriend class Shader;\n\t\tfriend class Sprite;\n\t\tfriend class Texture;\n\t\tfriend class TextureRef;\n\t\tfriend class VectorFont;\n\t\tfriend class VectorFontAsset;\n\t\tfriend class WndProcFunc;\n\t\tfriend struct ApplicationPlatformWrapper;\n\t};\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Shader.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Shader.h\"\n\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    Shader::Shader()\n    {}\n\n    Shader::Shader(const String& source, Type type)\n    {\n        Compile(source, type);\n    }\n\n    Shader::Shader(const Shader& other):\n        mType(other.mType), mSource(other.mSource), mFileName(other.mFileName)\n    {\n        if (!mSource.IsEmpty())\n            Compile(mSource, mType);\n    }\n\n    Shader::~Shader()\n    {\n        PlatformDestroy();\n    }\n\n    bool Shader::Compile(const String& source, Type type)\n    {\n        PlatformDestroy();\n\n        mSource = source;\n        mType = type;\n        mReady = PlatformCompile(source, type);\n\n        return mReady;\n    }\n\n    bool Shader::IsReady() const\n    {\n        return mReady;\n    }\n\n    Shader::Type Shader::GetShaderType() const\n    {\n        return mType;\n    }\n\n    const String& Shader::GetSource() const\n    {\n        return mSource;\n    }\n\n    const String& Shader::GetFileName() const\n    {\n        return mFileName;\n    }\n\n    void Shader::SetFileName(const String& fileName)\n    {\n        mFileName = fileName;\n    }\n\n    String Shader::ResolvePlatformSourcePath(const String& sourcePath)\n    {\n#if defined PLATFORM_MAC || defined PLATFORM_IOS\n        if (sourcePath.EndsWith(\".metal\"))\n            return sourcePath;\n\n        return sourcePath + \".metal\";\n#else\n        return sourcePath;\n#endif\n    }\n\n    void Shader::PostRefConstruct()\n    {}\n\n#if IS_EDITOR\n    const TimeStamp& Shader::GetFileEditDate() const\n    {\n        return mFileEditDate;\n    }\n\n    void Shader::SetFileEditDate(const TimeStamp& date)\n    {\n        mFileEditDate = date;\n    }\n#endif\n}\n// --- META ---\n\nENUM_META(o2::Shader::Type, o2__Shader__Type)\n{\n    ENUM_ENTRY(Fragment);\n    ENUM_ENTRY(Vertex);\n}\nEND_ENUM_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Shader.h",
    "content": "#pragma once\n\n#if defined PLATFORM_WINDOWS\n#include \"o2/Render/Windows/ShaderBase.h\"\n#elif defined PLATFORM_ANDROID\n#include \"o2/Render/Android/ShaderBase.h\"\n#elif defined PLATFORM_MAC\n#include \"o2/Render/Mac/ShaderBase.h\"\n#elif defined PLATFORM_IOS\n#include \"o2/Render/iOS/ShaderBase.h\"\n#elif defined PLATFORM_WASM\n#include \"o2/Render/WebAssembly/ShaderBase.h\"\n#elif defined(PLATFORM_LINUX)\n#include \"o2/Render/Linux/ShaderBase.h\"\n#endif\n\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/System/Time/TimeStamp.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Render;\n    class Material;\n\n    // -----------------------------------------------------------------\n    // Shader render primitive. Represents a single GPU shader stage\n    // (vertex or fragment). Holds source code and a compiled GL handle.\n    // -----------------------------------------------------------------\n    class Shader : public ShaderBase, public RefCounterable\n    {\n    public:\n        // Shader stage type\n        enum class Type { Vertex, Fragment };\n\n    public:\n        PROPERTIES(Shader);\n        GETTER(Type, shaderType, GetShaderType);   // Shader stage type getter\n        GETTER(String, source, GetSource);         // Source code getter\n        GETTER(String, fileName, GetFileName);     // File name getter\n        GETTER(bool, ready, IsReady);              // Ready state getter\n\n    public:\n        // Default constructor\n        Shader();\n\n        // Constructor that compiles from source\n        Shader(const String& source, Type type);\n\n        // Copy-constructor, recompiles from source\n        Shader(const Shader& other);\n\n        // Destructor, releases GPU resources\n        ~Shader();\n\n        // Compiles the shader from GLSL source string. Returns true on success\n        bool Compile(const String& source, Type type);\n\n        // Returns true when shader is compiled and ready for use\n        bool IsReady() const;\n\n        // Returns shader stage type (vertex or fragment)\n        Type GetShaderType() const;\n\n        // Returns shader GLSL source code\n        const String& GetSource() const;\n\n        // Returns shader file name (set when loaded from file)\n        const String& GetFileName() const;\n\n        // Sets shader file name for identification\n        void SetFileName(const String& fileName);\n\n        // Resolves a platform-specific shader source path from the logical asset path\n        static String ResolvePlatformSourcePath(const String& sourcePath);\n\n#if IS_EDITOR\n        // Returns the file modification timestamp recorded at last load\n        const TimeStamp& GetFileEditDate() const;\n\n        // Sets the file modification timestamp\n        void SetFileEditDate(const TimeStamp& date);\n#endif\n\n    protected:\n        Type   mType = Type::Vertex; // Shader stage type\n        String mSource;              // GLSL source code\n        String mFileName;            // Source file name for logging\n        bool   mReady = false;       // True when compiled successfully\n\n    protected:\n        // Called after reference creation\n        void PostRefConstruct();\n\n        // Platform-specific compilation\n        bool PlatformCompile(const String& source, Type type);\n\n        // Platform-specific destruction\n        void PlatformDestroy();\n\n#if IS_EDITOR\n        TimeStamp mFileEditDate; // File modification time at last load\n#endif\n\n        friend class Render;\n        friend class Material;\n        friend class Ref<Shader>;\n        FRIEND_REF_MAKE();\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::Shader::Type);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/SkinningMesh.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SkinningMesh.h\"\n\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    SkinningMesh::SkinningMesh(TextureRef texture /*= TextureRef()*/, UInt vertexCount /*= 4*/, UInt polyCount /*= 2*/,\n                                 UInt bonesCount /*= 16*/)\n    {\n        SetTexture(texture);\n        Resize(vertexCount, polyCount, bonesCount);\n    }\n\n    SkinningMesh::SkinningMesh(const SkinningMesh& other)\n    {\n        SetTexture(other.mTexture);\n        Resize(other.mMaxVertexCount, other.mMaxPolyCount, other.mMaxBonesCount);\n\n        bonesCount = other.bonesCount;\n        vertexCount = other.vertexCount;\n        polyCount = other.polyCount;\n\n        memcpy(bones, other.bones, other.mMaxBonesCount*sizeof(Bone));\n        memcpy(vertices, other.vertices, other.mMaxVertexCount*sizeof(SkinningVertex));\n        memcpy(indexes, other.indexes, other.mMaxPolyCount*3*sizeof(VertexIndex));\n    }\n\n    SkinningMesh::~SkinningMesh()\n    {\n        delete[] bones;\n        delete[] vertices;\n        delete[] indexes;\n        delete[] mRenderVertexBuffer;\n    }\n\n    SkinningMesh& SkinningMesh::operator=(const SkinningMesh& other)\n    {\n        SetTexture(other.mTexture);\n        Resize(other.mMaxVertexCount, other.mMaxPolyCount, other.mMaxBonesCount);\n\n        bonesCount = other.bonesCount;\n        vertexCount = other.vertexCount;\n        polyCount = other.polyCount;\n\n        memcpy(bones, other.bones, other.mMaxBonesCount*sizeof(Bone));\n        memcpy(vertices, other.vertices, other.mMaxVertexCount*sizeof(SkinningVertex));\n        memcpy(indexes, other.indexes, other.mMaxPolyCount*3*sizeof(VertexIndex));\n\n        return *this;\n    }\n\n    void SkinningMesh::Resize(UInt vertexCount, UInt polyCount, UInt bonesCount)\n    {\n        if (bones) delete[] bones;\n        if (vertices) delete[] vertices;\n        if (indexes) delete[] indexes;\n        if (mRenderVertexBuffer) delete[] mRenderVertexBuffer;\n\n        bones = mnew Bone[bonesCount];\n        vertices = mnew SkinningVertex[vertexCount];\n        mRenderVertexBuffer = mnew Vertex[vertexCount];\n        indexes = mnew VertexIndex[polyCount*3];\n\n        mMaxBonesCount = bonesCount;\n        mMaxVertexCount = vertexCount;\n        mMaxPolyCount = polyCount;\n\n        bonesCount = 0;\n        vertexCount = 0;\n        polyCount = 0;\n    }\n\n    void SkinningMesh::Reskin()\n    {\n        for (UInt i = 0; i < vertexCount; i++)\n        {\n            auto& v = vertices[i];\n            Vec2F p = Vec2F(v.x, v.y);\n            Vec2F res = \n                 p*bones[v.bones[0]].releaseTransform*v.boneWeights[0] +\n                 p*bones[v.bones[1]].releaseTransform*v.boneWeights[1] + \n                 p*bones[v.bones[2]].releaseTransform*v.boneWeights[2] + \n                 p*bones[v.bones[3]].releaseTransform*v.boneWeights[3];\n\n            mRenderVertexBuffer[i].Set(res, v.color, v.tu, v.tv);\n        }\n    }\n\n    void SkinningMesh::Draw()\n    {\n        o2Render.DrawBuffer(PrimitiveType::Polygon, mRenderVertexBuffer, vertexCount, indexes, polyCount,\n                            GetMaterial(), mTexture);\n        OnDrawn();\n    }\n\n    void SkinningMesh::SetTexture(TextureRef texture)\n    {\n        mTexture = texture;\n    }\n\n    TextureRef SkinningMesh::GetTexture() const\n    {\n        return mTexture;\n    }\n\n    void SkinningMesh::SetMaxVertexCount(const UInt& count)\n    {\n        delete[] vertices;\n        delete[] mRenderVertexBuffer;\n\n        vertices = mnew SkinningVertex[count];\n        mRenderVertexBuffer = mnew Vertex[count];\n        mMaxVertexCount = count;\n        vertexCount = 0;\n    }\n\n    void SkinningMesh::SetMaxPolyCount(const UInt& count)\n    {\n        delete[] indexes;\n\n        indexes = new VertexIndex[count*3];\n        mMaxPolyCount = count;\n        polyCount = 0;\n    }\n\n    void SkinningMesh::SetMaxBonesCount(const UInt& count)\n    {\n        delete[] bones;\n\n        bones = new Bone[count];\n        mMaxBonesCount = count;\n        bonesCount = 0;\n    }\n\n    UInt SkinningMesh::GetMaxVertexCount() const\n    {\n        return mMaxVertexCount;\n    }\n\n    UInt SkinningMesh::GetMaxPolyCount() const\n    {\n        return mMaxPolyCount;\n    }\n\n    UInt SkinningMesh::GetMaxBonesCount() const\n    {\n        return mMaxBonesCount;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/SkinningMesh.h",
    "content": "﻿#pragma once\n\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n\n#include \"o2/Utils/Property.h\"\n\nnamespace o2\n{\n\n    // ------------------------------------------------------------------------------------------\n    // Triangles SkinnableMesh. Containing bones, skinning vertices, indexes of polygons, texture\n    // ------------------------------------------------------------------------------------------\n    class SkinningMesh : public virtual IDrawable, public virtual RefCounterable, public ICloneableRef\n    {\n    public:\n        struct Bone\n        {\n            Basis baseTransform;\n            Basis releaseTransform;\n\n            Bone* parentBone = nullptr;\n            Vector<Bone*> childrenBones;\n        };\n\n        struct SkinningVertex : public Vertex\n        {\n            UInt8 bones[4] = { 0, 0, 0, 0 };\n            float boneWeights[4] = { 1, 0, 0, 0 };\n        };\n\n    public:\n        PROPERTIES(SkinningMesh);\n        PROPERTY(TextureRef, texture, SetTexture, GetTexture);                // Texture property\n        PROPERTY(UInt, maxVertexCount, SetMaxVertexCount, GetMaxVertexCount); // Max vertex count property\n        PROPERTY(UInt, maxPolyCount, SetMaxPolyCount, GetMaxPolyCount);       // Max polygons count property\n        PROPERTY(UInt, maxBonesCount, SetMaxBonesCount, GetMaxBonesCount);    // Max bones count property\n\n    public:\n        Basis transform; // Root transform\n\n        Bone* bones = nullptr; // Bones buffer\n        UInt  bonesCount = 0;  // Current bones count\n\n        SkinningVertex* vertices = nullptr; // Vertex buffer\n        UInt            vertexCount = 0;    // Current vertices count\n\n        VertexIndex* indexes = nullptr;  // Index buffer\n        UInt         polyCount = 0;      // Current polygons in SkinnableMesh                                          \n\n    public:\n        // Constructor\n        SkinningMesh(TextureRef texture = TextureRef(), UInt vertexCount = 4, UInt polyCount = 2, UInt bonesCount = 16);\n\n        // Copy-constructor\n        SkinningMesh(const SkinningMesh& other);\n\n        // Destructor\n        ~SkinningMesh();\n\n        // Assign operator\n        SkinningMesh& operator=(const SkinningMesh& other);\n\n        // Resizing SkinnableMesh buffers, looses data\n        void Resize(UInt vertexCount, UInt polyCount, UInt bonesCount);\n\n        // Updates vertices by bones transformations\n        void Reskin();\n\n        // Drawing SkinnableMesh\n        void Draw() override;\n\n        // Sets texture\n        void SetTexture(TextureRef texture);\n\n        // Returns texture ptr\n        TextureRef GetTexture() const;\n\n        // Sets max vertex count buffer\n        void SetMaxVertexCount(const UInt& count);\n\n        // Sets max polygons count buffer\n        void SetMaxPolyCount(const UInt& count);\n\n        // Sets max bones count buffer\n        void SetMaxBonesCount(const UInt& count);\n\n        // Returns max vertex buffer size\n        UInt GetMaxVertexCount() const;\n\n        // Returns max polygons count\n        UInt GetMaxPolyCount() const;\n\n        // Returns max bones count\n        UInt GetMaxBonesCount() const;\n\n        CLONEABLE_REF(SkinningMesh);\n\n    protected:\n        TextureRef mTexture; // Texture\n\n        UInt mMaxBonesCount = 0;  // Max size of bones buffer\n        UInt mMaxVertexCount = 0; // Max size of vertex buffer\n        UInt mMaxPolyCount = 0;   // Max polygons count, mMaxPolyCount*3 - is index buffer max size\n\n        Vertex* mRenderVertexBuffer = nullptr; // Vertex list, used for rendering. Obtained from origin vertex skinning\n\n        friend class Render;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Spine/Spine.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Spine.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Render/Render.h\"\n\n#include \"spine/SkeletonRenderer.h\"\n#include \"spine/Animation.h\"\n\nnamespace o2\n{\n    Spine::Spine(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {}\n\n    Spine::Spine(RefCounter* refCounter, const Spine& other):\n        Spine(refCounter, other.mSpineAsset)\n    {}\n\n    Spine::Spine(RefCounter* refCounter, const AssetRef<SpineAsset>& spine):\n        RefCounterable(refCounter)\n    {\n        Load(spine);\n    }\n\n    Spine::~Spine()\n    {\n        Unload();\n    }\n\n    Spine& Spine::operator=(const Spine& other)\n    {\n        Unload();\n\n        return *this;\n    }\n\n    void Spine::Load(const AssetRef<SpineAsset>& spine)\n    {\n        Unload();\n\n        mSpineAsset = spine;\n\n        if (!mSpineAsset || !mSpineAsset->GetSpineSkeletonData() || !mSpineAsset->GetSpineAnimationStateData())\n            return;\n\n        // Load skeleton and animation state\n        mSkeleton = mnew spine::Skeleton(mSpineAsset->GetSpineSkeletonData());\n        mAnimationState = mnew spine::AnimationState(mSpineAsset->GetSpineAnimationStateData());\n\n        // Setup pose\n        mAnimationState->apply(*mSkeleton);\n        mSkeleton->updateWorldTransform(spine::Physics::Physics_None);\n\n        // Get animation names\n        mAnimationNames.Clear();\n        auto animations = mSkeleton->getData()->getAnimations();\n        for (int i = 0; i < animations.size(); ++i)\n            mAnimationNames.Add(animations[i]->getName().buffer());\n    }\n\n    void Spine::Unload()\n    {\n        if (mSkeleton)\n        {\n            delete mSkeleton;\n            mSkeleton = nullptr;\n        }\n\n        if (mAnimationState)\n        {\n            delete mAnimationState;\n            mAnimationState = nullptr;\n        }\n    }\n\n    void Spine::Draw()\n    {\n        static spine::SkeletonRenderer skeletonRenderer;\n\n        spine::RenderCommand* command = skeletonRenderer.render(*mSkeleton);\n        while (command) \n        {\n            Vertex vertex;\n\n            float* positions = command->positions;\n            float* uvs = command->uvs;\n            uint32_t* colors = command->colors;\n            uint16_t* indices = command->indices;\n            Texture* texture = (Texture*)command->texture;\n\n            mVertices.Clear();\n            mIndices.Clear();\n\n            for (int i = 0; i < command->numVertices; ++i)\n            {\n                int ii = i*2;\n                Vec2F position(positions[ii], positions[ii + 1]);\n                position = transform * position;\n\n                vertex.x = position.x;\n                vertex.y = position.y;\n                vertex.tu = uvs[ii];\n                vertex.tv = 1.0f - uvs[ii + 1];\n                vertex.color = colors[i];\n                mVertices.Add(vertex);\n            }\n\n            for (int i = 0, n = command->numIndices; i < n; ++i)\n                mIndices.Add(indices[i]);\n\n            TextureRef textureRef = TextureRef((Texture*)command->texture);\n            o2Render.DrawBuffer(PrimitiveType::Polygon, mVertices.Data(), command->numVertices,\n                                mIndices.Data(), command->numIndices/3, o2Render.GetDefaultMaterial(), textureRef);\n\n            if (o2Input.IsKeyDown(VK_F3))\n                o2Render.DrawMeshBufferWire(mVertices.Data(), command->numVertices, mIndices.Data(), command->numIndices/3, Color4::Red());\n                \n            command = command->next;\n        }\n\n        OnDrawn();\n    }\n\n    void Spine::Update(float dt)\n    {\n        if (!mSkeleton || !mAnimationState)\n            return;\n\n        mAnimationState->update(dt);\n        mAnimationState->apply(*mSkeleton);\n\n        mSkeleton->update(dt);\n        mSkeleton->updateWorldTransform(spine::Physics::Physics_Update);\n    }\n\n    const Vector<String>& Spine::GetAnimationNames() const\n    {\n        return mAnimationNames;\n    }\n\n    Ref<Spine::Track> Spine::GetTrack(const String& name)\n    {\n        int trackIndex = mAnimationNames.IndexOf(name);\n        if (trackIndex == -1)\n        {\n            o2Debug.LogError(\"Spine animation %s not found\", name.Data());\n            return nullptr;\n        }\n\n        return mmake<Track>(Ref(this), trackIndex, name);\n    }\n\n    Spine::Track::Track(const Ref<Spine>& owner, int trackIndex, const String& name)\n    {\n        mOwner = owner;\n        mAnimationName = name;\n\t\tmTrackIndex = trackIndex;\n\n        if (auto owner = mOwner.Lock())\n        {\n            if (owner->mSkeleton)\n            {\n\t\t\t\tmAnimation = owner->mSkeleton->getData()->findAnimation(mAnimationName.Data());\n                if (mAnimation)\n                {\n                    mDuration = mAnimation->getDuration();\n                    ResetBounds();\n                }\n            }\n        }\n    }\n\n\tSpine::Track::~Track()\n\t{\n\t\tif (mOwner && mTrackEntry)\n\t\t\tmOwner.Lock()->mAnimationState->clearTrack(mTrackIndex);\n\t}\n\n\tvoid Spine::Track::SetTime(float time)\n    {\n        auto tmpTrackEntry = mTrackEntry;\n        mTrackEntry = nullptr;\n\n        IAnimation::SetTime(time);\n\n        mTrackEntry = tmpTrackEntry;\n        if (mOwner && mTrackEntry)\n            mTrackEntry->setTrackTime(time);\n    }\n\n    void Spine::Track::SetWeight(float weight)\n    {\n        if (mOwner && mTrackEntry)\n            mTrackEntry->setAlpha(weight);\n    }\n\n    float Spine::Track::GetWeight() const\n    {\n        if (mOwner && mTrackEntry)\n            return mTrackEntry->getAlpha();\n\n        return 0.0f;\n    }\n\n    void Spine::Track::Evaluate()\n    {\n        if (mOwner && mTrackEntry)\n        {\n            float x;\n            mInDurationTime = modff(mTrackEntry->getTrackTime()/mDuration, &x)*mDuration;\n        }\n    }\n\n\tvoid Spine::Track::OnPlay()\n\t{\n\t\tif (mOwner && mAnimation)\n            mTrackEntry = mOwner.Lock()->mAnimationState->setAnimation(mTrackIndex, mAnimation, mLoop == Loop::Repeat);\n\t}\n\n\tvoid Spine::Track::OnStop()\n\t{\n\t\tif (mOwner && mTrackEntry) \n            mOwner.Lock()->mAnimationState->clearTrack(mTrackIndex);\n\t}\n\n\tvoid Spine::Track::OnLoopChanged()\n    {\n        if (mOwner && mTrackEntry)\n            mTrackEntry->setLoop(mLoop == Loop::Repeat);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Spine::Track, o2__Spine__Track);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Spine/Spine.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/Spine/SpineAsset.h\"\n#include \"o2/Assets/Types/Spine/SpineAtlasAsset.h\"\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\n#include \"3rdPartyLibs/Spine/spine-cpp/include/spine/Skeleton.h\"\n#include \"3rdPartyLibs/Spine/spine-cpp/include/spine/AnimationState.h\"\n#include \"3rdPartyLibs/Spine/spine-cpp/include/spine/Animation.h\"\n\nnamespace o2\n{\n    // --------------------------------\n    // EsotericSoftware Spine animation\n    // --------------------------------\n    class Spine : public virtual IDrawable, public virtual RefCounterable, public ICloneableRef\n    {\n    public:\n        PROPERTIES(Spine);\n\n    public:\n        // ---------------------\n        // Spine animation track\n        // ---------------------\n        class Track: public IAnimation\n        {\n        public:\n            // Default constructor\n            Track() = default;\n\n            // Constructor\n            Track(const Ref<Spine>& owner, int trackIndex, const String& name);\n\n\t\t\t// Destructor\n\t\t\t~Track() override;\n\n            // Sets time\n            void SetTime(float time) override;\n\n            // Sets animation weight for blending\n            void SetWeight(float weight);\n\n            // Returns animation weight\n            float GetWeight() const;\n\n            SERIALIZABLE(Track);\n\n        private:\n            WeakRef<Spine> mOwner; // Spine reference\n\n            String mAnimationName;   // Animation name\n            int    mTrackIndex = -1; // Spine track index\n\n\t\t\tspine::TrackEntry* mTrackEntry = nullptr; // Spine track entry\n\t\t\tspine::Animation*  mAnimation = nullptr;  // Spine animation\n\n        private:\n            // Called for updating animated object, after updating time\n\t\t\tvoid Evaluate() override;\n            \n\t\t\t// Called when animation starts playing\n\t\t\tvoid OnPlay() override;\n\n\t\t\t// Called when animation stops playing\n\t\t\tvoid OnStop() override;\n\n            // Called when animation loop state changed\n            void OnLoopChanged() override;\n        };\n\n    public:\n        Basis transform; // Root transform                                       \n\n    public:\n        // Constructor\n        explicit Spine(RefCounter* refCounter);\n\n        // Constructor with spine asset\n        Spine(RefCounter* refCounter, const AssetRef<SpineAsset>& spine);\n\n        // Copy-constructor\n        Spine(RefCounter* refCounter, const Spine& other);\n\n        // Destructor\n        ~Spine();\n\n        // Assign operator\n        Spine& operator=(const Spine& other);\n\n        // Load spine skeleton\n        void Load(const AssetRef<SpineAsset>& spine);\n\n        // Unload spine skeleton\n        void Unload();\n\n        // Drawing SkinnableMesh\n        void Draw() override;\n\n        // Updates spine animation\n        void Update(float dt);\n\n        // Returns spine animation names\n        const Vector<String>& GetAnimationNames() const;\n\n        // Returns spine animation track\n        Ref<Track> GetTrack(const String& name);\n\n        CLONEABLE_REF(Spine);\n\n    protected:\n        AssetRef<SpineAsset> mSpineAsset; // Spine asset @SERIALIZABLE @EDITOR_PROPERTY\n\n        spine::Skeleton*       mSkeleton = nullptr;       // Spine skeleton\n        spine::AnimationState* mAnimationState = nullptr; // Spine animation state\n\n        Vector<String> mAnimationNames; // Animation names\n\n        Vector<Vertex>      mVertices; // Vertices buffer\n        Vector<VertexIndex> mIndices;  // Indices buffer\n\n        friend class Render;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Spine::Track)\n{\n    BASE_CLASS(o2::IAnimation);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Spine::Track)\n{\n    FIELD().PRIVATE().NAME(mOwner);\n    FIELD().PRIVATE().NAME(mAnimationName);\n    FIELD().PRIVATE().DEFAULT_VALUE(-1).NAME(mTrackIndex);\n    FIELD().PRIVATE().DEFAULT_VALUE(nullptr).NAME(mTrackEntry);\n    FIELD().PRIVATE().DEFAULT_VALUE(nullptr).NAME(mAnimation);\n}\nEND_META;\nCLASS_METHODS_META(o2::Spine::Track)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<Spine>&, int, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTime, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWeight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetWeight);\n    FUNCTION().PRIVATE().SIGNATURE(void, Evaluate);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnPlay);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnStop);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnLoopChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Spine/SpineManager.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SpineManager.h\"\n\n#include <spine/Extension.h>\n\nnamespace o2\n{\n    DECLARE_SINGLETON(SpineManager);\n\n    SpineManager::SpineManager(RefCounter* refCounter):\n        Singleton(refCounter)\n    {}\n\n    void SpineTextureLoader::load(spine::AtlasPage& page, const spine::String& path)\n    {\n        TextureRef texture(String(path.buffer()));\n\n        void* texturePtr = texture.Get();\n        mUsedTextures[texturePtr] = texture;\n\n        page.texture = texturePtr;\n    }\n\n    void SpineTextureLoader::unload(void* texture)\n    {\n        mUsedTextures.Remove(texture);\n    }\n}\n\nspine::SpineExtension* spine::getDefaultExtension()\n{\n    return mnew spine::DefaultSpineExtension();\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Spine/SpineManager.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Render/TextureRef.h\"\n\n#include \"spine/TextureLoader.h\"\n#include \"spine/Atlas.h\"\n\nnamespace o2\n{\n    // ---------------------\n    // Spine textures loader\n    // ---------------------\n    class SpineTextureLoader : public spine::TextureLoader\n    {\n    public:\n        // Called when the atlas loads the texture of a page.\n        void load(spine::AtlasPage& page, const spine::String& path) override;\n\n        // Called when the atlas is disposed and itself disposes its atlas pages.\n        void unload(void* texture) override;\n\n    protected:\n        Map<void*, TextureRef> mUsedTextures; // List of used textures\n    };\n\n    // ------------------------------------------------------------------------------\n    // Spine manager. Initializes spine subsystems and contains spine textures loader\n    // ------------------------------------------------------------------------------\n    class SpineManager : public Singleton<SpineManager>\n    {\n    public:\n        SpineTextureLoader textureLoader; // Spine textures loader\n\n    public:\n        // Constructor. Initializes spine subsystems\n        SpineManager(RefCounter* refCounter);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Sprite.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Sprite.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/AtlasAsset.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    Sprite::Sprite():\n        mMeshBuildFunc(&Sprite::BuildDefaultMesh), mMesh(nullptr, 16, 18)\n    {\n        for (int i = 0; i < 4; i++)\n            mCornersColors[i] = Color4::White();\n\n        UpdateMaterial();\n        UpdateMesh();\n\n        Render::OnSpriteCreated(this);\n    }\n\n    Sprite::Sprite(const AssetRef<ImageAsset>& image):\n        mMeshBuildFunc(&Sprite::BuildDefaultMesh), mMesh(nullptr, 16, 18)\n    {\n        for (int i = 0; i < 4; i++)\n            mCornersColors[i] = Color4::White();\n\n        LoadFromImage(image);\n\n        Render::OnSpriteCreated(this);\n    }\n\n    Sprite::Sprite(const String& imagePath):\n        mMeshBuildFunc(&Sprite::BuildDefaultMesh), mMesh(nullptr, 16, 18)\n    {\n        for (int i = 0; i < 4; i++)\n            mCornersColors[i] = Color4::White();\n\n        LoadFromImage(imagePath);\n\n        Render::OnSpriteCreated(this);\n    }\n\n    Sprite::Sprite(TextureRef texture, const RectI& srcRect /*= RectI()*/):\n        mTextureSrcRect(srcRect), mMeshBuildFunc(&Sprite::BuildDefaultMesh), mMesh(texture, 16, 18)\n    {\n        if (srcRect == RectI())\n            mTextureSrcRect = RectI(Vec2I(), texture->GetSize());\n\n        mMesh.SetTextureSrcRect(mTextureSrcRect);\n\n        for (int i = 0; i < 4; i++)\n            mCornersColors[i] = Color4::White();\n\n        UpdateMesh();\n\n        Render::OnSpriteCreated(this);\n    }\n\n    Sprite::Sprite(const Color4& color):\n        mMeshBuildFunc(&Sprite::BuildDefaultMesh), mMesh(nullptr, 16, 18)\n    {\n        for (int i = 0; i < 4; i++)\n            mCornersColors[i] = Color4::White();\n\n        LoadMonoColor(color);\n\n        Render::OnSpriteCreated(this);\n    }\n\n    Sprite::Sprite(const Bitmap& bitmap):\n        mMeshBuildFunc(&Sprite::BuildDefaultMesh), mMesh(nullptr, 16, 18)\n    {\n        for (int i = 0; i < 4; i++)\n            mCornersColors[i] = Color4::White();\n\n        LoadFromBitmap(bitmap);\n\n        Render::OnSpriteCreated(this);\n    }\n\n    Sprite::Sprite(const Sprite& other):\n        mImageAsset(other.mImageAsset), mTextureSrcRect(other.mTextureSrcRect), IRectDrawable(other), \n        mMesh(other.mMesh), mMode(other.mMode), mFill(other.mFill), mSlices(other.mSlices),\n        mMeshBuildFunc(other.mMeshBuildFunc), mTileScale(other.mTileScale)\n    {\n        for (int i = 0; i < 4; i++)\n            mCornersColors[i] = other.mCornersColors[i];\n\n\t\tUpdateMaterial();\n\t\tUpdateColor();\n\n\t\tRender::OnSpriteCreated(this);\n    }\n\n    Sprite::~Sprite()\n    {\n        Render::OnSpriteDestroyed(this);\n    }\n\n    Sprite& Sprite::operator=(const Sprite& other)\n    {\n        mMesh           = other.mMesh;\n        mTextureSrcRect = other.mTextureSrcRect;\n        mImageAsset     = other.mImageAsset;\n        mMode           = other.mMode;\n        mFill           = other.mFill;\n        mSlices         = other.mSlices;\n        mTileScale      = other.mTileScale;\n        mMeshBuildFunc  = other.mMeshBuildFunc;\n\n        IRectDrawable::operator=(other);\n\n        return *this;\n    }\n\n    void Sprite::Draw()\n    {\n        if (!mEnabled)\n            return;\n\n        if (IsRenderDrawCallsDebugEnabled())\n            o2Render.mLog->Out(\"- Draw sprite: \" + mImageAsset->GetPath());\n\n        mMesh.Draw();\n        OnDrawn();\n\n        if (o2Input.IsKeyDown(VK_F3))\n        {\n            o2Render.DrawMeshWire(&mMesh, Color4(0, 0, 0, 100));\n\n            const float normalLen = 30.0f;\n            Vertex* verts = mMesh.GetVertices<Vertex>();\n            for (UInt i = 0; i < mMesh.vertexCount; i++)\n            {\n                Vec2F pos(verts[i].x, verts[i].y);\n                Vec2F tangent(verts[i].nx, verts[i].ny);\n                Vec2F bitangent(-tangent.y, tangent.x);\n\n                o2Render.DrawArrow(pos, pos + tangent * normalLen, Color4::Red());\n                o2Render.DrawArrow(pos, pos + bitangent * normalLen, Color4::Green());\n            }\n        }\n    }\n\n    void Sprite::SetTexture(const TextureRef& texture)\n    {\n        mMesh.SetTexture(texture);\n        mImageAsset = AssetRef<ImageAsset>();\n    }\n\n    const TextureRef& Sprite::GetTexture() const\n    {\n        return mMesh.GetTexture();\n    }\n\n    void Sprite::SetTextureSrcRect(const RectI& rect)\n    {\n        mTextureSrcRect = rect;\n        mMesh.SetTextureSrcRect(rect);\n    }\n\n    RectI Sprite::GetTextureSrcRect() const\n    {\n        return mTextureSrcRect;\n    }\n\n    Vec2I Sprite::GetOriginalSize() const\n    {\n        return mTextureSrcRect.Size();\n    }\n\n    void Sprite::SetCornerColor(Corner corner, const Color4& color)\n    {\n        mCornersColors[(int)corner] = color;\n    }\n\n\tvoid Sprite::SetCornerColors(const Color4& leftTop, const Color4& rightTop, const Color4& rightBottom, const Color4& leftBottom)\n\t{\n\t\tmCornersColors[(int)Corner::LeftTop] = leftTop;\n\t\tmCornersColors[(int)Corner::RightTop] = rightTop;\n\t\tmCornersColors[(int)Corner::RightBottom] = rightBottom;\n\t\tmCornersColors[(int)Corner::LeftBottom] = leftBottom;\n\t}\n\n\tColor4 Sprite::GetCornerColor(Corner corner) const\n    {\n        return mCornersColors[(int)corner];\n    }\n\n    void Sprite::SetLeftTopColor(const Color4& color)\n    {\n        mCornersColors[(int)Corner::LeftTop] = color;\n    }\n\n    Color4 Sprite::GetLeftTopCorner() const\n    {\n        return mCornersColors[(int)Corner::LeftTop];\n    }\n\n    void Sprite::SetRightTopColor(const Color4& color)\n    {\n        mCornersColors[(int)Corner::RightTop] = color;\n    }\n\n    Color4 Sprite::GetRightTopCorner() const\n    {\n        return mCornersColors[(int)Corner::RightTop];\n    }\n\n    void Sprite::SetRightBottomColor(const Color4& color)\n    {\n        mCornersColors[(int)Corner::RightBottom] = color;\n    }\n\n    Color4 Sprite::GetRightBottomCorner() const\n    {\n        return mCornersColors[(int)Corner::RightBottom];\n    }\n\n    void Sprite::SetLeftBottomColor(const Color4& color)\n    {\n        mCornersColors[(int)Corner::LeftBottom] = color;\n    }\n\n    Color4 Sprite::GetLeftBottomCorner() const\n    {\n        return mCornersColors[(int)Corner::LeftBottom];\n    }\n\n    void Sprite::SetFill(float fill)\n    {\n        if (Math::Equals(mFill, fill))\n            return;\n\n        mFill = Math::Clamp01(fill);\n        UpdateMesh();\n    }\n\n    float Sprite::GetFill() const\n    {\n        return mFill;\n    }\n\n    void Sprite::SetTileScale(float scale)\n    {\n        mTileScale = Math::Abs(scale);\n        UpdateMesh();\n    }\n\n    float Sprite::GetTileScale() const\n    {\n        return mTileScale;\n    }\n\n    void Sprite::SetMode(SpriteMode mode)\n    {\n        if (mode == mMode)\n            return;\n\n        mMode = mode;\n\n        switch (mode)\n        {\n            case SpriteMode::Default:         mMeshBuildFunc = &Sprite::BuildDefaultMesh; break;\n            case SpriteMode::Sliced:          mMeshBuildFunc = &Sprite::BuildSlicedMesh; break;\n            case SpriteMode::Tiled:           mMeshBuildFunc = &Sprite::BuildTiledMesh; break;\n            case SpriteMode::FixedAspect:     mMeshBuildFunc = &Sprite::BuildFixedAspectMesh; break;\n            case SpriteMode::FillLeftToRight: mMeshBuildFunc = &Sprite::BuildFillLeftToRightMesh; break;\n            case SpriteMode::FillRightToLeft: mMeshBuildFunc = &Sprite::BuildFillRightToLeftMesh; break;\n            case SpriteMode::FillUpToDown:    mMeshBuildFunc = &Sprite::BuildFillUpToDownMesh; break;\n            case SpriteMode::FillDownToUp:    mMeshBuildFunc = &Sprite::BuildFillDownToUpMesh; break;\n            case SpriteMode::Fill360CW:       mMeshBuildFunc = &Sprite::BuildFill360CWMesh; break;\n            case SpriteMode::Fill360CCW:      mMeshBuildFunc = &Sprite::BuildFill360CCWMesh; break;\n            default:                          mMeshBuildFunc = &Sprite::BuildDefaultMesh; break;\n        }\n\n        UpdateMesh();\n    }\n\n    SpriteMode Sprite::GetMode() const\n    {\n        return mMode;\n    }\n\n    void Sprite::SetSliceBorder(const BorderI& border)\n    {\n        if (mSlices == border)\n            return;\n\n        mSlices = border;\n        UpdateMesh();\n    }\n\n    BorderI Sprite::GetSliceBorder() const\n    {\n        return mSlices;\n    }\n\n    bool Sprite::operator==(const Sprite& other) const\n    {\n        return IRectDrawable::operator==(other) && mTextureSrcRect == other.mTextureSrcRect && \n            mCornersColors[0] == other.mCornersColors[0] && mCornersColors[1] == other.mCornersColors[1] &&\n            mCornersColors[2] == other.mCornersColors[2] && mCornersColors[3] == other.mCornersColors[3] &&\n            mImageAsset == other.mImageAsset && mMode == other.mMode && mSlices == other.mSlices &&\n            Math::Equals(mTileScale, other.mTileScale) && Math::Equals(mFill, other.mFill);\n    }\n\n    bool Sprite::operator!=(const Sprite& other) const\n    {\n        return !operator==(other);\n    }\n\n    void Sprite::LoadFromImage(const AssetRef<ImageAsset>& image, bool setSizeByImage /*= true*/)\n    {\n        if (!image)\n        {\n            LoadMonoColor(Color4::White());\n            return;\n        }\n\n        mImageAsset = image;\n\n        UpdateMaterial();\n\n        mSlices = image->GetMeta()->sliceBorder;\n\n        SetMode(image->GetMeta()->defaultMode);\n\n        if (setSizeByImage)\n            SetSize(mTextureSrcRect.Size());\n        else\n            UpdateMesh();\n    }\n\n    void Sprite::LoadFromImage(const String& imagePath, bool setSizeByImage /*= true*/)\n    {\n        AssetRef<ImageAsset> assetRef = DynamicCast<ImageAsset>(o2Assets.GetAssetRef(imagePath).GetRef());\n        if (assetRef)\n            LoadFromImage(assetRef, setSizeByImage);\n        else \n            o2Debug.LogWarning(\"Can't load sprite from image by path (\" + imagePath + \"): image isn't exist\");\n    }\n\n    void Sprite::LoadFromImage(UID imageId, bool setSizeByImage /*= true*/)\n    {\n        AssetRef<ImageAsset> assetRef = DynamicCast<ImageAsset>(o2Assets.GetAssetRef(imageId).GetRef());\n        if (assetRef)\n            LoadFromImage(assetRef, setSizeByImage);\n        else \n            o2Debug.LogWarning(\"Can't create sprite from image by id (\" + imageId.ToString() + \"): image isn't exist\");\n    }\n\n    void Sprite::LoadMonoColor(const Color4& color)\n    {\n        mImageAsset = AssetRef<ImageAsset>();\n        mMesh.mTexture = TextureRef();\n        mMesh.mTextureSrcRect = RectI();\n        mColor = color;\n        mResultColor = color * mOverrideColor;\n        mCornersColors[0] = Color4::White();\n        mCornersColors[1] = Color4::White();\n        mCornersColors[2] = Color4::White();\n        mCornersColors[3] = Color4::White();\n\n        UpdateMesh();\n    }\n\n    void Sprite::LoadFromBitmap(const Bitmap& bitmap, bool setSizeByImage /*= true*/)\n    {\n        mImageAsset = AssetRef<ImageAsset>();\n        mMesh.mTexture = TextureRef(bitmap);\n        mTextureSrcRect.Set(Vec2F(), mMesh.mTexture->GetSize());\n        mMesh.mTextureSrcRect = mTextureSrcRect;\n\n        if (setSizeByImage)\n            SetSize(mMesh.mTexture->GetSize());\n        else \n\t\t\tUpdateMesh();\n    }\n\n    void Sprite::SetImageAsset(const AssetRef<ImageAsset>& asset)\n    {\n        LoadFromImage(asset, false);\n    }\n\n    AssetRef<ImageAsset> Sprite::GetImageAsset() const\n    {\n        return mImageAsset;\n    }\n\n    const String& Sprite::GetImageName() const\n    {\n        if (mImageAsset)\n            return mImageAsset->GetPath();\n\n        return String::empty;\n    }\n\n    UID Sprite::GetAtlasAssetId() const\n    {\n        if (mImageAsset)\n            return mImageAsset->GetAtlasUID();\n\n        return UID::empty;\n    }\n\n    void Sprite::NormalizeSize()\n    {\n        SetSize(mTextureSrcRect.Size());\n    }\n\n    void Sprite::NormalizeAspectByWidth()\n    {\n        float aspect = (float)mTextureSrcRect.Width()/(float)mTextureSrcRect.Height();\n        SetSize(Vec2F(mSize.x, mSize.x/aspect));\n    }\n\n    void Sprite::NormalizeAspectByHeight()\n    {\n        float aspect = (float)mTextureSrcRect.Width()/(float)mTextureSrcRect.Height();\n        SetSize(Vec2F(mSize.y*aspect, mSize.y));\n    }\n\n    void Sprite::NormalizeAspect()\n    {\n        float aspect = (float)mTextureSrcRect.Width()/(float)mTextureSrcRect.Height();\n\n        if (aspect > 1.0f)\n            SetSize(Vec2F(mSize.y*aspect, mSize.y));\n        else\n            SetSize(Vec2F(mSize.x, mSize.x/aspect));\n    }\n\n    void Sprite::BasisChanged()\n    {\n        UpdateMesh();\n    }\n\n    void Sprite::OnColorChanged()\n    {\n        UpdateMesh();\n    }\n\n    void Sprite::OnMaterialChanged()\n    {\n        mMesh.SetMaterial(GetMaterial());\n        IRectDrawable::OnMaterialChanged();\n    }\n\n    void Sprite::UpdateMesh()\n    {\n        (this->*mMeshBuildFunc)();\n    }\n\n    void Sprite::BuildDefaultMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        ULong rcc[4];\n        for (int i = 0; i < 4; i++)\n            rcc[i] = (mResultColor*mCornersColors[i]).ABGR();\n\n        static VertexIndex indexes[] ={ 0, 1, 2, 0, 2, 3 };\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n        verts[0].Set(mTransform.origin + mTransform.yv,                 rcc[0], 0.0f, 0.0f, normal);\n        verts[1].Set(mTransform.origin + mTransform.yv + mTransform.xv, rcc[1], 1.0f, 0.0f, normal);\n        verts[2].Set(mTransform.origin + mTransform.xv,                 rcc[2], 1.0f, 1.0f, normal);\n        verts[3].Set(mTransform.origin,                                 rcc[3], 0.0f, 1.0f, normal);\n\n        memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*6);\n\n        mMesh.vertexCount = 4;\n        mMesh.polyCount = 2;\n    }\n\n    void Sprite::BuildSlicedMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        Vec2F lastTransformXv = mTransform.xv;\n        float lastSizeX = mSize.x;\n\n        mTransform.xv *= mFill;\n        mSize.x *= mFill;\n\n        ULong rcc[4];\n        for (int i = 0; i < 4; i++)\n            rcc[i] = (mResultColor*mCornersColors[i]).ABGR();\n\n        static VertexIndex indexes[] ={\n            0, 1, 5,    0, 5, 4,    1, 2, 6,    1, 6, 5,    2, 3, 7,    2, 7, 6,\n            4, 5, 9,    4, 9, 8,    5, 6, 10,   5, 10, 9,   6, 7, 11,   6, 11, 10,\n            8, 9, 13,   8, 13, 12,  9, 10, 14,  9, 14, 13,  10, 11, 15, 10, 15, 14\n        };\n\n        Vec2F texSrcSize = mTextureSrcRect.Size();\n        Vec2F invTexSrcSize = Vec2F::One()/texSrcSize;\n        Vec2F sz = mSize*mScale;\n\n        float u0 = 0.0f;\n        float u1 = (float)mSlices.left*invTexSrcSize.x;\n\t\tfloat u2 = (texSrcSize.x - (float)mSlices.right) * invTexSrcSize.x;\n\t\tfloat u3 = 1.0f;\n\n        float v0 = 0.0f;\n        float v1 = (float)mSlices.top*invTexSrcSize.y;\n\t\tfloat v2 = (texSrcSize.y - (float)mSlices.bottom) * invTexSrcSize.y;\n\t\tfloat v3 = 1.0f;\n\n        Vec2F xv = mTransform.xv/sz.x;\n        Vec2F yv = mTransform.yv/sz.y;\n\n        Vec2F o = mTransform.origin;\n\n        Vec2F r1 = xv*(float)mSlices.left;\n        Vec2F r2 = xv*(sz.x - (float)mSlices.right);\n        Vec2F r3 = mTransform.xv;\n\n        Vec2F t1 = yv*(float)mSlices.bottom;\n        Vec2F t2 = yv*(sz.y - (float)mSlices.top);\n        Vec2F t3 = mTransform.yv;\n\n        if (mSlices.left + mSlices.right > sz.x)\n        {\n            float d = (mSlices.left + mSlices.right - sz.x)*0.5f;\n            r1 -= xv*d;\n            r2 += xv*d;\n\n            u1 = (mSlices.left - d)*invTexSrcSize.x;\n            u2 = (texSrcSize.x - mSlices.right + d)*invTexSrcSize.x;\n        }\n\n        if (mSlices.top + mSlices.bottom > sz.y)\n        {\n            float d = (mSlices.top + mSlices.bottom - sz.y)*0.5f;\n            t1 -= yv*d;\n            t2 += yv*d;\n\n            v1 = (mSlices.top - d)*invTexSrcSize.y;\n            v2 = (texSrcSize.y - mSlices.bottom + d)*invTexSrcSize.y;\n        }\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n\n        verts[0].Set(o      + t3, rcc[0], u0, v0, normal);\n        verts[1].Set(o + r1 + t3, rcc[0], u1, v0, normal);\n        verts[2].Set(o + r2 + t3, rcc[1], u2, v0, normal);\n        verts[3].Set(o + r3 + t3, rcc[1], u3, v0, normal);\n\n        verts[4].Set(o      + t2, rcc[0], u0, v1, normal);\n        verts[5].Set(o + r1 + t2, rcc[0], u1, v1, normal);\n        verts[6].Set(o + r2 + t2, rcc[1], u2, v1, normal);\n        verts[7].Set(o + r3 + t2, rcc[1], u3, v1, normal);\n\n        verts[8].Set(o      + t1, rcc[3], u0, v2, normal);\n        verts[9].Set(o + r1 + t1, rcc[3], u1, v2, normal);\n        verts[10].Set(o + r2 + t1, rcc[2], u2, v2, normal);\n        verts[11].Set(o + r3 + t1, rcc[2], u3, v2, normal);\n\n        verts[12].Set(o + Vec2F(), rcc[3], u0, v3, normal);\n        verts[13].Set(o      + r1, rcc[3], u1, v3, normal);\n        verts[14].Set(o      + r2, rcc[2], u2, v3, normal);\n        verts[15].Set(o      + r3, rcc[2], u3, v3, normal);\n\n        memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*18*3);\n\n        mMesh.vertexCount = 16;\n        mMesh.polyCount = 18;\n\n        mTransform.xv = lastTransformXv;\n        mSize.x = lastSizeX;\n    }\n\n    void Sprite::BuildTiledMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        ULong rcc[4];\n        for (int i = 0; i < 4; i++)\n            rcc[i] = (mResultColor*mCornersColors[i]).ABGR();\n\n        Vec2F tileSize = (Vec2F)(mTextureSrcRect.Size())*mTileScale;\n        Vec2F sz = mSize*mScale;\n        \n        if (Math::Equals(tileSize.x, 0.0f) || Math::Equals(tileSize.y, 0.0f))\n            return;\n\n        Vec2I tilesCount(Math::CeilToInt(sz.x/tileSize.x), Math::CeilToInt(sz.y/tileSize.y));\n\n        UInt requiredPolygons = tilesCount.x*tilesCount.y*2;\n        UInt requiredVecticiesCount = requiredPolygons*2;\n\n        if (mMesh.GetMaxVertexCount() < requiredVecticiesCount || mMesh.GetMaxPolyCount() < requiredPolygons)\n            mMesh.Resize(requiredVecticiesCount, requiredPolygons);\n\n        Vec2F xv = mTransform.xv/sz.x;\n        Vec2F yv = mTransform.yv/sz.y;\n\n        Vec2F o = mTransform.origin;\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n        int vi = 0, pi = 0;\n\n        float px0 = 0;\n        for (int x = 0; x < tilesCount.x; x++)\n        {\n            float px = (float)(x + 1)*tileSize.x;\n            float u = 1.0f;\n\n            if (px > sz.x)\n            {\n                u = 1.0f - (px - sz.x)/tileSize.x;\n                px = sz.x;\n            }\n\n            float py0 = 0;\n            for (int y = 0; y < tilesCount.y; y++)\n            {\n                float py = (float)(y + 1)*tileSize.y;\n                float v = 0.0f;\n\n                if (py > sz.y)\n                {\n                    v = (py - sz.y)/tileSize.y;\n                    py = sz.y;\n                }\n\n                int vii = vi;\n                verts[vi++].Set(o + xv*px0 + yv*py,  rcc[0], 0.0f, v,    normal);\n                verts[vi++].Set(o + xv*px  + yv*py,  rcc[1], u,    v,    normal);\n                verts[vi++].Set(o + xv*px  + yv*py0, rcc[2], u,    1.0f, normal);\n                verts[vi++].Set(o + xv*px0 + yv*py0, rcc[3], 0.0f, 1.0f, normal);\n\n                mMesh.mIndexData[pi++] = vii; mMesh.mIndexData[pi++] = vii + 1; mMesh.mIndexData[pi++] = vii + 2;\n                mMesh.mIndexData[pi++] = vii; mMesh.mIndexData[pi++] = vii + 2; mMesh.mIndexData[pi++] = vii + 3;\n\n                py0 = py;\n            }\n\n            px0 = px;\n        }\n\n        mMesh.vertexCount = vi;\n        mMesh.polyCount = pi/3;\n    }\n\n    void Sprite::BuildFixedAspectMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        ULong rcc[4];\n        for (int i = 0; i < 4; i++)\n            rcc[i] = (mResultColor*mCornersColors[i]).ABGR();\n\n        static VertexIndex indexes[] = { 0, 1, 2, 0, 2, 3 };\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n        Vec2 srcRectSize = mTextureSrcRect.Size();\n        float fy = mSize.x/srcRectSize.x*srcRectSize.y;\n        if (fy > mSize.y)\n        {\n            float fx = mSize.y/srcRectSize.y*srcRectSize.x;\n            float off = (mSize.x - fx)*0.5f;\n            Vec2F offx = mNonSizedTransform.xv*off;\n\n            verts[0].Set(mTransform.origin + mTransform.yv + offx,                 rcc[0], 0.0f, 0.0f, normal);\n            verts[1].Set(mTransform.origin + mTransform.yv + mTransform.xv - offx, rcc[1], 1.0f, 0.0f, normal);\n            verts[2].Set(mTransform.origin + mTransform.xv - offx,                 rcc[2], 1.0f, 1.0f, normal);\n            verts[3].Set(mTransform.origin + offx,                                 rcc[3], 0.0f, 1.0f, normal);\n        }\n        else\n        {\n            float off = (mSize.y - fy)*0.5f;\n            Vec2F offy = mNonSizedTransform.yv*off;\n\n            verts[0].Set(mTransform.origin + mTransform.yv - offy,                 rcc[0], 0.0f, 0.0f, normal);\n            verts[1].Set(mTransform.origin + mTransform.yv + mTransform.xv - offy, rcc[1], 1.0f, 0.0f, normal);\n            verts[2].Set(mTransform.origin + mTransform.xv + offy,                 rcc[2], 1.0f, 1.0f, normal);\n            verts[3].Set(mTransform.origin + offy,                                 rcc[3], 0.0f, 1.0f, normal);\n        }\n\n        memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*6);\n\n        mMesh.vertexCount = 4;\n        mMesh.polyCount = 2;\n    }\n\n    void Sprite::BuildFillLeftToRightMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        float coef = Math::Clamp01(mFill);\n\n        ULong rcc[4];\n        rcc[0] = (mResultColor*mCornersColors[0]).ABGR();\n        rcc[1] = (mResultColor*Math::Lerp(mCornersColors[0], mCornersColors[1], coef)).ABGR();\n        rcc[2] = (mResultColor*Math::Lerp(mCornersColors[3], mCornersColors[2], coef)).ABGR();\n        rcc[3] = (mResultColor*mCornersColors[3]).ABGR();\n\n        static VertexIndex indexes[] ={ 0, 1, 2, 0, 2, 3 };\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n        verts[0].Set(mTransform.origin + mTransform.yv,                      rcc[0], 0.0f, 0.0f, normal);\n        verts[1].Set(mTransform.origin + mTransform.yv + mTransform.xv*coef, rcc[1], coef, 0.0f, normal);\n        verts[2].Set(mTransform.origin + mTransform.xv*coef,                 rcc[2], coef, 1.0f, normal);\n        verts[3].Set(mTransform.origin,                                      rcc[3], 0.0f, 1.0f, normal);\n\n        memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*6);\n\n        mMesh.vertexCount = 4;\n        mMesh.polyCount = 2;\n    }\n\n    void Sprite::BuildFillRightToLeftMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        float coef = Math::Clamp01(mFill);\n        float invCoef = 1.0f - coef;\n\n        ULong rcc[4];\n        rcc[0] = (mResultColor*Math::Lerp(mCornersColors[1], mCornersColors[0], coef)).ABGR();\n        rcc[1] = (mResultColor*mCornersColors[1]).ABGR();\n        rcc[2] = (mResultColor*mCornersColors[2]).ABGR();\n        rcc[3] = (mResultColor*Math::Lerp(mCornersColors[2], mCornersColors[3], coef)).ABGR();\n\n        static VertexIndex indexes[] ={ 0, 1, 2, 0, 2, 3 };\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n        verts[0].Set(mTransform.origin + mTransform.yv + mTransform.xv*invCoef, rcc[0], invCoef, 0.0f, normal);\n        verts[1].Set(mTransform.origin + mTransform.yv + mTransform.xv,         rcc[1], 1.0f, 0.0f, normal);\n        verts[2].Set(mTransform.origin + mTransform.xv,                         rcc[2], 1.0f, 1.0f, normal);\n        verts[3].Set(mTransform.origin + mTransform.xv*invCoef,                 rcc[3], invCoef, 1.0f, normal);\n\n        memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*6);\n\n        mMesh.vertexCount = 4;\n        mMesh.polyCount = 2;\n    }\n\n    void Sprite::BuildFillUpToDownMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        float coef = Math::Clamp01(mFill);\n        float invCoef = 1.0f - coef;\n\n        ULong rcc[4];\n        rcc[0] = (mResultColor*mCornersColors[0]).ABGR();\n        rcc[1] = (mResultColor*mCornersColors[1]).ABGR();\n        rcc[2] = (mResultColor*Math::Lerp(mCornersColors[1], mCornersColors[2], coef)).ABGR();\n        rcc[3] = (mResultColor*Math::Lerp(mCornersColors[0], mCornersColors[3], coef)).ABGR();\n\n        static VertexIndex indexes[] ={ 0, 1, 2, 0, 2, 3 };\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n        verts[0].Set(mTransform.origin + mTransform.yv,                         rcc[0], 0.0f, 0.0f, normal);\n        verts[1].Set(mTransform.origin + mTransform.yv + mTransform.xv,         rcc[1], 1.0f, 0.0f, normal);\n        verts[2].Set(mTransform.origin + mTransform.xv + mTransform.yv*invCoef, rcc[2], 1.0f, coef, normal);\n        verts[3].Set(mTransform.origin + mTransform.yv*invCoef,                 rcc[3], 0.0f, coef, normal);\n\n        memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*6);\n\n        mMesh.vertexCount = 4;\n        mMesh.polyCount = 2;\n    }\n\n    void Sprite::BuildFillDownToUpMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        float coef = Math::Clamp01(mFill);\n\n        ULong rcc[4];\n        rcc[0] = (mResultColor*Math::Lerp(mCornersColors[3], mCornersColors[0], coef)).ABGR();\n        rcc[1] = (mResultColor*Math::Lerp(mCornersColors[2], mCornersColors[1], coef)).ABGR();\n        rcc[2] = (mResultColor*mCornersColors[2]).ABGR();\n        rcc[3] = (mResultColor*mCornersColors[3]).ABGR();\n\n        static VertexIndex indexes[] ={ 0, 1, 2, 0, 2, 3 };\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n        verts[0].Set(mTransform.origin + mTransform.yv*coef,                 rcc[0], 0.0f, 1.0f - coef, normal);\n        verts[1].Set(mTransform.origin + mTransform.yv*coef + mTransform.xv, rcc[1], 1.0f, 1.0f - coef, normal);\n        verts[2].Set(mTransform.origin + mTransform.xv,                      rcc[2], 1.0f, 1.0f, normal);\n        verts[3].Set(mTransform.origin,                                      rcc[3], 0.0f, 1.0f, normal);\n\n        memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*6);\n\n        mMesh.vertexCount = 4;\n        mMesh.polyCount = 2;\n    }\n\n    void Sprite::BuildFill360CWMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        float coef = Math::Clamp01(mFill);\n        float angle = 360.0f*coef;\n\n        ULong cornerResColr[4];\n        for (int i = 0; i < 4; i++)\n            cornerResColr[i] = (mResultColor*mCornersColors[i]).ABGR();\n\n        Vec2F zeroPos    = mTransform.origin + mTransform.xv*0.5f + mTransform.yv;\n        Vec2F centerPos  = mTransform.origin + mTransform.xv*0.5f + mTransform.yv*0.5f;\n\n        ULong centerResColr = (mResultColor*((mCornersColors[0] + mCornersColors[1] + mCornersColors[2] + mCornersColors[3])*0.25f)).ABGR();\n        ULong zeroResColor = (mResultColor*((mCornersColors[0] + mCornersColors[1])*0.5f)).ABGR();\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n\n        Vec2F dir = Vec2F::Rotated(Math::Deg2rad(-angle + 90.0f));\n        if (angle < 45.0f)\n        {\n            float dirCoef = 0.5f + dir.x/dir.y*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.xv*dirCoef + mTransform.yv;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[0], mCornersColors[1], dirCoef)).ABGR();\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(dirPoint, dirColor, dirCoef, 0.0f, normal);\n            verts[2].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 0, 1, 2 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3);\n            mMesh.vertexCount = 3;\n            mMesh.polyCount = 1;\n        }\n        else if (angle < 135.0f)\n        {\n            float dirCoef = 0.5f + dir.y/dir.x*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.xv + mTransform.yv*dirCoef;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[2], mCornersColors[1], dirCoef)).ABGR();\n\n            Vec2F cornerPos1 = mTransform.origin + mTransform.yv + mTransform.xv;\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(cornerPos1, cornerResColr[1], 1.0f, 0.0f, normal);\n            verts[2].Set(dirPoint, dirColor, 1.0f, 1.0f - dirCoef, normal);\n            verts[3].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 0, 1, 3, 1, 2, 3 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3*2);\n            mMesh.vertexCount = 4;\n            mMesh.polyCount = 2;\n        }\n        else if (angle < 225.0f)\n        {\n            float dirCoef = 0.5f - dir.x/dir.y*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.xv*dirCoef;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[3], mCornersColors[2], dirCoef)).ABGR();\n\n            Vec2F cornerPos1 = mTransform.origin + mTransform.yv + mTransform.xv;\n            Vec2F cornerPos2 = mTransform.origin + mTransform.xv;\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(cornerPos1, cornerResColr[1], 1.0f, 0.0f, normal);\n            verts[2].Set(cornerPos2, cornerResColr[2], 1.0f, 1.0f, normal);\n            verts[3].Set(dirPoint, dirColor, dirCoef, 1.0f, normal);\n            verts[4].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 0, 1, 4, 1, 2, 4, 2, 3, 4 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3*3);\n            mMesh.vertexCount = 5;\n            mMesh.polyCount = 3;\n        }\n        else if (angle < 315.0f)\n        {\n            float dirCoef = 0.5f - dir.y/dir.x*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.yv*dirCoef;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[3], mCornersColors[0], dirCoef)).ABGR();\n\n            Vec2F cornerPos1 = mTransform.origin + mTransform.yv + mTransform.xv;\n            Vec2F cornerPos2 = mTransform.origin + mTransform.xv;\n            Vec2F cornerPos3 = mTransform.origin;\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(cornerPos1, cornerResColr[1], 1.0f, 0.0f, normal);\n            verts[2].Set(cornerPos2, cornerResColr[2], 1.0f, 1.0f, normal);\n            verts[3].Set(cornerPos3, cornerResColr[3], 0.0f, 1.0f, normal);\n            verts[4].Set(dirPoint, dirColor, 0.0f, 1.0f - dirCoef, normal);\n            verts[5].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 0, 1, 5, 1, 2, 5, 2, 3, 5, 3, 4, 5 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3*4);\n            mMesh.vertexCount = 6;\n            mMesh.polyCount = 4;\n        }\n        else\n        {\n            float dirCoef = 0.5f + dir.x/dir.y*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.xv*dirCoef + mTransform.yv;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[0], mCornersColors[1], dirCoef)).ABGR();\n\n            Vec2F cornerPos0 = mTransform.origin + mTransform.yv;\n            Vec2F cornerPos1 = mTransform.origin + mTransform.yv + mTransform.xv;\n            Vec2F cornerPos2 = mTransform.origin + mTransform.xv;\n            Vec2F cornerPos3 = mTransform.origin;\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(cornerPos1, cornerResColr[0], 1.0f, 0.0f, normal);\n            verts[2].Set(cornerPos2, cornerResColr[1], 1.0f, 1.0f, normal);\n            verts[3].Set(cornerPos3, cornerResColr[2], 0.0f, 1.0f, normal);\n            verts[4].Set(cornerPos0, cornerResColr[3], 0.0f, 0.0f, normal);\n            verts[5].Set(dirPoint, dirColor, dirCoef, 0.0f, normal);\n            verts[6].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 0, 1, 6, 1, 2, 6, 2, 3, 6, 3, 4, 6, 4, 5, 6 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3*5);\n            mMesh.vertexCount = 7;\n            mMesh.polyCount = 5;\n        }\n    }\n\n    void Sprite::BuildFill360CCWMesh()\n    {\n        Vec2F normal = mTransform.xv.Normalized();\n        float coef = Math::Clamp01(mFill);\n        float angle = 360.0f*coef;\n\n        ULong cornerResColr[4];\n        for (int i = 0; i < 4; i++)\n            cornerResColr[i] = (mResultColor*mCornersColors[i]).ABGR();\n\n        Vec2F zeroPos   = mTransform.origin + mTransform.xv*0.5f + mTransform.yv;\n        Vec2F centerPos = mTransform.origin + mTransform.xv*0.5f + mTransform.yv*0.5f;\n\n        ULong centerResColr = (mResultColor*((mCornersColors[0] + mCornersColors[1] + mCornersColors[2] + mCornersColors[3])*0.25f)).ABGR();\n        ULong zeroResColor = (mResultColor*((mCornersColors[0] + mCornersColors[1])*0.5f)).ABGR();\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n\n        Vec2F dir = Vec2F::Rotated(Math::Deg2rad(angle + 90.0f));\n        if (angle < 45.0f)\n        {\n            float dirCoef = 0.5f + dir.x/dir.y*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.xv*dirCoef + mTransform.yv;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[0], mCornersColors[1], dirCoef)).ABGR();\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(dirPoint, dirColor, dirCoef, 0.0f, normal);\n            verts[2].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 1, 0, 2 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3);\n            mMesh.vertexCount = 3;\n            mMesh.polyCount = 1;\n        }\n        else if (angle < 135.0f)\n        {\n            float dirCoef = 0.5f - dir.y/dir.x*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.yv*dirCoef;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[2], mCornersColors[1], dirCoef)).ABGR();\n\n            Vec2F cornerPos0 = mTransform.origin + mTransform.yv;\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(cornerPos0, cornerResColr[0], 0.0f, 0.0f, normal);\n            verts[2].Set(dirPoint, dirColor, 0.0f, 1.0f - dirCoef, normal);\n            verts[3].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 1, 0, 3, 2, 1, 3 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3*2);\n            mMesh.vertexCount = 4;\n            mMesh.polyCount = 2;\n        }\n        else if (angle < 225.0f)\n        {\n            float dirCoef = 0.5f - dir.x/dir.y*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.xv*dirCoef;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[3], mCornersColors[2], dirCoef)).ABGR();\n\n            Vec2F cornerPos0 = mTransform.origin + mTransform.yv;\n            Vec2F cornerPos3 = mTransform.origin;\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(cornerPos0, cornerResColr[0], 0.0f, 0.0f, normal);\n            verts[2].Set(cornerPos3, cornerResColr[3], 0.0f, 1.0f, normal);\n            verts[3].Set(dirPoint, dirColor, dirCoef, 1.0f, normal);\n            verts[4].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 1, 0, 4, 2, 1, 4, 3, 2, 4 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3*3);\n            mMesh.vertexCount = 5;\n            mMesh.polyCount = 3;\n        }\n        else if (angle < 315.0f)\n        {\n            float dirCoef = 0.5f + dir.y/dir.x*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.yv*dirCoef + mTransform.xv;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[3], mCornersColors[0], dirCoef)).ABGR();\n\n            Vec2F cornerPos0 = mTransform.origin + mTransform.yv;\n            Vec2F cornerPos3 = mTransform.origin;\n            Vec2F cornerPos2 = mTransform.origin + mTransform.xv;\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(cornerPos0, cornerResColr[0], 0.0f, 0.0f, normal);\n            verts[2].Set(cornerPos3, cornerResColr[3], 0.0f, 1.0f, normal);\n            verts[3].Set(cornerPos2, cornerResColr[2], 1.0f, 1.0f, normal);\n            verts[4].Set(dirPoint, dirColor, 1.0f, 1.0f - dirCoef, normal);\n            verts[5].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 1, 0, 5, 2, 1, 5, 3, 2, 5, 4, 3, 5 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3*4);\n            mMesh.vertexCount = 6;\n            mMesh.polyCount = 4;\n        }\n        else\n        {\n            float dirCoef = 0.5f + dir.x/dir.y*0.5f;\n            Vec2F dirPoint = mTransform.origin + mTransform.xv*dirCoef + mTransform.yv;\n            ULong dirColor = (mResultColor*Math::Lerp(mCornersColors[0], mCornersColors[1], dirCoef)).ABGR();\n\n            Vec2F cornerPos0 = mTransform.origin + mTransform.yv;\n            Vec2F cornerPos3 = mTransform.origin;\n            Vec2F cornerPos2 = mTransform.origin + mTransform.xv;\n            Vec2F cornerPos1 = mTransform.origin + mTransform.yv + mTransform.xv;\n\n            verts[0].Set(zeroPos, zeroResColor, 0.5f, 0.0f, normal);\n            verts[1].Set(cornerPos0, cornerResColr[0], 0.0f, 0.0f, normal);\n            verts[2].Set(cornerPos3, cornerResColr[3], 0.0f, 1.0f, normal);\n            verts[3].Set(cornerPos2, cornerResColr[2], 1.0f, 1.0f, normal);\n            verts[4].Set(cornerPos1, cornerResColr[1], 1.0f, 0.0f, normal);\n            verts[5].Set(dirPoint, dirColor, dirCoef, 0.0f, normal);\n            verts[6].Set(centerPos, centerResColr, 0.5f, 0.5f, normal);\n\n            static VertexIndex indexes[] ={ 1, 0, 6, 2, 1, 6, 3, 2, 6, 4, 3, 6, 5, 4, 6 };\n            memcpy(mMesh.mIndexData, indexes, sizeof(VertexIndex)*3*5);\n            mMesh.vertexCount = 7;\n            mMesh.polyCount = 5;\n        }\n    }\n\n    void Sprite::OnSerialize(DataValue& node) const\n    {\n        if (!mImageAsset)\n        {\n            node[\"mTextureSrcRect\"] = mTextureSrcRect;\n\n            if (mMesh.GetTexture())\n                node[\"textureFileName\"] = mMesh.GetTexture()->GetFileName();\n        }\n    }\n\n    void Sprite::OnDeserialized(const DataValue& node)\n    {\n        SpriteMode mode = mMode;\n        mMode = (SpriteMode)((int)mode + 1);\n        SetMode(mode);\n\n\t\tUpdateMaterial();\n        UpdateColor();\n    }\n\n    void Sprite::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        OnDeserialized(node);\n    }\n\n    void Sprite::ReloadImage()\n    {\n        if (mImageAsset)\n        {\n            UpdateMaterial();\n            UpdateMesh();\n        }\n    }\n\n    void Sprite::UpdateMaterial()\n    {\n        if (mImageAsset)\n        {\n            auto atlasSpriteSource = mImageAsset->GetTextureSource();\n            mMesh.mTexture = atlasSpriteSource.texture;\n            mTextureSrcRect = atlasSpriteSource.sourceRect;\n            mMesh.mTextureSrcRect = mTextureSrcRect;\n        }\n\n\t\tmMesh.SetMaterial(GetMaterial());\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Sprite, o2__Sprite);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Sprite.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/IRectDrawable.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Editor/Attributes/ScriptableAttribute.h\"\n#include \"o2/Utils/Math/Border.h\"\n\nnamespace o2\n{\n    class Bitmap;\n\n    // -----------------\n    // Quad image sprite\n    // -----------------\n    class Sprite: public IRectDrawable\n    {\n    public:\n        PROPERTIES(Sprite);\n        PROPERTY(TextureRef, texture, SetTexture, GetTexture);                         // Texture property @SCRIPTABLE\n        PROPERTY(RectI, textureSrcRect, SetTextureSrcRect, GetTextureSrcRect);         // Texture source rectangle property @SCRIPTABLE\n        PROPERTY(AssetRef<ImageAsset>, image, SetImageAsset, GetImageAsset);           // Sets image asset @SCRIPTABLE\n        PROPERTY(String, imageName, LoadFromImage, GetImageName);                      // Sets image asset path @SCRIPTABLE\n        PROPERTY(Color4, leftTopColor, SetLeftTopColor, GetLeftTopCorner);             // Color of left top corner property @SCRIPTABLE\n        PROPERTY(Color4, rightTopColor, SetRightTopColor, GetRightTopCorner);          // Color of right top corner property @SCRIPTABLE\n        PROPERTY(Color4, leftBottomColor, SetLeftBottomColor, GetLeftBottomCorner);    // Color of left bottom corner property @SCRIPTABLE\n        PROPERTY(Color4, rightBottomColor, SetRightBottomColor, GetRightBottomCorner); // Color of right bottom corner property @SCRIPTABLE\n        PROPERTY(SpriteMode, mode, SetMode, GetMode);                                  // Sprite drawing mode property @SCRIPTABLE\n        PROPERTY(float, fill, SetFill, GetFill);                                       // Sprite fill property @SCRIPTABLE\n        PROPERTY(float, tileScale, SetTileScale, GetTileScale);                        // Sprite tile scale property, 1.0f is default @SCRIPTABLE\n        PROPERTY(BorderI, sliceBorder, SetSliceBorder, GetSliceBorder);                // Slice border property @SCRIPTABLE\n\n    public:\n        // Default constructor\n        Sprite();\n\n        // Constructor from image asset\n        explicit Sprite(const AssetRef<ImageAsset>& image);\n\n        // Constructor from image asset by path @SCRIPTABLE\n        explicit Sprite(const String& imagePath);\n\n        // Constructor from color\n        explicit Sprite(const Color4& color);\n\n        // Constructor from bitmap\n        explicit Sprite(const Bitmap& bitmap);\n\n        // Constructor from texture and source rectangle\n        Sprite(TextureRef texture, const RectI& srcRect = RectI());\n\n        // Copy-constructor\n        Sprite(const Sprite& other);\n\n        // Destructor\n        ~Sprite();\n\n        // Assign operator\n        Sprite& operator=(const Sprite& other);\n\n        // Equals operator\n        bool operator==(const Sprite& other) const;\n\n        // Not equals operator\n        bool operator!=(const Sprite& other) const;\n\n        // Loads sprite from image asset @SCRIPTABLE_NAME(LoadFromImageRef)\n        void LoadFromImage(const AssetRef<ImageAsset>& image, bool setSizeByImage = true);\n\n        // Loads sprite from image asset by path @SCRIPTABLE\n        void LoadFromImage(const String& imagePath, bool setSizeByImage = true);\n\n        // Loads sprite from image asset by id @SCRIPTABLE_NAME(LoadFromImageUID)\n        void LoadFromImage(UID imageId, bool setSizeByImage = true);\n\n        // Loads sprite from mono color @SCRIPTABLE\n        void LoadMonoColor(const Color4& color);\n\n        // Loads sprite from bitmap\n        void LoadFromBitmap(const Bitmap& bitmap, bool setSizeByImage = true);\n\n        // Draws sprite @SCRIPTABLE\n        void Draw() override;\n\n        // Sets using texture @SCRIPTABLE\n        void SetTexture(const TextureRef& texture);\n\n        // Returns using texture @SCRIPTABLE\n        const TextureRef& GetTexture() const;\n\n        // Sets texture source rectangle\n        void SetTextureSrcRect(const RectI& rect);\n\n        // Returns texture source rectangle\n        RectI GetTextureSrcRect() const;\n\n        // Returns original or texture source size\n        Vec2I GetOriginalSize() const;\n\n        // Sets corner color\n        void SetCornerColor(Corner corner, const Color4& color);\n\n\t\t// Sets colors of all corners\n\t\tvoid SetCornerColors(const Color4& leftTop, const Color4& rightTop,\n\t\t\t\t\t\t\t const Color4& rightBottom, const Color4& leftBottom);\n\n        // Returns corner color\n        Color4 GetCornerColor(Corner corner) const;\n\n        // Sets left top corner color\n        void SetLeftTopColor(const Color4& color);\n\n        // Returns left top corner color\n        Color4 GetLeftTopCorner() const;\n\n        // Sets right top corner color\n        void SetRightTopColor(const Color4& color);\n\n        // Returns right top corner color\n        Color4 GetRightTopCorner() const;\n\n        // Sets right bottom corner color\n        void SetRightBottomColor(const Color4& color);\n\n        // Returns right bottom corner color\n        Color4 GetRightBottomCorner() const;\n\n        // Sets left bottom corner color\n        void SetLeftBottomColor(const Color4& color);\n\n        // Returns left bottom corner color\n        Color4 GetLeftBottomCorner() const;\n\n        // Sets sprite fill value (0 ... 1) @SCRIPTABLE\n        void SetFill(float fill);\n\n        // Returns sprite fill @SCRIPTABLE\n        float GetFill() const;\n\n        // Sets tile scale. 1.0f is default\n        void SetTileScale(float scale);\n\n        // Returns tile scale\n        float GetTileScale() const;\n\n        // Sets sprite drawing mode @SCRIPTABLE\n        void SetMode(SpriteMode mode);\n\n        // Returns sprite drawing mode @SCRIPTABLE\n        SpriteMode GetMode() const;\n\n        // Sets sprite slice border\n        void SetSliceBorder(const BorderI& border);\n\n        // Returns sprite slice border\n        BorderI GetSliceBorder() const;\n\n        // Sets asset @SCRIPTABLE\n        void SetImageAsset(const AssetRef<ImageAsset>& asset);\n\n        // Returns asset @SCRIPTABLE\n        AssetRef<ImageAsset> GetImageAsset() const;\n\n        // Returns image asset name @SCRIPTABLE\n        const String& GetImageName() const;\n\n        // Returns atlas asset id (returns 0 when sprite is not from atlas) @SCRIPTABLE\n        UID GetAtlasAssetId() const;\n\n        // Sets size by texture source rectangle size @SCRIPTABLE\n        void NormalizeSize();\n\n        // Sets size with equal aspect as texture source rectangle by width @SCRIPTABLE\n        void NormalizeAspectByWidth();\n\n        // Sets size with equal aspect as texture source rectangle by width @SCRIPTABLE\n        void NormalizeAspectByHeight();\n\n        // Sets size with equal aspect as texture source rectangle by nearest value @SCRIPTABLE\n        void NormalizeAspect();\n\n        // Calling when serializing\n        void OnSerialize(DataValue& node) const override;\n\n        // Calling when deserializing\n        void OnDeserialized(const DataValue& node) override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n        SERIALIZABLE(Sprite);\n        CLONEABLE_REF(Sprite);\n\n    protected:\n        Color4 mCornersColors[4]; // Corners colors\n\n        RectI                mTextureSrcRect; // Texture source rectangle\n        AssetRef<ImageAsset> mImageAsset;     // Image asset @SERIALIZABLE\n\n\t\tSpriteMode mMode = SpriteMode::Default; // Drawing mode @SERIALIZABLE\n\t\tBorderI    mSlices;                     // Slice borders @SERIALIZABLE\n\t\tfloat      mFill = 1.0f;                // Sprite fillness @SERIALIZABLE\n\t\tfloat      mTileScale = 1.0f;           // Scale of tiles in tiled mode. 1.0f is default and equals to default image size @SERIALIZABLE\n        \n        Mesh mMesh; // Drawing mesh\n\n        void(Sprite::*mMeshBuildFunc)(); // Mesh building function pointer (by mode)\n\n    protected:\n        // Called when basis was changed\n        void BasisChanged() override;\n\n        // Called when color was changed\n        void OnColorChanged() override;\n\n        // Called when material was changed (propagates to mesh)\n        void OnMaterialChanged() override;\n\n        // Initialized texture by image: uses atlas part or texture\n        void UpdateMaterial();\n\n        // Updates mesh geometry\n        void UpdateMesh();\n\n        // Builds mesh for default mode\n        void BuildDefaultMesh();\n\n        // Builds mesh for sliced mode\n        void BuildSlicedMesh();\n\n        // Builds mesh for tiled mode\n        void BuildTiledMesh();\n\n        // Builds mesh for fixed aspect mode\n        void BuildFixedAspectMesh();\n\n        // Builds mesh for fill left to right mode\n        void BuildFillLeftToRightMesh();\n\n        // Builds mesh for fill right to left mode\n        void BuildFillRightToLeftMesh();\n\n        // Builds mesh for fill up to down mode\n        void BuildFillUpToDownMesh();\n\n        // Builds mesh for fill down to up mode\n        void BuildFillDownToUpMesh();\n\n        // Builds mesh for fill 360 clock wise mode\n        void BuildFill360CWMesh();\n\n        // Builds mesh for fill 360 counter clock wise mode\n        void BuildFill360CCWMesh();\n\n        // Called when assets was rebuilded\n        void ReloadImage();\n\n        friend class Render;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Sprite)\n{\n    BASE_CLASS(o2::IRectDrawable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Sprite)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(texture);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(textureSrcRect);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(image);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(imageName);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(leftTopColor);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(rightTopColor);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(leftBottomColor);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(rightBottomColor);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(mode);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(fill);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(tileScale);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(sliceBorder);\n    FIELD().PROTECTED().NAME(mCornersColors);\n    FIELD().PROTECTED().NAME(mTextureSrcRect);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mImageAsset);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(SpriteMode::Default).NAME(mMode);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSlices);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mFill);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mTileScale);\n    FIELD().PROTECTED().NAME(mMesh);\n}\nEND_META;\nCLASS_METHODS_META(o2::Sprite)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(const String&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Color4&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Bitmap&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(TextureRef, const RectI&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Sprite&);\n    FUNCTION().PUBLIC().SCRIPTABLE_NAME_ATTRIBUTE(LoadFromImageRef).SIGNATURE(void, LoadFromImage, const AssetRef<ImageAsset>&, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, LoadFromImage, const String&, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_NAME_ATTRIBUTE(LoadFromImageUID).SIGNATURE(void, LoadFromImage, UID, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, LoadMonoColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, LoadFromBitmap, const Bitmap&, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetTexture, const TextureRef&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const TextureRef&, GetTexture);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTextureSrcRect, const RectI&);\n    FUNCTION().PUBLIC().SIGNATURE(RectI, GetTextureSrcRect);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetOriginalSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCornerColor, Corner, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCornerColors, const Color4&, const Color4&, const Color4&, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetCornerColor, Corner);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeftTopColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetLeftTopCorner);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRightTopColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetRightTopCorner);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRightBottomColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetRightBottomCorner);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeftBottomColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetLeftBottomCorner);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetFill, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetFill);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTileScale, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetTileScale);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetMode, SpriteMode);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(SpriteMode, GetMode);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSliceBorder, const BorderI&);\n    FUNCTION().PUBLIC().SIGNATURE(BorderI, GetSliceBorder);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetImageAsset, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(AssetRef<ImageAsset>, GetImageAsset);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const String&, GetImageName);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(UID, GetAtlasAssetId);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, NormalizeSize);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, NormalizeAspectByWidth);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, NormalizeAspectByHeight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, NormalizeAspect);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, BasisChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnColorChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMaterialChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateMaterial);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildDefaultMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildSlicedMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildTiledMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildFixedAspectMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildFillLeftToRightMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildFillRightToLeftMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildFillUpToDownMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildFillDownToUpMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildFill360CWMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, BuildFill360CCWMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, ReloadImage);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Text.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Text.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Render.h\"\n\nnamespace o2\n{\n    Text::Text():\n        mFont(nullptr), mSymbolsDistCoef(1), mLinesDistanceCoef(1), mVerAlign(VerAlign::Top),\n        mHorAlign(HorAlign::Left), mWordWrap(false), IRectDrawable(), mUpdatingMesh(false), mFontAssetId(0),\n        mDotsEndings(false), mHeight(11)\n    {}\n\n    Text::Text(Ref<Font> font):\n        mFont(font), mSymbolsDistCoef(1), mLinesDistanceCoef(1), mVerAlign(VerAlign::Top),\n        mHorAlign(HorAlign::Left), mWordWrap(false), IRectDrawable(), mUpdatingMesh(false),\n        mFontAssetId(0), mDotsEndings(false), mHeight(11)\n    {\n        if (mFont)\n            mFont->onCharactersRebuilt += ObjFunctionPtr<Text, void>(this, &Text::CheckCharactersAndRebuildMesh);\n    }\n\n    Text::Text(const Text& text):\n        IRectDrawable(text), mUpdatingMesh(false)\n    {\n        mText = text.mText;\n        mFont = text.mFont;\n        mSymbolsDistCoef = text.mSymbolsDistCoef;\n        mLinesDistanceCoef = text.mLinesDistanceCoef;\n        mVerAlign = text.mVerAlign;\n        mHorAlign = text.mHorAlign;\n        mWordWrap = text.mWordWrap;\n        mFontAssetId = text.mFontAssetId;\n        mDotsEndings = text.mDotsEndings;\n        mHeight = text.mHeight;\n\n        if (mFont)\n            mFont->onCharactersRebuilt += ObjFunctionPtr<Text, void>(this, &Text::CheckCharactersAndRebuildMesh);\n    }\n\n    Text::Text(const AssetRef<BitmapFontAsset>& fontAsset):\n        Text(fontAsset->GetFont())\n    {\n        mFontAssetId = fontAsset->GetUID();\n    }\n\n    Text::Text(const AssetRef<VectorFontAsset>& fontAsset):\n        Text(fontAsset->GetFont())\n    {\n        mFontAssetId = fontAsset->GetUID();\n    }\n\n    Text::Text(const String& fontFileName):\n        Text(o2Assets.GetAssetId(fontFileName))\n    {}\n\n    Text::Text(const UID& fontAssetId) :\n        mSymbolsDistCoef(1), mLinesDistanceCoef(1), mVerAlign(VerAlign::Top),\n        mHorAlign(HorAlign::Left), mWordWrap(false), IRectDrawable(), mDotsEndings(false), mHeight(11),\n        mUpdatingMesh(false)\n    {\n        SetFontAsset(AssetRef<FontAsset>(fontAssetId));\n    }\n\n    Text::~Text()\n    {\n        if (mFont)\n            mFont->onCharactersRebuilt -= ObjFunctionPtr<Text, void>(this, &Text::CheckCharactersAndRebuildMesh);\n    }\n\n    Text& Text::operator=(const Text& other)\n    {\n        IRectDrawable::operator=(other);\n\n        if (mFont)\n            mFont->onCharactersRebuilt -= ObjFunctionPtr<Text, void>(this, &Text::CheckCharactersAndRebuildMesh);\n\n        mText = other.mText;\n        mFontAssetId = other.mFontAssetId;\n        mFont = other.mFont;\n        mSymbolsDistCoef = other.mSymbolsDistCoef;\n        mLinesDistanceCoef = other.mLinesDistanceCoef;\n        mVerAlign = other.mVerAlign;\n        mHorAlign = other.mHorAlign;\n        mWordWrap = other.mWordWrap;\n        mDotsEndings = other.mDotsEndings;\n        mHeight = other.mHeight;\n\n        if (mFont)\n            mFont->onCharactersRebuilt += ObjFunctionPtr<Text, void>(this, &Text::CheckCharactersAndRebuildMesh);\n\n        UpdateMesh();\n\n        return *this;\n    }\n\n    void Text::Draw()\n    {\n        if (!mEnabled)\n            return;\n\n        for (auto& mesh : mMeshes)\n        {\n            mesh->Draw();\n\n            if (o2Input.IsKeyDown(VK_F3))\n                o2Render.DrawMeshWire(mesh.Get(), Color4(0, 255, 0, 150));\n        }\n\n        OnDrawn();\n    }\n\n    void Text::SetFont(const Ref<Font>& font)\n    {\n        if (mFont)\n            mFont->onCharactersRebuilt -= ObjFunctionPtr<Text, void>(this, &Text::CheckCharactersAndRebuildMesh);\n\n        mFont = font;\n\n        if (mFont)\n            mFont->onCharactersRebuilt += ObjFunctionPtr<Text, void>(this, &Text::CheckCharactersAndRebuildMesh);\n\n        UpdateMesh();\n    }\n\n    const Ref<Font>& Text::GetFont() const\n    {\n        return mFont;\n    }\n\n    void Text::SetFontAsset(const AssetRef<FontAsset>& asset)\n    {\n        if (mFont)\n            mFont->onCharactersRebuilt -= ObjFunctionPtr<Text, void>(this, &Text::CheckCharactersAndRebuildMesh);\n\n        if (asset.IsValid())\n        {\n            mFont = asset->GetFont();\n            mFontAssetId = asset->GetUID();\n        }\n        else\n            mFont = Ref<Font>();\n\n        if (mFont)\n            mFont->onCharactersRebuilt += ObjFunctionPtr<Text, void>(this, &Text::CheckCharactersAndRebuildMesh);\n\n        CheckCharactersAndRebuildMesh();\n    }\n\n    AssetRef<FontAsset> Text::GetFontAsset() const\n    {\n        auto& fontAssetInfo = o2Assets.GetAssetInfo(mFontAssetId);\n        if (fontAssetInfo.meta->GetAssetType() == &TypeOf(BitmapFontAsset))\n            return AssetRef<BitmapFontAsset>(mFontAssetId);\n\n        return AssetRef<VectorFontAsset>(mFontAssetId);\n    }\n\n    void Text::SetHeight(int height)\n    {\n        mHeight = height;\n        CheckCharactersAndRebuildMesh();\n    }\n\n    int Text::GetFontHeight() const\n    {\n        return mHeight;\n    }\n\n    void Text::SetText(const WString& text)\n    {\n        if (text == mText)\n\t\t\treturn;\n\n        mText = text;\n        CheckCharactersAndRebuildMesh();\n    }\n\n    const WString& Text::GetText() const\n    {\n        return mText;\n    }\n\n    void Text::SetHorAlign(HorAlign align)\n    {\n        mHorAlign = align;\n        UpdateMesh();\n    }\n\n    HorAlign Text::GetHorAlign() const\n    {\n        return mHorAlign;\n    }\n\n    void Text::SetVerAlign(VerAlign align)\n    {\n        mVerAlign = align;\n        UpdateMesh();\n    }\n\n    VerAlign Text::GetVerAlign() const\n    {\n        return mVerAlign;\n    }\n\n    void Text::SetWordWrap(bool flag)\n    {\n        mWordWrap = flag;\n        UpdateMesh();\n    }\n\n    bool Text::GetWordWrap() const\n    {\n        return mWordWrap;\n    }\n\n    void Text::SetDotsEngings(bool flag)\n    {\n        mDotsEndings = flag;\n        UpdateMesh();\n    }\n\n    bool Text::IsDotsEngings() const\n    {\n        return mDotsEndings;\n    }\n\n    void Text::SetSymbolsDistanceCoef(float coef)\n    {\n        mSymbolsDistCoef = coef;\n        UpdateMesh();\n    }\n\n    float Text::GetSymbolsDistanceCoef() const\n    {\n        return mSymbolsDistCoef;\n    }\n\n    void Text::SetLinesDistanceCoef(float coef /*= 1*/)\n    {\n        mLinesDistanceCoef = coef;\n        UpdateMesh();\n    }\n\n    float Text::GetLinesDistanceCoef() const\n    {\n        return mLinesDistanceCoef;\n    }\n\n    Text::SymbolsSet& Text::GetSymbolsSet()\n    {\n        return mSymbolsSet;\n    }\n\n    Vec2F Text::GetRealSize()\n    {\n        return mSymbolsSet.mRealSize;\n    }\n\n    RectF Text::GetRealRect()\n    {\n        return RectF(mTransform.origin, mTransform.origin + mSymbolsSet.mRealSize);\n    }\n\n    Vec2F Text::GetTextSize(const WString& text, const Ref<Font>& font, int height /*= 11*/, const Vec2F& areaSize /*= Vec2F()*/,\n                            HorAlign horAlign /*= HorAlign::Left*/, VerAlign verAlign /*= VerAlign::Top*/,\n                            bool wordWrap /*= true*/, bool dotsEngings /*= false*/, float charsDistCoef /*= 1.0f*/,\n                            float linesDistCoef /*= 1.0f*/)\n    {\n        SymbolsSet textSet;\n        textSet.Initialize(font, text, height, Vec2F(), areaSize, horAlign, verAlign, wordWrap, dotsEngings, charsDistCoef,\n                           linesDistCoef);\n\n        return textSet.mRealSize;\n    }\n\n    void Text::UpdateMesh()\n    {\n        if (mUpdatingMesh)\n            return;\n\n        mUpdatingMesh = true;\n\n        if (!mFont)\n        {\n            for (auto& mesh : mMeshes)\n            {\n                mesh->vertexCount = 0;\n                mesh->polyCount = 0;\n            }\n\n            mUpdatingMesh = false;\n\n            return;\n        }\n\n        int textLen = mText.Length();\n        if (mMeshes.Count() == 0 && textLen == 0)\n        {\n            mUpdatingMesh = false;\n            return;\n        }\n\n        PrepareMesh(textLen);\n\n        for (auto& mesh : mMeshes)\n        {\n            mesh->vertexCount = 0;\n            mesh->polyCount = 0;\n        }\n\n        int currentMeshIdx = 0;\n        Ref<Mesh> currentMesh = mMeshes[0];\n\n        mSymbolsSet.Initialize(mFont, mText, mHeight, mTransform.origin, mSize, mHorAlign, mVerAlign, mWordWrap, mDotsEndings,\n                               mSymbolsDistCoef, mLinesDistanceCoef);\n\n        Basis transf = CalculateTextBasis();\n        mLastTransform = transf;\n\n        for (auto& line : mSymbolsSet.mLines)\n        {\n            for (auto& symb : line.mSymbols)\n            {\n                if (currentMesh->polyCount + 2 >= currentMesh->GetMaxPolyCount())\n                    currentMesh = mMeshes[++currentMeshIdx];\n\n                unsigned long color = mResultColor.ABGR();\n                Vec2F points[4] =\n                {\n                    transf.Transform(symb.mFrame.LeftTop() - mSymbolsSet.mPosition),\n                    transf.Transform(symb.mFrame.RightTop() - mSymbolsSet.mPosition),\n                    transf.Transform(symb.mFrame.RightBottom() - mSymbolsSet.mPosition),\n                    transf.Transform(symb.mFrame.LeftBottom() - mSymbolsSet.mPosition)\n                };\n\n                Vertex* verts = currentMesh->GetVertices<Vertex>();\n                verts[currentMesh->vertexCount++] = Vertex(points[0], color, symb.mTexSrc.left, 1.0f - symb.mTexSrc.top);\n                verts[currentMesh->vertexCount++] = Vertex(points[1], color, symb.mTexSrc.right, 1.0f - symb.mTexSrc.top);\n                verts[currentMesh->vertexCount++] = Vertex(points[2], color, symb.mTexSrc.right, 1.0f - symb.mTexSrc.bottom);\n                verts[currentMesh->vertexCount++] = Vertex(points[3], color, symb.mTexSrc.left, 1.0f - symb.mTexSrc.bottom);\n\n                VertexIndex* idx = currentMesh->GetIndexes();\n                int pp = currentMesh->polyCount*3;\n                idx[pp] = currentMesh->vertexCount - 4;\n                idx[pp + 1] = currentMesh->vertexCount - 3;\n                idx[pp + 2] = currentMesh->vertexCount - 2;\n                currentMesh->polyCount++;\n\n                pp += 3;\n                idx[pp] = currentMesh->vertexCount - 4;\n                idx[pp + 1] = currentMesh->vertexCount - 2;\n                idx[pp + 2] = currentMesh->vertexCount - 1;\n                currentMesh->polyCount++;\n            }\n        }\n\n        currentMesh->SetTexture(mFont->mTexture);\n\n        Vec2F tangent = mTransform.xv.Normalized();\n        for (auto& mesh : mMeshes)\n        {\n            Vertex* verts = mesh->GetVertices<Vertex>();\n            for (UInt i = 0; i < mesh->vertexCount; i++)\n                verts[i].SetNormal(tangent);\n        }\n\n        mUpdatingMesh = false;\n    }\n\n    void Text::CheckCharactersAndRebuildMesh()\n    {\n        if (mFont)\n        {\n            mFont->CheckCharacters(mText, height);\n            mFont->CheckCharacters(\".\", height);\n        }\n\n        UpdateMesh();\n    }\n\n    void Text::PrepareMesh(int charactersCount)\n    {\n        int needPolygons = charactersCount*2 + 15; // 15 for dots endings\n        for (auto& mesh : mMeshes)\n            needPolygons -= mesh->GetMaxPolyCount();\n\n        if (needPolygons <= 0)\n            return;\n\n        if (mMeshes.Count() > 0 &&\n            needPolygons + mMeshes.Last()->GetMaxPolyCount() < mMeshMaxPolyCount)\n        {\n            mMeshes.Last()->Resize(mMeshes.Last()->GetMaxVertexCount() + (UInt)needPolygons*2,\n                                   mMeshes.Last()->GetMaxPolyCount() + (UInt)needPolygons);\n            return;\n        }\n\n        while (needPolygons > 0)\n        {\n            int polyCount = Math::Min<int>(needPolygons, mMeshMaxPolyCount);\n            needPolygons -= polyCount;\n            mMeshes.Add(mmake<Mesh>(mFont->mTexture, polyCount * 2, polyCount));\n        }\n    }\n\n    Basis Text::CalculateTextBasis() const\n    {\n        Basis transf;\n        if (mSize == Vec2F())\n        {\n            transf = Basis::Build(mPosition, mScale, mAngle, mShear);\n        }\n        else\n        {\n            transf = mTransform;\n            transf.xv /= mSize.x;\n            transf.yv /= mSize.y;\n        }\n\n        return transf;\n    }\n\n    void Text::OnColorChanged()\n    {\n        ULong dcolor = mResultColor.ABGR();\n        for (auto& mesh : mMeshes)\n        {\n            Vertex* verts = mesh->GetVertices<Vertex>();\n            for (int i = 0; i < (int)mesh->vertexCount; i++)\n                verts[i].color = dcolor;\n        }\n    }\n\n\n\tvoid Text::OnMaterialChanged()\n\t{\n        for (auto& mesh : mMeshes)\n\t\t\tmesh->SetMaterial(GetMaterial());\n\n\t\tIRectDrawable::OnMaterialChanged();\n\t}\n\n\tvoid Text::BasisChanged()\n    {\n        if (mSymbolsSet.mAreaSize != mSize)\n            CheckCharactersAndRebuildMesh();\n        else\n        {\n            Basis transform = CalculateTextBasis();\n            Basis meshTransform = mLastTransform.Inverted()*transform;\n\n            meshTransform.origin.x = Math::Round(meshTransform.origin.x);\n            meshTransform.origin.y = Math::Round(meshTransform.origin.y);\n\n            TransformMesh(mLastTransform.Inverted()*transform);\n            mLastTransform = transform;\n        }\n    }\n\n    void Text::OnDeserialized(const DataValue& node)\n    {\n        SetFontAsset(AssetRef<FontAsset>(mFontAssetId));\n    }\n\n    void Text::TransformMesh(const Basis& bas)\n    {\n        if (bas == Basis::Identity())\n            return;\n\n        for (auto& mesh : mMeshes)\n        {\n            Vertex* verts = mesh->GetVertices<Vertex>();\n            for (unsigned int i = 0; i < mesh->vertexCount; i++)\n            {\n                Vertex* vx = &verts[i];\n                bas.Transform(vx->x, vx->y);\n            }\n        }\n\n        mSymbolsSet.Move(bas.origin);\n    }\n\n    void Text::SymbolsSet::Initialize(const Ref<Font>& font, const WString& text, int height, const Vec2F& position, const Vec2F& areaSize,\n                                      HorAlign horAlign, VerAlign verAlign, bool wordWrap, bool dotsEngings,\n                                      float charsDistCoef, float linesDistCoef)\n    {\n        mFont = font;\n        mText = text;\n        mHeight = height;\n        mPosition = Vec2F(Math::Round(position.x), Math::Round(position.y));\n        mAreaSize = areaSize;\n        mRealSize = Vec2F();\n        mHorAlign = horAlign;\n        mVerAlign = verAlign;\n        mWordWrap = wordWrap;\n        mSymbolsDistCoef = charsDistCoef;\n        mLinesDistCoef = linesDistCoef;\n        mDotsEndings = dotsEngings;\n\n        mLines.Clear();\n        int textLen = mText.Length();\n\n        if (textLen == 0)\n            return;\n\n        float linesDist = mFont->GetLineHeightPx(mHeight)*mLinesDistCoef;\n        float fontHeight = mFont->GetHeightPx(mHeight);\n\n        mLines.Add(Line());\n        Line* curLine = &mLines.Last();\n        curLine->mSize.y = fontHeight;\n\n        float dotsSize = mFont->GetCharacter('.', mHeight).mAdvance*3.0f;\n\n        Vec2F fullSize(0, fontHeight);\n        bool checkAreaBounds = mWordWrap && mAreaSize.x > FLT_EPSILON;\n        int wrapCharIdx = -1;\n        for (int i = 0; i < textLen; i++)\n        {\n            const Font::Character& ch = mFont->GetCharacter(mText[i], mHeight);\n            Vec2F chSize = ch.mSize;\n            Vec2F chPos = Vec2F(curLine->mSize.x - ch.mOrigin.x, -ch.mOrigin.y);\n\n            if (mDotsEndings && mText[i] != '\\n' && curLine->mSize.x + ch.mAdvance*mSymbolsDistCoef > mAreaSize.x - dotsSize)\n            {\n                const Font::Character& dotCh = mFont->GetCharacter('.', mHeight);\n                Vec2F dotChSize = dotCh.mSize;\n\n                for (int j = 0; j < 3; j++)\n                {\n                    Vec2F dotChPos = Vec2F(curLine->mSize.x - dotCh.mOrigin.x, -dotCh.mOrigin.y);\n                    curLine->mSymbols.Add(Symbol(dotChPos, dotChSize, dotCh.mTexSrc, dotCh.mId, dotCh.mOrigin, dotCh.mAdvance));\n                    curLine->mString += '.';\n                    curLine->mSize.x += dotCh.mAdvance*mSymbolsDistCoef;\n                }\n\n                for (; i < textLen - 1; i++)\n                {\n                    if (mText[i + 1] == '\\n')\n                        break;\n                }\n\n                continue;\n            }\n\n            curLine->mSymbols.Add(Symbol(chPos, chSize, ch.mTexSrc, ch.mId, ch.mOrigin, ch.mAdvance));\n\n            if (mText[i] != '\\n')\n                curLine->mSize.x += ch.mAdvance*mSymbolsDistCoef;\n\n            curLine->mString += mText[i];\n\n            bool outOfBounds = checkAreaBounds ? curLine->mSize.x > mAreaSize.x && i > curLine->mLineBegSymbol : false;\n\n            if (mText[i] == '\\n' || outOfBounds)\n            {\n                if (outOfBounds)\n                {\n                    if (wrapCharIdx < 0 || wrapCharIdx == curLine->mLineBegSymbol)\n                        wrapCharIdx = i;\n                    else\n                        curLine->mSpacesCount--;\n\n                    int cutLen = wrapCharIdx - curLine->mLineBegSymbol;\n\n                    curLine->mSymbols.RemoveRange(cutLen, curLine->mSymbols.Count());\n                    curLine->mString.Erase(cutLen);\n\n\n                    if (curLine->mSymbols.Count() > 0)\n                        curLine->mSize.x = curLine->mSymbols.Last().mFrame.right;\n                    else\n                        curLine->mSize.x = 0;\n\n                    i = wrapCharIdx - 1;\n                    wrapCharIdx = -1;\n                }\n                else\n                {\n                    curLine->mSymbols.PopBack();\n                    curLine->mString.PopBack();\n                    curLine->mEndedNewLine = true;\n                }\n\n                fullSize.x = Math::Max(fullSize.x, curLine->mSize.x);\n                fullSize.y += linesDist;\n\n                mLines.Add(Line());\n                curLine = &mLines.Last();\n                curLine->mSize.y = linesDist;\n                curLine->mLineBegSymbol = i + 1;\n            }\n            else if (mText[i] == ' '/* || mFont->mAllSymbolReturn*/)\n            {\n                curLine->mSpacesCount++;\n                wrapCharIdx = i;\n            }\n        }\n\n        fullSize.x = Math::Max(fullSize.x, curLine->mSize.x);\n\n        float lineHeight = linesDist;\n        float yOffset = mAreaSize.y - mLines[0].mSize.y;\n\n        if (mVerAlign == VerAlign::Both)\n            lineHeight = Math::Max(fontHeight, (mAreaSize.y - fontHeight)/(float)(mLines.Count() - 1));\n        else if (mVerAlign == VerAlign::Bottom)\n            yOffset = fullSize.y - mLines[0].mSize.y;\n        else if (mVerAlign == VerAlign::Middle)\n            yOffset -= mAreaSize.y*0.5f - fullSize.y*0.5f;\n\n        yOffset += mPosition.y;\n\n        for (Vector<Line>::Iterator it = mLines.begin(); it != mLines.end(); ++it)\n        {\n            Line* line = &(*it);\n\n            float xOffset = 0;\n            float additiveSpaceOffs = 0;\n\n            if (mHorAlign == HorAlign::Middle)\n                xOffset = (mAreaSize.x - line->mSize.x)*0.5f;\n            else if (mHorAlign == HorAlign::Right)\n                xOffset = mAreaSize.x - line->mSize.x;\n            else if (mHorAlign == HorAlign::Both)\n                additiveSpaceOffs = Math::Max(0.0f, (mAreaSize.x - line->mSize.x)/(float)line->mSpacesCount);\n\n            xOffset += mPosition.x;\n\n            Vec2F locOrigin((float)(int)xOffset, (float)(int)yOffset);\n            line->mPosition = locOrigin;\n            yOffset -= lineHeight;\n\n            for (Vector<Symbol>::Iterator jt = line->mSymbols.begin(); jt != line->mSymbols.end(); ++jt)\n            {\n                if (jt->mCharId == ' ')\n                    locOrigin.x += additiveSpaceOffs;\n\n                jt->mFrame = jt->mFrame + locOrigin;\n            }\n        }\n\n        mRealSize = fullSize;\n    }\n\n    void Text::SymbolsSet::Move(const Vec2F& offs)\n    {\n        for (auto& line : mLines)\n        {\n            for (auto& sm : line.mSymbols)\n                sm.mFrame += offs;\n\n            line.mPosition += offs;\n        }\n    }\n\n    Text::SymbolsSet::Symbol::Symbol()\n    {}\n\n    Text::SymbolsSet::Symbol::Symbol(const Vec2F& position, const Vec2F& size, const RectF& texSrc,\n                                     UInt16 charId, const Vec2F& origin, float advance):\n        mFrame(position, position + size), mTexSrc(texSrc), mCharId(charId), mOrigin(origin), mAdvance(advance)\n    {}\n\n    bool Text::SymbolsSet::Symbol::operator==(const Symbol& other) const\n    {\n        return mCharId == other.mCharId && mFrame == other.mFrame;\n    }\n\n    Text::SymbolsSet::Line::Line():\n        mLineBegSymbol(0), mSpacesCount(0), mEndedNewLine(false)\n    {}\n\n    bool Text::SymbolsSet::Line::operator==(const Line& other) const\n    {\n        return false;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Text, o2__Text);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Text.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/Types/BitmapFontAsset.h\"\n#include \"o2/Assets/Types/VectorFontAsset.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/IRectDrawable.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Mesh;\n    class Render;\n\n    // ------------------------------------------------------------------------------------------\n    // Text renderer class. Using font, basis and many style parameters. Caching text into meshes\n    // ------------------------------------------------------------------------------------------\n    class Text: public IRectDrawable\n    {\n    public:\n        struct SymbolsSet;\n\n    public:\n        PROPERTIES(Text);\n        PROPERTY(Ref<Font>, font, SetFont, GetFont);                     // Font reference property @SCRIPTABLE\n        PROPERTY(AssetRef<FontAsset>, fontAsset, SetFontAsset, GetFontAsset); // Font asset reference property @SCRIPTABLE\n        \n        PROPERTY(WString, text, SetText, GetText); // Text property, wstring @SCRIPTABLE\n        \n        PROPERTY(int, height, SetHeight, GetFontHeight); // Text height @SCRIPTABLE\n        \n        PROPERTY(VerAlign, verAlign, SetVerAlign, GetVerAlign); // vertical align property @SCRIPTABLE\n        PROPERTY(HorAlign, horAlign, SetHorAlign, GetHorAlign); // Horizontal align property @SCRIPTABLE\n        \n        PROPERTY(bool, wordWrap, SetWordWrap, GetWordWrap);         // Words wrapping flag property @SCRIPTABLE\n        PROPERTY(bool, dotsEngings, SetDotsEngings, IsDotsEngings); // Dots endings when overflow property @SCRIPTABLE\n        \n        PROPERTY(float, symbolsDistanceCoef, SetSymbolsDistanceCoef, GetSymbolsDistanceCoef); // Characters distance coef, 1 is standard @SCRIPTABLE\n        PROPERTY(float, linesDistanceCoef, SetLinesDistanceCoef, GetLinesDistanceCoef);       // Lines distance coef, 1 is standard @SCRIPTABLE\n\n    public:\n        // Default constructor @SCRIPTABLE\n        Text();\n\n        // Constructor\n        Text(Ref<Font> font);\n\n        // Constructor\n        Text(const String& fontFileName);\n\n        // Constructor\n        Text(const UID& fontAssetId);\n\n        // Constructor\n        Text(const AssetRef<BitmapFontAsset>& fontAsset);\n\n        // Constructor\n        Text(const AssetRef<VectorFontAsset>& fontAsset);\n\n        // Copy-constructor\n        Text(const Text& text);\n\n        // Destructor\n        ~Text();\n\n        // Assign operator\n        Text& operator=(const Text& other);\n\n        // Draw text @SCRIPTABLE\n        void Draw() override;\n\n        // Sets using font @SCRIPTABLE\n        void SetFont(const Ref<Font>& font);\n\n        // Returns using font @SCRIPTABLE\n        const Ref<Font>& GetFont() const;\n\n        // Sets bitmap font asset  @SCRIPTABLE\n        void SetFontAsset(const AssetRef<FontAsset>& asset);\n\n        // Returns asset by font asset id @SCRIPTABLE\n        AssetRef<FontAsset> GetFontAsset() const;\n\n        // Sets font height\n        void SetHeight(int height);\n\n        // Returns font height\n        int GetFontHeight() const;\n\n        // Sets text\n        void SetText(const WString& text);\n\n        // Returns text\n        const WString& GetText() const;\n\n        // Sets horizontal align\n        void SetHorAlign(HorAlign align);\n\n        // Returns horizontal align\n        HorAlign GetHorAlign() const;\n\n        // Sets vertical align\n        void SetVerAlign(VerAlign align);\n\n        // returns vertical align\n        VerAlign GetVerAlign() const;\n\n        // Sets word wrapping\n        void SetWordWrap(bool flag);\n\n        // Returns word wrapping\n        bool GetWordWrap() const;\n\n        // Sets dots endings\n        void SetDotsEngings(bool flag);\n\n        // Returns dots endings\n        bool IsDotsEngings() const;\n\n        // Sets characters distance coefficient\n        void SetSymbolsDistanceCoef(float coef = 1);\n\n        // Returns characters distance coef\n        float GetSymbolsDistanceCoef() const;\n\n        // Sets lines distance coefficient\n        void SetLinesDistanceCoef(float coef = 1);\n\n        // Returns lines distance coefficient\n        float GetLinesDistanceCoef() const;\n\n        // Returns symbol set structure pointer\n        SymbolsSet& GetSymbolsSet();\n\n        // Returns real text size @SCRIPTABLE\n        Vec2F GetRealSize();\n\n        // Returns real text rectangle @SCRIPTABLE\n        RectF GetRealRect();\n\n        // Returns text size\n        static Vec2F GetTextSize(const WString& text, const Ref<Font>& font, int height = 11,\n                                 const Vec2F& areaSize = Vec2F(),\n                                 HorAlign horAlign = HorAlign::Left, VerAlign verAlign = VerAlign::Top,\n                                 bool wordWrap = true, bool dotsEngings = false, float charsDistCoef = 1.0f,\n                                 float linesDistCoef = 1.0f);\n\n        SERIALIZABLE(Text);\n        CLONEABLE_REF(Text);\n\n    public:\n        // ----------------\n        // Text symbols set\n        // ----------------\n        struct SymbolsSet\n        {\n            // ----------------------------------\n            // Simple symbol definition structure\n            // ----------------------------------\n            struct Symbol\n            {\n                RectF  mFrame;   // Frame of symbol layout\n                RectF  mTexSrc;  // Texture source rect\n                UInt16 mCharId;  // Character id\n                Vec2F  mOrigin;  // Character offset\n                float  mAdvance; // Character advance\n\n            public:\n                // Default constructor\n                Symbol();\n\n                // Constructor\n                Symbol(const Vec2F& position, const Vec2F& size, const RectF& texSrc, UInt16 charId,\n                       const Vec2F& origin, float advance);\n\n             // Equals operator\n                bool operator==(const Symbol& other) const;\n            };\n\n            // -------------------------\n            // Line definition structure\n            // -------------------------\n            struct Line\n            {\n                Vector<Symbol> mSymbols;       // Symbols in line\n                WString       mString;        // Line string\n                Vec2F         mSize;          // Size of line in pixels\n                Vec2F         mPosition;      // Position of line\n                int           mLineBegSymbol; // Index of line beginning symbol\n                int           mSpacesCount;   // Spaces count at line\n                bool          mEndedNewLine;  // True, if line ended by new line character\n\n            public:\n                // Default constructor\n                Line();\n\n                // Equals operator\n                bool operator==(const Line& other) const;\n            };\n\n        public:\n            Ref<Font>  mFont;            // Font\n            int        mHeight;          // Text height\n            WString    mText;            // Text string\n            Vec2F      mPosition;        // Position, in pixels\n            Vec2F      mAreaSize;        // Area size, in pixels\n            Vec2F      mRealSize;        // Real text size\n            HorAlign   mHorAlign;        // Horizontal align\n            VerAlign   mVerAlign;        // Vertical align\n            bool       mWordWrap;        // True, when words wrapping\n            bool       mDotsEndings;     // Dots ending when overflow\n            float      mSymbolsDistCoef; // Characters distance coefficient, 1 is standard\n            float      mLinesDistCoef;   // Lines distance coefficient, 1 is standard\n\n            Vector<Line> mLines; // Lines definitions\n\n        public:\n            // Calculating characters layout by parameters\n            void Initialize(const Ref<Font>& font, const WString& text, int height, const Vec2F& position, const Vec2F& areaSize,\n                            HorAlign horAlign, VerAlign verAlign, bool wordWrap, bool dotsEngings, float charsDistCoef,\n                            float linesDistCoef);\n\n            // Moves symbols \n            void Move(const Vec2F& offs);\n        };\n\n    protected:\n        const UInt mMeshMaxPolyCount = 4096;\n\n        WString   mText;              // Wide char string, containing rendering text @SERIALIZABLE\n        UID       mFontAssetId;       // Font asset id @SERIALIZABLE\n        Ref<Font> mFont;              // Using font\n        int       mHeight;            // Text height @SERIALIZABLE\n        float     mSymbolsDistCoef;   // Characters distance coef, 1 is standard @SERIALIZABLE\n        float     mLinesDistanceCoef; // Lines distance coef, 1 is standard @SERIALIZABLE\n        VerAlign  mVerAlign;          // Vertical align @SERIALIZABLE\n        HorAlign  mHorAlign;          // Horizontal align @SERIALIZABLE\n        bool      mWordWrap;          // True, when words wrapping @SERIALIZABLE\n        bool      mDotsEndings;       // If true, text will end on '...' @SERIALIZABLE\n\n        Vector<Ref<Mesh>> mMeshes;        // Meshes vector\n        Basis             mLastTransform; // Last mesh update transformation\n\n        SymbolsSet mSymbolsSet; // Symbols set definition\n\n        bool mUpdatingMesh; // True, when mesh is already updating\n\n    protected:\n        // Updating meshes\n        void UpdateMesh();\n\n        // Checks test's characters in font and rebuilds mesh. Used when fond is resetting\n        void CheckCharactersAndRebuildMesh();\n\n        // Transforming meshes by basis\n        void TransformMesh(const Basis& bas);\n\n        // Preparing meshes for characters count\n        void PrepareMesh(int charactersCount);\n\n        // Calculates and returns text basis\n        Basis CalculateTextBasis() const;\n\n        // Called when basis was changed\n\t\tvoid BasisChanged() override;\n\n\t\t// Called when color was changed\n\t\tvoid OnColorChanged() override;\n\n\t\t// Called when material or material asset was changed (by user or code)\n\t\tvoid OnMaterialChanged() override;\n\n        // Calling when deserializing\n        void OnDeserialized(const DataValue& node) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Text)\n{\n    BASE_CLASS(o2::IRectDrawable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Text)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(font);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(fontAsset);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(text);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(height);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(verAlign);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(horAlign);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(wordWrap);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(dotsEngings);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(symbolsDistanceCoef);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(linesDistanceCoef);\n    FIELD().PROTECTED().DEFAULT_VALUE(4096).NAME(mMeshMaxPolyCount);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mText);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mFontAssetId);\n    FIELD().PROTECTED().NAME(mFont);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHeight);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSymbolsDistCoef);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mLinesDistanceCoef);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mVerAlign);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHorAlign);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mWordWrap);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mDotsEndings);\n    FIELD().PROTECTED().NAME(mMeshes);\n    FIELD().PROTECTED().NAME(mLastTransform);\n    FIELD().PROTECTED().NAME(mSymbolsSet);\n    FIELD().PROTECTED().NAME(mUpdatingMesh);\n}\nEND_META;\nCLASS_METHODS_META(o2::Text)\n{\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(Ref<Font>);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const UID&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AssetRef<BitmapFontAsset>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AssetRef<VectorFontAsset>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Text&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetFont, const Ref<Font>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const Ref<Font>&, GetFont);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetFontAsset, const AssetRef<FontAsset>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(AssetRef<FontAsset>, GetFontAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeight, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetFontHeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetText, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(const WString&, GetText);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHorAlign, HorAlign);\n    FUNCTION().PUBLIC().SIGNATURE(HorAlign, GetHorAlign);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVerAlign, VerAlign);\n    FUNCTION().PUBLIC().SIGNATURE(VerAlign, GetVerAlign);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWordWrap, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, GetWordWrap);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDotsEngings, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsDotsEngings);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSymbolsDistanceCoef, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSymbolsDistanceCoef);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLinesDistanceCoef, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetLinesDistanceCoef);\n    FUNCTION().PUBLIC().SIGNATURE(SymbolsSet&, GetSymbolsSet);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetRealSize);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(RectF, GetRealRect);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vec2F, GetTextSize, const WString&, const Ref<Font>&, int, const Vec2F&, HorAlign, VerAlign, bool, bool, float, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckCharactersAndRebuildMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, TransformMesh, const Basis&);\n    FUNCTION().PROTECTED().SIGNATURE(void, PrepareMesh, int);\n    FUNCTION().PROTECTED().SIGNATURE(Basis, CalculateTextBasis);\n    FUNCTION().PROTECTED().SIGNATURE(void, BasisChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnColorChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnMaterialChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Texture.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"o2/Render/Texture.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/AtlasAsset.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Utils/Bitmap/Bitmap.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    const Map<TextureFormat, String> Texture::formatFileExtensions =\n    {\n        { TextureFormat::R8G8B8A8, \"png\" },\n        { TextureFormat::DXT5, \"dds\" }\n    };\n\n    Texture::Texture() :\n        mReady(false), mAtlasAssetId(0), mAtlasPage(-1)\n    {}\n\n    Texture::Texture(const Vec2I& size, TextureFormat format /*= TextureFormat::R8G8B8A8*/, Usage usage /*= Usage::Default*/) :\n        mReady(false), mAtlasAssetId(0), mAtlasPage(-1)\n    {\n        Create(size, format, usage);\n    }\n\n    Texture::Texture(const String& fileName) :\n        mReady(false), mAtlasAssetId(0), mAtlasPage(-1)\n    {\n        Create(fileName);\n    }\n\n    Texture::Texture(const Bitmap& bitmap) :\n        mReady(false), mAtlasAssetId(0), mAtlasPage(-1)\n    {\n        Create(bitmap);\n    }\n\n    Texture::Texture(UID atlasAssetId, int page) :\n        mReady(false), mAtlasAssetId(0), mAtlasPage(-1)\n    {\n        Create(atlasAssetId, page);\n    }\n\n    Texture::Texture(const String& atlasAssetName, int page) :\n        mReady(false), mAtlasAssetId(0), mAtlasPage(-1)\n    {\n        Create(atlasAssetName, page);\n    }\n\n    void Texture::PostRefConstruct()\n    {\n        o2Render.OnTextureCreated(this);\n    }\n\n    Texture::~Texture()\n    {\n        if (!mReady)\n            return;\n\n        PlatformDestroy();\n    }\n\n    void Texture::Create(const Vec2I& size, TextureFormat format /*= TextureFormat::R8G8B8A8*/,\n                         Usage usage /*= Usage::Default*/)\n    {\n        if (mReady)\n        {\n            PlatformDestroy();\n            mReady = false;\n        }\n\n        mFormat = format;\n        mUsage = usage;\n        mSize = size;\n\n        mReady = PlatformCreate();\n    }\n\n    void Texture::Create(const Vec2I& size, Byte* data, TextureFormat format /*= TextureFormat::R8G8B8A8*/)\n    {\n        if (mReady)\n        {\n            PlatformDestroy();\n            mReady = false;\n        }\n\n        mFormat = format;\n        mUsage = Usage::Default;\n        mSize = size;\n        mReady = PlatformCreate();\n\n        if (mReady)\n            PlatformUploadData(size, data, format);\n    }\n\n    void Texture::Create(const Bitmap& bitmap)\n    {\n        mFileName = bitmap.GetFilename();\n        Create(bitmap.GetSize(), (Byte*)bitmap.GetData(), TextureFormat::R8G8B8A8);\n    }\n\n    void Texture::SetData(const Bitmap& bitmap)\n    {\n        if (mSize != bitmap.GetSize())\n        {\n            o2Render.mLog->Error(\"Cant set data to texture with different size\");\n            return;\n        }\n\n        PlatformUploadData(mSize, (Byte*)bitmap.GetData(), TextureFormat::R8G8B8A8);\n    }\n\n    void Texture::SetSubData(const Vec2I& offset, const Bitmap& bitmap)\n    {\n        PlatformUploadRegionData(offset, bitmap.GetSize(), (Byte*)bitmap.GetData(), TextureFormat::R8G8B8A8);\n    }\n\n    Ref<Bitmap> Texture::GetData()\n    {\n        auto bitmap = mmake<Bitmap>(PixelFormat::R8G8B8A8, mSize);\n        PlatformGetData((Byte*)bitmap->GetData());\n        return bitmap;\n    }\n\n    void Texture::SetFilter(Filter filter)\n    {\n        mFilter = filter;\n        PlatformSetFilter();\n    }\n\n    Texture::Filter Texture::GetFilter() const\n    {\n        return mFilter;\n    }\n\n    void Texture::Create(const String& fileName)\n    {\n        String extension = o2FileSystem.GetFileExtension(fileName);\n\n        if (extension == \"png\")\n            LoadPNG(fileName);\n        else if (extension == \"dds\")\n            LoadDDS(fileName);\n        else\n            o2Render.mLog->Error(\"Failed to load texture from file \" + fileName);\n\n#if IS_EDITOR\n        if (mReady && !mFileName.IsEmpty())\n            mFileEditDate = o2FileSystem.GetFileInfo(mFileName).editDate;\n#endif\n    }\n\n    void Texture::Create(UID atlasAssetId, int page)\n    {\n        auto& info = o2Assets.GetAssetInfo(atlasAssetId);\n        if (info.IsValid())\n        {\n            mAtlasAssetId = atlasAssetId;\n            mAtlasPage = page;\n            String textureFileName = AtlasAsset::GetPageTextureFileName(info, page);\n            Create(textureFileName);\n\n            mReady = true;\n        }\n        else \n            o2Render.mLog->Error(\"Failed to load atlas texture with id \" + (String)atlasAssetId + \" and page \" + (String)page);\n    }\n\n    void Texture::Create(const String& atlasAssetName, int page)\n    {\n        auto& info = o2Assets.GetAssetInfo(atlasAssetName);\n        if (info.IsValid())\n        {\n            mAtlasAssetId = o2Assets.GetAssetId(atlasAssetName);\n            mAtlasPage = page;\n            String textureFileName = AtlasAsset::GetPageTextureFileName(info, page);\n            Create(textureFileName);\n\n            mReady = true;\n        }\n        else \n            o2Render.mLog->Error(\"Failed to load atlas texture with \" + atlasAssetName + \" and page \" + (String)page);\n    }\n\n    void Texture::LoadDDS(const String& fileName)\n    {\n        mFileName = fileName;\n\n        InFile file(fileName);\n        if (file.IsOpened())\n        {\n            UInt dataSize = file.GetDataSize();\n            auto data = mnew Byte[dataSize];\n            file.ReadData(data, dataSize);\n            file.Close();\n\n            UInt height = *(UInt*)&(data[12]);\n            UInt width = *(UInt*)&(data[16]);\n            UInt linearSize = *(UInt*)&(data[20]);\n            UInt mipMapCount = *(UInt*)&(data[28]);\n\n            Create(Vec2I(width, height), &data[128], TextureFormat::DXT5);\n\n            delete[] data;\n        }\n    }\n\n    void Texture::LoadPNG(const String& fileName)\n    {\n        Bitmap image;\n        if (image.Load(fileName, Bitmap::ImageType::Auto))\n        {\n            mFileName = fileName;\n            Create(image);\n        }\n    }\n\n    void Texture::Reload()\n    {\n        if (!mFileName.IsEmpty())\n        {\n            Create(mFileName);\n            o2Render.mLog->Out(\"Reloaded texture \" + mFileName);\n        }\n    }\n\n    Vec2I Texture::GetSize() const\n    {\n        return mSize;\n    }\n\n    TextureFormat Texture::GetFormat() const\n    {\n        return mFormat;\n    }\n\n    Texture::Usage Texture::GetUsage() const\n    {\n        return mUsage;\n    }\n\n    String Texture::GetFileName() const\n    {\n        return mFileName;\n    }\n\n    bool Texture::IsReady() const\n    {\n        return mReady;\n    }\n\n    bool Texture::IsAtlasPage() const\n    {\n        return mAtlasAssetId != UID::empty;\n    }\n\n    UID Texture::GetAtlasAssetId() const\n    {\n        return mAtlasAssetId;\n    }\n\n    int Texture::GetAtlasPage() const\n    {\n        return mAtlasPage;\n    }\n\n#if IS_EDITOR\n    const TimeStamp& Texture::GetFileEditDate() const\n    {\n        return mFileEditDate;\n    }\n\n    void Texture::SetFileEditDate(const TimeStamp& date)\n    {\n        mFileEditDate = date;\n    }\n#endif\n}\n// --- META ---\n\nENUM_META(o2::Texture::Usage, o2__Texture__Usage)\n{\n    ENUM_ENTRY(Default);\n    ENUM_ENTRY(RenderTarget);\n}\nEND_ENUM_META;\n\nENUM_META(o2::Texture::Filter, o2__Texture__Filter)\n{\n    ENUM_ENTRY(Linear);\n    ENUM_ENTRY(Nearest);\n}\nEND_ENUM_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Texture.h",
    "content": "#pragma once\n\n#if defined PLATFORM_WINDOWS\n#include \"o2/Render/Windows/TextureBase.h\"\n#elif defined PLATFORM_ANDROID\n#include \"o2/Render/Android/TextureBase.h\"\n#elif defined PLATFORM_MAC\n#include \"o2/Render/Mac/TextureBase.h\"\n#elif defined PLATFORM_IOS\n#include \"o2/Render/iOS/TextureBase.h\"\n#elif defined PLATFORM_WASM\n#include \"o2/Render/WebAssembly/TextureBase.h\"\n#elif defined(PLATFORM_LINUX)\n#if defined(O2_RENDER_GLES2)\n#include \"o2/Render/Linux GLES2/TextureBase.h\"\n#else\n#include \"o2/Render/Linux/TextureBase.h\"\n#endif\n#endif\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/System/Time/TimeStamp.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2/Utils/Types/UID.h\"\n\nnamespace o2\n{\n    class Bitmap;\n\n    // -------\n    // Texture\n    // -------\n    class Texture : public TextureBase, public RefCounterable\n    {\n    public:\n        // Texture usage\n        enum class Usage { Default, RenderTarget };\n\n        // Texture filter\n        enum class Filter { Linear, Nearest };\n\n        static const Map<TextureFormat, String> formatFileExtensions; // Texture format file extensions\n\n    public:\n        PROPERTIES(Texture);\n        GETTER(Vec2I, size, GetSize);             // Size of texture getter\n        GETTER(TextureFormat, format, GetFormat); // texture format getter\n        GETTER(Usage, usage, GetUsage);           // Texture usage getter\n        GETTER(String, fileName, GetFileName);    // Texture file name getter\n\n    public:\n        // Default constructor\n        Texture();\n\n        // Constructor\n        Texture(const Vec2I& size, TextureFormat format = TextureFormat::R8G8B8A8, Usage usage = Usage::Default);\n\n        // Constructor from file\n        Texture(const String& fileName);\n\n        // Constructor from atlas page\n        Texture(UID atlasAssetId, int page);\n\n        // Constructor from atlas page\n        Texture(const String& atlasAssetName, int page);\n\n        // Constructor from bitmap\n        Texture(const Bitmap& bitmap);\n\n        // Destructor\n        ~Texture();\n\n        // Creates texture with size, format and usage\n        void Create(const Vec2I& size, TextureFormat format = TextureFormat::R8G8B8A8, Usage usage = Usage::Default);\n\n        // Creates texture with size, data, and format\n        void Create(const Vec2I& size, Byte* data, TextureFormat format = TextureFormat::R8G8B8A8);\n\n        // Creates texture from file\n        void Create(const String& fileName);\n\n        // Creates texture from atlas page\n        void Create(UID atlasAssetId, int page);\n\n        // Creates texture from atlas page\n        void Create(const String& atlasAssetName, int page);\n\n        // Creates texture from bitmap\n        void Create(const Bitmap& bitmap);\n\n        // Sets texture's data from bitmap\n        void SetData(const Bitmap& bitmap);\n\n        // Sets sub data from bitmap with offset\n        void SetSubData(const Vec2I& offset, const Bitmap& bitmap);\n\n        // Copies pixels from texture by rect\n        void Copy(const Texture& from, const RectI& rect);\n\n        // Gets texture's data to bitmap and returns it\n        Ref<Bitmap> GetData();\n\n        // Reloads texture\n        void Reload();\n\n        // Returns size of texture\n        Vec2I GetSize() const;\n\n        // Returns format\n        TextureFormat GetFormat() const;\n\n        // returns texture usage\n        Usage GetUsage() const;\n\n        // Returns texture file name\n        String GetFileName() const;\n\n        // Sets texture filter\n        void SetFilter(Filter filter);\n\n        // Returns texture filter\n        Filter GetFilter() const;\n\n        // Returns true when texture ready to use\n        bool IsReady() const;\n\n        // Returns is texture from atlas page\n        bool IsAtlasPage() const;\n\n        // Returns atlas asset id\n        UID GetAtlasAssetId() const;\n\n        // Returns atlas page\n        int GetAtlasPage() const;\n\n#if IS_EDITOR\n        // Returns the file modification timestamp recorded at last load\n        const TimeStamp& GetFileEditDate() const;\n\n        // Sets the file modification timestamp\n        void SetFileEditDate(const TimeStamp& date);\n#endif\n\n    protected:\n        Vec2I mSize; // Size of texture\n\n        Filter        mFilter = Filter::Linear; // Min/Mag filter\n        TextureFormat mFormat;                  // Texture format\n        Usage         mUsage;                   // Texture usage\n\n        String mFileName; // Source file name\n\n        UID mAtlasAssetId; // Atlas asset id. Equals 0 if it isn't atlas texture\n        int mAtlasPage;    // Atlas page\n\n        bool mReady; // Is texture ready to use\n\n#if IS_EDITOR\n        TimeStamp mFileEditDate; // File modification time at last load\n#endif\n\n    protected:\n        // It is called after reference initialization at object construction, registers texture in render\n        void PostRefConstruct();\n\n        // Platform specific texture creating\n        bool PlatformCreate();\n\n        // Platform specific texture destroying\n        void PlatformDestroy();\n\n        // Platform specific texture uploading\n        void PlatformUploadData(const Vec2I& size, Byte* data, TextureFormat format);\n\n        // Platform specific texture uploading\n        void PlatformUploadRegionData(const Vec2I& offset, const Vec2I& size, Byte* data, TextureFormat format);\n\n        // Platform specific retrieving texture data\n        void PlatformGetData(Byte* data);\n\n        // Platform specific set filter\n        void PlatformSetFilter();\n\n        // Loads texture from PNG file \n        void LoadPNG(const String& fileName);\n\n        // Loads texture from DDS file\n        void LoadDDS(const String& fileName);\n\n        friend class Render;\n        friend class TextureRef;\n\n        FRIEND_REF_MAKE();\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::Texture::Usage);\n\nPRE_ENUM_META(o2::Texture::Filter);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/TextureRef.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"TextureRef.h\"\n\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    TextureRef::TextureRef() :\n        mTexture()\n    {}\n\n    TextureRef::TextureRef(std::nullptr_t) :\n        mTexture(nullptr)\n    {}\n\n    TextureRef::TextureRef(Texture* ptr) :\n        mTexture(ptr)\n    {}\n\n    TextureRef::TextureRef(const TextureRef& other) :\n        mTexture(other.mTexture)\n    {}\n\n    TextureRef::TextureRef(const Ref<Texture>& other):\n        mTexture(other)\n    {}\n\n    TextureRef::TextureRef(Ref<Texture>&& other):\n        mTexture(std::move(other))\n    {}\n\n    TextureRef::TextureRef(TextureRef&& other) noexcept :\n        mTexture(std::move(other.mTexture))\n    {}\n\n    TextureRef::TextureRef(const Vec2I& size,\n                           TextureFormat format /*= TextureFormat::R8G8B8A8*/,\n                           Texture::Usage usage /*= Texture::Usage::Default*/) :\n        TextureRef(mmake<Texture>(size, format, usage))\n    {}\n\n    TextureRef::TextureRef(const String& fileName)\n    {\n        *this = o2Render.mTextures.FindOrDefault([&](const TextureRef& tex) { return tex->GetFileName() == fileName; });\n\n        if (!mTexture)\n            *this = mmake<Texture>(fileName);\n    }\n\n    TextureRef::TextureRef(const Bitmap& bitmap) :\n        TextureRef(mmake<Texture>(bitmap))\n    {}\n\n    TextureRef::TextureRef(UID atlasAssetId, int page)\n    {\n        *this = (o2Render.mTextures.FindOrDefault(\n            [&](const TextureRef& tex)\n            {\n                return tex->GetAtlasAssetId() == atlasAssetId && tex->GetAtlasPage() == page;\n            }));\n\n        if (!mTexture)\n            *this = mmake<Texture>(atlasAssetId, page);\n    }\n\n    TextureRef::TextureRef(const String& atlasAssetName, int page)\n    {\n        UID atlasAssetId = o2Assets.GetAssetId(atlasAssetName);\n        if (atlasAssetId == UID::empty)\n        {\n            o2Render.mLog->Error(\"Can't load texture for atlas \" + atlasAssetName + \" and page \" + (String)page + \": atlas isn't exist\");\n            *this = nullptr;\n            return;\n        }\n\n        *this = (o2Render.mTextures.FindOrDefault(\n            [&](const TextureRef& tex)\n            {\n                return tex->GetAtlasAssetId() == atlasAssetId && tex->GetAtlasPage() == page;\n            }));\n\n        if (!mTexture)\n            *this = mmake<Texture>(atlasAssetId, page);\n    }\n\n    bool TextureRef::operator!=(const Texture* other) const\n    {\n        return mTexture == other;\n    }\n\n    bool TextureRef::operator!=(const TextureRef& other) const\n    {\n        return mTexture != other.mTexture;\n    }\n\n    bool TextureRef::operator==(const Texture* other) const\n    {\n        return mTexture == other;\n    }\n\n    bool TextureRef::operator==(const TextureRef& other) const\n    {\n        return mTexture == other.mTexture;\n    }\n\n    TextureRef& TextureRef::operator=(Ref<Texture>&& other)\n    {\n        mTexture = other;\n        return *this;\n    }\n\n    TextureRef& TextureRef::operator=(std::nullptr_t)\n    {\n        mTexture = nullptr;\n        return *this;\n    }\n\n    TextureRef& TextureRef::operator=(const TextureRef& other)\n    {\n        mTexture = other.mTexture;\n        return *this;\n    }\n\n    TextureRef& TextureRef::operator=(TextureRef&& other)\n    {\n        mTexture = std::move(other.mTexture);\n        return *this;\n    }\n\n    bool TextureRef::operator<(const TextureRef& other) const\n    {\n        return mTexture < other.mTexture;\n    }\n\n    bool TextureRef::IsValid() const\n    {\n        return mTexture.IsValid();\n    }\n\n    TextureRef::operator bool() const\n    {\n        return mTexture.operator bool();\n    }\n\n    TextureRef::operator Ref<Texture>() const\n    {\n        return mTexture;\n    }\n\n    Texture& TextureRef::operator*() const\n    {\n        return mTexture.operator*();\n    }\n\n    Texture* TextureRef::operator->() const\n    {\n        return mTexture.operator->();\n    }\n\n    Texture* TextureRef::Get()\n    {\n        return mTexture.Get();\n    }\n\n    const Texture* TextureRef::Get() const\n    {\n        return mTexture.Get();\n    }\n\n    Ref<Texture>& TextureRef::GetRef()\n    {\n        return mTexture;\n    }\n\n    const Ref<Texture>& TextureRef::GetRef() const\n    {\n        return mTexture;\n    }\n\n    TextureRef TextureRef::Null()\n    {\n        return TextureRef();\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::TextureRef, o2__TextureRef);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/TextureRef.h",
    "content": "#pragma once\n\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    class TextureRef : public IObject\n    {\n    public:\n        // Default constructor, no reference\n        TextureRef();\n\n        // Nullptr constructor\n        TextureRef(std::nullptr_t);\n\n        // Copy constructor from other reference\n        TextureRef(const TextureRef& other);\n\n        // Move constructor from other reference\n        TextureRef(TextureRef&& other) noexcept;\n\n        // Constructor with texture pointer\n        explicit TextureRef(Texture* ptr);\n\n        // Constructor with size and format\n        TextureRef(const Vec2I& size,\n                   TextureFormat format = TextureFormat::R8G8B8A8,\n                   Texture::Usage usage = Texture::Usage::Default);\n\n        // Constructor from file @SCRIPTABLE\n        explicit TextureRef(const String& fileName);\n\n        // Constructor from bitmap\n        explicit TextureRef(const Bitmap& bitmap);\n\n        // Constructor from atlas page\n        TextureRef(UID atlasAssetId, int page);\n\n        // Constructor from atlas page\n        TextureRef(const String& atlasAssetName, int page);\n\n        // Copy constructor from other reference\n        TextureRef(const Ref<Texture>& other);\n\n        // Move constructor from other reference\n        TextureRef(Ref<Texture>&& other);\n\n        // Equality operator\n        bool operator==(const TextureRef& other) const;\n\n        // Equality operator\n        bool operator==(const Texture* other) const;\n\n        // Inequality operator\n        bool operator!=(const TextureRef& other) const;\n\n        // Inequality operator\n        bool operator!=(const Texture* other) const;\n\n        // Copy operator from other texture reference\n        TextureRef& operator=(const TextureRef& other);\n\n        // Move operator from other texture reference\n        TextureRef& operator=(TextureRef&& other);\n\n        // Move operator from other texture reference\n        TextureRef& operator=(Ref<Texture>&& other);\n\n        // Move operator from nullptr\n        TextureRef& operator=(std::nullptr_t);\n\n        // Less operator\n        bool operator<(const TextureRef& other) const;\n\n        // Returns is reference is valid\n        bool IsValid() const;\n\n        // Returns is reference is valid\n        explicit operator bool() const;\n\n        // Returns texture reference\n        operator Ref<Texture>() const;\n\n        // Returns texture reference\n        Texture& operator*() const;\n\n        // Returns texture pointer\n        Texture* operator->() const;\n\n        // Returns texture pointer \n        Texture* Get();\n\n        // Returns texture pointer\n        const Texture* Get() const;\n\n        // Returns reference\n        Ref<Texture>& GetRef();\n\n        // Returns reference\n        const Ref<Texture>& GetRef() const;\n\n        // Returns empty texture\n        static TextureRef Null();\n\n        IOBJECT(TextureRef);\n\n    protected:\n        Ref<Texture> mTexture;\n\n    protected:\n        friend class Render;\n        friend class Texture;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::TextureRef)\n{\n    BASE_CLASS(o2::IObject);\n}\nEND_META;\nCLASS_FIELDS_META(o2::TextureRef)\n{\n    FIELD().PROTECTED().NAME(mTexture);\n}\nEND_META;\nCLASS_METHODS_META(o2::TextureRef)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(std::nullptr_t);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const TextureRef&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(TextureRef&&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(Texture*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vec2I&, TextureFormat, Texture::Usage);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(const String&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Bitmap&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(UID, int);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&, int);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<Texture>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(Ref<Texture>&&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValid);\n    FUNCTION().PUBLIC().SIGNATURE(Texture*, Get);\n    FUNCTION().PUBLIC().SIGNATURE(const Texture*, Get);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Texture>&, GetRef);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Texture>&, GetRef);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(TextureRef, Null);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/TextureSource.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"TextureSource.h\"\n\nnamespace o2\n{\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/TextureSource.h",
    "content": "﻿#pragma once\n\n#ifndef TEXTURE_SOURCE_H\n#define TEXTURE_SOURCE_H\n\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Utils/Math/Rect.h\"\n\nnamespace o2\n{\n    struct TextureSource \n    {\n        TextureRef texture;\n        RectF      sourceRect;\n    };\n}\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Render/VectorFont.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"VectorFont.h\"\n\n#if defined PLATFORM_WINDOWS\n#include \"o2/Render/Windows/OpenGL.h\"\n#elif defined PLATFORM_ANDROID\n#include \"o2/Render/Android/OpenGL.h\"\n#endif\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Utils/Bitmap/Bitmap.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/File.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n\nnamespace o2\n{\n    VectorFont::VectorFont() :\n        Font(), mFreeTypeFace(nullptr)\n    {\n        InitializeTexture();\n    }\n\n    VectorFont::VectorFont(const String& fileName) :\n        Font(), mFreeTypeFace(nullptr)\n    {\n        InitializeTexture();\n\n        Load(fileName);\n    }\n\n    VectorFont::VectorFont(const VectorFont& other) :\n        Font(), mFreeTypeFace(other.mFreeTypeFace)\n    {\n        InitializeTexture();\n    }\n\n    void VectorFont::InitializeTexture()\n    {\n        mTexture = TextureRef(Vec2I(mInitialTextureSize, mInitialTextureSize));\n        mTextureSrcRect.Set(0, 0, mInitialTextureSize, mInitialTextureSize);\n    }\n\n    VectorFont::~VectorFont()\n    {\n        if (mFreeTypeFace && mFreeTypeFace->internal)\n            FT_Done_Face(mFreeTypeFace);\n    }\n\n    const char* GetFreeTypeErrorMessage(FT_Error err)\n    {\n#undef __FTERRORS_H__\n#define FT_ERRORDEF( e, v, s )  case e: return s;\n#define FT_ERROR_START_LIST     switch (err) {\n#define FT_ERROR_END_LIST       }\n#include FT_ERRORS_H\n        return \"(Unknown error)\";\n    }\n\n    bool VectorFont::Load(const String& fileName)\n    {\n        InFile file(fileName);\n\n        if (!file.IsOpened())\n        {\n            o2Render.mLog->Error(\"Failed to load vector font: \" + fileName);\n            return false;\n        }\n\n        UInt8* data = mnew UInt8[file.GetDataSize()];\n        file.ReadFullData(data);\n\n        FT_Error error = FT_New_Memory_Face(o2Render.mFreeTypeLib, data, file.GetDataSize(), 0, &mFreeTypeFace);\n\n        //delete[] data;\n\n        if (error)\n        {\n            o2Render.mLog->Error(\"Failed to load vector font: \" + fileName + \", error: \" + (String)GetFreeTypeErrorMessage(error));\n            return false;\n        }\n\n        mFileName = fileName;\n\n        return true;\n    }\n\n    //     void VectorFont::SetSize(UInt size)\n    //     {\n    //         if (size == mSize)\n    //             return;\n    // \n    //         mSize = size;\n    //         Vec2I dpi = o2Render.GetDPI();\n    //         FT_Error error = FT_Set_Char_Size(mFreeTypeFace, 0, mSize*64, dpi.x, dpi.y);\n    // \n    //         FT_Load_Char(mFreeTypeFace, 'A', FT_LOAD_RENDER);\n    //         mBaseHeight = mFreeTypeFace->glyph->metrics.horiBearingY/64.0f;\n    //         mLineHeight = mBaseHeight*2.0f;\n    // \n    // //         mBaseHeight = mFreeTypeFace->ascender/64.0f;\n    // //         mLineHeight = (mFreeTypeFace->ascender - mFreeTypeFace->descender)/64.0f + 5.0f;\n    // \n    //         Reset();\n    //     }\n\n    String VectorFont::GetFileName() const\n    {\n        return mFileName;\n    }\n\n    float VectorFont::GetHeightPx(int height) const\n    {\n        float result = 0;\n        if (mHeights.TryGetValue(height, result))\n            return result;\n\n        FT_Set_Char_Size(mFreeTypeFace, 0, height*64, mResolution, mResolution);\n\n        FT_Load_Char(mFreeTypeFace, 'A', FT_LOAD_RENDER);\n\n        result = mFreeTypeFace->glyph->metrics.horiBearingY/64.0f;\n        mHeights.Add(height, result);\n\n        return result;\n    }\n\n    float VectorFont::GetLineHeightPx(int height) const\n    {\n        return GetHeightPx(height)*2.0f;\n    }\n\n    void VectorFont::CheckCharacters(const WString& needChararacters, int height)\n    {\n        int len = needChararacters.Length();\n        Vector<wchar_t> needToRenderChars;\n        needToRenderChars.Reserve(len);\n\n        for (int i = 0; i < len; i++)\n        {\n            bool isNew = true;\n            wchar_t c = needChararacters[i];\n            auto fndHeight = mCharacters.find(height);\n            if (fndHeight != mCharacters.End())\n                isNew = fndHeight->second.find(c) == fndHeight->second.End();\n\n            if (isNew)\n                isNew = !needToRenderChars.Contains(c);\n\n            if (!isNew)\n                continue;\n\n            needToRenderChars.Add(c);\n        }\n\n        if (needToRenderChars.Count() > 0)\n            UpdateCharacters(needToRenderChars, height);\n    }\n\n    Ref<VectorFont::Effect> VectorFont::AddEffect(const Ref<Effect>& effect)\n    {\n        mEffects.Add(effect);\n        Reset();\n        \n        return effect;\n    }\n\n    void VectorFont::RemoveEffect(const Ref<Effect>& effect)\n    {\n        mEffects.Remove(effect);\n        Reset();\n    }\n\n    void VectorFont::RemoveAllEffects()\n    {\n        mEffects.Clear();\n        Reset();\n    }\n\n    void VectorFont::SetEffects(const Vector<Ref<Effect>>& effects)\n    {\n        mEffects = effects;\n        Reset();\n    }\n\n    const Vector<Ref<VectorFont::Effect>>& VectorFont::GetEffects() const\n    {\n        return mEffects;\n    }\n\n    void VectorFont::Reset()\n    {\n        mCharacters.Clear();\n        onCharactersRebuilt();\n    }\n\n    void VectorFont::UpdateCharacters(Vector<wchar_t>& newCharacters, int height)\n    {\n        RenderNewCharacters(newCharacters, height);\n        //onCharactersRebuilt();\n    }\n\n    void VectorFont::RenderNewCharacters(Vector<wchar_t>& newCharacters, int height)\n    {\n        if (!mFreeTypeFace)\n            return;\n\n        FT_Set_Char_Size(mFreeTypeFace, 0, height * 64, mResolution, mResolution);\n\n        Vec2I border;\n        for (auto& effect : mEffects)\n        {\n            Vec2I effectExt = effect->GetSizeExtend();\n            border.x = Math::Max(border.x, effectExt.x);\n            border.y = Math::Max(border.y, effectExt.y);\n        }\n\n        border += Vec2I(2, 2);\n\n        FT_Load_Char(mFreeTypeFace, 'A', FT_LOAD_RENDER);\n        int symbolsHeight = Math::CeilToInt((mFreeTypeFace->glyph->bitmap.rows + border.y*2)*1.25f);\n\n        for (auto& ch : newCharacters)\n        {\n            CharDef newCharDef;\n\n            FT_Load_Char(mFreeTypeFace, ch, FT_LOAD_RENDER);\n            auto glyph = mFreeTypeFace->glyph;\n\n            Vec2I glyphSize(glyph->bitmap.width, glyph->bitmap.rows);\n\n            Ref<Bitmap> newBitmap = mmake<Bitmap>(PixelFormat::R8G8B8A8, glyphSize + border*2);\n            newBitmap->Fill(Color4(255, 255, 255, 0));\n            UInt8* newBitmapData = newBitmap->GetData();\n            Vec2I newBitmapSize = newBitmap->GetSize();\n\n            for (int x = 0; x < (int)glyph->bitmap.width; x++)\n            {\n                for (int y = 0; y < (int)glyph->bitmap.rows; y++)\n                {\n                    Color4 c(255, 255, 255, glyph->bitmap.buffer[y*glyph->bitmap.width + x]);\n                    ULong cl = c.ABGR();\n                    memcpy(&newBitmapData[((newBitmapSize.y - y - 1 - border.y)*newBitmapSize.x + x + border.x)*4], &cl, 4);\n                }\n            }\n\n            for (auto& effect : mEffects)\n                effect->Process(*newBitmap);\n\n            newCharDef.bitmap = newBitmap;\n            newCharDef.character.mId = ch;\n            newCharDef.character.mHeight = height;\n            newCharDef.character.mSize = newBitmapSize;\n            newCharDef.character.mAdvance = glyph->advance.x/64.0f;\n            newCharDef.character.mOrigin.x = -glyph->metrics.horiBearingX/64.0f + border.x;\n            newCharDef.character.mOrigin.y = (glyph->metrics.height - glyph->metrics.horiBearingY)/64.0f + border.y;\n\n            PackCharacter(newCharDef, symbolsHeight);\n\n            newCharDef.bitmap = nullptr;\n        }\n    }\n\n    void VectorFont::PackCharacter(CharDef& character, int height)\n    {\n        Ref<PackLine> packLine;\n\n        while (!packLine)\n        {\n            packLine = mPackLines.FindOrDefault([&](const Ref<PackLine>& x) {\n                return x->height >= height && x->length + character.bitmap->GetSize().x < mTexture->GetSize().x; });\n\n            if (!packLine)\n            {\n                if (mLastPackLinePos + height <= mTexture->GetSize().y)\n                {\n                    packLine = mmake<PackLine>();\n                    packLine->position = mLastPackLinePos;\n                    packLine->height = height;\n\n                    mPackLines.Add(packLine);\n\n                    mLastPackLinePos += height;\n                }\n                else\n                {\n                    TextureRef lastTexture = mTexture;\n                    mTexture = TextureRef(lastTexture->GetSize()*2, TextureFormat::R8G8B8A8, Texture::Usage::Default);\n                    mTexture->Copy(*lastTexture.Get(), RectI(Vec2I(0, 0), lastTexture->GetSize()));\n\n                    for (auto& heightKV : mCharacters)\n                    {\n                        for (auto& charKV : heightKV.second)\n                        {\n                            charKV.second.mTexSrc.left *= 0.5f;\n                            charKV.second.mTexSrc.right *= 0.5f;\n                            charKV.second.mTexSrc.top *= 0.5f;\n                            charKV.second.mTexSrc.bottom *= 0.5f;\n                        }\n                    }\n                }\n            }\n        }\n\n        character.packLine = packLine;\n        packLine->characters.Add(character);\n\n        character.rect.left = packLine->length;\n        character.rect.top = packLine->position + character.bitmap->GetSize().y;\n        character.rect.right = packLine->length + character.bitmap->GetSize().x;\n        character.rect.bottom = packLine->position;;\n\n        packLine->length += character.bitmap->GetSize().x;\n\n        Vec2F invTexSize(1.0f/mTexture->GetSize().x, 1.0f/mTexture->GetSize().y);\n        character.character.mTexSrc.left = character.rect.left*invTexSize.x;\n        character.character.mTexSrc.right = character.rect.right*invTexSize.x;\n        character.character.mTexSrc.top = 1.0f - character.rect.top*invTexSize.y;\n        character.character.mTexSrc.bottom = 1.0f - character.rect.bottom*invTexSize.y;\n\n        mTexture->SetSubData(character.rect.LeftBottom(), *character.bitmap);\n\n        AddCharacter(character.character);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::VectorFont::Effect, o2__VectorFont__Effect);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/VectorFont.h",
    "content": "#pragma once\n\n#include \"ft2build.h\"\n#include FT_FREETYPE_H\n\n#include \"o2/Render/Font.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Tools/RectPacker.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    class RectsPacker;\n    class Bitmap;\n\n    // -----------\n    // Vector font\n    // -----------\n    class VectorFont: public Font\n    {\n    public:\n        // ---------------------\n        // Font effect interface\n        // ---------------------\n        class Effect: public ISerializable, public RefCounterable, public ICloneableRef\n        {\n        public:\n            // Processes glyph bitmap\n            virtual void Process(Bitmap& bitmap) {};\n\n            // Returns needs extending size for glyph bitmap\n            virtual Vec2I GetSizeExtend() const { return Vec2I(); };\n\n            // Check effect equals\n            virtual bool IsEqual(Effect* other) const { return GetType() == other->GetType(); }\n\n            SERIALIZABLE(Effect);\n            CLONEABLE_REF(Effect);\n        };\n\n    public:\n        // Default constructor\n        VectorFont();\n\n        // Constructor with loading file\n        VectorFont(const String& fileName);\n\n        // Copy-constructor\n        VectorFont(const VectorFont& other);\n\n        // Destructor\n        ~VectorFont();\n\n        // Loads font\n        bool Load(const String& fileName);\n\n        // Returns font file name\n        String GetFileName() const;\n\n        // Returns base height in pixels for font with size\n        float GetHeightPx(int height) const;\n\n        // Returns line height in pixels for font with size\n        float GetLineHeightPx(int height) const;\n\n        // Checks characters for preloading\n        void CheckCharacters(const WString& needChararacters, int height);\n\n        // Adds effect\n        Ref<Effect> AddEffect(const Ref<Effect>& effect);\n\n        // Adds effect\n        template<typename _eff_type, typename ... _args>\n        Ref<_eff_type> AddEffect(_args ... args);\n\n        // Removes effect\n        void RemoveEffect(const Ref<Effect>& effect);\n\n        // Removes all effects\n        void RemoveAllEffects();\n\n        // Sets effects list\n        void SetEffects(const Vector<Ref<Effect>>& effects);\n\n        // Returns effects list\n        const Vector<Ref<Effect>>& GetEffects() const;\n\n        // Removes all cached characters\n        void Reset();\n\n    protected:\n        struct PackLine;\n\n        //-------------------------------\n        // Font glyph rendering character\n        // ------------------------------\n        struct CharDef\n        {\n            WeakRef<PackLine> packLine;\n\n            RectI       rect;\n            Character   character;\n            Ref<Bitmap> bitmap;\n\n            bool operator==(const CharDef& other) const { return false; }\n        };\n\n        // -----------------------\n        // Characters packing line\n        // -----------------------\n        struct PackLine: public RefCounterable\n        {\n            int position = 0;\n            int height = 0;\n            int length = 0;\n\n            Vector<CharDef> characters;\n\n        public:\n            bool operator==(const PackLine& other) const { return false; }\n        };\n\n    protected:\n        static const int mInitialTextureSize = 1024;\n        static const int mResolution = 92;\n\n        String  mFileName;     // Source file name\n        FT_Face mFreeTypeFace; // Free Type font face\n\n        Vector<Ref<Effect>> mEffects; // Font effects\n\n        Vector<Ref<PackLine>> mPackLines;           // Packed symbols lines\n        int                   mLastPackLinePos = 0; // Last packed line bottom pos\n\n        mutable Map<int, float> mHeights; // Cached line heights\n\n    protected:\n        // Initializes glyphs texture\n        void InitializeTexture();\n\n        // Updates characters set\n        void UpdateCharacters(Vector<wchar_t>& newCharacters, int height);\n\n        // Renders new characters\n        void RenderNewCharacters(Vector<wchar_t>& newCharacters, int height);\n\n        // Packs character in line \n        void PackCharacter(CharDef& character, int height);\n    };\n\n    template<typename _eff_type, typename ... _args>\n    Ref<_eff_type> VectorFont::AddEffect(_args ... args)\n    {\n        return DynamicCast<_eff_type>(AddEffect(mmake<_eff_type>(args ...)));\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(o2::VectorFont::Effect)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::VectorFont::Effect)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::VectorFont::Effect)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, Process, Bitmap&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetSizeExtend);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEqual, Effect*);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/VectorFontEffects.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"VectorFontEffects.h\"\n\n#include \"o2/Utils/Bitmap/Bitmap.h\"\n\nnamespace o2\n{\n    FontStrokeEffect::FontStrokeEffect(float radius /*= 1.0f*/, const Color4& color /*= Color4::Black()*/,\n                                       int alphaThreshold /*= 100*/):\n        radius(radius), color(color), alphaThreshold(alphaThreshold)\n    {}\n\n    void FontStrokeEffect::Process(Bitmap& bitmap)\n    {\n        bitmap.Outline(radius, color, alphaThreshold);\n    }\n\n    Vec2I FontStrokeEffect::GetSizeExtend() const\n    {\n        return Vec2F::One()*radius;\n    }\n\n    bool FontStrokeEffect::IsEqual(VectorFont::Effect* other) const\n    {\n        if (!VectorFont::Effect::IsEqual(other))\n            return false;\n\n        FontStrokeEffect* otherEff = (FontStrokeEffect*)other;\n        return Math::Equals(radius, otherEff->radius) && alphaThreshold == otherEff->alphaThreshold &&\n            color == otherEff->color;\n    }\n\n    FontGradientEffect::FontGradientEffect(const Color4& color1 /*= Color4(200, 200, 200, 255)*/, \n                                           const Color4& color2 /*= Color4(255, 255, 255, 255)*/, \n                                           float angle /*= 0*/, float length /*= 0*/, Vec2F origin /*= Vec2F()*/):\n        color1(color1), color2(color2), angle(angle), length(length), origin(origin)\n    {}\n\n    void FontGradientEffect::Process(Bitmap& bitmap)\n    {\n        bitmap.GradientByAlpha(color1, color2, angle, length, origin);\n    }\n\n    Vec2I FontGradientEffect::GetSizeExtend() const\n    {\n        return Vec2I();\n    }\n\n    bool FontGradientEffect::IsEqual(VectorFont::Effect* other) const\n    {\n        if (!VectorFont::Effect::IsEqual(other))\n            return false;\n\n        FontGradientEffect* otherEff = (FontGradientEffect*)other;\n        return Math::Equals(angle, otherEff->angle) && Math::Equals(length, otherEff->length) &&\n            color1 == otherEff->color1 && color2 == otherEff->color2 && origin == otherEff->origin;\n    }\n\n    FontColorEffect::FontColorEffect(const Color4& color /*= Color4::White()*/):\n        color(color)\n    {}\n\n    void FontColorEffect::Process(Bitmap& bitmap)\n    {\n        bitmap.Colorise(color);\n    }\n\n    Vec2I FontColorEffect::GetSizeExtend() const\n    {\n        return Vec2I();\n    }\n\n    bool FontColorEffect::IsEqual(VectorFont::Effect* other) const\n    {\n        if (!VectorFont::Effect::IsEqual(other))\n            return false;\n\n        FontColorEffect* otherEff = (FontColorEffect*)other;\n        return color == otherEff->color;\n    }\n\n    FontShadowEffect::FontShadowEffect(float blurRadius /*= 2.0f*/, const Vec2I offset /*= Vec2I(2, 2)*/, \n                                       const Color4& color /*= Color4::Black()*/):\n        blurRadius(blurRadius), offset(offset), color(color)\n    {}\n\n    void FontShadowEffect::Process(Bitmap& bitmap)\n    {\n        Bitmap shadow(bitmap);\n        shadow.Colorise(color);\n        shadow.Blur(blurRadius);\n        bitmap.BlendImage(shadow, offset);\n    }\n\n    Vec2I FontShadowEffect::GetSizeExtend() const\n    {\n        return offset + (Vec2I)(Vec2F::One()*blurRadius);\n    }\n\n    bool FontShadowEffect::IsEqual(VectorFont::Effect* other) const\n    {\n        if (!VectorFont::Effect::IsEqual(other))\n            return false;\n\n        FontShadowEffect* otherEff = (FontShadowEffect*)other;\n        return Math::Equals(blurRadius, otherEff->blurRadius) && offset == otherEff->offset && \n            color == otherEff->color;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::FontStrokeEffect, o2__FontStrokeEffect);\n\nDECLARE_CLASS(o2::FontGradientEffect, o2__FontGradientEffect);\n\nDECLARE_CLASS(o2::FontColorEffect, o2__FontColorEffect);\n\nDECLARE_CLASS(o2::FontShadowEffect, o2__FontShadowEffect);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/VectorFontEffects.h",
    "content": "#pragma once\n\n#include \"o2/Render/VectorFont.h\"\n\nnamespace o2\n{\n    // ------------------\n    // Font stroke effect\n    // ------------------\n    class FontStrokeEffect: public VectorFont::Effect\n    {\n    public:\n        float  radius;         // Stroke radius @SERIALIZABLE\n        int    alphaThreshold; // Stroke alpha threshold @SERIALIZABLE\n        Color4 color;          // Color @SERIALIZABLE\n\n    public:\n        // Constructor\n        FontStrokeEffect(float radius = 1.0f, const Color4& color = Color4(0, 0, 0, 150), int alphaThreshold = 100);\n\n        // Process bitmap with glyph\n        void Process(Bitmap& bitmap) override;\n\n        // Returns bitmap extending size\n        Vec2I GetSizeExtend() const override;\n\n        // Check effects equals\n        bool IsEqual(VectorFont::Effect* other) const override;\n\n        SERIALIZABLE(FontStrokeEffect);\n        CLONEABLE_REF(FontStrokeEffect);\n    };\n\n    // -----------------------\n    // Gradient filling effect\n    // -----------------------\n    class FontGradientEffect: public VectorFont::Effect\n    {\n    public:\n        Color4 color1; // First color @SERIALIZABLE\n        Color4 color2; // Second color @SERIALIZABLE\n        float  angle;  // Angle in degrees @SERIALIZABLE\n        float  length; // Length. 0 means maximum size @SERIALIZABLE\n        Vec2F  origin; // Relative origin @SERIALIZABLE\n        \n    public:\n        // Constructor\n        FontGradientEffect(const Color4& color1 = Color4(200, 200, 200, 255),\n                           const Color4& color2 = Color4(255, 255, 255, 255),\n                           float angle = 0, float length = 0, Vec2F origin = Vec2F());\n\n        // Process bitmap with glyph\n        void Process(Bitmap& bitmap) override;\n\n        // Returns bitmap extending size\n        Vec2I GetSizeExtend() const override;\n\n        // Check effects equals\n        bool IsEqual(VectorFont::Effect* other) const override;\n\n\t\tSERIALIZABLE(FontGradientEffect);\n\t\tCLONEABLE_REF(FontGradientEffect);\n    };\n\n    class FontColorEffect: public VectorFont::Effect\n    {\n    public:\n        Color4 color; // @SERIALIZABLE\n\n    public:\n        // Constructor\n        FontColorEffect(const Color4& color = Color4::White());\n\n        // Process bitmap with glyph\n        void Process(Bitmap& bitmap) override;\n\n        // Returns bitmap extending size\n        Vec2I GetSizeExtend() const override;\n\n        // Check effects equals\n        bool IsEqual(VectorFont::Effect* other) const override;\n\n\t\tSERIALIZABLE(FontColorEffect);\n\t\tCLONEABLE_REF(FontColorEffect);\n    };\n\n    class FontShadowEffect: public VectorFont::Effect\n    {\n    public:\n        float  blurRadius; // Bluring radius @SERIALIZABLE\n        Vec2I  offset;     // Offset @SERIALIZABLE\n        Color4 color;      // Shadow color @SERIALIZABLE\n\n    public:\n        // Constructor\n        FontShadowEffect(float blurRadius = 2.0f, const Vec2I offset = Vec2I(2, 2), \n                         const Color4& color = Color4(0, 0, 0, 100));\n\n        // Process bitmap with glyph\n        void Process(Bitmap& bitmap) override;\n\n        // Returns bitmap extending size\n        Vec2I GetSizeExtend() const override;\n\n        // Check effects equals\n        bool IsEqual(VectorFont::Effect* other) const override;\n\n\t\tSERIALIZABLE(FontShadowEffect);\n\t\tCLONEABLE_REF(FontShadowEffect);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::FontStrokeEffect)\n{\n    BASE_CLASS(o2::VectorFont::Effect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FontStrokeEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(radius);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(alphaThreshold);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(color);\n}\nEND_META;\nCLASS_METHODS_META(o2::FontStrokeEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(float, const Color4&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, Process, Bitmap&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetSizeExtend);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEqual, VectorFont::Effect*);\n}\nEND_META;\n\nCLASS_BASES_META(o2::FontGradientEffect)\n{\n    BASE_CLASS(o2::VectorFont::Effect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FontGradientEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(color1);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(color2);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(angle);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(length);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(origin);\n}\nEND_META;\nCLASS_METHODS_META(o2::FontGradientEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Color4&, const Color4&, float, float, Vec2F);\n    FUNCTION().PUBLIC().SIGNATURE(void, Process, Bitmap&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetSizeExtend);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEqual, VectorFont::Effect*);\n}\nEND_META;\n\nCLASS_BASES_META(o2::FontColorEffect)\n{\n    BASE_CLASS(o2::VectorFont::Effect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FontColorEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(color);\n}\nEND_META;\nCLASS_METHODS_META(o2::FontColorEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Process, Bitmap&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetSizeExtend);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEqual, VectorFont::Effect*);\n}\nEND_META;\n\nCLASS_BASES_META(o2::FontShadowEffect)\n{\n    BASE_CLASS(o2::VectorFont::Effect);\n}\nEND_META;\nCLASS_FIELDS_META(o2::FontShadowEffect)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(blurRadius);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(offset);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(color);\n}\nEND_META;\nCLASS_METHODS_META(o2::FontShadowEffect)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(float, const Vec2I, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Process, Bitmap&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2I, GetSizeExtend);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEqual, VectorFont::Effect*);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/MaterialBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WASM\n\n#include \"o2/Render/WebAssembly/OpenGL.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    // Cached GL locations for an additional texture sampler\n    struct SamplerLocation\n    {\n        GLint samplerUniform = -1;     // Sampler uniform location\n        GLint texCoordsAttribute = -1; // Texcoord attribute location\n    };\n\n    // ----------------------------------------------------------------\n    // Platform-specific (WebAssembly/WebGL) material data and handles\n    // ----------------------------------------------------------------\n    class MaterialBase\n    {\n        friend class Render;\n\n    protected:\n        GLuint mProgram = 0; // OpenGL shader program handle\n\n        GLint mTransformUniform = -1;   // Location of u_transformMatrix uniform\n        GLint mTextureUniform = -1;     // Location of u_texture uniform (primary)\n        GLint mPositionAttribute = -1;  // Location of a_position attribute\n        GLint mColorAttribute = -1;     // Location of a_color attribute\n        GLint mTexCoordsAttribute = -1; // Location of a_texCoords attribute (primary)\n        GLint mNormalAttribute = -1;    // Location of a_normal attribute\n\n        mutable Vector<GLint> mParamUniformLocations;\n\n        Vector<SamplerLocation> mSamplerLocations;\n    };\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/MaterialImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WASM\n\n#include \"o2/Render/Material.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    bool Material::PlatformBuild()\n    {\n        GLuint program = glCreateProgram();\n        if (program)\n        {\n            glAttachShader(program, mVertexShader->mHandle);\n            glAttachShader(program, mFragmentShader->mHandle);\n\n            GLint linkStatus;\n            glLinkProgram(program);\n            glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);\n\n            if (!linkStatus)\n            {\n                GLint infoLen = 0;\n                glGetProgramiv(program, GL_INFO_LOG_LENGTH, &infoLen);\n\n                if (infoLen > 0)\n                {\n                    char* infoLog = (char*)malloc(sizeof(char) * infoLen);\n                    glGetProgramInfoLog(program, infoLen, NULL, infoLog);\n                    o2Debug.LogError((String)\"Error linking material shader program:\\n\" + infoLog);\n                    free(infoLog);\n                }\n\n                glDeleteProgram(program);\n                return false;\n            }\n        }\n        else\n        {\n            return false;\n        }\n\n        mProgram = program;\n        mTransformUniform = glGetUniformLocation(program, \"u_transformMatrix\");\n        mTextureUniform = glGetUniformLocation(program, \"u_texture\");\n        mPositionAttribute = glGetAttribLocation(program, \"a_position\");\n        mColorAttribute = glGetAttribLocation(program, \"a_color\");\n        mTexCoordsAttribute = glGetAttribLocation(program, \"a_texCoords\");\n        mNormalAttribute = glGetAttribLocation(program, \"a_normal\");\n\n        mParamUniformLocations.Resize(mParams.Count());\n        for (int i = 0; i < mParams.Count(); i++)\n            mParamUniformLocations[i] = glGetUniformLocation(program, mParams[i]->GetName().Data());\n\n        mSamplerLocations.Resize(mSamplers.Count());\n        for (int i = 0; i < mSamplers.Count(); i++)\n        {\n            mSamplerLocations[i].samplerUniform = glGetUniformLocation(program, mSamplers[i].samplerUniformName.Data());\n            mSamplerLocations[i].texCoordsAttribute = glGetAttribLocation(program, mSamplers[i].texCoordsAttrName.Data());\n        }\n\n        return true;\n    }\n\n    void Material::PlatformDestroy()\n    {\n        if (mProgram)\n        {\n            glDeleteProgram(mProgram);\n            mProgram = 0;\n        }\n\n        mParamUniformLocations.Clear();\n        mSamplerLocations.Clear();\n        mReady = false;\n    }\n\n    void Material::PlatformApplyParams() const\n    {\n        if (mParamUniformLocations.Count() != mParams.Count())\n        {\n            mParamUniformLocations.Resize(mParams.Count());\n            for (int i = 0; i < mParams.Count(); i++)\n            {\n                if (mParams[i])\n                    mParamUniformLocations[i] = glGetUniformLocation(mProgram, mParams[i]->GetName().Data());\n            }\n        }\n\n        for (int i = 0; i < mParams.Count(); i++)\n        {\n            GLint loc = mParamUniformLocations[i];\n            if (loc < 0)\n                continue;\n\n            const auto& param = mParams[i];\n            if (auto* fp = dynamic_cast<ShaderParamFloat*>(param.Get()))\n                glUniform1f(loc, fp->GetValue());\n            else if (auto* v2p = dynamic_cast<ShaderParamVec2*>(param.Get()))\n                glUniform2f(loc, v2p->GetValue().x, v2p->GetValue().y);\n            else if (auto* cp = dynamic_cast<ShaderParamColor*>(param.Get()))\n                glUniform4f(loc, cp->GetValue().RF(), cp->GetValue().GF(), cp->GetValue().BF(), cp->GetValue().AF());\n            else if (auto* ip = dynamic_cast<ShaderParamInt*>(param.Get()))\n                glUniform1i(loc, ip->GetValue());\n        }\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/OpenGL.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WASM\n\n#include \"o2/Render/WebAssembly/OpenGL.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nconst char* GetGLErrorDesc(GLenum errorId)\n{\n    switch (errorId)\n    {\n        case GL_NO_ERROR:                      return \"GL_NO_ERROR\";\n        case GL_INVALID_ENUM:                  return \"GL_INVALID_ENUM\";\n        case GL_INVALID_VALUE:                 return \"GL_INVALID_VALUE\";\n        case GL_INVALID_OPERATION:             return \"GL_INVALID_OPERATION\";\n        case GL_INVALID_FRAMEBUFFER_OPERATION: return \"GL_INVALID_FRAMEBUFFER_OPERATION\";\n        case GL_OUT_OF_MEMORY:                 return \"GL_OUT_OF_MEMORY\";\n        default:                               return \"Unknown GL error\";\n    }\n}\n\nvoid glCheckError(const char* filename /*= nullptr*/, unsigned int line /*= 0*/)\n{\n    GLenum err = glGetError();\n    if (err != GL_NO_ERROR)\n    {\n        o2::String msg = \"GL error: \";\n        msg += GetGLErrorDesc(err);\n        if (filename)\n        {\n            msg += \" at \";\n            msg += filename;\n            msg += \":\";\n            msg += o2::String((int)line);\n        }\n        o2Debug.LogError(msg);\n    }\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/OpenGL.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WASM\n\n#include <GLES3/gl3.h>\n\nnamespace o2\n{\n    class LogStream;\n}\n\nconst char* GetGLErrorDesc(GLenum errorId);\n\nvoid glCheckError(const char* filename = nullptr, unsigned int line = 0);\n\n#if RENDER_DEBUG\n#    define GL_CHECK_ERROR() glCheckError(__FILE__, __LINE__);\n#else\n#    define GL_CHECK_ERROR()\n#endif\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/RenderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WASM\n\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Render/WebAssembly/OpenGL.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\nnamespace o2\n{\n    class Texture;\n\n    class RenderBase\n    {\n    protected:\n        GLuint mActiveProgram = 0;          // Currently active shader program\n        GLint  mActiveMvpUniform = -1;      // Currently active transform uniform location\n        GLint  mActiveTextureSample = -1;   // Currently active texture sampler uniform location\n        GLint  mActivePosAttribute = -1;    // Currently active position attribute location\n        GLint  mActiveColorAttribute = -1;  // Currently active color attribute location\n        GLint  mActiveUVAttribute = -1;     // Currently active texcoords attribute location\n        GLint  mActiveNormalAttribute = -1; // Currently active normal attribute location\n\n        float mCurrentMvp[16]; // Cached MVP matrix for material rebinding\n\n        const static int mBuffersPoolsSize = 3;       // Count of buffers in pools\n        GLuint mVertexBuffersPool[mBuffersPoolsSize]; // GPU vertex buffer objects\n        GLuint mIndexBuffersPool[mBuffersPoolsSize];  // GPU index buffer objects\n        int    mCurrentBufferIdx = 0;                 // Current buffer pool index\n    };\n};\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/RenderImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WASM\n#include \"o2/Render/Render.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/Math/Geometry.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n\n#include <emscripten.h>\n#include <emscripten/html5.h>\n\nnamespace o2\n{\n    namespace\n    {\n        EMSCRIPTEN_WEBGL_CONTEXT_HANDLE gWebGLContext = 0;\n    }\n\n    void Render::InitializePlatform()\n    {\n        mLog->Out(\"Initializing WebGL 2 render..\");\n\n        EmscriptenWebGLContextAttributes attrs;\n        emscripten_webgl_init_context_attributes(&attrs);\n        attrs.majorVersion = 2;\n        attrs.minorVersion = 0;\n        attrs.alpha = EM_FALSE;\n        attrs.depth = EM_TRUE;\n        attrs.stencil = EM_FALSE;\n        attrs.antialias = EM_FALSE;\n        attrs.preserveDrawingBuffer = EM_FALSE;\n        attrs.premultipliedAlpha = EM_FALSE;\n        attrs.powerPreference = EM_WEBGL_POWER_PREFERENCE_HIGH_PERFORMANCE;\n\n        gWebGLContext = emscripten_webgl_create_context(\"#canvas\", &attrs);\n        if (gWebGLContext <= 0)\n        {\n            mLog->Error(\"Failed to create WebGL 2 context.\");\n            return;\n        }\n\n        if (emscripten_webgl_make_context_current(gWebGLContext) != EMSCRIPTEN_RESULT_SUCCESS)\n        {\n            mLog->Error(\"Failed to activate WebGL 2 context.\");\n            return;\n        }\n\n        GL_CHECK_ERROR();\n\n        mVertexBufferSize = USHRT_MAX;\n        mIndexBufferSize = USHRT_MAX;\n        mCurrentBatchVertexType = Vertex::Type();\n        mVertexBufferByteSize = mVertexBufferSize * sizeof(Vertex);\n\n        mVertexData = mnew UInt8[mVertexBufferByteSize];\n        mVertexIndexData = mnew VertexIndex[mIndexBufferSize];\n\n        for (int i = 0; i < mBuffersPoolsSize; i++)\n        {\n            glGenBuffers(1, &mVertexBuffersPool[i]);\n            glBindBuffer(GL_ARRAY_BUFFER, mVertexBuffersPool[i]);\n            glBufferData(GL_ARRAY_BUFFER, mVertexBufferByteSize, mVertexData, GL_DYNAMIC_DRAW);\n\n            glGenBuffers(1, &mIndexBuffersPool[i]);\n            glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffersPool[i]);\n            glBufferData(GL_ELEMENT_ARRAY_BUFFER, (GLsizeiptr)(mIndexBufferSize * sizeof(VertexIndex)),\n                         mVertexIndexData, GL_DYNAMIC_DRAW);\n        }\n\n        glEnable(GL_BLEND);\n        glDisable(GL_DEPTH_TEST);\n        glDisable(GL_CULL_FACE);\n        glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n\n        const GLubyte* vendor   = glGetString(GL_VENDOR);\n        const GLubyte* renderer = glGetString(GL_RENDERER);\n        const GLubyte* version  = glGetString(GL_VERSION);\n        if (vendor)   mLog->Out((String)\"GL_VENDOR: \"   + (const char*)vendor);\n        if (renderer) mLog->Out((String)\"GL_RENDERER: \" + (const char*)renderer);\n        if (version)  mLog->Out((String)\"GL_VERSION: \"  + (const char*)version);\n    }\n\n    void Render::DeinitializePlatform()\n    {\n        if (gWebGLContext > 0)\n        {\n            emscripten_webgl_destroy_context(gWebGLContext);\n            gWebGLContext = 0;\n        }\n    }\n\n    void Render::InitializeSandardShader() {}\n\n    void Render::PlatformInitializeDefaultMaterial()\n    {\n        String basePath = GetBuiltinAssetsPath();\n        String vSource = FileSystem::ReadFile(basePath + \"Shaders/Default.vsh\");\n        String fSource = FileSystem::ReadFile(basePath + \"Shaders/Default.fsh\");\n\n        if (vSource.IsEmpty() || fSource.IsEmpty())\n        {\n            o2Debug.LogError(\"Failed to load default shader files. Ensure BuiltAssets contains Shaders/Default.{vsh,fsh}.\");\n            return;\n        }\n\n        Ref<Shader> vShader = mmake<Shader>();\n        Ref<Shader> fShader = mmake<Shader>();\n        vShader->Compile(vSource, Shader::Type::Vertex);\n        fShader->Compile(fSource, Shader::Type::Fragment);\n\n        if (!vShader->IsReady() || !fShader->IsReady())\n        {\n            o2Debug.LogError(\"Failed to compile default shaders.\");\n            return;\n        }\n\n        mDefaultMaterial = mmake<Material>();\n        mDefaultMaterial->SetVertexShader(vShader);\n        mDefaultMaterial->SetFragmentShader(fShader);\n        mDefaultMaterial->SetBlendMode(BlendMode::Normal);\n        if (!mDefaultMaterial->Build())\n        {\n            o2Debug.LogError(\"Failed to build default material.\");\n            mDefaultMaterial = nullptr;\n        }\n    }\n\n    static void BindBatchAttributes(const VertexType& vtype, GLint pos, GLint color, GLint uv, GLint normal)\n    {\n        size_t stride = vtype.GetStride();\n        if (stride == 0) stride = sizeof(Vertex);\n\n        if (pos >= 0)\n        {\n            glVertexAttribPointer((GLuint)pos, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)vtype.GetParamOffset(VertexParam::Position));\n            glEnableVertexAttribArray((GLuint)pos);\n        }\n        if (color >= 0)\n        {\n            glVertexAttribPointer((GLuint)color, 4, GL_UNSIGNED_BYTE, GL_TRUE, (GLsizei)stride,\n                                  (void*)vtype.GetParamOffset(VertexParam::Color));\n            glEnableVertexAttribArray((GLuint)color);\n        }\n        if (uv >= 0)\n        {\n            glVertexAttribPointer((GLuint)uv, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)vtype.GetParamOffset(VertexParam::TexCoord0));\n            glEnableVertexAttribArray((GLuint)uv);\n        }\n        if (normal >= 0 && vtype.HasParam(VertexParam::Normal))\n        {\n            glVertexAttribPointer((GLuint)normal, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)vtype.GetParamOffset(VertexParam::Normal));\n            glEnableVertexAttribArray((GLuint)normal);\n        }\n    }\n\n    void Render::PlatformBindNextPoolBuffers()\n    {\n        mCurrentBufferIdx++;\n        if (mCurrentBufferIdx == mBuffersPoolsSize)\n            mCurrentBufferIdx = 0;\n\n        glBindBuffer(GL_ARRAY_BUFFER, mVertexBuffersPool[mCurrentBufferIdx]);\n        glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffersPool[mCurrentBufferIdx]);\n        GL_CHECK_ERROR();\n\n        BindBatchAttributes(mCurrentBatchVertexType,\n                            mActivePosAttribute, mActiveColorAttribute,\n                            mActiveUVAttribute, mActiveNormalAttribute);\n        GL_CHECK_ERROR();\n\n        mVertexBufferIdx = 0;\n        mIndexBufferIdx = 0;\n    }\n\n    void Render::PlatformBegin()\n    {\n        PlatformBindNextPoolBuffers();\n    }\n\n    void Render::PlatformDrawPrimitives()\n    {\n        static const GLenum primitiveType[3]{ GL_TRIANGLES, GL_TRIANGLES, GL_LINES };\n\n        size_t stride = mCurrentBatchVertexType.GetStride();\n\n        glBufferSubData(GL_ARRAY_BUFFER, mVertexBufferIdx * stride,\n                        mLastDrawVertex * stride, mVertexData);\n        glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, mIndexBufferIdx * sizeof(VertexIndex),\n                        mLastDrawIdx * sizeof(VertexIndex), mVertexIndexData);\n        GL_CHECK_ERROR();\n\n        glActiveTexture(GL_TEXTURE0);\n        glBindTexture(GL_TEXTURE_2D, mCurrentDrawTexture ? mCurrentDrawTexture->mHandle : mWhiteTexture->mHandle);\n        glUniform1i(mActiveTextureSample, 0);\n        GL_CHECK_ERROR();\n\n        glDrawElements(primitiveType[(int)mCurrentPrimitiveType], mLastDrawIdx,\n                       GL_UNSIGNED_INT, (void*)(mIndexBufferIdx * sizeof(VertexIndex)));\n        GL_CHECK_ERROR();\n\n        mVertexBufferIdx += mLastDrawVertex;\n        mIndexBufferIdx += mLastDrawIdx;\n    }\n\n    void Render::PlatformEnd()\n    {\n        GL_CHECK_ERROR();\n        // Emscripten automatically presents on main loop return.\n    }\n\n    void Render::PlatformResetState()\n    {\n        glEnable(GL_BLEND);\n        glDisable(GL_DEPTH_TEST);\n        glDisable(GL_CULL_FACE);\n        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n        glDisable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n\n        BindMaterial(mDefaultMaterial);\n        PlatformBindNextPoolBuffers();\n\n        glActiveTexture(GL_TEXTURE0);\n        glBindTexture(GL_TEXTURE_2D, 0);\n        GL_CHECK_ERROR();\n\n        glUniform1i(mActiveTextureSample, 0);\n        GL_CHECK_ERROR();\n\n        BindBatchAttributes(mCurrentBatchVertexType,\n                            mActivePosAttribute, mActiveColorAttribute,\n                            mActiveUVAttribute, mActiveNormalAttribute);\n        GL_CHECK_ERROR();\n    }\n\n    VertexType Render::PlatformResolveBatchVertexType(const VertexType& sourceVertexType, const Ref<Material>& material) const\n    {\n        return ResolveBatchVertexTypeByMaterial(sourceVertexType, material);\n    }\n\n    void Render::Clear(const Color4& color /*= Color4::Blur()*/)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        glClearColor(color.RF(), color.GF(), color.BF(), color.AF());\n        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformSetupCameraTransforms(float* modelMatrix, float* viewMatrix, float* projMatrix)\n    {\n        float finalCamMtx[16];\n        Math::mtxMultiply(finalCamMtx, modelMatrix, viewMatrix);\n        Math::mtxMultiply(mCurrentMvp, projMatrix, finalCamMtx);\n\n        glViewport(0, 0, mCurrentResolution.x, mCurrentResolution.y);\n        glUniformMatrix4fv(mActiveMvpUniform, 1, GL_FALSE, mCurrentMvp);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformFlipVerticesUV()\n    {\n        size_t stride = mCurrentBatchVertexType.GetStride();\n        size_t tvOffset = mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0) + sizeof(float);\n\n        for (UInt i = 0; i < mLastDrawVertex; i++)\n        {\n            float& tv = *reinterpret_cast<float*>(&mVertexData[i * stride + tvOffset]);\n            tv = 1.0f - tv;\n        }\n    }\n\n    void Render::PlatformEnableScissorTest()\n    {\n        glEnable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformDisableScissorTest()\n    {\n        glDisable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformSetScissorRect(const RectI& rect)\n    {\n        glScissor((int)(rect.left + mCurrentResolution.x * 0.5f),\n                  (int)(rect.bottom + mCurrentResolution.y * 0.5f),\n                  (int)rect.Width(), (int)rect.Height());\n    }\n\n    void Render::PlatformBindRenderTarget(const TextureRef& renderTarget)\n    {\n        if (renderTarget)\n            glBindFramebuffer(GL_FRAMEBUFFER, renderTarget->mFrameBuffer);\n        else\n            glBindFramebuffer(GL_FRAMEBUFFER, 0);\n\n        GL_CHECK_ERROR();\n    }\n\n    Vec2I Render::GetPlatformMaxTextureSize()\n    {\n        int size = 0;\n        glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);\n        return Vec2I(size, size);\n    }\n\n    Vec2I Render::GetPlatformDPI()\n    {\n        int dpi = (int)(96 * emscripten_get_device_pixel_ratio());\n        return Vec2I(dpi, dpi);\n    }\n\n    void Render::PlatformBindMaterial(const Ref<Material>& material)\n    {\n        if (material->mProgram != mActiveProgram)\n        {\n            mActiveProgram = material->mProgram;\n            mActiveMvpUniform = material->mTransformUniform;\n            mActiveTextureSample = material->mTextureUniform;\n            mActivePosAttribute = material->mPositionAttribute;\n            mActiveColorAttribute = material->mColorAttribute;\n            mActiveUVAttribute = material->mTexCoordsAttribute;\n            mActiveNormalAttribute = material->mNormalAttribute;\n\n            glUseProgram(mActiveProgram);\n            GL_CHECK_ERROR();\n\n            BindBatchAttributes(mCurrentBatchVertexType,\n                                mActivePosAttribute, mActiveColorAttribute,\n                                mActiveUVAttribute, mActiveNormalAttribute);\n\n            const UInt texCoordParams[] = { VertexParam::TexCoord1, VertexParam::TexCoord2 };\n            size_t stride = mCurrentBatchVertexType.GetStride();\n            if (stride == 0) stride = sizeof(Vertex);\n            for (int i = 0; i < material->mSamplerLocations.Count(); i++)\n            {\n                GLint attrLoc = material->mSamplerLocations[i].texCoordsAttribute;\n                if (attrLoc >= 0 && i < 2 && mCurrentBatchVertexType.HasParam(texCoordParams[i]))\n                {\n                    glVertexAttribPointer((GLuint)attrLoc, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                          (void*)mCurrentBatchVertexType.GetParamOffset(texCoordParams[i]));\n                    glEnableVertexAttribArray((GLuint)attrLoc);\n                }\n            }\n\n            GL_CHECK_ERROR();\n\n            glUniformMatrix4fv(mActiveMvpUniform, 1, GL_FALSE, mCurrentMvp);\n            GL_CHECK_ERROR();\n        }\n\n        material->ApplyParams();\n\n        for (int i = 0; i < material->mSamplerLocations.Count() && i < material->mSamplers.Count(); i++)\n        {\n            const auto& loc = material->mSamplerLocations[i];\n            TextureRef tex = material->mSamplers[i].GetTexture();\n            if (!tex)\n                continue;\n\n            GLint texUnit = i + 1;\n            glActiveTexture(GL_TEXTURE0 + texUnit);\n            glBindTexture(GL_TEXTURE_2D, tex->mHandle);\n\n            if (loc.samplerUniform >= 0)\n                glUniform1i(loc.samplerUniform, texUnit);\n        }\n        glActiveTexture(GL_TEXTURE0);\n\n        if (material->GetBlendMode() == BlendMode::Add)\n            glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n        else\n            glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/ShaderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WASM\n\n#include \"o2/Render/WebAssembly/OpenGL.h\"\n\nnamespace o2\n{\n    // --------------------------------------------------------------\n    // Platform-specific (WebAssembly/WebGL) shader data and handles\n    // --------------------------------------------------------------\n    class ShaderBase\n    {\n        friend class Render;\n        friend class Material;\n\n    protected:\n        GLuint mHandle = 0; // OpenGL shader object handle\n    };\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/ShaderImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WASM\n\n#include \"o2/Render/Shader.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    bool Shader::PlatformCompile(const String& source, Type type)\n    {\n        GLenum glType = (type == Type::Vertex) ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER;\n        GLuint shader = glCreateShader(glType);\n\n        if (shader)\n        {\n            // GLSL ES requires fragment shaders to declare default float precision.\n            String patched = (type == Type::Fragment && !source.Contains(\"precision\"))\n                ? (String)\"precision mediump float;\\n\" + source\n                : source;\n            const char* src = patched.Data();\n            glShaderSource(shader, 1, &src, NULL);\n            glCompileShader(shader);\n\n            GLint compiled = 0;\n            glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);\n\n            if (!compiled)\n            {\n                GLint infoLen = 0;\n                glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);\n\n                if (infoLen > 0)\n                {\n                    char* infoLog = (char*)malloc(sizeof(char) * infoLen);\n                    glGetShaderInfoLog(shader, infoLen, NULL, infoLog);\n                    o2Debug.LogError((String)\"Error compiling shader \" + mFileName + \":\\n\" + infoLog);\n                    free(infoLog);\n                }\n\n                glDeleteShader(shader);\n                shader = 0;\n            }\n        }\n\n        mHandle = shader;\n        return shader != 0;\n    }\n\n    void Shader::PlatformDestroy()\n    {\n        if (mHandle)\n        {\n            glDeleteShader(mHandle);\n            mHandle = 0;\n        }\n\n        mReady = false;\n    }\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/TextureBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WASM\n\n#include \"o2/Render/WebAssembly/OpenGL.h\"\n\nnamespace o2\n{\n    class TextureBase\n    {\n        friend class Render;\n        friend class VectorFont;\n\n    protected:\n        GLuint mHandle = 0;      // WebGL texture handle\n        GLuint mFrameBuffer = 0; // Frame buffer for rendering into texture\n    };\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/WebAssembly/TextureImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WASM\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    static GLint MapTextureFormat(TextureFormat format)\n    {\n        switch (format)\n        {\n            case TextureFormat::R8G8B8A8: return GL_RGBA;\n            default:                      return GL_RGBA; // WebGL2 has no DXT5; fall back to RGBA\n        }\n    }\n\n    bool Texture::PlatformCreate()\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n\n        glGenTextures(1, &mHandle);\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        GL_CHECK_ERROR();\n\n        GLint texFormat = MapTextureFormat(mFormat);\n        glTexImage2D(GL_TEXTURE_2D, 0, texFormat, (GLsizei)mSize.x, (GLsizei)mSize.y, 0, texFormat, GL_UNSIGNED_BYTE, NULL);\n        GL_CHECK_ERROR();\n\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n        GL_CHECK_ERROR();\n\n        if (mUsage == Usage::RenderTarget)\n        {\n            glGenFramebuffers(1, &mFrameBuffer);\n            glBindFramebuffer(GL_FRAMEBUFFER, mFrameBuffer);\n\n            glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mHandle, 0);\n\n            if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)\n            {\n                GLenum glError = glGetError();\n                o2Render.mLog->Error((String)\"Failed to create GL frame buffer object! GL Error \" + (int)glError + \" \" +\n                                     GetGLErrorDesc(glError));\n                glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n                return false;\n            }\n\n            glBindFramebuffer(GL_FRAMEBUFFER, 0);\n            GL_CHECK_ERROR();\n        }\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n        return true;\n    }\n\n    void Texture::PlatformDestroy()\n    {\n        if (mUsage == Usage::RenderTarget && mFrameBuffer)\n            glDeleteFramebuffers(1, &mFrameBuffer);\n\n        if (mHandle)\n            glDeleteTextures(1, &mHandle);\n    }\n\n    void Texture::PlatformUploadData(const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n\n        GLint texFormat = MapTextureFormat(format);\n        glTexImage2D(GL_TEXTURE_2D, 0, texFormat, (GLsizei)size.x, (GLsizei)size.y, 0, texFormat, GL_UNSIGNED_BYTE, data);\n        GL_CHECK_ERROR();\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformUploadRegionData(const Vec2I& offset, const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n\n        GLint texFormat = MapTextureFormat(format);\n        glTexSubImage2D(GL_TEXTURE_2D, 0, offset.x, offset.y, size.x, size.y, texFormat, GL_UNSIGNED_BYTE, data);\n        GL_CHECK_ERROR();\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::Copy(const Texture& from, const RectI& rect)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, from.mHandle);\n\n        GLint texFormat = MapTextureFormat(mFormat);\n        glCopyTexImage2D(GL_TEXTURE_2D, 0, texFormat, rect.left, rect.top, rect.Width(), rect.Height(), 0);\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformGetData(Byte* data)\n    {\n        // WebGL has no glGetTexImage. Readback via FBO + glReadPixels\n        GLuint tmpFbo = 0;\n        glGenFramebuffers(1, &tmpFbo);\n        glBindFramebuffer(GL_FRAMEBUFFER, tmpFbo);\n        glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mHandle, 0);\n\n        if (glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE)\n            glReadPixels(0, 0, mSize.x, mSize.y, GL_RGBA, GL_UNSIGNED_BYTE, data);\n        else\n            o2Render.mLog->Error(\"Texture::PlatformGetData: framebuffer incomplete for readback\");\n\n        glBindFramebuffer(GL_FRAMEBUFFER, 0);\n        glDeleteFramebuffers(1, &tmpFbo);\n    }\n\n    void Texture::PlatformSetFilter()\n    {\n        GLint type = GL_LINEAR;\n        if (mFilter == Filter::Nearest)\n            type = GL_NEAREST;\n\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        o2Render.DrawPrimitives();\n\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, type);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, type);\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_WASM\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/MaterialBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WINDOWS\n\n#include \"o2/Render/Windows/OpenGL.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    // Cached GL locations for an additional texture sampler\n    struct SamplerLocation\n    {\n        GLint samplerUniform = -1;   // Sampler uniform location\n        GLint texCoordsAttribute = -1; // Texcoord attribute location\n    };\n\n    // ------------------------------------------------------------\n    // Platform-specific (Windows/OpenGL) material data and handles\n    // ------------------------------------------------------------\n    class MaterialBase\n    {\n        friend class Render;\n\n    protected:\n        GLuint mProgram = 0; // OpenGL shader program handle\n\n        GLint mTransformUniform = -1;   // Location of u_transformMatrix uniform\n        GLint mTextureUniform = -1;     // Location of u_texture uniform (primary)\n        GLint mPositionAttribute = -1;  // Location of a_position attribute\n        GLint mColorAttribute = -1;     // Location of a_color attribute\n        GLint mTexCoordsAttribute = -1; // Location of a_texCoords attribute (primary)\n        GLint mNormalAttribute = -1;    // Location of a_normal attribute\n\n        // Cached uniform locations for custom params (filled in PlatformBuild, used in PlatformApplyParams)\n        mutable Vector<GLint> mParamUniformLocations;\n\n        // Cached locations for additional texture samplers\n        Vector<SamplerLocation> mSamplerLocations;\n    };\n}\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/MaterialImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WINDOWS\n\n#include \"o2/Render/Material.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    bool Material::PlatformBuild()\n    {\n        GLuint program = glCreateProgram();\n        if (program)\n        {\n            glAttachShader(program, mVertexShader->mHandle);\n            glAttachShader(program, mFragmentShader->mHandle);\n\n            GLint linkStatus;\n            glLinkProgram(program);\n            glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);\n\n            if (!linkStatus)\n            {\n                GLint infoLen = 0;\n                glGetProgramiv(program, GL_INFO_LOG_LENGTH, &infoLen);\n\n                if (infoLen > 0)\n                {\n                    char* infoLog = (char*)malloc(sizeof(char) * infoLen);\n                    glGetProgramInfoLog(program, infoLen, NULL, infoLog);\n                    o2Debug.LogError((String)\"Error linking material shader program:\\n\" + infoLog);\n                    free(infoLog);\n                }\n\n                glDeleteProgram(program);\n                return false;\n            }\n        }\n        else\n        {\n            return false;\n        }\n\n        mProgram = program;\n        mTransformUniform = glGetUniformLocation(program, \"u_transformMatrix\");\n        mTextureUniform = glGetUniformLocation(program, \"u_texture\");\n        mPositionAttribute = glGetAttribLocation(program, \"a_position\");\n        mColorAttribute = glGetAttribLocation(program, \"a_color\");\n        mTexCoordsAttribute = glGetAttribLocation(program, \"a_texCoords\");\n        mNormalAttribute = glGetAttribLocation(program, \"a_normal\");\n\n        mParamUniformLocations.Resize(mParams.Count());\n        for (int i = 0; i < mParams.Count(); i++)\n            mParamUniformLocations[i] = glGetUniformLocation(program, mParams[i]->GetName().Data());\n\n        mSamplerLocations.Resize(mSamplers.Count());\n        for (int i = 0; i < mSamplers.Count(); i++)\n        {\n            mSamplerLocations[i].samplerUniform = glGetUniformLocation(program, mSamplers[i].samplerUniformName.Data());\n            mSamplerLocations[i].texCoordsAttribute = glGetAttribLocation(program, mSamplers[i].texCoordsAttrName.Data());\n        }\n\n        return true;\n    }\n\n    void Material::PlatformDestroy()\n    {\n        if (mProgram)\n        {\n            glDeleteProgram(mProgram);\n            mProgram = 0;\n        }\n\n        mParamUniformLocations.Clear();\n        mSamplerLocations.Clear();\n        mReady = false;\n    }\n\n    void Material::PlatformApplyParams() const\n    {\n        if (mParamUniformLocations.Count() != mParams.Count())\n        {\n            mParamUniformLocations.Resize(mParams.Count());\n            for (int i = 0; i < mParams.Count(); i++)\n            {\n                if (mParams[i])\n                    mParamUniformLocations[i] = glGetUniformLocation(mProgram, mParams[i]->GetName().Data());\n            }\n        }\n\n        for (int i = 0; i < mParams.Count(); i++)\n        {\n            GLint loc = mParamUniformLocations[i];\n            if (loc < 0)\n                continue;\n\n            const auto& param = mParams[i];\n            if (auto* fp = dynamic_cast<ShaderParamFloat*>(param.Get()))\n                glUniform1f(loc, fp->GetValue());\n            else if (auto* v2p = dynamic_cast<ShaderParamVec2*>(param.Get()))\n                glUniform2f(loc, v2p->GetValue().x, v2p->GetValue().y);\n            else if (auto* cp = dynamic_cast<ShaderParamColor*>(param.Get()))\n                glUniform4f(loc, cp->GetValue().RF(), cp->GetValue().GF(), cp->GetValue().BF(), cp->GetValue().AF());\n            else if (auto* ip = dynamic_cast<ShaderParamInt*>(param.Get()))\n                glUniform1i(loc, ip->GetValue());\n        }\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/OpenGL.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WINDOWS\n\n#include \"OpenGL.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\n// Returns address of function\nPROC GetSafeWGLProcAddress(const char* id, o2::LogStream* log)\n{\n    PROC res = wglGetProcAddress(id);\n    if (!res)\n        log->Error(\"Failed to get function address: \" + (o2::String)id);\n\n    return res;\n}\n\nvoid GetGLExtensions(o2::LogStream* log /*= nullptr*/)\n{\n    glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)GetSafeWGLProcAddress(\"glGenFramebuffersEXT\", log);\n    glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)GetSafeWGLProcAddress(\"glBindFramebufferEXT\", log);\n    glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC)GetSafeWGLProcAddress(\"glFramebufferTexture\", log);\n    glDrawBuffers = (PFNGLDRAWBUFFERSPROC)GetSafeWGLProcAddress(\"glDrawBuffers\", log);\n    glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)GetSafeWGLProcAddress(\"glDeleteBuffers\", log);\n    glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSPROC)GetSafeWGLProcAddress(\"glDeleteFramebuffersEXT\", log);\n    glCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)GetSafeWGLProcAddress(\"glCheckFramebufferStatusEXT\", log);\n    glGenBuffers = (PFNGLGENBUFFERSPROC)GetSafeWGLProcAddress(\"glGenBuffers\", log);\n    glBindBuffer = (PFNGLBINDBUFFERPROC)GetSafeWGLProcAddress(\"glBindBuffer\", log);\n    glBufferData = (PFNGLBUFFERDATAPROC)GetSafeWGLProcAddress(\"glBufferData\", log);\n    glCreateShader = (PFNGLCREATESHADERPROC)GetSafeWGLProcAddress(\"glCreateShader\", log);\n    glDeleteShader = (PFNGLDELETESHADERPROC)GetSafeWGLProcAddress(\"glDeleteShader\", log);\n    glShaderSource = (PFNGLSHADERSOURCEPROC)GetSafeWGLProcAddress(\"glShaderSource\", log);\n    glCompileShader = (PFNGLCOMPILESHADERPROC)GetSafeWGLProcAddress(\"glCompileShader\", log);\n    glGetShaderiv = (PFNGLGETSHADERIVPROC)GetSafeWGLProcAddress(\"glGetShaderiv\", log);\n    glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)GetSafeWGLProcAddress(\"glGetShaderInfoLog\", log);\n    glCreateProgram = (PFNGLCREATEPROGRAMPROC)GetSafeWGLProcAddress(\"glCreateProgram\", log);\n    glAttachShader = (PFNGLATTACHSHADERPROC)GetSafeWGLProcAddress(\"glAttachShader\", log);\n    glLinkProgram = (PFNGLLINKPROGRAMPROC)GetSafeWGLProcAddress(\"glLinkProgram\", log);\n    glGetProgramiv = (PFNGLGETPROGRAMIVPROC)GetSafeWGLProcAddress(\"glGetProgramiv\", log);\n    glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)GetSafeWGLProcAddress(\"glGetProgramInfoLog\", log);\n    glUseProgram = (PFNGLUSEPROGRAMPROC)GetSafeWGLProcAddress(\"glUseProgram\", log);\n    glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)GetSafeWGLProcAddress(\"glGetUniformLocation\", log);\n    glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)GetSafeWGLProcAddress(\"glGetAttribLocation\", log);\n    glDeleteProgram = (PFNGLDELETEPROGRAMPROC)GetSafeWGLProcAddress(\"glDeleteProgram\", log);\n    glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)GetSafeWGLProcAddress(\"glVertexAttribPointer\", log);\n    glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)GetSafeWGLProcAddress(\"glEnableVertexAttribArray\", log);\n    glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)GetSafeWGLProcAddress(\"glUniformMatrix4fv\", log);\n    glActiveTexture = (PFNGLACTIVETEXTUREPROC)GetSafeWGLProcAddress(\"glActiveTexture\", log);\n    glUniform1i = (PFNGLUNIFORM1IPROC)GetSafeWGLProcAddress(\"glUniform1i\", log);\n    glUniform1f = (PFNGLUNIFORM1FPROC)GetSafeWGLProcAddress(\"glUniform1f\", log);\n    glUniform2f = (PFNGLUNIFORM2FPROC)GetSafeWGLProcAddress(\"glUniform2f\", log);\n    glUniform4f = (PFNGLUNIFORM4FPROC)GetSafeWGLProcAddress(\"glUniform4f\", log);\n    glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)GetSafeWGLProcAddress(\"glCompressedTexImage2D\", log);\n    glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)GetSafeWGLProcAddress(\"glBlendFuncSeparate\", log);\n    glBufferSubData = (PFNGLBUFFERSUBDATAPROC)GetSafeWGLProcAddress(\"glBufferSubData\", log);\n    wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)GetSafeWGLProcAddress(\"wglSwapIntervalEXT\", log);\n}\n\nbool IsGLExtensionSupported(const char *extension)\n{\n    const GLubyte *extensions = NULL;\n    const GLubyte *start;\n\n    GLubyte *where, *terminator;\n    /* Extension names should not have spaces. */\n\n    where = (GLubyte *)strchr(extension, ' ');\n\n    if (where || *extension == '\\0')\n        return 0;\n\n    extensions = glGetString(GL_EXTENSIONS);\n\n    /* It takes a bit of care to be fool-proof about parsing the\n    OpenGL extensions string. Don't be fooled by sub-strings,\n    etc. */\n\n    start = extensions;\n    for (;;)\n    {\n        where = (GLubyte *)strstr((const char *)start, extension);\n\n        if (!where)\n            break;\n\n        terminator = where + strlen(extension);\n\n        if (where == start || *(where - 1) == ' ')\n            if (*terminator == ' ' || *terminator == '\\0')\n                return true;\n\n        start = terminator;\n    }\n\n    return false;\n}\n\nconst char* GetGLErrorDesc(GLenum errorId)\n{\n    if (errorId == GL_NO_ERROR) return \"GL_NO_ERROR\";\n    if (errorId == GL_INVALID_ENUM) return \"GL_INVALID_ENUM\";\n    if (errorId == GL_INVALID_VALUE) return \"GL_INVALID_VALUE\";\n    if (errorId == GL_INVALID_OPERATION) return \"GL_INVALID_OPERATION\";\n    if (errorId == GL_INVALID_FRAMEBUFFER_OPERATION) return \"GL_INVALID_FRAMEBUFFER_OPERATION\";\n    if (errorId == GL_OUT_OF_MEMORY) return \"GL_OUT_OF_MEMORY\";\n    if (errorId == GL_STACK_UNDERFLOW) return \"GL_STACK_UNDERFLOW\";\n    if (errorId == GL_STACK_OVERFLOW) return \"GL_STACK_OVERFLOW\";\n\n    return \"UNKNOWN\";\n}\n\nvoid glCheckError(const char* filename /*= nullptr*/, unsigned int line /*= 0*/)\n{\n    GLenum errId = glGetError();\n    if (errId != GL_NO_ERROR)\n    {\n        o2Debug.LogError(\"OpenGL ERROR \" + (o2::String)errId + \": \" + (o2::String)GetGLErrorDesc(errId) +\n                         \" at file: \" + (o2::String)(filename ? filename : \"unknown\") + \" line: \" + (o2::String)line);\n    }\n}\n\nextern PFNGLGENFRAMEBUFFERSEXTPROC        glGenFramebuffersEXT = NULL;\nextern PFNGLBINDFRAMEBUFFEREXTPROC        glBindFramebufferEXT = NULL;\nextern PFNGLFRAMEBUFFERTEXTUREPROC        glFramebufferTexture = NULL;\nextern PFNGLDRAWBUFFERSPROC               glDrawBuffers = NULL;\nextern PFNGLDELETEBUFFERSPROC             glDeleteBuffers = NULL;\nextern PFNGLDELETEFRAMEBUFFERSPROC        glDeleteFramebuffersEXT = NULL;\nextern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT = NULL;\nextern PFNGLGENBUFFERSPROC                glGenBuffers = NULL;\nextern PFNGLBINDBUFFERPROC                glBindBuffer = NULL;\nextern PFNGLBUFFERDATAPROC                glBufferData = NULL;\nextern PFNGLCREATESHADERPROC              glCreateShader = NULL;\nextern PFNGLDELETESHADERPROC              glDeleteShader = NULL;\nextern PFNGLSHADERSOURCEPROC              glShaderSource = NULL;\nextern PFNGLCOMPILESHADERPROC             glCompileShader = NULL;\nextern PFNGLGETSHADERIVPROC               glGetShaderiv = NULL;\nextern PFNGLGETSHADERINFOLOGPROC          glGetShaderInfoLog = NULL;\nextern PFNGLCREATEPROGRAMPROC             glCreateProgram = NULL;\nextern PFNGLATTACHSHADERPROC              glAttachShader = NULL;\nextern PFNGLLINKPROGRAMPROC               glLinkProgram = NULL;\nextern PFNGLGETPROGRAMIVPROC              glGetProgramiv = NULL;\nextern PFNGLGETPROGRAMINFOLOGPROC         glGetProgramInfoLog = NULL;\nextern PFNGLUSEPROGRAMPROC                glUseProgram = NULL;\nextern PFNGLGETUNIFORMLOCATIONPROC        glGetUniformLocation = NULL;\nextern PFNGLGETATTRIBLOCATIONPROC         glGetAttribLocation = NULL;\nextern PFNGLDELETEPROGRAMPROC             glDeleteProgram = NULL;\nextern PFNGLVERTEXATTRIBPOINTERPROC       glVertexAttribPointer = NULL;\nextern PFNGLENABLEVERTEXATTRIBARRAYPROC   glEnableVertexAttribArray = NULL;\nextern PFNGLUNIFORMMATRIX4FVPROC          glUniformMatrix4fv = NULL;\nextern PFNGLACTIVETEXTUREPROC             glActiveTexture = NULL;\nextern PFNGLUNIFORM1IPROC                 glUniform1i = NULL;\nextern PFNGLUNIFORM1FPROC                 glUniform1f = NULL;\nextern PFNGLUNIFORM2FPROC                 glUniform2f = NULL;\nextern PFNGLUNIFORM4FPROC                 glUniform4f = NULL;\nextern PFNGLCOMPRESSEDTEXIMAGE2DPROC      glCompressedTexImage2D = NULL;\nextern PFNGLBLENDFUNCSEPARATEPROC         glBlendFuncSeparate = NULL;\nextern PFNGLBUFFERSUBDATAPROC             glBufferSubData = NULL;\nextern PFNWGLSWAPINTERVALEXTPROC          wglSwapIntervalEXT = NULL;\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/OpenGL.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WINDOWS\n\n#include <windows.h>    \n#include <GL/gl.h>\n#include <GL/glu.h>\n#include \"3rdPartyLibs/OpenGL/glext.h\"\n#include \"3rdPartyLibs/OpenGL/wglext.h\"\n\n\nnamespace o2\n{\n    class LogStream;\n}\n\n// Getting openGL extensions\nvoid GetGLExtensions(o2::LogStream* log = nullptr);\n\n// Returns opengl error description by id\nconst char* GetGLErrorDesc(GLenum errorId);\n\n// Checks OpenGL extension supporting\nbool IsGLExtensionSupported(const char *extension);\n\n// Checks OpenGL error\nvoid glCheckError(const char* filename = nullptr, unsigned int line = 0);\n\n#if RENDER_DEBUG\n#    define GL_CHECK_ERROR() glCheckError(__FILE__, __LINE__);\n#else\n#    define GL_CHECK_ERROR()\n#endif\n\nextern PFNGLGENFRAMEBUFFERSEXTPROC        glGenFramebuffersEXT;\nextern PFNGLBINDFRAMEBUFFEREXTPROC        glBindFramebufferEXT;\nextern PFNGLFRAMEBUFFERTEXTUREPROC        glFramebufferTexture;\nextern PFNGLDRAWBUFFERSPROC               glDrawBuffers;\nextern PFNGLDELETEBUFFERSPROC             glDeleteBuffers;\nextern PFNGLDELETEFRAMEBUFFERSPROC        glDeleteFramebuffersEXT;\nextern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;\nextern PFNGLGENBUFFERSPROC                glGenBuffers;\nextern PFNGLBINDBUFFERPROC                   glBindBuffer;\nextern PFNGLBUFFERDATAPROC                glBufferData;\nextern PFNGLCREATESHADERPROC              glCreateShader;\nextern PFNGLDELETESHADERPROC              glDeleteShader;\nextern PFNGLSHADERSOURCEPROC              glShaderSource;\nextern PFNGLCOMPILESHADERPROC             glCompileShader;\nextern PFNGLGETSHADERIVPROC               glGetShaderiv;\nextern PFNGLGETSHADERINFOLOGPROC          glGetShaderInfoLog;\nextern PFNGLCREATEPROGRAMPROC             glCreateProgram;\nextern PFNGLATTACHSHADERPROC              glAttachShader;\nextern PFNGLLINKPROGRAMPROC               glLinkProgram;\nextern PFNGLGETPROGRAMIVPROC              glGetProgramiv;\nextern PFNGLGETPROGRAMINFOLOGPROC         glGetProgramInfoLog;\nextern PFNGLUSEPROGRAMPROC                glUseProgram;\nextern PFNGLGETUNIFORMLOCATIONPROC        glGetUniformLocation;\nextern PFNGLGETATTRIBLOCATIONPROC         glGetAttribLocation;\nextern PFNGLDELETEPROGRAMPROC             glDeleteProgram;\nextern PFNGLVERTEXATTRIBPOINTERPROC       glVertexAttribPointer;\nextern PFNGLENABLEVERTEXATTRIBARRAYPROC   glEnableVertexAttribArray;\nextern PFNGLUNIFORMMATRIX4FVPROC          glUniformMatrix4fv;\nextern PFNGLACTIVETEXTUREPROC             glActiveTexture;\nextern PFNGLUNIFORM1IPROC                 glUniform1i;\nextern PFNGLUNIFORM1FPROC                 glUniform1f;\nextern PFNGLUNIFORM2FPROC                 glUniform2f;\nextern PFNGLUNIFORM4FPROC                 glUniform4f;\nextern PFNGLCOMPRESSEDTEXIMAGE2DPROC      glCompressedTexImage2D;\nextern PFNGLBLENDFUNCSEPARATEPROC         glBlendFuncSeparate;\nextern PFNGLBUFFERSUBDATAPROC             glBufferSubData;\nextern PFNWGLSWAPINTERVALEXTPROC          wglSwapIntervalEXT;\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/RenderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WINDOWS\n\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Render/Windows/OpenGL.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\n\nnamespace o2\n{\n    class Texture;\n\n    class RenderBase\n    {\n    protected:\n        HGLRC mGLContext; // OpenGL context\n        HDC   mHDC;       // Windows frame device context\n\n        GLuint mActiveProgram;           // Currently active shader program\n        GLint  mActiveMvpUniform;        // Currently active transform uniform location\n        GLint  mActiveTextureSample;     // Currently active texture sampler uniform location\n        GLint  mActivePosAttribute;      // Currently active position attribute location\n        GLint  mActiveColorAttribute;    // Currently active color attribute location\n        GLint  mActiveUVAttribute;       // Currently active texcoords attribute location\n        GLint  mActiveNormalAttribute = -1; // Currently active normal attribute location\n\n        float  mCurrentMvp[16];          // Cached MVP matrix for material rebinding\n\n        const static int mBuffersPoolsSize = 3;       // Count of buffers in pools\n        GLuint mVertexBuffersPool[mBuffersPoolsSize]; // GPU vertex buffer objects\n        GLuint mIndexBuffersPool[mBuffersPoolsSize];  // GPU index buffer objects\n        int    mCurrentBufferIdx = 0;                 // Current buffer pool index\n\n    protected:\n    };\n};\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/RenderImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WINDOWS\n#include \"o2/Render/Render.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/Font.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/Math/Geometry.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n\nnamespace o2\n{\n    namespace\n    {\n        typedef HGLRC(WINAPI* PFN_wglCreateContextAttribsARB)(HDC hDC, HGLRC hShareContext, const int* piAttribList);\n\n        bool CreateGLContextWithAttribs(HDC hdc, HGLRC& outContext, o2::LogStream* log)\n        {\n            static PIXELFORMATDESCRIPTOR pfd = {\n                sizeof(PIXELFORMATDESCRIPTOR), 1,\n                PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER,\n                PFD_TYPE_RGBA, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                24, 8, 0, PFD_MAIN_PLANE, 0, 0, 0, 0\n            };\n\n            int pixelFormat = ChoosePixelFormat(hdc, &pfd);\n            if (!pixelFormat || !SetPixelFormat(hdc, pixelFormat, &pfd))\n            {\n                if (log) log->Error(\"Can't Set The PixelFormat.\");\n                return false;\n            }\n\n            HGLRC tempCtx = wglCreateContext(hdc);\n            if (!tempCtx || !wglMakeCurrent(hdc, tempCtx))\n            {\n                if (tempCtx) wglDeleteContext(tempCtx);\n                if (log) log->Error(\"Can't create temporary GL context.\");\n                return false;\n            }\n\n            auto wglCreateContextAttribsARB = (PFN_wglCreateContextAttribsARB)wglGetProcAddress(\"wglCreateContextAttribsARB\");\n            if (!wglCreateContextAttribsARB)\n            {\n                wglMakeCurrent(NULL, NULL);\n                wglDeleteContext(tempCtx);\n                if (log) log->Out(\"WGL_ARB_create_context not available.\");\n                return false;\n            }\n\n            wglMakeCurrent(NULL, NULL);\n            wglDeleteContext(tempCtx);\n\n            struct VersionRequest { int major; int minor; int profileMask; };\n            VersionRequest versions[] = {\n                { 3, 3, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB },\n                { 3, 2, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB },\n                { 3, 0, 0 },\n                { 2, 1, 0 },\n                { 0, 0, 0 }\n            };\n\n            for (int i = 0; versions[i].major != 0; i++)\n            {\n                int attribs[16];\n                int n = 0;\n                if (versions[i].major > 0)\n                {\n                    attribs[n++] = WGL_CONTEXT_MAJOR_VERSION_ARB;\n                    attribs[n++] = versions[i].major;\n                    attribs[n++] = WGL_CONTEXT_MINOR_VERSION_ARB;\n                    attribs[n++] = versions[i].minor;\n                }\n                if (versions[i].profileMask != 0)\n                {\n                    attribs[n++] = WGL_CONTEXT_PROFILE_MASK_ARB;\n                    attribs[n++] = versions[i].profileMask;\n                }\n                attribs[n] = 0;\n\n                outContext = wglCreateContextAttribsARB(hdc, NULL, attribs);\n                if (outContext)\n                {\n                    if (log) log->Out(\"Created OpenGL \" + o2::String(versions[i].major) + \".\" + o2::String(versions[i].minor) + \" via wglCreateContextAttribsARB\");\n                    return true;\n                }\n                SetLastError(0);\n            }\n\n            if (log) log->Error(\"wglCreateContextAttribsARB failed for all versions.\");\n            return false;\n        }\n    }\n\n    void Render::InitializePlatform()\n    {\n        mLog->Out(\"Initializing OpenGL render..\");\n\n        if constexpr (IS_PLATFORM_INITIALIZATION_ENABLED)\n        {\n            mHDC = GetDC(o2Application.mHWnd);\n            if (!mHDC)\n            {\n                mLog->Error(\"Can't Create A GL Device Context.\\n\");\n                return;\n            }\n\n            if (!CreateGLContextWithAttribs(mHDC, mGLContext, mLog.Get()))\n            {\n                int pf = GetPixelFormat(mHDC);\n                if (!pf)\n                {\n                    static PIXELFORMATDESCRIPTOR pfd = {\n                        sizeof(PIXELFORMATDESCRIPTOR), 1,\n                        PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER,\n                        PFD_TYPE_RGBA, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                        24, 8, 0, PFD_MAIN_PLANE, 0, 0, 0, 0\n                    };\n                    pf = ChoosePixelFormat(mHDC, &pfd);\n                    if (!pf || !SetPixelFormat(mHDC, pf, &pfd))\n                    {\n                        mLog->Error(\"Can't Set The PixelFormat.\\n\");\n                        return;\n                    }\n                }\n                mGLContext = wglCreateContext(mHDC);\n                if (!mGLContext)\n                {\n                    mLog->Error(\"Can't Create A GL Rendering Context.\\n\");\n                    return;\n                }\n                mLog->Out(\"Using legacy wglCreateContext.\");\n            }\n\n            if (!wglMakeCurrent(mHDC, mGLContext))\n            {\n                mLog->Error(\"Can't Activate The GL Rendering Context.\\n\");\n                return;\n            }\n        }\n\n        GetGLExtensions(mLog.Get());\n\n        GL_CHECK_ERROR();\n\n        mVertexBufferSize = USHRT_MAX;\n        mIndexBufferSize = USHRT_MAX;\n        mCurrentBatchVertexType = Vertex::Type();\n        mVertexBufferByteSize = mVertexBufferSize * sizeof(Vertex);\n\n        mVertexData = mnew UInt8[mVertexBufferByteSize];\n        mVertexIndexData = mnew VertexIndex[mIndexBufferSize * sizeof(VertexIndex)];\n\n        for (int i = 0; i < mBuffersPoolsSize; i++)\n        {\n            glGenBuffers(1, &mVertexBuffersPool[i]);\n            glBindBuffer(GL_ARRAY_BUFFER, mVertexBuffersPool[i]);\n            glBufferData(GL_ARRAY_BUFFER, mVertexBufferByteSize, mVertexData, GL_DYNAMIC_DRAW);\n\n            glGenBuffers(1, &mIndexBuffersPool[i]);\n            glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffersPool[i]);\n            glBufferData(GL_ELEMENT_ARRAY_BUFFER, (GLsizeiptr)(mIndexBufferSize * sizeof(VertexIndex)), mVertexIndexData, GL_DYNAMIC_DRAW);\n        }\n\n        glEnable(GL_BLEND);\n        glDisable(GL_DEPTH_TEST);\n        glDisable(GL_CULL_FACE);\n        glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n        glLineWidth(1.0f);\n        \n        wglSwapIntervalEXT(0);\n\n        mLog->Out(\"GL_VENDOR: \" + (String)(char*)glGetString(GL_VENDOR));\n        mLog->Out(\"GL_RENDERER: \" + (String)(char*)glGetString(GL_RENDERER));\n        mLog->Out(\"GL_VERSION: \" + (String)(char*)glGetString(GL_VERSION));\n    }\n\n    void Render::DeinitializePlatform()\n    {\n        if (mGLContext)\n        {\n            if (!wglMakeCurrent(NULL, NULL))\n                mLog->Error(\"Release of DC And RC Failed.\\n\");\n\n            if (!wglDeleteContext(mGLContext))\n                mLog->Error(\"Release Rendering Context Failed.\\n\");\n\n            mGLContext = NULL;\n        }\n    }\n\n    void Render::InitializeSandardShader()\n    {\n    }\n\n    void Render::PlatformInitializeDefaultMaterial()\n    {\n        String basePath = GetBuiltinAssetsPath();\n        String vSource = FileSystem::ReadFile(basePath + \"Shaders/Default.vsh\");\n        String fSource = FileSystem::ReadFile(basePath + \"Shaders/Default.fsh\");\n\n        if (vSource.IsEmpty() || fSource.IsEmpty())\n        {\n            o2Debug.LogError(\"Failed to load default shader files (FrameworkData/Shaders/Default.vsh, FrameworkData/Shaders/Default.fsh). \\n\"\n                             \"Ensure they are in BuiltAssets.\");\n            return;\n        }\n\n        Ref<Shader> vShader = mmake<Shader>();\n        Ref<Shader> fShader = mmake<Shader>();\n        vShader->Compile(vSource, Shader::Type::Vertex);\n        fShader->Compile(fSource, Shader::Type::Fragment);\n\n        if (!vShader->IsReady() || !fShader->IsReady())\n        {\n            o2Debug.LogError(\"Failed to compile default shaders (FrameworkData/Shaders/Default.vsh, FrameworkData/Shaders/Default.fsh).\");\n            return;\n        }\n\n        mDefaultMaterial = mmake<Material>();\n        mDefaultMaterial->SetVertexShader(vShader);\n        mDefaultMaterial->SetFragmentShader(fShader);\n        mDefaultMaterial->SetBlendMode(BlendMode::Normal);\n        if (!mDefaultMaterial->Build())\n        {\n            o2Debug.LogError(\"Failed to build default material from Shaders/Default.\");\n            mDefaultMaterial = nullptr;\n            return;\n        }\n    }\n\n    void Render::PlatformBindNextPoolBuffers()\n    {\n        mCurrentBufferIdx++;\n        if (mCurrentBufferIdx == mBuffersPoolsSize)\n            mCurrentBufferIdx = 0;\n\n        glBindBuffer(GL_ARRAY_BUFFER, mVertexBuffersPool[mCurrentBufferIdx]);\n        glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffersPool[mCurrentBufferIdx]);\n        GL_CHECK_ERROR();\n\n        size_t stride = mCurrentBatchVertexType.GetStride();\n        if (stride == 0) stride = sizeof(Vertex);\n\n        glVertexAttribPointer((GLuint)mActivePosAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Position));\n        glEnableVertexAttribArray((GLuint)mActivePosAttribute);\n        GL_CHECK_ERROR();\n\n        glVertexAttribPointer((GLuint)mActiveColorAttribute, 4, GL_UNSIGNED_BYTE, GL_TRUE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Color));\n        glEnableVertexAttribArray((GLuint)mActiveColorAttribute);\n        GL_CHECK_ERROR();\n\n        glVertexAttribPointer((GLuint)mActiveUVAttribute, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0));\n        glEnableVertexAttribArray((GLuint)mActiveUVAttribute);\n        GL_CHECK_ERROR();\n\n        if (mActiveNormalAttribute >= 0 && mCurrentBatchVertexType.HasParam(VertexParam::Normal))\n        {\n            glVertexAttribPointer((GLuint)mActiveNormalAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Normal));\n            glEnableVertexAttribArray((GLuint)mActiveNormalAttribute);\n            GL_CHECK_ERROR();\n        }\n\n        mVertexBufferIdx = 0;\n        mIndexBufferIdx = 0;\n    }\n\n    void Render::PlatformBegin()\n    {\n        PlatformBindNextPoolBuffers();\n    }\n\n    void Render::PlatformDrawPrimitives()\n    {\n        static const GLenum primitiveType[3]{ GL_TRIANGLES, GL_TRIANGLES, GL_LINES };\n\n        size_t stride = mCurrentBatchVertexType.GetStride();\n\n        glBufferSubData(GL_ARRAY_BUFFER, mVertexBufferIdx * stride, mLastDrawVertex * stride, mVertexData);\n        glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, mIndexBufferIdx * sizeof(VertexIndex), mLastDrawIdx * sizeof(VertexIndex), mVertexIndexData);\n        GL_CHECK_ERROR();\n\n        glActiveTexture(GL_TEXTURE0);\n        glBindTexture(GL_TEXTURE_2D, mCurrentDrawTexture ? mCurrentDrawTexture->mHandle : mWhiteTexture->mHandle);\n        glUniform1i(mActiveTextureSample, 0);\n        GL_CHECK_ERROR();\n\n        glDrawElements(primitiveType[(int)mCurrentPrimitiveType], mLastDrawIdx, GL_UNSIGNED_INT, (void*)(mIndexBufferIdx * sizeof(VertexIndex)));\n        GL_CHECK_ERROR();\n\n        mVertexBufferIdx += mLastDrawVertex;\n        mIndexBufferIdx += mLastDrawIdx;\n    }\n\n    void Render::PlatformEnd()\n    {\n        if constexpr (IS_PLATFORM_INITIALIZATION_ENABLED)\n            SwapBuffers(mHDC);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformResetState()\n    {\n        glEnable(GL_BLEND);\n        glDisable(GL_DEPTH_TEST);\n        glDisable(GL_CULL_FACE);\n        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n        glDisable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n\n\t\tBindMaterial(mDefaultMaterial);\n        PlatformBindNextPoolBuffers();\n\n        glActiveTexture(GL_TEXTURE0);\n        glBindTexture(GL_TEXTURE_2D, 0);\n        GL_CHECK_ERROR();\n\n        glUniform1i(mActiveTextureSample, 0);\n        GL_CHECK_ERROR();\n\n        size_t stride = mCurrentBatchVertexType.GetStride();\n        if (stride == 0) stride = sizeof(Vertex);\n\n        glVertexAttribPointer((GLuint)mActivePosAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Position));\n        glEnableVertexAttribArray((GLuint)mActivePosAttribute);\n        GL_CHECK_ERROR();\n\n        glVertexAttribPointer((GLuint)mActiveColorAttribute, 4, GL_UNSIGNED_BYTE, GL_TRUE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Color));\n        glEnableVertexAttribArray((GLuint)mActiveColorAttribute);\n        GL_CHECK_ERROR();\n\n        glVertexAttribPointer((GLuint)mActiveUVAttribute, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                              (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0));\n        glEnableVertexAttribArray((GLuint)mActiveUVAttribute);\n        GL_CHECK_ERROR();\n\n        if (mActiveNormalAttribute >= 0 && mCurrentBatchVertexType.HasParam(VertexParam::Normal))\n        {\n            glVertexAttribPointer((GLuint)mActiveNormalAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Normal));\n            glEnableVertexAttribArray((GLuint)mActiveNormalAttribute);\n            GL_CHECK_ERROR();\n        }\n    }\n\n    VertexType Render::PlatformResolveBatchVertexType(const VertexType& sourceVertexType, const Ref<Material>& material) const\n    {\n        return ResolveBatchVertexTypeByMaterial(sourceVertexType, material);\n    }\n\n    void Render::Clear(const Color4& color /*= Color4::Blur()*/)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        glClearColor(color.RF(), color.GF(), color.BF(), color.AF());\n        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformSetupCameraTransforms(float* modelMatrix, float* viewMatrix, float* projMatrix)\n    {\n        float finalCamMtx[16];\n        Math::mtxMultiply(finalCamMtx, modelMatrix, viewMatrix);\n        Math::mtxMultiply(mCurrentMvp, projMatrix, finalCamMtx);\n        \n        glViewport(0, 0, mCurrentResolution.x, mCurrentResolution.y);\n        glUniformMatrix4fv(mActiveMvpUniform, 1, GL_FALSE, mCurrentMvp);\n\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformFlipVerticesUV()\n    {\n        size_t stride = mCurrentBatchVertexType.GetStride();\n        size_t tvOffset = mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0) + sizeof(float);\n\n        for (UInt i = 0; i < mLastDrawVertex; i++)\n        {\n            float& tv = *reinterpret_cast<float*>(&mVertexData[i * stride + tvOffset]);\n            tv = 1.0f - tv;\n        }\n    }\n\n    void Render::PlatformEnableScissorTest()\n    {\n        glEnable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformDisableScissorTest()\n    {\n        glDisable(GL_SCISSOR_TEST);\n        GL_CHECK_ERROR();\n    }\n\n    void Render::PlatformSetScissorRect(const RectI& rect)\n    {\n        glScissor((int)(rect.left + mCurrentResolution.x * 0.5f), (int)(rect.bottom + mCurrentResolution.y * 0.5f),\n                  (int)rect.Width(), (int)rect.Height());\n    }\n\n    void Render::PlatformBindRenderTarget(const TextureRef& renderTarget)\n    {\n        if (renderTarget)\n            glBindFramebufferEXT(GL_FRAMEBUFFER, renderTarget->mFrameBuffer);\n        else\n            glBindFramebufferEXT(GL_FRAMEBUFFER, 0);\n\n        GL_CHECK_ERROR();\n    }\n    \n    Vec2I Render::GetPlatformMaxTextureSize()\n    {\n        int size = 0;\n        glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);\n        return Vec2I(size, size);\n    }\n\n    Vec2I Render::GetPlatformDPI()\n    {\n        Vec2I dpi;\n        HDC dc = GetDC(0);\n        dpi.x = GetDeviceCaps(dc, LOGPIXELSX);\n        dpi.y = GetDeviceCaps(dc, LOGPIXELSY);\n        ReleaseDC(0, dc);\n\n        return dpi;\n    }\n\n    void Render::PlatformBindMaterial(const Ref<Material>& material)\n    {\n        if (material->mProgram != mActiveProgram)\n        {\n            mActiveProgram = material->mProgram;\n            mActiveMvpUniform = material->mTransformUniform;\n            mActiveTextureSample = material->mTextureUniform;\n            mActivePosAttribute = material->mPositionAttribute;\n            mActiveColorAttribute = material->mColorAttribute;\n            mActiveUVAttribute = material->mTexCoordsAttribute;\n            mActiveNormalAttribute = material->mNormalAttribute;\n\n            glUseProgram(mActiveProgram);\n            GL_CHECK_ERROR();\n\n            size_t stride = mCurrentBatchVertexType.GetStride();\n            if (stride == 0)\n                stride = sizeof(Vertex);\n\n            glVertexAttribPointer((GLuint)mActivePosAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Position));\n            glEnableVertexAttribArray((GLuint)mActivePosAttribute);\n\n            glVertexAttribPointer((GLuint)mActiveColorAttribute, 4, GL_UNSIGNED_BYTE, GL_TRUE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Color));\n            glEnableVertexAttribArray((GLuint)mActiveColorAttribute);\n\n            glVertexAttribPointer((GLuint)mActiveUVAttribute, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                  (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::TexCoord0));\n            glEnableVertexAttribArray((GLuint)mActiveUVAttribute);\n\n            if (mActiveNormalAttribute >= 0 && mCurrentBatchVertexType.HasParam(VertexParam::Normal))\n            {\n                glVertexAttribPointer((GLuint)mActiveNormalAttribute, 3, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                      (void*)mCurrentBatchVertexType.GetParamOffset(VertexParam::Normal));\n                glEnableVertexAttribArray((GLuint)mActiveNormalAttribute);\n            }\n\n            // Bind additional texcoord attributes for extra samplers\n            const UInt texCoordParams[] = { VertexParam::TexCoord1, VertexParam::TexCoord2 };\n            for (int i = 0; i < material->mSamplerLocations.Count(); i++)\n            {\n                GLint attrLoc = material->mSamplerLocations[i].texCoordsAttribute;\n                if (attrLoc >= 0 && i < 2 && mCurrentBatchVertexType.HasParam(texCoordParams[i]))\n                {\n                    glVertexAttribPointer((GLuint)attrLoc, 2, GL_FLOAT, GL_FALSE, (GLsizei)stride,\n                                          (void*)mCurrentBatchVertexType.GetParamOffset(texCoordParams[i]));\n                    glEnableVertexAttribArray((GLuint)attrLoc);\n                }\n            }\n\n            GL_CHECK_ERROR();\n\n            glUniformMatrix4fv(mActiveMvpUniform, 1, GL_FALSE, mCurrentMvp);\n            GL_CHECK_ERROR();\n        }\n\n        material->ApplyParams();\n\n        // Bind additional texture samplers\n        for (int i = 0; i < material->mSamplerLocations.Count() && i < material->mSamplers.Count(); i++)\n        {\n            const auto& loc = material->mSamplerLocations[i];\n            TextureRef tex = material->mSamplers[i].GetTexture();\n            if (!tex)\n                continue;\n\n            GLint texUnit = i + 1;\n            glActiveTexture(GL_TEXTURE0 + texUnit);\n            glBindTexture(GL_TEXTURE_2D, tex->mHandle);\n\n            if (loc.samplerUniform >= 0)\n                glUniform1i(loc.samplerUniform, texUnit);\n        }\n        glActiveTexture(GL_TEXTURE0);\n\n        if (material->GetBlendMode() == BlendMode::Add)\n            glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n        else\n            glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/ShaderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WINDOWS\n\n#include \"o2/Render/Windows/OpenGL.h\"\n\nnamespace o2\n{\n    // ----------------------------------------------------------\n    // Platform-specific (Windows/OpenGL) shader data and handles\n    // ----------------------------------------------------------\n    class ShaderBase\n    {\n        friend class Render;\n        friend class Material;\n\n    protected:\n        GLuint mHandle = 0; // OpenGL shader object handle\n    };\n}\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/ShaderImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WINDOWS\n\n#include \"o2/Render/Shader.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    bool Shader::PlatformCompile(const String& source, Type type)\n    {\n        GLenum glType = (type == Type::Vertex) ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER;\n        GLuint shader = glCreateShader(glType);\n\n        if (shader)\n        {\n            const char* src = source.Data();\n            glShaderSource(shader, 1, &src, NULL);\n            glCompileShader(shader);\n\n            GLint compiled = 0;\n            glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);\n\n            if (!compiled)\n            {\n                GLint infoLen = 0;\n                glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);\n\n                if (infoLen > 0)\n                {\n                    char* infoLog = (char*)malloc(sizeof(char) * infoLen);\n                    glGetShaderInfoLog(shader, infoLen, NULL, infoLog);\n                    o2Debug.LogError((String)\"Error compiling shader \" + mFileName + \":\\n\" + infoLog);\n                    free(infoLog);\n                }\n\n                glDeleteShader(shader);\n                shader = 0;\n            }\n        }\n\n        mHandle = shader;\n        return shader != 0;\n    }\n\n    void Shader::PlatformDestroy()\n    {\n        if (mHandle)\n        {\n            glDeleteShader(mHandle);\n            mHandle = 0;\n        }\n\n        mReady = false;\n    }\n}\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/TextureBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_WINDOWS\n\n#include \"o2/Render/Windows/OpenGL.h\"\n\nnamespace o2\n{\n    class TextureBase\n    {\n        friend class Render;\n        friend class VectorFont;\n\n    protected:\n        GLuint mHandle;      // Texture handle\n        GLuint mFrameBuffer; // Frame buffer for rendering into texture\n    };\n}\n\n#endif // PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/Windows/TextureImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_WINDOWS\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    Map<TextureFormat, GLint> formatMap =\n    {\n        { TextureFormat::R8G8B8A8, GL_RGBA },\n        { TextureFormat::DXT5, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT }\n    };\n\n    bool Texture::PlatformCreate()\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n\n        glGenTextures(1, &mHandle);\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        GL_CHECK_ERROR();\n\n        GLint texFormat = formatMap[format];\n        glTexImage2D(GL_TEXTURE_2D, 0, texFormat, (GLsizei)mSize.x, (GLsizei)mSize.y, 0, texFormat, GL_UNSIGNED_BYTE, NULL);\n        GL_CHECK_ERROR();\n\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n        GL_CHECK_ERROR();\n\n        if (mUsage == Usage::RenderTarget)\n        {\n            glGenFramebuffersEXT(1, &mFrameBuffer);\n            glBindFramebufferEXT(GL_FRAMEBUFFER, mFrameBuffer);\n\n            glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, mHandle, 0);\n\n            GLenum DrawBuffers[2] = { GL_COLOR_ATTACHMENT0 };\n            glDrawBuffers(1, DrawBuffers);\n\n            if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)\n            {\n                GLenum glError = glGetError();\n\n                o2Render.mLog->Error(\"Failed to create GL frame buffer object! GL Error %i %cs\", glError,\n                                     GetGLErrorDesc(glError));\n\n                glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n\n                return false;\n            }\n\n            glBindFramebufferEXT(GL_FRAMEBUFFER, 0);\n            GL_CHECK_ERROR();\n        }\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n\n        return true;\n    }\n\n    void Texture::PlatformDestroy()\n    {\n        if (mUsage == Usage::RenderTarget)\n            glDeleteFramebuffersEXT(1, &mFrameBuffer);\n\n        glDeleteTextures(1, &mHandle);\n    }\n\n    void Texture::PlatformUploadData(const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n\n        GLint texFormat = formatMap[format];\n\n        if (format == TextureFormat::DXT5)\n        {\n            int blockSize = 16;\n            int offset = 0;\n            int dataSize = ((size.x + 3) / 4) * ((size.y + 3) / 4) * blockSize;\n\n            glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, size.x, size.y, 0, dataSize, data);\n        }\n        else\n        {\n            glTexImage2D(GL_TEXTURE_2D, 0, texFormat, (GLsizei)size.x, (GLsizei)size.y, 0, texFormat, GL_UNSIGNED_BYTE, data);\n        }\n\n        GL_CHECK_ERROR();\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformUploadRegionData(const Vec2I& offset, const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n\n        GLint texFormat = formatMap[format];\n\n        glTexSubImage2D(GL_TEXTURE_2D, 0, offset.x, offset.y, size.x, size.y, texFormat, GL_UNSIGNED_BYTE,\n                        data);\n\n        GL_CHECK_ERROR();\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::Copy(const Texture& from, const RectI& rect)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, from.mHandle);\n\n        GLint texFormat = formatMap[format];\n\n        glCopyTexImage2D(GL_TEXTURE_2D, 0, texFormat, rect.left, rect.top, rect.Width(), rect.Height(), 0);\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformGetData(Byte* data)\n    {\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n    }\n\n    void Texture::PlatformSetFilter()\n    {\n        GLint type = GL_LINEAR;\n        if (mFilter == Filter::Nearest)\n            type = GL_NEAREST;\n\n        auto prevTextureHandle = o2Render.mCurrentDrawTexture ? o2Render.mCurrentDrawTexture->mHandle : 0;\n        o2Render.DrawPrimitives();\n\n        glBindTexture(GL_TEXTURE_2D, mHandle);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, type);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, type);\n\n        glBindTexture(GL_TEXTURE_2D, prevTextureHandle);\n\n        GL_CHECK_ERROR();\n    }\n}\n\n#endif //PLATFORM_WINDOWS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/CMakeLists.txt",
    "content": "set(PET_STORY_SHADERS_SOURCES\n        Shaders.metal\n)\n\nadd_metal_shader_library(PetStoryShaders\n        STANDARD ios-metal2.1\n        ${PET_STORY_SHADERS_SOURCES}\n)\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/MaterialBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_IOS\n\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    struct MTLMaterialImpl;\n\n    struct SamplerLocation\n    {\n        int  textureIndex = -1;\n        UInt texCoordParam = VertexParam::TexCoord0;\n    };\n\n    class MaterialBase\n    {\n        friend class Render;\n\n    protected:\n        MTLMaterialImpl* mImpl = nullptr;\n\n        UInt mProgram = 0;\n\n        int mTransformUniform = -1;\n        int mTextureUniform = -1;\n        int mPositionAttribute = -1;\n        int mColorAttribute = -1;\n        int mTexCoordsAttribute = -1;\n        int mNormalAttribute = -1;\n\n        mutable Vector<int> mParamUniformLocations;\n        Vector<SamplerLocation> mSamplerLocations;\n    };\n}\n\n#endif // PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/MaterialImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_IOS\n\n#import <Foundation/Foundation.h>\n\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/iOS/MetalWrappers.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\n#include <algorithm>\n\nnamespace o2\n{\n    namespace\n    {\n        static UInt gNextMaterialProgramId = 1;\n\n        std::string ToStdString(const String& value)\n        {\n            return std::string(value.Data(), value.Length());\n        }\n\n        String ToString(NSString* value)\n        {\n            return value ? String(value.UTF8String) : String();\n        }\n\n        void SetupBlendState(MTLRenderPipelineColorAttachmentDescriptor* attachment, BlendMode blendMode)\n        {\n            attachment.blendingEnabled = YES;\n            attachment.rgbBlendOperation = MTLBlendOperationAdd;\n            attachment.alphaBlendOperation = MTLBlendOperationAdd;\n            attachment.sourceRGBBlendFactor = MTLBlendFactorSourceAlpha;\n            attachment.sourceAlphaBlendFactor = MTLBlendFactorOne;\n            attachment.destinationAlphaBlendFactor = MTLBlendFactorOneMinusSourceAlpha;\n            attachment.destinationRGBBlendFactor = blendMode == BlendMode::Add ? MTLBlendFactorOne : MTLBlendFactorOneMinusSourceAlpha;\n        }\n\n        UInt ResolveTexCoordParam(const String& attrName)\n        {\n            if (attrName == \"a_texCoords2\")\n                return VertexParam::TexCoord1;\n\n            if (attrName == \"a_texCoords3\")\n                return VertexParam::TexCoord2;\n\n            return VertexParam::TexCoord0;\n        }\n\n        void CollectTextureBindings(NSArray<MTLArgument*>* arguments, std::unordered_map<std::string, int>& textureBindings)\n        {\n            for (MTLArgument* argument in arguments)\n            {\n                if (argument.type != MTLArgumentTypeTexture)\n                    continue;\n\n                textureBindings[std::string(argument.name.UTF8String)] = (int)argument.index;\n            }\n        }\n\n        void CollectParamBindings(NSArray<MTLArgument*>* arguments, MTLMaterialImpl* materialImpl, bool bindToVertex)\n        {\n            for (MTLArgument* argument in arguments)\n            {\n                if (argument.type != MTLArgumentTypeBuffer || argument.index != 2 || argument.bufferDataType != MTLDataTypeStruct)\n                    continue;\n\n                materialImpl->materialParamsIndex = (int)argument.index;\n                materialImpl->materialParamsSize = std::max(materialImpl->materialParamsSize, argument.bufferDataSize);\n                materialImpl->bindParamsToVertex |= bindToVertex;\n                materialImpl->bindParamsToFragment |= !bindToVertex;\n\n                for (MTLStructMember* member in argument.bufferStructType.members)\n                {\n                    materialImpl->paramBindings[std::string(member.name.UTF8String)] = { member.offset, member.dataType };\n                }\n            }\n        }\n\n        void LogPipelineError(const String& message, NSError* error)\n        {\n            String result = message;\n            if (error)\n            {\n                NSString* description = [error localizedDescription];\n                if (description)\n                    result += \"\\n\" + ToString(description);\n            }\n\n            o2Debug.LogError(result);\n        }\n    }\n\n    bool Material::PlatformBuild()\n    {\n        PlatformDestroy();\n\n        if (!mVertexShader || !mVertexShader->mImpl || !mFragmentShader || !mFragmentShader->mImpl)\n            return false;\n\n        if (!RenderDevice::device || !RenderDevice::view)\n        {\n            o2Debug.LogError(\"Metal device or view is not initialized, can't build material\");\n            return false;\n        }\n\n        if (!mImpl)\n            mImpl = mnew MTLMaterialImpl();\n\n        MTLRenderPipelineDescriptor* descriptor = [[MTLRenderPipelineDescriptor alloc] init];\n        descriptor.label = @\"o2Material\";\n        descriptor.vertexFunction = mVertexShader->mImpl->function;\n        descriptor.fragmentFunction = mFragmentShader->mImpl->function;\n        descriptor.colorAttachments[0].pixelFormat = RenderDevice::view.colorPixelFormat;\n        SetupBlendState(descriptor.colorAttachments[0], mBlendMode);\n\n        NSError* error = nil;\n        MTLAutoreleasedRenderPipelineReflection reflection = nil;\n        id<MTLRenderPipelineState> pipelineState = [RenderDevice::device newRenderPipelineStateWithDescriptor:descriptor\n                                                                                                      options:MTLPipelineOptionArgumentInfo | MTLPipelineOptionBufferTypeInfo\n                                                                                                   reflection:&reflection\n                                                                                                        error:&error];\n        if (!pipelineState)\n        {\n            LogPipelineError(\"Failed to build Metal pipeline for material\", error);\n            PlatformDestroy();\n            return false;\n        }\n\n        mImpl->pipelineState = pipelineState;\n        mImpl->materialParamsIndex = -1;\n        mImpl->materialParamsSize = 0;\n        mImpl->bindParamsToVertex = false;\n        mImpl->bindParamsToFragment = false;\n        mImpl->paramBindings.clear();\n        mImpl->materialParamsData.clear();\n\n        std::unordered_map<std::string, int> textureBindings;\n        if (reflection)\n        {\n            CollectTextureBindings(reflection.fragmentArguments, textureBindings);\n            CollectParamBindings(reflection.vertexArguments, mImpl, true);\n            CollectParamBindings(reflection.fragmentArguments, mImpl, false);\n        }\n\n        if (mImpl->materialParamsSize > 0)\n        {\n            mImpl->materialParamsData.resize(mImpl->materialParamsSize);\n            std::fill(mImpl->materialParamsData.begin(), mImpl->materialParamsData.end(), Byte{ 0 });\n        }\n\n        mProgram = gNextMaterialProgramId++;\n        mTransformUniform = 1;\n        mTextureUniform = 0;\n        mPositionAttribute = 0;\n        mColorAttribute = 1;\n        mTexCoordsAttribute = 2;\n        mNormalAttribute = 5;\n\n        auto primaryTextureBinding = textureBindings.find(\"u_texture\");\n        if (primaryTextureBinding != textureBindings.end())\n            mTextureUniform = primaryTextureBinding->second;\n\n        mSamplerLocations.Clear();\n        for (int samplerIdx = 0; samplerIdx < mSamplers.Count(); samplerIdx++)\n        {\n            const auto& sampler = mSamplers[samplerIdx];\n            SamplerLocation location;\n            location.texCoordParam = ResolveTexCoordParam(sampler.texCoordsAttrName);\n            location.textureIndex = samplerIdx + 1;\n\n            auto textureBinding = textureBindings.find(ToStdString(sampler.samplerUniformName));\n            if (textureBinding != textureBindings.end())\n                location.textureIndex = textureBinding->second;\n\n            mSamplerLocations.Add(location);\n        }\n\n        mParamUniformLocations.Resize(mParams.Count());\n        for (int i = 0; i < mParams.Count(); i++)\n        {\n            auto binding = mImpl->paramBindings.find(ToStdString(mParams[i]->GetName()));\n            mParamUniformLocations[i] = binding != mImpl->paramBindings.end() ? (int)binding->second.offset : -1;\n        }\n\n        return true;\n    }\n\n    void Material::PlatformDestroy()\n    {\n        if (mImpl)\n        {\n            mImpl->pipelineState = nil;\n            delete mImpl;\n            mImpl = nullptr;\n        }\n\n        mProgram = 0;\n        mTransformUniform = -1;\n        mTextureUniform = -1;\n        mPositionAttribute = -1;\n        mColorAttribute = -1;\n        mTexCoordsAttribute = -1;\n        mNormalAttribute = -1;\n        mParamUniformLocations.Clear();\n        mSamplerLocations.Clear();\n        mReady = false;\n    }\n\n    void Material::PlatformApplyParams() const\n    {\n        if (!mImpl || mImpl->materialParamsData.empty())\n            return;\n\n        if (mParamUniformLocations.Count() != mParams.Count())\n        {\n            mParamUniformLocations.Resize(mParams.Count());\n            for (int i = 0; i < mParams.Count(); i++)\n            {\n                auto binding = mImpl->paramBindings.find(ToStdString(mParams[i]->GetName()));\n                mParamUniformLocations[i] = binding != mImpl->paramBindings.end() ? (int)binding->second.offset : -1;\n            }\n        }\n\n        std::fill(mImpl->materialParamsData.begin(), mImpl->materialParamsData.end(), Byte{ 0 });\n\n        for (int i = 0; i < mParams.Count(); i++)\n        {\n            const auto& param = mParams[i];\n            auto bindingIt = mImpl->paramBindings.find(ToStdString(param->GetName()));\n            if (bindingIt == mImpl->paramBindings.end())\n                continue;\n\n            const auto& binding = bindingIt->second;\n            Byte* dst = mImpl->materialParamsData.data() + binding.offset;\n\n            if (auto* floatParam = dynamic_cast<ShaderParamFloat*>(param.Get()))\n            {\n                if (binding.dataType == MTLDataTypeFloat)\n                {\n                    float value = floatParam->GetValue();\n                    memcpy(dst, &value, sizeof(value));\n                }\n            }\n            else if (auto* vec2Param = dynamic_cast<ShaderParamVec2*>(param.Get()))\n            {\n                if (binding.dataType == MTLDataTypeFloat2)\n                {\n                    float value[2] = { vec2Param->GetValue().x, vec2Param->GetValue().y };\n                    memcpy(dst, value, sizeof(value));\n                }\n            }\n            else if (auto* colorParam = dynamic_cast<ShaderParamColor*>(param.Get()))\n            {\n                if (binding.dataType == MTLDataTypeFloat4)\n                {\n                    float value[4] = { colorParam->GetValue().RF(), colorParam->GetValue().GF(),\n                                       colorParam->GetValue().BF(), colorParam->GetValue().AF() };\n                    memcpy(dst, value, sizeof(value));\n                }\n            }\n            else if (auto* intParam = dynamic_cast<ShaderParamInt*>(param.Get()))\n            {\n                if (binding.dataType == MTLDataTypeInt)\n                {\n                    int value = intParam->GetValue();\n                    memcpy(dst, &value, sizeof(value));\n                }\n            }\n        }\n    }\n}\n\n#endif // PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/MetalWrappers.h",
    "content": "#pragma once\n\n#import <MetalKit/MetalKit.h>\n\n#include \"o2/Utils/Types/CommonTypes.h\"\n\n#include <string>\n#include <unordered_map>\n#include <vector>\n\nnamespace o2\n{\n    struct RenderDevice\n    {\n    public:\n        // Initializes renderer\n        static void Initialize(UInt vertexBufferByteSize, UInt indexBufferSize);\n\n    public:\n        static MTKView*                    view;\n        static id<MTLDevice>               device;\n        static id<MTLCommandQueue>         commandQueue;\n        static id<MTLCommandBuffer>        commandBuffer;\n\n        static id<MTLBuffer> vertexBuffers[2];\n        static id<MTLBuffer> indexBuffers[2];\n\n        static id<MTLBuffer> vertexBuffer;\n        static id<MTLBuffer> indexBuffer;\n        static int           currentBufferIndex;\n    };\n\n    struct MTLTextureImpl\n    {\n        id<MTLTexture> texture;\n    };\n\n    struct MTLShaderImpl\n    {\n        id<MTLLibrary> library = nil;\n        id<MTLFunction> function = nil;\n    };\n\n    struct MetalParamBinding\n    {\n        NSUInteger offset = 0;\n        MTLDataType dataType = MTLDataTypeNone;\n    };\n\n    struct MTLMaterialImpl\n    {\n        id<MTLRenderPipelineState> pipelineState = nil;\n\n        int materialParamsIndex = -1;\n        bool bindParamsToVertex = false;\n        bool bindParamsToFragment = false;\n\n        NSUInteger materialParamsSize = 0;\n        std::unordered_map<std::string, MetalParamBinding> paramBindings;\n        std::vector<Byte> materialParamsData;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/RenderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_IOS\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Math/Color.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Render/TextureRef.h\"\n\nnamespace o2\n{\n    class RenderBase\n    {\n    protected:\n        UInt mVertexBufferSize = 1000000; // Maximum size of vertex buffer\n        UInt mIndexBufferSize = 3000000;  // Maximum size of index buffer\n        UInt mUniformBufferSize = 20000;    // Maximum size of uniforms buffer\n\n        UInt mVertexBufferOffset = 0;\n        UInt mIndexBufferOffset = 0;\n        UInt mUniformBufferOffset = 0;\n\n        Color4 mClearColor; // Clear color for next pass\n        bool mNeedClear = false;\n\n        float mMVPMatrix[16]; // Render model view projection matrix\n\n        bool  mScissorEnabled = false;\n        RectI mScissorRect;\n\n        TextureRef mWhiteTexture; // Default white texture\n\n        friend struct RenderDevice;\n    };\n};\n\n#endif // PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/RenderImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_IOS\n#include <simd/matrix.h>\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Application/iOS/ApplicationPlatformWrapper.h\"\n#include \"o2/Render/Material.h\"\n#include \"o2/Render/iOS/MetalWrappers.h\"\n#include \"o2/Render/iOS/ShaderTypes.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\n#import <UIKit/UIKit.h>\n\nnamespace o2\n{\n    MTKView*                    RenderDevice::view;\n    id<MTLDevice>               RenderDevice::device;\n    id<MTLCommandQueue>         RenderDevice::commandQueue;\n    id<MTLCommandBuffer>        RenderDevice::commandBuffer;\n\n    id<MTLBuffer> RenderDevice::vertexBuffers[2];\n    id<MTLBuffer> RenderDevice::indexBuffers[2];\n\n    id<MTLBuffer> RenderDevice::vertexBuffer;\n    id<MTLBuffer> RenderDevice::indexBuffer;\n    int           RenderDevice::currentBufferIndex;\n\n    namespace\n    {\n        NSUInteger AlignBufferOffset(NSUInteger value)\n        {\n            static const NSUInteger alignment = 256;\n            return ((value + alignment - 1) / alignment) * alignment;\n        }\n\n        void MtxConvert(const float* origin, matrix_float4x4& dst)\n        {\n            dst.columns[0][0] = origin[0];  dst.columns[0][1] = origin[1];  dst.columns[0][2] = origin[2];  dst.columns[0][3] = origin[3];\n            dst.columns[1][0] = origin[4];  dst.columns[1][1] = origin[5];  dst.columns[1][2] = origin[6];  dst.columns[1][3] = origin[7];\n            dst.columns[2][0] = origin[8];  dst.columns[2][1] = origin[9];  dst.columns[2][2] = origin[10]; dst.columns[2][3] = origin[11];\n            dst.columns[3][0] = origin[12]; dst.columns[3][1] = origin[13]; dst.columns[3][2] = origin[14]; dst.columns[3][3] = origin[15];\n        }\n\n        String LoadResolvedShaderSource(const String& path)\n        {\n            return FileSystem::ReadFile(Shader::ResolvePlatformSourcePath(path));\n        }\n    }\n\n    void RenderDevice::Initialize(UInt vertexBufferByteSize, UInt indexBufferSize)\n    {\n        RenderDevice::view = ApplicationPlatformWrapper::view;\n        device = ApplicationPlatformWrapper::view.device;\n        commandQueue = [device newCommandQueue];\n        currentBufferIndex = 0;\n\n        NSUInteger vertexBufferLength = (NSUInteger)vertexBufferByteSize;\n        NSUInteger indexBufferLength = (NSUInteger)indexBufferSize * sizeof(VertexIndex);\n\n        for (int i = 0; i < 2; i++)\n        {\n            vertexBuffers[i] = [device newBufferWithLength:vertexBufferLength\n                                                   options:MTLResourceStorageModeShared];\n\n            indexBuffers[i] = [device newBufferWithLength:indexBufferLength\n                                                  options:MTLResourceStorageModeShared];\n        }\n\n        vertexBuffer = vertexBuffers[0];\n        indexBuffer = indexBuffers[0];\n    }\n\n    void Render::InitializePlatform()\n    {\n        mLog->Out(\"Initializing Metal render (iOS)..\");\n\n        mVertexBufferSize = USHRT_MAX;\n        mIndexBufferSize = USHRT_MAX;\n        mVertexBufferByteSize = mVertexBufferSize * sizeof(Vertex3Tex);\n        mVertexData = mnew UInt8[mVertexBufferByteSize];\n        mVertexIndexData = mnew VertexIndex[mIndexBufferSize];\n        mCurrentBatchVertexType = Vertex3Tex::Type();\n\n        RenderDevice::Initialize(mVertexBufferByteSize, mIndexBufferSize);\n    }\n\n    void Render::DeinitializePlatform()\n    {\n        delete[] mVertexData;\n        delete[] mVertexIndexData;\n        mVertexData = nullptr;\n        mVertexIndexData = nullptr;\n\n        RenderDevice::commandBuffer = nil;\n        RenderDevice::vertexBuffer = nil;\n        RenderDevice::indexBuffer = nil;\n        RenderDevice::vertexBuffers[0] = nil;\n        RenderDevice::vertexBuffers[1] = nil;\n        RenderDevice::indexBuffers[0] = nil;\n        RenderDevice::indexBuffers[1] = nil;\n        RenderDevice::commandQueue = nil;\n        RenderDevice::device = nil;\n        RenderDevice::view = nil;\n    }\n\n    void Render::InitializeSandardShader()\n    {}\n\n    void Render::PlatformInitializeDefaultMaterial()\n    {\n        String basePath = GetBuiltinAssetsPath();\n        String vertexPath = Shader::ResolvePlatformSourcePath(basePath + \"Shaders/Default.vsh\");\n        String fragmentPath = Shader::ResolvePlatformSourcePath(basePath + \"Shaders/Default.fsh\");\n\n        String vertexSource = LoadResolvedShaderSource(basePath + \"Shaders/Default.vsh\");\n        String fragmentSource = LoadResolvedShaderSource(basePath + \"Shaders/Default.fsh\");\n\n        if (vertexSource.IsEmpty() || fragmentSource.IsEmpty())\n        {\n            o2Debug.LogError(\"Failed to load default Metal shader files (\" + vertexPath + \", \" + fragmentPath + \")\");\n            return;\n        }\n\n        Ref<Shader> vertexShader = mmake<Shader>();\n        Ref<Shader> fragmentShader = mmake<Shader>();\n        vertexShader->SetFileName(vertexPath);\n        fragmentShader->SetFileName(fragmentPath);\n        vertexShader->Compile(vertexSource, Shader::Type::Vertex);\n        fragmentShader->Compile(fragmentSource, Shader::Type::Fragment);\n\n        if (!vertexShader->IsReady() || !fragmentShader->IsReady())\n        {\n            o2Debug.LogError(\"Failed to compile default Metal shaders\");\n            return;\n        }\n\n        mDefaultMaterial = mmake<Material>();\n        mDefaultMaterial->SetVertexShader(vertexShader);\n        mDefaultMaterial->SetFragmentShader(fragmentShader);\n        mDefaultMaterial->SetBlendMode(BlendMode::Normal);\n        if (!mDefaultMaterial->Build())\n        {\n            o2Debug.LogError(\"Failed to build default Metal material\");\n            mDefaultMaterial = nullptr;\n        }\n    }\n\n    void Render::PlatformBegin()\n    {\n        RenderDevice::currentBufferIndex = (RenderDevice::currentBufferIndex + 1) % 2;\n        RenderDevice::vertexBuffer = RenderDevice::vertexBuffers[RenderDevice::currentBufferIndex];\n        RenderDevice::indexBuffer = RenderDevice::indexBuffers[RenderDevice::currentBufferIndex];\n\n        RenderDevice::commandBuffer = [RenderDevice::commandQueue commandBuffer];\n        RenderDevice::commandBuffer.label = @\"Default\";\n\n        mVertexBufferOffset = 0;\n        mIndexBufferOffset = 0;\n        mVertexBufferIdx = 0;\n        mIndexBufferIdx = 0;\n    }\n\n    void Render::PlatformDrawPrimitives()\n    {\n        if (!mCurrentMaterial || !mCurrentMaterial->mImpl || !mCurrentMaterial->mImpl->pipelineState)\n            return;\n\n        MTLRenderPassDescriptor *renderPassDescriptor = RenderDevice::view.currentRenderPassDescriptor;\n        if (renderPassDescriptor != nil)\n        {\n            if (mNeedClear)\n            {\n                [renderPassDescriptor.colorAttachments[0] setClearColor:\n                 MTLClearColorMake(mClearColor.RF(), mClearColor.GF(), mClearColor.BF(), mClearColor.AF())];\n                [renderPassDescriptor.colorAttachments[0] setLoadAction:MTLLoadActionClear];\n\n                mNeedClear = false;\n            }\n            else\n                [renderPassDescriptor.colorAttachments[0] setLoadAction:MTLLoadActionLoad];\n\n            [renderPassDescriptor.colorAttachments[0] setStoreAction:MTLStoreActionStore];\n\n            if (mCurrentRenderTarget)\n                renderPassDescriptor.colorAttachments[0].texture = mCurrentRenderTarget->mImpl->texture;\n\n            NSUInteger vertexDataSize = (NSUInteger)mLastDrawVertex * sizeof(Vertex3Tex);\n            NSUInteger indexDataSize = (NSUInteger)mLastDrawIdx * sizeof(VertexIndex);\n            memcpy((Byte*)[RenderDevice::vertexBuffer contents] + mVertexBufferOffset, mVertexData, vertexDataSize);\n            memcpy((Byte*)[RenderDevice::indexBuffer contents] + mIndexBufferOffset, mVertexIndexData, indexDataSize);\n\n            auto renderEncoder = [RenderDevice::commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor];\n            renderEncoder.label = @\"Default\";\n\n            float scale = mCurrentRenderTarget ? 1.0f : o2Application.GetGraphicsScale();\n            [renderEncoder setViewport:(MTLViewport){0.0, 0.0, (double)(mCurrentResolution.x * scale), (double)(mCurrentResolution.y * scale), 0.0, 1.0 }];\n\n            if (mScissorEnabled && mCurrentRenderTarget == nullptr)\n            {\n                Vec2I resolution = mCurrentResolution*scale;\n                RectF scissorRectF = RectF(mScissorRect.left*scale, mScissorRect.top*scale, mScissorRect.right*scale, mScissorRect.bottom*scale)\n                    .Move(resolution/2);\n\n                RectI scissorRect = scissorRectF;\n                scissorRect.left = Math::Clamp(scissorRect.left, 0, resolution.x);\n                scissorRect.right = Math::Clamp(scissorRect.right, 0, resolution.x);\n                scissorRect.bottom = Math::Clamp(scissorRect.bottom, 0, resolution.y);\n                scissorRect.top = Math::Clamp(scissorRect.top, 0, resolution.y);\n\n                [renderEncoder setScissorRect:(MTLScissorRect){\n                    (ULong)scissorRect.left,\n                    (ULong)(resolution.y - scissorRect.bottom - scissorRect.Height()),\n                    (ULong)scissorRect.Width(),\n                    (ULong)scissorRect.Height()\n                }];\n            }\n\n            [renderEncoder setRenderPipelineState:mCurrentMaterial->mImpl->pipelineState];\n\n            [renderEncoder setVertexBuffer:RenderDevice::vertexBuffer offset:mVertexBufferOffset atIndex:0];\n\n            TextureRef primaryTexture = mCurrentDrawTexture ? mCurrentDrawTexture : mWhiteTexture;\n            if (primaryTexture && mCurrentMaterial->GetTextureUniform() >= 0)\n            {\n                [renderEncoder setFragmentTexture:primaryTexture->mImpl->texture atIndex:(NSUInteger)mCurrentMaterial->GetTextureUniform()];\n            }\n\n            for (int i = 0; i < mCurrentMaterial->mSamplerLocations.Count() && i < mCurrentMaterial->mSamplers.Count(); i++)\n            {\n                const auto& samplerLocation = mCurrentMaterial->mSamplerLocations[i];\n                if (samplerLocation.textureIndex < 0)\n                    continue;\n\n                TextureRef samplerTexture = mCurrentMaterial->mSamplers[i].GetTexture();\n                if (!samplerTexture)\n                    continue;\n\n                [renderEncoder setFragmentTexture:samplerTexture->mImpl->texture atIndex:(NSUInteger)samplerLocation.textureIndex];\n            }\n\n            mCurrentMaterial->ApplyParams();\n\n            Uniforms uniforms;\n            MtxConvert(mMVPMatrix, uniforms.mvpMatrix);\n            [renderEncoder setVertexBytes:&uniforms length:sizeof(Uniforms) atIndex:1];\n\n            if (mCurrentMaterial->mImpl->materialParamsIndex >= 0 && !mCurrentMaterial->mImpl->materialParamsData.empty())\n            {\n                const void* paramsData = mCurrentMaterial->mImpl->materialParamsData.data();\n                NSUInteger paramsSize = mCurrentMaterial->mImpl->materialParamsSize;\n                NSUInteger paramsIndex = (NSUInteger)mCurrentMaterial->mImpl->materialParamsIndex;\n\n                if (mCurrentMaterial->mImpl->bindParamsToVertex)\n                    [renderEncoder setVertexBytes:paramsData length:paramsSize atIndex:paramsIndex];\n\n                if (mCurrentMaterial->mImpl->bindParamsToFragment)\n                    [renderEncoder setFragmentBytes:paramsData length:paramsSize atIndex:paramsIndex];\n            }\n\n            static const MTLPrimitiveType primitiveType[3]{ MTLPrimitiveTypeTriangle, MTLPrimitiveTypeTriangle, MTLPrimitiveTypeLine };\n\n            [renderEncoder drawIndexedPrimitives:primitiveType[(int)mCurrentPrimitiveType] indexCount:mLastDrawIdx\n                indexType:MTLIndexTypeUInt32 indexBuffer:RenderDevice::indexBuffer indexBufferOffset:mIndexBufferOffset];\n\n            [renderEncoder endEncoding];\n        }\n\n        mVertexBufferOffset = AlignBufferOffset(mVertexBufferOffset + (NSUInteger)mLastDrawVertex * sizeof(Vertex3Tex));\n        mIndexBufferOffset = AlignBufferOffset(mIndexBufferOffset + (NSUInteger)mLastDrawIdx * sizeof(VertexIndex));\n    }\n\n    void Render::PlatformEnd()\n    {\n        if (!RenderDevice::commandBuffer)\n            return;\n\n        if (!mCurrentRenderTarget && RenderDevice::view.currentDrawable)\n            [RenderDevice::commandBuffer presentDrawable:RenderDevice::view.currentDrawable];\n\n        [RenderDevice::commandBuffer commit];\n    }\n\n    void Render::PlatformResetState()\n    {\n        mCurrentBatchVertexType = Vertex3Tex::Type();\n        mVertexBufferIdx = 0;\n        mIndexBufferIdx = 0;\n    }\n\n    VertexType Render::PlatformResolveBatchVertexType(const VertexType& sourceVertexType, const Ref<Material>& material) const\n    {\n        return Vertex3Tex::Type();\n    }\n\n    void Render::Clear(const Color4& color /*= Color4::Blur()*/)\n    {\n        mClearColor = color;\n        mNeedClear = true;\n    }\n\n    void Render::PlatformFlipVerticesUV()\n    {\n        Vertex3Tex* dstVertexBuffer = reinterpret_cast<Vertex3Tex*>(mVertexData);\n        for (UInt i = 0; i < mLastDrawVertex; i++)\n            dstVertexBuffer[i].tv = 1.0f - dstVertexBuffer[i].tv;\n    }\n\n    void Render::PlatformSetupCameraTransforms(float* modelMatrix, float* viewMatrix, float* projMatrix)\n    {\n        if (mCurrentRenderTarget)\n            modelMatrix[5] = -modelMatrix[5]; // Flip by Y for render targets\n\n        float finalCamMtx[16];\n        Math::mtxMultiply(finalCamMtx, modelMatrix, viewMatrix);\n        Math::mtxMultiply(mMVPMatrix, projMatrix, finalCamMtx);\n\n        // Shared projection matrices are OpenGL-style and produce clip-space z in [-w, w].\n        // Metal expects clip-space z in [0, w], so convert it once at the platform level.\n        static const float metalClipSpaceFix[16] =\n        {\n            1.0f, 0.0f, 0.0f, 0.0f,\n            0.0f, 1.0f, 0.0f, 0.0f,\n            0.0f, 0.0f, 0.5f, 0.0f,\n            0.0f, 0.0f, 0.5f, 1.0f\n        };\n\n        float metalMvp[16];\n        Math::mtxMultiply(metalMvp, metalClipSpaceFix, mMVPMatrix);\n        memcpy(mMVPMatrix, metalMvp, sizeof(mMVPMatrix));\n    }\n\n    void Render::PlatformEnableScissorTest()\n    {\n        mScissorEnabled = true;\n    }\n\n    void Render::PlatformDisableScissorTest()\n    {\n        mScissorEnabled = false;\n    }\n\n    void Render::PlatformSetScissorRect(const RectI& rect)\n    {\n        mScissorRect = rect;\n    }\n\n    void Render::PlatformBindRenderTarget(const TextureRef& renderTarget)\n    {}\n\n    Vec2I Render::GetPlatformMaxTextureSize()\n    {\n        return Vec2I(4096, 4096);\n    }\n\n    Vec2I Render::GetPlatformDPI()\n    {\n        float scale = [[UIScreen mainScreen] scale];\n        // iOS doesn't expose physical screen size easily; return a reasonable default\n        // 163 PPI is the standard for non-retina iOS, multiplied by scale gives effective PPI\n        int dpi = (int)(163.0f * scale);\n        return Vec2I(dpi, dpi);\n    }\n\n    void Render::PlatformBindMaterial(const Ref<Material>& material)\n    {}\n}\n\n#endif // PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/ShaderBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_IOS\n\nnamespace o2\n{\n    struct MTLShaderImpl;\n\n    class ShaderBase\n    {\n        friend class Render;\n        friend class Material;\n\n    protected:\n        MTLShaderImpl* mImpl = nullptr;\n    };\n}\n\n#endif // PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/ShaderImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_IOS\n\n#import <Foundation/Foundation.h>\n\n#include \"o2/Render/iOS/MetalWrappers.h\"\n#include \"o2/Render/Shader.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    namespace\n    {\n        String BuildMetalShaderSource(const String& source)\n        {\n            static const char* preamble = R\"metal(#include <metal_stdlib>\nusing namespace metal;\n\nstruct O2VertexIn\n{\n    float x;\n    float y;\n    float z;\n    uint color;\n    packed_float2 texCoord0;\n    packed_float2 texCoord1;\n    packed_float2 texCoord2;\n    packed_float3 normal;\n};\n\nstruct O2Uniforms\n{\n    float4x4 mvpMatrix;\n};\n\nstruct O2RasterizerData\n{\n    float4 position [[position]];\n    float4 color;\n    float2 texCoords;\n    float2 texCoords2;\n    float2 texCoords3;\n    float3 normal;\n};\n\ninline float4 o2_unpackColor(uint color)\n{\n    return float4(float(color & 0xFFu) / 255.0,\n                  float((color >> 8) & 0xFFu) / 255.0,\n                  float((color >> 16) & 0xFFu) / 255.0,\n                  float((color >> 24) & 0xFFu) / 255.0);\n}\n\n#line 1\n)metal\";\n\n            return String(preamble) + source;\n        }\n\n        NSString* ToNSString(const String& value)\n        {\n            const char* data = value.Data();\n            return [NSString stringWithUTF8String:data ? data : \"\"];\n        }\n\n        NSString* GetEntryPointName(Shader::Type type)\n        {\n            return type == Shader::Type::Vertex ? @\"vertexShader\" : @\"fragmentShader\";\n        }\n\n        String GetCompileErrorText(NSError* error)\n        {\n            if (!error)\n                return \"Unknown Metal compiler error\";\n\n            NSString* description = [error localizedDescription];\n            NSString* failureReason = [error localizedFailureReason];\n            NSString* recovery = [error localizedRecoverySuggestion];\n\n            String result = description ? description.UTF8String : \"Unknown Metal compiler error\";\n            if (failureReason && failureReason.length > 0)\n                result += \"\\n\" + String(failureReason.UTF8String);\n\n            if (recovery && recovery.length > 0)\n                result += \"\\n\" + String(recovery.UTF8String);\n\n            return result;\n        }\n    }\n\n    bool Shader::PlatformCompile(const String& source, Type type)\n    {\n        PlatformDestroy();\n\n        if (!RenderDevice::device)\n        {\n            o2Debug.LogError(\"Metal device is not initialized, can't compile shader \" + mFileName);\n            return false;\n        }\n\n        if (!mImpl)\n            mImpl = mnew MTLShaderImpl();\n\n        NSError* error = nil;\n        NSString* sourceString = ToNSString(BuildMetalShaderSource(source));\n        MTLCompileOptions* options = [[MTLCompileOptions alloc] init];\n        options.fastMathEnabled = YES;\n\n        id<MTLLibrary> library = [RenderDevice::device newLibraryWithSource:sourceString options:options error:&error];\n        if (!library)\n        {\n            String shaderName = mFileName.IsEmpty() ? String(\"<runtime>\" ) : mFileName;\n            o2Debug.LogError(\"Error compiling Metal shader \" + shaderName + \":\\n\" + GetCompileErrorText(error));\n            PlatformDestroy();\n            return false;\n        }\n\n        id<MTLFunction> function = [library newFunctionWithName:GetEntryPointName(type)];\n        if (!function)\n        {\n            String shaderName = mFileName.IsEmpty() ? String(\"<runtime>\") : mFileName;\n            o2Debug.LogError(\"Metal shader entry point wasn't found in \" + shaderName + \". Expected function name: \" +\n                             String(type == Type::Vertex ? \"vertexShader\" : \"fragmentShader\"));\n            PlatformDestroy();\n            return false;\n        }\n\n        mImpl->library = library;\n        mImpl->function = function;\n        return true;\n    }\n\n    void Shader::PlatformDestroy()\n    {\n        if (mImpl)\n        {\n            mImpl->function = nil;\n            mImpl->library = nil;\n            delete mImpl;\n            mImpl = nullptr;\n        }\n\n        mReady = false;\n    }\n}\n\n#endif // PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/ShaderTypes.h",
    "content": "#pragma once\n#include <simd/simd.h>\n\nstruct Uniforms\n{\n    matrix_float4x4 mvpMatrix;\n};\n\nstruct MetalVertex2\n{\n    float x, y, z;\n    vector_float4 color;\n    float tu, tv;\n};\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/Shaders.metal",
    "content": "#include \"ShaderTypes.h\"\n\n#include <metal_stdlib>\nusing namespace metal;\n\nstruct RasterizerData\n{\n    float4 position [[position]];\n    float4 color;\n    float2 textureCoordinate;\n};\n\nvertex RasterizerData\nvertexShader(uint vertexID [[vertex_id]],\n             constant MetalVertex2 *vertices [[buffer(0)]],\n             constant Uniforms &uniforms [[buffer(1)]])\n{\n    RasterizerData out;\n\n    MetalVertex2 v = vertices[vertexID];\n    out.position = uniforms.mvpMatrix * float4(v.x, v.y, v.z, 1);\n    out.position.z = 0.5;\n    out.color = v.color;\n    out.textureCoordinate = vector_float2(v.tu, v.tv);\n\n    return out;\n}\n\nfragment float4\nfragmentShader(RasterizerData in [[stage_in]],\n               texture2d<half> colorTexture [[ texture(0) ]])\n{\n    constexpr sampler textureSampler (mag_filter::linear, min_filter::linear);\n    const half4 colorSample = colorTexture.sample(textureSampler, in.textureCoordinate);\n    return float4(colorSample) * in.color;\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/TextureBase.h",
    "content": "#pragma once\n\n#ifdef PLATFORM_IOS\n\nnamespace o2\n{\n    struct MTLTextureImpl;\n    \n    class TextureBase\n    {\n        friend class Render;\n        friend class VectorFont;\n\n    protected:\n        TextureBase();\n        \n    protected:\n        MTLTextureImpl* mImpl;\n    };\n}\n\n#endif // PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Render/iOS/TextureImpl.mm",
    "content": "#include \"o2/stdafx.h\"\n\n#ifdef PLATFORM_IOS\n#import <MetalKit/MetalKit.h>\n\n#include \"o2/Render/Texture.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Render/iOS/MetalWrappers.h\"\n\nnamespace o2\n{\n    TextureBase::TextureBase():\n        mImpl(mnew MTLTextureImpl())\n    {}\n\n    // TODO: TextureBase destructor to destroy mImpl\n\n    bool Texture::PlatformCreate()\n    {\n        if (!mImpl)\n            mImpl = mnew MTLTextureImpl();\n\n        MTLTextureDescriptor *textureDescriptor = [[MTLTextureDescriptor alloc] init];\n        textureDescriptor.pixelFormat = mUsage == Usage::RenderTarget ? RenderDevice::view.colorPixelFormat : MTLPixelFormatRGBA8Unorm;\n        textureDescriptor.width = mSize.x;\n        textureDescriptor.height = mSize.y;\n\n        if (mUsage == Usage::RenderTarget)\n            textureDescriptor.usage = MTLTextureUsageRenderTarget|MTLTextureUsageShaderRead;\n\n        mImpl->texture = [RenderDevice::device newTextureWithDescriptor:textureDescriptor];\n\n        return mImpl->texture != nil;\n    }\n\n    void Texture::PlatformDestroy()\n    {\n        if (mImpl)\n            mImpl->texture = nil;\n    }\n\n    void Texture::PlatformUploadData(const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        NSUInteger bytesPerRow = 4 * mSize.x;\n        MTLRegion region = { { 0, 0, 0 }, { (UInt)size.x, (UInt)size.y, 1 } };\n        [mImpl->texture replaceRegion:region\n                          mipmapLevel:0\n                            withBytes:data\n                          bytesPerRow:bytesPerRow];\n    }\n\n    void Texture::PlatformUploadRegionData(const Vec2I& offset, const Vec2I& size, Byte* data, TextureFormat format)\n    {\n        NSUInteger bytesPerRow = 4 * size.x;\n        MTLRegion region = { { (UInt)offset.x, (UInt)offset.y, 0 }, { (UInt)size.x, (UInt)size.y, 1 } };\n        [mImpl->texture replaceRegion:region\n                          mipmapLevel:0\n                            withBytes:data\n                          bytesPerRow:bytesPerRow];\n    }\n\n    void Texture::Copy(const Texture& from, const RectI& rect)\n    {}\n\n    void Texture::PlatformGetData(Byte* data)\n    {}\n\n    void Texture::PlatformSetFilter()\n    {\n        // TODO\n    }\n}\n\n#endif //PLATFORM_IOS\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Actor.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Actor.h\"\n\n#include \"o2/Scene/ActorRefResolver.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/Components/ScriptableComponent.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/SceneLayer.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    FORWARD_REF_IMPL(Component);\n\n    ActorCreateMode Actor::mDefaultCreationMode = ActorCreateMode::InScene;\n\n    Actor::Actor(RefCounter* refCounter, ActorTransform* transform, bool onScene /*= true*/, const String& name /*= \"unnamed\"*/, \n                 bool enabled /*= true*/, SceneUID id /*= Math::Random()*/, UID assetId /*= UID(0)*/) :\n        ActorBase(refCounter), transform(transform), mName(name), mEnabled(enabled),\n        mResEnabled(enabled), mResEnabledInHierarchy(false), mId(id), mAssetId(assetId), mState(State::Initializing),\n        mIsOnScene(onScene)\n    {\n        tags.onTagAdded = [&](const Ref<Tag>& tag) { tag->mActors.Add(WeakRef(this)); };\n        tags.onTagRemoved = [&](const Ref<Tag>& tag) { tag->mActors.Remove(WeakRef(this)); };\n\n        auto thisRef = Ref<Actor>(this);\n        transform->SetOwner(thisRef);\n\n        Scene::OnActorCreated(thisRef);\n        ActorRefResolver::ActorCreated(this);\n    }\n\n    Actor::Actor(RefCounter* refCounter, ActorTransform* transform, ActorCreateMode mode /*= ActorCreateMode::Default*/) :\n        Actor(refCounter, transform, IsModeOnScene(mode))\n    {}\n\n    Actor::Actor(RefCounter* refCounter, ActorTransform* transform, const Actor& other, ActorCreateMode mode /*= ActorCreateMode::Default*/) :\n        Actor(refCounter, transform, IsModeOnScene(mode), other.mName, other.mEnabled, Math::Random(), other.mAssetId)\n    {\n        ActorRefResolver::LockResolving();\n\n        ISceneDrawable::operator=(other);\n        mSceneLayer = other.mSceneLayer;\n\n        if (other.mIsAsset)\n        {\n            other.mCopyVisitor = mmake<InstantiatePrototypeCloneVisitor>();\n            SetPrototype(AssetRef<ActorAsset>(other.GetAssetID()));\n        }\n\n        transform->CopyFrom(*other.transform);\n        mAssetId = other.mAssetId;\n        mPrototypeLink = other.mPrototypeLink.Lock();\n\n        if (!other.mCopyVisitor)\n            other.mCopyVisitor = mmake<SourceToTargetMapCloneVisitor>();\n\n        other.mCopyVisitor->OnCopyActor(&other, this);\n        other.mCopyVisitor->depth++;\n\n        if (!mPrototype && other.mPrototype)\n            mPrototype = other.mPrototype;\n\n        for (auto& child : other.mChildren)\n        {\n            child->mCopyVisitor = other.mCopyVisitor;\n\n            AddChild(child->CloneAsRef<Actor>());\n\n            child->mCopyVisitor = nullptr;\n        }\n\n        for (auto& component : other.mComponents)\n        {\n            auto newComponent = AddComponent(component->CloneAsRef<Component>());\n\n            if (other.mCopyVisitor)\n                other.mCopyVisitor->OnCopyComponent(component.Get(), newComponent.Get());\n        }\n\n        ActorRefResolver::ActorCreated(this);\n        ActorRefResolver::UnlockResolving();\n\n        other.CheckCopyVisitorFinalization();\n    }\n\n    Actor::Actor(RefCounter* refCounter, ActorTransform* transform, const AssetRef<ActorAsset>& prototype, ActorCreateMode mode /*= ActorCreateMode::Default*/) :\n        Actor(refCounter, transform, *prototype->GetActor(), mode)\n    {}\n\n    Actor::Actor(RefCounter* refCounter, ActorTransform* transform, Vector<Ref<Component>> components, ActorCreateMode mode /*= ActorCreateMode::Default*/) :\n        Actor(refCounter, transform, mode)\n    {\n        for (auto& comp : components)\n            AddComponent(comp);\n    }\n\n    Actor::Actor(RefCounter* refCounter, ActorCreateMode mode /*= CreateMode::Default*/) :\n        Actor(refCounter, mnew ActorTransform(), mode)\n    {}\n\n    Actor::Actor(RefCounter* refCounter, Vector<Ref<Component>> components, ActorCreateMode mode /*= ActorCreateMode::Default*/) :\n        Actor(refCounter, mnew ActorTransform(), components, mode)\n    {}\n\n    Actor::Actor(RefCounter* refCounter, const AssetRef<ActorAsset>& prototype, ActorCreateMode mode /*= CreateMode::Default*/) :\n        Actor(refCounter, mnew ActorTransform(*prototype->GetActor()->transform), prototype, mode)\n    {}\n\n    Actor::Actor(RefCounter* refCounter, const Actor& other, ActorCreateMode mode) :\n        Actor(refCounter, mnew ActorTransform(*other.transform), other, mode)\n    {}\n\n    Actor::Actor(RefCounter* refCounter, const Actor& other) :\n        Actor(refCounter, other, ActorCreateMode::Default)\n    {}\n\n    Actor::~Actor()\n    {\n        mState = State::Destroyed;\n\n        SetPrototype(nullptr);\n\n        RemoveAllChildren();\n        RemoveAllComponents();\n\n        Scene::OnActorDestroy(WeakRef(this));\n\n        delete transform;\n    }\n\n    Actor& Actor::operator=(const Actor& other)\n    {\n        RemoveAllChildren();\n        RemoveAllComponents();\n\n        ActorRefResolver::LockResolving();\n\n        if (other.mCopyVisitor)\n            other.mCopyVisitor->OnCopyActor(&other, this);\n\n        if (other.mIsAsset)\n            SetPrototype(AssetRef<ActorAsset>(other.GetAssetID()));\n\n        ISceneDrawable::operator=(other);\n\n        mName = other.mName;\n        mEnabled = other.mEnabled;\n        mResEnabled = mEnabled;\n        mResEnabledInHierarchy = mEnabled;\n        mSceneLayer = other.mSceneLayer;\n        transform->CopyFrom(*other.transform);\n        mAssetId = other.mAssetId;\n        mPrototypeLink = other.mPrototypeLink.Lock();\n\n        if (!other.mCopyVisitor)\n            other.mCopyVisitor = mmake<SourceToTargetMapCloneVisitor>();\n\n        other.mCopyVisitor->OnCopyActor(&other, this);\n        other.mCopyVisitor->depth++;\n\n        if (!mPrototype && other.mPrototype)\n        {\n            mPrototype = other.mPrototype;\n\n#if IS_EDITOR\n            Scene::LinkActorToPrototypesHierarchy(Ref(this), mPrototype);\n#endif\n        }\n\n        for (auto& child : other.mChildren)\n        {\n            child->mCopyVisitor = other.mCopyVisitor;\n\n            AddChild(child->CloneAsRef<Actor>());\n\n            child->mCopyVisitor = nullptr;\n        }\n\n        for (auto& component : other.mComponents)\n        {\n            auto newComponent = AddComponent(component->CloneAsRef<Component>());\n\n            if (other.mCopyVisitor)\n                other.mCopyVisitor->OnCopyComponent(component.Get(), newComponent.Get());\n\n            if (mPrototypeLink)\n                newComponent->mPrototypeLink = component->mPrototypeLink;\n        }\n\n        Scene::OnActorCreated(Ref(this));\n\n        ActorRefResolver::ActorCreated(this);\n        ActorRefResolver::UnlockResolving();\n\n        other.CheckCopyVisitorFinalization();\n        UpdateResEnabledInHierarchy();\n\n#if IS_EDITOR\n        OnChanged();\n#endif\n\n        return *this;\n    }\n\n    void Actor::CheckCopyVisitorFinalization() const\n    {\n        if (mCopyVisitor)\n        {\n            mCopyVisitor->depth--;\n\n            if (mCopyVisitor->depth == 0)\n            {\n                mCopyVisitor->Finalize();\n                mCopyVisitor = nullptr;\n            }\n        }\n    }\n\n\tvoid Actor::DrawComponents()\n\t{\n\t\tfor (auto& component : mComponents)\n\t\t\tcomponent->OnDraw();\n\t}\n\n    void Actor::PostDrawComponents()\n    {\n        for (auto& component : mComponents)\n            component->OnPostDraw();\n    }\n\n    void Actor::Destroy()\n    {\n        SetParent(nullptr);\n\n        if (Scene::IsSingletonInitialzed())\n            o2Scene.DestroyActor(Ref(this));\n        else\n            o2Debug.LogError(\"Cant destroy actor in scene, because scene is not exists. Delete actor manually\");\n    }\n\n    void Actor::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        OnDraw();\n\t\tDrawComponents();\n        ISceneDrawable::Draw();\n        PostDrawComponents();\n    }\n\n    void Actor::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (transform->IsDirty())\n        {\n            for (auto& child : mChildren)\n                child->transform->SetDirty(true);\n\n            UpdateSelfTransform();\n        }\n\n        OnUpdate(dt);\n\n        for (auto& comp : mComponents)\n            comp->OnUpdate(dt);\n    }\n\n    void Actor::FixedUpdate(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        OnFixedUpdate(dt);\n\n        for (auto& comp : mComponents)\n            comp->OnFixedUpdate(dt);\n    }\n\n    void Actor::UpdateChildren(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        for (auto& child : mChildren)\n            child->Update(dt);\n\n        for (auto& child : mChildren)\n            child->UpdateChildren(dt);\n    }\n\n    void Actor::FixedUpdateChildren(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        for (auto& child : mChildren)\n            child->FixedUpdate(dt);\n\n        for (auto& child : mChildren)\n            child->FixedUpdateChildren(dt);\n    }\n\n    void Actor::UpdateTransform()\n    {\n        UpdateSelfTransform();\n        UpdateChildrenTransforms();\n    }\n\n    void Actor::UpdateSelfTransform()\n    {\n        transform->Update();\n        \n        for (auto& comp : mComponents)\n            comp->OnTransformUpdated();\n    }\n\n    void Actor::UpdateChildrenTransforms()\n    {\n        for (auto& child : mChildren)\n            child->UpdateSelfTransform();\n\n        for (auto& child : mChildren)\n            child->UpdateChildrenTransforms();\n    }\n\n    void Actor::SetName(const String& name)\n    {\n        mName = name;\n\n#if IS_EDITOR\n        OnNameChanged();\n#endif\n    }\n\n    const String& Actor::GetName() const\n    {\n        return mName;\n    }\n\n    SceneUID Actor::GetID() const\n    {\n        return mId;\n    }\n\n    void Actor::SetID(SceneUID id)\n    {\n        auto prevId = mId;\n        mId = id;\n\n        Scene::OnActorIdChanged(Ref(this), prevId);\n        ActorRefResolver::OnActorIdChanged(this, prevId);\n    }\n\n    UID Actor::GetAssetID() const\n    {\n        return mAssetId;\n    }\n\n    bool Actor::IsAsset() const\n    {\n        if (mParent)\n            return mIsAsset || mParent.Lock()->IsAsset();\n\n        return mIsAsset;\n    }\n\n    void Actor::GenerateNewID(bool withChildren /*= true*/)\n    {\n        SetID(Math::Random());\n\n        if (withChildren)\n        {\n            for (auto& child : mChildren)\n                child->GenerateNewID(withChildren);\n        }\n    }\n\n    void Actor::AddToScene()\n    {\n        if (mIsOnScene)\n            return;\n\n        mIsOnScene = true;;\n\n        Scene::OnAddActorToScene(Ref(this));\n\n        for (auto& child : mChildren)\n            child->AddToScene();\n    }\n\n    void Actor::RemoveFromScene(bool keepEditorObjects /*= false*/)\n    {\n        if (!mIsOnScene)\n            return;\n\n        mIsOnScene = false;\n\n        Scene::OnRemoveActorFromScene(Ref(this), keepEditorObjects);\n\n        for (auto& child : mChildren)\n            child->RemoveFromScene();\n    }\n\n    bool Actor::IsOnScene() const\n    {\n        return mIsOnScene;\n    }\n\n    void Actor::SetEnabled(bool enabled)\n    {\n        if (mEnabled == enabled)\n            return;\n\n        mEnabled = enabled;\n        UpdateResEnabled();\n\n#if IS_EDITOR\n        onEnableChanged(mEnabled);\n\n        if (mIsOnScene)\n            o2Scene.onEnableChanged(Ref(this));\n\n        OnChanged();\n#endif\n    }\n\n    void Actor::Enable()\n    {\n        SetEnabled(true);\n    }\n\n    void Actor::Disable()\n    {\n        SetEnabled(false);\n    }\n\n    bool Actor::IsEnabled() const\n    {\n        return mEnabled;\n    }\n\n    bool Actor::IsResEnabled() const\n    {\n        return mResEnabled;\n    }\n\n    bool Actor::IsEnabledInHierarchy() const\n    {\n        return mResEnabledInHierarchy;\n    }\n\n    void Actor::SetIndexInSiblings(int index)\n    {\n        if (mParent)\n        {\n            auto parent = mParent.Lock();\n            int lastIdx = parent->mChildren.IndexOf(Ref(this));\n            parent->mChildren.Insert(Ref(this), index);\n\n            if (index <= lastIdx)\n                lastIdx++;\n\n            parent->mChildren.RemoveAt(lastIdx);\n\n            parent->OnChildrenChanged();\n        }\n        else\n        {\n            if (mIsOnScene)\n            {\n                int lastIdx = o2Scene.mRootActors.IndexOf(Ref(this));\n                o2Scene.mRootActors.Insert(Ref(this), index);\n\n                if (index <= lastIdx)\n                    lastIdx++;\n\n                o2Scene.mRootActors.RemoveAt(lastIdx);\n            }\n        }\n    }\n\n    void Actor::SetParent(const Ref<Actor>& actor, bool worldPositionStays /*= true*/, int idx /*= -1*/)\n    {\n        if ((actor && actor->mParent == this) || actor == this || mParent == actor)\n            return;\n\n        auto thisRef = Ref(this);\n\n        // Store initial transform\n        Basis lastParentBasis = transform->GetWorldBasis();\n        auto oldParent = mParent;\n\n        // Remove from parent list or root actors\n        if (mParent)\n            mParent.Lock()->RemoveChild(Ref(this), false);\n        else if (mIsOnScene && Scene::IsSingletonInitialzed())\n            o2Scene.mRootActors.Remove(thisRef);\n\n        // Change parent\n        mParent = actor;\n        transform->mData->parentInvTransformActualFrame = 0;\n\n        // Restore in new parent children list or root actors\n        if (mParent)\n        {\n            auto parent = mParent.Lock();\n            if (idx < 0)\n                parent->mChildren.Add(thisRef);\n            else\n                parent->mChildren.Insert(thisRef, idx);\n\n            parent->OnChildAdded(thisRef);\n        }\n        else if (mIsOnScene && Scene::IsSingletonInitialzed())\n        {\n            if (idx < 0)\n                o2Scene.mRootActors.Add(thisRef);\n            else\n                o2Scene.mRootActors.Insert(thisRef, idx);\n        }\n\n        // Restore transform if needed\n        if (worldPositionStays)\n            transform->SetWorldBasis(lastParentBasis);\n        else\n            transform->SetDirty();\n\n        // Call events only when actor was initialized\n        if (mState == State::Default)\n        {\n            // Update enabled state in hierarchy\n            UpdateResEnabledInHierarchy();\n\n            // Checks if actor should be added or removed from scene\n            if (mParent && mParent.Lock()->mIsOnScene != mIsOnScene)\n            {\n                if (mParent.Lock()->mIsOnScene && !mIsOnScene)\n                    AddToScene();\n                else if (!mParent.Lock()->mIsOnScene && mIsOnScene)\n                    RemoveFromScene();\n            }\n        }\n        else if (mState == State::Initializing && mParent && mParent.Lock()->mState == State::Initializing)\n        {\n            Scene::OnNewActorParented(Ref(this));\n        }\n\n        // Call parent update events\n        OnParentChanged(oldParent.Lock());\n    }\n\n    const WeakRef<Actor>& Actor::GetParent() const\n    {\n        return mParent;\n    }\n\n    Ref<Actor> Actor::AddChild(const Ref<Actor>& actor)\n    {\n        Assert(actor, \"Actor is null\");\n\n        actor->SetParent(Ref(this), false);\n        return actor;\n    }\n\n    Ref<Actor> Actor::AddChild(const Ref<Actor>& actor, int index)\n    {\n        Assert(actor, \"Actor is null\");\n\n        actor->SetParent(Ref(this), false, index);\n        return actor;\n    }\n\n    void Actor::AddChildren(const Vector<Ref<Actor>>& actors)\n    {\n        for (auto& actor : actors)\n            AddChild(actor);\n    }\n\n    Ref<Actor> Actor::GetChild(const String& path) const\n    {\n        int delPos = path.Find(\"/\");\n        String pathPart = path.SubStr(0, delPos);\n\n        if (pathPart == \"..\")\n        {\n            if (mParent)\n            {\n                if (delPos == -1)\n                    return mParent.Lock();\n                else\n                    return mParent.Lock()->GetChild(path.SubStr(delPos + 1));\n            }\n\n            return nullptr;\n        }\n\n        for (auto& child : mChildren)\n        {\n            if (child->mName == pathPart)\n            {\n                if (delPos == -1)\n                    return child;\n                else\n                    return child->GetChild(path.SubStr(delPos + 1));\n            }\n        }\n\n        return nullptr;\n    }\n\n    Ref<Actor> Actor::FindChild(const String& name) const\n    {\n        for (auto& child : mChildren)\n        {\n            if (child->mName == name)\n                return child;\n\n            if (auto res = child->FindChild(name))\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    Ref<Actor> Actor::FindChild(const Function<bool(const Ref<Actor>& child)>& pred) const\n    {\n        for (auto& child : mChildren)\n        {\n            if (pred(child))\n                return child;\n\n            if (auto res = child->FindChild(pred))\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    const Vector<Ref<Actor>>& Actor::GetChildren() const\n    {\n        return mChildren;\n    }\n\n    void Actor::GetAllChildrenActors(Vector<Ref<Actor>>& actors)\n    {\n        actors.Add(mChildren);\n\n        for (auto& child : mChildren)\n            child->GetAllChildrenActors(actors);\n    }\n\n    void Actor::RemoveChild(const Ref<Actor>& actor, bool withEvent /*= true*/)\n    {\n        auto oldParent = actor->mParent.Lock();\n\n        actor->mParent = nullptr;\n        mChildren.RemoveFirst([&](auto& x) { return x == actor; });\n\n        if (withEvent)\n            actor->OnParentChanged(oldParent);\n\n        OnChildRemoved(actor);\n\n        if (actor->mState != State::Destroyed)\n        {\n            actor->transform->SetDirty();\n            actor->UpdateResEnabledInHierarchy();\n        }\n    }\n\n    void Actor::RemoveAllChildren()\n    {\n        for (auto& child : mChildren)\n        {\n            child->mParent = nullptr;\n\n            OnChildRemoved(child);\n            child->OnParentChanged(Ref(this));\n        }\n\n        mChildren.Clear();\n    }\n\n    Ref<Actor> Actor::FindActorById(SceneUID id)\n    {\n        if (mId == id)\n            return Ref(this);\n\n        for (auto& child : mChildren)\n        {\n            if (auto res = child->FindActorById(id))\n                return res;\n        }\n\n        return nullptr;\n    }\n\n\tvoid Actor::ForEachActor(const Function<bool(Actor&)>& func)\n\t{\n        if (func(*this))\n        {\n            for (auto& child : mChildren)\n                child->ForEachActor(func);\n        }\n\t}\n\n\tRef<Component> Actor::AddComponent(const Ref<Component>& component)\n    {\n        component->SetOwnerActor(Ref(this));\n        mComponents.Add(component);\n\n        if (mIsOnScene && mState == State::Default)\n            component->AddToScene();\n\n        OnComponentAdded(component);\n\n        component->OnTransformUpdated();\n\n#if IS_EDITOR\n        OnChanged();\n#endif\n\n        return component;\n    }\n\n    void Actor::RemoveComponent(const Ref<Component>& component)\n    {\n        if (mIsOnScene)\n            component->RemoveFromScene();\n\n        OnComponentRemoving(component);\n\n        mComponents.Remove(component);\n        component->mOwner = nullptr;\n\n#if IS_EDITOR\n        OnChanged();\n#endif\n    }\n\n    void Actor::RemoveAllComponents()\n    {\n        auto components = mComponents;\n        mComponents.Clear();\n\n        for (auto& component : components)\n        {\n            if (mIsOnScene)\n                component->RemoveFromScene();\n\n            OnComponentRemoving(component);\n        }\n\n#if IS_EDITOR\n        OnChanged();\n#endif\n    }\n\n    Ref<Component> Actor::GetComponent(const String& typeName)\n    {\n        for (auto& comp : mComponents)\n        {\n            if (comp->GetType().GetName() == typeName)\n                return comp;\n        }\n\n        return nullptr;\n    }\n\n    Ref<Component> Actor::GetComponent(const Type* type)\n    {\n        for (auto& comp : mComponents)\n        {\n            if (comp->GetType().IsBasedOn(*type))\n                return comp;\n        }\n\n        return nullptr;\n    }\n\n    Ref<Component> Actor::GetComponent(SceneUID id)\n    {\n        for (auto& comp : mComponents)\n        {\n            if (comp->GetID() == id)\n                return comp;\n        }\n\n        return nullptr;\n    }\n\n#if IS_SCRIPTING_SUPPORTED\n    Ref<Component> Actor::GetComponent(const ScriptValue& typeValue)\n    {\n        auto proto = typeValue.GetPrototype();\n        auto protoYpe = proto.GetValueType();\n        if (proto.IsObject())\n        {\n            auto typeProp = proto.GetProperty(\"type\");\n            if (typeProp.IsObjectContainer())\n            {\n                const Type* type = typeProp.GetValue<const Type*>();\n                for (auto& component : mComponents)\n                {\n                    if (component->GetType().IsBasedOn(*type))\n                        return component;\n                }\n            }\n        }\n        else\n        {\n            for (auto& component : mComponents)\n            {\n                if (auto scriptComponent = DynamicCast<ScriptableComponent>(component))\n                {\n                    if (scriptComponent->GetClass() == typeValue)\n                        return component;\n                }\n            }\n        }\n\n        return nullptr;\n    }\n\n    ActorTransform* Actor::GetTransform()\n    {\n        return transform;\n    }\n#endif\n\n    const Vector<Ref<Component>>& Actor::GetComponents() const\n    {\n        return mComponents;\n    }\n\n    void Actor::SetDefaultCreationMode(ActorCreateMode mode)\n    {\n        if (mode == ActorCreateMode::Default)\n            mode = ActorCreateMode::InScene;\n\n        mDefaultCreationMode = mode;\n    }\n\n    ActorCreateMode Actor::GetDefaultCreationMode()\n    {\n        return mDefaultCreationMode;\n    }\n\n    bool Actor::IsModeOnScene(ActorCreateMode mode)\n    {\n        return mode == ActorCreateMode::InScene || (mode == ActorCreateMode::Default && mDefaultCreationMode != ActorCreateMode::NotInScene);\n    }\n\n    void Actor::OnAddToScene()\n    {\n        ISceneDrawable::OnAddToScene();\n\n        for (auto& comp : mComponents)\n            comp->AddToScene();\n    }\n\n    void Actor::OnRemoveFromScene()\n    {\n        ISceneDrawable::OnRemoveFromScene();\n\n        for (auto& comp : mComponents)\n            comp->RemoveFromScene();\n    }\n\n    void Actor::OnInitialized()\n    {\n        mState = State::Default;\n\n        for (auto& comp : mComponents)\n            comp->OnInitialized();\n    }\n\n    void Actor::OnStart()\n    {\n        for (auto& comp : mComponents)\n            comp->OnStart();\n    }\n\n    void Actor::OnDestroy()\n    {}\n\n    void Actor::OnDraw()\n    {}\n\n    void Actor::OnUpdate(float dt)\n    {}\n\n    void Actor::OnFixedUpdate(float dt)\n    {}\n\n    void Actor::OnEnabled()\n    {\n        ISceneDrawable::OnEnabled();\n    }\n\n    void Actor::OnDisabled()\n    {\n        ISceneDrawable::OnDisabled();\n    }\n\n    void Actor::OnTransformUpdated()\n    {\n        for (auto& comp : mComponents)\n            comp->OnTransformUpdated();\n    }\n\n    void Actor::OnChildAdded(const Ref<Actor>& child)\n    {\n        for (auto& comp : mComponents)\n            comp->OnChildAdded(child);\n\n        OnChildrenChanged();\n    }\n\n    void Actor::OnChildRemoved(const Ref<Actor>& child)\n    {\n        for (auto& comp : mComponents)\n            comp->OnChildRemoved(child);\n\n        OnChildrenChanged();\n    }\n\n    void Actor::OnComponentAdded(const Ref<Component>& component)\n    {\n        for (auto& comp : mComponents)\n            comp->OnComponentAdded(component);\n    }\n\n    void Actor::OnComponentRemoving(const Ref<Component>& component)\n    {\n        for (auto& comp : mComponents)\n            comp->OnComponentRemoving(component);\n    }\n\n#if !IS_EDITOR\n    void Actor::OnChildrenChanged()\n    {\n        for (auto& comp : mComponents)\n            comp->OnChildrenChanged();\n    }\n\n    void Actor::OnParentChanged(const Ref<Actor>& oldParent) \n    {\n        ISceneDrawable::OnDrawbleParentChanged();\n\n        for (auto& comp : mComponents)\n            comp->OnParentChanged(oldParent);\n    }\n#endif\n\n    void Actor::UpdateResEnabled(bool withChildren /*= true*/)\n    {\n        mResEnabled = mEnabled;\n        UpdateResEnabledInHierarchy(withChildren);\n    }\n\n    void Actor::UpdateResEnabledInHierarchy(bool withChildren /*= true*/)\n    {\n        bool lastResEnabledInHierarchy = mResEnabledInHierarchy;\n\n        if (mParent)\n            mResEnabledInHierarchy = mResEnabled && mParent.Lock()->mResEnabledInHierarchy;\n        else\n            mResEnabledInHierarchy = mResEnabled;\n\n        if (lastResEnabledInHierarchy != mResEnabledInHierarchy)\n        {\n            if (mResEnabledInHierarchy)\n                OnEnabled();\n            else\n                OnDisabled();\n\n            for (auto& comp : mComponents)\n                comp->UpdateEnabledInHierarchy();\n\n            transform->SetDirty();\n\n#if IS_EDITOR\n            if (mIsOnScene)\n                o2Scene.onEnableChanged(Ref(this));\n\n            OnChanged();\n#endif\n        }\n\n        if (withChildren)\n        {\n            for (auto& child : mChildren)\n                child->UpdateResEnabledInHierarchy();\n        }\n    }\n\n    void Actor::SerializeBasicOverride(DataValue& node) const\n    {\n        if (mPrototypeLink)\n            SerializeWithProto(node);\n        else\n            SerializeRaw(node);\n\n        OnSerialize(node);\n    }\n\n    void Actor::DeserializeBasicOverride(const DataValue& node)\n    {\n        if (node.FindMember(\"PrototypeLink\") || node.FindMember(\"Prototype\"))\n            DeserializeWithProto(node);\n        else\n            DeserializeRaw(node);\n\n        OnDeserialized(node);\n    }\n\n    void Actor::SerializeRaw(DataValue& node) const\n    {\n        SerializeBasic(node);\n\n        node[\"Id\"] = mId;\n        node[\"Transform\"].Set(*transform);\n\n        if (!mChildren.IsEmpty())\n        {\n            auto& childsNode = node.AddMember(\"Children\");\n            for (auto& child : mChildren)\n            {\n                auto& childNode = childsNode.AddElement();\n                childNode.AddMember(\"Type\") = child->GetType().GetName();\n                child->Serialize(childNode.AddMember(\"Data\"));\n            }\n        }\n\n        if (!mComponents.IsEmpty())\n        {\n            auto& componentsNode = node.AddMember(\"Components\");\n            for (auto& component : mComponents)\n            {\n                auto& componentNode = componentsNode.AddElement();\n                componentNode.AddMember(\"Type\") = component->GetType().GetName();\n                component->Serialize(componentNode.AddMember(\"Data\"));\n            }\n        }\n    }\n\n    void Actor::DeserializeRaw(const DataValue& node)\n    {\n        DeserializeBasic(node);\n\n        ActorRefResolver::Instance().LockResolving();\n        if (ActorRefResolver::Instance().mLockDepth == 0)\n            ActorRefResolver::Instance().ActorCreated(this);\n\n        SetID(node.GetMember(\"Id\"));\n        node.GetMember(\"Transform\").Get(*transform);\n\n        RemoveAllComponents();\n\n        if (auto componentsNode = node.FindMember(\"Components\"))\n        {\n            if (componentsNode->IsArray())\n            {\n                for (auto& componentNode : *componentsNode)\n                {\n                    String componentType = componentNode.GetMember(\"Type\");\n                    auto component = DynamicCast<Component>(o2Reflection.CreateTypeSampleRef(componentType));\n                    if (component)\n                    {\n                        component->Deserialize(componentNode.GetMember(\"Data\"));\n                        AddComponent(component);\n                    }\n                    else\n                        o2Debug.LogError(\"Can't create component by type %s\", componentType.Data());\n\n                }\n            }\n        }\n\n        RemoveAllChildren();\n\n        if (auto childsNode = node.FindMember(\"Children\"))\n        {\n            if (childsNode->IsArray())\n            {\n                for (auto& childNode : *childsNode)\n                {\n                    const DataValue* typeNode = childNode.FindMember(\"Type\");\n                    const DataValue* dataValue = childNode.FindMember(\"Data\");\n                    if (typeNode && dataValue)\n                    {\n                        const ObjectType* type = dynamic_cast<const ObjectType*>(o2Reflection.GetType(*typeNode));\n                        if (type)\n                        {\n                            auto child = DynamicCast<Actor>(type->CreateSampleRef());\n                            child->Deserialize(*dataValue);\n                            o2Scene.mRootActors.Remove(child);\n                            AddChild(child);\n                        }\n                    }\n                }\n            }\n        }\n\n        ActorRefResolver::Instance().UnlockResolving();\n        ActorRefResolver::Instance().ResolveRefs();\n    }\n\n    void Actor::SerializeWithProto(DataValue& node) const\n    {\n        const Actor* proto = mPrototypeLink.Lock().Get();\n\n        // Prototype data\n        if (mPrototype)\n            node[\"Prototype\"] = mPrototype;\n\n        if (mPrototypeLink)\n            node[\"PrototypeLink\"] = proto->GetID();\n\n        // Basic data\n        node[\"Id\"] = mId;\n\n        // Transform data\n        auto& transformNode = node.AddMember(\"Transform\");\n        transform->SerializeDelta(transformNode, *proto->transform);\n\n        if (transformNode.IsEmpty() || transformNode.IsNull())\n            node.RemoveMember(\"Transform\");\n\n        SerializeDelta(node, static_cast<const IObject&>(static_cast<const ActorBase&>(*mPrototypeLink.Lock().Get())));\n\n        // Children data\n        if (!mChildren.IsEmpty())\n        {\n            auto& childsNode = node.AddMember(\"Children\");\n            childsNode.SetArray();\n            for (auto& child : mChildren)\n            {\n                auto& childNode = childsNode.AddElement();\n                childNode.AddMember(\"Type\") = child->GetType().GetName();\n                child->Serialize(childNode.AddMember(\"Data\"));\n            }\n        }\n\n        // Components data\n        if (!mComponents.IsEmpty())\n        {\n            auto& componentsNode = node.AddMember(\"Components\");\n            componentsNode.SetArray();\n            for (auto& component : mComponents)\n            {\n                auto& compNode = componentsNode.AddElement();\n                compNode.AddMember(\"Type\") = component->GetType().GetName();\n\n                auto& dataValue = compNode.AddMember(\"Data\");\n                if (auto componentProtoLink = component->mPrototypeLink)\n                {\n                    dataValue[\"PrototypeLink\"] = componentProtoLink.Lock()->mId;\n                    dataValue.SetDelta(*component, *component->mPrototypeLink.Lock());\n                }\n                else\n                    component->Serialize(dataValue);\n            }\n        }\n    }\n\n    void Actor::DeserializeWithProto(const DataValue& node)\n    {\n        RemoveAllChildren();\n        RemoveAllComponents();\n\n        ActorRefResolver::Instance().LockResolving();\n        ActorRefResolver::Instance().ActorCreated(this);\n\n        if (auto prototypeNode = node.FindMember(\"Prototype\"))\n            SetPrototype(*prototypeNode);\n\n        if (auto prototypeLinkNode = node.FindMember(\"PrototypeLink\"))\n        {\n            SceneUID id = *prototypeLinkNode;\n            auto parent = mParent.Lock();\n            while (parent && parent->mPrototypeLink)\n            {\n                bool found = false;\n\n                Actor* protoLink = parent->mPrototypeLink.Lock().Get();\n                while (protoLink)\n                {\n                    if (auto fnd = protoLink->FindActorById(id))\n                    {\n                        mPrototypeLink = fnd;\n                        found = true;\n                        break;\n                    }\n\n                    protoLink = protoLink->mPrototypeLink.Lock().Get();\n                }\n\n                if (found)\n                    break;\n\n                parent = parent->mParent.Lock();\n            }\n        }\n\n        if (mPrototypeLink)\n            DeserializeDelta(node, static_cast<const IObject&>(static_cast<const ActorBase&>(*mPrototypeLink.Lock().Get())));\n        else\n            DeserializeBasic(node);\n\n        SetID(node.GetMember(\"Id\"));\n\n        if (!mPrototypeLink)\n        {\n            ActorRefResolver::Instance().UnlockResolving();\n            ActorRefResolver::Instance().ResolveRefs();\n            return;\n        }\n\n        const Actor* proto = mPrototypeLink.Lock().Get();\n\n        if (!mCopyVisitor)\n            mCopyVisitor = mmake<SourceToTargetMapCloneVisitor>();\n\n        mCopyVisitor->depth++;\n        mCopyVisitor->OnCopyActor(proto, this);\n\n        // Transform data\n        if (auto transformNode = node.FindMember(\"Transform\"))\n            transform->DeserializeDelta(*transformNode, *proto->transform);\n        else\n            transform->CopyFrom(*proto->transform);\n\n        // children\n        auto childrenNode = node.FindMember(\"Children\");\n        if (childrenNode && childrenNode->IsArray())\n        {\n            for (auto& childNode : *childrenNode)\n            {\n                const DataValue* typeNode = childNode.FindMember(\"Type\");\n                const DataValue* dataValue = childNode.FindMember(\"Data\");\n                if (typeNode && dataValue)\n                {\n                    const ObjectType* type = dynamic_cast<const ObjectType*>(o2Reflection.GetType(*typeNode));\n                    if (type)\n                    {\n                        auto child = DynamicCast<Actor>(type->CreateSampleRef());\n                        child->mParent = Ref(this);\n                        child->mCopyVisitor = mCopyVisitor;\n                        child->Deserialize(*dataValue);\n                        child->mParent = nullptr;\n                        AddChild(child);\n                    }\n                }\n            }\n        }\n\n        // components\n        auto componentsNode = node.FindMember(\"Components\");\n        if (componentsNode && componentsNode->IsArray())\n        {\n            for (auto& componentNode : *componentsNode)\n            {\n                String type = componentNode[\"Type\"];\n                auto newComponent = DynamicCast<Component>(o2Reflection.CreateTypeSampleRef(type));\n                if (!newComponent)\n                {\n                    o2Debug.LogError(\"Can't create component with type:\" + type);\n                    continue;\n                }\n\n                auto& componentDataValue = componentNode[\"Data\"];\n\n                if (auto prototypeLinkNode = componentDataValue.FindMember(\"PrototypeLink\"))\n                {\n                    SceneUID id = *prototypeLinkNode;\n                    if (mPrototypeLink)\n                    {\n                        for (auto& protoLinkComponent : mPrototypeLink.Lock()->mComponents)\n                        {\n                            if (protoLinkComponent->mId == id)\n                            {\n                                newComponent->mPrototypeLink = protoLinkComponent;\n                                break;\n                            }\n                        }\n                    }\n                }\n\n                if (!newComponent->mPrototypeLink)\n                    newComponent->Deserialize(componentDataValue);\n                else\n                {\n                    componentDataValue.GetDelta(*newComponent, *newComponent->mPrototypeLink.Lock());\n                    mCopyVisitor->OnCopyComponent(newComponent->mPrototypeLink.Lock().Get(), newComponent.Get());\n                }\n\n                AddComponent(newComponent);\n            }\n        }\n\n        transform->SetDirty();\n\n        ActorRefResolver::Instance().UnlockResolving();\n        ActorRefResolver::Instance().ResolveRefs();\n\n        if (mCopyVisitor)\n        {\n            mCopyVisitor->depth--;\n\n            if (mCopyVisitor->depth == 0)\n            {\n                mCopyVisitor->Finalize();\n                mCopyVisitor = nullptr;\n            }\n        }\n    }\n\n    AssetRef<ActorAsset> Actor::GetPrototype() const\n    {\n        if (mPrototype)\n            return mPrototype;\n\n        if (mPrototypeLink && mParent)\n            return mParent.Lock()->GetPrototype();\n\n        return AssetRef<ActorAsset>();\n    }\n\n    AssetRef<ActorAsset> Actor::GetPrototypeDirectly() const\n    {\n        return mPrototype;\n    }\n\n    void Actor::SetPrototype(AssetRef<ActorAsset> asset)\n    {\n#if IS_EDITOR\n        if (Scene::IsSingletonInitialzed())\n            o2Scene.OnActorPrototypeBroken(this);\n#endif\n\n        mPrototype = asset;\n\n        if (asset)\n            mPrototypeLink = asset->GetActor();\n        else\n            mPrototypeLink = nullptr;\n\n#if IS_EDITOR\n        if (mPrototype)\n            Scene::LinkActorToPrototypesHierarchy(Ref(this), mPrototype);\n#endif\n    }\n\n    Ref<Actor> Actor::GetPrototypeLink() const\n    {\n        return mPrototypeLink.Lock();\n    }\n\n    void Actor::SetLayer(const Ref<SceneLayer>& layer)\n    {\n        mSceneLayer = layer;\n        ISceneDrawable::SetDrawingDepthInheritFromParent(false); // Reregister inside\n    }\n\n    void Actor::SetLayer(const String& name)\n    {\n        SetLayer(o2Scene.GetLayer(name));\n    }\n\n    const Ref<SceneLayer>& Actor::GetLayer() const\n    {\n        return mSceneLayer;\n    }\n\n    Ref<SceneLayer> Actor::GetSceneDrawableSceneLayer() const\n    {\n        if (mSceneLayer)\n            return mSceneLayer;\n\n        return o2Scene.GetDefaultLayer();\n    }\n\n    Ref<ISceneDrawable> Actor::GetParentDrawable()\n    {\n        return DynamicCast<ISceneDrawable>(mParent.Lock());\n    }\n\n    int Actor::GetIndexInParentDrawable() const\n    {\n        if (mParent)\n            return mParent.Lock()->mChildren.IndexOf(Ref(const_cast<Actor*>(this)));\n\n        if (Scene::IsSingletonInitialzed() && mIsOnScene)\n            return o2Scene.mRootActors.IndexOf(Ref(const_cast<Actor*>(this)));\n\n        return 0;\n    }\n\n    Map<String, Ref<Actor>> Actor::GetAllChilds()\n    {\n        Map<String, Ref<Actor>> res;\n        for (auto& child : mChildren)\n            res.Add(child->GetName(), child);\n\n        return res;\n    }\n\n    Map<String, Ref<Component>> Actor::GetAllComponents()\n    {\n        Map<String, Ref<Component>> res;\n        for (auto& child : mComponents)\n            res.Add(child->GetType().GetName(), child);\n\n        return res;\n    }\n\n    void Actor::OnBeforeDestroy()\n    {\n        if (mResEnabledInHierarchy)\n            OnDisabled();\n\n        OnDestroy();\n\n        mState = State::Destroyed;\n    }\n\n    String Actor::GetCreateMenuCategory()\n    {\n        return \"\";\n    }\n\n    String Actor::GetCreateMenuGroup()\n    {\n        return \"\";\n    }\n\n    void Actor::SourceToTargetMapCloneVisitor::OnCopyActor(const Actor* source, Actor* target)\n    {\n        sourceToTargetActors[source] = target;\n    }\n\n    void Actor::SourceToTargetMapCloneVisitor::OnCopyComponent(const Component* source, Component* target)\n    {\n        sourceToTargetComponents[source] = target;\n    }\n\n    void Actor::SourceToTargetMapCloneVisitor::Finalize()\n    {\n        ActorRefResolver::RemapReferences(sourceToTargetActors, sourceToTargetComponents);\n    }\n\n    void Actor::InstantiatePrototypeCloneVisitor::OnCopyActor(const Actor* source, Actor* target)\n    {\n        SourceToTargetMapCloneVisitor::OnCopyActor(source, target);\n        target->mPrototypeLink = Ref(const_cast<Actor*>(source));\n    }\n\n    void Actor::InstantiatePrototypeCloneVisitor::OnCopyComponent(const Component* source, Component* target)\n    {\n        SourceToTargetMapCloneVisitor::OnCopyComponent(source, target);\n        target->mPrototypeLink = Ref(const_cast<Component*>(source));\n    }\n}\n// --- META ---\n\nENUM_META(o2::Actor::State, o2__Actor__State)\n{\n    ENUM_ENTRY(Default);\n    ENUM_ENTRY(Destroyed);\n    ENUM_ENTRY(Destroying);\n    ENUM_ENTRY(Initializing);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::Actor, o2__Actor);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Actor.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Scene/ActorLinkRef.h\"\n#include \"o2/Scene/ActorTransform.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/ComponentLinkRef.h\"\n#include \"o2/Scene/ISceneDrawable.h\"\n#include \"o2/Scene/Tags.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scripts/ScriptValue.h\"\n#endif\n\nnamespace o2\n{\n    class Scene;\n\n    FORWARD_CLASS_REF(Component);\n\n#if IS_EDITOR\n    typedef SceneEditableObject ActorBase;\n\n    struct ActorDifferences;\n\n#define OPTIONAL_OVERRIDE override\n#else\n    struct ActorBase: virtual public ISerializable, public RefCounterable\n    {\n        ActorBase() = default;\n        ActorBase(RefCounter* refCounter):RefCounterable(refCounter) {}\n    };\n\n#define OPTIONAL_OVERRIDE\n#endif\n\n    // ---------------------------------------------------------------------------------------------\n    // Scene actor. This is a basic scene object. All other scene object types are derived from this.\n    // It has an unique id, name, tags, transformation, components and children actors.\n    // Can be created from prototype of other actor. \n    // When editor pragma is enabled, it is derived from SceneEditableObject and support all editor \n    // features for editing actor\n    // ---------------------------------------------------------------------------------------------\n    class Actor: public ActorBase, public ISceneDrawable\n    {\n    public:\n        enum class State { Default, Initializing, Destroying, Destroyed };\n\n    public:\n        PROPERTIES(Actor);\n        PROPERTY(AssetRef<ActorAsset>, prototype, SetPrototype, GetPrototype); // Prototype asset reference property @EDITOR_IGNORE\n\n        GETTER(SceneUID, id, GetID);              // Actor unique id\n        PROPERTY(String, name, SetName, GetName); // Actor name property @EDITOR_IGNORE @ANIMATABLE\n\n        PROPERTY(bool, enabled, SetEnabled, IsEnabled);         // Is actor enabled property @EDITOR_IGNORE @ANIMATABLE\n        GETTER(bool, enabledInHierarchy, IsEnabledInHierarchy); // Is actor enabled in hierarchy getter\n\n        GETTER(Vector<Ref<Actor>>, children, GetChildren);         // Children array getter\n        GETTER(Vector<Ref<Component>>, components, GetComponents); // Components array getter\n\n        ACCESSOR(Ref<Actor>, child, String, GetChild, GetAllChilds);                 // Children accessor\n        ACCESSOR(Ref<Component>, component, String, GetComponent, GetAllComponents); // Component accessor by type name\n\n    public:\n        TagGroup              tags;      // Tags group @EDITOR_IGNORE\n        ActorTransform* const transform; // Transformation of actor @EDITOR_IGNORE @ANIMATABLE\n\n    public:\n        // Default constructor @SCRIPTABLE\n        Actor(RefCounter* refCounter, ActorCreateMode mode = ActorCreateMode::Default);\n\n        // Actor constructor from prototype\n        Actor(RefCounter* refCounter, const AssetRef<ActorAsset>& prototype, ActorCreateMode mode = ActorCreateMode::Default);\n\n        // Constructor with components\n        Actor(RefCounter* refCounter, Vector<Ref<Component>> components, ActorCreateMode mode = ActorCreateMode::Default);\n\n        // Copy-constructor\n        Actor(RefCounter* refCounter, const Actor& other, ActorCreateMode mode);\n\n        // Copy-constructor\n        Actor(RefCounter* refCounter, const Actor& other);\n\n        // Destructor\n        virtual ~Actor();\n\n        // Assign operator\n        Actor& operator=(const Actor& other);\n\n        // Marks actor to destroy, will be destroyed on next frame @SCRIPTABLE\n        void Destroy() OPTIONAL_OVERRIDE;\n\n        // Draws actor ant its components\n        void Draw() override;\n\n        // Updates actor and components @SCRIPTABLE\n        virtual void Update(float dt) OPTIONAL_OVERRIDE;\n\n        // Updates actor and components with fixed delta time @SCRIPTABLE\n        virtual void FixedUpdate(float dt);\n\n        // Updates childs @SCRIPTABLE\n        virtual void UpdateChildren(float dt);\n\n        // Updates childs with fixed delta time @SCRIPTABLE\n        virtual void FixedUpdateChildren(float dt);\n\n        // Updates self transform, dependent parents and children transforms @SCRIPTABLE\n        virtual void UpdateTransform() OPTIONAL_OVERRIDE;\n\n        // Updates transform @SCRIPTABLE\n        virtual void UpdateSelfTransform();\n\n        // Updates children transforms @SCRIPTABLE\n        virtual void UpdateChildrenTransforms();\n\n        // Sets actor's name @SCRIPTABLE\n        void SetName(const String& name) OPTIONAL_OVERRIDE;\n\n        // Returns name @SCRIPTABLE\n        const String& GetName() const OPTIONAL_OVERRIDE;\n\n        // Returns actor's unique id\n        SceneUID GetID() const OPTIONAL_OVERRIDE;\n\n        // Sets id. Be carefully! Ids must be unique! Not recommended to change this\n        void SetID(SceneUID id);\n\n        // Generates new random id @SCRIPTABLE\n        void GenerateNewID(bool withChildren = true) OPTIONAL_OVERRIDE;\n\n        // Returns asset id @SCRIPTABLE\n        UID GetAssetID() const;\n\n        // Is this from asset @SCRIPTABLE\n        bool IsAsset() const;\n\n        // Sets prototype and links actor to them\n        void SetPrototype(AssetRef<ActorAsset> asset);\n\n        // Returns prototype from this or this parent @SCRIPTABLE\n        AssetRef<ActorAsset> GetPrototype() const;\n\n        // Returns prototype directly from only this\n        AssetRef<ActorAsset> GetPrototypeDirectly() const;\n\n        // Returns prototype link pointer\n        Ref<Actor> GetPrototypeLink() const;\n\n        // Sets scene layer\n        void SetLayer(const Ref<SceneLayer>& layer);\n\n        // Sets scene layer by name @SCRIPTABLE\n        void SetLayer(const String& name);\n\n        // Returns scene layer @SCRIPTABLE\n        const Ref<SceneLayer>& GetLayer() const;\n\n        // Includes to scene and now will be update and draw automatically from scene @SCRIPTABLE\n        void AddToScene();\n\n        // Excludes from scene and will not be update and draw automatically from scene @SCRIPTABLE\n        void RemoveFromScene(bool keepEditorObjects = false);\n\n        // Is actor on scene @SCRIPTABLE\n        bool IsOnScene() const OPTIONAL_OVERRIDE;\n\n        // Sets actor enabling @SCRIPTABLE\n        virtual void SetEnabled(bool enabled) OPTIONAL_OVERRIDE;\n\n        // Enables actor @SCRIPTABLE\n        void Enable();\n\n        // Disables actor @SCRIPTABLE\n        void Disable();\n\n        // Returns is actor enabled @SCRIPTABLE\n        bool IsEnabled() const OPTIONAL_OVERRIDE;\n\n        // Returns is really enabled @SCRIPTABLE\n        bool IsResEnabled() const;\n\n        // Returns is actor enabled in hierarchy @SCRIPTABLE\n        bool IsEnabledInHierarchy() const OPTIONAL_OVERRIDE;\n\n        // Sets parent @SCRIPTABLE\n        void SetParent(const Ref<Actor>& actor, bool worldPositionStays = true, int idx = -1);\n\n        // Returns parent @SCRIPTABLE\n        const WeakRef<Actor>& GetParent() const;\n\n        // Sets index position in parent or scene @SCRIPTABLE\n        virtual void SetIndexInSiblings(int index) OPTIONAL_OVERRIDE;\n\n        // Add child actor @SCRIPTABLE\n        virtual Ref<Actor> AddChild(const Ref<Actor>& actor);\n\n        // Add children actors @SCRIPTABLE\n        void AddChildren(const Vector<Ref<Actor>>& actors);\n\n        // Add child actor @SCRIPTABLE\n        virtual Ref<Actor> AddChild(const Ref<Actor>& actor, int index);\n\n        // Returns child actor by path (ex \"root/some node/other node/target node\") @SCRIPTABLE\n        Ref<Actor> GetChild(const String& path) const;\n\n        // Returns child actor by name @SCRIPTABLE\n        Ref<Actor> FindChild(const String& name) const;\n\n        // Returns child actor by predicate\n        Ref<Actor> FindChild(const Function<bool(const Ref<Actor>& child)>& pred) const;\n\n        // Returns child actor by path (ex \"root/some node/other node/target node\")\n        template<typename _type>\n        Ref<_type> GetChildByType(const String& path) const;\n\n        // Returns child actor by name\n        template<typename _type>\n        Ref<_type> FindChildByTypeAndName(const String& name) const;\n\n        // Searches child with specified type\n        template<typename _type>\n        Ref<_type> FindChildByType(bool searchInChildren = true) const;\n\n        // Returns children array @SCRIPTABLE\n        const Vector<Ref<Actor>>& GetChildren() const;\n\n        // Returns all children actors with their children\n        virtual void GetAllChildrenActors(Vector<Ref<Actor>>& actors);\n\n        // Removes child and destroys him if needed @SCRIPTABLE\n        void RemoveChild(const Ref<Actor>& actor, bool withEvent = true);\n\n        // Removes and destroys all childs @SCRIPTABLE\n        void RemoveAllChildren();\n\n        // Searches actor with id in this and this children @SCRIPTABLE\n        virtual Ref<Actor> FindActorById(SceneUID id);\n\n\t\t// Recursively invokes function for each actor in this and children\n\t\tvirtual void ForEachActor(const Function<bool(Actor&)>& func);\n\n        // And new component\n        template<typename _type>\n        Ref<_type> AddComponent();\n\n        // Adds new component\n        Ref<Component> AddComponent(const Ref<Component>& component);\n\n        // Removes component @SCRIPTABLE\n        void RemoveComponent(const Ref<Component>& component);\n\n        // Removes all components @SCRIPTABLE\n        void RemoveAllComponents();\n\n        // Returns component with type name @SCRIPTABLE\n        Ref<Component> GetComponent(const String& typeName);\n\n        // Returns component with type\n        Ref<Component> GetComponent(const Type* type);\n\n        // Returns component by id\n        Ref<Component> GetComponent(SceneUID id);\n\n        // Returns component with type\n        template<typename _type>\n        Ref<_type> GetComponent() const;\n\n#if IS_SCRIPTING_SUPPORTED\n        // Returns component with type name @SCRIPTABLE\n        Ref<Component> GetComponent(const ScriptValue& typeValue);\n#endif\n\n        // Returns component with type in this and children\n        template<typename _type>\n        Ref<_type> GetComponentInChildren() const;\n\n        // Return all components by type\n        template<typename _type>\n        Vector<Ref<_type>> GetComponents() const;\n\n        // Returns all components by type in this and children\n        template<typename _type>\n        Vector<Ref<_type>> GetComponentsInChildren() const;\n\n        // Returns all components @SCRIPTABLE\n        const Vector<Ref<Component>>& GetComponents() const;\n\n        // Beginning serialization callback\n        void SerializeBasicOverride(DataValue& node) const;\n\n        // Completion deserialization callback\n        void DeserializeBasicOverride(const DataValue& node);\n\n        // Sets default actors creation mode\n        static void SetDefaultCreationMode(ActorCreateMode mode);\n\n        // Return default actors creation mode\n        static ActorCreateMode GetDefaultCreationMode();\n\n        // Returns is current mode means mode on scene. For InScene always returns true. For returns true only when default creation mode is onscene.\n        static bool IsModeOnScene(ActorCreateMode mode);\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(Actor);\n        CLONEABLE_REF(Actor);\n\n    protected:\n        struct ICopyVisitor: public RefCounterable\n        {\n            int depth = 0;\n\n            virtual ~ICopyVisitor() {}\n            virtual void OnCopyActor(const Actor* source, Actor* target) = 0;\n            virtual void OnCopyComponent(const Component* source, Component* target) = 0;\n            virtual void Finalize() {}\n        };\n\n        struct SourceToTargetMapCloneVisitor: public ICopyVisitor\n        {\n            Map<const Actor*, Actor*>         sourceToTargetActors;\n            Map<const Component*, Component*> sourceToTargetComponents;\n\n            void OnCopyActor(const Actor* source, Actor* target) override;\n            void OnCopyComponent(const Component* source, Component* target) override;\n            void Finalize() override;\n        };\n\n        struct InstantiatePrototypeCloneVisitor: public SourceToTargetMapCloneVisitor\n        {\n            void OnCopyActor(const Actor* source, Actor* target) override;\n            void OnCopyComponent(const Component* source, Component* target) override;\n        };\n\n    protected:\n        static ActorCreateMode mDefaultCreationMode;   // Default mode creation\n\n        SceneUID mId;   // Unique actor id\n        String   mName; // Name of actor @SERIALIZABLE\n\n        Ref<SceneLayer> mSceneLayer; // Scene layer @SERIALIZABLE @EDITOR_IGNORE\n\n        AssetRef<ActorAsset> mPrototype;     // Prototype asset\n        WeakRef<Actor>       mPrototypeLink; // Prototype link actor. Links to source actor from prototype\n\n        WeakRef<Actor>     mParent;   // Parent actor\n        Vector<Ref<Actor>> mChildren; // Children actors \n\n        Vector<Ref<Component>> mComponents; // Components vector\n\n        // Actor can be logically disabled, but actually stay enabled and be in transition to really disabled state\n        // mResEnabled and mResEnabledInHierarchy are disabled by default to get enabled after initialization\n        bool mEnabled = true;                // Is actor logically enabled. \n        bool mResEnabled = false;            // Is actor really enabled. \n        bool mResEnabledInHierarchy = false; // Is actor enabled in hierarchy\n\n        State mState = State::Default; // Actor on scene status\n\n        bool mIsOnScene = false; // Is actor on scene\n\n        bool mIsAsset = false; // Is this actor cached asset\n        UID  mAssetId;         // Source asset id\n\n        mutable Ref<ICopyVisitor> mCopyVisitor; // Copy visitor. Called when copying actor and calls on actor or component copying\n\n    protected:\n        // Base actor constructor with transform\n        Actor(RefCounter* refCounter, ActorTransform* transform, bool onScene = true, const String& name = \"unnamed\", bool enabled = true,\n              SceneUID id = Math::Random(), UID assetId = UID(0));\n\n        // Default constructor with transform\n        Actor(RefCounter* refCounter, ActorTransform* transform, ActorCreateMode mode = ActorCreateMode::Default);\n\n        // Actor constructor from prototype with transform\n        Actor(RefCounter* refCounter, ActorTransform* transform, const AssetRef<ActorAsset>& prototype, ActorCreateMode mode = ActorCreateMode::Default);\n\n        // Constructor with components with transform\n        Actor(RefCounter* refCounter, ActorTransform* transform, Vector<Ref<Component>> components, ActorCreateMode mode = ActorCreateMode::Default);\n\n        // Copy-constructor with transform\n        Actor(RefCounter* refCounter, ActorTransform* transform, const Actor& other, ActorCreateMode mode = ActorCreateMode::Default);\n        \n        // Checks that copy visitor finished work, calls it finalization\n        void CheckCopyVisitorFinalization() const;\n\n\t\t// Draws components of actor\n        virtual void DrawComponents();\n\n        // Draws components of actor after children\n        virtual void PostDrawComponents();\n\n        // Updates result read enable flag\n        virtual void UpdateResEnabled(bool withChildren = true);\n\n        // Updates enabling\n        virtual void UpdateResEnabledInHierarchy(bool withChildren = true);\n\n        // Regular serializing without prototype\n        virtual void SerializeRaw(DataValue& node) const;\n\n        // Regular deserializing without prototype\n        virtual void DeserializeRaw(const DataValue& node);\n\n        // Regular serializing with prototype\n        virtual void SerializeWithProto(DataValue& node) const;\n\n        // Regular deserializing with prototype\n        virtual void DeserializeWithProto(const DataValue& node);\n\n        // Returns current scene layer\n        Ref<SceneLayer> GetSceneDrawableSceneLayer() const override;\n\n        // Returns parent scene drawable\n        Ref<ISceneDrawable> GetParentDrawable() override;\n\n        // Returns the index in the parent's list of children, used to sort the rendering\n        int GetIndexInParentDrawable() const override;\n\n        // Returns dictionary of all children by names\n        Map<String, Ref<Actor>> GetAllChilds();\n\n        // Returns dictionary of all components by type names\n        Map<String, Ref<Component>> GetAllComponents();\n\n        // Calls events before destroying: OnDisable, OnDestroy, OnRemoveFromScene\n        void OnBeforeDestroy();\n\n        // Called when actor has added to scene \n        virtual void OnAddToScene();\n\n        // Called when actor has removed from scene\n        virtual void OnRemoveFromScene();\n\n        // Called when actor and scene is initialized\n        virtual void OnInitialized();\n\n        // Called on first update\n        virtual void OnStart();\n\n        // Called when actor will be destroyed\n        virtual void OnDestroy();\n\n        // Called when actor is drawing\n        virtual void OnDraw();\n\n        // Called on update with frame dt\n        virtual void OnUpdate(float dt);\n\n        // Called on fixed update with fixed dt\n        virtual void OnFixedUpdate(float dt);\n\n        // Called when actor enabled in hierarchy\n        virtual void OnEnabled();\n\n        // Called when actor disabled in hierarchy\n        virtual void OnDisabled();\n\n        // Called when transformation was updated\n        virtual void OnTransformUpdated();\n\n        // Called when parent changed\n        virtual void OnParentChanged(const Ref<Actor>& oldParent);\n\n        // Called when child changed\n        virtual void OnChildrenChanged() OPTIONAL_OVERRIDE;\n\n        // Called when child actor was added\n        virtual void OnChildAdded(const Ref<Actor>& child);\n\n        // Called when child actor was removed\n        virtual void OnChildRemoved(const Ref<Actor>& child);\n\n        // Called when new component has added to actor\n        virtual void OnComponentAdded(const Ref<Component>& component);\n\n        // Called when component going to be removed from actor\n        virtual void OnComponentRemoving(const Ref<Component>& component);\n\n        REF_COUNTERABLE_IMPL(ActorBase);\n\n#if IS_SCRIPTING_SUPPORTED\n    public:\n        // Returns transform for scripting @SCRIPTABLE\n        ActorTransform* GetTransform();\n#endif\n\n#if IS_EDITOR\n    public:\n        PROPERTY(bool, locked, SetLocked, IsLocked);          // Is actor locked property @EDITOR_IGNORE\n        GETTER(bool, lockedInHierarchy, IsLockedInHierarchy); // Is actor locked in hierarchy getter\n\n    public:\n        Function<void(bool)>       onEnableChanged;         // Enable changing event @EDITOR_IGNORE\n        Function<void()>           onChanged;               // Something in actor change event @EDITOR_IGNORE\n        Function<void(Ref<Actor>)> onParentChanged;         // Actor change parent event @EDITOR_IGNORE\n        Function<void()>           onChildHierarchyChanged; // Actor childs hierarchy change event @EDITOR_IGNORE\n        Function<void(bool)>       onLockChanged;           // Locking changing event @EDITOR_IGNORE\n        Function<void()>           onNameChanged;           // Name changing event @EDITOR_IGNORE\n\n    public:\n        struct MakePrototypeCloneVisitor: SourceToTargetMapCloneVisitor\n        {\n            void OnCopyActor(const Actor* source, Actor* target) override;\n            void OnCopyComponent(const Component* source, Component* target) override;\n        };\n\n    public:\n        // Sets locking. Locked actor can't be selected in editor scene view. But is can be selected in scene tree\n        void SetLocked(bool locked) OPTIONAL_OVERRIDE;\n\n        // Locks actor. Locked actor can't be selected in editor scene view. But is can be selected in scene tree\n        void Lock();\n\n        // Unlocks actor. Locked actor can't be selected in editor scene view. But is can be selected in scene tree\n        void Unlock();\n\n        // Returns is actor locked. Locked actor can't be selected in editor scene view. But is can be selected in scene tree\n        bool IsLocked() const OPTIONAL_OVERRIDE;\n\n        // Returns is actor locked in hierarchy. Locked actor can't be selected in editor scene view. But is can be selected in scene tree\n        bool IsLockedInHierarchy() const OPTIONAL_OVERRIDE;\n\n        // Breaks link to prototype\n        void BreakPrototypeLink();\n\n        // Applies all changes to prototype and saves it\n        void ApplyChangesToPrototype();\n\n        // Reverts all properties to prototype\n        void RevertToPrototype();\n\n        // Makes prototype asset from this actor and links this to new asset\n        AssetRef<ActorAsset> MakePrototype();\n\n        // Returns is this linked to specified actor with depth links search\n        bool IsLinkedToActor(const Ref<Actor>& actor) const;\n\n        // Searches actor in this, what linked to linkActor\n        Ref<Actor> FindLinkedActor(const Ref<Actor>& linkActor);\n\n        // Returns pointer to owner editable object\n        Ref<SceneEditableObject> GetEditableOwner() override;\n\n        // Returns object's link to prototype\n        Ref<SceneEditableObject> GetEditableLink() const override;\n\n        // Returns list of object's children\n        Vector<Ref<SceneEditableObject>> GetEditableChildren() const override;\n\n        // Returns object's parent object. Return nullptr when it is a root scene object\n        Ref<SceneEditableObject> GetEditableParent() const override;\n\n        // Sets parent object. nullptr means make this object as root. idx is place in parent children. idx == -1 means last\n        void SetEditableParent(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n        // Adds child. idx is place in parent children. idx == -1 means last\n        void AddEditableChild(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n        // Returns is that type of object can be enabled and disabled\n        bool IsSupportsDisabling() const override;\n\n        // Returns is that type of object can be locked\n        bool IsSupportsLocking() const override;\n\n        // Returns is that type of object can be transformed\n        bool IsSupportsTransforming() const override;\n\n        // Returns transform, override when it's supports\n        Basis GetTransform() const override;\n\n        // Sets transform of object, override when it's supports\n        void SetTransform(const Basis& transform) override;\n\n        // Returns is object supports pivot \n        bool IsSupportsPivot() const override;\n\n        // Sets transform pivot point\n        void SetPivot(const Vec2F& pivot) override;\n\n        // Returns transform pivot\n        Vec2F GetPivot() const override;\n\n        // Called when some changed in actor\n        void OnChanged() override;\n\n        // Called when actor's locking was changed\n        void OnLockChanged() override;\n\n        // Called when actor's name was changed\n        void OnNameChanged() override;\n\n        // Called when actor's parent was changed\n        void OnEditableParentChanged(const Ref<SceneEditableObject>& oldParent) override;\n\n    protected:\n        bool mLocked = false;    // Is actor locked @SERIALIZABLE\n        bool mResLocked = false; // Is actor locked in hierarchy @SERIALIZABLE\n\n    protected:\n        // Applies basic actor fields and transform from source to dest  \n        void CopyActorChangedFields(Actor* source, Actor* changed, Actor* dest, Vector<Actor*>& allDestChilds, bool withTransform);\n\n        // Separates children actors to linear array, removes child and parent links\n        void SeparateActors(Vector<Ref<Actor>>& separatedActors);\n\n        // Processes reverting actor\n        void ProcessReverting(Actor* dest, const Actor* source, const Vector<Ref<Actor>>& separatedActors,\n                              Vector<Actor**>& actorsPointers, Vector<Component**>& componentsPointers,\n                              Map<const Actor*, Actor*>& actorsMap,\n                              Map<const Component*, Component*>& componentsMap,\n                              Vector<ISerializable*>& serializableObjects);\n\n        // Copies fields from source to dest\n        void CopyFields(Vector<const FieldInfo*>& fields, IObject* source, IObject* dest,\n                        Vector<Actor**>& actorsPointers,\n                        Vector<Component**>& componentsPointers,\n                        Vector<ISerializable*>& serializableObjects);\n\n        // Collects fixing actors and components pointers in new component\n        void CollectFixingFields(Component* newComponent, Vector<Component**>& componentsPointers,\n                                 Vector<Actor**>& actorsPointers);\n\n        // Fixes actors and components pointers by actors map\n        void FixComponentFieldsPointers(const Vector<Actor**>& actorsPointers,\n                                        const Vector<Component**>& componentsPointers,\n                                        const Map<const Actor*, Actor*>& actorsMap,\n                                        const Map<const Component*, Component*>& componentsMap);\n\n        // Collects component field, except Component class fields\n        void GetComponentFields(const Ref<Component>& component, Vector<const FieldInfo*>& fields);\n\n        // Collects differences between this and prototype\n        virtual void GetDifferences(ActorDifferences& differences) const OPTIONAL_OVERRIDE;\n\n        // Called before making prototype from this object\n        void BeginMakePrototype() const override;\n\n        // Called before instantiate from this object\n        void BeginInstantiatePrototype() const override;\n\n        // Not using prototype setter\n        void SetProtytypeDummy(AssetRef<ActorAsset> asset);\n\n        // Updates locking\n        void UpdateLocking();\n\n#endif // IS_EDITOR\n\n        friend class ActorAsset;\n        friend class ActorRefResolver;\n        friend class ActorTransform;\n        friend class BaseActorLinkRef;\n        friend class BaseComponentLinkRef;\n        friend class Component;\n        friend class Component;\n        friend class ISceneDrawable;\n        friend class Scene;\n        friend class Tag;\n        friend class Widget;\n\n        template<typename _type>\n        friend RefCounter* GetRefCounterImpl(_type* ptr);\n\n        FRIEND_REF_MAKE();\n    };\n}\n\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/ActorRefResolver.h\"\n\nnamespace o2\n{\n    template<typename _type>\n    Ref<_type> Actor::FindChildByType(bool searchInChildren /*= true*/) const\n    {\n        for (auto& child : mChildren)\n        {\n            if (auto castedChild = DynamicCast<_type>(child))\n                return castedChild;\n        }\n\n        if (searchInChildren)\n        {\n            for (auto& child : mChildren)\n            {\n                if (auto res = child->FindChildByType<_type>())\n                    return res;\n            }\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    Ref<_type> Actor::GetChildByType(const String& path) const\n    {\n        return DynamicCast<_type>(GetChild(path));\n    }\n\n    template<typename _type>\n    Ref<_type> Actor::FindChildByTypeAndName(const String& name) const\n    {\n        return DynamicCast<_type>(FindChild(name));\n    }\n\n    template<typename _type>\n    Vector<Ref<_type>> Actor::GetComponentsInChildren() const\n    {\n        auto res = GetComponents<_type>();\n\n        for (auto& child : mChildren)\n            res.Add(child->GetComponentsInChildren<_type>());\n\n        return res;\n    }\n\n    template<typename _type>\n    Ref<_type> Actor::GetComponentInChildren() const\n    {\n        auto res = GetComponent<_type>();\n\n        if (res)\n            return res;\n\n        for (auto& child : mChildren)\n        {\n            res = child->GetComponentInChildren<_type>();\n            if (res)\n                return res;\n        }\n\n        return res;\n    }\n\n    template<typename _type>\n    Ref<_type> Actor::GetComponent() const\n    {\n        for (auto& comp : mComponents)\n        {\n            if (comp->GetType().IsBasedOn(TypeOf(_type)))\n                return DynamicCast<_type>(comp);\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    Vector<Ref<_type>> Actor::GetComponents() const\n    {\n        Vector<Ref<_type>> res;\n        for (auto& comp : mComponents)\n        {\n            if (auto typeComp = DynamicCast<_type>(comp))\n                res.Add(typeComp);\n        }\n\n        return res;\n    }\n\n    template<typename _type>\n    Ref<_type> Actor::AddComponent()\n    {\n        if (GetComponent<_type>() != nullptr)\n            return nullptr;\n\n        auto newComponent = mmake<_type>();\n        AddComponent(newComponent);\n\n        return newComponent;\n    }\n\n    template<typename _type>\n    Vector<Ref<_type>> Component::GetComponentsInChildren() const\n    {\n        if (mOwner)\n            return mOwner.Lock()->template GetComponentsInChildren<_type>();\n\n        return {};\n    }\n\n    template<typename _type>\n    Vector<Ref<_type>> Component::GetComponents() const\n    {\n        if (mOwner)\n            return mOwner.Lock()->GetComponents();\n\n        return {};\n    }\n\n    template<typename _type>\n    Ref<_type> Component::GetComponentInChildren() const\n    {\n        if (mOwner)\n            return mOwner.Lock()->template GetComponentInChildren<_type>();\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    Ref<_type> Component::GetComponent() const\n    {\n        if (mOwner)\n            return mOwner.Lock()->template GetComponent<_type>();\n\n        return nullptr;\n    }\n}\n// --- META ---\n\nPRE_ENUM_META(o2::Actor::State);\n\nCLASS_BASES_META(o2::Actor)\n{\n    BASE_CLASS(o2::ActorBase);\n    BASE_CLASS(o2::ISceneDrawable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Actor)\n{\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(prototype);\n    FIELD().PUBLIC().NAME(id);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().NAME(name);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().NAME(enabled);\n    FIELD().PUBLIC().NAME(enabledInHierarchy);\n    FIELD().PUBLIC().NAME(children);\n    FIELD().PUBLIC().NAME(components);\n    FIELD().PUBLIC().NAME(child);\n    FIELD().PUBLIC().NAME(component);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(tags);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().NAME(transform);\n    FIELD().PROTECTED().NAME(mId);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mName);\n    FIELD().PROTECTED().EDITOR_IGNORE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mSceneLayer);\n    FIELD().PROTECTED().NAME(mPrototype);\n    FIELD().PROTECTED().NAME(mPrototypeLink);\n    FIELD().PROTECTED().NAME(mParent);\n    FIELD().PROTECTED().NAME(mChildren);\n    FIELD().PROTECTED().NAME(mComponents);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mResEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mResEnabledInHierarchy);\n    FIELD().PROTECTED().DEFAULT_VALUE(State::Default).NAME(mState);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsOnScene);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsAsset);\n    FIELD().PROTECTED().NAME(mAssetId);\n    FIELD().PROTECTED().NAME(mCopyVisitor);\n#if  IS_EDITOR\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(locked);\n    FIELD().PUBLIC().NAME(lockedInHierarchy);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onEnableChanged);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onChanged);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onParentChanged);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onChildHierarchyChanged);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onLockChanged);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onNameChanged);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mLocked);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mResLocked);\n#endif\n}\nEND_META;\nCLASS_METHODS_META(o2::Actor)\n{\n\n    typedef Map<String, Ref<Actor>> _tmp1;\n    typedef Map<String, Ref<Component>> _tmp2;\n    typedef Map<const Actor*, Actor*>& _tmp3;\n    typedef Map<const Component*, Component*>& _tmp4;\n    typedef const Map<const Actor*, Actor*>& _tmp5;\n    typedef const Map<const Component*, Component*>& _tmp6;\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(RefCounter*, ActorCreateMode);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AssetRef<ActorAsset>&, ActorCreateMode);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, Vector<Ref<Component>>, ActorCreateMode);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Actor&, ActorCreateMode);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Actor&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Destroy);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, FixedUpdate, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, UpdateChildren, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, FixedUpdateChildren, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, UpdateTransform);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, UpdateChildrenTransforms);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(SceneUID, GetID);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetID, SceneUID);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, GenerateNewID, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(UID, GetAssetID);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPrototype, AssetRef<ActorAsset>);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(AssetRef<ActorAsset>, GetPrototype);\n    FUNCTION().PUBLIC().SIGNATURE(AssetRef<ActorAsset>, GetPrototypeDirectly);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Actor>, GetPrototypeLink);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayer, const Ref<SceneLayer>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetLayer, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const Ref<SceneLayer>&, GetLayer);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, AddToScene);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveFromScene, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsOnScene);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetEnabled, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Enable);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Disable);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsEnabled);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsResEnabled);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsEnabledInHierarchy);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetParent, const Ref<Actor>&, bool, int);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const WeakRef<Actor>&, GetParent);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetIndexInSiblings, int);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Actor>, AddChild, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, AddChildren, const Vector<Ref<Actor>>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Actor>, AddChild, const Ref<Actor>&, int);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Actor>, GetChild, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Actor>, FindChild, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Actor>, FindChild, const Function<bool(const Ref<Actor>& child)>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const Vector<Ref<Actor>>&, GetChildren);\n    FUNCTION().PUBLIC().SIGNATURE(void, GetAllChildrenActors, Vector<Ref<Actor>>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveChild, const Ref<Actor>&, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveAllChildren);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Actor>, FindActorById, SceneUID);\n    FUNCTION().PUBLIC().SIGNATURE(void, ForEachActor, const Function<bool(Actor&)>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Component>, AddComponent, const Ref<Component>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveComponent, const Ref<Component>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveAllComponents);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Component>, GetComponent, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Component>, GetComponent, const Type*);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Component>, GetComponent, SceneUID);\n#if  IS_SCRIPTING_SUPPORTED\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Component>, GetComponent, const ScriptValue&);\n#endif\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const Vector<Ref<Component>>&, GetComponents);\n    FUNCTION().PUBLIC().SIGNATURE(void, SerializeBasicOverride, DataValue&);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeserializeBasicOverride, const DataValue&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(void, SetDefaultCreationMode, ActorCreateMode);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(ActorCreateMode, GetDefaultCreationMode);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsModeOnScene, ActorCreateMode);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().CONSTRUCTOR(RefCounter*, ActorTransform*, bool, const String&, bool, SceneUID, UID);\n    FUNCTION().PROTECTED().CONSTRUCTOR(RefCounter*, ActorTransform*, ActorCreateMode);\n    FUNCTION().PROTECTED().CONSTRUCTOR(RefCounter*, ActorTransform*, const AssetRef<ActorAsset>&, ActorCreateMode);\n    FUNCTION().PROTECTED().CONSTRUCTOR(RefCounter*, ActorTransform*, Vector<Ref<Component>>, ActorCreateMode);\n    FUNCTION().PROTECTED().CONSTRUCTOR(RefCounter*, ActorTransform*, const Actor&, ActorCreateMode);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckCopyVisitorFinalization);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawComponents);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostDrawComponents);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateResEnabled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateResEnabledInHierarchy, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, SerializeRaw, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeserializeRaw, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SerializeWithProto, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeserializeWithProto, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<SceneLayer>, GetSceneDrawableSceneLayer);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<ISceneDrawable>, GetParentDrawable);\n    FUNCTION().PROTECTED().SIGNATURE(int, GetIndexInParentDrawable);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp1, GetAllChilds);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp2, GetAllComponents);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnBeforeDestroy);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnInitialized);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStart);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDestroy);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFixedUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnParentChanged, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildrenChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildAdded, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildRemoved, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentAdded, const Ref<Component>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentRemoving, const Ref<Component>&);\n#if  IS_SCRIPTING_SUPPORTED\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(ActorTransform*, GetTransform);\n#endif\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLocked, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Lock);\n    FUNCTION().PUBLIC().SIGNATURE(void, Unlock);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLocked);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLockedInHierarchy);\n    FUNCTION().PUBLIC().SIGNATURE(void, BreakPrototypeLink);\n    FUNCTION().PUBLIC().SIGNATURE(void, ApplyChangesToPrototype);\n    FUNCTION().PUBLIC().SIGNATURE(void, RevertToPrototype);\n    FUNCTION().PUBLIC().SIGNATURE(AssetRef<ActorAsset>, MakePrototype);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLinkedToActor, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Actor>, FindLinkedActor, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableOwner);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableLink);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<SceneEditableObject>>, GetEditableChildren);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableParent);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEditableParent, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEditableChild, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsDisabling);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsLocking);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsTransforming);\n    FUNCTION().PUBLIC().SIGNATURE(Basis, GetTransform);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTransform, const Basis&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsPivot);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPivot, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetPivot);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnLockChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnNameChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnEditableParentChanged, const Ref<SceneEditableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CopyActorChangedFields, Actor*, Actor*, Actor*, Vector<Actor*>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, SeparateActors, Vector<Ref<Actor>>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, ProcessReverting, Actor*, const Actor*, const Vector<Ref<Actor>>&, Vector<Actor**>&, Vector<Component**>&, _tmp3, _tmp4, Vector<ISerializable*>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CopyFields, Vector<const FieldInfo*>&, IObject*, IObject*, Vector<Actor**>&, Vector<Component**>&, Vector<ISerializable*>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CollectFixingFields, Component*, Vector<Component**>&, Vector<Actor**>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, FixComponentFieldsPointers, const Vector<Actor**>&, const Vector<Component**>&, _tmp5, _tmp6);\n    FUNCTION().PROTECTED().SIGNATURE(void, GetComponentFields, const Ref<Component>&, Vector<const FieldInfo*>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, GetDifferences, ActorDifferences&);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginMakePrototype);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginInstantiatePrototype);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetProtytypeDummy, AssetRef<ActorAsset>);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLocking);\n#endif\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ActorCreationMode.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ActorCreationMode.h\"\n\n#include \"o2/Utils/Reflection/Type.h\"\n// --- META ---\n\nENUM_META(o2::ActorCreateMode, o2__ActorCreateMode)\n{\n    ENUM_ENTRY(Default);\n    ENUM_ENTRY(InScene);\n    ENUM_ENTRY(NotInScene);\n}\nEND_ENUM_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ActorCreationMode.h",
    "content": "#pragma once\n#include \"o2/Utils/Reflection/Enum.h\"\n\nnamespace o2\n{\n    enum class ActorCreateMode { InScene, NotInScene, Default };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::ActorCreateMode);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ActorEditor.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Actor.h\"\n\n#include \"o2/Scene/ActorRefResolver.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Utils/Editor/ActorDifferences.h\"\n#include \"o2/Utils/Editor/Attributes/PrototypeDeltaSearchAttribute.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n\n#if IS_EDITOR\n\nnamespace o2\n{\n    void Actor::MakePrototypeCloneVisitor::OnCopyActor(const Actor* source, Actor* target)\n    {\n        SourceToTargetMapCloneVisitor::OnCopyActor(source, target);\n        target->mPrototypeLink = source->mPrototypeLink;\n        const_cast<Actor*>(source)->mPrototypeLink = Ref(target);\n    }\n\n    void Actor::MakePrototypeCloneVisitor::OnCopyComponent(const Component* source, Component* target)\n    {\n        SourceToTargetMapCloneVisitor::OnCopyComponent(source, target);\n        target->mPrototypeLink = source->mPrototypeLink;\n        const_cast<Component*>(source)->mPrototypeLink = Ref(target);\n    }\n\n    void Actor::SetProtytypeDummy(AssetRef<ActorAsset> asset)\n    {}\n\n    void Actor::BreakPrototypeLink()\n    {\n        if (!mPrototype && !mPrototypeLink)\n            return;\n\n        SetPrototype(AssetRef<ActorAsset>());\n\n        // remove from cache\n\n        for (auto& child : mChildren)\n            child->BreakPrototypeLink();\n\n        for (auto& component : mComponents)\n            component->mPrototypeLink = nullptr;\n\n        OnChanged();\n    }\n\n    void Actor::RevertToPrototype()\n    {\n        if (!mPrototypeLink)\n            return;\n\n        Vector<Ref<Actor>> separatedActors;\n        SeparateActors(separatedActors);\n\n        for (auto it = separatedActors.Begin(); it != separatedActors.End();)\n        {\n            if ((*it)->mPrototypeLink)\n                ++it;\n            else\n                it = separatedActors.Remove(it);\n        }\n\n        Vector<Actor**> actorPointersFields;\n        Vector<Component**> componentPointersFields;\n        Map<const Actor*, Actor*> actorsMap;\n        Map<const Component*, Component*> componentsMap;\n        Vector<ISerializable*> serializableObjects;\n\n        ProcessReverting(this, mPrototypeLink.Lock().Get(), separatedActors, actorPointersFields, componentPointersFields, actorsMap,\n                         componentsMap, serializableObjects);\n\n        FixComponentFieldsPointers(actorPointersFields, componentPointersFields, actorsMap, componentsMap);\n\n        UpdateResEnabledInHierarchy();\n        transform->SetDirty();\n\n        OnChanged();\n    }\n\n    AssetRef<ActorAsset> Actor::MakePrototype()\n    {\n        mCopyVisitor = mmake<MakePrototypeCloneVisitor>();\n        auto prototype = CloneAsRef<Actor>();\n\n        AssetRef<ActorAsset> prototypeAsset = AssetRef<ActorAsset>::CreateAsset(prototype);\n        SetPrototype(prototypeAsset);\n\n        prototype->UpdateResEnabledInHierarchy();\n        prototype->UpdateTransform();\n        prototype->OnChanged();\n\n        return prototypeAsset;\n    }\n\n    void Actor::SeparateActors(Vector<Ref<Actor>>& separatedActors)\n    {\n        for (auto& child : mChildren)\n        {\n            child->mParent = nullptr;\n            separatedActors.Add(child);\n\n            child->SeparateActors(separatedActors);\n        }\n\n        mChildren.Clear();\n    }\n\n    void Actor::ApplyChangesToPrototype()\n    {\n        if (!mPrototype)\n            return;\n\n        // Get difference between this actor and prototype first\n        auto diffs = ActorDifferences::GetDifference(Ref(this), mPrototype->GetActor());\n\n        // Get applying actors infos\n        ApplyActorInfo prototypeApplyInfo(mPrototype->GetActor());\n        ApplyActorInfo thisApplyInfo(Ref(this));\n        Vector<ApplyActorInfo> linkedActorsApplyInfos;\n\n        auto& linkedActors = o2Scene.mPrototypeLinksCache[mPrototype];\n        linkedActorsApplyInfos.Reserve(linkedActors.Count());\n        linkedActors.ForEach([&](auto x) { if (x != this) linkedActorsApplyInfos.Add(ApplyActorInfo(x.Lock())); });\n    \n        // Apply differences\n        diffs.newChildren.ForEach([&](auto d) { d->Apply(thisApplyInfo, prototypeApplyInfo, linkedActorsApplyInfos); });\n        diffs.movedChildren.ForEach([&](auto d) { d->Apply(thisApplyInfo, prototypeApplyInfo, linkedActorsApplyInfos); });\n        diffs.newComponents.ForEach([&](auto d) { d->Apply(thisApplyInfo, prototypeApplyInfo, linkedActorsApplyInfos); });\n        diffs.changedActorFields.ForEach([&](auto d) { d->Apply(thisApplyInfo, prototypeApplyInfo, linkedActorsApplyInfos); });\n        diffs.changedComponentFields.ForEach([&](auto d) { d->Apply(thisApplyInfo, prototypeApplyInfo, linkedActorsApplyInfos); });\n        diffs.removedComponents.ForEach([&](auto d) { d->Apply(thisApplyInfo, prototypeApplyInfo, linkedActorsApplyInfos); });\n        diffs.removedChildren.ForEach([&](auto d) { d->Apply(thisApplyInfo, prototypeApplyInfo, linkedActorsApplyInfos); });\n\n        // Invoke changed callback for actors and save assets\n        for (auto& info : linkedActorsApplyInfos)\n        {\n            info.actor->OnChanged();\n            info.actor->UpdateTransform();\n\n            if (info.actor->IsAsset())\n            {\n                AssetRef<ActorAsset> asset(info.actor->GetAssetID());\n                if (info.actor != asset->GetActor())\n                    asset->SetActor(info.actor);\n\n                asset->Save();\n            }\n        }\n\n        // Save prototype\n        mPrototype->GetActor()->UpdateTransform();\n        mPrototype->GetActor()->OnChanged();\n        mPrototype->Save();\n\n        OnChanged();\n    }\n\n    void Actor::GetDifferences(ActorDifferences& differences) const\n    {\n        Vector<const FieldInfo*> stack;\n        stack.Add(GetType().GetField(\"transform\"));\n\n        auto createActorChangedFieldDiff = [&](const String& fieldPath) {\n            auto diff = mmake<ActorDifferences::ChangedObjectField>();\n            diff->prototypeLink = mPrototypeLink.Lock();\n            diff->path = fieldPath;\n            differences.changedActorFields.Add(diff);\n        };\n\n        ActorDifferences::GetObjectDifferences(createActorChangedFieldDiff, stack, transform->GetType(), transform, mPrototypeLink.Lock()->transform);\n    }\n\n    void Actor::BeginMakePrototype() const\n    {\n        mCopyVisitor = mmake<MakePrototypeCloneVisitor>();\n    }\n\n    void Actor::BeginInstantiatePrototype() const\n    {\n        mCopyVisitor = mmake<InstantiatePrototypeCloneVisitor>();\n    }\n\n    bool Actor::IsLinkedToActor(const Ref<Actor>& actor) const\n    {\n        if (mPrototypeLink)\n        {\n            auto t = mPrototypeLink.Lock().Get();\n            while (t)\n            {\n                if (t == actor.Get())\n                    return true;\n\n                t = t->mPrototypeLink.Lock().Get();\n            }\n        }\n\n        return false;\n    }\n\n    Ref<Actor> Actor::FindLinkedActor(const Ref<Actor>& linkActor)\n    {\n        if (GetPrototypeLink() == linkActor)\n            return Ref(this);\n\n        for (auto& child : mChildren)\n        {\n            if (auto res = child->FindLinkedActor(linkActor))\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    bool Actor::IsSupportsLocking() const\n    {\n        return true;\n    }\n\n    void Actor::SetLocked(bool locked)\n    {\n        mLocked = locked;\n        UpdateLocking();\n\n        OnLockChanged();\n    }\n\n    void Actor::Lock()\n    {\n        SetLocked(true);\n    }\n\n    void Actor::Unlock()\n    {\n        SetLocked(false);\n    }\n\n    bool Actor::IsLocked() const\n    {\n        return mLocked;\n    }\n\n    bool Actor::IsLockedInHierarchy() const\n    {\n        return mResLocked;\n    }\n\n    void Actor::UpdateLocking()\n    {\n        bool lastResLocked = mResLocked;\n\n        if (mParent)\n            mResLocked = mLocked || mParent.Lock()->mResLocked;\n        else\n            mResLocked = mLocked;\n\n        if (lastResLocked != mResLocked)\n            OnLockChanged();\n\n        for (auto& child : mChildren)\n            child->UpdateLocking();\n    }\n\n    bool Actor::IsSupportsTransforming() const\n    {\n        return true;\n    }\n\n    Basis Actor::GetTransform() const\n    {\n        return transform->GetWorldBasis();\n    }\n\n    void Actor::SetTransform(const Basis& transform)\n    {\n        this->transform->SetWorldBasis(transform);\n    }\n\n    bool Actor::IsSupportsPivot() const\n    {\n        return true;\n    }\n\n    void Actor::SetPivot(const Vec2F& pivot)\n    {\n        transform->SetWorldPivot(pivot);\n    }\n\n    Vec2F Actor::GetPivot() const\n    {\n        return transform->GetWorldPivot();\n    }\n\n    void Actor::AddEditableChild(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {\n        if (auto actor = DynamicCast<Actor>(object))\n        {\n            if (idx >= 0)\n                AddChild(actor, idx);\n            else\n                AddChild(actor);\n        }\n    }\n\n    bool Actor::IsSupportsDisabling() const\n    {\n        return true;\n    }\n\n    Vector<Ref<SceneEditableObject>> Actor::GetEditableChildren() const\n    {\n        Vector<Ref<SceneEditableObject>> res;\n        for (auto& child : mChildren) {\n            res.Add(DynamicCast<SceneEditableObject>(child));\n        }\n\n        return res;\n    }\n\n    void Actor::SetEditableParent(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {\n        SetParent(DynamicCast<Actor>(object), false, idx);\n    }\n\n    Ref<SceneEditableObject> Actor::GetEditableOwner()\n    {\n        return Ref(this);\n    }\n\n    Ref<SceneEditableObject> Actor::GetEditableLink() const\n    {\n        return Ref(const_cast<Actor*>(mPrototypeLink.Lock().Get()));\n    }\n\n    Ref<SceneEditableObject> Actor::GetEditableParent() const\n    {\n        return mParent.Lock();\n    }\n\n    void Actor::OnChanged()\n    {\n        onChanged();\n\n        if (Scene::IsSingletonInitialzed() && IsOnScene() && mState != State::Destroyed && mState != State::Destroying)\n            o2Scene.OnObjectChanged(Ref(this));\n    }\n\n    void Actor::OnLockChanged()\n    {\n        onLockChanged(mLocked);\n        onChanged();\n\n        if (Scene::IsSingletonInitialzed() && IsOnScene())\n        {\n            o2Scene.OnObjectChanged(Ref(this));\n            o2Scene.onLockChanged(Ref(this));\n        }\n    }\n\n    void Actor::OnNameChanged()\n    {\n        onNameChanged();\n        onChanged();\n\n        if (Scene::IsSingletonInitialzed() && IsOnScene())\n        {\n            o2Scene.OnObjectChanged(Ref(this));\n            o2Scene.onNameChanged(Ref(this));\n        }\n    }\n\n    void Actor::OnEditableParentChanged(const Ref<SceneEditableObject>& oldParent)\n    {\n        OnParentChanged(DynamicCast<Actor>(oldParent));\n    }\n\n    void Actor::OnChildrenChanged()\n    {\n        for (auto& comp : mComponents)\n            comp->OnChildrenChanged();\n\n        onChildHierarchyChanged();\n        onChanged();\n\n        if (Scene::IsSingletonInitialzed() && IsOnScene())\n        {\n            o2Scene.OnObjectChanged(Ref(this));\n            o2Scene.onChildrenHierarchyChanged(Ref(this));\n        }\n    }\n\n    void Actor::OnParentChanged(const Ref<Actor>& oldParent)\n    {\n        ISceneDrawable::OnDrawbleParentChanged();\n\n        for (auto& comp : mComponents)\n            comp->OnParentChanged(oldParent);\n\n        onParentChanged(oldParent);\n        onChanged();\n\n        if (Scene::IsSingletonInitialzed() && IsOnScene())\n        {\n            o2Scene.OnObjectChanged(Ref(this));\n            o2Scene.OnObjectChanged(oldParent);\n            o2Scene.OnObjectChanged(mParent.Lock());\n\n            o2Scene.onChildrenHierarchyChanged(oldParent);\n            o2Scene.onChildrenHierarchyChanged(mParent.Lock());\n        }\n    }\n\n    void Actor::ProcessReverting(Actor* dest, const Actor* source, const Vector<Ref<Actor>>& separatedActors,\n                                 Vector<Actor**>& actorsPointers, Vector<Component**>& componentsPointers,\n                                 Map<const Actor*, Actor*>& actorsMap,\n                                 Map<const Component*, Component*>& componentsMap,\n                                 Vector<ISerializable*>& serializableObjects)\n    {\n        dest->mName = source->mName;\n        dest->mEnabled = source->mEnabled;\n        *dest->transform = *source->transform;\n        dest->mAssetId = source->mAssetId;\n\n        actorsMap.Add(source, dest);\n\n        for (auto& child : source->mChildren)\n        {\n            Ref<Actor> newChild;\n\n            newChild = separatedActors.FindOrDefault([&](const Ref<Actor>& x) { return x->GetPrototypeLink() == child; });\n\n            if (!newChild)\n                newChild = mmake<Actor>(dest->IsOnScene() ? ActorCreateMode::InScene : ActorCreateMode::NotInScene);\n\n            dest->AddChild(newChild);\n\n            ProcessReverting(newChild.Get(), child.Get(), separatedActors, actorsPointers, componentsPointers, actorsMap,\n                             componentsMap, serializableObjects);\n        }\n\n        for (auto it = dest->mComponents.Begin(); it != dest->mComponents.End();)\n        {\n            if (!(*it)->mPrototypeLink)\n            {\n                (*it)->mOwner = nullptr;\n                it = dest->mComponents.Remove(it);\n            }\n            else ++it;\n        }\n\n        for (auto& component : source->mComponents)\n        {\n            auto matchingComponent = dest->mComponents.FindOrDefault([&](const Ref<Component>& x) { return x->GetPrototypeLink() == component; });\n            if (matchingComponent)\n            {\n                Vector<const FieldInfo*> fields;\n                GetComponentFields(matchingComponent, fields);\n\n                CopyFields(fields, const_cast<Component*>(component.Get()), matchingComponent.Get(), actorsPointers, componentsPointers,\n                           serializableObjects);\n\n                continue;\n            }\n\n            auto newComponent = dest->AddComponent(CloneAsRef<Component>());\n            componentsMap.Add(component.Get(), newComponent.Get());\n\n            CollectFixingFields(newComponent.Get(), componentsPointers, actorsPointers);\n        }\n    }\n\n    void Actor::CopyFields(Vector<const FieldInfo*>& fields, IObject* source, IObject* dest, Vector<Actor**>& actorsPointers,\n                           Vector<Component**>& componentsPointers, Vector<ISerializable*>& serializableObjects)\n    {\n        for (auto& field : fields)\n        {\n            if (!field->HasAttribute<SerializableAttribute>())\n                continue;\n\n            if (*field->GetType() == TypeOf(Actor*))\n            {\n                Actor* sourceValue = field->GetValue<Actor*>(source);\n                Actor** destValuePtr = (Actor**)(field->GetValuePtrStrong(dest));\n\n                *destValuePtr = sourceValue;\n                actorsPointers.Add(destValuePtr);\n            }\n            else if (*field->GetType() == TypeOf(Component*))\n            {\n                Component* sourceValue = field->GetValue<Component*>(source);\n                Component** destValuePtr = (Component**)(field->GetValuePtrStrong(dest));\n\n                *destValuePtr = sourceValue;\n                componentsPointers.Add(destValuePtr);\n            }\n            else if (field->GetType()->IsBasedOn(TypeOf(AssetRef<Asset>)))\n            {\n                field->CopyValue(dest, source);\n            }\n            else if (field->GetType()->IsBasedOn(TypeOf(IObject)))\n            {\n                if (field->GetType()->IsBasedOn(TypeOf(ISerializable)))\n                    serializableObjects.Add((ISerializable*)field->GetValuePtr(dest));\n\n                auto fields = field->GetType()->GetFieldsWithBaseClasses();\n                CopyFields(fields, (IObject*)field->GetValuePtr(source),\n                           (IObject*)field->GetValuePtr(dest),\n                           actorsPointers, componentsPointers, serializableObjects);\n            }\n            else field->CopyValue(dest, source);\n        }\n    }\n\n    void Actor::CollectFixingFields(Component* newComponent, Vector<Component**>& componentsPointers,\n                                    Vector<Actor**>& actorsPointers)\n    {\n        Vector<const FieldInfo*> fields;\n        GetComponentFields(Ref(newComponent), fields);\n\n        for (auto& field : fields)\n        {\n            if (field->GetType()->GetUsage() == Type::Usage::Pointer)\n            {\n                const PointerType* fieldType = (const PointerType*)field->GetType();\n\n                if (fieldType->GetBaseType()->IsBasedOn(TypeOf(Component)))\n                    componentsPointers.Add((Component**)(field->GetValuePtrStrong(newComponent)));\n\n                if (*fieldType == TypeOf(Actor*))\n                    actorsPointers.Add((Actor**)(field->GetValuePtrStrong(newComponent)));\n            }\n        }\n    }\n\n    void Actor::FixComponentFieldsPointers(const Vector<Actor**>& actorsPointers,\n                                           const Vector<Component**>& componentsPointers,\n                                           const Map<const Actor*, Actor*>& actorsMap,\n                                           const Map<const Component*, Component*>& componentsMap)\n    {\n        for (auto& actorPtr : actorsPointers)\n        {\n            Actor* newActorPtr;\n            if (actorsMap.TryGetValue(*actorPtr, newActorPtr))\n                *actorPtr = newActorPtr;\n        }\n\n        for (auto& componentPtr : componentsPointers)\n        {\n            Component* newComponentPtr;\n            if (componentsMap.TryGetValue(*componentPtr, newComponentPtr))\n                *componentPtr = newComponentPtr;\n        }\n    }\n\n    void Actor::GetComponentFields(const Ref<Component>& component, Vector<const FieldInfo*>& fields)\n    {\n        struct helper\n        {\n            static void GetFields(const Type* type, Vector<const FieldInfo*>& fields)\n            {\n                fields.Add(type->GetFields().Convert<const FieldInfo*>([](const auto& x) { return &x; }));\n\n                for (auto& baseType : type->GetBaseTypes())\n                {\n                    if (*baseType.type != TypeOf(Component))\n                        GetFields(baseType.type, fields);\n                }\n            }\n        };\n\n        helper::GetFields(&component->GetType(), fields);\n    }\n\n    void Actor::CopyActorChangedFields(Actor* source, Actor* changed, Actor* dest, Vector<Actor*>& allDestChilds,\n                                       bool withTransform)\n    {\n        if (changed->mParent && changed->mParent.Lock()->mPrototypeLink)\n        {\n            auto changedParent = changed->mParent.Lock();\n            auto destParent = dest->mParent.Lock();\n            auto sourceParent = source->mParent.Lock();\n\n            if (!changedParent->IsLinkedToActor(sourceParent) && dest->mParent &&\n                destParent->IsLinkedToActor(sourceParent))\n            {\n                Actor* newParent = allDestChilds.FindOrDefault([&](Actor* x) { return x->IsLinkedToActor(Ref(changedParent->mPrototypeLink.Lock().Get())); });\n                dest->SetParent(Ref(newParent));\n            }\n        }\n\n        if (source->mName != changed->mName && dest->mName == source->mName)\n            dest->mName = changed->mName;\n\n        if (source->mEnabled != changed->mEnabled && dest->mEnabled == source->mEnabled)\n            dest->mEnabled = changed->mEnabled;\n\n        if (source->mLocked != changed->mLocked && dest->mLocked == source->mLocked)\n            dest->mLocked = changed->mLocked;\n\n        // transform\n        if (withTransform)\n        {\n            if (source->transform->mData->position != changed->transform->mData->position &&\n                dest->transform->mData->position == source->transform->mData->position)\n            {\n                dest->transform->mData->position = changed->transform->mData->position;\n            }\n\n            if (source->transform->mData->scale != changed->transform->mData->scale &&\n                dest->transform->mData->scale == source->transform->mData->scale)\n            {\n                dest->transform->mData->scale = changed->transform->mData->scale;\n            }\n\n            if (source->transform->mData->size != changed->transform->mData->size &&\n                dest->transform->mData->size == source->transform->mData->size)\n            {\n                dest->transform->mData->size = changed->transform->mData->size;\n            }\n\n            if (source->transform->mData->pivot != changed->transform->mData->pivot &&\n                dest->transform->mData->pivot == source->transform->mData->pivot)\n            {\n                dest->transform->mData->pivot = changed->transform->mData->pivot;\n            }\n\n            if (!Math::Equals(source->transform->mData->angle, changed->transform->mData->angle) &&\n                Math::Equals(dest->transform->mData->angle, source->transform->mData->angle))\n            {\n                dest->transform->mData->angle = changed->transform->mData->angle;\n            }\n\n            if (!Math::Equals(source->transform->mData->shear, changed->transform->mData->shear) &&\n                Math::Equals(dest->transform->mData->shear, source->transform->mData->shear))\n            {\n                dest->transform->mData->shear = changed->transform->mData->shear;\n            }\n        }\n    }\n}\n\n#endif //IS_EDITOR\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ActorLinkRef.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ActorLinkRef.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n    BaseActorLinkRef::BaseActorLinkRef()\n    {}\n\n    BaseActorLinkRef::BaseActorLinkRef(const BaseActorLinkRef& other)\n    {\n        if (other.mRequiredResolveData)\n        {\n            mRequiredResolveData = other.mRequiredResolveData->Clone();\n            mRequiredResolveData->RequireResolve(*this);\n        }\n\n        ActorRefResolver::RequireRemap(*this);\n    }\n\n    BaseActorLinkRef::~BaseActorLinkRef()\n    {\n        mRequiredResolveData = nullptr;\n\n        ActorRefResolver::OnActorDestroyed(this);\n    }\n\n    BaseActorLinkRef& BaseActorLinkRef::operator=(const BaseActorLinkRef& other)\n    {\n        CopyWithoutRemap(other);\n        ActorRefResolver::RequireRemap(*this);\n\n        return *this;\n    }\n\n    Actor* BaseActorLinkRef::Get()\n    {\n        return nullptr;\n    }\n\n    const Actor* BaseActorLinkRef::Get() const\n    {\n        return nullptr;\n    }\n\n    void BaseActorLinkRef::Set(Actor* actor)\n    {}\n\n    void BaseActorLinkRef::Destroy()\n    {\n        o2Scene.DestroyActor(Ref(Get()));\n    }\n\n    bool BaseActorLinkRef::IsValid() const\n    {\n        return Get() != nullptr;\n    }\n\n    const Type& BaseActorLinkRef::GetActorType() const\n    {\n        return TypeOf(Actor);\n    }\n\n    const Type* BaseActorLinkRef::GetActorTypeStatic()\n    {\n        return &TypeOf(Actor);\n    }\n\n    bool BaseActorLinkRef::EqualsDelta(const BaseActorLinkRef& obj, const BaseActorLinkRef& origin)\n    {\n        if (obj.Get() == origin.Get())\n            return true;\n\n        if (obj.Get() && obj.Get()->mPrototypeLink.Lock().Get() == origin.Get())\n            return true;\n\n        return false;\n    }\n\n    void BaseActorLinkRef::CopyWithoutRemap(const BaseActorLinkRef& other)\n    {}\n\n    void BaseActorLinkRef::OnSerialize(DataValue& node) const\n    {\n        if (auto actor = Get())\n        {\n            if (actor->mIsAsset)\n                node.AddMember(\"AssetId\") = actor->GetAssetID();\n            else\n                node.AddMember(\"ID\") = actor->GetID();\n        }\n    }\n\n    void BaseActorLinkRef::OnDeserialized(const DataValue& node)\n    {\n        if (auto assetIdNode = node.FindMember(\"AssetId\"))\n        {\n            auto resolveData = mmake<AssetRequireResolveData>();\n            resolveData->uid = (UID)*assetIdNode;\n            resolveData->RequireResolve(*this);\n            mRequiredResolveData = resolveData;\n        }\n        else if (auto sceneIdNode = node.FindMember(\"ID\"))\n        {\n            auto resolveData = mmake<SceneRequireResolveData>();\n            resolveData->uid = (SceneUID)*sceneIdNode;\n            resolveData->RequireResolve(*this);\n            mRequiredResolveData = resolveData;\n        }\n        else\n            Set(nullptr);\n    }\n\n    void BaseActorLinkRef::SceneRequireResolveData::RequireResolve(BaseActorLinkRef& ref)\n    {\n        ActorRefResolver::RequireResolve(ref, uid);\n    }\n\n    Ref<BaseActorLinkRef::IRequiredResolveData> BaseActorLinkRef::SceneRequireResolveData::Clone() const\n    {\n        return mmake<SceneRequireResolveData>(*this);\n    }\n\n    void BaseActorLinkRef::AssetRequireResolveData::RequireResolve(BaseActorLinkRef& ref)\n    {\n        ActorRefResolver::RequireResolve(ref, uid);\n    }\n\n    Ref<BaseActorLinkRef::IRequiredResolveData> BaseActorLinkRef::AssetRequireResolveData::Clone() const\n    {\n        return mmake<AssetRequireResolveData>(*this);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Actor>);\n// --- META ---\n\nDECLARE_CLASS(o2::BaseActorLinkRef, o2__BaseActorLinkRef);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ActorLinkRef.h",
    "content": "#pragma once\n\n#include \"o2/Scene/ActorCreationMode.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/LinkRef.h\"\n\nnamespace o2\n{\n    class Actor;\n\n    // --------------------------------------------------------------\n    // Actor reference, automatically invalidates when actor deleting\n    // --------------------------------------------------------------\n    class BaseActorLinkRef : public ISerializable\n    {\n    public:\n        // Default constructor, no reference\n        BaseActorLinkRef();\n\n        // Creates a copy of actor and returns reference on it\n        BaseActorLinkRef(const BaseActorLinkRef& other);\n\n        // Destructor\n        ~BaseActorLinkRef();\n\n        // Assign operator\n        BaseActorLinkRef& operator=(const BaseActorLinkRef& other);\n\n        // Returns actor pointer @SCRIPTABLE\n        virtual Actor* Get();\n\n        // Returns actor pointer\n        virtual const Actor* Get() const;\n\n        // Sets actor pointer\n        virtual void Set(Actor* actor);\n\n        // Destroy the actor @SCRIPTABLE\n        void Destroy();\n\n        // Returns is reference is valid @SCRIPTABLE\n        bool IsValid() const;\n\n        // Returns actor type\n        virtual const Type& GetActorType() const;\n\n        // Copying ref without requiring remap\n        virtual void CopyWithoutRemap(const BaseActorLinkRef& other);\n\n        // Returns actor type\n        static const Type* GetActorTypeStatic();\n\n        // Checks refs are equals for serializing delta\n        static bool EqualsDelta(const BaseActorLinkRef& obj, const BaseActorLinkRef& origin);\n\n        SERIALIZABLE(BaseActorLinkRef);\n\n    protected:\n        // ------------------------------\n        // Reference resolve request data\n        // ------------------------------\n        struct IRequiredResolveData : public RefCounterable\n        {\n            // Request resolve reference\n            virtual void RequireResolve(BaseActorLinkRef& ref) = 0;\n\n            // Clone data\n            virtual Ref<IRequiredResolveData> Clone() const = 0;\n        };\n\n        // -------------------------------------------------\n        // Reference resolve request data by actor scene uid\n        // -------------------------------------------------\n        struct SceneRequireResolveData : public IRequiredResolveData\n        {\n            SceneUID uid;\n\n            // Request resolve reference\n            void RequireResolve(BaseActorLinkRef& ref) override;\n\n            // Clone data\n            Ref<IRequiredResolveData> Clone() const override;\n        };\n\n        // -------------------------------------------\n        // Reference resolve request data by asset uid\n        // -------------------------------------------\n        struct AssetRequireResolveData : public IRequiredResolveData\n        {\n            UID uid;\n\n            // Request resolve reference\n            void RequireResolve(BaseActorLinkRef& ref) override;\n\n            // Clone data\n            Ref<IRequiredResolveData> Clone() const override;\n        };\n\n        Ref<IRequiredResolveData> mRequiredResolveData; // Reference resolve request data. Used for resolving reference after deserialization.\n        // Not null only when reference is required to resolve. Copies in reference copying.\n\n    protected:\n        // Beginning serialization callback\n        void OnSerialize(DataValue& node) const override;\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        friend class Actor;\n        friend class ActorRefResolver;\n    };\n\n#define ENABLE_ACTOR typename std::enable_if<IsBaseOf<Actor, _actor_type>::value>::type\n\n    // ---------------------------------------\n    // Reference on derived from actor classes\n    // Implicitly converts to Ref<Actor> and back\n    // ---------------------------------------\n    template<typename _actor_type>\n    class LinkRef<_actor_type, ENABLE_ACTOR> : public BaseActorLinkRef\n    {\n    public:\n        // Default constructor, no reference\n        LinkRef();\n\n        // Nullptr constructor\n        LinkRef(std::nullptr_t);\n\n        // Constructor with actor pointer\n        explicit LinkRef(_actor_type* ptr);\n\n        // Copy constructor from other reference\n        LinkRef(const Ref<_actor_type>& other);\n\n        // Move constructor from other reference\n        LinkRef(Ref<_actor_type>&& other);\n\n        // Copy constructor from other actor reference\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _actor_type*>::value>::type>\n        LinkRef(const LinkRef<_other_type>& other);\n\n        // Move constructor from other actor reference\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _actor_type*>::value>::type>\n        LinkRef(LinkRef<_other_type>&& other);\n\n        // Equality operator\n        bool operator==(const LinkRef<_actor_type>& other) const;\n\n        // Equality operator\n        bool operator==(const _actor_type* other) const;\n\n        // Inequality operator\n        bool operator!=(const LinkRef<_actor_type>& other) const;\n\n        // Inequality operator\n        bool operator!=(const _actor_type* other) const;\n\n        // Copy operator from other actor reference\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _actor_type*>::value>::type>\n        LinkRef<_actor_type>& operator=(const LinkRef<_other_type>& other);\n\n        // Move operator from other actor reference\n        LinkRef<_actor_type>& operator=(Ref<_actor_type>&& other);\n\n        // Move operator from nullptr\n        LinkRef<_actor_type>& operator=(std::nullptr_t);\n\n        // Less operator\n        bool operator<(const LinkRef<_actor_type>& other) const;\n\n        // Returns is reference is valid\n        bool IsValid() const;\n\n        // Returns is reference is valid\n        explicit operator bool() const;\n\n        // Returns actor reference\n        operator Ref<_actor_type>() const;\n\n        // Returns actor reference\n        _actor_type& operator*() const;\n\n        // Returns actor pointer\n        _actor_type* operator->() const;\n\n        // Returns actor pointer \n        _actor_type* Get() override;\n\n        // Returns actor pointer\n        const _actor_type* Get() const override;\n\n        // Returns reference\n        Ref<_actor_type>& GetRef();\n\n        // Returns reference\n        const Ref<_actor_type>& GetRef() const;\n\n        // Sets actor pointer\n        void Set(Actor* actor) override;\n\n        // Returns actor type\n        const Type& GetActorType() const override;\n\n        // Copying ref without requiring remap\n        void CopyWithoutRemap(const BaseActorLinkRef& other) override;\n\n        // Returns actor type\n        static const Type* GetActorTypeStatic();\n\n    protected:\n        Ref<_actor_type> mRef; // Reference to actor\n\n    public:\n        typedef LinkRef<_actor_type> _thisType;\n\n        SERIALIZABLE_MAIN(_thisType);\n        IOBJECT_SCRIPTING();\n\n        template<typename _type_processor>\n        static void ProcessBaseTypes(_thisType* object, _type_processor& processor)\n        {\n            typedef _thisType thisclass;\n            processor.template StartBases<_thisType>(object, type);\n\n            BASE_CLASS(o2::BaseActorLinkRef);\n        }\n\n        template<typename _type_processor>\n        static void ProcessFields(_thisType* object, _type_processor& processor)\n        {\n            typedef _thisType thisclass;\n            processor.template StartFields<_thisType>(object, type);\n\n            FIELD().PROTECTED().NAME(mRef);\n        }\n\n        template<typename _type_processor>\n        static void ProcessMethods(_thisType* object, _type_processor& processor)\n        {\n            typedef _thisType thisclass;\n            processor.template StartMethods<_thisType>(object, type);\n\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n            FUNCTION().PUBLIC().SIGNATURE(const Type&, GetActorType);\n            FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetActorTypeStatic);\n        }\n    };\n\n    template<typename _actor_type>\n    LinkRef<_actor_type, ENABLE_ACTOR>::LinkRef()\n    {}\n\n    template<typename _actor_type>\n    LinkRef<_actor_type, ENABLE_ACTOR>::LinkRef(std::nullptr_t) :\n        mRef(nullptr)\n    {}\n\n    template<typename _actor_type>\n    LinkRef<_actor_type, ENABLE_ACTOR>::LinkRef(_actor_type* ptr) :\n        mRef(ptr)\n    {}\n\n    template<typename _actor_type>\n    LinkRef<_actor_type, ENABLE_ACTOR>::LinkRef(const Ref<_actor_type>&other) :\n        mRef(other)\n    {}\n\n    template<typename _actor_type>\n    LinkRef<_actor_type, ENABLE_ACTOR>::LinkRef(Ref<_actor_type> && other) :\n        mRef(std::move(other))\n    {}\n\n    template<typename _actor_type>\n    template<typename _other_type, typename _enable>\n    LinkRef<_actor_type, ENABLE_ACTOR>::LinkRef(const LinkRef<_other_type>& other) :\n        mRef(other.mRef)\n    {}\n\n    template<typename _actor_type>\n    template<typename _other_type, typename>\n    LinkRef<_actor_type, ENABLE_ACTOR>::LinkRef(LinkRef<_other_type>&& other) :\n        mRef(std::move(other.mRef))\n    {}\n\n    template<typename _actor_type>\n    bool LinkRef<_actor_type, ENABLE_ACTOR>::operator==(const LinkRef<_actor_type>& other) const\n    {\n        return mRef == other.mRef;\n    }\n\n    template<typename _actor_type>\n    bool LinkRef<_actor_type, ENABLE_ACTOR>::operator==(const _actor_type* other) const\n    {\n        return mRef == other;\n    }\n\n    template<typename _actor_type>\n    bool LinkRef<_actor_type, ENABLE_ACTOR>::operator!=(const LinkRef<_actor_type>& other) const\n    {\n        return mRef != other.mRef;\n    }\n\n    template<typename _actor_type>\n    bool LinkRef<_actor_type, ENABLE_ACTOR>::operator!=(const _actor_type* other) const\n    {\n        return mRef != other;\n    }\n\n    template<typename _actor_type>\n    template<typename _other_type, typename _enable>\n    LinkRef<_actor_type>& LinkRef<_actor_type, ENABLE_ACTOR>::operator=(const LinkRef<_other_type>& other)\n    {\n        mRef = other.mRef;\n        return *this;\n    }\n\n    template<typename _actor_type>\n    LinkRef<_actor_type>& LinkRef<_actor_type, ENABLE_ACTOR>::operator=(Ref<_actor_type>&& other)\n    {\n        mRef = std::move(other);\n        return *this;\n    }\n\n    template<typename _actor_type>\n    LinkRef<_actor_type>& LinkRef<_actor_type, ENABLE_ACTOR>::operator=(std::nullptr_t)\n    {\n        mRef = nullptr;\n        return *this;\n    }\n\n    template<typename _actor_type>\n    bool LinkRef<_actor_type, ENABLE_ACTOR>::operator<(const LinkRef<_actor_type>& other) const\n    {\n        return mRef < other.mRef;\n    }\n\n    template<typename _actor_type>\n    bool LinkRef<_actor_type, ENABLE_ACTOR>::IsValid() const\n    {\n        return mRef.IsValid();\n    }\n\n    template<typename _actor_type>\n    LinkRef<_actor_type, ENABLE_ACTOR>::operator bool() const\n    {\n        return IsValid();\n    }\n\n    template<typename _actor_type>\n    LinkRef<_actor_type, ENABLE_ACTOR>::operator Ref<_actor_type>() const\n    {\n        return mRef;\n    }\n\n    template<typename _actor_type>\n    _actor_type& LinkRef<_actor_type, ENABLE_ACTOR>::operator*() const\n    {\n        return *mRef;\n    }\n\n    template<typename _actor_type>\n    _actor_type* LinkRef<_actor_type, ENABLE_ACTOR>::operator->() const\n    {\n        return mRef.Get();\n    }\n\n    template<typename _actor_type>\n    _actor_type* LinkRef<_actor_type, ENABLE_ACTOR>::Get()\n    {\n        return mRef.Get();\n    }\n\n    template<typename _actor_type>\n    const _actor_type* LinkRef<_actor_type, ENABLE_ACTOR>::Get() const\n    {\n        return mRef.Get();\n    }\n\n    template<typename _actor_type>\n    Ref<_actor_type>& LinkRef<_actor_type, ENABLE_ACTOR>::GetRef()\n    {\n        return mRef;\n    }\n\n    template<typename _actor_type>\n    const Ref<_actor_type>& LinkRef<_actor_type, ENABLE_ACTOR>::GetRef() const\n    {\n        return mRef;\n    }\n\n    template<typename _actor_type>\n    void LinkRef<_actor_type, ENABLE_ACTOR>::Set(Actor* actor)\n    {\n        CopyWithoutRemap(LinkRef(dynamic_cast<_actor_type*>(actor)));\n    }\n\n    template<typename _actor_type>\n    const Type& LinkRef<_actor_type, ENABLE_ACTOR>::GetActorType() const\n    {\n        return TypeOf(_actor_type);\n    }\n\n    template<typename _actor_type>\n    void LinkRef<_actor_type, ENABLE_ACTOR>::CopyWithoutRemap(const BaseActorLinkRef& other)\n    {\n        mRef = Ref(dynamic_cast<_actor_type*>(const_cast<Actor*>(other.Get())));\n        mRequiredResolveData = nullptr;\n    }\n\n    template<typename _actor_type>\n    const Type* LinkRef<_actor_type, ENABLE_ACTOR>::GetActorTypeStatic()\n    {\n        return &TypeOf(_actor_type);\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(o2::BaseActorLinkRef)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::BaseActorLinkRef)\n{\n    FIELD().PROTECTED().NAME(mRequiredResolveData);\n}\nEND_META;\nCLASS_METHODS_META(o2::BaseActorLinkRef)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const BaseActorLinkRef&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Actor*, Get);\n    FUNCTION().PUBLIC().SIGNATURE(const Actor*, Get);\n    FUNCTION().PUBLIC().SIGNATURE(void, Set, Actor*);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Destroy);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsValid);\n    FUNCTION().PUBLIC().SIGNATURE(const Type&, GetActorType);\n    FUNCTION().PUBLIC().SIGNATURE(void, CopyWithoutRemap, const BaseActorLinkRef&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetActorTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, EqualsDelta, const BaseActorLinkRef&, const BaseActorLinkRef&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ActorRefResolver.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ActorRefResolver.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/ActorLinkRef.h\"\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n    CREATE_SINGLETON(ActorRefResolver);\n\n    ActorRefResolver::ActorRefResolver(RefCounter* refCounter):\n        Singleton<ActorRefResolver>(refCounter)\n    {}\n\n    void ActorRefResolver::RequireResolve(BaseActorLinkRef& ref, SceneUID actorId)\n    {\n        if (!mInstance)\n            return;\n\n        if (IsLocked())\n            mInstance->mUnresolvedActorsRefs.Add(UnresolvedActor(&ref, actorId));\n        else\n            ref.Set(o2Scene.GetActorByID(actorId).Get());\n    }\n\n    void ActorRefResolver::RequireResolve(BaseActorLinkRef& ref, const UID& assetId)\n    {\n        if (!mInstance)\n            return;\n\n        if (IsLocked())\n            mInstance->mUnresolvedAssetActorsRefs.Add(UnresolvedAssetActor(&ref, assetId));\n        else\n            ref.Set(o2Scene.GetAssetActorByID(assetId).Get());\n    }\n\n    void ActorRefResolver::RequireResolve(BaseComponentLinkRef& ref, SceneUID actorId, SceneUID id)\n    {\n        if (!mInstance)\n            return;\n\n        if (IsLocked())\n            mInstance->mUnresolvedComponentsRefs.Add(UnresolvedComponent(&ref, id));\n        else\n        {\n            if (auto actor = o2Scene.GetActorByID(actorId))\n                ref.Set(actor->GetComponent(id).Get());\n        }\n    }\n\n    void ActorRefResolver::RequireResolve(BaseComponentLinkRef& ref, const UID& assetId, SceneUID id)\n    {\n        if (!mInstance)\n            return;\n\n        if (IsLocked())\n            mInstance->mUnresolvedComponentsRefs.Add(UnresolvedComponent(&ref, id));\n        else\n        {\n            if (auto actor = o2Scene.GetAssetActorByID(assetId))\n                ref.Set(actor->GetComponent(id).Get());\n        }\n    }\n\n    bool ActorRefResolver::IsLocked()\n    {\n        if (!mInstance)\n            return false;\n\n        return mInstance->mLockDepth != 0;\n    }\n\n    int ActorRefResolver::GetLockDepth()\n    {\n        if (!mInstance)\n            return 0;\n\n        return mInstance->mLockDepth;\n    }\n\n    void ActorRefResolver::RemapReferences(const Map<const Actor*, Actor*>& actors,\n                                           const Map<const Component*, Component*>& components)\n    {\n        if (!mInstance)\n            return;\n\n\t\tauto remapActors = mInstance->mRemapActors;\n\t\tmInstance->mRemapActors.Clear();\n\n        for (auto& ref : remapActors)\n        {\n            Actor* res = nullptr;\n            if (actors.TryGetValue(ref->Get(), res))\n                ref->Set(res);\n        }\n\n\t\tauto remapComponents = mInstance->mRemapComponents;\n\t\tmInstance->mRemapComponents.Clear();\n\n        for (auto& ref : remapComponents)\n        {\n            Component* res = nullptr;\n            if (components.TryGetValue(ref->Get(), res))\n                ref->Set(res);\n        }\n    }\n\n    void ActorRefResolver::RequireRemap(BaseActorLinkRef& ref)\n    {\n        if (!mInstance)\n            return;\n\n        if (!IsLocked())\n            return;\n\n        mInstance->mRemapActors.Add(&ref);\n    }\n\n    void ActorRefResolver::RequireRemap(BaseComponentLinkRef& ref)\n    {\n        if (!mInstance)\n            return;\n\n        if (!IsLocked())\n            return;\n\n        mInstance->mRemapComponents.Add(&ref);\n    }\n\n    void ActorRefResolver::LockResolving(int depth /*= 1*/)\n    {\n        if (!mInstance)\n            return;\n\n        mInstance->mLockDepth += depth;\n    }\n\n    void ActorRefResolver::UnlockResolving(int depth /*= 1*/)\n    {\n        if (!mInstance)\n            return;\n\n        mInstance->mLockDepth -= depth;\n\n        if (mInstance->mLockDepth == 0)\n            ResolveRefs();\n\n        if (mInstance->mLockDepth < 0)\n        {\n            o2Debug.LogWarning(\"ActorRefResolver lock depth is less than zero. Something going wrong\");\n            mInstance->mLockDepth = 0;\n        }\n    }\n\n    void ActorRefResolver::ResolveRefs(bool forcible /*= false*/)\n    {\n        if (!mInstance)\n            return;\n\n        if (mInstance->mLockDepth > 0 && !forcible)\n            return;\n\n        for (auto it = mInstance->mUnresolvedActorsRefs.Begin(); it != mInstance->mUnresolvedActorsRefs.End();)\n        {\n            auto& unresolvedActor = *it;\n            Actor* res = nullptr;\n            if (mInstance->mNewActors.TryGetValue(unresolvedActor.sourceId, res))\n            {\n                unresolvedActor.target->Set(res);\n                it = mInstance->mUnresolvedActorsRefs.Remove(it);\n            }\n            else if (auto actor = o2Scene.GetActorByID(unresolvedActor.sourceId))\n            {\n                unresolvedActor.target->Set(actor.Get());\n                it = mInstance->mUnresolvedActorsRefs.Remove(it);\n            }\n            else\n                ++it;\n        }\n\n        auto unresolvedAssetActorsRefs = mInstance->mUnresolvedAssetActorsRefs;\n        for (auto it = unresolvedAssetActorsRefs.Begin(); it != unresolvedAssetActorsRefs.End();)\n        {\n            auto& unresolvedAssetActor = *it;\n            if (auto actor = o2Scene.GetAssetActorByID(unresolvedAssetActor.sourceAssetId))\n            {\n                unresolvedAssetActor.target->Set(actor.Get());\n                it = unresolvedAssetActorsRefs.Remove(it);\n            }\n            else\n                ++it;\n        }\n        \n        mInstance->mUnresolvedAssetActorsRefs = unresolvedAssetActorsRefs;\n\n        auto unresolvedComponentsRefs = mInstance->mUnresolvedComponentsRefs;\n        for (auto it = unresolvedComponentsRefs.Begin(); it != unresolvedComponentsRefs.End();)\n        {\n            auto& unresolvedComponent = *it;\n            Component* res = nullptr;\n            if (mInstance->mNewComponents.TryGetValue(unresolvedComponent.sourceId, res))\n            {\n                unresolvedComponent.target->Set(res);\n                it = unresolvedComponentsRefs.Remove(it);\n            }\n            else\n                ++it;\n        }\n        \n        mInstance->mUnresolvedComponentsRefs = unresolvedComponentsRefs;\n\n        if (mInstance->mLockDepth == 0)\n        {\n            mInstance->mNewActors.Clear();\n            mInstance->mNewComponents.Clear();\n            mInstance->mUnresolvedActorsRefs.Clear();\n            mInstance->mUnresolvedComponentsRefs.Clear();\n        }\n    }\n\n    void ActorRefResolver::ActorCreated(Actor* actor)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (mInstance->mLockDepth < 1)\n            return;\n\n        mInstance->mNewActors[actor->GetID()] = actor;\n    }\n\n    void ActorRefResolver::OnActorIdChanged(Actor* actor, SceneUID prevId)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (mInstance->mLockDepth < 1)\n            return;\n\n        mInstance->mNewActors.Remove(prevId);\n        mInstance->mNewActors[actor->GetID()] = actor;\n    }\n\n    void ActorRefResolver::ComponentCreated(Component* component)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (mInstance->mLockDepth < 1)\n            return;\n\n        mInstance->mNewComponents[component->GetID()] = component;\n    }\n\n    void ActorRefResolver::OnComponentIdChanged(Component* component, SceneUID prevId)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        if (mInstance->mLockDepth < 1)\n            return;\n\n        mInstance->mNewComponents.Remove(prevId);\n        mInstance->mNewComponents[component->GetID()] = component;\n    }\n\n    void ActorRefResolver::OnActorDestroyed(const BaseActorLinkRef* ref)\n    {\n        mInstance->mUnresolvedActorsRefs.RemoveFirst([&](auto& x) { return x.target == ref; });\n        mInstance->mUnresolvedAssetActorsRefs.RemoveFirst([&](auto& x) { return x.target == ref; });\n\n        mInstance->mRemapActors.Remove(const_cast<BaseActorLinkRef*>(ref));\n    }\n\n    void ActorRefResolver::OnComponentDestroyed(const BaseComponentLinkRef* ref)\n    {\n        mInstance->mUnresolvedComponentsRefs.RemoveFirst([&](auto& x) { return x.target == ref; });\n        mInstance->mRemapComponents.Remove(const_cast<BaseComponentLinkRef*>(ref));\n    }\n\n    bool ActorRefResolver::UnresolvedActor::operator==(const UnresolvedActor& other) const\n    {\n        return target == other.target;\n    }\n\n    ActorRefResolver::UnresolvedActor::UnresolvedActor(BaseActorLinkRef* target, SceneUID actorId) :\n        target(target), sourceId(actorId)\n    {}\n\n    ActorRefResolver::UnresolvedActor::UnresolvedActor()\n    {}\n\n    ActorRefResolver::UnresolvedComponent::UnresolvedComponent()\n    {}\n\n    ActorRefResolver::UnresolvedComponent::UnresolvedComponent(BaseComponentLinkRef* target, SceneUID id):\n        target(target), sourceId(id)\n    {}\n\n    bool ActorRefResolver::UnresolvedComponent::operator==(const UnresolvedComponent& other) const\n    {\n        return target == other.target;\n    }\n\n    ActorRefResolver::UnresolvedAssetActor::UnresolvedAssetActor()\n    {}\n\n    ActorRefResolver::UnresolvedAssetActor::UnresolvedAssetActor(BaseActorLinkRef* target, const UID& assetId):\n        target(target), sourceAssetId(assetId)\n    {}\n\n    bool ActorRefResolver::UnresolvedAssetActor::operator==(const UnresolvedAssetActor& other) const\n    {\n        return target == other.target;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ActorRefResolver.h",
    "content": "#pragma once\n\n#include \"o2/Scene/ActorLinkRef.h\"\n#include \"o2/Scene/ComponentLinkRef.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/Singleton.h\"\n\nnamespace o2\n{\n    // -------------------------\n    // Actor data node converter\n    // -------------------------\n    class ActorRefResolver : public Singleton<ActorRefResolver>\n    {\n    public:\n        // Default constructor\n        ActorRefResolver(RefCounter* refCounter);\n\n        // Requires to resolve actor reference by actor id\n        static void RequireResolve(BaseActorLinkRef& ref, SceneUID actorId);\n\n        // Requires to resolve actor reference by asset id\n        static void RequireResolve(BaseActorLinkRef& ref, const UID& assetId);\n\n        // Requires to resolve component reference\n        static void RequireResolve(BaseComponentLinkRef& ref, SceneUID actorId, SceneUID id);\n\n        // Requires to resolve component reference\n        static void RequireResolve(BaseComponentLinkRef& ref, const UID& assetId, SceneUID id);\n\n        // Requires to remap actor reference\n        static void RequireRemap(BaseActorLinkRef& ref);\n\n        // Requires to remap component reference\n        static void RequireRemap(BaseComponentLinkRef& ref);\n\n        // Locks references resolving depth\n        static void LockResolving(int depth = 1);\n\n        // Unlocks references resolving depth\n        static void UnlockResolving(int depth = 1);\n\n        // Resolves references. Works when lock depth is 0\n        static void ResolveRefs(bool forcible = false);\n\n        // Returns is resolver depth locked\n        static bool IsLocked();\n\n        // Returns lock depth\n        static int GetLockDepth();\n\n        // Remaps required refs \n        static void RemapReferences(const Map<const Actor*, Actor*>& actors, const Map<const Component*, Component*>& components);\n\n        // Called when new actor was created\n        static void ActorCreated(Actor* actor);\n\n        // Called when actor id was changed\n        static void OnActorIdChanged(Actor* actor, SceneUID prevId);\n\n        // Called when new component was created\n        static void ComponentCreated(Component* component);\n\n        // Called when component id was changed\n        static void OnComponentIdChanged(Component* component, SceneUID prevId);\n\n        // Called when actor reference was destroyed, removes it from unresolved list\n        static void OnActorDestroyed(const BaseActorLinkRef* ref);\n\n        // Called when component reference was destroyed, removes it from unresolved list\n        static void OnComponentDestroyed(const BaseComponentLinkRef* ref);\n\n    protected:\n        struct UnresolvedActor\n        {\n            BaseActorLinkRef* target;\n            SceneUID      sourceId;\n\n        public:\n            UnresolvedActor();\n            UnresolvedActor(BaseActorLinkRef* target, SceneUID actorId);\n            bool operator==(const UnresolvedActor& other) const;\n        };\n\n        struct UnresolvedAssetActor\n        {\n            BaseActorLinkRef* target;\n            UID           sourceAssetId;\n\n        public:\n            UnresolvedAssetActor();\n            UnresolvedAssetActor(BaseActorLinkRef* target, const UID& assetId);\n\n            bool operator==(const UnresolvedAssetActor& other) const;\n        };\n\n        struct UnresolvedComponent\n        {\n            BaseComponentLinkRef* target;\n            SceneUID          sourceId;\n\n        public:\n            UnresolvedComponent();\n            UnresolvedComponent(BaseComponentLinkRef* target, SceneUID id);\n\n            bool operator==(const UnresolvedComponent& other) const;\n        };\n\n    protected:\n        Vector<UnresolvedActor>      mUnresolvedActorsRefs;\n        Vector<UnresolvedAssetActor> mUnresolvedAssetActorsRefs;\n        Map<SceneUID, Actor*>        mNewActors;\n\n        Vector<UnresolvedComponent> mUnresolvedComponentsRefs;\n        Map<SceneUID, Component*>   mNewComponents;\n\n        Vector<BaseActorLinkRef*>     mRemapActors;\n        Vector<BaseComponentLinkRef*> mRemapComponents;\n\n        int mLockDepth = 0;\n\n        friend class Actor;\n        friend class Component;\n        friend class Scene;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ActorTransform.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ActorTransform.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    ActorTransform::ActorTransform(ActorTransformData* data):\n        mData(data)\n    {}\n\n    ActorTransform::ActorTransform(const Vec2F& size /*= Vec2F()*/, const Vec2F& position /*= Vec2F()*/,\n                                   float angle /*= 0.0f*/, const Vec2F& scale /*= Vec2F(1.0f, 1.0f)*/,\n                                   const Vec2F& pivot /*= Vec2F(0.5f, 0.5f)*/) :\n        ActorTransform(mnew ActorTransformData())\n    {\n        mData->dirtyFrame = 1;\n        mData->updateFrame = 1;\n\n        mData->size = size;\n        mData->position = position;\n        mData->angle = angle;\n        mData->scale = scale;\n        mData->pivot = pivot;\n    }\n\n    ActorTransform::ActorTransform(const ActorTransform& other):\n        ActorTransform(mnew ActorTransformData())\n    {\n        mData->dirtyFrame = 1;\n        mData->updateFrame = 1;\n\n        mData->size = other.mData->size;\n        mData->position = other.mData->position;\n        mData->angle = other.mData->angle;\n        mData->scale = other.mData->scale;\n        mData->pivot = other.mData->pivot;\n        mData->shear = other.mData->shear;\n    }\n\n    ActorTransform::~ActorTransform()\n    {\n        delete mData;\n    }\n\n    void ActorTransform::CopyFrom(const ActorTransform& other)\n    {\n        mData->size = other.mData->size;\n        mData->position = other.mData->position;\n        mData->angle = other.mData->angle;\n        mData->scale = other.mData->scale;\n        mData->pivot = other.mData->pivot;\n        mData->shear = other.mData->shear;\n\n        SetDirty();\n    }\n\n    ActorTransform& ActorTransform::operator=(const ActorTransform& other)\n    {\n        CopyFrom(other);\n        return *this;\n    }\n\n//     ActorTransform& ActorTransform::operator=(const Transform& other)\n//     {\n//         SetWorldBasis(other.GetBasis());\n//         return *this;\n//     }\n\n    bool ActorTransform::operator==(const ActorTransform& other) const\n    {\n        return Math::Equals(mData->size, other.mData->size) &&\n            Math::Equals(mData->position, other.mData->position) &&\n            Math::Equals(mData->angle, other.mData->angle) &&\n            Math::Equals(mData->scale, other.mData->scale) &&\n            Math::Equals(mData->pivot, other.mData->pivot) &&\n            Math::Equals(mData->shear, other.mData->shear);\n    }\n\n    void ActorTransform::SetPosition(const Vec2F& position)\n    {\n        mData->position = position;\n        SetDirty();\n    }\n\n    Vec2F ActorTransform::GetPosition() const\n    {\n        return mData->position;\n    }\n\n    void ActorTransform::SetPositionX(float value)\n    {\n        SetPosition(Vec2F(value, mData->position.y));\n    }\n\n    float ActorTransform::GetPositionX() const\n    {\n        return mData->position.x;\n    }\n\n    void ActorTransform::SetPositionY(float value)\n    {\n        SetPosition(Vec2F(mData->position.x, value));\n    }\n\n    float ActorTransform::GetPositionY() const\n    {\n        return mData->position.y;\n    }\n\n    void ActorTransform::SetSize(const Vec2F& size)\n    {\n        mData->size = size;\n        SetDirty();\n    }\n\n    Vec2F ActorTransform::GetSize() const\n    {\n        return mData->size;\n    }\n\n    void ActorTransform::SetWidth(float value)\n    {\n        mData->size.x = value;\n        SetDirty();\n    }\n\n    float ActorTransform::GetWidth() const\n    {\n        return mData->size.x;\n    }\n\n    void ActorTransform::SetHeight(float value)\n    {\n        mData->size.y = value;\n        SetDirty();\n    }\n\n    float ActorTransform::GetHeight() const\n    {\n        return mData->size.y;\n    }\n\n    void ActorTransform::SetPivot(const Vec2F& pivot)\n    {\n        mData->pivot = pivot;\n        SetDirty();\n    }\n\n    Vec2F ActorTransform::GetPivot() const\n    {\n        return mData->pivot;\n    }\n\n    void ActorTransform::SetSizePivot(const Vec2F& relPivot)\n    {\n        SetPivot(relPivot / mData->size);\n    }\n\n    Vec2F ActorTransform::GetSizePivot() const\n    {\n        return mData->pivot*mData->size;\n    }\n\n    void ActorTransform::SetPivotX(float value)\n    {\n        SetPivot(Vec2F(value, mData->pivot.y));\n    }\n\n    float ActorTransform::GetPivotX() const\n    {\n        return mData->pivot.x;\n    }\n\n    void ActorTransform::SetPivotY(float value)\n    {\n        SetPivot(Vec2F(mData->pivot.x, value));\n    }\n\n    float ActorTransform::GetPivotY() const\n    {\n        return mData->pivot.y;\n    }\n    \n    void ActorTransform::SetRect(const RectF& rect)\n    {\n        mData->size = rect.Size();\n        mData->position = rect.LeftBottom() + mData->size*mData->pivot;\n\n        SetDirty();\n    }\n\n    RectF ActorTransform::GetRect() const\n    {\n        Vec2F leftBottom = mData->position - mData->size*mData->pivot;\n        return RectF(leftBottom, leftBottom + mData->size);\n    }\n\n    void ActorTransform::SetScale(const Vec2F& scale)\n    {\n        mData->scale = scale;\n        SetDirty();\n    }\n\n    void ActorTransform::SetScaleX(float scaleX)\n    {\n        mData->scale.x = scaleX;\n        SetDirty();\n    }\n\n    void ActorTransform::SetScaleY(float scaleY)\n    {\n        mData->scale.y = scaleY;\n        SetDirty();\n    }\n\n    Vec2F ActorTransform::GetScale() const\n    {\n        return mData->scale;\n    }\n\n    float ActorTransform::GetScaleX() const\n    {\n        return mData->scale.x;\n    }\n\n    float ActorTransform::GetScaleY() const\n    {\n        return mData->scale.y;\n    }\n\n    void ActorTransform::SetAngle(float rad)\n    {\n        mData->angle = rad;\n        SetDirty();\n    }\n\n    float ActorTransform::GetAngle() const\n    {\n        return mData->angle;\n    }\n\n    void ActorTransform::SetAngleDegrees(float deg)\n    {\n        mData->angle = Math::Deg2rad(deg);\n        SetDirty();\n    }\n\n    float ActorTransform::GetAngleDegrees() const\n    {\n        return Math::Rad2deg(mData->angle);\n    }\n\n    void ActorTransform::SetShear(float shear)\n    {\n        mData->shear = shear;\n        SetDirty();\n    }\n\n    float ActorTransform::GetShear() const\n    {\n        return mData->shear;\n    }\n\n    void ActorTransform::SetBasis(const Basis& basis)\n    {\n        Vec2F offset, scale;\n        float angle, shear;\n        basis.Decompose(&offset, &angle, &scale, &shear);\n\n        mData->angle = angle;\n        mData->size = scale / mData->scale;\n        mData->shear = shear;\n\n        mData->position = basis.origin + basis.xv*mData->pivot.x + basis.yv*mData->pivot.y;\n        SetDirty();\n    }\n\n    Basis ActorTransform::GetBasis() const\n    {\n        return mData->transform;\n    }\n\n    void ActorTransform::SetNonSizedBasis(const Basis& basis)\n    {\n        Vec2F offset, scale;\n        float angle, shear;\n        basis.Decompose(&offset, &angle, &scale, &shear);\n\n        mData->angle = angle;\n        mData->scale = scale;\n        mData->shear = shear;\n\n        mData->position = basis.origin;\n        SetDirty();\n    }\n\n    Basis ActorTransform::GetNonSizedBasis() const\n    {\n        return mData->nonSizedTransform;\n    }\n\n    void ActorTransform::SetAxisAlignedRect(const RectF& rect)\n    {\n        RectF curRect = GetAxisAlignedRect();\n        Basis curRectBasis(curRect.LeftBottom(), Vec2F::Right()*curRect.Width(), Vec2F::Up()*curRect.Height());\n        Basis rectBasis(rect.LeftBottom(), Vec2F::Right()*rect.Width(), Vec2F::Up()*rect.Height());\n\n        SetBasis(mData->transform*curRectBasis.Inverted()*rectBasis);\n    }\n\n    RectF ActorTransform::GetAxisAlignedRect() const\n    {\n        return mData->transform.AABB();\n    }\n\n    void ActorTransform::SetLeftTop(const Vec2F& position)\n    {\n        RectF rect = GetRect();\n        SetRect(RectF(position.x, rect.bottom, rect.right, position.y));\n    }\n\n    Vec2F ActorTransform::GetLeftTop() const\n    {\n        return GetRect().LeftTop();\n    }\n\n    void ActorTransform::SetRightTop(const Vec2F& position)\n    {\n        RectF rect = GetRect();\n        SetRect(RectF(position.x, rect.bottom, rect.right, position.y));\n    }\n\n    Vec2F ActorTransform::GetRightTop() const\n    {\n        return GetRect().RightTop();\n    }\n\n    void ActorTransform::SetLeftBottom(const Vec2F& position)\n    {\n        RectF rect = GetRect();\n        SetRect(RectF(position.x, position.y, rect.right, rect.top));\n    }\n\n    Vec2F ActorTransform::GetLeftBottom() const\n    {\n        return GetRect().LeftBottom();\n    }\n\n    void ActorTransform::SetRightBottom(const Vec2F& position)\n    {\n        RectF rect = GetRect();\n        SetRect(RectF(rect.left, position.y, position.x, rect.top));\n    }\n\n    Vec2F ActorTransform::GetRightBottom() const\n    {\n        return GetRect().RightBottom();\n    }\n\n    void ActorTransform::SetCenter(const Vec2F& position)\n    {\n        RectF rect = GetRect();\n        SetRect(rect + (position - rect.Center()));\n    }\n\n    Vec2F ActorTransform::GetCenter() const\n    {\n        return GetRect().Center();\n    }\n\n    void ActorTransform::SetRightDir(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetRightDir().SignedAngle(dir));\n        SetWorldBasis(mData->transform*transf);\n    }\n\n    Vec2F ActorTransform::GetRightDir() const\n    {\n        return mData->nonSizedTransform.xv;\n    }\n\n    void ActorTransform::SetLeftDir(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetLeftDir().SignedAngle(dir));\n        SetWorldBasis(mData->transform*transf);\n    }\n\n    Vec2F ActorTransform::GetLeftDir() const\n    {\n        return mData->nonSizedTransform.xv.Inverted();\n    }\n\n    void ActorTransform::SetUpDir(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetUpDir().SignedAngle(dir));\n        SetWorldBasis(mData->transform*transf);\n    }\n\n    Vec2F ActorTransform::GetUpDir() const\n    {\n        return mData->nonSizedTransform.yv;\n    }\n\n    void ActorTransform::SetDownDir(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetDownDir().SignedAngle(dir));\n        SetWorldBasis(mData->transform*transf);\n    }\n\n    Vec2F ActorTransform::GetDownDir() const\n    {\n        return mData->nonSizedTransform.yv.Inverted();\n    }\n\n    void ActorTransform::SetRight(float value)\n    {\n        RectF rect = GetRect();\n        SetRect(RectF(rect.left, rect.bottom, value, rect.top));\n    }\n\n    float ActorTransform::GetRight() const\n    {\n        return GetRect().right;\n    }\n\n    void ActorTransform::SetLeft(float value)\n    {\n        RectF rect = GetRect();\n        SetRect(RectF(value, rect.bottom, rect.right, rect.top));\n    }\n\n    float ActorTransform::GetLeft() const\n    {\n        return GetRect().left;\n    }\n\n    void ActorTransform::SetTop(float value)\n    {\n        RectF rect = GetRect();\n        SetRect(RectF(rect.left, rect.bottom, rect.right, value));\n    }\n\n    float ActorTransform::GetTop() const\n    {\n        return GetRect().top;\n    }\n\n    void ActorTransform::SetBottom(float value)\n    {\n        RectF rect = GetRect();\n        SetRect(RectF(rect.left, value, rect.right, rect.top));\n    }\n\n    float ActorTransform::GetBottom() const\n    {\n        return GetRect().bottom;\n    }\n\n    Ref<Actor> ActorTransform::GetOwnerActor() const\n    {\n        return mData->owner.Lock();\n    }\n\n    bool ActorTransform::IsDirty() const\n    {\n        return mData->updateFrame == 0;\n    }\n\n    void ActorTransform::SetWorldPivot(const Vec2F& pivot)\n    {\n        Basis trasform = mData->worldTransform;\n        SetSizePivot(World2LocalPoint(pivot));\n        SetWorldBasis(trasform);\n    }\n\n    Vec2F ActorTransform::GetWorldPivot() const\n    {\n        return Local2WorldPoint(mData->pivot*mData->size);\n    }\n\n    void ActorTransform::SetWorldPosition(const Vec2F& position)\n    {\n        CheckParentInvTransform();\n        SetPosition(position*mData->parentInvertedTransform);\n    }\n\n    Vec2F ActorTransform::GetWorldPosition() const\n    {\n        return mData->position*mData->parentTransform;\n    }\n\n    void ActorTransform::SetWorldRect(const RectF& rect)\n    {\n        CheckParentInvTransform();\n        SetRect(RectF(rect.LeftBottom()*mData->parentInvertedTransform, rect.RightTop()*mData->parentInvertedTransform));\n    }\n\n    RectF ActorTransform::GetWorldRect() const\n    {\n        return mData->worldRectangle;\n    }\n\n    void ActorTransform::SetWorldAngle(float rad)\n    {\n        SetAngle(rad - mData->parentTransform.GetAngle());\n    }\n\n    float ActorTransform::GetWorldAngle() const\n    {\n        return mData->worldTransform.GetAngle();\n    }\n\n    void ActorTransform::SetWorldAngleDegree(float deg)\n    {\n        SetWorldAngle(Math::Deg2rad(deg));\n    }\n\n    float ActorTransform::GetWorldAngleDegree() const\n    {\n        return Math::Rad2deg(GetWorldAngle());\n    }\n\n    void ActorTransform::SetWorldBasis(const Basis& basis)\n    {\n        CheckParentInvTransform();\n        SetBasis(basis*mData->parentInvertedTransform);\n    }\n\n    Basis ActorTransform::GetWorldBasis() const\n    {\n        if (IsDirty())\n            const_cast<ActorTransform*>(this)->Update();\n\n        return mData->worldTransform;\n    }\n\n    void ActorTransform::SetWorldNonSizedBasis(const Basis& basis)\n    {\n        CheckParentInvTransform();\n        SetNonSizedBasis(basis*mData->parentInvertedTransform);\n    }\n\n    Basis ActorTransform::GetWorldNonSizedBasis() const\n    {\n        return mData->worldNonSizedTransform;\n    }\n\n    void ActorTransform::SetWorldAxisAlignedRect(const RectF& rect)\n    {\n        CheckParentInvTransform();\n        SetAxisAlignedRect(RectF(rect.LeftBottom()*mData->parentInvertedTransform, rect.RightTop()*mData->parentInvertedTransform));\n    }\n\n    RectF ActorTransform::GetWorldAxisAlignedRect() const\n    {\n        RectF localAARect = GetRect();\n        RectF worldAARect(localAARect.LeftBottom()*mData->parentTransform, localAARect.RightTop()*mData->parentTransform);\n        return worldAARect;\n    }\n\n    void ActorTransform::SetWorldLeftTop(const Vec2F& position)\n    {\n        SetLeftTop(position - GetParentPosition());\n    }\n\n    Vec2F ActorTransform::GetWorldLeftTop() const\n    {\n        return Vec2F(GetWorldLeft(), GetWorldTop());\n    }\n\n    void ActorTransform::SetWorldRightTop(const Vec2F& position)\n    {\n        SetRightTop(position - GetParentPosition());\n    }\n\n    Vec2F ActorTransform::GetWorldRightTop() const\n    {\n        return Vec2F(GetWorldRight(), GetWorldTop());\n    }\n\n    void ActorTransform::SetWorldLeftBottom(const Vec2F& position)\n    {\n        SetLeftTop(position - GetParentPosition());\n    }\n\n    Vec2F ActorTransform::GetWorldLeftBottom() const\n    {\n        return Vec2F(GetWorldLeft(), GetWorldBottom());\n    }\n\n    void ActorTransform::SetWorldRightBottom(const Vec2F& position)\n    {\n        SetRightBottom(position - GetParentPosition());\n    }\n\n    Vec2F ActorTransform::GetWorldRightBottom() const\n    {\n        return Vec2F(GetWorldRight(), GetWorldBottom());\n    }\n\n    void ActorTransform::SetWorldCenter(const Vec2F& position)\n    {\n        Vec2F translate = position - GetWorldCenter();\n        SetWorldBasis(mData->worldTransform*Basis::Translated(translate));\n    }\n\n    Vec2F ActorTransform::GetWorldCenter() const\n    {\n        return mData->worldTransform.origin + (mData->worldTransform.xv + mData->worldTransform.yv)*0.5f;\n    }\n\n    void ActorTransform::SetWorldRightDir(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetRightDir().SignedAngle(dir));\n        SetWorldBasis(mData->worldTransform*transf);\n    }\n\n    Vec2F ActorTransform::GetWorldRightDir() const\n    {\n        return mData->worldNonSizedTransform.xv;\n    }\n\n    void ActorTransform::SetWorldLeftDir(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetLeftDir().SignedAngle(dir));\n        SetWorldBasis(mData->worldTransform*transf);\n    }\n\n    Vec2F ActorTransform::GetWorldLeftDir() const\n    {\n        return mData->worldNonSizedTransform.xv.Inverted();\n    }\n\n    void ActorTransform::SetWorldUpDir(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetUpDir().SignedAngle(dir));\n        SetWorldBasis(mData->worldTransform*transf);\n    }\n\n    Vec2F ActorTransform::GetWorldUpDir() const\n    {\n        return mData->worldNonSizedTransform.yv;\n    }\n\n    void ActorTransform::SetWorldDownDir(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetDownDir().SignedAngle(dir));\n        SetWorldBasis(mData->worldTransform*transf);\n    }\n\n    Vec2F ActorTransform::GetWorldDownDir() const\n    {\n        return mData->worldNonSizedTransform.yv.Inverted();\n    }\n\n    void ActorTransform::SetWorldRight(float value)\n    {\n        SetRight(value - GetParentPosition().x);\n    }\n\n    float ActorTransform::GetWorldRight() const\n    {\n        return GetWorldRect().right;\n    }\n\n    void ActorTransform::SetWorldLeft(float value)\n    {\n        SetLeft(value - GetParentPosition().x);\n    }\n\n    float ActorTransform::GetWorldLeft() const\n    {\n        return GetWorldRect().left;\n    }\n\n    void ActorTransform::SetWorldTop(float value)\n    {\n        SetTop(value - GetParentPosition().y);\n    }\n\n    float ActorTransform::GetWorldTop() const\n    {\n        return GetWorldRect().top;\n    }\n\n    void ActorTransform::SetWorldBottom(float value)\n    {\n        SetBottom(value - GetParentPosition().y);\n    }\n\n    float ActorTransform::GetWorldBottom() const\n    {\n        return GetWorldRect().bottom;\n    }\n\n    Vec2F ActorTransform::World2LocalPoint(const Vec2F& worldPoint) const\n    {\n        Vec2F nx = mData->worldTransform.xv, ny = mData->worldTransform.yv, offs = mData->worldTransform.origin, w = worldPoint;\n        float lx = (w.x*ny.y - offs.x*ny.y - w.y*ny.x + offs.y*ny.x) / (nx.x*ny.y - ny.x*nx.y);\n        float ly = (w.y - offs.y - nx.y*lx) / ny.y;\n        return Vec2F(lx, ly)*mData->size;\n    }\n\n    Vec2F ActorTransform::Local2WorldPoint(const Vec2F& localPoint) const\n    {\n        return mData->worldTransform*(localPoint / mData->size);\n    }\n\n    Vec2F ActorTransform::World2LocalDir(const Vec2F& worldDir) const\n    {\n        Vec2F nx = mData->worldTransform.xv / (mData->size.x*mData->scale.x), ny = mData->worldTransform.yv / (mData->size.y*mData->scale.y), wd = worldDir;\n        float ldy = (wd.x*nx.y - wd.y*nx.x) / (nx.y*ny.x - ny.y*nx.x);\n        float ldx = (wd.x - ny.x*ldy) / nx.x;\n        return Vec2F(ldx, ldy);\n    }\n\n    Vec2F ActorTransform::Local2WorldDir(const Vec2F& localDir) const\n    {\n        Vec2F nx = mData->worldTransform.xv / (mData->size.x*mData->scale.x), ny = mData->worldTransform.yv / (mData->size.y*mData->scale.y);\n        return nx*localDir.x + ny*localDir.y;\n    }\n\n    bool ActorTransform::IsPointInside(const Vec2F& point) const\n    {\n        Vec2F rs = mData->scale*mData->size;\n        Vec2F nx = mData->worldTransform.xv / rs.x, ny = mData->worldTransform.yv / rs.y;\n        Vec2F lp = point - mData->worldTransform.origin;\n\n        float dx = lp.Dot(nx);\n        float dy = lp.Dot(ny);\n\n        return dx >= 0.0f && dx <= rs.x && dy >= 0.0f && dy < rs.y;\n    }\n\n    void ActorTransform::SetOwner(const Ref<Actor>& actor)\n    {\n        mData->owner = actor;\n        SetDirty();\n    }\n\n    void ActorTransform::SetDirty(bool fromParent /*= false*/)\n    {\n        if (o2::Time::IsSingletonInitialzed())\n            mData->dirtyFrame = o2Time.GetCurrentFrame();\n\n        mData->updateFrame = 0;\n\n#if IS_EDITOR\n        if (mData->owner && !fromParent)\n            mData->owner.Lock()->OnChanged();\n#endif\n    }\n\n    void ActorTransform::Update()\n    {\n        UpdateRectangle();\n        UpdateTransform();\n        UpdateWorldRectangleAndTransform();\n\n        mData->updateFrame = mData->dirtyFrame;\n        mData->owner.Lock()->OnTransformUpdated();\n    }\n\n    void ActorTransform::UpdateRectangle()\n    {\n        Vec2F leftBottom = mData->position - mData->size*mData->pivot;\n        Vec2F rightTop = leftBottom + mData->size;\n        mData->rectangle.left = leftBottom.x;\n        mData->rectangle.right = rightTop.x;\n        mData->rectangle.bottom = leftBottom.y;\n        mData->rectangle.top = rightTop.y;\n    }\n\n    void ActorTransform::UpdateTransform()\n    {\n        mData->nonSizedTransform = Basis::Build(mData->position, mData->scale, mData->angle, mData->shear);\n        mData->transform.Set(mData->nonSizedTransform.origin, mData->nonSizedTransform.xv * mData->size.x, mData->nonSizedTransform.yv * mData->size.y);\n        mData->transform.origin = mData->transform.origin - mData->transform.xv*mData->pivot.x - mData->transform.yv*mData->pivot.y;\n    }\n\n    void ActorTransform::UpdateWorldRectangleAndTransform()\n    {\n        auto ownerActor = mData->owner.Lock();\n        if (mData->owner && ownerActor->mParent)\n        {\n            auto parentData = ownerActor->mParent.Lock()->transform->mData;\n            mData->parentRectangle = parentData->worldRectangle;\n            mData->parentRectangePosition = mData->parentRectangle.LeftBottom() + parentData->size*parentData->pivot;\n            mData->worldRectangle.left   = mData->parentRectangePosition.x + mData->rectangle.left;\n            mData->worldRectangle.right  = mData->parentRectangePosition.x + mData->rectangle.right;\n            mData->worldRectangle.bottom = mData->parentRectangePosition.y + mData->rectangle.bottom;\n            mData->worldRectangle.top    = mData->parentRectangePosition.y + mData->rectangle.top;\n\n            mData->parentTransform = ownerActor->mParent.Lock()->transform->mData->worldNonSizedTransform;\n            mData->worldNonSizedTransform = mData->nonSizedTransform*mData->parentTransform;\n            mData->worldTransform = mData->transform*mData->parentTransform;\n        }\n        else\n        {\n            mData->parentRectangle.left = 0; mData->parentRectangle.right = 0;\n            mData->parentRectangle.bottom = 0; mData->parentRectangle.top = 0;\n\n            mData->parentRectangePosition = Vec2F();\n            mData->worldRectangle.left   = mData->parentRectangePosition.x + mData->rectangle.left;\n            mData->worldRectangle.right  = mData->parentRectangePosition.x + mData->rectangle.right;\n            mData->worldRectangle.bottom = mData->parentRectangePosition.y + mData->rectangle.bottom;\n            mData->worldRectangle.top    = mData->parentRectangePosition.y + mData->rectangle.top;\n\n            mData->parentTransform = Basis::Identity();\n            mData->worldNonSizedTransform = mData->nonSizedTransform;\n            mData->worldTransform = mData->transform;\n        }\n    }\n\n    void ActorTransform::CheckParentInvTransform()\n    {\n        if (mData->parentInvTransformActualFrame == o2Time.GetCurrentFrame())\n            return;\n\n        mData->parentInvTransformActualFrame = o2Time.GetCurrentFrame();\n\n        if (mData->owner && mData->owner.Lock()->mParent)\n            mData->parentInvertedTransform = mData->owner.Lock()->mParent.Lock()->transform->mData->worldNonSizedTransform.Inverted();\n        else\n            mData->parentInvertedTransform = Basis::Identity();\n    }\n\n    void ActorTransform::OnSerialize(DataValue& node) const\n    {\n        node.Set(*mData);\n    }\n\n    void ActorTransform::OnDeserialized(const DataValue& node)\n    {\n        node.Get(*mData);\n        SetDirty();\n    }\n\n    void ActorTransform::OnSerializeDelta(DataValue& node, const IObject& origin) const\n    {\n        node.SetDelta(*mData, *dynamic_cast<const ActorTransform&>(origin).mData);\n    }\n\n    void ActorTransform::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        node.GetDelta(*mData, *dynamic_cast<const ActorTransform&>(origin).mData);\n        SetDirty();\n    }\n\n    Vec2F ActorTransform::GetParentPosition() const\n    {\n        if (!mData->owner || !mData->owner.Lock()->mParent)\n            return Vec2F();\n\n        return mData->owner.Lock()->mParent.Lock()->transform->mData->worldRectangle.LeftBottom();\n    }\n\n    RectF ActorTransform::GetParentRectangle() const\n    {\n        if (!mData->owner || !mData->owner.Lock()->mParent)\n            return RectF();\n\n        return mData->owner.Lock()->mParent.Lock()->transform->GetWorldRect();\n    }\n\n    bool ActorTransformData::IsSerializeEnabled() const\n    {\n        return true;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ActorTransform, o2__ActorTransform);\n\nDECLARE_CLASS(o2::ActorTransformData, o2__ActorTransformData);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ActorTransform.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/Attributes/PrototypeDeltaSearchAttribute.h\"\n#include \"o2/Utils/Math/Transform.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    class Actor;\n    class ActorTransformData;\n\n    // -------------------------------------------------------------------------------------------\n    // Actor transform. Represents the position of actor relative to his parent (the local space),\n    // and calculates the position relative to world (the world space).\n    // Position shows the pivot point, and pivot shows where is the rectangle of actor.\n    // Also this rectangle has angle, scale, size and shear.\n    //\n    // Note: the rectangle of transform here means the rectangle without angle, scale and shear.\n    // So, the final transform is rotated, scaled and sheared rectangle.\n    // -------------------------------------------------------------------------------------------\n    class ActorTransform: public ISerializable\n    {\n    public:\n        PROPERTIES(ActorTransform);\n        GETTER(Ref<Actor>, actor, GetOwnerActor); // Owner actor getter \n\n        PROPERTY(Vec2F, position, SetPosition, GetPosition);            // Position property\n        PROPERTY(float, positionX, SetPositionX, GetPositionX);         // Position property by X\n        PROPERTY(float, positionY, SetPositionY, GetPositionY);         // Position property by Y\n        PROPERTY(Vec2F, size, SetSize, GetSize);                        // Size property\n        PROPERTY(float, width, SetWidth, GetWidth);                     // Width property\n        PROPERTY(float, height, SetHeight, GetHeight);                  // Height property\n        PROPERTY(Vec2F, scale, SetScale, GetScale);                     // Scale property\n        PROPERTY(float, scaleX, SetScaleX, GetScaleX);                  // Scale property by X\n        PROPERTY(float, scaleY, SetScaleY, GetScaleY);                  // Scale property by Y\n        PROPERTY(Vec2F, pivot, SetPivot, GetPivot);                     // Pivot property, in local space\n        PROPERTY(Vec2F, szPivot, SetSizePivot, GetSizePivot);           // Pivot in size space property\n        PROPERTY(float, pivotX, SetPivotX, GetPivotX);                 // Pivot property by X\n        PROPERTY(float, pivotY, SetPivotY, GetPivotY);                 // Pivot property by Y\n        PROPERTY(float, angle, SetAngle, GetAngle);                     // Rotation angle in radians\n        PROPERTY(float, angleDegrees, SetAngleDegrees, GetAngleDegrees); // Rotation angle in degrees\n        PROPERTY(float, shear, SetShear, GetShear);                     // Shear property\n\n        PROPERTY(Basis, basis, SetBasis, GetBasis);                         // Transformation basis property\n        PROPERTY(Basis, nonSizedBasis, SetNonSizedBasis, GetNonSizedBasis); // Non sizes transformation basis property\n\n        PROPERTY(RectF, AABB, SetAxisAlignedRect, GetAxisAlignedRect); // Axis aligned rectangle\n        PROPERTY(RectF, rect, SetRect, GetRect);                       // Rectangle property. Rectangle - transform without angle, scale and shear. \n                                                                       // Sets the position and size\n\n        PROPERTY(Vec2F, leftTop, SetLeftTop, GetLeftTop);             // Left top corner property\n        PROPERTY(Vec2F, leftBottom, SetLeftBottom, GetLeftBottom);    // Left bottom corner property\n        PROPERTY(Vec2F, rightTop, SetRightTop, GetRightTop);          // Right top corner property\n        PROPERTY(Vec2F, rightBottom, SetRightBottom, GetRightBottom); // Right bottom corner property\n        PROPERTY(Vec2F, center, SetCenter, GetCenter);                // Center position property\n        PROPERTY(Vec2F, downDir, SetDownDir, GetDownDir);             // Negative Y axis direction property\n        PROPERTY(float, right, SetRight, GetRight);                   // Right border position property\n        PROPERTY(float, left, SetLeft, GetLeft);                      // Left border position property\n        PROPERTY(float, top, SetTop, GetTop);                         // Top border position property\n        PROPERTY(float, bottom, SetBottom, GetBottom);                // Bottom border position property\n\n        PROPERTY(Vec2F, worldPosition, SetWorldPosition, GetWorldPosition);                // World position property\n        PROPERTY(Vec2F, worldPivot, SetWorldPivot, GetWorldPivot);                         // Pivot property, in world space\n        PROPERTY(float, worldAngle, SetWorldAngle, GetWorldAngle);                         // World rotation angle in radians\n        PROPERTY(float, worldAngleDegree, SetWorldAngleDegree, GetWorldAngleDegree);       // World rotation angle in degree\n        PROPERTY(Basis, worldBasis, SetWorldBasis, GetWorldBasis);                         // World transformation basis\n        PROPERTY(Basis, worldNonSizedBasis, SetWorldNonSizedBasis, GetWorldNonSizedBasis); // World transformation basis without size\n\n        PROPERTY(Vec2F, worldLeftTop, SetWorldLeftTop, GetWorldLeftTop);             // World Left top corner property\n        PROPERTY(Vec2F, worldLeftBottom, SetWorldLeftBottom, GetWorldLeftBottom);    // World Left bottom corner property\n        PROPERTY(Vec2F, worldRightTop, SetWorldRightTop, GetWorldRightTop);          // World Right top corner property\n        PROPERTY(Vec2F, worldRightBottom, SetWorldRightBottom, GetWorldRightBottom); // World Right bottom corner property\n        PROPERTY(Vec2F, worldCenter, SetWorldCenter, GetWorldCenter);                // World center property\n        PROPERTY(Vec2F, worldUpDir, SetWorldUpDir, GetWorldUpDir);                   // World Y axis direction property\n\n        PROPERTY(float, worldRight, SetWorldRight, GetWorldRight);    // World Right border position property\n        PROPERTY(float, worldLeft, SetWorldLeft, GetWorldLeft);       // World Left border position property\n        PROPERTY(float, worldTop, SetWorldTop, GetWorldTop);          // World Top border position property\n        PROPERTY(float, worldBottom, SetWorldBottom, GetWorldBottom); // World Bottom border position property\n\n        PROPERTY(RectF, worldRect, SetWorldRect, GetWorldRect);                       // World rectangle property. Sets the position and size\n        PROPERTY(RectF, worldAABB, SetWorldAxisAlignedRect, GetWorldAxisAlignedRect); // World direction aligned rectangle\n\n    public:\n        ActorTransform(const Vec2F& size = Vec2F(), const Vec2F& position = Vec2F(), float angle = 0.0f,\n                       const Vec2F& scale = Vec2F(1.0f, 1.0f), const Vec2F& pivot = Vec2F(0.5f, 0.5f));\n\n        // Copy-constructor\n        ActorTransform(const ActorTransform& other);\n\n        // Destructor\n        ~ActorTransform();\n\n        // Assign operator\n        ActorTransform& operator=(const ActorTransform& other);\n\n        // Assign operator\n        //ActorTransform& operator=(const Transform& other);\n\n        // Check EqualSid operator\n        bool operator==(const ActorTransform& other) const;\n\n        // Returns owner actor\n        Ref<Actor> GetOwnerActor() const;\n\n        // Sets transform dirty and needed to update @SCRIPTABLE\n        virtual void SetDirty(bool fromParent = false);\n\n        // Returns is transform dirty @SCRIPTABLE\n        bool IsDirty() const;\n\n        // Updates transformation\n        virtual void Update();\n\n        // Sets position @SCRIPTABLE\n        virtual void SetPosition(const Vec2F& position);\n\n        // Returns position @SCRIPTABLE\n        Vec2F GetPosition() const;\n\n        // Sets position by X @SCRIPTABLE\n        virtual void SetPositionX(float value);\n\n        // Returns position by X @SCRIPTABLE\n        float GetPositionX() const;\n\n        // Sets position by Y @SCRIPTABLE\n        virtual void SetPositionY(float value);\n\n        // Returns position by Y @SCRIPTABLE\n        float GetPositionY() const;\n\n        // Sets size @SCRIPTABLE\n        virtual void SetSize(const Vec2F& size);\n\n        // Return size @SCRIPTABLE\n        virtual Vec2F GetSize() const;\n\n        // Sets width @SCRIPTABLE\n        virtual void SetWidth(float value);\n\n        // Return width @SCRIPTABLE\n        virtual float GetWidth() const;\n\n        // Sets height @SCRIPTABLE\n        virtual void SetHeight(float value);\n\n        // Return height @SCRIPTABLE\n        virtual float GetHeight() const;\n\n        // Sets pivot, in local space, where (0, 0) - left down corner, (1; 1) - right top @SCRIPTABLE\n        virtual void SetPivot(const Vec2F& pivot);\n\n        // Return pivot, in local space, where (0, 0) - left down corner, (1; 1) - right top @SCRIPTABLE\n        Vec2F GetPivot() const;\n\n        // Sets size pivot, in local space, where (0, 0) - left down corner, (size.x, size.y) - right top @SCRIPTABLE\n        void SetSizePivot(const Vec2F& relPivot);\n\n        // Returns size pivot, in local space, where (0, 0) - left down corner, (size.x, size.y) - right top @SCRIPTABLE\n        Vec2F GetSizePivot() const;\n\n        // Sets pivot by X @SCRIPTABLE\n        void SetPivotX(float value);\n\n        // Returns pivot by X @SCRIPTABLE\n        float GetPivotX() const;\n\n        // Sets pivot by Y @SCRIPTABLE\n        void SetPivotY(float value);\n        \n        // Returns pivot by Y @SCRIPTABLE\n        float GetPivotY() const;\n\n        // Sets scale @SCRIPTABLE\n        void SetScale(const Vec2F& scale);\n\n        // Sets scale by X @SCRIPTABLE\n        void SetScaleX(float scaleX);\n\n        // Sets scale by Y @SCRIPTABLE\n        void SetScaleY(float scaleY);\n\n        // Returns scale @SCRIPTABLE\n        Vec2F GetScale() const;\n\n        // Returns scale by X @SCRIPTABLE\n        float GetScaleX() const;\n\n        // Returns scale by Y @SCRIPTABLE\n        float GetScaleY() const;\n\n        // Sets rotation angle, in radians @SCRIPTABLE\n        void SetAngle(float rad);\n\n        // Returns rotation angle in radians @SCRIPTABLE\n        float GetAngle() const;\n\n        // Sets rotation angle, in degrees @SCRIPTABLE\n        void SetAngleDegrees(float deg);\n\n        // Returns rotation angle in degrees @SCRIPTABLE\n        float GetAngleDegrees() const;\n\n        // Sets shear @SCRIPTABLE\n        void SetShear(float shear);\n\n        // Returns shear @SCRIPTABLE\n        float GetShear() const;\n\n        // Sets basis @SCRIPTABLE\n        virtual void SetBasis(const Basis& basis);\n\n        // Returns basis @SCRIPTABLE\n        Basis GetBasis() const;\n\n        // Sets basis without size @SCRIPTABLE\n        virtual void SetNonSizedBasis(const Basis& basis);\n\n        // Returns basis without size @SCRIPTABLE\n        Basis GetNonSizedBasis() const;\n\n        // Sets rect @SCRIPTABLE\n        virtual void SetRect(const RectF& rect);\n\n        // Returns rect @SCRIPTABLE\n        virtual RectF GetRect() const;\n\n        // Sets direction aligned rectangle transformation @SCRIPTABLE\n        virtual void SetAxisAlignedRect(const RectF& rect);\n\n        // Returns direction aligned rectangle transformation @SCRIPTABLE\n        RectF GetAxisAlignedRect() const;\n\n        // Sets left top corner position @SCRIPTABLE\n        void SetLeftTop(const Vec2F& position);\n\n        // Returns left top corner position @SCRIPTABLE\n        Vec2F GetLeftTop() const;\n\n        // Sets right top corner position @SCRIPTABLE\n        void SetRightTop(const Vec2F& position);\n\n        // Returns right top corner position @SCRIPTABLE\n        Vec2F GetRightTop() const;\n\n        // Sets left down corner position\n        void SetLeftBottom(const Vec2F& position);\n\n        // Returns left down corner position @SCRIPTABLE\n        Vec2F GetLeftBottom() const;\n\n        // Sets left right bottom position @SCRIPTABLE\n        void SetRightBottom(const Vec2F& position);\n\n        // Returns right bottom corner position @SCRIPTABLE\n        Vec2F GetRightBottom() const;\n\n        // Sets center position @SCRIPTABLE\n        void SetCenter(const Vec2F& position);\n\n        // Returns center position @SCRIPTABLE\n        Vec2F GetCenter() const;\n\n        // Set local right direction @SCRIPTABLE\n        void SetRightDir(const Vec2F& dir);\n\n        // Returns local right direction @SCRIPTABLE\n        Vec2F GetRightDir() const;\n\n        // Set local left direction @SCRIPTABLE\n        void SetLeftDir(const Vec2F& dir);\n\n        // Returns local left direction @SCRIPTABLE\n        Vec2F GetLeftDir() const;\n\n        // Set local up direction @SCRIPTABLE\n        void SetUpDir(const Vec2F& dir);\n\n        // Returns local up direction @SCRIPTABLE\n        Vec2F GetUpDir() const;\n\n        // Set local down direction @SCRIPTABLE\n        void SetDownDir(const Vec2F& dir);\n\n        // Returns local down direction @SCRIPTABLE\n        Vec2F GetDownDir() const;\n\n        // Set local right border position @SCRIPTABLE\n        void SetRight(float value);\n\n        // Returns local right border position @SCRIPTABLE\n        float GetRight() const;\n\n        // Set local left border position @SCRIPTABLE\n        void SetLeft(float value);\n\n        // Returns local left border position @SCRIPTABLE\n        float GetLeft() const;\n\n        // Set local top border position @SCRIPTABLE\n        void SetTop(float value);\n\n        // Returns local top border  @SCRIPTABLE\n        float GetTop() const;\n\n        // Set local down border position @SCRIPTABLE\n        void SetBottom(float value);\n\n        // Returns local down border position @SCRIPTABLE\n        float GetBottom() const;\n\n        // Transforms point from world space into local @SCRIPTABLE\n        Vec2F World2LocalPoint(const Vec2F& worldPoint) const;\n\n        // Transforms point from local space into world @SCRIPTABLE\n        Vec2F Local2WorldPoint(const Vec2F& localPoint) const;\n\n        // Transforms direction from world space into local @SCRIPTABLE\n        Vec2F World2LocalDir(const Vec2F& worldDir) const;\n\n        // Transforms direction from local space into world @SCRIPTABLE\n        Vec2F Local2WorldDir(const Vec2F& localDir) const;\n\n        // Returns true when point inside this @SCRIPTABLE\n        bool IsPointInside(const Vec2F& point) const;\n\n        // Sets world position @SCRIPTABLE\n        void SetWorldPosition(const Vec2F& position);\n\n        // Returns world position @SCRIPTABLE\n        Vec2F GetWorldPosition() const;\n\n        // Sets pivot by world coordinates @SCRIPTABLE\n        void SetWorldPivot(const Vec2F& pivot);\n\n        // Returns pivot position in world coordinates @SCRIPTABLE\n        Vec2F GetWorldPivot() const;\n\n        // Sets world rotation angle, in radians @SCRIPTABLE\n        void SetWorldAngle(float rad);\n\n        // Returns world rotation angle in radians @SCRIPTABLE\n        float GetWorldAngle() const;\n\n        // Sets world rotation angle, in degrees @SCRIPTABLE\n        void SetWorldAngleDegree(float deg);\n\n        // Returns world rotation angle in degrees @SCRIPTABLE\n        float GetWorldAngleDegree() const;\n\n        // Sets world basis @SCRIPTABLE\n        void SetWorldBasis(const Basis& basis);\n\n        // Returns world basis @SCRIPTABLE\n        Basis GetWorldBasis() const;\n\n        // Sets world basis without size @SCRIPTABLE\n        void SetWorldNonSizedBasis(const Basis& basis);\n\n        // Returns world basis without size @SCRIPTABLE\n        Basis GetWorldNonSizedBasis() const;\n\n        // Sets world rect @SCRIPTABLE\n        void SetWorldRect(const RectF& rect);\n\n        // Returns world rect @SCRIPTABLE\n        RectF GetWorldRect() const;\n\n        // Sets world direction aligned rectangle transformation @SCRIPTABLE\n        void SetWorldAxisAlignedRect(const RectF& rect);\n\n        // Returns world direction aligned rectangle transformation @SCRIPTABLE\n        RectF GetWorldAxisAlignedRect() const;\n\n        // Sets world left top corner position @SCRIPTABLE\n        void SetWorldLeftTop(const Vec2F& position);\n\n        // Returns world left top corner position @SCRIPTABLE\n        Vec2F GetWorldLeftTop() const;\n\n        // Sets world right top corner position @SCRIPTABLE\n        void SetWorldRightTop(const Vec2F& position);\n\n        // Returns world right top corner position @SCRIPTABLE\n        Vec2F GetWorldRightTop() const;\n\n        // Sets world left down corner position @SCRIPTABLE\n        void SetWorldLeftBottom(const Vec2F& position);\n\n        // Returns world left down corner position @SCRIPTABLE\n        Vec2F GetWorldLeftBottom() const;\n\n        // Sets world left right bottom position @SCRIPTABLE\n        void SetWorldRightBottom(const Vec2F& position);\n\n        // Returns world right bottom corner position @SCRIPTABLE\n        Vec2F GetWorldRightBottom() const;\n\n        // Sets world center position @SCRIPTABLE\n        void SetWorldCenter(const Vec2F& position);\n\n        // Returns world center position @SCRIPTABLE\n        Vec2F GetWorldCenter() const;\n\n        // Set World right direction @SCRIPTABLE\n        void SetWorldRightDir(const Vec2F& dir);\n\n        // Returns World right direction @SCRIPTABLE\n        Vec2F GetWorldRightDir() const;\n\n        // Set World left direction @SCRIPTABLE\n        void SetWorldLeftDir(const Vec2F& dir);\n\n        // Returns World left direction @SCRIPTABLE\n        Vec2F GetWorldLeftDir() const;\n\n        // Set World up direction @SCRIPTABLE\n        void SetWorldUpDir(const Vec2F& dir);\n\n        // Returns World up direction @SCRIPTABLE\n        Vec2F GetWorldUpDir() const;\n\n        // Set World down direction @SCRIPTABLE\n        void SetWorldDownDir(const Vec2F& dir);\n\n        // Returns World down direction @SCRIPTABLE\n        Vec2F GetWorldDownDir() const;\n\n        // Set World right border position @SCRIPTABLE\n        void SetWorldRight(float value);\n\n        // Returns World right border position @SCRIPTABLE\n        float GetWorldRight() const;\n\n        // Set World left border position @SCRIPTABLE\n        void SetWorldLeft(float value);\n\n        // Returns World left border position @SCRIPTABLE\n        float GetWorldLeft() const;\n\n        // Set World top border position @SCRIPTABLE\n        void SetWorldTop(float value);\n\n        // Returns World top border position @SCRIPTABLE\n        float GetWorldTop() const;\n\n        // Set World down border position @SCRIPTABLE\n        void SetWorldBottom(float value);\n\n        // Returns World down border position @SCRIPTABLE\n        float GetWorldBottom() const;\n\n        SERIALIZABLE(ActorTransform);\n\n    protected:\n        ActorTransformData* mData; // Data container. Will be stored in optimized storage @DELTA_SEARCH\n\n    protected:\n        // Actor transform constructor with specified data\n        ActorTransform(ActorTransformData* data);\n\n        // Copies data parameters from other transform\n        virtual void CopyFrom(const ActorTransform& other);\n\n        // Sets owner and updates transform\n        virtual void SetOwner(const Ref<Actor>& actor);\n\n        // Returns parent rectange, or zero when no parent\n        virtual RectF GetParentRectangle() const;\n\n        // Updates world rectangle and transform relative to parent or origin\n        void UpdateWorldRectangleAndTransform();\n\n        // Updates local transformation\n        void UpdateTransform();\n\n        // Updates local rectangle\n        void UpdateRectangle();\n\n        // Check parentInvertedTransform for actual\n        void CheckParentInvTransform();\n\n        // Beginning serialization callback, writes data\n        void OnSerialize(DataValue& node) const override;\n\n        // Called when object was deserialized, reads data\n        void OnDeserialized(const DataValue& node) override;\n\n        // Beginning serialization delta callback\n        void OnSerializeDelta(DataValue& node, const IObject& origin) const override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n        // Returns parent world rect position - left bottom corner\n        Vec2F GetParentPosition() const;\n\n        friend class Actor;\n        friend class WidgetLayout;\n    };\n\n    class ActorTransformData : public ISerializable\n    {\n    public:\n        int dirtyFrame = 1;  // Frame index, when layout was marked as dirty\n        int updateFrame = 1; // Frame index, when layout was updated\n\n        Vec2F position;            // Position @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        Vec2F size;                // Size @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        Vec2F scale = Vec2F(1, 1); // Scale, (1, 1) is default @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        Vec2F pivot;               // Pivot: (0, 0) is left bottom corner - (1, 1) is right top corner @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        float angle = 0.0f;        // Rotation angle in radians @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        float shear = 0.0f;        // Shear @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n\n        RectF rectangle;              // The rectangle in local space\n        RectF parentRectangle;        // The parent rectangle\n        Vec2F parentRectangePosition; // The parent rectangle pivot position\n        RectF worldRectangle;         // The rectangle in world space\n\n        Basis transform;         // Final transform basis\n        Basis nonSizedTransform; // Final transform basis without size\n\n        Basis worldNonSizedTransform; // World transform without size\n        Basis worldTransform;         // Result world basis\n\n        Basis parentInvertedTransform;       // Parent world transform inverted\n        Basis parentTransform;               // Parent world transform\n        int   parentInvTransformActualFrame; // last mParentInvertedTransform actual frame index\n\n        WeakRef<Actor> owner; // Owner actor \n\n        SERIALIZABLE(ActorTransformData);\n\n        // Returns is serialize enabled; used to turn off fields serialization\n        virtual bool IsSerializeEnabled() const;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ActorTransform)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ActorTransform)\n{\n    FIELD().PUBLIC().NAME(actor);\n    FIELD().PUBLIC().NAME(position);\n    FIELD().PUBLIC().NAME(positionX);\n    FIELD().PUBLIC().NAME(positionY);\n    FIELD().PUBLIC().NAME(size);\n    FIELD().PUBLIC().NAME(width);\n    FIELD().PUBLIC().NAME(height);\n    FIELD().PUBLIC().NAME(scale);\n    FIELD().PUBLIC().NAME(scaleX);\n    FIELD().PUBLIC().NAME(scaleY);\n    FIELD().PUBLIC().NAME(pivot);\n    FIELD().PUBLIC().NAME(szPivot);\n    FIELD().PUBLIC().NAME(pivotX);\n    FIELD().PUBLIC().NAME(pivotY);\n    FIELD().PUBLIC().NAME(angle);\n    FIELD().PUBLIC().NAME(angleDegrees);\n    FIELD().PUBLIC().NAME(shear);\n    FIELD().PUBLIC().NAME(basis);\n    FIELD().PUBLIC().NAME(nonSizedBasis);\n    FIELD().PUBLIC().NAME(AABB);\n    FIELD().PUBLIC().NAME(rect);\n    FIELD().PUBLIC().NAME(leftTop);\n    FIELD().PUBLIC().NAME(leftBottom);\n    FIELD().PUBLIC().NAME(rightTop);\n    FIELD().PUBLIC().NAME(rightBottom);\n    FIELD().PUBLIC().NAME(center);\n    FIELD().PUBLIC().NAME(downDir);\n    FIELD().PUBLIC().NAME(right);\n    FIELD().PUBLIC().NAME(left);\n    FIELD().PUBLIC().NAME(top);\n    FIELD().PUBLIC().NAME(bottom);\n    FIELD().PUBLIC().NAME(worldPosition);\n    FIELD().PUBLIC().NAME(worldPivot);\n    FIELD().PUBLIC().NAME(worldAngle);\n    FIELD().PUBLIC().NAME(worldAngleDegree);\n    FIELD().PUBLIC().NAME(worldBasis);\n    FIELD().PUBLIC().NAME(worldNonSizedBasis);\n    FIELD().PUBLIC().NAME(worldLeftTop);\n    FIELD().PUBLIC().NAME(worldLeftBottom);\n    FIELD().PUBLIC().NAME(worldRightTop);\n    FIELD().PUBLIC().NAME(worldRightBottom);\n    FIELD().PUBLIC().NAME(worldCenter);\n    FIELD().PUBLIC().NAME(worldUpDir);\n    FIELD().PUBLIC().NAME(worldRight);\n    FIELD().PUBLIC().NAME(worldLeft);\n    FIELD().PUBLIC().NAME(worldTop);\n    FIELD().PUBLIC().NAME(worldBottom);\n    FIELD().PUBLIC().NAME(worldRect);\n    FIELD().PUBLIC().NAME(worldAABB);\n    FIELD().PROTECTED().DELTA_SEARCH_ATTRIBUTE().NAME(mData);\n}\nEND_META;\nCLASS_METHODS_META(o2::ActorTransform)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vec2F&, const Vec2F&, float, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ActorTransform&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Actor>, GetOwnerActor);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetDirty, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsDirty);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetPosition);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetPositionX, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetPositionX);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetPositionY, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetPositionY);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetSize, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetSize);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWidth, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetWidth);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetHeight, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetHeight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetPivot, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetPivot);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetSizePivot, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetSizePivot);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetPivotX, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetPivotX);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetPivotY, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetPivotY);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetScale, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetScaleX, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetScaleY, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetScale);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetScaleX);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetScaleY);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAngle, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetAngle);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAngleDegrees, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetAngleDegrees);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetShear, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetShear);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetBasis, const Basis&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Basis, GetBasis);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetNonSizedBasis, const Basis&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Basis, GetNonSizedBasis);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetRect, const RectF&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(RectF, GetRect);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAxisAlignedRect, const RectF&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(RectF, GetAxisAlignedRect);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetLeftTop, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetLeftTop);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetRightTop, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetRightTop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeftBottom, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetLeftBottom);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetRightBottom, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetRightBottom);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetCenter, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetCenter);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetRightDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetRightDir);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetLeftDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetLeftDir);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetUpDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetUpDir);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetDownDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetDownDir);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetRight, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetRight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetLeft, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetLeft);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetTop, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetTop);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetBottom, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetBottom);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, World2LocalPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, Local2WorldPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, World2LocalDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, Local2WorldDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsPointInside, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldPosition);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldPivot, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldPivot);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldAngle, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetWorldAngle);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldAngleDegree, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetWorldAngleDegree);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldBasis, const Basis&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Basis, GetWorldBasis);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldNonSizedBasis, const Basis&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Basis, GetWorldNonSizedBasis);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldRect, const RectF&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(RectF, GetWorldRect);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldAxisAlignedRect, const RectF&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(RectF, GetWorldAxisAlignedRect);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldLeftTop, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldLeftTop);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldRightTop, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldRightTop);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldLeftBottom, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldLeftBottom);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldRightBottom, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldRightBottom);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldCenter, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldCenter);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldRightDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldRightDir);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldLeftDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldLeftDir);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldUpDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldUpDir);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldDownDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWorldDownDir);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldRight, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetWorldRight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldLeft, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetWorldLeft);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldTop, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetWorldTop);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWorldBottom, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetWorldBottom);\n    FUNCTION().PROTECTED().CONSTRUCTOR(ActorTransformData*);\n    FUNCTION().PROTECTED().SIGNATURE(void, CopyFrom, const ActorTransform&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetOwner, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(RectF, GetParentRectangle);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateWorldRectangleAndTransform);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTransform);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateRectangle);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckParentInvTransform);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerializeDelta, DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, GetParentPosition);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ActorTransformData)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ActorTransformData)\n{\n    FIELD().PUBLIC().DEFAULT_VALUE(1).NAME(dirtyFrame);\n    FIELD().PUBLIC().DEFAULT_VALUE(1).NAME(updateFrame);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).NAME(position);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).NAME(size);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).DEFAULT_VALUE(Vec2F(1, 1)).NAME(scale);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).NAME(pivot);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).DEFAULT_VALUE(0.0f).NAME(angle);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).DEFAULT_VALUE(0.0f).NAME(shear);\n    FIELD().PUBLIC().NAME(rectangle);\n    FIELD().PUBLIC().NAME(parentRectangle);\n    FIELD().PUBLIC().NAME(parentRectangePosition);\n    FIELD().PUBLIC().NAME(worldRectangle);\n    FIELD().PUBLIC().NAME(transform);\n    FIELD().PUBLIC().NAME(nonSizedTransform);\n    FIELD().PUBLIC().NAME(worldNonSizedTransform);\n    FIELD().PUBLIC().NAME(worldTransform);\n    FIELD().PUBLIC().NAME(parentInvertedTransform);\n    FIELD().PUBLIC().NAME(parentTransform);\n    FIELD().PUBLIC().NAME(parentInvTransformActualFrame);\n    FIELD().PUBLIC().NAME(owner);\n}\nEND_META;\nCLASS_METHODS_META(o2::ActorTransformData)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSerializeEnabled);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/CameraActor.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"CameraActor.h\"\n\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/ISceneDrawable.h\"\n#include \"o2/Render/Render.h\"\n#include \"Component.h\"\n\nnamespace o2\n{\n    CameraActor::CameraActor(RefCounter* refCounter) :\n        Actor(refCounter)\n    {}\n\n    CameraActor::CameraActor(RefCounter* refCounter, const CameraActor& other) :\n        Actor(refCounter, other), mType(other.mType), mFixedOrFittedSize(other.mFixedOrFittedSize), mUnits(other.mUnits)\n    {}\n\n    CameraActor::~CameraActor()\n    {\n        o2Scene.OnCameraRemovedScene(this);\n    }\n\n    CameraActor& CameraActor::operator=(const CameraActor& other)\n    {\n        Actor::operator=(other);\n\n        mType = other.mType;\n        mFixedOrFittedSize = other.mFixedOrFittedSize;\n        mUnits = other.mUnits;\n\n        return *this;\n    }\n\n    void CameraActor::Setup()\n    {\n        PROFILE_SAMPLE_FUNC();\n        o2Render.SetCamera(GetRenderCamera());\n    }\n\n    void CameraActor::SetupAndDraw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (fillBackground)\n            o2Render.Clear(fillColor);\n\n        listenersLayer->OnBeginDraw();\n\n        Camera prevCamera = o2Render.GetCamera();\n        Setup();\n\n        listenersLayer->camera = o2Render.GetCamera();\n\n        if (o2Input.IsKeyDown('G'))\n        {\n            o2Debug.Log(\"==========================Draw dump\");\n\n            for (auto& layer : drawLayers.GetLayers())\n            {\n                o2Debug.Log(\"== Layer \" + layer->GetName() + \" ==\");\n\n                Function<void(const Ref<ISceneDrawable>&, int)> printDrawable = [&printDrawable](const Ref<ISceneDrawable>& drawable, int depth)\n                {\n                    String str;\n                    for (int i = 0; i < depth; i++)\n                        str += \"  \";\n\n                    str += \"(\" + drawable->GetType().GetName() + \") \";\n                    auto actor = DynamicCast<Actor>(drawable);\n                    if (!actor)\n                    {\n                        if (auto component = DynamicCast<Component>(drawable))\n                            actor = component->GetActor();\n                    }\n\n                    while (actor)\n                    {\n                        str += actor->GetName();\n                        if (actor->GetParent())\n                            str += \" #\" + (String)(actor->GetParent().Lock()->GetChildren().IndexOf(actor)) + \"/\";\n\n                        actor = actor->GetParent().Lock();\n                    }\n\n                    o2Debug.Log(str);\n\n                    for (auto& inherited : drawable->GetChildrenInheritedDepth())\n                        printDrawable(inherited, depth + 1);\n                };\n\n                for (auto& drawable : layer->mDrawables)\n                {                    \n                    printDrawable(drawable, 1);\n\n                    if (auto root = DynamicCast<SceneLayerRootDrawablesContainer>(drawable))\n                    {\n                        o2Debug.Log(\"  ROOT:\");\n\n                        for (auto& child : root->GetChildrenInheritedDepth())\n                        {\n                            printDrawable(child, 2);\n                        }\n                    }\n                }\n            }\n        }\n\n        {\n            PROFILE_SAMPLE(\"CameraActor::SetupAndDraw - Draw layers\");\n\n            for (auto& layer : drawLayers.GetLayers())\n            {\n                for (auto& comp : layer->mDrawables)\n                    comp->Draw();\n            }\n        }\n\n        o2Render.SetCamera(prevCamera);\n\n        listenersLayer->OnEndDraw();\n    }\n\n    Camera CameraActor::GetRenderCamera() const\n    {\n        Camera camera;\n        switch (mType)\n        {\n            case Type::Default: camera = Camera::Default(); break;\n            case Type::FreeSize: camera = Camera::FixedSize(transform->GetSize()); break;\n            case Type::FixedSize: camera = Camera::FixedSize(mFixedOrFittedSize); break;\n            case Type::FittedSize: camera = Camera::FittedSize(mFixedOrFittedSize); break;\n            case Type::PhysicalCorrect: camera = Camera::PhysicalCorrect(mUnits); break;\n            default: camera = Camera::Default(); break;\n        }\n\n        transform->size = camera.GetSize();\n        transform->Update();\n        camera.basis = transform->worldBasis;\n\n        return camera;\n    }\n\n    void CameraActor::SetDefault()\n    {\n        mType = Type::Default;\n    }\n\n    void CameraActor::SetFixedSize(const Vec2F& size)\n    {\n        mType = Type::FixedSize;\n        mFixedOrFittedSize = size;\n        mUnits = Units::Pixels;\n    }\n\n    void CameraActor::SetFittedSize(const Vec2F& size)\n    {\n        mType = Type::FittedSize;\n        mFixedOrFittedSize = size;\n        mUnits = Units::Pixels;\n    }\n\n    void CameraActor::SetPhysicalCorrect(Units units)\n    {\n        mType = Type::PhysicalCorrect;\n        mUnits = units;\n    }\n\n    CameraActor::Type CameraActor::GetCameraType() const\n    {\n        return mType;\n    }\n\n    const Vec2F& CameraActor::GetFittedOrFixedSize() const\n    {\n        return mFixedOrFittedSize;\n    }\n\n    Units CameraActor::GetUnits() const\n    {\n        return mUnits;\n    }\n\n    void CameraActor::OnAddToScene()\n    {\n        o2Scene.OnCameraAddedOnScene(this);\n\n        Actor::OnAddToScene();\n    }\n\n    void CameraActor::OnRemoveFromScene()\n    {\n        o2Scene.OnCameraRemovedScene(this);\n\n        Actor::OnRemoveFromScene();\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::CameraActor>);\n// --- META ---\n\nENUM_META(o2::CameraActor::Type, o2__CameraActor__Type)\n{\n    ENUM_ENTRY(Default);\n    ENUM_ENTRY(FittedSize);\n    ENUM_ENTRY(FixedSize);\n    ENUM_ENTRY(FreeSize);\n    ENUM_ENTRY(PhysicalCorrect);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::CameraActor, o2__CameraActor);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/CameraActor.h",
    "content": "#pragma once\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/SceneLayersList.h\"\n#include \"o2/Events/CursorAreaEventsListenersLayer.h\"\n\nnamespace o2\n{\n    // -------------------------------------------------------------------------------\n    // Camera actor. Can works with different types, renders layers or itself children\n    // -------------------------------------------------------------------------------\n    class CameraActor: public Actor\n    {\n    public:\n        enum class Type { Default, FreeSize, FixedSize, FittedSize, PhysicalCorrect };\n\n    public:\n        SceneLayersList drawLayers; // List of drawing layers @SERIALIZABLE\n\n        bool   fillBackground = true;       // Is background filling with solid color @SERIALIZABLE\n        Color4 fillColor = Color4::White(); // Background fill color @SERIALIZABLE\n\n        Ref<CursorAreaEventListenersLayer> listenersLayer = mmake<CursorAreaEventListenersLayer>(); // Listeners layer\n\n    public:\n        // Default constructor\n        CameraActor(RefCounter* refCounter);\n\n        // Copy constructor\n        CameraActor(RefCounter* refCounter, const CameraActor& other);\n\n        // Destructor\n        ~CameraActor() override;\n\n        // Copy operator\n        CameraActor& operator=(const CameraActor& other);\n\n        // Sets camera to render\n        void Setup();\n\n        // Sets camera to render and renders content (layers or children)\n        void SetupAndDraw();\n\n        // Returns rendering camera\n        Camera GetRenderCamera() const;\n\n        // Sets default camera\n        void SetDefault();\n\n        // Sets camera with fixed size\n        void SetFixedSize(const Vec2F& size);\n\n        // Sets camera with fixed aspect\n        void SetFittedSize(const Vec2F& size);\n\n        // Sets camera with physical correct units\n        void SetPhysicalCorrect(Units units);\n\n        // Returns camera type\n        Type GetCameraType() const;\n\n        // Returns fitter or fixed camera size\n        const Vec2F& GetFittedOrFixedSize() const;\n\n        // Returns current camera units\n        Units GetUnits() const;\n\n        SERIALIZABLE(CameraActor);\n        CLONEABLE_REF(CameraActor);\n\n    protected:\n        Type  mType = Type::Default;       // Type of camera @SERIALIZABLE\n        Vec2F mFixedOrFittedSize;          // Fitted or fixed types size @SERIALIZABLE\n        Units mUnits = Units::Centimeters; // Physical camera units @SERIALIZABLE\n\n    protected:\n        // Called when actor has added to scene\n        void OnAddToScene() override;\n\n        // Called when actor has removed from scene\n        void OnRemoveFromScene() override;\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::CameraActor::Type);\n\nCLASS_BASES_META(o2::CameraActor)\n{\n    BASE_CLASS(o2::Actor);\n}\nEND_META;\nCLASS_FIELDS_META(o2::CameraActor)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(drawLayers);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(fillBackground);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Color4::White()).NAME(fillColor);\n    FIELD().PUBLIC().DEFAULT_VALUE(mmake<CursorAreaEventListenersLayer>()).NAME(listenersLayer);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Type::Default).NAME(mType);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mFixedOrFittedSize);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Units::Centimeters).NAME(mUnits);\n}\nEND_META;\nCLASS_METHODS_META(o2::CameraActor)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const CameraActor&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Setup);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetupAndDraw);\n    FUNCTION().PUBLIC().SIGNATURE(Camera, GetRenderCamera);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDefault);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFixedSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFittedSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPhysicalCorrect, Units);\n    FUNCTION().PUBLIC().SIGNATURE(Type, GetCameraType);\n    FUNCTION().PUBLIC().SIGNATURE(const Vec2F&, GetFittedOrFixedSize);\n    FUNCTION().PUBLIC().SIGNATURE(Units, GetUnits);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Component.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Component.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/ActorRefResolver.h\"\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n    Component::Component() :\n        Component(nullptr)\n    {}\n\n    Component::Component(RefCounter* refCounter, const Component& other) :\n        RefCounterable(refCounter), mEnabled(other.mEnabled), mEnabledInHierarchy(false), mId(Math::Random())\n    {\n        ActorRefResolver::ComponentCreated(this);\n    }\n\n    Component::Component(RefCounter* refCounter):\n        RefCounterable(refCounter), mId(Math::Random())\n    {\n        ActorRefResolver::ComponentCreated(this);\n    }\n\n    Component::Component(const Component& other):\n        Component(other.GetRefCounter(), other)\n    {}\n\n    Component::~Component()\n    {}\n\n    Component& Component::operator=(const Component& other)\n    {\n        mEnabled = other.mEnabled;\n        UpdateEnabledInHierarchy();\n\n#if IS_EDITOR\n        if (mOwner)\n            mOwner.Lock()->OnChanged();\n#endif\n\n        return *this;\n    }\n\n    SceneUID Component::GetID() const\n    {\n        return mId;\n    }\n\n    void Component::GenerateNewID()\n    {\n        mId = Math::Random();\n    }\n\n    void Component::SetEnabled(bool active)\n    {\n        if (mEnabled == active)\n            return;\n\n        mEnabled = active;\n        UpdateEnabledInHierarchy();\n\n#if IS_EDITOR\n        if (mOwner)\n            mOwner.Lock()->OnChanged();\n#endif\n    }\n\n    void Component::Enable()\n    {\n        SetEnabled(true);\n    }\n\n    void Component::Disable()\n    {\n        SetEnabled(false);\n    }\n\n    bool Component::IsEnabled() const\n    {\n        return mEnabled;\n    }\n\n    bool Component::IsEnabledInHierarchy() const\n    {\n        return mEnabledInHierarchy;\n    }\n\n    const WeakRef<Component>& Component::GetPrototypeLink() const\n    {\n        return mPrototypeLink;\n    }\n\n    bool Component::IsLinkedToComponent(const Ref<Component>& component) const\n    {\n        if (mPrototypeLink)\n        {\n            auto t = mPrototypeLink;\n            while (t)\n            {\n                if (t == component)\n                    return true;\n\n                t = t.Lock()->mPrototypeLink;\n            }\n        }\n\n        return false;\n    }\n\n    Ref<Actor> Component::GetActor() const\n    {\n        return mOwner.Lock();\n    }\n\n    String Component::GetName()\n    {\n        return String();\n    }\n\n    String Component::GetCategory()\n    {\n        return \"\";\n    }\n\n    String Component::GetIcon()\n    {\n        return \"ui/UI4_component_icon.png\";\n    }\n\n    bool Component::IsAvailableFromCreateMenu()\n    {\n        return true;\n    }\n\n    void Component::UpdateEnabledInHierarchy()\n    {\n        bool lastEnabledInHierarchy = mEnabledInHierarchy;\n\n        if (mOwner)\n            mEnabledInHierarchy = mEnabled && mOwner.Lock()->mResEnabledInHierarchy;\n        else\n            mEnabledInHierarchy = mEnabled;\n\n        if (lastEnabledInHierarchy != mEnabledInHierarchy)\n        {\n            if (mEnabledInHierarchy)\n                OnEnabled();\n            else\n                OnDisabled();\n\n#if IS_EDITOR\n            if (mOwner)\n                mOwner.Lock()->OnChanged();\n#endif\n        }\n    }\n\n    void Component::OnSerialize(DataValue& node) const\n    {\n        node.AddMember(\"mId\") = mId;\n    }\n\n    void Component::OnDeserialized(const DataValue& node)\n    {\n        auto prevId = mId;\n        mId = node.GetMember(\"mId\");\n        ActorRefResolver::OnComponentIdChanged(this, prevId);\n    }\n\n    void Component::OnSerializeDelta(DataValue& node, const IObject& origin) const\n    {\n        OnSerialize(node);\n    }\n\n    void Component::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        OnDeserialized(node);\n    }\n\n    void Component::AddToScene()\n    {\n        o2Scene.OnComponentAdded(this);\n        OnAddToScene();\n    }\n\n    void Component::RemoveFromScene()\n    {\n        o2Scene.OnComponentRemoved(this);\n        OnRemoveFromScene();\n    }\n\n    void Component::SetOwnerActor(const Ref<Actor>& actor)\n    {\n        if (mOwner == actor)\n            return;\n\n        if (mOwner)\n            mOwner.Lock()->RemoveComponent(Ref(this));\n\n        mOwner = actor;\n\n        OnParentChanged(nullptr);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Component, o2__Component);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Component.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n\nnamespace o2\n{\n    class Actor;\n    \n    // ---------------------------\n    // Actor's component interface\n    // ---------------------------\n    class Component: public RefCounterable, virtual public ISerializable, virtual public ICloneableRef\n    {\n    public:\n        PROPERTIES(Component);\n        GETTER(Ref<Actor>, actor, GetActor);               // Owner actor getter\n        PROPERTY(bool, enabled, SetEnabled, IsEnabled);         // Enabling property @EDITOR_IGNORE\n        GETTER(bool, enabledInHierarchy, IsEnabledInHierarchy); // Is enabled in hierarchy property\n        \n    public:\n        // Default constructor\n        Component();\n        \n        // Default constructor with ref counter\n        explicit Component(RefCounter* refCounter);\n        \n        // Copy-constructor\n        Component(const Component& other);\n        \n        // Copy-constructor with ref counter\n        Component(RefCounter* refCounter, const Component& other);\n        \n        // Virtual destructor\n        virtual ~Component();\n        \n        // Copy-operator\n        Component& operator=(const Component& other);\n        \n        // Returns component id\n        SceneUID GetID() const;\n        \n        // Regenerates component id\n        void GenerateNewID();\n        \n        // Sets component enable\n        virtual void SetEnabled(bool active);\n        \n        // Enables component\n        void Enable();\n        \n        // Disables component\n        void Disable();\n        \n        // Returns is component enabled\n        bool IsEnabled() const;\n        \n        // Returns is component enabled in hierarchy\n        bool IsEnabledInHierarchy() const;\n        \n        // Returns prototype link\n        const WeakRef<Component>& GetPrototypeLink() const;\n        \n        // Returns is this linked to specified component with depth links search\n        bool IsLinkedToComponent(const Ref<Component>& component) const;\n        \n        // Returns owner actor\n        Ref<Actor> GetActor() const;\n        \n        // Returns component with type\n        template<typename _type>\n        Ref<_type> GetComponent() const;\n        \n        // Returns component with type in children\n        template<typename _type>\n        Ref<_type> GetComponentInChildren() const;\n        \n        // Returns components with type\n        template<typename _type>\n        Vector<Ref<_type>> GetComponents() const;\n        \n        // Returns components with type in children\n        template<typename _type>\n        Vector<Ref<_type>> GetComponentsInChildren() const;\n        \n        // Returns name of component\n        static String GetName();\n        \n        // Returns category of component\n        static String GetCategory();\n        \n        // Returns name of component icon\n        static String GetIcon();\n        \n        // Is component visible in create menu\n        static bool IsAvailableFromCreateMenu();\n        \n#if IS_EDITOR\n        // Called when component added from editor\n        virtual void OnAddedFromEditor() {}\n#endif\n        \n        SERIALIZABLE(Component);\n        CLONEABLE_REF(Component);\n        \n    protected:\n        WeakRef<Actor> mOwner; // Owner actor\n        \n        SceneUID mId; // Component id @EDITOR_IGNORE\n        \n        WeakRef<Component> mPrototypeLink; // Prototype actor component pointer. Null if no actor prototype\n        \n        bool mEnabled = true;             // Is component enabled @SERIALIZABLE @EDITOR_IGNORE\n        bool mEnabledInHierarchy = false; // Is component enabled in hierarchy\n        \n    protected:\n        // Beginning serialization callback\n        void OnSerialize(DataValue& node) const override;\n        \n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n        \n        // Beginning serialization delta callback\n        void OnSerializeDelta(DataValue& node, const IObject& origin) const override;\n        \n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n        \n        // Adds component to scene\n        virtual void AddToScene();\n        \n        // Removes component from scene\n        virtual void RemoveFromScene();\n        \n        // Updates component enable\n        virtual void UpdateEnabledInHierarchy();\n        \n        // Sets owner actor\n        virtual void SetOwnerActor(const Ref<Actor>& actor);\n        \n        // Called when actor was included to scene\n        virtual void OnAddToScene() {}\n        \n        // Called when actor was excluded from scene\n        virtual void OnRemoveFromScene() {}\n        \n        // Called when component, actor and scene was initialized\n        virtual void OnInitialized() {}\n        \n        // Called when component started working on first update frame\n        virtual void OnStart() {}\n        \n        // Called when component will be destroyed\n        virtual void OnDestroy() {}\n        \n        // Updates component\n        virtual void OnUpdate(float dt) {}\n        \n        // Draws component\n        virtual void OnDraw() {}\n\n        // Draws component after all drawables\n        virtual void OnPostDraw() {}\n\n        // Updates component with fixed delta time\n        virtual void OnFixedUpdate(float dt) {}\n        \n        // Called when actor enabled in hierarchy\n        virtual void OnEnabled() {}\n        \n        // Called when actor disabled in hierarchy\n        virtual void OnDisabled() {}\n        \n        // Called when actor's transform was changed\n        virtual void OnTransformUpdated() {}\n        \n        // Called when parent changed\n        virtual void OnParentChanged(const Ref<Actor>& oldParent) {}\n        \n        // Called when children list changed\n        virtual void OnChildrenChanged() {}\n        \n        // Called when child actor was added\n        virtual void OnChildAdded(const Ref<Actor>& child) {}\n        \n        // Called when child actor was removed\n        virtual void OnChildRemoved(const Ref<Actor>& child) {}\n        \n        // Called when new component has added to actor\n        virtual void OnComponentAdded(const Ref<Component>& component) {}\n        \n        // Called when component going to be removed from actor\n        virtual void OnComponentRemoving(const Ref<Component>& component) {}\n        \n        friend class Actor;\n        friend class ActorRefResolver;\n        friend class BaseComponentLinkRef;\n        friend class Scene;\n        friend class Widget;\n        friend struct ActorDifferences;\n    };\n}\n\n#include \"o2/Scene/Actor.h\"\n\nnamespace o2\n{\n\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Component)\n{\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Component)\n{\n    FIELD().PUBLIC().NAME(actor);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(enabled);\n    FIELD().PUBLIC().NAME(enabledInHierarchy);\n    FIELD().PROTECTED().NAME(mOwner);\n    FIELD().PROTECTED().EDITOR_IGNORE_ATTRIBUTE().NAME(mId);\n    FIELD().PROTECTED().NAME(mPrototypeLink);\n    FIELD().PROTECTED().EDITOR_IGNORE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mEnabled);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mEnabledInHierarchy);\n}\nEND_META;\nCLASS_METHODS_META(o2::Component)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Component&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Component&);\n    FUNCTION().PUBLIC().SIGNATURE(SceneUID, GetID);\n    FUNCTION().PUBLIC().SIGNATURE(void, GenerateNewID);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Enable);\n    FUNCTION().PUBLIC().SIGNATURE(void, Disable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEnabledInHierarchy);\n    FUNCTION().PUBLIC().SIGNATURE(const WeakRef<Component>&, GetPrototypeLink);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLinkedToComponent, const Ref<Component>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Actor>, GetActor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableFromCreateMenu);\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(void, OnAddedFromEditor);\n#endif\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerializeDelta, DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveFromScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateEnabledInHierarchy);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetOwnerActor, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnInitialized);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStart);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDestroy);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnPostDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFixedUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnParentChanged, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildrenChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildAdded, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildRemoved, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentAdded, const Ref<Component>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentRemoving, const Ref<Component>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ComponentLinkRef.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ComponentLinkRef.h\"\n\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n    BaseComponentLinkRef::BaseComponentLinkRef()\n    {}\n\n    BaseComponentLinkRef::BaseComponentLinkRef(const BaseComponentLinkRef& other)\n    {\n        if (other.mRequiredResolveData)\n        {\n            mRequiredResolveData = other.mRequiredResolveData->Clone();\n            mRequiredResolveData->RequireResolve(*this);\n        }\n\n        ActorRefResolver::RequireRemap(*this);\n    }\n\n    BaseComponentLinkRef::~BaseComponentLinkRef()\n    {\n        mRequiredResolveData = nullptr;\n        ActorRefResolver::OnComponentDestroyed(this);\n    }\n\n    void BaseComponentLinkRef::Set(Component* component)\n    {}\n\n    Component* BaseComponentLinkRef::Get()\n    {\n        return nullptr;\n    }\n\n    const Component* BaseComponentLinkRef::Get() const\n    {\n        return nullptr;\n    }\n\n    void BaseComponentLinkRef::Destroy()\n    {\n        o2Scene.DestroyComponent(Ref(Get()));\n    }\n\n    const Type& BaseComponentLinkRef::GetComponentType() const\n    {\n        return TypeOf(Component);\n    }\n\n    const Type* BaseComponentLinkRef::GetComponentTypeStatic()\n    {\n        return &TypeOf(Component);\n    }\n\n    bool BaseComponentLinkRef::EqualsDelta(const BaseComponentLinkRef& obj, const BaseComponentLinkRef& origin)\n    {\n        if (obj.Get() == origin.Get())\n            return true;\n\n        if (obj.Get() && obj.Get()->mPrototypeLink.Lock().Get() == origin.Get())\n            return true;\n\n        return false;\n    }\n\n    void BaseComponentLinkRef::CopyWithoutRemap(const BaseComponentLinkRef& other)\n    {}\n\n    void BaseComponentLinkRef::OnSerialize(DataValue& node) const\n    {\n        if (auto component = Get())\n        {\n            auto actor = component->mOwner.Lock();\n            if (actor)\n            {\n                if (actor->mIsAsset)\n                    node.AddMember(\"AssetID\") = actor->GetAssetID();\n                else\n                    node.AddMember(\"ActorID\") = actor->GetID();\n\n                node.AddMember(\"ComponentId\") = component->mId;\n            }\n        }\n    }\n\n    void BaseComponentLinkRef::OnDeserialized(const DataValue& node)\n    {\n        if (auto assetIdNode = node.FindMember(\"AssetId\"))\n        {\n            auto resolveData = mmake<AssetRequireResolveData>();\n            resolveData->uid = (UID)*assetIdNode;\n            resolveData->componentUID = (SceneUID)node.GetMember(\"ComponentId\");\n            resolveData->RequireResolve(*this);\n            mRequiredResolveData = resolveData;\n        }\n        else if (auto sceneIdNode = node.FindMember(\"ActorID\"))\n        {\n            auto resolveData = mmake<SceneRequireResolveData>();\n            resolveData->uid = (SceneUID)*sceneIdNode;\n            resolveData->componentUID = (SceneUID)node.GetMember(\"ComponentId\");\n            resolveData->RequireResolve(*this);\n            mRequiredResolveData = resolveData;\n        }\n        else \n            Set(nullptr);\n    }\n\n    void BaseComponentLinkRef::SceneRequireResolveData::RequireResolve(BaseComponentLinkRef& ref)\n    {\n        ActorRefResolver::RequireResolve(ref, uid, componentUID);\n    }\n\n    Ref<BaseComponentLinkRef::IRequiredResolveData> BaseComponentLinkRef::SceneRequireResolveData::Clone() const\n    {\n        return mmake<SceneRequireResolveData>(*this);\n    }\n\n    void BaseComponentLinkRef::AssetRequireResolveData::RequireResolve(BaseComponentLinkRef& ref)\n    {\n        ActorRefResolver::RequireResolve(ref, uid, componentUID);\n    }\n\n    Ref<BaseComponentLinkRef::IRequiredResolveData> BaseComponentLinkRef::AssetRequireResolveData::Clone() const\n    {\n        return mmake<AssetRequireResolveData>(*this);\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Component>);\n// --- META ---\n\nDECLARE_CLASS(o2::BaseComponentLinkRef, o2__BaseComponentLinkRef);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ComponentLinkRef.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/LinkRef.h\"\n\nnamespace o2\n{\n    // ---------------------------------------------------------------------\n    // Component reference, automatically invalidates when component deletes\n    // ---------------------------------------------------------------------\n    class BaseComponentLinkRef: public ISerializable\n    {\n    public:\n        // Default constructor, no reference\n        BaseComponentLinkRef();\n\n        // Creates a copy of component and returns reference on it\n        BaseComponentLinkRef(const BaseComponentLinkRef& other);\n\n        // Destructor\n        ~BaseComponentLinkRef();\n\n        // Sets component @SCRIPTABLE\n        virtual void Set(Component* component);\n\n        // Returns component pointer @SCRIPTABLE\n        virtual Component* Get();\n\n        // Returns component pointer\n        virtual const Component* Get() const;\n\n        // Destroy the component @SCRIPTABLE\n        void Destroy();\n\n        // Returns component type\n        virtual const Type& GetComponentType() const;\n\n        // Copying ref without requiring remap\n        virtual void CopyWithoutRemap(const BaseComponentLinkRef& other);\n\n        // Returns component type\n        static const Type* GetComponentTypeStatic();\n\n        // Checks refs are equals for serializing delta\n        static bool EqualsDelta(const BaseComponentLinkRef& obj, const BaseComponentLinkRef& origin);\n\n        SERIALIZABLE(BaseComponentLinkRef);\n\n    protected:\n        // ------------------------------\n        // Reference resolve request data\n        // ------------------------------\n        struct IRequiredResolveData: public RefCounterable\n        {\n            SceneUID componentUID;\n\n            // Request resolve reference\n            virtual void RequireResolve(BaseComponentLinkRef& ref) = 0;\n\n            // Clone data\n            virtual Ref<IRequiredResolveData> Clone() const = 0;\n        };\n\n        // -------------------------------------------------\n        // Reference resolve request data by component scene uid\n        // -------------------------------------------------\n        struct SceneRequireResolveData : public IRequiredResolveData\n        {\n            SceneUID uid;\n\n            // Request resolve reference\n            void RequireResolve(BaseComponentLinkRef& ref) override;\n\n            // Clone data\n            Ref<IRequiredResolveData> Clone() const override;\n        };\n\n        // -------------------------------------------\n        // Reference resolve request data by asset uid\n        // -------------------------------------------\n        struct AssetRequireResolveData : public IRequiredResolveData\n        {\n            UID uid;\n\n            // Request resolve reference\n            void RequireResolve(BaseComponentLinkRef& ref) override;\n\n            // Clone data\n            Ref<IRequiredResolveData> Clone() const override;\n        };\n\n        Ref<IRequiredResolveData> mRequiredResolveData; // Reference resolve request data. Used for resolving reference after deserialization.\n                                                        // Not null only when reference is required to resolve. Copies in reference copying.\n\n    protected:\n        // Beginning serialization callback\n        void OnSerialize(DataValue& node) const override;\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        friend class Component;\n        friend class ComponentRefResolver;\n    };\n\n#define ENABLE_COMPONENT typename std::enable_if<IsBaseOf<Component, _component_type>::value>::type\n\n    // ---------------------------------------\n    // Reference on derived from component classes\n    // ---------------------------------------\n    template<typename _component_type>\n    class LinkRef<_component_type, ENABLE_COMPONENT> : public BaseComponentLinkRef\n    {\n    public:\n        // Default constructor, no reference\n        LinkRef();\n\n        // Nullptr constructor\n        LinkRef(std::nullptr_t);\n\n        // Constructor with component pointer\n        explicit LinkRef(_component_type* ptr);\n\n        // Copy constructor from other reference\n        LinkRef(const Ref<_component_type>& other);\n\n        // Move constructor from other reference\n        LinkRef(Ref<_component_type>&& other);\n\n        // Copy constructor from other component reference\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _component_type*>::value>::type>\n        LinkRef(const LinkRef<_other_type>& other);\n\n        // Move constructor from other component reference\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _component_type*>::value>::type>\n        LinkRef(LinkRef<_other_type>&& other);\n\n        // Equality operator\n        bool operator==(const LinkRef<_component_type>& other) const;\n\n        // Equality operator\n        bool operator==(const _component_type* other) const;\n\n        // Inequality operator\n        bool operator!=(const LinkRef<_component_type>& other) const;\n\n        // Inequality operator\n        bool operator!=(const _component_type* other) const;\n\n        // Copy operator from other component reference\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _component_type*>::value>::type>\n        LinkRef<_component_type>& operator=(const LinkRef<_other_type>& other);\n\n        // Move operator from other component reference\n        LinkRef<_component_type>& operator=(Ref<_component_type>&& other);\n\n        // Move operator from nullptr\n        LinkRef<_component_type>& operator=(std::nullptr_t);\n\n        // Less operator\n        bool operator<(const LinkRef<_component_type>& other) const;\n\n        // Returns is reference is valid\n        bool IsValid() const;\n\n        // Returns is reference is valid\n        explicit operator bool() const;\n\n        // Returns component reference\n        operator Ref<_component_type>() const;\n\n        // Returns component reference\n        _component_type& operator*() const;\n\n        // Returns component pointer\n        _component_type* operator->() const;\n\n        // Returns component pointer \n        _component_type* Get() override;\n\n        // Returns component pointer\n        const _component_type* Get() const override;\n\n        // Returns reference\n        Ref<_component_type>& GetRef();\n\n        // Returns reference\n        const Ref<_component_type>& GetRef() const;\n\n        // Sets component pointer\n        void Set(Component* component) override;\n\n        // Returns component type\n        const Type& GetComponentType() const override;\n\n        // Copying ref without requiring remap\n        void CopyWithoutRemap(const BaseComponentLinkRef& other) override;\n\n        // Returns component type\n        static const Type* GetComponentTypeStatic();\n\n    protected:\n        Ref<_component_type> mRef; // Reference to component\n\n    public:\n        typedef LinkRef<_component_type> _thisType;\n\n        SERIALIZABLE_MAIN(_thisType);\n        IOBJECT_SCRIPTING();\n\n        template<typename _type_processor>\n        static void ProcessBaseTypes(_thisType* object, _type_processor& processor)\n        {\n            typedef _thisType thisclass;\n            processor.template StartBases<_thisType>(object, type);\n\n            BASE_CLASS(o2::BaseComponentLinkRef);\n        }\n\n        template<typename _type_processor>\n        static void ProcessFields(_thisType* object, _type_processor& processor)\n        {\n            typedef _thisType thisclass;\n            processor.template StartFields<_thisType>(object, type);\n\n            FIELD().PROTECTED().NAME(mRef);\n        }\n\n        template<typename _type_processor>\n        static void ProcessMethods(_thisType* object, _type_processor& processor)\n        {\n            typedef _thisType thisclass;\n            processor.template StartMethods<_thisType>(object, type);\n\n            FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(_component_type*);\n            FUNCTION().PUBLIC().SIGNATURE(const Type&, GetComponentType);\n            FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetComponentTypeStatic);\n        }\n    };\n\n    template<typename _component_type>\n    LinkRef<_component_type, ENABLE_COMPONENT>::LinkRef()\n    {}\n\n    template<typename _component_type>\n    LinkRef<_component_type, ENABLE_COMPONENT>::LinkRef(std::nullptr_t) :\n        mRef(nullptr)\n    {}\n\n    template<typename _component_type>\n    LinkRef<_component_type, ENABLE_COMPONENT>::LinkRef(_component_type* ptr) :\n        mRef(ptr)\n    {}\n\n    template<typename _component_type>\n    LinkRef<_component_type, ENABLE_COMPONENT>::LinkRef(const Ref<_component_type>& ref) :\n        mRef(ref)\n    {}\n\n    template<typename _component_type>\n    LinkRef<_component_type, ENABLE_COMPONENT>::LinkRef(Ref<_component_type> && other):\n        mRef(std::move(other))\n    {}\n\n    template<typename _component_type>\n    template<typename _other_type, typename _enable>\n    LinkRef<_component_type, ENABLE_COMPONENT>::LinkRef(const LinkRef<_other_type>& other) :\n        mRef(other.mRef)\n    {}\n\n    template<typename _component_type>\n    template<typename _other_type, typename>\n    LinkRef<_component_type, ENABLE_COMPONENT>::LinkRef(LinkRef<_other_type>&& other) :\n        mRef(std::move(other.mRef))\n    {}\n\n    template<typename _component_type>\n    bool LinkRef<_component_type, ENABLE_COMPONENT>::operator==(const LinkRef<_component_type>& other) const\n    {\n        return mRef == other.mRef;\n    }\n\n    template<typename _component_type>\n    bool LinkRef<_component_type, ENABLE_COMPONENT>::operator==(const _component_type* other) const\n    {\n        return mRef == other;\n    }\n\n    template<typename _component_type>\n    bool LinkRef<_component_type, ENABLE_COMPONENT>::operator!=(const LinkRef<_component_type>& other) const\n    {\n        return mRef != other.mRef;\n    }\n\n    template<typename _component_type>\n    bool LinkRef<_component_type, ENABLE_COMPONENT>::operator!=(const _component_type* other) const\n    {\n        return mRef != other;\n    }\n\n    template<typename _component_type>\n    template<typename _other_type, typename _enable>\n    LinkRef<_component_type>& LinkRef<_component_type, ENABLE_COMPONENT>::operator=(const LinkRef<_other_type>& other)\n    {\n        mRef = other.mRef;\n        return *this;\n    }\n\n    template<typename _component_type>\n    LinkRef<_component_type>& LinkRef<_component_type, ENABLE_COMPONENT>::operator=(Ref<_component_type>&& other)\n    {\n        mRef = std::move(other);\n        return *this;\n    }\n\n    template<typename _component_type>\n    LinkRef<_component_type>& LinkRef<_component_type, ENABLE_COMPONENT>::operator=(std::nullptr_t)\n    {\n        mRef = nullptr;\n        return *this;\n    }\n\n    template<typename _component_type>\n    bool LinkRef<_component_type, ENABLE_COMPONENT>::operator<(const LinkRef<_component_type>& other) const\n    {\n        return mRef < other.mRef;\n    }\n\n    template<typename _component_type>\n    bool LinkRef<_component_type, ENABLE_COMPONENT>::IsValid() const\n    {\n        return mRef.IsValid();\n    }\n\n    template<typename _component_type>\n    LinkRef<_component_type, ENABLE_COMPONENT>::operator bool() const\n    {\n        return IsValid();\n    }\n\n    template<typename _component_type>\n    LinkRef<_component_type, ENABLE_COMPONENT>::operator Ref<_component_type>() const\n    {\n        return mRef;\n    }\n\n    template<typename _component_type>\n    _component_type& LinkRef<_component_type, ENABLE_COMPONENT>::operator*() const\n    {\n        return *mRef;\n    }\n\n    template<typename _component_type>\n    _component_type* LinkRef<_component_type, ENABLE_COMPONENT>::operator->() const\n    {\n        return mRef.Get();\n    }\n\n    template<typename _component_type>\n    _component_type* LinkRef<_component_type, ENABLE_COMPONENT>::Get()\n    {\n        return mRef.Get();\n    }\n\n    template<typename _component_type>\n    const _component_type* LinkRef<_component_type, ENABLE_COMPONENT>::Get() const\n    {\n        return mRef.Get();\n    }\n\n    template<typename _component_type>\n    Ref<_component_type>& LinkRef<_component_type, ENABLE_COMPONENT>::GetRef()\n    {\n        return mRef;\n    }\n\n    template<typename _component_type>\n    const Ref<_component_type>& LinkRef<_component_type, ENABLE_COMPONENT>::GetRef() const\n    {\n        return mRef;\n    }\n\n    template<typename _component_type>\n    void LinkRef<_component_type, ENABLE_COMPONENT>::Set(Component* component)\n    {\n        *this = LinkRef(dynamic_cast<_component_type*>(component));\n    }\n\n    template<typename _component_type>\n    const Type& LinkRef<_component_type, ENABLE_COMPONENT>::GetComponentType() const\n    {\n        return TypeOf(_component_type);\n    }\n\n    template<typename _component_type>\n    void LinkRef<_component_type, ENABLE_COMPONENT>::CopyWithoutRemap(const BaseComponentLinkRef& other)\n    {\n        mRef = Ref(dynamic_cast<_component_type*>(const_cast<Component*>(other.Get())));\n        mRequiredResolveData = nullptr;\n    }\n\n    template<typename _component_type>\n    const Type* LinkRef<_component_type, ENABLE_COMPONENT>::GetComponentTypeStatic()\n    {\n        return &TypeOf(_component_type);\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(o2::BaseComponentLinkRef)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::BaseComponentLinkRef)\n{\n    FIELD().PROTECTED().NAME(mRequiredResolveData);\n}\nEND_META;\nCLASS_METHODS_META(o2::BaseComponentLinkRef)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const BaseComponentLinkRef&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Set, Component*);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Component*, Get);\n    FUNCTION().PUBLIC().SIGNATURE(const Component*, Get);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Destroy);\n    FUNCTION().PUBLIC().SIGNATURE(const Type&, GetComponentType);\n    FUNCTION().PUBLIC().SIGNATURE(void, CopyWithoutRemap, const BaseComponentLinkRef&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(const Type*, GetComponentTypeStatic);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, EqualsDelta, const BaseComponentLinkRef&, const BaseComponentLinkRef&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/AnimationComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationComponent.h\"\n\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n\nnamespace o2\n{\n    AnimationComponent::AnimationComponent()\n    {}\n\n    AnimationComponent::AnimationComponent(RefCounter* refCounter, const AnimationComponent& other):\n        Component(refCounter, other)\n    {\n        for (auto& state : other.mStates)\n            AddState(state->CloneAsRef<AnimationState>());\n    }\n\n    AnimationComponent::~AnimationComponent()\n    {\n        RemoveAllStates();\n    }\n\n    AnimationComponent& AnimationComponent::operator=(const AnimationComponent& other)\n    {\n        RemoveAllStates();\n\n        for (auto& state : other.mStates)\n            AddState(state->CloneAsRef<AnimationState>());\n\n        return *this;\n    }\n\n    void AnimationComponent::OnUpdate(float dt)\n    {\n        for (auto& state : mStates)\n            state->Update(dt);\n\n        for (auto& val : mValues)\n            val->Update();\n\n        if (mBlend.time > 0)\n            mBlend.Update(dt);\n    }\n\n    Ref<IAnimationState> AnimationComponent::AddState(const Ref<IAnimationState>& state)\n    {\n        state->Register(Ref(this));\n        mStates.Add(state);\n\n        return state;\n    }\n\n    Ref<IAnimationState> AnimationComponent::AddState(const String& name, const Ref<AnimationClip>& animation, const AnimationMask& mask,\n                                                     float weight)\n    {\n        Ref<AnimationState> res = mmake<AnimationState>(name);\n        res->mAnimation = mmake<AnimationAsset>(animation);\n        res->mask = mask;\n        res->mWeight = weight;\n        return AddState(res);\n    }\n\n    Ref<IAnimationState> AnimationComponent::AddState(const String& name)\n    {\n        Ref<AnimationState> res = mmake<AnimationState>(name);\n        return AddState(res);\n    }\n\n    void AnimationComponent::RemoveState(const Ref<IAnimationState>& state)\n    {\n        state->Unregister();\n        mStates.Remove(state);\n    }\n\n    void AnimationComponent::RemoveState(const String& name)\n    {\n        RemoveState(GetState(name));\n    }\n\n    void AnimationComponent::RemoveAllStates()\n    {\n        mStates.Clear();\n        mValues.Clear();\n    }\n\n    Ref<IAnimationState> AnimationComponent::GetState(const String& name)\n    {\n        for (auto& state : mStates)\n        {\n            if (state->name == name)\n                return state;\n        }\n\n        return nullptr;\n    }\n\n\tRef<IAnimationState> AnimationComponent::GetFirstState(bool createIfNotExists /*= false*/)\n\t{\n        if (mStates.IsEmpty())\n        {\n            if (createIfNotExists)\n                return AddState(\"default\");\n\t\t\telse\n\t\t\t\treturn nullptr;\n        }\n\n\t\treturn mStates[0];\n\t}\n\n\tconst Vector<Ref<IAnimationState>>& AnimationComponent::GetStates() const\n    {\n        return mStates;\n    }\n\n    Map<String, Ref<IAnimationState>> AnimationComponent::GetAllStates() const\n    {\n        Map<String, Ref<IAnimationState>> result;\n\n        for (auto& state : mStates)\n            result[state->name] = state;\n\n        return result;\n    }\n\n    Vector<String> AnimationComponent::GetStatesNames() const\n    {\n        Vector<String> result;\n        \n        for (auto& state : mStates)\n            result.Add(state->name);\n            \n        return result;\n    }\n\n\tRef<IAnimationState> AnimationComponent::PlayFirstState()\n\t{\n        if (mStates.IsEmpty())\n            return nullptr;\n\n\t\tauto state = mStates[0];\n\t\tstate->GetPlayer().RewindAndPlay();\n\n\t\treturn state;\n\t}\n\n\tRef<IAnimationState> AnimationComponent::Play(const Ref<AnimationClip>& animation, const String& name)\n    {\n        auto state = AddState(name, animation, AnimationMask(), 1.0f);\n        state->GetPlayer().Play();\n        return state;\n    }\n\n    Ref<IAnimationState> AnimationComponent::Play(const Ref<AnimationClip>& animation)\n    {\n        auto state = AddState(\"unknown\", animation, AnimationMask(), 1.0f);\n        state->GetPlayer().Play();\n        return state;\n    }\n\n    Ref<IAnimationState> AnimationComponent::Play(const String& name)\n    {\n        auto state = GetState(name);\n        if (!state)\n        {\n            o2Debug.LogWarning(\"Can't play animation: \" + name);\n            return nullptr;\n        }\n\n        state->GetPlayer().Play();\n\n        return state;\n    }\n\n    Ref<IAnimationState> AnimationComponent::BlendTo(const Ref<AnimationClip>& animation, const String& name, float duration /*= 1.0f*/)\n    {\n        auto state = AddState(name, animation, AnimationMask(), 1.0f);\n        return BlendTo(state, duration);\n    }\n\n    Ref<IAnimationState> AnimationComponent::BlendTo(const Ref<AnimationClip>& animation, float duration /*= 1.0f*/)\n    {\n        auto state = AddState(\"unknown\", animation, AnimationMask(), 1.0f);\n        return BlendTo(state, duration);\n    }\n\n    Ref<IAnimationState> AnimationComponent::BlendTo(const String& name, float duration /*= 1.0f*/)\n    {\n        auto state = GetState(name);\n        if (!state)\n        {\n            o2Debug.LogWarning(\"Can't blend animation: \" + name);\n            return nullptr;\n        }\n        return BlendTo(state, duration);\n    }\n\n    Ref<IAnimationState> AnimationComponent::BlendTo(const Ref<IAnimationState>& state, float duration /*= 1.0f*/)\n    {\n        mBlend.blendOffStates.Clear();\n\n        for (auto& state : mStates)\n        {\n            if (state->GetPlayer().IsPlaying())\n                mBlend.blendOffStates.Add(state);\n        }\n\n        mBlend.blendOnState = state;\n        mBlend.duration = duration;\n        mBlend.time = duration;\n\n        state->GetPlayer().Play();\n\n        return state;\n    }\n\n    void AnimationComponent::Stop(const String& animationName)\n    {\n        Ref<IAnimationState> state = GetState(animationName);\n        if (!state)\n        {\n            o2Debug.LogWarning(\"Can't stop animation: \" + animationName);\n            return;\n        }\n\n        state->GetPlayer().Stop();\n    }\n\n    void AnimationComponent::StopAll()\n    {\n        for (auto& state : mStates)\n            state->GetPlayer().Stop();\n\n        mBlend.time = -1;\n    }\n\n    String AnimationComponent::GetName()\n    {\n        return \"Animation\";\n    }\n\n    String AnimationComponent::GetCategory()\n    {\n        return \"Animation\";\n    }\n\n    String AnimationComponent::GetIcon()\n    {\n        return \"ui/UI4_animation_component.png\";\n    }\n\n    void AnimationComponent::OnStart()\n    {\n        for (auto& state : mStates)\n        {\n            if (state->autoPlay)\n                state->GetPlayer().Play();\n        }\n    }\n\n    void AnimationComponent::OnInitialized()\n    {\n        ReattachAnimationStates();\n        Component::OnInitialized();\n    }\n\n    void AnimationComponent::RegSubTrack(const Ref<AnimationSubTrack::Player>& player, const String& path,\n                                         const Ref<AnimationState>& state)\n    {\n        RegTrack<void, AnimationSubTrack, SubTrackMixer>(player, path, state);\n    }\n\n    void AnimationComponent::UnregTrack(const Ref<IAnimationTrack::IPlayer>& player, const String& path)\n    {\n        for (auto& val : mValues)\n        {\n            if (val->path == path)\n            {\n                val->RemoveTrack(player.Get());\n\n                if (val->IsEmpty())\n                    mValues.Remove(val);\n\n                return;\n            }\n        }\n    }\n\n    void AnimationComponent::OnStateAnimationTrackAdded(const Ref<AnimationState>& state, const Ref<IAnimationTrack::IPlayer>& player)\n    {\n        player->RegMixer(state, player->GetTrack()->path);\n    }\n\n    void AnimationComponent::OnStateAnimationTrackRemoved(const Ref<AnimationState>& state, const Ref<IAnimationTrack::IPlayer>& player)\n    {\n        UnregTrack(player, player->GetTrack()->path);\n    }\n\n    void AnimationComponent::ReattachAnimationStates()\n    {\n        mValues.Clear();\n\n        for (auto& state : mStates)\n        {\n\t\t\tif (state)\n\t\t\t\tstate->Register(Ref(this));\n        }\n    }\n\n    void AnimationComponent::BlendState::Update(float dt)\n    {\n        time -= dt;\n        float coef = Math::Max(0.0f, time) / duration;\n\n        for (auto& state : blendOffStates)\n            state->SetWeight(coef);\n\n        blendOnState->SetWeight(1.0f - coef);\n    }\n\n    template<>\n    void AnimationComponent::TrackMixer<int>::Update()\n    {\n        AnimationState* firstValueState = tracks[0].first;\n        AnimationTrack<int>::Player* firstValue = tracks[0].second;\n\n        float weightsSum = firstValueState->mWeight*firstValueState->mask.GetNodeWeight(path);\n        float valueSum = (float)firstValue->GetValue();\n\n        for (int i = 1; i < tracks.Count(); i++)\n        {\n            AnimationState* valueState = tracks[i].first;\n            AnimationTrack<int>::Player* value = tracks[i].second;\n\n            weightsSum += valueState->mWeight*valueState->mask.GetNodeWeight(path);\n            valueSum += (float)value->GetValue();\n        }\n\n        int resValue = Math::RoundToInt(valueSum / weightsSum);\n        target->SetValue(resValue);\n    }\n\n    template<>\n    void AnimationComponent::TrackMixer<bool>::Update()\n    {\n        AnimationState* firstValueState = tracks[0].first;\n        AnimationTrack<bool>::Player* firstValue = tracks[0].second;\n\n        float weightsSum = firstValueState->mWeight*firstValueState->mask.GetNodeWeight(path);\n        float valueSum = firstValue->GetValue() ? 1.0f : 0.0f;\n\n        for (int i = 1; i < tracks.Count(); i++)\n        {\n            AnimationState* valueState = tracks[i].first;\n            AnimationTrack<bool>::Player* value = tracks[i].second;\n\n            weightsSum += valueState->mWeight*valueState->mask.GetNodeWeight(path);\n            valueSum += value->GetValue() ? 1.0f : 0.0f;\n        }\n\n        bool resValue = (valueSum / weightsSum) > 0.5f;\n        target->SetValue(resValue);\n    }\n\n    AnimationComponent::SubTrackMixer::~SubTrackMixer()\n    {}\n\n    void AnimationComponent::SubTrackMixer::Update()\n    {\n    }\n\n    void AnimationComponent::SubTrackMixer::RemoveTrack(IAnimationTrack::IPlayer* track)\n    {\n        tracks.RemoveAll([&](const auto& x) { return x.second == track; });\n    }\n\n    bool AnimationComponent::SubTrackMixer::IsEmpty() const\n    {\n        return tracks.IsEmpty();\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::AnimationComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationComponent, o2__AnimationComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/AnimationComponent.h",
    "content": "#pragma once\n\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Animation/Tracks/AnimationSubTrack.h\"\n#include \"o2/Animation/Tracks/AnimationTrack.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Editor/AssetEditablePreview.h\"\n#include \"o2/Utils/Editor/Attributes/DefaultTypeAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/DontDeleteAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/InvokeOnChangeAttribute.h\"\n\nnamespace o2\n{\n    class IAnimationState;\n    class AnimationMask;\n    \n    // -------------------\n    // Animation component\n    // -------------------\n    class AnimationComponent: public Component\n    {\n    public:\n        PROPERTIES(AnimationComponent);\n        ACCESSOR(Ref<IAnimationState>, state, String, GetState, GetAllStates); // Animation states accessor by name\n\n    public:\n        // Default constructor @SCRIPTABLE\n        AnimationComponent();\n\n        // Copy-constructor\n        AnimationComponent(RefCounter* refCounter, const AnimationComponent& other);\n\n        // Destructor\n        ~AnimationComponent();\n\n        // Copy-operator\n        AnimationComponent& operator=(const AnimationComponent& other);\n\n        // Updates animations, blendings and assigning blended values\n        void OnUpdate(float dt) override;\n\n        // Adds new animation state and returns him\n        Ref<IAnimationState> AddState(const Ref<IAnimationState>& state);\n\n        // Adds new animation state and returns him\n        Ref<IAnimationState> AddState(const String& name, const Ref<AnimationClip>& animation,\n                                     const AnimationMask& mask, float weight);\n\n        // Adds new animation state and returns him\n        Ref<IAnimationState> AddState(const String& name);\n\n        // Removes animation state\n        void RemoveState(const Ref<IAnimationState>& state);\n\n        // Removes animation state by name\n        void RemoveState(const String& name);\n\n        // Removes all animation states @SCRIPTABLE\n        void RemoveAllStates();\n\n        // Returns state with specified name. Returns nullptr if can't find state with specified name\n        Ref<IAnimationState> GetState(const String& name);\n\n\t\t// Returns first state from states array. Returns nullptr if no states in array\n\t\tRef<IAnimationState> GetFirstState(bool createIfNotExists = false);\n\n        // Returns all states array\n        const Vector<Ref<IAnimationState>>& GetStates() const;\n\n        // Returns all states\n        Map<String, Ref<IAnimationState>> GetAllStates() const;\n\n        // Returns vector of available states names @SCRIPTABLE\n        Vector<String> GetStatesNames() const;\n\n\t\t// Plays first state from states array, if no states - returns nullptr @SCRIPTABLE\n        Ref<IAnimationState> PlayFirstState();\n\n        // Creates new state and plays him\n        Ref<IAnimationState> Play(const Ref<AnimationClip>& animation, const String& name);\n\n        // Creates new state and plays him\n        Ref<IAnimationState> Play(const Ref<AnimationClip>& animation);\n\n        // Searches animation state with name and plays him @SCRIPTABLE\n        Ref<IAnimationState> Play(const String& name);\n\n        // Creates new state, and blends animation with duration\n        Ref<IAnimationState> BlendTo(const Ref<AnimationClip>& animation, const String& name, float duration = 1.0f);\n\n        // Creates new state, and blends animation with duration\n        Ref<IAnimationState> BlendTo(const Ref<AnimationClip>& animation, float duration = 1.0f);\n\n        // Creates new state, and blends animation with duration @SCRIPTABLE\n        Ref<IAnimationState> BlendTo(const String& name, float duration = 1.0f);\n\n        // Plays state and blends animation with duration\n        Ref<IAnimationState> BlendTo(const Ref<IAnimationState>& state, float duration = 1.0f);\n\n        // Stops animation with name @SCRIPTABLE\n        void Stop(const String& animationName);\n\n        // Stops all states @SCRIPTABLE\n        void StopAll();\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Returns name of component icon\n        static String GetIcon();\n\n        SERIALIZABLE(AnimationComponent);\n        CLONEABLE_REF(AnimationComponent);\n\n    public:\n        // -------------------------------\n        // Value assigning agent interface\n        // -------------------------------\n        struct ITrackMixer: public RefCounterable\n        {\n            // Value path\n            String path;\n\n        public:\n            virtual ~ITrackMixer() {}\n\n            // Updates value and blend\n            virtual void Update() = 0;\n\n            // Removes Animation track from agent\n            virtual void RemoveTrack(IAnimationTrack::IPlayer* track) = 0;\n\n            // Returns is agent hasn't no values\n            virtual bool IsEmpty() const = 0;\n        };\n\n        // ------------------------------\n        // Template value assigning agent\n        // ------------------------------\n        template<typename _type>\n        struct TrackMixer: public ITrackMixer\n        {\n        public:\n            Vector<Pair<AnimationState*, typename AnimationTrack<_type>::Player*>> tracks; // Animation tracks associated with animation states\n            \n            Ref<IValueProxy<_type>> target; // Target value proxy\n\n\t\t\t_type defaultValue = _type(); // Default value of target, used to mix single value track\n\n        public:\n            // Destructor\n            ~TrackMixer();\n\n            // Updates value and blend\n            void Update() override;\n\n            // Removes Animation track from agent\n            void RemoveTrack(IAnimationTrack::IPlayer* track) override;\n\n            // Returns is agent hasn't no values\n            bool IsEmpty() const override;\n        };\n\n        // ------------------------------\n        // Template value assigning agent\n        // ------------------------------\n        struct SubTrackMixer : public ITrackMixer\n        {\n        public:\n            Vector<Pair<AnimationState*, typename AnimationSubTrack::Player*>> tracks; // Animation tracks associated with animation states\n\n        public:\n            // Destructor\n            ~SubTrackMixer();\n\n            // Updates value and blend\n            void Update() override;\n\n            // Removes Animation track from agent\n            void RemoveTrack(IAnimationTrack::IPlayer* track) override;\n\n            // Returns is agent hasn't no values\n            bool IsEmpty() const override;\n        };\n\n        // ----------------------\n        // Blend state parameters\n        // ----------------------\n        struct BlendState\n        {\n            Vector<Ref<IAnimationState>> blendOffStates; // Turning off states\n            Ref<IAnimationState>         blendOnState;   // Turning on state\n\n            float duration;     // Blending duration\n            float time = -1.0f; // Current blending remaining time\n\n        public:\n            // Updates work weight by time\n            void Update(float dt);\n        };\n\n    protected:\n        Vector<Ref<IAnimationState>> mStates; // Animation states array @SERIALIZABLE @EDITOR_PROPERTY @DEFAULT_TYPE(o2::AnimationState) @INVOKE_ON_CHANGE(ReattachAnimationStates) @DONT_DELETE @EXPANDED_BY_DEFAULT\n        Vector<Ref<ITrackMixer>>     mValues; // Assigning value agents\n\n        BlendState mBlend;  // Current blend parameters\n\n    protected:\n        // Called when component started, checks states auto play\n        void OnStart() override;\n\n        // Called when actor initialized, reattaches animation states\n        void OnInitialized() override;\n\n        // Registers track by path and state\n        template<typename _valueType, typename _trackType, typename _mixerType>\n        void RegTrack(const Ref<typename _trackType::Player>& player, const String& path, const Ref<AnimationState>& state);\n\n        // Registers value track by path and state\n        template<typename _valueType>\n        void RegValueTrack(const Ref<typename AnimationTrack<_valueType>::Player>& player, const String& path, const Ref<AnimationState>& state);\n\n        // Registers sub track by path and state\n        void RegSubTrack(const Ref<AnimationSubTrack::Player>& player, const String& path, const Ref<AnimationState>& state);\n\n        // Removes Animation track from agent by path\n        void UnregTrack(const Ref<IAnimationTrack::IPlayer>& player, const String& path);\n\n        // Called when new track added in animation state, registers track player in mixer\n        void OnStateAnimationTrackAdded(const Ref<AnimationState>& state, const Ref<IAnimationTrack::IPlayer>& player);\n\n        // Called when track is removing from animation state, unregisters track player from mixer\n        void OnStateAnimationTrackRemoved(const Ref<AnimationState>& state, const Ref<IAnimationTrack::IPlayer>& player);\n\n        // Reattaches animation states to component, used to start and update animations\n        virtual void ReattachAnimationStates();\n\n        REF_COUNTERABLE_IMPL(Component);\n\n        friend class AnimationClip;\n        friend class AnimationState;\n        friend class IAnimationTrack;\n\n        template<typename _type>\n        friend class AnimationTrack;\n\n        friend class AnimationSubTrack;\n    };\n}\n\n#include \"o2/Animation/AnimationState.h\"\n\nnamespace o2\n{\n    template<typename _valueType, typename _trackType, typename _mixerType>\n    void AnimationComponent::RegTrack(const Ref<typename _trackType::Player>& player, const String& path, const Ref<AnimationState>& state)\n    {\n        for (auto& val : mValues)\n        {\n            if (val->path == path)\n            {\n                auto agent = DynamicCast<_mixerType>(val);\n\n                if (!agent)\n                {\n                    o2Debug.LogWarning(\"Different track types at: \" + path);\n                    return;\n                }\n\n                if (agent->tracks.Contains({ state.Get(), player.Get() }))\n                {\n                    o2Debug.LogWarning(\"Track already registered at: \" + path);\n                    return;\n\t\t\t\t}\n\n                agent->tracks.Add({ state.Get(), player.Get() });\n                return;\n            }\n        }\n\n        auto newAgent = mmake<_mixerType>();\n        mValues.Add(newAgent);\n        newAgent->path = path;\n        newAgent->tracks.Add({ state.Get(), player.Get() });\n\n        const FieldInfo* fieldInfo = nullptr;\n        auto owner = mOwner.Lock();\n        auto fieldPtr = owner.Get()->GetType().GetFieldPtr(owner.Get(), path, fieldInfo);\n\n        if (!fieldInfo)\n        {\n            o2Debug.LogWarning(\"Can't animate value \" + path + \": can't find field\");\n            return;\n        }\n\n        if constexpr (!std::is_same<_valueType, void>::value)\n        {\n            newAgent->target = DynamicCast<IValueProxy<_valueType>>(fieldInfo->GetType()->GetValueProxy(fieldPtr));\n            newAgent->defaultValue = newAgent->target->GetValue();\n        }\n    }\n\n    template<typename _valueType>\n    void AnimationComponent::RegValueTrack(const Ref<typename AnimationTrack<_valueType>::Player>& player, const String& path, const Ref<AnimationState>& state)\n    {\n        RegTrack<_valueType, AnimationTrack<_valueType>, TrackMixer<_valueType>>(player, path, state);\n    }\n\n    template<typename _type>\n    AnimationComponent::TrackMixer<_type>::~TrackMixer()\n    {}\n\n    template<typename _type>\n    bool AnimationComponent::TrackMixer<_type>::IsEmpty() const\n    {\n        return tracks.IsEmpty();\n    }\n\n    template<typename _type>\n    void AnimationComponent::TrackMixer<_type>::RemoveTrack(IAnimationTrack::IPlayer* value)\n    {\n        tracks.RemoveAll([&](const auto& x) { return x.second == value; });\n    }\n\n    template<>\n    void AnimationComponent::TrackMixer<bool>::Update();\n\n    template<>\n    void AnimationComponent::TrackMixer<int>::Update();\n\n    template<typename _type>\n    void AnimationComponent::TrackMixer<_type>::Update()\n    {\n        auto firstValueState = tracks[0].first;\n        auto firstValue = tracks[0].second;\n\n        float weightsSum = firstValueState->mWeight*firstValueState->mask.GetNodeWeight(path);\n        _type valueSum = firstValue->GetValue()*firstValueState->mWeight;\n\n        if (tracks.Count() > 1)\n        {\n            for (int i = 1; i < tracks.Count(); i++)\n            {\n                auto valueState = tracks[i].first;\n                auto value = tracks[i].second;\n\n                weightsSum += valueState->mWeight*valueState->mask.GetNodeWeight(path);\n                valueSum += value->GetValue()*valueState->mWeight;\n            }\n        }\n        else\n        {\n            float defaultWeight = 1.0f - weightsSum;\n            valueSum += defaultValue*defaultWeight;\n            weightsSum += defaultWeight;\n        }\n\n        _type resValue = valueSum / weightsSum;\n        target->SetValue(resValue);\n    }\n    \n    template<typename _type>\n    void AnimationTrack<_type>::Player::RegMixer(const Ref<AnimationState>& state, const String& path)\n    {\n        state->mOwner.Lock()->RegValueTrack<_type>(Ref(this), path, state);\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationComponent)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationComponent)\n{\n    FIELD().PUBLIC().NAME(state);\n    FIELD().PROTECTED().DEFAULT_TYPE_ATTRIBUTE(o2::AnimationState).DONT_DELETE_ATTRIBUTE().EDITOR_PROPERTY_ATTRIBUTE().EXPANDED_BY_DEFAULT_ATTRIBUTE().INVOKE_ON_CHANGE_ATTRIBUTE(ReattachAnimationStates).SERIALIZABLE_ATTRIBUTE().NAME(mStates);\n    FIELD().PROTECTED().NAME(mValues);\n    FIELD().PROTECTED().NAME(mBlend);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationComponent)\n{\n\n    typedef Map<String, Ref<IAnimationState>> _tmp1;\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AnimationComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, AddState, const Ref<IAnimationState>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, AddState, const String&, const Ref<AnimationClip>&, const AnimationMask&, float);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, AddState, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveState, const Ref<IAnimationState>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveState, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveAllStates);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, GetState, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, GetFirstState, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<IAnimationState>>&, GetStates);\n    FUNCTION().PUBLIC().SIGNATURE(_tmp1, GetAllStates);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vector<String>, GetStatesNames);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<IAnimationState>, PlayFirstState);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, Play, const Ref<AnimationClip>&, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, Play, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<IAnimationState>, Play, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, BlendTo, const Ref<AnimationClip>&, const String&, float);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, BlendTo, const Ref<AnimationClip>&, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<IAnimationState>, BlendTo, const String&, float);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<IAnimationState>, BlendTo, const Ref<IAnimationState>&, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Stop, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, StopAll);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStart);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnInitialized);\n    FUNCTION().PROTECTED().SIGNATURE(void, RegSubTrack, const Ref<AnimationSubTrack::Player>&, const String&, const Ref<AnimationState>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UnregTrack, const Ref<IAnimationTrack::IPlayer>&, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateAnimationTrackAdded, const Ref<AnimationState>&, const Ref<IAnimationTrack::IPlayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateAnimationTrackRemoved, const Ref<AnimationState>&, const Ref<IAnimationTrack::IPlayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, ReattachAnimationStates);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/AnimationStateGraphComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"AnimationStateGraphComponent.h\"\n#include \"AnimationComponent.h\"\n\nnamespace o2\n{\n    AnimationStateGraphComponent::AnimationStateGraphComponent() = default;\n\n    AnimationStateGraphComponent::AnimationStateGraphComponent(const AnimationStateGraphComponent& other) :\n        Component(other)\n    {\n        Reset();\n    }\n\n    AnimationStateGraphComponent::~AnimationStateGraphComponent() = default;\n\n    AnimationStateGraphComponent& AnimationStateGraphComponent::operator=(const AnimationStateGraphComponent& other)\n    {\n        Component::operator=(other);\n\n        mStateGraph = other.mStateGraph;\n        Reset();\n\n        return *this;\n    }\n\n    void AnimationStateGraphComponent::OnUpdate(float dt)\n    {\n        CheckStartNextTransition();\n        UpdateCurrentTransition(dt);\n    }\n\n    void AnimationStateGraphComponent::SetGraph(const AssetRef<AnimationStateGraphAsset>& graph)\n    {\n        mStateGraph = graph;\n        Reset();\n    }\n\n    const AssetRef<AnimationStateGraphAsset>& AnimationStateGraphComponent::GetGraph() const\n    {\n        return mStateGraph;\n    }\n\n    void AnimationStateGraphComponent::GoToState(const String& name)\n    {\n        if (!mStateGraph)\n            return;\n\n        GoToState(mStateGraph->GetState(name));\n    }\n\n    void AnimationStateGraphComponent::GoToState(const Ref<AnimationGraphState>& state)\n    {\n        if (!state)\n            return;\n\n        StopTransition();\n\n        auto sourceState = mCurrentState;\n        mNextTransitions = mStateGraph->CalculatePath(sourceState, state);\n\n\t\tonTransitionsPlanned(mNextTransitions);\n    }\n\n    void AnimationStateGraphComponent::ForcePlayState(const String& name)\n    {\n        if (!mStateGraph)\n            return;\n\n        ForcePlayState(mStateGraph->GetState(name));\n    }\n\n    void AnimationStateGraphComponent::ForcePlayState(const Ref<AnimationGraphState>& state)\n    {\n        if (!state)\n            return;\n\n        StopTransition();\n\n        if (mCurrentStatePlayer)\n        {\n            mCurrentStatePlayer->Stop();\n            mCurrentStatePlayer = nullptr;\n        }\n\n        mCurrentState = state;\n\n\t\tmCurrentStatePlayer = mmake<StatePlayer>();\n        mCurrentStatePlayer->Setup(GetAnimationComponent(), mCurrentState, Ref(this));\n        mCurrentStatePlayer->Play();\n    }\n\n    void AnimationStateGraphComponent::StopTransition()\n    {\n        if (mCurrentTransition)\n            onTransitionCancelled(mCurrentTransition);\n\n        for (auto& transition : mNextTransitions)\n            onTransitionCancelled(transition);\n\n        mCurrentTransition = nullptr;\n        mNextTransitions.Clear();\n\n        if (mNextState)\n        {\n            mNextStatePlayer->Stop();\n\t\t\tmNextStatePlayer = nullptr;\n            mNextState = nullptr;\n        }\n    }\n\n    const Ref<AnimationGraphState>& AnimationStateGraphComponent::GetCurrentState() const\n    {\n        return mCurrentState;\n    }\n\n\tconst Ref<AnimationStateGraphComponent::StatePlayer>& AnimationStateGraphComponent::GetCurrentStatePlayer() const\n\t{\n\t\treturn mCurrentStatePlayer;\n\t}\n\n\tString AnimationStateGraphComponent::GetCurrentStateName() const\n    {\n        if (mCurrentState)\n            return mCurrentState->GetName();\n\n        return \"\";\n    }\n\n    void AnimationStateGraphComponent::OnInitialized()\n    {\n        Reset();\n    }\n\n\tvoid AnimationStateGraphComponent::ResetAnimationStates()\n\t{\n\t\tauto animationComponent = GetAnimationComponent();\n\t\tif (!animationComponent)\n\t\t\treturn;\n\n        if (!mStateGraph)\n            return;\n\n        for (auto& state : mStateGraph->GetStates())\n        {\n            for (auto& animation : state->GetAnimations())\n            {\n                auto player = animationComponent->GetState(animation->GetName());\n                if (player)\n                {\n                    player->autoPlay = false;\n                    player->GetPlayer().Stop();\n                }\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid AnimationStateGraphComponent::Reset()\n    {\n        StopTransition();\n        ResetAnimationStates();\n\n        if (mStateGraph)\n            ForcePlayState(mStateGraph->GetState(mStateGraph->GetInitialState()));\n    }\n\n    void AnimationStateGraphComponent::CheckStartNextTransition()\n    {\n        if (mCurrentTransition)\n            return;\n\n        if (!mCurrentStatePlayer)\n        {\n            Reset();\n            return;\n        }\n\n\t\t// Check planning next exit transition from non looped state\n        if (mNextTransitions.IsEmpty() && !mCurrentStatePlayer->IsLooped())\n        {\n            if (!mCurrentState->GetTransitions().IsEmpty())\n                mNextTransitions.Add(mCurrentState->GetTransitions()[0]);\n        }\n\n\t\t// Do nothing if no next transition planned\n        if (mNextTransitions.IsEmpty())\n\t\t\treturn;\n\n        auto nextTransition = mNextTransitions[0];\n        float currentRelativeTime = mCurrentStatePlayer->GetTime() / mCurrentStatePlayer->GetDuration();\n        bool canStartByTime = currentRelativeTime >= nextTransition->beginTimeRange && \n                              currentRelativeTime <= nextTransition->endTimeRange;\n\n        if (!canStartByTime)\n            return;\n\n        mCurrentTransition = nextTransition;\n        mNextTransitions.RemoveAt(0);\n\n        mNextState = mCurrentTransition->GetDestinationState();\n\n\t\tmNextStatePlayer = mmake<StatePlayer>();\n        mNextStatePlayer->Setup(GetAnimationComponent(), mNextState, Ref(this));\n        mNextStatePlayer->Play();\n\n        mCurrentTransitionTime = 0.0f;\n\n\t\tonTransitionStarted(mCurrentTransition);\n    }\n\n    void AnimationStateGraphComponent::UpdateCurrentTransition(float dt)\n    {\n        if (!mCurrentTransition || !mCurrentStatePlayer || !mNextStatePlayer)\n            return;\n\n        mCurrentTransitionTime += dt;\n        float coef = mCurrentTransitionTime / mCurrentTransition->duration;\n\n        bool isFinished = coef >= 1.0f;\n        if (isFinished)\n            coef = 1.0f;\n\n        if (mCurrentTransition->curve)\n            coef = mCurrentTransition->curve->Evaluate(coef);\n\n        mCurrentStatePlayer->SetWeight(1.0f - coef);\n        mNextStatePlayer->SetWeight(coef);\n\n        if (isFinished)\n        {\n            mCurrentStatePlayer->Stop();\n\n\t\t\tonTransitionFinished(mCurrentTransition);\n\n            mCurrentState = mNextState;\n            mCurrentStatePlayer = mNextStatePlayer;\n\n            mCurrentTransition = nullptr;\n\t\t\tmNextStatePlayer = nullptr;\n            mNextState = nullptr;\n        }\n    }\n\n    Ref<AnimationComponent> AnimationStateGraphComponent::GetAnimationComponent() const \n    {\n        if (mAnimationComponent)\n            return mAnimationComponent.Lock();\n\n        mAnimationComponent = GetActor()->GetComponent<AnimationComponent>();\n        return mAnimationComponent.Lock();\n    }\n\n\tvoid AnimationStateGraphComponent::StatePlayer::Setup(const Ref<AnimationComponent>& animationComponent,\n                                                          const Ref<AnimationGraphState>& state,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  const Ref<AnimationStateGraphComponent>& owner)\n    {\n        if (mState)\n            mState->onChanged -= THIS_FUNC(OnStateChanged);\n\n        this->mState = state;\n        this->mOwner = owner;\n        \n        if (!state)\n        {\n            mPlayers.Clear();\n            return;\n        }\n\n        state->onChanged += THIS_FUNC(OnStateChanged);\n\n        InitializePlayers(animationComponent);\n    }\n\n    AnimationStateGraphComponent::StatePlayer::~StatePlayer()\n    {\n        if (mState)\n            mState->onChanged -= THIS_FUNC(OnStateChanged);\n    }\n\n    void AnimationStateGraphComponent::StatePlayer::Play()\n    {\n        mIsPlaying = true;\n\n        for (auto& player : mPlayers)\n            player.second->GetPlayer().RewindAndPlay();\n\n\t\tif (auto ownerRef = mOwner.Lock())\n\t\t\townerRef->onStateStarted(Ref(this));\n    }\n\n    void AnimationStateGraphComponent::StatePlayer::Stop()\n    {\n        mIsPlaying = false;\n\n        for (auto& player : mPlayers)\n            player.second->GetPlayer().Stop();\n\n\t\tif (auto ownerRef = mOwner.Lock())\n\t\t\townerRef->onStateFinished(Ref(this));\n    }\n\n    void AnimationStateGraphComponent::StatePlayer::SetWeight(float weight)\n    {\n        for (auto& player : mPlayers)\n            player.second->SetWeight(weight);\n    }\n\n    float AnimationStateGraphComponent::StatePlayer::GetTime() const\n    {\n        if (mPlayers.IsEmpty())\n            return 0.0f;\n\n        return mPlayers[0].second->GetPlayer().GetInDurationTime();\n    }\n\n    float AnimationStateGraphComponent::StatePlayer::GetDuration() const\n    {\n        if (mPlayers.IsEmpty())\n            return 0.0f;\n\n        return mPlayers[0].second->GetPlayer().GetDuration();\n    }\n\n\tbool AnimationStateGraphComponent::StatePlayer::IsLooped() const\n\t{\n        if (mPlayers.IsEmpty())\n            return false;\n\n\t\treturn mPlayers[0].second->GetPlayer().GetLoop() == Loop::Repeat;\n\t}\n\n    void AnimationStateGraphComponent::StatePlayer::OnStateChanged()\n    {\n        if (auto ownerRef = mOwner.Lock())\n        {\n            auto animationComponent = ownerRef->GetAnimationComponent();\n            if (animationComponent)\n                InitializePlayers(animationComponent);\n        }\n    }\n\n    void AnimationStateGraphComponent::StatePlayer::InitializePlayers(const Ref<AnimationComponent>& animationComponent)\n    {\n        mPlayers.Clear();\n        \n        if (!mState)\n            return;\n\n        for (auto& animation : mState->GetAnimations())\n        {\n            auto player = animationComponent->GetState(animation->GetName());\n            if (!player)\n                continue;\n\n            mPlayers.Add({ animation, player });\n        }\n\n        if (mIsPlaying)\n            Play();\n    }\n\n\tconst Vector<Pair<Ref<AnimationGraphState::Animation>, Ref<IAnimationState>>>& AnimationStateGraphComponent::StatePlayer::GetPlayers() const\n\t{\n        return mPlayers;\n\t}\n\n\tconst Ref<AnimationGraphState>& AnimationStateGraphComponent::StatePlayer::GetState() const\n\t{\n\t\treturn mState;\n\t}\n\n\tRef<AnimationStateGraphComponent> AnimationStateGraphComponent::StatePlayer::GetOwner() const\n\t{\n\t\treturn mOwner.Lock();\n\t}\n\n\tconst Ref<AnimationGraphState>& AnimationStateGraphComponent::GetNextState() const\n    {\n        return mNextState;\n    }\n\n\tconst Ref<AnimationStateGraphComponent::StatePlayer>& AnimationStateGraphComponent::GetNextStatePlayer() const\n\t{\n\t\treturn mNextStatePlayer;\n\t}\n\n\tString AnimationStateGraphComponent::GetNextStateName() const\n\t{\n\t\tif (mNextState)\n\t\t\treturn mNextState->GetName();\n\n\t\treturn \"\";\n\t}\n\n\tVector<String> AnimationStateGraphComponent::GetStatesNames() const\n\t{\n\t\tVector<String> names;\n\t\tif (mStateGraph)\n\t\t\tnames = mStateGraph->GetStatesNames();\n\n\t\treturn names;\n\t}\n\n\tconst Ref<AnimationGraphTransition>& AnimationStateGraphComponent::GetCurrentTransition() const\n    {\n        return mCurrentTransition;\n    }\n\n\tfloat AnimationStateGraphComponent::GetCurrentTransitionTime() const\n\t{\n\t\treturn mCurrentTransitionTime;\n\t}\n\n\tconst Vector<Ref<AnimationGraphTransition>>& AnimationStateGraphComponent::GetNextTransitions() const\n    {\n        return mNextTransitions;\n    }\n\n    String AnimationStateGraphComponent::GetName()\n    {\n        return \"Animation State Graph\";\n    }\n\n    String AnimationStateGraphComponent::GetCategory()\n    {\n        return \"Animation\";\n    }\n\n    String AnimationStateGraphComponent::GetIcon()\n    {\n        return \"ui/UI4_graph_component.png\";\n    }\n\n    DECLARE_TEMPLATE_CLASS(LinkRef<AnimationStateGraphComponent>);\n}\n// --- META ---\n\nDECLARE_CLASS(o2::AnimationStateGraphComponent, o2__AnimationStateGraphComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/AnimationStateGraphComponent.h",
    "content": "#pragma once\n\n#include \"o2/Animation/AnimationState.h\"\n#include \"o2/Assets/Types/AnimationStateGraphAsset.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Editor/Attributes/ItemsSourceAttribute.h\"\n#include \"o2/Utils/Math/Curve.h\"\n\nnamespace o2\n{    \n    // ---------------------------------------------------------------------------------------\n    // Animation state graph component. Contains animation states and transitions between them\n    // ---------------------------------------------------------------------------------------\n    class AnimationStateGraphComponent: public Component\n    {\n\tpublic:\n\t\t// ------------------------------------------------------------\n\t\t// State player. Contains animation players and state reference\n\t\t// ------------------------------------------------------------\n\t\tstruct StatePlayer: public RefCounterable\n\t\t{\n\t\tpublic:\n            using thisclass = StatePlayer;\n\n            // Destructor\n            ~StatePlayer() override;\n\n\t\t\t// Setup state player. Initializes animation players\n\t\t\tvoid Setup(const Ref<AnimationComponent>& animationComponent, const Ref<AnimationGraphState>& state,\n\t\t\t\t\t   const Ref<AnimationStateGraphComponent>& owner);\n\n\t\t\t// Play state\n\t\t\tvoid Play();\n\n\t\t\t// Stop state\n\t\t\tvoid Stop();\n\n\t\t\t// Set weight of state\n\t\t\tvoid SetWeight(float weight);\n\n\t\t\t// Returns time of state. Gets value from first animation player\n\t\t\tfloat GetTime() const;\n\n\t\t\t// Returns duration of state. Gets value from first animation player\n\t\t\tfloat GetDuration() const;\n\n            // Returns if state is looped\n\t\t\tbool IsLooped() const; \n\n\t\t\t// Returns players\n            const Vector<Pair<Ref<AnimationGraphState::Animation>, Ref<IAnimationState>>>& GetPlayers() const;\n\n\t\t\t// Returns state\n\t\t\tconst Ref<AnimationGraphState>& GetState() const;\n\n\t\t\t// Returns owner\n\t\t\tRef<AnimationStateGraphComponent> GetOwner() const;\n\n\t\tprivate:\n\t\t\tVector<Pair<Ref<AnimationGraphState::Animation>, Ref<IAnimationState>>> mPlayers; // Animation players\n\n            bool mIsPlaying = false; // Is playing flag\n\n\t\t\tRef<AnimationGraphState> mState; // State reference\n\n\t\t\tWeakRef<AnimationStateGraphComponent> mOwner; // Owner reference\n\n        private:\n            // Called when state changed\n            void OnStateChanged();\n\n            // Initialize animation players from state animations\n            void InitializePlayers(const Ref<AnimationComponent>& animationComponent);\n\t\t};\n\n    public:\n        PROPERTIES(AnimationStateGraphComponent);\n        PROPERTY(AssetRef<AnimationStateGraphAsset>, graph, SetGraph, GetGraph); // State graph asset property\n        PROPERTY(String, state, GoToState, GetCurrentStateName);                 // Current state property @ITEMS_SOURCE(GetStatesNames)\n\n    public:\n\t\tFunction<void(const Ref<StatePlayer>& player)> onStateStarted;  // Event, called when state started\n\t\tFunction<void(const Ref<StatePlayer>& player)> onStateFinished; // Event, called when state finished\n\n\t\tFunction<void(const Ref<AnimationGraphTransition>& transition)> onTransitionStarted;  // Event, called when transition started\n\t\tFunction<void(const Ref<AnimationGraphTransition>& transition)> onTransitionFinished; // Event, called when transition finished\n    \tFunction<void(const Ref<AnimationGraphTransition>& transition)> onTransitionCancelled; // Event, called when transition cancelled\n\n\t\tFunction<void(const Vector<Ref<AnimationGraphTransition>>& path)> onTransitionsPlanned; // Event, called when transitions planned\n\n    public:\n        // Default constructor @SCRIPTABLE\n        AnimationStateGraphComponent();\n\n        // Copy-constructor\n        AnimationStateGraphComponent(const AnimationStateGraphComponent& other);\n\n        // Destructor\n        ~AnimationStateGraphComponent() override;\n\n        // Copy-operator\n        AnimationStateGraphComponent& operator=(const AnimationStateGraphComponent& other);\n\n        // Updates animations, blendings and transitions\n        void OnUpdate(float dt) override;\n\n        // Sets animation state graph asset\n        void SetGraph(const AssetRef<AnimationStateGraphAsset>& graph);\n\n        // Returns animation state graph asset\n\t\tconst AssetRef<AnimationStateGraphAsset>& GetGraph() const;\n\n\t\t// Resets graph to initial state\n\t\tvoid Reset();\n\n        // Starts transition to state\n        void GoToState(const String& name);\n\n        // Starts transition to state\n        void GoToState(const Ref<AnimationGraphState>& state);\n\n        // Forces play state without transition\n        void ForcePlayState(const String& name);\n\n        // Forces play state without transition\n        void ForcePlayState(const Ref<AnimationGraphState>& state);\n\n        // Immediately stops current transitions\n        void StopTransition();\n\n        // Returns current state\n        const Ref<AnimationGraphState>& GetCurrentState() const;\n\n\t\t// Returns current state player\n\t\tconst Ref<StatePlayer>& GetCurrentStatePlayer() const;\n\n        // Returns current state name\n        String GetCurrentStateName() const;\n\n        // Returns list of available states names\n        Vector<String> GetStatesNames() const;\n\n        // Returns next state\n        const Ref<AnimationGraphState>& GetNextState() const;\n\n\t\t// Returns next state player\n\t\tconst Ref<StatePlayer>& GetNextStatePlayer() const;\n\n\t\t// Returns next state name\n\t\tString GetNextStateName() const;\n\n        // Returns current transition\n        const Ref<AnimationGraphTransition>& GetCurrentTransition() const;\n\n\t\t// Returns current transition time\n\t\tfloat GetCurrentTransitionTime() const;\n\n        // Returns next transitions\n        const Vector<Ref<AnimationGraphTransition>>& GetNextTransitions() const;\n\n\t\t// Returns animation component\n\t\tRef<AnimationComponent> GetAnimationComponent() const;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Returns name of component icon\n        static String GetIcon();\n\n        SERIALIZABLE(AnimationStateGraphComponent);\n        REF_COUNTERABLE_IMPL(Component);\n\n    protected:\n        AssetRef<AnimationStateGraphAsset> mStateGraph; // State graph asset @SERIALIZABLE \n\n        mutable WeakRef<AnimationComponent> mAnimationComponent; // Animation component reference\n\n        Ref<AnimationGraphState> mCurrentState;       // Current state\n        Ref<StatePlayer>         mCurrentStatePlayer; // Current state player\n\n        Ref<AnimationGraphState> mNextState;       // Next state\n        Ref<StatePlayer>         mNextStatePlayer; // Next state player\n\n        Ref<AnimationGraphTransition> mCurrentTransition;            // Current transition\n        float                         mCurrentTransitionTime = 0.0f; // Current transition time\n\n        Vector<Ref<AnimationGraphTransition>> mNextTransitions;   // Next transitions\n\n    protected:\n        // Called when actor initialized, reattaches animation states\n        void OnInitialized() override;\n\n        // Resets animation states from animation component (autoplay flag)\n        void ResetAnimationStates();\n\n        // Checks if current transition is finished and starts next transition\n        void CheckStartNextTransition();\n\n        // Updates current transition\n        void UpdateCurrentTransition(float dt);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::AnimationStateGraphComponent)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::AnimationStateGraphComponent)\n{\n    FIELD().PUBLIC().NAME(graph);\n    FIELD().PUBLIC().ITEMS_SOURCE_ATTRIBUTE(GetStatesNames).NAME(state);\n    FIELD().PUBLIC().NAME(onStateStarted);\n    FIELD().PUBLIC().NAME(onStateFinished);\n    FIELD().PUBLIC().NAME(onTransitionStarted);\n    FIELD().PUBLIC().NAME(onTransitionFinished);\n    FIELD().PUBLIC().NAME(onTransitionCancelled);\n    FIELD().PUBLIC().NAME(onTransitionsPlanned);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mStateGraph);\n    FIELD().PROTECTED().NAME(mAnimationComponent);\n    FIELD().PROTECTED().NAME(mCurrentState);\n    FIELD().PROTECTED().NAME(mCurrentStatePlayer);\n    FIELD().PROTECTED().NAME(mNextState);\n    FIELD().PROTECTED().NAME(mNextStatePlayer);\n    FIELD().PROTECTED().NAME(mCurrentTransition);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mCurrentTransitionTime);\n    FIELD().PROTECTED().NAME(mNextTransitions);\n}\nEND_META;\nCLASS_METHODS_META(o2::AnimationStateGraphComponent)\n{\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AnimationStateGraphComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetGraph, const AssetRef<AnimationStateGraphAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<AnimationStateGraphAsset>&, GetGraph);\n    FUNCTION().PUBLIC().SIGNATURE(void, Reset);\n    FUNCTION().PUBLIC().SIGNATURE(void, GoToState, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, GoToState, const Ref<AnimationGraphState>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ForcePlayState, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ForcePlayState, const Ref<AnimationGraphState>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, StopTransition);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationGraphState>&, GetCurrentState);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<StatePlayer>&, GetCurrentStatePlayer);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetCurrentStateName);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<String>, GetStatesNames);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationGraphState>&, GetNextState);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<StatePlayer>&, GetNextStatePlayer);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetNextStateName);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationGraphTransition>&, GetCurrentTransition);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetCurrentTransitionTime);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<AnimationGraphTransition>>&, GetNextTransitions);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationComponent>, GetAnimationComponent);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnInitialized);\n    FUNCTION().PROTECTED().SIGNATURE(void, ResetAnimationStates);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckStartNextTransition);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateCurrentTransition, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/EditorTestComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"EditorTestComponent.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/SceneLayer.h\"\n\no2::String o2::EditorTestComponent::GetCategory()\n{\n    return \"Debug\";\n}\n\no2::EditorTestComponent::EditorTestComponent()\n{\n    mGradient = mmake<ColorGradient>(Vector<Pair<float, Color4>>{ { 0.0f, Color4::Red() }, { 1.0f, Color4::Green() }, { 3.0f, Color4(0.0f, 1.0f, 1.0f, 0.5f) } });\n}\n\nvoid o2::EditorTestComponent::Test()\n{\n    //o2Debug.Log(\"test\");\n\n}\n\nvoid o2::EditorTestComponent::OnStart()\n{\n    mTestInsideRef = mmake<TestInside>();\n}\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::EditorTestComponent>);\n// --- META ---\n\nENUM_META(o2::EditorTestComponent::TestEnum, o2__EditorTestComponent__TestEnum)\n{\n    ENUM_ENTRY(A);\n    ENUM_ENTRY(B);\n    ENUM_ENTRY(C);\n    ENUM_ENTRY(D);\n    ENUM_ENTRY(E);\n    ENUM_ENTRY(F);\n    ENUM_ENTRY(G);\n    ENUM_ENTRY(H);\n    ENUM_ENTRY(K);\n    ENUM_ENTRY(L);\n    ENUM_ENTRY(M);\n    ENUM_ENTRY(N);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::EditorTestComponent, o2__EditorTestComponent);\n\nDECLARE_CLASS(o2::EditorTestComponent::TestInside, o2__EditorTestComponent__TestInside);\n\nDECLARE_CLASS(o2::EditorTestComponent::TestDerivedInside, o2__EditorTestComponent__TestDerivedInside);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/EditorTestComponent.h",
    "content": "#pragma once\n#include \"ImageComponent.h\"\n\n#include \"o2/Assets/Asset.h\"\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Assets/Types/AnimationAsset.h\"\n#include \"o2/Assets/Types/DataAsset.h\"\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/Components/ParticlesEmitterComponent.h\"\n#include \"o2/Scene/Physics/RigidBody.h\"\n#include \"o2/Scene/Tags.h\"\n#include \"o2/Utils/Editor/Attributes/DontDeleteAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/InvokeOnChangeAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/RangeAttribute.h\"\n#include \"o2/Utils/Math/ColorGradient.h\"\n#include \"o2/Utils/Math/Curve.h\"\n\nnamespace o2\n{\n    class EditorTestComponent: public Component\n    {\n    public:\n        enum class TestEnum { A, B, C, D, E, F, G, H, K, L, M, N };\n         \n        class TestInside: public ISerializable, public RefCounterable, public ICloneableRef\n        {\n        public:\n            float mFloat = 1.2f;                // @SERIALIZABLE @SCRIPTABLE\n            String mString = String(\"bla bla\"); // @SERIALIZABLE @SCRIPTABLE\n            WString mWString;                   // @SERIALIZABLE @SCRIPTABLE\n            bool mBool = true;                  // @SERIALIZABLE @SCRIPTABLE\n             \n            Ref<Component> mComponent; // @SERIALIZABLE @SCRIPTABLE\n            Ref<RigidBody> mRigidBody; // @SERIALIZABLE @SCRIPTABLE\n\n            bool operator==(const TestInside& other) const { return false; }\n\n            // @SCRIPTABLE\n            TestInside() {}\n\n            SERIALIZABLE(TestInside);\n            CLONEABLE_REF(TestInside);\n        };\n\n        class TestDerivedInside : public TestInside\n        {\n        public:\n            float mFloatDerived = 1.2f;                // @SERIALIZABLE @SCRIPTABLE\n            String mStringDerived = String(\"bla bla\"); // @SERIALIZABLE @SCRIPTABLE\n            WString mWStringDerived;                   // @SERIALIZABLE @SCRIPTABLE\n            bool mBoolDerived = true;                  // @SERIALIZABLE @SCRIPTABLE\n\n            Ref<Component> mComponentDerived; // @SERIALIZABLE @SCRIPTABLE\n            Ref<RigidBody> mRigidBodyDerived; // @SERIALIZABLE @SCRIPTABLE\n\n            // @SCRIPTABLE\n            TestDerivedInside() {}\n\n            SERIALIZABLE(TestDerivedInside);\n            CLONEABLE_REF(TestDerivedInside);\n        };\n\n    public:\n        Ref<IRectDrawable> mDrawable;                 // @SERIALIZABLE\n        AssetRef<ImageAsset> mImageAsset;                       // @SERIALIZABLE\n        LinkRef<Component> mComponent;                          // @SERIALIZABLE\n        LinkRef<RigidBody> mRigidBody;                          // @SERIALIZABLE\n        LinkRef<ImageComponent> mImageComponent;                // @SERIALIZABLE\n        LinkRef<ParticlesEmitterComponent> mParticlesComponent; // @SERIALIZABLE\n\n        PROPERTIES(EditorTestComponent);\n        PROPERTY(Ref<Sprite>, spritePropPtr, SetSpritePtr, GetSpritePtr);\n        PROPERTY(Sprite, spriteProp, SetSprite, GetSprite);\n        PROPERTY(Vector<Vec2I>, arr, SetArray, GetArray);\n                                                               \n    public:                                                    \n        Vector<Vec2I> mVecs;                                   // @SERIALIZABLE @INVOKE_ON_CHANGE(Test)\n        int mInteger = 0;                                          // @SERIALIZABLE @INVOKE_ON_CHANGE(Test)\n        float mFloat = 0.0f;                                          // @SERIALIZABLE\n        String mString;                                        // @SERIALIZABLE\n        WString mWString;                                      // @SERIALIZABLE\n        bool mBool = false;                                            // @SERIALIZABLE\n        AssetRef<ActorAsset> mActorAsset;                      // @SERIALIZABLE\n        AssetRef<DataAsset> mDataAsset;                        // @SERIALIZABLE\n        AssetRef<AnimationAsset> mAnimationAsset;              // @SERIALIZABLE\n        Ref<Sprite> mSprite = mmake<Sprite>();                 // @SERIALIZABLE @DONT_DELETE\n        Ref<Actor> mActor;                                     // @SERIALIZABLE\n        TagGroup mTags;                                        // @SERIALIZABLE\n        Ref<SceneLayer> mLayer;                                // @SERIALIZABLE\n        Color4 mColor;                                         // @SERIALIZABLE\n        Vec2F mVec2F;                                          // @SERIALIZABLE\n        Vec2I mVec2I;                                          // @SERIALIZABLE\n        Vertex mVertex;                                        // @SERIALIZABLE\n        RectF mRectF;                                          // @SERIALIZABLE\n        RectI mRectI;                                          // @SERIALIZABLE\n        BorderF mBorderF;                                      // @SERIALIZABLE\n        BorderI mBorderI;                                      // @SERIALIZABLE\n        Ref<Curve> mCurve = mmake<Curve>(Curve::EaseInOut());  // @SERIALIZABLE\n        Ref<ColorGradient> mGradient;                          // @SERIALIZABLE\n        TestInside mTestInside;                                // @SERIALIZABLE\n        TestEnum mTestEnum = TestEnum::A;                                    // @SERIALIZABLE\n        Ref<TestInside> mTestInsideRef;                        // @SERIALIZABLE\n\n        Vector<int> mIntVector;                         // @SERIALIZABLE\n        Vector<TestInside> mTestInsideVector;           // @SERIALIZABLE @INVOKE_ON_CHANGE(Test)\n        Vector<TestInside*> mTestInsideptrsVector;      // @SERIALIZABLE @INVOKE_ON_CHANGE(Test)\n        Vector<Ref<Actor>> mActorVector;                // @SERIALIZABLE\n        Vector<AssetRef<AnimationAsset>> mAssetsVector; // @SERIALIZABLE\n\n        Vector<Vector<TestInside*>> mVectorOfVector; // @SERIALIZABLE\n\n        Map<String, String> mDictionary;    // @SERIALIZABLE\n        float mFloat2 = 0.0f;                      // @SERIALIZABLE @RANGE(0, 10)\n        float mFloat3 = 0.0f;                      // @SERIALIZABLE\n        float mFloat4 = 0.0f;                      // @SERIALIZABLE\n        float mFloat5 = 0.0f;                      // @SERIALIZABLE\n        float mFloat6 = 0.0f;                      // @SERIALIZABLE\n        float mFloat7 = 0.0f;                      // @SERIALIZABLE\n        float mFloat8 = 0.0f;                      // @SERIALIZABLE\n        float mFloat9 = 0.0f;                      // @SERIALIZABLE\n\n    public:\n        static String GetCategory();\n\n        EditorTestComponent();\n\n        void Test();\n\n        void OnStart() override;\n\n        void SetSpritePtr(const Ref<Sprite>& sprite) { mSprite = sprite; }\n        const Ref<Sprite>& GetSpritePtr() const { return mSprite; }\n\n        void SetSprite(const Sprite& sprite) { *mSprite = sprite; }\n        Sprite GetSprite() const { return *mSprite; }\n\n        void SetArray(const Vector<Vec2I>& arr) { mVecs = arr; }\n        const Vector<Vec2I>& GetArray() const { return mVecs; }\n\n        SERIALIZABLE(EditorTestComponent);\n        CLONEABLE_REF(EditorTestComponent);\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::EditorTestComponent::TestEnum);\n\nCLASS_BASES_META(o2::EditorTestComponent)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::EditorTestComponent)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mDrawable);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mImageAsset);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mComponent);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mRigidBody);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mImageComponent);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mParticlesComponent);\n    FIELD().PUBLIC().NAME(spritePropPtr);\n    FIELD().PUBLIC().NAME(spriteProp);\n    FIELD().PUBLIC().NAME(arr);\n    FIELD().PUBLIC().INVOKE_ON_CHANGE_ATTRIBUTE(Test).SERIALIZABLE_ATTRIBUTE().NAME(mVecs);\n    FIELD().PUBLIC().INVOKE_ON_CHANGE_ATTRIBUTE(Test).SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(mInteger);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mFloat);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mString);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mWString);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mBool);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mActorAsset);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mDataAsset);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mAnimationAsset);\n    FIELD().PUBLIC().DONT_DELETE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(mmake<Sprite>()).NAME(mSprite);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mActor);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mTags);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mLayer);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mColor);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mVec2F);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mVec2I);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mVertex);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mRectF);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mRectI);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mBorderF);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mBorderI);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(mmake<Curve>(Curve::EaseInOut())).NAME(mCurve);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mGradient);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mTestInside);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(TestEnum::A).NAME(mTestEnum);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mTestInsideRef);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mIntVector);\n    FIELD().PUBLIC().INVOKE_ON_CHANGE_ATTRIBUTE(Test).SERIALIZABLE_ATTRIBUTE().NAME(mTestInsideVector);\n    FIELD().PUBLIC().INVOKE_ON_CHANGE_ATTRIBUTE(Test).SERIALIZABLE_ATTRIBUTE().NAME(mTestInsideptrsVector);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mActorVector);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mAssetsVector);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mVectorOfVector);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mDictionary);\n    FIELD().PUBLIC().RANGE_ATTRIBUTE(0, 10).SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mFloat2);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mFloat3);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mFloat4);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mFloat5);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mFloat6);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mFloat7);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mFloat8);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mFloat9);\n}\nEND_META;\nCLASS_METHODS_META(o2::EditorTestComponent)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, Test);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnStart);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSpritePtr, const Ref<Sprite>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetSpritePtr);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSprite, const Sprite&);\n    FUNCTION().PUBLIC().SIGNATURE(Sprite, GetSprite);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetArray, const Vector<Vec2I>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Vec2I>&, GetArray);\n}\nEND_META;\n\nCLASS_BASES_META(o2::EditorTestComponent::TestInside)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::EditorTestComponent::TestInside)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.2f).NAME(mFloat);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(String(\"bla bla\")).NAME(mString);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mWString);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mBool);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mComponent);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mRigidBody);\n}\nEND_META;\nCLASS_METHODS_META(o2::EditorTestComponent::TestInside)\n{\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n}\nEND_META;\n\nCLASS_BASES_META(o2::EditorTestComponent::TestDerivedInside)\n{\n    BASE_CLASS(o2::EditorTestComponent::TestInside);\n}\nEND_META;\nCLASS_FIELDS_META(o2::EditorTestComponent::TestDerivedInside)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.2f).NAME(mFloatDerived);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(String(\"bla bla\")).NAME(mStringDerived);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mWStringDerived);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mBoolDerived);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mComponentDerived);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(mRigidBodyDerived);\n}\nEND_META;\nCLASS_METHODS_META(o2::EditorTestComponent::TestDerivedInside)\n{\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/ImageComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ImageComponent.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n\nnamespace o2\n{\n    ImageComponent::ImageComponent()\n    {\n        mSerializeEnabled = false;\n    }\n\n    ImageComponent::ImageComponent(const AssetRef<ImageAsset>& image) :\n        Sprite(image)\n    {\n        mSerializeEnabled = false;\n    }\n\n    ImageComponent::ImageComponent(const String& imagePath) :\n        Sprite(imagePath)\n    {\n        mSerializeEnabled = false;\n    }\n\n    ImageComponent::ImageComponent(TextureRef texture, const RectI& srcRect) :\n        Sprite(texture, srcRect)\n    {\n        mSerializeEnabled = false;\n    }\n\n    ImageComponent::ImageComponent(const Color4& color) :\n        Sprite(color)\n    {\n        mSerializeEnabled = false;\n    }\n\n    ImageComponent::ImageComponent(const Bitmap& bitmap) :\n        Sprite(bitmap)\n    {\n        mSerializeEnabled = false;\n    }\n\n    ImageComponent::ImageComponent(const Sprite& sprite) :\n        Sprite(sprite)\n    {\n        mSerializeEnabled = false;\n    }\n\n    ImageComponent::ImageComponent(const ImageComponent& other) :\n        Component(other), Sprite(other)\n    {\n        mSerializeEnabled = false;\n    }\n\n    ImageComponent::~ImageComponent()\n    {}\n\n    ImageComponent& ImageComponent::operator=(const ImageComponent& other)\n    {\n        Component::operator=(other);\n        Sprite::operator=(other);\n        return *this;\n    }\n\n    void ImageComponent::OnDraw()\n    {\n        //PROFILE_SAMPLE_FUNC();\n\n        Sprite::Draw();\n    }\n\n    void ImageComponent::FitActorByImage() const\n    {\n        if (mImageAsset)\n            mOwner.Lock()->transform->size = mImageAsset->GetSize();\n    }\n\n    bool ImageComponent::IsUnderPoint(const Vec2F& point)\n    {\n        return Sprite::IsUnderPoint(point);\n    }\n\n    String ImageComponent::GetName()\n    {\n        return \"Image\";\n    }\n\n    String ImageComponent::GetCategory()\n    {\n        return \"Render\";\n    }\n\n    String ImageComponent::GetIcon()\n    {\n        return \"ui/UI4_image_component.png\";\n    }\n\n    Ref<o2::RefCounterable> ImageComponent::CastToRefCounterable(const Ref<ImageComponent>& ref)\n    {\n        return DynamicCast<Component>(ref);\n    }\n\n    void ImageComponent::OnTransformUpdated()\n    {\n        SetBasis(mOwner.Lock()->transform->GetWorldBasis());\n    }\n\n    void ImageComponent::SetOwnerActor(const Ref<Actor>& actor)\n    {\n        Component::SetOwnerActor(actor);\n    }\n\n    void ImageComponent::OnDeserialized(const DataValue& node)\n    {\n        Component::OnDeserialized(node);\n        Sprite::OnDeserialized(node);\n    }\n\n    void ImageComponent::OnSerialize(DataValue& node) const\n    {\n        Component::OnSerialize(node);\n        Sprite::OnSerialize(node);\n    }\n\n    void ImageComponent::OnSerializeDelta(DataValue& node, const IObject& origin) const\n    {\n        Component::OnSerializeDelta(node, origin);\n        Sprite::OnSerializeDelta(node, origin);\n    }\n\n    void ImageComponent::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        Component::OnDeserializedDelta(node, origin);\n        Sprite::OnDeserializedDelta(node, origin);\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::ImageComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::ImageComponent, o2__ImageComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/ImageComponent.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Types/UID.h\"\n\nnamespace o2\n{\n    // ---------------\n    // Image component\n    // ---------------\n    class ImageComponent: public Component, public Sprite\n    {\n    public:\n        PROPERTIES(ImageComponent);\n\n    public:\n        // Default constructor @SCRIPTABLE\n        ImageComponent();\n\n        // Constructor from image asset\n        explicit ImageComponent(const AssetRef<ImageAsset>& image);\n\n        // Constructor from image asset by path\n        explicit ImageComponent(const String& imagePath);\n\n        // Constructor from color\n        explicit ImageComponent(const Color4& color);\n\n        // Constructor from bitmap\n        explicit ImageComponent(const Bitmap& bitmap);\n\n        // Constructor from sprite\n        explicit ImageComponent(const Sprite& sprite);\n\n        // Constructor from texture and source rectangle\n        ImageComponent(TextureRef texture, const RectI& srcRect);\n\n        // Copy-constructor\n        ImageComponent(const ImageComponent& other);\n\n        // Destructor\n        ~ImageComponent();\n\n        // Assign operator\n        ImageComponent& operator=(const ImageComponent& other);\n\n        // Sets actor's size as image size\n        void FitActorByImage() const;\n\n        // Returns true if point is under drawable\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Returns name of component icon\n        static String GetIcon();\n\n        // Dynamic cast to RefCounterable via Component\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<ImageComponent>& ref);\n\n        SERIALIZABLE(ImageComponent);\n        CLONEABLE_REF(ImageComponent);\n\n        using Sprite::onDraw;\n\n    protected:\n        // Draws sprite \n        void OnDraw() override;\n\n        // Called when actor's transform was changed\n        void OnTransformUpdated() override;\n\n        // Sets owner actor\n        void SetOwnerActor(const Ref<Actor>& actor) override;\n\n        // Calling when deserializing\n        void OnDeserialized(const DataValue& node) override;\n\n        // Calling when serializing\n        void OnSerialize(DataValue& node) const override;\n\n        // Beginning serialization delta callback\n        void OnSerializeDelta(DataValue& node, const IObject& origin) const override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;    \n\n        REF_COUNTERABLE_IMPL(Component, Sprite);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ImageComponent)\n{\n    BASE_CLASS(o2::Component);\n    BASE_CLASS(o2::Sprite);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ImageComponent)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::ImageComponent)\n{\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Color4&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Bitmap&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Sprite&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(TextureRef, const RectI&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ImageComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, FitActorByImage);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<ImageComponent>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetOwnerActor, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerializeDelta, DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/MeshComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"MeshComponent.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n#include \"3rdPartyLibs/CDT/include/CDT.h\"\n#include \"o2/Application/Input.h\"\n\nnamespace o2\n{\n    MeshComponent::MeshComponent()\n    {\n        spline->onKeysChanged = THIS_FUNC(UpdateMesh);\n        spline->SetClosed(true);\n    }\n\n    MeshComponent::MeshComponent(const MeshComponent& other):\n        Component(other), mMesh(other.mMesh), spline(other.spline)\n    {\n        spline->onKeysChanged = THIS_FUNC(UpdateMesh);\n        spline->SetClosed(true);\n    }\n\n    MeshComponent::~MeshComponent()\n    {}\n\n    MeshComponent& MeshComponent::operator=(const MeshComponent& other)\n    {\n        Component::operator=(other);\n        spline = other.spline;\n        mMesh = other.mMesh;\n        return *this;\n    }\n\n    void MeshComponent::OnDraw()\n    {\n        if (mNeedUpdateMesh)\n            UpdateMesh();\n\n        mMesh.Draw();\n\n        if (o2Input.IsKeyDown(VK_F3))\n            o2Render.DrawMeshWire(&mMesh, Color4(0, 0, 0, 100));\n    }\n\n    const Mesh& MeshComponent::GetMesh() const\n    {\n        return mMesh;\n    }\n\n    void MeshComponent::SetExtraPoints(const Vector<Vec2F>& points)\n    {\n        mExtraPoints = points;\n        mNeedUpdateMesh = true;\n    }\n\n    const Vector<Vec2F>& MeshComponent::GetExtraPoints() const\n    {\n        return mExtraPoints;\n    }\n\n    void MeshComponent::SetExtraPoint(int idx, const Vec2F& pos)\n    {\n        mExtraPoints[idx] = pos;\n        mNeedUpdateMesh = true; \n    }\n\n    void MeshComponent::AddExtraPoint(const Vec2F& point)\n    {\n        mExtraPoints.Add(point);\n        mNeedUpdateMesh = true;\n    }\n\n    void MeshComponent::RemoveExtraPoint(int idx)\n    {\n        mExtraPoints.RemoveAt(idx);\n        mNeedUpdateMesh = true;\n    }\n\n    void MeshComponent::SetImage(const AssetRef<ImageAsset>& image)\n    {\n        mImageAsset = image;\n        mNeedUpdateMesh = true;\n    }\n\n    const AssetRef<ImageAsset>& MeshComponent::GetImage() const\n    {\n        return mImageAsset;\n    }\n\n    void MeshComponent::SetMappingFrame(const RectF& frame)\n    {\n        mImageMapping = frame;\n        mNeedUpdateMesh = true;\n    }\n\n    const RectF& MeshComponent::GetMappingFrame() const\n    {\n        return mImageMapping;\n    }\n\n    void MeshComponent::SetColor(const Color4& color)\n    {\n        mColor = color;\n        mNeedUpdateMesh = true;\n    }\n\n    const Color4& MeshComponent::GetColor() const\n    {\n        return mColor;\n    }\n\n    String MeshComponent::GetName()\n    {\n        return \"Mesh\";\n    }\n\n    String MeshComponent::GetCategory()\n    {\n        return \"Render\";\n    }\n\n    String MeshComponent::GetIcon()\n    {\n        return \"ui/UI4_image_component.png\";\n    }\n\n    void MeshComponent::OnTransformUpdated()\n    {\n        auto newTransform = mOwner.Lock()->transform->GetWorldNonSizedBasis();\n        auto delta = newTransform*mTransform.Inverted();\n        mTransform = newTransform;\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n        for (int i = 0; i < mMesh.vertexCount; i++)\n        {\n            auto v = verts[i];\n            Vec2F newPos = v*delta;\n            verts[i].Set(newPos, v.z, v.color, v.tu, v.tv);\n        }\n    }\n\n    void MeshComponent::UpdateMesh()\n    {\n        mNeedUpdateMesh = false;\n\n        if (spline->GetKeys().Count() < 3)\n            return;\n\n        std::vector<CDT::V2d<float>> verticies;\n        std::vector<CDT::Edge> edges;\n\n        auto pushVertex = [&](const Vec2F& p) {\n            verticies.push_back(CDT::V2d<float>::make(p.x, p.y));\n\n            if (verticies.size() > 1)\n                edges.push_back(CDT::Edge(verticies.size() - 2, verticies.size() - 1));\n        };\n\n        int count = spline->GetKeys().Count();\n        for (int i = 0; i < count; i++)\n        {\n            auto key = spline->GetKey(i);\n            auto prevKey = spline->GetKey((i - 1 + count)%count);\n\n            const float noSupportsThreshold = 0.01f;\n            if (!(key.prevSupport.Length() < noSupportsThreshold && prevKey.nextSupport.Length() < noSupportsThreshold))\n            {\n                for (int j = 1; j < key.GetApproximatedPointsCount() - 1; j++)\n                    pushVertex(key.GetApproximatedPointsLeft()[j].value);\n            }\n\n            pushVertex(key.value);\n        }\n\n        edges.push_back(CDT::Edge(verticies.size() - 1, 0));\n\n        for (auto& p : mExtraPoints)\n            verticies.push_back(CDT::V2d<float>::make(p.x, p.y));\n\n        CDT::Triangulation<float> triangulation(CDT::VertexInsertionOrder::AsProvided);\n        triangulation.insertVertices(verticies);\n        triangulation.insertEdges(edges);\n        triangulation.eraseOuterTriangles();\n\n        mMesh.Resize(triangulation.vertices.size(), triangulation.triangles.size());\n\n        TextureSource imageSource = mImageAsset ? mImageAsset->GetTextureSource() : TextureSource();\n        auto texture = imageSource.texture;\n        Vec2F invTexSize(1.0f, 1.0f);\n        if (texture)\n            invTexSize.Set(1.0f/texture->GetSize().x, 1.0f/texture->GetSize().y);\n\n        RectF imageRect = imageSource.sourceRect;\n        RectF imageUV = RectF(imageRect.left*invTexSize.x, 1.0f - imageRect.top*invTexSize.y,\n                              imageRect.right*invTexSize.x, 1.0f - imageRect.bottom*invTexSize.y);\n\n        Vertex* verts = mMesh.GetVertices<Vertex>();\n        for (int i = 0; i < triangulation.vertices.size(); i++)\n        {\n            Vec2F p(triangulation.vertices[i].x, triangulation.vertices[i].y);\n            Vec2F coef((p.x - mImageMapping.left)/mImageMapping.Width(), (p.y - mImageMapping.bottom)/mImageMapping.Height());\n            verts[i].Set(p*mTransform, 1.0f,\n                         mColor.ARGB(),\n                         imageUV.left + coef.x*imageUV.Width(),\n                         imageUV.bottom + coef.y*imageUV.Height());\n        }\n\n        VertexIndex* idx = mMesh.GetIndexes();\n        for (int i = 0; i < triangulation.triangles.size(); i++)\n        {\n            idx[i*3] = triangulation.triangles[i].vertices[0];\n            idx[i*3 + 1] = triangulation.triangles[i].vertices[1];\n            idx[i*3 + 2] = triangulation.triangles[i].vertices[2];\n        }\n\n        mMesh.SetTexture(texture);\n        mMesh.vertexCount = triangulation.vertices.size();\n        mMesh.polyCount = triangulation.triangles.size();\n    }\n\n    void MeshComponent::SetOwnerActor(const Ref<Actor>& actor)\n    {\n        Component::SetOwnerActor(actor);\n    }\n\n    void MeshComponent::OnDeserialized(const DataValue& node)\n    {\n        Component::OnDeserialized(node);\n        UpdateMesh();\n    }\n\n    void MeshComponent::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        Component::OnDeserializedDelta(node, origin);\n        UpdateMesh();\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::MeshComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::MeshComponent, o2__MeshComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/MeshComponent.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Math/Spline.h\"\n#include \"o2/Utils/Types/UID.h\"\n\nnamespace o2\n{\n    // --------------\n    // Mesh component\n    // --------------\n    class MeshComponent: public Component\n    {\n    public:\n        PROPERTIES(MeshComponent);\n        PROPERTY(AssetRef<ImageAsset>, image, SetImage, GetImage);                   // Image property\n        PROPERTY(RectF, mappingFrame, SetMappingFrame, GetMappingFrame);      // Image mapping frame\n        PROPERTY(Color4, color, SetColor, GetColor);                          // Color property\n        PROPERTY(Vector<Vec2F>, extraPoints, SetExtraPoints, GetExtraPoints); // extra points property\n\n        Ref<Spline> spline = mmake<Spline>(); // Shell spline @SERIALIZABLE\n\n    public:\n        // Default constructor\n        MeshComponent();\n\n        // Copy-constructor\n        MeshComponent(const MeshComponent& other);\n\n        // Destructor\n        ~MeshComponent();\n\n        // Assign operator\n        MeshComponent& operator=(const MeshComponent& other);\n\n        // Returns mesh\n        const Mesh& GetMesh() const;\n\n        // Sets extra points\n        void SetExtraPoints(const Vector<Vec2F>& points);\n\n        // Returns extra points list\n        const Vector<Vec2F>& GetExtraPoints() const;\n\n        // Sets extra point position\n        void SetExtraPoint(int idx, const Vec2F& pos);\n\n        // Adds one extra point\n        void AddExtraPoint(const Vec2F& point);\n\n        // Removes extra point by index\n        void RemoveExtraPoint(int idx);\n\n        // Sets image\n        void SetImage(const AssetRef<ImageAsset>& image);\n\n        // Returns image\n        const AssetRef<ImageAsset>& GetImage() const;\n\n        // Sets image mapping frame\n        void SetMappingFrame(const RectF& frame);\n\n        // Returns image mapping frame\n        const RectF& GetMappingFrame() const;\n\n        // Sets color\n        void SetColor(const Color4& color);\n\n        // Returns color\n        const Color4& GetColor() const;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Returns name of component icon\n        static String GetIcon();\n\n        SERIALIZABLE(MeshComponent);\n        CLONEABLE_REF(MeshComponent);\n\n    protected:\n        Mesh   mMesh;      // Drawing mesh, built from spline\n        Basis  mTransform; // Transform where mesh was built\n\n        AssetRef<ImageAsset> mImageAsset;                         // Image asset @SERIALIZABLE\n        RectF         mImageMapping = RectF(0, 0, 10, 10); // Image mapping rectangle @SERIALIZABLE\n\n        Vector<Vec2F> mExtraPoints; // Extra topology points @SERIALIZABLE\n\n        Color4 mColor = Color4::White(); // Mesh color @SERIALIZABLE\n\n        bool mNeedUpdateMesh = false; // True, when mesh data is dirty and need to rebuild\n\n    protected:\n        // Draws sprite \n        void OnDraw() override;\n\n        // Called when actor's transform was changed\n        void OnTransformUpdated() override;\n\n        // Calculates mesh from spline\n        void UpdateMesh();\n\n        // Sets owner actor\n        void SetOwnerActor(const Ref<Actor>& actor) override;\n\n        // Calling when deserializing\n        void OnDeserialized(const DataValue& node) override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::MeshComponent)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::MeshComponent)\n{\n    FIELD().PUBLIC().NAME(image);\n    FIELD().PUBLIC().NAME(mappingFrame);\n    FIELD().PUBLIC().NAME(color);\n    FIELD().PUBLIC().NAME(extraPoints);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(mmake<Spline>()).NAME(spline);\n    FIELD().PROTECTED().NAME(mMesh);\n    FIELD().PROTECTED().NAME(mTransform);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mImageAsset);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(RectF(0, 0, 10, 10)).NAME(mImageMapping);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mExtraPoints);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Color4::White()).NAME(mColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNeedUpdateMesh);\n}\nEND_META;\nCLASS_METHODS_META(o2::MeshComponent)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const MeshComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(const Mesh&, GetMesh);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExtraPoints, const Vector<Vec2F>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Vec2F>&, GetExtraPoints);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExtraPoint, int, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddExtraPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveExtraPoint, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetImage, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<ImageAsset>&, GetImage);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMappingFrame, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(const RectF&, GetMappingFrame);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(const Color4&, GetColor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetOwnerActor, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/ParticlesEmitterComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ParticlesEmitterComponent.h\"\n\n#include \"o2/Scene/Actor.h\"\n\nnamespace o2\n{\n\n    ParticlesEmitterComponent::ParticlesEmitterComponent()\n    {}\n\n    ParticlesEmitterComponent::ParticlesEmitterComponent(const ParticlesEmitterComponent& other):\n        Component(other), ParticlesEmitter(other)\n    {}\n\n    ParticlesEmitterComponent::~ParticlesEmitterComponent()\n    {}\n\n    ParticlesEmitterComponent& ParticlesEmitterComponent::operator=(const ParticlesEmitterComponent& other)\n    {\n        Component::operator=(other);\n        ParticlesEmitter::operator=(other);\n        return *this;\n    }\n\n    void ParticlesEmitterComponent::OnDraw()\n    {\n        ParticlesEmitter::Draw();\n    }\n\n    void ParticlesEmitterComponent::OnUpdate(float dt)\n    {\n        ParticlesEmitter::Update(dt);\n    }\n\n    bool ParticlesEmitterComponent::IsUnderPoint(const Vec2F& point)\n    {\n        return ParticlesEmitter::IsUnderPoint(point);\n    }\n\n    String ParticlesEmitterComponent::GetName()\n    {\n        return \"Particles emitter\";\n    }\n\n    String ParticlesEmitterComponent::GetCategory()\n    {\n        return \"Render\";\n    }\n\n    String ParticlesEmitterComponent::GetIcon()\n    {\n        return \"ui/UI4_emitter_component.png\";\n    }\n\n    Ref<o2::RefCounterable> ParticlesEmitterComponent::CastToRefCounterable(const Ref<ParticlesEmitterComponent>& ref)\n    {\n        return DynamicCast<Component>(ref);\n    }\n\n    void ParticlesEmitterComponent::OnTransformUpdated()\n    {\n        basis = mOwner.Lock()->transform->GetWorldBasis();\n    }\n\n    void ParticlesEmitterComponent::OnSerialize(DataValue& node) const\n    {\n        Component::OnSerialize(node);\n        ParticlesEmitter::OnSerialize(node);\n    }\n\n    void ParticlesEmitterComponent::OnDeserialized(const DataValue& node)\n    {\n        Component::OnDeserialized(node);\n        ParticlesEmitter::OnDeserialized(node);\n    }\n\n    void ParticlesEmitterComponent::OnSerializeDelta(DataValue& node, const IObject& origin) const\n    {\n        Component::OnSerializeDelta(node, origin);\n        ParticlesEmitter::OnSerializeDelta(node, origin);\n    }\n\n    void ParticlesEmitterComponent::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        Component::OnDeserializedDelta(node, origin);\n        ParticlesEmitter::OnDeserializedDelta(node, origin);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::ParticlesEmitterComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::ParticlesEmitterComponent, o2__ParticlesEmitterComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/ParticlesEmitterComponent.h",
    "content": "#pragma once\n\n#include \"o2/Render/Particles/ParticlesEmitter.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n\nnamespace o2\n{\n    // ---------------------------\n    // Particles emitter component\n    // ---------------------------\n    class ParticlesEmitterComponent: public Component, public ParticlesEmitter\n    {\n    public:\n        // Default constructor\n        ParticlesEmitterComponent();\n\n        // Copy constructor\n        ParticlesEmitterComponent(const ParticlesEmitterComponent& other);\n\n        // Destructor\n        ~ParticlesEmitterComponent();\n\n        // Assign operator\n        ParticlesEmitterComponent& operator=(const ParticlesEmitterComponent& other);\n\n        // Updates component\n        void OnUpdate(float dt) override;\n\n        // Returns true if point is under drawable\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Returns name of component icon\n        static String GetIcon();\n\n        // Dynamic cast to RefCounterable via Component\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<ParticlesEmitterComponent>& ref);\n\n        SERIALIZABLE(ParticlesEmitterComponent);\n        CLONEABLE_REF(ParticlesEmitterComponent);\n        REF_COUNTERABLE_IMPL(Component, ParticlesEmitter);\n\n    protected:\n        // Draw particle system\n        void OnDraw() override;\n\n        // Called when actor's transform was changed\n        void OnTransformUpdated() override;\n\n        // Beginning serialization callback\n        void OnSerialize(DataValue& node) const override;\n\n        // Called when object was deserialized\n        void OnDeserialized(const DataValue& node) override;\n\n        // Beginning serialization delta callback\n        void OnSerializeDelta(DataValue& node, const IObject& origin) const override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ParticlesEmitterComponent)\n{\n    BASE_CLASS(o2::Component);\n    BASE_CLASS(o2::ParticlesEmitter);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ParticlesEmitterComponent)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::ParticlesEmitterComponent)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ParticlesEmitterComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<ParticlesEmitterComponent>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerializeDelta, DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/ScissorClippingComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ScissorClippingComponent.h\"\n\nnamespace o2\n{\n\n    ScissorClippingComponent::ScissorClippingComponent()\n    {}\n\n    ScissorClippingComponent::~ScissorClippingComponent()\n    {}\n\n\tString ScissorClippingComponent::GetName()\n\t{\n        return \"Scissor clipping\";\n\t}\n\n\tString ScissorClippingComponent::GetCategory()\n\t{\n        return \"Render\";\n\t}\n\n\tvoid ScissorClippingComponent::OnDraw()\n    {\n        if (enableClipping)\n            o2Render.EnableScissorTest(mOwner.Lock()->transform->GetWorldAxisAlignedRect());\n    }\n\n    void ScissorClippingComponent::OnPostDraw()\n    {\n        if (enableClipping)\n            o2Render.DisableScissorTest();\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::ScissorClippingComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::ScissorClippingComponent, o2__ScissorClippingComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/ScissorClippingComponent.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Component.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------------------------------------------\n    // Scissor clipping component. Clips children and inherited drawables by parent actor bounds\n    // -----------------------------------------------------------------------------------------\n    class ScissorClippingComponent : public Component\n    {\n    public:\n        bool enableClipping = true; // Is clipping enabled @SERIALIZABLE\n\n    public:\n        // Default constructor\n        ScissorClippingComponent();\n\n        // Destructor\n\t\t~ScissorClippingComponent();\n\n\t\t// Returns name of component\n\t\tstatic String GetName();\n\n\t\t// Returns category of component\n\t\tstatic String GetCategory();\n\n        SERIALIZABLE(ScissorClippingComponent);\n        CLONEABLE_REF(ScissorClippingComponent);\n\n    private:\n        // Draws content of scene, enables scissor test and clips by actor bounds\n        void OnDraw() override;\n\n        // Draws component after all drawables, disables scissor test\n        void OnPostDraw() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ScissorClippingComponent)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ScissorClippingComponent)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(enableClipping);\n}\nEND_META;\nCLASS_METHODS_META(o2::ScissorClippingComponent)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnDraw);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnPostDraw);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/ScriptableComponent.cpp",
    "content": "#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/stdafx.h\"\n#include \"ScriptableComponent.h\"\n\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    ScriptableComponent::ScriptableComponent()\n    {\n\n    }\n\n    ScriptableComponent::ScriptableComponent(const ScriptableComponent& other):\n        Component(other)\n    {\n        SetScript(other.mScript);\n    }\n\n    ScriptableComponent::~ScriptableComponent()\n    {\n\n    }\n\n    ScriptableComponent& ScriptableComponent::operator=(const ScriptableComponent& other)\n    {\n        Component::operator=(other);\n        return *this;\n    }\n\n    void ScriptableComponent::SetScript(const AssetRef<JavaScriptAsset>& script)\n    {\n        if (mScript == script)\n            return;\n\n        mScript = script;\n        LoadScriptAndCreateObject();\n    }\n\n    const AssetRef<JavaScriptAsset>& ScriptableComponent::GetScript() const\n    {\n        return mScript;\n    }\n\n    ScriptValue ScriptableComponent::GetInstance() const\n    {\n        return mInstance;\n    }\n\n    ScriptValue ScriptableComponent::GetClass() const\n    {\n        return mClass;\n    }\n\n    String ScriptableComponent::GetName()\n    {\n        return \"Scriptable\";\n    }\n\n    String ScriptableComponent::GetCategory()\n    {\n        return \"Basic\";\n    }\n\n    String ScriptableComponent::GetIcon()\n    {\n        return \"ui/UI4_component_icon.png\";\n    }\n\n    void ScriptableComponent::LoadScriptAndCreateObject()\n    {\n        if (!mScript)\n            return;\n\n        auto parseRes = mScript->Parse();\n        o2Scripts.Run(parseRes);\n\n        auto className = o2FileSystem.GetPathWithoutDirectories(o2FileSystem.GetFileNameWithoutExtension(mScript->GetPath()));\n        auto classObj = o2Scripts.GetGlobal().GetOwnProperty(ScriptValue(className));\n        if (classObj.IsConstructor())\n        {\n            mInstance = classObj.Construct({});\n            mClass = classObj;\n\n            //o2Debug.LogStr(L\"Instance: \" + mInstance.Dump());\n\n            mOnStartFunc = mInstance.GetProperty(\"OnStart\");\n            mOnEnabledFunc = mInstance.GetProperty(\"OnEnabled\");\n            mOnDisabledFunc = mInstance.GetProperty(\"OnDisabled\");\n            mUpdateFunc = mInstance.GetProperty(\"Update\");\n        }\n        else\n        {\n            o2Debug.LogError(\"Can't find scripting class '\" + className + \"' in component file - \" + mScript->GetPath());\n\n            mInstance = ScriptValue();\n            mClass = ScriptValue();\n            mOnStartFunc = ScriptValue();\n            mOnEnabledFunc = ScriptValue();\n            mOnDisabledFunc = ScriptValue();\n            mUpdateFunc = ScriptValue();\n        }\n    }\n\n    void ScriptableComponent::OnSerialize(DataValue& node) const\n    {\n        Component::OnSerialize(node);\n\n        node[\"mScript\"].Set(mScript);\n\n        if (mInstance.IsObject())\n            node[\"mInstance\"].Set(mInstance);\n    }\n\n    void ScriptableComponent::OnDeserialized(const DataValue& node)\n    {\n        Component::OnDeserialized(node);\n\n        node[\"mScript\"].Get(mScript);\n        LoadScriptAndCreateObject();\n\n        if (mInstance.IsObject())\n        {\n            if (auto objectNode = node.FindMember(\"mInstance\"))\n            {\n                objectNode->Get(mInstance);\n                //o2Debug.LogStr(L\"Instance: \" + mInstance.Dump());\n            }\n        }\n    }\n\n    void ScriptableComponent::SetOwnerActor(const Ref<Actor>& actor)\n    {\n        Component::SetOwnerActor(actor);\n\n        //if (mInstance.IsObject())\n            mInstance.SetProperty(\"_actor\", actor);\n    }\n\n    void ScriptableComponent::OnAddToScene()\n    {\n        Component::OnAddToScene();\n    }\n\n    void ScriptableComponent::OnRemoveFromScene()\n    {\n        Component::OnRemoveFromScene();\n    }\n\n    void ScriptableComponent::OnStart()\n    {\n        if (mOnStartFunc.IsFunction())\n            mOnStartFunc.InvokeRaw(mInstance, {});\n    }\n\n    void ScriptableComponent::OnUpdate(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (mUpdateFunc.IsFunction())\n            mUpdateFunc.Invoke<void, float>(mInstance, dt);\n    }\n\n    void ScriptableComponent::OnEnabled()\n    {\n        if (mOnEnabledFunc.IsFunction())\n            mOnEnabledFunc.InvokeRaw(mInstance, {});\n    }\n\n    void ScriptableComponent::OnDisabled()\n    {\n        if (mOnDisabledFunc.IsFunction())\n            mOnDisabledFunc.InvokeRaw(mInstance, {});\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::ScriptableComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::ScriptableComponent, o2__ScriptableComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/ScriptableComponent.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Component.h\"\n#include \"o2/Assets/Types/JavaScriptAsset.h\"\n\nnamespace o2\n{    \n    // ---------------------\n    // Java Script component\n    // ---------------------\n    class ScriptableComponent: public Component\n    {\n    public:\n        PROPERTIES(ScriptableComponent);\n        PROPERTY(AssetRef<JavaScriptAsset>, script, SetScript, GetScript); // Script asset link property\n\n    public:\n        // Default constructor\n        ScriptableComponent();\n\n        // Copy-constructor\n        ScriptableComponent(const ScriptableComponent& other);\n\n        // Destructor\n        ~ScriptableComponent();\n\n        // Copy-operator\n        ScriptableComponent& operator=(const ScriptableComponent& other);\n\n        // Calls update\n        void OnUpdate(float dt) override;\n\n        // Sets script\n        void SetScript(const AssetRef<JavaScriptAsset>& script);\n\n        // Returns script\n        const AssetRef<JavaScriptAsset>& GetScript() const;\n\n        // Returns scripting instance\n        ScriptValue GetInstance() const;\n\n        // Returns scripting instance class\n        ScriptValue GetClass() const;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Returns name of component icon\n        static String GetIcon();\n\n        SERIALIZABLE(ScriptableComponent);\n        CLONEABLE_REF(ScriptableComponent);\n\n    protected:\n        AssetRef<JavaScriptAsset> mScript; // Java script asset link\n\n        ScriptValue mInstance;  // Script value instance @EDITOR_PROPERTY @NO_HEADER\n        ScriptValue mClass;     // Script instance class\n\n        ScriptValue mOnStartFunc;\n        ScriptValue mOnEnabledFunc;\n        ScriptValue mOnDisabledFunc;\n        ScriptValue mUpdateFunc;\n\n    protected:\n        // Loads script and creates object instance\n        void LoadScriptAndCreateObject();\n\n        // Beginning serialization callback\n        void OnSerialize(DataValue& node) const override;\n\n        // Completion deserialization callback, loads script and creates instance\n        void OnDeserialized(const DataValue& node) override;\n\n        // Sets owner actor\n        void SetOwnerActor(const Ref<Actor>& actor) override;\n\n        // Called when actor was included to scene\n        void OnAddToScene() override;\n\n        // Called when actor was excluded from scene\n        void OnRemoveFromScene() override;\n\n        // Called when component started working on first update frame\n        void OnStart() override;\n\n        // Called when actor enabled in hierarchy\n        void OnEnabled() override;\n\n        // Called when actor disabled in hierarchy\n        void OnDisabled() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ScriptableComponent)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ScriptableComponent)\n{\n    FIELD().PUBLIC().NAME(script);\n    FIELD().PROTECTED().NAME(mScript);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().NO_HEADER_ATTRIBUTE().NAME(mInstance);\n    FIELD().PROTECTED().NAME(mClass);\n    FIELD().PROTECTED().NAME(mOnStartFunc);\n    FIELD().PROTECTED().NAME(mOnEnabledFunc);\n    FIELD().PROTECTED().NAME(mOnDisabledFunc);\n    FIELD().PROTECTED().NAME(mUpdateFunc);\n}\nEND_META;\nCLASS_METHODS_META(o2::ScriptableComponent)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ScriptableComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScript, const AssetRef<JavaScriptAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<JavaScriptAsset>&, GetScript);\n    FUNCTION().PUBLIC().SIGNATURE(ScriptValue, GetInstance);\n    FUNCTION().PUBLIC().SIGNATURE(ScriptValue, GetClass);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadScriptAndCreateObject);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetOwnerActor, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStart);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/SkinningMeshBoneComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SkinningMeshBoneComponent.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Components/SkinningMeshComponent.h\"\n\nnamespace o2\n{\n\n    SkinningMeshBoneComponent::SkinningMeshBoneComponent()\n    {}\n\n    SkinningMeshBoneComponent::SkinningMeshBoneComponent(const SkinningMeshBoneComponent& other):\n        Component(other)\n    {}\n\n    SkinningMeshBoneComponent::~SkinningMeshBoneComponent()\n    {}\n\n    SkinningMeshBoneComponent& SkinningMeshBoneComponent::operator=(const SkinningMeshBoneComponent& other)\n    {\n        Component::operator=(other);\n        return *this;\n    }\n\n    void SkinningMeshBoneComponent::OnDraw()\n    {\n//         o2Render.DrawArrow(mOwner->transform->GetWorldPivot(),\n//                            mOwner->transform->Local2WorldPoint(Vec2F(length, 0) + mOwner->transform->GetSizePivot()));\n    }\n\n    void SkinningMeshBoneComponent::OnUpdate(float dt)\n    {\n    }\n\n    String SkinningMeshBoneComponent::GetName()\n    {\n        return \"Skinning mesh bone\";\n    }\n\n    String SkinningMeshBoneComponent::GetCategory()\n    {\n        return \"Animation\";\n    }\n\n    String SkinningMeshBoneComponent::GetIcon()\n    {\n        return \"ui/UI4_emitter_component.png\";\n    }\n\n    void SkinningMeshBoneComponent::OnTransformUpdated()\n    {\n    }\n\n    void SkinningMeshBoneComponent::OnAddToScene()\n    {\n        if (auto skinningMesh = FindSkinningMesh())\n            skinningMesh->NeedUpdateBones(true);\n    }\n\n    void SkinningMeshBoneComponent::OnRemoveFromScene()\n    {\n        if (auto skinningMesh = FindSkinningMesh())\n            skinningMesh->NeedUpdateBones(true);\n    }\n\n    Ref<SkinningMeshComponent> SkinningMeshBoneComponent::FindSkinningMesh() const\n    {\n        auto itActor = mOwner.Lock();\n        while (itActor)\n        {\n            if (auto mesh = itActor->GetComponent<SkinningMeshComponent>())\n                return mesh;\n\n            itActor = itActor->GetParent().Lock();\n        }\n\n        return nullptr;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::SkinningMeshBoneComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::SkinningMeshBoneComponent, o2__SkinningMeshBoneComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/SkinningMeshBoneComponent.h",
    "content": "#pragma once\n\n#include \"o2/Render/Particles/ParticlesEmitter.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n\nnamespace o2\n{\n    class SkinningMeshComponent;\n\n    class SkinningMeshBoneComponent: public Component\n    {\n    public:\n        Vector<Pair<int, float>> vertexWeights; // Weights of vertices dependent on this bone. index - weight @SERIALIZABLE\n\n        float length = 100; // Bone length. Used for visualization @SERIALIZABLE\n\n    public:\n        // Default constructor\n        SkinningMeshBoneComponent();\n\n        //Copy constructor\n        SkinningMeshBoneComponent(const SkinningMeshBoneComponent& other);\n\n        //Destructor\n        ~SkinningMeshBoneComponent();\n\n        // Copy operator\n        SkinningMeshBoneComponent& operator=(const SkinningMeshBoneComponent& other);\n\n        // Updates component\n        void OnUpdate(float dt) override;\n\n        // Searches skinning mesh in parent hierarchy\n        Ref<SkinningMeshComponent> FindSkinningMesh() const;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Returns name of component icon\n        static String GetIcon();\n\n        SERIALIZABLE(SkinningMeshBoneComponent);\n        CLONEABLE_REF(SkinningMeshBoneComponent);\n\n    protected:\n        // Draw particle system\n        void OnDraw() override;\n\n        // Called when actor's transform was changed\n        void OnTransformUpdated() override;\n\n        // Called when actor was included to scene\n        void OnAddToScene() override;\n\n        // Called when actor was excluded from scene\n        void OnRemoveFromScene() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::SkinningMeshBoneComponent)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SkinningMeshBoneComponent)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(vertexWeights);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(100).NAME(length);\n}\nEND_META;\nCLASS_METHODS_META(o2::SkinningMeshBoneComponent)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const SkinningMeshBoneComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SkinningMeshComponent>, FindSkinningMesh);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/SkinningMeshComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SkinningMeshComponent.h\"\n\n#include \"3rdPartyLibs/CDT/include/CDT.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Components/SkinningMeshBoneComponent.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n\nnamespace o2\n{\n    SkinningMeshComponent::SkinningMeshComponent():\n        Component()\n    {\n        spline->onKeysChanged = THIS_FUNC(UpdateMesh);\n        spline->SetClosed(true);\n    }\n\n    SkinningMeshComponent::SkinningMeshComponent(const SkinningMeshComponent& other):\n        Component(other), mMesh(other.mMesh), spline(other.spline)\n    {\n        spline->onKeysChanged = THIS_FUNC(UpdateMesh);\n        spline->SetClosed(true);\n    }\n\n    SkinningMeshComponent::~SkinningMeshComponent()\n    {}\n\n    SkinningMeshComponent& SkinningMeshComponent::operator=(const SkinningMeshComponent& other)\n    {\n        Component::operator=(other);\n        spline = other.spline;\n        mMesh = other.mMesh;\n        return *this;\n    }\n\n    void SkinningMeshComponent::OnDraw()\n    {\n        if (mNeedUpdateMesh)\n            UpdateMesh();\n\n        UpdateBonesTransforms();\n\n        mMesh.Reskin();\n        mMesh.Draw();\n\n        if (o2Input.IsKeyDown(VK_F3))\n            DrawMeshWire();\n    }\n\n    void SkinningMeshComponent::OnUpdate(float dt)\n    {\n        if (mNeedUpdateBones)\n            UpdateBones();\n\n        UpdateBonesTransforms();\n    }\n\n    void SkinningMeshComponent::UpdateBonesTransforms()\n    {\n        for (auto& bone : mBonesMapping)\n            bone.second->releaseTransform = bone.second->baseTransform.Inverted()*bone.first.Lock()->GetActor()->transform->GetWorldNonSizedBasis();\n    }\n\n    void SkinningMeshComponent::UpdateBones()\n    {\n        mBonesMapping.Clear();\n\n        Function<void(const Ref<Actor>)> searchBones = [&searchBones, this](const Ref<Actor>& actor) {\n            if (auto boneComp = actor->GetComponent<SkinningMeshBoneComponent>())\n                mBonesMapping.Add({ boneComp, nullptr });\n\n            for (auto& child : actor->GetChildren())\n                searchBones(child);\n        };\n\n        searchBones(mOwner.Lock());\n\n        mMesh.SetMaxBonesCount(mBonesMapping.Count() + 1);\n        mMesh.bonesCount = mBonesMapping.Count() + 1;\n\n        for (int i = 0; i < mMesh.vertexCount; i++)\n        {\n            memset(mMesh.vertices[i].bones, 0, sizeof(mMesh.vertices[i].bones));\n            memset(mMesh.vertices[i].boneWeights, 0, sizeof(mMesh.vertices[i].boneWeights));\n        }\n\n        for (int i = 0; i < mBonesMapping.Count(); i++)\n        {\n            mBonesMapping[i].second = &mMesh.bones[i + 1];\n            mBonesMapping[i].second->baseTransform = \n                mBonesMapping[i].first.Lock()->GetActor()->transform->GetWorldNonSizedBasis();\n\n            for (auto& weightPair : mBonesMapping[i].first.Lock()->vertexWeights)\n            {\n                auto& vertex = mMesh.vertices[weightPair.first];\n\n                int boneId = 0;\n                const int maxBoneId = sizeof(vertex.bones)/sizeof(vertex.bones[0]);\n                for (; boneId < maxBoneId; boneId++)\n                {\n                    if (vertex.bones[boneId] == 0)\n                        break;\n                }\n\n                if (boneId == maxBoneId)\n                    o2Debug.LogError(\"Too much bones affects vertex in skinning mesh, skipping\");\n                else\n                {\n                    vertex.bones[boneId] = i + 1;\n                    vertex.boneWeights[boneId] = weightPair.second;\n                }\n            }\n        }\n\n        for (int i = 0; i < mMesh.vertexCount; i++)\n        {\n            auto& v = mMesh.vertices[i];\n            float weightsSum = v.boneWeights[0] + v.boneWeights[1] + v.boneWeights[2] + v.boneWeights[3];\n            v.boneWeights[0] /= weightsSum;\n            v.boneWeights[1] /= weightsSum;\n            v.boneWeights[2] /= weightsSum;\n            v.boneWeights[3] /= weightsSum;\n        }\n\n        mNeedUpdateBones = false;\n    }\n\n    void SkinningMeshComponent::OnStart()\n    {\n        UpdateBones();\n    }\n\n    void SkinningMeshComponent::OnTransformUpdated()\n    {\n        auto newTransform = mOwner.Lock()->transform->GetWorldNonSizedBasis();\n        auto delta = newTransform*mTransform.Inverted();\n        mTransform = newTransform;\n\n        for (int i = 0; i < mMesh.vertexCount; i++)\n        {\n            auto v = mMesh.vertices[i];\n            Vec2F newPos = v*delta;\n            mMesh.vertices[i].Set(newPos, v.z, v.color, v.tu, v.tv);\n        }\n    }\n\n    void SkinningMeshComponent::UpdateMesh()\n    {\n        mNeedUpdateMesh = false;\n\n        if (spline->GetKeys().Count() < 3)\n            return;\n\n        std::vector<CDT::V2d<float>> verticies;\n        std::vector<CDT::Edge> edges;\n\n        auto pushVertex = [&](const Vec2F& p) {\n            verticies.push_back(CDT::V2d<float>::make(p.x, p.y));\n\n            if (verticies.size() > 1)\n                edges.push_back(CDT::Edge(verticies.size() - 2, verticies.size() - 1));\n        };\n\n        int count = spline->GetKeys().Count();\n        for (int i = 0; i < count; i++)\n        {\n            auto key = spline->GetKey(i);\n            auto prevKey = spline->GetKey((i - 1 + count)%count);\n\n            const float noSupportsThreshold = 0.01f;\n            if (!(key.prevSupport.Length() < noSupportsThreshold && prevKey.nextSupport.Length() < noSupportsThreshold))\n            {\n                for (int j = 1; j < key.GetApproximatedPointsCount() - 1; j++)\n                    pushVertex(key.GetApproximatedPointsLeft()[j].value);\n            }\n\n            pushVertex(key.value);\n        }\n\n        edges.push_back(CDT::Edge(verticies.size() - 1, 0));\n\n        for (auto& p : mExtraPoints)\n            verticies.push_back(CDT::V2d<float>::make(p.x, p.y));\n\n        CDT::Triangulation<float> triangulation(CDT::VertexInsertionOrder::AsProvided);\n        triangulation.insertVertices(verticies);\n        triangulation.insertEdges(edges);\n        triangulation.eraseOuterTriangles();\n\n        mMesh.Resize(triangulation.vertices.size(), triangulation.triangles.size(), 1);\n\n        TextureSource imageSource = mImageAsset ? mImageAsset->GetTextureSource() : TextureSource();\n        auto texture = imageSource.texture;\n        Vec2F invTexSize(1.0f, 1.0f);\n        if (texture)\n            invTexSize.Set(1.0f/texture->GetSize().x, 1.0f/texture->GetSize().y);\n\n        RectF imageRect = imageSource.sourceRect;\n        RectF imageUV = RectF(imageRect.left*invTexSize.x, 1.0f - imageRect.top*invTexSize.y,\n                              imageRect.right*invTexSize.x, 1.0f - imageRect.bottom*invTexSize.y);\n\n        for (int i = 0; i < triangulation.vertices.size(); i++)\n        {\n            Vec2F p(triangulation.vertices[i].x, triangulation.vertices[i].y);\n            Vec2F coef((p.x - mImageMapping.left)/mImageMapping.Width(), (p.y - mImageMapping.bottom)/mImageMapping.Height());\n            mMesh.vertices[i].Set(p*mTransform, 1.0f,\n                                  mColor.ARGB(),\n                                  imageUV.left + coef.x*imageUV.Width(),\n                                  imageUV.bottom + coef.y*imageUV.Height());\n        }\n\n        for (int i = 0; i < triangulation.triangles.size(); i++)\n        {\n            mMesh.indexes[i*3] = triangulation.triangles[i].vertices[0];\n            mMesh.indexes[i*3 + 1] = triangulation.triangles[i].vertices[1];\n            mMesh.indexes[i*3 + 2] = triangulation.triangles[i].vertices[2];\n        }\n\n        mMesh.SetTexture(texture);\n        mMesh.vertexCount = triangulation.vertices.size();\n        mMesh.polyCount = triangulation.triangles.size();\n    }\n\n    const SkinningMesh& SkinningMeshComponent::GetMesh() const\n    {\n        return mMesh;\n    }\n\n    void SkinningMeshComponent::SetExtraPoints(const Vector<Vec2F>& points)\n    {\n        mExtraPoints = points;\n        mNeedUpdateMesh = true;\n    }\n\n    const Vector<Vec2F>& SkinningMeshComponent::GetExtraPoints() const\n    {\n        return mExtraPoints;\n    }\n\n    void SkinningMeshComponent::SetExtraPoint(int idx, const Vec2F& pos)\n    {\n        mExtraPoints[idx] = pos;\n        mNeedUpdateMesh = true;\n    }\n\n    void SkinningMeshComponent::AddExtraPoint(const Vec2F& point)\n    {\n        mExtraPoints.Add(point);\n        mNeedUpdateMesh = true;\n    }\n\n    void SkinningMeshComponent::RemoveExtraPoint(int idx)\n    {\n        mExtraPoints.RemoveAt(idx);\n        mNeedUpdateMesh = true;\n    }\n\n    void SkinningMeshComponent::SetImage(const AssetRef<ImageAsset>& image)\n    {\n        mImageAsset = image;\n        mNeedUpdateMesh = true;\n    }\n\n    const AssetRef<ImageAsset>& SkinningMeshComponent::GetImage() const\n    {\n        return mImageAsset;\n    }\n\n    void SkinningMeshComponent::SetMappingFrame(const RectF& frame)\n    {\n        mImageMapping = frame;\n        mNeedUpdateMesh = true;\n    }\n\n    const RectF& SkinningMeshComponent::GetMappingFrame() const\n    {\n        return mImageMapping;\n    }\n\n    void SkinningMeshComponent::SetColor(const Color4& color)\n    {\n        mColor = color;\n        mNeedUpdateMesh = true;\n    }\n\n    const Color4& SkinningMeshComponent::GetColor() const\n    {\n        return mColor;\n    }\n\n    void SkinningMeshComponent::NeedUpdateBones(bool force /*= false*/)\n    {\n        mNeedUpdateBones = true;\n\n        if (force)\n            UpdateBones();\n    }\n\n    const Vector<Pair<WeakRef<SkinningMeshBoneComponent>, SkinningMesh::Bone*>>& SkinningMeshComponent::GetBones() const\n    {\n        return mBonesMapping;\n    }\n\n    String SkinningMeshComponent::GetName()\n    {\n        return \"Skinning Mesh\";\n    }\n\n    String SkinningMeshComponent::GetCategory()\n    {\n        return \"Render\";\n    }\n\n    String SkinningMeshComponent::GetIcon()\n    {\n        return \"ui/UI4_image_component.png\";\n    }\n\n    void SkinningMeshComponent::SetOwnerActor(const Ref<Actor>& actor)\n    {\n        Component::SetOwnerActor(actor);\n    }\n\n    void SkinningMeshComponent::OnDeserialized(const DataValue& node)\n    {\n        Component::OnDeserialized(node);\n        UpdateMesh();\n    }\n\n    void SkinningMeshComponent::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        Component::OnDeserializedDelta(node, origin);\n        UpdateMesh();\n    }\n\n    void SkinningMeshComponent::DrawMeshWire() const\n    {\n        Color4 wireColor(255, 255, 255, 100);\n        Vector<Vertex> verticies;\n        for (int i = 0; i < mMesh.polyCount; i++)\n        {\n            auto v = mMesh.vertices[mMesh.indexes[i*3]];\n            auto v1 = mMesh.vertices[mMesh.indexes[i*3 + 1]];\n            auto v2 = mMesh.vertices[mMesh.indexes[i*3 + 2]];\n\n            verticies.Clear();\n            verticies.Add(Vertex(v.x, v.y, 0.0f, wireColor.ABGR(), 0.0f, 0.0f));\n            verticies.Add(Vertex(v1.x, v1.y, 0.0f, wireColor.ABGR(), 0.0f, 0.0f));\n            verticies.Add(Vertex(v2.x, v2.y, 0.0f, wireColor.ABGR(), 0.0f, 0.0f));\n            verticies.Add(Vertex(v.x, v.y, 0.0f, wireColor.ABGR(), 0.0f, 0.0f));\n            o2Render.DrawPolyLine(verticies.Data(), verticies.Count());\n        }\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::SkinningMeshComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::SkinningMeshComponent, o2__SkinningMeshComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/SkinningMeshComponent.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/SkinningMesh.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Math/Spline.h\"\n#include \"o2/Utils/Types/UID.h\"\n\nnamespace o2\n{\n    class SkinningMeshBoneComponent;\n\n    // ------------------------\n    // Skinning mesh component\n    // ------------------------\n    class SkinningMeshComponent: public Component\n    {\n    public:\n        PROPERTIES(SkinningMeshComponent);\n        PROPERTY(AssetRef<ImageAsset>, image, SetImage, GetImage);                   // Image property\n        PROPERTY(RectF, mappingFrame, SetMappingFrame, GetMappingFrame);      // Image mapping frame\n        PROPERTY(Color4, color, SetColor, GetColor);                          // Color property\n        PROPERTY(Vector<Vec2F>, extraPoints, SetExtraPoints, GetExtraPoints); // extra points property\n\n        Ref<Spline> spline = mmake<Spline>(); // Shell spline @SERIALIZABLE\n\n    public:\n        // Default constructor\n        SkinningMeshComponent();\n\n        // Copy-constructor\n        SkinningMeshComponent(const SkinningMeshComponent& other);\n\n        // Destructor\n        ~SkinningMeshComponent();\n\n        // Assign operator\n        SkinningMeshComponent& operator=(const SkinningMeshComponent& other);\n\n        // Updates mesh bones and reskins\n        void OnUpdate(float dt) override;\n\n        // Updates bones transformations\n        void UpdateBonesTransforms();\n\n        // Returns mesh\n        const SkinningMesh& GetMesh() const;\n\n        // Sets extra points\n        void SetExtraPoints(const Vector<Vec2F>& points);\n\n        // Returns extra points list\n        const Vector<Vec2F>& GetExtraPoints() const;\n\n        // Sets extra point position\n        void SetExtraPoint(int idx, const Vec2F& pos);\n\n        // Adds one extra point\n        void AddExtraPoint(const Vec2F& point);\n\n        // Removes extra point by index\n        void RemoveExtraPoint(int idx);\n\n        // Sets image\n        void SetImage(const AssetRef<ImageAsset>& image);\n\n        // Returns image\n        const AssetRef<ImageAsset>& GetImage() const;\n\n        // Sets image mapping frame\n        void SetMappingFrame(const RectF& frame);\n\n        // Returns image mapping frame\n        const RectF& GetMappingFrame() const;\n\n        // Sets color\n        void SetColor(const Color4& color);\n\n        // Returns color\n        const Color4& GetColor() const;\n\n        // Marks bones outdated and needs to update\n        void NeedUpdateBones(bool force = false);\n\n        // Returns list of bones\n        const Vector<Pair<WeakRef<SkinningMeshBoneComponent>, SkinningMesh::Bone*>>& GetBones() const;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Returns name of component icon\n        static String GetIcon();\n\n        SERIALIZABLE(SkinningMeshComponent);\n        CLONEABLE_REF(SkinningMeshComponent);\n\n    protected:\n        SkinningMesh mMesh;      // Drawing mesh, built from spline\n        Basis        mTransform; // Transform where mesh was built\n\n        Vector<Pair<WeakRef<SkinningMeshBoneComponent>, SkinningMesh::Bone*>> mBonesMapping; // Map of bones to components. Updates in UpdateBones, used in updating mesh\n\n        AssetRef<ImageAsset> mImageAsset;                         // Image asset @SERIALIZABLE\n        RectF         mImageMapping = RectF(0, 0, 10, 10); // Image mapping rectangle @SERIALIZABLE\n\n        Vector<Vec2F> mExtraPoints; // Extra topology points @SERIALIZABLE\n\n        Color4 mColor = Color4::White(); // Mesh color @SERIALIZABLE\n\n        bool mNeedUpdateMesh = false;  // True, when mesh data is dirty and need to rebuild\n        bool mNeedUpdateBones = false; // True, when bones need to be updated\n\n    protected:\n        // Draws sprite \n        void OnDraw() override;\n\n        // Called when component starts, updates bones\n        void OnStart() override;\n\n        // Called when actor's transform was changed\n        void OnTransformUpdated() override;\n\n        // Calculates mesh from spline\n        void UpdateMesh();\n\n        // Checks bones hierarchy and rebuilds hierarchy for skinning mesh\n        void UpdateBones();\n\n        // Sets owner actor\n        void SetOwnerActor(const Ref<Actor>& actor) override;\n\n        // Calling when deserializing\n        void OnDeserialized(const DataValue& node) override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n        // Draws origin not skinned mesh wire\n        void DrawMeshWire() const;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::SkinningMeshComponent)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SkinningMeshComponent)\n{\n    FIELD().PUBLIC().NAME(image);\n    FIELD().PUBLIC().NAME(mappingFrame);\n    FIELD().PUBLIC().NAME(color);\n    FIELD().PUBLIC().NAME(extraPoints);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(mmake<Spline>()).NAME(spline);\n    FIELD().PROTECTED().NAME(mMesh);\n    FIELD().PROTECTED().NAME(mTransform);\n    FIELD().PROTECTED().NAME(mBonesMapping);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mImageAsset);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(RectF(0, 0, 10, 10)).NAME(mImageMapping);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mExtraPoints);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Color4::White()).NAME(mColor);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNeedUpdateMesh);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mNeedUpdateBones);\n}\nEND_META;\nCLASS_METHODS_META(o2::SkinningMeshComponent)\n{\n\n    typedef const Vector<Pair<WeakRef<SkinningMeshBoneComponent>, SkinningMesh::Bone*>>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const SkinningMeshComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateBonesTransforms);\n    FUNCTION().PUBLIC().SIGNATURE(const SkinningMesh&, GetMesh);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExtraPoints, const Vector<Vec2F>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Vec2F>&, GetExtraPoints);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExtraPoint, int, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddExtraPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveExtraPoint, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetImage, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<ImageAsset>&, GetImage);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMappingFrame, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(const RectF&, GetMappingFrame);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(const Color4&, GetColor);\n    FUNCTION().PUBLIC().SIGNATURE(void, NeedUpdateBones, bool);\n    FUNCTION().PUBLIC().SIGNATURE(_tmp1, GetBones);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStart);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateMesh);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateBones);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetOwnerActor, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawMeshWire);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/SpineComponent.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SpineComponent.h\"\n\nnamespace o2\n{\n    SpineComponent::SpineComponent()\n    {}\n\n    SpineComponent::SpineComponent(const SpineComponent& other)\n    {}\n\n    SpineComponent::~SpineComponent()\n    {}\n\n    void SpineComponent::SetSpineAsset(const AssetRef<SpineAsset>& spineAsset)\n    {\n        mSpineAsset = spineAsset;\n        LoadSpine();\n        CreateAnimationStates();\n    }\n\n    const AssetRef<SpineAsset>& SpineComponent::GetSpineAsset() const\n    {\n        return mSpineAsset;\n    }\n\n    String SpineComponent::GetName()\n    {\n        return \"Spine\";\n    }\n\n    String SpineComponent::GetCategory()\n    {\n        return \"Animation\";\n    }\n\n    String SpineComponent::GetIcon()\n    {\n        return \"ui/UI4_animation_component.png\";\n    }\n\n    SpineComponent& SpineComponent::operator=(const SpineComponent& other)\n    {\n        AnimationComponent::operator=(other);\n\n        mSpineAsset = other.mSpineAsset;\n        LoadSpine();\n\n        return *this;\n    }\n\n    void SpineComponent::LoadSpine()\n    {\n        if (!mSpineAsset)\n            return;\n\n        mSpineRenderer = mmake<Spine>(mSpineAsset);\n    }\n\n    void SpineComponent::CreateAnimationStates()\n    {\n        auto names = mSpineRenderer->GetAnimationNames();\n        for (auto& name : names)\n        {\n            auto state = AddState(mmake<AnimationState>(name));\n            state->autoPlay = mStates.Count() == 1;\n        }\n    }\n\n    void SpineComponent::OnInitialized()\n    {\n        LoadSpine();\n        AnimationComponent::OnInitialized();\n    }\n\n    void SpineComponent::OnTransformUpdated()\n    {\n        AnimationComponent::OnTransformUpdated();\n\n        if (mSpineRenderer)\n            mSpineRenderer->transform = mOwner.Lock()->transform->worldNonSizedBasis;\n    }\n\n    void SpineComponent::OnUpdate(float dt)\n    {\n        AnimationComponent::OnUpdate(dt);\n\n        if (mSpineRenderer)\n            mSpineRenderer->Update(dt);\n    }\n\n    void SpineComponent::OnDraw()\n    {\n        AnimationComponent::OnDraw();\n\n        if (mSpineRenderer)\n            mSpineRenderer->Draw();\n    }\n\n    SpineComponent::AnimationState::AnimationState(const String& name):\n        IAnimationState(name)\n    {}\n\n    void SpineComponent::AnimationState::Update(float dt)\n    {\n        if (mTrack)\n            mTrack->Update(dt);\n    }\n\n    IAnimation& SpineComponent::AnimationState::GetPlayer()\n    {\n        if (mTrack)\n            return *mTrack;\n\n        return IAnimationState::GetPlayer();\n    }\n\n\tfloat SpineComponent::AnimationState::GetDuration() const\n\t{\n\t\tif (mTrack)\n\t\t\treturn mTrack->GetDuration();\n\n        return 0.0f;\n\t}\n\n\tvoid SpineComponent::AnimationState::SetWeight(float weight)\n    {\n        mWeight = weight;\n\n        if (mTrack)\n            mTrack->SetWeight(weight);\n    }\n\n    float SpineComponent::AnimationState::GetWeight() const\n    {\n        return mWeight;\n    }\n\n    void SpineComponent::AnimationState::SetLooped(bool looped)\n    {\n        mLooped = looped;\n    \n        if (mTrack)\n            mTrack->SetLoop(looped ? Loop::Repeat : Loop::None);\n    }\n\n    bool SpineComponent::AnimationState::IsLooped() const\n    {\n        return mLooped;\n    }\n\n    void SpineComponent::AnimationState::Register(const Ref<AnimationComponent>& owner)\n    {\n        IAnimationState::Register(owner);\n\n        if (auto spineComponent = DynamicCast<SpineComponent>(owner))\n        {\n            if (spineComponent->mSpineRenderer)\n            {\n                mTrack = spineComponent->mSpineRenderer->GetTrack(name);\n                if (mTrack)\n                {\n                    mTrack->SetLoop(looped ? Loop::Repeat : Loop::None);\n                    mTrack->SetWeight(mWeight);\n                }\n            }\n        }\n    }\n\n    void SpineComponent::AnimationState::Unregister()\n    {\n        IAnimationState::Unregister();\n\n        mTrack = nullptr;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::SpineComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::SpineComponent, o2__SpineComponent);\n\nDECLARE_CLASS(o2::SpineComponent::AnimationState, o2__SpineComponent__AnimationState);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/SpineComponent.h",
    "content": "#pragma once\n\n#include \"o2/Render/Spine/Spine.h\"\n#include \"o2/Scene/Components/AnimationComponent.h\"\n\nnamespace o2\n{\n    // --------------------------------\n    // EsotericSoftware spine component\n    // --------------------------------\n    class SpineComponent : public AnimationComponent\n    {\n    public:\n        // ---------------------\n        // Spine animation state\n        // ---------------------\n        class AnimationState : public IAnimationState\n        {\n        public:\n            PROPERTIES(AnimationState);\n            PROPERTY(bool, looped, SetLooped, IsLooped); // State looped\n\n        public:\n            // Default constructor\n            AnimationState() = default;\n\n            // Constructor\n            AnimationState(const String& name);\n\n            // Updates state\n            void Update(float dt) override;\n\n            // Returns player\n            IAnimation& GetPlayer() override;\n\n\t\t\t// Returns animation duration\n\t\t\tfloat GetDuration() const override;\n\n            // Sets state weight\n            void SetWeight(float weight) override;\n\n            // Returns state weight\n            float GetWeight() const override;\n\n            // Sets state looped\n            void SetLooped(bool looped) override;\n\n            // Returns state looped\n            bool IsLooped() const override;\n\n            SERIALIZABLE(AnimationState);\n            CLONEABLE_REF(AnimationState);\n\n        private:\n            Ref<Spine::Track> mTrack; // Spine track @EDITOR_PROPERTY\n\n            bool mLooped = false; // State looped @SERIALIZABLE\n            float mWeight = 1.0f; // State weight @SERIALIZABLE @RANGE(0, 1)\n\n        protected:\n            // Registers animation in state\n            void Register(const Ref<AnimationComponent>& owner);\n\n            // Removes animation state from component\n            void Unregister();\n        };\n\n    public:\n        PROPERTIES(SpineComponent);\n        PROPERTY(AssetRef<SpineAsset>, spineAsset, SetSpineAsset, GetSpineAsset); // Spine asset @EDITOR_PROPERTY\n\n    public:\n        // Default constructor\n        SpineComponent();\n\n        // Copy-constructor\n        SpineComponent(const SpineComponent& other);\n\n        // Copy-operator\n        SpineComponent& operator=(const SpineComponent& other);\n\n        // Destructor\n        ~SpineComponent();\n\n        // Sets spine asset and loads spine\n        void SetSpineAsset(const AssetRef<SpineAsset>& spineAsset);\n\n        // Returns spine asset\n        const AssetRef<SpineAsset>& GetSpineAsset() const;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Returns name of component icon\n        static String GetIcon();\n\n        SERIALIZABLE(SpineComponent);\n        CLONEABLE_REF(SpineComponent);\n\n    protected:\n        AssetRef<SpineAsset> mSpineAsset; // Spine asset @SERIALIZABLE\n\n        Ref<Spine> mSpineRenderer; // Spine renderer\n\n    protected:\n        // Loads spine from asset\n        void LoadSpine();\n\n        // Creates animation states from spine\n        void CreateAnimationStates();\n\n        // Called when actor and scene is initialized\n        void OnInitialized() override;\n\n        // Called when transformation was updated. Updates spine root transform\n        void OnTransformUpdated() override;\n\n        // Called on update with frame dt, updates spine animation\n        void OnUpdate(float dt) override;\n\n        // Called when actor is drawing, draws spine animation\n        void OnDraw() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::SpineComponent)\n{\n    BASE_CLASS(o2::AnimationComponent);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SpineComponent)\n{\n    FIELD().PUBLIC().EDITOR_PROPERTY_ATTRIBUTE().NAME(spineAsset);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSpineAsset);\n    FIELD().PROTECTED().NAME(mSpineRenderer);\n}\nEND_META;\nCLASS_METHODS_META(o2::SpineComponent)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const SpineComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSpineAsset, const AssetRef<SpineAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<SpineAsset>&, GetSpineAsset);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetIcon);\n    FUNCTION().PROTECTED().SIGNATURE(void, LoadSpine);\n    FUNCTION().PROTECTED().SIGNATURE(void, CreateAnimationStates);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnInitialized);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraw);\n}\nEND_META;\n\nCLASS_BASES_META(o2::SpineComponent::AnimationState)\n{\n    BASE_CLASS(o2::IAnimationState);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SpineComponent::AnimationState)\n{\n    FIELD().PUBLIC().NAME(looped);\n    FIELD().PRIVATE().EDITOR_PROPERTY_ATTRIBUTE().NAME(mTrack);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mLooped);\n    FIELD().PRIVATE().RANGE_ATTRIBUTE(0, 1).SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mWeight);\n}\nEND_META;\nCLASS_METHODS_META(o2::SpineComponent::AnimationState)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(IAnimation&, GetPlayer);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDuration);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWeight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetWeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLooped, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLooped);\n    FUNCTION().PROTECTED().SIGNATURE(void, Register, const Ref<AnimationComponent>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, Unregister);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/TextSplitterComponent.cpp",
    "content": "#include \"TextSplitterComponent.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n#include \"TextSymbolComponent.h\"\n#include \"AnimationComponent.h\"\n\nnamespace o2\n{\n    TextSplitterComponent::TextSplitterComponent()\n    {}\n\n    TextSplitterComponent::TextSplitterComponent(const TextSplitterComponent& other):\n        Component(other), mText(other.mText), mFont(other.mFont), mHeight(other.mHeight), mSymbolsDistCoef(other.mSymbolsDistCoef),\n        mLinesDistCoef(other.mLinesDistCoef), mHorAlign(other.mHorAlign), mVerAlign(other.mVerAlign),\n\t\tmWordWrap(other.mWordWrap), mDotsEndings(other.mDotsEndings), mColor(other.mColor)\n    {\n        if (mFont)\n\t\t\tmFont->GetFont()->onCharactersRebuilt += THIS_FUNC(CheckCharactersAndRebuild);\n    }\n\n    TextSplitterComponent::~TextSplitterComponent()\n    {\n        if (mFont)\n            mFont->GetFont()->onCharactersRebuilt -= THIS_FUNC(CheckCharactersAndRebuild);\n\n        ClearSymbols();\n    }\n\n    void TextSplitterComponent::SetText(const WString& text)\n    {\n        if (mText != text)\n        {\n            mText = text;\n            CheckCharactersAndRebuild();\n        }\n    }\n\n    const WString& TextSplitterComponent::GetText() const\n    {\n        return mText;\n    }\n\n    void TextSplitterComponent::SetFont(const AssetRef<FontAsset>& font)\n    {\n        if (mFont == font)\n\t\t\treturn;\n\n        if (mFont)\n\t\t\tmFont->GetFont()->onCharactersRebuilt -= THIS_FUNC(CheckCharactersAndRebuild);\n\n        mFont = font;\n        CheckCharactersAndRebuild();\n\n        if (mFont)\n\t\t\tmFont->GetFont()->onCharactersRebuilt += THIS_FUNC(CheckCharactersAndRebuild);\n    }\n\n    const AssetRef<FontAsset>& TextSplitterComponent::GetFont() const\n    {\n        return mFont;\n    }\n\n\tvoid TextSplitterComponent::SetSymbolPrototype(const LinkRef<Actor>& prototype)\n\t{\n\t\tmSymbolPrototype = prototype;\n        CheckCharactersAndRebuild();\n\t}\n\n\tconst LinkRef<Actor>& TextSplitterComponent::GetSymbolPrototype() const\n\t{\n\t\treturn mSymbolPrototype;\n\t}\n\n\tvoid TextSplitterComponent::SetHeight(int height)\n    {\n        if (mHeight != height)\n        {\n            mHeight = height;\n            CheckCharactersAndRebuild();\n        }\n    }\n\n    int TextSplitterComponent::GetHeight() const\n    {\n        return mHeight;\n    }\n\n    void TextSplitterComponent::SetSymbolsDistanceCoef(float coef)\n    {\n        if (mSymbolsDistCoef != coef)\n        {\n            mSymbolsDistCoef = coef;\n            CheckCharactersAndRebuild();\n        }\n    }\n\n    float TextSplitterComponent::GetSymbolsDistanceCoef() const\n    {\n        return mSymbolsDistCoef;\n    }\n\n    void TextSplitterComponent::SetLinesDistanceCoef(float coef)\n    {\n        if (mLinesDistCoef != coef)\n        {\n            mLinesDistCoef = coef;\n            CheckCharactersAndRebuild();\n        }\n    }\n\n    float TextSplitterComponent::GetLinesDistanceCoef() const\n    {\n        return mLinesDistCoef;\n    }\n\n    void TextSplitterComponent::SetHorAlign(HorAlign align)\n    {\n        if (mHorAlign != align)\n        {\n            mHorAlign = align;\n            CheckCharactersAndRebuild();\n        }\n    }\n\n    HorAlign TextSplitterComponent::GetHorAlign() const\n    {\n        return mHorAlign;\n    }\n\n    void TextSplitterComponent::SetVerAlign(VerAlign align)\n    {\n        if (mVerAlign != align)\n        {\n            mVerAlign = align;\n            CheckCharactersAndRebuild();\n        }\n    }\n\n    VerAlign TextSplitterComponent::GetVerAlign() const\n    {\n        return mVerAlign;\n    }\n\n    void TextSplitterComponent::SetWordWrap(bool flag)\n    {\n        if (mWordWrap != flag)\n        {\n            mWordWrap = flag;\n            CheckCharactersAndRebuild();\n        }\n    }\n\n    bool TextSplitterComponent::GetWordWrap() const\n    {\n        return mWordWrap;\n    }\n\n    void TextSplitterComponent::SetDotsEndings(bool flag)\n    {\n        if (mDotsEndings != flag)\n        {\n            mDotsEndings = flag;\n            CheckCharactersAndRebuild();\n        }\n    }\n\n    bool TextSplitterComponent::IsDotsEndings() const\n    {\n        return mDotsEndings;\n    }\n\n\tvoid TextSplitterComponent::RunSymbolsAnimation()\n\t{\n\t\tStopSymbolsAnimation();\n\n\t\tmSymbolsAnimationTime = 0.0f;\n        mSymbolAnimationIndex = 0;\n\t\tmSymbolsAnimationStarted = true;\n\t}\n\n\tvoid TextSplitterComponent::SetSymbolsAnimationDelay(float delay)\n\t{\n\t\tmSymbolsAnimationDelay = delay;\n\t}\n\n\tfloat TextSplitterComponent::GetSymbolsAnimationDelay() const\n\t{\n\t\treturn mSymbolsAnimationDelay;\n\t}\n\n\tvoid TextSplitterComponent::SetAutoPlaySymbolsAnimation(bool autoPlay) \n\t{\n\t\tmAutoPlaySymbolsAnimation = autoPlay;\n\t}\n\n\tbool TextSplitterComponent::IsAutoPlaySymbolsAnimation() const\n\t{\n\t\treturn mAutoPlaySymbolsAnimation;\n\t}\n\n\tvoid TextSplitterComponent::SetColor(const Color4& color)\n\t{\n\t\tif (mColor != color)\n\t\t{\n\t\t\tmColor = color;\n\t\t\tUpdateColor();\n\t\t}\n\t}\n\n\tColor4 TextSplitterComponent::GetColor() const\n\t{\n\t\treturn mColor;\n\t}\n\n\tvoid TextSplitterComponent::SetTransparency(float transparency)\n\t{\n\t\tmColor.SetAF(transparency);\n    \tUpdateColor();\n\t}\n\n\tfloat TextSplitterComponent::GetTransparency() const\n\t{\n\t\treturn mColor.AF();\n\t}\n\n\tString TextSplitterComponent::GetName()\n    {\n\t    return \"Text splitter\";\n    }\n\n\tString TextSplitterComponent::GetCategory()\n    {\n\t    return \"Render\";\n    }\n\n\tvoid TextSplitterComponent::RebuildCharacters()\n    {\n        ClearSymbols();\n\n        if (mText.IsEmpty() || !mFont)\n            return;\n\n        // Create text object to get symbol set\n\t\tRectF transformRect = GetActor()->transform->GetWorldAxisAlignedRect();\n\t\tmLastSize = transformRect.Size();\n\n\t\tText::SymbolsSet symbolSet;\n\t\tsymbolSet.Initialize(mFont->GetFont(), mText, mHeight, transformRect.LeftBottom(), transformRect.Size(),\n                             mHorAlign, mVerAlign, mWordWrap, mDotsEndings, mSymbolsDistCoef, mLinesDistCoef);\n\n        // Create actors for each symbol\n        for (auto& line : symbolSet.mLines)\n        {\n            for (auto& symbol : line.mSymbols)\n            {\n                auto symbolActor = mSymbolPrototype ? mSymbolPrototype->CloneAsRef<Actor>() : mmake<Actor>();\n\t\t\t\tsymbolActor->name = String(\"Symbol: \") + String(symbol.mCharId);\n\t\t\t\tsymbolActor->SetParent(GetActor());\n\t\t\t\tsymbolActor->transform->worldRect = symbol.mFrame;\n\n\t\t\t\tauto symbolComponent = symbolActor->GetComponentInChildren<TextSymbolComponent>();\n\t\t\t\tif (!symbolComponent)\n                    symbolComponent = symbolActor->AddComponent<TextSymbolComponent>();\n\n\t\t\t\tsymbolComponent->SetTextureAndRect(mFont->GetFont()->GetTexture(), symbol.mTexSrc);\n            \tsymbolComponent->SetColor(mColor);\n\n                if (symbolComponent->GetActor() != symbolActor)\n                {\n                    symbolComponent->GetActor()->transform->position = Vec2F();\n                    symbolComponent->GetActor()->transform->size = symbol.mFrame.Size();\n                }\n            }\n        }\n\n    \tGetActor()->UpdateTransform();\n    }\n\n    void TextSplitterComponent::ClearSymbols()\n    {\n        Vector<Ref<Actor>> childrenToRemove = GetActor()->GetChildren().FindAll([](const Ref<Actor>& actor) { \n            return actor->GetComponentInChildren<TextSymbolComponent>() != nullptr; });\n\n        for (auto& child : childrenToRemove)\n            child->Destroy();\n    }\n\n\tvoid TextSplitterComponent::CheckCharactersAndRebuild()\n\t{\n        if (mFont && !mText.IsEmpty())\n\t\t{\n\t\t\tmFont->GetFont()->CheckCharacters(mText, mHeight);\n\t\t\tmFont->GetFont()->CheckCharacters(\".\", mHeight);\n\t\t}\n\n\t\tRebuildCharacters();\n\t}\n\n\tvoid TextSplitterComponent::StopSymbolsAnimation()\n    {\n    \tauto& children = GetActor()->GetChildren();\n    \tfor (auto& child : children)\n    \t{\n    \t\tif (auto animationCommponent = child->GetComponent<AnimationComponent>())\n    \t\t{\n    \t\t\tif (auto animationState = animationCommponent->GetFirstState())\n    \t\t\t{\n    \t\t\t\tanimationState->GetPlayer().GoToBegin();\n    \t\t\t\tanimationState->GetPlayer().Stop();\n    \t\t\t\tanimationCommponent->OnUpdate(0.0f);\n    \t\t\t\tanimationState->autoPlay = false;\n    \t\t\t}\n    \t\t}\n    \t}\n    }\n\n\tvoid TextSplitterComponent::UpdateSymbolsAnimation(float dt)\n\t{\n        if (!mSymbolsAnimationStarted)\n\t\t\treturn;\n\n\t\tmSymbolsAnimationTime += dt;\n\n        if (mSymbolsAnimationTime < mSymbolsAnimationDelay)\n\t\t\treturn;\n\n\t\tmSymbolsAnimationTime = 0.0f;\n\n\t\tauto children = GetActor()->GetChildren();\n        if (mSymbolAnimationIndex >= children.Count())\n        {\n            mSymbolsAnimationStarted = false;\n            return;\n\t\t}\n\n\t\tauto symbolActor = children[mSymbolAnimationIndex];\n        if (auto animationComponent = symbolActor->GetComponent<AnimationComponent>())\n            animationComponent->PlayFirstState();\n\n        mSymbolAnimationIndex++;\n\t\tif (mSymbolAnimationIndex >= children.Count())\n\t\t\tmSymbolsAnimationStarted = false;\n\t}\n\n\tvoid TextSplitterComponent::UpdateColor()\n\t{\n\t\tfor (auto& child : GetActor()->GetChildren())\n\t\t{\n\t\t\tauto symbolComponent = child->GetComponentInChildren<TextSymbolComponent>();\n\t\t\tif (symbolComponent)\n\t\t\t\tsymbolComponent->SetOverrideColor(mColor);\n\t\t}\n\t}\n\n\tvoid TextSplitterComponent::OnStart()\n\t{\n\t\tComponent::OnStart();\n\n    \tStopSymbolsAnimation();\n\n\t\tif (mAutoPlaySymbolsAnimation)\n\t\t\tRunSymbolsAnimation();\n\t}\n\n\tvoid TextSplitterComponent::OnDestroy()\n    {\n        ClearSymbols();\n        Component::OnDestroy();\n    }\n\n\tvoid TextSplitterComponent::OnEnabled()\n\t{\n        RebuildCharacters();\n\n        if (mFont)\n\t\t\tmFont->GetFont()->onCharactersRebuilt += THIS_FUNC(CheckCharactersAndRebuild);\n\n\t\tComponent::OnEnabled();\n\t}\n\n\tvoid TextSplitterComponent::OnDisabled()\n\t{\n\t\tif (mFont)\n\t\t\tmFont->GetFont()->onCharactersRebuilt -= THIS_FUNC(CheckCharactersAndRebuild);\n\t}\n\n\tvoid TextSplitterComponent::OnUpdate(float dt)\n\t{\n\t\tUpdateSymbolsAnimation(dt);\n\t}\n\n\tvoid TextSplitterComponent::OnTransformUpdated()\n\t{\n\t\tVec2F transformSize = GetActor()->transform->GetWorldAxisAlignedRect().Size();\n        if (transformSize == mLastSize)\n\t\t\treturn;\n\n        CheckCharactersAndRebuild();\n\t}\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::TextSplitterComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::TextSplitterComponent, o2__TextSplitterComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/TextSplitterComponent.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Component.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Render/Text.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------------------------------------\n\t// Text splitter component splits text into symbols and creates actors for each symbol\n\t// -----------------------------------------------------------------------------------\n    class TextSplitterComponent: public Component\n    {\n    public:\n        PROPERTIES(TextSplitterComponent);\n\t\tPROPERTY(WString, text, SetText, GetText);   // Text to split\n\n\t\tPROPERTY(AssetRef<FontAsset>, font, SetFont, GetFont); // Font reference\n\n\t\tPROPERTY(LinkRef<Actor>, symbolPrototype, SetSymbolPrototype, GetSymbolPrototype); // Symbol prototype actor\n\n        PROPERTY(int, height, SetHeight, GetHeight); // Text height\n\n\t\tPROPERTY(float, symbolsDistanceCoef, SetSymbolsDistanceCoef, GetSymbolsDistanceCoef); // Characters distance coef\n\t\tPROPERTY(float, linesDistanceCoef, SetLinesDistanceCoef, GetLinesDistanceCoef);       // Lines distance coef\n\n        PROPERTY(HorAlign, horAlign, SetHorAlign, GetHorAlign); // Horizontal align\n        PROPERTY(VerAlign, verAlign, SetVerAlign, GetVerAlign); // Vertical align\n\n        PROPERTY(bool, wordWrap, SetWordWrap, GetWordWrap);         // Words wrapping flag\n        PROPERTY(bool, dotsEndings, SetDotsEndings, IsDotsEndings); // Dots endings when overflow\n\n\t\tPROPERTY(float, symbolsAnimationDelay, SetSymbolsAnimationDelay, GetSymbolsAnimationDelay);        // Symbols animation delay\n\t\tPROPERTY(bool, autoPlaySymbolsAnimation, SetAutoPlaySymbolsAnimation, IsAutoPlaySymbolsAnimation); // If symbols animation should be started automatically\n\n\t\tPROPERTY(Color4, color, SetColor, GetColor);                     // Color of all symbols\n\t\tPROPERTY(float, transparency, SetTransparency, GetTransparency); // Transparency of all symbols @RANGE(0, 1)\n\n    public:\n\t\t// Default constructor\n        TextSplitterComponent();\n\n\t\t// Copy constructor\n        TextSplitterComponent(const TextSplitterComponent& other);\n\n\t\t// Destructor\n        ~TextSplitterComponent() override;\n\n        // Sets text to split\n        void SetText(const WString& text);\n\n        // Returns current text\n        const WString& GetText() const;\n\n        // Sets font\n        void SetFont(const AssetRef<FontAsset>& font);\n\n        // Returns current font\n        const AssetRef<FontAsset>& GetFont() const;\n\n\t\t// Sets symbol prototype actor\n        void SetSymbolPrototype(const LinkRef<Actor>& prototype);\n\n\t\t// Returns symbol prototype actor\n\t\tconst LinkRef<Actor>& GetSymbolPrototype() const;\n\n        // Sets text height\n        void SetHeight(int height);\n\n        // Returns current text height\n        int GetHeight() const;\n\n        // Sets characters distance coefficient\n        void SetSymbolsDistanceCoef(float coef);\n\n        // Returns characters distance coefficient\n        float GetSymbolsDistanceCoef() const;\n\n        // Sets lines distance coefficient\n        void SetLinesDistanceCoef(float coef);\n\n        // Returns lines distance coefficient\n        float GetLinesDistanceCoef() const;\n\n        // Sets horizontal align\n        void SetHorAlign(HorAlign align);\n\n        // Returns horizontal align\n        HorAlign GetHorAlign() const;\n\n        // Sets vertical align\n        void SetVerAlign(VerAlign align);\n\n        // Returns vertical align\n        VerAlign GetVerAlign() const;\n\n        // Sets word wrapping\n        void SetWordWrap(bool flag);\n\n        // Returns word wrapping\n        bool GetWordWrap() const;\n\n        // Sets dots endings\n        void SetDotsEndings(bool flag);\n\n        // Returns dots endings\n        bool IsDotsEndings() const;\n\n\t\t// Runs symbols animation, if symbols are animated\n        void RunSymbolsAnimation();\n\n\t\t// Sets symbols animation delay\n\t\tvoid SetSymbolsAnimationDelay(float delay);\n\n\t\t// Returns symbols animation delay\n\t\tfloat GetSymbolsAnimationDelay() const;\n\n\t\t// Sets is symbols animation should be started automatically\n\t\tvoid SetAutoPlaySymbolsAnimation(bool autoPlay);\n\n\t\t// Returns is symbols animation should be started automatically\n    \tbool IsAutoPlaySymbolsAnimation() const;\n\n\t\t// Sets color of all symbols\n\t\tvoid SetColor(const Color4& color);\n\n\t\t// Returns color of all symbols\n\t\tColor4 GetColor() const;\n\n\t\t// Sets transparency of all symbols\n\t\tvoid SetTransparency(float transparency);\n\n\t\t// Returns transparency of all symbols\n\t\tfloat GetTransparency() const;\n\n    \t// Returns name of component\n    \tstatic String GetName();\n\n    \t// Returns category of component\n    \tstatic String GetCategory();\n\n        SERIALIZABLE(TextSplitterComponent);\n        CLONEABLE_REF(TextSplitterComponent);\n\n    protected:\n\t\tAssetRef<FontAsset> mFont; // Font asset @SERIALIZABLE\n\n\t\tLinkRef<Actor> mSymbolPrototype; // Prototype actor for symbol @SERIALIZABLE\n\n\t\tWString mText; // Text to split @SERIALIZABLE\n\n\t\tint   mHeight = 11;            // Text height @SERIALIZABLE\n\t\tfloat mSymbolsDistCoef = 1.0f; // Symbols distance coefficient @SERIALIZABLE\n\t\tfloat mLinesDistCoef = 1.0f;   // Lines distance coefficient @SERIALIZABLE\n\n\t\tHorAlign mHorAlign = HorAlign::Left; // Horizontal align @SERIALIZABLE\n\t\tVerAlign mVerAlign = VerAlign::Top;  // Vertical align @SERIALIZABLE\n\n\t\tbool mWordWrap = false;    // Words wrapping flag @SERIALIZABLE\n\t\tbool mDotsEndings = false; // Dots endings flag @SERIALIZABLE\n\n\t\tbool  mAutoPlaySymbolsAnimation = false; // If symbols animation should be started automatically @SERIALIZABLE\n\t\tfloat mSymbolsAnimationDelay = 0.05f;    // Symbols animation delay, used to run symbols animation @SERIALIZABLE\n\t\tbool  mSymbolsAnimationStarted = false;  // If symbols animation was started\n\t\tint   mSymbolAnimationIndex = 0;         // Current symbol animation index \n\t\tfloat mSymbolsAnimationTime = 0.0f;      // Symbols animation time \n\n\t\tColor4 mColor = Color4::White();         // Color of all symbols @SERIALIZABLE\n\n\t\tVec2F mLastSize; // Last size of text, used to check if rebuild is needed\n\n    protected:\n\t\t// Called on component start, splits text into symbols\n\t\tvoid OnStart() override;\n\n\t\t// Called on component destroying, clears symbols\n\t\tvoid OnDestroy() override;\n\n\t\t// Called on component enabling, splits text into symbols, subscribes to font resetting\n\t\tvoid OnEnabled() override;\n\n\t\t// Called on component disabling, unsubscribes from font resetting\n\t\tvoid OnDisabled() override;\n\n\t\t// Updates component, updates symbols animation\n        void OnUpdate(float dt) override;\n\n\t\t// Called when actor's transform was changed\n        void OnTransformUpdated() override;\n\n\t\t// Splits text into symbol actors\n\t\tvoid RebuildCharacters();\n\n\t\t// Clears all symbol actors\n\t\tvoid ClearSymbols();\n\n\t\t// Checks test's characters in font and rebuilds mesh. Used when fond is resetting\n\t\tvoid CheckCharactersAndRebuild();\n\n    \t// Stops animations on symbold\n    \tvoid StopSymbolsAnimation();\n\n\t\t// Updates symbols animation, called every frame\n\t\tvoid UpdateSymbolsAnimation(float dt);\n\n\t\t// Updates color of all symbol components\n\t\tvoid UpdateColor();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::TextSplitterComponent)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::TextSplitterComponent)\n{\n    FIELD().PUBLIC().NAME(text);\n    FIELD().PUBLIC().NAME(font);\n    FIELD().PUBLIC().NAME(symbolPrototype);\n    FIELD().PUBLIC().NAME(height);\n    FIELD().PUBLIC().NAME(symbolsDistanceCoef);\n    FIELD().PUBLIC().NAME(linesDistanceCoef);\n    FIELD().PUBLIC().NAME(horAlign);\n    FIELD().PUBLIC().NAME(verAlign);\n    FIELD().PUBLIC().NAME(wordWrap);\n    FIELD().PUBLIC().NAME(dotsEndings);\n    FIELD().PUBLIC().NAME(symbolsAnimationDelay);\n    FIELD().PUBLIC().NAME(autoPlaySymbolsAnimation);\n    FIELD().PUBLIC().NAME(color);\n    FIELD().PUBLIC().RANGE_ATTRIBUTE(0, 1).NAME(transparency);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mFont);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSymbolPrototype);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mText);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(11).NAME(mHeight);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mSymbolsDistCoef);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mLinesDistCoef);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(HorAlign::Left).NAME(mHorAlign);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(VerAlign::Top).NAME(mVerAlign);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mWordWrap);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mDotsEndings);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mAutoPlaySymbolsAnimation);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.05f).NAME(mSymbolsAnimationDelay);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mSymbolsAnimationStarted);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mSymbolAnimationIndex);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mSymbolsAnimationTime);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Color4::White()).NAME(mColor);\n    FIELD().PROTECTED().NAME(mLastSize);\n}\nEND_META;\nCLASS_METHODS_META(o2::TextSplitterComponent)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const TextSplitterComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetText, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(const WString&, GetText);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFont, const AssetRef<FontAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<FontAsset>&, GetFont);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSymbolPrototype, const LinkRef<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE(const LinkRef<Actor>&, GetSymbolPrototype);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeight, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetHeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSymbolsDistanceCoef, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSymbolsDistanceCoef);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLinesDistanceCoef, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetLinesDistanceCoef);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHorAlign, HorAlign);\n    FUNCTION().PUBLIC().SIGNATURE(HorAlign, GetHorAlign);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVerAlign, VerAlign);\n    FUNCTION().PUBLIC().SIGNATURE(VerAlign, GetVerAlign);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWordWrap, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, GetWordWrap);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDotsEndings, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsDotsEndings);\n    FUNCTION().PUBLIC().SIGNATURE(void, RunSymbolsAnimation);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSymbolsAnimationDelay, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSymbolsAnimationDelay);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAutoPlaySymbolsAnimation, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsAutoPlaySymbolsAnimation);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetColor);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTransparency, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetTransparency);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStart);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDestroy);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUpdate, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildCharacters);\n    FUNCTION().PROTECTED().SIGNATURE(void, ClearSymbols);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckCharactersAndRebuild);\n    FUNCTION().PROTECTED().SIGNATURE(void, StopSymbolsAnimation);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateSymbolsAnimation, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateColor);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/TextSymbolComponent.cpp",
    "content": "#include \"TextSymbolComponent.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n\nnamespace o2\n{\n    TextSymbolComponent::TextSymbolComponent()\n    {}\n\n    TextSymbolComponent::TextSymbolComponent(const TextSymbolComponent& other):\n        ImageComponent(other)\n    {}\n\n\tvoid TextSymbolComponent::SetTextureAndRect(const TextureRef& texture, const RectF& rect)\n\t{\n\t\tVec2F textureSize = texture->GetSize();\n\t\tSetTexture(texture);\n\t\tSetTextureSrcRect(RectF(rect.left* textureSize.x, rect.top*textureSize.y, \n\t\t\t\t\t\t\t\trect.right*textureSize.x, rect.bottom*textureSize.y));\n\t}\n\n\tString TextSymbolComponent::GetName()\n    {\n\t    return \"Text symbol\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::TextSymbolComponent>);\n// --- META ---\n\nDECLARE_CLASS(o2::TextSymbolComponent, o2__TextSymbolComponent);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Components/TextSymbolComponent.h",
    "content": "#pragma once\n\n#include \"ImageComponent.h\"\n\nnamespace o2\n{\n    class TextSymbolComponent: public ImageComponent\n    {\n    public:\n\t\t// Default constructor\n        TextSymbolComponent();\n\n\t\t// Copy constructor\n        TextSymbolComponent(const TextSymbolComponent& other);\n\n        // Sets texture coordinates for symbol\n        void SetTextureAndRect(const TextureRef& texture, const RectF& rect);\n\n        // Returns name of component\n        static String GetName();\n\n        SERIALIZABLE(TextSymbolComponent);\n        CLONEABLE_REF(TextSymbolComponent);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::TextSymbolComponent)\n{\n    BASE_CLASS(o2::ImageComponent);\n}\nEND_META;\nCLASS_FIELDS_META(o2::TextSymbolComponent)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::TextSymbolComponent)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const TextSymbolComponent&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTextureAndRect, const TextureRef&, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ISceneDrawable.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ISceneDrawable.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/SceneLayer.h\"\n#include <o2/Utils/Debug/StackTrace.h>\n\nnamespace o2\n{\n    ISceneDrawable::ISceneDrawable()\n    {}\n\n    ISceneDrawable::ISceneDrawable(const ISceneDrawable& other) :\n        mDrawingDepth(other.mDrawingDepth), \n        mInheritDrawingDepthFromParent(other.mInheritDrawingDepthFromParent)\n    {}\n\n    ISceneDrawable::~ISceneDrawable()\n    {\n        if (mRegistered)\n            Unregister();\n\n        for (auto& child : mChildrenInheritedDepth)\n        {\n            child->mParentRegistry = nullptr;\n            child->mRegistered = false;\n        }\n    }\n\n    ISceneDrawable& ISceneDrawable::operator=(const ISceneDrawable& other)\n    {\n        if (other.mInheritDrawingDepthFromParent)\n            SetDrawingDepthInheritFromParent(true);\n        else\n            SetDrawingDepth(other.mDrawingDepth);\n\n        return *this;\n    }\n\n    void ISceneDrawable::Draw()\n    {\n        OnDrawn();\n        DrawInheritedDepthChildren();\n    }\n\n    void ISceneDrawable::SetDrawingDepth(float depth)\n    {\n        mDrawingDepth = depth;\n        mInheritDrawingDepthFromParent = false;\n\n        Reregister();\n    }\n\n    float ISceneDrawable::GetDrawingDepth() const\n    {\n        return mDrawingDepth;\n    }\n\n    void ISceneDrawable::SetDrawingDepthInheritFromParent(bool inherit)\n    {\n        mInheritDrawingDepthFromParent = inherit;\n\n        Reregister();\n    }\n\n    bool ISceneDrawable::IsDrawingDepthInheritedFromParent() const\n    {\n        return mInheritDrawingDepthFromParent;\n    }\n\n    void ISceneDrawable::OnDrawbleParentChanged()\n    {\n        Reregister();\n    }\n\n    void ISceneDrawable::OnDrawableLayerChanged()\n    {\n        Reregister();\n    }\n\n    void ISceneDrawable::SortInheritedDrawables()\n    {\n        mChildrenInheritedDepth.SortBy<int>([](const Ref<ISceneDrawable>& x) { return x->GetIndexInParentDrawable(); });\n    }\n\n\tvoid ISceneDrawable::DrawInheritedDepthChildren()\n\t{\n\t\tfor (auto& child : mChildrenInheritedDepth)\n\t\t\tchild->Draw();\n\t}\n\n\tvoid ISceneDrawable::OnEnabled()\n    {\n        mDrawableEnabled = true;\n\n        if (mRegistered)\n            Unregister();\n\n        Register();\n    }\n\n    void ISceneDrawable::OnDisabled()\n    {\n        mDrawableEnabled = false;\n\n        if (mRegistered)\n            Unregister();\n    }\n\n    void ISceneDrawable::OnAddToScene()\n    {\n        mIsOnScene = true;\n        Reregister();\n    }\n\n    void ISceneDrawable::OnRemoveFromScene()\n    {\n        mIsOnScene = false;\n\n        if (mRegistered)\n            Unregister();\n    }\n\n    void ISceneDrawable::Reregister()\n    {\n        if (mRegistered)\n            Unregister();\n\n        if (mDrawableEnabled)\n            Register();\n    }\n\n    void ISceneDrawable::Register()\n    {\n        if (mInheritDrawingDepthFromParent)\n        {\n            if (mDrawableEnabled)\n            {\n                mParentRegistry = GetParentDrawable();\n                if (!mParentRegistry && mIsOnScene)\n                    mParentRegistry = GetSceneDrawableSceneLayer()->GetRootDrawables();\n\n                if (mParentRegistry)\n                {\n                    auto parentRegistry = mParentRegistry.Lock();\n                    parentRegistry->mChildrenInheritedDepth.Add(Ref(this));\n                    parentRegistry->SortInheritedDrawables();\n\n                    mRegistered = true;\n                }\n            }\n        }\n        else\n        {\n            if (mDrawableEnabled && mIsOnScene)\n            {\n                mLayerRegistry = GetSceneDrawableSceneLayer();\n                mLayerRegistry.Lock()->RegisterDrawable(this);\n\n                mRegistered = true;\n            }\n        }\n\n    }\n\n    void ISceneDrawable::Unregister()\n    {\n        if (mParentRegistry)\n            mParentRegistry.Lock()->mChildrenInheritedDepth.Remove(Ref(this));\n        else\n            mLayerRegistry.Lock()->UnregisterDrawable(this);\n\n        mParentRegistry = nullptr;\n        mLayerRegistry = nullptr;\n\n        mRegistered = false;\n    }\n\n    void ISceneDrawable::SetLastOnCurrentDepth()\n    {\n        if (!mRegistered)\n            return;\n\n        if (mParentRegistry)\n        {\n            auto parentRegistry = mParentRegistry.Lock();\n            parentRegistry->mChildrenInheritedDepth.Remove(Ref(this));\n            parentRegistry->mChildrenInheritedDepth.Add(Ref(this));\n        }\n        else\n            mLayerRegistry.Lock()->SetLastByDepth(Ref(this));\n    }\n\n    const Vector<Ref<ISceneDrawable>>& ISceneDrawable::GetChildrenInheritedDepth() const\n    {\n        return mChildrenInheritedDepth;\n    }\n\n#if IS_EDITOR\n    Ref<SceneEditableObject> ISceneDrawable::GetEditableOwner()\n    {\n        return nullptr;\n    }\n\n    void ISceneDrawable::OnDrawn()\n    {\n        //PROFILE_SAMPLE_FUNC();\n\n        if (auto obj = GetEditableOwner())\n            o2Scene.OnObjectDrawn(obj);\n\n        IDrawable::OnDrawn();\n\n        drawCallIdx = o2Render.GetDrawCallsCount();\n    }\n#endif\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ISceneDrawable, o2__ISceneDrawable);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/ISceneDrawable.h",
    "content": "#pragma once\n\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Scene/SceneLayer.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n\n#if IS_EDITOR\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n#endif\n\nnamespace o2\n{\n    // --------------------------------------------------------------------------------------------------------------\n    // Scene drawable object. Has virtual draw function and sorting depth. Depth shows how later object will be drawn\n    // Can be used to create your own drawable objects. For that you need to override Draw() function, \n    // GetSceneDrawableSceneLayer(), GetParentDrawable() and GetIndexInParentDrawable(). And call \"on\" methods: \n    // OnDrawbleParentChanged(), OnEnabled(), OnDisabled(), OnAddToScene(), OnRemoveFromScene()\n    // --------------------------------------------------------------------------------------------------------------\n    class ISceneDrawable : virtual public ISerializable, virtual public IRefCounterable, virtual public ICloneableRef, virtual public IDrawable\n    {\n    public:\n        PROPERTIES(ISceneDrawable);\n        PROPERTY(float, drawDepth, SetDrawingDepth, GetDrawingDepth); // Drawing depth property. Objects with higher depth will be drawn later @EDITOR_IGNORE\n\n    public:\n        // Default constructor\n        ISceneDrawable();\n\n        // Copy-constructor\n        ISceneDrawable(const ISceneDrawable& other);\n\n        // Destructor\n        ~ISceneDrawable() override;\n\n        // Copy operator\n        ISceneDrawable& operator=(const ISceneDrawable& other);\n\n        // Draws content\n        void Draw() override;\n\n        // Sets drawing depth. Objects with higher depth will be drawn later\n        virtual void SetDrawingDepth(float depth);\n\n        // Returns drawing depth\n        float GetDrawingDepth() const;\n\n        // Sets that depth is inherited from the parent\n        void SetDrawingDepthInheritFromParent(bool inherit);\n\n        // Returns whether the depth is inherited from the parent\n        bool IsDrawingDepthInheritedFromParent() const;\n\n        // Sets this drawable as last drawing object in layer with same depth\n        void SetLastOnCurrentDepth();\n\n        // Returns list of inherited depth drawables\n        const Vector<Ref<ISceneDrawable>>& GetChildrenInheritedDepth() const;\n\n        SERIALIZABLE(ISceneDrawable);\n\n    private:\n        bool mRegistered = false; //  Was the drawable registered in the layer or in the parent\n\n        bool mDrawableEnabled = false; // Is drawable enabled\n        bool mIsOnScene = false;       // Is drawable on scene\n\n        WeakRef<ISceneDrawable> mParentRegistry; // Parent registry drawable if inherited depth is used\n        WeakRef<SceneLayer>     mLayerRegistry;  // Layer registry if inherited depth isn't used\n\n    protected:\n        float mDrawingDepth = 0.0f;                  // Drawing depth. Objects with higher depth will be drawn later @SERIALIZABLE\n        bool  mInheritDrawingDepthFromParent = true; // If parent depth is used @SERIALIZABLE\n\n        Vector<Ref<ISceneDrawable>> mChildrenInheritedDepth; // List of children who inherited depth\n\n    protected:\n        // Returns current scene layer\n        virtual Ref<SceneLayer> GetSceneDrawableSceneLayer() const { return nullptr; }\n\n        // Returns parent scene drawable\n        virtual Ref<ISceneDrawable> GetParentDrawable() { return nullptr; }\n\n        // Returns the index in the parent's list of children, used to sort the rendering\n        virtual int GetIndexInParentDrawable() const { return 0; }\n\n        // Sorts depth-inheriting drawables\n\t\tvoid SortInheritedDrawables();\n\n\t\t// Draws children with inherited depth\n\t\tvirtual void DrawInheritedDepthChildren();\n\n        // Called when the parent changes\n        virtual void OnDrawbleParentChanged();\n\n        // Called when drawable layer changed\n        virtual void OnDrawableLayerChanged();\n\n        // Called when drawable has enabled\n        void OnEnabled();\n\n        // Called when drawable has enabled\n        void OnDisabled();\n\n        // Called when actor was included to scene\n        void OnAddToScene();\n\n        // Called when actor was excluded from scene\n        void OnRemoveFromScene();\n\n        // Refreshing drawable registration\n        void Reregister();\n\n        // Registers drawable in layer or in parent\n        void Register();\n\n        // Unregisters drawable from layer or from parent\n        void Unregister();\n\n        friend class Scene;\n        friend class SceneLayer;\n\n#if IS_EDITOR\n    public:\n        int drawCallIdx = 0; // Draw call number in frame @EDITOR_IGNORE\n\n    public:\n        // Returns pointer to owner editable object\n        virtual Ref<SceneEditableObject> GetEditableOwner();\n\n        // Called when drawable was drawn. Storing render scissor rect, calling onDraw callback, adding in drawnEditableObjects\n        void OnDrawn() override;\n#endif\n    };\n\n    // ------------------------------------------------------------------------------------\n    // Root drawables container. It is used to draw all root drawables with inherited depth\n    // ------------------------------------------------------------------------------------\n    class SceneLayerRootDrawablesContainer : public ISceneDrawable, public RefCounterable\n    {\n    public:\n        SceneLayerRootDrawablesContainer(RefCounter* refCounter): \n            RefCounterable(refCounter)\n        {}\n\n        REF_COUNTERABLE_IMPL(RefCounterable);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ISceneDrawable)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::IRefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n    BASE_CLASS(o2::IDrawable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ISceneDrawable)\n{\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(drawDepth);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mRegistered);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mDrawableEnabled);\n    FIELD().PRIVATE().DEFAULT_VALUE(false).NAME(mIsOnScene);\n    FIELD().PRIVATE().NAME(mParentRegistry);\n    FIELD().PRIVATE().NAME(mLayerRegistry);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mDrawingDepth);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mInheritDrawingDepthFromParent);\n    FIELD().PROTECTED().NAME(mChildrenInheritedDepth);\n#if  IS_EDITOR\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(drawCallIdx);\n#endif\n}\nEND_META;\nCLASS_METHODS_META(o2::ISceneDrawable)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ISceneDrawable&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDrawingDepth, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDrawingDepth);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDrawingDepthInheritFromParent, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsDrawingDepthInheritedFromParent);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLastOnCurrentDepth);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<ISceneDrawable>>&, GetChildrenInheritedDepth);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<SceneLayer>, GetSceneDrawableSceneLayer);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<ISceneDrawable>, GetParentDrawable);\n    FUNCTION().PROTECTED().SIGNATURE(int, GetIndexInParentDrawable);\n    FUNCTION().PROTECTED().SIGNATURE(void, SortInheritedDrawables);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawInheritedDepthChildren);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDrawbleParentChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDrawableLayerChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, Reregister);\n    FUNCTION().PROTECTED().SIGNATURE(void, Register);\n    FUNCTION().PROTECTED().SIGNATURE(void, Unregister);\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableOwner);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnDrawn);\n#endif\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/BoxCollider.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"BoxCollider.h\"\n\n#include \"o2/Physics/PhysicsWorld.h\"\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n    BoxCollider::BoxCollider()\n    {}\n\n    BoxCollider::BoxCollider(const BoxCollider& other):\n        ICollider(other), mSize(other.mSize), mFitByActor(other.mFitByActor)\n    {}\n\n    void BoxCollider::SetSize(const Vec2F& size)\n    {\n        mSize = size;\n        OnShapeChanged();\n    }\n\n    Vec2F BoxCollider::GetSize() const\n    {\n        return mSize;\n    }\n\n    void BoxCollider::SetFitByActor(bool fit)\n    {\n        mFitByActor = fit;\n\n        if (fit)\n        {\n            mSize = mOwner.Lock()->transform->GetSize();\n            OnShapeChanged();\n        }\n    }\n\n    bool BoxCollider::IsFitByActor() const\n    {\n        return mFitByActor;\n    }\n\n    String BoxCollider::GetName()\n    {\n        return \"Box collider\";\n    }\n\n    String BoxCollider::GetCategory()\n    {\n        return \"Physics\";\n    }\n\n    bool BoxCollider::IsAvailableFromCreateMenu()\n    {\n        return true;\n    }\n\n    BoxCollider& BoxCollider::operator=(const BoxCollider& other)\n    {\n        ICollider::operator=(other);\n        mSize = other.mSize;\n        mFitByActor = other.mFitByActor;\n        return *this;\n    }\n\n    b2Shape* BoxCollider::GetShape(const Basis& transform)\n    {\n        Vec2F halfSize = mSize*0.5f;\n\n        if (halfSize.x < 0.001f)\n            halfSize.x = 1.0f;\n\n        if (halfSize.y < 0.001f)\n            halfSize.y = 1.0f;\n\n        b2Vec2 verticies[4];\n        verticies[0] = Vec2F(-halfSize.x, -halfSize.y)*transform;\n        verticies[1] = Vec2F(halfSize.x, -halfSize.y)*transform;\n        verticies[2] = Vec2F(halfSize.x, halfSize.y)*transform;\n        verticies[3] = Vec2F(-halfSize.x, halfSize.y)*transform;\n\n        mShape.Set(verticies, 4);\n\n        return &mShape;\n    }\n\n    void BoxCollider::OnTransformUpdated()\n    {\n#if IS_EDITOR\n        if (o2Scene.IsEditor() && mFitByActor && !o2Scene.IsEditorPlaying())\n            FitSize();\n#endif\n\n        ICollider::OnTransformUpdated();\n    }\n\n    void BoxCollider::OnAddToScene()\n    {\n        if (mFitByActor)\n            FitSize();\n\n        ICollider::OnAddToScene();\n    }\n\n    void BoxCollider::FitSize()\n    {\n        Vec2F prevSize = mSize;\n        mSize = mOwner.Lock()->transform->GetSize();\n\n        if (prevSize != mSize)\n            OnShapeChanged();\n    }\n\n#if IS_EDITOR\n    void BoxCollider::OnAddedFromEditor()\n    {\n        mSize = mOwner.Lock()->transform->GetSize();\n        OnShapeChanged();\n    }\n#endif\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::BoxCollider>);\n// --- META ---\n\nDECLARE_CLASS(o2::BoxCollider, o2__BoxCollider);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/BoxCollider.h",
    "content": "#pragma once\n#include \"o2/Scene/Physics/ICollider.h\"\n#include \"Box2D/Collision/Shapes/b2PolygonShape.h\"\n\nnamespace o2\n{\n    // --------------------\n    // Box physics collider\n    // --------------------\n    class BoxCollider: public ICollider\n    {\n    public:\n        PROPERTIES(BoxCollider);\n        PROPERTY(Vec2F, size, SetSize, GetSize);                 // Collider size property\n        PROPERTY(bool, fitByActor, SetFitByActor, IsFitByActor); // Fit by actor's size property\n\n    public:\n        // Default constructor\n        BoxCollider();\n\n        // Copy-constructor\n        BoxCollider(const BoxCollider& other);\n\n        // Copy operator\n        BoxCollider& operator=(const BoxCollider& other);\n\n        // Sets collider size\n        void SetSize(const Vec2F& size);\n\n        // Returns collider size\n        Vec2F GetSize() const;\n\n        // Sets collider fit to actor's size\n        void SetFitByActor(bool fit);\n\n        // Is collider fits to actor's size\n        bool IsFitByActor() const;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Is component visible in create menu\n        static bool IsAvailableFromCreateMenu();\n\n#if IS_EDITOR\n        // Called when component added from editor; fits collider by actor size\n        void OnAddedFromEditor() override;\n#endif\n\n        SERIALIZABLE(BoxCollider);\n        CLONEABLE_REF(BoxCollider);\n\n    private:\n        Vec2F mSize = Vec2F(1, 1); // Size of collider @SERIALIZABLE\n\n        bool mFitByActor = true; // Is box size is fitting by actor's size @SERIALIZABLE\n\n        b2PolygonShape mShape; // Physics shape\n\n    private:\n        // Returns shape with relative position and angle\n        b2Shape* GetShape(const Basis& transform) override;\n\n        // Called when transformation was changed; fits size by actor size when required\n        void OnTransformUpdated() override;\n\n        void FitSize();\n\n        // Called when actor was included to scene; fits size if required\n        void OnAddToScene() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::BoxCollider)\n{\n    BASE_CLASS(o2::ICollider);\n}\nEND_META;\nCLASS_FIELDS_META(o2::BoxCollider)\n{\n    FIELD().PUBLIC().NAME(size);\n    FIELD().PUBLIC().NAME(fitByActor);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(1, 1)).NAME(mSize);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mFitByActor);\n    FIELD().PRIVATE().NAME(mShape);\n}\nEND_META;\nCLASS_METHODS_META(o2::BoxCollider)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const BoxCollider&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFitByActor, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFitByActor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableFromCreateMenu);\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(void, OnAddedFromEditor);\n#endif\n    FUNCTION().PRIVATE().SIGNATURE(b2Shape*, GetShape, const Basis&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PRIVATE().SIGNATURE(void, FitSize);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnAddToScene);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/CircleCollider.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"CircleCollider.h\"\n\n#include \"o2/Physics/PhysicsWorld.h\"\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n    CircleCollider::CircleCollider()\n    {}\n\n    CircleCollider::CircleCollider(const CircleCollider& other):\n        ICollider(other), mRadius(other.mRadius), mFitByActor(other.mFitByActor)\n    {}\n\n    void CircleCollider::SetRadius(float radius)\n    {\n        mRadius = radius;\n        OnShapeChanged();\n    }\n\n    float CircleCollider::GetRadius() const\n    {\n        return mRadius;\n    }\n\n    void CircleCollider::SetFitByActor(bool fit)\n    {\n        mFitByActor = fit;\n\n        if (fit)\n        {\n            mRadius = mOwner.Lock()->transform->GetSize().x*0.5f;\n            OnShapeChanged();\n        }\n    }\n\n    bool CircleCollider::IsFitByActor() const\n    {\n        return mFitByActor;\n    }\n\n    String CircleCollider::GetName()\n    {\n        return \"Circle collider\";\n    }\n\n    String CircleCollider::GetCategory()\n    {\n        return \"Physics\";\n    }\n\n    bool CircleCollider::IsAvailableFromCreateMenu()\n    {\n        return true;\n    }\n\n    CircleCollider& CircleCollider::operator=(const CircleCollider& other)\n    {\n        ICollider::operator=(other);\n        mRadius = other.mRadius;\n        mFitByActor = other.mFitByActor;\n        return *this;\n    }\n\n    b2Shape* CircleCollider::GetShape(const Basis& transform)\n    {\n        float radius = mRadius;\n        if (radius < FLT_EPSILON)\n            radius = 1.0f;\n\n        mShape.m_radius = radius*transform.xv.Length();\n        mShape.m_p = transform.origin;\n\n        return &mShape;\n    }\n\n    void CircleCollider::OnTransformUpdated()\n    {\n#if IS_EDITOR\n        if (o2Scene.IsEditor() && mFitByActor && !o2Scene.IsEditorPlaying())\n        {\n            float prevRadius = mRadius;\n            mRadius = mOwner.Lock()->transform->GetSize().x*0.5f;\n        }\n#endif\n\n        ICollider::OnTransformUpdated();\n    }\n\n#if IS_EDITOR\n    void CircleCollider::OnAddedFromEditor()\n    {\n        mRadius = mOwner.Lock()->transform->GetSize().x*0.5f;\n    }\n#endif\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::CircleCollider>);\n// --- META ---\n\nDECLARE_CLASS(o2::CircleCollider, o2__CircleCollider);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/CircleCollider.h",
    "content": "#pragma once\n#include \"o2/Scene/Physics/ICollider.h\"\n#include \"Box2D/Collision/Shapes/b2CircleShape.h\"\n\nnamespace o2\n{\n    // -----------------------\n    // Circle physics collider\n    // -----------------------\n    class CircleCollider: public ICollider\n    {\n    public:\n        PROPERTIES(CircleCollider);\n        PROPERTY(float, radius, SetRadius, GetRadius);           // Collider radius property\n        PROPERTY(bool, fitByActor, SetFitByActor, IsFitByActor); // Fit by actor's size property\n\n    public:\n        // Default constructor\n        CircleCollider();\n\n        // Copy-constructor\n        CircleCollider(const CircleCollider& other);\n\n        // Copy operator\n        CircleCollider& operator=(const CircleCollider& other);\n\n        // Sets collider radius\n        void SetRadius(float radius);\n\n        // Returns collider radius\n        float GetRadius() const;\n\n        // Sets collider fit to actor's size\n        void SetFitByActor(bool fit);\n\n        // Is collider fits to actor's size\n        bool IsFitByActor() const;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Is component visible in create menu\n        static bool IsAvailableFromCreateMenu();\n\n#if IS_EDITOR\n        // Called when component added from editor; fits collider by actor size\n        void OnAddedFromEditor() override;\n#endif\n\n        SERIALIZABLE(CircleCollider);\n        CLONEABLE_REF(CircleCollider);\n\n    private:\n        float mRadius = 1.0f; // Size of collider @SERIALIZABLE\n\n        bool mFitByActor = true; // Is box size is fitting by actor's size @SERIALIZABLE\n\n        b2CircleShape mShape; // Physics shape\n\n    private:\n        // Returns shape with relative position and angle\n        b2Shape* GetShape(const Basis& transform) override;\n\n        // Called when transformation was changed; fits size by actor size when required\n        void OnTransformUpdated() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::CircleCollider)\n{\n    BASE_CLASS(o2::ICollider);\n}\nEND_META;\nCLASS_FIELDS_META(o2::CircleCollider)\n{\n    FIELD().PUBLIC().NAME(radius);\n    FIELD().PUBLIC().NAME(fitByActor);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mRadius);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mFitByActor);\n    FIELD().PRIVATE().NAME(mShape);\n}\nEND_META;\nCLASS_METHODS_META(o2::CircleCollider)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const CircleCollider&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRadius, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetRadius);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFitByActor, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFitByActor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableFromCreateMenu);\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(void, OnAddedFromEditor);\n#endif\n    FUNCTION().PRIVATE().SIGNATURE(b2Shape*, GetShape, const Basis&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnTransformUpdated);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/ICollider.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ICollider.h\"\n\n#include \"o2/Config/ProjectConfig.h\"\n#include \"o2/Physics/PhysicsWorld.h\"\n#include \"o2/Scene/Physics/RigidBody.h\"\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n\n    ICollider::ICollider()\n    {}\n\n    ICollider::ICollider(const ICollider& other):\n        Component(other), mFriction(other.mFriction), mDensity(other.mDensity), mRestitution(other.mRestitution), \n        mLayer(other.mLayer), mIsSensor(other.mIsSensor)\n    {}\n\n    ICollider::~ICollider()\n    {\n        RemoveFromRigidBody();\n    }\n\n    ICollider& ICollider::operator=(const ICollider& other)\n    {\n        Component::operator=(other);\n\n        mFriction = other.mFriction;\n        mDensity = other.mDensity;\n        mRestitution = other.mRestitution;\n        mLayer = other.mLayer;\n        mIsSensor = other.mIsSensor;\n\n        OnShapeChanged();\n\n        return *this;\n    }\n\n    void ICollider::SetFriction(float value)\n    {\n        mFriction = value;\n\n        if (mFixture)\n            mFixture->SetFriction(mFriction);\n    }\n\n    float ICollider::GetFriction() const\n    {\n        return mFriction;\n    }\n\n    void ICollider::SetDensity(float value)\n    {\n        mDensity = value;\n\n        if (mFixture)\n            mFixture->SetDensity(mDensity);\n    }\n\n    float ICollider::GetDensity() const\n    {\n        return mDensity;\n    }\n\n    void ICollider::SetRestitution(float value)\n    {\n        mRestitution = value;\n\n        if (mFixture)\n            mFixture->SetRestitution(mRestitution);\n    }\n\n    float ICollider::GetRestitution() const\n    {\n        return mRestitution;\n    }\n\n    void ICollider::SetLayer(const String& layer)\n    {\n        mLayer = layer;\n    }\n\n    const String& ICollider::GetLayer() const\n    {\n        return mLayer;\n    }\n\n    void ICollider::SetIsSensor(bool value)\n    {\n        mIsSensor = value;\n\n        if (mFixture)\n            mFixture->SetSensor(mIsSensor);\n    }\n\n    bool ICollider::IsSensor() const\n    {\n        return mIsSensor;\n    }\n\n    bool ICollider::IsAvailableFromCreateMenu()\n    {\n        return false;\n    }\n\n    void ICollider::AddToRigidBody(RigidBody* body)\n    {\n        auto thisTransform = mOwner.Lock()->transform;\n        auto bodyTransform = body->transform;\n        Basis thisBasis = thisTransform->GetWorldNonSizedBasis(); \n        Basis bodyBasis = bodyTransform->GetWorldNonSizedBasis(); \n        bodyBasis.xv.Normalize(); bodyBasis.yv.Normalize();\n        Basis relativeTransform = thisBasis*(bodyBasis.Inverted());\n\n        float invScale = 1.0f/o2Config.physics.scale;\n        relativeTransform.origin *= invScale;\n        relativeTransform.xv *= invScale;\n        relativeTransform.yv *= invScale;\n\n        b2FixtureDef fixture;\n        fixture.shape = GetShape(relativeTransform);\n        fixture.density = mDensity;\n        fixture.friction = mFriction;\n        fixture.restitution = mRestitution;\n        //fixture.filter.groupIndex = (int16)World::Instance().settings.GetLayerId(_layer);\n        fixture.userData = this;\n        fixture.isSensor = mIsSensor;\n\n        if (!fixture.shape) {\n            return;\n        }\n\n        mFixture = body->mBody->CreateFixture(&fixture);\n        mRigidBodyComp = body;\n    }\n\n    void ICollider::RemoveFromRigidBody()\n    {\n        if (mRigidBodyComp && mRigidBodyComp->mBody) {\n            mRigidBodyComp->mBody->DestroyFixture(mFixture);\n        }\n\n        mRigidBodyComp = nullptr;\n        mFixture = nullptr;\n    }\n\n    Ref<RigidBody> ICollider::FindRigidBody() const\n    {\n        auto itActor = mOwner.Lock();\n        while (itActor)\n        {\n            if (auto body = DynamicCast<RigidBody>(itActor))\n                return body;\n\n            itActor = itActor->GetParent().Lock();\n        }\n\n        return nullptr;\n    }\n\n    void ICollider::OnShapeChanged()\n    {\n        if (auto rigidBody = FindRigidBody()) {\n            rigidBody->RemoveCollider(this);\n            rigidBody->AddCollider(this);\n        }\n    }\n\n    b2Shape* ICollider::GetShape(const Basis& transform)\n    {\n        return nullptr;\n    }\n\n    void ICollider::OnTransformUpdated()\n    {\n#if IS_EDITOR\n        // Runtime reshape on transform update exists only to support edit-time\n        // manipulation inside the editor (dragging a collider in the inspector).\n        // In a standalone runner built with O2_EDITOR=ON this path would fire\n        // every physics step, destroying and recreating the b2Fixture and\n        // wiping Box2D's contact cache — bodies then interpenetrate and stick.\n        // Scene::IsEditor() is only set true by the editor application itself,\n        // so a runner (PetStory on Mac) skips the block entirely.\n        if (!o2Scene.IsEditor())\n            return;\n\n        if (o2Scene.IsEditorPlaying())\n            return;\n\n        OnShapeChanged();\n#endif\n    }\n\n    void ICollider::OnAddToScene()\n    {\n        if (auto rigidBody = FindRigidBody())\n            rigidBody->AddCollider(this);\n\n        Component::OnAddToScene();\n    }\n\n    void ICollider::OnRemoveFromScene()\n    {\n        RemoveFromRigidBody();\n        Component::OnRemoveFromScene();\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::ICollider>);\n// --- META ---\n\nDECLARE_CLASS(o2::ICollider, o2__ICollider);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/ICollider.h",
    "content": "#pragma once\n#include \"o2/Scene/Component.h\"\n#include \"Box2D/Collision/Shapes/b2Shape.h\"\n#include \"Box2D/Dynamics/b2Fixture.h\"\n\nnamespace o2\n{\n    class RigidBody;\n\n    // --------------------------------\n    // Basic physics collider interface\n    // --------------------------------\n    class ICollider: public Component\n    {\n    public:\n        PROPERTIES(ICollider);\n        PROPERTY(float, friction, SetFriction, GetFriction);          // Friction property\n        PROPERTY(float, density, SetDensity, GetDensity);             // Density property\n        PROPERTY(float, restitution, SetRestitution, GetRestitution); // Restitution property\n        PROPERTY(String, layer, SetLayer, GetLayer);                  // Layer name property\n        PROPERTY(bool, isSensor, SetIsSensor, IsSensor);              // Is sensor property\n\n    public:\n        // Default constructor\n        ICollider();\n\n        // Copy-constructor\n        ICollider(const ICollider& other);\n\n        // Destructor\n        ~ICollider();\n\n        // Copy operator\n        ICollider& operator=(const ICollider& other);\n\n        // Sets friction coefficient\n        void SetFriction(float value);\n\n        // Returns friction coefficient\n        float GetFriction() const;\n\n        // Sets density\n        void SetDensity(float value);\n\n        // Returns density\n        float GetDensity() const;\n\n        // Sets restitution\n        void SetRestitution(float value);\n\n        // Returns restitution\n        float GetRestitution() const;\n\n        // Sets layer\n        void SetLayer(const String& layer);\n\n        // Returns layer name\n        const String& GetLayer() const;\n\n        // Sets is sensor\n        void SetIsSensor(bool value);\n\n        // Returns is collider sensor\n        bool IsSensor() const;\n\n        // Is component visible in create menu\n        static bool IsAvailableFromCreateMenu();\n\n        SERIALIZABLE(ICollider);\n\n    protected:\n        float mFriction = 0.3f;    // Friction coefficient @SERIALIZABLE\n        float mDensity = 1.0f;     // Density @SERIALIZABLE \n        float mRestitution = 0.0f; // Restitution @SERIALIZABLE\n\n        String mLayer = String(\"Default\"); // Layer name @SERIALIZABLE\n\n        bool mIsSensor = false; // Is collider sensor @SERIALIZABLE\n\n        b2Fixture* mFixture = nullptr;\n        RigidBody* mRigidBodyComp = nullptr;\n\n    protected:\n        // Adds fixture with shape to body\n        void AddToRigidBody(RigidBody* body);\n\n        // Removes fixture from body\n        void RemoveFromRigidBody();\n\n        // Searches rigid body in parent hierarchy\n        Ref<RigidBody> FindRigidBody() const;\n\n        // Called when shape has changed, updates fixture with new shape\n        void OnShapeChanged();\n\n        // Returns shape with relative position and angle\n        virtual b2Shape* GetShape(const Basis& transform);\n\n        // Called when transformation was changed \n        void OnTransformUpdated() override;\n\n        // Called when actor was included to scene\n        void OnAddToScene() override;\n\n        // Called when actor was excluded from scene\n        void OnRemoveFromScene() override;\n\n        friend class PhysicsWorld;\n        friend class RigidBody;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ICollider)\n{\n    BASE_CLASS(o2::Component);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ICollider)\n{\n    FIELD().PUBLIC().NAME(friction);\n    FIELD().PUBLIC().NAME(density);\n    FIELD().PUBLIC().NAME(restitution);\n    FIELD().PUBLIC().NAME(layer);\n    FIELD().PUBLIC().NAME(isSensor);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.3f).NAME(mFriction);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mDensity);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mRestitution);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(String(\"Default\")).NAME(mLayer);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mIsSensor);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mFixture);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mRigidBodyComp);\n}\nEND_META;\nCLASS_METHODS_META(o2::ICollider)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ICollider&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFriction, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetFriction);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDensity, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDensity);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRestitution, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetRestitution);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayer, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetLayer);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIsSensor, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSensor);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableFromCreateMenu);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddToRigidBody, RigidBody*);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveFromRigidBody);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<RigidBody>, FindRigidBody);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnShapeChanged);\n    FUNCTION().PROTECTED().SIGNATURE(b2Shape*, GetShape, const Basis&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/RigidBody.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"RigidBody.h\"\n\n#include \"Box2D/Dynamics/b2Body.h\"\n#include \"o2/Physics/PhysicsWorld.h\"\n#include \"o2/Scene/Physics/ICollider.h\"\n\nnamespace o2\n{\n    RigidBody::RigidBody(RefCounter* refCounter):\n        Actor(refCounter)\n    {}\n\n    RigidBody::RigidBody(RefCounter* refCounter, const RigidBody& other):\n        Actor(refCounter, other), mBodyType(other.mBodyType), mMass(other.mMass), mInertia(other.mInertia),\n        mLinearDamping(other.mLinearDamping), mAngularDamping(other.mAngularDamping), mGravityScale(other.mGravityScale),\n        mIsBullet(other.mIsBullet), mIsFixedRotation(other.mIsFixedRotation)\n    {}\n\n    RigidBody::~RigidBody()\n    {\n        if (mBody)\n            RemoveBody();\n    }\n\n    RigidBody& RigidBody::operator=(const RigidBody& other)\n    {\n        if (mBody)\n            RemoveBody();\n\n        mBodyType = other.mBodyType;\n        mMass = other.mMass;\n        mInertia = other.mInertia;\n        mLinearDamping = other.mLinearDamping;\n        mAngularDamping = other.mAngularDamping;\n        mGravityScale = other.mGravityScale;\n        mIsBullet = other.mIsBullet;\n        mIsFixedRotation = other.mIsFixedRotation;\n\n        if (IsOnScene())\n            CreateBody();\n\n        return *this;\n    }\n\n    void RigidBody::SetBodyType(Type type)\n    {\n        mBodyType = type;\n\n        if (mBody)\n            mBody->SetType(GetBodyType(type));\n    }\n\n    RigidBody::Type RigidBody::GetBodyType() const\n    {\n        return mBodyType;\n    }\n\n    b2BodyType RigidBody::GetBodyType(Type type)\n    {\n        return type == Type::Dynamic ? b2_dynamicBody : (type == Type::Kinematic ? b2_kinematicBody : b2_staticBody);\n    }\n\n    void RigidBody::SetMass(float mass)\n    {\n        mMass = mass;\n        mMassData.mass = mMass;\n        mMassData.I = mInertia;\n\n        if (mBody)\n            mBody->SetMassData(&mMassData);\n    }\n\n    float RigidBody::GetMass() const\n    {\n        return mMass;\n    }\n\n    void RigidBody::SetInertia(float inertia)\n    {\n        mInertia = inertia;\n        mMassData.mass = mMass;\n        mMassData.I = mInertia;\n\n        if (mBody)\n            mBody->SetMassData(&mMassData);\n    }\n\n    float RigidBody::GetInertia() const\n    {\n        return mInertia;\n    }\n\n    void RigidBody::SetLinearVelocity(const Vec2F& velocity)\n    {\n        if (mBody)\n            mBody->SetLinearVelocity(velocity);\n    }\n\n    Vec2F RigidBody::GetLinearVelocity() const\n    {\n        if (mBody)\n            return mBody->GetLinearVelocity();\n\n        return Vec2F();\n    }\n\n    void RigidBody::SetAngularVelocity(float velocity)\n    {\n        if (mBody)\n            mBody->SetAngularVelocity(velocity);\n    }\n\n    float RigidBody::GetAngularVelocity() const\n    {\n        if (mBody)\n            return mBody->GetAngularVelocity();\n\n        return 0.0f;\n    }\n\n    void RigidBody::SetLinearDamping(float damping)\n    {\n        mLinearDamping = damping;\n\n        if (mBody)\n            mBody->SetLinearDamping(damping);\n    }\n\n    float RigidBody::GetLinearDamping() const\n    {\n        return mLinearDamping;\n    }\n\n    void RigidBody::SetAngularDamping(float damping)\n    {\n        mAngularDamping = damping;\n\n        if (mBody)\n            mBody->SetAngularDamping(damping);\n    }\n\n    float RigidBody::GetAngularDamping() const\n    {\n        return mAngularDamping;\n    }\n\n    void RigidBody::SetGravityScale(float scale)\n    {\n        mGravityScale = scale;\n\n        if (mBody)\n            mBody->SetGravityScale(scale);\n    }\n\n    float RigidBody::GetGravityScale() const\n    {\n        return mGravityScale;\n    }\n\n    void RigidBody::SetIsBullet(bool isBullet)\n    {\n        mIsBullet = isBullet;\n\n        if (mBody)\n            mBody->SetBullet(isBullet);\n    }\n\n    bool RigidBody::IsBullet() const\n    {\n        return mIsBullet;\n    }\n\n    void RigidBody::SetIsSleeping(bool isSleeping)\n    {\n        if (mBody)\n            mBody->SetAwake(!isSleeping);\n    }\n\n    bool RigidBody::IsSleeping() const\n    {\n        if (mBody)\n            return !mBody->IsAwake();\n\n        return false;\n    }\n\n    void RigidBody::SetIsFixedRotation(bool isFixedRotation)\n    {\n        mIsFixedRotation = isFixedRotation;\n\n        if (mBody)\n            mBody->SetFixedRotation(isFixedRotation);\n    }\n\n    bool RigidBody::IsFixedRotation() const\n    {\n        return mIsFixedRotation;\n    }\n\n    void RigidBody::OnEnabled()\n    {\n        Actor::OnEnabled();\n\n        if (mBody)\n            mBody->SetActive(true);\n    }\n\n    void RigidBody::OnDisabled()\n    {\n        Actor::OnDisabled();\n\n        if (mBody)\n            mBody->SetActive(false);\n    }\n\n    void RigidBody::OnAddToScene()\n    {\n        CreateBody();\n        Actor::OnAddToScene();\n    }\n\n    void RigidBody::OnRemoveFromScene()\n    {\n        RemoveBody();\n        Actor::OnRemoveFromScene();\n    }\n\n    void RigidBody::CreateBody()\n    {\n        b2BodyDef def;\n        def.position = transform->GetWorldPosition();\n        def.userData = this;\n        def.active = mResEnabledInHierarchy;\n\n        mMassData.mass = mMass;\n        mMassData.I = mInertia;\n\n        mBody = PhysicsWorld::Instance().mWorld.CreateBody(&def);\n        mBody->SetMassData(&mMassData);\n        mBody->SetType(mBodyType == Type::Dynamic ? b2_dynamicBody : (mBodyType == Type::Kinematic ? b2_kinematicBody : b2_staticBody));\n        mBody->SetLinearDamping(mLinearDamping);\n        mBody->SetAngularDamping(mAngularDamping);\n        mBody->SetGravityScale(mGravityScale);\n        mBody->SetBullet(mIsBullet);\n        mBody->SetFixedRotation(mIsFixedRotation);\n    }\n\n    void RigidBody::RemoveBody()\n    {\n        if (mBody)\n        {\n            PhysicsWorld::Instance().mWorld.DestroyBody(mBody);\n            mBody = nullptr;\n        }\n    }\n\n    void RigidBody::AddCollider(ICollider* collider)\n    {\n        if (mColliders.Contains(Ref(collider)))\n            return;\n\n        if (mBody)\n            collider->AddToRigidBody(this);\n\n        mColliders.Add(Ref(collider));\n    }\n\n    void RigidBody::RemoveCollider(ICollider* collider)\n    {\n        if (mBody)\n            collider->RemoveFromRigidBody();\n\n        mColliders.RemoveFirst([&](auto& x) { return x == collider; });\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::RigidBody>);\n// --- META ---\n\nENUM_META(o2::RigidBody::Type, o2__RigidBody__Type)\n{\n    ENUM_ENTRY(Dynamic);\n    ENUM_ENTRY(Kinematic);\n    ENUM_ENTRY(Static);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::RigidBody, o2__RigidBody);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/RigidBody.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Actor.h\"\n#include \"Box2D/Collision/Shapes/b2Shape.h\"\n#include \"Box2D/Dynamics/b2Body.h\"\n\nnamespace o2\n{\n    class ICollider;\n\n    // ------------------\n    // Physics rigid body\n    // ------------------\n    class RigidBody: public Actor\n    {\n    public:\n        enum class Type { Dynamic, Static, Kinematic };\n\n        PROPERTIES(RigidBody);\n        PROPERTY(Type, bodyType, SetBodyType, GetBodyType);                       // Body type property\n        PROPERTY(float, mass, SetMass, GetMass);                                  // Mass property, in kg\n        PROPERTY(float, inertia, SetInertia, GetInertia);                         // Inertia property, in kg-m^2\n        PROPERTY(Vec2F, linearVelocity, SetLinearVelocity, GetLinearVelocity);    // Linear velocity property, in m/s\n        PROPERTY(float, angularVelocity, SetAngularVelocity, GetAngularVelocity); // Angular velocity property, in rad/s\n        PROPERTY(float, linearDamping, SetLinearDamping, GetLinearDamping);       // Linear damping property\n        PROPERTY(float, angularDamping, SetAngularDamping, GetAngularDamping);    // Angular damping property\n        PROPERTY(float, gravityScale, SetGravityScale, GetGravityScale);          // Gravity scale property\n        PROPERTY(bool, isBullet, SetIsBullet, IsBullet);                          // Is body using continuous collision detection property\n        PROPERTY(bool, isSleeping, SetIsSleeping, IsSleeping);                    // Is body sleeping property\n        PROPERTY(bool, isFixedRotation, SetIsFixedRotation, IsFixedRotation);     // Is fixed rotation property\n\n    public:\n        // Default constructor\n        explicit RigidBody(RefCounter* refCounter);\n\n        // Copy-constructor\n        RigidBody(RefCounter* refCounter, const RigidBody& other);\n\n        // Copy-operator\n        RigidBody& operator=(const RigidBody& other);\n\n        // Destructor\n        ~RigidBody();\n\n        // Sets body type\n        void SetBodyType(Type type);\n\n        // Returns body type\n        Type GetBodyType() const;\n\n        // Sets mass, in kilograms\n        void SetMass(float mass);\n\n        // Returns mass in kilograms\n        float GetMass() const;\n\n        // Sets body inertia in kg-m^2\n        void SetInertia(float inertia);\n\n        // Returns body inertia kg-m^2\n        float GetInertia() const;\n\n        // Sets linear velocity in m/s \n        void SetLinearVelocity(const Vec2F& velocity);\n\n        // Returns linear velocity in m/s\n        Vec2F GetLinearVelocity() const;\n\n        // Sets angular velocity in rad/s\n        void SetAngularVelocity(float velocity);\n\n        // Returns angular velocity in rad/s\n        float GetAngularVelocity() const;\n\n        // Sets linear damping\n        void SetLinearDamping(float damping);\n\n        // Returns linear damping\n        float GetLinearDamping() const;\n\n        // Sets angular damping\n        void SetAngularDamping(float damping);\n\n        // Returns angular damping\n        float GetAngularDamping() const;\n\n        // Sets gravity scale\n        void SetGravityScale(float scale);\n\n        // Returns gravity scale\n        float GetGravityScale() const;\n\n        // Sets is body using continuous collision detection\n        void SetIsBullet(bool isBullet);\n\n        // Returns is body using continuous collision detection\n        bool IsBullet() const;\n\n        // Sets body is sleeping\n        void SetIsSleeping(bool isSleeping);\n\n        // Returns body is sleeping\n        bool IsSleeping() const;\n\n        // Sets is body fixed rotation\n        void SetIsFixedRotation(bool isFixedRotation);\n\n        // Returns is body fixed rotation\n        bool IsFixedRotation() const;\n\n        SERIALIZABLE(RigidBody);\n        CLONEABLE_REF(RigidBody);\n\n    protected:\n        b2Body*    mBody = nullptr; // Box 2d physics body\n        b2MassData mMassData;       // Body mass data\n\n        Type mBodyType = Type::Dynamic; // Type of body @SERIALIZABLE\n\n        float mMass = 1.0f;             // Mass @SERIALIZABLE\n        float mInertia = 1.0f;          // Inertia @SERIALIZABLE\n        float mLinearDamping = 0.0f;    // Linear damping @SERIALIZABLE\n        float mAngularDamping = 0.0f;   // Angular damping @SERIALIZABLE\n        float mGravityScale = 1.0f;     // Gravity scale @SERIALIZABLE\n        bool  mIsBullet = false;        // Is using continuous collision detection @SERIALIZABLE\n        bool  mIsFixedRotation = false; // Is fixed rotation @SERIALIZABLE\n\n        Vector<WeakRef<ICollider>> mColliders; // Attached colliders list\n\n    protected:\n        // Called when enabled, turns on rigid body\n        void OnEnabled() override;\n\n        // Called when enabled, turns off rigid body\n        void OnDisabled() override;\n\n        // Called when actor has added to scene; creates rigid body\n        void OnAddToScene() override;\n\n        // Called when actor has removed from scene; destroys rigid body\n        void OnRemoveFromScene() override;\n\n        // Creates box2d body, registers in physics world\n        void CreateBody();\n\n        // Removes body\n        void RemoveBody();\n\n        // Adds collider to body\n        void AddCollider(ICollider* collider);\n\n        // Removes collider from body\n        void RemoveCollider(ICollider* collider);\n\n        // Converts body type\n        static b2BodyType GetBodyType(Type type);\n\n        friend class ICollider;\n        friend class PhysicsWorld;\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::RigidBody::Type);\n\nCLASS_BASES_META(o2::RigidBody)\n{\n    BASE_CLASS(o2::Actor);\n}\nEND_META;\nCLASS_FIELDS_META(o2::RigidBody)\n{\n    FIELD().PUBLIC().NAME(bodyType);\n    FIELD().PUBLIC().NAME(mass);\n    FIELD().PUBLIC().NAME(inertia);\n    FIELD().PUBLIC().NAME(linearVelocity);\n    FIELD().PUBLIC().NAME(angularVelocity);\n    FIELD().PUBLIC().NAME(linearDamping);\n    FIELD().PUBLIC().NAME(angularDamping);\n    FIELD().PUBLIC().NAME(gravityScale);\n    FIELD().PUBLIC().NAME(isBullet);\n    FIELD().PUBLIC().NAME(isSleeping);\n    FIELD().PUBLIC().NAME(isFixedRotation);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mBody);\n    FIELD().PROTECTED().NAME(mMassData);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Type::Dynamic).NAME(mBodyType);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mMass);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mInertia);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mLinearDamping);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mAngularDamping);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mGravityScale);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mIsBullet);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mIsFixedRotation);\n    FIELD().PROTECTED().NAME(mColliders);\n}\nEND_META;\nCLASS_METHODS_META(o2::RigidBody)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const RigidBody&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBodyType, Type);\n    FUNCTION().PUBLIC().SIGNATURE(Type, GetBodyType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMass, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetMass);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetInertia, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetInertia);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLinearVelocity, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetLinearVelocity);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAngularVelocity, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetAngularVelocity);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLinearDamping, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetLinearDamping);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAngularDamping, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetAngularDamping);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetGravityScale, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetGravityScale);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIsBullet, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsBullet);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIsSleeping, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSleeping);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIsFixedRotation, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFixedRotation);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, CreateBody);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveBody);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddCollider, ICollider*);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveCollider, ICollider*);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(b2BodyType, GetBodyType, Type);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/SplineCollider.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SplineCollider.h\"\n\n#include \"Box2D/Collision/Shapes/b2ChainShape.h\"\n\nnamespace o2\n{\n    SplineCollider::SplineCollider()\n    {\n        InitSpline();\n    }\n\n    SplineCollider::SplineCollider(const SplineCollider& other):\n        ICollider(other), spline(other.spline), mIsLoop(other.mIsLoop)\n    {\n        spline->onKeysChanged = THIS_FUNC(OnSplineChanged);\n        spline->SetClosed(mIsLoop);\n    }\n\n    SplineCollider::~SplineCollider()\n    {\n        delete mShape;\n    }\n\n    SplineCollider& SplineCollider::operator=(const SplineCollider& other)\n    {\n        ICollider::operator=(other);\n        spline = other.spline;\n        mIsLoop = other.mIsLoop;\n        spline->onKeysChanged = THIS_FUNC(OnSplineChanged);\n        spline->SetClosed(mIsLoop);\n        OnShapeChanged();\n        return *this;\n    }\n\n    Ref<Spline> SplineCollider::GetSpline() const\n    {\n        return spline;\n    }\n\n    void SplineCollider::SetIsLoop(bool loop)\n    {\n        if (mIsLoop == loop)\n            return;\n\n        mIsLoop = loop;\n        spline->SetClosed(loop);\n        OnShapeChanged();\n    }\n\n    bool SplineCollider::IsLoop() const\n    {\n        return mIsLoop;\n    }\n\n    String SplineCollider::GetName()\n    {\n        return \"Spline collider\";\n    }\n\n    String SplineCollider::GetCategory()\n    {\n        return \"Physics\";\n    }\n\n    bool SplineCollider::IsAvailableFromCreateMenu()\n    {\n        return true;\n    }\n\n#if IS_EDITOR\n    void SplineCollider::OnAddedFromEditor()\n    {\n        InitSpline();\n        OnShapeChanged();\n    }\n#endif\n\n    void SplineCollider::InitSpline()\n    {\n        if (spline->GetKeys().IsEmpty())\n        {\n            spline->BeginKeysBatchChange();\n            spline->AppendKey(Vec2F(-100.0f, 0.0f));\n            spline->AppendKey(Vec2F(100.0f, 0.0f));\n\n            for (int i = 0; i < 2; i++)\n            {\n                auto key = spline->GetKey(i);\n                key.supportsType = Spline::Key::Type::Broken;\n                key.prevSupport = Vec2F();\n                key.nextSupport = Vec2F();\n                spline->SetKey(key, i);\n            }\n            spline->CompleteKeysBatchingChange();\n        }\n\n        spline->onKeysChanged = THIS_FUNC(OnSplineChanged);\n        spline->SetClosed(mIsLoop);\n    }\n\n    void SplineCollider::OnSplineChanged()\n    {\n        OnShapeChanged();\n    }\n\n    void SplineCollider::OnAddToScene()\n    {\n        spline->onKeysChanged = THIS_FUNC(OnSplineChanged);\n        spline->SetClosed(mIsLoop);\n        ICollider::OnAddToScene();\n    }\n\n    b2Shape* SplineCollider::GetShape(const Basis& transform)\n    {\n        if (!spline)\n            return nullptr;\n\n        const auto& keys = spline->GetKeys();\n        if (keys.Count() < 2)\n            return nullptr;\n\n        // mLeftApproxValues[i] of key K stores the bezier segment from key K-1 to key K\n        // (precomputed at 20 points). Index 0 is the position at key K-1, last is at key K.\n        // Skip index 0 on subsequent segments to avoid duplicate vertices at shared endpoints.\n        Vector<b2Vec2> verts;\n        for (int i = 1; i < keys.Count(); i++)\n        {\n            const ApproximationVec2F* approx = keys[i].GetApproximatedPointsLeft();\n            int count = keys[i].GetApproximatedPointsCount();\n            int start = (i == 1) ? 0 : 1;\n            for (int j = start; j < count; j++)\n            {\n                Vec2F p = approx[j].value * transform;\n                verts.Add(b2Vec2(p.x, p.y));\n            }\n        }\n\n        if (mIsLoop && verts.Count() > 1)\n        {\n            const b2Vec2& first = verts[0];\n            const b2Vec2& last = verts.Last();\n            if (Math::Equals(first.x, last.x) && Math::Equals(first.y, last.y))\n                verts.PopBack();\n        }\n\n        if (verts.Count() < 2)\n            return nullptr;\n\n        delete mShape;\n        mShape = mnew b2ChainShape();\n        if (mIsLoop)\n            mShape->CreateLoop(verts.Data(), verts.Count());\n        else\n            mShape->CreateChain(verts.Data(), verts.Count());\n\n        return mShape;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::SplineCollider>);\n// --- META ---\n\nDECLARE_CLASS(o2::SplineCollider, o2__SplineCollider);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Physics/SplineCollider.h",
    "content": "#pragma once\n\n#include \"o2/Scene/Physics/ICollider.h\"\n#include \"o2/Utils/Math/Spline.h\"\n\nclass b2ChainShape;\n\nnamespace o2\n{\n    // ----------------------------------------\n    // Spline-based curve collider\n    // Builds a Box2D b2ChainShape from a Bezier\n    // spline edited in the scene SplineTool.\n    // ----------------------------------------\n    class SplineCollider: public ICollider\n    {\n    public:\n        PROPERTIES(SplineCollider);\n        PROPERTY(bool, isLoop, SetIsLoop, IsLoop); // Closed loop chain property\n\n        Ref<Spline> spline = mmake<Spline>(); // Collider spline @SERIALIZABLE\n\n    public:\n        // Default constructor\n        SplineCollider();\n\n        // Copy-constructor\n        SplineCollider(const SplineCollider& other);\n\n        // Destructor\n        ~SplineCollider();\n\n        // Copy operator\n        SplineCollider& operator=(const SplineCollider& other);\n\n        // Returns spline\n        Ref<Spline> GetSpline() const;\n\n        // Sets loop (closed chain) mode\n        void SetIsLoop(bool loop);\n\n        // Returns true if collider is a closed loop\n        bool IsLoop() const;\n\n        // Returns name of component\n        static String GetName();\n\n        // Returns category of component\n        static String GetCategory();\n\n        // Is component visible in create menu\n        static bool IsAvailableFromCreateMenu();\n\n#if IS_EDITOR\n        // Called when component added from editor\n        void OnAddedFromEditor() override;\n#endif\n\n        SERIALIZABLE(SplineCollider);\n        CLONEABLE_REF(SplineCollider);\n\n    private:\n        bool mIsLoop = false; // Loop / closed chain @SERIALIZABLE\n\n        b2ChainShape* mShape = nullptr; // Physics shape (re-allocated on every shape change)\n\n    private:\n        // Initializes spline with two default keys and wires onKeysChanged\n        void InitSpline();\n\n        // Called by spline's onKeysChanged to rebuild physics fixture\n        void OnSplineChanged();\n\n        // Returns shape with relative position and angle\n        b2Shape* GetShape(const Basis& transform) override;\n\n        // Called when actor was included to scene\n        void OnAddToScene() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::SplineCollider)\n{\n    BASE_CLASS(o2::ICollider);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SplineCollider)\n{\n    FIELD().PUBLIC().NAME(isLoop);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(mmake<Spline>()).NAME(spline);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mIsLoop);\n    FIELD().PRIVATE().DEFAULT_VALUE(nullptr).NAME(mShape);\n}\nEND_META;\nCLASS_METHODS_META(o2::SplineCollider)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const SplineCollider&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Spline>, GetSpline);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIsLoop, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLoop);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(bool, IsAvailableFromCreateMenu);\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(void, OnAddedFromEditor);\n#endif\n    FUNCTION().PRIVATE().SIGNATURE(void, InitSpline);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnSplineChanged);\n    FUNCTION().PRIVATE().SIGNATURE(b2Shape*, GetShape, const Basis&);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnAddToScene);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Scene.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Scene.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Physics/PhysicsWorld.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Render/VectorFontEffects.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/ActorRefResolver.h\"\n#include \"o2/Scene/CameraActor.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/SceneLayer.h\"\n#include \"o2/Scene/Tags.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    DECLARE_SINGLETON(Scene);\n\n    Scene::Scene(RefCounter* refCounter):\n        Singleton<Scene>(refCounter)\n    {\n        mDefaultLayer = AddLayer(\"Default\");\n\n        mLog = mmake<LogStream>(\"Scene\");\n        o2Debug.GetLog()->BindStream(mLog);\n    }\n\n    Scene::~Scene()\n    {\n        Clear();\n        ClearCache();\n    }\n\n    const LogStream& Scene::GetLogStream() const\n    {\n        return *mLog;\n    }\n\n    const Vector<WeakRef<CameraActor>>& Scene::GetCameras() const\n    {\n        return mCameras;\n    }\n\n    void Scene::Update(float dt)\n    {\n        mIsUpdatingScene = true;\n\n\t\tUpdateDestroyingEntities();\n        UpdateAddedEntities();\n        UpdateStartingEntities();\n        UpdateActors(dt);\n\n        mIsUpdatingScene = false;\n    }\n\n    void Scene::FixedUpdate(float dt)\n    {\n        for (auto& actor : mRootActors)\n            actor->FixedUpdate(dt);\n\n        for (auto& actor : mRootActors)\n            actor->FixedUpdateChildren(dt);\n    }\n\n    void Scene::UpdateAddedEntities()\n    {\n        auto addedActors = mAddedActors;\n        mAddedActors.Clear();\n\n        auto startedActorsCache = mStartActors;\n        mStartActors = addedActors;\n        startedActorsCache.Clear();\n\n\t\tauto forEachInitializingActor = [&](const Ref<Actor>& actor, const Function<void(const Ref<Actor>&)>& func)\n\t\t\t{\n\t\t\t\tactor->ForEachActor([&](Actor& actor)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (actor.mState == Actor::State::Initializing)\n\t\t\t\t\t\t\t\t\t\t{\n                                            func(Ref(&actor));\n\t\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t});\n\t\t\t};\n\n        for (auto& actor : addedActors)\n        {\n            if (actor->IsOnScene())\n\t\t\t\tforEachInitializingActor(actor, [&](const Ref<Actor>& actor) { AddActorToScene(actor); });\n        }\n\n        for (auto& actor : addedActors)\n\t\t\tforEachInitializingActor(actor, [&](const Ref<Actor>& actor) { actor->UpdateResEnabledInHierarchy(); });\n\n        for (auto& actor : addedActors)\n\t\t\tforEachInitializingActor(actor, [&](const Ref<Actor>& actor) { actor->OnInitialized(); });\n    }\n\n    void Scene::UpdateTransforms()\n    {\n        for (auto& actor : mRootActors)\n            actor->UpdateSelfTransform();\n\n        for (auto& actor : mRootActors)\n            actor->UpdateChildrenTransforms();\n    }\n\n    void Scene::UpdateStartingEntities()\n    {\n        auto startActors = mStartActors;\n        mStartActors.Clear();\n\n        for (auto& actor : startActors)\n            actor->OnStart();\n\n        auto startComponents = mStartComponents;\n        mStartComponents.Clear();\n\n        for (auto& comp : startComponents)\n            comp->OnStart();\n    }\n\n    void Scene::UpdateDestroyingEntities()\n    {\n        auto destroyActors = mDestroyActors;\n        auto destroyComponents = mDestroyComponents;\n\n        mDestroyActors.Clear();\n        mDestroyComponents.Clear();\n\n        for (auto& component : destroyComponents)\n        {\n            if (auto owner = component->GetActor())\n                owner->RemoveComponent(component);\n        }\n\n        for (auto& actor : destroyActors)\n        {\n            if (auto parent = actor->GetParent().Lock())\n                parent->RemoveChild(actor);\n\n            actor->RemoveFromScene();\n            actor->OnBeforeDestroy();\n        }\n\n        destroyActors.Clear();\n    }\n\n    void Scene::DestroyActor(const Ref<Actor>& actor)\n    {\n        if (actor->mState != Actor::State::Destroying)\n        {\n            actor->mState = Actor::State::Destroying;\n            mDestroyActors.Add(actor);\n\n#if IS_EDITOR\n            mChangedObjects.Remove(actor);\n#endif\n        }\n    }\n\n    void Scene::DestroyComponent(const Ref<Component>& component)\n    {\n        mDestroyComponents.Add(component);\n    }\n\n    bool Scene::IsUpdating() const\n    {\n        return mIsUpdatingScene;\n    }\n\n    void Scene::OnActorCreated(const Ref<Actor>& actor)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        mInstance->mAddedActors.Add(actor);\n    }\n\n    void Scene::OnActorDestroy(const WeakRef<Actor>& actor)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n//         if (actor->IsOnScene())\n//             Instance().RemoveActorFromScene(actor, false);\n    }\n\n    void Scene::OnNewActorParented(const Ref<Actor>& actor)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        mInstance->mAddedActors.Remove(actor);\n    }\n\n    void Scene::OnAddActorToScene(const Ref<Actor>& actor)\n    {\n        Assert(IsSingletonInitialzed(), \"Cant add actor to scene, because scene not initialized\")\n\n        mInstance->AddActorToScene(actor);\n    }\n\n    void Scene::OnRemoveActorFromScene(const Ref<Actor>& actor, bool keepEditorObjects /*= false*/)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        mInstance->RemoveActorFromScene(actor, keepEditorObjects);\n    }\n\n    void Scene::OnActorIdChanged(const Ref<Actor>& actor, SceneUID prevId)\n    {\n        if (!IsSingletonInitialzed())\n            return\n\n            mInstance->mActorsMap.Remove(prevId);\n        mInstance->mActorsMap[actor->mId] = actor;\n    }\n\n    void Scene::UpdateActors(float dt)\n    {\n        for (auto& actor : mRootActors)\n            actor->Update(dt);\n\n        for (auto& actor : mRootActors)\n            actor->UpdateChildren(dt);\n    }\n\n#undef DrawText\n\n    void Scene::Draw()\n    {\n        DrawCameras();\n    }\n\n    void Scene::DrawCameras()\n    {\n#if IS_EDITOR\n        BeginDrawingScene();\n#endif\n\n        if (mCameras.IsEmpty())\n        {\n            if constexpr (IS_EDITOR)\n            {\n                o2Render.SetCamera(Camera());\n\t\t\t\to2Render.Clear();\n\n\t\t\t\tText text(\"debugFont.ttf\");\n\t\t\t\ttext.SetText(\"No camera\");\n\t\t\t\ttext.Draw();\n            }\n        }\n        else\n        {\n            PROFILE_SAMPLE(\"Draw cameras\");\n\n            for (auto& camera : mCameras)\n            {\n                if (auto cameraRef = camera.Lock()) \n                {\n                    cameraRef->SetupAndDraw();\n                    cameraRef->listenersLayer->OnDrawn(Camera().GetBasis());\n                }\n            }\n        }\n\n        DrawCursorDebugInfo();\n\n#if IS_EDITOR\n        EndDrawingScene();\n#endif\n    }\n\n    void Scene::DrawCursorDebugInfo()\n    {\n        if (!o2Input.IsKeyDown(VK_F4))\n            return;\n\n        struct helper\n        {\n            static void Process(String& debugInfo, Actor* actor)\n            {\n                if (actor->transform->IsPointInside(o2Input.GetCursorPos()))\n                {\n                    auto parent = actor;\n                    String path;\n                    while (parent)\n                    {\n                        path = parent->GetName() + \"/\" + path;\n                        parent = parent->GetParent().Lock().Get();\n                    }\n\n                    debugInfo += \" -- \" + path + \" - \" + actor->GetType().GetName() + \"\\n\";\n                    debugInfo += \"Rect: \" + (String)actor->transform->worldRect + \"\\n\";\n\n                    Widget* widget = dynamic_cast<Widget*>(actor);\n                    if (widget)\n                    {\n                        debugInfo += \"layout - \" +\n                            (String)widget->layout->anchorMin + \" \" + (String)widget->layout->offsetMin + \" - \" +\n                            (String)widget->layout->anchorMax + \" \" + (String)widget->layout->offsetMax + \"\\n\";\n\n                        debugInfo += (widget->mIsClipped ? (String)\"clipped, \" : (String)\"not clipped, \") +\n                            (widget->IsEnabled() ? (String)\"visible\\n\" : ((String)\"hidden\" + (!widget->mResEnabledInHierarchy ? (String)\" fully\\n\" : (String)\"\\n\")));\n\n                        debugInfo += \"alpha: \" + (String)widget->mTransparency +\n                            \", res alpha: \" + (String)widget->mResTransparency + \"\\n\";\n                    }\n\n                    debugInfo += \"\\n\";\n\n                    if (widget)\n                    {\n                        for (auto& child : widget->mInternalWidgets)\n                            Process(debugInfo, child.Get());\n                    }\n                }\n\n                for (auto& child : actor->mChildren)\n                    Process(debugInfo, child.Get());\n            }\n        };\n\n        String debugInfo;\n        for (auto& actor : mAllActors)\n            helper::Process(debugInfo, actor.Lock().Get());\n\n        o2Debug.DrawText(((Vec2F)o2Render.GetResolution().InvertedX()) * 0.5f, debugInfo);\n    }\n\n    void Scene::AddActorToScene(const Ref<Actor>& actor)\n    {\n        if (!actor->mParent)\n            mRootActors.Add(actor);\n\n        mAllActors.Add(actor);\n        mActorsMap[actor->mId] = actor;\n\n        actor->OnAddToScene();\n\n#if IS_EDITOR\n        mChangedObjects.Add(actor);\n        AddEditableObjectToScene(actor);\n        onAddedToScene(actor);\n#endif\n    }\n\n    void Scene::RemoveActorFromScene(const Ref<Actor>& actor, bool keepEditorObjects /*= false*/)\n    {\n        if (!actor->mParent)\n            mRootActors.Remove(actor);\n\n        mAllActors.Remove(actor);\n        mActorsMap.Remove(actor->mId);\n\n        mStartActors.Remove(actor);\n        mAddedActors.Remove(actor);\n\n        actor->OnRemoveFromScene();\n\n#if IS_EDITOR\n        if (!keepEditorObjects)\n            RemoveEditableObjectFromScene(actor);\n\n        OnObjectRemoveFromScene(actor);\n#endif\n    }\n\n    void Scene::OnComponentAdded(Component* component)\n    {\n        mStartComponents.Add(Ref(component));\n    }\n\n    void Scene::OnComponentRemoved(Component* component)\n    {\n        mStartComponents.RemoveFirst([&](auto& x) { return x == component; });\n    }\n\n    void Scene::OnLayerRenamed(SceneLayer* layer, const String& oldName)\n    {\n        mLayersMap.Remove(oldName);\n        mLayersMap[layer->GetName()] = Ref(layer);\n\n#if IS_EDITOR\n        onLayersListChanged();\n#endif\n    }\n\n    void Scene::OnCameraAddedOnScene(CameraActor* camera)\n    {\n        mCameras.Add(Ref(camera));\n    }\n\n    void Scene::OnCameraRemovedScene(CameraActor* camera)\n    {\n        mCameras.Remove(Ref(camera));\n    }\n\n    bool Scene::HasLayer(const String& name) const\n    {\n        return mLayersMap.ContainsKey(name);\n    }\n\n    Ref<SceneLayer> Scene::GetLayer(const String& name)\n    {\n        WeakRef<SceneLayer> layer;\n        if (mLayersMap.TryGetValue(name, layer))\n            return layer.Lock();\n\n        return AddLayer(name);\n    }\n\n    const Ref<SceneLayer>& Scene::GetDefaultLayer() const\n    {\n        return mDefaultLayer;\n    }\n\n    Ref<SceneLayer> Scene::AddLayer(const String& name)\n    {\n        WeakRef<SceneLayer> layer;\n        if (mLayersMap.TryGetValue(name, layer))\n            return layer.Lock();\n\n        auto newLayer = mmake<SceneLayer>();\n        newLayer->mName = name;\n        mLayers.Add(newLayer);\n        mLayersMap[name] = newLayer;\n\n#if IS_EDITOR\n        onLayersListChanged();\n#endif\n\n        return newLayer;\n    }\n\n    void Scene::RemoveLayer(const Ref<SceneLayer>& layer)\n    {\n        if (layer == mDefaultLayer)\n            return;\n\n        mLayers.Remove(layer);\n        mLayersMap.Remove(layer->mName);\n\n#if IS_EDITOR\n        onLayersListChanged();\n#endif\n    }\n\n    void Scene::RemoveLayer(const String& name)\n    {\n        RemoveLayer(GetLayer(name));\n    }\n\n    void Scene::SetLayerOrder(const Ref<SceneLayer>& layer, int idx)\n    {\n        mLayers.Remove(layer);\n        mLayers.Insert(layer, idx);\n    }\n\n    Ref<Tag> Scene::GetTag(const String& name) const\n    {\n        return mTags.FindOrDefault([&](auto x) { return x->GetName() == name; });\n    }\n\n    Ref<Tag> Scene::AddTag(const String& name)\n    {\n        if (GetTag(name))\n        {\n            o2Debug.LogError(\"Can't create new tag with name \" + name + \": already exist\");\n            return nullptr;\n        }\n\n        auto newTag = mmake<Tag>();\n        newTag->SetName(name);\n        mTags.Add(newTag);\n\n        return newTag;\n    }\n\n    void Scene::RemoveTag(const Ref<Tag>& tag)\n    {\n        mTags.Remove(tag);\n    }\n\n    void Scene::RemoveTag(const String& name)\n    {\n        RemoveTag(GetTag(name));\n    }\n\n    const Vector<Ref<SceneLayer>>& Scene::GetLayers()const\n    {\n        return mLayers;\n    }\n\n    Vector<String> Scene::GetLayersNames() const\n    {\n        return mLayers.Convert<String>([](auto& x) { return x->GetName(); });\n    }\n\n    const Map<String, WeakRef<SceneLayer>>& Scene::GetLayersMap() const\n    {\n        return mLayersMap;\n    }\n\n    const Vector<Ref<Tag>>& Scene::GetTags() const\n    {\n        return mTags;\n    }\n\n    const Vector<Ref<Actor>>& Scene::GetRootActors() const\n    {\n        return mRootActors;\n    }\n\n    Vector<Ref<Actor>>& Scene::GetRootActors()\n    {\n        return mRootActors;\n    }\n\n    const Vector<WeakRef<Actor>>& Scene::GetAllActors() const\n    {\n        return mAllActors;\n    }\n\n    Vector<WeakRef<Actor>>& Scene::GetAllActors()\n    {\n        return mAllActors;\n    }\n\n    Ref<Actor> Scene::GetActorByID(SceneUID id) const\n    {\n        return mActorsMap.FindKey(id).second.Lock();\n    }\n\n    Ref<Actor> Scene::GetAssetActorByID(const UID& id)\n    {\n        auto cached = mAssetsCache.FindOrDefault([=](const AssetRef<ActorAsset>& x) { \n            if (x) \n                return x->GetUID() == id; \n            else\n                return false; \n        });\n\n        if (!cached)\n        {\n            cached = AssetRef<ActorAsset>(id);\n            mAssetsCache.Add(cached);\n\n            return nullptr;\n        }\n\n        return cached->GetActor();\n    }\n\n    Ref<Actor> Scene::FindActor(const String& path)\n    {\n        int delPos = path.Find(\"/\");\n        String pathPart = path.SubStr(0, delPos);\n\n        for (auto& actor : mRootActors)\n        {\n            if (actor->mName == pathPart)\n            {\n                if (delPos == -1)\n                    return actor;\n                else\n                    return actor->GetChild(path.SubStr(delPos + 1));\n            }\n        }\n\n        return nullptr;\n    }\n\n    void Scene::Clear(bool keepDefaultLayer /*= true*/)\n    {\n        mDestroyActors = mRootActors;\n        UpdateDestroyingEntities();\n\n        mAddedActors.Clear();\n        mStartActors.Clear();\n        mStartComponents.Clear();\n        mLayers.Clear();\n        mLayersMap.Clear();\n\n        if (keepDefaultLayer)\n            mDefaultLayer = AddLayer(\"Default\");\n\n        mTags.Clear();\n    }\n\n    void Scene::ClearCache()\n    {\n        mAssetsCache.Clear();\n    }\n\n    void Scene::Load(const String& path, bool append /*= false*/)\n    {\n        DataDocument data;\n        if (data.LoadFromFile(path))\n            Load(data, append);\n        else\n            o2Debug.LogError(\"Failed to load scene \" + path);\n    }\n\n    void Scene::Load(const DataDocument& doc, bool append /*= false*/)\n    {\n        ActorRefResolver::mInstance->LockResolving();\n\n        if (!append)\n            Clear(false);\n\n        auto& layersNode = doc.GetMember(\"Layers\");\n        if (!layersNode.IsEmpty())\n        {\n            for (auto& layerNode : layersNode)\n            {\n                auto layer = mmake<SceneLayer>();\n                layer->Deserialize(layerNode);\n                mLayers.Add(layer);\n                mLayersMap[layer->mName] = layer;\n            }\n        }\n\n        auto& defaultLayerNode = doc.GetMember(\"DefaultLayer\");\n        if (!defaultLayerNode.IsEmpty())\n            mDefaultLayer = GetLayer(defaultLayerNode);\n        else\n            mDefaultLayer = AddLayer(\"Default\");\n\n#if IS_EDITOR\n        onLayersListChanged();\n#endif\n\n        auto& tagsNode = doc.GetMember(\"Tags\");\n        if (!tagsNode.IsEmpty())\n        {\n            for (auto& tagNode : tagsNode)\n            {\n                auto tag = mmake<Tag>();\n                tag->Deserialize(tagNode);\n                mTags.Add(tag);\n            }\n        }\n\n        auto& actorsNode = doc.GetMember(\"Actors\");\n        if (!actorsNode.IsEmpty())\n        {\n            mRootActors = actorsNode;\n        }\n\n        ActorRefResolver::mInstance->UnlockResolving();\n        ActorRefResolver::mInstance->ResolveRefs();\n\n\t\tUpdateTransforms();\n\t\tmRootActors.Clear();\n\n\t\tUpdateAddedEntities();\n\t\tUpdateTransforms();\n\n        UpdateDestroyingEntities();\n\n#if IS_EDITOR\n        mChangedObjects.Clear();\n#endif\n    }\n\n    void Scene::Save(const String& path)\n    {\n        DataDocument data;\n        Save(data);\n        data.SaveToFile(path);\n    }\n\n    void Scene::Save(DataDocument& doc)\n    {\n        auto& layersNode = doc.AddMember(\"Layers\");\n        for (auto& layer : mLayers)\n            layer->Serialize(layersNode.AddElement());\n\n        doc.AddMember(\"DefaultLayer\") = mDefaultLayer->mName;\n\n        auto& tagsNode = doc.AddMember(\"Tags\");\n        for (auto& tag : mTags)\n            tag->Serialize(tagsNode.AddElement());\n\n        doc.AddMember(\"Actors\") = mRootActors;\n    }\n\n    bool Scene::IsEditor() const\n    {\n#if IS_EDITOR\n        return mIsEditor;\n#else\n        return false;\n#endif\n    }\n\n#if IS_EDITOR\n    void Scene::LinkActorToPrototypesHierarchy(Ref<Actor> actor, AssetRef<ActorAsset> proto)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        while (proto)\n        {\n            o2Scene.OnActorLinkedToPrototype(proto, actor);\n            proto = proto->GetActor()->GetPrototype();\n        }\n    }\n\n    bool Scene::IsEditorPlaying() const\n    {\n        return mIsPlaying;\n    }\n\n    void Scene::SetEditorPlaying(bool playing)\n    {\n        mIsPlaying = playing;\n    }\n\n    void Scene::SetIsEditor(bool isEditor)\n    {\n        mIsEditor = isEditor;\n    }\n\n    Vector<Ref<SceneEditableObject>> Scene::GetRootEditableObjects()\n    {\n        return mRootActors.Convert<Ref<SceneEditableObject>>([](const Ref<Actor>& x) { return DynamicCast<SceneEditableObject>(x); });\n    }\n\n    void Scene::AddEditableObjectToScene(const Ref<SceneEditableObject>& object)\n    {\n        mEditableObjects.Add(object);\n        mEditableObjectsByUID[object->GetID()] = object;\n    }\n\n    void Scene::RemoveEditableObjectFromScene(const Ref<SceneEditableObject>& object)\n    {\n        mChangedObjects.RemoveAll([&](auto x) { return x == object; });\n        mEditableObjects.RemoveAll([&](auto x) { return x == object; });\n        mEditableObjectsByUID.Remove(object->GetID());\n    }\n\n    const Vector<WeakRef<SceneEditableObject>>& Scene::GetAllEditableObjects()\n    {\n        return mEditableObjects;\n    }\n\n    Ref<SceneEditableObject> Scene::GetEditableObjectByID(SceneUID id) const\n    {\n        return mEditableObjectsByUID[id].Lock();\n    }\n\n    int Scene::GetObjectHierarchyIdx(const Ref<SceneEditableObject>& object) const\n    {\n        if (object->GetEditableParent())\n        {\n            return object->GetEditableParent()->GetEditableChildren().IndexOf(object) + GetObjectHierarchyIdx(object->GetEditableParent());\n        }\n\n        return mRootActors.IndexOf([=](const Ref<Actor>& x) { return DynamicCast<SceneEditableObject>(x) == object; });\n    }\n\n    void Scene::ReparentEditableObjects(const Vector<Ref<SceneEditableObject>>& objects,\n                                        const Ref<SceneEditableObject>& newParent, const Ref<SceneEditableObject>& prevObject)\n    {\n        struct Object\n        {\n            Ref<SceneEditableObject> object;\n\n            int   idx;\n            Basis transform;\n\n            bool operator==(const Object& other) const { return object == other.object; }\n        };\n        Vector<Object> objectsDefs;\n\n        for (auto& object : objects)\n        {\n            Object def;\n            def.object = object;\n            def.transform = object->GetTransform();\n            def.idx = o2Scene.GetObjectHierarchyIdx(object);\n            objectsDefs.Add(def);\n\n            object->SetEditableParent(nullptr);\n            mRootActors.Remove(DynamicCast<Actor>(object));\n        }\n\n        objectsDefs.Sort([](auto& a, auto& b) { return a.idx < b.idx; });\n\n        if (newParent)\n        {\n            int insertIdx = newParent->GetEditableChildren().IndexOf(prevObject) + 1;\n\n            for (auto& def : objectsDefs)\n            {\n                newParent->AddEditableChild(def.object, insertIdx++);\n                def.object->SetTransform(def.transform);\n            }\n        }\n        else\n        {\n            int insertIdx = 0;\n\n            if (prevObject)\n            {\n                insertIdx = mRootActors.IndexOf([=](const Ref<Actor>& x) { return DynamicCast<SceneEditableObject>(x) == prevObject; });\n\n                if (insertIdx < 0)\n                    insertIdx = mRootActors.Count();\n                else\n                    insertIdx++;\n            }\n\n            for (auto& def : objectsDefs)\n            {\n                auto actorEditableObject = DynamicCast<Actor>(def.object);\n                if (actorEditableObject)\n                {\n                    mRootActors.Insert(actorEditableObject, insertIdx++);\n                    def.object->OnEditableParentChanged(nullptr);\n                    def.object->SetTransform(def.transform);\n                }\n            }\n        }\n\n        if (newParent)\n            OnObjectChanged(newParent);\n\n        if (prevObject)\n            OnObjectChanged(prevObject);\n    }\n\n    void Scene::CheckChangedObjects()\n    {\n        mChangedObjects.RemoveAll([](auto x) { return x == nullptr; });\n\n        if (mChangedObjects.Count() > 0)\n        {\n            onObjectsChanged(mChangedObjects);\n\n            auto changedObjectsCopy = mChangedObjects;\n            for (auto& obj : changedObjectsCopy)\n                obj->Update(0.0f);\n\n            mChangedObjects.Clear();\n\n            UpdateAddedEntities();\n            UpdateDestroyingEntities();\n        }\n    }\n\n    const Vector<Ref<SceneEditableObject>>& Scene::GetChangedObjects() const\n    {\n        return mChangedObjects;\n    }\n\n    const Vector<WeakRef<SceneEditableObject>>& Scene::GetDrawnEditableObjects() const\n    {\n        return mDrawnObjects;\n    }\n\n    Map<AssetRef<ActorAsset>, Vector<WeakRef<Actor>>>& Scene::GetPrototypesLinksCache()\n    {\n        return mPrototypeLinksCache;\n    }\n\n    void Scene::BeginDrawingScene()\n    {\n        mIsDrawingScene = true;\n        mDrawnObjects.Clear();\n    }\n\n    void Scene::EndDrawingScene()\n    {\n        mIsDrawingScene = false;\n    }\n\n    void Scene::OnObjectAddToScene(const Ref<SceneEditableObject>& object)\n    {\n        onAddedToScene(object);\n        OnObjectChanged(object);\n    }\n\n    void Scene::OnObjectRemoveFromScene(const Ref<SceneEditableObject>& object)\n    {\n        onRemovedFromScene(object);\n        OnObjectChanged(nullptr);\n    }\n\n    void Scene::OnObjectChanged(const Ref<SceneEditableObject>& object)\n    {\n        if (mIsUpdatingScene)\n            return;\n\n        if (PhysicsWorld::IsSingletonInitialzed() && o2Physics.IsUpdatingPhysicsNow())\n            return;\n\n        if (object && object->changedFrame == o2Time.GetCurrentFrame())\n            return;\n\n        if (object)\n            object->changedFrame = o2Time.GetCurrentFrame();\n\n        mChangedObjects.Add(object);\n    }\n\n    void Scene::OnObjectDrawn(const Ref<SceneEditableObject>& object)\n    {\n        if (mIsDrawingScene)\n            mDrawnObjects.Add(object);\n    }\n\n    void Scene::OnActorWithPrototypeCreated(const Ref<Actor>& actor)\n    {\n        auto proto = actor->GetPrototype();\n        OnActorLinkedToPrototype(proto, actor);\n    }\n\n    void Scene::OnActorLinkedToPrototype(AssetRef<ActorAsset>& assetRef, const Ref<Actor>& actor)\n    {\n        if (!mPrototypeLinksCache.ContainsKey(assetRef))\n            mPrototypeLinksCache.Add(assetRef, Vector<WeakRef<Actor>>());\n\n        mPrototypeLinksCache[assetRef].Add(actor);\n    }\n\n    void Scene::OnActorPrototypeBroken(Actor* actor)\n    {\n        // !!! TODO: Optimize this\n        for (auto it = mPrototypeLinksCache.Begin(); it != mPrototypeLinksCache.End();)\n        {\n            it->second.RemoveFirst([=](auto& x) { return x == actor; });\n            if (it->second.IsEmpty())\n            {\n                mPrototypeLinksCache.Remove(it->first);\n                it = mPrototypeLinksCache.Begin();\n            }\n            else it++;\n        }\n    }\n\n#endif\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Scene, o2__Scene);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Scene.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Scene/ComponentLinkRef.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2/Utils/Types/UID.h\"\n\n// Scene graph access macros\n#define o2Scene o2::Scene::Instance()\n\nnamespace o2\n{\n    class Actor;\n    class CameraActor;\n    class Component;\n    class Tag;\n\n    FORWARD_CLASS_REF(SceneLayer);\n\n#if IS_EDITOR\n    class SceneEditableObject;\n#endif\n\n    // -------------------------------------------------------\n    // Actors scene. Contains and manages actors, tags, layers\n    // -------------------------------------------------------\n    class Scene : public Singleton<Scene>, public IObject\n    {\n    public:\n        // Default constructor\n        Scene(RefCounter* refCounter);\n\n        // Destructor\n        ~Scene();\n\n        // Returns scene log stream\n        const LogStream& GetLogStream() const;\n\n        // Checks is layer exists\n        bool HasLayer(const String& name) const;\n\n        // Returns layer by name\n        Ref<SceneLayer> GetLayer(const String& name);\n\n        // Returns default layer\n        const Ref<SceneLayer>& GetDefaultLayer() const;\n\n        // Adds layer with name\n        Ref<SceneLayer> AddLayer(const String& name);\n\n        // Removes layer\n        void RemoveLayer(const Ref<SceneLayer>& layer);\n\n        // Removes layer by name\n        void RemoveLayer(const String& name);\n\n        // Sets layer order\n        void SetLayerOrder(const Ref<SceneLayer>& layer, int idx);\n\n        // Returns layers array\n        const Vector<Ref<SceneLayer>>& GetLayers() const;\n\n        // Returns layers names array\n        Vector<String> GetLayersNames() const;\n\n        // Returns layers map by name\n        const Map<String, WeakRef<SceneLayer>>& GetLayersMap() const;\n\n        // Returns tag with name\n        Ref<Tag> GetTag(const String& name) const;\n\n        // Adds tag with name\n        Ref<Tag> AddTag(const String& name);\n\n        // Removes tag\n        void RemoveTag(const Ref<Tag>& tag);\n\n        // Removes tag with name\n        void RemoveTag(const String& name);\n\n        // Returns tags array\n        const Vector<Ref<Tag>>& GetTags() const;\n\n        // Returns root actors\n        const Vector<Ref<Actor>>& GetRootActors() const;\n\n        // Returns root actors\n        Vector<Ref<Actor>>& GetRootActors();\n\n        // Returns all actors\n        const Vector<WeakRef<Actor>>& GetAllActors() const;\n\n        // Returns all actors\n        Vector<WeakRef<Actor>>& GetAllActors();\n\n        // Returns actor by id\n        Ref<Actor> GetActorByID(SceneUID id) const;\n\n        // Returns asset actor by asset id. Tries to find in cache\n        Ref<Actor> GetAssetActorByID(const UID& id);\n\n        // Returns actor by path (ex \"some node/other/target\")\n        Ref<Actor> FindActor(const String& path);\n\n        // Returns actor with type in scene\n        template<typename _type>\n        Ref<_type> FindActorByType();\n\n        // Returns cameras on scene\n        const Vector<WeakRef<CameraActor>>& GetCameras() const;\n\n        // Returns component with type in scene\n        template<typename _type>\n        Ref<_type> FindActorComponent();\n\n        // Returns all components with type in scene\n        template<typename _type>\n        Vector<Ref<_type>> FindAllActorsComponents();\n\n        // Removes all actors\n        void Clear(bool keepDefaultLayer = true);\n\n        // Clears assets cache\n        void ClearCache();\n\n        // Loads scene from file. If append is true, old actors will not be destroyed\n        void Load(const String& path, bool append = false);\n\n        // Loads scene from document. If append is true, old actors will not be destroyed\n        void Load(const DataDocument& doc, bool append = false);\n\n        // Saves scene into file\n        void Save(const String& path);\n\n        // Saves scene into document\n        void Save(DataDocument& doc);\n\n        // Draws scene drawable objects\n        void Draw();\n\n        // Updates root actors\n        void Update(float dt);\n\n        // Updates root actors with fixed delta time\n        void FixedUpdate(float dt);\n\n        // Updates just added actors and components\n        void UpdateAddedEntities();\n\n        // Updates actors transforms\n        void UpdateTransforms();\n\n        // Updates destroying actors and components\n        void UpdateDestroyingEntities();\n\n        // Adds actor to destroy list, will be removed at next frame\n        void DestroyActor(const Ref<Actor>& actor);\n\n        // Adds component to destroy list, will be removed at next frame\n        void DestroyComponent(const Ref<Component>& component);\n\n        // Returns true if scene updating\n        bool IsUpdating() const;\n\n        // Returns true if scene works in editor\n        bool IsEditor() const;\n\n        IOBJECT(Scene);\n\n    protected:\n        Ref<LogStream> mLog; // Scene log\n\n        Vector<Ref<Actor>> mRootActors; // Scene root actors     \n\n        Vector<WeakRef<CameraActor>> mCameras; // List of cameras on scene\n   \n        Vector<WeakRef<Actor>>        mAllActors; // All scene actors\n        Map<SceneUID, WeakRef<Actor>> mActorsMap; // Actors map by unique ID\n\n        Vector<Ref<Actor>> mAddedActors; // List of added on previous frame actors. Will receive OnAddToScene at current frame\n\n        Vector<Ref<Actor>>     mStartActors;     // List of starting on current frame actors. Will receive OnStart at current frame\n        Vector<Ref<Component>> mStartComponents; // List of starting on current frame components. Will receive OnStart at current frame\n\n        Vector<Ref<Actor>>     mDestroyActors;     // List of destroying on current frame actors\n        Vector<Ref<Component>> mDestroyComponents; // List of destroying on current frame components\n\n        Map<String, WeakRef<SceneLayer>> mLayersMap; // Layers by names map\n        Vector<Ref<SceneLayer>>          mLayers;    // Scene layers\n\n        Ref<SceneLayer> mDefaultLayer; // Default scene layer\n\n        Vector<Ref<Tag>> mTags; // Scene tags\n\n        Vector<AssetRef<ActorAsset>> mAssetsCache; // Cached actors assets\n\n        bool mIsUpdatingScene = false; // Sets true when started updating scene, and false when not\n\n    protected:\n        // Called when actor added to scene, adds to scene deffered\n        static void OnActorCreated(const Ref<Actor>& actor);\n\n        // Called when actor destroyed, removes from scene\n        static void OnActorDestroy(const WeakRef<Actor>& actor);\n\n        // Called when new actor was parented to another actor, removes it from added list\n        static void OnNewActorParented(const Ref<Actor>& actor);\n\n        // Called when actor unique id was changed; updates actors map\n        static void OnActorIdChanged(const Ref<Actor>& actor, SceneUID prevId);\n\n        // Called when actor adding to scene; registers in actors list and events list\n        static void OnAddActorToScene(const Ref<Actor>& actor);\n\n        // Called when actor removing from scene; unregisters from actors list and events list\n        static void OnRemoveActorFromScene(const Ref<Actor>& actor, bool keepEditorObjects = false);\n\n    protected:\n        // Draws cameras\n        void DrawCameras();\n\n        // Updates root actors and their children\n        void UpdateActors(float dt);\n\n        // Updates starting actors and components\n        void UpdateStartingEntities();\n\n        // Draws debug info for actor under cursor\n        void DrawCursorDebugInfo();\n\n        // Called when actor adding to scene; registers in actors list and events list\n        void AddActorToScene(const Ref<Actor>& actor);\n\n        // Called when actor removing from scene; unregisters from actors list and events list\n        void RemoveActorFromScene(const Ref<Actor>& actor, bool keepEditorObjects = false);\n\n        // Called when component added to actor, registers for calling OnAddOnScene\n        void OnComponentAdded(Component* component);\n\n        // Called when component removed, register for calling OnRemovFromScene\n        void OnComponentRemoved(Component* component);\n\n        // Called when scene layer renamed, updates layers map\n        void OnLayerRenamed(SceneLayer* layer, const String& oldName);\n\n        // Called when camera was added to scene\n        void OnCameraAddedOnScene(CameraActor* camera);\n\n        // Called when camera was removed from scene\n        void OnCameraRemovedScene(CameraActor* camera);\n\n        friend class Actor;\n        friend class Application;\n        friend class CameraActor;\n        friend class Component;\n        friend class Component;\n        friend class SceneLayer;\n        friend class Widget;\n        friend class WidgetLayer;\n\n#if IS_EDITOR          \n    public:\n        Function<void(const Ref<SceneEditableObject>&)> onAddedToScene;             // Actor added to scene event\n        Function<void(const Ref<SceneEditableObject>&)> onRemovedFromScene;         // Actor removed from scene event\n        Function<void(const Ref<SceneEditableObject>&)> onEnableChanged;            // Actor enable changing\n        Function<void(const Ref<SceneEditableObject>&)> onLockChanged;              // Actor locking change\n        Function<void(const Ref<SceneEditableObject>&)> onNameChanged;              // Actor name changing event\n        Function<void(const Ref<SceneEditableObject>&)> onChildrenHierarchyChanged; // Actor childs hierarchy change event\n\n        Function<void(const Vector<Ref<SceneEditableObject>>&)> onObjectsChanged; // Actors some change event\n\n        Function<void()> onLayersListChanged; // Called when layer added, removed or renamed\n\n    public:\n        // Links actor recursively to prototypes and their parent prototypes\n        static void LinkActorToPrototypesHierarchy(Ref<Actor> actor, AssetRef<ActorAsset> proto);\n\n        // Sets scene playing in editor\n        void SetEditorPlaying(bool playing);\n\n        // Returns true if scene in editor in play mode\n        bool IsEditorPlaying() const;\n\n        // Sets scene is in editor application (not in a standalone runner).\n        // This distinguishes an editor-host (where edit-time reshape logic is\n        // valid) from a runner that was merely compiled with O2_EDITOR=ON.\n        void SetIsEditor(bool isEditor);\n\n        // Returns root editable objects\n        Vector<Ref<SceneEditableObject>> GetRootEditableObjects();\n\n        // Adds editable object to scene\n        void AddEditableObjectToScene(const Ref<SceneEditableObject>& object);\n\n        // Removes object from scene\n        void RemoveEditableObjectFromScene(const Ref<SceneEditableObject>& object);\n\n        // Returns all editable objects\n        const Vector<WeakRef<SceneEditableObject>>& GetAllEditableObjects();\n\n        // Returns current changed actors\n        const Vector<Ref<SceneEditableObject>>& GetChangedObjects() const;\n\n        // Returns drawn on last frame editable objects\n        const Vector<WeakRef<SceneEditableObject>>& GetDrawnEditableObjects() const;\n\n        // Returns actor by id\n        Ref<SceneEditableObject> GetEditableObjectByID(SceneUID id) const;\n\n        // Returns object's index in hierarchy\n        int GetObjectHierarchyIdx(const Ref<SceneEditableObject>& object) const;\n\n        // Reparent scene editableobjects to new parent at next of prevActor;\n        void ReparentEditableObjects(const Vector<Ref<SceneEditableObject>>& objects,\n                                     const Ref<SceneEditableObject>& newParent, const Ref<SceneEditableObject>& prevObject);\n\n        // Checks is any actors was changed and calls OnChanged() if changed\n        void CheckChangedObjects();\n\n        // Returns cache of linked to prototypes actors\n        Map<AssetRef<ActorAsset>, Vector<WeakRef<Actor>>>& GetPrototypesLinksCache();\n\n        // Called when scene started to draw. When scene draw started, drawn scene objects will be collected\n        void BeginDrawingScene();\n\n        // Called when scene finished draw. After scene objects will not be collected \n        void EndDrawingScene();\n\n        // Called when object was created\n        void OnObjectAddToScene(const Ref<SceneEditableObject>& object);\n\n        // Called when object is destroying\n        void OnObjectRemoveFromScene(const Ref<SceneEditableObject>& object);\n\n        // Called when object was changed\n        void OnObjectChanged(const Ref<SceneEditableObject>& object);\n\n        // Called when object was drawn \n        void OnObjectDrawn(const Ref<SceneEditableObject>& object);\n\n        // Called when created actor with prototype, updates cache\n        void OnActorWithPrototypeCreated(const Ref<Actor>& actor);\n\n        // Called when some actor created and linked to prototype, updates linked actors cache\n        void OnActorLinkedToPrototype(AssetRef<ActorAsset>& assetRef, const Ref<Actor>& actor);\n\n        // Called when actor destroying or prototype link broken, updates cache\n        void OnActorPrototypeBroken(Actor* actor);\n\n    protected:\n        Map<AssetRef<ActorAsset>, Vector<WeakRef<Actor>>> mPrototypeLinksCache; // Cache of linked to prototypes actors\n\n        Vector<Ref<SceneEditableObject>> mChangedObjects;    // Changed actors array\n\n        Vector<WeakRef<SceneEditableObject>>                mEditableObjects;      // All scene editable objects\n        mutable Map<SceneUID, WeakRef<SceneEditableObject>> mEditableObjectsByUID; // All scene editable objects by UID\n\n        Vector<WeakRef<SceneEditableObject>> mDrawnObjects; // List of drawn on last frame editable objects\n\n        bool mIsDrawingScene = false;  // Sets true when started drawing scene, and false when not\n        bool mIsPlaying = false;       // Is scene is in play mode\n        bool mIsEditor = false;        // True only when running inside the editor application\n\n        friend class SceneEditableObject;\n#endif\n    };\n}\n\n//#include \"o2/Scene/Actor.h\"\n\nnamespace o2\n{\n    template<typename _type>\n    Vector<Ref<_type>> Scene::FindAllActorsComponents()\n    {\n        Vector<Ref<_type>> res;\n//         for (auto& actor : mRootActors)\n//             res.Add(actor->GetComponentInChildren<_type>());\n\n        return res;\n    }\n\n    template<typename _type>\n    Ref<_type> Scene::FindActorByType()\n    {\n//         for (auto& actor : mRootActors)\n//         {\n//             if (auto res = dynamic_cast<_type*>(actor))\n//                 return res;\n// \n//             if (auto res = actor->FindChildByType<_type>())\n//                 return res;\n//         }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    Ref<_type> Scene::FindActorComponent()\n    {\n//         for (auto& actor : mRootActors)\n//         {\n//             _type* res = actor->GetComponentInChildren<_type>();\n//             if (res)\n//                 return res;\n//         }\n\n        return nullptr;\n    }\n};\n// --- META ---\n\nCLASS_BASES_META(o2::Scene)\n{\n    BASE_CLASS(o2::Singleton<Scene>);\n    BASE_CLASS(o2::IObject);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Scene)\n{\n    FIELD().PROTECTED().NAME(mLog);\n    FIELD().PROTECTED().NAME(mRootActors);\n    FIELD().PROTECTED().NAME(mCameras);\n    FIELD().PROTECTED().NAME(mAllActors);\n    FIELD().PROTECTED().NAME(mActorsMap);\n    FIELD().PROTECTED().NAME(mAddedActors);\n    FIELD().PROTECTED().NAME(mStartActors);\n    FIELD().PROTECTED().NAME(mStartComponents);\n    FIELD().PROTECTED().NAME(mDestroyActors);\n    FIELD().PROTECTED().NAME(mDestroyComponents);\n    FIELD().PROTECTED().NAME(mLayersMap);\n    FIELD().PROTECTED().NAME(mLayers);\n    FIELD().PROTECTED().NAME(mDefaultLayer);\n    FIELD().PROTECTED().NAME(mTags);\n    FIELD().PROTECTED().NAME(mAssetsCache);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsUpdatingScene);\n#if  IS_EDITOR          \n    FIELD().PUBLIC().NAME(onAddedToScene);\n    FIELD().PUBLIC().NAME(onRemovedFromScene);\n    FIELD().PUBLIC().NAME(onEnableChanged);\n    FIELD().PUBLIC().NAME(onLockChanged);\n    FIELD().PUBLIC().NAME(onNameChanged);\n    FIELD().PUBLIC().NAME(onChildrenHierarchyChanged);\n    FIELD().PUBLIC().NAME(onObjectsChanged);\n    FIELD().PUBLIC().NAME(onLayersListChanged);\n    FIELD().PROTECTED().NAME(mPrototypeLinksCache);\n    FIELD().PROTECTED().NAME(mChangedObjects);\n    FIELD().PROTECTED().NAME(mEditableObjects);\n    FIELD().PROTECTED().NAME(mEditableObjectsByUID);\n    FIELD().PROTECTED().NAME(mDrawnObjects);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsDrawingScene);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsPlaying);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsEditor);\n#endif\n}\nEND_META;\nCLASS_METHODS_META(o2::Scene)\n{\n\n    typedef const Map<String, WeakRef<SceneLayer>>& _tmp1;\n    typedef Map<AssetRef<ActorAsset>, Vector<WeakRef<Actor>>>& _tmp2;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(const LogStream&, GetLogStream);\n    FUNCTION().PUBLIC().SIGNATURE(bool, HasLayer, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneLayer>, GetLayer, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<SceneLayer>&, GetDefaultLayer);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneLayer>, AddLayer, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveLayer, const Ref<SceneLayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveLayer, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayerOrder, const Ref<SceneLayer>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<SceneLayer>>&, GetLayers);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<String>, GetLayersNames);\n    FUNCTION().PUBLIC().SIGNATURE(_tmp1, GetLayersMap);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Tag>, GetTag, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Tag>, AddTag, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTag, const Ref<Tag>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTag, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<Tag>>&, GetTags);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<Actor>>&, GetRootActors);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<Actor>>&, GetRootActors);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<WeakRef<Actor>>&, GetAllActors);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<WeakRef<Actor>>&, GetAllActors);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Actor>, GetActorByID, SceneUID);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Actor>, GetAssetActorByID, const UID&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Actor>, FindActor, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<WeakRef<CameraActor>>&, GetCameras);\n    FUNCTION().PUBLIC().SIGNATURE(void, Clear, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, ClearCache);\n    FUNCTION().PUBLIC().SIGNATURE(void, Load, const String&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Load, const DataDocument&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Save, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Save, DataDocument&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, FixedUpdate, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateAddedEntities);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateTransforms);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateDestroyingEntities);\n    FUNCTION().PUBLIC().SIGNATURE(void, DestroyActor, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, DestroyComponent, const Ref<Component>&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUpdating);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEditor);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(void, OnActorCreated, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(void, OnActorDestroy, const WeakRef<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(void, OnNewActorParented, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(void, OnActorIdChanged, const Ref<Actor>&, SceneUID);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(void, OnAddActorToScene, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE_STATIC(void, OnRemoveActorFromScene, const Ref<Actor>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawCameras);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateActors, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateStartingEntities);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawCursorDebugInfo);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddActorToScene, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveActorFromScene, const Ref<Actor>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentAdded, Component*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnComponentRemoved, Component*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerRenamed, SceneLayer*, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCameraAddedOnScene, CameraActor*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCameraRemovedScene, CameraActor*);\n#if  IS_EDITOR          \n    FUNCTION().PUBLIC().SIGNATURE_STATIC(void, LinkActorToPrototypesHierarchy, Ref<Actor>, AssetRef<ActorAsset>);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEditorPlaying, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEditorPlaying);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIsEditor, bool);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<SceneEditableObject>>, GetRootEditableObjects);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEditableObjectToScene, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveEditableObjectFromScene, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<WeakRef<SceneEditableObject>>&, GetAllEditableObjects);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<SceneEditableObject>>&, GetChangedObjects);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<WeakRef<SceneEditableObject>>&, GetDrawnEditableObjects);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableObjectByID, SceneUID);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetObjectHierarchyIdx, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ReparentEditableObjects, const Vector<Ref<SceneEditableObject>>&, const Ref<SceneEditableObject>&, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, CheckChangedObjects);\n    FUNCTION().PUBLIC().SIGNATURE(_tmp2, GetPrototypesLinksCache);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginDrawingScene);\n    FUNCTION().PUBLIC().SIGNATURE(void, EndDrawingScene);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnObjectAddToScene, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnObjectRemoveFromScene, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnObjectChanged, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnObjectDrawn, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnActorWithPrototypeCreated, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnActorLinkedToPrototype, AssetRef<ActorAsset>&, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnActorPrototypeBroken, Actor*);\n#endif\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/SceneLayer.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SceneLayer.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/ISceneDrawable.h\"\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n    SceneLayer::SceneLayer()\n    {\n        mRootDrawables = mmake<SceneLayerRootDrawablesContainer>();\n        RegisterDrawable(mRootDrawables.Get());\n    }\n\n    void SceneLayer::SetName(const String& name)\n    {\n        String oldName = mName;\n        mName = name;\n\n        o2Scene.OnLayerRenamed(this, oldName);\n    }\n\n    const String& SceneLayer::GetName() const\n    {\n        return mName;\n    }\n\n    const Vector<Ref<ISceneDrawable>>& SceneLayer::GetDrawables() const\n    {\n        return mDrawables;\n    }\n\n    const Ref<SceneLayerRootDrawablesContainer>& SceneLayer::GetRootDrawables()\n    {\n        return mRootDrawables;\n    }\n\n    void SceneLayer::RegisterDrawable(ISceneDrawable* drawable)\n    {\n        const int binSearchRangeSizeStop = 5;\n        int rangeMin = 0, rangeMax = mDrawables.Count();\n        float targetDepth = drawable->mDrawingDepth;\n        int position = 0;\n        bool skipLinearSearch = false;\n\n        while (rangeMax - rangeMin > binSearchRangeSizeStop)\n        {\n            int center = (rangeMin + rangeMax) >> 1;\n\n            float centerValue = mDrawables[center]->mDrawingDepth;\n\n            if (targetDepth < centerValue)\n                rangeMax = center;\n            else if (targetDepth > centerValue)\n                rangeMin = center;\n            else\n            {\n                position = center;\n                skipLinearSearch = true;\n                break;\n            }\n        }\n\n        if (!skipLinearSearch)\n        {\n            for (position = rangeMin; position < rangeMax; position++)\n                if (mDrawables[position]->mDrawingDepth > targetDepth)\n                    break;\n        }\n\n        mDrawables.Insert(Ref(drawable), position);\n    }\n\n    void SceneLayer::UnregisterDrawable(ISceneDrawable* drawable)\n    {\n        mDrawables.Remove(Ref(drawable));\n    }\n\n    void SceneLayer::SetLastByDepth(const Ref<ISceneDrawable>& drawable)\n    {\n        mDrawables.Remove(drawable);\n\n        for (int position = 0; position < mDrawables.Count(); position++)\n        {\n            if (mDrawables[position]->mDrawingDepth > drawable->mDrawingDepth)\n            {\n                mDrawables.Insert(drawable, position);\n                return;\n            }\n        }\n\n        mDrawables.Add(drawable);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::SceneLayer, o2__SceneLayer);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/SceneLayer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Actor;\n\n    FORWARD_CLASS_REF(SceneLayerRootDrawablesContainer);\n    FORWARD_CLASS_REF(ISceneDrawable);\n\n    // --------------------------------------------------------------------------------\n    // Scene layer. It contains Actors and their Drawable parts, managing sorting order\n    // --------------------------------------------------------------------------------\n    class SceneLayer: public ISerializable, public RefCounterable, public ICloneableRef\n    {\n    public:\n#if IS_EDITOR\n        bool visible = true; // Is layer visible in editor\n#endif\n\n    public:\n        // Default constructor\n        SceneLayer();\n\n        // Sets layer name\n        void SetName(const String& name);\n\n        // Returns layer name\n        const String& GetName() const;\n\n        // Returns all drawable objects of actors in layer\n        const Vector<Ref<ISceneDrawable>>& GetDrawables() const;\n\n        // Returns root drawable objects of actors in layer\n        const Ref<SceneLayerRootDrawablesContainer>& GetRootDrawables();\n\n        SERIALIZABLE(SceneLayer);\n        CLONEABLE_REF(SceneLayer);\n\n    protected:\n        String mName; // Name of layer @SERIALIZABLE\n\n        Vector<Ref<ISceneDrawable>> mDrawables; // Drawable objects in layer\n\n        Ref<SceneLayerRootDrawablesContainer> mRootDrawables; // Root drawables with inherited depth. Draws at 0 priority\n\n    protected:\n        // Registers drawable object\n        void RegisterDrawable(ISceneDrawable* drawable);\n\n        // Unregisters drawable object\n        void UnregisterDrawable(ISceneDrawable* drawable);\n\n        // Sets drawable order as last of all objects with same depth\n        void SetLastByDepth(const Ref<ISceneDrawable>& drawable);\n\n        friend class Actor;\n        friend class CameraActor;\n        friend class Component;\n        friend class Scene;\n        friend class ISceneDrawable;\n        friend class Widget;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::SceneLayer)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SceneLayer)\n{\n#if  IS_EDITOR\n    FIELD().PUBLIC().DEFAULT_VALUE(true).NAME(visible);\n#endif\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mName);\n    FIELD().PROTECTED().NAME(mDrawables);\n    FIELD().PROTECTED().NAME(mRootDrawables);\n}\nEND_META;\nCLASS_METHODS_META(o2::SceneLayer)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<ISceneDrawable>>&, GetDrawables);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<SceneLayerRootDrawablesContainer>&, GetRootDrawables);\n    FUNCTION().PROTECTED().SIGNATURE(void, RegisterDrawable, ISceneDrawable*);\n    FUNCTION().PROTECTED().SIGNATURE(void, UnregisterDrawable, ISceneDrawable*);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetLastByDepth, const Ref<ISceneDrawable>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/SceneLayerRef.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SceneLayerRef.h\"\n\nnamespace o2\n{    \n}\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/SceneLayerRef.h",
    "content": "#pragma once\n\nnamespace o2\n{\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/SceneLayersList.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SceneLayersList.h\"\n#include \"Scene.h\"\n\nnamespace o2\n{\n    SceneLayersList::SceneLayersList()\n    {}\n\n    SceneLayersList::SceneLayersList(const Vector<Ref<SceneLayer>>& layers)\n    {\n        mAllLayers = o2Scene.GetLayers() == layers;\n        mLayers = layers.Convert<String>([](const Ref<SceneLayer>& x) { return x->GetName(); });\n    }\n\n    SceneLayersList::SceneLayersList(const Vector<String>& layers):\n        mLayers(layers), mAllLayers(false)\n    {\n        mAllLayers = mLayers == o2Scene.GetLayersNames();\n    }\n\n    SceneLayersList::SceneLayersList(const SceneLayersList& other):\n        mLayers(other.mLayers), mAllLayers(other.mAllLayers)\n    {}\n\n    bool SceneLayersList::operator==(const SceneLayersList& other) const\n    {\n        if (mAllLayers && other.mAllLayers)\n            return true;\n\n        return GetLayers() == other.GetLayers();\n    }\n\n    bool SceneLayersList::operator!=(const SceneLayersList& other) const\n    {\n        return !(*this == other);\n    }\n\n    SceneLayersList& SceneLayersList::operator=(const SceneLayersList& other)\n    {\n        mLayers = other.mLayers;\n        mAllLayers = other.mAllLayers;\n\n        return *this;\n    }\n\n    bool SceneLayersList::HasLayer(const Ref<SceneLayer>& layer) const\n    {\n        return mAllLayers || mLayers.Contains(layer->GetName());\n    }\n\n    bool SceneLayersList::HasLayer(const String& layerName) const\n    {\n        return mAllLayers || mLayers.Contains(layerName);\n    }\n\n    void SceneLayersList::AddLayer(const Ref<SceneLayer>& layer)\n    {\n        mLayers.Add(layer->GetName());\n        mAllLayers = false;\n    }\n\n    void SceneLayersList::AddLayer(const String& layerName)\n    {\n        mLayers.Add(layerName);\n        mAllLayers = false;\n    }\n\n    void SceneLayersList::RemoveLayer(const Ref<SceneLayer>& layer)\n    {\n        mLayers.Remove(layer->GetName());\n        mAllLayers = false;\n    }\n\n    void SceneLayersList::RemoveLayer(const String& layerName)\n    {\n        mLayers.Remove(layerName);\n        mAllLayers = false;\n    }\n\n    void SceneLayersList::SetLayers(const Vector<Ref<SceneLayer>>& layers)\n    {\n        mLayers = layers.Convert<String>([](const Ref<SceneLayer>& x) { return x->GetName(); });\n        mAllLayers = false;\n    }\n\n    void SceneLayersList::SetLayers(const Vector<String>& layerNames)\n    {\n        mLayers = layerNames;\n        mAllLayers = false;\n    }\n\n    void SceneLayersList::SetAllLayers()\n    {\n        mAllLayers = true;\n    }\n\n    Vector<Ref<SceneLayer>> SceneLayersList::GetLayers() const\n    {\n        if (mAllLayers)\n            return o2Scene.GetLayers();\n\n        return mLayers.Convert<Ref<SceneLayer>>([](const String& x) { return o2Scene.GetLayer(x); });\n    }\n\n    const Vector<String>& SceneLayersList::GetLayersNames() const\n    {\n        if (mAllLayers)\n            mLayers = o2Scene.GetLayersNames();\n\n        return mLayers;\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::SceneLayersList, o2__SceneLayersList);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/SceneLayersList.h",
    "content": "#pragma once\n#include \"o2/Scene/SceneLayer.h\"\n\nnamespace o2\n{\n    // -----------------\n    // Scene layers list\n    // -----------------\n    class SceneLayersList: public ISerializable\n    {\n    public:\n        // Default constructor\n        SceneLayersList();\n\n        // Constructor from layers list\n        SceneLayersList(const Vector<Ref<SceneLayer>>& layers);\n\n        // Constructor from layers list\n        SceneLayersList(const Vector<String>& layers);\n\n        // Copy-constructor\n        SceneLayersList(const SceneLayersList& other);\n\n        // Equals operator\n        SceneLayersList& operator=(const SceneLayersList& other);\n\n        // Check equals operator\n        bool operator==(const SceneLayersList& other) const;\n\n        // Check not equals operator\n        bool operator!=(const SceneLayersList& other) const;\n\n        // Checks has layer\n        bool HasLayer(const Ref<SceneLayer>& layer) const;\n\n        // Checks has layer\n        bool HasLayer(const String& layerName) const;\n\n        // Adds layer\n        void AddLayer(const Ref<SceneLayer>& layer);\n\n        // Adds layer\n        void AddLayer(const String& layerName);\n\n        // Removes layer\n        void RemoveLayer(const Ref<SceneLayer>& layer);\n\n        // Removes layer\n        void RemoveLayer(const String& layerName);\n\n        // Sets layers list\n        void SetLayers(const Vector<Ref<SceneLayer>>& layers);\n\n        // Sets layers list\n        void SetLayers(const Vector<String>& layerNames);\n\n        // Sets all exisitng layers. After adding new layers will contain all new layers\n        void SetAllLayers();\n\n        // Returns layers list\n        Vector<Ref<SceneLayer>> GetLayers() const;\n\n        // Returns layers list\n        const Vector<String>& GetLayersNames() const;\n\n        SERIALIZABLE(SceneLayersList);\n\n    protected:\n        bool mAllLayers = true; // When this is true, the list always returns all existing layers\n\n        mutable Vector<String> mLayers; // Scene layers names list @SERIALIZABLE\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::SceneLayersList)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SceneLayersList)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mAllLayers);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mLayers);\n}\nEND_META;\nCLASS_METHODS_META(o2::SceneLayersList)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Ref<SceneLayer>>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<String>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const SceneLayersList&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, HasLayer, const Ref<SceneLayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, HasLayer, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddLayer, const Ref<SceneLayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddLayer, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveLayer, const Ref<SceneLayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveLayer, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayers, const Vector<Ref<SceneLayer>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayers, const Vector<String>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAllLayers);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<SceneLayer>>, GetLayers);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<String>&, GetLayersNames);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Tags.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Tags.h\"\n\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n\n    Tag::Tag()\n    {}\n\n    Tag::Tag(const String& name):\n        mName(name)\n    {}\n\n    Tag::~Tag()\n    {\n        Clear();\n    }\n\n    const String& Tag::GetName() const\n    {\n        return mName;\n    }\n\n    void Tag::SetName(const String& name)\n    {\n        if (o2Scene.GetTag(name))\n        {\n            o2Debug.LogWarning(\"Can't rename tag \" + mName + \" to \" + name + \": already exist tag with same name\");\n            return;\n        }\n\n        mName = name;\n    }\n\n    void Tag::AddActor(const Ref<Actor>& actor)\n    {\n        if (mActors.Contains(actor))\n            return;\n\n        mActors.Add(actor);\n        actor->tags.mTags.Add(Ref(this));\n    }\n\n    void Tag::RemoveActor(const Ref<Actor>& actor)\n    {\n        if (!actor)\n            return;\n\n        mActors.Remove(actor);\n        actor->tags.mTags.Remove(Ref(this));\n    }\n\n    void Tag::Clear()\n    {\n        for (auto& actor : mActors)\n            actor.Lock()->tags.mTags.Remove(Ref(this));\n\n        mActors.Clear();\n    }\n\n    Tag& Tag::operator-=(const Ref<Actor>& actor)\n    {\n        RemoveActor(actor);\n        return *this;\n    }\n\n    Tag& Tag::operator+=(const Ref<Actor>& actor)\n    {\n        AddActor(actor);\n        return *this;\n    }\n\n    TagGroup::TagGroup()\n    {}\n\n    TagGroup::TagGroup(const TagGroup& other):\n        mTags(other.mTags)\n    {}\n\n    TagGroup::~TagGroup()\n    {}\n\n    TagGroup& TagGroup::operator=(const TagGroup& other)\n    {\n        Clear();\n\n        mTags = other.mTags;\n\n        for (auto& tag : mTags)\n            onTagAdded(tag.Lock());\n\n        return *this;\n    }\n\n    bool TagGroup::operator==(const TagGroup& other) const\n    {\n        for (auto& tag : mTags) {\n            if (!other.IsHaveTag(tag.Lock()))\n                return false;\n        }\n\n        return true;\n    }\n\n    bool TagGroup::operator!=(const TagGroup& other) const\n    {\n        return !(*this == other);\n    }\n\n    void TagGroup::AddTag(const String& name)\n    {\n        auto tag = o2Scene.GetTag(name);\n\n        if (!tag)\n            tag = o2Scene.AddTag(name);\n\n        AddTag(tag);\n    }\n\n    void TagGroup::AddTag(const Ref<Tag>& tag)\n    {\n        if (!tag || mTags.Contains(tag))\n            return;\n\n        mTags.Add(tag);\n        onTagAdded(tag);\n    }\n\n    void TagGroup::RemoveTag(const String& name)\n    {\n        auto tag = o2Scene.GetTag(name);\n\n        if (!tag)\n        {\n            o2Debug.LogWarning(\"Can't remove tag with name \" + name + \" from group: isn't exist\");\n            return;\n        }\n\n        RemoveTag(tag);\n    }\n\n    void TagGroup::RemoveTag(const Ref<Tag>& tag)\n    {\n        if (!tag || !mTags.Contains(tag))\n            return;\n\n        mTags.Remove(tag);\n        onTagRemoved(tag);\n    }\n\n    void TagGroup::Clear()\n    {\n        for (auto& tag : mTags)\n            onTagRemoved(tag.Lock());\n\n        mTags.Clear();\n    }\n\n    bool TagGroup::IsHaveTag(const String& name) const\n    {\n        return mTags.Contains([&](auto x) { return x.Lock()->GetName() == name; });\n    }\n\n    bool TagGroup::IsHaveTag(const Ref<Tag>& tag) const\n    {\n        return mTags.Contains(tag);\n    }\n\n    const Vector<WeakRef<Tag>>& TagGroup::GetTags() const\n    {\n        return mTags;\n    }\n\n    Vector<String> TagGroup::GetTagsNames() const\n    {\n        return mTags.Convert<String>([](auto x) { return x.Lock()->GetName(); });\n    }\n\n    TagGroup& TagGroup::operator-=(const Ref<Tag>& tag)\n    {\n        RemoveTag(tag);\n        return *this;\n    }\n\n    TagGroup& TagGroup::operator-=(const String& name)\n    {\n        RemoveTag(name);\n        return *this;\n    }\n\n    TagGroup& TagGroup::operator+=(const Ref<Tag>& tag)\n    {\n        AddTag(tag);\n        return *this;\n    }\n\n    TagGroup& TagGroup::operator+=(const String& name)\n    {\n        AddTag(name);\n        return *this;\n    }\n\n//     void TagDataValueConverter::ToData(void* object, DataValue& data)\n//     {\n//         if (object)\n//         {\n//             Tag* value = (Tag*)object;\n//             data = value->GetName();\n//         }\n//     }\n// \n//     void TagDataValueConverter::FromData(void* object, const DataValue& data)\n//     {\n//         Tag*& value = *(Tag**)object;\n//         value = o2Scene.GetTag(data);\n//     }\n// \n//     bool TagDataValueConverter::IsConvertsType(const Type* type) const\n//     {\n//         return type == &TypeOf(Tag);\n//     }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Tag, o2__Tag);\n\nDECLARE_CLASS(o2::TagGroup, o2__TagGroup);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/Tags.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Actor;\n\n    // ---------\n    // Scene tag\n    // ---------\n    class Tag: public ISerializable, public RefCounterable\n    {\n    public:\n        // Default constructor\n        Tag();\n\n        // Constructor with name\n        Tag(const String& name);\n\n        // Destructor\n        ~Tag();\n\n        // Returns tag name\n        const String& GetName() const;\n\n        // Sets tag name\n        void SetName(const String& name);\n\n        // Adds actor\n        void AddActor(const Ref<Actor>& actor);\n\n        // Removes actor\n        void RemoveActor(const Ref<Actor>& actor);\n\n        // Removes all actors\n        void Clear();\n\n        // Adds actor\n        Tag& operator+=(const Ref<Actor>& actor);\n\n        // Removes actor\n        Tag& operator-=(const Ref<Actor>& actor);\n\n        SERIALIZABLE(Tag);\n\n    protected:\n        String mName; // Tag name @SERIALIZABLE\n\n        Vector<WeakRef<Actor>> mActors; // Actors in layer\n\n        friend class Actor;\n    };\n\n    // ----------\n    // Tags group\n    // ----------\n    class TagGroup: public ISerializable\n    {\n    public:\n        Function<void(const Ref<Tag>&)> onTagAdded;\n        Function<void(const Ref<Tag>&)> onTagRemoved;\n\n    public:\n        // Default constructor\n        TagGroup();\n\n        // Copy-constructor\n        TagGroup(const TagGroup& other);\n\n        // Destructor\n        ~TagGroup();\n\n        // Copy-operator\n        TagGroup& operator=(const TagGroup& other);\n\n        // Check equals operator\n        bool operator==(const TagGroup& other) const;\n\n        // Check not equals operator\n        bool operator!=(const TagGroup& other) const;\n\n        // Adds tag\n        void AddTag(const String& name);\n\n        // Adds tag\n        void AddTag(const Ref<Tag>& tag);\n\n        // Removes tag\n        void RemoveTag(const String& name);\n\n        // Removes tag\n        void RemoveTag(const Ref<Tag>& tag);\n\n        // Removes all tags\n        void Clear();\n\n        // Returns is have tag with name\n        bool IsHaveTag(const String& name) const;\n\n        // Returns is have tag\n        bool IsHaveTag(const Ref<Tag>& tag) const;\n\n        // Returns tags array\n        const Vector<WeakRef<Tag>>& GetTags() const;\n\n        // Returns tags names array\n        Vector<String> GetTagsNames() const;\n\n        // Adds tag\n        TagGroup& operator+=(const String& name);\n\n        // Adds tag\n        TagGroup& operator+=(const Ref<Tag>& tag);\n\n        // Removes tag\n        TagGroup& operator-=(const String& name);\n\n        // Removes tag\n        TagGroup& operator-=(const Ref<Tag>& tag);\n\n        SERIALIZABLE(TagGroup);\n\n    private:\n        Vector<WeakRef<Tag>> mTags; // @SERIALIZABLE\n\n        friend class Tag;\n    };\n\n    // -----------------------\n    // Tag data node converter\n    // -----------------------\n//     class TagDataValueConverter: public IDataValueTypeConverter\n//     {\n//     public:\n//         // Converts tag pointer to data \n//         void ToData(void* object, DataValue& data);\n// \n//         // Gets tag pointer from data\n//         void FromData(void* object, const DataValue& data);\n// \n//         // Checks that type is tag's type\n//         bool IsConvertsType(const Type* type) const;\n//     };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Tag)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Tag)\n{\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mName);\n    FIELD().PROTECTED().NAME(mActors);\n}\nEND_META;\nCLASS_METHODS_META(o2::Tag)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const String&);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddActor, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveActor, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Clear);\n}\nEND_META;\n\nCLASS_BASES_META(o2::TagGroup)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::TagGroup)\n{\n    FIELD().PUBLIC().NAME(onTagAdded);\n    FIELD().PUBLIC().NAME(onTagRemoved);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mTags);\n}\nEND_META;\nCLASS_METHODS_META(o2::TagGroup)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const TagGroup&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddTag, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddTag, const Ref<Tag>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTag, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveTag, const Ref<Tag>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Clear);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsHaveTag, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsHaveTag, const Ref<Tag>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<WeakRef<Tag>>&, GetTags);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<String>, GetTagsNames);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/UIManager.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"UIManager.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/FolderAsset.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/CustomDropDown.h\"\n#include \"o2/Scene/UI/Widgets/CustomList.h\"\n#include \"o2/Scene/UI/Widgets/DropDown.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/EditBoxDropDown.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalProgress.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/List.h\"\n#include \"o2/Scene/UI/Widgets/PopupWidget.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n#include \"o2/Scene/UI/Widgets/Toggle.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Scene/UI/Widgets/VerticalProgress.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/Window.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/StringUtils.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n#include \"o2/Events/EventSystem.h\"\n\n#undef CreateWindow\n\nnamespace o2\n{\n    DECLARE_SINGLETON(UIManager);\n\n    FORWARD_REF_IMPL(Button);\n    FORWARD_REF_IMPL(CustomDropDown);\n    FORWARD_REF_IMPL(CustomList);\n    FORWARD_REF_IMPL(DropDown);\n    FORWARD_REF_IMPL(EditBox);\n    FORWARD_REF_IMPL(EditBoxDropDown);\n    FORWARD_REF_IMPL(HorizontalLayout);\n    FORWARD_REF_IMPL(HorizontalProgress);\n    FORWARD_REF_IMPL(HorizontalScrollBar);\n    FORWARD_REF_IMPL(Image);\n    FORWARD_REF_IMPL(Label);\n    FORWARD_REF_IMPL(List);\n    FORWARD_REF_IMPL(ScrollArea);\n    FORWARD_REF_IMPL(Toggle);\n    FORWARD_REF_IMPL(VerticalProgress);\n    FORWARD_REF_IMPL(VerticalScrollBar);\n    FORWARD_REF_IMPL(Widget);\n    FORWARD_REF_IMPL(Window);\n\n    void UIManager::RegisterFocusableWidget(Widget* widget)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        Instance().mFocusableWidgets.Add(Ref(widget));\n    }\n\n    void UIManager::UnregisterFocusableWidget(Widget* widget)\n    {\n        if (!IsSingletonInitialzed())\n            return;\n\n        Instance().mFocusableWidgets.RemoveFirst([&](auto& x) { return x == widget; });\n    }\n\n    UIManager::UIManager(RefCounter* refCounter):\n        Singleton<UIManager>(refCounter)\n    {\n        mLog = mmake<LogStream>(\"UI\");\n        o2Debug.GetLog()->BindStream(mLog);\n    }\n\n    UIManager::~UIManager()\n    {\n        ClearStyle();\n    }\n\n    void UIManager::FocusWidget(const Ref<Widget>& widget)\n    {\n        if (mFocusedWidget == widget || (widget && !widget->IsFocusable()))\n            return;\n\n        if (mFocusedWidget)\n        {\n            auto lastFocusedWidget = mFocusedWidget;\n            mFocusedWidget = nullptr;\n\n            lastFocusedWidget->mIsFocused = false;\n\n            auto focusedIdx = mLastFocusedWidgets.IndexOf(lastFocusedWidget);\n            if (focusedIdx >= 0)\n                mLastFocusedWidgets.RemoveAt(focusedIdx);\n            else\n                mLastUnfocusedWidgets.Add(lastFocusedWidget);\n\n            if (lastFocusedWidget->mFocusedState)\n                lastFocusedWidget->mFocusedState->SetState(false);\n        }\n\n        mFocusedWidget = widget;\n\n        if (mFocusedWidget)\n        {\n            mFocusedWidget->mIsFocused = true;\n\n            auto unfocusedIdx = mLastUnfocusedWidgets.IndexOf(mFocusedWidget);\n            if (unfocusedIdx >= 0)\n                mLastUnfocusedWidgets.RemoveAt(unfocusedIdx);\n            else\n                mLastFocusedWidgets.Add(mFocusedWidget);\n\n            if (mFocusedWidget->mParentWidget)\n                mFocusedWidget->mParentWidget.Lock()->OnChildFocused(mFocusedWidget);\n\n            if (mFocusedWidget->mFocusedState)\n                mFocusedWidget->mFocusedState->SetState(true);\n        }\n    }\n\n    Ref<Widget> UIManager::GetFocusedWidget() const\n    {\n        return mFocusedWidget;\n    }\n\n    void UIManager::FocusNextWidget()\n    {\n        bool fnd = mFocusedWidget == nullptr;\n        Ref<Widget> nextFocusingWidget;\n        for (auto& widget : mFocusableWidgets)\n        {\n            if (!fnd)\n            {\n                if (widget == mFocusedWidget)\n                    fnd = true;\n            }\n            else\n            {\n                if (widget->IsFocusable())\n                {\n                    nextFocusingWidget = widget;\n                    break;\n                }\n            }\n        }\n\n        FocusWidget(nextFocusingWidget);\n    }\n\n    void UIManager::LoadStyle(const String& stylesPath)\n    {\n        ClearStyle();\n\n        AssetRef<FolderAsset> folder(stylesPath);\n        for (auto& subAsset : folder->GetChildrenAssets())\n        {\n            if (auto actorAsset = DynamicCast<ActorAsset>(subAsset.GetRef()))\n                mStyleSamples.Add(actorAsset);\n        }\n    }\n\n    void UIManager::SaveStyle(const String& stylesPath)\n    {\n        for (auto& asset : mStyleSamples)\n        {\n#if IS_EDITOR\n            asset->SetEditorAsset(true);\n#endif\n\n            auto path = stylesPath + \"/\" + GetSmartName(asset->GetActor()->GetType().GetName()).ReplacedAll(\":\", \"\") + \" \" +\n                asset->GetActor()->GetName() + \".proto\";\n\n            asset->Save(path);\n        }\n    }\n\n    void UIManager::ClearStyle()\n    {\n        mStyleSamples.Clear();\n    }\n\n    void UIManager::AddWidgetStyle(const Ref<Widget>& widget, const String& style)\n    {\n        widget->SetName(style);\n        mStyleSamples.Add(mmake<ActorAsset>(widget));\n    }\n\n    Ref<Widget> UIManager::CreateWidget(const Type& type, const String& style /*= \"standard\"*/)\n    {\n        auto sample = GetWidgetStyle(type, style);\n        if (!sample)\n            sample = GetWidgetStyle(type, \"standard\");\n\n        Ref<Widget> res;\n\n        if (sample)\n            res = sample->CloneAsRef<Widget>();\n        else\n            res = DynamicCast<Widget>(type.CreateSampleRef());\n\n        if (type != TypeOf(ContextMenu))\n            res->SetEnabledForcible(true);\n\n        return res;\n    }\n\n    Ref<Widget> UIManager::GetWidgetStyle(const Type& type, const String& style)\n    {\n        for (auto& styleWidget : mStyleSamples)\n        {\n            if (type == styleWidget->GetActor()->GetType())\n            {\n                if (style == styleWidget->GetActor()->GetName())\n                    return DynamicCast<Widget>(styleWidget->GetActor());\n            }\n        }\n\n        return nullptr;\n    }\n\n    Ref<Button> UIManager::CreateButton(const WString& caption, const Function<void()>& onClick /*= Function<void()>()*/,\n                                        const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<Button>(style);\n        res->caption = caption;\n        res->name = caption + \" button\";\n        res->onClick = onClick;\n        return res;\n    }\n\n    Ref<Window> UIManager::CreateWindow(const WString& caption, const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<Window>(style);\n        res->caption = caption;\n        res->name = caption + \" window\";\n        return res;\n    }\n\n    Ref<Label> UIManager::CreateLabel(const WString& text, const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<Label>(style);\n        res->text = text;\n        res->name = text + \" label\";\n        res->horOverflow = Label::HorOverflow::Dots;\n        return res;\n    }\n\n    Ref<HorizontalLayout> UIManager::CreateHorLayout()\n    {\n        auto res = mmake<HorizontalLayout>();\n        res->name = \"horizontal layout\";\n        *res->layout = WidgetLayout::BothStretch();\n        return res;\n    }\n\n    Ref<VerticalLayout> UIManager::CreateVerLayout()\n    {\n        auto res = mmake<VerticalLayout>();\n        res->name = \"vertical layout\";\n        *res->layout = WidgetLayout::BothStretch();\n        return res;\n    }\n\n    Ref<HorizontalProgress> UIManager::CreateHorProgress(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<HorizontalProgress>(style);\n        res->name = \"horizontal progress\";\n        return res;\n    }\n\n    Ref<VerticalProgress> UIManager::CreateVerProgress(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<VerticalProgress>(style);\n        res->name = \"vertical progress\";\n        return res;\n    }\n\n    Ref<HorizontalScrollBar> UIManager::CreateHorScrollBar(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<HorizontalScrollBar>(style);\n        res->name = \"horizontal scroll bar\";\n        return res;\n    }\n\n    Ref<VerticalScrollBar> UIManager::CreateVerScrollBar(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<VerticalScrollBar>(style);\n        res->name = \"vertical scroll bar\";\n        return res;\n    }\n\n    Ref<ScrollArea> UIManager::CreateScrollArea(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<ScrollArea>(style);\n        res->name = \"scroll area\";\n        return res;\n    }\n\n    Ref<EditBox> UIManager::CreateEditBox(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<EditBox>(style);\n        res->name = \"edit box\";\n        return res;\n    }\n\n    Ref<CustomList> UIManager::CreateCustomList(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<CustomList>(style);\n        res->name = \"custom list\";\n        return res;\n    }\n\n    Ref<List> UIManager::CreateList(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<List>(style);\n        res->name = \"list\";\n        return res;\n    }\n\n    Ref<CustomDropDown> UIManager::CreateCustomDropdown(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<CustomDropDown>(style);\n        res->name = \"custom dropdown\";\n        return res;\n    }\n\n    Ref<DropDown> UIManager::CreateDropdown(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<DropDown>(style);\n        res->name = \"dropdown\";\n        return res;\n    }\n\n    Ref<EditBoxDropDown> UIManager::CreateEditBoxDropDown(const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<EditBoxDropDown>(style);\n        res->name = \"editbox dropdown\";\n        return res;\n    }\n\n    Ref<Toggle> UIManager::CreateToggle(const WString& caption, const String& style /*= \"standard\"*/)\n    {\n        auto res = CreateWidget<Toggle>(style);\n        res->caption = caption;\n        res->name = caption + \" toggle\";\n        return res;\n    }\n\n    Ref<Image> UIManager::CreateImage(const String& name)\n    {\n        auto res = mmake<Image>();\n        res->name = name;\n        res->SetImageName(name);\n        return res;\n    }\n\n    void UIManager::DrawCurrentLayerTopWidgets()\n    {\n\t\tauto currentLayer = o2Events.GetCurrentCursorAreaEventsLayer();\n        \n\t\tauto& topWidgetsAtLayer = mTopWidgets[currentLayer];\n        for (auto& widget : topWidgetsAtLayer)\n            widget->Draw();\n\n        topWidgetsAtLayer.Clear();\n\n        if (PopupWidget::mVisiblePopup && PopupWidget::mVisiblePopup.Lock()->GetCurrentDrawingLayer() == currentLayer)\n            PopupWidget::mVisiblePopup.Lock()->SpecialDraw();\n\n        if (o2Input.IsKeyPressed(VK_TAB))\n            FocusNextWidget();\n    }\n\n    void UIManager::Update()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        for (auto& widget : mLastFocusedWidgets)\n            widget->OnFocused();\n\n        for (auto& widget : mLastUnfocusedWidgets)\n            widget->OnUnfocused();\n\n        mLastFocusedWidgets.Clear();\n        mLastUnfocusedWidgets.Clear();\n    }\n\n    void UIManager::DrawWidgetAtTop(const Ref<Widget>& widget)\n    {\n        mTopWidgets[o2Events.GetCurrentCursorAreaEventsLayer()].Add(widget);\n    }\n\n    const Vector<AssetRef<ActorAsset>>& UIManager::GetWidgetStyles() const\n    {\n        return mStyleSamples;\n    }\n\n    void UIManager::TryLoadStyle()\n    {\n        if (o2Assets.IsAssetExist(\"ui_style.json\"))\n            LoadStyle(\"ui_style.json\");\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/UIManager.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ActorAsset.h\"\n#include \"o2/Events/CursorAreaEventsListenersLayer.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\n// User interfaces manager access macros\n#define o2UI UIManager::Instance()\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(Button);\n    FORWARD_CLASS_REF(CustomDropDown);\n    FORWARD_CLASS_REF(CustomList);\n    FORWARD_CLASS_REF(DropDown);\n    FORWARD_CLASS_REF(EditBox);\n    FORWARD_CLASS_REF(EditBoxDropDown);\n    FORWARD_CLASS_REF(HorizontalLayout);\n    FORWARD_CLASS_REF(HorizontalProgress);\n    FORWARD_CLASS_REF(HorizontalScrollBar);\n    FORWARD_CLASS_REF(Image);\n    FORWARD_CLASS_REF(Label);\n    FORWARD_CLASS_REF(List);\n    FORWARD_CLASS_REF(ScrollArea);\n    FORWARD_CLASS_REF(Toggle);\n    FORWARD_CLASS_REF(VerticalProgress);\n    FORWARD_CLASS_REF(VerticalScrollBar);\n    FORWARD_CLASS_REF(Widget);\n    FORWARD_CLASS_REF(Window);\n\n#undef CreateWindow\n\n    // ------------------------------------------------\n    // UI manager, contains all root widgets and styles\n    // ------------------------------------------------\n    class UIManager : public Singleton<UIManager>\n    {\n    public:\n        // Default constructor\n        UIManager(RefCounter* refCounter);\n\n        // Destructor\n        ~UIManager();\n\n        // Loads widgets style\n        void LoadStyle(const String& stylesPath);\n\n        // Saves style\n        void SaveStyle(const String& stylesPath);\n\n        // Clears style widgets\n        void ClearStyle();\n\n        // Adds widget style\n        void AddWidgetStyle(const Ref<Widget>& widget, const String& style);\n\n        // Creates widget by style\n        Ref<Widget> CreateWidget(const Type& type, const String& style = \"standard\");\n\n        // Returns widget style by name\n        Ref<Widget> GetWidgetStyle(const Type& type, const String& style);\n\n        // Returns widget style by name\n        template<typename _type>\n        Ref<_type> GetWidgetStyle(const String& style);\n\n        // Removes widget style\n        template<typename _type>\n        void RemoveWidgetStyle(const String& style);\n\n        // Creates widget by style\n        template<typename _type>\n        Ref<_type> CreateWidget(const String& style = \"standard\");\n\n        // Creates button by style\n        Ref<Button> CreateButton(const WString& caption, const Function<void()>& onClick = Function<void()>(),\n                                 const String& style = \"standard\");\n\n        // Creates button by style\n        Ref<Window> CreateWindow(const WString& caption, const String& style = \"standard\");\n\n        // Creates label by style\n        Ref<Label> CreateLabel(const WString& text, const String& style = \"standard\");\n\n        // Creates horizontal layout\n        Ref<HorizontalLayout> CreateHorLayout();\n\n        // Creates vertical layout\n        Ref<VerticalLayout> CreateVerLayout();\n\n        // Creates horizontal progress bar by style\n        Ref<HorizontalProgress> CreateHorProgress(const String& style = \"standard\");\n\n        // CreatesCreates vertical progress bar by style\n        Ref<VerticalProgress> CreateVerProgress(const String& style = \"standard\");\n\n        // Creates horizontal scroll bar by style\n        Ref<HorizontalScrollBar> CreateHorScrollBar(const String& style = \"standard\");\n\n        // Creates vertical scroll bar by style\n        Ref<VerticalScrollBar> CreateVerScrollBar(const String& style = \"standard\");\n\n        // Creates scroll area\n        Ref<ScrollArea> CreateScrollArea(const String& style = \"standard\");\n\n        // Creates edit box\n        Ref<EditBox> CreateEditBox(const String& style = \"standard\");\n\n        // Creates list view\n        Ref<CustomList> CreateCustomList(const String& style = \"standard\");\n\n        // Creates text list\n        Ref<List> CreateList(const String& style = \"standard\");\n\n        // Creates custom dropdown\n        Ref<CustomDropDown> CreateCustomDropdown(const String& style = \"standard\");\n\n        // Creates text dropdown\n        Ref<DropDown> CreateDropdown(const String& style = \"standard\");\n\n        // Creates editbox dropdown\n        Ref<EditBoxDropDown> CreateEditBoxDropDown(const String& style = \"standard\");\n\n        // Creates toggle\n        Ref<Toggle> CreateToggle(const WString& caption, const String& style = \"standard\");\n\n        // Creates image\n        Ref<Image> CreateImage(const String& name);\n\n        // Sets widget as focused\n        void FocusWidget(const Ref<Widget>& widget);\n\n        // Returns current focused widget\n        Ref<Widget> GetFocusedWidget() const;\n\n        // Sets next widget focused\n        void FocusNextWidget();\n\n        // Draws context menus and top drawing widgets\n        void DrawCurrentLayerTopWidgets();\n\n        // Checks last focused and unfocused widget\n        void Update();\n\n        // Registering widget for drawing at top of all regular widgets\n        void DrawWidgetAtTop(const Ref<Widget>& widget);\n\n        // Returns all styles widgets\n        const Vector<AssetRef<ActorAsset>>& GetWidgetStyles() const;\n\n    protected:\n        Ref<LogStream> mLog; // UI Log stream\n\n        Ref<Widget>         mFocusedWidget;        // Current selected widget\n        Vector<Ref<Widget>> mLastUnfocusedWidgets; // Widget that was unfocused on last frame\n        Vector<Ref<Widget>> mLastFocusedWidgets;   // Widget that was focused on last frame\n        Vector<Ref<Widget>> mFocusableWidgets;     // List of selectable widgets\n\n        Map<WeakRef<CursorAreaEventListenersLayer>, Vector<Ref<Widget>>> mTopWidgets; // Top widgets, drawing after mScreenWidget \n\n        Vector<AssetRef<ActorAsset>> mStyleSamples; // Style widgets\n\n    protected:\n        // Registers focusable widget\n        static void RegisterFocusableWidget(Widget* widget);\n\n        // Unregisters focusable widget\n        static void UnregisterFocusableWidget(Widget* widget);\n\n    protected:\n        // Tries to load style \"ui_style.json\"\n        void TryLoadStyle();\n\n        friend class BaseApplication;\n        friend class CustomDropDown;\n        friend class Integration;\n        friend class Tree;\n        friend class Widget;\n\t\tfriend class Application;\n    };\n\n    template<typename _type>\n    Ref<_type> UIManager::GetWidgetStyle(const String& style /*= \"standard\"*/)\n    {\n        for (auto& styleWidget : mStyleSamples)\n        {\n            if (TypeOf(_type) == styleWidget->GetActor()->GetType())\n            {\n                if (style == styleWidget->GetActor()->GetName())\n                    return DynamicCast<_type>(styleWidget->GetActor());\n            }\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    void UIManager::RemoveWidgetStyle(const String& style)\n    {\n        int removeIdx = -1;\n        int i = 0;\n        for (auto& styleWidget : mStyleSamples)\n        {\n            if (TypeOf(_type) == styleWidget->GetActor()->GetType())\n            {\n                if (style == styleWidget->GetActor()->GetName())\n                {\n                    removeIdx = i;\n                    break;\n                }\n            }\n\n            i++;\n        }\n\n        if (removeIdx != -1)\n            mStyleSamples.RemoveAt(removeIdx);\n    }\n\n    template<typename _type>\n    Ref<_type> UIManager::CreateWidget(const String& style /*= \"standard\"*/)\n    {\n        auto sample = GetWidgetStyle<_type>(style);\n        if (!sample)\n            sample = GetWidgetStyle<_type>(\"standard\");\n\n        Ref<_type> res;\n\n        if (sample)\n            res = sample->template CloneAsRef<_type>();\n        else\n            res = mmake<_type>();\n\n        return res;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widget.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Widget.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Scene/SceneLayer.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    Widget::Widget(RefCounter* refCounter, ActorCreateMode mode /*= ActorCreateMode::Default*/) :\n        Actor(refCounter, mnew WidgetLayout(), mode), layout(dynamic_cast<WidgetLayout*>(transform))\n    {\n#if IS_EDITOR\n        InitEditables();\n#endif\n\n        if (IsFocusable())\n            UIManager::RegisterFocusableWidget(this);\n    }\n\n    Widget::Widget(RefCounter* refCounter, const AssetRef<ActorAsset>& prototype, ActorCreateMode mode /*= ActorCreateMode::Default*/) :\n        Actor(refCounter, mnew WidgetLayout(), prototype, mode), layout(dynamic_cast<WidgetLayout*>(transform))\n    {\n#if IS_EDITOR\n        InitEditables();\n#endif\n\n        if (IsFocusable())\n            UIManager::RegisterFocusableWidget(this);\n    }\n\n    Widget::Widget(RefCounter* refCounter, Vector<Ref<Component>> components, ActorCreateMode mode /*= ActorCreateMode::Default*/) :\n        Actor(refCounter, mnew WidgetLayout(), components, mode), layout(dynamic_cast<WidgetLayout*>(transform))\n    {\n#if IS_EDITOR\n        InitEditables();\n#endif\n\n        if (IsFocusable())\n            UIManager::RegisterFocusableWidget(this);\n    }\n\n    Widget::Widget(RefCounter* refCounter, const Widget& other) :\n        Actor(refCounter, mnew WidgetLayout(*other.layout), other), layout(dynamic_cast<WidgetLayout*>(transform)),\n        mTransparency(other.mTransparency)\n    {\n#if IS_EDITOR\n        InitEditables();\n#endif\n\n\n        // Layers\n        {\n            Ref<WidgetLayer::ICopyVisitor> layerCopyVisitor;\n\n            if (DynamicCast<InstantiatePrototypeCloneVisitor>(other.mCopyVisitor) || other.mIsAsset)\n                layerCopyVisitor = mmake<WidgetLayer::InstantiatePrototypeCloneVisitor>();\n\n#if IS_EDITOR\n            if (DynamicCast<MakePrototypeCloneVisitor>(other.mCopyVisitor))\n                layerCopyVisitor = mmake<WidgetLayer::MakePrototypeCloneVisitor>();\n\n            if (DynamicCast<InstantiatePrototypeCloneVisitor>(other.mCopyVisitor) || other.mIsAsset)\n            {\n                layersEditable->prototypeLink = other.layersEditable;\n                internalChildrenEditable->prototypeLink = other.internalChildrenEditable;\n            }\n#endif\n\n            for (auto& layer : other.mLayers)\n            {\n                layer->mCopyVisitor = layerCopyVisitor;\n\n                auto newLayer = mmake<WidgetLayer>(*layer);\n                newLayer->SetOwnerWidget(Ref(this));\n                mLayers.Add(newLayer);\n                OnLayerAdded(newLayer);\n            }\n\n            layerCopyVisitor = nullptr;\n        }\n\n        // Children\n        {\n            for (auto& child : mChildren)\n            {\n                auto childWidget = DynamicCast<Widget>(child);\n                if (childWidget)\n                {\n                    childWidget->mParentWidget = Ref(this);\n                    mChildWidgets.Add(childWidget);\n                    OnChildAdded(childWidget);\n                }\n\n                child->OnParentChanged(nullptr);\n            }\n\n            for (auto& child : other.mInternalWidgets)\n            {\n                auto newChild = child->CloneAsRef<Widget>();\n                newChild->RemoveFromScene();\n                newChild->SetInternalParent(Ref(this), false);\n            }\n        }\n\n        // States\n        {\n            for (auto& state : other.mStates)\n            {\n                auto newState = state->CloneAsRef<WidgetState>();\n                AddState(newState, false);\n            }\n        }\n\n        if (IsFocusable())\n            UIManager::RegisterFocusableWidget(this);\n\n        UpdateLayersDrawingSequence();\n        RetargetStatesAnimations();\n    }\n\n    Widget::~Widget()\n    {\n        if (mParent)\n            mParent.Lock()->OnChildRemoved(Ref(this));\n\n        for (auto& layer : mLayers)\n            layer->mOwnerWidget = nullptr;\n\n        mLayers.Clear();\n\n        mStates.Clear();\n\n        for (auto& child : mInternalWidgets)\n        {\n            child->OnBeforeDestroy();\n\n            child->mParent = nullptr;\n            child->mParentWidget = nullptr;\n        }\n\n        mInternalWidgets.Clear();\n\n        if (IsFocusable())\n            UIManager::UnregisterFocusableWidget(this);\n    }\n\n    Widget& Widget::operator=(const Widget& other)\n    {\n        mInternalWidgets.Clear();\n        mLayers.Clear();\n        mStates.Clear();\n        mVisibleState = nullptr;\n        mFocusedState = nullptr;\n\n        layout->CopyFrom(*other.layout);\n        mTransparency = other.mTransparency;\n        mIsFocusable = other.mIsFocusable;\n\n        auto thisRef = Ref(this);\n\n        for (auto& layer : other.mLayers)\n        {\n            auto newLayer = mmake<WidgetLayer>(*layer);\n            newLayer->SetOwnerWidget(thisRef);\n            mLayers.Add(newLayer);\n            OnLayerAdded(newLayer);\n        }\n\n        mChildWidgets.Clear();\n        for (auto& child : mChildren)\n        {\n            auto childWidget = DynamicCast<Widget>(child);\n            if (childWidget)\n            {\n                mChildWidgets.Add(childWidget);\n                OnChildAdded(childWidget);\n            }\n        }\n\n        for (auto& child : other.mInternalWidgets)\n        {\n            auto newChild = child->CloneAsRef<Widget>();\n            newChild->RemoveFromScene();\n            newChild->SetInternalParent(thisRef, false);\n        }\n\n        for (auto& state : other.mStates)\n        {\n            auto newState = state->CloneAsRef<WidgetState>();\n            AddState(newState, false);\n        }\n\n        UpdateLayersDrawingSequence();\n\n        return *this;\n    }\n\n    void Widget::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n        PROFILE_INFO(mName);\n\n        if (mResEnabledInHierarchy)\n        {\n            if (GetLayoutData().updateFrame == 0)\n            {\n                for (auto& child : mChildren)\n                    child->transform->SetDirty(true);\n\n                for (auto& child : mInternalWidgets)\n                    child->transform->SetDirty(true);\n\n                UpdateSelfTransform();\n            }\n\n\t\t\tOnUpdate(dt);\n\n            if (!mIsClipped)\n            {\n                for (auto& state : mStates)\n                {\n                    if (state)\n                        state->Update(dt);\n                }\n            }\n\n            for (auto& comp : mComponents)\n                comp->OnUpdate(dt);\n        }\n    }\n\n    void Widget::UpdateChildren(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n        PROFILE_INFO(mName);\n\n        for (auto& child : mChildren)\n            child->Update(dt);\n\n        RectF childrenWorldRect = GetLayoutData().childrenWorldRect;\n        GetLayoutData().childrenWorldRect = GetLayoutData().worldRectangle;\n\n        for (auto& child : mInternalWidgets)\n            child->Update(dt);\n\n        GetLayoutData().childrenWorldRect = childrenWorldRect;\n\n        for (auto& child : mChildren)\n            child->UpdateChildren(dt);\n\n        GetLayoutData().childrenWorldRect = GetLayoutData().worldRectangle;\n\n        for (auto& child : mInternalWidgets)\n            child->UpdateChildren(dt);\n\n        GetLayoutData().childrenWorldRect = childrenWorldRect;\n    }\n\n    void Widget::UpdateTransform()\n    {\n        if (GetLayoutData().drivenByParent && mParentWidget)\n            mParentWidget.Lock()->UpdateTransform();\n\n        UpdateSelfTransform();\n        UpdateChildrenTransforms();\n    }\n\n    void Widget::UpdateChildrenTransforms()\n    {\n        Actor::UpdateChildrenTransforms();\n\n        RectF childrenWorldRect = GetLayoutData().childrenWorldRect;\n        GetLayoutData().childrenWorldRect = GetLayoutData().worldRectangle;\n\n        for (auto& child : mInternalWidgets)\n            child->UpdateSelfTransform();\n\n        for (auto& child : mInternalWidgets)\n            child->UpdateChildrenTransforms();\n\n        GetLayoutData().childrenWorldRect = childrenWorldRect;\n    }\n\n\tvoid Widget::ForEachActor(const Function<bool(Actor&)>& func)\n\t{\n        if (func(*this))\n        {\n\t\t\tfor (auto& child : mChildren)\n\t\t\t\tchild->ForEachActor(func);\n\n            for (auto& child : mInternalWidgets)\n                child->ForEachActor(func);\n        }\n\t}\n\n\tvoid Widget::SetLayoutDirty()\n    {\n        layout->SetDirty(false);\n    }\n\n    void Widget::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n        {\n            if (mIsClipped)\n                DrawInheritedDepthChildren();\n\n            return;\n        }\n\n        DrawLayers();\n\n        OnDrawn();\n\n\t\tDrawInheritedDepthChildren();\n        DrawInternalChildren();\n        DrawTopLayers();\n\n        DrawDebugFrame();\n\t}\n\n\tvoid Widget::DrawLayers()\n\t{\n\t\tfor (auto& layer : mDrawingLayers)\n\t\t\tlayer->Draw();\n\t}\n\n\tvoid Widget::DrawTopLayers()\n\t{\n\t\tfor (auto& layer : mTopDrawingLayers)\n\t\t\tlayer->Draw();\n\t}\n\n\tvoid Widget::DrawInternalChildren()\n\t{\n\t\tfor (auto& child : mInternalWidgets)\n\t\t\tchild->Draw();\n\t}\n\n    void Widget::DrawDebugFrame()\n    {\n        if (!IsUIDebugEnabled() && !o2Input.IsKeyDown(VK_F2))\n            return;\n\n        static int colr = 0;\n        static int lastFrame = 0;\n\n        if (lastFrame != o2Time.GetCurrentFrame())\n            colr = 0;\n\n        lastFrame = o2Time.GetCurrentFrame();\n\n        o2Render.DrawRectFrame(mBoundsWithChilds, Color4::SomeColor(colr++));\n    }\n\n    void Widget::SerializeRaw(DataValue& node) const\n    {\n        Actor::SerializeRaw(node);\n\n        node[\"InternalWidgets\"] = mInternalWidgets;\n        node[\"Layers\"] = mLayers;\n        node[\"States\"] = mStates;\n    }\n\n    void Widget::DeserializeRaw(const DataValue& node)\n    {\n        Actor::DeserializeRaw(node);\n\n        if (auto internalWidgetsNode = node.FindMember(\"InternalWidgets\"))\n            mInternalWidgets = *internalWidgetsNode;\n\n        if (auto layersNode = node.FindMember(\"Layers\"))\n            mLayers = *layersNode;\n\n        for (auto& layer : mLayers)\n            layer->SetOwnerWidget(Ref(this));\n\n        for (auto& layer : mLayers)\n            OnLayerAdded(layer);\n\n        if (auto statesNode = node.FindMember(\"States\"))\n            mStates = *statesNode;\n    }\n\n    void Widget::SerializeWithProto(DataValue& node) const\n    {\n        Actor::SerializeWithProto(node);\n\n        if (!mInternalWidgets.IsEmpty())\n        {\n            auto& internalWidgetsNode = node.AddMember(\"InternalWidgets\");\n            internalWidgetsNode.SetArray();\n            for (auto& widget : mInternalWidgets)\n            {\n                auto& widgetNode = internalWidgetsNode.AddElement();\n                widgetNode.AddMember(\"Type\") = widget->GetType().GetName();\n                widget->Serialize(widgetNode.AddMember(\"Data\"));\n            }\n        }\n\n        if (!mLayers.IsEmpty())\n        {\n            auto& layersNode = node.AddMember(\"Layers\");\n            layersNode.SetArray();\n            for (auto& layer : mLayers)\n                layer->Serialize(layersNode.AddElement());\n        }\n\n        if (!mStates.IsEmpty())\n        {\n            const Widget* proto = dynamic_cast<Widget*>(mPrototypeLink.Lock().Get());\n            auto& statesNode = node.AddMember(\"States\");\n            for (auto& state : mStates)\n            {\n                if (auto protoState = proto->GetStateObject(state->name))\n                {\n                    auto& stateNode = statesNode.AddElement();\n                    stateNode[\"name\"] = state->name;\n                    stateNode.SetDelta(*state, *protoState);\n                }\n                else\n                    statesNode.AddElement().Set(*state);\n            }\n        }\n    }\n\n    void Widget::DeserializeWithProto(const DataValue& node)\n    {\n        for (auto& layer : mLayers)\n            layer->mOwnerWidget = nullptr;\n\n        for (auto& child : mInternalWidgets)\n        {\n            child->mParent = nullptr;\n            child->mParentWidget = nullptr;\n        }\n\n        mLayers.Clear();\n        mStates.Clear();\n        mInternalWidgets.Clear();\n\n        Actor::DeserializeWithProto(node);\n\n        auto internalWidgetsNode = node.FindMember(\"InternalWidgets\");\n        if (internalWidgetsNode && internalWidgetsNode->IsArray())\n        {\n            for (auto& widgetNode : *internalWidgetsNode)\n            {\n                const DataValue* typeNode = widgetNode.FindMember(\"Type\");\n                const DataValue* dataValue = widgetNode.FindMember(\"Data\");\n                if (typeNode && dataValue)\n                {\n                    const ObjectType* type = dynamic_cast<const ObjectType*>(o2Reflection.GetType(*typeNode));\n                    if (type)\n                    {\n                        auto widget = DynamicCast<Widget>(type->CreateSampleRef());\n                        AddInternalWidget(widget);\n                        widget->mCopyVisitor = mCopyVisitor;\n                        widget->Deserialize(*dataValue);\n                        widget->mCopyVisitor = nullptr;\n                    }\n                }\n            }\n        }\n\n        auto layersNode = node.FindMember(\"Layers\");\n        if (layersNode && layersNode->IsArray())\n        {\n            for (auto& layerNode : *layersNode)\n            {\n                auto layer = mmake<WidgetLayer>();\n                AddLayer(layer);\n                layer->Deserialize(layerNode);\n            }\n        }\n\n        auto statesNode = node.FindMember(\"States\");\n        if (statesNode && statesNode->IsArray())\n        {\n            const Widget* proto = dynamic_cast<const Widget*>(mPrototypeLink.Lock().Get());\n\n            for (auto& stateNode : *statesNode)\n            {\n                auto state = mmake<WidgetState>();\n                if (auto nameNode = stateNode.FindMember(\"name\"))\n                    nameNode->Get(state->name);\n\n                bool delta = false;\n                if (proto)\n                {\n                    if (auto protoState = proto->GetStateObject(state->name))\n                    {\n                        stateNode.GetDelta(*state, *protoState);\n                        delta = true;\n                    }\n                }\n\n                if (!delta)\n                    stateNode.Get(*state);\n\n                AddState(state, false);\n            }\n        }\n    }\n\n    void Widget::OnDeserialized(const DataValue& node)\n    {\n        auto thisRef = Ref(this);\n\n        mChildWidgets.Clear();\n        for (auto& child : mChildren)\n        {\n            auto childWidget = DynamicCast<Widget>(child);\n            if (childWidget)\n            {\n                childWidget->mParentWidget = thisRef;\n                mChildWidgets.Add(childWidget);\n                OnChildAdded(childWidget);\n            }\n        }\n\n        for (auto& child : mInternalWidgets)\n        {\n            child->mParent = thisRef;\n            child->mParentWidget = thisRef;\n\n            child->RemoveFromScene();\n        }\n\n        RetargetStatesAnimations();\n        SetEnabledForcible(mEnabled);\n        UpdateLayersDrawingSequence();\n    }\n\n    void Widget::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        OnDeserialized(node);\n    }\n\n    void Widget::OnTransformUpdated()\n    {\n        mIsClipped = false;\n        Actor::OnTransformUpdated();\n        UpdateLayersLayouts();\n        onLayoutUpdated();\n    }\n\n    void Widget::OnEnabled()\n    {\n        Actor::OnEnabled();\n\n        layout->SetDirty(false);\n        onShow();\n    }\n\n    void Widget::OnDisabled()\n\t{\n\t\tActor::OnDisabled();\n        onHide();\n    }\n\n    void Widget::OnFocused()\n    {\n        onFocused();\n    }\n\n    void Widget::OnUnfocused()\n    {\n        onUnfocused();\n    }\n\n    const WeakRef<Widget>& Widget::GetParentWidget() const\n    {\n        return mParentWidget;\n    }\n\n    const RectF& Widget::GetChildrenWorldRect() const\n    {\n        return GetLayoutData().childrenWorldRect;\n    }\n\n    const Vector<Ref<Widget>>& Widget::GetChildWidgets() const\n    {\n        return mChildWidgets;\n    }\n\n    Ref<Actor> Widget::FindActorById(SceneUID id)\n    {\n        if (auto res = Actor::FindActorById(id))\n            return res;\n\n        for (auto& widget : mInternalWidgets)\n        {\n            if (auto res = widget->FindActorById(id))\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    String Widget::GetCreateMenuCategory()\n    {\n        return \"UI\";\n    }\n\n    Ref<WidgetLayer> Widget::AddLayer(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->mParent)\n            layer->mParent.Lock()->RemoveChild(layer);\n        else if (layer->mOwnerWidget)\n            layer->mOwnerWidget.Lock()->RemoveLayer(layer);\n\n        mLayers.Add(layer);\n        layer->SetOwnerWidget(Ref(this));\n        UpdateLayersDrawingSequence();\n        OnLayerAdded(layer);\n\n#if IS_EDITOR\n        if (Scene::IsSingletonInitialzed() && IsOnScene())\n        {\n            o2Scene.OnObjectChanged(layersEditable);\n            o2Scene.onChildrenHierarchyChanged(layersEditable);\n        }\n#endif\n\n        return layer;\n    }\n\n    Ref<WidgetLayer> Widget::AddLayer(const String& name, const Ref<IRectDrawable>& drawable,\n                                      const Layout& layout /*= Layout::Both()*/, float depth /*= 0.0f*/)\n    {\n        if (Math::Equals(depth, 0.0f))\n            depth = (float)mDrawingLayers.Count();\n\n        auto layer = mmake<WidgetLayer>();\n        layer->depth = depth;\n        layer->name = name;\n        layer->SetDrawable(drawable);\n        layer->layout = layout;\n\n        AddLayer(layer);\n\n        return layer;\n    }\n\n    Ref<WidgetLayer> Widget::GetLayer(const String& path) const\n    {\n        int delPos = path.Find(\"/\");\n        String pathPart = path.SubStr(0, delPos);\n\n        for (auto& layer : mLayers)\n        {\n            if (layer->name == pathPart)\n            {\n                if (delPos == -1)\n                    return layer;\n                else\n                    return layer->GetChild(path.SubStr(delPos + 1));\n            }\n        }\n\n        return nullptr;\n    }\n\n    Ref<WidgetLayer> Widget::FindLayer(const String& name) const\n    {\n        for (auto& childLayer : mLayers)\n        {\n            if (childLayer->name == name)\n                return childLayer;\n\n            auto layer = childLayer->FindChild(name);\n            if (layer)\n                return layer;\n        }\n\n        return nullptr;\n    }\n\n    void Widget::RemoveLayer(const Ref<WidgetLayer>& layer)\n    {\n        layer->SetOwnerWidget(nullptr);\n\n        mLayers.Remove(layer);\n\n        UpdateLayersDrawingSequence();\n\n#if IS_EDITOR\n        OnChildrenChanged();\n#endif\n    }\n\n    void Widget::RemoveLayer(const String& path)\n    {\n        auto layer = GetLayer(path);\n\n        if (!layer)\n            return;\n\n        if (layer->GetParent())\n        {\n            layer->GetParent().Lock()->RemoveChild(layer);\n            return;\n        }\n\n        mLayers.Remove(layer);\n        UpdateLayersDrawingSequence();\n    }\n\n    void Widget::RemoveAllLayers()\n    {\n        mDrawingLayers.Clear();\n        mLayers.Clear();\n    }\n\n    const Vector<Ref<WidgetLayer>>& Widget::GetLayers() const\n    {\n        return mLayers;\n    }\n\n    Ref<WidgetState> Widget::AddState(const String& name)\n    {\n        auto newState = mmake<WidgetState>();\n        newState->name = name;\n\n        return AddState(newState);\n    }\n\n    Ref<WidgetState> Widget::AddState(const String& name, const Ref<AnimationClip>& animation)\n    {\n        auto newState = mmake<WidgetState>();\n        newState->name = name;\n        newState->animationClip = animation;\n\n        return AddState(newState);\n    }\n\n    Ref<WidgetState> Widget::AddState(const String& name, const AssetRef<AnimationAsset>& animation)\n    {\n        auto newState = mmake<WidgetState>();\n        newState->name = name;\n        newState->animationAsset = animation;\n\n        return AddState(newState);\n    }\n\n    Ref<WidgetState> Widget::AddState(const Ref<WidgetState>& state, bool showAnimErrors /*= true*/)\n    {\n        mStates.Add(state);\n        state->SetOwner(Ref(this), showAnimErrors);\n\n        if (state->name == \"visible\")\n        {\n            mVisibleState = state;\n            state->SetStateForcible(mEnabled);\n\n            state->onStateBecomesTrue += [&]()\n                {\n                    mResEnabled = true;\n                    UpdateResEnabledInHierarchy();\n                };\n\n            state->onStateFullyFalse += [&]()\n                {\n                    mResEnabled = false;\n                    UpdateResEnabledInHierarchy();\n                };\n        }\n\n        if (state->name == \"focused\")\n            mFocusedState = state;\n\n        OnStateAdded(state);\n\n        return state;\n    }\n\n    bool Widget::RemoveState(const String& name)\n    {\n        int idx = mStates.IndexOf([&](const Ref<WidgetState>& state) { return state->name == name; });\n        if (idx < 0)\n            return false;\n\n        if (mStates[idx] == mVisibleState)\n            mVisibleState = nullptr;\n\n        if (mStates[idx] == mFocusedState)\n            mFocusedState = nullptr;\n\n        mStates.RemoveAt(idx);\n\n        return true;\n    }\n\n    bool Widget::RemoveState(const Ref<WidgetState>& state)\n    {\n        int idx = mStates.IndexOf(state);\n        if (idx < 0)\n            return false;\n\n        if (state == mVisibleState)\n            mVisibleState = nullptr;\n\n        mStates.RemoveAt(idx);\n\n        return true;\n    }\n\n    void Widget::RemoveAllStates()\n    {\n        mVisibleState = nullptr;\n        mFocusedState = nullptr;\n\n        mStates.Clear();\n    }\n\n    void Widget::SetState(const String& name, bool state)\n    {\n        auto stateObj = GetStateObject(name);\n\n        if (stateObj)\n            stateObj->SetState(state);\n    }\n\n    void Widget::SetStateForcible(const String& name, bool state)\n    {\n        auto stateObj = GetStateObject(name);\n\n        if (stateObj)\n            stateObj->SetStateForcible(state);\n    }\n\n    bool Widget::GetState(const String& name) const\n    {\n        auto state = GetStateObject(name);\n\n        if (state)\n            return state->GetState();\n\n        return false;\n    }\n\n    Ref<WidgetState> Widget::GetStateObject(const String& name) const\n    {\n        return mStates.FindOrDefault([&](auto state) { return state->name == name; });\n    }\n\n    const Vector<Ref<WidgetState>>& Widget::GetStates() const\n    {\n        return mStates;\n    }\n\n    void Widget::SetTransparency(float transparency)\n    {\n        mTransparency = transparency;\n        UpdateTransparency();\n    }\n\n    float Widget::GetTransparency() const\n    {\n        return mTransparency;\n    }\n\n    float Widget::GetResTransparency() const\n    {\n        return mResTransparency;\n    }\n\n    void Widget::SetEnabledForcible(bool visible)\n    {\n        if (mVisibleState)\n            mVisibleState->SetStateForcible(visible);\n\n        mEnabled = visible;\n        Widget::UpdateResEnabled();\n        Widget::UpdateTransparency();\n    }\n\n    void Widget::Show(bool forcible /*= false*/)\n    {\n        if (forcible)\n            SetEnabledForcible(true);\n        else\n            SetEnabled(true);\n    }\n\n    void Widget::Hide(bool forcible /*= false*/)\n    {\n        if (forcible)\n            SetEnabledForcible(false);\n        else\n            SetEnabled(false);\n    }\n\n    void Widget::Focus()\n    {\n        o2UI.FocusWidget(Ref(this));\n    }\n\n    void Widget::Unfocus()\n    {\n        o2UI.FocusWidget(nullptr);\n    }\n\n    bool Widget::IsFocused() const\n    {\n        return mIsFocused;\n    }\n\n    bool Widget::IsFocusable() const\n    {\n        return mIsFocusable;\n    }\n\n    void Widget::SetFocusable(bool selectable)\n    {\n        mIsFocusable = selectable;\n    }\n\n    bool Widget::IsUnderPoint(const Vec2F& point)\n    {\n        return mDrawingScissorRect.IsInside(point) && layout->IsPointInside(point);\n    }\n\n    void Widget::SetIndexInSiblings(int index)\n    {\n        Actor::SetIndexInSiblings(index);\n\n        if (mParentWidget)\n            mParentWidget.Lock()->UpdateChildWidgetsList();\n    }\n\n    float Widget::GetMinWidthWithChildren() const\n    {\n        return GetLayoutData().minSize.x;\n    }\n\n    float Widget::GetMinHeightWithChildren() const\n    {\n        return GetLayoutData().minSize.y;\n    }\n\n    float Widget::GetWidthWeightWithChildren() const\n    {\n        return GetLayoutData().weight.x;\n    }\n\n    float Widget::GetHeightWeightWithChildren() const\n    {\n        return GetLayoutData().weight.y;\n    }\n\n    void Widget::UpdateBoundsWithChilds()\n    {\n        if ((!mResEnabledInHierarchy || mIsClipped) && GetLayoutData().dirtyFrame != o2Time.GetCurrentFrame())\n            return;\n\n        mBoundsWithChilds = mBounds;\n\n        for (auto& child : mChildWidgets)\n            mBoundsWithChilds.Expand(child->mBoundsWithChilds);\n\n        if (mParentWidget)\n            mParentWidget.Lock()->UpdateBoundsWithChilds();\n    }\n\n    void Widget::CheckClipping(const RectF& clipArea)\n    {\n        mIsClipped = !mBoundsWithChilds.IsIntersects(clipArea);\n\n        for (auto& child : mChildWidgets)\n            child->CheckClipping(clipArea);\n    }\n\n    void Widget::UpdateTransparency()\n    {\n        if (mParentWidget)\n            mResTransparency = mTransparency * mParentWidget.Lock()->mResTransparency;\n        else\n            mResTransparency = mTransparency;\n\n        for (auto& layer : mLayers)\n            layer->UpdateResTransparency();\n\n        for (auto& child : mChildWidgets)\n            child->UpdateTransparency();\n\n        for (auto& child : mInternalWidgets)\n            child->UpdateTransparency();\n    }\n\n    void Widget::UpdateVisibility(bool updateLayout /*= true*/)\n    {}\n\n    void Widget::OnChildFocused(const Ref<Widget>& child)\n    {\n        if (mParentWidget)\n            mParentWidget.Lock()->OnChildFocused(child);\n    }\n\n    void Widget::RetargetStatesAnimations()\n    {\n        for (auto& state : mStates)\n        {\n            state->mPlayer->SetTarget(static_cast<IObject*>(static_cast<ActorBase*>(this)), false);\n            state->mPlayer->relTime = state->GetState() ? 1.0f : 0.0f;\n        }\n    }\n\n    void Widget::UpdateLayersLayouts()\n    {\n        for (auto& layer : mLayers)\n            layer->UpdateLayout();\n\n        UpdateBounds();\n    }\n\n    void Widget::UpdateBounds()\n    {\n        if ((!mResEnabledInHierarchy || mIsClipped) && GetLayoutData().dirtyFrame != o2Time.GetCurrentFrame())\n            return;\n\n        mBounds = GetLayoutData().worldRectangle;\n        mBoundsWithChilds = mBounds;\n\n        for (auto& layer : mDrawingLayers)\n            mBounds.Expand(layer->GetRect());\n\n        bool anyEnabled = false;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n            {\n                anyEnabled = true;\n                break;\n            }\n        }\n\n        if (!anyEnabled)\n            UpdateBoundsWithChilds();\n    }\n\n    void Widget::UpdateLayersDrawingSequence()\n    {\n        mDrawingLayers.Clear();\n        mTopDrawingLayers.Clear();\n\n        for (auto& layer : mLayers)\n        {\n            if (layer->GetDrawable())\n            {\n                if (layer->mDepth < topLayersDepth)\n                    mDrawingLayers.Add(layer);\n                else\n                    mTopDrawingLayers.Add(layer);\n            }\n\n            auto childLayers = layer->GetAllChilds();\n            for (auto& childLayer : childLayers)\n            {\n                if (childLayer->GetDrawable())\n                {\n                    if (childLayer->mDepth < topLayersDepth)\n                        mDrawingLayers.Add(childLayer);\n                    else\n                        mTopDrawingLayers.Add(childLayer);\n                }\n            }\n        }\n\n        mDrawingLayers.Sort([](auto& a, auto& b) { return a->mDepth < b->mDepth; });\n        mTopDrawingLayers.Sort([](auto& a, auto& b) { return a->mDepth < b->mDepth; });\n    }\n\n    void Widget::SetParentWidget(const Ref<Widget>& widget)\n    {\n        SetParent(widget);\n    }\n\n    Ref<Widget> Widget::GetChildWidget(const String& path) const\n    {\n        auto actor = GetChild(path);\n        return DynamicCast<Widget>(actor);\n    }\n\n    Ref<Actor> Widget::AddChild(const Ref<Actor>& actor)\n    {\n        return Actor::AddChild(actor);\n    }\n\n    Ref<Actor> Widget::AddChild(const Ref<Actor>& actor, int index)\n    {\n        Actor::AddChild(actor, index);\n        UpdateChildWidgetsList();\n        return actor;\n    }\n\n    Ref<Widget> Widget::AddChildWidget(const Ref<Widget>& widget)\n    {\n        return DynamicCast<Widget>(AddChild(widget));\n    }\n\n    Ref<Widget> Widget::AddChildWidget(const Ref<Widget>& widget, int position)\n    {\n        return DynamicCast<Widget>(AddChild(widget, position));\n    }\n\n    Vector<Ref<Widget>>& Widget::GetChildrenNonConst()\n    {\n        return mChildWidgets;\n    }\n\n    Vector<Ref<WidgetLayer>>& Widget::GetLayersNonConst()\n    {\n        return mLayers;\n    }\n\n    Vector<Ref<WidgetState>>& Widget::GetStatesNonConst()\n    {\n        return mStates;\n    }\n\n    Map<String, Ref<WidgetLayer>> Widget::GetAllLayers()\n    {\n        Map<String, Ref<WidgetLayer>> res;\n        for (auto& layer : mLayers)\n            res.Add(layer->name, layer);\n\n        return res;\n    }\n\n    Map<String, Ref<Widget>> Widget::GetAllChilds()\n    {\n        Map<String, Ref<Widget>> res;\n        for (auto& child : mChildWidgets)\n            res.Add(child->GetName(), child);\n\n        return res;\n    }\n\n    Map<String, Ref<Widget>> Widget::GetAllInternalWidgets()\n    {\n        Map<String, Ref<Widget>> res;\n        for (auto& child : mInternalWidgets)\n            res.Add(child->GetName(), child);\n\n        return res;\n    }\n\n    Map<String, Ref<WidgetState>> Widget::GetAllStates()\n    {\n        Map<String, Ref<WidgetState>> res;\n        for (auto& state : mStates)\n            res.Add(state->name, state);\n\n        return res;\n    }\n\n    void Widget::OnLayerAdded(const Ref<WidgetLayer>& layer)\n    {}\n\n    void Widget::OnStateAdded(const Ref<WidgetState>& state)\n    {}\n\n    void Widget::OnStatesListChanged()\n    {\n        auto statesCopy = mStates;\n        mStates.Clear();\n\n        for (auto& state : statesCopy)\n            AddState(state);\n    }\n\n    void Widget::OnParentChanged(const Ref<Actor>& oldParent)\n    {\n        if (mState == Actor::State::Default)\n            layout->SetDirty();\n\n        mParentWidget = DynamicCast<Widget>(mParent.Lock());\n\n        if (mParent && mParent.Lock()->IsOnScene())\n            AddToScene();\n\n        OnDrawbleParentChanged();\n    }\n\n    void Widget::OnChildrenChanged()\n    {\n        SortInheritedDrawables();\n    }\n\n    void Widget::OnChildAdded(const Ref<Actor>& child)\n    {\n        layout->SetDirty(false);\n\n        Ref<Widget> widget = DynamicCast<Widget>(child);\n        if (widget)\n        {\n            UpdateChildWidgetsList();\n\n            OnChildAdded(widget);\n        }\n\n        Actor::OnChildAdded(child);\n    }\n\n    void Widget::OnChildAdded(const Ref<Widget>& child)\n    {}\n\n    void Widget::OnChildRemoved(const Ref<Actor>& child)\n    {\n        layout->SetDirty();\n\n        auto widget = DynamicCast<Widget>(child);\n        if (widget)\n        {\n            mChildWidgets.Remove(widget);\n            mInternalWidgets.Remove(widget);\n\n            OnChildRemoved(widget);\n        }\n\n        Actor::OnChildRemoved(child);\n    }\n\n    void Widget::OnChildRemoved(const Ref<Widget>& child)\n    {}\n\n    void Widget::OnRemoveFromScene()\n    {\n        Actor::OnRemoveFromScene();\n\n#if IS_EDITOR\n        o2Scene.mEditableObjects.Remove(DynamicCast<SceneEditableObject>(layersEditable));\n        o2Scene.mEditableObjects.Remove(DynamicCast<SceneEditableObject>(internalChildrenEditable));\n#endif\n\n        for (auto& layer : mLayers)\n            layer->OnRemoveFromScene();\n\n        for (auto& child : mInternalWidgets)\n            child->OnRemoveFromScene();\n\n    }\n\n\tvoid Widget::OnAddToScene()\n    {\n        Actor::OnAddToScene();\n\n        for (auto& child : mInternalWidgets)\n            child->OnAddToScene();\n\n        for (auto& layer : mLayers)\n            layer->OnAddToScene();\n\n#if IS_EDITOR\n        o2Scene.mEditableObjects.Add(DynamicCast<SceneEditableObject>(layersEditable));\n        o2Scene.mEditableObjects.Add(DynamicCast<SceneEditableObject>(internalChildrenEditable));\n#endif\n    }\n\n    void Widget::UpdateChildWidgetsList()\n    {\n        mChildWidgets.Clear();\n        for (auto& child : mChildren)\n        {\n            if (auto widget = DynamicCast<Widget>(child))\n                mChildWidgets.Add(widget);\n        }\n    }\n\n    WidgetLayoutData& Widget::GetLayoutData()\n    {\n        return *layout->mData;\n    }\n\n    const WidgetLayoutData& Widget::GetLayoutData() const\n    {\n        return *layout->mData;\n    }\n\n    void Widget::SetChildrenWorldRect(const RectF& childrenWorldRect)\n    {\n        layout->mData->childrenWorldRect = childrenWorldRect;\n    }\n\n    void Widget::ForceDraw(const RectF& area, float transparency)\n    {\n        Vec2F oldLayoutOffsetMin = GetLayoutData().offsetMin;\n        Vec2F oldLayoutOffsetMax = GetLayoutData().offsetMax;\n        float oldTransparency = mTransparency;\n        auto oldParent = mParent;\n        auto oldParentWidget = mParentWidget;\n        bool oldResEnabledInHierarchy = mEnabled;\n\n        GetLayoutData().offsetMin = area.LeftBottom();\n        GetLayoutData().offsetMax = area.RightTop();\n        mTransparency = transparency;\n        mParent = nullptr;\n        mParentWidget = nullptr;\n        mIsClipped = false;\n\n        SetEnabledForcible(true);\n\n        UpdateSelfTransform();\n        UpdateChildrenTransforms();\n        UpdateTransparency();\n\n        Draw();\n\n        GetLayoutData().offsetMin = oldLayoutOffsetMin;\n        GetLayoutData().offsetMax = oldLayoutOffsetMax;\n        mTransparency = oldTransparency;\n        mParent = oldParent;\n        mParentWidget = oldParentWidget;\n        mIsClipped = false;\n\n        SetEnabledForcible(oldResEnabledInHierarchy);\n\n        UpdateSelfTransform();\n        UpdateChildrenTransforms();\n\n        GetLayoutData().dirtyFrame = o2Time.GetCurrentFrame();\n\n        UpdateBounds();\n        UpdateBoundsWithChilds();\n        UpdateTransparency();\n    }\n\n    void Widget::UpdateResEnabled(bool withChildren /*= true*/)\n    {\n        if (mVisibleState)\n            mVisibleState->SetState(mEnabled);\n        else\n            Actor::UpdateResEnabled(withChildren);\n    }\n\n    void Widget::UpdateResEnabledInHierarchy(bool withChildren /*= true*/)\n    {\n        Actor::UpdateResEnabledInHierarchy(withChildren);\n\n        for (auto& child : mInternalWidgets)\n            child->UpdateResEnabledInHierarchy(withChildren);\n    }\n\n    void Widget::SetInternalParent(const Ref<Widget>& parent, bool worldPositionStays /*= false*/)\n    {\n        SetParent(parent, worldPositionStays);\n\n        if (parent)\n        {\n            auto thisPtr = Ref<Widget>(this);\n            parent->mChildren.Remove(thisPtr);\n            parent->mChildWidgets.Remove(thisPtr);\n            parent->mInternalWidgets.Add(thisPtr);\n        }\n\n        SetDrawingDepthInheritFromParent(false);\n    }\n\n    void Widget::AddInternalWidget(const Ref<Widget>& widget, bool worldPositionStays /*= false*/)\n    {\n        widget->SetInternalParent(Ref(this), worldPositionStays);\n    }\n\n\tvoid Widget::RemoveInternalWidget(const Ref<Widget>& widget)\n\t{\n\t\tauto oldParent = widget->mParent.Lock();\n\n        widget->mParent = nullptr;\n\t\tmInternalWidgets.RemoveFirst([&](auto& x) { return x == widget; });\n\n\t\twidget->OnParentChanged(oldParent);\n\n\t\tOnChildRemoved(widget);\n\n\t\tif (widget->mState != State::Destroyed)\n\t\t{\n            widget->transform->SetDirty();\n            widget->UpdateResEnabledInHierarchy();\n\t\t}\n\n\t}\n\n\tRef<Widget> Widget::GetInternalWidget(const String& path) const\n    {\n        int delPos = path.Find(\"/\");\n        String pathPart = path.SubStr(0, delPos);\n\n        if (pathPart == \"..\")\n        {\n            if (mParent)\n            {\n                if (delPos == -1)\n                    return mParentWidget.Lock();\n                else\n                    return mParent.Lock()->GetChildByType<Widget>(path.SubStr(delPos + 1));\n            }\n\n            return nullptr;\n        }\n\n        for (auto& child : mInternalWidgets)\n        {\n            if (child->mName == pathPart)\n            {\n                if (delPos == -1)\n                    return child;\n                else\n                    return child->GetChildByType<Widget>(path.SubStr(delPos + 1));\n            }\n        }\n\n        return nullptr;\n    }\n\n    Ref<Widget> Widget::FindInternalWidget(const String& name) const\n    {\n        for (auto& widget : mInternalWidgets)\n        {\n            if (widget->GetName() == name)\n                return widget;\n\n            if (Ref<Widget> res = widget->FindChildByTypeAndName<Widget>(name))\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    void Widget::MoveAndCheckClipping(const Vec2F& delta, const RectF& clipArea)\n    {\n        mBoundsWithChilds += delta;\n        mIsClipped = !mBoundsWithChilds.IsIntersects(clipArea);\n\n        if (!mIsClipped)\n            UpdateSelfTransform();\n\n        for (auto& child : mChildWidgets)\n            child->MoveAndCheckClipping(delta, clipArea);\n\n        RectF childrenWorldRect = GetLayoutData().childrenWorldRect;\n        GetLayoutData().childrenWorldRect = GetLayoutData().worldRectangle;\n\n        for (auto& child : mInternalWidgets)\n            child->MoveAndCheckClipping(delta, clipArea);\n\n        GetLayoutData().childrenWorldRect = childrenWorldRect;\n    }\n\n#if IS_SCRIPTING_SUPPORTED\n    WidgetLayout* Widget::GetLayoutScript()\n    {\n        return layout;\n    }\n#endif\n\n#if IS_EDITOR\n\n    bool Widget::isEditorLayersVisible = true;\n    bool Widget::isEditorInternalChildrenVisible = true;\n\n    void Widget::SetEditableParent(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {\n        if (auto inter = DynamicCast<InternalChildrenEditableEditable>(object))\n            SetInternalParent(inter->widget.Lock());\n        else\n            Actor::SetEditableParent(object, idx);\n    }\n\n    Ref<SceneEditableObject> Widget::GetEditableParent() const\n    {\n        if (mParentWidget && mParentWidget.Lock()->mInternalWidgets.Contains(Ref(const_cast<Widget*>(this))))\n        {\n            return mParentWidget.Lock()->internalChildrenEditable;\n        }\n\n        return Actor::GetEditableParent();\n    }\n\n    Vector<Ref<SceneEditableObject>> Widget::GetEditableChildren() const\n    {\n        Vector<Ref<SceneEditableObject>> res = Actor::GetEditableChildren();\n\n        if (isEditorInternalChildrenVisible)\n            res.Insert(DynamicCast<SceneEditableObject>(internalChildrenEditable), 0);\n\n        if (isEditorLayersVisible)\n            res.Insert(DynamicCast<SceneEditableObject>(layersEditable), 0);\n\n        return res;\n    }\n\n    void Widget::AddEditableChild(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {\n        idx -= 2; // Because of internal editable objects layers and internal children\n\n        if (auto actor = DynamicCast<Actor>(object))\n        {\n            if (idx < 0)\n                AddChild(actor);\n            else\n                AddChild(actor, idx);\n        }\n        else if (auto layer = DynamicCast<WidgetLayer>(object))\n            AddLayer(layer);\n    }\n\n    bool Widget::IsSupportsTransforming() const\n    {\n        return true;\n    }\n\n    Basis Widget::GetTransform() const\n    {\n        return layout->GetWorldBasis();\n    }\n\n    void Widget::SetTransform(const Basis& transform)\n    {\n        layout->SetWorldBasis(transform);\n    }\n\n    bool Widget::IsSupportsLayout() const\n    {\n        return true;\n    }\n\n    Layout Widget::GetLayout() const\n    {\n        return Layout(layout->GetAnchorMin(), layout->GetAnchorMax(), layout->GetOffsetMin(), layout->GetOffsetMax());\n    }\n\n    void Widget::SetLayout(const Layout& layout)\n    {\n        this->layout->SetAnchorMin(layout.anchorMin);\n        this->layout->SetAnchorMax(layout.anchorMax);\n        this->layout->SetOffsetMin(layout.offsetMin);\n        this->layout->SetOffsetMax(layout.offsetMax);\n    }\n\n    Ref<SceneEditableObject> Widget::GetEditableOwner()\n    {\n        return Ref(this);\n    }\n\n    void Widget::InitEditables()\n    {\n        layersEditable = mmake<LayersEditable>(Ref(this));\n        internalChildrenEditable = mmake<InternalChildrenEditableEditable>(Ref(this));\n    }\n\n    Widget::LayersEditable::LayersEditable(RefCounter* refCounter) :\n        SceneEditableObject(refCounter)\n    {}\n\n    Widget::LayersEditable::LayersEditable(RefCounter* refCounter, const Ref<Widget>& widget) :\n        SceneEditableObject(refCounter), widget(widget)\n    {}\n\n    SceneUID Widget::LayersEditable::GetID() const\n    {\n        return UID;\n    }\n\n    void Widget::LayersEditable::GenerateNewID(bool childs /*= true*/)\n    {\n        UID = Math::Random();\n    }\n\n    const String& Widget::LayersEditable::GetName() const\n    {\n        static String name = \"layers\";\n        return name;\n    }\n\n    void Widget::LayersEditable::SetName(const String& name)\n    {}\n\n    Vector<Ref<SceneEditableObject>> Widget::LayersEditable::GetEditableChildren() const\n    {\n        return widget.Lock()->mLayers.Convert<Ref<SceneEditableObject>>([](const Ref<WidgetLayer>& x) { return DynamicCast<SceneEditableObject>(x); });\n    }\n\n    Ref<SceneEditableObject> Widget::LayersEditable::GetEditableParent() const\n    {\n        return DynamicCast<SceneEditableObject>(widget.Lock());\n    }\n\n    void Widget::LayersEditable::SetEditableParent(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {}\n\n    void Widget::LayersEditable::AddEditableChild(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {\n        if (auto layer = DynamicCast<WidgetLayer>(object))\n            widget.Lock()->AddLayer(layer);\n    }\n\n    void Widget::LayersEditable::SetIndexInSiblings(int idx)\n    {}\n\n    bool Widget::LayersEditable::IsSupportsDeleting() const\n    {\n        return false;\n    }\n\n    Basis Widget::LayersEditable::GetTransform() const\n    {\n        return widget.Lock()->GetTransform();\n    }\n\n    bool Widget::LayersEditable::IsSupportsSnapping() const\n    {\n        return false;\n    }\n\n    Ref<SceneEditableObject> Widget::LayersEditable::GetEditableLink() const\n    {\n        return prototypeLink.Lock();\n    }\n\n    Widget::InternalChildrenEditableEditable::InternalChildrenEditableEditable(RefCounter* refCounter) :\n        SceneEditableObject(refCounter)\n    {}\n\n    Widget::InternalChildrenEditableEditable::InternalChildrenEditableEditable(RefCounter* refCounter, const Ref<Widget>& widget) :\n        SceneEditableObject(refCounter), widget(widget)\n    {}\n\n    SceneUID Widget::InternalChildrenEditableEditable::GetID() const\n    {\n        return UID;\n    }\n\n    void Widget::InternalChildrenEditableEditable::GenerateNewID(bool childs /*= true*/)\n    {\n        UID = Math::Random();\n    }\n\n    const String& Widget::InternalChildrenEditableEditable::GetName() const\n    {\n        static String name = \"internal children\";\n        return name;\n    }\n\n    void Widget::InternalChildrenEditableEditable::SetName(const String& name)\n    {}\n\n    Vector<Ref<SceneEditableObject>> Widget::InternalChildrenEditableEditable::GetEditableChildren() const\n    {\n        return widget.Lock()->mInternalWidgets.Convert<Ref<SceneEditableObject>>([](const Ref<Widget>& x) { return DynamicCast<SceneEditableObject>(x); });\n    }\n\n    Ref<SceneEditableObject> Widget::InternalChildrenEditableEditable::GetEditableParent() const\n    {\n        return DynamicCast<SceneEditableObject>(widget.Lock());\n    }\n\n    void Widget::InternalChildrenEditableEditable::SetEditableParent(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {}\n\n    void Widget::InternalChildrenEditableEditable::AddEditableChild(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {\n        if (auto widget = DynamicCast<Widget>(object))\n            widget->SetInternalParent(widget);\n    }\n\n    void Widget::InternalChildrenEditableEditable::SetIndexInSiblings(int idx)\n    {}\n\n    bool Widget::InternalChildrenEditableEditable::IsSupportsDeleting() const\n    {\n        return false;\n    }\n\n    Basis Widget::InternalChildrenEditableEditable::GetTransform() const\n    {\n        return widget.Lock()->GetTransform();\n    }\n\n    bool Widget::InternalChildrenEditableEditable::IsSupportsSnapping() const\n    {\n        return false;\n    }\n\n    Ref<SceneEditableObject> Widget::InternalChildrenEditableEditable::GetEditableLink() const\n    {\n        return prototypeLink.Lock();\n    }\n\n#endif // IS_EDITOR\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Widget>);\n// --- META ---\n\nDECLARE_CLASS(o2::Widget, o2__Widget);\n\n#if  IS_EDITOR\nDECLARE_CLASS(o2::Widget::LayersEditable, o2__Widget__LayersEditable);\n#endif\n\n#if  IS_EDITOR\nDECLARE_CLASS(o2::Widget::InternalChildrenEditableEditable, o2__Widget__InternalChildrenEditableEditable);\n#endif\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widget.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/AnimationAsset.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/ISceneDrawable.h\"\n#include \"o2/Scene/SceneLayer.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Utils/Editor/Attributes/AnimatableAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/DefaultTypeAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/DontDeleteAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/InvokeOnChangeAttribute.h\"\n#include \"o2/Utils/Math/Layout.h\"\n\nnamespace o2\n{\n    class IRectDrawable;\n    class WidgetLayer;\n    class WidgetLayout;\n    class WidgetLayoutData;\n\n    // ------------------------------------------------------\n    // Basic UI Widget. Its a simple and basic element of UI, \n    // everything other UI's are based on this\n    // ------------------------------------------------------\n    class Widget : public Actor\n    {\n    public:\n        PROPERTIES(Widget);\n\n        PROPERTY(bool, enabledForcibly, SetEnabledForcible, IsEnabled); // Enable property, works forcibly @EDITOR_IGNORE @ANIMATABLE \n\n        PROPERTY(float, transparency, SetTransparency, GetTransparency); // Transparency property \n        GETTER(float, resTransparency, GetResTransparency);              // Result transparency getter, depends on parent transparency @EDITOR_IGNORE @ANIMATABLE\n\n        GETTER(Vector<Ref<Widget>>, childrenWidgets, GetChildrenNonConst); // Widget children getter\n\n        GETTER(Vector<Ref<WidgetLayer>>, layers, GetLayers); // Layers getter\n        GETTER(Vector<Ref<WidgetState>>, states, GetStates); // States getter\n\n        ACCESSOR(Ref<Widget>, childWidget, String, GetChildWidget, GetAllChilds);                // Widget child accessor by path like \"child/subchild/somechild\"\n        ACCESSOR(Ref<Widget>, internalWidget, String, GetInternalWidget, GetAllInternalWidgets); // Widget internals accessor by path like \"child/subchild/somechild\"\n        ACCESSOR(Ref<WidgetLayer>, layer, String, GetLayer, GetAllLayers);                       // Widget layer accessor by path like \"layer/sublayer/target\"\n        ACCESSOR(Ref<WidgetState>, state, String, GetStateObject, GetAllStates);                 // Widget state accessor by name\n\n    public:\n        static const int topLayersDepth = 1000; // Threshold value for separating bottom and top layers\n        \n        WidgetLayout* const layout; // Widget layout @EDITOR_IGNORE\n\n    public:\n        Function<void()> onLayoutUpdated; // Layout change event @EDITOR_IGNORE\n        Function<void()> onFocused;       // Widget focused event @EDITOR_IGNORE\n        Function<void()> onUnfocused;     // Widget unfocused event @EDITOR_IGNORE\n        Function<void()> onShow;          // Widget showing vent @EDITOR_IGNORE\n        Function<void()> onHide;          // Widget hiding event @EDITOR_IGNORE\n\n    public:\n        // Default constructor @SCRIPTABLE\n        explicit Widget(RefCounter* refCounter, ActorCreateMode mode = ActorCreateMode::Default);\n\n        // Widget constructor from prototype\n        Widget(RefCounter* refCounter, const AssetRef<ActorAsset>& prototype, ActorCreateMode mode = ActorCreateMode::Default);\n\n        // Widget constructor with components\n        Widget(RefCounter* refCounter, Vector<Ref<Component>> components, ActorCreateMode mode = ActorCreateMode::Default);\n\n        // Copy-constructor\n        Widget(RefCounter* refCounter, const Widget& other);\n\n        // Virtual destructor\n        virtual ~Widget();\n\n        // Copy-operator\n        Widget& operator=(const Widget& other);\n\n        // Updates layers, states and widget\n        void Update(float dt) override;\n\n        // Updates childs\n        void UpdateChildren(float dt) override;\n\n        // Updates self transform, dependent parents and children transforms\n        void UpdateTransform() override;\n\n        // Updates children and internal children transforms\n        void UpdateChildrenTransforms() override;\n\n\t\t// Recursively invokes function for each actor in this and children, including internal widgets\n\t\tvoid ForEachActor(const Function<bool(Actor&)>& func) override;\n\n        // Draws widget and child widgets with not overridden depth\n        void Draw() override;\n\n        // Forcible drawing in area with transparency @SCRIPTABLE\n        void ForceDraw(const RectF& area, float transparency);\n\n        // Sets layout dirty, and update it in update loop @SCRIPTABLE\n        void SetLayoutDirty();\n\n        // Returns parent widget @SCRIPTABLE\n        const WeakRef<Widget>& GetParentWidget() const;\n\n        // Returns children rectangle layout @SCRIPTABLE\n        const RectF& GetChildrenWorldRect() const;\n\n        // Returns child widget by path (like \"root/some node/other node/target node\") @SCRIPTABLE\n        Ref<Widget> GetChildWidget(const String& path) const;\n\n        // Add child actor @SCRIPTABLE\n        Ref<Actor> AddChild(const Ref<Actor>& actor) override;\n\n        // Add child actor @SCRIPTABLE\n        Ref<Actor> AddChild(const Ref<Actor>& actor, int index) override;\n\n        // Adds child widget and returns them @SCRIPTABLE\n        Ref<Widget> AddChildWidget(const Ref<Widget>& widget);\n\n        // Adds child widget at position and returns them\n        Ref<Widget> AddChildWidget(const Ref<Widget>& widget, int position);\n\n        // Returns constant children widgets vector\n        const Vector<Ref<Widget>>& GetChildWidgets() const;\n\n        // Sets index position in parent or scene @SCRIPTABLE\n        void SetIndexInSiblings(int index) override;\n\n        // Adds layer @SCRIPTABLE\n        Ref<WidgetLayer> AddLayer(const Ref<WidgetLayer>& layer);\n\n        // Adds layer @SCRIPTABLE_NAME(AddLayerNew)\n        Ref<WidgetLayer> AddLayer(const String& name, const Ref<IRectDrawable>& drawable,\n                                  const Layout& layout = Layout::BothStretch(), float depth = 0.0f);\n\n        // Removes layer @SCRIPTABLE\n        void RemoveLayer(const Ref<WidgetLayer>& layer);\n\n        // Removes layer @SCRIPTABLE_NAME(RemoveLayerByPath)\n        void RemoveLayer(const String& path);\n\n        // Removes all layers @SCRIPTABLE\n        void RemoveAllLayers();\n\n        // Returns layer by path. Returns null if layer isn't exist @SCRIPTABLE\n        Ref<WidgetLayer> GetLayer(const String& path) const;\n\n        // Returns layer by name in layers hierarchy. Returns null if layer isn't exist @SCRIPTABLE\n        Ref<WidgetLayer> FindLayer(const String& name) const;\n\n        // Searches layer with drawable with specified type\n        template<typename _type>\n        Ref<_type> GetLayerDrawableByType();\n\n        // Returns layer by path. Returns null if layer isn't exist or layer drawable has different type\n        template<typename _type>\n        Ref<_type> GetLayerDrawable(const String& path) const;\n\n        // Returns all layers @SCRIPTABLE\n        const Vector<Ref<WidgetLayer>>& GetLayers() const;\n\n        // Adds new state with name @SCRIPTABLE_NAME(AddStateNew)\n        Ref<WidgetState> AddState(const String& name);\n\n        // Adds new state with name and animation @SCRIPTABLE_NAME(AddStateWithClip)\n        Ref<WidgetState> AddState(const String& name, const Ref<AnimationClip>& animation);\n\n        // Adds new state with name and animation @SCRIPTABLE_NAME(AddStateWithClipAsset)\n        Ref<WidgetState> AddState(const String& name, const AssetRef<AnimationAsset>& animation);\n\n        // Adds state @SCRIPTABLE\n        Ref<WidgetState> AddState(const Ref<WidgetState>& state, bool showAnimErrors = true);\n\n        // Removes state by name @SCRIPTABLE_NAME(RemoveStateByName)\n        bool RemoveState(const String& name);\n\n        // Removes state @SCRIPTABLE\n        bool RemoveState(const Ref<WidgetState>& state);\n\n        // Removes all states @SCRIPTABLE\n        void RemoveAllStates();\n\n        // Sets state value @SCRIPTABLE\n        void SetState(const String& name, bool state);\n\n        // Sets state value immediately @SCRIPTABLE\n        void SetStateForcible(const String& name, bool state);\n\n        // Returns state value @SCRIPTABLE\n        bool GetState(const String& name) const;\n\n        // Returns state object by name @SCRIPTABLE\n        Ref<WidgetState> GetStateObject(const String& name) const;\n\n        // Returns all states @SCRIPTABLE\n        const Vector<Ref<WidgetState>>& GetStates() const;\n\n        // Sets widget's transparency\n        void SetTransparency(float transparency);\n\n        // Returns widget's transparency\n        float GetTransparency() const;\n\n        // Returns widget's result transparency (depends on parent's result transparency) @SCRIPTABLE\n        float GetResTransparency() const;\n\n        // Sets visibility @SCRIPTABLE\n        void SetEnabledForcible(bool visible);\n\n        // Sets visibility to true @SCRIPTABLE\n        void Show(bool forcible = false);\n\n        // Sets visibility to false @SCRIPTABLE\n        void Hide(bool forcible = false);\n\n        // Focus this widget @SCRIPTABLE\n        void Focus();\n\n        // Unfocus this widget @SCRIPTABLE\n        void Unfocus();\n\n        // Returns is this widget focused @SCRIPTABLE\n        bool IsFocused() const;\n\n        // Returns is this widget can be focused @SCRIPTABLE\n        virtual bool IsFocusable() const;\n\n        // Sets widget can be focused @SCRIPTABLE\n        void SetFocusable(bool focusable);\n\n        // Returns true if point is under drawable @SCRIPTABLE\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Sets parent,  doesn't adds to parent's children but adds to internal children @SCRIPTABLE\n        void SetInternalParent(const Ref<Widget>& parent, bool worldPositionStays = false);\n\n        // Adds widget to internal children @SCRIPTABLE\n        void AddInternalWidget(const Ref<Widget>& widget, bool worldPositionStays = false);\n\n\t\t// Removes widget from internal children @SCRIPTABLE\n\t\tvoid RemoveInternalWidget(const Ref<Widget>& widget);\n\n        // Returns internal child widget by path (like \"root/some node/other node/target node\") @SCRIPTABLE\n        Ref<Widget> GetInternalWidget(const String& path) const;\n\n        // Returns internal child widget by path (like \"root/some node/other node/target node\")\n        template<typename _type>\n        Ref<_type> GetInternalWidgetByType(const String& path) const;\n\n        // Searches widget with name in internal widgets hierarchy @SCRIPTABLE\n        Ref<Widget> FindInternalWidget(const String& name) const;\n\n        // Searches widget with type and name in internal widgets hierarchy\n        template<typename _type>\n        Ref<_type> FindInternalWidgetByType(const String& name) const;\n\n        // Searches widget with type in internal widgets hierarchy\n        template<typename _type>\n        Ref<_type> FindInternalWidgetByType() const;\n\n        // Searches actor with id in this and this children @SCRIPTABLE\n        Ref<Actor> FindActorById(SceneUID id) override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        SERIALIZABLE(Widget);\n        CLONEABLE_REF(Widget);\n\n    protected:\n        using Actor::mState;\n\n        Vector<Ref<WidgetLayer>> mLayers; // Layers array @DONT_DELETE @DEFAULT_TYPE(o2::WidgetLayer)\n        Vector<Ref<WidgetState>> mStates; // States array @DONT_DELETE @DEFAULT_TYPE(o2::WidgetState) @EDITOR_PROPERTY @INVOKE_ON_CHANGE(OnStatesListChanged)\n\n        WeakRef<Widget>     mParentWidget;    // Parent widget. When parent is not widget, this field will be null \n        Vector<Ref<Widget>> mChildWidgets;    // Children widgets, a part of all children @DONT_DELETE @DEFAULT_TYPE(o2::Widget)\n        Vector<Ref<Widget>> mInternalWidgets; // Internal widgets, used same as children widgets, but not really children @DONT_DELETE @DEFAULT_TYPE(o2::Widget)\n\n        float mTransparency = 1.0f;    // Widget transparency @SERIALIZABLE\n        float mResTransparency = 1.0f; // Widget result transparency, depends on parent's result transparency\n\n        Vector<Ref<WidgetLayer>> mDrawingLayers;    // Layers ordered by depth, which drawing before children (depth < layersDepthThreshold) @DONT_DELETE @DEFAULT_TYPE(o2::WidgetLayer)\n        Vector<Ref<WidgetLayer>> mTopDrawingLayers; // Layers ordered by depth, which drawing after children (depth > layersDepthThreshold) @DONT_DELETE @DEFAULT_TYPE(o2::WidgetLayer)\n\n        Ref<WidgetState> mFocusedState;        // Focused widget state @DONT_DELETE @DEFAULT_TYPE(o2::WidgetState)\n        bool             mIsFocused = false;   // Is widget focused\n        bool             mIsFocusable = false; // Is widget can be focused @SERIALIZABLE\n\n        Ref<WidgetState> mVisibleState; // Widget visibility state @DONT_DELETE @DEFAULT_TYPE(o2::WidgetState)\n\n        bool mIsClipped = false; // Is widget fully clipped by some scissors\n\n        RectF mBounds;           // Widget bounds by drawing layers\n        RectF mBoundsWithChilds; // Widget with childs bounds\n\n    protected:\n        // Regular serializing without prototype\n        void SerializeRaw(DataValue& node) const override;\n\n        // Regular deserializing without prototype\n        void DeserializeRaw(const DataValue& node) override;\n\n        // Regular serializing with prototype\n        void SerializeWithProto(DataValue& node) const override;\n\n        // Regular deserializing with prototype\n        void DeserializeWithProto(const DataValue& node) override;\n\n        // Completion deserialization callback; initializes layers and children\n        void OnDeserialized(const DataValue& node) override;\n\n        // Completion deserialization delta callback; initializes layers and children\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n        // Updates result read enable flag\n        void UpdateResEnabled(bool withChildren = true) override;\n\n        // Updates enabling\n        void UpdateResEnabledInHierarchy(bool withChildren = true) override;\n\n        // Called when transformation was changed and updated\n        void OnTransformUpdated() override;\n\n        // Called when actor enabled in hierarchy\n        void OnEnabled() override;\n\n        // Called when actor disabled in hierarchy\n        void OnDisabled() override;\n\n        // Called when parent changed\n        void OnParentChanged(const Ref<Actor>& oldParent) override;\n\n        // Called when actor children has rearranged; updates inherited depth drawables list\n        void OnChildrenChanged() override;\n\n        // Called when child actor was added\n        void OnChildAdded(const Ref<Actor>& child) override;\n\n        // Called when child actor was removed\n        void OnChildRemoved(const Ref<Actor>& child) override;\n\n        // Called when actor including from scene, including this to layer drawables\n        void OnAddToScene() override;\n\n        // Called when actor excluding from scene, removes this from layer drawables\n        void OnRemoveFromScene() override;\n\n\t\t// Draws widget's layers (below children)\n        virtual void DrawLayers();\n\n\t\t// Draws widget's top layers (above children)\n\t\tvirtual void DrawTopLayers();\n\n\t\t// Draws internal children\n        virtual void DrawInternalChildren();\n\n        // Updates child widgets list\n        void UpdateChildWidgetsList();\n\n        // Returns layout data reference\n        WidgetLayoutData& GetLayoutData();\n\n        // Returns layout data reference\n        const WidgetLayoutData& GetLayoutData() const;\n\n        // Sets children world rectangle. Here you can override children position\n        virtual void SetChildrenWorldRect(const RectF& childrenWorldRect);\n\n        // Moves widget's to delta and checks for clipping\n        virtual void MoveAndCheckClipping(const Vec2F& delta, const RectF& clipArea);\n\n        // Called when child widget was added\n        virtual void OnChildAdded(const Ref<Widget>& child);\n\n        // Called when child widget was removed\n        virtual void OnChildRemoved(const Ref<Widget>& child);\n\n        // Called when widget was selected\n        virtual void OnFocused();\n\n        // Called when widget was deselected\n        virtual void OnUnfocused();\n\n        // Returns layout width with children\n        virtual float GetMinWidthWithChildren() const;\n\n        // Returns layout height with children\n        virtual float GetMinHeightWithChildren() const;\n\n        // Returns layout width weight with children\n        virtual float GetWidthWeightWithChildren() const;\n\n        // Returns layout height weight with children\n        virtual float GetHeightWeightWithChildren() const;\n\n        // Updates bounds by drawing layers\n        virtual void UpdateBounds();\n\n        // Updates bound with children\n        virtual void UpdateBoundsWithChilds();\n\n        // Checks widget clipping by area\n        virtual void CheckClipping(const RectF& clipArea);\n\n        // Updates transparency for this and children widgets\n        virtual void UpdateTransparency();\n\n        // Updates result visibility\n        virtual void UpdateVisibility(bool updateLayout = true);\n\n        // Updates layers layouts, calls after updating widget layout\n        virtual void UpdateLayersLayouts();\n\n        // Called when child widget was selected\n        virtual void OnChildFocused(const Ref<Widget>& child);\n\n        // Called when layer added and updates drawing sequence\n        virtual void OnLayerAdded(const Ref<WidgetLayer>& layer);\n\n        // Called when widget state was added\n        virtual void OnStateAdded(const Ref<WidgetState>& state);\n\n        // Called from editor, refreshes states\n        void OnStatesListChanged();\n\n        // Draws debug frame by mAbsoluteRect\n        void DrawDebugFrame();\n\n        // Updates layers drawing sequence\n        void UpdateLayersDrawingSequence();\n\n        // Sets new target for all states animations\n        void RetargetStatesAnimations();\n\n        // Sets parent widget, used for property\n        void SetParentWidget(const Ref<Widget>& widget);\n\n        // Returns children widgets (for property)\n        Vector<Ref<Widget>>& GetChildrenNonConst();\n\n        // Returns layers (for property)\n        Vector<Ref<WidgetLayer>>& GetLayersNonConst();\n\n        // Returns states (for property)\n        Vector<Ref<WidgetState>>& GetStatesNonConst();\n\n        // Returns dictionary of all layers by names\n        Map<String, Ref<WidgetLayer>> GetAllLayers();\n\n        // Returns dictionary of all children by names\n        Map<String, Ref<Widget>> GetAllChilds();\n\n        // Returns dictionary of all internal widgets by names\n        Map<String, Ref<Widget>> GetAllInternalWidgets();\n\n        // Returns dictionary of all states by names\n        Map<String, Ref<WidgetState>> GetAllStates();\n\n#if IS_SCRIPTING_SUPPORTED\n    public:\n        // Returns layout for scripting @SCRIPTABLE_NAME(GetLayout)\n        WidgetLayout* GetLayoutScript();\n#endif\n\n        friend class ContextMenu;\n        friend class CustomDropDown;\n        friend class CustomList;\n        friend class CustomList2;\n        friend class DropDown;\n        friend class EditBox;\n        friend class GridLayout;\n        friend class GridLayoutScrollArea;\n        friend class HorizontalLayout;\n        friend class HorizontalProgress;\n        friend class HorizontalScrollBar;\n        friend class Label;\n        friend class List;\n        friend class LongList;\n        friend class MenuPanel;\n        friend class PopupWidget;\n        friend class Scene;\n        friend class ScrollArea;\n        friend class Spoiler;\n        friend class Tree;\n        friend class TreeNode;\n        friend class UIManager;\n        friend class VerticalLayout;\n        friend class VerticalProgress;\n        friend class VerticalScrollBar;\n        friend class WidgetLayer;\n        friend class WidgetLayout;\n        friend class Window;\n\n        FRIEND_REF_MAKE();\n\n#if IS_EDITOR\n    public:\n        class LayersEditable : public SceneEditableObject\n        {\n        public:\n            WeakRef<Widget> widget;\n\n            SceneUID UID = Math::Random();\n\n            WeakRef<LayersEditable> prototypeLink;\n\n        public:\n            // Default constructor\n            LayersEditable(RefCounter* refCounter);\n\n            // Default constructor with own widget\n            LayersEditable(RefCounter* refCounter, const Ref<Widget>& widget);\n\n            // Returns unique id\n            SceneUID GetID() const override;\n\n            // Generates new random id \n            void GenerateNewID(bool childs = true) override;\n\n            // Returns name of object\n            const String& GetName() const override;\n\n            // Sets name of object\n            void SetName(const String& name) override;\n\n            // Returns object's link to prototype\n            Ref<SceneEditableObject> GetEditableLink() const override;\n\n            // Returns list of object's children\n            Vector<Ref<SceneEditableObject>> GetEditableChildren() const override;\n\n            // Returns object's parent object. Return nullptr when it is a root scene object\n            Ref<SceneEditableObject> GetEditableParent() const override;\n\n            // Sets parent object. nullptr means make this object as root. idx is place in parent children. idx == -1 means last\n            void SetEditableParent(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n            // Adds child. idx is place in parent children. idx == -1 means last\n            void AddEditableChild(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n            // Sets index in siblings - children of parent\n            void SetIndexInSiblings(int idx) override;\n\n            // Returns is that type of object can be deleted from editor\n            bool IsSupportsDeleting() const override;\n\n            // Returns transform, override when it's supports\n            Basis GetTransform() const override;\n\n            // Returns is that type of object can be used to snapping while transforming\n            bool IsSupportsSnapping() const override;\n\n            SERIALIZABLE(LayersEditable);\n\n            friend class Widget;\n        };\n\n        class InternalChildrenEditableEditable : public SceneEditableObject\n        {\n        public:\n            WeakRef<Widget> widget;\n\n            SceneUID UID = Math::Random();\n\n            WeakRef<InternalChildrenEditableEditable> prototypeLink;\n\n        public:\n            // Default constructor\n            InternalChildrenEditableEditable(RefCounter* refCounter);\n\n            // Default constructor with own widget\n            InternalChildrenEditableEditable(RefCounter* refCounter, const Ref<Widget>& widget);\n\n            // Returns unique id\n            SceneUID GetID() const override;\n\n            // Generates new random id \n            void GenerateNewID(bool childs = true) override;\n\n            // Returns name of object\n            const String& GetName() const override;\n\n            // Sets name of object\n            void SetName(const String& name) override;\n\n            // Returns object's link to prototype\n            Ref<SceneEditableObject> GetEditableLink() const override;\n\n            // Returns list of object's children\n            Vector<Ref<SceneEditableObject>> GetEditableChildren() const override;\n\n            // Returns object's parent object. Return nullptr when it is a root scene object\n            Ref<SceneEditableObject> GetEditableParent() const override;\n\n            // Sets parent object. nullptr means make this object as root\n            void SetEditableParent(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n            // Adds child. idx is place in parent children. idx == -1 means last\n            void AddEditableChild(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n            // Sets index in siblings - children of parent\n            void SetIndexInSiblings(int idx) override;\n\n            // Returns is that type of object can be deleted from editor\n            bool IsSupportsDeleting() const override;\n\n            // Returns transform, override when it's supports\n            Basis GetTransform() const override;\n\n            // Returns is that type of object can be used to snapping while transforming\n            bool IsSupportsSnapping() const override;\n\n            SERIALIZABLE(InternalChildrenEditableEditable);\n\n            friend class Widget;\n        };\n\n    public:\n        static bool isEditorLayersVisible;           // Is widgets layers visible in hierarchy\n        static bool isEditorInternalChildrenVisible; // Is widgets internal children visible in hierarchy\n\n        Ref<LayersEditable>                   layersEditable;           // @EDITOR_IGNORE\n        Ref<InternalChildrenEditableEditable> internalChildrenEditable; // @EDITOR_IGNORE\n\n    public:\n        // Sets parent object. nullptr means make this object as root\n        void SetEditableParent(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n        // Returns object's parent object. Return nullptr when it is a root scene object\n        Ref<SceneEditableObject> GetEditableParent() const override;\n\n        // Returns list of object's children\n        Vector<Ref<SceneEditableObject>> GetEditableChildren() const override;\n\n        // Adds child. idx is place in parent children. idx == -1 means last\n        void AddEditableChild(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n        // Returns is that type of object can be transformed\n        bool IsSupportsTransforming() const override;\n\n        // Returns transform, override when it's supports\n        Basis GetTransform() const override;\n\n        // Sets transform of object, override when it's supports\n        void SetTransform(const Basis& transform) override;\n\n        // Returns is that type of object can be transformed with layout\n        bool IsSupportsLayout() const override;\n\n        // Returns layout, override when it's supports\n        Layout GetLayout() const override;\n\n        // Sets layout of object, override when it's supports\n        void SetLayout(const Layout& layout) override;\n\n        // Returns pointer to owner editable object\n        Ref<SceneEditableObject> GetEditableOwner() override;\n\n    protected:\n        // Initializes layers and internal children editables\n        void InitEditables();\n\n        friend class LayersEditable;\n        friend class InternalChildrenEditableEditable;\n#endif // IS_EDITOR\n    };\n}\n\n#include \"o2/Scene/UI/WidgetLayer.h\"\n\nnamespace o2\n{\n    template<typename _type>\n    Ref<_type> Widget::GetLayerDrawableByType()\n    {\n        for (auto& layer : mLayers)\n        {\n            if (layer->GetDrawable() && layer->GetDrawable()->GetType() == TypeOf(_type))\n                return DynamicCast<_type>(layer->GetDrawable());\n        }\n\n        for (auto& layer : mLayers)\n        {\n            auto res = layer->FindChild<_type>();\n            if (res)\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    Ref<_type> Widget::GetLayerDrawable(const String& path) const\n    {\n        auto layer = GetLayer(path);\n        if (layer && layer->GetDrawable() && layer->GetDrawable()->GetType() == TypeOf(_type))\n            return DynamicCast<_type>(layer->GetDrawable());\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    Ref<_type> Widget::GetInternalWidgetByType(const String& path) const\n    {\n        return DynamicCast<_type>(GetInternalWidget(path));\n    }\n\n    template<typename _type>\n    Ref<_type> Widget::FindInternalWidgetByType(const String& name) const\n    {\n        for (auto& widget : mInternalWidgets)\n        {\n            if (widget->GetName() == name)\n            {\n                if (auto res = DynamicCast<_type>(widget))\n                    return res;\n            }\n\n            if (auto res = widget->FindChildByTypeAndName<_type>((String)name))\n                return res;\n\n            if (auto internalWidget = widget->FindInternalWidget(name))\n            {\n                if (auto res = DynamicCast<_type>(internalWidget))\n                    return res;\n            }\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    Ref<_type> Widget::FindInternalWidgetByType() const\n    {\n        for (auto& widget : mInternalWidgets)\n        {\n            if (auto res = DynamicCast<_type>(widget))\n                return res;\n\n            if (auto res = widget->FindChildByType<_type>())\n                return res;\n\n            if (auto res = widget->FindInternalWidgetByType<_type>())\n                return res;\n        }\n\n        return nullptr;\n    }\n\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Widget)\n{\n    BASE_CLASS(o2::Actor);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Widget)\n{\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().NAME(enabledForcibly);\n    FIELD().PUBLIC().NAME(transparency);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().NAME(resTransparency);\n    FIELD().PUBLIC().NAME(childrenWidgets);\n    FIELD().PUBLIC().NAME(layers);\n    FIELD().PUBLIC().NAME(states);\n    FIELD().PUBLIC().NAME(childWidget);\n    FIELD().PUBLIC().NAME(internalWidget);\n    FIELD().PUBLIC().NAME(layer);\n    FIELD().PUBLIC().NAME(state);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(layout);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onLayoutUpdated);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onFocused);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onUnfocused);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onShow);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(onHide);\n    FIELD().PROTECTED().DEFAULT_TYPE_ATTRIBUTE(o2::WidgetLayer).DONT_DELETE_ATTRIBUTE().NAME(mLayers);\n    FIELD().PROTECTED().DEFAULT_TYPE_ATTRIBUTE(o2::WidgetState).DONT_DELETE_ATTRIBUTE().EDITOR_PROPERTY_ATTRIBUTE().INVOKE_ON_CHANGE_ATTRIBUTE(OnStatesListChanged).NAME(mStates);\n    FIELD().PROTECTED().NAME(mParentWidget);\n    FIELD().PROTECTED().DEFAULT_TYPE_ATTRIBUTE(o2::Widget).DONT_DELETE_ATTRIBUTE().NAME(mChildWidgets);\n    FIELD().PROTECTED().DEFAULT_TYPE_ATTRIBUTE(o2::Widget).DONT_DELETE_ATTRIBUTE().NAME(mInternalWidgets);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mTransparency);\n    FIELD().PROTECTED().DEFAULT_VALUE(1.0f).NAME(mResTransparency);\n    FIELD().PROTECTED().NAME(mDrawingLayers);\n    FIELD().PROTECTED().DEFAULT_TYPE_ATTRIBUTE(o2::WidgetState).DONT_DELETE_ATTRIBUTE().NAME(mFocusedState);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsFocused);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mIsFocusable);\n    FIELD().PROTECTED().DEFAULT_TYPE_ATTRIBUTE(o2::WidgetState).DONT_DELETE_ATTRIBUTE().NAME(mVisibleState);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsClipped);\n    FIELD().PROTECTED().NAME(mBounds);\n    FIELD().PROTECTED().NAME(mBoundsWithChilds);\n#if  IS_EDITOR\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(layersEditable);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(internalChildrenEditable);\n#endif\n}\nEND_META;\nCLASS_METHODS_META(o2::Widget)\n{\n\n    typedef Map<String, Ref<WidgetLayer>> _tmp1;\n    typedef Map<String, Ref<Widget>> _tmp2;\n    typedef Map<String, Ref<Widget>> _tmp3;\n    typedef Map<String, Ref<WidgetState>> _tmp4;\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(RefCounter*, ActorCreateMode);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const AssetRef<ActorAsset>&, ActorCreateMode);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, Vector<Ref<Component>>, ActorCreateMode);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Widget&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateChildren, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateTransform);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateChildrenTransforms);\n    FUNCTION().PUBLIC().SIGNATURE(void, ForEachActor, const Function<bool(Actor&)>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, ForceDraw, const RectF&, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetLayoutDirty);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const WeakRef<Widget>&, GetParentWidget);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const RectF&, GetChildrenWorldRect);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Widget>, GetChildWidget, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Actor>, AddChild, const Ref<Actor>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Actor>, AddChild, const Ref<Actor>&, int);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Widget>, AddChildWidget, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, AddChildWidget, const Ref<Widget>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<Widget>>&, GetChildWidgets);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetIndexInSiblings, int);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<WidgetLayer>, AddLayer, const Ref<WidgetLayer>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<WidgetLayer>, AddLayer, const String&, const Ref<IRectDrawable>&, const Layout&, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveLayer, const Ref<WidgetLayer>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_NAME_ATTRIBUTE(RemoveLayerByPath).SIGNATURE(void, RemoveLayer, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveAllLayers);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<WidgetLayer>, GetLayer, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<WidgetLayer>, FindLayer, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const Vector<Ref<WidgetLayer>>&, GetLayers);\n    FUNCTION().PUBLIC().SCRIPTABLE_NAME_ATTRIBUTE(AddStateNew).SIGNATURE(Ref<WidgetState>, AddState, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_NAME_ATTRIBUTE(AddStateWithClip).SIGNATURE(Ref<WidgetState>, AddState, const String&, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_NAME_ATTRIBUTE(AddStateWithClipAsset).SIGNATURE(Ref<WidgetState>, AddState, const String&, const AssetRef<AnimationAsset>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<WidgetState>, AddState, const Ref<WidgetState>&, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_NAME_ATTRIBUTE(RemoveStateByName).SIGNATURE(bool, RemoveState, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, RemoveState, const Ref<WidgetState>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveAllStates);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetState, const String&, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetStateForcible, const String&, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, GetState, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<WidgetState>, GetStateObject, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const Vector<Ref<WidgetState>>&, GetStates);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTransparency, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetTransparency);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetResTransparency);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetEnabledForcible, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Show, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Hide, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Focus);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Unfocus);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsFocused);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsFocusable);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetFocusable, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetInternalParent, const Ref<Widget>&, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, AddInternalWidget, const Ref<Widget>&, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveInternalWidget, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Widget>, GetInternalWidget, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Widget>, FindInternalWidget, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Actor>, FindActorById, SceneUID);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PROTECTED().SIGNATURE(void, SerializeRaw, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeserializeRaw, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SerializeWithProto, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeserializeWithProto, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateResEnabled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateResEnabledInHierarchy, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnParentChanged, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildrenChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildAdded, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildRemoved, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawLayers);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawTopLayers);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawInternalChildren);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateChildWidgetsList);\n    FUNCTION().PROTECTED().SIGNATURE(WidgetLayoutData&, GetLayoutData);\n    FUNCTION().PROTECTED().SIGNATURE(const WidgetLayoutData&, GetLayoutData);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetChildrenWorldRect, const RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveAndCheckClipping, const Vec2F&, const RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildAdded, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildRemoved, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUnfocused);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetMinWidthWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetMinHeightWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetWidthWeightWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetHeightWeightWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateBounds);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateBoundsWithChilds);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckClipping, const RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTransparency);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateVisibility, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildFocused, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerAdded, const Ref<WidgetLayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateAdded, const Ref<WidgetState>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStatesListChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawDebugFrame);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersDrawingSequence);\n    FUNCTION().PROTECTED().SIGNATURE(void, RetargetStatesAnimations);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetParentWidget, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Ref<Widget>>&, GetChildrenNonConst);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Ref<WidgetLayer>>&, GetLayersNonConst);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Ref<WidgetState>>&, GetStatesNonConst);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp1, GetAllLayers);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp2, GetAllChilds);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp3, GetAllInternalWidgets);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp4, GetAllStates);\n#if  IS_SCRIPTING_SUPPORTED\n    FUNCTION().PUBLIC().SCRIPTABLE_NAME_ATTRIBUTE(GetLayout).SIGNATURE(WidgetLayout*, GetLayoutScript);\n#endif\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEditableParent, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableParent);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<SceneEditableObject>>, GetEditableChildren);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEditableChild, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsTransforming);\n    FUNCTION().PUBLIC().SIGNATURE(Basis, GetTransform);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTransform, const Basis&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsLayout);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableOwner);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitEditables);\n#endif\n}\nEND_META;\n\n#if  IS_EDITOR\nCLASS_BASES_META(o2::Widget::LayersEditable)\n{\n    BASE_CLASS(o2::SceneEditableObject);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Widget::LayersEditable)\n{\n#if  IS_EDITOR\n    FIELD().PUBLIC().NAME(widget);\n    FIELD().PUBLIC().DEFAULT_VALUE(Math::Random()).NAME(UID);\n    FIELD().PUBLIC().NAME(prototypeLink);\n#endif\n}\nEND_META;\nCLASS_METHODS_META(o2::Widget::LayersEditable)\n{\n\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(SceneUID, GetID);\n    FUNCTION().PUBLIC().SIGNATURE(void, GenerateNewID, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableLink);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<SceneEditableObject>>, GetEditableChildren);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableParent);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEditableParent, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEditableChild, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIndexInSiblings, int);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsDeleting);\n    FUNCTION().PUBLIC().SIGNATURE(Basis, GetTransform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsSnapping);\n#endif\n}\nEND_META;\n#endif\n\n#if  IS_EDITOR\nCLASS_BASES_META(o2::Widget::InternalChildrenEditableEditable)\n{\n    BASE_CLASS(o2::SceneEditableObject);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Widget::InternalChildrenEditableEditable)\n{\n#if  IS_EDITOR\n    FIELD().PUBLIC().NAME(widget);\n    FIELD().PUBLIC().DEFAULT_VALUE(Math::Random()).NAME(UID);\n    FIELD().PUBLIC().NAME(prototypeLink);\n#endif\n}\nEND_META;\nCLASS_METHODS_META(o2::Widget::InternalChildrenEditableEditable)\n{\n\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(SceneUID, GetID);\n    FUNCTION().PUBLIC().SIGNATURE(void, GenerateNewID, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableLink);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<SceneEditableObject>>, GetEditableChildren);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableParent);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEditableParent, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEditableChild, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIndexInSiblings, int);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsDeleting);\n    FUNCTION().PUBLIC().SIGNATURE(Basis, GetTransform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsSnapping);\n#endif\n}\nEND_META;\n#endif\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/WidgetLayer.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"WidgetLayer.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n    WidgetLayer::WidgetLayer(RefCounter* refCounter) :\n        WidgetLayerBase(refCounter), interactableLayout(Vec2F(), Vec2F(1.0f, 1.0f), Vec2F(), Vec2F()), mUID(Math::Random())\n    {}\n\n    WidgetLayer::WidgetLayer(RefCounter* refCounter, const WidgetLayer& other) :\n        WidgetLayerBase(refCounter), mDepth(other.mDepth), name(other.name), layout(other.layout),\n        mTransparency(other.mTransparency), interactableLayout(other.interactableLayout), mUID(Math::Random())\n    {\n        if (other.mCopyVisitor)\n            other.mCopyVisitor->OnCopy(&other, this);\n\n        if (other.mDrawable)\n        {\n            mDrawable = other.mDrawable->CloneAsRef<IRectDrawable>();\n            mDrawable->SetSerializeEnabled(false);\n        }\n\n        for (auto& child : other.mChildren)\n        {\n            child->mCopyVisitor = other.mCopyVisitor;\n\n            AddChild(child->CloneAsRef<WidgetLayer>());\n\n            child->mCopyVisitor = nullptr;\n        }\n    }\n\n    WidgetLayer::~WidgetLayer()\n    {\n        mDrawable = nullptr;\n\n        for (auto& child : mChildren)\n        {\n            child->mParent = nullptr;\n            child->SetOwnerWidget(nullptr);\n        }\n\n        mChildren.Clear();\n    }\n\n    WidgetLayer& WidgetLayer::operator=(const WidgetLayer& other)\n    {\n        mChildren.Clear();\n        mDrawable = nullptr;\n\n        mDepth = other.mDepth;\n        name = other.name;\n\n        if (other.mDrawable)\n        {\n            mDrawable = other.mDrawable->CloneAsRef<IRectDrawable>();\n            mDrawable->SetSerializeEnabled(false);\n        }\n\n        for (auto& child : other.mChildren)\n            AddChild(child->CloneAsRef<WidgetLayer>());\n\n        SetTransparency(other.mTransparency);\n\n        if (mOwnerWidget)\n            mOwnerWidget.Lock()->UpdateLayersDrawingSequence();\n\n        return *this;\n    }\n\n    const WeakRef<Widget>& WidgetLayer::GetOwnerWidget() const\n    {\n        if (mOwnerWidget)\n            return mOwnerWidget;\n\n        return mParent.Lock()->GetOwnerWidget();\n    }\n\n    const Ref<WidgetLayer>& WidgetLayer::GetPrototypeLink() const\n    {\n        return mPrototypeLink;\n    }\n\n    void WidgetLayer::SetDrawable(const Ref<IRectDrawable>& drawable)\n    {\n        mDrawable = drawable;\n\n        if (mDrawable)\n            mDrawable->SetSerializeEnabled(false);\n\n        if (auto ownerWidget = mOwnerWidget.Lock())\n        {\n            ownerWidget->UpdateLayersDrawingSequence();\n            ownerWidget->UpdateTransform();\n        }\n    }\n\n    const Ref<IRectDrawable>& WidgetLayer::GetDrawable() const\n    {\n        return mDrawable;\n    }\n\n    void WidgetLayer::Draw()\n    {\n        if (mEnabled && mResTransparency > FLT_EPSILON)\n            mDrawable->Draw();\n    }\n\n    bool WidgetLayer::IsEnabled() const\n    {\n        return mEnabled;\n    }\n\n    bool WidgetLayer::IsEnabledInHierarchy() const\n    {\n        bool parentEnabled = mOwnerWidget ? mOwnerWidget.Lock()->IsEnabledInHierarchy() : mParent.Lock()->IsEnabledInHierarchy();\n        return mEnabled && parentEnabled;\n    }\n\n    void WidgetLayer::SetEnabled(bool enabled)\n    {\n        mEnabled = enabled;\n    }\n\n    Ref<WidgetLayer> WidgetLayer::AddChild(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->mParent)\n            layer->mParent.Lock()->RemoveChild(layer);\n        else if (layer->mOwnerWidget)\n            layer->mOwnerWidget.Lock()->RemoveLayer(layer);\n\n        layer->mParent = Ref(this);\n        mChildren.Add(layer);\n\n        layer->SetOwnerWidget(mOwnerWidget.Lock());\n\n        if (auto ownerWidget = mOwnerWidget.Lock())\n        {\n            ownerWidget->OnLayerAdded(layer);\n            ownerWidget->UpdateLayersDrawingSequence();\n        }\n\n#if IS_EDITOR\n        o2Scene.OnObjectChanged(Ref(this));\n        o2Scene.OnObjectChanged(layer);\n#endif\n\n        return layer;\n    }\n\n    void WidgetLayer::RemoveChild(const Ref<WidgetLayer>& layer)\n    {\n        if (!layer)\n            return;\n\n        layer->mParent = nullptr;\n        mChildren.Remove(layer);\n\n        auto lastOwnerWidget = layer->mOwnerWidget;\n        layer->SetOwnerWidget(nullptr);\n\n        if (lastOwnerWidget)\n            lastOwnerWidget.Lock()->UpdateLayersDrawingSequence();\n\n#if IS_EDITOR\n        o2Scene.OnObjectChanged(Ref(this));\n#endif\n    }\n\n    void WidgetLayer::RemoveAllChildren()\n    {\n        for (auto& child : mChildren)\n        {\n            child->mParent = nullptr;\n            child->SetOwnerWidget(nullptr);\n        }\n\n        mChildren.Clear();\n\n#if IS_EDITOR\n        o2Scene.OnObjectChanged(Ref(this));\n#endif\n    }\n\n    void WidgetLayer::SetParent(const Ref<WidgetLayer>& parent)\n    {\n        if (parent)\n            parent->AddChild(Ref(this));\n        else\n        {\n            if (mParent)\n                mParent.Lock()->RemoveChild(Ref(this));\n\n            mParent = nullptr;\n            SetOwnerWidget(nullptr);\n        }\n    }\n\n    const WeakRef<WidgetLayer>& WidgetLayer::GetParent() const\n    {\n        return mParent;\n    }\n\n    Vector<Ref<WidgetLayer>>& WidgetLayer::GetChildren()\n    {\n        return mChildren;\n    }\n\n    const Vector<Ref<WidgetLayer>>& WidgetLayer::GetChildren() const\n    {\n        return mChildren;\n    }\n\n    void WidgetLayer::PostRefConstruct()\n    {\n        layout.SetOwner(Ref(this));\n    }\n\n    void WidgetLayer::SerializeBasicOverride(DataValue& node) const\n    {\n        if (mPrototypeLink)\n            SerializeWithProto(node);\n        else\n            SerializeRaw(node);\n\n        OnSerialize(node);\n    }\n\n    void WidgetLayer::DeserializeBasicOverride(const DataValue& node)\n    {\n        if (node.FindMember(\"PrototypeLink\"))\n            DeserializeWithProto(node);\n        else\n            DeserializeRaw(node);\n\n        OnDeserialized(node);\n    }\n\n    void WidgetLayer::SerializeRaw(DataValue& node) const\n    {\n        SerializeBasic(node);\n\n        if (!mChildren.IsEmpty())\n            node[\"Children\"] = mChildren;\n    }\n\n    void WidgetLayer::DeserializeRaw(const DataValue& node)\n    {\n        DeserializeBasic(node);\n\n        if (auto childrenNode = node.FindMember(\"Children\"))\n        {\n            for (auto& childNode : *childrenNode)\n            {\n                auto layer = mmake<WidgetLayer>();\n                AddChild(layer);\n                layer->Deserialize(childNode[\"Value\"]);\n            }\n        }\n    }\n\n    void WidgetLayer::SerializeWithProto(DataValue& node) const\n    {\n        SerializeDelta(node, *mPrototypeLink);\n\n        node[\"PrototypeLink\"] = mPrototypeLink->mUID;\n\n        if (!mChildren.IsEmpty())\n        {\n            auto& childrenNode = node.AddMember(\"Children\");\n            childrenNode.SetArray();\n\n            for (auto& child : mChildren)\n                child->Serialize(childrenNode.AddElement());\n        }\n    }\n\n    void WidgetLayer::DeserializeWithProto(const DataValue& node)\n    {\n        if (auto protoNode = node.FindMember(\"PrototypeLink\"))\n        {\n            SceneUID protoUID = *protoNode;\n            if (mParent && mParent.Lock()->mPrototypeLink)\n            {\n                for (auto& protoChild : mParent.Lock()->mPrototypeLink->mChildren)\n                {\n                    if (protoChild->mUID == protoUID)\n                    {\n                        mPrototypeLink = protoChild;\n                        break;\n                    }\n                }\n            }\n            else if (mOwnerWidget && mOwnerWidget.Lock()->mPrototypeLink)\n            {\n                for (auto& protoChild : dynamic_cast<Widget*>(mOwnerWidget.Lock()->mPrototypeLink.Lock().Get())->mLayers)\n                {\n                    if (protoChild->mUID == protoUID)\n                    {\n                        mPrototypeLink = protoChild;\n                        break;\n                    }\n                }\n            }\n        }\n\n        if (mPrototypeLink)\n            DeserializeDelta(node, *mPrototypeLink);\n        else\n            DeserializeBasic(node);\n\n        if (auto childrenNode = node.FindMember(\"Children\"))\n        {\n            for (auto& childNode : *childrenNode)\n            {\n                auto layer = mmake<WidgetLayer>();\n                AddChild(layer);\n                layer->Deserialize(childNode);\n            }\n        }\n    }\n\n    void WidgetLayer::OnDeserialized(const DataValue& node)\n    {\n        for (auto& child : mChildren)\n        {\n            child->mParent = Ref(this);\n            child->mOwnerWidget = mOwnerWidget;\n        }\n\n        if (mDrawable)\n            mDrawable->SetSerializeEnabled(false);\n    }\n\n    void WidgetLayer::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        OnDeserialized(node);\n    }\n\n    Ref<WidgetLayer> WidgetLayer::AddChildLayer(const String& name, const Ref<IRectDrawable>& drawable,\n                                                const Layout& layout /*= Layout::Both()*/, float depth /*= 0.0f*/)\n    {\n        if (Math::Equals(depth, 0.0f))\n            depth = (float)mOwnerWidget.Lock()->mDrawingLayers.Count();\n\n        auto layer = mmake<WidgetLayer>();\n        layer->depth = depth;\n        layer->name = name;\n        layer->mDrawable = drawable;\n        layer->layout = layout;\n\n        return AddChild(layer);\n    }\n\n    Ref<WidgetLayer> WidgetLayer::GetChild(const String& path)\n    {\n        int delPos = path.Find(\"/\");\n        String pathPart = path.SubStr(0, delPos);\n\n        if (pathPart == \"..\")\n        {\n            if (mParent)\n            {\n                if (delPos == -1)\n                    return mParent.Lock();\n                else\n                    return mParent.Lock()->GetChild(path.SubStr(delPos + 1));\n            }\n\n            return nullptr;\n        }\n\n        for (auto& child : mChildren)\n        {\n            if (child->name == pathPart)\n            {\n                if (delPos == -1)\n                    return child;\n                else\n                    return child->GetChild(path.SubStr(delPos + 1));\n            }\n        }\n\n        return nullptr;\n    }\n\n    Ref<WidgetLayer> WidgetLayer::FindChild(const String& name)\n    {\n        for (auto& child : mChildren)\n        {\n            if (child->name == name)\n                return child;\n\n            auto layer = child->FindChild(name);\n            if (layer)\n                return layer;\n        }\n\n        return nullptr;\n    }\n\n    Vector<Ref<WidgetLayer>> WidgetLayer::GetAllChilds() const\n    {\n        Vector<Ref<WidgetLayer>> res = mChildren;\n        for (auto& child : mChildren)\n        {\n            res.Add(child->GetAllChilds());\n        }\n\n        return res;\n    }\n\n    void WidgetLayer::SetDepth(float depth)\n    {\n        mDepth = depth;\n        if (mOwnerWidget)\n            mOwnerWidget.Lock()->UpdateLayersDrawingSequence();\n    }\n\n    float WidgetLayer::GetDepth() const\n    {\n        return mDepth;\n    }\n\n    void WidgetLayer::SetTransparency(float transparency)\n    {\n        mTransparency = transparency;\n        UpdateResTransparency();\n    }\n\n    float WidgetLayer::GetTransparency()\n    {\n        return mTransparency;\n    }\n\n    float WidgetLayer::GetResTransparency() const\n    {\n        return mResTransparency;\n    }\n\n    bool WidgetLayer::IsUnderPoint(const Vec2F& point)\n    {\n        return mInteractableArea.IsInside(point);\n    }\n\n    const RectF& WidgetLayer::GetRect() const\n    {\n        return mAbsolutePosition;\n    }\n\n    void WidgetLayer::SetOwnerWidget(const Ref<Widget>& owner)\n    {\n        mOwnerWidget = owner;\n\n#if IS_EDITOR\n        if (Scene::IsSingletonInitialzed())\n        {\n            if (mOwnerWidget && mOwnerWidget.Lock()->mState == Actor::State::Default)\n                o2Scene.AddEditableObjectToScene(Ref(this));\n            else\n                o2Scene.RemoveEditableObjectFromScene(Ref(this));\n        }\n#endif\n\n        for (auto& child : mChildren)\n            child->SetOwnerWidget(owner);\n\n        UpdateResTransparency();\n    }\n\n    void WidgetLayer::OnLayoutChanged()\n    {\n        if (mUpdatingLayout)\n            return;\n\n        mUpdatingLayout = true;\n\n        if (mOwnerWidget)\n        {\n            mOwnerWidget.Lock()->UpdateLayersLayouts();\n\n#if IS_EDITOR\n            mOwnerWidget.Lock()->OnChanged();\n#endif\n        }\n\n        mUpdatingLayout = false;\n    }\n\n    void WidgetLayer::UpdateLayout()\n    {\n        if (mParent)\n            mAbsolutePosition = layout.Calculate(mParent.Lock()->mAbsolutePosition);\n        else\n            mAbsolutePosition = layout.Calculate(mOwnerWidget.Lock()->layout->GetWorldRect());\n\n        mInteractableArea = interactableLayout.Calculate(mAbsolutePosition);\n\n        if (mDrawable)\n            mDrawable->SetRect(mAbsolutePosition);\n\n        for (auto& child : mChildren)\n            child->UpdateLayout();\n    }\n\n    void WidgetLayer::UpdateResTransparency()\n    {\n        if (mParent)\n            mResTransparency = transparency * mParent.Lock()->mResTransparency;\n        else if (mOwnerWidget)\n            mResTransparency = transparency * mOwnerWidget.Lock()->mResTransparency;\n        else\n            mResTransparency = mTransparency;\n\n        if (mDrawable)\n            mDrawable->SetTransparency(mResTransparency);\n\n        for (auto& child : mChildren)\n            child->UpdateResTransparency();\n    }\n\n    void WidgetLayer::OnAddToScene()\n    {\n#if IS_EDITOR\n        o2Scene.AddEditableObjectToScene(Ref(this));\n#endif\n\n        for (auto& layer : mChildren)\n            layer->OnAddToScene();\n    }\n\n    void WidgetLayer::OnRemoveFromScene()\n    {\n#if IS_EDITOR\n        o2Scene.RemoveEditableObjectFromScene(Ref(this));\n#endif\n\n        for (auto& layer : mChildren)\n            layer->OnRemoveFromScene();\n    }\n\n    Map<String, Ref<WidgetLayer>> WidgetLayer::GetAllChildLayers()\n    {\n        Map<String, Ref<WidgetLayer>> res;\n        for (auto& layer : mChildren)\n            res.Add(layer->name, layer);\n\n        return res;\n    }\n\n    void WidgetLayer::InstantiatePrototypeCloneVisitor::OnCopy(const WidgetLayer* source, WidgetLayer* target)\n    {\n        target->mPrototypeLink = Ref(const_cast<WidgetLayer*>(source));\n    }\n\n    void WidgetLayer::MakePrototypeCloneVisitor::OnCopy(const WidgetLayer* source, WidgetLayer* target)\n    {\n        target->mPrototypeLink = source->mPrototypeLink;\n        const_cast<WidgetLayer*>(source)->mPrototypeLink = Ref(target);\n    }\n\n#if IS_EDITOR\n\n    bool WidgetLayer::IsOnScene() const\n    {\n        if (mOwnerWidget)\n            return mOwnerWidget.Lock()->IsOnScene();\n\n        return false;\n    }\n\n    SceneUID WidgetLayer::GetID() const\n    {\n        return mUID;\n    }\n\n    void WidgetLayer::GenerateNewID(bool childs /*= true*/)\n    {\n        mUID = Math::Random();\n\n        if (childs)\n        {\n            for (auto& child : mChildren)\n                child->GenerateNewID(true);\n        }\n    }\n\n    const String& WidgetLayer::GetName() const\n    {\n        return name;\n    }\n\n    void WidgetLayer::SetName(const String& name)\n    {\n        this->name = name;\n    }\n\n    Vector<Ref<SceneEditableObject>> WidgetLayer::GetEditableChildren() const\n    {\n        return mChildren.Convert<Ref<SceneEditableObject>>([](auto& x) { return DynamicCast<SceneEditableObject>(x); });\n    }\n\n    Ref<SceneEditableObject> WidgetLayer::GetEditableLink() const\n    {\n        return mPrototypeLink;\n    }\n\n    void WidgetLayer::BeginMakePrototype() const\n    {\n        mCopyVisitor = mmake<MakePrototypeCloneVisitor>();\n    }\n\n    void WidgetLayer::BeginInstantiatePrototype() const\n    {\n        mCopyVisitor = mmake<InstantiatePrototypeCloneVisitor>();\n    }\n\n    Ref<SceneEditableObject> WidgetLayer::GetEditableParent() const\n    {\n        if (mParent)\n            return mParent.Lock();\n\n        return mOwnerWidget.Lock()->layersEditable;\n    }\n\n    void WidgetLayer::SetEditableParent(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {\n        if (auto layer = DynamicCast<WidgetLayer>(object))\n            layer->AddChild(Ref(this));\n        else if (auto widget = DynamicCast<Widget>(object))\n            widget->AddLayer(Ref(this));\n        else if (auto layers = DynamicCast<Widget::LayersEditable>(object))\n            layers->AddEditableChild(Ref(this), idx);\n    }\n\n    void WidgetLayer::AddEditableChild(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {\n        if (auto layer = DynamicCast<WidgetLayer>(object))\n            AddChild(layer);\n        else if (auto actor = DynamicCast<Actor>(object))\n            mOwnerWidget.Lock()->AddEditableChild(object, idx);\n    }\n\n    void WidgetLayer::SetIndexInSiblings(int idx)\n    {\n        auto thisRef = Ref(this);\n\n        if (auto parent = mParent.Lock())\n        {\n            int lastIdx = thisRef->mChildren.IndexOf(thisRef);\n            thisRef->mChildren.Insert(thisRef, idx);\n\n            if (idx <= lastIdx)\n                lastIdx++;\n\n            thisRef->mChildren.RemoveAt(lastIdx);\n        }\n        else\n        {\n            auto ownerWidget = mOwnerWidget.Lock();\n            int lastIdx = ownerWidget->mLayers.IndexOf(thisRef);\n            ownerWidget->mLayers.Insert(thisRef, idx);\n\n            if (idx <= lastIdx)\n                lastIdx++;\n\n            ownerWidget->mLayers.RemoveAt(lastIdx);\n        }\n    }\n\n    bool WidgetLayer::CanBeParentedTo(const Type& parentType)\n    {\n        return parentType.IsBasedOn(TypeOf(Widget::LayersEditable));\n    }\n\n    bool WidgetLayer::IsSupportsDisabling() const\n    {\n        return true;\n    }\n\n    bool WidgetLayer::IsSupportsLocking() const\n    {\n        return false;\n    }\n\n    bool WidgetLayer::IsLocked() const\n    {\n        return mIsLocked;\n    }\n\n    bool WidgetLayer::IsLockedInHierarchy() const\n    {\n        bool lockedParent = mOwnerWidget ? mOwnerWidget.Lock()->IsLockedInHierarchy() : mParent.Lock()->IsLockedInHierarchy();\n        return mIsLocked && lockedParent;\n    }\n\n    void WidgetLayer::SetLocked(bool locked)\n    {\n        mIsLocked = locked;\n    }\n\n    bool WidgetLayer::IsSupportsTransforming() const\n    {\n        return true;\n    }\n\n    Basis WidgetLayer::GetTransform() const\n    {\n        return Basis(mAbsolutePosition.LeftBottom(), Vec2F::Right() * mAbsolutePosition.Width(), Vec2F::Up() * mAbsolutePosition.Height());\n    }\n\n    void WidgetLayer::SetTransform(const Basis& transform)\n    {\n        Basis thisTransform = GetTransform();\n        layout.offsetMin += transform.origin - thisTransform.origin;\n        layout.offsetMax += transform.origin - thisTransform.origin +\n            Vec2F(transform.xv.Length() - thisTransform.xv.Length(),\n                  transform.yv.Length() - thisTransform.yv.Length());\n    }\n\n    void WidgetLayer::UpdateTransform()\n    {\n        if (auto ownerWidget = mOwnerWidget.Lock())\n        {\n            ownerWidget->UpdateTransform();\n            ownerWidget->OnChanged();\n        }\n    }\n\n    bool WidgetLayer::IsSupportsPivot() const\n    {\n        return false;\n    }\n\n    void WidgetLayer::SetPivot(const Vec2F& pivot)\n    {}\n\n    Vec2F WidgetLayer::GetPivot() const\n    {\n        return Vec2F();\n    }\n\n    bool WidgetLayer::IsSupportsLayout() const\n    {\n        return true;\n    }\n\n    Layout WidgetLayer::GetLayout() const\n    {\n        return layout;\n    }\n\n    void WidgetLayer::SetLayout(const Layout& layout)\n    {\n        this->layout = layout;\n    }\n\n    void WidgetLayer::OnChanged()\n    {\n        if (mOwnerWidget)\n            mOwnerWidget.Lock()->OnChanged();\n    }\n\n#endif // IS_EDITOR\n}\n// --- META ---\n\nDECLARE_CLASS(o2::WidgetLayer, o2__WidgetLayer);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/WidgetLayer.h",
    "content": "#pragma once\n\n#include \"o2/Render/IRectDrawable.h\"\n#include \"o2/Scene/UI/WidgetLayerLayout.h\"\n#include \"o2/Utils/Basic/ITree.h\"\n#include \"o2/Utils/Editor/Attributes/ExpandedByDefaultAttribute.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n#include \"o2/Utils/Math/Layout.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Widget;\n\n#if IS_EDITOR\n    typedef SceneEditableObject WidgetLayerBase;\n#else\n    struct WidgetLayerBase : public ISerializable, public RefCounterable, public ICloneableRef\n    {\n        WidgetLayerBase() = default;\n        WidgetLayerBase(RefCounter* refCounter) : RefCounterable(refCounter) {}\n    };\n#endif\n\n    // ---------------------\n    // Widget drawable layer\n    // ---------------------\n    class WidgetLayer : public WidgetLayerBase\n    {\n    public:\n        PROPERTIES(WidgetLayer);\n        PROPERTY(bool, enabled, SetEnabled, IsEnabled);                   // Enable property @SCRIPTABLE\n        PROPERTY(float, depth, SetDepth, GetDepth);                       // Drawing depth (higher depths will draw later) @SCRIPTABLE\n        PROPERTY(float, transparency, SetTransparency, GetTransparency);  // Drawable transparency property @SCRIPTABLE\n        PROPERTY(Ref<IRectDrawable>, drawable, SetDrawable, GetDrawable); // Drawable property @EXPANDED_BY_DEFAULT @SCRIPTABLE\n\n        ACCESSOR(Ref<WidgetLayer>, child, String, GetChild, GetAllChildLayers); // Child layer accessor\n\n    public:\n        WidgetLayerLayout layout; // Drawable layout @SERIALIZABLE @SCRIPTABLE\n\n        String name;                // Name of layer @SERIALIZABLE @SCRIPTABLE\n        Layout interactableLayout;  // Interactable area layout @SERIALIZABLE @SCRIPTABLE\n\n    public:\n        // Default constructor @SCRIPTABLE\n        WidgetLayer(RefCounter* refCounter);\n\n        // Copy-constructor\n        WidgetLayer(RefCounter* refCounter, const WidgetLayer& other);\n\n        // Destructor\n        ~WidgetLayer();\n\n        // Copy-operator\n        WidgetLayer& operator=(const WidgetLayer& other);\n\n        // Returns pointer to owner widget @SCRIPTABLE\n        const WeakRef<Widget>& GetOwnerWidget() const;\n\n        // Returns link to prototype @SCRIPTABLE\n        const Ref<WidgetLayer>& GetPrototypeLink() const;\n\n        // Sets layer drawable\n        void SetDrawable(const Ref<IRectDrawable>& drawable);\n\n        // Returns layer drawable\n        const Ref<IRectDrawable>& GetDrawable() const;\n\n        // Draws drawable @SCRIPTABLE\n        void Draw();\n\n        // Returns is layer enabled @SCRIPTABLE\n        bool IsEnabled() const OPTIONAL_OVERRIDE;\n\n        // Returns is layer enabled and all parent are enabled too @SCRIPTABLE\n        bool IsEnabledInHierarchy() const OPTIONAL_OVERRIDE;\n\n        // Sets enabling of layer @SCRIPTABLE\n        void SetEnabled(bool enabled) OPTIONAL_OVERRIDE;\n\n        // Sets parent layer @SCRIPTABLE\n        void SetParent(const Ref<WidgetLayer>& parent);\n\n        // Returns parent layer @SCRIPTABLE\n        const WeakRef<WidgetLayer>& GetParent() const;\n\n        // Adds new child layer and returns him @SCRIPTABLE\n        Ref<WidgetLayer> AddChild(const Ref<WidgetLayer>& node);\n\n        // Remove child layer and releases him if needs @SCRIPTABLE\n        void RemoveChild(const Ref<WidgetLayer>& layer);\n\n        // Removes and releases all children nodes @SCRIPTABLE\n        void RemoveAllChildren();\n\n        // Return child layers @SCRIPTABLE\n        Vector<Ref<WidgetLayer>>& GetChildren();\n\n        // Returns constant child layers\n        const Vector<Ref<WidgetLayer>>& GetChildren() const;\n\n        // Adds child layer @SCRIPTABLE\n        Ref<WidgetLayer> AddChildLayer(const String& name, const Ref<IRectDrawable>& drawable, const Layout& layout = Layout::BothStretch(),\n                                       float depth = 0.0f);\n\n        // Returns child layer by path @SCRIPTABLE\n        Ref<WidgetLayer> GetChild(const String& path);\n\n        // Returns child layer by name @SCRIPTABLE\n        Ref<WidgetLayer> FindChild(const String& name);\n\n        // Returns child layer with type\n        template<typename _type>\n        Ref<_type> FindChild() const;\n\n        // Returns all child layers @SCRIPTABLE\n        Vector<Ref<WidgetLayer>> GetAllChilds() const;\n\n        // Sets depth\n        void SetDepth(float depth);\n\n        // Returns depth\n        float GetDepth() const;\n\n        // Sets transparency and updates this and children result transparencies\n        void SetTransparency(float transparency);\n\n        // Returns transparency\n        float GetTransparency();\n\n        // Returns result transparency @SCRIPTABLE\n        float GetResTransparency() const;\n\n        // Returns true if layer is under point @SCRIPTABLE\n        bool IsUnderPoint(const Vec2F& point);\n\n        // Returns layout rectangle @SCRIPTABLE\n        const RectF& GetRect() const;\n\n        SERIALIZABLE(WidgetLayer);\n        CLONEABLE_REF(WidgetLayer);\n\n    protected:\n        struct ICopyVisitor : public RefCounterable\n        {\n            virtual ~ICopyVisitor() {}\n            virtual void OnCopy(const WidgetLayer* source, WidgetLayer* target) = 0;\n        };\n\n        struct MakePrototypeCloneVisitor : public ICopyVisitor\n        {\n            void OnCopy(const WidgetLayer* source, WidgetLayer* target) override;\n        };\n\n        struct InstantiatePrototypeCloneVisitor : public ICopyVisitor\n        {\n            void OnCopy(const WidgetLayer* source, WidgetLayer* target) override;\n        };\n\n    protected:\n        mutable Ref<ICopyVisitor> mCopyVisitor; // Copy visitor. Used when instantiating prefab\n\n        Ref<WidgetLayer> mPrototypeLink; // Linked prototype layer\n\n        Ref<IRectDrawable> mDrawable; // Drawable @SERIALIZABLE\n\n        SceneUID mUID = 0; // Scene editor uid @SERIALIZABLE @IGNORE_DELTA_SEARCH\n\n        bool mEnabled = true; // Is layer enabled\n\n        float mTransparency = 1.0f;    // Layer transparency @SERIALIZABLE\n        float mResTransparency = 1.0f; // Result drawable transparency, depends on parent transparency\n\n        float mDepth = 0.0f; // Depth of drawable @SERIALIZABLE\n\n        RectF mAbsolutePosition; // Result absolute drawable position\n        RectF mInteractableArea; // Intractable area, depends on interactableLayout\n\n        WeakRef<Widget> mOwnerWidget; // Owner widget pointer \n\n        WeakRef<WidgetLayer>     mParent;   // Pointer to parent layer \n        Vector<Ref<WidgetLayer>> mChildren; // Children layers\n\n        bool mUpdatingLayout = false; // It is true when updating layout now, prevents recursive layout updating \n\n    protected:\n        // It is called after reference initialization at object construction, sets layout owner\n        void PostRefConstruct();\n\n        // Beginning serialization callback\n        void SerializeBasicOverride(DataValue& node) const;\n\n        // Completion deserialization callback\n        void DeserializeBasicOverride(const DataValue& node);\n\n        // Regular serializing without prototype\n        void SerializeRaw(DataValue& node) const;\n\n        // Regular deserializing without prototype\n        void DeserializeRaw(const DataValue& node);\n\n        // Regular serializing with prototype\n        void SerializeWithProto(DataValue& node) const;\n\n        // Regular deserializing with prototype\n        void DeserializeWithProto(const DataValue& node);\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n        // Sets owner widget for this and children\n        void SetOwnerWidget(const Ref<Widget>& owner);\n\n        // Called when layout was changed, calls owner widget layout updating\n        void OnLayoutChanged();\n\n        // Updates drawable rect, calling when widget's layout was changed\n        void UpdateLayout();\n\n        // Called when transparency was changed and updates children transparencies\n        void UpdateResTransparency();\n\n        // Called when owner widget including in scene. Registers editable object and it's children\n        void OnAddToScene();\n\n        // Called when owner widget excluding in scene. Unregisters editable object and it's children\n        void OnRemoveFromScene();\n\n        // Returns dictionary with all child layers\n        Map<String, Ref<WidgetLayer>> GetAllChildLayers();\n\n#if IS_EDITOR\n    public:\n        PROPERTY(bool, locked, SetLocked, IsLocked); // Is locked property\n\n    public:\n        // Returns true when object is on scene\n        bool IsOnScene() const override;\n\n        // Returns unique id\n        SceneUID GetID() const override;\n\n        // Generates new random id \n        void GenerateNewID(bool childs = true) override;\n\n        // Returns name of object\n        const String& GetName() const override;\n\n        // Sets name of object\n        void SetName(const String& name) override;\n\n        // Returns object's link to prototype\n        Ref<SceneEditableObject> GetEditableLink() const override;\n\n        // Returns list of object's children\n        Vector<Ref<SceneEditableObject>> GetEditableChildren() const override;\n\n        // Returns object's parent object. Return nullptr when it is a root scene object\n        Ref<SceneEditableObject> GetEditableParent() const override;\n\n        // Sets parent object. nullptr means make this object as root. idx is place in parent children. idx == -1 means last\n        void SetEditableParent(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n        // Adds child. idx is place in parent children. idx == -1 means last\n        void AddEditableChild(const Ref<SceneEditableObject>& object, int idx = -1) override;\n\n        // Sets index in siblings - children of parent\n        void SetIndexInSiblings(int idx) override;\n\n        // Checks that this object can be added as child to another object\n        bool CanBeParentedTo(const Type& parentType) override;\n\n        // Returns is that type of object can be enabled and disabled\n        bool IsSupportsDisabling() const override;\n\n        // Returns is that type of object can be locked\n        bool IsSupportsLocking() const override;\n\n        // Returns is object locked, override when it's supports\n        bool IsLocked() const override;\n\n        // Returns is object locked and all parent are locked too\n        bool IsLockedInHierarchy() const override;\n\n        // Sets locking of object, override when it's supports\n        void SetLocked(bool locked) override;\n\n        // Returns is that type of object can be transformed\n        bool IsSupportsTransforming() const override;\n\n        // Returns transform, override when it's supports\n        Basis GetTransform() const override;\n\n        // Sets transform of object, override when it's supports\n        void SetTransform(const Basis& transform) override;\n\n        // Updates transform immediately\n        void UpdateTransform() OPTIONAL_OVERRIDE;\n\n        // Returns is object supports pivot \n        bool IsSupportsPivot() const override;\n\n        // Sets transform pivot point\n        void SetPivot(const Vec2F& pivot) override;\n\n        // Returns transform pivot\n        Vec2F GetPivot() const override;\n\n        // Returns is that type of object can be transformed with layout\n        bool IsSupportsLayout() const override;\n\n        // Returns layout, override when it's supports\n        Layout GetLayout() const override;\n\n        // Sets layout of object, override when it's supports\n        void SetLayout(const Layout& layout) override;\n\n        // Called when something changed in this object\n        void OnChanged() override;\n\n    protected:\n        bool mIsLocked = false; // Is locked\n\n    protected:\n        // Called before making prototype from this object\n        void BeginMakePrototype() const override;\n\n        // Called before instantiate from this object\n        void BeginInstantiatePrototype() const override;\n\n#endif // IS_EDITOR\n\n        friend class Widget;\n        friend class WidgetLayerLayout;\n\n        FRIEND_REF_MAKE();\n    };\n\n    template<typename _type>\n    Ref<_type> WidgetLayer::FindChild() const\n    {\n        for (auto& child : mChildren)\n            if (child->mDrawable && child->mDrawable->GetType() == TypeOf(_type))\n                return DynamicCast<_type>(child->mDrawable);\n\n        for (auto& child : mChildren) {\n            auto res = child->FindChild<_type>();\n            if (res)\n                return res;\n        }\n\n        return nullptr;\n    }\n}\n// --- META ---\n\nCLASS_BASES_META(o2::WidgetLayer)\n{\n    BASE_CLASS(o2::WidgetLayerBase);\n}\nEND_META;\nCLASS_FIELDS_META(o2::WidgetLayer)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(enabled);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(depth);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(transparency);\n    FIELD().PUBLIC().EXPANDED_BY_DEFAULT_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(drawable);\n    FIELD().PUBLIC().NAME(child);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(layout);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(name);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(interactableLayout);\n    FIELD().PROTECTED().NAME(mCopyVisitor);\n    FIELD().PROTECTED().NAME(mPrototypeLink);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mDrawable);\n    FIELD().PROTECTED().IGNORE_DELTA_SEARCH_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(mUID);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mEnabled);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mTransparency);\n    FIELD().PROTECTED().DEFAULT_VALUE(1.0f).NAME(mResTransparency);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mDepth);\n    FIELD().PROTECTED().NAME(mAbsolutePosition);\n    FIELD().PROTECTED().NAME(mInteractableArea);\n    FIELD().PROTECTED().NAME(mOwnerWidget);\n    FIELD().PROTECTED().NAME(mParent);\n    FIELD().PROTECTED().NAME(mChildren);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mUpdatingLayout);\n#if  IS_EDITOR\n    FIELD().PUBLIC().NAME(locked);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsLocked);\n#endif\n}\nEND_META;\nCLASS_METHODS_META(o2::WidgetLayer)\n{\n\n    typedef Map<String, Ref<WidgetLayer>> _tmp1;\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const WidgetLayer&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const WeakRef<Widget>&, GetOwnerWidget);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const Ref<WidgetLayer>&, GetPrototypeLink);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDrawable, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<IRectDrawable>&, GetDrawable);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsEnabled);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsEnabledInHierarchy);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetEnabled, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetParent, const Ref<WidgetLayer>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const WeakRef<WidgetLayer>&, GetParent);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<WidgetLayer>, AddChild, const Ref<WidgetLayer>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveChild, const Ref<WidgetLayer>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, RemoveAllChildren);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vector<Ref<WidgetLayer>>&, GetChildren);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<WidgetLayer>>&, GetChildren);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<WidgetLayer>, AddChildLayer, const String&, const Ref<IRectDrawable>&, const Layout&, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<WidgetLayer>, GetChild, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<WidgetLayer>, FindChild, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vector<Ref<WidgetLayer>>, GetAllChilds);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDepth, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetDepth);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTransparency, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetTransparency);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetResTransparency);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(const RectF&, GetRect);\n    FUNCTION().PROTECTED().SIGNATURE(void, PostRefConstruct);\n    FUNCTION().PROTECTED().SIGNATURE(void, SerializeBasicOverride, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeserializeBasicOverride, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SerializeRaw, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeserializeRaw, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SerializeWithProto, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeserializeWithProto, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetOwnerWidget, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayoutChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayout);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateResTransparency);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAddToScene);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnRemoveFromScene);\n    FUNCTION().PROTECTED().SIGNATURE(_tmp1, GetAllChildLayers);\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsOnScene);\n    FUNCTION().PUBLIC().SIGNATURE(SceneUID, GetID);\n    FUNCTION().PUBLIC().SIGNATURE(void, GenerateNewID, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableLink);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<SceneEditableObject>>, GetEditableChildren);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableParent);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEditableParent, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEditableChild, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIndexInSiblings, int);\n    FUNCTION().PUBLIC().SIGNATURE(bool, CanBeParentedTo, const Type&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsDisabling);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsLocking);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLocked);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLockedInHierarchy);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLocked, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsTransforming);\n    FUNCTION().PUBLIC().SIGNATURE(Basis, GetTransform);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTransform, const Basis&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateTransform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsPivot);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPivot, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetPivot);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsLayout);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginMakePrototype);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginInstantiatePrototype);\n#endif\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/WidgetLayerLayout.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"WidgetLayerLayout.h\"\n\n#include \"WidgetLayer.h\"\n\nnamespace o2\n{\n    WidgetLayerLayout::WidgetLayerLayout()\n    {}\n\n    WidgetLayerLayout::WidgetLayerLayout(const WidgetLayerLayout& other) :\n        mAnchorMin(other.mAnchorMin), mAnchorMax(other.mAnchorMax), mOffsetMin(other.mOffsetMin),\n        mOffsetMax(other.mOffsetMax)\n    {}\n\n    WidgetLayerLayout::operator Layout() const\n    {\n        return Layout(mAnchorMin, mAnchorMax, mOffsetMin, mOffsetMax);\n    }\n\n    WidgetLayerLayout& WidgetLayerLayout::operator=(const WidgetLayerLayout& other)\n    {\n        mAnchorMax = other.mAnchorMax;\n        mAnchorMin = other.mAnchorMin;\n        mOffsetMax = other.mOffsetMax;\n        mOffsetMin = other.mOffsetMin;\n\n        return *this;\n    }\n\n    bool WidgetLayerLayout::operator!=(const Layout& other) const\n    {\n        return mAnchorMin != other.anchorMin || mAnchorMax != other.anchorMax ||\n            mOffsetMin != other.offsetMin || mOffsetMax != other.offsetMax;\n    }\n\n    bool WidgetLayerLayout::operator!=(const WidgetLayerLayout& other) const\n    {\n        return mAnchorMin != other.mAnchorMin || mAnchorMax != other.mAnchorMax ||\n            mOffsetMin != other.mOffsetMin || mOffsetMax != other.mOffsetMax;\n    }\n\n    bool WidgetLayerLayout::operator==(const Layout& other) const\n    {\n        return mAnchorMin == other.anchorMin && mAnchorMax == other.anchorMax &&\n            mOffsetMin == other.offsetMin && mOffsetMax == other.offsetMax;\n    }\n\n    bool WidgetLayerLayout::operator==(const WidgetLayerLayout& other) const\n    {\n        return mAnchorMin == other.mAnchorMin && mAnchorMax == other.mAnchorMax &&\n            mOffsetMin == other.mOffsetMin && mOffsetMax == other.mOffsetMax;\n    }\n\n    WidgetLayerLayout& WidgetLayerLayout::operator=(const Layout& other)\n    {\n        mAnchorMin = other.anchorMin;\n        mAnchorMax = other.anchorMax;\n        mOffsetMin = other.offsetMin;\n        mOffsetMax = other.offsetMax;\n\n        return *this;\n    }\n\n    void WidgetLayerLayout::SetOwner(const Ref<WidgetLayer>& widgetLayer)\n    {\n        mWidgetLayer = widgetLayer;\n    }\n\n    RectF WidgetLayerLayout::Calculate(const RectF& source)\n    {\n        Vec2F srcSize = source.Size();\n        return RectF(source.left + srcSize.x*mAnchorMin.x + mOffsetMin.x,\n                     source.bottom + srcSize.y*mAnchorMin.y + mOffsetMin.y,\n                     source.left + srcSize.x*mAnchorMax.x + mOffsetMax.x,\n                     source.bottom + srcSize.y*mAnchorMax.y + mOffsetMax.y);\n    }\n\n    void WidgetLayerLayout::SetAnchorMin(const Vec2F& min)\n    {\n        mAnchorMin = min;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    Vec2F WidgetLayerLayout::GetAnchorMin() const\n    {\n        return mAnchorMin;\n    }\n\n    void WidgetLayerLayout::SetAnchorMax(const Vec2F& max)\n    {\n        mAnchorMax = max;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    Vec2F WidgetLayerLayout::GetAnchorMax() const\n    {\n        return mAnchorMax;\n    }\n\n    void WidgetLayerLayout::SetAnchorLeft(float value)\n    {\n        mAnchorMin.x = value;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    float WidgetLayerLayout::GetAnchorLeft() const\n    {\n        return mAnchorMin.x;\n    }\n\n    void WidgetLayerLayout::SetAnchorRight(float value)\n    {\n        mAnchorMax.x = value;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    float WidgetLayerLayout::GetAnchorRight() const\n    {\n        return mAnchorMax.x;\n    }\n\n    void WidgetLayerLayout::SetAnchorBottom(float value)\n    {\n        mAnchorMin.y = value;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    float WidgetLayerLayout::GetAnchorBottom() const\n    {\n        return mAnchorMin.y;\n    }\n\n    void WidgetLayerLayout::SetAnchorTop(float value)\n    {\n        mAnchorMax.y = value;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    float WidgetLayerLayout::GetAnchorTop() const\n    {\n        return mAnchorMax.y;\n    }\n\n    void WidgetLayerLayout::SetOffsetMin(const Vec2F& min)\n    {\n        mOffsetMin = min;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    Vec2F WidgetLayerLayout::GetOffsetMin() const\n    {\n        return mOffsetMin;\n    }\n\n    void WidgetLayerLayout::SetOffsetMax(const Vec2F& max)\n    {\n        mOffsetMax = max;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    Vec2F WidgetLayerLayout::GetOffsetMax() const\n    {\n        return mOffsetMax;\n    }\n\n    void WidgetLayerLayout::SetOffsetLeft(float value)\n    {\n        mOffsetMin.x = value;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    float WidgetLayerLayout::GetOffsetLeft() const\n    {\n        return mOffsetMin.x;\n    }\n\n    void WidgetLayerLayout::SetoffsetRight(float value)\n    {\n        mOffsetMax.x = value;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    float WidgetLayerLayout::GetoffsetRight() const\n    {\n        return mOffsetMax.x;\n    }\n\n    void WidgetLayerLayout::SetOffsetBottom(float value)\n    {\n        mOffsetMin.y = value;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    float WidgetLayerLayout::GetOffsetBottom() const\n    {\n        return mOffsetMin.y;\n    }\n\n    void WidgetLayerLayout::SetOffsetTop(float value)\n    {\n        mOffsetMax.y = value;\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    float WidgetLayerLayout::GetOffsetTop() const\n    {\n        return mOffsetMax.y;\n    }\n\n    void WidgetLayerLayout::SetPosition(const Vec2F& position)\n    {\n        Vec2F delta = position - mWidgetLayer.Lock()->mAbsolutePosition.LeftBottom();\n        mOffsetMin += delta;\n        mOffsetMax += delta;\n\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    Vec2F WidgetLayerLayout::GetPosition() const\n    {\n        return mWidgetLayer.Lock()->mAbsolutePosition.LeftBottom();\n    }\n\n    void WidgetLayerLayout::SetSize(const Vec2F& size)\n    {\n        Vec2F delta = size - mWidgetLayer.Lock()->mAbsolutePosition.Size();\n        mOffsetMin -= delta*0.5f;\n        mOffsetMax += delta*0.5f;\n\n        mWidgetLayer.Lock()->OnLayoutChanged();\n    }\n\n    Vec2F WidgetLayerLayout::GetSize() const\n    {\n        return mWidgetLayer.Lock()->mAbsolutePosition.Size();\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::WidgetLayerLayout, o2__WidgetLayerLayout);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/WidgetLayerLayout.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Math/Layout.h\"\n\nnamespace o2\n{\n    class WidgetLayer;\n\n    class WidgetLayerLayout : public ISerializable\n    {\n    public:\n        PROPERTIES(WidgetLayerLayout);\n        PROPERTY(Vec2F, position, SetPosition, GetPosition); // Left bottom anchor property @SCRIPTABLE\n        PROPERTY(Vec2F, size, SetSize, GetSize);             // Left bottom anchor property @SCRIPTABLE\n\n        PROPERTY(Vec2F, anchorMin, SetAnchorMin, GetAnchorMin); // Left bottom anchor property @SCRIPTABLE\n        PROPERTY(Vec2F, anchorMax, SetAnchorMax, GetAnchorMax); // Right top anchor property @SCRIPTABLE\n\n        PROPERTY(Vec2F, offsetMin, SetOffsetMin, GetOffsetMin); // Left bottom corner offset property @SCRIPTABLE\n        PROPERTY(Vec2F, offsetMax, SetOffsetMax, GetOffsetMax); // Right top corner offset property @SCRIPTABLE\n\n        PROPERTY(float, anchorLeft, SetAnchorLeft, GetAnchorLeft);       // Left anchor property @SCRIPTABLE\n        PROPERTY(float, anchorRight, SetAnchorRight, GetAnchorRight);    // Right anchor property @SCRIPTABLE\n        PROPERTY(float, anchorBottom, SetAnchorBottom, GetAnchorBottom); // Bottom anchor property @SCRIPTABLE\n        PROPERTY(float, anchorTop, SetAnchorTop, GetAnchorTop);          // Top anchor property @SCRIPTABLE\n\n        PROPERTY(float, offsetLeft, SetOffsetLeft, GetOffsetLeft);       // Left offset property @SCRIPTABLE\n        PROPERTY(float, offsetRight, SetoffsetRight, GetoffsetRight);    // Right offset property @SCRIPTABLE\n        PROPERTY(float, offsetBottom, SetOffsetBottom, GetOffsetBottom); // Bottom offset property @SCRIPTABLE\n        PROPERTY(float, offsetTop, SetOffsetTop, GetOffsetTop);          // Top offset property @SCRIPTABLE\n\n    public:\n        // Default unused constructor\n        WidgetLayerLayout();\n\n        // Copy constructor\n        WidgetLayerLayout(const WidgetLayerLayout& other);\n\n        // Cast to Layout operator\n        operator Layout() const;\n\n        // Copy operator from layout\n        WidgetLayerLayout& operator=(const Layout& other);\n\n        // Copy operator \n        WidgetLayerLayout& operator=(const WidgetLayerLayout& other);\n\n        // Check equals operator\n        bool operator==(const WidgetLayerLayout& other) const;\n\n        // Check equals operator\n        bool operator==(const Layout& other) const;\n\n        // Check not equals operator\n        bool operator!=(const WidgetLayerLayout& other) const;\n\n        // Check not equals operator\n        bool operator!=(const Layout& other) const;\n\n        // Sets owner widget layer\n        void SetOwner(const Ref<WidgetLayer>& widgetLayer);\n\n        // Returns calculated rectangle by anchors and offsets relative to source @SCRIPTABLE\n        RectF Calculate(const RectF& source);\n\n        // Sets left bottom anchor. (0, 0) - left bottom of parent, (1, 1) - right top\n        void SetAnchorMin(const Vec2F& min);\n\n        // Returns left bottom anchor. (0, 0) - left bottom of parent, (1, 1) - right top\n        Vec2F GetAnchorMin() const;\n\n        // Sets right top anchor. (0, 0) - left bottom of parent, (1, 1) - right top\n        void SetAnchorMax(const Vec2F& max);\n\n        // Returns right top anchor. (0, 0) - left bottom of parent, (1, 1) - right top\n        Vec2F GetAnchorMax() const;\n\n        // Sets left anchor. 0 - left parent border, 1 - right\n        void SetAnchorLeft(float value);\n\n        // Returns left anchor. 0 - left parent border, 1 - right\n        float GetAnchorLeft() const;\n\n        // Sets right anchor. 0 - left parent border, 1 - right\n        void SetAnchorRight(float value);\n\n        // Returns right anchor. 0 - left parent border, 1 - right\n        float GetAnchorRight() const;\n\n        // Sets bottom anchor. 0 - bottom parent border, 1 - top\n        void SetAnchorBottom(float value);\n\n        // Returns bottom anchor. 0 - bottom parent border, 1 - top\n        float GetAnchorBottom() const;\n\n        // Sets top anchor. 0 - bottom parent border, 1 - top\n        void SetAnchorTop(float value);\n\n        // Returns top anchor. 0 - bottom parent border, 1 - top\n        float GetAnchorTop() const;\n\n        // Sets left bottom offset\n        void SetOffsetMin(const Vec2F& min);\n\n        // Returns left bottom offset\n        Vec2F GetOffsetMin() const;\n\n        // Sets right top offset\n        void SetOffsetMax(const Vec2F& max);\n\n        // Returns right top offset\n        Vec2F GetOffsetMax() const;\n\n        // Sets left offset\n        void SetOffsetLeft(float value);\n\n        // Returns left offset\n        float GetOffsetLeft() const;\n\n        // Sets right offset\n        void SetoffsetRight(float value);\n\n        // Returns right offset\n        float GetoffsetRight() const;\n\n        // Sets bottom offset\n        void SetOffsetBottom(float value);\n\n        // Returns bottom offset\n        float GetOffsetBottom() const;\n\n        // Sets top offset\n        void SetOffsetTop(float value);\n\n        // Returns top offset\n        float GetOffsetTop() const;\n\n        // Sets position of left bottom corner\n        void SetPosition(const Vec2F& position);\n\n        // Returns position of left bottom corner\n        Vec2F GetPosition() const;\n\n        // Sets size\n        void SetSize(const Vec2F& size);\n\n        // Returns size\n        Vec2F GetSize() const;\n\n        SERIALIZABLE(WidgetLayerLayout);\n\n    private:\n        WeakRef<WidgetLayer> mWidgetLayer; // Owner widget layer \n\n        Vec2F mAnchorMin = Vec2F(0, 0); // @SERIALIZABLE\n        Vec2F mAnchorMax = Vec2F(1, 1); // @SERIALIZABLE\n        Vec2F mOffsetMin = Vec2F(0, 0); // @SERIALIZABLE\n        Vec2F mOffsetMax = Vec2F(0, 0); // @SERIALIZABLE\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::WidgetLayerLayout)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::WidgetLayerLayout)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(position);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(size);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(anchorMin);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(anchorMax);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(offsetMin);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(offsetMax);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(anchorLeft);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(anchorRight);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(anchorBottom);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(anchorTop);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(offsetLeft);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(offsetRight);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(offsetBottom);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(offsetTop);\n    FIELD().PRIVATE().NAME(mWidgetLayer);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(mAnchorMin);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(1, 1)).NAME(mAnchorMax);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(mOffsetMin);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(mOffsetMax);\n}\nEND_META;\nCLASS_METHODS_META(o2::WidgetLayerLayout)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const WidgetLayerLayout&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetOwner, const Ref<WidgetLayer>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(RectF, Calculate, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnchorMin, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetAnchorMin);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnchorMax, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetAnchorMax);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnchorLeft, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetAnchorLeft);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnchorRight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetAnchorRight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnchorBottom, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetAnchorBottom);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnchorTop, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetAnchorTop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetOffsetMin, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetOffsetMin);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetOffsetMax, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetOffsetMax);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetOffsetLeft, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetOffsetLeft);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetoffsetRight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetoffsetRight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetOffsetBottom, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetOffsetBottom);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetOffsetTop, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetOffsetTop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetPosition);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetSize);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/WidgetLayout.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"WidgetLayout.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Function/Function.h\"\n\nnamespace o2\n{\n    WidgetLayout::WidgetLayout() :\n        ActorTransform(mnew WidgetLayoutData())\n    {\n        mData = static_cast<WidgetLayoutData*>(ActorTransform::mData);\n        mCheckMinMaxFunc = &WidgetLayout::DontCheckMinMax;\n    }\n\n    WidgetLayout::WidgetLayout(const WidgetLayout& other) :\n        ActorTransform(mnew WidgetLayoutData())\n    {\n        mData = static_cast<WidgetLayoutData*>(ActorTransform::mData);\n\n        CopyFrom(other);\n        mCheckMinMaxFunc = other.mCheckMinMaxFunc;\n    }\n\n    WidgetLayout::WidgetLayout(const Vec2F& anchorMin, const Vec2F& anchorMax,\n                               const Vec2F& offsetMin, const Vec2F& offsetMax) :\n        ActorTransform(mnew WidgetLayoutData())\n    {\n        mData = static_cast<WidgetLayoutData*>(ActorTransform::mData);\n\n        mData->anchorMin = anchorMin;\n        mData->anchorMax = anchorMax;\n        mData->offsetMin = offsetMin;\n        mData->offsetMax = offsetMax;\n\n        mCheckMinMaxFunc = &WidgetLayout::DontCheckMinMax;\n    }\n\n    WidgetLayout::WidgetLayout(float anchorLeft, float anchorTop, float anchorRight, float anchorBottom,\n                               float offsetLeft, float offsetTop, float offsetRight, float offsetBottom) :\n        ActorTransform(mnew WidgetLayoutData())\n    {\n        mData = static_cast<WidgetLayoutData*>(ActorTransform::mData);\n\n        mData->anchorMin.Set(anchorLeft, anchorBottom);\n        mData->anchorMax.Set(anchorRight, anchorTop);\n        mData->offsetMin.Set(offsetLeft, offsetBottom);\n        mData->offsetMax.Set(offsetRight, offsetTop);\n\n        mCheckMinMaxFunc = &WidgetLayout::DontCheckMinMax;\n    }\n\n    WidgetLayout& WidgetLayout::operator=(const WidgetLayout& other)\n    {\n        CopyFrom(other);\n        SetDirty();\n\n        return *this;\n    }\n\n    bool WidgetLayout::operator==(const WidgetLayout& other) const\n    {\n        return mData->anchorMin == other.mData->anchorMin &&\n            mData->anchorMax == other.mData->anchorMax &&\n            mData->offsetMin == other.mData->offsetMin &&\n            mData->offsetMax == other.mData->offsetMax;\n    }\n\n    void WidgetLayout::SetPosition(const Vec2F& position)\n    {\n        Vec2F delta = position - GetPosition();\n        mData->offsetMin += delta;\n        mData->offsetMax += delta;\n\n        SetDirty();\n    }\n\n    void WidgetLayout::SetSize(const Vec2F& size)\n    {\n        RectF parentRect = GetParentRectangle();\n        RectF rectangle(mData->offsetMin + mData->anchorMin*parentRect.Size(),\n                        mData->offsetMax + mData->anchorMax*parentRect.Size());\n\n        Vec2F szDelta = size - rectangle.Size();\n        mData->offsetMax += szDelta*(Vec2F::One() - mData->pivot);\n        mData->offsetMin -= szDelta*mData->pivot;\n\n        SetDirty();\n    }\n\n    void WidgetLayout::SetWidth(float value)\n    {\n        RectF parentRect = GetParentRectangle();\n        RectF rectangle(mData->offsetMin + mData->anchorMin*parentRect.Size(),\n                        mData->offsetMax + mData->anchorMax*parentRect.Size());\n\n        float szDelta = value - rectangle.Width();\n        mData->offsetMax.x += szDelta*(1.0f - mData->pivot.x);\n        mData->offsetMin.x -= szDelta*mData->pivot.x;\n\n        SetDirty();\n    }\n\n    void WidgetLayout::SetHeight(float value)\n    {\n        RectF parentRect = GetParentRectangle();\n        RectF rectangle(mData->offsetMin + mData->anchorMin*parentRect.Size(),\n                        mData->offsetMax + mData->anchorMax*parentRect.Size());\n\n        float szDelta = value - rectangle.Height();\n        mData->offsetMax.y += szDelta*mData->pivot.y;\n        mData->offsetMin.y -= szDelta*(1.0f - mData->pivot.y);\n\n        SetDirty();\n    }\n\n    Vec2F WidgetLayout::GetSize() const\n    {\n        return Vec2F(GetWidth(), GetHeight());\n    }\n\n    float WidgetLayout::GetWidth() const\n    {\n        return Math::Clamp(mData->size.x, mData->minSize.x, mData->maxSize.x);\n    }\n\n    float WidgetLayout::GetHeight() const\n    {\n        return Math::Clamp(mData->size.y, mData->minSize.y, mData->maxSize.y);\n    }\n\n    void WidgetLayout::SetRect(const RectF& rect)\n    {\n        RectF parentRect = GetParentRectangle();\n        RectF parentAnchoredRect(parentRect.Size()*mData->anchorMin,\n                                 parentRect.Size()*mData->anchorMax);\n\n        RectF localRect = rect;\n        if (auto parent = mData->owner->mParent.Lock())\n            localRect += parentRect.Size()*parent->transform->mData->pivot;\n\n        mData->offsetMin = localRect.LeftBottom() - parentAnchoredRect.LeftBottom();\n        mData->offsetMax = localRect.RightTop() - parentAnchoredRect.RightTop();\n\n        SetDirty();\n    }\n\n    RectF WidgetLayout::GetChildrenWorldRect() const\n    {\n        return mData->childrenWorldRect;\n    }\n\n    void WidgetLayout::SetAxisAlignedRect(const RectF& rect)\n    {\n        ActorTransform::SetAxisAlignedRect(rect);\n        UpdateOffsetsByCurrentTransform();\n    }\n\n    void WidgetLayout::SetPivot(const Vec2F& pivot)\n    {\n        mData->pivot = pivot;\n        SetDirty();\n    }\n\n    void WidgetLayout::SetBasis(const Basis& basis)\n    {\n        ActorTransform::SetBasis(basis);\n        UpdateOffsetsByCurrentTransform();\n    }\n\n    void WidgetLayout::SetNonSizedBasis(const Basis& basis)\n    {\n        ActorTransform::SetNonSizedBasis(basis);\n        UpdateOffsetsByCurrentTransform();\n    }\n\n    RectF WidgetLayout::GetRect() const\n    {\n        RectF parentRect = GetParentRectangle();\n\n        RectF rectangle(mData->offsetMin + mData->anchorMin*parentRect.Size(),\n                        mData->offsetMax + mData->anchorMax*parentRect.Size());\n\n        return rectangle;\n    }\n\n    void WidgetLayout::SetAnchorMin(const Vec2F& min)\n    {\n        mData->anchorMin = min;\n        SetDirty();\n    }\n\n    Vec2F WidgetLayout::GetAnchorMin() const\n    {\n        return mData->anchorMin;\n    }\n\n    void WidgetLayout::SetAnchorMax(const Vec2F& max)\n    {\n        mData->anchorMax = max;\n        SetDirty();\n    }\n\n    Vec2F WidgetLayout::GetAnchorMax() const\n    {\n        return mData->anchorMax;\n    }\n\n    void WidgetLayout::SetAnchorLeft(float value)\n    {\n        mData->anchorMin.x = value;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetAnchorLeft() const\n    {\n        return mData->anchorMin.x;\n    }\n\n    void WidgetLayout::SetAnchorRight(float value)\n    {\n        mData->anchorMax.x = value;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetAnchorRight() const\n    {\n        return mData->anchorMax.x;\n    }\n\n    void WidgetLayout::SetAnchorBottom(float value)\n    {\n        mData->anchorMin.y = value;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetAnchorBottom() const\n    {\n        return mData->anchorMin.y;\n    }\n\n    void WidgetLayout::SetAnchorTop(float value)\n    {\n        mData->anchorMax.y = value;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetAnchorTop() const\n    {\n        return mData->anchorMax.y;\n    }\n\n    void WidgetLayout::SetOffsetMin(const Vec2F& min)\n    {\n        mData->offsetMin = min;\n        SetDirty();\n    }\n\n    Vec2F WidgetLayout::GetOffsetMin() const\n    {\n        return mData->offsetMin;\n    }\n\n    void WidgetLayout::SetOffsetMax(const Vec2F& max)\n    {\n        mData->offsetMax = max;\n        SetDirty();\n    }\n\n    Vec2F WidgetLayout::GetOffsetMax() const\n    {\n        return mData->offsetMax;\n    }\n\n    void WidgetLayout::SetOffsetLeft(float value)\n    {\n        mData->offsetMin.x = value;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetOffsetLeft() const\n    {\n        return mData->offsetMin.x;\n    }\n\n    void WidgetLayout::SetoffsetRight(float value)\n    {\n        mData->offsetMax.x = value;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetoffsetRight() const\n    {\n        return mData->offsetMax.x;\n    }\n\n    void WidgetLayout::SetOffsetBottom(float value)\n    {\n        mData->offsetMin.y = value;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetOffsetBottom() const\n    {\n        return mData->offsetMin.y;\n    }\n\n    void WidgetLayout::SetOffsetTop(float value)\n    {\n        mData->offsetMax.y = value;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetOffsetTop() const\n    {\n        return mData->offsetMax.y;\n    }\n\n    void WidgetLayout::SetMinimalSize(const Vec2F& minSize)\n    {\n        mData->minSize = minSize;\n        mCheckMinMaxFunc = &WidgetLayout::CheckMinMax;\n        SetDirty();\n    }\n\n    Vec2F WidgetLayout::GetMinimalSize() const\n    {\n        return mData->minSize;\n    }\n\n    void WidgetLayout::SetMinimalWidth(float value)\n    {\n        mData->minSize.x = value;\n        mCheckMinMaxFunc = &WidgetLayout::CheckMinMax;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetMinWidth() const\n    {\n        return mData->minSize.x;\n    }\n\n    void WidgetLayout::SetMinimalHeight(float value)\n    {\n        mData->minSize.y = value;\n        mCheckMinMaxFunc = &WidgetLayout::CheckMinMax;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetMinHeight() const\n    {\n        return mData->minSize.y;\n    }\n\n    void WidgetLayout::SetMaximalSize(const Vec2F& maxSize)\n    {\n        mData->maxSize = maxSize;\n        mCheckMinMaxFunc = &WidgetLayout::CheckMinMax;\n        SetDirty();\n    }\n\n    Vec2F WidgetLayout::GetMaximalSize() const\n    {\n        return mData->maxSize;\n    }\n\n    void WidgetLayout::SetMaximalWidth(float value)\n    {\n        mData->maxSize.x = value;\n        mCheckMinMaxFunc = &WidgetLayout::CheckMinMax;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetMaxWidth() const\n    {\n        return mData->maxSize.x;\n    }\n\n    void WidgetLayout::SetMaximalHeight(float value)\n    {\n        mData->maxSize.y = value;\n        mCheckMinMaxFunc = &WidgetLayout::CheckMinMax;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetMaxHeight() const\n    {\n        return mData->maxSize.y;\n    }\n\n    void WidgetLayout::DisableSizeChecks()\n    {\n        mCheckMinMaxFunc = &WidgetLayout::DontCheckMinMax;\n        SetDirty();\n    }\n\n    void WidgetLayout::EnableSizeChecks()\n    {\n        mCheckMinMaxFunc = &WidgetLayout::CheckMinMax;\n    }\n\n    void WidgetLayout::SetWeight(const Vec2F& weight)\n    {\n        mData->weight = weight;\n        SetDirty();\n    }\n\n    Vec2F WidgetLayout::GetWeight() const\n    {\n        return mData->weight;\n    }\n\n    void WidgetLayout::SetWidthWeight(float widthWeigth)\n    {\n        mData->weight.x = widthWeigth;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetWidthWeight()\n    {\n        return mData->weight.x;\n    }\n\n    void WidgetLayout::SetHeightWeight(float heigthWeigth)\n    {\n        mData->weight.y = heigthWeigth;\n        SetDirty();\n    }\n\n    float WidgetLayout::GetHeightWeight()\n    {\n        return mData->weight.y;\n    }\n\n    WidgetLayout WidgetLayout::BothStretch(float borderLeft, float borderBottom, float borderRight, float borderTop)\n    {\n        WidgetLayout res;\n        res.mData->anchorMin = Vec2F(0, 0);\n        res.mData->anchorMax = Vec2F(1, 1);\n        res.mData->offsetMin = Vec2F(borderLeft, borderBottom);\n        res.mData->offsetMax = Vec2F(-borderRight, -borderTop);\n        return res;\n    }\n\n    WidgetLayout WidgetLayout::Based(BaseCorner corner, const Vec2F& size, const Vec2F& offset)\n    {\n        WidgetLayout res;\n        switch (corner)\n        {\n        case BaseCorner::Left:\n        res.mData->anchorMin = Vec2F(0.0f, 0.5f);\n        res.mData->anchorMax = Vec2F(0.0f, 0.5f);\n        res.mData->offsetMin = Vec2F(0.0f, -size.y*0.5f) + offset;\n        res.mData->offsetMax = Vec2F(size.x, size.y*0.5f) + offset;\n        break;\n\n        case BaseCorner::Right:\n        res.mData->anchorMin = Vec2F(1.0f, 0.5f);\n        res.mData->anchorMax = Vec2F(1.0f, 0.5f);\n        res.mData->offsetMin = Vec2F(-size.x, -size.y*0.5f) + offset;\n        res.mData->offsetMax = Vec2F(0.0f, size.y*0.5f) + offset;\n        break;\n        case BaseCorner::Top:\n        res.mData->anchorMin = Vec2F(0.5f, 1.0f);\n        res.mData->anchorMax = Vec2F(0.5f, 1.0f);\n        res.mData->offsetMin = Vec2F(-size.x*0.5f, -size.y) + offset;\n        res.mData->offsetMax = Vec2F(size.x*0.5f, 0.0f) + offset;\n        break;\n\n        case BaseCorner::Bottom:\n        res.mData->anchorMin = Vec2F(0.5f, 0.0f);\n        res.mData->anchorMax = Vec2F(0.5f, 0.0f);\n        res.mData->offsetMin = Vec2F(-size.x*0.5f, 0.0f) + offset;\n        res.mData->offsetMax = Vec2F(size.x*0.5f, size.y) + offset;\n        break;\n\n        case BaseCorner::Center:\n        res.mData->anchorMin = Vec2F(0.5f, 0.5f);\n        res.mData->anchorMax = Vec2F(0.5f, 0.5f);\n        res.mData->offsetMin = Vec2F(-size.x*0.5f, -size.y*0.5f) + offset;\n        res.mData->offsetMax = Vec2F(size.x*0.5f, size.y*0.5f) + offset;\n        break;\n\n        case BaseCorner::LeftBottom:\n        res.mData->anchorMin = Vec2F(0.0f, 0.0f);\n        res.mData->anchorMax = Vec2F(0.0f, 0.0f);\n        res.mData->offsetMin = Vec2F(0.0f, 0.0f) + offset;\n        res.mData->offsetMax = Vec2F(size.x, size.y) + offset;\n        break;\n\n        case BaseCorner::LeftTop:\n        res.mData->anchorMin = Vec2F(0.0f, 1.0f);\n        res.mData->anchorMax = Vec2F(0.0f, 1.0f);\n        res.mData->offsetMin = Vec2F(0.0f, -size.y) + offset;\n        res.mData->offsetMax = Vec2F(size.x, 0.0f) + offset;\n        break;\n\n        case BaseCorner::RightBottom:\n        res.mData->anchorMin = Vec2F(1.0f, 0.0f);\n        res.mData->anchorMax = Vec2F(1.0f, 0.0f);\n        res.mData->offsetMin = Vec2F(-size.x, 0.0f) + offset;\n        res.mData->offsetMax = Vec2F(0.0f, size.y) + offset;\n        break;\n\n        case BaseCorner::RightTop:\n        res.mData->anchorMin = Vec2F(1.0f, 1.0f);\n        res.mData->anchorMax = Vec2F(1.0f, 1.0f);\n        res.mData->offsetMin = Vec2F(-size.x, -size.y) + offset;\n        res.mData->offsetMax = Vec2F(0.0f, 0.0f) + offset;\n        break;\n        }\n\n        return res;\n    }\n\n    WidgetLayout WidgetLayout::VerStretch(HorAlign align, float top, float bottom, float width, float offsX)\n    {\n        WidgetLayout res;\n        res.mData->anchorMin.y = 0.0f;\n        res.mData->anchorMax.y = 1.0f;\n        res.mData->offsetMin.y = bottom;\n        res.mData->offsetMax.y = -top;\n\n        switch (align)\n        {\n        case HorAlign::Left:\n        res.mData->anchorMin.x = 0.0f;\n        res.mData->anchorMax.x = 0.0f;\n        res.mData->offsetMin.x = offsX;\n        res.mData->offsetMax.x = offsX + width;\n        break;\n\n        case HorAlign::Middle:\n        res.mData->anchorMin.x = 0.5f;\n        res.mData->anchorMax.x = 0.5f;\n        res.mData->offsetMin.x = offsX - width*0.5f;\n        res.mData->offsetMax.x = offsX + width*0.5f;\n        break;\n\n        case HorAlign::Right:\n        res.mData->anchorMin.x = 1.0f;\n        res.mData->anchorMax.x = 1.0f;\n        res.mData->offsetMin.x = -offsX - width;\n        res.mData->offsetMax.x = -offsX;\n        break;\n\n        default:\n        break;\n        }\n\n        return res;\n    }\n\n    WidgetLayout WidgetLayout::HorStretch(VerAlign align, float left, float right, float height, float offsY)\n    {\n        WidgetLayout res;\n        res.mData->anchorMin.x = 0.0f;\n        res.mData->anchorMax.x = 1.0f;\n        res.mData->offsetMin.x = left;\n        res.mData->offsetMax.x = -right;\n\n        switch (align)\n        {\n        case VerAlign::Top:\n        res.mData->anchorMin.y = 1.0f;\n        res.mData->anchorMax.y = 1.0f;\n        res.mData->offsetMin.y = -offsY - height;\n        res.mData->offsetMax.y = -offsY;\n        break;\n\n        case VerAlign::Middle:\n        res.mData->anchorMin.y = 0.5f;\n        res.mData->anchorMax.y = 0.5f;\n        res.mData->offsetMin.y = offsY - height*0.5f;\n        res.mData->offsetMax.y = offsY + height*0.5f;\n        break;\n\n        case VerAlign::Bottom:\n        res.mData->anchorMin.y = 0.0f;\n        res.mData->anchorMax.y = 0.0f;\n        res.mData->offsetMin.y = offsY;\n        res.mData->offsetMax.y = offsY + height;\n        break;\n\n        case VerAlign::Both:\n        break;\n        }\n\n        return res;\n    }\n\n    void WidgetLayout::SetOwner(const Ref<Actor>& actor)\n    {\n        ActorTransform::SetOwner(actor);\n        mData->owner = (Widget*)actor.Get();\n        SetDirty();\n    }\n\n    void WidgetLayout::SetDirty(bool fromParent /*= false*/)\n    {\n        if (!fromParent && mData->drivenByParent && mData->owner)\n        {\n            if (auto parent = mData->owner->mParent.Lock())\n                parent->transform->SetDirty(fromParent);\n        }\n\n        ActorTransform::SetDirty(fromParent);\n    }\n\n    RectF WidgetLayout::GetParentRectangle() const\n    {\n        if (auto parentWidget = mData->owner->mParentWidget.Lock())\n            return parentWidget->GetLayoutData().childrenWorldRect;\n        else if (auto parent = mData->owner->mParent.Lock())\n            return parent->transform->mData->worldRectangle;\n\n        return RectF();\n    }\n\n    void WidgetLayout::Update()\n    {\n        RectF parentWorldRect;\n        Vec2F parentWorldPosition;\n\n        if (auto parentWidget = mData->owner->mParentWidget.Lock())\n        {\n            parentWorldRect = parentWidget->GetLayoutData().childrenWorldRect;\n\n            RectF notWidgetWorldRect = parentWidget->transform->mData->worldRectangle;\n            parentWorldPosition = notWidgetWorldRect.LeftBottom() +\n                parentWidget->transform->mData->pivot*notWidgetWorldRect.Size();\n        }\n        else if (auto parent = mData->owner->mParent.Lock())\n        {\n            parentWorldRect = parent->transform->mData->worldRectangle;\n\n            parentWorldPosition = parentWorldRect.LeftBottom() +\n                parent->transform->mData->pivot*parentWorldRect.Size();\n        }\n\n        RectF worldRectangle(parentWorldRect.LeftBottom() + mData->offsetMin + mData->anchorMin*parentWorldRect.Size(),\n                             parentWorldRect.LeftBottom() + mData->offsetMax + mData->anchorMax*parentWorldRect.Size());\n\n        mData->size = worldRectangle.Size();\n        mData->position = worldRectangle.LeftBottom() - parentWorldPosition + mData->size*mData->pivot;\n\n        (this->*mCheckMinMaxFunc)();\n\n        FloorRectangle();\n        UpdateRectangle();\n        UpdateTransform();\n        UpdateWorldRectangleAndTransform();\n\n        mData->updateFrame = mData->dirtyFrame;\n\n        if (mData->owner)\n        {\n            mData->owner->SetChildrenWorldRect(mData->worldRectangle);\n            mData->owner->OnTransformUpdated();\n        }\n    }\n\n    void WidgetLayout::FloorRectangle()\n    {\n        mData->size.x = Math::Round(mData->size.x);\n        mData->size.y = Math::Round(mData->size.y);\n        mData->position.x = Math::Round(mData->position.x);\n        mData->position.y = Math::Round(mData->position.y);\n    }\n\n    void WidgetLayout::UpdateOffsetsByCurrentTransform()\n    {\n        Vec2F offs;\n\n        if (auto parentWidget = mData->owner->mParentWidget.Lock())\n        {\n            offs = parentWidget->GetLayoutData().childrenWorldRect.LeftBottom() -\n                parentWidget->GetLayoutData().worldRectangle.LeftBottom();\n        }\n\n        SetRect(ActorTransform::GetRect() - offs);\n    }\n\n    void WidgetLayout::CopyFrom(const ActorTransform& other)\n    {\n        const WidgetLayout* otherLayout = dynamic_cast<const WidgetLayout*>(&other);\n\n        if (otherLayout)\n        {\n            mData->anchorMin = otherLayout->mData->anchorMin;\n            mData->anchorMax = otherLayout->mData->anchorMax;\n            mData->offsetMin = otherLayout->mData->offsetMin;\n            mData->offsetMax = otherLayout->mData->offsetMax;\n            mData->minSize = otherLayout->mData->minSize;\n            mData->maxSize = otherLayout->mData->maxSize;\n            mData->weight = otherLayout->mData->weight;\n\n            mCheckMinMaxFunc = otherLayout->mCheckMinMaxFunc;\n        }\n\n        ActorTransform::CopyFrom(other);\n    }\n\n    void WidgetLayout::CheckMinMax()\n    {\n        Vec2F resSize = mData->size;\n        Vec2F minSizeWithChildren(mData->owner->GetMinWidthWithChildren(), mData->owner->GetMinHeightWithChildren());\n\n        Vec2F clampSize(Math::Clamp(resSize.x, minSizeWithChildren.x, mData->maxSize.x),\n                        Math::Clamp(resSize.y, minSizeWithChildren.y, mData->maxSize.y));\n\n        Vec2F szDelta = clampSize - resSize;\n\n        if (szDelta != Vec2F())\n            mData->size += szDelta;\n    }\n\n    void WidgetLayout::DontCheckMinMax()\n    {}\n\n#if IS_SCRIPTING_SUPPORTED\n    void WidgetLayout::Set(const WidgetLayout& other)\n    {\n        *this = other;\n    }\n#endif\n\n    Vector<float> CalculateExpandedSize(Vector<Ref<Widget>>& widgets, bool horizontal, float availableWidth, float spacing)\n    {\n        Vector<float> minSizes; minSizes.Reserve(widgets.Count());\n        Vector<float> maxSizes; maxSizes.Reserve(widgets.Count());\n        Vector<float> weights; weights.Reserve(widgets.Count());\n\n        float minSizesSum = 0;\n        float weightsSum = 0;\n\n        for (auto itChild = widgets.begin(); itChild != widgets.end();)\n        {\n            if (!(*itChild)->IsEnabledInHierarchy())\n                itChild = widgets.erase(itChild);\n            else\n            {\n                auto child = *itChild;\n\n                float minWidth = horizontal ? child->layout->GetMinWidth() : child->layout->GetMinHeight();\n                float maxWidth = horizontal ? child->layout->GetMaxWidth() : child->layout->GetMaxHeight();\n                float weight = horizontal ? child->layout->GetWidthWeight() : child->layout->GetHeightWeight();\n\n                minSizesSum += minWidth;\n\n                if (minWidth < maxWidth)\n                    weightsSum += weight;\n\n                minSizes.Add(minWidth);\n                maxSizes.Add(maxWidth);\n                weights.Add(weight);\n\n                ++itChild;\n            }\n        }\n\n    Vector<float> widths = minSizes;\n\n    int childCount = widgets.Count();\n\n    availableWidth -= (spacing*(float)Math::Max(0, widgets.Count() - 1));\n    float expandWidth = availableWidth - minSizesSum;\n    while (expandWidth > 0)\n    {\n        float currentExpand = expandWidth;\n        float invWeightsSum = 1.0f/weightsSum;\n\n        for (int i = 0; i < childCount; i++)\n        {\n            if (widths[i] < maxSizes[i])\n            {\n                float expand = currentExpand*weights[i]*invWeightsSum;\n                float maxExpand = maxSizes[i] - widths[i];\n\n                if (expand > maxExpand)\n                {\n                    float coef = maxExpand/expand;\n                    currentExpand *= coef;\n                }\n            }\n        }\n\n        for (int i = 0; i < childCount; i++)\n        {\n            if (widths[i] < maxSizes[i])\n            {\n                widths[i] += currentExpand*weights[i]*invWeightsSum;\n\n                if (widths[i] >= maxSizes[i])\n                    weightsSum -= weights[i];\n            }\n        }\n\n        expandWidth -= currentExpand;\n    }\n\n    return widths;\n}\n\n    bool WidgetLayoutData::IsSerializeEnabled() const\n    {\n        return false;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::WidgetLayout, o2__WidgetLayout);\n\nDECLARE_CLASS(o2::WidgetLayoutData, o2__WidgetLayoutData);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/WidgetLayout.h",
    "content": "#pragma once\n\n#include \"o2/Scene/ActorTransform.h\"\n\nnamespace o2\n{\n    class Widget;\n    class WidgetLayoutData;\n\n    // ----------------------------------------------------------------------------------------------------------------\n    // Widget layout. Represents the Widget transformation layout. The position and size sets by anchors and offsets. \n    // Anchor is a vector value from (0, 0) to (1, 1), where (0, 0) is left bottom corner of parent and (1, 1) is right \n    // top corner. Offsets represents the position and size relative to anchor points. \n    // Also layout has minimal, maximum size and layout weight, used in grouped layouts.\n    // ----------------------------------------------------------------------------------------------------------------\n    class WidgetLayout: public ActorTransform\n    {\n    public:\n        PROPERTIES(WidgetLayout);\n        PROPERTY(Vec2F, anchorMin, SetAnchorMin, GetAnchorMin); // Left bottom anchor property\n        PROPERTY(Vec2F, anchorMax, SetAnchorMax,GetAnchorMax);  // Right top anchor property\n\n        PROPERTY(Vec2F, offsetMin, SetOffsetMin, GetOffsetMin); // Left bottom corner offset property\n        PROPERTY(Vec2F, offsetMax, SetOffsetMax, GetOffsetMax); // Right top corner offset property\n\n        PROPERTY(float, anchorLeft, SetAnchorLeft, GetAnchorLeft);       // Left anchor property\n        PROPERTY(float, anchorRight, SetAnchorRight, GetAnchorRight);    // Right anchor property\n        PROPERTY(float, anchorBottom, SetAnchorBottom, GetAnchorBottom); // Bottom anchor property\n        PROPERTY(float, anchorTop, SetAnchorTop, GetAnchorTop);          // Top anchor property\n\n        PROPERTY(float, offsetLeft, SetOffsetLeft, GetOffsetLeft);       // Left offset property\n        PROPERTY(float, offsetRight, SetoffsetRight, GetoffsetRight);    // Right offset property\n        PROPERTY(float, offsetBottom, SetOffsetBottom, GetOffsetBottom); // Bottom offset property\n        PROPERTY(float, offsetTop, SetOffsetTop, GetOffsetTop);          // Top offset property\n\n        PROPERTY(Vec2F, minSize, SetMinimalSize, GetMinimalSize);      // Minimal size property\n        PROPERTY(float, minWidth, SetMinimalWidth, GetMinWidth);   // Minimal width property\n        PROPERTY(float, minHeight,SetMinimalHeight, GetMinHeight); // Minimal height property\n\n        PROPERTY(Vec2F, maxSize, SetMaximalSize, GetMaximalSize);       // Maximum size property\n        PROPERTY(float, maxWidth, SetMaximalWidth, GetMaxWidth);    // Maximum width property\n        PROPERTY(float, maxHeight, SetMaximalHeight, GetMaxHeight); // Maximum height property\n\n        PROPERTY(Vec2F, weight, SetWeight, GetWeight);                   // Layout weight property\n        PROPERTY(float, widthWeight, SetWidthWeight, GetWidthWeight);    // Width layout weight property\n        PROPERTY(float, heightWeight, SetHeightWeight, GetHeightWeight); // Height layout weight property\n\n    public:\n        // Default constructor, creates both stretching layout  \n        WidgetLayout();\n\n        // Constructor with parameters\n        WidgetLayout(const Vec2F& anchorMin, const Vec2F& anchorMax, const Vec2F& offsetMin, const Vec2F& offsetMax);\n\n        // Constructor with parameters\n        WidgetLayout(float anchorLeft, float anchorTop, float anchorRight, float anchorBottom,\n                     float offsetLeft, float offsetTop, float offsetRight, float offsetBottom);\n\n        // Copy-constructor\n        WidgetLayout(const WidgetLayout& other);\n\n        // Copy-operator\n        WidgetLayout& operator=(const WidgetLayout& other);\n\n        // Equals operator\n        bool operator==(const WidgetLayout& other) const;\n\n        // Updates layout and transformation\n        void Update() override;\n\n        // Sets transform dirty and needed to update. Checks is driven by parent and marks parent as dirty too @SCRIPTABLE\n        void SetDirty(bool fromParent = false) override;\n\n        // Copies data parameters from other layout @SCRIPTABLE\n        void CopyFrom(const ActorTransform& other) override;\n\n        // Sets position\n        void SetPosition(const Vec2F& position) override;\n\n        // Sets size\n        void SetSize(const Vec2F& size) override;\n\n        // Sets width\n        void SetWidth(float value) override;\n\n        // Sets height\n        void SetHeight(float value) override;\n\n        // Return size\n        Vec2F GetSize() const override;\n\n        // Return width\n        float GetWidth() const override;\n\n        // Return height\n        float GetHeight() const override;\n\n        // Sets pivot, in local space, where (0, 0) - left down corner, (1; 1) - right top\n        void SetPivot(const Vec2F& pivot) override;\n\n        // Sets basis\n        void SetBasis(const Basis& basis) override;\n\n        // Sets basis without size\n        void SetNonSizedBasis(const Basis& basis) override;\n\n        // Returns rect\n        RectF GetRect() const override;\n\n        // Sets rect\n        void SetRect(const RectF& rect) override;\n\n        // Return rectangle for children in worlds space \n        RectF GetChildrenWorldRect() const;\n\n        // Sets direction aligned rectangle transformation\n        void SetAxisAlignedRect(const RectF& rect) override;\n\n        // Sets left bottom anchor. (0, 0) - left bottom of parent, (1, 1) - right top @SCRIPTABLE\n        void SetAnchorMin(const Vec2F& min);\n\n        // Returns left bottom anchor. (0, 0) - left bottom of parent, (1, 1) - right top @SCRIPTABLE\n        Vec2F GetAnchorMin() const;\n\n        // Sets right top anchor. (0, 0) - left bottom of parent, (1, 1) - right top @SCRIPTABLE\n        void SetAnchorMax(const Vec2F& max);\n\n        // Returns right top anchor. (0, 0) - left bottom of parent, (1, 1) - right top @SCRIPTABLE\n        Vec2F GetAnchorMax() const;\n\n        // Sets left anchor. 0 - left parent border, 1 - right @SCRIPTABLE\n        void SetAnchorLeft(float value);\n\n        // Returns left anchor. 0 - left parent border, 1 - right @SCRIPTABLE\n        float GetAnchorLeft() const;\n\n        // Sets right anchor. 0 - left parent border, 1 - right @SCRIPTABLE\n        void SetAnchorRight(float value);\n\n        // Returns right anchor. 0 - left parent border, 1 - right @SCRIPTABLE\n        float GetAnchorRight() const;\n\n        // Sets bottom anchor. 0 - bottom parent border, 1 - top @SCRIPTABLE\n        void SetAnchorBottom(float value);\n\n        // Returns bottom anchor. 0 - bottom parent border, 1 - top @SCRIPTABLE\n        float GetAnchorBottom() const;\n\n        // Sets top anchor. 0 - bottom parent border, 1 - top @SCRIPTABLE\n        void SetAnchorTop(float value);\n\n        // Returns top anchor. 0 - bottom parent border, 1 - top @SCRIPTABLE\n        float GetAnchorTop() const;\n\n        // Sets left bottom offset @SCRIPTABLE\n        void SetOffsetMin(const Vec2F& min);\n\n        // Returns left bottom offset @SCRIPTABLE\n        Vec2F GetOffsetMin() const;\n\n        // Sets right top offset @SCRIPTABLE\n        void SetOffsetMax(const Vec2F& max);\n\n        // Returns right top offset @SCRIPTABLE\n        Vec2F GetOffsetMax() const;\n\n        // Sets left offset @SCRIPTABLE\n        void SetOffsetLeft(float value);\n\n        // Returns left offset @SCRIPTABLE\n        float GetOffsetLeft() const;\n\n        // Sets right offset @SCRIPTABLE\n        void SetoffsetRight(float value);\n\n        // Returns right offset @SCRIPTABLE\n        float GetoffsetRight() const;\n\n        // Sets bottom offset @SCRIPTABLE\n        void SetOffsetBottom(float value);\n\n        // Returns bottom offset @SCRIPTABLE\n        float GetOffsetBottom() const;\n\n        // Sets top offset @SCRIPTABLE\n        void SetOffsetTop(float value);\n\n        // Returns top offset @SCRIPTABLE\n        float GetOffsetTop() const;\n\n        // Sets minimal size, enables size check @SCRIPTABLE\n        void SetMinimalSize(const Vec2F& minSize);\n\n        // Returns minimal size @SCRIPTABLE\n        Vec2F GetMinimalSize() const;\n\n        // Sets minimal width, enables size check @SCRIPTABLE\n        void SetMinimalWidth(float value);\n\n        // Returns minimal width @SCRIPTABLE\n        float GetMinWidth() const;\n\n        // Sets minimal height, enables size check @SCRIPTABLE\n        void SetMinimalHeight(float value);\n\n        // Returns minimal height @SCRIPTABLE\n        float GetMinHeight() const;\n\n        // Sets maximal size, enables size check @SCRIPTABLE\n        void SetMaximalSize(const Vec2F& maxSize);\n\n        // Returns maximal size @SCRIPTABLE\n        Vec2F GetMaximalSize() const;\n\n        // Sets maximal width, enables size check @SCRIPTABLE\n        void SetMaximalWidth(float value);\n\n        // Returns maximal width @SCRIPTABLE\n        float GetMaxWidth() const;\n\n        // Sets maximal height, enables size check @SCRIPTABLE\n        void SetMaximalHeight(float value);\n\n        // Returns maximal height @SCRIPTABLE\n        float GetMaxHeight() const;\n\n        // Disables size checking\n        void DisableSizeChecks();\n\n        // Enables size checking\n        void EnableSizeChecks();\n\n        // Sets layout weight @SCRIPTABLE\n        void SetWeight(const Vec2F& weight);\n\n        // Returns layout height @SCRIPTABLE\n        Vec2F GetWeight() const;\n\n        // Sets width layout weight @SCRIPTABLE\n        void SetWidthWeight(float widthWeigth);\n\n        // Returns width layout weight  @SCRIPTABLE\n        float GetWidthWeight();\n\n        // Sets height layout weight @SCRIPTABLE\n        void SetHeightWeight(float heigthWeigth);\n\n        // Returns height layout weight @SCRIPTABLE\n        float GetHeightWeight();\n\n        // Returns both axis stretching by parent layout with border offsets @SCRIPTABLE\n        static WidgetLayout BothStretch(float borderLeft = 0, float borderBottom = 0, float borderRight = 0, float borderTop = 0);\n\n        // Returns fixed by size layout, positioned relative to corner with offset  @SCRIPTABLE\n        static WidgetLayout Based(BaseCorner corner, const Vec2F& size, const Vec2F& offset = Vec2F());\n\n        // Returns horizontal stretching by parent layout, anchored by height with offsets and left and right border @SCRIPTABLE\n        static WidgetLayout HorStretch(VerAlign align, float left, float right, float height, float offsY = 0.0f);\n\n        // Returns vertical stretching by parent layout, anchored by width with offsets and left and right border @SCRIPTABLE\n        static WidgetLayout VerStretch(HorAlign align, float top, float bottom, float width, float offsX = 0.0f);\n\n        SERIALIZABLE(WidgetLayout);\n\n    protected:\n        void(WidgetLayout::*mCheckMinMaxFunc)(); // Check minimum and maximum of layout delegate\n        WidgetLayoutData* mData;\n\n    protected:\n        // Sets owner and updates transform\n        void SetOwner(const Ref<Actor>& actor) override;\n\n        // Returns parent rectange, or zero when no parent\n        RectF GetParentRectangle() const override;\n\n        // Floors all local rectangle properties\n        void FloorRectangle();\n\n        // Updates offsets to match existing rectangle to offsets and anchors rectangle\n        void UpdateOffsetsByCurrentTransform();\n\n        // Checks minimum and maximum size\n        void CheckMinMax();\n\n        // Doesn't checks size, dummy function\n        void DontCheckMinMax();\n\n#if IS_SCRIPTING_SUPPORTED\n    public:\n        // Sets layout data? for scripting @SCRIPTABLE\n        void Set(const WidgetLayout& other);\n#endif\n\n        friend class Widget;\n        friend class WidgetLayer;\n    };\n\n    class WidgetLayoutData : public ActorTransformData\n    {\n    public:\n        Vec2F anchorMin = Vec2F(0, 0); // Left bottom anchor @SERIALIZABLE\n        Vec2F anchorMax = Vec2F(0, 0); // Right top anchor @SERIALIZABLE\n\n        Vec2F offsetMin = Vec2F(0, 0);   // Left bottom offset @SERIALIZABLE\n        Vec2F offsetMax = Vec2F(10, 10); // Right top offset @SERIALIZABLE\n\n        Vec2F minSize = Vec2F(0, 0);     // Minimal size @SERIALIZABLE\n        Vec2F maxSize = Vec2F(10000, 10000); // Maximum size @SERIALIZABLE\n\n        Vec2F weight = Vec2F(1, 1); // Layout weight @SERIALIZABLE\n\n        RectF childrenWorldRect; // World rectangle for children arranging\n\n        bool drivenByParent = false; // Is layout controlling by parent\n\n        Widget* owner = nullptr; // owner widget pointer \n\n        SERIALIZABLE(WidgetLayoutData);\n\n        // Returns is serialize enabled; used to turn off fields serialization\n        bool IsSerializeEnabled() const override;\n    };\n\n    // Calculates children widths or heights by weights and min/max sizes\n    Vector<float> CalculateExpandedSize(Vector<Ref<Widget>>& widgets, bool horizontal, float availableWidth, float spacing);\n}\n// --- META ---\n\nCLASS_BASES_META(o2::WidgetLayout)\n{\n    BASE_CLASS(o2::ActorTransform);\n}\nEND_META;\nCLASS_FIELDS_META(o2::WidgetLayout)\n{\n    FIELD().PUBLIC().NAME(anchorMin);\n    FIELD().PUBLIC().NAME(anchorMax);\n    FIELD().PUBLIC().NAME(offsetMin);\n    FIELD().PUBLIC().NAME(offsetMax);\n    FIELD().PUBLIC().NAME(anchorLeft);\n    FIELD().PUBLIC().NAME(anchorRight);\n    FIELD().PUBLIC().NAME(anchorBottom);\n    FIELD().PUBLIC().NAME(anchorTop);\n    FIELD().PUBLIC().NAME(offsetLeft);\n    FIELD().PUBLIC().NAME(offsetRight);\n    FIELD().PUBLIC().NAME(offsetBottom);\n    FIELD().PUBLIC().NAME(offsetTop);\n    FIELD().PUBLIC().NAME(minSize);\n    FIELD().PUBLIC().NAME(minWidth);\n    FIELD().PUBLIC().NAME(minHeight);\n    FIELD().PUBLIC().NAME(maxSize);\n    FIELD().PUBLIC().NAME(maxWidth);\n    FIELD().PUBLIC().NAME(maxHeight);\n    FIELD().PUBLIC().NAME(weight);\n    FIELD().PUBLIC().NAME(widthWeight);\n    FIELD().PUBLIC().NAME(heightWeight);\n    FIELD().PROTECTED().NAME(mData);\n}\nEND_META;\nCLASS_METHODS_META(o2::WidgetLayout)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vec2F&, const Vec2F&, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(float, float, float, float, float, float, float, float);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const WidgetLayout&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetDirty, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, CopyFrom, const ActorTransform&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWidth, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeight, float);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetSize);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetWidth);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetHeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPivot, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBasis, const Basis&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetNonSizedBasis, const Basis&);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetRect);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRect, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetChildrenWorldRect);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAxisAlignedRect, const RectF&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAnchorMin, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetAnchorMin);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAnchorMax, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetAnchorMax);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAnchorLeft, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetAnchorLeft);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAnchorRight, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetAnchorRight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAnchorBottom, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetAnchorBottom);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAnchorTop, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetAnchorTop);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetOffsetMin, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetOffsetMin);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetOffsetMax, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetOffsetMax);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetOffsetLeft, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetOffsetLeft);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetoffsetRight, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetoffsetRight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetOffsetBottom, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetOffsetBottom);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetOffsetTop, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetOffsetTop);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetMinimalSize, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetMinimalSize);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetMinimalWidth, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetMinWidth);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetMinimalHeight, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetMinHeight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetMaximalSize, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetMaximalSize);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetMaximalWidth, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetMaxWidth);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetMaximalHeight, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetMaxHeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, DisableSizeChecks);\n    FUNCTION().PUBLIC().SIGNATURE(void, EnableSizeChecks);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWeight, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, GetWeight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetWidthWeight, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetWidthWeight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetHeightWeight, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, GetHeightWeight);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE_STATIC(WidgetLayout, BothStretch, float, float, float, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE_STATIC(WidgetLayout, Based, BaseCorner, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE_STATIC(WidgetLayout, HorStretch, VerAlign, float, float, float, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE_STATIC(WidgetLayout, VerStretch, HorAlign, float, float, float, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetOwner, const Ref<Actor>&);\n    FUNCTION().PROTECTED().SIGNATURE(RectF, GetParentRectangle);\n    FUNCTION().PROTECTED().SIGNATURE(void, FloorRectangle);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateOffsetsByCurrentTransform);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckMinMax);\n    FUNCTION().PROTECTED().SIGNATURE(void, DontCheckMinMax);\n#if  IS_SCRIPTING_SUPPORTED\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, Set, const WidgetLayout&);\n#endif\n}\nEND_META;\n\nCLASS_BASES_META(o2::WidgetLayoutData)\n{\n    BASE_CLASS(o2::ActorTransformData);\n}\nEND_META;\nCLASS_FIELDS_META(o2::WidgetLayoutData)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(anchorMin);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(anchorMax);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(offsetMin);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(10, 10)).NAME(offsetMax);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(minSize);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(10000, 10000)).NAME(maxSize);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(1, 1)).NAME(weight);\n    FIELD().PUBLIC().NAME(childrenWorldRect);\n    FIELD().PUBLIC().DEFAULT_VALUE(false).NAME(drivenByParent);\n    FIELD().PUBLIC().DEFAULT_VALUE(nullptr).NAME(owner);\n}\nEND_META;\nCLASS_METHODS_META(o2::WidgetLayoutData)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSerializeEnabled);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/WidgetState.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"WidgetState.h\"\n\n#include \"o2/Scene/UI/Widget.h\"\n\nnamespace o2\n{\n    WidgetState::WidgetState()\n    {}\n\n    WidgetState::WidgetState(const WidgetState& state):\n        name(state.name), mState(state.mState), \n        offStateAnimationSpeed(state.offStateAnimationSpeed)\n    {\n        mAnimation = state.mAnimation;\n        mPlayer->SetClip(mAnimation ? mAnimation->animation : nullptr);\n        mPlayer->relTime = mState ? 1.0f:0.0f;\n    }\n\n    WidgetState::~WidgetState()\n    {}\n\n    WidgetState::operator bool()\n    {\n        return GetState();\n    }\n\n    bool WidgetState::operator==(const WidgetState& other) const\n    {\n        return false;\n    }\n\n    void WidgetState::SetOwner(const Ref<Widget>& owner, bool errors)\n    {\n        mOwner = owner;\n        mPlayer->SetTarget(static_cast<IObject*>(static_cast<ActorBase*>(const_cast<Widget*>(owner.Get()))), errors);\n        mPlayer->relTime = mState ? 1.0f : 0.0f;\n    }\n\n    const Ref<AnimationPlayer>& WidgetState::GetAnimationPlayer()\n    {\n        return mPlayer;\n    }\n\n    void WidgetState::SetAnimationAsset(const AssetRef<AnimationAsset>& asset)\n    {\n        mAnimation = asset;\n        mPlayer->SetClip(mAnimation ? mAnimation->animation : nullptr);\n    }\n\n    const AssetRef<AnimationAsset>& WidgetState::GetAnimationAsset() const\n    {\n        return mAnimation;\n    }\n\n    void WidgetState::SetAnimationClip(const Ref<AnimationClip>& animation)\n    {\n        if (mAnimation && mAnimation.IsInstance())\n            mAnimation->animation = animation;\n        else\n        {\n            mAnimation.SetInstance(mmake<AnimationAsset>(animation).Get());\n            mPlayer->SetClip(mAnimation->animation);\n        }\n    }\n\n    Ref<AnimationClip>& WidgetState::GetAnimationClip()\n    {\n        if (mAnimation)\n            return mAnimation->animation;\n\n        static Ref<AnimationClip> empty;\n        return empty;\n    }\n\n    void WidgetState::SetState(bool state)\n    {\n         if (mState == state && !mPlayer->IsPlaying())\n             return;\n\n        mState = state;\n\n        if (state)\n        {\n            mPlayer->speed = 1.0f;\n            mPlayer->PlayForward();\n\n            onStateBecomesTrue();\n        }\n        else\n        {\n            mPlayer->speed = offStateAnimationSpeed;\n            mPlayer->PlayBack();\n\n            onStateBecomesFalse();\n        }\n    }\n\n    void WidgetState::SetStateForcible(bool state)\n    {\n        if (mState == state)\n        {\n            if ((state && Math::Equals(mPlayer->GetRelativeTime(), 1.0f)) ||\n                (!state && Math::Equals(mPlayer->GetRelativeTime(), 0.0f)))\n            {\n                return;\n            }\n        }\n\n        mState = state;\n\n        if (mState)\n        {\n            mPlayer->GoToEnd();\n            mPlayer->Stop();\n            onStateBecomesTrue();\n            onStateFullyTrue();\n        }\n        else\n        {\n            mPlayer->GoToBegin();\n            mPlayer->Stop();\n            onStateBecomesFalse();\n            onStateFullyFalse();\n        }\n    }\n\n    bool WidgetState::GetState() const\n    {\n        return mState;\n    }\n\n    void WidgetState::Update(float dt)\n    {\n        if (mPlayer->IsPlaying())\n        {\n            mPlayer->Update(dt);\n\n            if (!mPlayer->IsPlaying())\n            {\n                if (mState) \n                    onStateFullyTrue();\n                else \n                    onStateFullyFalse();\n            }\n        }\n    }\n\n    void WidgetState::OnAnimationChanged()\n    {\n        mPlayer->SetClip(mAnimation ? mAnimation->animation : nullptr);\n    }\n\n    void WidgetState::OnDeserialized(const DataValue& node)\n    {\n        mPlayer->SetClip(mAnimation ? mAnimation->animation : nullptr);\n    }\n\n    void WidgetState::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        OnDeserialized(node);\n    }\n\n    WidgetState& WidgetState::operator=(bool state)\n    {\n        SetState(state);\n        return *this;\n    }\n\n    void WidgetState::BeginPreview()\n    {\n        mPlayer->Stop();\n    }\n\n    void WidgetState::EndPreview()\n    {\n        mPlayer->Play();\n    }\n\n    Ref<Actor> WidgetState::GetPreviewActor() const\n    {\n        return mOwner.Lock();\n    }\n\n    Ref<IAnimation> WidgetState::GetPreviewPlayer() const\n    {\n        return mPlayer;\n    }\n\n    RefCounter* WidgetState::GetRefCounter() const\n    {\n        return RefCounterable::GetRefCounter();\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::WidgetState, o2__WidgetState);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/WidgetState.h",
    "content": "#pragma once\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Animation/AnimationPlayer.h\"\n#include \"o2/Assets/Types/AnimationAsset.h\"\n#include \"o2/Utils/Editor/AssetEditablePreview.h\"\n#include \"o2/Utils/Editor/Attributes/InvokeOnChangeAttribute.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Widget;\n\n    // -----------------------------------------------------------------------\n    // Widget state. Could be true or false, and animates widget by this state\n    // -----------------------------------------------------------------------\n    class WidgetState: public ISerializable, public RefCounterable, public ICloneableRef, public AnimationAssetEditablePreview\n    {\n    public:\n        String name; // State name @SERIALIZABLE @SCRIPTABLE\n\n        float offStateAnimationSpeed = 1.0f; // False state transition animation speed @SERIALIZABLE @SCRIPTABLE\n\n    public:\n        PROPERTIES(WidgetState);\n        PROPERTY(bool, state, SetState, GetState); // State flag property @SCRIPTABLE\n\n        PROPERTY(AssetRef<AnimationAsset>, animationAsset, SetAnimationAsset, GetAnimationAsset); // Animation asset property @EDITOR_IGNORE @SCRIPTABLE\n        PROPERTY(Ref<AnimationClip>, animationClip, SetAnimationClip, GetAnimationClip);          // animation clip property @EDITOR_IGNORE @SCRIPTABLE\n\n    public:\n        Function<void()> onStateFullyTrue;    // This event calls when state is completely true (at the end of animation)\n        Function<void()> onStateFullyFalse;   // This event calls when state is completely false (at the end of animation)\n        Function<void()> onStateBecomesTrue;  // This event calls when state becomes to true\n        Function<void()> onStateBecomesFalse; // This event calls when state becomes to true\n\n    public:\n        // Default constructor @SCRIPTABLE\n        WidgetState();\n\n        // Copy-constructor\n        WidgetState(const WidgetState& state);\n\n        // Destructor\n        ~WidgetState();\n\n        // Boolean cast operator\n        operator bool();\n\n        // Assign from boolean operator\n        WidgetState& operator=(bool state);\n\n        // Equals operator\n        bool operator==(const WidgetState& other) const;\n\n        // Sets owner widget @SCRIPTABLE\n        void SetOwner(const Ref<Widget>& owner, bool errors);\n\n        // Returns animation player\n        const Ref<AnimationPlayer>& GetAnimationPlayer();\n\n        // Sets animation asset\n        void SetAnimationAsset(const AssetRef<AnimationAsset>& asset);\n\n        // Returns animation asset\n        const AssetRef<AnimationAsset>& GetAnimationAsset() const;\n\n        // Sets animation asset instance clip\n        void SetAnimationClip(const Ref<AnimationClip>& animation);\n\n        // Returns animation asset instance clip, if exists\n        Ref<AnimationClip>& GetAnimationClip();\n\n        // Sets current state @SCRIPTABLE\n        void SetState(bool state);\n\n        // Sets state immediately @SCRIPTABLE\n        void SetStateForcible(bool state);\n\n        // Returns current state @SCRIPTABLE\n        bool GetState() const;\n\n        // Updates animation\n        void Update(float dt);\n\n        // Returns ref counter\n        RefCounter* GetRefCounter() const override;    \n\n        SERIALIZABLE(WidgetState);\n        CLONEABLE_REF(WidgetState);\n\n    protected:\n        bool mState = false; // Current state @SERIALIZABLE\n\n        WeakRef<Widget> mOwner; // Owner widget pointer\n\n        Ref<AnimationPlayer> mPlayer = mmake<AnimationPlayer>(); // Animation player\n\n        AssetRef<AnimationAsset> mAnimation; // Widget animation @SERIALIZABLE @EDITOR_PROPERTY @INVOKE_ON_CHANGE(OnAnimationChanged)\n\n    protected:\n        // Called when animation changed from editor\n        void OnAnimationChanged();\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        // Completion deserialization delta callback\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n        // Called when asset started to preview\n        void BeginPreview() override;\n\n        // Called when asset finished preview\n        void EndPreview() override;\n\n        // Returns actor that is being previewed\n        Ref<Actor> GetPreviewActor() const override;\n\n        // Returns animation player\n        Ref<IAnimation> GetPreviewPlayer() const override;\n\n        friend class Widget;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::WidgetState)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n    BASE_CLASS(o2::AnimationAssetEditablePreview);\n}\nEND_META;\nCLASS_FIELDS_META(o2::WidgetState)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().NAME(name);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(offStateAnimationSpeed);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(state);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(animationAsset);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(animationClip);\n    FIELD().PUBLIC().NAME(onStateFullyTrue);\n    FIELD().PUBLIC().NAME(onStateFullyFalse);\n    FIELD().PUBLIC().NAME(onStateBecomesTrue);\n    FIELD().PUBLIC().NAME(onStateBecomesFalse);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mState);\n    FIELD().PROTECTED().NAME(mOwner);\n    FIELD().PROTECTED().DEFAULT_VALUE(mmake<AnimationPlayer>()).NAME(mPlayer);\n    FIELD().PROTECTED().EDITOR_PROPERTY_ATTRIBUTE().INVOKE_ON_CHANGE_ATTRIBUTE(OnAnimationChanged).SERIALIZABLE_ATTRIBUTE().NAME(mAnimation);\n}\nEND_META;\nCLASS_METHODS_META(o2::WidgetState)\n{\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const WidgetState&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetOwner, const Ref<Widget>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<AnimationPlayer>&, GetAnimationPlayer);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnimationAsset, const AssetRef<AnimationAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(const AssetRef<AnimationAsset>&, GetAnimationAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAnimationClip, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<AnimationClip>&, GetAnimationClip);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetState, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetStateForcible, bool);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, GetState);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(RefCounter*, GetRefCounter);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnAnimationChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginPreview);\n    FUNCTION().PROTECTED().SIGNATURE(void, EndPreview);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Actor>, GetPreviewActor);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<IAnimation>, GetPreviewPlayer);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Button.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Button.h\"\n\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n\nnamespace o2\n{\n    Button::Button(RefCounter* refCounter):\n        Widget(refCounter), CursorAreaEventsListener()\n    {}\n\n    Button::Button(RefCounter* refCounter, const Button& other) :\n        Widget(refCounter, other)\n    {\n        mCaptionText = GetLayerDrawable<Text>(\"caption\");\n        mIconSprite = GetLayerDrawable<Sprite>(\"icon\");\n\n        RetargetStatesAnimations();\n\n        if (mInteractable)\n            OnBecomeInteractable();\n        else\n            OnBecomeNotInteractable();\n    }\n\n    Button& Button::operator=(const Button& other)\n    {\n        Widget::operator=(other);\n\n        mCaptionText = GetLayerDrawable<Text>(\"caption\");\n        mIconSprite = GetLayerDrawable<Sprite>(\"icon\");\n        RetargetStatesAnimations();\n\n        return *this;\n    }\n\n    void Button::Draw()\n    {\n        Widget::Draw();\n        CursorAreaEventsListener::OnDrawn();\n    }\n\n    void Button::SetCaption(const WString& text)\n    {\n        if (mCaptionText)\n            mCaptionText.Lock()->SetText(text);\n    }\n\n    WString Button::GetCaption() const\n    {\n        if (mCaptionText)\n            return mCaptionText.Lock()->GetText();\n\n        return WString();\n    }\n\n    void Button::SetIcon(const Ref<Sprite>& sprite)\n    {\n        if (mIconSprite)\n            mIconSprite = sprite;\n    }\n\n    Ref<Sprite> Button::GetIcon() const\n    {\n        if (mIconSprite)\n            return mIconSprite.Lock();\n\n        return nullptr;\n    }\n\n    bool Button::IsFocusable() const\n    {\n        return true;\n    }\n\n    bool Button::IsUnderPoint(const Vec2F& point)\n    {\n        if (isPointInside.IsEmpty())\n            return Widget::IsUnderPoint(point);\n        \n        return mDrawingScissorRect.IsInside(point) && isPointInside(point);\n    }\n\n    String Button::GetCreateMenuGroup()\n    {\n        return \"Basic\";\n    }\n\n    void Button::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = true;\n\n        o2UI.FocusWidget(Ref(this));\n    }\n\n    void Button::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        if (IsUnderPoint(cursor.position))\n            onClick();\n    }\n\n    void Button::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n    }\n\n    void Button::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = true;\n    }\n\n    void Button::OnCursorExit(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = false;\n    }\n\n    void Button::OnKeyPressed(const Input::Key& key)\n    {\n        if (mIsFocused && (key.keyCode == VK_SPACE || key.keyCode == VK_RETURN))\n        {\n            auto pressedState = state[\"pressed\"];\n            if (pressedState)\n                *pressedState = true;\n        }\n\n        if (shortcut.IsPressed())\n            onClick();\n    }\n\n    void Button::OnKeyReleased(const Input::Key& key)\n    {\n        if (mIsFocused && (key.keyCode == VK_SPACE || key.keyCode == VK_RETURN))\n        {\n            auto pressedState = state[\"pressed\"];\n            if (pressedState)\n                *pressedState = false;\n\n            onClick();\n        }\n    }\n\n    void Button::OnLayerAdded(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->name == \"caption\" && layer->GetDrawable() && layer->GetDrawable()->GetType() == TypeOf(Text))\n            mCaptionText = DynamicCast<Text>(layer->GetDrawable());\n\n        if (layer->name == \"icon\" && layer->GetDrawable() && layer->GetDrawable()->GetType() == TypeOf(Sprite))\n            mIconSprite = DynamicCast<Sprite>(layer->GetDrawable());\n    }\n\n    void Button::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        interactable = true;\n    }\n\n    void Button::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        interactable = false;\n    }\n\n    void Button::OnBecomeInteractable()\n    {\n        if (auto inactiveState = state[\"inactive\"])\n            *inactiveState = false;\n    }\n\n    void Button::OnBecomeNotInteractable()\n    {\n        if (auto inactiveState = state[\"inactive\"])\n            *inactiveState = true;\n    }\n\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Button>);\n// --- META ---\n\nDECLARE_CLASS(o2::Button, o2__Button);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Button.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Function/SerializableFunction.h\"\n#include \"o2/Utils/System/ShortcutKeys.h\"\n\nnamespace o2\n{\n    class Text;\n\n    // -------------\n    // Button widget\n    // -------------\n    class Button: public Widget, public CursorAreaEventsListener, public KeyboardEventsListener\n    {\n    public:\n        PROPERTIES(Button);\n        PROPERTY(WString, caption, SetCaption, GetCaption); // Caption property. Searches \"caption\" layer and sets text\n        PROPERTY(Ref<Sprite>, icon, SetIcon, GetIcon);      // Icon image asset setter. Searches sprite layer with name \"icon\" and sets image\n\n    public:\n        SerializableFunction<void()> onClick;       // Click event @SERIALIZABLE\n        Function<bool(const Vec2F&)> isPointInside; // Checking pointer function. When this empty using default widget pointer check @EDITOR_IGNORE\n\n    public:\n        ShortcutKeys shortcut; // Shortcut keys\n\n    public:\n        // Default constructor\n        Button(RefCounter* refCounter);\n\n        // Copy-constructor\n        Button(RefCounter* refCounter, const Button& other);\n\n        // Assign operator\n        Button& operator=(const Button& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Sets caption of button. Searches text layer with name \"caption\". If can't find this layer, creates them\n        void SetCaption(const WString& text);\n\n        // Returns caption text from text layer \"caption\". Returns no data if layer isn't exist\n        WString GetCaption() const;\n\n        // Sets icon sprite. Searches sprite layer \"icon\". Creates a new icon if isn't exist\n        void SetIcon(const Ref<Sprite>& sprite);\n\n        // Returns icon sprite\n        Ref<Sprite> GetIcon() const;\n\n        // Returns is this widget can be selected\n        bool IsFocusable() const override;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(Button);\n        CLONEABLE_REF(Button);\n\n    protected:\n        WeakRef<Text>   mCaptionText; // Caption layer text\n        WeakRef<Sprite> mIconSprite;  // Icon layer sprite\n\n    protected:\n        // Called when cursor pressed on this. Sets state \"pressed\" to true\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time). Sets state \"pressed\" to false.\n        // Called onClicked if cursor is still above this\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object. Sets state \"select\" to true\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object. Sets state \"select\" to false\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when key was released\n        void OnKeyReleased(const Input::Key& key) override;\n\n        // Called when layer added and updates drawing sequence\n        void OnLayerAdded(const Ref<WidgetLayer>& layer) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Called when listener becomes interactable, disabled \"inactive\" state when exists\n        void OnBecomeInteractable() override;\n\n        // Called when listener stops interacting, enables \"inactive\" state when exists\n        void OnBecomeNotInteractable() override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Button)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::CursorAreaEventsListener);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Button)\n{\n    FIELD().PUBLIC().NAME(caption);\n    FIELD().PUBLIC().NAME(icon);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(onClick);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().NAME(isPointInside);\n    FIELD().PUBLIC().NAME(shortcut);\n    FIELD().PROTECTED().NAME(mCaptionText);\n    FIELD().PROTECTED().NAME(mIconSprite);\n}\nEND_META;\nCLASS_METHODS_META(o2::Button)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Button&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIcon, const Ref<Sprite>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Sprite>, GetIcon);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFocusable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerAdded, const Ref<WidgetLayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnBecomeInteractable);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnBecomeNotInteractable);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/ContextMenu.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ContextMenu.h\"\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n\nnamespace o2\n{\n    FORWARD_REF_IMPL(VerticalLayout);\n\n    bool ContextMenu::Item::operator==(const Item& other) const\n    {\n        return text == other.text && mShortcut == other.mShortcut && icon == other.icon;\n    }\n\n    ContextMenu::Item::Item(RefCounter* refCounter) :\n        RefCounterable(refCounter), checked(false), checkable(false)\n    {}\n\n    ContextMenu::Item::Item(RefCounter* refCounter, const WString& text, const Function<void()> onClick,\n                            const WString& group /*= \"\"*/, const AssetRef<ImageAsset>& icon /*= AssetRef<ImageAsset>()*/,\n                            const ShortcutKeys& shortcut /*= ShortcutKeys()*/) :\n        RefCounterable(refCounter), text(text), group(group), onClick(onClick), mShortcut(shortcut), icon(icon), checked(false), checkable(false)\n    {\n        SetShortcut(shortcut);\n    }\n\n    ContextMenu::Item::Item(RefCounter* refCounter, const WString& text, const Vector<Ref<Item>>& subItems,\n                            const WString& group /*= \"\"*/, const AssetRef<ImageAsset>& icon /*= AssetRef<ImageAsset>()*/) :\n        RefCounterable(refCounter), text(text), group(group), subItems(subItems), icon(icon), checked(false), checkable(false)\n    {}\n\n    ContextMenu::Item::Item(RefCounter* refCounter, const WString& text, bool checked,\n                            Function<void(bool)> onChecked /*= Function<void(bool)>()*/,\n                            const WString& group /*= \"\"*/, const AssetRef<ImageAsset>& icon /*= AssetRef<ImageAsset>()*/,\n                            const ShortcutKeys& shortcut /*= ShortcutKeys()*/) :\n        RefCounterable(refCounter), text(text), group(group), checked(checked), onChecked(onChecked), checkable(true), mShortcut(shortcut), icon(icon)\n    {\n        SetShortcut(shortcut);\n    }\n\n    ContextMenu::Item::Item(RefCounter* refCounter, const Item& other):\n        RefCounterable(refCounter), text(other.text), group(other.group), icon(other.icon), checked(other.checked), \n        checkable(other.checkable), onClick(other.onClick), onChecked(other.onChecked), mShortcut(other.mShortcut)\n    {\n        SetShortcut(mShortcut);\n    }\n\n    ContextMenu::Item::~Item()\n    {}\n\n    void ContextMenu::Item::SetShortcut(const ShortcutKeys& shortcut)\n    {\n        mShortcut = shortcut;\n        ShortcutKeysListener::SetShortcut(shortcut);\n    }\n\n    const ShortcutKeys& ContextMenu::Item::GetShortcut() const\n    {\n        return mShortcut;\n    }\n\n    void ContextMenu::Item::SetMaxPriority()\n    {\n        ShortcutKeysListener::SetMaxPriority();\n\n        for (auto item : subItems)\n            item->SetMaxPriority();\n    }\n\n    void ContextMenu::Item::SetMinPriority()\n    {\n        ShortcutKeysListener::SetMinPriority();\n\n        for (auto item : subItems)\n            item->SetMinPriority();\n    }\n\n    void ContextMenu::Item::RecursiveSearchSubItems(const WString& text, Vector<Ref<Item>>& result)\n    {\n        if (subItems.IsEmpty())\n        {\n            if (this->text.ToLowerCase().Contains(text))\n                result.Add(mmake<Item>(*this));\n        }\n        else\n        {\n            for (auto item : subItems)\n                item->RecursiveSearchSubItems(text, result);\n        }\n    }\n\n    Ref<ContextMenu::Item> ContextMenu::Item::Separator()\n    {\n        return mmake<Item>(separatorText, Function<void()>());\n    }\n\n    WString ContextMenu::Item::separatorText = \"---\";\n\n    void ContextMenu::Item::OnShortcutPressed()\n    {\n        onClick();\n        onChecked(checked);\n    }\n\n    ContextMenu::ContextMenu(RefCounter* refCounter) :\n        PopupWidget(refCounter)\n    {\n        mItemSample = mmake<ContextMenuItem>();\n        mItemSample->RemoveFromScene();\n        mItemSample->layout->minHeight = 20.0f;\n        auto basicLayer = mItemSample->AddLayer(\"basic\", nullptr);\n        basicLayer->AddChildLayer(\"icon\", nullptr, Layout(Vec2F(0.0f, 0.5f), Vec2F(0.0f, 0.5f), Vec2F(10, 0), Vec2F(10, 0)));\n        basicLayer->AddChildLayer(\"subIcon\", nullptr, Layout(Vec2F(1.0f, 0.5f), Vec2F(1.0f, 0.5f), Vec2F(-10, 0), Vec2F(-10, 0)));\n        basicLayer->AddChildLayer(\"caption\", nullptr, Layout(Vec2F(0.0f, 0.0f), Vec2F(1.0f, 1.0f), Vec2F(20, 0), Vec2F(0, 0)));\n        basicLayer->AddChildLayer(\"shortcut\", nullptr, Layout(Vec2F(0.0f, 0.0f), Vec2F(1.0f, 1.0f), Vec2F(20, 0), Vec2F(0, 0)));\n\n        mSeparatorSample = mmake<Widget>();\n        mSeparatorSample->RemoveFromScene();\n        mSeparatorSample->layout->minHeight = 3.0f;\n        mSeparatorSample->layout->height = 3.0f;\n\n        mSelectionDrawable = mmake<Sprite>();\n\n        mItemsLayout = mmake<VerticalLayout>();\n        AddChild(mItemsLayout);\n\n        mItemsLayout->expandHeight = false;\n        mItemsLayout->expandWidth = true;\n        mItemsLayout->baseCorner = BaseCorner::LeftTop;\n        mItemsLayout->fitByChildren = true;\n        *mItemsLayout->layout = WidgetLayout::BothStretch();\n    }\n\n    ContextMenu::ContextMenu(RefCounter* refCounter, const Vector<Ref<Item>>& items) :\n        ContextMenu(refCounter)\n    {\n        AddItems(items);\n    }\n\n    ContextMenu::ContextMenu(RefCounter* refCounter, const ContextMenu& other) :\n        PopupWidget(refCounter, other), mMaxVisibleItems(other.mMaxVisibleItems)\n    {\n        mItemSample = other.mItemSample->CloneAsRef<ContextMenuItem>();\n        mItemSample->RemoveFromScene();\n\n        mSeparatorSample = other.mSeparatorSample->CloneAsRef<Widget>();\n        mSeparatorSample->RemoveFromScene();\n\n        mSelectionDrawable = other.mSelectionDrawable->CloneAsRef<Sprite>();\n        mSelectionLayout = other.mSelectionLayout;\n        mItemsLayout = FindChildByType<VerticalLayout>();\n\n        mSearchPanel = mItemsLayout->GetChildByType<Widget>(\"search panel\");\n        if (mSearchPanel)\n        {\n            mSearchEditBox = mSearchPanel->FindChildByType<EditBox>();\n            if (mSearchEditBox)\n                mSearchEditBox->onChanged = THIS_FUNC(OnSearchChanged);\n        }\n\n        RetargetStatesAnimations();\n    }\n\n    ContextMenu::~ContextMenu()\n    {}\n\n    ContextMenu& ContextMenu::operator=(const ContextMenu& other)\n    {\n        RemoveAllItems();\n\n        mItemSample = other.mItemSample->CloneAsRef<ContextMenuItem>();\n        mSeparatorSample = other.mSeparatorSample->CloneAsRef<Widget>();\n        mSelectionDrawable = other.mSelectionDrawable->CloneAsRef<Sprite>();\n        mSelectionLayout = other.mSelectionLayout;\n\n        PopupWidget::operator=(other);\n\n        mItemsLayout = FindChildByType<VerticalLayout>();\n        mMaxVisibleItems = other.mMaxVisibleItems;\n\n        mItemSample->RemoveFromScene();\n        mSeparatorSample->RemoveFromScene();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void ContextMenu::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy)\n            return;\n\n        PopupWidget::Update(dt);\n\n        const float rectLerpCoef = 20.0f;\n        if (mCurrentSelectionRect != mTargetSelectionRect) {\n            mCurrentSelectionRect = Math::Lerp(mCurrentSelectionRect, mTargetSelectionRect, dt * rectLerpCoef);\n            mSelectionDrawable->SetRect(mCurrentSelectionRect);\n        }\n\n        bool cursorPressed = o2Input.IsCursorPressed() || o2Input.IsRightMousePressed();\n        if (cursorPressed) {\n            if (!mChildPopup && (cursorPressed || Math::Abs(o2Input.GetMouseWheelDelta()) > 0.1f) &&\n                !layout->IsPointInside(o2Input.GetCursorPos()) && !mShownAtFrame && mEnabled) {\n                HideWithParent();\n            }\n        }\n\n        if (mSelectSubContextTime >= 0.0f) {\n            mSelectSubContextTime -= dt;\n\n            if (mSelectSubContextTime < 0.0f && GetItemUnderPoint(o2Input.GetCursorPos()) == mSelectedItem) {\n                if (mChildPopup)\n                    mChildPopup.Lock()->HideWithChild();\n\n                mChildPopup = nullptr;\n\n                if (mSelectedItem && mSelectedItem->GetSubMenu())\n                    mSelectedItem->GetSubMenu()->Show(Ref(this), mSelectedItem->layout->worldRightTop);\n            }\n        }\n\n        mShownAtFrame = false;\n    }\n\n    void ContextMenu::Show(const Ref<PopupWidget>& parent, const Vec2F& position /*= o2Input.GetCursorPos()*/)\n    {\n        if (mSearchEnabled)\n        {\n            mSearchEditBox->text = \"\";\n            mSearchEditBox->Focus();\n        }\n\n        if (!mItemsBuilt)\n            RebuildItems();\n\n        PopupWidget::Show(parent, position);\n\n        auto hoverState = state[\"hover\"];\n        if (hoverState) \n        {\n            mSelectionDrawable->SetEnabled(true);\n            *hoverState = false;\n        }\n        else \n            mSelectionDrawable->SetEnabled(false);\n    }\n\n    void ContextMenu::Show(const Vec2F& position /*= o2Input.GetCursorPos()*/)\n    {\n        Show(nullptr, position);\n    }\n\n    void ContextMenu::SetSearchEnabled(bool enabled)\n    {\n        mSearchEnabled = enabled;\n\n        if (mSearchPanel)\n            mSearchPanel->enabled = enabled;\n    }\n\n    bool ContextMenu::IsSearchEnabled() const\n    {\n        return mSearchEnabled;\n    }\n\n    void ContextMenu::AddItem(const Ref<Item>& item)\n    {\n        mItems.Add(item);\n        ForceRebuildItems();\n    }\n\n    Ref<ContextMenu::Item>  ContextMenu::AddItem(const WString& path,\n                              const Function<void()>& clickFunc /*= Function<void()>()*/,\n                              const AssetRef<ImageAsset>& icon /*= AssetRef<ImageAsset>()*/,\n                              const ShortcutKeys& shortcut /*= ShortcutKeys()*/)\n    {\n        WString targetPath = path;\n        auto& itemsList = CreateItemsByPath(targetPath);\n        int groupDelPos = targetPath.FindLast(\".\");\n\n        auto item = mmake<Item>(targetPath.SubStr(0, groupDelPos), clickFunc,\n                                groupDelPos < 0 ? \"\" : targetPath.SubStr(groupDelPos + 1),\n                                icon, shortcut);\n\n        itemsList.Add(item);\n        ForceRebuildItems();\n\n        return item;\n    }\n\n    Ref<ContextMenu::Item>  ContextMenu::AddToggleItem(const WString& path, bool value,\n                                    const Function<void(bool)>& clickFunc /*= Function<void(bool)>()*/,\n                                    const AssetRef<ImageAsset>& icon /*= AssetRef<ImageAsset>()*/,\n                                    const ShortcutKeys& shortcut /*= ShortcutKeys()*/)\n    {\n        WString targetPath = path;\n        auto& itemsList = CreateItemsByPath(targetPath);\n        int groupDelPos = targetPath.FindLast(\".\");\n\n        auto item = mmake<Item>(targetPath.SubStr(0, groupDelPos), value, clickFunc,\n                                groupDelPos < 0 ? \"\" : targetPath.SubStr(groupDelPos + 1),\n                                icon, shortcut);\n        itemsList.Add(item);\n        ForceRebuildItems();\n\n        return item;\n    }\n\n    Vector<Ref<ContextMenu::Item>>& ContextMenu::CreateItemsByPath(WString& path)\n    {\n        Vector<Ref<Item>>* items = &mItems;\n\n        while (true) {\n            int slashPos = path.Find(\"/\");\n            if (slashPos < 0)\n                break;\n\n            WString subMenu = path.SubStr(0, slashPos);\n\n            auto subItem = items->Find([&](auto& x) { return x->text == subMenu; });\n\n            if (!subItem) {\n                items->Add(mmake<Item>(subMenu, Function<void()>(), o2FileSystem.GetFileExtension(subMenu)));\n                subItem = &items->Last();\n            }\n\n            items = &(*subItem)->subItems;\n            path = path.SubStr(slashPos + 1);\n        }\n\n        return *items;\n    }\n\n    void ContextMenu::InsertItem(const Ref<Item>& item, int position)\n    {\n        mItems.Insert(item, position);\n        ForceRebuildItems();\n    }\n\n    void ContextMenu::AddItems(const Vector<Ref<Item>>& items)\n    {\n        mItems.Add(items);\n        ForceRebuildItems();\n    }\n\n    void ContextMenu::InsertItems(const Vector<Ref<Item>>& items, int position)\n    {\n        int i = 0;\n        for (auto item : items) {\n            InsertItem(item, position + i);\n            i++;\n        }\n    }\n\n    Ref<ContextMenuItem> ContextMenu::GetItemWidget(int position)\n    {\n        if (position > 0 && position < mItemsLayout->GetChildren().Count())\n            return DynamicCast<ContextMenuItem>(mItemsLayout->GetChildren()[position]);\n\n        return nullptr;\n    }\n\n    int ContextMenu::FindItem(const WString& text) const\n    {\n        int idx = 0;\n        for (auto& child : mItemsLayout->GetChildWidgets()) \n        {\n            auto item = DynamicCast<ContextMenuItem>(child);\n            if (item && item->GetText() == text)\n                return idx;\n\n            idx++;\n        }\n\n        return -1;\n    }\n\n    Ref<ContextMenuItem> ContextMenu::FindItemWidget(const WString& path) const\n    {\n        int delPos = path.Find(\"/\");\n        WString pathPart = path.SubStr(0, delPos);\n\n        for (auto& child : mItemsLayout->mChildren) \n        {\n            auto item = DynamicCast<ContextMenuItem>(child);\n            if (item && item->GetText() == pathPart) {\n                if (delPos == -1)\n                    return item;\n                else if (auto subContext = item->GetSubMenu())\n                    return subContext->FindItemWidget(path.SubStr(delPos + 1));\n            }\n        }\n\n        return nullptr;\n    }\n\n    void ContextMenu::SetItem(int position, const Ref<Item>& item)\n    {\n        if (position < 0 || position >= mItems.Count())\n            return;\n\n        mItems[position] = item;\n        ForceRebuildItems();\n    }\n\n    Ref<ContextMenuItem> ContextMenu::GetItemUnderPoint(const Vec2F& point)\n    {\n        if (!mItemsLayout)\n            return nullptr;\n\n        for (auto& child : mItemsLayout->mChildWidgets) {\n            if (child->layout->IsPointInside(point) && child->GetType() == TypeOf(ContextMenuItem))\n                return DynamicCast<ContextMenuItem>(child);\n        }\n\n        return nullptr;\n    }\n\n    void ContextMenu::UpdateHover(const Vec2F& point)\n    {\n        auto itemUnderCursor = GetItemUnderPoint(point);\n\n        if (!itemUnderCursor)\n        {\n            auto hoverState = state[\"hover\"];\n            if (hoverState) {\n                mSelectionDrawable->SetEnabled(true);\n                *hoverState = false;\n            }\n            else\n                mSelectionDrawable->SetEnabled(false);\n\n            mSelectedItem = itemUnderCursor;\n        }\n        else \n        {\n            mTargetSelectionRect = mSelectionLayout.Calculate(itemUnderCursor->GetLayoutData().worldRectangle);\n\n            auto hoverState = state[\"hover\"];\n            if (hoverState)\n            {\n                mSelectionDrawable->SetEnabled(true);\n                *hoverState = true;\n            }\n            else\n                mSelectionDrawable->SetEnabled(true);\n\n            if (itemUnderCursor != mSelectedItem) \n            {\n                mSelectedItem = itemUnderCursor;\n\n                if (mSelectedItem && mSelectedItem->GetSubMenu())\n                    mSelectSubContextTime = mOpenSubMenuDelay;\n            }\n        }\n    }\n\n    void ContextMenu::OnCursorPressed(const Input::Cursor& cursor)\n    {}\n\n    void ContextMenu::OnCursorStillDown(const Input::Cursor& cursor)\n    {}\n\n    void ContextMenu::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto itemUnderCursor = GetItemUnderPoint(cursor.position);\n\n        if (!itemUnderCursor)\n            return;\n\n        if (!itemUnderCursor->IsEnabled())\n            return;\n\n        if (itemUnderCursor)\n        {\n            itemUnderCursor->onClick();\n\n            if (itemUnderCursor->IsCheckable())\n            {\n                itemUnderCursor->SetChecked(!itemUnderCursor->IsChecked());\n                itemUnderCursor->onChecked(itemUnderCursor->IsChecked());\n            }\n        }\n\n        if (itemUnderCursor && itemUnderCursor->FindChildByType<ContextMenu>() == nullptr) {\n            HideWithParent();\n            HideWithChild();\n        }\n    }\n\n    void ContextMenu::OnCursorMoved(const Input::Cursor& cursor)\n    {\n        const float checkDeltaThreshold = 2.0f;\n        if ((cursor.position - mLastSelectCheckCursor).Length() < checkDeltaThreshold)\n            return;\n\n        mLastSelectCheckCursor = cursor.position;\n\n        UpdateHover(cursor.position);\n    }\n\n    void ContextMenu::HideWithParent()\n    {\n        PopupWidget::HideWithParent();\n        mSelectedItem = nullptr;\n    }\n\n    void ContextMenu::HideWithChild()\n    {\n        PopupWidget::HideWithChild();\n        mSelectedItem = nullptr;\n    }\n\n    const Vector<Ref<ContextMenu::Item>>& ContextMenu::GetItems() const\n    {\n        return mItems;\n    }\n\n    void ContextMenu::RemoveItem(int position)\n    {\n        if (position < 0 || position >= mItems.Count())\n            return;\n\n        mItems.RemoveAt(position);\n        ForceRebuildItems();\n    }\n\n    void ContextMenu::RemoveItem(const WString& path)\n    {\n        auto idx = FindItem(path);\n        if (idx < 0)\n            return;\n\n        RemoveItem(idx);\n    }\n\n    void ContextMenu::RemoveAllItems()\n    {\n        mItems.Clear();\n        ForceRebuildItems();\n    }\n\n    void ContextMenu::SetItemChecked(int position, bool checked)\n    {\n        if (position < 0 || position >= mItemsLayout->mChildren.Count())\n            return;\n\n        auto item = DynamicCast<ContextMenuItem>(mItemsLayout->mChildren[position]);\n        if (item && item->IsCheckable())\n            item->SetChecked(checked);\n    }\n\n    bool ContextMenu::IsItemChecked(int position) const\n    {\n        if (position < 0 || position >= mItemsLayout->mChildren.Count())\n            return false;\n\n        auto item = DynamicCast<ContextMenuItem>(mItemsLayout->mChildren[position]);\n        return item->IsChecked();\n    }\n\n    const Ref<VerticalLayout>& ContextMenu::GetItemsLayout() const\n    {\n        return mItemsLayout;\n    }\n\n    const Ref<ContextMenuItem>& ContextMenu::GetItemSample() const\n    {\n        return mItemSample;\n    }\n\n    const Ref<Widget>& ContextMenu::GetSeparatorSample() const\n    {\n        return mSeparatorSample;\n    }\n\n    const Ref<Sprite>& ContextMenu::GetSelectionDrawable() const\n    {\n        return mSelectionDrawable;\n    }\n\n    void ContextMenu::SetSelectionDrawableLayout(const Layout& layout)\n    {\n        mSelectionLayout = layout;\n    }\n\n    Layout ContextMenu::GetSelectionDrawableLayout() const\n    {\n        return mSelectionLayout;\n    }\n\n    void ContextMenu::SetMaxItemsVisible(int count)\n    {\n        mMaxVisibleItems = count;\n    }\n\n    void ContextMenu::SetItemsMaxPriority()\n    {\n        for (auto item : mItems)\n            item->SetMaxPriority();\n    }\n\n    void ContextMenu::SetItemsMinPriority()\n    {\n        for (auto item : mItems)\n            item->SetMinPriority();\n    }\n\n    String ContextMenu::GetCreateMenuGroup()\n    {\n        return \"Context\";\n    }\n\n    void ContextMenu::FitSizeAndPosition(const Vec2F& position)\n    {\n        Vec2F size;\n        float maxCaption = 0.0f;\n        float maxShortcut = 0.0f;\n\n        if (mSearchPanel)\n            mSearchPanel->enabled = mSearchEnabled;\n\n        int i = 0;\n        for (auto& child : mItemsLayout->GetChildWidgets()) \n        {\n            if (!child->IsEnabled())\n                continue;\n\n            if (auto childCaption = child->GetLayerDrawable<Text>(\"basic/caption\"))\n                maxCaption = Math::Max(childCaption->GetRealSize().x, maxCaption);\n\n            if (auto shortcutCaption = child->GetLayerDrawable<Text>(\"basic/shortcut\"))\n                maxShortcut = Math::Max(shortcutCaption->GetRealSize().x, maxShortcut);\n\n            size.y += child->layout->minHeight;\n\n            i++;\n            if (i == mMaxVisibleItems)\n                break;\n        }\n\n        size.x = mFitSizeMin + maxCaption + maxShortcut;\n\n        if (mSearchEnabled)\n            size.x = Math::Max(size.x, mSearchPanel->layout->GetMinWidth());\n\n        size.x += mViewAreaLayout.offsetMin.x - mViewAreaLayout.offsetMax.x;\n        size.y += mViewAreaLayout.offsetMin.y - mViewAreaLayout.offsetMax.y;\n\n        // Check if menu is out of screen to the right. Then put to the right of parent context\n        auto correctedPosition = position;\n        if (position.x + size.x > o2Render.GetResolution().x/2)\n        {\n            if (mParentPopup)\n                correctedPosition.x = mParentPopup.Lock()->layout->worldLeft - size.x;\n        }\n\n        FitPosition(correctedPosition, size);\n    }\n\n    void ContextMenu::SpecialDraw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        IDrawable::OnDrawn();\n        CursorAreaEventsListener::OnDrawn();\n\n        o2Render.EnableScissorTest(mAbsoluteClipArea);\n\n        for (auto& child : mChildWidgets)\n            child->Draw();\n\n        mSelectionDrawable->Draw();\n\n        o2Render.DisableScissorTest();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        if (mOwnHorScrollBar)\n            mHorScrollBar->Draw();\n\n        if (mOwnVerScrollBar)\n            mVerScrollBar->Draw();\n\n        DrawDebugFrame();\n\n        if (mChildPopup)\n            mChildPopup.Lock()->SpecialDraw();\n    }\n\n    void ContextMenu::RebuildItems()\n    {\n#if IS_EDITOR\n        PushEditorScopeOnStack scope(KeyboardEventsListener::mIsEditorMode ? 1 : 0);\n#endif\n\n        Vector<Ref<ContextMenuItem>> cache;\n\n        // Cache all items\n        for (auto item : mItems)\n        {\n            if (item->widget)\n                mItemsLayout->RemoveChild(item->widget.Lock());\n        }\n\n        // Cache extra items\n        auto children = mItemsLayout->GetChildren();\n        for (auto& child : children) \n        {\n            if (auto item = DynamicCast<ContextMenuItem>(child)) {\n                cache.Add(item);\n                mItemsLayout->RemoveChild(item);\n            }\n            else if (child->name == String(\"Separator\"))\n                mItemsLayout->RemoveChild(child);\n        }\n\n        // Update visible items with search text\n        Vector<Ref<Item>> viewItems;\n        if (mSearchText.IsEmpty()) \n        {\n            viewItems = mItems;\n        }\n        else\n        {\n            for (auto item : mItems) \n            {\n                if (item->subItems.IsEmpty())\n                {\n                    if (item->text.ToLowerCase().Contains(mSearchText))\n                        viewItems.Add(mmake<Item>(*item));\n                }\n                else\n                    item->RecursiveSearchSubItems(mSearchText, viewItems);\n            }\n        }\n\n        // Group items by group\n        Map<WString, Vector<Ref<Item>>> groups;\n        for (auto item : viewItems)\n            groups[item->group].Add(item);\n\n        // Add items to layout\n        bool isFirst = true;\n        for (auto& kv : groups) \n        {\n            if (!isFirst) {\n                auto newItem = mSeparatorSample->CloneAsRef<Widget>();\n                newItem->name = \"Separator\";\n                mItemsLayout->AddChild(newItem);\n            }\n\n            if (isFirst)\n                isFirst = false;\n\n            for (auto item : kv.second) \n            {\n                if (item->widget)\n                    mItemsLayout->AddChild(item->widget.Lock());\n                else {\n                    if (item->text == Item::separatorText) {\n                        auto newItem = mSeparatorSample->CloneAsRef<Widget>();\n                        newItem->name = \"Separator\";\n                        mItemsLayout->AddChild(newItem);\n                    }\n                    else {\n                        auto newItem = cache.IsEmpty() ? mItemSample->CloneAsRef<ContextMenuItem>() : cache.PopBack();\n                        newItem->Setup(item);\n                        mItemsLayout->AddChild(newItem);\n                    }\n                }\n            }\n        }\n\n        mItemsBuilt = true;\n    }\n\n    void ContextMenu::OnSearchChanged(const WString& text)\n    {\n        mSearchText = text.ToLowerCase();\n        ForceRebuildItems();\n    }\n\n    Ref<ContextMenu::Item> ContextMenu::GetItem(int idx) const\n    {\n        return mItems[idx];\n    }\n\n    ContextMenuItem::ContextMenuItem(RefCounter* refCounter) :\n        Widget(refCounter), mSubMenu(nullptr)\n    {\n        RetargetStatesAnimations();\n    }\n\n    ContextMenuItem::ContextMenuItem(RefCounter* refCounter, const ContextMenuItem& other) :\n        Widget(refCounter, other)\n    {\n        mSubMenu = FindChildByType<ContextMenu>();\n        if (mSubMenu)\n            mSubMenu->Hide(true);\n\n        RetargetStatesAnimations();\n    }\n\n    ContextMenuItem::~ContextMenuItem()\n    {}\n\n    void ContextMenuItem::Setup(const Ref<ContextMenu::Item>& item)\n    {\n        item->widget = Ref(this);\n\n        name = (WString)\"Context Item \" + item->text;\n\n        if (auto iconLayer = FindLayer(\"icon\")) {\n            if (item->icon) {\n                Vec2F size = item->icon->GetAtlasRect().Size();\n\n                if (size.x > size.y) {\n                    size.y *= size.x / layout->height;\n                    size.x = layout->height;\n                }\n                else {\n                    size.x *= size.y / layout->height;\n                    size.y = layout->height;\n                }\n\n                iconLayer->AddChildLayer(\"sprite\", mmake<Sprite>(item->icon),\n                                         Layout(Vec2F(), Vec2F(),\n                                                Vec2F(-Math::Floor(size.x * 0.5f), Math::Floor(size.y * 0.5f)),\n                                                Vec2F(Math::Floor(size.x * 0.5f), -Math::Floor(size.y * 0.5f))));\n\n                UpdateLayersDrawingSequence();\n            }\n        }\n\n        if (auto textLayer = GetLayerDrawable<Text>(\"basic/caption\"))\n            textLayer->text = item->text;\n\n        if (auto shortcutLayer = GetLayerDrawable<Text>(\"basic/shortcut\"))\n            shortcutLayer->text = item->GetShortcut().AsString();\n\n        if (auto subIconLayer = FindLayer(\"subIcon\"))\n            subIconLayer->transparency = item->subItems.Count() > 0 ? 1.0f : 0.0f;\n\n        if (auto checkLayer = GetLayerDrawable<Sprite>(\"check\"))\n            checkLayer->enabled = item->checked;\n\n        SetChecked(item->checked);\n        SetCheckable(item->checkable);\n\n        onClick = item->onClick;\n        onChecked = item->onChecked;\n\n        RemoveAllChildren();\n\n        if (item->subItems.Count() > 0) {\n            auto subMenu = o2UI.CreateWidget<ContextMenu>();\n            subMenu->RemoveAllItems();\n            subMenu->AddItems(item->subItems);\n\n            AddChild(subMenu);\n        }\n    }\n\n    void ContextMenuItem::SetText(const WString& text)\n    {\n        auto textLayer = GetLayerDrawable<Text>(\"basic/caption\");\n        if (textLayer)\n            textLayer->text = text;\n    }\n\n    WString ContextMenuItem::GetText() const\n    {\n        auto textLayer = GetLayerDrawable<Text>(\"basic/caption\");\n        if (textLayer)\n            return textLayer->text;\n\n        return \"\";\n    }\n\n    ContextMenuItem& ContextMenuItem::operator=(const ContextMenuItem& other)\n    {\n        Widget::operator=(other);\n\n        mSubMenu = FindChildByType<ContextMenu>();\n        if (mSubMenu)\n            mSubMenu->Hide(true);\n\n        return *this;\n    }\n\n    const Ref<ContextMenu>& ContextMenuItem::GetSubMenu() const\n    {\n        return mSubMenu;\n    }\n\n    void ContextMenuItem::SetChecked(bool checked)\n    {\n        if (auto checkLayer = GetLayerDrawable<Sprite>(\"check\"))\n            checkLayer->enabled = checked;\n\n        mChecked = checked;\n    }\n\n    bool ContextMenuItem::IsChecked() const\n    {\n        return mChecked;\n    }\n\n    void ContextMenuItem::SetCheckable(bool checkable)\n    {\n        mCheckable = checkable;\n    }\n\n    bool ContextMenuItem::IsCheckable() const\n    {\n        return mCheckable;\n    }\n\n    void ContextMenuItem::SetEnabled(bool enabled)\n    {\n        SetState(\"enabled\", enabled);\n    }\n\n    bool ContextMenuItem::IsEnabled() const\n    {\n        return GetState(\"enabled\");\n    }\n\n    void ContextMenuItem::Enable()\n    {\n        SetEnabled(true);\n    }\n\n    void ContextMenuItem::Disable()\n    {\n        SetEnabled(false);\n    }\n\n    String ContextMenuItem::GetCreateMenuGroup()\n    {\n        return \"Context\";\n    }\n\n    void ContextMenuItem::OnChildAdded(const Ref<Widget>& child)\n    {\n        if (child->GetType() == TypeOf(ContextMenu))\n            mSubMenu = DynamicCast<ContextMenu>(child);\n    }\n\n    void ContextMenu::ForceRebuildItems()\n    {\n        if (mResEnabledInHierarchy)\n        {\n            RebuildItems();\n            FitSizeAndPosition(layout->worldLeftTop);\n            SetLayoutDirty();\n        }\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::ContextMenu>);\n// --- META ---\n\nDECLARE_CLASS(o2::ContextMenu, o2__ContextMenu);\n\nDECLARE_CLASS(o2::ContextMenuItem, o2__ContextMenuItem);\n\nDECLARE_CLASS(o2::ContextMenu::Item, o2__ContextMenu__Item);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/ContextMenu.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Events/ShortcutKeysListener.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/PopupWidget.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n#include \"o2/Utils/System/ShortcutKeys.h\"\n\nnamespace o2\n{\n    class Sprite;\n    class Button;\n    class ContextMenu;\n    class ContextMenuItem;\n\n    FORWARD_CLASS_REF(VerticalLayout);\n\n    // -----------------------\n    // Context menu ui element\n    // -----------------------\n    class ContextMenu : public PopupWidget\n    {\n    public:\n        // ---------\n        // Menu item\n        // ---------\n        class Item : public RefCounterable, public ISerializable, public ShortcutKeysListener\n        {\n        public:\n            static WString separatorText;\n\n        public:\n            PROPERTIES(Item);\n            PROPERTY(ShortcutKeys, shortcut, SetShortcut, GetShortcut);\n\n        public:\n            WString              text;  // Item text @SERIALIZABLE\n            WString              group; // Item group id @SERIALIZABLE\n            AssetRef<ImageAsset> icon;  // Icon image @SERIALIZABLE\n\n            Vector<Ref<Item>> subItems; // Children items @SERIALIZABLE\n\n            bool checkable = false; // Is item checkable @SERIALIZABLE\n            bool checked = false;   // Is item checked @SERIALIZABLE\n\n        public:\n            Function<void()>     onClick;   // On click event    \n            Function<void(bool)> onChecked; // On checked event    \n\n            WeakRef<ContextMenuItem> widget; // Widget of this item\n\n        public:\n            // Default constructor\n            Item(RefCounter* refCounter);\n\n            // Copy constructor\n            Item(RefCounter* refCounter, const Item& other);\n\n            // Constructor from text\n            Item(RefCounter* refCounter, const WString& text, const Vector<Ref<Item>>& subItems, const WString& group = \"\",\n                 const AssetRef<ImageAsset>& icon = AssetRef<ImageAsset>());\n\n            // Constructor from text and click event\n            Item(RefCounter* refCounter, const WString& text, const Function<void()> onClick, const WString& group = \"\",\n                 const AssetRef<ImageAsset>& icon = AssetRef<ImageAsset>(), const ShortcutKeys& shortcut = ShortcutKeys());\n\n            // Constructor from text and checked event\n            Item(RefCounter* refCounter, const WString& text, bool checked, Function<void(bool)> onChecked = Function<void(bool)>(),\n                 const WString& group = \"\", const AssetRef<ImageAsset>& icon = AssetRef<ImageAsset>(),\n                 const ShortcutKeys& shortcut = ShortcutKeys());\n\n            // Destructor\n            ~Item();\n\n            // Copy-operator\n            bool operator==(const Item& other) const;\n\n            // Sets shortcut\n            void SetShortcut(const ShortcutKeys& shortcut);\n\n            // Returns shortcut\n            const ShortcutKeys& GetShortcut() const;\n\n            // Sets maximum priority\n            void SetMaxPriority();\n\n            // Sets minimum priority\n            void SetMinPriority();\n\n            // Recursive search sub items by text\n            void RecursiveSearchSubItems(const WString& text, Vector<Ref<Item>>& result);\n\n            // Returns new separator item\n            static Ref<Item> Separator();\n\n            SERIALIZABLE(Item);\n\n        private:\n            ShortcutKeys mShortcut; // Keys shortcut @SERIALIZABLE\n\n        private:\n            // This event calling when shortcut hit and this listener has max priority\n            void OnShortcutPressed() override;\n\n            REF_COUNTERABLE_IMPL(RefCounterable);\n        };\n\n    public:\n        // Default constructor\n        explicit ContextMenu(RefCounter* refCounter);\n\n        // Constructor from items\n        ContextMenu(RefCounter* refCounter, const Vector<Ref<Item>>& items);\n\n        // Copy-constructor\n        ContextMenu(RefCounter* refCounter, const ContextMenu& other);\n\n        // Destructor\n        ~ContextMenu();\n\n        // Copy operator\n        ContextMenu& operator=(const ContextMenu& other);\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Show from parent context\n        void Show(const Ref<PopupWidget>& parent, const Vec2F& position = o2Input.GetCursorPos()) override;\n\n        // Shows context\n        void Show(const Vec2F& position = o2Input.GetCursorPos());\n\n        // Enables or disables search panel\n        void SetSearchEnabled(bool enabled);\n\n        // Returns is search enabled\n        bool IsSearchEnabled() const;\n\n        // Add item\n        void AddItem(const Ref<Item>& item);\n\n        // Adds item by path (\"node/sub node/target\")\n        Ref<Item> AddItem(const WString& path, const Function<void()>& clickFunc = Function<void()>(),\n                          const AssetRef<ImageAsset>& icon = AssetRef<ImageAsset>(), const ShortcutKeys& shortcut = ShortcutKeys());\n\n        // Adds item by path (\"node/sub node/target\")\n        Ref<Item> AddToggleItem(const WString& path, bool value,\n                                const Function<void(bool)>& clickFunc = Function<void(bool)>(),\n                                const AssetRef<ImageAsset>& icon = AssetRef<ImageAsset>(),\n                                const ShortcutKeys& shortcut = ShortcutKeys());\n\n        // Inserts item at position\n        void InsertItem(const Ref<Item>& item, int position);\n\n        // Adds array of items\n        void AddItems(const Vector<Ref<Item>>& items);\n\n        // Inserts array of items at position\n        void InsertItems(const Vector<Ref<Item>>& items, int position);\n\n        // Returns item's widget at position\n        Ref<ContextMenuItem> GetItemWidget(int position);\n\n        // Returns index of item by path\n        int FindItem(const WString& text) const;\n\n        // Returns item's widget by path\n        Ref<ContextMenuItem> FindItemWidget(const WString& path) const;\n\n        // Sets item at position\n        void SetItem(int position, const Ref<Item>& item);\n\n        // Returns array of all items\n        const Vector<Ref<Item>>& GetItems() const;\n\n        // Removes item at position\n        void RemoveItem(int position);\n\n        // Removes item by path\n        void RemoveItem(const WString& path);\n\n        // Removes all items\n        void RemoveAllItems();\n\n        // Sets item at position checked (if it checkable)\n        void SetItemChecked(int position, bool checked);\n\n        // Returns is item checked\n        bool IsItemChecked(int position) const;\n\n        // Returns items vertical layout\n        const Ref<VerticalLayout>& GetItemsLayout() const;\n\n        // Returns item sample\n        const Ref<ContextMenuItem>& GetItemSample() const;\n\n        // Returns items separator sample\n        const Ref<Widget>& GetSeparatorSample() const;\n\n        // Returns selection drawable\n        const Ref<Sprite>& GetSelectionDrawable() const;\n\n        // Sets selection drawable layout\n        void SetSelectionDrawableLayout(const Layout& layout);\n\n        // Returns selection drawable layout\n        Layout GetSelectionDrawableLayout() const;\n\n        // Sets maximum visible items count\n        void SetMaxItemsVisible(int count);\n\n        // Sets context menu items shortcut maximum priority\n        void SetItemsMaxPriority();\n\n        // Sets context menu items shortcut minimum priority\n        void SetItemsMinPriority();\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(ContextMenu);\n        CLONEABLE_REF(ContextMenu);\n\n    protected:\n        const float mOpenSubMenuDelay = 0.4f; // Sub menu opening delay when cursor hover it\n\n        int mMaxVisibleItems = 100; // Maximum visible items @SERIALIZABLE\n\n        bool         mSearchEnabled = false; // Is search enabled\n        Ref<Widget>  mSearchPanel;           // Widget with search edit box and icon\n        Ref<EditBox> mSearchEditBox;         // Search input text box\n        String       mSearchText;            // Search text used to filter items\n\n        Vector<Ref<Item>>   mItems;              // Items list\n        Ref<VerticalLayout> mItemsLayout;        // Items layout; builds when opening context\n        bool                mItemsBuilt = false; // Is items layout is actual and built\n\n        Ref<ContextMenuItem> mItemSample;      // Item sample @SERIALIZABLE\n        Ref<Widget>          mSeparatorSample; // Items separator sample @SERIALIZABLE\n\n        Ref<Sprite> mSelectionDrawable; // Selection sprite @SERIALIZABLE\n        Layout      mSelectionLayout;   // Selection layout, result selection area depends on selected item @SERIALIZABLE\n\n        RectF mCurrentSelectionRect;  // Current selection rectangle (for smoothing)\n        RectF mTargetSelectionRect;   // Target selection rectangle (over selected item)\n        Vec2F mLastSelectCheckCursor; // Last cursor position on selection check\n\n        Ref<ContextMenuItem> mSelectedItem;                 // Index of selected item\n        float                mSelectSubContextTime = -1.0f; // Time to appearing selected sub context\n\n    protected:\n        // Fits size by items\n        void FitSizeAndPosition(const Vec2F& position) override;\n\n        // Hides context with his parent\n        void HideWithParent() override;\n\n        // Hides context with his child\n        void HideWithChild() override;\n\n        // Special drawing for contexts\n        void SpecialDraw() override;\n\n        // Build items layout\n        void RebuildItems();\n\n        // Force rebuild items - clears cache and rebuilds items if enabled\n        void ForceRebuildItems();\n\n        // Called when search edit box has changed, updates items list\n        void OnSearchChanged(const WString& text);\n\n        // Creates context items by path (\"node/sub node/target\")\n        Vector<Ref<Item>>& CreateItemsByPath(WString& path);\n\n        // Returns item info\n        Ref<Item> GetItem(int idx) const;\n\n        // Returns item widget under point and stores index in idxPtr, if not null\n        Ref<ContextMenuItem> GetItemUnderPoint(const Vec2F& point);\n\n        // Updates hover\n        void UpdateHover(const Vec2F& point);\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n\n        friend class UIManager;\n        friend class MenuPanel;\n    };\n\n    // -----------------\n    // Context menu item\n    // -----------------\n    class ContextMenuItem : public Widget\n    {\n    public:\n        PROPERTIES(ContextMenuItem);\n        PROPERTY(WString, text, SetText, GetText); // Text\n\n    public:\n        Function<void()>     onClick;   // Click function\n        Function<void(bool)> onChecked; // Checked function, calls when check was changed and item is checkable\n\n    public:\n        // Default constructor\n        explicit ContextMenuItem(RefCounter* refCounter);\n\n        // Copy-constructor\n        ContextMenuItem(RefCounter* refCounter, const ContextMenuItem& other);\n\n        // Destructor\n        ~ContextMenuItem();\n\n        // Copy-operator\n        ContextMenuItem& operator=(const ContextMenuItem& other);\n\n        // Sets item\n        void Setup(const Ref<ContextMenu::Item>& item);\n\n        // Sets text\n        void SetText(const WString& text);\n\n        // Returns text\n        WString GetText() const;\n\n        // Returns sub context menu\n        const Ref<ContextMenu>& GetSubMenu() const;\n\n        // Sets checked icon\n        void SetChecked(bool checked);\n\n        // Returns is menu checked\n        bool IsChecked() const;\n\n        // Sets item checkable\n        void SetCheckable(bool checkable);\n\n        // Returns is menu item can be checked\n        bool IsCheckable() const;\n\n        // Sets item enabled\n        void SetEnabled(bool enabled) override;\n\n        // Returns is item enabled\n        bool IsEnabled() const OPTIONAL_OVERRIDE;\n\n        // Enables item\n        void Enable();\n\n        // DIsables item\n        void Disable();\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(ContextMenuItem);\n        CLONEABLE_REF(ContextMenuItem);\n\n    protected:\n        Ref<ContextMenu> mSubMenu; // Context sub menu\n\n        bool mChecked = false;   // Is menu item checked\n        bool mCheckable = false; // Is menu item can be checked\n\n    protected:\n        // Called when child widget was added\n        void OnChildAdded(const Ref<Widget>& child) override;\n\n        friend class ContextMenu;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ContextMenu)\n{\n    BASE_CLASS(o2::PopupWidget);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ContextMenu)\n{\n    FIELD().PROTECTED().DEFAULT_VALUE(0.4f).NAME(mOpenSubMenuDelay);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(100).NAME(mMaxVisibleItems);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mSearchEnabled);\n    FIELD().PROTECTED().NAME(mSearchPanel);\n    FIELD().PROTECTED().NAME(mSearchEditBox);\n    FIELD().PROTECTED().NAME(mSearchText);\n    FIELD().PROTECTED().NAME(mItems);\n    FIELD().PROTECTED().NAME(mItemsLayout);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mItemsBuilt);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mItemSample);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSeparatorSample);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectionDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectionLayout);\n    FIELD().PROTECTED().NAME(mCurrentSelectionRect);\n    FIELD().PROTECTED().NAME(mTargetSelectionRect);\n    FIELD().PROTECTED().NAME(mLastSelectCheckCursor);\n    FIELD().PROTECTED().NAME(mSelectedItem);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1.0f).NAME(mSelectSubContextTime);\n}\nEND_META;\nCLASS_METHODS_META(o2::ContextMenu)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Vector<Ref<Item>>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ContextMenu&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Show, const Ref<PopupWidget>&, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Show, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSearchEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSearchEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddItem, const Ref<Item>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Item>, AddItem, const WString&, const Function<void()>&, const AssetRef<ImageAsset>&, const ShortcutKeys&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Item>, AddToggleItem, const WString&, bool, const Function<void(bool)>&, const AssetRef<ImageAsset>&, const ShortcutKeys&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertItem, const Ref<Item>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddItems, const Vector<Ref<Item>>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertItems, const Vector<Ref<Item>>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<ContextMenuItem>, GetItemWidget, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<ContextMenuItem>, FindItemWidget, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItem, int, const Ref<Item>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Ref<Item>>&, GetItems);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllItems);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItemChecked, int, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsItemChecked, int);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<VerticalLayout>&, GetItemsLayout);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ContextMenuItem>&, GetItemSample);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Widget>&, GetSeparatorSample);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetSelectionDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionDrawableLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetSelectionDrawableLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxItemsVisible, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItemsMaxPriority);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItemsMinPriority);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, FitSizeAndPosition, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, HideWithParent);\n    FUNCTION().PROTECTED().SIGNATURE(void, HideWithChild);\n    FUNCTION().PROTECTED().SIGNATURE(void, SpecialDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, RebuildItems);\n    FUNCTION().PROTECTED().SIGNATURE(void, ForceRebuildItems);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSearchChanged, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Ref<Item>>&, CreateItemsByPath, WString&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Item>, GetItem, int);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<ContextMenuItem>, GetItemUnderPoint, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHover, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ContextMenuItem)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ContextMenuItem)\n{\n    FIELD().PUBLIC().NAME(text);\n    FIELD().PUBLIC().NAME(onClick);\n    FIELD().PUBLIC().NAME(onChecked);\n    FIELD().PROTECTED().NAME(mSubMenu);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mChecked);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mCheckable);\n}\nEND_META;\nCLASS_METHODS_META(o2::ContextMenuItem)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ContextMenuItem&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Setup, const Ref<ContextMenu::Item>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetText, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetText);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ContextMenu>&, GetSubMenu);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetChecked, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsChecked);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCheckable, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsCheckable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, Enable);\n    FUNCTION().PUBLIC().SIGNATURE(void, Disable);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildAdded, const Ref<Widget>&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ContextMenu::Item)\n{\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::ShortcutKeysListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ContextMenu::Item)\n{\n    FIELD().PUBLIC().NAME(shortcut);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(text);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(group);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(icon);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(subItems);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(checkable);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(checked);\n    FIELD().PUBLIC().NAME(onClick);\n    FIELD().PUBLIC().NAME(onChecked);\n    FIELD().PUBLIC().NAME(widget);\n    FIELD().PRIVATE().SERIALIZABLE_ATTRIBUTE().NAME(mShortcut);\n}\nEND_META;\nCLASS_METHODS_META(o2::ContextMenu::Item)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Item&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const WString&, const Vector<Ref<Item>>&, const WString&, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const WString&, const Function<void()>, const WString&, const AssetRef<ImageAsset>&, const ShortcutKeys&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const WString&, bool, Function<void(bool)>, const WString&, const AssetRef<ImageAsset>&, const ShortcutKeys&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetShortcut, const ShortcutKeys&);\n    FUNCTION().PUBLIC().SIGNATURE(const ShortcutKeys&, GetShortcut);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxPriority);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMinPriority);\n    FUNCTION().PUBLIC().SIGNATURE(void, RecursiveSearchSubItems, const WString&, Vector<Ref<Item>>&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<Item>, Separator);\n    FUNCTION().PRIVATE().SIGNATURE(void, OnShortcutPressed);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/CustomDropDown.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"CustomDropDown.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/Widgets/CustomList.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n\nnamespace o2\n{\n    CustomDropDown::CustomDropDown(RefCounter* refCounter):\n        Widget(refCounter), DrawableCursorEventsListener(this)\n    {\n        mItemsList = mmake<CustomList>();\n        mItemsList->SetInternalParent(Ref(this), false);\n        mItemsList->onSelectedItem += [&](auto x) { OnItemSelected(); };\n        mItemsList->SetMultiselectionAvailable(false);\n    }\n\n    CustomDropDown::CustomDropDown(RefCounter* refCounter, const CustomDropDown& other):\n        Widget(refCounter, other), DrawableCursorEventsListener(this), mClipLayout(other.mClipLayout),\n        mMaxListItems(other.mMaxListItems)\n    {\n        mItemsList = FindInternalWidgetByType<CustomList>();\n        mItemsList->onSelectedItem += [&](auto x) { OnItemSelected(); };\n        mItemsList->Hide(true);\n        mItemsList->SetMultiselectionAvailable(false);\n\n        RetargetStatesAnimations();\n    }\n\n    CustomDropDown::~CustomDropDown()\n    {}\n\n    CustomDropDown& CustomDropDown::operator=(const CustomDropDown& other)\n    {\n        Widget::operator=(other);\n\n        mItemsList = FindInternalWidgetByType<CustomList>();\n        mItemsList->onSelectedItem += [&](auto x) { OnItemSelected(); };\n        mItemsList->Hide(true);\n        mItemsList->SetMultiselectionAvailable(false);\n\n        mClipLayout = other.mClipLayout;\n        mMaxListItems = other.mMaxListItems;\n\n        RetargetStatesAnimations();\n\n        return *this;\n    }\n\n    void CustomDropDown::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy)\n            return;\n\n        Widget::Draw();\n\n        o2UI.DrawWidgetAtTop(mItemsList);\n\n        auto selectedItem = mItemsList->GetItem(mItemsList->GetSelectedItemPos());\n        if (selectedItem)\n        {\n            o2Render.EnableScissorTest(mAbsoluteClip);\n            selectedItem->ForceDraw(mAbsoluteClip, mResTransparency);\n            o2Render.DisableScissorTest();\n        }\n\n        DrawDebugFrame();\n    }\n\n    void CustomDropDown::Expand()\n    {\n        onBeforeExpand();\n\n        float itemHeight = mItemsList->GetItemSample()->layout->minHeight;\n        int itemsVisible = Math::Min(mMaxListItems, mItemsList->GetItemsCount());\n\n        mItemsList->layout->minHeight = itemHeight*(float)itemsVisible +\n            mItemsList->mViewAreaLayout.offsetMin.y - mItemsList->mViewAreaLayout.offsetMax.y;\n\n        auto openedState = state[\"opened\"];\n        if (openedState)\n            *openedState = true;\n\n        mItemsList->SetEnabled(true);\n        mItemsList->UpdateSelfTransform();\n        mItemsList->UpdateChildrenTransforms();\n\n        SetLayoutDirty();\n    }\n\n    void CustomDropDown::Collapse()\n    {\n        auto openedState = state[\"opened\"];\n        if (openedState)\n            *openedState = false;\n\n        mItemsList->SetEnabled(false);\n    }\n\n    bool CustomDropDown::IsExpanded() const\n    {\n        return mItemsList->IsEnabled();\n    }\n\n    void CustomDropDown::SetItemSample(const Ref<Widget>& sample)\n    {\n        mItemsList->SetItemSample(sample);\n    }\n\n    const Ref<Widget>& CustomDropDown::GetItemSample() const\n    {\n        return mItemsList->GetItemSample();\n    }\n\n    const Ref<VerticalLayout>& CustomDropDown::GetItemsLayout() const\n    {\n        return mItemsList->GetItemsLayout();\n    }\n\n    Ref<Widget> CustomDropDown::AddItem()\n    {\n        return mItemsList->AddItem();\n    }\n\n    Ref<Widget> CustomDropDown::AddItem(int position)\n    {\n        return mItemsList->AddItem(position);\n    }\n\n    void CustomDropDown::RemoveItem(const Ref<Widget>& item)\n    {\n        mItemsList->RemoveItem(item);\n    }\n\n    void CustomDropDown::RemoveItem(int position)\n    {\n        mItemsList->RemoveItem(position);\n    }\n\n    void CustomDropDown::MoveItem(int position, int newPosition)\n    {\n        mItemsList->MoveItem(position, newPosition);\n    }\n\n    void CustomDropDown::MoveItem(const Ref<Widget>& item, int newPosition)\n    {\n        mItemsList->MoveItem(item, newPosition);\n    }\n\n    int CustomDropDown::GetItemPosition(const Ref<Widget>& item)\n    {\n        return mItemsList->GetItemPosition(item);\n    }\n\n    Ref<Widget> CustomDropDown::GetItem(int position) const\n    {\n        return mItemsList->GetItem(position);\n    }\n\n    void CustomDropDown::RemoveAllItems()\n    {\n        mItemsList->RemoveAllItems();\n    }\n\n    void CustomDropDown::SortItems(const Function<bool(const Ref<Widget>&, const Ref<Widget>&)>& sortFunc)\n    {\n        mItemsList->SortItems(sortFunc);\n    }\n\n    int CustomDropDown::GetItemsCount() const\n    {\n        return mItemsList->GetItemsCount();\n    }\n\n    void CustomDropDown::SelectItem(const Ref<Widget>& item)\n    {\n        mItemsList->SelectItem(item);\n    }\n\n    void CustomDropDown::SelectItemAt(int position)\n    {\n        mItemsList->SelectItemAt(position);\n    }\n\n    Ref<Widget> CustomDropDown::GetSelectedItem() const\n    {\n        return mItemsList->GetSelectedItem();\n    }\n\n    int CustomDropDown::GetSelectedItemPosition() const\n    {\n        return mItemsList->GetSelectedItemPos();\n    }\n\n    const Ref<CustomList>& CustomDropDown::GetListView() const\n    {\n        return mItemsList;\n    }\n\n    void CustomDropDown::SetMaxListSizeInItems(int itemsCount)\n    {\n        mMaxListItems = itemsCount;\n    }\n\n    void CustomDropDown::SetClippingLayout(const Layout& layout)\n    {\n        mClipLayout = layout;\n        SetLayoutDirty();\n    }\n\n    Layout CustomDropDown::GetClippingLayout()\n    {\n        return mClipLayout;\n    }\n\n    void CustomDropDown::MoveAndCheckClipping(const Vec2F& delta, const RectF& clipArea)\n    {\n        mBoundsWithChilds += delta;\n        mIsClipped = !mBoundsWithChilds.IsIntersects(clipArea);\n\n        if (!mIsClipped)\n            UpdateSelfTransform();\n\n        for (auto& child : mChildWidgets)\n            child->MoveAndCheckClipping(delta, clipArea);\n\n        if (IsExpanded())\n            Collapse();\n    }\n\n    void CustomDropDown::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = true;\n    }\n\n    void CustomDropDown::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        if (Widget::IsUnderPoint(cursor.position))\n        {\n            if (!IsExpanded())\n                Expand();\n        }\n    }\n\n    void CustomDropDown::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n        if (!mItemsList->layout->IsPointInside(o2Input.GetCursorPos()) && IsExpanded())\n            Collapse();\n    }\n\n    void CustomDropDown::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n    }\n\n    void CustomDropDown::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = true;\n    }\n\n    void CustomDropDown::OnCursorExit(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = false;\n    }\n\n    void CustomDropDown::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        interactable = true;\n    }\n\n    void CustomDropDown::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        interactable = false;\n    }\n\n    void CustomDropDown::UpdateSelfTransform()\n{\n        layout->Update();\n        mAbsoluteClip = mClipLayout.Calculate(GetLayoutData().worldRectangle);\n    }\n\n    String CustomDropDown::GetCreateMenuGroup()\n    {\n        return \"Dropping\";\n    }\n\n    void CustomDropDown::OnItemSelected()\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        Collapse();\n        onSelectedPos(mItemsList->GetSelectedItemPos());\n        onSelectedItem(mItemsList->GetSelectedItem());\n\n        OnSelectionChanged();\n    }\n\n    void CustomDropDown::OnSelectionChanged()\n    {}\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::CustomDropDown>);\n// --- META ---\n\nDECLARE_CLASS(o2::CustomDropDown, o2__CustomDropDown);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/CustomDropDown.h",
    "content": "#pragma once\n\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Scene/UI/Widgets/CustomList.h\"\n\nnamespace o2\n{\n    // ---------------------------------\n    // Custom items drop down ui element\n    // ---------------------------------\n    class CustomDropDown: public Widget, public DrawableCursorEventsListener\n    {\n    public:\n        PROPERTIES(CustomDropDown);\n        PROPERTY(Ref<Widget>, selectedItem, SelectItem, GetSelectedItem);      // Selected item widget property\n        PROPERTY(int, selectedItemPos, SelectItemAt, GetSelectedItemPosition); // Selected item position property\n        GETTER(int, itemsCount, GetItemsCount);                                // All items count getter\n\n    public:\n        Function<void()> onBeforeExpand; // Called before opening \n\n        Function<void(int)>                onSelectedPos;   // Select item position event\n        Function<void(const Ref<Widget>&)> onSelectedItem;  // Select item event\n\n    public:\n        // Default constructor\n        explicit CustomDropDown(RefCounter* refCounter);\n\n        // Copy-constructor\n        CustomDropDown(RefCounter* refCounter, const CustomDropDown& other);\n\n        // Destructor\n        ~CustomDropDown();\n\n        // Copy operator\n        CustomDropDown& operator=(const CustomDropDown& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Expand list\n        void Expand();\n\n        // Collapse list\n        void Collapse();\n\n        // Returns is list expanded\n        bool IsExpanded() const;\n\n        // Sets item sample widget. WARNING: Removing all old items!\n        void SetItemSample(const Ref<Widget>& sample);\n\n        // Returns item sample widget\n        const Ref<Widget>& GetItemSample() const;\n\n        // Returns layout of items\n        const Ref<VerticalLayout>& GetItemsLayout() const;\n\n        // Adds new item and returns it\n        Ref<Widget> AddItem();\n\n        // Adds new item at position and returns it\n        Ref<Widget> AddItem(int position);\n\n        // Removes item\n        void RemoveItem(const Ref<Widget>& item);\n\n        // Removes item in position\n        void RemoveItem(int position);\n\n        // Moves item from position to new position\n        void MoveItem(int position, int newPosition);\n\n        // Moves item to new position\n        void MoveItem(const Ref<Widget>& item, int newPosition);\n\n        // Returns item position\n        int GetItemPosition(const Ref<Widget>& item);\n\n        // Returns item by position\n        Ref<Widget> GetItem(int position) const;\n\n        // Removes all items\n        void RemoveAllItems();\n\n        // Sorts items\n        void SortItems(const Function<bool(const Ref<Widget>&, const Ref<Widget>&)>& sortFunc);\n\n        // Returns items count\n        int GetItemsCount() const;\n\n        // Selects item\n        void SelectItem(const Ref<Widget>& item);\n\n        // Selects item at position\n        void SelectItemAt(int position);\n\n        // Returns selected item\n        Ref<Widget> GetSelectedItem() const;\n\n        // Returns selected item position\n        int GetSelectedItemPosition() const;\n\n        // Returns list view \n        const Ref<CustomList>& GetListView() const;\n\n        // Sets list view size by items size\n        void SetMaxListSizeInItems(int itemsCount);\n\n        // Sets clipping layout\n        void SetClippingLayout(const Layout& layout);\n\n        // Returns clipping layout\n        Layout GetClippingLayout();\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(CustomDropDown);\n        CLONEABLE_REF(CustomDropDown);\n\n    protected:\n        Ref<CustomList> mItemsList; // List view\n\n        Layout mClipLayout = Layout::BothStretch(); // Clipping layout @SERIALIZABLE\n        RectF  mAbsoluteClip;                       // Absolute clipping rectangle\n\n        int mMaxListItems = 10; // Maximum visible items in list @SERIALIZABLE\n\n    protected:\n        // Moves widget's to delta and checks for clipping\n        void MoveAndCheckClipping(const Vec2F& delta, const RectF& clipArea) override;\n\n        // Called when cursor pressed on this. Sets state \"pressed\" to true\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time). Sets state \"pressed\" to false.\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor released outside this(only when cursor pressed this at previous time)\n        void OnCursorReleasedOutside(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object. Sets state \"select\" to true\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object. Sets state \"select\" to false\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Called when item was selected in list\n        void OnItemSelected();\n\n        // Called when selection was changed\n        virtual void OnSelectionChanged();\n\n        REF_COUNTERABLE_IMPL(Widget);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::CustomDropDown)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::DrawableCursorEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::CustomDropDown)\n{\n    FIELD().PUBLIC().NAME(selectedItem);\n    FIELD().PUBLIC().NAME(selectedItemPos);\n    FIELD().PUBLIC().NAME(itemsCount);\n    FIELD().PUBLIC().NAME(onBeforeExpand);\n    FIELD().PUBLIC().NAME(onSelectedPos);\n    FIELD().PUBLIC().NAME(onSelectedItem);\n    FIELD().PROTECTED().NAME(mItemsList);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Layout::BothStretch()).NAME(mClipLayout);\n    FIELD().PROTECTED().NAME(mAbsoluteClip);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(10).NAME(mMaxListItems);\n}\nEND_META;\nCLASS_METHODS_META(o2::CustomDropDown)\n{\n\n    typedef const Function<bool(const Ref<Widget>&, const Ref<Widget>&)>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const CustomDropDown&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItemSample, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Widget>&, GetItemSample);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<VerticalLayout>&, GetItemsLayout);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, AddItem);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, AddItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveItem, int, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveItem, const Ref<Widget>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetItemPosition, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllItems);\n    FUNCTION().PUBLIC().SIGNATURE(void, SortItems, _tmp1);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetItemsCount);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectItem, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectItemAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetSelectedItem);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetSelectedItemPosition);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<CustomList>&, GetListView);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxListSizeInItems, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetClippingLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetClippingLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveAndCheckClipping, const Vec2F&, const RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleasedOutside, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnItemSelected);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectionChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/CustomList.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"CustomList.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n\tCustomList::CustomList(RefCounter* refCounter) :\n\t\tScrollArea(refCounter)\n\t{\n\t\tmItemSample = mmake<Widget>();\n\t\tmItemSample->RemoveFromScene();\n\n\t\tmSelectionDrawable = mmake<Sprite>();\n\t\tmHoverDrawable = mmake<Sprite>();\n\n\t\tmVerLayout = mmake<VerticalLayout>();\n\t\tmVerLayout->baseCorner = BaseCorner::LeftTop;\n\t\tmVerLayout->name = \"layout\";\n\t\tmVerLayout->expandHeight = false;\n\t\tmVerLayout->expandWidth = true;\n\t\tmVerLayout->layout->anchorMin = Vec2F(0, 0);\n\t\tmVerLayout->layout->anchorMax = Vec2F(1, 1);\n\t\tmVerLayout->layout->offsetMin = Vec2F();\n\t\tmVerLayout->layout->offsetMax = Vec2F();\n\t\tmVerLayout->fitByChildren = true;\n\n\t\tAddChild(mVerLayout);\n\t}\n\n\tCustomList::CustomList(RefCounter* refCounter, const CustomList& other) :\n\t\tScrollArea(refCounter, other), mHoverLayout(other.mHoverLayout),\n\t\tmSelectionLayout(other.mSelectionLayout)\n\t{\n\t\tmVerLayout = FindChildByType<VerticalLayout>();\n\n\t\tmItemSample = other.mItemSample->CloneAsRef<Widget>();\n\t\tmItemSample->RemoveFromScene();\n\t\tmItemSample->UpdateSelfTransform();\n\t\tmItemSample->UpdateChildrenTransforms();\n\n\t\tmSelectionDrawable = other.mSelectionDrawable->CloneAsRef<Sprite>();\n\t\tmHoverDrawable = other.mHoverDrawable->CloneAsRef<Sprite>();\n\n\t\tRetargetStatesAnimations();\n\t\tSetLayoutDirty();\n\t}\n\n\tCustomList::~CustomList()\n\t{\n\t}\n\n\tCustomList& CustomList::operator=(const CustomList& other)\n\t{\n\t\tmVerLayout = nullptr;\n\n\t\tmSelectionDrawable = other.mSelectionDrawable->CloneAsRef<Sprite>();\n\t\tmHoverDrawable = other.mHoverDrawable->CloneAsRef<Sprite>();\n\n\t\tmSelectionLayout = other.mSelectionLayout;\n\t\tmHoverLayout = other.mHoverLayout;\n\n\t\tScrollArea::operator=(other);\n\n\t\tmVerLayout = FindChildByType<VerticalLayout>();\n\t\tmItemSample = other.mItemSample->CloneAsRef<Widget>();\n\t\tmItemSample->RemoveFromScene();\n\t\tmItemSample->SetLayoutDirty();\n\n\t\tRetargetStatesAnimations();\n\t\tSetLayoutDirty();\n\n\t\treturn *this;\n\t}\n\n\tvoid CustomList::Update(float dt)\n\t{\n\t\tPROFILE_SAMPLE_FUNC();\n\n\t\tScrollArea::Update(dt);\n\n\t\tif (!mResEnabledInHierarchy || mIsClipped)\n\t\t\treturn;\n\n\t\tconst float rectLerpCoef = 20.0f;\n\n\t\tif (mCurrentHoverRect != mTargetHoverRect)\n\t\t{\n\t\t\tmCurrentHoverRect = Math::Lerp(mCurrentHoverRect, mTargetHoverRect, dt * rectLerpCoef);\n\t\t\tmHoverDrawable->SetRect(mCurrentHoverRect);\n\t\t}\n\t}\n\n\tvoid CustomList::Draw()\n\t{\n\t\tPROFILE_SAMPLE_FUNC();\n\n\t\tif (!mResEnabledInHierarchy || mIsClipped)\n\t\t\treturn;\n\n\t\tfor (auto& layer : mDrawingLayers)\n\t\t\tlayer->Draw();\n\n\t\tIDrawable::OnDrawn();\n\n\t\to2Render.EnableScissorTest(mAbsoluteClipArea);\n\n\t\tfor (auto& child : mChildrenInheritedDepth)\n\t\t\tchild->Draw();\n\n\t\tfor (auto& sel : mSelectedItems)\n\t\t\tsel.selection->Draw();\n\n\t\tmHoverDrawable->Draw();\n\n\t\to2Render.DisableScissorTest();\n\n\t\tCursorAreaEventsListener::OnDrawn();\n\n\t\tfor (auto& layer : mTopDrawingLayers)\n\t\t\tlayer->Draw();\n\n\t\tif (mOwnHorScrollBar)\n\t\t\tmHorScrollBar->Draw();\n\n\t\tif (mOwnVerScrollBar)\n\t\t\tmVerScrollBar->Draw();\n\n\t\tDrawDebugFrame();\n\t}\n\n\tvoid CustomList::SetItemSample(const Ref<Widget>& sample)\n\t{\n\t\tRemoveAllItems();\n\n\t\tmItemSample = sample;\n\n\t\tSetLayoutDirty();\n\t}\n\n\tconst Ref<Widget>& CustomList::GetItemSample() const\n\t{\n\t\treturn mItemSample;\n\t}\n\n\tconst Ref<VerticalLayout>& CustomList::GetItemsLayout() const\n\t{\n\t\treturn mVerLayout;\n\t}\n\n\tRef<Widget> CustomList::AddItem()\n\t{\n\t\treturn mVerLayout->AddChildWidget(mItemSample->CloneAsRef<Widget>());\n\t}\n\n\tRef<Widget> CustomList::AddItem(int position)\n\t{\n\t\tposition = Math::Max(0, position);\n\n\t\tfor (int i = mVerLayout->GetChildren().Count(); i < position; i++)\n\t\t\tAddItem();\n\n\t\treturn mVerLayout->AddChildWidget(mItemSample->CloneAsRef<Widget>(), position);\n\t}\n\n\tvoid CustomList::RemoveItem(const Ref<Widget>& item)\n\t{\n\t\tmVerLayout->RemoveChild(item);\n\t}\n\n\tvoid CustomList::RemoveItem(int position)\n\t{\n\t\tif (position < 0 || position >= mVerLayout->GetChildren().Count())\n\t\t{\n\t\t\to2Debug.LogWarning(\"Failed to remove item at %i: out of range (%i)\", position, mVerLayout->GetChildren().Count());\n\t\t\treturn;\n\t\t}\n\n\t\tauto item = mVerLayout->GetChildWidgets().Get(position);\n\t\tmVerLayout->RemoveChild(item);\n\t}\n\n\tvoid CustomList::MoveItem(int position, int newPosition)\n\t{\n\t\tif (position < 0 || position >= mVerLayout->GetChildren().Count())\n\t\t{\n\t\t\to2Debug.LogWarning(\"Failed to move item from %i to %i: out of range (%i)\", position, newPosition,\n\t\t\t\t\t\t\t   mVerLayout->GetChildren().Count());\n\t\t\treturn;\n\t\t}\n\n\t\tauto item = mVerLayout->GetChildWidgets().Get(position);\n\t\tmVerLayout->RemoveChild(item);\n\t\tmVerLayout->AddChild(item, newPosition);\n\t}\n\n\tvoid CustomList::MoveItem(const Ref<Widget>& item, int newPosition)\n\t{\n\t\tmVerLayout->RemoveChild(item, false);\n\t\tmVerLayout->AddChild(item, newPosition);\n\t}\n\n\tint CustomList::GetItemPosition(const Ref<Widget>& item)\n\t{\n\t\tint i = 0;\n\t\tfor (auto& child : mVerLayout->GetChildWidgets())\n\t\t{\n\t\t\tif (child == item)\n\t\t\t\treturn i;\n\n\t\t\ti++;\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tRef<Widget> CustomList::GetItem(int position) const\n\t{\n\t\tif (position < 0 || position >= mVerLayout->GetChildWidgets().Count())\n\t\t\treturn nullptr;\n\n\t\treturn mVerLayout->GetChildWidgets().Get(position);\n\t}\n\n\tvoid CustomList::RemoveAllItems()\n\t{\n\t\tmVerLayout->RemoveAllChildren();\n\t}\n\n\tvoid CustomList::SortItems(const Function<bool(const Ref<Widget>&, const Ref<Widget>&)>& sortFunc)\n\t{\n\t\tmVerLayout->mChildWidgets.Sort(sortFunc);\n\t}\n\n\tint CustomList::GetItemsCount() const\n\t{\n\t\treturn mVerLayout->GetChildWidgets().Count();\n\t}\n\n\tvoid CustomList::SelectItem(const Ref<Widget>& item)\n\t{\n\t\tint itemPos = GetItemPosition(item);\n\n\t\tif (mSelectedItems.Contains([=](auto x) { return x.idx == itemPos; }))\n\t\t\treturn;\n\n\t\tif (!mMultiSelection)\n\t\t\tClearSelection();\n\n\t\tSelection selection;\n\t\tselection.idx = itemPos;\n\t\tselection.selection = GetSelectionSprite();\n\t\tmSelectedItems.Add(selection);\n\n\t\tonSelectedPos(itemPos);\n\t\tonSelectedItem(item);\n\n\t\tOnSelectionChanged();\n\t\tSetLayoutDirty();\n\t}\n\n\tvoid CustomList::SelectItemAt(int position)\n\t{\n\t\tif (!mMultiSelection)\n\t\t\tClearSelection();\n\n\t\tif (position >= mVerLayout->GetChildWidgets().Count()) \n\t\t{\n\t\t\to2Debug.LogWarning(\"Can't select item at %i: out of range (%i)\", position, GetItemsCount());\n\t\t\treturn;\n\t\t}\n\n\t\tif (mSelectedItems.Contains([=](auto x) { return x.idx == position; }))\n\t\t\treturn;\n\n\t\tif (position >= 0)\n\t\t{\n\t\t\tSelection selection;\n\t\t\tselection.idx = position;\n\t\t\tselection.selection = GetSelectionSprite();\n\t\t\tmSelectedItems.Add(selection);\n\n\t\t\tonSelectedPos(position);\n\t\t\tonSelectedItem(GetItem(position));\n\t\t}\n\n\t\tOnSelectionChanged();\n\t\tSetLayoutDirty();\n\t}\n\n\tvoid CustomList::SetSelectedItems(const Vector<int>& items)\n\t{\n\t\tfor (auto& x : items)\n\t\t\tSelectItemAt(x);\n\t}\n\n\tvoid CustomList::ClearSelection()\n\t{\n\t\tfor (auto& sel : mSelectedItems)\n\t\t\tmSelectionSpritesPool.Add(sel.selection);\n\n\t\tmSelectedItems.Clear();\n\t}\n\n\tVector<int> CustomList::GetSelectedItems() const\n\t{\n\t\treturn mSelectedItems.Convert<int>([](auto x) { return x.idx; });\n\t}\n\n\tint CustomList::GetSelectedItemPos() const\n\t{\n\t\tif (mSelectedItems.IsEmpty())\n\t\t\treturn -1;\n\n\t\treturn mSelectedItems.Last().idx;\n\t}\n\n\tRef<Widget> CustomList::GetSelectedItem() const\n\t{\n\t\tif (mSelectedItems.IsEmpty())\n\t\t\treturn nullptr;\n\n\t\treturn GetItem(mSelectedItems.Last().idx);\n\t}\n\n\tvoid CustomList::SetMultiselectionAvailable(bool available)\n\t{\n\t\tmMultiSelection = available;\n\n\t\tif (!mMultiSelection) \n\t\t{\n\t\t\tint count = mSelectedItems.Count();\n\t\t\tfor (int i = 0; i < count - 1; i++) \n\t\t\t{\n\t\t\t\tmSelectionSpritesPool.Add(mSelectedItems.Last().selection);\n\t\t\t\tmSelectedItems.PopBack();\n\t\t\t}\n\t\t}\n\t}\n\n\tbool CustomList::IsMultiselectionAvailable() const\n\t{\n\t\treturn mMultiSelection;\n\t}\n\n\tconst Ref<Sprite>& CustomList::GetSelectionDrawable() const\n\t{\n\t\treturn mSelectionDrawable;\n\t}\n\n\tconst Ref<Sprite>& CustomList::GetHoverDrawable() const\n\t{\n\t\treturn mHoverDrawable;\n\t}\n\n\tvoid CustomList::SetSelectionDrawableLayout(const Layout& layout)\n\t{\n\t\tmSelectionLayout = layout;\n\t}\n\n\tLayout CustomList::GetSelectionDrawableLayout() const\n\t{\n\t\treturn mSelectionLayout;\n\t}\n\n\tvoid CustomList::SetHoverDrawableLayout(const Layout& layout)\n\t{\n\t\tmHoverLayout = layout;\n\t}\n\n\tLayout CustomList::GetHoverDrawableLayout() const\n\t{\n\t\treturn mHoverLayout;\n\t}\n\n\tbool CustomList::IsScrollable() const\n\t{\n\t\treturn mEnableHorScroll || mEnableVerScroll;\n\t}\n\n\tbool CustomList::IsInputTransparent() const\n\t{\n\t\treturn false;\n\t}\n\n\tvoid CustomList::MoveScrollPosition(const Vec2F& delta)\n\t{\n\t\tScrollArea::MoveScrollPosition(delta);\n\t\tUpdateHover(o2Input.GetCursorPos());\n\t\tUpdateSelectionSprites();\n\t}\n\n\tvoid CustomList::OnTransformUpdated()\n\t{\n\t\tScrollArea::OnTransformUpdated();\n\t\tUpdateHover(o2Input.GetCursorPos());\n\t\tUpdateSelectionSprites();\n\t}\n\n\tvoid CustomList::UpdateSelfTransform()\n\t{\n\t\tScrollArea::UpdateSelfTransform();\n\n\t\tif (Input::IsSingletonInitialzed())\n\t\t\tUpdateHover(o2Input.cursorPos);\n\n\t\tmCurrentHoverRect = mTargetHoverRect;\n\t\tmHoverDrawable->SetRect(mCurrentHoverRect);\n\t}\n\n\tString CustomList::GetCreateMenuGroup()\n\t{\n\t\treturn \"List\";\n\t}\n\n\tvoid CustomList::UpdateSelectionSprites()\n\t{\n\t\tfor (auto& sel : mSelectedItems)\n\t\t{\n\t\t\tif (auto item = GetItem(sel.idx))\n\t\t\t{\n\t\t\t\tsel.selection->SetRect(mSelectionLayout.Calculate(item->layout->worldRect));\n\t\t\t\tsel.selection->SetEnabled(item->mResEnabledInHierarchy && !item->mIsClipped);\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CustomList::OnCursorPressed(const Input::Cursor& cursor)\n\t{\n\t\tauto pressedState = state[\"pressed\"];\n\t\tif (pressedState)\n\t\t\t*pressedState = true;\n\t}\n\n\tvoid CustomList::OnCursorStillDown(const Input::Cursor& cursor)\n\t{\n\t\tconst float checkDeltaThreshold = 2.0f;\n\t\tif ((cursor.position - mLastSelectCheckCursor).Length() < checkDeltaThreshold)\n\t\t\treturn;\n\n\t\tmLastSelectCheckCursor = cursor.position;\n\t}\n\n\tvoid CustomList::OnCursorReleased(const Input::Cursor& cursor)\n\t{\n\t\tauto pressedState = state[\"pressed\"];\n\t\tif (pressedState)\n\t\t\t*pressedState = false;\n\n\t\tif (!mMultiSelection || !o2Input.IsKeyDown(VK_CONTROL))\n\t\t\tClearSelection();\n\n\t\tint itemIdx = -1;\n\t\tGetItemUnderPoint(cursor.position, &itemIdx);\n\t\tSelectItemAt(itemIdx);\n\t}\n\n\tvoid CustomList::OnCursorPressBreak(const Input::Cursor& cursor)\n\t{\n\t\tauto pressedState = state[\"pressed\"];\n\t\tif (pressedState)\n\t\t\t*pressedState = false;\n\t}\n\n\tvoid CustomList::OnCursorExit(const Input::Cursor& cursor)\n\t{\n\t\tauto hoverState = state[\"hover\"];\n\t\tif (hoverState)\n\t\t\t*hoverState = false;\n\t\telse\n\t\t\tmHoverDrawable->SetEnabled(false);\n\t}\n\n\tvoid CustomList::OnCursorMoved(const Input::Cursor& cursor)\n\t{\n\t\tconst float checkDeltaThreshold = 2.0f;\n\t\tif ((cursor.position - mLastHoverCheckCursor).Length() < checkDeltaThreshold)\n\t\t\treturn;\n\n\t\tmLastHoverCheckCursor = cursor.position;\n\n\t\tUpdateHover(cursor.position);\n\t}\n\n\tRef<Widget> CustomList::GetItemUnderPoint(const Vec2F& point, int* idxPtr)\n\t{\n\t\tif (!mVerLayout)\n\t\t\treturn nullptr;\n\n\t\tint idx = 0;\n\t\tfor (auto& child : mVerLayout->mChildWidgets)\n\t\t{\n\t\t\tif (child->layout->IsPointInside(point))\n\t\t\t{\n\t\t\t\tif (idxPtr)\n\t\t\t\t\t*idxPtr = idx;\n\n\t\t\t\treturn child;\n\t\t\t}\n\n\t\t\tidx++;\n\t\t}\n\n\t\tif (idxPtr)\n\t\t\t*idxPtr = -1;\n\n\t\treturn nullptr;\n\t}\n\n\tvoid CustomList::OnDeserialized(const DataValue& node)\n\t{\n\t\tScrollArea::OnDeserialized(node);\n\t\tRetargetStatesAnimations();\n\t}\n\n\tvoid CustomList::UpdateTransparency()\n\t{\n\t\tWidget::UpdateTransparency();\n\n\t\tif (mHorScrollBar)\n\t\t\tmHorScrollBar->UpdateTransparency();\n\n\t\tif (mVerScrollBar)\n\t\t\tmVerScrollBar->UpdateTransparency();\n\n\t\tif (mHoverDrawable)\n\t\t\tmHoverDrawable->transparency = mResTransparency;\n\n\t\tfor (auto& sel : mSelectedItems)\n\t\t\tsel.selection->transparency = mResTransparency;\n\t}\n\n\tvoid CustomList::UpdateHover(const Vec2F& point)\n\t{\n\t\tint itemIdx = -1;\n\t\tauto itemUnderCursor = GetItemUnderPoint(point, &itemIdx);\n\n\t\tif (itemIdx < 0)\n\t\t{\n\t\t\tauto hoverState = state[\"hover\"];\n\t\t\tif (hoverState)\n\t\t\t{\n\t\t\t\tmHoverDrawable->SetEnabled(true);\n\t\t\t\t*hoverState = false;\n\t\t\t}\n\t\t\telse mHoverDrawable->SetEnabled(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmTargetHoverRect = mHoverLayout.Calculate(itemUnderCursor->layout->worldRect);\n\n\t\t\tauto hoverState = state[\"hover\"];\n\t\t\tif (hoverState) {\n\t\t\t\tmHoverDrawable->SetEnabled(true);\n\t\t\t\t*hoverState = true;\n\t\t\t}\n\t\t\telse mHoverDrawable->SetEnabled(true);\n\t\t}\n\t}\n\n\tRef<Sprite> CustomList::GetSelectionSprite()\n\t{\n\t\tif (mSelectionSpritesPool.IsEmpty())\n\t\t{\n\t\t\tconst int poolStep = 5;\n\t\t\tfor (int i = 0; i < poolStep; i++)\n\t\t\t\tmSelectionSpritesPool.Add(mSelectionDrawable->CloneAsRef<Sprite>());\n\t\t}\n\n\t\tauto sprite = mSelectionSpritesPool.PopBack();\n\t\tsprite->SetTransparency(1.0f);\n\n\t\treturn sprite;\n\t}\n\n\tvoid CustomList::OnSelectionChanged()\n\t{\n\t}\n\n\tvoid CustomList::OnEnabled()\n\t{\n\t\tWidget::OnEnabled();\n\n\t\tSetInteractable(true);\n\t}\n\n\tvoid CustomList::OnDisabled()\n\t{\n\t\tWidget::OnDisabled();\n\n\t\tSetInteractable(false);\n\t}\n\n\tbool CustomList::Selection::operator==(const Selection& other) const\n\t{\n\t\treturn idx == other.idx;\n\t}\n\n\tvoid CustomList::OnKeyPressed(const Input::Key& key)\n\t{\n\t\tif (!IsFocused())\n\t\t\treturn;\n\n\t\tint currentSelection = GetSelectedItemPos();\n\t\tint itemsCount = GetItemsCount();\n\n\t\tif (itemsCount <= 0)\n\t\t\treturn;\n\n\t\tif (key.keyCode == VK_DOWN)\n\t\t{\n\t\t\t// Move selection down\n\t\t\tint nextItem = currentSelection + 1;\n\t\t\tif (nextItem >= itemsCount)\n\t\t\t\tnextItem = 0; // Wrap to beginning\n\n\t\t\tif (!mMultiSelection || !o2Input.IsKeyDown(VK_CONTROL))\n\t\t\t\tClearSelection();\n\t\t\t\t\n\t\t\tSelectItemAt(nextItem);\n\t\t}\n\t\telse if (key.keyCode == VK_UP)\n\t\t{\n\t\t\t// Move selection up\n\t\t\tint prevItem = currentSelection - 1;\n\t\t\tif (prevItem < 0)\n\t\t\t\tprevItem = itemsCount - 1; // Wrap to end\n\n\t\t\tif (!mMultiSelection || !o2Input.IsKeyDown(VK_CONTROL))\n\t\t\t\tClearSelection();\n\t\t\t\t\n\t\t\tSelectItemAt(prevItem);\n\t\t}\n\t}\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::CustomList>);\n// --- META ---\n\nDECLARE_CLASS(o2::CustomList, o2__CustomList);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/CustomList.h",
    "content": "#pragma once\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n\nnamespace o2\n{\n    // -------------------------------\n    // List view widget with selection\n    // -------------------------------\n    class CustomList : public ScrollArea, public KeyboardEventsListener\n    {\n    public:\n        PROPERTIES(CustomList);\n        PROPERTY(Vector<int>, selectedItems, SetSelectedItems, GetSelectedItems); // Selected item widget property\n        PROPERTY(Ref<Widget>, selectedItem, SelectItem, GetSelectedItem);         // Selected item widget\n        PROPERTY(int, selectedItemPos, SelectItemAt, GetSelectedItemPos);         // Selected item position property\n        GETTER(int, itemsCount, GetItemsCount);                                   // All items count getter\n\n    public:\n        Function<void(int)>                onSelectedPos;   // Select item position event\n        Function<void(const Ref<Widget>&)> onSelectedItem;  // Select item event\n\n    public:\n        // Default constructor\n        explicit CustomList(RefCounter* refCounter);\n\n        // Copy-constructor\n        CustomList(RefCounter* refCounter, const CustomList& other);\n\n        // Destructor\n        ~CustomList();\n\n        // Copy-operator\n        CustomList& operator=(const CustomList& other);\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Draws widget\n        void Draw() override;\n\n        // Sets item sample widget. WARNING: Removing all old items!\n        void SetItemSample(const Ref<Widget>& sample);\n\n        // Returns item sample widget\n        const Ref<Widget>& GetItemSample() const;\n\n        // Returns layout of items\n        const Ref<VerticalLayout>& GetItemsLayout() const;\n\n        // Adds new item and returns it\n        Ref<Widget> AddItem();\n\n        // Adds new item at position and returns it\n        Ref<Widget> AddItem(int position);\n\n        // Removes item\n        void RemoveItem(const Ref<Widget>& item);\n\n        // Removes item in position\n        void RemoveItem(int position);\n\n        // Moves item from position to new position\n        void MoveItem(int position, int newPosition);\n\n        // Moves item to new position\n        void MoveItem(const Ref<Widget>& item, int newPosition);\n\n        // Returns item position\n        int GetItemPosition(const Ref<Widget>& item);\n\n        // Returns item by position\n        Ref<Widget> GetItem(int position) const;\n\n        // Removes all items\n        void RemoveAllItems();\n\n        // Sorts items\n        void SortItems(const Function<bool(const Ref<Widget>&, const Ref<Widget>&)>& sortFunc);\n\n        // Returns items count\n        int GetItemsCount() const;\n\n        // Selects item\n        void SelectItem(const Ref<Widget>& item);\n\n        // Selects item at position\n        void SelectItemAt(int position);\n\n        // Sets items selection\n        void SetSelectedItems(const Vector<int>& items);\n\n        // Clears selection\n        void ClearSelection();\n\n        // Returns selected item\n        Vector<int> GetSelectedItems() const;\n\n        // Returns selected item position\n        int GetSelectedItemPos() const;\n\n        // Returns selected item widget\n        Ref<Widget> GetSelectedItem() const;\n\n        // Sets multi selection\n        void SetMultiselectionAvailable(bool available);\n\n        // Returns is multi selection available\n        bool IsMultiselectionAvailable() const;\n\n        // Returns selection drawable\n        const Ref<Sprite>& GetSelectionDrawable() const;\n\n        // Returns hover drawable\n        const Ref<Sprite>& GetHoverDrawable() const;\n\n        // Sets selection drawable layout (result rectangle will be calculated by item widget absolute rectangle)\n        void SetSelectionDrawableLayout(const Layout& layout);\n\n        // Returns selection drawable layout\n        Layout GetSelectionDrawableLayout() const;\n\n        // Sets hover drawable layout (result rectangle will be calculated by item widget absolute rectangle)\n        void SetHoverDrawableLayout(const Layout& layout);\n\n        // Returns hover drawable layout\n        Layout GetHoverDrawableLayout() const;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(CustomList);\n        CLONEABLE_REF(CustomList);\n\n    protected:\n        // ------------------\n        // Selected item info\n        // ------------------\n        struct Selection\n        {\n            int         idx;       // Item index\n            Ref<Sprite> selection; // Selection sprite\n\n            // Check equals operator\n            bool operator==(const Selection& other) const;\n        };\n\n    protected:\n        Ref<VerticalLayout> mVerLayout;  // Child vertical layout\n        Ref<Widget>         mItemSample; // Item sample widget @SERIALIZABLE\n\n        bool              mMultiSelection = true; // Is multi selection available @SERIALIZABLE\n        Vector<Selection> mSelectedItems;         // Current selected items\n\n        Ref<Sprite> mSelectionDrawable; // Selection sprite @SERIALIZABLE\n        Ref<Sprite> mHoverDrawable;     // Item hover drawable @SERIALIZABLE\n\n        Layout mSelectionLayout = Layout::BothStretch(); // Selection layout, result selection area depends on selected item @SERIALIZABLE\n        Layout mHoverLayout = Layout::BothStretch();     // Hover layout, result selection area depends on selected item @SERIALIZABLE\n\n        RectF mCurrentHoverRect; // Current hover rectangle (for smoothing)\n        RectF mTargetHoverRect;  // Target hover rectangle (over selected item)\n\n        Vec2F mLastHoverCheckCursor;  // Last cursor position on hover check\n        Vec2F mLastSelectCheckCursor; // Last cursor position on selection check\n\n        Vector<Ref<Sprite>> mSelectionSpritesPool; // Selection sprites pool\n\n    protected:\n        // Called when object was deserialized and trying to reattach states animations target\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Updates transparency for this and children widgets\n        void UpdateTransparency() override;\n\n        // Called when transformation was changed and updated\n        void OnTransformUpdated() override;\n\n        // Called when selected item index was changed\n        virtual void OnSelectionChanged();\n\n        // Moves scroll position and updates children widgets clipping and layout\n        void MoveScrollPosition(const Vec2F& delta) override;\n\n        // Updates selections sprites rectangles\n        void UpdateSelectionSprites();\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when key was pressed when widget is focused\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Returns item widget under point and stores index in idxPtr, if not null\n        Ref<Widget> GetItemUnderPoint(const Vec2F& point, int* idxPtr);\n\n        // Updates hover\n        void UpdateHover(const Vec2F& point);\n\n        // Returns selection sprite\n\t\tRef<Sprite> GetSelectionSprite();\n\n\t\tREF_COUNTERABLE_IMPL(ScrollArea);\n\n        friend class DropDown;\n        friend class CustomDropDown;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::CustomList)\n{\n    BASE_CLASS(o2::ScrollArea);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::CustomList)\n{\n    FIELD().PUBLIC().NAME(selectedItems);\n    FIELD().PUBLIC().NAME(selectedItem);\n    FIELD().PUBLIC().NAME(selectedItemPos);\n    FIELD().PUBLIC().NAME(itemsCount);\n    FIELD().PUBLIC().NAME(onSelectedPos);\n    FIELD().PUBLIC().NAME(onSelectedItem);\n    FIELD().PROTECTED().NAME(mVerLayout);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mItemSample);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mMultiSelection);\n    FIELD().PROTECTED().NAME(mSelectedItems);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectionDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHoverDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Layout::BothStretch()).NAME(mSelectionLayout);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Layout::BothStretch()).NAME(mHoverLayout);\n    FIELD().PROTECTED().NAME(mCurrentHoverRect);\n    FIELD().PROTECTED().NAME(mTargetHoverRect);\n    FIELD().PROTECTED().NAME(mLastHoverCheckCursor);\n    FIELD().PROTECTED().NAME(mLastSelectCheckCursor);\n    FIELD().PROTECTED().NAME(mSelectionSpritesPool);\n}\nEND_META;\nCLASS_METHODS_META(o2::CustomList)\n{\n\n    typedef const Function<bool(const Ref<Widget>&, const Ref<Widget>&)>& _tmp1;\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const CustomList&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItemSample, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Widget>&, GetItemSample);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<VerticalLayout>&, GetItemsLayout);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, AddItem);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, AddItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveItem, int, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveItem, const Ref<Widget>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetItemPosition, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllItems);\n    FUNCTION().PUBLIC().SIGNATURE(void, SortItems, _tmp1);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetItemsCount);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectItem, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectItemAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedItems, const Vector<int>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, ClearSelection);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<int>, GetSelectedItems);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetSelectedItemPos);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, GetSelectedItem);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMultiselectionAvailable, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsMultiselectionAvailable);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetSelectionDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetHoverDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionDrawableLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetSelectionDrawableLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHoverDrawableLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetHoverDrawableLayout);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTransparency);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnTransformUpdated);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectionChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveScrollPosition, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateSelectionSprites);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Widget>, GetItemUnderPoint, const Vec2F&, int*);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHover, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Sprite>, GetSelectionSprite);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/DropDown.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"DropDown.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n\nnamespace o2\n{\n    DropDown::DropDown(RefCounter* refCounter):\n        CustomDropDown(refCounter)\n    {\n        auto itemSample = mmake<Label>();\n        itemSample->horOverflow = Label::HorOverflow::Dots;\n        SetItemSample(itemSample);\n    }\n\n    DropDown::DropDown(RefCounter* refCounter, const DropDown& other):\n        CustomDropDown(refCounter, other)\n    {\n        RetargetStatesAnimations();\n        mSelectedText = GetLayerDrawable<Text>(\"selectedText\");\n    }\n\n    DropDown::~DropDown()\n    {}\n\n    DropDown& DropDown::operator=(const DropDown& other)\n    {\n        CustomDropDown::operator=(other);\n\n        mSelectedText = GetLayerDrawable<Text>(\"selectedText\");\n\n        return *this;\n    }\n\n    void DropDown::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy)\n            return;\n\n        Widget::Draw();\n\n        o2UI.DrawWidgetAtTop(mItemsList);\n\n        if (!mSelectedText)\n        {\n            auto selectedItem = DynamicCast<Label>((mItemsList->GetItem(mItemsList->GetSelectedItemPos())));\n            if (selectedItem)\n            {\n                o2Render.EnableScissorTest(mAbsoluteClip);\n                selectedItem->ForceDraw(mAbsoluteClip, mResTransparency);\n                o2Render.DisableScissorTest();\n            }\n        }\n\n        DrawDebugFrame();\n    }\n\n    int DropDown::AddItem(const WString& text)\n    {\n        auto item = DynamicCast<Label>(CustomDropDown::AddItem());\n        item->text = text;\n        return GetItemsCount() - 1;\n    }\n\n    int DropDown::AddItem(const WString& text, int position)\n    {\n        auto item = DynamicCast<Label>(CustomDropDown::AddItem(position));\n        item->text = text;\n        return position;\n    }\n\n    void DropDown::AddItems(const Vector<WString>& data)\n    {\n        for (auto& text : data)\n            AddItem(text);\n    }\n\n    void DropDown::RemoveItem(const WString& text)\n    {\n        int position = FindItem(text);\n        if (position >= 0)\n            CustomDropDown::RemoveItem(position);\n    }\n\n    int DropDown::FindItem(const WString& text)\n    {\n        int i = 0;\n        for (auto& child : mItemsList->mVerLayout->mChildWidgets)\n        {\n            auto childLabel = DynamicCast<Label>(child);\n            if (childLabel && childLabel->GetText() == text)\n                return i;\n\n            i++;\n        }\n\n        return -1;\n    }\n\n    WString DropDown::GetItemText(int position)\n    {\n        auto item = DynamicCast<Label>(GetItem(position));\n        if (item)\n            return item->GetText();\n\n        return WString();\n    }\n\n    Vector<WString> DropDown::GetAllItemsText() const\n    {\n        Vector<WString> res;\n        for (auto& child : mItemsList->mVerLayout->mChildWidgets)\n        {\n            auto childLabel = DynamicCast<Label>(child);\n\n            if (childLabel)\n                res.Add(childLabel->GetText());\n        }\n\n        return res;\n    }\n\n    WString DropDown::GetSelectedItemText()\n    {\n        auto selectedItem = DynamicCast<Label>(GetSelectedItem());\n        if (selectedItem)\n            return selectedItem->GetText();\n\n        return WString();\n    }\n\n    void DropDown::SelectItemText(const WString& text)\n    {\n        int idx = FindItem(text);\n        mItemsList->SelectItemAt(idx);\n    }\n\n    String DropDown::GetCreateMenuGroup()\n    {\n        return \"Dropping\";\n    }\n\n    void DropDown::OnSelectionChanged()\n    {\n        onSelectedText(GetSelectedItemText());\n\n        if (mSelectedText)\n            mSelectedText->SetText(GetSelectedItemText());\n    }\n\n    void DropDown::OnLayerAdded(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->name == \"selectedText\" && layer->GetDrawable() && layer->GetDrawable()->GetType() == TypeOf(Text))\n            mSelectedText = DynamicCast<Text>(layer->GetDrawable());\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::DropDown>);\n// --- META ---\n\nDECLARE_CLASS(o2::DropDown, o2__DropDown);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/DropDown.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/CustomDropDown.h\"\n\nnamespace o2\n{\n    class Text;\n\n    // --------------\n    // Text drop down\n    // --------------\n    class DropDown: public CustomDropDown\n    {\n    public:\n        PROPERTIES(DropDown);\n        PROPERTY(WString, value, SelectItemText, GetSelectedItemText); // Current selected item text\n\n    public:\n        Function<void(const WString&)> onSelectedText; // Change text selected event\n\n    public:\n        // Default constructor\n        explicit DropDown(RefCounter* refCounter);\n\n        // Copy-constructor\n        DropDown(RefCounter* refCounter, const DropDown& other);\n\n        // Destructor\n        ~DropDown();\n\n        // Copy operator\n        DropDown& operator=(const DropDown& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Adds new text item and returns position\n        int AddItem(const WString& text);\n\n        // Add new text item at position and returns this position\n        int AddItem(const WString& text, int position);\n\n        // Adds array of text items\n        void AddItems(const Vector<WString>& data);\n\n        // Removes item, if exist\n        void RemoveItem(const WString& text);\n\n        // Returns position of item. Returns -1 if can't find item\n        int FindItem(const WString& text);\n\n        // Returns item text by position\n        WString GetItemText(int position);\n\n        // Returns array of all text items\n        Vector<WString> GetAllItemsText() const;\n\n        // Returns current selected text item\n        WString GetSelectedItemText();\n\n        // Selects item text\n        void SelectItemText(const WString& text);\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(DropDown);\n        CLONEABLE_REF(DropDown);\n\n    protected:\n        Ref<Text> mSelectedText; // Selected text label, draws separately\n\n    protected:\n        // Called when selected item index was changed\n        void OnSelectionChanged() override;\n\n        // Called when layer added and updates drawing sequence, searches selected text drawable\n        void OnLayerAdded(const Ref<WidgetLayer>& layer) override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::DropDown)\n{\n    BASE_CLASS(o2::CustomDropDown);\n}\nEND_META;\nCLASS_FIELDS_META(o2::DropDown)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(onSelectedText);\n    FIELD().PROTECTED().NAME(mSelectedText);\n}\nEND_META;\nCLASS_METHODS_META(o2::DropDown)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const DropDown&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddItem, const WString&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddItems, const Vector<WString>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetItemText, int);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<WString>, GetAllItemsText);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetSelectedItemText);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectItemText, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectionChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerAdded, const Ref<WidgetLayer>&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/EditBox.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"EditBox.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/System/Clipboard.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    EditBox::EditBox(RefCounter* refCounter):\n        ScrollArea(refCounter)\n    {\n        mSelectionMesh = mmake<Mesh>();\n        mTextDrawable  = mmake<Text>();\n        mCaretDrawable = mmake<Sprite>();\n    }\n\n    EditBox::EditBox(RefCounter* refCounter, const EditBox& other):\n        ScrollArea(refCounter, other), mMultiLine(other.mMultiLine), mWordWrap(other.mWordWrap), mMaxLineChars(other.mMaxLineChars),\n        mMaxLinesCount(other.mMaxLinesCount), mText(other.mText), mLastText(other.mText),\n        mAvailableSymbols(other.mAvailableSymbols), mSelectionColor(other.mSelectionColor),\n        mCaretBlinkDelay(other.mCaretBlinkDelay)\n    {\n        mSelectionMesh = mmake<Mesh>();\n        mTextDrawable  = other.mTextDrawable->CloneAsRef<Text>();\n        mCaretDrawable = other.mCaretDrawable->CloneAsRef<Sprite>();\n\n        mTextDrawable->SetText(mText);\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    EditBox::~EditBox()\n    {}\n\n    EditBox& EditBox::operator=(const EditBox& other)\n    {\n        ScrollArea::operator=(other);\n\n        mText = other.mText;\n        mLastText = mText;\n        mAvailableSymbols = other.mAvailableSymbols;\n        mSelectionBegin = 0;\n        mSelectionEnd = 0;\n        mCaretBlinkTime = 0;\n        mLastClickTime = -10.0f;\n        mMultiLine = other.mMultiLine;\n        mWordWrap = other.mWordWrap;\n        mMaxLineChars = other.mMaxLineChars;\n        mMaxLinesCount = other.mMaxLinesCount;\n        mSelectionColor = other.mSelectionColor;\n        mCaretBlinkDelay = other.mCaretBlinkDelay;\n        mTextDrawable = other.mTextDrawable->CloneAsRef<Text>();\n        mCaretDrawable = other.mCaretDrawable->CloneAsRef<Sprite>();\n\n        mTextDrawable->SetText(mText);\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        onChanged(mText);\n\n        return *this;\n    }\n\n    void EditBox::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        ISceneDrawable::OnDrawn();\n\n        o2Render.EnableScissorTest(mAbsoluteClipArea);\n\n        mTextDrawable->Draw();\n        mSelectionMesh->Draw();\n\n        if (mIsFocused)\n            mCaretDrawable->Draw();\n\n        for (auto& child : mChildrenInheritedDepth)\n            child->Draw();\n\n        o2Render.DisableScissorTest();\n\n        CursorAreaEventsListener::OnDrawn();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        if (mOwnHorScrollBar)\n            mHorScrollBar->Draw();\n\n        if (mOwnVerScrollBar)\n            mVerScrollBar->Draw();\n\n        DrawDebugFrame();\n    }\n\n    void EditBox::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        ScrollArea::Update(dt);\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        UpdateCaretBlinking(dt);\n\n        mJustFocused = false;\n    }\n\n    void EditBox::SetText(const WString& text)\n    {\n        mText = GetFilteredText(text);\n        mTextDrawable->SetText(mText);\n\n        UpdateScrollParams();\n        UpdateSelectionAndCaret();\n\n        onChanged(mText);\n\n        mLastText = mText;\n    }\n\n    WString EditBox::GetText() const\n    {\n        return mText;\n    }\n\n    void EditBox::SetCaretPosition(int caretPosition)\n    {\n        mSelectionBegin = mSelectionEnd = caretPosition;\n        UpdateSelectionAndCaret();\n    }\n\n    int EditBox::GetCaretPosition()\n    {\n        return mSelectionEnd;\n    }\n\n    void EditBox::Select(int begin, int end)\n    {\n        mSelectionBegin = begin;\n        mSelectionEnd = end;\n        UpdateSelectionAndCaret();\n    }\n\n    void EditBox::SetSelectionBegin(int position)\n    {\n        mSelectionBegin = position;\n        UpdateSelectionAndCaret();\n    }\n\n    int EditBox::GetSelectionBegin() const\n    {\n        return mSelectionBegin;\n    }\n\n    void EditBox::SetSelectionEnd(int position)\n    {\n        mSelectionEnd = position;\n        UpdateSelectionAndCaret();\n    }\n\n    int EditBox::GetSelectionEnd() const\n    {\n        return mSelectionEnd;\n    }\n\n    void EditBox::Deselect()\n    {\n        mSelectionBegin = mSelectionEnd;\n        UpdateSelectionAndCaret();\n    }\n\n    void EditBox::SelectAll()\n    {\n        mSelectionBegin = 0;\n        mSelectionEnd = mText.Length();\n\n        UpdateSelectionAndCaret();\n        CheckScrollingToCaret();\n    }\n\n    const Ref<Text>& EditBox::GetTextDrawable()\n    {\n        return mTextDrawable;\n    }\n\n    const Ref<Sprite>& EditBox::GetCaretDrawable()\n    {\n        return mCaretDrawable;\n    }\n\n    void EditBox::SetSelectionColor(const Color4& color)\n    {\n        mSelectionColor = color;\n        UpdateSelectionAndCaret();\n    }\n\n    Color4 EditBox::GetSelectionColor() const\n    {\n        return mSelectionColor;\n    }\n\n    void EditBox::SetFilterInteger()\n    {\n        SetAvailableSymbols(\"1234567890-\");\n    }\n\n    void EditBox::SetFilterFloat()\n    {\n        SetAvailableSymbols(\"-1234567890.,\");\n    }\n\n    void EditBox::SetFilterNames()\n    {\n        SetAvailableSymbols(\"1234567890qwertyuioplkjhgfdsazxcvbnm_ QWERTYUIOPLKJHGFDSAZXCVBNM.,\");\n    }\n\n    void EditBox::SetAvailableSymbols(const WString& availableSymbols)\n    {\n        mAvailableSymbols = availableSymbols;\n\n        if (mAvailableSymbols.Length() > 0)\n        {\n            mText = GetFilteredText(mText);\n            mTextDrawable->SetText(mText);\n\n            SetLayoutDirty();\n        }\n\n        onChanged(mText);\n    }\n\n    WString EditBox::GetAvailableSymbols() const\n    {\n        return mAvailableSymbols;\n    }\n\n    void EditBox::SetMaxSizes(int maxLineCharactersCount, int maxLinesCount)\n    {\n        mMaxLineChars = maxLineCharactersCount;\n        mMaxLinesCount = maxLinesCount;\n\n        CheckCharactersAndLinesBounds();\n    }\n\n    void EditBox::CheckCharactersAndLinesBounds()\n    {\n        int lines = 0;\n        int lineChars = 0;\n        WString filteredText(mText.Capacity() + 1);\n        int fi = 0;\n        for (int i = 0; i < mText.Length(); i++)\n        {\n            if (mText[i] == '\\n')\n            {\n                lines++;\n                lineChars = 0;\n                if (lines == mMaxLinesCount && mMaxLinesCount > 0)\n                    break;\n            }\n\n            lineChars++;\n\n            if (lineChars < mMaxLineChars || mMaxLineChars == 0 || mText[i] == '\\n')\n                filteredText[fi++] = mText[i];\n        }\n\n        filteredText[fi] = '\\0';\n\n        mText = filteredText;\n        mTextDrawable->SetText(filteredText);\n        onChanged(mText);\n\n        SetLayoutDirty();\n    }\n\n    void EditBox::SetMaxLineCharactersCount(int count)\n    {\n        mMaxLineChars = count;\n        CheckCharactersAndLinesBounds();\n    }\n\n    int EditBox::GetMaxLineCharactersCount() const\n    {\n        return mMaxLineChars;\n    }\n\n    void EditBox::SetMaxLinesCount(int count)\n    {\n        mMaxLinesCount = count;\n        CheckCharactersAndLinesBounds();\n    }\n\n    int EditBox::GetMaxLinesCount() const\n    {\n        return mMaxLinesCount;\n    }\n\n    void EditBox::SetMultiLine(bool multiline)\n    {\n        mMultiLine = multiline;\n\n        if (!mMultiLine)\n        {\n            WString filteredText(mText.Capacity() + 1);\n            int fi = 0;\n            for (int i = 0; i < mText.Length(); i++)\n            {\n                if (mText[i] != '\\n')\n                    filteredText[fi++] = mText[i];\n            }\n\n            filteredText[fi] = '\\0';\n\n            mText = filteredText;\n            mLastText = mText;\n            mTextDrawable->SetText(filteredText);\n\n            SetLayoutDirty();\n        }\n\n        onChanged(mText);\n    }\n\n    bool EditBox::IsMultiLine() const\n    {\n        return mMultiLine;\n    }\n\n    void EditBox::SetWordWrap(bool wordWrap)\n    {\n        mWordWrap = wordWrap;\n        mTextDrawable->SetWordWrap(mWordWrap);\n    }\n\n    bool EditBox::IsWordWrap() const\n    {\n        return mWordWrap;\n    }\n\n    void EditBox::SetCaretBlinkingDelay(float delay)\n    {\n        mCaretBlinkDelay = delay;\n    }\n\n    float EditBox::GetCaretBlinkingDelay() const\n    {\n        return mCaretBlinkDelay;\n    }\n\n    bool EditBox::IsScrollable() const\n    {\n        return mEnableHorScroll || mEnableVerScroll;\n    }\n\n    bool EditBox::IsFocusable() const\n    {\n        return true;\n    }\n\n    void EditBox::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        SetInteractable(true);\n    }\n\n    void EditBox::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        SetInteractable(false);\n    }\n\n    void EditBox::OnFocused()\n    {\n        if (!mMultiLine)\n            SelectAll();\n\n        mJustFocused = true;\n\n        if (IsUnderPoint(o2Input.GetCursorPos()))\n            o2Application.SetCursor(CursorType::IBeam);\n\n        Widget::OnFocused();\n    }\n\n    void EditBox::OnUnfocused()\n    {\n        mLastText = mText;\n        onChangeCompleted(mText);\n\n        if (!mMultiLine)\n            Deselect();\n    }\n\n    void EditBox::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        o2UI.FocusWidget(Ref(this));\n\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = true;\n\n        if (o2Time.GetApplicationTime() - mLastClickTime < 0.3f || o2Input.IsKeyDown(VK_CONTROL))\n        {\n            mSelectionBegin = mSelectionEnd = GetTextCaretPosition(cursor.position);\n            JumpSelection(false, false);\n            JumpSelection(true, true);\n\n            mSelWordBegin = Math::Min(mSelectionBegin, mSelectionEnd);\n            mSelWordEnd = Math::Max(mSelectionBegin, mSelectionEnd);\n\n            mSelectingByWords = true;\n        }\n        else\n        {\n            if ((mMultiLine || mIsFocused) && !mJustFocused)\n                mSelectionBegin = mSelectionEnd = GetTextCaretPosition(cursor.position);\n\n            mSelectingByWords = false;\n\n            UpdateSelectionAndCaret();\n            CheckScrollingToCaret();\n        }\n\n        mLastClickTime = o2Time.GetApplicationTime();\n        mCaretBlinkTime = 0.0f;\n        mLastCursorPos = cursor.position;\n    }\n\n    void EditBox::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        if (!Widget::IsUnderPoint(cursor.position))\n        {\n            o2Application.SetCursor(CursorType::Arrow);\n            Widget::Unfocus();\n        }\n    }\n\n    void EditBox::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        if (!Widget::IsUnderPoint(cursor.position))\n            o2Application.SetCursor(CursorType::Arrow);\n    }\n\n    void EditBox::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n        if (mIsFocused)\n            Unfocus();\n    }\n\n    void EditBox::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if ((cursor.position - mLastCursorPos).Length() < 3.0f)\n            return;\n\n        if (mSelectingByWords)\n        {\n            int curIdx = GetTextCaretPosition(cursor.position);\n\n            if (curIdx > mSelWordEnd)\n            {\n                mSelectionBegin = mSelWordBegin;\n                mSelectionEnd = curIdx;\n                JumpSelection(true, true);\n            }\n            else if (curIdx < mSelWordBegin)\n            {\n                mSelectionBegin = mSelWordEnd;\n                mSelectionEnd = curIdx;\n                JumpSelection(false, true);\n            }\n            else\n            {\n                mSelectionBegin = mSelWordBegin;\n                mSelectionEnd = mSelWordEnd;\n\n                UpdateSelectionAndCaret();\n                CheckScrollingToCaret();\n            }\n        }\n        else\n        {\n            mSelectionEnd = GetTextCaretPosition(cursor.position);\n            UpdateSelectionAndCaret();\n            CheckScrollingToCaret();\n        }\n\n        mCaretBlinkTime = 0;\n        mLastCursorPos = cursor.position;\n    }\n\n    void EditBox::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = true;\n\n        if (!cursor.isPressed)\n            o2Application.SetCursor(CursorType::IBeam);\n    }\n\n    void EditBox::OnCursorExit(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = false;\n\n        if (!IsPressed() && !cursor.isPressed)\n            o2Application.SetCursor(CursorType::Arrow);\n    }\n\n    void EditBox::OnCursorRightMousePressed(const Input::Cursor& cursor)\n    {}\n\n    void EditBox::OnCursorRightMouseStayDown(const Input::Cursor& cursor)\n    {}\n\n    void EditBox::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {}\n\n    void EditBox::OnKeyPressed(const Input::Key& key)\n    {\n        if (!mIsFocused)\n            return;\n\n        CheckCharacterTyping(key.keyCode);\n        CheckCaretMoving(key.keyCode);\n        CheckCharactersErasing(key.keyCode);\n        CheckClipboard(key.keyCode);\n    }\n\n    void EditBox::OnKeyReleased(const Input::Key& key)\n    {\n        if (mIsFocused)\n        {\n            if (key.keyCode == VK_ESCAPE)\n            {\n                if (!mMultiLine)\n                    SetText(mLastText);\n\n                Widget::Unfocus();\n            }\n\n            if (!mMultiLine)\n            {\n                if (key.keyCode == VK_RETURN)\n                {\n                    mLastText = mText;\n                    Widget::Unfocus();\n                }\n            }\n        }\n    }\n\n    void EditBox::OnKeyStayDown(const Input::Key& key)\n    {\n        if (!mIsFocused)\n            return;\n\n        if (!o2Input.IsKeyRepeating(key.keyCode))\n            return;\n\n        CheckCharacterTyping(key.keyCode);\n        CheckCaretMoving(key.keyCode);\n        CheckCharactersErasing(key.keyCode);\n        CheckClipboard(key.keyCode);\n    }\n\n    WString EditBox::GetFilteredText(const WString& text)\n    {\n        if (mAvailableSymbols.Length() == 0)\n            return text;\n\n        WString filteredText;\n        filteredText.Reserve(text.Capacity() + 1);\n        for (int i = 0; i < text.Length(); i++)\n        {\n            bool pass = false;\n            for (int j = 0; j < mAvailableSymbols.Length(); j++)\n            {\n                if (mAvailableSymbols[j] == text[i])\n                {\n                    pass = true;\n                    break;\n                }\n            }\n\n            if (pass)\n                filteredText += text[i];\n        }\n\n        return filteredText;\n    }\n\n    void EditBox::UpdateScrollParams()\n    {\n        auto fontRef = mTextDrawable->GetFont();\n        if (fontRef)\n            fontRef->CheckCharacters(\" \", mTextDrawable->GetFontHeight());\n\n        mAbsoluteViewArea = mViewAreaLayout.Calculate(layout->worldRect);\n        RectF localViewArea(0.0f, 0.0f, mAbsoluteViewArea.Width(), mAbsoluteViewArea.Height());\n\n        mScrollArea = RectF(0.0f, 0.0f, localViewArea.Width(), localViewArea.Height());\n\n        for (auto& child : mChildWidgets)\n        {\n            mScrollArea.left   = Math::Min(mScrollArea.left, child->layout->GetLeft());\n            mScrollArea.bottom = Math::Min(mScrollArea.bottom, child->layout->GetBottom());\n            mScrollArea.right  = Math::Max(mScrollArea.right, child->layout->GetRight());\n            mScrollArea.top    = Math::Max(mScrollArea.top, child->layout->GetTop());\n        }\n\n        RectF localTextLayout = localViewArea;\n        Vec2F textRealSize = mTextDrawable->GetRealSize();\n        RectF textArea(localTextLayout.left, localTextLayout.top - textRealSize.y,\n                       localTextLayout.left + textRealSize.x, localTextLayout.top);\n\n        mScrollArea.left   = Math::Min(mScrollArea.left, textArea.left);\n        mScrollArea.bottom = Math::Min(mScrollArea.bottom, textArea.bottom);\n        mScrollArea.right  = Math::Max(mScrollArea.right, textArea.right);\n        mScrollArea.top    = Math::Max(mScrollArea.top, textArea.top);\n\n        mScrollRange = RectF(mScrollArea.left - localViewArea.left,\n                             localViewArea.Height() - mScrollArea.top + localViewArea.bottom,\n                             -(localViewArea.Width() - mScrollArea.right + localViewArea.left),\n                             -mScrollArea.bottom + localViewArea.bottom);\n\n        if (mHorScrollBar)\n        {\n            if (Math::Equals(mScrollRange.left, mScrollRange.right, 1.0f))\n            {\n                if (mEnableHorScroll)\n                {\n                    auto enableHorBarState = state[\"enableHorBar\"];\n                    if (enableHorBarState)\n                        *enableHorBarState = false;\n\n                    mHorScrollBar->Hide();\n                }\n\n                mEnableHorScroll = false;\n            }\n            else\n            {\n                if (!mEnableHorScroll)\n                {\n                    auto enableHorBarState = state[\"enableHorBar\"];\n                    if (enableHorBarState)\n                        *enableHorBarState = true;\n\n                    mHorScrollBar->Show();\n                }\n\n                mEnableHorScroll = true;\n\n                mHorScrollBar->SetValueRange(mScrollRange.left, mScrollRange.right);\n                mHorScrollBar->SetScrollHandleSize(localViewArea.Width());\n            }\n        }\n\n        if (mVerScrollBar)\n        {\n            if (Math::Equals(mScrollRange.bottom, mScrollRange.top, 1.0f))\n            {\n                if (mEnableVerScroll)\n                {\n                    auto enableVerBarState = state[\"enableVerBar\"];\n                    if (enableVerBarState)\n                        *enableVerBarState = false;\n\n                    mVerScrollBar->Hide();\n                }\n\n                mEnableVerScroll = false;\n            }\n            else\n            {\n                if (!mEnableVerScroll)\n                {\n                    auto enableVerBarState = state[\"enableVerBar\"];\n                    if (enableVerBarState)\n                        *enableVerBarState = true;\n\n                    mVerScrollBar->Show();\n                }\n\n                mEnableVerScroll = true;\n\n                mVerScrollBar->SetValueRange(mScrollRange.bottom, mScrollRange.top);\n                mVerScrollBar->SetScrollHandleSize(localViewArea.Height());\n            }\n        }\n    }\n\n    bool EditBox::IsUnderPoint(const Vec2F& point)\n    {\n        return mDrawingScissorRect.IsInside(point) && mAbsoluteViewArea.IsInside(point);\n    }\n\n    bool EditBox::IsInputTransparent() const\n    {\n        return false;\n    }\n\n    String EditBox::GetCreateMenuGroup()\n    {\n        return \"Basic\";\n    }\n\n    void EditBox::UpdateTransparency()\n    {\n        ScrollArea::UpdateTransparency();\n\n        mTextDrawable->transparency = mResTransparency;\n\n        Color4 sc = mSelectionColor;\n        sc.a = (int)(((float)sc.a)*mResTransparency);\n        ULong selectionClr = sc.ABGR();\n\n        Vertex* verts = mSelectionMesh->GetVertices<Vertex>();\n        for (UInt i = 0; i < mSelectionMesh->vertexCount; i++)\n            verts[i].color = selectionClr;\n    }\n\n    void EditBox::UpdateLayersLayouts()\n    {\n        ScrollArea::UpdateLayersLayouts();\n\n        mTextDrawable->SetRect(GetChildrenWorldRect());\n        UpdateSelectionAndCaret();\n    }\n\n    void EditBox::UpdateSelectionAndCaret()\n    {\n        Vec2F caretPosition = GetTextCaretPosition(mSelectionEnd);\n        mCaretDrawable->SetPosition(caretPosition);\n\n        mSelectionMesh->vertexCount = 0;\n        mSelectionMesh->polyCount = 0;\n\n        if (mSelectionBegin == mSelectionEnd)\n            return;\n\n        int beg = Math::Min(mSelectionBegin, mSelectionEnd);\n        int end = Math::Max(mSelectionBegin, mSelectionEnd);\n        float caretDown = -mCaretDrawable->GetSize().y*mCaretDrawable->GetPivot().y;\n        float caretUp = caretDown + mCaretDrawable->GetSize().y;\n\n        auto& symbolsSet = mTextDrawable->GetSymbolsSet();\n        auto font = mTextDrawable->GetFont();\n        float spaceAdvance = font->GetCharacter(' ', mTextDrawable->GetFontHeight()).mAdvance;\n\n        for (auto& line : symbolsSet.mLines)\n        {\n            if (beg > line.mLineBegSymbol + line.mSymbols.Count() || end < line.mLineBegSymbol)\n                continue;\n\n            if (line.mSymbols.Count() == 0)\n            {\n                Vec2F lb = line.mPosition + Vec2F(0, caretDown);\n                Vec2F rt = lb + Vec2F(spaceAdvance, caretUp);\n                AddSelectionRect(RectF(lb, rt));\n                continue;\n            }\n\n            int begSymbol = Math::Max(beg - line.mLineBegSymbol, 0);\n            int endSymbol = end - line.mLineBegSymbol;\n            float endOffs = 0, begOffs = 0;\n            int lineSymbolsCount = line.mSymbols.Count();\n\n            if (begSymbol >= lineSymbolsCount)\n            {\n                begOffs = line.mSymbols.Last().mAdvance;\n                begSymbol = line.mSymbols.Count() - 1;\n            }\n\n            if (endSymbol >= lineSymbolsCount)\n            {\n                endOffs = line.mSymbols.Last().mAdvance;\n                if (line.mEndedNewLine && endSymbol > lineSymbolsCount)\n                    endOffs += spaceAdvance;\n\n                endSymbol = lineSymbolsCount - 1;\n            }\n\n            Vec2F lb(line.mSymbols[begSymbol].mFrame.left + line.mSymbols[begSymbol].mOrigin.x + begOffs,\n                     line.mPosition.y + caretDown);\n            Vec2F rt(line.mSymbols[endSymbol].mFrame.left + line.mSymbols[endSymbol].mOrigin.x + endOffs,\n                     line.mPosition.y + caretUp);\n\n            AddSelectionRect(RectF(lb, rt));\n        }\n    }\n\n    Vec2F EditBox::GetTextCaretPosition(int position)\n    {\n        bool fakeSymbols = false;\n        if (mText.Length() == 0)\n        {\n            fakeSymbols = true;\n\n            if (mTextDrawable->GetText() != \"A\")\n                mTextDrawable->SetText(\"A\");\n        }\n\n        auto& symbolsSet = mTextDrawable->GetSymbolsSet();\n        for (auto& line : symbolsSet.mLines)\n        {\n            if (position >= line.mLineBegSymbol && position <= line.mLineBegSymbol + line.mSymbols.Count())\n            {\n                int off = position - line.mLineBegSymbol;\n\n                if (off < line.mSymbols.Count())\n                {\n                    auto symb = line.mSymbols[off];\n                    auto res = symb.mFrame.LeftBottom() + symb.mOrigin;\n                    if (fakeSymbols)\n                        mTextDrawable->SetText(\"\");\n                    return res;\n                }\n                else\n                {\n                    if (line.mSymbols.Count() == 0)\n                        return line.mPosition;\n\n                    auto symb = line.mSymbols.Last();\n                    auto res = symb.mFrame.LeftBottom() + symb.mOrigin + Vec2F(symb.mAdvance, 0);\n                    if (fakeSymbols)\n                        mTextDrawable->SetText(\"\");\n                    return res;\n                }\n            }\n        }\n\n        if (auto fnt = mTextDrawable->GetFont())\n        {\n            if (fakeSymbols)\n                mTextDrawable->SetText(\"\");\n\n            return mAbsoluteViewArea.LeftTop() - Vec2F(0, mTextDrawable->GetFont()->GetHeightPx(mTextDrawable->GetFontHeight()));\n        }\n\n        return Vec2F();\n    }\n\n    int EditBox::GetTextCaretPosition(const Vec2F& point)\n    {\n        auto& symbolsSet = mTextDrawable->GetSymbolsSet();\n        auto font = mTextDrawable->GetFont();\n        float lineHeight = font->GetLineHeightPx(mTextDrawable->GetFontHeight());\n        float lineOffCoef = 0.25f;\n\n        bool checkUp, checkDown, checkLeft, checkRight;\n        int lineIdx = 0;\n        for (auto& line : symbolsSet.mLines)\n        {\n            checkUp = lineIdx > 0;\n            checkDown = lineIdx < (int)symbolsSet.mLines.Count() - 1;\n\n            float lineTop = (line.mSize.y*(1.0f - lineOffCoef) + lineHeight)*0.5f + line.mPosition.y;\n            float lineBottom = -line.mSize.y*lineOffCoef + line.mPosition.y;\n\n            if (line.mSymbols.Count() == 0 && point.y > lineBottom && point.y < lineTop)\n                return line.mLineBegSymbol;\n\n\n            int idx = 0;\n            for (auto& symb : line.mSymbols)\n            {\n                checkLeft = idx > 0;\n                checkRight = idx < (int)line.mSymbols.Count() - 1;\n\n                RectF sf(symb.mFrame.left, lineTop, symb.mFrame.right, lineBottom);\n\n                bool ls = checkLeft ? sf.left < point.x : true;\n                bool rs = checkRight ? sf.right > point.x : true;\n                bool ts = checkUp ? sf.top > point.y:true;\n                bool bs = checkDown ? sf.bottom < point.y : true;\n\n                if (ls && rs && ts && bs)\n                {\n                    if (point.x >(symb.mFrame.left + symb.mFrame.right)*0.5f)\n                        return line.mLineBegSymbol + idx + 1;\n                    else\n                        return line.mLineBegSymbol + idx;\n                }\n\n                idx++;\n            }\n\n            lineIdx++;\n        }\n\n        return 0;\n    }\n\n    void EditBox::UpdateCaretBlinking(float dt)\n    {\n        mCaretBlinkTime += dt;\n\n        float blinkAlpha = Math::Clamp01(1.0f - (mCaretBlinkTime - mCaretBlinkDelay*0.3f) / (mCaretBlinkDelay*0.3f));\n        mCaretDrawable->SetTransparency(blinkAlpha*mResTransparency);\n\n        if (mCaretBlinkTime > mCaretBlinkDelay)\n            mCaretBlinkTime -= mCaretBlinkDelay;\n    }\n\n    void EditBox::AddSelectionRect(const RectF& rect)\n    {\n        if (mSelectionMesh->GetMaxPolyCount() < mSelectionMesh->polyCount + 6)\n        {\n            int newPolyCount = mSelectionMesh->polyCount + 6;\n            mSelectionMesh->Resize(newPolyCount * 2, newPolyCount);\n        }\n\n        unsigned long color = mSelectionColor.ABGR();\n\n        Vertex* selVerts = mSelectionMesh->GetVertices<Vertex>();\n        selVerts[mSelectionMesh->vertexCount++] = Vertex(rect.LeftBottom(), color, 0.0f, 0.0f);\n        selVerts[mSelectionMesh->vertexCount++] = Vertex(rect.LeftTop(), color, 0.0f, 0.0f);\n        selVerts[mSelectionMesh->vertexCount++] = Vertex(rect.RightTop(), color, 0.0f, 0.0f);\n        selVerts[mSelectionMesh->vertexCount++] = Vertex(rect.RightBottom(), color, 0.0f, 0.0f);\n\n        VertexIndex* idx = mSelectionMesh->GetIndexes();\n        idx[mSelectionMesh->polyCount * 3] = mSelectionMesh->vertexCount - 4;\n        idx[mSelectionMesh->polyCount * 3 + 1] = mSelectionMesh->vertexCount - 3;\n        idx[mSelectionMesh->polyCount * 3 + 2] = mSelectionMesh->vertexCount - 2;\n        mSelectionMesh->polyCount++;\n\n        idx[mSelectionMesh->polyCount * 3] = mSelectionMesh->vertexCount - 4;\n        idx[mSelectionMesh->polyCount * 3 + 1] = mSelectionMesh->vertexCount - 2;\n        idx[mSelectionMesh->polyCount * 3 + 2] = mSelectionMesh->vertexCount - 1;\n        mSelectionMesh->polyCount++;\n    }\n\n    void EditBox::CheckScrollingToCaret()\n    {\n        auto font = mTextDrawable->GetFont();\n        if (!font)\n            return;\n\n        UpdateScrollParams();\n        UpdateSelectionAndCaret();\n\n        Vec2F caretPos = mCaretDrawable->GetPosition();\n        RectF clipRect = mAbsoluteViewArea;\n\n        float rightOffs = Math::Max(caretPos.x - clipRect.right + 5.0f, 0.0f);\n        float leftOffs = Math::Max(clipRect.left - caretPos.x + 5.0f, 0.0f);\n\n        float downOffs = Math::Max(caretPos.y - clipRect.top + font->GetHeightPx(mTextDrawable->GetFontHeight()), 0.0f);\n        float topOffs = Math::Max(clipRect.bottom - caretPos.y, 0.0f);\n\n        float horOffs = rightOffs - leftOffs;\n\n//         o2Debug.Log(String(\"caretPos: \") + (String)caretPos + \", clipRect: \" + (String)mAbsoluteViewArea + \n//                     \", horOffs: \" + (String)horOffs + \", scrollPos: \" + (String)mScrollPos);\n\n        if (!Math::Equals(horOffs, 0.0f))\n        {\n            if (mHorScrollBar)\n                mHorScrollBar->SetValue(mScrollPos.x + horOffs);\n            else\n            {\n                mScrollPos.x = Math::Clamp(mScrollPos.x + horOffs, mScrollRange.left, mScrollRange.right);\n                SetLayoutDirty();\n            }\n        }\n\n        if (mMultiLine)\n        {\n            float verOffs = topOffs - downOffs;\n\n            if (!Math::Equals(verOffs, 0.0f))\n            {\n                if (mVerScrollBar)\n                    mVerScrollBar->SetValue(mScrollPos.y + verOffs);\n                else\n                {\n                    mScrollPos.y = Math::Clamp(mScrollPos.y + verOffs, mScrollRange.bottom, mScrollRange.top);\n                    SetLayoutDirty();\n                }\n            }\n        }\n    }\n\n    void EditBox::JumpSelection(bool forward, bool selecting)\n    {\n        static char jumpSymbols[] = \" \\n()-=_+\\\\|/**&^%$#@!~,.?\";\n        int jumpSymbolsCount = (int)strlen(jumpSymbols);\n\n        int jumpIdx = mSelectionEnd + 1;\n\n        if (forward)\n        {\n            bool stop = false;\n            for (int i = mSelectionEnd; i < mText.Length() && !stop; i++)\n            {\n                jumpIdx = i;\n                for (int j = 0; j < jumpSymbolsCount; j++)\n                {\n                    if (mText[i] == jumpSymbols[j])\n                    {\n                        stop = true;\n                        break;\n                    }\n                }\n            }\n\n            if (!stop) jumpIdx++;\n        }\n        else\n        {\n            bool stop = false;\n            for (int i = Math::Min(mSelectionEnd - 1, mText.Length() - 1); i >= 0 && !stop; i--)\n            {\n                jumpIdx = i;\n                for (int j = 0; j < jumpSymbolsCount; j++)\n                {\n                    if (mText[i] == jumpSymbols[j])\n                    {\n                        jumpIdx++;\n                        stop = true;\n                        break;\n                    }\n                }\n            }\n\n            if (!stop) jumpIdx--;\n        }\n\n        if (jumpIdx == mSelectionEnd)\n        {\n            if (forward)\n                jumpIdx++;\n            else\n                jumpIdx--;\n        }\n\n        mSelectionEnd = Math::Clamp(jumpIdx, 0, mText.Length());\n        if (!selecting)\n            mSelectionBegin = mSelectionEnd;\n\n        mCaretBlinkTime = 0;\n\n        UpdateSelectionAndCaret();\n        CheckScrollingToCaret();\n    }\n\n    UInt16 GetUnicodeFromVirtualCode(KeyboardKey code)\n    {\n#ifdef PLATFORM_WINDOWS\n        HKL layout = GetKeyboardLayout(0);\n\n        BYTE allKeys[256];\n        GetKeyboardState(allKeys);\n\n        UInt16 unicode;\n        ToUnicodeEx(code, 0, allKeys, reinterpret_cast<wchar_t*>(&unicode), 1, 0, layout);\n\n        return unicode;\n        \n#elif defined PLATFORM_MAC\n        if (code < 0)\n            return 0;\n        \n        return (UInt16)code;\n\n#elif defined PLATFORM_LINUX\n        if (code < 0)\n            return 0;\n\n        return (UInt16)code;\n#endif\n        return 0;\n    }\n\n    void EditBox::CheckCharacterTyping(KeyboardKey key)\n    {\n        if (o2Input.IsKeyDown(VK_CONTROL))\n            return;\n\n        if (key == VK_ESCAPE)\n            return;\n\n        if (!mMultiLine && key == VK_RETURN)\n            return;\n\n        char16_t unicode = (char16_t)GetUnicodeFromVirtualCode(key);\n\n        if (unicode != 0 && unicode != 8)\n        {\n            const char16_t returnChar = 13;\n            const char16_t newlineChar = 10;\n            const char16_t tabChar = 9;\n            \n            if (unicode == returnChar) \n                unicode = newlineChar;\n\n            if (unicode == newlineChar && !mMultiLine)\n                return;\n\n            if (unicode == tabChar)\n                return;\n\n            if (mAvailableSymbols.Length() > 0)\n            {\n                bool found = false;\n                for (int i = 0; i < mAvailableSymbols.Length(); i++)\n                {\n                    if (mAvailableSymbols[i] == unicode)\n                    {\n                        found = true;\n                        break;\n                    }\n                }\n\n                if (!found)\n                    return;\n            }\n\n            if (mSelectionBegin != mSelectionEnd)\n            {\n                mText.Erase(Math::Min(mSelectionBegin, mSelectionEnd), Math::Max(mSelectionBegin, mSelectionEnd));\n                mSelectionEnd = Math::Min(mSelectionBegin, mSelectionEnd);\n                mSelectionBegin = mSelectionEnd;\n            }\n\n            mText.Insert(unicode, mSelectionEnd);\n            mSelectionBegin = mSelectionEnd = mSelectionEnd + 1;\n            mTextDrawable->SetText(mText);\n\n            mCaretBlinkTime = 0;\n\n            SetLayoutDirty();\n            CheckScrollingToCaret();\n\n            onChanged(mText);\n        }\n    }\n\n    void EditBox::CheckCharactersErasing(KeyboardKey key)\n    {\n        if (key == VK_BACK)\n        {\n            if (mSelectionEnd == mSelectionBegin)\n            {\n                if (mSelectionEnd > 0)\n                    mText.Erase(mSelectionEnd - 1, mSelectionEnd);\n            }\n            else\n            {\n                mText.Erase(Math::Min(mSelectionBegin, mSelectionEnd), Math::Max(mSelectionEnd, mSelectionBegin));\n            }\n\n            mTextDrawable->SetText(mText);\n            onChanged(mText);\n            SetLayoutDirty();\n\n            if (mSelectionEnd == mSelectionBegin)\n                MoveCaret(mSelectionEnd - 1, false);\n            else\n                MoveCaret(Math::Min(mSelectionEnd, mSelectionBegin), false);\n        }\n\n        if (key == VK_DELETE)\n        {\n            if (mSelectionEnd < mText.Length() + 1)\n            {\n                if (mSelectionEnd == mSelectionBegin)\n                    mText.Erase(mSelectionEnd, mSelectionBegin + 1);\n                else\n                    mText.Erase(Math::Min(mSelectionBegin, mSelectionEnd), Math::Max(mSelectionEnd, mSelectionBegin));\n\n                mTextDrawable->SetText(mText);\n                onChanged(mText);\n                SetLayoutDirty();\n\n                MoveCaret(Math::Min(mSelectionEnd, mSelectionBegin), false);\n            }\n        }\n    }\n\n    void EditBox::CheckCaretMoving(KeyboardKey key)\n    {\n        bool selecting = o2Input.IsKeyDown(VK_SHIFT);\n        bool control = o2Input.IsKeyDown(VK_CONTROL);\n\n        if (key == VK_LEFT)\n        {\n            if (control) JumpSelection(false, selecting);\n            else MoveCaret(mSelectionEnd - 1, selecting);\n        }\n\n        if (key == VK_RIGHT)\n        {\n            if (control)\n                JumpSelection(true, selecting);\n            else\n                MoveCaret(mSelectionEnd + 1, selecting);\n        }\n\n        if (key == 'A' && control)\n            SelectAll();\n\n        if (key == VK_UP)\n            MoveCaret(GetTextCaretPosition(GetTextCaretPosition(mSelectionEnd) +\n                      Vec2F(0.0f, mTextDrawable->GetFont()->GetLineHeightPx(mTextDrawable->GetFontHeight())*1.5f)), selecting);\n\n        if (key == VK_DOWN)\n            MoveCaret(GetTextCaretPosition(GetTextCaretPosition(mSelectionEnd) -\n                      Vec2F(0.0f, mTextDrawable->GetFont()->GetLineHeightPx(mTextDrawable->GetFontHeight())*0.5f)), selecting);\n\n        if (key == VK_END)\n        {\n            int endLineSymbol = mSelectionEnd;\n            for (int i = mSelectionEnd; i < mText.Length(); i++)\n            {\n                endLineSymbol = i + 1;\n                if (mText[i] == '\\n')\n                {\n                    endLineSymbol--;\n                    break;\n                }\n            }\n\n            MoveCaret(endLineSymbol, selecting);\n        }\n\n        if (key == VK_HOME)\n        {\n            int endLineSymbol = mSelectionEnd;\n            for (int i = mSelectionEnd - 1; i >= 0; i--)\n            {\n                endLineSymbol = i;\n                if (mText[i] == '\\n')\n                {\n                    endLineSymbol++;\n                    break;\n                }\n            }\n\n            MoveCaret(endLineSymbol, selecting);\n        }\n    }\n\n    void EditBox::CheckClipboard(KeyboardKey key)\n    {\n        if (!o2Input.IsKeyDown(VK_CONTROL))\n            return;\n\n        if (key == 'C')\n            Clipboard::SetText(mText.SubStr(Math::Min(mSelectionBegin, mSelectionEnd),\n                               Math::Max(mSelectionBegin, mSelectionEnd)));\n\n        if (key == 'X')\n        {\n            Clipboard::SetText(mText.SubStr(Math::Min(mSelectionBegin, mSelectionEnd),\n                               Math::Max(mSelectionBegin, mSelectionEnd)));\n\n            if (mSelectionBegin != mSelectionEnd)\n            {\n                mText.Erase(Math::Min(mSelectionBegin, mSelectionEnd), Math::Max(mSelectionBegin, mSelectionEnd));\n                mSelectionBegin = mSelectionEnd = Math::Min(mSelectionBegin, mSelectionEnd);\n            }\n\n            mTextDrawable->SetText(mText);\n            onChanged(mText);\n            SetLayoutDirty();\n            CheckScrollingToCaret();\n        }\n\n        if (key == 'V')\n        {\n            WString clipboard = Clipboard::GetText();\n\n            if (mSelectionBegin != mSelectionEnd)\n                mText.Erase(Math::Min(mSelectionBegin, mSelectionEnd), Math::Max(mSelectionBegin, mSelectionEnd));\n\n            mSelectionEnd = Math::Min(mSelectionBegin, mSelectionEnd);\n            mSelectionBegin = mSelectionEnd;\n\n            mText.Insert(clipboard, mSelectionEnd);\n\n            mSelectionBegin = mSelectionEnd = mSelectionEnd + clipboard.Length();\n\n            mTextDrawable->SetText(mText);\n            onChanged(mText);\n            SetLayoutDirty();\n            CheckScrollingToCaret();\n        }\n    }\n\n    void EditBox::MoveCaret(int newPosition, bool selecting)\n    {\n        mSelectionEnd = Math::Clamp(newPosition, 0, mText.Length());\n        if (!selecting)\n            mSelectionBegin = mSelectionEnd;\n\n        UpdateSelectionAndCaret();\n        CheckScrollingToCaret();\n        mCaretBlinkTime = 0;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::EditBox>);\n// --- META ---\n\nDECLARE_CLASS(o2::EditBox, o2__EditBox);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/EditBox.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Render/Mesh.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n\nnamespace o2\n{\n    // --------------------\n    // Text edit box widget\n    // --------------------\n    class EditBox: public ScrollArea, public KeyboardEventsListener\n    {\n    public:\n        PROPERTIES(EditBox);\n        PROPERTY(WString, text, SetText, GetText);                  // Text property\n        PROPERTY(int, caret, SetCaretPosition, GetCaretPosition); // Caret position property\n\n        PROPERTY(int, selectionBegin, SetSelectionBegin, GetSelectionBegin); // Selection begin index property\n        PROPERTY(int, selectionEnd, SetSelectionEnd, GetSelectionEnd);         // Selection end index property\n\n    public:\n        Function<void(const WString&)> onChanged;         // Text changed event\n        Function<void(const WString&)> onChangeCompleted; // Text changing completed event\n\n    public:\n        // Default constructor\n        explicit EditBox(RefCounter* refCounter);\n\n        // Copy-constructor\n        EditBox(RefCounter* refCounter, const EditBox& other);\n\n        // Destructor\n        ~EditBox();\n\n        // Copy-operator\n        EditBox& operator=(const EditBox& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Updates widget\n        void Update(float dt) override;\n\n        // Sets text\n        void SetText(const WString& text);\n\n        // returns text\n        WString GetText() const;\n\n        // Sets caret position\n        void SetCaretPosition(int caretPosition);\n\n        // Returns caret position\n        int GetCaretPosition();\n\n        // Sets selection begin and end indexes\n        void Select(int begin, int end);\n\n        // Sets selection begin position\n        void SetSelectionBegin(int position);\n\n        // Returns selection begin position\n        int GetSelectionBegin() const;\n\n        // Sets selection end position\n        void SetSelectionEnd(int position);\n\n        // Returns selection end position\n        int GetSelectionEnd() const;\n\n        // Resets selection\n        void Deselect();\n\n        // Selects all text\n        void SelectAll();\n\n        // Returns text drawable\n        const Ref<Text>& GetTextDrawable();\n\n        // Returns caret drawable\n        const Ref<Sprite>& GetCaretDrawable();\n\n        // Sets selection color\n        void SetSelectionColor(const Color4& color);\n\n        // Returns selection color\n        Color4 GetSelectionColor() const;\n\n        // Sets filter characters for integer numbers\n        void SetFilterInteger();\n\n        // Sets filter characters for decimal numbers\n        void SetFilterFloat();\n\n        //Sets filter characters for names\n        void SetFilterNames();\n\n        // Sets available characters\n        void SetAvailableSymbols(const WString& availableSymbols);\n\n        // Returns available characters\n        WString GetAvailableSymbols() const;\n\n        // Sets max sizes of line and lines count\n        void SetMaxSizes(int maxLineCharactersCount, int maxLinesCount);\n\n        // Sets maximum characters in line\n        void SetMaxLineCharactersCount(int count);\n\n        // Returns maximum characters in line\n        int GetMaxLineCharactersCount() const;\n\n        // Sets maximum lines count\n        void SetMaxLinesCount(int count);\n\n        // Returns maximum lines count\n        int GetMaxLinesCount() const;\n\n        // Sets text multiline\n        void SetMultiLine(bool multiline);\n\n        // Returns is text multiline\n        bool IsMultiLine() const;\n\n        // Sets word wrapping\n        void SetWordWrap(bool wordWrap);\n\n        // returns is word wrapping\n        bool IsWordWrap() const;\n\n        // Sets caret blinking delay in seconds\n        void SetCaretBlinkingDelay(float delay);\n\n        // Returns caret blinking delay in seconds\n        float GetCaretBlinkingDelay() const;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns is this widget can be selected\n        bool IsFocusable() const override;\n\n        // Returns true if point is under drawable\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns true when input events can be handled by down listeners, always returns false\n        bool IsInputTransparent() const override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(EditBox);\n        CLONEABLE_REF(EditBox);\n\n    protected:\n        Color4  mSelectionColor = Color4(0.1f, 0.2f, 0.6f, 0.3f); // Text selection color @SERIALIZABLE\n\n        WString mLastText;         // Last text\n        WString mText;             // Current text @SERIALIZABLE\n        WString mAvailableSymbols; // Available symbols @SERIALIZABLE\n\n        Ref<Text>   mTextDrawable;  // Text drawable @SERIALIZABLE\n        Ref<Mesh>   mSelectionMesh; // Selection mesh\n        Ref<Sprite> mCaretDrawable; // Caret drawable @SERIALIZABLE\n\n        float mCaretBlinkDelay = 1.0f; // Caret blinking delay @SERIALIZABLE\n        float mCaretBlinkTime = 0.0f;  // Caret blinking timer\n\n        int  mSelectionBegin = 0;       // Selection begin index\n        int  mSelectionEnd = 0;            // Selection end index\n        bool mSelectingByWords = false; // Selection works by solid words\n        int  mSelWordBegin = 0;         // Selection by words begin index\n        int  mSelWordEnd = 0;           // Selection by words end index\n\n        bool mMultiLine = true;          // True if text is multiline @SERIALIZABLE\n        bool mWordWrap = false;          // True if text words wrapping @SERIALIZABLE\n        int  mMaxLineChars = INT_MAX;  // Count of maximum characters in line @SERIALIZABLE\n        int  mMaxLinesCount = INT_MAX; // Count of maximum lines count @SERIALIZABLE\n\n        bool  mJustFocused = false;   // Is edit box selected at current frame\n        float mLastClickTime = -1.0f; // Time of last clicking\n        Vec2F mLastCursorPos;         // Last pressed cursor position\n\n    protected:\n        // Updates transparency for this and children widgets\n        void UpdateTransparency() override;\n\n        // Updates layers layouts, calls after updating widget layout\n        void UpdateLayersLayouts() override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Called when widget was selected\n        void OnFocused() override;\n\n        // Called when widget was deselected\n        void OnUnfocused() override;\n\n        // Updates scroll parameters: clip area, scroll size\n        void UpdateScrollParams() override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor released outside this(only when cursor pressed this at previous time)\n        void OnCursorReleasedOutside(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was pressed on this\n        void OnCursorRightMousePressed(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button stay down on this\n        void OnCursorRightMouseStayDown(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when key was released\n        void OnKeyReleased(const Input::Key& key) override;\n\n        // Called when key stay down during frame\n        void OnKeyStayDown(const Input::Key& key) override;\n\n        // Returns text filtered by available characters set\n        WString GetFilteredText(const WString& text);\n\n        // Checks text for maximal characters in line and lines count\n        void CheckCharactersAndLinesBounds();\n\n        // Updates selection mesh and fixing selection bounds\n        void UpdateSelectionAndCaret();\n\n        // Returns coordinates of caret position by caret text position\n        Vec2F GetTextCaretPosition(int position);\n\n        //Returns of caret text position caret position by caret coordinates\n        int GetTextCaretPosition(const Vec2F& point);\n\n        // Updates cursor blinking\n        void UpdateCaretBlinking(float dt);\n\n        // Adds rectangle geometry to selection mesh\n        void AddSelectionRect(const RectF& rect);\n\n        // Checks scroll to cursor\n        void CheckScrollingToCaret();\n\n        // Jump selection over word\n        void JumpSelection(bool forward, bool selecting);\n\n        // Checks character typing by keyboard key\n        void CheckCharacterTyping(KeyboardKey key);\n\n        // Check for erasing commands\n        void CheckCharactersErasing(KeyboardKey key);\n\n        // Checks caret moving commands\n        void CheckCaretMoving(KeyboardKey key);\n\n        // Checks clipboard commands (copy cut paste)\n        void CheckClipboard(KeyboardKey key);\n\n        // Moves mSelectionEnd position and mSelectionBegin, when selecting\n        void MoveCaret(int newPosition, bool selecting);\n        \n        REF_COUNTERABLE_IMPL(ScrollArea);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::EditBox)\n{\n    BASE_CLASS(o2::ScrollArea);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::EditBox)\n{\n    FIELD().PUBLIC().NAME(text);\n    FIELD().PUBLIC().NAME(caret);\n    FIELD().PUBLIC().NAME(selectionBegin);\n    FIELD().PUBLIC().NAME(selectionEnd);\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PUBLIC().NAME(onChangeCompleted);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Color4(0.1f, 0.2f, 0.6f, 0.3f)).NAME(mSelectionColor);\n    FIELD().PROTECTED().NAME(mLastText);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mText);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mAvailableSymbols);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mTextDrawable);\n    FIELD().PROTECTED().NAME(mSelectionMesh);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mCaretDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mCaretBlinkDelay);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mCaretBlinkTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mSelectionBegin);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mSelectionEnd);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mSelectingByWords);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mSelWordBegin);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mSelWordEnd);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mMultiLine);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mWordWrap);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(INT_MAX).NAME(mMaxLineChars);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(INT_MAX).NAME(mMaxLinesCount);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mJustFocused);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1.0f).NAME(mLastClickTime);\n    FIELD().PROTECTED().NAME(mLastCursorPos);\n}\nEND_META;\nCLASS_METHODS_META(o2::EditBox)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const EditBox&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetText, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetText);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaretPosition, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetCaretPosition);\n    FUNCTION().PUBLIC().SIGNATURE(void, Select, int, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionBegin, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetSelectionBegin);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionEnd, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetSelectionEnd);\n    FUNCTION().PUBLIC().SIGNATURE(void, Deselect);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectAll);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Text>&, GetTextDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetCaretDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetSelectionColor);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFilterInteger);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFilterFloat);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFilterNames);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAvailableSymbols, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetAvailableSymbols);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxSizes, int, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxLineCharactersCount, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetMaxLineCharactersCount);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxLinesCount, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetMaxLinesCount);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMultiLine, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsMultiLine);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWordWrap, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsWordWrap);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaretBlinkingDelay, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetCaretBlinkingDelay);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFocusable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTransparency);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUnfocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateScrollParams);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleasedOutside, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMousePressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseStayDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyStayDown, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(WString, GetFilteredText, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckCharactersAndLinesBounds);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateSelectionAndCaret);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, GetTextCaretPosition, int);\n    FUNCTION().PROTECTED().SIGNATURE(int, GetTextCaretPosition, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateCaretBlinking, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddSelectionRect, const RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckScrollingToCaret);\n    FUNCTION().PROTECTED().SIGNATURE(void, JumpSelection, bool, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckCharacterTyping, KeyboardKey);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckCharactersErasing, KeyboardKey);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckCaretMoving, KeyboardKey);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckClipboard, KeyboardKey);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveCaret, int, bool);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/EditBoxDropDown.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"EditBoxDropDown.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n\nnamespace o2\n{\n    EditBoxDropDown::EditBoxDropDown(RefCounter* refCounter):\n        Widget(refCounter), DrawableCursorEventsListener(this)\n    {\n        mEditBox = mmake<EditBox>();\n        mEditBox->SetInternalParent(Ref(this), false);\n        mEditBox->SetMultiLine(false);\n\n        mItemsList = mmake<List>();\n        mItemsList->SetInternalParent(Ref(this), false);\n        mItemsList->SetMultiselectionAvailable(false);\n        mItemsList->Hide(true);\n\n        SetupCallbacks();\n    }\n\n    EditBoxDropDown::EditBoxDropDown(RefCounter* refCounter, const EditBoxDropDown& other):\n        Widget(refCounter, other), DrawableCursorEventsListener(this),\n        mMaxListItems(other.mMaxListItems)\n    {\n        mEditBox = FindInternalWidgetByType<EditBox>();\n        \n        mItemsList = FindInternalWidgetByType<List>();\n        mItemsList->Hide(true);\n        mItemsList->SetMultiselectionAvailable(false);\n\n        mOriginalItems = other.mOriginalItems;\n\n        SetupCallbacks();\n        RetargetStatesAnimations();\n    }\n\n    EditBoxDropDown::~EditBoxDropDown()\n    {}\n\n    EditBoxDropDown& EditBoxDropDown::operator=(const EditBoxDropDown& other)\n    {\n        Widget::operator=(other);\n\n        mEditBox = FindInternalWidgetByType<EditBox>();\n\n        mItemsList = FindInternalWidgetByType<List>();\n        mItemsList->Hide(true);\n        mItemsList->SetMultiselectionAvailable(false);\n\n        mMaxListItems = other.mMaxListItems;\n        mOriginalItems = other.mOriginalItems;\n\n        SetupCallbacks();\n        RetargetStatesAnimations();\n\n        return *this;\n    }\n\n    void EditBoxDropDown::SetupCallbacks()\n    {\n        mEditBox->onChanged += [&](auto text) { OnEditBoxTextChanged(text); };\n        mEditBox->onChangeCompleted += [&](auto text) { OnEditBoxTextCompleted(text); };\n        mEditBox->onFocused += [&]() { OnEditBoxFocused(); };\n        mEditBox->onUnfocused += [&]() { OnEditBoxUnfocused(); };\n        \n        mItemsList->onSelectedText += [&](const WString& text) { OnSelectedText(text); };\n    }\n    \n    void EditBoxDropDown::Draw()\n\t{\n\t\tPROFILE_SAMPLE_FUNC();\n\n\t\tif (!mResEnabledInHierarchy)\n\t\t\treturn;\n\n\t\tWidget::Draw();\n\n\t\to2UI.DrawWidgetAtTop(mItemsList);\n\t}\n\n    void EditBoxDropDown::SetText(const WString& text)\n    {\n        mEditBox->SetText(text);\n        \n        if (IsExpanded())\n            FilterItems();\n    }\n\n    WString EditBoxDropDown::GetText() const\n    {\n        return mEditBox->GetText();\n    }\n\n    void EditBoxDropDown::Expand()\n    {\n\t\tonExpand();\n\n\t\tmItemsList->RemoveAllItems();\n\t\tmItemsList->AddItems(mOriginalItems);\n\n        auto openedState = state[\"opened\"];\n        if (openedState)\n            *openedState = true;\n\n\t\tmItemsList->SetEnabled(true);\n\t\t\n\t\tUpdateListSize();\n        SetLayoutDirty();\n    }\n\n    void EditBoxDropDown::UpdateListSize()\n    {\n        float itemHeight = mItemsList->GetItemSample()->layout->minHeight;\n        int itemsVisible = Math::Min(mMaxListItems, mItemsList->GetItemsCount());\n        float itemsHeight = itemHeight * (float)itemsVisible; \n\n        mItemsList->layout->minHeight = itemsHeight;\n        mItemsList->layout->height = itemsHeight;\n\t\t\n\t\tmItemsList->UpdateSelfTransform();\n\t\tmItemsList->UpdateChildrenTransforms();\n    }\n\n    void EditBoxDropDown::Collapse()\n    {\n        auto openedState = state[\"opened\"];\n        if (openedState)\n            *openedState = false;\n\n        mItemsList->SetEnabled(false);\n    }\n\n    bool EditBoxDropDown::IsExpanded() const\n    {\n        return mItemsList->IsEnabled();\n    }\n\n    int EditBoxDropDown::AddItem(const WString& text)\n    {\n        mItemsList->AddItem(text);\n        mOriginalItems.Add(text);\n        return GetItemsCount() - 1;\n    }\n\n    int EditBoxDropDown::AddItem(const WString& text, int position)\n    {\n        mItemsList->AddItem(text, position);        \n        mOriginalItems.Insert(text, position);\n            \n        return position;\n    }\n\n    void EditBoxDropDown::AddItems(const Vector<WString>& data)\n    {\n        for (auto& text : data)\n            AddItem(text);\n    }\n\n    void EditBoxDropDown::RemoveItem(int position)\n    {\n        if (position >= 0 && position < GetItemsCount())\n        {\n            WString text = GetItemText(position);\n            mItemsList->RemoveItem(text);\n            \n            if (position < mOriginalItems.Count())\n                mOriginalItems.RemoveAt(position);\n        }\n    }\n\n    void EditBoxDropDown::RemoveItem(const WString& text)\n    {\n        int position = FindItem(text);\n        if (position >= 0)\n            RemoveItem(position);\n    }\n\n    int EditBoxDropDown::FindItem(const WString& text)\n    {\n        for (int i = 0; i < mItemsList->GetItemsCount(); i++)\n        {\n            auto item = DynamicCast<Label>(GetItem(i));\n            if (item && item->GetText() == text)\n                return i;\n        }\n\n        return -1;\n    }\n\n    WString EditBoxDropDown::GetItemText(int position) const\n    {\n        if (position >= 0 && position < mItemsList->GetItemsCount())\n        {\n            auto item = DynamicCast<Label>(GetItem(position));\n            if (item)\n                return item->GetText();\n        }\n        return WString();\n    }\n\n    Vector<WString> EditBoxDropDown::GetAllItemsText() const\n    {\n        Vector<WString> res;\n        for (int i = 0; i < mItemsList->GetItemsCount(); i++)\n        {\n            auto item = DynamicCast<Label>(GetItem(i));\n            if (item)\n                res.Add(item->GetText());\n        }\n        return res;\n    }\n\n    Ref<Widget> EditBoxDropDown::GetItem(int position) const\n    {\n        return mItemsList->GetItemsCount() > position ? mItemsList->GetItem(position) : nullptr;\n    }\n\n    void EditBoxDropDown::RemoveAllItems()\n    {\n        mItemsList->RemoveAllItems();\n        mOriginalItems.Clear();\n    }\n\n    int EditBoxDropDown::GetItemsCount() const\n    {\n        return mItemsList->GetItemsCount();\n    }\n\n    void EditBoxDropDown::SelectItemAt(int position)\n    {\n        mItemsList->SelectItemAt(position);\n    }\n\n    void EditBoxDropDown::SelectItemText(const WString& text)\n    {\n        int idx = FindItem(text);\n        if (idx >= 0)\n            mItemsList->SelectItemAt(idx);\n    }\n\n    int EditBoxDropDown::GetSelectedItemPosition() const\n    {\n        return mItemsList->GetSelectedItemPos();\n    }\n\n    WString EditBoxDropDown::GetSelectedItemText() const\n    {\n        auto selectedItem = DynamicCast<Label>(mItemsList->GetSelectedItem());\n        if (selectedItem)\n            return selectedItem->GetText();\n\n        return WString();\n    }\n\n    const Ref<EditBox>& EditBoxDropDown::GetEditBox() const\n    {\n        return mEditBox;\n    }\n\n    const Ref<List>& EditBoxDropDown::GetListView() const\n    {\n        return mItemsList;\n    }\n\n    void EditBoxDropDown::SetMaxListSizeInItems(int itemsCount)\n    {\n        mMaxListItems = itemsCount;\n    }\n\n    void EditBoxDropDown::MoveAndCheckClipping(const Vec2F& delta, const RectF& clipArea)\n    {\n\t\tWidget::MoveAndCheckClipping(delta, clipArea);\n\n        if (IsExpanded())\n            Collapse();\n    }\n\n    void EditBoxDropDown::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n        if (!mItemsList->layout->IsPointInside(o2Input.GetCursorPos()) && IsExpanded())\n            Collapse();\n    }\n\n    void EditBoxDropDown::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        interactable = true;\n    }\n\n    void EditBoxDropDown::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        interactable = false;\n    }\n\n    void EditBoxDropDown::UpdateSelfTransform()\n    {\n        layout->Update();\n    }\n\n    String EditBoxDropDown::GetCreateMenuGroup()\n    {\n        return \"Dropping\";\n    }\n\n    void EditBoxDropDown::FilterItems()\n    {\n        if (mIsFiltering || mIsKeyboardNavigating)\n            return;\n\n        mIsFiltering = true;\n\n        WString filterTextLower = mEditBox->GetText().ToLowerCase();\n        mItemsList->RemoveAllItems();\n\n        if (filterTextLower.IsEmpty())\n        {\n            mItemsList->AddItems(mOriginalItems);\n        }\n        else\n        {\n            for (const auto& itemText : mOriginalItems)\n            {\n                if (itemText.ToLowerCase().Contains(filterTextLower))\n                    mItemsList->AddItem(itemText);\n            }\n        }\n        \n        UpdateListSize();\n\n        mIsFiltering = false;\n    }\n\n    void EditBoxDropDown::OnEditBoxTextChanged(const WString& text)\n    {\n        if (IsExpanded())\n            FilterItems();\n\n        onChanged(text);\n    }\n\n    void EditBoxDropDown::OnEditBoxTextCompleted(const WString& text)\n\t{\n\t\tCollapse();\n        onChangeCompleted(text);\n    }\n\n    void EditBoxDropDown::OnSelectedText(const WString& text)\n\t{\n        if (!mIsKeyboardNavigating)\n\t\t    Collapse();\n\n        mEditBox->SetText(text);\n\t\tonSelectedText(text);\n\n\t\tif (!mIsKeyboardNavigating)\n\t\t    onChangeCompleted(text);\n    }\n\n    void EditBoxDropDown::OnSelectionChanged()\n    {}\n\n    void EditBoxDropDown::OnEditBoxFocused()\n    {\n        if (!IsExpanded())\n            Expand();\n    }\n\n    void EditBoxDropDown::OnEditBoxUnfocused()\n    {\n        if (!mItemsList->IsUnderPoint(o2Input.GetCursorPos()))\n            Collapse();\n    }\n\n    void EditBoxDropDown::OnKeyPressed(const Input::Key& key)\n    {\n        if (!IsExpanded())\n            return;\n\n        if (key.keyCode == VK_DOWN)\n            NavigateNext();\n        else if (key.keyCode == VK_UP)\n            NavigatePrevious();\n    }\n\n    void EditBoxDropDown::NavigateNext()\n    {\n        int currentPos = GetSelectedItemPosition();\n        int itemsCount = GetItemsCount();\n        \n        if (itemsCount <= 0)\n            return;\n        \n        int nextPos = currentPos < 0 ? 0 : (currentPos + 1) % itemsCount;\n\n        mIsKeyboardNavigating = true;\n        SelectItemAt(nextPos);\n\t\tmIsKeyboardNavigating = false;\n    }\n\n    void EditBoxDropDown::NavigatePrevious()\n    {\n        int currentPos = GetSelectedItemPosition();\n        int itemsCount = GetItemsCount();\n        \n        if (itemsCount <= 0)\n            return;\n        \n        int prevPos = currentPos < 0 ? itemsCount - 1 : (currentPos - 1 + itemsCount) % itemsCount;\n\n\t\tmIsKeyboardNavigating = true;\n        SelectItemAt(prevPos);\n\t\tmIsKeyboardNavigating = false;\n    }\n\n    void EditBoxDropDown::SetItemSample(const Ref<Widget>& sample)\n    {\n        mItemsList->SetItemSample(sample);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::EditBoxDropDown>);\n// --- META ---\n\nDECLARE_CLASS(o2::EditBoxDropDown, o2__EditBoxDropDown);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/EditBoxDropDown.h",
    "content": "#pragma once\n\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/Widgets/List.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n\nnamespace o2\n{\n    // -----------------------------------------\n    // Edit box with dropdown list of suggestions\n    // -----------------------------------------\n    class EditBoxDropDown: public Widget, public DrawableCursorEventsListener, public KeyboardEventsListener\n    {\n    public:\n        PROPERTIES(EditBoxDropDown);\n        PROPERTY(WString, text, SetText, GetText);                             // Edit box text property\n        PROPERTY(int, selectedItemPos, SelectItemAt, GetSelectedItemPosition); // Selected item position property\n        GETTER(int, itemsCount, GetItemsCount);                                // Items count getter\n\n    public:\n        Function<void(const WString&)> onChanged;         // Called when text is edited\n        Function<void(const WString&)> onChangeCompleted; // Called when text changing is completed\n\n        Function<void()> onExpand; // Called before opening dropdown\n\n        Function<void(const WString&)> onSelectedText; // Select text event\n\n    public:\n        // Default constructor\n        explicit EditBoxDropDown(RefCounter* refCounter);\n\n        // Copy-constructor\n        EditBoxDropDown(RefCounter* refCounter, const EditBoxDropDown& other);\n\n        // Destructor\n        ~EditBoxDropDown();\n\n        // Copy operator\n        EditBoxDropDown& operator=(const EditBoxDropDown& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Sets text in the edit box\n        void SetText(const WString& text);\n\n        // Returns text from the edit box\n        WString GetText() const;\n\n        // Expand list\n        void Expand();\n\n        // Collapse list\n        void Collapse();\n\n        // Returns is list expanded\n        bool IsExpanded() const;\n\n        // Adds new text item and returns position\n        int AddItem(const WString& text);\n\n        // Add new text item at position and returns this position\n        int AddItem(const WString& text, int position);\n\n        // Adds array of text items\n        void AddItems(const Vector<WString>& data);\n\n        // Removes item by text\n        void RemoveItem(const WString& text);\n\n        // Removes item at position\n        void RemoveItem(int position);\n\n        // Returns position of item by text. Returns -1 if can't find item\n        int FindItem(const WString& text);\n\n        // Returns item text by position\n        WString GetItemText(int position) const;\n\n        // Returns array of all text items\n        Vector<WString> GetAllItemsText() const;\n\n        // Returns items count\n        int GetItemsCount() const;\n        \n        // Removes all items\n        void RemoveAllItems();\n\n        // Selects item at position\n        void SelectItemAt(int position);\n\n        // Selects item by text\n        void SelectItemText(const WString& text);\n\n        // Returns selected item position\n        int GetSelectedItemPosition() const;\n\n        // Returns current selected text item\n        WString GetSelectedItemText() const;\n\n        // Returns edit box\n        const Ref<EditBox>& GetEditBox() const;\n\n        // Sets list view size by items size\n        void SetMaxListSizeInItems(int itemsCount);\n        \n        // Returns list view\n        const Ref<List>& GetListView() const;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(EditBoxDropDown);\n        CLONEABLE_REF(EditBoxDropDown);\n\n    protected:\n        Ref<EditBox> mEditBox;   // Edit box for text input\n        Ref<List>    mItemsList; // List view for dropdown items\n\n        int mMaxListItems = 10; // Maximum visible items in list @SERIALIZABLE\n\n        bool mIsFiltering = false;          // Whether we're currently filtering items\n        bool mIsKeyboardNavigating = false; // Whether we're navigating with keyboard @SERIALIZABLE\n\n        Vector<WString> mOriginalItems; // Original list of items for filtering\n\n    protected:\n        // Returns item by position\n        Ref<Widget> GetItem(int position) const;\n\n        // Sets item sample widget\n        void SetItemSample(const Ref<Widget>& sample);\n        \n        // Setup callbacks for edit box and list\n        void SetupCallbacks();\n\n        // Updates the list size based on items count\n        void UpdateListSize();\n\n        // Moves widget's to delta and checks for clipping\n        void MoveAndCheckClipping(const Vec2F& delta, const RectF& clipArea) override;\n\n\t\t// Called when cursor released outside this(only when cursor pressed this at previous time)\n\t\tvoid OnCursorReleasedOutside(const Input::Cursor& cursor) override;\n\n\t\t// Called when key was pressed when widget is focused\n\t\tvoid OnKeyPressed(const Input::Key& key) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Filter items in dropdown list based on current text\n        void FilterItems();\n\n        // Navigate to the next item in the list\n        void NavigateNext();\n\n        // Navigate to the previous item in the list\n        void NavigatePrevious();\n\n        // Callback when edit box text changes\n        void OnEditBoxTextChanged(const WString& text);\n\n        // Callback when edit box is completed editing\n        void OnEditBoxTextCompleted(const WString& text);\n        \n        // Called when item text was selected in list\n        void OnSelectedText(const WString& text);\n\n        // Called when selection was changed\n        virtual void OnSelectionChanged();\n\n        // Called when edit box gets focus\n        void OnEditBoxFocused();\n\n        // Called when edit box loses focus\n        void OnEditBoxUnfocused();\n\n        REF_COUNTERABLE_IMPL(Widget);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::EditBoxDropDown)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::DrawableCursorEventsListener);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::EditBoxDropDown)\n{\n    FIELD().PUBLIC().NAME(text);\n    FIELD().PUBLIC().NAME(selectedItemPos);\n    FIELD().PUBLIC().NAME(itemsCount);\n    FIELD().PUBLIC().NAME(onChanged);\n    FIELD().PUBLIC().NAME(onChangeCompleted);\n    FIELD().PUBLIC().NAME(onExpand);\n    FIELD().PUBLIC().NAME(onSelectedText);\n    FIELD().PROTECTED().NAME(mEditBox);\n    FIELD().PROTECTED().NAME(mItemsList);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(10).NAME(mMaxListItems);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsFiltering);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mIsKeyboardNavigating);\n    FIELD().PROTECTED().NAME(mOriginalItems);\n}\nEND_META;\nCLASS_METHODS_META(o2::EditBoxDropDown)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const EditBoxDropDown&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetText, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetText);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddItem, const WString&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddItems, const Vector<WString>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetItemText, int);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<WString>, GetAllItemsText);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetItemsCount);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllItems);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectItemAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectItemText, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetSelectedItemPosition);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetSelectedItemText);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<EditBox>&, GetEditBox);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxListSizeInItems, int);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<List>&, GetListView);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Widget>, GetItem, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetItemSample, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetupCallbacks);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateListSize);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveAndCheckClipping, const Vec2F&, const RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleasedOutside, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, FilterItems);\n    FUNCTION().PROTECTED().SIGNATURE(void, NavigateNext);\n    FUNCTION().PROTECTED().SIGNATURE(void, NavigatePrevious);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditBoxTextChanged, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditBoxTextCompleted, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectedText, const WString&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectionChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditBoxFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEditBoxUnfocused);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/GridLayout.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"GridLayout.h\"\n\n#include \"o2/Scene/UI/WidgetLayout.h\"\n\nnamespace o2\n{\n    GridLayout::GridLayout(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        SetLayoutDirty();\n    }\n\n    GridLayout::GridLayout(RefCounter* refCounter, const GridLayout& other):\n        Widget(refCounter, other), mBaseCorner(other.mBaseCorner), mSpacing(other.mSpacing), mBorder(other.mBorder),\n        mFitByChildren(other.mFitByChildren), mCellSize(other.mCellSize), mArrangeAxis(other.mArrangeAxis),\n        mArrangeAxisMaxCells(other.mArrangeAxisMaxCells)\n    {\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    GridLayout::~GridLayout()\n    {}\n\n    GridLayout& GridLayout::operator=(const GridLayout& other)\n    {\n        mBaseCorner = other.mBaseCorner;\n        mSpacing = other.mSpacing;\n        mBorder = other.mBorder;\n        mCellSize = other.mCellSize;\n        mArrangeAxis = other.mArrangeAxis;\n        mArrangeAxisMaxCells = other.mArrangeAxisMaxCells;\n\n        Widget::operator=(other);\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void GridLayout::SetBaseCorner(BaseCorner baseCorner)\n    {\n        mBaseCorner = baseCorner;\n        layout->SetDirty();\n    }\n\n    BaseCorner GridLayout::GetBaseCorner() const\n    {\n        return mBaseCorner;\n    }\n\n    void GridLayout::SetSpacing(float spacing)\n    {\n        mSpacing = spacing;\n        layout->SetDirty();\n    }\n\n    float GridLayout::GetSpacing() const\n    {\n        return mSpacing;\n    }\n\n    void GridLayout::SetBorder(const RectF& border)\n    {\n        mBorder = border;\n        layout->SetDirty();\n    }\n\n    RectF GridLayout::GetBorder() const\n    {\n        return mBorder;\n    }\n\n    void GridLayout::SetBorderLeft(float value)\n    {\n        mBorder.left = value;\n        layout->SetDirty();\n    }\n\n    float GridLayout::GetBorderLeft() const\n    {\n        return mBorder.left;\n    }\n\n    void GridLayout::SetBorderRight(float value)\n    {\n        mBorder.right = value;\n        layout->SetDirty();\n    }\n\n    float GridLayout::GetBorderRight() const\n    {\n        return mBorder.right;\n    }\n\n    void GridLayout::SetBorderTop(float value)\n    {\n        mBorder.top = value;\n        layout->SetDirty();\n    }\n\n    float GridLayout::GetBorderTop() const\n    {\n        return mBorder.top;\n    }\n\n    void GridLayout::SetBorderBottom(float value)\n    {\n        mBorder.bottom = value;\n        layout->SetDirty();\n    }\n\n    float GridLayout::GetBorderBottom() const\n    {\n        return mBorder.bottom;\n    }\n\n    void GridLayout::SetCellSize(const Vec2F& size)\n    {\n        mCellSize = size;\n        SetLayoutDirty();\n    }\n\n    Vec2F GridLayout::GetCellSize() const\n    {\n        return mCellSize;\n    }\n\n    void GridLayout::SetArrangeAxis(TwoDirection type)\n    {\n        mArrangeAxis = type;\n        SetLayoutDirty();\n    }\n\n    TwoDirection GridLayout::GetArrangeAxis() const\n    {\n        return mArrangeAxis;\n    }\n\n    void GridLayout::SetArrangeAxisMaxCells(int count)\n    {\n        if (mArrangeAxisMaxCells == count)\n            return;\n\n        mArrangeAxisMaxCells = count;\n        SetLayoutDirty();\n    }\n\n    int GridLayout::GetArrangeAxisMaxCells() const\n    {\n        return mArrangeAxisMaxCells;\n    }\n\n    void GridLayout::SetFitByChildren(bool fit)\n    {\n        mFitByChildren = fit;\n        layout->SetDirty();\n    }\n\n    bool GridLayout::IsFittingByChildren() const\n    {\n        return mFitByChildren;\n    }\n\n    void GridLayout::UpdateSelfTransform()\n{\n        if (mFitByChildren)\n            ExpandSizeByChilds();\n\n        Widget::UpdateSelfTransform();\n\n        RearrangeChilds();\n    }\n\n    String GridLayout::GetCreateMenuGroup()\n    {\n        return \"Layout\";\n    }\n\n    void GridLayout::OnChildAdded(const Ref<Widget>& child)\n    {\n        child->GetLayoutData().drivenByParent = true;\n    }\n\n    void GridLayout::OnChildRemoved(const Ref<Widget>& child)\n    {\n        child->GetLayoutData().drivenByParent = false;\n    }\n\n    void GridLayout::RearrangeChilds()\n    {\n        switch (mBaseCorner)\n        {\n            case BaseCorner::LeftTop: ArrangeFromLeftTop(); break;\n            case BaseCorner::Top: ArrangeFromTop(); break;\n            case BaseCorner::RightTop: ArrangeFromRightTop(); break;\n            case BaseCorner::Left: ArrangeFromLeft(); break;\n            case BaseCorner::Center: ArrangeFromCenter(); break;\n            case BaseCorner::Right: ArrangeFromRight(); break;\n            case BaseCorner::LeftBottom: ArrangeFromLeftBottom(); break;\n            case BaseCorner::Bottom: ArrangeFromBottom(); break;\n            case BaseCorner::RightBottom: ArrangeFromRightBottom(); break;\n        }\n    }\n\n    void GridLayout::ArrangeFromLeftTop()\n    {\n        int cellsCount = mChildren.Count();\n\n        if (mArrangeAxis == TwoDirection::Horizontal)\n        {\n            Vec2F anchor(0.0f, 1.0f);\n            Vec2F cellPos(mBorder.left, -mBorder.top);\n\n            int rowIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (rowIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x = mBorder.left;\n                    cellPos.y -= mCellSize.y + mSpacing;\n                    rowIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.x += mCellSize.x + mSpacing;\n\n                rowIdx++;\n            }\n        }\n        else\n        {\n            Vec2F anchor(0.0f, 1.0f);\n            Vec2F cellPos(mBorder.left, -mBorder.top);\n\n            int colIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (colIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x += mCellSize.y + mSpacing;\n                    cellPos.y = -mBorder.top;\n                    colIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.y -= mCellSize.y + mSpacing;\n\n                colIdx++;\n            }\n        }\n    }\n\n    void GridLayout::ArrangeFromTop()\n    {\n        int cellsCount = mChildren.Count();\n        int rem = cellsCount % mArrangeAxisMaxCells;\n\n        if (mArrangeAxis == TwoDirection::Horizontal)\n        {\n            int rowCells = Math::Min(cellsCount, mArrangeAxisMaxCells);\n\n            Vec2F anchor(0.5f, 1.0f);\n            Vec2F cellPos(-((float)rowCells*mCellSize.x + (float)(rowCells - 1)*mSpacing)*0.5f, -mBorder.top);\n\n            int rowIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (rowIdx == mArrangeAxisMaxCells)\n                {\n                    rowCells = Math::Min(cellsCount - i, mArrangeAxisMaxCells);\n                    cellPos.x = -((float)rowCells*mCellSize.x + (float)(rowCells - 1)*mSpacing)*0.5f;\n                    cellPos.y -= mCellSize.y + mSpacing;\n                    rowIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.x += mCellSize.x + mSpacing;\n\n                rowIdx++;\n            }\n        }\n        else\n        {\n            int cols = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0)\n            {\n                if (rem > 1) cols += 2;\n                else cols++;\n            }\n\n            Vec2F anchor(0.5f, 1.0f);\n            Vec2F cellPos(-((float)cols*mCellSize.x + (float)(cols - 1)*mSpacing)*0.5f, -mBorder.top);\n\n            int upColCells = rem - rem / 2;\n\n            int colIdx = upColCells > 0 ? mArrangeAxisMaxCells - upColCells : 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (colIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x += mCellSize.x + mSpacing;\n                    cellPos.y = -mBorder.top;\n                    colIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.y -= mCellSize.y + mSpacing;\n\n                colIdx++;\n            }\n        }\n    }\n\n    void GridLayout::ArrangeFromRightTop()\n    {\n        int cellsCount = mChildren.Count();\n\n        if (mArrangeAxis == TwoDirection::Horizontal)\n        {\n            Vec2F anchor(1.0f, 1.0f);\n            Vec2F cellPos(-mBorder.right, -mBorder.top);\n\n            int rowIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (rowIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x = -mBorder.right;\n                    cellPos.y -= mCellSize.y + mSpacing;\n                    rowIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = cellPos - mCellSize;\n                child->GetLayoutData().offsetMax = cellPos;\n\n                cellPos.x -= mCellSize.x + mSpacing;\n\n                rowIdx++;\n            }\n        }\n        else\n        {\n            Vec2F anchor(1.0f, 1.0f);\n            Vec2F cellPos(-mBorder.right, -mBorder.top);\n\n            int colIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (colIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x -= mCellSize.x + mSpacing;\n                    cellPos.y = -mBorder.top;\n                    colIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = cellPos - mCellSize;\n                child->GetLayoutData().offsetMax = cellPos;\n\n                cellPos.y -= mCellSize.y + mSpacing;\n\n                colIdx++;\n            }\n        }\n    }\n\n    void GridLayout::ArrangeFromLeft()\n    {\n        int cellsCount = mChildren.Count();\n        int rem = cellsCount % mArrangeAxisMaxCells;\n\n        if (mArrangeAxis == TwoDirection::Horizontal)\n        {\n            int rows = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0)\n            {\n                if (rem > 1) rows += 2;\n                else rows++;\n            }\n\n            Vec2F anchor(0.0f, 0.5f);\n            Vec2F cellPos(mBorder.left, ((float)rows*mCellSize.y + (float)(rows - 1)*mSpacing)*0.5f);\n\n            int upRowCells = rem - rem / 2;\n\n            int rowIdx = upRowCells > 0 ? mArrangeAxisMaxCells - upRowCells : 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (rowIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x = mBorder.left;\n                    cellPos.y -= mCellSize.y + mSpacing;\n                    rowIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.x += mCellSize.x + mSpacing;\n\n                rowIdx++;\n            }\n        }\n        else\n        {\n            int cols = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0) cols++;\n\n            int colCells = Math::Min(cellsCount, mArrangeAxisMaxCells);\n\n            Vec2F anchor(0.0f, 0.5f);\n            Vec2F cellPos(mBorder.left, ((float)colCells*mCellSize.y + (float)(colCells - 1)*mSpacing)*0.5f);\n\n            int colIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (colIdx == mArrangeAxisMaxCells)\n                {\n                    colCells = Math::Min(cellsCount - i, mArrangeAxisMaxCells);\n\n                    cellPos.x += mCellSize.x + mSpacing;\n                    cellPos.y = ((float)colCells*mCellSize.y + (float)(colCells - 1)*mSpacing)*0.5f;\n                    colIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.y -= mCellSize.y + mSpacing;\n\n                colIdx++;\n            }\n        }\n    }\n\n    void GridLayout::ArrangeFromCenter()\n    {\n        int cellsCount = mChildren.Count();\n        int rem = cellsCount % mArrangeAxisMaxCells;\n\n        if (mArrangeAxis == TwoDirection::Horizontal)\n        {\n            int rows = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0)\n            {\n                if (rem > 1) rows += 2;\n                else rows++;\n            }\n\n            int upRowCells = rem / 2;\n            int rowCells = Math::Min(cellsCount, mArrangeAxisMaxCells);\n\n            Vec2F anchor(0.5f, 0.5f);\n            Vec2F cellPos(-((float)rowCells*mCellSize.x + (float)(rowCells - 1)*mSpacing)*0.5f,\n                          ((float)rows*mCellSize.y + (float)(rows - 1)*mSpacing)*0.5f);\n\n            int rowIdx = 0;\n            if (upRowCells > 0)\n            {\n                cellPos.x = -((float)upRowCells*mCellSize.x + (float)(upRowCells - 1)*mSpacing)*0.5f;\n                rowIdx = mArrangeAxisMaxCells - upRowCells;\n            }\n\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (rowIdx == mArrangeAxisMaxCells)\n                {\n                    rowCells = Math::Min(cellsCount - i, mArrangeAxisMaxCells);\n                    cellPos.x = -((float)rowCells*mCellSize.x + (float)(rowCells - 1)*mSpacing)*0.5f;\n                    cellPos.y -= mCellSize.y + mSpacing;\n                    rowIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.x += mCellSize.x + mSpacing;\n\n                rowIdx++;\n            }\n        }\n        else\n        {\n            int cols = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0)\n            {\n                if (rem > 1) cols += 2;\n                else cols++;\n            }\n\n            int upColCells = rem / 2;\n            int colCells = Math::Min(cellsCount, mArrangeAxisMaxCells);\n\n            Vec2F anchor(0.5f, 0.5f);\n            Vec2F cellPos(-((float)cols*mCellSize.x + (float)(cols - 1)*mSpacing)*0.5f,\n                          ((float)colCells*mCellSize.y + (float)(colCells - 1)*mSpacing)*0.5f);\n\n            int colIdx = 0;\n            if (upColCells > 0)\n            {\n                cellPos.y = ((float)upColCells*mCellSize.y + (float)(upColCells - 1)*mSpacing)*0.5f;\n                colIdx = mArrangeAxisMaxCells - upColCells;\n            }\n\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (colIdx == mArrangeAxisMaxCells)\n                {\n                    colCells = Math::Min(cellsCount - i, mArrangeAxisMaxCells);\n                    cellPos.x += mCellSize.x + mSpacing;\n                    cellPos.y = ((float)colCells*mCellSize.y + (float)(colCells - 1)*mSpacing)*0.5f;\n                    colIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.y -= mCellSize.y + mSpacing;\n\n                colIdx++;\n            }\n        }\n    }\n\n    void GridLayout::ArrangeFromRight()\n    {\n        int cellsCount = mChildren.Count();\n        int rem = cellsCount % mArrangeAxisMaxCells;\n\n        if (mArrangeAxis == TwoDirection::Horizontal)\n        {\n            int rows = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0)\n            {\n                if (rem > 1) rows += 2;\n                else rows++;\n            }\n\n            Vec2F anchor(1.0f, 0.5f);\n            Vec2F cellPos(-mBorder.right, ((float)rows*mCellSize.y + (float)(rows - 1)*mSpacing)*0.5f);\n\n            int upRowCells = rem - rem / 2;\n\n            int rowIdx = upRowCells > 0 ? mArrangeAxisMaxCells - upRowCells : 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (rowIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x = -mBorder.right;\n                    cellPos.y -= mCellSize.y + mSpacing;\n                    rowIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = cellPos - mCellSize;\n                child->GetLayoutData().offsetMax = cellPos;\n\n                cellPos.x -= mCellSize.x + mSpacing;\n\n                rowIdx++;\n            }\n        }\n        else\n        {\n            int cols = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0) cols++;\n\n            int colCells = Math::Min(cellsCount, mArrangeAxisMaxCells);\n\n            Vec2F anchor(1.0f, 0.5f);\n            Vec2F cellPos(-mBorder.right, ((float)colCells*mCellSize.y + (float)(colCells - 1)*mSpacing)*0.5f);\n\n            int colIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (colIdx == mArrangeAxisMaxCells)\n                {\n                    colCells = Math::Min(cellsCount - i, mArrangeAxisMaxCells);\n\n                    cellPos.x -= mCellSize.x + mSpacing;\n                    cellPos.y = ((float)colCells*mCellSize.y + (float)(colCells - 1)*mSpacing)*0.5f;\n                    colIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = cellPos - mCellSize;\n                child->GetLayoutData().offsetMax = cellPos;\n\n                cellPos.y -= mCellSize.y + mSpacing;\n\n                colIdx++;\n            }\n        }\n    }\n\n    void GridLayout::ArrangeFromLeftBottom()\n    {\n        int cellsCount = mChildren.Count();\n        int rem = cellsCount % mArrangeAxisMaxCells;\n\n        if (mArrangeAxis == TwoDirection::Horizontal)\n        {\n            int rows = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0) rows++;\n\n            Vec2F anchor(0.0f, 0.0f);\n            Vec2F cellPos(mBorder.left, mBorder.bottom + (float)rows*mCellSize.y + (float)(rows - 1)*mSpacing);\n\n            int rowIdx = rem != 0 ? mArrangeAxisMaxCells - rem : 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (rowIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x = mBorder.left;\n                    cellPos.y -= mCellSize.y + mSpacing;\n                    rowIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.x += mCellSize.x + mSpacing;\n\n                rowIdx++;\n            }\n        }\n        else\n        {\n            Vec2F anchor(0.0f, 0.0f);\n            Vec2F cellPos(mBorder.left, mBorder.bottom);\n\n            int colIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (colIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x += mCellSize.x + mSpacing;\n                    cellPos.y = mBorder.bottom;\n                    colIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = cellPos;\n                child->GetLayoutData().offsetMax = cellPos + mCellSize;\n\n                cellPos.y += mCellSize.y + mSpacing;\n\n                colIdx++;\n            }\n        }\n    }\n\n    void GridLayout::ArrangeFromBottom()\n    {\n        int cellsCount = mChildren.Count();\n        int rem = cellsCount % mArrangeAxisMaxCells;\n\n        if (mArrangeAxis == TwoDirection::Horizontal)\n        {\n            int rows = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0) rows++;\n\n            int colCells = Math::Min(cellsCount, mArrangeAxisMaxCells);\n\n            Vec2F anchor(0.5f, 0.0f);\n            Vec2F cellPos(-((float)colCells*mCellSize.x + (float)(colCells - 1)*mSpacing)*0.5f,\n                          mBorder.bottom + (float)rows*mCellSize.y + (float)(rows - 1)*mSpacing);\n\n            int rowIdx = 0;\n            if (rem != 0)\n            {\n                cellPos.x = -((float)rem*mCellSize.x + (float)(rem - 1)*mSpacing)*0.5f;\n                rowIdx = mArrangeAxisMaxCells - rem;\n            }\n\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (rowIdx == mArrangeAxisMaxCells)\n                {\n                    colCells = Math::Min(cellsCount - i, mArrangeAxisMaxCells);\n                    cellPos.x = -((float)colCells*mCellSize.x + (float)(colCells - 1)*mSpacing)*0.5f;\n                    cellPos.y -= mCellSize.y + mSpacing;\n                    rowIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x, cellPos.y - mCellSize.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x + mCellSize.x, cellPos.y);\n\n                cellPos.x += mCellSize.x + mSpacing;\n\n                rowIdx++;\n            }\n        }\n        else\n        {\n            int cols = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0)\n            {\n                if (rem > 1) cols += 2;\n                else cols++;\n            }\n\n            int colCells = Math::Min(cellsCount, mArrangeAxisMaxCells);\n\n            Vec2F anchor(0.5f, 0.0f);\n            Vec2F cellPos(-((float)cols*mCellSize.x + (float)(cols - 1)*mSpacing)*0.5f, mBorder.bottom);\n\n            int upColCells = rem / 2;\n            int colIdx = upColCells > 0 ? mArrangeAxisMaxCells - upColCells : 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (colIdx == mArrangeAxisMaxCells)\n                {\n                    colCells = Math::Min(cellsCount - i, mArrangeAxisMaxCells);\n                    cellPos.x += mCellSize.x + mSpacing;\n                    cellPos.y = mBorder.bottom;\n                    colIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = cellPos;\n                child->GetLayoutData().offsetMax = cellPos + mCellSize;\n\n                cellPos.y += mCellSize.y + mSpacing;\n\n                colIdx++;\n            }\n        }\n    }\n\n    void GridLayout::ArrangeFromRightBottom()\n    {\n        int cellsCount = mChildren.Count();\n        int rem = cellsCount % mArrangeAxisMaxCells;\n\n        if (mArrangeAxis == TwoDirection::Horizontal)\n        {\n            int rows = cellsCount / mArrangeAxisMaxCells;\n            if (rem != 0) rows++;\n\n            Vec2F anchor(1.0f, 0.0f);\n            Vec2F cellPos(-mBorder.right, mBorder.bottom);\n\n            int rowIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (rowIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x = -mBorder.right;\n                    cellPos.y += mCellSize.y + mSpacing;\n                    rowIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x - mCellSize.x, cellPos.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x, cellPos.y + mCellSize.y);\n\n                cellPos.x -= mCellSize.x + mSpacing;\n\n                rowIdx++;\n            }\n        }\n        else\n        {\n            Vec2F anchor(1.0f, 0.0f);\n            Vec2F cellPos(-mBorder.right, mBorder.bottom);\n\n            int colIdx = 0;\n            for (int i = 0; i < cellsCount; i++)\n            {\n                auto child = mChildWidgets[i];\n\n                if (colIdx == mArrangeAxisMaxCells)\n                {\n                    cellPos.x -= mCellSize.x + mSpacing;\n                    cellPos.y = mBorder.bottom;\n                    colIdx = 0;\n                }\n\n                child->GetLayoutData().anchorMin = anchor;\n                child->GetLayoutData().anchorMax = anchor;\n                child->GetLayoutData().offsetMin = Vec2F(cellPos.x - mCellSize.x, cellPos.y);\n                child->GetLayoutData().offsetMax = Vec2F(cellPos.x, cellPos.y + mCellSize.y);\n\n                cellPos.y += mCellSize.y + mSpacing;\n\n                colIdx++;\n            }\n        }\n    }\n\n    void GridLayout::ExpandSizeByChilds()\n    {\n        const static Vec2F relativePivots[] = {\n            Vec2F(0.0f, 0.5f), // Left\n            Vec2F(1.0f, 0.5f), // Right\n            Vec2F(0.5f, 1.0f), // Top\n            Vec2F(0.5f, 0.0f), // Bottom\n            Vec2F(0.5f, 0.5f), // Center\n            Vec2F(0.0f, 0.0f), // LeftBottom\n            Vec2F(0.0f, 1.0f), // LeftTop\n            Vec2F(1.0f, 0.0f), // RightBottom\n            Vec2F(1.0f, 1.0f)  // RightTop\n        };\n\n        Vec2F relativePivot = relativePivots[(int)mBaseCorner];\n\n        RectF childrenRect;\n        if (mChildWidgets.Count() > 0)\n            childrenRect = mChildWidgets[0]->GetLayoutData().rectangle;\n\n        for (auto& child : mChildWidgets)\n        {\n            childrenRect.left   = Math::Min(childrenRect.left, child->GetLayoutData().rectangle.left);\n            childrenRect.right  = Math::Max(childrenRect.right, child->GetLayoutData().rectangle.right);\n            childrenRect.bottom = Math::Min(childrenRect.bottom, child->GetLayoutData().rectangle.bottom);\n            childrenRect.top    = Math::Max(childrenRect.top, child->GetLayoutData().rectangle.top);\n        }\n\n        Vec2F szDelta = (childrenRect.Size() + mBorder.LeftBottom() + mBorder.RightTop()) - GetChildrenWorldRect().Size();\n\n        if (szDelta != Vec2F())\n        {\n            GetLayoutData().offsetMax += szDelta*(Vec2F::One() - relativePivot);\n            GetLayoutData().offsetMin -= szDelta*relativePivot;\n\n            layout->SetDirty();\n        }\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::GridLayout>);\n// --- META ---\n\nDECLARE_CLASS(o2::GridLayout, o2__GridLayout);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/GridLayout.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n\nnamespace o2\n{\n    // ------------------\n    // Grid layout widget\n    // ------------------\n    class GridLayout: public Widget\n    {\n    public:\n        PROPERTIES(GridLayout);\n        PROPERTY(BaseCorner, baseCorner, SetBaseCorner, GetBaseCorner);                     // Base corder property\n        PROPERTY(Vec2F, cellSize, SetCellSize, GetCellSize);                                // Grid cell size\n        PROPERTY(int, arrangeAxisMaxCells, SetArrangeAxisMaxCells, GetArrangeAxisMaxCells); // Maximum cells at arranging axis\n        PROPERTY(TwoDirection, arrangeAxis, SetArrangeAxis, GetArrangeAxis);                // Arrange axis\n\n        PROPERTY(float, spacing, SetSpacing, GetSpacing);                // Space between widgets property\n        PROPERTY(RectF, border, SetBorder, GetBorder);                   // Border property\n        PROPERTY(float, borderLeft, SetBorderLeft, GetBorderLeft);       // Left border property\n        PROPERTY(float, borderRight, SetBorderRight, GetBorderRight);    // Right border property\n        PROPERTY(float, borderTop, SetBorderTop, GetBorderTop);          // Top border property\n        PROPERTY(float, borderBottom, SetBorderBottom, GetBorderBottom); // Bottom border property\n\n        PROPERTY(bool, fitByChildren, SetFitByChildren, IsFittingByChildren); // Fitting size by children property\n\n    public:\n        // Default constructor\n        explicit GridLayout(RefCounter* refCounter);\n\n        // Copy-constructor\n        GridLayout(RefCounter* refCounter, const GridLayout& other);\n\n        // Destructor\n        ~GridLayout();\n\n        // Copy operator\n        GridLayout& operator=(const GridLayout& other);\n\n        // Sets base corner\n        void SetBaseCorner(BaseCorner baseCorner);\n\n        // Returns base corner\n        BaseCorner GetBaseCorner() const;\n\n        // Sets space between widgets\n        void SetSpacing(float spacing);\n\n        // Returns space between widgets\n        float GetSpacing() const;\n\n        // Sets border\n        void SetBorder(const RectF& border);\n\n        // Returns border\n        RectF GetBorder() const;\n\n        // Sets left border\n        void SetBorderLeft(float value);\n\n        // Returns left border\n        float GetBorderLeft() const;\n\n        // Sets right border\n        void SetBorderRight(float value);\n\n        // Returns right border\n        float GetBorderRight() const;\n\n        // Sets top border\n        void SetBorderTop(float value);\n\n        // Returns top border\n        float GetBorderTop() const;\n\n        // Sets bottom border\n        void SetBorderBottom(float value);\n\n        // Returns bottom border\n        float GetBorderBottom() const;\n\n        // Sets cell size\n        void SetCellSize(const Vec2F& size);\n\n        // Returns cell size\n        Vec2F GetCellSize() const;\n\n        // Sets arrange type\n        void SetArrangeAxis(TwoDirection type);\n\n        // Returns arrange type\n        TwoDirection GetArrangeAxis() const;\n\n        // Sets arrange axis maximum cells count\n        void SetArrangeAxisMaxCells(int count);\n\n        // Returns arrange axis maximum cells count\n        int GetArrangeAxisMaxCells() const;\n\n        // Sets fitting size by children\n        void SetFitByChildren(bool fit);\n\n        // Returns fitting by children\n        bool IsFittingByChildren() const;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(GridLayout);\n        CLONEABLE_REF(GridLayout);\n\n    protected:\n        BaseCorner   mBaseCorner = BaseCorner::Left;          // Base corner of widgets arranging @SERIALIZABLE\n        float        mSpacing = 0.0f;                         // Space between widgets @SERIALIZABLE\n        Vec2F        mCellSize = Vec2F(50, 50);               // Grid cell size @SERIALIZABLE\n        TwoDirection mArrangeAxis = TwoDirection::Horizontal; // Cells arrange axis @SERIALIZABLE\n        int          mArrangeAxisMaxCells = 5;                // Arrange axis maximum cells count @SERIALIZABLE\n        RectF        mBorder;                                 // Border @SERIALIZABLE\n        bool         mFitByChildren = false;                  // Fitting by children @SERIALIZABLE\n\n    protected:\n        // Called when child widget was added\n        void OnChildAdded(const Ref<Widget>& child) override;\n\n        // Called when child widget was removed\n        void OnChildRemoved(const Ref<Widget>& child) override;\n\n        // Invokes required function for childs arranging\n        void RearrangeChilds();\n\n        // Arrange childs from left top\n        void ArrangeFromLeftTop();\n\n        // Arrange childs from top\n        void ArrangeFromTop();\n\n        // Arrange childs from right top\n        void ArrangeFromRightTop();\n\n        // Arrange childs from left\n        void ArrangeFromLeft();\n\n        // Arrange childs from center\n        void ArrangeFromCenter();\n\n        // Arrange childs from right\n        void ArrangeFromRight();\n\n        // Arrange childs from left bottom\n        void ArrangeFromLeftBottom();\n\n        // Arrange childs from bottom\n        void ArrangeFromBottom();\n\n        // Arrange childs from right bottom\n        void ArrangeFromRightBottom();\n\n        // Expands size by children\n        void ExpandSizeByChilds();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::GridLayout)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(o2::GridLayout)\n{\n    FIELD().PUBLIC().NAME(baseCorner);\n    FIELD().PUBLIC().NAME(cellSize);\n    FIELD().PUBLIC().NAME(arrangeAxisMaxCells);\n    FIELD().PUBLIC().NAME(arrangeAxis);\n    FIELD().PUBLIC().NAME(spacing);\n    FIELD().PUBLIC().NAME(border);\n    FIELD().PUBLIC().NAME(borderLeft);\n    FIELD().PUBLIC().NAME(borderRight);\n    FIELD().PUBLIC().NAME(borderTop);\n    FIELD().PUBLIC().NAME(borderBottom);\n    FIELD().PUBLIC().NAME(fitByChildren);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(BaseCorner::Left).NAME(mBaseCorner);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mSpacing);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(50, 50)).NAME(mCellSize);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(TwoDirection::Horizontal).NAME(mArrangeAxis);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(5).NAME(mArrangeAxisMaxCells);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mBorder);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mFitByChildren);\n}\nEND_META;\nCLASS_METHODS_META(o2::GridLayout)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const GridLayout&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBaseCorner, BaseCorner);\n    FUNCTION().PUBLIC().SIGNATURE(BaseCorner, GetBaseCorner);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSpacing, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSpacing);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorder, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetBorder);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderLeft, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderLeft);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderRight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderRight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderTop, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderTop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderBottom, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderBottom);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCellSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetCellSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetArrangeAxis, TwoDirection);\n    FUNCTION().PUBLIC().SIGNATURE(TwoDirection, GetArrangeAxis);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetArrangeAxisMaxCells, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetArrangeAxisMaxCells);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFitByChildren, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFittingByChildren);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildAdded, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildRemoved, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, RearrangeChilds);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromLeftTop);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromTop);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromRightTop);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromLeft);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromCenter);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromRight);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromLeftBottom);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromBottom);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromRightBottom);\n    FUNCTION().PROTECTED().SIGNATURE(void, ExpandSizeByChilds);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/GridLayoutScrollArea.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"GridLayoutScrollArea.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n\nnamespace o2\n{\n    GridLayoutScrollArea::GridLayoutScrollArea(RefCounter* refCounter):\n        ScrollArea(refCounter)\n    {\n        mItemSample = mmake<Widget>();\n    }\n\n    GridLayoutScrollArea::GridLayoutScrollArea(RefCounter* refCounter, const GridLayoutScrollArea& other):\n        ScrollArea(refCounter, other), mItemsSpacing(other.mItemsSpacing)\n    {\n        mItemSample = other.mItemSample->CloneAsRef<Widget>();\n        mItemSample->UpdateTransform();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    GridLayoutScrollArea::~GridLayoutScrollArea()\n    {}\n\n    GridLayoutScrollArea& GridLayoutScrollArea::operator=(const GridLayoutScrollArea& other)\n    {\n        ScrollArea::operator=(other);\n        mItemsSpacing = other.mItemsSpacing;\n\n        mItemSample = other.mItemSample->CloneAsRef<Widget>();\n        mItemSample->UpdateSelfTransform();\n        mItemSample->UpdateChildrenTransforms();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void GridLayoutScrollArea::SetItemSample(const Ref<Widget>& sample)\n    {\n        mItemSample = sample;\n\n        SetLayoutDirty();\n    }\n\n    const Ref<Widget>& GridLayoutScrollArea::GetItemSample() const\n    {\n        return mItemSample;\n    }\n\n    void GridLayoutScrollArea::SetItemsSpacing(const Vec2F& spacing)\n    {\n        mItemsSpacing = spacing;\n        SetLayoutDirty();\n    }\n\n    const Vec2F& GridLayoutScrollArea::GetItemsSpacing() const\n    {\n        return mItemsSpacing;\n    }\n\n    void GridLayoutScrollArea::OnItemsUpdated(bool itemsRearranged /*= false*/)\n    {\n        if (itemsRearranged)\n        {\n            Vector<Ref<Widget>> removingItems;\n            for (int i = mMinVisibleItemIdx; i <= mMaxVisibleItemIdx; i++)\n            {\n                if (i < 0)\n                    continue;\n\n                removingItems.Add(mChildWidgets[i - mMinVisibleItemIdx]);\n            }\n\n            for (auto item : removingItems)\n                mItemsPool.Add(item);\n\n            mChildren.Clear();\n            mChildWidgets.Clear();\n            mChildrenInheritedDepth.Clear();\n\n            mMinVisibleItemIdx = -1;\n            mMaxVisibleItemIdx = -1;\n        }\n\n        SetLayoutDirty();\n    }\n\n    void GridLayoutScrollArea::ScrollTo(void* item)\n    {\n        int idx = GetItemsRange(0, GetItemsCount()).IndexOf(item);\n        if (idx < 0)\n            return;\n\n        int itemsInLine = GetItemsInLine();\n        SetScrollForcible(Vec2F(0, idx/itemsInLine*(mItemSample->layout->GetMinHeight() + mItemsSpacing.y)));\n    }\n\n    void GridLayoutScrollArea::CalculateScrollArea()\n    {\n        Vec2F offset;\n        InitializeScrollAreaRectCalculation(offset);\n\n        float itemsLinesHeight = Math::Ceil((float)GetItemsCount()/(float)GetItemsInLine())*\n            (mItemSample->layout->GetMinHeight() + mItemsSpacing.y);\n\n        RecalculateScrollAreaRect(RectF(0, mAbsoluteViewArea.Height(), mAbsoluteViewArea.Width(),\n                                        mAbsoluteViewArea.Height() - itemsLinesHeight), Vec2F());\n    }\n\n    void GridLayoutScrollArea::UpdateSelfTransform()\n    {\n        UpdateVisibleItems();\n        ScrollArea::UpdateSelfTransform();\n    }\n\n    String GridLayoutScrollArea::GetCreateMenuGroup()\n    {\n        return \"Layout\";\n    }\n\n    void GridLayoutScrollArea::MoveScrollPosition(const Vec2F& delta)\n    {\n        ScrollArea::MoveScrollPosition(delta);\n        UpdateVisibleItems();\n    }\n\n    int GridLayoutScrollArea::GetItemsCount() const\n    {\n        return getItemsCountFunc();\n    }\n\n    Vector<void*> GridLayoutScrollArea::GetItemsRange(int start, int end) const\n    {\n        return getItemsRangeFunc(start, end);\n    }\n\n    void GridLayoutScrollArea::SetupItemWidget(const Ref<Widget>& widget, void* item)\n    {\n        setupItemFunc(widget, item);\n    }\n\n    void GridLayoutScrollArea::UpdateVisibleItems()\n    {\n        int lastMinItemIdx = mMinVisibleItemIdx;\n        int lastMaxItemIdx = mMaxVisibleItemIdx;\n\n        float itemHeight = mItemSample->layout->minHeight;\n        float itemWidth = mItemSample->layout->minWidth;\n        int itemsInLine = GetItemsInLine();\n\n        bool rebuild = itemsInLine != mPrevItemsInLine;\n\n        if (itemHeight < FLT_EPSILON)\n            return;\n\n        int itemsCount = GetItemsCount();\n\n        mMinVisibleItemIdx = Math::FloorToInt(mScrollPos.y/(itemHeight + mItemsSpacing.y))*itemsInLine;\n        mMaxVisibleItemIdx = Math::CeilToInt((mScrollPos.y + mAbsoluteViewArea.Height())/(itemHeight + mItemsSpacing.y))*itemsInLine;\n\n        mMinVisibleItemIdx = Math::Min(mMinVisibleItemIdx, itemsCount);\n        mMaxVisibleItemIdx = Math::Min(mMaxVisibleItemIdx, itemsCount - 1);\n\n        auto itemsInRange = GetItemsRange(mMinVisibleItemIdx, mMaxVisibleItemIdx + 1);\n        Vector<Ref<Widget>> itemsWidgets;\n        itemsWidgets.Resize(mMaxVisibleItemIdx - mMinVisibleItemIdx + 1);\n\n        Vector<Ref<Widget>> removingItems;\n        for (int i = lastMinItemIdx; i <= lastMaxItemIdx; i++)\n        {\n            if (i < 0)\n                continue;\n\n            if (i < mMinVisibleItemIdx || i > mMaxVisibleItemIdx || rebuild)\n                removingItems.Add(mChildWidgets[i - lastMinItemIdx]);\n            else\n                itemsWidgets[i - mMinVisibleItemIdx] = mChildWidgets[i - lastMinItemIdx];\n        }\n\n        for (auto item : removingItems)\n            mItemsPool.Add(item);\n\n        mChildren.Clear();\n        mChildWidgets.Clear();\n        mChildrenInheritedDepth.Clear();\n\n        auto thisRef = Ref(this);\n\n        for (int i = mMinVisibleItemIdx; i <= mMaxVisibleItemIdx; i++)\n        {\n            if (i < 0)\n                continue;\n\n            if (i >= lastMinItemIdx && i <= lastMaxItemIdx && !rebuild)\n                continue;\n\n            if (mItemsPool.IsEmpty())\n                mItemsPool.Add(mItemSample->CloneAsRef<Widget>());\n\n            auto newItem = mItemsPool.PopBack();\n\n            SetupItemWidget(newItem, itemsInRange[i - mMinVisibleItemIdx]);\n\n            *newItem->layout = WidgetLayout::Based(BaseCorner::LeftTop, newItem->layout->GetMinimalSize(),\n                                                   Vec2F((itemWidth + mItemsSpacing.x)*(float)(i % itemsInLine),\n                                                         -(itemHeight + mItemsSpacing.y)*(float)(i/itemsInLine)));\n\n            newItem->layout->minSize = Vec2F(itemWidth, itemHeight);\n\n            newItem->mParent = thisRef;\n            newItem->mParentWidget = thisRef;\n\n            itemsWidgets[i - mMinVisibleItemIdx] = newItem;\n\n            newItem->UpdateSelfTransform();\n            newItem->UpdateChildrenTransforms();\n            newItem->mIsClipped = false;\n        }\n\n        mChildren.Add(DynamicCastVector<Actor>(itemsWidgets));\n        mChildWidgets.Add(itemsWidgets);\n        mChildrenInheritedDepth.Add(DynamicCastVector< ISceneDrawable>(itemsWidgets));\n\n        mPrevItemsInLine = itemsInLine;\n    }\n\n    Ref<Widget> GridLayoutScrollArea::GetItemUnderPoint(const Vec2F& point, int* idxPtr)\n    {\n        int idx = mMinVisibleItemIdx;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->layout->IsPointInside(point))\n            {\n                if (idxPtr)\n                    *idxPtr = idx;\n\n                return child;\n            }\n\n            idx++;\n        }\n\n        if (idxPtr)\n            *idxPtr = -1;\n\n        return nullptr;\n    }\n\n    int GridLayoutScrollArea::GetItemsInLine() const\n    {\n        float itemWidth = mItemSample->layout->GetMinWidth();\n        return Math::Max(1, Math::FloorToInt((mAbsoluteViewArea.Width() - itemWidth)/\n            (itemWidth + mItemsSpacing.x) + 1.0f));\n    }\n\n    void GridLayoutScrollArea::OnDeserialized(const DataValue& node)\n    {\n        ScrollArea::OnDeserialized(node);\n        RetargetStatesAnimations();\n    }\n\n    void GridLayoutScrollArea::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        SetInteractable(true);\n    }\n\n    void GridLayoutScrollArea::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        SetInteractable(false);\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::GridLayoutScrollArea>);\n// --- META ---\n\nDECLARE_CLASS(o2::GridLayoutScrollArea, o2__GridLayoutScrollArea);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/GridLayoutScrollArea.h",
    "content": "#pragma once\n\n#include \"o2/Render/Sprite.h\"\n#include \"ScrollArea.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n\nnamespace o2\n{\n    // ---------------------------------\n    // Optimized grid layout with scroll\n    // ---------------------------------\n    class GridLayoutScrollArea: public ScrollArea\n    {\n    public:\n        Function<int()>                   getItemsCountFunc; // Items count getting function\n        Function<Vector<void*>(int, int)> getItemsRangeFunc; // Items getting in range function\n\n        Function<void(const Ref<Widget>&, void*)> setupItemFunc; // Setup item widget function\n\n    public:\n        // Default constructor\n        explicit GridLayoutScrollArea(RefCounter* refCounter);\n\n        // Copy-constructor\n        GridLayoutScrollArea(RefCounter* refCounter, const GridLayoutScrollArea& other);\n\n        // Destructor\n        ~GridLayoutScrollArea();\n\n        // Copy-operator\n        GridLayoutScrollArea& operator=(const GridLayoutScrollArea& other);\n\n        // Sets item sample widget. WARNING: Removing all old items!\n        void SetItemSample(const Ref<Widget>& sample);\n\n        // Returns item sample widget\n        const Ref<Widget>& GetItemSample() const;\n\n        // Sets spacing between cell widgets\n        void SetItemsSpacing(const Vec2F& spacing);\n\n        // Returns spacing between cell widgets\n        const Vec2F& GetItemsSpacing() const;\n\n        // Updates items\n        void OnItemsUpdated(bool itemsRearranged = false);\n\n        // Scroll view to item\n        void ScrollTo(void* item);\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(GridLayoutScrollArea);\n        CLONEABLE_REF(GridLayoutScrollArea);\n\n    protected:\n        Ref<Widget>         mItemSample; // Item sample widget @SERIALIZABLE\n        Vector<Ref<Widget>> mItemsPool;  // Items pool\n\n        Vec2F mItemsSpacing; // Spacing between cell widgets @SERIALIZABLE\n        \n        int mMinVisibleItemIdx = -1; // Visible item with minimal index\n        int mMaxVisibleItemIdx = -1; // Visible item with maximal index\n\n        int mPrevItemsInLine = 0; // Previous visible items on line count                                                 \n\n    protected:\n        // Called when object was deserialized and trying to reattach states animations target\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Calculates scroll area\n        void CalculateScrollArea() override;\n\n        // Moves scroll position and updates children widgets clipping and layout\n        void MoveScrollPosition(const Vec2F& delta) override;\n\n        // Returns items count, calls getItemsCountFunc\n        virtual int GetItemsCount() const;\n\n        // Returns items in range from start to end, calls getItemsRangeFunc\n        virtual Vector<void*> GetItemsRange(int start, int end) const;\n\n        // Sets item widget, calls setupItemFunc\n        virtual void SetupItemWidget(const Ref<Widget>& widget, void* item);\n\n        // Updates visible items\n        virtual void UpdateVisibleItems();\n\n        // Returns item widget under point and stores index in idxPtr, if not null\n        Ref<Widget> GetItemUnderPoint(const Vec2F& point, int* idxPtr);\n\n        // Returns count of items in one line\n        int GetItemsInLine() const;\n\n        friend class DropDown;\n        friend class CustomDropDown;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::GridLayoutScrollArea)\n{\n    BASE_CLASS(o2::ScrollArea);\n}\nEND_META;\nCLASS_FIELDS_META(o2::GridLayoutScrollArea)\n{\n    FIELD().PUBLIC().NAME(getItemsCountFunc);\n    FIELD().PUBLIC().NAME(getItemsRangeFunc);\n    FIELD().PUBLIC().NAME(setupItemFunc);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mItemSample);\n    FIELD().PROTECTED().NAME(mItemsPool);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mItemsSpacing);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1).NAME(mMinVisibleItemIdx);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1).NAME(mMaxVisibleItemIdx);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mPrevItemsInLine);\n}\nEND_META;\nCLASS_METHODS_META(o2::GridLayoutScrollArea)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const GridLayoutScrollArea&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItemSample, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Widget>&, GetItemSample);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItemsSpacing, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vec2F&, GetItemsSpacing);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnItemsUpdated, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, ScrollTo, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, CalculateScrollArea);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveScrollPosition, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(int, GetItemsCount);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<void*>, GetItemsRange, int, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetupItemWidget, const Ref<Widget>&, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateVisibleItems);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Widget>, GetItemUnderPoint, const Vec2F&, int*);\n    FUNCTION().PROTECTED().SIGNATURE(int, GetItemsInLine);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/HorizontalLayout.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"HorizontalLayout.h\"\n\n#include \"o2/Scene/UI/WidgetLayout.h\"\n\nnamespace o2\n{\n    HorizontalLayout::HorizontalLayout(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        SetLayoutDirty();\n    }\n\n    HorizontalLayout::HorizontalLayout(RefCounter* refCounter, const HorizontalLayout& other) :\n        Widget(refCounter, other), mBaseCorner(other.mBaseCorner), mSpacing(other.mSpacing), mBorder(other.mBorder), mExpandWidth(other.mExpandWidth),\n        mExpandHeight(other.mExpandHeight), mFitByChildren(other.mFitByChildren)\n    {\n        for (auto& child : mChildWidgets)\n            child->GetLayoutData().drivenByParent = true;\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    HorizontalLayout::~HorizontalLayout()\n    { }\n\n    HorizontalLayout& HorizontalLayout::operator=(const HorizontalLayout& other)\n    {\n        Widget::operator=(other);\n\n        mBaseCorner = other.mBaseCorner;\n        mSpacing = other.mSpacing;\n        mBorder = other.mBorder;\n        mExpandWidth = other.mExpandWidth;\n        mExpandHeight = other.mExpandHeight;\n\n        for (auto& child : mChildWidgets)\n            child->GetLayoutData().drivenByParent = true;\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void HorizontalLayout::SetBaseCorner(BaseCorner baseCorner)\n    {\n        mBaseCorner = baseCorner;\n        layout->SetDirty();\n    }\n\n    BaseCorner HorizontalLayout::GetBaseCorner() const\n    {\n        return mBaseCorner;\n    }\n\n    void HorizontalLayout::SetSpacing(float spacing)\n    {\n        mSpacing = spacing;\n        layout->SetDirty();\n    }\n\n    float HorizontalLayout::GetSpacing() const\n    {\n        return mSpacing;\n    }\n\n    void HorizontalLayout::SetBorder(const BorderF& border)\n    {\n        mBorder = border;\n        layout->SetDirty();\n    }\n\n    BorderF HorizontalLayout::GetBorder() const\n    {\n        return mBorder;\n    }\n\n    void HorizontalLayout::SetBorderLeft(float value)\n    {\n        mBorder.left = value;\n        layout->SetDirty();\n    }\n\n    float HorizontalLayout::GetBorderLeft() const\n    {\n        return mBorder.left;\n    }\n\n    void HorizontalLayout::SetBorderRight(float value)\n    {\n        mBorder.right = value;\n        layout->SetDirty();\n    }\n\n    float HorizontalLayout::GetBorderRight() const\n    {\n        return mBorder.right;\n    }\n\n    void HorizontalLayout::SetBorderTop(float value)\n    {\n        mBorder.top = value;\n        layout->SetDirty();\n    }\n\n    float HorizontalLayout::GetBorderTop() const\n    {\n        return mBorder.top;\n    }\n\n    void HorizontalLayout::SetBorderBottom(float value)\n    {\n        mBorder.bottom = value;\n        layout->SetDirty();\n    }\n\n    float HorizontalLayout::GetBorderBottom() const\n    {\n        return mBorder.bottom;\n    }\n\n    void HorizontalLayout::SetWidthExpand(bool expand)\n    {\n        mExpandWidth = expand;\n        layout->SetDirty();\n    }\n\n    bool HorizontalLayout::IsWidthExpand() const\n    {\n        return mExpandWidth;\n    }\n\n    void HorizontalLayout::SetHeightExpand(bool expand)\n    {\n        mExpandHeight = expand;\n        layout->SetDirty();\n    }\n\n    bool HorizontalLayout::IsHeightExpand() const\n    {\n        return mExpandHeight;\n    }\n\n    void HorizontalLayout::SetFitByChildren(bool fit)\n    {\n        mFitByChildren = fit;\n        layout->SetDirty();\n    }\n\n    bool HorizontalLayout::IsFittingByChildren() const\n    {\n        return mFitByChildren;\n    }\n\n    void HorizontalLayout::UpdateSelfTransform()\n    {\n        UpdateLayoutParametres();\n\n        if (mFitByChildren)\n            ExpandSizeByChilds();\n\n        Widget::UpdateSelfTransform();\n\n        RearrangeChilds();\n    }\n\n    String HorizontalLayout::GetCreateMenuGroup()\n    {\n        return \"Layout\";\n    }\n\n    float HorizontalLayout::GetMinWidthWithChildren() const\n    {\n        if (!mFitByChildren)\n            return Widget::GetMinWidthWithChildren();\n\n        float res = mBorder.left + mBorder.right + Math::Max(mChildWidgets.Count() - 1, 0)*mSpacing;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n                res += child->GetMinWidthWithChildren();\n        }\n\n        res = Math::Max(res, GetLayoutData().minSize.x);\n\n        return res;\n    }\n\n    float HorizontalLayout::GetMinHeightWithChildren() const\n    {\n        if (!mFitByChildren)\n            return Widget::GetMinHeightWithChildren();\n\n        float res = 0;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n                res = Math::Max(res, child->GetMinHeightWithChildren() + mBorder.top + mBorder.bottom);\n        }\n\n        res = Math::Max(res, GetLayoutData().minSize.y);\n\n        return res;\n    }\n\n    float HorizontalLayout::GetWidthWeightWithChildren() const\n    {\n        float res = 0;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n                res += child->GetWidthWeightWithChildren();\n        }\n\n        return res;\n    }\n\n    void HorizontalLayout::OnChildAdded(const Ref<Widget>& child)\n    {\n        child->GetLayoutData().drivenByParent = true;\n        Widget::OnChildAdded(child);\n    }\n\n    void HorizontalLayout::OnChildRemoved(const Ref<Widget>& child)\n    {\n        child->GetLayoutData().drivenByParent = false;\n        Widget::OnChildRemoved(child);\n    }\n\n    void HorizontalLayout::RearrangeChilds()\n    {\n        UpdateLayoutParametres();\n\n        switch (mBaseCorner)\n        {\n            case BaseCorner::LeftBottom:\n            case BaseCorner::Left:\n            case BaseCorner::LeftTop:\n            ArrangeFromLeftToRight();\n            break;\n\n            case BaseCorner::RightBottom:\n            case BaseCorner::Right:\n            case BaseCorner::RightTop:\n            ArrangeFromRightToLeft();\n            break;\n\n            case BaseCorner::Bottom:\n            case BaseCorner::Center:\n            case BaseCorner::Top:\n            ArrangeFromCenter();\n            break;\n        }\n\n    }\n\n    void HorizontalLayout::UpdateLayoutParametres()\n    {\n        GetLayoutData().weight.x = 0;\n\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n                GetLayoutData().weight.x += child->GetWidthWeightWithChildren();\n        }\n\n        if (GetLayoutData().weight.x < FLT_EPSILON)\n            GetLayoutData().weight.x = 1.0f;\n\n        layout->EnableSizeChecks();\n    }\n\n    void HorizontalLayout::ArrangeFromCenter()\n    {\n        if (mExpandWidth)\n        {\n            float availableWidth = GetChildrenWorldRect().Width() - mBorder.left - mBorder.right;\n            float totalWidth = availableWidth;\n            float position = -totalWidth*0.5f;\n            auto widgets = mChildWidgets;\n            auto widths = CalculateExpandedSize(widgets, true, GetChildrenWorldRect().Width() - mBorder.left - mBorder.right,\n                mSpacing);\n\n            int i = 0;\n            for (auto& child : widgets)\n            {\n                child->GetLayoutData().offsetMin.x = position;\n                position += widths[i++];\n\n                child->GetLayoutData().offsetMax.x = position;\n                position += mSpacing;\n\n                AlignWidgetByHeight(child, 0.5f);\n            }\n        }\n        else\n        {\n            float totalWidth = mChildWidgets.Sum<float>([&](auto& child) { return child->GetMinWidthWithChildren(); });\n            totalWidth += (mChildWidgets.Count() - 1)*mSpacing;\n            float position = -totalWidth*0.5f;\n            for (auto& child : mChildWidgets)\n            {\n                if (!child->mResEnabledInHierarchy)\n                    continue;\n\n                child->GetLayoutData().offsetMin.x = position;\n                position += Math::Abs(Math::Max(child->GetLayoutData().minSize.x, child->GetMinWidthWithChildren()));\n\n                child->GetLayoutData().offsetMax.x = position;\n                position += mSpacing;\n\n                AlignWidgetByHeight(child, 0.5f);\n            }\n        }\n    }\n\n    void HorizontalLayout::ArrangeFromLeftToRight()\n    {\n        if (mExpandWidth)\n        {\n            float position = mBorder.left;\n            auto widgets = mChildWidgets;\n            auto widths = CalculateExpandedSize(widgets, true, GetChildrenWorldRect().Width() - mBorder.left - mBorder.right,\n                mSpacing);\n\n            int i = 0;\n            for (auto& child : widgets)\n            {\n                child->GetLayoutData().offsetMin.x = position;\n                position += widths[i++];\n\n                child->GetLayoutData().offsetMax.x = position;\n                position += mSpacing;\n\n                AlignWidgetByHeight(child, 0.0f);\n            }\n        }\n        else\n        {\n            float position = mBorder.left;\n            for (auto& child : mChildWidgets)\n            {\n                if (!child->mResEnabledInHierarchy)\n                    continue;\n\n                child->GetLayoutData().offsetMin.x = position;\n                position += Math::Abs(Math::Max(child->GetLayoutData().minSize.x, child->GetMinWidthWithChildren()));\n\n                child->GetLayoutData().offsetMax.x = position;\n                position += mSpacing;\n\n                AlignWidgetByHeight(child, 0.0f);\n            }\n        }\n    }\n\n    void HorizontalLayout::ArrangeFromRightToLeft()\n    {\n        if (mExpandWidth)\n        {\n            float position = mBorder.right;\n            auto widgets = mChildWidgets;\n            auto widths = CalculateExpandedSize(widgets, true, GetChildrenWorldRect().Width() - mBorder.left - mBorder.right,\n                mSpacing);\n\n            int i = 0;\n            for (auto& child : widgets)\n            {\n                child->GetLayoutData().offsetMax.x = -position;\n                position += widths[i++];\n\n                child->GetLayoutData().offsetMin.x = -position;\n                position += mSpacing;\n\n                AlignWidgetByHeight(child, 1.0f);\n            }\n        }\n        else\n        {\n            float position = mBorder.right;\n            for (auto& child : mChildWidgets)\n            {\n                if (!child->mResEnabledInHierarchy)\n                    continue;\n\n                child->GetLayoutData().offsetMax.x = -position;\n                position += Math::Abs(Math::Max(child->GetLayoutData().minSize.x, child->GetMinWidthWithChildren()));\n\n                child->GetLayoutData().offsetMin.x = -position;\n                position += mSpacing;\n\n                AlignWidgetByHeight(child, 1.0f);\n            }\n        }\n    }\n\n    void HorizontalLayout::AlignWidgetByHeight(const Ref<Widget>& child, float widthAnchor)\n    {\n        if (mExpandHeight)\n        {\n            child->GetLayoutData().anchorMin = Vec2F(widthAnchor, 0);\n            child->GetLayoutData().anchorMax = Vec2F(widthAnchor, 1);\n            child->GetLayoutData().offsetMin.y = mBorder.bottom;\n            child->GetLayoutData().offsetMax.y = -mBorder.top;\n        }\n        else\n        {\n            float height = child->layout->height;\n            if (mBaseCorner == BaseCorner::Bottom || mBaseCorner == BaseCorner::LeftBottom || mBaseCorner == BaseCorner::RightBottom)\n            {\n                child->GetLayoutData().anchorMin = Vec2F(widthAnchor, 0);\n                child->GetLayoutData().anchorMax = Vec2F(widthAnchor, 0);\n                child->GetLayoutData().offsetMin.y = mBorder.bottom;\n                child->GetLayoutData().offsetMax.y = mBorder.bottom + height;\n            }\n            if (mBaseCorner == BaseCorner::Center || mBaseCorner == BaseCorner::Left || mBaseCorner == BaseCorner::Right)\n            {\n                child->GetLayoutData().anchorMin = Vec2F(widthAnchor, 0.5f);\n                child->GetLayoutData().anchorMax = Vec2F(widthAnchor, 0.5f);\n                child->GetLayoutData().offsetMin.y = -height*0.5f;\n                child->GetLayoutData().offsetMax.y = height*0.5f;\n            }\n            if (mBaseCorner == BaseCorner::Top || mBaseCorner == BaseCorner::LeftTop || mBaseCorner == BaseCorner::RightTop)\n            {\n                child->GetLayoutData().anchorMin = Vec2F(widthAnchor, 1);\n                child->GetLayoutData().anchorMax = Vec2F(widthAnchor, 1);\n                child->GetLayoutData().offsetMin.y = -mBorder.top - height;\n                child->GetLayoutData().offsetMax.y = -mBorder.top;\n            }\n        }\n    }\n\n    void HorizontalLayout::ExpandSizeByChilds()\n    {\n        const static Vec2F relativePivots[] = {\n            Vec2F(0.0f, 0.5f), // Left\n            Vec2F(1.0f, 0.5f), // Right\n            Vec2F(0.5f, 1.0f), // Top\n            Vec2F(0.5f, 0.0f), // Bottom\n            Vec2F(0.5f, 0.5f), // Center\n            Vec2F(0.0f, 0.0f), // LeftBottom\n            Vec2F(0.0f, 1.0f), // LeftTop\n            Vec2F(1.0f, 0.0f), // RightBottom\n            Vec2F(1.0f, 1.0f)  // RightTop\n        };\n\n        Vec2F relativePivot = relativePivots[(int)mBaseCorner];\n        Vec2F size(GetMinWidthWithChildren(), GetMinHeightWithChildren());\n\n        Vec2F parentSize = mParent ? mParent.Lock()->transform->size : Vec2F();\n        Vec2F szDelta = size - (GetLayoutData().offsetMax - GetLayoutData().offsetMin + (GetLayoutData().anchorMax - GetLayoutData().anchorMin)*parentSize);\n\n        if (mExpandWidth)\n            szDelta.x = 0;\n\n        if (mExpandHeight)\n            szDelta.y = 0;\n\n        GetLayoutData().offsetMax += szDelta*(Vec2F::One() - relativePivot);\n        GetLayoutData().offsetMin -= szDelta*relativePivot;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::HorizontalLayout>);\n// --- META ---\n\nDECLARE_CLASS(o2::HorizontalLayout, o2__HorizontalLayout);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/HorizontalLayout.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n\nnamespace o2\n{\n    // ------------------------\n    // Horizontal layout widget\n    // ------------------------\n    class HorizontalLayout: public Widget\n    {\n    public:\n        PROPERTIES(HorizontalLayout);\n        PROPERTY(BaseCorner, baseCorner, SetBaseCorner, GetBaseCorner);  // Base corder property\n\n        PROPERTY(float, spacing, SetSpacing, GetSpacing);                // Space between widgets property\n        PROPERTY(BorderF, border, SetBorder, GetBorder);                 // Border property\n        PROPERTY(float, borderLeft, SetBorderLeft, GetBorderLeft);       // Left border property\n        PROPERTY(float, borderRight, SetBorderRight, GetBorderRight);    // Right border property\n        PROPERTY(float, borderTop, SetBorderTop, GetBorderTop);          // Top border property\n        PROPERTY(float, borderBottom, SetBorderBottom, GetBorderBottom); // Bottom border property\n\n        PROPERTY(bool, expandWidth, SetWidthExpand, IsWidthExpand);    // Expand children by width property\n        PROPERTY(bool, expandHeight, SetHeightExpand, IsHeightExpand); // Expand children by height property\n\n        PROPERTY(bool, fitByChildren, SetFitByChildren, IsFittingByChildren); // Fitting size by children property\n\n    public:\n        // Default constructor\n        explicit HorizontalLayout(RefCounter* refCounter);\n\n        // Copy-constructor\n        HorizontalLayout(RefCounter* refCounter, const HorizontalLayout& other);\n\n        // Destructor\n        ~HorizontalLayout();\n\n        // Copy operator\n        HorizontalLayout& operator=(const HorizontalLayout& other);\n\n        // Sets base corner\n        void SetBaseCorner(BaseCorner baseCorner);\n\n        // Returns base corner\n        BaseCorner GetBaseCorner() const;\n\n        // Sets space between widgets\n        void SetSpacing(float spacing);\n\n        // Returns space between widgets\n        float GetSpacing() const;\n\n        // Sets border\n        void SetBorder(const BorderF& border);\n\n        // Returns border\n        BorderF GetBorder() const;\n\n        // Sets left border\n        void SetBorderLeft(float value);\n\n        // Returns left border\n        float GetBorderLeft() const;\n\n        // Sets right border\n        void SetBorderRight(float value);\n\n        // Returns right border\n        float GetBorderRight() const;\n\n        // Sets top border\n        void SetBorderTop(float value);\n\n        // Returns top border\n        float GetBorderTop() const;\n\n        // Sets bottom border\n        void SetBorderBottom(float value);\n\n        // Returns bottom border\n        float GetBorderBottom() const;\n\n        // Sets expanding by width\n        void SetWidthExpand(bool expand);\n\n        // Returns expanding by width\n        bool IsWidthExpand() const;\n\n        // Sets expanding by height\n        void SetHeightExpand(bool expand);\n\n        // Returns height expand\n        bool IsHeightExpand() const;\n\n        // Sets fitting size by children\n        void SetFitByChildren(bool fit);\n\n        // Returns fitting by children\n        bool IsFittingByChildren() const;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(HorizontalLayout);\n        CLONEABLE_REF(HorizontalLayout);\n\n    protected:\n        BaseCorner mBaseCorner = BaseCorner::Left; // Base corner of widgets arranging @SERIALIZABLE\n        float      mSpacing = 0.0f;                // Space between widgets @SERIALIZABLE\n        BorderF    mBorder;                        // Border @SERIALIZABLE\n        bool       mExpandWidth = true;            // Expanding by width @SERIALIZABLE\n        bool       mExpandHeight = true;           // Expanding by height @SERIALIZABLE\n        bool       mFitByChildren = false;         // Fitting by children @SERIALIZABLE\n\n    protected:\n        // Returns layout width\n        float GetMinWidthWithChildren() const override;\n\n        // Returns layout height\n        float GetMinHeightWithChildren() const override;\n\n        // Returns layout width weight with children\n        float GetWidthWeightWithChildren() const override;\n\n        // Called when child widget was added\n        void OnChildAdded(const Ref<Widget>& child) override;\n\n        // Called when child widget was removed\n        void OnChildRemoved(const Ref<Widget>& child) override;\n\n        // Invokes required function for childs arranging\n        void RearrangeChilds();\n\n        // Arranging child from left to right by bottom, middle and top\n        void ArrangeFromLeftToRight();\n\n        // Arranging child from right to left by bottom, middle and top\n        void ArrangeFromRightToLeft();\n\n        // Arranging child from center by bottom, middle and top\n        void ArrangeFromCenter();\n\n        // Expands size by children\n        void ExpandSizeByChilds();\n\n        // Aligns widget by height with base corner\n        void AlignWidgetByHeight(const Ref<Widget>& child, float widthAnchor);\n\n        // Updates layout's weight and minimal size\n        void UpdateLayoutParametres();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::HorizontalLayout)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(o2::HorizontalLayout)\n{\n    FIELD().PUBLIC().NAME(baseCorner);\n    FIELD().PUBLIC().NAME(spacing);\n    FIELD().PUBLIC().NAME(border);\n    FIELD().PUBLIC().NAME(borderLeft);\n    FIELD().PUBLIC().NAME(borderRight);\n    FIELD().PUBLIC().NAME(borderTop);\n    FIELD().PUBLIC().NAME(borderBottom);\n    FIELD().PUBLIC().NAME(expandWidth);\n    FIELD().PUBLIC().NAME(expandHeight);\n    FIELD().PUBLIC().NAME(fitByChildren);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(BaseCorner::Left).NAME(mBaseCorner);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mSpacing);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mBorder);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mExpandWidth);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mExpandHeight);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mFitByChildren);\n}\nEND_META;\nCLASS_METHODS_META(o2::HorizontalLayout)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const HorizontalLayout&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBaseCorner, BaseCorner);\n    FUNCTION().PUBLIC().SIGNATURE(BaseCorner, GetBaseCorner);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSpacing, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSpacing);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorder, const BorderF&);\n    FUNCTION().PUBLIC().SIGNATURE(BorderF, GetBorder);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderLeft, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderLeft);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderRight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderRight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderTop, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderTop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderBottom, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderBottom);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWidthExpand, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsWidthExpand);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeightExpand, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsHeightExpand);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFitByChildren, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFittingByChildren);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetMinWidthWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetMinHeightWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetWidthWeightWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildAdded, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildRemoved, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, RearrangeChilds);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromLeftToRight);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromRightToLeft);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromCenter);\n    FUNCTION().PROTECTED().SIGNATURE(void, ExpandSizeByChilds);\n    FUNCTION().PROTECTED().SIGNATURE(void, AlignWidgetByHeight, const Ref<Widget>&, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayoutParametres);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/HorizontalProgress.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalProgress.h\"\n\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n\nnamespace o2\n{\n    HorizontalProgress::HorizontalProgress(RefCounter* refCounter):\n        Widget(refCounter), DrawableCursorEventsListener(this)\n    {}\n\n    HorizontalProgress::HorizontalProgress(RefCounter* refCounter, const HorizontalProgress& other) :\n        Widget(refCounter, other), DrawableCursorEventsListener(this), mValue(other.mValue), mMinValue(other.mMinValue),\n        mMaxValue(other.mMaxValue), mOrientation(other.mOrientation), mScrollSense(other.mScrollSense)\n    {\n        mBarLayer = FindLayer(\"bar\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n    }\n\n    HorizontalProgress::~HorizontalProgress()\n    {}\n\n    HorizontalProgress& HorizontalProgress::operator=(const HorizontalProgress& other)\n    {\n        Widget::operator=(other);\n\n        mValue = other.mValue;\n        mMinValue = other.mMinValue;\n        mMaxValue = other.mMaxValue;\n        mOrientation = other.mOrientation;\n        mScrollSense = other.mScrollSense;\n\n        mBarLayer = FindLayer(\"bar\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void HorizontalProgress::Update(float dt)\n    {\n        Widget::Update(dt);\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        const float threshold = 0.01f;\n        const float smoothCoef = 30.0f;\n\n        if (!Math::Equals(mValue, mSmoothValue, threshold))\n        {\n            mSmoothValue = Math::Clamp(Math::Lerpc(mSmoothValue, mValue, dt*smoothCoef), mMinValue, mMaxValue);\n\n            if (Math::Abs(mValue - mSmoothValue) < threshold)\n                mSmoothValue = mValue;\n\n            UpdateProgressLayersLayouts();\n        }\n    }\n\n    void HorizontalProgress::SetValue(float value, bool byUser /*= false*/)\n    {\n        mValue = Math::Clamp(value, mMinValue, mMaxValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(mValue);\n\n        if (byUser)\n            onChangeByUser(mValue);\n    }\n\n    void HorizontalProgress::SetValueForcible(float value)\n    {\n        mValue = Math::Clamp(value, mMinValue, mMaxValue);\n        mSmoothValue = mValue;\n        UpdateProgressLayersLayouts();\n\n        onChange(mValue);\n    }\n\n    float HorizontalProgress::GetValue() const\n    {\n        return mValue;\n    }\n\n    void HorizontalProgress::SetMinValue(float minValue)\n    {\n        mMinValue = minValue;\n        mValue = Math::Max(mMinValue, mValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    float HorizontalProgress::GetMinValue() const\n    {\n        return mMinValue;\n    }\n\n    void HorizontalProgress::SetMaxValue(float maxValue)\n    {\n        mMaxValue = maxValue;\n        mValue = Math::Min(mMaxValue, mValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    float HorizontalProgress::GetMaxValue() const\n    {\n        return mMaxValue;\n    }\n\n    void HorizontalProgress::SetValueRange(float minValue, float maxValue)\n    {\n        mMaxValue = maxValue;\n        mValue = Math::Clamp(mValue, mMinValue, mMaxValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    void HorizontalProgress::SetScrollSense(float coef)\n    {\n        mScrollSense = coef;\n    }\n\n    float HorizontalProgress::GetScrollSense() const\n    {\n        return mScrollSense;\n    }\n\n    void HorizontalProgress::SetOrientation(Orientation orientation)\n    {\n        mOrientation = orientation;\n        UpdateLayersLayouts();\n    }\n\n    HorizontalProgress::Orientation HorizontalProgress::GetOrientation() const\n    {\n        return mOrientation;\n    }\n\n    bool HorizontalProgress::IsUnderPoint(const Vec2F& point)\n    {\n        if (mBackLayer)\n            return mDrawingScissorRect.IsInside(point) && mBackLayer->IsUnderPoint(point);\n\n        return false;\n    }\n\n    bool HorizontalProgress::IsScrollable() const\n    {\n        return true;\n    }\n\n    void HorizontalProgress::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = true;\n\n        GetValueFromCursor(cursor);\n    }\n\n    void HorizontalProgress::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n    }\n\n    void HorizontalProgress::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n    }\n\n    void HorizontalProgress::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        GetValueFromCursor(cursor);\n    }\n\n    void HorizontalProgress::GetValueFromCursor(const Input::Cursor &cursor)\n    {\n        float width = layout->width;\n        float d = mMaxValue - mMinValue;\n        if (mOrientation == Orientation::Right)\n            SetValue((cursor.position.x - layout->worldLeft)/width*d + mMinValue, true);\n        else\n            SetValue((width - (cursor.position.x - layout->worldLeft))/width*d + mMinValue, true);\n    }\n\n    void HorizontalProgress::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = true;\n    }\n\n    void HorizontalProgress::OnCursorExit(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = false;\n    }\n\n    void HorizontalProgress::OnScrolled(float scroll)\n    {\n        SetValue(mValue + scroll*mScrollSense);\n    }\n\n    void HorizontalProgress::OnDeserialized(const DataValue& node)\n    {\n        Widget::OnDeserialized(node);\n\n        mBarLayer = FindLayer(\"bar\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n    }\n\n    void HorizontalProgress::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        interactable = true;\n    }\n\n    void HorizontalProgress::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        interactable = false;\n    }\n\n    void HorizontalProgress::UpdateLayersLayouts()\n    {\n        UpdateProgressLayersLayouts();\n    }\n\n    void HorizontalProgress::UpdateProgressLayersLayouts()\n    {\n        if (mBarLayer)\n        {\n            mBarLayer->layout.offsetMin = Vec2F();\n            mBarLayer->layout.offsetMax = Vec2F();\n\n            if (mOrientation == Orientation::Right)\n            {\n                mBarLayer->layout.anchorMin = Vec2F(0, 0);\n                mBarLayer->layout.anchorMax = Vec2F((mSmoothValue - mMinValue)/(mMaxValue - mMinValue), 1);\n            }\n            else if (mOrientation == Orientation::Left)\n            {\n                mBarLayer->layout.anchorMin = Vec2F(1.0f - (mSmoothValue - mMinValue)/(mMaxValue - mMinValue), 0.0f);\n                mBarLayer->layout.anchorMax = Vec2F(1, 1);\n            }\n        }\n\n        if (mBackLayer)\n            mBackLayer->layout = Layout::BothStretch();\n\n        Widget::UpdateLayersLayouts();\n    }\n\n    void HorizontalProgress::OnLayerAdded(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->name == \"back\")\n            mBackLayer = layer;\n        else if (layer->name == \"bar\")\n            mBarLayer = layer;\n\n        UpdateProgressLayersLayouts();\n    }\n\n    String HorizontalProgress::GetCreateMenuGroup()\n    {\n        return \"Progress\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::HorizontalProgress>);\n// --- META ---\n\nENUM_META(o2::HorizontalProgress::Orientation, o2__HorizontalProgress__Orientation)\n{\n    ENUM_ENTRY(Left);\n    ENUM_ENTRY(Right);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::HorizontalProgress, o2__HorizontalProgress);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/HorizontalProgress.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n\nnamespace o2\n{\n    // -----------------------\n    // Horizontal progress bar\n    // -----------------------\n    class HorizontalProgress: public Widget, public DrawableCursorEventsListener\n    {\n    public:\n        enum class Orientation { Right, Left };\n\n    public:\n        PROPERTIES(HorizontalProgress);\n        PROPERTY(float, value, SetValue, GetValue);          // Current value property\n\n        PROPERTY(float, minValue, SetMinValue, GetMinValue); // Minimal value property\n        PROPERTY(float, maxValue, SetMaxValue, GetMaxValue); // Maximal value property\n\n        PROPERTY(float, scrollSense, SetScrollSense, GetScrollSense); // Scroll sense coefficient\n\n    public:\n        Function<void(float)> onChange;      // On Value changed event\n        Function<void(float)> onChangeByUser; // On Value changed by user event\n\n    public:\n        // Constructor\n        explicit HorizontalProgress(RefCounter* refCounter);\n\n        // Copy-constructor\n        HorizontalProgress(RefCounter* refCounter, const HorizontalProgress& other);\n\n        // Destructor\n        ~HorizontalProgress();\n\n        // Copy-operator\n        HorizontalProgress& operator=(const HorizontalProgress& other);\n\n        // Updates widget and smooth value changing\n        void Update(float dt) override;\n\n        // Sets value\n        void SetValue(float value, bool byUser = false);\n\n        // Sets value forcible, without smoothing\n        void SetValueForcible(float value);\n\n        // Returns value\n        float GetValue() const;\n\n        // Sets minimal value\n        void SetMinValue(float minValue);\n\n        // Returns minimal value\n        float GetMinValue() const;\n\n        // Sets maximal value\n        void SetMaxValue(float maxValue);\n\n        // Returns maximal value\n        float GetMaxValue() const;\n\n        // Sets value range\n        void SetValueRange(float minValue, float maxValue);\n\n        // Sets scroll sense\n        void SetScrollSense(float coef);\n\n        // Returns scroll sense\n        float GetScrollSense() const;\n\n        // Sets bar orientation\n        void SetOrientation(Orientation orientation);\n\n        // Returns bar orientation\n        Orientation GetOrientation() const;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(HorizontalProgress);\n        CLONEABLE_REF(HorizontalProgress);\n\n    protected:\n        float        mValue = 0.0f;                     // Current value @SERIALIZABLE\n        float        mSmoothValue = 0.0f;               // Current smoothed value\n        float        mMinValue = 0.0f;                  // Minimal value @SERIALIZABLE\n        float        mMaxValue = 1.0f;                  // Maximal value @SERIALIZABLE\n        float        mScrollSense = 1.0f;               // Scroll sense coefficient @SERIALIZABLE\n        Orientation  mOrientation = Orientation::Right; // Bar orientation @SERIALIZABLE\n\n        Ref<WidgetLayer> mBarLayer;  // Bar layer\n        Ref<WidgetLayer> mBackLayer; // background layer\n\n    protected:\n        // Called when new layer was added. Here searching bar, back and handle layers\n        void OnLayerAdded(const Ref<WidgetLayer>& layer) override;\n\n        // Called when deserialized\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Updates layers layouts, calls after updating widget layout\n        void UpdateLayersLayouts() override;\n\n        // Updates bar, back and handle layers layout by value\n        void UpdateProgressLayersLayouts();\n\n        // Gets value from cursor position, depends on orientation\n        void GetValueFromCursor(const Input::Cursor& cursor);\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::HorizontalProgress::Orientation);\n\nCLASS_BASES_META(o2::HorizontalProgress)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::DrawableCursorEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::HorizontalProgress)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(minValue);\n    FIELD().PUBLIC().NAME(maxValue);\n    FIELD().PUBLIC().NAME(scrollSense);\n    FIELD().PUBLIC().NAME(onChange);\n    FIELD().PUBLIC().NAME(onChangeByUser);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mSmoothValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mMinValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mMaxValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mScrollSense);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Orientation::Right).NAME(mOrientation);\n    FIELD().PROTECTED().NAME(mBarLayer);\n    FIELD().PROTECTED().NAME(mBackLayer);\n}\nEND_META;\nCLASS_METHODS_META(o2::HorizontalProgress)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const HorizontalProgress&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, float, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueForcible, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMinValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetMinValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetMaxValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueRange, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScrollSense, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScrollSense);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetOrientation, Orientation);\n    FUNCTION().PUBLIC().SIGNATURE(Orientation, GetOrientation);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerAdded, const Ref<WidgetLayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateProgressLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, GetValueFromCursor, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/HorizontalScrollBar.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"HorizontalScrollBar.h\"\n\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    HorizontalScrollBar::HorizontalScrollBar(RefCounter* refCounter):\n        Widget(refCounter), DrawableCursorEventsListener(this)\n    {}\n\n    HorizontalScrollBar::HorizontalScrollBar(RefCounter* refCounter, const HorizontalScrollBar& other) :\n        Widget(refCounter, other), DrawableCursorEventsListener(this), mValue(other.mValue), mMinValue(other.mMinValue),\n        mMaxValue(other.mMaxValue), mScrollSense(other.mScrollSense), mScrollHandleSize(other.mScrollHandleSize),\n        mHandlePressed(false), mScrollhandleMinPxSize(other.mScrollhandleMinPxSize), mSmoothValue(other.mValue)\n    {\n        mHandleLayer = FindLayer(\"handle\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n    }\n\n    HorizontalScrollBar::~HorizontalScrollBar()\n    {}\n\n    HorizontalScrollBar& HorizontalScrollBar::operator=(const HorizontalScrollBar& other)\n    {\n        Widget::operator=(other);\n\n        mValue = other.mValue;\n        mMinValue = other.mMinValue;\n        mMaxValue = other.mMaxValue;\n        mScrollSense = other.mScrollSense;\n        mScrollHandleSize = other.mScrollHandleSize;\n        mScrollhandleMinPxSize = other.mScrollhandleMinPxSize;\n        mSmoothValue = mValue;\n        mHandlePressed = false;\n\n        mHandleLayer = FindLayer(\"handle\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void HorizontalScrollBar::Update(float dt)\n    {\n        Widget::Update(dt);\n\n        const float threshold = 0.01f;\n        const float smoothCoef = 30.0f;\n\n        if (!Math::Equals(mValue, mSmoothValue, threshold))\n        {\n            mSmoothValue = Math::Clamp(Math::Lerpc(mSmoothValue, mValue, dt*smoothCoef), mMinValue, mMaxValue);\n\n            if (Math::Abs(mValue - mSmoothValue) < threshold)\n                mSmoothValue = mValue;\n\n            UpdateProgressLayersLayouts();\n\n            onSmoothChange(mSmoothValue);\n        }\n    }\n\n    void HorizontalScrollBar::SetValue(float value)\n    {\n        mValue = Math::Clamp(value, mMinValue, mMaxValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    void HorizontalScrollBar::SetValueForcible(float value)\n    {\n        mValue = Math::Clamp(value, mMinValue, mMaxValue);\n        mSmoothValue = mValue;\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n        onSmoothChange(mSmoothValue);\n    }\n\n    float HorizontalScrollBar::GetValue() const\n    {\n        return mValue;\n    }\n\n    float HorizontalScrollBar::GetSmoothValue() const\n    {\n        return mSmoothValue;\n    }\n\n    void HorizontalScrollBar::SetMinValue(float minValue)\n    {\n        mMinValue = minValue;\n        mValue = Math::Max(mMinValue, mValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    float HorizontalScrollBar::GetMinValue() const\n    {\n        return mMinValue;\n    }\n\n    void HorizontalScrollBar::SetMaxValue(float maxValue)\n    {\n        mMaxValue = maxValue;\n        mValue = Math::Min(mMaxValue, mValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    float HorizontalScrollBar::GetMaxValue() const\n    {\n        return mMaxValue;\n    }\n\n    void HorizontalScrollBar::SetValueRange(float minValue, float maxValue)\n    {\n        mMinValue = Math::Min(maxValue, minValue);\n        mMaxValue = Math::Max(maxValue, minValue);\n        mValue = Math::Clamp(mValue, mMinValue, mMaxValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    void HorizontalScrollBar::SetScrollSense(float coef)\n    {\n        mScrollSense = coef;\n    }\n\n    float HorizontalScrollBar::GetScrollSense() const\n    {\n        return mScrollSense;\n    }\n\n    void HorizontalScrollBar::SetScrollHandleSize(float size)\n    {\n        mScrollHandleSize = size;\n        UpdateProgressLayersLayouts();\n    }\n\n    float HorizontalScrollBar::GetScrollHandleSize() const\n    {\n        return mScrollHandleSize;\n    }\n\n    bool HorizontalScrollBar::IsUnderPoint(const Vec2F& point)\n    {\n        if (!mDrawingScissorRect.IsInside(point))\n            return false;\n\n        if (mHandleLayer && mHandleLayer->IsUnderPoint(point))\n            return true;\n\n        if (mBackLayer && mBackLayer->IsUnderPoint(point))\n            return true;\n\n        return false;\n    }\n\n    bool HorizontalScrollBar::IsScrollable() const\n    {\n        return !Math::Equals(mMinValue, mMaxValue);\n    }\n\n    void HorizontalScrollBar::OnCursorPressed(const Input::Cursor& cursor)\n    {\n\n        if (mHandleLayer && mHandleLayer->IsUnderPoint(cursor.position))\n        {\n            mHandlePressed = true;\n            float pressedValue = GetValueFromCursor(cursor);\n            mPressHandleOffset = mValue - pressedValue;\n\n            auto pressedState = state[\"pressed\"];\n            if (pressedState)\n                *pressedState = true;\n        }\n        else\n        {\n            float pressedValue = GetValueFromCursor(cursor);\n            if (pressedValue > mValue + mScrollHandleSize*0.5f)\n                SetValueFromUser(mValue + mScrollHandleSize);\n            else\n                SetValueFromUser(mValue - mScrollHandleSize);\n        }\n    }\n\n    void HorizontalScrollBar::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        mHandlePressed = false;\n    }\n\n    void HorizontalScrollBar::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        mHandlePressed = false;\n    }\n\n    void HorizontalScrollBar::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (mHandlePressed)\n            SetValueFromUser(GetValueFromCursor(cursor) + mPressHandleOffset);\n        else\n        {\n            const float timeThreshold = 0.5f;\n            const float speed = 5.0f;\n\n            if (cursor.pressedTime > timeThreshold && !(mHandleLayer && mHandleLayer->IsUnderPoint(cursor.position)))\n            {\n                float pressedValue = GetValueFromCursor(cursor);\n                if (pressedValue > mValue + mScrollHandleSize*0.5f)\n                    SetValueFromUser(mValue + mScrollHandleSize*o2Time.GetDeltaTime()*speed);\n                else\n                    SetValueFromUser(mValue - mScrollHandleSize*o2Time.GetDeltaTime()*speed);\n            }\n        }\n    }\n\n    float HorizontalScrollBar::GetValueFromCursor(const Input::Cursor &cursor)\n    {\n        float range = mMaxValue - mMinValue;\n\n        if (Math::Equals(range, 0.0f))\n            return mValue;\n\n        float width = Math::Max(layout->GetWidth(), 1.0f);\n        float minScrollhandleSize = Math::Max(mScrollhandleMinPxSize/width*range, mScrollHandleSize);\n        float rangleWithHandle = range + minScrollhandleSize;\n        float szCoef = minScrollhandleSize/rangleWithHandle;\n\n        return (cursor.position.x - layout->worldLeft)/width*range/(1.0f - szCoef) + mMinValue;\n    }\n\n    void HorizontalScrollBar::SetValueFromUser(float value)\n    {\n        SetValue(value);\n        onChangeByUser(mValue);\n    }\n\n    void HorizontalScrollBar::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = true;\n    }\n\n    void HorizontalScrollBar::OnCursorExit(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = false;\n    }\n\n    void HorizontalScrollBar::OnScrolled(float scroll)\n    {\n        SetValue(mValue - scroll*mScrollSense);\n    }\n\n    void HorizontalScrollBar::OnDeserialized(const DataValue& node)\n    {\n        Widget::OnDeserialized(node);\n\n        mHandleLayer = FindLayer(\"handle\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n    }\n\n    void HorizontalScrollBar::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        interactable = true;\n    }\n\n    void HorizontalScrollBar::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        interactable = false;\n    }\n\n    void HorizontalScrollBar::UpdateLayersLayouts()\n    {\n        UpdateProgressLayersLayouts();\n    }\n\n    void HorizontalScrollBar::SetMinimalScrollHandleSize(float pixelSize)\n    {\n        mScrollhandleMinPxSize = pixelSize;\n        UpdateProgressLayersLayouts();\n    }\n\n    void HorizontalScrollBar::UpdateProgressLayersLayouts()\n    {\n        if (mHandleLayer)\n        {\n            float range = mMaxValue - mMinValue;\n            float width = Math::Max(layout->GetWidth(), 1.0f);\n            float minScrollhandleSize = Math::Max(mScrollhandleMinPxSize/width*range, mScrollHandleSize);\n            float rangeWithHandle = range + minScrollhandleSize;\n            float szCoef = minScrollhandleSize/rangeWithHandle;\n            float szPos = (mSmoothValue - mMinValue)/range*(1.0f - szCoef);\n\n            if (Math::Equals(range, 0.0f))\n            {\n                szPos = 0;\n                szCoef = 1;\n            }\n\n            mHandleLayer->layout.offsetMin = Vec2F();\n            mHandleLayer->layout.offsetMax = Vec2F();\n            mHandleLayer->layout.anchorMin = Vec2F(Math::Clamp01(szPos), 0);\n            mHandleLayer->layout.anchorMax = Vec2F(Math::Clamp01(szPos + szCoef), 1);\n        }\n\n        if (mBackLayer)\n            mBackLayer->layout = Layout::BothStretch();\n\n        Widget::UpdateLayersLayouts();\n    }\n\n    void HorizontalScrollBar::OnLayerAdded(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->name == \"back\")\n            mBackLayer = layer;\n        else if (layer->name == \"handle\")\n            mHandleLayer = layer;\n\n        UpdateProgressLayersLayouts();\n    }\n\n    String HorizontalScrollBar::GetCreateMenuGroup()\n    {\n        return \"Progress\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::HorizontalScrollBar>);\n// --- META ---\n\nDECLARE_CLASS(o2::HorizontalScrollBar, o2__HorizontalScrollBar);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/HorizontalScrollBar.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n\nnamespace o2\n{\n    // -----------------------\n    // Horizontal progress bar\n    // -----------------------\n    class HorizontalScrollBar: public Widget, public DrawableCursorEventsListener\n    {\n    public:\n        PROPERTIES(HorizontalScrollBar);\n        PROPERTY(float, value, SetValue, GetValue);          // Current value property\n\n        PROPERTY(float, minValue, SetMinValue, GetMinValue); // Minimal value property\n        PROPERTY(float, maxValue, SetMaxValue, GetMaxValue); // Maximal value property\n\n        PROPERTY(float, scrollSense, SetScrollSense, GetScrollSense);          // Scroll sense coefficient\n        PROPERTY(float, scrollSize, SetScrollHandleSize, GetScrollHandleSize); // Scroll handle size\n\n    public:\n        Function<void(float)> onChange;       // On Value changing event\n        Function<void(float)> onChangeByUser; // On Value changing from user event\n        Function<void(float)> onSmoothChange; // On smooth value changing event\n\n    public:\n        // Constructor\n        explicit HorizontalScrollBar(RefCounter* refCounter);\n\n        // Copy-constructor\n        HorizontalScrollBar(RefCounter* refCounter, const HorizontalScrollBar& other);\n\n        // Destructor\n        ~HorizontalScrollBar();\n\n        // Copy-operator\n        HorizontalScrollBar& operator=(const HorizontalScrollBar& other);\n\n        // Updates widget and smooth value changing\n        void Update(float dt) override;\n\n        // Sets value\n        void SetValue(float value);\n\n        // Sets value forcible, without smoothing\n        void SetValueForcible(float value);\n\n        // Returns value\n        float GetValue() const;\n\n        // Returns smooth value\n        float GetSmoothValue() const;\n\n        // Sets minimal value\n        void SetMinValue(float minValue);\n\n        // Returns minimal value\n        float GetMinValue() const;\n\n        // Sets maximal value\n        void SetMaxValue(float maxValue);\n\n        // Returns maximal value\n        float GetMaxValue() const;\n\n        // Sets value range\n        void SetValueRange(float minValue, float maxValue);\n\n        // Sets scroll sense\n        void SetScrollSense(float coef);\n\n        // Returns scroll sense\n        float GetScrollSense() const;\n\n        // Sets scroll handle size\n        void SetScrollHandleSize(float size);\n\n        // Returns scroll handle size\n        float GetScrollHandleSize() const;\n\n        // Sets scroll handle minimum size in pixels\n        void SetMinimalScrollHandleSize(float pixelSize);\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(HorizontalScrollBar);\n        CLONEABLE_REF(HorizontalScrollBar);\n\n    protected:\n        float mValue = 0.0f;       // Current value @SERIALIZABLE\n        float mSmoothValue = 0.0f; // Smooth value\n\n        float mMinValue = 0.0f; // Minimum value @SERIALIZABLE\n        float mMaxValue = 1.0f; // Maximum value @SERIALIZABLE\n\n        float mScrollSense = 1.0f;           // Scroll sense coefficient @SERIALIZABLE\n        float mScrollHandleSize = 0.2f;      // Scroll handle size (in value range) @SERIALIZABLE\n        float mScrollhandleMinPxSize = 5.0f; // Minimal scroll size in pixels @SERIALIZABLE\n\n        float            mPressHandleOffset = 0.0f; // Value offset when handle was pressed\n        bool             mHandlePressed = false;    // True, when handle was pressed\n        Ref<WidgetLayer> mHandleLayer;              // Handle layer\n\n        Ref<WidgetLayer> mBackLayer; // Background layer\n\n    protected:\n        // Called when deserialized\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Updates layers layouts, calls after updating widget layout\n        void UpdateLayersLayouts() override;\n\n        // Called when new layer was added. Here searching bar, back and handle layers\n        void OnLayerAdded(const Ref<WidgetLayer>& layer) override;\n\n        // Updates bar, back and handle layers layout by value\n        void UpdateProgressLayersLayouts();\n\n        // Gets value from cursor position, depends on orientation\n        float GetValueFromCursor(const Input::Cursor& cursor);\n\n        // Sets value and calls callback onUserChange\n        void SetValueFromUser(float value);\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        REF_COUNTERABLE_IMPL(RefCounterable);\n\n        friend class ContextMenu;\n        friend class CustomList;\n        friend class EditBox;\n        friend class LongList;\n        friend class ScrollArea;\n        friend class Tree;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::HorizontalScrollBar)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::DrawableCursorEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::HorizontalScrollBar)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(minValue);\n    FIELD().PUBLIC().NAME(maxValue);\n    FIELD().PUBLIC().NAME(scrollSense);\n    FIELD().PUBLIC().NAME(scrollSize);\n    FIELD().PUBLIC().NAME(onChange);\n    FIELD().PUBLIC().NAME(onChangeByUser);\n    FIELD().PUBLIC().NAME(onSmoothChange);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mSmoothValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mMinValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mMaxValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mScrollSense);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.2f).NAME(mScrollHandleSize);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(5.0f).NAME(mScrollhandleMinPxSize);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mPressHandleOffset);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mHandlePressed);\n    FIELD().PROTECTED().NAME(mHandleLayer);\n    FIELD().PROTECTED().NAME(mBackLayer);\n}\nEND_META;\nCLASS_METHODS_META(o2::HorizontalScrollBar)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const HorizontalScrollBar&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueForcible, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSmoothValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMinValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetMinValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetMaxValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueRange, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScrollSense, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScrollSense);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScrollHandleSize, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScrollHandleSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMinimalScrollHandleSize, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerAdded, const Ref<WidgetLayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateProgressLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetValueFromCursor, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetValueFromUser, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Image.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Image.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n\nnamespace o2\n{\n    Image::Image(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        mImage = DynamicCast<Sprite>(AddLayer(\"image\", mmake<Sprite>())->GetDrawable());\n    }\n\n    Image::Image(RefCounter* refCounter, const Image& other):\n        Widget(refCounter, other)\n    {\n        mImage = GetLayerDrawable<Sprite>(\"image\");\n        if (!mImage)\n            mImage = DynamicCast<Sprite>(AddLayer(\"image\", mmake<Sprite>())->GetDrawable());\n    }\n\n    Image& Image::operator=(const Image& other)\n    {\n        Widget::operator=(other);\n\n        mImage = GetLayerDrawable<Sprite>(\"image\");\n        if (!mImage)\n            mImage = DynamicCast<Sprite>(AddLayer(\"image\", mmake<Sprite>())->GetDrawable());\n\n        return *this;\n    }\n\n    void Image::SetImage(const Ref<Sprite>& sprite)\n    {\n        if (auto layer = FindLayer(\"image\"))\n        {\n            layer->SetDrawable(sprite);\n            mImage = sprite;\n        }\n    }\n\n    Ref<Sprite> Image::GetImage()\n    {\n        return mImage.Lock();\n    }\n\n    void Image::SetImageAsset(const AssetRef<ImageAsset>& asset)\n    {\n        if (!mImage)\n            mImage = GetLayerDrawable<Sprite>(\"image\");\n\n        if (!mImage)\n            mImage = DynamicCast<Sprite>(AddLayer(\"image\", mmake<Sprite>())->GetDrawable());\n\n        auto image = mImage.Lock();\n        if (image->GetImageAsset() == asset)\n            return;\n\n        image->LoadFromImage(asset);\n    }\n\n    AssetRef<ImageAsset> Image::GetImageAsset() const\n    {\n        if (mImage)\n            return mImage.Lock()->GetImageAsset();\n\n        return AssetRef<ImageAsset>();\n    }\n\n    void Image::SetImageName(const String& name)\n    {\n        SetImageAsset(AssetRef<ImageAsset>(name));\n    }\n\n    String Image::GetImageName() const\n    {\n        auto imageAsset = GetImageAsset();\n        if (imageAsset.IsValid())\n            return imageAsset->GetPath();\n\n        return \"\";\n    }\n\n    String Image::GetCreateMenuGroup()\n    {\n        return \"Basic\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Image>);\n// --- META ---\n\nDECLARE_CLASS(o2::Image, o2__Image);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Image.h",
    "content": "#pragma once\n\n#include \"o2/Assets/Types/ImageAsset.h\"\n#include \"o2/Scene/UI/Widget.h\"\n\nnamespace o2\n{\n    class Sprite;\n\n    // ------------\n    // Image widget\n    // ------------\n    class Image: public Widget\n    {\n    public:\n        PROPERTIES(Image);\n        PROPERTY(Ref<Sprite>, image, SetImage, GetImage);                  // Image sprite @SCRIPTABLE\n        PROPERTY(AssetRef<ImageAsset>, imageAsset, SetImageAsset, GetImageAsset); // Image asset @SCRIPTABLE\n        PROPERTY(String, imageName, SetImageName, GetImageName);           // Image asset name @SCRIPTABLE\n\n    public:\n        // Default constructor @SCRIPTABLE\n        explicit Image(RefCounter* refCounter);\n\n        // Copy-constructor\n        Image(RefCounter* refCounter, const Image& other);\n\n        // Assign operator\n        Image& operator=(const Image& other);\n\n        // Sets image @SCRIPTABLE\n        void SetImage(const Ref<Sprite>& sprite);\n\n        // Returns image sprite @SCRIPTABLE\n        Ref<Sprite> GetImage();\n\n        // Sets image asset @SCRIPTABLE\n        void SetImageAsset(const AssetRef<ImageAsset>& asset);\n\n        // Returns image asset @SCRIPTABLE\n        AssetRef<ImageAsset> GetImageAsset() const;\n\n        // Sets image asset name @SCRIPTABLE\n        void SetImageName(const String& name);\n\n        // Returns asset image name @SCRIPTABLE\n        String GetImageName() const;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(Image);\n        CLONEABLE_REF(Image);\n\n    protected:\n        WeakRef<Sprite> mImage; // Image layer drawable\n\n        friend class UIButtonGroup;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Image)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Image)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(image);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(imageAsset);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().NAME(imageName);\n    FIELD().PROTECTED().NAME(mImage);\n}\nEND_META;\nCLASS_METHODS_META(o2::Image)\n{\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Image&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetImage, const Ref<Sprite>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Ref<Sprite>, GetImage);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetImageAsset, const AssetRef<ImageAsset>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(AssetRef<ImageAsset>, GetImageAsset);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetImageName, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(String, GetImageName);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Label.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Label.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n\nnamespace o2\n{\n    Label::Label(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        CreateDefaultText();\n    }\n\n    Label::Label(RefCounter* refCounter, const Label& other):\n        Widget(refCounter, other), mHorOverflow(other.mHorOverflow), mVerOverflow(other.mVerOverflow),\n        mExpandBorder(other.mExpandBorder)\n    {\n        mTextDrawable = GetLayerDrawable<Text>(\"text\");\n        if (!mTextDrawable)\n            CreateDefaultText();\n        \n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    Label& Label::operator=(const Label& other)\n    {\n        Widget::operator=(other);\n\n        mTextDrawable = GetLayerDrawable<Text>(\"text\");\n        mHorOverflow = other.mHorOverflow;\n        mVerOverflow = other.mVerOverflow;\n        mExpandBorder = other.mExpandBorder;\n\n        if (!mTextDrawable)\n            CreateDefaultText();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void Label::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        bool enabledClipping = false;\n        if (mHorOverflow == HorOverflow::Cut || mVerOverflow == VerOverflow::Cut)\n        {\n            enabledClipping = true;\n\n            Vec2I halfRes =  (Vec2F)o2Render.GetResolution()*0.5f;\n            RectI cutRect(-halfRes.x, halfRes.y, halfRes.x, -halfRes.y);\n\n            if (mHorOverflow == HorOverflow::Cut)\n            {\n                cutRect.left = (int)layout->worldLeft;\n                cutRect.right = (int)layout->worldRight;\n            }\n\n            if (mVerOverflow == VerOverflow::Cut)\n            {\n                cutRect.top = (int)layout->worldTop;\n                cutRect.bottom = (int)layout->worldBottom;\n            }\n\n            o2Render.EnableScissorTest(cutRect);\n        }\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        if (enabledClipping)\n            o2Render.DisableScissorTest();\n\n        ISceneDrawable::Draw();\n\n        DrawDebugFrame();\n    }\n\n    void Label::SetFont(const Ref<Font>& font)\n    {\n        if (mTextDrawable)\n            mTextDrawable->SetFont(font);\n\n        SetLayoutDirty();\n    }\n\n    Ref<Font> Label::GetFont() const\n    {\n        if (mTextDrawable)\n            return mTextDrawable->GetFont();\n\n        return Ref<Font>();\n    }\n\n    void Label::SetFontAsset(const AssetRef<FontAsset>& asset)\n    {\n        if (mTextDrawable)\n            mTextDrawable->SetFontAsset(asset);\n    }\n\n    AssetRef<FontAsset> Label::GetFontAsset() const\n    {\n        if (mTextDrawable)\n            return mTextDrawable->GetFontAsset();\n\n        return AssetRef<FontAsset>();\n    }\n\n    void Label::SetText(const WString& text)\n    {\n        if (mTextDrawable)\n            mTextDrawable->SetText(text);\n\n        if (mHorOverflow == HorOverflow::Expand || mVerOverflow == VerOverflow::Expand)\n            SetLayoutDirty();\n    }\n\n    const WString& Label::GetText() const\n    {\n        if (mTextDrawable)\n            return mTextDrawable->GetText();\n\n        return WString::empty;\n    }\n\n    void Label::SetColor(const Color4& color)\n    {\n        if (mTextDrawable)\n            mTextDrawable->SetColor(color);\n    }\n\n    Color4 Label::GetColor() const\n    {\n        if (mTextDrawable)\n            return mTextDrawable->GetColor();\n\n        return Color4();\n    }\n\n    void Label::SetHorAlign(HorAlign align)\n    {\n        if (mTextDrawable)\n            mTextDrawable->SetHorAlign(align);\n\n        SetLayoutDirty();\n    }\n\n    HorAlign Label::GetHorAlign() const\n    {\n        if (mTextDrawable)\n            return mTextDrawable->GetHorAlign();\n\n        return HorAlign::Left;\n    }\n\n    void Label::SetVerAlign(VerAlign align)\n    {\n        if (mTextDrawable)\n            mTextDrawable->SetVerAlign(align);\n\n        SetLayoutDirty();\n    }\n\n    VerAlign Label::GetVerAlign() const\n    {\n        if (mTextDrawable)\n            return mTextDrawable->GetVerAlign();\n\n        return VerAlign::Top;\n    }\n\n    void Label::SetHorOverflow(HorOverflow overflow)\n    {\n        mHorOverflow = overflow;\n\n        if (mTextDrawable)\n        {\n            mTextDrawable->wordWrap = mHorOverflow == HorOverflow::Wrap;\n            mTextDrawable->dotsEngings = mHorOverflow == HorOverflow::Dots;\n        }\n\n        SetLayoutDirty();\n    }\n\n    Label::HorOverflow Label::GetHorOverflow()\n    {\n        return mHorOverflow;\n    }\n\n    void Label::SetVerOverflow(VerOverflow overflow)\n    {\n        mVerOverflow = overflow;\n        SetLayoutDirty();\n    }\n\n    Label::VerOverflow Label::GetVerOverflow()\n    {\n        return mVerOverflow;\n    }\n\n    void Label::SetSymbolsDistanceCoef(float coef /*= 1*/)\n    {\n        if (mTextDrawable)\n            mTextDrawable->SetSymbolsDistanceCoef(coef);\n\n        SetLayoutDirty();\n    }\n\n    float Label::GetSymbolsDistanceCoef() const\n    {\n        if (mTextDrawable)\n            return mTextDrawable->GetSymbolsDistanceCoef();\n\n        return 1.0f;\n    }\n\n    void Label::SetLinesDistanceCoef(float coef /*= 1*/)\n    {\n        if (mTextDrawable)\n            mTextDrawable->SetLinesDistanceCoef(coef);\n\n        SetLayoutDirty();\n    }\n\n    float Label::GetLinesDistanceCoef() const\n    {\n        if (mTextDrawable)\n            return mTextDrawable->GetLinesDistanceCoef();\n\n        return 1.0f;\n    }\n\n    void Label::SetExpandBorder(const Vec2F& border)\n    {\n        mExpandBorder = border;\n        SetLayoutDirty();\n    }\n\n    Vec2F Label::GetExpandBorder() const\n    {\n        return mExpandBorder;\n    }\n\n    void Label::SetHeight(int height)\n    {\n        if (mTextDrawable)\n            mTextDrawable->SetHeight(height);\n    }\n\n    int Label::GetHeight() const\n    {\n        if (mTextDrawable)\n            return mTextDrawable->GetFontHeight();\n\n        return 0;\n    }\n\n    void Label::UpdateSelfTransform()\n{\n        if (mTextDrawable)\n        {\n            if (mHorOverflow == HorOverflow::Expand)\n            {\n                layout->Update();\n\n                float realSize = mTextDrawable->GetRealSize().x + mExpandBorder.x*2.0f;\n                float thisSize = layout->width;\n                float sizeDelta = realSize - thisSize;\n                GetLayoutData().minSize.x = realSize;\n\n                switch (mTextDrawable->GetHorAlign())\n                {\n                    case HorAlign::Left:\n                    GetLayoutData().offsetMax.x += sizeDelta;\n                    break;\n\n                    case HorAlign::Middle:\n                    case HorAlign::Both:\n                    GetLayoutData().offsetMax.x += sizeDelta*0.5f;\n                    GetLayoutData().offsetMin.x -= sizeDelta*0.5f;\n                    break;\n\n                    case HorAlign::Right:\n                    GetLayoutData().offsetMin.x -= sizeDelta;\n                    break;\n                }\n            }\n\n            if (mVerOverflow == VerOverflow::Expand)\n            {\n                layout->Update();\n\n                float realSize = mTextDrawable->GetRealSize().y + mExpandBorder.y*2.0f;\n                float thisSize = layout->height;\n                float sizeDelta = realSize - thisSize;\n\n                switch (mTextDrawable->GetVerAlign())\n                {\n                    case VerAlign::Top:\n                    GetLayoutData().offsetMin.y -= sizeDelta;\n                    break;\n\n                    case VerAlign::Middle:\n                    case VerAlign::Both:\n                    GetLayoutData().offsetMax.y += sizeDelta*0.5f;\n                    GetLayoutData().offsetMin.y -= sizeDelta*0.5f;\n                    break;\n\n                    case VerAlign::Bottom:\n                    GetLayoutData().offsetMax.y += sizeDelta;\n                    break;\n                }\n            }\n        }\n\n        layout->Update();\n    }\n\n    void Label::OnLayerAdded(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->name == \"text\" && layer->GetDrawable() && layer->GetDrawable()->GetType() == TypeOf(Text))\n            mTextDrawable = DynamicCast<Text>(layer->GetDrawable());\n    }\n\n    void Label::CreateDefaultText()\n    {\n        mTextDrawable = DynamicCast<Text>(AddLayer(\"text\", mmake<Text>())->GetDrawable());\n        mTextDrawable->SetFontAsset(AssetRef<VectorFontAsset>(\"stdFont.ttf\"));\n    }\n\n    void Label::OnDeserialized(const DataValue& node)\n    {\n        Widget::OnDeserialized(node);\n        mTextDrawable = GetLayerDrawable<Text>(\"text\");\n    }\n\n    String Label::GetCreateMenuGroup()\n    {\n        return \"Basic\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Label>);\n// --- META ---\n\nENUM_META(o2::Label::HorOverflow, o2__Label__HorOverflow)\n{\n    ENUM_ENTRY(Cut);\n    ENUM_ENTRY(Dots);\n    ENUM_ENTRY(Expand);\n    ENUM_ENTRY(None);\n    ENUM_ENTRY(Wrap);\n}\nEND_ENUM_META;\n\nENUM_META(o2::Label::VerOverflow, o2__Label__VerOverflow)\n{\n    ENUM_ENTRY(Cut);\n    ENUM_ENTRY(Expand);\n    ENUM_ENTRY(None);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::Label, o2__Label);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Label.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Render/Text.h\"\n\nnamespace o2\n{\n    // -----------------\n    // Text label widget\n    // -----------------\n    class Label: public Widget\n    {\n    public:\n        enum class HorOverflow { Cut, Dots, Expand, Wrap, None };\n        enum class VerOverflow { Cut, None, Expand };\n\n    public:\n        PROPERTIES(Label);\n        PROPERTY(WString, text, SetText, GetText);   // Text property, wstring\n\n        PROPERTY(Ref<Font>, font, SetFont, GetFont);                     // Font pointer property\n        PROPERTY(AssetRef<FontAsset>, fontAsset, SetFontAsset, GetFontAsset); // Font asset reference property\n        \n        PROPERTY(int, height, SetHeight, GetHeight); // Text height property\n        PROPERTY(Color4, color, SetColor, GetColor); // Text color property\n\n        PROPERTY(VerAlign, verAlign, SetVerAlign, GetVerAlign); // vertical align property\n        PROPERTY(HorAlign, horAlign, SetHorAlign, GetHorAlign); // Horizontal align property\n\n        PROPERTY(HorOverflow, horOverflow, SetHorOverflow, GetHorOverflow); // Horizontal text overflow logic property\n        PROPERTY(VerOverflow, verOverflow, SetVerOverflow, GetVerOverflow); // Vertical text overflow logic property\n\n        PROPERTY(Vec2F, expandBorder, SetExpandBorder, GetExpandBorder); // Overflow expanding border size property\n\n        PROPERTY(float, symbolsDistanceCoef, SetSymbolsDistanceCoef, GetSymbolsDistanceCoef); // Characters distance coef, 1 is standard\n        PROPERTY(float, linesDistanceCoef, SetLinesDistanceCoef, GetLinesDistanceCoef);       // Lines distance coef, 1 is standard\n\n    public:\n        // Default constructor\n        explicit Label(RefCounter* refCounter);\n\n        // Copy-constructor\n        Label(RefCounter* refCounter, const Label& other);\n\n        // Assign operator\n        Label& operator=(const Label& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Sets using font\n        void SetFont(const Ref<Font>& font);\n\n        // Returns using font\n        Ref<Font> GetFont() const;\n\n        // Sets bitmap font asset \n        void SetFontAsset(const AssetRef<FontAsset>& asset);\n\n        // Returns asset by font asset id\n        AssetRef<FontAsset> GetFontAsset() const;\n\n        // Sets text\n        void SetText(const WString& text);\n\n        // Returns text\n        const WString& GetText() const;\n\n        // Sets text color\n        void SetColor(const Color4& color);\n\n        // Returns color of text\n        Color4 GetColor() const;\n\n        // Sets horizontal align\n        void SetHorAlign(HorAlign align);\n\n        // Returns horizontal align\n        HorAlign GetHorAlign() const;\n\n        // Sets vertical align\n        void SetVerAlign(VerAlign align);\n\n        // returns vertical align\n        VerAlign GetVerAlign() const;\n\n        // Sets horizontal overflow logic\n        void SetHorOverflow(HorOverflow overflow);\n\n        // Returns horizontal overflow logic\n        HorOverflow GetHorOverflow();\n\n        // Sets vertical overflow logic\n        void SetVerOverflow(VerOverflow overflow);\n\n        // Returns vertical overflow logic\n        VerOverflow GetVerOverflow();\n\n        // Sets characters distance coefficient\n        void SetSymbolsDistanceCoef(float coef = 1);\n\n        // Returns characters distance coef\n        float GetSymbolsDistanceCoef() const;\n\n        // Sets lines distance coefficient\n        void SetLinesDistanceCoef(float coef = 1);\n\n        // Returns lines distance coefficient\n        float GetLinesDistanceCoef() const;\n\n        // Sets overflow expanding border\n        void SetExpandBorder(const Vec2F& border);\n\n        // Returns expanding overflow border\n        Vec2F GetExpandBorder() const;\n\n        // Sets text height\n        void SetHeight(int height);\n\n        // Returns text height\n        int GetHeight() const;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(Label);\n        CLONEABLE_REF(Label);\n\n    protected:\n        Ref<Text>   mTextDrawable;                    // Text layer drawable. Getting from layer \"text\"\n        HorOverflow mHorOverflow = HorOverflow::None; // Text horizontal overflow logic @SERIALIZABLE\n        VerOverflow mVerOverflow = VerOverflow::None; // Text vertical overflow logic @SERIALIZABLE\n        Vec2F       mExpandBorder;                    // Expand overflow border size @SERIALIZABLE\n\n    protected:\n        // Called when layer added and updates drawing sequence\n        void OnLayerAdded(const Ref<WidgetLayer>& layer) override;\n\n        // Creates default text layer\n        void CreateDefaultText();\n\n        // Called when deserialized\n        void OnDeserialized(const DataValue& node) override;\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::Label::HorOverflow);\n\nPRE_ENUM_META(o2::Label::VerOverflow);\n\nCLASS_BASES_META(o2::Label)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Label)\n{\n    FIELD().PUBLIC().NAME(text);\n    FIELD().PUBLIC().NAME(font);\n    FIELD().PUBLIC().NAME(fontAsset);\n    FIELD().PUBLIC().NAME(height);\n    FIELD().PUBLIC().NAME(color);\n    FIELD().PUBLIC().NAME(verAlign);\n    FIELD().PUBLIC().NAME(horAlign);\n    FIELD().PUBLIC().NAME(horOverflow);\n    FIELD().PUBLIC().NAME(verOverflow);\n    FIELD().PUBLIC().NAME(expandBorder);\n    FIELD().PUBLIC().NAME(symbolsDistanceCoef);\n    FIELD().PUBLIC().NAME(linesDistanceCoef);\n    FIELD().PROTECTED().NAME(mTextDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(HorOverflow::None).NAME(mHorOverflow);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(VerOverflow::None).NAME(mVerOverflow);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mExpandBorder);\n}\nEND_META;\nCLASS_METHODS_META(o2::Label)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Label&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFont, const Ref<Font>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Font>, GetFont);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFontAsset, const AssetRef<FontAsset>&);\n    FUNCTION().PUBLIC().SIGNATURE(AssetRef<FontAsset>, GetFontAsset);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetText, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(const WString&, GetText);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, GetColor);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHorAlign, HorAlign);\n    FUNCTION().PUBLIC().SIGNATURE(HorAlign, GetHorAlign);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVerAlign, VerAlign);\n    FUNCTION().PUBLIC().SIGNATURE(VerAlign, GetVerAlign);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHorOverflow, HorOverflow);\n    FUNCTION().PUBLIC().SIGNATURE(HorOverflow, GetHorOverflow);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVerOverflow, VerOverflow);\n    FUNCTION().PUBLIC().SIGNATURE(VerOverflow, GetVerOverflow);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSymbolsDistanceCoef, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSymbolsDistanceCoef);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLinesDistanceCoef, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetLinesDistanceCoef);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExpandBorder, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetExpandBorder);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeight, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetHeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerAdded, const Ref<WidgetLayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CreateDefaultText);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/List.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"List.h\"\n\n#include \"o2/Scene/UI/Widgets/Label.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n\nnamespace o2\n{\n    List::List(RefCounter* refCounter):\n        CustomList(refCounter)\n    {\n        auto itemSample = mmake<Label>();\n        itemSample->horOverflow = Label::HorOverflow::Dots;\n        SetItemSample(itemSample);\n    }\n\n    List::List(RefCounter* refCounter, const List& other):\n        CustomList(refCounter, other)\n    {\n        RetargetStatesAnimations();\n    }\n\n    List::~List()\n    {}\n\n    List& List::operator=(const List& other)\n    {\n        CustomList::operator=(other);\n        return *this;\n    }\n\n    int List::AddItem(const WString& text)\n    {\n        auto item = DynamicCast<Label>(CustomList::AddItem());\n        item->text = text;\n        return GetItemsCount() - 1;\n    }\n\n    int List::AddItem(const WString& text, int position)\n    {\n        auto item = DynamicCast<Label>(CustomList::AddItem(position));\n        item->text = text;\n        return position;\n    }\n\n    void List::AddItems(const Vector<WString>& data)\n    {\n        for (auto& text : data)\n            AddItem(text);\n    }\n\n    void List::RemoveItem(const WString& text)\n    {\n        int position = FindItem(text);\n        if (position >= 0)\n            CustomList::RemoveItem(position);\n    }\n\n    int List::FindItem(const WString& text)\n    {\n        int i = 0;\n        for (auto& child : mVerLayout->mChildren)\n        {\n            if (DynamicCast<Label>(child)->GetText() == text)\n                return i;\n\n            i++;\n        }\n\n        return -1;\n    }\n\n    WString List::GetItemText(int position) const\n    {\n        auto item = DynamicCast<Label>(GetItem(position));\n        if (item)\n            return item->GetText();\n\n        return WString();\n    }\n\n    Vector<WString> List::GetAllItemsText() const\n    {\n        Vector<WString> res;\n        for (auto& child : mVerLayout->mChildren)\n            res.Add(DynamicCast<Label>(child)->GetText());\n\n        return res;\n    }\n\n    WString List::GetSelectedItemText()\n    {\n        auto selectedItem = DynamicCast<Label>(GetSelectedItem());\n        if (selectedItem)\n            return selectedItem->GetText();\n\n        return WString();\n    }\n\n    void List::SelectItemText(const WString& text)\n    {\n        int idx = FindItem(text);\n        SelectItemAt(idx);\n    }\n\n    void List::SetSelectedItems(const Vector<WString>& items)\n    {\n        for (auto& x : items)\n            SelectItemText(x);\n    }\n\n    Vector<WString> List::GetSelectedItemsText() const\n    {\n        return mSelectedItems.Convert<WString>([&](auto x) { return GetItemText(x.idx); });\n    }\n\n    void List::OnSelectionChanged()\n\t{\n\t\tonSelectedText(GetSelectedItemText());\n    }\n\n    String List::GetCreateMenuGroup()\n    {\n        return \"List\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::List>);\n// --- META ---\n\nDECLARE_CLASS(o2::List, o2__List);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/List.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/CustomList.h\"\n\nnamespace o2\n{\n    // --------------------\n    // Text items list view\n    // --------------------\n    class List: public CustomList\n    {\n    public:\n        PROPERTIES(List);\n        PROPERTY(WString, value, SelectItemText, GetSelectedItemText);             // Current selected item text\n        PROPERTY(Vector<WString>, values, SetSelectedItems, GetSelectedItemsText); // Current selected items texts\n\n    public:\n        Function<void(const WString&)> onSelectedText; // Change text selected event\n\n    public:\n        // Default constructor\n        explicit List(RefCounter* refCounter);\n\n        // Copy-constructor\n        List(RefCounter* refCounter, const List& other);\n\n        // Destructor\n        ~List();\n\n        // Copy operator\n        List& operator=(const List& other);\n\n        // Adds new text item and returns position\n        int AddItem(const WString& text);\n\n        // Add new text item at position and returns this position\n        int AddItem(const WString& text, int position);\n\n        // Adds array of text items\n        void AddItems(const Vector<WString>& data);\n\n        // Removes item, if exist\n        void RemoveItem(const WString& text);\n\n        // Returns position of item. Returns -1 if can't find item\n        int FindItem(const WString& text);\n\n        // Returns item text by position\n        WString GetItemText(int position) const;\n\n        // Returns array of all text items\n        Vector<WString> GetAllItemsText() const;\n\n        // Returns current selected text item\n        WString GetSelectedItemText();\n\n        // Selects item text\n        void SelectItemText(const WString& text);\n\n        // Selects items texts\n        void SetSelectedItems(const Vector<WString>& items);\n\n        // Returns selected items texts\n        Vector<WString> GetSelectedItemsText() const;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(List);\n        CLONEABLE_REF(List);\n\n    protected:\n        // Called when selected item index was changed\n        void OnSelectionChanged() override;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::List)\n{\n    BASE_CLASS(o2::CustomList);\n}\nEND_META;\nCLASS_FIELDS_META(o2::List)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(values);\n    FIELD().PUBLIC().NAME(onSelectedText);\n}\nEND_META;\nCLASS_METHODS_META(o2::List)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const List&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AddItem, const WString&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddItems, const Vector<WString>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetItemText, int);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<WString>, GetAllItemsText);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetSelectedItemText);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectItemText, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedItems, const Vector<WString>&);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<WString>, GetSelectedItemsText);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectionChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/LongList.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"LongList.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n\nnamespace o2\n{\n    LongList::LongList(RefCounter* refCounter):\n        ScrollArea(refCounter), mHoverLayout(Layout::BothStretch()),\n        mSelectionLayout(Layout::BothStretch())\n    {\n        mItemSample = mmake<Widget>();\n        mSelectionDrawable = mmake<Sprite>();\n        mHoverDrawable = mmake<Sprite>();\n    }\n\n    LongList::LongList(RefCounter* refCounter, const LongList& other):\n        ScrollArea(refCounter, other), mHoverLayout(other.mHoverLayout),\n        mSelectionLayout(other.mSelectionLayout)\n    {\n        mItemSample = other.mItemSample->CloneAsRef<Widget>();\n        mSelectionDrawable = other.mSelectionDrawable->CloneAsRef<Sprite>();\n        mHoverDrawable = other.mHoverDrawable->CloneAsRef<Sprite>();\n\n        mItemSample->UpdateTransform();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    LongList::~LongList()\n    {}\n\n    LongList& LongList::operator=(const LongList& other)\n    {\n        mSelectionDrawable = other.mSelectionDrawable->CloneAsRef<Sprite>();\n        mHoverDrawable = other.mHoverDrawable->CloneAsRef<Sprite>();\n\n        mSelectionLayout = other.mSelectionLayout;\n        mHoverLayout = other.mHoverLayout;\n\n        ScrollArea::operator=(other);\n\n        mItemSample = other.mItemSample->CloneAsRef<Widget>();\n        mItemSample->UpdateSelfTransform();\n        mItemSample->UpdateChildrenTransforms();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void LongList::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        ScrollArea::Update(dt);\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        const float rectLerpCoef = 20.0f;\n\n        if (mCurrentHoverRect != mTargetHoverRect)\n        {\n            mCurrentHoverRect = Math::Lerp(mCurrentHoverRect, mTargetHoverRect, dt*rectLerpCoef);\n            mHoverDrawable->SetRect(mCurrentHoverRect);\n        }\n\n        if (mCurrentSelectionRect != mTargetSelectionRect)\n        {\n            mCurrentSelectionRect = Math::Lerp(mCurrentSelectionRect, mTargetSelectionRect, dt*rectLerpCoef);\n            mSelectionDrawable->SetRect(mCurrentSelectionRect);\n        }\n    }\n\n    void LongList::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        IDrawable::OnDrawn();\n\n        o2Render.EnableScissorTest(mAbsoluteClipArea);\n\n        for (auto& child : mChildrenInheritedDepth)\n            child->Draw();\n\n        mSelectionDrawable->Draw();\n        mHoverDrawable->Draw();\n\n        o2Render.DisableScissorTest();\n\n        CursorAreaEventsListener::OnDrawn();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        if (mOwnHorScrollBar)\n            mHorScrollBar->Draw();\n\n        if (mOwnVerScrollBar)\n            mVerScrollBar->Draw();\n\n        DrawDebugFrame();\n    }\n\n    void LongList::SetItemSample(const Ref<Widget>& sample)\n    {\n        mItemSample = sample;\n\n        SetLayoutDirty();\n    }\n\n    const Ref<Widget>& LongList::GetItemSample() const\n    {\n        return mItemSample;\n    }\n\n    void LongList::SelectItemAt(int position)\n    {\n        int lastSelected = mSelectedItem;\n\n        int itemsCount = getItemsCountFunc();\n        if (position < 0 || position >= itemsCount)\n        {\n            o2Debug.LogWarning(\"Can't select item at %i: out of range (%i)\", position, itemsCount);\n            position = -1;\n        }\n\n        mSelectedItem = position;\n\n        if (lastSelected != mSelectedItem)\n        {\n            lastSelected = mSelectedItem;\n            onFocused(mSelectedItem);\n            OnSelectionChanged();\n        }\n    }\n\n    int LongList::GetSelectedItemPosition() const\n    {\n        return mSelectedItem;\n    }\n\n    const Ref<Sprite>& LongList::GetSelectionDrawable() const\n    {\n        return mSelectionDrawable;\n    }\n\n    const Ref<Sprite>& LongList::GetHoverDrawable() const\n    {\n        return mHoverDrawable;\n    }\n\n    void LongList::SetSelectionDrawableLayout(const Layout& layout)\n    {\n        mSelectionLayout = layout;\n    }\n\n    Layout LongList::GetSelectionDrawableLayout() const\n    {\n        return mSelectionLayout;\n    }\n\n    void LongList::SetHoverDrawableLayout(const Layout& layout)\n    {\n        mHoverLayout = layout;\n    }\n\n    Layout LongList::GetHoverDrawableLayout() const\n    {\n        return mHoverLayout;\n    }\n\n    void LongList::OnItemsUpdated(bool itemsRearranged /*= false*/)\n    {\n        if (itemsRearranged)\n        {\n            auto countFunc = getItemsCountFunc;\n            getItemsCountFunc = []() { return 0; };\n            UpdateSelfTransform();\n            UpdateChildrenTransforms();\n            getItemsCountFunc = countFunc;\n        }\n\n        SetLayoutDirty();\n    }\n\n    void LongList::CalculateScrollArea()\n    {\n        Vec2F offset;\n        InitializeScrollAreaRectCalculation(offset);\n\n        float itemsHeight = (float)getItemsCountFunc()*mItemSample->layout->GetMinHeight();\n        RecalculateScrollAreaRect(RectF(0, mAbsoluteViewArea.Height(), mAbsoluteViewArea.Width(), mAbsoluteViewArea.Height() - itemsHeight), Vec2F());\n    }\n\n    void LongList::UpdateSelfTransform()\n{\n        UpdateVisibleItems();\n\n        ScrollArea::UpdateSelfTransform();\n\n        if (Input::IsSingletonInitialzed())\n            UpdateHover(o2Input.cursorPos);\n\n        UpdateSelection(mSelectedItem);\n\n        mCurrentHoverRect = mTargetHoverRect;\n        mCurrentSelectionRect = mTargetSelectionRect;\n\n        mSelectionDrawable->SetRect(mCurrentSelectionRect);\n        mHoverDrawable->SetRect(mCurrentHoverRect);\n    }\n\n    void LongList::MoveScrollPosition(const Vec2F& delta)\n    {\n        ScrollArea::MoveScrollPosition(delta);\n\n        UpdateVisibleItems();\n\n        mTargetSelectionRect += delta;\n        mTargetHoverRect += delta;\n\n        mCurrentSelectionRect = mTargetSelectionRect;\n        mCurrentHoverRect = mTargetHoverRect;\n\n        mSelectionDrawable->SetRect(mCurrentSelectionRect);\n        mHoverDrawable->SetRect(mCurrentHoverRect);\n    }\n\n    void LongList::UpdateVisibleItems()\n    {\n        int lastMinItemIdx = mMinVisibleItemIdx;\n        int lastMaxItemIdx = mMaxVisibleItemIdx;\n\n        float itemHeight = mItemSample->layout->minHeight;\n\n        if (itemHeight < FLT_EPSILON)\n            return;\n\n        mMinVisibleItemIdx = Math::FloorToInt(mScrollPos.y / itemHeight);\n        mMaxVisibleItemIdx = Math::FloorToInt((mScrollPos.y + mAbsoluteViewArea.Height()) / itemHeight);\n        mMaxVisibleItemIdx = Math::Min(mMaxVisibleItemIdx, getItemsCountFunc() - 1);\n\n        auto itemsInRange = getItemsRangeFunc(mMinVisibleItemIdx, mMaxVisibleItemIdx + 1);\n        Vector<Ref<Widget>> itemsWidgets;\n        itemsWidgets.Resize(Math::Max(0, mMaxVisibleItemIdx - mMinVisibleItemIdx + 1));\n\n        Vector<Ref<Widget>> removingItems;\n        for (int i = lastMinItemIdx; i <= lastMaxItemIdx; i++)\n        {\n            if (i < 0)\n                continue;\n\n            if (i < mMinVisibleItemIdx || i > mMaxVisibleItemIdx)\n                removingItems.Add(mChildWidgets[i - lastMinItemIdx]);\n            else\n                itemsWidgets[i - mMinVisibleItemIdx] = mChildWidgets[i - lastMinItemIdx];\n        }\n\n        for (auto item : removingItems)\n            mItemsPool.Add(item);\n\n        mChildren.Clear();\n        mChildWidgets.Clear();\n        mChildrenInheritedDepth.Clear();\n\n        auto thisRef = Ref(this);\n\n        for (int i = mMinVisibleItemIdx; i <= mMaxVisibleItemIdx; i++)\n        {\n            if (i < 0)\n                continue;\n\n            if (i >= lastMinItemIdx && i <= lastMaxItemIdx)\n                continue;\n\n            if (mItemsPool.Count() == 0)\n            {\n                for (int j = 0; j < 10; j++)\n                {\n                    auto newItem = mItemSample->CloneAsRef<Widget>();\n                    newItem->RemoveFromScene();\n                    mItemsPool.Add(newItem);\n                }\n            }\n\n            auto newItem = mItemsPool.PopBack();\n\n            setupItemFunc(newItem, itemsInRange[i - mMinVisibleItemIdx]);\n\n            *newItem->layout = WidgetLayout::HorStretch(VerAlign::Top, 0, 0, itemHeight, itemHeight*(float)i);\n\n            newItem->mParent = thisRef;\n            newItem->mParentWidget = thisRef;\n\n            itemsWidgets[i - mMinVisibleItemIdx] = newItem;\n        }\n\n        mChildren.Add(DynamicCastVector<Actor>(itemsWidgets));\n        mChildWidgets.Add(itemsWidgets);\n        mChildrenInheritedDepth.Add(DynamicCastVector<ISceneDrawable>(itemsWidgets));\n\n        for (auto& child : mChildWidgets)\n        {\n            child->UpdateSelfTransform();\n            child->UpdateChildrenTransforms();\n            child->mIsClipped = false;\n        }\n    }\n\n    void LongList::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = true;\n    }\n\n    void LongList::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        const float checkDeltaThreshold = 2.0f;\n        if ((cursor.position - mLastSelectCheckCursor).Length() < checkDeltaThreshold)\n            return;\n\n        mLastSelectCheckCursor = cursor.position;\n\n        int itemIdx = -1;\n        GetItemUnderPoint(cursor.position, &itemIdx);\n        UpdateSelection(itemIdx);\n    }\n\n    void LongList::OnCursorMoved(const Input::Cursor& cursor)\n    {\n        const float checkDeltaThreshold = 2.0f;\n        if ((cursor.position - mLastHoverCheckCursor).Length() < checkDeltaThreshold)\n            return;\n\n        mLastHoverCheckCursor = cursor.position;\n\n        UpdateHover(cursor.position);\n    }\n\n    void LongList::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        int itemIdx = -1;\n        GetItemUnderPoint(cursor.position, &itemIdx);\n\n        onFocused(itemIdx);\n        OnSelectionChanged();\n    }\n\n    void LongList::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n    }\n\n    void LongList::OnCursorExit(const Input::Cursor& cursor)\n    {\n        auto hoverState = state[\"hover\"];\n        if (hoverState)\n            *hoverState = false;\n        else\n            mHoverDrawable->SetEnabled(false);\n    }\n\n    Ref<Widget> LongList::GetItemUnderPoint(const Vec2F& point, int* idxPtr)\n    {\n        int idx = mMinVisibleItemIdx;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->layout->IsPointInside(point))\n            {\n                if (idxPtr)\n                    *idxPtr = idx;\n\n                return child;\n            }\n\n            idx++;\n        }\n\n        if (idxPtr)\n            *idxPtr = -1;\n\n        return nullptr;\n    }\n\n    void LongList::OnDeserialized(const DataValue& node)\n    {\n        ScrollArea::OnDeserialized(node);\n        RetargetStatesAnimations();\n    }\n\n    void LongList::UpdateTransparency()\n    {\n        Widget::UpdateTransparency();\n\n        if (mHorScrollBar)\n            mHorScrollBar->UpdateTransparency();\n\n        if (mVerScrollBar)\n            mVerScrollBar->UpdateTransparency();\n\n        if (mSelectionDrawable)\n            mSelectionDrawable->transparency = mResTransparency;\n\n        if (mHoverDrawable)\n            mHoverDrawable->transparency = mResTransparency;\n    }\n\n    void LongList::UpdateHover(const Vec2F& point)\n    {\n        int itemIdx = -1;\n        auto itemUnderCursor = GetItemUnderPoint(point, &itemIdx);\n\n        if (itemIdx < 0)\n        {\n            auto hoverState = state[\"hover\"];\n            if (hoverState)\n            {\n                mHoverDrawable->SetEnabled(true);\n                *hoverState = false;\n            }\n            else\n                mHoverDrawable->SetEnabled(false);\n        }\n        else\n        {\n            mTargetHoverRect = mHoverLayout.Calculate(itemUnderCursor->layout->worldRect);\n\n            auto hoverState = state[\"hover\"];\n            if (hoverState)\n            {\n                mHoverDrawable->SetEnabled(true);\n                *hoverState = itemIdx != mSelectedItem;\n            }\n            else\n                mHoverDrawable->SetEnabled(itemIdx != mSelectedItem);\n        }\n    }\n\n    void LongList::UpdateSelection(int position)\n    {\n        mSelectedItem = position;\n        Ref<Widget> item;\n        if (position < mMaxVisibleItemIdx && position >= mMinVisibleItemIdx)\n            item = mChildWidgets[position - mMinVisibleItemIdx];\n\n        if (position < 0 || item == nullptr)\n        {\n            auto selectedState = state[\"focused\"];\n            if (selectedState)\n            {\n                mSelectionDrawable->SetEnabled(true);\n                *selectedState = false;\n            }\n            else\n            {\n                if (mSelectionDrawable)\n                    mSelectionDrawable->SetEnabled(false);\n            }\n        }\n        else\n        {\n            mTargetSelectionRect = mHoverLayout.Calculate(item->layout->worldRect);\n\n            auto selectedState = state[\"focused\"];\n            if (selectedState)\n            {\n                mSelectionDrawable->SetEnabled(true);\n                *selectedState = true;\n            }\n            else\n            {\n                if (mSelectionDrawable)\n                    mSelectionDrawable->SetEnabled(false);\n            }\n\n            UpdateHover(o2Input.cursorPos);\n        }\n    }\n\n    void LongList::OnSelectionChanged()\n    {}\n\n    void LongList::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        SetInteractable(true);\n    }\n\n    void LongList::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        SetInteractable(false);\n    }\n\n    String LongList::GetCreateMenuGroup()\n    {\n        return \"List\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::LongList>);\n// --- META ---\n\nDECLARE_CLASS(o2::LongList, o2__LongList);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/LongList.h",
    "content": "#pragma once\n\n#include \"o2/Render/Sprite.h\"\n#include \"ScrollArea.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n\nnamespace o2\n{\n    // ---------------------------------------------\n    // List view widget with selection and many data\n    // ---------------------------------------------\n    class LongList: public ScrollArea\n    {\n\n    public:\n        PROPERTIES(LongList);\n        PROPERTY(int, selectedItemPos, SelectItemAt, GetSelectedItemPosition); // Selected item position property    \n\n    public:\n        Function<void(int)> onFocused; // Select item position event\n\n        Function<int()>                           getItemsCountFunc; // Items count getting function\n        Function<Vector<void*>(int, int)>         getItemsRangeFunc; // Items getting in range function\n        Function<void(const Ref<Widget>&, void*)> setupItemFunc;     // Setup item widget function\n\n    public:\n        // Default constructor\n        explicit LongList(RefCounter* refCounter);\n\n        // Copy-constructor\n        LongList(RefCounter* refCounter, const LongList& other);\n\n        // Destructor\n        ~LongList();\n\n        // Copy-operator\n        LongList& operator=(const LongList& other);\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Draws widget\n        void Draw() override;\n\n        // Sets item sample widget. WARNING: Removing all old items!\n        void SetItemSample(const Ref<Widget>& sample);\n\n        // Returns item sample widget\n        const Ref<Widget>& GetItemSample() const;\n\n        // Selects item at position\n        void SelectItemAt(int position);\n\n        // Returns selected item position\n        int GetSelectedItemPosition() const;\n\n        // Returns selection drawable\n        const Ref<Sprite>& GetSelectionDrawable() const;\n\n        // Returns hover drawable\n        const Ref<Sprite>& GetHoverDrawable() const;\n\n        // Sets selection drawable layout (result rectangle will be calculated by item widget absolute rectangle)\n        void SetSelectionDrawableLayout(const Layout& layout);\n\n        // Returns selection drawable layout\n        Layout GetSelectionDrawableLayout() const;\n\n        // Sets hover drawable layout (result rectangle will be calculated by item widget absolute rectangle)\n        void SetHoverDrawableLayout(const Layout& layout);\n\n        // Returns hover drawable layout\n        Layout GetHoverDrawableLayout() const;\n\n        // Updates items\n        void OnItemsUpdated(bool itemsRearranged = false);\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(LongList);\n        CLONEABLE_REF(LongList);\n\n    protected:\n        Ref<Widget> mItemSample; // Item sample widget @SERIALIZABLE\n\n        Ref<Sprite> mSelectionDrawable;                   // Selection sprite @SERIALIZABLE\n        Ref<Sprite> mHoverDrawable;                       // Item hover drawable @SERIALIZABLE\n        Layout  mSelectionLayout = Layout::BothStretch(); // Selection layout, result selection area depends on selected item @SERIALIZABLE\n        Layout  mHoverLayout = Layout::BothStretch();     // Hover layout, result selection area depends on selected item @SERIALIZABLE\n                                                 \n        int mMinVisibleItemIdx = -1; // Visible item with minimal index\n        int mMaxVisibleItemIdx = -1; // Visible item with maximal index\n        int mSelectedItem = -1;      // Position of current selected item (-1 if no item isn't selected)\n                                                 \n        RectF mCurrentSelectionRect; // Current selection rectangle (for smoothing)\n        RectF mTargetSelectionRect;  // Target selection rectangle (over selected item)\n        RectF mCurrentHoverRect;     // Current hover rectangle (for smoothing)\n        RectF mTargetHoverRect;      // Target hover rectangle (over selected item)\n                                                 \n        Vec2F mLastHoverCheckCursor;  // Last cursor position on hover check\n        Vec2F mLastSelectCheckCursor; // Last cursor position on selection check\n                                                 \n        Vector<Ref<Widget>> mItemsPool; // Items pool\n\n    protected:\n        // Called when object was deserialized and trying to reattach states animations target\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Updates transparency for this and children widgets\n        void UpdateTransparency() override;\n\n        // Calculates scroll area\n        void CalculateScrollArea() override;\n\n        // Moves scroll position and updates children widgets clipping and layout\n        void MoveScrollPosition(const Vec2F& delta) override;\n\n        // Updates visible items\n        void UpdateVisibleItems();\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Returns item widget under point and stores index in idxPtr, if not null\n        Ref<Widget> GetItemUnderPoint(const Vec2F& point, int* idxPtr);\n\n        // Updates hover\n        void UpdateHover(const Vec2F& point);\n\n        // Updates selection\n        void UpdateSelection(int position);\n\n        // Called when selected item index was changed\n        void OnSelectionChanged();\n\n        friend class DropDown;\n        friend class CustomDropDown;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::LongList)\n{\n    BASE_CLASS(o2::ScrollArea);\n}\nEND_META;\nCLASS_FIELDS_META(o2::LongList)\n{\n    FIELD().PUBLIC().NAME(selectedItemPos);\n    FIELD().PUBLIC().NAME(onFocused);\n    FIELD().PUBLIC().NAME(getItemsCountFunc);\n    FIELD().PUBLIC().NAME(getItemsRangeFunc);\n    FIELD().PUBLIC().NAME(setupItemFunc);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mItemSample);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectionDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHoverDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Layout::BothStretch()).NAME(mSelectionLayout);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Layout::BothStretch()).NAME(mHoverLayout);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1).NAME(mMinVisibleItemIdx);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1).NAME(mMaxVisibleItemIdx);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1).NAME(mSelectedItem);\n    FIELD().PROTECTED().NAME(mCurrentSelectionRect);\n    FIELD().PROTECTED().NAME(mTargetSelectionRect);\n    FIELD().PROTECTED().NAME(mCurrentHoverRect);\n    FIELD().PROTECTED().NAME(mTargetHoverRect);\n    FIELD().PROTECTED().NAME(mLastHoverCheckCursor);\n    FIELD().PROTECTED().NAME(mLastSelectCheckCursor);\n    FIELD().PROTECTED().NAME(mItemsPool);\n}\nEND_META;\nCLASS_METHODS_META(o2::LongList)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const LongList&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItemSample, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Widget>&, GetItemSample);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectItemAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetSelectedItemPosition);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetSelectionDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetHoverDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionDrawableLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetSelectionDrawableLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHoverDrawableLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetHoverDrawableLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnItemsUpdated, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTransparency);\n    FUNCTION().PROTECTED().SIGNATURE(void, CalculateScrollArea);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveScrollPosition, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateVisibleItems);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Widget>, GetItemUnderPoint, const Vec2F&, int*);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHover, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateSelection, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectionChanged);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/MenuPanel.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"MenuPanel.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalLayout.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n\nnamespace o2\n{\n    MenuPanel::MenuPanel(RefCounter* refCounter):\n        Widget(refCounter), DrawableCursorEventsListener(this)\n    {\n        mItemSample = mmake<Widget>();\n        mItemSample->AddLayer(\"text\", nullptr, Layout(Vec2F(0.0f, 0.0f), Vec2F(1.0f, 1.0f), Vec2F(200, 0), Vec2F(0, 0)));\n\n        mSelectionDrawable = mmake<Sprite>();\n\n        mLayout = mmake<HorizontalLayout>();\n        AddChild(mLayout);\n\n        mLayout->expandHeight = true;\n        mLayout->expandWidth = false;\n        mLayout->baseCorner = BaseCorner::LeftTop;\n        mLayout->fitByChildren = true;\n        *mLayout->layout = WidgetLayout::BothStretch();\n    }\n\n    MenuPanel::MenuPanel(RefCounter* refCounter, const MenuPanel& other):\n        Widget(refCounter, other), DrawableCursorEventsListener(this)\n    {\n        mItemSample = other.mItemSample->CloneAsRef<Widget>();\n        mSelectionDrawable = other.mSelectionDrawable->CloneAsRef<Sprite>();\n        mSelectionLayout = other.mSelectionLayout;\n        mLayout = FindChildByType<HorizontalLayout>();\n\n        RetargetStatesAnimations();\n    }\n\n    MenuPanel::~MenuPanel()\n    {}\n\n    MenuPanel& MenuPanel::operator=(const MenuPanel& other)\n    {\n        Widget::operator=(other);\n\n        mItemSample = other.mItemSample->CloneAsRef<Widget>();\n        mSelectionDrawable = other.mSelectionDrawable->CloneAsRef<Sprite>();\n        mSelectionLayout = other.mSelectionLayout;\n        mLayout = FindChildByType<HorizontalLayout>();\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void MenuPanel::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        Widget::Update(dt);\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        const float rectLerpCoef = 20.0f;\n        if (mCurrentSelectionRect != mTargetSelectionRect)\n        {\n            mCurrentSelectionRect = Math::Lerp(mCurrentSelectionRect, mTargetSelectionRect, dt*rectLerpCoef);\n            mSelectionDrawable->SetRect(mCurrentSelectionRect);\n        }\n\n        if (mSelectSubContextTime >= 0.0f)\n        {\n            mSelectSubContextTime -= dt;\n\n            if (mSelectSubContextTime < 0.0f)\n            {\n                if (mOpenedContext)\n                {\n                    mOpenedContext.Lock()->HideWithChild();\n\n                    if (mSelectedItem >= 0)\n                    {\n                        if (auto contextMenu = mLayout->mChildWidgets[mSelectedItem]->FindChildByType<ContextMenu>())\n                        {\n                            contextMenu->Show(mLayout->mChildWidgets[mSelectedItem]->layout->worldLeftBottom);\n                            contextMenu->onHide = [=]() { mOpenedContext = nullptr; };\n                            mOpenedContext = contextMenu;\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    void MenuPanel::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy)\n            return;\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        IDrawable::OnDrawn();\n\n        for (auto& child : mChildrenInheritedDepth)\n            child->Draw();\n\n        mSelectionDrawable->Draw();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        DrawDebugFrame();\n    }\n\n    Ref<Widget> MenuPanel::AddItem(const Item& item)\n    {\n        auto newItem = CreateItem(item);\n        mLayout->AddChild(newItem);\n        mClickFunctions.Add(item.onClick);\n\n        return newItem;\n    }\n\n    Ref<ContextMenu> MenuPanel::CreateSubContext(WString& path)\n    {\n        int slashPos = path.Find(\"/\");\n        if (slashPos < 0)\n            return nullptr;\n\n        WString subMenu = path.SubStr(0, slashPos);\n\n        auto subChild = mLayout->mChildWidgets.FindOrDefault([&](auto& x) {\n            if (auto text = x->template GetLayerDrawable<Text>(\"text\"))\n                return text->text == subMenu;\n\n            return false;\n        });\n\n        if (!subChild)\n            subChild = AddItem(Item(subMenu, Function<void()>()));\n\n        auto subContext = subChild->FindChildByType<ContextMenu>();\n        if (!subContext)\n        {\n            subContext = o2UI.CreateWidget<ContextMenu>();\n            subChild->AddChild(subContext);\n        }\n\n        path = path.SubStr(slashPos + 1);\n\n        return subContext;\n    }\n\n    void MenuPanel::AddItem(const WString& path,\n                            const Function<void()>& clickFunc /*= Function<void()>()*/,\n                            const AssetRef<ImageAsset>& icon /*= AssetRef<ImageAsset>()*/,\n                            const ShortcutKeys& shortcut /*= ShortcutKeys()*/)\n    {\n        WString itemPath = path;\n        auto subContext = CreateSubContext(itemPath);\n        if (!subContext)\n        {\n            AddItem(Item(path, clickFunc));\n            return;\n        }\n\n        subContext->AddItem(itemPath, clickFunc, icon, shortcut);\n    }\n\n    void MenuPanel::AddToggleItem(const WString& path, bool value,\n                                  const Function<void(bool)>& clickFunc /*= Function<void(bool)>()*/,\n                                  const AssetRef<ImageAsset>& icon /*= AssetRef<ImageAsset>()*/,\n                                  const ShortcutKeys& shortcut /*= ShortcutKeys()*/)\n    {\n        WString itemPath = path;\n        auto subContext = CreateSubContext(itemPath);\n        if (!subContext)\n            return;\n\n        subContext->AddToggleItem(itemPath, value, clickFunc, icon, shortcut);\n    }\n\n    void MenuPanel::InsertItem(const Item& item, int position)\n    {\n        auto newItem = CreateItem(item);\n        mLayout->AddChild(newItem, position);\n\n        if (item.subItems.Count() > 0)\n        {\n            mClickFunctions.Insert([=]()\n            {\n                newItem->FindChildByType<ContextMenu>()->Show(newItem->layout->worldRightBottom);\n            }, position);\n        }\n        else mClickFunctions.Insert(item.onClick, position);\n    }\n\n    void MenuPanel::AddItems(Vector<Item> items)\n    {\n        for (auto item : items)\n            AddItem(item);\n    }\n\n    void MenuPanel::InsertItems(Vector<Item> items, int position)\n    {\n        int i = 0;\n        for (auto item : items)\n        {\n            InsertItem(item, position + i);\n            i++;\n        }\n    }\n\n    MenuPanel::Item MenuPanel::GetItem(int position)\n    {\n        if (position > 0 && position < mLayout->GetChildren().Count())\n            return GetItemDef(position);\n\n        return Item();\n    }\n\n    Vector<MenuPanel::Item> MenuPanel::GetItems() const\n    {\n        Vector<Item> res;\n        for (int i = 0; i < mLayout->GetChildren().Count(); i++)\n            res.Add(GetItemDef(i));\n\n        return res;\n    }\n\n    void MenuPanel::RemoveItem(int position)\n    {\n        if (position > 0 && position < mLayout->GetChildren().Count())\n            mLayout->RemoveChild(mLayout->GetChildren()[position]);\n    }\n\n    void MenuPanel::RemoveItem(const WString& path)\n    {\n        int slashPos = path.Find(\"/\");\n        if (slashPos < 0)\n        {\n            auto removingItem = mLayout->mChildWidgets.FindOrDefault([&](auto& x) {\n                if (auto text = x->template GetLayerDrawable<Text>(\"text\"))\n                    return text->text == path;\n\n                return false;\n            });\n\n            if (!removingItem)\n            {\n                o2Debug.LogError(\"Failed to remove menu item \" + path);\n                return;\n            }\n\n            mLayout->RemoveChild(removingItem);\n\n            return;\n        }\n\n        WString subMenu = path.SubStr(0, slashPos);\n\n        auto subChild = mLayout->mChildWidgets.FindOrDefault([&](auto& x) {\n            if (auto text = x->template GetLayerDrawable<Text>(\"text\"))\n                return text->text == subMenu;\n\n            return false;\n        });\n\n        if (!subChild)\n        {\n            o2Debug.LogError(\"Failed to remove menu item \" + path);\n            return;\n        }\n\n        auto subContext = subChild->FindChildByType<ContextMenu>();\n        if (!subContext)\n        {\n            o2Debug.LogError(\"Failed to remove menu item \" + path);\n            return;\n        }\n\n        subContext->RemoveItem(path.SubStr(slashPos + 1));\n    }\n\n    void MenuPanel::RemoveAllItems()\n    {\n        mLayout->RemoveAllChildren();\n    }\n\n    const Ref<HorizontalLayout>& MenuPanel::GetItemsLayout() const\n    {\n        return mLayout;\n    }\n\n    const Ref<Widget>& MenuPanel::GetItemSample() const\n    {\n        return mItemSample;\n    }\n\n    void MenuPanel::SetItemSample(const Ref<Widget>& sample)\n    {\n        mItemSample = sample;\n    }\n\n    const Ref<Sprite>& MenuPanel::GetSelectionDrawable() const\n    {\n        return mSelectionDrawable;\n    }\n\n    void MenuPanel::SetSelectionDrawableLayout(const Layout& layout)\n    {\n        mSelectionLayout = layout;\n    }\n\n    Layout MenuPanel::GetSelectionDrawableLayout() const\n    {\n        return mSelectionLayout;\n    }\n\n    Ref<Widget> MenuPanel::CreateItem(const Item& item)\n    {\n        auto newItem = mItemSample->CloneAsRef<Widget>();\n        newItem->name = (WString)\"Menu Item:\" + item.text;\n\n        if (auto textLayer = newItem->GetLayerDrawable<Text>(\"text\"))\n            textLayer->text = item.text;\n\n        if (item.subItems.Count() > 0)\n        {\n            auto subMenu = o2UI.CreateWidget<ContextMenu>();\n            subMenu->AddItems(item.subItems);\n            newItem->AddChild(subMenu);\n        }\n\n        return newItem;\n    }\n\n    MenuPanel::Item MenuPanel::GetItemDef(int idx) const\n    {\n        Item res;\n        auto item = mLayout->mChildWidgets[idx];\n\n        if (auto textLayer = item->GetLayerDrawable<Text>(\"text\"))\n            res.text = textLayer->text;\n\n        if (auto subMenu = item->FindChildByType<ContextMenu>())\n            res.subItems = subMenu->GetItems();\n\n        res.onClick = mClickFunctions[idx];\n\n        return res;\n    }\n\n    void MenuPanel::OnEnabled()\n    {\n        Widget::OnEnabled();\n        interactable = true;\n    }\n\n    void MenuPanel::OnDisabled()\n    {\n        Widget::OnDisabled();\n        interactable = false;\n    }\n\n    Ref<Widget> MenuPanel::GetItemUnderPoint(const Vec2F& point, int* idxPtr)\n    {\n        if (!mLayout)\n            return nullptr;\n\n        int idx = 0;\n        for (auto& child : mLayout->mChildWidgets)\n        {\n            if (child->layout->IsPointInside(point))\n            {\n                if (idxPtr)\n                    *idxPtr = idx;\n\n                return child;\n            }\n\n            idx++;\n        }\n\n        if (idxPtr)\n            *idxPtr = -1;\n\n        return nullptr;\n    }\n\n    void MenuPanel::UpdateHover(const Vec2F& point)\n    {\n        int itemIdx = -1;\n        auto itemUnderCursor = GetItemUnderPoint(point, &itemIdx);\n\n        if (itemIdx < 0)\n        {\n            auto hoverState = state[\"hover\"];\n            if (hoverState)\n            {\n                mSelectionDrawable->SetEnabled(true);\n                *hoverState = mOpenedContext != nullptr;\n            }\n            else\n                mSelectionDrawable->SetEnabled(false);\n\n            mSelectedItem = itemIdx;\n        }\n        else\n        {\n            mTargetSelectionRect = mSelectionLayout.Calculate(itemUnderCursor->layout->worldRect);\n\n            auto hoverState = state[\"hover\"];\n            if (hoverState)\n            {\n                mSelectionDrawable->SetEnabled(true);\n                *hoverState = true;\n            }\n            else\n                mSelectionDrawable->SetEnabled(true);\n\n            if (itemIdx != mSelectedItem)\n            {\n                mSelectSubContextTime = 0.5f;\n                mSelectedItem = itemIdx;\n            }\n        }\n    }\n\n    void MenuPanel::OnCursorPressed(const Input::Cursor& cursor)\n    {}\n\n    void MenuPanel::OnCursorStillDown(const Input::Cursor& cursor)\n    {}\n\n    void MenuPanel::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        int itemIdx = -1;\n        auto itemUnderCursor = GetItemUnderPoint(cursor.position, &itemIdx);\n\n        if (itemIdx >= 0)\n        {\n            mClickFunctions[itemIdx]();\n\n            if (mOpenedContext)\n                mOpenedContext.Lock()->HideWithChild();\n\n            if (auto context = itemUnderCursor->FindChildByType<ContextMenu>())\n            {\n                context->Show(itemUnderCursor->layout->worldLeftBottom);\n                mOpenedContext = context;\n                mSelectSubContextTime = -1.0f;\n            }\n        }\n    }\n\n    void MenuPanel::OnCursorPressBreak(const Input::Cursor& cursor)\n    {}\n\n    void MenuPanel::OnCursorMoved(const Input::Cursor& cursor)\n    {\n        const float checkDeltaThreshold = 2.0f;\n        if ((cursor.position - mLastSelectCheckCursor).Length() < checkDeltaThreshold)\n            return;\n\n        mLastSelectCheckCursor = cursor.position;\n\n        UpdateHover(cursor.position);\n    }\n\n    void MenuPanel::OnCursorExit(const Input::Cursor& cursor)\n    {\n        UpdateHover(cursor.position);\n    }\n\n    MenuPanel::Item::Item()\n    {}\n\n    MenuPanel::Item::Item(const WString& text, const Vector<Ref<ContextMenu::Item>>& subItems):\n        text(text), subItems(subItems)\n    {}\n\n    MenuPanel::Item::Item(const WString& text, const Function<void()> onClick) :\n        text(text), onClick(onClick)\n    {}\n\n    bool MenuPanel::Item::operator==(const Item& other) const\n    {\n        return text == other.text;\n    }\n\n    String MenuPanel::GetCreateMenuGroup()\n    {\n        return \"Dropping\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::MenuPanel>);\n// --- META ---\n\nDECLARE_CLASS(o2::MenuPanel, o2__MenuPanel);\n\nDECLARE_CLASS(o2::MenuPanel::Item, o2__MenuPanel__Item);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/MenuPanel.h",
    "content": "#pragma once\n\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Function/Function.h\"\n\nnamespace o2\n{\n    class HorizontalLayout;\n\n    // -------------\n    // UI Menu panel\n    // -------------\n    class MenuPanel: public Widget, public DrawableCursorEventsListener\n    {\n    public:\n        // --------------------\n        // Menu panel text item\n        // --------------------\n        class Item: public ISerializable, public RefCounterable, public ICloneableRef\n        {\n        public:\n            WString text; // Item text @SERIALIZABLE\n\n            Vector<Ref<ContextMenu::Item>> subItems; // Children sub items @SERIALIZABLE\n\n            Function<void()> onClick; // Click function \n\n        public:\n            // Default constructor\n            Item();\n\n            // Constructor with text and sub items\n            Item(const WString& text, const Vector<Ref<ContextMenu::Item>>& subItems);\n\n            // Constructor with text and click function\n            Item(const WString& text, const Function<void()> onClick);\n\n            // Copy operator\n            bool operator==(const Item& other) const;\n\n            SERIALIZABLE(Item);\n            CLONEABLE_REF(Item);\n        };\n\n    public:\n        // Default constructor\n        explicit MenuPanel(RefCounter* refCounter);\n\n        // Copy-constructor\n        MenuPanel(RefCounter* refCounter, const MenuPanel& other);\n\n        // Destructor\n        ~MenuPanel();\n\n        // Copy-operator\n        MenuPanel& operator=(const MenuPanel& other);\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Draws widget\n        void Draw() override;\n\n        // Add item\n        Ref<Widget> AddItem(const Item& item);\n\n        // Adds item by path (\"node/sub node/target\")\n        void AddItem(const WString& path, const Function<void()>& clickFunc = Function<void()>(),\n                     const AssetRef<ImageAsset>& icon = AssetRef<ImageAsset>(),\n                     const ShortcutKeys& shortcut = ShortcutKeys());\n\n        // Adds toggle item by path (\"node/sub node/target\")\n        void AddToggleItem(const WString& path, bool value,\n                           const Function<void(bool)>& clickFunc = Function<void(bool)>(),\n                           const AssetRef<ImageAsset>& icon = AssetRef<ImageAsset>(),\n                           const ShortcutKeys& shortcut = ShortcutKeys());\n\n        // Inserts item at position\n        void InsertItem(const Item& item, int position);\n\n        // Adds array of items\n        void AddItems(Vector<Item> items);\n\n        // Inserts array of items at position\n        void InsertItems(Vector<Item> items, int position);\n\n        // Returns item at position\n        Item GetItem(int position);\n\n        // Returns array of all items\n        Vector<Item> GetItems() const;\n\n        // Removes item at position\n        void RemoveItem(int position);\n\n        // Removes item by path\n        void RemoveItem(const WString& path);\n\n        // Removes all items\n        void RemoveAllItems();\n\n        // Returns items vertical layout\n        const Ref<HorizontalLayout>& GetItemsLayout() const;\n\n        // Returns item sample\n        const Ref<Widget>& GetItemSample() const;\n\n        // Sets item sample\n        void SetItemSample(const Ref<Widget>& sample);\n\n        // Returns selection drawable\n        const Ref<Sprite>& GetSelectionDrawable() const;\n\n        // Sets selection drawable layout\n        void SetSelectionDrawableLayout(const Layout& layout);\n\n        // Returns selection drawable layout\n        Layout GetSelectionDrawableLayout() const;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(MenuPanel);\n        CLONEABLE_REF(MenuPanel);\n\n    protected:\n        Ref<HorizontalLayout> mLayout; // Items layout\n\n        Ref<Widget> mItemSample; // Item sample @SERIALIZABLE\n\n        Vector<Function<void()>> mClickFunctions; // Items click functions\n\n        Ref<Sprite> mSelectionDrawable; // Selection sprite @SERIALIZABLE\n        Layout      mSelectionLayout;   // Selection layout, result selection area depends on selected item @SERIALIZABLE\n\n        RectF mCurrentSelectionRect;  // Current selection rectangle (for smoothing)\n        RectF mTargetSelectionRect;   // Target selection rectangle (over selected item)\n        Vec2F mLastSelectCheckCursor; // Last cursor position on selection check\n\n        int   mSelectedItem = -1;            // Index of selected item\n        float mSelectSubContextTime = -1.0f; // Time to appearing selected sub context\n\n        WeakRef<ContextMenu> mOpenedContext; // Last opened context in menu\n\n    protected:\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Creates sub context menus by path\n        Ref<ContextMenu> CreateSubContext(WString& path);\n\n        // Creates item widget\n        Ref<Widget> CreateItem(const Item& item);\n\n        // Returns item info\n        Item GetItemDef(int idx) const;\n\n        // Returns item widget under point and stores index in idxPtr, if not null\n        Ref<Widget> GetItemUnderPoint(const Vec2F& point, int* idxPtr);\n\n        // Updates hover\n        void UpdateHover(const Vec2F& point);\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::MenuPanel)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::DrawableCursorEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::MenuPanel)\n{\n    FIELD().PROTECTED().NAME(mLayout);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mItemSample);\n    FIELD().PROTECTED().NAME(mClickFunctions);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectionDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectionLayout);\n    FIELD().PROTECTED().NAME(mCurrentSelectionRect);\n    FIELD().PROTECTED().NAME(mTargetSelectionRect);\n    FIELD().PROTECTED().NAME(mLastSelectCheckCursor);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1).NAME(mSelectedItem);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1.0f).NAME(mSelectSubContextTime);\n    FIELD().PROTECTED().NAME(mOpenedContext);\n}\nEND_META;\nCLASS_METHODS_META(o2::MenuPanel)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const MenuPanel&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Widget>, AddItem, const Item&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddItem, const WString&, const Function<void()>&, const AssetRef<ImageAsset>&, const ShortcutKeys&);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddToggleItem, const WString&, bool, const Function<void(bool)>&, const AssetRef<ImageAsset>&, const ShortcutKeys&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertItem, const Item&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddItems, Vector<Item>);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertItems, Vector<Item>, int);\n    FUNCTION().PUBLIC().SIGNATURE(Item, GetItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Item>, GetItems);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveItem, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllItems);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<HorizontalLayout>&, GetItemsLayout);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Widget>&, GetItemSample);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetItemSample, const Ref<Widget>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetSelectionDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionDrawableLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetSelectionDrawableLayout);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<ContextMenu>, CreateSubContext, WString&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Widget>, CreateItem, const Item&);\n    FUNCTION().PROTECTED().SIGNATURE(Item, GetItemDef, int);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Widget>, GetItemUnderPoint, const Vec2F&, int*);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHover, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::MenuPanel::Item)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::MenuPanel::Item)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(text);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(subItems);\n    FIELD().PUBLIC().NAME(onClick);\n}\nEND_META;\nCLASS_METHODS_META(o2::MenuPanel::Item)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const WString&, const Vector<Ref<ContextMenu::Item>>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const WString&, const Function<void()>);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/PopupWidget.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"PopupWidget.h\"\n\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Events/EventSystem.h\"\n\nnamespace o2\n{\n    PopupWidget::PopupWidget(RefCounter* refCounter):\n        ScrollArea(refCounter)\n    {\n        SetEnabledForcible(false);\n    }\n\n    PopupWidget::PopupWidget(RefCounter* refCounter, const PopupWidget& other):\n        ScrollArea(refCounter, other), mFitSizeMin(other.mFitSizeMin)\n    {\n        SetEnabledForcible(false);\n    }\n\n    PopupWidget::~PopupWidget()\n    {}\n\n    PopupWidget& PopupWidget::operator=(const PopupWidget& other)\n    {\n        ScrollArea::operator=(other);\n\n        mFitSizeMin = other.mFitSizeMin;\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void PopupWidget::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy)\n            return;\n\n        ScrollArea::Update(dt);\n\n        bool cursorPressed = o2Input.IsCursorPressed() || o2Input.IsRightMousePressed();\n        if (cursorPressed)\n        {\n            if (!mChildPopup && (cursorPressed || Math::Abs(o2Input.GetMouseWheelDelta()) > 0.1f) &&\n                !layout->IsPointInside(o2Input.GetCursorPos()) && !mShownAtFrame && Actor::mEnabled)\n            {\n                HideWithParent();\n            }\n        }\n\n        mShownAtFrame = false;\n    }\n\n    void PopupWidget::Draw()\n\t{\n\t\tmCurrentDrawingLayer = o2Events.GetCurrentCursorAreaEventsLayer();\n    }\n\n    void PopupWidget::Show(const Ref<PopupWidget>& parent, const Vec2F& position /*= o2Input.GetCursorPos()*/)\n    {\n        if (parent)\n        {\n            mParentPopup = parent;\n            parent->mChildPopup = Ref(this);\n        }\n        else \n            mVisiblePopup = Ref(this);\n\n        Widget::Show();\n\n        FitSizeAndPosition(position);\n        UpdateSelfTransform();\n        UpdateChildrenTransforms();\n\n        mShownAtFrame = true;\n    }\n\n    void PopupWidget::Show(const Vec2F& position /*= o2Input.GetCursorPos()*/)\n    {\n        Show(nullptr, position);\n    }\n\n    void PopupWidget::OnEnabled()\n    {\n        ScrollArea::OnEnabled();\n\n        SetInteractable(true);\n    }\n\n    void PopupWidget::OnDisabled()\n    {\n        ScrollArea::OnDisabled();\n\n        SetInteractable(false);\n    }\n\n    void PopupWidget::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        HideWithParent();\n        HideWithChild();\n    }\n\n    void PopupWidget::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n        HideWithParent();\n        HideWithChild();\n    }\n\n    void PopupWidget::OnKeyPressed(const Input::Key& key)\n    {\n        if (key == VK_ESCAPE)\n        {\n            HideWithParent();\n            HideWithChild();\n        }\n    }\n\n    void PopupWidget::HideWithParent()\n    {\n        Hide();\n\n        if (mParentPopup)\n            mParentPopup.Lock()->HideWithParent();\n\n        mParentPopup = nullptr;\n        mChildPopup = nullptr;\n    }\n\n    void PopupWidget::HideWithChild()\n    {\n        Hide();\n\n        if (mChildPopup)\n            mChildPopup.Lock()->HideWithChild();\n\n        mChildPopup = nullptr;\n    }\n\n    void PopupWidget::SetMinFitSize(float size)\n    {\n        mFitSizeMin = size;\n    }\n\n    bool PopupWidget::IsScrollable() const\n    {\n        return true;\n    }\n\n    WeakRef<PopupWidget> PopupWidget::mVisiblePopup;\n\n    bool PopupWidget::IsInputTransparent() const\n    {\n        return false;\n    }\n\n    const WeakRef<CursorAreaEventListenersLayer>& PopupWidget::GetCurrentDrawingLayer() const\n    {\n        return mCurrentDrawingLayer;\n    }\n\n    void PopupWidget::CheckClipping(const RectF& clipArea)\n    {\n        mIsClipped = false;\n\n        Vec2F resolution = o2Render.GetCurrentResolution();\n        RectF fullScreenRect(resolution*0.5f, resolution*(-0.5f));\n        for (auto& child : mChildWidgets)\n            child->CheckClipping(fullScreenRect);\n    }\n\n    void PopupWidget::FitSizeAndPosition(const Vec2F& position)\n    {\n        UpdateTransform();\n\n        Vec2F size = fitByChildren ? GetContentSize() : layout->GetSize();\n        FitPosition(position, size);\n    }\n\n    Vec2F PopupWidget::GetContentSize() const\n    {\n        Vec2F size = layout->GetMinimalSize();\n\n        for (auto& child : mChildWidgets)\n        {\n            size.x = Math::Max(size.x, child->GetMinWidthWithChildren());\n            size.y = Math::Max(size.y, child->GetMinHeightWithChildren());\n        }\n\n        size.x += mViewAreaLayout.offsetMin.x - mViewAreaLayout.offsetMax.x;\n        size.y += mViewAreaLayout.offsetMin.y - mViewAreaLayout.offsetMax.y;\n\n        return size;\n    }\n\n    void PopupWidget::FitPosition(const Vec2F& position, Vec2F size)\n    {\n        size.x = Math::Min(size.x, (float)o2Render.GetResolution().x);\n        size.y = Math::Min(size.y, (float)o2Render.GetResolution().y);\n\n        RectF thisRect(position.x, position.y, position.x + size.x, position.y - size.y);\n        RectF screenRect(-o2Render.GetResolution().x*0.5f, o2Render.GetResolution().y*0.5f,\n                         o2Render.GetResolution().x*0.5f, -o2Render.GetResolution().y*0.5f);\n\n        if (thisRect.left < screenRect.left)\n            thisRect += Vec2F(screenRect.left - thisRect.left, 0);\n\n        if (thisRect.right > screenRect.right)\n            thisRect += Vec2F(screenRect.right - thisRect.right, 0);\n\n        if (thisRect.top > screenRect.top)\n            thisRect += Vec2F(0, screenRect.top - thisRect.top);\n\n        if (thisRect.bottom < screenRect.bottom)\n            thisRect += Vec2F(0, screenRect.bottom - thisRect.bottom);\n\n        thisRect.left = Math::Round(thisRect.left);\n        thisRect.right = Math::Round(thisRect.right);\n        thisRect.top = Math::Round(thisRect.top);\n        thisRect.bottom = Math::Round(thisRect.bottom);\n\n        layout->worldRect = thisRect;\n    }\n\n    void PopupWidget::SpecialDraw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy)\n            return;\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        IDrawable::OnDrawn();\n        CursorAreaEventsListener::OnDrawn();\n\n        o2Render.EnableScissorTest(mAbsoluteClipArea);\n\n        for (auto& child : mChildWidgets)\n            child->Draw();\n\n        o2Render.DisableScissorTest();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        if (mOwnHorScrollBar)\n            mHorScrollBar->Draw();\n\n        if (mOwnVerScrollBar)\n            mVerScrollBar->Draw();\n\n        DrawDebugFrame();\n\n        if (mChildPopup)\n            mChildPopup.Lock()->SpecialDraw();\n    }\n\n    String PopupWidget::GetCreateMenuGroup()\n    {\n        return \"Window\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::PopupWidget>);\n// --- META ---\n\nDECLARE_CLASS(o2::PopupWidget, o2__PopupWidget);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/PopupWidget.h",
    "content": "#pragma once\n\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n\nnamespace o2\n{\n    // ----------------------------------------------------------------------------------------\n    // Popup widget. Draws on top of all UI, can be opened only one. Closes other automatically\n    // ----------------------------------------------------------------------------------------\n    class PopupWidget: public ScrollArea, public KeyboardEventsListener\n    {\n    public:\n        bool fitByChildren = true; // Fit size when opening by children @SERIALIZABLE\n\n    public:\n        // Default constructor\n        explicit PopupWidget(RefCounter* refCounter);\n\n        // Copy-constructor\n        PopupWidget(RefCounter* refCounter, const PopupWidget& other);\n\n        // Destructor\n        ~PopupWidget();\n\n        // Copy operator\n        PopupWidget& operator=(const PopupWidget& other);\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Draws widget\n        void Draw() override;\n\n        // Show from parent context\n        virtual void Show(const Ref<PopupWidget>& parent, const Vec2F& position = o2Input.GetCursorPos());\n\n        // Shows context\n        void Show(const Vec2F& position = o2Input.GetCursorPos());\n\n        // Sets minimal fitting size\n        void SetMinFitSize(float size);\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Fits size by items\n        virtual void FitSizeAndPosition(const Vec2F& position);\n\n        // Returns the layer on which this popup should be drawn\n        const WeakRef<CursorAreaEventListenersLayer>& GetCurrentDrawingLayer() const;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(PopupWidget);\n        CLONEABLE_REF(PopupWidget);\n\n    protected:\n        static WeakRef<PopupWidget> mVisiblePopup; // Current visible popup widget\n\n        float mFitSizeMin = 40.0f;    // Minimal fitting size @SERIALIZABLE\n\n        WeakRef<PopupWidget> mParentPopup; // Parent visible popup widget\n        WeakRef<PopupWidget> mChildPopup;  // Child visible popup widget\n\n        bool mShownAtFrame = false; // Is popup was shown at current frame\n        \n        WeakRef<CursorAreaEventListenersLayer> mCurrentDrawingLayer; // Current layer during drawing\n\n    protected:\n        // Checks widget clipping by area\n        void CheckClipping(const RectF& clipArea) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Fits position by size and screen\n        virtual void FitPosition(const Vec2F& position, Vec2F size);\n\n        // Returns content size for fitting by children\n        virtual Vec2F GetContentSize() const;\n\n        // Hides context with his parent\n        virtual void HideWithParent();\n\n        // Hides context with his child\n        virtual void HideWithChild();\n\n        // Special drawing for contexts\n        virtual void SpecialDraw();\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor released outside this(only when cursor pressed this at previous time)\n        void OnCursorReleasedOutside(const Input::Cursor& cursor) override;\n\n        // Called when key was released\n        void OnKeyPressed(const Input::Key& key) override;\n\n        REF_COUNTERABLE_IMPL(RefCounterable);\n\n        friend class ContextMenu;\n        friend class MenuPanel;\n        friend class UIManager;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::PopupWidget)\n{\n    BASE_CLASS(o2::ScrollArea);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::PopupWidget)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(fitByChildren);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(40.0f).NAME(mFitSizeMin);\n    FIELD().PROTECTED().NAME(mParentPopup);\n    FIELD().PROTECTED().NAME(mChildPopup);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mShownAtFrame);\n    FIELD().PROTECTED().NAME(mCurrentDrawingLayer);\n}\nEND_META;\nCLASS_METHODS_META(o2::PopupWidget)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const PopupWidget&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Show, const Ref<PopupWidget>&, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Show, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMinFitSize, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE(void, FitSizeAndPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(const WeakRef<CursorAreaEventListenersLayer>&, GetCurrentDrawingLayer);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckClipping, const RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, FitPosition, const Vec2F&, Vec2F);\n    FUNCTION().PROTECTED().SIGNATURE(Vec2F, GetContentSize);\n    FUNCTION().PROTECTED().SIGNATURE(void, HideWithParent);\n    FUNCTION().PROTECTED().SIGNATURE(void, HideWithChild);\n    FUNCTION().PROTECTED().SIGNATURE(void, SpecialDraw);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleasedOutside, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/ScrollArea.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ScrollArea.h\"\n\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Scene/UI/Widgets/ContextMenu.h\"\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    ScrollArea::ScrollArea(RefCounter* refCounter) :\n        Widget(refCounter)\n    {}\n\n    ScrollArea::ScrollArea(RefCounter* refCounter, const ScrollArea& other) :\n        Widget(refCounter, other), mOwnHorScrollBar(other.mOwnHorScrollBar), mOwnVerScrollBar(other.mOwnVerScrollBar),\n        mClipAreaLayout(other.mClipAreaLayout), mScrollPos(other.mScrollPos), mScrollSpeedDamp(other.mScrollSpeedDamp),\n        mViewAreaLayout(other.mViewAreaLayout), mEnableScrollsHiding(other.mEnableScrollsHiding)\n    {\n        if (mOwnHorScrollBar)\n        {\n            mHorScrollBar = GetInternalWidgetByType<HorizontalScrollBar>(\"horScrollBar\");\n            mHorScrollBar->GetLayoutData().drivenByParent = true;\n            mHorScrollBar->onSmoothChange += THIS_FUNC(OnHorScrollChanged);\n            mHorScrollBar->SetEnabledForcible(false);\n\n            mEnableHorScroll = false;\n        }\n        else \n            mHorScrollBar = nullptr;\n\n        if (mOwnVerScrollBar)\n        {\n            mVerScrollBar = GetInternalWidgetByType<VerticalScrollBar>(\"verScrollBar\");\n            mVerScrollBar->GetLayoutData().drivenByParent = true;\n            mVerScrollBar->onSmoothChange += THIS_FUNC(OnVerScrollChanged);\n            mVerScrollBar->SetEnabledForcible(false);\n\n            mEnableVerScroll = false;\n        }\n        else \n            mVerScrollBar = nullptr;\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    ScrollArea::~ScrollArea()\n    {\n        if (mHorScrollBar)\n        {\n            if (!mOwnHorScrollBar)\n                mHorScrollBar->onSmoothChange -= THIS_FUNC(OnHorScrollChanged);\n        }\n\n        if (mVerScrollBar)\n        {\n            if (!mOwnVerScrollBar)\n                mVerScrollBar->onSmoothChange -= THIS_FUNC(OnVerScrollChanged);\n        }\n    }\n\n    ScrollArea& ScrollArea::operator=(const ScrollArea& other)\n    {\n        if (mHorScrollBar)\n        {\n            if (!mOwnHorScrollBar)\n                mHorScrollBar->onSmoothChange -= THIS_FUNC(OnHorScrollChanged);\n        }\n\n        if (mVerScrollBar)\n        {\n            if (!mOwnVerScrollBar)\n                mVerScrollBar->onSmoothChange -= THIS_FUNC(OnVerScrollChanged);\n        }\n\n        mClipAreaLayout = other.mClipAreaLayout;\n        mViewAreaLayout = other.mViewAreaLayout;\n        mScrollPos = other.mScrollPos;\n        mOwnHorScrollBar = other.mOwnHorScrollBar;\n        mOwnVerScrollBar = other.mOwnVerScrollBar;\n        mScrollSpeedDamp = other.mScrollSpeedDamp;\n        mEnableScrollsHiding = other.mEnableScrollsHiding;\n\n        Widget::operator=(other);\n\n        if (mOwnHorScrollBar)\n        {\n            mHorScrollBar = GetInternalWidgetByType<HorizontalScrollBar>(\"horScrollBar\");\n            mHorScrollBar->onSmoothChange += THIS_FUNC(OnHorScrollChanged);\n            mHorScrollBar->GetLayoutData().drivenByParent = true;\n            mHorScrollBar->SetEnabledForcible(false);\n\n            mEnableHorScroll = false;\n        }\n        else \n            mHorScrollBar = nullptr;\n\n        if (mOwnVerScrollBar)\n        {\n            mVerScrollBar = GetInternalWidgetByType<VerticalScrollBar>(\"verScrollBar\");\n            mVerScrollBar->onSmoothChange += THIS_FUNC(OnVerScrollChanged);\n            mVerScrollBar->GetLayoutData().drivenByParent = true;\n            mVerScrollBar->SetEnabledForcible(false);\n\n            mEnableVerScroll = false;\n        }\n        else \n            mVerScrollBar = nullptr;\n\n        RetargetStatesAnimations();\n        UpdateScrollParams();\n        SetLayoutDirty();\n        UpdateScrollParams();\n        \n        return *this;\n    }\n\n    void ScrollArea::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n        {\n            if (mIsClipped)\n            {\n                for (auto& child : mChildrenInheritedDepth)\n                    child->Draw();\n            }\n\n            return;\n        }\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        IDrawable::OnDrawn();\n\n        o2Render.EnableScissorTest(mAbsoluteClipArea);\n\n        for (auto& child : mChildrenInheritedDepth)\n            child->Draw();\n\n        o2Render.DisableScissorTest();\n\n        CursorAreaEventsListener::OnDrawn();\n\n        for (auto& child : mInternalWidgets)\n            child->Draw();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        DrawDebugFrame();\n    }\n\n    void ScrollArea::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        mHasScrolled = false;\n\n        mLayoutUpdated = layout->IsDirty();\n\n        Widget::Update(dt);\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        CheckScrollBarsVisibility();\n\n        if (!mPressedCursor && mScrollSpeed != Vec2F())\n        {\n            SetScroll(mScrollPos + mScrollSpeed*dt);\n\n            if (Math::Abs(mScrollSpeed.x) > FLT_EPSILON)\n                mScrollSpeed.x -= Math::Sign(mScrollSpeed.x)*\n                Math::Min(Math::Abs(mScrollSpeed.x), Math::Max(Math::Abs(mScrollSpeed.x)*dt*mScrollSpeedDamp, 0.05f));\n\n            if (Math::Abs(mScrollSpeed.y) > FLT_EPSILON)\n                mScrollSpeed.y -= Math::Sign(mScrollSpeed.y)*\n                Math::Min(Math::Abs(mScrollSpeed.y), Math::Max(Math::Abs(mScrollSpeed.y)*dt*mScrollSpeedDamp, 0.05f));\n        }\n\n        if (mEnableScrollsHiding)\n        {\n            const float barsHideDelay = 2;\n            float curTime = o2Time.GetApplicationTime();\n\n            if (curTime - mLastHorScrollChangeTime > barsHideDelay && mHorScrollBar && mHorScrollBar->IsEnabled() &&\n                mEnableHorScroll)\n            {\n                auto enableHorBarState = state[\"enableHorBar\"];\n                if (enableHorBarState)\n                    *enableHorBarState = false;\n\n                mHorScrollBar->Hide();\n            }\n\n            if (curTime - mLastVerScrollChangeTime > barsHideDelay && mVerScrollBar && mVerScrollBar->IsEnabled() &&\n                mEnableVerScroll)\n            {\n                auto enableVerBarState = state[\"enableVerBar\"];\n                if (enableVerBarState)\n                    *enableVerBarState = false;\n\n                mVerScrollBar->Hide();\n            }\n        }\n    }\n\n    void ScrollArea::UpdateChildren(float dt)\n    {\n        Widget::UpdateChildren(dt);\n\n        if (mLayoutUpdated && !!mResEnabledInHierarchy)\n        {\n            CheckChildrenClipping();\n            UpdateScrollParams();\n        }\n    }\n\n    void ScrollArea::SetScroll(const Vec2F& scroll)\n    {\n        Vec2F newScrollPos(Math::Clamp(scroll.x, mScrollRange.left, mScrollRange.right),\n                           Math::Clamp(scroll.y, mScrollRange.bottom, mScrollRange.top));\n\n        Vec2F scrollDelta;\n\n        if (mHorScrollBar)\n            mHorScrollBar->SetValue(newScrollPos.x);\n        else\n            scrollDelta.x = newScrollPos.x - mScrollPos.x;\n\n        if (mVerScrollBar)\n            mVerScrollBar->SetValue(newScrollPos.y);\n        else\n            scrollDelta.y = newScrollPos.y - mScrollPos.y;\n\n        if (!mVerScrollBar || !mHorScrollBar)\n            MoveScrollPosition(scrollDelta);\n\n        onScrolled(newScrollPos);\n        OnScrolled();\n    }\n\n    void ScrollArea::SetScrollForcible(const Vec2F& scroll)\n    {\n        Vec2F newScrollPos(Math::Clamp(scroll.x, mScrollRange.left, mScrollRange.right),\n                           Math::Clamp(scroll.y, mScrollRange.bottom, mScrollRange.top));\n\n        Vec2F scrollDelta;\n\n        if (mHorScrollBar)\n            mHorScrollBar->SetValueForcible(newScrollPos.x);\n        else\n            scrollDelta.x = newScrollPos.x - mScrollPos.x;\n\n        if (mVerScrollBar)\n            mVerScrollBar->SetValueForcible(newScrollPos.y);\n        else\n            scrollDelta.y = newScrollPos.y - mScrollPos.y;\n\n        if (!mVerScrollBar || !mHorScrollBar)\n            MoveScrollPosition(scrollDelta);\n\n        onScrolled(newScrollPos);\n        OnScrolled();\n    }\n\n    Vec2F ScrollArea::GetScroll() const\n    {\n        return mScrollPos;\n    }\n\n    RectF ScrollArea::GetScrollRange() const\n    {\n        return mScrollRange;\n    }\n\n    void ScrollArea::ResetScroll()\n    {\n        SetScrollForcible(mScrollArea.LeftBottom());\n    }\n\n    void ScrollArea::SetHorizontalScroll(float scroll)\n    {\n        SetScroll(Vec2F(scroll, mScrollPos.y));\n    }\n\n    float ScrollArea::GetHorizontalScroll() const\n    {\n        return mScrollPos.x;\n    }\n\n    void ScrollArea::SetVerticalScroll(float scroll)\n    {\n        SetScroll(Vec2F(mScrollPos.x, scroll));\n    }\n\n    float ScrollArea::GetVerticalScroll() const\n    {\n        return mScrollPos.y;\n    }\n\n    void ScrollArea::SetHorizontalScrollBar(const Ref<HorizontalScrollBar>& scrollbar, bool owner /*= true*/)\n    {\n        if (mHorScrollBar)\n        {\n            if (!mOwnHorScrollBar)\n                mHorScrollBar->onSmoothChange -= THIS_FUNC(OnHorScrollChanged);\n        }\n\n        mHorScrollBar = scrollbar;\n        mOwnHorScrollBar = owner;\n\n        if (mHorScrollBar)\n        {\n            mHorScrollBar->name = \"horScrollBar\";\n            mHorScrollBar->SetInternalParent(Ref(this), false);\n            mHorScrollBar->GetLayoutData().drivenByParent = true;\n            mHorScrollBar->onSmoothChange += THIS_FUNC(OnHorScrollChanged);\n        }\n\n        UpdateScrollParams();\n        SetLayoutDirty();\n    }\n\n    const Ref<HorizontalScrollBar>& ScrollArea::GetHorizontalScrollbar() const\n    {\n        return mHorScrollBar;\n    }\n\n    void ScrollArea::SetVerticalScrollBar(const Ref<VerticalScrollBar>& scrollbar, bool owner /*= true*/)\n    {\n        if (mVerScrollBar)\n        {\n            if (!mOwnVerScrollBar)\n                mVerScrollBar->onSmoothChange -= THIS_FUNC(OnVerScrollChanged);\n        }\n\n        mVerScrollBar = scrollbar;\n        mOwnVerScrollBar = owner;\n\n        if (mVerScrollBar)\n        {\n            mVerScrollBar->name = \"verScrollBar\";\n            mVerScrollBar->SetInternalParent(Ref(this), false);\n            mVerScrollBar->GetLayoutData().drivenByParent = true;\n            mVerScrollBar->onSmoothChange += THIS_FUNC(OnVerScrollChanged);\n        }\n\n        UpdateScrollParams();\n        SetLayoutDirty();\n    }\n\n    const Ref<VerticalScrollBar>& ScrollArea::GetVerticalScrollbar() const\n    {\n        return mVerScrollBar;\n    }\n\n    void ScrollArea::SetEnableScrollsHiding(bool hideScrolls)\n    {\n        mEnableScrollsHiding = hideScrolls;\n\n        if (!mEnableScrollsHiding)\n        {\n            if (mHorScrollBar && !mHorScrollBar->IsEnabled())\n            {\n                auto enableHorBarState = state[\"enableHorBar\"];\n                if (enableHorBarState)\n                    *enableHorBarState = true;\n\n                mHorScrollBar->Show(true);\n            }\n\n            if (mVerScrollBar && !mVerScrollBar->IsEnabled())\n            {\n                auto enableHorBarState = state[\"enableHorBar\"];\n                if (enableHorBarState)\n                    *enableHorBarState = true;\n\n                mVerScrollBar->Show(true);\n            }\n        }\n    }\n\n    bool ScrollArea::IsScrollsHiding()\n    {\n        return mEnableScrollsHiding;\n    }\n\n    void ScrollArea::SetScrollBarsShowingByCursor(bool showByCursor)\n    {\n        mShowScrollBarsByCursor = showByCursor;\n    }\n\n    bool ScrollArea::IsScrollBarsShowingByCursor()\n    {\n        return mShowScrollBarsByCursor;\n    }\n\n    void ScrollArea::SetClippingLayout(const Layout& clipLayout)\n    {\n        mClipAreaLayout = clipLayout;\n        SetLayoutDirty();\n    }\n\n    Layout ScrollArea::GetClippingLayout() const\n    {\n        return mClipAreaLayout;\n    }\n\n    void ScrollArea::SetViewLayout(const Layout& viewLayout)\n    {\n        mViewAreaLayout = viewLayout;\n        SetLayoutDirty();\n    }\n\n    Layout ScrollArea::GetViewLayout() const\n    {\n        return mViewAreaLayout;\n    }\n\n    void ScrollArea::SetChildrenWorldRect(const RectF& childrenWorldRect)\n    {\n        Vec2F roundedScrollPos(-Math::Round(mScrollPos.x), Math::Round(mScrollPos.y));\n\n        mAbsoluteViewArea = mViewAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        mAbsoluteClipArea = mClipAreaLayout.Calculate(GetLayoutData().worldRectangle);\n\n        GetLayoutData().childrenWorldRect = mAbsoluteViewArea + roundedScrollPos;\n    }\n\n    void ScrollArea::OnChildAdded(const Ref<Widget>& child)\n    {\n        child->GetLayoutData().drivenByParent = true;\n    }\n\n    void ScrollArea::OnChildRemoved(const Ref<Widget>& child)\n    {\n        child->GetLayoutData().drivenByParent = false;\n    }\n\n    void ScrollArea::CheckScrollBarsVisibility()\n    {\n        if (mEnableScrollsHiding && mShowScrollBarsByCursor)\n        {\n            auto cursor = o2Input.GetCursor(0);\n\n            if (cursor)\n            {\n                if (mHorScrollBar && mHorScrollBar->IsUnderPoint(cursor->position) &&\n                    mEnableHorScroll)\n                {\n                    mLastHorScrollChangeTime = o2Time.GetApplicationTime();\n\n                    if (!mHorScrollBar->IsEnabled())\n                    {\n                        auto enableHorBarState = state[\"enableHorBar\"];\n                        if (enableHorBarState)\n                            *enableHorBarState = true;\n\n                        mHorScrollBar->Show();\n                    }\n                }\n\n                if (mVerScrollBar && mVerScrollBar->IsUnderPoint(cursor->position) &&\n                    mEnableVerScroll)\n                {\n                    mLastVerScrollChangeTime = o2Time.GetApplicationTime();\n\n                    if (!mVerScrollBar->IsEnabled())\n                    {\n                        auto enableVerBarState = state[\"enableVerBar\"];\n                        if (enableVerBarState)\n                            *enableVerBarState = true;\n\n                        mVerScrollBar->Show();\n                    }\n                }\n            }\n        }\n    }\n\n    void ScrollArea::UpdateChildrenTransforms()\n    {\n        Widget::UpdateChildrenTransforms();\n\n        CheckChildrenClipping();\n        UpdateScrollParams();\n    }\n\n    bool ScrollArea::IsUnderPoint(const Vec2F& point)\n    {\n        return Widget::IsUnderPoint(point);\n    }\n\n    bool ScrollArea::IsScrollable() const\n    {\n        return true;\n    }\n\n    bool ScrollArea::IsInputTransparent() const\n    {\n        return !mHasScrolled;\n    }\n\n    void ScrollArea::MoveScrollPosition(const Vec2F& delta)\n    {\n        mScrollPos += delta;\n        SetChildrenWorldRect(GetLayoutData().worldRectangle);\n\n        Vec2F widgetsMove(-delta.x, delta.y);\n        for (auto& child : mChildWidgets)\n            child->MoveAndCheckClipping(widgetsMove, mAbsoluteClipArea);\n\n        UpdateLayersLayouts();\n        UpdateScrollParams();\n    }\n\n    void ScrollArea::CheckChildrenClipping()\n    {\n        for (auto& child : mChildWidgets)\n            child->CheckClipping(mAbsoluteClipArea);\n    }\n\n    void ScrollArea::CheckClipping(const RectF& clipArea)\n    {\n        mIsClipped = !mBoundsWithChilds.IsIntersects(clipArea);\n\n        RectF newClipArea = clipArea.GetIntersection(mAbsoluteClipArea);\n\n        for (auto& child : mChildWidgets)\n            child->CheckClipping(newClipArea);\n    }\n\n    void ScrollArea::RecalculateScrollAreaRect(const RectF &childRect, const Vec2F &offset)\n    {\n        mScrollArea.left = Math::Min(mScrollArea.left, childRect.left - offset.x);\n        mScrollArea.bottom = Math::Min(mScrollArea.bottom, childRect.bottom - offset.y);\n        mScrollArea.right = Math::Max(mScrollArea.right, childRect.right - offset.x);\n        mScrollArea.top = Math::Max(mScrollArea.top, childRect.top - offset.y);\n    }\n\n    void ScrollArea::InitializeScrollAreaRectCalculation(Vec2F& offset)\n    {\n        mScrollArea = RectF(0.0f, 0.0f, mAbsoluteViewArea.Width(), mAbsoluteViewArea.Height());\n\n        offset = mAbsoluteViewArea.LeftBottom() - GetLayoutData().worldRectangle.LeftBottom() -\n            mAbsoluteViewArea.Size()*layout->pivot + Vec2F(Math::Round(mScrollPos.x), Math::Round(mScrollPos.y));\n    }\n\n    void ScrollArea::CalculateScrollArea()\n    {\n        Vec2F offset;\n        InitializeScrollAreaRectCalculation(offset);\n\n        for (auto& child : mChildWidgets)\n        {\n            if (!child->mResEnabledInHierarchy || child->GetType() == TypeOf(ContextMenu))\n                continue;\n\n            RecalculateScrollAreaRect(child->GetLayoutData().rectangle, offset);\n        }\n    }\n\n    void ScrollArea::UpdateScrollParams()\n    {\n        mAbsoluteViewArea = mViewAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        RectF localViewArea(0.0f, 0.0f, mAbsoluteViewArea.Width(), mAbsoluteViewArea.Height());\n\n        CalculateScrollArea();\n\n        mScrollRange.left = localViewArea.left + mScrollArea.left;\n        mScrollRange.right = mScrollArea.right - localViewArea.right;\n\n        mScrollRange.bottom = localViewArea.top - mScrollArea.top;\n        mScrollRange.top = localViewArea.bottom - mScrollArea.bottom;\n\n        //         o2Debug.Log(mName + \" area: \" + (String)mScrollArea + \", range: \" + (String)mScrollRange + \n        //                     \", scroll: \" + (String)mScrollPos);\n\n        //         mScrollPos.x = Math::Clamp(mScrollPos.x, mScrollRange.left, mScrollRange.right);\n        //         mScrollPos.y = Math::Clamp(mScrollPos.y, mScrollRange.bottom, mScrollRange.top);\n\n        if (mHorScrollBar)\n        {\n            if (Math::Equals(mScrollRange.left, mScrollRange.right, 1.2f))\n            {\n                if (mHorScrollBar->IsEnabled())\n                {\n                    auto enableHorBarState = state[\"enableHorBar\"];\n                    if (enableHorBarState)\n                        *enableHorBarState = false;\n\n                    mHorScrollBar->Hide();\n                }\n\n                mHorScrollBar->SetValueRange(0, 0);\n\n                mEnableHorScroll = false;\n            }\n            else\n            {\n                if (!mEnableHorScroll)\n                {\n                    auto enableHorBarState = state[\"enableHorBar\"];\n                    if (enableHorBarState)\n                        *enableHorBarState = true;\n\n                    mHorScrollBar->Show();\n                }\n\n                mEnableHorScroll = true;\n\n                mHorScrollBar->SetValueRange(mScrollRange.left, mScrollRange.right);\n                mHorScrollBar->SetScrollHandleSize(localViewArea.Width());\n            }\n        }\n\n        if (mVerScrollBar)\n        {\n            if (Math::Equals(mScrollRange.bottom, mScrollRange.top, 1.2f))\n            {\n                if (mVerScrollBar->IsEnabled())\n                {\n                    auto enableVerBarState = state[\"enableVerBar\"];\n                    if (enableVerBarState)\n                        *enableVerBarState = false;\n\n                    mVerScrollBar->Hide();\n                }\n\n                mVerScrollBar->SetValueRange(0, 0);\n\n                mEnableVerScroll = false;\n            }\n            else\n            {\n                if (!mEnableVerScroll)\n                {\n                    auto enableVerBarState = state[\"enableVerBar\"];\n                    if (enableVerBarState)\n                        *enableVerBarState = true;\n\n                    mVerScrollBar->Show();\n                }\n\n                mEnableVerScroll = true;\n\n                mVerScrollBar->SetValueRange(mScrollRange.bottom, mScrollRange.top);\n                mVerScrollBar->SetScrollHandleSize(localViewArea.Height());\n            }\n        }\n    }\n\n    void ScrollArea::OnHorScrollChanged(float value)\n    {\n        if (!mHorScrollBar->IsEnabled() && mEnableHorScroll)\n        {\n            auto enableHorBarState = state[\"enableHorBar\"];\n            if (enableHorBarState)\n                *enableHorBarState = true;\n\n            mHorScrollBar->Show();\n        }\n\n        mLastHorScrollChangeTime = o2Time.GetApplicationTime();\n\n        Vec2F delta(Math::Clamp(value, mScrollRange.left, mScrollRange.right) - mScrollPos.x, 0.0f);\n        MoveScrollPosition(delta);\n\n        onScrolled(mScrollPos);\n        OnScrolled();\n    }\n\n    void ScrollArea::OnVerScrollChanged(float value)\n    {\n        if (!mVerScrollBar->IsEnabled() && mEnableVerScroll)\n        {\n            auto enableVerBarState = state[\"enableVerBar\"];\n            if (enableVerBarState)\n                *enableVerBarState = true;\n\n            mVerScrollBar->Show();\n        }\n\n        mLastVerScrollChangeTime = o2Time.GetApplicationTime();\n\n        Vec2F delta(0.0f, Math::Clamp(value, mScrollRange.bottom, mScrollRange.top) - mScrollPos.y);\n        MoveScrollPosition(delta);\n\n        onScrolled(mScrollPos);\n        OnScrolled();\n    }\n\n    void ScrollArea::OnDrawn()\n    {\n        CursorAreaEventsListener::OnDrawn();\n        Widget::OnDrawn();\n    }\n\n    void ScrollArea::OnDeserialized(const DataValue& node)\n    {\n        Widget::OnDeserialized(node);\n\n        if (mHorScrollBar)\n        {\n            mEnableHorScroll = mHorScrollBar->IsEnabled();\n            mHorScrollBar->onSmoothChange -= THIS_FUNC(OnHorScrollChanged);\n        }\n\n        if (mVerScrollBar)\n        {\n            mEnableVerScroll = mVerScrollBar->IsEnabled();\n            mVerScrollBar->onSmoothChange -= THIS_FUNC(OnVerScrollChanged);\n        }\n\n        mHorScrollBar = GetInternalWidgetByType<HorizontalScrollBar>(\"horScrollBar\");\n        mOwnHorScrollBar = mHorScrollBar != nullptr;\n        if (mOwnHorScrollBar)\n            mHorScrollBar->onSmoothChange += THIS_FUNC(OnHorScrollChanged);\n\n        mVerScrollBar = GetInternalWidgetByType<VerticalScrollBar>(\"verScrollBar\");\n        mOwnVerScrollBar = mVerScrollBar != nullptr;\n        if (mOwnVerScrollBar)\n            mVerScrollBar->onSmoothChange += THIS_FUNC(OnVerScrollChanged);\n\n        for (auto& child : mChildWidgets)\n            child->GetLayoutData().drivenByParent = true;\n\n        RetargetStatesAnimations();\n    }\n\n    void ScrollArea::OnScrolled()\n    {}\n\n    void ScrollArea::OnScrolled(float scroll)\n    {\n        mScrollSpeed = Vec2F();\n\n        if (mVerScrollBar && mEnableVerScroll)\n        {\n            mVerScrollBar->OnScrolled(o2Input.GetMouseWheelDelta());\n            mHasScrolled = !Math::Equals(mVerScrollBar->GetMinValue(), mVerScrollBar->GetMaxValue());\n        }\n        else if (mHorScrollBar && mEnableHorScroll)\n        {\n            mHorScrollBar->OnScrolled(o2Input.GetMouseWheelDelta());\n            mHasScrolled = !Math::Equals(mHorScrollBar->GetMinValue(), mHorScrollBar->GetMaxValue());\n        }\n    }\n\n    String ScrollArea::GetCreateMenuGroup()\n    {\n        return \"Basic\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::ScrollArea>);\n// --- META ---\n\nDECLARE_CLASS(o2::ScrollArea, o2__ScrollArea);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/ScrollArea.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/HorizontalScrollBar.h\"\n#include \"o2/Scene/UI/Widgets/VerticalScrollBar.h\"\n#include \"o2/Scene/UI/Widget.h\"\n\nnamespace o2\n{\n    // -----------------------------------------------------\n    // Scrolling area with scrollbars and clipping rectangle\n    // -----------------------------------------------------\n    class ScrollArea: public Widget, public CursorAreaEventsListener\n    {\n    public:\n        PROPERTIES(ScrollArea);\n        PROPERTY(Vec2F, scroll, SetScroll, GetScroll);                        // Scroll position property\n        PROPERTY(float, horScroll, SetHorizontalScroll, GetHorizontalScroll); // Horizontal scroll position property\n        PROPERTY(float, verScroll, SetVerticalScroll, GetVerticalScroll);     // Vertical scroll position property\n\n    public:\n        Function<void(const Vec2F&)> onScrolled; // Scrolling event. Scroll position is parameter\n\n    public:\n        // Default constructor\n        explicit ScrollArea(RefCounter* refCounter);\n\n        // Copy-constructor\n        ScrollArea(RefCounter* refCounter, const ScrollArea& other);\n\n        // Destructor\n        ~ScrollArea();\n\n        // Copy-operator\n        ScrollArea& operator=(const ScrollArea& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Updates widget\n        void Update(float dt) override;\n\n        // Updates children\n        void UpdateChildren(float dt) override;\n\n        // Sets scroll position\n        void SetScroll(const Vec2F& scroll);\n\n        // Sets scroll position\n        void SetScrollForcible(const Vec2F& scroll);\n\n        // Returns scroll position\n        Vec2F GetScroll() const;\n\n        // Returns scroll range by width and height\n        RectF GetScrollRange() const;\n\n        // Resets scroll to left top corner\n        void ResetScroll();\n\n        // Sets horizontal scroll position\n        void SetHorizontalScroll(float scroll);\n\n        // Returns horizontal scroll position\n        float GetHorizontalScroll() const;\n\n        // Sets vertical scroll position\n        void SetVerticalScroll(float scroll);\n\n        // Returns vertical scroll position\n        float GetVerticalScroll() const;\n\n        // Sets horizontal scroll bar\n        void SetHorizontalScrollBar(const Ref<HorizontalScrollBar>& scrollbar, bool owner = true);\n\n        // Returns horizontal scroll bar\n        const Ref<HorizontalScrollBar>& GetHorizontalScrollbar() const;\n\n        // Sets Vertical scroll bar\n        void SetVerticalScrollBar(const Ref<VerticalScrollBar>& scrollbar, bool owner = true);\n\n        // Returns Vertical scroll bar\n        const Ref<VerticalScrollBar>& GetVerticalScrollbar() const;\n\n        // Sets scroll bars hiding\n        void SetEnableScrollsHiding(bool hideScrolls);\n\n        // Returns is scroll bars hiding\n        bool IsScrollsHiding();\n\n        // Sets whether scroll bars will be shown when cursor hovers them\n        void SetScrollBarsShowingByCursor(bool showByCursor);\n\n        // Returns whether scroll bars will be shown when cursor hovers them\n        bool IsScrollBarsShowingByCursor();\n\n        // Sets clipping layout\n        void SetClippingLayout(const Layout& clipLayout);\n\n        // Returns clipping layout\n        Layout GetClippingLayout() const;\n\n        // Sets view layout\n        void SetViewLayout(const Layout& viewLayout);\n\n        // Returns view layout\n        Layout GetViewLayout() const;\n\n        // Updates children transforms, calculates scroll rectangle and updates scrollbars\n        void UpdateChildrenTransforms() override;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(ScrollArea);\n        CLONEABLE_REF(ScrollArea);\n\n    protected:\n        Ref<HorizontalScrollBar> mHorScrollBar; // horizontal scroll bar\n        Ref<VerticalScrollBar>   mVerScrollBar; // Vertical scroll bar\n\n        bool mOwnHorScrollBar = false; // True, if this widget is owner of mHorScrollBar\n        bool mOwnVerScrollBar = false; // True, if this widget is owner of mVerScrollBar\n\n        bool mLayoutUpdated = false; // This is true when layout was updated on current frame\n\n        Layout mViewAreaLayout = Layout::BothStretch(); // Children view area layout with disabled bars @SERIALIZABLE\n        RectF  mAbsoluteViewArea;                       // View area\n\n        Layout mClipAreaLayout = Layout::BothStretch(); // Clipping area layout (relative to this widget layout) @SERIALIZABLE\n        RectF  mAbsoluteClipArea;                       // Clipping area\n\n        Vec2F mScrollPos;               // Scroll position @SERIALIZABLE\n        bool  mHasScrolled = false;     // True when area has scrolled at this frame, resets to false on update\n        Vec2F mScrollSpeed;             // Scrolling speed\n        float mScrollSpeedDamp = 7.0f;  // Scroll speed damping  @SERIALIZABLE\n        RectF mScrollArea;              // Maximum scroll area size\n        RectF mScrollRange;             // Scroll range by width and height\n        bool  mEnableHorScroll = false; // Is horizontal scroll enabled (range > 0)\n        bool  mEnableVerScroll = false; // Is vertical scroll enabled (range > 0)\n\n        bool  mUnderCursor = false;   // True, when widget is under cursor\n        bool  mPressedCursor = false; // True, when widget was pressed by cursor\n        Vec2F mPressedScroll;         // Scroll position when cursor was pressed\n        Vec2F mPressedCursorPos;      // Cursor position, when was pressed\n\n        float mSpeedUpdTime = 0.0f; // Elapsed time from last scroll speed updating\n\n        bool  mEnableScrollsHiding = true;      // Enables scroll hiding when they are stopped @SERIALIZABLE\n        bool  mShowScrollBarsByCursor = false;  // Enables showing scroll bars when cursor hovers them @SERIALIZABLE\n        float mLastHorScrollChangeTime = -1.0f; // Last time when horizontal scroll bar was changed\n        float mLastVerScrollChangeTime = -1.0f; // Last time when horizontal scroll bar was changed\n\n    protected:\n        // Called when listener was drawn\n        void OnDrawn() override;\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when child widget was added\n        void OnChildAdded(const Ref<Widget>& child) override;\n\n        // Called when child widget was removed\n        void OnChildRemoved(const Ref<Widget>& child) override;\n\n        // Sets children world rectangle. Moves children rectangle to scroll position offset\n        void SetChildrenWorldRect(const RectF& childrenWorldRect) override;\n\n        // Checks widget clipping by area\n        void CheckClipping(const RectF& clipArea) override;\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        // Moves scroll position and updates children widgets clipping and layout\n        virtual void MoveScrollPosition(const Vec2F& delta);\n\n        // Calculates scroll area\n        virtual void CalculateScrollArea();\n\n        // Calculates mScrollArea bounds by new childrenRectangle\n        void RecalculateScrollAreaRect(const RectF& childRect, const Vec2F& offset);\n\n        // Initializes mScrollArea by default rectangle and calculates offset\n        void InitializeScrollAreaRectCalculation(Vec2F& offset);\n\n        // Updates scroll parameters: clip area, scroll size\n        virtual void UpdateScrollParams();\n\n        //Calls when widget was scrolled\n        virtual void OnScrolled();\n\n        // Check scroll bars showing\n        void CheckScrollBarsVisibility();\n\n        // Checks children clippings\n        void CheckChildrenClipping();\n\n        // Called when horizontal scroll bar value was changed\n        void OnHorScrollChanged(float value);\n\n        // Called when vertical scroll bar value was changed\n        void OnVerScrollChanged(float value);\n\n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class CustomDropDown;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ScrollArea)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::CursorAreaEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ScrollArea)\n{\n    FIELD().PUBLIC().NAME(scroll);\n    FIELD().PUBLIC().NAME(horScroll);\n    FIELD().PUBLIC().NAME(verScroll);\n    FIELD().PUBLIC().NAME(onScrolled);\n    FIELD().PROTECTED().NAME(mHorScrollBar);\n    FIELD().PROTECTED().NAME(mVerScrollBar);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mOwnHorScrollBar);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mOwnVerScrollBar);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mLayoutUpdated);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Layout::BothStretch()).NAME(mViewAreaLayout);\n    FIELD().PROTECTED().NAME(mAbsoluteViewArea);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Layout::BothStretch()).NAME(mClipAreaLayout);\n    FIELD().PROTECTED().NAME(mAbsoluteClipArea);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mScrollPos);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mHasScrolled);\n    FIELD().PROTECTED().NAME(mScrollSpeed);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(7.0f).NAME(mScrollSpeedDamp);\n    FIELD().PROTECTED().NAME(mScrollArea);\n    FIELD().PROTECTED().NAME(mScrollRange);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mEnableHorScroll);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mEnableVerScroll);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mUnderCursor);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mPressedCursor);\n    FIELD().PROTECTED().NAME(mPressedScroll);\n    FIELD().PROTECTED().NAME(mPressedCursorPos);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mSpeedUpdTime);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mEnableScrollsHiding);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mShowScrollBarsByCursor);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1.0f).NAME(mLastHorScrollChangeTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1.0f).NAME(mLastVerScrollChangeTime);\n}\nEND_META;\nCLASS_METHODS_META(o2::ScrollArea)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const ScrollArea&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateChildren, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScroll, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScrollForcible, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetScroll);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetScrollRange);\n    FUNCTION().PUBLIC().SIGNATURE(void, ResetScroll);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHorizontalScroll, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetHorizontalScroll);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVerticalScroll, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetVerticalScroll);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHorizontalScrollBar, const Ref<HorizontalScrollBar>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<HorizontalScrollBar>&, GetHorizontalScrollbar);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetVerticalScrollBar, const Ref<VerticalScrollBar>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<VerticalScrollBar>&, GetVerticalScrollbar);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEnableScrollsHiding, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollsHiding);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScrollBarsShowingByCursor, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollBarsShowingByCursor);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetClippingLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetClippingLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetViewLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetViewLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateChildrenTransforms);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDrawn);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildAdded, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildRemoved, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetChildrenWorldRect, const RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckClipping, const RectF&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveScrollPosition, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CalculateScrollArea);\n    FUNCTION().PROTECTED().SIGNATURE(void, RecalculateScrollAreaRect, const RectF&, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeScrollAreaRectCalculation, Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateScrollParams);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckScrollBarsVisibility);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckChildrenClipping);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnHorScrollChanged, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnVerScrollChanged, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Spoiler.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Spoiler.h\"\n\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n\nnamespace o2\n{\n    Spoiler::Spoiler(RefCounter* refCounter):\n        VerticalLayout(refCounter)\n    {\n        mBaseCorner = BaseCorner::Top;\n        mFitByChildren = true;\n        mExpandWidth = true;\n        mExpandHeight = false;\n\n        CreateExpandAnimation();\n        mExpandState->GetAnimationPlayer()->onUpdate = THIS_FUNC(UpdateExpanding);\n        mExpandState->SetState(false);\n        UpdateExpanding(0);\n    }\n\n    Spoiler::Spoiler(RefCounter* refCounter, const Spoiler& other):\n        VerticalLayout(refCounter, other), mHeadHeight(other.mHeadHeight)\n    {\n        mExpandState = GetStateObject(\"expand\");\n        if (!mExpandState)\n            CreateExpandAnimation();\n\n        mExpandState->GetAnimationPlayer()->onUpdate = THIS_FUNC(UpdateExpanding);\n        mExpandState->SetState(false);\n\n        InitializeControls();\n        RetargetStatesAnimations();\n        UpdateExpanding(0);\n    }\n\n    Spoiler& Spoiler::operator=(const Spoiler& other)\n    {\n        VerticalLayout::operator=(other);\n\n        mExpandState = GetStateObject(\"expand\");\n        if (!mExpandState)\n            CreateExpandAnimation();\n\n        mExpandState->GetAnimationPlayer()->onUpdate = THIS_FUNC(UpdateExpanding);\n        mExpandState->SetState(false);\n\n        mHeadHeight = other.mHeadHeight;\n\n        InitializeControls();\n        UpdateExpanding(0);\n\n        return *this;\n    }\n\n    void Spoiler::Expand(bool forcible /*= false*/)\n    {\n        SetExpanded(true, forcible);\n    }\n\n    void Spoiler::Collapse(bool forcible /*= false*/)\n    {\n        SetExpanded(false, forcible);\n    }\n\n    void Spoiler::SetExpanded(bool expand, bool forcible /*= false*/)\n    {\n        if (mExpandState)\n        {\n            if (forcible)\n                mExpandState->SetStateForcible(expand);\n            else\n                mExpandState->SetState(expand);\n        }\n\n        if (expand)\n            onExpand();\n\n        if (auto expandBtn = GetExpandButton())\n        {\n\t\t\tif (forcible)\n\t\t\t\texpandBtn->SetStateForcible(\"expanded\", expand);\n\t\t\telse\n                expandBtn->SetState(\"expanded\", expand);\n        }\n\n        mTargetHeight = VerticalLayout::GetMinHeightWithChildren();\n    }\n\n    bool Spoiler::IsExpanded() const\n    {\n        return mExpandState ? mExpandState->GetState() : false;\n    }\n\n#undef DrawText\n    void Spoiler::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        OnDrawn();\n\n        if (!IsFullyCollapsed())\n        {\n            bool clipping = !IsFullyExpanded();\n            if (clipping)\n                o2Render.EnableScissorTest(mBounds);\n\n            for (auto& child : mChildrenInheritedDepth)\n                child->Draw();\n\n            if (clipping)\n                o2Render.DisableScissorTest();\n        }\n\n        for (auto& child : mInternalWidgets)\n            child->Draw();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        DrawDebugFrame();\n    }\n\n    void Spoiler::SetCaption(const WString& caption)\n    {\n        auto textLayer = GetLayerDrawable<Text>(\"caption\");\n        if (textLayer)\n            textLayer->text = caption;\n    }\n\n    const WString& Spoiler::GetCaption() const\n    {\n        auto textLayer = GetLayerDrawable<Text>(\"caption\");\n        if (textLayer)\n            return textLayer->GetText();\n\n        return WString::empty;\n    }\n\n    void Spoiler::SetHeadHeight(float height)\n    {\n        mHeadHeight = height;\n    }\n\n    float Spoiler::GetHeadHeight() const\n    {\n        return mHeadHeight;\n    }\n\n    void Spoiler::RearrangeChilds()\n    {\n        float borderTop = mBorder.top;\n        mBorder.top = borderTop + mHeadHeight;\n\n        VerticalLayout::RearrangeChilds();\n\n        mBorder.top = borderTop;\n    }\n\n    void Spoiler::UpdateExpanding(float dt)\n    {\n        layout->SetDirty(false);\n    }\n\n    void Spoiler::CreateExpandAnimation()\n    {\n        mExpandState = AddState(\"expand\", AnimationClip::Parametric(\"mExpandCoef\", 0.0f, 1.0f, 0.4f, 0.0f, 0.4f, 1.0f, 1.0f));\n    }\n\n    float Spoiler::GetMinHeightWithChildren() const\n    {\n        if (!mFitByChildren)\n            return Widget::GetMinHeightWithChildren();\n\n        float res = Math::Max(mChildWidgets.Count() - 1, 0)*mSpacing + mBorder.top + mBorder.bottom;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n                res += child->GetMinHeightWithChildren();\n        }\n\n        res = res*Math::Clamp01(mExpandCoef) + mHeadHeight;\n        res = Math::Max(res, GetLayoutData().minSize.y);\n\n        return res;\n    }\n\n    void Spoiler::UpdateLayoutParametres()\n    {\n        if (IsFullyExpanded())\n            VerticalLayout::UpdateLayoutParametres();\n        else\n        {\n            GetLayoutData().weight.y = 1;\n            GetLayoutData().minSize.y = 0;\n        }\n    }\n\n    void Spoiler::InitializeControls()\n    {\n        auto textLayer = GetLayerDrawable<Text>(\"caption\");\n        auto expandBtn = GetExpandButton();\n\n        if (expandBtn)\n        {\n            expandBtn->onClick = [&]() { SetExpanded(!IsExpanded()); };\n            expandBtn->isPointInside = [=](const Vec2F& point) {\n                return expandBtn->layout->IsPointInside(point) || (textLayer && textLayer->IsPointInside(point));\n            };\n        }\n    }\n\n    Ref<Button> Spoiler::GetExpandButton() const\n    {\n        return FindInternalWidgetByType<Button>(\"expand\");\n    }\n\n    bool Spoiler::IsFullyExpanded() const\n    {\n        if (!mExpandState)\n            return true;\n\n        return mExpandState->GetState() && !mExpandState->GetAnimationPlayer()->IsPlaying();\n    }\n\n    bool Spoiler::IsFullyCollapsed() const\n    {\n        if (!mExpandState)\n            return false;\n\n        return !mExpandState->GetState() && !mExpandState->GetAnimationPlayer()->IsPlaying();\n    }\n\n    String Spoiler::GetCreateMenuGroup()\n    {\n        return \"Dropping\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Spoiler>);\n// --- META ---\n\nDECLARE_CLASS(o2::Spoiler, o2__Spoiler);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Spoiler.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n\nnamespace o2\n{\n    class Button;\n\n    // -------------------------------------\n    // UI Spoiler. Can hide children widgets\n    // -------------------------------------\n    class Spoiler: public VerticalLayout\n    {\n    public:\n        PROPERTIES(Spoiler);\n        PROPERTY(WString, caption, SetCaption, GetCaption);        // Head caption property\n        PROPERTY(float, headHeight, SetHeadHeight, GetHeadHeight); // Head height property\n        PROPERTY(bool, expanded, SetExpanded, IsExpanded);         // Expanded state property\n\n    public:\n        Function<void()> onExpand;    // Expand starting event\n\n    public:\n        // Default constructor\n        explicit Spoiler(RefCounter* refCounter);\n\n        // Copy-constructor\n        Spoiler(RefCounter* refCounter, const Spoiler& other);\n\n        // Copy-operator\n        Spoiler& operator=(const Spoiler& other);\n\n        // Expands spoiler\n        void Expand(bool forcible = false);\n\n        // Collapses spoiler\n        void Collapse(bool forcible = false);\n\n        // Sets expanded state\n        void SetExpanded(bool expand, bool forcible = false);\n\n        // Returns is expanded\n        bool IsExpanded() const;\n\n        // Draws spoiler\n        void Draw() override;\n\n        // Sets caption, if text layer exist\n        void SetCaption(const WString& caption);\n\n        // Returns caption, if text layer exist\n        const WString& GetCaption() const;\n\n        // Sets head height\n        void SetHeadHeight(float height);\n\n        // Returns head's height\n        float GetHeadHeight() const;\n\n        // Searches expand button by name and type\n        Ref<Button> GetExpandButton() const;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(Spoiler);\n        CLONEABLE_REF(Spoiler);\n\n    protected:\n        float mHeadHeight = 0.0f; // Spoiler head height @SERIALIZABLE\n\n        Ref<WidgetState> mExpandState;         // Expanding state\n        float            mExpandCoef = 0.0f;   // Expanding animation coefficient 0...1 \n        float            mTargetHeight = 0.0f; // target expanding height\n\n    protected:\n        // Invokes required function for childs arranging\n        void RearrangeChilds() override;\n\n        // Returns layout height\n        float GetMinHeightWithChildren() const override;\n\n        // Updates expanding\n        void UpdateExpanding(float dt);\n\n        // Creates expanding animation\n        void CreateExpandAnimation();\n\n        // Updates layout's weight and minimal size\n        virtual void UpdateLayoutParametres() override;\n\n        // Checks is expand button exist and sets click callback, searching caption layer\n        void InitializeControls();\n\n        // Returns is spoiler fully expanded and not animating\n        bool IsFullyExpanded() const;\n\n        // Returns is spoiler fully collapsed and not animating\n        bool IsFullyCollapsed() const;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Spoiler)\n{\n    BASE_CLASS(o2::VerticalLayout);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Spoiler)\n{\n    FIELD().PUBLIC().NAME(caption);\n    FIELD().PUBLIC().NAME(headHeight);\n    FIELD().PUBLIC().NAME(expanded);\n    FIELD().PUBLIC().NAME(onExpand);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mHeadHeight);\n    FIELD().PROTECTED().NAME(mExpandState);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mExpandCoef);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mTargetHeight);\n}\nEND_META;\nCLASS_METHODS_META(o2::Spoiler)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Spoiler&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExpanded, bool, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(const WString&, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeadHeight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetHeadHeight);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Button>, GetExpandButton);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, RearrangeChilds);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetMinHeightWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateExpanding, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, CreateExpandAnimation);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayoutParametres);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeControls);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsFullyExpanded);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsFullyCollapsed);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Toggle.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Toggle.h\"\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/Widgets/EditBox.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n\nnamespace o2\n{\n    Toggle::Toggle(RefCounter* refCounter):\n        Widget(refCounter), DrawableCursorEventsListener(this)\n    {}\n\n    Toggle::Toggle(RefCounter* refCounter, const Toggle& other) :\n        Widget(refCounter, other), DrawableCursorEventsListener(this), mToggleGroup(nullptr)\n    {\n        mCaptionText = GetLayerDrawable<Text>(\"caption\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n\n        mValue = !other.mValue;\n        SetValue(other.mValue);\n\n        if (other.IsValueUnknown())\n            SetValueUnknown();\n    }\n\n    Toggle& Toggle::operator=(const Toggle& other)\n    {\n        Widget::operator=(other);\n\n        mCaptionText = GetLayerDrawable<Text>(\"caption\");\n        mBackLayer = FindLayer(\"back\");\n\n        mValue = !other.mValue;\n        SetValue(other.mValue);\n\n        if (other.IsValueUnknown())\n            SetValueUnknown();\n\n        RetargetStatesAnimations();\n\n        return *this;\n    }\n\n    Toggle::~Toggle()\n    {}\n\n    void Toggle::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        Widget::Update(dt);\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        if (mToggleGroup && mToggleGroup->mPressed && mToggleGroup->mPressedValue != mValue &&\n            (mToggleGroup->mType == ToggleGroup::Type::VerOneClick || mToggleGroup->mType == ToggleGroup::Type::HorOneClick))\n        {\n            Vec2F cursor = o2Input.GetCursorPos();\n            bool underPoint = false;\n\n            if (mToggleGroup->mType == ToggleGroup::Type::VerOneClick)\n                underPoint = cursor.y > layout->worldBottom && cursor.y < layout->worldTop;\n            else\n                underPoint = cursor.x > layout->worldLeft && cursor.x < layout->worldRight;\n\n            if (underPoint)\n            {\n                SetValue(!mValue);\n                onClick();\n                onToggleByUser(mValue);\n                mToggleGroup->mToggled.Add(Ref(this));\n            }\n        }\n    }\n\n    void Toggle::SetCaption(const WString& text)\n    {\n        if (mCaptionText)\n            mCaptionText->SetText(text);\n    }\n\n    WString Toggle::GetCaption() const\n    {\n        if (mCaptionText)\n            return mCaptionText->GetText();\n\n        return WString();\n    }\n\n    void Toggle::SetValue(bool value)\n    {\n        if (mValue == value && !mValueUnknown)\n            return;\n\n        mValue = value;\n        mValueUnknown = false;\n\n        auto valueState = state[\"value\"];\n        if (valueState)\n            *valueState = mValue;\n\n        auto unknownState = state[\"unknown\"];\n        if (unknownState)\n            *unknownState = false;\n\n        onToggle(mValue);\n\n        if (mToggleGroup)\n            mToggleGroup->OnToggled(Ref(this));\n    }\n\n    void Toggle::SetValueUnknown()\n    {\n        mValueUnknown = true;\n\n        auto unknownState = state[\"unknown\"];\n        if (unknownState)\n            *unknownState = true;\n\n        auto valueState = state[\"value\"];\n        if (valueState)\n            *valueState = false;\n    }\n\n    bool Toggle::IsValueUnknown() const\n    {\n        return mValueUnknown;\n    }\n\n    bool Toggle::GetValue() const\n    {\n        return mValue;\n    }\n\n    bool Toggle::IsFocusable() const\n    {\n        return true;\n    }\n\n    void Toggle::SetToggleGroup(const Ref<ToggleGroup>& toggleGroup)\n    {\n        if (mToggleGroup == toggleGroup)\n            return;\n\n        if (mToggleGroup)\n            mToggleGroup->mToggles.Remove(Ref(this));\n\n        mToggleGroup = toggleGroup;\n        mToggleGroup->mToggles.Add(Ref(this));\n    }\n\n    const Ref<ToggleGroup>& Toggle::GetToggleGroup() const\n    {\n        return mToggleGroup;\n    }\n\n    void Toggle::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = true;\n\n        o2UI.FocusWidget(Ref(this));\n\n        if (mToggleGroup)\n        {\n            SetValue(!mValue);\n            onClick();\n\n            mToggleGroup->mPressed = true;\n            mToggleGroup->mPressedValue = mValue;\n            mToggleGroup->mToggled.Clear();\n            mToggleGroup->mToggled.Add(Ref(this));\n            mToggleGroup->onPressed(mValue);\n        }\n    }\n\n    void Toggle::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        if (Widget::IsUnderPoint(cursor.position) &&\n            !(mToggleGroup && (mToggleGroup->mType == ToggleGroup::Type::VerOneClick ||\n            mToggleGroup->mType == ToggleGroup::Type::HorOneClick) &&\n            mToggleGroup->mPressed))\n        {\n            SetValue(!mValue);\n            onClick();\n            onToggleByUser(mValue);\n        }\n\n        if (mToggleGroup && (mToggleGroup->mType == ToggleGroup::Type::VerOneClick ||\n            mToggleGroup->mType == ToggleGroup::Type::HorOneClick))\n        {\n            mToggleGroup->mPressed = false;\n            mToggleGroup->onReleased(mValue);\n        }\n    }\n\n    void Toggle::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        if (mToggleGroup && (mToggleGroup->mType == ToggleGroup::Type::VerOneClick ||\n            mToggleGroup->mType == ToggleGroup::Type::HorOneClick))\n        {\n            mToggleGroup->mPressed = false;\n            mToggleGroup->onReleased(mValue);\n        }\n    }\n\n    void Toggle::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = true;\n    }\n\n    void Toggle::OnCursorExit(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = false;\n    }\n\n    void Toggle::OnKeyPressed(const Input::Key& key)\n    {\n        if (mIsFocused && (key.keyCode == VK_SPACE || key.keyCode == VK_RETURN))\n        {\n            auto pressedState = state[\"pressed\"];\n            if (pressedState)\n                *pressedState = true;\n        }\n\n        bool isFocusedEditBox = o2UI.GetFocusedWidget() && o2UI.GetFocusedWidget()->GetType() == TypeOf(EditBox);\n        if (shortcut.IsPressed() && !isFocusedEditBox)\n        {\n            SetValue(!mValue);\n            onClick();\n            onToggleByUser(mValue);\n        }\n    }\n\n    void Toggle::OnKeyReleased(const Input::Key& key)\n    {\n        if (mIsFocused && (key.keyCode == VK_SPACE || key.keyCode == VK_RETURN))\n        {\n            auto pressedState = state[\"pressed\"];\n            if (pressedState)\n                *pressedState = false;\n\n            SetValue(!mValue);\n            onClick();\n            onToggleByUser(mValue);\n        }\n\n    }\n\n    void Toggle::OnDeserialized(const DataValue& node)\n    {\n        Widget::OnDeserialized(node);\n\n        mCaptionText = GetLayerDrawable<Text>(\"caption\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n    }\n\n    void Toggle::OnLayerAdded(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->name == \"caption\" && layer->GetDrawable() && layer->GetDrawable()->GetType() == TypeOf(Text))\n            mCaptionText = DynamicCast<Text>(layer->GetDrawable());\n\n        if (layer->name == \"back\")\n            mBackLayer = layer;\n    }\n\n    String Toggle::GetCreateMenuGroup()\n    {\n        return \"Basic\";\n    }\n\n    void Toggle::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        interactable = true;\n    }\n\n    void Toggle::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        interactable = false;\n    }\n\n    ToggleGroup::ToggleGroup(Type type):\n        mType(type), mPressed(false)\n    {}\n\n    ToggleGroup::~ToggleGroup()\n    {}\n\n    void ToggleGroup::AddToggle(const Ref<Toggle>& toggle)\n    {\n        mToggles.Add(toggle);\n        toggle->mToggleGroup = Ref(this);\n        toggle->SetValue(true);\n    }\n\n    void ToggleGroup::RemoveToggle(Toggle* toggle)\n    {\n        mToggles.RemoveFirst([&](auto& x) { return x == toggle; });\n        toggle->mToggleGroup = nullptr;\n    }\n\n    const Vector<WeakRef<Toggle>>& ToggleGroup::GetToggles() const\n    {\n        return mToggles;\n    }\n\n    const Vector<WeakRef<Toggle>>& ToggleGroup::GetToggled() const\n    {\n        return mToggled;\n    }\n\n    void ToggleGroup::OnToggled(const Ref<Toggle>& toggle)\n    {\n        if (mType == Type::OnlySingleTrue)\n        {\n            if (toggle->GetValue())\n            {\n                for (auto& ctoggle : mToggles)\n                {\n                    if (ctoggle == toggle)\n                        continue;\n\n                    ctoggle.Lock()->SetValue(false);\n                }\n            }\n            else\n            {\n                if (!mToggles.Any([&](auto& x) { return x.Lock()->GetValue(); }))\n                    toggle->SetValue(true);\n            }\n        }\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Toggle>);\n// --- META ---\n\nENUM_META(o2::ToggleGroup::Type, o2__ToggleGroup__Type)\n{\n    ENUM_ENTRY(HorOneClick);\n    ENUM_ENTRY(OnlySingleTrue);\n    ENUM_ENTRY(VerOneClick);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::Toggle, o2__Toggle);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Toggle.h",
    "content": "#pragma once\n\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n#include \"o2/Events/KeyboardEventsListener.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/System/ShortcutKeys.h\"\n\nnamespace o2\n{\n    class Text;\n    class Sprite;\n    class Toggle;\n\n    // ------------\n    // Toggle group\n    // ------------\n    class ToggleGroup: public RefCounterable\n    {\n    public:\n        enum class Type { OnlySingleTrue, VerOneClick, HorOneClick };\n\n    public:\n        Function<void(bool)> onPressed;  // Toggle group press event\n        Function<void(bool)> onReleased; // Toggle group release event\n\n    public:\n        // Constructor by type\n        ToggleGroup(Type type);\n\n        // Destructor\n        ~ToggleGroup();\n\n        // Adds toggle to group\n        void AddToggle(const Ref<Toggle>& toggle);\n\n        // Removes toggle from group\n        void RemoveToggle(Toggle* toggle);\n\n        // Returns all toggles in group\n        const Vector<WeakRef<Toggle>>& GetToggles() const;\n\n        // Returns toggled toggles in group\n        const Vector<WeakRef<Toggle>>& GetToggled() const;\n\n    protected:\n        bool mPressed = false;      // Is group in pressed state\n        bool mPressedValue = false; // Group pressed value\n\n        Vector<WeakRef<Toggle>> mToggles; // All toggles in group\n        Vector<WeakRef<Toggle>> mToggled; // Toggled toggles in group\n\n        Type mType; // Toggle group type\n\n    protected:\n        // Called when some toggle was toggled, \n        void OnToggled(const Ref<Toggle>& toggle);\n\n        friend class Toggle;\n    };\n\n    class Toggle: public Widget, public DrawableCursorEventsListener, public KeyboardEventsListener\n    {\n    public:\n        PROPERTIES(Toggle);\n        PROPERTY(bool, value, SetValue, GetValue);                               // Current state value property\n        PROPERTY(WString, caption, SetCaption, GetCaption);                      // Caption property. Searches text layer with name \"caption\" or creates them if he's not exist\n        PROPERTY(Ref<ToggleGroup>, toggleGroup, SetToggleGroup, GetToggleGroup); // Toggle group property\n\n    public:\n        Function<void()>     onClick;        // Click event\n        Function<void(bool)> onToggle;       // Toggle event\n        Function<void(bool)> onToggleByUser; // Toggle by user event \n\n    public:\n        ShortcutKeys shortcut;// Shortcut keys\n\n    public:\n        // Default constructor\n        explicit Toggle(RefCounter* refCounter);\n\n        // Copy-constructor\n        Toggle(RefCounter* refCounter, const Toggle& other);\n\n        // Assign operator\n        Toggle& operator=(const Toggle& other);\n\n        // Destructor\n        ~Toggle();\n\n        // Updates drawables, states and widget\n        void Update(float dt) override;\n\n        // Sets caption of button. Searches text layer with name \"caption\". If can't find this layer, creates them\n        void SetCaption(const WString& text);\n\n        // Returns caption text from text layer \"caption\". Returns no data if layer isn't exist\n        WString GetCaption() const;\n\n        // Sets current value\n        void SetValue(bool value);\n\n        // Sets value as unknown\n        void SetValueUnknown();\n\n        // Is value unknown\n        bool IsValueUnknown() const;\n\n        // Returns current value\n        bool GetValue() const;\n\n        // Sets toggle group\n        void SetToggleGroup(const Ref<ToggleGroup>& toggleGroup);\n\n        // Returns toggle group\n        const Ref<ToggleGroup>& GetToggleGroup() const;\n\n        // Returns is this widget can be selected\n        bool IsFocusable() const override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(Toggle);\n        CLONEABLE_REF(Toggle);\n\n    protected:\n        bool mValue = false;        // Current value @SERIALIZABLE\n        bool mValueUnknown = false; // Is value unknown @SERIALIZABLE\n\n        Ref<Text>        mCaptionText; // Caption layer text\n        Ref<WidgetLayer> mBackLayer;   // Background layer\n\n        Ref<ToggleGroup> mToggleGroup; // Toggle group\n\n    protected:\n        // Called when deserialized\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when layer added and updates drawing sequence\n        void OnLayerAdded(const Ref<WidgetLayer>& layer) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Called when cursor pressed on this. Sets state \"pressed\" to true\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time). Sets state \"pressed\" to false.\n        // Called onClicked if cursor is still above this\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object. Sets state \"select\" to true\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object. Sets state \"select\" to false\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when key was pressed\n        void OnKeyPressed(const Input::Key& key) override;\n\n        // Called when key was released\n        void OnKeyReleased(const Input::Key& key) override; \n        \n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class ToggleGroup;\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::ToggleGroup::Type);\n\nCLASS_BASES_META(o2::Toggle)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::DrawableCursorEventsListener);\n    BASE_CLASS(o2::KeyboardEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Toggle)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(caption);\n    FIELD().PUBLIC().NAME(toggleGroup);\n    FIELD().PUBLIC().NAME(onClick);\n    FIELD().PUBLIC().NAME(onToggle);\n    FIELD().PUBLIC().NAME(onToggleByUser);\n    FIELD().PUBLIC().NAME(shortcut);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mValueUnknown);\n    FIELD().PROTECTED().NAME(mCaptionText);\n    FIELD().PROTECTED().NAME(mBackLayer);\n    FIELD().PROTECTED().NAME(mToggleGroup);\n}\nEND_META;\nCLASS_METHODS_META(o2::Toggle)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Toggle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueUnknown);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsValueUnknown);\n    FUNCTION().PUBLIC().SIGNATURE(bool, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetToggleGroup, const Ref<ToggleGroup>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ToggleGroup>&, GetToggleGroup);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFocusable);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerAdded, const Ref<WidgetLayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyPressed, const Input::Key&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnKeyReleased, const Input::Key&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Tree.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Tree.h\"\n\n#include \"o2/Animation/Animate.h\"\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Application/Input.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Utils/Tasks/TaskManager.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    TreeNode::TreeNode(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        onDraw = [&]() { CursorAreaEventsListener::OnDrawn(); };\n    }\n\n    TreeNode::TreeNode(RefCounter* refCounter, const TreeNode& other):\n        Widget(refCounter, other)\n    {\n        onDraw = [&]() { CursorAreaEventsListener::OnDrawn(); };\n\n        mExpandBtn = DynamicCast<Button>(GetChild(\"expandBtn\"));\n        if (mExpandBtn)\n            mExpandBtn->onClick = [&]() { if (IsExpanded()) Collapse(); else Expand(); o2UI.FocusWidget(mOwnerTree.Lock()); };\n\n        SetSelectionGroup(other.GetSelectionGroup());\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    TreeNode::~TreeNode()\n    {}\n\n    TreeNode& TreeNode::operator=(const TreeNode& other)\n    {\n        Widget::operator=(other);\n\n        onDraw = [&]() { CursorAreaEventsListener::OnDrawn(); };\n\n        mExpandBtn = DynamicCast<Button>(GetChild(\"expandBtn\"));\n        if (mExpandBtn)\n            mExpandBtn->onClick = [&]() { if (IsExpanded()) Collapse(); else Expand(); o2UI.FocusWidget(mOwnerTree.Lock()); };\n\n        SetSelectionGroup(other.GetSelectionGroup());\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void TreeNode::SetExpanded(bool expanded, bool forcible /*= false*/)\n    {\n        if (expanded == IsExpanded())\n            return;\n\n        if (expanded) \n            mOwnerTree.Lock()->ExpandNode(mNodeDef.Lock());\n        else          \n            mOwnerTree.Lock()->CollapseNode(mNodeDef.Lock());\n\n        SetState(\"expanded\", expanded);\n        mNodeDef.Lock()->isExpanded = expanded;\n    }\n\n    bool TreeNode::IsExpanded() const\n    {\n        return mNodeDef.Lock()->isExpanded;\n    }\n\n    void TreeNode::Expand(bool forcible /*= false*/)\n    {\n        SetExpanded(true, forcible);\n    }\n\n    void TreeNode::Collapse(bool forcible /*= false*/)\n    {\n        SetExpanded(false, forcible);\n    }\n\n    void* TreeNode::GetObject() const\n    {\n        return mNodeDef.Lock()->object;\n    }\n\n    bool TreeNode::IsUnderPoint(const Vec2F& point)\n    {\n        return Widget::IsUnderPoint(point);\n    }\n\n    void TreeNode::SetSelectedState(bool state)\n    {\n        if (!mSelectedState)\n            mSelectedState = GetStateObject(\"selected\");\n\n        if (mSelectedState)\n            mSelectedState->SetStateForcible(state);\n    }\n\n    void TreeNode::SetFocusedState(bool state)\n    {\n        if (mFocusedState)\n            mFocusedState->SetStateForcible(state);\n    }\n\n    String TreeNode::GetCreateMenuGroup()\n    {\n        return \"Tree\";\n    }\n\n    void TreeNode::OnStateAdded(const Ref<WidgetState>& state)\n    {\n        Widget::OnStateAdded(state);\n\n        if (state->name == \"selected\")\n            mSelectedState = state;\n    }\n\n    void TreeNode::UpdateTreeLayout(float dt)\n    {\n        mOwnerTree.Lock()->mIsNeedUdateLayout = true;\n    }\n\n    void TreeNode::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        if (mOwnerTree)\n            mOwnerTree.Lock()->OnNodeDblClick(Ref(this));\n    }\n\n    void TreeNode::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        if (mOwnerTree)\n            mOwnerTree.Lock()->UpdateHover(Ref(this));\n    }\n\n    void TreeNode::OnCursorExit(const Input::Cursor& cursor)\n    {\n        if (mOwnerTree)\n            mOwnerTree.Lock()->UpdateHover(nullptr);\n    }\n\n    void TreeNode::OnDragStart(const Input::Cursor& cursor)\n    {\n        mOwnerTree.Lock()->BeginDragging(Ref(this));\n    }\n\n    void TreeNode::OnDragged(const Input::Cursor& cursor, const Ref<DragDropArea>& area)\n    {\n        mOwnerTree.Lock()->UpdateDraggingGraphics();\n    }\n\n    void TreeNode::OnDragEnd(const Input::Cursor& cursor)\n    {\n        mOwnerTree.Lock()->mDragEnded = true;\n    }\n\n    void TreeNode::OnSelected()\n    {\n        mOwnerTree.Lock()->Focus();\n    }\n\n    void TreeNode::OnDeselected()\n    {}\n\n    Tree::Tree(RefCounter* refCounter):\n        ScrollArea(refCounter)\n    {\n        mNodeWidgetSample = mmake<TreeNode>();\n        mNodeWidgetSample->layout->minHeight = 20;\n        mNodeWidgetSample->AddLayer(\"caption\", nullptr);\n\n        mFakeDragNode = mmake<TreeNode>();\n        mHoverDrawable = mmake<Sprite>();\n        mHighlightSprite = mmake<Sprite>();\n\n        mHighlightAnim->SetTarget(mHighlightSprite.Get());\n    }\n\n    Tree::Tree(RefCounter* refCounter, const Tree& other):\n        ScrollArea(refCounter, other)\n    {\n        mRearrangeType = other.mRearrangeType;\n        mMultiSelectAvailable = other.mMultiSelectAvailable;\n        mNodeWidgetSample = other.mNodeWidgetSample->CloneAsRef<TreeNode>();\n        mFakeDragNode = other.mNodeWidgetSample->CloneAsRef<TreeNode>();\n        mHoverDrawable = other.mHoverDrawable->CloneAsRef<Sprite>();\n        mHighlightSprite = other.mHighlightSprite->CloneAsRef<Sprite>();\n\n        if (other.mZebraBackLine)\n            mZebraBackLine = other.mZebraBackLine->CloneAsRef<Sprite>();\n\n        if (other.mHighlighClip)\n            mHighlighClip = other.mHighlighClip->CloneAsRef<AnimationClip>();\n\n        mHighlightAnim->SetTarget(mHighlightSprite.Get());\n        mHighlightAnim->SetClip(mHighlighClip);\n\n        mHoverLayout = other.mHoverLayout;\n        mHighlightLayout = other.mHighlightLayout;\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        const int widgetsBufferInitialSize = 20;\n        Vector<Ref<TreeNode>> widgets;\n        for (int i = 0; i < widgetsBufferInitialSize; i++)\n            widgets.Add(CreateTreeNodeWidget());\n\n        mNodeWidgetsBuf.Add(widgets);\n    }\n\n    Tree::Tree(const Tree& other):\n        Tree(nullptr, other)\n    {}\n\n    Tree::~Tree()\n    {}\n\n    Tree& Tree::operator=(const Tree& other)\n    {\n        ScrollArea::operator=(other);\n\n        mRearrangeType = other.mRearrangeType;\n        mMultiSelectAvailable = other.mMultiSelectAvailable;\n        mNodeWidgetSample = other.mNodeWidgetSample->CloneAsRef<TreeNode>();\n        mFakeDragNode = other.mNodeWidgetSample->CloneAsRef<TreeNode>();\n        mHoverDrawable = other.mHoverDrawable->CloneAsRef<Sprite>();\n        mHighlightSprite = other.mHighlightSprite->CloneAsRef<Sprite>();\n\n        mHighlighClip = other.mHighlighClip->CloneAsRef<AnimationClip>();\n        mHighlightAnim->SetTarget(mHighlightSprite.Get());\n        mHighlightAnim->SetClip(mHighlighClip);\n\n        mHoverLayout = other.mHoverLayout;\n        mHighlightLayout = other.mHighlightLayout;\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void Tree::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        if (mIsDraggingNodes)\n            o2UI.DrawWidgetAtTop(mFakeDragNode);\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        IDrawable::OnDrawn();\n\n        o2Render.EnableScissorTest(mAbsoluteClipArea);\n\n        if (mZebraBackLine)\n            DrawZebraBack();\n\n        if (mExpandingNodeState == ExpandState::None)\n        {\n            for (auto& node : mVisibleNodes)\n                node->widget->Draw();\n        }\n        else\n        {\n            float clipTop = mAbsoluteViewArea.top - mExpandingNodePosition + mScrollPos.y;\n            float clipBottom = mAbsoluteViewArea.top - (mExpandingNodePosition + mExpandingNodeCurrHeight) + mScrollPos.y;\n            int clipTopIdx = Math::Max(mMinVisibleNodeIdx, mExpandingNodeIdx + 1);\n            int clipBottomIdx = Math::Min(mMaxVisibleNodeIdx, mExpandingNodeIdx + mExpandingNodeChildsCount);\n\n            o2Render.EnableScissorTest(RectF(mAbsoluteClipArea.left, clipTop, mAbsoluteClipArea.right, clipBottom));\n\n            for (int i = clipTopIdx; i <= clipBottomIdx; i++)\n            {\n                auto node = mAllNodes[i];\n                if (node->widget)\n                    node->widget->Draw();\n            }\n\n            o2Render.DisableScissorTest();\n\n            for (int i = mMinVisibleNodeIdx; i <= mMaxVisibleNodeIdx; i++)\n            {\n                auto node = mAllNodes[i];\n                if (node->widget && (i < clipTopIdx || i > clipBottomIdx))\n                    node->widget->Draw();\n            }\n        }\n\n        mHoverDrawable->Draw();\n        mHighlightSprite->Draw();\n\n        o2Render.DisableScissorTest();\n\n        ScrollArea::OnDrawn();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        if (mOwnHorScrollBar)\n            mHorScrollBar->Draw();\n\n        if (mOwnVerScrollBar)\n            mVerScrollBar->Draw();\n\n        DrawDebugFrame();\n    }\n\n    void Tree::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        UpdateHighlighting(dt);\n        UpdateNodeExpanding(dt);\n\n        if (mDragEnded)\n            EndDragging();\n\n        if (mIsDraggingNodes)\n            UpdateDraggingInsertionAnim(dt);\n\n        if (mIsNeedUpdateView)\n            UpdateNodesStructure();\n\n        if (mIsNeedUdateLayout)\n            SetLayoutDirty();\n\n        if (mIsNeedUpdateVisibleNodes)\n            UpdateVisibleNodes();\n\n        ScrollArea::Update(dt);\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        const float rectLerpCoef = 10.0f;\n        if (mCurrentHoverRect != mTargetHoverRect)\n        {\n            mCurrentHoverRect = Math::Lerp(mCurrentHoverRect, mTargetHoverRect, dt*rectLerpCoef);\n            mHoverDrawable->SetRect(mCurrentHoverRect);\n\n            float alpha = mHoverDrawable->GetTransparency();\n            mHoverDrawable->SetTransparency(alpha);\n        }\n\n        UpdatePressedNodeExpand(dt);\n\n        mPressedTime += dt;\n    }\n\n    void Tree::UpdateHighlighting(float dt)\n    {\n        if (mHighlightAnim->IsPlaying())\n        {\n            if (mHighlightObject && !mHighlighNode)\n                mHighlighNode = mAllNodes.FindOrDefault([=](auto& x) { return x->object == mHighlightObject; });\n\n            if (mHighlighNode && mHighlighNode.Lock()->widget)\n            {\n                mHighlightSprite->SetScale(Vec2F(1.0f, 1.0f));\n                mHighlightSprite->SetRect(mHighlightLayout.Calculate(mHighlighNode.Lock()->widget->layout->worldRect));\n            }\n\n            mHighlightAnim->Update(dt);\n\n            if (!mHighlightAnim->IsPlaying())\n            {\n                mHighlighNode = nullptr;\n                mHighlightObject = nullptr;\n            }\n        }\n        else mHighlightSprite->transparency = 0.0f;\n    }\n\n    void Tree::UpdateChildren(float dt)\n    {\n        ScrollArea::UpdateChildren(dt);\n\n        if (mLayoutUpdated && mResEnabledInHierarchy)\n            UpdateVisibleNodes();\n    }\n\n    void Tree::UpdateChildrenTransforms()\n    {\n        ScrollArea::UpdateChildrenTransforms();\n        UpdateVisibleNodes();\n    }\n\n    void* Tree::GetObjectParent(void* object)\n    {\n        return getObjectParentDelegate(object);\n    }\n\n    Vector<void*> Tree::GetObjectChilds(void* object)\n    {\n        return getObjectChildrenDelegate(object);\n    }\n\n    String Tree::GetObjectDebug(void* object)\n    {\n        return getDebugForObject(object);\n    }\n\n    void Tree::FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object)\n    {\n        fillNodeDataByObjectDelegate(nodeWidget, object);\n    }\n\n    void Tree::FreeNodeData(const Ref<TreeNode>& nodeWidget, void* object)\n    {\n        freeNodeDataDelegate(nodeWidget, object);\n    }\n\n    void Tree::OnNodeDblClick(const Ref<TreeNode>& nodeWidget)\n    {\n        onNodeDoubleClicked(nodeWidget);\n    }\n\n    void Tree::OnNodeRBClick(const Ref<TreeNode>& nodeWidget)\n    {\n        onNodeRightButtonClicked(nodeWidget);\n    }\n\n    void Tree::OnNodesSelectionChanged(Vector<void*> objects)\n    {\n        onObjectsSelectionChanged(objects);\n    }\n\n    void Tree::OnDraggedObjects(Vector<void*> objects, void* newParent, void* prevObject)\n    {\n        onDraggedObjects(objects, newParent, prevObject);\n    }\n\n    Vector<Ref<SelectableDragableObject>> Tree::GetSelectedDragObjects() const\n    {\n        return {};\n    }\n\n    Vector<Ref<SelectableDragableObject>> Tree::GetAllObjects() const\n    {\n        return {};\n    }\n\n    void Tree::Select(const Ref<SelectableDragableObject>& object, bool sendOnSelectionChanged)\n    {\n        bool someSelected = false;\n        auto uiNode = DynamicCast<TreeNode>(object);\n\n        if (o2Input.IsKeyDown(VK_SHIFT) && mSelectedNodes.Count() > 0)\n        {\n            someSelected = CheckMultipleSelection(o2Input.GetCursorPos());\n        }\n        else if (!o2Input.IsKeyDown(VK_CONTROL))\n        {\n            for (auto& sel : mSelectedNodes)\n                sel->SetSelected(false);\n\n            mSelectedNodes.Clear();\n            mSelectedObjects.Clear();\n\n            someSelected = true;\n        }\n\n        if (!mSelectedNodes.Contains([=](auto& x) { return x->widget == uiNode; }))\n        {\n            someSelected = true;\n\n            uiNode->mIsSelected = true;\n\n            auto node = mAllNodes.FindOrDefault([=](auto& x) { return x->widget == uiNode; });\n            node->SetSelected(true);\n            mSelectedNodes.Add(node);\n            mSelectedObjects.Add(node->object);\n        }\n\n        if (someSelected && sendOnSelectionChanged)\n            OnSelectionChanged();\n    }\n\n    void Tree::Select(const Ref<SelectableDragableObject>& object)\n    {\n        Select(object, true);\n    }\n\n    void Tree::Deselect(const Ref<SelectableDragableObject>& object)\n    {\n        auto uiNode = DynamicCast<TreeNode>(object);\n        uiNode->mIsSelected = false;\n\n        int idx = mSelectedNodes.IndexOf([&](auto x) { return x->widget == uiNode; });\n\n        if (idx < 0)\n            return;\n\n        mSelectedNodes[idx]->SetSelected(false);\n        mSelectedObjects.Remove(mSelectedNodes[idx]->object);\n        mSelectedNodes.RemoveAt(idx);\n\n        OnSelectionChanged();\n    }\n\n    void Tree::AddSelectableObject(const Ref<SelectableDragableObject>& object)\n    {}\n\n    void Tree::RemoveSelectableObject(SelectableDragableObject* object)\n    {}\n\n    void Tree::OnSelectableObjectCursorReleased(const Ref<SelectableDragableObject>& object, const Input::Cursor& cursor)\n    {\n        if (!o2Input.IsKeyDown(VK_SHIFT) && !o2Input.IsKeyDown(VK_CONTROL))\n        {\n            for (auto& sel : mSelectedNodes)\n                sel->SetSelected(false);\n\n            mSelectedNodes.Clear();\n            mSelectedObjects.Clear();\n        }\n\n        if (!o2Input.IsKeyDown(VK_SHIFT))\n            object->SetSelected(!object->IsSelected());\n    }\n\n    void Tree::OnSelectableObjectBeganDragging(const Ref<SelectableDragableObject>& object)\n    {\n        mBeforeDragSelectedItems = mSelectedObjects;\n\n        if (!object->IsSelected())\n            Select(object, false);\n    }\n\n    bool Tree::CheckMultipleSelection(const Vec2F& point)\n    {\n        if (mSelectedNodes.IsEmpty())\n            return false;\n\n        Vec2F currClickPos = mAbsoluteViewArea.LeftTop() - point + mScrollPos;\n\n        float selectionUp = Math::Max<float>(currClickPos.y, mLastClickPos.y);\n        float selectionDown = Math::Min<float>(currClickPos.y, mLastClickPos.y);\n\n        bool someSelected = false;\n\n        int idx = 0;\n        float nodeHeight = mNodeWidgetSample->layout->GetMinHeight();\n        for (auto& node : mAllNodes)\n        {\n            if (mSelectedNodes.Contains(node))\n            {\n                idx++;\n                continue;\n            }\n\n            float top = (float)idx*nodeHeight;\n            float bottom = top + nodeHeight;\n\n            if ((top > selectionDown && top < selectionUp) || (bottom > selectionDown && bottom < selectionUp))\n            {\n                node->SetSelected(true);\n                mSelectedNodes.Add(node);\n                mSelectedObjects.Add(node->object);\n\n                someSelected = true;\n            }\n\n            idx++;\n        }\n\n        return someSelected;\n    }\n\n    void Tree::UpdatePressedNodeExpand(float dt)\n    {\n        if (o2Input.IsCursorDown() && mIsDraggingNodes)\n        {\n            if (mRearrangeType != RearrangeType::Disabled)\n            {\n                auto underCursorItem = GetTreeNodeUnderPoint(o2Input.GetCursorPos());\n\n                if (underCursorItem != mExpandNodeCandidate)\n                {\n                    mExpandNodeCandidate = underCursorItem;\n                    mExpandInsertTime = mNodeExpandTime;\n                }\n            }\n\n            if (mExpandInsertTime <= 0.0f && mExpandNodeCandidate)\n            {\n                mExpandNodeCandidate->Expand();\n\n                if (mIsDraggingNodes)\n                    mExpandNodeCandidate->mNodeDef.Lock()->inserting = false;\n\n                mExpandNodeCandidate = nullptr;\n            }\n        }\n\n        mExpandInsertTime -= dt;\n    }\n\n    void Tree::UpdateNodesView(bool immediately /*= true*/)\n    {\n        if (immediately)\n        {\n            UpdateNodesStructure();\n            for (int i = 0; i < mAllNodes.Count(); i++)\n            {\n                if (mAllNodes[i]->widget)\n                    UpdateNodeView(mAllNodes[i], mAllNodes[i]->widget, i);\n            }\n        }\n        else \n            mIsNeedUpdateView = true;\n    }\n\n    Ref<TreeNode> Tree::GetNode(void* object)\n    {\n        auto fnd = mAllNodes.FindOrDefault([=](auto& x) { return x->object == object; });\n        if (fnd)\n            return fnd->widget;\n\n        return nullptr;\n    }\n\n    void Tree::ExpandAll()\n    {\n        bool isAllExpanded = false;\n        while (!isAllExpanded)\n        {\n            UpdateNodesView(true);\n            UpdateVisibleNodes();\n            isAllExpanded = true;\n\n            auto nodes = mAllNodes;\n            for (auto& child : nodes)\n            {\n                auto childNode = child->widget;\n                if (childNode && !childNode->IsExpanded())\n                {\n                    childNode->Expand();\n                    isAllExpanded = false;\n                }\n            }\n        }\n    }\n\n    void Tree::CollapseAll()\n    {\n        for (auto& child : mAllNodes)\n        {\n            auto childNode = DynamicCast<TreeNode>(child);\n            childNode->Collapse();\n        }\n    }\n\n    Vector<void*> Tree::GetSelectedObjects() const\n    {\n        return mSelectedObjects;\n    }\n\n    void Tree::SetSelectedObjects(const Vector<void*>& objects)\n    {\n        for (auto& sel : mSelectedNodes)\n            sel->SetSelected(false);\n\n        mSelectedNodes.Clear();\n        mSelectedObjects.Clear();\n\n        for (auto& obj : objects)\n        {\n            auto node = mAllNodes.FindOrDefault([=](auto& x) { return x->object == obj; });\n\n            if (!node)\n                continue;\n\n            node->SetSelected(true);\n            mSelectedNodes.Add(node);\n        }\n\n        mSelectedObjects.Add(objects);\n\n        OnSelectionChanged();\n        SetLayoutDirty();\n    }\n\n    void Tree::SelectObject(void* object)\n    {\n        if (!mMultiSelectAvailable)\n            DeselectAllObjects();\n\n        if (mSelectedObjects.Contains(object))\n        {\n            o2Debug.Log(\"Already selected\");\n            return;\n        }\n\n        auto node = mAllNodes.FindOrDefault([=](auto& x) { return x->object == object; });\n        if (!node)\n            return;\n\n        node->SetSelected(true);\n        mSelectedNodes.Add(node);\n        mSelectedObjects.Add(node->object);\n\n        OnSelectionChanged();\n        SetLayoutDirty();\n    }\n\n    void Tree::SelectAndHighlightObject(void* object)\n    {\n        DeselectAllObjects();\n        UpdateNodesStructure();\n        ScrollToAndHighlight(object);\n        SelectObject(object);\n    }\n\n    void Tree::DeselectObject(void* object)\n    {\n        int idx = mSelectedNodes.IndexOf([&](auto x) { return x->object == object; });\n\n        if (idx < 0)\n            return;\n\n        mSelectedNodes[idx]->SetSelected(false);\n        mSelectedObjects.Remove(mSelectedNodes[idx]->object);\n        mSelectedNodes.RemoveAt(idx);\n\n        OnSelectionChanged();\n        SetLayoutDirty();\n    }\n\n    void Tree::DeselectAllObjects()\n    {\n        for (auto& sel : mSelectedNodes)\n            sel->SetSelected(false);\n\n        mSelectedNodes.Clear();\n        mSelectedObjects.Clear();\n        OnSelectionChanged();\n    }\n\n    void Tree::ScrollTo(void* object)\n    {\n        if (!object)\n        {\n            ResetScroll();\n            return;\n        }\n\n        ExpandParentObjects(object);\n\n        int idx = mAllNodes.IndexOf([=](auto& x) { return x->object == object; });\n\n        if (idx >= 0)\n            SetScroll(Vec2F(mScrollPos.x, (float)idx*mNodeWidgetSample->layout->minHeight - layout->height*0.5f));\n    }\n\n    void Tree::ScrollToAndHighlight(void* object)\n    {\n        if (!object)\n        {\n            ResetScroll();\n            return;\n        }\n\n        ExpandParentObjects(object);\n\n        int idx = mAllNodes.IndexOf([=](auto& x) { return x->object == object; });\n\n        if (idx >= 0)\n        {\n            float position = (float)idx*mNodeWidgetSample->layout->minHeight;\n            float scroll = position - layout->height*0.5f;\n            SetScroll(Vec2F(mScrollPos.x, scroll));\n\n            mHighlighNode = mAllNodes[idx];\n            mHighlightObject = object;\n            mHighlightAnim->RewindAndPlay();\n        }\n    }\n\n    void Tree::ExpandParentObjects(void* object)\n    {\n        Vector<void*> parentsStack;\n        void* current = GetObjectParent(object);\n        while (current)\n        {\n            parentsStack.Add(current);\n            current = GetObjectParent(current);\n        }\n\n        for (int i = parentsStack.Count() - 1; i >= 0; i--)\n        {\n            auto node = mAllNodes.FindOrDefault([=](auto& x) { return x->object == parentsStack[i]; });\n\n            if (!node)\n            {\n                o2Debug.LogWarning(\"UITree: failed to expand parents for node\");\n                return;\n            }\n\n            if (node->isExpanded)\n                continue;\n\n            if (node->widget)\n                node->widget->SetExpanded(true);\n            else\n                ExpandNode(node);\n        }\n\n        UpdateNodeExpanding(mExpandNodeTime);\n        SetLayoutDirty();\n    }\n\n    void Tree::OnObjectCreated(void* object, void* parent)\n    {\n        mIsNeedUpdateView = true;\n    }\n\n    void Tree::OnObjectRemoved(void* object)\n    {\n        mIsNeedUpdateView = true;\n    }\n\n    void Tree::OnObjectsChanged(const Vector<void*>& objects)\n    {\n        if (mIsNeedUpdateView)\n            return;\n\n        for (auto& object : objects)\n        {\n            auto nodeIdx = mVisibleNodes.IndexOf([=](auto& x) { return x->object == object; });\n            if (nodeIdx < 0)\n                continue;\n\n            auto node = mVisibleNodes[nodeIdx];\n            if (node->widget)\n                UpdateNodeView(node, node->widget, -1);\n        }\n    }\n\n    void Tree::UpdateNodesStructure()\n    {\n        mIsNeedUpdateView = false;\n\n        mHighlighNode = nullptr;\n\n        if (mExpandingNodeState != ExpandState::None)\n        {\n            UpdateNodeExpanding(mExpandNodeTime);\n\n            for (auto& child : mChildWidgets)\n                child->SetLayoutDirty();\n        }\n\n        Vector<void*> rootObjects = GetObjectChilds(nullptr);\n\n        mVisibleWidgetsCache.Clear();\n        for (auto& node : mVisibleNodes)\n        {\n            if (!node->widget)\n                continue;\n\n            VisibleWidgetDef cache;\n            cache.object = node->object;\n            cache.widget = node->widget;\n            cache.position = mAllNodes.IndexOf(node);\n\n            mVisibleWidgetsCache.Add(cache);\n        }\n\n        mNodesBuf.Add(mAllNodes);\n\n        mAllNodes.Clear();\n        mVisibleNodes.Clear();\n        mChildren.Clear();\n        mChildWidgets.Clear();\n        mSelectedNodes.Clear();\n        mMinVisibleNodeIdx = 0;\n        mMaxVisibleNodeIdx = -1;\n\n        int position = 0;\n        for (auto& object : rootObjects)\n        {\n            if (mIsDraggingNodes && mSelectedObjects.Contains(object))\n                continue;\n\n            auto node = CreateNode(object, nullptr);\n            mAllNodes.Insert(node, position++);\n            position += InsertNodes(node, position);\n        }\n\n        SetLayoutDirty();\n    }\n\n    int Tree::InsertNodes(const Ref<Node>& parentNode, int position, Vector<Ref<Node>>* newNodes /*= nullptr*/)\n    {\n        int initialPosition = position;\n\n        if (mExpandedObjects.Contains(parentNode->object))\n        {\n            auto childObjects = GetObjectChilds(parentNode->object);\n            for (auto& child : childObjects)\n            {\n                if (mIsDraggingNodes && mSelectedObjects.Contains(child))\n                    continue;\n\n                if (parentNode->object == child)\n                    continue;\n\n                auto node = CreateNode(child, parentNode);\n\n                mAllNodes.Insert(node, position++);\n\n                if (newNodes)\n                    newNodes->Add(node);\n\n                position += InsertNodes(node, position, newNodes);\n            }\n        }\n\n        return position - initialPosition;\n    }\n\n    void Tree::RemoveNodes(const Ref<Node>& parentNode)\n    {\n        int begin = mAllNodes.IndexOf(parentNode) + 1;\n        int end = begin - 1 + parentNode->GetChildCount();\n\n        mAllNodes.RemoveRange(begin, end);\n    }\n\n    Ref<Tree::Node> Tree::CreateNode(void* object, const Ref<Node>& parent)\n    {\n        auto node = mNodesBuf.IsEmpty() ? mmake<Node>() : mNodesBuf.PopBack();\n        node->childs.Clear();\n\n        node->parent = parent;\n        node->object = object;\n        node->widget = nullptr;\n        node->isSelected = mSelectedObjects.Contains(object);\n        node->isExpanded = mExpandedObjects.Contains(object);\n        node->level = parent ? parent->level + 1 : 0;\n\n        node->id = GetObjectDebug(object);\n\n        if (parent)\n            parent->childs.Add(node);\n\n        if (node->isSelected)\n            mSelectedNodes.Add(node);\n\n        return node;\n    }\n\n    void Tree::OnFocused()\n    {\n        for (auto& node : mVisibleNodes)\n        {\n            if (node->widget)\n                node->widget->SetState(\"focused\", true);\n        }\n\n        onFocused();\n    }\n\n    void Tree::OnUnfocused()\n    {\n        for (auto& node : mVisibleNodes)\n        {\n            if (node->widget)\n                node->widget->SetState(\"focused\", false);\n        }\n\n        onUnfocused();\n    }\n\n    void Tree::DrawZebraBack()\n    {\n        float pos = -mScrollPos.y;\n        float lineSize = mNodeWidgetSample->layout->GetMinHeight();\n        while (pos < -lineSize)\n            pos += lineSize*2.0f;\n\n        RectF layoutRect = layout->GetWorldRect();\n        while (pos < layoutRect.Height())\n        {\n            mZebraBackLine->SetRect(RectF(layoutRect.left, layoutRect.top - pos, layoutRect.right, layoutRect.top - pos - lineSize));\n            mZebraBackLine->Draw();\n            pos += lineSize*2.0f;\n        }\n    }\n\n    void Tree::UpdateSelfTransform()\n    {\n        ScrollArea::UpdateSelfTransform();\n        mIsNeedUdateLayout = false;\n    }\n\n    bool Tree::IsInputTransparent() const\n    {\n        return ScrollArea::IsInputTransparent();\n    }\n\n    void Tree::UpdateVisibleNodes()\n    {\n        UpdateSelfTransform();\n\n        mIsNeedUpdateVisibleNodes = false;\n\n        int lastMinVisible = mMinVisibleNodeIdx;\n        int lastMaxVisible = mMaxVisibleNodeIdx;\n\n        float topVisiblePosition = mScrollPos.y;\n        float bottomVisiblePosition = mScrollPos.y + mAbsoluteViewArea.Height();\n\n        mMinVisibleNodeIdx = GetNodeIndex(topVisiblePosition);\n        mMaxVisibleNodeIdx = GetNodeIndex(bottomVisiblePosition);\n\n        if (mAllNodes.IsEmpty())\n            mMaxVisibleNodeIdx = -1;\n\n        for (int i = lastMinVisible; i <= lastMaxVisible; i++)\n        {\n            if (i < mMinVisibleNodeIdx || i > mMaxVisibleNodeIdx)\n            {\n                if (i >= mAllNodes.Count())\n                    break;\n\n                auto node = mAllNodes[i];\n\n                if (node->widget)\n                {\n                    FreeNodeData(node->widget, node->object);\n\n                    mNodeWidgetsBuf.Add(node->widget);\n                    mChildren.Remove(node->widget);\n                    mChildWidgets.Remove(node->widget);\n                    mChildrenInheritedDepth.Remove(node->widget);\n\n                    node->widget->mParent = nullptr;\n                    node->widget->mParentWidget = nullptr;\n                    node->widget->mNodeDef = nullptr;\n                    node->widget = nullptr;\n                }\n            }\n        }\n\n        float nodeHeight = mNodeWidgetSample->layout->minHeight;\n        for (int i = mMinVisibleNodeIdx; i <= mMaxVisibleNodeIdx && i < mAllNodes.Count(); i++)\n        {\n            auto node = mAllNodes[i];\n\n            if (i < lastMinVisible || i > lastMaxVisible)\n                CreateVisibleNodeWidget(node, i);\n\n            if (!node->widget)\n            {\n                float realPosition = (float)i*nodeHeight;\n                if (realPosition > topVisiblePosition && realPosition < bottomVisiblePosition)\n                    CreateVisibleNodeWidget(node, i);\n            }\n        }\n\n        mVisibleNodes = mAllNodes.Take(mMinVisibleNodeIdx, mMaxVisibleNodeIdx + 1);\n\n        for (auto& node : mVisibleNodes)\n        {\n            if (node->widget)\n            {\n                node->widget->UpdateSelfTransform();\n                node->widget->UpdateChildrenTransforms();\n                node->widget->CheckClipping(mAbsoluteClipArea);\n            }\n        }\n\n        mNodeWidgetsBuf.Add(mVisibleWidgetsCache\n                            .FindAll([](const VisibleWidgetDef& x) { return x.widget != nullptr; })\n                            .Convert<Ref<TreeNode>>([&](const VisibleWidgetDef& x) { FreeNodeData(x.widget, x.object); return x.widget; }));\n\n        mVisibleWidgetsCache.Clear();\n\n        if (mIsDraggingNodes)\n            OnDraggedAbove(Ref(this));\n    }\n\n    void Tree::CreateVisibleNodeWidget(const Ref<Node>& node, int i)\n    {\n        int cacheIdx = mVisibleWidgetsCache.IndexOf([=](const VisibleWidgetDef& x) {\n            return x.object == node->object && x.position == i; });\n\n        Ref<TreeNode> widget;\n\n        if (cacheIdx < 0)\n            widget = CreateTreeNodeWidget();\n        else\n        {\n            widget = mVisibleWidgetsCache[cacheIdx].widget;\n            mVisibleWidgetsCache[cacheIdx].widget = nullptr;\n        }\n\n        UpdateNodeView(node, widget, i);\n\n        widget->mIsSelected = node->isSelected;\n        widget->mNodeDef = node;\n        node->widget = widget;\n        widget->mParent = Ref(this);\n        widget->mParentWidget = Ref(this);\n        widget->mResEnabledInHierarchy = true;\n        widget->mResEnabled = true;\n\n        mChildren.Add(widget);\n        mChildWidgets.Add(widget);\n        mChildrenInheritedDepth.Add(widget);\n    }\n\n    void Tree::UpdateNodeView(const Ref<Node>& node, const Ref<TreeNode>& widget, int idx)\n    {\n        node->widget = widget;\n\n        FillNodeDataByObject(widget, node->object);\n\n        if (GetObjectChilds(node->object).IsEmpty())\n        {\n            if (widget->mExpandBtn)\n                widget->mExpandBtn->Hide(true);\n        }\n        else\n        {\n            widget->SetStateForcible(\"expanded\", node->isExpanded);\n            if (widget->mExpandBtn)\n                widget->mExpandBtn->Show(true);\n        }\n\n        widget->mIsSelected = node->isSelected;\n        widget->SetSelectedState(node->isSelected);\n        widget->SetFocusedState(mIsFocused);\n\n        if (idx >= 0)\n            UpdateNodeWidgetLayout(node, idx);\n    }\n\n    void Tree::UpdateNodeWidgetLayout(const Ref<Node>& node, int idx)\n    {\n        float nodeHeight = mNodeWidgetSample->layout->GetMinHeight();\n        float dragModeOffset = 0.0f;\n\n        if (mIsDraggingNodes)\n            dragModeOffset = mExpandingNodeFunc.Evaluate(node->insertCoef)*nodeHeight;\n\n        node->widget->layout->CopyFrom(WidgetLayout::HorStretch(VerAlign::Top, mChildrenOffset*(float)node->level, 0,\n                                       nodeHeight, GetNodePosition(idx) + dragModeOffset));\n    }\n\n    int Tree::GetNodeIndex(float position) const\n    {\n        int res = 0;\n        float nodeHeight = mNodeWidgetSample->layout->GetMinHeight();\n\n        if (mExpandingNodeState != ExpandState::None && position > mExpandingNodeBottomPosition)\n        {\n            res = Math::Min(Math::FloorToInt((position + mExpandingNodeTargetHeight - mExpandingNodeCurrHeight)/nodeHeight),\n                            Math::Max(0, mAllNodes.Count() - 1));\n        }\n        else res = Math::Min(Math::FloorToInt(position/nodeHeight), Math::Max(0, mAllNodes.Count() - 1));\n\n        return res;\n    }\n\n    float Tree::GetNodePosition(int idx) const\n    {\n        float nodeHeight = mNodeWidgetSample->layout->GetMinHeight();\n\n        float res = (float)idx*nodeHeight;\n\n        if (mExpandingNodeState != ExpandState::None && idx > mExpandingNodeIdx + mExpandingNodeChildsCount)\n            res -= mExpandingNodeTargetHeight - mExpandingNodeCurrHeight;\n\n        return res;\n    }\n\n    void Tree::ExpandNode(const Ref<Node>& node)\n    {\n        int position = mAllNodes.IndexOf(node) + 1;\n\n        if (mExpandingNodeState != ExpandState::None && mExpandingNodeIdx != position - 1)\n            UpdateNodeExpanding(mExpandNodeTime);\n\n        mExpandedObjects.Add(node->object);\n\n        node->isExpanded = true;\n\n        auto thisRef = Ref(this);\n\n        if (mExpandingNodeState != ExpandState::None && mExpandingNodeIdx == position - 1)\n            mExpandingNodeState = ExpandState::Expanding;\n        else\n        {\n            Vector<Ref<Node>> newNodes;\n            InsertNodes(node, position, &newNodes);\n\n            float nodeHeight = mNodeWidgetSample->layout->GetMinHeight();\n            float topViewBorder = mScrollPos.y;\n            float bottomViewBorder = topViewBorder + mAbsoluteViewArea.Height();\n            int idx = position;\n\n            if (idx < mMinVisibleNodeIdx)\n            {\n                mMinVisibleNodeIdx += newNodes.Count();\n                mMaxVisibleNodeIdx += newNodes.Count();\n            }\n            else if (idx <= mMaxVisibleNodeIdx)\n            {\n                for (auto& node : newNodes)\n                {\n                    float position = (float)idx*nodeHeight;\n                    if (position > bottomViewBorder)\n                        break;\n\n                    const Ref<TreeNode>& nodeWidget = CreateTreeNodeWidget();\n\n                    node->widget = nodeWidget;\n                    nodeWidget->mNodeDef = node;\n                    nodeWidget->mParent = nullptr;\n\n                    UpdateNodeView(node, nodeWidget, idx);\n\n                    nodeWidget->mParent = thisRef;\n                    nodeWidget->mParentWidget = thisRef;\n\n                    mVisibleNodes.Add(node);\n                    mChildren.Add(nodeWidget);\n                    mChildWidgets.Add(nodeWidget);\n                    mChildrenInheritedDepth.Add(nodeWidget);\n\n                    idx++;\n                }\n                mMaxVisibleNodeIdx += newNodes.Count();\n            }\n\n            StartExpandingAnimation(ExpandState::Expanding, node, newNodes.Count());\n        }\n\n        OnNodeExpanded(node->object);\n\n        mIsNeedUdateLayout = true;\n    }\n\n    void Tree::CollapseNode(const Ref<Node>& node)\n    {\n        int idx = mAllNodes.IndexOf(node);\n\n        if (mExpandingNodeState != ExpandState::None && mExpandingNodeIdx != idx)\n            UpdateNodeExpanding(mExpandNodeTime);\n\n        mExpandedObjects.Remove(node->object);\n\n        node->isExpanded = false;\n\n        int collapseNodesCount = node->GetChildCount();\n\n        if (mExpandingNodeState != ExpandState::None && mExpandingNodeIdx == idx)\n            mExpandingNodeState = ExpandState::Collaping;\n        else\n            StartExpandingAnimation(ExpandState::Collaping, node, collapseNodesCount);\n\n        OnNodeCollapsed(node->object);\n\n        mIsNeedUdateLayout = true;\n    }\n\n    void Tree::StartExpandingAnimation(ExpandState direction, const Ref<Node>& node, int childrenCount)\n    {\n        int idx = mAllNodes.IndexOf(node);\n\n        float nodeHeight = mNodeWidgetSample->layout->GetMinHeight();\n\n        mExpandingNodeIdx = idx;\n        mExpandingNodePosition = mExpandingNodeIdx*nodeHeight + nodeHeight;\n        mExpandingNodeTargetHeight = (float)childrenCount*nodeHeight;\n        mExpandingNodeBottomPosition = direction == ExpandState::Expanding ? mExpandingNodePosition :\n            mExpandingNodePosition + mExpandingNodeTargetHeight;\n        mExpandingNodeChildsCount = childrenCount;\n        mExpandingNodeCurrCoef = direction == ExpandState::Expanding ? 0.0f : 1.0f;\n        mExpandingNodeCurrHeight = direction == ExpandState::Expanding ? 0.0f : mExpandingNodeTargetHeight;\n        mExpandingNodeState = direction;\n    }\n\n    void Tree::UpdateNodeExpanding(float dt)\n    {\n        if (mExpandingNodeState == ExpandState::None)\n            return;\n\n        if (mExpandingNodeState == ExpandState::Expanding)\n        {\n            mExpandingNodeCurrCoef += dt/mExpandNodeTime;\n\n            if (mExpandingNodeCurrCoef > 1.0f)\n            {\n                mExpandingNodeCurrCoef = 1.0f;\n                mExpandingNodeState = ExpandState::None;\n            }\n        }\n        else\n        {\n            mExpandingNodeCurrCoef -= dt/mExpandNodeTime;\n\n            if (mExpandingNodeCurrCoef < 0.0f)\n            {\n                mExpandingNodeCurrCoef = 0.0f;\n                mExpandingNodeState = ExpandState::None;\n\n                mAllNodes[mExpandingNodeIdx]->childs.Clear();\n\n                for (int i = mExpandingNodeIdx + 1; i <= mExpandingNodeIdx + mExpandingNodeChildsCount && i < mAllNodes.Count(); i++)\n                {\n                    auto node = mAllNodes[i];\n                    if (node->widget)\n                    {\n                        FreeNodeData(node->widget, node->object);\n\n                        mNodeWidgetsBuf.Add(node->widget);\n                        mChildren.Remove(node->widget);\n                        mChildWidgets.Remove(node->widget);\n                        mChildrenInheritedDepth.Remove(node->widget);\n\n                        node->widget->mParent = nullptr;\n                        node->widget->mParentWidget = nullptr;\n                        node->widget->mNodeDef = nullptr;\n                        node->widget = nullptr;\n                    }\n\n                    mNodesBuf.Add(node);\n\n                    if (node->isSelected)\n                        mSelectedNodes.Remove(node);\n                }\n\n                mAllNodes.RemoveRange(mExpandingNodeIdx + 1, mExpandingNodeIdx + mExpandingNodeChildsCount + 1);\n                mExpandingNodeChildsCount = 0;\n            }\n        }\n\n        float lastExpandBottom = mExpandingNodeBottomPosition;\n        mExpandingNodeCurrHeight = mExpandingNodeFunc.Evaluate(mExpandingNodeCurrCoef)*mExpandingNodeTargetHeight;\n        mExpandingNodeBottomPosition = mExpandingNodePosition + mExpandingNodeCurrHeight;\n\n        float offs = mExpandingNodeBottomPosition - lastExpandBottom;\n        for (int i = Math::Max(mExpandingNodeIdx + mExpandingNodeChildsCount + 1, mMinVisibleNodeIdx); i <= mMaxVisibleNodeIdx && i < mAllNodes.Count(); i++)\n        {\n            auto node = mAllNodes[i];\n\n            if (node->widget)\n            {\n                node->widget->GetLayoutData().offsetMin.y -= offs;\n                node->widget->GetLayoutData().offsetMax.y -= offs;\n            }\n        }\n\n        mIsNeedUdateLayout = true;\n    }\n\n    void Tree::CalculateScrollArea()\n    {\n        const float bottomAdditionalSpace = 100;\n\n        Vec2F offset;\n        InitializeScrollAreaRectCalculation(offset);\n\n        float itemsHeight = (float)mAllNodes.Count()*mNodeWidgetSample->layout->minHeight + bottomAdditionalSpace;\n        RecalculateScrollAreaRect(RectF(0, mAbsoluteViewArea.Height(), mAbsoluteViewArea.Width(), mAbsoluteViewArea.Height() - itemsHeight), Vec2F());\n    }\n\n    void Tree::MoveScrollPosition(const Vec2F& delta)\n    {\n        ScrollArea::MoveScrollPosition(delta);\n        UpdateVisibleNodes();\n\n        mTargetHoverRect += delta;\n        mCurrentHoverRect += delta;\n    }\n\n    void Tree::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        Focus();\n    }\n\n    void Tree::UpdateHover(const Ref<TreeNode>& itemUnderCursor)\n    {\n        bool hoverVisible = false;\n        if (itemUnderCursor)\n        {\n            mTargetHoverRect = mHoverLayout.Calculate(itemUnderCursor->layout->worldRect);\n            hoverVisible = true;\n        }\n\n        if (auto hoverState = state[\"hover\"])\n            hoverState->SetState(hoverVisible);\n        else\n            mHoverDrawable->SetEnabled(hoverVisible);\n    }\n\n    void Tree::OnCursorMoved(const Input::Cursor& cursor)\n    {\n        if (!mIsDraggingNodes)\n            UpdateHover(GetTreeNodeUnderPoint(cursor.position));\n    }\n\n    void Tree::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (!mIsDraggingNodes)\n        {\n            float a = (float)mAllNodes.Count()*mNodeWidgetSample->layout->GetMinHeight();\n            float b = mAbsoluteViewArea.top - cursor.position.y + mScrollPos.y;\n            bool isCursorUnderNode = a > b;\n\n            if (o2Input.IsKeyDown(VK_SHIFT))\n            {\n                if (CheckMultipleSelection(cursor.position))\n                {\n                    OnSelectionChanged();\n                    SetLayoutDirty();\n                }\n            }\n            else if (!o2Input.IsKeyDown(VK_CONTROL) && !isCursorUnderNode)\n                DeselectAllObjects();\n\n            mLastClickPos = mAbsoluteViewArea.LeftTop() - cursor.position + mScrollPos;\n        }\n    }\n\n    void Tree::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        auto node = GetTreeNodeUnderPoint(cursor.position);\n        if (mSelectedNodes.Count() < 2)\n        {\n            for (auto& sel : mSelectedNodes)\n                sel->SetSelected(false);\n\n            mSelectedNodes.Clear();\n            mSelectedObjects.Clear();\n\n            if (node)\n                SelectObject(node->GetObject());\n            else\n                OnSelectionChanged();\n        }\n\n        Focus();\n\n        OnNodeRBClick(node);\n    }\n\n    void Tree::OnCursorPressBreak(const Input::Cursor& cursor)\n    {}\n\n    void Tree::OnCursorExit(const Input::Cursor& cursor)\n    {\n        if (auto hoverState = state[\"hover\"])\n            hoverState->SetState(false);\n        else\n            mHoverDrawable->SetEnabled(false);\n    }\n\n    void Tree::OnScrolled(float scroll)\n    {\n        ScrollArea::OnScrolled(scroll);\n    }\n\n    Ref<TreeNode> Tree::GetTreeNodeUnderPoint(const Vec2F& point)\n    {\n        for (auto& node : mVisibleNodes)\n        {\n            if (node->widget && node->widget->layout->IsPointInside(point))\n                return node->widget;\n        }\n\n        return nullptr;\n    }\n\n    Ref<TreeNode> Tree::CreateTreeNodeWidget()\n    {\n        Ref<TreeNode> res;\n\n        if (mNodeWidgetsBuf.IsEmpty())\n        {\n            res = mNodeWidgetSample->CloneAsRef<TreeNode>();\n            res->RemoveFromScene();\n            res->Show(true);\n            res->SetSelectionGroup(Ref(this));\n            res->messageFallDownListener = static_cast<ScrollArea*>(this);\n            res->mOwnerTree = Ref(this);\n        }\n        else \n            res = mNodeWidgetsBuf.PopBack();\n\n        res->SetInteractable(!mIsDraggingNodes);\n        res->mIsSelected = false;\n        res->mIsClipped = false;\n        res->SetEnabledForcible(true);\n        Widget::UpdateTransparency();\n\n        mIsNeedUpdateView = false;\n\n        return res;\n    }\n\n    void Tree::BeginDragging(const Ref<TreeNode>& node)\n    {\n        if (mRearrangeType == RearrangeType::Disabled)\n            return;\n\n        mDragOffset = node->layout->worldCenter - node->GetCursorPressedPoint();\n        mFakeDragNode->Show(true);\n        mFakeDragNode->SetInteractable(false);\n        mFakeDragNode->SetStateForcible(\"selected\", true);\n        mFakeDragNode->SetStateForcible(\"focused\", true);\n\n        FillNodeDataByObject(mFakeDragNode, mSelectedNodes.Last()->object);\n\n        if (mSelectedNodes.Count() > 1)\n        {\n            if (auto nameLayer = mFakeDragNode->GetLayerDrawableByType<Text>())\n                nameLayer->text = String::Format(\"%i items\", mSelectedNodes.Count());\n        }\n\n        for (auto& node : mVisibleNodes)\n            node->widget->SetInteractable(false);\n\n        mIsDraggingNodes = true;\n        UpdateNodesStructure();\n    }\n\n    void Tree::EndDragging(bool droppedToThis /*= false*/)\n    {\n        mIsDraggingNodes = false;\n        mDragEnded = false;\n        mFakeDragNode->Hide(true);\n\n        int idx = 0;\n        for (auto& node : mAllNodes)\n        {\n            node->inserting = false;\n            node->insertCoef = 0.0f;\n\n            if (node->widget)\n            {\n                node->widget->SetInteractable(true);\n                UpdateNodeWidgetLayout(node, idx);\n                node->widget->SetLayoutDirty();\n            }\n\n            idx++;\n        }\n\n        if (!droppedToThis)\n        {\n            UpdateNodesStructure();\n            SetSelectedObjects(mBeforeDragSelectedItems);\n        }\n    }\n\n    void Tree::UpdateDraggingGraphics()\n    {\n        const Input::Cursor& cursor = *o2Input.GetCursor(0);\n\n        float width = layout->width;\n        float height = mNodeWidgetSample->layout->minHeight;\n        RectF dragNodeRect = RectF(cursor.position.x - width*0.5f, cursor.position.y + height*0.5f,\n                                   cursor.position.x + width*0.5f, cursor.position.y - height*0.5f);\n\n        dragNodeRect += mDragOffset;\n        mFakeDragNode->layout->worldRect = dragNodeRect;\n        mFakeDragNode->Widget::UpdateTransform();\n    }\n\n    void Tree::UpdateDraggingInsertion()\n    {\n        bool first = true;\n        float ycursor = o2Input.GetCursor(0)->position.y;\n        for (auto& node : mVisibleNodes)\n        {\n            if (!node->widget)\n                return;\n\n            float y = node->widget->layout->GetWorldCenter().y;\n            float h = node->widget->layout->height;\n            float cy = first ? y : (y > ycursor ? y + h*mNodeDragIntoZone : y - h*mNodeDragIntoZone);\n            first = false;\n\n            node->inserting = cy < ycursor;\n        }\n    }\n\n    void Tree::UpdateDraggingInsertionAnim(float dt)\n    {\n        for (auto& node : mVisibleNodes)\n        {\n            bool changed = false;\n            if (node->inserting && node->insertCoef < 1.0f)\n            {\n                node->insertCoef += dt/mExpandNodeTime*2.0f;\n\n                if (node->insertCoef > 1.0f)\n                    node->insertCoef = 1.0f;\n\n                changed = true;\n            }\n\n            if (!node->inserting && node->insertCoef > 0.0f)\n            {\n                node->insertCoef -= dt/mExpandNodeTime*2.0f;\n\n                if (node->insertCoef < 0.0f)\n                    node->insertCoef = 0.0f;\n\n                changed = true;\n            }\n\n            if (node->widget && changed)\n            {\n                UpdateNodeWidgetLayout(node, mAllNodes.IndexOf(node));\n                node->widget->SetLayoutDirty();\n            }\n        }\n    }\n\n    void Tree::OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        mInsertNodeCandidate = nullptr;\n        OnDraggedAbove(group);\n    }\n\n    void Tree::OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        const Input::Cursor& cursor = *o2Input.GetCursor(0);\n\n        Ref<TreeNode> currentInsertCandidate;\n        float nodeDst = FLT_MAX;\n        bool first = true;\n        for (auto& node : mVisibleNodes)\n        {\n            //             if (node->widget->mDragSizeCoef < 0.95f)\n            //                 continue;\n            //                 \n            if (!node->widget)\n                continue;\n\n            float dst = cursor.position.y - node->widget->layout->GetWorldCenter().y;\n            if (!first)\n                dst += node->widget->layout->height*mNodeDragIntoZone;\n\n            if (dst > 0 && dst < nodeDst)\n            {\n                nodeDst = dst;\n                currentInsertCandidate = node->widget;\n            }\n\n            first = false;\n        }\n\n        if (currentInsertCandidate != mInsertNodeCandidate)\n        {\n            mInsertNodeCandidate = currentInsertCandidate;\n\n            if (mRearrangeType == RearrangeType::Enabled)\n                UpdateDraggingInsertion();\n        }\n\n        UpdateHover(mInsertNodeCandidate);\n\n        if (mInsertNodeCandidate && !mInsertNodeCandidate->IsUnderPoint(cursor.position))\n            mTargetHoverRect += Vec2F::Up()*mInsertNodeCandidate->layout->height;\n    }\n\n    void Tree::OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        for (auto& node : mVisibleNodes)\n            node->inserting = false;\n    }\n\n    void Tree::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (DynamicCast<Tree>(group) == nullptr)\n            return;\n\n        auto underCursorItem = GetTreeNodeUnderPoint(o2Input.GetCursorPos());\n\n        EndDragging(true);\n        OnSelectionChanged();\n\n        Vector<void*> objects;\n        void* targetParent = nullptr;\n        void* targetPrevObject = nullptr;\n        auto insertNodeCandidate = mInsertNodeCandidate ? mInsertNodeCandidate->mNodeDef.Lock() : nullptr;\n\n        if (underCursorItem)\n            targetParent = underCursorItem->mNodeDef.Lock()->object;\n        else\n        {\n            if (insertNodeCandidate)\n            {\n                targetParent = insertNodeCandidate->parent ? insertNodeCandidate->parent.Lock()->object : nullptr;\n                auto parentChilds = GetObjectChilds(targetParent);\n\n                int idx = parentChilds.IndexOf(insertNodeCandidate->object);\n                if (idx > 0)\n                {\n                    targetPrevObject = parentChilds[idx - 1];\n\n                    if (mSelectedObjects.Contains(targetPrevObject) && idx > 1)\n                        targetPrevObject = parentChilds[idx - 2];\n                }\n                else\n                    targetPrevObject = nullptr;\n            }\n            else\n            {\n                auto rootObjects = GetObjectChilds(nullptr);\n                if (rootObjects.Count() > 0)\n                {\n                    targetPrevObject = rootObjects.Last();\n\n                    if (mSelectedObjects.Contains([&](void* x) { return ((Node*)x)->object == targetPrevObject; }))\n                    {\n                        if (rootObjects.Count() > 1)\n                            targetPrevObject = rootObjects[rootObjects.Count() - 2];\n                        else\n                            targetPrevObject = nullptr;\n                    }\n                }\n            }\n        }\n\n        for (auto& sel : mSelectedObjects)\n        {\n            bool processing = true;\n\n            void* parent = GetObjectParent(sel);\n            while (parent)\n            {\n                if (mSelectedObjects.Contains(parent))\n                {\n                    processing = false;\n                    break;\n                }\n\n                parent = GetObjectParent(parent);\n            }\n\n            if (processing)\n                objects.Add(sel);\n        }\n\n        o2Debug.Log(\"Drop parent:\" + GetObjectDebug(targetParent) + \", prev:\" + GetObjectDebug(targetPrevObject));\n        OnDraggedObjects(objects, targetParent, targetPrevObject);\n\n        UpdateNodesStructure();\n    }\n\n    void Tree::OnDeserialized(const DataValue& node)\n    {\n        ScrollArea::OnDeserialized(node);\n        mHighlightAnim->SetTarget(mHighlightSprite.Get());\n        mHighlightAnim->SetClip(mHighlighClip);\n    }\n\n    void Tree::OnSelectionChanged()\n    {\n        OnNodesSelectionChanged(mSelectedObjects);\n    }\n\n    const Ref<TreeNode>& Tree::GetNodeSample() const\n    {\n        return mNodeWidgetSample;\n    }\n\n    void Tree::SetNodeSample(const Ref<TreeNode>& sample)\n    {\n        mNodeWidgetSample = sample;\n    }\n\n    const Ref<Sprite>& Tree::GetHoverDrawable() const\n    {\n        return mHoverDrawable;\n    }\n\n    const Ref<Sprite>& Tree::GetHighlightDrawable() const\n    {\n        return mHighlightSprite;\n    }\n\n    void Tree::SetHighlightAnimation(const Ref<AnimationClip>& animation)\n    {\n        mHighlighClip = animation;\n        mHighlightAnim->SetTarget(mHighlightSprite.Get());\n        mHighlightAnim->SetClip(mHighlighClip);\n    }\n\n    void Tree::SetHighlightLayout(const Layout& layout)\n    {\n        mHighlightLayout = layout;\n    }\n\n    void Tree::SetZebraBackLine(const Ref<Sprite>& sprite)\n    {\n        mZebraBackLine = sprite;\n    }\n\n    const Ref<Sprite>& Tree::GetZebraBackLine() const\n    {\n        return mZebraBackLine;\n    }\n\n    bool Tree::IsScrollable() const\n    {\n        return true;\n    }\n\n    void Tree::SetRearrangeType(RearrangeType type)\n    {\n        mRearrangeType = type;\n    }\n\n    Tree::RearrangeType Tree::GetRearrangeType() const\n    {\n        return mRearrangeType;\n    }\n\n    void Tree::SetMultipleSelectionAvailable(bool available)\n    {\n        mMultiSelectAvailable = available;\n\n        if (!mMultiSelectAvailable)\n        {\n            if (!mSelectedObjects.IsEmpty())\n            {\n                void* lastSelected = mSelectedObjects.Last();\n                DeselectAllObjects();\n                SelectObject(lastSelected);\n            }\n        }\n    }\n\n    bool Tree::IsMultiSelectionAvailable() const\n    {\n        return mMultiSelectAvailable;\n    }\n\n    void Tree::SetNodeExpandTimer(float time)\n    {\n        mExpandInsertTime = time;\n    }\n\n    float Tree::GetNodeExpandTimer() const\n    {\n        return mExpandInsertTime;\n    }\n\n    void Tree::SetChildsNodesOffset(float offset)\n    {\n        mChildrenOffset = offset;\n        SetLayoutDirty();\n    }\n\n    float Tree::GetChildsNodesOffset() const\n    {\n        return mChildrenOffset;\n    }\n\n    void Tree::SetHoverLayout(const Layout& layout)\n    {\n        mHoverLayout = layout;\n    }\n\n    bool Tree::IsFocusable() const\n    {\n        return true;\n    }\n\n    bool Tree::IsUnderPoint(const Vec2F& point)\n    {\n        return Widget::IsUnderPoint(point);\n    }\n\n    Tree::Node::~Node()\n    {}\n\n    float Tree::Node::GetHeight() const\n    {\n        float res = 20;\n        return res;\n    }\n\n    void Tree::Node::SetSelected(bool selected)\n    {\n        this->isSelected = selected;\n        if (widget)\n        {\n            widget->SetState(\"selected\", selected);\n            widget->mIsSelected = selected;\n\n            if (selected)\n                widget->OnSelected();\n            else\n                widget->OnDeselected();\n        }\n    }\n\n    int Tree::Node::GetChildCount() const\n    {\n        return childs.Count() + childs.Sum<int>([](auto& x) { return x->GetChildCount(); });\n    }\n\n    bool Tree::VisibleWidgetDef::operator==(const VisibleWidgetDef& other) const\n    {\n        return object == other.object;\n    }\n\n    String Tree::GetCreateMenuGroup()\n    {\n        return \"Tree\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Tree>);\n// --- META ---\n\nENUM_META(o2::Tree::RearrangeType, o2__Tree__RearrangeType)\n{\n    ENUM_ENTRY(Disabled);\n    ENUM_ENTRY(Enabled);\n    ENUM_ENTRY(OnlyReparent);\n}\nEND_ENUM_META;\n\nENUM_META(o2::Tree::ExpandState, o2__Tree__ExpandState)\n{\n    ENUM_ENTRY(Collaping);\n    ENUM_ENTRY(Expanding);\n    ENUM_ENTRY(None);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::Tree, o2__Tree);\n\nDECLARE_CLASS(o2::TreeNode, o2__TreeNode);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Tree.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n#include \"o2/Scene/UI/Widgets/VerticalLayout.h\"\n#include \"o2/Utils/Editor/DragAndDrop.h\"\n#include \"o2/Utils/Math/Curve.h\"\n\nnamespace o2\n{\n    class Sprite;\n    class Button;\n    class TreeNode;\n\n    // -------\n    // UI Tree\n    // -------\n    class Tree: public ScrollArea, public DragDropArea, public ISelectableDragableObjectsGroup\n    {\n    public:\n        // Tree nodes rearrange available types\n        enum class RearrangeType { Disabled, Enabled, OnlyReparent };\n\n        // Tree node expand states\n        enum class ExpandState { None, Expanding, Collaping };\n\n    public:\n        Function<void*(void*)>         getObjectParentDelegate;      // Getting objects' parent delegate\n        Function<Vector<void*>(void*)> getObjectChildrenDelegate;    // Getting objects' childs count delegate\n\n        Function<void(const Ref<TreeNode>&, void*)> fillNodeDataByObjectDelegate; // Setup tree node item delegate\n        Function<void(const Ref<TreeNode>&, void*)> freeNodeDataDelegate;         // Free tree node data delegate\n\n        Function<String(void*)> getDebugForObject; // Getting debug string for object delegate\n\n        Function<void(const Ref<TreeNode>&)> onNodeDoubleClicked;      // Node double clicked event\n        Function<void(const Ref<TreeNode>&)> onNodeRightButtonClicked; // Node right button click event\n\n        Function<void(Vector<void*>)> onObjectsSelectionChanged; // Objects selected event\n\n        Function<void(Vector<void*>, void*, void*)> onDraggedObjects; // Objects dragged event\n\n        Function<void(void*)> onNodeExpanded;  // Node expanded event\n        Function<void(void*)> onNodeCollapsed; // Node collapsed event\n\n    public:\n        // Default constructor\n        explicit Tree(RefCounter* refCounter);\n\n        // Copy-constructor\n        Tree(RefCounter* refCounter, const Tree& other);\n\n        // Copy-constructor\n        Tree(const Tree& other);\n\n        // Destructor\n        ~Tree();\n\n        // Copy-operator\n        Tree& operator=(const Tree& other);\n\n        // Creates tree node for object\n        void OnObjectCreated(void* object, void* parent);\n\n        // Removes tree node for object\n        void OnObjectRemoved(void* object);\n\n        // Updates tree for changed objects\n        void OnObjectsChanged(const Vector<void*>& objects);\n\n        // Draws widget\n        void Draw() override;\n\n        // Updates widget\n        void Update(float dt) override;\n\n        // Updates childs\n        void UpdateChildren(float dt) override;\n\n        // Updates children and internal children transforms\n        void UpdateChildrenTransforms() override;\n\n        // Rebuilds all tree\n        void UpdateNodesView(bool immediately = true);\n\n        // Returns ui node for object\n        Ref<TreeNode> GetNode(void* object);\n\n        // Expands all nodes\n        void ExpandAll();\n\n        // Collapses all nodes\n        void CollapseAll();\n\n        // Returns selected objects vector\n        Vector<void*> GetSelectedObjects() const;\n\n        // Sets selected objects\n        void SetSelectedObjects(const Vector<void*>& objects);\n\n        // Selects object\n        void SelectObject(void* object);\n\n        // Selects object\n        void SelectAndHighlightObject(void* object);\n\n        // Deselects object\n        void DeselectObject(void* object);\n\n        // Deselects all objects\n        void DeselectAllObjects();\n\n        // Scrolls view to object\n        void ScrollTo(void* object);\n\n        // Scrolls view to object and highlights\n        void ScrollToAndHighlight(void* object);\n\n        // Expands all parent objects for specified object\n        void ExpandParentObjects(void* object);\n\n        // Returns item widget under point\n        Ref<TreeNode> GetTreeNodeUnderPoint(const Vec2F& point);\n\n        // Sets rearrange type\n        void SetRearrangeType(RearrangeType type);\n\n        // Returns available rearrange type \n        RearrangeType GetRearrangeType() const;\n\n        // Sets available multi selection\n        void SetMultipleSelectionAvailable(bool available);\n\n        // Returns is multi selection available\n        bool IsMultiSelectionAvailable() const;\n\n        // Returns item sample\n        const Ref<TreeNode>& GetNodeSample() const;\n\n        // Sets item sample\n        void SetNodeSample(const Ref<TreeNode>& sample);\n\n        // Returns hover drawable\n        const Ref<Sprite>& GetHoverDrawable() const;\n\n        // Sets hover layout\n        void SetHoverLayout(const Layout& layout);\n\n        // Returns node highlight drawable\n        const Ref<Sprite>& GetHighlightDrawable() const;\n\n        // Sets highlight animation\n        void SetHighlightAnimation(const Ref<AnimationClip>& animation);\n\n        // Sets highlight layout\n        void SetHighlightLayout(const Layout& layout);\n\n        // Sets zebra back line sprite drawable. When it is null no zebra back isn't drawing\n        void SetZebraBackLine(const Ref<Sprite>& sprite);\n\n        // Return zebra back line sprite\n        const Ref<Sprite>& GetZebraBackLine() const;\n\n        // Sets node pressing and expanding time\n        void SetNodeExpandTimer(float time);\n\n        // Returns node pressing and expanding time\n        float GetNodeExpandTimer() const;\n\n        // Sets children nodes horizontal offset from parent\n        void SetChildsNodesOffset(float offset);\n\n        // Returns childs nodes horizontal offset\n        float GetChildsNodesOffset() const;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns is this widget can be selected\n        bool IsFocusable() const override;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(Tree);\n        CLONEABLE_REF(Tree);\n\n    protected:\n        // --------------------\n        // Tree node definition\n        // --------------------\n        struct Node: public RefCounterable\n        {\n            String         id;\n            void*          object;             // Pointer to object\n            Ref<TreeNode>  widget;             // Node widget\n            int            level = 0;          // Hierarchy depth level\n            bool           isSelected = false; // Is node selected\n            bool           isExpanded = false; // Is node expanded\n\n            WeakRef<Node>     parent; // Parent node definition\n            Vector<Ref<Node>> childs; // Children nodes definitions\n\n            bool  inserting = false; // Node insertion flag\n            float insertCoef = 0.0f; // Inserting coefficient (0...1)\n\n        public:\n            // Destructor\n            virtual ~Node();\n\n            // Returns height of node with children and coefficients\n            float GetHeight() const;\n\n            // Sets widget state to selected and stores selected flag\n            void SetSelected(bool selected);\n\n            // Returns all children count\n            int GetChildCount() const;\n        };\n\n    protected:\n        // -----------------------------------\n        // Visible tree node widget cache info\n        // -----------------------------------\n        struct VisibleWidgetDef\n        {\n            void*         object;\n            Ref<TreeNode> widget;\n            int           position;\n\n        public:\n\n            bool operator==(const VisibleWidgetDef& other) const;\n        };\n\n    protected:\n        RearrangeType mRearrangeType = RearrangeType::Enabled; // Current available rearrange type @SERIALIZABLE\n        bool          mMultiSelectAvailable = true;            // Is multi selection available @SERIALIZABLE\n\n        Ref<TreeNode> mNodeWidgetSample; // Item sample @SERIALIZABLE\n\n        float mChildrenOffset = 10.0f; // Children nodes offset from parent @SERIALIZABLE\n\n        bool mIsNeedUpdateView = false;         // Is tree needs to be rebuild\n        bool mIsNeedUdateLayout = false;        // Is layout needs to rebuild\n        bool mIsNeedUpdateVisibleNodes = false; // In need to update visible nodes\n\n        Vector<Ref<Node>> mAllNodes; // All expanded nodes definitions\n\n        Vector<void*>     mSelectedObjects; // Selected objects\n        Vector<Ref<Node>> mSelectedNodes;   // Selected nodes definitions\n\n        Vector<Ref<TreeNode>> mNodeWidgetsBuf; // Nodes widgets buffer\n        Vector<Ref<Node>>     mNodesBuf;       // Nodes buffer\n\n        Vector<Ref<Node>> mVisibleNodes;           // Visible nodes\n        int               mMinVisibleNodeIdx = 0;  // Minimal visible node index\n        int               mMaxVisibleNodeIdx = -1; // Maximum visible node index\n\n        Vec2F mLastClickPos; // Last click position in scroll space (depends on scroll position)\n\n        WeakRef<TreeNode> mHoveredItem;      // Current hovered tree node item\n        Ref<Sprite>       mHoverDrawable;    // Selection sprite @SERIALIZABLE\n        Layout            mHoverLayout;      // Selection layout, result selection area depends on selected item @SERIALIZABLE                                                                     \n        RectF             mCurrentHoverRect; // Current selection rectangle (for smoothing)\n        RectF             mTargetHoverRect;  // Target selection rectangle (over selected item)    \n\n        bool          mIsDraggingNodes = false; // Is nodes moving by cursor\n        Ref<TreeNode> mFakeDragNode;            // Dragging node\n        Vec2F         mDragOffset;              // Offset from cursor to dragging node's center\n        Ref<TreeNode> mInsertNodeCandidate;     // Insertion node candidate when dragging nodes\n        Vector<void*> mBeforeDragSelectedItems; // Before drag begin selection\n        bool          mDragEnded = false;       // Is dragging ended and it needs to call EndDragging\n\n        Vector<void*> mExpandedObjects; // Expanded objects\n\n        ExpandState mExpandingNodeState = ExpandState::None; // Expanding node state\n        int         mExpandingNodeIdx = -1;                  // Current expanding node index. -1 if no expanding node\n        int         mExpandingNodeChildsCount = 0;           // Current expanding node children count\n        float       mExpandingNodePosition = 0.0f;           // Current expanding node position in this local coordinates\n        float       mExpandingNodeBottomPosition = 0.0f;     // Current expanding node position of bottom\n        float       mExpandingNodeCurrCoef = 0.0f;           // Current expanding node coefficient of expanding\n        float       mExpandingNodeCurrHeight = 0.0f;         // Current expanding node current height\n        float       mExpandingNodeTargetHeight = 0.0f;       // Current expanding node target height\n        float       mExpandNodeTime = 0.4f;                  // Node expanding time\n        Curve       mExpandingNodeFunc = Curve::EaseInOut(); // Expanding easing node curve\n\n        Ref<TreeNode> mExpandNodeCandidate;      // Expand node candidate when dragging\n        float         mExpandInsertTime = -1.0f; // Remaining time to expanding item under cursor when dragging nodes\n        float         mPressedTime = 10.0f;      // Time from last item pressing\n\n        float mNodeExpandTime = 2.0f;   // Node expand time when dragging actors @SERIALIZABLE\n        float mNodeDragIntoZone = 0.3f; // Node inside dragging zone coefficient (0.5 is full node area) @SERIALIZABLE\n\n        Ref<AnimationClip>   mHighlighClip;                             // Node highlight animation clip @SERIALIZABLE \n        Ref<AnimationPlayer> mHighlightAnim = mmake<AnimationPlayer>(); // Node highlight animation\n        Ref<Sprite>          mHighlightSprite;                          // Node highlight sprite @SERIALIZABLE\n        Layout               mHighlightLayout;                          // Node highlight sprite layout @SERIALIZABLE\n        WeakRef<Node>        mHighlighNode = nullptr;                   // Hightlighing node\n        void*                mHighlightObject;                          // Highlight object\n        \n        Ref<Sprite> mZebraBackLine; // Dark zebra line sprite. When it is null, no zebra back doesn't draw @SERIALIZABLE\n\n        Vector<VisibleWidgetDef> mVisibleWidgetsCache; // Visible widgets cache\n\n    protected:\n        // Called when widget was selected\n        void OnFocused() override;\n\n        // Called when widget was deselected\n        void OnUnfocused() override;\n\n        // Draws zebra back with scroll offset\n        void DrawZebraBack();\n\n        // Returns object's parent\n        virtual void* GetObjectParent(void* object);\n\n        // Returns object's children\n        virtual Vector<void*> GetObjectChilds(void* object);\n\n        // Returns debugging string for object\n        virtual String GetObjectDebug(void* object);\n\n        // Sets nodeWidget data by object\n        virtual void FillNodeDataByObject(const Ref<TreeNode>& nodeWidget, void* object);\n\n        // Free node data\n        virtual void FreeNodeData(const Ref<TreeNode>& nodeWidget, void* object);\n\n        // Called when tree node was double clicked\n        virtual void OnNodeDblClick(const Ref<TreeNode>& nodeWidget);\n\n        // Called when tree node was clicked by right button\n        virtual void OnNodeRBClick(const Ref<TreeNode>& nodeWidget);\n\n        // Called when list of selected objects was changed\n        virtual void OnNodesSelectionChanged(Vector<void*> objects);\n\n        // Called when objects was dragged in new parent in position next of prevObject\n        virtual void OnDraggedObjects(Vector<void*> objects, void* newParent, void* prevObject);\n\n        // Called when node was expanded\n        virtual void OnNodeExpanded(void* object) {}\n\n        // Called when node was collapsed\n        virtual void OnNodeCollapsed(void* object) {}\n\n// ISelectableDragableObjectsGroup implementation\n\n        // Returns selected objects in group\n        Vector<Ref<SelectableDragableObject>> GetSelectedDragObjects() const override;\n\n        // Returns all objects in group \n        Vector<Ref<SelectableDragableObject>> GetAllObjects() const override;\n\n        // Selects object\n        void Select(const Ref<SelectableDragableObject>& object) override;\n\n        // Selects object\n        void Select(const Ref<SelectableDragableObject>& object, bool sendOnSelectionChanged);\n\n        // Deselects object\n        void Deselect(const Ref<SelectableDragableObject>& object) override;\n\n        // Adds selectable object to group\n        void AddSelectableObject(const Ref<SelectableDragableObject>& object) override;\n\n        // Removes selectable object from group\n        void RemoveSelectableObject(SelectableDragableObject* object) override;\n\n        // Called when selectable draggable object was released\n        void OnSelectableObjectCursorReleased(const Ref<SelectableDragableObject>& object, const Input::Cursor& cursor) override;\n\n        // Called when selectable object was began to drag\n        void OnSelectableObjectBeganDragging(const Ref<SelectableDragableObject>& object) override;\n\n// -------------\n\n        // Checks multiple selection nodes (when Shift key is down) and returns is someone was selected\n        bool CheckMultipleSelection(const Vec2F& point);\n\n        // Called when items selected\n        void OnSelectionChanged();\n\n        // Updates highlight animation\n        void UpdateHighlighting(float dt);\n\n        // Checks and updates pressed node expanding\n        void UpdatePressedNodeExpand(float dt);\n\n        // Updates root nodes and their childs if need\n        virtual void UpdateNodesStructure();\n\n        // Inserts node to hierarchy\n        int InsertNodes(const Ref<Node>& parentNode, int position, Vector<Ref<Node>>* newNodes = nullptr);\n\n        // Removes node from hierarchy\n        void RemoveNodes(const Ref<Node>& parentNode);\n\n        // Creates node from object with parent\n        Ref<Node> CreateNode(void* object, const Ref<Node>& parent);\n\n        // Updates visible nodes (calculates range and initializes nodes)\n        virtual void UpdateVisibleNodes();\n\n        // Creates UITreeNode for visible node at position i\n        void CreateVisibleNodeWidget(const Ref<Node>& node, int i);\n\n        // Updates node view\n        void UpdateNodeView(const Ref<Node>& node, const Ref<TreeNode>& widget, int idx);\n\n        // Updates node widget layout\n        void UpdateNodeWidgetLayout(const Ref<Node>& node, int idx);\n\n        // Returns node index from mAllNodes by position in local coordinates\n        int GetNodeIndex(float position) const;\n\n        // Returns node position in local coordinates by index in mAllNodes array\n        float GetNodePosition(int idx) const;\n\n        // Expands node: creates his children and sets expanded state\n        void ExpandNode(const Ref<Node>& node);\n\n        // Collapses node: removes children from hierarchy and widgets if they're visible\n        void CollapseNode(const Ref<Node>& node);\n\n        // Starts expanding or collapse animation of node\n        void StartExpandingAnimation(ExpandState direction, const Ref<Node>& node, int childrenCount);\n\n        // Updates node expanding\n        void UpdateNodeExpanding(float dt);\n\n        // Calculates scroll area\n        void CalculateScrollArea() override;\n\n        // Moves scroll position and updates children widgets clipping and layout\n        void MoveScrollPosition(const Vec2F& delta) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorMoved(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time)\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        // Updates hover target rect and visibility\n        void UpdateHover(const Ref<TreeNode>& itemUnderCursor);\n\n        // Gets tree node from pool or creates new\n        virtual Ref<TreeNode> CreateTreeNodeWidget();\n\n// DragDropArea implementation\n\n        // Begins dragging selected items\n        void BeginDragging(const Ref<TreeNode>& node);\n\n        // Ends dragging items\n        void EndDragging(bool droppedToThis = false);\n\n        // Updates dragging graphics\n        void UpdateDraggingGraphics();\n\n        // Updates insert states on nodes when dragging\n        void UpdateDraggingInsertion();\n\n        // Updates insertion animation when dragging\n        void UpdateDraggingInsertionAnim(float dt);\n\n        // Called when some drag listeners was entered to this area\n        void OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was dragged above this area\n        void OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some drag listeners was exited from this area\n        void OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Called when some selectable listeners was dropped to this\n        void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group) override;\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class TreeNode;\n    };\n\n    // ------------\n    // UI Tree node\n    // ------------\n    class TreeNode: public Widget, public SelectableDragableObject\n    {\n    public:\n        // Default constructor\n        explicit TreeNode(RefCounter* refCounter);\n\n        // Copy-constructor\n        TreeNode(RefCounter* refCounter, const TreeNode& other);\n\n        // Destructor\n        ~TreeNode();\n\n        // Copy-operator\n        TreeNode& operator=(const TreeNode& other);\n\n        // Sets expanding\n        void SetExpanded(bool expanded, bool forcible = false);\n\n        // Is node expanded\n        bool IsExpanded() const;\n\n        // Expands node\n        void Expand(bool forcible = false);\n\n        // Collapses node\n        void Collapse(bool forcible = false);\n\n        // Returns object pointer\n        void* GetObject() const;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Sets selected state\n        void SetSelectedState(bool state);\n\n        // Sets focused state\n        void SetFocusedState(bool state);\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(TreeNode);\n        CLONEABLE_REF(TreeNode);\n\n    protected:\n        WeakRef<Tree::Node> mNodeDef;   // Node definition\n\n        WeakRef<Tree> mOwnerTree; // Owner tree\n        Ref<Button>   mExpandBtn; // Node expanding button\n\n        Ref<WidgetState> mSelectedState; // Selected state cached\n\n    protected:\n        // Called when widget state was added, caches selected state\n        void OnStateAdded(const Ref<WidgetState>& state) override;\n\n        // Updates expanding\n        void UpdateTreeLayout(float dt);\n\n        // Called when cursor double clicked\n        void OnCursorDblClicked(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object, moving hover of tree to this\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object, moving hover of tree to this\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when started dragging\n        void OnDragStart(const Input::Cursor& cursor) override;\n\n        // Called when dragged\n        void OnDragged(const Input::Cursor& cursor, const Ref<DragDropArea>& area) override;\n\n        // Called when dragging completed\n        void OnDragEnd(const Input::Cursor& cursor) override;\n\n        // Called when this was selected\n        void OnSelected() override;\n\n        // Called when this was unselected\n        void OnDeselected() override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class Tree;\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::Tree::RearrangeType);\n\nPRE_ENUM_META(o2::Tree::ExpandState);\n\nCLASS_BASES_META(o2::Tree)\n{\n    BASE_CLASS(o2::ScrollArea);\n    BASE_CLASS(o2::DragDropArea);\n    BASE_CLASS(o2::ISelectableDragableObjectsGroup);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Tree)\n{\n    FIELD().PUBLIC().NAME(getObjectParentDelegate);\n    FIELD().PUBLIC().NAME(getObjectChildrenDelegate);\n    FIELD().PUBLIC().NAME(fillNodeDataByObjectDelegate);\n    FIELD().PUBLIC().NAME(freeNodeDataDelegate);\n    FIELD().PUBLIC().NAME(getDebugForObject);\n    FIELD().PUBLIC().NAME(onNodeDoubleClicked);\n    FIELD().PUBLIC().NAME(onNodeRightButtonClicked);\n    FIELD().PUBLIC().NAME(onObjectsSelectionChanged);\n    FIELD().PUBLIC().NAME(onDraggedObjects);\n    FIELD().PUBLIC().NAME(onNodeExpanded);\n    FIELD().PUBLIC().NAME(onNodeCollapsed);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(RearrangeType::Enabled).NAME(mRearrangeType);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mMultiSelectAvailable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mNodeWidgetSample);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(10.0f).NAME(mChildrenOffset);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsNeedUpdateView);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsNeedUdateLayout);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsNeedUpdateVisibleNodes);\n    FIELD().PROTECTED().NAME(mAllNodes);\n    FIELD().PROTECTED().NAME(mSelectedObjects);\n    FIELD().PROTECTED().NAME(mSelectedNodes);\n    FIELD().PROTECTED().NAME(mNodeWidgetsBuf);\n    FIELD().PROTECTED().NAME(mNodesBuf);\n    FIELD().PROTECTED().NAME(mVisibleNodes);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mMinVisibleNodeIdx);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1).NAME(mMaxVisibleNodeIdx);\n    FIELD().PROTECTED().NAME(mLastClickPos);\n    FIELD().PROTECTED().NAME(mHoveredItem);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHoverDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHoverLayout);\n    FIELD().PROTECTED().NAME(mCurrentHoverRect);\n    FIELD().PROTECTED().NAME(mTargetHoverRect);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsDraggingNodes);\n    FIELD().PROTECTED().NAME(mFakeDragNode);\n    FIELD().PROTECTED().NAME(mDragOffset);\n    FIELD().PROTECTED().NAME(mInsertNodeCandidate);\n    FIELD().PROTECTED().NAME(mBeforeDragSelectedItems);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mDragEnded);\n    FIELD().PROTECTED().NAME(mExpandedObjects);\n    FIELD().PROTECTED().DEFAULT_VALUE(ExpandState::None).NAME(mExpandingNodeState);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1).NAME(mExpandingNodeIdx);\n    FIELD().PROTECTED().DEFAULT_VALUE(0).NAME(mExpandingNodeChildsCount);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mExpandingNodePosition);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mExpandingNodeBottomPosition);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mExpandingNodeCurrCoef);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mExpandingNodeCurrHeight);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mExpandingNodeTargetHeight);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.4f).NAME(mExpandNodeTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(Curve::EaseInOut()).NAME(mExpandingNodeFunc);\n    FIELD().PROTECTED().NAME(mExpandNodeCandidate);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1.0f).NAME(mExpandInsertTime);\n    FIELD().PROTECTED().DEFAULT_VALUE(10.0f).NAME(mPressedTime);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(2.0f).NAME(mNodeExpandTime);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.3f).NAME(mNodeDragIntoZone);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHighlighClip);\n    FIELD().PROTECTED().DEFAULT_VALUE(mmake<AnimationPlayer>()).NAME(mHighlightAnim);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHighlightSprite);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHighlightLayout);\n    FIELD().PROTECTED().DEFAULT_VALUE(nullptr).NAME(mHighlighNode);\n    FIELD().PROTECTED().NAME(mHighlightObject);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mZebraBackLine);\n    FIELD().PROTECTED().NAME(mVisibleWidgetsCache);\n}\nEND_META;\nCLASS_METHODS_META(o2::Tree)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Tree&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Tree&);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnObjectCreated, void*, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnObjectRemoved, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnObjectsChanged, const Vector<void*>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateChildren, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateChildrenTransforms);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateNodesView, bool);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<TreeNode>, GetNode, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, ExpandAll);\n    FUNCTION().PUBLIC().SIGNATURE(void, CollapseAll);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<void*>, GetSelectedObjects);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedObjects, const Vector<void*>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectObject, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, SelectAndHighlightObject, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeselectObject, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeselectAllObjects);\n    FUNCTION().PUBLIC().SIGNATURE(void, ScrollTo, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, ScrollToAndHighlight, void*);\n    FUNCTION().PUBLIC().SIGNATURE(void, ExpandParentObjects, void*);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<TreeNode>, GetTreeNodeUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRearrangeType, RearrangeType);\n    FUNCTION().PUBLIC().SIGNATURE(RearrangeType, GetRearrangeType);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMultipleSelectionAvailable, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsMultiSelectionAvailable);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<TreeNode>&, GetNodeSample);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetNodeSample, const Ref<TreeNode>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetHoverDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHoverLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetHighlightDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHighlightAnimation, const Ref<AnimationClip>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHighlightLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetZebraBackLine, const Ref<Sprite>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<Sprite>&, GetZebraBackLine);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetNodeExpandTimer, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetNodeExpandTimer);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetChildsNodesOffset, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetChildsNodesOffset);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFocusable);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsInputTransparent);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnUnfocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawZebraBack);\n    FUNCTION().PROTECTED().SIGNATURE(void*, GetObjectParent, void*);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<void*>, GetObjectChilds, void*);\n    FUNCTION().PROTECTED().SIGNATURE(String, GetObjectDebug, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, FillNodeDataByObject, const Ref<TreeNode>&, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, FreeNodeData, const Ref<TreeNode>&, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodeDblClick, const Ref<TreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodeRBClick, const Ref<TreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodesSelectionChanged, Vector<void*>);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraggedObjects, Vector<void*>, void*, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodeExpanded, void*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnNodeCollapsed, void*);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Ref<SelectableDragableObject>>, GetSelectedDragObjects);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Ref<SelectableDragableObject>>, GetAllObjects);\n    FUNCTION().PROTECTED().SIGNATURE(void, Select, const Ref<SelectableDragableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, Select, const Ref<SelectableDragableObject>&, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, Deselect, const Ref<SelectableDragableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, AddSelectableObject, const Ref<SelectableDragableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveSelectableObject, SelectableDragableObject*);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectableObjectCursorReleased, const Ref<SelectableDragableObject>&, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectableObjectBeganDragging, const Ref<SelectableDragableObject>&);\n    FUNCTION().PROTECTED().SIGNATURE(bool, CheckMultipleSelection, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelectionChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHighlighting, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdatePressedNodeExpand, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateNodesStructure);\n    FUNCTION().PROTECTED().SIGNATURE(int, InsertNodes, const Ref<Node>&, int, Vector<Ref<Node>>*);\n    FUNCTION().PROTECTED().SIGNATURE(void, RemoveNodes, const Ref<Node>&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<Node>, CreateNode, void*, const Ref<Node>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateVisibleNodes);\n    FUNCTION().PROTECTED().SIGNATURE(void, CreateVisibleNodeWidget, const Ref<Node>&, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateNodeView, const Ref<Node>&, const Ref<TreeNode>&, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateNodeWidgetLayout, const Ref<Node>&, int);\n    FUNCTION().PROTECTED().SIGNATURE(int, GetNodeIndex, float);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetNodePosition, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, ExpandNode, const Ref<Node>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, CollapseNode, const Ref<Node>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, StartExpandingAnimation, ExpandState, const Ref<Node>&, int);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateNodeExpanding, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, CalculateScrollArea);\n    FUNCTION().PROTECTED().SIGNATURE(void, MoveScrollPosition, const Vec2F&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorMoved, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateHover, const Ref<TreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(Ref<TreeNode>, CreateTreeNodeWidget);\n    FUNCTION().PROTECTED().SIGNATURE(void, BeginDragging, const Ref<TreeNode>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, EndDragging, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateDraggingGraphics);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateDraggingInsertion);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateDraggingInsertionAnim, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnter, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDraggedAbove, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragExit, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDropped, const Ref<ISelectableDragableObjectsGroup>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n}\nEND_META;\n\nCLASS_BASES_META(o2::TreeNode)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::SelectableDragableObject);\n}\nEND_META;\nCLASS_FIELDS_META(o2::TreeNode)\n{\n    FIELD().PROTECTED().NAME(mNodeDef);\n    FIELD().PROTECTED().NAME(mOwnerTree);\n    FIELD().PROTECTED().NAME(mExpandBtn);\n    FIELD().PROTECTED().NAME(mSelectedState);\n}\nEND_META;\nCLASS_METHODS_META(o2::TreeNode)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const TreeNode&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetExpanded, bool, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsExpanded);\n    FUNCTION().PUBLIC().SIGNATURE(void, Expand, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, Collapse, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void*, GetObject);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedState, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFocusedState, bool);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateAdded, const Ref<WidgetState>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTreeLayout, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorDblClicked, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragStart, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragged, const Input::Cursor&, const Ref<DragDropArea>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDragEnd, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelected);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeselected);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/VerticalLayout.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"VerticalLayout.h\"\n\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n\nnamespace o2\n{\n    VerticalLayout::VerticalLayout(RefCounter* refCounter):\n        Widget(refCounter)\n    {\n        SetLayoutDirty();\n    }\n\n    VerticalLayout::VerticalLayout(RefCounter* refCounter, const VerticalLayout& other):\n        Widget(refCounter, other), mBaseCorner(other.mBaseCorner), mSpacing(other.mSpacing), mBorder(other.mBorder), mExpandWidth(other.mExpandWidth),\n        mExpandHeight(other.mExpandHeight), mFitByChildren(other.mFitByChildren)\n    {\n        for (auto& child : mChildWidgets)\n            child->GetLayoutData().drivenByParent = true;\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    VerticalLayout::~VerticalLayout()\n    {\n        mFitByChildren = false;\n    }\n\n    VerticalLayout& VerticalLayout::operator=(const VerticalLayout& other)\n    {\n        mBaseCorner = other.mBaseCorner;\n        mSpacing = other.mSpacing;\n        mBorder = other.mBorder;\n        mExpandWidth = other.mExpandWidth;\n        mExpandHeight = other.mExpandHeight;\n        mFitByChildren = other.mFitByChildren;\n\n        Widget::operator=(other);\n\n        for (auto& child : mChildWidgets)\n            child->GetLayoutData().drivenByParent = true;\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void VerticalLayout::SetBaseCorner(BaseCorner baseCorner)\n    {\n        mBaseCorner = baseCorner;\n        layout->SetDirty();\n    }\n\n    BaseCorner VerticalLayout::GetBaseCorner() const\n    {\n        return mBaseCorner;\n    }\n\n    void VerticalLayout::SetSpacing(float spacing)\n    {\n        mSpacing = spacing;\n        layout->SetDirty();\n    }\n\n    float VerticalLayout::GetSpacing() const\n    {\n        return mSpacing;\n    }\n\n    void VerticalLayout::SetBorder(const BorderF& border)\n    {\n        mBorder = border;\n        layout->SetDirty();\n    }\n\n    BorderF VerticalLayout::GetBorder() const\n    {\n        return mBorder;\n    }\n\n    void VerticalLayout::SetBorderLeft(float value)\n    {\n        mBorder.left = value;\n        layout->SetDirty();\n    }\n\n    float VerticalLayout::GetBorderLeft() const\n    {\n        return mBorder.left;\n    }\n\n    void VerticalLayout::SetBorderRight(float value)\n    {\n        mBorder.right = value;\n        layout->SetDirty();\n    }\n\n    float VerticalLayout::GetBorderRight() const\n    {\n        return mBorder.right;\n    }\n\n    void VerticalLayout::SetBorderTop(float value)\n    {\n        mBorder.top = value;\n        layout->SetDirty();\n    }\n\n    float VerticalLayout::GetBorderTop() const\n    {\n        return mBorder.top;\n    }\n\n    void VerticalLayout::SetBorderBottom(float value)\n    {\n        mBorder.bottom = value;\n        layout->SetDirty();\n    }\n\n    float VerticalLayout::GetBorderBottom() const\n    {\n        return mBorder.bottom;\n    }\n\n    void VerticalLayout::SetWidthExpand(bool expand)\n    {\n        mExpandWidth = expand;\n        layout->SetDirty();\n    }\n\n    bool VerticalLayout::IsWidthExpand() const\n    {\n        return mExpandWidth;\n    }\n\n    void VerticalLayout::SetHeightExpand(bool expand)\n    {\n        mExpandHeight = expand;\n        layout->SetDirty();\n    }\n\n    bool VerticalLayout::IsHeightExpand() const\n    {\n        return mExpandHeight;\n    }\n\n    void VerticalLayout::SetFitByChildren(bool fit)\n    {\n        mFitByChildren = fit;\n        layout->SetDirty();\n    }\n\n    bool VerticalLayout::IsFittingByChildren() const\n    {\n        return mFitByChildren;\n    }\n\n    void VerticalLayout::UpdateSelfTransform()\n{\n        UpdateLayoutParametres();\n\n        if (mFitByChildren)\n            ExpandSizeByChilds();\n\n        Widget::UpdateSelfTransform();\n\n        RearrangeChilds();\n    }\n\n    String VerticalLayout::GetCreateMenuGroup()\n    {\n        return \"Layout\";\n    }\n\n    float VerticalLayout::GetMinWidthWithChildren() const\n    {\n        if (!mFitByChildren)\n            return Widget::GetMinWidthWithChildren();\n\n        float res = 0;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n                res = Math::Max(res, child->GetMinWidthWithChildren() + mBorder.left + mBorder.right);\n        }\n\n        res = Math::Max(res, GetLayoutData().minSize.x);\n\n        return res;\n    }\n\n    float VerticalLayout::GetMinHeightWithChildren() const\n    {\n        if (!mFitByChildren)\n            return Widget::GetMinHeightWithChildren();\n\n        float res = mBorder.top + mBorder.bottom + Math::Max(mChildWidgets.Count() - 1, 0)*mSpacing;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n                res += child->GetMinHeightWithChildren();\n        }\n\n        res = Math::Max(res, GetLayoutData().minSize.y);\n\n        return res;\n    }\n\n    float VerticalLayout::GetHeightWeightWithChildren() const\n    {\n        float res = 0;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n                res += child->GetHeightWeightWithChildren();\n        }\n\n        return res;\n    }\n\n    void VerticalLayout::OnChildAdded(const Ref<Widget>& child)\n    {\n        child->GetLayoutData().drivenByParent = true;\n    }\n\n    void VerticalLayout::OnChildRemoved(const Ref<Widget>& child)\n    {\n        child->GetLayoutData().drivenByParent = false;\n    }\n\n    void VerticalLayout::RearrangeChilds()\n    {\n        switch (mBaseCorner)\n        {\n            case BaseCorner::LeftTop:\n            case BaseCorner::Top:\n            case BaseCorner::RightTop:\n            ArrangeFromTopToBottom();\n            break;\n\n            case BaseCorner::Left:\n            case BaseCorner::Center:\n            case BaseCorner::Right:\n            ArrangeFromCenter();\n            break;\n\n            case BaseCorner::LeftBottom:\n            case BaseCorner::Bottom:\n            case BaseCorner::RightBottom:\n            ArrangeFromBottomToTop();\n            break;\n        }\n\n    }\n\n    void VerticalLayout::UpdateLayoutParametres()\n    {\n        GetLayoutData().weight.y = 0;\n        for (auto& child : mChildWidgets)\n        {\n            if (child->mResEnabledInHierarchy)\n                GetLayoutData().weight.y += child->GetHeightWeightWithChildren();\n        }\n\n        if (GetLayoutData().weight.y < FLT_EPSILON)\n            GetLayoutData().weight.y = 1.0f;\n\n        layout->EnableSizeChecks();\n    }\n\n    void VerticalLayout::ArrangeFromCenter()\n    {\n        if (mExpandHeight)\n        {\n            float availableHeight = GetChildrenWorldRect().Height() - mBorder.bottom - mBorder.top;\n            float totalHeight = availableHeight;\n            float position = -totalHeight*0.5f;\n            auto widgets = mChildWidgets;\n            auto heights = CalculateExpandedSize(widgets, false, GetChildrenWorldRect().Height() - mBorder.top - mBorder.bottom,\n                                                 mSpacing);\n\n            int i = 0;\n            for (auto& child : widgets)\n            {\n                child->GetLayoutData().offsetMin.y = position;\n                position += heights[i++];\n\n                child->GetLayoutData().offsetMax.y = position;\n                position += mSpacing;\n\n                AlignWidgetByWidth(child, 0.5f);\n            }\n        }\n        else\n        {\n            float totalHeight = mChildWidgets.Sum<float>([&](auto& child) { return child->GetMinHeightWithChildren(); });\n            totalHeight += (mChildWidgets.Count() - 1)*mSpacing;\n            float position = -totalHeight*0.5f;\n            for (auto& child : mChildWidgets)\n            {\n                if (!child->mResEnabledInHierarchy)\n                    continue;\n\n                child->GetLayoutData().offsetMin.y = position;\n                position += Math::Abs(Math::Max(child->GetLayoutData().minSize.y, child->GetMinHeightWithChildren()));\n\n                child->GetLayoutData().offsetMax.y = position;\n                position += mSpacing;\n\n                AlignWidgetByWidth(child, 0.5f);\n            }\n        }\n    }\n\n    void VerticalLayout::ArrangeFromBottomToTop()\n    {\n        if (mExpandHeight)\n        {\n            float position = mBorder.bottom;\n            auto widgets = mChildWidgets;\n            auto heights = CalculateExpandedSize(widgets, false, GetChildrenWorldRect().Height() - mBorder.top - mBorder.bottom,\n                                                 mSpacing);\n\n            int i = 0;\n            for (auto& child : widgets)\n            {\n                if (!child->mResEnabledInHierarchy)\n                    continue;\n\n                child->GetLayoutData().offsetMin.y = position;\n                position += heights[i++];\n\n                child->GetLayoutData().offsetMax.y = position;\n                position += mSpacing;\n\n                AlignWidgetByWidth(child, 0.0f);\n            }\n        }\n        else\n        {\n            float position = mBorder.bottom;\n            for (auto& child : mChildWidgets)\n            {\n                if (!child->mResEnabledInHierarchy)\n                    continue;\n\n                child->GetLayoutData().offsetMin.y = position;\n                position += Math::Abs(Math::Max(child->GetLayoutData().minSize.y, child->GetMinHeightWithChildren()));\n\n                child->GetLayoutData().offsetMax.y = position;\n                position += mSpacing;\n\n                AlignWidgetByWidth(child, 0.0f);\n            }\n        }\n    }\n\n    void VerticalLayout::ArrangeFromTopToBottom()\n    {\n        if (mExpandHeight)\n        {\n            float position = mBorder.top;\n            auto widgets = mChildWidgets;\n            auto heights = CalculateExpandedSize(widgets, false, GetChildrenWorldRect().Height() - mBorder.top - mBorder.bottom,\n                                                 mSpacing);\n\n            int i = 0;\n            for (auto& child : widgets)\n            {\n                if (!child->mResEnabledInHierarchy)\n                    continue;\n\n                child->GetLayoutData().offsetMax.y = -position;\n                position += heights[i++];\n\n                child->GetLayoutData().offsetMin.y = -position;\n                position += mSpacing;\n\n                AlignWidgetByWidth(child, 1.0f);\n            }\n        }\n        else\n        {\n            float position = mBorder.top;\n            for (auto& child : mChildWidgets)\n            {\n                if (!child->mResEnabledInHierarchy)\n                    continue;\n\n                child->GetLayoutData().offsetMax.y = -position;\n                position += Math::Abs(Math::Max(child->GetLayoutData().minSize.y, child->GetMinHeightWithChildren()));\n\n                child->GetLayoutData().offsetMin.y = -position;\n                position += mSpacing;\n\n                AlignWidgetByWidth(child, 1.0f);\n            }\n        }\n    }\n\n    void VerticalLayout::AlignWidgetByWidth(const Ref<Widget>& child, float heightAnchor)\n    {\n        if (mExpandWidth)\n        {\n            child->GetLayoutData().anchorMin = Vec2F(0, heightAnchor);\n            child->GetLayoutData().anchorMax = Vec2F(1, heightAnchor);\n            child->GetLayoutData().offsetMin.x = mBorder.left;\n            child->GetLayoutData().offsetMax.x = -mBorder.right;\n        }\n        else\n        {\n            float width = child->layout->GetWidth();\n            if (mBaseCorner == BaseCorner::LeftBottom || mBaseCorner == BaseCorner::Left || mBaseCorner == BaseCorner::LeftTop)\n            {\n                child->GetLayoutData().anchorMin = Vec2F(0, heightAnchor);\n                child->GetLayoutData().anchorMax = Vec2F(0, heightAnchor);\n                child->GetLayoutData().offsetMin.x = mBorder.left;\n                child->GetLayoutData().offsetMax.x = mBorder.left + width;\n            }\n            if (mBaseCorner == BaseCorner::Bottom || mBaseCorner == BaseCorner::Center || mBaseCorner == BaseCorner::Top)\n            {\n                child->GetLayoutData().anchorMin = Vec2F(0.5f, heightAnchor);\n                child->GetLayoutData().anchorMax = Vec2F(0.5f, heightAnchor);\n                child->GetLayoutData().offsetMin.x = -width*0.5f;\n                child->GetLayoutData().offsetMax.x = width*0.5f;\n            }\n            if (mBaseCorner == BaseCorner::RightBottom || mBaseCorner == BaseCorner::Right || mBaseCorner == BaseCorner::RightTop)\n            {\n                child->GetLayoutData().anchorMin = Vec2F(1, heightAnchor);\n                child->GetLayoutData().anchorMax = Vec2F(1, heightAnchor);\n                child->GetLayoutData().offsetMin.x = -mBorder.right - width;\n                child->GetLayoutData().offsetMax.x = -mBorder.right;\n            }\n        }\n    }\n\n    void VerticalLayout::ExpandSizeByChilds()\n    {\n        const static Vec2F relativePivots[] ={\n            Vec2F(0.0f, 0.5f), // Left\n            Vec2F(1.0f, 0.5f), // Right\n            Vec2F(0.5f, 1.0f), // Top\n            Vec2F(0.5f, 0.0f), // Bottom\n            Vec2F(0.5f, 0.5f), // Center\n            Vec2F(0.0f, 0.0f), // LeftBottom\n            Vec2F(0.0f, 1.0f), // LeftTop\n            Vec2F(1.0f, 0.0f), // RightBottom\n            Vec2F(1.0f, 1.0f)  // RightTop\n        };\n\n        Vec2F relativePivot = relativePivots[(int)mBaseCorner];\n        Vec2F size(GetMinWidthWithChildren(), GetMinHeightWithChildren());\n\n        Vec2F parentSize = mParentWidget ? mParentWidget.Lock()->GetChildrenWorldRect().Size() : Vec2F();\n        Vec2F szDelta = size - (GetLayoutData().offsetMax - GetLayoutData().offsetMin + (GetLayoutData().anchorMax - GetLayoutData().anchorMin)*parentSize);\n\n        if (mExpandWidth)\n            szDelta.x = 0;\n\n        if (mExpandHeight)\n            szDelta.y = 0;\n\n        GetLayoutData().offsetMax += szDelta*(Vec2F::One() - relativePivot);\n        GetLayoutData().offsetMin -= szDelta*relativePivot;\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::VerticalLayout>);\n// --- META ---\n\nDECLARE_CLASS(o2::VerticalLayout, o2__VerticalLayout);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/VerticalLayout.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n\nnamespace o2\n{\n    // ----------------------\n    // Vertical layout widget\n    // ----------------------\n    class VerticalLayout: public Widget\n    {\n    public:\n        PROPERTIES(VerticalLayout);\n        PROPERTY(BaseCorner, baseCorner, SetBaseCorner, GetBaseCorner); // Base corder property\n\n        PROPERTY(float, spacing, SetSpacing, GetSpacing); // Space between widgets property\n\n        PROPERTY(BorderF, border, SetBorder, GetBorder);                 // Border property\n        PROPERTY(float, borderLeft, SetBorderLeft, GetBorderLeft);       // Left border property\n        PROPERTY(float, borderRight, SetBorderRight, GetBorderRight);    // Right border property\n        PROPERTY(float, borderTop, SetBorderTop, GetBorderTop);          // Top border property\n        PROPERTY(float, borderBottom, SetBorderBottom, GetBorderBottom); // Bottom border property\n\n        PROPERTY(bool, expandWidth, SetWidthExpand, IsWidthExpand);    // Expand children by width property\n        PROPERTY(bool, expandHeight, SetHeightExpand, IsHeightExpand); // Expand children by height property\n\n        PROPERTY(bool, fitByChildren, SetFitByChildren, IsFittingByChildren); // Fitting size by children property\n\n    public:        \n        // Default constructor\n        explicit VerticalLayout(RefCounter* refCounter);\n\n        // Copy-constructor\n        VerticalLayout(RefCounter* refCounter, const VerticalLayout& other);\n\n        // Destructor\n        ~VerticalLayout();\n\n        // Copy operator\n        VerticalLayout& operator=(const VerticalLayout& other);\n\n        // Sets base corner\n        void SetBaseCorner(BaseCorner baseCorner);\n\n        // Returns base corner\n        BaseCorner GetBaseCorner() const;\n\n        // Sets space between widgets\n        void SetSpacing(float spacing);\n\n        // Returns space between widgets\n        float GetSpacing() const;\n\n        // Sets border\n        void SetBorder(const BorderF& border);\n\n        // Returns border\n        BorderF GetBorder() const;\n\n        // Sets left border\n        void SetBorderLeft(float value);\n\n        // Returns left border\n        float GetBorderLeft() const;\n\n        // Sets right border\n        void SetBorderRight(float value);\n\n        // Returns right border\n        float GetBorderRight() const;\n\n        // Sets top border\n        void SetBorderTop(float value);\n\n        // Returns top border\n        float GetBorderTop() const;\n\n        // Sets bottom border\n        void SetBorderBottom(float value);\n\n        // Returns bottom border\n        float GetBorderBottom() const;\n\n        // Sets expanding by width\n        void SetWidthExpand(bool expand);\n\n        // Returns expanding by width\n        bool IsWidthExpand() const;\n\n        // Sets expanding by height\n        void SetHeightExpand(bool expand);\n\n        // Returns height expand\n        bool IsHeightExpand() const;\n\n        // Sets fitting size by children\n        void SetFitByChildren(bool fit);\n\n        // Returns fitting by children\n        bool IsFittingByChildren() const;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(VerticalLayout);\n        CLONEABLE_REF(VerticalLayout);\n\n    protected:\n        BaseCorner mBaseCorner = BaseCorner::Top;  // Base corner of widgets arranging @SERIALIZABLE\n        float      mSpacing = 0.0f;                // Space between widgets @SERIALIZABLE\n        BorderF    mBorder;                        // Border @SERIALIZABLE\n        bool       mExpandWidth = true;            // Expanding by width @SERIALIZABLE\n        bool       mExpandHeight = true;           // Expanding by height @SERIALIZABLE\n        bool       mFitByChildren = false;         // Fitting by children @SERIALIZABLE\n\n    protected:\n        // Returns layout width with children\n        float GetMinWidthWithChildren() const override;\n\n        // Returns layout height\n        float GetMinHeightWithChildren() const override;\n\n        // Returns layout height weight with children\n        float GetHeightWeightWithChildren() const override;\n\n        // Called when child widget was added\n        void OnChildAdded(const Ref<Widget>& child) override;\n\n        // Called when child widget was removed\n        void OnChildRemoved(const Ref<Widget>& child) override;\n\n        // Invokes required function for childs arranging\n        virtual void RearrangeChilds();\n\n        // Arranging child from left to right by bottom, middle and top\n        void ArrangeFromTopToBottom();\n\n        // Arranging child from right to left by bottom, middle and top\n        void ArrangeFromBottomToTop();\n\n        // Arranging child from center by bottom, middle and top\n        void ArrangeFromCenter();\n\n        // Expands size by children\n        virtual void ExpandSizeByChilds();\n\n        // Aligns widget by height with base corner\n        void AlignWidgetByWidth(const Ref<Widget>& child, float heightAnchor);\n\n        // Updates layout's weight and minimal size\n        virtual void UpdateLayoutParametres();\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::VerticalLayout)\n{\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(o2::VerticalLayout)\n{\n    FIELD().PUBLIC().NAME(baseCorner);\n    FIELD().PUBLIC().NAME(spacing);\n    FIELD().PUBLIC().NAME(border);\n    FIELD().PUBLIC().NAME(borderLeft);\n    FIELD().PUBLIC().NAME(borderRight);\n    FIELD().PUBLIC().NAME(borderTop);\n    FIELD().PUBLIC().NAME(borderBottom);\n    FIELD().PUBLIC().NAME(expandWidth);\n    FIELD().PUBLIC().NAME(expandHeight);\n    FIELD().PUBLIC().NAME(fitByChildren);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(BaseCorner::Top).NAME(mBaseCorner);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mSpacing);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mBorder);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mExpandWidth);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(true).NAME(mExpandHeight);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(false).NAME(mFitByChildren);\n}\nEND_META;\nCLASS_METHODS_META(o2::VerticalLayout)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const VerticalLayout&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBaseCorner, BaseCorner);\n    FUNCTION().PUBLIC().SIGNATURE(BaseCorner, GetBaseCorner);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSpacing, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSpacing);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorder, const BorderF&);\n    FUNCTION().PUBLIC().SIGNATURE(BorderF, GetBorder);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderLeft, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderLeft);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderRight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderRight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderTop, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderTop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBorderBottom, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetBorderBottom);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWidthExpand, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsWidthExpand);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeightExpand, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsHeightExpand);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetFitByChildren, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFittingByChildren);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetMinWidthWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetMinHeightWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetHeightWeightWithChildren);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildAdded, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildRemoved, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, RearrangeChilds);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromTopToBottom);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromBottomToTop);\n    FUNCTION().PROTECTED().SIGNATURE(void, ArrangeFromCenter);\n    FUNCTION().PROTECTED().SIGNATURE(void, ExpandSizeByChilds);\n    FUNCTION().PROTECTED().SIGNATURE(void, AlignWidgetByWidth, const Ref<Widget>&, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayoutParametres);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/VerticalProgress.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"o2/Scene/UI/Widgets/VerticalProgress.h\"\n\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n\nnamespace o2\n{\n    VerticalProgress::VerticalProgress(RefCounter* refCounter):\n        Widget(refCounter), DrawableCursorEventsListener(this)\n    {}\n\n    VerticalProgress::VerticalProgress(RefCounter* refCounter, const VerticalProgress& other) :\n        Widget(refCounter, other), DrawableCursorEventsListener(this), mValue(other.mValue), mMinValue(other.mMinValue),\n        mMaxValue(other.mMaxValue), mOrientation(other.mOrientation), mScrollSense(other.mScrollSense)\n    {\n        mBarLayer = FindLayer(\"bar\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n    }\n\n    VerticalProgress::~VerticalProgress()\n    {}\n\n    VerticalProgress& VerticalProgress::operator=(const VerticalProgress& other)\n    {\n        Widget::operator=(other);\n\n        mValue = other.mValue;\n        mMinValue = other.mMinValue;\n        mMaxValue = other.mMaxValue;\n        mOrientation = other.mOrientation;\n        mScrollSense = other.mScrollSense;\n        mBarLayer = FindLayer(\"bar\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void VerticalProgress::Update(float dt)\n    {\n        Widget::Update(dt);\n\n        if (!mResEnabledInHierarchy || mIsClipped)\n            return;\n\n        const float threshold = 0.01f;\n        const float smoothCoef = 30.0f;\n\n        if (!Math::Equals(mValue, mSmoothValue, threshold))\n        {\n            mSmoothValue = Math::Clamp(Math::Lerp(mSmoothValue, mValue, dt*smoothCoef), mMinValue, mMaxValue);\n\n            if (Math::Abs(mValue - mSmoothValue) < threshold)\n                mSmoothValue = mValue;\n\n            UpdateProgressLayersLayouts();\n        }\n    }\n\n    void VerticalProgress::SetValue(float value, bool byUser /*= false*/)\n    {\n        mValue = Math::Clamp(value, mMinValue, mMaxValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(mValue);\n\n        if (byUser)\n            onChangeByUser(mValue);\n    }\n\n    void VerticalProgress::SetValueForcible(float value)\n    {\n        mValue = Math::Clamp(value, mMinValue, mMaxValue);\n        mSmoothValue = mValue;\n        UpdateProgressLayersLayouts();\n\n        onChange(mValue);\n    }\n\n    float VerticalProgress::GetValue() const\n    {\n        return mValue;\n    }\n\n    void VerticalProgress::SetMinValue(float minValue)\n    {\n        mMinValue = minValue;\n        mValue = Math::Max(mMinValue, mValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(mValue);\n    }\n\n    float VerticalProgress::GetMinValue() const\n    {\n        return mMinValue;\n    }\n\n    void VerticalProgress::SetMaxValue(float maxValue)\n    {\n        mMaxValue = maxValue;\n        mValue = Math::Min(mMaxValue, mValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    float VerticalProgress::GetMaxValue() const\n    {\n        return mMaxValue;\n    }\n\n    void VerticalProgress::SetValueRange(float minValue, float maxValue)\n    {\n        mMaxValue = maxValue;\n        mValue = Math::Clamp(mValue, mMinValue, mMaxValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    void VerticalProgress::SetScrollSense(float coef)\n    {\n        mScrollSense = coef;\n    }\n\n    float VerticalProgress::GetScrollSense() const\n    {\n        return mScrollSense;\n    }\n\n    void VerticalProgress::SetOrientation(Orientation orientation)\n    {\n        mOrientation = orientation;\n        UpdateLayersLayouts();\n    }\n\n    VerticalProgress::Orientation VerticalProgress::GetOrientation() const\n    {\n        return mOrientation;\n    }\n\n    bool VerticalProgress::IsUnderPoint(const Vec2F& point)\n    {\n        if (mBackLayer)\n            return mDrawingScissorRect.IsInside(point) && mBackLayer->IsUnderPoint(point);\n\n        return false;\n    }\n\n    bool VerticalProgress::IsScrollable() const\n    {\n        return true;\n    }\n\n    void VerticalProgress::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = true;\n\n        GetValueFromCursor(cursor);\n    }\n\n    void VerticalProgress::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n    }\n\n    void VerticalProgress::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n    }\n\n    void VerticalProgress::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        GetValueFromCursor(cursor);\n    }\n\n    void VerticalProgress::GetValueFromCursor(const Input::Cursor &cursor)\n    {\n        float height = layout->height;\n        float d = mMaxValue - mMinValue;\n        if (mOrientation == VerticalProgress::Orientation::Up)\n\n            SetValue((cursor.position.y - layout->worldBottom)/height*d + mMinValue, true);\n        else\n            SetValue((height - (cursor.position.y - layout->worldBottom))/height*d + mMinValue, true);\n    }\n\n    void VerticalProgress::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = true;\n    }\n\n    void VerticalProgress::OnCursorExit(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = false;\n    }\n\n    void VerticalProgress::OnScrolled(float scroll)\n    {\n        SetValue(mValue + scroll*mScrollSense);\n    }\n\n    void VerticalProgress::OnDeserialized(const DataValue& node)\n    {\n        Widget::OnDeserialized(node);\n\n        mBarLayer = FindLayer(\"bar\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n    }\n\n    void VerticalProgress::OnEnabled()\n    {\n        Widget::OnEnabled();\n\n        interactable = true;\n    }\n\n    void VerticalProgress::OnDisabled()\n    {\n        Widget::OnDisabled();\n\n        interactable = false;\n    }\n\n    void VerticalProgress::UpdateLayersLayouts()\n    {\n        UpdateProgressLayersLayouts();\n    }\n\n    void VerticalProgress::UpdateProgressLayersLayouts()\n    {\n        if (mBarLayer)\n        {\n            mBarLayer->layout.offsetMin = Vec2F();\n            mBarLayer->layout.offsetMax = Vec2F();\n\n            if (mOrientation == Orientation::Down)\n            {\n                mBarLayer->layout.anchorMin = Vec2F(0, 1.0f - (mSmoothValue - mMinValue)/(mMaxValue - mMinValue));\n                mBarLayer->layout.anchorMax = Vec2F(1, 1);\n            }\n            else if (mOrientation == Orientation::Up)\n            {\n                mBarLayer->layout.anchorMin = Vec2F(0, 0);\n                mBarLayer->layout.anchorMax = Vec2F(1, (mSmoothValue - mMinValue)/(mMaxValue - mMinValue));\n            }\n        }\n\n        if (mBackLayer)\n            mBackLayer->layout = Layout::BothStretch();\n\n        Widget::UpdateLayersLayouts();\n    }\n\n    void VerticalProgress::OnLayerAdded(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->name == \"back\")\n            mBackLayer = layer;\n        else if (layer->name == \"bar\")\n            mBarLayer = layer;\n\n        UpdateProgressLayersLayouts();\n    }\n\n    String VerticalProgress::GetCreateMenuGroup()\n    {\n        return \"Progress\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::VerticalProgress>);\n// --- META ---\n\nENUM_META(o2::VerticalProgress::Orientation, o2__VerticalProgress__Orientation)\n{\n    ENUM_ENTRY(Down);\n    ENUM_ENTRY(Up);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::VerticalProgress, o2__VerticalProgress);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/VerticalProgress.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n\nnamespace o2\n{\n    // ---------------------\n    // Vertical progress bar\n    // ---------------------\n    class VerticalProgress: public Widget, public DrawableCursorEventsListener\n    {\n    public:\n        enum class Orientation { Down, Up };\n\n    public:\n        PROPERTIES(VerticalProgress);\n        PROPERTY(float, value, SetValue, GetValue); // Current value property\n\n        PROPERTY(float, minValue, SetMinValue, GetMinValue); // Minimal value property\n        PROPERTY(float, maxValue, SetMaxValue, GetMaxValue); // Maximal value property\n\n        PROPERTY(float, scrollSense, SetScrollSense, GetScrollSense); // Scroll sense coefficient\n\n    public:\n        Function<void(float)> onChange;      // On Value changed event\n        Function<void(float)> onChangeByUser; // On Value changed by user event\n\n    public:\n        // Constructor\n        explicit VerticalProgress(RefCounter* refCounter);\n\n        // Copy-constructor\n        VerticalProgress(RefCounter* refCounter, const VerticalProgress& other);\n\n        // Destructor\n        ~VerticalProgress();\n\n        // Copy-operator\n        VerticalProgress& operator=(const VerticalProgress& other);\n\n        // Updates widget and smooth value changing\n        void Update(float dt) override;\n\n        // Sets value\n        void SetValue(float value, bool byUser = false);\n\n        // Sets value forcible, without smoothing\n        void SetValueForcible(float value);\n\n        // Returns value\n        float GetValue() const;\n\n        // Sets minimal value\n        void SetMinValue(float minValue);\n\n        // Returns minimal value\n        float GetMinValue() const;\n\n        // Sets maximal value\n        void SetMaxValue(float maxValue);\n\n        // Returns maximal value\n        float GetMaxValue() const;\n\n        // Sets value range\n        void SetValueRange(float minValue, float maxValue);\n\n        // Sets scroll sense\n        void SetScrollSense(float coef);\n\n        // Returns scroll sense\n        float GetScrollSense() const;\n\n        // Sets bar orientation\n        void SetOrientation(Orientation orientation);\n\n        // Returns bar orientation\n        Orientation GetOrientation() const;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(VerticalProgress);\n        CLONEABLE_REF(VerticalProgress);\n\n    protected:\n        float        mValue = 0.0f;                    // Current value @SERIALIZABLE\n        float        mSmoothValue = 0.0f;              // Current smoothed value\n        float        mMinValue = 0.0f;                 // Minimal value @SERIALIZABLE\n        float        mMaxValue = 1.0f;                 // Maximal value @SERIALIZABLE\n        float        mScrollSense = 1.0f;              // Scroll sense coefficient @SERIALIZABLE\n        Orientation  mOrientation = Orientation::Down; // Bar orientation @SERIALIZABLE\n\n        Ref<WidgetLayer> mBarLayer;  // Bar layer\n        Ref<WidgetLayer> mBackLayer; // Background layer\n\n    protected:\n        // Called when new layer was added. Here searching bar, back and handle layers\n        void OnLayerAdded(const Ref<WidgetLayer>& layer) override;\n\n        // Called when deserialized\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Updates layers layouts, calls after updating widget layout\n        void UpdateLayersLayouts() override;\n\n        // Updates bar, back and handle layers layout by value\n        void UpdateProgressLayersLayouts();\n\n        // Gets value from cursor position, depends on orientation\n        void GetValueFromCursor(const Input::Cursor& cursor);\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::VerticalProgress::Orientation);\n\nCLASS_BASES_META(o2::VerticalProgress)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::DrawableCursorEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::VerticalProgress)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(minValue);\n    FIELD().PUBLIC().NAME(maxValue);\n    FIELD().PUBLIC().NAME(scrollSense);\n    FIELD().PUBLIC().NAME(onChange);\n    FIELD().PUBLIC().NAME(onChangeByUser);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mSmoothValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mMinValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mMaxValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mScrollSense);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Orientation::Down).NAME(mOrientation);\n    FIELD().PROTECTED().NAME(mBarLayer);\n    FIELD().PROTECTED().NAME(mBackLayer);\n}\nEND_META;\nCLASS_METHODS_META(o2::VerticalProgress)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const VerticalProgress&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, float, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueForcible, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMinValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetMinValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetMaxValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueRange, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScrollSense, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScrollSense);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetOrientation, Orientation);\n    FUNCTION().PUBLIC().SIGNATURE(Orientation, GetOrientation);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerAdded, const Ref<WidgetLayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateProgressLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, GetValueFromCursor, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/VerticalScrollBar.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"VerticalScrollBar.h\"\n\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    VerticalScrollBar::VerticalScrollBar(RefCounter* refCounter):\n        Widget(refCounter), DrawableCursorEventsListener(this)\n    {}\n\n    VerticalScrollBar::VerticalScrollBar(RefCounter* refCounter, const VerticalScrollBar& other) :\n        Widget(refCounter, other), DrawableCursorEventsListener(this), mValue(other.mValue), mMinValue(other.mMinValue),\n        mMaxValue(other.mMaxValue), mScrollSense(other.mScrollSense), mScrollHandleSize(other.mScrollHandleSize),\n        mHandlePressed(false), mScrollhandleMinPxSize(other.mScrollhandleMinPxSize), mSmoothValue(other.mValue)\n    {\n        mHandleLayer = FindLayer(\"handle\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n    }\n\n    VerticalScrollBar::~VerticalScrollBar()\n    {}\n\n    VerticalScrollBar& VerticalScrollBar::operator=(const VerticalScrollBar& other)\n    {\n        Widget::operator=(other); \n\n        mValue = other.mValue;\n        mMinValue = other.mMinValue;\n        mMaxValue = other.mMaxValue;\n        mScrollSense = other.mScrollSense;\n        mScrollHandleSize = other.mScrollHandleSize;\n        mScrollhandleMinPxSize = other.mScrollhandleMinPxSize;\n        mSmoothValue = mValue;\n        mHandlePressed = false;\n        mHandleLayer = FindLayer(\"handle\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void VerticalScrollBar::Update(float dt)\n    {\n        Widget::Update(dt);\n\n        const float threshold = 0.01f;\n        const float smoothCoef = 30.0f;\n\n        if (!Math::Equals(mValue, mSmoothValue, threshold))\n        {\n            mSmoothValue = Math::Clamp(Math::Lerpc(mSmoothValue, mValue, dt*smoothCoef), mMinValue, mMaxValue);\n\n            if (Math::Abs(mValue - mSmoothValue) < threshold)\n                mSmoothValue = mValue;\n\n            UpdateProgressLayersLayouts();\n\n            onSmoothChange(mSmoothValue);\n        }\n    }\n\n    void VerticalScrollBar::SetValue(float value)\n    {\n        mValue = Math::Clamp(value, mMinValue, mMaxValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    void VerticalScrollBar::SetValueForcible(float value)\n    {\n        mValue = Math::Clamp(value, mMinValue, mMaxValue);\n        mSmoothValue = mValue;\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n        onSmoothChange(mSmoothValue);\n    }\n\n    float VerticalScrollBar::GetValue() const\n    {\n        return mValue;\n    }\n\n    void VerticalScrollBar::SetMinValue(float minValue)\n    {\n        mMinValue = minValue;\n        mValue = Math::Max(mMinValue, mValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    float VerticalScrollBar::GetMinValue() const\n    {\n        return mMinValue;\n    }\n\n    void VerticalScrollBar::SetMaxValue(float maxValue)\n    {\n        mMaxValue = maxValue;\n        mValue = Math::Min(mMaxValue, mValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    float VerticalScrollBar::GetMaxValue() const\n    {\n        return mMaxValue;\n    }\n\n    void VerticalScrollBar::SetValueRange(float minValue, float maxValue)\n    {\n        mMinValue = Math::Min(maxValue, minValue);\n        mMaxValue = Math::Max(maxValue, minValue);\n        mValue = Math::Clamp(mValue, mMinValue, mMaxValue);\n        UpdateProgressLayersLayouts();\n\n        onChange(value);\n    }\n\n    void VerticalScrollBar::SetScrollSense(float coef)\n    {\n        mScrollSense = coef;\n    }\n\n    float VerticalScrollBar::GetScrollSense() const\n    {\n        return mScrollSense;\n    }\n\n    void VerticalScrollBar::SetScrollHandleSize(float size)\n    {\n        mScrollHandleSize = size;\n        UpdateProgressLayersLayouts();\n    }\n\n    float VerticalScrollBar::GetScrollHandleSize() const\n    {\n        return mScrollHandleSize;\n    }\n\n    bool VerticalScrollBar::IsUnderPoint(const Vec2F& point)\n    {\n        if (!mDrawingScissorRect.IsInside(point))\n            return false;\n\n        if (mHandleLayer && mHandleLayer->IsUnderPoint(point))\n            return true;\n\n        if (mBackLayer && mBackLayer->IsUnderPoint(point))\n            return true;\n\n        return false;\n    }\n\n    bool VerticalScrollBar::IsScrollable() const\n    {\n        return !Math::Equals(mMinValue, mMaxValue);\n    }\n\n    void VerticalScrollBar::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        if (mHandleLayer && mHandleLayer->IsUnderPoint(cursor.position))\n        {\n            mHandlePressed = true;\n            float pressedValue = GetValueFromCursor(cursor);\n            mPressHandleOffset = mValue - pressedValue;\n\n            auto pressedState = state[\"pressed\"];\n            if (pressedState)\n                *pressedState = true;\n        }\n        else\n        {\n            float pressedValue = GetValueFromCursor(cursor);\n            if (pressedValue > mValue + mScrollHandleSize*0.5f)\n                SetValueFromUser(mValue + mScrollHandleSize);\n            else\n                SetValueFromUser(mValue - mScrollHandleSize);\n        }\n    }\n\n    void VerticalScrollBar::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        mHandlePressed = false;\n    }\n\n    void VerticalScrollBar::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        auto pressedState = state[\"pressed\"];\n        if (pressedState)\n            *pressedState = false;\n\n        mHandlePressed = false;\n    }\n\n    void VerticalScrollBar::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (mHandlePressed)\n            SetValueFromUser(GetValueFromCursor(cursor) + mPressHandleOffset);\n        else\n        {\n            const float timeThreshold = 0.5f;\n            const float speed = 5.0f;\n\n            if (cursor.pressedTime > timeThreshold && !(mHandleLayer && mHandleLayer->IsUnderPoint(cursor.position)))\n            {\n                float pressedValue = GetValueFromCursor(cursor);\n                if (pressedValue > mValue + mScrollHandleSize*0.5f)\n                    SetValueFromUser(mValue + mScrollHandleSize*o2Time.GetDeltaTime()*speed);\n                else\n                    SetValueFromUser(mValue - mScrollHandleSize*o2Time.GetDeltaTime()*speed);\n            }\n        }\n    }\n\n    float VerticalScrollBar::GetValueFromCursor(const Input::Cursor &cursor)\n    {\n        float range = mMaxValue - mMinValue;\n\n        if (Math::Equals(range, 0.0f))\n            return mValue;\n\n        float height = layout->GetWorldRect().Height();\n        float minScrollhandleSize = Math::Max(mScrollhandleMinPxSize/height*range, mScrollHandleSize);\n        float rangleWithHandle = range + minScrollhandleSize;\n        float szCoef = minScrollhandleSize/rangleWithHandle;\n\n        return (height - (cursor.position.y - layout->GetWorldRect().bottom))/height*range/(1.0f - szCoef) + mMinValue;\n    }\n\n    void VerticalScrollBar::SetValueFromUser(float value)\n    {\n        SetValue(value);\n        onChangeByUser(mValue);\n    }\n\n    void VerticalScrollBar::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = true;\n    }\n\n    void VerticalScrollBar::OnCursorExit(const Input::Cursor& cursor)\n    {\n        auto selectState = state[\"hover\"];\n        if (selectState)\n            *selectState = false;\n    }\n\n    void VerticalScrollBar::OnScrolled(float scroll)\n    {\n        SetValue(mValue - scroll*mScrollSense);\n    }\n\n    void VerticalScrollBar::OnDeserialized(const DataValue& node)\n    {\n        Widget::OnDeserialized(node);\n\n        mHandleLayer = FindLayer(\"handle\");\n        mBackLayer = FindLayer(\"back\");\n\n        RetargetStatesAnimations();\n    }\n\n    void VerticalScrollBar::OnEnabled()\n    {\n        interactable = true;\n    }\n\n    void VerticalScrollBar::OnDisabled()\n    {\n        interactable = false;\n    }\n\n    void VerticalScrollBar::SetMinimalScrollHandleSize(float pixelSize)\n    {\n        mScrollhandleMinPxSize = pixelSize;\n        UpdateProgressLayersLayouts();\n    }\n\n    void VerticalScrollBar::UpdateSelfTransform()\n    {\n        layout->Update();\n    }\n\n    void VerticalScrollBar::UpdateProgressLayersLayouts()\n    {\n        if (mHandleLayer)\n        {\n            float range = mMaxValue - mMinValue;\n            float height = Math::Max(layout->GetWorldRect().Height(), 1.0f);\n            float minScrollhandleSize = Math::Max(mScrollhandleMinPxSize/height*range, mScrollHandleSize);\n            float rangleWithHandle = range + minScrollhandleSize;\n            float szCoef = minScrollhandleSize/rangleWithHandle;\n            float szPos = (mSmoothValue - mMinValue)/range*(1.0f - szCoef);\n\n            if (Math::Equals(range, 0.0f))\n            {\n                szPos = 0;\n                szCoef = 1;\n            }\n\n            mHandleLayer->layout.offsetMin = Vec2F();\n            mHandleLayer->layout.offsetMax = Vec2F();\n            mHandleLayer->layout.anchorMin = Vec2F(0, Math::Clamp01(1.0f - szPos));\n            mHandleLayer->layout.anchorMax = Vec2F(1, Math::Clamp01(1.0f - szPos - szCoef));\n        }\n\n        if (mBackLayer)\n            mBackLayer->layout = Layout::BothStretch();\n\n        Widget::UpdateLayersLayouts();\n    }\n\n    void VerticalScrollBar::UpdateLayersLayouts()\n    {\n        UpdateProgressLayersLayouts();\n    }\n\n    void VerticalScrollBar::OnLayerAdded(const Ref<WidgetLayer>& layer)\n    {\n        if (layer->name == \"back\")\n            mBackLayer = layer;\n        else if (layer->name == \"handle\")\n            mHandleLayer = layer;\n\n        UpdateProgressLayersLayouts();\n    }\n\n    float VerticalScrollBar::GetSmoothValue() const\n    {\n        return mSmoothValue;\n    }\n\n    String VerticalScrollBar::GetCreateMenuGroup()\n    {\n        return \"Progress\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::VerticalScrollBar>);\n// --- META ---\n\nDECLARE_CLASS(o2::VerticalScrollBar, o2__VerticalScrollBar);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/VerticalScrollBar.h",
    "content": "#pragma once\n\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Events/DrawableCursorEventsListener.h\"\n\nnamespace o2\n{\n    // ---------------------\n    // Vertical progress bar\n    // ---------------------\n    class VerticalScrollBar: public Widget, public DrawableCursorEventsListener\n    {\n    public:\n        PROPERTIES(VerticalScrollBar);\n        PROPERTY(float, value, SetValue, GetValue); // Current value property\n\n        PROPERTY(float, minValue, SetMinValue, GetMinValue); // Minimal value property\n        PROPERTY(float, maxValue, SetMaxValue, GetMaxValue); // Maximal value property\n\n        PROPERTY(float, scrollSense, SetScrollSense, GetScrollSense);          // Scroll sense coefficient\n        PROPERTY(float, scrollSize, SetScrollHandleSize, GetScrollHandleSize); // Scroll handle size\n\n    public:\n        Function<void(float)> onChange;       // On value changing event\n        Function<void(float)> onChangeByUser; // On Value changing from user event\n        Function<void(float)> onSmoothChange; // On smooth value changing event\n\n    public:\n        // Constructor\n        explicit VerticalScrollBar(RefCounter* refCounter);\n\n        // Copy-constructor\n        VerticalScrollBar(RefCounter* refCounter, const VerticalScrollBar& other);\n\n        // Destructor\n        ~VerticalScrollBar();\n\n        // Copy-operator\n        VerticalScrollBar& operator=(const VerticalScrollBar& other);\n\n        // Updates widget and smooth value changing\n        void Update(float dt) override;\n\n        // Sets value\n        void SetValue(float value);\n\n        // Sets value forcible, without smoothing\n        void SetValueForcible(float value);\n\n        // Returns value\n        float GetValue() const;\n\n        // Returns smooth value\n        float GetSmoothValue() const;\n\n        // Sets minimal value\n        void SetMinValue(float minValue);\n\n        // Returns minimal value\n        float GetMinValue() const;\n\n        // Sets maximal value\n        void SetMaxValue(float maxValue);\n\n        // Returns maximal value\n        float GetMaxValue() const;\n\n        // Sets value range\n        void SetValueRange(float minValue, float maxValue);\n\n        // Sets scroll sense\n        void SetScrollSense(float coef);\n\n        // Returns scroll sense\n        float GetScrollSense() const;\n\n        // Sets scroll handle size\n        void SetScrollHandleSize(float size);\n\n        // Returns scroll handle size\n        float GetScrollHandleSize() const;\n\n        // Sets scroll handle minimum size in pixels\n        void SetMinimalScrollHandleSize(float pixelSize);\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(VerticalScrollBar);\n        CLONEABLE_REF(VerticalScrollBar);\n\n    protected:\n        float mValue = 0.0f;       // Current value @SERIALIZABLE\n        float mSmoothValue = 0.0f; // Smooth value\n\n        float mMinValue = 0.0f; // Minimum value @SERIALIZABLE\n        float mMaxValue = 1.0f; // Maximum value @SERIALIZABLE\n\n        float mScrollSense = 1.0f;           // Scroll sense coefficient @SERIALIZABLE\n        float mScrollHandleSize = 0.2f;      // Scroll handle size (in value range) @SERIALIZABLE\n        float mScrollhandleMinPxSize = 5.0f; // Minimal scroll size in pixels @SERIALIZABLE\n\n        float mPressHandleOffset = 0.0f; // Value offset when handle was pressed\n        bool  mHandlePressed = false;    // True, when handle was pressed\n\n       Ref<WidgetLayer> mHandleLayer; // Handle layer\n       Ref<WidgetLayer> mBackLayer;   // Background layer\n\n    protected:\n        // Updates layers layouts, calls after updating widget layout\n        void UpdateLayersLayouts() override;\n\n        // Called when new layer was added. Here searching bar, back and handle layers\n        void OnLayerAdded(const Ref<WidgetLayer>& layer) override;\n\n        // Called when deserialized\n        void OnDeserialized(const DataValue& node) override;\n\n        // Called when visible was changed\n        void OnEnabled() override;\n\n        // Called when visible was changed\n        void OnDisabled() override;\n\n        // Updates bar, back and handle layers layout by value\n        void UpdateProgressLayersLayouts();\n\n        // Gets value from cursor position, depends on orientation\n        float GetValueFromCursor(const Input::Cursor& cursor);\n\n        // Sets value and calls callback onUserChange\n        void SetValueFromUser(float value);\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when scrolling\n        void OnScrolled(float scroll) override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n\n        friend class ContextMenu;\n        friend class CustomList;\n        friend class EditBox;\n        friend class LongList;\n        friend class ScrollArea;\n        friend class Tree;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::VerticalScrollBar)\n{\n    BASE_CLASS(o2::Widget);\n    BASE_CLASS(o2::DrawableCursorEventsListener);\n}\nEND_META;\nCLASS_FIELDS_META(o2::VerticalScrollBar)\n{\n    FIELD().PUBLIC().NAME(value);\n    FIELD().PUBLIC().NAME(minValue);\n    FIELD().PUBLIC().NAME(maxValue);\n    FIELD().PUBLIC().NAME(scrollSense);\n    FIELD().PUBLIC().NAME(scrollSize);\n    FIELD().PUBLIC().NAME(onChange);\n    FIELD().PUBLIC().NAME(onChangeByUser);\n    FIELD().PUBLIC().NAME(onSmoothChange);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mValue);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mSmoothValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(mMinValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mMaxValue);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(1.0f).NAME(mScrollSense);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.2f).NAME(mScrollHandleSize);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(5.0f).NAME(mScrollhandleMinPxSize);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mPressHandleOffset);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mHandlePressed);\n    FIELD().PROTECTED().NAME(mHandleLayer);\n    FIELD().PROTECTED().NAME(mBackLayer);\n}\nEND_META;\nCLASS_METHODS_META(o2::VerticalScrollBar)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const VerticalScrollBar&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueForcible, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetSmoothValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMinValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetMinValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMaxValue, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetMaxValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValueRange, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScrollSense, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScrollSense);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScrollHandleSize, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScrollHandleSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetMinimalScrollHandleSize, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnLayerAdded, const Ref<WidgetLayer>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateProgressLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(float, GetValueFromCursor, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetValueFromUser, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnScrolled, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Window.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Window.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Scene/UI/UIManager.h\"\n#include \"o2/Scene/UI/WidgetLayer.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Scene/UI/WidgetState.h\"\n#include \"o2/Scene/UI/Widgets/Button.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    Window::Window(RefCounter* refCounter):\n        ScrollArea(refCounter)\n    {\n        InitializeHandles();\n        InitializeContextMenu();\n    }\n\n    Window::Window(RefCounter* refCounter, const Window& other):\n        ScrollArea(refCounter, other), mHeadDragAreaLayout(other.mHeadDragAreaLayout),\n        mTopDragAreaLayout(other.mTopDragAreaLayout), mBottomDragAreaLayout(other.mBottomDragAreaLayout),\n        mLeftDragAreaLayout(other.mLeftDragAreaLayout), mRightDragAreaLayout(other.mRightDragAreaLayout),\n        mLeftTopDragAreaLayout(other.mLeftTopDragAreaLayout), mRightTopDragAreaLayout(other.mRightTopDragAreaLayout),\n        mLeftBottomDragAreaLayout(other.mLeftBottomDragAreaLayout), mRightBottomDragAreaLayout(other.mRightBottomDragAreaLayout)\n    {\n        RestoreControls();\n        RetargetStatesAnimations();\n        SetLayoutDirty();\n        InitializeHandles();\n    }\n\n    Window::~Window()\n    {}\n\n    Window& Window::operator=(const Window& other)\n    {\n        ScrollArea::operator=(other);\n\n        mHeadDragAreaLayout = other.mHeadDragAreaLayout;\n        mTopDragAreaLayout = other.mTopDragAreaLayout;\n        mBottomDragAreaLayout = other.mBottomDragAreaLayout;\n        mLeftDragAreaLayout = other.mLeftDragAreaLayout;\n        mRightDragAreaLayout = other.mRightDragAreaLayout;\n        mLeftTopDragAreaLayout = other.mLeftTopDragAreaLayout;\n        mRightTopDragAreaLayout = other.mRightTopDragAreaLayout;\n        mLeftBottomDragAreaLayout = other.mLeftBottomDragAreaLayout;\n        mRightBottomDragAreaLayout = other.mRightBottomDragAreaLayout;\n\n        RestoreControls();\n        RetargetStatesAnimations();\n        BindHandlesInteractableToVisibility();\n        SetLayoutDirty();\n\n        return *this;\n    }\n\n    void Window::Draw()\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        if (!mResEnabledInHierarchy || mIsClipped) \n        {\n            for (auto& child : mChildrenInheritedDepth)\n                child->Draw();\n\n            return;\n        }\n\n        mBackCursorArea->OnDrawn();\n\n        for (auto& layer : mDrawingLayers)\n            layer->Draw();\n\n        IDrawable::OnDrawn();\n        mWindowCursorArea->OnDrawn();\n\n        o2Render.EnableScissorTest(mAbsoluteClipArea);\n\n        for (auto& child : mChildrenInheritedDepth)\n            child->Draw();\n\n        o2Render.DisableScissorTest();\n\n        ScrollArea::OnDrawn();\n\n        mHeadDragHandle->OnDrawn();\n        mTopDragHandle->OnDrawn();\n        mBottomDragHandle->OnDrawn();\n        mLeftDragHandle->OnDrawn();\n        mRightDragHandle->OnDrawn();\n        mLeftTopDragHandle->OnDrawn();\n        mRightTopDragHandle->OnDrawn();\n        mLeftBottomDragHandle->OnDrawn();\n        mRightBottomDragHandle->OnDrawn();\n\n        for (auto& child : mInternalWidgets)\n            child->Draw();\n\n        for (auto& layer : mTopDrawingLayers)\n            layer->Draw();\n\n        DrawDebugFrame();\n    }\n\n    void Window::ShowModal()\n    {\n        Show();\n        SetModal(true);\n    }\n\n    void Window::SetIcon(const Ref<Sprite>& icon)\n    {\n        if (auto iconLayer = GetLayer(mIconLayerPath))\n            iconLayer->SetDrawable(icon);\n    }\n\n    Ref<Sprite> Window::GetIcon() const\n    {\n        auto iconLayer = GetLayer(mIconLayerPath);\n        if (iconLayer)\n            return DynamicCast<Sprite>(iconLayer->GetDrawable());\n\n        return nullptr;\n    }\n\n    void Window::SetIconLayout(const Layout& layout)\n    {\n        auto iconLayer = GetLayer(mIconLayerPath);\n        if (iconLayer)\n            iconLayer->layout = layout;\n    }\n\n    Layout Window::GetIconLayout() const\n    {\n        auto iconLayer = GetLayer(mIconLayerPath);\n        if (iconLayer)\n            return iconLayer->layout;\n\n        return Layout();\n    }\n\n    void Window::SetCaption(const WString& caption)\n    {\n        auto captionLayer = GetLayer(mCaptionLayerPath);\n        if (captionLayer)\n        {\n            if (auto textDrawable = DynamicCast<Text>(captionLayer->GetDrawable()))\n                textDrawable->SetText(caption);\n        }\n    }\n\n    WString Window::GetCaption() const\n    {\n        auto captionLayer = GetLayer(mCaptionLayerPath);\n        if (captionLayer)\n        {\n            if (auto textDrawable = DynamicCast<Text>(captionLayer->GetDrawable()))\n                return textDrawable->GetText();\n        }\n\n        return WString();\n    }\n\n    const Ref<ContextMenu>& Window::GetOptionsMenu() const\n    {\n        return mOptionsMenu;\n    }\n\n    void Window::SetDragAreaLayouts(const Layout& head, const Layout& top, const Layout&bottom, const Layout&left,\n                                      const Layout& right, const Layout& leftTop, const Layout& rightTop,\n                                      const Layout& leftBottom, const Layout& rightBottom)\n    {\n        mHeadDragAreaLayout = head;\n        mTopDragAreaLayout = top;\n        mBottomDragAreaLayout = bottom;\n        mLeftDragAreaLayout = left;\n        mRightDragAreaLayout = right;\n        mLeftTopDragAreaLayout = leftTop;\n        mRightTopDragAreaLayout = rightTop;\n        mLeftBottomDragAreaLayout = leftBottom;\n        mRightBottomDragAreaLayout = rightBottom;\n    }\n\n    bool Window::IsFocusable() const\n    {\n        return true;\n    }\n\n    void Window::SetModal(bool isModal)\n    {\n        mBackCursorArea->interactable = isModal;\n    }\n\n    bool Window::IsModal() const\n    {\n        return mBackCursorArea->IsInteractable();\n    }\n\n    void Window::UpdateSelfTransform()\n    {\n        ScrollArea::UpdateSelfTransform();\n\n        mHeadDragAreaRect        = mHeadDragAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        mTopDragAreaRect         = mTopDragAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        mBottomDragAreaRect      = mBottomDragAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        mLeftDragAreaRect        = mLeftDragAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        mRightDragAreaRect       = mRightDragAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        mLeftTopDragAreaRect     = mLeftTopDragAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        mRightTopDragAreaRect    = mRightTopDragAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        mLeftBottomDragAreaRect  = mLeftBottomDragAreaLayout.Calculate(GetLayoutData().worldRectangle);\n        mRightBottomDragAreaRect = mRightBottomDragAreaLayout.Calculate(GetLayoutData().worldRectangle);\n    }\n\n    CursorEventsArea& Window::GetBackCursorListener()\n    {\n        return *mBackCursorArea;\n    }\n\n    void Window::InitializeHandles()\n    {\n        mBackCursorArea = mmake<CursorEventsArea>();\n        mBackCursorArea->isUnderPoint = [&](const Vec2F& point) { return true; };\n        mBackCursorArea->interactable = false;\n\n        mWindowCursorArea = mmake<CursorEventsArea>();\n        mWindowCursorArea->isUnderPoint = [&](const Vec2F& point) { return IsUnderPoint(point); };\n\n        mHeadDragHandle = mmake<CursorEventsArea>();\n        mHeadDragHandle->isUnderPoint = [&](const Vec2F& point) { return mHeadDragAreaRect.IsInside(point); };\n        mHeadDragHandle->onMoved = [&](const Input::Cursor& cursor) { layout->position += cursor.delta; };\n        mHeadDragHandle->onCursorPressed = [&](const Input::Cursor& cursor) { OnFocused(); };\n\n        mTopDragHandle = mmake<CursorEventsArea>();\n        mTopDragHandle->isUnderPoint = [&](const Vec2F& point) { return mTopDragAreaRect.IsInside(point); };\n        mTopDragHandle->onMoved = [&](const Input::Cursor& cursor) { layout->worldTop += cursor.delta.y; };\n        mTopDragHandle->onCursorPressed = [&](const Input::Cursor& cursor) { OnFocused(); };\n        mTopDragHandle->cursorType = CursorType::SizeNS;\n\n        mBottomDragHandle = mmake<CursorEventsArea>();\n        mBottomDragHandle->isUnderPoint = [&](const Vec2F& point) { return mBottomDragAreaRect.IsInside(point); };\n        mBottomDragHandle->onMoved = [&](const Input::Cursor& cursor) { layout->worldBottom += cursor.delta.y; };\n        mBottomDragHandle->onCursorPressed = [&](const Input::Cursor& cursor) { OnFocused(); };\n        mBottomDragHandle->cursorType = CursorType::SizeNS;\n\n        mLeftDragHandle = mmake<CursorEventsArea>();\n        mLeftDragHandle->isUnderPoint = [&](const Vec2F& point) { return mLeftDragAreaRect.IsInside(point); };\n        mLeftDragHandle->onMoved = [&](const Input::Cursor& cursor) { layout->left += cursor.delta.x; };\n        mLeftDragHandle->onCursorPressed = [&](const Input::Cursor& cursor) { OnFocused(); };\n        mLeftDragHandle->cursorType = CursorType::SizeWE;\n\n        mRightDragHandle = mmake<CursorEventsArea>();\n        mRightDragHandle->isUnderPoint = [&](const Vec2F& point) { return mRightDragAreaRect.IsInside(point); };\n        mRightDragHandle->onMoved = [&](const Input::Cursor& cursor) { layout->right += cursor.delta.x; };\n        mRightDragHandle->onCursorPressed = [&](const Input::Cursor& cursor) { OnFocused(); };\n        mRightDragHandle->cursorType = CursorType::SizeWE;\n\n        mLeftTopDragHandle = mmake<CursorEventsArea>();\n        mLeftTopDragHandle->isUnderPoint = [&](const Vec2F& point) { return mLeftTopDragAreaRect.IsInside(point); };\n        mLeftTopDragHandle->onMoved = [&](const Input::Cursor& cursor) { layout->worldLeftTop += cursor.delta; };\n        mLeftTopDragHandle->onCursorPressed = [&](const Input::Cursor& cursor) { OnFocused(); };\n        mLeftTopDragHandle->cursorType = CursorType::SizeNwSe;\n\n        mLeftBottomDragHandle = mmake<CursorEventsArea>();\n        mLeftBottomDragHandle->isUnderPoint = [&](const Vec2F& point) { return mLeftBottomDragAreaRect.IsInside(point); };\n        mLeftBottomDragHandle->onMoved = [&](const Input::Cursor& cursor) { layout->leftBottom += cursor.delta; };\n        mLeftBottomDragHandle->onCursorPressed = [&](const Input::Cursor& cursor) { OnFocused(); };\n        mLeftBottomDragHandle->cursorType = CursorType::SizeNeSw;\n\n        mRightTopDragHandle = mmake<CursorEventsArea>();\n        mRightTopDragHandle->isUnderPoint = [&](const Vec2F& point) { return mRightTopDragAreaRect.IsInside(point); };\n        mRightTopDragHandle->onMoved = [&](const Input::Cursor& cursor) { layout->rightTop += cursor.delta; };\n        mRightTopDragHandle->onCursorPressed = [&](const Input::Cursor& cursor) { OnFocused(); };\n        mRightTopDragHandle->cursorType = CursorType::SizeNeSw;\n\n        mRightBottomDragHandle = mmake<CursorEventsArea>();\n        mRightBottomDragHandle->isUnderPoint = [&](const Vec2F& point) { return mRightBottomDragAreaRect.IsInside(point); };\n        mRightBottomDragHandle->onMoved = [&](const Input::Cursor& cursor) { layout->rightBottom += cursor.delta; };\n        mRightBottomDragHandle->onCursorPressed = [&](const Input::Cursor& cursor) { OnFocused(); };\n        mRightBottomDragHandle->cursorType = CursorType::SizeNwSe;\n\n        BindHandlesInteractableToVisibility();\n    }\n\n    void Window::SetHandlesInteractable(bool interactable)\n    {\n        mHeadDragHandle->interactable        = interactable;\n        mTopDragHandle->interactable         = interactable;\n        mBottomDragHandle->interactable      = interactable;\n        mLeftDragHandle->interactable        = interactable;\n        mRightDragHandle->interactable       = interactable;\n        mLeftTopDragHandle->interactable     = interactable;\n        mRightTopDragHandle->interactable    = interactable;\n        mLeftBottomDragHandle->interactable  = interactable;\n        mRightBottomDragHandle->interactable = interactable;\n    }\n\n    void Window::BindHandlesInteractableToVisibility()\n    {\n        if (mVisibleState)\n        {\n            mVisibleState->onStateBecomesTrue += [&]() { SetHandlesInteractable(true); };\n            mVisibleState->onStateFullyFalse += [&]() { SetHandlesInteractable(false); };\n        }\n    }\n\n    void Window::OnFocused()\n    {\n        if (mParent)\n            SetIndexInSiblings(mParent.Lock()->GetChildren().Count() - 1);\n\n        SetLastOnCurrentDepth();\n\n        onFocused();\n    }\n\n    void Window::OnEnabled()\n    {\n        ScrollArea::OnEnabled();\n\n        SetInteractable(true);\n        Focus();\n        onOpened();\n    }\n     \n    void Window::OnDisabled()\n    {\n        ScrollArea::OnDisabled();\n\n        SetInteractable(false);\n        onClosed();\n    }\n\n    void Window::OnChildFocused(const Ref<Widget>& child)\n    {\n        OnFocused();\n    }\n\n    void Window::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        o2UI.FocusWidget(Ref(this));\n    }\n\n    void Window::OnStateAdded(const Ref<WidgetState>& state)\n    {\n        BindHandlesInteractableToVisibility();\n    }\n\n    void Window::InitializeContextMenu()\n    {\n        mOptionsMenu = o2UI.CreateWidget<ContextMenu>(\"standard\");\n\n        if (!mOptionsMenu)\n            return;\n\n        mOptionsMenu->name = \"options context\";\n        InitializeContextItems();\n        AddInternalWidget(mOptionsMenu);\n\n        auto optionsBtn = DynamicCast<Button>(mInternalWidgets.FindOrDefault(\n            [](auto& x) { return x->GetName() == \"optionsButton\" && x->GetType() == TypeOf(Button); }));\n\n        if (optionsBtn)\n            optionsBtn->onClick += [=]() { mOptionsMenu->Show(optionsBtn->transform->worldCenter); };\n    }\n\n    void Window::InitializeContextItems()\n    {\n        mOptionsMenu->AddItem(\"Close\", [&]() { Hide(); });\n    }\n\n    void Window::RestoreControls()\n    {\n        auto closeBtn = DynamicCast<Button>(mInternalWidgets.FindOrDefault(\n            [](auto& x) { return x->GetName() == \"closeButton\" && x->GetType() == TypeOf(Button); }));\n\n        if (closeBtn)\n            closeBtn->onClick += [&]() { Hide(); };\n\n        for (auto& element : mInternalWidgets)\n        {\n            if (element->GetName() == \"options context\" && element->GetType() == TypeOf(ContextMenu))\n            {\n                element->SetInternalParent(nullptr);\n                break;\n            }\n        }\n\n        InitializeContextMenu();\n    }\n\n    String Window::GetCreateMenuGroup()\n    {\n        return \"Window\";\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::Window>);\n// --- META ---\n\nDECLARE_CLASS(o2::Window, o2__Window);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scene/UI/Widgets/Window.h",
    "content": "#pragma once\n\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Scene/UI/Widgets/ScrollArea.h\"\n#include \"o2/Events/CursorEventsArea.h\"\n\nnamespace o2\n{\n    class Text;\n    class ContextMenu;\n\n    // ----------------------------------------------------\n    // Window with caption, icon, options and close buttons\n    // ----------------------------------------------------\n    class Window: public ScrollArea\n    {\n    public:\n        PROPERTIES(Window);\n        PROPERTY(WString, caption, SetCaption, GetCaption); // Window caption property\n        PROPERTY(Ref<Sprite>, icon, SetIcon, GetIcon);      // Window icon sprite property\n\n        Function<void()> onOpened; // On window opened delegate\n        Function<void()> onClosed; // On window closed delegate\n\n    public:\n        // Default constructor\n        explicit Window(RefCounter* refCounter);\n\n        // Copy-constructor\n        Window(RefCounter* refCounter, const Window& other);\n\n        // Destructor\n        ~Window();\n\n        // Copy-operator\n        Window& operator=(const Window& other);\n\n        // Draws widget\n        void Draw() override;\n\n        // Shows window as modal\n        void ShowModal();\n\n        // Sets icon sprite\n        virtual void SetIcon(const Ref<Sprite>& icon);\n\n        // Returns icon sprite\n        virtual Ref<Sprite> GetIcon() const;\n\n        // Sets icon layer layout\n        virtual void SetIconLayout(const Layout& layout);\n\n        // Returns icon layer layout\n        virtual Layout GetIconLayout() const;\n\n        // Sets caption text\n        virtual void SetCaption(const WString& caption);\n\n        // Returns caption text\n        virtual WString GetCaption() const;\n\n        // Returns options context menu\n        const Ref<ContextMenu>& GetOptionsMenu() const;\n\n        // Sets drag handle areas layouts\n        void SetDragAreaLayouts(const Layout& head, const Layout& top, const Layout& bottom, const Layout& left,\n                                const Layout& right, const Layout& leftTop, const Layout& rightTop, const Layout& leftBottom,\n                                const Layout& rightBottom);\n\n        // Returns is this widget can be selected\n        bool IsFocusable() const override;\n\n        // Sets is window modal\n        void SetModal(bool isModal);\n\n        // Returns is window modal\n        bool IsModal() const;\n\n        // Updates layout\n        void UpdateSelfTransform() override;\n\n        // Returns back cursor events listener\n        CursorEventsArea& GetBackCursorListener();\n\n        // Returns create menu group in editor\n        static String GetCreateMenuGroup();\n\n        SERIALIZABLE(Window);\n        CLONEABLE_REF(Window);\n\n    protected:\n        static constexpr auto mIconLayerPath = \"icon\";\n        static constexpr auto mCaptionLayerPath = \"caption\";\n\n        Ref<ContextMenu> mOptionsMenu; // Window options context menu\n\n        Ref<CursorEventsArea> mBackCursorArea;   // Cursor area listener at back of window, for catching events\n        Ref<CursorEventsArea> mWindowCursorArea; // Cursor area listener for window frame\n\n        Ref<CursorEventsArea> mHeadDragHandle;     // Head drag handle, for moving window\n        Layout                mHeadDragAreaLayout; // Head drag handle layout @SERIALIZABLE\n        RectF                 mHeadDragAreaRect;   // Head drag handle rect\n\n        Ref<CursorEventsArea> mTopDragHandle;     //    Top drag handle, for resizing window\n        Layout                mTopDragAreaLayout; //    Top drag handle layout @SERIALIZABLE\n        RectF                 mTopDragAreaRect;   //    Top drag handle rect\n\n        Ref<CursorEventsArea> mBottomDragHandle;     // Bottom drag handle, for resizing window\n        Layout                mBottomDragAreaLayout; // Bottom drag handle layout @SERIALIZABLE\n        RectF                 mBottomDragAreaRect;   // Bottom drag handle rect\n\n        Ref<CursorEventsArea> mLeftDragHandle;     // Left drag handle, for resizing window\n        Layout                mLeftDragAreaLayout; // Left drag handle layout @SERIALIZABLE\n        RectF                 mLeftDragAreaRect;   // Left drag handle rect\n\n        Ref<CursorEventsArea> mRightDragHandle;     // Right drag handle, for resizing window\n        Layout                mRightDragAreaLayout; // Right drag handle layout @SERIALIZABLE\n        RectF                 mRightDragAreaRect;   // Right drag handle rect\n\n        Ref<CursorEventsArea> mLeftTopDragHandle;     // Left Top drag handle, for resizing window\n        Layout                mLeftTopDragAreaLayout; // Left Top drag handle layout @SERIALIZABLE\n        RectF                 mLeftTopDragAreaRect;   // Left Top drag handle rect\n                                                     \n        Ref<CursorEventsArea> mRightTopDragHandle;     // Right Top drag handle, for resizing window\n        Layout                mRightTopDragAreaLayout; // Right Top drag handle layout @SERIALIZABLE\n        RectF                 mRightTopDragAreaRect;   // Right Top drag handle rect\n                                                    \n        Ref<CursorEventsArea> mLeftBottomDragHandle;     // Left Bottom drag handle, for resizing window\n        Layout                mLeftBottomDragAreaLayout; // Left Bottom drag handle layout @SERIALIZABLE\n        RectF                 mLeftBottomDragAreaRect;   // Left Bottom drag handle rect\n                                                     \n        Ref<CursorEventsArea> mRightBottomDragHandle;     // Right Bottom drag handle, for resizing window\n        Layout                mRightBottomDragAreaLayout; // Right Bottom drag handle layout @SERIALIZABLE\n        RectF                 mRightBottomDragAreaRect;   // Right Bottom drag handle rect\n\n    protected:\n        // Called when widget was selected\n        void OnFocused() override;\n\n        // Called when actor enabled in hierarchy, calls onOpened\n        void OnEnabled() override;\n\n        // Called when actor disabled in hierarchy, calls onCLosed\n        void OnDisabled()override;\n\n        // Called when widget state was added\n        void OnStateAdded(const Ref<WidgetState>& state) override;\n\n        // Initializes context menu and options button\n        void InitializeContextMenu();\n\n        // Initializes context menu items - close window\n        virtual void InitializeContextItems();\n\n        // Restores close button, options button and context menu from window elements\n        void RestoreControls();\n\n        // Initializes handles\n        void InitializeHandles();\n\n        // Sets drag handles interactable. Using when changing visibility\n        void SetHandlesInteractable(bool interactable);\n\n        // Binds all drag handles interactable parameter to window visibility\n        void BindHandlesInteractableToVisibility();\n\n        // Called when child widget was selected\n        void OnChildFocused(const Ref<Widget>& child) override;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Window)\n{\n    BASE_CLASS(o2::ScrollArea);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Window)\n{\n    FIELD().PUBLIC().NAME(caption);\n    FIELD().PUBLIC().NAME(icon);\n    FIELD().PUBLIC().NAME(onOpened);\n    FIELD().PUBLIC().NAME(onClosed);\n    FIELD().PROTECTED().NAME(mOptionsMenu);\n    FIELD().PROTECTED().NAME(mBackCursorArea);\n    FIELD().PROTECTED().NAME(mWindowCursorArea);\n    FIELD().PROTECTED().NAME(mHeadDragHandle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHeadDragAreaLayout);\n    FIELD().PROTECTED().NAME(mHeadDragAreaRect);\n    FIELD().PROTECTED().NAME(mTopDragHandle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mTopDragAreaLayout);\n    FIELD().PROTECTED().NAME(mTopDragAreaRect);\n    FIELD().PROTECTED().NAME(mBottomDragHandle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mBottomDragAreaLayout);\n    FIELD().PROTECTED().NAME(mBottomDragAreaRect);\n    FIELD().PROTECTED().NAME(mLeftDragHandle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mLeftDragAreaLayout);\n    FIELD().PROTECTED().NAME(mLeftDragAreaRect);\n    FIELD().PROTECTED().NAME(mRightDragHandle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mRightDragAreaLayout);\n    FIELD().PROTECTED().NAME(mRightDragAreaRect);\n    FIELD().PROTECTED().NAME(mLeftTopDragHandle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mLeftTopDragAreaLayout);\n    FIELD().PROTECTED().NAME(mLeftTopDragAreaRect);\n    FIELD().PROTECTED().NAME(mRightTopDragHandle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mRightTopDragAreaLayout);\n    FIELD().PROTECTED().NAME(mRightTopDragAreaRect);\n    FIELD().PROTECTED().NAME(mLeftBottomDragHandle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mLeftBottomDragAreaLayout);\n    FIELD().PROTECTED().NAME(mLeftBottomDragAreaRect);\n    FIELD().PROTECTED().NAME(mRightBottomDragHandle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mRightBottomDragAreaLayout);\n    FIELD().PROTECTED().NAME(mRightBottomDragAreaRect);\n}\nEND_META;\nCLASS_METHODS_META(o2::Window)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Window&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, ShowModal);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIcon, const Ref<Sprite>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<Sprite>, GetIcon);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIconLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetIconLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCaption, const WString&);\n    FUNCTION().PUBLIC().SIGNATURE(WString, GetCaption);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ContextMenu>&, GetOptionsMenu);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDragAreaLayouts, const Layout&, const Layout&, const Layout&, const Layout&, const Layout&, const Layout&, const Layout&, const Layout&, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsFocusable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetModal, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsModal);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateSelfTransform);\n    FUNCTION().PUBLIC().SIGNATURE(CursorEventsArea&, GetBackCursorListener);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuGroup);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnFocused);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnEnabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDisabled);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnStateAdded, const Ref<WidgetState>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeContextMenu);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeContextItems);\n    FUNCTION().PROTECTED().SIGNATURE(void, RestoreControls);\n    FUNCTION().PROTECTED().SIGNATURE(void, InitializeHandles);\n    FUNCTION().PROTECTED().SIGNATURE(void, SetHandlesInteractable, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, BindHandlesInteractableToVisibility);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnChildFocused, const Ref<Widget>&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/JerryScript/ScriptEngineBase.h",
    "content": "#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n#include \"jerryscript/jerry-core/include/jerryscript-core.h\"\n\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    class LogStream;\n\n    class ScriptParseResultBase\n    {\n    public:\n        ScriptParseResultBase() = default;\n        ScriptParseResultBase(const ScriptParseResultBase& other);\n        virtual ~ScriptParseResultBase();\n\n    protected:\n        jerry_value_t mParsedCode;\n\n        friend class ScriptEngine;\n    };\n\n    class ScriptEngineBase\n    {\n    protected:\n        Ref<LogStream> mLog; // Scripting log stream\n\n    protected:\n        static void ErrorCallback(const jerry_value_t error_object, void* user_p);\n        static jerry_value_t PrintCallback(const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                                           const jerry_value_t args_p[], const jerry_length_t args_cnt);\n\n        // Initialized basic prototypes for math and other\n        void InitializeBasicPrototypes();\n    };\n}\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/JerryScript/ScriptEngineImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n#include \"jerryscript/jerry-ext/include/jerryscript-ext/debugger.h\"\n#include \"jerryscript/jerry-ext/include/jerryscript-ext/handler.h\"\n#include \"jerryscript/jerry-port/default/include/jerryscript-port-default.h\"\n#include \"o2/Scripts/ScriptEngine.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    namespace\n    {\n        String FormatErrorLogMessage(const jerry_value_t error_object)\n        {\n            jerry_value_t strValue = jerry_value_to_string(error_object);\n            ScriptValue msgSv;\n            msgSv.AcquireValue(strValue);\n            jerry_release_value(strValue);\n            String msg = msgSv.GetValue<String>();\n\n            jerry_value_t backtrace = jerry_get_backtrace(32);\n            if (!jerry_value_is_array(backtrace))\n            {\n                jerry_release_value(backtrace);\n                return msg;\n            }\n\n            const uint32_t len = jerry_get_array_length(backtrace);\n            if (len == 0)\n            {\n                jerry_release_value(backtrace);\n                return msg;\n            }\n\n            msg += \" at \";\n            for (uint32_t i = 0; i < len; i++)\n            {\n                jerry_value_t frame = jerry_get_property_by_index(backtrace, i);\n                if (i > 0)\n                    msg += \" <- \";\n\n                ScriptValue frameSv;\n                frameSv.AcquireValue(frame);\n                jerry_release_value(frame);\n                msg += frameSv.GetValue<String>();\n            }\n\n            jerry_release_value(backtrace);\n            return msg;\n        }\n    } // namespace\n\n    void ScriptEngineBase::ErrorCallback(const jerry_value_t error_object, void* user_p)\n    {\n        (void)user_p;\n        o2Scripts.mLog->ErrorStr(FormatErrorLogMessage(error_object));\n    }\n\n    jerry_value_t ScriptEngineBase::PrintCallback(const jerry_value_t func_obj_val, const jerry_value_t this_p,\n                                                  const jerry_value_t args_p[], const jerry_length_t args_cnt)\n    {\n        for (int i = 0; i < (int)args_cnt; i++)\n        {\n            ScriptValue v;\n            v.AcquireValue(args_p[i]);\n            o2Scripts.mLog->OutStr(v.GetValue<String>());\n        }\n\n        return jerry_create_undefined();\n    }\n\n    ScriptParseResultBase::~ScriptParseResultBase()\n    {\n        jerry_release_value(mParsedCode);\n    }\n\n    ScriptParseResultBase::ScriptParseResultBase(const ScriptParseResultBase& other)\n    {\n        mParsedCode = jerry_acquire_value(other.mParsedCode);\n    }\n\n    bool ScriptParseResult::IsOk() const\n    {\n        return !jerry_value_is_error(mParsedCode);\n    }\n\n    String ScriptParseResult::GetError() const\n    {\n        ScriptValue tmp;\n        tmp.AcquireValue(mParsedCode);\n        return tmp.GetError();\n    }\n\n    ScriptEngine::ScriptEngine(RefCounter* refCounter):\n        Singleton<ScriptEngine>(refCounter)\n    {\n        mLog = mmake<LogStream>(\"Scripting\");\n        o2Debug.GetLog()->BindStream(mLog);\n\n        jerry_init(JERRY_INIT_EMPTY);\n        jerryx_handler_register_global((const jerry_char_t*)\"print\", PrintCallback);\n        jerry_set_error_object_created_callback(&ErrorCallback, NULL);\n\n        GetGlobal().SetProperty(\"Dump\", Function<String(const ScriptValue&)>([](const ScriptValue& v) { return v.Dump(); }));\n\n        RunBuildtinScripts();\n        InitializeBasicPrototypes();\n        RegisterTypes();\n\n        jerry_port_default_set_log_level(JERRY_LOG_LEVEL_DEBUG);\n\n        //ConnectDebugger();\n    }\n\n    ScriptEngine::~ScriptEngine()\n    {\n        delete ScriptValuePrototypes::GetVec2Prototype();\n        delete ScriptValuePrototypes::GetRectPrototype();\n        delete ScriptValuePrototypes::GetBorderPrototype();\n        delete ScriptValuePrototypes::GetColor4Prototype();\n        ScriptValuePropertyKeys::Deinitialize();\n        //jerry_cleanup();\n    }\n\n    ScriptParseResult ScriptEngine::Parse(const String& script, const String& filename /*= \"\"*/)\n    {\n        ScriptParseResult res;\n        res.mParsedCode = jerry_parse((jerry_char_t*)filename.Data(), filename.Length(),\n                                      (jerry_char_t*)script.Data(), script.Length(), JERRY_PARSE_NO_OPTS);\n\n        return res;\n    }\n\n    ScriptValue ScriptEngine::Run(const ScriptParseResult& parseResult)\n    {\n        ScriptValue res;\n        res.Accept(jerry_run(parseResult.mParsedCode));\n        return res;\n    }\n\n    ScriptValue ScriptEngine::Eval(const String& script, const String& filename /*= \"\"*/)\n    {\n        auto parseRes = Parse(script, filename);\n        if (parseRes.IsOk())\n            return Run(parseRes);\n\n        return ScriptValue();\n    }\n\n    ScriptValue ScriptEngine::GetGlobal() const\n    {\n        ScriptValue res;\n        res.Accept(jerry_get_global_object());\n        return res;\n    }\n\n    ScriptValue ScriptEngine::CreateRealm()\n    {\n        ScriptValue res;\n        res.Accept(jerry_create_realm());\n        return res;\n    }\n\n    ScriptValue ScriptEngine::SetCurrentRealm(const ScriptValue& realm)\n    {\n        ScriptValue res;\n        res.AcquireValue(jerry_set_realm(realm.jvalue));\n        return res;\n    }\n\n    void ScriptEngine::CollectGarbage() const\n    {\n        jerry_gc(JERRY_GC_PRESSURE_HIGH);\n    }\n    \n    int ScriptEngine::GetUsedMemory() const\n    {\n        jerry_heap_stats_t stats = { 0 };\n        bool get_stats_ret = jerry_get_memory_stats(&stats);\n        return (int)stats.allocated_bytes;\n    }\n\n    void ScriptEngine::ConnectDebugger() const\n    {\n        jerryx_debugger_after_connect(jerryx_debugger_tcp_create(5001) && jerryx_debugger_ws_create());\n    }\n\n    void ScriptEngineBase::InitializeBasicPrototypes()\n    {\n        auto global = o2Scripts.GetGlobal();\n        ScriptValuePrototypes::GetVec2Prototype() = mnew ScriptValue(o2Scripts.Eval(\"Vec2.prototype\"));\n        ScriptValuePrototypes::GetRectPrototype() = mnew ScriptValue(o2Scripts.Eval(\"Rect.prototype\"));\n        ScriptValuePrototypes::GetBorderPrototype() = mnew ScriptValue(o2Scripts.Eval(\"Border.prototype\"));\n        ScriptValuePrototypes::GetColor4Prototype() = mnew ScriptValue(o2Scripts.Eval(\"Color4.prototype\"));\n        ScriptValuePropertyKeys::Initialize();\n    }\n}\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/JerryScript/ScriptValueBase.h",
    "content": "#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n#include \"3rdPartyLibs/jerryscript/jerry-core/include/jerryscript-core.h\"\n#include \"o2/Utils/Function/Function.h\"\n\n#include <cstddef>\n#include <new>\n#include <utility>\n\nnamespace o2\n{\n    class IObject;\n    class Type;\n\n    // ---------------------------------------------------------\n    // Base wrapper around JerryScript value and native bindings\n    // ---------------------------------------------------------\n    class ScriptValueBase\n    {\n    public:\n        // Stored JerryScript value handle.\n        mutable jerry_value_t jvalue;\n\n    public:\n        // Releases stored JerryScript value.\n        virtual ~ScriptValueBase();\n\n        // Acquires passed JerryScript value and releases current one.\n        void AcquireValue(jerry_value_t v);\n\n        // Accepts ownership of passed JerryScript value and releases current one.\n        void Accept(jerry_value_t v);\n\n    public:\n        // ------------------------------------------------\n        // Base interface for native value container binding\n        // ------------------------------------------------\n        struct IDataContainer\n        {\n            // Destroys container instance.\n            virtual ~IDataContainer() = default;\n\n            // Destroys current container through the allocator-aware path.\n            virtual void Destroy() = 0;\n\n            // Returns raw stored data pointer.\n            virtual void* GetData() const { return nullptr; }\n\n            // Tries to cast stored data to IObject.\n            virtual IObject* TryCastToIObject() const { return nullptr; }\n\n            // Returns runtime type of stored data.\n            virtual const Type* GetType() const { return nullptr; }\n\n            // Creates container clone when supported.\n            virtual IDataContainer* Clone() const { return nullptr; }\n        };\n\n        // --------------------------------------------------------\n        // Pool-allocated container base with allocator-aware delete\n        // --------------------------------------------------------\n        template<typename _container, typename _base = IDataContainer>\n        struct TPoolContainer : public _base\n        {\n            // Destroys current container instance.\n            void Destroy() override;\n        };\n\n        // --------------------------------\n        // Container storing value by copy\n        // --------------------------------\n        template<typename _type>\n        struct DataContainer : public TPoolContainer<DataContainer<_type>>\n        {\n            // Stored value.\n            _type data;\n\n            // Initializes container from copied value.\n            DataContainer(const _type& d);\n\n            // Initializes container from moved value.\n            DataContainer(_type&& d);\n\n            // Destroys stored value.\n            ~DataContainer() override = default;\n\n            // Returns pointer to stored data.\n            void* GetData() const override;\n\n            // Tries to cast stored value to IObject.\n            IObject* TryCastToIObject() const override;\n\n            // Returns runtime type of stored value.\n            const Type* GetType() const override;\n\n            // Clones current container when value is copy-constructible.\n            IDataContainer* Clone() const override;\n        };\n\n        // ----------------------------------\n        // Container storing raw object pointer\n        // ----------------------------------\n        template<typename _type>\n        struct PointerDataContainer : public TPoolContainer<PointerDataContainer<_type>>\n        {\n            // Stored raw pointer.\n            _type* data = nullptr;\n\n            // Initializes container with raw pointer.\n            explicit PointerDataContainer(_type* d);\n\n            // Destroys container.\n            ~PointerDataContainer() override = default;\n\n            // Returns stored pointer.\n            void* GetData() const override;\n\n            // Tries to cast stored pointer to IObject.\n            IObject* TryCastToIObject() const override;\n\n            // Returns pointed object type.\n            const Type* GetType() const override;\n\n            // Clones current container.\n            IDataContainer* Clone() const override;\n        };\n\n        // ------------------------------------\n        // Base interface for native callables\n        // ------------------------------------\n        struct IFunctionContainer : public IDataContainer\n        {\n            // Invokes stored callable.\n            virtual jerry_value_t Invoke(jerry_value_t thisValue, jerry_value_t* args, int argsCount) = 0;\n        };\n\n        // -----------------------------------\n        // Base interface for setter wrappers\n        // -----------------------------------\n        struct ISetterWrapperContainer : public IDataContainer\n        {\n            // Writes converted value into wrapped target.\n            virtual void Set(jerry_value_t value) = 0;\n        };\n\n        // -----------------------------------\n        // Base interface for getter wrappers\n        // -----------------------------------\n        struct IGetterWrapperContainer : public IDataContainer\n        {\n            // Reads wrapped value and converts it to JerryScript value.\n            virtual jerry_value_t Get() = 0;\n        };\n\n        // ---------------------------------------------\n        // Base interface for prototype property getters\n        // ---------------------------------------------\n        struct IPrototypeGetter : public IDataContainer\n        {\n            // Reads prototype-backed value from target object.\n            virtual jerry_value_t GetFrom(jerry_value_t this_val) = 0;\n        };\n\n        // ---------------------------------------------\n        // Base interface for prototype property setters\n        // ---------------------------------------------\n        struct IPrototypeSetter : public IDataContainer\n        {\n            // Writes prototype-backed value to target object.\n            virtual void SetTo(jerry_value_t this_val, jerry_value_t value) = 0;\n        };\n\n        // ---------------------------------------\n        // Setter wrapper around direct data pointer\n        // ---------------------------------------\n        template<typename _type>\n        struct PointerSetterWrapperContainer : public TPoolContainer<PointerSetterWrapperContainer<_type>, ISetterWrapperContainer>\n        {\n            // Wrapped value pointer.\n            _type* dataPtr = nullptr;\n\n            // Converts and writes passed value.\n            void Set(jerry_value_t value) override;\n        };\n\n        // ---------------------------------------\n        // Getter wrapper around direct data pointer\n        // ---------------------------------------\n        template<typename _type>\n        struct PointerGetterWrapperContainer : public TPoolContainer<PointerGetterWrapperContainer<_type>, IGetterWrapperContainer>\n        {\n            // Wrapped value pointer.\n            _type* dataPtr = nullptr;\n\n            // Reads wrapped value.\n            jerry_value_t Get() override;\n        };\n\n        // -----------------------------------------\n        // Setter wrapper around reflected property\n        // -----------------------------------------\n        template<typename _property_type>\n        struct PropertySetterWrapperContainer : public TPoolContainer<PropertySetterWrapperContainer<_property_type>, ISetterWrapperContainer>\n        {\n            // Wrapped property pointer.\n            _property_type* propertyPtr = nullptr;\n\n            // Converts and writes passed value.\n            void Set(jerry_value_t value) override;\n        };\n\n        // -----------------------------------------\n        // Getter wrapper around reflected property\n        // -----------------------------------------\n        template<typename _property_type>\n        struct PropertyGetterWrapperContainer : public TPoolContainer<PropertyGetterWrapperContainer<_property_type>, IGetterWrapperContainer>\n        {\n            // Wrapped property pointer.\n            _property_type* propertyPtr = nullptr;\n\n            // Reads wrapped property value.\n            jerry_value_t Get() override;\n        };\n\n        // ----------------------------------------\n        // Setter wrapper around functional binding\n        // ----------------------------------------\n        template<typename _type>\n        struct FunctionalSetterWrapperContainer : public TPoolContainer<FunctionalSetterWrapperContainer<_type>, ISetterWrapperContainer>\n        {\n            // Bound setter callback.\n            Function<void(const _type& value)> setter;\n\n            // Converts and forwards passed value.\n            void Set(jerry_value_t value) override;\n        };\n\n        // ----------------------------------------\n        // Getter wrapper around functional binding\n        // ----------------------------------------\n        template<typename _type>\n        struct FunctionalGetterWrapperContainer : public TPoolContainer<FunctionalGetterWrapperContainer<_type>, IGetterWrapperContainer>\n        {\n            // Bound getter callback.\n            Function<_type()> getter;\n\n            // Reads value through callback.\n            jerry_value_t Get() override;\n        };\n\n        // ---------------------------------------\n        // JerryScript native pointer finalizer\n        // ---------------------------------------\n        struct DataContainerDeleter\n        {\n            // JerryScript native info descriptor.\n            jerry_object_native_info_t info;\n\n            // Initializes native info descriptor.\n            DataContainerDeleter();\n\n            // Frees native container instance.\n            static void Free(void* ptr);\n        };\n\n        // Returns shared native-container deleter descriptor.\n        static DataContainerDeleter& GetDataDeleter();\n\n        // Returns native container bound to JerryScript object.\n        static IDataContainer* GetNativeContainer(jerry_value_t jval);\n\n        // Allocates and constructs pooled container.\n        template<typename _container, typename ... _args>\n        static _container* CreateContainer(_args&&... args);\n\n        // Destroys and frees pooled container.\n        template<typename _container>\n        static void DestroyContainer(_container* container);\n\n        // Allocates raw memory for native container.\n        static void* AllocateContainerMemory(size_t size, size_t alignment = alignof(std::max_align_t));\n\n        // Frees raw memory allocated for native container.\n        static void  FreeContainerMemory(void* ptr);\n\n    protected:\n        // JerryScript callback for wrapped native functions.\n        static jerry_value_t CallFunction(const jerry_value_t function_obj,\n                                          const jerry_value_t this_val,\n                                          const jerry_value_t args_p[],\n                                          const jerry_length_t args_count);\n\n        // JerryScript callback for property setter wrappers.\n        static jerry_value_t DescriptorSetter(const jerry_value_t function_obj,\n                                              const jerry_value_t this_val,\n                                              const jerry_value_t args_p[],\n                                              const jerry_length_t args_count);\n\n        // JerryScript callback for property getter wrappers.\n        static jerry_value_t DescriptorGetter(const jerry_value_t function_obj,\n                                              const jerry_value_t this_val,\n                                              const jerry_value_t args_p[],\n                                              const jerry_length_t args_count);\n\n        // JerryScript callback for prototype property getters.\n        static jerry_value_t PrototypeDescriptorGetter(const jerry_value_t function_obj,\n                                                       const jerry_value_t this_val,\n                                                       const jerry_value_t args_p[],\n                                                       const jerry_length_t args_count);\n\n        // JerryScript callback for prototype property setters.\n        static jerry_value_t PrototypeDescriptorSetter(const jerry_value_t function_obj,\n                                                       const jerry_value_t this_val,\n                                                       const jerry_value_t args_p[],\n                                                       const jerry_length_t args_count);\n\n        friend class ScriptEngine;\n    };\n\n    template<typename _container, typename _base>\n    void ScriptValueBase::TPoolContainer<_container, _base>::Destroy()\n    {\n        ScriptValueBase::DestroyContainer(static_cast<_container*>(this));\n    }\n\n    template<typename _container, typename ... _args>\n    _container* ScriptValueBase::CreateContainer(_args&&... args)\n    {\n        void* memory = AllocateContainerMemory(sizeof(_container), alignof(_container));\n        return new (memory) _container(std::forward<_args>(args)...);\n    }\n\n    template<typename _container>\n    void ScriptValueBase::DestroyContainer(_container* container)\n    {\n        if (!container)\n            return;\n\n        container->~_container();\n        FreeContainerMemory(container);\n    }\n}\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/JerryScript/ScriptValueContainerAllocator.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"o2/Scripts/JerryScript/ScriptValueContainerAllocator.h\"\n\n#include <algorithm>\n#include <array>\n#include <limits>\n\nnamespace o2\n{\n    namespace\n    {\n        static constexpr UInt16 kDirectContainerAllocationClass = std::numeric_limits<UInt16>::max();\n        static constexpr size_t kContainerChunkTargetSize = 16*1024;\n        static constexpr size_t kContainerChunkMinSlots = 32;\n        static constexpr std::array<size_t, ScriptContainerAllocator::SizeClassesCount> kContainerPayloadSizeClasses =\n            { 32, 48, 64, 96, 128, 192, 256, 384, 512 };\n\n        static size_t AlignUp(size_t value, size_t alignment)\n        {\n            size_t remainder = value % alignment;\n            return remainder == 0 ? value : value + alignment - remainder;\n        }\n    }\n\n    void ScriptContainerSizeClass::Initialize(size_t payloadSize)\n    {\n        mPayloadSize = payloadSize;\n        mSlotSize = AlignUp(sizeof(ScriptContainerAllocationHeader) + mPayloadSize, alignof(std::max_align_t));\n    }\n\n    void ScriptContainerSizeClass::WarmUp(size_t targetChunkSize, size_t minSlots)\n    {\n        if (!mFreeList)\n            AddChunk(targetChunkSize, minSlots);\n    }\n\n    void* ScriptContainerSizeClass::Allocate(size_t targetChunkSize, size_t minSlots)\n    {\n        if (!mFreeList)\n            AddChunk(targetChunkSize, minSlots);\n\n        auto* slot = mFreeList;\n        mFreeList = slot->next;\n        return slot;\n    }\n\n    void ScriptContainerSizeClass::Free(void* slotMemory)\n    {\n        auto* slot = reinterpret_cast<ScriptContainerFreeSlot*>(slotMemory);\n        slot->next = mFreeList;\n        mFreeList = slot;\n    }\n\n    void ScriptContainerSizeClass::ReleaseAllChunks()\n    {\n        for (auto* chunkMemory : mChunks)\n            mfree(chunkMemory);\n\n        mChunks.clear();\n        mFreeList = nullptr;\n    }\n\n    void ScriptContainerSizeClass::AddChunk(size_t targetChunkSize, size_t minSlots)\n    {\n        size_t slotsPerChunk = std::max(minSlots, targetChunkSize/mSlotSize);\n        void* chunkMemory = mmalloc(mSlotSize*slotsPerChunk);\n        mChunks.push_back(chunkMemory);\n\n        auto* chunkBytes = reinterpret_cast<std::byte*>(chunkMemory);\n        for (size_t i = 0; i < slotsPerChunk; i++)\n            Free(chunkBytes + i*mSlotSize);\n    }\n\n    ScriptContainerAllocator::ScriptContainerAllocator()\n    {\n        InitializeSizeClasses();\n    }\n\n    ScriptContainerAllocator::~ScriptContainerAllocator()\n    {\n        for (auto& sizeClass : mSizeClasses)\n            sizeClass.ReleaseAllChunks();\n    }\n\n    ScriptContainerAllocator& ScriptContainerAllocator::GetInstance()\n    {\n        static auto* instance = mnew ScriptContainerAllocator();\n        return *instance;\n    }\n\n    void* ScriptContainerAllocator::Allocate(size_t size, size_t alignment)\n    {\n        if (alignment <= alignof(std::max_align_t))\n        {\n            int sizeClassIdx = FindSizeClass(size);\n            if (sizeClassIdx >= 0)\n            {\n                auto* header = reinterpret_cast<ScriptContainerAllocationHeader*>(\n                    mSizeClasses[(size_t)sizeClassIdx].Allocate(kContainerChunkTargetSize, kContainerChunkMinSlots));\n                header->sizeClass = (UInt16)sizeClassIdx;\n                return header + 1;\n            }\n        }\n\n        size_t allocationSize = AlignUp(sizeof(ScriptContainerAllocationHeader) + size, alignof(std::max_align_t));\n        auto* header = reinterpret_cast<ScriptContainerAllocationHeader*>(mmalloc(allocationSize));\n        header->sizeClass = kDirectContainerAllocationClass;\n        return header + 1;\n    }\n\n    void ScriptContainerAllocator::Free(void* ptr)\n    {\n        if (!ptr)\n            return;\n\n        auto* header = reinterpret_cast<ScriptContainerAllocationHeader*>(ptr) - 1;\n        if (header->sizeClass == kDirectContainerAllocationClass)\n        {\n            mfree(header);\n            return;\n        }\n\n        mSizeClasses[header->sizeClass].Free(header);\n    }\n\n    void ScriptContainerAllocator::InitializeSizeClasses()\n    {\n        for (size_t i = 0; i < mSizeClasses.size(); i++)\n        {\n            mSizeClasses[i].Initialize(kContainerPayloadSizeClasses[i]);\n\n            if (kContainerPayloadSizeClasses[i] <= 128)\n                mSizeClasses[i].WarmUp(kContainerChunkTargetSize, kContainerChunkMinSlots);\n        }\n    }\n\n    int ScriptContainerAllocator::FindSizeClass(size_t size)\n    {\n        for (size_t i = 0; i < kContainerPayloadSizeClasses.size(); i++)\n        {\n            if (size <= kContainerPayloadSizeClasses[i])\n                return (int)i;\n        }\n\n        return -1;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/JerryScript/ScriptValueContainerAllocator.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/CommonTypes.h\"\n\n#include <array>\n#include <cstddef>\n#include <vector>\n\nnamespace o2\n{\n    // -----------------------------------------------------------\n    // Allocation header stored before each script container object\n    // -----------------------------------------------------------\n    struct alignas(std::max_align_t) ScriptContainerAllocationHeader\n    {\n        // Allocator size class index or direct-allocation marker.\n        UInt16 sizeClass = 0;\n\n        // Reserved for future allocator metadata.\n        UInt16 reserved = 0;\n    };\n\n    // ------------------------------------\n    // Free-list node for pooled allocation\n    // ------------------------------------\n    struct ScriptContainerFreeSlot\n    {\n        // Next free slot in the current size class.\n        ScriptContainerFreeSlot* next = nullptr;\n    };\n\n    // ---------------------------------------\n    // Single allocator bucket for one slot size\n    // ---------------------------------------\n    class ScriptContainerSizeClass\n    {\n    public:\n        // Initializes size class for specified payload size.\n        void Initialize(size_t payloadSize);\n\n        // Preallocates first chunk for frequently used bucket.\n        void WarmUp(size_t targetChunkSize, size_t minSlots);\n\n        // Allocates memory slot from current size class.\n        void* Allocate(size_t targetChunkSize, size_t minSlots);\n\n        // Returns slot back into free list.\n        void Free(void* slotMemory);\n\n        // Releases all chunks owned by current size class.\n        void ReleaseAllChunks();\n\n    private:\n        // Allocates one more chunk and appends its slots to the free list.\n        void AddChunk(size_t targetChunkSize, size_t minSlots);\n\n    private:\n        // Maximum payload size supported by current bucket.\n        size_t mPayloadSize = 0;\n\n        // Full slot size including allocation header.\n        size_t mSlotSize = 0;\n\n        // Head of the free-list for this bucket.\n        ScriptContainerFreeSlot* mFreeList = nullptr;\n\n        // Owned raw chunk allocations.\n        std::vector<void*> mChunks;\n    };\n\n    // ----------------------------------------------------\n    // Small-object allocator for ScriptValue data containers\n    // ----------------------------------------------------\n    class ScriptContainerAllocator\n    {\n    public:\n        static constexpr size_t SizeClassesCount = 9;\n\n    public:\n        // Initializes pooled size classes.\n        ScriptContainerAllocator();\n\n        // Releases all pooled chunks.\n        ~ScriptContainerAllocator();\n\n        // Returns shared allocator instance.\n        static ScriptContainerAllocator& GetInstance();\n\n        // Allocates container memory with requested size and alignment.\n        void* Allocate(size_t size, size_t alignment);\n\n        // Frees memory previously returned by Allocate().\n        void Free(void* ptr);\n\n    private:\n        // Initializes all predefined size classes.\n        void InitializeSizeClasses();\n\n        // Returns index of first matching size class.\n        static int FindSizeClass(size_t size);\n\n    private:\n        // Predefined pooled size classes.\n        std::array<ScriptContainerSizeClass, SizeClassesCount> mSizeClasses;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/JerryScript/ScriptValueConverters.h",
    "content": "#pragma once\n\n#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    template<typename _type, typename _enable /*= void*/>\n    void ScriptValue::Converter<_type, _enable>::Read(__type& value, const ScriptValue& data)\n    {\n        if constexpr (std::is_pointer<__type>::value)\n            value = (__type)data.GetContainingObject();\n        else if (auto objPtr = (__type*)data.GetContainingObject())\n            value = *objPtr;\n    }\n\n    template<typename _type, typename _enable /*= void*/>\n    void ScriptValue::Converter<_type, _enable>::Write(const __type& value, ScriptValue& data)\n    {\n        data.jvalue = jerry_create_object();\n        if constexpr (std::is_pointer<__type>::value)\n            data.SetContainingObject(value);\n        else\n        {\n            auto dataContainer = ScriptValueBase::CreateContainer<ScriptValueBase::DataContainer<__type>>(value);\n            jerry_set_object_native_pointer(data.jvalue, (ScriptValueBase::IDataContainer*)dataContainer,\n                                             &ScriptValueBase::GetDataDeleter().info);\n        }\n    }\n\n    template<>\n    struct ScriptValue::Converter<ScriptValue>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const ScriptValue& value, ScriptValue& data)\n        {\n            data = value;\n        }\n\n        static void Read(ScriptValue& value, const ScriptValue& data)\n        {\n            value = data;\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<char*>\n    {\n        static constexpr bool isSupported = true;\n\n        using charPtr = char*;\n\n        static void Write(const charPtr& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_string((jerry_char_t*)(value));\n        }\n\n        static void Read(charPtr& value, const ScriptValue& data)\n        {\n            jerry_string_to_char_buffer(data.jvalue, (jerry_char_t*)value, 256);\n        }\n    };\n\n    template<UInt _size>\n    struct ScriptValue::Converter<char[_size]>\n    {\n        static constexpr bool isSupported = true;\n\n        using charPtr = char[_size];\n\n        static void Write(const charPtr& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_string((jerry_char_t*)(value));\n        }\n\n        static void Read(charPtr& value, const ScriptValue& data)\n        {\n            jerry_string_to_char_buffer(data.jvalue, (jerry_char_t*)value, _size);\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<const char*>\n    {\n        static constexpr bool isSupported = true;\n\n        using charPtr = const char*;\n\n        static void Write(const charPtr& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_string((jerry_char_t*)(value));\n        }\n\n        static void Read(charPtr& value, const ScriptValue& data)\n        {}\n    };\n\n    template<>\n    struct ScriptValue::Converter<bool>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const bool& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_boolean(value);\n        }\n\n        static void Read(bool& value, const ScriptValue& data)\n        {\n            value = jerry_value_to_boolean(data.jvalue);\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<int>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const int& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_number((double)value);\n        }\n\n        static void Read(int& value, const ScriptValue& data)\n        {\n            value = (int)jerry_value_as_integer(data.jvalue);\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<UInt>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const UInt& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_number((double)value);\n        }\n\n        static void Read(UInt& value, const ScriptValue& data)\n        {\n            value = (UInt)jerry_value_as_integer(data.jvalue);\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<Int64>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Int64& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_number((double)value);\n        }\n\n        static void Read(Int64& value, const ScriptValue& data)\n        {\n            value = (Int64)jerry_value_as_integer(data.jvalue);\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<UInt64>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const UInt64& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_number((double)value);\n        }\n\n        static void Read(UInt64& value, const ScriptValue& data)\n        {\n            value = (UInt64)jerry_value_as_integer(data.jvalue);\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<double>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const double& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_number(value);\n        }\n\n        static void Read(double& value, const ScriptValue& data)\n        {\n            value = jerry_get_number_value(data.jvalue);\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<float>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const float& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_number((double)value);\n        }\n\n        static void Read(float& value, const ScriptValue& data)\n        {\n            value = (float)jerry_get_number_value(data.jvalue);\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<String>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const String& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_string((jerry_char_t*)value.Data());\n        }\n\n        static void Read(String& value, const ScriptValue& data)\n        {\n            value.resize(jerry_get_string_length(data.jvalue));\n            jerry_string_to_char_buffer(data.jvalue, (jerry_char_t*)value.Data(), value.Capacity());\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<UID>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const UID& value, ScriptValue& data)\n        {\n            data.SetValue((String)value);\n        }\n\n        static void Read(UID& value, const ScriptValue& data)\n        {\n            String buf = data.GetValue<String>();\n            value = buf;\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<Vec2F>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Vec2F& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_object();\n            data.SetPrototype(*ScriptValuePrototypes::GetVec2Prototype());\n            data.SetProperty(ScriptValuePropertyKeys::GetX(), ScriptValue(value.x));\n            data.SetProperty(ScriptValuePropertyKeys::GetY(), ScriptValue(value.y));\n        }\n\n        static void Read(Vec2F& value, const ScriptValue& data)\n        {\n            value.x = data.GetProperty(ScriptValuePropertyKeys::GetX()).GetValue<float>();\n            value.y = data.GetProperty(ScriptValuePropertyKeys::GetY()).GetValue<float>();\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<Vec2I>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Vec2I& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_object();\n            data.SetPrototype(*ScriptValuePrototypes::GetVec2Prototype());\n            data.SetProperty(ScriptValuePropertyKeys::GetX(), ScriptValue(value.x));\n            data.SetProperty(ScriptValuePropertyKeys::GetY(), ScriptValue(value.y));\n        }\n\n        static void Read(Vec2I& value, const ScriptValue& data)\n        {\n            value.x = data.GetProperty(ScriptValuePropertyKeys::GetX()).GetValue<int>();\n            value.y = data.GetProperty(ScriptValuePropertyKeys::GetY()).GetValue<int>();\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<RectF>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const RectF& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_object();\n            data.SetPrototype(*ScriptValuePrototypes::GetRectPrototype());\n            data.SetProperty(ScriptValuePropertyKeys::GetLeft(), ScriptValue(value.left));\n            data.SetProperty(ScriptValuePropertyKeys::GetBottom(), ScriptValue(value.bottom));\n            data.SetProperty(ScriptValuePropertyKeys::GetRight(), ScriptValue(value.right));\n            data.SetProperty(ScriptValuePropertyKeys::GetTop(), ScriptValue(value.top));\n        }\n\n        static void Read(RectF& value, const ScriptValue& data)\n        {\n            value.left = data.GetProperty(ScriptValuePropertyKeys::GetLeft()).GetValue<float>();\n            value.bottom = data.GetProperty(ScriptValuePropertyKeys::GetBottom()).GetValue<float>();\n            value.right = data.GetProperty(ScriptValuePropertyKeys::GetRight()).GetValue<float>();\n            value.top = data.GetProperty(ScriptValuePropertyKeys::GetTop()).GetValue<float>();\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<RectI>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const RectI& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_object();\n            data.SetPrototype(*ScriptValuePrototypes::GetRectPrototype());\n            data.SetProperty(ScriptValuePropertyKeys::GetLeft(), ScriptValue(value.left));\n            data.SetProperty(ScriptValuePropertyKeys::GetBottom(), ScriptValue(value.bottom));\n            data.SetProperty(ScriptValuePropertyKeys::GetRight(), ScriptValue(value.right));\n            data.SetProperty(ScriptValuePropertyKeys::GetTop(), ScriptValue(value.top));\n        }\n\n        static void Read(RectI& value, const ScriptValue& data)\n        {\n            value.left = data.GetProperty(ScriptValuePropertyKeys::GetLeft()).GetValue<int>();\n            value.bottom = data.GetProperty(ScriptValuePropertyKeys::GetBottom()).GetValue<int>();\n            value.right = data.GetProperty(ScriptValuePropertyKeys::GetRight()).GetValue<int>();\n            value.top = data.GetProperty(ScriptValuePropertyKeys::GetTop()).GetValue<int>();\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<BorderF>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const BorderF& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_object();\n            data.SetPrototype(*ScriptValuePrototypes::GetBorderPrototype());\n            data.SetProperty(ScriptValuePropertyKeys::GetLeft(), ScriptValue(value.left));\n            data.SetProperty(ScriptValuePropertyKeys::GetBottom(), ScriptValue(value.bottom));\n            data.SetProperty(ScriptValuePropertyKeys::GetRight(), ScriptValue(value.right));\n            data.SetProperty(ScriptValuePropertyKeys::GetTop(), ScriptValue(value.top));\n        }\n\n        static void Read(BorderF& value, const ScriptValue& data)\n        {\n            value.left = data.GetProperty(ScriptValuePropertyKeys::GetLeft()).GetValue<float>();\n            value.bottom = data.GetProperty(ScriptValuePropertyKeys::GetBottom()).GetValue<float>();\n            value.right = data.GetProperty(ScriptValuePropertyKeys::GetRight()).GetValue<float>();\n            value.top = data.GetProperty(ScriptValuePropertyKeys::GetTop()).GetValue<float>();\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<BorderI>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const BorderI& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_object();\n            data.SetPrototype(*ScriptValuePrototypes::GetBorderPrototype());\n            data.SetProperty(ScriptValuePropertyKeys::GetLeft(), ScriptValue(value.left));\n            data.SetProperty(ScriptValuePropertyKeys::GetBottom(), ScriptValue(value.bottom));\n            data.SetProperty(ScriptValuePropertyKeys::GetRight(), ScriptValue(value.right));\n            data.SetProperty(ScriptValuePropertyKeys::GetTop(), ScriptValue(value.top));\n        }\n\n        static void Read(BorderI& value, const ScriptValue& data)\n        {\n            value.left = data.GetProperty(ScriptValuePropertyKeys::GetLeft()).GetValue<int>();\n            value.bottom = data.GetProperty(ScriptValuePropertyKeys::GetBottom()).GetValue<int>();\n            value.right = data.GetProperty(ScriptValuePropertyKeys::GetRight()).GetValue<int>();\n            value.top = data.GetProperty(ScriptValuePropertyKeys::GetTop()).GetValue<int>();\n        }\n    };\n\n    template<>\n    struct ScriptValue::Converter<Color4>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Color4& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_object();\n            data.SetPrototype(*ScriptValuePrototypes::GetColor4Prototype());\n            data.SetProperty(ScriptValuePropertyKeys::GetR(), ScriptValue(value.r));\n            data.SetProperty(ScriptValuePropertyKeys::GetG(), ScriptValue(value.g));\n            data.SetProperty(ScriptValuePropertyKeys::GetB(), ScriptValue(value.b));\n            data.SetProperty(ScriptValuePropertyKeys::GetA(), ScriptValue(value.a));\n        }\n\n        static void Read(Color4& value, const ScriptValue& data)\n        {\n            value.r = data.GetProperty(ScriptValuePropertyKeys::GetR()).GetValue<int>();\n            value.g = data.GetProperty(ScriptValuePropertyKeys::GetG()).GetValue<int>();\n            value.b = data.GetProperty(ScriptValuePropertyKeys::GetB()).GetValue<int>();\n            value.a = data.GetProperty(ScriptValuePropertyKeys::GetA()).GetValue<int>();\n        }\n    };\n\n    template<typename _ptr_type>\n    struct ScriptValue::Converter<_ptr_type, typename std::enable_if<std::is_pointer<_ptr_type>::value && !std::is_const<_ptr_type>::value &&\n        std::is_base_of<o2::IObject, typename std::remove_pointer<_ptr_type>::type>::value>::type>\n    {\n        static constexpr bool isSupported = true;\n\n        typedef typename std::remove_const<typename std::remove_pointer<typename std::remove_reference<_ptr_type>::type>::type>::type _non_ptr_type;\n\n        static void Write(const _ptr_type& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_undefined();\n            if (value)\n            {\n                data = ScriptValue::EmptyObject();\n                data.SetContainingObject(const_cast<_non_ptr_type*>(value));\n            }\n        }\n\n        static void Read(_ptr_type& value, const ScriptValue& data)\n        {\n            auto dataContainer = GetNativeContainer(data.jvalue);\n            if (dataContainer)\n            {\n                auto object = dataContainer->TryCastToIObject();\n                value = dynamic_cast<_ptr_type>(object);\n            }\n            else\n                value = nullptr;\n        }\n    };\n\n    template<typename T>\n    struct ScriptValue::Converter<Ref<T>, void_t<decltype(std::declval<T*>()->GetScriptValue())>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Ref<T>& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_undefined();\n            if (value)\n                data = value->GetScriptValue();\n        }\n\n        static void Read(Ref<T>& value, const ScriptValue& data)\n        {\n            auto dataContainer = GetNativeContainer(data.jvalue);\n            if (dataContainer)\n            {\n                auto* object = dataContainer->TryCastToIObject();\n                T* typed = dynamic_cast<T*>(object);\n                value = typed ? Ref<T>(typed) : Ref<T>();\n            }\n            else\n                value = Ref<T>();\n        }\n    };\n\n    template<typename T>\n    struct ScriptValue::Converter<Vector<T>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Vector<T>& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_array(0);\n\n            for (auto& v : value)\n                data.AddElement(ScriptValue(v));\n        }\n\n        static void Read(Vector<T>& value, const ScriptValue& data)\n        {\n            if (data.GetValueType() == ValueType::Array)\n            {\n                value.Clear();\n                for (int i = 0; i < data.GetLength(); i++)\n                    value.Add(data[i].GetValue<T>());\n            }\n        }\n    };\n\n    template<typename _key, typename _value>\n    struct ScriptValue::Converter<Map<_key, _value>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Map<_key, _value>& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_object();\n\n            for (auto& kv : value)\n                data.SetProperty(ScriptValue(kv.first), ScriptValue(kv.second));\n        }\n\n        static void Read(Map<_key, _value>& value, const ScriptValue& data)\n        {\n            if (data.GetValueType() == ValueType::Object)\n            {\n                value.Clear();\n                data.ForEachProperties([&](const ScriptValue& propName, const ScriptValue& propValue) {\n                    value[propName.GetValue<_key>()] = propValue.GetValue<_value>();\n                    return true;\n                });\n            }\n        }\n    };\n\n    template<typename T>\n    struct ScriptValue::Converter<T, typename std::enable_if<std::is_enum<T>::value>::type>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const T& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_undefined();\n            data.SetValue(Reflection::GetEnumName<T>(value));\n        }\n\n        static void Read(T& value, const ScriptValue& data)\n        {\n            if (data.GetValueType() == ValueType::Number)\n                value = (T)data.GetValue<int>();\n            else\n                value = Reflection::GetEnumValue<T>(data.GetValue<String>());\n        }\n    };\n\n    template<typename T>\n    struct ScriptValue::Converter<T, typename std::enable_if<IsProperty<T>::value>::type>\n    {\n        static constexpr bool isSupported = ScriptValue::Converter<typename T::valueType>::isSupported;\n        using TValueType = typename T::valueType;\n\n        static void Write(const T& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_undefined();\n            data.SetValue(value.Get());\n        }\n\n        static void Read(T& value, const ScriptValue& data)\n        {\n            value.Set(data.GetValue<TValueType>());\n        }\n    };\n\n    template<typename _res_type, typename ... _args>\n    struct ScriptValue::Converter<Function<_res_type(_args ...)>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Function<_res_type(_args ...)>& value, ScriptValue& data)\n        {\n            data.jvalue = jerry_create_external_function(&CallFunction);\n\n            IDataContainer* funcContainer = ScriptValueBase::CreateContainer<ScriptFunctionContainer<Function<_res_type(_args ...)>, _res_type, _args ...>>(value);\n\n            jerry_set_object_native_pointer(data.jvalue, funcContainer, &GetDataDeleter().info);\n        }\n\n        static void Read(Function<_res_type(_args ...)>& value, const ScriptValue& data)\n        {\n            value = [dataCopy = data](_args ... args)\n            {\n                return dataCopy.Invoke<_res_type, _args ...>(args ...);\n            };\n        }\n    };\n}\n\n#endif // SCRIPTING_BACKEND_JERRYSCRIPT\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/JerryScript/ScriptValueImpl.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#include \"o2/Scripts/ScriptValueDef.h\"\n#include \"o2/Scripts/JerryScript/ScriptValueContainerAllocator.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n\n#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n#include \"o2/Scripts/ScriptValue.h\"\n\nnamespace o2\n{\n    ScriptValueBase::~ScriptValueBase()\n    {\n        jerry_release_value(jvalue);\n    }\n\n    void ScriptValueBase::AcquireValue(jerry_value_t v)\n    {\n        jerry_release_value(jvalue);\n        jvalue = jerry_acquire_value(v);\n    }\n\n    ScriptValue ScriptValue::EmptyObject()\n    {\n        ScriptValue res;\n        res.Accept(jerry_create_object());\n        return res;\n    }\n\n    ScriptValue ScriptValue::EmptyArray()\n    {\n        ScriptValue res;\n        res.Accept(jerry_create_array(0));\n        return res;\n    }\n\n    void ScriptValueBase::Accept(jerry_value_t v)\n    {\n        jerry_release_value(jvalue);\n        jvalue = v;\n    }\n\n    ScriptValue::ScriptValue()\n    {\n        jvalue = jerry_create_undefined();\n    }\n\n    ScriptValue::ScriptValue(const ScriptValue& other)\n    {\n        jvalue = jerry_acquire_value(other.jvalue);\n    }\n\n    ScriptValue::ScriptValue(ScriptValue&& other) noexcept\n    {\n        jvalue = other.jvalue;\n        other.jvalue = jerry_create_undefined();\n    }\n\n    ScriptValue ScriptValue::operator[](const ScriptValue& name) const\n    {\n        return GetProperty(name);\n    }\n\n    ScriptValue ScriptValue::operator[](int idx) const\n    {\n        ScriptValue res;\n        res.Accept(jerry_get_property_by_index(jvalue, idx));\n        return res;\n    }\n\n    bool ScriptValue::operator!=(const ScriptValue& other) const\n    {\n        return !operator==(other);\n    }\n\n    bool ScriptValue::operator==(const ScriptValue& other) const\n    {\n        ScriptValue res;\n        res.Accept(jerry_binary_operation(JERRY_BIN_OP_EQUAL, jvalue, other.jvalue));\n        return res.ToBool();\n    }\n\n    ScriptValue& ScriptValue::operator=(const ScriptValue& other)\n    {\n        jerry_release_value(jvalue);\n        jvalue = jerry_acquire_value(other.jvalue);\n        return *this;\n    }\n\n    ScriptValue& ScriptValue::operator=(ScriptValue&& other) noexcept\n    {\n        if (this != &other)\n        {\n            jerry_release_value(jvalue);\n            jvalue = other.jvalue;\n            other.jvalue = jerry_create_undefined();\n        }\n        return *this;\n    }\n\n    ScriptValue::ValueType ScriptValue::GetValueType() const\n    {\n        if (jerry_value_is_array(jvalue))\n            return ValueType::Array;\n\n        return (ValueType)jerry_value_get_type(jvalue);\n    }\n\n    bool ScriptValue::IsConstructor() const\n    {\n        return jerry_value_is_constructor(jvalue);\n    }\n\n    bool ScriptValue::IsUndefined() const\n    {\n        return GetValueType() == ValueType::Undefined;\n    }\n\n    ScriptValue ScriptValue::Copy() const\n    {\n        auto type = GetValueType();\n        if (type == ValueType::Array) \n        {\n            ScriptValue res = EmptyArray();\n            int length = GetLength();\n            for (int i = 0; i < length; i++)\n                res.AddElement(GetElement(i).Copy());\n\n            return res;\n        }\n        else if (type == ValueType::Object)\n        {    \n            ScriptValue res;\n            ForEachProperties([&](const ScriptValue &name, const ScriptValue &value) {\n                res.SetProperty(name, value.Copy());\n                return true;\n            });\n\n            res.SetPrototype(GetPrototype());\n\n            auto dataContainer = GetNativeContainer(jvalue);\n            if (dataContainer)\n            {\n                auto clonedDataContainer = dataContainer->Clone();\n                jerry_set_object_native_pointer(res.jvalue, clonedDataContainer, &GetDataDeleter().info);\n            }\n\n            return res;\n        }\n\n        return *this;\n    }\n\n    int ScriptValue::GetLength() const\n    {\n        if (!jerry_value_is_array(jvalue))\n            return 0;\n\n        return jerry_get_array_length(jvalue);\n    }\n\n    String ScriptValue::GetError() const\n    {\n        if (GetValueType() != ValueType::Error)\n            return String();\n\n        auto errorJValue = jerry_get_value_from_error(jvalue, true);\n\n        ScriptValue errorValue;\n        errorValue.Accept(jerry_value_to_string(errorJValue));\n\n        jerry_release_value(errorJValue);\n\n        return errorValue.GetValue<String>();\n    }\n\n    bool ScriptValue::IsObjectContainer() const\n    {\n        if (!IsObject())\n            return false;\n\n        void* dataPtr = nullptr;\n        jerry_get_object_native_pointer(jvalue, &dataPtr, &GetDataDeleter().info);\n        return dataPtr != nullptr;\n    }\n\n    const Type* ScriptValue::GetObjectContainerType() const\n    {\n        if (!IsObject())\n            return nullptr;\n\n        void* dataPtr = nullptr;\n        jerry_get_object_native_pointer(jvalue, &dataPtr, &GetDataDeleter().info);\n        auto dataContainer = (IDataContainer*)dataPtr;\n        if (dataContainer)\n            return dataContainer->GetType();\n\n        return nullptr;\n    }\n\n    void* ScriptValue::GetContainingObject() const\n    {\n        if (!IsObject())\n            return nullptr;\n\n        void* dataPtr = nullptr;\n        jerry_get_object_native_pointer(jvalue, &dataPtr, &GetDataDeleter().info);\n        auto dataContainer = (IDataContainer*)dataPtr;\n        if (dataContainer)\n            return dataContainer->GetData();\n\n        return nullptr;\n    }\n\n    ScriptValue ScriptValue::Construct(const Vector<ScriptValue>& args)\n    {\n        const int maxParameters = 16;\n        jerry_value_t valuesBuf[maxParameters];\n        for (int i = 0; i < args.Count() && i < maxParameters; i++)\n            valuesBuf[i] = args[i].jvalue;\n\n        ScriptValue res;\n        res.Accept(jerry_construct_object(jvalue, valuesBuf, args.Count()));\n        return res;\n    }\n\n    void ScriptValue::ForEachProperties(const Function<bool(const ScriptValue& name, const ScriptValue& value)>& func, \n                                        bool withPrototypes /*= true*/) const\n    {\n        if (GetValueType() != ValueType::Object)\n            return;\n\n        auto allProperties = GetPropertyNames();\n        int length = allProperties.GetLength();\n        for (int i = 0; i < length; i++)\n        {\n            ScriptValue key = allProperties.GetElement(i);\n            ScriptValue value = GetProperty(key);\n            if (!func(key, value))\n                return;\n        }\n\n        if (withPrototypes)\n            GetPrototype().ForEachProperties(func, withPrototypes);\n    }\n\n    ScriptValue ScriptValue::GetProperty(const ScriptValue& name) const\n    {\n        if (GetValueType() != ValueType::Object)\n        {\n            jerry_release_value(jvalue);\n            jvalue = jerry_create_object();\n        }\n\n        ScriptValue res;\n        res.Accept(jerry_get_property(jvalue, name.jvalue));\n        return res;\n    }\n\n    ScriptValue ScriptValue::GetInternalProperty(const ScriptValue& name) const\n    {\n        ScriptValue res;\n        res.Accept(jerry_get_internal_property(jvalue, name.jvalue));\n        return res;\n    }\n\n    ScriptValue ScriptValue::GetOwnProperty(const ScriptValue& name) const\n    {\n        ScriptValue res;\n\n        jerry_property_descriptor_t descr;\n        jerry_init_property_descriptor_fields(&descr);\n\n        if (jerry_get_own_property_descriptor(jvalue, name.jvalue, &descr))\n            res.AcquireValue(descr.value);\n\n        jerry_free_property_descriptor_fields(&descr);\n\n        return res;\n    }\n\n    ScriptValue ScriptValue::GetPropertyNames() const\n    {\n        ScriptValue res;\n\n        jerry_property_filter_t filter = (jerry_property_filter_t)(JERRY_PROPERTY_FILTER_ALL \n            | JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS\n            | JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE\n            | JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE\n            | JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE\n            | JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES\n            | JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER\n        );\n\n        res.AcquireValue(jerry_object_get_property_names(jvalue, filter));\n\n        return res;\n    }\n\n    void ScriptValue::SetInternalProperty(const ScriptValue& name, const ScriptValue& value)\n    {\n        jerry_set_internal_property(jvalue, name.jvalue, value.jvalue);\n    }\n\n    void ScriptValue::SetProperty(const ScriptValue& name, const ScriptValue& value)\n    {\n        if (GetValueType() != ValueType::Object)\n        {\n            jerry_release_value(jvalue);\n            jvalue = jerry_create_object();\n        }\n\n        jerry_set_property(jvalue, name.jvalue, value.jvalue);\n    }\n\n    void ScriptValue::RemoveProperty(const ScriptValue& name)\n    {\n        jerry_delete_property(jvalue, name.jvalue);\n    }\n\n    void ScriptValue::SetPrototype(const ScriptValue& proto)\n    {\n        ScriptValue res;\n        res.Accept(jerry_set_prototype(jvalue, proto.jvalue));\n    }\n\n    ScriptValue ScriptValue::GetPrototype() const\n    {\n        ScriptValue res;\n        res.Accept(jerry_get_prototype(jvalue));\n        return res;\n    }\n\n    void ScriptValue::SetElement(const ScriptValue& value, int idx)\n    {\n        if (GetValueType() != ValueType::Array)\n        {\n            jerry_release_value(jvalue);\n            jvalue = jerry_create_array(0);\n        }\n\n        jerry_set_property_by_index(jvalue, idx, value.jvalue);\n    }\n\n    ScriptValue ScriptValue::GetElement(int idx) const\n    {\n        ScriptValue res;\n        res.Accept(jerry_get_property_by_index(jvalue, idx));\n        return res;\n    }\n\n    void ScriptValue::AddElement(const ScriptValue& value)\n    {\n        SetElement(value, GetLength());\n    }\n\n    void ScriptValue::RemoveElement(int idx)\n    {\n        jerry_delete_property_by_index(jvalue, idx);\n    }\n\n    bool ScriptValue::ToBool() const\n    {\n        return jerry_value_to_boolean(jvalue);\n    }\n\n    float ScriptValue::ToNumber() const\n    {\n        if (GetValueType() != ValueType::Number)\n        {\n            auto prev = jvalue;\n            jvalue = jerry_value_to_number(jvalue);\n            jerry_release_value(prev);\n        }\n\n        return (float)jerry_get_number_value(jvalue);\n    }\n\n    String ScriptValue::ToString() const\n    {\n        if (GetValueType() != ValueType::String)\n        {\n            auto prev = jvalue;\n            jvalue = jerry_value_to_string(jvalue);\n            jerry_release_value(prev);\n        }\n\n        String res;\n        res.resize(jerry_get_string_length(jvalue));\n        jerry_string_to_char_buffer(jvalue, (jerry_char_t*)res.Data(), res.Capacity());\n        return res;\n    }\n\n    ScriptValue ScriptValue::InvokeRaw(const Vector<ScriptValue>& args) const\n    {\n        return InvokeRaw(ScriptValue(), args);\n    }\n\n    ScriptValue ScriptValue::InvokeRaw(const ScriptValue& thisValue, const Vector<ScriptValue>& args) const\n    {\n        if (IsFunction())\n        {\n            const int maxParameters = 16;\n            jerry_value_t valuesBuf[maxParameters];\n            for (int i = 0; i < args.Count() && i < maxParameters; i++)\n                valuesBuf[i] = args[i].jvalue;\n\n            auto res = jerry_call_function(jvalue, thisValue.jvalue, valuesBuf, args.Count());\n\n            ScriptValue resValue;\n            resValue.Accept(res);\n\n            return resValue;\n        }\n\n        return {};\n    }\n\n    ScriptValueBase::DataContainerDeleter& ScriptValueBase::GetDataDeleter()\n    {\n        static DataContainerDeleter deleter;\n        return deleter;\n    }\n\n    ScriptValueBase::DataContainerDeleter::DataContainerDeleter()\n    {\n        info.free_cb = &Free;\n    }\n\n    void ScriptValueBase::DataContainerDeleter::Free(void* ptr)\n    {\n        auto* container = static_cast<IDataContainer*>(ptr);\n        if (container)\n            container->Destroy();\n    }\n\n    void* ScriptValueBase::AllocateContainerMemory(size_t size, size_t alignment)\n    {\n        return ScriptContainerAllocator::GetInstance().Allocate(size, alignment);\n    }\n\n    void ScriptValueBase::FreeContainerMemory(void* ptr)\n    {\n        ScriptContainerAllocator::GetInstance().Free(ptr);\n    }\n\n    ScriptValueBase::IDataContainer* ScriptValueBase::GetNativeContainer(jerry_value_t jval)\n    {\n        void* ptr = nullptr;\n        jerry_get_object_native_pointer(jval, &ptr, &GetDataDeleter().info);\n        return (IDataContainer*)ptr;\n    }\n\n    jerry_value_t ScriptValueBase::CallFunction(const jerry_value_t function_obj,\n                                                const jerry_value_t this_val,\n                                                const jerry_value_t args_p[], const jerry_length_t args_count)\n    {\n        auto container = static_cast<IFunctionContainer*>(GetNativeContainer(function_obj));\n        return container->Invoke(this_val, (jerry_value_t*)args_p, args_count);\n    }\n\n    jerry_value_t ScriptValueBase::DescriptorSetter(const jerry_value_t function_obj,\n                                                    const jerry_value_t this_val,\n                                                    const jerry_value_t args_p[],\n                                                    const jerry_length_t args_count)\n    {\n        auto container = static_cast<ISetterWrapperContainer*>(GetNativeContainer(function_obj));\n        container->Set(args_p[0]);\n\n        return jerry_create_undefined();\n    }\n\n    jerry_value_t ScriptValueBase::DescriptorGetter(const jerry_value_t function_obj,\n                                                    const jerry_value_t this_val,\n                                                    const jerry_value_t args_p[],\n                                                    const jerry_length_t args_count)\n    {\n        auto container = static_cast<IGetterWrapperContainer*>(GetNativeContainer(function_obj));\n        return container->Get();\n    }\n\n    jerry_value_t ScriptValueBase::PrototypeDescriptorGetter(const jerry_value_t function_obj,\n                                                             const jerry_value_t this_val,\n                                                             const jerry_value_t args_p[],\n                                                             const jerry_length_t args_count)\n    {\n        auto container = static_cast<IPrototypeGetter*>(GetNativeContainer(function_obj));\n        return container->GetFrom(this_val);\n    }\n\n    jerry_value_t ScriptValueBase::PrototypeDescriptorSetter(const jerry_value_t function_obj,\n                                                             const jerry_value_t this_val,\n                                                             const jerry_value_t args_p[],\n                                                             const jerry_length_t args_count)\n    {\n        auto container = static_cast<IPrototypeSetter*>(GetNativeContainer(function_obj));\n        container->SetTo(this_val, args_p[0]);\n        return jerry_create_undefined();\n    }\n\n    ScriptValue*& ScriptValuePrototypes::GetVec2Prototype()\n    {\n        static ScriptValue* value;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePrototypes::GetRectPrototype()\n    {\n        static ScriptValue* value;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePrototypes::GetBorderPrototype()\n    {\n        static ScriptValue* value;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePrototypes::GetColor4Prototype()\n    {\n        static ScriptValue* value;\n        return value;\n    }\n\n    namespace\n    {\n        const ScriptValue& GetCachedPropertyKey(ScriptValue*& storage, const char* name)\n        {\n            if (!storage)\n                storage = mnew ScriptValue(name);\n\n            return *storage;\n        }\n\n        void ReleaseCachedScriptValue(ScriptValue*& value)\n        {\n            delete value;\n            value = nullptr;\n        }\n    }\n\n    void ScriptValuePropertyKeys::Initialize()\n    {\n        GetX();\n        GetY();\n        GetLeft();\n        GetBottom();\n        GetRight();\n        GetTop();\n        GetR();\n        GetG();\n        GetB();\n        GetA();\n    }\n\n    void ScriptValuePropertyKeys::Deinitialize()\n    {\n        ReleaseCachedScriptValue(XStorage());\n        ReleaseCachedScriptValue(YStorage());\n        ReleaseCachedScriptValue(LeftStorage());\n        ReleaseCachedScriptValue(BottomStorage());\n        ReleaseCachedScriptValue(RightStorage());\n        ReleaseCachedScriptValue(TopStorage());\n        ReleaseCachedScriptValue(RStorage());\n        ReleaseCachedScriptValue(GStorage());\n        ReleaseCachedScriptValue(BStorage());\n        ReleaseCachedScriptValue(AStorage());\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetX()\n    {\n        return GetCachedPropertyKey(XStorage(), \"x\");\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetY()\n    {\n        return GetCachedPropertyKey(YStorage(), \"y\");\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetLeft()\n    {\n        return GetCachedPropertyKey(LeftStorage(), \"left\");\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetBottom()\n    {\n        return GetCachedPropertyKey(BottomStorage(), \"bottom\");\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetRight()\n    {\n        return GetCachedPropertyKey(RightStorage(), \"right\");\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetTop()\n    {\n        return GetCachedPropertyKey(TopStorage(), \"top\");\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetR()\n    {\n        return GetCachedPropertyKey(RStorage(), \"r\");\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetG()\n    {\n        return GetCachedPropertyKey(GStorage(), \"g\");\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetB()\n    {\n        return GetCachedPropertyKey(BStorage(), \"b\");\n    }\n\n    const ScriptValue& ScriptValuePropertyKeys::GetA()\n    {\n        return GetCachedPropertyKey(AStorage(), \"a\");\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::XStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::YStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::LeftStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::BottomStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::RightStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::TopStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::RStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::GStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::BStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    ScriptValue*& ScriptValuePropertyKeys::AStorage()\n    {\n        static ScriptValue* value = nullptr;\n        return value;\n    }\n\n    void FixNamespace(String& path)\n    {\n        path.ReplaceAll(\"::\", \"\");\n        path.ReplaceAll(\"<\", \"_\");\n        path.ReplaceAll(\">\", \"\");\n        path.ReplaceAll(\"_o2\", \"\");\n    }\n\n    int FindNamespaceDel(const String& path)\n    {\n        int fnd = -1;\n        int braces = 0;\n        for (int i = 0; i < path.Length(); i++)\n        {\n            if (path[i] == '<')\n                braces++;\n\n            if (path[i] == '>')\n                braces--;\n\n            if (i > 0 && path[i] == ':' && path[i - 1] == ':' && braces == 0)\n            {\n                fnd = i - 1;\n                break;\n            }\n        }\n\n        return fnd;\n    }\n\n    ScriptValue GetNameSpace(ScriptValue base, const String& path)\n    {\n        int fnd = FindNamespaceDel(path);\n\n        auto subPath = fnd >= 0 ? path.SubStr(0, fnd) : path;\n        FixNamespace(subPath);\n\n        ScriptValue subPathValue(subPath);\n        ScriptValue subPathProp = base.GetProperty(subPathValue);\n        if (subPathProp.GetValueType() == ScriptValue::ValueType::Undefined)\n        {\n            subPathProp = ScriptValue::EmptyObject();\n            base.SetProperty(ScriptValue(subPath), subPathProp);\n        }\n\n        if (fnd < 0)\n            return subPathProp;\n\n        return GetNameSpace(subPathProp, path.SubStr(fnd + 2));\n    }\n\n    ScriptValue GetNameSpaceAndConstructor(ScriptValue base, const String& path, String& constructor)\n    {\n        int fnd = FindNamespaceDel(path);\n\n        auto subPath = fnd >= 0 ? path.SubStr(0, fnd) : path;\n        FixNamespace(subPath);\n\n        if (fnd < 0)\n        {\n            constructor = subPath;\n            return base;\n        }\n\n        ScriptValue subPathValue(subPath);\n        ScriptValue subPathProp = base.GetProperty(subPathValue);\n        if (subPathProp.GetValueType() == ScriptValue::ValueType::Undefined)\n        {\n            subPathProp = ScriptValue::EmptyObject();\n            base.SetProperty(ScriptValue(subPath), subPathProp);\n        }\n\n        return GetNameSpaceAndConstructor(subPathProp, path.SubStr(fnd + 2), constructor);\n    }\n\n    void ScriptPrototypeProcessor::RegisterTypeConstructor(Type* type, ScriptValue& constructorFunc)\n    {\n        String constructor;\n        auto nspace = GetNameSpaceAndConstructor(o2Scripts.GetGlobal(), type->GetName(), constructor);\n        ScriptValue proto;\n        proto.SetProperty(\"type\", ScriptValue(type));\n        constructorFunc.SetPrototype(proto);\n        nspace.SetProperty(constructor.Data(), constructorFunc);\n    }\n\n    void ScriptPrototypeProcessor::RegisterTypeStaticFunction(Type* type, const char* name, const ScriptValue& func)\n    {\n        GetNameSpace(o2Scripts.GetGlobal(), type->GetName()).SetProperty(name, func);\n    }\n}\n\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/JerryScript/ScriptValueImpl.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Reflection/TypeTraits.h\"\n#include \"o2/Utils/Reflection/BaseTypeProcessor.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include <type_traits>\n#include <functional>\n\n#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n\nnamespace o2\n{\n    // Helper to detect Ref<T>\n    template<typename T> struct IsRefType : std::false_type {};\n    template<typename T> struct IsRefType<Ref<T>> : std::true_type {};\n\n    template<typename T> struct RefInnerType { using type = T; };\n    template<typename T> struct RefInnerType<Ref<T>> { using type = T; };\n\n    // Helper to extract types from member function pointers\n    template<typename _type> struct MemberFuncTraits;\n\n    template<typename _class_type, typename _res_type, typename ... _args>\n    struct MemberFuncTraits<_res_type(_class_type::*)(_args ...)>\n    {\n        using ClassType = _class_type;\n        using ResType = _res_type;\n        using ArgsTuple = std::tuple<_args ...>;\n        static constexpr size_t Arity = sizeof...(_args);\n        static constexpr bool IsConst = false;\n        template<size_t _idx> using ArgType = std::tuple_element_t<_idx, ArgsTuple>;\n    };\n\n    template<typename _class_type, typename _res_type, typename ... _args>\n    struct MemberFuncTraits<_res_type(_class_type::*)(_args ...) const>\n    {\n        using ClassType = _class_type;\n        using ResType = _res_type;\n        using ArgsTuple = std::tuple<_args ...>;\n        static constexpr size_t Arity = sizeof...(_args);\n        static constexpr bool IsConst = true;\n        template<size_t _idx> using ArgType = std::tuple_element_t<_idx, ArgsTuple>;\n    };\n\n    // ------------------------------\n    // DataContainer - stores by value\n    // ------------------------------\n\n    template<typename _type>\n    ScriptValueBase::DataContainer<_type>::DataContainer(const _type& d) :\n        data(d)\n    {}\n\n    template<typename _type>\n    ScriptValueBase::DataContainer<_type>::DataContainer(_type&& d) :\n        data(std::move(d))\n    {}\n\n    template<typename _type>\n    void* ScriptValueBase::DataContainer<_type>::GetData() const\n    {\n        if constexpr (IsRefType<_type>::value)\n            return data.Get();\n        else if constexpr (std::is_const<_type>::value)\n            return nullptr;\n        else\n            return const_cast<_type*>(&data);\n    }\n\n    template<typename _type>\n    IObject* ScriptValueBase::DataContainer<_type>::TryCastToIObject() const\n    {\n        if constexpr (IsRefType<_type>::value)\n        {\n            using inner = typename RefInnerType<_type>::type;\n            if constexpr (std::is_base_of<IObject, inner>::value && std::is_convertible_v<inner*, IObject*>)\n                return dynamic_cast<IObject*>(data.Get());\n        }\n        else if constexpr (std::is_base_of<IObject, _type>::value && std::is_convertible_v<_type*, IObject*>)\n        {\n            return dynamic_cast<IObject*>(const_cast<_type*>(&data));\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    const Type* ScriptValueBase::DataContainer<_type>::GetType() const\n    {\n        if constexpr (IsRefType<_type>::value)\n            return &TypeOf(typename RefInnerType<_type>::type);\n        else\n            return &TypeOf(_type);\n    }\n\n    template<typename _type>\n    ScriptValueBase::IDataContainer* ScriptValueBase::DataContainer<_type>::Clone() const\n    {\n        if constexpr (std::is_copy_constructible<_type>::value)\n            return CreateContainer<DataContainer<_type>>(data);\n        else\n            return nullptr;\n    }\n\n    template<typename _type>\n    ScriptValueBase::PointerDataContainer<_type>::PointerDataContainer(_type* d) :\n        data(d)\n    {}\n\n    template<typename _type>\n    void* ScriptValueBase::PointerDataContainer<_type>::GetData() const\n    {\n        return data;\n    }\n\n    template<typename _type>\n    IObject* ScriptValueBase::PointerDataContainer<_type>::TryCastToIObject() const\n    {\n        if constexpr (std::is_base_of<IObject, _type>::value && std::is_convertible_v<_type*, IObject*>)\n            return dynamic_cast<IObject*>(data);\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    const Type* ScriptValueBase::PointerDataContainer<_type>::GetType() const\n    {\n        return &TypeOf(_type);\n    }\n\n    template<typename _type>\n    ScriptValueBase::IDataContainer* ScriptValueBase::PointerDataContainer<_type>::Clone() const\n    {\n        return CreateContainer<PointerDataContainer<_type>>(data);\n    }\n\n    // -------------------------------------------------------\n    // Function containers - store callable by value, override\n    // Invoke directly for minimal overhead\n    // -------------------------------------------------------\n\n    template<typename T>\n    static auto ConvertJerryArg(jerry_value_t* args, size_t index, int count)\n        -> typename RemoveConstAndRef<T>::type\n    {\n        using CleanT = typename RemoveConstAndRef<T>::type;\n        if (index >= (size_t)count) return CleanT{};\n        ScriptValue tmp;\n        tmp.AcquireValue(args[index]);\n        return tmp.GetValue<CleanT>();\n    }\n\n    template<typename _invocable_type, typename _res_type, typename ... _args>\n    struct ScriptFunctionContainer : public ScriptValueBase::TPoolContainer<ScriptFunctionContainer<_invocable_type, _res_type, _args...>, ScriptValueBase::IFunctionContainer>\n    {\n        _invocable_type data;\n\n        ScriptFunctionContainer(const _invocable_type& function) : data(function) {}\n        ScriptFunctionContainer(_invocable_type&& function) : data(std::move(function)) {}\n\n        jerry_value_t Invoke(jerry_value_t thisValue, jerry_value_t* args, int argsCount) override\n        {\n            return InvokeImpl(args, argsCount, std::index_sequence_for<_args...>{});\n        }\n\n        template<size_t... Is>\n        jerry_value_t InvokeImpl(jerry_value_t* args, int argsCount, std::index_sequence<Is...>)\n        {\n            if constexpr (std::is_void<_res_type>::value)\n            {\n                data(ConvertJerryArg<_args>(args, Is, argsCount)...);\n                return jerry_create_undefined();\n            }\n            else\n            {\n                ScriptValue res(data(ConvertJerryArg<_args>(args, Is, argsCount)...));\n                return jerry_acquire_value(res.jvalue);\n            }\n        }\n    };\n\n    template<typename _invocable_type, typename _res_type, typename ... _args>\n    struct ScriptThisFunctionContainer : public ScriptValueBase::TPoolContainer<ScriptThisFunctionContainer<_invocable_type, _res_type, _args...>, ScriptValueBase::IFunctionContainer>\n    {\n        _invocable_type data;\n\n        ScriptThisFunctionContainer(const _invocable_type& function) : data(function) {}\n\n        jerry_value_t Invoke(jerry_value_t thisValue, jerry_value_t* args, int argsCount) override\n        {\n            ScriptValue thisObj;\n            thisObj.AcquireValue(thisValue);\n            return InvokeImpl(thisObj, args, argsCount, std::index_sequence_for<_args...>{});\n        }\n\n        template<size_t... Is>\n        jerry_value_t InvokeImpl(ScriptValue& thisObj, jerry_value_t* args, int argsCount, std::index_sequence<Is...>)\n        {\n            if constexpr (std::is_void<_res_type>::value)\n            {\n                data(thisObj, ConvertJerryArg<_args>(args, Is, argsCount)...);\n                return jerry_create_undefined();\n            }\n            else\n            {\n                ScriptValue res(data(thisObj, ConvertJerryArg<_args>(args, Is, argsCount)...));\n                return jerry_acquire_value(res.jvalue);\n            }\n        }\n    };\n\n    template<typename Callable, typename PMF>\n    struct ThunkMethodHandler;\n\n    template<typename Callable, typename _class, typename _res, typename... _args>\n    struct ThunkMethodHandler<Callable, _res(_class::*)(_args...)>\n    {\n        template<size_t... Is>\n        static jerry_value_t Invoke(_class* obj, const jerry_value_t* args, int count, std::index_sequence<Is...>)\n        {\n            Callable callable{};\n            if constexpr (std::is_void_v<_res>)\n            {\n                callable(obj, ConvertJerryArg<_args>((jerry_value_t*)args, Is, count)...);\n                return jerry_create_undefined();\n            }\n            else\n            {\n                ScriptValue res(callable(obj, ConvertJerryArg<_args>((jerry_value_t*)args, Is, count)...));\n                return jerry_acquire_value(res.jvalue);\n            }\n        }\n\n        static jerry_value_t Handle(const jerry_value_t function_obj,\n                                    const jerry_value_t this_val,\n                                    const jerry_value_t args_p[],\n                                    const jerry_length_t args_count)\n        {\n            auto container = ScriptValueBase::GetNativeContainer(this_val);\n            if (!container) return jerry_create_undefined();\n\n            _class* thisObj = dynamic_cast<_class*>(container->TryCastToIObject());\n            if (!thisObj) return jerry_create_undefined();\n\n            return Invoke(thisObj, args_p, (int)args_count, std::index_sequence_for<_args...>{});\n        }\n    };\n\n    template<typename Callable, typename _class, typename _res, typename... _args>\n    struct ThunkMethodHandler<Callable, _res(_class::*)(_args...) const>\n    {\n        template<size_t... Is>\n        static jerry_value_t Invoke(_class* obj, const jerry_value_t* args, int count, std::index_sequence<Is...>)\n        {\n            Callable callable{};\n            if constexpr (std::is_void_v<_res>)\n            {\n                callable(obj, ConvertJerryArg<_args>((jerry_value_t*)args, Is, count)...);\n                return jerry_create_undefined();\n            }\n            else\n            {\n                ScriptValue res(callable(obj, ConvertJerryArg<_args>((jerry_value_t*)args, Is, count)...));\n                return jerry_acquire_value(res.jvalue);\n            }\n        }\n\n        static jerry_value_t Handle(const jerry_value_t function_obj,\n                                    const jerry_value_t this_val,\n                                    const jerry_value_t args_p[],\n                                    const jerry_length_t args_count)\n        {\n            auto container = ScriptValueBase::GetNativeContainer(this_val);\n            if (!container) return jerry_create_undefined();\n\n            _class* thisObj = dynamic_cast<_class*>(container->TryCastToIObject());\n            if (!thisObj) return jerry_create_undefined();\n\n            return Invoke(thisObj, args_p, (int)args_count, std::index_sequence_for<_args...>{});\n        }\n    };\n\n    // -------------------------------------------------------\n    // Prototype-based field getter/setter containers\n    // -------------------------------------------------------\n\n    template<typename _object_type, typename _field_type>\n    struct PrototypeFieldGetter : public ScriptValueBase::TPoolContainer<PrototypeFieldGetter<_object_type, _field_type>, ScriptValueBase::IPrototypeGetter>\n    {\n        void* (*pointerGetter)(void*) = nullptr;\n\n        jerry_value_t GetFrom(jerry_value_t this_val) override\n        {\n            auto container = ScriptValueBase::GetNativeContainer(this_val);\n            if (!container) return jerry_create_undefined();\n\n            auto objectPtr = static_cast<_object_type*>(container->GetData());\n            if (!objectPtr) return jerry_create_undefined();\n\n            auto fieldPtr = static_cast<_field_type*>(pointerGetter(objectPtr));\n\n            ScriptValue tmp;\n            if constexpr (IsProperty<_field_type>::value)\n                tmp.SetValue<typename ExtractPropertyValueType<_field_type>::type>(fieldPtr->Get());\n            else\n                tmp.SetValue<_field_type>(*fieldPtr);\n\n            return jerry_acquire_value(tmp.jvalue);\n        }\n    };\n\n    template<typename _object_type, typename _field_type>\n    struct PrototypeFieldSetter : public ScriptValueBase::TPoolContainer<PrototypeFieldSetter<_object_type, _field_type>, ScriptValueBase::IPrototypeSetter>\n    {\n        void* (*pointerGetter)(void*) = nullptr;\n\n        void SetTo(jerry_value_t this_val, jerry_value_t value) override\n        {\n            auto container = ScriptValueBase::GetNativeContainer(this_val);\n            if (!container) return;\n\n            auto objectPtr = static_cast<_object_type*>(container->GetData());\n            if (!objectPtr) return;\n\n            auto fieldPtr = static_cast<_field_type*>(pointerGetter(objectPtr));\n\n            ScriptValue tmp;\n            tmp.AcquireValue(value);\n\n            if constexpr (IsProperty<_field_type>::value)\n                fieldPtr->Set(tmp.GetValue<typename ExtractPropertyValueType<_field_type>::type>());\n            else\n                *fieldPtr = tmp.GetValue<_field_type>();\n        }\n    };\n\n    // -------------------------------------------------------\n    // Wrapper container implementations\n    // -------------------------------------------------------\n\n    template<typename _type>\n    jerry_value_t ScriptValueBase::PointerGetterWrapperContainer<_type>::Get()\n    {\n        ScriptValue tmp;\n        tmp.SetValue<_type>(*dataPtr);\n        return jerry_acquire_value(tmp.jvalue);\n    }\n\n    template<typename _type>\n    void ScriptValueBase::PointerSetterWrapperContainer<_type>::Set(jerry_value_t value)\n    {\n        ScriptValue tmp;\n        tmp.AcquireValue(value);\n        *dataPtr = tmp.GetValue<_type>();\n    }\n\n    template<typename _property_type>\n    jerry_value_t ScriptValueBase::PropertyGetterWrapperContainer<_property_type>::Get()\n    {\n        ScriptValue tmp;\n        tmp.SetValue<typename ExtractPropertyValueType<_property_type>::type>(propertyPtr->Get());\n        return jerry_acquire_value(tmp.jvalue);\n    }\n\n    template<typename _property_type>\n    void ScriptValueBase::PropertySetterWrapperContainer<_property_type>::Set(jerry_value_t value)\n    {\n        ScriptValue tmp;\n        tmp.AcquireValue(value);\n        propertyPtr->Set(tmp.GetValue<typename ExtractPropertyValueType<_property_type>::type>());\n    }\n\n    template<typename _type>\n    jerry_value_t ScriptValueBase::FunctionalGetterWrapperContainer<_type>::Get()\n    {\n        ScriptValue tmp;\n        tmp.SetValue<_type>(getter());\n        return jerry_acquire_value(tmp.jvalue);\n    }\n\n    template<typename _type>\n    void ScriptValueBase::FunctionalSetterWrapperContainer<_type>::Set(jerry_value_t value)\n    {\n        ScriptValue tmp;\n        tmp.AcquireValue(value);\n        setter(tmp.GetValue<_type>());\n    }\n\n    // --------------------------\n    // ScriptValue implementation\n    // --------------------------\n\n    template<typename _type>\n    ScriptValue::ScriptValue(const _type& value)\n    {\n        Converter<_type>::Write(value, *this);\n    }\n\n    template<typename _type>\n    ScriptValue::operator _type() const\n    {\n        _type res;\n        Converter<_type>::Read(res, *this);\n        return std::move(res);\n    }\n\n    template<typename _type>\n    ScriptValue& ScriptValue::operator=(const _type& value)\n    {\n        SetValue(value);\n        return *this;\n    }\n\n    template<typename _type>\n    void ScriptValue::SetValue(const _type& value)\n    {\n        jerry_release_value(jvalue);\n        Converter<_type>::Write(value, *this);\n    }\n\n    template<typename _type>\n    _type ScriptValue::GetValue() const\n    {\n        _type res;\n        Converter<_type>::Read(res, *this);\n        return std::move(res);\n    }\n\n    template<typename ... _args>\n    ScriptValue ScriptValue::Construct(_args ... args) const\n    {\n        Vector<ScriptValue> argsValues;\n\n        if constexpr (sizeof...(_args) > 0)\n            PackArgs(argsValues, args ...);\n\n        return Construct(argsValues);\n    }\n\n    template<typename T, typename = void>\n    struct HasRefCounterMethod : std::false_type {};\n\n    template<typename T>\n    struct HasRefCounterMethod<T, std::void_t<decltype(std::declval<const T&>().GetStrongReferencesCount())>> : std::true_type {};\n\n    template<typename _type>\n    void ScriptValue::SetContainingObject(_type* object)\n    {\n        if (!object)\n        {\n            *this = ScriptValue();\n            return;\n        }\n\n        if constexpr (HasRefCounterMethod<_type>::value)\n        {\n            auto dataContainer = CreateContainer<DataContainer<Ref<_type>>>(Ref<_type>(object));\n            jerry_set_object_native_pointer(jvalue, (IDataContainer*)dataContainer, &GetDataDeleter().info);\n        }\n        else if constexpr (std::is_base_of<IObject, _type>::value)\n        {\n            auto dataContainer = CreateContainer<PointerDataContainer<_type>>(object);\n            jerry_set_object_native_pointer(jvalue, (IDataContainer*)dataContainer, &GetDataDeleter().info);\n        }\n        else if constexpr (!std::is_abstract<_type>::value && std::is_copy_constructible<_type>::value)\n        {\n            auto dataContainer = CreateContainer<DataContainer<_type>>(*object);\n            jerry_set_object_native_pointer(jvalue, (IDataContainer*)dataContainer, &GetDataDeleter().info);\n        }\n\n        if constexpr (std::is_base_of<IObject, _type>::value)\n        {\n            SetPrototype(_type::GetScriptPrototype());\n        }\n    }\n\n    template<typename _type>\n    void ScriptValue::SetProperty(const char* name, const _type& value)\n    {\n        SetProperty(ScriptValue(name), ScriptValue(value));\n    }\n\n    template<typename _type>\n    void ScriptValue::SetPropertyWrapper(const ScriptValue& name, _type& value)\n    {\n        if (GetValueType() != ValueType::Object)\n        {\n            jerry_release_value(jvalue);\n            jvalue = jerry_create_object();\n        }\n\n        jerry_property_descriptor_t propertyDescriptor;\n        jerry_init_property_descriptor_fields(&propertyDescriptor);\n\n        propertyDescriptor.is_enumerable = true;\n        propertyDescriptor.is_enumerable_defined = true;\n\n        propertyDescriptor.is_get_defined = true;\n        propertyDescriptor.getter = jerry_create_external_function(DescriptorGetter);\n\n        if constexpr (IsProperty<_type>::value)\n        {\n            auto getterWrapperContainer = CreateContainer<PropertyGetterWrapperContainer<_type>>();\n            getterWrapperContainer->propertyPtr = &value;\n            jerry_set_object_native_pointer(propertyDescriptor.getter, getterWrapperContainer, &GetDataDeleter().info);\n        }\n        else\n        {\n            auto getterWrapperContainer = CreateContainer<PointerGetterWrapperContainer<_type>>();\n            getterWrapperContainer->dataPtr = &value;\n            jerry_set_object_native_pointer(propertyDescriptor.getter, getterWrapperContainer, &GetDataDeleter().info);\n        }\n\n        propertyDescriptor.is_set_defined = true;\n        propertyDescriptor.setter = jerry_create_external_function(DescriptorSetter);\n\n        if constexpr (IsProperty<_type>::value)\n        {\n            auto setterWrapperContainer = CreateContainer<PropertySetterWrapperContainer<_type>>();\n            setterWrapperContainer->propertyPtr = &value;\n            jerry_set_object_native_pointer(propertyDescriptor.setter, setterWrapperContainer, &GetDataDeleter().info);\n        }\n        else\n        {\n            auto setterWrapperContainer = CreateContainer<PointerSetterWrapperContainer<_type>>();\n            setterWrapperContainer->dataPtr = &value;\n            jerry_set_object_native_pointer(propertyDescriptor.setter, setterWrapperContainer, &GetDataDeleter().info);\n        }\n\n        jerry_value_t newPropertyValue = jerry_define_own_property(jvalue, name.jvalue, &propertyDescriptor);\n        jerry_release_value(newPropertyValue);\n\n        jerry_free_property_descriptor_fields(&propertyDescriptor);\n    }\n\n    template<typename _type>\n    void ScriptValue::SetPropertyWrapper(const ScriptValue& name, const Function<void(const _type& value)>& setter,\n                                         const Function<_type()>& getter)\n    {\n        if (GetValueType() != ValueType::Object)\n        {\n            jerry_release_value(jvalue);\n            jvalue = jerry_create_object();\n        }\n\n        jerry_property_descriptor_t propertyDescriptor;\n        jerry_init_property_descriptor_fields(&propertyDescriptor);\n\n        propertyDescriptor.is_enumerable = true;\n        propertyDescriptor.is_enumerable_defined = true;\n\n        propertyDescriptor.is_get_defined = true;\n        propertyDescriptor.getter = jerry_create_external_function(DescriptorGetter);\n        auto getterWrapperContainer = CreateContainer<FunctionalGetterWrapperContainer<_type>>();\n        getterWrapperContainer->getter = getter;\n        jerry_set_object_native_pointer(propertyDescriptor.getter, getterWrapperContainer, &GetDataDeleter().info);\n\n        propertyDescriptor.is_set_defined = true;\n        propertyDescriptor.setter = jerry_create_external_function(DescriptorSetter);\n        auto setterWrapperContainer = CreateContainer<FunctionalSetterWrapperContainer<_type>>();\n        setterWrapperContainer->setter = setter;\n        jerry_set_object_native_pointer(propertyDescriptor.setter, setterWrapperContainer, &GetDataDeleter().info);\n\n        jerry_value_t newPropertyValue = jerry_define_own_property(jvalue, name.jvalue, &propertyDescriptor);\n        jerry_release_value(newPropertyValue);\n\n        jerry_free_property_descriptor_fields(&propertyDescriptor);\n    }\n\n    template<typename _object_type, typename _field_type>\n    void ScriptValue::SetPrototypePropertyWrapper(const ScriptValue& name, void* (*pointerGetter)(void*))\n    {\n        if (GetValueType() != ValueType::Object)\n        {\n            jerry_release_value(jvalue);\n            jvalue = jerry_create_object();\n        }\n\n        jerry_property_descriptor_t propertyDescriptor;\n        jerry_init_property_descriptor_fields(&propertyDescriptor);\n\n        propertyDescriptor.is_enumerable = true;\n        propertyDescriptor.is_enumerable_defined = true;\n\n        propertyDescriptor.is_get_defined = true;\n        propertyDescriptor.getter = jerry_create_external_function(PrototypeDescriptorGetter);\n        auto getterContainer = CreateContainer<PrototypeFieldGetter<_object_type, _field_type>>();\n        getterContainer->pointerGetter = pointerGetter;\n        jerry_set_object_native_pointer(propertyDescriptor.getter, getterContainer, &GetDataDeleter().info);\n\n        propertyDescriptor.is_set_defined = true;\n        propertyDescriptor.setter = jerry_create_external_function(PrototypeDescriptorSetter);\n        auto setterContainer = CreateContainer<PrototypeFieldSetter<_object_type, _field_type>>();\n        setterContainer->pointerGetter = pointerGetter;\n        jerry_set_object_native_pointer(propertyDescriptor.setter, setterContainer, &GetDataDeleter().info);\n\n        jerry_value_t newPropertyValue = jerry_define_own_property(jvalue, name.jvalue, &propertyDescriptor);\n        jerry_release_value(newPropertyValue);\n\n        jerry_free_property_descriptor_fields(&propertyDescriptor);\n    }\n\n    template<typename _res_type, typename ... _args>\n    _res_type ScriptValue::Invoke(_args ... args) const\n    {\n        return Invoke<_res_type, _args ...>(ScriptValue(), args ...);\n    }\n\n    template<typename _res_type, typename ... _args>\n    _res_type ScriptValue::Invoke(const ScriptValue& thisValue, _args ... args) const\n    {\n        Vector<ScriptValue> argsValues;\n\n        if constexpr (sizeof...(_args) > 0)\n            PackArgs(argsValues, args ...);\n\n        if constexpr (std::is_same<_res_type, void>::value)\n            InvokeRaw(thisValue, argsValues);\n        else\n            return InvokeRaw(thisValue, argsValues).GetValue<_res_type>();\n    }\n\n    template<typename _res_type, typename ... _args>\n    void ScriptValue::SetFunction(const Function<_res_type(ScriptValue, _args ...)>& func)\n    {\n        Accept(jerry_create_external_function(&CallFunction));\n\n        auto funcContainer = CreateContainer<ScriptThisFunctionContainer<Function<_res_type(ScriptValue, _args ...)>, _res_type, _args ...>>(func);\n\n        jerry_set_object_native_pointer(jvalue, (IDataContainer*)funcContainer, &GetDataDeleter().info);\n    }\n\n    // -------------------------------------------------------\n    // ScriptPrototypeProcessor - handles prototype setup for\n    // class methods and fields marked @SCRIPTABLE\n    // -------------------------------------------------------\n\n    class Type;\n\n    struct ScriptPrototypeProcessor : public BaseTypeProcessor\n    {\n        ScriptValue proto = ScriptValue::EmptyObject();\n        bool hasBaseClass = false;\n\n    public:\n        // --- Function processing ---\n\n        struct BaseFunctionProcessor : public BaseTypeProcessor::FunctionProcessor\n        {\n            ScriptPrototypeProcessor& processor;\n\n        public:\n            BaseFunctionProcessor(ScriptPrototypeProcessor& processor) : processor(processor) {}\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args);\n\n            BaseFunctionProcessor& SetProtectSection(ProtectSection section) { return *this; }\n        };\n\n        struct FunctionProcessor : public BaseFunctionProcessor\n        {\n            const char* customName = nullptr;\n\n            FunctionProcessor(const BaseFunctionProcessor& processor) :BaseFunctionProcessor(processor) {}\n\n            template<typename _object_type, typename ... _args>\n            void Constructor(_object_type* object, Type* type);\n\n            template<auto pointer, typename _object_type, typename _callable>\n            void Signature(_object_type* object, Type* type, const char* name, _callable callable);\n\n            template<typename _object_type, typename _res_type, typename ... _args>\n            void SignatureStatic(_object_type* object, Type* type, const char* name,\n                                 _res_type(*pointer)(_args ...));\n        };\n\n        BaseFunctionProcessor StartFunction() { return BaseFunctionProcessor(*this); }\n\n        // --- Field processing ---\n\n        struct BaseFieldProcessor\n        {\n            ScriptPrototypeProcessor& processor;\n            ProtectSection section = ProtectSection::Public;\n\n            BaseFieldProcessor(ScriptPrototypeProcessor& proc) : processor(proc) {}\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args);\n\n            template<typename _type>\n            BaseFieldProcessor& SetDefaultValue(const _type& value) { return *this; }\n\n            BaseFieldProcessor& SetProtectSection(ProtectSection sect)\n            {\n                section = sect;\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            BaseFieldProcessor& FieldBasics(_object_type* object, Type* type, const char* name,\n                                            void* (*pointerGetter)(void*), _field_type& field)\n            {\n                return *this;\n            }\n        };\n\n        struct FieldProcessor : public BaseFieldProcessor\n        {\n            FieldProcessor(ScriptPrototypeProcessor& proc, ProtectSection sect)\n                : BaseFieldProcessor(proc) { section = sect; }\n\n            template<typename _attribute_type, typename ... _args>\n            FieldProcessor& AddAttribute(_args ... args) { return *this; }\n\n            template<typename _type>\n            FieldProcessor& SetDefaultValue(const _type& value) { return *this; }\n\n            template<typename _object_type, typename _field_type>\n            FieldProcessor& FieldBasics(_object_type* object, Type* type, const char* name,\n                                        void* (*pointerGetter)(void*), _field_type& field)\n            {\n                if (section != ProtectSection::Public)\n                    return *this;\n\n                if constexpr (std::is_copy_constructible<_field_type>::value)\n                {\n                    _object_type::GetScriptPrototype().template SetPrototypePropertyWrapper<_object_type, _field_type>(\n                        ScriptValue(name), pointerGetter);\n                }\n\n                return *this;\n            }\n        };\n\n        BaseFieldProcessor StartField() { return BaseFieldProcessor(*this); }\n\n        // --- Base type and lifecycle ---\n\n        template<typename _object_type>\n        void Start(_object_type* object, Type* type) {}\n\n        template<typename _object_type>\n        void StartBases(_object_type* object, Type* type) {}\n\n        template<typename _object_type>\n        void StartFields(_object_type* object, Type* type) {}\n\n        template<typename _object_type>\n        void StartMethods(_object_type* object, Type* type) {}\n\n        template<typename _object_type, typename _base_type>\n        void BaseType(_object_type* object, Type* type, const char* name)\n        {\n            if (hasBaseClass)\n                return;\n\n            if constexpr (std::is_base_of<ISerializable, _base_type>::value && !std::is_same<ISerializable, _base_type>::value)\n            {\n                _object_type::GetScriptPrototype().SetPrototype(_base_type::GetScriptPrototype());\n                hasBaseClass = true;\n            }\n        }\n\n        static void RegisterTypeConstructor(Type* type, ScriptValue& constructorFunc);\n        static void RegisterTypeStaticFunction(Type* type, const char* name, const ScriptValue& func);\n    };\n\n    template<typename _attribute_type, typename ... _args>\n    auto ScriptPrototypeProcessor::BaseFunctionProcessor::AddAttribute(_args ... args)\n    {\n        if constexpr (std::is_same<ScriptableAttribute, _attribute_type>::value)\n        {\n            return ScriptPrototypeProcessor::FunctionProcessor(*this);\n        }\n        else if constexpr (std::is_same<ScriptableNameAttribute, _attribute_type>::value)\n        {\n            ScriptPrototypeProcessor::FunctionProcessor result(*this);\n            if constexpr (sizeof...(_args) > 0)\n                result.customName = std::get<0>(std::tuple<_args...>(args...));\n            return result;\n        }\n        else\n            return *this;\n    }\n\n    template<typename _attribute_type, typename ... _args>\n    auto ScriptPrototypeProcessor::BaseFieldProcessor::AddAttribute(_args ... args)\n    {\n        if constexpr (std::is_same<ScriptableAttribute, _attribute_type>::value)\n            return ScriptPrototypeProcessor::FieldProcessor(processor, section);\n        else\n            return *this;\n    }\n\n    template<typename _object_type, typename ... _script_args>\n    void RegisterScriptConstructor(Type* type)\n    {\n        ScriptValue thisFunc;\n        thisFunc.SetFunction<void, _script_args ...>(Function<void(ScriptValue thisValue, _script_args ...)>(\n            [](ScriptValue thisValue, _script_args ... args)\n            {\n                if constexpr (std::is_base_of<RefCounterable, _object_type>::value)\n                {\n                    auto sample = mmake<_object_type>(args ...);\n                    thisValue.SetContainingObject(sample.Get());\n                }\n                else\n                {\n                    _object_type* sample = mnew _object_type(args ...);\n                    thisValue.SetContainingObject(sample);\n                }\n                thisValue.SetPrototype(_object_type::GetScriptPrototype());\n            }));\n\n        ScriptPrototypeProcessor::RegisterTypeConstructor(type, thisFunc);\n    }\n\n    template<typename _object_type, typename _first, typename ... _rest>\n    void RegisterScriptConstructorStripped(Type* type, std::tuple<_first, _rest...>*)\n    {\n        RegisterScriptConstructor<_object_type, _rest...>(type);\n    }\n\n    template<typename _tuple>\n    struct FirstArgIsRefCounter : std::false_type {};\n\n    template<typename _first, typename ... _rest>\n    struct FirstArgIsRefCounter<std::tuple<_first, _rest...>>\n        : std::is_same<_first, RefCounter*> {};\n\n    template<typename _object_type, typename ... _args>\n    void ScriptPrototypeProcessor::FunctionProcessor::Constructor(_object_type* object, Type* type)\n    {\n        if constexpr (FirstArgIsRefCounter<std::tuple<_args...>>::value)\n        {\n            RegisterScriptConstructorStripped<_object_type>(type, static_cast<std::tuple<_args...>*>(nullptr));\n        }\n        else\n        {\n            RegisterScriptConstructor<_object_type, _args...>(type);\n        }\n    }\n\n    template<auto pointer, typename _object_type, typename _callable>\n    void ScriptPrototypeProcessor::FunctionProcessor::Signature(_object_type* object, Type* type, const char* name, _callable /*callable*/)\n    {\n        using PMF = decltype(pointer);\n        ScriptValue funcVal;\n        funcVal.Accept(jerry_create_external_function(&ThunkMethodHandler<_callable, PMF>::Handle));\n        const char* actualName = customName ? customName : name;\n        _object_type::GetScriptPrototype().SetProperty(actualName, funcVal);\n    }\n\n    template<typename _object_type, typename _res_type, typename ... _args>\n    void ScriptPrototypeProcessor::FunctionProcessor::SignatureStatic(_object_type* object, Type* type,\n                                                                            const char* name, _res_type(*pointer)(_args ...))\n    {\n        ScriptPrototypeProcessor::RegisterTypeStaticFunction(type, name, ScriptValue(Function<_res_type(_args ...)>(\n            [=](_args ... args) {\n                return (*pointer)(args ...);\n            })));\n    }\n\n    // Forward declarations for the IObject <-> DataValue bridge\n    // implemented in ScriptValue.cpp. Declared at namespace scope\n    // so that the block-scope uses inside Converter<ScriptValue>\n    // resolve to o2:: names instead of leaking to the global\n    // namespace under MSVC's lookup rules for block-scope extern.\n    void ScriptValueImpl_WriteIObjectToDataValue(IObject* object, DataValue& data);\n    bool ScriptValueImpl_ReadIObjectFromDataValue(const DataValue& data, ScriptValue& value);\n\n    template<>\n    struct DataValue::Converter<ScriptValue>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const ScriptValue& value, DataValue& data)\n        {\n            auto type = value.GetValueType();\n            if (type == ScriptValue::ValueType::Number)\n                data.Set(value.ToNumber());\n            else if (type == ScriptValue::ValueType::String)\n                data.Set(value.ToString());\n            else if (type == ScriptValue::ValueType::Bool)\n                data.Set(value.ToBool());\n            else if (type == ScriptValue::ValueType::Array)\n            {\n                int length = value.GetLength();\n                for (int i = 0; i < length; i++)\n                    data.AddElement().Set(value.GetElement(i));\n            }\n            else if (type == ScriptValue::ValueType::Object)\n            {\n                if (value.IsObjectContainer())\n                {\n                    if (auto objType = dynamic_cast<const ObjectType*>(value.GetObjectContainerType()))\n                    {\n                        IObject* object = objType->DynamicCastToIObject(value.GetContainingObject());\n                        ScriptValueImpl_WriteIObjectToDataValue(object, data);\n                    }\n                }\n                else\n                {\n                    value.ForEachProperties(\n                        [&](const ScriptValue& name, const ScriptValue& vvalue)\n                        {\n                            auto nameStr = name.ToString();\n                            if (nameStr[0] != '_')\n                                data[nameStr].Set(vvalue);\n                            return true;\n                        });\n                }\n            }\n            else\n                data.SetNull();\n        }\n\n        static void Read(ScriptValue& value, const DataValue& data)\n        {\n            if (data.IsNull())\n                value = ScriptValue();\n            else if (data.IsNumber())\n                value = (float)data;\n            else if (data.IsBoolean())\n                value = (bool)data;\n            else if (data.IsString())\n                value = String(data.GetString());\n            else if (data.IsArray())\n            {\n                for (auto& element : data)\n                {\n                    ScriptValue newElement;\n                    element.Get(newElement);\n                    value.AddElement(newElement);\n                }\n            }\n            else if (data.IsObject())\n            {\n                if (auto typeMember = data.FindMember(\"Type\"))\n                {\n                    ScriptValueImpl_ReadIObjectFromDataValue(data, value);\n                }\n                else\n                {\n                    for (auto it = data.BeginMember(); it != data.EndMember(); ++it)\n                    {\n                        ScriptValue itName;\n                        it->name.Get(itName);\n\n                        ScriptValue itValue;\n                        it->value.Get(itValue);\n\n                        auto oldProp = value.GetProperty(itName);\n                        if (oldProp.IsObject())\n                        {\n                            auto oldPropProto = oldProp.GetPrototype();\n                            if (oldPropProto.IsObject())\n                                itValue.SetPrototype(oldPropProto);\n                        }\n\n                        value.SetProperty(itName, itValue);\n                    }\n                }\n            }\n        }\n    };\n}\n\n#endif // SCRIPTING_BACKEND_JERRYSCRIPT\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/ScriptEngine.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"ScriptEngine.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n\nnamespace o2\n{\n    DECLARE_SINGLETON(ScriptEngine);\n\n    ScriptParseResult::operator bool() const\n    {\n        return IsOk();\n    }\n\n    void ScriptEngine::RegisterTypes()\n    {\n        Timer t;\n\n        auto global = GetGlobal();\n        for (auto func : GetRegisterConstructorFuncs())\n        {\n            ScriptPrototypeProcessor processor;\n            func(0, processor);\n        }\n\n        GetRegisterConstructorFuncs().Clear();\n\n        mLog->Out(\"Registered types in \" + (String)t.GetDeltaTime() + \" seconds\");\n    }\n\n    void ScriptEngine::RunBuildtinScripts()\n    {\n        RunBuiltinScript(\"Scripts/o2.js\");\n        RunBuiltinScript(\"Scripts/Math.js\");\n        RunBuiltinScript(\"Scripts/Component.js\");\n    }\n\n    void ScriptEngine::RunBuiltinScript(const String& filename)\n    {\n        Eval(o2FileSystem.ReadFile(GetBuiltinAssetsPath() + filename), filename);\n    }\n\n    Vector<ScriptEngine::RegisterConstructorFunc>& ScriptEngine::GetRegisterConstructorFuncs()\n    {\n        static Vector<ScriptEngine::RegisterConstructorFunc> funcs;\n        return funcs;\n    }\n\n}\n\n#endif // IS_SCRIPTING_SUPPORTED"
  },
  {
    "path": "Framework/Sources/o2/Scripts/ScriptEngine.h",
    "content": "#pragma once\n\n#if IS_SCRIPTING_SUPPORTED\n\n#include \"o2/Scripts/ScriptValue.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n\n#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n#include \"o2/Scripts/JerryScript/ScriptEngineBase.h\"\n#endif\n\n// Scripts engine access macros\n#define  o2Scripts o2::ScriptEngine::Instance()\n\nnamespace o2\n{\n    class ScriptValue;\n    struct ScriptPrototypeProcessor;\n\n    // -------------------\n    // Script parse result\n    // -------------------\n    class ScriptParseResult: public ScriptParseResultBase\n    {\n    public:\n        // Returns is result ok\n        bool IsOk() const;\n\n        // Returns error description\n        String GetError() const;\n\n        // Bool cast operator, returns is result ok\n        operator bool() const;\n    };\n\n    // ----------------------------------------------------------------\n    // Scripting engine. Depends on scripting backend. \n    // Can parse, run and evaluate scripts. Can return global namespace\n    // ----------------------------------------------------------------\n    class ScriptEngine: public Singleton<ScriptEngine>, public ScriptEngineBase\n    {\n    public:\n        // Default constructor, initializes scripting engine\n        ScriptEngine(RefCounter* refCounter);\n\n        // Default destructor, cleans up\n        ~ScriptEngine();\n\n        // Parses script from string and returns parse result\n        ScriptParseResult Parse(const String& script, const String& filename = \"\");\n\n        // Runs parsed script, and returns retult\n        ScriptValue Run(const ScriptParseResult& parseResult);\n\n        // Evaluates script\n        ScriptValue Eval(const String& script, const String& filename = \"\");\n\n        // Creates new realm\n        ScriptValue CreateRealm();\n\n        // Sets current realm\n        ScriptValue SetCurrentRealm(const ScriptValue& realm);\n\n        // Returns global namespace\n        ScriptValue GetGlobal() const;\n\n        // Collects garbage\n        void CollectGarbage() const; \n        \n        // Returns used memory in bytes\n        int GetUsedMemory() const;\n\n        // Starts debugging session and waits for connect\n        void ConnectDebugger() const;\n\n    private:\n        // Registers all types from reflection\n        void RegisterTypes();\n\n        // Runs built in script with math and etc, required to work framework\n        void RunBuildtinScripts();\n\n        // Runs built in script from file\n        void RunBuiltinScript(const String& filename);\n\n    private:\n        typedef void(*RegisterConstructorFunc)(void*, ScriptPrototypeProcessor&);\n        static Vector<RegisterConstructorFunc>& GetRegisterConstructorFuncs();\n\n        friend class Reflection;\n        friend void AddReflectionScriptConstructorFunc(void(*func)(void*, ScriptPrototypeProcessor&));\n    };\n}\n\n#endif // IS_SCRIPTING_SUPPORTED\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/ScriptValue.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ScriptValue.h\"\n\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nnamespace o2\n{\n    void ScriptValueImpl_WriteIObjectToDataValue(IObject* object, DataValue& data)\n    {\n        if (auto serializable = dynamic_cast<ISerializable*>(object))\n            data = serializable;\n    }\n\n    bool ScriptValueImpl_ReadIObjectFromDataValue(const DataValue& data, ScriptValue& value)\n    {\n        if (ISerializable* object = data)\n        {\n            value = object->GetScriptValue();\n            return true;\n        }\n        return false;\n    }\n\n\n    String ScriptValue::Dump(const String& tab /*= \"\"*/) const\n    {\n        String res;\n\n        switch (GetValueType())\n        {\n        case ValueType::Array:\n        {\n            int length = GetLength();\n            res += \"[ \" + (String)length + \"\\n\";\n\n            for (int i = 0; i < length; i++)\n                res += (*this)[i].Dump(tab + \"  \") + \",\\n\";\n\n            res += tab + \"]\";\n            break;\n        }\n        case ValueType::Bool:\n            res += (GetValue<bool>() ? String(\"true\") : String(\"false\"));\n            break;\n\n        case ValueType::Error:\n            res += \"Error: \" + GetError();\n            break;\n\n        case ValueType::Function:\n        {\n#if SCRIPTING_BACKEND_JERRYSCRIPT\n            auto container = GetNativeContainer(jvalue);\n            res += container ? \"c-function\" : \"function\";\n#else\n            res += \"function\";\n#endif\n            break;\n        }\n        case ValueType::None:\n            res += \"none\";\n            break;\n\n        case ValueType::Null:\n            res += \"null\";\n            break;\n\n        case ValueType::Number:\n            res += (String)GetValue<float>();\n            break;\n\n        case ValueType::String:\n            res += GetValue<String>();\n            break;\n\n        case ValueType::Undefined:\n            res += \"Undefined\";\n            break;\n\n        case ValueType::Object:\n        {\n            res += \"\\n\" + tab + \"{\\n\";\n\n            ForEachProperties([&](const ScriptValue& name, const ScriptValue& value) {\n                res += tab + \"  \" + name.Dump(tab + \"  \") + \" : \" + value.Dump(tab + \"  \") + \",\\n\";\n                return true;\n            }, false);\n\n            if (GetPrototype().GetValueType() != ValueType::Null)\n                res += tab + \"  prototype : \" + GetPrototype().Dump(tab + \"  \") + \",\\n\";\n\n            res += tab + \"}\";\n            break;\n        }\n        default:\n            break;\n        }\n\n        return res;\n    }\n\n    ScriptValue ScriptValue::GetProperty(const char* name) const\n    {\n        return GetProperty(ScriptValue(name));\n    }\n\n    void ScriptValue::SetProperty(const char* name, const ScriptValue& value)\n    {\n        SetProperty(ScriptValue(name), value);\n    }\n\n    bool ScriptValue::IsObject() const\n    {\n        return GetValueType() == ValueType::Object;\n    }\n\n    bool ScriptValue::IsArray() const\n    {\n        return GetValueType() == ValueType::Array;\n    }\n\n    bool ScriptValue::IsFunction() const\n    {\n        return GetValueType() == ValueType::Function;\n    }\n\n    bool ScriptValueProperty::operator==(const ScriptValueProperty& other) const\n    {\n        return object == other.object && name == other.name;\n    }\n\n    ScriptValue ScriptValueProperty::Get() const\n    {\n        return object.GetProperty(name);\n    }\n\n    void ScriptValueProperty::Set(const ScriptValue& value)\n    {\n        object.SetProperty(name, value);\n    }\n\n    ScriptValue ScriptValueArrayElement::Get() const\n    {\n        return object.GetElement(idx);\n    }\n\n    void ScriptValueArrayElement::Set(const ScriptValue& value)\n    {\n        object.SetElement(value, idx);\n    }\n\n    bool ScriptValueArrayElement::operator==(const ScriptValueArrayElement& other) const\n    {\n        return object == other.object && idx == other.idx;\n    }\n\n    IScriptValueProperty* ScriptValueProperty::Clone() const\n    {\n        return mnew ScriptValueProperty(*this);\n    }\n\n    IScriptValueProperty* ScriptValueArrayElement::Clone() const\n    {\n        return mnew ScriptValueArrayElement(*this);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/ScriptValue.h",
    "content": "#pragma once\n\n#if IS_SCRIPTING_SUPPORTED\n\n#include \"o2/Scripts/ScriptValueDef.h\"\n\n#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n#include \"o2/Utils/Editor/Attributes/ScriptableAttribute.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Scripts/JerryScript/ScriptValueImpl.h\"\n#include \"o2/Scripts/JerryScript/ScriptValueConverters.h\"\n#endif\n\n#endif // IS_SCRIPTING_SUPPORTED\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/ScriptValueDef.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ScriptValueDef.h\"\n// --- META ---\n\nENUM_META(o2::ScriptValue::ValueType, o2__ScriptValue__ValueType)\n{\n    ENUM_ENTRY(Array);\n    ENUM_ENTRY(BigInt);\n    ENUM_ENTRY(Bool);\n    ENUM_ENTRY(Error);\n    ENUM_ENTRY(Function);\n    ENUM_ENTRY(None);\n    ENUM_ENTRY(Null);\n    ENUM_ENTRY(Number);\n    ENUM_ENTRY(Object);\n    ENUM_ENTRY(String);\n    ENUM_ENTRY(Symbol);\n    ENUM_ENTRY(Undefined);\n}\nEND_ENUM_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Scripts/ScriptValueDef.h",
    "content": "#pragma once\n\n#include \"o2/EngineSettings.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n\n#if defined(SCRIPTING_BACKEND_JERRYSCRIPT)\n#include \"o2/Scripts/JerryScript/ScriptValueBase.h\"\n#endif\n\n#include \"o2/Utils/Types/StringDef.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2 {\n    // ------------------------------------------------------------------------------\n    // Script value. Can contain script object, engine reflected object or Function<>\n    // ------------------------------------------------------------------------------\n    class ScriptValue : public ScriptValueBase {\n    public:\n        enum class ValueType {\n            None = 0, Undefined, Null, Bool, Number, String, Object, Function, Error, Symbol, BigInt, Array\n        };\n\n    public:\n        template<typename _type, typename _enable = void>\n        struct Converter {\n            static constexpr bool isSupported = true;\n            using __type = typename std::conditional<std::is_same<void, _type>::value, int, _type>::type;\n\n            static void Write(const __type &value, ScriptValue &data);\n\n            static void Read(__type &value, const ScriptValue &data);\n        };\n\n    public:\n        // Default constructor. Creates undefined value\n        ScriptValue();\n\n        // Constructor from value\n        template<typename _type>\n        explicit ScriptValue(const _type &value);\n\n        // Copy constructor. Copies reference on value\n        ScriptValue(const ScriptValue &other);\n\n        // Move constructor. Transfers ownership of value\n        ScriptValue(ScriptValue &&other) noexcept;\n\n        // Check equals operator\n        bool operator==(const ScriptValue &other) const;\n\n        // Check not equals operator\n        bool operator!=(const ScriptValue &other) const;\n\n        // Cast to type operator\n        template<typename _type>\n        explicit operator _type() const;\n\n        // Property accessor operator\n        ScriptValue operator[](const ScriptValue &name) const;\n\n        // Array index operator\n        ScriptValue operator[](int idx) const;\n\n        // Copy-operator. Copies reference on value\n        ScriptValue &operator=(const ScriptValue &other);\n\n        // Move-operator. Transfers ownership of value\n        ScriptValue &operator=(ScriptValue &&other) noexcept;\n\n        // Assign value operator\n        template<typename _type>\n        ScriptValue &operator=(const _type &value);\n\n        // Returns type of value\n        ValueType GetValueType() const;\n\n        // Returns is value undefined\n        bool IsUndefined() const;\n\n        // Creates deep copy of value\n        ScriptValue Copy() const;\n\n        // Returns error description, if value type is error\n        String GetError() const;\n\n        // Dumps data into string\n        String Dump(const String &tab = \"\") const;\n\n        // Object methods\n        // Creates empty object\n        static ScriptValue EmptyObject();\n\n        // Returns is value object\n        bool IsObject() const;\n\n        // Returns is object is native container\n        bool IsObjectContainer() const;\n\n        // Returns type of containing native object type\n        const Type *GetObjectContainerType() const;\n\n        // Sets containing object. Stores Ref<_type> for RefCounterable types, non-owning pointer for IObject types, value for others\n        template<typename _type>\n        void SetContainingObject(_type *object);\n\n        // Returns pointer to containing object\n        void *GetContainingObject() const;\n\n        // Sets prototype property wrapper for prototype-based field access\n        template<typename _object_type, typename _field_type>\n        void SetPrototypePropertyWrapper(const ScriptValue &name, void* (*pointerGetter)(void*));\n\n        // Constructs object from this\n        ScriptValue Construct(const Vector<ScriptValue> &args);\n\n        // Invokes function\n        template<typename ... _args>\n        ScriptValue Construct(_args ... args) const;\n\n        // Iterates properties in object\n        void ForEachProperties(const Function<bool(const ScriptValue &name, const ScriptValue &value)> &func,\n                               bool withPrototypes = true) const;\n\n        // Returns property value\n        ScriptValue GetProperty(const ScriptValue &name) const;\n\n        // Returns internal property value\n        ScriptValue GetInternalProperty(const ScriptValue &name) const;\n\n        // Returns own property value\n        ScriptValue GetOwnProperty(const ScriptValue &name) const;\n\n        // Returns list of all property names\n        ScriptValue GetPropertyNames() const;\n\n        // Returns property value\n        ScriptValue GetProperty(const char *name) const;\n\n        // Sets property value\n        void SetProperty(const ScriptValue &name, const ScriptValue &value);\n\n        // Sets internal property value\n        void SetInternalProperty(const ScriptValue &name, const ScriptValue &value);\n\n        // Sets property value\n        void SetProperty(const char *name, const ScriptValue &value);\n\n        // Sets property value\n        template<typename _type>\n        void SetProperty(const char *name, const _type &value);\n\n        // Sets property wrapper. Uses value reference to get/set value from script\n        template<typename _type>\n        void SetPropertyWrapper(const ScriptValue &name, _type &value);\n\n        // Sets property wrapper. Uses setter and getter functions to get/set value from script\n        template<typename _type>\n        void SetPropertyWrapper(const ScriptValue &name, const Function<void(const _type &value)> &setter,\n                                const Function<_type()> &getter);\n\n        // Removes property\n        void RemoveProperty(const ScriptValue &name);\n\n        // Sets prototype object\n        void SetPrototype(const ScriptValue &proto);\n\n        // Returns prototype object\n        ScriptValue GetPrototype() const;\n\n        // Array methods\n        // Creates empty array\n        static ScriptValue EmptyArray();\n\n        // Returns is array\n        bool IsArray() const;\n\n        // Returns length of array\n        int GetLength() const;\n\n        // Sets array index\n        void SetElement(const ScriptValue &value, int idx);\n\n        // Returns array index\n        ScriptValue GetElement(int idx) const;\n\n        // Adds array element at end\n        void AddElement(const ScriptValue &value);\n\n        // Removes array element\n        void RemoveElement(int idx);\n\n        //Value methods\n        // Boolean cast\n        bool ToBool() const;\n\n        // Number cast\n        float ToNumber() const;\n\n        // String cast\n        String ToString() const;\n\n        // Returns value. Trying to cast value, returns default if cant\n        template<typename _type>\n        _type GetValue() const;\n\n        // Sets value\n        template<typename _type>\n        void SetValue(const _type &value);\n\n        // Function methods\n        // Returns is function\n        bool IsFunction() const;\n\n        // Returns is constructor function\n        bool IsConstructor() const;\n\n        // Invokes function\n        ScriptValue InvokeRaw(const Vector<ScriptValue> &args) const;\n\n        // Invokes member function\n        ScriptValue InvokeRaw(const ScriptValue &thisValue, const Vector<ScriptValue> &args) const;\n\n        // Invokes function\n        template<typename _res_type, typename ... _args>\n        _res_type Invoke(_args ... args) const;\n\n        // Invokes member function\n        template<typename _res_type, typename ... _args>\n        _res_type Invoke(const ScriptValue &thisValue, _args ... args) const;\n\n        // Sets function with passed this value\n        template<typename _res_type, typename ... _args>\n        void SetFunction(const Function<_res_type(ScriptValue, _args ...)> &func);\n\n    private:\n        template<typename ... _args>\n        static void PackArgs(Vector<ScriptValue> &argsValues, _args ... args) {\n            ([&](auto &arg) { argsValues.Add(ScriptValue(arg)); }(args), ...);\n        }\n    };\n}\n\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // -----------------------------------\n    // Basic script value property wrapper\n    // -----------------------------------\n    struct IScriptValueProperty: public RefCounterable\n    {\n        virtual ~IScriptValueProperty() {}\n        virtual ScriptValue Get() const = 0;\n        virtual void Set(const ScriptValue& value) = 0;\n        virtual IScriptValueProperty* Clone() const = 0;\n    };\n\n    // ------------------------------\n    // Script object property wrapper\n    // ------------------------------\n    struct ScriptValueProperty : public IScriptValueProperty\n    {\n        ScriptValue object; // Property owner object\n        ScriptValue name;   // Property name\n\n    public:\n        ScriptValueProperty() {}\n         ScriptValueProperty(const ScriptValue& object, const ScriptValue& name) :\n             object(object), name(name) {}\n\n        ScriptValue Get() const override;\n        void Set(const ScriptValue& value) override;\n\n        IScriptValueProperty* Clone() const override;\n\n        bool operator==(const ScriptValueProperty& other) const;\n    };\n\n    // -------------------------------------\n    // Script array element property wrapper\n    // -------------------------------------\n    struct ScriptValueArrayElement : public IScriptValueProperty\n    {\n        ScriptValue object;  // Property owner array\n        int         idx = 0; // Value idx\n\n    public:\n        ScriptValueArrayElement() {}\n        ScriptValueArrayElement(const ScriptValue& object, int idx) :\n            object(object), idx(idx) {}\n\n        ScriptValue Get() const override;\n        void Set(const ScriptValue& value) override;\n\n        IScriptValueProperty* Clone() const override;\n\n        bool operator==(const ScriptValueArrayElement& other) const;\n    };\n\n    // ----------------------------------------------\n    // Script value simple types prototypes container\n    // ----------------------------------------------\n    struct ScriptValuePrototypes\n    {\n        static ScriptValue*& GetVec2Prototype();\n        static ScriptValue*& GetRectPrototype();\n        static ScriptValue*& GetBorderPrototype();\n        static ScriptValue*& GetColor4Prototype();\n    };\n\n    // ------------------------------------------------\n    // Cached frequently used script object property keys\n    // ------------------------------------------------\n    struct ScriptValuePropertyKeys\n    {\n        static void Initialize();\n        static void Deinitialize();\n\n        static const ScriptValue& GetX();\n        static const ScriptValue& GetY();\n        static const ScriptValue& GetLeft();\n        static const ScriptValue& GetBottom();\n        static const ScriptValue& GetRight();\n        static const ScriptValue& GetTop();\n        static const ScriptValue& GetR();\n        static const ScriptValue& GetG();\n        static const ScriptValue& GetB();\n        static const ScriptValue& GetA();\n\n    private:\n        static ScriptValue*& XStorage();\n        static ScriptValue*& YStorage();\n        static ScriptValue*& LeftStorage();\n        static ScriptValue*& BottomStorage();\n        static ScriptValue*& RightStorage();\n        static ScriptValue*& TopStorage();\n        static ScriptValue*& RStorage();\n        static ScriptValue*& GStorage();\n        static ScriptValue*& BStorage();\n        static ScriptValue*& AStorage();\n    };\n}\n\n#endif // IS_SCRIPTING_SUPPORTED\n// --- META ---\n\nPRE_ENUM_META(o2::ScriptValue::ValueType);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Basic/ICloneable.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // -------------------\n    // Cloneable interface\n    // -------------------\n    class ICloneable\n    {\n    public:\n        virtual ~ICloneable() {}\n\n        // Cloning interface\n        virtual ICloneable* Clone() const { return nullptr; };\n\n        // Cloning as type\n        template<typename _cast_type>\n        _cast_type* CloneAs() const { return dynamic_cast<_cast_type*>(Clone()); }\n    };\n\n    // ---------------------------\n    // Cloneable reference counter\n    // ---------------------------\n    class ICloneableRef: virtual public ICloneable\n    {\n    public:\n        // Cloning reference interface\n        virtual Ref<RefCounterable> CloneRef() const { return nullptr; }\n\n        // Cloning as casted reference\n        template<typename _cast_type>\n        Ref<_cast_type> CloneAsRef() const\n        {\n            return DynamicCast<_cast_type>(CloneRef());\n        }\n    };\n\n    template<typename _type>\n    struct SafeClone\n    {\n        static _type* Clone(const _type& origin)\n        {\n            if constexpr (std::is_copy_constructible<_type>::value)\n                return mnew _type(origin);\n            else\n                return nullptr;\n        }\n\n        static Ref<RefCounterable> CloneRef(const _type& origin)\n        {\n            if constexpr (std::is_copy_constructible<_type>::value)\n            {\n                if constexpr (HasCastToRefCounterable<_type>::value)\n                    return _type::CastToRefCounterable(mmake<_type>(origin));\n                else\n                    return mmake<_type>(origin);\n            }\n            else\n                return nullptr;\n        }\n    };\n\n}\n\n// Defines clone method for class\n#define CLONEABLE(CLASS) \\\n    virtual ICloneable* Clone() const override { return o2::SafeClone<CLASS>::Clone(*this); }\n\n// Defines clone method for class with reference counting\n#define CLONEABLE_REF(CLASS) \\\n    virtual Ref<RefCounterable> CloneRef() const override { return o2::SafeClone<CLASS>::CloneRef(*this); }\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Basic/IDynamic.h",
    "content": "#pragma once\n\nnamespace o2\n{\n    class IDynamic\n    {\n    public:\n        virtual void Update(float dt) = 0;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Basic/IObject.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Memory/MemoryManager.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include <type_traits>\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scripts/ScriptValueDef.h\"\n#endif\n\nnamespace o2\n{\n    class Type;\n\n    template<typename _type>\n    const Type& GetTypeOf();\n\n    class ReflectionInitializationTypeProcessor;\n    class Reflection;\n\n    // ----------------------------------------------------\n    // Basic object interface with type information support\n    // ----------------------------------------------------\n    class IObject\n    {\n    public:\n        // Virtual destructor\n        virtual ~IObject() {}\n\n        // Returns type\n        virtual const Type& GetType() const { return *type; }\n\n    private:\n        static Type* type;\n\n#if IS_SCRIPTING_SUPPORTED\n    public:\n        // Returns script value with wrapped object\n        virtual ScriptValue GetScriptValue() const;\n\n        // Reflects object into script value. Adds properties, functions etc\n        virtual void ReflectIntoScriptValue(ScriptValue& scriptValue) const;\n\n        // Script type prototype\n        static ScriptValue GetScriptPrototype();\n\n    protected:\n        // Sets this into script value as containing object\n        virtual void SetScriptValueContainer(ScriptValue& value) const;\n#endif\n\n        template<typename _type>\n        friend const Type& GetTypeOf();\n\n        template<typename _type>\n        friend void SetupType(Type* type);\n\n        friend class ReflectionInitializationTypeProcessor;\n        friend class Reflection;\n    };\n}\n\n// -------------------------------\n// Types meta information macroses\n// -------------------------------\n \n#if IS_SCRIPTING_SUPPORTED\n#define IOBJECT_SCRIPTING()                                                                                          \\\n    void SetScriptValueContainer(o2::ScriptValue& value) const override                                              \\\n    { value.SetContainingObject(const_cast<std::remove_cv_t<std::remove_pointer_t<decltype(this)>>*>(this)); }       \\\n    void ReflectIntoScriptValue(o2::ScriptValue&) const override {}                                                  \\\n    static o2::ScriptValue GetScriptPrototype()                                                                      \\\n    { static o2::ScriptValue p = o2::ScriptValue::EmptyObject(); return p; }                                         \\\n    template<typename __type>                                                                                        \\\n    friend struct o2::ScriptValueBase::DataContainer\n#else\n#define IOBJECT_SCRIPTING()\n#endif\n\n#define IOBJECT_MAIN(CLASS)                                                                                     \\\nprivate:                                                                                                        \\\n    inline static o2::Type* type = nullptr;                                                                     \\\n                                                                                                                \\\n    template<typename __type>                                                                                   \\\n    friend const o2::Type& o2::GetTypeOf();                                                                     \\\n                                                                                                                \\\n    template<typename __type>                                                                                   \\\n    friend void o2::SetupType(o2::Type* type);                                                                  \\\n                                                                                                                \\\n    template<typename __type>                                                                                   \\\n    friend class o2::TObjectType;                                                                               \\\n                                                                                                                \\\n    template<typename __type>                                                                                   \\\n    friend class o2::PointerValueProxy;                                                                         \\\n                                                                                                                \\\n    template<typename __type>                                                                                   \\\n    friend class o2::IValueProxy;                                                                               \\\n                                                                                                                \\\n    friend class o2::ReflectionInitializationTypeProcessor;                                                     \\\n    friend class o2::Reflection;                                                                                \\\n    friend class o2::DataValue;                                                                                 \\\n                                                                                                                \\\npublic:                                                                                                         \\\n    typedef CLASS thisclass;                                                                                    \\\n    const o2::Type& GetType() const override { return *type; };                                                 \\\n                                                                                                                \\\n    template<typename _type_processor> static void ProcessType(CLASS* object, _type_processor& processor)       \\\n    {                                                                                                           \\\n        processor.template Start<CLASS>(object, type);                                                          \\\n        ProcessBaseTypes<_type_processor>(object, processor);                                                   \\\n        ProcessFields<_type_processor>(object, processor);                                                      \\\n        ProcessMethods<_type_processor>(object, processor);                                                     \\\n    }\n\n#define IOBJECT(CLASS)                                                                                          \\\n    IOBJECT_MAIN(CLASS)                                                                                         \\\n    IOBJECT_SCRIPTING();                                                                                        \\\n                                                                                                                \\\n    template<typename _type_processor> static void ProcessBaseTypes(CLASS* object, _type_processor& processor); \\\n    template<typename _type_processor> static void ProcessFields(CLASS* object, _type_processor& processor);    \\\n    template<typename _type_processor> static void ProcessMethods(CLASS* object, _type_processor& processor)\n\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scripts/ScriptValue.h\"\n\nnamespace o2\n{\n    inline ScriptValue IObject::GetScriptValue() const\n    {\n        ScriptValue result = ScriptValue::EmptyObject();\n        SetScriptValueContainer(result);\n        return result;\n    }\n\n    inline void IObject::ReflectIntoScriptValue(ScriptValue& scriptValue) const\n    {}\n\n    inline void IObject::SetScriptValueContainer(ScriptValue& value) const\n    {\n        value.SetContainingObject(const_cast<IObject*>(this));\n    }\n\n    inline ScriptValue IObject::GetScriptPrototype()\n    {\n        static ScriptValue proto = ScriptValue::EmptyObject();\n        return proto;\n    }\n\n}\n#endif\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Basic/ITree.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\n\nnamespace o2\n{\n    // ------------------------\n    // Tree structure interface\n    // ------------------------\n    template<typename _type>\n    class ITreeNode\n    {\n    public:\n        // Default constructor\n        ITreeNode();\n\n        // Virtual destructor\n        virtual ~ITreeNode();\n\n        // Adds new child node and returns him\n        virtual Ref<_type> AddChild(const Ref<_type>& node);\n\n        // Remove child node and releases him if needs\n        virtual void RemoveChild(const Ref<_type>& node);\n\n        // Removes and releases all children nodes\n        virtual void RemoveAllChilds();\n\n        // Sets parent node\n        virtual void SetParent(const Ref<_type>& parent);\n\n        // Returns parent node\n        virtual const WeakRef<_type>& GetParent() const;\n\n        // Return child nodes\n        virtual Vector<Ref<_type>>& GetChildren();\n\n        // Returns constant child nodes\n        virtual const Vector<Ref<_type>>& GetChildren() const;\n\n    protected:\n        _type*             _this;     // Template this pointer\n        WeakRef<_type>     mParent;   // Pointer to parent node\n        Vector<Ref<_type>> mChildren; // Children nodes @SERIALIZABLE\n\n    protected:\n        // Called when added new child\n        virtual void OnChildAdded(const Ref<_type>& child) {}\n\n        // Called when child was removed\n        virtual void OnChildRemoved(const Ref<_type>& child) {}\n    };\n\n\n    template<typename _type>\n    ITreeNode<_type>::ITreeNode():\n        mParent(nullptr)\n    {\n        _this = static_cast<_type*>(this);\n    }\n\n    template<typename _type>\n    ITreeNode<_type>::~ITreeNode()\n    {\n        RemoveAllChilds();\n    }\n\n    template<typename _type>\n    Ref<_type> ITreeNode<_type>::AddChild(const Ref<_type>& node)\n    {\n        if (node->GetParent())\n            node->GetParent().Lock()->RemoveChild(node);\n\n        node->mParent = WeakRef(_this);\n        mChildren.Add(node);\n\n        OnChildAdded(node);\n\n        return node;\n    }\n\n    template<typename _type>\n    void ITreeNode<_type>::RemoveChild(const Ref<_type>& node)\n    {\n        node->mParent = nullptr;\n        mChildren.Remove(node);\n\n        OnChildRemoved(node);\n    }\n\n    template<typename _type>\n    void ITreeNode<_type>::RemoveAllChilds()\n    {\n        for (auto& child : mChildren)\n            OnChildRemoved(child);\n\n        mChildren.Clear();\n    }\n\n    template<typename _type>\n    void ITreeNode<_type>::SetParent(const Ref<_type>& parent)\n    {\n        if (parent)\n        {\n            parent->AddChild(Ref(_this));\n        }\n        else\n        {\n            if (mParent)\n                mParent.Lock()->RemoveChild(Ref(_this));\n\n            mParent = nullptr;\n        }\n    }\n\n    template<typename _type>\n    const WeakRef<_type>& ITreeNode<_type>::GetParent() const\n    {\n        return mParent;\n    }\n\n    template<typename _type>\n    Vector<Ref<_type>>& ITreeNode<_type>::GetChildren()\n    {\n        return mChildren;\n    }\n\n    template<typename _type>\n    const Vector<Ref<_type>>& ITreeNode<_type>::GetChildren() const\n    {\n        return mChildren;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Bitmap/Bitmap.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Bitmap.h\"\n\n#include \"o2/Utils/Bitmap/PngFormat.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    Bitmap::Bitmap():\n        mFormat(PixelFormat::R8G8B8A8), mData(nullptr)\n    {}\n\n    Bitmap::Bitmap(PixelFormat format, const Vec2I& size) :\n        mFormat(format), mSize(size), mData(nullptr)\n    {\n        Create(format, size);\n    }\n\n    Bitmap::Bitmap(const String& fileName, ImageType type /*= IT_AUTO*/):\n        mFormat(PixelFormat::R8G8B8A8), mData(nullptr)\n    {\n        Load(fileName, type);\n    }\n\n    Bitmap::Bitmap(const Bitmap& other)\n    {\n        short bpp[] ={ 4, 3 };\n\n        mFormat = other.mFormat;\n        mSize = other.mSize;\n\n        UInt dataSize = mSize.x*mSize.y*bpp[(int)mFormat];\n        mData = mnew unsigned char[dataSize];\n        memcpy(mData, other.mData, dataSize);\n    }\n\n    Bitmap::~Bitmap()\n    {\n        if (mData)\n            delete[] mData;\n    }\n\n    Bitmap& Bitmap::operator=(const Bitmap& other)\n    {\n        if (mData)\n            delete[] mData;\n\n        short bpp[] ={ 4, 3 };\n\n        mFormat = other.mFormat;\n        mSize = other.mSize;\n\n        UInt dataSize = mSize.x*mSize.y*bpp[(int)mFormat];\n        mData = mnew unsigned char[dataSize];\n        memcpy(mData, other.mData, dataSize);\n\n        return *this;\n    }\n\n    Bitmap* Bitmap::Clone() const\n    {\n        return mnew Bitmap(*this);\n    }\n\n    void Bitmap::Create(PixelFormat format, const Vec2I& size)\n    {\n        if (mData)\n            delete[] mData;\n\n        short bpp[] ={ 4, 3 };\n\n        mFormat = format;\n        mSize = size;\n\n        mData = mnew unsigned char[size.x*size.y*bpp[(int)format]];\n    }\n\n    bool Bitmap::Load(const String& fileName, ImageType type)\n    {\n        mFilename = fileName;\n\n        if (type == ImageType::Png)\n            return LoadPngImage(fileName, this, true);\n        else\n        {\n            if (LoadPngImage(fileName, this, false))\n                return true;\n\n            o2Debug.LogError(\"Can't load image '\" + fileName + \"': unknown format\");\n        }\n\n        mFilename = \"\";\n\n        return false;\n    }\n\n    bool Bitmap::Save(const String& fileName, ImageType type) const\n    {\n        if (type == ImageType::Png || type == ImageType::Auto)\n        {\n            return SavePngImage(fileName, this);\n        }\n\n        o2Debug.LogError(\"Can't save image to '\" + fileName + \"': unknown format specified\");\n\n        return false;\n    }\n\n    void Bitmap::Clear(const Color4& color)\n    {\n        Fill(color);\n    }\n\n    unsigned char* Bitmap::GetData()\n    {\n        return mData;\n    }\n\n    Vec2I Bitmap::GetSize() const\n    {\n        return mSize;\n    }\n\n    PixelFormat Bitmap::GetFormat() const\n    {\n        return mFormat;\n    }\n\n    const unsigned char* Bitmap::GetData() const\n    {\n        return mData;\n    }\n\n    const String& Bitmap::GetFilename() const\n    {\n        return mFilename;\n    }\n\n    void Bitmap::CopyImage(const Bitmap& img, const Vec2I& position /*= Vec2I()*/, const RectI& imgSrc /*= RectI()*/)\n    {\n        if (mFormat != img.mFormat)\n            return;\n\n        RectI imgSrcRect = imgSrc;\n\n        if (imgSrcRect.Width() == 0)\n            imgSrcRect.Set(Vec2I(), img.GetSize());\n\n        int bpp[] ={ 4, 3 };\n        int curbpp = bpp[(int)mFormat];\n        int pixelSize = curbpp;\n\n        for (int x = 0; x < imgSrcRect.right - imgSrcRect.left; x++)\n        {\n            if (x + position.x >= mSize.x)\n                break;\n\n            for (int y = 0; y < imgSrcRect.top - imgSrcRect.bottom; y++)\n            {\n                if (y + position.y >= mSize.y)\n                    break;\n\n                UInt srcIdx = (img.mSize.y - (y + imgSrcRect.bottom) - 1)*img.mSize.x + x + imgSrcRect.left;\n                UInt dstIdx = (mSize.y - 1 - (y + position.y))*mSize.x + x + position.x;\n\n                *(int*)&mData[dstIdx*pixelSize] = *(int*)&img.mData[srcIdx*pixelSize];\n            }\n        }\n    }\n\n    void Bitmap::BlendImage(const Bitmap& img, const Vec2I& position /*= Vec2I()*/, const RectI& imgSrc /*= RectI()*/)\n    {\n        if (mFormat != img.mFormat)\n            return;\n\n        RectI imgSrcRect = imgSrc;\n\n        if (imgSrcRect.Width() == 0)\n            imgSrcRect.Set(Vec2I(), img.GetSize());\n\n        int bpp[] ={ 4, 3 };\n        int curbpp = bpp[(int)mFormat];\n        int pixelSize = curbpp;\n\n        for (int x = 0; x < imgSrcRect.right - imgSrcRect.left; x++)\n        {\n            if (x + position.x >= mSize.x)\n                break;\n\n            for (int y = 0; y < imgSrcRect.top - imgSrcRect.bottom; y++)\n            {\n                if (y + position.y >= mSize.y)\n                    break;\n\n                UInt srcIdx = (img.mSize.y - (y + imgSrcRect.bottom) - 1)*img.mSize.x + x + imgSrcRect.left;\n                UInt dstIdx = (mSize.y - 1 - (y + position.y))*mSize.x + x + position.x;\n\n                Color4 srcColor, src1Color;\n                srcColor.SetABGR(*(Color32Bit*)(mData + dstIdx*pixelSize));\n                src1Color.SetABGR(*(Color32Bit*)(img.mData + srcIdx*pixelSize));\n\n                Color4 resColor = srcColor.BlendByAlpha(src1Color);\n                Color32Bit uresColor = resColor.ABGR();\n\n                memcpy(mData + dstIdx*pixelSize, &uresColor, pixelSize);\n            }\n        }\n    }\n\n    void Bitmap::Colorise(const Color4& color)\n    {\n        int bpp[] ={ 4, 3 };\n        int curbpp = bpp[(int)mFormat];\n\n        for (int x = 0; x < mSize.x*mSize.y; x++)\n        {\n            Color4 c;\n            c.SetABGR(*(Color32Bit*)(mData + x*curbpp));\n            c *= color;\n            *(Color32Bit*)(mData + x*curbpp) = c.ABGR();\n        }\n    }\n\n    void Bitmap::GradientByAlpha(const Color4& color1, const Color4& color4, float angle /*= 0*/, float size /*= 0*/,\n                                 Vec2F origin /*= Vec2F()*/)\n    {\n        int bpp[] ={ 4, 3 };\n        int curbpp = bpp[(int)mFormat];\n\n        Vec2F dir = Vec2F::Rotated(Math::Deg2rad(angle + 90.0f));\n        if (Math::Equals(size, 0))\n            size = ((Vec2F)mSize).Dot(dir);\n\n        float invSize = 1.0f / size;\n\n        Vec2F pxorigin = origin*(Vec2F)mSize;\n\n        for (int x = 0; x < mSize.x; x++)\n        {\n            for (int y = 0; y < mSize.y; y++)\n            {\n                Vec2F p = Vec2F((float)x, (float)y) - pxorigin;\n                float proj = p.Dot(dir);\n                float coef = Math::Clamp01(proj*invSize);\n                Color32Bit offs = (y*mSize.x + x)*curbpp;\n\n                Color4 c;\n                c.SetABGR(*(Color32Bit*)(mData + offs));\n                c *= Math::Lerp(color1, color4, coef);\n                *(Color32Bit*)(mData + offs) = c.ABGR();\n            }\n        }\n    }\n\n    void Bitmap::Fill(const Color4& color)\n    {\n        unsigned long colrDw = color.ARGB();\n        int bpp[] ={ 4, 3 };\n        int curbpp = bpp[(int)mFormat];\n\n        for (int x = 0; x < mSize.x*mSize.y; x++)\n            memcpy(mData + x*curbpp, &colrDw, curbpp);\n    }\n\n    void Bitmap::FillRect(int rtLeft, int rtTop, int rtRight, int rtBottom, const Color4& color)\n    {\n        unsigned long colrDw = color.ARGB();\n        int bpp[] = { 4, 3 };\n        int curbpp = bpp[(int)mFormat];\n\n        for (int x = Math::Max(rtLeft, 0); x < Math::Min(mSize.x, rtRight); x++)\n        {\n            for (int y = Math::Max(rtBottom, 0); y < Math::Min(mSize.y, rtTop); y++)\n                memcpy(&mData[(y*mSize.x + x)*curbpp], &colrDw, curbpp);\n        }\n    }\n\n    void Bitmap::Blur(float radius)\n    {\n        int mapSize = Math::CeilToInt(radius);\n        int fullmapSize = mapSize * 2 + 1;\n\n        float** weightMap = mnew float*[fullmapSize];\n        for (int i = 0; i < fullmapSize; i++)\n        {\n            weightMap[i] = mnew float[fullmapSize];\n\n            for (int j = 0; j < fullmapSize; j++)\n            {\n                float x = (float)(i - mapSize), y = (float)(j - mapSize);\n                float dst = Math::Sqrt(x*x + y*y);\n                weightMap[i][j] = Math::Clamp01(1.0f - dst / radius);\n            }\n        }\n\n        int bpp[] = { 4, 3 };\n        int curbpp = bpp[(int)mFormat];\n        UInt8* srcData = mnew UInt8[mSize.x*mSize.y*curbpp];\n        memcpy(srcData, mData, mSize.x*mSize.y*curbpp);\n\n        for (int x = 0; x < mSize.x; x++)\n        {\n            for (int y = 0; y < mSize.y; y++)\n            {\n                Color4 c;\n                Color4 csum(0, 0, 0, 0);\n                float wSum = 0;\n\n                for (int ox = 0; ox < fullmapSize; ox++)\n                {\n                    for (int oy = 0; oy < fullmapSize; oy++)\n                    {\n                        int cx = x + (ox - mapSize), cy = y + (oy - mapSize);\n\n                        if (cx < 0 || cx >= mSize.x || cy < 0 || cy >= mSize.y)\n                            continue;\n\n                        c.SetARGB(*(Color32Bit*)&srcData[(cy*mSize.x + cx)*curbpp]);\n                        float w = weightMap[ox][oy];\n                        csum += c*w;\n                        wSum += w;\n                    }\n                }\n\n                csum /= wSum;\n                Color32Bit ucsum = csum.ARGB();\n                memcpy(&mData[(y*mSize.x + x)*curbpp], &ucsum, curbpp);\n            }\n        }\n\n        for (int i = 0; i < fullmapSize; i++)\n            delete[] weightMap[i];\n\n        delete[] weightMap;\n        delete[] srcData;\n    }\n\n    void Bitmap::Outline(float radius, const Color4& color, int threshold /*= 100*/)\n    {\n        int mapSize = Math::CeilToInt(radius);\n        int fullmapSize = mapSize * 2 + 1;\n        int alphaThreshold = threshold;\n        int radiusSquare = Math::Sqr(Math::FloorToInt(radius));\n\n        int bpp[] = { 4, 3 };\n        int curbpp = bpp[(int)mFormat];\n\n        UInt8* srcData = mnew UInt8[mSize.x*mSize.y*curbpp];\n        memcpy(srcData, mData, mSize.x*mSize.y*curbpp);\n\n        for (int x = 0; x < mSize.x; x++)\n        {\n            for (int y = 0; y < mSize.y; y++)\n            {\n                float sqrDist = 0;\n                int count = 0;\n                Color4 pc;\n                UInt offs = (y*mSize.x + x)*curbpp;\n                pc.SetABGR(*(Color32Bit*)&srcData[offs]);\n\n                for (int ox = 0; ox < fullmapSize; ox++)\n                {\n                    for (int oy = 0; oy < fullmapSize; oy++)\n                    {\n                        int fx = ox - mapSize, fy = oy - mapSize;\n                        int cx = x + (ox - mapSize), cy = y + (oy - mapSize);\n\n                        if (cx < 0 || cx >= mSize.x || cy < 0 || cy >= mSize.y)\n                            continue;\n\n                        Color4 c;\n                        c.SetABGR(*(Color32Bit*)&srcData[(cy*mSize.x + cx)*curbpp]);\n                        if (c.a > alphaThreshold)\n                        {\n                            int dst = fx*fx + fy*fy;\n                            sqrDist += dst;\n                            count++;\n                        }\n                    }\n                }\n\n                sqrDist /= (float)count;\n\n                if (sqrDist < radiusSquare - 2 && false)\n                {\n                    Color4 newColor = pc.BlendByAlpha(color);\n                    Color32Bit unewColor = newColor.ABGR();\n                    memcpy(&mData[offs], &unewColor, curbpp);\n\n                }\n                else\n                {\n                    float distance = Math::Sqrt((float)sqrDist);\n\n                    if (distance < radius + 1.0f)\n                    {\n                        float alpha = 1.0f - (distance - radius);\n\n                        Color4 newColor = color;\n                        newColor.a = (int)((float)newColor.a*alpha);\n                        newColor = pc.BlendByAlpha(color);\n                        Color32Bit unewColor = newColor.ABGR();\n                        memcpy(&mData[offs], &unewColor, curbpp);\n                    }\n                }\n            }\n        }\n\n        delete[] srcData;\n    }\n}\n// --- META ---\n\nENUM_META(o2::Bitmap::ImageType, o2__Bitmap__ImageType)\n{\n    ENUM_ENTRY(Auto);\n    ENUM_ENTRY(Png);\n}\nEND_ENUM_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Bitmap/Bitmap.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    // ------------------------------------------------------\n    // Image. Containing formatted pixel data, size, filename\n    // ------------------------------------------------------\n    class Bitmap: public RefCounterable\n    {\n    public:\n        enum class ImageType { Auto = 0, Png };\n\n    public:\n        PROPERTIES(Bitmap);\n        GETTER(UInt8*, data, GetData);          // Data getter\n        GETTER(Vec2I, size, GetSize);           // Image size getter\n        GETTER(PixelFormat, format, GetFormat); // Data format getter\n\n    public:\n        // Default constructor\n        Bitmap();\n\n        // Constructor with format and size\n        Bitmap(PixelFormat format, const Vec2I& size);\n\n        // Constructor that loads from file\n        Bitmap(const String& fileName, ImageType type = ImageType::Auto);\n\n        // Copy-constructor\n        Bitmap(const Bitmap& other);\n\n        // Virtual destructor\n        virtual ~Bitmap();\n\n        // Assign operator\n        Bitmap& operator=(const Bitmap& other);\n\n        // Returns copy of this\n        Bitmap* Clone() const;\n\n        // Creates image with specified format\n        void Create(PixelFormat format, const Vec2I& size);\n\n        // Loading image from file\n        bool Load(const String& fileName, ImageType type = ImageType::Auto);\n\n        // Saving image to file\n        bool Save(const String& fileName, ImageType type) const;\n\n        // Clearing image with color\n        void Clear(const Color4& color);\n\n        // Returns data\n        UInt8* GetData();\n\n        // Returns const data\n        const UInt8* GetData() const;\n\n        // Returns size of image\n        Vec2I GetSize() const;\n\n        // Returns pixel format\n        PixelFormat GetFormat() const;\n\n        // Return file name\n        const String& GetFilename() const;\n\n        // Copy image to position\n        void CopyImage(const Bitmap& img, const Vec2I& position = Vec2I(), const RectI& imgSrc = RectI());\n\n        // Blends images by alpha\n        void BlendImage(const Bitmap& img, const Vec2I& position = Vec2I(), const RectI& imgSrc = RectI());\n\n        // Sets images pixels colors\n        void Colorise(const Color4& color);\n\n        // Sets image pixels by gradient\n        void GradientByAlpha(const Color4& color1, const Color4& color4, float angle = 0, float size = 0,\n                             Vec2F origin = Vec2F());\n\n        // Fill image with color\n        void Fill(const Color4& color);\n\n        // Fills rect with color\n        void FillRect(int rtLeft, int rtTop, int rtRight, int rtBottom, const Color4& color);\n\n        // Apply blur effect\n        void Blur(float radius);\n\n        // Apply outline effect\n        void Outline(float radius, const Color4& color, int threshold = 100);\n\n    protected:\n        PixelFormat mFormat;   // Image format\n        UInt8*      mData;     // Data array\n        Vec2I       mSize;     // Size of image, in pixels\n        String      mFilename; // File name. Empty if no file\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::Bitmap::ImageType);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Bitmap/PngFormat.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"PngFormat.h\"\n\n#include \"3rdPartyLibs/libpng/png.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/FileSystem/File.h\"\n#include \"o2/Utils/Bitmap/Bitmap.h\"\n\nnamespace o2\n{\n    void CustomPngReadFn(png_structp png_ptr, png_bytep outBytes, png_size_t byteCountToRead)\n    {\n        void* io_ptr = png_get_io_ptr(png_ptr);\n        if (io_ptr == NULL) return;\n\n        InFile* file = (InFile*)io_ptr;\n\n        file->ReadData(outBytes, (UInt)byteCountToRead);\n    }\n\n    void CustomPngWriteFn(png_structp png_ptr, png_bytep bytes, png_size_t byteCountToWrite)\n    {\n        void* io_ptr = png_get_io_ptr(png_ptr);\n        if (io_ptr == NULL) return;\n\n        OutFile* file = (OutFile*)io_ptr;\n\n        file->WriteData(bytes, (UInt)byteCountToWrite);\n    }\n\n    void CustomPngFlushFn(png_structp png_ptr) {}\n\n    bool LoadPngImage(const String& fileName, Bitmap* image, bool errors /*= true*/)\n    {\n        InFile pngImageFile(fileName);\n        if (!pngImageFile.IsOpened())\n        {\n            if (errors) \n                o2Debug.LogError(\"Can't load PNG file '\" + fileName + \"'\");\n\n            return false;\n        }\n\n        //header for testing if it is a png\n        png_byte header[8];\n\n        //read the header\n        pngImageFile.ReadData(header, 8);\n\n        //test if png\n        int is_png = !png_sig_cmp(header, 0, 8);\n        if (!is_png)\n        {\n            if (errors) \n                o2Debug.LogError(\"Can't load PNG file '\" + fileName + \"': not PNG\");\n            return false;\n        }\n\n        //create png struct\n        png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);\n        if (!png_ptr)\n        {\n            if (errors) \n                o2Debug.LogError(\"Can't load PNG file '\" + fileName + \"': TEXTURE_LOAD_ERROR\");\n            return false;\n        }\n\n        //create png info struct\n        png_infop info_ptr = png_create_info_struct(png_ptr);\n        if (!info_ptr)\n        {\n            png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);\n\n            if (errors) \n                o2Debug.LogError(\"Can't load PNG file '\" + fileName + \"': TEXTURE_LOAD_ERROR\");\n            return false;\n        }\n\n        //create png info struct\n        png_infop end_info = png_create_info_struct(png_ptr);\n        if (!end_info)\n        {\n            png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);\n\n            if (errors) \n                o2Debug.LogError(\"Can't load PNG file '\" + fileName + \"': TEXTURE_LOAD_ERROR\");\n            return false;\n        }\n\n        //png error stuff, not sure libpng man suggests this.\n        if (setjmp(png_jmpbuf(png_ptr)))\n        {\n            png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);\n\n            if (errors) \n                o2Debug.LogError(\"Can't load PNG file '\" + fileName + \"': TEXTURE_LOAD_ERROR\");\n            return false;\n        }\n\n        //init png reading\n        png_set_read_fn(png_ptr, &pngImageFile, CustomPngReadFn);\n\n        //png_init_io(png_ptr, fp);\n\n        //let libpng know you already read the first 8 bytes\n        png_set_sig_bytes(png_ptr, 8);\n\n        // read all the info up to the image data\n        png_read_info(png_ptr, info_ptr);\n\n        //variables to pass to get info\n        int bit_depth, color_type;\n        png_uint_32 twidth, theight;\n\n        // get info about png\n        png_get_IHDR(png_ptr, info_ptr, &twidth, &theight, &bit_depth, &color_type, NULL, NULL, NULL);\n\n        // Update the png info struct.\n        png_read_update_info(png_ptr, info_ptr);\n\n        // Row size in bytes.\n        int rowbytes = png_get_rowbytes(png_ptr, info_ptr);\n\n        // Allocate the image_data as a big block, to be given to opengl\n        image->Create(PixelFormat::R8G8B8A8, Vec2I(twidth, theight));\n        png_byte *image_data = image->GetData();\n        if (!image_data)\n        {\n            //clean up memory and close stuff\n            png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);\n\n            if (errors) \n                o2Debug.LogError(\"Can't load PNG file '\" + fileName + \"': TEXTURE_LOAD_ERROR\");\n            return false;\n        }\n\n        //row_pointers is for pointing to image_data for reading the png with libpng\n        png_bytep *row_pointers = new png_bytep[theight];\n        if (!row_pointers)\n        {\n            //clean up memory and close stuff\n            png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);\n            if (image_data)\n                delete[] image_data;\n\n            if (errors) \n                o2Debug.LogError(\"Can't load PNG file '\" + fileName + \"': TEXTURE_LOAD_ERROR\");\n            return false;\n        }\n\n        // set the individual row_pointers to point at the correct offsets of image_data\n        for (int i = 0; i < (int)theight; ++i)\n            row_pointers[theight - 1 - i] = image_data + i * rowbytes;\n\n        //read the png into image_data through row_pointers\n        png_read_image(png_ptr, row_pointers);\n\n        //clean up memory and close stuff\n        png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);\n        if (row_pointers)\n            delete[] row_pointers;\n\n        return true;\n    }\n\n    bool SavePngImage(const String& fileName, const Bitmap* image)\n    {\n        OutFile pngImageFile(fileName);\n        if (!pngImageFile.IsOpened())\n        {\n            o2Debug.LogError(\"Can't save PNG file '\" + fileName + \"'\");\n            return false;\n        }\n\n        png_structp png_ptr;\n        png_infop info_ptr;\n\n        /* initialize stuff */\n        png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);\n\n        if (!png_ptr)\n        {\n            o2Debug.LogError(\"Can't save PNG file '\" + fileName + \"': png_create_write_struct failed\");\n            return false;\n        }\n\n        info_ptr = png_create_info_struct(png_ptr);\n        if (!info_ptr)\n        {\n            o2Debug.LogError(\"Can't save PNG file '\" + fileName + \"': png_create_info_struct failed\");\n            return false;\n        }\n\n        if (setjmp(png_jmpbuf(png_ptr)))\n        {\n            o2Debug.LogError(\"Can't save PNG file '\" + fileName + \"': Error during init_io\");\n            return false;\n        }\n\n        //png_init_io(png_ptr, fp);\n\n        png_set_write_fn(png_ptr, &pngImageFile, CustomPngWriteFn, CustomPngFlushFn);\n\n        /* write header */\n        if (setjmp(png_jmpbuf(png_ptr)))\n        {\n            o2Debug.LogError(\"Can't save PNG file '\" + fileName + \"': Error during writing header\");\n            return false;\n        }\n\n        png_byte bit_depth = 8, color_type = PNG_COLOR_TYPE_RGB_ALPHA;\n\n        png_set_IHDR(png_ptr, info_ptr, (unsigned int)image->GetSize().x, (unsigned int)image->GetSize().y,\n                     bit_depth, color_type, PNG_INTERLACE_NONE,\n                     PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);\n\n        png_write_info(png_ptr, info_ptr);\n\n\n        /* write bytes */\n        if (setjmp(png_jmpbuf(png_ptr)))\n        {\n            o2Debug.LogError(\"Can't save PNG file '\" + fileName + \"': Error during writing bytes\");\n            return false;\n        }\n\n        // Row size in bytes.\n        int rowbytes = png_get_rowbytes(png_ptr, info_ptr);\n\n        png_bytep *row_pointers = new png_bytep[(unsigned int)image->GetSize().y];\n\n        // set the individual row_pointers to point at the correct offsets of image_data\n        for (int i = 0; i < (int)image->GetSize().y; ++i)\n            row_pointers[(unsigned int)image->GetSize().y - 1 - i] = (png_bytep)image->GetData() + i * rowbytes;\n\n        png_write_image(png_ptr, row_pointers);\n\n        /* end write */\n        if (setjmp(png_jmpbuf(png_ptr)))\n        {\n            o2Debug.LogError(\"Can't save PNG file '\" + fileName + \"': Error during end of write\");\n            return false;\n        }\n\n        png_write_end(png_ptr, NULL);\n\n        if (row_pointers)\n            delete[] row_pointers;\n\n        return true;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Bitmap/PngFormat.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Bitmap;\n\n    bool LoadPngImage(const String& fileName, Bitmap* image, bool errors = true);\n    bool SavePngImage(const String& fileName, const Bitmap* image);\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Assert.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Assert.h\"\n\n#include <string>\n\n#ifdef PLATFORM_WINDOWS\n#include <windows.h>\n#endif\n\nnamespace o2\n{\n    void ErrorMessage(const char* desc, const char* file, long line)\n    {\n        char message[1024];\n        sprintf(message, \"Error at\\n%s : %i\\nDescription:\\n%s\", file, (int)line, desc);\n\n#ifdef PLATFORM_WINDOWS\n        MessageBox(nullptr, message, \"Error\", MB_OK | MB_ICONERROR | MB_TASKMODAL);\n#endif\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Assert.h",
    "content": "#pragma once\n\nnamespace o2\n{\n// Outs assert with description, when true_condition is false\n#ifdef PLATFORM_WINDOWS\n#define Assert(true_condition, desc)                    \\\n    {                                                   \\\n        if (!(true_condition))                          \\\n        {                                               \\\n            o2::ErrorMessage(desc, __FILE__, __LINE__); \\\n            __debugbreak();                             \\\n        }                                               \\\n    }\n#else\n#define Assert(true_condition, desc)                    \\\n    {                                                    \\\n        if (!(true_condition))                          \\\n        {                                               \\\n            o2::ErrorMessage(desc, __FILE__, __LINE__); \\\n        }                                                \\\n    }\n#endif\n    void ErrorMessage(const char* desc, const char* file, long line);\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Debug.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Debug.h\"\n\n#include <cstdarg>\n#include \"o2/Assets/Assets.h\"\n#include \"o2/Assets/Types/BitmapFontAsset.h\"\n#include \"o2/Assets/Types/VectorFontAsset.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Render/VectorFont.h\"\n#include \"o2/Render/VectorFontEffects.h\"\n#include \"o2/Utils/Debug/Log/ConsoleLogStream.h\"\n#include \"o2/Utils/Debug/Log/FileLogStream.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n#include \"o2/Utils/Editor/EditorScope.h\"\n\n#undef DrawText\n\nnamespace o2\n{\n    Debug::Debug(RefCounter* refCounter):\n        Singleton<Debug>(refCounter)\n    {\n        mFileLogStream = mmake<FileLogStream>(\"\", \"log.txt\");\n        mLogStream = mmake<ConsoleLogStream>(\"\");\n        mFileLogStream->BindStream(mLogStream);\n    }\n\n    Debug::~Debug()\n    {}\n\n    void Debug::InitializeFont()\n    {\n        mFont = mmake<VectorFont>(o2Assets.GetBuiltAssetsPath() + \"debugFont.ttf\");\n        mFont->AddEffect<FontStrokeEffect>(1.5f, Color4(0, 0, 0, 150), 100);\n        mText = mmake<Text>(mFont);\n    }\n\n    void Debug::DeinitializeFont()\n    {\n        mText = nullptr;\n        mFont = nullptr;\n    }\n\n    void Debug::Update(bool isEditor, float dt)\n    {\n        //PROFILE_SAMPLE_FUNC();\n\n        UpdateDrawables(isEditor ? mEditorDbgDrawables : mDbgDrawables, dt);\n    }\n\n    void Debug::UpdateDrawables(Vector<Ref<IDbgDrawable>>& drawables, float dt)\n    {\n        Vector<Ref<IDbgDrawable>> freeDrawables;\n        for (auto& drawable : drawables)\n        {\n            drawable->delay -= dt;\n            if (drawable->delay <= 0.0f)\n                freeDrawables.Add(drawable);\n        }\n\n        drawables.Remove(freeDrawables);\n    }\n\n    Vector<Ref<Debug::IDbgDrawable>>& Debug::GetCurrentScopeDrawables()\n    {\n        return EditorScope::IsInScope() ? mEditorDbgDrawables : mDbgDrawables;\n    }\n\n    void Debug::Draw(bool isEditor)\n    {\n        //PROFILE_SAMPLE_FUNC();\n\n        for (auto& drw : isEditor ? mEditorDbgDrawables : mDbgDrawables)\n            drw->Draw();\n    }\n\n    void Debug::Log(WString format, ...)\n    {\n        va_list vlist;\n        va_start(vlist, format);\n\n        mInstance->mLogStream->OutStr(String::Format(format, vlist));\n\n        va_end(vlist);\n    }\n\n    void Debug::LogStr(const WString& out)\n    {\n        mInstance->mLogStream->OutStr(out);\n    }\n\n    void Debug::LogWarning(WString format, ...)\n    {\n        va_list vlist;\n        va_start(vlist, format);\n\n        mInstance->mLogStream->WarningStr(String::Format(format, vlist));\n\n        va_end(vlist);\n    }\n\n    void Debug::LogWarningStr(const WString& out)\n    {\n        mInstance->mLogStream->WarningStr(out);\n    }\n\n    void Debug::LogError(WString format, ...)\n    {\n        va_list vlist;\n        va_start(vlist, format);\n\n        mInstance->mLogStream->ErrorStr(String::Format(format, vlist));\n\n        va_end(vlist);\n    }\n\n    void Debug::LogErrorStr(const WString& out)\n    {\n        mInstance->mLogStream->ErrorStr(out);\n    }\n\n    const Ref<LogStream>& Debug::GetLog()\n    {\n        return mInstance->mLogStream;\n    }\n\n    void Debug::DrawRect(const RectF& rect, const Color4& color, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgRect>(rect, color, delay));\n    }\n\n    void Debug::DrawRect(const RectF& rect, const Color4& color)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgRect>(rect, color, -1.0f));\n    }\n\n    void Debug::DrawRect(const RectF& rect, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgRect>(rect, Color4::White(), delay));\n    }\n\n    void Debug::DrawLine(const Vec2F& begin, const Vec2F& end, const Color4& color, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgLine>(begin, end, color, delay));\n    }\n\n    void Debug::DrawLine(const Vec2F& begin, const Vec2F& end, const Color4& color)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgLine>(begin, end, color, -1.0f));\n    }\n\n    void Debug::DrawLine(const Vec2F& begin, const Vec2F& end, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgLine>(begin, end, Color4::White(), delay));\n    }\n\n    void Debug::DrawLine(const Vector<Vec2F>& points, const Color4& color, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgPolyLine>(points, color, delay));\n    }\n\n    void Debug::DrawLine(const Vector<Vec2F>& points, const Color4& color)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgPolyLine>(points, color, -1.0f));\n    }\n\n    void Debug::DrawLine(const Vector<Vec2F>& points, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgPolyLine>(points, Color4::White(), delay));\n    }\n\n    void Debug::DrawText(const Vec2F& position, const String& text, const Color4& color, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgText>(position, text, mFont, color, delay));\n    }\n\n    void Debug::DrawText(const Vec2F& position, const String& text, const Color4& color)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgText>(position, text, mText, color));\n    }\n\n    void Debug::DrawText(const Vec2F& position, const String& text, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgText>(position, text, mFont, Color4::White(), delay));\n    }\n\n    void Debug::DrawArrow(const Vec2F& begin, const Vec2F& end, const Color4& color, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgArrow>(begin, end, color, delay));\n    }\n\n    void Debug::DrawArrow(const Vec2F& begin, const Vec2F& end, const Color4& color /*= Color4::White()*/)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgArrow>(begin, end, color, -1.0f));\n    }\n\n    void Debug::DrawArrow(const Vec2F& begin, const Vec2F& end, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgArrow>(begin, end, Color4::White(), delay));\n    }\n\n    void Debug::DrawRay(const Vec2F& begin, const Vec2F& dir, const Color4& color, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgLine>(begin, begin + dir, color, delay));\n    }\n\n    void Debug::DrawRay(const Vec2F& begin, const Vec2F& dir, const Color4& color)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgLine>(begin, begin + dir, color, -1.0f));\n    }\n\n    void Debug::DrawRay(const Vec2F& begin, const Vec2F& dir, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgLine>(begin, begin + dir, Color4::White(), delay));\n    }\n\n    void Debug::DrawCircle(const Vec2F& origin, float radius, const Color4& color, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgCircle>(origin, radius, color, delay));\n    }\n\n    void Debug::DrawCircle(const Vec2F& origin, float radius, const Color4& color)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgCircle>(origin, radius, color, -1.0f));\n    }\n\n    void Debug::DrawCircle(const Vec2F& origin, float radius, float delay)\n    {\n        GetCurrentScopeDrawables().Add(mmake<DbgCircle>(origin, radius, Color4::White(), delay));\n    }\n\n    Debug::IDbgDrawable::IDbgDrawable():\n        delay(-1.0f)\n    {}\n\n    Debug::IDbgDrawable::IDbgDrawable(const Color4& color, float delay):\n        color(color), delay(delay)\n    {}\n\n    Debug::IDbgDrawable::~IDbgDrawable()\n    {}\n\n    Debug::DbgLine::DbgLine()\n    {}\n\n    Debug::DbgLine::DbgLine(const Vec2F& begin, const Vec2F& end, const Color4& color, float delay /*= -1.0f*/):\n        begin(begin), end(end), IDbgDrawable(color, delay)\n    {}\n\n    void Debug::DbgLine::Draw()\n    {\n        o2Render.DrawAALine(begin, end, color);\n    }\n\n    Debug::DbgCircle::DbgCircle():\n        radius(0)\n    {}\n\n    Debug::DbgCircle::DbgCircle(const Vec2F& origin, float radius, const Color4& color, float delay /*= -1.0f*/):\n        origin(origin), radius(radius), IDbgDrawable(color, delay)\n    {}\n\n    void Debug::DbgCircle::Draw()\n    {\n        o2Render.DrawAACircle(origin, radius, color);\n    }\n\n    Debug::DbgRect::DbgRect()\n    {}\n\n    Debug::DbgRect::DbgRect(const RectF& rect, const Color4& color, float delay /*= -1.0f*/):\n        rect(rect), IDbgDrawable(color, delay)\n    {}\n\n    void Debug::DbgRect::Draw()\n    {\n        o2Render.DrawAARectFrame(rect, color);\n    }\n\n    Debug::DbgPolyLine::DbgPolyLine()\n    {}\n\n    Debug::DbgPolyLine::DbgPolyLine(const Vector<Vec2F>& points, const Color4& color, float delay /*= -1.0f*/):\n        points(points), IDbgDrawable(color, delay)\n    {}\n\n    void Debug::DbgPolyLine::Draw()\n    {\n        o2Render.DrawAALine(points, color);\n    }\n\n    Debug::DbgText::DbgText():\n        textDrawable(nullptr)\n    {}\n\n    Debug::DbgText::DbgText(const Vec2F& position, const String& text, const Ref<Text>& textDrawable, const Color4& color):\n        position(position), text(text), textDrawable(textDrawable), IDbgDrawable(color, -1.0f)\n    {}\n\n    Debug::DbgText::DbgText(const Vec2F& position, const String& text, const Ref<VectorFont>& font, const Color4& color,\n                            float delay /*= -1.0f*/):\n        position(position), text(text), IDbgDrawable(color, delay)\n    {\n        textDrawable = mmake<Text>(font);\n    }\n\n    Debug::DbgText::~DbgText()\n    {}\n\n    void Debug::DbgText::Draw()\n    {\n        if (textDrawable)\n        {\n            textDrawable->SetPosition(position);\n            textDrawable->SetText(text);\n            textDrawable->SetColor(color);\n            textDrawable->Draw();\n        }\n    }\n\n    Debug::DbgArrow::DbgArrow()\n    { }\n\n    Debug::DbgArrow::DbgArrow(const Vec2F& begin, const Vec2F& end, const Color4& color, float delay /*= -1.0f*/) :\n        begin(begin), end(end), IDbgDrawable(color, delay)\n    { }\n\n    void Debug::DbgArrow::Draw()\n    {\n        o2Render.DrawAAArrow(begin, end, color);\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Debug.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/String.h\"\n\n#undef DrawText\n\n// Debug stuff access macros\n#define o2Debug o2::Debug::Instance()\n\nnamespace o2\n{\n    class LogStream;\n    class VectorFont;\n    class Text;\n\n    // ---------------\n    // Debugging stuff\n    // ---------------\n    class Debug: public Singleton<Debug>\n    {\n    public:\n        // Default constructor\n        Debug(RefCounter* refCounter);\n\n        // Destructor\n        ~Debug();\n\n        // Out message into main log with formatting\n        void Log(WString format, ...);\n\n        // Out message string into main log\n        void LogStr(const WString& out);\n\n        // Out warning message into main log with formatting\n        void LogWarning(WString format, ...);\n\n        // Out warning message string into main log\n        void LogWarningStr(const WString& out);\n\n        // Out error message into main log with formatting\n        void LogError(WString format, ...);\n\n        // Out error message string into main log\n        void LogErrorStr(const WString& out);\n\n        // Returns pointer to main log\n        const Ref<LogStream>& GetLog();\n\n        // Draws debug line from begin to end with color and disappearing delay\n        void DrawLine(const Vec2F& begin, const Vec2F& end, const Color4& color, float delay);\n\n        // Draws debug line from begin to end with color at one frame\n        void DrawLine(const Vec2F& begin, const Vec2F& end, const Color4& color = Color4::White());\n\n        // Draws white debug line from begin to end with disappearing delay\n        void DrawLine(const Vec2F& begin, const Vec2F& end, float delay);\n\n        // Draws debug arrow from begin to end with color and disappearing delay\n        void DrawArrow(const Vec2F& begin, const Vec2F& end, const Color4& color, float delay);\n\n        // Draws debug arrow from begin to end with color at one frame\n        void DrawArrow(const Vec2F& begin, const Vec2F& end, const Color4& color = Color4::White());\n\n        // Draws white debug arrow from begin to end with disappearing delay\n        void DrawArrow(const Vec2F& begin, const Vec2F& end, float delay);\n\n        // Draws debug ray from begin to dir with color and disappearing delay\n        void DrawRay(const Vec2F& begin, const Vec2F& dir, const Color4& color, float delay);\n\n        // Draws debug ray from begin to dir with color at one frame\n        void DrawRay(const Vec2F& begin, const Vec2F& dir, const Color4& color = Color4::White());\n\n        // Draws white debug ray from begin to dir with disappearing delay\n        void DrawRay(const Vec2F& begin, const Vec2F& dir, float delay);\n\n        // Draws debug circle at origin with radius, color and disappearing delay\n        void DrawCircle(const Vec2F& origin, float radius, const Color4& color, float delay);\n\n        // Draws debug circle at origin with radius and color\n        void DrawCircle(const Vec2F& origin, float radius, const Color4& color = Color4::White());\n\n        // Draws white debug circle at origin with radius and disappearing delay\n        void DrawCircle(const Vec2F& origin, float radius, float delay);\n\n        // Draws debug rectangle with color and disappearing delay\n        void DrawRect(const RectF& rect, const Color4& color, float delay);\n\n        // Draws debug rectangle with color\n        void DrawRect(const RectF& rect, const Color4& color = Color4::White());\n\n        // Draws white debug rectangle with disappearing delay\n        void DrawRect(const RectF& rect, float delay);\n\n        // Draws debug line with points with color and disappearing delay\n        void DrawLine(const Vector<Vec2F>& points, const Color4& color, float delay);\n\n        // Draws debug line with points with color\n        void DrawLine(const Vector<Vec2F>& points, const Color4& color = Color4::White());\n\n        // Draws white debug line with points with disappearing delay\n        void DrawLine(const Vector<Vec2F>& points, float delay);\n\n        // Draws debug text with color and disappearing delay\n        void DrawText(const Vec2F& position, const String& text, const Color4& color, float delay);\n\n        // Draws debug text with color\n        void DrawText(const Vec2F& position, const String& text, const Color4& color = Color4::White());\n\n        // Draws white debug text with disappearing delay\n        void DrawText(const Vec2F& position, const String& text, float delay);\n\n        // Updates drawables delay\n        void Update(bool isEditor, float dt);\n\n        // Draws debug drawables\n        void Draw(bool isEditor);\n\n    protected:\n        // ------------------------------------------------------\n        // Debug drawable interface: color and disappearing delay\n        // ------------------------------------------------------\n        struct IDbgDrawable: public RefCounterable\n        {\n            Color4 color;\n            float  delay;\n\n        public:\n            IDbgDrawable();\n            IDbgDrawable(const Color4& color, float delay);\n            virtual ~IDbgDrawable();\n\n            virtual void Draw() = 0;\n        };\n\n        // --------------------------------------------\n        // Debug line with color and disappearing delay\n        // --------------------------------------------\n        struct DbgLine : public IDbgDrawable\n        {\n            Vec2F begin;\n            Vec2F end;\n\n        public:\n            DbgLine();\n            DbgLine(const Vec2F& begin, const Vec2F& end, const Color4& color, float delay = -1.0f);\n            void Draw();\n        };\n\n        // --------------------------------------------\n        // Debug arrow with color and disappearing delay\n        // --------------------------------------------\n        struct DbgArrow : public IDbgDrawable\n        {\n            Vec2F begin;\n            Vec2F end;\n\n        public:\n            DbgArrow();\n            DbgArrow(const Vec2F& begin, const Vec2F& end, const Color4& color, float delay = -1.0f);\n            void Draw();\n        };\n\n        // ----------------------------------------------\n        // Debug circle with color and disappearing delay\n        // ----------------------------------------------\n        struct DbgCircle: public IDbgDrawable\n        {\n            Vec2F origin;\n            float radius;\n\n        public:\n            DbgCircle();\n            DbgCircle(const Vec2F& origin, float radius, const Color4& color, float delay = -1.0f);\n            void Draw();\n        };\n\n        // -------------------------------------------------\n        // Debug rectangle with color and disappearing delay\n        // -------------------------------------------------\n        struct DbgRect: public IDbgDrawable\n        {\n            RectF rect;\n\n        public:\n            DbgRect();\n            DbgRect(const RectF& rect, const Color4& color, float delay = -1.0f);\n            void Draw();\n        };\n\n        // -------------------------------------------------\n        // Debug poly line with color and disappearing delay\n        // -------------------------------------------------\n        struct DbgPolyLine: public IDbgDrawable\n        {\n            Vector<Vec2F> points;\n\n        public:\n            DbgPolyLine();\n            DbgPolyLine(const Vector<Vec2F>& points, const Color4& color, float delay = -1.0f);\n            void Draw();\n        };\n\n        // --------------------------------------------\n        // Debug text with color and disappearing delay\n        // --------------------------------------------\n        struct DbgText: public IDbgDrawable\n        {\n            Vec2F     position;\n            String    text;\n            Ref<Text> textDrawable;\n\n        public:\n            DbgText();\n            DbgText(const Vec2F& position, const String& text, const Ref<Text>& textDrawable, const Color4& color);\n            DbgText(const Vec2F& position, const String& text, const Ref<VectorFont>& font, const Color4& color, float delay = -1.0f);\n            ~DbgText();\n            void Draw();\n        };\n\n    protected:\n        Ref<LogStream> mFileLogStream; // File log stream\n        Ref<LogStream> mLogStream;     // Main log stream\n\n        Vector<Ref<IDbgDrawable>> mDbgDrawables;       // Debug drawables array\n        Vector<Ref<IDbgDrawable>> mEditorDbgDrawables; // Debug drawables array for editor\n\n        Ref<VectorFont> mFont; // Font for debug captions\n        Ref<Text>       mText; // Text for one frame debug captions\n\n    private:\n        // Protect copying\n        Debug operator=(const Debug& other);\n\n        // Initializes font and text\n        void InitializeFont();\n\n        // Deinitializes debug system\n        void DeinitializeFont();\n\n        // Updates drawables list\n        void UpdateDrawables(Vector<Ref<IDbgDrawable>>& drawables, float dt);\n\n        // Returns regular or editor drawables by current context\n        Vector<Ref<IDbgDrawable>>& GetCurrentScopeDrawables();\n\n        friend class Application;\n        friend class BaseApplication;\n        friend class Integration;\n        friend class Singleton<Debug>;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Log/ConsoleLogStream.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ConsoleLogStream.h\"\n\n#include <iostream>\n\n#ifdef PLATFORM_WINDOWS\n#include <io.h>\n#elif defined PLATFORM_ANDROID\n#include <android/log.h>\n#endif\n\nnamespace o2\n{\n    ConsoleLogStream::ConsoleLogStream():\n        LogStream()\n    {\n        InitConsole();\n    }\n\n    ConsoleLogStream::ConsoleLogStream(const WString& id):\n        LogStream(id)\n    {\n        InitConsole();\n    }\n\n    ConsoleLogStream::~ConsoleLogStream()\n    {\n        //FreeConsole();\n    }\n\n    void ConsoleLogStream::OutStrEx(const WString& str)\n    {\n#if defined PLATFORM_WINDOWS\n        puts(((String)str).Data());\n#elif defined PLATFORM_ANDROID\n        __android_log_print(ANDROID_LOG_INFO, \"o2: \", \"%s\", ((String)str).Data());\n#elif defined PLATFORM_MAC || defined PLATFORM_IOS || defined PLATFORM_LINUX\n        std::cout << ((String)str).Data() << std::endl;\n#endif\n    }\n\n    void ConsoleLogStream::InitConsole()\n    {\n        /*if (AllocConsole())\n        {\n            int hCrt = _open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE), _O_TEXT);\n            *stdout = *(::_fdopen(hCrt, \"w\"));\n            ::setvbuf(stdout, NULL, _IONBF, 0);\n            *stderr = *(::_fdopen(hCrt, \"w\"));\n            ::setvbuf(stderr, NULL, _IONBF, 0);\n        }*/\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Log/ConsoleLogStream.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    // ----------------------------------------------\n    // Console log stream, puts messages into console\n    // ----------------------------------------------\n    class ConsoleLogStream: public LogStream\n    {\n    public:\n        // Default constructor, initializing console\n        ConsoleLogStream();\n\n        // Constructor with id, initializing console\n        ConsoleLogStream(const WString& id);\n\n        // Destructor, deinitializing console\n        ~ConsoleLogStream();\n\n    protected:\n        // Outs string info console\n        void OutStrEx(const WString& str);\n\n        // Initializing console\n        void InitConsole();\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Log/FileLogStream.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FileLogStream.h\"\n\n#include <fstream>\n\nnamespace o2\n{\n    FileLogStream::FileLogStream(const String& fileName):\n        LogStream()\n    {\n        OpenStream(fileName);\n    }\n\n    FileLogStream::FileLogStream(const WString& id, const String& fileName):\n        LogStream(id)\n    {\n        OpenStream(fileName);\n    }\n\n    FileLogStream::~FileLogStream()\n    {\n        if (mStream)\n            mStream.close();\n    }\n\n    void FileLogStream::OpenStream(const String& fileName)\n    {\n        mStream.open(fileName, std::ios::out);\n        Assert(mStream, \"Can't open file for logging\");\n    }\n\n    void FileLogStream::OutStrEx(const WString& str)\n    {\n        if (mStream)\n            mStream << (String)str << std::endl;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Log/FileLogStream.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\nnamespace o2\n{\n    // ----------------------------------------\n    // File log stream, puts messages into file\n    // ----------------------------------------\n    class FileLogStream:public LogStream\n    {\n    public:\n        // Constructor with file name\n        FileLogStream(const String& fileName);\n\n        // Constructor with id and file name\n        FileLogStream(const WString& id, const String& fileName);\n\n        // Destructor\n        ~FileLogStream();\n\n    protected:\n        std::ofstream mStream; // Output stream\n\n    protected:\n        // Opens file stream\n        void OpenStream(const String& fileName);\n\n        // Outs string into file\n        void OutStrEx(const WString& str);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Log/LogStream.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"LogStream.h\"\n\n#include <cstdarg>\n\nnamespace o2\n{\n    LogStream::LogStream()\n    {}\n\n    LogStream::LogStream(const WString& id) :\n        mId(id)\n    {}\n\n\tLogStream::LogStream(RefCounter* refCounter):\n\t\tRefCounterable(refCounter)\n\t{}\n\n\tLogStream::~LogStream()\n    {\n        if (mParentStream)\n            mParentStream.Lock()->UnbindStream(Ref(this));\n\n        UnbindAllStreams();\n    }\n\n    const WString& LogStream::GetId() const\n    {\n        return mId;\n    }\n\n    void LogStream::BindStream(const Ref<LogStream>& stream)\n    {\n        stream->mParentStream = WeakRef(this);\n        mChildStreams.Add(stream);\n    }\n\n    void LogStream::UnbindStream(const Ref<LogStream>& stream)\n    {\n        if (!stream)\n\t\t\treturn;\n\n\t\tstream->mParentStream = nullptr;\n\n        mChildStreams.Remove(stream);\n    }\n\n    void LogStream::UnbindAndReleaseStream(const Ref<LogStream>& stream)\n    {\n        mChildStreams.Remove(stream);\n    }\n\n    void LogStream::UnbindAllStreams()\n    {\n        for (auto& stream : mChildStreams)\n\t\t\tstream->mParentStream = nullptr;\n\n        mChildStreams.Clear();\n    }\n\n    void LogStream::Out(WString format, ...)\n    {\n        va_list vlist;\n        va_start(vlist, format);\n\n        OutStr(WString::Format(format, vlist));\n\n        va_end(vlist);\n    }\n\n    void LogStream::Error(WString format, ...)\n    {\n        va_list vlist;\n        va_start(vlist, format);\n\n        ErrorStr(WString::Format(format, vlist));\n\n        va_end(vlist);\n    }\n\n    void LogStream::Warning(WString format, ...)\n    {\n        va_list vlist;\n        va_start(vlist, format);\n\n        WarningStr(WString::Format(format, vlist));\n\n        va_end(vlist);\n    }\n\n    const WeakRef<LogStream>& LogStream::GetParentStream() const\n    {\n        return mParentStream;\n    }\n\n    void LogStream::OutStr(const WString& str)\n    {\n        OutStrEx(str);\n\n        if (mParentStream)\n        {\n            if (mId.IsEmpty())\n                mParentStream.Lock()->OutStr(str);\n            else\n                mParentStream.Lock()->OutStr((mId + \":\" + str));\n        }\n    }\n\n    void LogStream::ErrorStr(const WString& str)\n    {\n        OutErrorEx(str);\n\n        if (mParentStream)\n        {\n            if (mId == \"\")\n                mParentStream.Lock()->ErrorStr(str);\n            else\n                mParentStream.Lock()->ErrorStr((mId + \":\" + str));\n        }\n    }\n\n    void LogStream::WarningStr(const WString& str)\n    {\n        OutWarningEx(str);\n\n        if (mParentStream)\n        {\n            if (mId == \"\")\n                mParentStream.Lock()->WarningStr(str);\n            else\n                mParentStream.Lock()->WarningStr((mId + \":\" + str));\n        }\n    }\n\n    void LogStream::OutErrorEx(const WString& str)\n    {\n        OutStrEx(\"ERROR:\" + str);\n\n        if (IsStoppingOnLogErrors())\n            Assert(false, (const char*)((String)str));\n    }\n\n    void LogStream::OutWarningEx(const WString& str)\n    {\n        OutStrEx(\"WARNING:\" + str);\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Log/LogStream.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2/Utils/Types/WeakRef.h\"\n\nnamespace o2\n{\n    // ---------------------------------------------------------------------------------\n    // Basic log stream. Contains interfaces of outing data, parent and children streams\n    // ---------------------------------------------------------------------------------\n    class LogStream: public RefCounterable\n    {\n    public:\n        // Default constructor\n        LogStream();\n         \n\t\t// Default constructor\n\t\tLogStream(RefCounter* refCounter);\n\n        // Constructor with id\n        LogStream(const WString& id);\n\n        // Destructor\n        virtual ~LogStream();\n\n        // Returns name of stream\n        const WString& GetId() const;\n\n        // Binds child stream\n        void BindStream(const Ref<LogStream>& stream);\n\n        // Unbinds child stream\n        void UnbindStream(const Ref<LogStream>& stream);\n\n        // Unbinds and destroy child stream\n        void UnbindAndReleaseStream(const Ref<LogStream>& stream);\n\n        // Unbinds and destroy all child streams\n        void UnbindAllStreams();\n\n        // Returns parent stream. Null if no parent\n        const WeakRef<LogStream>& GetParentStream() const;\n\n        // Outs with low level log\n        void Out(WString format, ...);\n\n        // Outs error message\n        void Error(WString format, ...);\n\n        // Outs warning message\n        void Warning(WString format, ...);\n\n        // Outs string to current stream and parent stream\n        void OutStr(const WString& str);\n\n        // Outs error to current stream and parent stream\n        void ErrorStr(const WString& str);\n\n        // Outs warning to current stream and parent stream\n        void WarningStr(const WString& str);\n\n    protected:\n        WString mId; // Name of log stream\n\n        WeakRef<LogStream>     mParentStream; // Parent stream\n        Vector<Ref<LogStream>> mChildStreams; // Child streams\n\n    protected:\n        // Outs string to stream\n        virtual void OutStrEx(const WString& str) {}\n\n        // Outs error to stream\n        virtual void OutErrorEx(const WString& str);\n\n        // Outs warning to stream\n        virtual void OutWarningEx(const WString& str);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Profiling/SimpleProfiler.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SimpleProfiler.h\"\n\nnamespace o2\n{\n    void SimpleProfiler::Reset()\n    {\n        mTimer.Reset();\n\n        mSamples.Clear();\n        mAccumulatedSamples.clear();\n\n        mAccumulatedSamplesCount = 0;\n    }\n\n    void SimpleProfiler::Flush()\n    {\n        for (auto& sample : mSamples)\n        {\n            auto& accumulated = mAccumulatedSamples[sample.id];\n            accumulated.first += sample.end - sample.begin;\n            accumulated.second++;\n        }\n\n        mSamples.Clear();\n        mAccumulatedSamplesCount++;\n    }\n\n    void SimpleProfiler::Sample(const char* id, float start, float end)\n    {\n        mSamples.Add({ id, start, end });\n    }\n\n    const Vector<SimpleProfiler::SampleInterval>& SimpleProfiler::GetSamples()\n    {\n        return mSamples;\n    }\n\n    const std::unordered_map<const char*, Pair<float, int>>& SimpleProfiler::GetAccumulatedSamples()\n    {\n        return mAccumulatedSamples;\n    }\n\n    int SimpleProfiler::GetAccumulatedSamplesCount()\n    {\n        return mAccumulatedSamplesCount;\n    }\n\n    void SimpleProfiler::DumpLog()\n    {\n        o2Debug.Log(\"---- Simple profiler dump for \" + (String)mAccumulatedSamplesCount + \" frames:\");\n\n        static Vector<Pair<const char*, Pair<float, int>>> sortedSamples;\n        sortedSamples.Clear();\n\n        float invMS = 1000.0f / (float)mAccumulatedSamplesCount;\n        for (auto& kv : mAccumulatedSamples)\n            sortedSamples.Add({ kv.first, { kv.second.first * invMS, kv.second.second } });\n\n        sortedSamples.Sort([](auto& a, auto& b) { return a.second > b.second; });\n\n        float invFramesCount = 1.0f / (float)mAccumulatedSamplesCount;\n\n        for (auto& kv : sortedSamples)\n        {\n            o2Debug.Log(\"   %f ms (%.2f): %s\", kv.second.first, (float)kv.second.second*invFramesCount, kv.first);\n        }\n    }\n\n    float SimpleProfiler::GetProfileTime()\n    {\n        return mTimer.GetTime();\n    }\n\n    Timer SimpleProfiler::mTimer;\n    Vector<SimpleProfiler::SampleInterval> SimpleProfiler::mSamples;\n    std::unordered_map<const char*, Pair<float, int>> SimpleProfiler::mAccumulatedSamples;\n    int SimpleProfiler::mAccumulatedSamplesCount;\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/Profiling/SimpleProfiler.h",
    "content": "#pragma once\n#include <unordered_map>\n\n#include \"o2/Utils/Types/Containers/Pair.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n\n#ifdef TRACY_ENABLE\n#include \"tracy/Tracy.hpp\"\n#endif\n\nnamespace o2\n{    \n    class SimpleProfiler\n    {\n    public:\n        struct ScopeSampler\n        {\n            const char* id;\n            float begin, end;\n\n            ScopeSampler(const char* id): \n                id(id), begin(SimpleProfiler::GetProfileTime())\n            {}\n\n            ~ScopeSampler()\n            {\n                end = SimpleProfiler::GetProfileTime();\n                SimpleProfiler::Sample(id, begin, end);\n            }\n        };\n\n        struct ZoneSampler\n        {\n            const char* id;\n            float begin, end;\n\n            ZoneSampler(const char* id) :\n                id(id), begin(SimpleProfiler::GetProfileTime())\n            {}\n\n            void End()\n            {\n                end = SimpleProfiler::GetProfileTime();\n                SimpleProfiler::Sample(id, begin, end);\n            }\n        };\n\n        struct SampleInterval\n        {\n            const char* id;\n            float begin, end;\n\n            SampleInterval(const char* id, float begin, float end) :\n                id(id), begin(begin), end(end)\n            {}\n        };\n\n    public:\n        static void Reset();\n        static void Flush();\n\n        static void DumpLog();\n\n        static void Sample(const char* id, float start, float end);\n\n        static const Vector<SampleInterval>& GetSamples();\n        static const std::unordered_map<const char*, Pair<float, int>>& GetAccumulatedSamples();\n        static int GetAccumulatedSamplesCount();\n\n        static float GetProfileTime();\n\n    private:\n        static Timer mTimer;\n        static Vector<SampleInterval> mSamples;\n        static std::unordered_map<const char*, Pair<float, int>> mAccumulatedSamples;\n        static int mAccumulatedSamplesCount;\n    };\n\n#if !defined(__PRETTY_FUNCTION__) && !defined(__GNUC__)\n#define __PRETTY_FUNCTION__ __FUNCSIG__\n#endif\n\n#if defined(TRACY_ENABLE)\n#define TRACY_PROFILE_SAMPLE_FUNC() ZoneScoped\n#define TRACY_PROFILE_SAMPLE(id) ZoneScopedN(id)\n#define TRACY_PROFILE_INFO(info) ZoneText(info, info.Length())\n#define TRACY_PROFILE_FRAME() FrameMark\n#else\n#define TRACY_PROFILE_SAMPLE_FUNC() \n#define TRACY_PROFILE_SAMPLE(id) \n#define TRACY_PROFILE_INFO(info)\n#define TRACY_PROFILE_FRAME()\n#endif \n\n#if defined(O2_PROFILE_STATS)\n#define SIMPLE_PROFILE_SAMPLE_FUNC() o2::SimpleProfiler::ScopeSampler __scope_sampler(__PRETTY_FUNCTION__)\n#define SIMPLE_PROFILE_SAMPLE(id) o2::SimpleProfiler::ScopeSampler __scope_sampler(id)\n#define SIMPLE_PROFILE_INFO(info) \n#else\n#define SIMPLE_PROFILE_SAMPLE_FUNC() \n#define SIMPLE_PROFILE_SAMPLE(id) \n#define SIMPLE_PROFILE_INFO(info)\n#endif \n\n#define PROFILE_SAMPLE_FUNC() TRACY_PROFILE_SAMPLE_FUNC(); SIMPLE_PROFILE_SAMPLE_FUNC()\n#define PROFILE_SAMPLE(id) TRACY_PROFILE_SAMPLE(id); SIMPLE_PROFILE_SAMPLE(id)\n#define PROFILE_INFO(info) TRACY_PROFILE_INFO(info); SIMPLE_PROFILE_INFO(info)\n#define PROFILE_FRAME() TRACY_PROFILE_FRAME()\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/StackTrace.cpp",
    "content": "#include \"o2/stdafx.h\"\n\n#include \"StackTrace.h\"\n\nnamespace o2\n{\n//     String GetStackTrace()\n//     {\n//         return boost::stacktrace::to_string(boost::stacktrace::stacktrace());\n//     }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Debug/StackTrace.h",
    "content": "#pragma once\n\n#include <boost/stacktrace.hpp>\n\nnamespace o2\n{\n    // Returns stack trace as text\n    //String GetStackTrace();\n\n    using StackTrace = boost::stacktrace::stacktrace;\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/ActorDifferences.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ActorDifferences.h\"\n\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/Scene.h\"\n#include \"o2/Utils/Editor/SceneEditableObject.h\"\n\nnamespace o2\n{\n#if IS_EDITOR\n    ApplyActorInfo::ApplyActorInfo()\n    {}\n\n    ApplyActorInfo::ApplyActorInfo(const Ref<Actor>& actor):\n        actor(actor)\n    {\n        CollectChildren(actor);\n    }\n\n    void ApplyActorInfo::CollectChildren(const Ref<SceneEditableObject>& object)\n    {\n        allChildren.Add(object);\n\n        auto link = object->GetEditableLink();\n        while (link)\n        {\n            allChildrenByLinks[link.Get()] = object.Get();\n            link = link->GetEditableLink();\n        }\n\n        for (auto& child : object->GetEditableChildren())\n            CollectChildren(child);\n    }\n\n    ActorDifferences::ActorDifferences()\n    {}\n\n    ActorDifferences::ActorDifferences(const ActorDifferences& other)\n    {\n        removedChildren = other.removedChildren.Convert<Ref<IDifference>>([](auto x) { return x->Clone(); });\n        newChildren = other.newChildren.Convert<Ref<IDifference>>([](auto x) { return x->Clone(); });\n        movedChildren = other.movedChildren.Convert<Ref<IDifference>>([](auto x) { return x->Clone(); });\n        removedComponents = other.removedComponents.Convert<Ref<IDifference>>([](auto x) { return x->Clone(); });\n        newComponents = other.newComponents.Convert<Ref<IDifference>>([](auto x) { return x->Clone(); });\n        changedActorFields = other.changedActorFields.Convert<Ref<IDifference>>([](auto x) { return x->Clone(); });\n        changedComponentFields = other.changedComponentFields.Convert<Ref<IDifference>>([](auto x) { return x->Clone(); });\n    }\n\n    ActorDifferences::~ActorDifferences()\n    {}\n\n    ActorDifferences ActorDifferences::GetDifference(const Ref<Actor>& changedActor, const Ref<Actor>& prototype)\n    {\n        ActorDifferences res;\n\n        // Split prototype children\n        Vector<Ref<SceneEditableObject>> allProtoChildren;\n        allProtoChildren.Add(prototype);\n        prototype->GetAllEditableChildren(allProtoChildren);\n\n        // Split this actor children\n        Vector<Ref<SceneEditableObject>> allThisChildren;\n        allThisChildren.Add(changedActor);\n        changedActor->GetAllEditableChildren(allThisChildren);\n\n        // Check removed and changed from end of hierarchy\n        // Because we should check children before parent removes\n        for (int i = allProtoChildren.Count() - 1; i >= 0; i--)\n        {\n            auto protoChild = allProtoChildren[i];\n            if (!protoChild->IsSupportsLinking())\n                continue;\n\n            auto thisLinkedChild = allThisChildren.FindOrDefault([&](auto& x) {\n                return x->IsEditableLinkedTo(protoChild);\n            });\n\n            // Child was removed\n            if (thisLinkedChild == nullptr)\n            {\n                auto diff = mmake<RemovedChild>();\n                diff->prototypeLink = protoChild;\n                res.removedChildren.Add(diff);\n                continue;\n            }\n\n            // Child moved\n            if (thisLinkedChild->GetEditableParent() &&\n                thisLinkedChild->GetEditableParent()->GetEditableLink() != protoChild->GetEditableParent())\n            {\n                auto diff = mmake<MovedChild>();\n                diff->prototypeLink = protoChild;\n                diff->newParentPrototypeLink = thisLinkedChild->GetEditableParent()->GetEditableLink();\n                res.movedChildren.Add(diff);\n            }\n\n            // Not removed, checking for changes on actor, removed, created or changed components\n            Vector<const FieldInfo*> fieldsStack;\n\n            // Get differences from actor\n            auto createActorChangedFieldDiff = [&](const String& fieldPath) {\n                auto diff = mmake<ChangedObjectField>();\n                diff->prototypeLink = protoChild;\n                diff->path = fieldPath;\n                res.changedActorFields.Add(diff);\n            };\n\n            auto& objectType = dynamic_cast<const ObjectType&>(thisLinkedChild->GetType());\n            GetObjectDifferences(createActorChangedFieldDiff, fieldsStack, objectType,\n                                 objectType.DynamicCastFromIObject(thisLinkedChild.Get()),\n                                 objectType.DynamicCastFromIObject(protoChild.Get()));\n\n            thisLinkedChild->GetDifferences(res);\n\n            // Check removed and changed components\n            if (auto actorProtoChild = DynamicCast<Actor>(protoChild))\n            {\n                for (auto& protoChildComponent : actorProtoChild->GetComponents())\n                {\n                    if (auto actorThisLinkedChild = DynamicCast<Actor>(thisLinkedChild))\n                    {\n                        auto thisLinkedChildComponent = actorThisLinkedChild->GetComponents()\n                            .FindOrDefault([&](auto& x) { return x->IsLinkedToComponent(protoChildComponent); });\n\n                        // Component was removed\n                        if (thisLinkedChildComponent == nullptr)\n                        {\n                            auto diff = mmake<RemovedComponent>();\n                            diff->prototypeLink = protoChildComponent;\n                            diff->ownerPrototypeLink = actorProtoChild;\n                            res.removedComponents.Add(diff);\n                            continue;\n                        }\n\n                        // Check component changes\n                        auto createComponentChangedFieldDiff = [&](const String& fieldPath) {\n                            auto diff = mmake<ChangedComponentField>();\n                            diff->ownerPrototypeLink = protoChild;\n                            diff->prototypeLink = protoChildComponent;\n                            diff->path = fieldPath;\n                            res.changedComponentFields.Add(diff);\n                        };\n\n                        auto& objectType = dynamic_cast<const ObjectType&>(thisLinkedChildComponent->GetType());\n                        GetObjectDifferences(createComponentChangedFieldDiff, fieldsStack, objectType,\n                                             objectType.DynamicCastFromIObject(thisLinkedChildComponent.Get()),\n                                             objectType.DynamicCastFromIObject(const_cast<Component*>(protoChildComponent.Get())));\n                    }\n                }\n\n                // Check new components\n                if (auto actorThisLinkedChild = DynamicCast<Actor>(thisLinkedChild))\n                {\n                    for (auto& thisChildComponent : actorThisLinkedChild->GetComponents())\n                    {\n                        // Not linked, because it is new\n                        if (thisChildComponent->GetPrototypeLink() == nullptr)\n                        {\n                            auto diff = mmake<NewComponent>();\n                            diff->ownerPrototypeLink = actorProtoChild;\n                            diff->newComponent = thisChildComponent;\n                            res.newComponents.Add(diff);\n                        }\n                    }\n                }\n            }\n        }\n\n        // Check new actors\n        for (auto& child : allThisChildren)\n        {\n            // Empty prototype link on child, but not empty on parent means that is new actor\n            if (child->IsSupportsLinking() && child->GetEditableLink() == nullptr && child->GetEditableParent() &&\n                child->GetEditableParent()->GetEditableLink())\n            {\n                auto diff = mmake<NewChild>();\n                diff->parentPrototypeLink = child->GetEditableParent()->GetEditableLink();\n                diff->newChild = child;\n                res.newChildren.Add(diff);\n            }\n        }\n\n        return res;\n    }\n\n    void ActorDifferences::GetObjectDifferences(const Function<void(const String& path)>& createDiffFunc,\n                                                Vector<const FieldInfo*>& stack,\n                                                const Type& objectType, void* changedObject, void* protoObject)\n    {\n        for (auto&& baseType : objectType.GetBaseTypes())\n        {\n            void* changedObjectBase = baseType.dynamicCastUpFunc(changedObject);\n            void* protoObjectBase = baseType.dynamicCastUpFunc(protoObject);\n            GetObjectDifferences(createDiffFunc, stack, *baseType.type, changedObjectBase, protoObjectBase);\n        }\n\n        for (auto&& fieldInfo : objectType.GetFields())\n        {\n            if (!fieldInfo.HasAttribute<SerializableAttribute>() && !fieldInfo.HasAttribute<PrototypeDeltaSearchAttribute>())\n                continue;\n\n            if (auto serializeIfAttr = fieldInfo.GetAttribute<ISerializeIfAttribute>())\n            {\n                if (!serializeIfAttr->Invoke(changedObject))\n                    continue;\n            }\n\n            stack.Add(&fieldInfo);\n\n            auto* changedFieldObject = fieldInfo.GetValuePtr(changedObject);\n            auto* protoFieldObject = fieldInfo.GetValuePtr(protoObject);\n            GetFieldDifference(createDiffFunc, stack, *fieldInfo.GetType(), changedFieldObject, protoFieldObject);\n\n            stack.PopBack();\n        }\n    }\n\n    void ActorDifferences::GetFieldDifference(const Function<void(const String& path)>& createDiffFunc,\n                                              Vector<const FieldInfo*>& stack, const Type& fieldType,\n                                              void* changedFieldObject, void* protoFieldObject)\n    {\n        if (fieldType.GetUsage() == Type::Usage::Object)\n        {\n            if (changedFieldObject && protoFieldObject)\n            {\n                auto& realType = dynamic_cast<const ObjectType&>(fieldType).DynamicCastToIObject(changedFieldObject)->GetType();\n\n                if (realType.GetStaticFunction(\"IsDeltaAsSingleObject\"))\n                {\n                    if (!fieldType.IsValueEquals(changedFieldObject, protoFieldObject))\n                        createDiffFunc(GetFieldPath(stack));\n                }\n                else\n                    GetObjectDifferences(createDiffFunc, stack, realType, changedFieldObject, protoFieldObject);\n            }\n            else if (changedFieldObject || protoFieldObject)\n                createDiffFunc(GetFieldPath(stack));\n        }\n        else if (fieldType.GetUsage() == Type::Usage::Pointer)\n        {\n            auto& pointerType = dynamic_cast<const PointerType&>(fieldType);\n            GetFieldDifference(createDiffFunc, stack, *pointerType.GetBaseType(), changedFieldObject, protoFieldObject);\n        }\n        else if (!fieldType.IsValueEquals(changedFieldObject, protoFieldObject))\n            createDiffFunc(GetFieldPath(stack));\n    }\n\n    String ActorDifferences::GetFieldPath(const Vector<const FieldInfo*>& stack)\n    {\n        String res;\n\n        for (int i = 0; i < stack.Count(); i++)\n        {\n            res += stack[i]->GetName();\n            if (i != stack.Count() - 1)\n                res += \"/\";\n        }\n\n        return res;\n    }\n\n    void ActorDifferences::RemovedChild::Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                                               const Vector<ApplyActorInfo>& applyInfos) const\n    {\n        for (auto&& applyInfo : applyInfos)\n        {\n            SceneEditableObject* child = nullptr;\n            if (applyInfo.allChildrenByLinks.TryGetValue(prototypeLink.Get(), child))\n            {\n                if (auto actor = dynamic_cast<Actor*>(child))\n                    o2Scene.DestroyActor(Ref(actor));\n            }\n        }\n\n        if (auto actor = DynamicCast<Actor>(prototypeLink))\n            o2Scene.DestroyActor(actor);\n    }\n\n    void ActorDifferences::NewChild::Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                                           const Vector<ApplyActorInfo>& applyInfos) const\n    {\n        newChild->BeginMakePrototype();\n        auto newInstanceChild = newChild->CloneAsRef<SceneEditableObject>();\n        parentPrototypeLink->AddEditableChild(newInstanceChild);\n\n        for (auto&& applyInfo : applyInfos)\n        {\n            SceneEditableObject* child = nullptr;\n            if (applyInfo.allChildrenByLinks.TryGetValue(parentPrototypeLink.Get(), child))\n            {\n                auto prototypeLink = newChild->GetEditableLink();\n                prototypeLink->BeginInstantiatePrototype();\n                auto newInstanceChild = prototypeLink->CloneAsRef<Actor>();\n                child->AddEditableChild(newInstanceChild);\n            }\n        }\n    }\n\n    void ActorDifferences::MovedChild::Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                                             const Vector<ApplyActorInfo>& applyInfos) const\n    {\n        prototypeLink->SetEditableParent(newParentPrototypeLink);\n\n        for (auto&& applyInfo : applyInfos)\n        {\n            SceneEditableObject* child = nullptr;\n            if (applyInfo.allChildrenByLinks.TryGetValue(prototypeLink.Get(), child))\n            {\n                SceneEditableObject* newParent = nullptr;\n                if (applyInfo.allChildrenByLinks.TryGetValue(newParentPrototypeLink.Get(), newParent))\n                    child->SetEditableParent(Ref(newParent));\n            }\n        }\n    }\n\n    void ActorDifferences::RemovedComponent::Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                                                   const Vector<ApplyActorInfo>& applyInfos) const\n    {\n        for (auto&& applyInfo : applyInfos)\n        {\n            SceneEditableObject* child = nullptr;\n            if (applyInfo.allChildrenByLinks.TryGetValue(ownerPrototypeLink.Get(), child))\n            {\n                if (auto actor = dynamic_cast<Actor*>(child))\n                {\n                    for (auto& comp : actor->GetComponents())\n                    {\n                        if (comp->IsLinkedToComponent(prototypeLink))\n                        {\n                            o2Scene.DestroyComponent(comp);\n                            break;\n                        }\n                    }\n                }\n            }\n        }\n\n        o2Scene.DestroyComponent(prototypeLink);\n    }\n\n    void ActorDifferences::NewComponent::Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                                               const Vector<ApplyActorInfo>& applyInfos) const\n    {\n        auto protoNewComponent = newComponent->CloneAsRef<Component>();\n        newComponent->mPrototypeLink = protoNewComponent;\n        ownerPrototypeLink->AddComponent(protoNewComponent);\n\n        for (auto&& applyInfo : applyInfos)\n        {\n            SceneEditableObject* child = nullptr;\n            if (applyInfo.allChildrenByLinks.TryGetValue(ownerPrototypeLink.Get(), child))\n            {\n                if (auto actor = dynamic_cast<Actor*>(child))\n                {\n                    auto newActorComponent = newComponent->GetPrototypeLink().Lock()->CloneAsRef<Component>();\n                    newActorComponent->mPrototypeLink = protoNewComponent;\n                    actor->AddComponent(newActorComponent);\n                }\n            }\n        }\n    }\n\n    void ActorDifferences::ChangedObjectField::Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                                                     const Vector<ApplyActorInfo>& applyInfos) const\n    {\n        SceneEditableObject* sourceChild = nullptr;\n        if (!sourceInfo.allChildrenByLinks.TryGetValue(prototypeLink.Get(), sourceChild))\n            return;\n\n        auto& objectType = dynamic_cast<const ObjectType&>(sourceChild->GetType());\n        const FieldInfo* sourceFieldInfo = nullptr;\n        const FieldInfo* protoFieldInfo = nullptr;\n        auto sourceFieldPtr = objectType.GetFieldPtr(objectType.DynamicCastFromIObject(sourceChild), path, sourceFieldInfo);\n        auto protoFieldPtr = objectType.GetFieldPtr(objectType.DynamicCastFromIObject(prototypeLink.Get()), path, protoFieldInfo);\n\n        if (!sourceFieldPtr || !protoFieldPtr)\n            return;\n\n        for (auto&& applyInfo : applyInfos)\n        {\n            SceneEditableObject* child = nullptr;\n            if (!applyInfo.allChildrenByLinks.TryGetValue(prototypeLink.Get(), child))\n                continue;\n\n            auto& objectType = dynamic_cast<const ObjectType&>(child->GetType());\n            const FieldInfo* fieldInfo = nullptr;\n            auto fieldPtr = objectType.GetFieldPtr(objectType.DynamicCastFromIObject(child), path, fieldInfo);\n            if (!fieldPtr)\n                continue;\n\n            if (sourceFieldInfo->GetType()->IsValueEquals(protoFieldPtr, fieldPtr))\n                sourceFieldInfo->GetType()->CopyValue(fieldPtr, sourceFieldPtr);\n        }\n\n        sourceFieldInfo->GetType()->CopyValue(protoFieldPtr, sourceFieldPtr);\n    }\n\n    void ActorDifferences::ChangedComponentField::Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                                                        const Vector<ApplyActorInfo>& applyInfos) const\n    {\n        SceneEditableObject* sourceChild = nullptr;\n        if (!sourceInfo.allChildrenByLinks.TryGetValue(ownerPrototypeLink.Get(), sourceChild))\n            return;\n\n        auto sourceActor = dynamic_cast<Actor*>(sourceChild);\n        if (!sourceActor)\n            return;\n\n        for (auto& sourceComp : sourceActor->GetComponents())\n        {\n            if (!sourceComp->IsLinkedToComponent(prototypeLink))\n                continue;\n\n            auto& objectType = dynamic_cast<const ObjectType&>(sourceComp->GetType());\n            const FieldInfo* sourceFieldInfo = nullptr;\n            const FieldInfo* protoFieldInfo = nullptr;\n            auto sourceFieldPtr = objectType.GetFieldPtr(objectType.DynamicCastFromIObject(const_cast<Component*>(sourceComp.Get())), path, sourceFieldInfo);\n            auto protoFieldPtr = objectType.GetFieldPtr(objectType.DynamicCastFromIObject(const_cast<Component*>(prototypeLink.Get())), path, protoFieldInfo);\n\n            if (!sourceFieldPtr || !protoFieldInfo)\n                break;\n\n            for (auto&& applyInfo : applyInfos)\n            {\n                SceneEditableObject* child = nullptr;\n                if (!applyInfo.allChildrenByLinks.TryGetValue(ownerPrototypeLink.Get(), child))\n                    continue;\n\n                auto actor = dynamic_cast<Actor*>(child);\n                if (!actor)\n                    continue;\n\n                for (auto& comp : actor->GetComponents())\n                {\n                    if (!comp->IsLinkedToComponent(prototypeLink))\n                        continue;\n\n                    auto& objectType = dynamic_cast<const ObjectType&>(comp->GetType());\n                    const FieldInfo* fieldInfo = nullptr;\n                    auto fieldPtr = objectType.GetFieldPtr(objectType.DynamicCastFromIObject(const_cast<Component*>(comp.Get())), path, fieldInfo);\n\n                    if (!fieldPtr)\n                        break;\n\n                    if (sourceFieldInfo->GetType()->IsValueEquals(protoFieldPtr, fieldPtr))\n                        sourceFieldInfo->GetType()->CopyValue(fieldPtr, sourceFieldPtr);\n                }\n            }\n\n            sourceFieldInfo->GetType()->CopyValue(protoFieldPtr, sourceFieldPtr);\n\n            break;\n        }\n    }\n\n    Ref<ActorDifferences::IDifference> ActorDifferences::RemovedChild::Clone() const\n    {\n        return mmake<RemovedChild>(*this);\n    }\n\n    Ref<ActorDifferences::IDifference> ActorDifferences::NewChild::Clone() const\n    {\n        return mmake<NewChild>(*this);\n    }\n\n    Ref<ActorDifferences::IDifference> ActorDifferences::RemovedComponent::Clone() const\n    {\n        return mmake<RemovedComponent>(*this);\n    }\n\n    Ref<ActorDifferences::IDifference> ActorDifferences::NewComponent::Clone() const\n    {\n        return mmake<NewComponent>(*this);\n    }\n\n    Ref<ActorDifferences::IDifference> ActorDifferences::ChangedObjectField::Clone() const\n    {\n        return mmake<ChangedObjectField>(*this);\n    }\n\n    Ref<ActorDifferences::IDifference> ActorDifferences::ChangedComponentField::Clone() const\n    {\n        return mmake<ChangedComponentField>(*this);\n    }\n\n    Ref<ActorDifferences::IDifference> ActorDifferences::MovedChild::Clone() const\n    {\n        return mmake<MovedChild>(*this);\n    }\n#endif\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/ActorDifferences.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/StringDef.h\"\n#include \"o2/Utils/Reflection/FieldInfo.h\"\n\nnamespace o2\n{\n#if IS_EDITOR\n    class Actor;\n    class SceneEditableObject;\n    class Component;\n\n    // -----------------------------\n    // Actor prototype applying info\n    // -----------------------------\n    struct ApplyActorInfo\n    {\n        Ref<Actor>                       actor;\n        Vector<Ref<SceneEditableObject>> allChildren;\n\n        Map<const SceneEditableObject*, SceneEditableObject*> allChildrenByLinks;\n\n        ApplyActorInfo();\n        ApplyActorInfo(const Ref<Actor>& actor);\n\n        bool operator==(const ApplyActorInfo& other) const { return actor == other.actor; }\n\n        void CollectChildren(const Ref<SceneEditableObject>& object);\n    };\n\n    // ------------------------------------------\n    // ActorDifferences between instance and prototype\n    // ------------------------------------------\n    struct ActorDifferences\n    {\n        struct IDifference: public RefCounterable\n        {\n            virtual Ref<IDifference> Clone() const = 0;\n            virtual void Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo, \n                               const Vector<ApplyActorInfo>& applyInfos) const = 0;\n        };\n\n        struct RemovedChild: public IDifference\n        {\n            Ref<SceneEditableObject> prototypeLink;\n\n            Ref<IDifference> Clone() const override;\n            void Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                       const Vector<ApplyActorInfo>& applyInfos) const override;\n        };\n\n        struct NewChild: public IDifference\n        {\n            Ref<SceneEditableObject> parentPrototypeLink;\n            Ref<SceneEditableObject> newChild;\n\n            Ref<IDifference> Clone() const override;\n            void Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                       const Vector<ApplyActorInfo>& applyInfos) const override;\n        };\n\n        struct MovedChild: public IDifference\n        {\n            Ref<SceneEditableObject> prototypeLink;\n            Ref<SceneEditableObject> newParentPrototypeLink;\n\n            Ref<IDifference> Clone() const override;\n            void Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                       const Vector<ApplyActorInfo>& applyInfos) const override;\n        };\n\n        struct RemovedComponent: public IDifference\n        {\n            Ref<Actor>     ownerPrototypeLink;\n            Ref<Component> prototypeLink;\n\n            Ref<IDifference> Clone() const override;\n            void Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                       const Vector<ApplyActorInfo>& applyInfos) const override;\n        };\n\n        struct NewComponent: public IDifference\n        {\n            Ref<Actor>     ownerPrototypeLink;\n            Ref<Component> newComponent;\n\n            Ref<IDifference> Clone() const override;\n            void Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                       const Vector<ApplyActorInfo>& applyInfos) const override;\n        };\n\n        struct ChangedObjectField: public IDifference\n        {\n            Ref<SceneEditableObject> prototypeLink;\n            String                   path;\n\n            Ref<IDifference> Clone() const override;\n            void Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                       const Vector<ApplyActorInfo>& applyInfos) const override;\n        };\n\n        struct ChangedComponentField: public IDifference\n        {\n            Ref<SceneEditableObject> ownerPrototypeLink;\n            Ref<Component>           prototypeLink;\n            String                   path;\n\n            Ref<IDifference> Clone() const override;\n            void Apply(ApplyActorInfo& sourceInfo, ApplyActorInfo& prototypeInfo,\n                       const Vector<ApplyActorInfo>& applyInfos) const override;\n        };\n\n    public:\n        Vector<Ref<IDifference>> removedChildren;\n        Vector<Ref<IDifference>> newChildren;\n        Vector<Ref<IDifference>> movedChildren;\n        Vector<Ref<IDifference>> removedComponents;\n        Vector<Ref<IDifference>> newComponents;\n        Vector<Ref<IDifference>> changedActorFields;\n        Vector<Ref<IDifference>> changedComponentFields;\n\n    public:\n        ActorDifferences();\n        ActorDifferences(const ActorDifferences& other);\n        ~ActorDifferences();\n\n        // Returns differences between\n        static ActorDifferences GetDifference(const Ref<Actor>& changedActor, const Ref<Actor>& prototype);\n\n        // Collects object differences\n        static void GetObjectDifferences(const Function<void(const String& path)>& createDiffFunc,\n                                         Vector<const FieldInfo*>& stack,\n                                         const Type& objectType, void* changedObject, void* protoObject);\n\n        // Checks difference in field\n        static void GetFieldDifference(const Function<void(const String& path)>& createDiffFunc,\n                                       Vector<const FieldInfo*>& stack,\n                                       const Type& fieldType, void* changedFieldObject, void* protoFieldObject);\n\n        // Returns path to field by fields stack\n        static String GetFieldPath(const Vector<const FieldInfo*>& stack);\n    };\n#endif\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/AssetEditablePreview.h",
    "content": "#pragma once\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // ----------------------------------------------------------------\n    // Asset holder, that can be edited from asset editor and previewed\n    // ----------------------------------------------------------------\n    class IAssetEditablePreview: public IRefCounterable\n    {\n    public:\n        virtual ~IAssetEditablePreview() {}\n        \n        // Called when asset started to preview. \n        virtual void BeginPreview() = 0;\n\n        // Called when asset finished preview\n        virtual void EndPreview() = 0;\n\n        // Returns actor that is being previewed\n        virtual Ref<Actor> GetPreviewActor() const { return nullptr; }\n    };\n\n\t// ----------------------------------------------------------------\n\t// Animation asset editable preview interface, that can be used to \n\t// preview animation assets. Also can return animation player\n\t// ----------------------------------------------------------------\n    class AnimationAssetEditablePreview : public IAssetEditablePreview\n    {\n    public:\n\t\t// Returns animation player\n\t\tvirtual Ref<IAnimation> GetPreviewPlayer() const { return nullptr; }\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/AnimatableAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class AnimatableAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"ANIMATABLE\");\n        ATTRIBUTE_SHORT_DEFINITION(\"ANIMATABLE_ATTRIBUTE\");\n    };\n\n#define ANIMATABLE_ATTRIBUTE() \\\n    template AddAttribute<o2::AnimatableAttribute>()\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/DefaultTypeAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class DefaultTypeAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"DEFAULT_TYPE\");\n        ATTRIBUTE_SHORT_DEFINITION(\"DEFAULT_TYPE_ATTRIBUTE\");\n\n    public:\n        const Type* defaultType = nullptr;\n\n    public:\n        DefaultTypeAttribute() { }\n        DefaultTypeAttribute(const Type* defaultType) :defaultType(defaultType) { }\n    };\n\n#define DEFAULT_TYPE_ATTRIBUTE(type) \\\n    template AddAttribute<o2::DefaultTypeAttribute>(&TypeOf(type))\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/DontDeleteAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class DontDeleteAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"DONT_DELETE\");\n        ATTRIBUTE_SHORT_DEFINITION(\"DONT_DELETE_ATTRIBUTE\");\n    };\n\n#define DONT_DELETE_ATTRIBUTE() \\\n    template AddAttribute<o2::DontDeleteAttribute>()\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/EditorPropertyAttribute.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class EditorPropertyAttribute: public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"EDITOR_PROPERTY\");\n        ATTRIBUTE_SHORT_DEFINITION(\"EDITOR_PROPERTY_ATTRIBUTE\");\n    };\n\n    class IgnoreEditorPropertyAttribute: public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"EDITOR_IGNORE\");\n        ATTRIBUTE_SHORT_DEFINITION(\"EDITOR_IGNORE_ATTRIBUTE\");\n    };\n\n#define EDITOR_IGNORE_ATTRIBUTE() \\\n    template AddAttribute<o2::IgnoreEditorPropertyAttribute>()\n\n#define EDITOR_PROPERTY_ATTRIBUTE() \\\n    template AddAttribute<o2::EditorPropertyAttribute>()\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/ExpandedByDefaultAttribute.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class ExpandedByDefaultAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"EXPANDED_BY_DEFAULT\");\n        ATTRIBUTE_SHORT_DEFINITION(\"EXPANDED_BY_DEFAULT_ATTRIBUTE\");\n    };\n\n#define EXPANDED_BY_DEFAULT_ATTRIBUTE() \\\n    template AddAttribute<o2::ExpandedByDefaultAttribute>()\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/GroupAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class GroupAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"GROUP\");\n        ATTRIBUTE_SHORT_DEFINITION(\"GROUP_ATTRIBUTE\");\n\n    public:\n        String name;\n\n    public:\n        GroupAttribute() {}\n        GroupAttribute(const char* name) :name(name) {}\n    };\n\n#define GROUP_ATTRIBUTE(NAME) \\\n    template AddAttribute<o2::GroupAttribute>(NAME)\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/InvokeOnChangeAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class InvokeOnChangeAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"INVOKE_ON_CHANGE\");\n        ATTRIBUTE_SHORT_DEFINITION(\"INVOKE_ON_CHANGE_ATTRIBUTE\");\n\n    public:\n        String methodName;\n\n    public:\n        InvokeOnChangeAttribute() { }\n        InvokeOnChangeAttribute(const String& methodName):methodName(methodName) { }\n    };\n\n#define INVOKE_ON_CHANGE_ATTRIBUTE(methodName) \\\n    template AddAttribute<o2::InvokeOnChangeAttribute>(#methodName)\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/ItemsSourceAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class ItemsSourceAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"ITEMS_SOURCE\");\n        ATTRIBUTE_SHORT_DEFINITION(\"ITEMS_SOURCE_ATTRIBUTE\");\n\n    public:\n        String methodName;\n\n    public:\n        ItemsSourceAttribute() { }\n        ItemsSourceAttribute(const String& methodName):methodName(methodName) { }\n    };\n\n#define ITEMS_SOURCE_ATTRIBUTE(methodName) \\\n    template AddAttribute<o2::ItemsSourceAttribute>(#methodName)\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/NameAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class NameAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"NAME\");\n        ATTRIBUTE_SHORT_DEFINITION(\"NAME_ATTRIBUTE\");\n\n    public:\n        String name;\n\n    public:\n        NameAttribute() {}\n        NameAttribute(const char* name) :name(name) {}\n    };\n\n#define NAME_ATTRIBUTE(NAME) \\\n    template AddAttribute<o2::NameAttribute>(NAME)\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/NoHeaderAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class NoHeaderAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"NO_HEADER\");\n        ATTRIBUTE_SHORT_DEFINITION(\"NO_HEADER_ATTRIBUTE\");\n    };\n\n#define NO_HEADER_ATTRIBUTE() \\\n    template AddAttribute<o2::NoHeaderAttribute>()\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/PrototypeDeltaSearchAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class PrototypeDeltaSearchAttribute: public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"DELTA_SEARCH\");\n        ATTRIBUTE_SHORT_DEFINITION(\"DELTA_SEARCH_ATTRIBUTE\");\n    };\n\n    class IgnorePrototypeDeltaSearchAttribute: public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"IGNORE_DELTA_SEARCH\");\n        ATTRIBUTE_SHORT_DEFINITION(\"IGNORE_DELTA_SEARCH_ATTRIBUTE\");\n    };\n\n#define DELTA_SEARCH_ATTRIBUTE() \\\n    template AddAttribute<o2::PrototypeDeltaSearchAttribute>()\n\n#define IGNORE_DELTA_SEARCH_ATTRIBUTE() \\\n    template AddAttribute<o2::IgnorePrototypeDeltaSearchAttribute>()\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/RangeAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Reflection/Attributes.h\"\n\nnamespace o2\n{\n    class RangeAttribute : public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"RANGE\");\n        ATTRIBUTE_SHORT_DEFINITION(\"RANGE_ATTRIBUTE\");\n\n    public:\n        float minRange = 0;\n        float maxRange = 1;\n\n        RangeAttribute() {}\n        RangeAttribute(float minRange, float maxRange) :minRange(minRange), maxRange(maxRange) {}\n        RangeAttribute(int minRange, int maxRange) :minRange((float)minRange), maxRange((float)maxRange) {}\n    };\n\n#define RANGE_ATTRIBUTE(MIN_VALUE, MAX_VALUE) \\\n    template AddAttribute<o2::RangeAttribute>(MIN_VALUE, MAX_VALUE)\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/Attributes/ScriptableAttribute.h",
    "content": "#pragma once\n#include \"o2/Utils/Reflection/Attributes.h\"\n\nnamespace o2\n{\n    class ScriptableAttribute: public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"SCRIPTABLE\");\n        ATTRIBUTE_SHORT_DEFINITION(\"SCRIPTABLE_ATTRIBUTE\");\n    };\n\n#define SCRIPTABLE_ATTRIBUTE() \\\n    template AddAttribute<o2::ScriptableAttribute>()\n}\n\nnamespace o2\n{\n    class ScriptableNameAttribute: public IAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"SCRIPTABLE_NAME\");\n        ATTRIBUTE_SHORT_DEFINITION(\"SCRIPTABLE_NAME_ATTRIBUTE\");\n\n    public:\n        const char* name = 0;\n\n        ScriptableNameAttribute() {}\n        ScriptableNameAttribute(const char* name):name(name) {}\n    };\n\n#define SCRIPTABLE_NAME_ATTRIBUTE(NAME) \\\n    template AddAttribute<o2::ScriptableNameAttribute>(#NAME)\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/DragAndDrop.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"DragAndDrop.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    DragableObject::DragableObject() :CursorAreaEventsListener()\n    {}\n\n    DragableObject::~DragableObject()\n    {\n        EventSystem::UnregDragListener(this);\n    }\n\n    Ref<DragDropArea> DragableObject::GetDropAreaUnderCursor(CursorId cursorId) const\n    {\n        auto underCursorListeners = o2Events.GetAllCursorListenersUnderCursor(cursorId);\n        Ref<DragDropArea> dragDropArea = nullptr;\n\n        for (auto& listener : underCursorListeners)\n        {\n            if (listener != this)\n            {\n                if (auto listenerDragDropArea = DynamicCast<DragDropArea>(listener))\n                {\n                    dragDropArea = listenerDragDropArea;\n                    break;\n                }\n\n                if (!listener->IsInputTransparent())\n                    break;\n            }\n        }\n\n        return dragDropArea;\n    }\n\n    void DragableObject::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        mPressedCursorPos = cursor.position;\n        mPressedCursorId = cursor.id;\n    }\n\n    void DragableObject::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        mIsDragging = false;\n    }\n\n    void DragableObject::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (!mIsPressed)\n            return;\n\n        if (cursor.id != mPressedCursorId)\n            return;\n\n        if (cursor.delta.Length() < 0.5f)\n            return;\n\n        auto dragArea = GetDropAreaUnderCursor(cursor.id);\n\n        if (!mIsDragging)\n        {\n            float delta = (cursor.position - mPressedCursorPos).Length();\n            if (delta > mDragDistanceThreshold)\n            {\n                mIsDragging = true;\n                OnDragStart(cursor);\n            }\n        }\n\n        if (mIsDragging)\n        {\n            OnDragged(cursor, dragArea);\n\n            if (mDragDropArea != dragArea)\n            {\n                if (mDragDropArea)\n                    mDragDropArea->OnDragExit(Ref(this));\n\n                mDragDropArea = dragArea;\n\n                if (mDragDropArea)\n                    mDragDropArea->OnDragEnter(Ref(this));\n            }\n\n            if (dragArea)\n                dragArea->OnDraggedAbove(Ref(this));\n        }\n    }\n\n    void DragableObject::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (mIsDragging)\n        {\n            OnDragEnd(cursor);\n\n            if (auto dragArea = GetDropAreaUnderCursor(cursor.id))\n            {\n                OnDropped(dragArea);\n                dragArea->OnDropped(Ref(this));\n            }\n        }\n\n        mDragDropArea = nullptr;\n        mIsDragging = false;\n    }\n\n    void DragableObject::OnDragStart(const Input::Cursor& cursor)\n    {}\n\n    void DragableObject::OnDragged(const Input::Cursor& cursor, const Ref<DragDropArea>& area)\n    {}\n\n    void DragableObject::OnDragEnd(const Input::Cursor& cursor)\n    {}\n\n    void DragableObject::OnDropped(const Ref<DragDropArea>& area)\n    {}\n\n    bool DragableObject::IsDragging() const\n    {\n        return mIsDragging;\n    }\n\n    void DragableObject::OnDrawn()\n    {\n        CursorAreaEventsListener::OnDrawn();\n        EventSystem::RegDragListener(Ref(this));\n    }\n\n    Vec2F DragableObject::GetCursorPressedPoint() const\n    {\n        return mPressedCursorPos;\n    }\n\n    void DragDropArea::OnDropped(const Ref<DragableObject>& draggable)\n    {}\n\n    void DragDropArea::OnDropped(const Ref<ISelectableDragableObjectsGroup>& group)\n    {}\n\n    void DragDropArea::OnDragEnter(const Ref<DragableObject>& draggable)\n    {}\n\n    void DragDropArea::OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group)\n    {}\n\n    void DragDropArea::OnDraggedAbove(const Ref<DragableObject>& draggable)\n    {}\n\n    void DragDropArea::OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group)\n    {}\n\n    void DragDropArea::OnDragExit(const Ref<DragableObject>& draggable)\n    {}\n\n    void DragDropArea::OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group)\n    {}\n\n    SelectableDragableObjectsGroup::~SelectableDragableObjectsGroup()\n    {\n        auto objects = mObjects;\n        for (auto& object : objects)\n            RemoveSelectableObject(object.Get());\n    }\n\n    Vector<Ref<SelectableDragableObject>> SelectableDragableObjectsGroup::GetSelectedDragObjects() const\n    {\n        return mSelectedObjects;\n    }\n\n    Vector<Ref<SelectableDragableObject>> SelectableDragableObjectsGroup::GetAllObjects() const\n    {\n        return mObjects;\n    }\n\n    void SelectableDragableObjectsGroup::Select(const Ref<SelectableDragableObject>& object)\n    {\n        if (object->IsSelected())\n            return;\n\n        object->mIsSelected = true;\n        mSelectedObjects.Add(object);\n        object->OnSelected();\n    }\n\n    void SelectableDragableObjectsGroup::Deselect(const Ref<SelectableDragableObject>& object)\n    {\n        if (!object->IsSelected())\n            return;\n\n        object->mIsSelected = false;\n        mSelectedObjects.Remove(object);\n        object->OnDeselected();\n    }\n\n    void SelectableDragableObjectsGroup::AddSelectableObject(const Ref<SelectableDragableObject>& object)\n    {\n        if (mObjects.Contains(object))\n            return;\n\n        mObjects.Add(object);\n\n        if (object->IsSelected())\n            mSelectedObjects.Add(object);\n\n        object->mSelectGroup = Ref(this);\n    }\n\n    void SelectableDragableObjectsGroup::RemoveSelectableObject(SelectableDragableObject* object)\n    {\n        mSelectedObjects.RemoveFirst([&](auto& x) { return x == object; });\n        mObjects.RemoveFirst([&](auto& x) { return x == object; });\n\n        object->mSelectGroup = nullptr;\n    }\n\n    bool SelectableDragableObjectsGroup::IsUnderPoint(const Vec2F& point)\n    {\n        return true;\n    }\n\n    void SelectableDragableObjectsGroup::OnSelectableObjectCursorPressed(const Ref<SelectableDragableObject>& object,\n                                                                         const Input::Cursor& cursor)\n    {\n        if (!o2Input.IsKeyDown(VK_CONTROL))\n            DeselectAll();\n    }\n\n    SelectableDragableObject::~SelectableDragableObject()\n    {\n        if (mSelectGroup)\n            mSelectGroup->RemoveSelectableObject(this);\n    }\n\n    bool SelectableDragableObject::IsSelected() const\n    {\n        return mIsSelected;\n    }\n\n    void SelectableDragableObject::SetSelected(bool selected)\n    {\n        if (mIsSelected == selected)\n            return;\n\n        if (mSelectGroup)\n        {\n            if (selected)\n                mSelectGroup->Select(Ref(this));\n            else\n                mSelectGroup->Deselect(Ref(this));\n        }\n        else\n        {\n            mIsSelected = selected;\n\n            if (mIsSelected)\n                OnSelected();\n            else\n                OnDeselected();\n        }\n    }\n\n    void SelectableDragableObject::Select()\n    {\n        SetSelected(true);\n    }\n\n    void SelectableDragableObject::Deselect()\n    {\n        SetSelected(false);\n    }\n\n    void SelectableDragableObject::SetSelectionGroup(const Ref<ISelectableDragableObjectsGroup>& group)\n    {\n        if (mSelectGroup)\n            mSelectGroup->RemoveSelectableObject(this);\n\n        mSelectGroup = group;\n\n        if (mSelectGroup)\n            mSelectGroup->AddSelectableObject(Ref(this));\n    }\n\n    const Ref<ISelectableDragableObjectsGroup>& SelectableDragableObject::GetSelectionGroup() const\n    {\n        return mSelectGroup;\n    }\n\n    void SelectableDragableObject::SetDragOnlySelected(bool value)\n    {\n        mDragOnlySelected = value;\n    }\n\n    bool SelectableDragableObject::IsDragOnlySelected() const\n    {\n        return mDragOnlySelected;\n    }\n\n    bool SelectableDragableObject::IsInputTransparent() const\n    {\n        return mDragOnlySelected && !mIsSelected;\n    }\n\n    void SelectableDragableObject::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        DragableObject::OnCursorPressed(cursor);\n\n        if (mSelectGroup)\n            mSelectGroup->OnSelectableObjectCursorPressed(Ref(this), cursor);\n\n        if (mDragOnlySelected && !mIsSelected)\n            mIsDragAvailable = false;\n\n        mPressedTime = o2Time.GetApplicationTime();\n\n        CursorAreaEventsListener::OnCursorPressed(cursor);\n    }\n\n    void SelectableDragableObject::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (!mIsPressed || cursor.id != mPressedCursorId || cursor.delta.Length() < 0.5f)\n        {\n            CursorAreaEventsListener::OnCursorStillDown(cursor);\n            return;\n        }\n\n        Ref<DragDropArea> dragDropArea = GetDropAreaUnderCursor(cursor.id);\n\n        if (!mIsDragAvailable)\n        {\n            if (o2Time.GetApplicationTime() - mPressedTime < mDragDelay)\n                mIsDragAvailable = true;\n        }\n\n        if (!mIsDragging && mIsDragAvailable)\n        {\n            float delta = (cursor.position - mPressedCursorPos).Length();\n            if (delta > mDragDistanceThreshold)\n            {\n                mIsDragging = true;\n\n                if (mSelectGroup)\n                {\n                    mSelectGroup->OnSelectableObjectBeganDragging(Ref(this));\n                    mSelectGroup->mDraggingObject = Ref(this);\n                }\n                else\n                    Select();\n\n                OnDragStart(cursor);\n            }\n        }\n\n        if (mIsDragging)\n        {\n            OnDragged(cursor, dragDropArea);\n\n            if (mDragDropArea != dragDropArea)\n            {\n                if (mDragDropArea)\n                {\n                    if (mSelectGroup)\n                        mDragDropArea->OnDragExit(mSelectGroup);\n                    else\n                        mDragDropArea->OnDragExit(Ref(this));\n                }\n\n                mDragDropArea = dragDropArea;\n\n                if (mDragDropArea)\n                {\n                    if (mSelectGroup)\n                        mDragDropArea->OnDragEnter(mSelectGroup);\n                    else\n                        mDragDropArea->OnDragEnter(Ref(this));\n                }\n            }\n\n            if (dragDropArea)\n            {\n                if (mSelectGroup)\n                    dragDropArea->OnDraggedAbove(mSelectGroup);\n                else\n                    dragDropArea->OnDraggedAbove(Ref(this));\n            }\n        }\n\n        CursorAreaEventsListener::OnCursorStillDown(cursor);\n    }\n\n    void SelectableDragableObject::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (mIsDragging)\n        {\n            OnDragEnd(cursor);\n\n            if (Ref<DragDropArea> dragDropArea = GetDropAreaUnderCursor(cursor.id))\n            {\n                OnDropped(dragDropArea);\n                if (mSelectGroup)\n                {\n                    dragDropArea->OnDropped(mSelectGroup);\n                    mSelectGroup->mDraggingObject = nullptr;\n                }\n                else\n                    dragDropArea->OnDropped(Ref(this));\n            }\n\n            mDragDropArea = nullptr;\n            mIsDragging = false;\n        }\n        else\n        {\n            if (mSelectGroup)\n                mSelectGroup->OnSelectableObjectCursorReleased(Ref(this), cursor);\n            else\n                SetSelected(!IsSelected());\n        }\n\n        mIsDragAvailable = true;\n        CursorAreaEventsListener::OnCursorReleased(cursor);\n    }\n\n    void SelectableDragableObject::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n        if (!mSelectGroup)\n            Deselect();\n\n        mIsDragAvailable = true;\n    }\n\n    void SelectableDragableObject::OnSelected()\n    {}\n\n    void SelectableDragableObject::OnDeselected()\n    {}\n\n    void ISelectableDragableObjectsGroup::DeselectAll()\n    {\n        auto objects = GetAllObjects();\n        for (auto& object : objects)\n            Deselect(object);\n    }\n\n    void ISelectableDragableObjectsGroup::SelectAll()\n    {\n        auto objects = GetAllObjects();\n        for (auto& object : objects)\n            Select(object);\n    }\n\n    const Ref<SelectableDragableObject> ISelectableDragableObjectsGroup::GetDraggingObject() const\n    {\n        return mDraggingObject;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/DragAndDrop.h",
    "content": "#pragma once\n\n#include \"o2/Events/CursorAreaEventsListener.h\"\n\nnamespace o2\n{\n    class DragableObject;\n    class ISelectableDragableObjectsGroup;\n\n    // --------------------------------\n    // Drag objects drop area interface\n    // --------------------------------\n    class DragDropArea: virtual public CursorAreaEventsListener\n    {\n    protected:\n        // Called when some DragEventsListener was dropped to this\n        virtual void OnDropped(const Ref<DragableObject>& draggable);\n\n        // Called when some selectable listeners was dropped to this\n        virtual void OnDropped(const Ref<ISelectableDragableObjectsGroup>& group);\n\n        // Called when some drag listener was entered to this area\n        virtual void OnDragEnter(const Ref<DragableObject>& draggable);\n\n        // Called when some drag listeners was entered to this area\n        virtual void OnDragEnter(const Ref<ISelectableDragableObjectsGroup>& group);\n\n        // Called when some drag listener was dragged above this area\n        virtual void OnDraggedAbove(const Ref<DragableObject>& draggable);\n\n        // Called when some drag listeners was dragged above this area\n        virtual void OnDraggedAbove(const Ref<ISelectableDragableObjectsGroup>& group);\n\n        // Called when some drag listener was exited from this area\n        virtual void OnDragExit(const Ref<DragableObject>& draggable);\n\n        // Called when some drag listeners was exited from this area\n        virtual void OnDragExit(const Ref<ISelectableDragableObjectsGroup>& group);\n\n        friend class DragableObject;\n        friend class SelectableDragableObject;\n    };\n\n    // --------------------------\n    // Draggable object interface\n    // --------------------------\n    class DragableObject: virtual public CursorAreaEventsListener\n    {\n    public:\n        // Default constructor\n        DragableObject();\n\n        // Destructor\n        virtual ~DragableObject();\n\n        // Returns true if it's dragging\n        bool IsDragging() const;\n\n        // Called when listener was drawn\n        void OnDrawn() override;\n\n        // Returns last cursor pressed point\n        Vec2F GetCursorPressedPoint() const;\n\n    protected:\n        bool  mIsDragging = false;           // True when dragging\n        float mDragDistanceThreshold = 3.0f; // Drag distance threshold: object starts dragging when cursor moves more tan this distance\n        Vec2F mPressedCursorPos;             // Cursor pressed position\n        int   mPressedCursorId;              // Id of pressed cursor\n\n        Ref<DragDropArea> mDragDropArea; // Drag drop area under this when dragging\n\n    protected:\n        // Returns drag drop area under cursor\n        Ref<DragDropArea> GetDropAreaUnderCursor(CursorId cursorId) const;\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when started dragging\n        virtual void OnDragStart(const Input::Cursor& cursor);\n\n        // Called when dragged\n        virtual void OnDragged(const Input::Cursor& cursor, const Ref<DragDropArea>& area);\n\n        // Called when dragging completed\n        virtual void OnDragEnd(const Input::Cursor& cursor);\n\n        // Called when this was dropped\n        virtual void OnDropped(const Ref<DragDropArea>& area);\n\n        friend class EventSystem;\n        friend class DragDropArea;\n    };\n\n    class SelectableDragableObject;\n\n    // --------------------------------------------\n    // Selectable draggable objects group interface\n    // --------------------------------------------\n    class ISelectableDragableObjectsGroup: virtual public CursorAreaEventsListener\n    {\n    public:\n        // Returns selected objects in group\n        virtual Vector<Ref<SelectableDragableObject>> GetSelectedDragObjects() const = 0;\n\n        // Returns all objects in group \n        virtual Vector<Ref<SelectableDragableObject>> GetAllObjects() const = 0;\n\n        // Selects object\n        virtual void Select(const Ref<SelectableDragableObject>& object) = 0;\n\n        // Deselects object\n        virtual void Deselect(const Ref<SelectableDragableObject>& object) = 0;\n\n        // Adds selectable object to group\n        virtual void AddSelectableObject(const Ref<SelectableDragableObject>& object) = 0;\n\n        // Removes selectable object from group\n        virtual void RemoveSelectableObject(SelectableDragableObject* object) = 0;\n\n        // Deselects all in group\n        void DeselectAll();\n\n        // Selects all in group\n        void SelectAll();\n\n        // Returns current dragging object or null\n        const Ref<SelectableDragableObject> GetDraggingObject() const;\n\n    protected:\n        Ref<SelectableDragableObject> mDraggingObject;\n\n    protected:\n        // Called when selectable draggable object was pressed\n        virtual void OnSelectableObjectCursorPressed(const Ref<SelectableDragableObject>& object, const Input::Cursor& cursor) {}\n\n        // Called when selectable draggable object was released\n        virtual void OnSelectableObjectCursorReleased(const Ref<SelectableDragableObject>& object, const Input::Cursor& cursor) {}\n\n        // Called when selectable object was began to drag\n        virtual void OnSelectableObjectBeganDragging(const Ref<SelectableDragableObject>& object) {}\n\n        friend class SelectableDragableObject;\n    };\n\n    // ----------------------------------\n    // Selectable draggable objects group\n    // ----------------------------------\n    class SelectableDragableObjectsGroup: public ISelectableDragableObjectsGroup\n    {\n    public:\n        // Destructor\n        virtual ~SelectableDragableObjectsGroup();\n\n        // Returns selected listeners in group\n        Vector<Ref<SelectableDragableObject>> GetSelectedDragObjects() const override;\n\n        // Returns all objects in group \n        Vector<Ref<SelectableDragableObject>> GetAllObjects() const override;\n\n        // Selects object\n        void Select(const Ref<SelectableDragableObject>& object) override;\n\n        // Deselects object\n        void Deselect(const Ref<SelectableDragableObject>& object) override;\n\n        // Adds selectable object to group\n        void AddSelectableObject(const Ref<SelectableDragableObject>& object) override;\n\n        // Removes selectable object from group\n        void RemoveSelectableObject(SelectableDragableObject* object) override;\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n    protected:\n        Vector<Ref<SelectableDragableObject>> mObjects;         // Listeners in group\n        Vector<Ref<SelectableDragableObject>> mSelectedObjects; // Selected listeners in group\n\n    protected:\n        // Called when selectable draggable object was pressed\n        void OnSelectableObjectCursorPressed(const Ref<SelectableDragableObject>& object, const Input::Cursor& cursor) override;\n\n        friend class SelectableDragableObject;\n    };\n\n    // -------------------------------------\n    // Selectable draggable object interface\n    // -------------------------------------\n    class SelectableDragableObject: public DragableObject\n    {\n    public:\n        // Virtual destructor. Removes himself from selectable group, if need\n        virtual ~SelectableDragableObject();\n\n        // Returns is this selected\n        bool IsSelected() const;\n\n        // Sets is this selected\n        virtual void SetSelected(bool selected);\n\n        // Selects this\n        void Select();\n\n        // Deselects this\n        void Deselect();\n\n        // Sets selection group\n        void SetSelectionGroup(const Ref<ISelectableDragableObjectsGroup>& group);\n\n        // Returns selection group\n        const Ref<ISelectableDragableObjectsGroup>& GetSelectionGroup() const;\n\n        // Sets dragging available only when selected\n        void SetDragOnlySelected(bool value);\n\n        // Returns dragging available only when selected\n        bool IsDragOnlySelected() const;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n    protected:\n        float mDragDelay = 0.35f;   // Delay before disabling drag\n        float mPressedTime = 0.0f; // Time when cursor pressed \n\n        bool mDragOnlySelected = false; // Is dragging available only when selected\n        bool mIsSelected  = false;      // Is this selected\n        bool mIsDragAvailable = true;   // Is dragging available\n\n        Ref<ISelectableDragableObjectsGroup> mSelectGroup; // Selection group\n\n    protected:\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor moved on this (or moved outside when this was pressed)\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor released outside this(only when cursor pressed this at previous time)\n        void OnCursorReleasedOutside(const Input::Cursor& cursor) override;\n\n        // Called when this was selected\n        virtual void OnSelected();\n\n        // Called when this was unselected\n        virtual void OnDeselected();\n\n        friend class ISelectableDragableObjectsGroup;\n        friend class SelectableDragableObjectsGroup;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/DragHandle.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"DragHandle.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Render/IRectDrawable.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n\nnamespace o2\n{\n    DragHandle::DragHandle(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {\n        screenToLocalTransformFunc = [](const Vec2F& point) { return point; };\n        localToScreenTransformFunc = [](const Vec2F& point) { return point; };\n        checkPositionFunc = [](const Vec2F& point) { return point; };\n        checkSnappingFunc = [](const Vec2F& point) { return point; };\n    }\n\n    DragHandle::DragHandle(RefCounter* refCounter, const Ref<IRectDrawable>& regular, const Ref<IRectDrawable>& hover /*= nullptr*/, const Ref<IRectDrawable>& pressed /*= nullptr*/,\n                           const Ref<IRectDrawable>& selected /*= nullptr*/, const Ref<IRectDrawable>& selectedHovered /*= nullptr*/,\n                           const Ref<IRectDrawable>& selectedPressed /*= nullptr*/) :\n        RefCounterable(refCounter), mRegularDrawable(regular), mHoverDrawable(hover), mPressedDrawable(pressed), mSelectedDrawable(selected),\n        mSelectedHoverDrawable(selectedHovered), mSelectedPressedDrawable(selectedPressed)\n    {\n        screenToLocalTransformFunc = [](const Vec2F& point) { return point; };\n        localToScreenTransformFunc = [](const Vec2F& point) { return point; };\n        checkPositionFunc = [](const Vec2F& point) { return point; };\n        checkSnappingFunc = [](const Vec2F& point) { return point; };\n    }\n\n    DragHandle::DragHandle(RefCounter* refCounter, const DragHandle& other) :\n        RefCounterable(refCounter)\n    {\n        if (other.mRegularDrawable)\n            mRegularDrawable = other.mRegularDrawable->CloneAsRef<IRectDrawable>();\n\n        if (other.mHoverDrawable)\n            mHoverDrawable = other.mHoverDrawable->CloneAsRef<IRectDrawable>();\n\n        if (other.mPressedDrawable)\n            mPressedDrawable = other.mPressedDrawable->CloneAsRef<IRectDrawable>();\n\n        if (other.mSelectedDrawable)\n            mSelectedDrawable = other.mSelectedDrawable->CloneAsRef<IRectDrawable>();\n\n        if (other.mSelectedHoverDrawable)\n            mSelectedHoverDrawable = other.mSelectedHoverDrawable->CloneAsRef<IRectDrawable>();\n\n        if (other.mSelectedPressedDrawable)\n            mSelectedPressedDrawable = other.mSelectedPressedDrawable->CloneAsRef<IRectDrawable>();\n\n        onChangedPos = other.onChangedPos;\n        screenToLocalTransformFunc = other.screenToLocalTransformFunc;\n        localToScreenTransformFunc = other.localToScreenTransformFunc;\n        checkPositionFunc = other.checkPositionFunc;\n        checkSnappingFunc = other.checkSnappingFunc;\n        cursorType = other.cursorType;\n        snappingKey = other.snappingKey;\n        pixelPerfect = other.pixelPerfect;\n\n        SetPosition(other.mPosition);\n    }\n\n    DragHandle::DragHandle():\n        DragHandle(nullptr)\n    {}\n\n    DragHandle::DragHandle(const Ref<IRectDrawable>& regular, const Ref<IRectDrawable>& hover /*= nullptr*/, const Ref<IRectDrawable>& pressed /*= nullptr*/,\n                           const Ref<IRectDrawable>& selected /*= nullptr*/, const Ref<IRectDrawable>& selectedHovered /*= nullptr*/,\n                           const Ref<IRectDrawable>& selectedPressed /*= nullptr*/) :\n        DragHandle(nullptr, regular, hover, pressed, selected, selectedHovered, selectedPressed)\n    {}\n\n    DragHandle::DragHandle(const DragHandle& other) :\n        DragHandle(nullptr, other)\n    {}\n\n    DragHandle::~DragHandle()\n    {\n        if (mSelectGroup)\n            mSelectGroup->RemoveHandle(this);\n    }\n\n    DragHandle& DragHandle::operator=(const DragHandle& other)\n    {\n        if (other.mRegularDrawable)\n            mRegularDrawable = other.mRegularDrawable->CloneAsRef<IRectDrawable>();\n        else\n            mRegularDrawable = nullptr;\n\n        if (other.mHoverDrawable)\n            mHoverDrawable = other.mHoverDrawable->CloneAsRef<IRectDrawable>();\n        else\n            mHoverDrawable = nullptr;\n\n        if (other.mPressedDrawable)\n            mPressedDrawable = other.mPressedDrawable->CloneAsRef<IRectDrawable>();\n        else\n            mPressedDrawable = nullptr;\n\n        if (other.mSelectedDrawable)\n            mSelectedDrawable = other.mSelectedDrawable->CloneAsRef<IRectDrawable>();\n        else\n            mSelectedDrawable = nullptr;\n\n        if (other.mSelectedHoverDrawable)\n            mSelectedHoverDrawable = other.mSelectedHoverDrawable->CloneAsRef<IRectDrawable>();\n        else\n            mSelectedHoverDrawable = nullptr;\n\n        if (other.mSelectedPressedDrawable)\n            mSelectedPressedDrawable = other.mSelectedPressedDrawable->CloneAsRef<IRectDrawable>();\n        else\n            mSelectedPressedDrawable = nullptr;\n\n        onChangedPos = other.onChangedPos;\n        screenToLocalTransformFunc = other.screenToLocalTransformFunc;\n        localToScreenTransformFunc = other.localToScreenTransformFunc;\n        checkPositionFunc = other.checkPositionFunc;\n        checkSnappingFunc = other.checkSnappingFunc;\n        cursorType = other.cursorType;\n        snappingKey = other.snappingKey;\n        pixelPerfect = other.pixelPerfect;\n\n        SetPosition(other.mPosition);\n\n        return *this;\n    }\n\n    bool DragHandle::IsSelected() const\n    {\n        return mIsSelected;\n    }\n\n    void DragHandle::SetSelected(bool selected)\n    {\n        if (mIsSelected == selected)\n            return;\n\n        if (mSelectGroup)\n        {\n            if (selected)\n                mSelectGroup->SelectHandle(Ref(this));\n            else\n                mSelectGroup->DeselectHandle(Ref(this));\n        }\n        else\n        {\n            mIsSelected = selected;\n\n            if (mIsSelected)\n                OnSelected();\n            else\n                OnDeselected();\n        }\n    }\n\n    void DragHandle::Select()\n    {\n        SetSelected(true);\n    }\n\n    void DragHandle::Deselect()\n    {\n        SetSelected(false);\n    }\n\n    void DragHandle::Draw()\n    {\n        if (!mEnabled)\n            return;\n\n        if (mLastScreenPosUpdateFrame != o2Time.GetCurrentFrame())\n        {\n            UpdateScreenPosition();\n            mLastScreenPosUpdateFrame = o2Time.GetCurrentFrame();\n        }\n\n        UpdateDrawablesPositions();\n        DrawInternal();\n    }\n\n    void DragHandle::Draw(const RectF& screenClipRect)\n    {\n        if (!mEnabled)\n            return;\n\n        if (mLastScreenPosUpdateFrame != o2Time.GetCurrentFrame())\n        {\n            UpdateScreenPosition();\n            mLastScreenPosUpdateFrame = o2Time.GetCurrentFrame();\n        }\n\n        if (screenClipRect.IsInside(mScreenPosition))\n        {\n            UpdateDrawablesPositions();\n            DrawInternal();\n        }\n    }\n\n    bool DragHandle::IsUnderPoint(const Vec2F& point)\n    {\n        if (!isPointInside.IsEmpty())\n            return mDrawingScissorRect.IsInside(point) && isPointInside(point);\n\n        if (mRegularDrawable)\n            return mDrawingScissorRect.IsInside(point) && mRegularDrawable->IsPointInside(point);\n\n        return false;\n    }\n\n    Vec2F DragHandle::ScreenToLocal(const Vec2F& point)\n    {\n        return screenToLocalTransformFunc(point);\n    }\n\n    Vec2F DragHandle::LocalToScreen(const Vec2F& point)\n    {\n        return localToScreenTransformFunc(point);\n    }\n\n    void DragHandle::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        onPressed();\n\n        mDragOffset = mPosition - ScreenToLocal(cursor.position);\n        mDragPosition = mPosition;\n        mPressedCursorId = cursor.id;\n\n        if (mSelectGroup)\n            mSelectGroup->OnHandleCursorPressed(Ref(this), cursor);\n\n        mPressedCursorPos = cursor.position;\n    }\n\n    void DragHandle::OnCursorDblClicked(const Input::Cursor& cursor)\n    {\n        onDblClicked();\n    }\n\n    void DragHandle::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (mIsDragging)\n        {\n            mIsDragging = false;\n\n            if (mDragBeginPosition != mPosition)\n            {\n                if (mSelectGroup)\n                    mSelectGroup->OnHandleCompletedChange(Ref(this));\n                else\n                    onChangeCompleted();\n            }\n        }\n        else\n        {\n            if (mSelectGroup)\n                mSelectGroup->OnHandleCursorReleased(Ref(this), cursor);\n            else\n                SetSelected(!IsSelected());\n        }\n\n        if (!IsUnderPoint(cursor.position))\n            o2Application.SetCursor(CursorType::Arrow);\n\n        onReleased();\n    }\n\n    void DragHandle::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        mIsDragging = false;\n\n        onReleased();\n\n        if (mDragBeginPosition != mPosition)\n            onChangeCompleted();\n    }\n\n    void DragHandle::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (!mIsPressed)\n            return;\n\n        if (cursor.id != mPressedCursorId)\n            return;\n\n        if (cursor.delta.Length() < 0.5f)\n            return;\n\n        if (!mIsDragging)\n        {\n            float delta = (cursor.position - mPressedCursorPos).Length();\n            if (delta > mDragDistanceThreshold)\n            {\n                onBeganDragging();\n\n                mIsDragging = true;\n                mDragBeginPosition = mPosition;\n\n                if (mSelectGroup)\n                    mSelectGroup->OnHandleBeganDragging(Ref(this));\n                else\n                    Select();\n            }\n        }\n\n        if (mIsDragging)\n        {\n            mDragPosition = ScreenToLocal(cursor.position) + mDragOffset;\n\n            SetPosition(mDragPosition);\n            onChangedPos(mPosition);\n\n            if (mSelectGroup)\n                mSelectGroup->OnHandleMoved(Ref(this), cursor.position);\n        }\n    }\n\n    void DragHandle::OnCursorEnter(const Input::Cursor& cursor)\n    {\n        mIsHovered = true;\n\t\tonHoverEnter();\n\n        if (!cursor.isPressed)\n            o2Application.SetCursor(cursorType);\n    }\n\n    void DragHandle::OnCursorExit(const Input::Cursor& cursor)\n    {\n        mIsHovered = false;\n\t\tonHoverExit();\n\n        if (!IsPressed() && !cursor.isPressed)\n            o2Application.SetCursor(CursorType::Arrow);\n    }\n\n    void DragHandle::OnCursorRightMousePressed(const Input::Cursor& cursor)\n    {\n        onRightButtonPressed(cursor);\n    }\n\n    void DragHandle::OnCursorRightMouseReleased(const Input::Cursor& cursor)\n    {\n        onRightButtonReleased(cursor);\n    }\n\n    void DragHandle::SetPosition(const Vec2F& position)\n    {\n        mPosition = checkPositionFunc(position);\n\n        if (mIsDragging && o2Input.IsKeyDown(snappingKey))\n            mPosition = checkSnappingFunc(mPosition);\n\n        UpdateScreenPosition();\n    }\n\n    const Vec2F& DragHandle::GetScreenPosition() const\n    {\n        return mScreenPosition;\n    }\n\n    void DragHandle::UpdateScreenPosition()\n    {\n        mScreenPosition = LocalToScreen(mPosition);\n\n        if (pixelPerfect)\n        {\n            mScreenPosition.x = Math::Round(mScreenPosition.x);\n            mScreenPosition.y = Math::Round(mScreenPosition.y);\n        }\n    }\n\n    void DragHandle::UpdateDrawablesPositions()\n    {\n        if (mLastDrawnScreenPosition == mScreenPosition)\n            return;\n\n        mLastDrawnScreenPosition = mScreenPosition;\n\n        if (mRegularDrawable)\n            mRegularDrawable->SetPosition(mScreenPosition);\n\n        if (mHoverDrawable)\n            mHoverDrawable->SetPosition(mScreenPosition);\n\n        if (mPressedDrawable)\n            mPressedDrawable->SetPosition(mScreenPosition);\n\n        if (mSelectedDrawable)\n            mSelectedDrawable->SetPosition(mScreenPosition);\n\n        if (mSelectedHoverDrawable)\n            mSelectedHoverDrawable->SetPosition(mScreenPosition);\n\n        if (mSelectedPressedDrawable)\n            mSelectedPressedDrawable->SetPosition(mScreenPosition);\n    }\n\n    void DragHandle::SetDragPosition(const Vec2F& position)\n    {\n        mDragPosition = position;\n        SetPosition(position);\n    }\n\n    Vec2F DragHandle::GetDragPosition() const\n    {\n        return mDragPosition;\n    }\n\n    Vec2F DragHandle::GetPosition() const\n    {\n        return mPosition;\n    }\n\n    Vec2F DragHandle::GetDraggingOffset() const\n    {\n        return mDragOffset;\n    }\n\n    Vec2F DragHandle::GetDraggingBeginPosition() const\n    {\n        return mDragBeginPosition;\n    }\n\n    void DragHandle::BeginDrag(const Vec2F& cursor)\n    {\n        mDragOffset = mPosition - ScreenToLocal(cursor);\n        mDragPosition = mPosition;\n    }\n\n    void DragHandle::SetEnabled(bool enabled)\n    {\n        mEnabled = enabled;\n    }\n\n    bool DragHandle::IsEnabled() const\n    {\n        return mEnabled;\n    }\n\n    void DragHandle::SetAngle(float rad)\n    {\n        mAngle = rad;\n\n        if (mRegularDrawable)\n            mRegularDrawable->angle = rad;\n\n        if (mHoverDrawable)\n            mHoverDrawable->angle = rad;\n\n        if (mPressedDrawable)\n            mPressedDrawable->angle = rad;\n\n        if (mSelectedDrawable)\n            mSelectedDrawable->angle = rad;\n\n        if (mSelectedHoverDrawable)\n            mSelectedHoverDrawable->angle = rad;\n\n        if (mSelectedPressedDrawable)\n            mSelectedPressedDrawable->angle = rad;\n    }\n\n    float DragHandle::GetAngle() const\n    {\n        return mAngle;\n    }\n\n    const Vec2F& DragHandle::GetPressedCursorPos() const\n    {\n        return mPressedCursorPos;\n    }\n\n    void DragHandle::SetRegularDrawable(const Ref<IRectDrawable>& IRectDrawable)\n    {\n        mRegularDrawable = IRectDrawable;\n    }\n\n    const Ref<IRectDrawable>& DragHandle::GetRegularDrawable() const\n    {\n        return mRegularDrawable;\n    }\n\n    void DragHandle::SetHoverDrawable(const Ref<IRectDrawable>& IRectDrawable)\n    {\n        mHoverDrawable = IRectDrawable;\n    }\n\n    const Ref<IRectDrawable>& DragHandle::GetHoverDrawable() const\n    {\n        return mHoverDrawable;\n    }\n\n    void DragHandle::SetPressedDrawable(const Ref<IRectDrawable>& IRectDrawable)\n    {\n        mPressedDrawable = IRectDrawable;\n    }\n\n    const Ref<IRectDrawable>& DragHandle::GetPressedDrawable() const\n    {\n        return mPressedDrawable;\n    }\n\n    void DragHandle::SetSelectedDrawable(const Ref<IRectDrawable>& IRectDrawable)\n    {\n        mSelectedDrawable = IRectDrawable;\n    }\n\n    const Ref<IRectDrawable>& DragHandle::GetSelectedDrawable() const\n    {\n        return mSelectedDrawable;\n    }\n\n    void DragHandle::SetSelectedHoveredDrawable(const Ref<IRectDrawable>& IRectDrawable)\n    {\n        mSelectedHoverDrawable = IRectDrawable;\n    }\n\n    const Ref<IRectDrawable>& DragHandle::GetSelectedHoveredDrawable() const\n    {\n        return mSelectedHoverDrawable;\n    }\n\n    void DragHandle::SetSelectedPressedDrawable(const Ref<IRectDrawable>& IRectDrawable)\n    {\n        mSelectedPressedDrawable = IRectDrawable;\n    }\n\n    const Ref<IRectDrawable>& DragHandle::GetSelectedPressedDrawable() const\n    {\n        return mSelectedPressedDrawable;\n    }\n\n    void DragHandle::SetDrawablesSize(const Vec2F& size)\n    {\n        if (mRegularDrawable)\n            mRegularDrawable->SetSize(size);\n\n        if (mHoverDrawable)\n            mHoverDrawable->SetSize(size);\n\n        if (mPressedDrawable)\n            mPressedDrawable->SetSize(size);\n\n        if (mSelectedDrawable)\n            mSelectedDrawable->SetSize(size);\n\n        if (mSelectedHoverDrawable)\n            mSelectedHoverDrawable->SetSize(size);\n\n        if (mSelectedPressedDrawable)\n            mSelectedPressedDrawable->SetSize(size);\n    }\n\n    void DragHandle::SetDrawablesColor(const Color4& color)\n    {\n        if (mRegularDrawable)\n            mRegularDrawable->SetColor(color);\n\n        if (mHoverDrawable)\n            mHoverDrawable->SetColor(color);\n\n        if (mPressedDrawable)\n            mPressedDrawable->SetColor(color);\n    }\n\n    void DragHandle::SetDrawablesSizePivot(const Vec2F& pivot)\n    {\n        if (mRegularDrawable)\n            mRegularDrawable->SetSizePivot(pivot);\n\n        if (mHoverDrawable)\n            mHoverDrawable->SetSizePivot(pivot);\n\n        if (mPressedDrawable)\n            mPressedDrawable->SetSizePivot(pivot);\n\n        if (mSelectedDrawable)\n            mSelectedDrawable->SetSizePivot(pivot);\n\n        if (mSelectedHoverDrawable)\n            mSelectedHoverDrawable->SetSizePivot(pivot);\n\n        if (mSelectedPressedDrawable)\n            mSelectedPressedDrawable->SetSizePivot(pivot);\n    }\n\n    bool DragHandle::IsScrollable() const\n    {\n        return true;\n    }\n\n    void DragHandle::SetSelectionGroup(const Ref<ISelectableDragHandlesGroup>& group)\n    {\n        if (mSelectGroup == group)\n            return;\n\n        if (mSelectGroup)\n            mSelectGroup->RemoveHandle(this);\n\n        mSelectGroup = group;\n\n        if (mSelectGroup)\n            mSelectGroup->AddHandle(Ref(this));\n    }\n\n    const Ref<ISelectableDragHandlesGroup>& DragHandle::GetSelectionGroup() const\n    {\n        return mSelectGroup;\n    }\n\n    void DragHandle::OnCursorReleasedOutside(const Input::Cursor& cursor)\n    {\n        if (!mSelectGroup)\n            Deselect();\n    }\n\n    void DragHandle::OnSelected()\n    {\n        onSelected();\n    }\n\n    void DragHandle::OnDeselected()\n    {\n\t\tonDeselected();\n    }\n\n    void DragHandle::DrawInternal()\n    {\n        float alphaChangeCoef = 15.0f;\n\n        if (mRegularDrawable)\n            mRegularDrawable->Draw();\n\n        if (mHoverDrawable && !(mIsSelected && mSelectedHoverDrawable))\n        {\n            float transparency = Math::Lerp(mHoverDrawable->GetTransparency(), mIsHovered ? 1.0f : 0.0f,\n                                            o2Time.GetDeltaTime()*alphaChangeCoef);\n\n            if (!Math::Equals(transparency, mHoverDrawable->GetTransparency()))\n                mHoverDrawable->SetTransparency(transparency);\n\n            mHoverDrawable->Draw();\n        }\n\n        if (mPressedDrawable && !(mIsSelected && mSelectedPressedDrawable))\n        {\n            float transparency = Math::Lerp(mPressedDrawable->GetTransparency(), mIsPressed ? 1.0f : 0.0f,\n                                            o2Time.GetDeltaTime()*alphaChangeCoef);\n\n            if (!Math::Equals(transparency, mPressedDrawable->GetTransparency()))\n                mPressedDrawable->SetTransparency(transparency);\n\n            mPressedDrawable->Draw();\n        }\n\n        if (mSelectedDrawable)\n        {\n            float transparency = Math::Lerp(mSelectedDrawable->GetTransparency(), mIsSelected ? 1.0f : 0.0f,\n                                            o2Time.GetDeltaTime()*alphaChangeCoef);\n\n            if (!Math::Equals(transparency, mSelectedDrawable->GetTransparency()))\n                mSelectedDrawable->SetTransparency(transparency);\n\n            mSelectedDrawable->Draw();\n        }\n\n        if (mIsSelected && mSelectedHoverDrawable)\n        {\n            float transparency = Math::Lerp(mSelectedHoverDrawable->GetTransparency(), mIsHovered ? 1.0f : 0.0f,\n                                            o2Time.GetDeltaTime()*alphaChangeCoef);\n\n            if (!Math::Equals(transparency, mSelectedHoverDrawable->GetTransparency()))\n                mSelectedHoverDrawable->SetTransparency(transparency);\n\n            mSelectedHoverDrawable->Draw();\n        }\n\n        if (mIsSelected && mSelectedPressedDrawable)\n        {\n\n            float transparency = Math::Lerp(mSelectedPressedDrawable->GetTransparency(), mIsPressed ? 1.0f : 0.0f,\n                                            o2Time.GetDeltaTime()*alphaChangeCoef);\n\n            if (!Math::Equals(transparency, mSelectedPressedDrawable->GetTransparency()))\n                mSelectedPressedDrawable->SetTransparency(transparency);\n\n            mSelectedPressedDrawable->Draw();\n        }\n\n        CursorAreaEventsListener::OnDrawn();\n        IDrawable::OnDrawn();\n    }\n\n    WidgetDragHandle::WidgetDragHandle(RefCounter* refCounter) :\n        DragHandle(refCounter), Widget(refCounter)\n    {\n        widgetOffsetToLocalTransformFunc = [](const Vec2F& point) { return point; };\n        localToWidgetOffsetTransformFunc = [](const Vec2F& point) { return point; };\n    }\n\n    WidgetDragHandle::WidgetDragHandle(RefCounter* refCounter, const Ref<IRectDrawable>& regular, const Ref<IRectDrawable>& hover /*= nullptr*/, const Ref<IRectDrawable>& pressed /*= nullptr*/,\n                                       const Ref<IRectDrawable>& selected /*= nullptr*/, const Ref<IRectDrawable>& selectedHovered /*= nullptr*/, \n                                       const Ref<IRectDrawable>& selectedPressed /*= nullptr*/) :\n        DragHandle(refCounter, regular, hover, pressed, selected, selectedHovered, selectedPressed), Widget(refCounter)\n    {\n        widgetOffsetToLocalTransformFunc = [](const Vec2F& point) { return point; };\n        localToWidgetOffsetTransformFunc = [](const Vec2F& point) { return point; };\n    }\n\n    WidgetDragHandle::WidgetDragHandle(RefCounter* refCounter, const WidgetDragHandle& other) :\n        DragHandle(refCounter, other), Widget(refCounter, other)\n    {\n        widgetOffsetToLocalTransformFunc = other.widgetOffsetToLocalTransformFunc;\n        localToWidgetOffsetTransformFunc = other.localToWidgetOffsetTransformFunc;\n\n        SetPosition(mPosition);\n    }\n\n    WidgetDragHandle::~WidgetDragHandle()\n    {}\n\n    WidgetDragHandle& WidgetDragHandle::operator=(const WidgetDragHandle& other)\n    {\n        Widget::operator=(other);\n        DragHandle::operator=(other);\n\n        widgetOffsetToLocalTransformFunc = other.widgetOffsetToLocalTransformFunc;\n        localToWidgetOffsetTransformFunc = other.localToWidgetOffsetTransformFunc;\n\n        SetPosition(mPosition);\n\n        return *this;\n    }\n\n    void WidgetDragHandle::Draw()\n    {\n        if (!mResEnabledInHierarchy)\n            return;\n\n        DragHandle::Draw();\n    }\n\n    void WidgetDragHandle::SetEnabled(bool enabled)\n    {\n        DragHandle::SetEnabled(enabled);\n    }\n\n    bool WidgetDragHandle::IsEnabled() const\n    {\n        return DragHandle::IsEnabled();\n    }\n\n    Vec2F WidgetDragHandle::ScreenToLocal(const Vec2F& point)\n    {\n        if (mParentWidget)\n            return widgetOffsetToLocalTransformFunc(point - mParentWidget.Lock()->layout->GetWorldLeftBottom());\n\n        return DragHandle::ScreenToLocal(point);\n    }\n\n    Vec2F WidgetDragHandle::LocalToScreen(const Vec2F& point)\n    {\n        if (mParentWidget)\n            return localToWidgetOffsetTransformFunc(point) + mParentWidget.Lock()->layout->GetWorldLeftBottom();\n\n        return DragHandle::ScreenToLocal(point);\n    }\n\n    String WidgetDragHandle::GetCreateMenuCategory()\n    {\n        return \"UI/Editor\";\n    }\n\n    Ref<o2::RefCounterable> WidgetDragHandle::CastToRefCounterable(const Ref<WidgetDragHandle>& ref)\n    {\n        return DynamicCast<Widget>(ref);\n    }\n\n    void WidgetDragHandle::UpdateLayersLayouts()\n    {\n        onLayoutUpdated();\n        UpdateScreenPosition();\n    }\n\n    void WidgetDragHandle::OnSerialize(DataValue& node) const\n    {\n        Widget::OnSerialize(node);\n    }\n\n    void WidgetDragHandle::OnDeserialized(const DataValue& node)\n    {\n        Widget::OnDeserialized(node);\n    }\n\n    void WidgetDragHandle::OnDeserializedDelta(const DataValue& node, const IObject& origin)\n    {\n        Widget::OnDeserializedDelta(node, origin);\n    }\n\n    ISelectableDragHandlesGroup::ISelectableDragHandlesGroup()\n    {}\n\n    ISelectableDragHandlesGroup::ISelectableDragHandlesGroup(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {}\n\n    void ISelectableDragHandlesGroup::DeselectAll()\n    {\n        auto handles = GetAllHandles();\n        for (auto& handle : handles)\n            DeselectHandle(handle);\n    }\n\n    void ISelectableDragHandlesGroup::SelectAll()\n    {\n        auto handles = GetAllHandles();\n        for (auto& handle : handles)\n            SelectHandle(handle);\n    }\n\n    void ISelectableDragHandlesGroup::SetHandleSelectedState(const Ref<DragHandle>& handle, bool selected)\n    {\n        handle->mIsSelected = selected;\n    }\n\n    SelectableDragHandlesGroup::SelectableDragHandlesGroup(RefCounter* refCounter):\n        ISelectableDragHandlesGroup(refCounter)\n    {}\n\n    SelectableDragHandlesGroup::SelectableDragHandlesGroup()\n    {}\n\n    SelectableDragHandlesGroup::~SelectableDragHandlesGroup()\n    {\n        for (auto& handle : mHandles)\n            handle->mSelectGroup = nullptr;\n    }\n\n    const Vector<Ref<DragHandle>>& SelectableDragHandlesGroup::GetSelectedHandles() const\n    {\n        return mSelectedHandles;\n    }\n\n    Vector<Ref<DragHandle>> SelectableDragHandlesGroup::GetAllHandles() const\n    {\n        return mHandles;\n    }\n\n    void SelectableDragHandlesGroup::SelectHandle(const Ref<DragHandle>& handle)\n    {\n        if (mSelectedHandles.Contains(handle))\n            return;\n\n        handle->mIsSelected = true;\n        mSelectedHandles.Add(handle);\n        handle->OnSelected();\n\n        OnSelectionChanged();\n    }\n\n    void SelectableDragHandlesGroup::DeselectHandle(const Ref<DragHandle>& handle)\n    {\n        if (!mSelectedHandles.Contains(handle))\n            return;\n\n        handle->mIsSelected = false;\n        mSelectedHandles.Remove(handle);\n        handle->OnDeselected();\n\n        OnSelectionChanged();\n    }\n\n    void SelectableDragHandlesGroup::AddHandle(const Ref<DragHandle>& handle)\n    {\n        if (mHandles.Contains(handle))\n            return;\n\n        mHandles.Add(handle);\n    }\n\n    void SelectableDragHandlesGroup::RemoveHandle(DragHandle* handle)\n    {\n        mHandles.RemoveFirst([&](auto& x) { return x == handle; });\n\n        int idx = mSelectedHandles.IndexOf([&](auto& x) { return x == handle; });\n        if (idx >= 0)\n        {\n            mSelectedHandles.RemoveAt(idx);\n            OnSelectionChanged();\n        }\n    }\n\n    void SelectableDragHandlesGroup::DeselectAll()\n    {\n        for (auto& handle : mSelectedHandles)\n        {\n            handle->mIsSelected = false;\n            handle->OnDeselected();\n        }\n\n        mSelectedHandles.Clear();\n        OnSelectionChanged();\n    }\n\n    void SelectableDragHandlesGroup::SelectAll()\n    {\n        for (auto& handle : mHandles) {\n            handle->mIsSelected = true;\n            handle->OnSelected();\n        }\n\n        mSelectedHandles = mHandles;\n        OnSelectionChanged();\n    }\n\n\tvoid SelectableDragHandlesGroup::BeginPreSelect()\n\t{\n\t\tif (!o2Input.IsKeyDown(VK_CONTROL))\n\t\t\tDeselectAll();\n\n\t\tmPreSelectedHandles.Clear();\n\t}\n\n\tvoid SelectableDragHandlesGroup::UpdatePreSelect(const Vector<Ref<DragHandle>>& handles)\n\t{\n        mPreSelectedHandles = handles;\n\t}\n\n\tvoid SelectableDragHandlesGroup::EndPreSelect()\n\t{\n\t\tfor (auto& handle : mPreSelectedHandles)\n\t\t{\n\t\t\tif (!mSelectedHandles.Contains(handle))\n                SelectHandle(handle);\n\t\t}\n\t}\n\n\tvoid SelectableDragHandlesGroup::OnSelectionChanged()\n    {}\n\n    void SelectableDragHandlesGroup::OnHandleCursorPressed(const Ref<DragHandle>& handle, const Input::Cursor& cursor)\n    {\n        if (!GetSelectedHandles().Contains(handle))\n        {\n            if (!o2Input.IsKeyDown(VK_CONTROL))\n                DeselectAll();\n\n            SelectHandle(handle);\n        }\n\n        for (auto& handle : GetSelectedHandles())\n            handle->BeginDrag(cursor.position);\n    }\n\n    void SelectableDragHandlesGroup::OnHandleCursorReleased(const Ref<DragHandle>& handle, const Input::Cursor& cursor)\n    {}\n\n    void SelectableDragHandlesGroup::OnHandleBeganDragging(const Ref<DragHandle>& handle)\n    {\n        if (handle->IsSelected())\n            return;\n\n        if (!o2Input.IsKeyDown(VK_CONTROL))\n            DeselectAll();\n\n        SelectHandle(handle);\n    }\n\n    void SelectableDragHandlesGroup::OnHandleMoved(const Ref<DragHandle>& handle, const Vec2F& cursorPos)\n    {\n        for (auto& selectedHandle : GetSelectedHandles())\n        {\n            if (selectedHandle == handle)\n                continue;\n\n            selectedHandle->mDragPosition = selectedHandle->ScreenToLocal(cursorPos) + selectedHandle->mDragOffset;\n            selectedHandle->SetPosition(selectedHandle->mDragPosition);\n            selectedHandle->onChangedPos(selectedHandle->GetPosition());\n        }\n    }\n}\n\nDECLARE_TEMPLATE_CLASS(o2::LinkRef<o2::WidgetDragHandle>);\n// --- META ---\n\nDECLARE_CLASS(o2::DragHandle, o2__DragHandle);\n\nDECLARE_CLASS(o2::WidgetDragHandle, o2__WidgetDragHandle);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/DragHandle.h",
    "content": "#pragma once\n\n#include \"o2/Application/VKCodes.h\"\n#include \"o2/Events/CursorAreaEventsListener.h\"\n#include \"o2/Render/IDrawable.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nnamespace o2\n{\n    class IRectDrawable;\n    class ISelectableDragHandlesGroup;\n\n    // -----------\n    // Drag handle\n    // -----------\n    class DragHandle: public RefCounterable, public IDrawable, public CursorAreaEventsListener, virtual public ISerializable, virtual public ICloneableRef\n    {\n    public:\n        PROPERTIES(DragHandle);\n        PROPERTY(float, angle, SetAngle, GetAngle);          // Handle angle in radians property\n        PROPERTY(Vec2F, position, SetPosition, GetPosition); // Current position property\n        PROPERTY(bool, enabled, SetEnabled, IsEnabled);      // Is handle enabled property. Disabled handle don't drawn and interact\n        PROPERTY(bool, selected, SetSelected, IsSelected);   // Is handle selected property\n\n    public:\n        CursorType  cursorType = CursorType::Arrow; // Cursor type when hovering and dragging\n        bool        pixelPerfect = true;            // Is handle draws pixel perfect\n        KeyboardKey snappingKey = VK_CONTROL;       // Snapping key, when it pressed handle uses checkSnappingFunc to correct position\n\n    public:\n\t\tFunction<void(const Vec2F&)> onChangedPos;      // On position changed event\n\t\tFunction<void()>             onChangeCompleted; // Change completed event\n\n\t\tFunction<void()> onPressed;    // Pressed cursor on handle event\n\t\tFunction<void()> onDblClicked; // Double clicked cursor on handle event\n\t\tFunction<void()> onReleased;   // Released cursor event\n\n\t\tFunction<void(const Input::Cursor&)> onRightButtonPressed;  // Right mouse button pressed event\n\t\tFunction<void(const Input::Cursor&)> onRightButtonReleased; // Right mouse button released event\n\n\t\tFunction<void()> onHoverEnter; // Hovered cursor enter event\n\t\tFunction<void()> onHoverExit;  // Hovered cursor exit event\n\n        Function<void()> onBeganDragging; // Drag begin event\n\n        Function<bool(const Vec2F&)> isPointInside; // Checking point inside function. When this is null, using IRectDrawable inside checking function\n\n        Function<Vec2F(const Vec2F&)> screenToLocalTransformFunc; // Screen position to local transformation function\n        Function<Vec2F(const Vec2F&)> localToScreenTransformFunc; // Local position to screen transformation function\n        Function<Vec2F(const Vec2F&)> checkPositionFunc;          // Position constraints checking function\n        Function<Vec2F(const Vec2F&)> checkSnappingFunc;          // Checking snapping position when dragging with pressed snapping key\n\n\t\tFunction<void()> onSelected;   // Selected event\n\t\tFunction<void()> onDeselected; // Deselected event\n\n    public:\n        // Default constructor\n        DragHandle();\n\n        // Default constructor\n        DragHandle(RefCounter* refCounter);\n\n        // Constructor with views\n        DragHandle(const Ref<IRectDrawable>& regular, const Ref<IRectDrawable>& hover = nullptr,\n                   const Ref<IRectDrawable>& pressed = nullptr, const Ref<IRectDrawable>& selected = nullptr,\n                   const Ref<IRectDrawable>& selectedHovered = nullptr, const Ref<IRectDrawable>& selectedPressed = nullptr);\n\n        // Constructor with views\n        DragHandle(RefCounter* refCounter, const Ref<IRectDrawable>& regular, const Ref<IRectDrawable>& hover = nullptr,\n                   const Ref<IRectDrawable>& pressed = nullptr, const Ref<IRectDrawable>& selected = nullptr,\n                   const Ref<IRectDrawable>& selectedHovered = nullptr, const Ref<IRectDrawable>& selectedPressed = nullptr);\n\n        // Copy-constructor\n        DragHandle(const DragHandle& other);\n\n        // Copy-constructor\n        DragHandle(RefCounter* refCounter, const DragHandle& other);\n\n        // Destructor\n        virtual ~DragHandle();\n\n        // Copy-operator\n        DragHandle& operator=(const DragHandle& other);\n\n        // Draws handle\n        void Draw() override;\n\n        // Draws handle with clipping check\n        void Draw(const RectF& screenClipRect);\n\n        // Returns true if point is above this\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Sets position\n        void SetPosition(const Vec2F& position);\n\n        // Returns handle screen position, transformed from position with localToScreenTransformFunc\n        const Vec2F& GetScreenPosition() const;\n\n        // Updates screen position from position with localToScreenTransformFunc\n        virtual void UpdateScreenPosition();\n\n        // Sets drag position of handle, updates handle final position after position checking\n        void SetDragPosition(const Vec2F& position);\n\n        // Returns drag position\n        Vec2F GetDragPosition() const;\n\n        // Returns position\n        Vec2F GetPosition() const;\n\n        // Returns handle dragging offset to cursor\n        Vec2F GetDraggingOffset() const;\n\n        // Returns position at beginning of dragging\n        Vec2F GetDraggingBeginPosition() const;\n\n        // Called when handle beginning to drag from outside, for example from selection group. Updates drag position and drag offset\n        void BeginDrag(const Vec2F& cursor);\n\n        // Sets is this selected\n        virtual void SetSelected(bool selected);\n\n        // Returns is this selected\n        bool IsSelected() const;\n\n        // Selects this\n        void Select();\n\n        // Deselects this\n        void Deselect();\n\n        // Sets selection group\n        void SetSelectionGroup(const Ref<ISelectableDragHandlesGroup>& group);\n\n        // Returns selection group\n        const Ref<ISelectableDragHandlesGroup>& GetSelectionGroup() const;\n\n        // Set handle enabled. Disabled handle don't drawn and interact\n        virtual void SetEnabled(bool enabled);\n\n        // Returns is handle enabled. Disabled handle don't drawn and interact\n        bool IsEnabled() const;\n\n        // Sets handle rotation angle in radians\n        virtual void SetAngle(float rad);\n\n        // Return handle rotation angle in radians\n        float GetAngle() const;\n\n        // Returns cursor position when it was pressed\n        const Vec2F& GetPressedCursorPos() const;\n\n        // Converts point from screen to local space\n        virtual Vec2F ScreenToLocal(const Vec2F& point);\n\n        // Converts point from local to screen space\n        virtual Vec2F LocalToScreen(const Vec2F& point);\n\n        // Sets regular drawable\n        void SetRegularDrawable(const Ref<IRectDrawable>& IRectDrawable);\n\n        // Returns regular drawable\n        const Ref<IRectDrawable>& GetRegularDrawable() const;\n\n        // Sets hovered drawable\n        void SetHoverDrawable(const Ref<IRectDrawable>& IRectDrawable);\n\n        // Returns hovered drawable\n        const Ref<IRectDrawable>& GetHoverDrawable() const;\n\n        // Sets pressed drawable\n        void SetPressedDrawable(const Ref<IRectDrawable>& IRectDrawable);\n\n        // Returns pressed drawable\n        const Ref<IRectDrawable>& GetPressedDrawable() const;\n\n        // Sets selected drawable\n        void SetSelectedDrawable(const Ref<IRectDrawable>& IRectDrawable);\n\n        // Returns selected drawable\n        const Ref<IRectDrawable>& GetSelectedDrawable() const;\n\n        // Sets selected hovered drawable\n        void SetSelectedHoveredDrawable(const Ref<IRectDrawable>& IRectDrawable);\n\n        // Returns selected hovered drawable\n        const Ref<IRectDrawable>& GetSelectedHoveredDrawable() const;\n\n        // Sets selected pressed drawable\n        void SetSelectedPressedDrawable(const Ref<IRectDrawable>& IRectDrawable);\n\n        // Returns selected pressed drawable\n        const Ref<IRectDrawable>& GetSelectedPressedDrawable() const;\n\n        // Sets size to all available drawable\n        void SetDrawablesSize(const Vec2F& size);\n\n        // Sets color to all drawable\n        void SetDrawablesColor(const Color4& color);\n\n        // Sets size to all available drawable\n        void SetDrawablesSizePivot(const Vec2F& pivot);\n\n        // Returns is listener scrollable\n        bool IsScrollable() const override;\n\n        SERIALIZABLE(DragHandle);\n        CLONEABLE_REF(DragHandle);\n\n    protected:\n        Ref<IRectDrawable> mRegularDrawable;  // Regular view IRectDrawable @SERIALIZABLE\n        Ref<IRectDrawable> mHoverDrawable;    // Hovered view IRectDrawable @SERIALIZABLE\n        Ref<IRectDrawable> mPressedDrawable;  // Pressed view IRectDrawable @SERIALIZABLE\n\n        Ref<IRectDrawable> mSelectedDrawable;        // Selected view IRectDrawable @SERIALIZABLE\n        Ref<IRectDrawable> mSelectedHoverDrawable;   // Selected hovered view IRectDrawable @SERIALIZABLE\n        Ref<IRectDrawable> mSelectedPressedDrawable; // Selected pressed view IRectDrawable @SERIALIZABLE\n\n        bool   mEnabled = true; // Is handle enabled. Disabled handle don't drawn and interact\n\n        Vec2F  mPosition;                      // Current handle position, checked by checkPositionFunc\n        Vec2F  mScreenPosition;                // Handle screen position, transformed from mPosition with localToScreenTransformFunc\n        Vec2F  mLastDrawnScreenPosition;       // Handle screen position on last draw\n        int    mLastScreenPosUpdateFrame = -1; // Last screen position update frame index\n        float  mAngle = 0.0f;                  // Handle rotation angle in radians\n\n        Vec2F  mDragOffset;        // Dragging offset from cursor in local space to center\n        Vec2F  mDragPosition;      // Current drag handle position\n        Vec2F  mDragBeginPosition; // Position at beginning dragging\n\n        int    mPressedCursorId;    // Id of pressed cursor\n        Vec2F  mPressedCursorPos;   // Cursor pressed position\n        bool   mIsDragging = false; // Is handle in dragging mode\n        bool   mIsHovered = false;  // Is handle under cursor, used for hover IRectDrawable appearing\n\n        bool                             mIsSelected = false; // Is this selected\n        Ref<ISelectableDragHandlesGroup> mSelectGroup;        // Selection group\n\n        float  mDragDistanceThreshold = 3.0f; // Drag distance threshold: object starts dragging when cursor moves more tan this distance\n\n    protected:\n        // Draws internal IRectDrawables with calculated screen position\n        void DrawInternal();\n\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor double clicked\n        void OnCursorDblClicked(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor released outside this(only when cursor pressed this at previous time)\n        void OnCursorReleasedOutside(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Called when cursor enters this object\n        void OnCursorEnter(const Input::Cursor& cursor) override;\n\n        // Called when cursor exits this object\n        void OnCursorExit(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was pressed on this, calls onRightButtonPressed event\n        void OnCursorRightMousePressed(const Input::Cursor& cursor) override;\n\n        // Called when right mouse button was released (only when right mouse button pressed this at previous time), calls onRightButtonReleased event\n        void OnCursorRightMouseReleased(const Input::Cursor& cursor) override;\n\n        // Updates IRectDrawables positions by handle screen position\n        virtual void UpdateDrawablesPositions();\n\n        // Called when this was selected\n        virtual void OnSelected();\n\n        // Called when this was unselected\n        virtual void OnDeselected();\n\n        REF_COUNTERABLE_IMPL(RefCounterable);\n\n        friend class ISelectableDragHandlesGroup;\n        friend class SelectableDragHandlesGroup;\n    };\n\n    // ---------------------------------------------------------\n    // Widget drag handle. Can be attached to widget as children\n    // ---------------------------------------------------------\n    class WidgetDragHandle: public DragHandle, public Widget\n    {\n    public:\n        Function<Vec2F(const Vec2F&)> widgetOffsetToLocalTransformFunc; // Widget offset relative to parent to local transformation function\n        Function<Vec2F(const Vec2F&)> localToWidgetOffsetTransformFunc; // Local position to widget offset relative to parent transformation function\n\n        Function<void()> onLayoutUpdated; // Called when this layout were updated\n\n    public:\n        // Default constructor\n        explicit WidgetDragHandle(RefCounter* refCounter);\n\n        // Constructor with views\n        WidgetDragHandle(RefCounter* refCounter, const Ref<IRectDrawable>& regular, const Ref<IRectDrawable>& hover = nullptr, const Ref<IRectDrawable>& pressed = nullptr,\n                         const Ref<IRectDrawable>& selected = nullptr, const Ref<IRectDrawable>& selectedHovered = nullptr,\n                         const Ref<IRectDrawable>& selectedPressed = nullptr);\n\n        // Copy-constructor\n        WidgetDragHandle(RefCounter* refCounter, const WidgetDragHandle& other);\n\n        // Copy-constructor\n        WidgetDragHandle(const WidgetDragHandle& other):WidgetDragHandle(nullptr, other) {}\n\n        // Destructor\n        ~WidgetDragHandle();\n\n        // Copy-operator\n        WidgetDragHandle& operator=(const WidgetDragHandle& other);\n\n        // Draws handle\n        void Draw() override;\n\n        // Set handle enabled. Disabled handle don't drawn and interact\n        void SetEnabled(bool enabled) override;\n\n        // Returns is handle enabled. Disabled handle don't drawn and interact\n        bool IsEnabled() const OPTIONAL_OVERRIDE;\n\n        // Converts point from screen to local space\n        Vec2F ScreenToLocal(const Vec2F& point) override;\n\n        // Converts point from local to screen space\n        Vec2F LocalToScreen(const Vec2F& point) override;\n\n        // Returns create menu category in editor\n        static String GetCreateMenuCategory();\n\n        // Dynamic cast to RefCounterable via Widget\n        static Ref<RefCounterable> CastToRefCounterable(const Ref<WidgetDragHandle>& ref);\n\n        SERIALIZABLE(WidgetDragHandle);\n\n        Ref<RefCounterable> CloneRef() const override { return DynamicCast<Widget>(mmake<WidgetDragHandle>(*this)); }\n\n    protected:\n        // Hide public functions\n        using DragHandle::screenToLocalTransformFunc;\n        using DragHandle::localToScreenTransformFunc;\n\n        // Updates layers layouts, calls after updating widget layout\n        void UpdateLayersLayouts() override;\n\n        // Beginning serialization callback\n        void OnSerialize(DataValue& node) const override;\n\n        // Called when deserialized\n        void OnDeserialized(const DataValue& node) override;\n\n        // Completion deserialization delta callback; calls widget's function\n        void OnDeserializedDelta(const DataValue& node, const IObject& origin) override;\n\n        REF_COUNTERABLE_IMPL(Widget);\n    };\n\n    // --------------------------------------------\n    // Selectable draggable handles group interface\n    // --------------------------------------------\n    class ISelectableDragHandlesGroup: public RefCounterable\n    {\n    public:\n        // Default constructor\n        ISelectableDragHandlesGroup();\n\n        // Default constructor\n        ISelectableDragHandlesGroup(RefCounter *refCounter);\n\n        // Returns selected handles in group\n        virtual const Vector<Ref<DragHandle>>& GetSelectedHandles() const = 0;\n\n        // Returns all handles in group \n        virtual Vector<Ref<DragHandle>> GetAllHandles() const = 0;\n\n        // Selects handle\n        virtual void SelectHandle(const Ref<DragHandle>& handle) = 0;\n\n        // Deselects handle\n        virtual void DeselectHandle(const Ref<DragHandle>& handle) = 0;\n\n        // Adds selectable handle to group\n        virtual void AddHandle(const Ref<DragHandle>& handle) = 0;\n\n        // Removes selectable handle from group\n        virtual void RemoveHandle(DragHandle* handle) = 0;\n\n        // Deselects all in group\n        virtual void DeselectAll();\n\n        // Selects all in group\n        virtual void SelectAll();\n\n    protected:\n        // Called when selectable draggable handle was pressed\n        virtual void OnHandleCursorPressed(const Ref<DragHandle>& handle, const Input::Cursor& cursor) { }\n\n        // Called when selectable draggable handle was released\n        virtual void OnHandleCursorReleased(const Ref<DragHandle>& handle, const Input::Cursor& cursor) { }\n\n        // Called when selectable handle was began to drag\n        virtual void OnHandleBeganDragging(const Ref<DragHandle>& handle) { }\n\n        // Called when selectable handle moved, moves all selected handles position\n        virtual void OnHandleMoved(const Ref<DragHandle>& handle, const Vec2F& cursorPos) { }\n\n        // Called when selectable handle completed changing\n        virtual void OnHandleCompletedChange(const Ref<DragHandle>& handle) { }\n\n        // Sets handle selected state without adding to selected handles array\n        void SetHandleSelectedState(const Ref<DragHandle>& handle, bool selected);\n\n        friend class DragHandle;\n    };\n\n\n    // ----------------------------------\n    // Selectable draggable handles group\n    // ----------------------------------\n    class SelectableDragHandlesGroup: public ISelectableDragHandlesGroup\n    {\n    public:\n        // Default constructor\n        SelectableDragHandlesGroup();\n\n        // Default constructor\n        SelectableDragHandlesGroup(RefCounter* refCounter);\n\n        // Destructor\n        ~SelectableDragHandlesGroup();\n\n        // Returns selected handles in group\n        const Vector<Ref<DragHandle>>& GetSelectedHandles() const override;\n\n        // Returns all handles in group \n        Vector<Ref<DragHandle>> GetAllHandles() const override;\n\n        // Selects handle\n        void SelectHandle(const Ref<DragHandle>& handle) override;\n\n        // Deselects handle\n        void DeselectHandle(const Ref<DragHandle>& handle) override;\n\n        // Adds selectable handle to group\n        void AddHandle(const Ref<DragHandle>& handle) override;\n\n        // Removes selectable handle from group\n        void RemoveHandle(DragHandle* handle) override;\n\n        // Deselects all in group\n        void DeselectAll() override;\n\n        // Selects all in group\n        void SelectAll() override;\n\n\t\t// Begins prepared to select handles\n        void BeginPreSelect();\n\n\t\t// Updates preselected handles by rectangle\n\t\tvoid UpdatePreSelect(const Vector<Ref<DragHandle>>& handles);\n\n\t\t// Finishes prepared to select handles, updates selected handles\n\t\tvoid EndPreSelect();\n\n\tprotected:\n\t\tVector<Ref<DragHandle>> mPreSelectedHandles; // Prepared to select handles, used for selection rectangle\n\t\tVector<Ref<DragHandle>> mSelectedHandles;    // Current selected handles in group\n\t\tVector<Ref<DragHandle>> mHandles;            // All handles in group\n\n    protected:\n        // Called when selection is changed - some handle was added or removed from selection\n        virtual void OnSelectionChanged();\n\n        // Called when selectable draggable handle was pressed\n        void OnHandleCursorPressed(const Ref<DragHandle>& handle, const Input::Cursor& cursor) override;\n\n        // Called when selectable draggable handle was released\n        void OnHandleCursorReleased(const Ref<DragHandle>& handle, const Input::Cursor& cursor) override;\n\n        // Called when selectable handle was began to drag\n        void OnHandleBeganDragging(const Ref<DragHandle>& handle) override;\n\n        // Called when selectable handle moved, moves all selected handles position\n        void OnHandleMoved(const Ref<DragHandle>& handle, const Vec2F& cursorPos) override;\n\n        friend class DragHandle;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::DragHandle)\n{\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::IDrawable);\n    BASE_CLASS(o2::CursorAreaEventsListener);\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::DragHandle)\n{\n    FIELD().PUBLIC().NAME(angle);\n    FIELD().PUBLIC().NAME(position);\n    FIELD().PUBLIC().NAME(enabled);\n    FIELD().PUBLIC().NAME(selected);\n    FIELD().PUBLIC().DEFAULT_VALUE(CursorType::Arrow).NAME(cursorType);\n    FIELD().PUBLIC().DEFAULT_VALUE(true).NAME(pixelPerfect);\n    FIELD().PUBLIC().DEFAULT_VALUE(VK_CONTROL).NAME(snappingKey);\n    FIELD().PUBLIC().NAME(onChangedPos);\n    FIELD().PUBLIC().NAME(onChangeCompleted);\n    FIELD().PUBLIC().NAME(onPressed);\n    FIELD().PUBLIC().NAME(onDblClicked);\n    FIELD().PUBLIC().NAME(onReleased);\n    FIELD().PUBLIC().NAME(onRightButtonPressed);\n    FIELD().PUBLIC().NAME(onRightButtonReleased);\n    FIELD().PUBLIC().NAME(onHoverEnter);\n    FIELD().PUBLIC().NAME(onHoverExit);\n    FIELD().PUBLIC().NAME(onBeganDragging);\n    FIELD().PUBLIC().NAME(isPointInside);\n    FIELD().PUBLIC().NAME(screenToLocalTransformFunc);\n    FIELD().PUBLIC().NAME(localToScreenTransformFunc);\n    FIELD().PUBLIC().NAME(checkPositionFunc);\n    FIELD().PUBLIC().NAME(checkSnappingFunc);\n    FIELD().PUBLIC().NAME(onSelected);\n    FIELD().PUBLIC().NAME(onDeselected);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mRegularDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mHoverDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mPressedDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectedDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectedHoverDrawable);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mSelectedPressedDrawable);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mEnabled);\n    FIELD().PROTECTED().NAME(mPosition);\n    FIELD().PROTECTED().NAME(mScreenPosition);\n    FIELD().PROTECTED().NAME(mLastDrawnScreenPosition);\n    FIELD().PROTECTED().DEFAULT_VALUE(-1).NAME(mLastScreenPosUpdateFrame);\n    FIELD().PROTECTED().DEFAULT_VALUE(0.0f).NAME(mAngle);\n    FIELD().PROTECTED().NAME(mDragOffset);\n    FIELD().PROTECTED().NAME(mDragPosition);\n    FIELD().PROTECTED().NAME(mDragBeginPosition);\n    FIELD().PROTECTED().NAME(mPressedCursorId);\n    FIELD().PROTECTED().NAME(mPressedCursorPos);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsDragging);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsHovered);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mIsSelected);\n    FIELD().PROTECTED().NAME(mSelectGroup);\n    FIELD().PROTECTED().DEFAULT_VALUE(3.0f).NAME(mDragDistanceThreshold);\n}\nEND_META;\nCLASS_METHODS_META(o2::DragHandle)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const DragHandle&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const DragHandle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsUnderPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(const Vec2F&, GetScreenPosition);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateScreenPosition);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDragPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetDragPosition);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetPosition);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetDraggingOffset);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetDraggingBeginPosition);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginDrag, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelected, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSelected);\n    FUNCTION().PUBLIC().SIGNATURE(void, Select);\n    FUNCTION().PUBLIC().SIGNATURE(void, Deselect);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectionGroup, const Ref<ISelectableDragHandlesGroup>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<ISelectableDragHandlesGroup>&, GetSelectionGroup);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAngle, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetAngle);\n    FUNCTION().PUBLIC().SIGNATURE(const Vec2F&, GetPressedCursorPos);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, ScreenToLocal, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, LocalToScreen, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRegularDrawable, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<IRectDrawable>&, GetRegularDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHoverDrawable, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<IRectDrawable>&, GetHoverDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPressedDrawable, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<IRectDrawable>&, GetPressedDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedDrawable, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<IRectDrawable>&, GetSelectedDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedHoveredDrawable, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<IRectDrawable>&, GetSelectedHoveredDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSelectedPressedDrawable, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().SIGNATURE(const Ref<IRectDrawable>&, GetSelectedPressedDrawable);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDrawablesSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDrawablesColor, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDrawablesSizePivot, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsScrollable);\n    FUNCTION().PROTECTED().SIGNATURE(void, DrawInternal);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorDblClicked, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorReleasedOutside, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorPressBreak, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorStillDown, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorEnter, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorExit, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMousePressed, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnCursorRightMouseReleased, const Input::Cursor&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateDrawablesPositions);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSelected);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeselected);\n}\nEND_META;\n\nCLASS_BASES_META(o2::WidgetDragHandle)\n{\n    BASE_CLASS(o2::DragHandle);\n    BASE_CLASS(o2::Widget);\n}\nEND_META;\nCLASS_FIELDS_META(o2::WidgetDragHandle)\n{\n    FIELD().PUBLIC().NAME(widgetOffsetToLocalTransformFunc);\n    FIELD().PUBLIC().NAME(localToWidgetOffsetTransformFunc);\n    FIELD().PUBLIC().NAME(onLayoutUpdated);\n}\nEND_META;\nCLASS_METHODS_META(o2::WidgetDragHandle)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&, const Ref<IRectDrawable>&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*, const WidgetDragHandle&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const WidgetDragHandle&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Draw);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, ScreenToLocal, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, LocalToScreen, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(String, GetCreateMenuCategory);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Ref<RefCounterable>, CastToRefCounterable, const Ref<WidgetDragHandle>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<RefCounterable>, CloneRef);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateLayersLayouts);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/EditorScope.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"EditorScope.h\"\n\n#include \"o2/Events/EventSystem.h\"\n#include \"o2/Utils/Debug/Assert.h\"\n\nnamespace o2\n{\n    void EditorScope::Enter(int count /*= 1*/)\n    {\n        if (count > 0)\n        {\n            Actor::SetDefaultCreationMode(ActorCreateMode::NotInScene);\n\n            mDepth += count;\n        }\n    }\n\n    void EditorScope::Exit(int count /*= 1*/)\n    {\n        if (count > 0)\n        {\n            mDepth -= count;\n\n            if (mDepth == 0)\n                Actor::SetDefaultCreationMode(ActorCreateMode::InScene);\n            else\n                Actor::SetDefaultCreationMode(ActorCreateMode::NotInScene);\n\n            Assert(mDepth >= 0, \"Editor scope Enter/Exit mismatch\");\n        }\n    }\n\n    int EditorScope::GetDepth()\n    {\n        return mDepth;\n    }\n\n    bool EditorScope::IsInScope()\n    {\n        return mDepth > 0;\n    }\n\n    int EditorScope::mDepth = 0;\n\n    PushEditorScopeOnStack::PushEditorScopeOnStack(int count /*= 1*/):\n        mDepth(count)\n    {\n        EditorScope::Enter(count);\n    }\n\n    PushEditorScopeOnStack::~PushEditorScopeOnStack()\n    {\n        EditorScope::Exit(mDepth);\n    }\n\n    ForcePopEditorScopeOnStack::ForcePopEditorScopeOnStack()\n    {\n        mDepth = EditorScope::GetDepth();\n        EditorScope::Exit(mDepth);\n    }\n\n    ForcePopEditorScopeOnStack::~ForcePopEditorScopeOnStack()\n    {\n        EditorScope::Enter(mDepth);\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/EditorScope.h",
    "content": "#pragma once\n\nnamespace o2\n{\n    // -------------------------------------------------------------------------------------------------------------------------------\n    // This separates editor's stuff from editing scene. When entering in editor scope the counter increases, on exiting it decreases.\n    // Zero depth means that you are working on the scene. By default depth is zero\n    // -------------------------------------------------------------------------------------------------------------------------------\n    class EditorScope\n    {\n    public:\n        // Entering in editor's scope. After you can work with editor UI, events and other. Increases depth\n        static void Enter(int count = 1);\n\n        // Exiting from editor's scope. Decreases depth. When depth is zero - you working with scene\n        static void Exit(int count = 1);\n\n        // Returns editor scope entered depth. When depth is greater than zero you working with editor's stuff - UI, event, etc\n        static int GetDepth();\n\n        // Returns is you are in editor scope\n        static bool IsInScope();\n\n    private:\n        static int mDepth; // Scope entered depth\n    };\n\n    // ---------------------------------------------------------------\n    // Pushing editor's scope here, and pop after stack frame finished\n    // ---------------------------------------------------------------\n    class PushEditorScopeOnStack\n    {\n    public:\n        // Default constructor, calls Scope::Enter\n        PushEditorScopeOnStack(int count = 1);\n\n        // Destructor, calls Scope::Exit\n        ~PushEditorScopeOnStack();\n\n    private:\n        int mDepth;\n    };\n\n    // ---------------------------------------------------------------\n    // Sets not editor in this scope, then restores edtiro scope depth\n    // ---------------------------------------------------------------\n    class ForcePopEditorScopeOnStack\n    {\n    public:\n        // Default constructor, calls Scope::Exit and stores depth\n        ForcePopEditorScopeOnStack();\n\n        // Destructor, calls Scope::Exit\n        ~ForcePopEditorScopeOnStack();\n\n    private:\n        int mDepth;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/FrameHandles.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FrameHandles.h\"\n\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n\nnamespace o2\n{\n    FrameHandles::FrameHandles()\n    {\n        Vec2F rotateHandleSize = Vec2F(mHandlesRotateSize, mHandlesRotateSize);\n        Vec2F frameHandleSize = Vec2F(mFrameHandlesSize, mFrameHandlesSize);\n\n        mLeftTopRotateHandle = mmake<DragHandle>();\n        mLeftTopRotateHandle->SetRegularDrawable(mmake<Sprite>(Color4(0, 0, 0, 20)));\n        mLeftTopRotateHandle->SetHoverDrawable(mmake<Sprite>(Color4(0, 0, 0, 10)));\n        mLeftTopRotateHandle->SetPressedDrawable(mmake<Sprite>(Color4(0, 0, 0, 50)));\n        mLeftTopRotateHandle->GetRegularDrawable()->size = rotateHandleSize;\n        mLeftTopRotateHandle->GetHoverDrawable()->size = rotateHandleSize;\n        mLeftTopRotateHandle->GetPressedDrawable()->size = rotateHandleSize;\n        mLeftTopRotateHandle->GetRegularDrawable()->szPivot = frameHandleSize*0.5f;\n        mLeftTopRotateHandle->GetHoverDrawable()->szPivot = frameHandleSize*0.5f;\n        mLeftTopRotateHandle->GetPressedDrawable()->szPivot = frameHandleSize*0.5f;\n\n        mLeftBottomRotateHandle = mLeftTopRotateHandle->CloneAsRef<DragHandle>();\n        mRightTopRotateHandle = mLeftTopRotateHandle->CloneAsRef<DragHandle>();\n        mRightBottomRotateHandle = mLeftTopRotateHandle->CloneAsRef<DragHandle>();\n\n        mLeftTopHandle = mmake<DragHandle>();\n        mLeftTopHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI2_handle_regular.png\"));\n        mLeftTopHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI2_handle_select.png\"));\n        mLeftTopHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI2_handle_pressed.png\"));\n\n        mLeftBottomHandle = mLeftTopHandle->CloneAsRef<DragHandle>();\n        mRightTopHandle = mLeftTopHandle->CloneAsRef<DragHandle>();\n        mRightBottomHandle = mLeftTopHandle->CloneAsRef<DragHandle>();\n\n        mLeftHandle = mmake<DragHandle>();\n        mLeftHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI2_handle_side_regular.png\"));\n        mLeftHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI2_handle_side_select.png\"));\n        mLeftHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI2_handle_side_pressed.png\"));\n\n        mTopHandle = mLeftHandle->CloneAsRef<DragHandle>();\n        mBottomHandle = mLeftHandle->CloneAsRef<DragHandle>();\n        mRightHandle = mLeftHandle->CloneAsRef<DragHandle>();\n\n        mPivotHandle = mmake<DragHandle>();\n        mPivotHandle->SetRegularDrawable(mmake<Sprite>(\"ui/UI2_pivot.png\"));\n        mPivotHandle->SetHoverDrawable(mmake<Sprite>(\"ui/UI2_pivot_select.png\"));\n        mPivotHandle->SetPressedDrawable(mmake<Sprite>(\"ui/UI2_pivot_pressed.png\"));\n\n        mLeftTopHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnLeftTopHandle);\n        mLeftHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnLeftHandle);\n        mLeftBottomHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnLeftBottomHandle);\n        mTopHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnTopHandle);\n        mBottomHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnBottomHandle);\n        mRightTopHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnRightTopHandle);\n        mRightHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnRightHandle);\n        mRightBottomHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnRightBottomHandle);\n        mLeftTopRotateHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnLeftTopRotateHandle);\n        mLeftBottomRotateHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnLeftBottomRotateHandle);\n        mRightTopRotateHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnRightTopRotateHandle);\n        mRightBottomRotateHandle->onChangedPos = MakeFunction(this, &FrameHandles::OnRightBottomRotateHandle);\n\n        mLeftTopHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mLeftHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mLeftBottomHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mTopHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mBottomHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mRightTopHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mRightHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mRightBottomHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mPivotHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mLeftTopRotateHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mLeftBottomRotateHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mRightTopRotateHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n        mRightBottomRotateHandle->onPressed = MakeFunction(this, &FrameHandles::OnHandlePressed);\n\n        mLeftTopHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mLeftHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mLeftBottomHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mTopHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mBottomHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mRightTopHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mRightHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mRightBottomHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mPivotHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mLeftTopRotateHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mLeftBottomRotateHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mRightTopRotateHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n        mRightBottomRotateHandle->onReleased = MakeFunction(this, &FrameHandles::OnHandleReleased);\n\n        mLeftTopHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mLeftHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mLeftBottomHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mTopHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mBottomHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mRightTopHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mRightHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mRightBottomHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mPivotHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mLeftTopRotateHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mLeftBottomRotateHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mRightTopRotateHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n        mRightBottomRotateHandle->onChangeCompleted = MakeFunction(this, &FrameHandles::OnChangeCompleted);\n    }\n\n    void FrameHandles::SetBasis(const Basis& basis)\n    {\n        mFrame = basis;\n        mPivotHandle->position = mFrame*Vec2F(0.5f, 0.5f);\n        UpdateHandlesTransform();\n    }\n\n    const Basis& FrameHandles::GetCurrentBasis() const\n    {\n        return mFrame;\n    }\n\n    void FrameHandles::SetPivot(const Vec2F& position)\n    {\n        mPivotHandle->position = position;\n    }\n\n    Vec2F FrameHandles::GetPivot() const\n    {\n        return mPivotHandle->GetPosition();\n    }\n\n    void FrameHandles::Draw()\n    {\n        o2Render.DrawAABasis(mFrame, mFrameColor, mFrameColor, mFrameColor);\n        CursorAreaEventsListener::OnDrawn();\n\n        if (mIsRotationAvailable)\n        {\n            mLeftTopRotateHandle->Draw();\n            mLeftBottomRotateHandle->Draw();\n            mRightTopRotateHandle->Draw();\n            mRightBottomRotateHandle->Draw();\n        }\n\n        mLeftTopHandle->Draw();\n        mLeftHandle->Draw();\n        mLeftBottomHandle->Draw();\n        mTopHandle->Draw();\n        mBottomHandle->Draw();\n        mRightTopHandle->Draw();\n        mRightHandle->Draw();\n        mRightBottomHandle->Draw();\n\n        if (mIsPivotAvailable)\n            mPivotHandle->Draw();\n    }\n\n    bool FrameHandles::IsUnderPoint(const Vec2F& point)\n    {\n        return mFrame.IsPointInside(point);\n    }\n\n    void FrameHandles::SetPivotEnabled(bool enabled)\n    {\n        mIsPivotAvailable = enabled;\n    }\n\n    bool FrameHandles::IsPivotEnabled() const\n    {\n        return mIsPivotAvailable;\n    }\n\n    void FrameHandles::SetRotationEnabled(bool enabled)\n    {\n        mIsRotationAvailable = enabled;\n    }\n\n    bool FrameHandles::IsRotationEnabled() const\n    {\n        return mIsRotationAvailable;\n    }\n\n    const Color4& FrameHandles::GetFrameColor() const\n    {\n        return mFrameColor;\n    }\n\n    bool FrameHandles::IsInputTransparent() const\n    {\n        return isInputTransparent;\n    }\n\n    void FrameHandles::OnCursorPressed(const Input::Cursor& cursor)\n    {\n        if (mFrame.IsPointInside(cursor.position))\n        {\n            mIsDragging = true;\n            mBeginDraggingFrame = mFrame;\n            mBeginDraggingOffset = cursor.position - mFrame.origin;\n\n            SetHandlesEnable(false);\n\n            onPressed();\n        }\n    }\n\n    void FrameHandles::OnCursorReleased(const Input::Cursor& cursor)\n    {\n        if (mIsDragging)\n        {\n            mIsDragging = false;\n            SetHandlesEnable(true);\n\n            onReleased();\n\n            if (mBeginDraggingFrame != mFrame)\n                onChangeCompleted();\n        }\n    }\n\n    void FrameHandles::OnCursorPressBreak(const Input::Cursor& cursor)\n    {\n        if (mIsDragging)\n        {\n            mIsDragging = false;\n            SetHandlesEnable(true);\n\n            onReleased();\n        }\n    }\n\n    void FrameHandles::OnCursorStillDown(const Input::Cursor& cursor)\n    {\n        if (mIsDragging)\n        {\n            Basis transformed(cursor.position - mBeginDraggingOffset, mFrame.xv, mFrame.yv);\n\n            if (o2Input.IsKeyDown(VK_SHIFT))\n            {\n                if (Math::Abs(transformed.origin.x - mBeginDraggingFrame.origin.x) > Math::Abs(transformed.origin.y - mBeginDraggingFrame.origin.y))\n                    transformed.origin.y = mBeginDraggingFrame.origin.y;\n                else\n                    transformed.origin.x = mBeginDraggingFrame.origin.x;\n            }\n\n            OnTransformed(mFrame.Inverted()*transformed);\n        }\n    }\n\n    void FrameHandles::OnLeftTopHandle(const Vec2F& position)\n    {\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 1.0f)*mFrame;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.origin += frameDeltaX;\n        transformedFrame.xv -= frameDeltaX;\n        transformedFrame.yv += frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n\n            if (transformedFrame.xv.Length() < transformedFrame.yv.Length())\n            {\n                Vec2F xd = transformedFrame.xv.Normalized()*\n                    (transformedFrame.yv.Length()*aspect - transformedFrame.xv.Length());\n\n                transformedFrame.origin -= xd;\n                transformedFrame.xv += xd;\n            }\n            else transformedFrame.yv = transformedFrame.yv.Normalized()*transformedFrame.xv.Length()/aspect;\n        }\n\n        OnTransformed(mFrame.Inverted()*transformedFrame);\n    }\n\n    void FrameHandles::OnLeftHandle(const Vec2F& position)\n    {\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 0.5f)*mFrame;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n\n        transformedFrame.origin += frameDeltaX;\n        transformedFrame.xv -= frameDeltaX;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n            transformedFrame.yv = transformedFrame.yv.Normalized()*transformedFrame.xv.Length()/aspect;\n        }\n\n        OnTransformed(mFrame.Inverted()*transformedFrame);\n    }\n\n    void FrameHandles::OnLeftBottomHandle(const Vec2F& position)\n    {\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 0.0f)*mFrame;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.origin += frameDeltaX + frameDeltaY;\n        transformedFrame.xv -= frameDeltaX;\n        transformedFrame.yv -= frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n\n            if (transformedFrame.xv.Length() < transformedFrame.yv.Length())\n            {\n                Vec2F xd = transformedFrame.xv.Normalized()*\n                    (transformedFrame.yv.Length()*aspect - transformedFrame.xv.Length());\n\n                transformedFrame.origin -= xd;\n                transformedFrame.xv += xd;\n            }\n            else\n            {\n                Vec2F yd = transformedFrame.yv.Normalized()*\n                    (transformedFrame.xv.Length()/aspect - transformedFrame.yv.Length());\n\n                transformedFrame.origin -= yd;\n                transformedFrame.yv += yd;\n            }\n        }\n\n        OnTransformed(mFrame.Inverted()*transformedFrame);\n    }\n\n    void FrameHandles::OnTopHandle(const Vec2F& position)\n    {\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.5f, 1.0f)*mFrame;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.yv += frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n            transformedFrame.xv = transformedFrame.xv.Normalized()*transformedFrame.yv.Length()*aspect;\n        }\n\n        OnTransformed(mFrame.Inverted()*transformedFrame);\n    }\n\n    void FrameHandles::OnBottomHandle(const Vec2F& position)\n    {\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(0.5f, 0.0f)*mFrame;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.origin += frameDeltaY;\n        transformedFrame.yv -= frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n            transformedFrame.xv = transformedFrame.xv.Normalized()*transformedFrame.yv.Length()*aspect;\n        }\n\n        OnTransformed(mFrame.Inverted()*transformedFrame);\n    }\n\n    void FrameHandles::OnRightTopHandle(const Vec2F& position)\n    {\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 1.0f)*mFrame;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.xv += frameDeltaX;\n        transformedFrame.yv += frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n\n            if (transformedFrame.xv.Length() < transformedFrame.yv.Length())\n                transformedFrame.xv = transformedFrame.xv.Normalized()*transformedFrame.yv.Length()*aspect;\n            else\n                transformedFrame.yv = transformedFrame.yv.Normalized()*transformedFrame.xv.Length()/aspect;\n        }\n\n        OnTransformed(mFrame.Inverted()*transformedFrame);\n    }\n\n    void FrameHandles::OnRightHandle(const Vec2F& position)\n    {\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 0.5f)*mFrame;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n\n        transformedFrame.xv += frameDeltaX;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n            transformedFrame.yv = transformedFrame.yv.Normalized()*transformedFrame.xv.Length()/aspect;\n        }\n\n        OnTransformed(mFrame.Inverted()*transformedFrame);\n    }\n\n    void FrameHandles::OnRightBottomHandle(const Vec2F& position)\n    {\n        Basis transformedFrame = mFrame;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 0.0f)*mFrame;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mFrame.xv);\n        Vec2F frameDeltaY = delta.Project(mFrame.yv);\n\n        transformedFrame.origin += frameDeltaY;\n        transformedFrame.xv += frameDeltaX;\n        transformedFrame.yv -= frameDeltaY;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float aspect = mBeginDraggingFrame.xv.Length()/mBeginDraggingFrame.yv.Length();\n\n            if (transformedFrame.xv.Length() < transformedFrame.yv.Length())\n                transformedFrame.xv = transformedFrame.xv.Normalized()*transformedFrame.yv.Length()*aspect;\n            else\n            {\n                Vec2F yd = transformedFrame.yv.Normalized()*\n                    (transformedFrame.xv.Length()/aspect - transformedFrame.yv.Length());\n\n                transformedFrame.origin -= yd;\n                transformedFrame.yv += yd;\n            }\n        }\n\n        OnTransformed(mFrame.Inverted()*transformedFrame);\n    }\n\n    void FrameHandles::OnLeftTopRotateHandle(const Vec2F& position)\n    {\n        Vec2F lastHandleCoords = Vec2F(0.0f, 1.0f)*mFrame;\n        OnRotateHandle(position, lastHandleCoords);\n    }\n\n    void FrameHandles::OnLeftBottomRotateHandle(const Vec2F& position)\n    {\n        Vec2F lastHandleCoords = Vec2F(0.0f, 0.0f)*mFrame;\n        OnRotateHandle(position, lastHandleCoords);\n    }\n\n    void FrameHandles::OnRightTopRotateHandle(const Vec2F& position)\n    {\n        Vec2F lastHandleCoords = Vec2F(1.0f, 1.0f)*mFrame;\n        OnRotateHandle(position, lastHandleCoords);\n    }\n\n    void FrameHandles::OnRightBottomRotateHandle(const Vec2F& position)\n    {\n        Vec2F lastHandleCoords = Vec2F(1.0f, 0.0f)*mFrame;\n        OnRotateHandle(position, lastHandleCoords);\n    }\n\n    void FrameHandles::OnRotateHandle(const Vec2F& position, Vec2F lastHandleCoords)\n    {\n        Vec2F rotatePivot = mPivotHandle->position;\n        float angle = (position - rotatePivot).SignedAngle(lastHandleCoords - rotatePivot);\n        Basis transform = Basis::Translated(rotatePivot*-1.0f)*Basis::Rotated(-angle)*Basis::Translated(rotatePivot);\n        Basis transformed = mFrame*transform;\n\n        if (o2Input.IsKeyDown(VK_SHIFT))\n        {\n            float angle = Math::Rad2deg(transformed.GetAngle());\n            float step = 15.0f;\n            float targetAngle = Math::Round(angle/step)*step;\n            float delta = targetAngle - angle;\n\n            Basis deltaTransform = Basis::Translated(rotatePivot*-1.0f)*Basis::Rotated(Math::Deg2rad(delta))\n                *Basis::Translated(rotatePivot);\n\n            transformed = transformed*deltaTransform;\n        }\n\n        OnTransformed(mFrame.Inverted()*transformed);\n    }\n\n    void FrameHandles::OnHandlePressed()\n    {\n        mBeginDraggingFrame = mFrame;\n        onPressed();\n    }\n\n    void FrameHandles::OnHandleReleased()\n    {\n        onReleased();\n    }\n\n    void FrameHandles::SetHandlesEnable(bool enable)\n    {\n        mLeftTopRotateHandle->enabled = enable;\n        mLeftBottomRotateHandle->enabled = enable;\n        mRightTopRotateHandle->enabled = enable;\n        mRightBottomRotateHandle->enabled = enable;\n\n        mLeftTopHandle->enabled = enable;\n        mLeftHandle->enabled = enable;\n        mLeftBottomHandle->enabled = enable;\n        mTopHandle->enabled = enable;\n        mBottomHandle->enabled = enable;\n        mRightTopHandle->enabled = enable;\n        mRightHandle->enabled = enable;\n        mRightBottomHandle->enabled = enable;\n\n        mPivotHandle->enabled = enable;\n    }\n\n    void FrameHandles::UpdateHandlesTransform()\n    {\n        float handlesAngle = mFrame.GetAngle();\n\n        auto getHandleType = [&](const Vec2F& pos) {\n            Vec2F v = pos - Vec2F(0.5f, 0.5f)*mFrame;\n            float angle = Math::Rad2deg(v.Angle(Vec2F::Right()));\n\n            if (angle < 22.5f || angle > 337.5f)\n                return CursorType::SizeWE;\n            else if (angle > 22.5f && angle < 67.5f)\n                return CursorType::SizeNwSe;\n            else if (angle > 67.5f && angle < 112.5f)\n                return CursorType::SizeNS;\n            else if (angle > 112.5f && angle < 157.5f)\n                return CursorType::SizeNeSw;\n            else if (angle > 157.5f && angle < 202.5f)\n                return CursorType::SizeWE;\n            else if (angle > 202.5f && angle < 247.5f)\n                return CursorType::SizeNwSe;\n            else if (angle > 247.5f && angle < 292.5f)\n                return CursorType::SizeNS;\n            else if (angle > 292.5f && angle < 337.5f)\n                return CursorType::SizeNeSw;\n\n            return CursorType::SizeNeSw;\n        };\n\n        mLeftTopHandle->position = Vec2F(0.0f, 1.0f)*mFrame;\n        mLeftHandle->position = Vec2F(0.0f, 0.5f)*mFrame;\n        mLeftBottomHandle->position = Vec2F(0.0f, 0.0f)*mFrame;\n        mTopHandle->position = Vec2F(0.5f, 1.0f)*mFrame;\n        mBottomHandle->position = Vec2F(0.5f, 0.0f)*mFrame;\n        mRightTopHandle->position = Vec2F(1.0f, 1.0f)*mFrame;\n        mRightHandle->position = Vec2F(1.0f, 0.5f)*mFrame;\n        mRightBottomHandle->position = Vec2F(1.0f, 0.0f)*mFrame;\n\n        mLeftTopHandle->cursorType = getHandleType(mLeftTopHandle->GetPosition());\n        mLeftHandle->cursorType = getHandleType(mLeftHandle->GetPosition());\n        mLeftBottomHandle->cursorType = getHandleType(mLeftBottomHandle->GetPosition());\n        mTopHandle->cursorType = getHandleType(mTopHandle->GetPosition());\n        mBottomHandle->cursorType = getHandleType(mBottomHandle->GetPosition());\n        mRightTopHandle->cursorType = getHandleType(mRightTopHandle->GetPosition());\n        mRightHandle->cursorType = getHandleType(mRightHandle->GetPosition());\n        mRightBottomHandle->cursorType = getHandleType(mRightBottomHandle->GetPosition());\n\n        mLeftTopRotateHandle->position = Vec2F(0.0f, 1.0f)*mFrame;\n        mLeftBottomRotateHandle->position = Vec2F(0.0f, 0.0f)*mFrame;\n        mRightTopRotateHandle->position = Vec2F(1.0f, 1.0f)*mFrame;\n        mRightBottomRotateHandle->position = Vec2F(1.0f, 0.0f)*mFrame;\n\n        mLeftTopHandle->angle = handlesAngle + Math::PI()*0.5f;\n        mLeftHandle->angle = handlesAngle + Math::PI();\n        mLeftBottomHandle->angle = handlesAngle + Math::PI();\n        mTopHandle->angle = handlesAngle + Math::PI()*0.5f;\n        mBottomHandle->angle = handlesAngle - Math::PI()*0.5f;\n        mRightTopHandle->angle = handlesAngle;\n        mRightHandle->angle = handlesAngle;\n        mRightBottomHandle->angle = handlesAngle - Math::PI()*0.5f;\n\n        mLeftTopRotateHandle->angle = handlesAngle + Math::PI()*0.5f;\n        mLeftBottomRotateHandle->angle = handlesAngle + Math::PI();\n        mRightTopRotateHandle->angle = handlesAngle;\n        mRightBottomRotateHandle->angle = handlesAngle + Math::PI()*1.5f;\n    }\n\n    void FrameHandles::OnTransformed(const Basis& transform)\n    {\n        mFrame = mFrame*transform;\n        mPivotHandle->position = mPivotHandle->position*transform;\n        mChangedFromThis = true;\n        UpdateHandlesTransform();\n\n        onTransformed(mFrame);\n    }\n\n    void FrameHandles::OnChangeCompleted()\n    {\n        onChangeCompleted();\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/FrameHandles.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/DragHandle.h\"\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2/Utils/Math/Color.h\"\n\nnamespace o2\n{\n    // -------------------\n    // Frame basis handles\n    // -------------------\n    class FrameHandles: public CursorAreaEventsListener, public RefCounterable\n    {\n    public:\n        Function<void(const Basis&)> onTransformed;     // Basis transformed event\n        Function<void()>             onPressed;         // Some handle pressed event\n        Function<void()>             onReleased;        // Some handle released event\n        Function<void()>             onChangeCompleted; // Basis changing completed, all handles released and transform was changed\n\n        bool isInputTransparent = false;\n\n    public:\n        // Default constructor. Initializes handles\n        FrameHandles();\n\n        // Sets frame basis\n        void SetBasis(const Basis& basis);\n\n        // Returns current basis\n        const Basis& GetCurrentBasis() const;\n\n        // Sets pivot point\n        void SetPivot(const Vec2F& position);\n\n        // Returns pivot\n        Vec2F GetPivot() const;\n\n        // Draws frame and handles\n        void Draw();\n\n        // Returns true if point is in this object\n        bool IsUnderPoint(const Vec2F& point) override;\n\n        // Sets pivot editing available\n        void SetPivotEnabled(bool enabled);\n\n        // Is pivot editing available\n        bool IsPivotEnabled() const;\n\n        // Set rotation editing available\n        void SetRotationEnabled(bool enabled);\n\n        // Returns is rotation available\n        bool IsRotationEnabled() const; \n\n        // Returns frame drawing color\n        const Color4& GetFrameColor() const;\n\n        // Returns true when input events can be handled by down listeners\n        bool IsInputTransparent() const override;\n\n    protected:\n        const Color4 mFrameColor = Color4(44, 62, 80, 255); // Regular handle color\n        const float  mFrameHandlesSize = 9.0f;              // Frame corners handles size\n        const float  mHandlesRotateSize = 17.0f;            // Rotation frame handles size\n\n        Ref<DragHandle> mLeftTopRotateHandle;      // Left top rotation handle\n        Ref<DragHandle> mLeftBottomRotateHandle;   // Left bottom rotation handle\n        Ref<DragHandle> mRightTopRotateHandle;     // Right top rotation handle\n        Ref<DragHandle> mRightBottomRotateHandle;  // Right bottom rotation handle\n        Ref<DragHandle> mLeftTopHandle;            // Left top corner frame handle\n        Ref<DragHandle> mLeftHandle;               // Left corner frame handle\n        Ref<DragHandle> mLeftBottomHandle;         // Left bottom corner frame handle\n        Ref<DragHandle> mTopHandle;                // Top corner frame handle\n        Ref<DragHandle> mBottomHandle;             // Bottom corner frame handle\n        Ref<DragHandle> mRightTopHandle;           // Right top corner frame handle\n        Ref<DragHandle> mRightHandle;              // Right corner frame handle\n        Ref<DragHandle> mRightBottomHandle;        // Right bottom corner frame handle\n        Ref<DragHandle> mPivotHandle;              // Frame pivot handle\n\n        Basis mFrame;                // Frame basis\n        Basis mBeginDraggingFrame;   // Frame before dragging any handle\n        Vec2F mBeginDraggingOffset;  // Offset at beginning dragging from frame origin to cursor\n\n        bool mIsPivotAvailable = true;    // Is pivot editing available\n        bool mIsRotationAvailable = true; // Is rotation editing available\n\n        bool mIsDragging = false;      // Is frame dragging\n        bool mChangedFromThis = false; // Is actors changed from this, needs to break circular updating\n\n    protected:\n        // Called when cursor pressed on this\n        void OnCursorPressed(const Input::Cursor& cursor) override;\n\n        // Called when cursor released (only when cursor pressed this at previous time)\n        void OnCursorReleased(const Input::Cursor& cursor) override;\n\n        // Called when cursor pressing was broken (when scrolled scroll area or some other)\n        void OnCursorPressBreak(const Input::Cursor& cursor) override;\n\n        // Called when cursor stay down during frame\n        void OnCursorStillDown(const Input::Cursor& cursor) override;\n\n        // Left top handle moved\n        void OnLeftTopHandle(const Vec2F& position);\n\n        // Left handle moved\n        void OnLeftHandle(const Vec2F& position);\n\n        // Left bottom handle moved\n        void OnLeftBottomHandle(const Vec2F& position);\n\n        // Top handle moved\n        void OnTopHandle(const Vec2F& position);\n\n        // Bottom handle moved\n        void OnBottomHandle(const Vec2F& position);\n\n        // Right top handle moved\n        void OnRightTopHandle(const Vec2F& position);\n\n        // Right handle moved\n        void OnRightHandle(const Vec2F& position);\n\n        // Right bottom handle moved\n        void OnRightBottomHandle(const Vec2F& position);\n\n        // Left top rotation handle moved\n        void OnLeftTopRotateHandle(const Vec2F& position);\n\n        // Left bottom rotation handle moved\n        void OnLeftBottomRotateHandle(const Vec2F& position);\n\n        // Right top rotation handle moved\n        void OnRightTopRotateHandle(const Vec2F& position);\n\n        // Right bottom rotation handle moved\n        void OnRightBottomRotateHandle(const Vec2F& position);\n\n        // Rotate handle moved\n        void OnRotateHandle(const Vec2F& position, Vec2F lastHandleCoords);\n\n        // Called when one of handles was pressed, stores frame basis\n        void OnHandlePressed();\n\n        // Called when one of handles was released, calls event\n        void OnHandleReleased();\n\n        // Sets all handles enable\n        void SetHandlesEnable(bool enable);\n\n        // Updates handles position and angle\n        void UpdateHandlesTransform();\n\n        // Called when frame transformed or moved\n        void OnTransformed(const Basis& transform);\n\n        // Called when handle change completed, calling basis change completed event\n        void OnChangeCompleted();\n\n        REF_COUNTERABLE_IMPL(RefCounterable);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/SceneEditableObject.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"SceneEditableObject.h\"\n\n#include \"o2/Scene/Scene.h\"\n\nnamespace o2\n{\n#if IS_EDITOR\n    SceneEditableObject::SceneEditableObject(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {}\n\n    SceneEditableObject::~SceneEditableObject()\n    {}\n\n    void SceneEditableObject::Update(float dt)\n    {}\n\n    bool SceneEditableObject::IsOnScene() const\n    {\n        return true;\n    }\n\n    void SceneEditableObject::Destroy()\n    {}\n\n    SceneUID SceneEditableObject::GetID() const\n    {\n        return 0;\n    }\n\n    void SceneEditableObject::GenerateNewID(bool childs /*= true*/)\n    {}\n\n    const String& SceneEditableObject::GetName() const\n    {\n        return String::empty;\n    }\n\n    void SceneEditableObject::SetName(const String& name)\n    {}\n\n    Ref<SceneEditableObject> SceneEditableObject::GetEditableLink() const\n    {\n        return nullptr;\n    }\n\n    bool SceneEditableObject::IsEditableLinkedTo(const Ref<SceneEditableObject>& link) const\n    {\n        if (auto thisLink = GetEditableLink())\n        {\n            while (thisLink)\n            {\n                if (thisLink == link)\n                    return true;\n\n                thisLink = thisLink->GetEditableLink();\n            }\n        }\n\n        return false;\n    }\n\n    bool SceneEditableObject::IsSupportsLinking() const\n    {\n        return true;\n    }\n\n    Vector<Ref<SceneEditableObject>> SceneEditableObject::GetEditableChildren() const\n    {\n        return Vector<Ref<SceneEditableObject>>();\n    }\n\n    void SceneEditableObject::GetAllEditableChildren(Vector<Ref<SceneEditableObject>>& children)\n    {\n        auto thisChildren = GetEditableChildren();\n\n        children.Add(thisChildren);\n\n        for (auto& child : thisChildren)\n            child->GetAllEditableChildren(children);\n    }\n\n    Ref<SceneEditableObject> SceneEditableObject::GetEditableParent() const\n    {\n        return nullptr;\n    }\n\n    void SceneEditableObject::SetEditableParent(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {}\n\n    void SceneEditableObject::AddEditableChild(const Ref<SceneEditableObject>& object, int idx /*= -1*/)\n    {}\n\n    void SceneEditableObject::SetIndexInSiblings(int idx)\n    {}\n\n    bool SceneEditableObject::CanBeParentedTo(const Type& parentType)\n    {\n        return parentType.IsBasedOn(TypeOf(Actor));\n    }\n\n    bool SceneEditableObject::IsSupportsDisabling() const\n    {\n        return false;\n    }\n\n    bool SceneEditableObject::IsEnabled() const\n    {\n        return true;\n    }\n\n    bool SceneEditableObject::IsEnabledInHierarchy() const\n    {\n        auto parent = GetEditableParent();\n        return IsEnabled() && (parent ? parent->IsEnabledInHierarchy() : true);\n    }\n\n    void SceneEditableObject::SetEnabled(bool enabled)\n    {}\n\n    bool SceneEditableObject::IsSupportsLocking() const\n    {\n        return false;\n    }\n\n    bool SceneEditableObject::IsLocked() const\n    {\n        return false;\n    }\n\n    bool SceneEditableObject::IsLockedInHierarchy() const\n    {\n        return false;\n    }\n\n    void SceneEditableObject::SetLocked(bool locked)\n    {}\n\n    bool SceneEditableObject::IsSupportsTransforming() const\n    {\n        return false;\n    }\n\n    Basis SceneEditableObject::GetTransform() const\n    {\n        return Basis::Identity();\n    }\n\n    void SceneEditableObject::SetTransform(const Basis& transform)\n    {}\n\n    void SceneEditableObject::UpdateTransform()\n    {}\n\n    bool SceneEditableObject::IsSupportsPivot() const\n    {\n        return false;\n    }\n\n    void SceneEditableObject::SetPivot(const Vec2F& pivot)\n    {}\n\n    Vec2F SceneEditableObject::GetPivot() const\n    {\n        return Vec2F();\n    }\n\n    bool SceneEditableObject::IsSupportsLayout() const\n    {\n        return false;\n    }\n\n    Layout SceneEditableObject::GetLayout() const\n    {\n        return Layout();\n    }\n\n    void SceneEditableObject::SetLayout(const Layout& layout)\n    {}\n\n    bool SceneEditableObject::IsSupportsSnapping() const\n    {\n        return true;\n    }\n\n    bool SceneEditableObject::IsSupportsDeleting() const\n    {\n        return true;\n    }\n\n    void SceneEditableObject::OnChanged()\n    {}\n\n    void SceneEditableObject::OnLockChanged()\n    {}\n\n    void SceneEditableObject::OnNameChanged()\n    {}\n\n    void SceneEditableObject::OnChildrenChanged()\n    {}\n\n    void SceneEditableObject::OnEditableParentChanged(const Ref<SceneEditableObject>& oldParent)\n    {}\n\n    void SceneEditableObject::GetDifferences(ActorDifferences& differences) const\n    {}\n#endif\n}\n// --- META ---\n\n#if  IS_EDITOR\nDECLARE_CLASS(o2::SceneEditableObject, o2__SceneEditableObject);\n#endif\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Editor/SceneEditableObject.h",
    "content": "#pragma once\n#include \"o2/Utils/Basic/ICloneable.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2/Utils/Math/Layout.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n#if IS_EDITOR\n    struct ActorDifferences;\n\n    // ----------------------------------------------------------\n    // Object, that can be shown in editor's tree view and edited\n    // ----------------------------------------------------------\n    class SceneEditableObject: public RefCounterable, virtual public ISerializable, virtual public ICloneableRef\n    {\n    public:\n        int changedFrame = 0; // Index of frame, when object has changed @EDITOR_IGNORE\n\n    public:\n        // Default constructor. Registers itself in scene editable objects list\n        SceneEditableObject(RefCounter* refCounter);\n\n        // Destructor, unregisters from scene editable objects list\n        ~SceneEditableObject() override;\n\n        // Updates object\n        virtual void Update(float dt);\n\n        // Returns true when object is on scene\n        virtual bool IsOnScene() const;\n\n        // Destroys object\n        virtual void Destroy();\n\n        // Returns unique id\n        virtual SceneUID GetID() const;\n\n        // Generates new random id \n        virtual void GenerateNewID(bool childs = true);\n\n        // Returns name of object\n        virtual const String& GetName() const;\n\n        // Sets name of object\n        virtual void SetName(const String& name);\n\n        // Returns object's link to prototype\n        virtual Ref<SceneEditableObject> GetEditableLink() const;\n\n        // Returns is object linked to another object\n        virtual bool IsEditableLinkedTo(const Ref<SceneEditableObject>& link) const;\n\n        // Is supports linking to prototype\n        virtual bool IsSupportsLinking() const;\n\n        // Returns list of object's children\n        virtual Vector<Ref<SceneEditableObject>> GetEditableChildren() const;\n\n        // Collects all children in hierarchy\n        void GetAllEditableChildren(Vector<Ref<SceneEditableObject>>& children);\n\n        // Returns object's parent object. Return nullptr when it is a root scene object\n        virtual Ref<SceneEditableObject> GetEditableParent() const;\n\n        // Sets parent object. nullptr means make this object as root. idx == -1 means last\n        virtual void SetEditableParent(const Ref<SceneEditableObject>& object, int idx = -1);\n\n        // Adds child. idx is place in parent children. idx == -1 means last\n        virtual void AddEditableChild(const Ref<SceneEditableObject>& object, int idx = -1);\n\n        // Sets index in siblings - children of parent\n        virtual void SetIndexInSiblings(int idx);\n\n        // Checks that this object can be added as child to another object\n        virtual bool CanBeParentedTo(const Type& parentType);\n\n        // Returns is that type of object can be enabled and disabled\n        virtual bool IsSupportsDisabling() const;\n\n        // Returns is object enabled, override when it's supports\n        virtual bool IsEnabled() const;\n\n        // Returns is object enabled and all parent are enabled too\n        virtual bool IsEnabledInHierarchy() const;\n\n        // Sets enabling of object, override when it's supports\n        virtual void SetEnabled(bool enabled);\n\n        // Returns is that type of object can be locked\n        virtual bool IsSupportsLocking() const;\n\n        // Returns is object locked, override when it's supports\n        virtual bool IsLocked() const;\n\n        // Returns is object locked and all parent are locked too\n        virtual bool IsLockedInHierarchy() const;\n\n        // Sets locking of object, override when it's supports\n        virtual void SetLocked(bool locked);\n\n        // Returns is that type of object can be transformed\n        virtual bool IsSupportsTransforming() const;\n\n        // Returns transform, override when it's supports\n        virtual Basis GetTransform() const;\n\n        // Sets transform of object, override when it's supports\n        virtual void SetTransform(const Basis& transform);\n\n        // Updates transform immediately\n        virtual void UpdateTransform();\n\n        // Returns is object supports pivot \n        virtual bool IsSupportsPivot() const;\n\n        // Sets transform pivot point\n        virtual void SetPivot(const Vec2F& pivot);\n\n        // Returns transform pivot\n        virtual Vec2F GetPivot() const;\n\n        // Returns is that type of object can be transformed with layout\n        virtual bool IsSupportsLayout() const;\n\n        // Returns layout, override when it's supports\n        virtual Layout GetLayout() const;\n\n        // Sets layout of object, override when it's supports\n        virtual void SetLayout(const Layout& layout);\n\n        // Returns is that type of object can be used to snapping while transforming\n        virtual bool IsSupportsSnapping() const;\n\n        // Returns is that type of object can be deleted from editor\n        virtual bool IsSupportsDeleting() const;\n\n        // Called when something changed in this object\n        virtual void OnChanged();\n\n        // Called when actor's locking was changed\n        virtual void OnLockChanged();\n\n        // Called when actor's name was changed\n        virtual void OnNameChanged();\n\n        // Called when child changed\n        virtual void OnChildrenChanged();\n\n        // Called when parent changed\n        virtual void OnEditableParentChanged(const Ref<SceneEditableObject>& oldParent);\n\n        // Called before making prototype from this object\n        virtual void BeginMakePrototype() const {}\n\n        // Called before instantiate from this object\n        virtual void BeginInstantiatePrototype() const {}\n\n        SERIALIZABLE(SceneEditableObject);\n\n    protected:\n        // Collects differences between this and prototype\n        virtual void GetDifferences(ActorDifferences& differences) const;\n\n        friend struct ActorDifferences;\n    };\n#endif\n}\n// --- META ---\n\n#if  IS_EDITOR\nCLASS_BASES_META(o2::SceneEditableObject)\n{\n    BASE_CLASS(o2::RefCounterable);\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::ICloneableRef);\n}\nEND_META;\nCLASS_FIELDS_META(o2::SceneEditableObject)\n{\n#if  IS_EDITOR\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(changedFrame);\n#endif\n}\nEND_META;\nCLASS_METHODS_META(o2::SceneEditableObject)\n{\n\n#if  IS_EDITOR\n    FUNCTION().PUBLIC().CONSTRUCTOR(RefCounter*);\n    FUNCTION().PUBLIC().SIGNATURE(void, Update, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsOnScene);\n    FUNCTION().PUBLIC().SIGNATURE(void, Destroy);\n    FUNCTION().PUBLIC().SIGNATURE(SceneUID, GetID);\n    FUNCTION().PUBLIC().SIGNATURE(void, GenerateNewID, bool);\n    FUNCTION().PUBLIC().SIGNATURE(const String&, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableLink);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEditableLinkedTo, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsLinking);\n    FUNCTION().PUBLIC().SIGNATURE(Vector<Ref<SceneEditableObject>>, GetEditableChildren);\n    FUNCTION().PUBLIC().SIGNATURE(void, GetAllEditableChildren, Vector<Ref<SceneEditableObject>>&);\n    FUNCTION().PUBLIC().SIGNATURE(Ref<SceneEditableObject>, GetEditableParent);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEditableParent, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AddEditableChild, const Ref<SceneEditableObject>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetIndexInSiblings, int);\n    FUNCTION().PUBLIC().SIGNATURE(bool, CanBeParentedTo, const Type&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsDisabling);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEnabled);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEnabledInHierarchy);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetEnabled, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsLocking);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLocked);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsLockedInHierarchy);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLocked, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsTransforming);\n    FUNCTION().PUBLIC().SIGNATURE(Basis, GetTransform);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetTransform, const Basis&);\n    FUNCTION().PUBLIC().SIGNATURE(void, UpdateTransform);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsPivot);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPivot, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetPivot);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsLayout);\n    FUNCTION().PUBLIC().SIGNATURE(Layout, GetLayout);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLayout, const Layout&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsSnapping);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsSupportsDeleting);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnLockChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnNameChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnChildrenChanged);\n    FUNCTION().PUBLIC().SIGNATURE(void, OnEditableParentChanged, const Ref<SceneEditableObject>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginMakePrototype);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginInstantiatePrototype);\n    FUNCTION().PROTECTED().SIGNATURE(void, GetDifferences, ActorDifferences&);\n#endif\n}\nEND_META;\n#endif\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/FileSystem/File.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"File.h\"\n\n#include \"o2/Utils/Reflection/Reflection.h\"\n\n#ifdef PLATFORM_ANDROID\n#include \"o2/Application/Android/AndroidPlatform.h\"\n#endif\n\nnamespace o2\n{\n    InFile::InFile() :\n        mOpened(false)\n    {}\n\n    InFile::InFile(const String& filename) :\n        mOpened(false)\n    {\n        Open(filename);\n    }\n\n    InFile::~InFile()\n    {\n        Close();\n    }\n\n    const String& InFile::GetFilename() const\n    {\n        return mFilename;\n    }\n\n    bool InFile::IsOpened() const\n    {\n        return mOpened;\n    }\n\n\n    bool InFile::Open(const String& filename)\n    {\n        Close();\n\n#ifdef PLATFORM_ANDROID\n        // APK assets live inside the zip — only AAssetManager can read them.\n        // Absolute paths (starting with '/') are regular FS (DataPath, cache).\n        if (!filename.IsEmpty() && filename[0] != '/')\n        {\n            if (AAssetManager* am = AndroidPlatform::GetAssetManager())\n            {\n                mAsset = AAssetManager_open(am, filename.Data(), AASSET_MODE_BUFFER);\n                if (mAsset)\n                {\n                    mOpened = true;\n                    mFilename = filename;\n                    return true;\n                }\n            }\n        }\n#endif\n\n        mIfstream.open(filename, std::ios::binary);\n\n        if (!mIfstream.is_open())\n            return false;\n\n        mOpened = true;\n        mFilename = filename;\n\n        return true;\n    }\n\n    bool InFile::Close()\n    {\n        if (mOpened)\n        {\n#ifdef PLATFORM_ANDROID\n            if (mAsset)\n            {\n                AAsset_close(mAsset);\n                mAsset = nullptr;\n            }\n            else\n#endif\n            {\n                mIfstream.close();\n            }\n        }\n        mOpened = false;\n        return true;\n    }\n\n    UInt InFile::ReadFullData(void* dataPtr)\n    {\n#ifdef PLATFORM_ANDROID\n        if (mAsset)\n        {\n            AAsset_seek(mAsset, 0, SEEK_SET);\n            off_t length = AAsset_getLength(mAsset);\n            AAsset_read(mAsset, dataPtr, length);\n            return (UInt)length;\n        }\n#endif\n        mIfstream.seekg(0, std::ios::beg);\n        mIfstream.seekg(0, std::ios::end);\n        UInt length = (UInt)mIfstream.tellg();\n        mIfstream.seekg(0, std::ios::beg);\n\n        mIfstream.read((char*)dataPtr, length);\n\n        return length;\n    }\n\n    String InFile::ReadFullData()\n    {\n        UInt len = GetDataSize();\n        char* buffer = mnew char[len + 1];\n\n        ReadData(buffer, len);\n        buffer[len] = '\\0';\n\n        return String(buffer);\n    }\n\n    void InFile::ReadData(void* dataPtr, UInt bytes)\n    {\n#ifdef PLATFORM_ANDROID\n        if (mAsset)\n        {\n            AAsset_read(mAsset, dataPtr, bytes);\n            return;\n        }\n#endif\n        auto& r = mIfstream.read((char*)dataPtr, bytes);\n    }\n\n    void InFile::SetCaretPos(UInt pos)\n    {\n#ifdef PLATFORM_ANDROID\n        if (mAsset)\n        {\n            AAsset_seek(mAsset, (off_t)pos, SEEK_SET);\n            return;\n        }\n#endif\n        mIfstream.seekg(pos, std::ios::beg);\n    }\n\n    UInt InFile::GetCaretPos()\n    {\n#ifdef PLATFORM_ANDROID\n        if (mAsset)\n        {\n            off_t remaining = AAsset_getRemainingLength(mAsset);\n            off_t total     = AAsset_getLength(mAsset);\n            return (UInt)(total - remaining);\n        }\n#endif\n        return (UInt)mIfstream.tellg();\n    }\n\n    UInt InFile::GetDataSize()\n    {\n#ifdef PLATFORM_ANDROID\n        if (mAsset)\n            return (UInt)AAsset_getLength(mAsset);\n#endif\n        mIfstream.seekg(0, std::ios::beg);\n        mIfstream.seekg(0, std::ios::end);\n        UInt res = (long unsigned int)mIfstream.tellg();\n        mIfstream.seekg(0, std::ios::beg);\n\n        return res;\n    }\n\n    OutFile::OutFile() :\n        mOpened(false)\n    {}\n\n    OutFile::OutFile(const String& filename) :\n        mOpened(false)\n    {\n        Open(filename);\n    }\n\n    OutFile::~OutFile()\n    {\n        Close();\n    }\n\n    const String& OutFile::GetFilename() const\n    {\n        return mFilename;\n    }\n\n    bool OutFile::IsOpened() const\n    {\n        return mOpened;\n    }\n\n    bool OutFile::Open(const String& filename)\n    {\n        Close();\n\n        mOfstream.open(filename, std::ios::binary);\n\n        if (!mOfstream.is_open())\n            return false;\n\n        mOpened = true;\n        mFilename = filename;\n\n        return true;\n    }\n\n    bool OutFile::Close()\n    {\n        if (mOpened)\n            mOfstream.close();\n\n        return true;\n    }\n\n    void OutFile::WriteData(const void* dataPtr, UInt bytes)\n    {\n        mOfstream.write((const char*)dataPtr, bytes);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/FileSystem/File.h",
    "content": "#pragma once\n\n#include <fstream>\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/String.h\"\n\n#ifdef PLATFORM_ANDROID\n#include <android/asset_manager.h>\n#endif\n\nnamespace o2\n{\n    // ----------\n    // Input file\n    // ----------\n    class InFile\n    {\n    public:\n        // Default constructor\n        InFile();\n\n        // Constructor with opening file\n        InFile(const String& filename);\n\n        // Destructor\n        ~InFile();\n\n        // Opening file \n        bool Open(const String& filename);\n\n        // Closing file\n        bool Close();\n\n        // Returns file data as string\n        String ReadFullData();\n\n        // Read full file data and return size of ridden data\n        UInt ReadFullData(void *dataPtr);\n\n        // Read data in dataPtr\n        void ReadData(void *dataPtr, UInt bytes);\n\n        // Sets caret position\n        void SetCaretPos(UInt pos);\n\n        // Return caret position\n        UInt GetCaretPos();\n\n        // Returns full data size\n        UInt GetDataSize();\n\n        // Returns true, if file was opened\n        bool IsOpened() const;\n\n        // Return file name\n        const String& GetFilename() const;\n\n    private:\n        std::ifstream mIfstream; // Input stream\n        String        mFilename; // File name\n        bool          mOpened;   // True, if file was opened\n\n#ifdef PLATFORM_ANDROID\n        AAsset* mAsset = nullptr;\n#endif\n    };\n\n    // -----------\n    // Output file\n    // -----------\n    class OutFile\n    {\n    public:\n        // Default constructor\n        OutFile();\n\n        // Constructor with opening file\n        OutFile(const String& filename);\n\n        // Destructor\n        ~OutFile();\n\n        // Opening file \n        bool Open(const String& filename);\n\n        // Close file\n        bool Close();\n\n        // Write some data from dataPtr\n        void WriteData(const void* dataPtr, UInt bytes);\n\n        // Returns true, if file was opened\n        bool IsOpened() const;\n\n        // Returns file name\n        const String& GetFilename() const;\n\n    private:\n        std::ofstream mOfstream; // Output stream\n        String        mFilename; // File name\n        bool          mOpened;   // True, if file was opened\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/FileSystem/FileInfo.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FileInfo.h\"\n\n#include \"o2/Utils/Math/Math.h\"\n\nnamespace o2\n{\n    bool FileInfo::operator==(const FileInfo& other) const\n    {\n        return path == other.path && editDate == other.editDate && size == other.size;\n    }\n\n\n    bool FolderInfo::operator==(const FolderInfo& other) const\n    {\n        return path == other.path;\n    }\n\n    bool FolderInfo::IsFileExist(const String& filePath)\n    {\n        for (auto& file:files)\n        {\n            if (file.path == filePath)\n                return true;\n        }\n\n        for (auto& path:folders)\n        {\n            if (path.IsFileExist(filePath))\n                return true;\n        }\n\n        return false;\n    }\n\n    void FolderInfo::ClampPathNames()\n    {\n        ProcessPathNamesClamping(path.Length());\n    }\n\n    void FolderInfo::ProcessPathNamesClamping(int charCount)\n    {\n        path = path.SubStr(Math::Min(charCount, (int)path.Length()));\n\n        for (FileInfo& file:files)\n            file.path = file.path.SubStr(Math::Min(charCount, file.path.Length()));\n\n        for (FolderInfo& path:folders)\n            path.ProcessPathNamesClamping(charCount);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/FileSystem/FileInfo.h",
    "content": "#pragma once\n\n#include \"o2/Utils/FileSystem/File.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/System/Time/Time.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\nnamespace o2\n{\n    // ---------\n    // File info\n    // ---------\n    class FileInfo\n    {\n    public:\n        String    path;\n        TimeStamp editDate;\n        Int64     size;\n\n        bool operator==(const FileInfo& other) const;\n    };\n\n    // ---------\n    // Path info\n    // ---------\n    class FolderInfo\n    {\n    public:\n        String             path;    // Path of this \n        Vector<FileInfo>   files;   // Files vector\n        Vector<FolderInfo> folders; // Paths vector\n\n    public:\n        // Equal operator\n        bool operator==(const FolderInfo& other) const;\n\n        // Returns true if this contains specified path or file\n        bool IsFileExist(const String& filePath);\n\n        // Cuts repeating path parts to short style\n        // Sample: \n        // SomePath/SomePath2\n        // -SomePath/SomePath2/ff.x\n        // -SomePath/SomePath2/ffy.x\n        // Converting to:\n        // SomePath/SomePath2\n        // -ff.x\n        // -ffy.x\n        void ClampPathNames();\n\n    protected:\n        // Cut path recursive function\n        void ProcessPathNamesClamping(int charCount);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/FileSystem/FileSystem.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FileSystem.h\"\n\n#include \"o2/Application/Application.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Log/LogStream.h\"\n\n#include <chrono>\n\n#ifdef PLATFORM_ANDROID\n#include \"o2/Application/Android/AndroidPlatform.h\"\n#endif\n\n#if defined(O2_FILESYSTEM_EXPERIMENTAL)\n#include <experimental/filesystem>\nnamespace fs = std::experimental::filesystem;\n#else\n#include <filesystem>\nnamespace fs = std::filesystem;\n#endif\n\nnamespace o2\n{\n\n    FileSystem::FileSystem(RefCounter* refCounter):\n        Singleton<FileSystem>(refCounter)\n    {\n        mLog = mmake<LogStream>(\"File System\");\n        o2Debug.GetLog()->BindStream(mLog);\n    }\n\n    FileSystem::~FileSystem()\n    {}\n\n    String FileSystem::ExtractPathStr(const String& path) const\n    {\n        auto fnd = path.FindLast(\"/\");\n        if (fnd < 0)\n            return \"\";\n\n        return path.SubStr(0, fnd);\n    }\n\n    String FileSystem::GetFileExtension(const String& filePath)\n    {\n        int dotIdx = filePath.FindLast(\".\");\n\n        if (dotIdx != -1)\n            return filePath.SubStr(dotIdx + 1);\n\n        return String();\n    }\n\n    String FileSystem::GetFileNameWithoutExtension(const String& filePath)\n    {\n        return filePath.SubStr(0, filePath.FindLast(\".\"));\n    }\n\n    String FileSystem::GetPathWithoutDirectories(const String& path)\n    {\n        return path.SubStr(Math::Max(path.FindLast(\"/\"), path.FindLast(\"\\\\\")) + 1);\n    }\n\n    String FileSystem::GetParentPath(const String& path)\n    {\n        int idx = Math::Max(path.FindLast(\"/\"), path.FindLast(\"\\\\\"));\n\n        if (idx == -1)\n            return String();\n\n        return path.SubStr(0, idx);\n    }\n\n    String FileSystem::ReadFile(const String& path)\n    {\n        InFile file(path);\n        if (!file.IsOpened())\n            return String();\n\n        return file.ReadFullData();\n    }\n\n    void FileSystem::WriteFile(const String& path, const String& data)\n    {\n        OutFile file(path);\n        file.WriteData(data.Data(), data.Length());\n    }\n\n    FolderInfo FileSystem::GetFolderInfo(const String& path) const\n    {\n        FolderInfo res;\n        res.path = path;\n\n        fs::path fullPath(path.Data());\n        if (!fs::exists(fullPath))\n        {\n            mInstance->mLog->Error(\"Failed GetPathInfo: Error opening directory \" + path);\n            return res;\n        }\n\n        for (auto& subPath : fs::directory_iterator(fullPath))\n        {\n            if (fs::is_directory(subPath))\n                res.folders.Add(GetFolderInfo(subPath.path().string() + \"/\"));\n            else\n                res.files.Add(GetFileInfo(subPath.path().string()));\n        }\n\n        return res;\n    }\n\n    bool FileSystem::FileCopy(const String& source, const String& dest) const\n    {\n        FileDelete(dest);\n        FolderCreate(ExtractPathStr(dest));\n\n        fs::copy(source.Data(), dest.Data());\n\n        return fs::exists(dest.Data());\n    }\n\n    bool FileSystem::FileDelete(const String& file) const\n    {\n        if (!fs::exists(file.Data()))\n            return false;\n\n        fs::remove(file.Data());\n\n        return true;\n    }\n\n    bool FileSystem::FileMove(const String& source, const String& dest) const\n    {\n        String destFolder = GetParentPath(dest);\n\n        if (!IsFolderExist(destFolder))\n            FolderCreate(destFolder);\n\n        fs::rename(source.Data(), dest.Data());\n\n        return fs::exists(dest.Data());\n    }\n\n    FileInfo FileSystem::GetFileInfo(const String& path) const\n    {\n        using namespace std::chrono;\n\n        FileInfo res;\n        res.path = \"invalid_file\";\n\n        fs::path fullPath(path.Data());\n\n        if (!fs::exists(fullPath))\n            return res;\n\n        auto writeTime = fs::last_write_time(fullPath);\n        auto timePoint = time_point_cast<system_clock::time_point::duration>(writeTime - fs::file_time_type::clock::now() + system_clock::now());\n        std::time_t time = system_clock::to_time_t(timePoint);\n\n        if (std::tm* timeInfo = std::localtime(&time))\n        {\n            res.editDate = TimeStamp(timeInfo->tm_sec, timeInfo->tm_min, timeInfo->tm_hour,\n                                     timeInfo->tm_mday, timeInfo->tm_mon + 1, timeInfo->tm_year + 1900);\n        }\n\n        res.path = path;\n        res.size = fs::file_size(fullPath);\n\n        return res;\n    }\n\n    bool FileSystem::SetFileEditDate(const String& path, const TimeStamp& time) const\n    {\n        using namespace std::chrono;\n\n        std::tm file_tm = {};\n        file_tm.tm_year = time.mYear - 1900;\n        file_tm.tm_mon = time.mMonth - 1;\n        file_tm.tm_mday = time.mDay;\n        file_tm.tm_hour = time.mHour;\n        file_tm.tm_min = time.mMinute;\n        file_tm.tm_sec = time.mSecond;\n\n        std::time_t writeTime = std::mktime(&file_tm);\n        auto timePoint = system_clock::from_time_t(writeTime);\n\n        auto fileTimePoint = time_point_cast<fs::file_time_type::clock::time_point::duration>(timePoint - system_clock::now() + fs::file_time_type::clock::now());\n\n        fs::last_write_time(path.Data(), fileTimePoint);\n\n        return true;\n    }\n\n    bool FileSystem::FolderCreate(const String& path, bool recursive /*= true*/) const\n    {\n        if (IsFolderExist(path))\n            return true;\n\n        if (!recursive)\n            return fs::create_directory(path.Data());\n\n        String extrPath = ExtractPathStr(path);\n        if (extrPath == path)\n            return false;\n\n        if (!FolderCreate(extrPath, true))\n            return false;\n\n        return fs::create_directory(path.Data());\n    }\n\n    bool FileSystem::FolderCopy(const String& from, const String& to) const\n    {\n        if (!IsFolderExist(from) || !IsFolderExist(to))\n            return false;\n\n        fs::copy(from.Data(), to.Data(), fs::copy_options::recursive);\n\n        return true;\n    }\n\n    bool FileSystem::FolderRemove(const String& path, bool recursive /*= true*/) const\n    {\n        if (!IsFolderExist(path))\n            return false;\n\n        fs::remove_all(path.Data());\n        return true;\n    }\n\n    bool FileSystem::Rename(const String& old, const String& newPath) const\n    {\n        fs::rename(old.Data(), newPath.Data());\n        return true;\n    }\n\n    bool FileSystem::IsFolderExist(const String& path) const\n    {\n        return fs::exists(path.Data());\n    }\n\n    bool FileSystem::IsFileExist(const String& path) const\n    {\n#ifdef PLATFORM_ANDROID\n        // Relative paths live in APK assets; only AAssetManager can see them.\n        if (!path.IsEmpty() && path[0] != '/')\n        {\n            if (AAssetManager* am = AndroidPlatform::GetAssetManager())\n            {\n                AAsset* a = AAssetManager_open(am, path.Data(), AASSET_MODE_UNKNOWN);\n                if (a) { AAsset_close(a); return true; }\n                return false;\n            }\n        }\n#endif\n        return fs::exists(path.Data());\n    }\n\n    String FileSystem::GetPathRelativeToPath(const String& from, const String& to)\n    {\n#if defined(O2_FILESYSTEM_EXPERIMENTAL)\n        return to;\n#else\n        return fs::relative(from.Data(), to.Data()).string();\n#endif\n    }\n\n    String FileSystem::CanonicalizePath(const String& path)\n    {\n        return fs::canonical(path.Data()).string();\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/FileSystem/FileSystem.h",
    "content": "#pragma once\n\n#include \"o2/Utils/FileSystem/FileInfo.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Types/String.h\"\n\n\n#if defined PLATFORM_ANDROID\n#include <android/asset_manager.h>\n#endif\nnamespace o2\n{\n    class LogStream;\n\n    // File system access macros\n#define o2FileSystem o2::FileSystem::Instance()\n\n    // ---------------------------------------------------\n    // File system. Using for working with files and paths\n    // ---------------------------------------------------\n    class FileSystem: public Singleton<FileSystem>\n    {\n    public:\n        // Default constructor\n        FileSystem(RefCounter* refCounter);\n\n        // Destructor\n        ~FileSystem();\n\n#if defined PLATFORM_ANDROID\n        // Returns android asset manager\n        AAssetManager* GetAssetManager() const;\n#elif defined PLATFORM_MAC || defined PLATFORM_IOS\n        // Returns bundle path\n        const String& GetBundlePath() const;\n#endif\n\n        // Returns info of paths and files of specified path\n        FolderInfo GetFolderInfo(const String& path) const;\n\n        // Returns file info\n        FileInfo GetFileInfo(const String& path) const;\n\n        // Sets file edited date\n        bool SetFileEditDate(const String& path, const TimeStamp& time) const;\n\n        // Copying file\n        bool FileCopy(const String& source, const String& dest) const;\n\n        // Deletion file\n        bool FileDelete(const String& file) const;\n\n        // Moving file\n        bool FileMove(const String& source, const String& dest) const;\n\n        // Creates folder\n        bool FolderCreate(const String& path, bool recursive = true) const;\n\n        // Moves folder\n        bool FolderCopy(const String& from, const String& to) const;\n\n        // Removes directory\n        bool FolderRemove(const String& path, bool recursive = true) const;\n\n        // Renames file or directory\n        bool Rename(const String& old, const String& newPath) const;\n\n        // Returns true if specified directory exist\n        bool IsFolderExist(const String& path) const;\n\n        // Returns true if specified file exist\n        bool IsFileExist(const String& path) const;\n\n        // Returns path from string\n        String ExtractPathStr(const String& path) const;\n\n        // Returns file extension\n        static String GetFileExtension(const String& filePath);\n\n        // Returns file name without extension\n        static String GetFileNameWithoutExtension(const String& filePath);\n\n        // Returns end path without parent directories\n        static String GetPathWithoutDirectories(const String& path);\n\n        // Returns parent path\n        static String GetParentPath(const String& path);\n\n        // Read file and returns result\n        static String ReadFile(const String& path);\n\n        // Returns a relative path from one path to another\n        static String GetPathRelativeToPath(const String& from, const String& to);\n\n        // Simplifies a path by removing navigation elements such as \".\" and \"..\" to produce a direct, well-formed path\n        static String CanonicalizePath(const String& path);\n\n        // Writes file data\n        static void WriteFile(const String& path, const String& data);\n\n    private:\n        Ref<LogStream> mLog; // File system log stream\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Function/ActorSubscription.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ActorSubscription.h\"\n\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Function/ActorSubscription.h",
    "content": "#pragma once\n#include \"o2/Scene/ActorLinkRef.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Function/ISerializableFunction.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n#include <o2/Scene/Components/ScriptableComponent.h>\n#endif\n\nnamespace o2\n{\n    class IActorSubscription : public ISerializableFunction\n    {\n    public:\n        LinkRef<Actor>     actorRef;     // Target actor\n        LinkRef<Component> componentRef; // Target component\n        String             method;       // Method name\n    };\n\n    template <typename UnusedType>\n    class ActorSubscription;\n\n    template<typename _res_type, typename ... _args>\n    class ActorSubscription<_res_type(_args ...)> : public IFunction<_res_type(_args ...)>, public IActorSubscription\n    {\n    public:\n        // Constructor\n        ActorSubscription()\n        {}\n\n        // Constructor\n        ActorSubscription(const LinkRef<Actor>& actor, const String& method)\n        {\n            this->actorRef = actor;\n            this->method = method;\n        }\n\n        // Copy-constructor\n        ActorSubscription(const ActorSubscription& other)\n        {\n            actorRef = other.actorRef;\n            method = other.method;\n        }\n\n        // Copy-operator\n        ActorSubscription& operator=(const ActorSubscription& other)\n        {\n            actorRef = other.actorRef;\n            method = other.method;\n\n            return *this;\n        }\n\n        // Equal operator\n        bool operator==(const ActorSubscription& other) const\n        {\n            return actorRef == other.actorRef && method == other.method;\n        }\n\n        // Not equal operator\n        bool operator!=(const ActorSubscription& other) const\n        {\n            return actorRef != other.actorRef || method != other.method;\n        }\n\n        // Returns cloned copy of this\n        IFunction<_res_type(_args ...)>* MakeClone() const override\n        {\n            return mnew ActorSubscription(*this);\n        }\n\n        // Returns cloned emplace copy of this in memory\n        IFunction<_res_type(_args ...)>* MakeClone(void* memory) const override\n        {\n            return new (memory) ActorSubscription(*this);\n        }\n\n        // Invokes function with arguments as functor\n        _res_type Invoke(_args ... args) const override\n        {\n            const IObject* callSource = nullptr;\n            if (auto component = componentRef.Get())\n                callSource = component;\n            else if (auto actor = actorRef.Get())\n                callSource = static_cast<const IObject*>(static_cast<const ActorBase*>(actor));\n\n            auto& objType = dynamic_cast<const ObjectType&>(callSource->GetType());\n             if constexpr (IS_SCRIPTING_SUPPORTED)\n             {\n                 if (auto scriptableComponent = dynamic_cast<const ScriptableComponent*>(callSource))\n                 {\n                     ScriptValue scriptMethod = scriptableComponent->GetInstance().GetProperty(method);\n                     if (scriptMethod.IsFunction())\n                         return scriptMethod.Invoke<_res_type, _args ...>(scriptableComponent->GetInstance(), args ...);\n                 }\n             }\n\n            void* obj = objType.DynamicCastFromIObject(const_cast<IObject*>(dynamic_cast<const IObject*>(callSource)));\n            return objType.Invoke<_res_type, _args ...>(method, obj, args ...);\n        }\n\n        // Returns true if functions is equal\n        bool Equals(const IFunction<_res_type(_args ...)>* other) const override\n        {\n            const ActorSubscription* otherFuncPtr = dynamic_cast<const ActorSubscription*>(other);\n            if (otherFuncPtr)\n                return *otherFuncPtr == *this;\n\n            return false;\n        }\n\n        // Returns size of function\n        UInt GetSizeOf() const override\n        {\n            return sizeof(*this);\n        }\n\n        // Serializes a function\n        void Serialize(DataValue& data) const override\n        {\n            data[\"type\"] = \"ActorFunction\";\n            if (componentRef)\n                data[\"component\"] = componentRef;\n            else\n                data[\"actor\"] = actorRef;\n\n            data[\"func\"] = method;\n        }\n\n        // Deserializes a function\n        void Deserialize(const DataValue& data) override\n        {\n            if (auto actorData = data.FindMember(\"actor\"))\n                actorData->Get(actorRef);\n\n            if (auto componentData = data.FindMember(\"component\"))\n                componentData->Get(componentRef);\n\n            method = data[\"func\"];\n        }\n    };\n\n    template<typename _res_type, typename ... _args>\n    void SerializableFunction<_res_type(_args ...)>::AddActorSubscription()\n    {\n        Base::Add(mnew ActorSubscription<_res_type(_args...)>());\n    }\n}\n\n#include \"o2/Utils/Function/FunctionDataValueConverter.h\"\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Function/Function.h",
    "content": "#pragma once\n\n#include <string>\n#include <functional>\n#include <vector>\n#include <cstring>\n#include \"o2/Utils/Memory/MemoryManager.h\"\n\nnamespace o2\n{\n    class IAbstractValueProxy;\n\n    // ---------------------------\n    // Abstract function interface\n    // ---------------------------\n    class IAbstractFunction\n    {\n    public:\n        // Calls a function passing parameters through a proxies, writes the value to result Proxy\n        virtual void InvokeRaw(IAbstractValueProxy* resultProxy, IAbstractValueProxy** parameters, int parametersCount) {}\n    };\n\n    template <typename UnusedType>\n    class IFunction;\n\n    // ------------------------\n    // Basic delegate interface\n    // ------------------------\n    template<typename _res_type, typename ... _args>\n    class IFunction<_res_type(_args ...)>: public IAbstractFunction\n    {\n    public:\n        // Virtual destructor\n        virtual ~IFunction() {}\n\n        // Returns cloned copy of this\n        virtual IFunction* MakeClone() const = 0;\n\n        // Returns cloned emplace copy of this in memory\n        virtual IFunction* MakeClone(void* memory) const = 0;\n\n        // Invokes function with arguments\n        virtual _res_type Invoke(_args ... args) const = 0;\n\n        // Returns true if other functions is equal\n        virtual bool Equals(const IFunction<_res_type(_args ...)>* other) const = 0;\n\n        // Calls a function passing parameters through a proxies, writes the value to result Proxy\n        void InvokeRaw(IAbstractValueProxy* resultProxy, IAbstractValueProxy** parameters, int parametersCount) override {}\n\n        // Returns size of function\n        virtual UInt GetSizeOf() const = 0;\n\n        // Invokes function with arguments as functor\n        _res_type operator()(_args ... args) const\n        {\n            return Invoke(args ...);\n        }\n    };\n\n    // ------------------------\n    // Static function delegate\n    // ------------------------\n    template<typename _res_type, typename ... _args>\n    class FunctionPtr : public IFunction<_res_type(_args ...)>\n    {\n        _res_type(*mFunctionPtr)(_args ... args); // Pointer to static function\n\n    public:\n        // Constructor\n        FunctionPtr(_res_type(*functionPtr)(_args ... args)) :\n            mFunctionPtr(functionPtr)\n        {\n        }\n\n        // Copy-constructor\n        FunctionPtr(const FunctionPtr& other) :\n            mFunctionPtr(other.mFunctionPtr)\n        {\n        }\n\n        // Copy-operator\n        FunctionPtr& operator=(const FunctionPtr& other)\n        {\n            mFunctionPtr = other.mFunctionPtr;\n            return *this;\n        }\n\n        // Equal operator\n        bool operator==(const FunctionPtr& other) const\n        {\n            return mFunctionPtr == other.mFunctionPtr;\n        }\n\n        // Not equal operator\n        bool operator!=(const FunctionPtr& other) const\n        {\n            return mFunctionPtr != other.mFunctionPtr;\n        }\n\n        // Returns cloned copy of this\n        IFunction<_res_type(_args ...)>* MakeClone() const\n        {\n            return mnew FunctionPtr(*this);\n        }\n\n        // Returns cloned emplace copy of this in memory\n        IFunction<_res_type(_args ...)>* MakeClone(void* memory) const\n        {\n            return new (memory) FunctionPtr(*this);\n        }\n\n        // Invokes function with arguments as functor\n        _res_type Invoke(_args ... args) const\n        {\n            return mFunctionPtr(args ...);\n        }\n\n        // Returns true if functions is equal\n        bool Equals(const IFunction<_res_type(_args ...)>* other) const\n        {\n            const FunctionPtr* otherFuncPtr = dynamic_cast<const FunctionPtr*>(other);\n            if (otherFuncPtr)\n                return *otherFuncPtr == *this;\n\n            return false;\n        }\n\n        // Returns size of function\n        UInt GetSizeOf() const override\n        {\n            return sizeof(*this);\n        }\n    };\n\n    // ------------------------\n    // Object function delegate\n    // ------------------------\n    template<typename _class_type, typename _res_type, typename ... _args>\n    class ObjFunctionPtr : public IFunction<_res_type(_args ...)>\n    {\n        _res_type(_class_type::* mFunctionPtr)(_args ... args); // Pointer to function\n        _class_type* mObject;                                  // Pointer to function's owner object\n\n    public:\n        // Constructor\n        ObjFunctionPtr(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args)) :\n            mFunctionPtr(functionPtr), mObject(object)\n        {\n        }\n\n        // Copy-constructor\n        ObjFunctionPtr(const ObjFunctionPtr& other) :\n            mFunctionPtr(other.mFunctionPtr), mObject(other.mObject)\n        {\n        }\n\n        // Copy-operator\n        ObjFunctionPtr& operator=(const ObjFunctionPtr& other)\n        {\n            mFunctionPtr = other.mFunctionPtr;\n            mObject = other.mObject;\n            return *this;\n        }\n\n        // Equals operator\n        bool operator==(const ObjFunctionPtr& other) const\n        {\n            return mObject == other.mObject && mFunctionPtr == other.mFunctionPtr;\n        }\n\n        // Not equals operator\n        bool operator!=(const ObjFunctionPtr& other) const\n        {\n            return mObject != other.mObject || mFunctionPtr != other.mFunctionPtr;\n        }\n\n        // Returns cloned copy of this\n        IFunction<_res_type(_args ...)>* MakeClone() const override\n        {\n            return mnew ObjFunctionPtr(*this);\n        }\n\n        // Returns cloned emplace copy of this in memory\n        IFunction<_res_type(_args ...)>* MakeClone(void* memory) const override\n        {\n            return new (memory) ObjFunctionPtr(*this);\n        }\n\n        // Invokes function with arguments as functor\n        _res_type Invoke(_args ... args) const override\n        {\n            return (mObject->*mFunctionPtr)(args ...);\n        }\n\n        // Returns true if functions is equal\n        bool Equals(const IFunction<_res_type(_args ...)>* other) const override\n        {\n            const ObjFunctionPtr* otherFuncPtr = dynamic_cast<const ObjFunctionPtr*>(other);\n            if (otherFuncPtr)\n                return *otherFuncPtr == *this;\n\n            return false;\n        }\n\n        // Returns size of function\n        UInt GetSizeOf() const override\n        {\n            return sizeof(*this);\n        }\n    };\n\n    // ---------------------------------\n    // Object constant function delegate\n    // ---------------------------------\n    template<typename _class_type, typename _res_type, typename ... _args>\n    class ObjConstFunctionPtr : public IFunction<_res_type(_args ...)>\n    {\n        _res_type(_class_type::* mFunctionPtr)(_args ... args) const; // Pointer to const function\n        _class_type* mObject;                                        // Pointer to function's owner object\n\n    public:\n        // Constructor\n        ObjConstFunctionPtr(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args) const) :\n            mFunctionPtr(functionPtr), mObject(object)\n        {\n        }\n\n        // Copy-constructor\n        ObjConstFunctionPtr(const ObjConstFunctionPtr& other) :\n            mFunctionPtr(other.mFunctionPtr), mObject(other.mObject)\n        {\n        }\n\n        // Copy-operator\n        ObjConstFunctionPtr& operator=(const ObjConstFunctionPtr& other)\n        {\n            mFunctionPtr = other.mFunctionPtr;\n            mObject = other.mObject;\n            return *this;\n        }\n\n        // Equals operator\n        bool operator==(const ObjConstFunctionPtr& other) const\n        {\n            return mObject == other.mObject && mFunctionPtr == other.mFunctionPtr;\n        }\n\n        // Not equals operator\n        bool operator!=(const ObjConstFunctionPtr& other) const\n        {\n            return mObject != other.mObject || mFunctionPtr != other.mFunctionPtr;\n        }\n\n        // Returns cloned copy of this\n        IFunction<_res_type(_args ...)>* MakeClone() const\n        {\n            return mnew ObjConstFunctionPtr(*this);\n        }\n\n        // Returns cloned emplace copy of this in memory\n        IFunction<_res_type(_args ...)>* MakeClone(void* memory) const\n        {\n            return new (memory) ObjConstFunctionPtr(*this);\n        }\n\n        // Invokes function with arguments as functor\n        _res_type Invoke(_args ... args) const\n        {\n            return (mObject->*mFunctionPtr)(args ...);\n        }\n\n        // Returns true if functions is equal\n        bool Equals(const IFunction<_res_type(_args ...)>* other) const\n        {\n            const ObjConstFunctionPtr* otherFuncPtr = dynamic_cast<const ObjConstFunctionPtr*>(other);\n            if (otherFuncPtr)\n                return *otherFuncPtr == *this;\n\n            return false;\n        }\n\n        // Returns size of function\n        UInt GetSizeOf() const override\n        {\n            return sizeof(*this);\n        }\n    };\n\n    // ----------------------\n    // Shared lambda delegate\n    // ----------------------\n    template<typename _lambda_type, typename _res_type, typename ... _args>\n    class SharedLambda : public IFunction<_res_type(_args ...)>\n    {\n        _lambda_type mLambda;\n\n    public:\n        // Constructor\n        SharedLambda(const _lambda_type& lambda) :\n            mLambda(lambda)\n        {\n        }\n\n        // Constructor\n        SharedLambda(_lambda_type&& lambda) :\n            mLambda(std::forward<_lambda_type>(lambda))\n        {\n        }\n\n        // Copy-constructor\n        SharedLambda(const SharedLambda& other) :\n            mLambda(other.mLambda)\n        {\n        }\n\n        // Move-constructor\n        SharedLambda(SharedLambda&& other) :\n            mLambda(std::forward<_lambda_type>(other.mLambda))\n        {\n        }\n\n        // Copy-operator\n        SharedLambda& operator=(const SharedLambda& other)\n        {\n            mLambda = other.mLambda;\n            return *this;\n        }\n\n        // Returns cloned copy of this\n        IFunction<_res_type(_args ...)>* MakeClone() const override\n        {\n            return mnew SharedLambda(*this);\n        }\n\n        // Returns cloned emplace copy of this in memory\n        IFunction<_res_type(_args ...)>* MakeClone(void* memory) const override\n        {\n            return new (memory) SharedLambda(*this);\n        }\n\n        // Invokes function with arguments as functor\n        _res_type Invoke(_args ... args) const override\n        {\n            return mLambda(args ...);\n        }\n\n        // Equal operator\n        bool operator==(const SharedLambda& other) const\n        {\n            return true;\n        }\n\n        // Not equal operator\n        bool operator!=(const SharedLambda& other) const\n        {\n            return false;\n        }\n\n        // Returns true if functions is equals\n        bool Equals(const IFunction<_res_type(_args ...)>* other) const override\n        {\n            const SharedLambda* otherFuncPtr = dynamic_cast<const SharedLambda*>(other);\n            if (otherFuncPtr)\n                return *otherFuncPtr == *this;\n\n            return false;\n        }\n\n        // Returns size of function\n        UInt GetSizeOf() const override\n        {\n            return sizeof(*this);\n        }\n    };\n\n    class ISerializableFunction;\n\n    // -----------------------------------------------------\n    // Basic interface for enumeration of internal functions\n    // -----------------------------------------------------\n    class AbstractFunction\n    {\n    public:\n        // Iterates over functions over an abstract interface\n        virtual void ForEachAbstract(const IFunction<void(const IAbstractFunction*)>& func) {}\n\n        // Adds function to list\n        virtual void AddActorSubscription() {}\n\n        // Removes abstract function\n        virtual void RemoveFunction(const IAbstractFunction* func) {}\n    };\n\n    template <typename UnusedType>\n    class Function;\n\n    // --------------------------------------------------\n    // Combined delegate. Can contain many other functors\n    // --------------------------------------------------\n    template<typename _res_type, typename ... _args>\n    class Function<_res_type(_args ...)> : public IFunction<_res_type(_args ...)>, public AbstractFunction\n    {\n    protected:\n        enum class DataType { Empty, OneFunction, CoupleOfFunctions };\n\n        static constexpr UInt extraPayload = 40;\n        static constexpr UInt payloadSize = sizeof(std::vector<void*>) + extraPayload;\n        static constexpr UInt dataSize = payloadSize + sizeof(DataType);\n\n        struct TypeData\n        {\n            Byte padding[payloadSize];\n            DataType type;\n        };\n\n        struct OneFunctionData\n        {\n            static constexpr UInt capacity = payloadSize - sizeof(void*);\n\n            Byte functionData[capacity];\n            void(*destructor)(IFunction<_res_type(_args ...)>*) = nullptr;\n        };\n\n        union Data\n        {\n            std::vector<IFunction<_res_type(_args ...)>*> functions;\n\n            OneFunctionData oneFunctionData;\n\n            TypeData typeData;\n\n            Data() { typeData.type = DataType::Empty; }\n            ~Data() {}\n        };\n\n    protected:\n        Data mData;\n\n    protected:\n        IFunction<_res_type(_args ...)>& OneFunctionRef() const\n        {\n            return *const_cast<IFunction<_res_type(_args ...)>*>(reinterpret_cast<const IFunction<_res_type(_args ...)>*>(mData.oneFunctionData.functionData));\n        }\n\n        void DestroyOneFunction()\n        {\n            if (mData.oneFunctionData.destructor)\n                (*mData.oneFunctionData.destructor)(&OneFunctionRef());\n        }\n\n        void ConvertToCoupleFunctionsType()\n        {\n            if (mData.typeData.type == DataType::OneFunction)\n            {\n                IFunction<_res_type(_args ...)>* firstFunction = OneFunctionRef().MakeClone();\n                DestroyOneFunction();\n\n                new (&mData.functions) std::vector<IFunction<_res_type(_args ...)>*>();\n                mData.functions.push_back(firstFunction);\n            }\n            else if (mData.typeData.type == DataType::Empty)\n                new (&mData.functions) std::vector<IFunction<_res_type(_args ...)>*>();\n\n            mData.typeData.type = DataType::CoupleOfFunctions;\n        }\n\n    public:\n        static const Function<_res_type(_args ...)> empty;\n\n    public:\n        // Constructor\n        Function()\n            : mData()\n        {\n        }\n\n        // Copy-constructor\n        Function(const Function& other)\n        {\n            if (other.mData.typeData.type == DataType::Empty)\n                return;\n\n            if (other.mData.typeData.type == DataType::OneFunction)\n            {\n                Add(other.OneFunctionRef());\n                return;\n            }\n\n            for (auto& func : other.mData.functions)\n                Add(*func);\n        }\n\n        // Move-constructor\n        Function(Function&& other)\n        {\n            memcpy(&mData, &other.mData, sizeof(Data));\n            other.mData.typeData.type = DataType::Empty;\n        }\n\n        // Constructor from IFunction\n        Function(const IFunction<_res_type(_args ...)>& func)\n            : mData()\n        {\n            Add(func);\n        }\n\n        // Constructor from IFunction\n        Function(IFunction<_res_type(_args ...)>&& func)\n            : mData()\n        {\n            Emplace(func);\n        }\n\n        // Constructor from static function pointer\n        template<typename _static_func_type, typename enable = typename std::enable_if<std::is_function<_static_func_type>::value>::type>\n        Function(const _static_func_type* func) :\n            Function()\n        {\n            Emplace(FunctionPtr<_res_type, _args ...>(func));\n        }\n\n        // Constructor from lambda\n        template<typename _lambda_type, typename enable = typename std::enable_if<std::is_invocable_r<_res_type, _lambda_type, _args ...>::value && !std::is_base_of<IFunction<_res_type(_args ...)>, _lambda_type>::value>::type>\n        Function(const _lambda_type& lambda) :\n            Function()\n        {\n            Emplace(SharedLambda<_lambda_type, _res_type, _args ...>(lambda));\n        }\n\n        // Move-constructor from lambda\n        template<typename _lambda_type, typename enable = typename std::enable_if<\n            std::is_invocable_r<_res_type, _lambda_type, _args ...>::value &&\n            !std::is_base_of<IFunction<_res_type(_args ...)>, typename std::remove_reference<_lambda_type>::type>::value&&\n            std::is_rvalue_reference<_lambda_type&&>::value\n        >::type>\n            Function(_lambda_type&& lambda) :\n            Function()\n        {\n            Emplace(std::forward<SharedLambda<_lambda_type, _res_type, _args ...>>(SharedLambda<_lambda_type, _res_type, _args ...>(std::forward<_lambda_type>(lambda))));\n        }\n\n        // Constructor from object and his function\n        template<typename _class_type>\n        Function(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args))\n            : Function()\n        {\n            Emplace(std::forward<ObjFunctionPtr<_class_type, _res_type, _args ...>>(ObjFunctionPtr<_class_type, _res_type, _args ...>(object, functionPtr)));\n        }\n\n        // Constructor from object and his function\n        template<typename _class_type>\n        Function(const ObjFunctionPtr<_class_type, _res_type, _args ...>& func) :\n            Function()\n        {\n            Emplace(std::forward<ObjFunctionPtr<_class_type, _res_type, _args ...>>(ObjFunctionPtr<_class_type, _res_type, _args ...>(func)));\n        }\n\n        // Constructor from object and his function\n        template<typename _class_type>\n        Function(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args) const) :\n            Function()\n        {\n            Emplace(std::forward<ObjConstFunctionPtr<_class_type, _res_type, _args ...>>(ObjConstFunctionPtr<_class_type, _res_type, _args ...>(object, functionPtr)));\n        }\n\n        // Destructor\n        ~Function()\n        {\n            Clear();\n        }\n\n        // Returns cloned copy of this\n        IFunction<_res_type(_args ...)>* MakeClone() const override\n        {\n            return mnew Function(*this);\n        }\n\n        // Returns cloned emplace copy of this in memory\n        IFunction<_res_type(_args ...)>* MakeClone(void* memory) const override\n        {\n            return new (memory) Function(*this);\n        }\n\n        // Removing all inside functions\n        void Clear()\n        {\n            if (mData.typeData.type == DataType::CoupleOfFunctions)\n            {\n                for (auto& func : mData.functions)\n                    delete func;\n\n                mData.functions.clear();\n            }\n            else if (mData.typeData.type == DataType::OneFunction)\n            {\n                DestroyOneFunction();\n                mData.typeData.type = DataType::Empty;\n            }\n        }\n\n        // Returns true when function is empty\n        bool IsEmpty() const\n        {\n            return mData.typeData.type == DataType::Empty ||\n                (mData.typeData.type == DataType::CoupleOfFunctions && mData.functions.empty());\n        }\n\n        // Emplace function\n        template<typename _function_type, typename enabled = typename std::enable_if<std::is_base_of<IFunction<_res_type(_args ...)>, _function_type>::value>::type>\n        void Emplace(_function_type&& func)\n        {\n            auto size = sizeof(_function_type);\n            if (mData.typeData.type == DataType::Empty && size <= OneFunctionData::capacity)\n            {\n                new (mData.oneFunctionData.functionData) _function_type(std::forward<_function_type>(func));\n                mData.oneFunctionData.destructor = [](IFunction<_res_type(_args ...)>* f) { f->~IFunction<_res_type(_args ...)>(); };\n                mData.typeData.type = DataType::OneFunction;\n            }\n            else\n            {\n                ConvertToCoupleFunctionsType();\n                mData.functions.push_back(mnew _function_type(func));\n            }\n        }\n\n        // Add function\n        void Add(const IFunction<_res_type(_args ...)>& func)\n        {\n            auto size = func.GetSizeOf();\n            if (mData.typeData.type == DataType::Empty && size <= OneFunctionData::capacity)\n            {\n                func.MakeClone(mData.oneFunctionData.functionData);\n                mData.oneFunctionData.destructor = [](IFunction<_res_type(_args ...)>* f) { f->~IFunction<_res_type(_args ...)>(); };\n                mData.typeData.type = DataType::OneFunction;\n            }\n            else\n            {\n                ConvertToCoupleFunctionsType();\n                mData.functions.push_back(func.MakeClone());\n            }\n        }\n\n        // Add function pointer\n        void Add(IFunction<_res_type(_args ...)>* func)\n        {\n            if (mData.typeData.type != DataType::CoupleOfFunctions)\n                ConvertToCoupleFunctionsType();\n\n            mData.functions.push_back(func);\n        }\n\n        // Removes function\n        void Remove(const IFunction<_res_type(_args ...)>& function)\n        {\n            if (mData.typeData.type == DataType::OneFunction)\n            {\n                if (OneFunctionRef().Equals(&function))\n                {\n                    DestroyOneFunction();\n                    mData.typeData.type = DataType::Empty;\n                }\n            }\n            else if (mData.typeData.type == DataType::CoupleOfFunctions)\n            {\n                for (auto funcIt = mData.functions.begin(); funcIt != mData.functions.end(); ++funcIt)\n                {\n                    if ((*funcIt)->Equals(&function))\n                    {\n                        delete* funcIt;\n                        mData.functions.erase(funcIt);\n                        break;\n                    }\n                }\n            }\n        }\n\n        // Removes function pointer\n        void Remove(const IFunction<_res_type(_args ...)>* function)\n        {\n            if (mData.typeData.type == DataType::CoupleOfFunctions)\n            {\n                auto fnd = std::find(mData.functions.begin(), mData.functions.end(), function);\n                if (fnd != mData.functions.end())\n                    mData.functions.erase(fnd);\n\n                delete function;\n            }\n        }\n\n        // Removes abstract function\n        void RemoveFunction(const IAbstractFunction* func) override \n        {\n            if (auto casted = dynamic_cast<const IFunction<_res_type(_args ...)>*>(func))\n                Remove(*casted);\n        }\n\n        // Add delegate to inside list\n        template<typename _class_type>\n        void Add(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args))\n        {\n            Emplace(std::forward<ObjFunctionPtr<_class_type, _res_type, _args ...>>(ObjFunctionPtr<_class_type, _res_type, _args ...>(object, functionPtr)));\n        }\n\n        // Add delegate to inside list\n        template<typename _class_type>\n        void Add(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args) const)\n        {\n            Emplace(std::forward<ObjConstFunctionPtr<_class_type, _res_type, _args ...>>(ObjConstFunctionPtr<_class_type, _res_type, _args ...>(object, functionPtr)));\n        }\n\n        // Add delegate to inside list\n        void Add(const Function& func)\n        {\n            if (func.mData.typeData.type == DataType::OneFunction)\n                Add(func.OneFunctionRef());\n            else if (func.mData.typeData.type == DataType::CoupleOfFunctions)\n            {\n                for (auto& x : func.mData.functions)\n                    Add(*x);\n            }\n        }\n\n        // Remove delegate from list\n        void Remove(const Function& func)\n        {\n            if (func.mData.typeData.type == DataType::OneFunction)\n                Remove(func.OneFunctionRef());\n            else if (func.mData.typeData.type == DataType::CoupleOfFunctions)\n            {\n                for (auto& x : func.mData.functions)\n                    Remove(*x);\n            }\n        }\n\n        // Remove delegate from list\n        template<typename _class_type>\n        void Remove(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args))\n        {\n            Remove(ObjFunctionPtr<_class_type, _res_type, _args ...>(object, functionPtr));\n        }\n\n        // Remove delegate from list\n        template<typename _class_type>\n        void Remove(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args) const)\n        {\n            Remove(ObjConstFunctionPtr<_class_type, _res_type, _args ...>(object, functionPtr));\n        }\n\n        // Returns true, if this contains the delegate\n        bool Contains(const IFunction<_res_type(_args ...)>& func) const\n        {\n            if (mData.typeData.type == DataType::OneFunction)\n                return OneFunctionRef().Equals(&func);\n            else if (mData.typeData.type == DataType::CoupleOfFunctions)\n            {\n                for (auto& x : mData.functions)\n                {\n                    if (x->Equals(&func))\n                        return true;\n                }\n            }\n\n            return false;\n        }\n\n        // Invokes function with arguments as functor\n        _res_type operator()(_args ... args) const\n        {\n            return Invoke(args ...);\n        }\n\n        // Invokes function with arguments\n        _res_type Invoke(_args ... args) const override\n        {\n            if (mData.typeData.type == DataType::OneFunction)\n                return OneFunctionRef().Invoke(args ...);\n            else if (mData.typeData.type == DataType::CoupleOfFunctions)\n            {\n                if (mData.functions.size() == 0)\n                    return _res_type();\n\n                for (int i = 0; i < mData.functions.size() - 1; i++)\n                    mData.functions[i]->Invoke(args ...);\n\n                return mData.functions.back()->Invoke(args ...);\n            }\n\n            return _res_type();\n        }\n\n        // Copy operator\n        Function<_res_type(_args ...)>& operator=(const IFunction<_res_type(_args ...)>& func)\n        {\n            Clear();\n            Add(func);\n            return *this;\n        }\n\n        // Copy operator\n        Function<_res_type(_args ...)>& operator=(IFunction<_res_type(_args ...)>&& func)\n        {\n            Clear();\n            Emplace(func);\n            return *this;\n        }\n\n        // Copy operator\n        Function<_res_type(_args ...)>& operator=(const Function& other)\n        {\n            Clear();\n            Add(other);\n            return *this;\n        }\n\n        // Move operator\n        Function<_res_type(_args ...)>& operator=(Function&& other)\n        {\n            Clear();\n            memcpy(&mData, &other.mData, sizeof(Data));\n            other.mData.typeData.type = DataType::Empty;\n\n            return *this;\n        }\n\n        // Equal operator\n        bool operator==(const Function& other) const\n        {\n            if (mData.typeData.type == DataType::Empty)\n                return other.mData.typeData.type == DataType::Empty;\n\n            if (mData.typeData.type == DataType::OneFunction)\n            {\n                if (other.mData.typeData.type == DataType::OneFunction)\n                    return OneFunctionRef().Equals(&other.OneFunctionRef());\n                else if (other.mData.typeData.type == DataType::CoupleOfFunctions)\n                {\n                    if (other.mData.functions.size() != 1)\n                        return false;\n\n                    return OneFunctionRef().Equals(other.mData.functions[0]);\n                }\n\n                return false;\n            }\n\n            // CoupleOfFunctions\n\n            if (other.mData.typeData.type == DataType::Empty)\n                return mData.functions.empty();\n\n            if (other.mData.typeData.type == DataType::OneFunction)\n            {\n                if (mData.functions.size() != 1)\n                    return false;\n\n                return mData.functions[0]->Equals(&other.OneFunctionRef());\n            }\n\n            for (auto& func : mData.functions)\n            {\n                bool found = false;\n                for (auto& otherFunc : other.mData.functions)\n                {\n                    if (func->Equals(otherFunc))\n                    {\n                        found = true;\n                        break;\n                    }\n                }\n\n                if (!found)\n                    return false;\n            }\n\n            return true;\n        }\n\n        // Not equal operator\n        bool operator!=(const Function& other) const\n        {\n            return !(*this == other);\n        }\n\n        // Equal operator\n        bool operator==(const IFunction<_res_type(_args ...)>& func) const\n        {\n            if (mData.typeData.type == DataType::Empty)\n                return false;\n\n            if (mData.typeData.type == DataType::OneFunction)\n                return OneFunctionRef().Equals(&func);\n\n            if (mData.functions.size() != 1)\n                return false;\n\n            return mData.functions[0]->Equals(&func);\n        }\n\n        // Not equal operator\n        bool operator!=(const IFunction<_res_type(_args ...)>& func) const\n        {\n            return !(*this == func);\n        }\n\n        // Returns true, when delegates list isn't empty\n        operator bool() const\n        {\n            return IsEmpty();\n        }\n\n        // Returns true when functions is equal\n        bool Equals(const IFunction<_res_type(_args ...)>* other) const override\n        {\n            const Function* otherFuncPtr = dynamic_cast<const Function*>(other);\n            if (otherFuncPtr)\n                return *otherFuncPtr == *this;\n\n            if (mData.typeData.type == DataType::OneFunction)\n                return OneFunctionRef().Equals(other);\n\n            return false;\n        }\n\n        // Add delegate to inside list\n        Function<_res_type(_args ...)> operator+(const IFunction<_res_type(_args ...)>& func) const\n        {\n            Function<_res_type(_args ...)> res(*this);\n            res.Add(func);\n            return res;\n        }\n\n        // Add delegate to inside list\n        Function<_res_type(_args ...)>& operator+=(const IFunction<_res_type(_args ...)>& func)\n        {\n            Add(func);\n            return *this;\n        }\n\n        // Add delegate to inside list\n        Function<_res_type(_args ...)> operator+(const Function& other) const\n        {\n            Function<_res_type(_args ...)> res(*this);\n            res.Add(other);\n            return res;\n        }\n\n        // Add delegate to inside list\n        Function<_res_type(_args ...)>& operator+=(const Function& other)\n        {\n            Add(other);\n            return *this;\n        }\n\n        // Removes delegate from list\n        Function<_res_type(_args ...)> operator-(const IFunction<_res_type(_args ...)>& func) const\n        {\n            Function<_res_type(_args ...)> res(*this);\n            res.Remove(func);\n            return res;\n        }\n\n        // Removes delegate from list\n        Function<_res_type(_args ...)>& operator-=(const IFunction<_res_type(_args ...)>& func)\n        {\n            Remove(func);\n            return *this;\n        }\n\n        // Removes delegate from list\n        Function<_res_type(_args ...)> operator-(const Function& other) const\n        {\n            Function<_res_type(_args ...)> res(*this);\n            res.Remove(other);\n            return res;\n        }\n\n        // Removes delegate from list\n        Function<_res_type(_args ...)>& operator-=(const Function& other)\n        {\n            Remove(other);\n            return *this;\n        }\n\n        // Iterating over functions\n        template<typename _invocable>\n        void ForEach(const _invocable& func) const\n        {\n            if (mData.typeData.type == DataType::OneFunction)\n                func(&OneFunctionRef());\n            else if (mData.typeData.type == DataType::CoupleOfFunctions)\n            {\n                for (auto& it : mData.functions)\n                    func(it);\n            }\n        }\n\n        // Iterates over functions over an abstract interface\n        void ForEachAbstract(const IFunction<void(const IAbstractFunction*)>& func) override\n        {\n            ForEach([&](const IFunction<_res_type(_args ...)>* x) { func(dynamic_cast<const IAbstractFunction*>(x)); });\n        }\n\n        // Returns size of function\n        UInt GetSizeOf() const override\n        {\n            return sizeof(*this);\n        }\n    };\n\n    template<typename _res_type, typename ... _args>\n    const Function<_res_type(_args ...)> Function<_res_type(_args ...)>::empty;\n\n    template<typename _class_type, typename _res_type, typename ... _args>\n    Function<_res_type(_args ...)> MakeFunction(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args))\n    {\n        return Function<_res_type(_args ...)>(object, functionPtr);\n    }\n\n#define THIS_FUNC(NAME) MakeFunction(this, &thisclass::NAME)\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Function/FunctionDataValueConverter.h",
    "content": "#pragma once\n\nnamespace o2\n{\n    template<typename _res_type, typename ... _args>\n    struct DataValue::Converter<SerializableFunction<_res_type(_args ...)>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const SerializableFunction<_res_type(_args ...)>& value, DataValue& data)\n        {\n            value.ForEach([&](const IFunction<_res_type(_args ...)>* x)\n                          {\n                              if (auto serializable = dynamic_cast<const ISerializableFunction*>(x))\n                                  serializable->Serialize(data.AddElement());\n                          });\n        }\n\n        static void Read(SerializableFunction<_res_type(_args ...)>& value, const DataValue& data)\n        {\n            if (data.IsArray())\n            {\n                value.Clear();\n                for (auto& element : data)\n                {\n                    ISerializableFunction* serializable = nullptr;\n                    String type = element[\"type\"];\n                    if (type == \"ActorFunction\")\n                        serializable = mnew ActorSubscription<_res_type(_args ...)>();\n                    //                     else if (type == \"ComponentFunction\")\n                    //                         serializable = mnew ComponentSubscription<_res_type(_args ...)>();\n\n                    serializable->Deserialize(element);\n                    value.Add(dynamic_cast<IFunction<_res_type(_args ...)>*>(serializable));\n                }\n            }\n        }\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Function/ISerializableFunction.h",
    "content": "#pragma once\n#include \"o2/Utils/Serialization/DataValue.h\"\n\nnamespace o2\n{\n    // --------------------------------------------------------------------------\n    // The interface of the function to be serialized. This function can be saved\n    // --------------------------------------------------------------------------\n    class ISerializableFunction\n    {\n    public:\n        // Serializes a function\n        virtual void Serialize(DataValue& data) const {}\n\n        // Deserializes a function\n        virtual void Deserialize(const DataValue& data) {}\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Function/SerializableFunction.h",
    "content": "#pragma once\n#include \"o2/Utils/Serialization/DataValue.h\"\n\nnamespace o2\n{\n    template <typename UnusedType>\n    class SerializableFunction;\n\n    // -------------------------------------------------\n    // Serializable function, can add ActorSubscriptions\n    // -------------------------------------------------\n    template<typename _res_type, typename ... _args>\n    class SerializableFunction<_res_type(_args ...)> : public Function<_res_type(_args ...)>\n    {\n    public:\n        using Base = Function<_res_type(_args ...)>;\n\n    public:\n        // Constructor\n        SerializableFunction() :\n            Base()\n        {}\n\n        // Copy-constructor\n        SerializableFunction(const SerializableFunction& other) :\n            Base(other)\n        {}\n\n        // Move-constructor\n        SerializableFunction(SerializableFunction&& other) :\n            Base(other)\n        {}\n\n        // Constructor from IFunction\n        explicit SerializableFunction(const IFunction<_res_type(_args ...)>& func) :\n            Base(func)\n        {}\n\n        // Constructor from IFunction\n        explicit SerializableFunction(IFunction<_res_type(_args ...)>&& func) :\n            Base(std::move(func))\n        {}\n\n        // Constructor from static function pointer\n        template<typename _static_func_type, typename enable = typename std::enable_if<std::is_function<_static_func_type>::value>::type>\n        explicit SerializableFunction(const _static_func_type* func) :\n            Base(func)\n        {}\n\n        // Constructor from lambda\n        template<typename _lambda_type, typename enable = typename std::enable_if<std::is_invocable_r<_res_type, _lambda_type, _args ...>::value && !std::is_base_of<IFunction<_res_type(_args ...)>, _lambda_type>::value>::type>\n        explicit SerializableFunction(const _lambda_type& lambda) :\n            Base(lambda)\n        {}\n\n        // Move-constructor from lambda\n        template<typename _lambda_type, typename enable = typename std::enable_if<\n            std::is_invocable_r<_res_type, _lambda_type, _args ...>::value &&\n            !std::is_base_of<IFunction<_res_type(_args ...)>, typename std::remove_reference<_lambda_type>::type>::value&&\n            std::is_rvalue_reference<_lambda_type&&>::value>::type>\n        explicit SerializableFunction(_lambda_type&& lambda) :\n            Base(lambda)\n        {}\n\n        // Constructor from object and his function\n        template<typename _class_type>\n        SerializableFunction(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args)) :\n            Base(object, functionPtr)\n        {}\n\n        // Constructor from object and his function\n        template<typename _class_type>\n        explicit SerializableFunction(const ObjFunctionPtr<_class_type, _res_type, _args ...>& func) :\n            Base(func)\n        {}\n\n        // Constructor from object and his function\n        template<typename _class_type>\n        SerializableFunction(_class_type* object, _res_type(_class_type::* functionPtr)(_args ... args) const) :\n            Base(object, functionPtr)\n        {}\n\n        // Returns cloned copy of this\n        IFunction<_res_type(_args ...)>* MakeClone() const override\n        {\n            return mnew SerializableFunction(*this);\n        }\n\n        // Returns cloned emplace copy of this in memory\n        IFunction<_res_type(_args ...)>* MakeClone(void* memory) const override\n        {\n            return new (memory) SerializableFunction(*this);\n        }\n\n        // Invokes function with arguments as functor\n        _res_type operator()(_args ... args) const\n        {\n            return Base::Invoke(args ...);\n        }\n\n        // Copy operator\n        SerializableFunction<_res_type(_args ...)>& operator=(const IFunction<_res_type(_args ...)>& func)\n        {\n            Base::operator=(func);\n            return *this;\n        }\n\n        // Copy operator\n        SerializableFunction<_res_type(_args ...)>& operator=(IFunction<_res_type(_args ...)>&& func)\n        {\n            Base::operator=(func);\n            return *this;\n        }\n\n\t\t// Copy operator\n\t\tSerializableFunction<_res_type(_args ...)>& operator=(const Function<_res_type(_args ...)>& other)\n\t\t{\n\t\t\tBase::operator=(other);\n\t\t\treturn *this;\n\t\t}\n\n\t\t// Move operator\n\t\tSerializableFunction<_res_type(_args ...)>& operator=(Function<_res_type(_args ...)>&& other)\n\t\t{\n\t\t\tBase::operator=(other);\n\t\t\treturn *this;\n\t\t}\n\n        // Copy operator\n        SerializableFunction<_res_type(_args ...)>& operator=(const SerializableFunction<_res_type(_args ...)>& other)\n        {\n            Base::operator=(other);\n            return *this;\n        }\n\n        // Move operator\n        SerializableFunction<_res_type(_args ...)>& operator=(SerializableFunction<_res_type(_args ...)>&& other)\n        {\n            Base::operator=(other);\n            return *this;\n        }\n\n        // Equal operator\n        bool operator==(const Function<_res_type(_args ...)>& other) const\n        {\n            return Base::operator==(other);\n        }\n\n        // Not equal operator\n        bool operator!=(const Function<_res_type(_args ...)>& other) const\n        {\n            return !(*this == other);\n        }\n\n        // Equal operator\n        bool operator==(const IFunction<_res_type(_args ...)>& func) const\n        {\n            return Base::operator==(func);\n        }\n\n        // Not equal operator\n        bool operator!=(const IFunction<_res_type(_args ...)>& func) const\n        {\n            return !(*this == func);\n        }\n\n        // Returns true, when delegates list isn't empty\n        operator bool() const\n        {\n            return Base::IsEmpty();\n        }\n\n        // Add delegate to inside list\n        SerializableFunction<_res_type(_args ...)> operator+(const IFunction<_res_type(_args ...)>& func) const\n        {\n            return Base::operator+(func);\n        }\n\n        // Add delegate to inside list\n        SerializableFunction<_res_type(_args ...)>& operator+=(const IFunction<_res_type(_args ...)>& func)\n        {\n            Base::operator+=(func);\n            return *this;\n        }\n\n        // Add delegate to inside list\n        SerializableFunction<_res_type(_args ...)> operator+(const Function<_res_type(_args ...)>& other) const\n        {\n            return Base::operator+(other);\n        }\n\n        // Add delegate to inside list\n        SerializableFunction<_res_type(_args ...)>& operator+=(const Function<_res_type(_args ...)>& other)\n        {\n            Base::operator+=(other);\n            return *this;\n        }\n\n        // Removes delegate from list\n        SerializableFunction<_res_type(_args ...)> operator-(const IFunction<_res_type(_args ...)>& func) const\n        {\n            return Base::operator-(func);\n        }\n\n        // Removes delegate from list\n        SerializableFunction<_res_type(_args ...)>& operator-=(const IFunction<_res_type(_args ...)>& func)\n        {\n            Base::operator-=(func);\n            return *this;\n        }\n\n        // Removes delegate from list\n        SerializableFunction<_res_type(_args ...)> operator-(const Function<_res_type(_args ...)>& other) const\n        {\n            return Base::operator-(other);\n        }\n\n        // Removes delegate from list\n        SerializableFunction<_res_type(_args ...)>& operator-=(const Function<_res_type(_args ...)>& other)\n        {\n            Base::operator-=(other);\n            return *this;\n        }\n\n        // Returns size of function\n        UInt GetSizeOf() const override\n        {\n            return sizeof(*this);\n        }\n\n        // Adds function to list\n        void AddActorSubscription() override;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Function/Subscription.h",
    "content": "#pragma once\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // ---------------------------------------------------------------------------------------------\n    // Function holder delegate, used to wrap function and destroy it when subscription is destroyed\n    // ---------------------------------------------------------------------------------------------\n    template<typename _res_type, typename ... _args>\n    class SubscriptionWrapper: public IFunction<_res_type(_args ...)>\n    {\n        Function<_res_type(_args ...)> mFunction;\n        Function<void()> mOnDestroy;\n        int* mRefs = mnew int;\n\n    public:\n        // Constructor\n        SubscriptionWrapper(const Function<_res_type(_args ...)>& function, const Function<void()>& onDestroy) :\n            mFunction(function), mOnDestroy(onDestroy)\n        {\n            (*mRefs) = 1;\n        }\n\n        // Copy-constructor\n        SubscriptionWrapper(const SubscriptionWrapper& other) :\n            mFunction(other.mFunction), mOnDestroy(other.mOnDestroy), mRefs(other.mRefs)\n        {\n            (*mRefs)++;\n        }\n\n        ~SubscriptionWrapper()\n        {\n            DecreaseRefs();\n        }\n\n        // Copy-operator\n        SubscriptionWrapper& operator=(const SubscriptionWrapper& other)\n        {\n            DecreaseRefs();\n\n            mFunction = other.mFunction;\n            mOnDestroy = other.mOnDestroy;\n            mRefs = other.mRefs;\n            (*mRefs)++;\n\n            return *this;\n        }\n\n        // Equal operator\n        bool operator==(const SubscriptionWrapper& other) const\n        {\n            return mFunction == other.mFunction;\n        }\n\n        // Not equal operator\n        bool operator!=(const SubscriptionWrapper& other) const\n        {\n            return mFunction != other.mFunction;\n        }\n\n        // Returns cloned copy of this\n        IFunction<_res_type(_args ...)>* MakeClone() const override\n        {\n            return mnew SubscriptionWrapper(*this);\n        }\n\n        // Returns cloned emplace copy of this in memory\n        IFunction<_res_type(_args ...)>* MakeClone(void* memory) const override\n        {\n            return new (memory) SubscriptionWrapper(*this);\n        }\n\n        // Invokes function with arguments as functor\n        _res_type Invoke(_args ... args) const override\n        {\n            return mFunction.Invoke(args ...);\n        }\n\n        // Returns true if functions is equal\n        bool Equals(const IFunction<_res_type(_args ...)>* other) const override\n        {\n            const SubscriptionWrapper* otherFuncPtr = dynamic_cast<const SubscriptionWrapper*>(other);\n            if (otherFuncPtr)\n                return *otherFuncPtr == *this;\n\n            return mFunction.Equals(other);\n        }\n\n        // Returns size of function\n        UInt GetSizeOf() const override\n        {\n            return sizeof(*this);\n        }\n\n    protected:\n        void DecreaseRefs()\n        {\n            (*mRefs)--;\n            if ((*mRefs) == 0)\n            {\n                mOnDestroy.Invoke();\n                delete mRefs;\n            }\n        }\n    };\n\n    // -------------------------------------------------------------------------------------\n    // Subscription holder, used to unsubscribe from function when subscription is destroyed\n    // -------------------------------------------------------------------------------------\n    class SubscriptionHolder: public RefCounterable\n    {\n    public:\n        // Default constructor\n        SubscriptionHolder(const Function<void()>& unsubscribe):\n            mUnsubscribe(unsubscribe)\n        {}\n\n        // Destructor, unsubscribe from function\n        ~SubscriptionHolder()\n        {\n            mUnsubscribe(); \n        }\n\n        // Unsubscribe from function\n        void Unsubscribe() \n        { \n            mUnsubscribe.Clear(); \n        }\n\n    private:\n        Function<void()> mUnsubscribe; // Function to unsubscribe from\n    };\n\n    // -----------------------------------------------------------------------------------------\n    // Subscription, used automatically unsubscribe from function when subscription is destroyed\n    // -----------------------------------------------------------------------------------------\n    class Subscription\n    {\n    public:\n        // Default constructor\n        Subscription() = default;\n\n        // Move constructor\n        Subscription(Subscription&& other) noexcept:\n            mSubscriptionHolder(std::move(other.mSubscriptionHolder)) \n        {}\n\n        // Constructor from subscription holder\n        Subscription(const Ref<SubscriptionHolder>& subscriptionHolder):\n            mSubscriptionHolder(subscriptionHolder) \n        {}\n\n        // Copy constructor\n        Subscription(const Subscription& other):\n            mSubscriptionHolder(other.mSubscriptionHolder) \n        {}\n\n        // Destructor, resets subscription holder, which will unsubscribe from function\n        ~Subscription()\n        {\n            mSubscriptionHolder = nullptr;\n        }\n\n        // Copy operator\n        Subscription& operator=(const Subscription& other)\n        {\n            mSubscriptionHolder = other.mSubscriptionHolder;\n            return *this;\n        }\n\n        // Move operator\n        Subscription& operator=(Subscription&& other) noexcept\n        {\n            mSubscriptionHolder = std::move(other.mSubscriptionHolder);\n            return *this;\n        }\n\n        // Equality operator\n        bool operator==(const Subscription& other) const\n        {\n            return mSubscriptionHolder == other.mSubscriptionHolder;\n        }\n        \n        // Inequality operator\n        bool operator!=(const Subscription& other) const\n        {\n            return mSubscriptionHolder != other.mSubscriptionHolder;\n        }\n\n        // Clears subscription holder, which will unsubscribe from function\n        void Clear()\n        {\n            mSubscriptionHolder = nullptr;\n        }\n\n    private:\n        Ref<SubscriptionHolder> mSubscriptionHolder; // Subscription holder\n    };\n\n    // Makes subscription for function\n    template<typename _res_type, typename ... _args>\n    Subscription MakeSubscription(Function<_res_type(_args ...)>& subscribeTo, Function<_res_type(_args ...)> function)\n    {\n        auto subscriptionHolder = mmake<SubscriptionHolder>([&subscribeTo, function]() \n            {\n                 subscribeTo -= function; \n            }\n        );\n\n        subscribeTo += SubscriptionWrapper<_res_type, _args...>(function, [subscriptionHolderWeak = WeakRef<SubscriptionHolder>(subscriptionHolder)]() \n            {\n                if (auto subscriptionHolder = subscriptionHolderWeak.Lock())\n                    subscriptionHolder->Unsubscribe(); \n            }\n        );\n\n        return Subscription(subscriptionHolder);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/ApproximationValue.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    struct ApproximationValue\n    {\n        float position;\n        float value;\n\n    public:\n        ApproximationValue() = default;\n        ApproximationValue(const Vec2F& v):position(v.x), value(v.y) {}\n\n        operator Vec2F() const { return Vec2F(position, value); }\n    };\n\n    struct ApproximationVec2F\n    {\n        float position;\n        Vec2F value;\n\n    public:\n        ApproximationVec2F() = default;\n        ApproximationVec2F(const Vec2F& value, float position):position(position), value(value) {}\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Basis.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Rect.h\"\n\nnamespace o2\n{\n    // -------------------------\n    // Basis. Just as matrix 2x3\n    // -------------------------\n    struct Basis\n    {\n        Vec2F xv, yv, origin;\n\n        inline Basis();\n        inline Basis(const Vec2F& origin, const Vec2F& xvec = Vec2F(1, 0), const Vec2F& yvec = Vec2F(0, 1));\n        inline Basis(const Vec2F& origin, float angle);\n        inline Basis(const RectF& rect);\n\n        inline bool operator==(const Basis& cbasis) const;\n        inline bool operator!=(const Basis& cbasis) const;\n\n        inline Basis& operator=(const RectF& other);\n\n        inline Basis operator*(const Basis& cbasis) const;\n        inline Vec2F operator*(const Vec2F& vec) const;\n        inline Vec2F operator/(const Vec2F& vec) const;\n\n        inline void Set(const Vec2F& origin = Vec2F(0, 0), const Vec2F& xvec = Vec2F(1, 0), const Vec2F& yvec = Vec2F(0, 1));\n        inline void Set(const Vec2F& origin, float angle);\n\n        inline float GetAngle() const;\n        inline Vec2F GetScale() const;\n        inline float GetShift() const;\n        inline float GetShiftFast(const Vec2F& scale) const;\n\n        inline void Decompose(Vec2F* origin, float* angle, Vec2F* scale, float* shift) const;\n\n        inline Basis Inverted() const;\n        inline void  Inverse();\n\n        inline void Translate(const Vec2F& voffs);\n        inline void Scale(const Vec2F& scalev);\n        inline void Rotate(float angle);\n\n        inline void  Transform(float& x, float& y) const;\n        inline Vec2F Transform(const Vec2F& vec) const;\n\n        inline RectF AABB() const;\n\n        inline bool IsPointInside(const Vec2F& point) const;\n\n        inline static Basis Identity();\n        inline static Basis Scaled(const Vec2F& scale);\n        inline static Basis Translated(const Vec2F& voffs);\n        inline static Basis Rotated(float angle);\n        inline static Basis Build(const Vec2F& position, const Vec2F& scale, float angle, float shift);\n    };\n\n    struct BasisDef\n    {\n        Vec2F mPosition;\n        Vec2F mScale;\n        float mAngle;\n        float mShift;\n\n    public:\n        inline BasisDef(const Vec2F& position = Vec2F(), const Vec2F& scale = Vec2F(1, 1), float angle = 0, float shift = 0);\n        inline BasisDef(const Basis& bas);\n\n        inline operator Basis() const;\n\n        inline Basis Build() const;\n    };\n\n    inline BasisDef Basis2Def(const Basis& bas);\n    inline Basis    Def2Basis(const BasisDef& def);\n\n    inline Vec2F operator*(const Vec2F& vec, const Basis& basis)\n    {\n        return basis.Transform(vec);\n    }\n\n    Basis::Basis() :\n        xv(1, 0), yv(0, 1), origin()\n    {}\n\n    Basis::Basis(const Vec2F& origin, const Vec2F& xvec /*= vec2f(1, 0)*/, const Vec2F& yvec /*= vec2f(0, 1)*/) :\n        xv(xvec), yv(yvec), origin(origin)\n    {}\n\n    Basis::Basis(const Vec2F& origin, float angle) :\n        origin(origin)\n    {\n        float cs = cosf(angle), sn = sinf(angle);\n        xv.Set(cs, sn);\n        yv.Set(-sn, cs);\n    }\n\n    Basis::Basis(const RectF& rect) :\n        origin(rect.LeftBottom()), xv(rect.Width(), 0.0f), yv(0.0f, rect.Height())\n    {}\n\n    bool Basis::operator==(const Basis& cbasis) const\n    {\n        return xv == cbasis.xv && yv == cbasis.yv && origin == cbasis.origin;\n    }\n\n    bool Basis::operator!=(const Basis& cbasis) const\n    {\n        return xv != cbasis.xv || yv != cbasis.yv || origin != cbasis.origin;\n    }\n\n    Basis& Basis::operator=(const RectF& other)\n    {\n        origin = other.LeftBottom();\n        xv.Set(other.Width(), 0.0f);\n        yv.Set(0.0f, other.Height());\n        return *this;\n    }\n\n    Basis Basis::operator*(const Basis& cbasis) const\n    {\n        Basis res;\n        res.xv.x = xv.x*cbasis.xv.x + xv.y*cbasis.yv.x;                               res.xv.y = xv.x*cbasis.xv.y + xv.y*cbasis.yv.y;\n        res.yv.x = yv.x*cbasis.xv.x + yv.y*cbasis.yv.x;                               res.yv.y = yv.x*cbasis.xv.y + yv.y*cbasis.yv.y;\n        res.origin.x = origin.x*cbasis.xv.x + origin.y*cbasis.yv.x + cbasis.origin.x; res.origin.y = origin.x*cbasis.xv.y + origin.y*cbasis.yv.y + cbasis.origin.y;\n        return res;\n    }\n\n    Vec2F Basis::operator*(const Vec2F& vec) const\n    {\n        Vec2F ret;\n        ret.x = xv.x*vec.x + yv.x*vec.y + origin.x;\n        ret.y = xv.y*vec.x + yv.y*vec.y + origin.y;\n        return ret;\n    }\n\n    Vec2F Basis::operator/(const Vec2F& vec) const\n    {\n        return operator*(vec.Inverted());\n    }\n\n    void Basis::Set(const Vec2F& origin /*= vec2f(0, 0)*/, const Vec2F& xvec /*= vec2f(1, 0)*/, const Vec2F& yvec /*= vec2f(0, 1)*/)\n    {\n        xv = xvec; yv = yvec;\n        this->origin = origin;\n    }\n\n    void Basis::Set(const Vec2F& origin, float angle)\n    {\n        this->origin = origin;\n        float cs = cosf(angle), sn = sinf(angle);\n        xv.Set(cs, sn);\n        yv.Set(-sn, cs);\n    }\n\n    float Basis::GetAngle() const\n    {\n        float angle = -atan2f(-xv.y, xv.x);\n        if (angle < 0)\n            return 6.283185307f + angle;\n\n        return angle;\n    }\n\n    Vec2F Basis::GetScale() const\n    {\n        return Vec2F(xv.Length(), yv.Length());\n    }\n\n    float Basis::GetShift() const\n    {\n        Vec2F scale = GetScale();\n        return GetShiftFast(scale);\n    }\n\n    float Basis::GetShiftFast(const Vec2F& scale) const\n    {\n        if (Math::Abs(scale.x) < Math::Epsilon || Math::Abs(scale.y) < Math::Epsilon)\n            return 0.0f;\n\n        float proj = yv.Dot(xv/scale.x);\n        return proj/scale.y;\n    }\n\n    void Basis::Decompose(Vec2F* origin, float* angle, Vec2F* scale, float* shift) const\n    {\n        *origin = this->origin;\n        *angle = GetAngle();\n        *scale = GetScale();\n        *shift = GetShiftFast(*scale);\n    }\n\n    Basis Basis::Inverted() const\n    {\n        float invdet = 1.0f/(xv.x*yv.y - yv.x*xv.y);\n        Basis res;\n\n        res.xv.x = yv.y*invdet;\n        res.yv.x = -yv.x*invdet;\n        res.origin.x = (yv.x*origin.y - origin.x*yv.y)*invdet;\n\n        res.xv.y = -xv.y*invdet;\n        res.yv.y = xv.x*invdet;\n        res.origin.y = -(xv.x*origin.y - origin.x*xv.y)*invdet;\n\n        return res;\n    }\n\n    void Basis::Inverse()\n    {\n        *this = Inverted();\n    }\n\n    void Basis::Translate(const Vec2F& voffs)\n    {\n        origin += voffs;\n    }\n\n    void Basis::Scale(const Vec2F& scalev)\n    {\n        xv *= scalev.x;\n        yv *= scalev.y;\n    }\n\n    void Basis::Rotate(float angle)\n    {\n        float cs = cosf(angle), sn = sinf(angle);\n\n        Vec2F nxv(cs*xv.x - sn*xv.y, sn*xv.x + cs*xv.y);\n        Vec2F nyv(cs*yv.x - sn*yv.y, sn*yv.x + cs*yv.y);\n\n        xv = nxv; yv = nyv;\n    }\n\n    void Basis::Transform(float& x, float& y) const\n    {\n        float lx = x, ly = y;\n        x = xv.x*lx + yv.x*ly + origin.x;\n        y = xv.y*lx + yv.y*ly + origin.y;\n    }\n\n    Vec2F Basis::Transform(const Vec2F& vec) const\n    {\n        return Vec2F(xv.x*vec.x + yv.x*vec.y + origin.x, xv.y*vec.x + yv.y*vec.y + origin.y);\n    }\n\n    RectF Basis::AABB() const\n    {\n        Vec2F points[4] =\n        {\n            origin, origin + xv, origin + yv, origin + xv + yv\n        };\n\n        return RectF::Bound(points, 4);\n    }\n\n    bool Basis::IsPointInside(const Vec2F& point) const\n    {\n        Vec2F rs(xv.Length(), yv.Length());\n        Vec2F nx = xv / rs.x, ny = yv / rs.y;\n        Vec2F lp = point - origin;\n\n        float dx = lp.Dot(nx);\n        float dy = lp.Dot(ny);\n\n        return dx >= 0.0f && dx <= rs.x && dy >= 0.0f && dy < rs.y;\n    }\n\n    Basis Basis::Identity()\n    {\n        return Basis(Vec2F(0, 0), Vec2F(1, 0), Vec2F(0, 1));\n    }\n\n    Basis Basis::Scaled(const Vec2F& scale)\n    {\n        return Basis(Vec2F(0, 0), Vec2F(scale.x, 0), Vec2F(0, scale.y));\n    }\n\n    Basis Basis::Translated(const Vec2F& voffs)\n    {\n        return Basis(voffs, Vec2F(1, 0), Vec2F(0, 1));\n    }\n\n    Basis Basis::Rotated(float angle)\n    {\n        float cs = cosf(angle), sn = sinf(angle);\n        return Basis(Vec2F(0, 0), Vec2F(cs, sn), Vec2F(-sn, cs));\n    }\n\n    Basis Basis::Build(const Vec2F& position, const Vec2F& scale, float angle, float shift)\n    {\n        float sn = sinf(angle), cs = cosf(angle), sshift = Math::Sqrt(1.0f - shift*shift);\n        Vec2F x(scale.x*cs, sn*scale.x), y(-sn*scale.y, cs*scale.y);\n        y = y.Rotate(sshift, -shift);\n        return Basis(position, x, y);\n    }\n\n\n    BasisDef::BasisDef(const Vec2F& position /*= vec2f()*/, const Vec2F& scale /*= vec2f(1, 1)*/, float angle /*= 0*/,\n                       float shift /*= 0*/) :\n        mPosition(position), mScale(scale), mAngle(angle), mShift(shift)\n    {}\n\n    BasisDef::BasisDef(const Basis& bas)\n    {\n        bas.Decompose(&mPosition, &mAngle, &mScale, &mShift);\n    }\n\n    BasisDef::operator Basis() const\n    {\n        return Build();\n    }\n\n    Basis BasisDef::Build() const\n    {\n        return Basis::Build(mPosition, mScale, mAngle, mShift);\n    }\n\n\n    BasisDef Basis2Def(const Basis& bas)\n    {\n        return BasisDef(bas);\n    }\n\n    Basis Def2Basis(const BasisDef& def)\n    {\n        return def.Build();\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Border.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    template<typename T>\n    struct Border\n    {\n        T left, bottom, right, top;\n\n        inline Border();\n        inline Border(T left, T bottom, T right, T top);\n\n        template<typename T2>\n        inline Border(const Border<T2>& other);\n\n        inline bool operator==(const Border<T>& other) const;\n        inline bool operator!=(const Border<T>& other) const;\n\n        inline Border<T> operator+(const Border<T>& other);\n        inline Border<T> operator-(const Border<T>& other);\n        inline Border<T> operator/(const Border<T>& other);\n        inline Border<T> operator*(const Border<T>& other);\n\n        inline Vec2<T> LeftTop() const;\n        inline Vec2<T> LeftBottom() const;\n        inline Vec2<T> RightTop() const;\n        inline Vec2<T> RightBottom() const;\n    };\n\n    using BorderF = Border<float>;\n    using BorderI = Border<int>;\n\n    template<typename T>\n    Border<T>::Border():left(0), bottom(0), right(0), top(0) {}\n\n    template<typename T>\n    Border<T>::Border(T left, T bottom, T right, T top):left(left), bottom(bottom), right(right), top(top) {}\n\n    template<typename T>\n    template<typename T2>\n    Border<T>::Border(const Border<T2>& other) : left((T)other.left), bottom((T)other.bottom), right((T)other.right), top((T)other.top) {}\n\n    template<typename T>\n    bool Border<T>::operator==(const Border<T>& other) const\n    {\n        return Math::Equals(left, other.left) && Math::Equals(bottom, other.bottom) &&\n            Math::Equals(right, other.right) && Math::Equals(top, other.top);\n    }\n\n    template<typename T>\n    bool Border<T>::operator!=(const Border<T>& other) const\n    {\n        return !(*this == other);\n    }\n\n    template<typename T>\n    Border<T> Border<T>::operator+(const Border<T>& other)\n    {\n        left   += other.left;\n        right  += other.right;\n        bottom += other.bottom;\n        top    += other.top;\n\n        return *this;\n    }\n\n    template<typename T>\n    Border<T> Border<T>::operator-(const Border<T>& other)\n    {\n        left   -= other.left;\n        right  -= other.right;\n        bottom -= other.bottom;\n        top    -= other.top;\n\n        return *this;\n    }\n\n    template<typename T>\n    Border<T> Border<T>::operator/(const Border<T>& other)\n    {\n        left   /= other.left;\n        right  /= other.right;\n        bottom /= other.bottom;\n        top    /= other.top;\n\n        return *this;\n    }\n\n    template<typename T>\n    Border<T> Border<T>::operator*(const Border<T>& other)\n    {\n        left   *= other.left;\n        right  *= other.right;\n        bottom *= other.bottom;\n        top    *= other.top;\n\n        return *this;\n    }\n\n    template<typename T>\n    Vec2<T> Border<T>::RightBottom() const\n    {\n        return Vec2<T>(right, bottom);\n    }\n\n    template<typename T>\n    Vec2<T> Border<T>::RightTop() const\n    {\n        return Vec2<T>(right, top);\n    }\n\n    template<typename T>\n    Vec2<T> Border<T>::LeftBottom() const\n    {\n        return Vec2<T>(left, bottom);\n    }\n\n    template<typename T>\n    Vec2<T> Border<T>::LeftTop() const\n    {\n        return Vec2<T>(left, top);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Color.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Color.h\"\n\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n\nnamespace o2\n{\n    Color4::Color4():\n        r(255), g(255), b(255), a(255)\n    {}\n\n    Color4::Color4(int r, int g, int b, int a) :\n        r(r), g(g), b(b), a(a)\n    {}\n\n    Color4::Color4(float r, float g, float b, float a)\n    {\n        this->r = (int)(r*255.0f);\n        this->g = (int)(g*255.0f);\n        this->b = (int)(b*255.0f);\n        this->a = (int)(a*255.0f);\n    }\n\n    Color4::Color4(const b2Color& color):\n        Color4(color.r, color.g, color.b, 1.0f)\n    {}\n\n    Color4::operator b2Color() const\n    {\n        return b2Color(RF(), GF(), BF());\n    }\n\n    bool Color4::operator==(const Color4& color) const\n    {\n        return a == color.a && r == color.r && g == color.g && b == color.b;\n    }\n\n    bool Color4::operator!=(const Color4& color) const\n    {\n        return a != color.a || r != color.r || g != color.g || b != color.b;\n    }\n\n    Color4 Color4::operator+(const Color4& v) const\n    {\n        return Color4(r + v.r, g + v.g, b + v.b, a + v.a);\n    }\n\n    Color4 Color4::operator+=(const Color4& v)\n    {\n        r += v.r; g += v.g; b += v.b; a += v.a;\n        return *this;\n    }\n\n    Color4 Color4::operator-(const Color4& v) const\n    {\n        return Color4(r - v.r, g - v.g, b - v.b, a - v.a);\n    }\n\n    Color4 Color4::operator-=(const Color4& v)\n    {\n        r -= v.r; g -= v.g; b -= v.b; a -= v.a;\n        return *this;\n    }\n\n    Color4 Color4::operator*(float v) const\n    {\n        return Color4((int)((float)r*v), (int)((float)g*v), (int)((float)b*v), (int)((float)a*v));\n    }\n\n    Color4 Color4::operator*=(float v)\n    {\n        *this = (*this)*v;\n        return *this;\n    }\n\n    Color4 Color4::operator/(float v) const\n    {\n        return *this*(1.0f/v);\n    }\n\n    Color4 Color4::operator/=(float v)\n    {\n        *this = *this/v;\n        return *this;\n    }\n\n    Color4 Color4::operator*(const Color4& v) const\n    {\n        return Color4(r*v.r/255, g*v.g/255, b*v.b/255, a*v.a/255);\n    }\n\n    Color4 Color4::operator/(const Color4& v) const\n    {\n        return Color4((int)(255.0f*(RF()/v.RF())), (int)(255.0f*(GF()/v.GF())),\n                      (int)(255.0f*(BF()/v.BF())), (int)(255.0f*(AF()/v.AF())));\n    }\n\n    Color4 Color4::operator/=(const Color4& v)\n    {\n        *this = *this/v;\n        return *this;\n    }\n\n    Color4 Color4::operator*=(const Color4& v)\n    {\n        *this = *this*v;\n        return *this;\n    }\n\n    float Color4::RF() const\n    {\n        return (float)r/255.0f;\n    }\n\n    float Color4::GF() const\n    {\n        return (float)g/255.0f;\n    }\n\n    float Color4::BF() const\n    {\n        return (float)b/255.0f;\n    }\n\n    float Color4::AF() const\n    {\n        return (float)a/255.0f;\n    }\n\n    void Color4::SetRF(float value)\n    {\n        r = (int)(value*255.0f);\n    }\n\n    void Color4::SetGF(float value)\n    {\n        g = (int)(value*255.0f);\n    }\n\n    void Color4::SetBF(float value)\n    {\n        b = (int)(value*255.0f);\n    }\n\n    void Color4::SetAF(float value)\n    {\n        a = (int)(value*255.0f);\n    }\n\n    float Color4::GetF(int i) const\n    {\n        return (float)(*(int*)(this + sizeof(int)*i))/255.0f;\n    }\n\n    int& Color4::Get(int i) const\n    {\n        return (*(int*)(this + sizeof(int)*i));\n    }\n\n    void Color4::Normalize()\n    {\n        r = Math::Clamp(r, 0, 255);\n        g = Math::Clamp(g, 0, 255);\n        b = Math::Clamp(b, 0, 255);\n        a = Math::Clamp(a, 0, 255);\n    }\n\n    Color4 Color4::Normalized() const\n    {\n        return Color4(Math::Clamp(r, 0, 255),\n                      Math::Clamp(g, 0, 255),\n                      Math::Clamp(b, 0, 255),\n                      Math::Clamp(a, 0, 255));\n    }\n\n    Color32Bit Color4::ARGB() const\n    {\n        return (Color32Bit)((a << 24) | (r << 16) | (g << 8) | b);\n    }\n\n    Color32Bit Color4::ABGR() const\n    {\n        return (Color32Bit)((a << 24) | (b << 16) | (g << 8) | r);\n    }\n\n    Color32Bit Color4::RGBA() const\n    {\n        return (Color32Bit)((r << 24) | (g << 16) | (b << 8) | a);\n    }\n\n    void Color4::SetARGB(Color32Bit color)\n    {\n        a = (int)(color >> 24);\n        r = (int)((color << 8) >> 24);\n        g = (int)((color << 16) >> 24);\n        b = (int)((color << 24) >> 24);\n    }\n\n    void Color4::SetABGR(Color32Bit color)\n    {\n        a = (int)(color >> 24);\n        b = (int)((color << 8) >> 24);\n        g = (int)((color << 16) >> 24);\n        r = (int)((color << 24) >> 24);\n    }\n\n    void Color4::SetRGBA(Color32Bit color)\n    {\n        r = (int)(color >> 24);\n        g = (int)((color << 8) >> 24);\n        b = (int)((color << 16) >> 24);\n        a = (int)((color << 24) >> 24);\n    }\n\n    void Color4::SetHSL(float hue, float saturation, float lightness)\n    {\n        if (saturation == 0)\n        {\n            r = (int)(lightness*255.0f);\n            g = (int)(lightness*255.0f);\n            b = (int)(lightness*255.0f);\n        }\n        else\n        {\n            auto hue2rgb = [](float p, float q, float t)\n            {\n                if (t < 0.0f) t += 1.0f;\n                if (t > 1.0f) t -= 1.0f;\n                if (t < 1.0f/6.0f) return p + (q - p)*6.0f * t;\n                if (t < 1.0f/2.0f) return q;\n                if (t < 2.0f/3.0f) return p + (q - p)*(2.0f/3.0f - t)*6.0f;\n                return p;\n            };\n\n            float q = lightness < 0.5f ? lightness*(1.0f + saturation) : lightness + saturation - lightness*saturation;\n            float p = 2.0f*lightness - q;\n\n            r = (int)(hue2rgb(p, q, hue + 1.0f/3.0f)*255.0f);\n            g = (int)(hue2rgb(p, q, hue)*255.0f);\n            b = (int)(hue2rgb(p, q, hue - 1.0f/3.0f)*255.0f);\n        }\n    }\n\n    void Color4::ToHSL(float& hue, float& saturation, float& lightness) const \n    {\n        float r = this->r/255.0f;\n        float g = this->g/255.0f;\n        float b = this->b/255.0f;\n\n        float max = Math::Max(r, Math::Max(g, b)), min = Math::Min(r, Math::Min(g, b));\n        lightness = (max + min)*0.5f;\n\n        if (Math::Equals(max, min))\n            hue = saturation = 0;\n        else\n        {\n            float d = max - min;\n            saturation = lightness > 0.5f ? d / (2.0f - max - min) : d / (max + min);\n\n            if (Math::Equals(max, r))\n                hue = (g - b) / d + (g < b ? 6 : 0);\n            else if (Math::Equals(max, g))\n                hue = (b - r) / d + 2;\n            else if (Math::Equals(max, b))\n                hue = (r - g) / d + 4;\n\n            hue /= 6.0f;\n        }\n    }\n\n    Color4& Color4::ChangeHue(float offset)\n    {\n        float h, s, l;\n        ToHSL(h, s, l);\n        h = Math::Mod(h + offset, 1.0f);\n        SetHSL(h, s, l);\n\n        return *this;\n    }\n\n    Color4& Color4::ChangeSaturation(float offset)\n    {\n        float h, s, l;\n        ToHSL(h, s, l);\n        s = Math::Clamp(s + offset, 0.0f, 1.0f);\n        SetHSL(h, s, l);\n\n        return *this;\n    }\n\n    Color4& Color4::ChangeLightness(float offset)\n    {\n        float h, s, l;\n        ToHSL(h, s, l);\n        l = Math::Clamp(l + offset, 0.0f, 1.0f);\n        SetHSL(h, s, l);\n\n        return *this;\n    }\n\n    Color4 Color4::BlendByAlpha(const Color4& other)\n    {\n        float a1 = AF(), a2 = other.AF();\n        float inva1 = 1.0f - a1;\n\n        return Color4(int(a1*(float)r + a2*inva1*(float)other.r),\n                      int(a1*(float)g + a2*inva1*(float)other.g),\n                      int(a1*(float)b + a2*inva1*(float)other.b),\n                      int(255.0f*(a1 + a2*inva1)));\n    }\n\n    Color4 Color4::White()\n    {\n        return Color4(255, 255, 255, 255);\n    }\n\n    Color4 Color4::Black()\n    {\n        return Color4(0, 0, 0, 255);\n    }\n\n    Color4 Color4::Red()\n    {\n        return Color4(255, 0, 0, 255);\n    }\n\n    Color4 Color4::Blue()\n    {\n        return Color4(0, 0, 255, 255);\n    }\n\n    Color4 Color4::Green()\n    {\n        return Color4(0, 255, 0, 255);\n    }\n\n    Color4 Color4::Gray()\n    {\n        return Color4(150, 150, 150, 255);\n    }\n\n    Color4 Color4::HSL(float hue, float saturation, float lightness, float alpha /*= 1.0f*/)\n    {\n        Color4 res;\n        res.SetHSL(hue, saturation, lightness);\n        res.SetAF(alpha);\n\n        return res;\n    }\n\n    Color4 Color4::SomeColor(int idx, int alpha /*= 255*/)\n    {\n        Color4 res = Color4::White();\n\n        float fi = (float)idx;\n        float cornersOnCircle = 3;\n        float cycleOffset = 0.11f;\n        float startOffset = 0.25f;\n\n        float currCorner = Math::Mod(fi, cornersOnCircle)/cornersOnCircle;\n        float currCycle = Math::Floor(fi/cornersOnCircle);\n        res.SetHSL(Math::Mod(startOffset + currCorner + currCycle*cycleOffset, 1.0f), 0.7f, 0.6f);\n        res.a = alpha;\n        return res;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Color.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Math/Math.h\"\n#include \"Box2D/Common/b2Draw.h\"\n\nnamespace o2\n{\n    class DataValue;\n\n    class Color4\n    {\n    public:\n        int r, g, b, a;\n\n    public:\n        Color4();\n        Color4(int r, int g, int b, int a = 255);\n        Color4(float r, float g, float b, float a = 1.0f);\n        Color4(const b2Color& color);\n\n        operator b2Color() const;\n        \n        bool operator==(const Color4& color) const;\n        bool operator!=(const Color4& color) const;\n\n        Color4 operator+(const Color4& v) const;\n        Color4 operator+=(const Color4& v);\n\n        Color4 operator-(const Color4& v) const;\n        Color4 operator-=(const Color4& v);\n\n        Color4 operator*(float v) const;\n        Color4 operator*=(float v);\n\n        Color4 operator/(float v) const;\n        Color4 operator/=(float v);\n\n        Color4 operator*(const Color4& v) const;\n        Color4 operator*=(const Color4& v);\n\n        Color4 operator/(const Color4& v) const;\n        Color4 operator/=(const Color4& v);\n\n        float RF() const;\n        float GF() const;\n        float BF() const;\n        float AF() const;\n\n        void SetRF(float value);\n        void SetGF(float value);\n        void SetBF(float value);\n        void SetAF(float value);\n\n        float GetF(int i) const;\n        int&  Get(int i) const;\n\n        void   Normalize();\n        Color4 Normalized() const;\n\n        Color32Bit ARGB() const;\n        Color32Bit ABGR() const;\n        Color32Bit RGBA() const;\n\n        void SetARGB(Color32Bit color);\n        void SetABGR(Color32Bit color);\n        void SetRGBA(Color32Bit color);\n\n        void SetHSL(float hue, float saturation, float lightness);\n        void ToHSL(float& hue, float& saturation, float& lightness) const;\n\n        Color4& ChangeHue(float offset);\n        Color4& ChangeSaturation(float offset);\n        Color4& ChangeLightness(float offset);\n\n        Color4 BlendByAlpha(const Color4& other);\n\n        static Color4 White();\n        static Color4 Black();\n        static Color4 Red();\n        static Color4 Blue();\n        static Color4 Green();\n        static Color4 Gray();\n        static Color4 HSL(float hue, float saturation, float lightness, float alpha = 1.0f);\n        static Color4 SomeColor(int idx, int alpha = 255);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/ColorGradient.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ColorGradient.h\"\n\n#include \"o2/Utils/Math/Interpolation.h\"\n#include \"o2/Utils/Tools/KeySearch.h\"\n\nnamespace o2\n{\n    ColorGradient::ColorGradient():\n        ColorGradient(Color4::White(), Color4::White())\n    { }\n\n    ColorGradient::ColorGradient(const Color4& beginColor, const Color4& endColor)\n    {\n        mKeys.Add(Key(beginColor, 0.0f));\n        mKeys.Add(Key(endColor, 1.0f));\n    }\n\n    ColorGradient::ColorGradient(const Vector<Pair<float, Color4>>& values)\n    {\n        AppendKeys(values);\n    }\n\n    ColorGradient::ColorGradient(const ColorGradient& other) :\n        mKeys(other.mKeys)\n    { }\n\n    bool ColorGradient::operator!=(const ColorGradient& other) const\n    {\n        return !(*this == other);\n    }\n\n    bool ColorGradient::operator==(const ColorGradient& other) const\n    {\n        if (mKeys.Count() != other.mKeys.Count())\n            return false;\n\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i] != other.mKeys[i])\n                return false;\n        }\n\n        return true;\n    }\n\n    ColorGradient& ColorGradient::operator=(const ColorGradient& other)\n    {\n        mKeys = other.mKeys;\n        onKeysChanged();\n\n        return *this;\n    }\n\n    ColorGradient& ColorGradient::operator+=(const ColorGradient& other)\n    {\n        AppendCurve(other);\n        return *this;\n    }\n\n    Color4 ColorGradient::Evaluate(float position) const\n    {\n        int cacheKey = 0;\n        return Evaluate(position, true, cacheKey);\n    }\n\n    Color4 ColorGradient::Evaluate(float position, bool direction, int& cacheKey) const\n    {\n        int count = mKeys.Count();\n\n        if (count == 1)\n            return mKeys[0].color;\n        else if (count == 0)\n            return Color4();\n\n        int prevCacheKey = cacheKey;\n        int keyLeftIdx = -1, keyRightIdx = -1;\n        SearchKey(mKeys, count, position, keyLeftIdx, keyRightIdx, direction, cacheKey);\n\n        if (keyLeftIdx < 0)\n            return Color4();\n\n        const Key& leftKey = mKeys[keyLeftIdx];\n        const Key& rightKey = mKeys[keyRightIdx];\n\n        float dist = rightKey.position - leftKey.position;\n        float coef = (position - leftKey.position) / dist;\n\n        return Math::Lerp(leftKey.color, rightKey.color, coef);\n    }\n\n    void ColorGradient::MoveKeys(float offset)\n    {\n        for (auto& key : mKeys)\n            key.position += offset;\n\n        onKeysChanged();\n    }\n\n    void ColorGradient::MoveKeysFrom(float begin, float offset)\n    {\n        for (auto& key : mKeys)\n        {\n            if (key.position >= begin)\n                key.position += offset;\n        }\n\n        onKeysChanged();\n    }\n\n    void ColorGradient::AppendCurve(const ColorGradient& gradient)\n    {\n        AppendKeys(gradient.mKeys);\n    }\n\n    void ColorGradient::PrependCurve(const ColorGradient& gradient)\n    {\n        PrependKeys(gradient.mKeys);\n    }\n\n    void ColorGradient::InsertCurve(const ColorGradient& gradient, float position)\n    {\n        InsertKeys(gradient.mKeys, position);\n    }\n\n    void ColorGradient::AppendKeys(const Vector<Pair<float, Color4>>& values)\n    {\n        AppendKeys(values.Convert<Key>([=](const Pair<float, Color4>& v) { return Key(v.second, v.first); }));\n    }\n\n    void ColorGradient::AppendKeys(const Vector<Key>& keys)\n    {\n        if (keys.IsEmpty())\n            return;\n\n        float offset = (mKeys.IsEmpty() ? 0.0f : mKeys.Last().position) - keys[0].position;\n\n        for (auto key : keys)\n        {\n            key.position += offset;\n            mKeys.Add(key);\n        }\n\n        onKeysChanged();\n    }\n\n    void ColorGradient::PrependKeys(const Vector<Pair<float, Color4>>& values)\n    {\n        PrependKeys(values.Convert<Key>([=](const Pair<float, Color4>& v) { return Key(v.second, v.first); }));\n    }\n\n    void ColorGradient::PrependKeys(const Vector<Key>& keys)\n    {\n        if (keys.IsEmpty())\n            return;\n\n        float currentBegin = mKeys.IsEmpty() ? 0.0f : mKeys[0].position;\n        float offset = keys.Last().position - Math::Min(currentBegin, 0.0f);\n\n        for (int i = 0; i < mKeys.Count(); i++)\n            mKeys[i].position += offset;\n\n        mKeys.Insert(keys, 0);\n\n        onKeysChanged();\n    }\n\n    void ColorGradient::InsertKeys(const Vector<Pair<float, Color4>>& values, float position)\n    {\n        InsertKeys(values.Convert<Key>([=](const Pair<float, Color4>& v) { return Key(v.second, v.first); }), position);\n    }\n\n    void ColorGradient::InsertKeys(const Vector<Key>& keys, float position)\n    {\n        if (keys.IsEmpty())\n            return;\n\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        mKeys.Insert(keys, pos);\n\n        float insertOffset = position - keys[0].position;\n        for (int i = 0; i < keys.Count(); i++)\n            mKeys[i + pos].position += insertOffset;\n\n        float offset = keys.Last().position - keys[0].position;\n        for (int i = pos + keys.Count(); i < mKeys.Count(); i++)\n            mKeys[i].position += offset;\n\n        onKeysChanged();\n    }\n\n    int ColorGradient::InsertKey(const Key& key)\n    {\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > key.position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        pos = Math::Clamp(pos, 0, mKeys.Count());\n        mKeys.Insert(key, pos);\n\n        onKeysChanged();\n\n        return pos;\n    }\n\n    int ColorGradient::InsertKey(float position, const Color4& value)\n    {\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        pos = Math::Clamp(pos, 0, mKeys.Count());\n        mKeys.Insert(Key(value, position), pos);\n\n        onKeysChanged();\n\n        return pos;\n    }\n\n    int ColorGradient::AppendKey(float offset, const Color4& value)\n    {\n        mKeys.Add(Key(value, (mKeys.IsEmpty() ? 0.0f : mKeys.Last().position) + offset));\n        onKeysChanged();\n        return mKeys.Count() - 1;\n    }\n\n    int ColorGradient::PrependKey(float offset, const Color4& value)\n    {\n        float begin = mKeys.IsEmpty() ? 0.0f : mKeys[0].position;\n\n        for (auto& key : mKeys)\n            key.position += offset;\n\n        mKeys.Add(Key(value, begin));\n\n        onKeysChanged();\n\n        return 0;\n    }\n\n    ColorGradient::Key ColorGradient::GetKey(float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return key;\n        }\n\n        return Key();\n    }\n\n    ColorGradient::Key ColorGradient::GetKeyAt(int idx) const\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return Key();\n\n        return mKeys[idx];\n    }\n\n    ColorGradient::Key ColorGradient::FindKey(UInt64 uid) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return key;\n        }\n\n        return Key();\n    }\n\n    int ColorGradient::FindKeyIdx(UInt64 uid) const\n    {\n        int idx = 0;\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return idx;\n\n            idx++;\n        }\n\n        return -1;\n    }\n\n    bool ColorGradient::RemoveKey(float position)\n    {\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (Math::Equals(mKeys[i].position, position))\n            {\n                mKeys.RemoveAt(i);\n                onKeysChanged();\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    bool ColorGradient::RemoveKeyAt(int idx)\n    {\n        if (idx < 0 || idx >= mKeys.Count())\n            return false;\n\n        mKeys.RemoveAt(idx);\n        onKeysChanged();\n\n        return true;\n    }\n\n    void ColorGradient::RemoveAllKeys()\n    {\n        mKeys.Clear();\n        onKeysChanged();\n    }\n\n    bool ColorGradient::ContainsKey(float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return true;\n        }\n\n        return false;\n    }\n\n    const Vector<ColorGradient::Key>& ColorGradient::GetKeys() const\n    {\n        return mKeys;\n    }\n\n    void ColorGradient::SetKeys(const Vector<Key>& keys)\n    {\n        mKeys = keys;\n        SortKeys();\n        onKeysChanged();\n    }\n\n    void ColorGradient::SetKey(const Key& key, int idx)\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return;\n\n        mKeys[idx] = key;\n        SortKeys();\n        onKeysChanged();\n    }\n\n    float ColorGradient::Length() const\n    {\n        if (mKeys.Count() == 0)\n            return 0.0f;\n\n        return mKeys.Last().position;\n    }\n\n    bool ColorGradient::IsEmpty() const\n    {\n        return mKeys.Count() == 0;\n    }\n\n    ColorGradient::Key ColorGradient::operator[](float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return key;\n        }\n\n        return Key();\n    }\n\n    void ColorGradient::SortKeys()\n    {\n        mKeys.Sort([](const Key& a, const Key& b) { return a.position < b.position; });\n    }\n\n    ColorGradient::Key::Key() :\n        uid(Math::Random()), color(), position(0)\n    { }\n\n    ColorGradient::Key::Key(const Color4& value, float position) :\n        uid(Math::Random()), color(value), position(position)\n    { }\n\n    ColorGradient::Key::Key(const Key& other) :\n        uid(other.uid), color(other.color), position(other.position)\n    { }\n\n    ColorGradient::Key::operator Color4() const\n    {\n        return color;\n    }\n\n    ColorGradient::Key& ColorGradient::Key::operator=(const Color4& value)\n    {\n        this->color = value;\n        return *this;\n    }\n\n    ColorGradient::Key& ColorGradient::Key::operator=(const Key& other)\n    {\n        uid = other.uid;\n        color = other.color;\n        position = other.position;\n\n        return *this;\n    }\n\n    bool ColorGradient::Key::operator!=(const Key& other) const\n    {\n        return !(*this == other);\n    }\n\n    bool ColorGradient::Key::operator==(const Key& other) const\n    {\n        return Math::Equals(position, other.position) && Math::Equals(color, other.color);\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ColorGradient, o2__ColorGradient);\n\nDECLARE_CLASS(o2::ColorGradient::Key, o2__ColorGradient__Key);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/ColorGradient.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/Attributes/ScriptableAttribute.h\"\n#include \"o2/Utils/Math/ApproximationValue.h\"\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    // --------------\n    // Color gradient\n    // --------------\n    class ColorGradient: public ISerializable, public RefCounterable\n    {\n    public:\n        class Key;\n\n    public:\n        PROPERTIES(ColorGradient);\n        PROPERTY(Vector<Key>, keys, SetKeys, GetKeys); // Keys property\n        GETTER(float, length, Length);                 // Max position getter\n\n    public:\n        Function<void()> onKeysChanged; // Keys changed event\n\n    public:\n        // Default constructor @SCRIPTABLE\n        ColorGradient();\n\n        // Constructor by two colors\n        ColorGradient(const Color4& beginColor, const Color4& endColor);\n\n        // Constructor from colors list\n        explicit ColorGradient(const Vector<Pair<float, Color4>>& values);\n\n        // Copy-constructor\n        ColorGradient(const ColorGradient& other);\n\n        // Is equals operator\n        bool operator==(const ColorGradient& other) const;\n\n        // Is not equals operator\n        bool operator!=(const ColorGradient& other) const;\n\n        // Assign operator\n        ColorGradient& operator=(const ColorGradient& other);\n\n        // Append other gradient at end\n        ColorGradient& operator+=(const ColorGradient& other);\n\n        // Returns value by position @SCRIPTABLE\n        Color4 Evaluate(float position) const;\n\n        // Returns value by position\n        Color4 Evaluate(float position, bool direction, int& cacheKey) const;\n\n        // Moves all keys positions to offset\n        void MoveKeys(float offset);\n\n        // Moves keys from begin position positions to offset\n        void MoveKeysFrom(float begin, float offset);\n\n        // Appends gradient at end\n        void AppendCurve(const ColorGradient& gradient);\n\n        // Prepends gradient at end\n        void PrependCurve(const ColorGradient& gradient);\n\n        // Inserts gradient at position\n        void InsertCurve(const ColorGradient& gradient, float position);\n\n        // Adds keys at end\n        void AppendKeys(const Vector<Pair<float, Color4>>& values);\n\n        // Adds keys at end\n        void AppendKeys(const Vector<Key>& keys);\n\n        // Adds keys at beginning\n        void PrependKeys(const Vector<Pair<float, Color4>>& values);\n\n        // Adds keys at beginning\n        void PrependKeys(const Vector<Key>& keys);\n\n        // Inserts keys at position\n        void InsertKeys(const Vector<Pair<float, Color4>>& values, float position);\n\n        // Inserts keys at position\n        void InsertKeys(const Vector<Key>& keys, float position);\n\n        // Inserts key and returns index\n        int InsertKey(const Key& key);\n\n        // Inserts key and returns index\n        int InsertKey(float position, const Color4& value);\n\n        // Appends key at end with offset and returns index\n        int AppendKey(float offset, const Color4& value);\n\n        // Prepends key at beginning with offset and returns index\n        int PrependKey(float offset, const Color4& value);\n\n        // Removes key at position\n        bool RemoveKey(float position);\n\n        // Removes key at index\n        bool RemoveKeyAt(int idx);\n\n        // Removes all keys\n        void RemoveAllKeys();\n\n        // Returns true if contains key at position\n        bool ContainsKey(float position) const;\n\n        // Returns keys array\n        const Vector<Key>& GetKeys() const;\n\n        // Returns key at position\n        Key GetKey(float position) const;\n\n        // Returns key at index\n        Key GetKeyAt(int idx) const;\n\n        // Returns key by uid\n        Key FindKey(UInt64 uid) const;\n\n        // Returns key index by uid\n        int FindKeyIdx(UInt64 uid) const;\n\n        // Sets keys\n        void SetKeys(const Vector<Key>& keys);\n\n        // Sets key data at position\n        void SetKey(const Key& key, int idx);\n\n        // Returns ColorGradient max position @SCRIPTABLE\n        float Length() const;\n\n        // Returns true if ColorGradient is empty @SCRIPTABLE\n        bool IsEmpty() const;\n\n        // Key access operator by position\n        Key operator[](float position) const;\n\n        SERIALIZABLE(ColorGradient);\n\n    public:\n        // ---------\n        // Color key\n        // ---------\n        class Key: public ISerializable\n        {\n        public:\n            UInt64 uid;             // Random unique id @SERIALIZABLE\n            Color4 color;           // Value @SERIALIZABLE\n            float  position = 0.0f; // Position @SERIALIZABLE\n\n        public:\n            //Default constructor\n            Key();\n\n            // Constructor from value and position\n            Key(const Color4& value, float position);\n\n            // Copy-constructor\n            Key(const Key& other);\n\n            // Copy operator\n            Key& operator=(const Key& other);\n\n            // Assign from value operator\n            Key& operator=(const Color4& value);\n\n            // Color4 cast operator\n            operator Color4() const;\n\n            // Check equals operator\n            bool operator==(const Key& other) const;\n\n            // Check not equals operator\n            bool operator!=(const Key& other) const;\n\n            SERIALIZABLE(Key);\n\n            friend class ColorGradient;\n        };\n\n    protected:\n        Vector<Key> mKeys; // ColorGradient keys @SERIALIZABLE\n\n    protected:\n        // Sort keys by position\n        void SortKeys(); \n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ColorGradient)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ColorGradient)\n{\n    FIELD().PUBLIC().NAME(keys);\n    FIELD().PUBLIC().NAME(length);\n    FIELD().PUBLIC().NAME(onKeysChanged);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mKeys);\n}\nEND_META;\nCLASS_METHODS_META(o2::ColorGradient)\n{\n\n    typedef const Vector<Pair<float, Color4>>& _tmp1;\n    typedef const Vector<Pair<float, Color4>>& _tmp2;\n    typedef const Vector<Pair<float, Color4>>& _tmp3;\n    typedef const Vector<Pair<float, Color4>>& _tmp4;\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Color4&, const Color4&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(_tmp1);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const ColorGradient&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Color4, Evaluate, float);\n    FUNCTION().PUBLIC().SIGNATURE(Color4, Evaluate, float, bool, int&);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveKeys, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveKeysFrom, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, AppendCurve, const ColorGradient&);\n    FUNCTION().PUBLIC().SIGNATURE(void, PrependCurve, const ColorGradient&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertCurve, const ColorGradient&, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, AppendKeys, _tmp2);\n    FUNCTION().PUBLIC().SIGNATURE(void, AppendKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, PrependKeys, _tmp3);\n    FUNCTION().PUBLIC().SIGNATURE(void, PrependKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertKeys, _tmp4, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertKeys, const Vector<Key>&, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, InsertKey, const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(int, InsertKey, float, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AppendKey, float, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(int, PrependKey, float, const Color4&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllKeys);\n    FUNCTION().PUBLIC().SIGNATURE(bool, ContainsKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Key>&, GetKeys);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(Key, FindKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindKeyIdx, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKey, const Key&, int);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, Length);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsEmpty);\n    FUNCTION().PROTECTED().SIGNATURE(void, SortKeys);\n}\nEND_META;\n\nCLASS_BASES_META(o2::ColorGradient::Key)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ColorGradient::Key)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(uid);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(color);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(position);\n}\nEND_META;\nCLASS_METHODS_META(o2::ColorGradient::Key)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Color4&, float);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Key&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Curve.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Curve.h\"\n\n#include \"o2/Utils/Math/Interpolation.h\"\n#include \"o2/Utils/Tools/KeySearch.h\"\n\nnamespace o2\n{\n    Curve::Curve()\n    { }\n\n    Curve::Curve(float beginCoef, float beginCoefPosition, float endCoef, float endCoefPosition)\n    {\n        mKeys.Add(Key(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, beginCoef, beginCoefPosition));\n        mKeys.Add(Key(1.0f, 1.0f, 0.0f, endCoef - 1.0f, -endCoefPosition, 0.0f, 0.0f));\n        UpdateApproximation();\n    }\n\n    Curve::Curve(const Vector<Vec2F>& values, bool smooth /*= true*/)\n    {\n        AppendKeys(values, smooth);\n    }\n\n    Curve::Curve(const Curve& other) :\n        mKeys(other.mKeys)\n    { }\n\n    bool Curve::operator!=(const Curve& other) const\n    {\n        return !(*this == other);\n    }\n\n    bool Curve::operator==(const Curve& other) const\n    {\n        if (mKeys.Count() != other.mKeys.Count())\n            return false;\n\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i] != other.mKeys[i])\n                return false;\n        }\n\n        return true;\n    }\n\n    Curve& Curve::operator=(const Curve& other)\n    {\n        mKeys = other.mKeys;\n\n        UpdateApproximation();\n\n        onKeysChanged();\n\n        return *this;\n    }\n\n    Curve& Curve::operator+=(const Curve& other)\n    {\n        AppendCurve(other);\n        return *this;\n    }\n\n    float Curve::Evaluate(float position, float randomRangeCoef /*= 0.0f*/) const\n    {\n        int cacheKey = 0, cacheKeyApprox = 0;\n        return Evaluate(position, randomRangeCoef, true, cacheKey, cacheKeyApprox);\n    }\n\n    float Curve::Evaluate(float position, float randomRangeCoef, bool direction, int& cacheKey, int& cacheKeyApprox) const\n    {\n        int count = mKeys.Count();\n\n        if (count == 1)\n            return mKeys[0].value;\n        else if (count == 0)\n            return 0.0f;\n\n        int prevCacheKey = cacheKey;\n        int keyLeftIdx = -1, keyRightIdx = -1;\n        SearchKey(mKeys, count, position, keyLeftIdx, keyRightIdx, direction, cacheKey);\n\n        if (keyLeftIdx < 0 || keyRightIdx < 0 || keyLeftIdx >= mKeys.Count() || keyRightIdx >= mKeys.Count())\n            return 0.0f;\n\n        const Key& leftKey = mKeys[keyLeftIdx];\n        const Key& rightKey = mKeys[keyRightIdx];\n\n        int segLeftIdx = 0;\n        int segRightIdx = 1;\n\n        if (keyLeftIdx != prevCacheKey)\n            cacheKeyApprox = 0;\n\n        SearchKey(rightKey.mApproxTopValues, Key::mApproxValuesCount, position, segLeftIdx, segRightIdx, direction, cacheKeyApprox);\n\n        const ApproximationValue& segTopLeft = rightKey.mApproxTopValues[segLeftIdx];\n        const ApproximationValue& segTopRight = rightKey.mApproxTopValues[segRightIdx];\n\n        const ApproximationValue& segBottomLeft = rightKey.mApproxBottomValues[segLeftIdx];\n        const ApproximationValue& segBottomRight = rightKey.mApproxBottomValues[segRightIdx];\n\n        float dist = segTopRight.position - segTopLeft.position;\n        float coef = (position - segTopLeft.position) / dist;\n\n        float topSegValue = Math::Lerp(segTopLeft.value, segTopRight.value, coef);\n        float bottomSegValue = Math::Lerp(segBottomLeft.value, segBottomRight.value, coef);\n\n        return Math::Lerp(topSegValue, bottomSegValue, randomRangeCoef);\n    }\n\n    void Curve::BeginKeysBatchChange()\n    {\n        mBatchChange = true;\n    }\n\n    void Curve::CompleteKeysBatchingChange()\n    {\n        UpdateApproximation();\n        mBatchChange = false;\n        mChangedKeys = false;\n    }\n\n    void Curve::MoveKeys(float offset)\n    {\n        for (auto& key : mKeys)\n            key.position += offset;\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Curve::MoveKeysFrom(float begin, float offset)\n    {\n        for (auto& key : mKeys)\n        {\n            if (key.position >= begin)\n                key.position += offset;\n        }\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Curve::AppendCurve(const Curve& curve)\n    {\n        AppendKeys(curve.mKeys);\n    }\n\n    void Curve::PrependCurve(const Curve& curve)\n    {\n        PrependKeys(curve.mKeys);\n    }\n\n    void Curve::InsertCurve(const Curve& curve, float position)\n    {\n        InsertKeys(curve.mKeys, position);\n    }\n\n    void Curve::AppendKeys(const Vector<Vec2F>& values, bool smooth /*= true*/)\n    {\n        AppendKeys(values.Convert<Key>([=](const Vec2F& v) {\n            Key res(v.x, v.y, 0.0f, 0, 0, 0, 0);\n            res.supportsType = smooth ? Key::Type::Smooth : Key::Type::Broken;\n            return res;\n        }));\n    }\n\n    void Curve::AppendKeys(const Vector<Key>& keys)\n    {\n        if (keys.IsEmpty())\n            return;\n\n        float offset = (mKeys.IsEmpty() ? 0.0f : mKeys.Last().position) - keys[0].position;\n\n        for (auto key : keys)\n        {\n            key.position += offset;\n            mKeys.Add(key);\n        }\n\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Curve::PrependKeys(const Vector<Vec2F>& values, bool smooth /*= true*/)\n    {\n        PrependKeys(values.Convert<Key>([=](const Vec2F& v) {\n            Key res(v.x, v.y, 0.0f, 0, 0, 0, 0);\n            res.supportsType = smooth ? Key::Type::Smooth : Key::Type::Broken;\n            return res;\n        }));\n    }\n\n    void Curve::PrependKeys(const Vector<Key>& keys)\n    {\n        if (keys.IsEmpty())\n            return;\n\n        float currentBegin = mKeys.IsEmpty() ? 0.0f : mKeys[0].position;\n        float offset = keys.Last().position - Math::Min(currentBegin, 0.0f);\n\n        for (int i = 0; i < mKeys.Count(); i++)\n            mKeys[i].position += offset;\n\n        mKeys.Insert(keys, 0);\n\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Curve::InsertKeys(const Vector<Vec2F>& values, float position, bool smooth /*= true*/)\n    {\n        InsertKeys(values.Convert<Key>([=](const Vec2F& v) {\n            Key res(v.x, v.y, 0.0f, 0, 0, 0, 0);\n            res.supportsType = smooth ? Key::Type::Smooth : Key::Type::Broken;\n            return res;\n        }), position);\n    }\n\n    void Curve::InsertKeys(const Vector<Key>& keys, float position)\n    {\n        if (keys.IsEmpty())\n            return;\n\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        mKeys.Insert(keys, pos);\n\n        float insertOffset = position - keys[0].position;\n        for (int i = 0; i < keys.Count(); i++)\n            mKeys[i + pos].position += insertOffset;\n\n        float offset = keys.Last().position - keys[0].position;\n        for (int i = pos + keys.Count(); i < mKeys.Count(); i++)\n            mKeys[i].position += offset;\n\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    int Curve::InsertKey(const Key& key)\n    {\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > key.position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        pos = Math::Clamp(pos, 0, mKeys.Count());\n        mKeys.Insert(key, pos);\n\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return pos;\n    }\n\n    int Curve::InsertKey(float position, float value, float valueRange, float leftCoef, float leftCoefPosition,\n                         float rightCoef, float rightCoefPosition)\n    {\n        return InsertKey(Key(position, value, valueRange, leftCoef, leftCoefPosition, rightCoef, rightCoefPosition));\n    }\n\n    int Curve::InsertKey(float position, float value, float valueRange /*= 0.0f*/, float smooth /*= 1.0f*/)\n    {\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        pos = Math::Clamp(pos, 0, mKeys.Count());\n        mKeys.Insert(Key(position, value, valueRange), pos);\n        SmoothKey(position, smooth);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return pos;\n    }\n\n    int Curve::InsertFlatKey(float position, float value, float valueRange /*= 0.0f*/)\n    {\n        int pos = mKeys.Count();\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > position)\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        pos = Math::Clamp(pos, 0, mKeys.Count());\n        float leftSupport = 0, rightSupport = 0;\n        const float supportCoef = 0.4f;\n\n        if (pos > 0)\n            leftSupport = (position - mKeys[pos - 1].position)*supportCoef;\n\n        if (pos < mKeys.Count() - 1)\n            rightSupport = (mKeys[pos + 1] - position)*supportCoef;\n\n        mKeys.Insert(Key(position, value, valueRange, value, leftSupport, value, rightSupport), pos);\n\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return pos;\n    }\n\n    int Curve::AppendKey(float offset, float value, float valueRange, float leftCoef, float leftCoefPosition,\n                         float rightCoef, float rightCoefPosition)\n    {\n        Key newKey((mKeys.IsEmpty() ? 0.0f : mKeys.Last().position) + offset, value, valueRange, leftCoef, leftCoefPosition,\n                   rightCoef, rightCoefPosition);\n\n        newKey.supportsType = Key::Type::Broken;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return mKeys.Count() - 1;\n    }\n\n    int Curve::AppendKey(float offset, float value, float valueRange /*= 0.0f*/, float smoothCoef /*= 1.0f*/)\n    {\n        Key newKey((mKeys.IsEmpty() ? 0.0f : mKeys.Last().position) + offset, value, valueRange, value, 0, value, 0);\n        newKey.supportsType = Key::Type::Smooth;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return mKeys.Count() - 1;\n    }\n\n    int Curve::AppendKey(float offset, float value, float valueRange /*= 0.0f*/)\n    {\n        Key newKey((mKeys.IsEmpty() ? 0.0f : mKeys.Last().position) + offset, value, valueRange, value, 0, value, 0);\n        newKey.supportsType = Key::Type::Broken;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return mKeys.Count() - 1;\n    }\n\n    int Curve::PrependKey(float offset, float value, float valueRange, float leftCoef, float leftCoefPosition,\n                          float rightCoef, float rightCoefPosition)\n    {\n        float begin = mKeys.IsEmpty() ? 0.0f : mKeys[0].position;\n\n        for (auto& key : mKeys)\n            key.position += offset;\n\n        Key newKey(begin, value, valueRange, leftCoef, leftCoefPosition,\n                   rightCoef, rightCoefPosition);\n\n        newKey.supportsType = Key::Type::Broken;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return 0;\n    }\n\n    int Curve::PrependKey(float offset, float value, float valueRange /*= 0.0f*/, float smoothCoef /*= 1.0f*/)\n    {\n        float begin = mKeys.IsEmpty() ? 0.0f : mKeys[0].position;\n\n        for (auto& key : mKeys)\n            key.position += offset;\n\n        Key newKey(begin, value, valueRange, value, 0, value, 0);\n        newKey.supportsType = Key::Type::Smooth;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return 0;\n    }\n\n    int Curve::PrependKey(float offset, float value, float valueRange /*= 0.0f*/)\n    {\n        float begin = mKeys.IsEmpty() ? 0.0f : mKeys[0].position;\n\n        for (auto& key : mKeys)\n            key.position += offset;\n\n        Key newKey(begin, value, valueRange, value, 0, value, 0);\n        newKey.supportsType = Key::Type::Broken;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return 0;\n    }\n\n    Curve::Key Curve::GetKey(float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return key;\n        }\n\n        return Key();\n    }\n\n    Curve::Key Curve::GetKeyAt(int idx) const\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return Key();\n\n        return mKeys[idx];\n    }\n\n    Curve::Key Curve::FindKey(UInt64 uid) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return key;\n        }\n\n        return Key();\n    }\n\n    int Curve::FindKeyIdx(UInt64 uid) const\n    {\n        int idx = 0;\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return idx;\n\n            idx++;\n        }\n\n        return -1;\n    }\n\n    bool Curve::RemoveKey(float position)\n    {\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (Math::Equals(mKeys[i].position, position))\n            {\n                mKeys.RemoveAt(i);\n\n                if (mBatchChange)\n                    mChangedKeys = true;\n                else\n                    UpdateApproximation();\n\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    bool Curve::RemoveKeyAt(int idx)\n    {\n        if (idx < 0 || idx >= mKeys.Count())\n            return false;\n\n        mKeys.RemoveAt(idx);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return true;\n    }\n\n    void Curve::RemoveAllKeys()\n    {\n        mKeys.Clear();\n        onKeysChanged();\n    }\n\n    bool Curve::ContainsKey(float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return true;\n        }\n\n        return false;\n    }\n\n    const Vector<Curve::Key>& Curve::GetKeys() const\n    {\n        return mKeys;\n    }\n\n    void Curve::SetKeys(const Vector<Key>& keys)\n    {\n        mKeys = keys;\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Curve::SetKey(const Key& key, int idx)\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return;\n\n        mKeys[idx] = key;\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Curve::SmoothKey(float position, float smoothCoef)\n    {\n        int pos = 0;\n\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (Math::Equals(mKeys[i].position, position))\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        SmoothKeyAt(pos, smoothCoef);\n    }\n\n    void Curve::SmoothKeyAt(int idx, float smoothCoef)\n    {\n        InternalSmoothKeyAt(idx, smoothCoef);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    float Curve::Length() const\n    {\n        if (mKeys.Count() == 0)\n            return 0.0f;\n\n        return mKeys.Last().position;\n    }\n\n    bool Curve::IsEmpty() const\n    {\n        return mKeys.Count() == 0;\n    }\n\n    RectF Curve::GetRect() const\n    {\n        RectF res;\n\n        if (mKeys.Count() < 2)\n            return res;\n\n        res.left = mKeys[1].mApproxTopValues[0].position; res.right = mKeys[1].mApproxTopValues[0].position;\n        res.top = mKeys[1].mApproxTopValues[0].value; res.bottom = mKeys[1].mApproxTopValues[0].value;\n\n        for (int k = 1; k < mKeys.Count(); k++)\n        {\n            auto& key = mKeys[k];\n            for (int i = 0; i < Key::mApproxValuesCount; i++)\n            {\n                res.left = Math::Min(key.mApproxTopValues[i].position, res.left);\n                res.right = Math::Max(key.mApproxTopValues[i].position, res.right);\n                res.top = Math::Max(key.mApproxTopValues[i].value, res.top);\n                res.bottom = Math::Min(key.mApproxTopValues[i].value, res.bottom);\n\n                res.left = Math::Min(key.mApproxBottomValues[i].position, res.left);\n                res.right = Math::Max(key.mApproxBottomValues[i].position, res.right);\n                res.top = Math::Max(key.mApproxBottomValues[i].value, res.top);\n                res.bottom = Math::Min(key.mApproxBottomValues[i].value, res.bottom);\n            }\n        }\n\n        return res;\n    }\n\n    Curve::Key Curve::operator[](float position) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (Math::Equals(key.position, position))\n                return key;\n        }\n\n        return Key();\n    }\n\n    Curve Curve::Parametric(float begin, float end, float duration, \n                            float beginCoef, float beginCoefPosition, float endCoef, float endCoefPosition)\n    {\n        Curve res;\n        res.InsertKey(0.0f, begin, 0.0f, 0.0f, 0.0f, Math::Lerp(begin, end, beginCoef) - begin, beginCoefPosition*duration);\n        res.InsertKey(duration, end, 0.0f, Math::Lerp(begin, end, endCoef) - end, -endCoefPosition*duration, 0.0f, 0.0f);\n        return res;\n    }\n\n    Curve Curve::EaseIn(float begin /*= 0.0f*/, float end /*= 1.0f*/, float duration /*= 1.0f*/, float strongness /*= 0.4f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, strongness, 1.0f, 1.0f);\n    }\n\n    Curve Curve::EaseOut(float begin /*= 0.0f*/, float end /*= 1.0f*/, float duration /*= 1.0f*/, float strongness /*= 0.4f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.0f, 1.0f, strongness);\n    }\n\n    Curve Curve::EaseInOut(float begin /*= 0.0f*/, float end /*= 1.0f*/, float duration /*= 1.0f*/, float strongness /*= 0.4f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, strongness, 1.0f, 1.0f);\n    }\n\n    Curve Curve::Linear(float begin /*= 0.0f*/, float end /*= 1.0f*/, float duration /*= 1.0f*/)\n    {\n        return Parametric(begin, end, duration, 0.0f, 0.0f, 1.0f, 1.0f);\n    }\n\n    void Curve::CheckSmoothKeys()\n    {\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].supportsType == Key::Type::Smooth)\n                InternalSmoothKeyAt(i);\n        }\n    }\n\n    void Curve::UpdateApproximation()\n    {\n        for (int i = 1; i < mKeys.Count(); i++)\n        {\n            Key& leftKey = mKeys[i - 1];\n            Key& rightKey = mKeys[i];\n\n            Vec2F rightSupport(leftKey.rightSupportPosition, leftKey.rightSupportValue);\n            Vec2F leftSupport(rightKey.leftSupportPosition, rightKey.leftSupportValue);\n\n            if (rightSupport.x < 0.0f)\n                rightSupport.x = 0;\n\n            if (rightSupport.x > rightKey.position - leftKey.position && rightSupport.x != 0.0f)\n                rightSupport *= (rightKey.position - leftKey.position) / rightSupport.x;\n\n            if (leftSupport.x > 0.0f)\n                leftSupport.x = 0;\n\n            if (leftSupport.x < leftKey.position - rightKey.position && leftSupport.x != 0.0f)\n                leftSupport *= (leftKey.position - rightKey.position) / leftSupport.x;\n\n            float leftHalfRange = leftKey.valueRange * 0.5f;\n            float rightHalfRange = rightKey.valueRange * 0.5f;\n\n            Vec2F leftOriginTop(leftKey.position, leftKey.value + leftHalfRange);\n            Vec2F rightOriginTop(rightKey.position, rightKey.value + rightHalfRange);\n            Vec2F leftSupportTop = leftOriginTop + rightSupport;\n            Vec2F rightSupportTop = rightOriginTop + leftSupport;\n\n            Vec2F leftOriginBottom(leftKey.position, leftKey.value - leftHalfRange);\n            Vec2F rightOriginBottom(rightKey.position, rightKey.value - rightHalfRange);\n            Vec2F leftSupportBottom = leftOriginBottom + rightSupport;\n            Vec2F rightSupportBottom = rightOriginBottom + leftSupport;\n\n            rightKey.mApproxValuesBounds.Set(leftOriginTop, leftOriginTop);\n            for (int j = 0; j < Key::mApproxValuesCount; j++)\n            {\n                float coef = (float)j / (float)(Key::mApproxValuesCount - 1);\n                Vec2F pointTop = Bezier(leftOriginTop, leftSupportTop, rightSupportTop, rightOriginTop, coef);\n                Vec2F pointBottom = Bezier(leftOriginBottom, leftSupportBottom, rightSupportBottom, rightOriginBottom, coef);\n\n                rightKey.mApproxTopValues[j] = pointTop;\n                rightKey.mApproxBottomValues[j] = pointBottom;\n\n                rightKey.mApproxValuesBounds.left = Math::Min(rightKey.mApproxValuesBounds.left, pointTop.x);\n                rightKey.mApproxValuesBounds.right = Math::Max(rightKey.mApproxValuesBounds.right, pointTop.x);\n                rightKey.mApproxValuesBounds.top = Math::Max(rightKey.mApproxValuesBounds.top, pointTop.y);\n                rightKey.mApproxValuesBounds.bottom = Math::Min(rightKey.mApproxValuesBounds.bottom, pointTop.y);\n\n                rightKey.mApproxValuesBounds.left = Math::Min(rightKey.mApproxValuesBounds.left, pointBottom.x);\n                rightKey.mApproxValuesBounds.right = Math::Max(rightKey.mApproxValuesBounds.right, pointBottom.x);\n                rightKey.mApproxValuesBounds.top = Math::Max(rightKey.mApproxValuesBounds.top, pointBottom.y);\n                rightKey.mApproxValuesBounds.bottom = Math::Min(rightKey.mApproxValuesBounds.bottom, pointBottom.y);\n            }\n        }\n\n        onKeysChanged();\n    }\n\n    Vector<Curve::Key> Curve::GetKeysNonContant()\n    {\n        return mKeys;\n    }\n\n    void Curve::OnDeserialized(const DataValue& node)\n    {\n        UpdateApproximation();\n    }\n\n    void Curve::InternalSmoothKeyAt(int idx, float smoothCoef /*= 1.0f*/)\n    {\n        const float baseSmoothCoef = 0.5f;\n\n        Key& key = mKeys[idx];\n        Vec2F thisKeyPoint(key.position, key.value);\n\n        if (idx == 0)\n        {\n            Key& nextKey = mKeys[Math::Min(idx + 1, mKeys.Count() - 1)];\n\n            Vec2F nextKeyPoint(nextKey.position, nextKey.value);\n            Vec2F supportVec = (nextKeyPoint - thisKeyPoint)*baseSmoothCoef*smoothCoef;\n\n            key.rightSupportPosition = supportVec.x;\n            key.rightSupportValue = supportVec.y;\n        }\n        else if (idx == mKeys.Count() - 1)\n        {\n            Key& lastKey = mKeys[Math::Max(0, idx - 1)];\n\n            Vec2F lastKeyPoint(lastKey.position, lastKey.value);\n            Vec2F supportVec = (lastKeyPoint - thisKeyPoint)*baseSmoothCoef*smoothCoef;\n\n            key.leftSupportPosition = supportVec.x;\n            key.leftSupportValue = supportVec.y;\n        }\n        else\n        {\n            Key& lastKey = mKeys[Math::Max(0, idx - 1)];\n            Key& nextKey = mKeys[Math::Min(idx + 1, mKeys.Count())];\n\n            Vec2F lastKeyPoint(lastKey.position, lastKey.value);\n            Vec2F thisKeyPoint(key.position, key.value);\n            Vec2F nextKeyPoint(nextKey.position, nextKey.value);\n\n            Vec2F thisToLast = lastKeyPoint - thisKeyPoint;\n            Vec2F thisToNext = nextKeyPoint - thisKeyPoint;\n\n            float supportLength = Math::Min(thisToNext.Length(), thisToLast.Length())*baseSmoothCoef*smoothCoef;\n            Vec2F supportVec = Math::CalculateEllipseTangent(lastKeyPoint, thisKeyPoint, nextKeyPoint)*supportLength;\n\n            key.leftSupportPosition = -supportVec.x; key.leftSupportValue = -supportVec.y;\n            key.rightSupportPosition = supportVec.x; key.rightSupportValue = supportVec.y;\n        }\n    }\n\n    void Curve::InternalSmoothKey(float position, float smoothCoef /*= 1.0f*/)\n    {\n        int pos = 0;\n\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (Math::Equals(mKeys[i].position, position))\n            {\n                pos = i;\n                break;\n            }\n        }\n\n        InternalSmoothKeyAt(pos, smoothCoef);\n    }\n\n    Curve::Key::Key() :\n        uid(Math::Random()), value(0), valueRange(0), position(0), leftSupportValue(0), leftSupportPosition(0), rightSupportValue(0), rightSupportPosition(0),\n        supportsType(Type::Smooth)\n    { }\n\n    Curve::Key::Key(float position, float value, float valueRange, float leftSupportValue, float leftSupportPosition,\n                    float rightSupportValue, float rightSupportPosition) :\n        uid(Math::Random()), value(value), valueRange(valueRange), position(position), leftSupportValue(leftSupportValue), leftSupportPosition(leftSupportPosition),\n        rightSupportValue(rightSupportValue), rightSupportPosition(rightSupportPosition), supportsType(Type::Broken)\n    { }\n\n    Curve::Key::Key(float position, float value, float valueRange) :\n        uid(Math::Random()), value(value), valueRange(valueRange), position(position), leftSupportValue(0), leftSupportPosition(0), rightSupportValue(0),\n        rightSupportPosition(0), supportsType(Type::Smooth)\n    { }\n\n    Curve::Key::Key(const Key& other) :\n        uid(other.uid), value(other.value), valueRange(other.valueRange), position(other.position), leftSupportValue(other.leftSupportValue),\n        leftSupportPosition(other.leftSupportPosition), rightSupportValue(other.rightSupportValue),\n        rightSupportPosition(other.rightSupportPosition), supportsType(other.supportsType), mApproxValuesBounds(other.mApproxValuesBounds)\n    {\n        memcpy(mApproxTopValues, other.mApproxTopValues, mApproxValuesCount * sizeof(ApproximationValue));\n        memcpy(mApproxBottomValues, other.mApproxBottomValues, mApproxValuesCount * sizeof(ApproximationValue));\n    }\n\n    Curve::Key::operator float() const\n    {\n        return value;\n    }\n\n    const ApproximationValue* Curve::Key::GetTopApproximatedPoints() const\n    {\n        return mApproxTopValues;\n    }\n\n    const ApproximationValue* Curve::Key::GetBottomApproximatedPoints() const\n    {\n        return mApproxBottomValues;\n    }\n\n    int Curve::Key::GetApproximatedPointsCount() const\n    {\n        return mApproxValuesCount;\n    }\n\n    const RectF& Curve::Key::GetGetApproximatedPointsBounds() const\n    {\n        return mApproxValuesBounds;\n    }\n\n    Curve::Key& Curve::Key::operator=(float value)\n    {\n        this->value = value;\n        return *this;\n    }\n\n    Curve::Key& Curve::Key::operator=(const Key& other)\n    {\n        uid = other.uid;\n        value = other.value;\n        valueRange = other.valueRange;\n        position = other.position;\n        leftSupportValue = other.leftSupportValue;\n        leftSupportPosition = other.leftSupportPosition;\n        rightSupportValue = other.rightSupportValue;\n        rightSupportPosition = other.rightSupportPosition;\n        supportsType = other.supportsType;\n        mApproxValuesBounds = other.mApproxValuesBounds;\n\n        memcpy(mApproxTopValues, other.mApproxTopValues, mApproxValuesCount * sizeof(Vec2F));\n        memcpy(mApproxBottomValues, other.mApproxBottomValues, mApproxValuesCount * sizeof(Vec2F));\n\n        return *this;\n    }\n\n    bool Curve::Key::operator!=(const Key& other) const\n    {\n        return !(*this == other);\n    }\n\n    bool Curve::Key::operator==(const Key& other) const\n    {\n        return Math::Equals(position, other.position) && \n            Math::Equals(value, other.value) &&\n            Math::Equals(valueRange, other.valueRange) &&\n            Math::Equals(leftSupportPosition, other.leftSupportPosition) &&\n            Math::Equals(leftSupportValue, other.leftSupportValue) &&\n            Math::Equals(rightSupportPosition, other.rightSupportPosition) &&\n            Math::Equals(rightSupportValue, other.rightSupportValue) &&\n            supportsType == other.supportsType;\n    }\n\n}\n// --- META ---\n\nENUM_META(o2::Curve::Key::Type, o2__Curve__Key__Type)\n{\n    ENUM_ENTRY(Broken);\n    ENUM_ENTRY(Discrete);\n    ENUM_ENTRY(Flat);\n    ENUM_ENTRY(Free);\n    ENUM_ENTRY(Linear);\n    ENUM_ENTRY(Smooth);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::Curve, o2__Curve);\n\nDECLARE_CLASS(o2::Curve::Key, o2__Curve__Key);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Curve.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Editor/Attributes/ScriptableAttribute.h\"\n#include \"o2/Utils/Math/ApproximationValue.h\"\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    // ------------\n    // Bezier curve\n    // ------------\n    class Curve: public ISerializable, public RefCounterable\n    {\n    public:\n        class Key;\n\n    public:\n        PROPERTIES(Curve);\n        PROPERTY(Vector<Key>, keys, SetKeys, GetKeys); // Keys property\n        GETTER(float, length, Length);             // Max position getter\n\n    public:\n        Function<void()> onKeysChanged; // Keys changed event\n\n    public:\n        // Default constructor @SCRIPTABLE\n        Curve();\n\n        // Constructor by bezier coefficient in 0...1 range (some line as css-bezier)\n        Curve(float beginCoef, float beginCoefPosition, float endCoef, float endCoefPosition);\n\n        // Constructor from keys with smoothing\n        Curve(const Vector<Vec2F>& values, bool smooth = true);\n\n        // Copy-constructor\n        Curve(const Curve& other);\n\n        // Is equals operator\n        bool operator==(const Curve& other) const;\n\n        // Is not equals operator\n        bool operator!=(const Curve& other) const;\n\n        // Assign operator\n        Curve& operator=(const Curve& other);\n\n        // Append other curve at end\n        Curve& operator+=(const Curve& other);\n\n        // Returns value by position @SCRIPTABLE\n        float Evaluate(float position, float randomRangeCoef = 0.0f) const;\n\n        // Returns value by position\n        float Evaluate(float position, float randomRangeCoef, bool direction, int& cacheKey, int& cacheKeyApprox) const;\n\n        // Called when beginning keys batch change. After this call all keys modifications will not be update approximation\n        // Used for optimizing many keys change\n        void BeginKeysBatchChange();\n\n        // Called when keys batch change completed. Updates approximation\n        void CompleteKeysBatchingChange();\n\n        // Moves all keys positions to offset\n        void MoveKeys(float offset);\n\n        // Moves keys from begin position positions to offset\n        void MoveKeysFrom(float begin, float offset);\n\n        // Appends curve at end\n        void AppendCurve(const Curve& curve);\n\n        // Prepends curve at end\n        void PrependCurve(const Curve& curve);\n\n        // Inserts curve at position\n        void InsertCurve(const Curve& curve, float position);\n\n        // Adds keys with smoothing at end\n        void AppendKeys(const Vector<Vec2F>& values, bool smooth = true);\n\n        // Adds keys at end\n        void AppendKeys(const Vector<Key>& keys);\n\n        // Adds keys with smoothing at beginning\n        void PrependKeys(const Vector<Vec2F>& values, bool smooth = true);\n\n        // Adds keys at beginning\n        void PrependKeys(const Vector<Key>& keys);\n\n        // Inserts keys with smoothing at position\n        void InsertKeys(const Vector<Vec2F>& values, float position, bool smooth = true);\n\n        // Inserts keys at position\n        void InsertKeys(const Vector<Key>& keys, float position);\n\n        // Inserts key and returns index\n        int InsertKey(const Key& key);\n\n        // Inserts key and returns index\n        int InsertKey(float position, float value, float valueRange, float leftCoef, float leftCoefPosition,\n                      float rightCoef, float rightCoefPosition);\n\n        // Inserts value at position with smoothing and returns index\n        int InsertKey(float position, float value, float valueRange = 0.0f, float smoothCoef = 1.0f);\n\n        // Inserts flat key\n        int InsertFlatKey(float position, float value, float valueRange = 0.0f);\n\n        // Appends key at end with offset and returns index\n        int AppendKey(float offset, float value, float valueRange, float leftCoef, float leftCoefPosition,\n                      float rightCoef, float rightCoefPosition);\n\n        // Appends key at end with offset and smoothing and returns index\n        int AppendKey(float offset, float value, float valueRange = 0.0f, float smoothCoef = 1.0f);\n\n        // Appends flat key at end with offset\n        int AppendKey(float offset, float value, float valueRange = 0.0f);\n\n        // Prepends key at beginning with offset and returns index\n        int PrependKey(float offset, float value, float valueRange, float leftCoef, float leftCoefPosition,\n                       float rightCoef, float rightCoefPosition);\n\n        // Prepends key at beginning with offset and smoothing and returns index\n        int PrependKey(float offset, float value, float valueRange = 0.0f, float smoothCoef = 1.0f);\n\n        // Prepends flat key at beginning with offset\n        int PrependKey(float offset, float value, float valueRange = 0.0f);\n\n        // Removes key at position\n        bool RemoveKey(float position);\n\n        // Removes key at index\n        bool RemoveKeyAt(int idx);\n\n        // Removes all keys\n        void RemoveAllKeys();\n\n        // Returns true if contains key at position\n        bool ContainsKey(float position) const;\n\n        // Returns keys array\n        const Vector<Key>& GetKeys() const;\n\n        // Returns key at position\n        Key GetKey(float position) const;\n\n        // Returns key at index\n        Key GetKeyAt(int idx) const;\n\n        // Returns key by uid\n        Key FindKey(UInt64 uid) const;\n\n        // Returns key index by uid\n        int FindKeyIdx(UInt64 uid) const;\n\n        // Sets keys\n        void SetKeys(const Vector<Key>& keys);\n\n        // Sets key data at position\n        void SetKey(const Key& key, int idx);\n\n        // Smooths key at position\n        void SmoothKey(float position, float smoothCoef = 1.0f);\n\n        // Smooths key at index\n        void SmoothKeyAt(int idx, float smoothCoef = 1.0f);\n\n        // Returns curve max position @SCRIPTABLE\n        float Length() const;\n\n        // Returns true if curve is empty @SCRIPTABLE\n        bool IsEmpty() const;\n\n        // Returns bounding approximated keys rectangle\n        RectF GetRect() const;\n\n        // Key access operator by position\n        Key operator[](float position) const;\n\n        // Returns parametric specified curve\n        // Sample: Parametric(someBegin, someEnd, 1.0f, 0.0f, 0.4f, 1.0f, 0.6f) \n        static Curve Parametric(float begin, float end, float duration,\n                                float beginCoef, float beginCoefPosition,\n                                float endCoef, float endCoefPosition);\n\n        // Returns tween animation from begin to end in duration with ease in\n        static Curve EaseIn(float begin = 0.0f, float end = 1.0f, float duration = 1.0f, float strongness = 0.4f);\n\n        // Returns tween animation from begin to end in duration with ease out\n        static Curve EaseOut(float begin = 0.0f, float end = 1.0f, float duration = 1.0f, float strongness = 0.4f);\n\n        // Returns tween animation from begin to end in duration with ease in-out\n        static Curve EaseInOut(float begin = 0.0f, float end = 1.0f, float duration = 1.0f, float strongness = 0.4f);\n\n        // Returns tween animation from begin to end in duration with linear transition\n        static Curve Linear(float begin = 0.0f, float end = 1.0f, float duration = 1.0f);\n\n        SERIALIZABLE(Curve);\n\n    public:\n        // ---------\n        // Curve key\n        // ---------\n        class Key: public ISerializable\n        {\n        public:\n            enum class Type { Smooth, Flat, Free, Linear, Broken, Discrete };\n\n        public:\n            UInt64 uid;                  // Random unique id @SERIALIZABLE\n            float  value;                // Value @SERIALIZABLE\n            float  valueRange;           // Value range @SERIALIZABLE\n            float  position;             // Position @SERIALIZABLE\n            float  leftSupportValue;     // Left bezier support value, relative to key value @SERIALIZABLE\n            float  leftSupportPosition;  // Left bezier support position, relative to key position @SERIALIZABLE\n            float  rightSupportValue;    // Right bezier support value, relative to key value @SERIALIZABLE\n            float  rightSupportPosition; // Right bezier support position, relative to key position @SERIALIZABLE\n            Type   supportsType;         // Support points type @SERIALIZABLE\n\n        public:\n            //Default constructor\n            Key();\n\n            // Constructor from value and position\n            Key(float position, float value, float valueRange);\n\n            // Constructor\n            Key(float position, float value, float valueRange, float leftSupportValue, float leftSupportPosition,\n                float rightSupportValue, float rightSupportPosition);\n\n            // Copy-constructor\n            Key(const Key& other);\n\n            // Copy operator\n            Key& operator=(const Key& other);\n\n            // Assign from value operator\n            Key& operator=(float value);\n\n            // Float cast operator\n            operator float() const;\n\n            // Check equals operator\n            bool operator==(const Key& other) const;\n\n            // Check not equals operator\n            bool operator!=(const Key& other) const;\n\n            // Returns approximated points for top range\n            const ApproximationValue* GetTopApproximatedPoints() const;\n\n            // Returns approximated points for bottom range\n            const ApproximationValue* GetBottomApproximatedPoints() const;\n\n            // Returns approximated points count\n            int GetApproximatedPointsCount() const;\n\n            // Returns bounds of approximation values\n            const RectF& GetGetApproximatedPointsBounds() const;\n\n            SERIALIZABLE(Key);\n\n        public:\n            static const int   mApproxValuesCount = 20;                 // Approximation values count\n            ApproximationValue mApproxTopValues[mApproxValuesCount];    // Approximation values for top range\n            ApproximationValue mApproxBottomValues[mApproxValuesCount]; // Approximation values for top range\n            RectF              mApproxValuesBounds;                     // Bounds of approximation values\n\n            friend class Curve;\n        };\n\n    protected:\n        bool mBatchChange = false; // It is true when began batch change\n        bool mChangedKeys = false; // It is true when some keys changed during batch change\n\n        Vector<Key> mKeys; // Curve keys @SERIALIZABLE\n\n    protected:\n        // Checks all smooth keys and updates supports points\n        void CheckSmoothKeys();\n\n        // Updates approximation\n        void UpdateApproximation();\n\n        // Returns keys (for property)\n        Vector<Key> GetKeysNonContant();\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        // Smooths key at index and doesn't updates approximation\n        void InternalSmoothKeyAt(int idx, float smoothCoef = 1.0f);\n\n        // Smooths key at position and doesn't updates approximation\n        void InternalSmoothKey(float position, float smoothCoef = 1.0f);\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::Curve::Key::Type);\n\nCLASS_BASES_META(o2::Curve)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Curve)\n{\n    FIELD().PUBLIC().NAME(keys);\n    FIELD().PUBLIC().NAME(length);\n    FIELD().PUBLIC().NAME(onKeysChanged);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mBatchChange);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mChangedKeys);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mKeys);\n}\nEND_META;\nCLASS_METHODS_META(o2::Curve)\n{\n\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(float, float, float, float);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Vec2F>&, bool);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Curve&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, Evaluate, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, Evaluate, float, float, bool, int&, int&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysBatchChange);\n    FUNCTION().PUBLIC().SIGNATURE(void, CompleteKeysBatchingChange);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveKeys, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, MoveKeysFrom, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, AppendCurve, const Curve&);\n    FUNCTION().PUBLIC().SIGNATURE(void, PrependCurve, const Curve&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertCurve, const Curve&, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, AppendKeys, const Vector<Vec2F>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, AppendKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, PrependKeys, const Vector<Vec2F>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, PrependKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertKeys, const Vector<Vec2F>&, float, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertKeys, const Vector<Key>&, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, InsertKey, const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(int, InsertKey, float, float, float, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, InsertKey, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, InsertFlatKey, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AppendKey, float, float, float, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AppendKey, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AppendKey, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, PrependKey, float, float, float, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, PrependKey, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, PrependKey, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllKeys);\n    FUNCTION().PUBLIC().SIGNATURE(bool, ContainsKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Key>&, GetKeys);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKeyAt, int);\n    FUNCTION().PUBLIC().SIGNATURE(Key, FindKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindKeyIdx, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKey, const Key&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SmoothKey, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(void, SmoothKeyAt, int, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, Length);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsEmpty);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetRect);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Curve, Parametric, float, float, float, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Curve, EaseIn, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Curve, EaseOut, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Curve, EaseInOut, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Curve, Linear, float, float, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckSmoothKeys);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateApproximation);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Key>, GetKeysNonContant);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InternalSmoothKeyAt, int, float);\n    FUNCTION().PROTECTED().SIGNATURE(void, InternalSmoothKey, float, float);\n}\nEND_META;\n\nCLASS_BASES_META(o2::Curve::Key)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Curve::Key)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(uid);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(value);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(valueRange);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(position);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(leftSupportValue);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(leftSupportPosition);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(rightSupportValue);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(rightSupportPosition);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(supportsType);\n    FIELD().PUBLIC().NAME(mApproxTopValues);\n    FIELD().PUBLIC().NAME(mApproxBottomValues);\n    FIELD().PUBLIC().NAME(mApproxValuesBounds);\n}\nEND_META;\nCLASS_METHODS_META(o2::Curve::Key)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(float, float, float);\n    FUNCTION().PUBLIC().CONSTRUCTOR(float, float, float, float, float, float, float);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(const ApproximationValue*, GetTopApproximatedPoints);\n    FUNCTION().PUBLIC().SIGNATURE(const ApproximationValue*, GetBottomApproximatedPoints);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetApproximatedPointsCount);\n    FUNCTION().PUBLIC().SIGNATURE(const RectF&, GetGetApproximatedPointsBounds);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Geometry.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Geometry.h\"\n\n#include \"o2/Utils/Math/Intersection.h\"\n\nnamespace o2\n{\n    void Geometry::CreatePolyLineMesh(const Vertex* points, int pointsCount,\n                                      Vertex*& verticies, UInt& vertexCount, UInt& vertexSize,\n                                      VertexIndex*& indexes, UInt& polyCount, UInt& polySize,\n                                      float width, float texBorderTop, float texBorderBottom, const Vec2F& texSize,\n                                      const Vec2F& invCameraScale /*= Vec2F(1, 1)*/)\n    {\n        int newVertexCount = pointsCount*4;\n        int newPolyCount = (pointsCount - 1)*6;\n\n        if (newVertexCount > (int)vertexSize)\n        {\n            if (verticies)\n                delete[] verticies;\n\n            verticies = new Vertex[newVertexCount];\n            vertexSize = newVertexCount;\n        }\n\n        if (newPolyCount > (int)polySize)\n        {\n            if (indexes)\n                delete[] indexes;\n\n            indexes = new VertexIndex[newPolyCount*3];\n            polySize = newPolyCount;\n        }\n\n        float halfWidth = width*0.5f;\n        float halfWidhtBorderTop = halfWidth + texBorderTop;\n        float halfWidhtBorderBottom = halfWidth + texBorderBottom;\n\n        Vec2F invTexSize(1.0f/texSize.x, 1.0f/texSize.y);\n\n        float upTexV = 1.0f - texBorderTop*invTexSize.y;\n        float downTexV = texBorderBottom*invTexSize.y;\n\n        Vec2F offs = Vec2F(0.5f, 0.5f)*invCameraScale;\n\n        int vertex = 0; int poly = 0;\n        float u = 0;\n\n        for (int i = 0; i < pointsCount; i++)\n        {\n            Vec2F point = (Vec2F)points[i] + offs;\n            ULong color = points[i].color;\n            ULong zeroAlphaColor = color << 8 >> 8;\n\n            if (i == 0)\n            {\n                Vec2F dir = ((Vec2F)points[i + 1] + offs - point).Normalized();\n                Vec2F norm = dir.Perpendicular();\n\n                Vec2F upBorder = point + norm*invCameraScale*halfWidhtBorderBottom;\n                Vec2F up = point + norm*invCameraScale*halfWidth;\n                Vec2F down = point - norm*invCameraScale*halfWidth;\n                Vec2F downBorder = point - norm*invCameraScale*halfWidhtBorderTop;\n\n                verticies[vertex++].Set(up, color, 0, upTexV);\n                verticies[vertex++].Set(upBorder, zeroAlphaColor, 0, 1);\n                verticies[vertex++].Set(down, color, 0, downTexV);\n                verticies[vertex++].Set(downBorder, zeroAlphaColor, 0, 0);\n            }\n            else if (i == pointsCount - 1)\n            {\n                Vec2F dir = point - points[i - 1] - offs;\n                float segLength = dir.Length();\n                dir /= segLength;\n                Vec2F norm = dir.Perpendicular();\n\n                Vec2F upBorder = point + norm*invCameraScale*halfWidhtBorderBottom;\n                Vec2F up = point + norm*invCameraScale*halfWidth;\n                Vec2F down = point - norm*invCameraScale*halfWidth;\n                Vec2F downBorder = point - norm*invCameraScale*halfWidhtBorderTop;\n\n                if (i%2 == 0)\n                    u -= segLength/invCameraScale.x*invTexSize.x;\n                else\n                    u += segLength/invCameraScale.x*invTexSize.x;\n\n                verticies[vertex++].Set(up, color, u, upTexV);\n                verticies[vertex++].Set(upBorder, zeroAlphaColor, u, 1);\n                verticies[vertex++].Set(down, color, u, downTexV);\n                verticies[vertex++].Set(downBorder, zeroAlphaColor, u, 0);\n            }\n            else\n            {\n                Vec2F prev = (Vec2F)points[i - 1] + offs;\n                Vec2F next = (Vec2F)points[i + 1] + offs;\n\n                Vec2F prevDir = point - prev;\n                float segLength = prevDir.Length();\n                prevDir /= segLength;\n\n                Vec2F nextDir = (point - next).Normalized();\n\n                Vec2F prevNorm = prevDir.Perpendicular().Inverted();\n                Vec2F nextNorm = nextDir.Perpendicular();\n\n                Vec2F upBorder = Intersection::LinesNoChek(point - prevNorm*halfWidhtBorderTop, prevDir,\n                                                           point - nextNorm*halfWidhtBorderTop, nextDir);\n\n\n                Vec2F up = Intersection::LinesNoChek(point - prevNorm*halfWidth, prevDir,\n                                                     point - nextNorm*halfWidth, nextDir);\n\n                Vec2F down = Intersection::LinesNoChek(point + prevNorm*halfWidth, prevDir,\n                                                       point + nextNorm*halfWidth, nextDir);\n\n                Vec2F downBorder = Intersection::LinesNoChek(point + prevNorm*halfWidhtBorderBottom, prevDir,\n                                                             point + nextNorm*halfWidhtBorderBottom, nextDir);\n\n                up = (up - point)*invCameraScale + point;\n                down = (down - point)*invCameraScale + point;\n                upBorder = (upBorder - point)*invCameraScale + point;\n                downBorder = (downBorder - point)*invCameraScale + point;\n\n                float segSign = i%2 == 0 ? -1.0f : 1.0f;\n\n                u += segLength/invCameraScale.x*invTexSize.x*segSign;\n\n                verticies[vertex++].Set(up, color, u + prevDir.Dot(up - point)*invTexSize.x*segSign, upTexV);\n                verticies[vertex++].Set(upBorder, zeroAlphaColor, u + prevDir.Dot(upBorder - point)*invTexSize.x*segSign, 1);\n                verticies[vertex++].Set(down, color, u + prevDir.Dot(down - point)*invTexSize.x*segSign, downTexV);\n                verticies[vertex++].Set(downBorder, zeroAlphaColor, u + prevDir.Dot(downBorder - point)*invTexSize.x*segSign, 0.0f);\n            }\n\n#define POLYGON(A, B, C) \\\n    indexes[poly] = vertex - A - 1; indexes[poly + 1] = vertex - B - 1; indexes[poly + 2] = vertex - C - 1; poly += 3;\n\n            if (i > 0)\n            {\n                POLYGON(6, 2, 7);\n                POLYGON(7, 2, 3);\n                POLYGON(5, 7, 3);\n                POLYGON(5, 3, 1);\n                POLYGON(4, 5, 1);\n                POLYGON(4, 1, 0);\n            }\n        }\n\n        vertexCount = vertex;\n        polyCount = poly/3;\n    }\n\n    // Function that determines if a point is inside the half-space defined by the line\n    bool Inside(const Vec2F& p, const Vec2F& lineBegin, const Vec2F& lineEnd)\n    {\n        return ((lineEnd.x - lineBegin.x) * (p.y - lineBegin.y) - (lineEnd.y - lineBegin.y) * (p.x - lineBegin.x)) < 0;\n    }\n\n    int Geometry::ClipTriangleByLine(const Vertex& a, const Vertex& b, const Vertex& c, const Vec2F& lineBegin, const Vec2F& lineEnd, Vertex* output)\n    {\n        int trianglesCount = 0;\n\n        // Classify vertices as being on one side of the line or the other\n        bool aInside = Inside(a, lineBegin, lineEnd);\n        bool bInside = Inside(b, lineBegin, lineEnd);\n        bool cInside = Inside(c, lineBegin, lineEnd);\n\n        // If all vertices are inside, then return the original triangle\n        if (aInside && bInside && cInside) {\n            output[0] = a;\n            output[1] = b;\n            output[2] = c;\n            trianglesCount = 1;\n        }\n        // If all vertices are outside, return no triangles\n        else if (!aInside && !bInside && !cInside)\n        {\n            trianglesCount = 0;\n        }\n        // If only one vertex is inside, form a new triangle\n        else if (aInside ^ bInside ^ cInside) \n        {\n            if (aInside) \n            {\n                Vertex abIntersection = Intersection::LinesVertex(a, b, lineBegin, lineEnd);\n                Vertex acIntersection = Intersection::LinesVertex(a, c, lineBegin, lineEnd);\n                output[0] = a;\n                output[1] = { abIntersection };\n                output[2] = { acIntersection };\n                trianglesCount = 1;\n            }\n            else if (bInside)\n            {\n                Vertex baIntersection = Intersection::LinesVertex(b, a, lineBegin, lineEnd);\n                Vertex bcIntersection = Intersection::LinesVertex(b, c, lineBegin, lineEnd);\n                output[0] = b;\n                output[1] = { baIntersection };\n                output[2] = { bcIntersection };\n                trianglesCount = 1;\n            }\n            else\n            { // cInside\n                Vertex caIntersection = Intersection::LinesVertex(c, a, lineBegin, lineEnd);\n                Vertex cbIntersection = Intersection::LinesVertex(c, b, lineBegin, lineEnd);\n                output[0] = c;\n                output[1] = { caIntersection };\n                output[2] = { cbIntersection };\n                trianglesCount = 1;\n            }\n        }\n        // If two vertices are inside, form two new triangles\n        else\n        {\n            if (!aInside) \n            {\n                Vertex baIntersection = Intersection::LinesVertex(b, a, lineBegin, lineEnd);\n                Vertex caIntersection = Intersection::LinesVertex(c, a, lineBegin, lineEnd);\n                output[0] = b;\n                output[1] = c;\n                output[2] = { baIntersection };\n                output[3] = c;\n                output[4] = { baIntersection };\n                output[5] = { caIntersection };\n                trianglesCount = 2;\n            }\n            else if (!bInside) \n            {\n                Vertex abIntersection = Intersection::LinesVertex(a, b, lineBegin, lineEnd);\n                Vertex cbIntersection = Intersection::LinesVertex(c, b, lineBegin, lineEnd);\n                output[0] = a;\n                output[1] = c;\n                output[2] = { abIntersection };\n                output[3] = c;\n                output[4] = { abIntersection };\n                output[5] = { cbIntersection };\n                trianglesCount = 2;\n            }\n            else\n            { // !cInside\n                Vertex acIntersection = Intersection::LinesVertex(a, c, lineBegin, lineEnd);\n                Vertex bcIntersection = Intersection::LinesVertex(b, c, lineBegin, lineEnd);\n                output[0] = a;\n                output[1] = b;\n                output[2] = { acIntersection };\n                output[3] = b;\n                output[4] = { acIntersection };\n                output[5] = { bcIntersection };\n                trianglesCount = 2;\n            }\n        }\n\n        return trianglesCount;\n    }\n\n    int Geometry::ClipTriangleByRectangle(const Vertex& a, const Vertex& b, const Vertex& c, Vertex* output, const RectF& clippRect)\n    {\n        // Edges of the rectangle\n        Pair<Vec2F, Vec2F> rectEdges[4] =\n        {\n            { clippRect.LeftTop(), clippRect.RightTop() },\n            { clippRect.RightTop(), clippRect.RightBottom() },\n            { clippRect.RightBottom(), clippRect.LeftBottom() },\n            { clippRect.LeftBottom(), clippRect.LeftTop() }\n        };\n\n        // Two buffers for algorithm\n        Vertex* inputBuffer = output;\n        Vertex* outputBuffer = output + 16;\n\n        // Start with original triangle\n        inputBuffer[0] = a;\n        inputBuffer[1] = b;\n        inputBuffer[2] = c;\n        int inputTrianglesCount = 1;\n        int outputTrianglesCount = 0;\n\n        // For each edge of the rectangle\n        for (int edgeIdx = 0; edgeIdx < 4; edgeIdx++)\n        {\n            for (int i = 0; i < inputTrianglesCount; i++)\n            {\n                // Clip triangle by edge\n                int idx = i*3;\n                outputTrianglesCount += ClipTriangleByLine(inputBuffer[idx], inputBuffer[idx + 1], inputBuffer[idx + 2],\n                                                           rectEdges[edgeIdx].first, rectEdges[edgeIdx].second,\n                                                           outputBuffer + outputTrianglesCount*3);\n            }\n\n            // Swap buffers\n            Math::Swap(inputBuffer, outputBuffer);\n            inputTrianglesCount = outputTrianglesCount;\n            outputTrianglesCount = 0;\n        }\n\n        return inputTrianglesCount;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Geometry.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Border.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\nnamespace o2\n{\n    namespace Geometry\n    {\n        // Function that creates mesh from points\n        void CreatePolyLineMesh(const Vertex* points, int pointsCount, \n                                Vertex*& verticies, UInt& vertexCount, UInt& vertexSize,\n                                VertexIndex*& indexes, UInt& polyCount, UInt& polySize,\n                                float width, float texBorderTop, float texBorderBottom, const Vec2F& texSize,\n                                const Vec2F& invCameraScale = Vec2F(1, 1));\n\n        // Function that clips triangle by line\n        int ClipTriangleByLine(const Vertex& a, const Vertex& b, const Vertex& c,\n                               const Vec2F& lineBegin, const Vec2F& lineEnd,\n                               Vertex* output);\n\n        // Function that clips triangle by rectangle\n        int ClipTriangleByRectangle(const Vertex& a, const Vertex& b, const Vertex& c,\n                                    Vertex* output,\n                                    const RectF& clippRect);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Interpolation.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    template<typename T>\n    inline T Bezier(const T& a, const T& b, const T& c, const T&d, float coef)\n    {\n        float m = 1 - coef;\n        float n = m*m;\n        float o = n*m;\n        float p = coef*coef;\n        float r = p*coef;\n\n        return a*o + b*3.0f*coef*n + c*3.0f*p*m + d*r;\n    }\n\n    inline float SPow(float v)\n    {\n        return v < 0 ? Math::Pow(-v, 1.0f/3.0f) : Math::Pow(v, 1.0f/3.0f);\n    }\n\n    inline float SinErp(float begin, float end, float coef)\n    {\n        return begin + (end - begin) * Math::Sin(coef * Math::PI() * 0.5f);\n    }\n\n    inline float SolveBezier(float p0, float p1, float p2, float p3, float x)\n    {\n        p0 -= x;\n        p1 -= x;\n        p2 -= x;\n        p3 -= x;\n\n        float p2x3 = p2*3.0f;\n        float p1x3 = p1*3.0f;\n        float p0x3 = p0*3.0f;\n\n        float a = p3 - p2x3 + p1x3 - p0;\n        float b = p2x3 - 6.0f * p1 + p0x3;\n        float c = p1x3 - p0x3;\n        float d = p0;\n\n        float inva = 1.0f/a;\n\n        b *= inva;\n        c *= inva;\n        d *= inva;\n\n        float sqb = b*b;\n\n        float p = (3.0f * c - sqb) / 3.0f;\n        float q = (2.0f * b * sqb - 9.0f * b * c + 27.0f * d) / 27.0f;\n\n        float hq = q*0.5f;\n        float tp = p*0.3333333333f;\n\n        float discriminant = hq*hq + tp*tp*tp;\n\n        if (discriminant > 0)\n        {\n            float sqrtd = Math::Sqrt(discriminant);\n            return SPow(-hq + sqrtd) - SPow(hq + sqrtd) - b*0.333333f;\n        }\n        else\n        {\n            float itp = -tp;\n\n            float r = Math::Sqrt(itp*itp*itp);\n            float phi = Math::ACos(-(q / (2.0f * r)));\n            float s = 2.0f * Math::Pow(r, 0.3333333333f);\n\n            float rs = s * Math::Cos(phi*0.333333f + 4.188790204786390f) - b*0.333333f;\n\n            if (rs < 0.0f || rs > 1.0f)\n                rs = s * Math::Cos(phi*0.333333f) - b*0.333333f;\n\n            if (rs < 0.0f || rs > 1.0f)\n                rs = s * Math::Cos(phi*0.333333f + 2.0943951023931f) - b*0.333333f;\n\n            return rs;\n        }\n\n        return 0.0f;\n    }\n\n    inline float YBezier(const Vec2F& a, const Vec2F& b, const Vec2F& c, const Vec2F& d, float x)\n    {\n        return Bezier(a, b, c, d, SolveBezier(a.x, b.x, c.x, d.x, x)).y;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Intersection.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Intersection.h\"\n\nnamespace o2\n{\n    Vec2F Intersection::Lines(const Vec2F& origin1, const Vec2F& dir1, const Vec2F& origin2, const Vec2F& dir2)\n    {\n        float det = dir1.x * dir2.y - dir2.x * dir1.y;\n\n        if (Math::Abs(det) < FLT_EPSILON)\n            return origin1;\n\n        float s = (dir2.y * (origin2.x - origin1.x) - dir2.x * (origin2.y - origin1.y)) / det;\n\n        return Vec2F(origin1.x + s * dir1.x,\n                     origin1.y + s * dir1.y);\n    }\n\n    Vec2F Intersection::LinesNoChek(const Vec2F& origin1, const Vec2F& dir1, const Vec2F& origin2, const Vec2F& dir2)\n    {\n        float det = dir1.x * dir2.y - dir2.x * dir1.y;\n\n        float s = (dir2.y * (origin2.x - origin1.x) - dir2.x * (origin2.y - origin1.y)) / det;\n\n        return Vec2F(origin1.x + s * dir1.x,\n                     origin1.y + s * dir1.y);\n    }\n\n    Vertex Intersection::LinesVertex(const Vertex& a1, const Vertex& b1, const Vec2F& a2, const Vec2F& b2)\n    {\n        Vec2F origin1 = a1, dir1 = (Vec2F)b1 - (Vec2F)a1;\n        Vec2F origin2 = a2, dir2 = b2 - a2;\n\n        float det = dir1.x * dir2.y - dir2.x * dir1.y;\n\n        float s = (dir2.y * (origin2.x - origin1.x) - dir2.x * (origin2.y - origin1.y)) / det;\n\n        return Vertex(origin1.x + s * dir1.x, origin1.y + s * dir1.y, a1.color,\n                      Math::Lerp(a1.tu, b1.tu, s), Math::Lerp(a1.tv, b1.tv, s));\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Intersection.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    namespace Intersection\n    {\n        Vec2F Lines(const Vec2F& origin1, const Vec2F& dir1, const Vec2F& origin2, const Vec2F& dir2);\n        Vec2F LinesNoChek(const Vec2F& origin1, const Vec2F& dir1, const Vec2F& origin2, const Vec2F& dir2);\n        Vertex LinesVertex(const Vertex& a1, const Vertex& b1, const Vec2F& a2, const Vec2F& b2);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Layout.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Layout.h\"\n\nnamespace o2\n{\n    Layout::Layout():\n        anchorMin(0, 0), anchorMax(1.0f, 1.0f), offsetMin(), offsetMax()\n    {}\n\n    Layout::Layout(const Vec2F& anchorMin, const Vec2F& anchorMax, const Vec2F& offsetMin, const Vec2F& offsetMax):\n        anchorMin(anchorMin), anchorMax(anchorMax), offsetMin(offsetMin), offsetMax(offsetMax)\n    {}\n\n    RectF Layout::Calculate(const RectF& source)\n    {\n        Vec2F srcSize = source.Size();\n        return RectF(source.left + srcSize.x*anchorMin.x + offsetMin.x,\n                     source.bottom + srcSize.y*anchorMin.y + offsetMin.y,\n                     source.left + srcSize.x*anchorMax.x + offsetMax.x,\n                     source.bottom + srcSize.y*anchorMax.y + offsetMax.y);\n    }\n\n    bool Layout::operator==(const Layout& other) const\n    {\n        return anchorMin == other.anchorMin && anchorMax == other.anchorMax &&\n            offsetMin == other.offsetMin && offsetMax == other.offsetMax;\n    }\n\n    bool Layout::operator!=(const Layout& other) const\n    {\n        return anchorMin != other.anchorMin || anchorMax != other.anchorMax ||\n            offsetMin != other.offsetMin || offsetMax != other.offsetMax;\n    }\n\n    Layout Layout::BothStretch(const BorderF& border)\n    {\n        return Layout(Vec2F(), Vec2F::One(), border.LeftBottom(), border.RightTop()*-1.0f);\n    }\n\n    Layout Layout::BothStretch(float borderLeft /*= 0*/, float borderBottom /*= 0*/, \n                               float borderRight /*= 0*/, float borderTop /*= 0*/)\n    {\n        Layout res;\n        res.anchorMin = Vec2F(0, 0);\n        res.anchorMax = Vec2F(1, 1);\n        res.offsetMin = Vec2F(borderLeft, borderBottom);\n        res.offsetMax = Vec2F(-borderRight, -borderTop);\n        return res;\n    }\n\n    Layout Layout::Based(BaseCorner corner, const Vec2F& size, const Vec2F& offset /*= Vec2F()*/)\n    {\n        Layout res;\n        switch (corner)\n        {\n            case BaseCorner::Left:\n            res.anchorMin = Vec2F(0.0f, 0.5f);\n            res.anchorMax = Vec2F(0.0f, 0.5f);\n            res.offsetMin = Vec2F(0.0f, -size.y*0.5f) + offset;\n            res.offsetMax = Vec2F(size.x, size.y*0.5f) + offset;\n            break;\n            case BaseCorner::Right:\n            res.anchorMin = Vec2F(1.0f, 0.5f);\n            res.anchorMax = Vec2F(1.0f, 0.5f);\n            res.offsetMin = Vec2F(-size.x, -size.y*0.5f) + offset;\n            res.offsetMax = Vec2F(0.0f, size.y*0.5f) + offset;\n            break;\n            case BaseCorner::Top:\n            res.anchorMin = Vec2F(0.5f, 1.0f);\n            res.anchorMax = Vec2F(0.5f, 1.0f);\n            res.offsetMin = Vec2F(-size.x*0.5f, -size.y) + offset;\n            res.offsetMax = Vec2F(size.x*0.5f, 0.0f) + offset;\n            break;\n            case BaseCorner::Bottom:\n            res.anchorMin = Vec2F(0.5f, 0.0f);\n            res.anchorMax = Vec2F(0.5f, 0.0f);\n            res.offsetMin = Vec2F(-size.x*0.5f, 0.0f) + offset;\n            res.offsetMax = Vec2F(size.x*0.5f, size.y) + offset;\n            break;\n            case BaseCorner::Center:\n            res.anchorMin = Vec2F(0.5f, 0.5f);\n            res.anchorMax = Vec2F(0.5f, 0.5f);\n            res.offsetMin = Vec2F(-size.x*0.5f, -size.y*0.5f) + offset;\n            res.offsetMax = Vec2F(size.x*0.5f, size.y*0.5f) + offset;\n            break;\n            case BaseCorner::LeftBottom:\n            res.anchorMin = Vec2F(0.0f, 0.0f);\n            res.anchorMax = Vec2F(0.0f, 0.0f);\n            res.offsetMin = Vec2F(0.0f, 0.0f) + offset;\n            res.offsetMax = Vec2F(size.x, size.y) + offset;\n            break;\n            case BaseCorner::LeftTop:\n            res.anchorMin = Vec2F(0.0f, 1.0f);\n            res.anchorMax = Vec2F(0.0f, 1.0f);\n            res.offsetMin = Vec2F(0.0f, -size.y) + offset;\n            res.offsetMax = Vec2F(size.x, 0.0f) + offset;\n            break;\n            case BaseCorner::RightBottom:\n            res.anchorMin = Vec2F(1.0f, 0.0f);\n            res.anchorMax = Vec2F(1.0f, 0.0f);\n            res.offsetMin = Vec2F(-size.x, 0.0f) + offset;\n            res.offsetMax = Vec2F(0.0f, size.y) + offset;\n            break;\n            case BaseCorner::RightTop:\n            res.anchorMin = Vec2F(1.0f, 1.0f);\n            res.anchorMax = Vec2F(1.0f, 1.0f);\n            res.offsetMin = Vec2F(-size.x, -size.y) + offset;\n            res.offsetMax = Vec2F(0.0f, 0.0f) + offset;\n            break;\n        }\n\n        return res;\n    }\n\n    Layout Layout::HorStretch(VerAlign align, float left, float right, float height, float offsY /*= 0.0f*/)\n    {\n        Layout res;\n        res.anchorMin.x = 0.0f;\n        res.anchorMax.x = 1.0f;\n        res.offsetMin.x = left;\n        res.offsetMax.x = -right;\n\n        switch (align)\n        {\n            case VerAlign::Top:\n            res.anchorMin.y = 1.0f;\n            res.anchorMax.y = 1.0f;\n            res.offsetMin.y = -offsY - height;\n            res.offsetMax.y = -offsY;\n            break;\n\n            case VerAlign::Middle:\n            res.anchorMin.y = 0.5f;\n            res.anchorMax.y = 0.5f;\n            res.offsetMin.y = offsY - height*0.5f;\n            res.offsetMax.y = offsY + height*0.5f;\n            break;\n\n            case VerAlign::Bottom:\n            res.anchorMin.y = 0.0f;\n            res.anchorMax.y = 0.0f;\n            res.offsetMin.y = offsY;\n            res.offsetMax.y = offsY + height;\n            break;\n\n            case VerAlign::Both:\n            break;\n        }\n\n        return res;\n    }\n\n    Layout Layout::VerStretch(HorAlign align, float top, float bottom, float width, float offsX /*= 0.0f*/)\n    {\n        Layout res;\n        res.anchorMin.y = 0.0f;\n        res.anchorMax.y = 1.0f;\n        res.offsetMin.y = bottom;\n        res.offsetMax.y = -top;\n\n        switch (align)\n        {\n            case HorAlign::Left:\n            res.anchorMin.x = 0.0f;\n            res.anchorMax.x = 0.0f;\n            res.offsetMin.x = offsX + width;\n            res.offsetMax.x = offsX;\n            break;\n\n            case HorAlign::Middle:\n            res.anchorMin.x = 0.5f;\n            res.anchorMax.x = 0.5f;\n            res.offsetMin.x = offsX - width*0.5f;\n            res.offsetMax.x = offsX + width*0.5f;\n            break;\n\n            case HorAlign::Right:\n            res.anchorMin.x = 1.0f;\n            res.anchorMax.x = 1.0f;\n            res.offsetMin.x = -offsX - width;\n            res.offsetMax.x = -offsX;\n            break;\n\n            case HorAlign::Both:\n            break;\n        }\n\n        return res;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Layout, o2__Layout);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Layout.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Border.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nnamespace o2\n{\n    class Layout: public ISerializable\n    {\n    public:\n        Vec2F anchorMin = Vec2F(0, 0); // Left bottom relative anchor point @SERIALIZABLE\n        Vec2F anchorMax = Vec2F(1, 1); // Right top relative anchor point @SERIALIZABLE\n        Vec2F offsetMin = Vec2F(0, 0); // Left bottom offset from relative anchor point @SERIALIZABLE\n        Vec2F offsetMax = Vec2F(0, 0); // Right top offset from relative anchor point @SERIALIZABLE\n\n    public:\n        Layout();\n        Layout(const Vec2F& anchorMin, const Vec2F& anchorMax, const Vec2F& offsetMin, const Vec2F& offsetMax);\n\n        RectF Calculate(const RectF& source);\n\n        bool operator==(const Layout& other) const;\n        bool operator!=(const Layout& other) const;\n\n        static Layout BothStretch(const BorderF& border);\n        static Layout BothStretch(float borderLeft = 0, float borderBottom = 0, float borderRight = 0, float borderTop = 0);\n        static Layout Based(BaseCorner corner, const Vec2F& size, const Vec2F& offset = Vec2F());\n        static Layout HorStretch(VerAlign align, float left, float right, float height, float offsY = 0.0f);\n        static Layout VerStretch(HorAlign align, float top, float bottom, float width, float offsX = 0.0f);\n\n        SERIALIZABLE(Layout);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Layout)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Layout)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(anchorMin);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(1, 1)).NAME(anchorMax);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(offsetMin);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Vec2F(0, 0)).NAME(offsetMax);\n}\nEND_META;\nCLASS_METHODS_META(o2::Layout)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vec2F&, const Vec2F&, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, Calculate, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Layout, BothStretch, const BorderF&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Layout, BothStretch, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Layout, Based, BaseCorner, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Layout, HorStretch, VerAlign, float, float, float, float);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Layout, VerStretch, HorAlign, float, float, float, float);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Math.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"o2/Utils/Math/Math.h\"\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Rect.h\"\n\nnamespace o2\n{\n    namespace Math\n    {\n\n        float Floor(float value)\n        {\n            return floorf(value);\n        }\n\n        float Ceil(float value)\n        {\n            return ceilf(value);\n        }\n\n        Vec2F Round(const Vec2F& value)\n        {\n            return Vec2F(Round(value.x), Round(value.y));\n        }\n\n        RectF Round(const RectF& value)\n        {\n            return RectF(Round(value.left), Round(value.top), Round(value.right), Round(value.bottom));\n        }\n\n        float Round(float value)\n        {\n            return roundf(value);\n        }\n\n        float Pow(float value, float s)\n        {\n            return powf(value, s);\n        }\n\n        int FloorToInt(float value)\n        {\n            return (int)floorf(value);\n        }\n\n        int CeilToInt(float value)\n        {\n            return (int)ceilf(value);\n        }\n\n        float Clamp01(float value)\n        {\n            return Clamp(value, 0.0f, 1.0f);\n        }\n\n        int RoundToInt(float value)\n        {\n            return (int)roundf(value);\n        }\n\n        float Mod(float val, float x)\n        {\n\n            return fmodf(val, x);\n        }\n\n        RectF Lerp(const RectF& a, const RectF& b, float coef)\n        {\n            return RectF(Lerp(a.left, b.left, coef), Lerp(a.top, b.top, coef),\n                         Lerp(a.right, b.right, coef), Lerp(a.bottom, b.bottom, coef));\n        }\n\n        bool Lerp(bool a, bool b, float coef)\n        {\n            return coef < 0.99f ? a : b;\n        }\n\n        int Lerp(int a, int b, float coef)\n        {\n            return (int)((float)(b - a)*coef) + a;\n        }\n\n        bool Equals(float a, float b, float range /*= FLT_EPSILON*/)\n        {\n            float x = a - b;\n            return x*x < range*range;\n        }\n\n        float Sqrt(float value)\n        {\n            return sqrtf(value);\n        }\n\n        float PI()\n        {\n            return 3.1415926535897932384626433832795f;\n        }\n\n        float Deg2rad(const float& value)\n        {\n            return value*(PI() / 180.0f);\n        }\n\n        float Rad2deg(const float& value)\n        {\n            return value*(180.0f / PI());\n        }\n\n        float Sin(float rad)\n        {\n            return sinf(rad);\n        }\n\n        float Cos(float rad)\n        {\n            return cosf(rad);\n        }\n\n        float ASin(float value)\n        {\n            return asinf(value);\n        }\n\n        float ACos(float value)\n        {\n            return acosf(value);\n        }\n\n        float Atan2F(float x, float y)\n        {\n            return atan2f(x, y);\n        }\n\n        void OrthoProjMatrix(float* mat, float left, float right, float bottom, float top, float nearz, float farz)\n        {\n            float tx = -(right + left)/(right - left);\n            float ty = -(top + bottom)/(top - bottom);\n            float tz = -(farz + nearz)/(farz - nearz);\n\n            mat[0] = 2.0f/(right - left); mat[4] = 0.0f;                mat[8] = 0.0f;                  mat[12] = tx;\n            mat[1] = 0.0f;                mat[5] = 2.0f/(top - bottom); mat[9] = 0.0f;                  mat[13] = ty;\n            mat[2] = 0.0f;                mat[6] = 0.0f;                mat[10] = -2.0f/(farz - nearz); mat[14] = tz;\n            mat[3] = 0.0f;                mat[7] = 0.0f;                mat[11] = 0.0f;                 mat[15] = 1.0f;\n        }\n\n        Vec2F CalculateEllipseTangent(const Vec2F& begin, const Vec2F& middle, const Vec2F& end)\n        {\n            Vec2F axis = end - begin;\n            float axisLength = axis.Length();\n            Vec2F axisNorm = axis/axisLength;\n            Vec2F axisNormPerpendicular = axisNorm.Perpendicular();\n\n            Vec2F centerToMiddle = middle - (begin + end)*0.5f;\n\n            float xProjection = axisNorm.Dot(centerToMiddle + (begin + end)*0.5f - begin);\n            float xProjectionFromCenter = xProjection - axisLength*0.5f;\n\n            float ssq = axisLength*axisLength*0.25f - xProjectionFromCenter*xProjectionFromCenter;\n            float circleYProjection = ssq > 0 ? Math::Sqrt(ssq) : 0.00001f;\n\n            Vec2F circlePoint = axisNorm*xProjection + axisNormPerpendicular*circleYProjection;\n            Vec2F centerToCirclePoint = circlePoint - (axis*0.5f);\n            Vec2F circleTangent = centerToCirclePoint.Perpendicular().Inverted().Normalized();\n            float yc = axisNormPerpendicular.Dot(centerToMiddle);\n\n            Vec2F decomposedCircleTangent(axisNorm.Dot(circleTangent), axisNormPerpendicular.Dot(circleTangent));\n            float circleToEllipseScale = (yc/circleYProjection);\n            Vec2F ellipseTangent = (axisNorm*decomposedCircleTangent.x + axisNormPerpendicular*decomposedCircleTangent.y*circleToEllipseScale).Normalized();\n\n            return ellipseTangent;\n        }\n\n        UInt64 Random()\n        {\n            static std::default_random_engine generator;\n            static std::uniform_int_distribution<unsigned long long> distribution;\n            return distribution(generator);\n        }\n\n        void mtxMultiply(float* ret, const float* lhs, const float* rhs)\n        {\n            // [ 0 4  8 12 ]   [ 0 4  8 12 ]\n            // [ 1 5  9 13 ] x [ 1 5  9 13 ]\n            // [ 2 6 10 14 ]   [ 2 6 10 14 ]\n            // [ 3 7 11 15 ]   [ 3 7 11 15 ]\n            ret[0] = lhs[0] * rhs[0] + lhs[4] * rhs[1] + lhs[8] * rhs[2] + lhs[12] * rhs[3];\n            ret[1] = lhs[1] * rhs[0] + lhs[5] * rhs[1] + lhs[9] * rhs[2] + lhs[13] * rhs[3];\n            ret[2] = lhs[2] * rhs[0] + lhs[6] * rhs[1] + lhs[10] * rhs[2] + lhs[14] * rhs[3];\n            ret[3] = lhs[3] * rhs[0] + lhs[7] * rhs[1] + lhs[11] * rhs[2] + lhs[15] * rhs[3];\n\n            ret[4] = lhs[0] * rhs[4] + lhs[4] * rhs[5] + lhs[8] * rhs[6] + lhs[12] * rhs[7];\n            ret[5] = lhs[1] * rhs[4] + lhs[5] * rhs[5] + lhs[9] * rhs[6] + lhs[13] * rhs[7];\n            ret[6] = lhs[2] * rhs[4] + lhs[6] * rhs[5] + lhs[10] * rhs[6] + lhs[14] * rhs[7];\n            ret[7] = lhs[3] * rhs[4] + lhs[7] * rhs[5] + lhs[11] * rhs[6] + lhs[15] * rhs[7];\n\n            ret[8] = lhs[0] * rhs[8] + lhs[4] * rhs[9] + lhs[8] * rhs[10] + lhs[12] * rhs[11];\n            ret[9] = lhs[1] * rhs[8] + lhs[5] * rhs[9] + lhs[9] * rhs[10] + lhs[13] * rhs[11];\n            ret[10] = lhs[2] * rhs[8] + lhs[6] * rhs[9] + lhs[10] * rhs[10] + lhs[14] * rhs[11];\n            ret[11] = lhs[3] * rhs[8] + lhs[7] * rhs[9] + lhs[11] * rhs[10] + lhs[15] * rhs[11];\n\n            ret[12] = lhs[0] * rhs[12] + lhs[4] * rhs[13] + lhs[8] * rhs[14] + lhs[12] * rhs[15];\n            ret[13] = lhs[1] * rhs[12] + lhs[5] * rhs[13] + lhs[9] * rhs[14] + lhs[13] * rhs[15];\n            ret[14] = lhs[2] * rhs[12] + lhs[6] * rhs[13] + lhs[10] * rhs[14] + lhs[14] * rhs[15];\n            ret[15] = lhs[3] * rhs[12] + lhs[7] * rhs[13] + lhs[11] * rhs[14] + lhs[15] * rhs[15];\n        }\n    }\n} \n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Math.h",
    "content": "#pragma once\n\n#include <float.h>\n#include <math.h>\n#include <random>\n#include <stdlib.h>\n#include \"o2/Utils/Types/CommonTypes.h\"\n\nnamespace o2\n{\n    template<typename T> class Rect;\n    template<typename T> class Vec2;\n    typedef Vec2<float> Vec2F;\n    typedef Rect<float> RectF;\n\n    namespace Math\n    {\n\t\tconst float Epsilon = FLT_EPSILON;\n\n        float Floor(float value);\n        int FloorToInt(float value);\n\n        float Ceil(float value);\n        int CeilToInt(float value);\n\n        float Round(float value);\n        Vec2F Round(const Vec2F& value);\n        RectF Round(const RectF& value);\n        int RoundToInt(float value);\n\n        float Mod(float val, float x);\n\n        float Pow(float value, float s);\n\n        template<typename T>\n        T Sign(const T& value);\n\n        template<typename T>\n        T Clamp(const T& value, const T& minv, const T& maxv);\n\n        float Clamp01(float value);\n\n        template<typename T>\n        T Min(const T& v1, const T& v2);\n\n        template<typename T>\n        T Max(const T& v1, const T& v2);\n\n        template<typename T>\n        void Swap(T& v1, T& v2);\n\n        template<typename T>\n        T Abs(const T& value);\n\n        template<typename T>\n        T Random(const T& minValue = 0, const T& maxValue = 1);\n        \n        UInt64 Random();\n\n        template<typename T>\n        T Lerp(const T& a, const T& b, float coef);\n\n        template<typename T>\n        T Lerpc(const T& a, const T& b, float coef);\n\n        RectF Lerp(const RectF& a, const RectF& b, float coef);\n        bool Lerp(bool a, bool b, float coef);\n        int Lerp(int a, int b, float coef);\n\n        bool Equals(float a, float b, float range = FLT_EPSILON);\n\n        template<typename T>\n        bool Equals(const T& a, const T& b);\n\n        template<typename T>\n        bool Fewer(const T& a, const T& b);\n\n        template<typename T>\n        bool Greater(const T& a, const T& b);\n\n        float Sqrt(float value);\n\n        template<typename T>\n        T Sqr(T value);\n\n        float PI();\n        float Deg2rad(const float& value);\n        float Rad2deg(const float& value);\n\n        float Sin(float rad);\n        float Cos(float rad);\n        float ASin(float value);\n        float ACos(float value);\n        float Atan2F(float x, float y);\n\n        // Builds a orthographic projection matrix\n        void OrthoProjMatrix(float* mat, float left, float right, float bottom, float top, float nearz, float farz);\n\n        // Calculates tangent vector on ellipse that located on axis begin-end at point middle\n        Vec2F CalculateEllipseTangent(const Vec2F& begin, const Vec2F& middle, const Vec2F& end);\n        \n        // Multiplicates matrixes 4x4\n        void mtxMultiply(float* ret, const float* lhs, const float* rhs);\n        \n        template<typename T>\n        T Sign(const T& value)\n        {\n            if (value < 0)\n                return (T)(-1);\n\n            return (T)1;\n        }\n\n        template<typename T>\n        T Clamp(const T& value, const T& minv, const T& maxv)\n        {\n            if (value < minv)\n                return minv;\n\n            if (value > maxv)\n                return maxv;\n\n            return value;\n        }\n\n        template<typename T>\n        T Min(const T& v1, const T& v2)\n        {\n            return std::min(v1, v2);\n        }\n\n        template<typename T>\n        T Max(const T& v1, const T& v2)\n        {\n            return std::max(v1, v2);\n        }\n\n        template<typename T>\n        void Swap(T& v1, T& v2)\n        {\n            std::swap(v1, v2);\n        }\n        \n        template<typename T>\n        T Abs(const T& value)\n        {\n            return std::abs(value);\n        }\n\n        template<typename T>\n        T Random(const T& minValue /*= 0*/, const T& maxValue /*= 1*/)\n        {\n            return (T)((float)rand() / RAND_MAX*(float)(maxValue - minValue) + (float)minValue);\n        }\n\n        template<typename T>\n        T Lerp(const T& a, const T& b, float coef)\n        {\n            return (b - a)*coef + a;\n        }\n\n        template<typename T>\n        T Lerpc(const T& a, const T& b, float coef)\n        {\n            return (b - a)*Clamp01(coef) + a;\n        }\n\n        template<typename T>\n        bool Equals(const T& a, const T& b)\n        {\n            return a == b;\n        }\n\n        template<typename T>\n        bool Fewer(const T& a, const T& b)\n        {\n            return a < b;\n        }\n\n        template<typename T>\n        bool Greater(const T& a, const T& b)\n        {\n            return a > b;\n        }\n\n        template<typename T>\n        T Sqr(T value)\n        {\n            return value*value;\n        }\n    }\n\n} //namespace o2\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Rect.h",
    "content": "#pragma once\n\n#include <algorithm>\n#include <float.h>\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    class DataValue;\n\n    template<typename T>\n    class Rect\n    {\n    public:\n        T left;\n        T top;\n        T right;\n        T bottom;\n\n    public:\n        inline Rect();\n        inline Rect(const Vec2<T>& leftTop, const Vec2<T>& rightDown);\n        inline Rect(T left, T top, T right, T bottom);\n\n        template<typename RT>\n        inline operator Rect<RT>() const;\n\n        inline bool    operator==(const Rect<T>& rt) const;\n        inline bool    operator!=(const Rect<T>& rt) const;\n\n        inline Rect<T> operator+(const Vec2<T>& v) const;\n        inline Rect<T> operator+=(const Vec2<T>& v);\n\n        inline Rect<T> operator+(const Rect<T>& r) const;\n        inline Rect<T> operator+=(const Rect<T>& r);\n\n        inline Rect<T> operator-(const Vec2<T>& v) const;\n        inline Rect<T> operator-=(const Vec2<T>& v);\n\n        inline Rect<T> operator*(const Vec2<T>& v) const;\n        inline Rect<T> operator*=(const Vec2<T>& v);\n\n        inline Rect<T> operator/(const Vec2<T>& v) const;\n        inline Rect<T> operator/=(const Vec2<T>& v);\n\n        inline Rect<T> operator*(float v) const;\n        inline Rect<T> operator*=(float v);\n\n        inline Rect<T> operator/(float v) const;\n        inline Rect<T> operator/=(float v);\n\n        inline void Set(T vleft, T vtop, T vright, T vbottom);\n        inline void Set(const Vec2<T>& leftTop, const Vec2<T>& rightDown);\n\n        inline void SetPosition(const Vec2<T>& position);\n        inline void SetSize(const Vec2<T>& size);\n\n        inline Vec2<T> Size() const;\n        inline Vec2<T> Position() const;\n        inline Vec2<T> Center() const;\n\n        inline T Width() const;\n        inline T Height() const;\n\n        inline Vec2<T> LeftTop() const;\n        inline Vec2<T> RightTop() const;\n        inline Vec2<T> LeftBottom() const;\n        inline Vec2<T> RightBottom() const;\n\n        inline Rect Expand(const Rect& other) const;\n        inline Rect Move(const Vec2<T>& offset) const;\n        inline Rect AddSize(const Vec2<T>& size) const;\n\n        inline Rect Scale(const Vec2<T>& scale) const;\n        inline Rect Scale(const Vec2<T>& scale, const Vec2<T>& origin) const;\n        inline Rect Scale(float scale) const;\n\n        template<typename T2>\n        inline bool IsInside(const Vec2<T2>& p) const;\n        inline bool IsIntersects(const Rect& other) const;\n\n        inline Rect GetIntersection(const Rect& other) const;\n\n        inline bool IsZero() const;\n\n        static Rect Bound(Vec2<T>* points, int count);\n\n    protected:\n        inline void Normalize();\n    };\n\n    typedef Rect<float> RectF;\n    typedef Rect<int>   RectI;\n\n    template<typename T>\n    Rect<T>::Rect():\n        left(0), right(0), top(0), bottom(0)\n    {\n    }\n\n    template<typename T>\n    Rect<T>::Rect(const Vec2<T>& leftTop, const Vec2<T>& rightDown)\n    {\n        left = Math::Min(leftTop.x, rightDown.x);\n        right = Math::Max(leftTop.x, rightDown.x);\n        top = Math::Max(leftTop.y, rightDown.y);\n        bottom = Math::Min(leftTop.y, rightDown.y);\n    }\n\n    template<typename T>\n    Rect<T>::Rect(T left, T top, T right, T bottom)\n    {\n        this->left = Math::Min(left, right);\n        this->right = Math::Max(left, right);\n        this->top = Math::Max(top, bottom);\n        this->bottom = Math::Min(top, bottom);\n    }\n\n    template<typename T>\n    template<typename RT>\n    Rect<T>::operator Rect<RT>() const\n    {\n        return Rect<RT>((RT)left, (RT)top, (RT)right, (RT)bottom);\n    }\n\n    template<typename T>\n    bool Rect<T>::operator==(const Rect<T>& rt) const\n    {\n        return Math::Abs(left - rt.left) <= (T)FLT_EPSILON && Math::Abs(top - rt.top) <= (T)FLT_EPSILON &&\n            Math::Abs(right - rt.right) <= (T)FLT_EPSILON && Math::Abs(bottom - rt.bottom) <= (T)FLT_EPSILON;\n    }\n\n    template<typename T>\n    bool Rect<T>::operator!=(const Rect<T>& rt) const\n    {\n        return !(*this == rt);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator+(const Vec2<T>& v) const\n    {\n        return Rect(left + v.x, top + v.y, right + v.x, bottom + v.y);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator+=(const Vec2<T>& v)\n    {\n        left += v.x; top += v.y;\n        right += v.x; bottom += v.y;\n        return *this;\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator+(const Rect<T>& r) const\n    {\n        return Rect(Math::Min(left, r.left),\n                    Math::Max(top, r.top),\n                    Math::Max(right, r.right),\n                    Math::Min(bottom, r.bottom));\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator+=(const Rect<T>& r)\n    {\n        left = Math::Min(left, r.left);\n        top = Math::Max(top, r.top);\n        right = Math::Max(right, r.right);\n        bottom = Math::Min(bottom, r.bottom);\n        return *this;\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator-(const Vec2<T>& v) const\n    {\n        return Rect(left - v.x, top - v.y, right - v.x, bottom - v.y);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator-=(const Vec2<T>& v)\n    {\n        left -= v.x; top -= v.y;\n        right -= v.x; bottom -= v.y;\n        return *this;\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator*(const Vec2<T>& v) const\n    {\n        return Rect(left, top, left + (right - left)*v.x, top + (bottom - top)*v.y);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator*=(const Vec2<T>& v)\n    {\n        right = left + (right - left)*v.x;\n        bottom = top + (bottom - top)*v.y;\n        Normalize();\n        return *this;\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator/(const Vec2<T>& v) const\n    {\n        return Rect<T>(left, top, left + (right - left)/v.x, top + (bottom - top)/v.y);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator/=(const Vec2<T>& v)\n    {\n        right = left + (right - left)/v.x;\n        bottom = top + (bottom - top)/v.y;\n        Normalize();\n        return *this;\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator*(float v) const\n    {\n        return Rect<T>(left, top, left + (right - left)*v, top + (bottom - top)*v);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator*=(float v)\n    {\n        right = left + (right - left)*v;\n        bottom = top + (bottom - top)*v;\n        Normalize();\n        return *this;\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator/(float v) const\n    {\n        float t = 1.0f/v;\n        return Rect<T>(left, top, left + (right - left)*t, top + (bottom - top)*t);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::operator/=(float v)\n    {\n        float t = 1.0f/v;\n        right = left + (right - left)*t;\n        bottom = top + (bottom - top)*t;\n        Normalize();\n        return *this;\n    }\n\n    template<typename T>\n    void Rect<T>::Set(T vleft, T vtop, T vright, T vbottom)\n    {\n        left = Math::Min(vleft, vright);\n        right = Math::Max(vleft, vright);\n        top = Math::Max(vtop, vbottom);\n        bottom = Math::Min(vtop, vbottom);\n    }\n\n    template<typename T>\n    void Rect<T>::Set(const Vec2<T>& leftTop, const Vec2<T>& rightDown)\n    {\n        left = Math::Min(leftTop.x, rightDown.x);\n        right = Math::Max(leftTop.x, rightDown.x);\n        top = Math::Max(leftTop.y, rightDown.y);\n        bottom = Math::Min(leftTop.y, rightDown.y);\n    }\n\n    template<typename T>\n    void Rect<T>::Normalize()\n    {\n        T _left = left, _right = right, _top = top, _bottom = bottom;\n        left = Math::Min(_left, _right);\n        right = Math::Max(_left, _right);\n        top = Math::Max(_top, _bottom);\n        bottom = Math::Min(_top, _bottom);\n    }\n\n    template<typename T>\n    void Rect<T>::SetPosition(const Vec2<T>& position)\n    {\n        T dx = position.x - left, dy = position.y - top;\n        left += dx; right += dx;\n        top += dy; bottom += dy;\n    }\n\n    template<typename T>\n    void Rect<T>::SetSize(const Vec2<T>& size)\n    {\n        right = left + size.x; bottom = top + size.y;\n        Normalize();\n    }\n\n    template<typename T>\n    Vec2<T> Rect<T>::Size() const\n    {\n        return Vec2<T>(Width(), Height());\n    }\n\n    template<typename T>\n    Vec2<T> Rect<T>::Position() const\n    {\n        return Vec2<T>(left, top);\n    }\n\n    template<typename T>\n    Vec2<T> Rect<T>::Center() const\n    {\n        return Vec2<T>((T)((left + right)*0.5f), (T)((top + bottom)*0.5f));\n    }\n\n    template<typename T>\n    T Rect<T>::Width() const\n    {\n        return right - left;\n    }\n\n    template<typename T>\n    T Rect<T>::Height() const\n    {\n        return top - bottom;\n    }\n\n    template<typename T>\n    Vec2<T> Rect<T>::LeftTop() const\n    {\n        return Vec2<T>(left, top);\n    }\n\n    template<typename T>\n    Vec2<T> Rect<T>::RightTop() const\n    {\n        return Vec2<T>(right, top);\n    }\n\n    template<typename T>\n    Vec2<T> Rect<T>::LeftBottom() const\n    {\n        return Vec2<T>(left, bottom);\n    }\n\n    template<typename T>\n    Vec2<T> Rect<T>::RightBottom() const\n    {\n        return Vec2<T>(right, bottom);;\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::Expand(const Rect& other) const\n    {\n        return Rect(Math::Min(left, other.left),\n                    Math::Max(top, other.top),\n                    Math::Max(right, other.right),\n                    Math::Min(bottom, other.bottom));\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::Move(const Vec2<T>& offset) const\n    {\n        return Rect<T>(left + offset.x, top + offset.y, right + offset.x, bottom + offset.y);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::AddSize(const Vec2<T>& size) const\n    {\n        return Rect(left, top, right + size.x, bottom + size.y);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::Scale(const Vec2<T>& scale) const\n    {\n        return Rect(left, right, left + (right - left)*scale.x, top + (bottom - top)*scale.y);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::Scale(const Vec2<T>& scale, const Vec2<T>& origin) const\n    {\n        return Rect<T>((LeftTop() - origin)*scale + origin, (RightBottom() - origin)*scale + origin);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::Scale(float scale) const\n    {\n        return Rect(left, right, left + (T)((right - left)*scale), top + (T)((bottom - top)*scale));\n    }\n\n    template<typename T>\n    template<typename T2>\n    bool Rect<T>::IsInside(const Vec2<T2>& p) const\n    {\n        return (T)p.x > left && (T)p.x < right && (T)p.y < top && (T)p.y > bottom;\n    }\n\n    template<typename T>\n    bool Rect<T>::IsIntersects(const Rect& other) const\n    {\n        return !(right < other.left || left > other.right || bottom > other.top || top < other.bottom);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::GetIntersection(const Rect& other) const\n    {\n        if (!IsIntersects(other))\n            return Rect(0, 0, 0, 0);\n\n        T xAxies[] ={left, right, other.left, other.right};\n        T yAxies[] ={top, bottom, other.top, other.bottom};\n\n        std::sort(xAxies, xAxies + 4);\n        std::sort(yAxies, yAxies + 4);\n\n        return Rect(xAxies[1], yAxies[2], xAxies[2], yAxies[1]);\n    }\n\n    template<typename T>\n    bool Rect<T>::IsZero() const\n    {\n        return Math::Equals((float)left, 0.0f) && Math::Equals((float)right, 0.0f) &&\n            Math::Equals((float)top, 0.0f) && Math::Equals((float)bottom, 0.0f);\n    }\n\n    template<typename T>\n    Rect<T> Rect<T>::Bound(Vec2<T>* points, int count)\n    {\n        Rect res(points[0], points[0]);\n        for (int i = 1; i < count; i++)\n        {\n            res.left = Math::Min(res.left, points[i].x);\n            res.right = Math::Max(res.right, points[i].x);\n            res.top = Math::Max(res.top, points[i].y);\n            res.bottom = Math::Min(res.bottom, points[i].y);\n        }\n\n        return res;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Spline.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Spline.h\"\n\n#include \"o2/Utils/Math/Interpolation.h\"\n#include \"o2/Utils/Tools/KeySearch.h\"\n\nnamespace o2\n{\n    Spline::Spline()\n    {}\n\n    Spline::Spline(const Vector<Vec2F>& values, bool smooth /*= true*/)\n    {\n        AppendKeys(values, smooth);\n    }\n\n    Spline::Spline(const Spline& other) :\n        mKeys(other.mKeys)\n    { }\n\n    bool Spline::operator!=(const Spline& other) const\n    {\n        return !(*this == other);\n    }\n\n    bool Spline::operator==(const Spline& other) const\n    {\n        if (mKeys.Count() != other.mKeys.Count())\n            return false;\n\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i] != other.mKeys[i])\n                return false;\n        }\n\n        return true;\n    }\n\n    Spline& Spline::operator=(const Spline& other)\n    {\n        mKeys = other.mKeys;\n\n        UpdateApproximation();\n\n        onKeysChanged();\n\n        return *this;\n    }\n\n    Spline& Spline::operator+=(const Spline& other)\n    {\n        AppendSpline(other);\n        return *this;\n    }\n\n    Vec2F Spline::Evaluate(float position, float randomRangeCoef /*= 0.0f*/) const\n    {\n        int cacheKey = 0, cacheKeyApprox = 0;\n        return Evaluate(position, randomRangeCoef, true, cacheKey, cacheKeyApprox);\n    }\n\n    Vec2F Spline::Evaluate(float position, float randomRangeCoef, bool direction, int& cacheKey, int& cacheKeyApprox) const\n    {\n        int count = mKeys.Count();\n\n        if (count == 1)\n            return mKeys[0].value;\n        else if (count == 0)\n            return Vec2F();\n\n        int prevCacheKey = cacheKey;\n        int keyLeftIdx = -1, keyRightIdx = -1;\n\n        if (mClosed)\n            SearchKeyClosed(mKeys, count, position, keyLeftIdx, keyRightIdx, direction, cacheKey);\n        else\n            SearchKey(mKeys, count, position, keyLeftIdx, keyRightIdx, direction, cacheKey);\n\n        if (keyLeftIdx < 0)\n            return Vec2F();\n\n        const Key& rightKey = mKeys[keyRightIdx];\n\n        int segBeginIdx = 0;\n        int segEndIdx = 1;\n\n        if (keyLeftIdx != prevCacheKey)\n            cacheKeyApprox = 0;\n\n        SearchKey(rightKey.mLeftApproxValues, Key::mApproxValuesCount, position, segBeginIdx, segEndIdx, direction, cacheKeyApprox);\n\n        const ApproximationVec2F& segBeginLeft = rightKey.mLeftApproxValues[segBeginIdx];\n        const ApproximationVec2F& segEndLeft = rightKey.mLeftApproxValues[segEndIdx];\n\n        const ApproximationVec2F& segBeginRight = rightKey.mRightApproxValues[segBeginIdx];\n        const ApproximationVec2F& segEndRight = rightKey.mRightApproxValues[segEndIdx];\n\n        float dist = segEndLeft.position - segBeginLeft.position;\n        float coef = (position - segBeginLeft.position) / dist;\n\n        return Math::Lerp(Math::Lerp(segBeginLeft.value, segEndLeft.value, coef),\n                          Math::Lerp(segBeginRight.value, segEndRight.value, coef), randomRangeCoef);\n    }\n\n    void Spline::BeginKeysBatchChange()\n    {\n        mBatchChange = true;\n    }\n\n    void Spline::CompleteKeysBatchingChange()\n    {\n        UpdateApproximation();\n        mBatchChange = false;\n        mChangedKeys = false;\n    }\n\n    void Spline::SetClosed(bool closed)\n    {\n        mClosed = closed;\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    bool Spline::IsClosed() const\n    {\n        return mClosed;\n    }\n\n    void Spline::AppendSpline(const Spline& Spline)\n    {\n        AppendKeys(Spline.mKeys);\n    }\n\n    void Spline::PrependSpline(const Spline& Spline)\n    {\n        PrependKeys(Spline.mKeys);\n    }\n\n    void Spline::InsertSpline(const Spline& Spline, int idx)\n    {\n        InsertKeys(Spline.mKeys, idx);\n    }\n\n    void Spline::AppendKeys(const Vector<Vec2F>& values, bool smooth /*= true*/)\n    {\n        AppendKeys(values.Convert<Key>([=](const Vec2F& v) {\n            Key res(v, 0.0f, Vec2F(), Vec2F());\n            res.supportsType = smooth ? Key::Type::Smooth : Key::Type::Broken;\n            return res;\n        }));\n    }\n\n    void Spline::AppendKeys(const Vector<Key>& keys)\n    {\n        if (keys.IsEmpty())\n            return;\n\n        mKeys.Add(keys);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Spline::PrependKeys(const Vector<Vec2F>& values, bool smooth /*= true*/)\n    {\n        PrependKeys(values.Convert<Key>([=](const Vec2F& v) {\n            Key res(v, 0.0f, Vec2F(), Vec2F());\n            res.supportsType = smooth ? Key::Type::Smooth : Key::Type::Broken;\n            return res;\n        }));\n    }\n\n    void Spline::PrependKeys(const Vector<Key>& keys)\n    {\n        if (keys.IsEmpty())\n            return;\n\n        mKeys.Insert(keys, 0);\n\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Spline::InsertKeys(const Vector<Vec2F>& values, int idx, bool smooth /*= true*/)\n    {\n        InsertKeys(values.Convert<Key>([=](const Vec2F& v) {\n            Key res(v, 0.0f, Vec2F(), Vec2F());\n            res.supportsType = smooth ? Key::Type::Smooth : Key::Type::Broken;\n            return res;\n        }), idx);\n    }\n\n    void Spline::InsertKeys(const Vector<Key>& keys, int idx)\n    {\n        if (keys.IsEmpty())\n            return;\n\n        mKeys.Insert(keys, idx);\n\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Spline::InsertKey(const Key& key, int idx)\n    {\n        mKeys.Insert(key, idx);\n\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Spline::InsertKey(int idx, const Vec2F& position, float rangeValue, const Vec2F& prevSupport, const Vec2F& nextSupport)\n    {\n        InsertKey(Key(position, rangeValue, prevSupport, nextSupport), idx);\n    }\n\n    void Spline::InsertKey(int idx, const Vec2F& position, float rangeValue, float smoothCoef /*= 1.0f*/)\n    {\n        \n        mKeys.Insert(Key(position, rangeValue, Vec2F(), Vec2F()), idx);\n        SmoothKey(idx, smoothCoef);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    int Spline::AppendKey(const Vec2F& position, float rangeValue, const Vec2F& prevSupport, const Vec2F& nextSupport)\n    {\n        Key newKey(position, rangeValue, prevSupport, nextSupport);\n\n        newKey.supportsType = Key::Type::Broken;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return mKeys.Count() - 1;\n    }\n\n    int Spline::AppendKey(const Vec2F& position, float rangeValue /*= 0.0f*/, float smoothCoef /*= 1.0f*/)\n    {\n        Key newKey(position, rangeValue, Vec2F(), Vec2F());\n        newKey.supportsType = Key::Type::Smooth;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return mKeys.Count() - 1;\n    }\n\n    int Spline::PrependKey(const Vec2F& position, float rangeValue, const Vec2F& prevSupport, const Vec2F& nextSupport)\n    {\n        Key newKey(position, rangeValue, prevSupport, nextSupport);\n        newKey.supportsType = Key::Type::Broken;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return 0;\n    }\n\n    int Spline::PrependKey(const Vec2F& position, float rangeValue /*= 0.0f*/, float smoothCoef /*= 1.0f*/)\n    {\n        Key newKey(position, rangeValue, Vec2F(), Vec2F());\n        newKey.supportsType = Key::Type::Smooth;\n\n        mKeys.Add(newKey);\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return 0;\n    }\n\n    Spline::Key Spline::GetKey(int idx) const\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return Key();\n\n        return mKeys[idx];\n    }\n\n    Spline::Key Spline::FindKey(UInt64 uid) const\n    {\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return key;\n        }\n\n        return Key();\n    }\n\n    int Spline::GetNextKey(float position) const\n    {\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].position > position)\n                return i;\n        }\n\n        return 0;\n    }\n\n    int Spline::FindKeyIdx(UInt64 uid) const\n    {\n        int idx = 0;\n        for (auto& key : mKeys)\n        {\n            if (key.uid == uid)\n                return idx;\n\n            idx++;\n        }\n\n        return -1;\n    }\n\n    bool Spline::RemoveKey(int idx)\n    {\n        if (idx < 0 || idx >= mKeys.Count())\n            return false;\n\n        mKeys.RemoveAt(idx);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n\n        return true;\n    }\n\n    void Spline::RemoveAllKeys()\n    {\n        mKeys.Clear();\n        onKeysChanged();\n    }\n\n    const Vector<Spline::Key>& Spline::GetKeys() const\n    {\n        return mKeys;\n    }\n\n    void Spline::SetKeys(const Vector<Key>& keys)\n    {\n        mKeys = keys;\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Spline::SetKey(const Key& key, int idx)\n    {\n        if (idx < 0 || idx > mKeys.Count() - 1)\n            return;\n\n        mKeys[idx] = key;\n        CheckSmoothKeys();\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    void Spline::SmoothKey(int idx, float smoothCoef)\n    {\n        InternalSmoothKeyAt(idx, smoothCoef);\n\n        if (mBatchChange)\n            mChangedKeys = true;\n        else\n            UpdateApproximation();\n    }\n\n    float Spline::Length() const\n    {\n        if (mKeys.Count() == 0)\n            return 0.0f;\n\n        return mClosed ? mKeys[0].position : mKeys.Last().position;\n    }\n\n    bool Spline::IsEmpty() const\n    {\n        return mKeys.Count() == 0;\n    }\n\n    RectF Spline::GetRect() const\n    {\n        RectF res;\n\n        if (mKeys.Count() < 2)\n            return res;\n\n        res.left = mKeys[1].mLeftApproxValues[0].value.x; res.right = mKeys[1].mLeftApproxValues[0].value.x;\n        res.top = mKeys[1].mLeftApproxValues[0].value.y; res.bottom = mKeys[1].mLeftApproxValues[0].value.y;\n\n        for (int k = 1; k < mKeys.Count(); k++)\n        {\n            auto& key = mKeys[k];\n            for (int i = 0; i < Key::mApproxValuesCount; i++)\n            {\n                res.left = Math::Min(key.mLeftApproxValues[i].value.x, res.left);\n                res.right = Math::Max(key.mLeftApproxValues[i].value.x, res.right);\n                res.top = Math::Max(key.mLeftApproxValues[i].value.y, res.top);\n                res.bottom = Math::Min(key.mLeftApproxValues[i].value.y, res.bottom);\n\n                res.left = Math::Min(key.mRightApproxValues[i].value.x, res.left);\n                res.right = Math::Max(key.mRightApproxValues[i].value.x, res.right);\n                res.top = Math::Max(key.mRightApproxValues[i].value.y, res.top);\n                res.bottom = Math::Min(key.mRightApproxValues[i].value.y, res.bottom);\n            }\n        }\n\n        return res;\n    }\n\n    const Spline::Key& Spline::operator[](int idx) const\n    {\n        if (idx >=0 && idx <= mKeys.Count() - 1)\n            return mKeys[idx];\n\n        static Key empty;\n        return empty;\n    }\n\n    Spline::Key& Spline::operator[](int idx)\n    {\n        if (idx >=0 && idx <= mKeys.Count() - 1)\n            return mKeys[idx];\n\n        static Key empty;\n        return empty;\n    }\n\n    void Spline::CheckSmoothKeys()\n    {\n        for (int i = 0; i < mKeys.Count(); i++)\n        {\n            if (mKeys[i].supportsType == Key::Type::Smooth)\n                InternalSmoothKeyAt(i);\n        }\n    }\n\n    void Spline::UpdateApproximation()\n    {\n        float lengthLeft = 0.0f;\n        float lengthRight = 0.0f;\n\n        Vec2F prevLeft;\n        Vec2F prevRight;\n\n        auto calculateApproximation = [&](int begin, int end) {\n            Key& beginKey = mKeys[begin];\n            Key& endKey = mKeys[end];\n\n            Vec2F beginNormal = Key::GetRangeNormal(beginKey.value, begin == 0 ? nullptr : &mKeys[begin - 1].value, begin == mKeys.Count() - 1 ? nullptr : &mKeys[begin + 1].value);\n            Vec2F beginRange = beginNormal * beginKey.valueRange;\n\n            Vec2F endNormal = Key::GetRangeNormal(endKey.value, end == 0 ? nullptr : &mKeys[end - 1].value, end == mKeys.Count() - 1 ? nullptr : &mKeys[end + 1].value);\n            Vec2F endRange = endNormal * endKey.valueRange;\n\n            Vec2F beginLeft = beginKey.value + beginRange;\n            Vec2F beginSupportLeft = beginKey.value + beginRange + beginKey.nextSupport;\n            Vec2F endSupportLeft = endKey.value + endRange + endKey.prevSupport;\n            Vec2F endLeft = endKey.value + endRange;\n\n            Vec2F beginRight = beginKey.value - beginRange;\n            Vec2F beginSupportRight = beginKey.value - beginRange + beginKey.nextSupport;\n            Vec2F endSupportRight = endKey.value - endRange + endKey.prevSupport;\n            Vec2F endRight = endKey.value - endRange;\n\n            endKey.mApproxValuesBounds.Set(beginLeft, beginLeft);\n            for (int j = 0; j < Key::mApproxValuesCount; j++)\n            {\n                float coef = (float)j / (float)(Key::mApproxValuesCount - 1);\n                Vec2F pointLeft = Bezier(beginLeft, beginSupportLeft, endSupportLeft, endLeft, coef);\n                Vec2F pointRight = Bezier(beginRight, beginSupportRight, endSupportRight, endRight, coef);\n\n                if (begin == 0 && j == 0)\n                {\n                    prevLeft = pointLeft;\n                    prevRight = pointRight;\n                }\n\n                lengthLeft += (pointLeft - prevLeft).Length();\n                prevLeft = pointLeft;\n\n                lengthRight += (pointRight - prevRight).Length();\n                prevRight = pointRight;\n\n                endKey.mLeftApproxValues[j].value = pointLeft;\n                endKey.mLeftApproxValues[j].position = lengthLeft;\n\n                endKey.mRightApproxValues[j].value = pointRight;\n                endKey.mRightApproxValues[j].position = lengthRight;\n\n                endKey.mApproxValuesBounds.left = Math::Min(endKey.mApproxValuesBounds.left, pointLeft.x);\n                endKey.mApproxValuesBounds.right = Math::Max(endKey.mApproxValuesBounds.right, pointLeft.x);\n                endKey.mApproxValuesBounds.top = Math::Max(endKey.mApproxValuesBounds.top, pointLeft.y);\n                endKey.mApproxValuesBounds.bottom = Math::Min(endKey.mApproxValuesBounds.bottom, pointLeft.y);\n\n                endKey.mApproxValuesBounds.left = Math::Min(endKey.mApproxValuesBounds.left, pointRight.x);\n                endKey.mApproxValuesBounds.right = Math::Max(endKey.mApproxValuesBounds.right, pointRight.x);\n                endKey.mApproxValuesBounds.top = Math::Max(endKey.mApproxValuesBounds.top, pointRight.y);\n                endKey.mApproxValuesBounds.bottom = Math::Min(endKey.mApproxValuesBounds.bottom, pointRight.y);\n            }\n\n            mKeys[end].position = lengthLeft;\n        };\n\n        for (int i = 1; i < mKeys.Count(); i++)\n            calculateApproximation(i - 1, i);\n\n        if (mClosed && !mKeys.IsEmpty())\n            calculateApproximation(mKeys.Count() - 1, 0);\n\n        onKeysChanged();\n    }\n\n    Vector<Spline::Key> Spline::GetKeysNonContant()\n    {\n        return mKeys;\n    }\n\n    void Spline::OnDeserialized(const DataValue& node)\n    {\n        UpdateApproximation();\n    }\n\n    void Spline::InternalSmoothKeyAt(int idx, float smoothCoef /*= 1.0f*/)\n    {\n        const float baseSmoothCoef = 0.5f;\n\n        Key& key = mKeys[idx];\n        Vec2F thisKeyPoint = key.value;\n\n        if (idx == 0)\n        {\n            Key& nextKey = mKeys[Math::Min(idx + 1, mKeys.Count() - 1)];\n\n            Vec2F nextKeyPoint = nextKey.value;\n            Vec2F supportVec = (nextKeyPoint - thisKeyPoint)*baseSmoothCoef*smoothCoef;\n\n            key.nextSupport = supportVec;\n        }\n        else if (idx == mKeys.Count() - 1)\n        {\n            Key& lastKey = mKeys[Math::Max(0, idx - 1)];\n\n            Vec2F lastKeyPoint = lastKey.value;\n            Vec2F supportVec = (lastKeyPoint - thisKeyPoint)*baseSmoothCoef*smoothCoef;\n\n            key.prevSupport = supportVec;\n        }\n        else\n        {\n            Key& lastKey = mKeys[Math::Max(0, idx - 1)];\n            Key& nextKey = mKeys[Math::Min(idx + 1, mKeys.Count())];\n\n            Vec2F lastKeyPoint = lastKey.value;\n            Vec2F nextKeyPoint = nextKey.value;\n\n            Vec2F thisToLast = lastKeyPoint - thisKeyPoint;\n            Vec2F thisToNext = nextKeyPoint - thisKeyPoint;\n\n            float supportLength = Math::Min(thisToNext.Length(), thisToLast.Length())*baseSmoothCoef*smoothCoef;\n            Vec2F supportVec = Math::CalculateEllipseTangent(lastKeyPoint, thisKeyPoint, nextKeyPoint)*supportLength;\n\n            key.prevSupport = supportVec.Inverted();\n            key.nextSupport = supportVec;\n        }\n    }\n\n    Spline::Key::Key()\n    {}\n\n    Spline::Key::Key(const Vec2F& value, float valueRange, const Vec2F& prevSupport, const Vec2F& nextSupport) :\n        value(value), valueRange(valueRange), prevSupport(prevSupport), nextSupport(nextSupport), supportsType(Type::Broken)\n    { }\n\n    Spline::Key::Key(const Key& other) :\n        uid(other.uid), value(other.value), valueRange(other.valueRange), position(other.position), prevSupport(other.prevSupport),\n        nextSupport(other.nextSupport), supportsType(other.supportsType), mApproxValuesBounds(other.mApproxValuesBounds)\n    {\n        memcpy(mLeftApproxValues, other.mLeftApproxValues, mApproxValuesCount * sizeof(ApproximationVec2F));\n        memcpy(mRightApproxValues, other.mRightApproxValues, mApproxValuesCount * sizeof(ApproximationVec2F));\n    }\n\n    Spline::Key::operator Vec2F() const\n    {\n        return value;\n    }\n\n    const ApproximationVec2F* Spline::Key::GetApproximatedPointsLeft() const\n    {\n        return mLeftApproxValues;\n    }\n\n    const ApproximationVec2F* Spline::Key::GetApproximatedPointsRight() const\n    {\n        return mRightApproxValues;\n    }\n\n    int Spline::Key::GetApproximatedPointsCount() const\n    {\n        return mApproxValuesCount;\n    }\n\n    const RectF& Spline::Key::GetGetApproximatedPointsBounds() const\n    {\n        return mApproxValuesBounds;\n    }\n\n    Vec2F Spline::Key::GetRangeNormal(const Vec2F& position, Vec2F* prev, Vec2F* next)\n    {\n        if (!prev && !next)\n            return Vec2F(0.0f, 1.0f);\n\n        if (!prev)\n            return (*next - position).Normalized().Perpendicular();\n\n        if (!next)\n            return (position - *prev).Normalized().Perpendicular();\n\n        Vec2F nextDirNorm = (*next - position).Normalized().Perpendicular();\n        Vec2F prevDirNorm = (position - *prev).Normalized().Perpendicular();\n\n        return ((nextDirNorm + prevDirNorm)*0.5f).Normalized();\n    }\n\n    Spline::Key& Spline::Key::operator=(const Vec2F& value)\n    {\n        this->value = value;\n        return *this;\n    }\n\n    Spline::Key& Spline::Key::operator=(const Key& other)\n    {\n        uid = other.uid;\n        value = other.value;\n        valueRange = other.valueRange;\n        position = other.position;\n        prevSupport = other.prevSupport;\n        nextSupport = other.nextSupport;\n        supportsType = other.supportsType;\n        mApproxValuesBounds = other.mApproxValuesBounds;\n\n        memcpy(mLeftApproxValues, other.mLeftApproxValues, mApproxValuesCount * sizeof(Vec2F));\n        memcpy(mRightApproxValues, other.mRightApproxValues, mApproxValuesCount * sizeof(Vec2F));\n\n        return *this;\n    }\n\n    bool Spline::Key::operator!=(const Key& other) const\n    {\n        return !(*this == other);\n    }\n\n    bool Spline::Key::operator==(const Key& other) const\n    {\n        return Math::Equals(position, other.position) && Math::Equals(value, other.value) &&\n            Math::Equals(prevSupport, other.prevSupport) &&\n            Math::Equals(nextSupport, other.nextSupport) &&\n            supportsType == other.supportsType;\n    }\n\n}\n// --- META ---\n\nENUM_META(o2::Spline::Key::Type, o2__Spline__Key__Type)\n{\n    ENUM_ENTRY(Broken);\n    ENUM_ENTRY(Free);\n    ENUM_ENTRY(Smooth);\n}\nEND_ENUM_META;\n\nDECLARE_CLASS(o2::Spline, o2__Spline);\n\nDECLARE_CLASS(o2::Spline::Key, o2__Spline__Key);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Spline.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/ApproximationValue.h\"\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    // -------------\n    // Bezier spline\n    // -------------\n    class Spline: public ISerializable, public RefCounterable\n    {\n    public:\n        class Key;\n\n    public:\n        PROPERTIES(Spline);\n        PROPERTY(Vector<Key>, keys, SetKeys, GetKeys); // Keys property\n        GETTER(float, length, Length);                 // Length of spline\n\n    public:\n        Function<void()> onKeysChanged; // Keys changed event\n\n    public:\n        // Default constructor\n        Spline();\n\n        // Constructor from keys with smoothing\n        Spline(const Vector<Vec2F>& values, bool smooth = true);\n\n        // Copy-constructor\n        Spline(const Spline& other);\n\n        // Is equals operator\n        bool operator==(const Spline& other) const;\n\n        // Is not equals operator\n        bool operator!=(const Spline& other) const;\n\n        // Assign operator\n        Spline& operator=(const Spline& other);\n\n        // Append other Spline at end\n        Spline& operator+=(const Spline& other);\n\n        // Returns value by position\n        Vec2F Evaluate(float position, float randomRangeCoef = 0.0f) const;\n\n        // Returns value by position\n        Vec2F Evaluate(float position, float randomRangeCoef, bool direction, int& cacheKey, int& cacheKeyApprox) const;\n\n        // Called when beginning keys batch change. After this call all keys modifications will not be update approximation\n        // Used for optimizing many keys change\n        void BeginKeysBatchChange();\n\n        // Called when keys batch change completed. Updates approximation\n        void CompleteKeysBatchingChange();\n\n        // Sets spline closed or not\n        void SetClosed(bool closed);\n\n        // Returns is spline closed\n        bool IsClosed() const;\n\n        // Appends Spline at end\n        void AppendSpline(const Spline& Spline);\n\n        // Prepends Spline at end\n        void PrependSpline(const Spline& Spline);\n\n        // Inserts Spline at position\n        void InsertSpline(const Spline& Spline, int idx);\n\n        // Adds keys with smoothing at end\n        void AppendKeys(const Vector<Vec2F>& values, bool smooth = true);\n\n        // Adds keys at end\n        void AppendKeys(const Vector<Key>& keys);\n\n        // Adds keys with smoothing at beginning\n        void PrependKeys(const Vector<Vec2F>& values, bool smooth = true);\n\n        // Adds keys at beginning\n        void PrependKeys(const Vector<Key>& keys);\n\n        // Inserts keys with smoothing at position\n        void InsertKeys(const Vector<Vec2F>& values, int idx, bool smooth = true);\n\n        // Inserts keys at position\n        void InsertKeys(const Vector<Key>& keys, int idx);\n\n        // Inserts key and returns index\n        void InsertKey(const Key& key, int idx);\n\n        // Inserts key and returns index\n        void InsertKey(int idx, const Vec2F& position, float rangeValue, const Vec2F& prevSupport, const Vec2F& nextSupport);\n\n        // Inserts value at position with smoothing and returns index\n        void InsertKey(int idx, const Vec2F&, float rangeValue = 0.0f, float smoothCoef = 1.0f);\n\n        // Appends key at end with offset and returns index\n        int AppendKey(const Vec2F&, float rangeValue, const Vec2F& prevSupport, const Vec2F& nextSupport);\n\n        // Appends key at end with offset and smoothing and returns index\n        int AppendKey(const Vec2F&, float rangeValue = 0.0f, float smoothCoef = 1.0f);\n\n        // Prepends key at beginning with offset and returns index\n        int PrependKey(const Vec2F&, float rangeValue, const Vec2F& prevSupport, const Vec2F& nextSupport);\n\n         // Prepends key at beginning with offset and smoothing and returns index\n        int PrependKey(const Vec2F&, float rangeValue = 0.0f, float smoothCoef = 1.0f);\n\n        // Removes key at index\n        bool RemoveKey(int idx);\n\n        // Removes all keys\n        void RemoveAllKeys();\n\n        // Returns keys array\n        const Vector<Key>& GetKeys() const;\n\n        // Returns key at index\n        Key GetKey(int idx) const;\n\n        // Returns key by uid\n        Key FindKey(UInt64 uid) const;\n\n        // Returns next key at position\n        int GetNextKey(float position) const;\n\n        // Returns key index by uid\n        int FindKeyIdx(UInt64 uid) const;\n\n        // Sets keys\n        void SetKeys(const Vector<Key>& keys);\n\n        // Sets key data at position\n        void SetKey(const Key& key, int idx);\n\n        // Smooths key at position\n        void SmoothKey(int idx, float smoothCoef = 1.0f);\n\n        // Returns length of spline\n        float Length() const;\n\n        // Returns true if Spline is empty\n        bool IsEmpty() const;\n\n        // Returns bounding approximated keys rectangle\n        RectF GetRect() const;\n\n        // Key access operator by index\n        const Key& operator[](int idx) const;\n\n        // Key access operator by index\n        Key& operator[](int idx);\n\n        SERIALIZABLE(Spline);\n\n    public:\n        // ---------\n        // Spline key\n        // ---------\n        class Key: public ISerializable\n        {\n        public:\n            enum class Type { Smooth, Free, Broken };\n\n        public:\n            UInt64 uid = Math::Random();        // Random unique id @SERIALIZABLE\n            float  position = 0.0f;             // Position from start, or length @SERIALIZABLE\n            Vec2F  value;                       // Main position @SERIALIZABLE\n            float  valueRange = 0.0f;           // Value range @SERIALIZABLE\n            Vec2F  prevSupport;                 // Previous support point @SERIALIZABLE\n            Vec2F  nextSupport;                 // Next support point @SERIALIZABLE\n            Type   supportsType = Type::Smooth; // Type of support points @SERIALIZABLE\n\n        public:\n            //Default constructor\n            Key();\n\n            // Constructor\n            Key(const Vec2F& value, float valueRange, const Vec2F& prevSupport, const Vec2F& nextSupport);\n\n            // Copy-constructor\n            Key(const Key& other);\n\n            // Copy operator\n            Key& operator=(const Key& other);\n\n            // Assign from value operator\n            Key& operator=(const Vec2F& position);\n\n            // Vec2F cast operator\n            operator Vec2F() const;\n\n            // Check equals operator\n            bool operator==(const Key& other) const;\n\n            // Check not equals operator\n            bool operator!=(const Key& other) const;\n\n            // Returns approximated points\n            const ApproximationVec2F* GetApproximatedPointsLeft() const;\n\n            // Returns approximated points\n            const ApproximationVec2F* GetApproximatedPointsRight() const;\n\n            // Returns approximated points count\n            int GetApproximatedPointsCount() const;\n\n            // Returns bounds of approximation values\n            const RectF& GetGetApproximatedPointsBounds() const;\n\n            // Returns range normal. Prev and next can be nullptr\n            static Vec2F GetRangeNormal(const Vec2F& position, Vec2F* prev, Vec2F* next);\n\n            SERIALIZABLE(Key);\n\n        public:\n            static const int   mApproxValuesCount = 20;                // Approximation values count\n            ApproximationVec2F mLeftApproxValues[mApproxValuesCount];  // Approximation values from left side\n            ApproximationVec2F mRightApproxValues[mApproxValuesCount]; // Approximation values from right side\n            RectF              mApproxValuesBounds;                    // Bounds of approximation values\n\n            friend class Spline;\n        };\n\n    protected:\n        bool mBatchChange = false; // It is true when began batch change\n        bool mChangedKeys = false; // It is true when some keys changed during batch change\n\n        Vector<Key> mKeys; // Spline keys @SERIALIZABLE\n\n        bool mClosed = false; // Is spline closed\n\n    protected:\n        // Checks all smooth keys and updates supports points\n        void CheckSmoothKeys();\n\n        // Updates approximation\n        void UpdateApproximation();\n\n        // Returns keys (for property)\n        Vector<Key> GetKeysNonContant();\n\n        // Completion deserialization callback\n        void OnDeserialized(const DataValue& node) override;\n\n        // Smooths key at index and doesn't updates approximation\n        void InternalSmoothKeyAt(int idx, float smoothCoef = 1.0f);\n    };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::Spline::Key::Type);\n\nCLASS_BASES_META(o2::Spline)\n{\n    BASE_CLASS(o2::ISerializable);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Spline)\n{\n    FIELD().PUBLIC().NAME(keys);\n    FIELD().PUBLIC().NAME(length);\n    FIELD().PUBLIC().NAME(onKeysChanged);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mBatchChange);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mChangedKeys);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().NAME(mKeys);\n    FIELD().PROTECTED().DEFAULT_VALUE(false).NAME(mClosed);\n}\nEND_META;\nCLASS_METHODS_META(o2::Spline)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<Vec2F>&, bool);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Spline&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, Evaluate, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, Evaluate, float, float, bool, int&, int&);\n    FUNCTION().PUBLIC().SIGNATURE(void, BeginKeysBatchChange);\n    FUNCTION().PUBLIC().SIGNATURE(void, CompleteKeysBatchingChange);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetClosed, bool);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsClosed);\n    FUNCTION().PUBLIC().SIGNATURE(void, AppendSpline, const Spline&);\n    FUNCTION().PUBLIC().SIGNATURE(void, PrependSpline, const Spline&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertSpline, const Spline&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, AppendKeys, const Vector<Vec2F>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, AppendKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, PrependKeys, const Vector<Vec2F>&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, PrependKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertKeys, const Vector<Vec2F>&, int, bool);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertKeys, const Vector<Key>&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertKey, const Key&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertKey, int, const Vec2F&, float, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, InsertKey, int, const Vec2F&, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, AppendKey, const Vec2F&, float, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(int, AppendKey, const Vec2F&, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, PrependKey, const Vec2F&, float, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(int, PrependKey, const Vec2F&, float, float);\n    FUNCTION().PUBLIC().SIGNATURE(bool, RemoveKey, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, RemoveAllKeys);\n    FUNCTION().PUBLIC().SIGNATURE(const Vector<Key>&, GetKeys);\n    FUNCTION().PUBLIC().SIGNATURE(Key, GetKey, int);\n    FUNCTION().PUBLIC().SIGNATURE(Key, FindKey, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetNextKey, float);\n    FUNCTION().PUBLIC().SIGNATURE(int, FindKeyIdx, UInt64);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKeys, const Vector<Key>&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetKey, const Key&, int);\n    FUNCTION().PUBLIC().SIGNATURE(void, SmoothKey, int, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, Length);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEmpty);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetRect);\n    FUNCTION().PROTECTED().SIGNATURE(void, CheckSmoothKeys);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateApproximation);\n    FUNCTION().PROTECTED().SIGNATURE(Vector<Key>, GetKeysNonContant);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, InternalSmoothKeyAt, int, float);\n}\nEND_META;\n\nCLASS_BASES_META(o2::Spline::Key)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Spline::Key)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Math::Random()).NAME(uid);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(position);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(value);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(valueRange);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(prevSupport);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(nextSupport);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().DEFAULT_VALUE(Type::Smooth).NAME(supportsType);\n    FIELD().PUBLIC().NAME(mLeftApproxValues);\n    FIELD().PUBLIC().NAME(mRightApproxValues);\n    FIELD().PUBLIC().NAME(mApproxValuesBounds);\n}\nEND_META;\nCLASS_METHODS_META(o2::Spline::Key)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vec2F&, float, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Key&);\n    FUNCTION().PUBLIC().SIGNATURE(const ApproximationVec2F*, GetApproximatedPointsLeft);\n    FUNCTION().PUBLIC().SIGNATURE(const ApproximationVec2F*, GetApproximatedPointsRight);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetApproximatedPointsCount);\n    FUNCTION().PUBLIC().SIGNATURE(const RectF&, GetGetApproximatedPointsBounds);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(Vec2F, GetRangeNormal, const Vec2F&, Vec2F*, Vec2F*);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Transform.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Transform.h\"\n\nnamespace o2\n{\n    Transform::Transform(const Vec2F& size /*= Vec2F()*/, const Vec2F& position /*= Vec2F()*/,\n                         float angle /*= 0.0f*/, const Vec2F& scale /*= Vec2F(1.0f, 1.0f)*/,\n                         const Vec2F& pivot /*= Vec2F(0.5f, 0.5f)*/):\n        mSize(size), mPosition(position), mAngle(angle), mScale(scale), mPivot(pivot), mShear(0)\n    {\n        UpdateTransform();\n    }\n\n    Transform::Transform(const Transform& other):\n        mSize(other.mSize), mPosition(other.mPosition), mAngle(other.mAngle), mScale(other.mScale),\n        mPivot(other.mPivot), mShear(other.mShear), mTransform(other.mTransform),\n        mNonSizedTransform(other.mNonSizedTransform)\n    {}\n\n    void Transform::OnDeserialized(const DataValue& node)\n    {\n        UpdateTransform();\n    }\n\n    void Transform::UpdateTransform()\n    {\n        mNonSizedTransform = Basis::Build(mPosition, mScale, mAngle, mShear);\n        mTransform.Set(mNonSizedTransform.origin, mNonSizedTransform.xv * mSize.x, mNonSizedTransform.yv * mSize.y);\n        mTransform.origin = mTransform.origin - mTransform.xv*mPivot.x - mTransform.yv*mPivot.y;\n        mNonSizedTransform.origin = mTransform.origin;\n\n        BasisChanged();\n    }\n\n    bool Transform::IsSerializeEnabled() const\n    {\n        return mSerializeEnabled;\n    }\n\n    Transform& Transform::operator=(const Transform& other)\n    {\n        mPosition = other.mPosition;\n        mSize = other.mSize;\n        mScale = other.mScale;\n        mPivot = other.mPivot;\n        mAngle = other.mAngle;\n        mShear = other.mShear;\n        mTransform = other.mTransform;\n        mNonSizedTransform = other.mNonSizedTransform;\n\n        UpdateTransform();\n        BasisChanged();\n\n        return *this;\n    }\n\n    bool Transform::operator==(const Transform& other) const\n    {\n        return mPosition == other.mPosition &&\n            mSize == other.mSize &&\n            mScale == other.mScale &&\n            mPivot == other.mPivot &&\n            Math::Equals(mAngle, other.mAngle) &&\n            Math::Equals(mShear, other.mShear) &&\n            mTransform == other.mTransform &&\n            mNonSizedTransform == other.mNonSizedTransform;\n    }\n\n    bool Transform::operator!=(const Transform& other) const\n    {\n        return !operator==(other);\n    }\n\n    void Transform::SetPosition(const Vec2F& position)\n    {\n        mPosition = position;\n        UpdateTransform();\n    }\n\n    Vec2F Transform::GetPosition() const\n    {\n        return mPosition;\n    }\n\n    void Transform::SetPositionX(float value)\n    {\n        mPosition.x = value;\n        UpdateTransform();\n    }\n\n    float Transform::GetPositionX() const\n    {\n        return mPosition.x;\n    }\n    \n    void Transform::SetPositionY(float value)\n    {\n        mPosition.y = value;\n        UpdateTransform();\n    }\n    \n    float Transform::GetPositionY() const\n    {\n        return mPosition.y;\n    }\n\n    void Transform::SetSize(const Vec2F& size)\n    {\n        mSize = size;\n        UpdateTransform();\n    }\n\n    Vec2F Transform::GetSize() const\n    {\n        return mSize;\n    }\n\n    void Transform::SetWidth(float width)\n    {\n        SetSize(Vec2F(width, GetHeight()));\n    }\n\n    float Transform::GetWidth() const\n    {\n        return GetSize().x;\n    }\n\n    void Transform::SetHeight(float height)\n    {\n        SetSize(Vec2F(GetWidth(), height));\n    }\n\n    float Transform::GetHeight() const\n    {\n        return GetSize().y;\n    }\n\n    void Transform::SetPivot(const Vec2F& pivot)\n    {\n        mPivot = pivot;\n        UpdateTransform();\n    }\n\n    Vec2F Transform::GetPivot() const\n    {\n        return mPivot;\n    }\n\n    void Transform::SetWorldPivot(const Vec2F& pivot)\n    {\n        SetSizePivot(World2LocalPoint(pivot));\n    }\n\n    Vec2F Transform::GetWorldPivot() const\n    {\n        return Local2WorldPoint(mPivot*mSize);\n    }\n\n    void Transform::SetSizePivot(const Vec2F& relPivot)\n    {\n        SetPivot(relPivot / mSize);\n    }\n\n    Vec2F Transform::GetSizePivot() const\n    {\n        return mPivot*mSize;\n    }\n\n    void Transform::SetRect(const RectF& rect, bool bySize /*= true*/)\n    {\n        if (bySize)\n            mSize = rect.Size()/mScale;\n        else\n            mScale = rect.Size()/mSize;\n\n        mPosition = rect.LeftBottom() + Vec2F(mSize.x*mScale.x, mSize.y*mScale.y)*mPivot;\n\n        UpdateTransform();\n    }\n\n    RectF Transform::GetRect() const\n    {\n        return RectF(mTransform.origin, mTransform.origin + mTransform.xv + mTransform.yv);\n    }\n\n    void Transform::SetScale(const Vec2F& scale)\n    {\n        mScale = scale;\n        UpdateTransform();\n    }\n\n    Vec2F Transform::GetScale() const\n    {\n        return mScale;\n    }\n\n    void Transform::SetScaleX(float scale)\n    {\n        SetScale(Vec2F(scale, GetScaleY()));\n    }\n\n    float Transform::GetScaleX() const\n    {\n        return GetScale().x;\n    }\n\n    void Transform::SetScaleY(float scale)\n    {\n        SetScale(Vec2F(GetScaleX(), scale));\n    }\n\n    float Transform::GetScaleY() const\n    {\n        return GetScale().y;\n    }\n\n    void Transform::SetAngle(float rad)\n    {\n        mAngle = rad;\n        UpdateTransform();\n    }\n\n    float Transform::GetAngle() const\n    {\n        return mAngle;\n    }\n\n    void Transform::SetAngleDegrees(float deg)\n    {\n        mAngle = Math::Deg2rad(deg);\n        UpdateTransform();\n    }\n\n    float Transform::GetAngleDegrees() const\n    {\n        return Math::Rad2deg(mAngle);\n    }\n\n    void Transform::SetShear(float shear)\n    {\n        mShear = shear;\n        UpdateTransform();\n    }\n\n    float Transform::GetShear() const\n    {\n        return mShear;\n    }\n\n    void Transform::SetBasis(const Basis& basis)\n    {\n        Vec2F offset, scale;\n        float angle, shear;\n        basis.Decompose(&offset, &angle, &scale, &shear);\n\n        mAngle = angle;\n        mSize = scale / mScale;\n        mShear = shear;\n\n        mPosition = basis.origin + basis.xv*mPivot.x + basis.yv*mPivot.y;\n        UpdateTransform();\n    }\n\n    Basis Transform::GetBasis() const\n    {\n        return mTransform;\n    }\n\n    void Transform::SetNonSizedBasis(const Basis& basis)\n    {\n        Vec2F offset, scale;\n        float angle, shear;\n        basis.Decompose(&offset, &angle, &scale, &shear);\n\n        mAngle = angle;\n        mScale = scale;\n        mShear = shear;\n\n        mPosition = basis.origin + basis.xv*mPivot.x*mSize.x + basis.yv*mPivot.y*mSize.y;\n        UpdateTransform();\n    }\n\n    Basis Transform::GetNonSizedBasis() const\n    {\n        return mNonSizedTransform;\n    }\n\n    void Transform::SetAxisAlignedRect(const RectF& rect)\n    {\n        RectF curRect = GetAxisAlignedRect();\n\n        Basis curRectBasis(curRect.LeftBottom(), Vec2F::Right()*curRect.Width(), Vec2F::Up()*curRect.Height());\n        Basis rectBasis(rect.LeftBottom(), Vec2F::Right()*rect.Width(), Vec2F::Up()*rect.Height());\n\n        SetBasis(mTransform*curRectBasis.Inverted()*rectBasis);\n    }\n\n    RectF Transform::GetAxisAlignedRect() const\n    {\n        return mTransform.AABB();\n    }\n\n    void Transform::SetLeftTop(const Vec2F& position)\n    {\n        Basis transformed = mTransform;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 1.0f)*mTransform;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mTransform.xv);\n        Vec2F frameDeltaY = delta.Project(mTransform.yv);\n\n        transformed.origin += frameDeltaX;\n        transformed.xv -= frameDeltaX;\n        transformed.yv += frameDeltaY;\n\n        SetBasis(transformed);\n    }\n\n    Vec2F Transform::GetLeftTop() const\n    {\n        return mTransform.origin + mTransform.yv;\n    }\n\n    void Transform::SetRightTop(const Vec2F& position)\n    {\n        Basis transformed = mTransform;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 1.0f)*mTransform;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mTransform.xv);\n        Vec2F frameDeltaY = delta.Project(mTransform.yv);\n\n        transformed.xv += frameDeltaX;\n        transformed.yv += frameDeltaY;\n\n        SetBasis(transformed);\n    }\n\n    Vec2F Transform::GetRightTop() const\n    {\n        return mTransform.origin + mTransform.yv + mTransform.xv;\n    }\n\n    void Transform::SetLeftBottom(const Vec2F& position)\n    {\n        Basis transformed = mTransform;\n        Vec2F lastHandleCoords = Vec2F(0.0f, 0.0f)*mTransform;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mTransform.xv);\n        Vec2F frameDeltaY = delta.Project(mTransform.yv);\n\n        transformed.origin += frameDeltaX + frameDeltaY;\n        transformed.xv -= frameDeltaX;\n        transformed.yv -= frameDeltaY;\n\n        SetBasis(transformed);\n    }\n\n    Vec2F Transform::GetLeftBottom() const\n    {\n        return mTransform.origin;\n    }\n\n    void Transform::SetRightBottom(const Vec2F& position)\n    {\n        Basis transformed = mTransform;\n        Vec2F lastHandleCoords = Vec2F(1.0f, 0.0f)*mTransform;\n        Vec2F delta = position - lastHandleCoords;\n        Vec2F frameDeltaX = delta.Project(mTransform.xv);\n        Vec2F frameDeltaY = delta.Project(mTransform.yv);\n\n        transformed.origin += frameDeltaY;\n        transformed.xv += frameDeltaX;\n        transformed.yv -= frameDeltaY;\n\n        SetBasis(transformed);\n    }\n\n    Vec2F Transform::GetRightBottom() const\n    {\n        return mTransform.origin + mTransform.xv;\n    }\n\n    void Transform::SetCenter(const Vec2F& position)\n    {\n        Vec2F translate = position - GetCenter();\n        SetBasis(mTransform*Basis::Translated(translate));\n    }\n\n    Vec2F Transform::GetCenter() const\n    {\n        return mTransform.origin + (mTransform.xv + mTransform.yv)*0.5f;\n    }\n\n    void Transform::SetRight(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetRight().SignedAngle(dir));\n        SetBasis(mTransform*transf);\n    }\n\n    Vec2F Transform::GetRight() const\n    {\n        return mNonSizedTransform.xv / (mSize.x*mScale.x);\n    }\n\n    void Transform::SetLeft(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetLeft().SignedAngle(dir));\n        SetBasis(mTransform*transf);\n    }\n\n    Vec2F Transform::GetLeft() const\n    {\n        return mNonSizedTransform.xv / (-(mSize.x*mScale.x));\n    }\n\n    void Transform::SetUp(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetUp().SignedAngle(dir));\n        SetBasis(mTransform*transf);\n    }\n\n    Vec2F Transform::GetUp() const\n    {\n        return mNonSizedTransform.yv / (mSize.y*mScale.y);\n    }\n\n    void Transform::SetDown(const Vec2F& dir)\n    {\n        Basis transf = Basis::Rotated(GetDown().SignedAngle(dir));\n        SetBasis(mTransform*transf);\n    }\n\n    Vec2F Transform::GetDown() const\n    {\n        return mNonSizedTransform.yv / (-(mSize.y*mScale.y));\n    }\n\n    void Transform::LookAt(const Vec2F& worldPoint)\n    {\n        SetUp((worldPoint - mPosition).Normalized());\n    }\n\n    Vec2F Transform::World2LocalPoint(const Vec2F& worldPoint) const\n    {\n        Vec2F nx = mTransform.xv, ny = mTransform.yv, offs = mTransform.origin, w = worldPoint;\n        float lx = (w.x*ny.y - offs.x*ny.y - w.y*ny.x + offs.y*ny.x) / (nx.x*ny.y - ny.x*nx.y);\n        float ly = (w.y - offs.y - nx.y*lx) / ny.y;\n        return Vec2F(lx, ly)*mSize;\n    }\n\n    Vec2F Transform::Local2WorldPoint(const Vec2F& localPoint) const\n    {\n        return mTransform*(localPoint / mSize);\n    }\n\n    Vec2F Transform::World2LocalDir(const Vec2F& worldDir) const\n    {\n        Vec2F nx = mTransform.xv / (mSize.x*mScale.x), ny = mTransform.yv / (mSize.y*mScale.y), wd = worldDir;\n        float ldy = (wd.x*nx.y - wd.y*nx.x) / (nx.y*ny.x - ny.y*nx.x);\n        float ldx = (wd.x - ny.x*ldy) / nx.x;\n        return Vec2F(ldx, ldy);\n    }\n\n    Vec2F Transform::Local2WorldDir(const Vec2F& localDir) const\n    {\n        Vec2F nx = mTransform.xv / (mSize.x*mScale.x), ny = mTransform.yv / (mSize.y*mScale.y);\n        return nx*localDir.x + ny*localDir.y;\n    }\n\n    bool Transform::IsPointInside(const Vec2F& point) const\n    {\n        Vec2F rs = mScale*mSize;\n        Vec2F nx = mTransform.xv / rs.x, ny = mTransform.yv / rs.y;\n        Vec2F lp = point - mTransform.origin;\n\n        float dx = lp.Dot(nx);\n        float dy = lp.Dot(ny);\n\n        return dx >= 0.0f && dx <= rs.x && dy >= 0.0f && dy < rs.y;\n    }\n\n    void Transform::SetSerializeEnabled(bool enabled)\n    {\n        mSerializeEnabled = enabled;\n    }\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::Transform, o2__Transform);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Transform.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Editor/Attributes/AnimatableAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/EditorPropertyAttribute.h\"\n#include \"o2/Utils/Editor/Attributes/ScriptableAttribute.h\"\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nnamespace o2\n{\n    class Transform : virtual public ISerializable\n    {\n    public:\n        PROPERTIES(Transform);\n        PROPERTY(Vec2F, position, SetPosition, GetPosition);            // Position property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(float, positionX, SetPositionX, GetPositionX);         // Position property by X @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(float, positionY, SetPositionY, GetPositionY);         // Position property by Y @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(Vec2F, size, SetSize, GetSize);                        // Size property @EDITOR_IGNORE @SCRIPTABLE\n        PROPERTY(float, width, SetWidth, GetWidth);                     // Width property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(float, height, SetHeight, GetHeight);                  // Height property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(Vec2F, scale, SetScale, GetScale);                     // Scale property @EDITOR_IGNORE @SCRIPTABLE\n        PROPERTY(float, scaleX, SetScaleX, GetScaleX);                  // Scale X property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(float, scaleY, SetScaleY, GetScaleY);                  // Scale Y property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(Vec2F, pivot, SetPivot, GetPivot);                     // Pivot property, in local space @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(Vec2F, worldPivot, SetWorldPivot, GetWorldPivot);      // Pivot property, in world space @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(Vec2F, szPivot, SetSizePivot, GetSizePivot);           // Pivot in size space property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(float, angle, SetAngle, GetAngle);                     // Rotation angle in radians @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(float, angleDegree, SetAngleDegrees, GetAngleDegrees); // Rotation angle in degrees @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(float, shear, SetShear, GetShear);                     // Shear property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n\n        PROPERTY(Basis, basis, SetBasis, GetBasis);                         // Transformation basis property @EDITOR_IGNORE @ANIMATABLE\n        PROPERTY(Basis, nonSizedBasis, SetNonSizedBasis, GetNonSizedBasis); // Non sizes transformation basis property @EDITOR_IGNORE @ANIMATABLE\n\n        PROPERTY(RectF, rect, SetRect, GetRect);                       // Rectangle property. Sets the position and size @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(RectF, AABB, SetAxisAlignedRect, GetAxisAlignedRect); // Axis aligned rectangle @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n\n        PROPERTY(Vec2F, leftTop, SetLeftTop, GetLeftTop);             // Left top corner property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(Vec2F, leftBottom, SetLeftBottom, GetLeftBottom);    // Left bottom corner property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(Vec2F, rightTop, SetRightTop, GetRightTop);          // Left top corner property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(Vec2F, rightBottom, SetRightBottom, GetRightBottom); // Left top corner property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n        PROPERTY(Vec2F, center, SetCenter, GetCenter);                // Center property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n\n        PROPERTY(Vec2F, up, SetUp, GetUp); // Y Axis direction property @EDITOR_IGNORE @ANIMATABLE @SCRIPTABLE\n\n    public:\n        // Constructor\n        Transform(const Vec2F& size = Vec2F(), const Vec2F& position = Vec2F(), float angle = 0.0f,\n                  const Vec2F& scale = Vec2F(1.0f, 1.0f), const Vec2F& pivot = Vec2F(0.5f, 0.5f));\n\n        // Copy-constructor\n        Transform(const Transform& other);\n\n        // Virtual destructor\n        virtual ~Transform() { }\n\n        // Assign operator\n        Transform& operator=(const Transform& other);\n\n        // Check equals operator\n        bool operator==(const Transform& other) const;\n\n        // Not equals operator\n        bool operator!=(const Transform& other) const;\n\n        // Sets position\n        virtual void SetPosition(const Vec2F& position);\n\n        // Returns position\n        virtual Vec2F GetPosition() const;\n\n        // Sets position by X\n        virtual void SetPositionX(float value);\n\n        // Returns position by X\n        virtual float GetPositionX() const;\n\n        // Sets position by Y\n        virtual void SetPositionY(float value);\n\n        // Returns position by Y\n        virtual float GetPositionY() const;\n\n        // Sets size\n        virtual void SetSize(const Vec2F& size);\n\n        // Return size\n        virtual Vec2F GetSize() const;\n\n        // Sets width\n        virtual void SetWidth(float width);\n\n        // Returns width\n        virtual float GetWidth() const;\n\n        // Sets height\n        virtual void SetHeight(float height);\n\n        // Returns width\n        virtual float GetHeight() const;\n\n        // Sets pivot, in local space, where (0, 0) - left down corner, (1; 1) - right top\n        virtual void SetPivot(const Vec2F& pivot);\n\n        // Return pivot, in local space, where (0, 0) - left down corner, (1; 1) - right top\n        virtual Vec2F GetPivot() const;\n\n        // Sets pivot by world coordinates\n        virtual void SetWorldPivot(const Vec2F& pivot);\n\n        // Returns pivot position in world coordinates\n        virtual Vec2F GetWorldPivot() const;\n\n        // Sets size pivot, in local space, where (0, 0) - left down corner, (mSize.x, mSize.y) - right top\n        virtual void SetSizePivot(const Vec2F& relPivot);\n\n        // Returns size pivot, in local space, where (0, 0) - left down corner, (mSize.x, mSize.y) - right top\n        virtual Vec2F GetSizePivot() const;\n\n        // Sets rect. If bySIze is true, rectangle adjusting by transform's size, overwise by scale\n        virtual void SetRect(const RectF& rect, bool bySize = true);\n\n        // Returns rect\n        virtual RectF GetRect() const;\n\n        // Sets scale\n        virtual void SetScale(const Vec2F& scale);\n\n        // Returns scale\n        virtual Vec2F GetScale() const;\n\n        // Sets scale by X\n        virtual void SetScaleX(float scale);\n\n        // Returns scale by X\n        virtual float GetScaleX() const;\n\n        // Sets scale by Y\n        virtual void SetScaleY(float scale);\n\n        // Returns scale by Y\n        virtual float GetScaleY() const;\n\n        // Sets rotation angle, in radians\n        virtual void SetAngle(float rad);\n\n        // Returns rotation angle in radians\n        virtual float GetAngle() const;\n\n        // Sets rotation angle, in degrees\n        virtual void SetAngleDegrees(float deg);\n\n        // Returns rotation angle in degrees\n        virtual float GetAngleDegrees() const;\n\n        // Sets shear\n        virtual void SetShear(float shear);\n\n        // Returns shear\n        virtual float GetShear() const;\n\n        // Sets basis\n        virtual void SetBasis(const Basis& basis);\n\n        // Returns basis\n        virtual Basis GetBasis() const;\n\n        // Sets basis without size\n        virtual void SetNonSizedBasis(const Basis& basis);\n\n        // Returns basis without size\n        virtual Basis GetNonSizedBasis() const;\n\n        // Sets axis aligned rectangle transformation\n        virtual void SetAxisAlignedRect(const RectF& rect);\n\n        // Returns axis aligned rectangle transformation\n        virtual RectF GetAxisAlignedRect() const;\n\n        // Sets left top corner position\n        virtual void SetLeftTop(const Vec2F& position);\n\n        // Returns left top corner position\n        virtual Vec2F GetLeftTop() const;\n\n        // Sets right top corner position\n        virtual void SetRightTop(const Vec2F& position);\n\n        // Returns right top corner position\n        virtual Vec2F GetRightTop() const;\n\n        // Sets left down corner position\n        virtual void SetLeftBottom(const Vec2F& position);\n\n        // Returns left down corner position\n        virtual Vec2F GetLeftBottom() const;\n\n        // Sets left right bottom position\n        virtual void SetRightBottom(const Vec2F& position);\n\n        // Returns right bottom corner position\n        virtual Vec2F GetRightBottom() const;\n\n        // Sets center position\n        virtual void SetCenter(const Vec2F& position);\n\n        // Returns center position\n        virtual Vec2F GetCenter() const;\n\n        // Set local x axis direction\n        virtual void SetRight(const Vec2F& dir);\n\n        // Returns local x axis direction\n        virtual Vec2F GetRight() const;\n\n        // Set negative local x axis direction\n        virtual void SetLeft(const Vec2F& dir);\n\n        // Returns negative local x axis direction\n        virtual Vec2F GetLeft() const;\n\n        // Set local y axis direction\n        virtual void SetUp(const Vec2F& dir);\n\n        // Returns local y axis direction\n        virtual Vec2F GetUp() const;\n\n        // Set negative local y axis direction\n        virtual void SetDown(const Vec2F& dir);\n\n        // Returns negative local y axis direction\n        virtual Vec2F GetDown() const;\n\n        // Sets x axis directed to worldPoint\n        virtual void LookAt(const Vec2F& worldPoint);\n\n        // Transforms point from world space into local @SCRIPTABLE\n        virtual Vec2F World2LocalPoint(const Vec2F& worldPoint) const;\n\n        // Transforms point from local space into world @SCRIPTABLE\n        virtual Vec2F Local2WorldPoint(const Vec2F& localPoint) const;\n\n        // Transforms direction from world space into local @SCRIPTABLE\n        virtual Vec2F World2LocalDir(const Vec2F& worldDir) const;\n\n        // Transforms direction from local space into world @SCRIPTABLE\n        virtual Vec2F Local2WorldDir(const Vec2F& localDir) const;\n\n        // Returns true when point inside this @SCRIPTABLE\n        virtual bool IsPointInside(const Vec2F& point) const;\n\n        // Sets serialization enable or disable\n        void SetSerializeEnabled(bool enabled);\n\n        SERIALIZABLE(Transform);\n\n    protected:\n        Vec2F  mPosition; // Position @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        Vec2F  mSize;     // Size @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        Vec2F  mScale;    // Scale, (1; 1) is default @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        Vec2F  mPivot;    // Pivot: (0; 0) is left bottom corner - (1; 1) is right top corner @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        float  mAngle;    // Rotation angle in radians @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n        float  mShear;    // Shear @SERIALIZABLE @SERIALIZE_IF(IsSerializeEnabled)\n\n        Basis  mTransform;         // Final transform basis\n        Basis  mNonSizedTransform; // Final transform basis without size\n\n        bool mSerializeEnabled = true; // Is serializations fields enabled\n\n    protected:\n        // Called when basis changed\n        virtual void BasisChanged() { }\n\n        // Called when object was deserialized\n        void OnDeserialized(const DataValue& node) override;\n\n        // Updates mTransform \n        virtual void UpdateTransform();\n\n        // Returns is serialize enabled; used to turn off fields serialization\n        virtual bool IsSerializeEnabled() const;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::Transform)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::Transform)\n{\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(position);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(positionX);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(positionY);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(size);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(width);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(height);\n    FIELD().PUBLIC().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(scale);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(scaleX);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(scaleY);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(pivot);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(worldPivot);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(szPivot);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(angle);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(angleDegree);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(shear);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().NAME(basis);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().NAME(nonSizedBasis);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(rect);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(AABB);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(leftTop);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(leftBottom);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(rightTop);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(rightBottom);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(center);\n    FIELD().PUBLIC().ANIMATABLE_ATTRIBUTE().EDITOR_IGNORE_ATTRIBUTE().SCRIPTABLE_ATTRIBUTE().NAME(up);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).NAME(mPosition);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).NAME(mSize);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).NAME(mScale);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).NAME(mPivot);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).NAME(mAngle);\n    FIELD().PROTECTED().SERIALIZABLE_ATTRIBUTE().SERIALIZE_IF_ATTRIBUTE(IsSerializeEnabled).NAME(mShear);\n    FIELD().PROTECTED().NAME(mTransform);\n    FIELD().PROTECTED().NAME(mNonSizedTransform);\n    FIELD().PROTECTED().DEFAULT_VALUE(true).NAME(mSerializeEnabled);\n}\nEND_META;\nCLASS_METHODS_META(o2::Transform)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vec2F&, const Vec2F&, float, const Vec2F&, const Vec2F&);\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Transform&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPosition, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetPosition);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPositionX, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetPositionX);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPositionY, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetPositionY);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSize, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetSize);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWidth, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetWidth);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetHeight, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetHeight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetPivot, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetPivot);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetWorldPivot, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetWorldPivot);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSizePivot, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetSizePivot);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRect, const RectF&, bool);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetRect);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScale, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetScale);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScaleX, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScaleX);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScaleY, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScaleY);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAngle, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetAngle);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAngleDegrees, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetAngleDegrees);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetShear, float);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetShear);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetBasis, const Basis&);\n    FUNCTION().PUBLIC().SIGNATURE(Basis, GetBasis);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetNonSizedBasis, const Basis&);\n    FUNCTION().PUBLIC().SIGNATURE(Basis, GetNonSizedBasis);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetAxisAlignedRect, const RectF&);\n    FUNCTION().PUBLIC().SIGNATURE(RectF, GetAxisAlignedRect);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeftTop, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetLeftTop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRightTop, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetRightTop);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeftBottom, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetLeftBottom);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRightBottom, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetRightBottom);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetCenter, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetCenter);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetRight, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetRight);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetLeft, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetLeft);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetUp, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetUp);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetDown, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(Vec2F, GetDown);\n    FUNCTION().PUBLIC().SIGNATURE(void, LookAt, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, World2LocalPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, Local2WorldPoint, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, World2LocalDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(Vec2F, Local2WorldDir, const Vec2F&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(bool, IsPointInside, const Vec2F&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetSerializeEnabled, bool);\n    FUNCTION().PROTECTED().SIGNATURE(void, BasisChanged);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, UpdateTransform);\n    FUNCTION().PROTECTED().SIGNATURE(bool, IsSerializeEnabled);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Vector2.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Math.h\"\n#include \"3rdPartyLibs/Box2D/Common/b2Math.h\"\n\nnamespace o2\n{\n    class DataValue;\n\n    template<typename T>\n    class Vec2\n    {\n    public:\n        T x;\n        T y;\n\n    public:\n        inline Vec2();\n        inline Vec2(T vx, T vy);\n\n        template<typename RT>\n        inline operator Vec2<RT>();\n\n        inline Vec2(const b2Vec2& v);\n        inline operator b2Vec2() const;\n\n        inline bool operator==(const Vec2& v) const;\n        inline bool operator!=(const Vec2& v) const;\n\n        inline Vec2 operator+(const Vec2& v) const;\n        inline Vec2 operator+=(const Vec2& v);\n\n        inline Vec2 operator-(const Vec2& v) const;\n        inline Vec2 operator-=(const Vec2& v);\n\n        inline Vec2 operator*(const Vec2& v) const;\n        inline Vec2 operator*=(const Vec2& v);\n\n        inline Vec2 operator*(T v) const;\n        inline Vec2 operator*=(T v);\n\n        inline Vec2 operator/(const Vec2& v) const;\n        inline Vec2 operator/=(const Vec2& v);\n\n        inline Vec2 operator/(T v) const;\n        inline Vec2 operator/=(T v);\n\n        inline Vec2 operator^(T s) const;\n        inline T    operator^(const Vec2& v) const;\n\n        inline T&   operator[](int idx);\n\n        inline Vec2 Scale(T scale) const;\n        inline Vec2 Scale(const Vec2& scaleVec) const;\n        inline Vec2 Scale(const Vec2& scaleVec, const Vec2& origin) const;\n        inline Vec2 InvScale(const Vec2& scale) const;\n\n        inline T&   Get(int i);\n        inline void Set(T vx, T vy);\n\n        inline T Dot(const Vec2& v) const;\n\n        inline T    Cross(const Vec2& v) const;\n        inline Vec2 Cross(float v) const;\n\n        inline T Length() const;\n        inline T SqrLength() const;\n\n        inline Vec2 Normalized() const;\n        inline void Normalize();\n\n        inline Vec2 Perpendicular() const;\n\n        inline Vec2 Rotate(float rad) const;\n        inline Vec2 Rotate(float cs, float sn) const;\n        inline void Rotate(float rad, const Vec2& origin);\n\n        inline Vec2 Inverted(bool bx = true, bool by = true) const;\n        inline Vec2 InvertedX() const;\n        inline Vec2 InvertedY() const;\n\n        inline float Angle(const Vec2& other) const;\n        inline float SignedAngle(const Vec2& other) const;\n        inline Vec2 Project(const Vec2& other) const;\n        inline Vec2 ClampLength(T newLength) const;\n\n        inline bool IsParallel(const Vec2& other) const;\n\n        static inline Vec2<T> Rotated(float rad);\n        static inline Vec2<T> Up();\n        static inline Vec2<T> Down();\n        static inline Vec2<T> Left();\n        static inline Vec2<T> Right();\n        static inline Vec2<T> One();\n\n        static inline T Length(const Vec2& a, const Vec2& b);\n        static inline T SqrLength(const Vec2& a, const Vec2& b);\n        static inline T Angle(const Vec2& a, const Vec2& b);\n        static inline T SignedAngle(const Vec2& a, const Vec2& b);\n    };\n\n    typedef Vec2<float> Vec2F;\n    typedef Vec2<int>   Vec2I;\n\n    template<typename T>\n    Vec2<T>::Vec2():\n        x(0), y(0)\n    {}\n\n    template<typename T>\n    Vec2<T>::Vec2(T vx, T vy) :\n        x(vx), y(vy)\n    {}\n\n    template<typename T>\n    template<typename RT>\n    Vec2<T>::operator Vec2<RT>()\n    {\n        return Vec2<RT>((RT)x, (RT)y);\n    }\n\n    template<typename T>\n    Vec2<T>::Vec2(const b2Vec2& v):\n        x(v.x), y(v.y)\n    {}\n\n    template<typename T>\n    Vec2<T>::operator b2Vec2() const\n    {\n        return b2Vec2((float32)x, (float32)y);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator+(const Vec2<T>& v) const\n    {\n        return Vec2(x + v.x, y + v.y);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator+=(const Vec2<T>& v)\n    {\n        x += v.x; y += v.y;\n        return *this;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator-(const Vec2<T>& v) const\n    {\n        return Vec2(x - v.x, y - v.y);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator-=(const Vec2<T>& v)\n    {\n        x -= v.x; y -= v.y;\n        return *this;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator*(T v) const\n    {\n        return Vec2(x*v, y*v);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator*=(T v)\n    {\n        x *= v; y *= v;\n        return *this;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator/(T v) const\n    {\n        float t = 1.0f/v;\n        return Vec2((T)x*t, (T)y*t);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator/(const Vec2<T>& v) const\n    {\n        return Vec2(x/v.x, y/v.y);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator/=(const Vec2& v)\n    {\n        x /= v.x; y /= v.y;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator/=(T v)\n    {\n        *this = *this/v;\n        return *this;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator*(const Vec2<T>& v) const\n    {\n        return Vec2(x*v.x, y*v.y);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator*=(const Vec2<T>& v)\n    {\n        x *= v.x; y *= v.y;\n        return *this;\n    }\n\n    template<typename T>\n    bool Vec2<T>::operator==(const Vec2<T>& v) const\n    {\n        return Math::Abs(x - v.x) < 0.001f && Math::Abs(y - v.y) < 0.001f;\n    }\n\n    template<typename T>\n    bool Vec2<T>::operator!=(const Vec2<T>& v) const\n    {\n        return Math::Abs(x - v.x) > 0.001f || Math::Abs(y - v.y) > 0.001f;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::operator^(T s) const\n    {\n        return Vec2(-s*y, s*x);\n    }\n\n    template<typename T>\n    T Vec2<T>::operator^(const Vec2<T>& v) const\n    {\n        return x*v.y - y*v.x;\n    }\n\n    template<typename T>\n    T& Vec2<T>::operator[](int idx)\n    {\n        if (idx == 0)\n            return x;\n\n        return y;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Scale(T scale) const\n    {\n        return Vec2(x*scale, y*scale);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Scale(const Vec2<T>& scaleVec) const\n    {\n        return Vec2(x*scaleVec.x, y*scaleVec.y);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Scale(const Vec2<T>& scaleVec, const Vec2<T>& origin) const\n    {\n        return (*this - origin).Scale(scaleVec) + origin;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::InvScale(const Vec2<T>& v) const\n    {\n        return Vec2(x/v.x, y/v.y);\n    }\n\n    template<typename T>\n    T& Vec2<T>::Get(int i)\n    {\n        if (i == 0) return x;\n        return y;\n    }\n\n    template<typename T>\n    void Vec2<T>::Set(T vx, T vy)\n    {\n        x = vx; y = vy;\n    }\n\n    template<typename T>\n    T Vec2<T>::Dot(const Vec2<T>& v) const\n    {\n        return x*v.x + y*v.y;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Cross(float v) const\n    {\n        return Vec2(-v*y, v*x);\n    }\n\n    template<typename T>\n    T Vec2<T>::Cross(const Vec2& v) const\n    {\n        return x*v.y - y*v.x;\n    }\n\n    template<typename T>\n    T Vec2<T>::Length() const\n    {\n        return Math::Sqrt(x*x + y*y);\n    }\n\n    template<typename T>\n    T Vec2<T>::SqrLength() const\n    {\n        return x*x + y*y;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Normalized() const\n    {\n        T ln = Length();\n        if (ln > 0) return *this/ln;\n        return Vec2(0, 0);\n    }\n\n    template<typename T>\n    void Vec2<T>::Normalize()\n    {\n        *this = this->Normalized();\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Perpendicular() const\n    {\n        return Vec2(-y, x);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Rotate(float rad) const\n    {\n        float cs = Math::Cos(rad);\n        float sn = Math::Sin(rad);\n\n        return Vec2((T)(cs*x - sn*y), (T)(cs*y + sn*x));\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Rotate(float cs, float sn) const\n    {\n        return Vec2((T)(cs*x - sn*y), (T)(cs*y + sn*x));\n    }\n\n    template<typename T>\n    void Vec2<T>::Rotate(float rad, const Vec2& c)\n    {\n        *this -= c;\n        Rotate(rad);\n        *this += c;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Inverted(bool bx /*= true*/, bool by /*= true*/)  const\n    {\n        Vec2 r = *this;\n        if (bx) r.x = -r.x;\n        if (by) r.y = -r.y;\n        return r;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::InvertedX() const\n    {\n        Vec2 r = *this;\n        r.x = -r.x;\n        return r;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::InvertedY() const\n    {\n        Vec2 r = *this;\n        r.y = -r.y;\n        return r;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::ClampLength(T newLength) const\n    {\n        float sc = newLength/Length();\n        return Scale(sc);\n    }\n\n    template<typename T>\n    bool Vec2<T>::IsParallel(const Vec2<T>& other) const\n    {\n        return Math::Abs<T>(Perpendicular().Normalized().Dot(other)) < (T)0.01f;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Project(const Vec2& other) const\n    {\n        Vec2<T> n = other.Normalized();\n        return n*(n.Dot(*this));\n    }\n\n    template<typename T>\n    float Vec2<T>::Angle(const Vec2& other) const\n    {\n        float rad = Math::Atan2F(Cross(other) + FLT_EPSILON, Dot(other));\n        if (rad < 0)\n            return Math::PI()*2.0f + rad;\n\n        return rad;\n    }\n\n    template<typename T>\n    float Vec2<T>::SignedAngle(const Vec2& other) const\n    {\n        return Math::Atan2F(Cross(other) + FLT_EPSILON, Dot(other));;\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Rotated(float rad)\n    {\n        return Vec2<T>(Math::Cos(rad), Math::Sin(rad));\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Up()\n    {\n        return Vec2<T>(0, 1.0f);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Down()\n    {\n        return Vec2<T>(0, -1.0f);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Left()\n    {\n        return Vec2<T>(-1.0f, 0);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::Right()\n    {\n        return Vec2<T>(1.0f, 0);\n    }\n\n    template<typename T>\n    Vec2<T> Vec2<T>::One()\n    {\n        return Vec2<T>(1.0f, 1.0f);\n    }\n\n    template<typename T>\n    T Vec2<T>::Angle(const Vec2& a, const Vec2& b)\n    {\n        return a.Angle(b);\n    }\n\n    template<typename T>\n    T Vec2<T>::SignedAngle(const Vec2& a, const Vec2& b)\n    {\n        return a.SignedAngle(b);\n    }\n\n    template<typename T>\n    T Vec2<T>::SqrLength(const Vec2& a, const Vec2& b)\n    {\n        return (b - a).SqrLength();\n    }\n\n    template<typename T>\n    T Vec2<T>::Length(const Vec2& a, const Vec2& b)\n    {\n        return (b - a).Length();\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Vertex.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Vertex.h\"\n\nnamespace o2\n{\n\tVertex::Vertex():\n\t\tx(0), y(0), color(0), tu(0), tv(0), z(1), nx(1), ny(0), nz(0)\n\t{}\n\n\tVertex::Vertex(float vx, float vy):\n\t\tx(vx), y(vy), z(1), color(0), tu(0), tv(0), nx(1), ny(0), nz(0)\n\t{}\n\n\tVertex::Vertex(float vx, float vy, float vz):\n\t\tx(vx), y(vy), z(vz), color(0), tu(0), tv(0), nx(1), ny(0), nz(0)\n\t{}\n\n\tVertex::Vertex(float vx, float vy, float vz, Color32Bit vcolor, float vtu, float vtv):\n\t\tx(vx), y(vy), z(vz), color(vcolor), tu(vtu), tv(vtv), nx(1), ny(0), nz(0)\n\t{}\n\n\tVertex::Vertex(float vx, float vy, Color32Bit vcolor, float vtu, float vtv):\n\t\tx(vx), y(vy), z(1), color(vcolor), tu(vtu), tv(vtv), nx(1), ny(0), nz(0)\n\t{}\n\n\tVertex::Vertex(const Vec2F& pos, Color32Bit vcolor, float vtu, float vtv):\n\t\tx(pos.x), y(pos.y), z(1), color(vcolor), tu(vtu), tv(vtv), nx(1), ny(0), nz(0)\n\t{}\n\n\tvoid Vertex::Set(const Vec2F& pos, Color32Bit ccolor, float u, float v)\n\t{\n\t\tx = pos.x; y = pos.y;\n\t\tcolor = ccolor;\n\t\ttu = u; tv = v;\n\t}\n\n\tvoid Vertex::Set(const Vec2F& pos, Color32Bit ccolor, float u, float v, const Vec2F& normal)\n\t{\n\t\tx = pos.x; y = pos.y;\n\t\tcolor = ccolor;\n\t\ttu = u; tv = v;\n\t\tnx = normal.x; ny = normal.y; nz = 0;\n\t}\n\n\tvoid Vertex::Set(float px, float py, Color32Bit ccolor, float u, float v)\n\t{\n\t\tx = px; y = py;\n\t\tcolor = ccolor;\n\t\ttu = u; tv = v;\n\t}\n\n\tvoid Vertex::Set(const Vec2F& pos, float cz, Color32Bit ccolor, float u, float v)\n\t{\n\t\tx = pos.x; y = pos.y;\n\t\tz = cz;\n\t\tcolor = ccolor;\n\t\ttu = u; tv = v;\n\t}\n\n\tvoid Vertex::SetPosition(const Vec2F& pos)\n\t{\n\t\tx = pos.x;\n\t\ty = pos.y;\n\t}\n\n\tvoid Vertex::SetPosition(float px, float py, float pz /*= 0*/)\n\t{\n\t\tx = px; y = py; z = pz;\n\t}\n\n\tvoid Vertex::SetUV(float u, float v)\n\t{\n\t\ttu = u; tv = v;\n\t}\n\n\tvoid Vertex::SetUV(const Vec2F& uv)\n\t{\n\t\ttu = uv.x; tv = uv.y;\n\t}\n\n\tbool Vertex::operator==(const Vertex& other) const\n\t{\n\t\treturn Math::Equals(x, other.x) && Math::Equals(y, other.y) && color == other.color &&\n\t\t\tMath::Equals(tu, other.tu) && Math::Equals(tv, other.tv);\n\t}\n\n\tVertex Vertex::operator=(const Vec2F& vec)\n\t{\n\t\tx = vec.x; y = vec.y;\n\t\treturn *this;\n\t}\n\n\tVertex::operator Vec2F() const\n\t{\n\t\treturn Vec2F(x, y);\n\t}\n\n\tvoid Vertex::SetNormal(float nnx, float nny, float nnz)\n\t{\n\t\tnx = nnx; ny = nny; nz = nnz;\n\t}\n\n\tvoid Vertex::SetNormal(const Vec2F& tangent)\n\t{\n\t\tnx = tangent.x; ny = tangent.y; nz = 0;\n\t}\n\n\tsize_t Vertex::ParamOffset(UInt param)\n\t{\n\t\tswitch (param)\n\t\t{\n\t\t\tcase VertexParam::Position:  return offsetof(Vertex, x);\n\t\t\tcase VertexParam::Color:     return offsetof(Vertex, color);\n\t\t\tcase VertexParam::TexCoord0: return offsetof(Vertex, tu);\n\t\t\tcase VertexParam::Normal:    return offsetof(Vertex, nx);\n\t\t\tdefault: return 0;\n\t\t}\n\t}\n\n\tVertexType Vertex::Type()\n\t{\n\t\treturn VertexType(VertexParam::Position | VertexParam::Color | VertexParam::TexCoord0 | VertexParam::Normal,\n\t\t\t\t\t\t  sizeof(Vertex), &Vertex::ParamOffset);\n\t}\n\n\tbool VertexType::operator!=(const VertexType& other) const\n\t{\n\t\treturn !(*this == other);\n\t}\n\n\tbool VertexType::operator==(const VertexType& other) const\n\t{\n\t\treturn flags == other.flags && stride == other.stride && paramOffsetFunc == other.paramOffsetFunc;\n\t}\n\n\tVertexType::VertexType(UInt flags, size_t stride, VertexParamOffsetFunc offsetFunc):\n\t\tflags(flags), stride(stride), paramOffsetFunc(offsetFunc)\n\t{}\n\n\tsize_t VertexType::GetStride() const\n\t{\n\t\treturn stride;\n\t}\n\n\tsize_t VertexType::GetParamOffset(UInt param) const\n\t{\n\t\treturn paramOffsetFunc ? paramOffsetFunc(param) : 0;\n\t}\n\n\tint VertexType::GetTexCoordsCount() const\n\t{\n\t\tint count = 0;\n\t\tif (flags & VertexParam::TexCoord0)\n\t\t\tcount++;\n\n\t\tif (flags & VertexParam::TexCoord1)\n\t\t\tcount++;\n\n\t\tif (flags & VertexParam::TexCoord2)\n\t\t\tcount++;\n\n\t\treturn count;\n\t}\n\n\tbool VertexType::HasParam(UInt param) const\n\t{\n\t\treturn (flags & param) != 0;\n\t}\n\n\tsize_t Vertex2Tex::ParamOffset(UInt param)\n\t{\n\t\tswitch (param)\n\t\t{\n\t\t\tcase VertexParam::Position:  return offsetof(Vertex2Tex, x);\n\t\t\tcase VertexParam::Color:     return offsetof(Vertex2Tex, color);\n\t\t\tcase VertexParam::TexCoord0: return offsetof(Vertex2Tex, tu);\n\t\t\tcase VertexParam::TexCoord1: return offsetof(Vertex2Tex, tu2);\n\t\t\tcase VertexParam::Normal:    return offsetof(Vertex2Tex, nx);\n\t\t\tdefault: return 0;\n\t\t}\n\t}\n\n\tVertexType Vertex2Tex::Type()\n\t{\n\t\treturn VertexType(\n\t\t\tVertexParam::Position | VertexParam::Color | VertexParam::TexCoord0 | VertexParam::TexCoord1 | VertexParam::Normal,\n\t\t\tsizeof(Vertex2Tex), &Vertex2Tex::ParamOffset);\n\t}\n\n\tVertex2Tex::Vertex2Tex():\n\t\tx(0), y(0), z(1), color(0), tu(0), tv(0), tu2(0), tv2(0), nx(1), ny(0), nz(0)\n\t{}\n\n\tsize_t Vertex3Tex::ParamOffset(UInt param)\n\t{\n\t\tswitch (param)\n\t\t{\n\t\t\tcase VertexParam::Position:  return offsetof(Vertex3Tex, x);\n\t\t\tcase VertexParam::Color:     return offsetof(Vertex3Tex, color);\n\t\t\tcase VertexParam::TexCoord0: return offsetof(Vertex3Tex, tu);\n\t\t\tcase VertexParam::TexCoord1: return offsetof(Vertex3Tex, tu2);\n\t\t\tcase VertexParam::TexCoord2: return offsetof(Vertex3Tex, tu3);\n\t\t\tcase VertexParam::Normal:    return offsetof(Vertex3Tex, nx);\n\t\t\tdefault: return 0;\n\t\t}\n\t}\n\n\tVertexType Vertex3Tex::Type()\n\t{\n\t\treturn VertexType(VertexParam::Position | VertexParam::Color | VertexParam::TexCoord0 |\n\t\t\t\t\t\t  VertexParam::TexCoord1 | VertexParam::TexCoord2 | VertexParam::Normal,\n\t\t\t\t\t\t  sizeof(Vertex3Tex), &Vertex3Tex::ParamOffset);\n\t}\n\n\tVertex3Tex::Vertex3Tex():\n\t\tx(0), y(0), z(1), color(0), tu(0), tv(0), tu2(0), tv2(0), tu3(0), tv3(0), nx(1), ny(0), nz(0)\n\t{}\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Math/Vertex.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\n#include <cstddef>\n\nnamespace o2\n{\n\t// Vertex parameter flags - each bit represents a vertex attribute\n\tnamespace VertexParam\n\t{\n\t\tconst UInt None = 0;\n\t\tconst UInt Position = 1 << 0; // float x, y, z (12 bytes)\n\t\tconst UInt Color = 1 << 1; // Color32Bit (4 bytes)\n\t\tconst UInt TexCoord0 = 1 << 2; // float tu, tv (8 bytes)\n\t\tconst UInt TexCoord1 = 1 << 3; // float tu2, tv2 (8 bytes)\n\t\tconst UInt TexCoord2 = 1 << 4; // float tu3, tv3 (8 bytes)\n\t\tconst UInt Normal = 1 << 5; // float nx, ny, nz (12 bytes)\n\n\t\tinline size_t ParamSize(UInt flag)\n\t\t{\n\t\t\tswitch (flag)\n\t\t\t{\n\t\t\t\tcase Position:  return sizeof(float) * 3;\n\t\t\t\tcase Color:     return sizeof(UInt);\n\t\t\t\tcase TexCoord0: return sizeof(float) * 2;\n\t\t\t\tcase TexCoord1: return sizeof(float) * 2;\n\t\t\t\tcase TexCoord2: return sizeof(float) * 2;\n\t\t\t\tcase Normal:    return sizeof(float) * 3;\n\t\t\t\tdefault:        return 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Function type for getting parameter offset within a vertex struct\n\tusing VertexParamOffsetFunc = size_t(*)(UInt param);\n\n\t// ---------------------------------------------------------------------------------\n\t// Vertex type descriptor built from parameter flags, stride, and an offset function\n\t// ---------------------------------------------------------------------------------\n\tstruct VertexType\n\t{\n\t\tUInt                  flags = 0;\n\t\tsize_t                stride = 0;\n\t\tVertexParamOffsetFunc paramOffsetFunc = nullptr;\n\n\tpublic:\n\t\t// Default constructor for an empty vertex type\n\t\tVertexType() = default;\n\n\t\t// Constructor to initialize the vertex type with specific flags, stride, and offset function\n\t\tVertexType(UInt flags, size_t stride, VertexParamOffsetFunc offsetFunc);\n\n\t\t// Returns the total size of the vertex in bytes, which is the stride\n\t\tsize_t GetStride() const;\n\n\t\t// Returns byte offset to the specified parameter, delegating to the vertex struct's offset function\n\t\tsize_t GetParamOffset(UInt param) const;\n\n\t\t// Counts how many texture coordinate sets are present based on the flags\n\t\tint GetTexCoordsCount() const;\n\n\t\t// Checks if a specific parameter is included in the vertex type by testing the corresponding bit in the flags\n\t\tbool HasParam(UInt param) const;\n\n\t\t// Equality operators to compare vertex types based on their flags, stride, and offset function\n\t\tbool operator==(const VertexType& other) const;\n\n\t\t// Inequality operator defined in terms of the equality operator\n\t\tbool operator!=(const VertexType& other) const;\n\t};\n\n\t// --------------------------------------------------------------------\n\t// Basic vertex structure with position, color, and texture coordinates\n\t// --------------------------------------------------------------------\n\tstruct Vertex\n\t{\n\t\tfloat x, y, z;\n\t\tColor32Bit color;\n\t\tfloat tu, tv;\n\t\tfloat nx, ny, nz;\n\n\tpublic:\n\t\tVertex();\n\t\tVertex(float vx, float vy);\n\t\tVertex(float vx, float vy, float vz);\n\t\tVertex(float vx, float vy, float vz, Color32Bit vcolor, float vtu, float vtv);\n\t\tVertex(float vx, float vy, Color32Bit vcolor, float vtu, float vtv);\n\t\tVertex(const Vec2F& pos, Color32Bit vcolor, float vtu, float vtv);\n\n\t\tbool operator==(const Vertex& other) const;\n\t\tVertex operator=(const Vec2F& vec);\n\n\t\toperator Vec2F() const;\n\n\t\tvoid Set(const Vec2F& pos, Color32Bit ccolor, float u, float v);\n\t\tvoid Set(const Vec2F& pos, Color32Bit ccolor, float u, float v, const Vec2F& normal);\n\t\tvoid Set(float px, float py, Color32Bit ccolor, float u, float v);\n\t\tvoid Set(const Vec2F& pos, float cz, Color32Bit ccolor, float u, float v);\n\n\t\tvoid SetPosition(const Vec2F& pos);\n\t\tvoid SetPosition(float px, float py, float pz = 0);\n\n\t\tvoid SetUV(float u, float v);\n\t\tvoid SetUV(const Vec2F& uv);\n\n\t\tvoid SetNormal(float nnx, float nny, float nnz);\n\t\tvoid SetNormal(const Vec2F& tangent);\n\n\t\tstatic size_t ParamOffset(UInt param);\n\t\tstatic VertexType Type();\n\t};\n\n\t// --------------------------------------------------------------\n\t// Extended vertex structure with two sets of texture coordinates\n\t// --------------------------------------------------------------\n\tstruct Vertex2Tex\n\t{\n\t\tfloat x, y, z;\n\t\tColor32Bit color;\n\t\tfloat tu, tv;\n\t\tfloat tu2, tv2;\n\t\tfloat nx, ny, nz;\n\n\tpublic:\n\t\tVertex2Tex();\n\n\t\tstatic size_t ParamOffset(UInt param);\n\t\tstatic VertexType Type();\n\t};\n\n\t// --------------------------------------------------------------------------------------\n\t// Extended vertex structure with three sets of texture coordinates (for multi-texturing)\n\t// --------------------------------------------------------------------------------------\n\tstruct Vertex3Tex\n\t{\n\t\tfloat x, y, z;\n\t\tColor32Bit color;\n\t\tfloat tu, tv;\n\t\tfloat tu2, tv2;\n\t\tfloat tu3, tv3;\n\t\tfloat nx, ny, nz;\n\n\tpublic:\n\t\tVertex3Tex();\n\n\t\tstatic size_t ParamOffset(UInt param);\n\t\tstatic VertexType Type();\n\t};\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/Allocators/ChunkPoolAllocator.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ChunkPoolAllocator.h\"\n\nnamespace o2\n{\n\n    ChunkPoolAllocator::ChunkPoolAllocator(size_t chunkSize /*= 64*1024*/, \n                                           IAllocator* baseAllocator /*= DefaultAllocator::GetInstance()*/)\n    {\n        mBaseAllocator = baseAllocator;\n        mChunkSize = chunkSize;\n\n        AddChunk(mChunkSize);\n    }\n\n    ChunkPoolAllocator::ChunkPoolAllocator(ChunkPoolAllocator& other):\n        mBaseAllocator(other.mBaseAllocator), mChunkSize(other.mChunkSize), mHead(other.mHead)\n    {\n        other.mHead = nullptr;\n    }\n\n    ChunkPoolAllocator::~ChunkPoolAllocator()\n    {\n        Clear();\n    }\n\n    ChunkPoolAllocator& ChunkPoolAllocator::operator=(ChunkPoolAllocator& other)\n    {\n        mBaseAllocator = other.mBaseAllocator;\n        mChunkSize = other.mChunkSize;\n        mHead = other.mHead;\n\n        other.mHead = nullptr;\n\n        return *this;\n    }\n\n    void ChunkPoolAllocator::AddChunk(size_t capacity)\n    {\n        void* mem = mBaseAllocator->Allocate(capacity + sizeof(Chunk));\n        Chunk* nextChunk = new (mem) Chunk();\n        nextChunk->ptr = reinterpret_cast<std::byte*>(mem) + sizeof(Chunk);\n        nextChunk->currentSize = 0;\n        nextChunk->capacity = capacity;\n        nextChunk->prev = mHead;\n\n        mHead = nextChunk;\n    }\n\n    void* ChunkPoolAllocator::Allocate(size_t size)\n    {\n        const size_t align = 8;\n        size_t mod = size%align;\n        if (mod != 0)\n            size = size - mod + align;\n\n        if (!mHead || mHead->currentSize + size > mHead->capacity)\n            AddChunk(Math::Max(size, mChunkSize));\n\n        void* res = reinterpret_cast<std::byte*>(mHead->ptr) + mHead->currentSize;\n        mHead->currentSize += size;\n        return res;\n    }\n\n    void ChunkPoolAllocator::Deallocate(void* ptr)\n    {}\n\n    void* ChunkPoolAllocator::Reallocate(void* ptr, size_t oldSize, size_t newSize)\n    {\n        void* newMem = Allocate(newSize);\n        memcpy(newMem, ptr, oldSize);\n        return newMem;\n    }\n\n    void ChunkPoolAllocator::Clear()\n    {\n        while (mHead)\n        {\n            Chunk* chunk = mHead;\n            mHead = chunk->prev;\n            mBaseAllocator->Deallocate(chunk);\n        }\n    }\n\n}"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/Allocators/ChunkPoolAllocator.h",
    "content": "#pragma once\n#include \"o2/Utils/Memory/Allocators/IAllocator.h\"\n#include \"o2/Utils/Memory/Allocators/DefaultAllocator.h\"\n\nnamespace o2\n{\n    class ChunkPoolAllocator: public IAllocator\n    {\n    public:\n        ChunkPoolAllocator(size_t chunkSize = 64*1024, IAllocator* baseAllocator = DefaultAllocator::GetInstance());\n        ChunkPoolAllocator(ChunkPoolAllocator& other);\n        ~ChunkPoolAllocator() override;\n\n        ChunkPoolAllocator& operator=(ChunkPoolAllocator& other);\n\n        void* Allocate(size_t size) override;\n        void Deallocate(void* ptr) override;\n        void* Reallocate(void* ptr, size_t oldSize, size_t newSize) override;\n\n        void Clear();\n\n    private:\n        struct Chunk\n        {\n            void*  ptr;\n            size_t currentSize;\n            size_t capacity;\n\n            Chunk* prev;\n        };\n\n    private:\n        IAllocator* mBaseAllocator;\n\n        size_t mChunkSize;\n        Chunk* mHead = nullptr;\n\n    private:\n        void AddChunk(size_t capacity);\n    };\n};\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/Allocators/DefaultAllocator.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"DefaultAllocator.h\"\n\nnamespace o2\n{\n    void* DefaultAllocator::Allocate(size_t size)\n    {\n        return malloc(size);\n    }\n\n    void DefaultAllocator::Deallocate(void* ptr)\n    {\n        free(ptr);\n    }\n\n    void* DefaultAllocator::Reallocate(void* ptr, size_t oldSize, size_t newSize)\n    {\n        return realloc(ptr, newSize);\n    }\n\n    DefaultAllocator* DefaultAllocator::GetInstance()\n    {\n        static DefaultAllocator allocator;\n        return &allocator;\n    }\n\n}"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/Allocators/DefaultAllocator.h",
    "content": "#pragma once\n#include \"o2/Utils/Memory/Allocators/IAllocator.h\"\n\nnamespace o2\n{\n    class DefaultAllocator: public IAllocator\n    {\n    public:\n        void* Allocate(size_t size) override;\n        void Deallocate(void* ptr) override;\n        void* Reallocate(void* ptr, size_t oldSize, size_t newSize) override;\n\n    public:\n        static DefaultAllocator* GetInstance();\n    };\n};\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/Allocators/IAllocator.h",
    "content": "#pragma once\n#include <stddef.h>\n\nnamespace o2\n{\n    class IAllocator\n    {\n    public:\n        virtual ~IAllocator() = default;\n\n        virtual void* Allocate(size_t size) = 0;\n        virtual void Deallocate(void* ptr) = 0;\n        virtual void* Reallocate(void* ptr, size_t oldSize, size_t newSize) = 0;\n    };\n};\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/Allocators/LinearAllocator.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"LinearAllocator.h\"\n#include <string.h>\n#include <cstddef>\n\nnamespace o2\n{\n    LinearAllocator::LinearAllocator(size_t blockSize, IAllocator* baseAllocator /*= DefaultAllocator::GetInstance()*/)\n    {\n        mBaseAllocator = baseAllocator;\n        mBlock = mBaseAllocator->Allocate(blockSize);\n        mBlockSize = blockSize;\n        mCurrentSize = 0;\n    }\n\n    void* LinearAllocator::Reallocate(void* ptr, size_t oldSize, size_t newSize)\n    {\n        void* newMemory = Allocate(newSize);\n        memcpy(newMemory, ptr, oldSize);\n        return newMemory;\n    }\n\n    void LinearAllocator::Deallocate(void* ptr)\n    {}\n\n    void* LinearAllocator::Allocate(size_t size)\n    {\n        if (mCurrentSize + size > mBlockSize)\n        {\n            size_t newSize = mCurrentSize > 1024*1024 ? mCurrentSize + 512*1024 : mCurrentSize*2;\n            mBlock = mBaseAllocator->Reallocate(mBlock, mCurrentSize, newSize);\n            mBlockSize = newSize;\n        }\n\n        void* ptr = reinterpret_cast<std::byte*>(mBlock) + size;\n        mCurrentSize += size;\n\n        return ptr;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/Allocators/LinearAllocator.h",
    "content": "#pragma once\n#include \"o2/Utils/Memory/Allocators/IAllocator.h\"\n#include \"o2/Utils/Memory/Allocators/DefaultAllocator.h\"\n\nnamespace o2\n{\n    class LinearAllocator: public IAllocator\n    {\n    public:\n        LinearAllocator(size_t blockSize, IAllocator* baseAllocator = DefaultAllocator::GetInstance());\n\n        void* Allocate(size_t size) override;\n        void Deallocate(void* ptr) override;\n        void* Reallocate(void* ptr, size_t oldSize, size_t newSize) override;\n\n    private:\n        IAllocator* mBaseAllocator;\n\n        void* mBlock;\n        size_t mBlockSize;\n        size_t mCurrentSize;\n    };\n};\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/Allocators/StackAllocator.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"StackAllocator.h\"\n\nnamespace o2\n{\n    StackAllocator::StackAllocator(size_t capacity, IAllocator* baseAllocator /*= DefaultAllocator::GetInstance()*/):\n        mBaseAllocator(baseAllocator)\n    {\n        mInitialCapacity = capacity;\n        Initialize();\n    }\n\n    StackAllocator::~StackAllocator()\n    {\n        Clear();\n    }\n\n    void StackAllocator::Clear()\n    {\n        mBaseAllocator->Deallocate(mStack);\n        mStack = nullptr;\n        mStackEnd = nullptr;\n        mTop = nullptr;\n    }\n\n    void StackAllocator::Initialize()\n    {\n        mStack = (std::byte*)mBaseAllocator->Allocate(mInitialCapacity);\n        mTop = mStack;\n        mStackEnd = mStack + mInitialCapacity;\n    }\n\n}"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/Allocators/StackAllocator.h",
    "content": "#pragma once\n#include \"o2/Utils/Memory/Allocators/DefaultAllocator.h\"\n#include \"o2/Utils/Memory/Allocators/IAllocator.h\"\n#include \"o2/Utils/Debug/Assert.h\"\n#include \"o2/Utils/Math/Math.h\"\n#include <cstddef>\n\nnamespace o2\n{\n    class StackAllocator\n    {\n    public:\n        StackAllocator(size_t capacity, IAllocator* baseAllocator = DefaultAllocator::GetInstance());\n\n        ~StackAllocator();\n\n        template<typename T>\n        T* Push(int count = 1);\n\n        template<typename T>\n        T* Pop(int count = 1);\n\n        template<typename T>\n        T* Top();\n\n        void Clear();\n\n    protected:\n        IAllocator* mBaseAllocator;\n\n        size_t mInitialCapacity;\n\n        std::byte* mStack;\n        std::byte* mStackEnd;\n        std::byte* mTop;\n\n    protected:\n        void Initialize();\n    };\n\n    template<typename T>\n    T* StackAllocator::Pop(int count)\n    {\n        size_t size = sizeof(T)*count;\n        Assert(mTop - size >= mStack, \"Too much popdata size\");\n        mTop -= size;\n        return (T*)mTop;\n    }\n\n    template<typename T>\n    T* StackAllocator::Top()\n    {\n        return (T*)(mTop - sizeof(T));\n    }\n\n    template<typename T>\n    T* StackAllocator::Push(int count)\n    {\n        if (!mStack)\n            Initialize();\n\n        size_t pushSize = sizeof(T)*count;\n        if (mTop + pushSize > mStackEnd)\n        {\n            size_t size = mTop - mStack;\n            size_t capacity = mStackEnd - mStack;\n            size_t newCapacity = Math::Max(size + pushSize, capacity + capacity/2);\n            mStack = (std::byte*)mBaseAllocator->Reallocate(mStack, capacity, newCapacity);\n            mStackEnd = mStack + newCapacity;\n            mTop = mStack + size;\n        }\n\n        T* res = (T*)mTop;\n        mTop += pushSize;\n\n        return res;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/MemoryAnalyzeableObject.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"MemoryAnalyzeableObject.h\"\n\n#include \"o2/Utils/Memory/MemoryAnalyzer.h\"\n\nnamespace o2\n{\n    MemoryAnalyzeObject::MemoryAnalyzeObject()\n    {\n        MemoryAnalyzer::OnObjectCreated(this);\n        createIndex = GetNextCreateIndex();\n    }\n\n    MemoryAnalyzeObject::~MemoryAnalyzeObject()\n    {\n        MemoryAnalyzer::OnObjectDestroyed(this);\n    }\n\n    int MemoryAnalyzeObject::GetNextCreateIndex()\n    {\n        static int idx = 0;\n        idx++;\n\n        return idx;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/MemoryAnalyzeableObject.h",
    "content": "#pragma once\n#include <functional>\n#include \"o2/Utils/Debug/StackTrace.h\"\n\nnamespace o2\n{\n    class IObject;\n\n    struct MemoryAnalyzeObject\n    {\n        int markIndex = 0;   // Mark index for memory tree building\n        int manageIndex = 0; // Manage index in objects array\n        int createIndex = 0; // Index of object creation, for debugging\n\n        StackTrace trace; // Stack trace of object creation\n\n    public:\n        MemoryAnalyzeObject();\n        virtual ~MemoryAnalyzeObject();\n\n        virtual std::byte* GetMemory() const { return nullptr; }\n        virtual size_t GetMemorySize() const { return 0; }\n\n        virtual IObject* GetIObject() const { return nullptr; }\n\n        virtual void IterateChildren(const std::function<void(MemoryAnalyzeObject*)>& callback) {}\n        virtual void IterateAllocations(const std::function<void(std::byte*, size_t)>& callback) {}\n\n        virtual const std::type_info& GetTypeInfo() const { return typeid(this); }\n\n        static int GetNextCreateIndex();\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/MemoryAnalyzer.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"MemoryAnalyzer.h\"\n\n#include \"o2/Utils/Memory/MemoryAnalyzeableObject.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    int MemoryAnalyzer::mCurrentBuildMemoryTreeIdx = 0;\n    bool MemoryAnalyzer::enabledObjectsTracking = true;\n\n    void MemoryAnalyzer::MemoryNode::SummarizeSize()\n    {\n        if (summarySize != 0)\n            return;\n\n        summarySize = size;\n\n        for (auto& child : children)\n        {\n            child->SummarizeSize();\n\n            if (child->mainParent == this)\n                summarySize += child->summarySize;\n        }\n    }\n\n    void MemoryAnalyzer::MemoryNode::SummarizeLeakedSize()\n    {\n        if (leakedSize != 0 || summarySize != 0)\n            return;\n\n        leakedSize = size;\n\n        for (auto& child : children)\n        {\n            child->SummarizeLeakedSize();\n\n            if (child->mainParent == this)\n                leakedSize += child->leakedSize;\n        }\n    }\n\n    MemoryAnalyzer::MemoryNode::~MemoryNode()\n    {\n        for (auto& child : children)\n        {\n            if (child->mainParent == this)\n                delete child;\n        }\n    }\n\n    std::vector<MemoryAnalyzeObject*>& MemoryAnalyzer::GetAnalyzeObjects()\n    {\n        static std::vector<MemoryAnalyzeObject*> data;\n        return data;\n    }\n\n    std::vector<size_t>& MemoryAnalyzer::GetFreeAnalyzeObjects()\n    {\n        static std::vector<size_t> data;\n        return data;\n    }\n\n    void MemoryAnalyzer::AllocateAnalyzeObjects()\n    {\n        auto& objects = GetAnalyzeObjects();\n        auto& freeIndexes = GetFreeAnalyzeObjects();\n\n        auto size = objects.size();\n        auto newSize = std::max((size_t)1024, size + size/2);\n\n        objects.resize(newSize, nullptr);\n        for (size_t i = 0; i < newSize - size; i++)\n            freeIndexes.push_back(newSize - i - 1);\n    }\n\n    void MemoryAnalyzer::OnObjectCreated(MemoryAnalyzeObject* obj)\n    {\n        if (!enabledObjectsTracking)\n            return;\n\n        auto& freeIndexes = GetFreeAnalyzeObjects();\n        if (freeIndexes.empty())\n            AllocateAnalyzeObjects();\n\n        auto& objects = GetAnalyzeObjects();\n\n        auto nextFreeIdx = freeIndexes.back();\n\n        objects[nextFreeIdx] = obj;\n        freeIndexes.pop_back();\n\n        reinterpret_cast<MemoryAnalyzeObject*>(obj)->manageIndex = nextFreeIdx;\n    }\n\n    void MemoryAnalyzer::OnObjectDestroyed(MemoryAnalyzeObject* obj)\n    {\n        if (!enabledObjectsTracking)\n            return;\n\n        auto idx = reinterpret_cast<MemoryAnalyzeObject*>(obj)->manageIndex;\n        GetAnalyzeObjects()[idx] = nullptr;\n        GetFreeAnalyzeObjects().push_back(idx);\n    }\n\n    MemoryAnalyzer::MemoryNode* MemoryAnalyzer::BuildMemoryTree(const std::vector<MemoryAnalyzeObject*>& roots)\n    {\n        // Increment build index for marking tree\n        mCurrentBuildMemoryTreeIdx++;\n\n        auto& objects = GetAnalyzeObjects();\n\n        // Get all object pointers and sort\n        std::vector<MemoryAnalyzeObject*> sortedObjects;\n        sortedObjects.reserve(objects.size());\n        for (auto object : objects)\n        {\n            if (object)\n                sortedObjects.push_back(object);\n        }\n\n        std::sort(sortedObjects.begin(), sortedObjects.end(), [](MemoryAnalyzeObject* a, MemoryAnalyzeObject* b) { return a < b; });\n\n        std::map<std::byte*, MemoryNode*> memoryNodes;\n        std::vector<std::pair<MemoryNode*, std::vector<MemoryAnalyzeObject*>>> currentNodes;\n        std::vector<std::pair<MemoryNode*, std::vector<MemoryAnalyzeObject*>>> nextNodes;\n        std::vector<MemoryAnalyzeObject*> childRefs;\n\n        // Create root node\n        MemoryNode* allMemoryNode = new MemoryNode();\n        allMemoryNode->name = \"All memory\";\n\n        // Build tree from roots\n        BuildSubTree(allMemoryNode, roots, memoryNodes, currentNodes, nextNodes, childRefs, sortedObjects);\n\n        // Remove duplicated nodes\n        for (auto it = allMemoryNode->children.begin(); it != allMemoryNode->children.end();)\n        {\n            auto node = *it;\n\n            if (node->parents.size() > 1)\n            {\n                node->mainParent = node->parents[1];\n                node->parents.erase(node->parents.begin());\n\n                it = allMemoryNode->children.erase(it);\n            }\n            else\n                it++;\n        }\n\n        allMemoryNode->SummarizeSize();\n\n        // Collect possible leaks nodes\n        auto possibleLeaksNode = new MemoryNode();\n        possibleLeaksNode->name = \"Possible leaks\";\n        possibleLeaksNode->mainParent = allMemoryNode;\n        possibleLeaksNode->parents.push_back(allMemoryNode);\n        allMemoryNode->children.push_back(possibleLeaksNode);\n\n        for (int i = 0; i < sortedObjects.size(); i++)\n        {\n            auto& object = sortedObjects[i];\n            if (object->markIndex == mCurrentBuildMemoryTreeIdx)\n                continue;\n\n            o2Debug.Log(\"Processing object: %p (%i/%i)\", object, i, sortedObjects.size());\n\n            BuildSubTree(possibleLeaksNode, { object }, memoryNodes, currentNodes, nextNodes, childRefs, sortedObjects);\n        }\n\n        possibleLeaksNode->SummarizeLeakedSize();\n\n        // Remove ampty and duplicated leak nodes\n        for (auto it = possibleLeaksNode->children.begin(); it != possibleLeaksNode->children.end();)\n        {\n            auto node = *it;\n\n            if (node->leakedSize == 0 || node->children.empty())\n            {\n                if (node->mainParent == possibleLeaksNode)\n                    delete *it;\n\n                it = possibleLeaksNode->children.erase(it);\n            }\n            else if (node->parents.size() > 1)\n            {\n                node->mainParent = node->parents[1];\n                node->parents.erase(node->parents.begin());\n\n                it = possibleLeaksNode->children.erase(it);\n            }\n            else\n                it++;\n        }\n\n        return allMemoryNode;\n    }\n\n    void MemoryAnalyzer::BuildSubTree(MemoryNode* root, const std::vector<MemoryAnalyzeObject*>& roots,\n                                      std::map<std::byte*, MemoryNode*>& memoryNodes,\n                                      std::vector<std::pair<MemoryNode*, std::vector<MemoryAnalyzeObject*>>>& currentNodes,\n                                      std::vector<std::pair<MemoryNode*, std::vector<MemoryAnalyzeObject*>>>& nextNodes,\n                                      std::vector<MemoryAnalyzeObject*>& childRefs,\n                                      const std::vector<MemoryAnalyzeObject*>& sortedObjects)\n    {\n        // Begin marking and collecting algorithm\n        currentNodes = { { root, roots } };\n        nextNodes.clear();\n        childRefs.clear();\n\n        auto& memoryInfos = MemoryManager::Instance().mAllocs;\n\n        // Repeat until there are no more nodes to process\n        while (!currentNodes.empty())\n        {\n            // Iterate over current nodes\n            for (auto& it : currentNodes)\n            {\n                auto& node = it.first;\n\n                auto nodeIObject = it.first->iobject;\n                void* nodeObject = nullptr;\n                const ObjectType* nodeIObjectType = nullptr;\n\n                if (nodeIObject)\n                {\n                    nodeIObjectType = dynamic_cast<const ObjectType*>(&nodeIObject->GetType());\n                    nodeObject = nodeIObjectType->DynamicCastFromIObject(nodeIObject);\n                }\n\n                // Iterate children objects of this node\n                for (auto& object : it.second)\n                {\n                    object->markIndex = mCurrentBuildMemoryTreeIdx;\n\n                    // Get object's memory begin address\n                    std::byte* objectMemoryBegin = object->GetMemory();\n                    if (!objectMemoryBegin)\n                        continue;\n\n                    // Try to find existing node for this memory address. Stop looking deeper if found\n                    auto nodesMapFndIt = memoryNodes.find(objectMemoryBegin);\n                    if (nodesMapFndIt != memoryNodes.end())\n                    {\n                        node->children.push_back(nodesMapFndIt->second);\n                        nodesMapFndIt->second->parents.push_back(node);\n\n                        continue;\n                    }\n\n                    // Get object's memory size\n                    size_t objectSize = object->GetMemorySize();\n                    if (objectSize == 0)\n                    {\n                        // If it's zero, try to find it in memory info\n                        auto memoryInfosFndIt = memoryInfos.find(objectMemoryBegin);\n                        if (memoryInfosFndIt == memoryInfos.end())\n                        {\n\n                            o2Debug.LogError(\"Failed to find memory info for memory address: %p\", objectMemoryBegin);\n                            continue;\n                        }\n\n                        auto& memoryInfo = memoryInfosFndIt->second;\n                        objectSize = memoryInfo.size;\n                        memoryInfo.markIndex = mCurrentBuildMemoryTreeIdx;\n                    }\n\n                    // Create new node for this object\n                    MemoryNode* childNode = new MemoryNode();\n\n                    childNode->type = std::string(object->GetTypeInfo().name());\n\n                    childNode->memory = objectMemoryBegin;\n                    childNode->object = object;\n                    childNode->iobject = object->GetIObject();\n                    childNode->size = objectSize;\n                    childNode->mainParent = node;\n\n                    node->children.push_back(childNode);\n                    childNode->parents.push_back(node);\n\n                    // Try to determine node's name\n                    if (nodeIObjectType)\n                        childNode->name = TryFindFieldName(nodeIObjectType, nodeObject, object);\n\n                    // Store this node for future reference\n                    memoryNodes[objectMemoryBegin] = childNode;\n\n                    // Get object's memory end address\n                    std::byte* objectMemoryEnd = objectMemoryBegin + objectSize;\n\n                    // Find all child objects\n                    childRefs.clear();\n\n                    // By memory\n                    SearchChildrenObjects(sortedObjects, objectMemoryBegin, objectMemoryEnd, object, childRefs);\n\n                    // By children\n                    object->IterateChildren([&](MemoryAnalyzeObject* child)\n                                            {\n                                                childRefs.push_back(child);\n                                            });\n\n                    // By allocations\n                    object->IterateAllocations([&](std::byte* data, size_t size)\n                                               {\n                                                   SearchChildrenObjects(sortedObjects, data, data + size, object, childRefs);\n                                               });\n\n                    nextNodes.push_back({ childNode, childRefs });\n                }\n            }\n\n            // Update current nodes and clear next nodes\n            currentNodes = nextNodes;\n            nextNodes.clear();\n        }\n    }\n\n    void MemoryAnalyzer::SearchChildrenObjects(const std::vector<MemoryAnalyzeObject*>& sortedObjects,\n                                               std::byte* objectMemoryBegin, std::byte* objectMemoryEnd,\n                                               MemoryAnalyzeObject*& object,\n                                               std::vector<MemoryAnalyzeObject*>& childRefs)\n    {\n        auto refIt = std::lower_bound(sortedObjects.begin(), sortedObjects.end(), reinterpret_cast<MemoryAnalyzeObject*>(objectMemoryBegin));\n        while (refIt != sortedObjects.end() && reinterpret_cast<std::byte*>(*refIt) < objectMemoryEnd)\n        {\n            if (*refIt != object)\n                childRefs.push_back(*refIt);\n\n            refIt++;\n        }\n    }\n\n    std::string MemoryAnalyzer::TryFindFieldName(const Type* nodeIObjectType, void* nodeObject,\n                                                 MemoryAnalyzeObject*& object)\n    {\n        for (auto& fieldInfo : nodeIObjectType->GetFields())\n        {\n            if (fieldInfo.GetValuePtr(nodeObject) == object)\n            {\n                return (std::string)fieldInfo.GetName();\n            }\n        }\n\n        for (auto& baseClass : nodeIObjectType->GetBaseTypes())\n        {\n            auto baseObject = baseClass.dynamicCastUpFunc(nodeObject);\n            auto name = TryFindFieldName(baseClass.type, baseObject, object);\n            if (!name.empty())\n                return name;\n        }\n\n        return \"\";\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/MemoryAnalyzer.h",
    "content": "#pragma once\n#include <functional>\n\nnamespace o2\n{\n    class IObject;\n    class Type;\n    struct MemoryAnalyzeObject;\n\n    class MemoryAnalyzer\n    {\n    public:\n        struct MemoryNode\n        {\n            std::string name; // Name of object\n            std::string type; // Type of object\n\n            void* memory = nullptr; // Pointer to allocated memory\n\n            MemoryAnalyzeObject* object = nullptr; // Memory analyzeable object\n            IObject* iobject = nullptr; // Pointer to IObject, if can be casted\n\n            size_t size = 0;        // Allocated size in bytes\n            size_t summarySize = 0; // Summary size of all children\n            size_t leakedSize = 0;  // Summary leaked size\n\n            MemoryNode* mainParent = nullptr; // Main parent node, the owner of this node\n            std::vector<MemoryNode*> parents;              // Parent nodes\n            std::vector<MemoryNode*> children;             // Children nodes\n\n        public:\n            ~MemoryNode();\n\n            void SummarizeSize();\n            void SummarizeLeakedSize();\n        };\n\n    public:\n        static bool enabledObjectsTracking; // Enable objects tracking\n\n    public:\n        static void OnObjectCreated(MemoryAnalyzeObject* obj);\n        static void OnObjectDestroyed(MemoryAnalyzeObject* obj);\n\n        // Builds memory tree from roots\n        static MemoryNode* BuildMemoryTree(const std::vector<MemoryAnalyzeObject*>& roots);\n\n    private:\n        static int mCurrentBuildMemoryTreeIdx;\n\n    private:\n        static std::vector<MemoryAnalyzeObject*>& GetAnalyzeObjects();\n        static std::vector<size_t>& GetFreeAnalyzeObjects();\n\n        static void AllocateAnalyzeObjects();\n\n        static void BuildSubTree(MemoryNode* root, const std::vector<MemoryAnalyzeObject*>& roots,\n                                 std::map<std::byte*, MemoryNode*>& memoryNodes,\n                                 std::vector<std::pair<MemoryNode*, std::vector<MemoryAnalyzeObject*>>>& currentNodes,\n                                 std::vector<std::pair<MemoryNode*, std::vector<MemoryAnalyzeObject*>>>& nextNodes,\n                                 std::vector<MemoryAnalyzeObject*>& childRefs,\n                                 const std::vector<MemoryAnalyzeObject*>& sortedObjects);\n\n        static std::string TryFindFieldName(const Type* nodeIObjectType, void* nodeObject,\n                                            MemoryAnalyzeObject*& object);\n\n        static void SearchChildrenObjects(const std::vector<MemoryAnalyzeObject*>& sortedObjects,\n                                          std::byte* objectMemoryBegin, std::byte* objectMemoryEnd,\n                                          MemoryAnalyzeObject*& object,\n                                          std::vector<MemoryAnalyzeObject*>& childRefs);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/MemoryManager.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"MemoryManager.h\"\n\n#include <algorithm>\n\n#include \"o2/Utils/Debug/Assert.h\"\n#include \"o2/Utils/Debug/Log/ConsoleLogStream.h\"\n#include \"o2/Utils/Debug/Log/FileLogStream.h\"\n\nvoid* operator new(size_t size, const char* location, int line)\n{\n    return _mmalloc(size, location, line);\n}\n\nvoid* operator new[](size_t size, const char* location, int line)\n{\n    return _mmalloc(size, location, line);\n}\n\nvoid operator delete(void* allocMemory) noexcept\n{\n    _mfree(allocMemory);\n}\n\nvoid operator delete(void* allocMemory, const char* location, int line)\n{\n    ::operator delete(allocMemory);\n}\n\nvoid operator delete[](void* allocMemory, const char* location, int line)\n{\n    ::operator delete(allocMemory);\n}\n\nvoid operator delete[](void* allocMemory) noexcept\n{\n    ::operator delete(allocMemory);\n}\n\nvoid* _mmalloc(size_t size, const char* location, int line)\n{\n    void* memory = malloc(size);\n\n#if ENABLE_MEMORY_MANAGE\n    o2::MemoryManager::Instance().OnMemoryAllocate(memory, size, location, line);\n#endif\n\n    return memory;\n}\n\nvoid _mfree(void* allocMemory)\n{\n#if ENABLE_MEMORY_MANAGE == true\n    o2::MemoryManager::Instance().OnMemoryRelease(allocMemory);\n#endif\n\n    free(allocMemory);\n}\n\nnamespace o2\n{\n    MemoryManager::MemoryManager():\n        mTotalBytes(0)\n    {}\n\n    MemoryManager::~MemoryManager()\n    {\n        DumpInfo();\n    }\n\n    MemoryManager& MemoryManager::Instance()\n    {\n        if (!mInstance)\n            mInstance = new MemoryManager();\n\n        return *mInstance;\n    }\n\n    void MemoryManager::Initialize()\n    {\n        mInstance = new MemoryManager();\n    }\n\n    void MemoryManager::OnMemoryAllocate(void* memory, size_t size, const char* source, int line)\n    {\n        AllocInfo info;\n        info.memory = memory;\n        info.size = size;\n        info.sourceLine = line;\n        info.source = source;\n        mAllocs[memory] = info;\n        mTotalBytes += size;\n    }\n\n    void MemoryManager::OnMemoryRelease(void* memory)\n    {\n        auto fnd = mAllocs.find(memory);\n        if (fnd != mAllocs.end())\n        {\n            mTotalBytes -= (*fnd).second.size;\n            mAllocs.erase(fnd);\n        }\n    }\n\n    void MemoryManager::DumpInfo()\n    {\n        printf(\"========MemoryManager::DumpInfo==========\\n\");\n\n        printf(\"Total managed allocations: %f MB\\n\", (float)mTotalBytes / 1024.0f / 1024.0f);\n\n        struct allocSrc\n        {\n            char source[128];\n            int line = 0;\n            size_t size = 0;\n            int count = 0;\n\n            bool operator<(const allocSrc& other) const\n            {\n                return size < other.size;\n            }\n        };\n        std::vector<allocSrc> allocs;\n\n        int i = 0;\n        for (auto it = mAllocs.begin(); it != mAllocs.end(); ++it, i++)\n        {\n            auto& info = (*it).second;\n\n            bool found = false;\n            for (auto& allc : allocs)\n            {\n                if (allc.line == info.sourceLine && strcmp(allc.source, info.source) == 0)\n                {\n                    allc.size += info.size;\n                    allc.count++;\n                    found = true;\n                    break;\n                }\n            }\n\n            if (!found)\n            {\n                allocSrc allc;\n                allc.line = info.sourceLine;\n                strncpy(allc.source, info.source, 127);\n                allc.size = info.size;\n                allc.count = 1;\n\n                allocs.push_back(allc);\n            }\n        }\n\n        std::sort(allocs.begin(), allocs.end());\n\n        for (int i = 0; i < (int)allocs.size(); i++)\n        {\n            printf(\"%i: %s : %i - %zi bytes (%f MB) in %i allocs\\n\",\n                   i, allocs[i].source, allocs[i].line, allocs[i].size,\n                   (float)allocs[i].size / 1024.0f / 1024.0f, allocs[i].count);\n        }\n\n        printf(\"========END==========\\n\");\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Memory/MemoryManager.h",
    "content": "#pragma once\n\n#include <algorithm>\n#include <vector>\n#include <map>\n\n#include \"o2/EngineSettings.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\n// Memory manager access macros\n#define o2Memory MemoryManager::Instance()\n\n// Managed new macros\n#define mnew new(__FILE__, __LINE__)\n\n// Managed malloc macros\n#define mmalloc(SIZE) _mmalloc(SIZE, __FILE__, __LINE__)\n\n// Managed free macros\n#define mfree(MEMORY) _mfree(MEMORY)\n\n// Overloaded managed new operator with source and line arguments\nvoid* operator new(size_t size, const char* location, int line);\n\n// Overloaded managed new[] operator with source and line arguments\nvoid* operator new[](size_t size, const char* location, int line);\n\n// Delete operator with source and line arguments\nvoid  operator delete(void* allocMemory, const char* location, int line);\n\n// Delete operator with source and line arguments\nvoid  operator delete[](void* allocMemory, const char* location, int line);\n\n// Overloaded delete operator\nvoid  operator delete(void* allocMemory) noexcept;\n\n// Overloaded delete operator\nvoid  operator delete[](void* allocMemory) noexcept;\n\n// Managed malloc() with source and line arguments\nvoid* _mmalloc(size_t size, const char* location, int line);\n\n// Managed free()\nvoid _mfree(void* allocMemory);\n\nnamespace o2\n{\n    class LogStream;\n\n    // ------------------------------------------------------------------\n    // Memory manager, using for collecting garbage, tracing memory leaks\n    // ------------------------------------------------------------------\n    class MemoryManager\n    {\n    public:\n        // Constructor\n        MemoryManager();\n\n        // Destructor\n        ~MemoryManager();\n\n        // Returns instance of memory manager\n        static MemoryManager& Instance();\n\n        // Initializes memory manager\n        static void Initialize();\n\n        // Collects information about allocated memory and prints into console\n        void DumpInfo();\n\n    protected:\n        // ----------------------\n        // Allocation information\n        // ----------------------\n        struct AllocInfo\n        {\n            const char* source;     // Allocation source code file\n            int         sourceLine; // Allocation source code line\n            size_t      size;       // Allocated size in bytes\n            void*       memory;     // Pointer to allocated memory\n\n            int markIndex = 0; // Mark index for memory analyzer\n        };\n\n        static MemoryManager* mInstance; // Instance pointer\n\n        std::map<void*, AllocInfo> mAllocs;     // Allocations info\n        size_t                     mTotalBytes; // Total managed allocated bytes\n\n    protected:\n        // Called when memory was allocated and registers allocation\n        void OnMemoryAllocate(void* memory, size_t size, const char* source, int line);\n\n        // Called when memory releasing, unregisters allocation\n        void OnMemoryRelease(void* memory);\n\n        friend void* ::operator new(size_t size, const char* location, int line);\n        friend void* ::operator new[](size_t size, const char* location, int line);\n        friend void  ::operator delete(void* allocMemory) noexcept;\n        friend void* ::_mmalloc(size_t size, const char* location, int line);\n        friend void  ::_mfree(void* allocMemory);\n        friend class MemoryAnalyzer;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Property.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Reflection/TypeTraits.h\"\n\nnamespace o2\n{\n#define PROPERTIES(CLASSNAME) \\\n    typedef CLASSNAME _propertiesClassType\n\n#define PROPERTY(TYPE, NAME, SETTER, GETTER)                                                                                                             \\\n    class NAME##_PROPERTY                                                                                                                                \\\n    {                                                                                                                                                    \\\n        _propertiesClassType* GetThis() const                                                                                                            \\\n        {                                                                                                                                                \\\n            return reinterpret_cast<_propertiesClassType*>(                                                                                              \\\n                const_cast<std::byte*>(reinterpret_cast<const std::byte*>(this)) - offsetof(_propertiesClassType, NAME));                                \\\n        }                                                                                                                                                \\\n                                                                                                                                                         \\\n    public:                                                                                                                                              \\\n        typedef TYPE valueType;                                                                                                                          \\\n                                                                                                                                                         \\\n        NAME##_PROPERTY() {}                                                                                                                             \\\n                                                                                                                                                         \\\n        operator valueType() const { return GetThis()->GETTER(); }                                                                                       \\\n        NAME##_PROPERTY& operator=(const valueType& value) { GetThis()->SETTER(const_cast<valueType&>(value)); return *this; }                           \\\n                                                                                                                                                         \\\n        NAME##_PROPERTY& operator=(const NAME##_PROPERTY& value) { GetThis()->SETTER(value.Get()); return *this; }                                       \\\n                                                                                                                                                         \\\n        template<typename vt, typename X = typename std::enable_if<std::is_same<vt, valueType>::value && SupportsEqualOperator<valueType>::value>::type> \\\n        bool operator==(const vt& value) const { return Math::Equals(GetThis()->GETTER(), value); }                                                      \\\n                                                                                                                                                         \\\n        template<typename vt, typename X = typename std::enable_if<std::is_same<vt, valueType>::value && SupportsEqualOperator<valueType>::value>::type> \\\n        bool operator!=(const vt& value) const { return !Math::Equals(GetThis()->GETTER(), value); }                                                     \\\n                                                                                                                                                         \\\n        template<typename T, typename X = typename std::enable_if<o2::SupportsPlus<valueType>::value && std::is_same<T, valueType>::value>::type>        \\\n        valueType operator+(const T& value) { return GetThis()->GETTER() + value; }                                                                      \\\n                                                                                                                                                         \\\n        template<typename T, typename X = typename std::enable_if<o2::SupportsMinus<valueType>::value && std::is_same<T, valueType>::value>::type>       \\\n        valueType operator-(const T& value) { return GetThis()->GETTER() - value; }                                                                      \\\n                                                                                                                                                         \\\n        template<typename T, typename X = typename std::enable_if<o2::SupportsDivide<valueType>::value && std::is_same<T, valueType>::value>::type>      \\\n        valueType operator/(const T& value) { return GetThis()->GETTER() / value; }                                                                      \\\n                                                                                                                                                         \\\n        template<typename T, typename X = typename std::enable_if<o2::SupportsMultiply<valueType>::value && std::is_same<T, valueType>::value>::type>    \\\n        valueType operator*(const T& value) { return GetThis()->GETTER() * value; }                                                                      \\\n                                                                                                                                                         \\\n        template<typename T, typename X = typename std::enable_if<o2::SupportsPlus<valueType>::value && std::is_same<T, valueType>::value>::type>        \\\n        NAME##_PROPERTY& operator+=(const T& value) { auto _this = GetThis(); _this->SETTER(_this->GETTER() + value); return *this; }                    \\\n                                                                                                                                                         \\\n        template<typename T, typename X = typename std::enable_if<o2::SupportsMinus<valueType>::value && std::is_same<T, valueType>::value>::type>       \\\n        NAME##_PROPERTY& operator-=(const T& value) { auto _this = GetThis(); _this->SETTER(_this->GETTER() - value); return *this; }                    \\\n                                                                                                                                                         \\\n        template<typename T, typename X = typename std::enable_if<o2::SupportsDivide<valueType>::value && std::is_same<T, valueType>::value>::type>      \\\n        NAME##_PROPERTY& operator/=(const T& value) { auto _this = GetThis(); _this->SETTER(_this->GETTER() / value); return *this; }                    \\\n                                                                                                                                                         \\\n        template<typename T, typename X = typename std::enable_if<o2::SupportsMultiply<valueType>::value && std::is_same<T, valueType>::value>::type>    \\\n        NAME##_PROPERTY& operator*=(const T& value) { auto _this = GetThis(); _this->SETTER(_this->GETTER() * value); return *this; }                    \\\n                                                                                                                                                         \\\n        valueType Get() const { return GetThis()->GETTER(); }                                                                                            \\\n        void Set(const valueType& value) { GetThis()->SETTER(const_cast<valueType&>(value)); }                                                           \\\n                                                                                                                                                         \\\n        PropertyValueProxy<valueType, NAME##_PROPERTY> GetValueProxy() { return PropertyValueProxy<valueType, NAME##_PROPERTY>(this); }                  \\\n                                                                                                                                                         \\\n        bool IsProperty() const { return true; }                                                                                                         \\\n    };                                                                                                                                                   \\\n                                                                                                                                                         \\\n    NAME##_PROPERTY NAME;\n\n#define GETTER(TYPE, NAME, GETTER)                                                                                         \\\n    class NAME##_GET_PROPERTY                                                                                              \\\n    {                                                                                                                      \\\n        _propertiesClassType* GetThis() const                                                                              \\\n        {                                                                                                                  \\\n            return reinterpret_cast<_propertiesClassType*>(                                                                \\\n                const_cast<std::byte*>(reinterpret_cast<const std::byte*>(this)) - offsetof(_propertiesClassType, NAME));  \\\n        }                                                                                                                  \\\n                                                                                                                           \\\n    public:                                                                                                                \\\n        typedef TYPE valueType;                                                                                            \\\n                                                                                                                           \\\n        NAME##_GET_PROPERTY() {}                                                                                           \\\n                                                                                                                           \\\n        operator valueType() { return GetThis()->GETTER(); }                                                               \\\n        bool operator==(const valueType& value) const { return GetThis()->GETTER() == value; }                             \\\n        bool operator!=(const valueType& value) const { return GetThis()->GETTER() != value; }                             \\\n        TYPE Get() const { return GetThis()->GETTER(); }                                                                   \\\n    };                                                                                                                     \\\n                                                                                                                           \\\n    NAME##_GET_PROPERTY NAME;                                                \n\n#define SETTER(TYPE, NAME, SETTER)                                                                                         \\\n    class NAME##_SET_PROPERTY                                                                                              \\\n    {                                                                                                                      \\\n        _propertiesClassType* GetThis() const                                                                              \\\n        {                                                                                                                  \\\n            return reinterpret_cast<_propertiesClassType*>(                                                                \\\n                const_cast<std::byte*>(reinterpret_cast<const std::byte*>(this)) - offsetof(_propertiesClassType, NAME));  \\\n        }                                                                                                                  \\\n                                                                                                                           \\\n    public:                                                                                                                \\\n        typedef TYPE valueType;                                                                                            \\\n                                                                                                                           \\\n        NAME##_SET_PROPERTY() {}                                                                                           \\\n                                                                                                                           \\\n        NAME##_SET_PROPERTY& operator=(const valueType& value) { GetThis()->SETTER(value); return *this; }                 \\\n        void Set(const valueType& value) { GetThis()->SETTER(const_cast<valueType&>(value)); }                             \\\n    };                                                                                                                     \\\n                                                                                                                           \\\n    NAME##_SET_PROPERTY NAME;                                                \n\n#define ACCESSOR(TYPE, NAME, KEY_TYPE, GETTER, GET_ALL)                                                                    \\\n    class NAME##_ACCESSOR                                                                                                  \\\n    {                                                                                                                      \\\n        _propertiesClassType* GetThis() const                                                                              \\\n        {                                                                                                                  \\\n            return reinterpret_cast<_propertiesClassType*>(                                                                \\\n                const_cast<std::byte*>(reinterpret_cast<const std::byte*>(this)) - offsetof(_propertiesClassType, NAME));  \\\n        }                                                                                                                  \\\n                                                                                                                           \\\n    public:                                                                                                                \\\n        typedef TYPE     valueType;                                                                                        \\\n        typedef KEY_TYPE keyType;                                                                                          \\\n        NAME##_ACCESSOR(_propertiesClassType* _this) {}                                                                    \\\n        valueType Get(const keyType& key) const { return GetThis()->GETTER(key); }                                         \\\n        Map<keyType, TYPE> GetAll() const { return GetThis()->GET_ALL(); }                                                 \\\n        valueType operator[](const keyType& key) const { return GetThis()->GETTER(key); }                                  \\\n                                                                                                                           \\\n        bool IsAccessor() const { return true; }                                                                           \\\n    };                                                                                                                     \\\n                                                                                                                           \\\n    NAME##_ACCESSOR NAME = NAME##_ACCESSOR(this);    \n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/Attributes.h",
    "content": "#pragma once\n\nnamespace o2\n{\n    class FieldInfo;\n    class Type;\n\n    // ----------------------------------------\n    // Attribute interface. Using in reflection\n    // ----------------------------------------\n    class IAttribute\n    {\n    public:\n        // Default constructor\n        IAttribute(): mOwnerFieldInfo(nullptr) {}\n\n        // Virtual destructor\n        virtual ~IAttribute() {}\n\n        template<typename _base>\n        struct SerializeProcessorMixin: public _base\n        {\n            template<typename _object_type, typename _field_type>\n            SerializeProcessorMixin<_base>& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                                        _field_type& field)\n            {\n                _base::FieldBasics(object, type, name, pointerGetter, field);\n                return *this;\n            }\n        };\n\n    protected:\n        FieldInfo* mOwnerFieldInfo; // Pointer to owner field info object\n\n        friend class FieldInfo;\n    };\n\n#define ATTRIBUTE_COMMENT_DEFINITION(X)\n#define ATTRIBUTE_SHORT_DEFINITION(X)\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/BaseTypeProcessor.h",
    "content": "//@CODETOOLIGNORE\n\n#pragma once\n\n#include \"o2/Utils/Types/CommonTypes.h\"\n\nnamespace o2\n{\n    class Type;\n\n    // ---------------------------------------------------------------------\n    // Base type processor class. You can use it as base class or as example\n    // ---------------------------------------------------------------------\n    class BaseTypeProcessor\n    {\n    public:\n        // ----------------------------------------------------------\n        // Field processor. Use it for meta-program field definitions\n        // ----------------------------------------------------------\n        struct FieldProcessor\n        {\n            template<typename _attribute_type, typename ... _args>\n            FieldProcessor& AddAttribute(_args ... args) { return *this; }\n\n            template<typename _type>\n            FieldProcessor& SetDefaultValue(const _type& value) { return *this; }\n\n            FieldProcessor& SetProtectSection(ProtectSection section) { return *this; }\n\n            template<typename _object_type, typename _field_type>\n            void FieldBasics(_object_type* object, Type* type, const char* name, void* (*pointerGetter)(void*),\n                             _field_type& field) {}\n        };\n\n        // ----------------------------------------------------------------\n        // Function processor. Use it for meta-program function definitions\n        // ----------------------------------------------------------------\n        struct FunctionProcessor\n        {\n            template<typename _attribute_type, typename ... _args>\n            FunctionProcessor& AddAttribute(_args ... args) { return *this; }\n\n            FunctionProcessor& SetProtectSection(ProtectSection section) { return *this; }\n\n            template<typename _object_type, typename ... _args>\n            void Constructor(_object_type* object, Type* type) {}\n\n            template<typename _object_type, typename _res_type, typename ... _args>\n            void Signature(_object_type* object, Type* type, const char* name,\n                           _res_type(_object_type::* pointer)(_args ...)) {}\n\n            template<typename _object_type, typename _res_type, typename ... _args>\n            void Signature(_object_type* object, Type* type, const char* name,\n                           _res_type(_object_type::* pointer)(_args ...) const) {}\n\n            template<auto pointer, typename _object_type>\n            void Signature(_object_type* object, Type* type, const char* name) {}\n\n            template<auto pointer, typename _object_type, typename _callable>\n            void Signature(_object_type* object, Type* type, const char* name, _callable /*callable*/) {}\n\n            template<typename _object_type, typename _res_type, typename ... _args>\n            void SignatureStatic(_object_type* object, Type* type, const char* name,\n                                 _res_type(*pointer)(_args ...)) {}\n        };\n\n        template<typename _object_type>\n        void Start(_object_type* object, Type* type) {}\n\n        template<typename _object_type>\n        void StartBases(_object_type* object, Type* type) {}\n\n        template<typename _object_type, typename _base_type>\n        void BaseType(_object_type* object, Type* type, const char* name) {}\n\n        template<typename _object_type>\n        void StartFields(_object_type* object, Type* type) {}\n\n        FieldProcessor StartField() { return FieldProcessor(); }\n\n        template<typename _object_type>\n        void StartMethods(_object_type* object, Type* type) {}\n\n        FunctionProcessor StartFunction() { return FunctionProcessor(); }\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/Enum.h",
    "content": "#pragma once\n\n#include <type_traits>\n\nnamespace o2\n{\n    template<typename _type>\n    class IsEnumReflectable: public std::false_type {};\n\n#define PRE_ENUM_META(NAME)                                      \\\n    template<>                                                   \\\n    class o2::IsEnumReflectable<NAME>: public std::true_type {};\n\n#define ENUM_META(NAME, REGISTRATOR_ID)                                                                    \\\n    extern void __RegisterEnum__##REGISTRATOR_ID()                                                         \\\n    {                                                                                                      \\\n        o2::EnumTypeContainer<NAME>::type = o2::Reflection::InitializeEnum<NAME>(#NAME, []() {             \\\n        typedef NAME EnumName;                                                                             \\\n        o2::Map<int, o2::String> res;\n\n#define ENUM_ENTRY(NAME) \\\n    res.Add((int)EnumName::NAME, #NAME)\n\n#define END_ENUM_META \\\n    return res; }); }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/FieldInfo.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FieldInfo.h\"\n\n#include \"o2/Utils/Reflection/Type.h\"\n\nnamespace o2\n{\n    FieldInfo::FieldInfo()\n    {}\n\n    FieldInfo::FieldInfo(const Type* ownerType, const String& name, GetValuePointerFuncPtr pointerGetter, const Type* type,\n                         ProtectSection section, IDefaultValue* defaultValue /*= nullptr*/, \n                         ITypeSerializer* serializer /*= nullptr*/):\n        mOwnerType(ownerType), mName(name), mPointerGetter(pointerGetter), mType(type), mProtectSection(section),\n        mSerializer(serializer ? serializer : mType->GetSerializer()), mDefaultValue(defaultValue)\n    {}\n\n    FieldInfo::FieldInfo(FieldInfo&& other):\n        mProtectSection(other.mProtectSection), mName(other.mName), mType(other.mType), mOwnerType(other.mOwnerType),\n        mAttributes(other.mAttributes), mSerializer(other.mSerializer), mDefaultValue(other.mDefaultValue), \n        mPointerGetter(other.mPointerGetter)\n    {\n        other.mAttributes.Clear();\n        other.mSerializer = nullptr;\n        other.mDefaultValue = nullptr;\n    }\n\n    FieldInfo::~FieldInfo()\n    {\n        for (auto attr : mAttributes)\n            delete attr;\n\n        if (mSerializer)\n            delete mSerializer;\n\n        if (mDefaultValue)\n            delete mDefaultValue;\n    }\n\n    bool FieldInfo::operator==(const FieldInfo& other) const\n    {\n        return mName == other.mName && mPointerGetter == other.mPointerGetter && mAttributes == other.mAttributes && \n            mProtectSection == other.mProtectSection;\n    }\n\n    const String& FieldInfo::GetName() const\n    {\n        return mName;\n    }\n\n    void FieldInfo::SetProtectSection(ProtectSection section)\n    {\n        mProtectSection = section;\n    }\n\n    ProtectSection FieldInfo::GetProtectionSection() const\n    {\n        return mProtectSection;\n    }\n\n    const Type* FieldInfo::GetType() const\n    {\n        return mType;\n    }\n\n    const Type* FieldInfo::GetOwnerType() const\n    {\n        return mOwnerType;\n    }\n\n    const Vector<IAttribute*>& FieldInfo::GetAttributes() const\n    {\n        return mAttributes;\n    }\n\n    bool FieldInfo::CheckSerializable(void* object) const\n    {\n        void* valuePtr = GetValuePtrStrong(object);\n\n        if (mDefaultValue)\n            return !mDefaultValue->Equals(valuePtr);\n\n        if (mSerializer)\n            return !mSerializer->IsDefault(valuePtr);\n\n        return true;\n    }\n\n    void FieldInfo::SerializeFromObject(void* object, DataValue& data) const\n    {\n        mSerializer->Serialize(GetValuePtrStrong(object), data);\n    }\n\n    void FieldInfo::DeserializeFromObject(void* object, const DataValue& data) const\n    {\n        mSerializer->Deserialize(GetValuePtrStrong(object), data);\n    }\n\n    void FieldInfo::Serialize(void* ptr, DataValue& data) const\n    {\n        mSerializer->Serialize(ptr, data);\n    }\n\n    void FieldInfo::Deserialize(void* ptr, const DataValue& data) const\n    {\n        mSerializer->Deserialize(ptr, data);\n    }\n\n    bool FieldInfo::IsValueEquals(void* objectA, void* objectB) const\n    {\n        return mSerializer->Equals(GetValuePtrStrong(objectA), GetValuePtrStrong(objectB));\n    }\n\n    void FieldInfo::CopyValue(void* objectA, void* objectB) const\n    {\n        mSerializer->Copy(GetValuePtrStrong(objectA), GetValuePtrStrong(objectB));\n    }\n\n    void* FieldInfo::SearchFieldPtr(void* obj, const String& path, const FieldInfo*& fieldInfo) const\n    {\n        if (!mType)\n            return nullptr;\n\n        if (mType->GetUsage() == Type::Usage::Pointer)\n            return ((PointerType*)mType)->GetBaseType()->GetFieldPtr(obj, path, fieldInfo);\n\n        return mType->GetFieldPtr(obj, path, fieldInfo);\n    }\n\n    void* FieldInfo::GetValuePtr(void* object) const\n    {\n        if (mType->GetUsage() == Type::Usage::Pointer)\n            return *(void**)GetValuePtrStrong(object);\n\n        return GetValuePtrStrong(object);\n    }\n\n    const void* FieldInfo::GetValuePtrStrong(const void* object) const\n    {\n        return (*mPointerGetter)(const_cast<void*>(object));\n    }\n\n    void* FieldInfo::GetValuePtrStrong(void* object) const\n    {\n        return (*mPointerGetter)(object);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/FieldInfo.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Type;\n    class DataValue;\n    struct ITypeSerializer;\n\n    struct IDefaultValue\n    {\n        virtual bool Equals(void* value) const = 0;\n        virtual ~IDefaultValue() {}\n    };\n\n    template<typename T>\n    struct DefaultValue: public IDefaultValue\n    {\n        T value;\n\n        DefaultValue(const T& value): value(value) {}\n        bool Equals(void* value) const override { return *(T*)value == this->value; }\n    };\n\n    // -----------------------\n    // Class field information\n    // -----------------------\n    class FieldInfo\n    {\n    public:\n        typedef void*(*GetValuePointerFuncPtr)(void*);\n\n    public:\n        // Default constructor\n        FieldInfo();\n\n        // Move-constructor\n        FieldInfo(FieldInfo&& other);\n\n        // Constructor\n        FieldInfo(const Type* ownerType, const String& name, GetValuePointerFuncPtr pointerGetter, const Type* type, \n                  ProtectSection section, IDefaultValue* defaultValue = nullptr, ITypeSerializer* serializer = nullptr);\n\n        // Destructor\n        ~FieldInfo();\n\n        // Equal operator\n        bool operator==(const FieldInfo& other) const;\n\n        // Adds attribute by type and parameters\n        template<typename _attr_type, typename ... _args>\n        FieldInfo& AddAttribute(_args ... args);\n\n        // Sets default value\n        template<typename _type>\n        FieldInfo& SetDefaultValue(const _type& value);\n\n        // Returns name of field\n        const String& GetName() const;\n\n        // Sets protection section\n        void SetProtectSection(ProtectSection section);\n\n        // Protection section\n        ProtectSection GetProtectionSection() const;\n\n        // Returns type\n        const Type* GetType() const;\n\n        // Returns field owner type\n        const Type* GetOwnerType() const;\n\n        // Returns value of field in specified object\n        template<typename _type>\n        _type GetValue(void* object) const;\n\n        // Returns value pointer of field in specified object (checks is it pointer)\n        void* GetValuePtr(void* object) const;\n\n        // Returns value pointer of field in specified object\n        const void* GetValuePtrStrong(const void* object) const;\n\n        // Returns value pointer of field in specified object\n        void* GetValuePtrStrong(void* object) const;\n\n        // Sets value of field in specified object\n        template<typename _type>\n        void SetValue(void* object, _type value) const;\n\n        // Returns attribute of field, if it is not exist - returns nullptr\n        template<typename _attr_type>\n        _attr_type* GetAttribute() const;\n\n        // Returns true if exist attribute with specified type\n        template<typename _attr_type>\n        bool HasAttribute() const;\n\n        // Returns attributes array\n        const Vector<IAttribute*>& GetAttributes() const;\n\n        // Checks is value from object is serializable and not equals with default value\n        bool CheckSerializable(void* object) const;\n\n        // Serializes from object pointer, that contains this field\n        void SerializeFromObject(void* object, DataValue& data) const;\n\n        // Deserializes from object pointer, that contains this field\n        void DeserializeFromObject(void* object, const DataValue& data) const;\n\n        // Serializes value from ptr\n        void Serialize(void* ptr, DataValue& data) const;\n\n        // Deserializes value from ptr\n        void Deserialize(void* ptr, const DataValue& data) const;\n\n        // Returns is values getted from object A and object B equals\n        bool IsValueEquals(void* objectA, void* objectB) const;\n\n        // Copies value getter from objectB to value from objectA\n        void CopyValue(void* objectA, void* objectB) const;\n\n    protected:\n        ProtectSection         mProtectSection = ProtectSection::Public; // Protection section\n        String                 mName;                                    // Name of field\n        const Type*            mType = nullptr;                          // Field type\n        const Type*            mOwnerType = nullptr;                     // Field owner type\n        Vector<IAttribute*>    mAttributes;                              // Attributes array\n        ITypeSerializer*       mSerializer = nullptr;                    // Field serializer\n        IDefaultValue*         mDefaultValue = nullptr;                  // Default field value. nullptr when undefined\n        GetValuePointerFuncPtr mPointerGetter = nullptr;                 // Value pointer getter function\n\n    protected:\n        // Searches field recursively by path\n        void* SearchFieldPtr(void* obj, const String& path, const FieldInfo*& fieldInfo) const;\n\n        friend class Type;\n        friend class VectorType;\n        friend class ReflectionInitializationTypeProcessor;\n\n        template<typename _type, typename _accessor_type>\n        friend class TStringPointerAccessorType;\n    };\n}\n\n#include \"o2/Utils/Reflection/TypeTraits.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n\nnamespace o2\n{\n    template<typename _attr_type>\n    bool FieldInfo::HasAttribute() const\n    {\n        for (auto attr : mAttributes)\n        {\n            if (dynamic_cast<_attr_type*>(attr))\n                return true;\n        }\n\n        return false;\n    }\n\n    template<typename _attr_type>\n    _attr_type* FieldInfo::GetAttribute() const\n    {\n        for (auto attr : mAttributes)\n        {\n            _attr_type* res = dynamic_cast<_attr_type*>(attr);\n            if (res)\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    void FieldInfo::SetValue(void* object, _type value) const\n    {\n        *(_type*)GetValuePtrStrong(object) = value;\n    }\n\n    template<typename _type>\n    _type FieldInfo::GetValue(void* object) const\n    {\n        return *(_type*)GetValuePtrStrong(object);\n    }\n\n    template<typename _attr_type, typename ... _args>\n    FieldInfo& FieldInfo::AddAttribute(_args ... args)\n    {\n        _attr_type* attribute = mnew _attr_type(args ...);\n        attribute->mOwnerFieldInfo = this;\n        mAttributes.Add(attribute);\n        return *this;\n    }\n\n    template<typename _type>\n    FieldInfo& FieldInfo::SetDefaultValue(const _type& value)\n    {\n        if constexpr (std::is_copy_constructible_v<_type> && SupportsEqualOperator<_type>::value)\n            mDefaultValue = mnew DefaultValue<_type>(value);\n\n        return *this;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/FunctionInfo.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"FunctionInfo.h\"\n\nnamespace o2\n{\n    bool FunctionInfoBase::operator==(const FunctionInfoBase& other) const\n    {\n        return mName == other.mName &&\n            mReturnType == other.mReturnType && mParameters == other.mParameters;\n    }\n\n    FunctionInfoBase* FunctionInfoBase::Clone() const\n    {\n        return mnew FunctionInfoBase(*this);\n    }\n\n    FunctionInfoBase* FunctionInfo::Clone() const\n    {\n        return mnew FunctionInfo(*this);\n    }\n\n    bool FunctionInfo::operator==(const FunctionInfo& other) const\n    {\n        return FunctionInfoBase::operator==(other) && mIsContant == other.mIsContant;\n    }\n\n    Type* FunctionInfoBase::GetOwnerType() const\n    {\n        return mOwnerType;\n    }\n\n    const String& FunctionInfoBase::GetName() const\n    {\n        return mName;\n    }\n\n    const Type* FunctionInfoBase::GetReturnType() const\n    {\n        return mReturnType;\n    }\n\n    bool FunctionInfo::IsConstant() const\n    {\n        return mIsContant;\n    }\n\n    ProtectSection FunctionInfoBase::GetProtectionSection() const\n    {\n        return mProtectSection;\n    }\n\n    const Vector<IAttribute*>& FunctionInfoBase::GetAttributes() const\n    {\n        return mAttributes;\n    }\n\n    const Vector<const Type*>& FunctionInfoBase::GetParameters() const\n    {\n        return mParameters;\n    }\n\n    FunctionInfoBase* StaticFunctionInfo::Clone() const\n    {\n        return mnew StaticFunctionInfo(*this);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/FunctionInfo.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    class Type;\n    // -------------------------\n    // Base function information\n    // -------------------------\n    class FunctionInfoBase\n    {\n    public:\n        // Returns cloned copy\n        virtual FunctionInfoBase* Clone() const;\n\n        // Check Equals operator\n        bool operator==(const FunctionInfoBase& other) const;\n\n        // Returns owner type\n        Type* GetOwnerType() const;\n\n        // Returns function's name\n        const String& GetName() const;\n\n        // Returns return value type\n        const Type* GetReturnType() const;\n\n        // Returns function's parameters\n        const Vector<const Type*>& GetParameters() const;\n\n        // Returns protection section of function\n        ProtectSection GetProtectionSection() const;\n\n        // Returns attribute of field, if it is not exist - returns nullptr\n        template<typename _attr_type>\n        _attr_type* GetAttribute() const;\n\n        // Returns true if exist attribute with specified type\n        template<typename _attr_type>\n        bool HasAttribute() const;\n\n        // Returns attributes array\n        const Vector<IAttribute*>& GetAttributes() const;\n\n    protected:\n        ProtectSection      mProtectSection; // Protection section\n        Vector<IAttribute*> mAttributes;     // Attributes array\n        Type*               mOwnerType;      // Owner type pointer\n        String              mName;           // Name of function\n        const Type*         mReturnType;     // Function returning type\n        Vector<const Type*> mParameters;     // Function parameters list\n\n        friend class Type;\n        friend class ReflectionInitializationTypeProcessor;\n    };\n\n    // ----------------------------\n    // Regular function information\n    // ----------------------------\n    class FunctionInfo : public FunctionInfoBase\n    {\n    public:\n        // Returns cloned copy\n        virtual FunctionInfoBase* Clone() const;\n\n        // Check Equals operator\n        bool operator==(const FunctionInfo& other) const;\n\n        // Returns is function constant\n        bool IsConstant() const;\n\n        // Invokes function with parameters\n        template<typename _res_type, typename ... _args>\n        _res_type Invoke(void* object, _args ... args) const;\n\n    protected:\n        bool mIsContant; // Is function constant\n\n        friend class Type;\n        friend class ReflectionInitializationTypeProcessor;\n    };\n\n    // ---------------------------\n    // Static function information\n    // ---------------------------\n    class StaticFunctionInfo : public FunctionInfoBase\n    {\n    public:\n        // Returns cloned copy\n        virtual FunctionInfoBase* Clone() const;\n\n        // Invokes function with parameters\n        template<typename _res_type, typename ... _args>\n        _res_type Invoke(_args ... args) const;\n\n    protected:\n        friend class Type;\n        friend class ReflectionInitializationTypeProcessor;\n    };\n\n    // ----------------------------------\n    // Function info specialization layer\n    // ----------------------------------\n    template<typename _res_type, typename ... _args>\n    class ISpecFunctionInfo: public FunctionInfo\n    {\n    public:\n        virtual _res_type Invoke(void* object, _args ... args) const = 0;\n    };\n\n    // -----------------------------------\n    // Static Function info specialization\n    // -----------------------------------\n    template<typename _res_type, typename ... _args>\n    class SpecStaticFunctionInfo : public StaticFunctionInfo\n    {\n    public:\n        // Returns cloned copy\n        FunctionInfoBase* Clone() const\n        {\n            return mnew SpecStaticFunctionInfo(*this);\n        }\n\n        virtual _res_type Invoke(_args ... args) const\n        {\n            return mFunctionPtr(args ...);\n        }\n\n    private:\n        _res_type(*mFunctionPtr)(_args ... args); // Pointer to static function\n\n        friend class ReflectionInitializationTypeProcessor;\n    };\n\n    // -------------------------------\n    // Function specialized class info\n    // -------------------------------\n    template<typename _class_type, typename _res_type, typename ... _args>\n    class SpecFunctionInfo: public ISpecFunctionInfo<_res_type, _args ...>\n    {\n    public:\n        // Returns cloned copy\n        FunctionInfoBase* Clone() const\n        {\n            return mnew SpecFunctionInfo(*this);\n        }\n\n        // Invokes function with parameters\n        _res_type Invoke(void* object, _args ... args) const\n        {\n            _class_type* classObject = (_class_type*)object;\n            return (classObject->*mFunctionPtr)(args ...);\n        }\n\n    protected:\n        _res_type(_class_type::*mFunctionPtr)(_args ... args);\n\n        friend class ReflectionInitializationTypeProcessor;\n    };\n\n    // ----------------------------------------\n    // Constant function specialized class info\n    // ----------------------------------------\n    template<typename _class_type, typename _res_type, typename ... _args>\n    class SpecConstFunctionInfo: public ISpecFunctionInfo<_res_type, _args ...>\n    {\n    public:\n        // Returns cloned copy\n        FunctionInfoBase* Clone() const\n        {\n            return mnew SpecConstFunctionInfo(*this);\n        }\n\n        // Invokes function with parameters\n        _res_type Invoke(void* object, _args ... args) const\n        {\n            _class_type* classObject = (_class_type*)object;\n            return (classObject->*mFunctionPtr)(args ...);\n        }\n\n    protected:\n        _res_type(_class_type::*mFunctionPtr)(_args ... args) const;\n\n        friend class ReflectionInitializationTypeProcessor;\n    };\n    \n    template<typename _res_type, typename ... _args>\n    _res_type FunctionInfo::Invoke(void* object, _args ... args) const\n    {\n        const ISpecFunctionInfo<_res_type, _args ...>* thisSpec = dynamic_cast<const ISpecFunctionInfo<_res_type, _args ...>*>(this);\n        return thisSpec->Invoke(object, args ...);\n    }\n\n    template<typename _res_type, typename ... _args>\n    _res_type StaticFunctionInfo::Invoke(_args ... args) const\n    {\n        const SpecStaticFunctionInfo<_res_type, _args ...>* thisSpec = dynamic_cast<const SpecStaticFunctionInfo<_res_type, _args ...>*>(this);\n        return thisSpec->Invoke(args ...);\n    }\n\n    template<typename _attr_type>\n    _attr_type* FunctionInfoBase::GetAttribute() const\n    {\n        for (auto attr : mAttributes)\n        {\n            _attr_type* res = dynamic_cast<_attr_type*>(attr);\n            if (res)\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    template<typename _attr_type>\n    bool FunctionInfoBase::HasAttribute() const\n    {\n        for (auto attr : mAttributes)\n        {\n            if (dynamic_cast<_attr_type*>(attr))\n                return true;\n        }\n\n        return false;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/Reflection.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Reflection.h\"\n\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2/Utils/Math/Border.h\"\n#include \"o2/Utils/Math/Color.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2/Utils/Types/UID.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scripts/ScriptEngine.h\"\n\nnamespace o2\n{\n    void AddReflectionScriptConstructorFunc(ReflectionScriptConstructorFunc func)\n    {\n        ScriptEngine::GetRegisterConstructorFuncs().Add((ScriptEngine::RegisterConstructorFunc)func);\n    }\n}\n#endif\n\nextern void InitializeTypeso2Framework();\n\nnamespace o2\n{\n    Reflection* Reflection::mInstance;\n\n    template<>\n    Type* FundamentalTypeContainer<void>::type = mnew TType<int>(\"void\", 0);\n\n    Type* IObject::type = mnew TType<IObject>(\"IObject\", 0);\n    Type* Type::Dummy::type = mnew TType<int>(\"Unknown\", 0);\n\n    FunctionType* FunctionType::commonType = Reflection::InitializeFunctionType(\"Function\");\n    FunctionType* FunctionType::serializableType = Reflection::InitializeFunctionType(\"SerializableFunction\");\n\n    DECLARE_FUNDAMENTAL_TYPE(int);\n    DECLARE_FUNDAMENTAL_TYPE(bool);\n    DECLARE_FUNDAMENTAL_TYPE(char);\n    DECLARE_FUNDAMENTAL_TYPE(wchar_t);\n    DECLARE_FUNDAMENTAL_TYPE(short int);\n    DECLARE_FUNDAMENTAL_TYPE(long int);\n    DECLARE_FUNDAMENTAL_TYPE(long long int);\n    DECLARE_FUNDAMENTAL_TYPE(unsigned char);\n    DECLARE_FUNDAMENTAL_TYPE(unsigned short int);\n    DECLARE_FUNDAMENTAL_TYPE(unsigned int);\n    DECLARE_FUNDAMENTAL_TYPE(unsigned long int);\n    DECLARE_FUNDAMENTAL_TYPE(unsigned long long int);\n    DECLARE_FUNDAMENTAL_TYPE(float);\n    DECLARE_FUNDAMENTAL_TYPE(double);\n    DECLARE_FUNDAMENTAL_TYPE(long double);\n    DECLARE_FUNDAMENTAL_TYPE(o2::Basis);\n    DECLARE_FUNDAMENTAL_TYPE(o2::Color4);\n    DECLARE_FUNDAMENTAL_TYPE(o2::RectF);\n    DECLARE_FUNDAMENTAL_TYPE(o2::RectI);\n    DECLARE_FUNDAMENTAL_TYPE(o2::BorderF);\n    DECLARE_FUNDAMENTAL_TYPE(o2::BorderI);\n    DECLARE_FUNDAMENTAL_TYPE(o2::Vec2F);\n    DECLARE_FUNDAMENTAL_TYPE(o2::Vec2I);\n    DECLARE_FUNDAMENTAL_TYPE(o2::Vertex);\n    DECLARE_FUNDAMENTAL_TYPE(o2::String);\n    DECLARE_FUNDAMENTAL_TYPE(o2::WString);\n    DECLARE_FUNDAMENTAL_TYPE(o2::DataValue);\n    DECLARE_FUNDAMENTAL_TYPE(o2::UID);\n    DECLARE_FUNDAMENTAL_TYPE(o2::ScriptValue);\n\n    Reflection::Reflection():\n        mLastGivenTypeId(1)\n    {\n        mInstance = this;\n    }\n\n    Reflection::~Reflection()\n    {\n        for (auto kv : mTypes)\n            delete kv.second;\n    }\n\n    Reflection& Reflection::Instance()\n    {\n        if (!mInstance)\n            mInstance = new Reflection();\n\n        return *mInstance;\n    }\n\n    void Reflection::InitializeTypes()\n    {\n        InitializeTypeso2Framework();\n        InitializeFundamentalTypes();\n\n        ReflectionInitializationTypeProcessor processor;\n        for (auto func : mInstance->mInitializingFunctions)\n            func(0, processor);\n\n        mInstance->mInitializingFunctions.Clear();\n        mInstance->mTypesInitialized = true;\n    }\n\n    const Map<String, Type*>& Reflection::GetTypes()\n    {\n        return mInstance->mTypes;\n    }\n\n    void* Reflection::CreateTypeSample(const String& typeName)\n    {\n        if (auto type = GetType(typeName))\n            return type->CreateSample();\n\n        return nullptr;\n    }\n\n    Ref<RefCounterable> Reflection::CreateTypeSampleRef(const String& typeName)\n    {\n        if (auto type = GetType(typeName))\n            return type->CreateSampleRef();\n\n        return nullptr;\n    }\n\n    const Type* Reflection::GetType(const String& name)\n    {\n        auto fnd = mInstance->mTypes.find(name);\n        if (fnd != mInstance->mTypes.End())\n            return fnd->second;\n\n        return nullptr;\n    }\n\n    bool Reflection::IsTypesInitialized()\n    {\n        return mInstance->mTypesInitialized;\n    }\n\n    FunctionType* Reflection::InitializeFunctionType(const char* name)\n    {\n        FunctionType* res = mnew FunctionType(name);\n\n        res->mId = Reflection::Instance().mLastGivenTypeId++;\n        mInstance->mTypes[res->GetName()] = res;\n\n        return res;\n    }\n\n    void Reflection::InitializeFundamentalTypes()\n    {\n        IObject::type->mId = mInstance->mLastGivenTypeId++;\n        FundamentalTypeContainer<void>::type->mId = mInstance->mLastGivenTypeId++;\n        Type::Dummy::type->mId = mInstance->mLastGivenTypeId++;\n\n        mInstance->mTypes[FundamentalTypeContainer<void>::type->GetName()] = FundamentalTypeContainer<void>::type;\n    }\n\n    ReflectionInitializationTypeProcessor::FieldProcessor ReflectionInitializationTypeProcessor::StartField()\n    {\n        return FieldProcessor();\n    }\n\n    ReflectionInitializationTypeProcessor::FunctionProcessor ReflectionInitializationTypeProcessor::StartFunction()\n    {\n        return FunctionProcessor();\n    }\n\n    ReflectionInitializationTypeProcessor::FieldProcessor& ReflectionInitializationTypeProcessor::FieldProcessor::SetProtectSection(ProtectSection section)\n    {\n        this->section = section;\n        return *this;\n    }\n\n    ReflectionInitializationTypeProcessor::FunctionProcessor& ReflectionInitializationTypeProcessor::FunctionProcessor::SetProtectSection(ProtectSection section)\n    {\n        this->section = section;\n        return *this;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/Reflection.h",
    "content": "#pragma once\n\n#include <functional>\n#include <type_traits>\n#include \"o2/Utils/Types/Containers/Pair.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/StringDef.h\"\n\n// Reflection access macros\n#define o2Reflection Reflection::Instance()\n\nnamespace o2\n{\n    class EnumType;\n    class FieldInfo;\n    class FunctionInfo;\n    class FunctionType;\n    class IAttribute;\n    class IObject;\n    class MapType;\n    class PropertyType;\n    class ReflectionInitializationTypeProcessor;\n    class StaticFunctionInfo;\n    class Type;\n    class VectorType;\n    struct IDefaultValue;\n\n    template<typename _return_type, typename _accessor_type>\n    class TStringPointerAccessorType;\n\n    template<typename _type, typename _getter>\n    const Type& GetTypeOf();\n\n    template<typename _type>\n    class Ref;\n\n    class RefCounterable;\n\n    typedef UInt TypeId;\n\n    // ------------------------------\n    // Reflection in application container\n    // ------------------------------\n    class Reflection\n    {\n    public:\n        // Returns reflection instance\n        static Reflection& Instance();\n\n        // Initializes all types\n        static void InitializeTypes();\n\n        // Returns array of all registered types\n        static const Map<String, Type*>& GetTypes();\n\n        // Returns a copy of type sample\n        static void* CreateTypeSample(const String& typeName);\n\n        // Returns a copy of type sample reference\n        static Ref<RefCounterable> CreateTypeSampleRef(const String& typeName);\n\n        // Returns type by name\n        static const Type* GetType(const String& name);\n\n        // Returns enum value from string\n        template<typename _type>\n        static _type GetEnumValue(const String& name);\n\n        // Returns enum name from value\n        template<typename _type>\n        static String GetEnumName(_type value);\n\n        // Returns is types was initialized\n        static bool IsTypesInitialized();\n\n    public:\n        // Initializes regular type\n        template<typename _type>\n        static Type* InitializeType(const char* name, bool autoDefferedInit = false);\n\n        // Initialized fundamental type\n        template<typename _type>\n        static Type* InitializeFundamentalType(const char* name);\n\n        // Initializes function type\n        static FunctionType* InitializeFunctionType(const char* name);\n\n        // Initializes enum\n        template<typename _type>\n        static EnumType* InitializeEnum(const char* name, std::function<Map<int, String>()> func);\n\n        // Returns pointer type\n        template<typename _type>\n        static const Type* GetPointerType();\n\n        // Returns reference type\n        template<typename _type>\n        static const Type* GetReferenceType();\n\n        // Returns property type \n        template<typename _value_type, typename _property_type>\n        static const PropertyType* GetPropertyType();\n\n        // Returns vector type\n        template<typename _element_type>\n        static const VectorType* GetVectorType();\n\n        // Returns dictionary type\n        template<typename _key_type, typename _value_type>\n        static const MapType* GetMapType();\n\n        // Returns accessor type\n        template<typename _return_type, typename _accessor_type>\n        static const TStringPointerAccessorType<_return_type, _accessor_type>* GetAccessorType();\n\n        // Type dynamic casting function template\n        template<typename _source_type, typename _target_type>\n        static void* CastFunc(void* obj)\n        {\n            if constexpr (std::is_convertible_v<_source_type*, _target_type*>)\n                return static_cast<_target_type*>(static_cast<_source_type*>(obj));\n            else if constexpr (std::is_base_of_v<_source_type, _target_type>)\n                return dynamic_cast<_target_type*>(static_cast<_source_type*>(obj));\n            else\n                return nullptr;\n        }\n\n        // Fake type casting function\n        static void* NoCastFunc(void* obj) { return obj; }\n\n    protected:\n        typedef void(*TypeInitializingFunc)(void*, ReflectionInitializationTypeProcessor&);\n        typedef Vector<TypeInitializingFunc> TypeInitializingFuncsVec;\n\n        static Reflection* mInstance; // Reflection instance\n\n        Map<String, Type*> mTypes;           // All registered types\n        UInt               mLastGivenTypeId; // Last given type index\n\n        TypeInitializingFuncsVec mInitializingFunctions; // List of types initializations functions\n\n        bool mTypesInitialized = false;\n\n    protected:\n        // Constructor. Initializes dummy type\n        Reflection();\n\n        // Destructor. Destroys types\n        ~Reflection();\n\n        // Initializes fundamental types\n        static void InitializeFundamentalTypes();\n\n        friend class Type;\n    };\n}\n\n#define DECLARE_FUNDAMENTAL_TYPE(TYPE) \\\n    template<>                         \\\n    o2::Type* o2::FundamentalTypeContainer<TYPE>::type = o2::Reflection::InitializeFundamentalType<TYPE>(#TYPE)\n\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Reflection/Enum.h\"\n#include \"o2/Utils/Reflection/FieldInfo.h\"\n#include \"o2/Utils/Reflection/FunctionInfo.h\"\n#include \"o2/Utils/Reflection/TypeTraits.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Utils/Reflection/BaseTypeProcessor.h\"\nnamespace o2\n{\n    struct ScriptPrototypeProcessor;\n    // Registers a ProcessType<ScriptPrototypeProcessor> static function with\n    // ScriptEngine without forcing Reflection.h to include ScriptEngine.h\n    // (that creates a circular include chain when PCH is disabled).\n    using ReflectionScriptConstructorFunc = void(*)(void*, ScriptPrototypeProcessor&);\n    void AddReflectionScriptConstructorFunc(ReflectionScriptConstructorFunc func);\n}\n#endif\n\nnamespace o2 {\n    class ReflectionInitializationTypeProcessor : public BaseTypeProcessor {\n    public:\n        struct FieldProcessor {\n            Vector<IAttribute *> attributes;\n            IDefaultValue *defaultValue = nullptr;\n            ProtectSection section = ProtectSection::Public;\n\n            template<typename _attribute_type, typename ... _args>\n            FieldProcessor &AddAttribute(_args ... args);\n\n            template<typename _type>\n            FieldProcessor &SetDefaultValue(const _type &value);\n\n            template<typename _object_type, typename _field_type>\n            FieldInfo &FieldBasics(_object_type *object, Type *type, const char *name, void *(*pointerGetter)(void *),\n                                   _field_type &field);\n\n            FieldProcessor &SetProtectSection(ProtectSection section);\n        };\n\n        struct FunctionProcessor {\n            Vector<IAttribute *> attributes;\n            ProtectSection section = ProtectSection::Public;\n\n            template<typename _attribute_type, typename ... _args>\n            FunctionProcessor &AddAttribute(_args ... args);\n\n            FunctionProcessor &SetProtectSection(ProtectSection section);\n\n            template<typename _object_type, typename ... _args>\n            void Constructor(_object_type *object, Type *type) {}\n\n            template<typename _object_type, typename _res_type, typename ... _args>\n            void Signature(_object_type *object, Type *type, const char *name,\n                           _res_type(_object_type::* pointer)(_args ...));\n\n            template<typename _object_type, typename _res_type, typename ... _args>\n            void Signature(_object_type *object, Type *type, const char *name,\n                           _res_type(_object_type::* pointer)(_args ...) const);\n\n            template<auto pointer, typename _object_type>\n            void Signature(_object_type *object, Type *type, const char *name)\n            {\n                Signature(object, type, name, pointer);\n            }\n\n            template<auto pointer, typename _object_type, typename _callable>\n            void Signature(_object_type *object, Type *type, const char *name, _callable /*callable*/)\n            {\n                Signature(object, type, name, pointer);\n            }\n\n            template<typename _object_type, typename _res_type, typename ... _args>\n            void SignatureStatic(_object_type *object, Type *type, const char *name,\n                                 _res_type(*pointer)(_args ...));\n        };\n\n        template<typename _object_type, typename _base_type>\n        void BaseType(_object_type *object, Type *type, const char *name);\n\n        FieldProcessor StartField();\n\n        FunctionProcessor StartFunction();\n    };\n}\n\n#include \"o2/Utils/Reflection/Type.h\"\n\nnamespace o2\n{\n    template<typename _type>\n    _type Reflection::GetEnumValue(const String& name)\n    {\n        EnumType* type = (EnumType*)(&GetTypeOf<_type>());\n        auto& entries = type->GetEntries();\n\n        if (entries.ContainsValue(name))\n            return (_type)(entries.FindValue(name).first);\n\n        return (_type)0;\n    }\n\n    template<typename _type>\n    String Reflection::GetEnumName(_type value)\n    {\n        String res;\n\n        EnumType* type = (EnumType*)(&GetTypeOf<_type>());\n        auto& entries = type->GetEntries();\n\n        entries.TryGetValue((int)value, res);\n\n        return res;\n    }\n\n    template<typename _type>\n    Type* Reflection::InitializeType(const char* name, bool autoDefferedInit /*= false*/)\n    {\n        Type* res = mnew TObjectType<_type>(name, sizeof(_type), &CastFunc<IObject, _type>,\n                                            &CastFunc<_type, IObject>);\n\n        res->mId = Reflection::Instance().mLastGivenTypeId++;\n\n        if (autoDefferedInit)\n            Reflection::Instance().mInitializingFunctions.Add((TypeInitializingFunc)&_type::template ProcessType<ReflectionInitializationTypeProcessor>);\n\n#if IS_SCRIPTING_SUPPORTED\n        AddReflectionScriptConstructorFunc((ReflectionScriptConstructorFunc)&_type::template ProcessType<ScriptPrototypeProcessor>);\n#endif\n\n        mInstance->mTypes[res->GetName()] = res;\n\n        //printf(\"Reflection::InitializeType(%s): instance:%x - %i\\n\", name, mInstance, Reflection::Instance().mTypes.Count());\n\n        return res;\n    }\n\n    template<typename _type>\n    Type* Reflection::InitializeFundamentalType(const char* name)\n    {\n        Type* res = mnew FundamentalType<_type>(name);\n\n        Reflection::Instance().mInitializingFunctions.Add((TypeInitializingFunc)&FundamentalTypeContainer<_type>::template InitializeType<ReflectionInitializationTypeProcessor>);\n        res->mId = Reflection::Instance().mLastGivenTypeId++;\n        mInstance->mTypes[res->GetName()] = res;\n\n        return res;\n    }\n\n    template<typename _type>\n    const Type* Reflection::GetPointerType()\n    {\n        const Type* baseType = &GetTypeOf<_type>();\n\n        if (baseType->mPtrType)\n            return baseType->mPtrType;\n\n        TPointerType<_type>* newType = mnew TPointerType<_type>(baseType);\n        newType->mId = mInstance->mLastGivenTypeId++;\n\n        baseType->mPtrType = newType;\n\n        mInstance->mTypes[newType->GetName()] = newType;\n\n        return newType;\n    }\n\n    template<typename _type>\n    const Type* Reflection::GetReferenceType()\n    {\n        const Type* baseType = &GetTypeOf<_type>();\n\n        if (baseType->mRefType)\n            return baseType->mRefType;\n\n        TReferenceType<_type>* newType = mnew TReferenceType<_type>(baseType);\n        newType->mId = mInstance->mLastGivenTypeId++;\n\n        baseType->mRefType = newType;\n\n        mInstance->mTypes[newType->GetName()] = newType;\n\n        return newType;\n    }\n\n    template<typename _type>\n    EnumType* Reflection::InitializeEnum(const char* name, std::function<Map<int, String>()> func)\n    {\n        EnumType* res = mnew TEnumType<_type>(name, sizeof(_type));\n\n        res->mId = Reflection::Instance().mLastGivenTypeId++;\n        mInstance->mTypes[res->GetName()] = res;\n        res->mEntries.Add(func());\n\n        return res;\n    }\n\n    template<typename _value_type, typename _property_type>\n    const PropertyType* Reflection::GetPropertyType()\n    {\n        String typeName = (String)(typeid(_property_type).name()) + (String)\"<\" + TypeOf(_value_type).GetName() + \">\";\n\n        auto fnd = mInstance->mTypes.find(typeName);\n        if (fnd != mInstance->mTypes.End())\n            return dynamic_cast<PropertyType*>(fnd->second);\n\n        TPropertyType<_value_type, _property_type>* newType = mnew TPropertyType<_value_type, _property_type>();\n        newType->mId = mInstance->mLastGivenTypeId++;\n\n        mInstance->mTypes[newType->GetName()] = newType;\n\n        return newType;\n    }\n\n    template<typename _element_type>\n    const VectorType* Reflection::GetVectorType()\n    {\n        String typeName = \"o2::Vector<\" + TypeOf(_element_type).GetName() + \">\";\n\n        auto fnd = mInstance->mTypes.find(typeName);\n        if (fnd != mInstance->mTypes.End())\n            return dynamic_cast<VectorType*>(fnd->second);\n\n        TVectorType<_element_type>* newType = mnew TVectorType<_element_type>();\n        newType->mId = mInstance->mLastGivenTypeId++;\n\n        mInstance->mTypes[newType->GetName()] = newType;\n\n        return newType;\n    }\n\n    template<typename _key_type, typename _value_type>\n    const MapType* Reflection::GetMapType()\n    {\n        String typeName = \"o2::Dictionary<\" + TypeOf(_key_type).GetName() + \", \" + TypeOf(_value_type).GetName() + \">\";\n\n        auto fnd = mInstance->mTypes.find(typeName);\n        if (fnd != mInstance->mTypes.End())\n            return dynamic_cast<MapType*>(fnd->second);\n\n        auto newType = mnew TMapType<_key_type, _value_type>();\n        newType->mId = mInstance->mLastGivenTypeId++;\n\n        mInstance->mTypes[newType->GetName()] = newType;\n\n        return newType;\n    }\n\n    template<typename _return_type, typename _accessor_type>\n    const TStringPointerAccessorType<_return_type, _accessor_type>* Reflection::GetAccessorType()\n    {\n        String typeName = (String)(typeid(_accessor_type).name()) + (String)\"<\" + TypeOf(_return_type).GetName() + \">\";\n\n        auto fnd = mInstance->mTypes.find(typeName);\n        if (fnd != mInstance->mTypes.End())\n            return dynamic_cast<TStringPointerAccessorType<_return_type, _accessor_type>*>(fnd->second);\n\n        TStringPointerAccessorType<_return_type, _accessor_type>* newType = mnew TStringPointerAccessorType<_return_type, _accessor_type>();\n        newType->mId = mInstance->mLastGivenTypeId++;\n\n        mInstance->mTypes[newType->GetName()] = newType;\n\n        return newType;\n    }\n\n    template<typename _source_type, typename _target_type>\n    struct CastSelector\n    {\n        struct DefaultCast\n        {\n            static void* CastFunc(void* obj) { return Reflection::CastFunc<_source_type, _target_type>(obj); }\n        };\n\n        struct NoCast\n        {\n            static void* CastFunc(void* obj) { return nullptr; }\n        };\n\n        using CastType = std::conditional<std::is_polymorphic<_source_type>::value, DefaultCast, NoCast>::type;\n    };\n\n    template<typename _object_type, typename _base_type>\n    void ReflectionInitializationTypeProcessor::BaseType(_object_type* object, Type* type, const char* name)\n    {\n        using _base_under = typename std::conditional<std::is_base_of<IObject, _base_type>::value, _base_type, Type::Dummy>::type;\n\n        if constexpr (std::is_same<_base_under, Type::Dummy>::value)\n            return;\n\n        Type::BaseType baseTypeInfo;\n        baseTypeInfo.type = _base_under::type;\n        baseTypeInfo.dynamicCastUpFunc = &CastSelector<_object_type, _base_type>::CastType::CastFunc;\n        baseTypeInfo.dynamicCastDownFunc = &CastSelector<_base_type, _object_type>::CastType::CastFunc;\n\n        type->mBaseTypes.Add(baseTypeInfo);\n    }\n\n    template<typename _attribute_type, typename ... _args>\n    ReflectionInitializationTypeProcessor::FieldProcessor& ReflectionInitializationTypeProcessor::FieldProcessor::AddAttribute(_args ... args)\n    {\n        attributes.Add(mnew _attribute_type(args ...));\n        return *this;\n    }\n\n    template<typename _type>\n    ReflectionInitializationTypeProcessor::FieldProcessor& ReflectionInitializationTypeProcessor::FieldProcessor::SetDefaultValue(const _type& value)\n    {\n        if constexpr (std::is_copy_constructible<_type>::value && SupportsEqualOperator<_type>::value)\n            defaultValue = mnew DefaultValue<_type>(value);\n\n        return *this;\n    }\n\n    template<typename _object_type, typename _field_type>\n    FieldInfo& ReflectionInitializationTypeProcessor::FieldProcessor::FieldBasics(_object_type* object, Type* type,\n                                                                                  const char* name,\n                                                                                  void* (*pointerGetter)(void*),\n                                                                                  _field_type& field)\n    {\n        auto valType = &TypeOf(_field_type);\n        type->mFields.emplace_back(FieldInfo(type, name, pointerGetter, valType, ProtectSection::Private));\n        type->mFields.Last().mAttributes.Add(attributes);\n        type->mFields.Last().mDefaultValue = defaultValue;\n        type->mFields.Last().SetProtectSection(section);\n\n        return type->mFields.Last();\n    }\n\n    template<typename _attribute_type, typename ... _args>\n    ReflectionInitializationTypeProcessor::FunctionProcessor& ReflectionInitializationTypeProcessor::FunctionProcessor::AddAttribute(_args ... args)\n    {\n        attributes.Add(mnew _attribute_type(args ...));\n        return *this;\n    }\n\n    template<typename _object_type, typename _res_type, typename ... _args>\n    void ReflectionInitializationTypeProcessor::FunctionProcessor::Signature(_object_type* object, Type* type, const char* name,\n                                                                             _res_type(_object_type::* pointer)(_args ...))\n    {\n        auto retType = &TypeOf(_res_type);\n\n        auto funcInfo = mnew SpecFunctionInfo<_object_type, _res_type, _args ...>();\n        funcInfo->mName = name;\n        funcInfo->mFunctionPtr = pointer;\n        funcInfo->mReturnType = retType;\n        funcInfo->mIsContant = false;\n        funcInfo->mProtectSection = section;\n        funcInfo->mOwnerType = type;\n        funcInfo->mAttributes = attributes;\n\n        [](...) {}((funcInfo->mParameters.Add(&TypeOf(_args)))...);\n\n        type->mFunctions.Add(funcInfo);\n    }\n\n    template<typename _object_type, typename _res_type, typename ... _args>\n    void ReflectionInitializationTypeProcessor::FunctionProcessor::Signature(_object_type* object, Type* type, const char* name,\n                                                                             _res_type(_object_type::* pointer)(_args ...) const)\n    {\n        auto retType = &TypeOf(_res_type);\n\n        auto funcInfo = mnew SpecConstFunctionInfo<_object_type, _res_type, _args ...>();\n        funcInfo->mName = name;\n        funcInfo->mFunctionPtr = pointer;\n        funcInfo->mReturnType = retType;\n        funcInfo->mIsContant = false;\n        funcInfo->mProtectSection = section;\n        funcInfo->mOwnerType = type;\n        funcInfo->mAttributes = attributes;\n        type->mFunctions.Add(funcInfo);\n    }\n\n    template<typename _object_type, typename _res_type, typename ... _args>\n    void ReflectionInitializationTypeProcessor::FunctionProcessor::SignatureStatic(_object_type* object, Type* type,\n                                                                                   const char* name, _res_type(*pointer)(_args ...))\n    {\n        auto retType = &TypeOf(_res_type);\n\n        auto funcInfo = mnew SpecStaticFunctionInfo<_res_type, _args ...>();\n        funcInfo->mName = name;\n        funcInfo->mFunctionPtr = pointer;\n        funcInfo->mReturnType = retType;\n        funcInfo->mProtectSection = section;\n        funcInfo->mOwnerType = type;\n        funcInfo->mAttributes = attributes;\n        type->mStaticFunctions.Add(funcInfo);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/Type.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Type.h\"\n\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/System/Time/Timer.h\"\n\nnamespace o2\n{\n    Type::Type(const String& name, int size, ITypeSerializer* serializer):\n        mId(0), mPtrType(nullptr), mName(name), mSize(size), mSerializer(serializer)\n    {}\n\n    Type::~Type()\n    {\n        for (auto func : mFunctions)\n            delete func;\n    }\n\n    bool Type::operator!=(const Type& other) const\n    {\n        return other.mId != mId;\n    }\n\n    bool Type::operator==(const Type& other) const\n    {\n        return other.mId == mId;\n    }\n\n    const String& Type::GetName() const\n    {\n        return mName;\n    }\n\n    TypeId Type::ID() const\n    {\n        return mId;\n    }\n\n    int Type::GetSize() const\n    {\n        return mSize;\n    }\n\n    bool Type::IsBasedOn(const Type& other) const\n    {\n        if (mId == other.mId)\n            return true;\n\n        for (auto typeInfo : mBaseTypes)\n        {\n            if (typeInfo.type->mId == mId)\n                return true;\n\n            if (typeInfo.type->IsBasedOn(other))\n                return true;\n        }\n\n        return false;\n    }\n\n    Type::Usage Type::GetUsage() const\n    {\n        return Usage::Regular;\n    }\n\n    const Vector<Type::BaseType>& Type::GetBaseTypes() const\n    {\n        return mBaseTypes;\n    }\n\n    const Vector<FieldInfo>& Type::GetFields() const\n    {\n        return mFields;\n    }\n\n    Vector<const FieldInfo*> Type::GetFieldsWithBaseClasses() const\n    {\n        Vector<const FieldInfo*> res;\n\n        for (auto baseType : mBaseTypes)\n            res += baseType.type->GetFieldsWithBaseClasses();\n\n        res += mFields.Convert<const FieldInfo*>([](auto& x) { return &x; });\n\n        return res;\n    }\n\n    const Vector<FunctionInfo*>& Type::GetFunctions() const\n    {\n        return mFunctions;\n    }\n\n    const Vector<StaticFunctionInfo*>& Type::GetStaticFunctions() const\n    {\n        return mStaticFunctions;\n    }\n\n    Vector<FunctionInfo*> Type::GetFunctionsWithBaseClasses() const\n    {\n        Vector<FunctionInfo*> res;\n\n        for (auto baseType : mBaseTypes)\n            res += baseType.type->GetFunctionsWithBaseClasses();\n\n        res += mFunctions;\n\n        return res;\n    }\n\n    Vector<StaticFunctionInfo*> Type::GetStaticFunctionsWithBaseClasses() const\n    {\n        Vector<StaticFunctionInfo*> res;\n\n        for (auto baseType : mBaseTypes)\n            res += baseType.type->GetStaticFunctionsWithBaseClasses();\n\n        res += mStaticFunctions;\n\n        return res;\n    }\n\n    const FieldInfo* Type::GetField(const String& name) const\n    {\n        for (auto& field : mFields)\n        {\n            if (field.GetName() == name)\n                return &field;\n        }\n\n        for (auto baseType : mBaseTypes)\n        {\n            if (auto res = baseType.type->GetField(name))\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    const FunctionInfo* Type::GetFunction(const String& name) const\n    {\n        for (auto func : mFunctions)\n        {\n            if (func->mName == name)\n                return func;\n        }\n\n        for (auto& base : mBaseTypes)\n        {\n            if (auto func = base.type->GetFunction(name))\n                return func;\n        }\n\n        return nullptr;\n    }\n\n    const StaticFunctionInfo* Type::GetStaticFunction(const String& name) const\n    {\n        for (auto func : mStaticFunctions)\n        {\n            if (func->mName == name)\n                return func;\n        }\n\n        for (auto& base : mBaseTypes)\n        {\n            if (auto func = base.type->GetStaticFunction(name))\n                return func;\n        }\n\n        return nullptr;\n    }\n\n    Vector<const Type*> Type::GetDerivedTypes(bool deep /*= true*/) const\n    {\n        Vector<const Type*> res;\n        for (auto kv : Reflection::GetTypes())\n        {\n            auto baseTypes = kv.second->GetBaseTypes();\n            for (auto& baseType : baseTypes)\n            {\n                if (baseType.type->mId == mId)\n                    res.Add(kv.second);\n            }\n        }\n\n        if (deep)\n        {\n            auto resCopy = res;\n            for (auto type : resCopy)\n                res += type->GetDerivedTypes(true);\n        }\n\n        return res;\n    }\n\n    Ref<RefCounterable> Type::CreateSampleRef() const\n    {\n        return nullptr;\n    }\n\n    void* Type::GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const\n    {\n        int delPos = path.Find(\"/\");\n        String pathPart = path.SubStr(0, delPos);\n\n        for (auto& field : mFields)\n        {\n            if (field.mName == pathPart)\n            {\n                fieldInfo = &field;\n\n                if (delPos == -1)\n                {\n                    return field.GetValuePtrStrong(object);\n                }\n                else\n                {\n                    void* val = field.GetValuePtr(object);\n\n                    if (!val)\n                        return nullptr;\n\n                    return field.SearchFieldPtr(val, path.SubStr(delPos + 1), fieldInfo);\n                }\n            }\n        }\n\n        for (auto baseType : mBaseTypes)\n        {\n            if (auto res = baseType.type->Type::GetFieldPtr((*baseType.dynamicCastUpFunc)(object), path, fieldInfo))\n                return res;\n        }\n\n        return nullptr;\n    }\n\n    void Type::Serialize(void* ptr, DataValue& data) const\n    {\n        mSerializer->Serialize(ptr, data);\n    }\n\n    void Type::Deserialize(void* ptr, const DataValue& data) const\n    {\n        mSerializer->Deserialize(ptr, data);\n    }\n\n    bool Type::IsValueEquals(void* objectA, void* objectB) const\n    {\n        return mSerializer->Equals(objectA, objectB);\n    }\n\n    void Type::CopyValue(void* objectA, void* objectB) const\n    {\n        mSerializer->Copy(objectA, objectB);\n    }\n\n    ITypeSerializer* Type::GetSerializer() const\n    {\n        return mSerializer;\n    }\n\n    VectorType::VectorType(const String& name, int size, ITypeSerializer* serializer) :\n        Type(name, size, serializer)\n    {}\n\n    Type::Usage VectorType::GetUsage() const\n    {\n        return Usage::Vector;\n    }\n\n    const Type* VectorType::GetElementType() const\n    {\n        return mElementType;\n    }\n\n    void* VectorType::GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const\n    {\n        int delPos = path.Find(\"/\");\n        String pathPart = path.SubStr(0, delPos);\n\n        if (pathPart == \"count\")\n        {\n            fieldInfo = mCountFieldInfo;\n            return object;\n        }\n\n        int count = GetObjectVectorSize(object);\n        int idx = (int)pathPart;\n\n        if (idx >= count || idx < 0)\n            return nullptr;\n\n        if (delPos < 0)\n        {\n            fieldInfo = mElementFieldInfo;\n            return GetObjectVectorElementPtr(object, idx);\n        }\n\n        return mElementType->GetFieldPtr(GetObjectVectorElementPtr(object, idx), path.SubStr(delPos + 1), fieldInfo);\n    }\n\n    FieldInfo* VectorType::GetElementFieldInfo() const\n    {\n        return mElementFieldInfo;\n    }\n\n    FieldInfo* VectorType::GetCountFieldInfo() const\n    {\n        return mCountFieldInfo;\n    }\n\n    MapType::MapType(const Type* keyType, const Type* valueType, int size, ITypeSerializer* serializer):\n        Type((String)\"o2::Dictionary<\" + keyType->GetName() + \", \" + valueType->GetName() + \">\", size, serializer),\n        mKeyType(keyType), mValueType(valueType)\n    {}\n\n    Type::Usage MapType::GetUsage() const\n    {\n        return Usage::Map;\n    }\n\n    const Type* MapType::GetKeyType() const\n    {\n        return mKeyType;\n    }\n\n    const Type* MapType::GetValueType() const\n    {\n        return mValueType;\n    }\n\n    int MapType::GetObjectDictionarySize(void* object) const\n    {\n        return mGetDictionaryObjectSizeFunc(object);\n    }\n\n    void* MapType::GetObjectDictionaryKeyPtr(void* object, int idx) const\n    {\n        return mGetObjectDictionaryKeyPtrFunc(object, idx);\n    }\n\n    void* MapType::GetObjectDictionaryValuePtr(void* object, int idx) const\n    {\n        return mGetObjectDictionaryValuePtrFunc(object, idx);\n    }\n\n    void* MapType::GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const\n    {\n//         int delPos = path.Find(\"/\");\n//         String pathPart = path.SubStr(0, delPos);\n//         DataValue data;\n//         data = pathPart;\n// \n//         int count = GetObjectDictionarySize(object);\n//         int idx = (int)pathPart;\n// \n//         if (idx < count)\n//             return mElementType->GetFieldPtr(GetObjectVectorElementPtr(object, idx), path.SubStr(delPos + 1), fieldInfo);\n\n        return nullptr;\n    }\n\n    EnumType::EnumType(const String& name, int size, ITypeSerializer* serializer):\n        Type(name, size, serializer)\n    {}\n\n    Type::Usage EnumType::GetUsage() const\n    {\n        return Usage::Enumeration;\n    }\n\n    const Map<int, String>& EnumType::GetEntries() const\n    {\n        return mEntries;\n    }\n\n    PointerType::PointerType(const Type* baseType, ITypeSerializer* serializer):\n        Type(baseType->GetName() + \"*\", sizeof(void*), serializer),\n        mBaseType(baseType)\n    {}\n\n    Type::Usage PointerType::GetUsage() const\n    {\n        return Usage::Pointer;\n    }\n\n    const Type* PointerType::GetBaseType() const\n    {\n        return mBaseType;\n    }\n\n    void* PointerType::GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const\n    {\n        return mBaseType->GetFieldPtr(*(void**)object, path, fieldInfo);\n    }\n\n    void* PointerType::CreateSample() const\n    {\n        return mBaseType->CreateSample();\n    }\n\n    Ref<IAbstractValueProxy> PointerType::GetValueProxy(void* object) const\n    {\n        if (auto objectUnptrType = dynamic_cast<const ObjectType*>(mBaseType))\n            return objectUnptrType->GetValueProxy(*(void**)object);\n\n        return mmake<PointerValueProxy<void*>>((void**)object);\n    }\n\n    ReferenceType::ReferenceType(const Type* baseType, ITypeSerializer* serializer) :\n        Type(\"Ref<\" + baseType->GetName() + \">\", sizeof(Ref<RefCounterable>), serializer),\n        mBaseType(baseType)\n    {}\n\n    Type::Usage ReferenceType::GetUsage() const\n    {\n        return Usage::Reference;\n    }\n\n    const Type* ReferenceType::GetBaseType() const\n    {\n        return mBaseType;\n    }\n\n    void* ReferenceType::GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const\n    {\n        return mBaseType->GetFieldPtr(reinterpret_cast<Ref<RefCounterable>*>(object)->Get(), path, fieldInfo);\n    }\n\n    void* ReferenceType::CreateSample() const\n    {\n        return mBaseType->CreateSample();\n    }\n\n    Ref<IAbstractValueProxy> ReferenceType::GetValueProxy(void* object) const\n    {\n        return mmake<PointerValueProxy<void*>>((void**)object);\n    }\n\n    PropertyType::PropertyType(const String& name, int size, ITypeSerializer* serializer) :\n        Type(name, size, serializer)\n    {}\n\n    Type::Usage PropertyType::GetUsage() const\n    {\n        return Usage::Property;\n    }\n\n    const Type* PropertyType::GetValueType() const\n    {\n        return mValueType;\n    }\n\n    ObjectType::ObjectType(const String& name, int size, void*(*castFromFunc)(void*), void*(*castToFunc)(void*),\n                           ITypeSerializer* serializer):\n        Type(name, size, serializer), mCastToFunc(castToFunc), mCastFromFunc(castFromFunc)\n    {}\n\n    Type::Usage ObjectType::GetUsage() const\n    {\n        return Usage::Object;\n    }\n\n    void* ObjectType::DynamicCastFromIObject(IObject* object) const\n    {\n        return (*mCastFromFunc)(object);\n    }\n\n    IObject* ObjectType::DynamicCastToIObject(void* object) const\n    {\n        return (IObject*)(*mCastToFunc)(object);\n    }\n\n    void* ObjectType::GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const\n    {\n        if (!object)\n            return nullptr;\n\n        IObject* iobject = DynamicCastToIObject(object);\n        if (iobject)\n        {\n            const Type* realType = &(iobject->GetType());\n            if (realType != this)\n                return realType->GetFieldPtr(dynamic_cast<const ObjectType*>(realType)->DynamicCastFromIObject(iobject), path, fieldInfo);\n        }\n\n        return Type::GetFieldPtr(object, path, fieldInfo);\n    }\n\n    StringPointerAccessorType::StringPointerAccessorType(const String& name, int size, ITypeSerializer* serializer) :\n        Type(name, size, serializer)\n    {}\n\n    Type::Usage StringPointerAccessorType::GetUsage() const\n    {\n        return Usage::StringAccessor;\n    }\n\n    FunctionType::FunctionType(const String& name):\n        Type(name, sizeof(Function<void()>), mnew TypeSerializer<Function<void()>>())\n    {}\n\n    Type::Usage FunctionType::GetUsage() const\n    {\n        return Type::Usage::Function;\n    }\n\n    void* FunctionType::CreateSample() const\n    {\n        return nullptr;\n    }\n\n    void FunctionType::DestroySample(void* sample) const\n    {}\n\n    Ref<IAbstractValueProxy> FunctionType::GetValueProxy(void* object) const\n    {\n        static int offs = (std::ptrdiff_t)((AbstractFunction*)((Function<void()>*)1)) - (std::ptrdiff_t)(Function<void()>*)1;\n        auto btpr = reinterpret_cast<std::byte*>(object);\n        auto ptr = btpr + offs;\n\n        return mmake<PointerValueProxy<AbstractFunction>>(reinterpret_cast<AbstractFunction*>(ptr));\n    }\n}\n\nENUM_META(o2::Type::Usage, o2__Type__Usage)\n{\n    ENUM_ENTRY(Map);\n    ENUM_ENTRY(Enumeration);\n    ENUM_ENTRY(Pointer);\n    ENUM_ENTRY(Property);\n    ENUM_ENTRY(Regular);\n    ENUM_ENTRY(StringAccessor);\n    ENUM_ENTRY(Vector);\n}\nEND_ENUM_META;\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/Type.h",
    "content": "//@CODETOOLIGNORE\n\n#pragma once\n\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/StringDef.h\"\n\n// Returns type of TYPE\n#define TypeOf(TYPE) o2::GetTypeOf<TYPE>()\n\nnamespace o2\n{\n    class DataValue;\n    class FieldInfo;\n    class FunctionInfo;\n    class IAbstractValueProxy;\n    class IObject;\n    class StaticFunctionInfo;\n    class Type;\n    struct ITypeSerializer;\n\n    template<typename _type>\n    class IValueProxy;\n\n    template<typename _key_type, typename _value_type>\n    class Map;\n\n    template<typename _type, typename _getter>\n    const Type& GetTypeOf();\n\n    template<typename _element_type>\n    struct VectorCountFieldSerializer;\n\n    typedef UInt TypeId;\n\n    // ---------------\n    // Type of a value\n    // ---------------\n    class Type\n    {\n    public:\n        enum class Usage\n        {\n            Regular, Object, Vector, Map, StringAccessor, Enumeration, Pointer, Reference, Property, Function\n        };\n\n        struct BaseType\n        {\n            const Type* type;\n            void* (*dynamicCastUpFunc)(void*);\n            void* (*dynamicCastDownFunc)(void*);\n\n            bool operator==(const BaseType& other) const { return type == other.type; }\n        };\n\n    public:\n        // Default constructor\n        Type(const String& name, int size, ITypeSerializer* serializer);\n\n        // Destructor\n        virtual ~Type();\n\n        // Check equals operator\n        bool operator==(const Type& other) const;\n\n        // Check not equals operator\n        bool operator!=(const Type& other) const;\n\n        // Returns name of type\n        const String& GetName() const;\n\n        // Returns id of type\n        TypeId ID() const;\n\n        // Returns size of type in bytes\n        int GetSize() const;\n\n        // Is this type based on other\n        bool IsBasedOn(const Type& other) const;\n\n        // Returns type usage\n        virtual Usage GetUsage() const;\n\n        // Returns vector of base types\n        const Vector<BaseType>& GetBaseTypes() const;\n\n        // Returns fields informations array\n        const Vector<FieldInfo>& GetFields() const;\n\n        // Returns fields informations array with all base types\n        Vector<const FieldInfo*> GetFieldsWithBaseClasses() const;\n\n        // Returns functions informations array\n        const Vector<FunctionInfo*>& GetFunctions() const;\n\n        // Returns static functions informations array\n        const Vector<StaticFunctionInfo*>& GetStaticFunctions() const;\n\n        // Returns functions informations array with all base types\n        Vector<FunctionInfo*> GetFunctionsWithBaseClasses() const;\n\n        // Returns functions informations array with all base types\n        Vector<StaticFunctionInfo*> GetStaticFunctionsWithBaseClasses() const;\n\n        // Returns field information by name\n        const FieldInfo* GetField(const String& name) const;\n\n        // Returns function info by name\n        const FunctionInfo* GetFunction(const String& name) const;\n\n        // Returns static function info by name\n        const StaticFunctionInfo* GetStaticFunction(const String& name) const;\n\n        // Invokes function with name\n        template<typename _res_type, typename ... _args>\n        _res_type Invoke(const String& name, void* object, _args ... args) const;\n\n        // Invokes function with name\n        template<typename _res_type, typename ... _args>\n        _res_type InvokeStatic(const String& name, _args ... args) const;\n\n        // Returns derived types\n        Vector<const Type*> GetDerivedTypes(bool deep = true) const;\n\n        // Creates sample copy and returns him\n        virtual void* CreateSample() const = 0;\n\n        // Creates sample copy and returns him if type is reference\n        virtual Ref<RefCounterable> CreateSampleRef() const;\n\n        // Destroys sample\n        virtual void DestroySample(void* sample) const = 0;\n\n        // Returns filed pointer by path\n        virtual void* GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const;\n\n        // Returns abstract value proxy for object value\n        virtual Ref<IAbstractValueProxy> GetValueProxy(void* object) const = 0;\n\n        // Serializes value from ptr\n        virtual void Serialize(void* ptr, DataValue& data) const;\n\n        // Deserializes value from ptr\n        virtual void Deserialize(void* ptr, const DataValue& data) const;\n\n        // Returns is values getted from object A and object B equals\n        virtual bool IsValueEquals(void* objectA, void* objectB) const;\n\n        // Copies value getter from objectB to value from objectA\n        virtual void CopyValue(void* objectA, void* objectB) const;\n\n        // Returns type serializer\n        ITypeSerializer* GetSerializer() const;\n\n    public:\n        // --------------------\n        // Dummy type container\n        // --------------------\n        struct Dummy { static Type* type; };\n\n        template<class T, class = std::void_t<>>\n        struct IsConstructible: std::false_type {};\n\n        template<class T>\n        struct IsConstructible<T, std::void_t<decltype(std::declval<T()>())>>: std::true_type {};\n\n    protected:\n        TypeId mId;   // Id of type\n        String mName; // Name of object type\n        int    mSize; // Size of type in bytes\n\n        Vector<BaseType> mBaseTypes; // Base types ids with offset \n\n        Vector<FieldInfo>           mFields;          // Fields information\n        Vector<FunctionInfo*>       mFunctions;       // Functions informations\n        Vector<StaticFunctionInfo*> mStaticFunctions; // Functions informations\n\n        mutable Type* mPtrType = nullptr; // Pointer type from this\n        mutable Type* mRefType = nullptr; // Reference type from this\n\n        ITypeSerializer* mSerializer = nullptr; // Value serializer\n\n        friend class FieldInfo;\n        friend class FunctionInfo;\n        friend class PointerType;\n        friend class Reflection;\n        friend class ReflectionInitializationTypeProcessor;\n        friend class VectorType;\n\n        template<typename _type, typename _accessor_type>\n        friend class TStringPointerAccessorType;\n    };\n\n    // -------------------\n    // Type specialization\n    // -------------------\n    template<typename _type>\n    class TType: public Type\n    {\n    public:\n        // Default constructor\n        TType(const String& name, int size);\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Creates sample copy and returns him if type is reference\n        Ref<RefCounterable> CreateSampleRef() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n    };\n\n    // -------------\n    // Function type\n    // -------------\n    class FunctionType : public Type\n    {\n    public:\n        // Constructor\n        FunctionType(const String& name);\n\n        // Returns type usage\n        Usage GetUsage() const override;\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n\n    public:\n        static FunctionType* commonType;       // Common function type container\n        static FunctionType* serializableType; // Serializable function type container\n\n    };\n\n    // --------------------------------------------------------------------\n    // Type of objects, derived from IObject. Can be casted to/from IObject\n    // --------------------------------------------------------------------\n    class ObjectType: public Type\n    {\n    public:\n        // Constructor\n        ObjectType(const String& name, int size, void* (*castFromFunc)(void*), void* (*castToFunc)(void*), ITypeSerializer* serializer);\n\n        // Returns type usage\n        Usage GetUsage() const override;\n\n        // Dynamically casts from IObject* to type pointer\n        void* DynamicCastFromIObject(IObject* object) const;\n\n        // Dynamically casts from IObject* to type pointer\n        IObject* DynamicCastToIObject(void* object) const;\n\n        // Returns filed pointer by path\n        void* GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const override;\n\n    protected:\n        void* (*mCastFromFunc)(void*); // Dynamic cast function from IObject\n        void* (*mCastToFunc)(void*); // Dynamic cast function from IObject\n    };\n\n    // -----------------------\n    // Specialized object type\n    // -----------------------\n    template<typename _type>\n    class TObjectType: public ObjectType\n    {\n    public:\n        // Default constructor\n        TObjectType(const String& name, int size, void* (*castFromFunc)(void*), void* (*castToFunc)(void*));\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Creates sample copy and returns him if type is reference\n        Ref<RefCounterable> CreateSampleRef() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n    };\n\n    // ----------------\n    // Fundamental type\n    // ----------------\n    template<typename _type>\n    class FundamentalType: public TType<_type>\n    {\n    public:\n        // Default constructor\n        FundamentalType(const String& name);\n    };\n\n    // ------------\n    // Pointer type\n    // ------------\n    class PointerType : public Type\n    {\n    public:\n        // Constructor\n        PointerType(const Type* baseType, ITypeSerializer* serializer);\n\n        // Returns type usage\n        Usage GetUsage() const override;\n\n        // Returns base type\n        const Type* GetBaseType() const;\n\n        // Returns filed pointer by path\n        void* GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const override;\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n\n    protected:\n        const Type* mBaseType;\n    };\n\n    // ------------------------\n    // Specialized pointer type\n    // ------------------------\n    template<typename _type>\n    class TPointerType : public PointerType\n    {\n    public:\n        // Default constructor\n        TPointerType(const Type* baseType);\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n    };\n\n    // ----------------------\n    // Reference type (Ref<Actor>)\n    // ----------------------\n    class ReferenceType : public Type\n    {\n    public:\n        // Constructor\n        ReferenceType(const Type* baseType, ITypeSerializer* serializer);\n\n        // Returns type usage\n        Usage GetUsage() const override;\n\n        // Returns base type\n        const Type* GetBaseType() const;\n\n        // Returns filed pointer by path\n        void* GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const override;\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Creates sample reference with object\n        virtual void* CreateSample(void* object) const = 0;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n\n        // Returns raw pointer from reference pointer\n        virtual void* GetObjectRawPtr(void* refPtr) const = 0;\n\n        // Sets raw pointer to reference\n        virtual void SetObjectRawPtr(void* object, void* refPtr) = 0;\n\n    protected:\n        const Type* mBaseType;\n    };\n\n    // --------------------------\n    // Specialized reference type\n    // --------------------------\n    template<typename _type>\n    class TReferenceType : public ReferenceType\n    {\n    public:\n        // Default constructor\n        TReferenceType(const Type* baseType);\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n\n        // Returns raw pointer from reference pointer\n        void* GetObjectRawPtr(void* refPtr) const override;\n\n        // Sets raw pointer to reference\n        void SetObjectRawPtr(void* object, void* refPtr) override;\n\n        // Creates sample reference with object\n        void* CreateSample(void* object) const override;\n    };\n\n    // -------------\n    // Property type\n    // -------------\n    class PropertyType: public Type\n    {\n    public:\n        // Default constructor\n        PropertyType(const String& name, int size, ITypeSerializer* serializer);\n\n        // Returns type usage\n        Usage GetUsage() const;\n\n        // Returns type of value\n        const Type* GetValueType() const;\n\n        // Returns value from property casted to void*\n        virtual void* GetValueAsPtr(void* propertyPtr) const = 0;\n\n    protected:\n        const Type* mValueType;\n    };\n\n    // -------------------------\n    // Specialized Property type\n    // -------------------------\n    template<typename _value_type, typename _property_type>\n    class TPropertyType: public PropertyType\n    {\n        struct RealFieldGetter;\n        struct NullFieldGetter;\n\n    public:\n        // Constructor\n        TPropertyType();\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n\n        // Returns filed pointer by path\n        void* GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const override;\n\n        // Returns value from property casted to void*\n        void* GetValueAsPtr(void* propertyPtr) const override;\n\n        // Returns value from property\n        _value_type GetValue(void* propertyPtr) const;\n    };\n\n    // ----------------------\n    // Type of Vector<> value\n    // ----------------------\n    class VectorType: public Type\n    {\n    public:\n        // Default constructor\n        VectorType(const String& name, int size, ITypeSerializer* serializer);\n\n        // Returns type usage\n        virtual Usage GetUsage() const override;\n\n        // Returns type of vector element\n        const Type* GetElementType() const;\n\n        // Returns size of vector by pointer\n        virtual int GetObjectVectorSize(void* object) const = 0;\n\n        // Sets size of vector by pointer\n        virtual void SetObjectVectorSize(void* object, int size) const = 0;\n\n        // Returns element's pointer by index\n        virtual void* GetObjectVectorElementPtr(void* object, int idx) const = 0;\n\n        // Returns element's value proxy by index\n        virtual Ref<IAbstractValueProxy> GetObjectVectorElementProxy(void* object, int idx) const = 0;\n\n        // Removes element at idx in vector\n        virtual void RemoveObjectVectorElement(void* object, int idx) const = 0;\n\n        // Returns filed pointer by path\n        void* GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const override;\n\n        // Returns element field info. Element field info is same for all elements\n        FieldInfo* GetElementFieldInfo() const;\n\n        // Returns count field info. This field info can serialize and deserialize size of vector with storing and restoring elements\n        FieldInfo* GetCountFieldInfo() const;\n\n    protected:\n        const Type* mElementType;\n        FieldInfo* mElementFieldInfo;\n        FieldInfo* mCountFieldInfo;\n\n        template<typename _element_type>\n        friend struct VectorCountFieldSerializer;\n    };\n\n    // -----------------------\n    // Specialized vector type\n    // -----------------------\n    template<typename _element_type>\n    class TVectorType: public VectorType\n    {\n    public:\n        // Default constructor\n        TVectorType();\n\n        // Returns size of vector by pointer\n        int GetObjectVectorSize(void* object) const override;\n\n        // Sets size of vector by pointer\n        void SetObjectVectorSize(void* object, int size) const override;\n\n        // Returns element's pointer by index\n        void* GetObjectVectorElementPtr(void* object, int idx) const override;\n\n        // Returns element's value proxy by index\n        Ref<IAbstractValueProxy> GetObjectVectorElementProxy(void* object, int idx) const override;\n\n        // Removes element at idx in vector\n        void RemoveObjectVectorElement(void* object, int idx) const override;\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n    };\n\n    // --------------------------\n    // Type of Dictionary<> value\n    // --------------------------\n    class MapType: public Type\n    {\n    public:\n        // Default constructor\n        MapType(const Type* keyType, const Type* valueType, int size, ITypeSerializer* serializer);\n\n        // Returns type usage\n        virtual Usage GetUsage() const override;\n\n        // Returns type of dictionary key\n        const Type* GetKeyType() const;\n\n        // Returns type of dictionary value\n        const Type* GetValueType() const;\n\n        // Returns size of dictionary by pointer\n        int GetObjectDictionarySize(void* object) const;\n\n        // Returns element's key pointer by index\n        void* GetObjectDictionaryKeyPtr(void* object, int idx) const;\n\n        // Returns element's value pointer by index\n        void* GetObjectDictionaryValuePtr(void* object, int idx) const;\n\n        // Returns filed pointer by path\n        void* GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const override;\n\n    protected:\n        const Type* mKeyType;\n        const Type* mValueType;\n\n        Function<int(void*)>        mGetDictionaryObjectSizeFunc;\n        Function<void* (void*, int)> mGetObjectDictionaryKeyPtrFunc;\n        Function<void* (void*, int)> mGetObjectDictionaryValuePtrFunc;\n    };\n\n    template<typename _key_type, typename _value_type>\n    class TMapType: public MapType\n    {\n    public:\n        // Default constructor\n        TMapType();\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n    };\n\n    // -------------------------------------------\n    // Accessor<_return_type*, const String&> type\n    // -------------------------------------------\n    class StringPointerAccessorType: public Type\n    {\n    public:\n        // Default constructor\n        StringPointerAccessorType(const String& name, int size, ITypeSerializer* serializer);\n\n        // Returns type usage\n        Usage GetUsage() const override;\n\n        // Returns value pointer by key\n        virtual void* GetValue(void* object, const String& key) const = 0;\n\n        // Returns all values with keys\n        virtual Map<String, void*> GetAllValues(void* object) const = 0;\n\n        // Returns type of return values\n        virtual const Type* GetReturnType() const = 0;\n    };\n\n    template<typename _return_type, typename _accessor_type>\n    class TStringPointerAccessorType: public StringPointerAccessorType\n    {\n    public:\n        TStringPointerAccessorType();\n\n        // Returns filed pointer by path\n        void* GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const override;\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n\n        // Returns value pointer by key\n        void* GetValue(void* object, const String& key) const override;\n\n        // Returns all values with keys\n        Map<String, void*> GetAllValues(void* object) const override;\n\n        // Returns type of return values\n        const Type* GetReturnType() const override;\n\n    protected:\n        const Type* mReturnType;\n    };\n\n    // ----------------\n    // Enumeration type\n    // ----------------\n    class EnumType: public Type\n    {\n    public:\n        // Constructor\n        EnumType(const String& name, int size, ITypeSerializer* serializer);\n\n        // Returns type usage\n        Usage GetUsage() const;\n\n        // Returns enum entries\n        const Map<int, String>& GetEntries() const;\n\n    protected:\n        Map<int, String> mEntries;\n\n        friend class Reflection;\n    };\n\n    // ---------------------\n    // Specialized Enum type\n    // ---------------------\n    template<typename _type>\n    class TEnumType: public EnumType\n    {\n    public:\n        // Constructor\n        TEnumType(const String& name, int size);\n\n        // Creates sample copy and returns him\n        void* CreateSample() const override;\n\n        // Destroys sample\n        void DestroySample(void* sample) const override;\n\n        // Returns abstract value proxy for object value\n        Ref<IAbstractValueProxy> GetValueProxy(void* object) const override;\n    };\n\n    // --------------------------\n    // Fundamental type container\n    // --------------------------\n    template<typename _type>\n    class FundamentalTypeContainer\n    {\n    protected:\n        static Type* type;\n\n        template<typename _type_>\n        friend const Type& o2::GetTypeOf();\n\n        friend class Reflection;\n\n    public:\n        template<typename _processor_type>\n        static void InitializeType(_type* object, _processor_type& processor);\n    };\n\n    // --------------------------\n    // Enumeration type container\n    // --------------------------\n    template<typename _type>\n    class EnumTypeContainer\n    {\n    public:\n        static const Map<int, String>& GetEntries() { return type->GetEntries(); }\n\n    public:\n        inline static EnumType* type = nullptr;\n\n        template<typename _type_>\n        friend const Type& o2::GetTypeOf();\n\n        friend class Reflection;\n    };\n\n    template<typename _type>\n    void SetupType(Type* type)\n    {\n        _type::type = type;\n    }\n}\n\ntypedef void* (*GetValuePointerFuncPtr)(void*);\n\n// Script methods are now inline in IOBJECT_SCRIPTING — nothing to emit out-of-line.\n#define DECLARE_SCRIPTING(CLASS, TEMPLATE_OPT)\n\n#define DECLARE_CLASS(CLASS, REGISTRATOR_ID)                                                                           \\\n    extern void __RegisterClass__##REGISTRATOR_ID()                                                                    \\\n    {                                                                                                                  \\\n        o2::ReflectionInitializationTypeProcessor processor;                                                           \\\n        CLASS::template ProcessType<o2::ReflectionInitializationTypeProcessor>(0, processor);                          \\\n    }                                                                                                                  \\\n    namespace { struct __ClassInit_##REGISTRATOR_ID {                                                                  \\\n        __ClassInit_##REGISTRATOR_ID() { o2::SetupType<CLASS>(o2::Reflection::InitializeType<CLASS>(#CLASS, false)); } \\\n    } __classInit_##REGISTRATOR_ID; }\n\n#define O2_CAT2_(a, b) a##b\n#define O2_CAT_(a, b) O2_CAT2_(a, b)\n#define DECLARE_TEMPLATE_CLASS(CLASS)                                                                          \\\n    static const int O2_CAT_(__O2_TMPL_INIT_, __COUNTER__) =                                                   \\\n        (o2::SetupType<CLASS>(o2::Reflection::InitializeType<CLASS>(#CLASS, true)), 0);\n\n#define CLASS_BASES_META(CLASS)                                                                                \\\n    template<typename _type_processor> void CLASS::ProcessBaseTypes(CLASS* object, _type_processor& processor) \\\n    {                                                                                                          \\\n        typedef CLASS thisclass;                                                                               \\\n        processor.template StartBases<CLASS>(object, type);                                                                 \n\n#define CLASS_FIELDS_META(CLASS)                                                                               \\\n    template<typename _type_processor> void CLASS::ProcessFields(CLASS* object, _type_processor& processor)    \\\n    {                                                                                                          \\\n        typedef CLASS thisclass;                                                                               \\\n        processor.template StartFields<CLASS>(object, type);                                                                 \n\n#define CLASS_METHODS_META(CLASS)                                                                              \\\n    template<typename _type_processor> void CLASS::ProcessMethods(CLASS* object, _type_processor& processor)   \\\n    {                                                                                                          \\\n        typedef CLASS thisclass;                                                                               \\\n        processor.template StartMethods<CLASS>(object, type);\n\n#define META_TEMPLATES(...) \\\n    template<__VA_ARGS__>\n\n#define DECLARE_CLASS_MANUAL(CLASS, REGISTRATOR_ID) \\\n    DECLARE_CLASS(CLASS, REGISTRATOR_ID)\n\n#define DECLARE_TEMPLATE_CLASS_MANUAL(CLASS) \\\n    DECLARE_TEMPLATE_CLASS(CLASS)\n\n#define DECLARE_TEMPLATE_CLASS_MANUAL_ID(CLASS, REGISTRATOR_ID)                                                \\\n    extern void __RegisterTemplateClass__##REGISTRATOR_ID()                                                    \\\n    {                                                                                                          \\\n        o2::SetupType<CLASS>(o2::Reflection::InitializeType<CLASS>(#CLASS, true));                             \\\n    }                                                                                                          \\\n    namespace { struct __TemplateClassInit_##REGISTRATOR_ID {                                                  \\\n        __TemplateClassInit_##REGISTRATOR_ID() { __RegisterTemplateClass__##REGISTRATOR_ID(); }                \\\n    } __templateClassInit_##REGISTRATOR_ID; }\n\n#define CLASS_BASES_META_MANUAL(CLASS) \\\n    CLASS_BASES_META(CLASS)\n\n#define CLASS_FIELDS_META_MANUAL(CLASS) \\\n    CLASS_FIELDS_META(CLASS)\n\n#define CLASS_METHODS_META_MANUAL(CLASS) \\\n    CLASS_METHODS_META(CLASS)\n\n#define META_TEMPLATES_MANUAL(...) \\\n    META_TEMPLATES(__VA_ARGS__)\n\n#define FUNDAMENTAL_META(NAME) \\\n    template<>                                                                                                                                \\\n    template<typename _type_processor> void FundamentalTypeContainer<NAME>::InitializeType(NAME* object, _type_processor& processor)          \\\n    {                                                                                                                                         \\\n        typedef NAME thisclass;                                                                                                               \\\n        processor.template StartFields<NAME>(object, type);\n\n#define BASE_CLASS(CLASS) \\\n    processor.template BaseType<thisclass, CLASS>(object, type, #CLASS)\n\n#define FIELD() \\\n    processor.StartField()\n\n#define NAME(NAME) \\\n    template FieldBasics<thisclass, decltype(object->NAME)>(object, type, #NAME, (GetValuePointerFuncPtr)([](void* obj) { return (void*)&((thisclass*)obj)->NAME; }), object->NAME)\n\n#define PUBLIC() \\\n    SetProtectSection(o2::ProtectSection::Public)\n\n#define PRIVATE() \\\n    SetProtectSection(o2::ProtectSection::Private)\n\n#define PROTECTED() \\\n    SetProtectSection(o2::ProtectSection::Protected)\n\n#define DEFAULT_VALUE \\\n    SetDefaultValue\n\n#define ATTRIBUTE(NAME) \\\n    template AddAttribute<NAME>()\n\n#define ATTRIBUTES(...)\n\n#define FUNCTION() \\\n    processor.StartFunction()\n\ntemplate<typename _class_type, typename _res_type, typename ... _args>\nconstexpr auto ResolveMethodPtr(_res_type(_class_type::*ptr)(_args ...)) { return ptr; }\n\ntemplate<typename _class_type, typename _res_type, typename ... _args>\nconstexpr auto ResolveMethodPtr(_res_type(_class_type::*ptr)(_args ...) const) { return ptr; }\n\n#define SIGNATURE(RETURN_TYPE, NAME, ...) \\\n    template Signature<ResolveMethodPtr<thisclass, RETURN_TYPE, ##__VA_ARGS__>(&thisclass::NAME)>(                \\\n        object, type, #NAME, [](thisclass* _obj, auto... _args) -> RETURN_TYPE { return _obj->NAME(_args...); })\n\n#define CONSTRUCTOR(...) \\\n    template Constructor<thisclass, ##__VA_ARGS__>(object, type)\n\n#define SIGNATURE_STATIC(RETURN_TYPE, NAME, ...) \\\n    template SignatureStatic<thisclass, RETURN_TYPE, ##__VA_ARGS__>(object, type, #NAME, &thisclass::NAME)\n\n#define END_META }\n\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Reflection/FieldInfo.h\"\n#include \"o2/Utils/Reflection/FunctionInfo.h\"\n#include \"o2/Utils/Reflection/TypeTraits.h\"\n#include \"o2/Utils/Types/StringImpl.h\"\n#include \"o2/Utils/Types/UID.h\"\n#include \"o2/Utils/ValueProxy.h\"\n#include \"o2/Utils/Reflection/TypeSerializer.h\"\n#include \"o2/Utils/Reflection/TypeTraits.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // -------------------\n    // Type implementation\n    // -------------------\n\n    template<typename _res_type, typename ... _args>\n    _res_type Type::Invoke(const String& name, void* object, _args ... args) const\n    {\n        if (auto func = GetFunction(name))\n            return func->Invoke<_res_type, _args ...>(object, args ...);\n\n        return _res_type();\n    }\n\n    template<typename _res_type, typename ... _args>\n    _res_type Type::InvokeStatic(const String& name, _args ... args) const\n    {\n        if (auto func = GetStaticFunction(name))\n            return func->Invoke<_res_type, _args ...>(args ...);\n\n        return _res_type();\n    }\n\n    // --------------------\n    // TType implementation\n    // --------------------\n\n    template<typename _type>\n    TType<_type>::TType(const String& name, int size):\n        Type(name, size, mnew TypeSerializer<_type>())\n    {}\n\n    template<typename _type>\n    void* TType<_type>::CreateSample() const\n    {\n        return mnew _type();\n    }\n\n    template<typename _type>\n    Ref<RefCounterable> TType<_type>::CreateSampleRef() const\n    {\n        if constexpr (std::is_base_of<RefCounterable, _type>::value)\n            return mmake<_type>();\n        else\n            return nullptr;\n    }\n\n    template<typename _type>\n    void TType<_type>::DestroySample(void* sample) const\n    {\n        delete (_type*)sample;\n    }\n\n    template<typename _type>\n    Ref<IAbstractValueProxy> TType<_type>::GetValueProxy(void* object) const\n    {\n        return mmake<PointerValueProxy<_type>>((_type*)object);\n    }\n\n    // --------------------------\n    // TObjectType implementation\n    // --------------------------\n\n    template<typename _type>\n    TObjectType<_type>::TObjectType(const String& name, int size, void* (*castFromFunc)(void*), void* (*castToFunc)(void*)):\n        ObjectType(name, size, castFromFunc, castToFunc, mnew TypeSerializer<_type>())\n    {}\n\n    template<typename _type>\n    void* TObjectType<_type>::CreateSample() const\n    {\n        if constexpr (IsConstructible<_type>::value && std::is_constructible<_type>::value)\n            return mnew _type();\n        else\n        {\n            Assert(false, \"Type isn't constructible\");\n            return nullptr;\n        }\n    }\n\n    template<typename _type>\n    Ref<RefCounterable> TObjectType<_type>::CreateSampleRef() const\n    {\n        if constexpr (std::is_base_of<RefCounterable, _type>::value)\n        {\n            if constexpr (HasCastToRefCounterable<_type>::value)\n                return _type::CastToRefCounterable(mmake<_type>());\n            else\n                return mmake<_type>();\n        }\n        \n        return nullptr;\n    }\n\n    template<typename _type>\n    void TObjectType<_type>::DestroySample(void* sample) const\n    {\n        delete (_type*)sample;\n    }\n\n    template<typename _type>\n    Ref<IAbstractValueProxy> TObjectType<_type>::GetValueProxy(void* object) const\n    {\n        if constexpr (std::is_copy_constructible<_type>::value)\n            return mmake<PointerValueProxy<_type>>((_type*)object);\n        else\n        {\n            Assert(false, \"Type isn't copy constructible\");\n            return nullptr;\n        }\n    }\n\n    // ------------------------------\n    // FundamentalType implementation\n    // ------------------------------\n\n    template<typename _type>\n    FundamentalType<_type>::FundamentalType(const String& name):\n        TType<_type>(name, sizeof(_type))\n    {}\n\n    // -----------------------------\n    // TPointerType<> implementation\n    // -----------------------------\n\n    template<typename _type>\n    TPointerType<_type>::TPointerType(const Type * baseType) :\n        PointerType(baseType, mnew TypeSerializer<_type*>())\n    {}\n\n    template<typename _type>\n    void* TPointerType<_type>::CreateSample() const\n    {\n        return mnew void* ();\n    }\n\n    template<typename _type>\n    void TPointerType<_type>::DestroySample(void* sample) const\n    {\n        delete (_type**)sample;\n    }\n\n    template<typename _type>\n    Ref<IAbstractValueProxy> TPointerType<_type>::GetValueProxy(void* object) const\n    {\n        return mmake<PointerValueProxy<_type*>>((_type**)object);\n    }\n\n    // -------------------------------\n    // TReferenceType<> implementation\n    // -------------------------------\n\n    template<typename _type>\n    TReferenceType<_type>::TReferenceType(const Type* baseType) :\n        ReferenceType(baseType, mnew TypeSerializer<Ref<_type>>())\n    {}\n\n    template<typename _type>\n    void* TReferenceType<_type>::CreateSample() const\n    {\n        return mnew Ref<_type>();\n    }\n\n    template<typename _type>\n    Ref<IAbstractValueProxy> TReferenceType<_type>::GetValueProxy(void* object) const\n    {\n        return mmake<RefPointerValueProxy<_type>>((Ref<_type>*)object);\n    }\n\n    template<typename _type>\n    void TReferenceType<_type>::DestroySample(void* sample) const\n    {\n        delete (Ref<_type>*)sample;\n    }\n\n    template<typename _type>\n    void* TReferenceType<_type>::GetObjectRawPtr(void* refPtr) const\n    {\n        return ((Ref<_type>*)refPtr)->Get();\n    }\n\n    template<typename _type>\n    void TReferenceType<_type>::SetObjectRawPtr(void* object, void* refPtr)\n    {\n        *((Ref<_type>*)refPtr) = Ref<_type>((_type*)object);\n    }\n\n    template<typename _type>\n    void* TReferenceType<_type>::CreateSample(void* object) const\n    {\n        return mnew Ref<_type>((_type*)object);\n    }\n\n    // ------------------------------\n    // TPropertyType<> implementation\n    // ------------------------------\n\n    template<typename _value_type, typename _property_type>\n    TPropertyType<_value_type, _property_type>::TPropertyType():\n        PropertyType((String)(typeid(_property_type).name()) + (String)\"<\" + TypeOf(_value_type).GetName() + \">\", sizeof(_value_type),\n                     mnew TypeSerializer<_property_type>())\n    {\n        mValueType = &GetTypeOf<_value_type>();\n    }\n\n    template<typename _value_type, typename _property_type>\n    void* TPropertyType<_value_type, _property_type>::CreateSample() const\n    {\n        return nullptr;\n    }\n\n    template<typename _value_type, typename _property_type>\n    void TPropertyType<_value_type, _property_type>::DestroySample(void* sample) const\n    {}\n\n    template<typename _value_type, typename _property_type>\n    Ref<IAbstractValueProxy> TPropertyType<_value_type, _property_type>::GetValueProxy(void* object) const\n    {\n        return mmake<PropertyValueProxy<_value_type, _property_type>>((_property_type*)object);\n    }\n\n    template<typename _value_type, typename _property_type>\n    void* TPropertyType<_value_type, _property_type>::GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const\n    {\n        if constexpr (std::is_pointer<_value_type>::value)\n        {\n            _property_type* prop = (_property_type*)object;\n            _value_type valuePtr = prop->Get();\n            return mValueType->GetFieldPtr(&valuePtr, path, fieldInfo);\n        }\n\n        return nullptr;\n    }\n\n    template<typename _value_type, typename _property_type>\n    void* TPropertyType<_value_type, _property_type>::GetValueAsPtr(void* propertyPtr) const\n    {\n        if constexpr (std::is_pointer<_value_type>::value)\n        {\n            _property_type* prop = (_property_type*)propertyPtr;\n            return prop->Get();\n        }\n\n        return nullptr;\n    }\n\n    template<typename _value_type, typename _property_type>\n    _value_type TPropertyType<_value_type, _property_type>::GetValue(void* propertyPtr) const\n    {\n        _property_type* prop = (_property_type*)propertyPtr;\n        return prop->Get();\n    }\n\n    // --------------------------\n    // TVectorType implementation\n    // --------------------------\n\n    template<typename _element_type>\n    struct VectorCountFieldSerializer: public ITypeSerializer\n    {\n        VectorCountFieldSerializer() { }\n        void Serialize(void* object, DataValue& data) const;\n        void Deserialize(void* object, DataValue& data) const;\n        bool Equals(void* objectA, void* objectB) const;\n        void Copy(void* objectA, void* objectB) const;\n        ITypeSerializer* Clone() const;\n    };\n\n    template<typename _element_type>\n    void* TVectorType<_element_type>::GetObjectVectorElementPtr(void* object, int idx) const\n    {\n        if (idx < 0 || idx >= ((Vector<_element_type>*)object)->Count())\n            return nullptr;\n\n        return &((Vector<_element_type>*)object)->Get(idx);\n    }\n\n    template<typename _element_type>\n    Ref<IAbstractValueProxy> TVectorType<_element_type>::GetObjectVectorElementProxy(void* object, int idx) const\n    {\n        if (idx < 0 || idx >= ((Vector<_element_type>*)object)->Count())\n            return nullptr;\n\n        return mElementType->GetValueProxy(&((Vector<_element_type>*)object)->Get(idx));\n    }\n\n    template<typename _element_type>\n    void TVectorType<_element_type>::SetObjectVectorSize(void* object, int size) const\n    {\n        auto vectorObj = ((Vector<_element_type>*)object);\n        int oldSize = vectorObj->Count();\n        vectorObj->Resize(size);\n\n        for (int i = oldSize; i < size; i++)\n            (*vectorObj)[i] = _element_type();\n    }\n\n    template<typename _element_type>\n    void TVectorType<_element_type>::RemoveObjectVectorElement(void* object, int idx) const\n    {\n        ((Vector<_element_type>*)object)->RemoveAt(idx);\n    }\n\n    template<typename _element_type>\n    void* TVectorType<_element_type>::CreateSample() const\n    {\n        return mnew Vector<_element_type>();\n    }\n\n    template<typename _element_type>\n    void TVectorType<_element_type>::DestroySample(void* sample) const\n    {\n        delete (Vector<_element_type>*)sample;\n    }\n\n    template<typename _element_type>\n    Ref<IAbstractValueProxy> TVectorType<_element_type>::GetValueProxy(void* object) const\n    {\n        return mmake<PointerValueProxy<Vector<_element_type>>>((Vector<_element_type>*)object);\n    }\n\n    template<typename _element_type>\n    int TVectorType<_element_type>::GetObjectVectorSize(void* object) const\n    {\n        return ((Vector<_element_type>*)object)->Count();\n    }\n\n    template<typename _element_type>\n    TVectorType<_element_type>::TVectorType():\n        VectorType((String)\"o2::Vector<\" + GetTypeOf<_element_type>().GetName() + \">\", sizeof(Vector<_element_type>), mnew TypeSerializer<Vector<_element_type>>())\n    {\n        mElementType = &GetTypeOf<_element_type>();\n\n        mElementFieldInfo = mnew FieldInfo(this, \"element\", 0, mElementType, ProtectSection::Private);\n        mCountFieldInfo = mnew FieldInfo(this, \"count\", 0, &GetTypeOf<int>(), ProtectSection::Public,\n                                         mnew DefaultValue<int>(0),\n                                         mnew VectorCountFieldSerializer<_element_type>());\n    }\n\n    template<typename _element_type>\n    void VectorCountFieldSerializer<_element_type>::Serialize(void* object, DataValue& data) const\n    {\n        const VectorType& type = (const VectorType&)(GetTypeOf<Vector<_element_type>>());\n\n        int size = type.GetObjectVectorSize(object);\n        data[\"Size\"].Set(size);\n\n        DataValue& elements = data[\"Elements\"];\n        for (int i = 0; i < size; i++)\n        {\n            void* elementPtr = type.GetObjectVectorElementPtr(object, i);\n            type.mElementFieldInfo->Serialize(elementPtr, elements.AddMember(\"Element\" + (String)i));\n        }\n    }\n\n    template<typename _element_type>\n    void VectorCountFieldSerializer<_element_type>::Deserialize(void* object, DataValue& data) const\n    {\n        const VectorType& type = (const VectorType&)(GetTypeOf<Vector<_element_type>>());\n        int size = type.GetObjectVectorSize(object);\n        int newSize;\n        data[\"Size\"].Get(newSize);\n        type.SetObjectVectorSize(object, newSize);\n\n        if (auto elementsData = data.GetMember(\"Elements\"))\n        {\n            for (int i = size; i < newSize; i++)\n            {\n                if (auto elementData = elementsData.GetMember(\"Element\" + (WString)i))\n                {\n                    void* elementPtr = type.GetObjectVectorElementPtr(object, i);\n                    type.mElementFieldInfo->Deserialize(elementPtr, elementData);\n                }\n            }\n        }\n    }\n\n    template<typename _element_type>\n    bool VectorCountFieldSerializer<_element_type>::Equals(void* objectA, void* objectB) const\n    {\n        const VectorType& type = (const VectorType&)(GetTypeOf<Vector<_element_type>>());\n        return type.GetObjectVectorSize(objectA) == type.GetObjectVectorSize(objectB);\n    }\n\n    template<typename _element_type>\n    void VectorCountFieldSerializer<_element_type>::Copy(void* objectA, void* objectB) const\n    {\n        const VectorType& type = (const VectorType&)(GetTypeOf<Vector<_element_type>>());\n        type.SetObjectVectorSize(objectA, type.GetObjectVectorSize(objectB));\n    }\n\n    template<typename _element_type>\n    ITypeSerializer* VectorCountFieldSerializer<_element_type>::Clone() const\n    {\n        return mnew VectorCountFieldSerializer();\n    }\n\n    // ------------------------------\n    // TDictionaryType implementation\n    // ----------------------------- -\n\n    template<typename _key_type, typename _value_type>\n    TMapType<_key_type, _value_type>::TMapType():\n        MapType(&GetTypeOf<_key_type>(), &GetTypeOf<_value_type>(), sizeof(Map<_key_type, _value_type>), mnew TypeSerializer<Map<_key_type, _value_type>>())\n    {\n        mGetDictionaryObjectSizeFunc = [](void* obj) { return ((Map<_key_type, _value_type>*)obj)->Count(); };\n\n        mGetObjectDictionaryKeyPtrFunc = [](void* obj, int idx) {\n            auto it = ((Map<_key_type, _value_type>*)obj)->Begin();\n            while (idx >= 0) it++;\n\n            return (void*)(&it->first);\n        };\n\n        mGetObjectDictionaryValuePtrFunc = [](void* obj, int idx) {\n            auto it = ((Map<_key_type, _value_type>*)obj)->Begin();\n            while (idx >= 0) it++;\n\n            return (void*)(&it->second);\n        };\n    }\n\n    template<typename _key_type, typename _value_type>\n    void* TMapType<_key_type, _value_type>::CreateSample() const\n    {\n        return mnew Map<_key_type, _value_type>();\n    }\n\n    template<typename _key_type, typename _value_type>\n    void TMapType<_key_type, _value_type>::DestroySample(void* sample) const\n    {\n        delete (Map<_key_type, _value_type>*)sample;\n    }\n\n    template<typename _key_type, typename _value_type>\n    Ref<IAbstractValueProxy> TMapType<_key_type, _value_type>::GetValueProxy(void* object) const\n    {\n        return mmake<PointerValueProxy<Map<_key_type, _value_type>>>((Map<_key_type, _value_type>*)object);\n    }\n\n    // ----------------------------------------\n    // StringPointerAccessorType implementation\n    // ----------------------------------------\n\n    template<typename _return_type, typename _accessor_type>\n    TStringPointerAccessorType<_return_type, _accessor_type>::TStringPointerAccessorType():\n        StringPointerAccessorType((String)(typeid(_accessor_type).name()) + (String)\"<\" + TypeOf(_return_type).GetName() + \">\",\n                                  sizeof(_accessor_type), mnew TypeSerializer<_accessor_type>())\n    {\n        mReturnType = &GetTypeOf<_return_type>();\n    }\n\n    template<typename _return_type, typename _accessor_type>\n    void* TStringPointerAccessorType<_return_type, _accessor_type>::CreateSample() const\n    {\n        return nullptr;\n    }\n\n    template<typename _return_type, typename _accessor_type>\n    void TStringPointerAccessorType<_return_type, _accessor_type>::DestroySample(void* sample) const\n    {}\n\n    template<typename _return_type, typename _accessor_type>\n    Ref<IAbstractValueProxy> TStringPointerAccessorType<_return_type, _accessor_type>::GetValueProxy(void* object) const\n    {\n        return mmake<PointerValueProxy<_accessor_type>>((_accessor_type*)object);\n    }\n\n    template<typename _return_type, typename _accessor_type>\n    void* TStringPointerAccessorType<_return_type, _accessor_type>::GetFieldPtr(void* object, const String& path, const FieldInfo*& fieldInfo) const\n    {\n        int delPos = path.Find(\"/\");\n        String pathPart = path.SubStr(0, delPos);\n\n        _accessor_type* accessor = (_accessor_type*)object;\n        if (_return_type value = accessor->Get(pathPart))\n        {\n            if constexpr (IsRef<_return_type>::value)\n            {\n                if (delPos < 0)\n                    return value.Get();\n            }\n\n            return mReturnType->GetFieldPtr(&value, path.SubStr(delPos + 1), fieldInfo);\n        }\n\n        return nullptr;\n    }\n\n    template<typename _return_type, typename _accessor_type>\n    void* TStringPointerAccessorType<_return_type, _accessor_type>::GetValue(void* object, const String& key) const\n    {\n        _accessor_type* accessor = (_accessor_type*)object;\n        return (void*)(accessor->Get(key).Get());\n    }\n\n    template<typename _return_type, typename _accessor_type>\n    Map<String, void*> TStringPointerAccessorType<_return_type, _accessor_type>::GetAllValues(void* object) const\n    {\n        _accessor_type* accessor = (_accessor_type*)object;\n        auto all = accessor->GetAll();\n        Map<String, void*> res;\n        for (auto& kv : all)\n            res.Add(kv.first, (void*)(kv.second.Get()));\n\n        return res;\n    }\n\n    template<typename _return_type, typename _accessor_type>\n    const Type* TStringPointerAccessorType<_return_type, _accessor_type>::GetReturnType() const\n    {\n        return mReturnType;\n    }\n\n    // ------------------------\n    // TEnumType implementation\n    // ------------------------\n\n    template<typename _type>\n    TEnumType<_type>::TEnumType(const String& name, int size):\n        EnumType(name, size, mnew TypeSerializer<_type>())\n    {}\n\n    template<typename _type>\n    void* TEnumType<_type>::CreateSample() const\n    {\n        return mnew _type();\n    }\n\n    template<typename _type>\n    void TEnumType<_type>::DestroySample(void* sample) const\n    {\n        delete (_type*)sample;\n    }\n\n    template<typename _type>\n    Ref<IAbstractValueProxy> TEnumType<_type>::GetValueProxy(void* object) const\n    {\n        return mmake<PointerValueProxy<_type>>((_type*)object);\n    }\n\n    FUNDAMENTAL_META(RectF)\n    {\n        FIELD().PUBLIC().NAME(left);\n        FIELD().PUBLIC().NAME(right);\n        FIELD().PUBLIC().NAME(top);\n        FIELD().PUBLIC().NAME(bottom);\n    }\n    END_META;\n\n    FUNDAMENTAL_META(RectI)\n    {\n        FIELD().PUBLIC().NAME(left);\n        FIELD().PUBLIC().NAME(right);\n        FIELD().PUBLIC().NAME(top);\n        FIELD().PUBLIC().NAME(bottom);\n    }\n    END_META;\n\n    FUNDAMENTAL_META(BorderF)\n    {\n        FIELD().PUBLIC().NAME(left);\n        FIELD().PUBLIC().NAME(right);\n        FIELD().PUBLIC().NAME(top);\n        FIELD().PUBLIC().NAME(bottom);\n    }\n    END_META;\n\n    FUNDAMENTAL_META(BorderI)\n    {\n        FIELD().PUBLIC().NAME(left);\n        FIELD().PUBLIC().NAME(right);\n        FIELD().PUBLIC().NAME(top);\n        FIELD().PUBLIC().NAME(bottom);\n    }\n    END_META;\n\n    FUNDAMENTAL_META(Vec2F)\n    {\n        FIELD().PUBLIC().NAME(x);\n        FIELD().PUBLIC().NAME(y);\n    }\n    END_META;\n\n    FUNDAMENTAL_META(Vec2I)\n    {\n        FIELD().PUBLIC().NAME(x);\n        FIELD().PUBLIC().NAME(y);\n    }\n    END_META;\n\n    FUNDAMENTAL_META(Color4)\n    {\n        FIELD().PUBLIC().NAME(r);\n        FIELD().PUBLIC().NAME(g);\n        FIELD().PUBLIC().NAME(b);\n        FIELD().PUBLIC().NAME(a);\n    }\n    END_META;\n\n    FUNDAMENTAL_META(int) END_META;\n    FUNDAMENTAL_META(bool) END_META;\n    FUNDAMENTAL_META(char) END_META;\n    FUNDAMENTAL_META(wchar_t) END_META;\n    FUNDAMENTAL_META(short int) END_META;\n    FUNDAMENTAL_META(long int) END_META;\n    FUNDAMENTAL_META(long long int) END_META;\n    FUNDAMENTAL_META(unsigned char) END_META;\n    FUNDAMENTAL_META(unsigned short int) END_META;\n    FUNDAMENTAL_META(unsigned int) END_META;\n    FUNDAMENTAL_META(unsigned long int) END_META;\n    FUNDAMENTAL_META(unsigned long long int) END_META;\n    FUNDAMENTAL_META(float) END_META;\n    FUNDAMENTAL_META(double) END_META;\n    FUNDAMENTAL_META(long double) END_META;\n    FUNDAMENTAL_META(Basis) END_META;\n    FUNDAMENTAL_META(Vertex) END_META;\n    FUNDAMENTAL_META(String) END_META;\n    FUNDAMENTAL_META(WString) END_META;\n    FUNDAMENTAL_META(DataValue) END_META;\n    FUNDAMENTAL_META(UID) END_META;\n    FUNDAMENTAL_META(ScriptValue) END_META;\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/TypeSerializer.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Memory/MemoryManager.h\"\n#include \"o2/Utils/Reflection/TypeTraits.h\"\n\nnamespace o2\n{\n    class DataValue;\n\n    struct ITypeSerializer\n    {\n        virtual ~ITypeSerializer() { }\n\n        virtual bool IsDefault(void* object) const { return false; }\n\n        virtual void Serialize(void* object, DataValue& data) const { }\n        virtual void Deserialize(void* object, const DataValue& data) const { }\n\n        virtual bool Equals(void* objectA, void* objectB) const { return false; }\n        virtual void Copy(void* objectA, void* objectB) const { }\n\n        virtual ITypeSerializer* Clone() const { return mnew ITypeSerializer(); }\n    };\n    template<typename _type>\n    struct TypeSerializer : public ITypeSerializer\n    {\n        static constexpr bool isSerializable = DataValue::IsSupports<_type>::value;\n        static constexpr bool isEqualsSupport = SupportsEqualOperator<_type>::value;\n        static constexpr bool isCopyable = std::is_assignable<_type&, _type>::value;\n\n    public:\n        bool IsDefault(void* object) const override;\n\n        void Serialize(void* object, DataValue& data) const override;\n        void Deserialize(void* object, const DataValue& data) const override;\n\n        bool Equals(void* objectA, void* objectB) const override;\n        void Copy(void* objectA, void* objectB) const override;\n\n        ITypeSerializer* Clone() const override;\n    };\n\n    template<typename _type>\n    bool TypeSerializer<_type>::IsDefault(void* object) const\n    {\n        if constexpr (std::is_default_constructible_v<_type> && SupportsEqualOperator<_type>::value)\n            return Math::Equals(*(_type*)object, _type());\n\n        return false;\n    }\n\n    template<typename _type>\n    void TypeSerializer<_type>::Serialize(void* object, DataValue& data) const\n    {\n        if constexpr (isSerializable)\n            data.Set(*(_type*)object);\n    }\n\n    template<typename _type>\n    void TypeSerializer<_type>::Deserialize(void* object, const DataValue& data) const\n    {\n        if constexpr (isSerializable)\n            data.Get(*(_type*)object);\n    }\n\n    template<typename _type>\n    bool TypeSerializer<_type>::Equals(void* objectA, void* objectB) const\n    {\n        if constexpr (isEqualsSupport)\n            return Math::Equals(*(_type*)objectA, *(_type*)objectB);\n\n        return false;\n    }\n\n    template<typename _type>\n    void TypeSerializer<_type>::Copy(void* objectA, void* objectB) const\n    {\n        if constexpr (isCopyable)\n            *(_type*)objectA = *(_type*)objectB;\n    }\n\n    template<typename _type>\n    ITypeSerializer* TypeSerializer<_type>::Clone() const\n    {\n        return mnew TypeSerializer();\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Reflection/TypeTraits.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2/Utils/Math/Color.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/UID.h\"\n\nnamespace o2\n{\n    template<class T> struct IsVectorHelper : std::false_type {};\n    template<class T> struct IsVectorHelper<Vector<T>> : std::true_type {};\n    template<class T> struct IsVector : IsVectorHelper<typename std::remove_cv<T>::type> {};\n    template<class T> struct ExtractVectorElementType { typedef T type; };\n    template<class T> struct ExtractVectorElementType<Vector<T>> { typedef T type; };\n\n    template<class T, class T2> struct IsMapHelper : std::false_type {};\n    template<class T, class T2> struct IsMapHelper<Map<T, T2>, void> : std::true_type {};\n    template<class T> struct IsMap : IsMapHelper<typename std::remove_cv<T>::type, void> {};\n\n    template<class T, class T2> struct MapKeyTypeGetterHelper { typedef T type; };\n    template<class T, class T2> struct MapKeyTypeGetterHelper<Map<T, T2>, void> { typedef T type; };\n    template<class T> struct ExtractMapKeyType : MapKeyTypeGetterHelper<typename std::remove_cv<T>::type, void> {};\n\n    template<class T, class T2> struct MapValueTypeGetterHelper { typedef T2 type; };\n    template<class T, class T2> struct MapValueTypeGetterHelper<Map<T, T2>, void> { typedef T2 type; };\n    template<class T> struct ExtractMapValueType : MapValueTypeGetterHelper<typename std::remove_cv<T>::type, void> {};\n    \n    template<typename... Ts> struct make_void { typedef void type; };\n    template<typename... Ts> using void_t = typename make_void<Ts...>::type;\n\n    template<typename T, typename = void>\n    struct IsComplete : std::false_type {};\n\n    template<typename T>\n    struct IsComplete<T, std::void_t<decltype(sizeof(T))>> : std::true_type {};\n\n    template<typename Base, typename T>\n    struct IsBaseOf\n    {\n        static constexpr auto value = std::conditional<IsComplete<T>::value, std::is_base_of<Base, T>, std::false_type>::type::value;\n    };\n\n    template<class T, class = void_t<>>\n    struct IsCloneable: std::false_type { };\n\n    template<class T>\n    struct IsCloneable<T, void_t<decltype(&T::Clone)>>: std::true_type { };\n\n    template<class T, class = void_t<>>\n    struct IsAccessor : std::false_type { };\n\n    template<class T>\n    struct IsAccessor<T, void_t<decltype(&T::IsAccessor)>> : std::true_type { };\n\n    template<class T, class = void_t<>>\n    struct IsStringAccessorHelper : std::false_type { };\n\n    template<class T>\n    struct IsStringAccessorHelper<T, typename std::enable_if<IsAccessor<T>::value && std::is_same<typename T::keyType, String>::value>::type> : std::true_type { };\n\n    template<class T> struct IsStringAccessor : IsStringAccessorHelper<typename std::remove_cv<T>::type> {};\n\n    template<class T, class = void_t<>>\n    struct IsProperty : std::false_type {};\n\n    template<class T>\n    struct IsProperty<T, void_t<decltype(&T::IsProperty)>> : std::true_type {};\n\n    template<class T, class = void_t<>>\n    struct SupportsPlus : std::false_type {};\n\n    template<class T>\n    struct SupportsPlus<T, void_t<decltype(std::declval<T>() + std::declval<T>())>> : std::true_type {};\n\n    template<class T, class = void_t<>>\n    struct SupportsMinus : std::false_type {};\n\n    template<class T>\n    struct SupportsMinus<T, void_t<decltype(std::declval<T>() - std::declval<T>())>> : std::true_type {};\n\n    template<class T, class = void_t<>>\n    struct SupportsDivide : std::false_type {};\n\n    template<class T>\n    struct SupportsDivide<T, void_t<decltype(std::declval<T>() / std::declval<T>())>> : std::true_type {};\n\n    template<class T, class = void_t<>>\n    struct SupportsMultiply: std::false_type {};\n\n    template<class T>\n    struct SupportsMultiply<T, void_t<decltype(std::declval<T>() * std::declval<T>())>>: std::true_type {};\n\n    template<class T, class = void_t<>>\n    struct SupportsEqualOperator: std::false_type {};\n\n    template<class T>\n    struct SupportsEqualOperator<T, void_t<decltype(std::declval<T>() == std::declval<T>())>>: std::true_type {};\n\n    template<class T, class = void>\n    struct ExtractPropertyValueType\n    {\n        typedef T type;\n    };\n\n    template<class T>\n    struct ExtractPropertyValueType<T, void_t<decltype(std::declval<T>().IsProperty())>>\n    {\n        typedef typename T::valueType type;\n    };\n\n    template<class T, class = void_t<>>\n    struct HasCastToRefCounterable : std::false_type {};\n\n    template<class T>\n    struct HasCastToRefCounterable<T, void_t<decltype(&T::CastToRefCounterable)>> : std::true_type {};\n\n    template<typename T>\n    struct RemoveConstAndRef\n    {\n        using type = typename std::remove_const<typename std::remove_reference<T>::type>::type;\n    };\n\n    template<class T> struct IsRef;\n    template<class T> struct ExtractRefType;\n}\n\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Scripts/ScriptValueDef.h\"\n#include \"o2/Utils/Function/SerializableFunction.h\"\n#include \"o2/Utils/Types/Ref.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n\nnamespace o2\n{\n#if defined PLATFORM_IOS || defined PLATFORM_MAC || defined PLATFORM_ANDROID\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wundefined-var-template\"\n#endif\n\n    template<class T> struct IsRefHelper : std::false_type {};\n    template<class T> struct IsRefHelper<Ref<T>> : std::true_type {};\n    template<class T> struct IsRef : IsRefHelper<typename std::remove_cv<T>::type> {};\n\n    template<class T> struct ExtractRefType { typedef T type; };\n    template<class T> struct ExtractRefType<Ref<T>> { typedef T type; };\n\n    template<class T> struct IsFunctionHelper : std::false_type {};\n    template<typename _res_type, typename ... _args> struct IsFunctionHelper<Function<_res_type(_args ...)>> : std::true_type {};\n    template<typename _res_type, typename ... _args> struct IsFunctionHelper<SerializableFunction<_res_type(_args ...)>> : std::true_type {};\n    template<class T> struct IsFunction : IsFunctionHelper<typename std::remove_cv<T>::type> {};\n\n    template<class T> struct IsSerializableFunctionHelper : std::false_type {};\n    template<typename _res_type, typename ... _args> struct IsSerializableFunctionHelper<SerializableFunction<_res_type(_args ...)>> : std::true_type {};\n    template<class T> struct IsSerializableFunction : IsSerializableFunctionHelper<typename std::remove_cv<T>::type> {};\n\n    template<typename T>\n    struct IsFundamental: public std::conditional<\n            std::is_fundamental<T>::value ||\n            std::is_same<T, Basis>::value ||\n            std::is_same<T, Color4>::value ||\n            std::is_same<T, RectI>::value ||\n            std::is_same<T, RectF>::value ||\n            std::is_same<T, BorderI>::value ||\n            std::is_same<T, BorderF>::value ||\n            std::is_same<T, Vec2I>::value ||\n            std::is_same<T, Vec2F>::value ||\n            std::is_same<T, Vertex>::value ||\n            std::is_same<T, String>::value ||\n            std::is_same<T, WString>::value ||\n            std::is_same<T, UID>::value ||\n            std::is_same<T, ScriptValue>::value ||\n            std::is_same<T, DataValue>::value, std::true_type, std::false_type>::type {};\n\n    // Returns type of template parameter\n    template<typename _type>\n    const Type& GetTypeOf()\n    {\n        if constexpr (std::is_base_of<IObject, _type>::value)\n        {\n            return *_type::type;\n        }\n        else if constexpr (IsRef<_type>::value)\n        {\n            return *Reflection::GetReferenceType<typename std::remove_const<typename ExtractRefType<_type>::type>::type>();\n        }\n        else if constexpr (std::is_pointer<_type>::value)\n        {\n            return *Reflection::GetPointerType<typename std::remove_const<typename std::remove_pointer<_type>::type>::type>();\n        }\n        else if constexpr (IsVector<_type>::value)\n        {\n            return *Reflection::GetVectorType<typename ExtractVectorElementType<_type>::type>();\n        }\n        else if constexpr (IsStringAccessor<_type>::value)\n        {\n            return *Reflection::GetAccessorType<typename _type::valueType, _type>();\n        }\n        else if constexpr (IsMap<_type>::value)\n        {\n            return *Reflection::GetMapType<typename ExtractMapKeyType<_type>::type, typename ExtractMapValueType<_type>::type>();\n        }\n        else if constexpr (IsProperty<_type>::value)\n        {\n            return *Reflection::GetPropertyType<typename _type::valueType, _type>();\n        }\n        else if constexpr (IsFundamental<_type>::value && !std::is_const<_type>::value)\n        {\n            return *FundamentalTypeContainer<_type>::type;\n        }\n        else if constexpr (std::is_enum<_type>::value && IsEnumReflectable<_type>::value)\n        {\n            return *EnumTypeContainer<_type>::type;\n        }\n        else if constexpr (IsSerializableFunction<_type>::value)\n        {\n            return *FunctionType::serializableType;\n        }\n        else if constexpr (IsFunction<_type>::value)\n        {\n            return *FunctionType::commonType;\n        }\n        else\n        {\n            return *Type::Dummy::type;\n        }\n    }\n\n#if defined PLATFORM_IOS || defined PLATFORM_MAC || defined PLATFORM_ANDROID\n#pragma GCC diagnostic pop\n#endif\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/DataValue.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"DataValue.h\"\n\n#include \"o2/Utils/FileSystem/FileSystem.h\"\n#include \"o2/Utils/Serialization/JsonDataFormat.h\"\n\n#include \"rapidjson/document.h\"\n\nnamespace o2\n{\n    DataValue::DataValue(DataDocument& document):\n        mDocument(&document), mData()\n    {\n        mData.flagsData.flags = Flags::Null;\n    }\n\n    DataValue::DataValue(const DataValue& other, DataDocument& document):\n        mData(), mDocument(&document)\n    {\n        if (other.IsObject())\n        {\n            for (auto memberIt = other.BeginMember(); memberIt != other.EndMember(); ++memberIt)\n            {\n                DataValue name(memberIt->name, *mDocument);\n                AddMember(name) = memberIt->value;\n            }\n        }\n        else if (other.IsArray())\n        {\n            for (auto element : other)\n            {\n                DataValue newElement(element, *mDocument);\n                AddElement(newElement);\n            }\n        }\n        else if (other.IsString())\n        {\n            SetString(other.GetString(), other.GetStringLength(), true);\n        }\n        else\n            mData = other.mData;\n    }\n\n    DataValue::DataValue(const DataValue& other):\n        DataValue(other, *other.mDocument)\n    {}\n\n    DataValue::DataValue() :\n        mData(), mDocument(nullptr)\n    {\n        mData.flagsData.flags = Flags::Null;\n    }\n\n    DataValue::DataValue(const char* string, int length, bool isCopy, DataDocument& document):\n        mData(), mDocument(&document)\n    {\n        SetString(string, length, isCopy);\n    }\n\n    DataValue::DataValue(DataValue&& other):\n        mDocument(other.mDocument), mData(other.mData)\n    {\n        other.mData.flagsData.flags = Flags::Null;\n    }\n\n    DataValue::DataValue(const char* stringRef):\n        mData(), mDocument(nullptr)\n    {\n        mData.flagsData.flags = Flags::String | Flags::StringRef;\n        mData.stringPtrData.stringPtr = const_cast<char*>(stringRef);\n        mData.stringPtrData.stringLength = strlen(stringRef);\n    }\n\n    bool DataValue::Transcode(rapidjson::GenericStringBuffer<rapidjson::UTF8<>>& target, const wchar_t* source)\n    {\n        rapidjson::GenericStringStream<rapidjson::UTF16<>> sourceStream(source);\n\n        bool hasError = false;\n        while (sourceStream.Peek() != '\\0')\n        {\n            if (!rapidjson::Transcoder<rapidjson::UTF16<>, rapidjson::UTF8<>>::Transcode(sourceStream, target))\n            {\n                hasError = true;\n                break;\n            }\n        }\n\n        return !hasError;\n    }\n\n    bool DataValue::Transcode(rapidjson::GenericStringBuffer<rapidjson::UTF16<>>& target, const char* source)\n    {\n        rapidjson::GenericStringStream<rapidjson::UTF8<>> sourceStream(source);\n\n        bool hasError = false;\n        while (sourceStream.Peek() != '\\0')\n        {\n            if (!rapidjson::Transcoder<rapidjson::UTF8<>, rapidjson::UTF16<>>::Transcode(sourceStream, target))\n            {\n                hasError = true;\n                break;\n            }\n        }\n\n        return !hasError;\n    }\n\n    DataValue::~DataValue()\n    {\n        // Not required, document's allocator does not require freeing memory\n    }\n\n    DataDocument& DataValue::GetDocument()\n    {\n        return *mDocument;\n    }\n\n    const DataDocument& DataValue::GetDocument() const\n    {\n        return *mDocument;\n    }\n\n    bool DataValue::IsValue() const\n    {\n        return mData.flagsData.Is(Flags::Value);\n    }\n\n    bool DataValue::IsNumber() const\n    {\n        return mData.flagsData.Is(Flags::Int) || mData.flagsData.Is(Flags::UInt) ||\n            mData.flagsData.Is(Flags::Int64) || mData.flagsData.Is(Flags::UInt64) ||\n            mData.flagsData.Is(Flags::Double);\n    }\n\n    bool DataValue::IsString() const\n    {\n        return mData.flagsData.Is(Flags::String);\n    }\n\n    bool DataValue::IsBoolean() const\n    {\n        return mData.flagsData.Is(Flags::Bool);\n    }\n\n    bool DataValue::IsNull() const\n    {\n        return mData.flagsData.Is(Flags::Null);\n    }\n\n    void DataValue::SetNull()\n    {\n        mData.flagsData.flags = Flags::Null;\n    }\n\n    void DataValue::SetString(const char* string, int length, bool isCopy)\n    {\n        if (isCopy)\n        {\n            if (length <= ShortStringData::maxLength)\n            {\n                memcpy(mData.shortStringData.stringValue, string, (length + 1)*sizeof(char));\n                mData.flagsData.flags = Flags::String | Flags::ShortString;\n            }\n            else\n            {\n                UInt64 size = length*sizeof(char);\n                mData.stringPtrData.stringPtr = (char*)mDocument->mAllocator.Allocate(size + 1);\n                memcpy(mData.stringPtrData.stringPtr, string, size);\n                mData.stringPtrData.stringPtr[size] = '\\0';\n                mData.stringPtrData.stringLength = (size_t)length;\n                mData.flagsData.flags = Flags::String | Flags::StringCopy;\n            }\n        }\n        else\n        {\n            mData.stringPtrData.stringPtr = const_cast<char*>(string);\n            mData.stringPtrData.stringLength = length;\n            mData.flagsData.flags = Flags::String | Flags::StringRef;\n        }\n    }\n\n    const char* DataValue::GetString() const\n    {\n        Assert(mData.flagsData.Is(Flags::String), \"Can't get string, value isn't string\");\n\n        if (mData.flagsData.Is(Flags::ShortString))\n            return mData.shortStringData.stringValue;\n\n        return mData.stringPtrData.stringPtr;\n    }\n\n    int DataValue::GetStringLength() const\n    {\n        Assert(mData.flagsData.Is(Flags::String), \"Can't get string length, value isn't string\");\n\n        if (mData.flagsData.Is(Flags::ShortString))\n            return strlen(mData.shortStringData.stringValue);\n\n        return (int)mData.stringPtrData.stringLength;\n    }\n\n    bool DataValue::IsArray() const\n    {\n        return mData.flagsData.Is(Flags::Array);\n    }\n\n    bool DataValue::IsObject() const\n    {\n        return mData.flagsData.Is(Flags::Object);\n    }\n\n    int DataValue::GetElementsCount() const\n    {\n        if (!IsArray())\n            return -1;\n\n        return mData.arrayData.count;\n    }\n\n    bool DataValue::operator!=(const DataValue& other) const\n    {\n        return !(*this == other);\n    }\n\n    bool DataValue::operator==(const DataValue& other) const\n    {\n        if (IsArray())\n        {\n            if (!other.IsArray())\n                return false;\n\n            if (GetElementsCount() != other.GetElementsCount())\n                return false;\n\n            for (int i = 0; i < GetElementsCount(); i++)\n            {\n                if (GetElement(i) != other.GetElement(i))\n                    return false;\n            }\n\n            return true;\n        }\n\n        if (IsObject())\n        {\n            if (!other.IsObject())\n                return false;\n\n            if (mData.objectData.count != other.mData.objectData.count)\n                return false;\n\n            for (auto memberIt = BeginMember(); memberIt != EndMember(); ++memberIt)\n            {\n                auto otherMember = other.FindMember(memberIt->name);\n                if (!otherMember || *otherMember != memberIt->value)\n                    return false;\n            }\n\n            return true;\n        }\n\n        if (IsString())\n        {\n            if (!other.IsString())\n                return false;\n\n            if (mData.flagsData.Is(Flags::StringRef) && other.mData.flagsData.Is(Flags::StringRef) &&\n                mData.stringPtrData.stringPtr == other.mData.stringPtrData.stringPtr)\n            {\n                return true;\n            }\n\n            return strcmp(GetString(), other.GetString()) == 0;\n        }\n\n        if (IsNumber())\n        {\n            if (mData.flagsData.Is(Flags::Double) || mData.flagsData.Is(Flags::Double))\n            {\n                double a, b;\n                Get(a); other.Get(b);\n                return a >= b && a <= b;\n            }\n            else if (mData.flagsData.Is(Flags::Int))\n                return (int)(*this) == (int)other;\n            else if (mData.flagsData.Is(Flags::UInt))\n                return (UInt)(*this) == (UInt)other;\n            else if (mData.flagsData.Is(Flags::Int64))\n                return (Int64)(*this) == (Int64)other;\n            else if (mData.flagsData.Is(Flags::UInt64))\n                return (UInt64)(*this) == (UInt64)other;\n\n            return false;\n        }\n\n        if (IsBoolean())\n            return other.IsBoolean() && (bool)(*this) == (bool)other;\n\n        if (IsNull())\n            return other.IsNull();\n\n        return false;\n    }\n\n    DataValue& DataValue::operator=(const DataValue& other)\n    {\n        Clear();\n\n        if (other.IsObject())\n        {\n            for (auto memberIt = other.BeginMember(); memberIt != other.EndMember(); ++memberIt)\n            {\n                DataValue name(memberIt->name, *mDocument);\n                AddMember(name) = memberIt->value;\n            }\n        }\n        else if (other.IsArray())\n        {\n            for (auto element : other)\n            {\n                DataValue newElement(element, *mDocument);\n                AddElement(newElement);\n            }\n        }\n        else if (other.IsString())\n        {\n            SetString(other.GetString(), other.GetStringLength(), true);\n        }\n        else\n            mData = other.mData;\n\n        return *this;\n    }\n\n    DataValue& DataValue::operator=(DataValue&& other)\n    {\n        mDocument = other.mDocument;\n        mData = other.mData;\n        other.mData.flagsData.flags = Flags::Null;\n        return *this;\n    }\n\n    DataValue& DataValue::operator[](const DataValue& name)\n    {\n        return GetMember(name);\n    }\n\n    DataValue& DataValue::operator[](const char* name)\n    {\n        return GetMember(name);\n    }\n\n    const DataValue& DataValue::operator[](const DataValue& name) const\n    {\n        return GetMember(name);\n    }\n\n    const DataValue& DataValue::operator[](const char* name) const\n    {\n        return GetMember(name);\n    }\n\n    int DataValue::GetMembersCount() const\n    {\n        if (!IsObject())\n            return 0;\n\n        return mData.objectData.count;\n    }\n\n    DataValue& DataValue::GetMember(const DataValue& name)\n    {\n        if (auto res = FindMember(name))\n            return *res;\n\n        DataValue t(name, *mDocument);\n        return AddMember(t);\n    }\n\n    const DataValue& DataValue::GetMember(const DataValue& name) const\n    {\n        if (auto res = FindMember(name))\n            return *res;\n\n        Assert(false, \"Can't find data member\");\n\n        static DataValue empty;\n        return empty;\n    }\n\n    DataValue& DataValue::GetMember(const char* name)\n    {\n        DataValue t(name);\n        return GetMember(t);\n    }\n\n    const DataValue& DataValue::GetMember(const char* name) const\n    {\n        return GetMember(DataValue(name));\n    }\n\n    DataValue* DataValue::FindMember(const DataValue& name)\n    {\n        if (!IsObject())\n            return nullptr;\n\n        for (auto memberIt = BeginMember(); memberIt != EndMember(); ++memberIt)\n        {\n            if (memberIt->name == name)\n                return &memberIt->value;\n        }\n\n        return nullptr;\n    }\n\n    const DataValue* DataValue::FindMember(const DataValue& name) const\n    {\n        if (!IsObject())\n            return nullptr;\n\n        for (auto memberIt = BeginMember(); memberIt != EndMember(); ++memberIt)\n        {\n            if (memberIt->name == name)\n                return &memberIt->value;\n        }\n\n        return nullptr;\n    }\n\n    DataValue* DataValue::FindMember(const char* name)\n    {\n        return FindMember(DataValue(name));\n    }\n\n    const DataValue* DataValue::FindMember(const char* name) const\n    {\n        return FindMember(DataValue(name));\n    }\n\n    void DataValue::SetObject()\n    {\n        if (IsObject())\n            return;\n\n        mData.flagsData.flags = Flags::Object;\n\n        mData.objectData.members = (DataMember*)mDocument->mAllocator.Allocate(sizeof(DataMember)*ObjectInitialCapacity);\n        mData.objectData.capacity = ObjectInitialCapacity;\n        mData.objectData.count = 0;\n    }\n\n    DataValue& DataValue::AddMember(DataValue& name)\n    {\n        SetObject();\n\n        if (mData.objectData.count == mData.objectData.capacity)\n        {\n            if (mData.objectData.members)\n            {\n                UInt newCapacity = Math::Max(mData.objectData.capacity*2, ObjectInitialCapacity);\n                mData.objectData.members = (DataMember*)mDocument->mAllocator.Reallocate(\n                    mData.objectData.members, sizeof(DataMember)*mData.objectData.capacity,\n                    sizeof(DataMember)*newCapacity);\n\n                mData.objectData.capacity = newCapacity;\n            }\n            else\n            {\n                mData.objectData.members = (DataMember*)mDocument->mAllocator.Allocate(sizeof(DataMember)*ObjectInitialCapacity);\n                mData.objectData.capacity = ObjectInitialCapacity;\n            }\n        }\n\n        DataValue value(*mDocument);\n\n        DataMember* newMember =\n            new (mData.objectData.members + mData.objectData.count) DataMember(name, value);\n\n        mData.objectData.count++;\n\n        return newMember->value;\n    }\n\n    DataValue& DataValue::AddMember(const char* name)\n    {\n        DataValue nameValue(name, *mDocument);\n        return AddMember(nameValue);\n    }\n\n    void DataValue::RemoveMember(const DataValue& name)\n    {\n        Assert(IsObject(), \"Trying remove member, but value isn't object\");\n\n        for (auto memberIt = BeginMember(); memberIt != EndMember(); ++memberIt)\n        {\n            if (memberIt->name == name)\n            {\n                *memberIt = *(mData.objectData.members + mData.objectData.count - 1);\n                mData.objectData.count--;\n                break;\n            }\n        }\n    }\n\n    DataMemberIterator DataValue::RemoveMember(DataMemberIterator it)\n    {\n        Assert(IsObject(), \"Trying remove member, but value isn't object\");\n        Assert(it >= BeginMember() && it < EndMember(), \"Iterator is invalid\");\n\n        *it = *(mData.objectData.members + mData.objectData.count - 1);\n        mData.objectData.count--;\n\n        return it;\n    }\n\n    void DataValue::RemoveMember(const char* name)\n    {\n        RemoveMember(DataValue(name));\n    }\n\n    DataMemberIterator DataValue::BeginMember()\n    {\n        Assert(IsObject(), \"Trying get member iterator, but value isn't object\");\n        return DataMemberIterator(mData.objectData.members);\n    }\n\n    ConstDataMemberIterator DataValue::BeginMember() const\n    {\n        Assert(IsObject(), \"Trying get member iterator, but value isn't object\");\n        return ConstDataMemberIterator(mData.objectData.members);\n    }\n\n    DataMemberIterator DataValue::EndMember()\n    {\n        Assert(IsObject(), \"Trying get member iterator, but value isn't object\");\n        return DataMemberIterator(mData.objectData.members + mData.objectData.count);\n    }\n\n    ConstDataMemberIterator DataValue::EndMember() const\n    {\n        Assert(IsObject(), \"Trying get member iterator, but value isn't object\");\n        return ConstDataMemberIterator(mData.objectData.members + mData.objectData.count);\n    }\n\n    DataValue& DataValue::operator[](const int idx)\n    {\n        return GetElement(idx);\n    }\n\n    DataValue& DataValue::GetElement(int idx)\n    {\n        Assert(IsArray(), \"Trying get element, but value isn't array\");\n        Assert(idx >= 0 && idx < (int)mData.arrayData.count, \"Index is out of range\");\n        return mData.arrayData.elements[idx];\n    }\n\n    const DataValue& DataValue::GetElement(int idx) const\n    {\n        Assert(IsArray(), \"Trying get element, but value isn't array\");\n        Assert(idx >= 0 && idx < (int)mData.arrayData.count, \"Index is out of range\");\n        return mData.arrayData.elements[idx];\n    }\n\n    void DataValue::SetArray()\n    {\n        if (IsArray())\n            return;\n\n        mData.flagsData.flags = Flags::Array;\n\n        mData.arrayData.elements = (DataValue*)mDocument->mAllocator.Allocate(sizeof(DataValue)*ArrayInitialCapacity);\n        mData.arrayData.capacity = ArrayInitialCapacity;\n        mData.arrayData.count = 0;\n    }\n\n    DataValue& DataValue::AddElement(DataValue& value)\n    {\n        DataValue& newElement = AddElement();\n        newElement = std::move(value);\n        return newElement;\n    }\n\n    DataValue& DataValue::AddElement()\n    {\n        SetArray();\n\n        if (mData.arrayData.count == mData.arrayData.capacity)\n        {\n            UInt newCapacity = Math::Max(mData.arrayData.capacity*2, ArrayInitialCapacity);\n            mData.arrayData.elements = (DataValue*)mDocument->mAllocator.Reallocate(\n                mData.arrayData.elements, sizeof(DataValue)*mData.arrayData.capacity,\n                sizeof(DataValue)*newCapacity);\n            mData.arrayData.capacity = newCapacity;\n        }\n\n        DataValue* newElement =\n            new (mData.arrayData.elements + mData.arrayData.count) DataValue(*mDocument);\n\n        mData.arrayData.count++;\n\n        return *newElement;\n    }\n\n    DataValue* DataValue::RemoveElement(DataValue* it)\n    {\n        Assert(IsArray(), \"Trying get element, but value isn't array\");\n        Assert(it >= Begin() && it < End(), \"Iterator is invalid\");\n\n        *it = *(mData.arrayData.elements + mData.arrayData.count - 1);\n        mData.arrayData.count--;\n\n        return it;\n    }\n\n    DataValue* DataValue::Begin()\n    {\n        Assert(IsArray(), \"Trying get element iterator, but value isn't array\");\n        return mData.arrayData.elements;\n    }\n\n    const DataValue* DataValue::Begin() const\n    {\n        Assert(IsArray(), \"Trying get element iterator, but value isn't array\");\n        return mData.arrayData.elements;\n    }\n\n    DataValue* DataValue::End()\n    {\n        Assert(IsArray(), \"Trying get element iterator, but value isn't array\");\n        return mData.arrayData.elements + mData.arrayData.count;\n    }\n\n    const DataValue* DataValue::End() const\n    {\n        Assert(IsArray(), \"Trying get element iterator, but value isn't array\");\n        return mData.arrayData.elements + mData.arrayData.count;\n    }\n\n    DataValue* DataValue::begin()\n    {\n        Assert(IsArray(), \"Trying get element iterator, but value isn't array\");\n        return mData.arrayData.elements;\n    }\n\n    const DataValue* DataValue::begin() const\n    {\n        Assert(IsArray(), \"Trying get element iterator, but value isn't array\");\n        return mData.arrayData.elements;\n    }\n\n    DataValue* DataValue::end()\n    {\n        Assert(IsArray(), \"Trying get element iterator, but value isn't array\");\n        return mData.arrayData.elements + mData.arrayData.count;\n    }\n\n    const DataValue* DataValue::end() const\n    {\n        Assert(IsArray(), \"Trying get element iterator, but value isn't array\");\n        return mData.arrayData.elements + mData.arrayData.count;\n    }\n\n    bool DataValue::IsEmpty() const\n    {\n        if (IsObject())\n            return mData.objectData.count == 0;\n\n        if (IsArray())\n            return mData.arrayData.count == 0;\n\n        return true;\n    }\n\n    void DataValue::Clear()\n    {\n        if (IsObject())\n            mData.objectData.count = 0;\n        else if (IsArray())\n            mData.arrayData.count = 0;\n        else\n            mData.flagsData.flags = Flags::Null;\n    }\n\n    DataDocument::DataDocument():\n        DataValue(*this), mAllocator()\n    {}\n\n    DataDocument::DataDocument(const DataDocument& other) :\n        DataValue(*this), mAllocator()\n    {\n\t\t*this = other;\n    }\n\n    DataDocument::DataDocument(DataDocument&& other) :\n        DataValue(other, *this), mAllocator(other.mAllocator)\n    {}\n\n    DataDocument::~DataDocument()\n    {\n        mAllocator.Clear();\n    }\n\n    bool DataDocument::operator!=(const DataDocument& other) const\n    {\n        return DataValue::operator!=(other);\n    }\n\n    bool DataDocument::operator==(const DataDocument& other) const\n    {\n        return DataValue::operator==(other);\n    }\n\n    DataDocument& DataDocument::operator=(const DataDocument& other)\n    {\n        DataValue::operator=(static_cast<const DataValue&>(other));\n        return *this;\n    }\n\n    DataDocument& DataDocument::operator=(DataDocument&& other)\n    {\n        DataValue::operator=(static_cast<DataValue&&>(other));\n        mAllocator = other.mAllocator;\n        return *this;\n    }\n\n    bool DataDocument::LoadFromFile(const String& fileName, Format format /*= Format::JSON*/)\n    {\n        InFile file(fileName);\n        if (!file.IsOpened())\n            return false;\n\n        auto size = file.GetDataSize();\n        char* data = (char*)mAllocator.Allocate(size);\n        file.ReadData(data, size);\n\n        if (format == Format::JSON)\n            return ParseJsonInplace(data, *this);\n\n        return false;\n    }\n\n    bool DataDocument::LoadFromData(const String& data, Format format /*= Format::JSON*/)\n    {\n        if (format == Format::JSON)\n            return ParseJson(data.Data(), *this);\n\n        return false;\n    }\n\n    bool DataDocument::SaveToFile(const String& fileName, Format format /*= Format::JSON*/) const\n    {\n        String data = SaveAsString(format);\n\n        if (!o2FileSystem.IsFolderExist(o2FileSystem.GetParentPath(fileName)))\n            o2FileSystem.FolderCreate(o2FileSystem.GetParentPath(fileName));\n\n        OutFile file(fileName);\n        if (!file.IsOpened())\n            return false;\n\n        file.WriteData(data.Data(), data.Length());\n\n        return false;\n    }\n\n    String DataDocument::SaveAsString(Format format /*= Format::JSON*/) const\n    {\n        if (format == Format::JSON)\n        {\n            String buf;\n            WriteJson(buf, *this);\n            return buf;\n        }\n\n        return \"\";\n        //return XmlDataFormat::SaveDataDoc(*this);\n    }\n\n    DataValue::Flags operator&(const DataValue::Flags& a, const DataValue::Flags& b)\n    {\n        return static_cast<DataValue::Flags>(\n            static_cast<std::underlying_type<DataValue::Flags>::type>(a) &\n            static_cast<std::underlying_type<DataValue::Flags>::type>(b));\n    }\n\n    DataValue::Flags operator|(const DataValue::Flags& a, const DataValue::Flags& b)\n    {\n        return static_cast<DataValue::Flags>(\n            static_cast<std::underlying_type<DataValue::Flags>::type>(a) |\n            static_cast<std::underlying_type<DataValue::Flags>::type>(b));\n    }\n\n    DataMember::DataMember(DataValue& name, DataValue& value):\n        name(name), value(value)\n    {}\n\n    DataMember& DataMember::operator=(DataMember& other)\n    {\n        name = other.name;\n        value = other.value;\n        return *this;\n    }\n\n    bool DataMember::operator==(const DataMember& other) const\n    {\n        return name == other.name && value == other.value;\n    }\n\n    bool DataMember::operator!=(const DataMember& other) const\n    {\n        return !(*this == other);\n    }\n\n}\n// --- META ---\n\nENUM_META(o2::DataValue::Flags, o2__DataValue__Flags)\n{\n    ENUM_ENTRY(Bool);\n}\nEND_ENUM_META;\n\nENUM_META(o2::DataDocument::Format, o2__DataDocument__Format)\n{\n    ENUM_ENTRY(Binary);\n    ENUM_ENTRY(JSON);\n    ENUM_ENTRY(Xml);\n}\nEND_ENUM_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/DataValue.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Memory/Allocators/ChunkPoolAllocator.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2/Utils/Types/UID.h\"\n\n#include \"rapidjson/stream.h\"\n#include \"rapidjson/stringbuffer.h\"\n#include \"rapidjson/encodings.h\"\n\nnamespace o2\n{\n    class ISerializable;\n\n    class DataDocument;\n    struct DataMember;\n\n    template <bool _const>\n    class BaseMemberIterator;\n\n    typedef BaseMemberIterator<false> DataMemberIterator;\n    typedef BaseMemberIterator<true> ConstDataMemberIterator;\n\n    // ----------------------------------------------\n    // DOM value. Contains value, or array, or object\n    // ----------------------------------------------\n    class DataValue\n    {\n    protected:\n        // Specialize this template class for your custom serialization types\n        template<typename _type, typename _enable = void>\n        struct Converter\n        {\n            static constexpr bool isSupported = false;\n            using __type = typename std::conditional<std::is_same<void, _type>::value, int, _type>::type;\n\n            static void Write(const __type& value, DataValue& data) {}\n            static void Read(__type& value, const DataValue& data) {}\n        };\n\n        // Specialize this template class for your custom serialization types with DELTA\n        template<typename _type, typename _enable = void>\n        struct DeltaConverter\n        {\n            static constexpr bool isSupported = Converter<_type>::isSupported;\n            using __type = typename std::conditional<std::is_same<void, _type>::value, int, _type>::type;\n\n            static void Write(const __type& value, const __type& origin, DataValue& data);\n            static void Read(__type& value, const __type& origin, const DataValue& data);\n        };\n\n    public:\n        // Is DataValue supporting type trait\n        template<typename _type>\n        struct IsSupports\n        {\n            static constexpr bool value = Converter<_type>::isSupported;\n        };\n\n        // Is DataValue supporting delta type trait\n        template<typename _type>\n        struct IsSupportsDelta\n        {\n            static constexpr bool value = DeltaConverter<_type>::isSupported;\n        };\n\n    public:\n        // Default constructor\n        DataValue(DataDocument& document);\n\n        // Constructor as template value\n        template<typename _type>\n        DataValue(const _type& value, DataDocument& document);\n\n        // Constructor as string value\n        DataValue(const char* string, int length, bool isCopy, DataDocument& document);\n\n        // Copy-constructor with same document\n        DataValue(const DataValue& other);\n\n        // Copy-constructor with another document\n        DataValue(const DataValue& other, DataDocument& document);\n\n        // Move-constructor\n        DataValue(DataValue&& other);\n\n        // Destructor\n        ~DataValue();\n\n        // Copy operator\n        DataValue& operator=(const DataValue& other);\n\n        // Move operator\n        DataValue& operator=(DataValue&& other);\n\n        // Equals operator\n        bool operator==(const DataValue& other) const;\n\n        // Not equals operator\n        bool operator!=(const DataValue& other) const;\n\n        // Returns data document reference\n        DataDocument& GetDocument();\n\n        // Returns data document reference\n        const DataDocument& GetDocument() const;\n\n    public:    // Value methods\n        // Checks is value type\n        bool IsValue() const;\n\n        // Checks is value number type\n        bool IsNumber() const;\n\n        // Checks is value string value\n        bool IsString() const;\n\n        // Checks is value boolean\n        bool IsBoolean() const;\n\n        // Checks is value null\n        bool IsNull() const;\n\n        // Cast to type operator\n        template<typename _type>\n        operator _type() const;\n\n        // Assign operator\n        template<typename _type>\n        DataValue& operator=(const _type& value);\n\n        // Sets value. Using DataValue::Converter specializations\n        template<typename _type>\n        DataValue& Set(const _type& value);\n\n        // Gets value. Using DataValue::Converter specializations\n        template<typename _type>\n        void Get(_type& value) const;\n\n        // Sets value. Using DataValue::DeltaConverter specializations\n        template<typename _type>\n        DataValue& SetDelta(const _type& value, const _type& origin);\n\n        // Gets value. Using DataValue::DeltaConverter specializations\n        template<typename _type>\n        void GetDelta(_type& value, const _type& origin) const;\n\n        // Sets value as null\n        void SetNull();\n\n        // Optimized set string. When isCopy is false, string pointer can be used as reference\n        void SetString(const char* string, int length, bool isCopy);\n\n        // Returns string pointer\n        const char* GetString() const;\n\n        // Returns string length\n        int GetStringLength() const;\n\n    public: // Array methods\n        // Checks value is array\n        bool IsArray() const;\n\n        // Sets data value type as array\n        void SetArray();\n\n        // Returns array elements count\n        int GetElementsCount() const;\n\n        // Array element access by index\n        DataValue& operator[](const int idx);\n\n        // Array methods\n        // Returns element by index\n        DataValue& GetElement(int idx);\n\n        // Returns element by index\n        const DataValue& GetElement(int idx) const;\n\n        // Adds element to array\n        DataValue& AddElement(DataValue& value);\n\n        // Adds element to array\n        DataValue& AddElement();\n\n        // Adds element to array\n        DataValue* RemoveElement(DataValue* it);\n\n        // Begin array iterator\n        DataValue* Begin();\n\n        // Begin array const iterator\n        const DataValue* Begin() const;\n\n        // End array iterator\n        DataValue* End();\n\n        // End array const iterator\n        const DataValue* End() const;\n\n        // Begin array iterator for range based for\n        DataValue* begin();\n\n        // Begin array const iterator for range based for\n        const DataValue* begin() const;\n\n        // End array iterator for range based for\n        DataValue* end();\n\n        // End array const iterator for range based for\n        const DataValue* end() const;\n\n    public: // Object methods        \n        // Checks value is object\n        bool IsObject() const;\n\n        // Sets data value type as object\n        void SetObject();\n\n        // Member access by name. Valid only for object type\n        DataValue& operator[](const DataValue& name);\n\n        // Member access by name. Valid only for object type\n        DataValue& operator[](const char* name);\n\n        // Member access by name. Valid only for object type\n        const DataValue& operator[](const DataValue& name) const;\n\n        // Member access by name. Valid only for object type\n        const DataValue& operator[](const char* name) const;\n\n        // Returns members count\n        int GetMembersCount() const;\n\n        // Returns node by name. Creates new nodes when required\n        DataValue& GetMember(const DataValue& name);\n\n        // Returns node by name. Creates new nodes when required\n        DataValue& GetMember(const char* name);\n\n        // Returns node by name.\n        const DataValue& GetMember(const DataValue& name) const;\n\n        // Returns node by name.\n        const DataValue& GetMember(const char* name) const;\n\n        // Returns node by name.\n        DataValue* FindMember(const DataValue& name);\n\n        // Returns node by name.\n        DataValue* FindMember(const char* name);\n\n        // Returns node by name.\n        const DataValue* FindMember(const DataValue& name) const;\n\n        // Returns node by name.\n        const DataValue* FindMember(const char* name) const;\n\n        // Add new node with name\n        DataValue& AddMember(DataValue& name);\n\n        // Add new node with name\n        DataValue& AddMember(const char* name);\n\n        // Removes node by name\n        void RemoveMember(const DataValue& name);\n\n        // Removes node by name\n        void RemoveMember(const char* name);\n\n        // Removes member\n        DataMemberIterator RemoveMember(DataMemberIterator it);\n\n        // Begin array iterator\n        DataMemberIterator BeginMember();\n\n        // Begin array const iterator\n        ConstDataMemberIterator BeginMember() const;\n\n        // End array iterator\n        DataMemberIterator EndMember();\n\n        // End array const iterator\n        ConstDataMemberIterator EndMember() const;\n\n    public:\n        // Returns is node data empty and have no members or elements\n        bool IsEmpty() const;\n\n        // Removes all members or elements\n        void Clear();\n\n        // Writes data to writer\n        template <typename _writer>\n        void Write(_writer& writer) const;\n\n    public:\n        enum class Flags\n        {\n            Bool = 1 << 0,\n            Int = 1 << 1,\n            UInt = 1 << 2,\n            Int64 = 1 << 3,\n            UInt64 = 1 << 4,\n            Double = 1 << 5,\n            Value = 1 << 6,\n            String = 1 << 7,\n            Object = 1 << 8,\n            Array = 1 << 9,\n            Null = 1 << 10,\n\n            BoolTrue = 1 << 11,\n            BoolFalse = 1 << 12,\n\n            ShortString = 1 << 13,\n            StringRef = 1 << 14,\n            StringCopy = 1 << 15\n        };\n\n    protected:\n        static constexpr UInt DataPayloadSize = 16;\n        static constexpr UInt DataSize = DataPayloadSize + sizeof(Flags);\n\n        static constexpr UInt ObjectInitialCapacity = 7;\n        static constexpr UInt ArrayInitialCapacity = 7;\n\n        struct IntData\n        {\n            int intValue;\n            UInt uintValue;\n            Byte padding[DataPayloadSize - sizeof(int)];\n        };\n\n        struct Int64Data\n        {\n            Int64 intValue;\n            UInt64 uintValue;\n            Byte padding[DataPayloadSize - sizeof(Int64)];\n        };\n\n        struct DoubleData\n        {\n            double value;\n            Byte padding[DataPayloadSize - sizeof(double)];\n        };\n\n        struct StringPtrData\n        {\n            char* stringPtr;\n            size_t stringLength;\n        };\n\n        struct ShortStringData\n        {\n            static constexpr int maxLength = DataPayloadSize / sizeof(Byte) - 1;\n            char stringValue[maxLength + 1];\n        };\n\n        struct ValueTypeData\n        {\n            Byte padding[DataPayloadSize];\n            Flags flags;\n\n            inline bool Is(Flags f) const\n            {\n                return static_cast<Flags>(\n                    static_cast<std::underlying_type<Flags>::type>(flags) &\n                    static_cast<std::underlying_type<Flags>::type>(f)) == f;\n            }\n        };\n\n        struct ObjectData\n        {\n            DataMember* members;\n            UInt count;\n            UInt capacity;\n        };\n\n        struct ArrayData\n        {\n            DataValue* elements;\n            UInt count;\n            UInt capacity;\n        };\n\n        union ValueData\n        {\n            IntData         intData;\n            Int64Data       int64Data;\n            DoubleData      doubleData;\n            StringPtrData   stringPtrData;\n            ShortStringData shortStringData;\n            ObjectData      objectData;\n            ArrayData       arrayData;\n\n            ValueTypeData flagsData;\n        };\n\n        ValueData     mData;\n        DataDocument* mDocument;\n\n    protected:\n        // Hidden constructor without document\n        DataValue();\n\n        // Constructor temporary string reference\n        explicit DataValue(const char* stringRef);\n\n        // Transcode wide char to char\n        static bool Transcode(rapidjson::GenericStringBuffer<rapidjson::UTF8<>>& target, const wchar_t* source);\n\n        // Transcode char to wide char\n        static bool Transcode(rapidjson::GenericStringBuffer<rapidjson::UTF16<>>& target, const char* source);\n\n        friend class JsonDataDocumentParseHandler;\n\n        template<typename T>\n        friend class TType;\n    };\n\n    // ------------------------------------------\n    // Data values document. Must be object value\n    // ------------------------------------------\n    class DataDocument : public DataValue\n    {\n    public:\n        enum class Format { Xml, JSON, Binary };\n\n    public:\n        // Default constructor\n        DataDocument();\n\n        // Copy-constructor\n        DataDocument(const DataDocument& other);\n\n        // Move-constructor\n        DataDocument(DataDocument&& other);\n\n        // Destructor\n        ~DataDocument();\n\n        // Copy-operator. \n        DataDocument& operator=(const DataDocument& other);\n\n        // Move-operator\n        DataDocument& operator=(DataDocument&& other);\n\n        // Equals operator\n        bool operator==(const DataDocument& other) const;\n\n        // Not equals operator\n        bool operator!=(const DataDocument& other) const;\n\n        operator std::nullptr_t() const = delete;\n\n        // Cast to type operator\n        template<typename _type>\n        operator _type() const;\n\n        // Assign operator\n        template<typename _type>\n        DataDocument& operator=(const _type& value);\n\n        // Loads data structure from file\n        bool LoadFromFile(const String& fileName, Format format = Format::JSON);\n\n        // Loads data structure from string\n        bool LoadFromData(const String& data, Format format = Format::JSON);\n\n        // Saves data to file with specified format\n        bool SaveToFile(const String& fileName, Format format = Format::JSON) const;\n\n        // Saves data to string\n        String SaveAsString(Format format = Format::JSON) const;\n\n    protected:\n        ChunkPoolAllocator mAllocator;\n\n        friend class DataValue;\n        friend class JsonDataDocumentParseHandler;\n    };\n\n    // --------------------------------------------\n    // Data object value member. Has name and value\n    // --------------------------------------------\n    struct DataMember\n    {\n        DataValue name;\n        DataValue value;\n\n        DataMember(DataValue& name, DataValue& value);\n\n        DataMember& operator=(DataMember& other);\n\n        bool operator==(const DataMember& other) const;\n        bool operator!=(const DataMember& other) const;\n    };\n\n    // -------------------------\n    // Base data member iterator\n    // -------------------------\n    template <bool _const>\n    class BaseMemberIterator\n    {\n        typedef typename std::conditional<_const, const DataMember, DataMember>::type DataMemberType;\n\n    public:\n        typedef DataMemberType value_type;\n        typedef DataMemberType* pointer;\n        typedef DataMemberType& reference;\n        typedef std::ptrdiff_t difference_type;\n        typedef std::random_access_iterator_tag iterator_category;\n\n    public:\n        BaseMemberIterator() {}\n        BaseMemberIterator(const BaseMemberIterator<true>& other) : mPointer(other.mPointer) {}\n\n        operator bool() const { return mPointer != nullptr; }\n\n        BaseMemberIterator<_const>& operator=(const BaseMemberIterator<true>& other) { mPointer = other.mPointer; return *this; }\n\n        int operator-(BaseMemberIterator<true> other) const { return mPointer - other.mPointer; }\n\n        BaseMemberIterator<_const>& operator++() { ++mPointer; return *this; }\n        BaseMemberIterator<_const>& operator--() { --mPointer; return *this; }\n        BaseMemberIterator<_const>  operator++(int) { BaseMemberIterator<_const> old(*this); ++mPointer; return old; }\n        BaseMemberIterator<_const>  operator--(int) { BaseMemberIterator<_const> old(*this); --mPointer; return old; }\n\n        BaseMemberIterator<_const> operator+(int n) const { return Iterator(mPointer + n); }\n        BaseMemberIterator<_const> operator-(int n) const { return Iterator(mPointer - n); }\n\n        BaseMemberIterator<_const>& operator+=(int n) { mPointer += n; return *this; }\n        BaseMemberIterator<_const>& operator-=(int n) { mPointer -= n; return *this; }\n\n        template <bool _const_> bool operator==(const BaseMemberIterator<_const_>& other) const { return mPointer == other.mPointer; }\n        template <bool _const_> bool operator!=(const BaseMemberIterator<_const_>& other) const { return mPointer != other.mPointer; }\n        template <bool _const_> bool operator<=(const BaseMemberIterator<_const_>& other) const { return mPointer <= other.mPointer; }\n        template <bool _const_> bool operator>=(const BaseMemberIterator<_const_>& other) const { return mPointer >= other.mPointer; }\n        template <bool _const_> bool operator< (const BaseMemberIterator<_const_>& other) const { return mPointer < other.mPointer; }\n        template <bool _const_> bool operator> (const BaseMemberIterator<_const_>& other) const { return mPointer > other.mPointer; }\n\n        DataMemberType& operator*() const { return *mPointer; }\n        DataMemberType* operator->() const { return mPointer; }\n        DataMemberType& operator[](int n) const { return mPointer[n]; }\n\n        bool IsValid() const { return mPointer != nullptr; }\n\n    private:\n        explicit BaseMemberIterator(DataMemberType* p) : mPointer(p) {}\n\n    private:\n        DataMemberType* mPointer = nullptr;\n\n        friend class DataValue;\n    };\n\n    template<typename _type, typename _enable = void>\n    struct IsDeltaEquals\n    {\n        static bool Check(const _type& obj, const _type& origin);\n    };\n\n    template<typename T>\n    struct IsDeltaEquals<T, typename std::void_t<decltype(&T::EqualsDelta)>>\n    {\n        static bool Check(const T& obj, const T& origin)\n        {\n            return T::EqualsDelta(obj, origin);\n        }\n    };\n\n    template<typename T>\n    bool EqualsForDeltaSerialize(const T& obj, const T& origin)\n    {\n        return IsDeltaEquals<T>::Check(obj, origin);\n    }\n\n    DataValue::Flags operator&(const DataValue::Flags& a, const DataValue::Flags& b);\n    DataValue::Flags operator|(const DataValue::Flags& a, const DataValue::Flags& b);\n}\n\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Property.h\"\n\nnamespace o2\n{\n    template<typename _type, typename _enable>\n    bool IsDeltaEquals<_type, _enable>::Check(const _type& obj, const _type& origin)\n    {\n        if constexpr (SupportsEqualOperator<_type>::value)\n            return Math::Equals(obj, origin);\n        else\n            return false;\n    }\n\n    template<typename _type>\n    DataValue::DataValue(const _type& value, DataDocument& document) :\n        mData(), mDocument(&document)\n    {\n        Set(value);\n    }\n\n    template<typename _type>\n    void DataValue::Get(_type& value) const\n    {\n        Converter<_type>::Read(value, *this);\n    }\n\n    template<typename _type>\n    DataValue& DataValue::Set(const _type& value)\n    {\n        Converter<_type>::Write(value, *this);\n        return *this;\n    }\n\n    template<typename _type>\n    void DataValue::GetDelta(_type& value, const _type& origin) const\n    {\n        DeltaConverter<_type>::Read(value, origin, *this);\n    }\n\n    template<typename _type>\n    DataValue& DataValue::SetDelta(const _type& value, const _type& origin)\n    {\n        DeltaConverter<_type>::Write(value, origin, *this);\n        return *this;\n    }\n\n    template<typename _type>\n    DataValue::operator _type() const\n    {\n        _type result = _type();\n        Get(result);\n        return result;\n    }\n\n    template<typename _type>\n    DataValue& DataValue::operator=(const _type& value)\n    {\n        Set(value);\n        return *this;\n    }\n\n    template <typename _writer>\n    void DataValue::Write(_writer& writer) const\n    {\n        if (IsObject())\n        {\n            writer.StartObject();\n\n            for (auto it = BeginMember(); it != EndMember(); ++it)\n            {\n                writer.Key(it->name.GetString(), it->name.GetStringLength(), it->name.mData.flagsData.Is(Flags::StringCopy));\n                it->value.Write(writer);\n            }\n\n            writer.EndObject(mData.objectData.count);\n        }\n        else if (IsArray())\n        {\n            writer.StartArray();\n\n            for (auto it = Begin(); it != End(); ++it)\n                it->Write(writer);\n\n            writer.EndArray(mData.arrayData.count);\n        }\n        else if (IsString())\n        {\n            writer.String(GetString(), GetStringLength(), mData.flagsData.Is(Flags::StringCopy));\n        }\n        else if (mData.flagsData.Is(Flags::Int))\n        {\n            writer.Int(mData.intData.intValue);\n        }\n        else if (mData.flagsData.Is(Flags::UInt))\n        {\n            writer.Uint(mData.intData.uintValue);\n        }\n        else if (mData.flagsData.Is(Flags::Int64))\n        {\n            writer.Int64(mData.int64Data.intValue);\n        }\n        else if (mData.flagsData.Is(Flags::UInt64))\n        {\n            writer.Uint64(mData.int64Data.uintValue);\n        }\n        else if (mData.flagsData.Is(Flags::Double))\n        {\n            writer.Double(mData.doubleData.value);\n        }\n        else if (mData.flagsData.Is(Flags::BoolTrue))\n        {\n            writer.Bool(true);\n        }\n        else if (mData.flagsData.Is(Flags::BoolFalse))\n        {\n            writer.Bool(false);\n        }\n        else\n        {\n            writer.Null();\n        }\n    }\n\n    template<typename _type>\n    DataDocument& DataDocument::operator=(const _type& value)\n    {\n        DataValue::operator=(value);\n        return *this;\n    }\n\n    template<typename _type>\n    DataDocument::operator _type() const\n    {\n        _type result = _type();\n        Get(result);\n        return result;\n    }\n}\n\n#include \"o2/Utils/Serialization/DataValueConverters.h\"\n// --- META ---\n\nPRE_ENUM_META(o2::DataValue::Flags);\n\nPRE_ENUM_META(o2::DataDocument::Format);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/DataValueConverters.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Debug/Debug.h\"\n\nnamespace o2\n{\n    template<>\n    struct DataValue::Converter<std::nullptr_t>\n    {\n        static constexpr bool isSupported = false;\n    };\n\n    template<>\n    struct DataValue::Converter<char*>\n    {\n        static constexpr bool isSupported = true;\n\n        using charPtr = char*;\n\n        static void Write(const charPtr& value, DataValue& data)\n        {\n            data.SetString(value, (int)strlen(value), true);\n        }\n\n        static void Read(charPtr& value, const DataValue& data)\n        {\n            Assert(data.mData.flagsData.Is(DataValue::Flags::String), \"Trying get string from not string value\");\n\n            if (data.mData.flagsData.Is(DataValue::Flags::ShortString))\n            {\n                strcpy(value, data.mData.shortStringData.stringValue);\n            }\n            else\n            {\n                auto length = data.mData.stringPtrData.stringLength;\n                memcpy(value, data.mData.stringPtrData.stringPtr, sizeof(char) * length);\n                value[length] = '\\0';\n            }\n        }\n    };\n\n    template<UInt _size>\n    struct DataValue::Converter<char[_size]>\n    {\n        static constexpr bool isSupported = true;\n\n        using charPtr = char[_size];\n\n        static void Write(const charPtr& value, DataValue& data)\n        {\n            data.SetString(value, _size, true);\n        }\n\n        static void Read(charPtr& value, const DataValue& data)\n        {\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<const char*>\n    {\n        static constexpr bool isSupported = true;\n\n        using charPtr = const char*;\n\n        static void Write(const charPtr& value, DataValue& data)\n        {\n            data.SetString(value, (int)strlen(value), true);\n        }\n\n        static void Read(charPtr& value, const DataValue& data)\n        {\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<wchar_t*>\n    {\n        static constexpr bool isSupported = true;\n\n        using wcharPtr = wchar_t*;\n\n        static void Write(const wcharPtr& value, DataValue& data)\n        {\n            rapidjson::GenericStringBuffer<rapidjson::UTF8<>> target;\n            if (Transcode(target, value))\n                data.Set(target.GetString());\n        }\n\n        static void Read(wcharPtr value, const DataValue& data)\n        {\n            rapidjson::GenericStringBuffer<rapidjson::UTF16<>> target;\n            if (Transcode(target, data.GetString()))\n                wcscpy(value, target.GetString());\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<const wchar_t*>\n    {\n        static constexpr bool isSupported = true;\n\n        using wcharPtr = const wchar_t*;\n\n        static void Write(const wcharPtr& value, DataValue& data)\n        {\n            rapidjson::GenericStringBuffer<rapidjson::UTF8<>> target;\n            if (Transcode(target, value))\n                data.Set(target.GetString());\n        }\n\n        static void Read(wcharPtr value, const DataValue& data)\n        {\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<bool>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const bool& value, DataValue& data)\n        {\n            if (value)\n                data.mData.flagsData.flags = DataValue::Flags::Bool | DataValue::Flags::BoolTrue;\n            else\n                data.mData.flagsData.flags = DataValue::Flags::Bool | DataValue::Flags::BoolFalse;\n        }\n\n        static void Read(bool& value, const DataValue& data)\n        {\n            value = data.mData.flagsData.Is(DataValue::Flags::Bool) && data.mData.flagsData.Is(DataValue::Flags::BoolTrue);\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<int>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const int& value, DataValue& data)\n        {\n            data.mData.flagsData.flags = Flags::Int | Flags::Value;\n            data.mData.intData.intValue = value;\n        }\n\n        static void Read(int& value, const DataValue& data)\n        {\n            if (data.mData.flagsData.Is(Flags::Int))\n                value = data.mData.intData.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt))\n                value = (int)data.mData.intData.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Int64))\n                value = (int)data.mData.int64Data.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt64))\n                value = (int)data.mData.int64Data.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Double))\n                value = (int)data.mData.doubleData.value;\n            else\n                Assert(false, \"Trying to get int from not number value\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<UInt>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const UInt& value, DataValue& data)\n        {\n            data.mData.flagsData.flags = Flags::UInt | Flags::Value;\n            data.mData.intData.uintValue = value;\n        }\n\n        static void Read(UInt& value, const DataValue& data)\n        {\n            if (data.mData.flagsData.Is(Flags::UInt))\n                value = data.mData.intData.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Int))\n                value = (UInt)data.mData.intData.intValue;\n            else if (data.mData.flagsData.Is(Flags::Int64))\n                value = (UInt)data.mData.int64Data.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt64))\n                value = (UInt)data.mData.int64Data.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Double))\n                value = (UInt)data.mData.doubleData.value;\n            else\n                Assert(false, \"Trying to get unsigned int from not number value\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<Int64>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Int64& value, DataValue& data)\n        {\n            data.mData.flagsData.flags = Flags::Int64 | Flags::Value;\n            data.mData.int64Data.intValue = value;\n        }\n\n        static void Read(Int64& value, const DataValue& data)\n        {\n            if (data.mData.flagsData.Is(Flags::Int64))\n                value = data.mData.int64Data.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt64))\n                value = (Int64)data.mData.int64Data.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Int))\n                value = (Int64)data.mData.intData.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt))\n                value = (Int64)data.mData.intData.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Double))\n                value = (Int64)data.mData.doubleData.value;\n            else\n                Assert(false, \"Trying to get int64 from not number value\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<UInt64>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const UInt64& value, DataValue& data)\n        {\n            data.mData.flagsData.flags = Flags::UInt64 | Flags::Value;\n            data.mData.int64Data.uintValue = value;\n        }\n\n        static void Read(UInt64& value, const DataValue& data)\n        {\n            if (data.mData.flagsData.Is(Flags::UInt64))\n                value = data.mData.int64Data.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Int64))\n                value = (UInt64)data.mData.int64Data.intValue;\n            else if (data.mData.flagsData.Is(Flags::Int))\n                value = (UInt64)data.mData.intData.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt))\n                value = (UInt64)data.mData.intData.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Double))\n                value = (UInt64)data.mData.doubleData.value;\n            else\n                Assert(false, \"Trying to get unsigned int64 from not number value\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<double>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const double& value, DataValue& data)\n        {\n            data.mData.flagsData.flags = Flags::Double | Flags::Value;\n            data.mData.doubleData.value = value;\n        }\n\n        static void Read(double& value, const DataValue& data)\n        {\n            if (data.mData.flagsData.Is(Flags::Double))\n                value = data.mData.doubleData.value;\n            else if (data.mData.flagsData.Is(Flags::Int))\n                value = (double)data.mData.intData.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt))\n                value = (double)data.mData.intData.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Int64))\n                value = (double)data.mData.int64Data.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt64))\n                value = (double)data.mData.int64Data.uintValue;\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<float>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const float& value, DataValue& data)\n        {\n            data.mData.flagsData.flags = Flags::Double | Flags::Value;\n            data.mData.doubleData.value = (double)value;\n        }\n\n        static void Read(float& value, const DataValue& data)\n        {\n            if (data.mData.flagsData.Is(Flags::Double))\n                value = (float)data.mData.doubleData.value;\n            else if (data.mData.flagsData.Is(Flags::Int))\n                value = (float)data.mData.intData.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt))\n                value = (float)data.mData.intData.uintValue;\n            else if (data.mData.flagsData.Is(Flags::Int64))\n                value = (float)data.mData.int64Data.intValue;\n            else if (data.mData.flagsData.Is(Flags::UInt64))\n                value = (float)data.mData.int64Data.uintValue;\n            else\n                Assert(false, \"Trying to get float from not number value\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<String>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const String& value, DataValue& data)\n        {\n            data.SetString(value.Data(), value.Length(), true);\n        }\n\n        static void Read(String& value, const DataValue& data)\n        {\n            Assert(data.mData.flagsData.Is(DataValue::Flags::String), \"Trying get string from not string value\");\n\n            if (data.mData.flagsData.Is(DataValue::Flags::ShortString))\n                value = data.mData.shortStringData.stringValue;\n            else\n                value = data.mData.stringPtrData.stringPtr;\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<WString>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const WString& value, DataValue& data)\n        {\n            data.Set(value.Data());\n        }\n\n        static void Read(WString& value, const DataValue& data)\n        {\n            rapidjson::GenericStringBuffer<rapidjson::UTF16<>> target;\n            if (Transcode(target, data.GetString()))\n                value = target.GetString();\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<UID>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const UID& value, DataValue& data)\n        {\n            data.Set((WString)value);\n        }\n\n        static void Read(UID& value, const DataValue& data)\n        {\n            WString buf;\n            data.Get(buf);\n            value = buf;\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<Vec2F>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Vec2F& value, DataValue& data)\n        {\n            data.AddMember(\"x\") = value.x;\n            data.AddMember(\"y\") = value.y;\n        }\n\n        static void Read(Vec2F& value, const DataValue& data)\n        {\n            value.x = data.GetMember(\"x\");\n            value.y = data.GetMember(\"y\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<Vec2I>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Vec2I& value, DataValue& data)\n        {\n            data.AddMember(\"x\") = value.x;\n            data.AddMember(\"y\") = value.y;\n        }\n\n        static void Read(Vec2I& value, const DataValue& data)\n        {\n            value.x = data.GetMember(\"x\");\n            value.y = data.GetMember(\"y\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<RectF>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const RectF& value, DataValue& data)\n        {\n            data.AddMember(\"left\") = value.left;\n            data.AddMember(\"bottom\") = value.bottom;\n            data.AddMember(\"right\") = value.right;\n            data.AddMember(\"top\") = value.top;\n        }\n\n        static void Read(RectF& value, const DataValue& data)\n        {\n            value.left = data.GetMember(\"left\");\n            value.bottom = data.GetMember(\"bottom\");\n            value.right = data.GetMember(\"right\");\n            value.top = data.GetMember(\"top\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<RectI>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const RectI& value, DataValue& data)\n        {\n            data.AddMember(\"left\") = value.left;\n            data.AddMember(\"bottom\") = value.bottom;\n            data.AddMember(\"right\") = value.right;\n            data.AddMember(\"top\") = value.top;\n        }\n\n        static void Read(RectI& value, const DataValue& data)\n        {\n            value.left = data.GetMember(\"left\");\n            value.bottom = data.GetMember(\"bottom\");\n            value.right = data.GetMember(\"right\");\n            value.top = data.GetMember(\"top\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<BorderF>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const BorderF& value, DataValue& data)\n        {\n            data.AddMember(\"left\") = value.left;\n            data.AddMember(\"bottom\") = value.bottom;\n            data.AddMember(\"right\") = value.right;\n            data.AddMember(\"top\") = value.top;\n        }\n\n        static void Read(BorderF& value, const DataValue& data)\n        {\n            value.left = data.GetMember(\"left\");\n            value.bottom = data.GetMember(\"bottom\");\n            value.right = data.GetMember(\"right\");\n            value.top = data.GetMember(\"top\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<BorderI>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const BorderI& value, DataValue& data)\n        {\n            data.AddMember(\"left\") = value.left;\n            data.AddMember(\"bottom\") = value.bottom;\n            data.AddMember(\"right\") = value.right;\n            data.AddMember(\"top\") = value.top;\n        }\n\n        static void Read(BorderI& value, const DataValue& data)\n        {\n            value.left = data.GetMember(\"left\");\n            value.bottom = data.GetMember(\"bottom\");\n            value.right = data.GetMember(\"right\");\n            value.top = data.GetMember(\"top\");\n        }\n    };\n\n    template<>\n    struct DataValue::Converter<Color4>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Color4& value, DataValue& data)\n        {\n            data.AddMember(\"r\") = value.r;\n            data.AddMember(\"g\") = value.g;\n            data.AddMember(\"b\") = value.b;\n            data.AddMember(\"a\") = value.a;\n        }\n\n        static void Read(Color4& value, const DataValue& data)\n        {\n            value.r = data.GetMember(\"r\");\n            value.g = data.GetMember(\"g\");\n            value.b = data.GetMember(\"b\");\n            value.a = data.GetMember(\"a\");\n        }\n    };\n\n    template<typename TKey, typename TValue>\n    struct DataValue::Converter<Pair<TKey, TValue>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Pair<TKey, TValue>& value, DataValue& data)\n        {\n            data.AddMember(\"f\") = value.first;\n            data.AddMember(\"s\") = value.second;\n        }\n\n        static void Read(Pair<TKey, TValue>& value, const DataValue& data)\n        {\n            data.GetMember(\"f\").Get(value.first);\n            data.GetMember(\"s\").Get(value.second);\n        }\n    };\n\n    // ---------------------\n    // Ref<Actor> types converter\n    // ---------------------\n    template<typename T>\n    struct DataValue::Converter<T, typename std::enable_if<IsRef<T>::value && !std::is_const<T>::value &&\n        !std::is_base_of<ISerializable, T>::value&&\n        std::is_base_of<o2::IObject, typename ExtractRefType<T>::type>::value>::type>\n    {\n        static constexpr bool isSupported = true;\n\n        using _ref_type = typename ExtractRefType<T>::type;\n\n        static void Write(const T& value, DataValue& data)\n        {\n            if (value)\n            {\n                data.AddMember(\"Type\").Set(value->GetType().GetName());\n                data.AddMember(\"Value\").Set(*value);\n            }\n        }\n\n        static void Read(T& value, const DataValue& data)\n        {\n            if (auto typeNode = data.FindMember(\"Type\"))\n            {\n                if (auto valueNode = data.FindMember(\"Value\"))\n                {\n                    String typeName = *typeNode;\n                    auto type = Reflection::GetType(typeName);\n                    if (!type)\n                    {\n                        printf(\"Failed to deserialize unknown type: %s\\n\", typeName.Data());\n                        return;\n                    }\n\n                    auto sample = type->CreateSampleRef();\n                    value = DynamicCast<_ref_type>(sample);\n\n                    if (value)\n                        valueNode->Get(*value);\n                }\n            }\n        }\n    };\n\n    // ----------------------\n    // Raw pointers converter\n    // ----------------------\n    template<typename T>\n    struct DataValue::Converter<T, typename std::enable_if<std::is_pointer<T>::value && !std::is_const<T>::value &&\n        std::is_base_of<o2::IObject, typename std::remove_pointer<T>::type>::value && !std::is_same<T, std::nullptr_t>::value>::type>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const T& value, DataValue& data)\n        {\n            if (value)\n            {\n                data.AddMember(\"Type\").Set(value->GetType().GetName());\n                data.AddMember(\"Value\").Set(*value);\n            }\n        }\n\n        static void Read(T& value, const DataValue& data)\n        {\n            if (auto typeNode = data.FindMember(\"Type\"))\n            {\n                if (auto valueNode = data.FindMember(\"Value\"))\n                {\n                    if (value)\n                        delete value;\n\n                    String typeName = *typeNode;\n                    auto type = Reflection::GetType( typeName );\n                    if (!type)\n                    {\n                        printf(\"Failed to deserialize unknown type: %s\\n\", typeName.Data());\n                        return;\n                    }\n\n                    void* sample = type->CreateSample();\n                    if (type->GetUsage() == Type::Usage::Object)\n                    {\n                        auto objectType = dynamic_cast<const ObjectType*>(type);\n                        value = dynamic_cast<T>(objectType->DynamicCastToIObject(sample));\n                    }\n                    else\n                        value = static_cast<T>(sample);\n\n                    if (value)\n                        valueNode->Get(*value);\n                }\n            }\n        }\n    };\n\n    template<typename T>\n    struct DataValue::Converter<Vector<T>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Vector<T>& value, DataValue& data)\n        {\n            data.mData.flagsData.flags = Flags::Array;\n            data.mData.arrayData.elements = nullptr;\n            data.mData.arrayData.count = 0;\n            data.mData.arrayData.capacity = 0;\n\n            for (auto& v : value)\n                data.AddElement() = DataValue(v, *data.mDocument);\n        }\n\n        static void Read(Vector<T>& value, const DataValue& data)\n        {\n            if (data.IsArray())\n            {\n                value.Clear();\n                for (auto& element : data)\n                {\n                    T v = T();\n                    element.Get(v);\n                    value.Add(v);\n                }\n            }\n        }\n    };\n\n    template<typename _key, typename _value>\n    struct DataValue::Converter<Map<_key, _value>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Map<_key, _value>& value, DataValue& data)\n        {\n            data.mData.flagsData.flags = Flags::Array;\n            data.mData.arrayData.elements = nullptr;\n            data.mData.arrayData.count = 0;\n            data.mData.arrayData.capacity = 0;\n\n            for (auto& kv : value)\n            {\n                DataValue& child = data.AddElement();\n                child.AddMember(\"Key\").Set(kv.first);\n                child.AddMember(\"Value\").Set(kv.second);\n            }\n        }\n\n        static void Read(Map<_key, _value>& value, const DataValue& data)\n        {\n            if (data.IsArray())\n            {\n                value.Clear();\n                for (auto& childNode : data)\n                {\n                    auto keyNode = childNode.FindMember(\"Key\");\n                    auto valueNode = childNode.FindMember(\"Value\");\n\n                    if (keyNode && valueNode)\n                    {\n                        _value v = _value();\n                        _key k = _key();\n                        keyNode->Get(k);\n                        valueNode->Get(v);\n                        value.Add(k, v);\n                    }\n                }\n            }\n        }\n    };\n\n    // ---------------\n    // Enums converter\n    // ---------------\n    template<typename T>\n    struct DataValue::Converter<T, std::enable_if_t<std::is_enum_v<T>>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const T& value, DataValue& data)\n        {\n            data.Set(Reflection::GetEnumName<T>(value));\n        }\n\n        static void Read(T& value, const DataValue& data)\n        {\n            String buf;\n            data.Get(buf);\n            value = Reflection::GetEnumValue<T>(buf);\n        }\n    };\n\n    template<typename T>\n    struct DataValue::Converter<T, std::enable_if_t<IsProperty<T>::value>>\n    {\n        static constexpr bool isSupported = DataValue::IsSupports<typename T::valueType>::value;\n        using TValueType = typename T::valueType;\n\n        static void Write(const T& value, DataValue& data)\n        {\n            data.Set(value.Get());\n        }\n\n        static void Read(T& value, const DataValue& data)\n        {\n            TValueType val;\n            data.Get(val);\n            value.Set(val);\n        }\n    };\n\n    template<typename _type, typename _enable /*= void*/>\n    void DataValue::DeltaConverter<_type, _enable>::Write(const __type& value, const __type& origin, DataValue& data)\n    {\n        if (!EqualsForDeltaSerialize(value, origin))\n            data.Set(value);\n    }\n\n    template<typename _type, typename _enable /*= void*/>\n    void DataValue::DeltaConverter<_type, _enable>::Read(__type& value, const __type& origin, const DataValue& data)\n    {\n        data.Get(value);\n    }\n\n    template<typename T>\n    struct DataValue::DeltaConverter<T, std::enable_if_t<std::is_pointer_v<T> && !std::is_const_v<T> &&\n                                                         std::is_base_of_v<o2::IObject, std::remove_pointer_t<T>>>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const T& value, const T& origin, DataValue& data)\n        {\n            if (value)\n            {\n                if (!origin)\n                    DataValue::Converter<T>::Write(value, data);\n                else\n                {\n                    if (!EqualsForDeltaSerialize(*value, *origin))\n                        data.SetDelta(*value, *origin);\n                }\n            }\n        }\n\n        static void Read(T& value, const T& origin, const DataValue& data)\n        {\n            if (!origin)\n                DataValue::Converter<T>::Read(value, data);\n            else\n            {\n                value = origin->template CloneAs<typename std::remove_pointer<T>::type>();\n                data.GetDelta(*value, *origin);\n            }\n        }\n    };\n\n    template<typename T>\n    struct DataValue::DeltaConverter<Vector<T>>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const Vector<T>& value, const Vector<T>& origin, DataValue& data)\n        {\n            data.mData.flagsData.flags = Flags::Array;\n            data.mData.arrayData.elements = nullptr;\n            data.mData.arrayData.count = 0;\n            data.mData.arrayData.capacity = 0;\n\n            for (int i = 0; i < value.Count(); i++)\n            {\n                if (i < origin.Count())\n                {\n                    if (EqualsForDeltaSerialize(value[i], origin[i]))\n                        data.AddElement();\n                    else\n                        data.AddElement().SetDelta(value[i], origin[i]);\n                }\n                else\n                    data.AddElement().SetDelta(value[i], origin[i]);\n            }\n        }\n\n        static void Read(Vector<T>& value, const Vector<T>& origin, const DataValue& data)\n        {\n            if (data.IsArray())\n            {\n                value.Clear();\n                int i = 0;\n                for (auto& element : data)\n                {\n                    T v = T();\n                    if (element.IsNull() && i < origin.Count())\n                        v = origin[i];\n                    else\n                        element.GetDelta(v, origin[i]);\n\n                    value.Add(v);\n\n                    i++;\n                }\n            }\n        }\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/JsonDataFormat.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"JsonDataFormat.h\"\n\n#include \"rapidjson/reader.h\"\n#include \"rapidjson/writer.h\"\n#include \"rapidjson/prettywriter.h\"\n\nnamespace o2\n{\n    bool ParseJsonInplace(char* str, DataDocument& document)\n    {\n        JsonDataDocumentParseHandler handler(document);\n        rapidjson::Reader reader;\n        rapidjson::InsituStringStream stream(str);\n        auto result = reader.Parse<rapidjson::kParseInsituFlag | rapidjson::kParseStopWhenDoneFlag>(stream, handler);\n        if (!result.IsError())\n        {\n            (DataValue&)document = std::move(*handler.stack.Pop<DataValue>());\n            return true;\n        }\n\n        return false;\n    }\n\n    bool ParseJson(const char* str, DataDocument& document)\n    {\n        JsonDataDocumentParseHandler handler(document);\n        rapidjson::Reader reader;\n        rapidjson::StringStream stream(str);\n        auto result = reader.Parse(stream, handler);\n        if (!result.IsError())\n        {\n            (DataValue&)document = std::move(*handler.stack.Pop<DataValue>());\n            return true;\n        }\n\n        return false;\n    }\n\n    void WriteJson(String& str, const DataDocument& document)\n    {\n        rapidjson::StringBuffer buffer;\n        rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buffer);\n        document.Write(writer);\n        str = buffer.GetString();\n    }\n\n    JsonDataDocumentParseHandler::JsonDataDocumentParseHandler(DataDocument& document):\n        document(document), stack(sizeof(DataValue)*16)\n    {}\n\n    bool JsonDataDocumentParseHandler::Null()\n    {\n        new (stack.template Push<DataValue>()) DataValue(document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::Bool(bool value)\n    {\n        new (stack.template Push<DataValue>()) DataValue(value, document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::Int(int value)\n    {\n        new (stack.template Push<DataValue>()) DataValue(value, document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::Uint(unsigned value)\n    {\n        new (stack.template Push<DataValue>()) DataValue(value, document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::Int64(int64_t value)\n    {\n        new (stack.template Push<DataValue>()) DataValue(value, document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::Uint64(uint64_t value)\n    {\n        new (stack.template Push<DataValue>()) DataValue((UInt64)value, document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::Double(double value)\n    {\n        new (stack.template Push<DataValue>()) DataValue(value, document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::String(const char* str, unsigned length, bool copy)\n    {\n        new (stack.template Push<DataValue>()) DataValue(str, length, copy, document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::RawNumber(const char* str, unsigned length, bool copy)\n    {\n        return String(str, length, copy);\n    }\n\n    bool JsonDataDocumentParseHandler::StartObject()\n    {\n        new (stack.template Push<DataValue>()) DataValue(document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::Key(const char* str, unsigned length, bool copy)\n    {\n        String(str, length, copy);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::EndObject(unsigned memberCount)\n    {\n        DataMember* members = stack.template Pop<DataMember>(memberCount);\n        DataValue* top = stack.template Top<DataValue>();\n\n        top->mData.flagsData.flags = DataValue::Flags::Object;\n        if (memberCount != 0)\n        {\n            size_t size = sizeof(DataMember)*memberCount;\n            top->mData.objectData.members = (DataMember*)document.mAllocator.Allocate(size);\n            memcpy(top->mData.objectData.members, members, size);\n        }\n        else\n            top->mData.objectData.members = nullptr;\n\n        top->mData.objectData.count = memberCount;\n        top->mData.objectData.capacity = memberCount;\n\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::StartArray()\n    {\n        new (stack.template Push<DataValue>()) DataValue(document);\n        return true;\n    }\n\n    bool JsonDataDocumentParseHandler::EndArray(unsigned elementCount)\n    {\n        DataValue* elements = stack.template Pop<DataValue>(elementCount);\n        DataValue* top = stack.template Top<DataValue>();\n\n        top->mData.flagsData.flags = DataValue::Flags::Array;\n        if (elementCount != 0)\n        {\n            size_t size = sizeof(DataValue)*elementCount;\n            top->mData.arrayData.elements = (DataValue*)document.mAllocator.Allocate(size);\n            memcpy(top->mData.arrayData.elements, elements, size);\n        }\n        else\n            top->mData.arrayData.elements = nullptr;\n\n        top->mData.arrayData.count = elementCount;\n        top->mData.arrayData.capacity = elementCount;\n\n        return true;\n    }\n\n}"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/JsonDataFormat.h",
    "content": "#pragma once\n#include \"DataValue.h\"\n#include \"o2/Utils/Memory/Allocators/StackAllocator.h\"\n\nnamespace o2\n{\n    // Parses json document into DataDocument. It uses \"Insitu\" parse method: all strings will be referenced to buffer\n    bool ParseJsonInplace(char* str, DataDocument& document);\n\n    // Parses json document into DataDocumen\n    bool ParseJson(const char* str, DataDocument& document);\n\n    // Writes data into json string\n    void WriteJson(String& str, const DataDocument& document);\n\n    // -------------------------------------------------------------------\n    // Json data document parser handler. Build DataDocument DOM structure\n    // -------------------------------------------------------------------\n    class JsonDataDocumentParseHandler\n    {\n    public:\n        DataDocument& document;\n\n        StackAllocator stack;\n\n    public:\n        JsonDataDocumentParseHandler(DataDocument& document);\n\n        bool Null();\n        bool Bool(bool value);\n        bool Int(int value);\n        bool Uint(unsigned value);\n        bool Int64(int64_t value);\n        bool Uint64(uint64_t value);\n        bool Double(double value);\n        bool String(const char* str, unsigned length, bool copy);\n        bool RawNumber(const char* str, unsigned length, bool copy);\n        bool StartObject();\n        bool Key(const char* str, unsigned length, bool copy);\n        bool EndObject(unsigned memberCount);\n        bool StartArray();\n        bool EndArray(unsigned elementCount);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/Serializable.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Serializable.h\"\n\nnamespace o2\n{\n    String ISerializable::SerializeToString() const\n    {\n        DataDocument doc;\n        Serialize(doc);\n        return doc.SaveAsString();\n    }\n\n    void ISerializable::DeserializeFromString(const String& str)\n    {\n        DataDocument doc;\n        doc.LoadFromData(str);\n        Deserialize(doc);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ISerializable, o2__ISerializable);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/Serializable.h",
    "content": "\n#pragma once\n\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/ValueProxy.h\"\n\nnamespace o2\n{\n    // -----------------------------\n    // Serializable object interface\n    // -----------------------------\n    class ISerializable: public IObject\n    {\n    public:\n        // Serializing object into data node\n        virtual void Serialize(DataValue& node) const {}\n\n        // Deserializing object from data node\n        virtual void Deserialize(const DataValue& node) {};\n\n        // Serializing object delta from origin into data node\n        virtual void SerializeDelta(DataValue& node, const IObject& origin) const {}\n\n        // Deserializing object delta from origin from data node\n        virtual void DeserializeDelta(const DataValue& node, const IObject& origin) {};\n\n        // Serializes data to string\n        String SerializeToString() const;\n\n        // Deserializes data from string\n        void DeserializeFromString(const String& str);\n\n        // Assign operator from data node\n        ISerializable& operator=(const DataValue& node) { return *this; };\n\n        // DataDocument converting operator\n        explicit operator DataDocument() const { return DataDocument(); }\n\n        IOBJECT(ISerializable);\n\n    protected:\n        // Serializing object into data node\n        virtual void SerializeBasic(DataValue& node) const {}\n\n        // Deserializing object from data node\n        virtual void DeserializeBasic(const DataValue& node) {}\n\n        // Serializing object into data node\n        virtual void SerializeDeltaBasic(DataValue& node, const IObject& origin) const {}\n\n        // Deserializing object from data node\n        virtual void DeserializeDeltaBasic(const DataValue& node, const IObject& origin) {}\n\n        // Beginning serialization callback\n        virtual void OnSerialize(DataValue& node) const {}\n\n        // Completion deserialization callback\n        virtual void OnDeserialized(const DataValue& node) {}\n\n        // Beginning serialization delta callback\n        virtual void OnSerializeDelta(DataValue& node, const IObject& origin) const {}\n\n        // Completion deserialization delta callback\n        virtual void OnDeserializedDelta(const DataValue& node, const IObject& origin) {}\n\n        friend class SerializeTypeProcessor;\n        friend class DeserializeTypeProcessor;\n        template<typename> friend class SerializeDeltaTypeProcessor;\n        template<typename> friend class DeserializeDeltaTypeProcessor;\n        template<typename, typename> friend struct CheckSerializeDeltaBasicOverridden;\n        template<typename, typename> friend struct CheckDeserializeDeltaBasicOverridden;\n    };\n\n    template<typename T>\n    struct DataValue::Converter<T, typename std::enable_if<std::is_base_of<ISerializable, T>::value>::type>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const T& value, DataValue& data)\n        {\n            data.SetObject();\n            value.Serialize(data);\n        }\n\n        static void Read(T& value, const DataValue& data)\n        {\n            value.Deserialize(data);\n        }\n    };\n\n    template<typename T>\n    struct DataValue::DeltaConverter<T, typename std::enable_if<std::is_base_of<ISerializable, T>::value>::type>\n    {\n        static constexpr bool isSupported = true;\n\n        static void Write(const T& value, const T& origin, DataValue& data)\n        {\n            value.SerializeDelta(data, dynamic_cast<const IObject&>(origin));\n        }\n\n        static void Read(T& value, const T& origin, const DataValue& data)\n        {\n            value.DeserializeDelta(data, dynamic_cast<const IObject&>(origin));\n        }\n    };\n\n    template<typename _type, typename _enable = void>\n    struct CheckSerializeBasicOverridden\n    {\n        // Default serialization way\n        static void Process(_type* object, DataValue& node)\n        {\n            object->SerializeBasic(node);\n            object->OnSerialize(node);\n        }\n    };\n\n    template<typename T>\n    struct CheckSerializeBasicOverridden<T, typename std::void_t<decltype(&T::SerializeBasicOverride)>>\n    {\n        // Using overridden function\n        static void Process(T* object, DataValue& node)\n        {\n            object->SerializeBasicOverride(node);\n        }\n    };\n\n    template<typename _type, typename _enable = void>\n    struct CheckDeserializeBasicOverridden\n    {\n        // Default serialization way\n        static void Process(_type* object, const DataValue& node)\n        {\n            object->DeserializeBasic(node);\n            object->OnDeserialized(node);\n        }\n    };\n\n    template<typename T>\n    struct CheckDeserializeBasicOverridden<T, typename std::void_t<decltype(&T::DeserializeBasicOverride)>>\n    {\n        // Using overridden function\n        static void Process(T* object, const DataValue& node)\n        {\n            object->DeserializeBasicOverride(node);\n        }\n    };\n\n    template<typename _type, typename _enable = void>\n    struct CheckSerializeDeltaBasicOverridden\n    {\n        // Default serialization way\n        static void Process(_type* object, const _type* origin, const IObject& originObj, DataValue& node)\n        {\n            object->SerializeDeltaBasic(node, originObj);\n            if constexpr (std::is_convertible_v<_type*, ISerializable*>)\n                static_cast<ISerializable*>(object)->OnSerializeDelta(node, originObj);\n        }\n    };\n\n    template<typename T>\n    struct CheckSerializeDeltaBasicOverridden<T, typename std::void_t<decltype(&T::SerializeDeltaBasicOverride)>>\n    {\n        // Using overridden function\n        static void Process(T* object, const T* origin, const IObject& originObj, DataValue& node)\n        {\n            object->SerializeDeltaBasicOverride(node, *origin);\n        }\n    };\n\n    template<typename _type, typename _enable = void>\n    struct CheckDeserializeDeltaBasicOverridden\n    {\n        // Default serialization way\n        static void Process(_type* object, const _type* origin, const IObject& originObj, const DataValue& node)\n        {\n            object->DeserializeDeltaBasic(node, originObj);\n            if constexpr (std::is_convertible_v<_type*, ISerializable*>)\n                static_cast<ISerializable*>(object)->OnDeserializedDelta(node, originObj);\n        }\n    };\n\n    template<typename T>\n    struct CheckDeserializeDeltaBasicOverridden<T, typename std::void_t<decltype(&T::DeserializeDeltaBasicOverride)>>\n    {\n        // Using overridden function\n        static void Process(T* object, const T* origin, const IObject& originObj, const DataValue& node)\n        {\n            object->DeserializeDeltaBasicOverride(node, *origin);\n        }\n    };\n\n    // ----------------------------\n    // Serializable field attribute\n    // ----------------------------\n    class SerializableAttribute: public IAttribute\n    {\n    public:\n        ATTRIBUTE_COMMENT_DEFINITION(\"SERIALIZABLE\");\n        ATTRIBUTE_SHORT_DEFINITION(\"SERIALIZABLE_ATTRIBUTE\");\n\n    public:\n        static constexpr bool hasSerializeFieldProcessor = true;\n        static constexpr bool hasDeserializeFieldProcessor = true;\n\n        template<typename _base, typename _type>\n        struct SerializeDefaultProcessorMixin: public _base\n        {\n            _type defaultValue;\n\n            SerializeDefaultProcessorMixin(const _base& base, const _type& defaultValue):\n                _base(base), defaultValue(defaultValue) {}\n\n            template<typename _object_type, typename _field_type>\n            bool CheckSerialize(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                _field_type& field)\n            {\n                _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n                return *fieldPtr != defaultValue;\n            }\n\n            template<typename _object_type, typename _field_type>\n            auto& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                              _field_type& field)\n            {\n                if (!CheckSerialize(object, type, name, pointerGetter, field))\n                    return *this;\n\n                _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n                _base::node.AddMember(name).Set(*fieldPtr);\n\n                return *this;\n            }\n        };\n\n        template<typename _base>\n        struct SerializeFieldProcessor: public _base\n        {\n            SerializeFieldProcessor(const _base& base): _base(base) {}\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return _base::template AddAttributeImpl<SerializeFieldProcessor<_base>, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            auto SetDefaultValue(const _type& value)\n            {\n                return SerializeDefaultProcessorMixin<SerializeFieldProcessor<_base>, _type>(*this, value);\n            }\n\n            template<typename _object_type, typename _field_type>\n            bool CheckSerialize(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                _field_type& field)\n            {\n                if (!_base::CheckSerialize(object, type, name, pointerGetter, field))\n                    return false;\n\n                if constexpr (std::is_default_constructible<_field_type>::value && SupportsEqualOperator<_field_type>::value)\n                {\n                    _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n                    if (Math::Equals(*fieldPtr, _field_type()))\n                        return false;\n                }\n\n                return true;\n            }\n\n            template<typename _object_type, typename _field_type>\n            auto& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                              _field_type& field)\n            {\n                if (!CheckSerialize(object, type, name, pointerGetter, field))\n                    return *this;\n\n                _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n                _base::node.AddMember(name).Set(*fieldPtr);\n\n                return *this;\n            }\n        };\n\n        template<typename _base>\n        struct DeserializeFieldProcessor: public _base\n        {\n            DeserializeFieldProcessor(const _base& base): _base(base) {}\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return _base::template AddAttributeImpl<DeserializeFieldProcessor<_base>, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            auto& SetDefaultValue(const _type& value)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            auto& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                              _field_type& field)\n            {\n                _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n\n                if (auto m = _base::node.FindMember(name))\n                    m->Get(*fieldPtr);\n\n                return *this;\n            }\n        };\n\n        template<typename _base>\n        struct SerializeDeltaFieldProcessor: public _base\n        {\n            SerializeDeltaFieldProcessor(const _base& base):_base(base) {}\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return _base::template AddAttributeImpl<SerializeDeltaFieldProcessor<_base>, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            auto& SetDefaultValue(const _type& value)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            bool CheckSerialize(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                _field_type& field)\n            {\n                if (!_base::CheckSerialize(object, type, name, pointerGetter, field))\n                    return false;\n\n                if constexpr (SupportsEqualOperator<_field_type>::value)\n                {\n                    _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n                    _field_type* originFieldPtr = (_field_type*)((*pointerGetter)(&const_cast<_object_type&>(_base::origin)));\n\n                    if (EqualsForDeltaSerialize(*fieldPtr, *originFieldPtr))\n                        return false;\n                }\n\n                return true;\n            }\n\n            template<typename _object_type, typename _field_type>\n            auto& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                                 _field_type& field)\n            {\n                if (!CheckSerialize(object, type, name, pointerGetter, field))\n                    return *this;\n\n                _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n                _field_type* originFieldPtr = (_field_type*)((*pointerGetter)(&const_cast<_object_type&>(_base::origin)));\n\n                DataValue& member = _base::node.AddMember(name);\n                member.SetDelta(*fieldPtr, *originFieldPtr);\n                if (member.IsNull())\n                    _base::node.RemoveMember(name);\n\n                return *this;\n            }\n        };\n\n        template<typename _base>\n        struct DeserializeDeltaFieldProcessor: public _base\n        {\n            DeserializeDeltaFieldProcessor(const _base& base):_base(base) {}\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return _base::template AddAttributeImpl<DeserializeDeltaFieldProcessor<_base>, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            auto& SetDefaultValue(const _type& value)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            auto& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                                   _field_type& field)\n            {\n                _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n                _field_type* originFieldPtr = (_field_type*)((*pointerGetter)(&const_cast<_object_type&>(_base::origin)));\n\n                if (auto m = _base::node.FindMember(name); m && !m->IsNull())\n                    m->GetDelta(*fieldPtr, *originFieldPtr);\n                else\n                {\n                    _field_type* originFieldPtr = (_field_type*)((*pointerGetter)(&const_cast<_object_type&>(_base::origin)));\n                    if constexpr (std::is_pointer<_field_type>::value &&\n                                  std::is_copy_constructible<typename std::remove_pointer<_field_type>::type>::value)\n                    {\n                        if (*originFieldPtr != nullptr)\n                        {\n                            typedef typename std::remove_pointer<_field_type>::type _field_type_unp;\n                            if constexpr (IsCloneable<_field_type_unp>::value)\n                            {\n                                if constexpr (std::is_same<typename std::invoke_result<decltype(&_field_type_unp::Clone)()>::type, _field_type>::value)\n                                    *fieldPtr = (*originFieldPtr)->Clone();\n                                else\n                                    *fieldPtr = dynamic_cast<_field_type>((*originFieldPtr)->Clone());\n                            }\n                            else\n                                *fieldPtr = mnew typename std::remove_pointer<_field_type>::type(**originFieldPtr);\n                        }\n                    }\n                    else\n                    {\n                        *fieldPtr = *originFieldPtr;\n                    }\n                }\n\n                return *this;\n            }\n        };\n    };\n\n    // ----------------------------------\n    // Serialize with condition attribute\n    // ----------------------------------\n    class ISerializeIfAttribute: public IAttribute\n    {\n    public:\n        virtual bool Invoke(const void* object) const = 0;\n    };\n\n\n    template<typename _class>\n    class SerializeIfAttribute: public ISerializeIfAttribute\n    {\n        ATTRIBUTE_COMMENT_DEFINITION(\"SERIALIZE_IF\");\n        ATTRIBUTE_SHORT_DEFINITION(\"SERIALIZE_IF_ATTRIBUTE\");\n\n    public:\n        bool(_class::*functionPtr)() const;\n\n        SerializeIfAttribute(bool(_class::*functionPtr)() const): functionPtr(functionPtr) {}\n\n        bool Invoke(const _class* object) const { return (object->*functionPtr)(); }\n        bool Invoke(const void* object) const override { return Invoke((_class*)object); }\n\n    public:\n        static constexpr bool hasSerializeFieldProcessor = true;\n\n        template<typename _base>\n        struct SerializeFieldProcessor: public _base\n        {\n            bool(_class::*functionPtr)() const;\n\n            SerializeFieldProcessor(const _base& base, bool(_class::*functionPtr)() const):\n                _base(base), functionPtr(functionPtr) {}\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return _base::template AddAttributeImpl<SerializeFieldProcessor<_base>, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            auto& SetDefaultValue(const _type& value)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            bool CheckSerialize(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                _field_type& field)\n            {\n                if (!(object->*functionPtr)())\n                    return false;\n\n                return _base::CheckSerialize(object, type, name, pointerGetter, field);\n            }\n\n            template<typename _object_type, typename _field_type>\n            auto& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                              _field_type& field)\n            {\n                if (!CheckSerialize(object, type, name, pointerGetter, field))\n                    return *this;\n\n                _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n                _base::node.AddMember(name).Set(*fieldPtr);\n\n                return *this;\n            }\n        };\n\n        template<typename _base>\n        struct SerializeDeltaFieldProcessor: public _base\n        {\n            bool(_class::*functionPtr)() const;\n\n            SerializeDeltaFieldProcessor(const _base& base, bool(_class::*functionPtr)() const):\n                _base(base), functionPtr(functionPtr) {}\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return _base::template AddAttributeImpl<SerializeDeltaFieldProcessor<_base>, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            auto& SetDefaultValue(const _type& value)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            bool CheckSerialize(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                _field_type& field)\n            {\n                if (!(object->*functionPtr)())\n                    return false;\n\n                return _base::CheckSerialize(object, type, name, pointerGetter, field);\n            }\n\n            template<typename _object_type, typename _field_type>\n            auto& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                              _field_type& field)\n            {\n                if (!CheckSerialize(object, type, name, pointerGetter, field))\n                    return *this;\n\n                _field_type* fieldPtr = (_field_type*)((*pointerGetter)(object));\n                _field_type* originFieldPtr = (_field_type*)((*pointerGetter)(&const_cast<typename _base::OriginType&>(_base::origin)));\n\n                DataValue& member = _base::node.AddMember(name);\n                member.SetDelta(*fieldPtr, *originFieldPtr);\n                if (member.IsNull())\n                    _base::node.RemoveMember(name);\n\n                return *this;\n            }\n        };\n    };\n\n#define SERIALIZABLE_ATTRIBUTE() \\\n    template AddAttribute<o2::SerializableAttribute>()\n\n#define SERIALIZE_IF_ATTRIBUTE(FUNC) \\\n    template AddAttribute<o2::SerializeIfAttribute<thisclass>>(&thisclass::FUNC)\n\n    // Serialization implementation macros\n#define SERIALIZABLE_MAIN(CLASS)                                                                                                                \\\n    IOBJECT_MAIN(CLASS)                                                                                                                         \\\n                                                                                                                                                \\\n    template<typename __type, typename _enable>                                                                                                 \\\n    friend struct o2::CheckSerializeBasicOverridden;                                                                                            \\\n                                                                                                                                                \\\n    template<typename __type, typename _enable>                                                                                                 \\\n    friend struct o2::CheckDeserializeBasicOverridden;                                                                                          \\\n                                                                                                                                                \\\n    template<typename __type, typename _enable>                                                                                                 \\\n    friend struct o2::CheckSerializeDeltaBasicOverridden;                                                                                       \\\n                                                                                                                                                \\\n    template<typename __type, typename _enable>                                                                                                 \\\n    friend struct o2::CheckDeserializeDeltaBasicOverridden;                                                                                     \\\n                                                                                                                                                \\\n    void SerializeBasic(o2::DataValue& node) const override                                                                                     \\\n    {                                                                                                                                           \\\n        o2::SerializeTypeProcessor processor(node);                                                                                             \\\n        ProcessBaseTypes(const_cast<CLASS*>(this), processor);                                                                                  \\\n        ProcessFields(const_cast<CLASS*>(this), processor);                                                                                     \\\n    }                                                                                                                                           \\\n    void Serialize(o2::DataValue& node) const override                                                                                          \\\n    {                                                                                                                                           \\\n        o2::CheckSerializeBasicOverridden<CLASS>::Process(const_cast<CLASS*>(this), node);                                                      \\\n    }                                                                                                                                           \\\n    void DeserializeBasic(const o2::DataValue& node) override                                                                                   \\\n    {                                                                                                                                           \\\n        o2::DeserializeTypeProcessor processor(node);                                                                                           \\\n        ProcessBaseTypes(const_cast<CLASS*>(this), processor);                                                                                  \\\n        ProcessFields(const_cast<CLASS*>(this), processor);                                                                                     \\\n    }                                                                                                                                           \\\n    void Deserialize(const o2::DataValue& node) override                                                                                        \\\n    {                                                                                                                                           \\\n        o2::CheckDeserializeBasicOverridden<CLASS>::Process(const_cast<CLASS*>(this), node);                                                    \\\n    }                                                                                                                                           \\\n    void SerializeDeltaBasic(o2::DataValue& node, const o2::IObject& origin) const override                                                     \\\n    {                                                                                                                                           \\\n        o2::SerializeDeltaTypeProcessor<CLASS> processor(node, dynamic_cast<const CLASS&>(origin), origin);                                     \\\n        ProcessBaseTypes(const_cast<CLASS*>(this), processor);                                                                                  \\\n        ProcessFields(const_cast<CLASS*>(this), processor);                                                                                     \\\n    }                                                                                                                                           \\\n    void SerializeDelta(o2::DataValue& node, const o2::IObject& origin) const override                                                          \\\n    {                                                                                                                                           \\\n        o2::CheckSerializeDeltaBasicOverridden<CLASS>::Process(const_cast<CLASS*>(this), dynamic_cast<const CLASS*>(&origin), origin, node);    \\\n    }                                                                                                                                           \\\n    void DeserializeDeltaBasic(const o2::DataValue& node, const o2::IObject& origin) override                                                   \\\n    {                                                                                                                                           \\\n        o2::DeserializeDeltaTypeProcessor<CLASS> processor(node, dynamic_cast<const CLASS&>(origin), origin);                                   \\\n        ProcessBaseTypes(const_cast<CLASS*>(this), processor);                                                                                  \\\n        ProcessFields(const_cast<CLASS*>(this), processor);                                                                                     \\\n    }                                                                                                                                           \\\n    void DeserializeDelta(const o2::DataValue& node, const o2::IObject& origin) override                                                        \\\n    {                                                                                                                                           \\\n        o2::CheckDeserializeDeltaBasicOverridden<CLASS>::Process(const_cast<CLASS*>(this), dynamic_cast<const CLASS*>(&origin), origin, node);  \\\n    }                                                                                                                                           \\\n    CLASS& operator=(const o2::DataValue& node)                                                                                                 \\\n    {                                                                                                                                           \\\n        Deserialize(node); return *this;                                                                                                        \\\n    }                                                                                                                                           \\\n    explicit operator o2::DataDocument() const                                                                                                  \\\n    {                                                                                                                                           \\\n        o2::DataDocument doc;                                                                                                                   \\\n        Serialize(doc);                                                                                                                         \\\n        return doc;                                                                                                                             \\\n    }\n\n#define SERIALIZABLE(CLASS)                                                                                     \\\n    SERIALIZABLE_MAIN(CLASS)                                                                                    \\\n    IOBJECT_SCRIPTING();                                                                                        \\\n                                                                                                                \\\n    template<typename _type_processor> static void ProcessBaseTypes(CLASS* object, _type_processor& processor); \\\n    template<typename _type_processor> static void ProcessFields(CLASS* object, _type_processor& processor);    \\\n    template<typename _type_processor> static void ProcessMethods(CLASS* object, _type_processor& processor);   \n\n#define SERIALIZABLE_MANUAL(CLASS) \\\n    SERIALIZABLE(CLASS)\n}\n\n#include \"o2/Utils/Serialization/SerializeFieldProcessors.h\"\n// --- META ---\n\nCLASS_BASES_META(o2::ISerializable)\n{\n    BASE_CLASS(o2::IObject);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ISerializable)\n{\n}\nEND_META;\nCLASS_METHODS_META(o2::ISerializable)\n{\n\n    FUNCTION().PUBLIC().SIGNATURE(void, Serialize, DataValue&);\n    FUNCTION().PUBLIC().SIGNATURE(void, Deserialize, const DataValue&);\n    FUNCTION().PUBLIC().SIGNATURE(void, SerializeDelta, DataValue&, const IObject&);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeserializeDelta, const DataValue&, const IObject&);\n    FUNCTION().PUBLIC().SIGNATURE(String, SerializeToString);\n    FUNCTION().PUBLIC().SIGNATURE(void, DeserializeFromString, const String&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SerializeBasic, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeserializeBasic, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, SerializeDeltaBasic, DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, DeserializeDeltaBasic, const DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerialize, DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserialized, const DataValue&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnSerializeDelta, DataValue&, const IObject&);\n    FUNCTION().PROTECTED().SIGNATURE(void, OnDeserializedDelta, const DataValue&, const IObject&);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/SerializeFieldProcessors.h",
    "content": "#pragma once\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n\nnamespace o2\n{\n    class ISerializable;\n\n    template<class T, class = void_t<>>\n    struct HasCheckSerialize: std::false_type { };\n\n    template<class T>\n    struct HasCheckSerialize<T, void_t<decltype(&T::CheckSerialize)>>: std::true_type { };\n\n    template<class T, class = void_t<>>\n    struct HasAttributeSerializeProcessor: std::false_type { };\n\n    template<class T>\n    struct HasAttributeSerializeProcessor<T, void_t<decltype(&T::hasSerializeFieldProcessor)>>: std::true_type { };\n\n    template<class T, class = void_t<>>\n    struct HasAttributeDeserializeProcessor: std::false_type { };\n\n    template<class T>\n    struct HasAttributeDeserializeProcessor<T, void_t<decltype(&T::hasDeserializeFieldProcessor)>>: std::true_type { };\n\n    class SerializeTypeProcessor\n    {\n    public:\n        struct BaseFieldProcessor;\n\n        template<typename _type>\n        struct SerializeDefaultFieldProcessor;\n\n    public:\n        DataValue& node;\n\n    public:\n        SerializeTypeProcessor(DataValue& node):node(node) {}\n\n        template<typename _object_type>\n        void StartBases(_object_type* object, Type* type) {}\n\n        template<typename _object_type>\n        void StartFields(_object_type* object, Type* type) {}\n\n        template<typename _object_type, typename _base_type>\n        void BaseType(_object_type* object, Type* type, const char* name)\n        {\n            if constexpr (std::is_base_of<ISerializable, _base_type>::value && !std::is_same<ISerializable, _base_type>::value)\n                object->_base_type::SerializeBasic(node);\n        }\n\n        BaseFieldProcessor StartField()\n        {\n            return BaseFieldProcessor(node);\n        }\n\n        struct BaseFieldProcessor\n        {\n            DataValue& node;\n\n            BaseFieldProcessor(DataValue& node):node(node) {}\n            \n            template<typename _base, typename _attribute_type>\n            struct AttributeWrapper: public _attribute_type::template SerializeFieldProcessor<_base>\n            {\n                template<typename ... _args>\n                AttributeWrapper(const _base& base, _args ... args):_attribute_type::template SerializeFieldProcessor<_base>(base, args ...) {}\n            };\n\n            template<typename _base, typename _attribute_type, typename ... _args>\n            auto AddAttributeImpl(const _base& base, _args ... args)\n            {\n                if constexpr (HasAttributeSerializeProcessor<_attribute_type>::value)\n                {\n                    return AttributeWrapper<_base, _attribute_type>(base, args ...);\n                }\n                else\n                    return *this;\n            }\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return AddAttributeImpl<BaseFieldProcessor, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            BaseFieldProcessor& SetDefaultValue(const _type& value)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            BaseFieldProcessor& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                            _field_type& field)\n            {\n                return *this;\n            }\n\n            BaseFieldProcessor& SetProtectSection(ProtectSection section)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            bool CheckSerialize(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                _field_type& field)\n            {\n                return true;\n            }\n        };\n    };\n\n    class DeserializeTypeProcessor\n    {\n    public:\n        struct BaseFieldProcessor;\n\n        template<typename _type>\n        struct DeserializeDefaultFieldProcessor;\n\n    public:\n        const DataValue& node;\n\n    public:\n        DeserializeTypeProcessor(const DataValue& node):node(node) {}\n\n        template<typename _object_type>\n        void StartBases(_object_type* object, Type* type) {}\n\n        template<typename _object_type>\n        void StartFields(_object_type* object, Type* type) {}\n\n        template<typename _object_type, typename _base_type>\n        void BaseType(_object_type* object, Type* type, const char* name)\n        {\n            if constexpr (std::is_base_of<ISerializable, _base_type>::value && !std::is_same<ISerializable, _base_type>::value)\n                object->_base_type::DeserializeBasic(node);\n        }\n\n        BaseFieldProcessor StartField()\n        {\n            return BaseFieldProcessor(node);\n        }\n\n        struct BaseFieldProcessor\n        {\n            const DataValue& node;\n\n            BaseFieldProcessor(const DataValue& node):node(node) {}\n            \n            template<typename _base, typename _attribute_type>\n            struct AttributeWrapper: public _attribute_type::template DeserializeFieldProcessor<_base>\n            {\n                template<typename ... _args>\n                AttributeWrapper(const _base& base, _args ... args):_attribute_type::template DeserializeFieldProcessor<_base>(base, args ...) {}\n            };\n\n            template<typename _base, typename _attribute_type, typename ... _args>\n            auto AddAttributeImpl(const _base& base, _args ... args)\n            {\n                if constexpr (HasAttributeDeserializeProcessor<_attribute_type>::value)\n                    return AttributeWrapper<_base, _attribute_type>(base, args ...);\n                else\n                    return (_base&)(*this);\n            }\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return AddAttributeImpl<BaseFieldProcessor, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            BaseFieldProcessor& SetDefaultValue(const _type& value)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            BaseFieldProcessor& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                            _field_type& field)\n            {\n                return *this;\n            }\n\n            BaseFieldProcessor& SetProtectSection(ProtectSection section)\n            {\n                return *this;\n            }\n        };\n    };\n\n    template<typename _origin_type>\n    class SerializeDeltaTypeProcessor\n    {\n    public:\n        struct BaseFieldProcessor;\n\n    public:\n        DataValue& node;\n        const _origin_type& origin;\n        const IObject& originObj;\n\n    public:\n        SerializeDeltaTypeProcessor(DataValue& node, const _origin_type& origin, const IObject& originObj):node(node), origin(origin), originObj(originObj) {}\n\n        template<typename _object_type>\n        void StartBases(_object_type* object, Type* type) {}\n\n        template<typename _object_type>\n        void StartFields(_object_type* object, Type* type) {}\n\n        template<typename _object_type, typename _base_type>\n        void BaseType(_object_type* object, Type* type, const char* name)\n        {\n            if constexpr (std::is_base_of<ISerializable, _base_type>::value && !std::is_same<ISerializable, _base_type>::value)\n                object->_base_type::SerializeDeltaBasic(node, originObj);\n        }\n\n        BaseFieldProcessor StartField()\n        {\n            return BaseFieldProcessor(node, origin);\n        }\n\n        struct BaseFieldProcessor\n        {\n            DataValue& node;\n            const _origin_type& origin;\n\n            typedef _origin_type OriginType;\n\n            BaseFieldProcessor(DataValue& node, const _origin_type& origin):node(node), origin(origin) {}\n            \n            template<typename _base, typename _attribute_type>\n            struct AttributeWrapper: public _attribute_type::template SerializeDeltaFieldProcessor<_base>\n            {\n                template<typename ... _args>\n                AttributeWrapper(const _base& base, _args ... args):_attribute_type::template SerializeDeltaFieldProcessor<_base>(base, args ...) {}\n            };\n\n            template<typename _base, typename _attribute_type, typename ... _args>\n            auto AddAttributeImpl(const _base& base, _args ... args)\n            {\n                if constexpr (HasAttributeSerializeProcessor<_attribute_type>::value)\n                    return AttributeWrapper<_base, _attribute_type>(base, args ...);\n                else\n                    return *this;\n            }\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return AddAttributeImpl<BaseFieldProcessor, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            BaseFieldProcessor& SetDefaultValue(const _type& value)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            BaseFieldProcessor& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                            _field_type& field)\n            {\n                return *this;\n            }\n\n            BaseFieldProcessor& SetProtectSection(ProtectSection section)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            bool CheckSerialize(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                _field_type& field)\n            {\n                return true;\n            }\n        };\n    };\n\n    template<typename _origin_type>\n    class DeserializeDeltaTypeProcessor\n    {\n    public:\n        struct BaseFieldProcessor;\n\n        template<typename _type>\n        struct DeserializeDefaultFieldProcessor;\n\n    public:\n        const DataValue& node;\n        const _origin_type& origin;\n        const IObject& originObj;\n\n    public:\n        DeserializeDeltaTypeProcessor(const DataValue& node, const _origin_type& origin, const IObject& originObj):node(node), origin(origin), originObj(originObj) {}\n\n        template<typename _object_type>\n        void StartBases(_object_type* object, Type* type) {}\n\n        template<typename _object_type>\n        void StartFields(_object_type* object, Type* type) {}\n\n        template<typename _object_type, typename _base_type>\n        void BaseType(_object_type* object, Type* type, const char* name)\n        {\n            if constexpr (std::is_base_of<ISerializable, _base_type>::value && !std::is_same<ISerializable, _base_type>::value)\n                object->_base_type::DeserializeDeltaBasic(node, originObj);\n        }\n\n        BaseFieldProcessor StartField()\n        {\n            return BaseFieldProcessor(node, origin);\n        }\n\n        struct BaseFieldProcessor\n        {\n            const DataValue& node;\n            const _origin_type& origin;\n\n            typedef _origin_type OriginType;\n\n            BaseFieldProcessor(const DataValue& node, const _origin_type& origin):node(node), origin(origin) {}\n\n            template<typename _base, typename _attribute_type>\n            struct AttributeWrapper: public _attribute_type::template DeserializeDeltaFieldProcessor<_base>\n            {\n                template<typename ... _args>\n                AttributeWrapper(const _base& base, _args ... args):_attribute_type::template DeserializeDeltaFieldProcessor<_base>(base, args ...) {}\n            };\n            \n            template<typename _base, typename _attribute_type, typename ... _args>\n            auto AddAttributeImpl(const _base& base, _args ... args)\n            {\n                if constexpr (HasAttributeDeserializeProcessor<_attribute_type>::value)\n                    return AttributeWrapper<_base, _attribute_type>(base, args ...);\n                else\n                    return base;\n            }\n\n            template<typename _attribute_type, typename ... _args>\n            auto AddAttribute(_args ... args)\n            {\n                return AddAttributeImpl<BaseFieldProcessor, _attribute_type, _args ...>(*this, args ...);\n            }\n\n            template<typename _type>\n            BaseFieldProcessor& SetDefaultValue(const _type& value)\n            {\n                return *this;\n            }\n\n            template<typename _object_type, typename _field_type>\n            BaseFieldProcessor& FieldBasics(_object_type* object, Type* type, const char* name, void*(*pointerGetter)(void*),\n                                            _field_type& field)\n            {\n                return *this;\n            }\n\n            BaseFieldProcessor& SetProtectSection(ProtectSection section)\n            {\n                return *this;\n            }\n        };\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/XmlDataFormat.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"XmlDataFormat.h\"\n\n//namespace o2\n// {\n//     namespace XmlDataFormat\n//     {\n//         bool LoadDataDoc(const WString& data, DataValue& node)\n//         {\n//             pugi::xml_document xmlDoc;\n//             auto res = xmlDoc.load_buffer(data.Data(), data.Length()*sizeof(wchar_t));\n// \n//             if (res.status != pugi::status_ok)\n//                 return false;\n// \n//             for (pugi::xml_node_iterator it = xmlDoc.begin(); it != xmlDoc.end(); ++it)\n//             {\n//                 if (it->type() != pugi::node_element)\n//                     continue;\n// \n//                 LoadDataValue(*it, node);\n//             }\n// \n//             return true;\n//         }\n// \n//         void XmlDataFormat::LoadDataValue(const pugi::xml_node& xmlNode, DataValue& parentValue)\n//         {\n//             DataValue& DataValue = parentValue.AddMember(DataValue(xmlNode.name(), DataValue.GetDocument()));\n//             DataValue.Data() = (wchar_t*)xmlNode.child_value();\n// \n//             for (pugi::xml_attribute_iterator it = xmlNode.attributes_begin(); it != xmlNode.attributes_end(); ++it)\n//             {\n//                 DataValue* newNode = mnew DataValue(it->name());\n//                 newNode->Data() = (wchar_t*)it->value();\n//                 DataValue.AddMember(newNode);\n//             }\n// \n//             for (auto node:xmlNode)\n//             {\n//                 if (node.type() != pugi::node_element)\n//                     continue;\n// \n//                 DataValue* newNode = mnew DataValue();\n//                 LoadDataValue(node, *newNode);\n//                 DataValue.AddMember(newNode);\n//             }\n//         }\n// \n//         String SaveDataDoc(const DataValue& node)\n//         {\n//             struct xmlWriter :public pugi::xml_writer\n//             {\n//                 size_t size = 1024;\n//                 size_t length = 0;\n//                 char* data = new char[1024];\n// \n//                 ~xmlWriter()\n//                 {\n//                     delete[] data;\n//                 }\n// \n//                 void write(const void* data, size_t size)\n//                 {\n//                     if (length + size > this->size)\n//                     {\n//                         char* newData = new char[this->size*2];\n//                         memcpy(newData, this->data, this->size);\n//                         delete[] this->data;\n//                         this->data = newData;\n//                         this->size *= 2;\n//                     }\n// \n//                     memcpy(this->data + length, data, size);\n//                     length += size;\n//                 }\n//             };\n// \n//             String res;\n//             pugi::xml_document xmlDoc;\n// \n//             for (auto docNode:node)\n//             {\n//                 pugi::xml_node newNode = xmlDoc.append_child(docNode->GetName().Data());\n// \n//                 if (!docNode->Data().IsEmpty())\n//                     newNode.append_child(pugi::node_pcdata).set_value((const wchar_t*)docNode->Data());\n// \n//                 SaveDataValue(newNode, *docNode);\n//             }\n// \n//             xmlWriter writer;\n//             xmlDoc.save(writer);\n// \n//             writer.data[writer.length] = '\\0';\n// \n//             return String(writer.data);\n//         }\n// \n//         void SaveDataValue(pugi::xml_node& xmlNode, const DataValue& DataValue)\n//         {\n//             for (auto docNode : DataValue)\n//             {\n//                 if (docNode->GetChildNodes().Count() == 0 && false)\n//                 {\n//                     pugi::xml_attribute newAttribute = xmlNode.append_attribute((pugi::char_t*)docNode->GetName().Data());\n//                     newAttribute.set_value((const wchar_t*)docNode->Data());\n//                 }\n//                 else\n//                 {\n//                     pugi::xml_node newNode = xmlNode.append_child((pugi::char_t*)docNode->GetName().Data());\n// \n//                     if (!docNode->Data().IsEmpty())\n//                         newNode.append_child(pugi::node_pcdata).set_value((const wchar_t*)docNode->Data());\n// \n//                     SaveDataValue(newNode, *docNode);\n//                 }\n//             }\n//         }\n//     }\n//}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Serialization/XmlDataFormat.h",
    "content": "#pragma once\n\n#include \"3rdPartyLibs/pugixml/pugixml.hpp\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n//     namespace XmlDataFormat\n//     {\n//         bool LoadDataDoc(const WString& data, DataValue& node);\n//         void LoadDataValue(const pugi::xml_node& xmlNode, DataValue& parentValue);\n// \n//         String SaveDataDoc(const DataValue& node);\n//         void SaveDataValue(pugi::xml_node& xmlNode, const DataValue& DataValue);\n//     }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Singleton.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Singleton.h\"\n\nnamespace o2\n{\n    Vector<Ref<RefCounterable>>& GetSingletonsList()\n    {\n        static Vector<Ref<RefCounterable>> list;\n        return list;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Singleton.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Debug/Assert.h\"\n#include \"o2/Utils/Memory/MemoryManager.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{ \n    // ----------------------------------\n    // Template class singleton interface\n    // ----------------------------------\n    template <typename _class_type> \n    class Singleton: public RefCounterable\n    {\n    public:\n        // Default constructor\n        Singleton(RefCounter* refCounter);\n\n        // Destructor\n        virtual ~Singleton();\n                    \n        // Return reference to instance\n        static _class_type& Instance();\n                                        \n        // Returns pointer to instance\n        static _class_type* InstancePtr();\n                                        \n        // Initializes singleton\n        static void InitializeSingleton();\n                                \n        // Returns true if singleton was initialized\n        static bool IsSingletonInitialzed();\n\n        // Destroys singleton. Required to be called with last reference to singleton\n        static void DestroySingleton(Ref<_class_type>& lastReference);\n\n    public:\n#if defined(__EMSCRIPTEN__) || defined(__ANDROID__)\n        inline static _class_type* mInstance = nullptr; // Instance of singleton\n#else\n        static _class_type* mInstance; // Instance of singleton\n#endif\n    };\n\n    // Returns list of all created singletons\n    Vector<Ref<RefCounterable>>& GetSingletonsList();\n\n    // Declaring singleton macros\n#if defined(__EMSCRIPTEN__) || defined(__ANDROID__)\n#define DECLARE_SINGLETON(CLASS) /* mInstance is inline-initialized in template */\n#define CREATE_SINGLETON(CLASS)  SingletonInitializer<CLASS> gSingleton##CLASS\n#else\n#define DECLARE_SINGLETON(CLASS) template<> CLASS* Singleton<CLASS>::mInstance = nullptr\n\n    // Declaring and initializing singleton macros\n#define CREATE_SINGLETON(CLASS)  template<> CLASS* Singleton<CLASS>::mInstance = nullptr; SingletonInitializer<CLASS> gSingleton##CLASS\n#endif\n\n    // -------------------------------------------------------------------------------------------\n    // Singleton initializer helper. Declared as temporary global variable to initialize singleton\n    // -------------------------------------------------------------------------------------------\n    template <typename _class_type>\n    struct SingletonInitializer\n    {\n        SingletonInitializer()\n        {\n            Singleton<_class_type>::InitializeSingleton();\n        }\n    };\n\n    template <typename _class_type>\n    Singleton<_class_type>::Singleton(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {\n        mInstance = (_class_type*)this;\n        GetSingletonsList().Add(DynamicCast<RefCounterable>(Ref(this)));\n    }\n\n    template <typename _class_type>\n    Singleton<_class_type>::~Singleton()\n    {}\n\n    template <typename _class_type>\n    _class_type& Singleton<_class_type>::Instance() \n    { \n        Assert(mInstance, \"Singleton not initialized\");\n        return *mInstance; \n    }\n\n    template <typename _class_type>\n    _class_type* Singleton<_class_type>::InstancePtr()\n    {\n        return mInstance;\n    }\n\n    template <typename _class_type>\n    void Singleton<_class_type>::InitializeSingleton()\n    { \n        if (!mInstance) \n            mInstance = mmake<_class_type>().Get(); \n    }\n\n    template <typename _class_type>\n    bool Singleton<_class_type>::IsSingletonInitialzed()\n    { \n        return mInstance != nullptr;\n    }\n\n    template <typename _class_type>\n    void Singleton<_class_type>::DestroySingleton(Ref<_class_type>& lastReference)\n    {\n        if (lastReference->GetStrongReferencesCount() != 2)\n        {\n            Assert(false, \"DestroySingleton: lastReference must have only one strong reference\");\n            return;\n        }\n\n        GetSingletonsList().Remove(lastReference);\n        lastReference = nullptr;\n        mInstance = nullptr;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/StringUtils.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"StringUtils.h\"\n\nnamespace o2\n{\n    String GetSmartName(const String& name)\n    {\n        String begn;\n\n        if (name[0] == 'm' && name[1] >= 'A' && name[1] <= 'Z')\n            begn = name.SubStr(1);\n        else if (name[0] == 'm' && name[1] == '_')\n            begn = name.SubStr(2);\n        else if (name[0] == '_')\n            begn = name.SubStr(1);\n        else\n            begn = name;\n\n        String res;\n        int len = begn.Length();\n        bool newWord = true;\n        bool lastUpper = false;\n        for (int i = 0; i < len; i++)\n        {\n            if (begn[i] == '_')\n            {\n                res += ' ';\n                newWord = true;\n                lastUpper = false;\n            }\n            else if (newWord && begn[i] >= 'a' && begn[i] <= 'z')\n            {\n                res += begn[i] + ('A' - 'a');\n                lastUpper = true;\n            }\n            else if (!newWord && begn[i] >= 'A' && begn[i] <= 'Z')\n            {\n                if (!lastUpper)\n                    res += ' ';\n\n                res += begn[i];\n                lastUpper = begn[i] >= 'A' && begn[i] <= 'Z';\n            }\n            else if (i < len - 1 && begn[i] == ':' && begn[i + 1] == ':')\n            {\n                res += \": \";\n                lastUpper = false;\n                i++;\n            }\n            else\n            {\n                res += begn[i];\n                lastUpper = begn[i] >= 'A' && begn[i] <= 'Z';\n            }\n\n            newWord = begn[i] >= '0' && begn[i] <= '9';\n        }\n\n        return res;\n    }\n}"
  },
  {
    "path": "Framework/Sources/o2/Utils/StringUtils.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    // Makes smart and readable name from the given name. \n    // Used to get readable names from the type names and other names.\n    // - removes 'm' prefix\n    // - replaces '::' namespace separator with ' '\n    // - reples '_' with ' '\n    // - capitalizes the first letter of each word and adds space between words\n    String GetSmartName(const String& name);\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/Clipboard.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Clipboard.h\"\n\n#if defined PLATFORM_WINDOWS\n#include <Windows.h>\n#include <shlobj.h>\n#elif defined PLATFORM_MAC\n#include <Carbon/Carbon.h>\n#include <CoreFoundation/CoreFoundation.h>\n#endif\n\nnamespace o2\n{\n\n    void Clipboard::SetText(const WString& text)\n    {\n#if defined PLATFORM_WINDOWS\n        if (OpenClipboard(NULL))\n        {\n            HGLOBAL hgBuffer;\n            wchar_t* chBuffer;\n            EmptyClipboard();\n            hgBuffer = GlobalAlloc(GMEM_DDESHARE, (text.Length() + 1)*sizeof(wchar_t));\n            chBuffer = (wchar_t*)GlobalLock(hgBuffer);\n            memcpy(chBuffer, text.Data(), (text.Length() + 1)*sizeof(wchar_t));\n            GlobalUnlock(hgBuffer);\n            SetClipboardData(CF_UNICODETEXT, hgBuffer);\n            CloseClipboard();\n        }\n#elif defined PLATFORM_MAC\n        String utf8Text;\n        ConvertString(utf8Text, text);\n\n        PasteboardRef pasteboard = nullptr;\n        if (PasteboardCreate(kPasteboardClipboard, &pasteboard) == noErr)\n        {\n            PasteboardClear(pasteboard);\n            CFDataRef cfData = CFDataCreate(kCFAllocatorDefault, (const UInt8*)utf8Text.Data(), (CFIndex)utf8Text.Length());\n            if (cfData)\n            {\n                PasteboardPutItemFlavor(pasteboard, (PasteboardItemID)1, CFSTR(\"public.utf8-plain-text\"), cfData, 0);\n                CFRelease(cfData);\n            }\n            CFRelease(pasteboard);\n        }\n#endif\n    }\n\n    WString Clipboard::GetText()\n    {\n#if defined PLATFORM_WINDOWS\n        WString res;\n\n        if (OpenClipboard(NULL))\n        {\n            HANDLE hData = GetClipboardData(CF_UNICODETEXT);\n            wchar_t* chBuffer = (wchar_t*)GlobalLock(hData);\n            res = chBuffer;\n            GlobalUnlock(hData);\n            CloseClipboard();\n        }\n\n        return res;\n#elif PLATFORM_ANDROID\n        return WString();\n#elif PLATFORM_MAC\n        {\n            WString res;\n            PasteboardRef pasteboard = nullptr;\n            if (PasteboardCreate(kPasteboardClipboard, &pasteboard) == noErr)\n            {\n                PasteboardSynchronize(pasteboard);\n\n                ItemCount itemCount = 0;\n                PasteboardGetItemCount(pasteboard, &itemCount);\n                for (ItemCount i = 0; i < itemCount; i++)\n                {\n                    PasteboardItemID itemId = 0;\n                    PasteboardGetItemIdentifier(pasteboard, i + 1, &itemId);\n                    CFArrayRef flavorTypeArray = nullptr;\n                    PasteboardCopyItemFlavors(pasteboard, itemId, &flavorTypeArray);\n                    if (flavorTypeArray)\n                    {\n                        CFDataRef cfData = nullptr;\n                        if (PasteboardCopyItemFlavorData(pasteboard, itemId, CFSTR(\"public.utf8-plain-text\"), &cfData) == noErr && cfData)\n                        {\n                            CFIndex length = CFDataGetLength(cfData);\n                            String utf8Str;\n                            utf8Str.resize((size_t)length + 1);\n                            CFDataGetBytes(cfData, CFRangeMake(0, length), (UInt8*)&utf8Str[0]);\n                            utf8Str[(size_t)length] = '\\0';\n                            ConvertString(res, utf8Str);\n                            CFRelease(cfData);\n                            CFRelease(flavorTypeArray);\n                            CFRelease(pasteboard);\n                            return res;\n                        }\n                        CFRelease(flavorTypeArray);\n                    }\n                }\n                CFRelease(pasteboard);\n            }\n            return res;\n        }\n#elif PLATFORM_IOS\n        return WString();\n#elif PLATFORM_LINUX\n        return WString();\n#endif\n    }\n\n#undef CopyFile\n\n    void Clipboard::CopyFile(const WString& path)\n    {\n#if defined PLATFORM_WINDOWS\n        if (OpenClipboard(NULL))\n        {\n            EmptyClipboard();\n\n            int size = sizeof(DROPFILES) + (path.Length() + 2)*sizeof(WCHAR);\n            HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, size);\n            DROPFILES *df = (DROPFILES*)GlobalLock(hGlobal);\n            ZeroMemory(df, size);\n            df->pFiles = sizeof(DROPFILES);\n            df->fWide = TRUE;\n            LPWSTR ptr = (LPWSTR)(df + 1);\n            lstrcpyW(ptr, path.Data());\n            GlobalUnlock(hGlobal);\n            SetClipboardData(CF_HDROP, hGlobal);\n            CloseClipboard();\n        }\n#elif defined PLATFORM_MAC\n        String utf8Path;\n        ConvertString(utf8Path, path);\n\n        CFStringRef pathRef = CFStringCreateWithCString(kCFAllocatorDefault, utf8Path.Data(), kCFStringEncodingUTF8);\n        if (pathRef)\n        {\n            CFURLRef urlRef = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, pathRef, kCFURLPOSIXPathStyle, false);\n            if (urlRef)\n            {\n                CFStringRef urlStringRef = CFURLGetString(urlRef);\n                if (urlStringRef)\n                {\n                    CFIndex maxSize = CFStringGetMaximumSizeForEncoding(CFStringGetLength(urlStringRef), kCFStringEncodingUTF8) + 1;\n                    Vector<char> urlBuffer;\n                    urlBuffer.Resize((int)maxSize);\n                    if (CFStringGetCString(urlStringRef, urlBuffer.Data(), maxSize, kCFStringEncodingUTF8))\n                    {\n                        PasteboardRef pasteboard = nullptr;\n                        if (PasteboardCreate(kPasteboardClipboard, &pasteboard) == noErr)\n                        {\n                            PasteboardClear(pasteboard);\n                            CFDataRef cfData = CFDataCreate(kCFAllocatorDefault, (const UInt8*)urlBuffer.Data(), (CFIndex)strlen(urlBuffer.Data()));\n                            if (cfData)\n                            {\n                                PasteboardPutItemFlavor(pasteboard, (PasteboardItemID)1, CFSTR(\"public.file-url\"), cfData, 0);\n                                CFRelease(cfData);\n                            }\n                            CFRelease(pasteboard);\n                        }\n                    }\n                }\n                CFRelease(urlRef);\n            }\n            CFRelease(pathRef);\n        }\n#endif\n    }\n\n    void Clipboard::CopyFiles(const Vector<WString>& paths)\n    {\n#if defined PLATFORM_WINDOWS\n        if (OpenClipboard(NULL))\n        {\n            EmptyClipboard();\n\n            int size = sizeof(DROPFILES) + (paths.Sum<int>([](const WString& x) { return x.Length() + 1; }) + 1)*sizeof(WCHAR);\n            HGLOBAL hGlobal = GlobalAlloc(GMEM_ZEROINIT | GMEM_MOVEABLE | GMEM_DDESHARE, size);\n            DROPFILES *df = (DROPFILES*)GlobalLock(hGlobal);\n            ZeroMemory(df, size);\n            df->pFiles = sizeof(DROPFILES);\n            df->fWide = TRUE;\n            LPWSTR ptr = (LPWSTR)(df + 1);\n\n            for (auto& path : paths)\n            {\n                lstrcpyW(ptr, path.Data());\n                ptr += path.Length();\n                *ptr = '\\0';\n                ptr++;\n            }\n\n            *ptr = '\\0';\n\n            GlobalUnlock(hGlobal);\n            SetClipboardData(CF_HDROP, hGlobal);\n            CloseClipboard();\n        }\n#elif defined PLATFORM_MAC\n        PasteboardRef pasteboard = nullptr;\n        if (PasteboardCreate(kPasteboardClipboard, &pasteboard) == noErr)\n        {\n            PasteboardClear(pasteboard);\n\n            for (int i = 0; i < paths.Count(); i++)\n            {\n                String utf8Path;\n                ConvertString(utf8Path, paths[i]);\n\n                CFStringRef pathRef = CFStringCreateWithCString(kCFAllocatorDefault, utf8Path.Data(), kCFStringEncodingUTF8);\n                if (pathRef)\n                {\n                    CFURLRef urlRef = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, pathRef, kCFURLPOSIXPathStyle, false);\n                    if (urlRef)\n                    {\n                        CFStringRef urlStringRef = CFURLGetString(urlRef);\n                        if (urlStringRef)\n                        {\n                            CFIndex maxSize = CFStringGetMaximumSizeForEncoding(CFStringGetLength(urlStringRef), kCFStringEncodingUTF8) + 1;\n                            Vector<char> urlBuffer;\n                            urlBuffer.Resize((int)maxSize);\n                            if (CFStringGetCString(urlStringRef, urlBuffer.Data(), maxSize, kCFStringEncodingUTF8))\n                            {\n                                CFDataRef cfData = CFDataCreate(kCFAllocatorDefault, (const UInt8*)urlBuffer.Data(), (CFIndex)strlen(urlBuffer.Data()));\n                                if (cfData)\n                                {\n                                    PasteboardPutItemFlavor(pasteboard, (PasteboardItemID)(intptr_t)(i + 1), CFSTR(\"public.file-url\"), cfData, 0);\n                                    CFRelease(cfData);\n                                }\n                            }\n                        }\n                        CFRelease(urlRef);\n                    }\n                    CFRelease(pathRef);\n                }\n            }\n\n            CFRelease(pasteboard);\n        }\n#endif\n    }\n\n    Vector<WString> Clipboard::GetCopyFiles()\n    {\n        Vector<WString> res;\n\n#if defined PLATFORM_WINDOWS\n        if (OpenClipboard(NULL))\n        {\n            HANDLE hData = GetClipboardData(CF_HDROP);\n            if (hData)\n            {\n                DROPFILES* df = (DROPFILES*)GlobalLock(hData);\n\n                wchar_t* files = (wchar_t*)(df + 1);\n                wchar_t buf[MAX_PATH];\n                int bufLen = 0;\n                int i = 0;\n\n                while (true)\n                {\n                    buf[bufLen++] = files[i];\n\n                    if (files[i] == '\\0')\n                    {\n                        if (bufLen == 1)\n                            break;\n\n                        res.Add(buf);\n                        bufLen = 0;\n                    }\n\n                    i++;\n                }\n\n                GlobalUnlock(hData);\n            }\n\n            CloseClipboard();\n        }\n#elif defined PLATFORM_MAC\n        PasteboardRef pasteboard = nullptr;\n        if (PasteboardCreate(kPasteboardClipboard, &pasteboard) == noErr)\n        {\n            PasteboardSynchronize(pasteboard);\n\n            ItemCount itemCount = 0;\n            PasteboardGetItemCount(pasteboard, &itemCount);\n            for (ItemCount i = 0; i < itemCount; i++)\n            {\n                PasteboardItemID itemId = 0;\n                PasteboardGetItemIdentifier(pasteboard, i + 1, &itemId);\n                CFDataRef cfData = nullptr;\n                if (PasteboardCopyItemFlavorData(pasteboard, itemId, CFSTR(\"public.file-url\"), &cfData) == noErr && cfData)\n                {\n                    CFIndex length = CFDataGetLength(cfData);\n                    Vector<char> urlBuffer;\n                    urlBuffer.Resize((int)length + 1);\n                    CFDataGetBytes(cfData, CFRangeMake(0, length), (UInt8*)urlBuffer.Data());\n                    urlBuffer[(int)length] = '\\0';\n\n                    CFURLRef urlRef = CFURLCreateWithBytes(kCFAllocatorDefault, (const UInt8*)urlBuffer.Data(), length, kCFStringEncodingUTF8, nullptr);\n                    if (urlRef)\n                    {\n                        CFStringRef pathRef = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle);\n                        if (pathRef)\n                        {\n                            CFIndex maxSize = CFStringGetMaximumSizeForEncoding(CFStringGetLength(pathRef), kCFStringEncodingUTF8) + 1;\n                            Vector<char> pathBuffer;\n                            pathBuffer.Resize((int)maxSize);\n                            if (CFStringGetCString(pathRef, pathBuffer.Data(), maxSize, kCFStringEncodingUTF8))\n                            {\n                                String utf8Path(pathBuffer.Data());\n                                WString wPath;\n                                ConvertString(wPath, utf8Path);\n                                res.Add(wPath);\n                            }\n                            CFRelease(pathRef);\n                        }\n                        CFRelease(urlRef);\n                    }\n                    CFRelease(cfData);\n                }\n            }\n            CFRelease(pasteboard);\n        }\n#endif\n\n        return res;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/Clipboard.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/String.h\"\n\n#undef CopyFile\n\nnamespace o2\n{\n    class Clipboard\n    {\n    public:\n        // Sets text into clipboard\n        static void SetText(const WString& text);\n\n        // Gets text from clipboard\n        static WString GetText();\n\n        // Copy file to clipboard\n        static void CopyFile(const WString& path);\n\n        // Copy files to clipboard\n        static void CopyFiles(const Vector<WString>& paths);\n\n        // Returns copying files\n        static Vector<WString> GetCopyFiles();\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/CommandLineOptions.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"CommandLineOptions.h\"\n\nnamespace o2\n{\n    void CommandLineOptions::Parse(int argc, char** argv, IObject& output)\n    {\n        Map<String, String> data = Parse(argc, argv);\n        \n        auto& type = dynamic_cast<const ObjectType&>(output.GetType());\n        void* originOutputPtr = type.DynamicCastFromIObject(&output);\n\n        for (auto& kv : data)\n        {\n            if (auto field = type.GetField(kv.first))\n            {\n                if (field->GetType() == &TypeOf(int))\n                    field->SetValue(originOutputPtr, (int)kv.second);\n                else if (field->GetType() == &TypeOf(float))\n                    field->SetValue(originOutputPtr, (float)kv.second);\n                else if (field->GetType() == &TypeOf(String))\n                    field->SetValue(originOutputPtr, kv.second);\n                else if (field->GetType() == &TypeOf(bool))\n                    field->SetValue(originOutputPtr, (bool)kv.second);\n            }\n        }\n    }\n\n    Map<String, String> CommandLineOptions::Parse(int argc, char** argv)\n    {\n        Map<String, String> result;\n\n        for (int i = 1; i < argc; i += 2)\n        {\n            String key = argv[i];\n            String value = argv[i + 1];\n            result[key] = value;\n        }\n\n        return result;\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/CommandLineOptions.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/String.h\"\n\nnamespace o2\n{\n    // ---------------------------------------------------\n    // Command line options, parsing options by reflection\n    // ---------------------------------------------------\n    class CommandLineOptions\n    {\n    public:\n        // Parses data to map\n        static Map<String, String> Parse(int argc, char** argv);\n\n        // Parses data to output object\n        static void Parse(int argc, char** argv, IObject& output);\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/ShortcutKeys.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ShortcutKeys.h\"\n\n#include \"o2/Application/Input.h\"\n#include \"o2/Application/VKCodes.h\"\n\n#if defined PLATFORM_WINDOWS\n#include <Windows.h>\n#endif\n\nnamespace o2\n{\n    const std::unordered_map<KeyboardKey, String> ShortcutKeys::mKeyNames = {\n        // Function keys\n        { VK_F1, \"F1\" }, { VK_F2, \"F2\" }, { VK_F3, \"F3\" }, { VK_F4, \"F4\" },\n        { VK_F5, \"F5\" }, { VK_F6, \"F6\" }, { VK_F7, \"F7\" }, { VK_F8, \"F8\" },\n        { VK_F9, \"F9\" }, { VK_F10, \"F10\" }, { VK_F11, \"F11\" }, { VK_F12, \"F12\" },\n        \n        // Number keys\n        { VK_0, \"0\" }, { VK_1, \"1\" }, { VK_2, \"2\" }, { VK_3, \"3\" }, { VK_4, \"4\" },\n        { VK_5, \"5\" }, { VK_6, \"6\" }, { VK_7, \"7\" }, { VK_8, \"8\" }, { VK_9, \"9\" },\n        \n        // Navigation keys\n        { VK_LEFT, \"Left\" }, { VK_UP, \"Up\" }, { VK_RIGHT, \"Right\" }, { VK_DOWN, \"Down\" },\n        { VK_HOME, \"Home\" }, { VK_END, \"End\" }, { VK_PRIOR, \"PageUp\" }, { VK_NEXT, \"PageDown\" },\n        { VK_DELETE, \"Delete\" },\n        \n        // Special keys\n        { VK_ESCAPE, \"Escape\" }, { VK_RETURN, \"Enter\" }, { VK_SPACE, \"Space\" },\n        { VK_BACK, \"Backspace\" }, { VK_TAB, \"Tab\" },\n        { VK_NUMLOCK, \"NumLock\" },\n        \n        // Numpad keys\n        { VK_NUMPAD0, \"Numpad0\" }, { VK_NUMPAD1, \"Numpad1\" }, { VK_NUMPAD2, \"Numpad2\" },\n        { VK_NUMPAD3, \"Numpad3\" }, { VK_NUMPAD4, \"Numpad4\" }, { VK_NUMPAD5, \"Numpad5\" },\n        { VK_NUMPAD6, \"Numpad6\" }, { VK_NUMPAD7, \"Numpad7\" }, { VK_NUMPAD8, \"Numpad8\" },\n        { VK_NUMPAD9, \"Numpad9\" },\n        \n        // Numpad operators\n        { VK_MULTIPLY, \"Numpad*\" }, { VK_ADD, \"Numpad+\" }, { VK_SUBTRACT, \"Numpad-\" },\n        { VK_DECIMAL, \"Numpad.\" }, { VK_DIVIDE, \"Numpad/\" },\n        \n        // OEM keys\n        { VK_OEM_3, \"`\" }, { VK_OEM_MINUS, \"-\" }, { VK_OEM_PLUS, \"=\" },\n        { VK_OEM_4, \"[\" }, { VK_OEM_6, \"]\" }, { VK_OEM_5, \"\\\\\" },\n        { VK_OEM_1, \";\" }, { VK_OEM_7, \"'\" },\n        { VK_OEM_COMMA, \",\" }, { VK_OEM_PERIOD, \".\" }, { VK_OEM_2, \"/\" },\n        \n#if defined PLATFORM_WINDOWS || defined PLATFORM_LINUX\n        { VK_INSERT, \"Insert\" },\n        { VK_CAPITAL, \"CapsLock\" },\n        { VK_PAUSE, \"Pause\" }, \n        { VK_SCROLL, \"ScrollLock\" },\n        { VK_LWIN, \"LeftWin\" }, \n        { VK_RWIN, \"RightWin\" },\n#endif\n        \n#if defined PLATFORM_MAC || defined PLATFORM_IOS\n        { VK_COMMAND, \"Cmd\" },\n        { VK_SELECT, \"Select\" },\n        { VK_SNAPSHOT, \"Snapshot\" },\n#endif\n    };\n\n    ShortcutKeys::ShortcutKeys()\n    {}\n\n    ShortcutKeys::ShortcutKeys(const Vector<KeyboardKey>& keys) :\n        keys(keys)\n    {}\n\n    ShortcutKeys ShortcutKeys::FromCustomString(const String& str)\n    {\n        ShortcutKeys res;\n        res.custromString = str;\n        return res;\n    }\n\n    KeyboardKey ShortcutKeys::NormalizeKey(KeyboardKey key) const\n    {\n#if defined PLATFORM_MAC || defined PLATFORM_IOS\n        if (key >= 'A' && key <= 'Z') {\n            return key + ('a' - 'A');\n        }\n#endif\n        return key;\n    }\n\n    bool ShortcutKeys::IsPressed() const\n    {\n        if (keys.IsEmpty())\n            return false;\n\n        for (auto key : keys) {\n            auto normalizedKey = NormalizeKey(key);\n            bool isPressed = o2Input.IsKeyPressed(normalizedKey) || o2Input.IsKeyPressed(key) || \n                             o2Input.IsKeyDown(normalizedKey) || o2Input.IsKeyDown(key);\n                             \n            if (!isPressed)\n                return false;\n        }\n\n        return true;\n    }\n\n    bool ShortcutKeys::IsDown() const\n    {\n        if (keys.IsEmpty())\n            return false;\n\n        for (auto key : keys) {\n            if (!o2Input.IsKeyDown(NormalizeKey(key)) && !o2Input.IsKeyDown(key))\n                return false;\n        }\n\n        return true;\n    }\n\n    String ShortcutKeys::AsString() const\n    {\n        if (!custromString.IsEmpty())\n            return custromString;\n\n        if (keys.IsEmpty())\n            return \"\";\n\n        String mainKey;\n        Vector<String> modifiers;\n        \n        for (auto key : keys) {\n            if (key == VK_SHIFT) {\n                modifiers.Add(\"Shift\");\n            }\n            else if (key == VK_CONTROL) {\n                modifiers.Add(\"Ctrl\");\n            }\n            else if (key == VK_CTRL_CMD) {\n#if defined PLATFORM_MAC || defined PLATFORM_IOS\n                modifiers.Add(\"Cmd\");\n#else\n                modifiers.Add(\"Ctrl\");\n#endif\n            }\n            else if (key == VK_MENU) {\n                modifiers.Add(\"Alt\");\n            }\n#if defined PLATFORM_MAC || defined PLATFORM_IOS\n            else if (key == VK_COMMAND) {\n                modifiers.Add(\"Cmd\");\n            }\n#endif\n            else {\n                char c = (char)key;\n                if ((c >= 'A' && c <= 'Z')) {\n                    mainKey = String(c);\n                }\n                else if ((c >= 'a' && c <= 'z')) {\n                    char capital = c - 'a' + 'A';\n                    mainKey = String(capital);\n                }\n                else {\n                    auto it = mKeyNames.find(key);\n                    if (it != mKeyNames.end()) {\n                        mainKey = it->second;\n                    }\n                    else {\n                        mainKey = String((int)key);\n                    }\n                }\n            }\n        }\n\n        String result;\n        for (const String& modifier : modifiers) {\n            if (!result.IsEmpty())\n                result += \"+\";\n            result += modifier;\n        }\n        \n        if (!modifiers.IsEmpty() && !mainKey.IsEmpty())\n            result += \"+\";\n\n        result += mainKey;\n        \n        return result;\n    }\n\n    bool ShortcutKeys::IsEmpty() const\n    {\n        return keys.IsEmpty();\n    }\n\n    bool ShortcutKeys::operator<(const ShortcutKeys& other) const\n    {\n        if (keys.Count() != other.keys.Count())\n            return keys.Count() < other.keys.Count();\n\n        for (int i = 0; i < keys.Count(); i++) {\n            if (keys[i] != other.keys[i])\n                return keys[i] < other.keys[i];\n        }\n\n        return false;\n    }\n\n    bool ShortcutKeys::operator==(const ShortcutKeys& other) const\n    {\n        if (keys.Count() != other.keys.Count())\n            return false;\n\n        // Sort both arrays for comparison\n        Vector<KeyboardKey> sortedKeys1 = keys;\n        Vector<KeyboardKey> sortedKeys2 = other.keys;\n        \n        sortedKeys1.Sort([](const KeyboardKey& a, const KeyboardKey& b) { return a < b; });\n        sortedKeys2.Sort([](const KeyboardKey& a, const KeyboardKey& b) { return a < b; });\n\n        for (int i = 0; i < sortedKeys1.Count(); i++) {\n            if (sortedKeys1[i] != sortedKeys2[i])\n                return false;\n        }\n\n        return true;\n    }\n\n\n\n}\n// --- META ---\n\nDECLARE_CLASS(o2::ShortcutKeys, o2__ShortcutKeys);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/ShortcutKeys.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    // -------------------------\n    // Shortcut keys description\n    // -------------------------\n    class ShortcutKeys: public ISerializable\n    {\n    public:\n        Vector<KeyboardKey> keys; // Keys that should be pressed // @SERIALIZABLE\n\n        String custromString; // Custom string representation\n\n    public:\n        // Default constructor\n        ShortcutKeys();\n\n        // Constructor by array of keys\n        ShortcutKeys(const Vector<KeyboardKey>& keys);\n\n        // Returns true if all keys are pressed\n        bool IsPressed() const;\n\n        // Returns true if all keys are down\n        bool IsDown() const;\n\n        // Returns string representation\n        String AsString() const;\n\n        // Returns true if all keys are empty\n        bool IsEmpty() const;\n\n        // Check equals operator\n        bool operator==(const ShortcutKeys& other) const;\n\n        // Less operator\n        bool operator<(const ShortcutKeys& other) const;\n\n        // Builds with custom string\n        static ShortcutKeys FromCustomString(const String& str);\n\n        SERIALIZABLE(ShortcutKeys);\n\n    private:\n        static const std::unordered_map<KeyboardKey, String> mKeyNames;\n            \n    private:\n        // Normalize key: convert lowercase to uppercase for macOS\n        KeyboardKey NormalizeKey(KeyboardKey key) const;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::ShortcutKeys)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::ShortcutKeys)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(keys);\n    FIELD().PUBLIC().NAME(custromString);\n}\nEND_META;\nCLASS_METHODS_META(o2::ShortcutKeys)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().CONSTRUCTOR(const Vector<KeyboardKey>&);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsPressed);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsDown);\n    FUNCTION().PUBLIC().SIGNATURE(String, AsString);\n    FUNCTION().PUBLIC().SIGNATURE(bool, IsEmpty);\n    FUNCTION().PUBLIC().SIGNATURE_STATIC(ShortcutKeys, FromCustomString, const String&);\n    FUNCTION().PRIVATE().SIGNATURE(KeyboardKey, NormalizeKey, KeyboardKey);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/Time/Time.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Time.h\"\n\n#include \"o2/Utils/Reflection/Reflection.h\"\n\n#ifdef PLATFORM_WINDOWS\n#include <Windows.h>\n#endif\n\nnamespace o2\n{\n    DECLARE_SINGLETON(Time);\n\n    Time::Time(RefCounter* refCounter):\n        Singleton<Time>(refCounter), mApplicationTime(0), mLocalTime(0), mCurrentFrame(1), mDeltaTime(0), mFPS(0), mFPSSum(0),\n        mFramesSum(0), mLastFPSCheckingTime(0)\n    {}\n\n    Time::~Time()\n    {}\n\n    void Time::Update(float dt)\n    {\n        //PROFILE_SAMPLE_FUNC();\n\n        mCurrentFrame++;\n        mFramesSum += 1.0f;\n\n        if (dt < FLT_EPSILON)\n            return;\n\n        mDeltaTime = dt;\n        mApplicationTime += dt;\n        mLocalTime += dt;\n\n        mFPSSum += 1.0f / dt;\n        if (mApplicationTime - mLastFPSCheckingTime > 0.3f)\n        {\n            mFPS = mFramesSum / (mApplicationTime - mLastFPSCheckingTime);\n            mLastFPSCheckingTime = mApplicationTime;\n            mFPSSum = 0;\n            mFramesSum = 0;\n        }\n    }\n\n    float Time::GetApplicationTime() const\n    {\n        return mInstance->mApplicationTime;\n    }\n\n    float Time::GetLocalTime() const\n    {\n        return mInstance->mLocalTime;\n    }\n\n    void Time::ResetLocalTime() const\n    {\n        mInstance->mLocalTime = 0;\n    }\n\n    void Time::SetLocalTime(float time) const\n    {\n        mInstance->mLocalTime = time;\n    }\n\n    int Time::GetCurrentFrame() const\n    {\n        return (int)mInstance->mCurrentFrame;\n    }\n\n    float Time::GetDeltaTime() const\n    {\n        return mInstance->mDeltaTime;\n    }\n\n    float Time::GetFPS() const\n    {\n        return mInstance->mFPS;\n    }\n\n    TimeStamp Time::CurrentTime() const\n    {\n#ifdef PLATFORM_WINDOWS\n        SYSTEMTIME tm;\n        GetSystemTime(&tm);\n\n        return TimeStamp(tm.wSecond, tm.wMinute, tm.wHour, tm.wDay, tm.wMonth, tm.wYear);\n#elif defined PLATFORM_ANDROID\n        return TimeStamp();\n#elif defined PLATFORM_MAC\n        return TimeStamp();\n#elif defined PLATFORM_IOS\n        return TimeStamp();\n#elif defined PLATFORM_LINUX\n        return TimeStamp();\n#endif\n    }\n\n    bool TimeStamp::operator!=(const TimeStamp& wt) const\n    {\n        return !(*this == wt);\n    }\n\n    bool TimeStamp::operator==(const TimeStamp& wt) const\n    {\n        return mSecond == wt.mSecond && mMinute == wt.mMinute && mHour == wt.mHour && mDay == wt.mDay && mMonth == wt.mMonth &&\n            mYear == wt.mYear;\n    }\n\n    TimeStamp::TimeStamp(int seconds /*= 0*/, int minutes /*= 0*/, int hours /*= 0*/, int days /*= 0*/, int months /*= 0*/, int years /*= 0*/):\n        mYear(years), mMonth(months), mDay(days), mHour(hours), mMinute(minutes), mSecond(seconds)\n    {}\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/Time/Time.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/System/Time/TimeStamp.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\n// Time stuff access macros\n#define o2Time o2::Time::Instance()\n\nnamespace o2\n{\n    // -------------\n    // Timing system\n    // -------------\n    class Time: public Singleton<Time>\n    {\n    public:\n        // Default constructor\n        Time(RefCounter* refCounter);\n\n        // Destructor\n        ~Time();\n\n        // Returns application working time, in seconds\n        float GetApplicationTime() const;\n\n        // Returns local time, in seconds\n        float GetLocalTime() const;\n\n        // Resetting local time to zero\n        void ResetLocalTime() const;\n\n        // Resetting local time to value\n        void SetLocalTime(float time) const;\n\n        // Returns current frame index\n        int GetCurrentFrame() const;\n\n        // Returns frames delta time\n        float GetDeltaTime() const;\n\n        // Returns average frames per second for 0.3 seconds\n        float GetFPS() const;\n\n        // Return current system time\n        TimeStamp CurrentTime() const;\n\n        // Update parameters\n        void Update(float dt);\n\n    public:\n        friend class Application;\n        friend class BaseApplication;\n\n        float  mApplicationTime; // Application working time, seconds\n        float  mLocalTime;       // Local timer working, seconds. Controlling by user\n        UInt64 mCurrentFrame;    // Current frame index\n        float  mDeltaTime;       // Frame delta time\n        float  mFPS;             // Average frames per second\n\n        float mFPSSum;              // Summary of fps\n        float mFramesSum;           // Frames summary\n        float mLastFPSCheckingTime; // Last average fps checking time\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/Time/TimeStamp.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"TimeStamp.h\"\n// --- META ---\n\nDECLARE_CLASS(o2::TimeStamp, o2__TimeStamp);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/Time/TimeStamp.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Serialization/Serializable.h\"\n\nnamespace o2\n{\n    // ----------\n    // Time stamp\n    // ----------\n    struct TimeStamp: public ISerializable\n    {\n        int mYear;   // @SERIALIZABLE\n        int mMonth;  // @SERIALIZABLE\n        int mDay;    // @SERIALIZABLE\n        int mHour;   // @SERIALIZABLE\n        int mMinute; // @SERIALIZABLE\n        int mSecond; // @SERIALIZABLE\n\n    public:\n        TimeStamp(int seconds = 0, int minutes = 0, int hours = 0, int days = 0, int months = 0, int years = 0);\n\n        bool operator==(const TimeStamp& wt) const;\n        bool operator!=(const TimeStamp& wt) const;\n\n        SERIALIZABLE(TimeStamp);\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::TimeStamp)\n{\n    BASE_CLASS(o2::ISerializable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::TimeStamp)\n{\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mYear);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mMonth);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mDay);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mHour);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mMinute);\n    FIELD().PUBLIC().SERIALIZABLE_ATTRIBUTE().NAME(mSecond);\n}\nEND_META;\nCLASS_METHODS_META(o2::TimeStamp)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR(int, int, int, int, int, int);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/Time/Timer.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Timer.h\"\n\nnamespace o2\n{\n    Timer::Timer()\n    {\n        Reset();\n    }\n\n    Timer::~Timer()\n    {}\n\n#ifdef PLATFORM_WINDOWS\n    void Timer::Reset()\n    {\n        QueryPerformanceFrequency(&mFrequency);\n        QueryPerformanceCounter(&mStartTime);\n        mLastElapsedTime = mStartTime.QuadPart;\n    }\n\n    float Timer::GetTime()\n    {\n        LARGE_INTEGER curTime;\n        QueryPerformanceCounter(&curTime);\n\n        float res = (float)((double)(curTime.QuadPart - (double)mStartTime.QuadPart)/(double)mFrequency.QuadPart);\n        mLastElapsedTime = curTime.QuadPart;\n\n        return res;\n    }\n\n    float Timer::GetDeltaTime()\n    {\n        LARGE_INTEGER curTime;\n        QueryPerformanceCounter(&curTime);\n\n        float res = (float)((double)(curTime.QuadPart - (double)mLastElapsedTime)/(double)mFrequency.QuadPart);\n        mLastElapsedTime = curTime.QuadPart;\n\n        return res;\n    }\n#endif\n\n#if defined PLATFORM_ANDROID || defined PLATFORM_MAC || defined PLATFORM_IOS || defined PLATFORM_LINUX || defined PLATFORM_WASM\n    void Timer::Reset()\n    {\n        gettimeofday(&mStartTime, NULL);\n        gettimeofday(&mLastElapsedTime, NULL);\n    }\n\n    float Timer::GetTime()\n    {\n        struct timeval now;\n        gettimeofday(&now, NULL);\n        float deltaTime = (now.tv_sec - mStartTime.tv_sec)*1000 + (now.tv_usec - mStartTime.tv_usec)/1000.0f;\n        deltaTime /= 1000.0f;\n        mLastElapsedTime = now;\n\n        return deltaTime;\n    }\n\n    float Timer::GetDeltaTime()\n    {\n        struct timeval now;\n        gettimeofday(&now, NULL);\n        float deltaTime = (now.tv_sec - mLastElapsedTime.tv_sec)*1000 + (now.tv_usec - mLastElapsedTime.tv_usec)/1000.0f;\n        deltaTime /= 1000.0f;\n        mLastElapsedTime = now;\n\n        return deltaTime;\n    }\n#endif\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/System/Time/Timer.h",
    "content": "#pragma once\n\n#if defined PLATFORM_WINDOWS\n#include <Windows.h>\n#elif defined PLATFORM_ANDROID || defined PLATFORM_MAC || defined PLATFORM_IOS || defined PLATFORM_LINUX || defined PLATFORM_WASM\n#include <sys/time.h>\n#endif\n\n#include <stdio.h>\n\nnamespace o2\n{\n    // ------------------------------------\n    // Timer class, using for counting time\n    // ------------------------------------\n    class Timer\n    {\n    public:\n        // Default constructor\n        Timer();\n\n        // Destructor\n        ~Timer();\n\n        // Resets time\n        void Reset();\n\n        // Returns time in seconds from last Reset() call\n        float GetTime();\n\n        // Returns time in seconds from last Reset() or GetElapsedTime() call\n        float GetDeltaTime();\n\n    protected:\n#if defined PLATFORM_WINDOWS\n        LONGLONG      mLastElapsedTime;\n        LARGE_INTEGER mFrequency;\n        LARGE_INTEGER mStartTime;\n#elif defined PLATFORM_ANDROID || defined PLATFORM_MAC|| defined PLATFORM_IOS || defined PLATFORM_LINUX || defined PLATFORM_WASM\n        struct timeval mLastElapsedTime;\n        struct timeval mStartTime;\n#endif\n    };\n\n    class ScopeTimer\n    {\n    public:\n        const char* id = \"\";\n        Timer timer;\n        \n        ScopeTimer() {}\n        ScopeTimer(const char* id):id(id) {}\n        ~ScopeTimer() { Check(); }\n\n        void Check() { printf(\"%s - %.4f sec\\n\", id, timer.GetDeltaTime()); }\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Tasks/Task.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Task.h\"\n\n#include \"o2/Utils/Tasks/TaskManager.h\"\n\nnamespace o2\n{\n    Task::Task(RefCounter* refCounter):\n        RefCounterable(refCounter)\n    {\n        mId = o2Tasks.mLastTaskId++;\n        o2Tasks.mTasks.Add(Ref(this));\n    }\n\n    Task::Task(RefCounter* refCounter, const Task& other):\n        RefCounterable(refCounter)\n    {\n        mId = o2Tasks.mLastTaskId++;\n        o2Tasks.mTasks.Add(Ref(this));\n    }\n\n    Task::~Task()\n    {}\n\n    void Task::Update(float dt)\n    {}\n\n    bool Task::IsDone() const\n    {\n        return true;\n    }\n\n    int Task::ID() const\n    {\n        return mId;\n    }\n\n    FunctionalTask::FunctionalTask(RefCounter* refCounter):\n        Task(refCounter)\n    {}\n\n    void FunctionalTask::Update(float dt)\n    {\n        update(dt);\n    }\n\n    bool FunctionalTask::IsDone() const\n    {\n        return isDone();\n    }\n\n    TimeTask::TimeTask(RefCounter* refCounter, float time /*= 1.0f*/):\n        Task(refCounter), mRemainingTime(time)\n    {}\n\n    void TimeTask::Update(float dt)\n    {\n        mRemainingTime -= dt;\n    }\n\n    bool TimeTask::IsDone() const\n    {\n        return mRemainingTime < 0;\n    }\n\n    FunctionalTimeTask::FunctionalTimeTask(RefCounter* refCounter, float time /*= 1.0f*/):\n        TimeTask(refCounter, time)\n    {}\n\n    void FunctionalTimeTask::Update(float dt)\n    {\n        update(dt);\n    }\n\n    DelayedTask::DelayedTask(RefCounter* refCounter, float delay /*= 0.0f*/):\n        Task(refCounter), mRemainingToCallTime(delay)\n    {}\n\n    void DelayedTask::Update(float dt)\n    {\n        mRemainingToCallTime -= dt;\n        if (mRemainingToCallTime < 0)\n            DoTask();\n    }\n\n    bool DelayedTask::IsDone() const\n    {\n        return mRemainingToCallTime < 0;\n    }\n\n    void DelayedTask::DoTask()\n    {}\n\n    FunctionalDelayedTask::FunctionalDelayedTask(RefCounter* refCounter, float delay /*= 0.0f*/):\n        DelayedTask(refCounter, delay)\n    {}\n\n    void FunctionalDelayedTask::DoTask()\n    {\n        doTask();\n    }\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Tasks/Task.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Function/Function.h\"\n\nnamespace o2\n{\n    // --------------------\n    // Basic task interface\n    // --------------------\n    class Task: public RefCounterable\n    {\n    public:\n        // Default constructor. Registering himself in tasks manager and gets id\n        Task(RefCounter* refCounter);\n\n        // Copy-constructor. Registering himself in tasks manager and gets id\n        Task(RefCounter* refCounter, const Task& other);\n\n        // Destructor. Removes from tasks manager\n        virtual ~Task();\n\n        // Updates task\n        virtual void Update(float dt);\n\n        // Checks task for complete\n        virtual bool IsDone() const;\n\n        // Returns task identificator\n        int ID() const;\n\n    protected:\n        int mId; // Task identificator\n\n        friend class TaskManager;\n    };\n\n    // ---------------\n    // Functional task\n    // ---------------\n    class FunctionalTask: public Task\n    {\n    public:\n        Function<void(float)> update;\n        Function<bool()> isDone;\n\n    public:\n        FunctionalTask(RefCounter* refCounter);\n\n        void Update(float dt);\n        bool IsDone() const;\n    };\n\n    // ----------\n    // Timed task\n    // ----------\n    class TimeTask: public Task\n    {\n    public:\n        TimeTask(RefCounter* refCounter, float time = 1.0f);\n\n        void Update(float dt);\n        bool IsDone() const;\n\n    protected:\n        float mRemainingTime;\n    };\n\n    // ---------------------\n    // Functional timed task\n    // ---------------------\n    class FunctionalTimeTask: public TimeTask\n    {\n    public:\n        Function<void(float)> update;\n\n    public:\n        FunctionalTimeTask(RefCounter* refCounter, float time = 1.0f);\n\n        void Update(float dt);\n    };\n\n    // ------------\n    // Delayed task\n    // ------------\n    class DelayedTask: public Task\n    {\n    public:\n        DelayedTask(RefCounter* refCounter, float delay = 0.0f);\n\n        void Update(float dt);\n        bool IsDone() const;\n\n    protected:\n        float mRemainingToCallTime;\n\n    protected:\n        virtual void DoTask();\n    };\n\n    // -----------------------\n    // Functional delayed task\n    // -----------------------\n    class FunctionalDelayedTask: public DelayedTask\n    {\n    public:\n        Function<void()> doTask;\n\n    public:\n        FunctionalDelayedTask(RefCounter* refCounter, float delay = 0.0f);\n\n    protected:\n        void DoTask();\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Tasks/TaskManager.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"TaskManager.h\"\n\n#include \"o2/Utils/Tasks/Task.h\"\n\nnamespace o2\n{\n    DECLARE_SINGLETON(TaskManager);\n    FORWARD_REF_IMPL(Task);\n\n    void TaskManager::StopTask(int id)\n    {\n        for (auto& task : mTasks)\n        {\n            if (task->mId == id)\n                return;\n        }\n    }\n\n    void TaskManager::StopAllTasks()\n    {\n        mTasks.Clear();\n    }\n\n    Ref<Task> TaskManager::FindTask(int id)\n    {\n        return mTasks.FindOrDefault([&](auto x) { return x->mId == id; });\n    }\n\n    void TaskManager::Run(const Function<void(float)>& update, const Function<bool()> isDone)\n    {\n        auto task = mmake<FunctionalTask>();\n        task->update = update;\n        task->isDone = isDone;\n    }\n\n    void TaskManager::Run(const Function<void(float)>& update, float time)\n    {\n        auto task = mmake<FunctionalTimeTask>(time);\n        task->update = update;\n    }\n\n    void TaskManager::Invoke(const Function<void()> func, float delay /*= 0*/)\n    {\n        auto task = mmake<FunctionalDelayedTask>(delay);\n        task->doTask = func;\n    }\n\n    TaskManager::TaskManager(RefCounter* refCounter):\n        Singleton<TaskManager>(refCounter), mLastTaskId(0)\n    {}\n\n    TaskManager::~TaskManager()\n    {\n        StopAllTasks();\n    }\n\n    void TaskManager::Update(float dt)\n    {\n        PROFILE_SAMPLE_FUNC();\n\n        Vector<Ref<Task>> doneTasks;\n        Vector<Ref<Task>> tasks = mTasks;\n        for (auto& task : tasks)\n        {\n            task->Update(dt);\n\n            if (task->IsDone())\n                doneTasks.Add(task);\n        }\n\n        mTasks.Remove(doneTasks);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Tasks/TaskManager.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Singleton.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\n// Task manager access macros\n#define o2Tasks o2::TaskManager::Instance()\n\nnamespace o2\n{\n    FORWARD_CLASS_REF(Task);\n\n    // -----------------------\n    // Tasks manager singleton\n    // -----------------------\n    class TaskManager: public Singleton<TaskManager>\n    {\n    public:\n        // Default constructor\n        TaskManager(RefCounter* refCounter);\n\n        // Destructor. Destroys all tasks\n        ~TaskManager();\n\n        // Stops task with specified id\n        void StopTask(int id);\n\n        // Stops all tasks\n        void StopAllTasks();\n\n        // Returns task\n        Ref<Task> FindTask(int id);\n\n        // Runs new functional task\n        void Run(const Function<void(float)>& update, const Function<bool()> isDone);\n\n        // Runs timed task\n        void Run(const Function<void(float)>& update, float time);\n\n        // Called function after delay\n        void Invoke(const Function<void()> func, float delay = 0.0f);\n\n        // Updates tasks and checking for done\n        void Update(float dt);\n\n    protected:\n        Vector<Ref<Task>> mTasks; // All tasks array\n\n        int mLastTaskId = 0; // Last given task id\n        \n    protected:\n        friend class Task;\n        friend class Application;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Tools/KeySearch.h",
    "content": "#pragma once\n\nnamespace o2\n{\n    template<typename _keysArrayType>\n    void SearchKey(const _keysArrayType& keys, int keysCount, float position, int& begin, int& end, bool direction,\n                   int& cacheKey)\n    {\n        begin = 0;\n        end = 1;\n\n        bool found = false;\n        if (direction)\n        {\n            if (keys[cacheKey].position < position)\n            {\n                for (int i = cacheKey + 1; i < keysCount; i++)\n                {\n                    if (keys[i].position >= position)\n                    {\n                        begin = i - 1;\n                        end = i;\n\n                        found = true;\n                        break;\n                    }\n                }\n            }\n\n            if (!found && keys[keysCount - 1].position < position)\n            {\n                begin = keysCount - 2;\n                end = keysCount - 1;\n                found = true;\n            }\n\n            if (!found)\n            {\n                for (int i = 1; i < keysCount; i++)\n                {\n                    if (keys[i].position >= position || i == keysCount - 1)\n                    {\n                        begin = i - 1;\n                        end = i;\n                        break;\n                    }\n                }\n            }\n        }\n        else\n        {\n            if (keys[cacheKey].position > position)\n            {\n                for (int i = cacheKey; i >= 0; i--)\n                {\n                    if (keys[i].position < position)\n                    {\n                        begin = i;\n                        end = i + 1;\n                        found = true;\n                        break;\n                    }\n                }\n            }\n\n            if (!found && keys[0].position > position)\n            {\n                begin = 0;\n                end = 1;\n                found = true;\n            }\n\n            if (!found)\n            {\n                for (int i = keysCount - 1; i >= 0; i--)\n                {\n                    if (keys[i].position < position || i == 0)\n                    {\n                        begin = i;\n                        end = i + 1;\n                        break;\n                    }\n                }\n            }\n        }\n\n        cacheKey = begin;\n    }\n    template<typename _keysArrayType>\n    void SearchKeyClosed(const _keysArrayType& keys, int keysCount, float position, int& begin, int& end, bool direction,\n                         int& cacheKey)\n    {\n        begin = 0;\n        end = 1;\n\n        bool found = false;\n        if (direction)\n        {\n            if (keys[cacheKey].position < position)\n            {\n                for (int i = cacheKey + 1; i < keysCount + 1; i++)\n                {\n                    int ii = i % keysCount;\n                    if (keys[ii].position >= position)\n                    {\n                        begin = ii - 1;\n                        end = ii;\n                    }\n                }\n            }\n\n            if (!found)\n            {\n                for (int i = 1; i < keysCount + 1; i++)\n                {\n                    int ii = i % keysCount;\n                    if (keys[ii].position >= position)\n                    {\n                        begin = ii - 1;\n                        end = ii;\n                        break;\n                    }\n                }\n            }\n        }\n        else\n        {\n            if (keys[cacheKey].position > position)\n            {\n                for (int i = cacheKey + 1; i >= 0; i--)\n                {\n                    int ii = i % keysCount;\n                    if (keys[ii].position < position)\n                    {\n                        begin = ii;\n                        end = ii + 1;\n                        found = true;\n                        break;\n                    }\n                }\n            }\n\n            if (!found)\n            {\n                for (int i = keysCount - 1; i >= 0; i--)\n                {\n                    int ii = i % keysCount;\n                    if (keys[ii].position < position)\n                    {\n                        begin = ii;\n                        end = ii + 1;\n                        break;\n                    }\n                }\n            }\n        }\n\n        cacheKey = begin;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Tools/RectPacker.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"RectPacker.h\"\n\nnamespace o2\n{\n    RectsPacker::RectsPacker(const Vec2F& maxSize):\n        mMaxSize(maxSize), mRectsPool(25, 25)\n    {\n    }\n\n    RectsPacker::~RectsPacker()\n    {\n        Clear();\n    }\n\n    Ref<RectsPacker::Rect> RectsPacker::AddRect(const Vec2F& size)\n    {\n        Ref<Rect> newRect = mRectsPool.Take();\n        newRect->size = size;\n        newRect->rect = RectF();\n        mRects.Add(newRect);\n        return newRect;\n    }\n\n    void RectsPacker::RemoveRect(const Ref<Rect>& remRect)\n    {\n        mRects.Remove(remRect);\n        mRectsPool.Free(remRect);\n    }\n\n    void RectsPacker::Clear()\n    {\n        for (auto& rt : mRects)\n            mRectsPool.Free(rt);\n\n        mRects.Clear();\n    }\n\n    void RectsPacker::SetMaxSize(const Vec2F& maxSize)\n    {\n        mMaxSize = maxSize;\n    }\n\n    Vec2F RectsPacker::GetMaxSize() const\n    {\n        return mMaxSize;\n    }\n\n    int RectsPacker::GetPagesCount() const\n    {\n        if (mRects.IsEmpty())\n            return 0;\n\n        return mRects.Max<int>([&](const Ref<Rect>& rt) { return rt->page; })->page + 1;\n    }\n\n    bool RectsPacker::Pack()\n    {\n        mQuadNodes.Clear();\n\n        mRects.ForEach([](const Ref<Rect>& rt) { rt->page = -1; rt->rect = RectI(); });\n        mRects.Sort([](auto a, auto b) { return a->size.y > b->size.y; });\n\n        for (auto& rt : mRects)\n        {\n            if (!InsertRect(*rt))\n                return false;\n        }\n\n        return true;\n    }\n\n\n    void RectsPacker::CreateNewPage()\n    {\n        int maxPage = -1;\n        for (auto& rt : mRects)\n            maxPage = Math::Max(maxPage, rt->page);\n\n        mQuadNodes.Add(mmake<QuadNode>(maxPage + 1, RectF(Vec2F(), mMaxSize)));\n    }\n\n    bool RectsPacker::InsertRect(Rect& rt)\n    {\n        for (auto& node : mQuadNodes)\n        {\n            if (TryInsertRect(rt, node))\n                return true;\n        }\n\n        for (auto& node : mQuadNodes)\n        {\n            if (TryInsertRectInChilds(rt, node))\n                return true;\n        }\n\n        CreateNewPage();\n\n        for (auto& node : mQuadNodes)\n        {\n            if (TryInsertRect(rt, node))\n                return true;\n        }\n\n        for (auto& node : mQuadNodes)\n        {\n            if (TryInsertRectInChilds(rt, node))\n                return true;\n        }\n\n        return false;\n    }\n\n    bool RectsPacker::TryInsertRect(Rect& rt, const Ref<QuadNode>& node)\n    {\n        if (node->free && node->rect.Width() >= rt.size.x &&\n            node->rect.Height() >= rt.size.y)\n        {\n            Vec2F leftDown = node->rect.LeftBottom();\n            Vec2F center = leftDown + rt.size;\n            Vec2F rightTop = node->rect.RightTop();\n\n            node->free = false;\n            node->AddChild(mmake<QuadNode>(node->page, RectF(leftDown.x, rightTop.y, rightTop.x, center.y)));\n            node->AddChild(mmake<QuadNode>(node->page, RectF(center.x, center.y, rightTop.x, leftDown.y)));\n\n            rt.page = node->page;\n            rt.rect = RectF(leftDown, center);\n\n            return true;\n        }\n\n        return false;\n    }\n\n\n    bool RectsPacker::TryInsertRectInChilds(Rect& rt, const Ref<QuadNode>& node)\n    {\n        for (auto& childNode : node->GetChildren())\n        {\n            if (TryInsertRect(rt, childNode))\n                return true;\n        }\n\n        for (auto& childNode : node->GetChildren())\n        {\n            if (TryInsertRectInChilds(rt, childNode))\n                return true;\n        }\n\n        return false;\n    }\n\n    RectsPacker::QuadNode::QuadNode(int page /*= 0*/, const RectF& rect /*= RectF()*/):\n        page(page), rect(rect), free(true)\n    {}\n\n    void RectsPacker::QuadNode::OnChildAdded(const Ref<QuadNode>& child)\n    {\n        child->page = page;\n    }\n\n    bool RectsPacker::QuadNode::operator==(const QuadNode& other)\n    {\n        return rect == other.rect && page == other.page && free == other.free;\n    }\n\n    RectsPacker::Rect::Rect(const Vec2F& size /*= Vec2F()*/):\n        size(size), page(-1)\n    {}\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Tools/RectPacker.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/ITree.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Types/Containers/Pool.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    // -----------------\n    // Rectangles packer\n    // -----------------\n    class RectsPacker\n    {\n    public:\n        // -----------------\n        // Packing rectangle\n        // -----------------\n        struct Rect: public RefCounterable\n        {\n            int   page; // Page index\n            RectF rect; // Rectangle on page\n            Vec2F size; // Size of rectangle\n\n        public:\n            // Constructor\n            Rect(const Vec2F& size = Vec2F());\n        };\n\n    public:\n        // Constructor\n        RectsPacker(const Vec2F&  maxSize = Vec2F(512, 512));\n\n        // Destructor\n        ~RectsPacker();\n\n        // Adds rectangle with size\n        Ref<Rect> AddRect(const Vec2F&  size);\n\n        // Removes rectangle\n        void RemoveRect(const Ref<Rect>& remRect);\n\n        // Removes all rectangles and quads\n        void Clear();\n\n        // Sets page maximum size\n        void SetMaxSize(const Vec2F&  maxSize);\n\n        // Returns page maximum size\n        Vec2F GetMaxSize() const;\n\n        // Returns pages count\n        int GetPagesCount() const;\n\n        // Tries to pack, returns true if packed successfully\n        bool Pack();\n\n    protected:\n        // ---------\n        // Quad node\n        // ---------\n        struct QuadNode: public ITreeNode<QuadNode>, public RefCounterable\n        {\n            RectF rect; // Quad rectangle on page\n            int   page; // Page index\n            bool  free; // Is quad free\n\n        public:\n            // Constructor\n            QuadNode(int page = 0, const RectF& rect = RectF());\n\n            //Calls when child quad was added\n            void OnChildAdded(const Ref<QuadNode>& child) override;\n\n            // Check equals operator\n            bool operator==(const QuadNode& other);\n        };\n\n        Vec2F mMaxSize; // Max page size\n\n        Pool<Rect>   mRectsPool; // Rectangles pool\n        Vector<Ref<Rect>> mRects;     // Rectangles\n\n        Vector<Ref<QuadNode>> mQuadNodes; // Quad nodes \n\n    protected:\n        // Tries to insert rectangle\n        bool InsertRect(Rect& rt);\n\n        // Tries to insert rectangle in specified node\n        bool TryInsertRect(Rect& rt, const Ref<QuadNode>& node);\n\n        // Tries to insert rectangle in specified node\n        bool TryInsertRectInChilds(Rect& rt, const Ref<QuadNode>& node);\n\n        // Creates new page\n        void CreateNewPage();\n    };\n\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/CommonTypes.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"CommonTypes.h\"\n\n#include \"o2/Utils/Reflection/Reflection.h\"\n// --- META ---\n\nENUM_META(o2::BaseCorner, o2__BaseCorner)\n{\n    ENUM_ENTRY(Bottom);\n    ENUM_ENTRY(Center);\n    ENUM_ENTRY(Left);\n    ENUM_ENTRY(LeftBottom);\n    ENUM_ENTRY(LeftTop);\n    ENUM_ENTRY(Right);\n    ENUM_ENTRY(RightBottom);\n    ENUM_ENTRY(RightTop);\n    ENUM_ENTRY(Top);\n}\nEND_ENUM_META;\n\nENUM_META(o2::CursorType, o2__CursorType)\n{\n    ENUM_ENTRY(AppStarting);\n    ENUM_ENTRY(Arrow);\n    ENUM_ENTRY(Cross);\n    ENUM_ENTRY(Hand);\n    ENUM_ENTRY(Help);\n    ENUM_ENTRY(IBeam);\n    ENUM_ENTRY(Icon);\n    ENUM_ENTRY(No);\n    ENUM_ENTRY(SizeAll);\n    ENUM_ENTRY(SizeNS);\n    ENUM_ENTRY(SizeNeSw);\n    ENUM_ENTRY(SizeNwSe);\n    ENUM_ENTRY(SizeWE);\n    ENUM_ENTRY(UpArrow);\n    ENUM_ENTRY(Wait);\n}\nEND_ENUM_META;\n\nENUM_META(o2::Side, o2__Side)\n{\n    ENUM_ENTRY(Bottom);\n    ENUM_ENTRY(Left);\n    ENUM_ENTRY(None);\n    ENUM_ENTRY(Right);\n    ENUM_ENTRY(Top);\n}\nEND_ENUM_META;\n\nENUM_META(o2::Corner, o2__Corner)\n{\n    ENUM_ENTRY(LeftBottom);\n    ENUM_ENTRY(LeftTop);\n    ENUM_ENTRY(RightBottom);\n    ENUM_ENTRY(RightTop);\n}\nEND_ENUM_META;\n\nENUM_META(o2::TwoDirection, o2__TwoDirection)\n{\n    ENUM_ENTRY(Horizontal);\n    ENUM_ENTRY(Vertical);\n}\nEND_ENUM_META;\n\nENUM_META(o2::SpriteMode, o2__SpriteMode)\n{\n    ENUM_ENTRY(Default);\n    ENUM_ENTRY(Fill360CCW);\n    ENUM_ENTRY(Fill360CW);\n    ENUM_ENTRY(FillDownToUp);\n    ENUM_ENTRY(FillLeftToRight);\n    ENUM_ENTRY(FillRightToLeft);\n    ENUM_ENTRY(FillUpToDown);\n    ENUM_ENTRY(FixedAspect);\n    ENUM_ENTRY(Sliced);\n    ENUM_ENTRY(Tiled);\n}\nEND_ENUM_META;\n\nENUM_META(o2::BlendMode, o2__BlendMode)\n{\n    ENUM_ENTRY(Add);\n    ENUM_ENTRY(Normal);\n}\nEND_ENUM_META;\n\nENUM_META(o2::VerAlign, o2__VerAlign)\n{\n    ENUM_ENTRY(Both);\n    ENUM_ENTRY(Bottom);\n    ENUM_ENTRY(Middle);\n    ENUM_ENTRY(Top);\n}\nEND_ENUM_META;\n\nENUM_META(o2::HorAlign, o2__HorAlign)\n{\n    ENUM_ENTRY(Both);\n    ENUM_ENTRY(Left);\n    ENUM_ENTRY(Middle);\n    ENUM_ENTRY(Right);\n}\nEND_ENUM_META;\n\nENUM_META(o2::ProtectSection, o2__ProtectSection)\n{\n    ENUM_ENTRY(Private);\n    ENUM_ENTRY(Protected);\n    ENUM_ENTRY(Public);\n}\nEND_ENUM_META;\n\nENUM_META(o2::Platform, o2__Platform)\n{\n    ENUM_ENTRY(Android);\n    ENUM_ENTRY(Linux);\n    ENUM_ENTRY(Mac);\n    ENUM_ENTRY(WebAssembly);\n    ENUM_ENTRY(Windows);\n    ENUM_ENTRY(iOS);\n}\nEND_ENUM_META;\n\nENUM_META(o2::DeviceType, o2__DeviceType)\n{\n    ENUM_ENTRY(PC);\n    ENUM_ENTRY(Phone);\n    ENUM_ENTRY(Tablet);\n}\nEND_ENUM_META;\n\nENUM_META(o2::LineType, o2__LineType)\n{\n    ENUM_ENTRY(Dash);\n    ENUM_ENTRY(Solid);\n}\nEND_ENUM_META;\n\nENUM_META(o2::PrimitiveType, o2__PrimitiveType)\n{\n    ENUM_ENTRY(Line);\n    ENUM_ENTRY(Polygon);\n    ENUM_ENTRY(PolygonWire);\n}\nEND_ENUM_META;\n\nENUM_META(o2::PixelFormat, o2__PixelFormat)\n{\n    ENUM_ENTRY(R8G8B8);\n    ENUM_ENTRY(R8G8B8A8);\n}\nEND_ENUM_META;\n\nENUM_META(o2::TextureFormat, o2__TextureFormat)\n{\n    ENUM_ENTRY(DXT5);\n    ENUM_ENTRY(R8G8B8A8);\n}\nEND_ENUM_META;\n\nENUM_META(o2::Loop, o2__Loop)\n{\n    ENUM_ENTRY(None);\n    ENUM_ENTRY(PingPong);\n    ENUM_ENTRY(Repeat);\n}\nEND_ENUM_META;\n\nENUM_META(o2::Units, o2__Units)\n{\n    ENUM_ENTRY(Centimeters);\n    ENUM_ENTRY(Inches);\n    ENUM_ENTRY(Millimeters);\n    ENUM_ENTRY(Pixels);\n}\nEND_ENUM_META;\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/CommonTypes.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Reflection/Enum.h\"\n#include \"o2/Application/VKCodes.h\"\n#include <cstdint>\n#include <cstddef>\n\nnamespace o2\n{\n    template<typename... Types>\n    class Variant;\n    using UInt64 = std::uint64_t;\n    using UInt32 = std::uint32_t;\n    using UInt16 = std::uint16_t;\n    using UInt8  = std::uint8_t;\n\n    using Int64  = std::int64_t;\n    using Int32  = std::int32_t;\n    using Int16  = std::int16_t;\n    using Int8   = std::int8_t;\n\n    using UInt   = unsigned int;\n    using ULong  = unsigned long;\n\n#if __cplusplus >= 201703L\n    using Byte = std::byte;\n#else\n    using Byte = unsigned char;\n#endif\n\n    using VertexIndex = unsigned int;\n\n    using KeyboardKey = int;\n    using CursorId = int;\n    \n    using Color32Bit = UInt;\n\n    using SceneUID = UInt64;\n\n    enum class BaseCorner { Left, Right, Top, Bottom, Center, LeftBottom, LeftTop, RightBottom, RightTop };\n\n    enum class CursorType\n    {\n        AppStarting, Arrow, Cross, Hand, Help, IBeam, Icon, No, SizeAll, SizeNeSw, SizeNS, SizeNwSe,\n        SizeWE, UpArrow, Wait\n    };\n\n    enum class Side { Left, Bottom, Right, Top, None };\n\n    enum class Corner { LeftTop, RightTop, RightBottom, LeftBottom };\n\n    enum class TwoDirection { Horizontal, Vertical };\n\n    enum class SpriteMode \n    { \n        Default, Sliced, Tiled, FixedAspect, FillLeftToRight, FillRightToLeft, FillUpToDown, FillDownToUp, \n        Fill360CW, Fill360CCW\n    };\n\n    enum class BlendMode { Normal, Add };\n\n    enum class VerAlign { Top, Middle, Bottom, Both };\n    enum class HorAlign { Left, Middle, Right, Both };\n\n    enum class ProtectSection { Public, Private, Protected };\n    \n    enum class Platform { Windows, Mac, Linux, iOS, Android, WebAssembly };\n    \n    enum class DeviceType { PC, Tablet, Phone };\n\n    enum class LineType { Solid, Dash };\n\n    enum class PrimitiveType { Polygon, PolygonWire, Line };\n\n    enum class PixelFormat { R8G8B8A8, R8G8B8 };\n\n    enum class TextureFormat { R8G8B8A8, DXT5 };\n\n    enum class Loop { None, Repeat, PingPong };\n\n    enum class Units { Pixels, Centimeters, Millimeters, Inches };\n}\n// --- META ---\n\nPRE_ENUM_META(o2::BaseCorner);\n\nPRE_ENUM_META(o2::CursorType);\n\nPRE_ENUM_META(o2::Side);\n\nPRE_ENUM_META(o2::Corner);\n\nPRE_ENUM_META(o2::TwoDirection);\n\nPRE_ENUM_META(o2::SpriteMode);\n\nPRE_ENUM_META(o2::BlendMode);\n\nPRE_ENUM_META(o2::VerAlign);\n\nPRE_ENUM_META(o2::HorAlign);\n\nPRE_ENUM_META(o2::ProtectSection);\n\nPRE_ENUM_META(o2::Platform);\n\nPRE_ENUM_META(o2::DeviceType);\n\nPRE_ENUM_META(o2::LineType);\n\nPRE_ENUM_META(o2::PrimitiveType);\n\nPRE_ENUM_META(o2::PixelFormat);\n\nPRE_ENUM_META(o2::TextureFormat);\n\nPRE_ENUM_META(o2::Loop);\n\nPRE_ENUM_META(o2::Units);\n// --- END META ---\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/Containers/Map.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Debug/Assert.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include <map>\n\nnamespace o2\n{\n#if ENABLE_MEMORY_ANALYZE\n#define OPTIONAL_BASE_MAP , public MemoryAnalyzeObject\n#else\n#define OPTIONAL_BASE_MAP\n#endif\n\n    // ----------\n    // Dictionary\n    // ----------\n    template<typename _key_type, typename _value_type>\n    class Map : public std::map<_key_type, _value_type> OPTIONAL_BASE_MAP\n    {\n    public:\n        using KeyValuePair = typename std::map<_key_type, _value_type>::value_type;\n        using Iterator = typename std::map<_key_type, _value_type>::iterator;\n        using ConstIterator = typename std::map<_key_type, _value_type>::const_iterator;\n\n    public:\n        // Default constructor\n        Map();\n\n        // Copy-constructor\n        Map(const Map& other);\n\n        // Constructor from initializer list\n        Map(std::initializer_list<KeyValuePair> init);\n\n        // Destructor\n        ~Map();\n\n        // Check equals operator\n        bool operator==(const Map& other) const;\n\n        // Check not equals operator\n        bool operator!=(const Map& other) const;\n\n        // Copy-operator\n        Map& operator=(const Map& other);\n\n        // Adds element\n        void Add(const _key_type& key, const _value_type& value);\n\n        // Adds element\n        void Add(const KeyValuePair& keyValue);\n\n        // Adds elements from other dictionary\n        void Add(const Map& other);\n\n        // Removes element by key\n        void Remove(const _key_type& key);\n\n        // Removes all which pass function\n        void RemoveAll(const Function<bool(const _key_type&, const _value_type&)>& match);\n\n        // Removes all elements\n        void Clear();\n\n        // Returns true if contains element with specified key\n        bool ContainsKey(const _key_type& key) const;\n\n        // Returns true if contains element with specified value\n        bool ContainsValue(const _value_type& value) const;\n\n        // Returns true if contains same element\n        bool Contains(const KeyValuePair& keyValue) const;\n\n        // Returns true if contains element which pass function\n        bool Contains(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Returns element by key\n        KeyValuePair FindKey(const _key_type& key) const;\n\n        // Returns element by value\n        KeyValuePair FindValue(const _value_type& value) const;\n\n        // Returns first element which pass function\n        KeyValuePair Find(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Returns last element which pass function\n        KeyValuePair FindLast(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Returns all elements which pass function\n        Map FindAll(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Returns all elements which pass function\n        Map Where(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Returns first element which pass function\n        KeyValuePair First(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Returns last element which pass function\n        KeyValuePair Last(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Sets value by key\n        void Set(const _key_type& key, const _value_type& value);\n\n        // Returns value reference by key\n        _value_type& Get(const _key_type& key);\n\n        // Returns constant value reference by key\n        const _value_type& Get(const _key_type& key) const;\n\n        // Tries to get value by key, returns true if found\n        bool TryGetValue(const _key_type& key, _value_type& output) const;\n\n        // Returns value reference by index\n        KeyValuePair GetIdx(int index) const;\n\n        // Returns count of elements\n        int Count() const;\n\n        // Returns count of elements which pass function\n        int Count(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Returns true when no elements\n        bool IsEmpty() const;\n\n        // Invokes function for all elements\n        void ForEach(const Function<void(const _key_type&, _value_type&)>& func);\n\n        // Returns minimal element by selector returned values\n        template<typename _sel_type>\n        KeyValuePair Min(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const;\n\n        // Returns minimal element index by selector returned values\n        template<typename _sel_type>\n        int MinIdx(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const;\n\n        // Returns maximal element by selector returned values\n        template<typename _sel_type>\n        KeyValuePair Max(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const;\n\n        // Returns maximal element index by selector returned values\n        template<typename _sel_type>\n        int MaxIdx(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const;\n\n        // Returns true when all elements pass function\n        bool All(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Returns true when any of elements pass function\n        bool Any(const Function<bool(const _key_type&, const _value_type&)>& match) const;\n\n        // Returns sum of selector results for all elements\n        template<typename _sel_type>\n        _sel_type Sum(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const;\n\n        // Returns begin iterator\n        Iterator Begin() { return std::map<_key_type, _value_type>::begin(); }\n\n        // Returns end iterator\n        Iterator End() { return std::map<_key_type, _value_type>::end(); }\n\n        // Returns constant begin iterator\n        ConstIterator Begin() const { return std::map<_key_type, _value_type>::cbegin(); }\n\n        // Returns constant end iterator\n        ConstIterator End() const { return std::map<_key_type, _value_type>::cend(); }\n\n#if ENABLE_MEMORY_ANALYZE\n        void IterateChildren(const std::function<void(MemoryAnalyzeObject*)>& callback) override\n        {\n            if constexpr (std::is_base_of_v<MemoryAnalyzeObject, _key_type> || std::is_base_of_v<MemoryAnalyzeObject, _value_type>)\n            {\n                for (auto& pair : *this)\n                {\n                     if constexpr (std::is_base_of_v<MemoryAnalyzeObject, _key_type>)\n                         callback(const_cast<_key_type*>(&pair.first));\n\n                    if constexpr (std::is_base_of_v<MemoryAnalyzeObject, _value_type>)\n                        callback(&pair.second);\n                }\n            }\n        }\n\n        void IterateAllocations(const std::function<void(std::byte*, size_t)>& callback) override\n        {\n            for (auto& pair : *this)\n            {\n               callback(reinterpret_cast<std::byte*>(&pair), sizeof(pair));\n            }\n        }\n\n        std::byte* GetMemory() const override { return const_cast<std::byte*>(reinterpret_cast<const std::byte*>(this)); }\n        size_t GetMemorySize() const override { return sizeof(*this); }\n\n        const std::type_info& GetTypeInfo() const override { return typeid(Map<_key_type, _value_type>); }\n#endif\n    };\n\n    template<typename _key_type, typename _value_type>\n    Map<_key_type, _value_type>::Map()\n    {}\n\n    template<typename _key_type, typename _value_type>\n    Map<_key_type, _value_type>::Map(const Map<_key_type, _value_type>& other):\n        std::map<_key_type, _value_type>(other)\n    { }\n\n    template<typename _key_type, typename _value_type>\n    Map<_key_type, _value_type>::Map(std::initializer_list<KeyValuePair> init):\n        std::map<_key_type, _value_type>(init)\n    {}\n\n    template<typename _key_type, typename _value_type>\n    Map<_key_type, _value_type>::~Map()\n    {}\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::operator==(const Map& other) const\n    {\n        return std::operator==((const std::map<_key_type, _value_type>&)*this, (const std::map<_key_type, _value_type>&)other);\n    }\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::operator!=(const Map& other) const\n    {\n        return std::operator!=((const std::map<_key_type, _value_type>&)*this, (const std::map<_key_type, _value_type>&)other);\n    }\n\n    template<typename _key_type, typename _value_type>\n    Map<_key_type, _value_type>& Map<_key_type, _value_type>::operator=(const Map& other)\n    {\n        std::map<_key_type, _value_type>::operator=(other);\n        return *this;\n    }\n\n    template<typename _key_type, typename _value_type>\n    void Map<_key_type, _value_type>::Add(const _key_type& key, const _value_type& value)\n    {\n        std::map<_key_type, _value_type>::insert({ key, value });\n    }\n\n    template<typename _key_type, typename _value_type>\n    void Map<_key_type, _value_type>::Add(const KeyValuePair& keyValue)\n    {\n        std::map<_key_type, _value_type>::insert(keyValue);\n    }\n\n    template<typename _key_type, typename _value_type>\n    void Map<_key_type, _value_type>::Add(const Map& other)\n    {\n        for (auto& kv : other)\n            Add(kv.first, kv.second);\n    }\n\n    template<typename _key_type, typename _value_type>\n    void Map<_key_type, _value_type>::Remove(const _key_type& key)\n    {\n        std::map<_key_type, _value_type>::erase(key);\n    }\n\n    template<typename _key_type, typename _value_type>\n    void Map<_key_type, _value_type>::Clear()\n    {\n        std::map<_key_type, _value_type>::clear();\n    }\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::ContainsKey(const _key_type& key) const\n    {\n        return std::map<_key_type, _value_type>::find(key) != std::map<_key_type, _value_type>::end();\n    }\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::ContainsValue(const _value_type& value) const\n    {\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (it->second == value)\n                return true;\n        }\n\n        return false;\n    }\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::Contains(const KeyValuePair& keyValue) const\n    {\n        auto fnd = std::map<_key_type, _value_type>::find(keyValue.first);\n        return fnd != std::map<_key_type, _value_type>::end() && fnd->second == keyValue.second;\n    }\n\n    template<typename _key_type, typename _value_type>\n    typename Map<_key_type, _value_type>::KeyValuePair Map<_key_type, _value_type>::FindKey(const _key_type& key) const\n    {\n        auto fnd = std::map<_key_type, _value_type>::find(key);\n        if (fnd != std::map<_key_type, _value_type>::end())\n            return { fnd->first, fnd->second };\n\n        return KeyValuePair();\n    }\n\n    template<typename _key_type, typename _value_type>\n    typename Map<_key_type, _value_type>::KeyValuePair Map<_key_type, _value_type>::FindValue(const _value_type& value) const\n    {\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (it->second == value)\n                return { it->first, it->second };\n        }\n\n        return KeyValuePair();\n    }\n\n    template<typename _key_type, typename _value_type>\n    void Map<_key_type, _value_type>::Set(const _key_type& key, const _value_type& value)\n    {\n        auto fnd = std::map<_key_type, _value_type>::find(key);\n        if (fnd != std::map<_key_type, _value_type>::end())\n            fnd->second = value;\n        else\n            std::map<_key_type, _value_type>::insert({ key, value });\n    }\n\n    template<typename _key_type, typename _value_type>\n    _value_type& Map<_key_type, _value_type>::Get(const _key_type& key)\n    {\n        auto fnd = std::map<_key_type, _value_type>::find(key);\n        if (fnd != std::map<_key_type, _value_type>::end())\n            return fnd->second;\n\n        Assert(false, \"Failed to get value from dictionary: not found key\");\n\n        static _value_type fake;\n        return fake;\n    }\n\n    template<typename _key_type, typename _value_type>\n    const _value_type& Map<_key_type, _value_type>::Get(const _key_type& key) const\n    {\n        auto fnd = std::map<_key_type, _value_type>::find(key);\n        if (fnd != std::map<_key_type, _value_type>::end())\n            return fnd->second;\n\n        Assert(false, \"Failed to get value from dictionary: not found key\");\n\n        static _value_type fake;\n        return fake;\n    }\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::TryGetValue(const _key_type& key, _value_type& output) const\n    {\n        auto fnd = std::map<_key_type, _value_type>::find(key);\n        if (fnd != std::map<_key_type, _value_type>::end())\n        {\n            output = fnd->second;\n            return true;\n        }\n\n        return false;\n    }\n\n    template<typename _key_type, typename _value_type>\n    typename Map<_key_type, _value_type>::KeyValuePair Map<_key_type, _value_type>::GetIdx(int index) const\n    {\n        int i = 0; \n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (i == index)\n                return { it->first, it->second };\n\n            i++;\n        }\n\n        return KeyValuePair();\n    }\n\n    template<typename _key_type, typename _value_type>\n    int Map<_key_type, _value_type>::Count() const\n    {\n        return (int)std::map<_key_type, _value_type>::size();\n    }\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::IsEmpty() const\n    {\n        return std::map<_key_type, _value_type>::empty();\n    }\n\n    template<typename _key_type, typename _value_type>\n    void Map<_key_type, _value_type>::ForEach(const Function<void(const _key_type&, _value_type&)>& func)\n    {\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n            func(it->first, it->second);\n    }\n\n    template<typename _key_type, typename _value_type>\n    int Map<_key_type, _value_type>::Count(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        int res = 0; \n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (match(it->first, it->second))\n                res++;\n        }\n\n        return res;\n    }\n\n    template<typename _key_type, typename _value_type>\n    typename Map<_key_type, _value_type>::KeyValuePair Map<_key_type, _value_type>::Last(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        for (auto it = std::map<_key_type, _value_type>::rbegin(); it != std::map<_key_type, _value_type>::rend(); ++it)\n        {\n            if (match(it->first, it->second))\n                return { it->first, it->second };\n        }\n\n        return KeyValuePair();\n    }\n\n    template<typename _key_type, typename _value_type>\n    typename Map<_key_type, _value_type>::KeyValuePair Map<_key_type, _value_type>::First(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (match(it->first, it->second))\n                return { it->first, it->second };\n        }\n\n        return KeyValuePair();\n    }\n\n    template<typename _key_type, typename _value_type>\n    typename Map<_key_type, _value_type>::KeyValuePair Map<_key_type, _value_type>::FindLast(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        return Last(match);\n    }\n\n    template<typename _key_type, typename _value_type>\n    typename Map<_key_type, _value_type>::KeyValuePair Map<_key_type, _value_type>::Find(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        return Find(match);\n    }\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::Contains(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        for (auto it = std::map<_key_type, _value_type>::rbegin(); it != std::map<_key_type, _value_type>::rend(); ++it)\n        {\n            if (match(it->first, it->second))\n                return true;\n        }\n\n        return false;\n    }\n\n    template<typename _key_type, typename _value_type>\n    void Map<_key_type, _value_type>::RemoveAll(const Function<bool(const _key_type&, const _value_type&)>& match)\n    {\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end();)\n        {\n            if (match(it->first, it->second)) \n                it = erase(it);\n            else \n                ++it;\n        }\n    }\n\n    template<typename _key_type, typename _value_type>\n    template<typename _sel_type>\n    _sel_type Map<_key_type, _value_type>::Sum(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const\n    {\n        _sel_type res = _sel_type();\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n            res += res + selector(it->first, it->second);\n\n        return res;\n    }\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::Any(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (match(it->first, it->second))\n                return true;\n        }\n\n        return false;\n    }\n\n    template<typename _key_type, typename _value_type>\n    bool Map<_key_type, _value_type>::All(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (!match(it->first, it->second))\n                return false;\n        }\n\n        return true;\n    }\n\n    template<typename _key_type, typename _value_type>\n    template<typename _sel_type>\n    int Map<_key_type, _value_type>::MaxIdx(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const\n    {\n        int idx = 0;\n        int maxIdx = 0;\n        _sel_type maxVal;\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (it == std::map<_key_type, _value_type>::begin())\n                maxVal = selector(it->first, it->second);\n            else\n            {\n                _sel_type val = selector(it->first, it->second);\n                if (val > maxVal)\n                {\n                    maxVal = val;\n                    maxIdx = idx;\n                }\n            }\n\n            idx++;\n        }\n\n        return idx;\n    }\n\n    template<typename _key_type, typename _value_type>\n    template<typename _sel_type>\n    typename Map<_key_type, _value_type>::KeyValuePair Map<_key_type, _value_type>::Max(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const\n    {\n        _sel_type maxVal;\n        KeyValuePair res;\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (it == std::map<_key_type, _value_type>::begin())\n            {\n                maxVal = selector(it->first, it->second);\n                res = { it->first, it->second };\n            }\n            else\n            {\n                _sel_type val = selector(it->first, it->second);\n                if (val > maxVal)\n                {\n                    maxVal = val;\n                    res = { it->first, it->second };\n                }\n            }\n        }\n\n        return res;\n    }\n\n    template<typename _key_type, typename _value_type>\n    template<typename _sel_type>\n    int Map<_key_type, _value_type>::MinIdx(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const\n    {\n        int idx = 0;\n        int minIdx = 0;\n        _sel_type minVal;\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (it == std::map<_key_type, _value_type>::begin())\n                minVal = selector(it->first, it->second);\n            else\n            {\n                _sel_type val = selector(it->first, it->second);\n                if (val < minVal)\n                {\n                    minVal = val;\n                    minIdx = idx;\n                }\n            }\n\n            idx++;\n        }\n\n        return idx;\n    }\n\n    template<typename _key_type, typename _value_type>\n    template<typename _sel_type>\n    typename Map<_key_type, _value_type>::KeyValuePair Map<_key_type, _value_type>::Min(const Function<_sel_type(const _key_type&, const _value_type&)>& selector) const\n    {\n        _sel_type minVal;\n        KeyValuePair res;\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (it == std::map<_key_type, _value_type>::begin())\n            {\n                minVal = selector(it->first, it->second);\n                res = { it->first, it->second };\n            }\n            else\n            {\n                _sel_type val = selector(it->first, it->second);\n                if (val < minVal)\n                {\n                    minVal = val;\n                    res = { it->first, it->second };\n                }\n            }\n        }\n\n        return res;\n    }\n\n    template<typename _key_type, typename _value_type>\n    Map<_key_type, _value_type> Map<_key_type, _value_type>::Where(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        Map res;\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (match(it->first, it->second))\n                res.Add(it->first, it->second);\n        }\n\n        return res;\n    }\n\n    template<typename _key_type, typename _value_type>\n    Map<_key_type, _value_type> Map<_key_type, _value_type>::FindAll(const Function<bool(const _key_type&, const _value_type&)>& match) const\n    {\n        Map res;\n        for (auto it = std::map<_key_type, _value_type>::begin(); it != std::map<_key_type, _value_type>::end(); ++it)\n        {\n            if (match(it->first, it->second))\n                res.Add(it->first, it->second);\n        }\n\n        return res;\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/Containers/Pair.h",
    "content": "#pragma once\n\n#include <utility>\n\nnamespace o2\n{\n    template<typename _key_type, typename _value_type>\n    using Pair = std::pair<_key_type, _value_type>;\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/Containers/Pool.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Containers/Vector.h\"\n\nnamespace o2\n{\n    // ----------------------\n    // Pool objects container\n    // ----------------------\n    template<typename _type>\n    class Pool\n    {\n        Vector<Ref<_type>> mObjects;   // Cached objects\n        int                mChunkSize; // Cache resize size\n\n    public:\n        // Constructor\n        Pool(int initialCount = 5, int chunkSize = 5);\n\n        // Destructor\n        ~Pool();\n\n        // Sets chunk size - cache resize size\n        void SetChunkSize(int chunkSize);\n\n        // Returns chunk size - cache resize size\n        int  GetChunkSize() const;\n\n        // Takes object from cached and returns him\n        Ref<_type> Take();\n\n        // Frees object and puts into cached\n        void Free(const Ref<_type>& obj);\n\n        // Creates cached object\n        void CreateObjects(int count);\n    };\n\n\n    template<typename _type>\n    Pool<_type>::Pool(int initialCount /*= 5*/, int chunkSize /*= 5*/):\n        mChunkSize(chunkSize)\n    {\n        CreateObjects(initialCount);\n    }\n\n    template<typename _type>\n    Pool<_type>::~Pool()\n    {\n        mObjects.Clear();\n    }\n\n    template<typename _type>\n    void Pool<_type>::SetChunkSize(int chunkSize)\n    {\n        mChunkSize = chunkSize;\n    }\n\n    template<typename _type>\n    int Pool<_type>::GetChunkSize() const\n    {\n        return mChunkSize;\n    }\n\n    template<typename _type>\n    Ref<_type> Pool<_type>::Take()\n    {\n        if (mObjects.Count() == 0)\n            CreateObjects(mChunkSize);\n\n        return mObjects.PopBack();\n    }\n\n    template<typename _type>\n    void Pool<_type>::Free(const Ref<_type>& obj)\n    {\n        mObjects.Add(obj);\n    }\n\n    template<typename _type>\n    void Pool<_type>::CreateObjects(int count)\n    {\n        for (int i = 0; i < count; i++)\n            mObjects.Add(mmake<_type>());\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/Containers/Vector.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Debug/Assert.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Memory/MemoryAnalyzeableObject.h\"\n#include \"o2/Utils/Memory/MemoryManager.h\"\n#include <algorithm>\n#include <vector>\n\nnamespace o2\n{\n#if ENABLE_MEMORY_ANALYZE\n#define OPTIONAL_BASE_VECTOR , public MemoryAnalyzeObject\n#else\n#define OPTIONAL_BASE_VECTOR\n#endif\n\n    // --------------------\n    // Dynamic linear array\n    // --------------------\n    template<typename _type>\n    class Vector : public std::vector<_type> OPTIONAL_BASE_VECTOR\n    {\n    public:\n        typedef typename std::vector<_type>::iterator Iterator;\n        typedef typename std::vector<_type>::const_iterator ConstIterator;\n        typedef _type ElementType;\n\n    public:\n        // Constructor by initial capacity\n        Vector();\n\n        // Constructor from initializer list\n        Vector(std::initializer_list<_type> init);\n\n        // Copy-constructor\n        Vector(const Vector& arr);\n\n        // Move-constructor\n        Vector(Vector&& arr);\n\n        // Assign operator\n        Vector& operator=(const Vector& arr);\n\n        // Move operator\n        Vector& operator=(Vector&& arr);\n\n        // Plus operator - returns sum of this array and other elements\n        Vector operator+(const Vector& arr) const;\n\n        // Plus and assign operator - adding elements to this from other array\n        Vector& operator+=(const Vector& arr);\n\n        // Plus operator - returns vector with this elements and one more\n        Vector operator+(const _type& value) const;\n\n        // Plus and assign operator - adds element to this\n        Vector& operator+=(const _type& value);\n\n        // Minus operator - returns new vector, where removed elements\n        Vector operator-(const Vector& arr) const;\n\n        // Minus and assign operator - removes elements from array\n        Vector& operator-=(const Vector& arr);\n\n        // Minus operator - returns new vector without specified element\n        Vector operator-(const _type& value) const;\n\n        // Minus and assign operator - removes element from array\n        Vector& operator-=(const _type& value);\n\n        // Equal operator\n        bool operator==(const Vector& arr) const;\n\n        // Not equal operator\n        bool operator!=(const Vector& arr) const;\n\n        // Returns a copy of this\n        Vector<_type>* Clone() const;\n\n        // Returns data pointer\n        _type* Data();\n\n        // Returns count of elements in vector\n        int Count() const;\n\n        // Returns count of elements in array by lambda\n        int Count(const Function<bool(const _type&)>& match) const;\n\n        // Returns true if array is empty\n        bool IsEmpty() const;\n\n        // Returns capacity of vector\n        int Capacity() const;\n\n        // Changes count of elements in array. If new size less than array size elements will be removed\n        // Otherwise empty elements will be added at end\n        void Resize(int newCount);\n\n        // Changes capacity of vector. New capacity can't be less than current\n        void Reserve(int newCapacity);\n\n        // Reduces memory usage by freeing unused memory\n        void ShrinkToFit();\n\n        // Returns value at index\n        const _type& Get(int idx) const;\n\n        // Returns value at index\n        _type& Get(int idx);\n\n        // Sets value at index\n        void Set(int idx, const _type& value);\n\n        // Adds new element\n        _type& Add(const _type& value);\n\n        // Adds elements from other array\n        void Add(const Vector<_type>& arr);\n\n        // Inserts new value at position\n        _type& Insert(const _type& value, int position);\n\n        // Inserts new values from other array at position\n        void Insert(const Vector<_type>& arr, int position);\n\n        // Returns index of equal element. Returns -1 when array haven't equal element\n        int IndexOf(const _type& value) const;\n\n        // Returns index of first element that pass function\n        int IndexOf(const Function<bool(const _type&)>& match) const;\n\n        // Returns true, if array contains the element\n        bool Contains(const _type& value) const;\n\n        // Removes element from back and returns him\n        _type PopBack();\n\n        // Removes equal array element\n        void Remove(const _type& value);\n\n        // Removes equal array elements from other array\n        void Remove(const Vector<_type>& arr);\n\n        // Removes element by iterator\n        Iterator Remove(const Iterator& it);\n\n        // Removes elements by iterators range\n        Iterator Remove(const Iterator& first, const Iterator& last);\n\n        // Removes element at position\n        void RemoveAt(int idx);\n\n        // Removes elements in range\n        void RemoveRange(int first, int last);\n\n        // Removes matched array element\n        void RemoveFirst(const Function<bool(const _type&)>& match);\n\n        // Removes all elements that pass function\n        void RemoveAll(const Function<bool(const _type&)>& match);\n\n        // Removes all elements\n        void Clear();\n\n        // Returns true, if array contains a element that pass function\n        bool Contains(const Function<bool(const _type&)>& match) const;\n\n        // Returns elements of array that pass function\n        const _type* Find(const Function<bool(const _type&)>& match) const;\n\n        // Returns elements of array that pass function\n        _type* Find(const Function<bool(const _type&)>& match);\n\n        // Returns elements of array that pass function or default value\n        _type FindOrDefault(const Function<bool(const _type&)>& match) const;\n\n        // Sorts elements in array by sorting value, that gets from function\n        template<typename _sort_type>\n        void SortBy(const Function<_sort_type(const _type&)>& selector);\n\n        // Returns first element\n        _type& First();\n\n        // Returns first element\n        const _type& First() const;\n\n        // Returns first element that pass function\n        const _type* First(const Function<bool(const _type&)>& match) const;\n\n        // Returns first element that pass function\n        _type* First(const Function<bool(const _type&)>& match);\n\n        // Returns last element\n        _type& Last();\n\n        // Returns constant last element\n        const _type& Last() const;\n\n        // Returns last element that pass function\n        const _type* Last(const Function<bool(const _type&)>& match) const;\n\n        // Returns last element that pass function\n        _type* Last(const Function<bool(const _type&)>& match);\n\n        // Returns index of last element that pass function\n        int LastIndexOf(const Function<bool(const _type&)>& match) const;\n\n        // Returns element by minimal result of function\n        template<typename _sel_type>\n        _type Min(const Function<_sel_type(const _type&)>& selector) const;\n\n        // Returns element index by minimal result of function\n        template<typename _sel_type>\n        int MinIdx(const Function<_sel_type(const _type&)>& selector) const;\n\n        // Returns element by maximal result of function\n        template<typename _sel_type>\n        _type Max(const Function<_sel_type(const _type&)>& selector) const;\n\n        // Returns element index by maximal result of function\n        template<typename _sel_type>\n        int MaxIdx(const Function<_sel_type(const _type&)>& selector) const;\n\n        // Returns all elements that pass function\n        bool All(const Function<bool(const _type&)>& match) const;\n\n        // Returns true if any of elements pass function\n        bool Any(const Function<bool(const _type&)>& match) const;\n\n        // Returns sum of function results for all elements\n        template<typename _sel_type>\n        _sel_type Sum(const Function<_sel_type(const _type&)>& selector) const;\n\n        // Invokes function for all elements in array\n        void ForEach(const Function<void(_type&)>& func);\n\n        // Invokes function for all elements in array\n        void ForEach(const Function<void(const _type&)>& func) const;\n\n        // Reversing array\n        void Reverse();\n\n        // Sorts elements in array by predicate\n        void Sort(const Function<bool(const _type&, const _type&)>& pred = Math::Fewer);\n\n        // Returns copy with sorts elements in array by predicate\n        Vector Sorted(const Function<bool(const _type&, const _type&)>& pred = Math::Fewer);\n\n        // Return vector of elements which pass function\n        Vector FindAll(const Function<bool(const _type&)>& match) const;\n\n        // Return vector of elements which pass function\n        Vector Where(const Function<bool(const _type&)>& match) const;\n\n        // Return vector of function results of all elements\n        template<typename _sel_type>\n        Vector<_sel_type> Convert(const Function<_sel_type(const _type&)>& selector) const;\n\n        // Return vector with casted type\n        template<typename _sel_type>\n        Vector<_sel_type> Cast() const;\n\n        // Return vector with dynamic casted type\n        template<typename _sel_type>\n        Vector<_sel_type> DynamicCast() const;\n\n        // Returns first specified count elements\n        Vector Take(int count) const;\n\n        // Returns array from begin to end\n        Vector Take(int begin, int end) const;\n\n        // Returns begin iterator\n        Iterator Begin();\n\n        // Returns end iterator\n        Iterator End();\n\n        // Returns constant begin iterator\n        ConstIterator Begin() const;\n\n        // Returns constant end iterator\n        ConstIterator End() const;\n\n#if ENABLE_MEMORY_ANALYZE\n        std::byte* GetMemory() const override { return const_cast<std::byte*>(reinterpret_cast<const std::byte*>(std::vector<_type>::data())); }\n        size_t GetMemorySize() const { return Count() * sizeof(_type) + sizeof(*this); }\n        //void IterateChildren(const std::function<void(const String&, MemoryAnalyzeObject*)>& callback) {}\n        const std::type_info& GetTypeInfo() const override { return typeid(Vector<_type>); }\n#endif\n    };\n\n    template<typename _type>\n    Vector<_type>::Vector() :\n        std::vector<_type>()\n    {}\n\n    template<typename _type>\n    Vector<_type>::Vector(std::initializer_list<_type> init) :\n        std::vector<_type>(init)\n    {}\n\n    template<typename _type>\n    Vector<_type>::Vector(const Vector& arr) :\n        std::vector<_type>((const std::vector<_type>&)arr)\n    {}\n\n    template<typename _type>\n    Vector<_type>::Vector(Vector&& arr):\n        std::vector<_type>((std::vector<_type>&&)arr)\n    {}\n\n    template<typename _type>\n    _type* Vector<_type>::Data()\n    {\n        return std::vector<_type>::data();\n    }\n\n    template<typename _type>\n    Vector<_type>* Vector<_type>::Clone() const\n    {\n        return mnew Vector<_type>(this);\n    }\n\n    template<typename _type>\n    Vector<_type>& Vector<_type>::operator=(const Vector<_type>& arr)\n    {\n        std::vector<_type>::operator=(arr);\n        return *this;\n    }\n\n    template<typename _type>\n    Vector<_type>& Vector<_type>::operator=(Vector&& arr)\n    {\n        std::vector<_type>::operator=(arr);\n        return *this;\n    }\n\n    template<typename _type>\n    Vector<_type> Vector<_type>::operator+(const Vector<_type>& arr) const\n    {\n        Vector<_type> res(*this);\n        res.Add(arr);\n        return res;\n    }\n\n    template<typename _type>\n    Vector<_type>& Vector<_type>::operator+=(const Vector<_type>& arr)\n    {\n        Add(arr);\n        return *this;\n    }\n\n    template<typename _type>\n    Vector<_type> Vector<_type>::operator+(const _type& value) const\n    {\n        Vector<_type> res(*this);\n        res.Add(value);\n        return res;\n    }\n\n    template<typename _type>\n    Vector<_type>& Vector<_type>::operator+=(const _type& value)\n    {\n        Add(value);\n        return *this;\n    }\n\n\n    template<typename _type>\n    Vector<_type> Vector<_type>::operator-(const Vector<_type>& arr) const\n    {\n        Vector<_type> res(*this);\n        res.Remove(arr);\n        return res;\n    }\n\n    template<typename _type>\n    Vector<_type>& Vector<_type>::operator-=(const Vector<_type>& arr)\n    {\n        Remove(arr);\n        return *this;\n    }\n\n    template<typename _type>\n    Vector<_type> Vector<_type>::operator-(const _type& value) const\n    {\n        Vector<_type> res(*this);\n        res.Remove(value);\n        return res;\n    }\n\n    template<typename _type>\n    Vector<_type>& Vector<_type>::operator-=(const _type& value)\n    {\n        Remove(value);\n        return *this;\n    }\n\n    template<typename _type>\n    bool Vector<_type>::operator==(const Vector<_type>& arr) const\n    {\n        if (arr.size() != std::vector<_type>::size())\n            return false;\n\n        for (unsigned int i = 0; i < std::vector<_type>::size(); i++)\n        {\n            if (!((*this)[i] == arr[i]))\n                return false;\n        }\n\n        return true;\n    }\n\n    template<typename _type>\n    bool Vector<_type>::operator!=(const Vector<_type>& arr) const\n    {\n        return !(*this == arr);\n    }\n\n    template<typename _type>\n    int Vector<_type>::Count() const\n    {\n        return (int)std::vector<_type>::size();\n    }\n\n    template<typename _type>\n    int Vector<_type>::Capacity() const\n    {\n        return std::vector<_type>::capacity();\n    }\n\n    template<typename _type>\n    void Vector<_type>::Resize(int newCount)\n    {\n        std::vector<_type>::resize(newCount);\n    }\n\n    template<typename _type>\n    void Vector<_type>::Reserve(int newCapacity)\n    {\n        std::vector<_type>::reserve(newCapacity);\n    }\n\n    template<typename _type>\n    void Vector<_type>::ShrinkToFit()\n    {\n        std::vector<_type>::shrink_to_fit();\n    }\n\n    template<typename _type>\n    const _type& Vector<_type>::Get(int idx) const\n    {\n        return std::vector<_type>::at(idx);\n    }\n\n    template<typename _type>\n    _type& Vector<_type>::Get(int idx)\n    {\n        return std::vector<_type>::at(idx);\n    }\n\n    template<typename _type>\n    void Vector<_type>::Set(int idx, const _type& value)\n    {\n        (*this)[idx] = value;\n    }\n\n    template<typename _type>\n    _type& Vector<_type>::Add(const _type& value)\n    {\n        std::vector<_type>::push_back(value);\n        return (*this)[std::vector<_type>::size() - 1];\n    }\n\n    template<typename _type>\n    void Vector<_type>::Add(const Vector<_type>& arr)\n    {\n        std::vector<_type>::insert(std::vector<_type>::end(), arr.begin(), arr.end());\n    }\n\n    template<typename _type>\n    _type Vector<_type>::PopBack()\n    {\n        _type res = std::vector<_type>::back();\n        std::vector<_type>::pop_back();\n        return res;\n    }\n\n    template<typename _type>\n    _type& Vector<_type>::Insert(const _type& value, int position)\n    {\n        std::vector<_type>::insert(std::vector<_type>::begin() + position, value);\n        return std::vector<_type>::at(position);\n    }\n\n    template<typename _type>\n    void Vector<_type>::Insert(const Vector<_type>& arr, int position)\n    {\n        std::vector<_type>::insert(std::vector<_type>::begin() + position, arr.begin(), arr.end());\n    }\n\n    template<typename _type>\n    int Vector<_type>::IndexOf(const _type& value) const\n    {\n        auto fnd = std::find(std::vector<_type>::begin(), std::vector<_type>::end(), value);\n        if (fnd == std::vector<_type>::end())\n            return -1;\n\n        return (int)(fnd - std::vector<_type>::begin());\n    }\n\n    template<typename _type>\n    bool Vector<_type>::Contains(const _type& value) const\n    {\n        return std::find(std::vector<_type>::begin(), std::vector<_type>::end(), value) != std::vector<_type>::end();\n    }\n\n    template<typename _type>\n    void Vector<_type>::RemoveAt(int idx)\n    {\n        std::vector<_type>::erase(std::vector<_type>::begin() + idx);\n    }\n\n    template<typename _type>\n    void Vector<_type>::RemoveRange(int first, int last)\n    {\n        std::vector<_type>::erase(std::vector<_type>::begin() + first, std::vector<_type>::begin() + last);\n    }\n\n    template<typename _type>\n    void Vector<_type>::Remove(const _type& value)\n    {\n        auto fnd = std::find(std::vector<_type>::begin(), std::vector<_type>::end(), value);\n        if (fnd != std::vector<_type>::end())\n            std::vector<_type>::erase(fnd);\n    }\n\n    template<typename _type>\n    void Vector<_type>::Remove(const Vector<_type>& arr)\n    {\n        for (auto it = arr.begin(); it != arr.end(); ++it)\n            Remove(*it);\n    }\n\n    template<typename _type>\n    typename Vector<_type>::Iterator Vector<_type>::Remove(const Iterator& first, const Iterator& last)\n    {\n        return std::vector<_type>::erase(first, last);\n    }\n\n    template<typename _type>\n    typename Vector<_type>::Iterator Vector<_type>::Remove(const Iterator& it)\n    {\n        return std::vector<_type>::erase(it);\n    }\n\n    template<typename _type>\n    void Vector<_type>::RemoveFirst(const Function<bool(const _type&)>& match)\n    {\n        for (auto it = std::vector<_type>::begin(); it != std::vector<_type>::end(); ++it)\n        {\n            if (match(*it))\n            {\n                std::vector<_type>::erase(it);\n                return;\n            }\n        }\n    }\n\n    template<typename _type>\n    void Vector<_type>::Clear()\n    {\n        std::vector<_type>::clear();\n    }\n\n    template<typename _type>\n    bool Vector<_type>::IsEmpty() const\n    {\n        return std::vector<_type>::empty();\n    }\n\n    template<typename _type>\n    _type& Vector<_type>::First()\n    {\n        return std::vector<_type>::front();\n    }\n\n    template<typename _type>\n    const _type& Vector<_type>::First() const\n    {\n        return std::vector<_type>::front();\n    }\n\n    template<typename _type>\n    const _type& Vector<_type>::Last() const\n    {\n        return std::vector<_type>::back();\n    }\n\n    template<typename _type>\n    _type& Vector<_type>::Last()\n    {\n        return std::vector<_type>::back();\n    }\n\n    template<typename _type>\n    void Vector<_type>::Sort(const Function<bool(const _type&, const _type&)>& pred /*= Math::Fewer*/)\n    {\n        std::sort(std::vector<_type>::begin(), std::vector<_type>::end(), pred);\n    }\n\n    template<typename _type>\n    Vector<_type> Vector<_type>::Sorted(const Function<bool(const _type&, const _type&)>& pred /*= Math::Fewer*/)\n    {\n        Vector<_type> copy = *this;\n        copy.Sort(pred);\n        return copy;\n    }\n\n    template<typename _type>\n    typename Vector<_type>::Iterator Vector<_type>::Begin()\n    {\n        return std::vector<_type>::begin();\n    }\n\n    template<typename _type>\n    typename Vector<_type>::Iterator Vector<_type>::End()\n    {\n        return std::vector<_type>::end();\n    }\n\n    template<typename _type>\n    typename Vector<_type>::ConstIterator Vector<_type>::Begin() const\n    {\n        return std::vector<_type>::cbegin();\n    }\n\n    template<typename _type>\n    typename Vector<_type>::ConstIterator Vector<_type>::End() const\n    {\n        return std::vector<_type>::cend();\n    }\n\n    template<typename _type>\n    Vector<_type> Vector<_type>::FindAll(const Function<bool(const _type&)>& match) const\n    {\n        Vector<_type> res;\n        for (auto& element : *this)\n        {\n            if (match(element))\n                res.Add(element);\n        }\n\n        return res;\n    }\n\n    template<typename _type>\n    Vector<_type> Vector<_type>::Where(const Function<bool(const _type&)>& match) const\n    {\n        Vector<_type> res;\n        for (auto& element : *this)\n        {\n            if (match(element))\n                res.Add(element);\n        }\n\n        return res;\n    }\n\n    template<typename _type>\n    template<typename _sel_type>\n    Vector<_sel_type> Vector<_type>::Convert(const Function<_sel_type(const _type&)>& selector) const\n    {\n        Vector<_sel_type> res;\n        for (auto& element : *this)\n            res.Add(selector(element));\n\n        return res;\n    }\n\n    template<typename _type>\n    template<typename _sel_type>\n    Vector<_sel_type> Vector<_type>::Cast() const\n    {\n        Vector<_sel_type> res;\n        for (auto& element : *this)\n            res.Add((_sel_type)element);\n\n        return res;\n    }\n\n    template<typename _type>\n    template<typename _sel_type>\n    Vector<_sel_type> Vector<_type>::DynamicCast() const\n    {\n        Vector<_sel_type> res;\n        for (auto& element : *this)\n            res.Add(dynamic_cast<_sel_type>(element));\n\n        return res;\n    }\n\n    template<typename _type>\n    Vector<_type> Vector<_type>::Take(int count) const\n    {\n        Vector<_type> res;\n        int i = 0;\n        for (auto& element : *this)\n        {\n            res.Add(element);\n            i++;\n            if (i == count)\n                break;\n        }\n\n        return res;\n    }\n\n    template<typename _type>\n    Vector<_type> Vector<_type>::Take(int begin, int end) const\n    {\n        Vector<_type> res;\n        for (int i = begin; i < end && i < (int)std::vector<_type>::size(); i++)\n            res.Add(Get(i));\n\n        return res;\n    }\n\n    template<typename _type>\n    int Vector<_type>::Count(const Function<bool(const _type&)>& match) const\n    {\n        int res = 0;\n        int count = Count();\n        for (int i = 0; i < count; i++)\n        {\n            if (match(Get(i)))\n                res++;\n        }\n\n        return res;\n    }\n\n    template<typename _type>\n    void Vector<_type>::RemoveAll(const Function<bool(const _type&)>& match)\n    {\n        for (auto it = std::vector<_type>::begin(); it != std::vector<_type>::end();)\n        {\n            if (match(*it))\n                it = std::vector<_type>::erase(it);\n            else\n                ++it;\n        }\n    }\n\n    template<typename _type>\n    bool Vector<_type>::Contains(const Function<bool(const _type&)>& match) const\n    {\n        for (auto& element : *this)\n        {\n            if (match(element))\n                return true;\n        }\n\n        return false;\n    }\n\n    template<typename _type>\n    const _type* Vector<_type>::Find(const Function<bool(const _type&)>& match) const\n    {\n        for (auto& element : *this)\n        {\n            if (match(element))\n                return &element;\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    _type* Vector<_type>::Find(const Function<bool(const _type&)>& match)\n    {\n        for (auto& element : *this)\n        {\n            if (match(element))\n                return &element;\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    _type Vector<_type>::FindOrDefault(const Function<bool(const _type&)>& match) const\n    {\n        auto fnd = Find(match);\n        if (!fnd)\n            return _type();\n\n        return *fnd;\n    }\n\n    template<typename _type>\n    int Vector<_type>::IndexOf(const Function<bool(const _type&)>& match) const\n    {\n        int count = Count();\n        for (int i = 0; i < count; i++)\n        {\n            if (match(Get(i)))\n                return i;\n        }\n\n        return -1;\n    }\n\n    template<typename _type>\n    template<typename _sort_type>\n    void Vector<_type>::SortBy(const Function<_sort_type(const _type&)>& selector)\n    {\n        Sort([&](const _type& l, const _type& r) { return selector(l) < selector(r); });\n    }\n\n    template<typename _type>\n    const _type* Vector<_type>::First(const Function<bool(const _type&)>& match) const\n    {\n        return Find(match);\n    }\n\n    template<typename _type>\n    _type* Vector<_type>::First(const Function<bool(const _type&)>& match)\n    {\n        return Find(match);\n    }\n\n    template<typename _type>\n    const _type* Vector<_type>::Last(const Function<bool(const _type&)>& match) const\n    {\n        for (auto& element : *this)\n        {\n            if (match(element))\n                return &element;\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    _type* Vector<_type>::Last(const Function<bool(const _type&)>& match)\n    {\n        for (auto& element : *this)\n        {\n            if (match(element))\n                return &element;\n        }\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    int Vector<_type>::LastIndexOf(const Function<bool(const _type&)>& match) const\n    {\n        for (auto it = std::vector<_type>::rbegin(); it != std::vector<_type>::rend(); it--)\n        {\n            if (match(*it))\n                return it - std::vector<_type>::begin();\n        }\n\n        return -1;\n    }\n\n    template<typename _type>\n    template<typename _sel_type>\n    _type Vector<_type>::Min(const Function<_sel_type(const _type&)>& selector) const\n    {\n        int count = Count();\n        if (count == 0)\n            return _type();\n\n        const _type& res = Get(0);\n        _sel_type minSel = selector(res);\n\n        for (int i = 1; i < count; i++)\n        {\n            const _type& itVal = Get(i);\n            _sel_type itSel = selector(itVal);\n\n            if (itSel < minSel)\n            {\n                minSel = itSel;\n                res = itVal;\n            }\n        }\n\n        return res;\n    }\n\n    template<typename _type>\n    template<typename _sel_type>\n    int Vector<_type>::MinIdx(const Function<_sel_type(const _type&)>& selector) const\n    {\n        int count = Count();\n        if (count == 0)\n            return -1;\n\n        int res = 0;\n        _sel_type minSel = selector(Get(0));\n\n        for (int i = 1; i < count; i++)\n        {\n            _sel_type itSel = selector(Get(i));\n\n            if (itSel < minSel)\n            {\n                res = i;\n                minSel = itSel;\n            }\n        }\n\n        return res;\n    }\n\n    template<typename _type>\n    template<typename _sel_type>\n    _type Vector<_type>::Max(const Function<_sel_type(const _type&)>& selector) const\n    {\n        int count = Count();\n        if (count == 0)\n            return _type();\n\n        const _type* res = &Get(0);\n        _sel_type minSel = selector(*res);\n\n        for (int i = 1; i < count; i++)\n        {\n            const _type* itVal = &Get(i);\n            _sel_type itSel = selector(*itVal);\n\n            if (itSel > minSel)\n            {\n                minSel = itSel;\n                res = itVal;\n            }\n        }\n\n        return *res;\n    }\n\n    template<typename _type>\n    template<typename _sel_type>\n    int Vector<_type>::MaxIdx(const Function<_sel_type(const _type&)>& selector) const\n    {\n        int count = Count();\n        if (count == 0)\n            return -1;\n\n        int res = 0;\n        _sel_type minSel = selector(Get(0));\n\n        for (int i = 1; i < count; i++)\n        {\n            _sel_type itSel = selector(Get(i));\n\n            if (itSel > minSel)\n            {\n                res = i;\n                minSel = itSel;\n            }\n        }\n\n        return res;\n    }\n\n    template<typename _type>\n    bool Vector<_type>::All(const Function<bool(const _type&)>& match) const\n    {\n        for (auto& element : *this)\n        {\n            if (!match(element))\n                return false;\n        }\n\n        return true;\n    }\n\n    template<typename _type>\n    bool Vector<_type>::Any(const Function<bool(const _type&)>& match) const\n    {\n        for (auto& element : *this)\n        {\n            if (match(element))\n                return true;\n        }\n\n        return false;\n    }\n\n    template<typename _type>\n    template<typename _sel_type>\n    _sel_type Vector<_type>::Sum(const Function<_sel_type(const _type&)>& selector) const\n    {\n        int count = Count();\n        if (count == 0)\n            return _sel_type();\n\n        _sel_type res = selector(Get(0));\n        for (int i = 1; i < count; i++)\n            res = res + selector(Get(i));\n\n        return res;\n    }\n\n    template<typename _type>\n    void Vector<_type>::ForEach(const Function<void(_type&)>& func)\n    {\n        for (auto& element : *this)\n            func(element);\n    }\n\n    template<typename _type>\n    void Vector<_type>::ForEach(const Function<void(const _type&)>& func) const\n    {\n        for (auto& element : *this)\n            func(element);\n    }\n\n    template<typename _type>\n    void Vector<_type>::Reverse()\n    {\n        int c = Count();\n        for (int i = 0; i < c/2; i++)\n        {\n            _type a = Get(i);\n            _type b = Get(c - i - 1);\n\n            Set(i, b);\n            Set(c - i - 1, a);\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/LinkRef.h",
    "content": "#pragma once\n\nnamespace o2\n{\n    // ----------------------------------------------------------------------\n    // Linked reference. Used to advanced referecing to Actor or Component, \n    // that keeps link inside hierarchy after instantiation and serialization\n    // ----------------------------------------------------------------------\n    template<typename _type, typename _enable = void>\n    class LinkRef {};\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/Ref.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"Ref.h\"\n\nnamespace o2\n{\n    RefCounterable::RefCounterable(RefCounter* refCounter):\n        mRefCounter(refCounter)\n    {}\n\n    UInt16 RefCounterable::GetStrongReferencesCount() const\n    {\n        return GetRefCounter()->strongReferences;\n    }\n\n    UInt16 RefCounterable::GetWeakReferencesCount() const\n    {\n        return GetRefCounter()->weakReferences;\n    }\n\n    RefCounter* RefCounterable::GetRefCounter() const\n    {\n        Assert(mRefCounter, \"Trying to get the reference counter, but it is null. Use mmake<> to create Ref<> and PostRefConstruct() to initialize references during object creation.\");\n        return mRefCounter;\n    }\n\n    void RefCounterable::SetRefCounter(RefCounter* refCounter)\n    {\n        mRefCounter = refCounter;\n    }\n}"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/Ref.h",
    "content": "#pragma once\n\n#include <memory>\n#include \"Containers/Vector.h\"\n#include \"o2/Utils/Memory/MemoryAnalyzeableObject.h\"\n\nnamespace o2\n{\n    template<typename _type>\n    class Ref;\n\n    template<typename _type, typename ... _args>\n    Ref<_type> Make(_args&& ... args);\n\n    // --------------------------------\n    // Reference counter implementation\n    // --------------------------------\n    struct RefCounter\n    {\n        UInt strongReferences = 0; // Strong references count\n        UInt weakReferences = 0;   // Weak references count\n\n#if ENABLE_MEMORY_ANALYZE\n        std::vector<MemoryAnalyzeObject*> strongRefPointers; // Pointers to strong reference objects\n#endif\n\n    protected:\n        template<typename _type>\n        friend class Ref;\n\n        template<typename _type>\n        friend class WeakRef;\n\n        template<typename _type, typename ... _args>\n        friend Ref<_type> Make(_args&& ... args);\n\n        template<typename _type, typename ... _args>\n        friend Ref<_type> MakePlace(const char* location, int line, _args&& ... args);\n    };\n\n    // -------------------------------------------------------------\n    // Base reference counterable object. \n    // Use it as base class for your objects, that can be referenced\n    // -------------------------------------------------------------\n    class RefCounterable\n    {\n    public:\n        // Default constructor\n        RefCounterable() {}\n\n        // Constructor with reference counter\n        RefCounterable(RefCounter* refCounter);\n\n        // Virtual destructor, for inheritance\n        virtual ~RefCounterable() {}\n\n        // Returns strong references count\n        UInt16 GetStrongReferencesCount() const;\n\n        // Returns weak references count\n        UInt16 GetWeakReferencesCount() const;\n\n    protected:\n        mutable RefCounter* mRefCounter = nullptr; // Pointer to reference counter\n\n    protected:\n        // Returns reference counter\n        RefCounter* GetRefCounter() const;\n\n        // Sets reference counter\n        void SetRefCounter(RefCounter* refCounter);\n\n        template<typename _type>\n        friend class Ref;\n\n        template<typename _type>\n        friend class WeakRef;\n\n        template<typename _type>\n        friend RefCounter* GetRefCounterImpl(_type* ptr);\n\n        friend struct RefMaker;\n\n        template<typename _object_type>\n        friend struct RefCountersSetter;\n    };\n\n    // ---------------------------------------------------------------------------------\n    // Reference counterable interface. Used for multiple reference counters inheritance\n    // ---------------------------------------------------------------------------------\n    class IRefCounterable\n    {\n    protected:\n        // Returns reference counter\n        virtual RefCounter* GetRefCounter() const = 0;\n\n        template<typename _type>\n        friend class Ref;\n\n        template<typename _type>\n        friend class WeakRef;\n\n        template<typename _type>\n        friend RefCounter* GetRefCounterImpl(_type* ptr);\n\n        template<typename _object_type>\n        friend struct RefCountersSetter;\n    };\n\n    template<typename _object_ptr_type>\n    struct RefCountersSetter\n    {\n        template<typename _type, typename ... _other_types>\n        static void Set(_object_ptr_type object, RefCounter* refCounter)\n        {\n            static_cast<_type*>(object)->SetRefCounter(refCounter);\n\n            if constexpr (sizeof...(_other_types) > 0)\n                Set<_other_types...>(object, refCounter);\n        }\n    };\n\n    // Reference counterable implementation to override GetRefCounter method\n#define REF_COUNTERABLE_IMPL_TEMPLATE(THIS_CLASS, BASE_CLASS, ...)                                                                                \\\n        RefCounter* GetRefCounter() const { return BASE_CLASS::GetRefCounter(); }                                                                 \\\n        void SetRefCounter(RefCounter* refCounter) { RefCountersSetter<THIS_CLASS*>::template Set<BASE_CLASS, ##__VA_ARGS__>(this, refCounter); } \\\n        template<typename __type> friend RefCounter* o2::GetRefCounterImpl(__type* ptr);                                                          \\\n        template<typename _object_type> friend struct o2::RefCountersSetter;                                                                      \\\n        friend struct o2::RefMaker\n\n\n    // Reference counterable implementation to override GetRefCounter method\n#define REF_COUNTERABLE_IMPL(BASE_CLASS, ...) \\\n        REF_COUNTERABLE_IMPL_TEMPLATE(typename std::remove_pointer<decltype(this)>::type, BASE_CLASS, ##__VA_ARGS__)\n\n#if ENABLE_MEMORY_ANALYZE\n    class IObject;\n\n#include <vector>\n#include <algorithm>\n\n#define OPTIONAL_BASE_REF : public MemoryAnalyzeObject\n#define OPTIONAL_REFS_MANAGE_FORWARD(CLASS)          \\\n    o2::IObject* GetIObjectPtrFwd(CLASS* obj);       \\\n    const std::type_info& GetTypeInfoFwd(CLASS* obj)\n     \n#define OPTIONAL_REFS_MANAGE_FORWARD_IMPL(CLASS)                                      \\\n    o2::IObject* GetIObjectPtrFwd(CLASS* obj) { return dynamic_cast<IObject*>(obj); } \\\n    const std::type_info& GetTypeInfoFwd(CLASS* obj) { return typeid(*obj); }\n\n#else\n#define OPTIONAL_BASE_REF\n#define OPTIONAL_REFS_MANAGE_FORWARD(CLASS)\n#define OPTIONAL_REFS_MANAGE_FORWARD_IMPL(CLASS)\n#endif\n\n    // ----------------\n    // Strong reference\n    // ----------------\n    template<typename _type>\n    class Ref OPTIONAL_BASE_REF\n    {\n    public:\n        // Default constructor\n        Ref();\n\n        // Constructor from pointer\n        explicit Ref(_type* ptr);\n\n        // Constructor from nullptr\n        Ref(std::nullptr_t);\n\n        // Copy constructor\n        Ref(const Ref<_type>& other);\n\n        // Move constructor\n        Ref(Ref<_type>&& other);\n\n        // Copy constructor from other type\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _type*>::value>::type>\n        Ref(const Ref<_other_type>& other);\n\n        // Copy constructor from other type\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _type*>::value>::type>\n        Ref(Ref<_other_type>&& other);\n\n        // Destructor\n        ~Ref();\n\n        // Equality operator\n        bool operator==(const Ref<_type>& other) const;\n\n        // Equality operator\n        bool operator==(const _type* other) const;\n\n        // Inequality operator\n        bool operator!=(const Ref<_type>& other) const;\n\n        // Inequality operator\n        bool operator!=(const _type* other) const;\n\n        // Copy operator from nullptr\n        Ref<_type>& operator=(std::nullptr_t);\n\n        // Copy operator\n        Ref<_type>& operator=(const Ref<_type>& other);\n\n        // Move operator\n        Ref<_type>& operator=(Ref<_type>&& other);\n\n        // Copy operator from other type\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _type*>::value>::type>\n        Ref<_type>& operator=(const Ref<_other_type>& other);\n\n        // Move operator from other type\n        template<typename _other_type, typename _enable = std::enable_if<std::is_convertible<_other_type*, _type*>::value>::type>\n        Ref<_type>& operator=(Ref<_other_type>&& other);\n\n        // Less operator\n        bool operator<(const Ref<_type>& other) const { return mPtr < other.mPtr; }\n\n        // Returns true if reference is valid\n        bool IsValid() const;\n\n        // Returns pointer to object\n        _type* Get() const;\n\n        // Boolean cast operator, true means that reference is valid\n        explicit operator bool() const;\n\n        // Getter operator\n        _type& operator*() const;\n\n        // Pointer getter operator\n        _type* operator->() const;\n\n    protected:\n        _type* mPtr = nullptr; // Pointer to object\n\n#if ENABLE_MEMORY_ANALYZE\n        std::byte* GetMemory() const override;\n        IObject* GetIObject() const override;\n        const std::type_info& GetTypeInfo() const override;\n\n        void MoveReference(MemoryAnalyzeObject* other);\n\n        friend class MemoryAnalyzer;\n#endif \n\n    protected:\n        void IncrementRef(); // Increments reference counter\n        void DecrementRef(); // Decrements reference counter\n\n        template<typename _other_type>\n        friend class WeakRef;\n\n        template<typename _other_type>\n        friend class Ref;\n    };\n\n    // Returns reference counter\n    template<typename _type>\n    RefCounter* GetRefCounterImpl(_type* ptr)\n    {\n        return ptr->GetRefCounter();\n    }\n\n    // Destructs object\n    template<typename _type>\n    void DestructObjectImpl(_type* obj)\n    {\n        obj->~_type();\n    }\n\n    // Static check if type is complete\n    template<typename T, typename = void>\n    struct IsCompleteRef : std::false_type {};\n\n    // Static check if type is complete\n    template<typename T>\n    struct IsCompleteRef<T, std::void_t<decltype(sizeof(T))>> : std::true_type {};\n\n    // Returns reference counter\n    template<typename _type>\n    RefCounter* GetRefCounter(_type* ptr)\n    {\n        if constexpr (IsCompleteRef<_type>::value)\n            return GetRefCounterImpl(ptr);\n        else\n            return GetRefCounterFwd(ptr);\n    }\n\n    // Destructs object\n    template<typename _type>\n    void DestructObject(_type* obj)\n    {\n        if constexpr (IsCompleteRef<_type>::value)\n            return DestructObjectImpl(obj);\n        else\n            return DestructObjectFwd(obj);\n    }\n\n    // Forward declaration of class and reference counter implementation\n#define FORWARD_REF(CLASS)                        \\\n    o2::RefCounter* GetRefCounterFwd(CLASS* ptr); \\\n    void DestructObjectFwd(CLASS* obj);           \\\n    OPTIONAL_REFS_MANAGE_FORWARD(CLASS)\n\n    // Forward declaration of class and reference counter implementation\n#define FORWARD_CLASS_REF(CLASS) \\\n    class CLASS;                 \\\n    FORWARD_REF(CLASS)\n\n    // Implementation of forward declared reference counter \n#define FORWARD_REF_IMPL(CLASS)                                                     \\\n    o2::RefCounter* GetRefCounterFwd(CLASS* ptr) { return GetRefCounterImpl(ptr); } \\\n    void DestructObjectFwd(CLASS* obj) { DestructObjectImpl(obj); }                 \\\n    OPTIONAL_REFS_MANAGE_FORWARD_IMPL(CLASS)\n\n    // Declares friend function for creating new object\n#define FRIEND_REF_MAKE()  \\\n    friend struct RefMaker\n\n    // Dynamic cast from one reference type to another\n    template<typename _to_type, typename _from_type>\n    Ref<_to_type> DynamicCast(const Ref<_from_type>& from)\n    {\n        return Ref<_to_type>(dynamic_cast<_to_type*>(const_cast<_from_type*>(from.Get())));\n    }\n\n    // Dynamic cast from one references vector type to another\n    template<typename _to_type, typename _from_type>\n    Vector<Ref<_to_type>> DynamicCastVector(const _from_type& from)\n    {\n        return from.template Convert<Ref<_to_type>>([](auto& ref) { return DynamicCast<_to_type>(ref); });\n    }\n\n    // Static cast from one reference type to another\n    template<typename _to_type, typename _from_type>\n    Ref<_to_type> StaticCast(const Ref<_from_type>& from)\n    {\n        return Ref<_to_type>(static_cast<_to_type*>(from.Get()));\n    }\n\n#if ENABLE_MEMORY_MANAGE\n    // Special macro for making new object and returning reference to it with storing location and line of creation for debug\n#define mmake o2::RefMaker(__FILE__, __LINE__).Make\n#else\n    // Special macro for making new object and returning reference to it with storing location and line of creation for debug\n#define mmake o2::RefMaker().Make\n#endif\n\n    // ------------------------------\n    // Helper struct for mmake macros\n    // ------------------------------\n    struct RefMaker\n    {\n        // Static check for presence of PostRefConstruct method\n        template<class T, class = std::void_t<>>\n        struct HasPostRefConstruct : std::false_type {};\n\n        // Static check for presence of PostRefConstruct method\n        template<class T>\n        struct HasPostRefConstruct<T, std::void_t<decltype(&T::PostRefConstruct)>> : std::true_type {};\n\n        // Static check for presence of RefConstruct method with specified arguments\n        template<typename T, typename... Args>\n        struct HasRefConstructArgs\n        {\n        private:\n            template<typename C>\n            static auto test(int) -> decltype(std::declval<C>().RefConstruct(std::declval<Args>()...), std::true_type{});\n\n            template<typename>\n            static auto test(...) -> std::false_type;\n\n        public:\n            static constexpr bool value = decltype(test<T>(0))::value;\n        };\n\n    public:\n        RefMaker() = default;\n\n#if ENABLE_MEMORY_MANAGE\n        const char* location;\n        int line;\n\n        RefMaker(const char* location, int line) :location(location), line(line) {}\n\n        void* allocate(std::size_t size) const\n        {\n            return _mmalloc(size, location, line);\n        }\n#else\n        void* allocate(std::size_t size) const\n        {\n            return malloc(size);\n        }\n#endif\n        // Makes new object and returns reference to it. Creates memory block with reference counter and object to keep them together.\n        // Stores location and line of creation for debug\n        template<typename _type, typename ... _args>\n        Ref<_type> Make(_args&& ... args)\n        {\n            constexpr auto refSize = sizeof(RefCounter);\n            constexpr auto typeSize = sizeof(_type);\n\n            auto memory = (std::byte*)allocate(refSize + typeSize);\n            auto refCounter = new (memory) RefCounter();\n            refCounter->strongReferences += 1;\n\n            _type* object;\n\n            constexpr bool isConstructibleWithRefCounter = std::is_constructible<_type, RefCounter*, _args...>::value;\n            if constexpr (isConstructibleWithRefCounter)\n            {\n                object = new (memory + refSize) _type(refCounter, std::forward<_args>(args)...);\n            }\n            else\n            {\n                object = new (memory + refSize) _type(std::forward<_args>(args)...);\n                object->SetRefCounter(refCounter);\n            }\n\n            if constexpr (HasRefConstructArgs<_type, _args ...>::value)\n                object->RefConstruct(std::forward<_args>(args)...);\n\n            if constexpr (HasPostRefConstruct<_type>::value)\n                object->PostRefConstruct();\n\n            refCounter->strongReferences -= 1;\n\n            return Ref<_type>(object);\n        }\n    };\n\n    // BaseRef implementation\n\n    template<typename _type>\n    Ref<_type>::Ref()\n    {}\n\n    template<typename _type>\n    Ref<_type>::Ref(_type* ptr) :\n        mPtr(ptr)\n    {\n        IncrementRef();\n    }\n\n    template<typename _type>\n    Ref<_type>::Ref(std::nullptr_t)\n    {}\n\n    template<typename _type>\n    Ref<_type>::Ref(const Ref<_type>& other) :\n        mPtr(other.mPtr)\n    {\n        IncrementRef();\n    }\n\n    template<typename _type>\n    Ref<_type>::Ref(Ref<_type>&& other) :\n        mPtr(other.mPtr)\n    {\n\t\tother.mPtr = nullptr;\n\n#if ENABLE_MEMORY_ANALYZE\n\t\tMoveReference(static_cast<MemoryAnalyzeObject*>(&other));\n#endif\n    }\n\n    template<typename _type>\n    template<typename _other_type, typename _enable>\n    Ref<_type>::Ref(const Ref<_other_type>& other) :\n        mPtr(other.mPtr)\n    {\n        IncrementRef();\n    }\n\n    template<typename _type>\n    template<typename _other_type, typename _enable>\n    Ref<_type>::Ref(Ref<_other_type>&& other) :\n        mPtr(other.mPtr)\n    {\n        other.mPtr = nullptr;\n\n#if ENABLE_MEMORY_ANALYZE\n\t\tMoveReference(static_cast<MemoryAnalyzeObject*>(&other));\n#endif\n    }\n\n    template<typename _type>\n    Ref<_type>::~Ref()\n    {\n        DecrementRef();\n    }\n\n    template<typename _type>\n    bool Ref<_type>::operator==(const Ref<_type>& other) const\n    {\n        return mPtr == other.mPtr;\n    }\n\n    template<typename _type>\n    bool Ref<_type>::operator==(const _type* other) const\n    {\n        return mPtr == other;\n    }\n\n    template<typename _type>\n    bool Ref<_type>::operator!=(const Ref<_type>& other) const\n    {\n        return mPtr != other.mPtr;\n    }\n\n    template<typename _type>\n    bool Ref<_type>::operator!=(const _type* other) const\n    {\n        return mPtr != other;\n    }\n\n    template<typename _type>\n    Ref<_type>& Ref<_type>::operator=(std::nullptr_t)\n    {\n        DecrementRef();\n        mPtr = nullptr;\n\n        return *this;\n    }\n\n    template<typename _type>\n    Ref<_type>& Ref<_type>::operator=(const Ref<_type>& other)\n    {\n        DecrementRef();\n\n        mPtr = other.mPtr;\n\n        IncrementRef();\n\n        return *this;\n    }\n\n    template<typename _type>\n    template<typename _other_type, typename _enable>\n    Ref<_type>& Ref<_type>::operator=(const Ref<_other_type>& other)\n    {\n        DecrementRef();\n\n        mPtr = other.mPtr;\n\n        IncrementRef();\n\n        return *this;\n    }\n\n    template<typename _type>\n    template<typename _other_type, typename _enable>\n    Ref<_type>& Ref<_type>::operator=(Ref<_other_type>&& other)\n    {\n        DecrementRef();\n\n        mPtr = other.mPtr;\n\t\tother.mPtr = nullptr;\n\n#if ENABLE_MEMORY_ANALYZE\n\t\tMoveReference(static_cast<MemoryAnalyzeObject*>(&other));\n#endif\n\n        return *this;\n    }\n\n    template<typename _type>\n    Ref<_type>& Ref<_type>::operator=(Ref<_type>&& other)\n    {\n        DecrementRef();\n\n        mPtr = other.mPtr;\n\t\tother.mPtr = nullptr;\n\n#if ENABLE_MEMORY_ANALYZE\n\t\tMoveReference(static_cast<MemoryAnalyzeObject*>(&other));\n#endif\n\n        return *this;\n    }\n\n    template<typename _type>\n    _type* Ref<_type>::Get() const\n    {\n        return mPtr;\n    }\n\n    template<typename _type>\n    bool Ref<_type>::IsValid() const\n    {\n        return mPtr != nullptr;\n    }\n\n    template<typename _type>\n    Ref<_type>::operator bool() const\n    {\n        return IsValid();\n    }\n\n    template<typename _type>\n    _type& Ref<_type>::operator*() const\n    {\n        return *mPtr;\n    }\n\n    template<typename _type>\n    _type* Ref<_type>::operator->() const\n    {\n        return mPtr;\n    }\n\n    template<typename _type>\n    void Ref<_type>::IncrementRef()\n    {\n        if (mPtr)\n        {\n            auto refCounter = GetRefCounter(mPtr);\n            refCounter->strongReferences++;\n#if ENABLE_MEMORY_ANALYZE\n            refCounter->strongRefPointers.push_back(static_cast<MemoryAnalyzeObject*>(this));\n#endif\n        }\n    }\n\n    template<typename _type>\n    void Ref<_type>::DecrementRef()\n    {\n        if (mPtr)\n        {\n            auto refCounter = GetRefCounter(mPtr);\n\n#if ENABLE_MEMORY_ANALYZE\n            auto it = std::find(refCounter->strongRefPointers.begin(), refCounter->strongRefPointers.end(), \n                               static_cast<MemoryAnalyzeObject*>(this));\n            if (it != refCounter->strongRefPointers.end())\n                refCounter->strongRefPointers.erase(it);\n#endif\n\n            refCounter->strongReferences--;\n            if (refCounter->strongReferences == 0)\n            {\n                refCounter->strongReferences++;\n                refCounter->weakReferences++;\n\n                DestructObject(mPtr);\n\n                refCounter->weakReferences--;\n\t\t\t\trefCounter->strongReferences--;\n\n                mPtr = nullptr;\n\n                if (refCounter->weakReferences == 0)\n                    _mfree(refCounter);\n            }\n        }\n    }\n}\n\n#include \"o2/Utils/Basic/IObject.h\"\n\nnamespace o2\n{\n#if ENABLE_MEMORY_ANALYZE\n    template<typename _type>\n    std::byte* Ref<_type>::GetMemory() const\n    {\n        if (mPtr)\n            return reinterpret_cast<std::byte*>(GetRefCounter(mPtr));\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    IObject* GetIObjectPtrImpl(_type* ptr)\n    {\n        if constexpr (std::is_base_of<IObject, _type>::value)\n            return dynamic_cast<IObject*>(ptr);\n\n        return nullptr;\n    }\n\n    template<typename _type>\n    IObject* GetIObjectPtr(_type* ptr)\n    {\n        if constexpr (IsCompleteRef<_type>::value)\n            return GetIObjectPtrImpl(ptr);\n        else\n            return GetIObjectPtrFwd(ptr);\n    }\n\n    template<typename _type>\n    IObject* Ref<_type>::GetIObject() const\n    {\n        return GetIObjectPtr(mPtr);\n    }\n\n    template<typename _type>\n    const std::type_info& GetTypeInfoImpl(_type* ptr)\n    {\n        return typeid(*ptr);\n    }\n\n    template<typename _type>\n    const std::type_info& GetTypeInfo(_type* ptr)\n    {\n        if constexpr (IsCompleteRef<_type>::value)\n            return GetTypeInfoImpl(ptr);\n        else\n            return GetTypeInfoFwd(ptr);\n    }\n\n    template<typename _type>\n    const std::type_info& Ref<_type>::GetTypeInfo() const \n    { \n        return o2::GetTypeInfo(mPtr);\n\t}\n\n\ttemplate<typename _type>\n\tvoid Ref<_type>::MoveReference(MemoryAnalyzeObject* other)\n\t{\n\t\tif (mPtr)\n\t\t{\n\t\t\tauto refCounter = GetRefCounter(mPtr);\n\t\t\tauto& strongRefPointers = refCounter->strongRefPointers;\n            \n\t\t\tauto it = std::find(strongRefPointers.begin(), strongRefPointers.end(), other);\n\t\t\tif (it != strongRefPointers.end())\n\t\t\t\tstrongRefPointers.erase(it);\n\n\t\t\tstrongRefPointers.push_back(static_cast<MemoryAnalyzeObject*>(this));\n\t\t}\n\t}\n#endif\n}\n\n#include \"o2/Utils/Types/WeakRef.h\"\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/String.h",
    "content": "#pragma once\n\n#include \"StringDef.h\"\n#include \"StringImpl.h\"\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/StringDef.h",
    "content": "#pragma once\n\n#include <string>\n#include <cstdarg>\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n\nnamespace o2\n{\n    template<typename T>\n    class Vec2;\n\n    template<typename T>\n    class Rect;\n\n    typedef Vec2<float> Vec2F;\n    typedef Vec2<int>   Vec2I;\n\n    typedef Rect<float> RectF;\n    typedef Rect<int>   RectI;\n\n    class Color4;\n\n    template<typename T>\n    struct Border;\n\n    typedef Border<float> BorderF;\n    typedef Border<int>   BorderI;\n\n\n#define CheckCharacterType \\\n    typename X = typename std::enable_if<std::is_same<T2, char>::value || \\\n                                         std::is_same<T2, wchar_t>::value || \\\n                                         std::is_same<T2, const char>::value || \\\n                                         std::is_same<T2, const wchar_t>::value>::type\n\n    // -------------------------\n    // Template character string\n    // -------------------------\n    template<typename T>\n    class TString: public std::basic_string<T>\n    {\n    public:\n        // Default constructor\n        TString();\n\n        // Constructor from characters array\n        TString(const T* data);\n\n        // Constructor from characters array\n        template<typename T2, CheckCharacterType>\n        TString(const T2* data);\n\n        // Copy-constructor\n        TString(const TString& other);\n\n        // Move-constructor\n        TString(TString&& other);\n\n        // Copy-constructor from string with another characters type\n        template<typename T2, CheckCharacterType>\n        TString(const TString<T2>& other);\n\n        // Constructor from basic string\n        TString(const std::basic_string<T>& data);\n\n        // Explicit constructor from char value\n        explicit TString(char value);\n\n        // Explicit constructor from boolean value\n        explicit TString(bool value);\n\n        // Explicit constructor from integer value\n        explicit TString(int value);\n\n        // Explicit constructor from unsigned integer value\n        explicit TString(UInt value);\n\n        // Explicit constructor from unsigned integer value\n        explicit TString(UInt64 value);\n\n        // Explicit constructor from float value\n        explicit TString(float value);\n\n        // Explicit constructor from double value\n        explicit TString(double value);\n\n        // Explicit constructor from float vector value\n        explicit TString(const Vec2F& value);\n\n        // Explicit constructor from integer vactor value\n        explicit TString(const Vec2I& value);\n\n        // Explicit constructor from float rectangle value\n        explicit TString(const RectF& value);\n\n        // Explicit constructor from integer rectangle value\n        explicit TString(const RectI& value);\n\n        // Explicit constructor from float border value\n        explicit TString(const BorderF& value);\n\n        // Explicit constructor from integer border value\n        explicit TString(const BorderI& value);\n\n        // Explicit constructor from color value\n        explicit TString(const Color4& value);\n\n        // Destructor\n        ~TString();\n\n        // Copy-operator from string with another characters type\n        template<typename T2, CheckCharacterType>\n        TString& operator=(const TString<T2>& other);\n\n        // Copy-operator\n        TString& operator=(const TString& other);\n\n        // Assign operator from characters array\n        template<typename T2, CheckCharacterType>\n        TString& operator=(const T2* data);\n\n        // Cast to characters array\n        operator const T*() const;\n\n        // Cast operator to boolean\n        explicit operator bool() const;\n\n        // Cast operator to integer\n        explicit operator int() const;\n\n        // Cast operator to float\n        explicit operator float() const;\n\n        // Cast operator to unsigned integer\n        explicit operator UInt() const;\n\n        // Cast operator to unsigned integer\n        explicit operator UInt64() const;\n\n        // Cast operator to float vector\n        explicit operator Vec2F() const;\n\n        // Cast operator to integer vector\n        explicit operator Vec2I() const;\n\n        // Cast operator to float rectangle\n        explicit operator RectF() const;\n\n        // Cast operator to integer rectangle\n        explicit operator RectI() const;\n\n        // Cast operator to float border\n        explicit operator BorderF() const;\n\n        // Cast operator to integer border\n        explicit operator BorderI() const;\n\n        // Cast operator to color \n        explicit operator Color4() const;\n\n        // Check equal operator to characters array\n        template<typename T2, CheckCharacterType>\n        bool operator==(const T2* data) const;\n\n        // Check not equal operator to characters array\n        template<typename T2, CheckCharacterType>\n        bool operator!=(const T2* data) const;\n\n        // Check equal operator\n        bool operator==(const TString& other) const;\n\n        // Check not equal operator\n        bool operator!=(const TString& other) const;\n\n        // Check greater operator\n        bool operator>(const TString& other) const;\n\n        // Plus operator - returns sum string\n        TString operator+(const TString& other) const;\n\n        // Plus and assign operator - adds string at the end\n        TString& operator+=(const TString& other);\n\n        // Plus operator - returns sum string\n        TString operator+(T symbol) const;\n\n        // Plus and assign operator - adds string at the end\n        TString& operator+=(T symbol);\n\n        // Plus operator - returns sum string\n        template<typename T2, CheckCharacterType>\n        TString operator+(T2 symbol) const;\n\n        // Plus and assign operator - adds string at the end\n        template<typename T2, CheckCharacterType>\n        TString& operator+=(T2 symbol);\n\n        // Plus operator - returns sum string\n        TString operator+(const T* str) const;\n\n        // Plus and assign operator - adds string at the end\n        TString& operator+=(const T* str);\n\n        // Plus operator - returns sum string\n        template<typename T2, CheckCharacterType>\n        TString operator+(const T2* str) const;\n\n        // Plus and assign operator - adds string at the end\n        template<typename T2, CheckCharacterType>\n        TString& operator+=(const T2* str);\n\n        // Symbol access operator\n        T& operator[](int idx);\n\n        // Return data\n        const T* Data() const;\n\n        // Returns length of string\n        int Length() const;\n\n        // Returns capacity of array\n        int Capacity() const;\n\n        // Returns true if string is empty\n        bool IsEmpty() const;\n\n        // Clears string\n        void Clear();\n\n        // Reserving array. Can't be less than current capacity\n        void Reserve(int size);\n\n        // Appends string at the end\n        void Append(const TString& other);\n\n        // Appends symbol at the end\n        void Append(T symbol);\n\n        // Returns sum string\n        TString Appended(const TString& other) const;\n\n        // Inserts string at position\n        void Insert(const TString& other, int position = 0);\n\n        // Inserts character at position\n        void Insert(T character, int position = 0);\n\n        // Returns string with inserted other string\n        TString Inserted(const TString& other, int position = 0) const;\n\n        // Removes symbols from begin to end\n        void Erase(int begin, int end = -1);\n\n        // Returns string with removed symbols from begin to end\n        TString Erased(int begin, int end = -1) const;\n\n        // Gets symbol from back, removes him and returns\n        T PopBack();\n\n        // Returns first symbol\n        T First() const;\n\n        // Returns last symbol\n        T Last() const;\n\n        // Replace part of string to another string in range\n        void Replace(const TString& other, int begin, int end);\n\n        // Returns string with replace by another string in range\n        TString Replaced(const TString& other, int begin, int end) const;\n\n        // Replaces all occurrences of all old strings to new\n        void ReplaceAll(const TString& oldStr, const TString& newStr);\n\n        // Replaces all occurrences of all old strings to new and returns as new string\n        TString ReplacedAll(const TString& oldStr, const TString& newStr) const;\n\n        // Return index of specified string. Returns -1 if can't find\n        int Find(const TString& other, int startIdx = 0) const;\n\n        // Return index of specified symbol. Returns -1 if can't find\n        int Find(T symbol, int startIdx = 0) const;\n\n        // Return this contains string. Returns -1 if can't find\n        bool Contains(const TString& other, int startIdx = 0) const;\n\n        // Return is this contains symbol. Returns -1 if can't find\n        bool Contains(T symbol, int startIdx = 0) const;\n\n        // Returns count of string inside this\n        int CountOf(const TString& other, int startIdx = 0) const;\n\n        // Returns last index of specified string. Returns -1 if can't find\n        int FindLast(const TString& other, int startIdx = -1) const;\n\n        // Returns true if string ends with specified string\n        bool EndsWith(const TString& other) const;\n\n        // Returns true if string starts with specified string\n        bool StartsWith(const TString& other) const;\n\n        // Returns subtracted string\n        TString SubStr(int begin, int end = -1) const;\n\n        // Splits string by specified string and returns results in vector\n        Vector<TString> Split(const TString& splitStr) const;\n\n        // Converts string to lower case\n        TString ToLowerCase() const;\n\n        // Converts string to upper case\n        TString ToUpperCase() const;\n\n        // Removing specified symbols at start of string\n        void Trim(const TString& trimSymbols = \" \");\n\n        // Removing specified symbols at start of string\n        void TrimStart(const TString& trimSymbols = \" \");\n\n        // Removing specified symbols at end of string\n        void TrimEnd(const TString& trimSymbols = \" \");\n\n        // Removing specified symbols at start of string\n        TString Trimed(const TString& trimSymbols = \" \");\n\n        // Removing specified symbols at start of string\n        TString TrimedStart(const TString& trimSymbols = \" \");\n\n        // Removing specified symbols at end of string\n        TString TrimedEnd(const TString& trimSymbols = \" \");\n\n        // Returns formatted string, like sprintf()\n        static TString Format(TString format, ...);\n\n        // Returns formatted string, like sprintf()\n        static TString Format(TString format, va_list vlist);\n\n\t\t// Converts value to string\n\t\ttemplate<typename T2>\n\t\tstatic TString ToString(const T2& value);\n\n        static TString empty;\n    };\n\n    template<typename T>\n    TString<T> TString<T>::empty;\n\n    // ---------------------------\n    // String with wide characters\n    // ---------------------------\n    typedef TString<wchar_t> WString;\n\n    // ------------------------------\n    // String with regular characters\n    // ------------------------------\n    typedef TString<char> String;\n\n}\n\nnamespace std \n{\n    template <>\n    struct hash<o2::String>\n    {\n        std::size_t operator()(const o2::String& k) const\n        {\n            return hash<std::string>()(k);\n        }\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/StringImpl.h",
    "content": "#pragma once\n\n#include \"3rdPartyLibs/utf8cpp/utf8.h\"\n#include \"o2/Utils/Math/Border.h\"\n#include \"o2/Utils/Math/Color.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n\nnamespace o2\n{\n    inline String operator+(const char* left, const String& right)\n    {\n        String _left(left);\n        return _left + right;\n    }\n\n    inline WString operator+(const wchar_t* left, const WString& right)\n    {\n        WString _left(left);\n        return _left + right;\n    }\n\n    inline void ConvertString(TString<char>& dest, const TString<wchar_t>& source)\n    {\n        dest.Clear();\n        utf8::utf16to8(source.begin(), source.end(), back_inserter(dest));\n    }\n\n    inline void ConvertString(TString<wchar_t>& dest, const TString<char>& source)\n    {\n        dest.Clear();\n        utf8::utf8to16(source.begin(), source.end(), back_inserter(dest));\n    }\n\n    inline void ConvertString(TString<wchar_t>& dest, const TString<wchar_t>& source)\n    {\n        dest = source;\n    }\n\n    inline void ConvertString(TString<char>& dest, const TString<char>& source)\n    {\n        dest = source;\n    }\n\n    template<typename T>\n    TString<T>::TString()\n    {}\n\n    template<typename T>\n    TString<T>::TString(const T* data):\n        std::basic_string<T>(data)\n    {}\n\n    template<typename T>\n    TString<T>::TString(const std::basic_string<T>& data):\n        std::basic_string<T>(data)\n    {}\n\n    template<typename T>\n    TString<T>::TString(const TString& other):\n        std::basic_string<T>(other)\n    { }\n\n    template<typename T>\n    TString<T>::TString(TString&& other) :\n        std::basic_string<T>(other)\n    { }\n\n    template<typename T>\n    template<typename T2, typename X>\n    TString<T>::TString(const T2* data)\n    {\n        ConvertString(*this, TString<T2>(data));\n    }\n\n\n    template<typename T>\n    template<typename T2, typename X>\n    TString<T>::TString(const TString<T2>& other)\n    {\n        ConvertString(*this, other);\n    }\n\n    template<typename T>\n    TString<T>::TString(char value):\n        std::basic_string<T>(1, value)\n    {}\n\n    template<typename T>\n    TString<T>::TString(bool value)\n    {\n        *this = value ? \"true\" : \"false\";\n    }\n\n    template<typename T>\n    TString<T>::TString(int value)\n    {\n        ConvertString(*this, TString<T>(std::to_string(value).c_str()));\n    }\n\n    template<typename T>\n    TString<T>::TString(UInt value)\n    {\n        ConvertString(*this, TString<T>(std::to_string(value).c_str()));\n    }\n\n    template<typename T>\n    TString<T>::TString(UInt64 value)\n    {\n        ConvertString(*this, TString<T>(std::to_string(value).c_str()));\n    }\n\n    template<typename T>\n    TString<T>::TString(float value)\n    {\n        ConvertString(*this, TString<T>(std::to_string(value).c_str()));\n        std::basic_string<T>::erase(std::basic_string<T>::find_last_not_of('0') + 1, std::string::npos);\n        std::basic_string<T>::erase(std::basic_string<T>::find_last_not_of('.') + 1, std::string::npos);\n    }\n\n    template<typename T>\n    TString<T>::TString(double value)\n    {\n        ConvertString(*this, TString<T>(std::to_string(value).c_str()));\n        std::basic_string<T>::erase(std::basic_string<T>::find_last_not_of('0') + 1, std::string::npos);\n        std::basic_string<T>::erase(std::basic_string<T>::find_last_not_of('.') + 1, std::string::npos);\n    }\n\n    template<typename T>\n    TString<T>::TString(const Vec2F& value)\n    {\n        Append((TString)value.x);\n        Append((TString)\";\");\n        Append((TString)value.y);\n    }\n\n    template<typename T>\n    TString<T>::TString(const Vec2I& value)\n    {\n        Append((TString)value.x);\n        Append((TString)\";\");\n        Append((TString)value.y);\n    }\n\n    template<typename T>\n    TString<T>::TString(const RectF& value)\n    {\n        Append((TString)value.left);\n        Append((TString)\";\");\n        Append((TString)value.top);\n        Append((TString)\";\");\n        Append((TString)value.right);\n        Append((TString)\";\");\n        Append((TString)value.bottom);\n    }\n\n    template<typename T>\n    TString<T>::TString(const RectI& value)\n    {\n        Append((TString)value.left);\n        Append((TString)\";\");\n        Append((TString)value.top);\n        Append((TString)\";\");\n        Append((TString)value.right);\n        Append((TString)\";\");\n        Append((TString)value.bottom);\n    }\n\n    template<typename T>\n    TString<T>::TString(const BorderF& value)\n    {\n        Append((TString)value.left);\n        Append((TString)\";\");\n        Append((TString)value.top);\n        Append((TString)\";\");\n        Append((TString)value.right);\n        Append((TString)\";\");\n        Append((TString)value.bottom);\n    }\n\n    template<typename T>\n    TString<T>::TString(const BorderI& value)\n    {\n        Append((TString)value.left);\n        Append((TString)\";\");\n        Append((TString)value.top);\n        Append((TString)\";\");\n        Append((TString)value.right);\n        Append((TString)\";\");\n        Append((TString)value.bottom);\n    }\n\n    template<typename T>\n    TString<T>::TString(const Color4& value)\n    {\n        Append((TString)value.r);\n        Append((TString)\";\");\n        Append((TString)value.g);\n        Append((TString)\";\");\n        Append((TString)value.b);\n        Append((TString)\";\");\n        Append((TString)value.a);\n    }\n\n    template<typename T>\n    TString<T>::~TString()\n    {\n        //~std::basic_string<T>();\n    }\n\n    template<typename T>\n    template<typename T2, typename X>\n    TString<T>& TString<T>::operator=(const TString<T2>& other)\n    {\n        Reserve(other.Capacity());\n        ConvertString(*this, other);\n        return *this;\n    }\n\n    template<typename T>\n    TString<T>& TString<T>::operator=(const TString& other)\n    {\n        std::basic_string<T>::operator=(other);\n        return *this;\n    }\n\n    template<typename T>\n    template<typename T2, typename X>\n    TString<T>& TString<T>::operator=(const T2* data)\n    {\n        ConvertString(*this, TString<T2>(data));\n        return *this;\n    }\n\n    template<typename T>\n    TString<T>::operator const T*() const\n    {\n        return std::basic_string<T>::c_str();\n    }\n\n    template<typename T>\n    TString<T>::operator bool() const\n    {\n        return *this == \"true\" || *this == \"TRUE\" || *this == \"True\";\n    }\n\n    template<typename T>\n    TString<T>::operator int() const\n    {\n        return std::stoi(*this);\n    }\n\n    template<typename T>\n    TString<T>::operator float() const\n    {\n        if (std::basic_string<T>::empty())\n            return 0.0f;\n\n        return std::stof(*this);\n    }\n\n    template<typename T>\n    TString<T>::operator UInt() const\n    {\n        return (UInt)std::stoi(*this);\n    }\n\n\n    template<typename T>\n    TString<T>::operator UInt64() const\n    {\n        return std::stoull(*this);\n    }\n\n    template<typename T>\n    TString<T>::operator Vec2F() const\n    {\n        if constexpr (std::is_same<T, char>::value)\n        {\n            wchar_t *px = std::basic_string<T>::c_str(), *py;\n            return Vec2F(wcstof(px, &py), wcstof(py, nullptr));\n        }\n        else\n        {\n            char *px = std::basic_string<T>::c_str(), *py;\n            return Vec2F(strtof(px, &py), strtof(py, nullptr));\n        }\n    }\n\n    template<typename T>\n    TString<T>::operator Vec2I() const\n    {\n        if constexpr (std::is_same<T, wchar_t>::value)\n        {\n            wchar_t *px = std::basic_string<T>::c_str(), *py;\n            return Vec2F((int)wcstol(px, &py, 10), (int)wcstol(py, nullptr, 10));\n        }\n        else\n        {\n            char *px = std::basic_string<T>::c_str(), *py;\n            return Vec2F((int)strtol(px, &py, 10), (int)strtol(py, nullptr, 10));\n        }\n    }\n\n    template<typename T>\n    TString<T>::operator RectF() const\n    {\n        if constexpr (std::is_same<T, char>::value)\n        {\n            wchar_t *pl = std::basic_string<T>::c_str(), *pb, *pr, *pt;\n            return RectF(wcstof(pl, &pb), wcstof(pb, &pr), wcstof(pr, &pt), wcstof(pt, nullptr));\n        }\n        else\n        {\n            char *pl = std::basic_string<T>::c_str(), *pb, *pr, *pt;\n            return RectF(strtof(pl, &pb), strtof(pb, &pr), strtof(pr, &pt), strtof(pt, nullptr));\n        }\n    }\n\n    template<typename T>\n    TString<T>::operator RectI() const\n    {\n        if constexpr (std::is_same<T, char>::value)\n        {\n            wchar_t *pl = std::basic_string<T>::c_str(), *pb, *pr, *pt;\n            return RectF((int)wcstol(pl, &pb, 10), (int)wcstol(pb, &pr, 10), (int)wcstol(pr, &pt, 10), (int)wcstol(pt, nullptr, 10));\n        }\n        else\n        {\n            char *pl = std::basic_string<T>::c_str(), *pb, *pr, *pt;\n            return RectF((int)strtol(pl, &pb, 10), (int)strtol(pb, &pr, 10), (int)strtol(pr, &pt, 10), (int)strtol(pt, nullptr, 10));\n        }\n    }\n\n    template<typename T>\n    TString<T>::operator BorderF() const\n    {\n        if constexpr (std::is_same<T, char>::value)\n        {\n            wchar_t *pl = std::basic_string<T>::c_str(), *pb, *pr, *pt;\n            return BorderF(wcstof(pl, &pb), wcstof(pb, &pr), wcstof(pr, &pt), wcstof(pt, nullptr));\n        }\n        else\n        {\n            char *pl = std::basic_string<T>::c_str(), *pb, *pr, *pt;\n            return BorderF(strtof(pl, &pb), strtof(pb, &pr), strtof(pr, &pt), strtof(pt, nullptr));\n        }\n    }\n\n    template<typename T>\n    TString<T>::operator BorderI() const\n    {\n        if constexpr (std::is_same<T, char>::value)\n        {\n            wchar_t *pl = std::basic_string<T>::c_str(), *pb, *pr, *pt;\n            return BorderI((int)wcstol(pl, &pb, 10), (int)wcstol(pb, &pr, 10), (int)wcstol(pr, &pt, 10), (int)wcstol(pt, nullptr, 10));\n        }\n        else\n        {\n            char *pl = std::basic_string<T>::c_str(), *pb, *pr, *pt;\n            return BorderI((int)strtol(pl, &pb, 10), (int)strtol(pb, &pr, 10), (int)strtol(pr, &pt, 10), (int)strtol(pt, nullptr, 10));\n        }\n    }\n\n    template<typename T>\n    TString<T>::operator Color4() const\n    {\n        if constexpr (std::is_same<T, char>::value)\n        {\n            wchar_t *pr = std::basic_string<T>::c_str(), *pg, *pb, *pa;\n            return Color4((int)wcstol(pr, &pg, 10), (int)wcstol(pg, &pb, 10), (int)wcstol(pb, &pa, 10), (int)wcstol(pa, nullptr, 10));\n        }\n        else\n        {\n            char *pr = std::basic_string<T>::c_str(), *pg, *pb, *pa;\n            return Color4((int)strtol(pr, &pg, 10), (int)strtol(pg, &pb, 10), (int)strtol(pb, &pa, 10), (int)strtol(pa, nullptr, 10));\n        }\n    }\n\n    template<typename T>\n    template<typename T2, typename X>\n    bool TString<T>::operator==(const T2* data) const\n    {\n        return std::basic_string<T>::compare(TString<T>(data)) == 0;\n    }\n\n    template<typename T>\n    template<typename T2, typename X>\n    bool TString<T>::operator!=(const T2* data) const\n    {\n        return std::basic_string<T>::compare(TString<T>(data)) != 0;\n    }\n\n    template<typename T>\n    bool TString<T>::operator==(const TString& other) const\n    {\n        return std::basic_string<T>::compare(other) == 0;\n    }\n\n    template<typename T>\n    bool TString<T>::operator!=(const TString& other) const\n    {\n        return std::basic_string<T>::compare(other) != 0;\n    }\n\n    template<typename T>\n    bool TString<T>::operator>(const TString& other) const\n    {\n        return std::basic_string<T>::compare(other) > 0;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::operator+(const TString& other) const\n    {\n        TString res(*this);\n        res.Append(other);\n        return res;\n    }\n\n    template<typename T>\n    TString<T>& TString<T>::operator+=(const TString& other)\n    {\n        Append(other);\n        return *this;\n    }\n\n    template<typename T>\n    TString<T>& TString<T>::operator+=(T symbol)\n    {\n        Append(symbol);\n        return *this;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::operator+(T symbol) const\n    {\n        TString res(*this);\n        res.Append(symbol);\n        return res;\n    }\n\n    template<typename T>\n    template<typename T2, typename X>\n    TString<T>& TString<T>::operator+=(T2 symbol)\n    {\n        TString<T2> str(\"x\");\n        str[0] = symbol;\n        Append(str);\n        return *this;\n    }\n\n    template<typename T>\n    template<typename T2, typename X>\n    TString<T> TString<T>::operator+(T2 symbol) const\n    {\n        TString res(*this);\n        TString<T2> str(\"x\");\n        str[0] = symbol;\n        res.Append(str);\n        return res;\n    }\n\n    template<typename T>\n    TString<T>& TString<T>::operator+=(const T* str)\n    {\n        Append(str);\n        return *this;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::operator+(const T* str) const\n    {\n        TString res(*this);\n        res.Append(str);\n        return res;\n    }\n\n    template<typename T>\n    template<typename T2, typename X>\n    TString<T>& TString<T>::operator+=(const T2* str)\n    {\n        Append(TString<T>(str));\n        return *this;\n    }\n\n    template<typename T>\n    template<typename T2, typename X>\n    TString<T> TString<T>::operator+(const T2* str) const\n    {\n        TString res(*this);\n        res.Append(TString<T>(str));\n        return res;\n    }\n\n    template<typename T>\n    T& TString<T>::operator[](int idx)\n    {\n        return std::basic_string<T>::operator[](idx);\n    }\n\n    template<typename T>\n    const T* TString<T>::Data() const\n    {\n        return std::basic_string<T>::c_str();\n    }\n\n    template<typename T>\n    void TString<T>::Reserve(int size)\n    {\n        std::basic_string<T>::reserve(size);\n    }\n\n    template<typename T>\n    int TString<T>::Length() const\n    {\n        return (int)std::basic_string<T>::length();\n    }\n\n    template<typename T>\n    int TString<T>::Capacity() const\n    {\n        return (int)std::basic_string<T>::capacity();\n    }\n\n\n    template<typename T>\n    void TString<T>::Clear()\n    {\n        std::basic_string<T>::clear();\n    }\n\n    template<typename T>\n    bool TString<T>::IsEmpty() const\n    {\n        return std::basic_string<T>::length() == 0;\n    }\n\n    template<typename T>\n    void TString<T>::Append(const TString& other)\n    {\n        std::basic_string<T>::operator+=(other);\n    }\n\n    template<typename T>\n    void TString<T>::Append(T symbol)\n    {\n        std::basic_string<T>::operator+=(symbol);\n    }\n\n    template<typename T>\n    void TString<T>::Insert(const TString& other, int position /*= 0*/)\n    {\n        std::basic_string<T>::insert(position, other);\n    }\n\n    template<typename T>\n    void TString<T>::Insert(T character, int position /*= 0*/)\n    {\n        std::basic_string<T>::insert(std::basic_string<T>::begin() + position, character);\n    }\n\n    template<typename T>\n    void TString<T>::Erase(int begin, int end /*= -1*/)\n    {\n        std::basic_string<T>::erase(begin, end - begin);\n    }\n\n    template<typename T>\n    void TString<T>::Replace(const TString& other, int begin, int end)\n    {\n        if (end < begin)\n            return;\n\n        Erase(begin, end);\n        Insert(other, begin);\n    }\n\n    template<typename T>\n    TString<T> TString<T>::Replaced(const TString& other, int begin, int end) const\n    {\n        TString res(*this);\n        res.Replace(other, begin, end);\n        return res;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::ReplacedAll(const TString& oldStr, const TString& newStr) const\n    {\n        TString res(*this);\n        res.ReplaceAll(oldStr, newStr);\n        return res;\n    }\n\n    template<typename T>\n    void TString<T>::ReplaceAll(const TString& oldStr, const TString& newStr)\n    {\n        while (true)\n        {\n            int fnd = Find(oldStr);\n            if (fnd < 0)\n                break;\n\n            Replace(newStr, fnd, fnd + oldStr.Length());\n        }\n    }\n\n    template<typename T>\n    int TString<T>::Find(const TString& other, int startIdx /*= 0*/) const\n    {\n        return (int)std::basic_string<T>::find(other, startIdx);\n    }\n\n    template<typename T>\n    int TString<T>::Find(T symbol, int startIdx /*= 0*/) const\n    {\n        return (int)std::basic_string<T>::find(symbol, startIdx);\n    }\n\n    template<typename T>\n    bool TString<T>::Contains(const TString& other, int startIdx /*= 0*/) const\n    {\n        return Find(other, startIdx) != -1;\n    }\n\n    template<typename T>\n    bool TString<T>::Contains(T symbol, int startIdx /*= 0*/) const\n    {\n        return Find(symbol, startIdx) != -1;\n    }\n\n    template<typename T>\n    int TString<T>::CountOf(const TString& other, int startIdx /*= 0*/) const\n    {\n        int res = 0;\n        int searchIdx = startIdx;\n        int l1 = Length(), l2 = other.Length();\n        do\n        {\n            int srch = Find(other, searchIdx);\n            if (srch < 0)\n                break;\n\n            res++;\n            searchIdx = srch + l2;\n        } while (searchIdx < l1);\n\n        return res;\n    }\n\n    template<typename T>\n    int TString<T>::FindLast(const TString& other, int startIdx /*= -1*/) const\n    {\n        return (int)std::basic_string<T>::rfind(other, (size_t)startIdx);\n\n    }\n\n    template<typename T>\n    bool TString<T>::EndsWith(const TString& other) const\n    {\n        return std::basic_string<T>::rfind(other) == Length() - other.Length();\n    }\n\n    template<typename T>\n    bool TString<T>::StartsWith(const TString& other) const\n    {\n        return std::basic_string<T>::find(other) == 0;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::SubStr(int begin, int end /*= -1*/) const\n    {\n        return TString<T>(std::basic_string<T>::substr(begin, end - begin));\n    }\n\n    template<typename T>\n    Vector<TString<T>> TString<T>::Split(const TString& splitStr) const\n    {\n        Vector<TString> res;\n\n        if (IsEmpty())\n            return res;\n\n        int i = 0;\n        int l1 = Length(), l2 = splitStr.Length();\n        while (i < l1)\n        {\n            int f = Find(splitStr, i);\n            if (f < 0)\n            {\n                res.Add(SubStr(i));\n                break;\n            }\n\n            res.Add(SubStr(i, f));\n            i = f + l2;\n        }\n\n        return res;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::ToLowerCase() const\n    {\n        TString<T> res(*this);\n        std::transform(res.begin(), res.end(), res.begin(), ::tolower);\n        return res;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::ToUpperCase() const\n    {\n        TString<T> res(*this);\n        std::transform(res.begin(), res.end(), res.begin(), ::toupper);\n        return res;\n    }\n\n    template<typename T>\n    void TString<T>::Trim(const TString& trimSymbols /*= \" \"*/)\n    {\n        TrimStart(trimSymbols);\n        TrimEnd(trimSymbols);\n    }\n\n    template<typename T>\n    void TString<T>::TrimStart(const TString& trimSymbols /*= \" \"*/)\n    {\n        int trimEnd = -1;\n        int l1 = Length(), l2 = trimSymbols.Length();\n        for (int i = 0; i < l1; i++)\n        {\n            bool breaking = true;\n            auto dataChar = (*this)[i];\n            for (int j = 0; j < l2; j++)\n            {\n                if (dataChar == trimSymbols[j])\n                {\n                    breaking = false;\n                    break;\n                }\n            }\n\n            if (breaking)\n                break;\n            else\n                trimEnd = i;\n        }\n\n        Erase(0, trimEnd + 1);\n    }\n\n    template<typename T>\n    void TString<T>::TrimEnd(const TString& trimSymbols /*= \" \"*/)\n    {\n        int l1 = Length(), l2 = trimSymbols.Length();\n        int trimEnd = l1;\n        for (int i = l1 - 1; i >= 0; i--)\n        {\n            bool breaking = true;\n            auto dataChar = (*this)[i];\n            for (int j = 0; j < l2; j++)\n            {\n                if (dataChar == trimSymbols[j])\n                {\n                    breaking = false;\n                    break;\n                }\n            }\n\n            if (breaking)\n                break;\n            else\n                trimEnd = i;\n        }\n\n        Erase(trimEnd, l1);\n    }\n\n    template<typename T>\n    TString<T> TString<T>::TrimedEnd(const TString& trimSymbols /*= \" \"*/)\n    {\n        TString res(*this);\n        res.TrimEnd(trimSymbols);\n        return res;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::TrimedStart(const TString& trimSymbols /*= \" \"*/)\n    {\n        TString res(*this);\n        res.TrimStart(trimSymbols);\n        return res;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::Trimed(const TString& trimSymbols /*= \" \"*/)\n    {\n        TString res(*this);\n        res.Trim(trimSymbols);\n        return res;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::Format(const TString format, ...)\n    {\n        va_list vlist;\n        va_start(vlist, format);\n\n        TString res = Format(format, vlist);\n\n        va_end(vlist);\n\n        return res;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::Format(const TString format, va_list vlist)\n    {\n        const int maxSize = 2048;\n        char buffer[maxSize];\n        vsnprintf(buffer, maxSize, TString<char>(format).c_str(), vlist);\n\n        return TString<T>(buffer);\n\t}\n\n\ttemplate<typename T>\n\ttemplate<typename T2>\n\tTString<T> TString<T>::ToString(const T2& value)\n\t{\n\t\treturn TString<T>(value);\n\t}\n\n    template<typename T>\n    TString<T> TString<T>::Appended(const TString& other) const\n    {\n        TString res(*this);\n        res.Append(other);\n        return res;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::Inserted(const TString& other, int position /*= 0*/) const\n    {\n        TString res(*this);\n        res.Insert(other, position);\n        return res;\n    }\n\n    template<typename T>\n    TString<T> TString<T>::Erased(int begin, int end /*= -1*/) const\n    {\n        TString res(*this);\n        res.Erase(begin, end);\n        return res;\n    }\n\n    template<typename T>\n    T TString<T>::PopBack()\n    {\n        int l = Length();\n        T res = (*this)[l - 1];\n        (*this)[l] = '\\0';\n        return res;\n    }\n\n    template<typename T>\n    T TString<T>::First() const\n    {\n        return (*this)[0];\n    }\n\n    template<typename T>\n    T TString<T>::Last() const\n    {\n        int len = Length();\n        if (len == 0)\n            return T();\n\n        return (*this)[len - 1];\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/UID.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"UID.h\"\n\nnamespace o2\n{\n    UID::UID()\n    {\n        Randomize();\n    }\n\n    UID::UID(int value)\n    {\n        memset(data, 0, 16);\n        memcpy(data, &value, 4);\n    }\n\n    UID::UID(const UID& other)\n    {\n        memcpy(data, other.data, 16);\n    }\n\n    UID::UID(const WString& stringData)\n    {\n        FromString(stringData);\n    }\n\n    UID& UID::operator=(const UID& other)\n    {\n        memcpy(data, other.data, 16);\n        return *this;\n    }\n\n    UID& UID::operator=(const WString& data)\n    {\n        FromString(data);\n        return *this;\n    }\n\n    bool UID::operator!=(const UID& other) const\n    {\n        return memcmp(data, other.data, 16) != 0;\n    }\n\n    bool UID::operator==(const UID& other) const\n    {\n        return memcmp(data, other.data, 16) == 0;\n    }\n\n    bool UID::operator<(const UID& other) const\n    {\n        return memcmp(data, other.data, 16) < 0;\n    }\n\n    UID::operator WString() const\n    {\n        return ToString();\n    }\n\n    UID::operator String() const\n    {\n        return ToString();\n    }\n\n    UID& UID::operator=(const String& data)\n    {\n        FromString(data);\n        return *this;\n    }\n\n    void UID::Randomize()\n    {\n        for (int i = 0; i < 16; i += 2)\n        {\n            auto r = rand();\n            memcpy(data + i, &r, 2);\n        }\n    }\n\n    WString UID::ToString() const\n    {\n        char st[33];\n        st[32] = '\\0';\n        for (int i = 0; i < 16; i += 4)\n        {\n            std::wstringstream stream;\n            stream << std::hex << *(int*)(data + i);\n\n            int l = (int)stream.str().length();\n            for (int j = 0; j < 8; j++)\n            {\n                int x = l - 8 + j;\n                st[i * 2 + j] = x < 0 ? '0' : stream.str()[x];\n            }\n        }\n\n        return st;\n    }\n\n    void UID::FromString(const WString& stringData)\n    {\n        wchar_t* pp;\n        wchar_t* str = const_cast<wchar_t*>(stringData.Data());\n        for (int i = 0; i < 16; i += 4)\n        {\n            int ii = i * 2;\n            int ii1 = ii + 8;\n            wchar_t t = str[ii1];\n            str[ii1] = '\\0';\n            long x = wcstol(str + ii, &pp, 16);\n            memcpy(data + i, &x, 4);\n            str[ii1] = t;\n        }\n    }\n\n    UID UID::empty = UID(0);\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/UID.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/String.h\"\n#include <iomanip>\n#include <iostream>\n#include <fstream>\n#include <string>\n#include <sstream>\n\nnamespace o2\n{\n    class UID\n    {\n    public:\n        char data[16];\n\n    public:\n        UID();\n        UID(const UID& other);\n        explicit UID(int value);\n        explicit UID(const WString& stringData);\n\n        UID& operator=(const UID& other);\n\n        bool operator==(const UID& other) const;\n        bool operator!=(const UID& other) const;\n\n        bool operator<(const UID& other) const;\n\n        void Randomize();\n\n        WString ToString() const;\n        void FromString(const WString& stringData);\n\n        explicit operator WString() const;\n        UID& operator=(const WString& data);\n\n        explicit operator String() const;\n        UID& operator=(const String& data);\n\n    public:\n        static UID empty;\n    };\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/Variant.h",
    "content": "#pragma once\n\n#include <variant>\n\nnamespace o2\n{\n    // -----------------------------------------------------------------------\n    // Type-safe union wrapper around std::variant with Boost-like interface\n    // -----------------------------------------------------------------------\n    template<typename... Types>\n    class Variant : public std::variant<Types...>\n    {\n    public:\n        using Base = std::variant<Types...>;\n        \n        using Base::Base;\n        using Base::operator=;\n        \n        // Default constructor\n        Variant() = default;\n        \n        // Copy constructor\n        Variant(const Variant&) = default;\n\n        // Move constructor\n        Variant(Variant&&) = default;\n        \n        // Copy assignment operator\n        Variant& operator=(const Variant&) = default;\n\n        // Move assignment operator\n        Variant& operator=(Variant&&) = default;\n        \n        // Constructor from value\n        template<typename T>\n        Variant(T&& value) : Base(std::forward<T>(value)) {}\n        \n        // Assignment from value\n        template<typename T>\n        Variant& operator=(T&& value)\n        {\n            Base::operator=(std::forward<T>(value));\n            return *this;\n        }\n        \n        // Returns index of currently held type\n        int Which() const noexcept\n        {\n            return static_cast<int>(Base::index());\n        }\n        \n        // Returns true if variant holds a value\n        bool HasValue() const noexcept\n        {\n            return !Base::valueless_by_exception();\n        }\n        \n        // Returns true if variant is valueless by exception\n        bool ValuelessByException() const noexcept\n        {\n            return Base::valueless_by_exception();\n        }\n        \n        // Returns true if variant holds specified type\n        template<typename T>\n        bool Holds() const noexcept\n        {\n            return std::holds_alternative<T>(*this);\n        }\n        \n        // Returns reference to value of specified type. Throws if type mismatch\n        template<typename T>\n        T& Get()\n        {\n            return std::get<T>(*this);\n        }\n        \n        // Returns const reference to value of specified type. Throws if type mismatch\n        template<typename T>\n        const T& Get() const\n        {\n            return std::get<T>(*this);\n        }\n        \n        // Returns reference to value at specified index. Throws if index mismatch\n        template<std::size_t Index>\n        auto& Get()\n        {\n            return std::get<Index>(*this);\n        }\n        \n        // Returns const reference to value at specified index. Throws if index mismatch\n        template<std::size_t Index>\n        const auto& Get() const\n        {\n            return std::get<Index>(*this);\n        }\n        \n        // Returns pointer to value of specified type, or nullptr if type mismatch\n        template<typename T>\n        T* GetPointer() noexcept\n        {\n            return std::get_if<T>(this);\n        }\n        \n        // Returns const pointer to value of specified type, or nullptr if type mismatch\n        template<typename T>\n        const T* GetPointer() const noexcept\n        {\n            return std::get_if<T>(this);\n        }\n        \n        // Returns pointer to value at specified index, or nullptr if index mismatch\n        template<std::size_t Index>\n        auto* GetPointer() noexcept\n        {\n            return std::get_if<Index>(this);\n        }\n        \n        // Returns const pointer to value at specified index, or nullptr if index mismatch\n        template<std::size_t Index>\n        const auto* GetPointer() const noexcept\n        {\n            return std::get_if<Index>(this);\n        }\n        \n        // Applies visitor to currently held value\n        template<typename Visitor>\n        decltype(auto) Visit(Visitor&& visitor)\n        {\n            return std::visit(std::forward<Visitor>(visitor), *this);\n        }\n        \n        // Applies visitor to currently held value (const version)\n        template<typename Visitor>\n        decltype(auto) Visit(Visitor&& visitor) const\n        {\n            return std::visit(std::forward<Visitor>(visitor), *this);\n        }\n        \n        // Equal operator\n        friend bool operator==(const Variant& lhs, const Variant& rhs)\n        {\n            return static_cast<const Base&>(lhs) == static_cast<const Base&>(rhs);\n        }\n        \n        // Not equal operator\n        friend bool operator!=(const Variant& lhs, const Variant& rhs)\n        {\n            return static_cast<const Base&>(lhs) != static_cast<const Base&>(rhs);\n        }\n        \n        // Less operator\n        friend bool operator<(const Variant& lhs, const Variant& rhs)\n        {\n            return static_cast<const Base&>(lhs) < static_cast<const Base&>(rhs);\n        }\n        \n        // Less or equal operator\n        friend bool operator<=(const Variant& lhs, const Variant& rhs)\n        {\n            return static_cast<const Base&>(lhs) <= static_cast<const Base&>(rhs);\n        }\n        \n        // Greater operator\n        friend bool operator>(const Variant& lhs, const Variant& rhs)\n        {\n            return static_cast<const Base&>(lhs) > static_cast<const Base&>(rhs);\n        }\n        \n        // Greater or equal operator\n        friend bool operator>=(const Variant& lhs, const Variant& rhs)\n        {\n            return static_cast<const Base&>(lhs) >= static_cast<const Base&>(rhs);\n        }\n    };\n    \n    // Returns reference to value of specified type from variant\n    template<typename T, typename... Types>\n    T& Get(Variant<Types...>& v)\n    {\n        return v.template Get<T>();\n    }\n    \n    // Returns const reference to value of specified type from variant\n    template<typename T, typename... Types>\n    const T& Get(const Variant<Types...>& v)\n    {\n        return v.template Get<T>();\n    }\n    \n    // Returns reference to value at specified index from variant\n    template<std::size_t Index, typename... Types>\n    auto& Get(Variant<Types...>& v)\n    {\n        return v.template Get<Index>();\n    }\n    \n    // Returns const reference to value at specified index from variant\n    template<std::size_t Index, typename... Types>\n    const auto& Get(const Variant<Types...>& v)\n    {\n        return v.template Get<Index>();\n    }\n    \n    // Returns pointer to value of specified type, or nullptr if type mismatch or v is nullptr\n    template<typename T, typename... Types>\n    T* GetIf(Variant<Types...>* v) noexcept\n    {\n        return v ? v->template GetPointer<T>() : nullptr;\n    }\n    \n    // Returns const pointer to value of specified type, or nullptr if type mismatch or v is nullptr\n    template<typename T, typename... Types>\n    const T* GetIf(const Variant<Types...>* v) noexcept\n    {\n        return v ? v->template GetPointer<T>() : nullptr;\n    }\n    \n    // Returns pointer to value at specified index, or nullptr if index mismatch or v is nullptr\n    template<std::size_t Index, typename... Types>\n    auto* GetIf(Variant<Types...>* v) noexcept\n    {\n        return v ? v->template GetPointer<Index>() : nullptr;\n    }\n    \n    // Returns const pointer to value at specified index, or nullptr if index mismatch or v is nullptr\n    template<std::size_t Index, typename... Types>\n    const auto* GetIf(const Variant<Types...>* v) noexcept\n    {\n        return v ? v->template GetPointer<Index>() : nullptr;\n    }\n    \n    // Returns true if variant holds specified type\n    template<typename T, typename... Types>\n    bool HoldsAlternative(const Variant<Types...>& v) noexcept\n    {\n        return v.template Holds<T>();\n    }\n    \n    // Applies visitor to variants\n    template<typename Visitor, typename... Variants>\n    decltype(auto) Visit(Visitor&& visitor, Variants&&... variants)\n    {\n        return std::visit(std::forward<Visitor>(visitor), std::forward<Variants>(variants)...);\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/Types/WeakRef.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // --------------\n    // Weak reference\n    // --------------\n    template<typename _type>\n    class WeakRef\n    {\n    public:\n        // Default constructor\n        WeakRef();\n\n        // Constructor from nullptr\n        WeakRef(std::nullptr_t);\n\n        // Constructor from pointer\n        explicit WeakRef(_type* ptr);\n\n        // Copy constructor\n        WeakRef(const WeakRef<_type>& other);\n\n        // Move constructor\n        WeakRef(WeakRef<_type>&& other);\n\n        // Copy constructor from strong reference\n        WeakRef(const Ref<_type>& other);\n\n        // Move constructor from strong reference\n        WeakRef(Ref<_type>&& other);\n\n        // Destructor\n        ~WeakRef();\n\n        // Equality operator\n        bool operator==(const WeakRef<_type>& other) const;\n\n        // Equality operator\n        bool operator==(const _type* other) const;\n\n        // Inequality operator\n        bool operator!=(const WeakRef<_type>& other) const;\n\n        // Inequality operator\n        bool operator!=(const _type* other) const;\n\n        // Copy from nullptr operator\n        WeakRef& operator=(std::nullptr_t);\n\n        // Copy operator\n        WeakRef& operator=(const WeakRef<_type>& other);\n\n        // Move operator\n        WeakRef& operator=(WeakRef<_type>&& other);\n\n        // Copy operator from strong reference\n        WeakRef& operator=(const Ref<_type>& other);\n\n        // Move operator from strong reference\n        WeakRef& operator=(Ref<_type>&& other);\n\n        // Less operator\n        bool operator<(const WeakRef<_type>& other) const { return mPtr < other.mPtr; }\n\n        // Returns true if reference is valid\n        bool IsValid() const;\n\n        // Returns true if reference is expired\n        bool IsExpired() const;\n\n        // Boolean cast operator, true means that reference is valid\n        explicit operator bool() const;\n\n        // Returns strong reference to object\n        Ref<_type> Lock() const;\n\n    protected:\n        _type*      mPtr = nullptr;        // Pointer to object\n        RefCounter* mRefCounter = nullptr; // Pointer to reference counter\n\n    protected:\n        void CheckRefCounter();  // Gets reference counter if pointer is valid\n        void IncrementWeakRef(); // Increments weak reference counter\n        void DecrementWeakRef(); // Decrements weak reference counter\n\n        template<typename _other_type>\n        friend class Ref;\n\n        template<typename _to_type, typename _from_type>\n        friend WeakRef<_to_type> DynamicWeakCast(const WeakRef<_from_type>& from);\n    };\n\n    // Dynamic cast from one weak reference type to another\n    template<typename _to_type, typename _from_type>\n    WeakRef<_to_type> DynamicWeakCast(const WeakRef<_from_type>& from)\n    {\n        return WeakRef<_to_type>(dynamic_cast<_to_type*>(const_cast<_from_type*>(from.mPtr)));\n    }\n\n    template<typename _type>\n    WeakRef<_type>::WeakRef() = default;\n\n    template<typename _type>\n    WeakRef<_type>::WeakRef(std::nullptr_t)\n    {}\n\n    template<typename _type>\n    WeakRef<_type>::WeakRef(_type* ptr) :\n        mPtr(ptr)\n    {\n        CheckRefCounter();\n        IncrementWeakRef();\n    }\n\n    template<typename _type>\n    WeakRef<_type>::WeakRef(const WeakRef<_type>& other) :\n        mPtr(other.mPtr), mRefCounter(other.mRefCounter)\n    {\n        IncrementWeakRef();\n    }\n\n    template<typename _type>\n    WeakRef<_type>::WeakRef(WeakRef<_type>&& other) :\n        mPtr(other.mPtr), mRefCounter(other.mRefCounter)\n    {\n        other.mPtr = nullptr;\n        other.mRefCounter = nullptr;\n    }\n\n    template<typename _type>\n    WeakRef<_type>::WeakRef(const Ref<_type>& other) :\n        mPtr(other.mPtr)\n    {\n        CheckRefCounter();\n        IncrementWeakRef();\n    }\n\n    template<typename _type>\n    WeakRef<_type>::WeakRef(Ref<_type>&& other) :\n        mPtr(other.mPtr)\n    {\n        CheckRefCounter();\n        other.mPtr = nullptr;\n    }\n\n    template<typename _type>\n    WeakRef<_type>::~WeakRef()\n    {\n        DecrementWeakRef();\n    }\n\n    template<typename _type>\n    bool WeakRef<_type>::operator==(const WeakRef<_type>& other) const\n    {\n        return mPtr == other.mPtr;\n    }\n\n    template<typename _type>\n    bool WeakRef<_type>::operator==(const _type* other) const\n    {\n        return mPtr == other;\n    }\n\n    template<typename _type>\n    bool WeakRef<_type>::operator!=(const WeakRef<_type>& other) const\n    {\n        return mPtr != other.mPtr;\n    }\n\n    template<typename _type>\n    bool WeakRef<_type>::operator!=(const _type* other) const\n    {\n        return mPtr != other;\n    }\n\n    template<typename _type>\n    WeakRef<_type>& WeakRef<_type>::operator=(std::nullptr_t)\n    {\n        DecrementWeakRef();\n\n        mPtr = nullptr;\n        mRefCounter = nullptr;\n\n        return *this;\n    }\n\n    template<typename _type>\n    WeakRef<_type>& WeakRef<_type>::operator=(const WeakRef<_type>& other)\n    {\n        DecrementWeakRef();\n\n        mPtr = other.mPtr;\n        CheckRefCounter();\n\n        IncrementWeakRef();\n\n        return *this;\n    }\n\n    template<typename _type>\n    WeakRef<_type>& WeakRef<_type>::operator=(WeakRef<_type>&& other)\n    {\n        DecrementWeakRef();\n\n        mPtr = other.mPtr;\n        mRefCounter = other.mRefCounter;\n        other.mPtr = nullptr;\n        other.mRefCounter = nullptr;\n\n        return *this;\n    }\n\n    template<typename _type>\n    WeakRef<_type>& WeakRef<_type>::operator=(const Ref<_type>& other)\n    {\n        DecrementWeakRef();\n\n        mPtr = other.mPtr;\n        CheckRefCounter();\n\n        IncrementWeakRef();\n\n        return *this;\n    }\n\n    template<typename _type>\n    WeakRef<_type>& WeakRef<_type>::operator=(Ref<_type>&& other)\n    {\n        DecrementWeakRef();\n\n        mPtr = other.mPtr;\n        CheckRefCounter();\n        other.mPtr = nullptr;\n\n        return *this;\n    }\n\n    template<typename _type>\n    bool WeakRef<_type>::IsValid() const\n    {\n        return !IsExpired();\n    }\n\n    template<typename _type>\n    bool WeakRef<_type>::IsExpired() const\n    {\n        return mRefCounter ? mRefCounter->strongReferences == 0 : true;\n    }\n\n    template<typename _type>\n    WeakRef<_type>::operator bool() const\n    {\n        return IsValid();\n    }\n\n    template<typename _type>\n    Ref<_type> WeakRef<_type>::Lock() const\n    {\n        if (IsExpired())\n            return Ref<_type>();\n\n        return Ref<_type>(mPtr);\n    }\n\n    template<typename _type>\n    void WeakRef<_type>::CheckRefCounter()\n    {\n        mRefCounter = mPtr ? GetRefCounter(mPtr) : nullptr;\n    }\n\n    template<typename _type>\n    void WeakRef<_type>::IncrementWeakRef()\n    {\n        if (mRefCounter)\n            mRefCounter->weakReferences++;\n    }\n\n    template<typename _type>\n    void WeakRef<_type>::DecrementWeakRef()\n    {\n        if (mRefCounter)\n        {\n            mRefCounter->weakReferences--;\n            if (mRefCounter->strongReferences == 0)\n            {\n                if (mRefCounter->weakReferences == 0)\n                {\n                    _mfree(mRefCounter);\n                    mRefCounter = nullptr;\n                    mPtr = nullptr;\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "Framework/Sources/o2/Utils/ValueProxy.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"ValueProxy.h\"\n\nnamespace o2\n{\n#if IS_SCRIPTING_SUPPORTED\n    ScriptValueProxy::ScriptValueProxy(IScriptValueProperty* prop) :\n        scriptProperty(prop)\n    {}\n\n    ScriptValueProxy::ScriptValueProxy()\n    {}\n\n    ScriptValueProxy::~ScriptValueProxy()\n    {\n        if (scriptProperty)\n            delete scriptProperty;\n    }\n\n    void ScriptValueProxy::SetValuePtr(void* value)\n    {\n        GetType().CopyValue(scriptProperty->Get().GetContainingObject(), value);\n    }\n\n    void ScriptValueProxy::GetValuePtr(void* value) const\n    {\n        GetType().CopyValue(value, scriptProperty->Get().GetContainingObject());\n    }\n\n    const Type& ScriptValueProxy::GetType() const\n    {\n        return *scriptProperty->Get().GetObjectContainerType();\n    }\n#endif\n}"
  },
  {
    "path": "Framework/Sources/o2/Utils/ValueProxy.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Function/Function.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scripts/ScriptValueDef.h\"\n#endif\n\nnamespace o2\n{\n    class Type;\n\n    // ----------------------------------------------------------------------------\n    // Abstract value proxy. Accepts by void*, value by pointer must match the type\n    // ----------------------------------------------------------------------------\n    class IAbstractValueProxy : public RefCounterable\n    {\n    public:\n        // Destructor\n        virtual ~IAbstractValueProxy() {}\n\n        // Sets value by pointer. The type of value should match the type of proxy\n        virtual void SetValuePtr(void* value) = 0;\n\n        // Gets value by pointer. The type of value should match the type of proxy\n        virtual void GetValuePtr(void* value) const = 0;\n\n        // Returns the type of proxying value\n        virtual const Type& GetType() const = 0;\n    };\n\n    // -----------------\n    // Typed value proxy\n    // -----------------\n    template<typename _type>\n    class IValueProxy : public IAbstractValueProxy\n    {\n    public:\n        // Sets value by reference\n        virtual void SetValue(const _type& value) = 0;\n\n        // Gets value by value\n        virtual _type GetValue() const = 0;\n\n        // Returns the type of proxying value\n        void SetValuePtr(void* value) override;\n\n        // Gets value by pointer\n        void GetValuePtr(void* value) const override;\n\n        // Returns the type of proxying value\n        const Type& GetType() const override;\n    };\n\n    // ------------------------------------------------------------\n    // Pointer value proxy interface. Can returns to source pointer\n    // ------------------------------------------------------------\n    class IPointerValueProxy : public IRefCounterable\n    {\n    public:\n        // Destructor\n        virtual ~IPointerValueProxy() {}\n        \n        // Returns the pointer to value, stored in proxy\n        virtual void* GetValueVoidPointer() const = 0;\n    };\n\n    // ------------------------------------------------------------------------\n    // Typed pointer value proxy. Stores the pointer to value and works with it\n    // ------------------------------------------------------------------------\n    template<typename _type>\n    class PointerValueProxy : public IValueProxy<_type>, public IPointerValueProxy\n    {\n    public:\n        // Default constructor\n        PointerValueProxy() {}\n\n        // Constructor with value pointer\n        PointerValueProxy(_type* valuePtr) :mValuePtr(valuePtr) {}\n\n        // Sets value by reference\n        void SetValue(const _type& value) override { *mValuePtr = value; }\n\n        // Gets value by value\n        _type GetValue() const override { return *mValuePtr; }\n\n        // Sets value by pointer\n        _type* GetValuePointer() const { return mValuePtr; }\n\n        // Sets value by pointer\n        void* GetValueVoidPointer() const override { return (void*)mValuePtr; }\n\n        REF_COUNTERABLE_IMPL_TEMPLATE(PointerValueProxy<_type>, IValueProxy<_type>);\n\n    protected:\n        _type* mValuePtr = nullptr; // Proxying value pointer\n    };\n\n    // ----------------------------------------------------\n    // Reference pointer value proxy. Works with Ref<_type>\n    // ----------------------------------------------------\n    class IRefPointerValueProxy\n    {\n    public:\n        // Returns the pointer to value, stored in proxy\n        virtual void* GetRefValueVoidPtr() const = 0;\n\n        // Sets the pointer to value, stored in proxy\n        virtual void SetRefValuePtr(void* value) = 0;\n    };\n\n    // ----------------------------------------------------\n    // Reference pointer value proxy. Works with Ref<_type>\n    // ----------------------------------------------------\n    template<typename _type>\n    class RefPointerValueProxy : public PointerValueProxy<Ref<_type>>, public IRefPointerValueProxy\n    {\n    public:\n        using Base = PointerValueProxy<Ref<_type>>;\n\n    public:\n        // Default constructor\n        RefPointerValueProxy() {}\n\n        // Constructor with value pointer\n        RefPointerValueProxy(Ref<_type>* valuePtr) :Base(valuePtr) {}\n\n        // Returns the pointer to value, stored in proxy\n        void* GetRefValueVoidPtr() const override { return Base::GetValuePointer()->Get(); }\n\n        // Sets the pointer to value, stored in proxy\n        void SetRefValuePtr(void* value) override { (*Base::GetValuePointer()) = Ref((_type*)value); }\n    };\n\n\n    // ----------------------------------------------------\n    // Functional proxy, uses function to set and get value\n    // ----------------------------------------------------\n    template<typename _type>\n    class FunctionalValueProxy : public IValueProxy<_type>\n    {\n    public:\n        // Default constructor\n        FunctionalValueProxy() {}\n\n        // Constructor with setter and getter functions\n        FunctionalValueProxy(const Function<void(_type)> setter, const Function<_type()> getter) :\n            mSetter(setter), mGetter(getter)\n        {}\n\n        // Sets value by reference\n        void SetValue(const _type& value) override { mSetter(value); }\n\n        // Gets value by value\n        _type GetValue() const override { return mGetter(); }\n\n    protected:\n        Function<void(_type)> mSetter; // Setter function\n        Function<_type()>     mGetter; // Getter function\n    };\n\n    // -----------------------------------------------------------------------\n    // Property value proxy interface. Used to identify property value proxies\n    // ----------------------------------------------------------------------\n    class IPropertyValueProxy\n    {\n    public:\n        bool IsProperty() const { return true; }\n    };\n\n    // -------------------------------------------------------------------------\n    // Property proxy, uses setter and getter from property to set and get value\n    // -------------------------------------------------------------------------\n    template<typename _type, typename _property_type>\n    class PropertyValueProxy : public IValueProxy<_type>, public IPropertyValueProxy\n    {\n    public:\n        // Default constructor\n        PropertyValueProxy() {}\n\n        // Constructor with property pointer\n        PropertyValueProxy(_property_type* ptr) :mProperty(ptr) {}\n\n        // Equality operator\n        bool operator==(const PropertyValueProxy<_type, _property_type>& other) const { return mProperty == other.mProperty; }\n\n        // Sets value by reference\n        void SetValue(const _type& value) override { mProperty->Set(value); }\n\n        // Returns value from proxy\n        _type GetValue() const override { return mProperty->Get(); }\n\n    protected:\n        _property_type* mProperty = nullptr; // Pointer to proxied property\n    };\n\n\n#if IS_SCRIPTING_SUPPORTED\n    // --------------------------\n    // Unified script value proxy\n    // --------------------------\n    class ScriptValueProxy : public IAbstractValueProxy\n    {\n    public:\n        IScriptValueProperty* scriptProperty = nullptr; // Script value property\n\n    public:\n        // Default constructor\n        ScriptValueProxy();\n\n        // Constructor with script property\n        ScriptValueProxy(IScriptValueProperty* prop);\n\n        // Destructor\n        ~ScriptValueProxy() override;\n\n        // Sets value by pointer\n        void SetValuePtr(void* value) override;\n\n        // Gets value by pointer\n        void GetValuePtr(void* value) const override;\n\n        // Returns the type of proxying value\n        const Type& GetType() const override;\n    };\n\n    // ------------------------\n    // Script value typed proxy\n    // ------------------------\n    template<typename _type>\n    class TypeScriptValueProxy : public IValueProxy<_type>, public ScriptValueProperty\n    {\n    public:\n        IScriptValueProperty* scriptProperty = nullptr; // Script value property\n\n    public:\n        // Default constructor\n        TypeScriptValueProxy();\n\n        // Constructor with script property\n        TypeScriptValueProxy(IScriptValueProperty* prop);\n\n        // Destructor\n        ~TypeScriptValueProxy() override;\n\n        // Sets value by reference\n        void SetValue(const _type& value) override;\n\n        // Returns value\n        _type GetValue() const override;\n\n        REF_COUNTERABLE_IMPL_TEMPLATE(TypeScriptValueProxy<_type>, IValueProxy<_type>);\n    };\n\n    // ----------------------------------------\n    // Pointer script value proxy, using _type*\n    // ----------------------------------------\n    template<typename _type>\n    class PtrScriptValueProxy : public IValueProxy<_type>, public ScriptValueProperty\n    {\n    public:\n        IScriptValueProperty* scriptProperty = nullptr; // Script value property\n\n    public:\n        // Default constructor\n        PtrScriptValueProxy();\n\n        // Constructor with script property\n        PtrScriptValueProxy(IScriptValueProperty* prop);\n\n        // Destructor\n        ~PtrScriptValueProxy() override;\n\n        // Sets value by pointer\n        void SetValue(const _type& value) override;\n\n        // Returns value\n        _type GetValue() const override;\n\n        // Returns type of value\n        const Type& GetType() const override;\n    };\n#endif\n}\n\n#include \"o2/Utils/Reflection/Type.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scripts/ScriptValue.h\"\n#endif\n\nnamespace o2\n{\n    template<typename _type>\n    void IValueProxy<_type>::SetValuePtr(void* value)\n    {\n        SetValue(*(_type*)value);\n    }\n\n    template<typename _type>\n    void IValueProxy<_type>::GetValuePtr(void* value) const\n    {\n        *(_type*)value = GetValue();\n    }\n\n    template<typename _type>\n    const Type& IValueProxy<_type>::GetType() const\n    {\n        return TypeOf(_type);\n    }\n\n#if IS_SCRIPTING_SUPPORTED\n    template<typename _type>\n    TypeScriptValueProxy<_type>::TypeScriptValueProxy()\n    {}\n\n    template<typename _type>\n    TypeScriptValueProxy<_type>::TypeScriptValueProxy(IScriptValueProperty* prop)\n        :scriptProperty(prop)\n    {}\n\n    template<typename _type>\n    TypeScriptValueProxy<_type>::~TypeScriptValueProxy()\n    {\n        if (scriptProperty)\n            delete scriptProperty;\n    }\n\n    template<typename _type>\n    void TypeScriptValueProxy<_type>::SetValue(const _type& value)\n    {\n        scriptProperty->Set(ScriptValue(value));\n    }\n\n    template<typename _type>\n    _type TypeScriptValueProxy<_type>::GetValue() const\n    {\n        return scriptProperty->Get().GetValue<_type>();\n    }\n\n    template<typename _type>\n    PtrScriptValueProxy<_type>::PtrScriptValueProxy()\n    {}\n\n    template<typename _type>\n    PtrScriptValueProxy<_type>::PtrScriptValueProxy(IScriptValueProperty* prop)\n        :scriptProperty(prop)\n    {}\n\n    template<typename _type>\n    PtrScriptValueProxy<_type>::~PtrScriptValueProxy()\n    {\n        if (scriptProperty)\n            delete scriptProperty;\n    }\n\n    template<typename _type>\n    void PtrScriptValueProxy<_type>::SetValue(const _type& value)\n    {\n        scriptProperty->Set(ScriptValue(mnew _type(value)));\n    }\n\n    template<typename _type>\n    _type PtrScriptValueProxy<_type>::GetValue() const\n    {\n        return *scriptProperty->Get().GetValue<_type*>();\n    }\n\n    template<typename _type>\n    const Type& PtrScriptValueProxy<_type>::GetType() const\n    {\n        if constexpr (std::is_base_of<IObject, _type>::value)\n            return scriptProperty->Get().GetValue<_type*>()->GetType();\n        else\n            return TypeOf(_type);\n    }\n#endif\n}\n"
  },
  {
    "path": "Framework/Sources/o2/o2Framework.cpp",
    "content": "extern void __RegisterEnum__o2__Shader__Type();\nextern void __RegisterEnum__o2__Texture__Usage();\nextern void __RegisterEnum__o2__Texture__Filter();\nextern void __RegisterEnum__o2__Actor__State();\nextern void __RegisterEnum__o2__ActorCreateMode();\nextern void __RegisterEnum__o2__CameraActor__Type();\nextern void __RegisterEnum__o2__EditorTestComponent__TestEnum();\nextern void __RegisterEnum__o2__RigidBody__Type();\nextern void __RegisterEnum__o2__HorizontalProgress__Orientation();\nextern void __RegisterEnum__o2__Label__HorOverflow();\nextern void __RegisterEnum__o2__Label__VerOverflow();\nextern void __RegisterEnum__o2__ToggleGroup__Type();\nextern void __RegisterEnum__o2__Tree__RearrangeType();\nextern void __RegisterEnum__o2__Tree__ExpandState();\nextern void __RegisterEnum__o2__VerticalProgress__Orientation();\nextern void __RegisterEnum__o2__ScriptValue__ValueType();\nextern void __RegisterEnum__o2__Bitmap__ImageType();\nextern void __RegisterEnum__o2__Curve__Key__Type();\nextern void __RegisterEnum__o2__Spline__Key__Type();\nextern void __RegisterEnum__o2__Type__Usage();\nextern void __RegisterEnum__o2__DataValue__Flags();\nextern void __RegisterEnum__o2__DataDocument__Format();\nextern void __RegisterEnum__o2__BaseCorner();\nextern void __RegisterEnum__o2__CursorType();\nextern void __RegisterEnum__o2__Side();\nextern void __RegisterEnum__o2__Corner();\nextern void __RegisterEnum__o2__TwoDirection();\nextern void __RegisterEnum__o2__SpriteMode();\nextern void __RegisterEnum__o2__BlendMode();\nextern void __RegisterEnum__o2__VerAlign();\nextern void __RegisterEnum__o2__HorAlign();\nextern void __RegisterEnum__o2__ProtectSection();\nextern void __RegisterEnum__o2__Platform();\nextern void __RegisterEnum__o2__DeviceType();\nextern void __RegisterEnum__o2__LineType();\nextern void __RegisterEnum__o2__PrimitiveType();\nextern void __RegisterEnum__o2__PixelFormat();\nextern void __RegisterEnum__o2__TextureFormat();\nextern void __RegisterEnum__o2__Loop();\nextern void __RegisterEnum__o2__Units();\nextern void __RegisterTemplateClass__o2__AnimationTrack_bool_();\nextern void __RegisterTemplateClass__o2__AnimationTrack_bool___Key();\nextern void __RegisterTemplateClass__o2__AnimationTrack_bool___Player();\nextern void __RegisterTemplateClass__o2__AnimationTrack_int_();\nextern void __RegisterTemplateClass__o2__AnimationTrack_int___Key();\nextern void __RegisterTemplateClass__o2__AnimationTrack_int___Player();\nextern void __RegisterClass__o2__AnimationClip();\nextern void __RegisterClass__o2__AnimationMask();\nextern void __RegisterClass__o2__AnimationPlayer();\nextern void __RegisterClass__o2__IAnimationState();\nextern void __RegisterClass__o2__AnimationState();\nextern void __RegisterClass__o2__AnimationGraphTransition();\nextern void __RegisterClass__o2__AnimationGraphState();\nextern void __RegisterClass__o2__AnimationGraphState__Animation();\nextern void __RegisterClass__o2__IAnimation();\nextern void __RegisterClass__o2__AnimationTrack_o2__Color4_();\nextern void __RegisterClass__o2__AnimationTrack_o2__Color4___Player();\nextern void __RegisterClass__o2__AnimationTrack_o2__Color4___Key();\nextern void __RegisterClass__o2__AnimationTrack_float_();\nextern void __RegisterClass__o2__AnimationTrack_float___Player();\nextern void __RegisterClass__o2__AnimationSubTrack();\nextern void __RegisterClass__o2__AnimationSubTrack__Player();\nextern void __RegisterClass__o2__AnimationTrack_o2__Vec2F_();\nextern void __RegisterClass__o2__AnimationTrack_o2__Vec2F___Player();\nextern void __RegisterClass__o2__IAnimationTrack();\nextern void __RegisterClass__o2__IAnimationTrack__IPlayer();\nextern void __RegisterClass__o2__Application();\nextern void __RegisterClass__o2__Asset();\nextern void __RegisterClass__o2__AssetInfo();\nextern void __RegisterClass__o2__BaseAssetRef();\nextern void __RegisterClass__o2__AssetsTree();\nextern void __RegisterClass__o2__AssetMeta();\nextern void __RegisterClass__o2__ActorAsset();\nextern void __RegisterClass__o2__AnimationAsset();\nextern void __RegisterClass__o2__AnimationStateGraphAsset();\nextern void __RegisterClass__o2__AtlasAsset();\nextern void __RegisterClass__o2__AtlasAsset__PlatformMeta();\nextern void __RegisterClass__o2__AtlasAsset__Meta();\nextern void __RegisterClass__o2__AtlasAsset__Page();\nextern void __RegisterClass__o2__BinaryAsset();\nextern void __RegisterClass__o2__BitmapFontAsset();\nextern void __RegisterClass__o2__BitmapFontAsset__Meta();\nextern void __RegisterClass__o2__DataAsset();\nextern void __RegisterClass__o2__FolderAsset();\nextern void __RegisterClass__o2__FontAsset();\nextern void __RegisterClass__o2__FragmentShaderAsset();\nextern void __RegisterClass__o2__FragmentShaderAsset__Meta();\nextern void __RegisterClass__o2__ImageAsset();\nextern void __RegisterClass__o2__ImageAsset__PlatformMeta();\nextern void __RegisterClass__o2__ImageAsset__Meta();\nextern void __RegisterClass__o2__JavaScriptAsset();\nextern void __RegisterClass__o2__MaterialAsset();\nextern void __RegisterClass__o2__SceneAsset();\nextern void __RegisterClass__o2__ShaderAsset();\nextern void __RegisterClass__o2__SpineAsset();\nextern void __RegisterClass__o2__SpineAtlasAsset();\nextern void __RegisterClass__o2__VectorFontAsset();\nextern void __RegisterClass__o2__VectorFontAsset__Meta();\nextern void __RegisterClass__o2__VertexShaderAsset();\nextern void __RegisterClass__o2__VertexShaderAsset__Meta();\nextern void __RegisterClass__o2__PhysicsConfig();\nextern void __RegisterClass__o2__ProjectConfig();\nextern void __RegisterClass__o2__Integration();\nextern void __RegisterClass__o2__Camera();\nextern void __RegisterClass__o2__IRectDrawable();\nextern void __RegisterClass__o2__FunctionalRectDrawable();\nextern void __RegisterClass__o2__IShaderParam();\nextern void __RegisterClass__o2__ShaderParamFloat();\nextern void __RegisterClass__o2__ShaderParamVec2();\nextern void __RegisterClass__o2__ShaderParamColor();\nextern void __RegisterClass__o2__ShaderParamInt();\nextern void __RegisterClass__o2__TextureSampler();\nextern void __RegisterClass__o2__Material();\nextern void __RegisterClass__o2__ParticleSource();\nextern void __RegisterClass__o2__SingleSpriteParticleSource();\nextern void __RegisterClass__o2__MultiSpriteParticleSource();\nextern void __RegisterClass__o2__ParticlesEffect();\nextern void __RegisterClass__o2__ParticlesGravityEffect();\nextern void __RegisterClass__o2__ParticlesColorEffect();\nextern void __RegisterClass__o2__ParticlesRandomColorEffect();\nextern void __RegisterClass__o2__ParticlesSizeEffect();\nextern void __RegisterClass__o2__ParticlesAngleEffect();\nextern void __RegisterClass__o2__ParticlesAngleSpeedEffect();\nextern void __RegisterClass__o2__ParticlesVelocityEffect();\nextern void __RegisterClass__o2__ParticlesSplineEffect();\nextern void __RegisterClass__o2__ParticlesEmitter();\nextern void __RegisterClass__o2__ParticlesEmitterShape();\nextern void __RegisterClass__o2__CircleParticlesEmitterShape();\nextern void __RegisterClass__o2__SquareParticlesEmitterShape();\nextern void __RegisterClass__o2__Spine__Track();\nextern void __RegisterClass__o2__Sprite();\nextern void __RegisterClass__o2__Text();\nextern void __RegisterClass__o2__TextureRef();\nextern void __RegisterClass__o2__VectorFont__Effect();\nextern void __RegisterClass__o2__FontStrokeEffect();\nextern void __RegisterClass__o2__FontGradientEffect();\nextern void __RegisterClass__o2__FontColorEffect();\nextern void __RegisterClass__o2__FontShadowEffect();\nextern void __RegisterClass__o2__Actor();\nextern void __RegisterClass__o2__BaseActorLinkRef();\nextern void __RegisterClass__o2__ActorTransform();\nextern void __RegisterClass__o2__ActorTransformData();\nextern void __RegisterClass__o2__CameraActor();\nextern void __RegisterClass__o2__Component();\nextern void __RegisterClass__o2__BaseComponentLinkRef();\nextern void __RegisterClass__o2__AnimationComponent();\nextern void __RegisterClass__o2__AnimationStateGraphComponent();\nextern void __RegisterClass__o2__EditorTestComponent();\nextern void __RegisterClass__o2__EditorTestComponent__TestInside();\nextern void __RegisterClass__o2__EditorTestComponent__TestDerivedInside();\nextern void __RegisterClass__o2__ImageComponent();\nextern void __RegisterClass__o2__MeshComponent();\nextern void __RegisterClass__o2__ParticlesEmitterComponent();\nextern void __RegisterClass__o2__ScissorClippingComponent();\nextern void __RegisterClass__o2__ScriptableComponent();\nextern void __RegisterClass__o2__SkinningMeshBoneComponent();\nextern void __RegisterClass__o2__SkinningMeshComponent();\nextern void __RegisterClass__o2__SpineComponent();\nextern void __RegisterClass__o2__SpineComponent__AnimationState();\nextern void __RegisterClass__o2__TextSplitterComponent();\nextern void __RegisterClass__o2__TextSymbolComponent();\nextern void __RegisterClass__o2__ISceneDrawable();\nextern void __RegisterClass__o2__BoxCollider();\nextern void __RegisterClass__o2__CircleCollider();\nextern void __RegisterClass__o2__ICollider();\nextern void __RegisterClass__o2__RigidBody();\nextern void __RegisterClass__o2__SplineCollider();\nextern void __RegisterClass__o2__Scene();\nextern void __RegisterClass__o2__SceneLayer();\nextern void __RegisterClass__o2__SceneLayersList();\nextern void __RegisterClass__o2__Tag();\nextern void __RegisterClass__o2__TagGroup();\nextern void __RegisterClass__o2__Widget();\nextern void __RegisterClass__o2__Widget__LayersEditable();\nextern void __RegisterClass__o2__Widget__InternalChildrenEditableEditable();\nextern void __RegisterClass__o2__WidgetLayer();\nextern void __RegisterClass__o2__WidgetLayerLayout();\nextern void __RegisterClass__o2__WidgetLayout();\nextern void __RegisterClass__o2__WidgetLayoutData();\nextern void __RegisterClass__o2__WidgetState();\nextern void __RegisterClass__o2__Button();\nextern void __RegisterClass__o2__ContextMenu();\nextern void __RegisterClass__o2__ContextMenuItem();\nextern void __RegisterClass__o2__ContextMenu__Item();\nextern void __RegisterClass__o2__CustomDropDown();\nextern void __RegisterClass__o2__CustomList();\nextern void __RegisterClass__o2__DropDown();\nextern void __RegisterClass__o2__EditBox();\nextern void __RegisterClass__o2__EditBoxDropDown();\nextern void __RegisterClass__o2__GridLayout();\nextern void __RegisterClass__o2__GridLayoutScrollArea();\nextern void __RegisterClass__o2__HorizontalLayout();\nextern void __RegisterClass__o2__HorizontalProgress();\nextern void __RegisterClass__o2__HorizontalScrollBar();\nextern void __RegisterClass__o2__Image();\nextern void __RegisterClass__o2__Label();\nextern void __RegisterClass__o2__List();\nextern void __RegisterClass__o2__LongList();\nextern void __RegisterClass__o2__MenuPanel();\nextern void __RegisterClass__o2__MenuPanel__Item();\nextern void __RegisterClass__o2__PopupWidget();\nextern void __RegisterClass__o2__ScrollArea();\nextern void __RegisterClass__o2__Spoiler();\nextern void __RegisterClass__o2__Toggle();\nextern void __RegisterClass__o2__Tree();\nextern void __RegisterClass__o2__TreeNode();\nextern void __RegisterClass__o2__VerticalLayout();\nextern void __RegisterClass__o2__VerticalProgress();\nextern void __RegisterClass__o2__VerticalScrollBar();\nextern void __RegisterClass__o2__Window();\nextern void __RegisterClass__o2__DragHandle();\nextern void __RegisterClass__o2__WidgetDragHandle();\nextern void __RegisterClass__o2__SceneEditableObject();\nextern void __RegisterClass__o2__ColorGradient();\nextern void __RegisterClass__o2__ColorGradient__Key();\nextern void __RegisterClass__o2__Curve();\nextern void __RegisterClass__o2__Curve__Key();\nextern void __RegisterClass__o2__Layout();\nextern void __RegisterClass__o2__Spline();\nextern void __RegisterClass__o2__Spline__Key();\nextern void __RegisterClass__o2__Transform();\nextern void __RegisterClass__o2__ISerializable();\nextern void __RegisterClass__o2__ShortcutKeys();\nextern void __RegisterClass__o2__TimeStamp();\n\n\nextern void InitializeTypeso2Framework()\n{\n    __RegisterEnum__o2__Shader__Type();\n    __RegisterEnum__o2__Texture__Usage();\n    __RegisterEnum__o2__Texture__Filter();\n    __RegisterEnum__o2__Actor__State();\n    __RegisterEnum__o2__ActorCreateMode();\n    __RegisterEnum__o2__CameraActor__Type();\n    __RegisterEnum__o2__EditorTestComponent__TestEnum();\n    __RegisterEnum__o2__RigidBody__Type();\n    __RegisterEnum__o2__HorizontalProgress__Orientation();\n    __RegisterEnum__o2__Label__HorOverflow();\n    __RegisterEnum__o2__Label__VerOverflow();\n    __RegisterEnum__o2__ToggleGroup__Type();\n    __RegisterEnum__o2__Tree__RearrangeType();\n    __RegisterEnum__o2__Tree__ExpandState();\n    __RegisterEnum__o2__VerticalProgress__Orientation();\n    __RegisterEnum__o2__ScriptValue__ValueType();\n    __RegisterEnum__o2__Bitmap__ImageType();\n    __RegisterEnum__o2__Curve__Key__Type();\n    __RegisterEnum__o2__Spline__Key__Type();\n    __RegisterEnum__o2__Type__Usage();\n    __RegisterEnum__o2__DataValue__Flags();\n    __RegisterEnum__o2__DataDocument__Format();\n    __RegisterEnum__o2__BaseCorner();\n    __RegisterEnum__o2__CursorType();\n    __RegisterEnum__o2__Side();\n    __RegisterEnum__o2__Corner();\n    __RegisterEnum__o2__TwoDirection();\n    __RegisterEnum__o2__SpriteMode();\n    __RegisterEnum__o2__BlendMode();\n    __RegisterEnum__o2__VerAlign();\n    __RegisterEnum__o2__HorAlign();\n    __RegisterEnum__o2__ProtectSection();\n    __RegisterEnum__o2__Platform();\n    __RegisterEnum__o2__DeviceType();\n    __RegisterEnum__o2__LineType();\n    __RegisterEnum__o2__PrimitiveType();\n    __RegisterEnum__o2__PixelFormat();\n    __RegisterEnum__o2__TextureFormat();\n    __RegisterEnum__o2__Loop();\n    __RegisterEnum__o2__Units();\n    __RegisterTemplateClass__o2__AnimationTrack_bool_();\n    __RegisterTemplateClass__o2__AnimationTrack_bool___Key();\n    __RegisterTemplateClass__o2__AnimationTrack_bool___Player();\n    __RegisterTemplateClass__o2__AnimationTrack_int_();\n    __RegisterTemplateClass__o2__AnimationTrack_int___Key();\n    __RegisterTemplateClass__o2__AnimationTrack_int___Player();\n    __RegisterClass__o2__AnimationClip();\n    __RegisterClass__o2__AnimationMask();\n    __RegisterClass__o2__AnimationPlayer();\n    __RegisterClass__o2__IAnimationState();\n    __RegisterClass__o2__AnimationState();\n    __RegisterClass__o2__AnimationGraphTransition();\n    __RegisterClass__o2__AnimationGraphState();\n    __RegisterClass__o2__AnimationGraphState__Animation();\n    __RegisterClass__o2__IAnimation();\n    __RegisterClass__o2__AnimationTrack_o2__Color4_();\n    __RegisterClass__o2__AnimationTrack_o2__Color4___Player();\n    __RegisterClass__o2__AnimationTrack_o2__Color4___Key();\n    __RegisterClass__o2__AnimationTrack_float_();\n    __RegisterClass__o2__AnimationTrack_float___Player();\n    __RegisterClass__o2__AnimationSubTrack();\n    __RegisterClass__o2__AnimationSubTrack__Player();\n    __RegisterClass__o2__AnimationTrack_o2__Vec2F_();\n    __RegisterClass__o2__AnimationTrack_o2__Vec2F___Player();\n    __RegisterClass__o2__IAnimationTrack();\n    __RegisterClass__o2__IAnimationTrack__IPlayer();\n    __RegisterClass__o2__Application();\n    __RegisterClass__o2__Asset();\n    __RegisterClass__o2__AssetInfo();\n    __RegisterClass__o2__BaseAssetRef();\n    __RegisterClass__o2__AssetsTree();\n    __RegisterClass__o2__AssetMeta();\n    __RegisterClass__o2__ActorAsset();\n    __RegisterClass__o2__AnimationAsset();\n    __RegisterClass__o2__AnimationStateGraphAsset();\n    __RegisterClass__o2__AtlasAsset();\n    __RegisterClass__o2__AtlasAsset__PlatformMeta();\n    __RegisterClass__o2__AtlasAsset__Meta();\n    __RegisterClass__o2__AtlasAsset__Page();\n    __RegisterClass__o2__BinaryAsset();\n    __RegisterClass__o2__BitmapFontAsset();\n    __RegisterClass__o2__BitmapFontAsset__Meta();\n    __RegisterClass__o2__DataAsset();\n    __RegisterClass__o2__FolderAsset();\n    __RegisterClass__o2__FontAsset();\n    __RegisterClass__o2__FragmentShaderAsset();\n    __RegisterClass__o2__FragmentShaderAsset__Meta();\n    __RegisterClass__o2__ImageAsset();\n    __RegisterClass__o2__ImageAsset__PlatformMeta();\n    __RegisterClass__o2__ImageAsset__Meta();\n    __RegisterClass__o2__JavaScriptAsset();\n    __RegisterClass__o2__MaterialAsset();\n    __RegisterClass__o2__SceneAsset();\n    __RegisterClass__o2__ShaderAsset();\n    __RegisterClass__o2__SpineAsset();\n    __RegisterClass__o2__SpineAtlasAsset();\n    __RegisterClass__o2__VectorFontAsset();\n    __RegisterClass__o2__VectorFontAsset__Meta();\n    __RegisterClass__o2__VertexShaderAsset();\n    __RegisterClass__o2__VertexShaderAsset__Meta();\n    __RegisterClass__o2__PhysicsConfig();\n    __RegisterClass__o2__ProjectConfig();\n    __RegisterClass__o2__Integration();\n    __RegisterClass__o2__Camera();\n    __RegisterClass__o2__IRectDrawable();\n    __RegisterClass__o2__FunctionalRectDrawable();\n    __RegisterClass__o2__IShaderParam();\n    __RegisterClass__o2__ShaderParamFloat();\n    __RegisterClass__o2__ShaderParamVec2();\n    __RegisterClass__o2__ShaderParamColor();\n    __RegisterClass__o2__ShaderParamInt();\n    __RegisterClass__o2__TextureSampler();\n    __RegisterClass__o2__Material();\n    __RegisterClass__o2__ParticleSource();\n    __RegisterClass__o2__SingleSpriteParticleSource();\n    __RegisterClass__o2__MultiSpriteParticleSource();\n    __RegisterClass__o2__ParticlesEffect();\n    __RegisterClass__o2__ParticlesGravityEffect();\n    __RegisterClass__o2__ParticlesColorEffect();\n    __RegisterClass__o2__ParticlesRandomColorEffect();\n    __RegisterClass__o2__ParticlesSizeEffect();\n    __RegisterClass__o2__ParticlesAngleEffect();\n    __RegisterClass__o2__ParticlesAngleSpeedEffect();\n    __RegisterClass__o2__ParticlesVelocityEffect();\n    __RegisterClass__o2__ParticlesSplineEffect();\n    __RegisterClass__o2__ParticlesEmitter();\n    __RegisterClass__o2__ParticlesEmitterShape();\n    __RegisterClass__o2__CircleParticlesEmitterShape();\n    __RegisterClass__o2__SquareParticlesEmitterShape();\n    __RegisterClass__o2__Spine__Track();\n    __RegisterClass__o2__Sprite();\n    __RegisterClass__o2__Text();\n    __RegisterClass__o2__TextureRef();\n    __RegisterClass__o2__VectorFont__Effect();\n    __RegisterClass__o2__FontStrokeEffect();\n    __RegisterClass__o2__FontGradientEffect();\n    __RegisterClass__o2__FontColorEffect();\n    __RegisterClass__o2__FontShadowEffect();\n    __RegisterClass__o2__Actor();\n    __RegisterClass__o2__BaseActorLinkRef();\n    __RegisterClass__o2__ActorTransform();\n    __RegisterClass__o2__ActorTransformData();\n    __RegisterClass__o2__CameraActor();\n    __RegisterClass__o2__Component();\n    __RegisterClass__o2__BaseComponentLinkRef();\n    __RegisterClass__o2__AnimationComponent();\n    __RegisterClass__o2__AnimationStateGraphComponent();\n    __RegisterClass__o2__EditorTestComponent();\n    __RegisterClass__o2__EditorTestComponent__TestInside();\n    __RegisterClass__o2__EditorTestComponent__TestDerivedInside();\n    __RegisterClass__o2__ImageComponent();\n    __RegisterClass__o2__MeshComponent();\n    __RegisterClass__o2__ParticlesEmitterComponent();\n    __RegisterClass__o2__ScissorClippingComponent();\n    __RegisterClass__o2__ScriptableComponent();\n    __RegisterClass__o2__SkinningMeshBoneComponent();\n    __RegisterClass__o2__SkinningMeshComponent();\n    __RegisterClass__o2__SpineComponent();\n    __RegisterClass__o2__SpineComponent__AnimationState();\n    __RegisterClass__o2__TextSplitterComponent();\n    __RegisterClass__o2__TextSymbolComponent();\n    __RegisterClass__o2__ISceneDrawable();\n    __RegisterClass__o2__BoxCollider();\n    __RegisterClass__o2__CircleCollider();\n    __RegisterClass__o2__ICollider();\n    __RegisterClass__o2__RigidBody();\n    __RegisterClass__o2__SplineCollider();\n    __RegisterClass__o2__Scene();\n    __RegisterClass__o2__SceneLayer();\n    __RegisterClass__o2__SceneLayersList();\n    __RegisterClass__o2__Tag();\n    __RegisterClass__o2__TagGroup();\n    __RegisterClass__o2__Widget();\n    __RegisterClass__o2__Widget__LayersEditable();\n    __RegisterClass__o2__Widget__InternalChildrenEditableEditable();\n    __RegisterClass__o2__WidgetLayer();\n    __RegisterClass__o2__WidgetLayerLayout();\n    __RegisterClass__o2__WidgetLayout();\n    __RegisterClass__o2__WidgetLayoutData();\n    __RegisterClass__o2__WidgetState();\n    __RegisterClass__o2__Button();\n    __RegisterClass__o2__ContextMenu();\n    __RegisterClass__o2__ContextMenuItem();\n    __RegisterClass__o2__ContextMenu__Item();\n    __RegisterClass__o2__CustomDropDown();\n    __RegisterClass__o2__CustomList();\n    __RegisterClass__o2__DropDown();\n    __RegisterClass__o2__EditBox();\n    __RegisterClass__o2__EditBoxDropDown();\n    __RegisterClass__o2__GridLayout();\n    __RegisterClass__o2__GridLayoutScrollArea();\n    __RegisterClass__o2__HorizontalLayout();\n    __RegisterClass__o2__HorizontalProgress();\n    __RegisterClass__o2__HorizontalScrollBar();\n    __RegisterClass__o2__Image();\n    __RegisterClass__o2__Label();\n    __RegisterClass__o2__List();\n    __RegisterClass__o2__LongList();\n    __RegisterClass__o2__MenuPanel();\n    __RegisterClass__o2__MenuPanel__Item();\n    __RegisterClass__o2__PopupWidget();\n    __RegisterClass__o2__ScrollArea();\n    __RegisterClass__o2__Spoiler();\n    __RegisterClass__o2__Toggle();\n    __RegisterClass__o2__Tree();\n    __RegisterClass__o2__TreeNode();\n    __RegisterClass__o2__VerticalLayout();\n    __RegisterClass__o2__VerticalProgress();\n    __RegisterClass__o2__VerticalScrollBar();\n    __RegisterClass__o2__Window();\n    __RegisterClass__o2__DragHandle();\n    __RegisterClass__o2__WidgetDragHandle();\n    __RegisterClass__o2__SceneEditableObject();\n    __RegisterClass__o2__ColorGradient();\n    __RegisterClass__o2__ColorGradient__Key();\n    __RegisterClass__o2__Curve();\n    __RegisterClass__o2__Curve__Key();\n    __RegisterClass__o2__Layout();\n    __RegisterClass__o2__Spline();\n    __RegisterClass__o2__Spline__Key();\n    __RegisterClass__o2__Transform();\n    __RegisterClass__o2__ISerializable();\n    __RegisterClass__o2__ShortcutKeys();\n    __RegisterClass__o2__TimeStamp();\n}"
  },
  {
    "path": "Framework/Sources/o2/replace_tabs.py",
    "content": "import os\n\ndef is_binary(file_path):\n    try:\n        with open(file_path, 'tr') as check_file:  # 'tr' is text read mode\n            check_file.read()\n            return False\n    except:  # If an error occurs then it's likely a binary file\n        return True\n\ndef replace_tabs_with_spaces(file_path):\n    try:\n        with open(file_path, 'r', encoding='utf-8') as file:\n            content = file.read()\n        content = content.replace('\\t', '    ')\n        with open(file_path, 'w', encoding='utf-8') as file:\n            file.write(content)\n    except UnicodeDecodeError:\n        print(f\"Skipped binary file: {file_path}\")\n\nfor root, dirs, files in os.walk('.'):\n    for file_name in files:\n        full_path = os.path.join(root, file_name)\n        if not is_binary(full_path):\n            replace_tabs_with_spaces(full_path)\n        else:\n            print(f\"Skipped binary file: {full_path}\")\n"
  },
  {
    "path": "Framework/Sources/o2/stdafx.cpp",
    "content": "#include \"o2/stdafx.h\"\n"
  },
  {
    "path": "Framework/Sources/o2/stdafx.h",
    "content": "#pragma once\n\n#define NOMINMAX\n\n#include \"o2/Animation/AnimationClip.h\"\n#include \"o2/Animation/Tracks/AnimationColor4Track.h\"\n#include \"o2/Animation/Tracks/AnimationFloatTrack.h\"\n#include \"o2/Animation/Tracks/AnimationVec2FTrack.h\"\n#include \"o2/Render/Render.h\"\n#include \"o2/Render/Sprite.h\"\n#include \"o2/Render/Text.h\"\n#include \"o2/Render/Texture.h\"\n#include \"o2/Render/TextureRef.h\"\n#include \"o2/Render/VectorFont.h\"\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/Component.h\"\n#include \"o2/Scene/SceneLayer.h\"\n#include \"o2/Scene/UI/Widget.h\"\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Debug/Debug.h\"\n#include \"o2/Utils/Debug/Profiling/SimpleProfiler.h\"\n#include \"o2/Utils/Function/ActorSubscription.h\"\n#include \"o2/Utils/Function/Function.h\"\n#include \"o2/Utils/Math/Basis.h\"\n#include \"o2/Utils/Math/Border.h\"\n#include \"o2/Utils/Math/Color.h\"\n#include \"o2/Utils/Math/Interpolation.h\"\n#include \"o2/Utils/Math/Math.h\"\n#include \"o2/Utils/Math/Rect.h\"\n#include \"o2/Utils/Math/Transform.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Math/Vertex.h\"\n#include \"o2/Utils/Property.h\"\n#include \"o2/Utils/Reflection/Attributes.h\"\n#include \"o2/Utils/Reflection/FieldInfo.h\"\n#include \"o2/Utils/Reflection/FunctionInfo.h\"\n#include \"o2/Utils/Reflection/Reflection.h\"\n#include \"o2/Utils/Reflection/Type.h\"\n#include \"o2/Utils/Reflection/TypeTraits.h\"\n#include \"o2/Utils/Serialization/DataValue.h\"\n#include \"o2/Utils/Serialization/Serializable.h\"\n#include \"o2/Utils/Types/CommonTypes.h\"\n#include \"o2/Utils/Types/Containers/Map.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2/Utils/Types/Variant.h\"\n#include \"o2/Utils/Function/Subscription.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scripts/ScriptValue.h\"\n#endif\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 Zenkovich Andrey\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "[![Windows](https://github.com/o2-engine/PetStory/actions/workflows/windows-cmake.yml/badge.svg)](https://github.com/o2-engine/PetStory/actions/workflows/windows-cmake.yml)\n[![Linux](https://github.com/o2-engine/PetStory/actions/workflows/linux-cmake.yml/badge.svg?branch=master)](https://github.com/o2-engine/PetStory/actions/workflows/linux-cmake.yml)\n[![macOS](https://github.com/o2-engine/PetStory/actions/workflows/mac-cmake.yml/badge.svg?branch=master)](https://github.com/o2-engine/PetStory/actions/workflows/mac-cmake.yml)\n[![iOS](https://github.com/o2-engine/PetStory/actions/workflows/ios-cmake.yml/badge.svg?branch=master)](https://github.com/o2-engine/PetStory/actions/workflows/ios-cmake.yml)\n[![WebAssembly](https://github.com/o2-engine/PetStory/actions/workflows/wasm-cmake.yml/badge.svg?branch=master)](https://github.com/o2-engine/PetStory/actions/workflows/wasm-cmake.yml)\n[![Android](https://github.com/o2-engine/PetStory/actions/workflows/android-cmake.yml/badge.svg?branch=master)](https://github.com/o2-engine/PetStory/actions/workflows/android-cmake.yml)\n\n# o2\n\no2 - it's an open-source technology for easy making 2D games and applications for mobile and PC platforms using C++ and JavaScript with visual editor. The main features are performance, usability and effective development. [More about motiovation and architecture](/Docs/en/main.md) ([rus](/Docs/ru/main.md))\n\nHere is the test project: https://github.com/zenkovich/PetStory\n\n**Now work in progress.**\n\n[Discord channel](https://discord.gg/FqBBYpYGfS) \n\n[Telegram channel](https://t.me/o2engine) \n\n![](https://github.com/zenkovich/o2/blob/master/editor.png)\n\n### Features\n- Assets  \nAutomatic assets building and converting, automatic atlases packing, easy to add to project, flixible configuration.\n\n- Scenes  \nComponent-objects based scene graph, nested prototypes and good integration with editor\n\n- UI  \nFast and flexible UI system, a lot of default widgets, styles, integration with scenes\n\n- Render  \nEasy to learn rendering system with meshes, fonts, sprites, culling, shaders and render targets.\n\n- Sound (WIP)\nPlaying sounds, music, streaming sounds, audio mixer\n\n- Animations  \nAnimate everything, retargeting, easy to serialize, layers, weights, IK, animation state machine, mesh skinning, editor integradion\n\n- Effects  \nParticle emitters with different forms, particle effects, editor integration\n\n- Physics  \nRigid bodies, colliders, joints, effects\n\n- Input  \nMultiplatform input processing, easy clicks and touches processing\n\n- Platforms \nWindows, IOS (WIP), Android (WIP), MAC OSX (WIP), Webassembly (WIP)\n\n- Scripting\nJavaScript on jerry script engine\n\n- Editor  \nFlexible editor \"all-in-one\", plugins\n"
  },
  {
    "path": "ReplaceTabsToSpaces.py",
    "content": ""
  },
  {
    "path": "ScriptUtils/ReplaceTabsToSpaces.py",
    "content": "import os\n\ndef replace_tabs_in_file(path):\n    try:\n        with open(path, 'r', encoding='utf-8') as f:\n            data = f.read()\n        data = data.replace('\\t', '    ')\n        with open(path, 'w', encoding='utf-8') as f:\n            f.write(data)\n        print(f\"Обработан: {path}\")\n    except:\n        pass  # Можно добавить лог\n\nbase_dir = os.getcwd()\n\nfor root, dirs, files in os.walk(base_dir):\n    for file in files:\n        full_path = os.path.join(root, file)\n        replace_tabs_in_file(full_path)\n"
  },
  {
    "path": "Tests/CMakeLists.txt",
    "content": "include(FetchContent)\nFetchContent_Declare(\n    googletest\n    GIT_REPOSITORY https://github.com/google/googletest.git\n    GIT_TAG v1.14.0\n)\nset(BUILD_GMOCK OFF CACHE BOOL \"\" FORCE)\nset(gtest_force_shared_crt ON CACHE BOOL \"\" FORCE)\nFetchContent_MakeAvailable(googletest)\nset_target_properties(gtest PROPERTIES FOLDER o2/3rdPartyLibs)\nset_target_properties(gtest_main PROPERTIES FOLDER o2/3rdPartyLibs)\n\n# Codegen for Tests (reflection, TestScriptObject etc.)\nset(o2Tests_CODEGEN_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Sources/o2Tests.cpp)\nadd_custom_command(OUTPUT ${o2Tests_CODEGEN_OUTPUT}\n    COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../CodeTool/Bin/o2CodeTool\n        -project o2Tests\n        -sources \"${CMAKE_CURRENT_SOURCE_DIR}/Sources\"\n        -parent_projects \"${CMAKE_CURRENT_SOURCE_DIR}/../Framework/Sources/o2/CodeToolCache.xml\"\n    COMMENT \"Run CodeTool for o2Tests\"\n    DEPENDS o2CodeTool\n)\n\nset(o2Tests_SOURCES_DIRS \"Sources/tests/*.cpp\")\nfile(GLOB_RECURSE o2Tests_SOURCES ${o2Tests_SOURCES_DIRS})\nlist(INSERT o2Tests_SOURCES 0 Sources/TestsMain.cpp)\nlist(APPEND o2Tests_SOURCES ${o2Tests_CODEGEN_OUTPUT})\n\nadd_executable(o2Tests ${o2Tests_SOURCES})\n\ntarget_include_directories(o2Tests PRIVATE\n    ${CMAKE_CURRENT_SOURCE_DIR}/Sources\n    ${CMAKE_CURRENT_SOURCE_DIR}/../Framework/Sources\n)\n\ntarget_link_libraries(o2Tests PRIVATE\n    GTest::gtest\n    o2Framework\n)\n\nadd_dependencies(o2Tests o2Framework o2FrameworkCodegen)\n\ninclude(GoogleTest)\ngtest_discover_tests(o2Tests\n    WORKING_DIRECTORY $<TARGET_FILE_DIR:o2Tests>\n)\n"
  },
  {
    "path": "Tests/Sources/TestsMain.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"o2/O2.h\"\n#include \"o2/Application/Application.h\"\n#include <gtest/gtest.h>\n\nextern void InitializeTypeso2Tests();\n\nusing namespace o2;\n\nint main(int argc, char** argv)\n{\n    InitializeTypeso2Tests();\n    INITIALIZE_O2;\n\n    ::testing::InitGoogleTest(&argc, argv);\n\n    bool listOnly = ::testing::GTEST_FLAG(list_tests);\n\n    Ref<Application> app;\n    if (!listOnly)\n    {\n        app = mmake<Application>();\n        app->Initialize();\n    }\n\n    return RUN_ALL_TESTS();\n}\n"
  },
  {
    "path": "Tests/Sources/o2Tests.cpp",
    "content": "extern void __RegisterClass__o2__TestScriptObject();\n\n\nextern void InitializeTypeso2Tests()\n{\n    __RegisterClass__o2__TestScriptObject();\n}"
  },
  {
    "path": "Tests/Sources/tests/ScriptValueTest.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include <gtest/gtest.h>\n#include \"o2/Scripts/ScriptValue.h\"\n#include \"o2/Scripts/ScriptEngine.h\"\n#include \"o2/Utils/Math/Vector2.h\"\n#include \"o2/Utils/Types/Containers/Vector.h\"\n#include \"tests/TestScriptObject.h\"\n\n#if IS_SCRIPTING_SUPPORTED\n#include \"o2/Scene/Actor.h\"\n#include \"o2/Scene/UI/Widgets/Image.h\"\n#include \"o2/Scene/UI/WidgetLayout.h\"\n#endif\n\nusing namespace o2;\n\n#if IS_SCRIPTING_SUPPORTED\n\nnamespace\n{\n    struct LargeNativePayload\n    {\n        int  value = 0;\n        char padding[1024] = {};\n    };\n}\n\nTEST(ScriptValue, PrimitiveTypes) {\n    ScriptValue vInt(42);\n    EXPECT_EQ(vInt.GetValue<int>(), 42);\n    EXPECT_EQ(vInt.ToNumber(), 42.0f);\n\n    ScriptValue vFloat(3.14f);\n    EXPECT_FLOAT_EQ(vFloat.GetValue<float>(), 3.14f);\n    EXPECT_FLOAT_EQ(vFloat.ToNumber(), 3.14f);\n\n    ScriptValue vBool(true);\n    EXPECT_TRUE(vBool.ToBool());\n    EXPECT_TRUE(vBool.GetValue<bool>());\n\n    ScriptValue vStr(\"hello\");\n    EXPECT_EQ(vStr.ToString(), \"hello\");\n}\n\nTEST(ScriptValue, Vec2F) {\n    Vec2F v(3.0f, 4.0f);\n    ScriptValue sv(v);\n    Vec2F back = sv.GetValue<Vec2F>();\n    EXPECT_FLOAT_EQ(back.x, 3.0f);\n    EXPECT_FLOAT_EQ(back.y, 4.0f);\n}\n\nTEST(ScriptValue, Vector) {\n    Vector<int> arr({0, 1, 2, 3, 4});\n    ScriptValue sv(arr);\n    EXPECT_TRUE(sv.IsArray());\n    EXPECT_EQ(sv.GetLength(), 5);\n    EXPECT_EQ(sv.GetElement(2).GetValue<int>(), 2);\n}\n\nTEST(ScriptValue, EmptyObject) {\n    ScriptValue obj = ScriptValue::EmptyObject();\n    EXPECT_TRUE(obj.IsObject());\n\n    obj.SetProperty(\"a\", 5);\n    obj.SetProperty(\"b\", \"test\");\n    EXPECT_EQ(obj.GetProperty(\"a\").GetValue<int>(), 5);\n    EXPECT_EQ(obj.GetProperty(\"b\").ToString(), \"test\");\n}\n\nTEST(ScriptValue, EmptyArray) {\n    ScriptValue arr = ScriptValue::EmptyArray();\n    EXPECT_TRUE(arr.IsArray());\n    EXPECT_EQ(arr.GetLength(), 0);\n\n    arr.AddElement(ScriptValue(1));\n    arr.AddElement(ScriptValue(2));\n    arr.SetElement(ScriptValue(99), 0);\n    EXPECT_EQ(arr.GetLength(), 2);\n    EXPECT_EQ(arr.GetElement(0).GetValue<int>(), 99);\n    EXPECT_EQ(arr.GetElement(1).GetValue<int>(), 2);\n}\n\nTEST(ScriptValue, GlobalSetGet) {\n    o2Scripts.GetGlobal().SetProperty(\"testNum\", 123);\n    o2Scripts.GetGlobal().SetProperty(\"testStr\", \"global\");\n    o2Scripts.CollectGarbage();\n\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"testNum\").GetValue<int>(), 123);\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"testStr\").ToString(), \"global\");\n}\n\nTEST(ScriptValue, Eval) {\n    o2Scripts.Eval(\"var x = 5 + 5;\");\n    float res = o2Scripts.GetGlobal().GetProperty(\"x\").ToNumber();\n    EXPECT_FLOAT_EQ(res, 10.0f);\n\n    ScriptValue evalResult = o2Scripts.Eval(\"2 * 3\");\n    EXPECT_FLOAT_EQ(evalResult.ToNumber(), 6.0f);\n}\n\nTEST(ScriptValue, FunctionFromCpp) {\n    o2Scripts.GetGlobal().SetProperty(\"add\", Function<float(int, float)>([](int a, float b) {\n        return a + b;\n    }));\n    o2Scripts.CollectGarbage();\n\n    ScriptValue addFunc = o2Scripts.GetGlobal().GetProperty(\"add\");\n    EXPECT_TRUE(addFunc.IsFunction());\n    float result = addFunc.Invoke<float>(10, 2.5f);\n    EXPECT_FLOAT_EQ(result, 12.5f);\n}\n\nTEST(ScriptValue, FunctionInvokeFromScript) {\n    o2Scripts.GetGlobal().SetProperty(\"myfunc\", Function<float(int, float)>([](int a, float b) {\n        return a + b + 5.0f;\n    }));\n    o2Scripts.CollectGarbage();\n    o2Scripts.Eval(\"var r = myfunc(1, 3.2);\");\n\n    float r = o2Scripts.GetGlobal().GetProperty(\"r\").ToNumber();\n    EXPECT_NEAR(r, 9.2f, 1e-5f);\n}\n\nTEST(ScriptValue, Prototype) {\n    ScriptValue prot = ScriptValue::EmptyObject();\n    prot.SetProperty(\"a\", 42);\n    prot.SetProperty(\"func\", Function<void()>([]() {}));\n\n    ScriptValue exm = ScriptValue::EmptyObject();\n    exm.SetPrototype(prot);\n    o2Scripts.GetGlobal().SetProperty(\"exm\", exm);\n\n    EXPECT_EQ(exm.GetProperty(\"a\").GetValue<int>(), 42);\n}\n\nTEST(ScriptValue, ParseAndRun) {\n    auto pres = o2Scripts.Parse(\"var parsed = 100;\");\n    EXPECT_TRUE(pres.IsOk());\n    o2Scripts.Run(pres);\n\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"parsed\").ToNumber(), 100.0f);\n}\n\nTEST(ScriptValue, ObjectBinding) {\n    auto obj = mmake<TestScriptObject>();\n    obj->value = 42;\n    obj->name = \"test\";\n    obj->score = 3.14f;\n\n    ScriptValue sv = obj->GetScriptValue();\n    EXPECT_TRUE(sv.IsObject());\n\n    o2Scripts.GetGlobal().SetProperty(\"testObj\", sv);\n    o2Scripts.CollectGarbage();\n\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"testObj\").GetProperty(\"value\").GetValue<int>(), 42);\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"testObj\").GetProperty(\"name\").ToString(), \"test\");\n    EXPECT_FLOAT_EQ(o2Scripts.GetGlobal().GetProperty(\"testObj\").GetProperty(\"score\").GetValue<float>(), 3.14f);\n}\n\nTEST(ScriptValue, ObjectFieldWriteFromScript) {\n    auto obj = mmake<TestScriptObject>();\n    obj->value = 10;\n    obj->name = \"before\";\n\n    o2Scripts.GetGlobal().SetProperty(\"testObj\", obj->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\"testObj.value = 100; testObj.name = 'after'; testObj.score = 2.5;\");\n\n    EXPECT_EQ(obj->value, 100);\n    EXPECT_EQ(obj->name, \"after\");\n    EXPECT_FLOAT_EQ(obj->score, 2.5f);\n}\n\nTEST(ScriptValue, ObjectMethodCallFromCpp) {\n    auto obj = mmake<TestScriptObject>();\n\n    ScriptValue sv = obj->GetScriptValue();\n    EXPECT_TRUE(sv.IsObject());\n\n    ScriptValue addFunc = sv.GetProperty(\"Add\");\n    EXPECT_TRUE(addFunc.IsFunction());\n    int addResult = addFunc.Invoke<int>(sv, 3, 7);\n    EXPECT_EQ(addResult, 10);\n\n    ScriptValue concatFunc = sv.GetProperty(\"Concat\");\n    EXPECT_TRUE(concatFunc.IsFunction());\n    String concatResult = concatFunc.Invoke<String>(sv, String(\"Hello, \"), String(\"World!\"));\n    EXPECT_EQ(concatResult, \"Hello, World!\");\n\n    ScriptValue multiplyFunc = sv.GetProperty(\"Multiply\");\n    EXPECT_TRUE(multiplyFunc.IsFunction());\n    float multiplyResult = multiplyFunc.Invoke<float>(sv, 3.0f, 4.0f);\n    EXPECT_FLOAT_EQ(multiplyResult, 12.0f);\n}\n\nTEST(ScriptValue, ConstructFromScript) {\n    o2Scripts.Eval(\"var constructed = new o2.TestScriptObject(42, 'hello');\");\n\n    ScriptValue sv = o2Scripts.GetGlobal().GetProperty(\"constructed\");\n    EXPECT_TRUE(sv.IsObject());\n    EXPECT_EQ(sv.GetProperty(\"value\").GetValue<int>(), 42);\n    EXPECT_EQ(sv.GetProperty(\"name\").ToString(), \"hello\");\n\n    int addRes = sv.GetProperty(\"Add\").Invoke<int>(sv, 1, 2);\n    EXPECT_EQ(addRes, 3);\n}\n\nTEST(ScriptValue, ObjectMethodCallFromScript) {\n    auto obj = mmake<TestScriptObject>();\n\n    o2Scripts.GetGlobal().SetProperty(\"testObj2\", obj->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\"var addRes = testObj2.Add(6, 7);\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"addRes\").GetValue<int>(), 13);\n\n    o2Scripts.Eval(\"var concatRes = testObj2.Concat('foo', 'bar');\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"concatRes\").ToString(), \"foobar\");\n\n    o2Scripts.Eval(\"var mulRes = testObj2.Multiply(2.5, 4.0);\");\n    EXPECT_FLOAT_EQ(o2Scripts.GetGlobal().GetProperty(\"mulRes\").GetValue<float>(), 10.0f);\n}\n\n\nTEST(ScriptValue, MethodMutatesStateFromScript) {\n    auto obj = mmake<TestScriptObject>();\n    obj->value = 1;\n    obj->name = \"old\";\n    obj->score = 0.0f;\n\n    o2Scripts.GetGlobal().SetProperty(\"mutObj\", obj->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\"mutObj.SetAll(99, 'new', 7.5);\");\n    EXPECT_EQ(obj->value, 99);\n    EXPECT_EQ(obj->name, \"new\");\n    EXPECT_FLOAT_EQ(obj->score, 7.5f);\n\n    o2Scripts.Eval(\"mutObj.AddToScore(2.5);\");\n    EXPECT_FLOAT_EQ(obj->score, 10.0f);\n}\n\nTEST(ScriptValue, MethodReadsStateFromScript) {\n    auto obj = mmake<TestScriptObject>();\n    obj->value = 21;\n    obj->name = \"item\";\n\n    o2Scripts.GetGlobal().SetProperty(\"readObj\", obj->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\"var dv = readObj.GetDoubleValue();\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"dv\").GetValue<int>(), 42);\n\n    o2Scripts.Eval(\"var desc = readObj.GetDescription();\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"desc\").ToString(), \"item:21\");\n}\n\nTEST(ScriptValue, FieldReadFromScript) {\n    auto obj = mmake<TestScriptObject>();\n    obj->value = 77;\n    obj->name = \"alpha\";\n    obj->score = 1.5f;\n\n    o2Scripts.GetGlobal().SetProperty(\"fieldObj\", obj->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\"var fv = fieldObj.value; var fn = fieldObj.name; var fs = fieldObj.score;\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"fv\").GetValue<int>(), 77);\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"fn\").ToString(), \"alpha\");\n    EXPECT_FLOAT_EQ(o2Scripts.GetGlobal().GetProperty(\"fs\").GetValue<float>(), 1.5f);\n}\n\nTEST(ScriptValue, FieldWriteThenMethodReads) {\n    auto obj = mmake<TestScriptObject>();\n\n    o2Scripts.GetGlobal().SetProperty(\"fmObj\", obj->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\"fmObj.value = 10; fmObj.name = 'test';\");\n    EXPECT_EQ(obj->value, 10);\n    EXPECT_EQ(obj->name, \"test\");\n\n    o2Scripts.Eval(\"var fmDbl = fmObj.GetDoubleValue();\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"fmDbl\").GetValue<int>(), 20);\n\n    o2Scripts.Eval(\"var fmDesc = fmObj.GetDescription();\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"fmDesc\").ToString(), \"test:10\");\n}\n\nTEST(ScriptValue, MultipleInstancesSharePrototype) {\n    auto obj1 = mmake<TestScriptObject>();\n    obj1->value = 10;\n    obj1->name = \"first\";\n    obj1->score = 1.0f;\n\n    auto obj2 = mmake<TestScriptObject>();\n    obj2->value = 20;\n    obj2->name = \"second\";\n    obj2->score = 2.0f;\n\n    o2Scripts.GetGlobal().SetProperty(\"inst1\", obj1->GetScriptValue());\n    o2Scripts.GetGlobal().SetProperty(\"inst2\", obj2->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\"var v1 = inst1.value; var v2 = inst2.value;\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"v1\").GetValue<int>(), 10);\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"v2\").GetValue<int>(), 20);\n\n    o2Scripts.Eval(\"inst1.value = 111; inst2.value = 222;\");\n    EXPECT_EQ(obj1->value, 111);\n    EXPECT_EQ(obj2->value, 222);\n\n    o2Scripts.Eval(\"var d1 = inst1.GetDoubleValue(); var d2 = inst2.GetDoubleValue();\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"d1\").GetValue<int>(), 222);\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"d2\").GetValue<int>(), 444);\n\n    o2Scripts.Eval(\"inst1.AddToScore(5.0); inst2.AddToScore(10.0);\");\n    EXPECT_FLOAT_EQ(obj1->score, 6.0f);\n    EXPECT_FLOAT_EQ(obj2->score, 12.0f);\n}\n\nTEST(ScriptValue, ConstructedObjectFieldsAndMethods) {\n    o2Scripts.Eval(\n        \"var cObj = new o2.TestScriptObject(5, 'built');\"\n        \"cObj.score = 9.9;\"\n        \"var cDbl = cObj.GetDoubleValue();\"\n        \"var cDesc = cObj.GetDescription();\"\n        \"cObj.AddToScore(0.1);\"\n        \"var cScore = cObj.score;\"\n    );\n\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"cDbl\").GetValue<int>(), 10);\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"cDesc\").ToString(), \"built:5\");\n    EXPECT_FLOAT_EQ(o2Scripts.GetGlobal().GetProperty(\"cScore\").GetValue<float>(), 10.0f);\n}\n\n// JS function invoked from C++; argument is another native object (ScriptValue / Jerry native pointer).\n// Using a scriptable method on the argument checks it is the real binding, not a plain object.\nTEST(ScriptValue, ScriptFunctionWithNativeObjectArgument) {\n    auto other = mmake<TestScriptObject>();\n    other->value = 21;\n    other->name = \"arg\";\n\n    o2Scripts.Eval(\"function readNativeOther(other) { return other.GetDoubleValue(); }\");\n    o2Scripts.CollectGarbage();\n\n    ScriptValue fn = o2Scripts.GetGlobal().GetProperty(\"readNativeOther\");\n    EXPECT_TRUE(fn.IsFunction());\n\n    ScriptValue otherSv = other->GetScriptValue();\n    EXPECT_TRUE(otherSv.IsObject());\n    EXPECT_TRUE(otherSv.IsObjectContainer());\n\n    int result = fn.Invoke<int>(ScriptValue(), otherSv);\n    EXPECT_EQ(result, 42);\n\n    // Same flow from pure script: pass global holding native container into a function\n    o2Scripts.GetGlobal().SetProperty(\"scriptArgObj\", otherSv);\n    o2Scripts.CollectGarbage();\n    o2Scripts.Eval(\"function sumWithOther(o) { return o.value + o.GetDoubleValue(); } var scriptPassSum = sumWithOther(scriptArgObj);\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"scriptPassSum\").GetValue<int>(), 63);\n}\n\nTEST(ScriptValue, NativeMethodTakesNativeObjectFromScript) {\n    auto a = mmake<TestScriptObject>();\n    a->value = 10;\n    a->name = \"left\";\n    auto b = mmake<TestScriptObject>();\n    b->value = 32;\n    b->name = \"right\";\n\n    o2Scripts.GetGlobal().SetProperty(\"sumLeft\", a->GetScriptValue());\n    o2Scripts.GetGlobal().SetProperty(\"sumRight\", b->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\"var sumNativePair = sumLeft.SumValueWith(sumRight);\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"sumNativePair\").GetValue<int>(), 42);\n\n    o2Scripts.Eval(\"var sumNativeRev = sumRight.SumValueWith(sumLeft);\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"sumNativeRev\").GetValue<int>(), 42);\n\n    o2Scripts.Eval(\"var newPair = new o2.TestScriptObject(3, 'x'); var sumConstructed = newPair.SumValueWith(sumLeft);\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"sumConstructed\").GetValue<int>(), 13);\n}\n\nTEST(ScriptValue, NativeMethodTakesNativeObjectFromCpp) {\n    auto a = mmake<TestScriptObject>();\n    a->value = 7;\n    auto b = mmake<TestScriptObject>();\n    b->value = 5;\n\n    ScriptValue svA = a->GetScriptValue();\n    ScriptValue sumFn = svA.GetProperty(\"SumValueWith\");\n    EXPECT_TRUE(sumFn.IsFunction());\n\n    int r = sumFn.Invoke<int>(svA, b);\n    EXPECT_EQ(r, 12);\n}\n\nTEST(ScriptValue, NativeStoresRefPassedFromScript) {\n    auto host = mmake<TestScriptObject>();\n    host->value = 100;\n    auto partner = mmake<TestScriptObject>();\n    partner->value = 5;\n\n    o2Scripts.GetGlobal().SetProperty(\"refHost\", host->GetScriptValue());\n    o2Scripts.GetGlobal().SetProperty(\"refPartner\", partner->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\"refHost.SetLinkedPartner(refPartner); var sumLinked = refHost.SumWithLinkedPartner();\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"sumLinked\").GetValue<int>(), 105);\n\n    partner->value = 10;\n    o2Scripts.Eval(\"var sumLinked2 = refHost.SumWithLinkedPartner();\");\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"sumLinked2\").GetValue<int>(), 110);\n}\n\n// Mirrors Assets/Scripts/Reel.js CreateImages loop body: AssetRefImageAsset, new Image, imageAsset, SetParent(Actor).\nTEST(ScriptValue, ReelJsStyleImageWidgetCreateAndParent) {\n    auto container = mmake<Actor>();\n    o2Scripts.GetGlobal().SetProperty(\"reelImagesContainer\", container->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\n        \"var rotatingImage = { info: { regularImage: new o2.AssetRefImageAsset() }, image: null };\"\n        \"var imageAsset = rotatingImage.info.regularImage;\"\n        \"var img = new o2.Image();\"\n        \"img.imageAsset = imageAsset;\"\n        \"img.SetParent(reelImagesContainer, false);\"\n        \"rotatingImage.image = img;\"\n    );\n\n    EXPECT_EQ(container->GetChildren().Count(), 1);\n    Ref<Image> imageChild = DynamicCast<Image>(container->GetChildren()[0]);\n    EXPECT_TRUE(imageChild);\n    EXPECT_EQ(imageChild->GetParent().Lock(), container);\n}\n\nTEST(ScriptValue, GetTransformReturnsLiveNativeObject) {\n    auto image = mmake<Image>();\n    o2Scripts.GetGlobal().SetProperty(\"liveTransformImage\", image->GetScriptValue());\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\n        \"liveTransformImage.GetTransform().SetPivotX(0.25);\"\n        \"liveTransformImage.GetTransform().SetPivotY(0.75);\"\n    );\n\n    auto pivot = image.Get()->o2::Actor::GetTransform()->GetPivot();\n    EXPECT_FLOAT_EQ(pivot.x, 0.25f);\n    EXPECT_FLOAT_EQ(pivot.y, 0.75f);\n}\n\n// Mirrors Assets/Scripts/Reel.js: image.GetLayout().Set(o2.WidgetLayout.Based(\"Center\", size, offset)).\nTEST(ScriptValue, ReelJsStyleGetLayoutSetWidgetLayout) {\n    auto image = mmake<Image>();\n    ScriptValue rotatingImage = ScriptValue::EmptyObject();\n    rotatingImage.SetProperty(\"image\", image->GetScriptValue());\n    o2Scripts.GetGlobal().SetProperty(\"rotatingImage\", rotatingImage);\n    o2Scripts.CollectGarbage();\n\n    o2Scripts.Eval(\n        \"var size = new Vec2(80.0, 40.0);\"\n        \"var imageOffset = 10.0;\"\n        \"rotatingImage.image.GetLayout().Set(\"\n        \"    o2.WidgetLayout.Based(\\\"Center\\\", size, new Vec2(0.0, imageOffset)));\"\n    );\n\n    EXPECT_FLOAT_EQ(image->layout->GetAnchorMin().x, 0.5f);\n    EXPECT_FLOAT_EQ(image->layout->GetAnchorMin().y, 0.5f);\n    EXPECT_FLOAT_EQ(image->layout->GetAnchorMax().x, 0.5f);\n    EXPECT_FLOAT_EQ(image->layout->GetAnchorMax().y, 0.5f);\n    EXPECT_FLOAT_EQ(image->layout->GetOffsetMin().x, -40.0f);\n    EXPECT_FLOAT_EQ(image->layout->GetOffsetMin().y, -10.0f);\n    EXPECT_FLOAT_EQ(image->layout->GetOffsetMax().x, 40.0f);\n    EXPECT_FLOAT_EQ(image->layout->GetOffsetMax().y, 30.0f);\n}\n\nTEST(ScriptValue, LargeOwnedContainerFallback) {\n    LargeNativePayload payload;\n    payload.value = 77;\n    payload.padding[0] = 'A';\n    payload.padding[std::size(payload.padding) - 1] = 'Z';\n\n    ScriptValue value(payload);\n    LargeNativePayload restored = value.GetValue<LargeNativePayload>();\n\n    EXPECT_EQ(restored.value, 77);\n    EXPECT_EQ(restored.padding[0], 'A');\n    EXPECT_EQ(restored.padding[std::size(restored.padding) - 1], 'Z');\n}\n\nTEST(ScriptValue, NativeContainerPoolStressAndGarbageCollection) {\n    const int objectsCount = 512;\n\n    Vector<Ref<TestScriptObject>> objects;\n    ScriptValue values = ScriptValue::EmptyArray();\n\n    for (int i = 0; i < objectsCount; i++) {\n        auto object = mmake<TestScriptObject>();\n        object->value = i;\n        object->score = (float)i*0.5f;\n        objects.Add(object);\n\n        values.AddElement(object->GetScriptValue());\n        values.AddElement(ScriptValue(Function<int(int)>([base = i](int arg) {\n            return base + arg;\n        })));\n    }\n\n    o2Scripts.GetGlobal().SetProperty(\"pooledStressValues\", values);\n    o2Scripts.CollectGarbage();\n\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"pooledStressValues\").GetElement(0).GetProperty(\"value\").GetValue<int>(), 0);\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"pooledStressValues\").GetElement(1).Invoke<int>(5), 5);\n\n    o2Scripts.Eval(\n        \"var pooledStressSum = 0;\"\n        \"for (var i = 0; i < pooledStressValues.length; i += 2)\"\n        \"    pooledStressSum += pooledStressValues[i].value;\"\n    );\n\n    EXPECT_EQ(o2Scripts.GetGlobal().GetProperty(\"pooledStressSum\").GetValue<int>(), objectsCount*(objectsCount - 1)/2);\n\n    o2Scripts.GetGlobal().RemoveProperty(ScriptValue(\"pooledStressValues\"));\n    o2Scripts.GetGlobal().RemoveProperty(ScriptValue(\"pooledStressSum\"));\n\n    values = ScriptValue();\n    objects.Clear();\n\n    for (int i = 0; i < 5; i++)\n        o2Scripts.CollectGarbage();\n\n    SUCCEED();\n}\n\nTEST(ScriptValue, MoveConstructor) {\n    ScriptValue original(42);\n    EXPECT_EQ(original.GetValue<int>(), 42);\n\n    ScriptValue moved(std::move(original));\n    EXPECT_EQ(moved.GetValue<int>(), 42);\n    EXPECT_TRUE(original.IsUndefined());\n}\n\nTEST(ScriptValue, MoveAssignment) {\n    ScriptValue a(100);\n    ScriptValue b(\"hello\");\n\n    a = std::move(b);\n    EXPECT_EQ(a.ToString(), \"hello\");\n    EXPECT_TRUE(b.IsUndefined());\n\n    ScriptValue obj = ScriptValue::EmptyObject();\n    obj.SetProperty(\"key\", ScriptValue(7));\n    ScriptValue target;\n    target = std::move(obj);\n    EXPECT_TRUE(target.IsObject());\n    EXPECT_EQ(target.GetProperty(\"key\").GetValue<int>(), 7);\n    EXPECT_TRUE(obj.IsUndefined());\n}\n\nTEST(ScriptValue, MoveDoesNotAcquire) {\n    ScriptValue arr = ScriptValue::EmptyArray();\n    arr.AddElement(ScriptValue(1));\n    arr.AddElement(ScriptValue(2));\n\n    ScriptValue moved = std::move(arr);\n    EXPECT_TRUE(moved.IsArray());\n    EXPECT_EQ(moved.GetLength(), 2);\n    EXPECT_EQ(moved.GetElement(0).GetValue<int>(), 1);\n}\n\nTEST(ScriptValue, MapConverterRoundTrip) {\n    Map<String, int> original;\n    original[\"alpha\"] = 1;\n    original[\"beta\"] = 2;\n    original[\"gamma\"] = 3;\n\n    ScriptValue sv(original);\n    EXPECT_TRUE(sv.IsObject());\n\n    Map<String, int> restored = sv.GetValue<Map<String, int>>();\n    EXPECT_EQ(restored.Count(), 3);\n    EXPECT_EQ(restored[\"alpha\"], 1);\n    EXPECT_EQ(restored[\"beta\"], 2);\n    EXPECT_EQ(restored[\"gamma\"], 3);\n}\n\nTEST(ScriptValue, MapConverterEmpty) {\n    Map<String, float> empty;\n    ScriptValue sv(empty);\n    EXPECT_TRUE(sv.IsObject());\n\n    Map<String, float> restored = sv.GetValue<Map<String, float>>();\n    EXPECT_EQ(restored.Count(), 0);\n}\n\nTEST(ScriptValue, EnumRoundTrip) {\n    ScriptValue sv(ScriptValue::ValueType::Object);\n    EXPECT_EQ(sv.GetValueType(), ScriptValue::ValueType::String);\n    EXPECT_EQ(sv.ToString(), \"Object\");\n\n    auto restored = sv.GetValue<ScriptValue::ValueType>();\n    EXPECT_EQ(restored, ScriptValue::ValueType::Object);\n}\n\nTEST(ScriptValue, EnumFromNumber) {\n    ScriptValue sv((int)ScriptValue::ValueType::Bool);\n    auto restored = sv.GetValue<ScriptValue::ValueType>();\n    EXPECT_EQ(restored, ScriptValue::ValueType::Bool);\n}\n\nTEST(ScriptValue, UInt64LargeValue) {\n    UInt64 large = 4294967296ULL;\n    ScriptValue sv(large);\n    UInt64 back = sv.GetValue<UInt64>();\n    EXPECT_EQ(back, large);\n}\n\nTEST(ScriptValue, EmptyStringRoundTrip) {\n    ScriptValue sv(String(\"\"));\n    EXPECT_EQ(sv.GetValueType(), ScriptValue::ValueType::String);\n    EXPECT_EQ(sv.ToString(), \"\");\n    EXPECT_EQ(sv.GetValue<String>(), \"\");\n}\n\nTEST(ScriptValue, RemoveProperty) {\n    ScriptValue obj = ScriptValue::EmptyObject();\n    obj.SetProperty(\"a\", ScriptValue(1));\n    obj.SetProperty(\"b\", ScriptValue(2));\n    EXPECT_EQ(obj.GetProperty(\"a\").GetValue<int>(), 1);\n\n    obj.RemoveProperty(ScriptValue(\"a\"));\n    EXPECT_TRUE(obj.GetProperty(\"a\").IsUndefined());\n    EXPECT_EQ(obj.GetProperty(\"b\").GetValue<int>(), 2);\n}\n\nTEST(ScriptValue, RemoveElement) {\n    ScriptValue arr = ScriptValue::EmptyArray();\n    arr.AddElement(ScriptValue(10));\n    arr.AddElement(ScriptValue(20));\n    arr.AddElement(ScriptValue(30));\n    EXPECT_EQ(arr.GetLength(), 3);\n\n    arr.RemoveElement(1);\n    EXPECT_EQ(arr.GetElement(0).GetValue<int>(), 10);\n    EXPECT_EQ(arr.GetElement(2).GetValue<int>(), 30);\n}\n\nTEST(ScriptValue, CopyDeepClonesArray) {\n    ScriptValue arr = ScriptValue::EmptyArray();\n    arr.AddElement(ScriptValue(1));\n    arr.AddElement(ScriptValue(2));\n\n    ScriptValue copied = arr.Copy();\n    EXPECT_TRUE(copied.IsArray());\n    EXPECT_EQ(copied.GetLength(), 2);\n    EXPECT_EQ(copied.GetElement(0).GetValue<int>(), 1);\n\n    copied.SetElement(ScriptValue(99), 0);\n    EXPECT_EQ(arr.GetElement(0).GetValue<int>(), 1);\n    EXPECT_EQ(copied.GetElement(0).GetValue<int>(), 99);\n}\n\nTEST(ScriptValue, CopyDeepClonesObject) {\n    ScriptValue obj = ScriptValue::EmptyObject();\n    obj.SetProperty(\"x\", ScriptValue(10));\n\n    ScriptValue copied = obj.Copy();\n    EXPECT_TRUE(copied.IsObject());\n    EXPECT_EQ(copied.GetProperty(\"x\").GetValue<int>(), 10);\n\n    copied.SetProperty(\"x\", ScriptValue(99));\n    EXPECT_EQ(obj.GetProperty(\"x\").GetValue<int>(), 10);\n    EXPECT_EQ(copied.GetProperty(\"x\").GetValue<int>(), 99);\n}\n\nTEST(ScriptValue, ExplicitCast) {\n    ScriptValue sv(42);\n    int val = static_cast<int>(sv);\n    EXPECT_EQ(val, 42);\n\n    ScriptValue svStr(\"test\");\n    String str = static_cast<String>(svStr);\n    EXPECT_EQ(str, \"test\");\n}\n\nTEST(ScriptValue, DumpPrimitives) {\n    EXPECT_EQ(ScriptValue(42).Dump(), \"42\");\n    EXPECT_EQ(ScriptValue(true).Dump(), \"true\");\n    EXPECT_EQ(ScriptValue(false).Dump(), \"false\");\n    EXPECT_EQ(ScriptValue(\"hello\").Dump(), \"hello\");\n    EXPECT_EQ(ScriptValue().Dump(), \"Undefined\");\n}\n\n#else\n\nTEST(ScriptValue, ScriptingDisabled) {\n    SUCCEED() << \"Scripting is disabled in this build\";\n}\n\n#endif // IS_SCRIPTING_SUPPORTED\n"
  },
  {
    "path": "Tests/Sources/tests/TestScriptObject.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include \"tests/TestScriptObject.h\"\n\nnamespace o2\n{\n    TestScriptObject::TestScriptObject(RefCounter* refCounter, int v, const String& n) :\n        RefCounterable(refCounter), value(v), name(n)\n    {}\n\n    TestScriptObject::TestScriptObject(int v, const String& n) : value(v), name(n)\n    {}\n\n    int TestScriptObject::GetValue() const\n    {\n        return value;\n    }\n\n    void TestScriptObject::SetValue(int v)\n    {\n        value = v;\n    }\n\n    String TestScriptObject::GetName() const\n    {\n        return name;\n    }\n\n    void TestScriptObject::SetName(const String& n)\n    {\n        name = n;\n    }\n\n    float TestScriptObject::GetScore() const\n    {\n        return score;\n    }\n\n    void TestScriptObject::SetScore(float s)\n    {\n        score = s;\n    }\n\n    int TestScriptObject::Add(int a, int b) const\n    {\n        return a + b;\n    }\n\n    String TestScriptObject::Concat(const String& a, const String& b) const\n    {\n        return a + b;\n    }\n\n    float TestScriptObject::Multiply(float a, float b) const\n    {\n        return a * b;\n    }\n\n    void TestScriptObject::SetAll(int v, const String& n, float s)\n    {\n        value = v;\n        name = n;\n        score = s;\n    }\n\n    int TestScriptObject::GetDoubleValue() const\n    {\n        return value * 2;\n    }\n\n    String TestScriptObject::GetDescription() const\n    {\n        return name + \":\" + (String)value;\n    }\n\n    void TestScriptObject::AddToScore(float delta)\n    {\n        score += delta;\n    }\n\n    int TestScriptObject::SumValueWith(const Ref<TestScriptObject>& other) const\n    {\n        return value + (other ? other->value : 0);\n    }\n\n    void TestScriptObject::SetLinkedPartner(const Ref<TestScriptObject>& other)\n    {\n        linkedPartner = other;\n    }\n\n    int TestScriptObject::SumWithLinkedPartner() const\n    {\n        return value + (linkedPartner ? linkedPartner->value : 0);\n    }\n}\n// --- META ---\n\nDECLARE_CLASS(o2::TestScriptObject, o2__TestScriptObject);\n// --- END META ---\n"
  },
  {
    "path": "Tests/Sources/tests/TestScriptObject.h",
    "content": "#pragma once\n\n#include \"o2/Utils/Basic/IObject.h\"\n#include \"o2/Utils/Types/String.h\"\n#include \"o2/Utils/Types/Ref.h\"\n\nnamespace o2\n{\n    // Test class for ScriptValue binding tests\n    class TestScriptObject : public IObject, public RefCounterable\n    {\n    public:\n        int value = 0;       // @SCRIPTABLE\n        String name = \"default\";  // @SCRIPTABLE\n        float score = 0.0f;  // @SCRIPTABLE\n\n    public:\n        TestScriptObject() = default;\n        // @SCRIPTABLE\n        TestScriptObject(RefCounter* refCounter, int v, const String& n);\n        // @SCRIPTABLE\n        TestScriptObject(int v, const String& n);\n\n        int GetValue() const;\n        void SetValue(int v);\n\n        String GetName() const;\n        void SetName(const String& n);\n\n        float GetScore() const;\n        void SetScore(float s);\n\n        // @SCRIPTABLE\n        int Add(int a, int b) const;\n        // @SCRIPTABLE\n        String Concat(const String& a, const String& b) const;\n        // @SCRIPTABLE\n        float Multiply(float a, float b) const;\n\n        // @SCRIPTABLE\n        void SetAll(int v, const String& n, float s);\n        // @SCRIPTABLE\n        int GetDoubleValue() const;\n        // @SCRIPTABLE\n        String GetDescription() const;\n        // @SCRIPTABLE\n        void AddToScore(float delta);\n\n        // @SCRIPTABLE\n        int SumValueWith(const Ref<TestScriptObject>& other) const;\n\n        // @SCRIPTABLE\n        void SetLinkedPartner(const Ref<TestScriptObject>& other);\n        // @SCRIPTABLE\n        int SumWithLinkedPartner() const;\n\n        IOBJECT(TestScriptObject);\n\n    private:\n        Ref<TestScriptObject> linkedPartner;\n    };\n}\n// --- META ---\n\nCLASS_BASES_META(o2::TestScriptObject)\n{\n    BASE_CLASS(o2::IObject);\n    BASE_CLASS(o2::RefCounterable);\n}\nEND_META;\nCLASS_FIELDS_META(o2::TestScriptObject)\n{\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().DEFAULT_VALUE(0).NAME(value);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().DEFAULT_VALUE(\"default\").NAME(name);\n    FIELD().PUBLIC().SCRIPTABLE_ATTRIBUTE().DEFAULT_VALUE(0.0f).NAME(score);\n    FIELD().PRIVATE().NAME(linkedPartner);\n}\nEND_META;\nCLASS_METHODS_META(o2::TestScriptObject)\n{\n\n    FUNCTION().PUBLIC().CONSTRUCTOR();\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(RefCounter*, int, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().CONSTRUCTOR(int, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(int, GetValue);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetValue, int);\n    FUNCTION().PUBLIC().SIGNATURE(String, GetName);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetName, const String&);\n    FUNCTION().PUBLIC().SIGNATURE(float, GetScore);\n    FUNCTION().PUBLIC().SIGNATURE(void, SetScore, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(int, Add, int, int);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(String, Concat, const String&, const String&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(float, Multiply, float, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetAll, int, const String&, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(int, GetDoubleValue);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(String, GetDescription);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, AddToScore, float);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(int, SumValueWith, const Ref<TestScriptObject>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(void, SetLinkedPartner, const Ref<TestScriptObject>&);\n    FUNCTION().PUBLIC().SCRIPTABLE_ATTRIBUTE().SIGNATURE(int, SumWithLinkedPartner);\n}\nEND_META;\n// --- END META ---\n"
  },
  {
    "path": "Tests/Sources/tests/Vec2FTest.cpp",
    "content": "#include \"o2/stdafx.h\"\n#include <gtest/gtest.h>\n#include \"o2/Utils/Math/Vector2.h\"\n\nusing namespace o2;\n\nTEST(Vec2F, ConstructorAndAccess) {\n    Vec2F v(1.0f, 2.0f);\n    EXPECT_FLOAT_EQ(v.x, 1.0f);\n    EXPECT_FLOAT_EQ(v.y, 2.0f);\n\n    Vec2F zero;\n    EXPECT_FLOAT_EQ(zero.x, 0.0f);\n    EXPECT_FLOAT_EQ(zero.y, 0.0f);\n\n    EXPECT_FLOAT_EQ(v[0], 1.0f);\n    EXPECT_FLOAT_EQ(v[1], 2.0f);\n}\n\nTEST(Vec2F, Arithmetic) {\n    Vec2F a(1.0f, 2.0f);\n    Vec2F b(3.0f, 4.0f);\n\n    Vec2F sum = a + b;\n    EXPECT_FLOAT_EQ(sum.x, 4.0f);\n    EXPECT_FLOAT_EQ(sum.y, 6.0f);\n\n    Vec2F diff = b - a;\n    EXPECT_FLOAT_EQ(diff.x, 2.0f);\n    EXPECT_FLOAT_EQ(diff.y, 2.0f);\n\n    Vec2F scaled = a * 2.0f;\n    EXPECT_FLOAT_EQ(scaled.x, 2.0f);\n    EXPECT_FLOAT_EQ(scaled.y, 4.0f);\n\n    Vec2F mul = a * b;\n    EXPECT_FLOAT_EQ(mul.x, 3.0f);\n    EXPECT_FLOAT_EQ(mul.y, 8.0f);\n}\n\nTEST(Vec2F, LengthAndNormalize) {\n    Vec2F v(3.0f, 4.0f);\n    EXPECT_FLOAT_EQ(v.Length(), 5.0f);\n    EXPECT_FLOAT_EQ(v.SqrLength(), 25.0f);\n\n    Vec2F n = v.Normalized();\n    EXPECT_NEAR(n.Length(), 1.0f, 1e-5f);\n    EXPECT_FLOAT_EQ(n.x, 0.6f);\n    EXPECT_FLOAT_EQ(n.y, 0.8f);\n}\n\nTEST(Vec2F, DotAndCross) {\n    Vec2F a(1.0f, 0.0f);\n    Vec2F b(0.0f, 1.0f);\n\n    EXPECT_FLOAT_EQ(a.Dot(b), 0.0f);\n    EXPECT_FLOAT_EQ(a.Cross(b), 1.0f);\n\n    Vec2F perp = a.Perpendicular();\n    EXPECT_FLOAT_EQ(perp.x, 0.0f);\n    EXPECT_FLOAT_EQ(perp.y, 1.0f);\n}\n\nTEST(Vec2F, StaticMethods) {\n    EXPECT_FLOAT_EQ(Vec2F::Up().x, 0.0f);\n    EXPECT_FLOAT_EQ(Vec2F::Up().y, 1.0f);\n    EXPECT_FLOAT_EQ(Vec2F::Down().y, -1.0f);\n    EXPECT_FLOAT_EQ(Vec2F::Left().x, -1.0f);\n    EXPECT_FLOAT_EQ(Vec2F::Right().x, 1.0f);\n    EXPECT_FLOAT_EQ(Vec2F::One().x, 1.0f);\n    EXPECT_FLOAT_EQ(Vec2F::One().y, 1.0f);\n}\n\nTEST(Vec2F, Equality) {\n    Vec2F a(1.0f, 2.0f);\n    Vec2F b(1.0f, 2.0f);\n    Vec2F c(1.1f, 2.0f);\n\n    EXPECT_TRUE(a == b);\n    EXPECT_FALSE(a != b);\n    EXPECT_TRUE(a != c);\n}\n\nTEST(Vec2F, Vec2IConversion) {\n    Vec2I vi(10, 20);\n    Vec2F vf = (Vec2F)vi;\n    EXPECT_FLOAT_EQ(vf.x, 10.0f);\n    EXPECT_FLOAT_EQ(vf.y, 20.0f);\n\n    Vec2F vf2(1.5f, 2.7f);\n    Vec2I vi2 = (Vec2I)vf2;\n    EXPECT_EQ(vi2.x, 1);\n    EXPECT_EQ(vi2.y, 2);\n}\n"
  },
  {
    "path": "Tools/rasterize_svg_to_png.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nRasterizes SVG icons to PNG.\n\nUsage:\n    python rasterize_svg_to_png.py [input.svg] [output.png] [--size N] [--sharp]\n\n  --sharp         Rasterize at 2x then downscale with nearest-neighbor for crisp edges.\n  --native-size WxH  Render at viewBox size (e.g. 37x43) then resize to --size; best for file icon.\n\nBackends (first available is used):\n  1. resvg_py  — pip install resvg_py (no system deps, recommended)\n  2. cairosvg  — pip install cairosvg (on Windows may need Cairo/GTK runtime)\n  3. Inkscape  — if installed (e.g. from https://inkscape.org)\n\nExamples:\n    python rasterize_svg_to_png.py\n    python rasterize_svg_to_png.py UI4_big_material_icon.svg\n    python rasterize_svg_to_png.py UI4_big_material_icon.svg ../Editor/Assets/ui/UI4_big_material_icon.png --size 64\n\"\"\"\n\nimport argparse\nimport os\nimport shutil\nimport subprocess\nimport sys\n\n\ndef _downscale_nearest(png_path: str, target_size: int) -> bool:\n    \"\"\"Downscale PNG to target_size using nearest-neighbor for crisp edges.\"\"\"\n    try:\n        from PIL import Image\n    except ImportError:\n        return False\n    try:\n        resample = getattr(Image.Resampling, \"NEAREST\", Image.NEAREST)\n        with Image.open(png_path) as img:\n            img = img.convert(\"RGBA\")\n            out = img.resize((target_size, target_size), resample)\n            out.save(png_path)\n        return True\n    except Exception:\n        return False\n\n\ndef rasterize_resvg(svg_path: str, png_path: str, size: int, render_scale: int = 1, native_size: tuple = None) -> bool:\n    try:\n        import resvg_py\n    except ImportError:\n        return False\n    if native_size:\n        nw, nh = native_size\n        w, h = nw * render_scale, nh * render_scale\n    else:\n        w = h = (size * render_scale) if render_scale > 1 else size\n    try:\n        png_bytes = resvg_py.svg_to_bytes(\n            svg_path=os.path.abspath(svg_path),\n            width=w,\n            height=h,\n        )\n        with open(os.path.abspath(png_path), \"wb\") as f:\n            f.write(png_bytes)\n        if (render_scale > 1 or native_size) and (w != size or h != size):\n            _downscale_nearest(os.path.abspath(png_path), size)\n        return True\n    except Exception:\n        return False\n\n\ndef rasterize_cairosvg(svg_path: str, png_path: str, size: int, render_scale: int = 1, native_size: tuple = None) -> bool:\n    try:\n        import cairosvg\n    except ImportError:\n        return False\n    except OSError:\n        return False  # e.g. cairo DLL not found on Windows\n    if native_size:\n        nw, nh = native_size\n        w, h = nw * render_scale, nh * render_scale\n    else:\n        w = h = (size * render_scale) if render_scale > 1 else size\n    try:\n        cairosvg.svg2png(\n            url=os.path.abspath(svg_path),\n            write_to=os.path.abspath(png_path),\n            output_width=w,\n            output_height=h,\n        )\n        if (render_scale > 1 or native_size) and (w != size or h != size):\n            _downscale_nearest(os.path.abspath(png_path), size)\n        return True\n    except Exception:\n        return False\n\n\ndef _find_inkscape() -> str:\n    ink = shutil.which(\"inkscape\")\n    if ink:\n        return ink\n    # Windows: common install paths\n    for path in (\n        os.environ.get(\"ProgramFiles\", \"C:\\\\Program Files\") + \"\\\\Inkscape\\\\bin\\\\inkscape.exe\",\n        os.environ.get(\"ProgramFiles(x86)\", \"C:\\\\Program Files (x86)\") + \"\\\\Inkscape\\\\inkscape.exe\",\n    ):\n        if os.path.isfile(path):\n            return path\n    return \"\"\n\n\ndef rasterize_inkscape(svg_path: str, png_path: str, size: int, render_scale: int = 1, native_size: tuple = None) -> bool:\n    ink = _find_inkscape()\n    if not ink:\n        return False\n    if native_size:\n        nw, nh = native_size\n        w, h = nw * render_scale, nh * render_scale\n    else:\n        w = h = (size * render_scale) if render_scale > 1 else size\n    out = os.path.abspath(png_path)\n    try:\n        subprocess.run(\n            [ink, str(svg_path), \"-o\", out, \"-w\", str(w), \"-h\", str(h)],\n            check=True,\n            capture_output=True,\n        )\n        if (render_scale > 1 or native_size) and (w != size or h != size):\n            _downscale_nearest(out, size)\n        return True\n    except (subprocess.CalledProcessError, FileNotFoundError):\n        return False\n\n\ndef main():\n    script_dir = os.path.dirname(os.path.abspath(__file__))\n    parser = argparse.ArgumentParser(description=\"Rasterize SVG to PNG\")\n    parser.add_argument(\n        \"input\",\n        nargs=\"?\",\n        default=os.path.join(script_dir, \"UI4_big_material_icon.svg\"),\n        help=\"Input SVG path (default: UI4_big_material_icon.svg in script dir)\",\n    )\n    parser.add_argument(\n        \"output\",\n        nargs=\"?\",\n        default=None,\n        help=\"Output PNG path (default: same name as input, .png in script dir)\",\n    )\n    parser.add_argument(\n        \"--size\",\n        \"-s\",\n        type=int,\n        default=64,\n        help=\"Output width and height in pixels (default: 64)\",\n    )\n    parser.add_argument(\n        \"--sharp\",\n        action=\"store_true\",\n        help=\"Render at 2x then downscale with nearest-neighbor for crisp edges\",\n    )\n    parser.add_argument(\n        \"--native-size\",\n        metavar=\"WxH\",\n        default=None,\n        help=\"Render at viewBox size (e.g. 37x43) then resize to --size; use for file icon\",\n    )\n    args = parser.parse_args()\n    render_scale = 2 if args.sharp else 1\n    native_size = None\n    if args.native_size:\n        try:\n            a, b = args.native_size.strip().lower().split(\"x\")\n            native_size = (int(a), int(b))\n        except ValueError:\n            print(f\"Invalid --native-size: {args.native_size}\", file=sys.stderr)\n            sys.exit(1)\n\n    input_path = args.input\n    if not os.path.isabs(input_path):\n        for base in (script_dir, os.getcwd()):\n            candidate = os.path.join(base, input_path)\n            if os.path.isfile(candidate):\n                input_path = candidate\n                break\n        else:\n            input_path = os.path.join(script_dir, input_path)\n    else:\n        input_path = os.path.normpath(input_path)\n\n    if args.output:\n        output_path = args.output\n        if not os.path.isabs(output_path):\n            output_path = os.path.normpath(os.path.join(os.getcwd(), output_path))\n    else:\n        base = os.path.splitext(os.path.basename(input_path))[0]\n        output_path = os.path.join(script_dir, f\"{base}.png\")\n\n    if not os.path.isfile(input_path):\n        print(f\"Input file not found: {input_path}\", file=sys.stderr)\n        sys.exit(1)\n\n    os.makedirs(os.path.dirname(output_path) or \".\", exist_ok=True)\n\n    def do_rasterize():\n        if rasterize_resvg(input_path, output_path, args.size, render_scale, native_size):\n            return True\n        if rasterize_cairosvg(input_path, output_path, args.size, render_scale, native_size):\n            return True\n        if rasterize_inkscape(input_path, output_path, args.size, render_scale, native_size):\n            return True\n        return False\n\n    if not do_rasterize():\n        print(\n            \"No backend available. Install: pip install resvg_py\",\n            file=sys.stderr,\n        )\n        sys.exit(1)\n\n    print(f\"OK: {output_path} ({args.size}x{args.size})\")\n\n    # Always save a copy next to the SVG for comparison\n    input_dir = os.path.dirname(input_path)\n    input_base = os.path.splitext(os.path.basename(input_path))[0]\n    beside_path = os.path.join(input_dir, f\"{input_base}.png\")\n    if os.path.normpath(beside_path) != os.path.normpath(output_path):\n        shutil.copy2(output_path, beside_path)\n        print(f\"Copy: {beside_path}\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "Tools/requirements_rasterize.txt",
    "content": "# For rasterize_svg_to_png.py (resvg_py works without system libs)\nresvg_py>=0.2.0\ncairosvg>=2.7.0\n"
  },
  {
    "path": "UI/UI4.ai",
    "content": "%PDF-1.5\r%\r\n1 0 obj\r<</Metadata 2 0 R/OCProperties<</D<</ON[49 0 R 50 0 R]/Order 51 0 R/RBGroups[]>>/OCGs[49 0 R 50 0 R]>>/Pages 3 0 R/Type/Catalog>>\rendobj\r2 0 obj\r<</Length 38405/Subtype/XML/Type/Metadata>>stream\r\n<?xpacket begin=\"﻿\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 9.1-c003 1.000000, 0000/00/00-00:00:00        \">\n   <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n      <rdf:Description rdf:about=\"\"\n            xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n            xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\"\n            xmlns:xmpGImg=\"http://ns.adobe.com/xap/1.0/g/img/\"\n            xmlns:xmpMM=\"http://ns.adobe.com/xap/1.0/mm/\"\n            xmlns:stRef=\"http://ns.adobe.com/xap/1.0/sType/ResourceRef#\"\n            xmlns:stEvt=\"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#\"\n            xmlns:stMfs=\"http://ns.adobe.com/xap/1.0/sType/ManifestItem#\"\n            xmlns:illustrator=\"http://ns.adobe.com/illustrator/1.0/\"\n            xmlns:pdf=\"http://ns.adobe.com/pdf/1.3/\"\n            xmlns:xmpTPg=\"http://ns.adobe.com/xap/1.0/t/pg/\"\n            xmlns:stDim=\"http://ns.adobe.com/xap/1.0/sType/Dimensions#\"\n            xmlns:stFnt=\"http://ns.adobe.com/xap/1.0/sType/Font#\"\n            xmlns:xmpG=\"http://ns.adobe.com/xap/1.0/g/\">\n         <dc:format>application/pdf</dc:format>\n         <dc:title>\n            <rdf:Alt>\n               <rdf:li xml:lang=\"x-default\">UI4</rdf:li>\n            </rdf:Alt>\n         </dc:title>\n         <xmp:MetadataDate>2025-06-09T19:37:58+04:00</xmp:MetadataDate>\n         <xmp:ModifyDate>2025-06-09T19:37:58+04:00</xmp:ModifyDate>\n         <xmp:CreateDate>2025-06-09T19:37:57+05:00</xmp:CreateDate>\n         <xmp:CreatorTool>Adobe Illustrator 29.5 (Windows)</xmp:CreatorTool>\n         <xmp:Thumbnails>\n            <rdf:Alt>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <xmpGImg:width>184</xmpGImg:width>\n                  <xmpGImg:height>256</xmpGImg:height>\n                  <xmpGImg:format>JPEG</xmpGImg:format>\n                  <xmpGImg:image>/9j/4AAQSkZJRgABAgEAAAAAAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAAAAAAAAEA&#xA;AQAAAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK&#xA;DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f&#xA;Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgBAAC4AwER&#xA;AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA&#xA;AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB&#xA;UtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE&#xA;1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZ&#xA;qbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYECAMDbQEAAhEDBCESMUEFURNhIgZxgZEy&#xA;obHwFMHR4SNCFVJicvEzJDRDghaSUyWiY7LCB3PSNeJEgxdUkwgJChgZJjZFGidkdFU38qOzwygp&#xA;0+PzhJSktMTU5PRldYWVpbXF1eX1RlZmdoaWprbG1ub2R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo&#xA;+DlJWWl5iZmpucnZ6fkqOkpaanqKmqq6ytrq+v/aAAwDAQACEQMRAD8A9Uk0FcVYR5o/Myx0HVhY&#xA;SwySn0hK7xqWoGag6f6rfh47HhkeTjZtZixGpk37vf5/j7yj/leGiIqetDPHIyhivp1G/gSVqPem&#xA;SGM9XGj2pire7a/5Xn5d/ln/AORf/N2Hwyn+VMPm7/lefl3+Wf8A5F/83Y+GV/lTD5tL+dNt6aO1&#xA;mwUlfVYciqggcuJ4/FRjQVpX26Y+EUfyth8/k1/yu7T6L/o7Vp8QqdjXt8O+2PhFf5Ww+fycPzst&#xA;TyK2hZEALNVtq7b/AAbb0GPhFf5Ww+fyaP53Wg2NqQdtuTfT+xh8Io/lbD5/Jv8A5Xdp9B/o7Vru&#xA;KmlKD/JweEU/yth8/k0fzusaGlsSa7CrUpvX9n5Y+EV/lbD5/Js/ndp/CotzzrutTSlD34+NO2Hw&#xA;ij+VsPn8lf8A5XXoX8k3/Isf81YPCK/yth8/k7/ldehfyTf8ix/zVj4RX+VsPn8nf8rr0H+Sb/kW&#xA;P+asfCK/yth8/kmPl/8ANHS9Z1SKwt0kDyBiS68QAoJ8T3wSgQ36fXY8suGN2zkGorkHMdirsVdi&#xA;rsVdirsVaf7J+WKvP9U8g6R5h1G5vruWeK4jdYAYn4r6ahX6Dv8AG2+TjMhxNRooZZXLmhX/ACX8&#xA;puavJdNTZay1IHh0w+IWj+S8Xm0v5KeTqfE10T4iUD/jU4+IV/kvF5tt+SvkwKT/AKUaCtDKP+ac&#xA;fEKf5Lxeaa/8qy8oRwn/AEaSi14gXE4AArTYyjpiMkmf8m4O77T+tBp+V/kw0BtFqe/qy0pUf8vB&#xA;wHJJnHsvT/zb+MlO4/KbyfI/KOOaFQnxxRS13pXl8bucfFKJdkYD0I+J/U235SeWJJGjeW7eMEGh&#xA;mU/F7++/h3w+KWH8j4a6/P8AYpD8nvKnI1e4UVotZE38B1weKU/yPg/pfP8AYuX8m/KZRSZZ1JpU&#xA;Fx33ptX9eHxSxPZGC+Uvn+xs/k15SCVM04PXkZBSn3Y+KV/kjBfKXz/Y5fya8o8hWacjuBIASaV2&#xA;2x8UqeyMPdL5/sbH5NeUa0MtwelQJADUde2PilB7Jwd0vn+xBav+UvlaG1SW1lnq0gWpk5DiVJp8&#xA;KN3x8UpHZGEHcS+aG0PydYaNrNld27SF2kMRLsxHxRsehjT+XxwSmSG7DosWKVwBvzL1uP7A+WQc&#xA;pvFXYq7FXYq7FXYq0/2T8sVSKx9St76aK5Nw1Q5Kj+5SnQN3oMVRa/WAkdIow/EB1DminaoU8Nx9&#xA;AxQrYpWv9hvkcVVJlleFxE3GQhgrEbV3pUEHbFQVFYr0g8mCVG4Vwdz3qYx+rEs4yHUfj5ttBdEq&#xA;RIdh05Ls1PdGrgZiUe78fNd6dz6jHn8BI4rUeIr1Sv44seKNcvx83JHcqGJfkTSikinvuEWn44qT&#xA;H8f2qlZ+P2F5eHI06ePHCxoOb1iFHBCa/FUmgp3G2+KinVn2oqUpU/Eeu+3Tx74rs799UjigB71J&#xA;39xQfrxU1SB1OG4ms4lZAZfUqwjk4ACjdGYfwyQYEFA6vBwOnO0SxsbsD4XZ9vRk8QuRSySP7A+W&#xA;KrsVdirsVdirsVdirT/ZPyxVIbOJJRfK8ayD12+Fum8Kg/eDTFUXDBHFHEI4Ej9OMRqq0+BQPsA0&#xA;6CmKFZSx+0KfTXFLT/Yb5HFXXKSvB+5/vFYlSOIIIr/MrDr7YUFDQWEsSJHxDCpeQARBGO3UCNf1&#xA;YCWcBXWl0llMwRCWNE4l/wBye69jH2pUbdz7Ysgf6RXTW07uGAoy9H/dk0pT9pCffFQdvqK2OznW&#xA;YSBaUFOIMYHSnLaOte/X8MUk/wBIrTp7mL0WQNGOQowh+LkGXkR6VK0b/b3q2xlR5klY9ne8U9Na&#xA;COqxqzRVVKggVML/AGeI7/SeuG2qmrnT7hzDJDCiSIrcaelSNgSy0LRMdye1OmG1IVEsnSUytbpJ&#xA;+6VOH7rfbiRX01Ow/wAqngMFrS7UUdLWFIV4VkAaOJQ23FiQoI+nphBSUDrUnI6cCzsfrYI5Rsg/&#xA;uZPEDIqyKP7A+WKV2KuxV2KuxV2KuxVp/sn5YqkmnAE3wO4M5BA2P90mAixSozgFVQAx4gADkSdv&#xA;Gp3+nAIgJteOnhkkLX+w3yOKqrNH6TM7AR0NWrQU3rvXwwhCn6lmkTVmASMHkxkOwG25JwUy4+rn&#xA;a0TkHm48QOVZSKAmg/a232xpPH+NnB7T1ComHqLTknqGo6UqK96j540jjXRtbq7KsgL/AAhlLliK&#xA;j4diTSuNKZWuWeB6lZFajGM0YGjjYr8/bFDQubc8aSoeX2aMN96bYrbkurZyoSVGLjkgVgeQ8RTq&#xA;MVttZ4Hcokis4FSoIJp40xVq4WQqvpxpIwYECRioFO9Qr7/RiqT6610X071Y0RfrQ3Vyxr6Mm1Ci&#xA;4qyGP7A+WKrsVdirsVdirsVdirT/AGT8sVSOwIAvyQSBO1QteR/dJ0p3xVESMjCL4JiCOS8S606f&#xA;b3XffocKFaNQq7ct96MSx/EnAlz/AGG+RxVUkDOg4jxqCWQ0oR1G+KqUX1wIKpGCNgokdhWviV/h&#xA;hKY11XFJuIQAEKBt6jg1p0LUqenXAmo+bnSUu1FHElan1XB2ofsgUHT6cVqPefx8XJ64d/hWpIJ/&#xA;eM1B8iu30YpqPefx8V5a6oOMaV71c7H/AIHFQI95+X7XVueIPBOdfiHI0p8+OK1HzXpz4LzpzoOV&#xA;Ole9K4sTV7N0Fa03OxPyxQ3iqT+Yv+ld/wAxY/5My4qnkf2B8sVXYq7FXYq7FXYq7FWn+yfliqSa&#xA;eK/XxUis5FV6j90nTFUUyVVPjcADt1Pz264qqAgiv69sVaf7DfI4q3LFHNbekxKrIabKrd69GUj7&#xA;xhCCoJBarACXZgp5BzEnKvIlTQIBsSaUGSMDdKJADvVBZWksSqqgRBQoX00pQHkNmXx3yJBDIEdz&#xA;Y0+FX5JRK9aJH02I/Z8RXAkEdw+1s2EJ5cviLGrEpHv1qD8PflitjuC6K1EUQiicoi/ZVVRQB4AB&#xA;aYrxDuH2qqKyrQuXP8zUr+AGKCbXYodirsVSfzF/0rv+Ysf8mZcVTyP7A+WKrsVdirsVdirsVdir&#xA;T/ZPyxVJNO6325H787gVP90nQb4qrzuF4gySjYbpHzrXuaI2FCrG4ZdixoaEspU/iBgS3J9hvkcV&#xA;XcgluCrpEBX4m3UV/wBl4++KFN7ngPiu4FLKCpYbVP7X29wd6YVt0t0qcla7gR9qBh0qWG45jqR+&#xA;BxW131uJJnEtzCFFAseyspIr8RLGtevQYra972zRuLzxq1eNC6g18NzgpbW/X7Hhz+sxcKkcua0q&#xA;OorXthpbbkvbONVeSeNEYBlZnUAg0AIJPvgpbba7tUbi00atTlQsAaVpXr4jFNuW9s25cZ424fbo&#xA;6mlKVrv740i1WoxSlHmH/pXf8xY/5My4qnkf2B8sVXYq7FXYq7FXYq7FWn+yflirz7VfP+k+X9Tu&#xA;dOuobmS5ncSxNAkbKA6hF+26b1TJxgS4Op18MMuGQN10/tQ5/NrSGLKlrfcoqpJ+5hJ5r1/3ePwy&#xA;XhFx/wCWMXdL7P1rT+cvlyI8ZrS+5HcfuohtWn+/jj4RX+WMXdL7P1tf8rn8ryfu1tb6r/CKxw0q&#xA;dv8AfuDwikdsYu6X2frZrHPYCOLjN8AVfTYyMaitASSfi36k5Vwuz2RHBHFQSQ1DUMaeO1DhZNog&#xA;XpX6ST+s4quxV2KuxVokAEk0A3JxVZ9Ygqw5gFdm9q1/pirlubdm4rKhYmlAwJritrfrtoULiVWU&#xA;AMSprseh27b4REk0gyAFpXrTrJc2HAowS5ALK1WDelICCtKfs+OJBHNIIPI7slj+wPlgVdirsVdi&#xA;rsVdirsVcRUUxViXmHyHp2r3P1iaJGlpTmVBNB2qRhBIa54YSNyiD7wlH/Kp9K/30n/Aj+mPEe9h&#xA;+VxfzY/IO/5VPpX++k/4Ef0x4j3r+VxfzY/IOH5UaWCCI0BHQ0H9MeI96/lcX82PyCa/4T1T/q6X&#xA;f/SRJ/XA3u/wnqn/AFdLv/pIk/rirv8ACeqf9XS7/wCkiT+uKu/wnqn/AFdLv/pIk/rirv8ACeqf&#xA;9XS7/wCkiT+uKu/wnqn/AFdLv/pIk/rirv8ACeqf9XS7/wCkiT+uKu/wnqn/AFdLv/pIk/rirv8A&#xA;Ceqf9XS7/wCkiT+uKu/wnqn/AFdLv/pIk/riqN07y5cwyK1zdzXIU8lEsjOAelRyrirIgKADFXYq&#xA;7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYqlk/mjy&#xA;zbzPBcavZQzxsVkikuIldWHUFSwIOHhLUc8AaMh81P8Axh5S/wCr3Yf9JUP/ADVjwnuR+Yx/zo/M&#xA;O/xj5R/6vmn/APSVD/zVjwnuX8xj/nR+Yd/jHyj/ANXzT/8ApKh/5qx4T3L+Yx/zo/MO/wAY+Uf+&#xA;r3p//SVD/wA1Y8J7l/MY/wCdH5h3+MPKP/V70/8A6Sof+aseE9y/mMf86PzDv8YeUf8Aq96f/wBJ&#xA;UP8AzVh4T3L+Yx/zo/MO/wAYeUf+r3p//SVD/wA1Y8J7l/MY/wCdH5h3+MPKP/V70/8A6Sof+ase&#xA;E9y/mMf86PzDv8YeUf8Aq92H/SVD/wA1Y8J7l/MY/wCdH5h3+MPKX/V7sP8ApKh/5qx4T3L+Yx/z&#xA;o/MO/wAYeUv+r3Yf9JUP/NWPCe5fzGP+dH5h3+MPKX/V7sP+kqH/AJqx4T3L+Yx/zo/MO/xh5S/6&#xA;vdh/0lQ/81Y8J7l/MY/50fmHf4w8pf8AV7sP+kqH/mrHhPcv5jH/ADo/MO/xh5S/6vdh/wBJUP8A&#xA;zVjwnuX8xj/nR+Yd/jDyl/1e7D/pKh/5qx4T3L+Yx/zo/MKlv5n8tXMyQW+rWU08h4xxR3ETOxPZ&#xA;VDEk4OEpjngTQkL96Z4G12KuxV2KuxV4rq+sz6PqWoQy2sTSnVLy8iM11NCSwJKNGgQoGWMg8lat&#xA;DvTMiO4dBnEozPp/iJ5pTo2seZrixK2Gmx36Rysz3UUjuRLRdm9HjGGXijD4a/CtdskacWEctbRv&#xA;8e9drdn5o1j1ZLny4FupQg+sr6xkqhpyLPzZqqOO5p7YAQOqMuHNPcwN/jzSePyXrdFFxavbu7hU&#xA;DJK1e7U4qSSFBagHbDxBpjosp5ghB3GgX0MavGqXDMWBijW4DKASKt6kKLv12Jw2xlpZAc1D9Fap&#xA;/wAsTf8AD/8ANOFh+Xn+K/W3+itT/wCWJv8Ah/8AmnG1/Lz/ABX62/0Vqf8AyxN/w/8AzTja+BP8&#xA;V+tFadZ3VtcGSfSjcpwZQjFxRmFA26MCV9wRgLKGGQO4v4j9aYzzyScfT8vxwgB68VBJ5FuP2oW+&#xA;yCPnTFsMSf4fuVkvUErs3liFo2KFI/iHHj9oV9Kp5Y0yrf6B8wlF5Y3k83qRaaYQQAyDnQkd9o1A&#xA;+gYWieGROwr5frUf0TqP/LE33P8A804sPAn+K/WuTSL8uoa0ZVJAZuMhoPGnHFfy8/xX60WfLV0p&#xA;HqGG3jPAmW59aJAjgkOSYzt8LU7mm1cFt40GQrP8OarJetZ2dqt7OiCR0gLllBAJqjIrjjyAJpTG&#xA;0HQ5boAlMdO8r+aLScTSeWnugP8AdUySlDtTcBQfuOAyHeyx6PNE2YE/j3p3oumanHrmmyXeiR6d&#xA;I9/A0HGKROIWVWYKSBUcOX2iemRkRXNzdLgmMgJhW723Md6J2KuxV2KuxV51q72w1q9DyoGAkYq0&#xA;4Qj98BXidQt6fP0l/wBbxsA2/H6mqXP8frZP5ft7OWykbhHLSaQcqrJ0PSvrXX3ch/qjIyZxTP6l&#xA;Z/74j/4Bf6ZFkxbzFBbLrtqiERExmsauEDCjf7rE6cv+RLfRkxya5CzSBXyk8Vsltbancww/F60Q&#xA;eT03DA7cFdQBuB32H04eNxBooAULr3n9aLsvL0NsoVrieRQPhUTTKA3HhyAD7Nw+GoxMyyjo4Dv+&#xA;Z/Whv8B+Uq/8c9f+Dl/5qx8Qtf8AJuD+b9p/W4eQ/KW/+49dv8uX/mrHxCv8m4P5v2n9bf8AgTyn&#xA;/wBW9f8Ag5P+asfEK/ybg/m/af1u/wACeU/+rev/AAcn/NWPiFH8m4P5v2n9bv8AAvlT/q3r/wAH&#xA;J/zVj4hX+TcH837T+t3+BvKlK/o9f+Dk/wCasfEK/wAm4P5v2n9bf+BvKv8AywL/AMHJ/wA1Y+IV&#xA;/kzB/N+0/rXReTPLMUgeOxCuv2WDyVFdv5sfEKR2dgG4j9p/WgdWS+LnTLBEgKcfqfxXTvwSqu4i&#xA;tXifiBNSoP7O9fhx4gOZ3beHIPTCPpFb9Pxz69Fiap54slCR2P1qESy/AtjctJwY8lPqTy+JP6uK&#xA;gYOKKDPOP4b+I/WpXPmXzldiSKDRmNsSFcrbmVgKkuhaKVOL8WXetVIrTegmIjvcaWty2R4Z2+P3&#xA;IrR7nUzqFmJ9JurUtPEJZZRIsZrIKUUsyilSd+vzxIFc1wZZcY9Eh77ekZS7Z2KuxV2KuxV5/qd9&#xA;6esXsf1r0+AkPp/WfTp++G/D9I23Hr19Jf8AWPewDb8fqapHf8frZR5fl9Wykb1PVpNIOXP1Oh6V&#xA;9a6+7kP9UZCTOKZ4GTFvMVwqa5bQmWhkiJEXqha0J/3X9ZjLf8iH+jqJjkwkd0YzKoqxAHvkSUiJ&#xA;PJaZYunNfvHjg4gnw5dxb9WOv2x94x4gnw5dxcroxNGB+RxBDExI5ht3RFLOwVR1YmgGFisFzbtL&#xA;6KzR+u2yoXH2j0rSpw0qjz8y+oqrokbKR8Uj3ix0NT+yqSmlP8++RB8j9n622WOh9QPz/wCJTWK2&#xA;rEpmtnSUqPURHVlDEbgMSpI96DCwpB3KXcUicokjheUIGJZmCmtBReW561Ow/HAb6KDEfVflXf5+&#xA;Tfc4UJerW1zqRhlk5LEWUwmN3VnYBqbmSIsoIO8XL4tiN6xnj4qbMOsjjJj/ABbfjv8At94O1L3S&#xA;6BaRtJdNBbxowR3liiRQxAIUloBvQjI+B5fd+psl2kI85V8Zf8UlNhrPlKRZjcX9pyWTghkMRqiK&#xA;qgr6iSnjt2oPAUy8RIADqJ5sE5ykZR3N9P02i4b7y1Je2YsLm2mmFxF/cehUVcKK8I423J7YkGk4&#xA;5YeIcMo35cP6AzXK3YuxV2KuxV2KoOz/ALp/+M03/J1sVV8VdiqE1b/jny/7H/iQxQUi1K0NzEEB&#xA;UMKMrOCRUOp2KhypKg78TgkSGeKjsfxz9yWaTot9ZEyhtNiugQI54rOfZVQogAqpHHl/N9nbbrjG&#xA;Xff4+DPJAH6eH5Af74p36lzJYTW97cJNJKjJzjjmRKMnE1QiQnev7XTb3w8Qa+A94+YS63itpr9m&#xA;t5/UiEZV5IBxVTzJ4FqKQx5b0HbtkRvLi8qbMhlGHhkVvxX9iKm0nT504XEPrr1AmLSU+XMtlluN&#xA;SJWONE4KoVAKBQABT5YFQPrQ3cksFmFpExjubgKPgYdUWooX/AfhhpFomO0toofTSNQqg9RUnxJJ&#xA;3JPc4EqgiiBBCKCOhoMUr+5xVKtWtNOeCaWeOH1PTcl3Kq2wbepubXp41H+t4SiS1zxxO5ARmi6f&#xA;pkul20htIZy0afveCy1+Eft1u6/8jW+eJJtRhhX0j5I79F6X/wBW+H/kQP8Aqlgsp8CH80fJC3dj&#xA;YRXemtFaRQubxAGWMIfssaV4xV6f5Xy/aBBLGWKAlGgBv+g/jr+lk2Qch2KuxV2KuxVB2f8AdP8A&#xA;8Zpv+TrYqr4q7FUJq3/HPl/2P/EhigpdTCxaI2xV1N8VQGq6bZXMEjyxv6qiqSwEpOCOgRxQ9e3T&#xA;IyxCezfh1M8Rsb+R3HyQcWrXcISKO0nvE40Ehltg53pvyljNab/Z/HMiOONVe7Tk4ySeGkxdp54U&#xA;3+r8wDIvMeoB3Sq8lB8SCfbxw+EO9juopew2xSBLV44zJ6alB8NTUltu3Xc5GUK82UI3e4FDr+jz&#xA;TAj4T9OVIdTFXU3OKsa8xWFvbSw6h6E1w1xK6SQw2sF27FUHGgldCqqse+zD5b1sgejg6jBjvild&#xA;nyv9Hk3LpHlS/jhS7hudNe+kVYraSCO3k57Io5wwsF5bGnOm+4w8RaJ6bTmgbHEe6v8Aeov/AJVT&#xA;5f8A5rn/AKSD/wA0YPFLZ/JGH+l83D8vNP0+SO6sp5opEkjHxyeoal1CkGicaHfHxCUx7LhA8USb&#xA;ZFpNxdWunWcE0gu5mIWSd5kLVkDuOrNyIoFG+/XIFy8BIiATfmm8bM0asylGIBZCQSpI6VG22Rch&#xA;dirsVdiqDs/7p/8AjNN/ydbFVfFXYqhNW/458v8Asf8AiQxQUuwsXHp92Ku74q1QGoPTCDStekvi&#xA;3/BN/XJ+LJFO9JfFv+Cb+uPiyWlr20L8ea8wpDKGJIqNwaE4nJJBiDzXn7J+nK2TeKu7nFWL33mK&#xA;8h1WbTzdwwQLMQv1h4YUH7uJqmSSGem7t+yfDLRHa3U6jUyGUwsAeddw7wWJ+ZAlpp0yxajHMI3E&#xA;SW0epm4BjkVJGpEsMHJSx3ao37bVycXWaj0xIEr/AM+/PlQS/SvzA8zaXYxWNjcpDaw8vTj9NGpy&#xA;Yud2DN9pj3wmALTi7QzY48MTQHkGR+V/PvmTVNYtbS9u1eF5oAUCRqTWZB2WuRlAAOZpO0c08gjI&#xA;7e4fqerCzjT0Qbl625UipjBPBGWjUUdVY1yi3oxCuqLVlZQykMrCoI3BBwM28VdirsVYHqvnHV9L&#xA;uZbWHTZ7tjczpGILZ5lHxsyGSRZBxDcl3K0691IywRB6uDl1GSJoRtB2XnX8wbu3WeLy4iI9aCZ/&#xA;QfY03jlZHH0jDwx72oanUn/Jj5oj/FP5i/8AUvQf8j4/+qmPDHvX8xqf9TH+mCnd+avN31YJf6TH&#xA;biaQRqEcSE0Bc7q7BfhQ/a2+mmPDHvSNRn/igB8Url/MaSMyxfo64+sxEj0zEoX4SitUmXkKNJ/L&#xA;929DwDvYHV5P5ila+ffMl3EZYNERo1pyYzBaVVH35U/ZkXHgHegarOf4B81WXzn5riCs+hKAzIgp&#xA;MrbyMVXpXaqGp6DqaDBwjvT+Y1H+pj/TOk86eaIpTG+ixhwR0uEIJKkgKQaHZe2A8I6s45dTK6xj&#xA;YX9QXDzl5pKxMNEjpMaJ/pCVr/lCvw/7KmHhj3sPzOo/mD/TBuPzb5rmknjXSEiNtQSvy9YfEoK8&#xA;ArL6n2hUqSB88eGPevj6g/wAfG/ub/xV5klEMdraepdTUKrLZXEEI+HmweV5KLRSv2gKmo6jd4Yq&#xA;cup6AX7j+tV/Sf5hUobCx/5Gf9fMaj3o49Z/Nh+PiuXU/P8AyHKwseNd6Sb0/wCRmNRXj1n82H4+&#xA;KldebfMNlOI7jTI2Wqh5In5FQx/kVnJ232+WNR72Yy6kc4A/FTmm+sSTXcxa0csZOcE8cb/CiDkp&#xA;aQcTsBU7bYDIjk5GLTxnZyDhl5S/amEOgaBqd9DHqclxeuS4jSW9glWiyBaEeqZduVBx8d/ipiJS&#xA;ARk0OCR5E++X7U8/5Vv5K/6ti/8AIyX/AJrweJJh/Jmn/m/af1pRo/lvQbXVLKW0ijV/Wq4Esbmq&#xA;OxUUWRj8LKOlaU3PfIzySsByNN2dgjGUhH1Cq59/y+bJdSt+b3lUVgwkAJghelbWhB5mrV9+v2em&#xA;ENqb2YpaQCnGkajiAFA2G1FJUfQciyVcVdirsVYNcaRqUvnCHULbUhbzIs6RQNbPJCyCSWolZZ4+&#xA;TcnYjYdvCuWiY4apqMTxXaq7anc2scovESNLtmCfUnV+SKAgb/SRtXcn9r2yOzLdMLXT9ZN3dM1/&#xA;Aebj1B9VdRTkpAWtw3ZWFad/Ygiwmii7u1uDon1a7mjklJSN5kiKJQyAA+mzyduvxb4OqejCbO98&#xA;sWGqSQ8TNMjmMyO+kp+89SjOBHLFICxAqCK7DauWEEj+1qBAP9jNHhsUKh5gpdgiVDbsegytttin&#xA;nGXTL2xtbe3uUlgumLLdxMJFooZDQBvioW7bYaaspsMSGmhJhcuz/vD+7iBBbiylSTuAKGL8cT0c&#xA;aMdj7v0qq6YoCTOZUDH14h8J5Dj6NPt7dCfowsOFM9CsIoJLu3uLdpzb20ivDIiyqWjC/sAyV3G2&#xA;xxbMUfUVSDVfL0epL9UvOLRyxosUVpH8HpgxijraqyD4hxO422alaTo032L/AB+pnOj3yXml21xH&#xA;cy3IdBymoKlxs/IAJRgwII4ih7DKiN26JsI3kf5pfu/twJYVMpmmne5ldpPWYAybtx5nj9mm3H/M&#xA;dMd+rGBiR6Sfj+zp3K4tJorSK6sy7TCSQI6rMxjKR8gyiOC56nb4hT5nYmrZcdCt/n+wsg01tTkj&#xA;Wa4uZuSyyoYSiKrKGqp/ewW79BTY09z1wsUz9d/5f+If814KZJS9sYLmwZZZpB9YC8XZSo5cyTSM&#xA;HxoAaKPuBBjZvuUZDEcI/i/tTGXT3uHu6n0g5ZFZo4X5K0IWu6moBb9rwp0w2ikfFH6cSR1rwULW&#xA;gFaCnQAAfRgSuxV2KuxVLLaxsnYzvbxtOk8zLKyKXB5ulQxFfskj5YbRS4aPpAiWIWNuIkKlIxEn&#xA;EFDVaClPhI2xsrQVorKziuJrmKCOO4uOPrzKiq8nEUXmwFWoOlcFrSzUDS2rWn7yLf8A56Lil5vP&#xA;qZGuTp+kSKTsvH63QD97SnD9LLT5emP9X9nLq2/H6mi9/wAfreiGRugmWpIH2f7Mpb2H6vcNcy6V&#xA;M17BeK4krcW60gehI+FecnSlO/zHTJlr5la6RerH8UfX+Qfyt7ZWejbGAo7dP0rgkfGP4o9v8geB&#xA;9sLDgHcj9ItILq6mgkb4Jo3R/THBqMoB+IAHvhteEJnd+UtNunDSz3YA/ZW6mA+0rbfFVf7sfZIw&#xA;iSmITC00yC1gWCKSUotSDJI0jfESxqzksevc4CUgKv1Zf53+/AliWp2sVleTQxS0QuJKOATVzyO9&#xA;PfCSwhARFBMNG0XSr63M93AlzIrsoLglStBsV+yR8xgZ9KTiPSdKjlWWOygSValZFiQMCxDGhAru&#xA;wrhsooIvAlLLzTo0ewkg4wx2kwpGqDf1XCn4u32iT440CbK8UhsDUTzHenGKuxV2KuxV2Ksduta1&#xA;CwleGPRby9T1ZSZIBH0L8gQHZNvjPft8slTXKZHS1N/NGqqnJfLWpO3w1RfqwI5Akj4plB496Hvt&#xA;XejXmjxD/NP2frX23mXUJrpIH8v6jbq6F/XlWEotG40bhI7V70p0wUkTJPIo25uZpYwgt5V+NDyK&#xA;OacXDdOPtizthstj5kOrSyrb35gMxKsPrHDj6lagfpJfhp/xWP8AV7ZZYr8fqa6N/j9bNS8tOjf8&#xA;iZP+aMqbWMazZ6xJdac0kbXMsYf1pobWVI9+lFIcr/wW/wCqTDe1jWup+ohFtLQHc+hJ4N/ke+QI&#xA;bYnYrhbalRP9Hl26/uJPD/UwsUdo5ubW8aW5gnWOhFVt5iakDsqE4qnn6Wtf993P/SLc/wDVPFWv&#xA;0ta/77uf+kW5/wCqeKu/S1r/AL7uf+kW5/6p4qkGrrdXV68tvBOYm4ULW8wO1AdmSuKphoz3lvaF&#xA;HhkBLlt4XHYDwXwwoR/1y4/30/8AyKfGld9cuP8AfT/8inxpULcXepyXltAlozWzPG0s3Fl48ZA3&#xA;f/V/HtTc0GBlLiArZPMi2OxV2KuxV2KuxV2KpbqUUlxM1sDdRpLECbi3cpxKPyoDTZmpQ+2I52st&#xA;xSGR5UvIkaO84XHrXDzvIRFCSvH0222Xaqjsd8LGlv1jjLCDPIHSCzdovXUjcy7liAG5caMQfip7&#xA;YWIJv4BFWrCa7cCd6spbgJQwADqdlH3YGa1Sx1CJVkdnKXlAZVPSeL9kdePQfyjY7nIH6h+O5tH0&#xA;H3j9KOSKcqvKQqQ1SOtRtkmtKxI5vbhRedDIeHKXYAnbpTb2wuNKEt9/vWzafqlw6tb3hVUNHHqy&#xA;r1AYdBvscVxwlXP709wOStkr6bU60NKGh+/FUt9RbmJXt7gOElg5MLig+FxUVTnUsNuP7XTJMIzE&#xA;uRtoSNa25bknqp6rmI3TyDgjBORaamyoKsDQBtq98C0mFu8zoTKnA1+HputOtAWp9+Bmq4qkldIG&#xA;tSQ2Ulmmo+sk2pxyAtMyLC3FkHJaOOS/FuAtcnRq+jXQvarRf1q9TTojNLbLqMhEdfjEJk5UZVBP&#xA;P5ZFlvXmqpd8Hn9eeELCzMQAQViAFORJ6g9TilVS7t3SN0kVkl/u2XcHemxwK62md+ayMhkRiGEd&#xA;aAdq174qF7TRLIsbMA714r3NMUtQ3VvPy9GRZOBo3E1ocVVMVdirFfN1+dPv9LRNKl1CO9lljnlR&#xA;pf3IkCRtUJUfEjHrQCmSi4mecoyiBHiBO/lyRraJ9X9SPTyqgtPM0Rlm9QtJAI1ClndVPIVqVIHZ&#xA;amuNt3DXJZpOlzKok1D9/GtrZxhHuWuSs0SsJWcMI4Q3xD40Uc+4GJWG3PuHVsBrb1J4Y3hYsyRS&#xA;LFFVh9YAAA9TdSlNyBt8VQdsEjXmzjHi2BEfMujs719Vt2geS1WFHkmZraPg4lnLSxh+VVaTgpNA&#xA;dgD3yIIJ5NhhKI+oH8ftpP8ACxQf6Ns1llmWEmVw3I8m35/a2rQVxYkL0DxSokcFI5Pilfl9kqoU&#xA;dfZRhUCkTgZLZQhicOFKFSGD7rSm9fbFBFpTAhEDPGLb1RJF8TCQgKp/yviqATx7DJEtfDwjalxg&#xA;DuecViyi4kgHwEkW8oBkTp9t3+0Psn54os+XP7P1omGa7LW4LW/BjIJFTlUqv2PT+j7X4YGQkduS&#xA;NwNjHrzRoYdU1PWoIrMaiLdfQnuJZQqngVZp1qUReKABlFaVw5Jz4Kj9vJjGI4rKKaCV72a3lS1N&#xA;rbJDPagyu1wszM/N5QQAEPGiGvUN9EQSzPDW3NLrnUo7W6vBffVU9eZbaEtKqGQNBCxWkskQLGSQ&#xA;0417d+sODPO/DjxcPPa6Fddx5rqo8MIGHOUTd/1iNt+4NW2oo93a6fZRxE25PKGJ0f01I5AyCOZ2&#xA;Va03IzGJ1IlGxUSd9v8AjzhRyZDMDar393zQthe+bpZpJEFukc9xT1EglkCxi8khNTyAZvSSrdOP&#xA;XpmVAyO5OzuNQMUPTGMrrnfeO6uh89/Jk8FjP6/rXkqXEiH/AEdljMZQEUIPxNyrlsiOjgxB6q1v&#xA;Z21uzmGMIZDV6V3ORZK2KuqPHFFuJxW0qh0LTV1q41U2ca3jqI1ugzFmQj4gUPwjf78lZqmiOGPi&#xA;GdC+9RXy35esrO8thaxQabdh5r6sjKpbuSSfhFK1oRjxFj+VxgGNemXNZeeWvKN/FZ6ddW8EyaZK&#xA;v1S3MhrHIE9RRQNWvD4qHt7Y8R5sxghQjW0eSaW94hs45pnhjqisSjho6MaLxbaoPbBTZAmt1S2n&#xA;Mvq1KH05GQem3P7P83g3iMSmJPVcYQTISzfvBQiuw+WINMl6KFUKKkAU3xJtW8CtMaKT0260r+GK&#xA;pHf6tHb2HrRGX++jT9xbGZuvLdAB8J40J7fPJU05cgiL3+AtGA3IdmNwxX6wzhfqzbRIlDHWm+4J&#xA;D9+gwM/xyX2sN4y20zXIdKvJIpg9NmWTdFoTyThXvue+KgdUdgZoWWwimM4njhliuKJKjxBucQUj&#xA;g9SeXxMSKjvSmNq1Bp0QVpLhIZL2aNY7q6ij9JpAlePdmoKmg5GmKoUaDZzSTfWoQ8YnSW2HJtgk&#xA;UIFaEVo8Nd/DJ4ssoXR5/qr9bZlIlGI/mj/fE/pXyaZb21x9bs4H+szSRrPJGwJKVUMW9VqcaKOX&#xA;H4vDKc8pyAAJ2kOVcuvPp9vc4s8e9x52Pl8VTRbSa008QTACQSzPsaikkzuv4NhiKDmZ5iUrHl9y&#xA;OyTS7FXYq7FVOWOR2Qo/AKasKVqPDFVM21wYigu5A/EqJOMda1qGpwpWm3hixrzWRyymScF6hW+A&#xA;UpQb+3thSpm8kinujIxkjiKBYgFUjmQPtMVHfucaYylQtFtWWEGNzHyowYAE02PRgRuNsDK7VMUu&#xA;xV2KuxVpmVVLMQqqKkk0AA8cVAtJxK5soktgs85iiMUL3rB3MclX/eKH5caH4v2ujbYQQd2MvSeE&#xA;7S7uqaG2jJryk/aO0jj7ex7/AHeHbAml8aCONUUkhAFBYljQCm7NUk+5xUBdil2KuxV2KuxV2Kux&#xA;V2KuxV2KvOvP/wCd2geStdXR7+wu7mdoEuBJB6fDi5ZQPjdTX4MsjjJDCU6d5A/O7QPOuuto9hYX&#xA;dtOsD3Bkn9PhxQqpHwOxr8eMsZAWM7ei5WzdiqHu7wwFFVObPU7niKLT2PjhAQShjqsigs0I4jc0&#xA;ck0/4EY0tpjgS7FXYq0yqylWAZWFGU7gg9sUg0sS1tkZWSJFZa8SFAIrUmn3nEbIO5s81TFXYq7F&#xA;XYq7FXYq7FXYq7FXYq7FXYq+ZP8AnIzy9r+ofmBHPYaZd3cAsIVMsEEkqcg8lRyRSK75kYiKacg3&#xA;d/zjn5e1/T/zAknv9Mu7SA2EyiWeCSJOReOg5OoFdscpFLjG76bzHblrKSdsVS/U/haFm2Wjip6V&#xA;JX+mEIKBkkRkZVYMzAgAEEkkZJDIMgydirsVdirsVQztqVRwjhpXerv05jwX/ff/AA3thRutDavz&#xA;FUtxHUVoz1A9Q1/Z3/dU/wBl7Y7Lui8CXYq7FXYq7FXYq7FXYq7FXYqkXmfQdS1U231LV59K9Dn6&#xA;noV/ec+NOVGX7PE0+eSiacfUYDkqpGNdyho3l7V7CG9t7jXLi+e7hKwzSg1gYAjmtXbf469umJkD&#xA;0Y4dPKAIM5Svv6JfZ+TPMsF1DLJ5ru50jdXeJkNHCkEqf3nQ9MlxjuaY6KYIPiSZk7EGgyt2DRJK&#xA;iuKupTFXnOs+X3n1i8mH5iz6fzmdvqCzxqIan+7AMoI49OmTB8nByQHEf3lfFktxoOo3/l7TrSy8&#xA;wzJJAFL6pF8b3AClasVcdTv1wA0eTZPCZwAEyPMdVby55e1fSp5pL7Wp9USRQqRzKQEINeQq74yk&#xA;D0XT6eWMkmcpe9Psi5TsVSyNY7dJoHuZ3e6kd1d1lPH4lTiDT4RU9AR3K0GG2sQIB35tra/WpLK5&#xA;hu5ljszJG6HmvqlT6bcw3GvxIdyCKEkdmDbLh5b8kywMnYq7FXYq7FXYq7FXYq7FXYqoXDoGCt7U&#xA;oxU7mm1OuKqEV3ENQa0CNyA+2WJ7A98NbItdPfrHavcKgbgpbjXwUtT8MaW0FpeuDUJJFe3VPTaZ&#xA;QS3L+6kEfh3rXEhQUXfX6WkcZEfIOTQKaAU+jEC1Ks84V1XjUEqNzQ/ER2p74EsMg8u+RNb1zVFn&#xA;8tzpdwSyPcXlxGyRzvzIZomEh5cjuNhtk7IHNwIwxZJyBgbHUjmzHS7aztbCG1s4Tb2sA4RQmvwq&#xA;O25OQJc2MREUOSIZwrAUJr3GKbcJAXKcTt3ptil0qc43TkU5ArzXZhUUqPfFBFhwQcAhJYUoSTuf&#xA;nTFIWwwRwqyx1Ad2kILM3xOeTU5E0FT0G2KqmKuxV2KuxV2KuxV2KuxV2KuxVRl9Xk3BmX4VpRQR&#xA;Xlv1wsJWpvJP8e8lOTgcUWtAu1K1HXoe+LIlDLDdyoiNc3Gy2zuzxQ0b4iJVI47FwP3g/Zr8NMWM&#xA;Qe/uRghSN3MUapUA1VQN2JLdu+2LNSvXv1hQ2o5PU86gVp9NMRSCr1m9RetNqigp74EquKuxV2Ku&#xA;xV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KqE9haTuzyx8mdRGxqR8KtyA2P82G2EscTzQl5fWFq6&#xA;/WpoIkd3B5SEH7NDT/K3FR2riAklA/4m8n2OoxWBvoor6eO3gihJclkNTCBWo39TY+++GiiNDZOn&#xA;ikeFlIQMWrQV4lQ9QD8164FIJCi9nI0ASiE0kopJ4rzNQRt+z06Y2xMDTls5RNzLB/7ukhryHDrT&#xA;r9r542ogbRmBtdirsVdirsVdirsVdirsVdirsVdirsVdirsVf//Z</xmpGImg:image>\n               </rdf:li>\n            </rdf:Alt>\n         </xmp:Thumbnails>\n         <xmpMM:InstanceID>uuid:020fdfa5-481e-4c3f-976e-041aca6521ae</xmpMM:InstanceID>\n         <xmpMM:DocumentID>xmp.did:e5053664-bb38-f64e-b555-dbc4e0ba2bda</xmpMM:DocumentID>\n         <xmpMM:OriginalDocumentID>uuid:5D20892493BFDB11914A8590D31508C8</xmpMM:OriginalDocumentID>\n         <xmpMM:RenditionClass>proof:pdf</xmpMM:RenditionClass>\n         <xmpMM:DerivedFrom rdf:parseType=\"Resource\">\n            <stRef:instanceID>xmp.iid:f7d9020c-0cf0-a048-9942-3af088f5066a</stRef:instanceID>\n            <stRef:documentID>xmp.did:f7d9020c-0cf0-a048-9942-3af088f5066a</stRef:documentID>\n            <stRef:originalDocumentID>uuid:5D20892493BFDB11914A8590D31508C8</stRef:originalDocumentID>\n            <stRef:renditionClass>proof:pdf</stRef:renditionClass>\n         </xmpMM:DerivedFrom>\n         <xmpMM:History>\n            <rdf:Seq>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <stEvt:action>saved</stEvt:action>\n                  <stEvt:instanceID>xmp.iid:9879c611-6633-ed42-b920-163995c9085b</stEvt:instanceID>\n                  <stEvt:when>2015-09-08T10:48:21+06:00</stEvt:when>\n                  <stEvt:softwareAgent>Adobe Illustrator CC (Windows)</stEvt:softwareAgent>\n                  <stEvt:changed>/</stEvt:changed>\n               </rdf:li>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <stEvt:action>saved</stEvt:action>\n                  <stEvt:instanceID>xmp.iid:e5053664-bb38-f64e-b555-dbc4e0ba2bda</stEvt:instanceID>\n                  <stEvt:when>2023-02-27T22:55:37+02:00</stEvt:when>\n                  <stEvt:softwareAgent>Adobe Illustrator CC 23.1 (Windows)</stEvt:softwareAgent>\n                  <stEvt:changed>/</stEvt:changed>\n               </rdf:li>\n            </rdf:Seq>\n         </xmpMM:History>\n         <xmpMM:Manifest>\n            <rdf:Seq>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <stMfs:linkForm>EmbedByReference</stMfs:linkForm>\n                  <stMfs:reference rdf:parseType=\"Resource\">\n                     <stRef:filePath>C:\\work\\o2\\UI\\Cut\\UI_o2_sign.png</stRef:filePath>\n                  </stMfs:reference>\n               </rdf:li>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <stMfs:linkForm>EmbedByReference</stMfs:linkForm>\n                  <stMfs:reference rdf:parseType=\"Resource\">\n                     <stRef:filePath>C:\\work\\PetStory\\o2\\UI\\687474703a2f2f692e696d6775722e636f6d2f71316f373873582e706e67.png</stRef:filePath>\n                     <stRef:documentID>0</stRef:documentID>\n                     <stRef:instanceID>0</stRef:instanceID>\n                  </stMfs:reference>\n               </rdf:li>\n            </rdf:Seq>\n         </xmpMM:Manifest>\n         <xmpMM:Ingredients>\n            <rdf:Bag>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <stRef:filePath>C:\\work\\o2\\UI\\Cut\\UI_o2_sign.png</stRef:filePath>\n               </rdf:li>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <stRef:filePath>C:\\work\\PetStory\\o2\\UI\\687474703a2f2f692e696d6775722e636f6d2f71316f373873582e706e67.png</stRef:filePath>\n                  <stRef:documentID>0</stRef:documentID>\n                  <stRef:instanceID>0</stRef:instanceID>\n               </rdf:li>\n            </rdf:Bag>\n         </xmpMM:Ingredients>\n         <illustrator:StartupProfile>Print</illustrator:StartupProfile>\n         <illustrator:Type>Document</illustrator:Type>\n         <illustrator:CreatorSubTool>AIRobin</illustrator:CreatorSubTool>\n         <pdf:Producer>Adobe PDF library 17.00</pdf:Producer>\n         <xmpTPg:NPages>1</xmpTPg:NPages>\n         <xmpTPg:HasVisibleTransparency>True</xmpTPg:HasVisibleTransparency>\n         <xmpTPg:HasVisibleOverprint>False</xmpTPg:HasVisibleOverprint>\n         <xmpTPg:MaxPageSize rdf:parseType=\"Resource\">\n            <stDim:w>20.000000</stDim:w>\n            <stDim:h>20.000000</stDim:h>\n            <stDim:unit>Pixels</stDim:unit>\n         </xmpTPg:MaxPageSize>\n         <xmpTPg:Fonts>\n            <rdf:Bag>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <stFnt:fontName>ArialMT</stFnt:fontName>\n                  <stFnt:fontFamily>Arial</stFnt:fontFamily>\n                  <stFnt:fontFace>Regular</stFnt:fontFace>\n                  <stFnt:fontType>Open Type</stFnt:fontType>\n                  <stFnt:versionString>Version 7.01</stFnt:versionString>\n                  <stFnt:composite>False</stFnt:composite>\n                  <stFnt:fontFileName>arial.ttf</stFnt:fontFileName>\n               </rdf:li>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <stFnt:fontName>MyriadPro-Regular</stFnt:fontName>\n                  <stFnt:fontFamily>Myriad Pro</stFnt:fontFamily>\n                  <stFnt:fontFace>Regular</stFnt:fontFace>\n                  <stFnt:fontType>Open Type</stFnt:fontType>\n                  <stFnt:versionString>Version 2.106;PS 2.000;hotconv 1.0.70;makeotf.lib2.5.58329</stFnt:versionString>\n                  <stFnt:composite>False</stFnt:composite>\n                  <stFnt:fontFileName>MyriadPro-Regular.otf</stFnt:fontFileName>\n               </rdf:li>\n            </rdf:Bag>\n         </xmpTPg:Fonts>\n         <xmpTPg:PlateNames>\n            <rdf:Seq>\n               <rdf:li>Cyan</rdf:li>\n               <rdf:li>Magenta</rdf:li>\n               <rdf:li>Yellow</rdf:li>\n               <rdf:li>Black</rdf:li>\n            </rdf:Seq>\n         </xmpTPg:PlateNames>\n         <xmpTPg:SwatchGroups>\n            <rdf:Seq>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <xmpG:groupName>Default Swatch Group</xmpG:groupName>\n                  <xmpG:groupType>0</xmpG:groupType>\n                  <xmpG:Colorants>\n                     <rdf:Seq>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=147 G=165 B=166 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>147</xmpG:red>\n                           <xmpG:green>165</xmpG:green>\n                           <xmpG:blue>166</xmpG:blue>\n                        </rdf:li>\n                     </rdf:Seq>\n                  </xmpG:Colorants>\n               </rdf:li>\n               <rdf:li rdf:parseType=\"Resource\">\n                  <xmpG:groupName>Цветовая группа 1</xmpG:groupName>\n                  <xmpG:groupType>1</xmpG:groupType>\n                  <xmpG:Colorants>\n                     <rdf:Seq>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=251 G=251 B=251 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>251</xmpG:red>\n                           <xmpG:green>251</xmpG:green>\n                           <xmpG:blue>251</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=234 G=240 B=240 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>234</xmpG:red>\n                           <xmpG:green>240</xmpG:green>\n                           <xmpG:blue>240</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=247 G=247 B=247 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>247</xmpG:red>\n                           <xmpG:green>247</xmpG:green>\n                           <xmpG:blue>247</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=225 G=232 B=232 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>225</xmpG:red>\n                           <xmpG:green>232</xmpG:green>\n                           <xmpG:blue>232</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=212 G=216 B=224 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>212</xmpG:red>\n                           <xmpG:green>216</xmpG:green>\n                           <xmpG:blue>224</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=190 G=196 B=196 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>190</xmpG:red>\n                           <xmpG:green>196</xmpG:green>\n                           <xmpG:blue>196</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=126 G=149 B=160 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>126</xmpG:red>\n                           <xmpG:green>149</xmpG:green>\n                           <xmpG:blue>160</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=96 G=125 B=139 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>96</xmpG:red>\n                           <xmpG:green>125</xmpG:green>\n                           <xmpG:blue>139</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=29 G=105 B=105 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>29</xmpG:red>\n                           <xmpG:green>105</xmpG:green>\n                           <xmpG:blue>105</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=22 G=79 B=79 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>22</xmpG:red>\n                           <xmpG:green>79</xmpG:green>\n                           <xmpG:blue>79</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=44 G=62 B=80 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>44</xmpG:red>\n                           <xmpG:green>62</xmpG:green>\n                           <xmpG:blue>80</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=0 G=150 B=136 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>0</xmpG:red>\n                           <xmpG:green>150</xmpG:green>\n                           <xmpG:blue>136</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=0 G=156 B=141 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>0</xmpG:red>\n                           <xmpG:green>156</xmpG:green>\n                           <xmpG:blue>141</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=0 G=171 B=154 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>0</xmpG:red>\n                           <xmpG:green>171</xmpG:green>\n                           <xmpG:blue>154</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=190 G=249 B=243 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>190</xmpG:red>\n                           <xmpG:green>249</xmpG:green>\n                           <xmpG:blue>243</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=112 G=204 B=192 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>112</xmpG:red>\n                           <xmpG:green>204</xmpG:green>\n                           <xmpG:blue>192</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=235 G=255 B=253 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>235</xmpG:red>\n                           <xmpG:green>255</xmpG:green>\n                           <xmpG:blue>253</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=255 G=255 B=255 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>255</xmpG:red>\n                           <xmpG:green>255</xmpG:green>\n                           <xmpG:blue>255</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=159 G=190 B=254 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>159</xmpG:red>\n                           <xmpG:green>190</xmpG:green>\n                           <xmpG:blue>254</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=248 G=93 B=72 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>248</xmpG:red>\n                           <xmpG:green>93</xmpG:green>\n                           <xmpG:blue>72</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=226 G=198 B=83 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>226</xmpG:red>\n                           <xmpG:green>198</xmpG:green>\n                           <xmpG:blue>83</xmpG:blue>\n                        </rdf:li>\n                        <rdf:li rdf:parseType=\"Resource\">\n                           <xmpG:swatchName>R=211 G=87 B=40 1</xmpG:swatchName>\n                           <xmpG:mode>RGB</xmpG:mode>\n                           <xmpG:type>PROCESS</xmpG:type>\n                           <xmpG:red>211</xmpG:red>\n                           <xmpG:green>87</xmpG:green>\n                           <xmpG:blue>40</xmpG:blue>\n                        </rdf:li>\n                     </rdf:Seq>\n                  </xmpG:Colorants>\n               </rdf:li>\n            </rdf:Seq>\n         </xmpTPg:SwatchGroups>\n      </rdf:Description>\n   </rdf:RDF>\n</x:xmpmeta>\n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                                                                                                    \n                           \n<?xpacket end=\"w\"?>\r\nendstream\rendobj\r3 0 obj\r<</Count 320/Kids[52 0 R 53 0 R]/Type/Pages>>\rendobj\r52 0 obj\r<</Count 125/Kids[54 0 R 55 0 R 56 0 R 57 0 R 58 0 R]/Parent 3 0 R/Type/Pages>>\rendobj\r53 0 obj\r<</Count 195/Kids[59 0 R 60 0 R 61 0 R 62 0 R 63 0 R 64 0 R 65 0 R]/Parent 3 0 R/Type/Pages>>\rendobj\r59 0 obj\r<</Count 25/Kids[66 0 R 67 0 R 68 0 R 69 0 R 70 0 R]/Parent 53 0 R/Type/Pages>>\rendobj\r60 0 obj\r<</Count 25/Kids[71 0 R 72 0 R 73 0 R 74 0 R 75 0 R]/Parent 53 0 R/Type/Pages>>\rendobj\r61 0 obj\r<</Count 25/Kids[76 0 R 77 0 R 78 0 R 79 0 R 80 0 R]/Parent 53 0 R/Type/Pages>>\rendobj\r62 0 obj\r<</Count 25/Kids[81 0 R 82 0 R 83 0 R 84 0 R 85 0 R]/Parent 53 0 R/Type/Pages>>\rendobj\r63 0 obj\r<</Count 25/Kids[86 0 R 87 0 R 88 0 R 89 0 R 90 0 R]/Parent 53 0 R/Type/Pages>>\rendobj\r64 0 obj\r<</Count 25/Kids[91 0 R 92 0 R 93 0 R 94 0 R 95 0 R]/Parent 53 0 R/Type/Pages>>\rendobj\r65 0 obj\r<</Count 45/Kids[96 0 R 97 0 R 98 0 R 99 0 R 100 0 R 101 0 R 102 0 R 103 0 R]/Parent 53 0 R/Type/Pages>>\rendobj\r96 0 obj\r<</Count 5/Kids[104 0 R 105 0 R 106 0 R 107 0 R 108 0 R]/Parent 65 0 R/Type/Pages>>\rendobj\r97 0 obj\r<</Count 5/Kids[109 0 R 110 0 R 111 0 R 112 0 R 113 0 R]/Parent 65 0 R/Type/Pages>>\rendobj\r98 0 obj\r<</Count 5/Kids[114 0 R 115 0 R 116 0 R 117 0 R 118 0 R]/Parent 65 0 R/Type/Pages>>\rendobj\r99 0 obj\r<</Count 5/Kids[119 0 R 120 0 R 121 0 R 122 0 R 123 0 R]/Parent 65 0 R/Type/Pages>>\rendobj\r100 0 obj\r<</Count 5/Kids[124 0 R 125 0 R 126 0 R 127 0 R 128 0 R]/Parent 65 0 R/Type/Pages>>\rendobj\r101 0 obj\r<</Count 5/Kids[129 0 R 130 0 R 131 0 R 132 0 R 133 0 R]/Parent 65 0 R/Type/Pages>>\rendobj\r102 0 obj\r<</Count 5/Kids[134 0 R 135 0 R 136 0 R 137 0 R 138 0 R]/Parent 65 0 R/Type/Pages>>\rendobj\r103 0 obj\r<</Count 10/Kids[139 0 R 140 0 R 141 0 R 142 0 R 143 0 R 144 0 R 145 0 R 146 0 R 147 0 R 148 0 R]/Parent 65 0 R/Type/Pages>>\rendobj\r139 0 obj\r<</ArtBox[6.0 9.0 33.0 34.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 149 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 150 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r140 0 obj\r<</ArtBox[4.5 7.5 34.5 35.5]/BleedBox[0.0 0.0 40.0 40.0]/Contents 152 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 153 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r141 0 obj\r<</ArtBox[0.0 0.0 40.0 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 154 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 155 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 156 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 157 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r142 0 obj\r<</ArtBox[0.0 0.0 20.0 20.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 158 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 159 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 160 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r143 0 obj\r<</ArtBox[0.0 0.0 32.5 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 161 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 162 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 156 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 163 0 R/Fm1 164 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r144 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 165 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 166 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r145 0 obj\r<</ArtBox[3.0 4.0 16.0 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 167 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 168 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r146 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 169 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 170 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r147 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 171 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 172 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r148 0 obj\r<</ArtBox[3.56229 4.20403 16.3644 15.796]/BleedBox[0.0 0.0 20.0 20.0]/Contents 173 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 174 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r173 0 obj\r<</Filter/FlateDecode/Length 198>>stream\r\nHD\n0\f\u0014yeIڵ)\u0003a܅\u000f0D\u0010'L/|}3*m~'?\u0007Z\u001ek,ۚq\u0011rd&`.</p\u00070xdk<5F\riz\u000b&C%(L!\u0006SL\u0001\u0011f}\u00044BŸ́K\u0006\u0016\u0013\u0016d1nzCps:\u001b\ng61\u001b!m\u0004\u0003Ig3-_\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000i=\r\nendstream\rendobj\r174 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r9 0 obj\r<</LastModified(D:20250609193757+05'00')/Private 10 0 R>>\rendobj\r10 0 obj\r<</AIMetaData 11 0 R/AIPrivateData1 12 0 R/AIPrivateData2 13 0 R/AIPrivateData3 14 0 R/AIPrivateData4 15 0 R/AIPrivateData5 16 0 R/AIPrivateData6 17 0 R/AIPrivateData7 18 0 R/AIPrivateData8 19 0 R/AIPrivateData9 20 0 R/AIPrivateData10 21 0 R/AIPrivateData11 22 0 R/AIPrivateData12 23 0 R/AIPrivateData13 24 0 R/AIPrivateData14 25 0 R/AIPrivateData15 26 0 R/AIPrivateData16 27 0 R/AIPrivateData17 28 0 R/AIPrivateData18 29 0 R/AIPrivateData19 30 0 R/AIPrivateData20 31 0 R/AIPrivateData21 32 0 R/AIPrivateData22 33 0 R/AIPrivateData23 34 0 R/ContainerVersion 11/CreatorVersion 29/NumBlock 23/RoundtripStreamType 1/RoundtripVersion 17>>\rendobj\r11 0 obj\r<</Length 1219>>stream\r\n%!PS-Adobe-3.0 \r\n%%Creator: Adobe Illustrator(R) 17.0\r\n%%AI8_CreatorVersion: 29.5.1\r\n%%For: ( ) ()\r\n%%Title: (UI4.ai)\r\n%%CreationDate: 6/9/2025 7:37 PM\r\n%%Canvassize: 16383\r\n%%BoundingBox: -693 -558 1061 1927\r\n%%HiResBoundingBox: -693 -557.999999985099 1061 1926.5\r\n%%DocumentProcessColors: Cyan Magenta Yellow Black\r\n%%DocumentFiles:C:\\work\\PetStory\\o2\\UI\\687474703a2f2f692e696d6775722e636f6d2f71316f373873582e706e67.png\r\n%AI5_FileFormat 13.0\r\n%AI12_BuildNumber: 141\r\n%AI3_ColorUsage: Color\r\n%AI7_ImageSettings: 0\r\n%%RGBProcessColor: 0 0 0 ([Registration])\r\n%AI3_Cropmarks: -500 120 -480 140\r\n%AI3_TemplateBox: 512.5 -384.5 512.5 -384.5\r\n%AI3_TileBox: -787.600006103516 -290.869995117188 -192.580047607422 550.989990234375\r\n%AI3_DocumentPreview: None\r\n%AI5_ArtSize: 14400 14400\r\n%AI5_RulerUnits: 6\r\n%AI9_ColorModel: 1\r\n%AI5_ArtFlags: 0 0 0 1 0 0 1 0 0\r\n%AI5_TargetResolution: 800\r\n%AI5_NumLayers: 2\r\n%AI9_OpenToView: -617 313 4 1765 1300 90 0 0 438 87 0 0 0 1 1 0 1 1 0 0\r\n%AI5_OpenViewLayers: 77\r\n%%PageOrigin:207 -781\r\n%AI7_GridSettings: 5 5 5 5 0 0 0.519999980926514 0.519999980926514 0.519999980926514 0.759999990463257 0.759999990463257 0.759999990463257\r\n%AI9_Flatten: 1\r\n%AI12_CMSettings: 00.MS\r\n%%EndComments\r\n\r\nendstream\rendobj\r12 0 obj\r<</Length 13307>>stream\r\n%%BoundingBox: -693 -558 1061 1927\r\n%%HiResBoundingBox: -693 -557.999999985099 1061 1926.5\r\n%AI7_Thumbnail: 92 128 8\r\n%%BeginData: 13148 Hex Bytes\r\n%0000330000660000990000CC0033000033330033660033990033CC0033FF\r\n%0066000066330066660066990066CC0066FF009900009933009966009999\r\n%0099CC0099FF00CC0000CC3300CC6600CC9900CCCC00CCFF00FF3300FF66\r\n%00FF9900FFCC3300003300333300663300993300CC3300FF333300333333\r\n%3333663333993333CC3333FF3366003366333366663366993366CC3366FF\r\n%3399003399333399663399993399CC3399FF33CC0033CC3333CC6633CC99\r\n%33CCCC33CCFF33FF0033FF3333FF6633FF9933FFCC33FFFF660000660033\r\n%6600666600996600CC6600FF6633006633336633666633996633CC6633FF\r\n%6666006666336666666666996666CC6666FF669900669933669966669999\r\n%6699CC6699FF66CC0066CC3366CC6666CC9966CCCC66CCFF66FF0066FF33\r\n%66FF6666FF9966FFCC66FFFF9900009900339900669900999900CC9900FF\r\n%9933009933339933669933999933CC9933FF996600996633996666996699\r\n%9966CC9966FF9999009999339999669999999999CC9999FF99CC0099CC33\r\n%99CC6699CC9999CCCC99CCFF99FF0099FF3399FF6699FF9999FFCC99FFFF\r\n%CC0000CC0033CC0066CC0099CC00CCCC00FFCC3300CC3333CC3366CC3399\r\n%CC33CCCC33FFCC6600CC6633CC6666CC6699CC66CCCC66FFCC9900CC9933\r\n%CC9966CC9999CC99CCCC99FFCCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF\r\n%CCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFFFF0033FF0066FF0099FF00CC\r\n%FF3300FF3333FF3366FF3399FF33CCFF33FFFF6600FF6633FF6666FF6699\r\n%FF66CCFF66FFFF9900FF9933FF9966FF9999FF99CCFF99FFFFCC00FFCC33\r\n%FFCC66FFCC99FFCCCCFFCCFFFFFF33FFFF66FFFF99FFFFCC110000001100\r\n%000011111111220000002200000022222222440000004400000044444444\r\n%550000005500000055555555770000007700000077777777880000008800\r\n%000088888888AA000000AA000000AAAAAAAABB000000BB000000BBBBBBBB\r\n%DD000000DD000000DDDDDDDDEE000000EE000000EEEEEEEE0000000000FF\r\n%00FF0000FFFFFF0000FF00FFFFFF00FFFFFF\r\n%524C45FD62FFCAFFA8FFFFFFCAFFFFFFCAFFFFFFA8FFCAFFA8FFCAFFA8FF\r\n%CAFFA8FFCAFFA8FFCAFFA8FFCAFFA8FFCAFFCAFFFFFFCAFFFFFFCAFFFFFF\r\n%CAFFCBFD22FFA87D7D837DA884847DA884847DA87D837D847D847D847D84\r\n%59847D8359847D847D847D847D847D847D847D8484A8848483A8848483A8\r\n%848483A8FD21FFCA590C3534350C340C340C340C340C341235353512350C\r\n%35123534353435123512350C3512350C3512350C3512350C350C350C350C\r\n%350C35121334FD22FF59353535343534350C3534350C352E593560FD0635\r\n%34FD05353435343535353435353534353535343535353435353534353535\r\n%1259A8FD20FFA8A87D84848483A8848484A8848484A8A8AFA8FFA8A9A8CB\r\n%A8A87DA8848484A884A87DA884A883A884A884A884A87DA884A884A884A8\r\n%FD057DFD22FFA8FD11FFCBFFFFFFCBFFFFFFCBFD1BFFA8CBA8A8A8FD20FF\r\n%A8A8FFFFA8FFA8FFA8FFA8FFA8FFA8FFA8FFFFFFA8FFCAFFA8FFCAFFA8FF\r\n%CAFFA8FFCAFFA8FFCAFFA8FFCAFFA8FFCAFFA8FFCAFFA8FFFD04A87DA8A8\r\n%FD20FFA8FD15FFCBFD1FFFA8FFFFA8A8FD20FFA8CAFFFFA8FFA8FFA8FFFF\r\n%FFA8FFFFFFA8FFFFCAA8FFCACBA8FFCACBA8CBCAFFA8FFCAFFCAFFFFFFCA\r\n%FFFFFFCAFFCAFFCAFFFFFFA8FFA8A8A8FFA8A8FD21FFA8FFA8FFFFFFA8FD\r\n%0DFFA9FD07FFCAFD05FFCBFFCBFD05FFCBFFCBFFFFFFCAFD05FFA8FFAFA8\r\n%A8FD20FFA8A8A8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFFFFFA8FFFFFF\r\n%A8FFFFFFA8FFFFFFA8FFCAFFA8FFAFFFA8FFA8FFA8FFFFFFA8FFA8FFA8FF\r\n%FFFFA8A8FD21FFA8FFA8FD11FFA8FFCAFFCBFFCAFD05FFCAFD05FFA8FD05\r\n%FFA8AFA9FFA8FD05FFA9FFFFFFA8FD20FFA8A8FD04FFA8FFA9FFA8FFFFFF\r\n%A8FFFFFFA8AFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8AFA8FF\r\n%FFFFA8A9A8AFA8FFFFFFA8A9A8FFA8A8FD21FFA8FFA8FFFFFFA8FD07FFA8\r\n%FFFFFFA8FFFFFFCAFFFFFFCAFFCAFFCAFFCAFFCAFFCAFFCAFFAFFFA8FFFF\r\n%FFA8FFAFFFA8FFFFFFA8FFFFA8A8FD20FFA8A8FFFFA8FFA9FFA8FFA8FFA8\r\n%FFA8FFA8FFFFFFAFFFFFFFAFFFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFF\r\n%FFA8FFFFFFA8FFFFFFA8FFA8A8A8FFA8A8A8FD20FFA8FFCAFFFFFFCFFD0B\r\n%FFAFFFFFFFCBFFFFFFCAFD05FFCBFD18FFA8A8FD20FFA8A8FFFFA8FFCAFF\r\n%A8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFCAFFFFFFCAFFFFFFCAFD17FFA8FF\r\n%A8A8FD21FFA8FD35FFA8FFA8A8A8FD20FFA8A8A8FFA8FFA8FFA8FFA8FFA8\r\n%FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8\r\n%FFA8FFA8FFA8AFA8FFFFFFA8FFFFFFA8A8FD21FFA8FD05FFA9FFAFFD11FF\r\n%AFFFA8FFFFFFA8FD0FFFAFFD09FFA8FD20FFA8A8FD04FFA8FFA8FFA8FFFF\r\n%FFA8FFFFFFA8FFA8FFA8FFCAFFA8FFFFFFA8FFCAFFCAFFFFFFCAFFCAFFCA\r\n%FFCAFD0DFFA8A8FD21FFA8FFA8FFFFFFA8FD07FFA8FFFFFFA8FFAFFFCAFF\r\n%FFFFCAFFCBFFCAFFCAFFCAFFFFFFCAFFFFFFCAFD0EFFA8A8FD20FFA8A8FF\r\n%FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFFFFFA8FFA8FFA8FFAFFFA8FFAFFFA8\r\n%FFAFFFA8FFFFFFAFFFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFA8A8A8FD20\r\n%FFA8FFAFFFFFFFAFFD0BFFA8FFFFFFA8FFFFFFA8FFA8FFFFFFA8FFA8FD16\r\n%FFA8A8FD20FFA8A8FFFFA8FFA8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFCAFF\r\n%CAFFCAFFCAFFCAFFCAFFCAFFCAFFCAFFA8FD11FFA8A8FD21FFA8FD38FFA8\r\n%A8FD20FFA8A8A8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA9FFA8AFA9FF\r\n%A8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FF\r\n%FFFFA8A8FD21FFA8FD39FFA8FD20FFA8A8FFFFA8FFA8FFA8FFA8FFFFFFA8\r\n%FFA9FFA8FFA8FFA8FFA8FFA8FFAFAFA8FD1BFFA8A8FD21FFA8FD05FFA8FD\r\n%07FFA8FD2AFFA8A8FD20FFA8A8FFFFA8FFA8A9A8FFA8FFA8FFA8FFA8FFFF\r\n%FFA8FFA8FFA8FFA8AFA8FFA8FFA8FFA8AFA8FFA8A8A8FFA8A8A8FFA8FFA8\r\n%FFA8FFA8FFFFFFA8FFA8A8A8FD20FFA8FD0DFFA8FFFFFFA8FFFFFFA8FFAF\r\n%FFAFFD07FFAFFFFFFFA8FFFFFFA8FD0EFFA8A8FD20FFA8FFFFFFCAFFCAFF\r\n%CAFD07FFA8FFA8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FF\r\n%FFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFA8A8FD21FF838484848384848483\r\n%848484838484FD29FFCAA8A8FD20FFCA590C351213123512350C130C120C\r\n%35A8FFA8FFAFFD05FFA8FFFFFFA8FFFFFFA8FFFFFFA8FD05FFA8FFA8FFA8\r\n%FFA8FFA8FFA8AFA9FFA8A8FD21FF83FD04597DFD0959FD2CA8FD20FFAFCA\r\n%A8A8A1A8A1A8A1A8A1A8A1A8A1A87DA87DA87DA87DA87DA87DA87DA87DA8\r\n%7DA87DA87DA87DA87DA87DA87DA87DA87DA87DA87DA87DA87DA8A8FD24FF\r\n%A8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FF\r\n%FFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FDFCFFFDFCFFFD\r\n%FCFFFD0CFFA88484847DFD05847D847D8483847D8483847D8483847D8483\r\n%847D8483847D84838459847D8459847D84598483847D8483847D8483847D\r\n%8483847D8483847D84838459847DAFFD14FF8459846060608460AF593512\r\n%35123512353435123534351235343512353435123512353560355F356035\r\n%5F355F353512353435123535351235343512353535123535355960353584\r\n%FD14FF7D848484358460605F845F35123535351235343534353435343534\r\n%3534353535343535845F845960846084845F5F35353435353534FD073512\r\n%FD0635845F6059A8FD14FF84356035353435343512FD043560595F595934\r\n%353435343534353535343535353435353534353535343535353435353534\r\n%FD063560355F5960FD043534351235356084FD14FFA88459593459838484\r\n%847D8484847D845984596059605960595935595959355959593559595935\r\n%59595935595959355F5959355F5959356059847D84845959A884A884A884\r\n%A859A8FD15FF7EFD04A8FD07FFA8A8A86060AF848484AF84603560596035\r\n%6059603560596035605F6035605F6035605F6035605F60356060AEA8A984\r\n%A9CBFD05FFCBAF84AFA9FD14FFA8A884A8A8FD08FFAF7DA87DA859FD0484\r\n%AFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8\r\n%AFA8FFA8A8847D59847DA8A8A87D8484A884FD16FF84A8A8A9AFFD07FFA8\r\n%A8A8FFFFFFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA9FFA8FFA9FFA8FFA9FFA8\r\n%FFA8FFA8FFAFFFA8FFA8FFA8FF60848384595F3560353535605960A8FD14\r\n%FFA8A884A884FFFFFFA8FD04FFAF7EA8A8FFA8FFA8FFA8AFA8FFA8AFA8FF\r\n%A8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8FFA8A8A1A8\r\n%A1A8A1A77D8484845F8460A9FD15FF84A8A8AFAFFD07FFA8A8A8FFAFFFA8\r\n%FFAFFFA8FFAFFFA8FFA8FFA8FFAFFFA8FFAFFFA8FFAFFFA8FFA8FFA8FFAF\r\n%FFA8FFA8FFA8FFA8CACACFCACACACF84AFA8AFAEAFA8FD14FFA8A884A884\r\n%FD09FF84A8A8FFA8FFA8FFA8AFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8AFA8\r\n%FFA8AFA8FFFFFFA8AFA8CAA8FFA8FFA8A8A1FFA8FFCACAA8AFA8AFA8FFA8\r\n%AFFD15FF7EFD04A8FD07FFA8A8A8FFA8FFAFFFA8FFA8FFA8FFAFFFA8FFA8\r\n%FFA8FFAFFFA8FFA8A8A1A17EAFFD04FFA8CACAFFA8FFA8FFA8FD06FFA9A8\r\n%FD05FFA8FD14FFA8847DA884AFFD04FFA8FFFFA87DA8A8AFA8CAA8A8A8CA\r\n%A8CAA8CAA8CAA8FFA8FFFD04A884FFCAFFA8FFA8FFA8FFA8FFA8AFA8AFA8\r\n%FFA88484AFA8A88484595F5984596059AFFD15FFA8FD0DFFA8FFA8CFA8A8\r\n%A1A9FD04FFA8A9A1CAA8A9A8A97EAFA8FFA8FFA8FFA8A8A8FFA8FFA8FFA8\r\n%FFA8FFAFFF84AE84A8A8AF84AE84AF84AE8484A8FD14FFA8FD0EFFAFA8FF\r\n%A8A87DA8A8A87EA8A8AFA8CAA1AFA8AFA8FFA8FFA8FFA8FFA8A8A8FFA8FF\r\n%A8FFA8FFA8AFA8FFA8FFA8A8A8FFCBFFFFFFCBFFFFFFA8FD24FFA8FFA8FF\r\n%A8CAA8FFA8FFA8FFA8FFA8A8A8FFA8FFA8FFA8FFA8FFA8A8A8FFA8FFA8FF\r\n%A8FFA8FFA8FFA8FFA8FFA8A9FFFFCBFFFFFFCBFFFFA9A8FD14FFA8FFFFFF\r\n%A8FFFFFFA8FFFFFFA8FFFFA8A8FFA8CAA8FFA8CAA8CFA8CAA1A8A8FFA8FF\r\n%A8AFA8FFA8FF7D84A8FFA8FFA8AFA8FFA8AFA8FFA8AFA8A9A8847DFFA8FF\r\n%A8FFA8FFA8FF84AFFD23FFA8FFA8FFA8FFAFFFA8FFAFFFA8FFA8CAA0CAAF\r\n%FFA8FFA8FFA8A8A8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FF60846084848435\r\n%60355F3560356084AFFD13FFA8FD0EFFA8A8FFA8FFA8FFA8AFA8FFA8FFA8\r\n%FFA8CAA1AFA9FFA8FFA8A8A8FFA8AFA8FFA8AFA8FFA8AFA8FFA8FFA8A87D\r\n%A8AEAF848484A8848484A8608459FD22FFA8FFA8FFA8FFA8FFA8FFA8FFA8\r\n%FFA8FFA8A97E847EA9A9AFA9A984CAA8FFA8FFA8FFA8FFA8FFA8FFA8FFCA\r\n%A87DA8A8FD09FFA8AFAFFFA8FD10FFA8FFA8FFFFFFA8FFFFFFA8FFFFFFA8\r\n%A9A8AFA8FFA8AFA8FFA8AFA8FFA8AFA8A9A2A8A2A9A8A9A8FFA8A9A1A8A8\r\n%AFA8FFA8AFA8FFA8AFA8FFA8FF836083AE59A8FD06FFA8FFA8FFA8FD20FF\r\n%A8FFA8FFAFFFA8FFA8FFA8FFAFFFA8FFA9FFA9FFA9FFA9FFA9FFA9AFA8FF\r\n%A8FFA8FFA8FFAFFFA8FFAFFFAFFFAF848484595FAFFD05FFA8FD14FFA8FD\r\n%0DFFA9AFA8FFA8FFA8FFA8FFA8FFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AF\r\n%A8FFA8FFA8FFA8FFA8FFA8AFA8FFA88460845F60593B355F355F355F35AF\r\n%AEFFA8FD20FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FF\r\n%A8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8AF608484AF8484353B3535353B\r\n%356084FD14FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFA8A8FFA8AFA8FFA8AF\r\n%A8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FFA8AFA8FF\r\n%A8FFA86059848484593512353435123535A8FFFFA8FFA8FD1EFFA8FFFFFF\r\n%A8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFCBFD07FFCAFFFFFFCBFF\r\n%FFFFCBFF84845F8460353560356035603560A8FFA9FFA8FD10FFA8AFA8AF\r\n%84AF84A884AF84A884AFA8A8A8AFA8A884A884A884A884A884A884A884A8\r\n%84A884AE84848384848459845F845F845F8484A884A884A8A1A87DA8A8FF\r\n%AFFFFFFFA8AFA1FFFFFFA9A8A8FD0FFFAF60603535355F3535355F353535\r\n%6059605984FD09355F355F353535593559355F59605F60355F3560355F35\r\n%605960353559847DCAA8CAA8FD07FFA8CAFFFFA8FFA8FD10FFA884598459\r\n%A8A8AFA8A8A8AFA8AF7D8459592E59597E848484A87D7D84847DA77DA87D\r\n%A8847D8484597D59FD04A8FFA8A8A8AFA8A87D7D7DA8A1A884A87EFFFFFF\r\n%A8FFA8A8A1FFFFAFA8AFA8FD10FF8484FD04FFA8FFA8FD05FFA8A87DA8A8\r\n%FFA8FFA8FFA8A87D84597D7D8459847D837DFD04A8A9A8FD08FFAFFD07A8\r\n%FFA8FD06FFAFA8CAFFFFA8FFA8FD10FFA87E53A8A8A87DA8848484A884FF\r\n%FFFD04A8FFA8FFA8FFA8FF847D595959847D835984598484FFA8A87DA8A8\r\n%FFA8FFA8FFA8FF83FD07A87DA8A8FFFFFFA8FFA8A9A1FFFFFFA8FFA8FD10\r\n%FFA8FFA8A9A8FFA8FFA8FFA9FFFFFFA8FFA8A8A8FD05FFAFA8848483A87D\r\n%847DA87D847DA8A8AFA8A8A8FD08FFCAFD04A8FFA8A8A8AFFFA9FFFFFFA9\r\n%FFFFAFA8FFA8FD12FFA8A87DFF7DA9FD04A8FFFFCFFFA8FF847E7DA8A8FF\r\n%A8A87EAF7D847DA87D837DA87D84838384A8597D597E7DFFA8FFA8FFA8FF\r\n%84A8A8A87DFFA8A884AFA8FFA8FFA8FFA8FFA8AFFD15FFA8AFA8FFA9FFA8\r\n%FFA8FD05FFA8FF7EA8A8FD05FFA9A8A8AFA8A8A8AFA8A8A8AFA8FFA8A884\r\n%A87DA8AFFD06FFAFA8FFA8FFA8A8A8FFA8AFFD07FFCACAFD14FFA8FD0FFF\r\n%A8847DA8A8FFA8FF7EAF7DA8A8A8A1FD08A8FFA8FFA8A8A8FFCFFFA8FFA8\r\n%FFFD04A87EFD0DFF84AFFD24FFA97DA8A8FD05FFFD05A8CAFD07A8FD0FFF\r\n%FD05A8FD0DFFA9FD14FFA8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFA87E7DA8\r\n%A8FFA8FF84AF7DA8A8A8A1A8A8A87DFD04A8FFFFFFA8FFFFFFA8FFFFFFA8\r\n%FFFFA87DA8A8FD05FFA8FFFFFFA8FFFFFFA8FD25FFAF7DA8A8FD05FFA8A8\r\n%A8FFA8CAA8A8A8FFA8CBA8FD0FFFA8FFA8A8A8FD0DFFAFFD14FFA8FD0DFF\r\n%A8FFA87E7DA8A8FFA8FF84A97DA8A8A8A1FD08A8FD0EFFA8A2A8A8AFA8FF\r\n%AFFFA8FFAFFFA8FFFFFFA8FD16FF84847DA8848459847D84A8FFA8FFA8A8\r\n%7D847EFFFFFFA8FFA8847EFD0CA8FFFFFFA8FFFFFFA8FFFFFFA8FFFD05A8\r\n%FFA8FFA9FFA8FFA9FFA8FFA884A8FD14FFA8AFFD06A884A884FFA8FFA8FF\r\n%A8AFA8AFA8FFA8FFA8FFA8A8A8AFA8A8A8FFA8A8A8FFFD0FA8FFA8A8A8FF\r\n%A8FFA8FFA8FFA8AFA8FFA8FFA8FD20FFA8FFAFFFAFFD05FFAFFD0BFFAFFF\r\n%AFFFFFFFAEFD0BFFA9FD0DFF84FD24FFCAA8A8FFAFFFA8FFA8FFA8FFA8FF\r\n%A8FFCAFFA8FFA8FFA8AEA8AF84AF83A8FD08FFA8FFA8A9A8FFAEFFA8FD09\r\n%FFA8AFA8FFFFAFA8FD07FFA8FD14FFA8FFFFFFA8A8FFFFAFFFAFFFA8FFFF\r\n%FFCAFD07FFA8FFAFFFAEFFAFFD0FFFA8FFA8FD09FFAFAFFFFFA8FFAFFD1C\r\n%FFA8FFA8FFA8FFFFAFA8AFA8A8A8FFA8FFA8FD05FFA8A8A8FFA8FD0BFF84\r\n%AFA8FFAFFFA8FFA8FD07FFAF7EA8FFA8FFA8FFFFA9A8FFA8FFA8FFFFFFAF\r\n%FFFFFFA8FFA8A8FD0BFFAFFFA8A8A8FFA8AFA8FFA8FFA8FFFFFFA8CFFD06\r\n%FFA8FFAFFFAFFD09FFAFAFA8FD0FFF5984FD04FFA8FFA8FFA9A9FD04FFA8\r\n%FD07FFA8FD0CFFA8FFA8AFA8A884A8A8FFA8FFA8AFAFAF7DA9FD0AFFA9FD\r\n%09FFA8FFA8AFA8AFA8FFA8FFA8FD06FFA8CACFCFA8A8FFA8CAAECFAEAE88\r\n%CFA1C3A1A885A8FD10FF3559FFFFFFA8AFA8FFFFFFA8FFCAFFCACFFD0BFF\r\n%AFFD0CFFA8FFAFFFAEFFFFAFFD06FFA9FFA7FFA8FFAFFFC3AEADAEAD89A8\r\n%C4A1A8A8FD12FF5984FFAFAEFFA8FFFFAFA8FFA8A8CACAA8FD09FFAEFFA9\r\n%FD09FFA8FFFFFFA8FFAFFFA8FFA8FD08FFAFA9AFA8FFA8CA7FA9A88483FF\r\n%A1FFA8FD16FF5F84FF8484FF608AFF8459FD29FFA9FFA8FFA8FFA8FFCAA9\r\n%7FFF7EAFFFCAFD1FFFAFFFFFFFA8FFFFFFA8FD07FFA9FD0BFFA8FFA8AFA8\r\n%AFA8FFA8FFA8FD05FFA8FFFFFFA8FFFFFFCACAFD04FFAEAEA1FD18FFA8FF\r\n%FFFFAFFD06FFAFFD04FFAEFD15FF84FD15FFCAFD05FFAECAFD11FFAFFFFF\r\n%FFAFFD09FFA8AFA8FFA8FFA8FFA8FD13FFA8FF8484A8FFA8FFA8FD15FFA8\r\n%FD73FFA8FFA8FFA8FFA8FD04FFA9A8FD19FFA8FFA8FFFFFFAFFFAFFD34FF\r\n%AFFFFFFFA9FFA8FD1BFFA8FD38FFA8FFFFFFA8FFA8AFA8FD17FFA7FFA8FD\r\n%58FFCAFFAFAFFD8EFF7D7D597D52A8FD0CFFA8FFA8FFA9FD45FF59002705\r\n%0552FD0BFFA8FFA8FFA8FD46FF5928282E057DFD0EFFA8FFA9FD45FF7D05\r\n%28272753FD0BFFA8FFA8FFA8FD17FFA8FFA9FFA8FD2AFF53050528007DFD\r\n%0CFFA8FFAFFFA8FD15FFAFFFA8FFA8FFA8FD29FFA8537D537D7DFD0BFFA8\r\n%AFA8FFA8AFFD46FFAF84AFA8FFAEAE848AA8FD0DFF838483AFFFAF84AF84\r\n%FD0BFFAEFFAEFFFFA8FD2BFF3559355FFFA834593584FD0CFF84342E2E59\r\n%FF83353559A8FD09FF84AFFFAFA8FF84FD8BFFA8FFFFFFCAFFFFFFA8FFFF\r\n%FFA8FFFFFFA8FFA8847D8484FD0FFFA8FFA8FFA8FD43FFA82E593584FD14\r\n%FFA8FD56FFAFFD34FFA8FD05FFA8A8A8FD05FFA8FD04FFAF5FFD44FFA8FF\r\n%A8A9A8FFA8FFFFAF7DA8A8FFA8FFA8A8A8FFA8FF8459A8FFA8FD05FFA8FD\r\n%44FFAFFD52FFAFFFA8FFFFFFA8AFA8A8FD04FFA8FFA8A9FFFFA9FD4CFFAF\r\n%FFCBFD09FFA8FD4AFFA8FFA8FFA8FFA8FFA8FD05FFAFFFA8FFFFFFA8FD46\r\n%FFA8FFAEFFFFFFAFFFA8FD05FFAFFFFFFFAFFFAFFD4CFFA8FD05FFAFFFAF\r\n%FFAEFFA8FFA8AFA8FD54FFAFFFFFFFAFFD4CFFA8FFA8A8A88452A8FD47FF\r\n%FF\r\n%%EndData\r\n\r\nendstream\rendobj\r13 0 obj\r<</Length 65536>>stream\r\n%AI12_CompressedDataxَ]I\u001dNpLul\u0012\u001ac)\u001a9!B\u0015TBIzDPŠ8d*IЃ^ \u0003\u000fRIЪ\u0006\u001fZۆcg>\u0004#)\u0016pǎ\u001d;6qml_\u0013s1l\u001e??ۿ|6ӗ/߽y_\u0017?ܨp1Y\u0017߼zN\u0017B`\u000f~?K|O\u0017?lO]oq?IO&Ȅ\"57o^_޽z\u0017'>'ō\u001aڨ\u0003\u0017|Z1\\nH/\u001c;\\={嫷?}͛˫o~'O|w˧t-n_x'sos/.x__xO?/|7ϿN/^^G?|KL7}ן\f\\?!`b0.0K\u001f.~\u0005\u001e}g`zvJ{7X\u0007*|&C7\u0018K\f+g~~y-&\f/.\u000b\u0017'\u0002J\u0005/X[~}WO_\r\rFa\u000eʯ.%V\b|b?jeW^:!\u000b?`Ot\u001a.*rJ\u0005\u0015\u0013\u000b\u0017\u0006?\u0004ƹ\"ET\u0019&V\u0015v\u0017W.Hn_e^\u0005ow//_\u000b.\n/ߥ<?z~\u0012wM^>\u0011K_=}[lʞ)\u001f?K^W\u000b'^QfcA\u0003t)?Ț=Ukl\u0007\u0004٨?Ǭ/^\u001e\u0002Z\u0005_<\u001f׃+Eڿp*o\u0001\u001b){o;h\u0017nM\u0019\u0004\f۷0cuҭ'\u001c_=_}}#\n\u0015\u0016˫/\u000f&}ѿxȤ'7h&'_~K\u0015o.|*7;\u0017_y?y/._g/^c}</޽y_>{Փ/]헗}#Vm\u000b'&i|7'?}˯oA\t.`>\u0006Ecof\u000f7_]>y~\u00056\u0001Q.=/._l3\fO{ճoWs7$'gW_S|˯^z\n\u0007\u0004ӗ>򛯿|\u0010\u0013WO[\u0018VLғp7O;\fڋO~ٻOzQ<?Kk.x)Z\u0016owC_=}KQ=}{O_~Q|Cd+\u0001Mm\u0013lnno\u0002O'҅'GQnF+c\\O::Ƿ_><\u0010,|Ϻ\u001b~vW^}oK_\u0017uͿnwU/^c\\ɼR{i~>OG?m<xzY\u001d|enr\u0019M]^Z/r\u0017#^:\u0018WWUUwU{/E\u001ewwI&y&_~+M_\u001d\u000b\u0015\u0019\u0018oe\u0011k\u0016?w篯}ϯ\u001e?A\u0019D\u0002p盟_\u000f\bl7zQ}\u0005nu }\u001b\u001a\u0004|}WqY\u000fC\u0018\u001b\u001e_]ùmZ}QJ\u0001+l.Zh_o!?'xj݄?6u<'h6C?/_nv߽r󫫫^K㼼~y{ZkISvЉ!=hz{bN\u000fpX{R{T\u001e>_ckyBw閫\u001c%7\n?F[˧\rݟ{ͲۿM\u0017c~qY^}5/|5\u001ekVk㛯~sś%}sH/7:f>sO>6W=\u0014\u0012^\u0007?ݦY\u0019G[g.@\u000bћsGZkN\u000ejvj(Ay\u0014bQ\u0014ݕ\u001fUҒ6g\u0018Nq8Qv]ٶΕǏu\u0019\u00077R̠KQ(wE\u0017\u000fC:l\u000fp<Q\u001dѠأC(\u0001%JI]ٞ+\u001fsnm3X/\u000fZsVVt<:A(\u000eŗ\u0012ZG_n7b>&砳䬆\":\u0018\u0017c*Y\u00167Aa%mNL>&hgӠ\u001fB\u0006\u000bUm\u000bi1\fZ5\u0007T\\?h\u001dؽ+M\fPӝ7R|xqp\u0006K2FZ\u0016؝h#T!FU)\t/\u000e\u0006t>z>\u001aׂmzvC\u0019<tF3\u0016/7$\u001f@8\u0016;\u001ca$f\u0006_~WῨJGRgkQ,-H\u0017Iv!Q(\u0004\u0014\u00145!EeRV#Gٱԍ1^(\u0010\u0019҃ۻ\u001dJr\"q\u0016?$sYG{@٣l\u000fFQ\u001c\u000bO\u0018\u0014\u001dQ\u0002F\u00123\b<t4?I()/tPZ()\u001etQ(e(bP2b|Y\u000e\r?\u0001%`\nLߡQ\u000eR\n\r]Uh)#?-tO)ne5\u0013\u0013\u000352ώGe&\u001d\nW\u0006躬S:ɐqga\u0015\u0019aU;3;)\u0007vQ\u000e'1(\u0006SbE\u0007mQv{~@AO{?\u001d0)\u0013r\u0005\u0012WiwXxڨ\f\u0016|jTp\tC+TK,nfnc\u0012^uÌ~gb݀;'3\u000f$&a\u0019!\u000b\u0014n\u0019PAcbyTQn\u001a\u001f\fE{unB*7B;\fZʇ!\ti`B\tm!\u0013Z\u0011׾G\u00148u2kVpLmb&vIB/\u0005:Z\u00148J!ue/P\n\u0019Q\u000f]a\u0017\u0018\u001aI!7%u'#/޶\u0002J\u000f(G)\u0014V\u0007CFC<#\u0004'6`f&$\u0003lr\u0014vW`N-n|\u00006|\u0000[>a\u000b0l\u0002\u0018xr[\b,\u0000\u001bB\u001e:g0*20%\u001f\u0017Ba\u001bva\u000fAyИ\bj\u0019\"! 2\u001f0f0p\u001a\u0000d=@(\u001f𪙥!\u000fB0\u000e2\u0013\u0006\u0007 :ihߵF:n3.J\u0013&\njT]T`EQ\"ԝ;~4wuQg\u001f{zǃ\b[QweS<]8B$E\u000324\u0014^\u001ewи.6\u001dp۲A\u001bkd\u0007SKw\u000e΍ek\u000ek[V\u0010CX9H\u0011z\u00007Q\u0007>\u001e;7`D}WyBT܉p=k_cہ--r}=mme[=?]\u001aZ\u001awfO\u00187R>M:\u001d{c\u0007\\ߣ٨fmV\u001e\\w}T4\t5morw'\u000eb_do'sW\u001dhew3uo6Zw&9k]]3\u001d\u001eE\u0001Wc\u0003vj^݋|\u0014>;`mɬ\u00189//~\u000e?\u000f->G\bdA[\u0018l2mХ\u001f#\u0012@\u0010NONAZAMp\u0012Z@\u001cѠ֌۞現÷)hqk;[&~VҢI\t]]qcA\u0014J\u0011莪\"\u001eNR+X\u000e;)Px\u000eI)-\u0001%\u0012h-\u0012w\u0010OI2\u0013\n_ \u00064hNKbZ\u00024\u0007;[hM\u0006\u0002'\u0019;\u001c\u000e\u0015m~\u0011b\u0016\u001aޥO(Gtl\u000f}l\u000b,BC[٘|@\u00034#bD6t,&c\u001a\u0013$\u0000qBT\u0010;Nx=t\u0004]\u0007+K\u0005\b\u0003ws\u0016<Opí\u0018iB \u0006\u0000i \u00140(;`\\݁'ݖ?\u0016]\u000bZn\u0015z\u0019*\u001eFݻܵuN>=>mޣ9ߝӽ\tJ6ٝIv՝y}wfޗߗ؁y_v~We_]igr+sW>~/g2ȮԳ]i!˶]vn˟P\u0005-fnU\u0012ݼع\u001d^߱K~O\u001e-\\uG|t9ٛk3lgFٙ~ug6фgrg<s1gK˼//\u001f?yD3L\u0007~e_\u001e/wؗ\u0011a_j\u0013^p\u0007=ܒWq`\u000fܐ *\u001d'\"Ω\u0001\u001aej\bvHߨ`\fTW\u0010+\u0000Kǿ8]M筲8aqeQ\u0007o`@\u0014$!&:=\u001br6[7h%\u001e*\u0007\n\u001cB!ԙx'_\u001cޓ\u000e}S̬;\u001c}`\u0018C\u0017-?/\u000b%I5\u0000\r\t-ֿ\u0007=\u0015u0xߍbV_/ߣOjoroz\u0010z\"?7M\t\"\n\n÷mGCBz|\u0011\rǵ\u0007Źs\u0012\u0005ӎ,|\u00020Ax?baр\f|\b⾉9ƥ\u001e$:mF#lN2\u0016d\fK,@w?8\u0000٣_[0d\u001019A|h\u001dAibBOP\u0003ng\u00184́\u001dE'n+&(<;$\u000b>,{0{~{z}~t>\u0019=OϮO6bf$dA\u00123߷J\u001fЃ}^ ($zkI_\u0017V*xA'\f\u001dtkj}(fk4n:b\u000egʨ\u0017!8sXV\u0004\u001a搽#$ƶ\u0014ϔ(y?OKA\u00153)?\u001c+\u000bgCq\u001f\u0017TiK,1wxH}O6c TlZ)Bnu4vY~\u0002\u0019\u001au\u001bsҭK\\-aR|se\u0007{d6Օ*\n\u0017QU\u0018ݾ\f~Ry큟lVcٷrn_S\u001a\u0004*Ao#\u0002\u0007YU\u001fW\u0010\u0002\u001bK[\u001c$#\u0010巓\u0010[\u000eh-s\u000b閥C%p*\nSὟ\u0016Kv\u001ad]\u0013jve\rIl\"X1V\u0012Y\u0002#\nla\u0018\u0004kT\b\u000e|N3.\u0001Yam`,\u0011kn$\u0001b;~x=#ޛ.ee`Pq)\u0005\u0017;\t),dBo\u001d5\u0003\u000fO4e9w\u001dv\u0016\u0005M!\u001a5D2͖<\u0004Uh݇\u0018u@/(f\bY\u001a`\u0010\u000f!hb\u0001rW\u001629%҈&Hh3\u0011\u001b>R\u0007>T\"q\u00123sůZ\u0016l.\u0018\u0001RbI.6S\u0007h6Dl\u000bpgTA向꿯,$A\u001f3\\u\u0017Q\nάRpñ~Xf`Z>Bf0+3ew[&[ժ:UЬjjQ3Ӝ r\tt\u0010lW04\u0005}\u001ckTz\u0001\u0002Ζ\u0010 H\u000e\u001a\u000f\u0000\r*[S\u0018 :\u00152\fۄpd\u0015v\"T\",?\u0002j_׬wk\ft)9\\=&\u0015]P㠂kA\u0003\u0004\u0018\u0010\u0012p\u000b(\u0012;\u0016^7.Ψ\u000b:\u0014\u0001W\u0013G\u000f%!O|=#U\u0010踏\u0005\u0013h1\u0016*nڂ\u001f\u000e5\f\r0\r\u0013EOt8APL)X\u0007\u001f\n;{ƻ}avGO+?\u0017O\u0002\\\t\u0005)\tV- 6%\t\u0002\u0017$\u0000Ч\u0013\u001cC1\u0016\u0000ύgd\u0003]\u001aU.p\u0012\u000f\fSUx~\u001fos߾/Q[uQI\u001eZ\\h\u0017,[;\tbl/^x\u0010H\b\u0012JwX=IibS2:\n>o\\\u0007\b(\u0001ACW8m\n&w=j\u0015\u0019%v(\t\u001bemq{e\"AP$Fda\u0018U\u0002YӖ\u0018Mf\u0002p\u0011fx+zP\",\u000e\fyXk\u001c37\u001dhVn\u0002FK}\u001et٘\u000e\u001bs!O\u0010A#&2[\u0010N\u0012,y\u000eؖp\\\u0002KLG[\u0018m&&Y^h\"&A4~ng\u0017CgJTa'\u0019:^ŵeN),A3z\u0012ax&\u0010d  G/&D0\u0006qvsnՅvL$D+\r\u0013\u001cn\u0016\u00041bXZB?\u00186\u001e,єO8s֯g\u0005?]Ԙ\u001e\u0017~v.uVYTAg\u0007o\u00158+tDזc'\"c\"!Ƕ\u0010zk\u0002H\u0002\u0002\"yR31ulel4\nc{wFGMTu+Sa\u0019ۭk\u0014\u000f\u0016\u00136\u0012:t\bb\u001a\u001a\u0002 w\fPд\u0007?xN\u0015\\\u0017\u0005:|s\u001e}.|?a\u00133abh&v~ffCħ5\u001a0\u00070\t*&\t2\u0018K\u001a:\u0014ڶqURp(bW]BK쒓رƫ\f#\u0015\u000fx\u0017%Ȧ\u0016wT'T'L[d\u0014\u0016Ktv$LLDL\u000fbsK\u0012kL,\u000e$(\u000e/HH`\t4bV02\u0018\u0015x#2\"\tQ\u0019 c\u0016rGj\u0012k{ػ\u001an \u000f\u0006\u0001%ƃJdsf\"(6f[%k\u001a\u0010ra\u000b6Gԏtv}CZ\u001dH\u0002m\u0002_\u0002\u0005{\b歠\nm{\u0005^##6\u0012U\u001de+тP\u0017$!fjߕ+\u0002\u0003ő\rc\u001e\u0016'Fa0\u0000\t\u001cP<H\u0012ל\u0002\u000bE9rUFjv\u0015te\r\u001f-\u0006Nh\u0011D>\b͑ݕ\u001e\u0014ҤTԯ*\u001eP\u0006 n$\n\u0017\u0017J(\u00074q\u000b\u001b7d|Q~b@J\u0012\u0019A\u0017 xLfՏ\u001d2\u001fR=\u0018.!}\u001fSԒ\u0000\n\u0010\u0005aZa#44\u001a`Ds7f\u0002Ųhvbw\u0019J-\u000f^\u001enOPVJz\u000eW\u0012ZB_\u0019*H z\u000e@\u0012v~j\u0001c@k\u000bf\u0005 }M\u0010\u0001 BĠj+\u0003\u0005Y؄\u001d;!)LN:\u0015B\u0002\u0012rU*IU?NFiFBrPq\u000e%S/!尿\u00126\\G\u000bIJ`41}*i\u0010?\u0002Q\u0011\u0010Tx3ک\u000b;\u000b2N}\u0016Y,^\u0016k\n-)I\u0012\"\f%ĺO[c+i\u000ejS\u0017BmKz1\u0001v9|\u001a#rh\rɘD\u001bq!,!JF\u0016\u0000[Y\u0002#u/?̋\f|nЂ\\\u0017.\u001bT\u0016\u0001\"7DZn.ґ`\n\u0006R \u001c@-aM5pBwA\u0013I(Z u\u0012ID\u0007+L\u0016Δb\u0014/(ǳ8\u0019q\\NsD\tS\u0019GG`c,-8J8#5U\u0019-2#ɚVG\\8jE?\u0011\\q2\u0016c2ִ2\u001fjdd ׵sM*c[\\\tBX!r\u0002y\u000b\u0019f8Qr\rmׇF\nńֲ\f9oH\u0011Y\u001fY\u0005HaNA\u0010\u0013\n#,\t\\4>@d\u0011i49 ҉1zM<wOD)=R\foMQ'\fif;S\u0011KZ)7,+\nJ)3ZDSzܲJk1\nJ\u001a)ڷ2\n\u0016bXq\u0019xZ\tj!\u0013\u0004\n\";KWj1CQs,6\u00157+\u0007\t;3ҕ\"rɦo4N5j&1\u0017 \u001b5?f,94\u0005\u001cU&t{lI|$i(锒\fy)Z\u0002\f_\u0006kC˹\u00111\u001e!\u001eF?)@LoԃWY\b\r?,@;ṶE}Z\u001b\u0012h\u0001\u0014\u0005\u0018\u0012@`&\u0012q+h~N\u001b٫Lr\t\u0001\u001ezEBjԯŗ\u0017#B\u001d\u0000-v\u0001h9ӢD6cW\u000esAUd\u0000\t%ogQp\u0014\u0007G/My0\u000b\\Lto\u00061+1\u000bvۜz\u0013.\\;ܮ\u00009#\u001c\n\u001a|[4KRmIKȴb\u0011\u0004\u00038re\u001e\fVn?\u0013%\u0013OrX\rɢH\t\u0018&8kiִGXD̀09?~vn\u0017XX#T:ŠНe\u000f;A\u0004 yjY\u0012\u00141Ñ5SPa_>*\f\u00162\u0010\u001b̀dɒ,X\u0006\u001a\u0002RgcjpA¥A\u0000安TL\u0013\u0014\u0007I\u0013h4&{ؽ|y\u0003*[b?/\u001b%nw\u0006N5\\\u0016%a+\u0016=_@&=IӱIa&G:afl!\u001e׳Q\u0005֏)\u0002$&~\u001aJDMc_W%\u001ew׮܇|]y\u000b˵E(ƩPJMrs\u001dŸ[ٮ)w\\ќ\u0015(\u0017Jªd\u0014:H\u001a*9.jݭ\u000bZ<u\"\u001aվ?\u0013XzI[=^U:\u00190y%{ȇIL$`Iq\u0002I;㢔ӕ*ޡ! as\u0005\u000bBw\u0013ա&ʱ].ƶ[c`cNğ&\u001aϒ3R\u0018Ǘ9$r5Zd\u001c2>3\u0006y/qA9%¨#\u0004MV\rI\u0014$\u000fB!Pi\nCiP\bIhH`2<H<\u0002\u001e0&\u0006\u0005aMVp[ɈQdTζj~09#b^I>'}A>9g\u0019P>?vc1EgDepP.bo\u0016|X\u0019)԰fʑe\"\u0018(\f^'ڹн6Ri\u001b>Ȭt̝%kid4Z`\u001c55}Ifv^\u0013֜H`Y\u000fm\u001cnϖGkuYչY<W\\S>,@\fF5\u0017W>h'7Z\u0016\u0019q7\u0003\u001d]\u0013e*\u0017\raWV>IWyS,UڵӠt>\f\u0007\u0001y\u001eTh\u0004V\u001d/eW\u0010\u0016ۖ\"<.\\K`-\u001e?Zyꫭf\u0018Ғ\tPd\\{(jg)eŭ&eQ\rqRq(:.̕4]\u0012t-GdA\u0018}ٟ|\u0014\",<eۿ\\}lR\u001coiZ=^\u0016Rf:cњXrVXpe\tz֫7%1,\u0001c4H</0.IiZ.1NR,e\\ē_bmC/uY^yeW\u0017a0ew͊PX\u001d\u0003HZ?-GV`\b\u0019h\u0011\u00184X9@\u0019V<+*H\u001d\u0017\f\u0011)\u001a\u0019x.A@\u0000?\fи;o\u000fZS\r/\\a\u00110\u0014f@3\u001b;G}t_!$Co5I$p\nh%䊕^|H\u0014WVc\"\u001csjq?ے\u001e9Yז\boDe]ҌXz2DA\u0018>\b=_}0\u0007{pJ$'\u0013I\u0002W\tE%H=@F\r+-vk\u0004%\r7>W\u0004\u0004\u001aim/-]FΪr|\u0010+'֠uwNy4\u0011.s\u0016@\u001a=\u0004\u0017z|\u0003l\u0001;&.\u0014H\u0017h\rߏ ogBA1[\u0001@=:\u0007AƜXy`Yh\u0010g\u001e\u0015iۜ1\u001f\u001dP7s-,\u001c\u000fa\u001f%\u0004\u0003\u0019X~?hsDΉF9Մ<\u0004W.K١)˸(\u000577dpA\u00049%{qQ/U\\}jF\u001dY {\r>d\u0015.%4\u0005߈J*|k}4\fԣ\u0000a`n\u001a\u001a\u0007i\u0002?=\u0000h읔+N3\fzu#nYM\u001c\u0017q;P8\u001bL$}2.S{GT3xG}^v[{|mGCPH\u001d6I>sVƣDL\fCQǡJLF8q'>M\r9\u00126zr\u0015)\fЄ j&\b8XKT\u000bz\u000eAH'\u001d悞jtpTAC#⼂90\u001ct` `\u0019A\u0002\u0016\u0014ME7MQ\u0004D^O=w\f9fɱ\u0001r1^!vB:W\u0000v\bn\u0004.\u001aaݹ\u0000f\u0011Gwm\u0019P7|\b}9\u0004MCXO[\u0014_ry%\u001c,ն`vvqٴ\u0002WG\u0019X nme;_+g\u00023g@s\u0004`uyg\u0013g]\u0013ŭ\u0016;)x8}N)ownlR\\9LO!sGH\u0018~\u0002C\u00188vS\"t\u00137\u0012sMTվF]nq\u001bҹWvYqNL\u001bQ\u000fsOu>?_,[\u00122uƄrQ/&.]tTǍ[l\\73snL\u001d69z\u000e''U\u0007Nd㶛o^<fn!UMǤd\u000bةr%\u001bH\u0001\u001a\u001f4\u0010S+)\u000f_L-FosG.\u001fr8\u0004X1PMi%hJL59_g\u001aJi\f`\u0017q\u0016\u001c\u001dxR3\u000ex2G-nʚ)\u0016S~\u0016:\u000f{1Ӓ[<Pw\\h;(d@UaRjqI-K8?b\u0004\u001aN\u0000-Nq\u0002\u000b\u001c#T߯&c\b\\Pu'\t%\u001a+eO^)b\u001c:\u0015Ȭ@E\tjtAOI\"-\u0016~\u0015<~\u0003;wwhnEM-HM|m׎r*ړE錥grkZ_)|5'aB5{lI\u00151#SnMʊ\u0013X\u0011n\"*.\u0014w\\)>ti8L[\u00117\t=\u0018\u001b}ٕ4pB\u0000Й~e\u0007Ώu43޸B0+q>?4eÒfIՍ\u0016\u000f37wB\nb\u001d\u0005\u0017ɵĸ Tl\u0003IjM;x\u001dps]wX'Z\u0017\u0013\u000bc\u001fXmL8\u0018b*\u000e8n\u001b\u0013\u000f<8e\u0005\u0000⿆O?o(\u0006#WA\u001a\u001c\u0005e*:!Q<Q\u0004J^=+gP\u0007/(I\fޜwqز`f#g\u0007>/{\u001eJl{Ԡ3[\u00049ϊOF5&\u001eÚvM΁LA+q\u0003FbP6'\b\u0003ypؘ\u000bں&\u001cv.zĹSۦ1/*|yʮG\f{\bוmKGN\tjS/2\u000bWnTFa>@_Ez\u0011\u000b @cnYe\u0013!|Y\u0011\u0013b\u0011E\u0017c~U\u0003X(<\u0011J@\u001aUVf;fe\u0000*B56\u0012\u000e`&H)V*6\u00052M)ǖ\u0016$/4-K Y|\u000ece#\u0018\\bVlɼk{JʹK+*Kf7\u0005溜־(9u*\u0019D\u0012-Zsv}Y8uh?\u00144r%\u001af$Q\u0002<@-.|>`u.}x&)X9n\u0015.5}\u000e6\u0018LT̨\u000fZ@~\u0005Lڪpmmn}yT)yńNꉓZK\u0015tuvomWiY~hqYG,n띷<jx)\u0013ͤ\"r3IIGJHUF\u0012)\u001e-j%Ed^Pٚv\r٢U\u000ẻa\"czg_\u000fb-\"YsO%A,9[pZ4$o/\u0013ˊ\u0004fD\nkIW\u0004;LK!\u0013܇6feaLY$[SIkz\u0018}/Z+CK]\u0013Wv6ӷ\u001e\u001d3=8\u001d\u0019#sMhZRj\u0019\u0004~\u001fgxv\u0013MepbX\u000fl\u001a.9\u0006t\b1p\u0004O'Elh%!.Vi1J7yn\u001eZޢ\nضٮ3^gμ/\tQТ-\"*>rzM{~ƀ}+%$9ߖT経yizI÷bkD|ӳҋ_)37Zm\u0017%ݦ\u001f\u001d\u0017\u0012\u0007DJV<\u000f.Z\u0004\u0013O#C=8ޛcw.]q\u001f8ղ?U:A\u001db<\u001ecbj|O\u0012\u0003&\u00186\u0016Ծ֢\u001d\"ďV(P]KW\u0018\f\fosQMob|}H$\u0016m\u0016j\u000e!<6\u0011Pl\u001cϒ ԘSR}[4\b\t!<\tw]U\u0016\u0001w\u0018_\n5U 6inr\u0018o`Z*9*bW[\u0016ּ\bIOA-\u0011v\u00194urN֙l3\u000f@\u001fe@QkT+GeQ\u001bcvT'\\\tRE\u001bU,\u000b2F5%J8r[\u0011{zU^lsiEj\u0002^MHMKi!-|\u0001k)/D*NmU&!b\u0005=͹bC\u000f\u0012RD& Ľ\u0014/?\u001c\u0004'xl'e'?\u0005$~\u001bEo>Mk/u*+>Saf*\u0014\u0015ϕ\"Ph\u000e;\u0005fţV;8\u0019(\u001emAc섫 ?{\f^dc\u001fx܎FCSk%Q\":[/h1\u000bb\"\u000e\u0010\u0007h\u0003x\u0011/\u0000?*\u001fp9\u00071=6mb\u00016ߐ9\u00139O\u0006#;O\u0016\r\u001c9Tf\u0007\u001dq_Ov\u001c\u0007[F Cy=\\$\u001477\u001f攱ϣQZq\u0019\u0010*箪P\u000eՀV\u001e\u0001MUU\u000bw\u0017G2\u0002N|Ӿ\u001aZXE$N$lvzK=%\u0007\u0012_\u0006\u0006nVjY\u001fiǙb1aݡbhꊣn\baHaX\rR)߁\u0006c\"\u0003,<\u001d+n\u0000c.$=΂VH8/i\u001f\u0004U<!AN9~]BT\u001dJ\u000e.bD伍es1n`\rVt\u0018eu$<\b27IҖtrK\u0012<VP~\u0001+Зs8\u0017,@]$b\u001bo/_B7\u0018\u001f+eD\b\u0006Pa#8]\u0012=L0XRh}L\u0016{ \\\u001eL-\u00005\"^@glkꀻ_`[EDu%gJΘR,)&\u0010+a\u0003\u0000\u0000\\\u0000I7\u0017kh-kf_HrOnJFD.\u0002l\u000bSj$\\+6\"E\u00133ŵlH?@\u0011\u000e\u0004)-*\u001e\u0015S{'- D:*$$;%\u0007\u0017\u001dxEN4,\u0003\u001eJ_'S:g~<4O\u0006d3\u00027\u001fL!:\u000f\u0007g3?x\u001f<\u000f\u0007g3?x϶?xo噟zWg?|lq@\u0010\u001dGO;A]eMNxءEJ{I\u001a\u0006me?VYҀd*|-\u000f~ք>5NIg~r(7d\u0001C/?jU,J67]$oՎϬk{_\u0012gM\u0010\u0005C\u0014Tbg3OE\u0015\u001f:g}\u0018g\u001f?2ZLYFg\\\u0001lXeQwi]*ih\u00185a\u0016e\u000f|;fs8 -\n玶ȳe<\t\u0018eUF\u001cs)\\+ft`\u0016@+\u0019\u000e\"ѩ28rWwEFc\u0014\u001ee<đk\b-r/9\u0018wk|+~Agʑ8$ޭ\u0014;WEYCX,\u0015\r]Q$\u0013+p*bwDV\u0011Ua+-\u0015Q/۲\f\u000f\tp\u001cێQ퀝cK+\u0006Xjq\u001d\u0003Qػ 8y|Z9\fǑ'qg0\u001cwDq`xx[y\u001eX۹\u000e1\"\r\u000e)ؐ.0>`CjWʈS\f5LCαM^d\u0002Z1_;ja\u0013@[#\u0005\u000bG\u000f}2!el\u0000fΝ79\u0010ZlȽׇz~:6,!WL\\'0o\u001a!\nn%VT9f_/<f}cf\u001e:pW2v\u00072\u001a\u001a'70?Awvv\u0006on\fȠz`P4L6\u000e%6\u0004iRД\u001aH\bH\u00031jaX\u001bQ=\u00127\u0014<O>6Sa`U<%`h9cz &2\u0010+a\u0015E\u0000\u001cM\u0006WE\"eC5݁\u001dj\u000f\u001cJ4y׋\u000f~}y^'`Mh?y\u0003qS\r8t\u0015[|Շ\u001feÈ[{Օ#[\r\u0002I3z3&eg\u0018}bcJk7qd36f[gϳ&|ᰛ[h E\u0003\u0010\u001bKAMZ\u0015\u0014B\u0005~tZ@+FHxh>bۿi'1]E\u000bo8.횣h.Y&2\u001bLqi\u001eC{li<4mzd-\u000eLi)\u0001KJNRf\u000117\u0003\u0012!8ch`\u0018{, MRx\u0011QQbmy?\u0005>-\u0006##;\u000e*A*1lrt<G\u0019\u001b\u0011b&\u001aӣٓڦy?R\u0007>}LIw̕<B\u001a%@db+)\u000b\b\\yrf+\u0016b?\bsYpY5i͡\u0002z\u000e1K/`SPcȖR\u000ba\u0006Iv~Q\u0018}|T\u00060\u0019hC\"􄖏6\u0014@\u0015\u0010TZ\u000b,\u0017T\t\u000f6[sצ[\u0003\u0003\u00189,p\n\n4h\u0001G(`\u000f\u0003\f\u001d\u0000W_ŉymMa\u000eƷmz\u00007J\u0002xK`Z\u0005&2Vk\nJ+\u0000G\u0002\u0016P\u001e\u0016&Tq4\u0013O\u001dp1\u0015iu\u000eX`\u0019\u000f`Ko\n\u00045uMA]b?\u0017`\u001ak\nB\u001akM\r(c\u001dg)Xk\nКf0,|0և\u0019̪Nl|\u001fN;5}\u001e|\u001c\u0005\tugI\"p<cz\"Gt.䈖ozb\fTM﹬ʣ|\u0005̲\u0012u\u0019ggD=o|Uk?\u0003 ZIT\u0014W\u0017[|<i\u000e\u0010eƑ\u0016\tr=e֛?S.y\u0012Mxy\u0016(L8\b£\u001b8:OczYgwM4i\u0002Skh$\u001a &BʇYY\u0004)=\u0012S}*Szm݋\u001e\u001e\u001e\u001e\u001e\u001e\u001e\u001e\u001e\u001e\u001e\u001e\u001e\u001e\u001eζ\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010vל\bVJx\b`{\b`x\u0001ln\u001dׂg\u0001l\fo\u001e3燌g<hbWlUYm\u0006-Ɖ,k&Y9\u00141\u001b\u001a\u000e7ga\nJ\u0019*i,jˉ\nYl`ǅQN]\u0013\u001e\u0000TqN\u0004!23\u0016.DP<\u0013(\b*b6Sd.6E\"IB\tņ\u0017\u001a˶Ԓ`o[J}%kFOKČ0̸sL\f;]U2.މr'\u0006ʼ&\u000eu]P\u0010ɫ\f#l 1U\u0004Vʩ US!\b݊8dU\b#\u0013]܂\u0016A\u0018螢\u0013\fd}yM8\u00168=;\u0014JX<G98m\u0007~/z9dm\u000b\u00159/\u0014 7oHc\u001cḵi\u001f\\MD\u0011WRf\u0017|?f߷en\u000f\u0019[BqK\u0014d\u0013q1Y*\u0014&>\u000bVE`V(-^PO\u001bG}cHD2߶tN/t}b+abbDw6W6ce`\r8QgO=|$S3EN\u0004\u0019\u001cN\u0010V\u0015\u0002_9EW\u001a\u0007m4&OոkϒizuՌ\u000bs,/\u0018-3\u0006no5\u0014y\u0006\u0007|\f\u001b9v\u00117^1C2}(r|[\u001cuMB79EQ?\t\u001eX8\u001fd_}~'Y4\u0000d\u001e\u0002r\u001cW0Pak\u0007j~\u001b`}\u001fy\u001ab:e0.\u00187\r@`\u00131\t\u001abA|\u0007h.؁'H\f$B\u001a5BN]kcgz/]!\r$\u0015s,q\u0011\u000f\nq;ေV\u0002bG\u0000?\\@l\u001d :zt*}=W!(V͞\u0000S*6Z^6ש\n\u0004ʭ'*\u0017\u001b\u0002bUV\u0017*v\u0010ЭQ3LS'aEцAժCx\\ٖ/E\tG4-U[]\u0014T̕m;jzjwx=mS;5&\u0014SAʩfYS\u0001I,Ի\u0019Zh4Ph~\b֝/٩(ߺ(5*5z7\"\r!DVk*Z,ӼvHS4Toz*_(qXL\u001d%k\fx\u0010hT\u00190aX?N\u001c:罪y9\u0014Gz,ʜ\u001b\u000e BQScq%3^\u0003=\\\u000b\u0018g{?mf\u001a[ދ?F(E\t%4\u001fnl4EOś\u0015uyTDQjUQY\u001fs*=\"Ʃ1P\u00040\tJJ\\`ToFhq.Ju?/C$\u001acGn5{\"UXD\u0015?ԟb\u001d\b{\u0003vԄߨ/2%]\u001f18ۅwVуJ8zk\nD+\u0017Խ6e\f|J}5ܬ}\u0007~\u000b[\u001a\u0000nTd,59%\u0018vZ\\osٞ_\u0015S]u|\u0019r:`Sugq\u0017KWvH\t\ndKgK\u000e\u0004I\u0004mz\tU<\u0004 y\n!P\u0019H$ӻEM\u000b\u001dry,po\u0002\u0005\u0004Џm\u0016hP@\u001cV\u0002\u001aS1t\u00025ʨE\u001c:v߃{߳\n/+\u00127\u0016\u0000ݪ\u0018z\u0019\t \u0018}z,EOlp'S?{\u0012|\u0005y\u001f\u000b;3\u001b \u001fIZ5\u0000\u0014~r6M\u0017s+-;\u0019qq\t\u001c']ضx18N~\u0018ķ:i苷\rZM,OZ\u0016klz\bKab[ƪye\u001ceTgXѣRg2֏/A:Yu\u0012Jj\u000e\u0002re(B?H(i\u001f>ʚ\r\u0007)W-̴ssp5b8\u0014E6\\bdtNЃCU8}*\u001b@%+ؾD\u0005&*\nx\u0007\u0013\u0002N%\u0004\u001b屡s\t0[5rQ\u0000\u0005M\u0019*\u0018uce\u0002F^\u0000\u00118{\u001d&\bogh\u0010;\u0002;Hr_k\u0003?\u001fŉeV8.-3,qi\u0014lK+X3G&F3s \f\u00061\u0003\u0003rĕ5w3wfj!Fi&H;3Z \t\u0006\u001ehy{\u0011ֺ\bl\u0015x~\u000elmy[`<u\u000b\u0005V¬ĮL?ۮt1\u0014nb\u0016sx.9(.\u0001C\u0007`\u0012n\\D>iL\\\u001ac+c\u0017OB9w_BkcJ1}D\u0005֍,\fEjP1̽\u0006!u\u0016Dvh!\u0000%D?[\u0017|rq8T[G>/1-Y\u0007-\u001ewɖRlLtd=VB\u000238dl<n^'9I[f~Y竟~\u0014i޴\u00001[\f~Y\u000f%\\,NTchE\u001a21\u000eP0\u001d`Iy\u0001IT7$K3(Z\u0001B\t2\u000f\tKn\u0013'roD\u0017vouLOf_\u0012'\u0018+,UٲBYFr9ud\u0012\u0006\u001fK]\u0002u)oV_Hc(\u00132M]3\u001a\u0019JƀiRJv]|JXry4\u001bE߮ET[T=YE\r\u001b_#\u000eew%v\u0011\u0001'1\u001aU=\u0015V>\u0017ZkJ#&`Haum\u0002.]\u0004Q0-Y>C\u001b\\&\u0018k5c,\nJ^*rS)N+%w+h/\u001eC(K%A\tf$xyGe\u001f* \u0005\u0004T3|VЁkn_cWyFXt->Ԫ4քE',*\u0017EF`I\u001a'{(^Fc:1ZK+˴z(P~cJ|M|Nc\u0002CeijE13JT`sooŭpmiv\u0002\u001d>r^QaM\u0011+qŷ(F\u0017\u0018q}hb'\u001c|\u0019ڗf'ޠwf\u0010|\u0012ŻFLo\u000b\u001ccM5\n\u0017p5\f\u0011ҡ\u0018X]p5>z4xmKn5xhbףwQ#KtK_\u000bh\u000e.\u001a6DY,a_qDDCʱlo.Wј OA\u0004K 97-\fo\u0001n}/ם\u00147\u00107\f\u001bE\u001a\f`.+c\u001eϿJg5B)5N-qRz'MJQbѢ-i\u001aU(\\7Ӳ\\mRz#N\tTL\u0013\u0005-ƕ278\\jbeV<\u001bO際\u001ak88.d=u+i~f~,Wr=3̭̭{H,;+fR$^\u0010۲fAMx\\âWˮ/eu.˷N+\u0010\u001aV-M\u0012\u000e^xb%Z\u001dt?\u001a2\rc>1Ls\u0000l֎s(T\u0011\u0005>^\u0018=x\u001e\u0013\u0019`gZ\u0017xk0|m\u0016v%ݛ\u00196\u000bW[\u0001Ix4\u00106BA\bj\u001a<k\u001cػ{3nma\r!5p3\u0014627XAVE\r\u00069N\u001b)zj\u001a2#S3d7Y\u00045GQ\u00175\u0014\t>17f\u001dsct\u0010e)\u0019c\u0005+\u000eed\u000eOl\u0016\u0006\u0010H?c=x<Ǹ3'-Ӻ-n\u0016f\u0014qJ1\u000e;<vΝeM}6[cW<-~,fvU|c2j^O+&>Ѡڮe˲\u00028L\tL·B\u0014\u0004DC\u0011<Az;\u0002Jms\u0016\u001e[sى\bI\u001ed1QE\u0019\u000f\u00117 C\u0003udjSq$LakNSY\u0007|\u001d\u001f\u0003~y\u000f\\\u0010V\u001dNP\u000fN5̻x@\u001d!gU(\u0016$\u0004͎\u0007\fO\u0015Ԑ\u0005\u0014fN$\u00073\\A*No\u000f\u0013&i{\r3\nj\"\u0018\u0017(N>$e/Z\u001f\u0006\u0005\u0011:\u0004s]\u0005n\u000e>=C=\\4fI\u000e\u0013+jO\u000eId\u0013m=C\u00194/{)FL<=D\u0019xc1\u0013u?:tם͛\u001fWF~\u0017{\n\u001fYѲ\u0017ͳ\u0013wڝן>-MOxq>Maq>o(;a\u0004#ϱYM9+Ua\nxG-p-W\u001ft<\u0002\u0015\bU\u0003\u0015\u001aL\u0001s\nƥZN\u0005ɢ\u0007\u001a\u0011Z\rUQZ\"/a\\#1\bT\u0007:P\u0002?\u0016pCϟ\u001120\u00079\u00166\u001dmyۨ?izp(\tYEĮc9KIՅ(\u0016F \u0014ɩ[}79+n<Qk@ZY\u0013j'M\u0013\u0015\u0016oC?E\u0007+)cާ.ݾ\u0005\u000b}Ʋ\u000f%OY\u0000\u0010\u0015p&N\u0003S;-.$jڇ`T\u001e\u000f\u0018Z\u0004SRz,`8\u0013Ɣ׮CI\u0013`쾷%5G}yW\u0019$5tvgy۟;?\u000f-ޫ\u0016W,\u00133w\u0018և#}\u0002Ӡe\u001cYm\u000e,Ȓl~0H89?pLbC\u001e\u001e?\u001c5\u001e5\u001e5\u001e\u0015&\u0007a%`\u0018-\u0007\u001d!m\u000b\t6WV$n<m\u001e\rdxӂ!^\u001e4rѥ93gY9{\u001c\u001drtk\u0017$\u001eݒ\u0013wdqBa|ɶ;m~,\u001fh*\u0018\u000fS[;O-\u000e;t\u00023<om5\u001f38=Zl~g\u0012\u0000Lb>EK&\u0002]s;y-ڥù|vn:\u0004,9\u0001M\u0002\u000f<\u0014kb$p!/0v%|\u001f`Y綥`!;,~e2%E<ZBߡ̱=\u001bVgd~\r޷dw\u0002IT$<ȷ\u0006r\u0006܁F\u0018p늈\u0012jzrMH*\u000et\u0012jzghM\u001e\u0011-Rk]&CKx\\N\u0011Z\t}9\u001fİ5q\u0010\u0016\fѾg\t\u0014C\u0018\u001b4 \u0013*Uxt\u000e=\u0018s\u0003Ds\u0013)*czdDRଜ\u0014M\bjtYϲ'\"F}A9=AMP\u0010{\u0005[Yt&b\u0014\u001f\u0011U>*j}q\u0017\u001ejK\u0013}\r\u0001W~ū/^}'_y_5۷_u8Mq_m Jݙ\u0003ʹ\u001b\u0015\r\u001b\r\r\\c>)m6\r'oiO]P,&acm~\u0017r<,w\u0015\u0016}?q\u0015ر͏W-ǫ\u000fe?O\u001e^<{l~\u0005'\u001fl?-sW?=}7~g|wS2RYEc\r>\u0004\\YV6\\Ar\u001a\r2\u000eN <Z_ %\u0014%\u000e')`pAC0Dr|H/\f~Sƫ \nڮU\u000b\u0016L40q\b/'\u0005,/Yn.]D\u001eqwڇ\r$\rt\u001e@@Z츍\u0012Oh\u0006$\"\rFX\u0003j\u0018s\u0001)$d\tFj`8e/xD2\u0001 \u0015XA,\u001aP\u0002k\f\\cQ&J\rYi\u001fp;\u001e\u0006\u001b\u001e.gt\u00015\u001e\u001aA\u0005>91Waa<\u0014\u00040\u0018d \u000eX1}=t?1R\u0016\r9\u0010m\u0018\u0001.Q.żb^c80;L\n^\nAXC5#-\u001f.ދ/\u0006P\u00035\u0001\u0013ff\f(\u000bX胵Lх\u001et~h\u0010*0f\u000e1\u001f6]x\u0015;Rax4d!>\u0005#밀\u00127\u001a粁\u0012#'Q#b)EY-a-ZAY\u000bZZGWA\u0005_P=\u0004{\u001ej7f\r+D\u0005#\u0015\u0002%*$5fLƆ1.\r9!T&\u0013J\u000eK\u000f(E\nЉK^\u0019\u001bfH;Ǵh{U\u0011勭aQǓ\u0003lR\u00181\u0011J\n}nYَ\tk\u001av܄y\u0011\u0005rx\u001c(\u0004X0N\u001ahJs\u0007NriY+@\u0010\u0012\r\u0016[UeEp\u0013iMeff\u0017\u001b\u000b[ކ\u0015XuC\u0010k\"\u000b\u001b\u0016\u000b\u0011\u0003w2KK\u001d$@1lh+\u000fyQM\u0007)5\u0018V\u000bOj\u00180\u001dw\u0001\u000fu\u0013Y\u000bqj\t>Og\u001b\u001fd8\u0014ϕ\")+\u001e:i\u0006h\nkRB2+8CDPF\u00055@Y\u0003ʝO^(\u0011݄f0T\u001d\u000fFwGC\u0002od\bSƠ\u001a\u0019<l2\u000e\u001eh1i\u0006\u0016<ta.g,:=j\u0000\u0002T߁\u001bl8\u0006\f|X#1\u0014F\u0019K@)\"bZĸQ\u001a\u0005\u0012\u0002gW\u001a\"\u001f0nx>`@Cۅ5\\/\u0017'%\u0003c\u0006\"A\u0015e\u00128.\u0016\u000f|!${\nL\n=>(Y\u0010Hf\u0014V\u0001E\u0013\u000fy`.0\u0018\u0010%\u000eV|\u0000#\u0013~_\u0017Ք6G\\k\u001e(߃vȦZ*\u0018J\u0004>\u0018\u001c\u0000\u001d\u001e\u0015 E\rͽ\u001a6hU\u00136PMdl\u0018T\u0003HҐ\u00045\u0002(c\u0005u\u001e \tLJ\u0010\fAyK64\u0010SE\u001dd`\u0001q0Gwl\ne\u001dW^\t.kGAp\u0007\u0007NJZk\b\u000b+\u0016\u001as0`F\u0015(?2dEEn%\\ʖyА\u000b\u001e(8o\u0002ɜH\u0018YJ/_z@\u001fo\u001e>s\u001fn)\u0005P5|\u001bpq.iA\u0018[z\u0010\u000bV\u0016lG0P\u0017\u0018ȉɨ.\u000e[ܜL))yC΁_0\u0007'JxBHE:q\u0011|NE\u0017 :: Z\u0006\u0004[q\u001d\u00079a\rn&+P\u000f=n\u001dű(/KըI56j\u0018|>ʃ;>@}kh-6\n˸Ȍ]~\u0012OE\u0005.OJJA\f\u0010\u001c$'>O8\u0014RngP\u0019s\u0018\u0016\u0004Ը&\u0006@\rHã`42\u001fB.qGư>$˝\u001eEV\u0014HY`Ix18v\u0019D\rY\u0002p\u0010j`SPK\u0018q1?LJ\f{\bLs!rE\nZJ\u0000y7\u001a'\u001f\u000bq^̊V![!)P\u0010\t\u0002fcn\u0007QҎN*āc\u001aP\u000bkp6\"\u0015yKOR\u0006$H=I!D+\f\":P\u001c0\u0016\u0005{\u0017Sk1\u0010TB iMݍ\u0014pB<\u0017h\u0010˶U\u000bAW1DW!bRy\u001b\u00177.@DM\u001d\u0002}m2\u0004 *H=\u0010\u0018\t{\u0002`\b\u0017I\u0004׎\u0011\u0010[E jꚔ\u0006/`07/Q\f/5.\u0019v!7\u0003\u0003\u0002%WY\b/AHP_y\u0001e4\u0018,q-JR\u000f\u0007aB8UU\u0007\\\u000eLTn]\u000bT\u001f\u0019*:\u000bHdہf\u0002ȐV:\u0005EU̼@u%R`1J(\u0005c>^g`{\u0001\\uN\u0003AdX:\"m\r[\u0010)%no)\f\u001b \u0018c\u000et\u001c\"\u0004Vx#>\u0004*\u0005c1\u0017\\*6~d/\u0014?\b 6\u0010\u0006\u0018%K\u001biA\u001fB\u001f-F\u0004\u001b\u00161a\u001a\u0011\u0001;im&5BJ@2@$hhZHР(HL(0C\u00123$7V\\e\u0002\u001c^7\u0000\u0017\u001eÃ1yoj\u0002\u0007Yc[\u000eT\u001b\u0017\u001epUq;򂅸\u000b I.`;\u0005#+O\"uq$Y\u0003X:P\u001c-Xt\u0019\u0014\f\u000b\u0002޵[lu=e3v#Z)$\fNasE\n6`B70\u0016\u0011T\u0017\u001a\u001do`.b\u0007\u0003{xhxy\u0001\u0001᥽U@\u0006li\u0000QY\rp\\QXMpC4cl\u0012#<L\u0006J\u0015Ѩ*chND\b)Ö۳\u0018\u0004(R[\"3E\r8n\u00073pL(T$\u000b\u0017늡*\u0014ϋgw)pJ7Z:\\Tz\u0007\u001e@+.\u0004\u0017\u000bNī<W!\u0017yh\r`yq!\f,K8\rCx8ya0\\X-w\f$\u000e4J $()x\u001b\n/k\u0014\u001a>q/\u000f4ґF\u0005m3Yqwz\u0014\u0012\th\u0002\ra\u001e\u0018x>SG\nY\f\u0017\u001cĜ\u0011K*v5!,EqD{VRx\"1.4mt\u0004Q\b\tQފ \u0005M$ r\u0001=.,z+\u000bM\u0016cm\u0017khMV}\f\u001bD\u0002$\u0017hzq\u0011L.j\"\u0013\u0004\u000e\u0010.`\u000b@A\"4\u0000+\f^8ft\u000b\u001bH~bP\u0000\u0014̋.`SQ;R\u001e\u0018\u001d^\\ʜ/P\u0005U_\u000eB6Q\u001c5ֆ ԕ\n\u0017xFn\u0002\f\u001b:,dئ\u001c++\u001eꨵw\u000ba\u0010\u0015\"MÓ\u000b\u001c\u0018c<P(%ȡP;aI$HZOP P+\"\\fЀK6\u0019\u0010q6@S1u* \u0017tpxE\u001et\u0019YBx?n\u0006PR=\u0005iD\u0016)}`2dp\u00013\u000e\u001bc\n\u001a,L\u0000\u0015e\n\u0004\u001eҍ'ٷ+X#e\u0018z\u0003Ŕ\u0010\u0005=(M\u001cW*&#Q>r)g yVL%\u0017l8@Z\u000b\u0010}n\u000e▃v^wa<\u0007\u0000D[O\u001b6\u0018)XF\\h\u0014׭U3%V\u0001\u0018HB\u001cٲd5 2\u000bmi@Sn\u0003iI/\u0003J\u000e\r\u0007_QG}\u001fOZ\u0000޹byU,X-\r؏\\mC\u00103.\u0018% e\u0017\u000f.xm\u000f\u0001=\fšܦ\u00001\t`$\u0000V)\u0017D\f5\t\u0007.a\u0016\u001ce\u001f*O\u0002D6LlC\u0017(;ė\u001dBNX. E&;BQӊPeX^tZW)-u\u0015\rA;2\u0010\u0010\u0018a/0\nϔ\bʅܞ\u001ci\r\"R^,\u0002j:9h%\r\\\\\u0000ӣm67\u001ah&{G/\u001cDQބ\u0005b\u0016\fzl\n)^A\bF )n-\u0005UD>J(\u000bk\u0018T\u0007C\u0015?_,\u0019t\u001aK\u0005b(:M\u000eڅh\n:1p;f83U\u0005\f6e\u001e\fL\u0012gwvJ(\u001eb\"\u0002+\u0017\rBlV4M!5)+\u00199A{\ntk\u000e\u0013!w)PiRB?xa\u000b;\\\u00005\u0015\u0014\\\u001d'7>\f\u0006b=\u0015d\u0000Y{\u0005\b\u001a\u000b^(43IIcRY\u001csQ\u000b4\u001b;\u001eӫ\u0016\u0005\u001b$\bU^Wٿ\u001d\r*;ԃJ{2oxO\nSnstz3 \u0016\u0012\u0011L(#_a!\u0001\u001e-\u0004\"4\u0003X=ly\u000f*1Ue<{d\u0016\u0012\rKeh\u0016\u001eҝk\u0017Ȓ\u001a_R\u0010\u001b\u0013\u0003y\u0010yXR\u0019#@\u0007=Pq\u0005s\u001b!\u0019\u00110jd\u0003h\u0014 \u0007v\"^\"\u0015@RQl.;o\u0003$ߞXL P\u0000vfsH=³f\u00070'NJ\u0013>P\u0014 p{g\u000e /z,\u0000ha\r==X,M\fd\u0014̟\u0004L!ʢѩe<[QZ\u0011\u0011)I!Y\u001a|~\\Ne\u001a4+z#h\u0013j\"\u001fJVdQ;P:6CD$ʞ3Tn \u00127\u00142\u0002әKVa6Ru\"kǔ/ \u0017Q\u0002|_(T`\u0005CBu*xU\u0013\u0016v^\u0010!8\f؏\\\t\u0005DCBR(s\u0010& Y\u001axL\u0018\u0006\\;\u001bD\u0001\u0018zg\u0001\u00159@lIP\u0005Vb\u0000m\u0018b\u0005\u0006{ļB#XKʗoIZ\\Ti\u0002\u001e\t\u0006\u000f\\/@j6`!'d\u0017Q^HYH{D)\u0005Jv\u0003@R\u001fC6f$\u00012\u0011&V7\u0016c&(J\u000f{ڈ\t`\u0001!e&\u001f\u001dh\b@%8rDטP]K[\u0010\u0011\u0018\u000e<\u001ez\u0016bo\u0014bb>'0c@Y\rڸEh\u0017*:HLb\u0007\u0010\u001fM%-[ĝ~՘1#QR\u00037-iHtLLѐA8IL1\u0018Z}2E\u001bΦ\u0002\u0010.d+bF-H'\u0004\u0001i06\u001a.\u0010`P(5\fb\u0017t@II\u000bQNcV\u000e)_\u0004L\\H1HbM\u001d\\D)^D?Vv8\b\n\u000e|\u0007dG(Tf_\u0019o\u0006Xhِ\u001d\bjL{\u0007y\"-TH\u0003=C\u0018P%)V^5r\u0011,\u0018b~\bFj\u001axg\u0013sE\r]Cpc\u0006I)J\u00074\nB+\u0014\u0007QAIC:!E;B\u001e%AEV8\r\"Dҥė\u00166\u0019\u001cD_p\u0004$k\\\u0018\u0004[Cd\u0016{i/_M\u0007\u0010z4%\u0018\u0001k`\u0003HY\u0012#Y.fA\u00101z\u000e'\u0002\n\u001dD^+LX}r\u0006jXM\u000f;Q#c\u001b\rZfph4MiQL\u0006w ޳k\r\rⴓrU\u001e\u0011e\u0018{nQB\u0004b}Z .E\u0013\u0002*ڐD\u0018!@\u0000U)!\u001b좡4Ql4%ۼ^\u0011&'Sk@)sXṆv^s\u0005\")DABXĒPR$M@\u001f\u001fy<3~\u001fP0tñ\u0006!Ɖ\u00129M\\v\nT D\u00052'b1\u0006ۭ\u001d1?ch\bLEst+q,\u0016\u00005\u0007GL\u0012Fc*C}_6Lriwz\u0010\u0012#H9c~!ϭ-svܢ\u001aU\u0001!'+~\u0000B4\u001d(Cac\u0004]C`\u0005Vj<x\u00071\u0006O߰[icDp\u0007F\u0017\u000ft2OJB@&\u0012ؗxΩr(hѴهlZsny\u0001\fwM\\V$ĐIc:B\fgХFB6\u001238\u0013%atZ<x \u0012\u001bj:ak.\u0010Xj02\u0005\u000e\u0006\")P>ll͑\u001bj<\u000f\u00040`|\u0001<wVQ\u0019\u000eR\u000e*TY\u001ek0\u0018C~h\u0015!Q։\u0018\f16ZA-jx)`7Q;Wՠ>p\u0012FGh(}[\u0004H&\u0012RE/e.\u001a\u0014EygUё-ECXLf\u0007>Eڎ)\n6\u0001\t=C\u001aC\u0003./zXw'hq\u0005\u0007i7\u0004C$Y\u0018I\u0007̘\u0016E\u0003!\u001aN#y\u0012B\t\u001e\f\u0012\f /d\r\u0010\fnq\u0019qG\\58|TZ8R>E\u001c+\u001e\n\u0002\u000eԽв$\u0011E\u0014K#5(m\u0006M2\u0015 f O<\u0010$\u0010\fk(\"n\t\u0018\u001a(L\fRqQP:)C4+hD\u000f\u001fD$-R\u0006%n\u0007\t=\u0016V\b~lp\u00145T\u0019,syҼ\u001a=K\u0011](YEx\u0002i%\u000e+e<\\|qtzhg\u0015Bo\"sQJhǼ\u0019\u0013|ɤ7)At.A =!DpƄ05W\u0002f'%\bQ=rUEq:E\u0002X&az\u0017$\u001f\u0004}U`D\r:\u001d#\b4NHFYtW+@\u0006O̓c^3I\u00129FP\fsr*\u0004\u0018K5RAif\u001ajPy5\"\u0003s(G^\u001e\u0005IT3x#XD\u0015%?\u0015\u0004\\C\u000e\u0006n\u0013υ\u0013UAh\u000b\u0005\t\u00046-\u001a\u0006:ssI\f1\u000b^CJ5Y!\fؕ\u00120\bV\u001ab;\u001a^r\n\f\u0014\u0011`ȕX#Ѓ`H\u001d\bRb¨\fz\u001f\u001b}\u0019/ߛv\u0002=wD3\rv\u0006\u0016f\\9l\u0000\u0018فլRaf\r0~wP\u0006YI\u001ael\u0006S\u0000)\u001fV\u001b%:D=)@cYfA@N\u00044\u0002(R\u0015@\b\u0015~\\;D.\u0012!--\u001e\u0000jO\u0014<4jnnZ۔#\u000eHʺA7\b*3LE\u0002V\u0000\u000b\u0016\b*}!>g\u001d\u0006RD\u0001Yh\u00184\u0017\u0006A>/\u001a%(H^\u0003\n\u0006\u001a\u0005:1gE̝W\u0003e\u0013@\u0017m\u001fbAw\u0011?J͍4M\u0005y\b\f\u0015\u0017¡\u0005^\\]נ\u0004;\u000b\u0011OvӐC_*\u0003\u0003\u0003Dd\bU\u0011u\rt`C'ϊ!$\t7Edm-v\u0001as\u0015\fI\u001c!ԀJ\u000f\u001e: KU݀9\u0004<\b\u0014Fa\u00157\u001d\u0011ԛ\u0005\u0012R\u00069KC:\u0003\u0016_\u0017͆\t\u0010+;/o\u0003GA@e1/\u001ea@\u001aV\\Ւ\u0016W)*O\b2!(0CD\u0011E)qUmD0\u0006\u0011Z\u0004m\u0017N漣\f,hp#\u001b[[\n>^ '\u001b .0̆TPܫD\n/x\u0014DH{F@TTU\u000e1EA\u0015\u0010tK@aGKj\f&%KFUB\u0001\u0005Pz\u0011\u0010\u0004`U90%At=\"1&B0lBUb I&Ijy\u001cP~3w$ՄzҊ\u0002i>_ghhA<Bxi\n[\f\u0001\rA\u0018;/5L\u001ed(ӡ\u001a\u0001r\u001cBcbM8:+\u001c:\u0005U\u00049O\u000e\u001a\u00012N4\u0005XK\u000e- i\u0012\u0003\u001a\u001a[zD\u0003O\bC`er\u0010Y\u0011hq\u0018EBA<arG\u0015\u0013\u001eI=BHN\rޒ9͊\u001b!\u001c.?0H2'\bs\u0014\\P\u001e\f࠼+R@\u0017HGh-\u0011\u00074a\u0003E\u0006\u0013c`-x30``O(jN8B$#xf\u0010\\\u000b\f͡\u0013t\u0010+n6\u000eMj\u0012\u001f\u00021%ŰEl,IRA8F.8$ڕFy:MfUXњ\u0012m!L_\u0007\u001d\u0017I4%\u0002\\!\u0013\u0013l&@\u0016|+\r%>}i[ˢ/X3\f\u0006(Մ9\u0005+J'b\u0004\u0018b'X\u0004g\n(\u0005\"%\u001a\u0018\n19\u000eai]֔R0\u0000/\u0007\u0003B+![DyF'%\u000bQ\u0000F-~p+d\u001b\u001c\\4(ҏTTw'2f\u0006C\\-\u00058\u0003.Cʛ&J\u0013\u0012\u001fD\u000f\u001f<AVY,<\r\u0014V?\u0016ؕ\u0004+\u0006\n($\u001dt0'y;ȓTs\u0013 B\u001aR\bS*?IsD\u0012B\u0005iQ\u0001s\u001eJ\u0005\"r\u0004Ḭ!|Ze}6/Mn2%\b!iB5\t\u0013P\u0018\u0018\u0015ǐLwV\u0004Dv\u0012D_*\tmhlk!f-w\u0016\b\u0015\u001b\u0006aXAA\u00102V\u0017\\\u0012\t<\u0012£\u0018\u0006yXyT\u00182cDh1vEQ.`l0r\u001atL\u00040t\ndN\u0011*b_,dZpb9]\u0001=GW\u001f=ez\u00024fzHY\u0002n\u0018XT,$:A\n\u0005=\u0007\u0006Jp\u000fiOش\u0013HP\u0007AM\u0004d;I<\u001f5Byl\u0017l?u\u0012I\u0015h\u000e5DL;2#cEM\u0005(/L4$\u0011:\n v/\u0004 \u0003\"\u001dG5\bpj\u0002\u0005\u001a#\u0011\u0005\u0015\t\u000f1ZF2e\u0003n\u00123\u00054G\u000fX\u0011s\u0013$zAZU6\u0012\r\u001ehT߅\u0006b\u000bL Ŝ+ZAv쏆YpHA\"D\u0016!j\u0010 %\u0004كP0\u0012GM\u0006(T\u00064TRE\u0012^Ki4ð^\u0012kp\\wO\u0001Ypo_x\u0007ٳw_SV>\u0013qJd\u0019&0\u001cqU_U9\"\u00109(SY%\u0000g%ւlFlS\u001c\u00023Tĵ\\\u001cKe\u0002)\u0005%Oe\u0003\u00070\u0005\u001d\\\u0015gی%i)\u00172~n UC(Io\u0000=9hi9!$Scx\u001axHHuP(\fD-\u0017k\u000et(tod\u0019\"\u0001K g?I\b\u0004\u001d\u000b\"UM!, m%fTs\",Zڀ=_Mg@\u0004\u0010.0\u001f!/ty\u001a\u00114Cv&t\u0019y{zpr+ty\u0011\u0011\u0012\u0013.չ\u001c\u0018K\n}y&@\u0004V1QУA!@2+@8fN\r ǝ\u0005\u0007ZMD.s&a}d[\u0018\u0004Uu\u0013$|jY\u001eeo;4\bi$R1\u0011~yfn\fV\u0003\u0001\u000b!b\u0010k4\u00010\u001c0XA\u00116F\nG/\u0016̚\b&Zdb\u0019*\u0003RFl\u0003MKD \u0010W 8\u0002\u0005jȃF\u0000\u001ddD\u0016K  QO$*P*[.|ÞF\u0011\u001e764ApbI\u0015I&Қ\u0002Аa5Pj4\u0011%\t5cԐJjF$ȍ5b\r=.ڑTYՠ\rl]\u001d`)\"+*߃`֭$\"@jp6]NS&\u0003*\u000fK2H92\u0019Aɞe`\fwb;c\u001d2?ko+}7wr\f\u001bZ\tBK\u0006\u0006܀y\":ܾB/Tf,2\u0019\u0019{\u0001\u0010ux\u0011Đ}U܉\nt̜{\u0004s ŴevxYj![ۑ~(mUHaH#\u0006đ\u0004\u000b!YdeCZ\u001eHnt\u0000\bf\u001c;WD\u0018_]\u0018\u000b׫@զY\u000ew.ka\u0016QK\n78\u000e&# zݛD21\u0013\u0010P\u00070LypΎ,'ӟ1\u0013k@\u0003'z `%ȱ3i[=m8墾ʡjMpnqev;)Lf^\u0007}\u0011P\u0007졒ImuCH^ldc6ig\u0012w_\u0006ry\btq\u0003N8gI\f\u0004{<+_,Ղ\u0016e5\u0019\tZ$_\u0005E\u0013\u0018̫\u001euxr\u0012\u001d\u0006\u0005\u001d\u0018\u0011a5\u0011Q|&\u0018~E|\u0004qe\u00154%\u0018)\t\rx\fTY\u0000mͨ\u000e%|\u0011QKdT\u0016\u000eA\"nq\u00139y\rܳ\u0006B\u0014;Ԇj4\n\u0002б;826#\u001e ,`@i\u000b\u001e2\u0017䰻\u0002#Vv\u0013\u001d{{\u0019[<z;\u0014=U\\ZLV!\u0011\u001d\bĩ2\u0003#\u0016{\u0013+\u0017\u001a\u0011DױBå\u0012\t\u0001VY:Mlp/`MީQ\u001e\u0005&N2/\u0010<\u000e1Q83\n\u0011 q\u00073+]FEG;`\u0003XŐt\u0010\fz\u001c8EV\u00054\u001c\b,Ɉ\u0003\u0003\u0004\u0015M\u000e\\\u001f8]\\<0KϨz|~@.\u000eN\tGr1x|i/Poah:2\\\u0000\u0007NgTt2\u0007&*pEeP\u001e\rH;\u0015lTR\u0013xx%aڊ'3\bb q*+vmٲ\u000e=\u0017<4Ѿ\u000f^\u0006S\u0002u<D\n\u0016T5i_\u0006q0\rRO\u0017L4\\y}\u0007\u0019|\u0006tAq+6>l\u0011i\u0016x\b\u000bfp\\]\fg\u0004wiB\u0019\u0018\u001cP$\\ԟO!SA@f\u0004K{(rLVkҳѶ%1`\u0004\u0019\u0003Ov%̇(iV[Ɉ Oz{}`CjV`v\u001c%\u0005Q{usC k6\u0002;:(\u001a\u001c\u0017:Gl\u0002\u001f\u0010\u000bz+ز;YB\u0003٘;Q2\u0006}\u0014@q@&s.$Đ\u0003u\roIr릈\u0007\u0003\u001bL\u00179=`\u0016\u0012\u000fX \u0013bezn\u0000\u001cr\u00142BVx*X\u0012\b\u000e=t)\u0016]M}0\u0018\u0016P(a\u0003]:׸lơC1Ɣ0AT'E\u0019&}uܶ/BJ#-+(\u001c_#QB\u0013\u001c0k=˕-E`\u0018k\u000eɞDI\u0006ܴRX\u000eu\u001c.id'bS\u0014H:Frz\u0001{GZ/S\u0006EΞJlZ]1G\nti7]\u0011\u0001! O[x@\u0001д\\Q4!3\u0011\u000br\u001e\u0000l\u0014Rvr].@\nO\u0010`:\u0017`yJGzK-M\u0011\u0014\u0012n(\u001c\u0000bI\u0013Eȹ/\u0004:\u000f \f=p1\u0017#.\u0016\u001f\u0004yrl+\nb9okzM\u0000\u001cK(\u0011;ëXt-\r\u0013\b9\u0019rǢpL.;bj\b\u0000ܔ\u0015Ҷ\u0017pX먰\u0000#\u001aW\"rORuH\u001091\u001cOhd}_\u000b{\u0001K-\u0001\u001e\t6\u0012~!u@Yx϶5_ln*D\f,..\u000fsȇ\u0016\u0015-!>`V7oC\\\u00049}S\u0016ҺB[AuSvB\\M\u0003u^\u001a+Y$\bKSw6\t\u0013mh*\u0004!\u0011\nn\u0001\u0017\b=k\u0014fIC\u0011p<\u0016@LcG\njq@H4\u0002\u0000u]\nl<\bXM2\u0005\u0019.5\u0015O\u001fI\u001dh\u0018G\u0010\u0011ȵ5g3C1\u0000bBB\u0011sRyqm\u0019Է,\u0016VE/\u0007b+ЃzhWIh\u0001\u0003yhHmUw!\tn\\Q'`xO+)Y\u001a(]R.\u001bȆm~8FZ\u001c\u001c'b\u0002pL\u0005\u0011jdA-\u0006j8\u0006a\u0014K<ؘ?2ȶe\"N\u0000(\u00146ݓC\u000e+`tX#d\u0002\u0002R~썸j #$!23!R$\u00000u\u0011\n6E38̎q٥j6xmI30$O\u0003|:ZKY,\u00177*2Ά\u000b[ʮ\u001c\u0006EX:چmYU,`675d\u0007ƜX_0T\u001eN.qc3CM\u0010\u0019yP\u0018\u000f\u00039=1*\u001b>@Q\u001e{&\u001bMy\u0003\u0015^\"L@YbZ\u0005x\u0001=PI\u00103$aYٽwPy%H4<\u001deH\u0017\u0015I'D\u0018\u001bS\u00140sO\u0001&,cuxi\u000en/.\u0004\u0019\"D[9%G,\rv\u0019\u00078u@\u0012JymvݭЏC/vB7!\u001e\t\\\u0007;iN3\u00034\u0000F7t\u00137cPe\u0004\u0003\rIz4f8z$*;̼ؾ8\u0013*6%-ĖvЮic\u0001c\u000fvSMrtc\u0002<!z\u0007(\u0013O)U\f\u001f\nb3:9\b.Qq;^])\nXr!Vo\\>iD<b%\u001bKf\u0012eކltJ^\u000768qjD{@8\u0013vzJ9lHpF\u0018\u0002dw\u0006_\u0010Ýw2\u0012r\u0011@\u0012g06*L;2\u0007cAo9\u000b+\u001d8\byrXfc\u0007\u0017(Y\u0014m\t\u001e\u0014X*W#\u0015h\t\u0014H\b\r2\nD~z0KT\bPjJ~a\u001d\u0002q\u001b1\u000fiy!)'\u0015h26(\n6\u000btLH+/L\u0003j7Hkx\"RNE\u0015\u0005Y,\u001a&=+ܶ\u0001T1\u001fueJ\"̯3!z=XdgA\u0017S?^!Zɩ00\u000bte\u0017TGE[X66l\u0011-)P$N7[ɔp#B\u0011\\Ji,EP\nv\u0001@\u0002jb\u0006b,\u0015=\u0014\u001eg\u000fNxLt;R'0\fc\u0018 \u0018>\u0016?c\u0010x1\u0002W`e\u0007rit\u0015}D\u0003nы\n㗽\u0000y\u001c\u0018Z\u000fBo3,aK\u0001GܔR\u0010\u0001\u00034)af\bƪ^׭&gRVv]0\u000e`oSOg\u0006\u001cSSǨ2̬$<UrZ\u0000Km5>v\u0017\u0000\u0001R}$p rʕ8?ҰH^֫\u0018YZr&\u001b\u0006\t=<Iߞ\u0011^d&v䉙CfCiQw{L\"(녴R\u0016C-^Ł*>\u0018\u0001#1·L\u000e\u0005OI5\u0019J׈\u0019`ej\u0017\u000fWe],rPYzi\"\u001a͆AFRI}\u001e}8H,EO\\\nڰ䚲P;MZZR_dP\b\u001e\u0003V=2*;̎Ȅj2ك<xr\f\n\u00055b)\u0007n\u0012Rd$Hg\u0015C\u000f\u0017\u0013;%0\u0016*\u0005ϸ\u0011<\u000fh\u000b\u0001F\u0013\u0013Pb|Cv;?\u0016Ihg\u001e&:)sy\u0016\u0005,\u0012\u0014W\u0011<B\u001ejK\u001cY̜%ȱA\u0017MY\u0006,7]Ջ4\u001f/H\u001f9\u000bH072{ϡq*\u0001ű\u000e:\f'Azo\u0000J\u001e@u&FjQS#\u0003+')ٳo6,\u0010\b̒ϔ\bAx\u0016\u001am:\u0011),Lo,lcֿ^%\b\u0000\"Z\u001a\ṛ484\tX9\tM0@n\u000e\bk`W-jM6T\u0005q0.$Z䱳(/\bauOg\b\u0000q\f|z\u0006a&kpoH%\u001aiPHtX;N\u001b()5(Q}VN&Ԉ*26#\u0001X\u0003\u0010\u0018\u0005 Rq\tA|Y\u0005u\\e\u0017K\u0004*fÄA\u001c(&N\u0001-\b\\\f\\\u0013Aֺ{!Y\ft6bү\u0007OUSwn\u0011 B&d\b\u000f\u0003*eV\u0013߼@n(\u0011$\t1xK eN\u001d\u0013!\u0019\u0014\u0016nh\t\u0012M}*\u0006\u001c?ev0j\u0012AZ+/YB\u0007襋\u0014ݺe1\u0005S65E\nSfΣDB\u000f6?4lQprGD\u0017\u001a\u001d㫨NPn&\u0017=XLq\u000b\u001e#S]\u0013J^\u001d\"`m<\u0007=|//z4\u0014c dBa<>P$YCXH:\u0004}m\\\r\t\u0006\u001ft>XB[Jqlu3-s\u0013[I(Z6IRﻧT^zX3\u0019Ch%J:T<\u0000tn@[Ĝ\u000f.\tý\u001fJ$5\u0001Y1c\u0010iV\u0003uRB'.t2M)\b\u0003҄\u0013)\u001b\u0017\u0017r}WcP)\f\u0019[\u0007;(%Isl듀\fK7.\u0011\u0004kf,\u000e4\u001fm*JeV\u0004PS\u0012=\"`]GY,\b%\u0004\u0013Q@<a8I\u0018)\u001eSmVrKV\u0005mbl-\u001b\\ZRV`:3w\u0004\\^Ƿ\u0000I2Y\n\u00031m\tZ\u001eȍ\u001cLST\u0012\u0016!`T\"j\t\u0010գDM\n[6yx+*qU[O\u0002U^\n$$eJ\u0000bʜ\u0011P\u0002ed\u0003\u0005f~*^=3G<!1\u0006R-oPa\u0000i\u0012@\u0017)[PӼjr/\u0010\u0001!\u0017xb\u00102csFH\u0001u9>4\u0019\\,V\\&\u0012\u0019$2Q#I\rId\u001bS\u001a\u0000]vӀ(̆9Jw)OGu\u0011$\u0004-a\b+\u001f\"p=ó#7]\u0018\u0017a5ʥ\u001f.H\bw9ޥ=Đ94>Z}+2\u000fxմJ)IqՉ\u0003i\u0010(δa_\bs\u0005f$r\u000bI\u0017\u0016Skop-7\"-rS\u0017Ո\u000f\b!A\u0013]=I\u00141&\u0001RZjJe0ܯGLP\n\u0019\u0014Z\u0011@N7\u001dI㱀cM2u\u000eJŁ8\u0015ҽQq?\u0004#\u0005M\u001cS-E\u0016yBXJ~\u0015\u00010\u001e.A P|D~X}A~d(@f\u0016]ug\u0016<$#RrڿxP3\"e2\u000b57ZzzV\\~\u0017\u000b>s?4|wXR/:0գ&-5Ff\u000fY}d{/I)xL%{\u00155]\u0002r\u0016L@\u001ac`15e\\W\u001a\u001dR\u0002uiʺi{6ӴF\u0018\u000e\u001e\fif\b\u0007\u000e^\u0018=\u00026\u0014X\u001boJƨWJZv\u0006!\u0012}c\u0014\rKi*:&fb\rx}-*\u0014\u001b5~\u0012 !#GD\u0010xuafuF*}\u0015TK\u001d \f-<\u0018z\u0019oҍc(q^C\u0014h\u0012V}\u001a\u000e\\X3\u0019m:H9\u0015pc0-\u001d[\u001f˲/\u0006Q6\u0012OŞu[PWN\u0015\u0019\u001a*Npc_9ACwʍ\u0015\u0012/ECr֞<\u001e\u0002'<\"-S`~\u00054=\u0016ƭX\u0013Ҏ\f1\u0011k`@A9\fbşP\u0013E|G/\u0019\u000b{GĝF\u0018`hVM\u0003i JOٕQyBjvf\u00002̓)o9w<\u001b\u0006 |̷E\u0003\"u\u001c\u0011=\u001ch3QW\u000b.:$\u0012\u001e\u0007(2\u0001GZ\u0013/\u000eȜ%C7l'*|wP\u0005q]q\u0000*r>nUcZ AR_~4f||?S\u001a>8\u001a:I6\u0006\b:sq`ߌ\u001dF[l\bĥ\u0000\u0013v0J|\u0014Z\u0019i\u0015b\u0003\u0015\u001e\u001a(S#u(\u0003'\tgXG[_\"\u0000DmsU6[\u0018\u0017\u000bY{\u000ePP\rL$l pC\u001bbdagj&07E0Ȝ\u0016o&\u0003>b\u001e\bF\u001dLG{mѰX\u001a`u\u0019ݠx Xuf6\u0002rfŕ\"&뙅\u0016MQ$P$5*8\u0011\u000e\u0012\u001fjؙ\u0002\u000f\u001eB8Xɜ D@2Lj*mjA\u0003U\u0004\u0013Y\u0012&kd\u0014~\u0010\u0002G:HI\u0005/\u001eۮM\n\u000f8Y\r-`i\u001e\u00035,m￸_ܢ\ts*/\u0004L-2Ji(ۆ+F\u001e\u0004[[\u0013a4)F}]y\u0010qcu.DO$֨\u0011.Ӗ9Ka4\n0\u0006\u001eIHP! cK+\u0004dBsh~~[ʒp\u0001\u0017\u0003\r31旃])\u0018\u0000T|\u000b\u001f6R\u0017ver\u000fx \u0012`*j\u0007P輫\u0003+nң\u000emC\u001d\u0001\bzl\r֍`\nߐ\u0004EcA\u0002\u0010gb&\u0006\u0016\u0006m\u0006h]\u0000\u0004v Ws*lwtX\t6`\u0003Ye pCݩCS*\u0007&I\u00061:\tc+-3\t<\bidaJT\u00029\u0012v@\\\u0012PǦ\u001d,1N:H\bZt|{G\u000e\u001e)\u000bVSՍ\u001elbQ8ȃʝ\u0011<Φ\u000f2K\\=ry\u001c\n4uJv\u0017\u0007g\u0002\u001e@8󓧮9ܯ\u0001\u0011@T5\u0012\u001c&\u0011\u0019\b3Zdख़JoP%/y81\u001aUs|[*ɖ?\u0012\u00052N\u001c\u0018^ۄa>z@5ET|v\u001b*\u001f\u001a؇N3o\u0003AT\u0019L܋Kc&cO%\tǟoRG\u00196\u0006l\u0012m\u0018\u0003)\u001b(00\u0013i%-q2=nȌjDKu3D7C\rˤb줐ߒ\u001afH\f4sbL\fˬ.\u001ba%\ra zw\tCXۣ\u001c}%\u0015\u0007Aβ2\u0018 vM\u001bmۤ:>i6=S\u001ah7TXiGG{pq\u000bSd\u0013\u001a)Gٳ<U\u0005+\u001f\u001cѣ\u0015I\u0005wm\u0001 Z\u000f3\u001eV0c0I}$w3\u0002\u001f߿N}ք\u0003\u0018]?4PT7|\u0011}tORZ\u0012)e_4R\u0004\bzF%7st܊IhG\u0002J^\u00048\u0007o!?\u000f Y\u0005\u001fl%9NG\u0004̂\u001c\u0007Ғ\u000ec ck\t-\u001b|\u0012¦+\u0004q\u0011\nf䃃\u0000ɄN5\\X\u0012\u0000Erš*ge:\u0012\u000fJa#0\u0004h?e\u0017!|H\u0013oտ,Z\\Ƚ\"\u001b\u0013(!#\u0011lG\u0007r0\f\\x:k\u0013\u00145i竂.\u0015\u0010t>v@\u0006\u0005clZ!0\u001ei{ \"zj@@I\u0004X=P\u0000u\u001c\u001c(\"P\tEH\u0019w2[\"\\~nb\fi Z7w8_јQ{V&Z2\"ɀ,\u00020!?a Y\u001e#%\t1S\u0018\r\u0011V{O\u001c\u0016ߗ3-R؆迶\u000f=z659\u001ern\u0004Ξ3RL{ވW1L\n$\u0018aCo7p19%UZ\u0007g`J\u0005%\u0002z50\u0001\br\u000e49\u0004\u0001i\u001ac=P\u0012rB\u000f@gM\u0016;!|\u001en\u0011ub\u0018qd\u0018!١N7sqH0iQaC-=\u001b\fL\u0002*i$RqPr58\nλ\u0007\u0014=cd9٭+b\u0016[PUb\bf=#d\u0007oꏲX:&\u0010i\"\u000bOȅ\u000b$\u00017\u0003\u0018Vj\u000f\u001f=\u001dP\u0007{f4\u0000J0z^^wD،\rG ^cӉ\u00148^߽\u0001F\u0007\u001b\u0010\u000fS[R\u001bA\u001f}\bc.XJǑDQiI0~8\u0014\u001b>PVGNiȫ|A[\u0011&k\u000e\u000b{Mr(aJ=f EF/{\u0002%uΪZ1CT\tH\r՝aZl\f0\u0014<\f^^PNQQ\u001as\u0019\u0014x\u0001Ӥ\u001aj\u0019^6\\P9X\u0011+J'41y7XbGg$+\u0006n\u0014\nSF\u000fg`?NJMȨ]\u001dIϐ:7(-*A\n\r+\rDNYv*<.Mbi1T1n2|otTe\u0017Y p\rz8ŋw<.\u0016\u0017:\u0010OF\u001c}b1mGFș>.w\u000ea2q!=_\u0016bU\u0016%}En;<l=i\u0002%\u0005&ʆm#P1_\\*e\fBg˶dc>G7*<bl\u001fC~C\rrlEh\\~Bx}\u001ea\u0007\u0015i@GV\u0014\u0012\u001f9\u001d\u001eDS魃*\u0000ڌQ\u0007{/C,\b猖\u0006g:\u0002D,,ugx&JHGХPAj~xVLy[\u001b\u0007Z\u000e\u0002ޒ. {=E`І\u0006\u0011\tF!\u0016\u0011\rj50Ar(@\t\u0018'\u0001\u0004\u000f\u0005r\u0007>zW\u0012A6\u00040n3!1VQ~C\u0002Ō\u0019\fb\u0013b4tE\u0016\u0013\u0019\u0005iֲG:\u0011F8:\\DW\u001exך\u0007\u0002B\r\u0005|b\u000e\u0016[%}m\b5mž.IQ\u0018TSSb\u0004IRtv\fFπ\u0010k\u0017\"C\u001dP;ӎ\u0011NhCDhɊ\u0016VQ6T6\"S4\u0003@\u0015~BTQ\u0003'q\u0005ˋ-sE\u0011@ X\tip\tEJDB\tPVsU\u0013\u001dV\fqMK=|VHЊAEB[6p/AɧG\u0004\u0004)ErjM5ӂ\u001dE}\fXt_fz\u0015\\>\u001fJ͇2̒Y\u0011z<2\u0005M\u0006\u0018\u0015wI\u0003B3\u0004\\j\u0000dtLL~?8Ms0a߻6RU<g\n!p@\u0002~,)vw[\u001a/\u0004\u0014=\u00032Cmw*4-\b.)+\u0015uؚx\u0016҆*\u000emř\bd*OOLs\u001a<\u0010Ud\u0007+]r\u001fm\u001egW^2U~^Pf=n &( \u000f\rJk,F5p\u0013~\u001c0T\u001c<aFIa\u0007JwKU\u0014%(Rc \u0000ھTi9\tP\u0017v\u0013\u001b\u0000ʜ\nwBY\u0015\u001c\u00158\u001bMXxPC:\u0011.-5ƪ*ܸI{݋'Nq̞J6v=\u000e\u0007`AlGj\u001bg/-b&Z\u001e\u0012->Y|kƬ7Q!W-\u0006){ u674U\u0017i+Un!\u0010$ilH.ǃ_`vT\r?hߺx;&4d2an|t;j:\u000f1Ps\f#:?\u00006\u0010}\u001bBvcRsi\u000e&\u001cq ^Ҳ3\u0007PہhTiRgACI\u0015&\"N\u0002Pp\u0012XOZ\u0017֔\u001brJ̨ K\u001a\u0001Lg\u0015?d\u0016\fm!}5}y\u0005=\u00188`Ɏ:\u001c>cC٬1\u0001\u0007NV(\u000b-4ݺ\u001e0R\u0016ʊ\u0013~\\%Ta\u0017pQ\u0017ޤ\u0016\u0014\u0006@A8jou:5\u0011摠'{C>vpБ\u0013\u0006\"F +\u0010R|?F\u0002Ŗ\u001f\u0007f\u0001X*\u001e&աȠ\u0001\u0000./\u001d1*ǜ\u0016֬&pY~}=\u001dmF\u0000\u000bC\u0003!܋q\u0002\u000bm\u001d.WvjAPL\f\n\r<\u0002$᫄[1ڃTqZ\fs뵺.tB\u001aӋT|0\u0011RLdPB\u0017YբEuV\u0018\u001b\u00120=N\bwYId\u000e5Zz}\u0004_)]0\u0005aNT',)\t\u001d*\u001a\u0016m7?\u0013dN\u0005oU>{RS xk=\u0004{j}%f\\\u0006fIqD\u0007\tX<4\u00103[\u0015ߖ'D+CQiYKBE\u0004\u001a\u001cx)|w_뮨dJ_ *-jy;\u001ax4CC6 P\u0015\n\u0006 uZF\u00145_$\u0019\u0006\u000fXi=\u0015O!\u001bEmzG\u001e\u0019[vYƇ_:p\u0001>{\u0004^gxkG\u00176@*cf*J\u0007%\rzＯ֘HUpTL|\t:sbݡD\u0002xd\u00065꣎R76\bH+u䵵|\u0004xCF\u000e}\u0011jk_֨X\rPH\u000b!aބCa(\u0019\u000fEwKN\u001eۆ*\u0013\u001cED\u00037\u0006TIO\tL'~`kMu{z,%]$aRz0@Ռ\u001b\u0018l\u0015\u0011k\u0004a\u0012CuB1ȷauAhsF8\u000bZB\u0018\u0002ԏ\u0019JX7v\\?f\u0018\r٪D\u0016\u0015qn_D\u001cB?r{пiu.\u001e\n˓7Q2,yi\u0016niO\u0015Ld|k1id\u0010hQē;\"my\u0017#\u000fv\u0012 |\u001fp\u0000%]eyi5B\nM\u0019Wx8\u00030_GB˫\u001f=>-,RFzE\u0000hK\u0016:\u00141Xu;(ʀlL\u000bS\u00041 b*Z\u0004fp\r;zKq.'Nʙ2ϔ/y\\;y&#\u0019I\u000bAӇ\u0011Ӱu;Y\u0005\u0015[K>vk$=Ĺ(nq\u00180tZ\t\t\u001dҫ\u001cE\u001eQpC\u000f&*iͰ-\u000bv*C٪k}+Z\u000e\u000f\u0004EoLRoQ^]\u0012\u0006+.ʏksW\u000eF\u0004\u0000pVSU\u0005\u0013Sϗ\u001e\u001e{A+E6D@j\u0002N7\u001a%n/`8^)\\\u001bEۡM1#ax+sퟯ\"g\u0003NY}GʴF\u000e>7[\u001dJ\u0000DH{\u001ajz\u0010ڱ1#\\Q@:n'IS\u001a\u0000穹}AGm\u0002.gQ\u0018t̖3U0UG\u0003*{k?,8gl(9s1\u0010;6WMX$\u0016M`ՏWd)eY\"f:!\r\u0014l`D)\u0019\r/IxIS\u0017٬L\u0002lɪ\u001a\u000eбR\u0012ч[\u0003x\u001dʔ\n\"\u0003jz43[B\u0010V8W\t6^`nTr\"ʇva}SCJPK2\u001ecL\u0000'1`t-\u0017\u0005p\u0001n\\R`\b\u0016;9\u0007ΐ%^ݭ(\u000bhdHğJ\u001bQ\u00024R\u001f껕L\u0005 \b5%I!͉4ea\u001fڎL72h\u00009SR\u0016\u001b,G?<\u000b8\u0015\u000f\u0015\beG5\u001fo\u0005_i\u00077I?_<i\u001f+\u001f__\u001f?_'+???߯z]\u000b+? DX`vl\u0004B9͍D:ntT(TKx\u0011рA.\u0015/;rChpQc\u001dK\u0006\r\u0004]\nw\u000bx`J\u00041^6KĢ\nex@:\u000fnʀD'\nuK\u0002aUR\u0011\\\b\u0000!oz]-:\teR\u001a3\t9\u0002\u00144}٣_B*\b,q;cc\u0013}-I\u0019!\u0011\n3]\u0016h1EJ\u001e)=\u0016{֘fc 0z)4H$l\u0007xъq%ƾQE7\n\u001bd$z֝\u0005\\\u0002PIϢ\u001f@ä\fPG)BX&R7⧡X\u001apUܠJ\u00028S!~;\u0010+\u0016~\t\u0004LH)F\u0002~fӵDPJɆ\u000e\u000b&Ë\u0000Z~(L\u0012d\u00172\u000bKzS_Y6sQ\u001cQ-e=UU漎􎠋j_?\u0017J{@@M;\u0014mmO\u0011\u0002=C+@%:\u001c|A(v\u001f?-@Ge\u001cP^\u0011vhvbLdв\u0012AF9a?\u001c%?|Z\u0018CTc{,\u001e\u0001\u001f/\nOXXBXV!>Ʃ{R҂\u000b\u001a\u0013X7\u0019\"\u0010\u0013p+#ݫꨉwŻ~LiW\t\u0015,\u0001\u00123vA<%\u001c<\u001awL5Мs\u0000Vz\t-%SΔXqҙ\u00135m<\u0016_S`\na5Ѱ[*\u0019y\"\u00051\f$_\u000f¤TC|\u0014imz,3\u0012M\u0013N\u0004xu\u0011=Nw=\fc޻\u0001O\u000e{c\u0002F\u00165:LKNiErHT{<qi#cW\u0004q EԃaƇ@_2\\\u001aBq4\u0002Vkh\u0003\u000f}@\u001e%(\u0014\u000ed@@a\u0014\u001drV\u0012\u0017\u000b\u00168j\u0002\u001aP\trzfWK\u0005\u001ba2IG*|^\u0002[,^zc6F痧\u001dXz\u001ezIe%\u0018\u000f(`mZA>M=\r\u0001\u0003ʓ\"-(C]._\rJ\u0018\u001b\n\u001a\nNt]B\u001f\t=B\u0002\tKkGN%\u0003@D\\KxlxAaa\u0010ȬN#\u0016\"1[ifĄ!_?ya\u001c\u0006\rĽjBYKTs}@\u0018֦+L,\u001e3.D[\u001d'p\u0001\u0000\u0010\u0001\u001a\u000eHb&$lm)\u001f\u001aY\u0013ѳ.nu ?\u0005T'\u0000PEZǹ˴\u0015K-=VT2~nt\u0000>>oAR\u0019\u0007\u0006&\u00188A5z,tA}uP6ODn\u0001A\u0004,\u0005\u0010V\u001bo\f\u0004\t\u0019~l\u0017e^&F=O{'ɻ\rcz\u0011u\u001bsR#5.\f1\u0007`\u000f)jۛ xF*Ii['Be\u0006Z-7B\u0015bJ6e\u000fY.Ȓg\u001d6\u000e\u0001#\fMhT9y-ql gGD\bñG1k(ɳ;ŝ\u0018ߏe%<\\2I@-,\u0019\u0004:o¶\u0003\u0015\u0019Ml_W\u000fӆ8\u0015kc,\u001b\n »KJGA\u001a*HT\u0015\u0016oM| IF\u0004-~\u001d|\u001c\u001e;w8Z\u0007\u0012\rА4Dp\u0010Q$6`#\u0018\u0015\u001fKv\twU\u0013B)J~E\b83wՔ\u0004J5G}}Y\u0019\u0007p$kI-\u0018N \u001bra\u001d!\u0006f,y$\b\u0002m`$xS-4.\u00177l\u0011|b!*\u0011}\u0019ex(:fk8\"\u0010ʊ\u0019\u0000(ThV\u0001Y]c\u0003\u0007\u0005\u001c`MƯZ\u0012[\u0006\u001cnJz:m_@Vk(B$hwiUl\\Â|lFWXs媲q \u0011a__:q~V,៯Zg\"\\B\u000f>>?ܑ\u000b{\u001b\n)\nPyT\u001d\u0014H\u0010|->\u0001;ǆ`~\u000bH^\u000fF4T$*w2lR\"=h\u0000=~!N\u0006Dhh\u0002\"F=Y\"aA\u0010\r~~\u0013D\u00072ȔudUaX\u001emoB\u001b\u000bP\u001f\u0012\u0007\u001f$RP\u001b+ڒX\u001a\u0018\u001a\u0013\"`?URA*tЎŵEXR\u001db\u00131IrN\u0018z\u001fEo\u001dV\u000e\"wʾ!y-ithM\t{\u0013uY@vE\u0005;.KOVkv\u0000\u0017kHЖ0W<\u0002D[e*9`i\u0015ޓ!l<ZќtcLhեAk:\u0018\u000e\u000f\u001eAZq!E\u0019\u001e\u0002:\u0018f4\bĵ(bO~>e{\t\u0000E0\u0016ڠ\u0004g`%3֣+̏_\u001b?^Icg\f\u0010\u000e_o,bpǸ\u0011*lOD\u0011\u0005\tJ\\.ZaO%ǘ#|Po\u0002ദV\u0004X:\u0003!8m넌[\f4hήyO%J,w=V\u0002+b\r!\u001e\u0010\u0003@7fY\u0001K\u0003B\u0019*\f\fK\u0017MAx\u0012\t\u000ebgV1*\u001e{IBA]th\u001e\n\u001b\u000b\u0017w\u0017c9k}(8RzV\u000bOY*9\u0012pgƋ\u0006<@7piD\rK-y9}d,~iǷ'DR19XQ)\u001fX\u0015\u0000lE\u001b}k\u0001Ȗ)Q{*\rh\u000fLH#V\u0015#`J}]{ÁPvF\u001b(1()e;Vl[K\u0005)\u0015\u001b%\r\u0000T S\u0005ύa\u0019WDw\u0012\u0015\r,}LЯ\u000f=v'_\u0014k2>\u000ed\u000fsԪ̻~\u001e\u001f\r7\u0019\u0013iUm\u000374|4oxo\u001f:\u0010\b\r{߲\u0015o\u000b*t\u0001\fJ?%\u0001\u001f\rHw}3\u0001P\f\u001c\u001c[nўg\bLlQgy}m2nfҲ\u0007x#1I#j\u0005%heߌ\u0007~p\f6i_8.<\u0001&P;kZ\n\u0001-Agm\u0006\u0006XM(\u001eH~\u0015h\\|Rz`!\u001d,I\nf\u0014䚝\u001e}Gf#}\u0012!.\t\u0001\"\u0016\">\u001b|\u0007>Z7\u0004yMO'\\\u0006\u0019\u000bTbi$3(\u0013L߾ve\u0016x\u0019~4L3_\u0015>\u0000LMa=%^\u0015JFPު\bzv}\u001ai\bT\u0004#N%\u0014Z\nWXU>?%X{\"\f-\u0006>!\u000b>@\r\r0ӥ=\u0012s7\u001f{&Q`vqmN͗.\u001ci.c}#\u0006\u001b:w<KU\u0015ʭcr4(zP\u001a.`,\u000b~\f-.@lc\u0002\f\u0000OFT%^\u000f\fTm4o\u00107\u0013i,A/t\"0@#))u01\u0012KJ-Id9j\u0015Y.,]FF\u0012,T<Y\u001f\r_|օU-rpu1\u0003(j\u000f݋΅\u001bpFa$:W\u0003.9t\u0010CN_0fm\b#\u001e\u0004)DL\u0003lmsZ\u0002Hz\u0015Go빍$_'Q\u0006\"3K\r%m[ti\u001ad\u0011+\u0004q\u000b9<\u0005\bМyF\u001c(@kp\u0001!Z~\u0002`5\u0005\t\t&\u0001\f.݊X똷a:wQ\u0016\u0012bQv~O`\u0012K\u0016\u000e̙\u0000@\u0006ۉ\u00155 !WQ)e\u0003f-zl*8@D{v;Q\u0006\u0012O\u0013cT/`\u0010r3\u0011Wsc\t5\u0000$\u0001^=XOyU>\u0000\u0000,uUc\u0014?ƴ\fܞpW'<2d+\bkѕn?\u001bS\u000eK\u0014@6RA|\u0002ܐ\rnJ])c\u0015L\u0004y?Ut5x4Ԟ2jlb܈)\rY|\u001f/!\u0006\u0002<Z0P @,|x\u0010Z\n \u0007#x`\u001bsWȜ(\u0000OP\u000fY9\u001cj\u0019߮֐P\u0016t>4\u000b\u0003Skpܖq&bK\b$3 \u0010ܯ\u001dI<s\u001a\u0001h\u0010\u001fNs'|-%^\u0000(E\u001bYb\u001aŝ(k\u0004\u0000\u0002k\u00194!\u0015I;ۣ~Ne\t\u0017\u0004LF\n\u0001ŷ*٣V\f(']\u0012pz!&d|&~$^);b/AD^aI?A92e\fAmz\u0010\u001ff\u0000)ZggY~j2\u0003_sm+d.[2S\t@\u0013\u0010=D\u0014I\b\\(|s[\u001eE\ni+Jye\u000f-]p{\rϾ{\u0000\u0001u\"tK\u0018/w\u0004^%\u000f(\u001b,ܘSpzk\u001fϬnj\u0004^֐Z{\u0001d쿪r+VY=\b7\u001by\btT31|ܭͯ7``\u0003\u0006^q/\u0001\u0007-0\u0004bp\tOZ\u000fvLyꅔB\u001a9|\u0016\u0002ϩ\u0010O\rQRoܔr$%v~{\u0006'qO5JQmDOh^{5\u001c\u001aU>w\u0004WC?!\u0005\u0002[J5\u001f@\b+w)?\u0003Umz\u0018{/\b\b9~\u0014_$@_\u0016Vt\u0004\"^OLF$'}b*qNÁέCmڿÈ\u001e䎏\u001eRڶ`E~VZ\u0007ij\u000bTVgd\\]Eq`cRv\u0015PCTvC+(\u0002\"s\u0011t\u00021Zpu\u0001\u0002Y6顢\\`\u000ei'u&\u000b\"u\u000f܈e\u001eS\u0014=7\u0011\u001dOT&]b_\u0005\f\u0006i`֍{GŰ`udwi\u000f-ryƒ\ntlŒ ɸ||϶gzz\u001daܻqUk_\u0015\u001du8{\u0001p\b\u0007*1Jd{F:?UA^\u0016Au\u0014tҵN*ԗedsA$\u00135D\u0015\u001cߵ\u0011Զ\u0005|5\u0013jc|6\u0010[Bl\u001b\u001eؒƊ*=-\u000e43.x\"$?^\u0005\u001eTK\u001cǱF7\u0005]%-(\u0006LM\u001bp\u000bj0`\u001eCJ'C<v*\u00174hy\u0015jRv\u0003A%\u0007\u0017\"\u0012\bScf\u000feid\u0011U7nne\u0014C\u001a*\u0014>(KƮ#pHmQ֊\u001ed\u0007\u0014\u00163\u0014߻aS]3\u000012i\u0017*Ү=tG6[6CÁgj7RxHU\"B\u0012=\u0007\u000e٨|RI_\u0014JR\u0004-rb\u0003\u000b1:P\u00035gc9֔\r{?\u0010jlfl\\ߩ(`\u001ex;ѭa\u0014vz>=H9D$.\u000e}Ne\u0014\"Q\u000b<!9\u0001I5R`6Z\u0001\\\"[jl]\u0016H\u001e\u0017\u0003pVB\u000e \u001c\u0011N\u001c'(2\u001eЃ+Y\u0002RT6R{\u0017~P}J\u001fG/\u0015FW\u0001Nܚ;r?PkN\nI,Z}t[00\u0012SN0#b\u0017Oᗓ,\b\u001fl(cgK\u0006\u0015\u0006k!TŤ\u0002&a̖P_[,4\u001fTل1\u0012\\oZ\u0002y\u0019R\u001akx\u001aF'C7Bn\u001fܓ@ACܵ2x]=vQm|\u00033\u0013\u0010k!Gɿ\u0006EQ\u001e׆E\u001fx\u0006~Z\rx ώ7\u0001\u000b&ʠ\u0001\u001ehS-m\u0015Nvڀ\"ef?Hg}I|ċ$T}Ie\\5ҵ\fħ]\u0016\u0002\u0005\u000e*E\u0014>'\u0004't<\u0012|쐩>#hr)5\u000f\t\u0010\u0013\u0006bי\nي4Ǭ\u0012\u000f=H/g!9cZĩ[J~YMGI{}!`7~:\u0010\u0002m7`\u0014?ح?fJ?+2?`s#@ HW侪\u001fbRȃ\u0018)\u0011\u0006$l\u0013\u0010\n\u0000cbfNAQYl\u0000޻A/$|\u0011\u000fNC@ITMc-\u0007~\u0011e@XYWM\u0018|rS,[Dj^wI8@}\u0013Sh{z'X߻iP\"\u00199v\u0003rI@\u0012\u0019\u001auH\u0003\u001dάU$\u0013aDcZ ɏ[bEn\u000e\u000er9*1=\bu{M\u001c1x~բ/1?\u0014:\u0014\u001be\u001cy\"n\u0010\tX+*;\n8d~Hj6\u0006\u000b1\u001bW\n6DAҩ:\u0004/\u00111\"4\u0002+\u0011\u0007[\u001fze&ųŮ6=҂\u000eE?{\f򽵮T|QR\"\u0000ɼVnϕX_+U}~A2r.#ux?8͞[\r^9y~\u0017V\"x\u001f\"x\u001a&G~)\u001d7Ƕ\u0005Mk+<r\u0001e\u001bǼ\r\u000f(rvǸ\u0006G\u0012܀Al*~\u0010\u001fy\fM\u0011/\u0011\u0000T![yli\u0018cP5 g\t`qO])\n\\}\u0007f?z*S\u0019bX\u0005[=blNӉŷ\u000f5$7D\u0014\u0004H|ULeִK賧\u00113:)o%a^(@@`+\u0001Cd|Pt8\u0007\bc\u001dL%D\u0015L%\b5KǹTըZ<mweIVɢi]r-+Sw.\u0015\t~_p)\u000f\b\u00047B\u0007]xz!O}\u0003w:NY\u000fu)[!\u0016\u0017f\\LX \u001dT\"\u0000\u0003pjq9u818\n\u00123~l<H\r\t菀lO<\u00141U]@ɉ\u0006\u00198\u0007\u001c-a9\u000e|<ݎݚԥ\u0018d+o\u0012@\u001c=*`Nɶݎ\u001d,W\u0004\u0011Q!\u001dXLUQ\u0005˒e\u001e\bKaXaO9Ф\u0015\u0004H\u001e@J:ߡ-\u000b%A&h\"֝2q\b/\u0018\u0000&\u0000\u0006'1\u0006\u0018z\u0014o,WPSnL\u001bס\u001fkzZ-h&\u001e,x~*j\u0018yG\u0004\u000b\t\u0007i_V\u0017\u001c'X]uņ26bX²:\bu/o\u0018\u001a($\u0011!G\u0002\fG8ۢ0\u001eHH\u0015J0MbITz\fT\u0010U!jy*eu)J(UPBO{}(y*\n\u0001xE\\\u0007x%%\u0003F|-%d^\u0007,uNN\u0011@DLg[^FdbMp8gF*L\u001fu\u0013]e<CU\u0017Z\u001bA%,I&+\u0006 \u0018w\u0006\u0012/lM2_\u00116ȲvXCp\u001908\u0014TpY.a`}c\u0005\u0019y>:NEr\u000b~ZΉ\u001d\t\u0010Ј\u000bmv\u001f\u0003ue:؉0v1G\u0003\u0002GT\u000f\u0010\b&\b\u0004?#)Ku\u001d\u000b\u001f_o )j2+l@j\u001fd`!\"r`s\u001e%W\u0010S;fNN@\rD+=r4\u000efy1ۃ0\u0003zo\u0014\u0013jr<N-N\rS`@f47\u001elҌDv\u0019:\u00172͜\fWnH\u0017(jOU\\sZ\u0001$\u0003:x0U\u0018v\u0003R霚\u0014cW\u0014ԚYh̒\u0004|Z\u0012q5VP76R~\u0000v~LD,;CFiL.FU\u0004\u001a\u001c\b;rg\u0017㷿\u001c{onhBcX-L\u001d9`w\u0007\"\u0001e\u001b,d\"O9ԕH\\~$q \u001c˰3o?`c=\u0011\r\u0007ӑ\u0017>3p\f$iCbqbڰ4\u001frA\u000f!)4\u0001bU̶EK\u000e*\u000bq\u001a$}pkY\u001b\u0006e<\u0007Aq@<\u0014\u000eْ\u001aV\u001d\u0003赙W{\n[)\u0013\u0012.kf\u0003/(.鉾I\u0015,O2\u001cqj]Bat6Q!GnaVjvTHH.je*\u0007cj\t'\u0001|HT\u0002{\u0015\th\u001e\nU\u000bw7=UY\u0016ݰNqc;\f\u0007B)=WI_1\u0001Z1n{f^ˬP[U\u0007xwwr\u001a@hBcqHG)+\u000fvm\u000505=@%*KMR.\u0017\r\tHa\u0019*3\u001ac!\u001eXav=B*DȣZb\u0014Ek1\u0011c*s\u001eؒ7\u0018 e\u0010\u0018#y\u0002g\u0005\u0016Ht^\u0007\u0001\u0007,!\u0011^#]\u000f%K\u000f=+Pc\u0003_gb?D/\u0007tk\u0016ֱiymNPҜ\u0000M\u001ar]qzE(E\u0005\ru|\u0016@iiyúJ\u0006\n\u0011^$d`b\u0014\tށ|5Xp:\u0013Ⱥ@1eVRSF5*$\u000f\u0002£;\r`@36\u0013b\r%uh\u0013(&\fb\u0007i\u0003n\u0015V\u0007?T\u0005k\u001c@l\u001c#P\u001e6J\u0014\"e]]ۖ\u0001+\\{&\u0016//n\n\n\u0012r>\bt:\u001b\u0002)57X~\u001fܐ\u0014lZN\u001e\u0004:\u0003*\u0001ݒ\u001ce1\u001b*x^ʭmhqjgD8z{\u0011Pyk1Q\b\r\u0010_?IUҒ{ME~)L\u0011\u001d\u000fT\nI?>+OH\u0019\u001aa!D)pIxÈʓb<XBs\f٬X?䂨\u001fNj`gIVL\u0012\u001cN}c\u0012\u001f\u0004H|Q\u0014\"!9x\"Ԍ\u0018\u001a%\u0001c\u0007+\u00149-P(h\"p\u0010@\u001f\u00034qn)\"'KÝ9v8,I\u001c\u000f6DN&o2t*j^YbvW).\u0001TF$l|B\u0001Zx}\u0005RKV6Ѭ\u0007\u00078\"\u001c׉<?Vpw7<ɀo%UQb+>7\bq0\u0012\"?\u000fv둤\u00064\u0000\f&[\u0017^fbYNw\u001bQ7\u0016-B\u000b\u0014fH+\u001fEM\u0006P5~\u000bf;ОIq\u0002sC+FՄ\u0006\rt)0}D\u0010E#t/xm\u000f\u001cGIq7t9\u0010@8J~\u0016B\u0003=T\t$C]kz\u0018E\u0000{o%\nM\u0004HvJomz9\u0017a/w6\\;w\u0002+;1Ux!ذv|ʼ\u00014&&\u0012\"g\r@&c҉q&6o+nI0$\u0010\u0002V\b*KF\u0019\u0004\u001a{O$\r\u0013\u0010*oꤴ@kWӹ.88\u001a\nKYp$͠[iZa9Q\\ߖa\u0004:^-K6;rI]a\u001f\u000e{X\u001b;zUZЩ\u0014=PڢS\u0017OG\f6}\u0013vuXޡUN\u0002s\u001c?<qL?ՆGqV\u001dlV`4\b:%\u0015&\u001aؐ:\u0014fTlx\u0001A6z\u0000 lNv6N싩`A%:\u0002MvCa563_\u0010о\u0014o\u0013\u0004F2߱HߘH@H\rEkaf\u000f\fK+*\u0002\b\u0005\u0001˶<s\u0018őP\u0000*s\u0001X吘@\u000fi|\u001d\u0002nX\u0012ލ,a\u0003@\u0002$jztQ\"\u001f$USF'ٕ/lz%\u0017:\u000ec@'K)ĵoD/!\u0012Q'\u0000H \u000e\u0004,\u0016\nuT`\tA\u0014\u0016\r/\u000b=\u0001(^n@B}d\nECJP\u0011PoWY\u0017\u000bdSt\u0004~J(XtŨ\u001d9\u0012\u0006X\b!\u000bԆM6\t?WKÖ\u0012iO+2^S@\u0014Y\u0018\u0012ݰbf<Fju\u001aں\u001c\u00069\tz8;Cr#\r_V\u001a\tdEL/7҅g\\E2@/^#K\u0015Jx{|zQ-9\u0001xv%4K\u0017.D8\u0017kޜ\u001c\u00107\u001e\u0019֤D\u001a@+\u000e\u0018#\u0004q3%T\u0003I\u0017km\u0015mN\u0010;|k.Me\u00100gdm,ܰs/|%.u!nq\u0011q\u000bK\u0007g6s+t5x;I\u001d\u0013 i\u0010S}(бY|v(%&mZf\u000b#\u0015):\u0019ix\u0007\u000f~iZ:2c.gFd\u000btSMi\u001b%\u0018tz\u001dP\u0014Q0/F\u000fْtMA]\u0019\rgbVȒ6v~w\u0016th7\fA4U\u0001\u0011ɂ|~\u0012\u0002ARg>8WA\u001cݙid\u001eBAz\u001flZ1\u0002qH`\u0011,[&\u0015(^b\u0012\u0019D[E\u001b\u0002*dALe.\u0015n=;v!;/\rVS\u000b$[\u0005_C\f̼0%\u0007R\u0013dV\u001e\\0<\u0000\u0014\u0005\u001a>c`4yCVА\u0013\u00035g^\u0016KZ\u0013Vem%\tKb1!\u0014TMv4ai|CD\u0001x\u0014>R\u000f\u0012J\u0012\u0014E,OBʸQ\u00111meoKSΓ\t&~*Դ(S\u0015hRՌ\u0011h[M0SI\u0001\u0000\"EDR㖥KZ0v- #&M͏x\u0019^wYLn'h9\u0010H.Pia/\u000b\u000f=ư~\u001bc\u0006\u0012ӛ\u0018~tbW|w:\u0015=\u0007a\u001f C\u000flou,RF\u000eUV\u001ey\u0004dG-{\u0003\u000b锞\r#¼Mqw:i\u000e\u00046\u001b.f\f\u001d'b\u0001\u001bѲQ-\u0014G78ʈ.Jm%)I\u0013NRlg}n6)%oZ\u0003ES%bRb\r+ -\r\fI\u001d]&\u00123Ј\u0014k\u0016tk8swXw\u0007/\u0012}\u001eIL\u0007g3jzCSo:UEk.\u0003رbth\u0006\rJBcLԝس\u000e~Gn \\\f`t;CS\u00191$ 2Hdy\u000f\u001a<--Pƀބ\nSе!@S\u0004G\u000b\u001cFފ*!\r^\f)\u0006M\"D-\u00137\u0003$\u0007FG Lz4x\u0018G=\u00076\u0003Ϣ\u0011\u001dx\bK^xҪp˯k.=du\u001f\u000eGO`2^׌t-8RU2b\u000ftreeYС6?\u0011ljNw;\u0000|SRB\u0007\u0011.~el\u0016_ʐs\u0001xJKRw\u000f\b{\u000f:-'\u000eCTcYSRjOv'\u0005O9yJ&v\u0017*hmŒj\u0018xf\tb'\tW\u000e-,N\u0012Bvf*\u0011\u001f\t\u0012\\H\\R\\qndiRt*[}]\u0012\tn9+^3P.Z\u000bx)W\u001e\u000fx1d\u0016$-0Ïu1͏~k|t`\u0002\u001fyA\u0005$T8\u001dԾRJ)ӂD.\u001b\u0014\u000b8R^\fy\u001aSO^n\n/l\u0001\u0003R(&B5\u0010\t+]1dʛF=H\u0019Jjz\u0019(b\u000bF\u0003'@,\u001c89Y%s-\"QeSe\u00074I%xGCX<7w\u001a'ŗfk ̣*-\u0003r\n\"\u0004KЕٍ\u001e`7WHXPB~*V\u001dţԇ=s|\u001de\u0012綇v!*\tH`y\rx$ֶޕŋk\u001dzђe\ns4{0s\u0017f\u0002Ϭl%c\u00182\f\u000et\u0001\u000f\u000f55\u0015m\u0005xa}Q\u001bPȻ\u000f%_xnȇ3%rB\u001c)˞VG\u0010\u0019҅J2k\n!\r_hK42\u0017\u0004\u0000E^Xb]a\u0015\u001f/N7iچgq\fv>֔\u001fK^)d-J=S ;?&~\u0004I+$[LK8oй%BzV78SV:\u001dD)V2Ly'׶ij\f\u000b8\u0000\u0014\"]]2TFjt9\f\u0016KJ^\u000bB\u001aπ>|>\u0016mk\u0016h\\\u001c$1\u0017LB\u000bG\u0014Ǒw\nˮ!8~<lٙ\b.j-֖3\u0013@,\"RFJ3(R\fꑭ\u0018=7\u0011(Cزi<\rflف4\u00127KY\u001e#nP^\u001c\tTr&\u0017\u0000M\f\u0011)}\f[M#T29PVq'Hnh8456\u0014Dz;\\b\u0004t%%Z)K\n\u0013#O5WJU60\u001a\u001a40\\\rj\u000e\u0019d/BUo\n\rGdg$\u0018a_\u0001Hv\u0013~\u0000cS\u0000K\f\u00056Ba\u000eS:\r@4\u0014u\u0003~\u0003 \u0001̙\u000f\u0011pR\u00149(2|O@&<\u0015jh$\u000f(\u001dw\u0006IB귖21]' \u0013T\u0000e3)aU\u0011\u001dH-CK\u001eH豵|\b%X1W)̃b\u0003`F4qDql\u0018\u00048Q\u00158\u000fQ1ߊCqc\u0004l2ii$L2Xb(@ΰO{TB\t0\u0010[\u0006ݕڧA\u0016g\b\u001ds4\nl\u001bYz Q9xUel\u0017\u0017tð\u0007)(]B\u0004\u0002pXE'\u001fPFL骣6+y<\u00183K1),p\u00005N)GLU_#\u001fJ_\r\u0005Ҿa%k 7\nuV\u001eਉynDҥV{\"X1c\u0013\u0004Q\u001dVp^\u0012\u0018v0^4n\u0006\u0002e_*8j3i\u000e\u0004\u0004\r\u001c\tv\u000ea\u0010yF\u0007T#\u0012E5N.\u001e넰k#\u0014\n&\u0018=NOXKj\"+p|J|\u001f\bG\nlO\u0016\u001c;\u001f0\fYC=LE?\b#!x0\bMsu\u0015=0Wij\u001bg\u000b\u0000^0#h{HͭJn\b75bHlM\u001b?m\u0015\u0010M^\u001d(a\u001doNQYr=\u001c\u001c{J%h=asTgȑ&V[%\u0007z[\u001dWڊfkt n\u001a%%Ko\u000feg\tb\u0004ju\u0018+K=Q?S\u001ed\u001eDQ3q`\u0006QìR\u00044NR('$A-\u0000*C5Q~\u0007|[\u001c\u0004H\u0015\f\u0010g\u0011:oúן\u000b\u001bsj\t\u001aY7nH\u001a\u000f$51&e7N6B3w\u0001\u0005.E\u0006\u0011R;S@MRIE9\"\u001at>\u000eFP\u0005q\u0013?\u0014C\u0007p\u000b~\nn\u0001UGVyٱ<^\u0010\u00050*_B\fy8-Q͵r*4pS\u001a|Oqei{qs\u0012h\u001at\u0012-\tr3\u0014]\u0000Vf\u0005x\u0001\u000558+.ݱ-&HC27ThQu b+\u001d}0w1E\u0019-E=\u0010\r{=):\u0015]j*uKS3\b\u0003⡲P@^\bd\r^?F\u0004\u0011ex\u0010Se\u000eWfh}\u0011?\n=Z\b\u0013RY,xvָO\\\u0005\u0003\u0004fP{\u0006#Mta+V\u0005\u0013ӈ;uj~.9ug+DS6JD\u0007\\xH\u001bornL{7&s'M;+i*.|~{_@殜U\u0012,8b\u0014x\u0001(\u0010-/\u00059-\rD\n`\nF\u000bvpҚ/4\u0000V,\u0014^ѕ\u001c\u0011@\u001bk\u001bg#\u00171s\u000ei[@/ N%%'7\u001apƳzҩ}{\u0014h_.\u0014AE\u00134,yƚ\u001fsrÚyVր\u0015\nO%vD\u00183\u0001\"Prx>pG\u0011ӭ\u0004\u0002Lr\u00004Z#N\u000b\bf2\tk\u00079e\r1n~u\u001av0@a\u000fVbZ\u0015>\u001cF>'˭&\bkm~ë\u0012ldRk8:u\u000etd'tP\u001br*\u0019\u0019$|D\u0017&~g\r*\u0018\u0011Vh,B.x\b[ ,7Pb\u0016|_١(\u001ecK9ʾ\u0004ri5\u001b\u0017X[x6(M\u0005^C͆*'+q\u001c4\u0010\u0010\r/\u001bd` }#Wl:~yz\u001e\fցn&-gų~\u001fN`+;e_H?2\u0005\u0004#I\u001d0\u001f\u0000\u001f\u001fYy߇{k%M\\\u0006}ղz+eIGϜspku\t\u0017g\u001d>rOq|ܺquA\u001f\r\u001d\u001c\u0003\u000e#\u0018[\u000eM\\KN$q\u0018\u001dˇ֘hz\u0013pzM+\u0013@5\u0006qbTQ]Mċ&OUM\u0006@0)\u0015D\u0003pk\t\u0013\f\u0014SLК4JHӬn\u0006KˑP#V4\u0010/=\n,\t`/\u0019ˀ(\u0019e2 \u0007!q^)Px\u0006Dz7}r\u0010\u000f\r\u0003,V\t|ԧJr3=3R$,gǣO7@'\u0015v򽅱ɗE!X\u0005uxy{xe\b/DAK&!D\u00159'W?bQ%HZְӗV'żzf\u000bݴ}\u000f'Y*\u0018\u001bq2H<\u001a*̈\u001bq<+t0˕Z\nBƾ\u001ceA\f\u0004ydh,b\u0017O\u0002+5\u001a\u0019'uwtkPVb\u001cH7~Q'dubwMq2o\u0018Q\u001aѥݮpaBbcc\u0001\u001fv\u0004QEH$j0\u001ab\rҎ\u00015\f\u0001\u00196\u001a:\u001a~kb\u0017\u001dUQL\u0010Vܾ\u0007ZS\r_C]8\u000ei.K]YP/`(\u0011:)X~e^kLW]\u001b6\u0001,\u0010nʼ\u0002?R-0\u0010\u00147\u0000>{t-L4Ġ\"\u0000E+\u001afnٯQ\u0019\u000e\rc>R'\u0017\u000eJ\u0014xT-=\u0012\n☉щݥ`\u001e{\\w1\u001cBH>\u00032U/\u0012S#MS#yoI.$nc\bdW\u0018w,\u0005kz[M\u0017i2CHn?eT&cݨ/OTP@wA\rSG\u0006\u0011\u0011΁\u00005G\u000f\bA\u0003&\nݳ%Q\u0004\u0000n\u0016\u000e4r\u000e!LlYέS@ht48@\r;YaI\u001dh>EN*c\rRe:DI>\baH:eIK?\u0014My\u0002ty!$PL/nc\u001b8>1ӈH\u001bk1\u0001 S=twe\u001f\u0011Ȥtǁ6+\u0006(s/b\r.n\tb8\u001ezG7\u001aRv\tw\u001e\u0000\u0015\u001d\u0011R6Ҩ\u0018fH\u0005KuƖ\u0004\u0013\\ϙV'\u0007L\u001fz3RJZvI2\u0010\u001bF\u0006nRxJ-\u001b~r(56S\t!\u001aM ':\u0007{l\u0002\u0004tf`d%z@k\u001e3Gh嬛3Wg8nrNs\u001fL,ܓ\u001cDw#n^ۦjV\u001ezEn6gfx\u0006y\u0002X\u001c\u0011?\u0001YplM2\rx.\rթ\"\u001a߿nhU\u0013@\u001ddi\u0000pS7$MGإ@\u001e<G\u0002\u00005O=\u0013^n\u001eՎ<\u001eZyil\u0012\u0019}\u0007`ʝPҤcҋ)re*f\u0010dE\u000f%®i\nS1\u0013x]K\"\u0002TA0\u0005;T\b^U\u0018$(_\u001f H7Y4x3]bݤW]\u000b\u0010\u0019\u001a\u0013PuH{k_2\u0003nL\u001aV\u0002!\u0012FgF[\\\r$D\u0004E\t@\u000eL\u0019Z96z/}]\u0007lPy\t\u0018sQ\\-&f\u0007[mX\u0013p$\u0013\"1O9CDC#F\u0004\u0012\u0007\u001df(\u001bkT?L\bU6\u0015\u0011G#`<%n\u001b\u0019I^.}\n75D\u001bRsV88H\r#\u0007pRn\u001e)/зX\u0004=^4 Dݱ1Rdn}z(:\u0019㶌H̒\u001935p3n4xU^%\u001b,Æ\u001e_[\"U\u0006`&K&P\u0019*\u0010ǜ>V\u001cCL\u0001C\tp\u00001##\u0016*3\u001d\u001a`\b$\f\u0014\b咙PѢ*Cf:qP=\u0014C>\fh$Ң\u00137HE\u0014#pP\u000f\tvܙ86fI\u0018TV\u00159!\u001e\n\u001f\u001e\u0011\u0001Ѓ64\"Py*P4d\u0012󸫩w\u00066ֹ!$8ƮFGP:rQPe\u0001|\u001eJLt8R]J\u0002ʰ&:\u001d%Z\u001d\u0011\nIA~6}\u000b\u0005z>_!\u0013V[\u0001a\u001d#F\u0003\u00036\u000eXOSI\u0015b0&ۑ\b=RS5\t\u0013\u001b(qՖ&pxwˢ[ueS@c:&q\u00159\u0005\u0012<w{\\'ˣ`ު5h|ɅS\u0017y\u000b\u0010kV\u0016\b\u0011'3v~?^\u000e'k\u000fg?(71j~f7XgYBUL%+w\u00046a\b\n\u0000\u0004ǖ\no\f6A*aD\u0001s\u0017S>z<Cgi\u0016\u0010wpԍ\bFhKЕ[\u0001\fe:h\u00025*\u0018i\u0017`^N\u001b:$[\rEp7c@W\u0006\nud%\u0004FPT<1ȥJ%T$ni\u0004_F;{\boXQ||9Tg<YEKZ\u001e\u0001\u0006p\rf$S'\u0006\u0017%M@(?\f. =\u0019V4]_6\u0011\u0016\u0000@\u0019\\@\u001c\u0000\u0001z_{\n\u0016$ϩ>Ay\u0011VLU\"BL\f\f\n\u001b{f%[b>{\u0000Cs\u0003O\u0007\u001fnUhgb\u0014ԡ94%{X\u001a\u0017\u0004\u0007{ht#e$3Z\u0014\u000e{i\u001exD̅x)C\u0002~8\u0010+Rt)<(\u0002z؃\u000bQ\u000f\u000bm#\u00056`\u0014Vr\u000649\u001f(ir)\u0010.y\u001e]7Uy?ЭY\u0006/~dUTO\b@̓AS^>XU\u0017?u\u0003mՠD\u001a톊\u0003i-{\u001e(4\u001f[v`x\u0014/\t\u00198?\u0005Tz\u001eoW\u0014cШ\u0014vdL!3U\t>QO&\n>\födʢ\b1=<๊匵m\u000bqu\u001eu\u0018\u0015Z\u0001\u0001飛(US\u0005POb︎~\u0013h7H?1G/\u0002S(\u0002~xP\u0012k\u0007v%o\u001bR^(^c#gyZ5AD\u0013:n\u0004x\u001e&\u0005\u0019d\u0007K\u000f=nE%Y,\u0002:_gHu\u0011\u0018um*rGe*5Oe\u0017Q*D\u0004\\Cَ\u0014?=3-\u0010\u001d\u0018C3\u0001\u000e:\u0018Q\u0001\u001d[̀\u0010\u000e?{lT<M\u0018t~M:i;UKq\b!C\u0000jx\r8\u001d\u0011{-]#\u001biU\u00105 \u0017\u0013\u001b\u001dT󬝍EYmt\u0014\u0012:\u0012N\u0000<i\u0007r-o!\t앖$H>;)ͿǹΛ\u0007|f֔\u0013 \u001f=~^2?B;J\bk<5A1WH\u001cH@q\u000fS\\oJ\u0006=\r`ܮm8d\rj\u0017s\u00114u1\u0007\bi\u001eJ\\ɝB\u001d\u0013N֬5|\u0002\u001cI`\f\u000fؘ\u001f\u001eJ\u001fח\u000bb̈\u001dʔ\u0001a\u0006\u000eAO.T#u<jGF]kk}\u001chX]\u001e\u001ekw\u000f\u0002<zT:\r=r)\u000f1d6HvÄݟ\t9i\u0005̟B\u001cE\u0017oEl\flHk+I\u00107\bg~\u0019\u0012Q'Heƒ7i\u000e!k\u0018i'xkRwM\u001daXyf5X\u0017Gf\u0013A\u001fb%X7\n=s\\x{nB\u000f\u0003a\u0016H\u000fH~%\u0005*V\u001d\u0007ȇN\u000743\b`TqS\u000f\u0015L&<@9\u001c~\nc4\u0000e\u0011u\u0001d\u0003]IhR`+\bHdWo;S/B\u0012/yph\u0001GW22L\u0001M'3\u000b\u001f{l\"K'(ff{\u0013̆3 *΀x\u000b\u001b\u001f- \"~^J6ݒpl%\u001a܈VrىɔY\f{i~\u001bWxXf\n\u0006%\u0001Zї@\b\u001b\u0002(\u0013_\u000f\u001d)*9(\u0010,-\u001eE';22\n:'\u000fU#\u0019\u0000\u001a\u0018ᳪk8#\f0\u0003)\u0010{-)|E\npM\"nq䷺Xbg\bSmCOȈy,\u0013\u0015I;<ʂ\u0004\u00056BK9`ms\b\u001d\u000fǪ\u0011#)ĜņI/4P?\u001f_\\2fA#klf0IX\fQ.sܟaBPK\bV TL :8|ͣފr\bMQ\\\u000b&V\u0000\b\u0001H먬z%>6q:7k)P$6}=%F^\u0019\u001c*+\tXK ?~{\u0001nQ*u㮮S^Wjtc@\\\u0018\u000fF\u0016g>#8\u0004P%6\u0006\f\u001a\bA\u0014'ʫ\u0013Ze\u0019\u0004\u0005c8l:UJw\r\u0018\u001f\u001e\tlAjQwd\u001e/\u0017X=|\u00023B\f\u000b\u001b}\u0011ri2͊\u0018\u0006\u000e\r\u0004\u0013\"[\u0005\u0010\u0001G9[blJ^FFW7rG\u0003elPD\u0017]\u0019\u001aAU#5\n\u001a͏z}qq\rR;KM;\u001dGT$v0K쪅x$6R̝(AK-/ԅ\u001bT+ѿf\u0002lO\r\u0017m3z6,Vsx\ns\u0018mH\u0002[\u00070j{OU\u0015'Sp8}\u0018&P\u001f\r=\u001a\f\u0015I0f\u0005\u0010`/l\u0017`4ysf$5R$ \u0016Gj\\~\u0014z\u000bX6YagBpQ{\u001a^o`\u001a\u001cc佸\u0016z%\u0014sسّ5Zޕ',?, g \u001e`͐u\u0018eW<ؼ=\u0011Un3 A-\"\u001aR ܠ{`\\x(7\u0018~\u0000Gr\")f\u001fkdc%:N\u001dL,\f\u00136(R\u000fi\u000fr#Jlrm>_l`e(\u0012\u001e\u001c\u000f3\u0005sW&Ԏ{sJǡJ\u000fx\u0006(}0uǂcfA\u0000%\u0003J,ƥ\u0017VHI\u0001\u0014\u001a\n(6\u0007h26A_kkVͷ\u0000Fy̩}Ɩ\u0002\u0014\u0018p\\\n-.n\u0003]7!\u000b Ѫ4R/ΤA胍]\u001b\u0001\u0003a\u0000\tX\u0017N{\u001b{|\u0012\u0002+Y\u0005qIew<)\u001cfBhIW5->&\u0015\u001c\u0015[B\u0006\"\u001aNU_*\th7ݰFAe~}m\"\fθ#XIy\u0003#)\"sYMQF)$gAkNt\u0013{\r|_gC6[k ,8qx쑁\u0005\"Ɔ3ȘO`+L> Ğ\u0004\u000fS:\rP\\\u001a%'\u001b\u0000lħZﭽoݫHG@٩cAUSQ~[[ak\u000b\u001d\u00065;c\n\u0014-B\u0000@\u0001VT;\u0005\u0015axU]#~'Ԇac\u001a.ᘵ}Τ\"7\u0010[+i\u001aUfi$C$DY\u001c(\u00192d}w\u0010:__#\u0015?:\bޮoŋ^-nneQ`b1\u0002PL^\u0018TCHA:#U C,Fse9_f!\u00119\b!F &#˲\u0012n[iO<\u0017 ̬̈^\u00063\u001ai\u0015B\"\r\u0018z%eF\u0017)[G\u000f\u001b`+d!6{Xϯ0\u001c퇆@0q#_oo'ݿӟ\u0017W_7?\u001f7?7\u000fǿ9\u001fo\u001f~?o*ׅk*AQ\f%oQ\u0017\bM\f9jv\t%?\u0016P\f\u0001^m\u001aq_h[!\u0019Ys\u0007h\"JǊ\u000fG(״1z\u0005؍Po&c\u001cM>d/\u0014c\u00017.4sۺ\"\u0013=\b_\u0002|.룹O'hC\u0019\u0003\u0001ri1Q\u0013TdO9$Wx*`\rFjx\u0001\\M\u0006g\u000fT*3\u000e\"\u0003\u0006\f\u0000\u0007Qg\u0014:\u001b\u0007Z\u0003AOt\u0005y\n|܅!?_ͳ\u0019G?i0D\nhG6UQxp\u001a;PmYpt@w|\fG\u0013@T.ѧ\bCq\u001c*2\u0018Pr>f.bzz\u000f8ZX\\Oc dl ?OJ\\۝\u001aC\u0004vAdD\r7^r񬞿a\b6\u001babd8Bw\bb\u0006g\u0013\fvK\u001aR\u0004\u0005o\u0011h7\u001dP\u0013>p\u0010\u0017_4Z8c\u0010\n\u001c\u0001\u001c7\u0000mZ2q\",GS4\u000b:{\u0010!Q!\u0011XF\r\u0003en\u0010G2_\u001fA9$Jޓ\u001dW\u0001\u001dQ\fdG(4搣\u000fP'\u0015\u0013\t %\u0001\u001f7hk(t\u0006y}EM՞\f\u0012 ШH\r-\u0010Yo}ƷP,ɂ<\u001030G{]RWF\nSV-!\u0016;V$!\u0005}(`ۋ9f[g\u0012+\f/=lOhzE}7rB\u0018\u0012\u0013\u0010\u001c\f\f\u000f\u001cf7Od*\bZۦ7F\fЫ\u0003D͒0QC\u000fl)\u0015\u0003\u001c~z]ؑP\"D/Fq3\u0004{sJ϶t3#n\u0001\u0011ފ\r\u0006\rCh08:TNgXR \u001c58\u000e>ah\u0018\u000f=$cG&ZG\u0002hB줷)*KY\u0006-`\"uK\u0014N\u000f(\u0002`),C0P?G\u0015|NH\u000f+$P\u001aw\u0003\u0012gɠW&wߏ+\u0007zC\b\u0019{\u000e</O&vń\tظ/ q#\u0002@_Q}s@m\u0001\u0001Fx\u001c܏\u0002v\u0005S=\f6!\\V.j:⏸:\u0002&:xUWFu>CPľQ\u001d\u0002;{M\t&\u001c!\u0003cb'\u001eН\n(TI%H\u0013\t=$:>\u0007\u0004\r\n\n\"\u0003%D8фT\u0003\u0007\u001c\u0013\u0000Gl\u0000{փ\u001cy$r(\nr\u0016\u001bo@\u0019p\u0006\u001b;h U\u001ew^[8\u0016RAk\u001e<\u001dI\fnՍ֍\u001fh\u0018]\u000e\u001b\u0006>x\u0010\u0019\u0018C\u0019*[\u0006uHɺm\u001eyЀu\u0012\u0003\u0010Wm~/RUU\u000b4/T|\u001cKd&a\u0014}'@lwl?B\u001d\u0010\u0019eL)\u0007g6X\u0012\u000e(j#*/P= $?*R*\u0013K\u001bƞ!\u0004EM\u000f\u0019\n\u0012R<\u0005i@h~ok\u0003\u0006Goq\u000b\u0011,wYA\u0006ƞ\u0007\u001dl6\u0005£qu\b\u0011AY)z{74\u001bG\u000b\u0013}W\u001aXC\u0005\u001f\n5(\u001fb\r\"P?Zw\u001e@bM\u0001gU襻JՀ=ǾR\u0003\u0014}=G5\u0000Ǻ_}x`\u0001BC#sQn\u001a\u0010K\u00109\u0001ߴUHMuXbPYgX\u0018>9E\u001cs#9\u0010<\u0000(2\u0010J֫|q\t\u0015Ke- >3#mB8\u0011\u0003 fyTx\u0004(xVUZ貍hx\u0001\u001dN{/~0Z\u0010\u001a|\u001c\u001913\u0011#jv@[[E\u00032=\u0018E,R\u001b/޲,}\u0001>{\u0000;\u0003\u00069\u0004/:\u00014rw^6\u0005\u000f'0,-V/\u0017_\u001bq\u001f|\u0006o+A\u0004P?uwlx\u001fW΢\u0002-ȵ9̔ңxdPi/lC;V~1K~\u001d\u000ehblqy/\u0003%?BF\ta&9DK\"\n+l\u0002ϩǦEb&r\u0018\u0010uM\u000eHƀun+\u0003Β=\u0016N僥uQ\n\u000e\u001f/%d$-*s/V7Mdr+]\u0001k׿{(P0Nir\u001f?ii#\u0007b\u0017s`\u0003V;\nvd_¤ϰ(KE\u000f|F9/\rJ/(6\u0014xx\b\u0006^\u0010bџ\u0007<A\u0014\u0004\u0000Q\u001a^}Z\u001a\u0015u~?8\u0000X'\u000f^\u0011zVL\u000e\u0004+\u0014\u0013#Q\u0014] O:X&\u0010cΏ\u0010ej\u0015\u0006\"\b\u0018?$]\u0011\u001a|\u0013j_\u000b\u0010\u001332\u0019'WT\u0018,\u000eL4_*OZnG\u0019Fz\u001eFa\u0004\u001aT_c@\u0005~a\u000f,ݕg .\u0014\tL\t\u001aIq;%X+\u001a\u0001\u001a\u0002ɹFW!dQ\t\u000fK\u000e\u0017<֊~? )Ꜣק;Uݺ;:2?|X~:unkٖ9^\u001e2\u0000/\u001eȵY\u0014\"\u001b&몂j7$X\u000b\u0019Fu\u0005Yt\u0000.;Z\u0006\u0019O\u00198'^^q|jg\u000bPV\u0012+\u0003W\u001fh\u001b\rx0#=ޑ2\u001fWW\bDQ9jU>P˹/m\u0003̮Ml\u001876ȻDbz\u0006η$^G\u0012~.M,\u0000CO\u001ae\r\f4ힻy\u0014%/@\rY-\u0006pŽ#]\"̭?0Q3gi\u0003\u0017Wr=eO?K\u0019\u0017 m'<\u0018\u0004\u001d\u0005\u001f\foQ)\t\u001fӝKɓA.bdEg6=\u0012\u0011/\u001dp\u0015a\u0018\u001130ȊCJ֜\u000e[a\u001fh9b,3A\bT\u001e\u0000G\u0000\u001dK\u0006L;Ę\u000e\\b[>&\u0010\u0007px\u0005Q=0ޤ\u0012!@lES6϶U6\u001e\u001d\u0013iTpy}\u001b\u001e|\u001ee=\t\u001fN\u0004|@˂\u0004M8`łݢxu\u0005Cs\u001bj80%\u0005R\u0000~aׇ%Ĩܮ\u0014YCee\u000f$t\u001c\u0015\u001b5\u0010pw*)s<{M\u0015\u0014\u00107\u0012\u0015\u0005l\u00073X_\ri\u001d~7tň\"$!@\u0014\u0007V\r\u001e\u0003\u000e\u0019֚\u0018 QQ\u0010'\u0016\u001e|%\u0013\f\\\u0002&c\b\u0007M$5j\u0017X\u001bN8$!W\u0016=\t[\u0003rB\r\bcU\u0013\u0000\u001d\u0016rCTmE(LHunّ;Vt\u001eVmT\u0013P#\\\u0012\u000e\u0001ZTe\r`H\u0015ф1B\u0007\u0010\u0011\u0014R\u0012؀\u0002l\u001ah\u0005ߣΏ\u0006\u000b\u0011N \u0012`a{>D\u001bQ^\"\u0013\u0017OTm\bK5E\u001eg\u0011n*]{Q?\u000b\u000e\f\f/{AYŇ<b~\u0016uAy|9%%,;>\u0002ٔhX'hE?Z@\u0010+\u0018U\u0003\t\tHh\b\u001fY_a\u000bC4\u0006y\u0019w\nrQtf\u001e4>\"\u0019޶z;G2{!`¸\u0003\u0016\u0015G@\tÕ^\u0016w5E\\H\u0005Z\u0014\u0011Vut4f0@'\u001e?\u000f\f7WSn#Ea\u000bMiQE\u001bUaA;v%3i\u0016a^\nIeBK\u0010a&M\t^a`g\fFfУ3]vEH7i)\\\u001fμ\u001c&'Ae㹢3\u0011>\u0006\u0002rhō\u0017`Y0\u001ew\\8\u000e6Rʪ4ۥ(~7!\u0015;904\u0003NuhL\u001eGOrfX\u00123\u0012Pn\t\nSL\n\nQʢBεЩAavZn\f\u0015\u000f\u000e״Gľ&[L\u000eXWI:J㕌16>\u0014pJ\u0010/*)(\u001d\u0012@\u0002Q<(ױ\u00123XENJ8˥;\"vg .f7xϽ*\u0002yev|2\u0006\u0017\u001dZ\u0016`cȚ+jc\u0004jvNxü\u000b@Yw\u0002F}ةxŁy\u0000\u0007\u000b2*\u0003tZfȑǮ\u0016bZ\u000e+=\b\\h'\u0006#\\b?\u001d\u000b\u0010\"4ӝ+څ$ª4\u000ef͌hMc%)Q\u000b\tԀ'\u0000ѸqNUzNT{l\bV!FSE4\u000e5Ǖ\"L\u0006h>:dL\u0018hd^2\u0017\u0014~d\u000eև![SB_Zo+dY:\rI3p~O1\u001c$N\u00148?@w4p聓[&\u00176®ÇTRZt\u001di#̉>Oݩykqhf;T\u00122*?|[\u0019c S\u0007h\"R\u0004z\u0002w9I\u0005I7Gf!O{D#\u0018ulKR~45P\"MnCq4z\u0004\u0004[#`v\u001b\u0001@\u0018Rxȴ[G\u0007UT\rR\u0004\u0001~vBxZa\u0016y'\u0000\u0000AvTySR|\u0019G\u0012\u0013\u0010e'\u000ex<a҄~\u0010\bMbf*(/f\f\u0012=%?\u0016\nG\u0012T\u001c!՞'fDQ<Q\b\u0012LQާ\u0004'\u001f ˊ|\u0010\u00145\u001e`7G\u001eYv\b28\u0000&\u001a1GI<\u0012Hykqh\u0005O/\u0003\u000fqEV\u0007iP;l\rԻ׹-nMŬ6*\u0001?y/i9\u0007Z\u0011a\u0006jR<9\u001c#GhHRc.3?{1\u0007xsɃrfԤJT\u0012J\u0018Ɇa\u001bh(I\"{G{\u0012gB,g`ǃNG\u001fBw\u0006\u001d;\u0000\u001e|a'\u0019GJבl\u0006)DQj.^Qj0\b-ൎ`qx\u0010`m\u0010\fqf#R\u000fCP\"P;C[Th?T#KHU\u00025\\~T\u0010ւ5yk\u0013\u0004\u0017\u0015#\u000b\u0017ϛJ$\u0005\u001dYU\u0012\u000b\u0016kRtFM\u0012B\f\u000bLuP;0jr\u0002T=t'o\n\u00008T\u000b<oՔ\u0015\u001546=9P;Qwdԥ\u0002Df)Pp.\n\u001d4J)ĉT@&\u0012\n5\n>\u0001f\u001e\b\u0015h-Ќ~K\u0004/Q|t\u0015\u0002;igm|\rW\u001fPc(F)Y\u0011F\u0015Ebxs$Ĕg\u0001~\u001e{>|s3z<^9zoNXIz%3:JhzL0s\u001a̞\u001bYq\u001a\"\u0011\u00024-%o8:$&O\u001ag+9`\u0012I\u0011#:8P[\u000b,\nRg@Q\u00024yc9U\u0010P{E(ӌXǅWje\u0017QkVC\u0016\"\u0016\\c\u0015wu\u001ePiCQ\u001b\u0015\u0019A\u0010Ih\bצWO(M\t\u0004\t\u0019J0t3ibP\u0013\u001f%\u0001p7mA\t\t㾊\u0005}A=ڟ\u0010\u000el# p.!e>\b]\t2\"NO0:k$C\tCp*\u001d\u0019tGx>>F\u001cG:\u0017_\u00165zp\\⛷V2:X6|\u001f\rJM\u001d\u001f5E\u001b\t+s\u0014y*^B3\u001fB3~\rh_m$|Gr!L;CUV\u0002\u0017\u0015|coX\u000fa4mp/ۢ^\\%\r \u001eRCJ\u0016Rt>\u0019\t\u001f^\u0014Hal\u000bYO+\u0017EPh?\"u\u0002\u0015j&71cwP\f;w:\u001a\\6ȩ:L\u0012\u0019K\u0000\u0018f\u000fm쁚i\u001c]\u0001M\rȰp\u0018f&zLiD\n׈V\u0012O\n:\u0005b{@pV-\u0015@$\u001b\rn|\u0013;i7\fˇ|^݌0(\u001e^zQUhT\u0010(,h\u0001V}\u0000?+\u00134Z\u001d+`\u0002\n\u0014\t㋽`3-EvL\u0017QT/\teu\u001f0!@\u0000%70&;@h*QGR\\e0P&\u000f¾\u0016BK\u0011.sE;r'k\u0001=p\u0002\u0003Ӯ*\u0012%\u0006.0O/S\u0005$\rc[?)8E\u0017NvT\\U\rQ\t@%4V\t\u0011=ѣ/\n<\u0003O\u001bD`nN۴i\t9l*\u000b\t*Gx+\u0013\u0018^MJy\u001byX 4\r\u0005\u0016:\u001bd\u000e!\bn\u0004bRpOk}rl3(\"5PE\rMS\u0004~.z!VBO%oD\u001e:|w\u001c AoXp\u0010'+~\u0004\f?\u0010hkڡr\u0001lk緦y6|ȶ}\u0007\u0000\u001elS\u0018EyA\u0019fgdLM.9\u0014_mS.qT\u001dNF~z;3*:ʡwД\na\u001d\rۙ\u000f\u001afĂwEG6(4YܮqՎ\"K\u001bHl\u0001X\u000b[0X]\u0015Ho#hq/\u0005p$tj\u0002\u001d\u0005>4\n/\u001b*+P|\u0010(O\u001f\u0016Uv\u0011@ڪbۄB'\u00197\u0018m՛6q|\u0000%T`r\u0003\u0019Ic\u0017(\bI\u001aT\\J_=\u000e3[;]ϻҶ\rﯢ#\u0012.,;$;\u00038ytE/Z\u001c\u0014\u0016\r.F\u000e+\u001f-T\u0007\u0019\u001d\u0006\u001d\u001e-\u000e\u0010t?)`\bDX\u0004@0^{.\u0007wP\u0014p8q\f\u001a\u0001LL띴S&\r\u0011ll!\u0007Ԟ2TCoL# \n1==\u001f\u0011 8d\u000e7X/}\"+\u0015\u001f \u0019TŴ(\u0005c\u0012- \u0010,-\"\u0003@)82הϙB\t\u001beU\u0004\u0001g¢nBD>B\u0015\u001bd\bNHiTQ\u0000v0<0ǲdR\u0003\u0017*l5Dx\u000382\u0017 f#\u0016k߄Tt\u0011UK3̪!c\u0000_Q{J ;\u0006$@\u00178\u0005\u0001 ɀ\u000bЫ 0BA%ag\u000fQ÷\u000b@\u0003\u0013KUr|ZO/-Wz4W Yy~\u0016 \u0006|R\u000fuLר\u0014\u0010\u0018wϛ \u0016.^\b>\u0006D\u0012pb\u000b\u001bfؒǶ_\f\u001eX\tR}e\u001f\u001aR{`,VS.щ(\u0017hYz\u0006{w\u0015\u0011}\u0014Y^\u0005H+\u0006\u0010zђ#d\\!ul\u0013(ņ\u0015\u00132\b\u00132A}|~?ڀ-\u001aIskUƨiaCdG\u0017\f8g/\u00131F\u0014L%Y=\u0016%\u001bTO&K\u0017crQJb˝\u000bv\u0001$o8\u0007S)/\u0003(Bt\te\u000f\u0000co8-IGIVW\u0012T7Nd\n\u0016^w\u0000b0c\u0007݂re(+E\u0015ݛr8-d\u00165s>]\u0000+qc]t:`Ƌݔ\fgk2\u0000L\tG93H=P1Brno\u0002/;\u0000S\u001d \bOq$\u000b\n\rfJv~g#\u001a{[O*N7G\u0014f1L\u0001)Z&t\u0019b\"\u001e&+~s҈dce8ɔ8\u0010HTU!\u0010\b=Yʃfg!n-\f\nN\u0001\u001dx\u001abDp2@k5\u001e\u000f\t\u0001 Y`A\u0000 )\fdd?\u0003߲Gi\u000fh^{\u001de3l4CRD\u0019u\f{z\u001a\u000f^kbx\\Ю»vU\u0001{p80lO5\u0004\u0010WR`\"eru'K.mzV[t\u0014˴_ Ax sƩ1w:l\u00021\\|WC\u0015q#AH;\u0004dʇ\nw5%ÚU@2\u0005GM\rժeFi!9\u001d\u0016ʱI tKV\n\u000e!K\u0017V\u001a>TQum\u001f+m\nhxveNl4\u0014J!/\u0019m\u0010\fAi8o\bZZX󩥐0}\u0002\u0004\u0003`+hC\u0019M\u0019X<\b>2'54M\u0012/<\u001aH\u0011z:S_TqF5gZ/2\u0004HI\u0001C4q\u000fMIT.Ʀ2\u0001\u000e\u000253\u0014e=>z\u000eC\u0015y\bXY[]du[\u0019v!-\u0012e\no=GBdj~\u0004?KPYLg*UX܍\u0006\nSE\u00138\u0003P\u000b\u001aM8\n;\u001d\u00036\u000ffi?PN׍\u001e#\u0002(A\u0006N9pȇl&-kJo\u0001Z*pueg=:请A\f{\u00169mJ\u000e*\u001cI\u0016pMޑ\t\f6\u0017z\u0014%@BRc\u000e\u000eT:;N\fSUvRS;+_k\\~E.M(h%\u0014̹Ti\u00146oe*W7B?\u000fxe\u0019G̈SMJ\u0017\u001b\u0010O/\u0004> ۔][\u00144\r\nendstream\rendobj\r14 0 obj\r<</Length 65536>>stream\r\n\u0011®\u0014=HW40v\u0014`G\\}\u0005\u0000C;,\u0005\u001e\u000eDtIܑ\u0000\u001c:h\u0001i\u00078?1})QQ\r{j\t FK\tJpQ\u001b_;_Ҟ\u000fPn\u000bP\u0000 Д7\u001b35\u000bRBw\u000eЇ\tOǐ\u0010*PY)\u001ai4f]?/N5h1Pӛ&\feKajv\u000fROpWB\r\u0005\tQJb\u0005=!obR<a'!\u000bADaI¢>oe;9\u0001KL}HL\u0006\u0017B\u001aoxD\u001b B\u001a\u001fZ\u001a+\ry\u0006};\u000f4\u001f)+'N{\u001eu|Mk\rd\u0019Fw\u0000\u00055O\u0000~E(K\u0000tzܶc1wDߙ?9.\u001d.Ѹ.#A\n=0[/\u0019r\u0018i9Ht\tv\u0005%\u00182{\u000fl@&\u0003e\u0004\u0005bw>駝\u000em\u0000b4~\u0017b\u0019[,Kd{Phl!U|n\u0012{BÊ&?+߃<BNl*^uo)\bX8\u0004,m\nYF<,Tu!\n.\u000f&\rC4p=cqX3O\u0010'Pb\u001e\u00186\u0000d%Ka6n7\u0002=\fP&pDYIt`3h\u0011ĂN\u0006_\u0002\u000fƮ|ܜ\u001b[\u0001u+'(̿IlF)k+UoJ>\u0002f\u000b]{\u0015@\u0006䤌P4\r\fb੮\u00048TvցH^a-^\u0000\u0015!0g\u0007˦>\u000bҦ`\u0014u[\u0004\u00024Ĩ\u0019\u0016,;\u0007*'s\t@p\u0004\u0016\u000eA5\"N\u001bQ\u0019\u0012÷Vpx(1\u0004\u0005t\b$N\u001f)\u0000ރ\u000e\u0014ʱXM[\u0016+CM+Z\u0016TFM\u0013߄mt\u0010YE\u000f֞!8#؅٢eה\u000eQ\u0000<x\u001dS\u0002I*\u0003pՠ0\u0003m\u0019~p`O\u0001*\r]f\u0019\"/(\u0005o\\/i0W\"ɷR\f;\f.`O.\u0014#4\\\tGi@Fn7eg9%\u0010\u0006\u0019;1C--\u0002X\u000b1 t$!9Ӏ\\\u001fب\u0010\u0001hY\u001e\u0011eرUS\nrm\u0007pc%N}*u<.D;XwV⤺h0-0D\u001aB)f1ǖXD\u0015?_@^@Y:N[=\u0003:8y\u001aHt\u001b\u0003\u0017\u0007L4׏Qn+ׁ\u000f_zd̈́\tm\u001e3\u000e'\">{A\u0000wHc2E;Y\u000b\u0018\u0019{\u001fd+\"(\u001ab,'^\r\u0004\u0013}Fj\u0011*]U'\u00191XA\u0015\rr\u00162\u00019j##_|dCC@(\"An꠩zB\u0011w}ٹqƯjդg\u0005l\u0003EU\n[Ѻk\b`$qM+~\u0014Z#X\u0007ڿ\u0002c\u0018\u0003[E\nLa5\u0012y\u0005}|N\u0004#\\E6(\u0004\u0003)tpii\u001aad#h\u001dIV\u0007wiQ\u0013o=q*)\u0011!\u0015Ъɢ3&\u000e!\u0000hS2Gx4,('QbtN\u0000?\\E[L\u0019\u0004lw(P5P\\0+|\u0015\u00107J#陼;\u001b\u0018}B\u0001VOLj5&'R\u0007Z\u000etճ\u0002pQ\u0010\bKk\u0013=\u0007\n5نbc\u0002n\u001e\u001aGϫ-\u0013W>|\u001eh\u0000\n\u0014N\u0014\u0007۠\u0015\u000e\u0002cEF@HwP(I\"hr\u000fұV\u0000ؠ\u0001T1V1NJ}\u000fZY\u0012m\u0013tV|#Pofb\n8\u001dvxC6 QQ53M<\u000f++eU\u001a\tbb\u000f\f:Q<]~;\u000e\u000f'\u0003K7vwkӈ퇛G,D6\b|3|^\u001dQ;f{\"Y?c۵;EWߌPBaܖ4\u0004l\u0015\u0019}9e\b\r0>tx{N\u0003\u0010=a|\u0005\u000f[%\fU\u0016h:\t[\u001c\u0010=iT̿r`^ge/̄\u0001Ґơ! [wjXvyJ\u0011{ 2b\u0000,\u0003dU$ x\fÁ*[nQW\b<s=G\b ϋ%.{1↷\u001eA\u001a\u001d)co\u0018aЬ\u0003Z`0p\fy^\u0019Br3\r%7\u00124\u001f\u0015@R\u001ef$\b-%\u001d8D\u001a%PbIm\u0007|j\u001fD4\u000e2(dJ}\u0001ƟR&}E\u0017R\\\nWԑ\u001ah\rY{Q@0*<(\u0012|A/F5\u001axJ[\bU1$))C\fr \u001diԙڗF:\u0013o\u0019ݞiρT\u00181qU&:aWgbtU\u001c9S\u00135yAU\u0002|IY\nx2#xh\f)\b\u0015\r\u0019TT\u001bV訢]~\u00147\u00178{ތ\\`\u0011NvN\u0001\u000b\u0000 rlfk\u0002\u0003\u001c\u0010o8\u0000\u0002F-`\u0015I\u001e<P }`\u0000\u0019%s\"q:3\u0012\u000eӾDM)\u000b!Q]\\cslgFa\u0017իŵEҧ\u0004HSŋIq\u001c=\tb\u00007B\u0001\u0013Zp\b,1lGɿ\"Q\u0015nC\u0000&DF\u0002.櫋\u0002/d~V\u0006ۤhdл\u0011`\bWS\u001ca\u0019\u0007ֹiXb\bX&}\u0004)n\u0005ʦǩ\n\u0015ڞ\u001e\u001c*/\u0012\u0007E  Xc3!AuXC#˪\u000e)\u001c\u0016\u0004YW\"\"]0f`-Ny\u0010w\u001d/\u0014G#\u0014\r\u0016h2t']nt\u0018Ff0?N%J£\u001eq!vˬ\u000b\"܍\u0016+}\u00033QoD:HE}a&ԦJR\b3v(6;ĉ\u0004fmB\u0017\u0017#i_C\fH\u0003x\u001d${\u0011{P\u0012\n\u0012\u0014ka ={\n`b֬r4x\u0016*Q\u001bz\u0015Pw\u0011\u001eO\u000e\u0015h7\u000bknչ\u001a\u0015C 2\u0002$K_Gn0(\u0019E_\u0014X\u0018Z\u0003!\nQz]H\u0015c#OM\u0005\u0005B:D]BƐpy\u00139\u0011u,%ݜ3ę\f3`\fv>Hv:Zu\u001bt\u001a_k8=&Pjn\"\u001au\u0013\u001cע\bP\u0000\u0018\u000bc@:b\u001fA!\u0010D\u0000xA\u0001\u001c(Ie +wU[\u0004\u001f\u000e\u0019h\u0014d\u0012q&{b4\"߁|e;įET\u001f\u0018d`+ƣLǡkA\r/f#K=cHv \u0006l\fpCB$ɤnPF\u001e\u0001'M\u0016z\u001c\bv\u00042\u0003\b'{a\n{y\u001c\u0000@7\\\u0018f\u0004;/;[BhP\u0007'\u0019;\ft\u001b{X\u000e\n\u001f\\ŀ\u0016\u001c(\u001aPj<Z$A\u0006.1rI0K*Q9\r;|ǁ=\u0003~\u0001q\u0013\u001eb\u0005Wml\u001e\u0014! \bjѿ\u001fj\u000eZM\u0013ڼ|jJ\u0011~#YC/2+LAW֠x\u0003!?\u0019QU\u001e\bCjd\u0017\u000bk\u0002&Ie\nM[\u0014\"!C.)\u0014x\u0010MAj_w\u0014\nҷRIg}˧3kt%\u0005截?\u001ft\u00187\u0017\u0004].inѾۣ\b:3h\u001aOO?_\u0013\t\bG\u0019@x5p/\u0001\t\u001b\u0005 7yO[\u0016i?O\u0013-3)<-\u00195Dd\u0006\u001eʷZI*M\u0011}O󼅸\tL5槶%z\u001febKh<̖h{n,vٌ\u001734O\nzPg\u000e(\u0016]\u001dɌ\u0011c\u001eB\u0016.Ki-'.ؚ97\"\u0010_Oiu!V\u001b\u0010O\u000fqb\u0001};\u0001f\\\"\u00019g/Yqkl;ݠq{\u0014! JYŪ\u001b*ga\u0017+! \u0004n?T\u0019qX\u0017>\u001emoa؛^X) *b\u001a\u0001*>0}h\u0013r2>JQʀtY8~4\u0004\u0003o(-A.\u001e.\n\u0007j`QRi\u00139ryôHE\u0005\nĤ)z\u0000y%\u0013\f\u0000\b=\u0003q\u0018\u00051b\"\u0019b\u000b\u0011ȸq6\u00001y\u001bͱc\u0014;\u000b<\u0003t<i*\u0015vt\u0006\\\u001c\u001d\u0013\u0018Y?Ћ\u000e\t$)Wt۠q+3\b?q\u000fRVə\u0003D\f\nbN\u0001\u0001=_?\u0005_0#Fѫ1+)`l\u0013\u001bZ5\u0001Q+8̣jU\u001f\u001d\u0001\u0002_O0P\u000fl%h=&ELVf\u000f\tsE~`\"]Ge\u001b\u0000\u0003f%7?o\u0003?\u0004G;\u001cZ@4ƍ(\u0015]=\u0001ƼD\u0019ׁ\u0000XX\u000b@\u0013Ae_Bݏ_c#`l\u0001\u0000.1@GzZB\fkY!}=O٣AJ\"\u0016U\n\\xwx\t\n¹\u0015VN\u0010\"x`\u0006\u0013!f\u0013\bˣKE?\f~n\u001f>I$OVд\u0015Jf\u0007ʹ.Y\bћ'u`8iw\u0012\u0015\u0002c[B_\byuu{ՠ2\u0000\u0016\fF\u0004\u0001\u0014}h\u0017&\\ݺF\u001bw\u0012Q\u0016M;}F>\u0004J\u0001L5\u00051l\u000e`\u001eǚ8upVS9^\u0001\u0013{E!\u001fYo6v\u0016ǚBXB8b\u0003\u000e-l5ې\u000fI8X\u0007{\u0006@`]%yy?x`X)\u0014_Nx:7\u000e\u0017Oz^t\u0013!xg\u0003JQ)ݒs\\\u0018\u0017s\ny$ HG\u000b#=3\u0015\u0010\u001dG\u0016k!.O\u0003/Qt\f\u001d&ZT<0\u0004ٗO\u0006#z6'3\rX˳߉O\r5'%\\l4.,c\u0014k@!\u001f.{h!_ѡˊ1̇\u000f[U)H*@§\u000e@\u001cs\u000f`\u0000L\u001asaX\u0001u5G'\u0002sPkK \u0010D\u0007<t\u0017\u0011+Bi\u001dM7$MB\u001e0`)S\u001a\f8#MyƉeinYvk\tU\u0012a\u0005J\u0018u\u001c;aB-iPuu?\n\u001c\u0019P\\C5}h@\\\u0011Tڵ\u001f\u001a\u0014S\u0015^S?\u000bkd\u000beQ\u000enm{Q\u0003\u0003TeE\u0019}{ܬs\u0017Ȫ声b\u0000|5\u0005 \u001cV0v\\\u0014\u0007١\u001bT\u0014\u000bIZ\u0013Уqp侰2͉.\u001dSEE\u0000@\u00071}\u0004\u0000O5pUAilπ\u0018H3<\u0003h?]\t\u0000\u001cW\u000e_|\u0003ڽC\u0015\u001cxy\f_Qkf\u0013E^d[p62߁[d4\u0010*|(\u0011э\u0015rJ+\u0002\u0002)%e#\u0004\u0005s\u0007n\u001b\b!~**\u0000@||I]\u000foxz\tC7^N3-EPJu&\u00036\u0004Q1\r:\u0007\u0012\u0006\u001cgfM\u001e\u00197Y\u0006}2n[h\u0013_C\u001e8\u001f%hU막mWq6f԰&կ\r<\rh:)\u0006j\u000f\u0013Vс\u001dсn\u0006d{6,[q\buRoǡjES+\u0018.Tkz\u001b\u0000h9\u0000\u0018z$ަizE\u00018o\"@mh1\u0015yLi\u0005\bjC-9[5o-\u0010G\u001fA);Pfßg\u0000\u0011\rZD\u0017Ϸ\u0012)X\u0000e!Pc`赡Nv\u0017Ehd)CN.\u0014ha\u0010X\u001f\u0004.\u0003fAiaUQ\u0001qXn\u0010VH*]h\u0005Q\te\u000e73p\n`:\u0010~u\u001dN\u0010.ZMG\u0013\u0000`\u001c\u0013\u000f\f\"\u0003u?\r{r@Wdƥ:_\u000fyaY8SVTp|h}-\u0001N\u0002\u000578H\n**ݤ\u0006G,(EE\r]SqW#Y\"\u0003Nj]FzB\u00148T\u0005\u0015vӰ\rc6\u0002Րoq!Fj>\u00187mˍP\\\u001bz\rab$Ol\n!u=N\u0006x댲14Ҷ\u001c[\u0019\u000e%>1\u001f(=%\u0013\u0002%\u0012HS᤼Ȳ\u0014\u001d؟,/Eڅ\u0014GXC\u0003:\fF\u0019#\rJ}@\u0017\t^1tSlq`7џ`3jwP[a}\u001dW==t\u0006nSYG\\g`\u001d;\u001a\u001fJF.$\u0017vX?\u0010bb:v\\bi./TZ\u0003{y\u0014N\u0013C\u0001ނ\u0018ɨ\u0002XNf`¨:\u0006\u001d\u001aL9*АJ@\u0001\u000fFQ2ݥ)\"\u0004`yO\u0002$\u001fvkؕ\\f \u0007(\u0007\u001a\u0002M\u0011Bub0+\u0006Z90\u0002!l>\u000b\u001f\bfJ5`č\u0018\u0018Gf})W0\f\"\tF3\u0003wC\u0002\u0019c\u0005-1q\u0003\b\u0002tnO2Aru}1Qv[g\u0017ґpV\u0000*U\u000ex}B\u001cQSyVFڽ\u0001,\u0018\u0002$\b|1'\u0017\u000f\u0010BQRF)\u001fgZ0.muݎe-\u0014\u000e5\u0003adC\u000b[}w#ۑs`X_\u0014\u0014[\u001fF`\u0018\u001d+T\u0006bat\u0016\u0003QAL\u0002\u001cI\u000e \u0007ANia\u000f$7_|\f?ړ.V!\u0015x|.\u0013\u0011\u001c\u0002,wQ\u001biGf3(#dI;\u0016mw\u0006' W\u0003HӨ@)\u00044/d惼,_\u0013R\u0014'{\u0015Aw9\u0004Dz\u0010uܽ<%\u0017-\u0003\u0006\u0012h\u0006\u0006c\u0015ǟ\u0007\u0010~5\u001a\n/L[4\u0016\u001a\u0018{<\u0018\u001b\u001eL\u0012>{3#4jtxŪ\t\u0013N-\u0014PqM\u0010UI\b9I)~yU,Z|{h/\u001bq43s:oDaK\u001c\u001cYd\u001f=\u0007\u0019s~F{=P}S\u0006Zn?A8jt̩\u0014oYX &R̮yd&F\u0015G\nί\nE\"P\u0001@\u0016]H\u0015}\u001aڭ\u0018x=%)R\u001f3@b$j{U\u0019\u0000]aݔ\\i/\u0006g?\u0002\nB6QܴZkd\u0000Ed\u0006MԻGՅ\u000bE\"l0&\u0002W\u0014)0n)L\u001d7d _t\u0000@M\u0019<%us\u0004;IzIjam\u000fM+\u0012\\{\u0016WiwOy\u001f\"\u00014x\u0010AWEU6906yƗ\u000b4pAY4,G7uᗰ@\u001eɴ.\b|\u000e\u0011x\u0019W\u0010v8\u0003mW=_\u0000\u0014w[\u000eP\u000bI>fW\u0014HԔF\u0001\u000fvd'\u001bMT\u0019)=\u0003\\_\u000e\u0018rkoCI\u0017bUP%BO\u0014\u0003o\u0019Y 7zw\bհRrVg2ks\u001cA\u00113c\fEV1\fk\u001e-1S\u001dc=MQ^y_I\u0017=\u001b\rVY\\i#RhB\u0019ȃ\u000fx0eB\u0001\u00167#'m\b\u0013>Sɠ]\u001e[\u0005<Ma\u0019x{U>=\u0001[clG\u0017amMs7Q6?Uz<zVI\u000eRCQ\u0003A?\u0015.H4\u0014^\u0007p*\npE«o\u000faJ|\fE˴\u001a˛Z\u00168-,|X8飝B\t<,8e.[:4[\u0010f޷\u001c\u001fU\\\"\u0000\rO}Y5\nhݢ3\nN2\u0019po4wJ2\r'=n\bR͠C`mFH\n\u0014?8\u0007w+8@u\u0003\u0000aJ\u000ft+\u0017v-1GqYE\u0003Mia;S\f\u00002W\u000e}\u001eLl\u000fj`^$\n'Yn/­l/4CDw\b\u0015?O\u00100v`;>;P\\\u000f{\u001e3\f\bd'b@\u0005V\u0013Gde~N9cMjE֯Z|ŀu\u00048#(hvJ0yavxR{bmg\u000e\bzn[4l\u0006ѵy\fgl]s@@.Y&K\u0018crk>N̞Y3òl^\u0018g\u0007\u0012Y\u000f\u0007zXJ\u000f7 :\f~r~iO\u0002F~ck\nf\u0004&\u0011\u0005L\u000f\r\u001cdo\u0006\u0011jǭa)ʰ<\u001f\u000b\u0013\f\u000efp\f\t\u000b4\"\u0011m\u0002{\u001b\u001ej\"\u0007/rj\u001a\r_]XtKZ^AxNzO3\u0006Ǳt\u001dt\u0007p]'rϵd8_`Z\u0011\u0013S*Z(\u0015κ\u0003\u001euy`{qn݉9>+8?J8\u0005@g<\u0007<*R1sa-.l\u001e]Kj(μѤT !4р&\u001f7'\rX\u000bSR\u0005|\"i\u001dd\u0003`\u001cմY\tc\u000b:|N\"6Bkr~@Cd2y)YG] \u0004\u0014ַi!\u001a^C/\tМu\u0004Ӟz4\u0003{V{HNL\u0006B9k=\u0007o8L!?CZ\u0014X\u0019G\u000e\\\u001e\u0014I\u00118(\u000fy#\nd\u000e\u001a(+..\tN-m\u0012\u0003<\u001d~ZC=SB\u001fB1b<mVF\\F\u0018v\"<\u0010VW~O[ȌV9C\n\u0001<#KK\u0001_(^+¾?%\u0011\u0014\u0013=\u0018Ʉ\\Dr@\n\u0003֔i:z\u000faa؟څq\u0018wĽS+\u001e/KFIo<\"\u000b\u0003f^H~\u0010R\u001f\u001fQr\b8Q\u00199^9\u0018\u0018V\u0000ǹk19&2|\u0019_<S+B Gjcf\"͎µR{٨\u0018>\u0003<=B}\u0012w>V]-%$̞GO\u0018\u0005-v+)+%\u0010W<1cSΎ{\u0017M\u0010;bD-=\u0016_Qa1;Áʿϧ\u000eGtaT>z\u0000TEo>\u000eI@\u001a?\u000f#K\t\b\u000esK\u0011S3xZ]rug\t&@j\u000eL)i<\u001d\u000b\nΨ=ׅg8\u0000D5\t\u0007<>>p\u001c\u001c\u0004\bU@\u0014ȡ\u0019\u000e]\u0001Z/ϣ+\t\r#\u0018:\nk`%b\u0000֟#ap\u0002p\t\u001e24ơ\u000ecǏ%F̓\u001d\b08}+L&\u0012U)~a@Bs\u001f\u0003G=x\u0007\n/\u0013{^?p[ȋM\u0012|2\u00154_rd%X\u00051p\u0000t{%\u0003|\u001e/`\u0000pu34\u0004Xm\u0004'\u0010De\u0002J\u00038uS\u001f\u001bFVG\t@%\u0015wR\u001bR \fmZm\u000f\n\u00141\u0002]eWh<=\u000663DߍX\u00137M0\u0013\u0011'K+\u0016=,y\u0003C\u0007Vma$Gt\u0010ڔ\\\u0003\u0003Vo<\u00047K\"5WY!Ƞ\u0012[{'\r\n~T\u000b_i\t\u001dS{˼|\u001f\u0017O?//?o?o~ӟo?\u001f~s??/=U^\u000bװcp\u0014P,X\u000e*\u001d\u001dٚ~F\u001fƪ\u0017:\u0005q*\u0010aSR\u0010Y>X<\u000bwK\u001c\u0017\u0016)|\b\u00163ؚ`AkPhbڷBd\u000bg\u000e{Q>Lۋ\u000em\u001a3(QJ\u0000m\u0006\u0019]!h|^76M\u0001\u0001J4]I[w\b\u0015\u000b>/RYu8ۚ>26Zgn,d+?D4\t'$I30ee\u0006b'1ăC0aFヾ5y5\u0000MSs\b2\u0003J:ڴ\u0002aYc\u0006$Qf;ji%1w4BZ\u0001$\nw\u000en\r\u0000\u0004h60xP\tNp/P\u0017mXG\u000eXj%f\u0005P4\r\u001aF\u001c\u0013\u0018W;\u001fh5rm\u0000S2n@~\u0001{\u0006\u000fM\n\\aE\u0012G4\u0014gA빅~\u0019s'\u0011\u0000ԽZz1\rbx\u000bXc\u001a~Qp\u001d98\u0003\u000b->\u0007\u0003\"\u0000R!tZru3@aBL\u00138I>M*$Q\u000f\u0003\t00h*x\t\f\b;θS\u001d`\u0004\u0013N\u001d*Jm2M\u0007T\nB\u0013}<r}\u001e\u0004gA+HWU(msq纍M\u0010&:rh#IR,(bG\u0019;\u001fhܯ\u0017Zx\u0012\u0000Jx^\u0011yT*\nO\u0003+\u0013-_|\fA!\u001e.W\\]PX4!]NOH擖\"&C\u0019Yzn\u0012Ӹ`\u001e`fX,Ɓ@0\u0003PLEnT^^L\nBBS\u0019\b\u0019u\u0018&Iע\u0002\ri@!͸F{M\u0007\u001cIX\u0012:ma\u0002ZjO[2\u0017N/\u0011@\n\u0006jQ*\u001c\u000e\u0012z\u0013Z1~ˣ&>\r7!'P>\u0007\u0014\u0003\u0001C\u000fU\rX.\n\u0015ghI<2&'!&-\u0018|]ᕗ\u0019r3\u0013|&HUon\u0011\u0017(\u001f@g4c)A7\u0013yW}Q\u0019{+M\u0016 R6\u000b)\u0004,\u0002\u00020Fcip3uR<֊3\u0014\rЅ\u0011Mmz-fu\u0006T Q\f$Ԟ\u0013*\u0016pʬ0QcM-QZ`6g՝I\u00053v\u001a\u0017s9n\u001c\nWR\n]-5\u001aç\u0016~J\u0000Jq+\u0016\u0017\b߹4kU68\u0012+J\u000eD\u00035ŏ~}qwC*ֺ\u0014K^:U\u001a$\u0003nj\u00113t\u001b\u0005aH\u0014t>3b \u0014\u001aIz\u0010IӁ\u00000?\u001cF\u0003f߂}=;\rJ{; :[J\u001dE\u0017Fz\u000bQ^ȡ5I\u00037:\u0007cpzNDn;cY`:\u0003\u001532x/f\u00100BzeD\u0011u+w4vNSwO/ s\u000eN̠'ʌ:cc\tҨiV/&=֮{qǀ~Xi\u0000Z\u0015-Qƫ聱A\u0005\u0007B\u0015TX\u0004\u001da:\rg|ְ\u001f\u001bt\u0018\u0004kx@\u0004U9\nt\u0019i655.Iў\u0010rd+\u001b$T/}\u001d\u0004,\fr\u0006^[t~+\u0013\u0001\\hv\u0007tU\u0018\u0014%/N^$Rb\u0003\u0002\u000b\u0003\u001a,2sǌ\u001d[9b\u0003\"@`\u00169SogH\u001eg\u0015Rg\u001d\u0011\u00060 \u0014\byr\u0018\u000fgW_\u001f\r\rwAS\n\bH\u0004\fc(L\u0017\u0019\u0010\u0015\u001cAH U\u0007d\tӨb4\u0004\u0000\u0007\te\n8CHˌ3!\u0018|\u0017{8Z^@^e\u0006~\u0015\u00157\u0006\u00158\u000b]\u001a>QH\nO3\fY'kT/0a_\u001cHVI@9tPפj^c`8UK6;퓃\u0002`Di\u0010\fPZg\u001a$&>\\\b\u001c~{>\u0013B\u0003V1н\u001aJٰ:8ʺ ~\\kϸS6\u0012τ\n\u0001/k2_Yi3u\u0017k\u000fYt\u0003\u0005\u001a\u0006D[du*b:*\"\u0012\u0012+Oah\u0002چ\u0012\u0000\u0015\u0018\u001863H]a5ΤE}\u0006.\u0013@\u001f\u000fy\u001aY5\u0000V0\u0012:?O밫Beǈj\rTp\u0004goUOd}q ͲC6{-\u0006\r\u0016j'dt\nD\u0015e\u001bNt\u0017YP*iw\u0010з9.289P\u0013^Tps_\fa\u00195\u0013 V۶a4@\u001c\u0013\u0004ȯ\u0011갟h\u0003j+~T2n\u0003\u000b#+fPa\u0006]Smʢ\u0016W\u001f`r6}eзaf*U\"{+HO@)\r\u0017o\u00155xQej9۴+# )ݑN[$e%ѳcLԨQ+3N9\u001ct\u0017\u0007\u0002f oʳ\u0010N7p?\fMi\u000e_hwihCj\fdD^\b6?J\u001e\rHLC2k6\u0011\u0019\u0004~S-t?\f%,\u0012ݟ\u001fjWYj{\nkPِ\u001bZ{,\u0012JVP\u0010~l\u000býA\u0004\rx\u001cQ%\u0013m\u001cB\u0012hz~ۡs^ona}Q|Ь\t=w)\u001d\u0005E\u0002uePŹ\u0013\u001f(I\r'\u001f}Fo]v\n@x\rmi\u0016\u0016e\u0007;e\u000e?]|\u0014Y\n\u000f\u0019\u001c\u0000\u0018ߌza\u001f[ss\r\u0004\u0019Vg\u001e3\u0018ɥ\u0003Y/\u0003֫u\u0005wzb9nz(HPG\u001c-Hm~\u0018'\f06zk,`UnWp*:}=\n\u0015hlk_\u0002\u00029\rق<'\u0000^|w(1:3r\u0019\u000e2DۺwC0\u001fn\u001d\u0000^+\u0014iR3FdR{P|\bg\b>ո#9\u000b\r Uz\u0002|\u0007).t<8\u0003$.r^\u0011*룩\u0015\u0007L\\\u0006\u0002dh\\\nF=]\f\u000eA\u0017NjL:vpC(H v7ym\u000f\u001fJ\u0014ݟc\u0019y\t\u0018T9Cv5Ï\u000eM\u000f\u0012bB|\u001ei~YK\u0001ĬB=~<\u0010\u001fB\tq.κ\u0004\n\u0011L*\"8QN\u0003\u0012\u0004X\u001dؿ\u001f^\n\u0012`\tk i@'kzl \"AK\u0003dp\u0015rͰG[\u0016\u0015/f(\u000f:_\u0010z٭ڿ6\u0015\u001a\np\u001dU5}8 K,\u0019q\"S:4u\u0003{?P \u0015\u001aHA-w\u001b(3r+\"v@( l#R\u0016*lKT\u0003\nj\b~־-+I\n|\u0011_@\b\u001b8v\u001c\u0010\u0000,\n\u001elq_\u0000}@NoGi\u0018_\u0019e\u0000^aT\u00076Rn*\u0005\u0016v<\u001eAc~ !\u0017!Kr\u0002ʲѪ!F\u000b\u001a\tHY!]\u000e\u0015a>soL_\u0014<tg0a57\u0015ЌS8 ]\u001b$zx\u001f\b\u001dP\u0014\u00185$1)[jxe\u0017O\u000f5zZY\u0016p3\u000b\u001e\u0019sHbgE\u0006\f;h\u001be\u0006pWf:aZ1Gn\u0007\u00163\n>삚5,l\u0004΃\u0019\b\n\"(|+x\u0007~K\u000b5ҽX鴪\u000e^Q\u001fJP-<Gn߭\u001b|?ᜈĨ~i\"?\u000bd]-\u0000*\bq}58j;B&Mmq.\u001e,²!*2\u001d1~\u0001\u0013E9x\u0005\u000fwND\n1hg\"ZF\\js'9_̘a\u0005\u000f6mZ% LIX\u001a{,}+\u0014QE9^#$˟g<hT8П,\n{\u0014\u0013\\KϤo1}k)~k/\u0004?\\K|\u0004wEX@c@dw\u001d80bO3M\n\u0004\u0000ɯ:Ž\u001dR,\u001a\b\bVȐA\t\u0015Kft\u00184\\\u0017\u001e#݅#\u001alv\u0000\u0018\\kӹ\u000f2\rW!\n(x\u00184\u0018\u0000Th\nR\u001ca9\u0003*3\u001e߮\u0003\u000bK\u000e\r\u0005K{%G@۩ \u001e\u0017G!\\\u0001y⦦\\\u0019\u0004${󌳫-c7@y2[\r;Y}ʇXn}\u0005\u001cV\u0016\u0004[t\u00172\u0018\u001ej.d~\u0012\f˯'hY\u0005˳U;CL#z\b\n\u0010t̞єD\u0003\u001a1r8)//iu\"\nY\u00162\t:pj֌\u00149`/P֘A\u0007ͯ~[\u0012[\u0018\\fg>G\nM\"U*$jK2r/f WU3Dor\u0015\u0001)r4Z\u001eĨCjD#z\u00193zws\\N>VU>\u0018#YLàf\u0000\u0007\u0007g @{*.\u0005k<zVt0☭6yٸ\u0000n^f\\%Z=BZ\u0013ާQwSߌX_lQWmW,\u0014Mr7\fA(\u001b/hpXo\u001b\fv\rҵG_6J6hl\u000b`};A)*D\"\u0003P\u001dy V\r!#LMr\u001a=K\u0002\u0007\rA\u000b\u0012\n\u0010i\u0000\u000ekvQ\u0017\t{_xbIg\u001c\u0000\u0000i\u0016̾&MIp!H\u0001\r\u000f[\u0016m\r`U1ʶƨ\u0012*\u0017\u001ez1\u0012\u001d3HC]\u00163,:#ibj\u001ci;`.a8P\rI2g엮iV\u0014b\u001a\u001f\f\u001a\u000e\")+%\u0002a\u0001`\bGQ3/f0cXkY\r\u0005ݖ\u0003K\u0018XR\u001b z\u0006pG[\\D\u0000+MhDy=levNJ\u0007.!%\u0019\u0018\u0005Vph\u001e¢hU<\\iDNDo\u0001ͅ\u0000Zp`9b\u00105F\u00059\u0015\tfzz\u0003\u000f\u001d160NRRD\u0002_ω`8⒀O'?*`k\bN_bv\u000b\u0005^\u0004&A@VDu\u0003tXnD>\u001f')nEa\u001ck3_b6+X^br\u001fՒEAܑ\u0012\u001a\u000fv\t+LX\u0000`<\u0004YZi\u0015P\u001fbY\u0001\u0014$y\npv\u001f\"4uCpЉoTE⤸\u0002jvrPh|4\u0000I\u001d/5D\u0016D;PiUlY7G\u0000`9\u0003lji\u001e\u0001ӄj\fT\tQ!rsJ<~0\u001b\u0013J(/olSu{ʽsEϛ`Cس'y\u0007|\u0018C; ~/wP\u0010\u0003Oz\u0017\u0013(\u001f\u0015\u0010mJ\u0000\u0013@q@\u001f*X\u001dlϐO*^a:a\u0016!X4\u00001JBN\t3\\Q<EpЃ\u0019ZO(32=s\u0001(KkzQx \u0015\u0010$3͙R0\u0003Fl\u000ftk\fd\u0004}3\u0018C.ɋ\u001dϾU\u000e\"ǵ4?\f`{\u000fL\u001eu\u0006J\u0016\u0015\u001c?+\b.:d\u001e\u0015:̥AsIy4\u0006PK,mH*0+;E\u00181Ebp(&\u00157\n\u000b\u0014\u000fYZ\\Y\u001eYE_iȀaY;\u0019痣.Y˪\u0003%)Z7\u0015\u001f\u0018~tr' _><#M\u001b+\f}\u0011\u0004D0\u0006~oO\u001a\u000bj??}?Ʈ,{D\u0006\u0004P{BFS\t`\n\u000e7yn댳p4\u0011\u0000\u000eejԔ)\u001eȴ{\u0013V\u0017[d1jƿg:B\u0011:>@0U.8\u00048Ng\"'\u00012\u0001o\u0013\u000f8OkHB|\u000eގCl6\u000ep\u0017\u0019\\\u000b\u000biF\u001d<f\u001cx\u000e&M[\u0011Z#\\<W\u0012lni.Тq%텑?\u001b7\u0013Y\u0007\u0010\u0002o\u0007\u0002\b\u0006\u000er\"\f\u0015\u001d| 6\u0011VT&V\u0002O{HYZ%aʝ\u0012\u00026-\u0000Ȝ[W3f.d->G~\bZE\u0017Hh\u000b쳭\u0010*B=\u000bA{YF!\\ '\u0012w~m@c\u00163DjUgiX?*6PjL2K\r\\g.,KⓙeDȾ\u00188gNž\u0001\u001dY5x*RevؕM{ft\u0003\u0016\"\tӟ \u0016`\"\u0013^\u0016/6\u0010Dxg1\u0000D}\u0005`TC\bWsf6W\u0017\u0007*\u0010\u0010,]_u~1c\u001cw=\u001cfl\u0004\u0005ʉ\u0005G\u0002^#4d6ᵶ\bZ]w|>\fCЬK\u001aImz8X6\u001dvCl\u001a\u00037kfM XQ1\n/\u0013d9iŝᙌwhTg\u00102CsXO\u000e%\u001c+\u000fĲ\f\u0000\u0000S\u0005edi\u0011z\u00056\u000f\u0010Ɲ~o\u0015jY)|u~\u0011=\u00008v\u001e\u000f=\u0018\u00103\u001c2\u0012ܽ͵/fk}{k]O8:\b;o5R\u0005\b޴HSQ\u0010W\u0001~)E|\u0001\u0001\u00115WbT8\u0010\u0010zBEYr\u0003@u{o$ˉX+LN\"&k\u00172ЃԱ}z.-\u0018\nB\u0004M\u0016w,b\f\u0002\u00031W}װ8{\bR'pQH|\u0012;h\u001dxSڏ:>o\u0013\u000eDbu\u0012`\u001c\u0018b%DS|\t#e\u0007Y\"A\r\u000b\u0004\u001e\u0001旡PWB_\b@ePxl\u0019D/-\u0001<\u0013\u000fg \u001e($0h\u0005j4}6SJ[\u0010\u0002A|dY\u000bIUK)(lP@F\f\u0012?\u000f]v\u001dǰg8@<xYt\u0004\r\u0012TmT\u0003\u001a_\u0002SR(\u0017\u001b1\u0002{\u001b!RžÎDʑ\u001f\u001fv\u0014̘48}qnWBڻ˗\u0007\u001aao+r\\Я*~y\b]:Qŵ?L~yi_\u0010ė=m\u001d&i,\u0019d+MENy1̡\u0019t\u00173j &\nCiz+\u0000\u0001M*Mo<@|G/e\"yŌ'H\u0016\u0017\u0007Z;!F+QB7\n`.\u0019\u0013~(T\n\rac\u001aNɣX\u0001\u0013PZ$\u0014{\u0014t.I\\'έYt=t\u0015>G|E\b\u001cDE-s\u0002\\EiNF\u0011M#p\n\n|z;vLr+\u0002F1t\u0004H na\u000e ;/\nl] `/pwɑ_\bv堛\u001b\u0006\ra\u0011\u0003\u0013M\u0010|+xS`:翟FL⇾\u0019>~L\bb\fu8E`38q\u001fVx\u0011\u0006\n\u0012\u0013@t\u0001(pmf b\u0011R언ջ5\t\u0006K\b\truk<ɝH+\u001a\u0013\b\u0000\u00121ׂ\u0019\u000fF\u001d\"h_J\"(Q\u0014ɼZY4E\u001bt(,M>;@(\u0004<\u00196]4.\u00009\u0010]\u000bz=T!S\rAc]A'\u00113(\u0019Izy`=DpKX6蔁i_\u0014=\u0010#+\"I-Gu\u00006^$dev<\u0016\u0007\n/Aw)\bKF̀\tlƍ)3\na\u0019\u000b\nӇSn\u0015ҧgZ\u0010L!iǁbFb\u0004q\u0002f\u0003w\u0016$e([g@\u0001\r)M\u000exi\u001b\u0010?n\u0007\u001dX\u000f技/\u0010^@ف\u0005+[\u0013\u0014\u0004\u0003\u0001ָ\u0013ۏ\u0012\u00043\u0002\u0013E5%\u0010wdz \u00077٬J4D&nb\u0003^6PaG\u000e:\u0010}\u0019ҫ\u000e<\u000457%D\t)=\u000e}1ӌT׏T>\rGH\u0010\u0004\\6*\u001fz\u00020J&\u000bۊ\u000b~\u0006[E+f\u0010\u0006\u0014݄!R3\u00036gxAQȑWN\u000b\u001d\f\u0012\u000b1\u0010\u001dԚ\u0006:y9:3\u0005q\u0015x\u001038՚O\u0001X\u0000Lh`\u0001yoa\u0002+\u0005\u0010\u0016u\u0016W\u0014\u0014\u0012\u000e\u001e#dI\u0005{}sT&\u0017\bDM\u0002WlbLU\u0010u,v39,tyNG\u0016128s'-EC\u0019kiasBW\u0011\u000bM6d\u0011Vc\u001do\f\u0005mG\bȊ\f\u001ei\tBn=pzuF5I%*(\u0004S0c\u00025=a\n\u0006kے\u00168\u000f*𶽞\u001bx\u0000f\u001a$`%.Nk,\u0019jՑZٙ\u0000lCPgFd{י.\u001f\\E\u0013pkbOZ:ɶE\u0010F\u0003\u001eiǖ\rk~~\u0003tEn\"t\u001c\u001f\u0000\u0016;ʯ2\u0003:v\nхFTziS܂m \u000ea \u0012p4UŦEgf\u001d\u000b𲪵yV\u0003\\O\u000fǩݿU\bbgjȂﳏ\u001aPd\u001b\u0003*߲hka\u0012*D䵂o\u0001\u001aC\u000e#29'\u00033\u000b\u0011<McU\u0018Yp\u0000{\u001dK\u0014\u001ci>Ҟ\u0002*1'@m's\"ո\u000f\u0000140Mʼ:Y4\u000bE\u0012\u0007X831;L\u0019\\9ca\u0000\u0017HjsA\bw4\u0007\n\r\u0018[J\fhT$l~f0AFh\u000e;LKu{RS\u0005QN>TY<lP1z x_JE~z~\u0002#\u0003-(\u0003S\u0003DͥӖ'9tk꼄@m}I'\u00008ʌHHIQkc>[-\u0016E<\u000f\u0006\u0015\u0015\u0019/u\u001cݿE?ioͿR9`P&#ǆmy\u0006/beݜ7D\u0000HW*\u001c\u0017\u000f\"}c\tt-\u0012\u0012\u0001R\u001c\u0015\u000f[)\u0018܇\u001e\u001cO\u0018\u0003\u001cl)!\u0007>\u0004U:ڀV9s%/]hkC>cS\u0005F4!\fYMzoJ\t\u0003ේ\u0006Y<PN\u0007=ơ\u0000a؂m\u0015L?)\u00079Kً\u00043S\t\u0004j\u0019/'K\u0001\u001b\u0013rIvaP,\u0011oY\u0012粹Qw\u0010]L\u0003#nGt,6f\u0014ޏ=~\u0015#k\"3T0\u0003\u001c\u0018X\u0018t\u000f\u0011\"\u000b >֌3.I\".\u0016Qh\u000bru=\u0001m\u0004\u0004\u0002sf֨\u0018=BEṫ\u0015J\\{JKGdPj~k\r\u0006R[\u0012~KF4\u001a\u001aLj0MB~\u0001\u0000삒\u0013\u0003\rQ=\u00108=\u0003!g\u0000sa+x?G\u0012\u0019Ȋ~=mQb\u0003\u0001@1Y\bI\bg[!Am\u001d\u0017>\u0016\u0007\u0006jOi(\u000e+Hs\u001fuDj\u0000ݰ\tISP\nx\u0001((ŕj\u001eO\baEvE-\r\u0010ĢLD(K-[ǂ\u001a\u001fY,hPyoHi/q\u0003\u00113\u0002Ɍ\u0010\u0012]?\u001e\f=Jồ\u000eu9\n\nHW}[S+%T,7.;ҏt\u0019\u0013\bl.|@\u0001%PЯh*y Zf'aWt\u001cl!:|t\fVr\u000b4\u0018:V\u0001\u0011\\I\u0019N?m4F4\u001aN٧[\u001d3\u000fu3K\u0011:\u0005\u000eIeVN \u0018U5\b{\u0006f\u0015Rb\u000f#H\nk>@^?\u0011\u000b=S{:,tRڌ>ߤ\u0003\u0018*+r/\u0013}\u0010()⻨-,ђ'ͪV!Bq!$LuL )D\u0017{̀#\u001d\"ZD\u0018ˁ\u000f\u0016Y6/\u0015\u001f\t.OQ--<\u001c̢\u001c\u0019zWHpP{s\u0006\f\u0019zReh ȇ\tLh`HYH!j;CE\tMͯ\u0000:\u0013\u0006syZVvGY\u000f<\u00143ZXdA\r[5\u0019\u00012\u0010Zod{U\b݄hUvF\u000f\u001aE\u0015B\u0018FnBDt\u0005S\u0005?hAnYO<+rFFLjއAT\t ܔiH@fHϢGlog<K8\r4k\u0002\u001b\u001c\b%`x'i1\\R\u0015%N{SD-K;\u0007I\u000f\u0019%2\u000erK`\u0018\u0006lUGOډ\u0002\b<;&\b/\u001d%C:\u0000%W\u000e1ZE`Z\u0004\u001cy?s\u0006>T@\u0002Jl\u0017#3fsL#\u00001O\r#p$E@-\u001drO\u0010Zt˱KQ<\\jv\u0011obhg\u001bV<ц\u0003+;\u001f\u0003.x\u0011q6\bㅖ*-MDNBS\rrD!,\u0005\u0018\u0015\u0003\u0018\u001c3P(f\u00061A\u001c\u0018?a\u001b]X{w\u0015\r61.]ƳҪn\u0016?\fu\t\u0010E\u0001`P\u001aN\u0001\t\bXyA;=GM@,2+@P\u0012\\>J\u00144',\\0Ӱ-v\u000eA-\u0005\u0003Lb\u0014\u0000ER\u001b\"-P\u001aScyv1c?T\u0014GҔGe^\"\u0016Lٖ&wALq*bofTbkNzYuP9GK*S15eױؽ\u0019\u001d|\u0003#6ءK#MHCA%\u0006J\u0000%5m\u001d w\u001a'S\u0019J;\u0007@%`\tMCF_U'j>wzf\u0001\u0017ȿLr\u000fT\nifLS\u000fTd\b+C.j̠lQ՟\u0019GcQw\u0006?\u001b3K\n\u001541i8+\u0019K\u000eK4j\u0011jW\u0005AQi(<\u001c\u0002oWPt\foov8\u0004V\u0010\u0011?\u0010x5\nG0\n\u0017\u0014$\u000e`\u000f;\fB30n\u0013\u001a;E@\u0001խw\u0019rD\u0013\u0007c\u001b\u0014\u0000\u0019#(Q\u00114|\u0003\u00147Auh6`^׬w\u0005&\f\bq5(Ђ\t\rA\u0015W\u0017zH2\u001c.gf\u000fx\u0012-Lf_xg\u001d{J9j\\Pб\u000e>(\nX\u0001IbQ\u0007ɖzp!(V5\u001bIž0}@\u0004J5@Q|hnh\\W8\\\u0015'*\u0013wa\u0004K \u001cI˘&rՙ\b'\u0000@I[\u0012P?*v+\u0014%P\u000fT\u0018*9F]^\u0006\u000f(U\u001a\u0014C[S+'d.\n$\u0007\tDhP#ØB<gp\u0001Tyn\u0010(8cG\u001c\u0005uL\u0017Tu\\8\t\u0000\u000eiCa\u001f\u000f\u0002X\u001f;V&\u001cVyDa\u001e,hzFH<wjx\u0016p(\u00029\u0017\u0019o4E\u0016`\u001e\u0007m<Dzw5֕WM\u000b\u00124&Me55ʍh8P&4\"ޣwkYz6c+\u0010lMPï6ߑ&\u000f\u0017[`p+RƄ\u001c\u0013iclH C@KVݦBOBTi\u001c4<\u0001ӎ*-\u0011>]l\u0010\u0012n%k+\u001d\u0002\u0004\u0004\u001d.V}צ\u0011Vk\u00100H@v\u001d.\u0012 nJI8;撳$P>O&q1(г\u001eʆcb(;\u0007H\u0004:Y.dFuW\u0005\u0013bsmy\u000b/\u0018\u00179`RV.\u0005\u0001\u0017\u0001zsebp \b't\u000f1h\u0014*`\rJ:l(s]\u0000\u0003y\u001d%7l#mEp#e\u000e\u0015P\u000eB~\u0017[bF\b~Eߍ7I\u0012ӡ\"\u0004b\bٛ\u0005\u000e\t<\u0003f(`ϩ/T\u001a]\t\u00038S]O),\u0002M# dw`\fJ\nBsg\u0006\u0016zJQ\u0018\u0012'\u0015u<ْ%-ɎnHޭě\n?rSg}\u000b\u0005C/A\nL!b(\u0002ո\u000e.]?,Q,1+Xai\u0011ME%G\\Q\u0002N,/DjM\u001bh\u0000#5\u001dxgd\u001a\t\u001d\u0016ʒZqi&e(p\u001a{$Qn\u001f hLoS{c!P|0#:\u0013of$,\u001b,]\u001be&d\u0003_1!:{FiQ]F\u0011\u001fO{\u00034;\u001d \u001d*\\\u0010~ ?\u0005Y\u001dj\u00117Hz\",(y\u001eh\u000bBs8UT^F@ɪ\u000e\u0013ɌG\"ێ}OQ\u001d%}yhZ_\u0019\u0005mf`s?%[@1=a\u0015}\u0004\rro\u0012$;.\u001d \u0011l? C\u0005Ö=\u001a\u0015ǒ\\'zD\u0013F5\u0013uE#\u0005\u001e(\u0007\u0006۶b[\u0017^o2M]\u0000PBk\u0006-\u001c28\u0003uݏ*gh\u001bD-[UzߛlUaDagJ\u0019\u0004<l@\r\u0003-=\u000e\f4KBo\u001e\u001aYژ^\tй8u\u00144:>TT2\u001bi0O̤k*\u001a\u0019)vf\u000fT ~h\b;qJ\no\u0007\u0002DiA#c>\u0004t&}\u001cJ\u0002\u0011\u001c\u0016G\"qT[,)m\u001d\u001fp\u0012\u0000fN\u0006?2\u0003_\ts/'iρF@$fPV$\u00192{uf\u0006\u0005.fé@4\u0011\b58Mvp_ KueFUx\u00140A\\\u0014M\f0j٤_gOm8@\u0012uq\u0004]\u0003\u00047\u0002,N\u0019[N\tqLUHbhe\u0011.#҂{\u001d\u0007\u0012]ԾWn钀\u0014Ot,\u0019;4,,p1\u0011<\u000b4L\u00143'ŲWѯt\u000elG*8}!e{\u0018)`x0%A)&K\"\n89MJ\rF\u0017\f\u0011\u0015Y\tƙ!\u001aa,\u001d/OVA_w\u0017YصeQܞ.9ȱTq6G`MÎ\u0018\u000foE\u000bp\u0006t\u0004a1\u00043C\u0000Ft[O\u0004=\u001c\u0007\"Esp`\u0001[ob,.5\u0007=pF\u000b*]8R?Z\u0017\t\u000f)\u0005ZimG}7zu\u001bX\u000b.E)6QLЫdS)F~>\u0013[:G\u0001\u0000v[0jkQZ\u0014?@2`ҋfKogVb,R\b\u0005\u0003\u0012\u0005\u001f\u0006\u000fN5\u0014=K2@[\u0007~WE\u0010b\n:\n\u0002KzJ0MڻJgz\u000fQa\u0010`@\u0011!P2Ѐ\u0014ڒ\u0000߽yȬ\u0016\u0006ȿY\u001e\u0010!KƠ\u001a\u0011\u0017\"D\u0005zk\u0011\u0019I=\u0010@\u0004xq\u0006D\u0002\tx8mt(C\u0019\u0006!k^GG4Cʺ/Å\u000eUd#ho\u0013\u0017r{.i\u0002j\u001aN7\"d\u0013\u0010сg\r=2\u0011R\bi\u0012^Y\u0011sKV\u0002\u0001^\u0010ͿM\u0010f\bg\"\u001a\u0017;+0=Ex!r\u0011'È|fbۖHݓ\u0012\nݶC&7\u0019\u001604\u0001f?v_#4y+bF$HG[0\\&~3\u001eC_'\b%\u001eZ\u000b#\u001d\tye\u000b1\u0000e~G\f\nV;\u000eɑ%\tò\nw\u001c*\u0018Y,Gʝaܞ#\u0003:3qe\u0019\n<99\u0001\n\u001c@G\u0005dTnbgݖk\u001f\u000ei\u0007{ܹ\n\u0018V\u0016\u0004U9\u000e\u0002=Ӳ\u0019\u000bu9_,~=Y`\u0005ڍ>̈gQ!\"\u0012WVc#\u0018Uw\u0001#\u0011>2v\u0011=4\u0006Lڑ\u0002\u001cf}n+J\u000ew9g\u001d!\u000eOpϴTO𰔰xH*lr[\u0017]\u00177\u0017:N\u0017˛yH:\u0010w'ڊICZ޺jX:\u001bqdVPU\\QU\u001a\u0006V\u0004\u0000zѼ-G\u001ca{hl_\u001f\u00066\u001e/[!\u0013\u00054WgI\u001a6\rZ\bJ;j\f0*ceYػؼvsh=\u0007\u0015\u0015>5u[2G\u0017Z\u001b\u0005sE+\t\u001b\nM/;#ʥ@e\u0007:%z)9B\u0005((ByzP3\u001fV\u0017\u0000>пv`\u0000'\u0015\u0017\u001a8i\u0018BAUg,*:^!\u0000FkNk&\u000f\u0010e|e\u0005\f#\u0011\n} \r\u001aL:K\nNF\u0019:-=up\u0006C\u0003xH\u0016xR<\u000fќGD\u0012~W&4ŰIOFRKXqPe*\u0004\u001cyw\nRtW(묑Cƀ^1lsU\u0002J\u000fx\u0002tSqB-m\u001eXȮ\f{:?C\u000f\u00007^{-[Lb\u001cp\"Ů:ʁ,;i*ȞỷN8;EWo<*FɲX\u0004\u0005RRW\u0018Q\u001d\u0011V9h]=~\u0011NE(\u0000\u0007٢rhhK]tr T\\P@m\u0018al\u001e\u0001zY3`k-\u0001)+~+A\u001dҴ\u001b6_]\u001ee\u0011lDB-\u000b/\n-Nh%\u0011qpZz\rs8\u0015\u0004y`K(*\\AB].yO\u0010E^(ʹܒVӹIP\u001cF((̑v8ZUUf\u001e/d_WS/a\n6\u0013:XU\u000b6j4\u0017f\u0010i@w}8P$Щ\f\u00154Oc\u0017NJkp[\u0014Bw݄er\u0019C\u000e!Bc\u0019 \"Z\nN\u0012uvzfrϢo\u0006n\fAߢܾ\u0002x{ݘ\u0011Ƀg\u00070\u001fЙ;Ύ%\bJr6=in\u001a.Q*\u0001\u0002<#ځB{w|\u000bJΞ\u0007\u0015/ok_\u0006x/\u0002_\u001a\u001c+>\u0005\"\u00005+cV ]-GV`y\u001aR\u0017\u0019!ߕ\u0015\u0000\b\u001aDlG\u0003mEf\b\u0006$,~\tr\u000f\\,)o\u001d\u001cZF\u0003j\u000e>GZ;)骰\u0003\u001ar\bE\nT#b!P0\u0006ǡIў=r\u0000\u0003Y 3*&<,\u0001\u0005!\u0007mms\u001eض:fzn\u0011\b\u0002,>\u0014p\n쇭-Ɠ\u0010O\b\u001bn\u0016cFZI3\u0002$Mz,><H\u0018\u001da3m\u0000O\u0019K|\u0006ߥ0:_3ՙ\u0011\u0002됷G^拤|݄@g\u0001\u0004\u0000>C\u0015bf$\u0003(\u001b\u000bVA]-bgZKOW]`ml\u0000o/\u0007\r`OiA?bIucR5l\u0014\u001b\u0019٦Lv\u0012*Ķ?&\u0000Ġ&'\u0003>?͒6>\f\u0003gf[Ć.4\\:y\u0001B\n\rqh'/&W@G\u0004mۜf(k\u0015Z3p\u0000\u0013DEIGlZ\r\u001bwiB2'g0\u0003J\u0012ʛ?Ĝ]h\u0016m?\u001e|\u001e\u001d&)\u001b\u0011ݬI+6۩d\u0019\u0000_ISoԎ\u001b5>h&AD\u000ep)U\u0010V2\u001d\u000eȕ7rV}.TP5Ͳ_'\t14]m\u00193\u0015a\u0005g5hF\u0003L٠7JlE _\u001e|\u0003gv\u00073)m\b\u0014!V~&. \u0019qT\u001eѧ\u00051oԶe)\u0019s3Jl\u00114,\u0004\u0001kz\bǵj(@wR+\u0016%RڳjEUs<\u0016m_v\t1a\u0000q#rbGS\u0013I2\u0014w\u001bh1\u00046tDʹ1jtajS9a帖j.#\u0000a\u0001o\u0016/z-(MT\r|\u0011\rr=1<٧˲\u0004=\u0019\u0005Ô+z\u0016\u00122_595i.\u0015\u00002)v\u000bK*Q[ΙѲsS[C[Ј\r!e)iEw޹ۻw\u00192\u001d\nY\u0004 \u001bˀ>U\u001aU\u0000\u0010w9]:]zT\u0010\u0005͝Ge>\u00153\rI7\u000e\b$]sAJ[Rd{mQ9Quke6X?fd B\u0019qP&T3X\f\u0019\"n\u0002'\u0019c\u0010<,\b1jĜ1\u001038|\u0019qc\u001e)m`؂zp\tl\u0014$ǒ4\r\u001d\n-Rde>\"rs\u000bX\u0017O%i/w\u0006B\u0004\u0002\u0004\ng|\u000bx\u00032s(*d\u00072DlN~p&\u000es\u00055}%?q\u0007P}uF,\u000f!RM[XXl{z(*N/WhM\u001eC.>EY\u0004h\\`\u0006{ꑎ\u00117:B\u0003;\u0013\u0011s\u000271Dg/Q\"a灎g\u0004\u0018D청  \u0014#l\tw\f9\u0013\fL\n;}bz\u001d7\r\u0005[;h7q(.OJp՟\u001fԻ|~D]>e\u0004\u0000Ό\u0007ѣh4\rР\u0005i_\\rQVD]\u00117]/vǧ\u0007nT\u0007\u0007Y^+ҿ\fA(\u000ft<1lE#\u0014T5xjqy/8\u0019v -\u0014: UΕ\u000f\u000bZxvUmu\u001d7A=pٲt\u0004JQ`@5N_\u0018\u000etˀ\u000fu\u00034׊O\u0011iz7<-\u001eJvq(VVy[\be$ŗѣ\u0012r\u0006Πc'\bM/\\#5n\u0007U;Lp\tc\"|FVd4\u0007>S\u0003D\u000b>XZ\u001cJN%\u00166cPp\fa*09\u0012$0\u001a.\u001eHsX\u001a\n\u0014;~rK)ks\u0001-l<\u0016\b\u000b]\u0012Tr\u000e*\u0007-ZR\u001cנ9\u0019gq&~k2|\t\u001bU(9.'<ً2I\u0019KDd&5Ә\u0006۽#hY!\u001a\u001a`s:eotJ\u001f\u0016ڈ\u0003e!~\u0010>?\u0001Է:XZΖ\u000f\u001c%Ԏ\u0014ԱqDٍ\u000eu\u0003p\u000fHV?\\qHA\u001b <ر\u0013#NQ\u0001A#\u001bAͿ,.5оڼ罂(U'=܀Ǩ\u0005%\u0006[\u0018\u0001'4ExOɈ\u000bᘡ=/\u0005[\u000f\u0013j>\u0011X52Տ劚[3\u0007r\"7\u0001\u001e\u0017;\u00114\u00000% d00ש\u001b8. F\u0012dNj\u001fOe\u00111M\u0004*L\u0005%\"P#U[g)O\u0013Swh;\u00015j*\"k秿{+[F]\u0007BqA\u0002m\u0014)\u0001jT\u0007\u0000ɂ6M\u0013Ն\u0018\u0011)\u0005#UR(\u0019\u001a3=s[o\u0015\u00051\"QjOVt\u0007R\r޲u<\u0010@\u0018:m)@\u001e\u0000X/\u0004xJ\u0001j\\!k+\rx\u0013\u0012lTZ`u{'Kw\u0006XEו\u0011>g\u0018SS[>_#|Ht\tƐ\"\u0017}{۸\"qb\u0011<\u0016\u0012(s8S\u0001\u0011\u00019UtPJ\u001a`R4\u0010,9B;@\bD`O\b\u000e\u00149\u0013ȢkO\u001c%ǣhZA,?|\u0004$\br_1\u0014\u0016Bv=\f8\u0003!u\u001bS$v\u0004!`S\u0016U,ݖ\bȾ\\L]\rݽ\b[lę6\u0018edHNUN\u00035*=3YKg~=(OG^w\u0005\u001b=(J\u0019\u001fE#L\u0005͑}0\u001crů\\~Gd\rÒ\u0012epbڐMlmϩZ\"N^Y ɲ-\f,c\u0006$zgE+W\u0016s\u0011Ktvd/\u0002Nf\u0012e,{O\u0018hf\u000f\u00143N#Z\u0004A5 Nc\\O-uQ\u000e%`eֶx\u0010\\-\u0010?tXڹctAa0\u0004'A\\׿ے ػ\u001dmg\u0012\b\t)\u0016L\u001d{nfg\u00113\u0019\u0007\u0011i\\$~\t%~aN<芳<#7p2y\u001a\u0010-8\u0015^\u0019\u001dnU\u0002\u0016qj\u0005|@8+\u0005mdB\u0007\u000b#;\u0016S\f\u000b\u0000j\u0003\u0019$a\u0004O\u000b=-w\u0000:V\u0011Vþ6YB\u001d\u0000xl6`*ڏ&V\ba\u0015e&>\f`\u0016xt\u0007h.rOH\u0018[{j}\u000f\u0007\u000e\u0014\u00139~QW\\*f{D\u001f.WdlcMvM6:6锐7\u0015 \b(~\u0001Wι/f\u0002tR|5\u0005݊L\u0010\u0012\u0017>X\u000e;\u000b\u0000\u000el%Ydkv c?*\u00066Mw%J(\u001cz\u000fRo\u0015\f+#\u0017j\\ے\u0016\u0010)\u000f9SH\u001aR\u000b\b$_L^%Ą.ɽ=8k3YT-y\"g8(\r\u0017\u0006\u001f\b9_\u0012\u0000a\u000fzo_yrhO%JyFM\u000e\u001e>k\\E\u0005P`8OЌ@)\u000fDV\fo2Y)hc\u0004\"4\u000508B^H'CX\u0006d\u0011\"!cՒ\u001d\u001c\u0017Pc6ТI\u0004\u0010YΨ\u001at\u000ek*޲n0t2qHf}\n+F,cv-xW\u0012r\ts'4\u0016\u001edA\u0015@4|vS:~&q\f|\u0019\u000e{\u0000\"_IS|ܭ\u0015v(ht\u0007:uޥr\"fN9\u000b\n{iu|е\r]\bCx*PPّǨҾ\\\u0016V3F8Z\u000erzr`[z(\u001aW\u00078?#\u000b>)p`h+G3岻\u0004\u0011G\"=;Y4>%r2J$$O;FY\u0014VP\t=H3\u0004M5\u0012ʚ\u001d^`:ǃ#.훈37\u0013WaÌȅޗʬtyg9USJ'i\u0011yGE0&Cy\u0004:\u0014\u0019ũlK@r:(\u00019/}8핅\u0015s<Sg\u0005{;@q|0;,\u001c\u001e{M\u001bXsߡ0\n\t'&B\b\t:F@VD@\u0004<4%e[*&.O;U\u001e\u001b~iqP\ri<F\u001f>gĺ--u&u.(a*H]6\t\u0012\u0010UXG\u001e \u0018G3\fa\u0005VȲ\u0002\u0006ґ8\u000b\f[UE2~ψuHʛӪ\u0014灶{\"=>?#6?\t?~\u001e\u0016dėׇmJ<XC騪\u0015LiiY\"#&8w1WE\u0011z\n7\u0007BMf C\u001b]eVѹ/m+TflY\\\"6h\fIK\u000f9ܻb5\u0011pL\\DW\u0002/\u0003@)\u001cvamK\u001e|\u001b\u0015js8~{\tq3\u000f>\u0007;Y\\L1&V0=V0OMֆ\u0017bW\u000edM R@͟\u0000l\u00018S\u001b\"q-,2\u000eVGD#\u001as\u0002.&2JC([v̯7'Z$\u0010\u0003c\u0005+_KU_H=L\n\u001dˢhhR~\u0013Q\u0002xp\u0007>Ú|\u0005Z,\f\u0019d\u0007\u0013Fu?\u0005S\u0016\u0002HgS\u0002wǜ\u0005j-\u0003\u0002:6\u0006\u0010pk-B\u001e\u001c=~À\u000b.\u0016}wV;\u000e_^\u0018+}*u*\u000e\"\u001c\u0007ڜx\u000f\u0017*ìNm],\u000b[GD\u000fB\\l<uG\"=\"*?:l%iTq\u0019GBx\u0015b\u000f/!\\NӋ^jOm^\u00001]B]\u0017ӽ$[<,-<ws\u0001\u001an\u0015U/\u000bi^Pn\u001c`Tl#~L\u0005U\u0005ǥ~[U;uԊln#\u0001y\u000f~|bwMwYt!\u0018$\u001cTZQq\u0018yg&\u000fn=~\u0007!k:>IT]\u001b>O:q:6\u0010*\u0017!\r5\tZC\u0004\nz9\fB\u000e\u0001A\u0019݁|\f\u0010>\"n;2=1b\u0001[Z\u0014Fh!c^8mS\u0011\u001fJ.(ӍQ\u0004\nQ1\u001aI\b\u001b\u000eSe[\u0003d;8\"X\u0011#\u00114\u0012A~tH%Bz%lX[wWNz.\u001f\u0013\b-\u001d\u001fW%\fNi/uuW9bV1O\u0003\u0000lQg6V\u0001E\u001dRVU|Ӷ|\u0017\u0018_#d{>B{'֤\u0010-8\t:\u001f&,\u001c\u0016F[\u0006Hp%\u0002\u001a\u0004ܢ0rK!y\be\b\"\u001f;P-\u001d\u0015.\u001eo\u0002Tv#Q`aE1t$xuʻuy?A\n* }\u001f:UhIr_\u001cUS\u001c\u00051b\u0013(:BLmSx\u0000\u001e\u0012\u001a1gca.(xez>\u0000I}\"`я\u001d\u000b{9kmu)pX&\u001d`^D_a\u000f=㱴E\u0003\b\u001aVd\rzDjҏHMB\u001a\u001e3]\u0014/>\u0016u~˻L#y3\u0003\u0007\u00016\f!vp\u001bӛ,\u0014*9\\\"\u0010 ΌW0\u001d\u0010tth,K\u0005\u0006\n?t4\u001e\f|\u0011[D!?#B\u0019\u0010J \u00187\u00159\u0006{,+``\u0003E\u00061:pv\u0001\u001d\u0000\u0018MwB\u0001\u0012\u0001^\u001e\"\u0019a@ҧ۰0^D4\u0001\u000eǌPq\u0006)!<v,F|\u0015\u0000*s\u0013m!Hn7aC\n\u0005YD%4\u0007\u0015L\bMxg\t\u001bZ]UԞy\u0007suX\n\u0015\thPopx2g\u0006\u0011a^([v\u0015\n3\u00038\u0010L][\f5\t\u0003\u00108\u001ck3J\u001d5\r\u0018\u0011t\u0001!~\rbLP%NSO\u001e;*tiP\u0000\rvmrJD\u0010\roQ\u0012\u001bJ!D\tC Ѳ\u0007G>؟Tˇ\u0006\u001e6{\u0007Ƚ%\u0015\\a\u0011\u0018Y\u0015\"\u0000GHGSu[zG4oʯj\u0011>=B0\u0011\u0000z?yʋd\u0004&1\u00072?ӄjP|\nТ(\u0007\"B#F\\}@z[}a\u001c\u001f\u001cf\u0012`aPkCs\t\\\u001ft.\u0001B\u001d,$\u0001\bofO\u000f#\f:K\u0007F&}i^1Ȑ\u0004\u0014\u001e>`\u0017\u0012/\u000egEhaby\u000e\u0010\fM\u001b\b\u000b俨ƴGj_M\u000e\u0016\u0006\rNR\u001doz\u001f\u0011\u0013m\u00075\n5Ddki6\u0019h\u001a\t9\fM9G\u0019\\ݚr7=s١<$nF\u00052*=>\"UDq䛵 ɰm\u000e-_Np޲p@z5&\u0011\u0004`8י%%ܨ0ˠ\u001bņY \rR\u0003467خD~8J\u001d\u000eZ\u0005|>\u001fIF#G}\u0014?6\u001cC*\u0013fDCδ/\u0001~GUj<¨|а\bS\"~\u0011\u001aӟ\u001fZuzx\u000b\u001d\u00074`zXH(ǍF;b\u0018ؼG\u0013<Prq\u0015*\u00051a\u0000\n][@d٘DϬ+>o}\u0006tF>)PɁKt4E!#\u0011\u0011\b\u0011֩Ȥ(Q\n9Nx\u001d\u0001)\bA*oq\\\u001d\u0010<~l:`)r\u0002{L``x\u00005h?G֋t\u001a\r\u001aѸᳯy=d]wI=EC\\\u0018\u0012k]%(g*+7\u0007z)Ř7L\br\u001amש+\u001e\f\u0010qSb>Bɍ\tM\u0012\u0015aG`Oc88 \u0006DI5Yh\"\u0002fn\n}GѸ\u001e$\"9O7\u001a.y϶\u001a\u0015To!1eEK\u00107h+؄Z1^^8l;=\u001e}\u0015k\u00061\u001c-- \u0016zi\u0013Qn.rϝ\f\"JY\u0016}<|P{[ɘeB0W]]\n:\tmײl=[#A~<\u0012]\t\u001e s sJ-s]\u0006/\u0018\u0001`Q\u0002\u0017:9?1c(%?H\u0013GQxH]?$$m:\u0015\u001c\u001fVU+Gad\u0004M:[=}Y\u0010|h]\u0004V\n\u001b2\u000fn-/\u0005v\u0014H{7\\n\u0014r,W\u000b^-p\u0015\u0001B~FS\u0005\u0000-vm\u0011&ժ{\\\u0003\"U(]\",,1G٣\u0004\u001eGX\u001ec\u0018%\footfۜ\u001aaP!b\u0007ɡ\u000e\u0014Rg\u0004\u000e'CVB_[M?\u000b;\u0011\u0007B@WW5Wm-[\b4񥊒af(ƹsh\u0003d\nI+~Gc\u0018U>Օ~\u000f+%\u0006\u0016\ra\rE3Ϙ\u0018qx@\u0014C[sOR>CxTU\f9PK@\u0010\u001bcU(\u0013HU\u0011}_r|\u0016Y\u001d(\u0012,\u0005\u001e1E\u0004pTK@\u0003̧\u000b`j4Fm.g\r\u001d\u0017\u000f\u0005X6\u0017F]l@/%bjv\u000b-\u0001M\u0005#B\u0013\u001eB&{PJ\u0006\u000b?@ѩ%,i\u001d4V,bw݉ަ\u001cD\u0013QI\u0004\u0005\u0016\\SCI`Y;:nqC3PzgJ:G÷\u0006\u001b/\u0002?*/\u001fǯn\u001c\u001fǯo\u0007\t?m?hLoǯ?y\u001fw\u000f??__?oN/\u000fOȯ~TTWԙ\u00051@u\u0000Afr\bU[Qs5+D\u0004\u0001\u0007|cڐ@3+\u001fR+u\t\u0001D\u0001]\u0004\u0007^o\u0016}@5KO8mc\u0007\u0016,\u000b\u0000lD&A>0l\u001e\u0003x\u0011ΙYD\u0016oѶL-$]\u0018\u0013k%Q<(9jCfψQqO?)>H;Q\u0010\u001f\u0014Zh\u00113\u001f\"p\u0019X.~Zh\u001e\u0003C9F}o*EToWm\"\u000e\r\\\u001b\u0006b<\u0006u\"T!3@\u0019LU\u000b3JX3^\u0012c\u001ai4\"FIQf#菐r55㝤Aykq7ڔm\u0012`k\u000f̯DjGV|U7+|\u000b\u001dy\u00184D\nrm\\7n*F1?\u0011Cj0\tC#a;1\u000bu (\b0\u0007]\u001dkG4|\u001470~\u0004\"^R9\u000eY\u0004M-z\u0011\u0012T\u0015y\u0004zp/fx@\u0014\f\u000b\u000e\u0012t,\"j\u0003g\u000bo'\u000542:ʫG\u0016g\u0011\u001b\u0015\u001f\u0006h\f'0K7\u0011X'iSn+'\bk3'Z>8>]Rda\u000fɌ\u0011Ah\u0000\u000fy g\\\bgWrGy,H\u0010G#Z8T\n`.Ҕ8)|%,uY5zFeG&C\r\r#qDͅ#SUh%ٶ\"1\f\u0001\u0004\fj̓k\u0018@#Xp>5y@Z\u0014\fO\n\u0015cOoB+\u001f}|\u0017ѭ\u001cyg\rܖ0R\u0003\u0013M[K{\u0018\u0003C\u0004Z3\u0003i`㡗]$2}\u0002r\u000e{\tKa,+ziڳd\u0003RaTPL\u0015\u001e\u0011FOD]\u0003|70b!!\u0003_2\u0002eGJV\"OyYj\n2V*Ho])\u0007\u001bQG`,E露\\Pq3 \u0017\u0014?`OES\u0000\u0017\u00057K/ї]S5gx[r[M\t\u001f\u001c\u0004/\u0016jV\u0000CN\"\u001f$Ν\bDDZB3b}*\u001aEW_ASecavKw^.L#rWȒZbONVu\u001c\u001dpcHW}\t\u001f1j\u001e%̄40V\u00001-P?\fÑi\u001e\u0007mR*DTW97ug&b&\u001b=\n;\u0014<Nc\u0000!\u0003ǧ9]鷛\f7\u0019\u0010̠\u001dy^>m\u0018g\u0010'x4+NԖ\u00026'IK\u001c6, \u0015Ęhz\\z\u0004覒\\3Ou\u0005+a2Ø<\u001dTa*\b \u0015D3\u001c\u0017\u0004\u0016.'\t\u0018\u0010S*\u0001Z\u0004,}!%5d\u0005*x\u0019|1 Ek;,O\u0010\\#zA\u0015\u0010-+\u0019o\u000e\u0004mg)<xZ0\u001eǚz\u0003P@Qӌ9(~j.*G\r­y~+=},n®TX\u0010\u0013UhQM4(ak\nl\u0001.\u0013GP\u001a\u000b-E\u0016EAo\"6\u0016\u0016J2.\u000e,a\f=޾\u0016_~W~3_\u0017_S\u001d\u0012!Bq\u0019\u0004w\u0018FR@\u001eBUy\u001c^y\u001cOXډ\f\u00000ǿv\u0006wŧ獛@9cD[xS\u001bW\u00048e__\u0001ڕr,\u0003\u0014Q)\u00146++eq`Z\u0019\r([\u001c5(8\u001e\u0012Th=@؜\u0014\"\u001e@dRc\u000biP*0-ki0\u0006\"`\nmwe>\u0005QMlg\u0004˨g7\r2L\"70C²k~\u00040QD\u0014T>{>͔QHQnAa|)@z\u0007\u0017PQ\u001df}^K8U\u0007\u001e\u0002l |\u0003`\u001bFtG@\u001e'I*s\u0015\u001dQ}F`-\n}}\u0013v\u0003kؓOk\u0016~\u0011..I\u0012q\u0019~U\u001c$vd>\u000fT[\u0016qfv\u001e$C\u0007m(\b~\u0004'|nǇ\u000151A:+՝dP\u0010<̀ݵ~\u001d7\u00169\u0014\u000b\u0014\u00065q_\u000b\u0018q\u001a.`Sy~\u0018!9\u0006\u0017a,6\u000f<\u0010,\u000b\u001b HDЙ!:s*k^\u0014`\u0000u|g}u_'5u\u0013CA< h\u000f\r~ۢGŕ\u0016\u0018&B\u0001|)}=\tg\u0015k`c\u0005x\u001dn;G{\u0013\u001c~D\u0015]\u0003\u001d*-n!qgh07\u0001΍yOQnI\u001b߄dJ\u000f\u0019w2@]zdG\u0010\u0011=}(\u0019حO W5&ga><\u001c\u0000X:\u0013o\u001cUȌ92fd9\u0013zX=\u0014mS\u001aadқ&\u001a\f'C.:EkU;,Q>zfP֜Pq變XJ-%\u0019x\u0000\u00163\u000fHK3TyQSbޕ\u0011M\"\u0013 +s]/Hw[ Ȅy\b\u0017\u001dݟnD\\a\"{+^g;[гk{ \u0006Hl%n\ng\u001c܇\u0001\u00067}RYM\u000bQKCw&t(7\u0012\u0017g@YYS?z:_Nˮ*\u001b{X=nel9/p21s\u0016:6}\u0015\u0016}\u0016H!*a\u0003T56)0ԫwSl\"]\u0016yF\u0017i[.{.>;D!^m9\u0001|%¤`\u0003\u0014\u0001J!E,]\u001f?LXN`{\u0001\t]M-q)\u0011P3\u001b\b\u001464hW8\u0011OY\u0005B\u0016O\u0019\u0015,]U5i칑s]mvt`M\b\u0003m\u0002mu<g8\u0016\u000bז\\-<î9VSG0]o^ƭd?\u001f#|[\u001f \u0011\ba\u0019v\f\u0000ڏ\f\u0014@qw\u001fKʙ\\~O\u0000\b\u0002\u000e`~2\u0000:߿gY)K\u0003\u000f\\㙛\u000bҔ_\"0\u0014QɊ\u0012\u0004r\nGP+\u0007Z<.\u0006$u7I-.P-\u001do\"u7~)_r<X#\u001c\fV~\u0000dM\u0007;\u0000\u0006X[DNN\u0017n\u0003]\u0005\u001a\nF$$K\u0003\u000f\u0010920\u0014kvO=2*}=ekw\u0019AU\u0001o\u0019\u0006>\u0013h\u001b\u001eFt)Zw|\u001e\b \u001fz\u0011Kyh\u0014Ty?#9\u0002C0t5\u0006\u0000w\u0019\\\u001fu(Q\u0010Ԗ!7ԤLw~\u001e\u0002W)K\\a n4\u0005\u0011PD\u000bvu\u001a\u0011\u0016>v͚ˠ'?J&eHa\u0017;?*\u000e\u001ag\u001d6\u0019\u001d\u0003X<c/u\u000447Cw\u000fRiI\u0004\u001brk\u001aƊ$ɗ&.4XjMwRXУbM\u0017`\u00068e\u0003#u\u0010z\u00126ϙ\u0012\u0017΄\bw\u000f\u0007\u0017v籡\u001dII/pY?*Y:U̧Z\u0016\u0017kp4n:\"EݖJP,r\u0019\r^󳷀u\u0016z㯛%Z\u001e%u@#3bS0Y|ޣް66DYtc\u0005͟1s|].\u0004[K\ng\u00072\u001cڼd>}\u001b12mm(\u001eL\b^Ge\u0003p敢\u0019UEw/\t4gɉ޿9\u0010\u000f:r\u0004.7L\tKÿ׾m\u000bb\u000fKi\u0016)(\u00142O7\u000e\u0014#\u001f_{XW팔\u000e4\u0003iT=öҴ4~,fTɛF\u000bd=.Z4\u0010$ݿWP\u0011F\u0005\rYp#l\bh\u0017Z12f\u001asN%\u0006*\ttqle\u0003 .]Ɇ\u0014RY\u001e4z\u001e\u0001O\u0000JBI\u0005\u001b\u001f?KimmZ7ψY'a>8;F\u00003b,EԦgJA\u0004c\u001c\u001c\b$?\u0014ڎ a7\u0013DB׿Z_[X8i HL?E[##\u0005\u0000ekY\u001eA2~rҹ\u0003cۄIq9=P\u0007#$\u001ei\u0017\u0003\u00120E\u00039g4?5Ö̟\"{\u0017\u001cHu}s;'\u000eόx\u0001м̝Y8ð\u001f\u001e'DuR\u0012a \u0002\u0016{\u0004Az!s+\u0004lN\u0019Vڱ8R1 =%~ \u0014B\u000eiqzz\u0003\u0014C/pb\u0016\u00124b\u001dk\u0006&\u001cQ'\b??\r޹!\u001cشFw\u001b}4smpwu\u001fYYv~0GO\u0017.\u0000\u0015\\|˙6\\\u0002~L\tEPqfU\u0018\n\u001dm Fqowɏ(4t\u0018o\u001c͘)t\u0000\u0016ib\u0004=@YF7u\u0017I8\u0005=#\\m3\r^\"K^r)\u001et0\u0010\u000b3҆u걧\u001f_ϤMPwcP)f\b C%2Q\u00070z>jr\u0016\u0000\"imK\u0007c!W+\u0016WO#*Bl}zhd\u0004{?o{\u000e].Z^ًT\u0015Vĵ\f( \u0012AUJ\u001aG8\"Un\u0003y;gޖ=Ӣdak\"Ek\u00168=\u0011%^N\u0017`\u001d\u0015aሗ.[%q{f0v包v\u001c\u0018R:xPt^.aRӾ\u001d<\u0010æfpJ3n\u0000!,3h\u000f\u001cHh\u0017z1XTKNFb:\u0003\u001btL%>\u001f^\t\" 8\u001e=aΰc\u0011 Y|l\u0001od:Q<☯\u0016\u0002*&JZ.E\u001b3ٍ\u0004-6~%N\u0019\u0007\u0014\\\u0017q$`.$0c\u0005\n\u0012\u001cS.3dEwFr.p|f-\u001a'\u001ce4\u0007\u0006Cψ3\f\u001d\u0017M\f!\t\\\u001c\u0005\u0019ˣDّq\u000b\u001e\u000fGI&\u000b\n\rkGD~G\u0006R\u0019a͙\u0018+\u001857\n@\u0006\u001diD.l\u0010q\u0018v'{\u0006F֏i^H*Q\u0006EoS\\=Zh\u001e\u0004wI^j\u0018sN$w\u0016D \fU\u0012Y^ȹ&s͉\u0019\u0017<\u0005=\u0007@-b:ȍ3\u0000H4Ϛ\t\u001aϮlJ4v><la\u0001@SK.7\u0000S\fSau5),\u001d8%[)\u0019#im\u0006K\b0C\u0003#❉~>v-#M\u0007y\tB\"g҃\nwF\f)Ueܬ.B\u001f\u00157&U۪2|0@;k'\u00049_q[KL<a\u0005\u0005e\u001a\u000b,Op٪E\f?\u0016\u000fj7?D@lȊei5ݡ%\u0002Օ.܄+\u0016nܡE\"z|\u0000\u0000`\u0019N?>\u0011?j<\u0002\u0010`\f>0Og^P,eTIܦHW#\u001fYO\u000b-ʟD\u0000\u0019zb9]\u0003B\t+\u0002<aUU|SqfE{yLnf\u0014ð|\u001d\t{3>0\u0003p)k=Bg\u0014\u000f[=\u0006cU\u000eՆ\tG#Z=hi.Z|FfhK&/F[\u0013Y\u0005G}\u001ch6+wa7\u000brB39(\u0017-\"dv\u0016\u0015;\u001fam0UPK\u00111M/!8~!\noKt\u0006wf,\u0005eo/6\u0015!\u0011\u001a*0s.Bm庴oo0<Vbz)\nSbg>]Z\u0006`\u0011(7[{t\u000flF]H6\u001b[\u0003b/[\u0007qQw=\u001dc\u0015EN{3B\u0012\"*\\Uz~ʭ\u0013CS5 ّ_\u0007B_(O\u0003%)<ե\u001d\u0015f\u0018K6\u0007\u0015\u0019m9\u001d;[\u0006\u00003eCaZk_z}\u0013!ܖyu7}a\u001c\u0000+ҫ\u000fmD}gz`}DX>%#~'QjW˔\u0003\u0019B/(\u0007\u0014\fUN\u0014\bX\b\u0012\u00143mʠ\u0012\u0003sy}W\u001c{W<o\u0001E\u0005>\u0010@CaP\u0005\b2أO)vAņݦ˱SVnܵ>I\u001an0e\u001a\bCk\u0011AS\bINvI1s*S\u000bi٬οq\u001bkhX\u001e\b\bp}r_W۰F\fN#@ۍ10h7ܜ˓SmzJߢHL\u000bϴw]D6bg=`?ut}D)\fqC\u0013ks\naߺdȈ=9\u0016`>ggĪE.,ĩ\bzhih\u0002\u0001T\n-2\u000b\\M$/Y\u0007)1.\u0003B8M 1:\u001d\u0015d[yvP!n\u0003'>\n\f\u001ffww@\u0019\u000e{\u0006GVjtՐkKܪ\u001565\rsI\u0013#`¾oad/du)*91@#Yc<\u0000=Ν͉\b&\u0001x\u00014e\u0005>\b\u0012+y(/_U\u001f|3ED\\\u0012q\u0001x)K^\n\u001dS\u0002AU\u0011V\u0018tSD:^\u0010-l@`\u001e0|A䵉g͸$ywswc(6mWE2EV'\u0017ԗz\u0006Ar\u001e1ʬ&b\u001dO)Oو!X\u000by\rLʡr*Gfg:HX\\o\u000e47\u0010FǕX/Q4\u0016v}\u0010\u0007s 37Xr.\u0018y^-6\u0000\u0005:\\}PzR`5a&ʃo~\u000f[>b\u0003\u0011\u0016ԙr&\u000ek\f:d:6\u001164}(\u000f'qo`&}^=0F%w\u0003\u000b\"\u001cRX+ԮXRFRp]\u001f4G\u0002\u0007f܊\u0010;d\u0004!Wc&\u0010\u0001O\u001cqká\u000ezH\u0016.=\u0013BA\u0015\u001f\u001c\u001c\u0018\u0003D<ՕG`Ʀ=\u0013+\u0010\u0019}P\u0015`\u00116\u0007CyŠ *\u0018<\u0007p\u0006=#\u001d\u00120\u0004%^\u0018\r\bn;\u0007M\u0004\u0019\u0006\u001e\u001eݏ\u0016AE3eX\u001dd0ʑ|5ٙ\u001b4\u0002ǗekֵFIY\u0015P:wPc3\u001a͜(\u000eL\u001f\f&s\u0001\u0017\u0001,ţ}64\b겨!\u0016=\u0004\f\u0017\u000f\u000e\u0013DXlnOVCԤ\u000b#r\u00068j\u001e{aO&3mb\u00014f`^h\u0014'2d`\u0019\u001d\u001eۏ;ۖ\u0000C\u0006t4\u00067vO\r[J.32\t\u001bOd\u0016<\u001e\u0014*\b6^5Xֽۗ3 JX\u0013DNXhպD(\u000fw9b>\u0019~G()?AW\u000e\u001eQ\u0018aB7]\u000eJ(d+i-uVֆ_i\u000e\u0007\u001f>\u0016\u0002q)s+\tK\u0016|6\u00032nn33\u001e׬e\u0001٣{p:@\u001a16*$\u00032\u0017@:d89 \u001e\r\b\u0015{\u0017\u001a_9X6\\y g\nBt~H\u000fnr\u0011~ \u0000\u001c_\u001eݖb8\u000bζ\"&\n\u0016c(U|ȝ+B-y'\u0005\u0014mLȰ\n:\u0003%.\u0005\u0015TEt\u0000\u0013\\OB\"~`}\b\u0005{Qi1\u0000\u0001>?sP&\u0002p\u001e7&\u0005OZ\b\u001b\u0007<G\fV@t͇80-\u0005;\u000fm`Q\u00002Z\u0006O\u0001\u001d\u0006\u0005\u0010t.ټsf?\u0010\u000f\u0003G\u0007iE֚o׎X\bytH\u0014Fz\b5<#\u000bvU;\u00134ol\fд+AQ\"\u00114\t:\u00115Dlڼr\"!\u001dl=/5\u0017\u0015~v1LHͩh!\u001flRV\u0004>\u0010x}\u0013ӻu+қ\u001dk-MV\u000bmkchSP\u0005]7̇\u0002!\fٕOGU\u0012&\u0005X(*8\u0015(\u001e+Lbym\u0006h=,;\u001b̝SN51c)\t9̷\u000f\u001bǩHr\rgg\u0000q/@\u000f\u001c,\bѾ@m+ow=a\\F/ 9\u0010h\u0017\u0016cQj\u0006\u00067̨˽\u001e\u001eӉ5\u0001\u00140&\u0018pJ6|P\u001eDyEY\u0007=ǩo\u0012\u0001z E?Y \u0000\u0013|r\u000e\u0004\bSk*\u001f\nѦMsEq7bYȁA\u0007~(bCO\u0004\u0017u\u0007f\u0003+3k=8}\u0018r`Js:v\"\u0000כ3\u0019ZD!\u0001c4?\u0002}$ބ=\b^%@dCl@\u0015m!Z[=.n9\u0000Ry:\u000fC\u001aj1/^\u00199\u0019׷BL!ӷ?AnvF-S 8W\\X\n4vw8tܯR׶zE>\u001c5\\;\u0010}\u0018U|y\u0019k\u000bʄ\u0005CmHa=ʽ$<\u0015T\u000b-؏\r2^Ƃ\u0011*\"H8kj|S\u00059~\fCMnNuEAC#FgP!i\u0000\u001el!Q_zվGdVlbGR`b\u0011f\u001dZj\u0010\u0001!Qw\u0002\u0006&V[\u0010%~\u0017\u001dil)UINq[X\u000e '8#Tiт\u0014QE]ˍ\u0012E\b&1x\u0019<#B\u0019㜵N\u0005e(_Dimq^~U>\bFf&J\u001a5\u001d;@)PV}י\u00070@GL\u0012\tHxUR!-,kچ\u0013pOWT\u0018LǡKޡ;\u000e\u0000]sR@\u0000[\u0011\u000b88\u0007\u0002\u001c=#@\u0004\u0003\u00165Ti\u0015nr\u0000\u001aL\t#wȁ-R  bmw\t\u00022s>lݟFH\u0001\u0002<\t\nOZb\\(k\u001f8\u0007%Y\u0003c\u0019\u0019\u001b*vQP8£\u0005\u0017f۵XG;r{4sOO䙼k\u00055Y햬\u001e\u0005,Ndf >%L|(h\u0002q\b6왬̈́\bs|1/gkX\u0014\u0016in;\u0012;䷘l4:)Zѝw,_|Q\u001d\bMXHY2ƙDL\\\u0015L CZclii\u0017=~\\ұms\u0001쾐\u0014J\u001d\u000bh\u0007]ږw\u0002\u0002`׾2\b66*\u0017\u000fj̀g.k>\u0004)ڊ\u001b`\u001cH52o5\u0006U@/BƸS\u0003\u00078w3꣧R<\fnK\\Vʈ\b肂f\u0006:\ryi\u0005\fPo}\f&_]yq(h\u0012!\u0000C*\u0007tK$#{_܂QuL0^v^ߋjV=n'df<x|\u0015\u0002BQ\u0007s\u0003p[ N\u001aPR:Q:!\u0002x\u0005~ \u001fFv@\u0003>J۲\"\u001c\u000b)\u001d%mo!\u0017I\"S\u0012Ӄ\r!A\u001fPW\u0014@a#сQ]Ԯsuڻdtm\u0019cqzB\u0014\u0003K?9̼\u0016\n{Su}p\u001ds\u0004&f\u0017c%Δ{m꽌\u00026\u0001豫\u0003B\u001dR\b\u0011{֘$ 5n%*Y\\9\u001d?F12\\oi(u`17A\"Xs/Q\u0000\u0011\fm}勒\u0004:﨑r_߳\u0017BLB_IT5_\u0007ؾ\u001fZǋ\u001d\u0004:\u0011u|*g<\u0006=Oл! N\u001f\u0004ELd.@y\u001etZ\u001dS\n`Y1Ǫ;{H夷\u000bQ?ܙ:ש\u0005l\bu{#\"뭖&\u0004x\u0016Z\naܺZ{\u0006wr#%V\"\u000e/\u0007;<\u0006~\u0000\u001a@,\u00021^D\u001e\u0018wA`m\u001ad\u00123ۘ;jW\u000f\u001b_\u0012\fD$iӉ_ABDC*Qv:%w,xWr8FG9鈵\u0007(C$cuU\u00154ct\"\"`\u001d\u0012\u0018JzZ׏\u0017:h$,\u0004VȌd1FF꼔EIwDE\u0012z\u0004\u0015AnT\\0\u0014\u0007\na~\u0019rhu/\u0003mKr\\\u0001\u001cڀ\u0012*9h۳ʔ\u000f3Bz1)\u0005%9`\u0006\u0014\u0012!\u0019[\u0016\u0003\u0014*`¨A_No'\u0010!Fܸ9u_,\u001dќKU=:>w\u00007{\u001e\u000fk4RO7J5EJQ\u0010-\u0002\u0018 o.\u001dj\u000b\u0010SF0\u001bm\u0013oh,\u00155yu\u001c!A,km\u0011k/PʆV\"Y^g\n6\b\u001cJJ{o\u001d\u0019b\u0010\u00046B\u0010\\@m7mn┱ \u0017fl\u001bi[2jp/zm:@]DЬ.RyH6Xg_0\u0017\u0001\u0016G06\u0019$֩x\u001eY2K&Z4y\u0015T#\u0004C\u0000\rk}Ӧ,e^x5$\u0006\u0019\bGץ.\u000bZ-\u001b=T\u0016\u001bh\u0001Wt)\u0006hwQ3+hK\u0019a%\u0018-d\"z\n{\tקJ4Z6_W\u0004\u0010\u0019*$jm\u0019-m_'Z\u0001u\u0012n\u0004y@?\u0003\u0017$w!pPܸkKO\u0002$7\u00050I\u0003i\u0015\u001eXU[M\u000e\r9O'Ā$%))@Mis\\z,t\u001844Ept8_'\u001e\u0018L!\\TF0fׇ\u000bb\u0017G\u000f\t\u001f=$dAu1!\u0000Օu3\u0001]C62\\\u001683sRuI\u0002\u0010LY\u0011fH\u0016\u0005L6jR~\u0011XgʟBzq*c9m׋btfQiX^\u0015>qGLNy]KUne}E\u0007yݖ[jޛ\f~&\n\u0012\u0016DyRcwU;cSg\u001bF?7Fy,l)40\tGe;|\u0005Owd\f\u0015F\u0010a}\u0019ixEꁵ\u000b`g,}{=8k1\u001bԣov\u001fgZ\u0013,\u0017Myю(,NY>S}\u0015DyZ\\!؆%\nOңto.\u0001\u0018\u0012+F߿Ȯ$ٞ1 \u0007\u000ep\u0012\u000bLlim\u001fV\\Y1ۚ 6Ӷ\u001aUmȴFDS_S\u0003N[J$\"\u001e޽㑏/KʹGEL+BTVY\nx\u0007\u0003dȾ.\rZg49~J\u0001\u0011&u\u001a\u001dB\u0012?X/#\u0000т9\u001e==\u0011\u0011+QT\u001b\u0019\u000bmV]:<!F\r7~ܾ~\u001e\u001d|\bKR,\\U@b\u0000OY\u000f9!8`\u000b\u001d\u0004@KZ\u000e:\"\ft<r-]j\u001c\u0017y{b1Ք_ަ)d2j覦a8haDPv|K\u000ft[ZY8Ŷs\u0011WR=\u0012\u0006ʁę']W`\u0004v$4xE=W~D0\u001b[yY\"\u001a8#b\u001c6}%c'%{(䬛45R\u0001_=\r#+'VW}E΂FZnQ0bؾIǺs1C[uXǛ#\u0015\u0011\u0004U?<2\r\u0012\u0015\u0000BSؤG|\u0015U#Pg^oj\u000fJ\fv$АSDQ\u000bͿC\u0001S_aqA,?iM\fs\u0011tf0)\u0005?KÙt:)XۙJN\u0011%Z\f\u001cMO )N\u0013\u001dn55K-EK\u0007\u0013\u001fo+߮\"!և\u0019;Q\u0019zs0\u0019x,0°2\t\"I\r~k\\\u000eZUJC\u0019E.ݷJnX\u0002,\u0011|HG\u001b4\u00030ʑv[IR2A7bH\u0017CN{KcK\u001f\u001bSQ&\u001e\u001c/͵y@(\"O\u0000c9e\bҰ+Ih.\u0000(!c\u0016\u0011,D}fX]m$l˚%V\u0000\u0005no$V<%բn\u0013|o\ng'x,\u0001r#\u001dA\u001as_\u0011u\u0017+\u0016\u0011T$e,;\u0012n\u0002c񖋉\u0012\nOf.{Q#ߖMu&z4\u0002g\u000e$\u001e!CKq-g^wn1\u0015}/MP~;۶EHП\\\u000b\u000f\t\u0012Ԗ\u0005!»XA,\u0005\u0004\u0016BD_>\u0010/\u001bIw-\r\u0005x\u0003\u001b>](u\"9vE5Y\r%\u0016И1)dEBvľc\u00047K@ޓM}1BsyU\u0002\\T\u0016B^rqǂ\u001f\u001d8xjjh\u001b\u001f(-l఑so\u0012nqV8+.\u0012\u0018\t[\u0004|\u00025\u0019\u001aTejn3F<n\u0005\brȴCB\u001b,Lo%0\u001dcdf8$\u0012\n![ZA,^7%|qڽwYI\u001e\u001d\u0016n1Oqx\u001b]`\u001e[u}q\u001d!3:\u001e\u00111\fStȎ,\u001d\u0019B\u0012\u0016і0\u0004\u0014::6-F-O琞\u0001Ȯ\u0000\u0000\u0018?3Z\u0012~8w\u0000 _\u0019>\bQlR\u0017;t\u0002\u0014|W?HOPV/lUjJF\tSN¡cyΟ?ၢo\u0015\u0010O+\u0019\f`2\u0000Z\u0004\b2cPns0Q\u0011'\u0011My6C\bL9ӳi;Z\u0012s\u001fa+I\u0007fלU\u001a80\u0019LExm.we[Ԅl\f5\u0016\u001b\u001c$Q\u0000^ｐ+Hz\u0003g\u0016e1]t~wаU]\"v\u000f\u0005t]Tv\u001d?ݢ+a3\u0010e&=s\u001b[|&|j!zΈ\u001b={xHg\u0015q\\xZ4oq1(b;\u001e5T&SP2\u0010\u0016X.a$@&8Kc\b\rh\"qߠǠ/q,\u0001ftnx=ٖNcIU\u0011\u0005M^ԟ]O#\u000e\u0002zTVU=H8јh\u001d\u001c?`\fYyPϜuQEA\rv_\nI\"BhdUu&TpJ\"cD7\u00156\u0003Txt[\u000f壘KjK\n\r#\u0012z}lȶqӸ\u001dۺ8]\u001d\u0017 @#\u0006{PhA\u0003D׹9;H,`ZLxU?b!)QUX\r\\Ȯ&\u0007\b^ǎkG4\u0019\u000404ANGg\u0005l);\u0016fҪu f\u001e\\9.\u0015tV@eO\u0015\u0016N7I<\"W{f\u000f-/i=Lɥ(b\u001dK4h\u0007j*_y\u0010b \u0006}_Vs1D[+\u0013\u0002SaąQ\u0005Fzj~\u0016ݷrU\"oq,`4_[́] ԨBXΣ\u00029-2(CŎ\r5L8\u0007(C'hZS!l\u0016\u0005\u001a\t\r\u0004}\u0018Crk\u001dv8aIw-:+ ӥP\u000b?^.]%z\nc̻13V(\u0011p-\u000e\u0007s+\rI:z\u001d qPBg*ל\u0017\u001bl&=ƶe\u0017'g8\u0000@K/\t̨Iq8r Mf\u0000Ar\u0003p\u00008s\u0001M_1c\u0003lb\u0013DFUi\u0014@턎?\n/\u0014\u000b\u000ff|>@\u0016+U\u0007~K\u001c[-Q\u0013Ww+\u0001\u00115j!{DnUK\u0004h\u0015SJ[P,[@%u\u001bH\t\u0000OqQ[TjYtuNu%3\f\u0002XU\u0000\u0019\u00027\u0000zB2iz\u0004UYF;0\t\u001b,i\u0004\u001d#%\u0001#\b\u0010e[U۱th+\u0000\u00058o\u000b\u0007UUU^j]B囊TbMb {#9A\u0003eA87?6$\u0019~B\u001br_6\rݴ\u001fs,\nC21%g{겦\u0001]A\rx\u001fƂ\rG\u0005;5y\tr(\u001d,+\u001epbT\u0016\u0018FRo>sc\u0010ڔi0c\u000f>29\u00147}î-Vh\u0003y\u000b\u000f\u0007hf\u0007Yk8#qf¹pR7Ď8\u0013Do7\u0007d,\u001cP\\pn7W)\u0013sm`ZDn2\u0013~fd;3\"b}\u0005]\u0012\u0011L\u001e\u0005$&\u0004\u0011\u0016ÃPP9k\u0001ulęT׎\u000e%qS\u0017,>u\u0016\u0016%\re\u0005O\u0019Q6 \u0013{(J5=#\u0005h\u001b\nV-h85T|\u0015\u001dp-=\u001e\u0005ر\u001c7)\b`^\u0007+\u000e\u001a\u001f\u0015^.\f\"y\u000b!_m\u0011\u000eڌP\tDmQg\u00114y\u000b(`~\u0006\u000b6X\b\b\u0015zFPo#փo\u001e\u0010߀|Ͷ\u0012`\u0001z8ߥ\u000fk*\b̻~m'Y\u0012<\u0002<\u0017UH\u0017\u001dt\u0003\u0017?/%Dl}+\u0018΢b\u0018\fe?94rs\u0011\u0001\u0018&T@G^qtkRX4g\u0015\u0018-8\u0011\u0012M(\f\u0016XFk0HB\u0005c|jP\u0004NAb;\u00193@KٶE.Ev\f[c-\u0018\u0004rw+\u001brǏٵ\u0019-Pl\na\u0000BF q\u001fR\u001f7Zw8#F1;~꭫l\u0012tgZT\u000e\u0017)kd,eqq\u001fd8\u0014\u0005G8W\u001e\u001e\u0013_R*\u0003ad\u0013\u000b܊h\f$b\u0002k߳\\\u0013߂s4OrlUŰ4vMU1$ˁJFj\u0016u~E_\u001e\\E\u0000gv\u00003Em\u0001\u0014!V~\u0011\u0000s\u001f\u0010\bNfG\u001a\fcn\u0006\r/\u0019fx\u0014\u0016&5\u001dXT\t*ֵ~\tPSiV\u0007`.\n\u000eɰO*[\fS'Վ&\nEX\bȈ\f6\u001bCӰ=\"d\u0003UA\tה#2=s\u0019qp-\u0000@ש\u001cX\tR|\u0019\u0004'#$\u0001_`@\u0007,\u0003\u001ct.X\\d.\u0017$B\u0012U\f.#ςޏ-aЙ<^n\u0015\u001e\u0006ƧY<K\u00009GJ)Zį\u0016\fbC\t-&WjR1\u0015p:FK_˥B\u0000E^\f|q+j\u0002k`՗σJ\u0011'/\rG\f\u000b\u00194(\u0016i\u0013\u0007'z\u00164r\u0019Y* %oBx\u0000e\u0012¬&~|%\u0013LQH|/Bw\u00119!ٞ\u0019BumY0^FMvuE2b\u0001S[\u0012&Ysl\u0001uE+{~F$(I\u0007\u001e~\u001cx`gYNɓx@\f%\u000e^\u0005\u001b(\u0011EP\u0001\u001aBRM\f23.@!aStDƒpE\u000e9\u001cyP/;]o\u0016Dtw\u000b\u0010AGh0\u0015\u000ekϟwGwGD_;93-\u0002{MD\u001dR×_@W7^<>U0\u0013K.'\u0004PB&b=\u0005\u0018qf?)giI`9{\u0002\u001d\u000b\r䠧āҺV|7\u0007\u001c\u0005\r&l_\u000biBat\u001e]\u0005qx\u0010.Z\u0002ND]\u00117\u0005G}|aߡC\u0003\u0001\u000eFRψ؏\u001dE\u0006B\u0000k\u0015P5\u0001rBi_}\n_:~\u0007?ݯ\u0002\tnOt.7Z&*4S\u001d\rV0\f%\u0003Z[_\u001acKkoPff\u0005|@\u0007bh{^)\u0007>v_p7d\u0003W3\"b/ǂtҙ\b!5|\u0010Y{\u0012z?ñ:RN\u001en-&wǒzNu%G5\u0013\u0016iO\u0011\u0015\u001dO!mt\rbNLPNDq\u0004:v\u000b\u0012gG:0۞\u0017\u0005Vfl\u001fM\nK\u0019\"R\u001fa[\u0001Of.Ο\u0017Ja\u001baE1r\u0000^]@\u0000uR\u0018T()pk@c\u001d:b2z\t[ʹE\u0004f8Iy\u001e$|EYK\\v\u0004wC*q\u0010fׇǜ\u001fneGRʞ2(n\"4MА\u001fL\u0002aR\rWf\\fނ\u0004aS8\u0011Ix=+xr!af\u0007\u000fIp1WX9\u0005L\u001eU\u0018̓\\SڥgN\f[toZ\bܲM79#\u001cJ\u001fP2\u001b\u0014tO)bj\u0012\u001e]nWL^\u000e\u000bwK =oE|\u0014/<\u000f44oSA_tR6xy\u0010%/Fj\u001369E\u0014u>\tHJV\u0005\u0017kY\u001ee\u0012;\u0017d Vz)\u000e_Suv_\u0017ņ1Qj\u0004Es\u0004uUpP\u001b/ɩ\u0005Z\"u&Ej)\u0006FB?ՠd\u0015\u0000\u0001V]qq\u0000Ti/E\n TNaTG\u0016}T!LX\u0004\u0004Tx_\t%9·@s<гJA\u0015/t\u0019*=dF`{\u000bv\u001e2>\"Vj_ײ=8\u000ejY\n CW\u000eDig.I\u000f4B !MEo\u00107Ƀ\u0019!1#\u0016+NX\\6(@\u00194\u0010k\u0000c\"x(F\u001a(?[\u0001H9{rlZC{\u0010x\u0010欩\u0005\u000f!s<z)fC\u001esd\u000ew\u001eb-\r>\f`\u001d=7FZe!zj8 ^\u001b\\\u0007e5\u0000sօ==:a\u001e\n+lb|.X߾,gl\u00114\u0004ըpH.iDEl\u0019ꀔ?#~\\יhS@\u000b\u000f?e)\u0001\rQT+`ߜ9g\b\u00140Uko\u0011TexÜIY\u0006]pCiD\u0011jq%<fiDvsCtUڷψ\\\u0001~z\\e\u0010\u0010A{\u00136u+\u001axؙD|VxA^c@\u0013~zh\u000fF\u0014\u0010a\u001aRΫ+\u000fGĢnNϺ\u001e\u0006OQאmkj\u001e>%@{y{\u0003_2</\\cρZ\u0012{:t\u0001\b`:`_\"aTTi=ҎsϠT(J2*~K1ܟ\u0010Mt\u001eA)\u001b\u0001y\\\u0005Q^@Y&6ȏ\u0005P.ʍT\u0014s!\u0014хE\u000ek\u0003D\u001e`Zl%}ӗ|N(\u001f\u0003KD\u0000^,\u0000\f)<\u0003Z\u0005bpyG#H4rh\u0013Zzm\u001d\n0\u0000m%se!\f\u001828Ы\u0016\\nKs]~r3 b\u001aԝW5ۍPxw`HX{\\\u0019&D\u000f\u0005=\u001aM<\u0000Fny\u0019<B/*y8n\u0007î-%@kmx~kР}.\u001abE\u0014f\u001cv\u00191{VԶURi\u001eGH\u001a&Z2<O]V7@W8\"ws&aT\"6DA75\u0012\rX3hwGIK\u0019ont֍8\u000bΘdG(@\u0003ׁK`@}X\u0016!gf)y$MP\r!\n\\r\rxwUx$)\u0016\\3פ\u001c(&@\u0002\u000b\u0003u=>\u0001GO!8&b/͗:\u000e\n\n\u001cô\u0011<Q B\f[6_5M2R,}f4hgW\nF*aFYǘ_\ba&gK\u0013w[M&=聙\u0016\u0004\u001cQ>^)_\u0006g}\u001bns\u0001\bv%S\u0001\u001epj\r\u001b+lDrې\fM\n\u0011y,w\r\b5lK\u0007gGP)1\u0010^\f)t_s\u00114metݬ\u000715p#=\u0011\u001bK0T't\u001ceg\r]\u0002\u00063\u000f\u0013ɏ`Wʐ1f17^u;\"\u0015q6wϲl)\u00174ϸR>\u000f\u001b&c1Y\u0003#\bFJ[\u0001\u001dˣO׎bA\t\u0013: 1T\u000378|4\b(=]MG2r+J\u0016\u0019n\u0012\u0012ͩ@QG|\rm\u0015\u001c߅15<T\u001f5^<R,\u00035G9n|B1\u000b\fhCӑ\u001d(\u001fݟ7x\u000b{'i!\u0003#^;\u0002EaAT9\u0012>EH\u0004\u001b\u0011\"&\u0019H\u001f]ccO\u0015p\u0017 \u0016\u00077iBj\u0019G/4\u000by\u000e5%ZDf\u0012\u000bu\u0011yaO8Wl+,$\u0000H`\u0014]\u0014g\u001e(G3\fV]t\u001a,-z1I9W2h\u001fHi\\*g0^ψ\tZ\u000f]@\ny\u001ceI\u0016w\u0006Xϯi?yPYz\u000b\u001d=۠JM\u0007z)\u0018\u001a.+6\u0018T\u000bIz*\u001dE<j\u001c\u0010ro\u000e4򋲃\u0006}\u0017aUb>tKc\n\u0014w\u0000\u0017Ymw\u0007\u000e|\n K\u0001\f1Eب:&b]\u0016 \u0014ɚ}\u001c\u00161\b21-D^VI\u0012\u0014|.d%^-\u0005śҪ.QP2S]\u001f\u0007f1nm䠃k\f\\z\f\\Ƴň|A(<Ř\u0003CI-f\n\u001e+Ľ\t\u0012Ωb\tw>>:-\u000bx?v\u0015\u001d*\u0001w\u001c{ބS06eS\u00118W\"\\\f\u0014\u00100E(xr\u000eU;+sQ?>\"J\u0010&<ϰ|hi\u000b\fFJX\u0005#\\oA/r\"xr(?;h2ϧZ9\u0011\u001fK`iZ\u0006a!\u0016PT\u0005\u0002E`\f\u0003LB~rl\u0017^ڂʩ\t#Bxc\u0015a\u000be&\u000bI>R@\u0018l>\u0003\"\u0014R5\u0019ރgD0l<G=e5w@l&[s%b%Dٷ>\"h)\u001a8v,{\n\u0002d\n@$Ҡ^S\nO_\u0007rC\u0002\fnʼ/'~\u0004BŁz3Xp8\u0000q|si\u0010Oz^R\u0014,\u0011al0q週|b%\u000b\u001e[@z\u0003|7NI\u0003=\u0010ɔ\u0002w6G4w>\u001c\u0000zi\u00014wg~\u0006|ǔ\u001dY\rΧ\u0011'\u0000\u0004\\r4s[D+##\u00184+`-\u00107\u0011\u001b\r\u000b8+sw%Yѭj2ceX]a\u0017=êNkúZ\u0011cEh-NDթiEUاiG>\u0019zVO[D\n\u0012maܒeϿ3@)Hz\u001c-X/\\I\u000bB:M]6A2|5\u0002aVŝZ0q9Gp\u00159-.vp\u001a!ɏ[M\u0004\u001a\f\u001ck`\bhK+MtB\u0019\u000e\"#fB\u0003\u0019ֵGӌ\u001aZ\u0007\n;0a \u001d\u001c؅zC8툟;Z|\u0013v\u0015\u0002\u0003`\u000f,a\u0004&)X+\u0006>سng;j\r\bR~ \u0010\u001c:\u001e[NoA<'^nm=OǕ\u0015\u0015\\Y\u0000\u0012\u0005cI`t}\u00171\t#igk0V\u001aز\b{\u0011N\"E\u0016%{\u001eU\u0002Xl0VLޯ3\u0016l}erS\u001d\u0003跊&R׉yY\\\u0018v)5\u001a\u0012\u0014\u0001/=&'d.Y\u001bJ3Zb=#l\u0018aC\bv\tRPn#\bɴwg[.\t|\u000b\u0014|h\rn7\u0017t\u001c~i\u001bW\u000e\u00016\u000fx\u0005c\b1AkuOދZ\u0010\b\"YS\u000f\u0000O\u001e70%c\u0005\u0010edS\u0004@KNjP\f8g϶C\u0003w\u000b8\u0019s&.NJN5^9\u0015MrNE\u001c]es9U`s\u001d3/|\u0010\u001f\\\u000e<\\2W\u0004i\u0019}3--߭ԫz̓?\u000e\u0004'\u001e#uբ/h\u0006ǵ$t~sX`\n\u0014GH.I\r\\u@Vh\u0002\u001e\tMqǕ|8\u0014aH\nqs4x\u001fW,&BbZ٘4~'<\u0015{-WgJQ˗\u000f4*5A\u001a6_kw\u001a \u0012cO)iTP\\LHn_/uMeu2XMvZ~Y.t鋀\u0019\u001bjh\u0012\u0004XQ:\u000e\u001cQf\u000fXo/춳<H@8\u0016\u001f[sTH\u001a4k\u0003U@0,Gi쎼;Wq\u0001\u0005?Xl\u001b!K\u0016\u001ackDx3{nf/{\u0016쵾R\u0013޹\u0012\nS\n\\\u001e\u000e\u001c\"j*y\u0002'~\u000fGgjWcPQ%\u0010\u001en\u0017uG{ĭEX(Jbg(\u0010?{\u001f\u0011?\u0013\r\u0007<0SFD$@SR\u0004,o@\bǷ\u0016Vv+\u000eKL\u001f<Qjya@]<\u000e*HqF_8?%5\u0015^m]s\u0004jT2G\u001f4\u0003\u0003jԀ/|ܖsAq^\u0010\u0007H0]y\t\u001e\u001dטodT@\u001bo\"z>E1\u0016t\u0016\u000b2\u000fT;pJ\u0018dgV%M\u0015݅o\u000eh\u0011FDh\"\f\u0003:)\u000fϣ\u0016'\u000e`\r#riǲQ\u001fhX,\u0013\u0011D\u0006;́ 21[B\u0013ƈrfWp\u000bw/o\u0019п\u001a\u0002\u000b\u0012'G0\u000f\\1s\u001e29PHň3YQy-S-sFniqjẃ\u0019*\u0018\u0006#$\u001dmb+2\u001aE\u0014A:9\n\u001ek!\u0003޷j.Z\u001c\u001f(U@:]'6*k\nd\nϣDuh[cj\u0010:\u0017$\t\u0003\\3b=YK\u001227\u0007\nt\u0013CE.aT\rϠ0\u0017\u0001\u00187\u0017\u0016S\u0012W6\u0015ʯ#0`0Y.\u000fx\u001frO[Zf!/:U҂S\u0010oRl_/,\u0016sUn\u0018]k|\u000bMd\t6\u00184\u0015r\u001a3;7xK@c=\u0005/>\u0019Pn6.s;>Lc(f,9-c,\u0017$\u0000FAIWfpv\rƬ\u0013Sz_\u0019\r\"}\u001ca\u0002g\u0013\u0014h& }\u0005\u001c\u001a1b՚^\u0017\fbF\u0017\u0019,{\u000f\u00038c1l?`p~FȺ4\u001fOPy\u0010xkvW0X8\"\"#\u0011쪯\u0011>s\u0013d\u0011\u0000KUu^՟G\u0000^\\V\u001cU&ǡBIW|\u0019X_ A\u000f@u#i\u0001}Q\";(6\\ڢ\u000eDc̰n0DGŽPD\"(a\f{+Incfx\u0003vMh1\b-3\u0002!\u0013u\u000e\f8fN~\u0018&tœVɅL@\u0011r|)B$\n+CEե_0\u0001ܙ:\u001cP\u000bhݮ=l[Q4j\u00100K\f\te@\u0004)sXNI0\u001eԥ5Pѥh/\u00011S8\u000eK-z@qe!\u0012\u0002T<taվ@_\u001f/ia 5bh\u0007x\u0010BOU\n\u000fNRu{>I{+`jHE\u0010z׊M\\\u0019<0(\u000b7^pˆpêԢ6gă\n@Q>9\u0010}rdʱӦ\u000f[t&~\tJZ\u0007?ew>\u0002xDM\u0003\\A\u001e*09wbػ.{Mʠ;ӍS\fy1+>_21\r'6Lۋm(}yD\u001f\u000f͏Wo~w\u001fǯo\u0007\t1?m?LYǯ?y\u001f6$y歜f\u001aw\u0014\u0004A\u0000\u0005\tѪA4)&\u0016\u0001GW'XFp77{\u0007w_?OOw/_\u0016Qc\u0002N{]ǟ\u000b(?\u0012l\tO\fkfYЅ\u0005{8ӻ{ẺN\u0012:/H1LA%bʅ?tOޏ*jmB\r>\u0002&ڈ\t\u0019q칯\u001c`\u0018k\u000buġ~ՙ\u001eQ\u0007\u0016\fN\u0019(\n\\Ei9Ю8A9d1?NSv\\rZ\n\nsy\u0000#zP\u0017{\u0019\u000f\nt4\tTGdK}>\u0017'\u001a|\u0017\u00166$\n_wJΦTB\u0002s8\n)VK\f\u001cn!U\u0016Z̷\u0013b)glC]NQ-\u0001xOT`M\u0016\u0003z0>6Ѐ&aQ;c1\u0003Πp\u000bqɜӶ\u0005\u0007f'\u0003$ԬK^{T\u0003Hȓ嗼G|a;ԭj4;y\u0018o-(U5\u000fZ{r\u000e\u001cn\u0007:ڢ<65$]\u001bD\u0019\u0015\u0001\u000bp\u0014Vm۱S\"'L\u0011\\[R(GzPc\u0000ąU\u001d!d\u000ezp\u000fU\"aܝw\u001aAx>\u0014T`XC~ڊfu\u000fn\u00061Km= 򩋝P\u0014tB\u000f8վȚt|eX`z{`1S;fe̓Mad\u0000M毜v\u0003o#b[\u0003MiC_vm9Jf\u0002]ڳOYD±8]\u0019ꍛ8u?\u0014\u00138=c዗1n'(\u0000M\u000b\u0014Y\u0015\u0003\u0001R@\u000e`?-\u000b\ncK]H\u0000;[R$\u0015@ $\u0002S\u0010*4ҥCQ\u0013W>\u001c\u001d\u001f\u0003\u0003s^ke\nIxgY\u0005\r\u001b\u000b=\u00128ZY]>gM7C\u00036/!wQP\u0014,sb\u0018!UV\u000b\u0014ܳ\u0019\u0018\u0014xr{XG\u0002[@x\u001d\u0003C;w\u000e}\u001dbŧ0\u001b\"\u0002S5\u0011P\u00140\u000fѝ\u0004n\fu%<ZU\u0002\u000e[%D\u001cK&;\b\u001aD#R?\u0011]\u0011wҢ5?Sܱ̓x\b+BL\u001e/6_0`\u0012\u0010T\u001e\u0007g:5\u0018A\u001da{v仜\u000f+\u000e+~+d\u0001\u0005v}Y:Z~œ(\"yx\u001aTJ9aQņ?G4m#(jOQ(\u0006\u001c8t\u000b!\u0005F\u000e\n5O\nN:0F0OL\u001ak\u0004К$%\u0001ą\u0002uW;<K>5\u0002\u00132)S\f\"i@붲x\u0017~/a헰*qFx:tPR;\fq\u00126(K\u001b\rR\u0017R</\f)*[pn0\u0000h\\\t\u0004\u0003\u0006NKt\t\u0000ҪN\u001fRW\u001f~/y\t \u000bzj\u000f[#U\u0001/uRԺ\u001buY&\u0004\u0003cq!B\\\t-Ea[&;\rPܹ!\"V[pJ|;:puPzc\u000bTSPgDWqP\u001dA?ŧwN\u0012c\u000e\u000b\u0018W\u0016;7\u0018\u0007\b\u0015\"V:\nt\bN9\f\u0003pwo!\u0013ͱ\u0004>\bWRi̮.oȋ.v0{\u001eΧ\u001edO3|\u001cAB<|M,NR߆\u0007@\u0007p\u0012<|r\u0010\u0014\u001cZ}\u0007\u000bR\u001c 6\u000fķC~8[@mQ\u0001ȯ\u0003Xj?\u000fcWӏg\u0011\\-d\u0016\u000e\\quup\u0016mSrF%#7\rOk}Rx\u0015[\u0002t+pC\u0005mv\u0012xX\u001etUe69\u0014\u0003 <,`Y\f\u0007Iu>\byZ8U9 k\u0019\u0005\u001aH9z(nECZ8R]\u001eKj:M?\u001crQ6\u001aHL\u001f|;:&1ܯ\u0010\u0002%3%g7S.2\u001c\"_\u0015\u0006\u001cv[WoDe\u001a{L\u0017ܢ|T\u00021\u001e\u001f\u0016.7\r:K-Ƽ(\"׈᷒Q+.]\tPw5/02\\\u0017UcҍPKK\u0015\u0015'v2\u001d\u001d#֒fMҞ80LP\u000e&-jid_\u001d\u0016ҰnM{SU=fwUi.\nJԆi\"ڠְTX5U=\u000f3\u0002\u001b1Ӥ\u0002QE\u0004FMd&\fM\u000b&8N\u0013-^;\u0002.#P\u0005ø\u0019r7Is\u0005Mw[\t\u001d*6]\u0000n{\u000e\u00192Hbe+AEf7\u0013\u0007Xʍў4\u000fߓ~F\u001aBXӾy~:2J\u0007v}r.\r\u001a'P#'\ffL\u000eL\u001cTL5\u001aC/ʫi{p}C!ǴiNODgA\"\u0018x*}\u001aNa\u001aw\u0011r\\\n)\u0015^\u0017\"!9\bRF\":F\u0005f1h\b&K퇱F`*O\u0003\u000f\u000e&\u0005;Z\u0011\u0018\u001f\u00056$ȴm\u001eBk\u0013G͝\u0014Pt\u0019~_-\u000b8HT\b\u0010\u0014LM\u001bݝW\u0012W9k}\"\u001e\u001dSO!dPu\t'د\b\u0005S=n\u0000=&Iԭ\u0006Nk!}\u001e/.2ә\u001b\"\t0FYt\bˍc(Z?I2+0\u001710Z\u001a\u0018itS^+CU\u000f\u00111,\n<7hZx\nN9\u0001&ҤqMc +\u0011aY)/Y%\bڹjJ͝I2\u0012E\u001dSI\b`\u0007TYS\u0012{ \u0010\u001d\b_\u0013S=<j-:HhJOћz\u001b\u000bY7AY\u0016\u0010\t})<'zOw\u0012\tT\u0007ʶ5['7\u0016@cN/ph/N=L/\u0016fp^\u0019\r>d>\u0006+:\f.\u0004=\u0019s*\u001esPF?gi\u0000⬲^j\u0015ͮpetzx\u0002\u000br\u000bm\u001aƄDX\u001a\u0011\u001a^F$u3L\u0010U\u001aMKGADKGS\u0003\u000720ϕ\u001a\u001e'.\r\u0001P5tFohDĕ9\b:_*Ҵ\u001a>R\r\u0000>aX@[2#\u0017\u0016$\u001d_\u001b@Uk\u001bck_3@%!%G)I\u000f\u0006H<r\u0011yKSD\n\u0013P4~oߢ2)&{,\u000151Q\u001fi-vly\u001bI릣n){1bF\u001b\u0015F-\feVp{x]#FUa! e\u0019K=yUپ}+I9q\u001c\u00169}3\"u'9z=,\u001d\u000f\u001f4ձqF\u001e\"\u000bzxK\u0015Od\u0003*\n\u0000=<hF\u0003}\u0013$\u0006䝓3\u0005̒\u0002w\u0011RL;|Pcf\u000f8+<p$]\u001bs\u000eKeFD'/qdEc\u0005XBM06ƪo\u001fgq\u000bf\r\u0014nl <#Iv\u0019͑j\u0016\u0013\u0013\u0003_,/с\u0002#A[d1]FrP\u0001c4i\u0011\u0003>ݡ\u001f\u0017&\u0014Ԙ\u0002\u001e'_FDBQ#xt\u0007Z\u000evLGz\u0000e\u0014g\u001a\u0005j\r~*d\\긤\u0014Ih:.BYЉyϚ\u0011C\u0001VQ앝c'\u0015\\\u000f\bζ\u0010R>'\u0001s\u0004^5;\u001d4˺\u0018\u0006\u0010p#^_bݯ\u001ff\f\u000f9\u0015S2s$+7\u0014C\u0004 J\u001b{ö\\=,sb\u0017Q\u00194\u001cqHIm\u0004܀5\u0011Gssv\u001aƣ\u0007#\u0011}T5ۍmVmZJR)\u001b44#\u0012\rf-Z`5\nof٨^\u0002\u00032\u00076GiTA;8o\u0007D\u00153N÷\u0002\u001356s\bO\u0011\u001fWķ(%,a\u0012}i\b\u001d\u0016\u0000&6+bLM\u0019 \u001a9Z\u0013D}\u0012\\T%UEkF1\f\u0001FCДx\u001a\u000b,fYx\u001a\u0010u=\u0007pI\bf\u001b\u0018Xfe\u0003zm`z&q1X\u0013}ۓxt\u0004\u0010,\u001bn]2PS7?\u0001I}\u0018mͭx\u0010\u0007}X69|WCc\u0004i[~c{ \u0015\u001d3\u000f\u0010%BqGq\u0010{0zUB-O3^iQMԣ\u0012ۨ=Rqh8J\u0016mvrRh{h~y/P\u001e\\2\u0011t@߇T:q`X]OOJ#9\u0007QiJ?s_\u0003|f\u0010\u0003\u0019r\u0014Ay:-+_(\u001d\u0007l#0Ijp<\u0006OE\u001bEYov^!u[hd\r9\u001ajN޼\u000eˌlI\nτ\f痔p\u0001R#[R\n;YN\tF$:c\u001f\u001ck7Hu\u0007$J\fr`\u0013pD@ٞzƓ1c\u0018l6\u0011\u0016TxSKTV\u0015|NyJpXK\u0015J\u0012\fGW\b\u0003_t\u0013wР\u0011]R\t\fJc?:\u0014\u0005bA܀\u0018V(!\u0011z\u0007\r\u001fB\u0002R\fR)\u0000as-gĈ\u000bd})7{\u001bH*\"\f=.\"%JlH.:(\u001b$E97\u0003Ơ*aY'j#\u0010C\u0018sŕPr%8W0EID˴VUA^\fV\u000fa\u0004.\u0000)n\n4\u0001\nJloޥhbgE\u0001\u000b5\u001d'DZY\u0018W;\u001e\u0011wL\r\u001e\u0014\u0000Av\"-q_;=b\u001c@e|0\bE/,Sk>%\n̆kPBՠ[abri\u0013D\u000e\u0014^8fYv=͕te\u0010\u00009C~\u000f-Hw\\\"}d-\u001fupv=\u0017\nsh=]\u0016\u0015d\u0015]\u0002N\u001c;\u0003N(\u000b\u0000U%s1D\u0010j\u001eB8CH\u00170f޸\u001f\"\u0010\u0006dH\t\u0016*Yb王2FOL\u0013ڒ\u0012\u001fV\u001caV\u0014(\n^=:Plh竼Y)L.Ӻ\u001eq~ۉ$I\u0005Tlt\u001cI7$'E8\u0014ڱV\u000b=RguH&M9\u0016'zu\u0012ݾ\u0007Fnq<`{XlG\u0018\u0011CV[\u001f*A\u0004H\n\u0004\u001c\u0004a=ڑg\rZAY{B\bF4oQ]\u0001(֣O&z\u0010@S7\f{\u001a\u00115řѸ\u0005\u0003faꛣf)k`ǚBZ\u0010-ғ^W\u0013\u000e\"i2\"T8+:?\\*\u0016\\\u001a$WP_S\u000byf\u0013uD\b\u0014M5\u0010;\u001db\n\u001fZ\u0003\"F~mX\u001a.\u0017kU\r5jb=\u000f\u001ax\u001c\u0017\u001f\"\n\u001a̸|0Ӫ\u001f-'b\u0019>BOB\u0012pqrsV\u0017\u001fPO`AQ-V\u0019vD9r{\u0002o9@\fA\u0005\u001a\u0002Fysk&dG\u0000\u0005[kh\u000f \u0007}\f\u001bl\u00043uy\u0001Z<ߙ(*DѬ\u000f't*~bd\u0004\u0005Ή\u0015P\u000b-[\u00189:xCfzܟM\u00183<+Edb}ny\u0000LM^x2gM;6\u0016\u0014\u0006uBqK#\\\u000eBYw@NcݛI\u0016\u0001\u0007\u000bОu{⥠Z\u0013Wp-BJ\u0007zs_\u0007b\\ʚG\u0017\u0015\u0017hqC!NrAq\t~<Kdv7L\u00026`\u001bd~\u0017f0f«Hm\u0005]$J%v\u001f}\u001cŞ)uL~!\b0y\t{\"B9f\n*\u0014v\u001dO_fA#\u0000O\u00116&*Q\u0006\u0002Boy\u0004塰\rYvPyN7Qx\t\u0010`\u0018Bq\u0007\u0005(\u0013%\nܞ[\u0006ݚ\u0019J*~IJF>-ۿp\".?\u001c@> #0R\u001b\u0007_\u0012ϱSGzJ\u0006ʷ\u0018ߴV\u0012\u00046ΎfM2\u001eOv\u0006bd[\u001dsp\u001cj0So\u0005\fW\u0007;T\u001d~\u001d\u0001`ѝ=T}k\u0000޿\tT]iߺt\u0012+P`_{\u001a\u001fNVUh$AA9\u0018\u000e{\u0015\u0014.-|\u001cEl\u0006LT\u0011\u0000)j\u0015a\u0014)n\u0014C:\u00045\u001eh\u0003пH!FR\u0013\u000e\u001ekK\b\u0007xxC\u0016J;\nk\u0002\u0001\u0011˃7u\u0011\"RAXV9\u000f.W{dT\u000bK^8$ݒJ\u001b#\n)``@:65T\u001f7{ĩض,\u0017v\"-AR\u000f0d[@(뇹\u0016B.*qMsw3\n\u001au!J6\u0007ﲆ!Ŭ|dբb\u001c\u000bD\tQ\u0004E7MED\u001enoͳ}dD\u00054\u0000\u001e&\u0001t;\u000fY\u0011&e@>bUafk劺=p8Ubg\u001c3z=*ް,urT3hyo|\u0004c \u001bK\u0007ὗhzE<2(!^㝕Z\u0011\u0016E-ʙnTaz\n\u0004_\tG{[N\u0010r<\u0016a\u0016\u00109L#F;p\u001d\u000bF7KA!lơ+6\u0004+\bmx93w*&dCK$}PI/@\t\u0006BYS91*!uC!3>\tHgݭ.Oz\u001aq\u0012'\u001e=q#\u000e1W\n\u0006<8\n\u0007e}]6Usӡu\u0017M[RuT5R\u000f\u0014E\\\u0019aL#\bj&br:1/օorE\u0001rEY7C^+D\u001eP\r\u0002؀#Z\u001c`\u0019\u00060\u0001\u0011mq0\u0012x\u0013whm\u0007'Ȧ\u0014\u0011SIk\u001c\b3Z[.\\\"Kq[\u0007Y:.A_Xּ<\u0014RTFv\u0005\n[Sr\fT\u0012>\tA\u0005+K~.i[IK1\u0018އ#gN 8\u0000\u0011ɢ*\u0007hW6IUFo*MB\b|^ԔP_+E\u0013bͭK|>\f2\\PWt\u001dH.0ů ku\fmí\u0012m~\u001c_ʸWc+\u0007`\u001d\u0011c1a\u00071:MG˪+h9L*ԟ_A\u0007'H5.\u001eTCV5w}%2oh#Թ\u00066,\u0018.u(c\u000b9}\u00141S\u0010\nl\u0016kUR4JW6\n!PMPf=cڞWM\\@\u0002Dzuo鈮Zmrd8:Tj鷨<\u0000#/XrCD'`\u0014}w.%\"V\f&3\u001dn4g\u0003h:2ͺ+Q4\u0010?\f*\u0004&jJn(X\u0014@w\rXG0\u000ezџWB!$\u0016\u000b$U\t:ȔrKLp\u001fMgzk\u0016$\u00130`>\u0016Xm(ݲ\u0010O4\u0002<\"B\u0006\u0015^uIe8˞\u0018)\u0011͍D}G،6$aa\fK\u0019`=|_>Fb\u0001\u0016\u0006n<5\u0015\rgN˓\u0007]k{:\u001a\u0016\u000b\u000bDH3&\u000b\r\u0002aIP\u0019p\",\u001cEAb'E\u00131Lf>ꠣ\t\u0000\r~#0R\u000f}͓\u0010d2(ʓIVl~=;4\fgwO;`\u0018\u0001d\u0003T\n|\u0013Å\u0012v{_\u000eƙ(u7dW&\u000b7I\u001ft\t?F\u000brT\\\";=J\t\u000e0\u0011W\u0012\u000fXDhsDs\u0013K`!N\u00052\u0007.u>\u001f\u0003De&u0N(R\u001d=v\u0014Bj`xݒk&<NrZPp\u0002M\u000f\u0005\u0010r\u0000\u0017%0u7YPM}fHӎ59Zɟ5+\u001clHC\u0000ND,\u0003\u001f!\f-\u0007+\u0012~Eq~&T3\u0005/|6/}!\u0007!,\u0014rp\u0016X17\u0010T\"\u0012\u0010\u000e\t\u0000̎jf S\u0017g\u0017-o\u00190bl\u0010\u0011FĕQݮ=\f_Kb\u0001\u0017u\u0018IpŢ\u0004aoW[=Mkߗ\u0005PhՉj@x\u000e<Ti)L\u00138>\u0006|о[)=hVqAQ5=*T\u001cժ~\u001f\u001c\u0001FK\u0016dP!!̳\u0007cG\u0015:\u0010\u0002!ӏ\u0002\u0019Wqey'\\VY\u00010\niUrrU/UO\"Rk%\u001aicQUч\u0004W(5=HKe,~͓ \u0007WJ8.a\b\u0015\u0015sH\tyu\u000bX&^\u00179@>\u000e\\j\n\u000e\u000f5a\u0019@\u0012\u001cZ5l-sx-:eQ^N(K)\u0001֗\u0019\"\u0014\u0019\u001013ў\u0010{<f\u0013޻4b{蹴d6G\u0010\u001d=dv%-$\nh\u0001SB%\u0016zZ\u00192L,h(ȁ\n\f򤫔۱A\r\u001e\fD\u0011&r W\u0016i!#!|)\u0004庨jf\u0000V\u0010\u000epLd\u0006|GoF(܋\u0006\u0000\u0007n\f=\u001dyŞt\u0019\u0001j=ҙ\u001b\u0019a]\u0003#\u0000\u0005\u0013Pγk[ e\u00047\"\u0011\u0001R뽽'la\u0006\r^\"( \u0010Η\u001d\u001dhŗe͸\u00028\u0016n^g(FǬ\"\u001c6,ʴϼ7J\u000fAХ><J%ɖ\bIJ\u0012aWAl\"-\u0002\u0001\b\u0004\u001de|(ΛSX\u0001\u0000&\u0006F\u0013Bru\u0016PI/:v_wtt\u001cs8\u0017Ro</E'Ea;\n\u0017K+P\b%09e- \u001b\tW=jFGůq:\u0000(59k{6o&Q@ZdC_9zA*JQF\u0001ڊM\b\u0016\u000b=p\u0016k\u0006\u001ekYdWli\u0012x\u0001ި%\u0015|n\"6ydR\u0016ߎI\u0019y\u0015ՠDP_\u0004\u0000D{\\aRe^ohxf@nG\tOpnbɺ(\"Hd[G'B_\\9RWj\u0015m6r*{\rqޅc\u0013\bz\u0004Q6OI\n G9rԂ\u0000q\u000f\u001e_w\u0002CP\u0012֜Jnu\u0005rz\u0017(L\u0004\u000e-с6ӵfY#\u0010:\u0004~L)\u0000wu8a@__\u0007v\u0007\u0010s\u0004\u001d\u001bkтd\u0015eo]\"ae\u0006m?5P%\u000fKD\tpr\n4\ty\u0003\u00148=\u0007\u00140F]8a[h|J7!xDF(\u0007d\"?oI\u0017PB+3}\u00155,\u0012\u0007!3j7\u0010\u0014/p\u0019\ni\u0014cQ\u0017c\u001bmg?\u0004n\u0007)\u001a8\u0010G2\u0004˟\f{#\u000fꍶ帘/9t6d*\nA8hmY,\u0003H\u0013^\u0000Dlj+S,\f\u0018(=\u0001i\r4E\u0002F-\\)v3{g +QQTu\u0016'\u0005#Djs\n06!@\u0015D\u0002~xѻwWC\u0007hϨyF4\u0019\u0017 )&Py6\u000b\u0006\u0005\u0000Ϫ.Q\u0016~(]jU\f8|xBGP\u0010$\u0012@Ek\u0014\u0011z4=[|aJR\u000b~z{{~AY\n?\u000f(\u001bL\u0000Ŏj.C3SSy\u0000\u001d\u0002ʟp\u0010뺁fؽk;ryρq\u001cL].V;ҙiimzr\u0012V!qwha\u0001]\u000b\u0014HMQ䰎+U.Z+ꥼ\u001c9\u001ckJR\u0000n$r\u000b@J3.$\u0007A%{ZF\npr\nl(-\t\u0004r\u0003\u001cZ%䢕@\u001bZ\f\u0006=D\t'Gye\u000f;_P\u0007_\u0013\u0011娻\u0000\u0003`!moZ~\u0018R{h\fm]xhWn\u001dX\u000e\u0001i!)\u0001\r$V}AUQ~H!U}V,WХ\u000bb\u0013\u0004lH*m=[AK+\u0005\u001a!aHa>\u0011تv\u0001B\u0002ӮU2nފ\u0011\u000b*G&I-D\b\r+{Q\u0017ڻ\nG7E1#C\u0015@LO{l\u000fF\u0012\u0003\u001a\u001br '+C(!/oR\r:s\u00147MҞ>TbuVs,^\f+v\u0005ɀ\\ʁі\t~\u0018~C?5(\u0016nƺ\u0014Q\"\u001bd{\u0017>]5ʿ \u0005GD\u001aife\u0016N\u001b3\u000bLsu\u0014>\u0011c\f4,%hg\nca\u00068\"\u0015\u0015\u0003\u000fD\"d0ӵ\u0003+KQ3B*ח\u0007N/1Z[$\u0012\u001a~Z\u0017C]\u0005q\u0010:Kx\u00186jñG\u001dq\u0011N#SKz\u0006`t\u0014OZZNR.#W\u0006'<ȑCc\\N0Ǟ<ջ\u0019t\u00057}fSm\u0010\"'zDk<bXS\u001dnL\u0007G?\u001a\u0004\u0006c\tWkkt\u0019U\rO~6\u001bPȌ@\u0016-f97u?3:\u0012N\u001e\u0010\u001aU\u0010[\u0007ӌ92/`0Z%\u0001A\u0010P\u001e_y,^3\u001a\u0016*'\u0011cIK2T\u00021\n\nbv3\u0012\u0005w\u0000-\u0000z,\u001eЄjޅЁf\u0015\u000bƲ\u0010\u00046c+x\u0001`]l\u0010پI6WDʐo\u0001\u0013H`/lKq\u000f\fRΗE(T\u000bCv\u0001S8S\u00169}\u0017]80\u00187xZNDh6\u000f\n:v8X\u0017nҦ\"s\tfF\u0004]AR-\u0011#nu\u0004m\nBw\u0012U\u0002|\u000efiPg#b~cNX\u0003)lƻ\u0012\":\u000f\u0017@[e\u0000\rd\u000bQK\u001dl|zA*\u0002\u0006.\u0018ߐ,ل4(wEC\u0012}t{YevB\u0011RrQ{2F\\a:RC\nT3cPϛ\rގ旣)\u0005\u0016WuܥnDXlޯ}\u000e\u0016\u0017$\u000bԤvEW\u001e U줖{-7\u001fM;~\u000b1;8sPbV3\u001c;$J\t``\u0011ZW)\\\u0004іʣ!:+\u0004iqAs9fhA\ts\u0001\u001c[nd7(\u0006dg'q\u0003\n\u0005S\t\u0007+k~3Ě\u001eZÛ3j7jJJ/Օ|d\f\u0012gqt4\b\u00104\u0006\u0004!a@˼d[\u001a=v7\u0005ţin5r̸-EF\u0007g*\r\u0011Y@<MF@n\u001c3?/$\u0013՞}Fu=蓠\\ [\u0002\u00053\u000b[\f\u001c){f\u0015Z&t$!~Jנ{\u0014D35*\u000b2@'\"\u0014D@$z\\9ۀ\u0015b !\u0011T\u0001柬i\u0013MD\\Z\\k\u0010c\u000eE\u0007L\u0018]5N,Y\u0014=H\u0006`Rz\b\n.&\u0018V8&T\u001aA\u0005\u001bv\u001e˱|\u001e%mʈć/\r\u001bԽ*\u001c6o\u000b+\u0002}5\u0010,y?1UOޛ%33x|Hx\bKwS*/%gLL\u001b\\ъ\u000etw@\u00126U`\u001dj=@yꡬQ0+һYYDk``\u0006ZE*\u0006F,߻\u0006\u0002\u0010\u001c0uYGU\u0005]\u0013W\u0012zDovrYgV\\\fhN/\u001a<NӸ)ưJ\u0005!,O\nĤޘVupd,\u0014Ku~X:\u0011\u0015/0t[\u001f2Xֵ~_\u0018N+ov\u001f\u001b\u0012C;\u000fcr\u001c$oVi \u0016tp*#\t\u000b?\u0011\r\u0011\b\u0014wd\u0003r=vζÐ\u0003 5U\u001aM\u0005hBb\f\u001dhp{a>l|\u0011Uw\f|\u0013T:3GѰ\u0013F.q..j'W\u0000`;'\\ }\u0011OB\"v\u001ce1cwC#\u0014i\u0004f\u000blYu׾\\\u00074$(ء \u0018\u0016'&M5ziJ!'.K`Lg\bJ/f\u0004}P\r=urD<s\u000eYJIJk¯((s\u0016l\u0002tS\n\u0012<\fe\u0011]!cxŵ<Ze\t\u0003CXqbg\u001bb\u0016\u001a\u0005\rX4ӈ\bH\u001aP\u001az\\\u0010\\*pں\b\u0018P+8\u001aHuYx~)툩7:J*FQ\u001f:잧\u00186}F\u000fE\u001fu\u0006¼cii\u0018\u0003}\u001aA3T{aGl\f}9\u0002Zg\"jjHX\u0001q7Ur0C(m#\r{We\u0004%tWXT5\u0004`\u0011N!#\u0005BֱBtya\u0002\u0016#n%\u0001vu.8\\6\u0017c\u000bCEb-bayj`T,`\u0004(8.z>2:AE%C,&{K'\u000b7\u0012gl\u0019G\u0015BՆH`|k\u000bn+\n2\u001e\u001dzz,bZǡj.JaƉhU\u001d5E\u0019?\u001f1y2Rֱr\u0013;[ۂmųl0\u0018z\u0011Xz-O%\u0007DD\u0013'\n\u001dAc\u001e\u001a].<k\u00165\u001aZHcu&M3r\nQWY\u0007|\u000b\u0002ᔮ\\\rB++/Yy\u0011%T\bmT<kFqR\u0002\n.3؞]\u000b(EK\nt<\u0014i\u0001_\u001evپ(`jQ$:\u0000\u0001.\b\u0015h҈\u000e>\u000eO\u001c<Y\u0006\u0003#4\u000fSĒ:3%h'yر\u0005s=nN;\u0016]!}@5D\rC]\u0007\"\u0017voذ0j\t.'F\u0017p_Ý\u0019Y\u0000t)Jǽ\u0019B{ugm\u001cNrk:#\u00142ÇDcTK\u0016\u001dZfM\u0010 /;7\u000bQڲ\u001e2Ǆ\u001f\r\u000b6^Y~\u0013g:\u0011\u000ex]A\u000eJa}>K9ʠ\u000bj\u000e=D͐R\"eVҨc.~v\u0000a\u0010dnJ^\u0007a҈\u0016}[\blG@'{{l3QqQqme\u0004ɥ\u000fH\rw\u0018Qu>hPM\u0005Q6\u0017ۂjK\u0006w2\u001ahxbiR3*Sə>&\",\u000e2qp/\"\u0013sZ\ne`\u0005=4QؒGp/\u0018*x\u001eZ\u0019=ތ\n>\u000eFKhj_\u0011\u001cMSQ7hP\u0010\u0013\u000b82ɵ\u001aYF]-\u00066M.|fU\u0005&\u0007webwi6\u0018\u0014\u0013Pu+:̫&'X5xIl+m\u000e}\be\u0005v\u0012RDnFJxÃ\u0005\"F]&\rc~Yڲ\u00105tW6\u0010A\"\u001a7 m<aC\u0010HqG\n~pTLH,6zM1ڔ\u001b\u0007\u000e\u001ahuFϨE2K)]\u001a\u001aG[i[#\u0001Co\u0006YvҨJ\u0005Z\u0007\"_8NsD\u0002Ԉ\u001e\nx-\u0002\u0011!\u0015L\u001cO\u0019-=|~SJ\u0015+\bH\u000bz$B62+:짽 ]\u0003\b\t <\u0018Zm\u0007-<I(Wr<V+\u0002@\u0010\tۤ}\u001b>8rţYZ;^pmQw[\u0011Re[lg?|6\u0015%Cq\u0001O]\u0015LϪ\u0002ݶV0}vآ(\u0016\u0013\u001aOI }\u0012I\u0000\u000f6*Bo\u0002<lI2$\u0015u#21a`߭_7Kzn1|MȐbm\\L)\u001e\u0018\u001dҋX.*VƬ1YD\t0˄к=\u0019A;d\u0002`IQ\t>ǂl\u001cP\u001d*pGp#b\u0016w!\"@\u00078:\u000e]\u0017^GJqJ\u0014Iw\u0013/>\u001bl\u001bM\u0012g\f^\u001fZl%\b}/N\u000b\u001f`x\u000b\u001a)\u0013,\"͢\u0014z\ts]/t_$F\u0005&$tǱ\u001b\u0017BQvVW^\u001c\u001d;\u0015\u0019scYDd\u0019\u000e\u0001Ig\u0010\bΞ$\u0014\u000eU\u0019=u]lc\u0012!\u00070\u0015B\n Sя+w\u000e_i@ XI\u0019\u0014\u001aZK-\u001c\u0011\u0013*X;e}L\u0017(z3\u0016\u0012\u0018ȪB:\u0004 i!}IJb}f`}\u001egB3{GsCXt:}G<?6\u0015`?D\u0018\u0011F[XZ7\t%\rZ\u0006$l'b*f1;z\u000e\u0000B'h\u001c\u0016\u0011TkѢ&,kPM3>\u001a\u0006j\u001fߑV_m`\u0006 ߪUX=%\u0010zE#\u0010m56t;bH'\u001dX\u0011w>ko97ҳ{\u0005W}=.\u0003\u0017*\u000b!taٗ+\u001ds%D\u001a\u0001(eN{j\u001az(v/H\u000f\u0004.\u0005s}\b+Gx!P?]̥otT y4S5{'\u001b_o\u0007m;\\I41?W\u0015<2V\u001dzR\u000f>czlT\u0016}\u0006^ցqN\u0013)\"e\u0010[GT\rH0\fF6B\u0017B.)h\u001f&3I\u0004s$5?khdc|P\u0017~^ϳ'E\u0002)hr\u0019\u0004Vkm\u0003\u0011!rI\r~\u001c%ǫ\u0010+]0x\u000bLࡓ</_\u00109)z\u0017\b\u0012$\rR\u001eqjIzx\"ֵiy%{׹r뒧\u001f\u0015*nc#}HX\u0003L\"\u0012%\u0014\\\bxr|T\u0014G*37WsM\u0019[~\u0012.f+E>D૎|<hSbc-\nk|\u0007\\\u0002;)Nt]>Tt6\u000e#edexc|.@\u000e\n\u0016#`XrvEDThs)tar\u001d೽`w:-(C:\u001dOe2:A6\u0006Ї\u0003yاW_\u0002h\u001c\u000eG\u001bUz\u000bk1\u0003\u000f*\f\u0012\nǢDܴ <\u00120T\\a>:\u0004\u0005y*Q\u0003pWֶNIW\f+GOSuDKw\u000e6\u0014D$MJ(7\u001fTcӽfQT\b]FaNK8\u001cO\u001f\u0002\u0011\u0011g\u001c1\u0011/=m\n-z\u001cԟhO\u000fM-\u0004c`D\u0004Dh_\u001f+\u0018\u001a:lݝ\u001epK*q5[o\u00138\u0001\tt\"ݞG\u0013i\u000e.\u001cb\"?&i$\u001b}qT\u0002T\u0003ڤ%Vu\u0011\u0004\u0002f\u0014(t\u000e\u000f \u000eB\u0007借\u0018):\u0013tp\"\u001a\u00010s$v\u000e\u0000\u0004\u000b1V%|eF\u0012\u001e\u00109;UbJfJé\u0006\\ZK{\u0018KߏK'\u0005<J(t̖p\u00103vgqY>z~G;a\u00187\u0011\u0002v\u000f\u001c=N\u0014H\u0013@͸Th},UCD9D\"(OA7gTMB\"\u0011m\u0014w_\u000b߶+NԊ'(FDg%.\u0005\b\u001f?t֢%4[r4}L*~7\u0003䗋b:\rd[lD\\\u0004\ngJ\"\u0003\u00048=6N~OP\u0017͆gQT>͆e!\"!\u0007*qQ\u0019uf\u0015\u0002\u0018A׸;3_-wD\nMgև0\u001bDtH!w`\u001de\u000bcʟn\raj\u001aϑz6{\u001euC\u0013\u001bL-Rh\u000e\u0003\"\u0017i2CϚ^S-W):\u001ea{X\u001c5Gt:lt\u0014\u0007EAdʀ\u001boV_M\u0011.<Ǆ\u001b\u001ea=1\u0001.\u00121\\\fq^Q\u0019N$k`\u0010K<\\\r\u0004{EC\u0011&\u001c<w)\u0010\u0005\u000bqz\u000bN%`t\u001b?@ݤb\u0007\u0001)d\u00140\tC\u0000%=LY<`',UA\u0010+(@_\u001f\u000e\u0006-7d;HٞR\u00158<PȚ-^;$}v~3-TӁ\u0003f\u000fR\u000fO9\u001e=q W6H(۟jY\u001f.d<\u0011<\u0018\u0011eUFʲ@.G\u00177d7\u0005\u0010=r\u0000K\u0005?Uvw_Ai!l(\u0005\u0010ݢvYW\u0017F~RF<\u0000F,F[{؆:Mss\rZ\u000e\f&[ \u000f\u000bQp\u0017\u000eJ`\u00127\r\nendstream\rendobj\r15 0 obj\r<</Length 65536>>stream\r\n+ǅe%6!*U\bE\n\bp\u0006;k\fR0\u0007vl\u0018Ѳbl\u001c$6\u0013%L\u0011BEPL\u001e\u00058(Nx\u0004[Ze\u001d~#io\u0011\u0018\u001a]#[O8dS\u001cR~(c}!F͡i]ÕC\u001fu\u000e̦:b99\"\u0007mw_Uw\\\u000fɬc\f\u0012X\u000b\r*\u0018\u001eeE7B.Xp\u0001\u0017Kmm\t\u000b\u0010R\u0005B$ӈV!\n\u0019w[]\b_u\"\u00047e[`\u0001,umu\u0005M~c.SK\u0000`l)yTi\u001fKi\n\"|\u000e\u0017HՓ\u0012\u0016z/:3\u0007iڊ69\u000f%woA;Qt^1;g#I\u0013\u001fA.F<1\u0014\u0006-U`\u001eX\u0013\u0001̻hQ\u0001好\u001cbU(MkVIO1gDO\b%\u0007\u0001x!V/x\u0015,\u0001/{.\u0005T.į\u0012T#\u0014\u001fJR }?M=Wߏ\u0014J|Spf{\\Xāq\f~\u001bsFvU\rP\\8\u001clی=\u0001_8Du\u0007B\n\u001e\u001cm+\n\u0004\u0010O<[ߜO\"ۇ\bkkc0\u0005g\bQE#'$+<,4X\u001f\u00195\u0010A .0-RuDޘ\nμZ(]* v=SY/\u00020\u0002x\u001e\fZ9\u001d/-tk\u0011&\tfNAF\u0000{\u0005\u00199ϵ|_\t\u001a/\u0010\u0004k\u0004+Z8\u0004Ŧ\"\\|7~q ~-M`\u0002-hxАB\u000e㴻~8P\u0002H*<ݽRCA6U%YbXg5!_x#0\u000eķР~N1\u0012\u0019\u0015P\\MAX\n&psudcCΏB06o\u0007A\\՛H\u000f*\"qa٧}?nΝ\u0000gWi\n\u000ej6\u00109s'ֆ-\u0004ua\n\u001c\f!̆0(Ux,2?\u001d\rɷ,-łQ\u0003\u0000(Mz8L#h-\u0010=%o!`\u0000\u0010!Z\u0006W9>&#k\bZV>\t*ے΁`\u0019L\u0000פVC,WD6Yw\u0002`v^ J@9\u0007Vy6ގ7S\nxo`\u0016ׁ\u001cx=)>G\u001b\u0002@HO.\u001dj\u0005Jh*\u001cް ۡ0xwոg&jcJWp\u0000w\u0001\u000e@Z\u0000M1u)EobGI-F![\u001a\u0007L<\u00103d\u0016uCcm(ZW7q\u0000S+0|TUt\u0001\u0000\u001ePv\u000e1l9\f\\\u000f\u001986ap*t>-<\u00048\u0004~\u0000I&n6܄d9P\u0007X䙟ϜPyL\rnOa\u0003sؚ\u0013=P\u000e\u001f\u0018z8ja\u0013\b7\u001ek%Y;vvt#>oa\u001e\u0010\u0013T\u0007/[Q~Q$oߤM\u000e (y8-.k\r\u001fm\u000e>GEBH;\u0012p\u001a\u0018K\u0000ˀi\u0014\u0004\u0017HgMy}\u0001\u0016.\u0005VqD(&h\u001d{W\u001dzׇ\u0012xm\u0013\"\u0019*\nZ=\u0002lO=F\u001a\u00130\u000b\u000b9($9\"D\u0013ae$r!\u0011x;K\u001dotL\u0018䔦x7\\\u0006h\u0000\u0018z;03\u001bNِ$\u00144\u0011o\u0003D7\u001egY߻/*&(Q\"懀\u001c杷'͠\u0015!\u0006ץ\u001eF}\u000f\u001cURy,\u001e7\u0005iuP\u000fp\u001d\u0018\u0019BW\u001b\u000f\u0011\u0004\bt\u0019eg<\u0011>Q+z\u001d\u000b%*+,\u00152vƧl*U\u00187\"T\tb\tU\u0015Xm U)wa;\u0011X8E;|\u0007+\u0004\u0010!\u0011]Q!Y諞a^T6hI\b\u0003Y\u0000-4W-$\u0002,@\u001f=b?TZfhPͧjm<a\u0002'NypD\u00014%\u0007cR\u0002v}LD\u0014w:̊\u0002}V}\u0012ݚq|ª\\\u0002Az0#\u000b\u001fЫ\u000fB\u0003\r4\u000f@{{-'}\t\u000204'YƢO7\u0018/ \u0003\u0004E\u0004_rz>)@@&_C#bPY@oQS,qke;0\b\t.(x9\u0007\u0003shǞqB8As\u0005\u0012}:\u0017\u00032\u0013 \u0016(x^\u0003DLy{Eb\u001azbwz,>WzA\"I9({\u0005XSk\rt@\fĝ$X\u001f.嶚V̿\u000b`+(iPK|\u00195sv\u0004m%#|\u001c\u0011\u0001:T0'~\"\u0019\u0004Wv\u000b\u0014RlngKY\u0016\u0001Bw@kTm1n3傰8N\u0015#v\"ȃVlҞߺ0\u0004b\tB\u001ft=\u00114\\\u0010*.~H=vY\u0016k@jWe=LakJ`~IK>\u001d=\u0018T>0på\u000f+Fx:ƋÉ\u0018\b-\u0018/\u0012\u000b[NK\u0019\u0010U5~B0\u001a]j&\u0017\u0002sC(r\u000f\u001bs[0lhJ\\A64!KҪe7~5\"\u0004?;\u0007\u001fMq\u0007<Q\u001a|3/\u001aPx\u001b@\b\u0011\u0000(\t_+ĸj`\u001eVc\u0001\u001au\u0012Nh!Y>.\u001f\u0011nF\u0006\u0006:Sj/Gضo3%}jS܌X%w\u0016[\u0018h{g\u0015\u0015s-nu\u001c]8-a8\u0010DMI^܏\fe\u0005\tf\u0016O;\u0010\u001e-P\u0000\u001e\u0004ށ*\u0007>\u000eb\u0005[:褚dӽI%{=qB\u001bFy0\u0001ڠ%]BI&-ͩ#p<;3v2©>T+=\u0006߬\u001c\"\u001a\"\";\u000e\u0011\b,\u0013X8\u0000ܘ_ZGU\u0010|4D\u0005\\`Gp՚\u0001\u0011uY4 \u0010'\f2ˊ\u001b97zMÅa=\u0013\u0007%B\u0015+|\fZ\\@\u0004H6Hx\u000e=S㏲BhwçԘ1U\u001dLìицM=\u0002\u0004i\u000f'B95\u00162|8@Ale8\u0016+KS4I:o\u001c>h]f\f!3P\u0007&\f\u001d\u0013\u0004y\n\u0019>{<kV\u0018վe/@qT&\u0017(裗y\u0001K\u001a\u001d0*\u000f\u0007l\u0007\u0000\u0007tT<\u0018c)HDEM#Ma\u0016\u0018\bj\u0013\u0005S\u000b4a%0BF\bPů{ޭA?\u0006\\*K)k\u0005P d\u0010~q1GOZJ\"6&\b0EA\u0010Ìcv\u00121X{\u0019YG\u0004\"zGك\u0007\u001eZ^J\u0018\u0014\u0011)h{IBPQ?􁀇\t!VC\r6ޢ\u0019IG \u0007s&~,\r?\u001e'FP?bo)\u001eIL#<?Х\"\u0013\u0004\bx\u0006\"jxSp|h2<\u000f\u0006r\tMJ/Ezoa)DVf2LG\u00025>F6*X\u001b_ꊧU'\u001b\u001fv@°=\tk-z7\r\u0018@Q\u000bj`\u001a\u0018aM\u000bJG0rh}`Y\u0013<{qu'uO\u0012=YR{\f=}d [(tK#k0\u00036\u0003j\u0017;!w)NP3@#X>ƃС1\u0016I\u001d\u0011\u0017=T)VUt\u001e&Zq\u0010\u0000\u0012\u0001\u0019ls\b{)R/Adb7g\u001eO \"\bo;umX4U\u001c\u0014F<\u0003\u001b\r^w\u00013rQ2?֖8\u0010\bhJLL\u0018d\b<?*\u0004V/,b4!\u0013\u00015~AA\ncWiux\u001c<HX}[Woa\bW\u00118\u0002nm%p;ME.u~\u000f\u0011!=ot\u0000-w\\Z\u0018\"4Oa+\u0001rSP\u000f[2\u0011\u0015qC)\r}q\"\u0014Kh\u0004\u0018# fa:\u0002SRȪ/[{|y\r·\u0014\u0002Yi\u0017Pg\u0001Tl^0tQc\u001cO\u0018#p\n\u0005}O\u0000*J\u0016+\t\u000eT~>\u001eH\t\u0001\u0004\"3r\u001bL_\u0011\u0001\u0007\u001b\u001eBMp\u0019׿?W/O\u001f?\u001f??ß\u001fß[u#\u0016.~B\u0017I7\u0005u\u000eֈ-\u000e-tgݟ4t*\u0005\u0002!V1'~ŋˇP4\u0004\fs\u0005\u0006wc\u001fO\u0000,__]\u0003Х<3x;Ak񢾅\u0011AMN?VDC3|\b\u001c~\u001bDGlv\\\u001an\u0010콘5\u0011l\\N{\u001aB 8Vu\u0012]Ԇ\u000eyu;>W\u0000i/{RȌ(_\u0006oF\r\u0012(\\\u001e\u0011i5\u0011qk\u000ey\u001b=1I0u?\u0003/\u00111p \"bK\u0001,\u0007\u0011\u001c\"(؝+^-LWtW\u0017f(\u0005qEz\u0015BBl06\u0001\u0018X^A\u0000$bY.\u001a\u0001jb,ƥ\u0004\u0001X_ͮ$w\u001fd\u0018sbAahb$M\npϰ'Px\u0000.(b&b*g-f2-&S\t\\і(\"l\bٞ\t}%;128*&{yړE7j>\f!\b`/Px]\u0000\u001a#a6\u0013\u0006ds\u0011\u001d^69toi\u0007o[ҙt+=\u0013d\u001fe\u000f{]i27:4\u001b\u001fG\t\u0019]v\u0016_%[Ȓ{7H\u0013,[χ-~\u0003\u0016wY\u0014\u0015.61#\u0010b7?z\u0016QWؾ4^fU\u001bI\u0003Bp\u0017ˉ \u0001'v|caH\u0005,Oev`Lkcf|`;b\u0001^jT\u0002\u000ew!\u0001`D/\u000f1U\u0002\n_\\Dv\"\tkR\u001f+IESO\u0014y`\u0010yF^W\u001c\u0001;}!\u0014ۀ\u0013\u0007y,D,\\\t+\u0019=ٰ4l,J\u0013y\u0000J\u000e\u0013~z\u0010\u001ejr\".wl\\Ç0悽ϧP5\u0004h\u0000Ȑiz\u0005ZU4X\u0013\u0003ꀹrը`KGn\u001a}8\u001dclд\u0013y\u000e|\u001c\t\u0005U\u0000\n\u0005\bz$b;\"[p{Pg@FδX;[\u000fj)͎Hi\u0016\u0000m%\fݣ\u0014\b@\u001cjF\u0004ҦD`\u001e`\u0004\u0007\u00163@mwa\u000ft\u0006re\u0000\u0010t'\n\u0010s޶\u001b\u0004\u0011W>\u001c-\u0004\u0015\u0001\u00172\b@M~+x$PzumO7JWt\n\u00003\u0012 f S($`Eĥ@u* >\u0001Pwߛ\u00061}I䕘aM_)Py4\fc^IB5\u000fBД<qI\u0004V!RR#r_O~}C_7SCn\u0007\u0015\u00108\u001c4Ts&\r\"\u001dE!SJ2%!4\u001b\u0005L\u001fPn+^Zz\u0004NI;}sJ{h\u001en\u001cl,\u0013f T`Rόfsk=T\u001bL\u0004~gg-q\u0001&6\"rn(\u001aƉ\u0002і>\u000bB.\be\u001aQV2bd\u0003\"j21W\u001a7E/V\f\rrx\u0014FQ@\r<m>1%\u0011P^\u0000@@Ⲿ%fwb\u0002{[\rY$m\u001a8$Mty\"\u001eo1J%L\t\u0002\u000bBl\u0006^|\u000f)4vbהN{bj̶o\fIJ(\u0010\u000ffo1\u001c2%\"\u001e\u0018?\\A}WHQ\u000bc\u000bAc+(h\tHN̸\u0005~\f`\\:W\u00031laʣ9\u0012y\u000bB\td/\u0015o\\pY\u001di\"ļ[oϿ\u001dͿ\fεrw e[n\u001d}\u0005ZbCġD\u001c\u000f<=9]:iv\u0015\u0013\u0001Ln+A}9j\u0003\u0014S5ܐY\u001a\u0011 7\u001a\u0001\u0012Q嗣\nz)$<^􊰦Bf~!\u000fh\u0003Y)\u0011_\u0018\u0000(v@9^=\"\u0000\u000f&\u0013~;ђ\u0001yfH\u0000=My\u0013GpI\u0004%\u0019-nA;ܩ/\u0017ZW\u001cqyV\u0015|e8d>Qd\u001d|\\E\u0019kׂ\u001c4AD}\u0005P%Bmg\u0019\u001c4t!\u0017\u0019վ0G#lOXғ<=v\u0012(Xq\u00057v#-\u001a&\u0019\n7G\u000079YX_H!6p\u001c2HaWݿG{\nX<c0`{x_'C\u000e,#e*\r\\7\u0010\t_|$G4t\f\u0004AވP%ݿ\u0007a\u001d,\u0019XJ6\u0019\u0016y&{assb%Lu\u0003K7W(3Ko\u0004ZY\u0017\n\u000b\u001cVhD ͳ\u0006g\u00105M[pV}SEAa>\f{\"E\u0017\u0011\u0011Ւʢ\u0016*bZAeΪ\t@\u0011&$\t\nv*dl\u00015$\u0017Ƨ-֓W]CZ\u0014\u000b\fِ#ߧO\u0002\r4$P\u001d8U 0\rJ\u001fQi\u001fN\u00042UA\u0007ZM\u000fuڀ#Q'z\u00150肧\u0013\u001fW޺%\u000bJ9a*V(*N\tͳ)lD\n`C\u001f\u0002X5(fc\n6\\\u0001Ra\u0013\rل\rգ阄X\b+n\u0012gej\rF f\u0007n)\u0007M\u0018%\u0017a^{X+SYlj\u001de\u0014n\r{LT0/\u001a6!fN(LݿϘw\u0011pC'1aݲɠw40Җ\b=Āߦw`Icu\u0001\u0014s@%>\u000f3F.3b6\u000bju[`g9fV2\"nh>\u00053e]]MTŗd-\u001eo*\u001aHLHg\u0015Y˯'HwT~3)iO\u0000VW[ig\u0018$d\"\u0004o\nO*#\n7*\u0010\r\u0013\t-\u000b;\"ɚj;Of\t\u0016\u001c(\u0004\u00194a`7\u0001aب\u00126\u00130\u001c#H\u0005\u0014n\u0001bp߫F-Mjy\u0012Y{s\b\u0004N㔄\u001cq\u0001YM;eSDDM\n\u0004z+Ou0wݥ\r0\u001aDD\tz.\u001elh/GI\u001a~j\u000en\u0019;\u000eX\u000bBK\u0000Vns\u001e9y\u001a\u0003\u0018\b7^\\FXIG\u0007HƂ`z\u0015*%FH\u000fM>##L\u001dT\u001b\u001fnz\u0006\\zO\f2@D^\u0010\u0006\u0003Z@J)9S\t|l\u001bgH5\u0010\\*sY\u001ee\\@~}\u0019\u0019\u0015/gl\u0018\nf@**\u0000#\u001a\u001b\u001b~\u0014Kn\u0017\\\n`?\u0014\n3Ƀj*PIgQ՗d6\u0001\"R\u0015tX/8N\u001a!\t\u0003+oч Ց\n\u001b\u0016\u0017!p\b+\u0010b-D,8C`RRY:ʟhI&m.iّ\u0016R(V`Vc\u0016\u0011_RΒ}8\u000fP\u0018\u0002K߽bTQ1p!\u0002#KYg\"hoâzh\n\u001f\r\u001c\u00000b4,Z'\u0007@&\u0006\u001f\u0002J)\u0014\u000b'ɷ@DkKkH6'\\:V\u0010\"\u0000/O2T\u0016F\u0005\bj_6&:4O$q\\ܾE<C}%CaD\u0000-\u0007u\\b\u001d\u0005B`s?Ѳ\u0011x\u0016;p^}IB6L\u0014}'ŉ|)<n-;b\b8\r\u0000'I^+<2#`$QS(.QF@5\u0001]\u0012W2E/\u0015Y\u0019\u001aR(\u0012\tK1\u001bf\u0017j즒B\u0018K6\u0011N=:)Ϸs)4GϓY \\t6N\u0000⇀L|\u0016K{@l\u001dN\u001dr%@ISS{D\\cMP?\u0007!,#n\u001cP`\\O˹ҷ\u0016ue\u001d{\u0017өԨ\u0016\u001e\u001ee*'(=bt#uN[\u0002\u0013?ÿ\u00111r0(p\u001dHI`Ĕ\u0004\u0006`EhȔtW\u0011uuG\u0016S:۾RC\u0005k0v~5\u001eZb<\u0007ޖ3݈\u0001\u0002\\NG[\u001cO?0ˎ\u0018Iw3`?`\u0003\n쀰\u0014X_%-|\u0001fuavO\u001c\u0011ie<#J\u0015XF{3b绠 \tJt\u0005W\u001f&'Zh\u0002I@S;/dc9[S*\u0011~^B-,r\u000e\u0019~>:o־4G\u001c\u000fC:\b+e\u0018\"b\u0016B_t\u0019\u0005\u0002`8\u0016\u000e\u0018?g\u0015\bV\u0014#d\u0019\u001ep\u0013\u001f`^=O\u00114yŁFҺ\u0015pıZ\u0014j\u0016)um\u0007<1y&Vd\u0013C\rK17c@\fLb~\u000f9,1GAbp9\u0000\u001dHhYY\u0018\u0012\fo|\b@WC\u0011\u001e\u0006\u000f\u0002\u0019\to\u00101\u001f\u0000WQ\\?ш_\u0005\u001cx1\u000b2ϔ4\u0006*\nhE\u0011\"B53Nuބ\u0006\u001bvI'\u0003XtY0R\u0018I ,\u000fGw?[3nV'[\u0001|zh|O~our25E-\u0016FuU%\tQ]ILd_;+x|؞)\"wVϋΠX\nn\u0003&@LQ`h\u0000E\u001dOJp;'}-WӴ֎>*N\u0005D\u0016\u0019\u0005bav\u0001d9QJ1LR}>ڡP4`>l/\u0000VTXX3W[z\u00145#Z\u001d\u0011\u0016cqG\u0002ln\u0013#P~%\n/ʴ;=$U\u0018fg\"X\u001d\"\"w\u0002\u0011\u0001\"B\u00160\u0005!_3DֿJݜ\b\u000fexj\tx\u0000\u001a\u0012\u0007\u0010gL7|#vٝad0k({Z0js<\"AK7!UCAW,r]6%\bm\u001eGQG\u001d:h]+A\u0001&c\u0005-\b\u000bhp\fL\u0010Ge\t<Z\u0001\u0011Dʓ\u001d\u0011>t}\bH\u000eD4Iy\\X@oGK\u0001c@y\u000bwe\u0014\u000e\t\u0017\u0014\nc\u0016\u0005T\u001fuI@VaE\u001463ȒzT+%5^dt~\u000f\u000b\u0014<)X\b\u0015qT԰\u0014@!x\u0006PG-\u000f&{6͕\u0003_q\u0014،\u000b\u001a\u0011dN#6\u0014\u0015Ih6G\u0015sMx!K\nM\\j,f\u0013\u0013V\nB-\u0006}b\u0000Z\u001emZ1\u001ba66wXs\u0000eˀ*,\u0015\"\u0010;!\u0002E\u0011\u0006\u001ea\u0004>.h\u001a?.%7A`^\u0019\u0002-;~=\u0010n}#+\u0006C\u0007<0E-0d҆@KS\u001d\nPP+G͐\u001fH\u0004*ez?\u001fOr\u0001NKB\r\rh-\u001ee5uTTQ.%z>\u0011˪RO\u0001)\u0011*2x\u000bLq\u0016#5bkòrFP).5'*SlsQ3\u0007dx \u0007\u000bt+@fb飯b\r\tVwggms\u0000U޷\fs\u00149\u0017\u0002\u0003(,QidH/ʸ\u0012E\u0002\u000bCC1/^P\u0013y\\ϟ!\u0004nL}p\u0002ǁVv\u0010<\u0010e.LgsS󫑢\u0015jm\u001cӉBs\u0015\u0005\u000b~^q\u0010\u001a\u001b^\u001f\u0006/ªFə\u0018#rLVR4\f\u0016\n\fr&k[\u0019?<D\bCӂ(ELG,>\t=\u0002\u0014\u0002\u0018b\n\u0001//Dk\u0013\u0007=\u0006Y~XtxCW <W(9\u0002x;\u0000rfJT\b\u0011s} AN\u0013XfF{\u001dv}\u000f83ķ<\u0002\n-cg7#\u001c\t팄\u0007\u0016n|v -s˧\u0013MM\u0011\u0004{܉%\u001eC\u001fo\bM\nۉ@pGӄ\bCK\u00151VWТ\u000bT\u000e<\u0017MxZ4\u000fW\u0016SU@U}\u000f\u0011\u0004NU\u0007\u0016O?2Ča)ҍ%\u001f\n\t\"?-.AY\tXÒ{tE74\u001ak \u0002\u000f\u0005i$`\u001f.\u0015g\u0007J\u0018a\u0017yBDA\r܁.b\b܌+\u0017\u0011T8\u0006\b!\u0001\\x\u00101\u0018ѵ7f\u000fgc32|\n\u0011YW\u0017aQx$\u00193=V\u0015ez\t}Q9\u0016;*\r-e`o'B\u0012j5˱K-\u001b\u0016I\u001f\u0004{)\u0019[\u0001fJn#9p ٓ=as\u0011\u0005Z\u0010ToD(|HRƝJJWqe[w%[<\u0001\u001ad~\u0016mF\u0019\bϕ;@\u0002\u0012+\u000e}d҃\"$U'kw\u0004וb\u0016?<Ô\u001d\tK2S\u000f\u0011xEX>N\u0005 r@\u0001]=W\u0000oo^~\u0017C\u0000=\u000fl1YOw5u2&c^\u0011\fx.p[\u0018Ro41XZ\u0002x\u001a&#,.\u0012@6C-\f\u0016gaO\u0003b/\u0002K\u000ev\u0003\u0002[\u0005\u000bph;y\u001d\u000e/Գ\u0000\nG\u0005\fuH>I\u001a\n\u0006>`\u0011p'\u000b2`8dAyEL\n,1HQ\\CS\t\u0005wLݍ2\u0001\t*=\u0000\u0019m=X{XUY@^aG\u001ef=\u0014Rpi\u001f[إ3b̀M\\\u0017\u001243ՈӢp1\"1B\u0003QA\u0016Xh`\u0007!~>F\u0004B\u0016N\"۩'0\"zK'[,0\u0007\b\u0016j\u000eb\u000e\u001buD\u000bҢA7p_sKL\u0007Ζ38ō\u0004kh-&\u001b\u0007\u001eJB%J\u00175h\\\u001f#O\t·SÒ,\u0001pf'î\u001dXڞG\"f<\u000f'\u001ai)O){\u001cDPk)wBA0dg`\u000f Pt93Xd)\u0000\u001aIC;wkF+oĀ#\r޽Zg\u0016E\u001e)\fuOHQɩ-RwIhEe*\u0019\u0017\u001d\u001cx?E<9W\b8:I3׆1\u0015*\u0003M\u0015$P\\XY\u0017W$\u000fb3G%v\u0016\u0002uC\u0001c҇Q\u001ds0:v\u000b%\bzԡ!kh!'$]\u0014!9b.nK|v9\u0004\u0015N\",du(Eꢢ0\u00043\u0003y\u001c!@˼T\u0004_b=\u0014\u0005\u0003S%&.&#i\u001ah*ʺFI/|:1-\u001f|qY%\u00012C(\u001e\u0001\u001e\u001d鐽0,TZߥ;aםXqor4;-\u0002p\tah4\u001fG\n^^\u0010\u0005\\~^&U\u000eo\u001e\u0003cmf\u000f]Єo\u001b0ߋll=\u001a\u0011o0B\u0005\u0014$M\u0003zBm\u0004ހ-垇[\u000e\u0013\u0015.p\u001at\b/\rY~OU\u000f~6\"\u001a\u0011r@$m\u0004\u0015ީ\r=_@|HD\u0019\u0015\"a\"B\u001c$ʪ>\u0010gdgF\t\u0003lxC\"cL#ȉ\u0001]w~'`\t9h\u0013/|ts\t7\nga3:\f\u0011y.u\u0012eºHs@DX\u0011Q \r<is\u00004_\u0005,\u000bp\u0005\r\u0002N\u0006c\n&\u0001Jt3p\u001b!֟\u0003\u0013\"~r vAeկc7\")}\u0000iL\u0019RC~BfSY{;׆ߩ\faE-$I\u001ej\u0003\u0003Z?\u0012\f@hi\u0007\u0012AMXHAʼzRR\u0006ggoW\u0019tI$\u0007S~^m'8\u0000hua 䝆q\u001eRu($.Tڮ\u00131|Bk\bq\n̶WxAQɱ܃'kxi\b\u0002aiwktD]DW\u00151\u0005o&z\u000e\u0002$\u000f\u0019Mp7i+>\u0016\u00111#J\n(\u000eUG>_)\u000f\u001b\u0015=i\u0004\u0002QjޮEK\u0012q5]SѲv\u000ek\u0004X\u0006@\tY\u000e%\r\f h-\u0007,w \u0014xH\u000b_ݻDQǚ;x\u0004&P'^F\u000fc\n&aصzu\b:n\u001c*!T8\u001d\u0001y\u0016=_\u0010\u0019A4`~\u0003fBc0EL\u0000\u0015H\n\u0001ros\u0012\u001c\u0018\f\u0016J\u0001S\u001a{uۊ\u0004Gˁu\u001fHR\u0004b\u0007O\u0011\f*pi\f)Rr\b!A8ʌ\u001d\n<ca\u0005UƮw\f\u001dXi[b^Zr|dhӽ\u0000݁n<P\u001e|{\u0006)9.:\u0014:,co{mûm\u000f1\\:\u0006;MS\u0007u\u0000Է<bZu3@\u0006V[\b=fڂ2\u0010or+9e۩v\u001dxzV/Wn\u001e(.\u001ai][`0Qj\u0004\u000et1)k(\u0005s^ś\u0011#:\u0006h'g+2\u0001(ƉUDg\u00138\u0004J帐tb>(Tʡ\\\u0004\t\u00006CE\u0003UҋF\u0004 R8\u0011aw\u00139uW\u0019B6\t\u0003)\u0010j.)\u001bφLLdm \"b~4xg3IY\u000b7p\u001bӟU\b񱅏C\u0006Î\\(!S;)jMF6@wMU׶gI\fb[y\u001d\u0016-\u001d!N\u0006\u0012f)ѿz\n=@\u0017&mL\u001fl6\u001d`\u0000\"pt>AЈ\u0011T2F$\u0016|:\n.f;D\u0013rL`b+c%RCRF\u0003\u0015\u0016&u4%s˳X\u000b7\u0011\u0011MTeB\u001e5p㤯\"?:TxI4^\u0004H4!\u001aA\u0005FO\\h\u0000ᒶ4V`Iuxf;\u0000\u0018Π^qn\u00110ոtN)Kq\u0004 ~\u0015͢\u0015ʭ\u0018IZb\tN\u001d$Q[dR\u0019hWPז<T*\u0016\u0016Bw\u000e\u001d\t\u000f\u001bQjVJV\u0004k\u001eK,l\u0004}\u001d$zPU$\"FB\u0004\u001e~\u0001L޶b\u0010y8\\V$q<=;hn\u0007\u0001:6\u0000Nxo仅)+[BJ¿Gm%]UL\"[r_}C~\u0002.\u001eт\u0015B\u000f`7㭬\f\u0011[\u0015\u001e\u0018\u001d\"%LY\u0013U^8\u0014=Gt.|\u0004\u0001\u0006G0KcWX;6\u0005EO 1D\"9\u0011+\u000e\u0011@qH9\u0005\fM\fU\u0002@Ew\u000fĚdYy\u0011\u001dƹ\u0014Sc\u0005x\u0004U` \u00007lA\"\u000b[D;\u0018\tq\u0016\u001e9=v\u0003P$C\u0002XHfs!\u0004\u0016Ij{b\u0017Ō\u0017ہ*[S~\tcJ0;,AMp=\u0007,m\u001a dϘS`_)\f6 +aƕ%,9\\yO\u0013\u0018Gw:`'j\u001e%}h{B\u0016L=\u0016y\u0001lӱhس%<qy\u001aD\u0016\u000f1*MSMF]\u0019[`\fK{\u000eS\u0004o\u001aN?\u0000Va\u001e/A\u001a\u0014[ZAU g#ݷP\u0019DRq:\u0006j\u0013\u00012\u001cԧ=דQzʉT^4i\u000b\u001a\u0014HW`Ĩ\nڝ/H\u0013h\u0002[\u0007~#Cf8\u0000(\u0019!D\u0017DNH\u0003\u0002\u001d+!-\u000f{v%;N]}\u0017\u0000\u0003|Z\fxo:\u0001%#+6Դ {.DP!~:[i\u0013\u0011\u0017O\tN-*\\\u0017\u000b\u0011&ϧ\u0000ʶm\u0018\u0012[(sT&$\u001b\u0000\u0012jp\\xϝ#\u000fyS/4\t\u001a\"\u0001#LbϘӆm\u000e|8\u0014Kˣs#6=L\u0010\u0003\u0002^`Qy$@f\u0000K\u0013Y蜔GS\n\u000fZ\n\u0013;^%JZ\f\u0010[f\u00106(N;(17Ҕ/\u000eX:z\u001b-E\t\u0014\baQ_u\u0012^\b|E\u0004\u001c\u0019&_\u0016\u000b9\\l&\u0011pj-ґ\u0013bzwu\u0003!,N2+b9y\u0000EQ[7\t.4\u0003X\u0013tQM[BC!\u0014\n\u001bL)eT\u001e>h#&\u0005쎅\u001d-<`gZv\u0004nY4B,-\u001d\u001aJ1\u0012X\u0007cʁe\u001d\u0003P@\bx\u0015q`\n\rQ \u001c\u0010~r\u0002: HU~=Ț\u0005]\n~4\u001f\u0016;BV#lъNsu\u000f\u000fB鈩i\u0006BWj\rԤ\r\u0011YQ\u0019iG!cPx\u0005\tkQ\u001a\u0013a4\t:r\r\u00160\u0015\fI\u0018\u000e\u0015K\u0004fGh\u0002̼b]5\r\u001bbq)rp\"JHPk+S*ZګpT.*@ȧ\"24b\u0007gg/ŝ\u001f>\u000b{FWlGT\u00064#L=UJXb҅=W\u001c\"\u001e\u0018\"^\u000bq\u000ed|/ustԑ\u0004kS@+iۧa\bk(ǅr\"NF'̓Nx=X^N\u0004>\u0006Dv.5_!O\u0012?6\f+\u0011\n\u00005taxu\u0006^\u0015La\"\u0002\u0018X\n\u0007$\tW0?eךeM˻\rCf\u001c3햽,B,YV\u0012\u0010|y#skY(\u0006{㛙c!;\u0007U\u001eR?FvvP>GG\u0002\u0011Cb\nM0c\u0012\b\r,j`f'݌\u0001f\u0012z(1!wA]%pa\u0019<Dx6\u0016\u0002kAN3Zؗ'}~,ʖ\tH7\b@*<.ph/\u0001\u0005\fi0\u001c\u000e\u0005gv\u001e]+>E癧\u0017\u0017Yǅ2N52\u001cP\u0011:pFr\u0015z4T\u0019c+QSP\u000e1/Uj=\"\u000f;EO{\u000b8\u001c\u0005\u0006r8Y^Ѩ0jH(\u0003/|\u0006\u001aP!a7մ{sE\u00133y\u000b\u0019\u0006@\\}\u00199B\u0011Zt\u001aL`*SzAa\u0014uL5xl\u001a)6v\r6F\u0010 Y:/_&<7\u0019\u000fg9&h\u0000\u0017\f\u0016:P\\zr\u0007\nq)\b\b+i:Z\u001a[nƨnDa\bkZ\u001blJUV*ð\u0018\u0019\u0015Lj{\u000ea`1:{\u0016\"n\u000e<#,G6N\n\u0004>T rgdA5!\t>#p\u0006^mYGN\u0001UDPב\u0007$O\u001eQ\u000fuڐ52g{7 r\u000e\u0011p<Չ}\u0011:D\u0002g͉P\u0019B\u000b^J16g\nj'@pxH\u0002ӵfaBVJ\r^vE\u0017tR\u0017\u0015wzkCG-$\u0012\u0014ȶ-7HQ.\u001b(+t8\u000f\u0000D%Eh\u001c_]ulRy!zoE%\u0014ktr7|/12:f\u0017%&|S\u0005Y\u0013-{HLanwߠG\u0006A\u0005눔cL\u0011q5sX@& TD\fB r\u0014L\u000bO\u0010>%TiĪ8\u0004F^UkﮭOg\u0007\u001dHmj%T\u000br\u0006\u0013D\bԭ\u0000\"~Jbf\u0015Qpc\u001f\u000ejzTfn\u0005qe\u001el\u0018\n\u0003\u000f>s#~K}rޢ3\"\u0019gE\u001c\"\f\u001dB\u0005H_bAjQʃl=_Ӯ5m\nL@qk\u0001pV5\u0014n(ꉺ\u0012:\u001b md'֢umKNtd\n\u000e\f8ўC\t\u001a\u0012^EK\\\u0019$z7)#M\nݑ0\u0014W\u0018\u00077K.]\u0001KND{\u000f\rCղ{o8)̕ +^;U\u0012\u0011K{ N5;\u0011\u0018\u00014绂|N\u000fJ\u0014_OkN4\u0019\u0004J[RR\b\u0001d\u0016ҺA~\u0018/\u001adN\u000b\u000f<\u0010\fm7E@Az\u000e*s\\aE\"/NQ@\u001bT\u0000\u001cqq8\u000f]<g\u0005\rKP!^\u001a~XM\nz'Q4S\u000fk4c{9\u001fS.)\u0001C{\ns\u0017\u001c0\u001bBU&6\"&eݛp/p[\u001cNh괨sA\\^\u001b1\u0010)E4\u0012'D\"d.Pͤx@F&i:s\u001c\b\f\u0004j+\u0001\f\u0015b?f\u000fenhO\u0006֕k\u001b?5e\u0015C  pδBo%7ʆ^O\u0017U\u0014ӝ\u0001Ìfk\\\bhɌQ\"\u001d{\u00031t+\u0006?-'\u0000\u0004jZ\u001aNZN8\u000f@?qv.\tt\u001fnGȻ᣿S\u0018\u001b\"a4\u00131\u0012ю'\u0002\u000b\u0011$_/\b]SI\u0018QF'H趑_J\u001a!Sk\u001b\n6\u0001#\u0016Dgg0W\u000esJ\"G\r\u0006/!\u000bSp̛pt\u0013\nAD\b3SP\u0011\b\r\u0002\u0017\u0018\u0014\u0005w~l\u0000ɋSIq\u0010GLjQ:-wwN\u0006/\u0014_x^EsI\u001c̢q\u0014_\fx:hѠ6XK+rׁ.hg5\u0016Pg`w5_SY%L\u001a\u001b\bI\u001d){5^uw\\Gy\u0001ϸDH\u001e:тEgUw<\u0005eɎiK%M\u001bLUt\u0019f`V\n>.=tp\u0001{#nOw\u0015l\u0001z2`X\u0019\u001cAD0\u0012 ͪ;pmk~#TpzL0=l\u001eL\u0004v:<df\u0012&[\u0015i\r?\u0012Wq\u001d\u0018;Y\u001f\u0001kf\u0013|\u0005Mj7@\u001e\u0005t$e\u0019u?=e\u001fn%/aCU\fݞ\u001d\u000e#\u0000=8`bxm\u00038\u001esZT/\u001ckkPr]Š^\u00006A\u0012d-e\u000eyьZxv_I)aj\u0010\u0005?U\u00014\u0003\tۛH\u001a\u0006J4EwD3b[w\u0004ZDP\u000f:bp(JW\u0018\u0016k[\u0013A1\rx\u0005Pe#,\u0012@w<\t0\t';*\u0007k%v܋\"{r]t<t8V1,ϪD.\f\u00128.V{z^!\u000f(v\\lmFp\u000e\u001f\u0012]nr7l\u0006*oC&\u000b`j\u0004\tx\u001frnI-%ܓ1[N\u0014CTN@Rt\u0007w6UEBjL\u001a\u0015XF#2O\tk\b\u0018ץs&'CQ}\u000e~S)6XV \u0013 \u00170\u000b$_`\u0007q\b_rfرV4\u0013\u0006X)MK^daY>\u0006_((t4S!\u0014gqs\u001f<\t\u0003>\u0017?\u0011\rKV\u0012\u001c^N>A\u0004\u0017S3ˬ\u0016_k?µ7svbtn6~h\u0010\u0011[eD8>[8\u001f5U\u001e\u0013W@x#SOѮ_a\u0010P\u001aU&x*i4Kr\\\u0016\u0019rdT[-/nL|ɨ0\u0015>D\u0006}5}:\u0014kh\u0005g\u000b\u0001*\\#&*b\"5Xy\b4xe\u0012(%?{c\u0012#m<bCx{\u0000a҂zt\u001eե\u0016}\u001b\u00115wvU\u000fW\u000bkw\b\u0015TwYކG[]$Ň\u001f\"\u000b8ؕm.%\u000fyj0J+\u000ev\"\u001egL^{\ngh`\\1wjR[\u001c_\u0011\u001eVa#\u0019}n<ͮwn\u001b6\r\u0005\u0017\u001fTeGP5Imc)\"FkjB._6\u001cZ\bf\f\u0018!=TҖ;_)\u00070\u0002䕡]\u001f\u0016x6K0\u0003\r\u0012p6S]\u0000\u0015b\u0002\u0011ԉߥ.\u0005V\u001eQ*4h\u0005\u000fT}vVs$表\u001f\u0007v\\&i\u0002#tο4)G\u000fX\u00131\u0019\u0012XcZ\u0004ݻMu \u0018](mfgE`\t\u0005N\u0010\u000e\u0003P6~\u000bet\u0013yw\u001d\u0003r\u001ew곣\u0003\u0006@2s̩%\u000b~ c\u001f`z(Vm\u001amǨpXRBڌ3)->YC%\u0004\u0000:/E\u0011Lϡ-aѵ G\u0015rCQs\b\u001cyg9u_>\u001e+bm-\u0011oG\u0015\u0017f\n4jI+6к\u0006~A\u0003+?F(>\u0007\\\u000f\u0011VOu\u001d13#<Z\u000fP\r=\u0000\u0007jqAᅱ@ws\u000fjE!\n[3Ɂi$y(\u0012׮jTmVv.\u0012ʃ\u001f\b\u000bj|as~J|\u001fňt6Р\u0000^#s;0:\u001f@$\u0000\u000flfz\u0015\u0000\u0012\u00158rC-[\u0014Q`UMޥ\re\u00042QF~I\reQKʒ|\u000f\t֙͝\u0014j:\u0002fʹ]N{Eם\u000b(\f\u001e\u001e|g,\r~=\\Xu\\\n\u001e6\f\nm=#ɮ[A\u00109\u0017&\u0010H<~`\bcK\u00155V,\f\u0003\u0005w˙\u0011|O @f|\u0015C2=EZJbbҳ\"\u001b>_a%mGXLίS\tCd\u0005Pa[\u001e4\u0000@*\u001a\u000b\rZ\u0004Z\u001dp%\u0006\u000fz\b_6\u0004n)V?Ϭbp@5z\u0016\"\ty9|\u0002B*r^\u0014kMē)\u000e\u0019\r\f8JPl1\u0001!\b|o}<V~\u0011\u0003at\fyl3\u001c8)\u000e{\\\f()&B\u001do\b[#aX>Z\u001f\u0002af򀭇\u0012\u0006\u000fqe\u0003T.>]\\e+(\u0015}<dhE\u0012OF{<@\u001ehU\b\u0010xbi= ䷕& wSe}so\fc\u0001>d-d\u0014M*w\u001b\u0002\u0000=\n\u0000[\"~M*T@/+ \u0004Q*(ĬQ\u000b#}\u0015Mk7\u00140U\u001ecl?\ne)\u000b~\u0019\u001bC{\t=kX\u0016-[\u0011\u000f s\u00021z2\u0007OwrMxtLQ&[Q\u001f,YM\u001b\u0004b0T2'2~p\u0014\u00103a\u000b9\u0000x\u0006[\u0018/>\u0013E\u0010\u001dPrņf\u0002]\u0002\u0015Y-ñ(5E\u0013;}(>DgOˑ%19~\b\u0015_a[]Z\f\nF\u000bn*)xdƛ\u0000^\u0002^Y\u000ba\u0017fHVT\u0005xl?Ƹ\u0001ooG\u001f\u0016+p.tfǭ\u001e_{ڶ֚[?B\u0003\u0011\u001e!NU؊\u0002&vNg@Rb%&\u0011Z۔08.^㴉-Hơ\u000ey$\u001e3\\Ť\u00071]B!\u0019R4X;\u001bh`qx^as{\u0016\rY&G]qB{/Մ\u0017yUEmRx\t+\u000f\u0011\u0001{E\u0015\u0002\u001c\u001ayTMN\u0004\u001fQs\f@\u0000߈I\n;vwE}\u000e@T\u0018{Ҝ*H\u00030BFŊ\bx\"w>Ax\u00140\u0010Vo `f@%h\u0000y\u0014k\u0000meQC=;\u001b;6ulEK\u0001\u001bM\u00183sOO3:\u0014VW9w23o2b|Țsda4\u001c\nd\u001fT-\u00076:d\u0006y)\u001a'cE\u001c_$<\"R\u0014#\f;G~E~ӳh\u0010a\u0002)\u0018\u0011B3>\u00187Ô9\u00191ruXD\nT*抹n՞/#ecJn֌\u0016W/Kf\u0005\\!\u0000T}\u0005ڀK3[Tiѕ\u0010:(2~FT[Bn8=Urv\b/AĳS\t\u001cJ=nv\u0019\u0018:L\u0004ǖ\u0013ú*C\u0002+ۢ`\u0002S\u0006ԙ`><I\u00125\u0001\"M\u0017\ts;m\u0013-}A*#9\u001d\u0002t)G\u001c\u0010\u0001R\\p\u0014z]uD\u0004~ԻXӅ;\"\u0004-\u0006\u001d$}\u001a|^N\u000ft\u001c\"®0\u0000\u0016\u000f\u001c\u0019\u0004wdyR=5\u0015-Ʈ8^!\n\u0011A\u0018\u0018Wo\u001e\u0002iG;Is%S\bfCx\f]<,q2\u0007?|:Ak@\u0018Q1Og\rVWer\u0000\u001d@mK\u001dg,t${Z\u001dS-Vޑ$\u0018JP\u00153\tȴ}:f5]Ug;_\u000f0\td5\u0006MQ9\u0010;9\u0011\u00193<>\u0010du\u0015C~*\u0007^+d<Nal3\\DʊIF\u000b\u0019\u0006\u0002\u0007'ٓ\u0011\\[\u001b\u0004\u001bf@3S[5]dIpNW>*\u0017oKؗ%\u0019;\u001e{jK;`DHi<h=\u0002\u001a\u001b\"W\n4ب\u0016N#`͵3, D*ǫ\u0006\baTH08u父F\u001doZ,%KJ&k;z8b]\u0019\fi:lgrN-B\u0002\u001d\u001c|\u0011\u0014g\f1kAfXn\u0019!\u0002\u00125\u00008F\u0003T0ݔFhB\"u\u0018~n\u000f2#^@}â\u0013\u000e\u001f\u000f\u0000\u0002\u001dU@\u0002,C\u000ed\"0Z\u0011=\u001blWe\u001ci\u0003\b=DZ9c\u001857\\ORKA10m[\u0005Q z(3\u001cѥg.y7\u0016z_\u0011\u0017jK>3;$Z\u001e~1\u0019c\u001eKQLv[8ٰ\u0012oD(f%\u0015/\u0011+@\u001b>ӵb>z;W1#-x`~{\u001aLbUæ\u0003%C9L\u0006ے\u001aZ\u001a\u0011ؖym\u0000\u0016oHw\u0017\u001f:e0.Z\u0012\n\u000e\u0018hAүuӢ(\f\u0003\u0010G\u0018\u0000P\u0001U6N\u0006'U\u001d\u0002<<Uw;\u001eUv\u001d_\u001c\t\u0017\n5 a\u0000T]t3ǖ\u0004hL\u0017|\u0016Fܡjt\rm\u0010bJ\u0000\\Q\u0013$}Dhv\u0019Z%VLjaD\u0019(2\"Sv2/D0;\u0006ovO\u001d6\u0018$-w.\u001dc\u0016\u0010a\u00160^FD`FIZ\",(\b=FAq\u0010K9w\u0004k\u0018\u0011SKb-9SE\n.\u0012-%K\u0015S95ʣ\u0012Bʔ;\u0011o\u001b*\u000e\"ڠ.`~2l;~u\u000eZv!k qj-j\f&OW\t\\'1G\u0004T5mʧ=lT)3!\u0007RTфrmy\f}؀gğLyV]\u00140ǁ6~t[|(p`\u0004\u0019\u000bmE\u0011\u0006!z\u0006BόL\u000f3 L\u0019\\OY1uR$\t\u0000PX\u001eڎ\r /j@j2[\u0011m\u0002k5qT\u0004B:Uh|MSř.-@\u0001~n{+t\u0006w?ĠNu_(o\\\u0015m)wsW5jAMlR2~\u001d\u001bt -ݞTkCB\u0000W\u0014S\r\u0017^\u001euS}9h\f{aܱRO\"\u000f\u001f\u0018F\u000bdg\u0018xW\u001a*33zs;\u0018o[xm)\b4#JXEo\r+r\u0006z\u0017\u0007E$ߟ\bi҅;(}U\u0011yսb\u0001\u001b\u001c\u00109Pks%\u0015i:\u000e=\u0005]Ճ\u0007T\u001d\u0007^gBe2D\u0000As\u0010\u001aBϷ\u000f@;Q\u0018m \f(\u0010\b\u0006lc\u000f=q\u001e\u0005}D\u0019ǎ\u000f'r3ց_=\u000f^\u0014\u000e\u001f\u0000\u0002\u000f\u000er\u00100\u0017\u001a\u0019QՇ|_Ȧ\u001a-NjդO5\fQX\nL/_SQ\u0014\u000b]W30µ\u00102\u0007\u0004b\r(\u0014\\֧q\u001a^/ǝ)*k];yNԗ)o;v㹺\u0003\u0016+e\b(d͚^2խWr\fD*geq$6^G\u000e\u0017\u000fyS\fjw?\u0018sB\u000buYQQ۬\u00127\u001cGOK\u0010*<\u0015\u001dŸ_Q%@yO܆&d(\fۙ68v\u001e3cRl\u000ebg:5Z\u0011v#2\f^lS񧆬Y-[/pO\u001aP-c \"\u000bO4>oU\fg\nۺ\u001f2\r\u0004`6HUU Ђstd5\u0018#\u0007O.*\u0000@\bM7\u001eC؉KaCfӌ_COlz\u0003d٬f@^IF⪽\u001e(\u0013\u0004!C.ܦ\u001aW6=\n_\u001c81)-ر\u0005~\u0006hP~\u0004S.4Ty\u001a+8d|\u000f\u001e%jgA\u0010cb\u001b*<\u00131\u0012!_'W jܡP\"2\u0000*6#<\u0013yFP҈_T\u0010\u0004j8L\u001a\u0001m\u0007~*Eǩơ!GU2Z|\u0012\u001fUV1r'p@\\X\u0019\u0015\u001e\u000f~\u000fx\u001f(~\u001fK3iS\u001cϚ\u001aBzn\u0001\u000311cӿ믔\\\u0017eJ8Xs\u0005fF\u0000m ~--\tĊ\u000b>o\n^)g}&ʡ5b\u00189U\bF7D\u0006@叙\u000f~-LGX@\rVw˞XeO\u0001\\\"i%3/.bߘ\u0016\u0013;r\u0011\u0012v\u000b:\u001c,݅qsgV\")\u000eX\u0010kT\u0011&nG\u000fsST4bw\u0002.DVob&>#u_Tj\u0019|\u001eȇo⭾]yX\b(\u001b}\u0001=#,PWn\u0013\u0010P;RHh\u0002CU\u0005W~B=}Q\u0004D4B]\u0003\u0011-`d>K\u0011\u000fԊO\u0011Y\u0001Q~a\u001ehl鵕.\\Ӄ\u0004@\fkd.rී\u001f\";\u0003GÁ\u001e\rTۓ#i؂\u001dAŬ\nO\u0017|w[gʪ;֦$C].&D\u0017?2\u001ah\u0019![`\u0013\nY9\u001fd3\u0007\u0012@\u0006pi\u0000\f.ƽͲi#]O+!T\u0015\u0002\u0006M8\u000bYגZ\trmNe\u0000p\u0019\u0013ОQ`U\u0001\u001ed\u0019gAT\\}U7Ը\u0011߀\u000e<\tϩ>¬\n4X\u0000%\u0003\u0007~\u0012IZ38'2jM\u000f\u0011urmח*iBu\u001b\u00072٩<@,eی7g\u0014\u0006<*0#:AdÐގ;t7H<9-g\u0011n\u001b\u0002:2+%woi4NM?#\u0005G\u0011\u0016\"TeV.\u0001\u0010R\u001c\u001c64Ij~(e\u001b\u0003{\u0011veWw\u001f?Xih\t\f}\u0016sa*\u0006\u0001N\u0013$\u001b^jIi>µx\u0010\u0017|JPӳ [7~.?T7̑#.\fNY\u0013|\"x\u0019w,jo(gp\u001fz\tϔh% ׃Gϻ($D`\u001f%fi>x1\u0018\rJzi'm3i<pQ\u0006\u000bR\u001bg)h\u0000.g\u0006H\\?Eߵ\u0005=\u001eGV6m) vr\u0018\f/Aб~1W\u001e#B}Dsr\u0019)d\\/1\u0016F(Zu\u0014jҤ&UiP\n\bo^MFDD!Jk4V\u0004\u0013s\bFe\u0013q>j Gx[CNTcS\u0010.G{ߩ_\u00151Bsn b(\u000b\nJX\u0006ArZer'űge\n\u0002)g8\u001f\tu4r\t1c;dugO\u00043{R8ŌpkqE\r+LpMr\u00156߁b\u000b7\u0005d\u001c(\f~ZCF\u0016פ5e\u001f:0\u000e,A\u0015\u0010\u0005/'\u001e\u0011j& \"D$m;vCWlE\u000bE\n#\u0010k7?޶#_\u0007\n-\u0019_9+?\u000f%9G<^\u0011a=E:\bp˔\u001460OC`,-kDfE\u001ebYkkU\u0002)D^8+FѰBr\u0007vg\u0013c\rxƯ|5>G%@\bmc\"!f;\txhG]^E\f`:mW\ft\u0019DysTb95mV\"8̕lj:\u0017\u0001;b\u0000\u000bґ\u00019C\u0016A<|D~%\":0@_rTem\t\u001a)*\u0003c\u001f޵e\r\u0018Zwj&2ݍ;R+LU\u0019[:v\u001b{eF?HD \r0 sUg\bdIWlr=M\u0014C\u0005e5ߒTU+\u0004t\u0017\u00016I\u001d=\u0003]\u0018XI8\u000f{ \b8ws-~fҿDdS.%\u0015D~00t\u0011IN+Z\u000fUTnb\u0017z*,#\u0019=\u0017,/èߠ\u0004Eb]t$\b\u001dQ~M\u0007\u0015 \u001eV\u0006~#$Yd O\riNMa\u0003`8 q|`L}\u000fakTm\u0010CaN\tL3;uxX)#k!\u001c<f\u0014[\u001f ׅ>سh\u000fy;\u00191drOs\u0017A˧0#7'ގfR\u0004#jQ>\u0011rEc[\u0001y\\ϯ/fة\f\"ku%B\u0010\u0011\u0011\u000b:!4l8~uk\u001f6\b\n\u0015\u0000+dB\t\boeϭ|Q4\u001fQY3=W1:I\u001e\u0007U\u0007Ƽ\u0005\u0004M0ul)\u0011D@]a\u0019R?\u000e㡂\u0000\u0006{o2!۠UvШ\u001f\u001f\u0011F\u00155\\F#:\roJ[4\fM9;8\u001dg(%ѓQx\u001ekx-\u000eo\u0006M\u0007\u001a%V\u0011\u0004\u0000=/I;#\u0015({~9*\u0015TSz䞦Z&A\u000f\u0015D\u0007p\u0010\u001b\u0011T6kte\u0016϶\r\u000fU'JE\t\u001e\u001dw\u000bLtX\u0011b\u000f\u00113z\u001f\u0010@\u0007!cU\u0018TcUšlz\u001b}\u000f[J\r\"\u001a3L\"\u001a\u00179*L\u0001]K3_\n߂ɍ\u00128\u001dv ?m:R\u0010\r3k-LW\u001fDǁ\u0002Z\b9ՐX\u001c\u0003fFMĚ\u0004QRF\t:z0Qԭ\u0002\u00076aS7g\"\u001c#8cwF\u0010\u001e4QOTU\u0014f9lCez^oIj\u0004ׇ\u0003\u000f\fS3MVS\u0012රs^\u0003`\u0015ZX~\u0000:`|]\u0012\u0012Ϲ#cv1M)&{\u0011t^L)zl̈['z3b\u0017\u0013Ԁ\u000f\u0007zu\u0011w\n\u001eT\bkgsTt\u0011CY>=\u0014\u0011X\u001fΜv\u0010A!QlK)5D/AB6På\u001ca\u0012\u0007\u0016\u0012:5J0\u0012L\t{E\u0017r\u0019m+\u0014\u001cb*\u001d\u0011/`J4P\u001f\u000eԶ\u0002*N\u0005\u0014_vA&\u001f\"\u001eNn3\u001fa\u0010\rI\u0002[\u0010ܞK2<G\u0007\f,fLE2VW\"\fN\u000e\u000e\u0013\u0003-f퀒h\u0015\r&`D\u0011@\n k*7\u00147ί\u0013i\u0013\u0016y\u001en.l3n\rCR\u001dSABڝB\u001di\fx\u000biE,jkF<#\u000b\u0010e4ZTn\u0000&z{a<l\u0007\u0000p`ԇ:ʢ\u001e\u00076\u0010};\u0002݄\u0019OU6.\u0017\u000bӭ@ǦH)x|V-vOLnr\u00078#ꊱʵzW7a#ec5\u0019Kl\u000b~h`K\u000f@\u0014>V:Ω\u0012eK=p]vm]\u0005\u0018[kKTd(P\u0011Yx\t]ԵpBEoM0UύwE,\u0015k+\u0015Sگ\u0017^1vups\u000f\u0006ZWtn\u001eGm/U%dmGrF\u0015&\bBC\u0004\u0000k\u0005\u001b19@CS\u0010..\u0007\u0003u/y\u0006\u00038A\fh0>^Բ\u001bB>\u000b;B|j`f&\u001b\u000f;P\r\u0016co\u001d\u0000dAM\u0019%\u0001.Lo\u0011/J*\u0010h=àhd^țy\u001at\t?@1\n?\u0010S\u00006\u000bu,mA\u0010Ud)+1Y\u000b_n[k\u000b\u0017?=<MiEu-ћЌqnk\u0003mqk|y\u0004߯\"տ__O<z\u0001IW;~;}\u0001׿ۿo\u001bOo?o_Ϳ\u001f7\u001b~oy}\u001a\r\u000fޠmFJK;T\u0019 \u0004\u001b\u0012 \baj5hLhs\rE(\u0014ڔ4\u001e蕚]q]]\u0000Ga1\u001dp,5ZEo-\f+[x#xiF\bZ\u0003FՑѬ/\u0014D\bZFe8\"|[mNDŭ\u0010`fΧj)\b\u001eaeF\"_k\u00116GqJ\u00109=)\u0013lUo_+e<W\u0007mu+M\u0007*mW\"<\bZ\u0005#\u0011bKps\u0006F\u0016>\\h\u0006\u0018Br1\u0014tYVȺܟb\u0005\u001aF:_\u0015#AӴ\u0000\bebM\u000e\u0012\u0003߆s\u0017\u001e+\u001adoEf݃뻶n\u0015\u0013O_\u0014\u000e_)ZVļ^;~2_թmE\u001dNG`\u000f\u001d3\u000b]; ~i]}hxWBzT$D\u0017>\u0013\u0001Pj.i!\u0011\u0003_V}0\b\u00033\u0019N֛ڊt\u001dt\u0014qMq4\"b՛-( ʦX\u0002\n8\"\u0015\u001ax\u0006۠Vp\u0018f\u000fo\u0005o'n8er>aO\u0007\u0010\u0010MJ\u001fi`.83W0~{\f|=aa:\u000ej\u001b\u001fny^5\t\u000fr\u0006v'gY{35>p\u0000S\u001aZ\u000bU|)\u0001,뇰ިׇO1@\u0000Ι\u001bd\u001bDS}=CN[yh\u0015^\u0003B3&\u00116\u00052{,\u0011߾\u00156;\u0004OqȉX\u000eߓ9\u000e#\u0006~Wߧ\u00011;nЛ\u001fygT#-fW \u0010BDG]\u0011vE?m2\\\"EFN\u000bD\u0005\\[;\fvtI5\u001eSj3z?\u001cH\u0013\u0012* Xl1V\f03#\n&37nJXL8Z\f:ax\u001e;\u0000/k'm'\u0014\u0015\fk=)aun]!GJ\rR)5@_].Ħߌ\u0007RSbG\u0007l\nϛRT=\u0006gv\u0005_.y\u0000\\^ZMFͨa&D\u0016E'\u0011Ҧ\u0019w\u0006@' l#~Be#z\u0001 xh.\u0006\u0012z\nE\u0003Wfx\u0015/\u0015q;3\"K\u0019r1~:PA\u001c|{3\u001a3P\u0012#L\u001d\u0015B'e/fTq\u0012\"[P\u0017gO3\n\u000fNF8;+\\~a.\u001aVJ*z^׳\nCPld\u001b\u0011>y<6MSƮ[-[\"\f9e^O\u001e\u0015LٍVM*²\u0001g|H\u001bd!Cxx*\u001a\u0001\u0004]\u000e\bp\u00179lW\u001aq_\u0002VB|\u001d9JȬ\u000f;U\u0003Q\f\u0002T z筓\u001f\u0011\u0011)ɭO\u0003\u0010U \u0000֔'jC\u0014Z9\u0011M\u0000i'=\u0004(۱@g=%R\u0002뵕\u0017*3wJ\\;)eȦ'ƞK\\KdM,\u0014\u000fx@VzvФOsi2t\u00017d735iO'\u001b\u001a?}m@t \u001dS|#f0\u0012\u0007a\u0003\u0002nN\u001d\u000e>9\u0003ÄUS3\u001a}#m\u0013l,<\u0010\rT\"T&Giw8C\t>|M\t(\u0014]a$H_C5\u000e/\u00189zI%zxнWOȗtKZ\u0011d\\\u000bIO\b[ɕ>\"0W\u0018\u0013 ދBWK\u0004\u0004t`\bG*Z\u0015\u0011E'4C\u000f\u0019W$7[+,B9hk3\"\u0005\u0003\u0014\u0001׊v#9\u00164APwl|UC\"]7\u0002Ph\u0007\r\u0003Vz\u000bG=f.1j\u0016S z;-\u001f\u000eTXr:\u0001\u0011*r\u0001s\u0010\u0003|\u0000Sb\u001e)I\u0010\u0011Q-\u001d\u0011`\u001cKz\u0007q΁r9\t(+C'\u001f\u001b\n\b*\u001eH\f11A\u0014]kaX3&V\u0002֏&/4M'B\u0015\u0001!\u0005]UG\u0005N\n\u0014U\u001aIۍ\n6khOڰܿ!kPH\u000b}&r;\\%J\u0013+\u001f\u0007j5R3Xѹn\u0014M#7Z\u0011\u0016:t؋Z$\u0006Jݜ+0\u0018}\u000bؿ(\u0016d\u0011E\u000b-t\u0002^|\u000eU3 >\u000f^f}N-09-#0\b4y vyz}L]ALswA\u0006\u001c\u000b#os(9\t\u000e2)ïYmsvb\ni\u000f\u0004\u0007\u0004\u0011RfDuIyP\r\u001b.\\.ss!E/ZѸh\"׳V\u001f\u0002V\u001faPV+#q.H\u0019\u001bb\u0017G7ҵ4VG앫]WU!@tWaOx׈w\t4\u000f\u0011h\u0015WgC\u0018\u0004I&ίD\u001cLombmc{\u0002\\9?M\u001bz\u001eM۟\u0013\u000b]|\u00028ؕ\u000b\u000f\u001co*9\u001ac\u0016P\u001c][KKs\"\u0011q=PC2cY:\u0019fI{qIO~\u0012V\u0005r;3+{<\u001e]Y֩=0\u0004D䐘!\u0017qڤcz:?@.\u001c\u001bǋ^\f\u001e8t~?\u0011v.\u0003MBu^qHj\u001d>%Pn3N\u0000{Zy8\u0014Ke\r85ʧ\u0001\u00017δұhg;p\u0001\u0003L2\u0016Uusltq>ϧV4멮:½}gcCyҨDu⢥\u0000\"aȢںG\u0006u]^ZN\u000bʦˈÇ\u001c7}^a1]U\u0006$awvfE)WK\u0011\tF˲oD\u0004<E\"\u0011o\u0014mjc\u001fj\u0015n{\u0019\u0012i3\u001f\u0012\u00110;\u001a\u001e\bj緬k@\f:v=\u0001\\GUucjd\\W۶L3\fZތ=L-][RdW\rm\u001cxS~:\u001c+o\u0003\r\u0018/)!_#lX\u0005~lG\u0000e@Do\u0006E\u0000_N{)׎|\"ޤWg#\u0006Sd\ry\"_c\u000b>0`X\u0005qš\"0%\rI\bqe~݌!\u0015K .\u0007-\"e58\u00009\u0004ʷ\u0004&\bo\u00119Ud\u0003{@TŊ*3ۡ\u0000)]\u0014\u001b8\u0019-\u000e;4\u0015e\u001b!C\u001f\u0004鼮6Ts׳\u0005-Sǣ\">f\rn);B\u0015\u0010G\u0005NA\u0019*@He\u0010~7c\u0010H\u001b\u001ag\u0019\u0001C }c\u0014\u001fpMӑ/;\":\t<B\"^s\u001bpCB\t#b\u0003nm(U.dF?\u001ch\u0015i\u0010L@ aNj:)\t)oVTԱ2T~aq\u0001%\r{\tcxa\u001fv\\@=(+EXb\u001f=VJC\u0006l\u0012P\t~u.Yh\u0010c#h9O\u0010qhz+$/\u0000WU \u0005ztV3hL\u000eO\u0016\u001a=0\\H=Ck;14 RV\u001baK\u0001|ߔ쌘>)\u0006Ϫ[\u0017o\n*TA\u0004/f:$8i~[?#\nhoh\f;\u00021-\u00140u\u0007\u0004\u001fa߀\u0015Sd;ySW;(d@Uk\u0003cUS\\3b_.\n[[ہҨͭhC\u0004l;t<\u00168~-\u000fU\u0006Vh5&6BJg*L\\mʠBS>#ޗ5N$&\u000f\u001dZ 3$x{fGÛoQs\u000b7\u0015fB?=\u0011]\u0000P(@$/+Ʌy\u000332/n\u001ej6\u0007\u0006\u0001A_،8\u0003o])_m)\u001dN><t\u001e4C&\fMl\rT{ |ocDz\u000b|\u0006\u0005rc\u0015\u001f\u0010U\u0010'owG\fK\u0002\u0004c4\u001099\u001d\u001dSmb\u0007\u000f\rgHNŦX\">\u000e:UR̀\u0004z\u0014q;ܣ__\u0010\u000119I,U[^ a\u000ec?ǥ\r.idw\fhv\u0014\nH;wicg3AmNK&\u0006-R_E\u0010?5J4:\u0002\u00189<H>h+ԉo?\u001eB\u0004ݞ\u0015%\u0002(\u0005\u001a;O\u0010'*\u0012\u001fhi\u001d{\u0001\u0006~=\u0000`uhy>Ώ*X\u001eW番I 8V{\u0013\fW=R5\u001f|=7{dB\u0019Y\u000b\u0017o\u0016<xo\u000bt|GI֏Ow%(V'n\u0016f\u0004V\u001bJ[g=n\u0002\u0015$#lNe7zk3%iN\t2\u001c~g\u000fv\u0017\u001e\u00024\u0018, >\"~*ER\u000etI\\\u0011:ٶ\u00014=2ޙ3F+ebc;Z\u0019VFP\"g#G(ցW Ns\u0003ecF\u0002z\u001c{%19sC9NQ\u0004p\u00138NG\u0017\u0015D}\u001dv}eߥUկ\u000f\u000b\u0002\u0013D\u0010tT{P\u0000ߝv\u0000E;BO]OS\nd}:lzgaOx\"ڎ\u0004\u0012\u0011c|Iy\u001c\u0006\u0001\u000fV\u001f~\u0013-Î>t\"nGFsJVǉ\n?\u00059z̃\u0003*Z8<MÿWn3\u0018k5V\u001cLz\u0016\u000eB\u0016>}ܩIH<\u001c\u001caS`3i]nx\"C\u000e\r\u0018t~ne95i;`hQj%`\u001bMK\tlLѣ~\u0018E#Bo\t|uLL:^`7n'ߓS햣itI\r\u0003B\u0004a=\u001a+)hV\tJ\r\u0000Bs\u0019@HP{eC>w*Fy>jwM\\&\u00112ZA=J[JWO\u0001=~w9n\u000fk嘭#qwc\u0019m)LV\u001ag\u0013,\u0014k\u0000]\u0011@c/}\u001ei${\u0004kS|3A]@!0}\fԕ\u0012|dZ[pPֿx'S>\f ͽ\u001c\u001d9\u001dڑh/̜a\"@9Dz4w\u0013\u0004\bQG.\tem!oi/T+[\u0007#Xpio\u0007?`cW0>[\u0005\u0010:LW6h@\u0016\u0015$\u001fOmFT\\L\u001e\u001d|q6Z{{j\u0012GtD^5`\u0002%B\u001c\n[\u001aV1\u0003\u001c9<>\u0014>$r.Rs~9eLp6VYѬG?y(N\u0017z\u0018W\u0012\u0017\u0012נ~\u0000k\u001f}<<ϧeh]OǼ\u0003y☥\u001fN}0m`~VQ\u0017<\\CҺ=\u001f*A\t`g(A\u001dd腺\"֖2\u0019\u001fV[ľiC\u001bB@\nq+?Z\u000ejg8P\u0010\u0004\u0016'\u001e0f\u001eH\u0001-x\"L\u0019p^A/)UtQ\u001d~w\u0015S4\u0017\u0015i|\u0006\u0011 \u001d!Pgn\"%\u0001Q)Οݨz6k_!\u001cј\u0013qٲ2O0~aW0\u0003뽗?^/ahhI\u0017S\u0019z\u0005ֿ{PSl(Ir\u0011?\b5ñ\u000bV7[By X*\n̏RP\u0003|\u0012~\u0012\u001e<G\u0014\u0015$M_x/\fl!\u0010v_v`\"\u0005 ַ???7\u000e\u0010%\b)-U\u0001\u0004Z\b\u0003z%N@lͨ\u00025E1,L\f\\\b唫r~\u0019aLןgF\u0010N\u0005\u0006&\u0004\u00047N\"l|&<2[)[Q_\rAݾ_1DLJ!7\u0005\u0012\u0001EDd[I\u0018{˩914W\u0004\r~2LY-켁:\bF>\u0016'DXvǇ0\r\u0000\u0018\u001c.wM@@G8Y=FfՎ\u0003y8a㉉;VF퇈KE<\tqPĊ$Rl\u0011k׌)\u0000&T\u001aʌ1ˉ\u0016\u001f\u0011~r(꫅J@\u0003)\u0001ctB\u0015\u0011]wq\u001ebs\u0018\u0012SAe(\n4}\\Ena>l =NX7 \u001cY1G|-,W\u001f\bYG\u001a*FNrqﺯx\u0015-\tk0s#}@/5\u001f\u00114v`쩘\u0019ޛ\u0013g٧2߹\u0007Fh:9_N\u0005|OЃ*sg,#|nZe\u0014P\u0010\u0001\u0000΀ng\u0000\u0007*\u0005\u000b\u0005\u00027\u00121$o0A**\u0000}`2G\u0000uK\u000b,z[zͽE\u0019l\u001cFn[>E0\u00041\"\bփ\u0011|)0=lr\u0017\u000f\f\u0003\u00163H\f#!4z+j,@\u0011Vpwh\u0000\\RG\u0010*\u0014\"Dn\u0002\t*\u0005, %ʰU]M|\t\u001bm_V5n!&'XMeJA\u001e:|(apE\u000f\u0007*Պ\u0006\u0010\u001d+ey?#x\u0004 O(S}q\\Cf c%֗Yy\u00189\u0006$\u0007Խ?a@\rRݜȋjtەk\fsˤU\u001b\tajH֠G(\u000fzB,p:\u001bTX{EĬVbw;\u0004a\b\u001a~W~mSȽ\u0018S0\n\u0000j\u0010e+@\n\\Ԙ\fƛ?F bOCE;f\u0016\b\bԼ1T~#\u000e83ba&qP\u0007Z\t9z7y\u0018vܜڙL>\u001brڭ=쯞o䌲\u001d,(*Qm3\u0015|ޓ2\r\u0019EjˏsF瓴\u0014uXo\u000e\r\"誔|8.\u000f4'\fG\u0004\"Y<8\u0010]_Nf\u0014hϻ=cakQ\u000bc-\u0019΅\u00116?t0«W\u0018[2dmLw\u0004B3\u0018VPJѷx\t\u0010#@ˀ#\rmf`Z\u001e\u0006u|E@=D(&\bS\u001cd\u0016xx@\u0007inΙKA\u001du\u0011Q`<\u001bzD\u0016\fD}Op:x\u0013>^\u0016*=C\u0001?AL\u00033C\u0014xWG75pj^\u000f\u00118t\r\u000fw{ϰ#҃Z,\u0011-\u000e#j4Q1\"F?\u001c?FSU\u0017{\f\u0018#\n1VV\"Eu$?\u0016cь\u001f\u00191\u0010\u000f\"\n\u0005S\"ۗ,\u0016S\u0004\r\u000f*\u0006\u0005:7\b0YLy\u000e{M,6Q(9M]\u0019x\u001ef5V~u3Ȍ\fAfd4- )!\u0004\u000f:p)b+]z\u0011\u0013Dme[\u001a\f\u0019K^}\\C\n\r]\u0015\u001d\u0010\u0004/*1)=\u0001Mdr¤*\u0003aL\u0004*Q~\u0015\"E!c\u0000\u0018g\u0007>'\u00188̅\u0003{(\tFtl7;ړ\u0015L\u00000t\u001e$\u0018\u00057\u0000$\u0007<YV7\u0016<J̜\f\u0001h \b\u0010Si#*R\u0005\\I\u0019#\r\fĳ*Q\u000b[(Fk+\u0000.ȳ31\u001fBhR\u0001%k]rE9:?В\u0002%iQ$\u0001\u0006tʛi\u001avOu2\u0003T\u0002t]*9ێ\u0018P8\u000fuT\u0011z`}7[jMD&V=cxm{ģo=)$c:\u0015vu\u0002J~\u001d:ro~/p$\u001dye\u000f_\u0010}l=\u001er\u0007rG08e\u001b\u0003ʔ>DpbqZ_2P Sy\u0019fV\ri*K\\\u0000F\u000ex\nqGٺuz2nKWY?\u0015v\f׈R\u001d#cg\u0005;Z^x~M\u0018Næ.\u001f1 0qad\u0004-p׹\u00190nE kNaƘY\u0002~\u0011^r)1斲$\u0002\n\u0010V!B\u0007\u0015EBV\f[a\u0003`\u0010p}qW\u001d\u0001δثa`v#tߴʞG\u0012\u001b\u0016\u0010\u0018-{E)u\u0011V\u0006\n2*41^\t@EO([\u0010\u001au0\u0002ְk_\u0001)ėmڕ)Py&͔\u00125\\LZ<L\t$sA>|\u0000:F-\u0003\u0005o{xzfqD>$z2\\YOp\u0018\u00160A7\u001a\u0002^\u0016\u0014\u000f/W`\u0003P(\u00042wT\u0006v唻\u0012#~)v\u0005\u000e\u001d'\u0015\f膑g\u00126E:C\u0003v̔\u00035\tmz4`8r&:|I+.S_\b.p9fhq%4b^M\u001c\u0019Z`\r\u0019\\\u001bT\f\u000bDU9rI\u0018?\u00116y\u0004\u0000xC\"*j\u000bq\tYdoj2\b*5E2rr\u001dLuz7\u0015cYqR6HnZs\rִʺo7D0S߃baU\u0017\u000b{\nDrfN4u[詝;SkpU\u0000=ի/ft[YI<[&P\u0011fm+S\u000e\u0000ѻvJ2s@s\bD4\u000e\u001f\u001bUH6\u0013˙-rxRf7b\u000e\u0013gu)D\u001e#G}Kl\"A\u0015y8\u001b`\u0007g0jX`UJfֹ\u0005!C\u000b*&cI\u0001\u0014iמ5uu\u0015Z9pP@9}tQDI/%*!WGR>n;}[ءq\u001ay5\u000b\u001bQPu\ft#\u0002I]ȗ\t\u0019@/\u0002M\u001a+xX\u0001P=>\u0013bQ\u001a\u0007M7Ff\u0003aJ!1[$]z!v\\κJvj\u0002\u0015G_\u000f_?_Ni\u0001& \u0000Caw\tІUQ9*&\u0001#y\u0017\u0007\u0007b/X9d={d_#G\u000f\u000f\u0006\u0016؉~C3:^4}m,BRk~\tE]{\u0015҅3\u0005JU.R7X]^\u0011AW*\u0014nYke\u0006\u001b|\u001fA~8e\u0004,\"\u001dAtM=]_\u0000˺]ݭ\u000fNQ@ӽ,96\ttI\u001de\u00047\u000bѨt\u0017+E؉Z$&Q\u0010+\u0007\u0000T\u0015s+\u0002Akɜ\u0002\u0007z\u0016D(|9#sr\"<h\u0010\f\u001f]S8qRk5@\u0005\u0013\nJ;[\r_ʻ\u001b7Ȋڵ\u00125S\t3+0\u0003u[mW\u001a_~m[k`}ީ\u0014\u001bȢ\rtjIˏjW\u0000>0hͳo&i*\u0003\u0002@\u001ew(J\u001eX\"OnU*ž*[7uPw\u00038S+:@SeL&ETt\f%*jC.I\u0007p;[hd:]Ju>V\u000ec\\´|(\u0003۫cw]\u001d\nD(rvk\u0007'<~?\u0019\u0007ZΠ[V}]s\u0017\u0012{*!\u0014|\u000fF{dzƈ\b\u0018+\u0002gDi]\u001fF0!\u001b\u0016z\u0010\u001f\u0003\u0007 НP!H mO\u0007COJO\u0007HѢ%e\fXL=mW\u00066$\u0016d\u0013;6A\u0004\u0018vr`4\\)S/P<*T^#C8qh?\u0003!sW`w@\u0001Iy\u0011a\u0003G\u0017Ǫ1+\u0013]pz+$O3$\u000e\u0004t\u0006)̄\u0004[|`^\u0002w*\u0016\u001d\rgQ\u000em؆J/:@\\=S`ǒ`c{Q\u0017I[M˰Ey\f\u0004\u0004tsЃT.\na2ā\u000fFΩ\u0014Ծ\u001d\u000b\\\u0014KxDzacם+\u0018r@IˁW#bWT\u001cŴ\u000f*\u0019FB\u0010\u0007I٦5냵qT͞.\u0018\f.ղ;$8\u0014K~'TC̟\u0015@Xrծgˁ1<uj$&oAV\u001cA-Em\u0018iEJ5%\u000f3|\tTp!\u001d^W`aUДɲN&\u001f(\u0001P8\u001eq}U[YDxY([O=പ\nrTC+ԹI[-\u0018??Ze+sM0\t\u0003lW\u0011o9\bTcl˵\nRF^B[?\u0001\u0016nG\u0015vqAV#v@+l֜\u001c\u001fi{/~(a\u0006pK.<0xNT`\u0001(G\u0003\u0002\u001d߈`:jH\"ܒ*xʬ7M\u0005%H\b\u0017XV\u000fzԕ:\u00033XKS6\u0006vڪm\u000b\u001dL\u0017BPEJ\u00104\u000f(\u0019\bFp׭s5`g9\fO<\tM\u0013MM[lY\u0003kDbTM\u00107\u001493\u0011Ѳ\bMjȞ~?R\u001d\u0017R啯wR4ce\u001c\f!\f\u001e*#\u0011\n$~\u001f\u001di`\u0002uu8?)\fcd/7{\u001a޶c|K%/\u0011qDd\u001e\u0001hOite\bRdUM-ߝrZ.\u0017\u000fQ\u00001\u0019{ؐ\u001b\u0004=\u0017c\u001b$2\u0007\u001e\u001b\"V\u0015Rm\u0010\nBG<[\u000f_\u001bWbr3\u001c\u0010\f\u0018PLc-\u0001m:7<\u0011{#ٞoto^-\u0005GWL\u0002S~YjP\u001c#*@R\b\u0018\r6\u0005Y^Kdk`qh\u0017_\u001c7Һ$WGr\u0015\bUy\u00101\u0013W[)!(͙}Ύ 5&\u0003A\u0013\b\u001aH?u\u000f\bŶ\u0019J\r\u0004a1\u0011ASG ʏ$\u0001\u0005\u0005\u0005\u0013\u0002tW&n<jN3\u001fa\\2G\u0003\u0015\fm-iF#\u0007{eFgx,e\fc l\tղ\u0017_*W$ϔ?o:NbǪd^k<ιϠV9!GmR\u000e\u0007V\u0000\u00072޶\u0007\njot3䯎}\u000e\u001a<U\f*UU\t\u001fy1ߡlS\u0014F@0|ə̑ԫ\u0019=C\u00072YF\u0002b\u000b9+\u0002Jq\".\u0012.\u0019~7\rt*\r+^oyӗOq=ή6\u0006#Яfӷǥ,\u001f$+ʺ`Ñ\u0015N\u0007bczWb\u001b[\u000bĤyܖv]=o]ߕI:lR7/Z\\pZ<4\u001f\u0003RX?4'ӣM@y\u001frJG\u0001&I>Ҍ=7)ƥ:Kj\by\u001eO[-UȺ\u0003H\u0015sOV0ٰ\u0001&&͗R\u0010\n\\\u000fB\u0019-T7-^a](4TE>K\u0019h\u0013I1;M\u0018f!>\"Hŋ g;qv<\u0004*կS\t_a͞%pW䟏\u001a#I. #e%h\u0018\u0010\u0010paqIFs_k*\u0000(\u0017vtl\u001fGB\u000f]~\t\u0012p|%[\u001ay3\u0000XM\f)a\u000e\u0001\u0014&!;j\u0010lV\u0002}Wc\u0016f\t\u000f\nɛ\u001d{XܮF6_]hИ!\u0007N6\u0004΁484hXO\u0006h\u0014`%zv`\u001e{kEԢlH\u0019srz 1]S=\u0003+\u0006\u0016ň4ۮ3 \u0014\"L]z\u001b&v0\tsB}CWe\u001dZ5,|\u0019Upw\u0000\u0019ZK3\u001aRt/gb\\Ιڶ\u0017C|\u000f*Z3\u0018\u001c_6FC\u001f\u0019`r(\u001a{\u0013#6T5\u0007v\"9FWS?PZ@\u0011 \u000fF}u&\u0001sA\u0013\u001av\ry[0%9\t\\΂{ź\u0007j^\u0019Z na-P;?qU\u000frlp1\u0005\u00068sCNgA>S\u0019?rMB\nZv1\u001c^;xٱEњ\u0003@@\"X\rae\u0013VT~>\u0019Q}z\r5$俰\u0018W\u0005Ԩ\u0002!\u0000\u0005<p|f4T\u001e?j&\u001c./)gME=\u0000\u0014P\u001f\u0007JWpw9M\u0017S\u0016w+\u001b\u001a~k\"ףTCL\u0002#37\u001f}\u0018G/l\u0001eY(\tq\u000ekF\u0010r)k\u001cM$Т!\u0000X7\u001as\u0017MAtXYGm\u0018>(\"\r߹ȍO\u0004VDC\u0011z)R_NE6ƪ\u0005 4A\u000e;.:\u001c$2?z&ʴ8\u0011#\u0016Di#\u0007v\\9)%\u001caC*&\u0013\u0000n\u001c@6:K\u0006h->\u0004lS\u0019X3]C\u001f(Xq\u0018!acVa\u0010!G\u0006\u0005`\u001bD^JDر!X\u0001NË1\u0017u\u00147\u0003z\fq\u0000\\zo)\u0012ԉ\u0011*J ~F1RPh\u0019|jW0):gyv9cw*\u0016\u001e-\u0011=0UV;DXu-\u0017eQ\u0007\u001d9x|Qx1/\u0016|6>Aᗅ:yo.)-`t)m\u000b+˥*ʿ\u0005>\u0018\u0005\nk4ص?PkV; \tH\rOl)\u0011ROzdakt\u0002\u0012>\u0003\u0004YؽBٶ9\u001aK\u0007u\\5O0:\u0010*\u001cH[\u000eD\bBx=P诮넫Ü\u0016\tӒ\u0002ע&\u0015a\u0004WiD\u001c˶B\u001cv|zv?%Ϭn\u0011B\f\f\"VO(>V9T͛jhX \u001cīH&\u0007pns\nq^&)C'n(N\u0019;V\u0002Rpe\u0002\u0010u,t\bME\r\u0011_\u0011&\u0012\\2\u0011\u0001祈x4T\tF17\u0010C\u0007G\u0002\b\u00030|\u0017NA\u0013\bשISNT_~L\u001d..\u001c \u0005)?%/\u0012v|*`P\u0005@\u000f\u0015rqXȨVNư,kL\u0006.\u001btR\u0019-Zk\u001fS\b\u0014\u0010P)`Q\u0019Yڑ}.FEۄݨ\u000e6z \u0019\t\u001c6\u00048U\u0018=}\u0003\u0002VK7mμDA.2\u0018pкzE\u00120r\bc䙎D!\u0007\u000bl\u0001T\"2\u001cߺ\u0006\f\\X\u0000xU@NLFrn0YXmc\u00030ד&r6mQ&\u001bJ;to5\u0001ȬDGx@E\tn.\u000e4-8r\u0018tb\u001cqmuk+@;'\u0001-\u0001 t_L\u001a\u0013D;a=yL'3eon\bm^΃^1&\u0001\"Bh}l\u001d|P\u0016MSnDUJ.cGn2.\u0002G\u0015\u0013\u0004V>ڊǥn\u0005>|7W̉F9\"vW\u0014#ej\u0012\u0018r}\u0019`<\b\t\u0004NFN\u001eMuR\u0013\u0000A=\u00064\u001fXC_;jƜq\u0013Bk\u000e\u0005\u0003\u0015@NtC\u0000UQ˰\u0007\u0004MvR!\u0002\u0002W%\u0019`\u001dY\u0010\u000e*ˉ+\u000b\u0015\u0016\u0002M8ujE,fj\u0006\u0007XK_{\u0011܎T5$q\u000f\u0012\u0004\u0018>j\u0015\u0004p\u0011u\u0006\u0010ŧ\u001cF\u001cđq֚>\u0015ޭ\u001d&x9<\u0012b\u001bmE\u001c\u000f\u001ao@mDjԥ8\u0000#Gs<'~\u000e\u000e\b-|c}\"u5\u0006*\u0012\f/UA\u000f\u0011s\bo*Uu\u000fɃi\u000fBy*R0*hIlb\nI\u000eUg\u001dw\u0012%j\u00021f|`VƳE?_:\u0003@\u000e\nll\u0013;\u0002\f\u00159| SI\u0001%i\u0004u\u000e@+\u0018\fK\u000eazk:\u0019\u000f0\u0012#IQ^܊ʠ\u001cJV\fx\u001e5F4\u00062>_3\u0003ӷj\f*\n@e\u0006\u001f5x]]ot\f\rKem3\u001c?u\\?%UvtS2hq\u0013BM&4\u0014)#\fܩZbm% \u0012t)9$d\u0015z\u001d rL%h`a\\\u0002f8h<\u0013\u0017C4XN#\u0014\u000eozd$&t;\u0005@W^w N\u0006^hBP8\u0011PSԙ\u0006\u0015L?fW#\u0003եV~:\u0003\u0006\u001da\u001e&bqǝE\u001fWWL\u0013+!5\u0004\u0010W7yd]O&$L\u0015V\u001b\u0011 \u0003`j\t\u0017\u0007_\u000b_Ye.7J\u001dDWd?zK%PG\u0004\u0000mRY7je/p\u0012}`fr)w-ΪQSw2paV\u0019Y9\u001c[\u0003}٩|B߈\u0012\u0007X\u0016l\u0001}ĻM`\u0000h|\u0012\u000b\u001eiD=E+\\df/M\tבCw6m|\u0005]\u0012!\u001d\u001aFk0Gw\fD\u0012eibBh7e\u000e?\u00002:,[&xxک\u001f&*\\u\nƺ\nב}^=`\r\u001aHʱi2D[DNЮX\u00104u#܁\u0000\u001d\n`-8H6|.!\u000bۊc\u0004\u001b\n@C}\rށSXF>כ7\u0004G1w;\"ۑ(\u00065n%\u001eJ\u0018hI?\u0010\u0007Ȼ\u0010Fx\u0017l\bV$0ň#ܼ\u001eo\u0012\u0010z]\u001f\u000fhG\u0019M\u0001p{%:=H\u0006у\u0018S\u001b[\u0016{wbz\\[H\u001fQ%=(CpmlGŭ;+)$<W\u001f\u0014(=y\u0006\u000e+\f𔍕\u0014䏜\t(ML\u0012Tv\u0015I]ѶC\"\u001a^)e\u001d4h\u000fLʥX]tY\u0004۩:\u0000(\\\u0013Fl㙚\u001dS1`U`\u001d!\b96_?ȂIA\t.<\u00020&| I\u000e w\b􃲥γj\u000015Z1U\u0001\u0000ؿ\u001a#Rf-@-\nG?ʒ;!F\u0018-3]\n\u001b/ʹ\u0019\u0015cxtUdhh'\u0003)ӅV\u0017\u000f6\f\u0005nid#R~1L\u0001=[%fy\u00181_h<\u0003o9ڣ\u0007_~߉\u0003\u001c[\u0018\u0005*Rو)ڷ\u0011ٱ~ʠDeižEIGy\\ի(]ǿ{_U\u0018v-`hul\u0000T\u001c?t§oY2̜CEKA\u001fj EW^aFKFqn\u0018C\u0010AD4 {Q\u001dh\u0010s47m1\u001cC>\u000e+\u0012 7t\u000fjk@\"!\u0013̩3^yFlǤ_!\"܉8޽m[Of\u0017#YVdQF[\u0002+R\u0001åY;X\u001eQ*\u001f\u0019BԃdSQF&+U#2U\r\u000b\u0014Dy\u0002\u001c0\u001e$]V@\u00029\u0005e_B\u001a\u0014v֐\\þ\u0012zFMs!\u001c\r\u000fYٵmSӳRxs\\5SG2?5F\u0004T\u0013fG\u000e<e@\u00044\u001bq-\u0016.;\u000bR*G\u0002<77\u0000;\u00003.j'Ѹ{R\u0013;hvq}F$83\u0017%q\u001c;/k\u0000@NWkW[\"V\n}\r@+\u0014 \u001e_\u001aD*&\t\fK\u001d{w^\u0000^\u000ea~\u00196ShPf鎡mCî\u0018\u0003\u0000A\u0014k\u0015uiDaO\be?\\V!9\u0012\u0011\u00103O\u001a\"ToG˙ W(hp((\u0002֯<|$\".X?\u00173uqꞑ \u000b*,\u0015U4\u001b\u001e(Ktc[d\\A\u0010\u0017T/y{u\u0014\n\u0000ț!l\u0000bb\u0000w\u001c}_m\u000f\u0010\f.5(Ƶ#xFR\u000e#n'vV\u0002L\u000b8?>\u001fah\n{52UBg5<agWWj4e\u001c5a{óc\b^e\u001a<\u0016\u001eM\u0006Zxs6 Cz0\u000b!\u0019\u0011y۰ Vyێ\u000b\u001cz\u001cE\u0010\u000fw>p-\u0016\u001bŧH\u0015%\nkjVݱmCU\u001aT䃪\u001f<:[g0V\"/\u0017\u0001\u0012;\u001d.\u000eݗ[\u0019Y\u0013\n6$\u0003\u0018kҙ<Y4t\u00162\u0019Kh\fa=/&\t{e\u0017iC$TS\u0015q@G\u001f姛\u0017\u0001\u0010Pa\u0013Q\u0019U`֝\u0013\u0002\t\u000e\fopm!]!/-ny\\-<X)<d']*//4wmG@=\u0018\bfFhY`/\u0012~<MC\u00013\u0012v|SBSxaW\u000bgI4\bI@\u0015+\u0004#p[`mhtk8\u0011H\u0006p\u0007|ŝrlM7(O\u0007\nUCy5IGq|SO6Or|\u0015R\tABѦ;R#{tnUb*\u0015@}h\u0002ҥ\u001e\u0017#El-E[\u0007\te:_\u000evҘVc\u0002Ƹ0\u0004\f\u00100\fM!s\u001a!gjE>\u0012!(Q\u001aLgF̬u#L\u0016\u0019Q\u0019ꥊШ`_2`>\u0002ԉ/m;Ǯ1)>\u0015ڭΨLqPh\u0010G͟o\u0017\u0005[,wuUy@\fk\u0003@\u0011o!R.i4\u0010R6\u0002\u0006\u0001ŕ&T^\u001f\u0007E}!',3`Ĳ\u0003):}<s\u0005\u0004L?EB3\u001c_3۶gN\u001e3SiT i\u0001E@3'`\u000e+\nCbGW=x\r?\u001cg=2ff\u000fan*k\u0011\u001d\b\u0014A6h\u0010\u0014F\u001c\f2PYa?\u0017=Ʊ\u00050\u0001\u0018`T\u0006+[\b\u0010F\u001b`\u001d^wy\u000e\b.#\u0007J1&Az\n.͊\u0002$Zʭ/MU4~eе\u0001\u001e)\n\u0010\u001a\u000f%Ɛ\u0002v\r\u0002<d'[,\u0010P֪-׆K'v~xF3'\u0006vq\\3#ɐ\u0018A\u0014\u0006<\u0015f\u001egQ\u000eTUqR\u0011E+\t;łLu˔ψ??3\u0017v\u000e4Ua8\u0006\"z\u0013y\u000fH`QM_F3\u0000\u0017Wl3W)83\u001b{\b\rPxvH\u001ac@QLJx\u0002 m3\"G\u000fd_{lLr\"}p\u0015lFNLF$\u001e\u001cNש@P'zCeQTv\u0010WDӎMD\u001e\u000eYU6\u000b\u001eW}N5ሽ\"l}լb)z\bJ\u000bF~#6a\u001d&~\u001d\u001bN@*NV\fXrc~\u0015%\u0012\u000eZ\u0012{94\u0010rE:~|`3HΤv\u001d\fTs\u000b;\u001dQƵĕj\u000e(xLj\u0017Y4A83h\u0010;hh&ӧvޙ\u000emI\u0000ɪ@huRnTr4ɁN]uKv+\tNq=Ye\u0014@p\u001bF\u0019媙@i/CS<3-RV\u0006\u001d8 a۰M\u0005^:q-\u001bh@o6|؎\u0012dn`V\u0018\buD\\{m\u00162+&%'\u0017kIWWdׇz\u0013\u001cog\u0017tk_;g9i\"9_@\u001d+̗uå`\u0010Ե\u0016\u001a>X|?N\u0005\u0015*ŋ;[Hj\u0004\u0015[R\\/`pr49~+ȑ\u0000:.U[ly7\u0012?j+pĂ\u0003A?sl\u001f.Y_Fv#ګ=3Y=-\u00151{!e{\u000f\u0011ÏDL?\u001d}Hhۍ3\"}\u0006πs/b`yUH#~0\u000f'\u0010\b=_\b\u0011>,?)6聒u^[v\u001fȼQj}Uv<,\u0011@\u001dL\n\u0003BsIt+;JtN{}\u0017PW3\t\tw#\u0014\bˣf\u0014iN*ʿ\u0010,hk\\Jª\u000bC{e=\u0013ACB\u000eٸ\u0015Q_aR\t+\u001b\u0011q\u001d2b\u0000DfK#\u0005e\u0007b[\u0001\u0005o3pds\u0002$\u0018\u0001Kr\u001d\u0013a\tV#U^5|\u000e\u0013\u0017\u0014\f\t]\u0005k7\u0016n\u0001iD\\w~[}O-\u0001s}\u0011 9g9\u0019\u0018\u0002\f_\u00132$H,eb$\u001c\u0004ٻ~69Q4.\u0000=Z<~䎫2,\u0017Yo\u0001\u001f\u001f)3cƨU,Iۈ#\u0015.d#|q\u001f\u0019q\u0013}4q\u000b\u0007yi-\u0007]۴gv&E\r\u001fFȆʹS\u0012\u0007-8N1h9|\u0006`WIY\u001a.Hk]T\"4*\u000e\u0005얨\u0014W=\f\u001e>\\S$P?D\u0015ŀxakX-P;)o\u0015$&'̮u\u0004z\u0005wXW҃3͢\u000b\f㝒\u000f1eF!gF\bC@\u001a%\u0014ɮ\u0019ZXULu B\"H\u0007'Hً:`$F E(|J+j\u0004\u000bmT[\u001a\u0003D>#\u0019f\u00157'l^\t#?\u0006G\u00029*7\u0007I\u001f4\bψ;Paa:GEǰ)\u0004JR^@>Kq[\u0001\r\u0019SA\u000bL\u000e:FҸ+\"}^1\u0016\"F]\b\f}\u001b7;zm.\u0002L\u0005f\u0010\u000eeg\u0016/\u000e\u001e(ÁpW\u0001\u0017ߙC64\\Ǐ\u0011ZLч7{{QkKz$<nKkOʾ!;`׎Ѻ\u0012\n?#kABa\fr@)NڑD\fzl\u0014ʬe8ԃ2\u001eV!@, T\u0007\u0005Ve;y\u0001b\u0003\u0019!n\u001b\u001e\u001b\u001cq%\\a#<__\u000359\u0005*mg\u0003٨\u0018`!ș\u000e&\"πw\u0003kJ\u0018.EFY\u001d/^\u000fLyFy\u001f\u001aFv6jDc~.GB\bS\"Y'衐g+s\u00064A~aZt\u0015l4\u0005A32\bgqEW-3\u001eQ\u00172ڷff\fDG\u0007in\u0004}\u0003\"N\u0004\u001dD\"\u001e\u0015ED`ku( i\u0015O9k>U\u0012ۻ+\u001c4EP*\"7\u001bs\b\u001b(<'rr\u0015\u0016.\u0004Pߨ,i`#@I\u0006\t\b2i+\u000f\u00123\nȔm\tDqBٴ=OVK\u0018\u0015O1\u00027U(w׿R4cKlI}>\u0000p)>$\u0002^)\u000bOϒ\\\\[l!mSW\u0011z\u00077EYJztT\u001b==π?sx`Sa\u0005\bJ(,tS\u0019\u0011@\u0015AQ*w\u0010L.!IW\u001e\f\u0019,IxLhJ[Ա#\u0007ܴ PN\u0004\\\u000e\f;\u0006e²\u0019\u001a*\u0001:=L/=m0\u0012\u00026au=NwRk\u000b\n̺\u000b\u0003͖\"\\f\u001d\u0011#э\u000f\"gu$2\u001dE(\u0006\u001exl\u001a;b&B\u0011sG'\u0002\"\u0002\u0011EkzxnGHWXVGXj|\u001e\nTǬ\u0013'\u001cݶ\u0015m!\nI={f[Lo\u000f{H\u000epXYyG\u0004$˴n\u0005mp  -\u0002\f\u0010MY<_V\u0001\u00148\u0018\u0012yv{e~R:aTOHƦHk\bCLΑ\\em4pȢ<R&\u0014Z\u0003O0EYF||\u0015o֊6\f~#%P\u0014^I9_7\u0001­\u0007 acZc1\u0002\u0016Fܽ\u001dAd\u001d;ZE\u001b4g\u000e6;v^\u0010NkT« <\u001d5̳`o8\fY\u0001nkleW0Wͺ\u0016=x]z <.7\u0013Qz2w^\u00054\fvV;`K\"IʧY\u001am\u0011/GYaD,]CtΓ\u0017\"=Jy-*\u0001{d\u0002X쑻\u0018Vŀ90S\u0007b|\\\u0002%C+\u0000\u0015\u0011\\;L\t\u0019\u0002ND%`\u0000\u0007\u0011hL|aSt%\u0007i\f[-Ac৒(2bM< OOw@䚃\\X\u000e9ѧv\t\u00072>@E{ZsB\n}\u0003\"X1>t~\r\u0014*\byDx\u0019\u0006\u001cslPdEtҍB<\u0000fA3kQ\"~\b\u001e\u0007@'[\bK1.!\u001cQQtV0e\u0000w\t2L\bCP]u\u0007Q;N,SXoѕ@Rn\u001eΔ\u001e\n\u00152U\u0010\u0004\u0019\r([\bK\u0016@\u001dSgkd \u0012ܤ\u0011\u0012\u0006i\u0014ԦLlCA\u0018;X|tozG\u001f7ϧcSB,0\u0007՞\n\r 5-pKu[\u0012v\b%\u00119a\b>\tƝ)dކa\u0013\u0002\u0012R\u00159)1n*ӅesC\r%m}{ކ\u001e\"{!+EŉPv\u0010Y{\u000e`t}/'MtDSRd`\n\u0019\u0004[«ŷ]\u0019zmѫiAMע|\u000f\u0015V\te\f\u0014\fPEYL\u000fFek@EU\u0004\u0004e\bV\\F]m༙]pV\u0005y\u00079\u0006 :1\u0013ُ\u0019&\u001eXfu\u0000QXźn7\u001a~?\u001du\u001d\u001d((\u001e\u0013Ł\b\u001feGy@j8k\u0014\u0013yU@.\\t\b=\u0007\r_W{`uu\"iH(*]\t\u0002\bp\u000bY\u000bvR@fk\bt3'(IN\bZ%'%X6`m\u0002XEs2mZÛ\t\u00131\u001dHI\t\u0006\u0005e\u0014\u000b30i@\u0016xwPf߂?oiU.\n7\u001d\r\u0019=q5\u0001=\u001f$?-;*Y\u0000jBvaRA^ϮBo\u0013\u0003rG\u0000sv!;\u0018K\u001be{Aۙ\\廸jJ\u0004|}\u001e<GzSE눞|u++J|?\u001c\u0001Y\u0013Yt2#RT(t(\u0000\u000f:b)-̿R-<\u0011rE\u0014\u0018+ZZV\u001b^\u001al\np\u0019t\u0011\u00071H놃\u0005#\u0018Q'#V\u0005\u0015gxL%d\u0011L]w4VA@\u0002$\f\u000f^\u0002F\u0006#nw#a{P\u00001\u00147Y\u000eRM$K)w\fy\bB%\n\u000b;6f!\u000fu\u0002\u0014!_8}4;l(mz\u0018!T^\r׀l%!x@\"\u001b8{硰ʁnv\u0010Wt\u0004y\b64oB{P^bR\u0010\u0006zS\u001a\u0016P\u0014[]\u0011\u0014FA\u0005\u00155/\u0013A\u0012\u0002>bXS\u0012jeɎj\n;1-R?T\u0011\u0015\u001a\u0000\u0016\u0006Y\u0003<\u001aN\tpk\u000fy`\\\u0011?ptmr|T\fݼQJȥ` Q]P\u0019y\tsum!s\tk+S@\u0019\n\t}zu\u001e#@ydG}<(\u0013TKz6 f)O,e\u0014ZsfSD\u000bwEqQB:\u0015:I\u000fU1S\t>\u001d@/a\u001e:R\u0001']I\t\u0006\u0015Hj,nɘ\nxY\ta-~_ŅWl\u0010qɸ\"}A\fU&B\u001d򚋵Sk\u0000vS_ L0hgxB\u000fλ\u001aKۓ\u0001V@X(<ЪoFv9j\bT\u0017O7\u001d%RE221b\u0003Zv\u001f1Yx\u0010I\t\u001dɇ3gVzxXf)\u0005;BMmq[D7ðM(F\u001dm\u000e\u001b!3c1 e1\b\u000f\u0000'\u0003\f5[@\u0003ǜr֕\u000eH\u0005hfPsJo\u00158Xd8mD\nk5Ny\u00173ɳ9\u0001dCy[YX\r!@\u001d.2)Hc~p\u000056e\u0001u\u0018b1.M\u0001*\b*\u0001\t\u001do;9\b\u0001\u001bu7iߐ\u000e>e\u0015\u0017\fE54\u0012R\u0016^JR\u0011u\u0014\u0011+>\u00022eCw|=\"Ƅ`wM\u000fb\u000f]=Z2(`ُ[8nȀ3o*\u0016\u0017OL\u001e\u001ejv`\u001aԂ\u001b_\u0002i @u\u0017%\u0005xs\u001bqB\u0002\u0010R-\"?\u0011q\tZkd,\r,\u0006~?(\";\nej׌B\u00150΄/+\u00050/;Bɋ|g\u0007 O\u0005LIgp\u0001Rp`C\u0006i?<ت\f/\u001f\u001f\u000b~{\u001f_~6ׯ1ygUZ>\u001f\u0018[\u0001~n\u000bL7R\u0002_g??A/>7/拯o\u0007߾/\u0015W}=q\"?F._0!\u0015\u000buLQ7>@Ɂ\r\u001cQ})w:w\u0015.\"jΎaÏbjBoaHCEV\u0012Hqhg\u0003>څl>ڑ=<NmM\u0004'\r4$USlꋪ:\u000e.Ʈ/x\b\u0013na6Osۻ\u00005\u000200\"\u0006r\u00176\u0000pRfg&\u001cC\u00057Ʒ\u0011!1k\u001byBu\rZ\u0014!mn)x\u001bT\u0007\u0013i\n^ƺ}F\u0001\u001a\bYu>\t`\"\u00143\u000eyb~\u0011.jO8\u001c14\u0003荨q!u>1\u001b\u0015?fdSVI\u0017#8cX5n'?տ+UБfg\u001bQkzРV\u0015\u0011K\u0013s\u000ew\u0007LvcOq;c.\\\u00006,N\u001fKM+}\u0018rc?0_\u001bC*nebxa\u000faStޔs#\u0011F\nX\u0006\u000bҪ3\u0019\u001a2k\r\u0013\u0007d\u0005hd<A`n\b+ pڣ}RXxy4Ð@\u0019\"lg'oR%Nvâ\u0005\u0012*\u001d\u0014\u0006\u0014\u001cZk\u0004|Li;tMD\u000bvE{\u0006^Pc^:|;\u0015`f\u001aڥ2Ѐ`gظ\u0005^\u000e\u000b5ߪ*+З9\u0000,b7z\u00104@ͥ޷.BFt]\\\u001cK*KZ\u000f\u0000\\\u0012XaC\u0006|3=6?$NR\u0016\u001bs\u0007&xAUL뗧d`\bA96L-\b1aG*֎W\u000e]:Ի*xsr\nЇg\u0006\u0010Aҋ=/\u001dcH0Gx8\r\u0012:;(omaU;\u0002j;р듭]\u000f\u0006d.<֦l\u0004\"\u00056Β6\u0012~6\\\u0004\u0015<`\u0011l.\u001fמDXG#IO$R#~F}d/z\u0018#\u0007`\u0003i^Xߚi7l\u0006Bt\"~&dԴBZظI\u0010E\u0017p\u0015:G|\u0011(\n\u0010Y@ZwW݄F;\u000f\u0011)\u001d\u0014]\u0000h\rW8D8ԊA\u001a\u001a\u000bO\n\u001cY0\bs\u0003\bz1*H\u0000(\u000bLO@\u0012zy\u00016sC\u0010DI6xFP\u000by|@{r̾1R\u0011@\u000e@5(_$\u0012I^$i|\u0018MaA\u0012ܥ0Bk8\u0014#qƄ\u0000\u0000!YIƀU\u001d\u0000%e\fX5\u0018^ ԅҫ\u0000EbԊێ\u0010eٛ{1brB4\r@vXөq&I=X\u001c8\t^I#ɧ\u001c\u001cj]Kڸ4eJEX>)|So\u0010?܃[u ۲aeQ>o!ȱN\u000b-c\u001e`H3ڮ\u0018]\bt8T2j0DVGlF;\u0014f%\u0001Y@\u0015ɾ#\u0015\u001a`u#x\u00191\u0002ɻCEC)z\u001cjRb͋8\nƚ\u0012 pVK\u00145Y`W1\u0002\u0012x(>\u0019\u0011m\u0001[\u001b\u000f\u0018h\u0011/+2/(MZŢOϮH\u0016@\u0002\u001cA\b񳨻\u0010e6Zf\u0005ؠ^M\rU\u001e\u0002-p\u000b5\u0012C u6!c\u0003\u0015S7@\u0018\u0010\u0017K(\u001c\u001cA\u0011݂Wyf?G1\u0005_ &+Lvt;\u000bb>}\u000713^\"7|p}\u0019%z!\u001ahlRF\n/V#9\u0012O\u0011 ^\u001eWEi﷍`ݬ\\¬W=΢\rH\u001e\u001fA\u001dY(菼9ׯٔڢ\"#ȍ.\u0014؏b=v\u0002lc]7=d0\u000bKCn@(L=WCu~e<\b\u0011吷v\u000f\u001c:\u00165!ضO\u0000Sa?SO+Gyc5\u0014)jڏ\u0015dymO;F\bG\u0018tn[H#ņaa\u001c\u001c6g]g'\u001bsE\u0017vuj\u0010d;/\u001exǆm)\u0013\u001f\u0003\nfKeziEىShFlO^i2|\u001aח1zM}u\u001a(/\nL:$kC<&\u0004oj\u0001E\u0014hpE\bM53zzo\u0013\u000b˰\\\u0010\u0005P\u0000א\u0007<\u0003f\\\u00073\u001d{k\u0004Jcaqǅ\u0003,Z\\U\\\u0000!\u001e3]\f#@\u000e^tAxPI\u0014!YXRp\u0002Xl1k\u0006|\u0013\u000f\u0016\u001f\u0010-!G;2vw\u0001HEtiP*q.7y\u0004 E51W@#%o\nlmheiJ{EE>\u001f^r^>\u001a2@l=\u0019\u001e.f[l\u001e\u001c,mDc*\fT \u001a̡8^\u0011\u001f)\u000268PEw!\u0015:\n\u0017W\u001dN\u0006rpa:uaдM\u0005A(ib\u0004\u001aj\u001a\u00113\n\u0012^\u0010Rt\u0017e\u0018q\u0005NsU\f\"DCݓ^97rKy7\t_\u0000\u000e\u0000HkF/D.﷓K_ob\u0019\u0012h]E\u000e\u0005\u0012US׼Lqj$\u00035|ށNE\u00045@(ߢn\u001edTqFc\"\u0004߮vv\\%> (v/d\rL@(nt\fM=\u0010c1\u0015wL\u0005:]\u00186[f^\u001fhiB)3]O;\u001fT3\u0000\u0018S:\u0017\u0005\n\b\"`\"i=\u0019Ɉ){9; Kr\bx\u0016oBGz\u0014!Aɧ\u000bs-E\u001emYi\u001dה>T$GKf\u0019[i\b5%|\u001eT\u0001$'DG\ra\u0016K\u0002\\\u001b*R{(N2t!lU0j\u000eX};\u0013씮\u0007\u0015},qYĎ`[0\u001e\u0012j\b\u001dh}[\u0019)\u0012##%ʂ>(.%\u001f)/w\u001eO2CZ\u0011qM]o\u0018=\u0019\u001ac,U\u0007v==\u001bA\u0003O=\u001bl:L\r\f#T$W_4\u0001ۓ\"Q bAW\u0003η񥌷nMe{M\u0004j\"tQ[=+h$]-@\u0004l\u0018f9=skJ\f[\\旉H\u001aǎ\b\u0004\u0000\u001c\u0011c]%I\u00115FhcK<DQ-ˤ\u00078\u001b4\u0018h\f\b=?\u0017@@*w\u0019\"PK!3\u0004ρ\u0005=3\u0011Ԏ0\u0004\u001e\u0013\u0019g<>N\u000e\u001fBP:ï>`}@d~\u0001l\u0018\u000f\u001cn\u001exΣu1F ـK莬S:2a\u0017$Y\u001bu8\u001f\u0002zJ4[`Q#]\u0003K;>\u0011\u001c\u0018q.q\u0015\u0006\u0000̷\u0011{45c\"\fSUW_a!sޭT6g\u0003\r<\u001b\u0000?E\u001b}Z\"yBd\u0007g\u0013U'\u0007Vx\u001dGm}9p=\u001cjW\u0014\u0006\\qn\u0002&3\u0011\u0006tu\u001d1o\u0015\u0005l@*躣qmU!ҨΨ\r\u001f'}ƽ;AހWUd5L5u**cMY8v:͒\u0011و\u0000\u001b*L\u0000l8Vpڣ\u001c\u00075NẌ-,\u001aY7k0>\u000f؇,%Sba5(\\x\u001eiNU\u001f3͠F\u000e\nPsט[u\f9\u0004)euC\u001aOAsPR 5`اŽK?Cڷ\u0014@j\b]\b:\u000bRL[\u0001F^NSoH!8/\u0013Şϔ`qܘ\u001bY\u001d\u0005:lD=\u0013u\u0011\"<f\u0018\u0000j\r_ٰ\u00135ΧNàZa7\u0004)q\u0018\u0007A\f\u0018>FXI:\u0000\u001d\u000f1.@KFPl\u0019#\u001e`쥆Y1Z=:\u000b\\Jh\u001dBDȥD\u000b\u0000D\u000eMm\r˛@a\u0007č(IPo&\u001f/q[\u0014R8SC(<(P_\u00126\u0004J4wɀǥGr\u0004܋\b5\u0015$6\u001a4lX`XQ\u0000H_/Q\"q8n\u0003<[Uχke7ㆁȊص=d-l\u0017#/a\n\u0012\u001dox\u0018/\tn\u0005߅6Fe:\u001b\\*ZaQqrn\u0010m0k\u0010\u0003L@\n>\u0005\u0014dۥT\u0011HEVe\u0002\"e\u000e5f\u001a\u0016\u0015yz#\u0002AD$E\u0006e \u0017\u00062\u00130ɞ+@ؤ*ӹ!:K\tQg\u001e\u0004>l\u0017\b\u001de\u0006\u0002Qd5a;t\u0011\u0001ho{ⱡ\r\u0000\u000fv\t47-UWkv.\u0012\fKܐr\u0006\u0012k\u001dS^Q0\u001b1߸\u0019\u001b\u0002;\u001c\u000bb'z\u001b\u0016\n(譫\u0003\u0007\u001bVi87\u0016\u000e--AW-]P\u000bJ Ɖo\u0006\u0004VI;c\u00034:\tHAޥ\u001f76\u0003\u000b\rJ\u001d~\u000ek@ da$6>6lU\u0004MF\u001ce~Yi\u000b%X:\u000bF[@ۀ\u0017UM]ʸGo?u\u0006Å`1WP]cؤ\u0015\u0001k&5<͐c^OԱ\u0015|\u000b|<!zN\u001e1?q\t\u0018*\u0018\u0013晴͂.\"6\tw[/\u0018!vW\u0010[?V\u000e\u0011\t\u0006b\u0004 \tAp4r\u0017\u0000\b\u0004\u0004Q1S)ve\u0011@gwUշ\u0002#\u0010LOYgM[\u001cJ\u0002h\u001cWai⌒oz8+*\u0003\u0017۳ԪsE&\u0015BT D\u0011v\u001cmE!\u0005\u000b\u001d\u000b|$)\u0016*U5\u0019*U\u00032VGdERa:7QݑeEG*\u0018\u0003\u001d\u0012\u0000բs+La\u0003\u0018\u0012s'ċ\u0003S8\u0014PJ\u000e\u0015Б`xTD򂐽)\u0018X\u0006\u0002\u0012ײ\u0004X[\r\r\u00188yՀďU\u001e\u0010rT),Ɓ\nQ8`Th\u0011&n+qH\r\u0005\u0005檁*\u001bk@lQ\u0010\u0003r\ntz>\u001ba\u0004\u0013$\u001dZ\u0014\"$5{\f\t\rṶ\u000f\u0017/3n\rɎ|K6\u0001\u0005t\u001c1<\u0019\u0001;ɟ\u000f`؉f}{(=(I*0ߪ7<\u001c\u000fm;n!ltEF`nWx=jQY$\u0002\b\u0001Z(\"(9y54 F^}B\u0019f`0\u000583R\u0003qb$F\bٰow6#\b\u001d\u0000R\u0019hcC\no{\u001c\nM\u001eH]\fZKhT0@-h2JA2kjp\u001b1%\u0016\b_xɲ+0͓A1c'#|\u0019|\u0019Nhm\u0018\u0018\u0004HBϹ9SDBFbb?ѷS:\u0003e\u0003O^W~.HToW\u0005$f6ĘYAY}\u0012M`@rl(\u0013D4\"\u0017;ZVz!!{\u001fPiV\u0007\u00126\nD1T1 |\u0013D\u0007oxS\u001dggf\b߀FS'ncߠljCمa\u0004ضgplI;\u0016%cM\u0002v\b\b\u001d\u00112;E\u0003<TtK@TgޣT-\fn\u0011`Eq\nCf\"P\u0015a\u001a><\u0013Q\u0001Y\u0015ۇl\u001c1\u0015u0+DM\u0017dBʓ\u0011\rl!4=:l5S-a\u0004i\u001c*4\u001cJ=q\u0003\u000eo\b֮3T|\u001b8,!.\u001f,\u0006ėˉ\u001do!\u0017\\ \u0011\u0000,vhg@'\u001a\u0018Wz}ķ>1\u0014\u0018'ADc\u000bÐP\u001a\u000bmSJ[n*Aۼ%ni\u0002ͨ\u001c\u001dEa\u0010w\b*ψ\r51˜>F\u0000\b\rz\u000fq(>Y`\u001aXgvL\u0001\rJ\u001e\u0017\u00024#\b\u0019\u00191>E\u0005~'qB4aW?~,4^\u001fU4A\u0000P\u0005@i\u001a\u0015\bԸ1\u001e)}\u0002)e\u000fr4K8ۡM\u0015GC!xLL\u0011\u0007\u001e`\u0011=\u001cTR!\f4\u001en,ʄ\u0003\u0001]M$\u0003LY]sH\rJ\n\u0003e\u001fd,Ju7,>c7Lt5J\\\n_\u001d4K\u001a\u0017\r>.mtoWtrnY 6q]_c\u0007`\u0011ʤx\bE\u001do\u0005+H^!F\u0005'(\u001fKNxƙe.H!\u001b*#{\u0012Pp9}2Im+P53!\u0012(\u0016\u001eb\u0006B-g]\u0015D,R\u0007\u0007:֮K7:d7 \"~ǢX[ Gr.#]GJe+\u00169\u0019..\b+h`D(\u0003[\u000bAtrVW\u0007\u001bwL\u0010\u0000\u0013(dXIztgz>6tߜDFz؎L܊:j\u000b\u0017oR,(d\u000e;6Lb\u0018YL\u001f\u0011\tێ\u0016\b\u0016:!u!\u0014[\u0016u\u001bq[Wf\u0005:\fGo;Wh2\u0012п\u0014M6\u0002ig\u001b>`\u0003\u0000\u0014x'gU6GX/.\u000ehCW)\u001e\u0019h#]NY/\u0011\u0018\u0004\u0012M$V\\#.H\u001d\u00122Ȕ\u000f48!K\u001ee\u0004$\b\u001bKy\u0007n\u0012oP18\u000b\u0003Aqo\u0003fI}},Iu7x(\n^yC=\u00191r\r:0=۰%ĥ\r&C#iMٽq\u000f!m\n4\u0003\u001dV/йL5;3@\u0011,fMQRP{\u000encS\u001fũ$>p`%!p!\u0003\u001bA\u0000b10\u0018&A\u0006f\u001fnF\u001e|\u001c;I\u0001Xc\u0012,\u0000\u0011XJy{Hm0\u00020葱\t`\r&ڨz4!\u000b@\u0003Bz\u001f\r\u0018C@1XSAw,n婥(S((1qX2\u0000\u000b\u001fn4\u0018Ƥ5OwD09Zx5FHyu*m:\u001dnƎl#{.^Ae\u0002$q%0\\ƕ\u0002\u001e\u0007\u0011fضc 2\u000e*ow~LezԌ8Y5EWUt6@9bɝ̱+o(e\u0012c.'\u001dA\"\u0010+n#a \\\u000b\u001dC)\u0013X^Gc\u00005uYeiia^#&j\u0002cC\u0001iMq`\u0010xܩ3\u0011\"qtÈc=\u0012\"7(E\u0000J-kl\u0000pa/qFg\u000e\u0003[ 8~Y>ӏ\u00051b\u001cѢ\f\"enk\u000ej\u0016̡ΐK)`ML\u0013ER\u00120n*tq\u0005DdA(\u0003G\u0002\"b\u0018${U(Zz\"\u0010\u0016QaתV63ݵ\u0002Po[\u0011\u001cV=@v\u0004hotYg<%\u0011\u0005((S!\u0003+Y\u0018k+\u0005a\n\u0019-D1A{;]\u0010\u0002\u00059;8d#ǀ\u001d\u001adaof1SM\n\u0001t\u000fΧLrv+:\u0002#\u0012\u00189t:Ҭ-9\u0002\u0013#v\u001e\u0001Eq\u0004%\u001e\u0006A5Zv\f\u001bx\u0006\u001e\u001d)3BSh\\\",_\u0010\u0000c[\u001eES7ԛጮR8\"E(ZUm)L\fo\u0014F\u000e\u0014p.|E\\98A_\tD*\u000eܱS\u0010I\u001eY\u00118\\\u0003^t\u0019\u000e?˵VY\u000f\u001d_\u0014\\ĨYS\u001f/ƜB2\u0014=+%\u0002\u0006=\u0015\u001c8\u0000yT\u0006\u0004WHP\u0018;50(z\u001a߬(\u000f`Ad\u0012<\u0001dY\u0018\u0016ڜ;Q\u0005t\u0004ޱaa2)Qǃ9<&ݸRԈۚSDau\u0005\u001f0 \f\u0003F<3k.<\u00152\u0007\u001aGR.YVzB\u0004\u0006L\u0010\u0012Lqw#\u0018b\fv,06>\u0001-J~\u001b\u0000ciM<\u0017C`\bW\u0010WVJzڟ\"Ŵp`&ZK7\u0003nՆ1\buQ@ӳgMϬ\u001f*\"\u001a*!\u0006v\u0005Ft݌D\u001b՞\"C3\"D\u001as{\t\u001a\u0007h?\u001c\u0013\u0007\u001e?*<P\u0015\u0011=%ei*,p\u0015L6JO.\u000e\u0015l%tt{Z\u000e )xN\u0013\u0007:\u001d 6RxA\u0000V\u000e\u0017\nS\u000fj\n70\"x\u001b\u0012@Q@C%:ҾM',篛jn\u0011E#ݎ$x\u0011w\u000b'_{`\u0015P\f\u0013^\u000f\u0007}\u0003R\u00104A%s̱\fZ.mjh\u0007u$-zHv\u0014HU5#tlg,\u0015G<M\u001dX7\u0004e\u0011E;WiK\u0010Ac%xa\u001d`^FgOk\nnTL{Ar\u0018)#N\u0019\u0010L\u000f'\u001bG64ТdXM\u0011UoA#:\u001a\u0002nqD\u0018!3\nU\u001bS۾3d}^hd(\u0016\u0010ESwc#\u001a&)R4~SoJ(\u0018xin\u0005\u001c\u001aʽ\b#\u0005*Xm PC\u001b\u0016|jMٳ5[#6/*EhlXF~q\u0006\u001d{8\u0016\u001e\u0011g\"M\u0004SDɃ5\t6\bizQ\u0014%8?A\u0018kx\rJ6>!b\u000e}}!{\u0002HD䨔I\bNJYol\u001eJ\u001b*o!\t\u001b\u001c~@n:oR\u000f\u001b(6&0ݣ\u000b7&7\u0001.`XФa~!aE\u001c|]u\u0002 \f\u0002xyjÍl-s]Lh\u0005/r\u0018E^Vs\u0017PK\u001dA;c&96fP\u001bvS\fq\u000bEis:&m\u0013D\u0013eDu g(\n`(*tG\r+l\u0016k9+\u0004\t\n\b\u0004\u0016tt@\naf\\4|\u000e7]\u0003\u000b\n\u0011!D\u0016\u000e@\u0000\u0018#8beC\u0003`X}\u0011\t\u0005&P\u001f\u000esD\fj\n?\u001d'\u0006='e\u0004\u0019׭>\u0019`>\u0010\b;\u0012Е3q\u0006\u0012\u0001L\u0010\u001c7(\u0012E\u0002q$oC/f\u0014B[#uuD\u0017E\u0019B\u001c<Oc'V\\tl\u0019-͜XɇgO\u001b\"\u0005/5\u0017k\u0002ϖ?U\u001exE?/!)dl+Dv\u001a4xk\u000e`~6K-\u0000F+4<7!\u0004DṤWEF\u00054 \r\u0016txy\u0015qe'L5\u000e(:A[\u000e\r D8\u0012&\r\n\u001al\\XZɁFW\n\u0015Vٹ\u0014B~d tlCh!\u0012\u0007'2Qr\u000bw\u0016~NW#\u0003\f\u0010ZX9S(\u0001w\u0012Ҟ\u001eAJL!?&\u0017Rx\u0015ZQV}I3~9\u0011\\sZ\u0007r?@\\\u00150B*W\u0005\u0007\u0014\u0018,$\u001ces\u000fѺ#VѓE\u0011\u000b\u001fu;m\u0011̑Q6\u0006\u001f\t|\u0006E \u0012C3\u000e Ip\u0005\u001b%b;Ț\"\t9R15h)l>\u001eRN~Q1K?g!\f\u001bKbT\"+\u00152\f*u\u0015k6=\u0005WPbkѾ\u000bT^\u001d.Y$[W<w\u0003ܠ+PH/׹\u0003φ\u0007RCpWfHmHC#[\fݩ\u0001Q8i\t'dȶw\u000bnt1.uh\u0011U\u0018i+Ӣ>.ۛV \u0011\u0018\"\f\u0006+J冷\\\n\bUI3pæb0ؠWDoS>~cl4ʧ`\u0019g{\u0011nP!\r*ȣ+5$e:\"voM!8=_]\rL\u0004\u0002G\u0015\u00126\u0007\u001f\u00021u¡6\u001a0\rTib\u0014A/ۈ]\b\nVd\u000b1*O\u0004Tq9+\u0013-\u001f\t.\u0014\u0002))\u0000Da\u000b7nԆִ8\u000eJ/\u001cp![JM\u001a5ڴVX\u0003\u0013\u0002\f\u001b̮\bI61I\u0004n!\u0002E\n\u001d륜]\u0000U\u0014\u0010m\u0000{\u0007ؙ\u0019\u000fي?\"U-\f] B\u0003ֵ\nAE=,~\b\u001f\u0004\u0004>JMI>D\u000fT\n6\u0013Qm&Wk\u0000RC\u001a\u001f-Ľs.QhAV@s\u0013Z$&\u0014 qS@S\u0001C\u0015%\u0015I\u00060\u0017J\u0018g{WJq\t|\u0000g<\u00106\n\"'\u0001'P\u001e\nZ\u0004O\u001fM[[A\u001fx=dsj$ޮT\u001fC]OY)`Pe>y\u0005Dw<q\u0006i\u000eBv\n\u0015Ya=\u001fr\u0005yx\\M-\u001e|ؑɡR,1=좷)=e-#CK\u0019Xd8YW\u0005ΪrX\u000brnz9X\u0012fl6\u0019=T' \b\u0016T\u001f\u001cx\u0010T\u0015bOQcɵ}\u0016ͼgܽ`0j\u0015Nؔ\u000ejή)$\u0003p\tB2Pn^I\by\u0000T\u0005\u0012;4g\u0011{d)5W\t\u0011#\u001e\teLB$4\u0001Wn\"7SlZg\u0011!l!8P\u0016$0\u0010QxO5Aһ(:\u00129}r(\u0005gB>UVIw\u000efm\nB| ҈?Ewƽj@L\u0010Ab\u000b=kc%,$\u0007d\u0001H\tU\u0015\u0013\u001bbuR6\u0014\u0005Os6Ev2w\r>ؠQf\u0006n;v\tgT\u0010fuq%Q\u0014@u:V\u0000Ɗ0\\g9\rv\u0016`BF)t$C}:r\u0014g,F,d\u0016\u0019\fc϶k\u001764PGbJ4V=-\f:z8\u001e\u0018T1I\u001e\u0006[*B'\u000b\\9\u0005\t6\f\u00129Q:p#+Gnh5#\u001bAszB\n=\u001c\u001acgr\u0001\nbzſ\u0017p\u0000\u00008Cz \u0004\u0005\u0000Gɸ'?{7K ^\"C&\u0007-xC\u0019$Zfc2-)0\u0007=;o\u0006pϡCښ\u0006g4qwv\rW60r0#f2Z Șa\u0016n#\u0016j\u0007)U\u0007&\u0012F\u00160\u001cC\u0002\u0000:`7G^:4\u001a!\t\u000by\u0015JjhIZĝ\u0007\u001b\u0002Ж\u001cٯtF\u0003`}-!&z>L,\bl7ѹ\u0016'\u0007v݌_lq)\u0010)XYGC\u0000E\u0012E\u0004\u0003l\tG.\u0007MIzh6\fQ\u0016}Yoq|eܼ\u001e\u0006흌Mmߐdq\u0004O !g\tʻ8da\fl>pU\u0007\u0012Ǽ#~>aiKsG\u0006lp\u001eM\"\btJ˫#\u0018Dm\u0014-<\u001e\f#\u0014gDS`6\u001eOhy\u001e\u0007jK-\bm\u001fjWR\\sCP\u0011\u0019YGPEIl+\u0001⠔T\u0011\u0007En#-\u001c\fb0$\u0015跊Q뤰]*1\n>\u0014F)\u0012\u001c\u000e2\tZ\u0005{u6;\f\u0005\u0002\f<*\u0015K.\u0014-\u0018!5\u0015:\u0011o,jq\u0007\u001d&f٦\u0003\u000e-gƮ;\u0007\u001c\u0006[`kS\u000b4} Oo1CWzT\u0016\u0000\u0002\u001d>J\u0012fuԻw<\u000bV1\rA\tph不=l\u0011Cd\nFRFJg\u0011N*\u0012x@'v\u0010P\u0017G\"ͤ\u0004*O#\u001eN\u000f==AcEB\u0018:>\u0003,`v*mkIU\u0002<g#]\u000e\u0017@sTn\u0010]||a\u0007M\u000b\u001d.Ug\u0000\t9s\u0006\u000e&M\u0000\bY\u001aY%55-M]\u0002j7av\n1f\u001c\u000eϮ(%+(՚\u001cţEB>\u00159eG\u0007ht#:AKe\u0012\u000eE\\\"_\u0018\u0019@\u000bq?IJU\u0013&#*cX(#\u00150R8\u001fw\u001b\u0019)<b@4H@|\u00116mmc\u0003qy\u0000S\u0010q\u00154,ޟh%7VQ!x\u0018\t/X=\u0016\u000bL&\u0006\u0005\u0015L\nTJ\tD֪5\n8B\u001el\u0018WMM\u0012Bz\ti\u0000J\u001ebb\u0016\u0016m\u0004dE[1yn\u0014%AS:\b[5QGy\u0013df\u001cJ\u001cO0@\u00116R\u0001QDQl\u0017Qխ\r$\u001dͼ#I\u00062\u000fJ[g#E蘫։\u001anY\b\u001b\u0010\"\\[M~\b<iWQZlOa\u001c(\u0015EJ`*q\u0002{D?]\\D=m³K\u000f|I[A#ޣ<.j\r)\n!e:=y\u0003:uY,?kbW%жX\u001aցX>ׂg\r3r\u001f5\u0016\u0018u\"~\u001d\u0007vLDD\u0011b\u0019S5a\u0016I5\u0019qOebgC\u0014-\u0003\u001fV)\u0002#t'\bPQ\"BEɜR4:hJM0[To\u001e1\u0007[=OV!\u001b\\%y,~K&'~\\~\u000bB+Wm\u000f{ݹYF\u0011:s\tLtAd}sWOq\u0006%?GiF@ے\u0018vj:iM;\rE\n.vA)\u0019~;\"epHw!EGU\u0011lM{K6SKT7ma-<(/\u00044^Ħӫ~?6*b+yLjQ\u0012\n9;gN\tb\u0013{z\u00000\f\u0000\u0010Vge>e&5d\u001dJϿe\u0019#\u0004!^[\u001c*nqHh\tyG\u0001\u0018InE`\u001a\b9`˹\u001f3\u001dMMFD\u00105KP\u001d\n,\u000eI^\u0000\u0007$\u0002TU[\u0004\u0014HSVhjAU18A\u001dş\u0000.dyna\u001e j-qb\u0001\u0018\u001an%,m\t\u001dĠHP2i\u000b7#\u001a\u000bxGK{E%\u001f-\r7\u001aBҚ]ž]\u0001v;b>Mh\u0016k'\b)CFfCVh,kD\t\u0004\u0011*\b\b}\u0006+[\"A\t\u001d\u0006WM]E\u0016*\r\u0000\b{90PH&-\u001e_\r\u00044\u0004jWQ@ L\u0006̪8̂,O\u0016Ĭ\"\u0015zh\u000f\u0016q#G9Pej}]P#Y\u001d`f\bVy:CP\u0007\u0014\u0015\u000fJ\u0018\u001e1`YhA9lg%\u0005^\"\u0013a\u001d6j(XY\u0007\u001eQ\u0001[\u0010ʪjk'/Ńl0m\u0013\f1Mu\u0010w%\u0014:\u0005An>rTM6RZ=\u0014K.\u0016`C\t\u0002cf\u001eլQn\u0000l\u0013\u0002ؖv\u0002\u000f\u001cj4ꆜ \tkn\u0013\rP=p6:(\nOh\u0002\u001f\u0007\u00148F0\u0017(\\WZ\u001bA\u001doY\u0013N2Wܕ1'.XɆR\u0019#22U~&\u000fjf\tK/)\u001d a&\u0017m;V\u0000U5\u0017\u001f|%{K\u0018zk!J6*\u0018)!<Z&VΛi*>7a\u0001\u001c\u0007W\"5D@>0y۩}M:\u0005n%\\q\bŎ#0hv\u000e,= pGW\u0014>\\˔}T;\u001c\u0003A\u0014\u0012q\u0000\u0019\u001e:8ڑ\t0\u0010c&Җ\u0006*0H|%|\u0015 \u000bnIL\u0000\f\u0006\u0007r\u0004Dʬk1±W\u0013rx\u0012\u001a &@mYmgVs_`\u0012[\rhw%g\u0000=.ŒJckLe:\u00181*I:E\u001bݯcN[B1\u0018zo\u000e\u0013\u0018\bƎT\u001b\f-1c0'J\u0017amJ+p2\u0007Y!GX\n\tొLP\"[K8#1\"\u000e[><%'C&\u0003\u001f\u0005X\u000f+U\u0005+Ve\bPn P\u0000\rbf\u0006\b-\u000blݢwK d\u0010j\u001eB%\f@\"A\u0019reJTg\".X\u0015\u0010\u0015бa(ibX<KK\u00022F\u001cw\u0013B*2Em\u001bvei@=t΁ͅG\u0002\u0002\u0012\u001deɿ\u0011wp'\u0013n\u001c\u0013#KԲzcv,\u0002i\u0002\bH\u0004\u0019\u0017\u0013Kb'\u0005&\u0003\u0014%\u001a\u001c҈Y\u001b>\u000bƑ-!JS#(\u0010Hf \"~\tn|RӣѐʄݘE9N,T&-clDKhW\u0018\u0006\u001biO+RJ\u001c\u0010&سu[۞\u001fОl]V\u000f\u000fso#{1fA\u0019\u0013\u000fHm\u00046&?\u001d6\u0001kP\u001b#H\u001eBBڄ\u001b\f\u0001Ɔ\u0016UH`ٞ1Lp-]Hh\b\u0013\u0002>+:\u0001\u0002lo릾+n\u0007B\u0013\\\u0003!&|G&wl4\u0005ɑ\u001dFt0TAQ.x<\u0005(\tḦ́]H\rlWC\u0012\u0005\u000fJ\u000fMѻ\u0000Z\u000fzINDb;VSS\u001cNEpu\u0006^\u001e+3V5B\u0015%\u001c||cƇ\f4v!zD]VbG\\\u000eYRDK\u001e\n>>d\u0004YrDLi\u0011$q5t߮h\u0015 (gBO=+56eNK\u001d\u001a@퀥KJ-iIA,U`X(\u001d\u0015.H~T\u0010Hb\u0018,$۸L\u00101M0By\u0007\u0004\u000b6݈0\u0016W@\b!\u000b\u0011ZƋp4#2R\u000f\u0012\u00178RM\\b9-V\u0004@J/\u0015^\u0017\u0015\u0010\u0013\u001e9u\u000b\u0011IVH^5,\u001e#\u001f1\u0011q\u00049\u001d{|=\u0019Z>:>\u001f\\dh\bV\u0004>\u001f\u000f.՚\\낷U\u001b+\u0012\n\u0012Č;k\u0015\u001b%PJ\u0003\u001b\u0018Y\n\u000b%\u0013+h\f^ƫOõQ[3\u0014f+hiER,VGv0\bPTJ\u0011&tc\u0004zG\u0004f4y(cؾ\u0013\tnBV:ޔݲpp\u0019;bnq\u0004_@t<67,/j\u0016(,Ϛe\u001e\u000e\\Sl(\u0013)\"\u0017$^]\u0001dp\tʢ̈-:\u000by7o=wCUEs\t784B\u001ai\u0011mNGo\u0011%ø\u001d:6JT?}'\u001cWXDve\u0010H<\u0000\u0001Ȥ#YP\u001c0T8\u0003఑1l\te,Th\u0006}6D%T͟q,\u0012P\u0011s%\u0019Yj{bET$msCV_`@\u0013wg\u001c6\u0017[_*i+FO\u001e\u000b5\b7^ dB⿏e^LOwDVhU\u000byʂhZC\f\u0006\u0000&]x\"\u0018lΉcʩ(P*pޣ35 X`x`_1B֨ĵv&J$\u0000\u001f>\u0016nw?\u0005Ea^#p\u001d\t\u0015|\u00044\fֲn1\f\b\u00121\u0011$jI}ؔ\u0015K56zaʡ\u001e6QHa\b߲\u0000`bd)\u001a\u0010'Dt@Pr(u\u0005šT\u001f#ɜ\n\u0000\u000fiH3l\tdJ1zp\u0017\u0000\u00184E<yC\u0019\u0012\u00039\u0002O1cA\u00155\u0003\"I\ny/r\u0011tWѥ#^\u001f\u000bM~\u0012\u0017\tC\tF;/\u0018geR\u001e<\u0016\u0012,\u000b\u001a'rT*:2\t\"&\u0015)\u000bN\b%vuʥHDj_\u0001eQ#w\u0006\u001f 0|~нH1L{\u0012G\u0000Ş[H\u0015E7=1:+8\f\u0016#\u00115.\u001c!;!A}<Qma%Қ4!ۿI(^)0cgO\u0013n\u0002*\u0004ԁ*:\u0011+7\u0002\u0004?^.b\u0019\u0006~aU7%vćBRPNr\u0014\u0002ݪ1\"{\u0002\"\u001a\nJo4\u000e\t\u0012\u0006\u0002\u000b3FjR\n!bW\u0015ЦF\rb2B\tZ\u001e\u001e83kur~_\u0012\\*g\fl쳭Dx\u0005>G\u001e\u001eb \u001b#f\u0006Ug5\u0000ކ\u000f\u0015Io#\u0002L{N\u001eZ8?:\r\t\u000bX\u0014zYFDk\u001aν\u0013EҌp\u001f#tD\b~\u0012CDQDF7?K8l\u00145Q\u0002%v\u0014x.,\b\u0018i6;\u0002J%m\u0016:\u0014.\u001d)k:_hE3\u000b!LxǇt\tqP+\u001a,\n`9n_P1'\u0012}5Pd\\\"\u0001U\u001d\u0012KG%@\u0015@M2\u001bvh\u001d\u0006EiQhaǎ\u001e, w):*i\u0003 p@N]53>Q%\u0011_\u001e\u0012%,Y'Ôr\u0010;G\u0014\u0003\u0018\tVb\u001b\u001a鼓\u0018T(\u0007Y1K\u0006<J\u0010z\"\u001ai8$n:u\u0018͈u\"Dv %GD-\b@:e\u000b&LvM\tF,@v8Z\u001d;\u0012E6Fd\u0019\u0011JWTl\u0007\u0015a]\u0000Y\u00075du!#dPʰfGǄ}GWN>b\u00057K}}2QCL\u0001T\n\u0010Jler\b5\u0015+v\u001f0\u0006[c\u0012ly\u000f\tUzVH\u0019\u0001\u0010/#xO\r'gѓ§n\u0005\u000fz\u000f6ko\u0018{$:\tHdY| Gǡ\u0017\u0000]9\u0001؏)\u0000\u001fU\u0018\u0004\u001d'o\tY0z5-\u0018\u0011\u0012\u000f\u0003\u00065a\u0000_I8W\u0003*$rCUV-; Ak\u0007ǫSDCvE\u0011\u0002>ooŤE$\u0013B^u_j\u0014TEO=p\u00110xu0/\u001fS\t'XF[\u000eX-8]F- /\u0001\r|\u0017@\u0018\u0001#\u0011:\u0010fXHIa%F!*\u001c\b5'Z\u001c:\\c5\u0001\u0003J>%d\u0011p\u0018QS?\r&6Qh:$\u0005i\tut\rhKW-\u0010)\"A2|<vۧR\u001c\u00190@\bb\\U\u0011\\٦h\u0014\u0007-(^<:s\u001df;|\u0000*Cf,b+|<3\u001e҅jkAPu</м<s\u000b4!o\u0007J](z+8&\u0018\u001d3\r/zP\u000bBH}#\b\u0002.Z}\u0011IC\u0002d\tq̲W<d\f:@*XS`\u0003^\u000ek\u000ff\u0011aG\u00179Qq\u001f<E\u0016Z\u000b\"\u0013M\u001bDm-\bcC>|l\u0018H\u0012oǟI@ cɥ2)<φh)\bpp\u0018FTH1ReK6\u0017c\u0005{dZ\n\"\u001e\u001bڌ\r\fuʕ[)בG2Y\u0003\r\u0010\b_s\b\u0018M@\u0010/Z\u000f\u000b\u001e4(QU \u001cdUG\b)A\t4@b\u0005\u0002tVE^r\u0011u\u0011\u0005P@M\u0013ft\u001aa]e\n\u0017\u0004dr\u001b49o,GA ZvAy  .\u0016:haO\u000f\u0012\u000e[i\u0006\u00118pB:OJ\u001b?\u0019ф\u0019iQ^$v(c?UhAyߏ\u0007ܻۍ\u001aw\u0000\u0004A\u0005ifmX_mҨwj;\f\\|1Ulhgu\u0003\u001d\u000b.d\u0001#\u0013CY_\u001ab95e8;xn\u0012\u00166ě\u00158r\u0001Q=Z\u0010C`wҦ`\u001fn\u001co6ĳM?QW\u0002\u0006JH\u0013\r0\u001f' D<\u001e#*\r{@Ig\u001cCVm\u000er\r*'\u0004Rj\u0006m|I)$_7eo\f_R3C;i-@ץ\u001di\u0002gPx`ZǺ&\u000e1\rK3(><=1\u0011_\b_1x\u000e;,辪A\u0015\u001cJ\u000et78d\u0018-pw\u0015P!nK\u0007}dks-K-a\u0018 \u0018\u0001P#!Q\u000e\u0005!kㄩ\u00063N\u001e9JIj\u000e\b\u001agd#ϲ;\u0014h#i/KyaRϽuj5T{ 33\u00050\u001ay\rpRfӺś\u0017\u001bPtN#V\n\tpY{ެ?6`\u0003P[؊\u0018+\u0013BKS\u0016eD\u0004-Ȕ!\n\u0016\u0006\r\u001a\u001cey\u0004%x\u0005\u001bjѬf\u0000\r;!dRi\u0010vOQ\u0019RDju?[\u001d*X\u0007kSَ3\t'wTU+\u0002z$x\n؂\u0011\u0015:X޹a%m\u0004}A{l\u0002\u0014GC&[RAޟ.o[U\u001b[G\u0010\u00060\u0007isFЩ\u0002luJy挣X\\\u00119a\u0012N8-:uC\u00108/N\u0006T%]A0XA*O!\u001e$l$)Vo#Na\r\\*߾֩\u0000/V8~\r|'s\"\\toRX߈/i\u0002\u000e>y\u0012\"ʼȫ\u001e#u\nRb\\qDzn+9.Ӈ\u0016[$RvpQ7nRG\u0019 \u0000O~8&&]\u001bܐ[4:\u001d @_\bލ^%97wêQ\u0018E>ku\u0011Cw\u0011=Fr\u001c\u0011x\u0000'͈t\t4\u0002GDX\u0016\u0002,Q\r^\b>\u0006d.V\u0013J\u0000\u000bQ\rkB3\u000fi~K+;-\n\u00105^o&\u00062\u0012S@G)h&@$C>\u0015Em^\"eZt_\u001cfio$5|uP\t\u000e\u0018\u00055Pf\u001dP-pG\u0014ep}]m\u0013^*##\u0018UA\u0004p\\qL\"Њ\u0006a\u0000:U\u001e5#\u001cF\r\u00108+]X\u0010\u0017\u0010\u0013K\u000b<LoMO\u001f\u001c\u001d5uLRIyt\u001d\u001fw)۠$A\u0010J˱3W#N#\b(ռu_hc3\fX:+s@\u0012\u0005*nI\r0\u0018f2%\u0006gu\u0002\u001b\u000fW&qĩiY\u0000/H\u000b\u0013\u0010s\"\u001b*0\u0000**E\rȖhT`KV\u000bX1wŶ\u0012v\u0001\u0001bD\u0012Z\u0007COEx\u0002[U@=M͉1N$u2U{sDhp!>xTt\u00076F\u0016Ĵ\u0014t\u0005\u000fiLz8=h\u0012 \t\"4\u0010c\u001f#j\u000e5&ZV\u0014\tѨ\u0016edǰ0\u00164\u0007\u001115<ܥ64$q*;\b@\ntda\u0007@ߔ#j0׸\u0014Ds\u0018bU\u000fq8\u0003o\u0011#xe\"w\u0000,yp\u000f\u000e$J\u000fh|t:\u001b\u0018\u0016\u001b4͈\u001em&[\n\u00184F\u0014b\u0006 St|ʮd\u001fy\u0016MS5\"\u0013pG\bdˮAVX6\"8S\u0018>\f\nh\u0012-:tP\u0010l\u0005\u001e0E7p\t{\"h1჋.Tļ`\u0006(LS&\u0017\biO\u0006\u0017~J\u0007i`5\u0006\f[uh/@Y\tf\u001c)!4I\u0013]QjhN4\u0014b;2ސ|֎\u0011\u0002\\\u0013\u001fljmnI!4\bmP\u0012\u001a\u0006\u0011~{p)<F5=إ۽^Sd4]j5]O\u001f\reL'Br\u001f1noK0)wr%aHǀFx'<6*!|x#ӜgZL۔\u0015\u0016\rO{\u0013Ė\u0003w\u0014a-]}X@M@P7ފv`@a[\u0013[\u00124ܖ\u00036M\nx\u0014M]`K\u0004h&,ڽy\u001fp\u0000\u0002;\u0006È\u0016=gnT\tQK͜ߨTŋLC`a\u0017b8UzOitF\u001e\r\u0011yHZ)v\u0014\u001ad\u0000xl\bճ\u001eŕW\u0007p]m2eo\u0013G<_ׇ%>\u001ae9$\tA*3\"\b|\u0013\u0018\u0015\u0002E\u0004\u001e\u000e\u000bn&@ȇyoX㈌Eʎ:챡'\u0019:H`\u0007ΤZg5Ɋ#zX\u0013(h\u0013\\GO`  y\u0011uz\u0016MYU\"AʶZA\u0017=٤.a\u0019\u000e\u0010-\u0013P5a;A61[hQ=n\fJ1n\u000fnK@y\u0003u\u0005\u0005\u00042#\u00022o<bO\u001f\u00160\u00021\f%Yڄ\u0013rAW*`\u0004$\u0019\u0019A^̈\u0004\u0012@\u0018Gb\u0014\u0005]B\u0012g\u001a%5Z,\u0002(\u001f9BLj$Bq.pF'PpP}i^\u0007&\u001c\u0019*\u0003(\u0002\u000eoi^{{\u0000c.c\u0014ڞ\u0019\\\u0015\u0011\\vߣ8m]qV2>bXS{ &rbS\u0000\b\u001d҅~Yrh,tQ\r\u0000\u001aՙ\u001cHaϭ\u0000 0\u0010\u0011w5se:\u000bZA\u0018\bD!EX-x,\n\bցy\u001d\u0016ȰLC6v-\u001fUy\t\u0014z[!IF}\u0000bkos@\u0001?\u0000O\u0001C>O\"4)\u0005\u0004q\u0013i<\u0019qpB]N\u0000u\u0018l!Ijq\u0002Op\"x\\\u001e7kOJG\b\u0014\u0018\u0004s\u001d\u0018Mp\u0001Dټh8e\u0019Lmq\u0000\u0014s\u001dA\u0011K\nG0p Ǒ\u0007@\u0002XG\u0004sSjIAy뒀[49@&\no|KZ@=8Q\u0011q\u0010RT<l\u0004\ng\u0017>\u000e\u001ds\u0018<%&Ʀf\u0019\u0019.x)FBz\u001f1k\u0013[\u0011r\r\u0003\u0016z \u0014!(m:muJ\u001c=3\u000b~=@ŰuF\u0010pzk٦\nY2䫸̀ygaɿDE!s\u0019o\\iIl-\u0001_%.6%\u0018\u0002_\u0001\u001d'T,.@N\u0012C\u0004\u0001*GU\u001e+~\u0015H6b2|=F\u0016m\u0018<\u0010:T+aL4i[\u0003Z\u001d,`~t-]\u0019Le!6QܛX\u001a׾1!sԦ0:#2J*\n6E=ּ\u0006k%:f@\u0005\u0004i\u000bLHF1\n!I>(d۲MU)!EgZJtw\u001b\u000e|GT\u0013.\u001b}K\u0012#H\u001f:ڹAֲ\u00130o[+iG|\t\u001aoEQFSr\u000e\u001ftaaH\u0005s<&\u0015\u001b&輅@zU\u00131\u0015Cp='9:\u0000\u0017ۂo}C,}eg??A/>7/拯o\u0007߾/\u0015W}=?v\"\u001c>Ĺ|/o8\tZ)al\u001bp_\u0017~__}//\u000fH/C_\f翾{ԯՏ~߽~oy\\\u000f??vϟ}:?\u001fo__Uj~oOzyY'\u000bhFJ/uPNMB\u0017kZ@\u0019ȃ3em5i_xK~_Wɝ6\u0012\u0019]\u000f\u001c`Ï_,a~xC|ӿO\u00193Ox}y_lëƥ\u0017#\u0014\u0003Xȁkz*V\u0018xFZB$id\u0003,ng~+\b\fZ\u0004g)h{\u000b!#\u0016!#;c\u0002\u0014M*1 0s{G7dٺlVM\u0006L\u0002s{G[g&M;St\u0002)D\n7\\;_Y p @)\u0014rx1N~heiĬ3W\u001a|s\u0005\u0005܍\u0011ӋbI\u0015\nYH!\u0011y}\u000f.K\u001d\u0003ԁA@k{2FY!W-rf4ly\u0012Xvڱs\u0003\u0007_e\u0012P-\u0017FK\n\u0017LK|#B\u001c\bz\u000fn0L\u0014\u0007a\u0004R(zy44e\u001e\u0003ڼ}xL&5=^ԏ#U\"MMWjRfI\na\u0010\\zkHƹhYzs+8r۬\u0006\u0013PT\u000b|#^t?),T\u001ar)Ċ;\u0004B:\u0015ĥ\u001e.bG/\u0015\u001cd9\bM\u001aad\u0001Yw\u001bl\u0003\u001f^\u0010VΒG\u0001Fd\u0010<\u0003\t\u001d\u0017zjmZo~\u0019y\u0010Vk#\u0006\u000e\r\nendstream\rendobj\r16 0 obj\r<</Length 65536>>stream\r\n/qyY\u0010ڷ\u0010p+]d\u0000b3Ҭ/5r\b[ePa-7Ra\u0007kN5bU6;sx\u0012\bk\u0000K>:`jpsFZthiԝ<xդȲ㽰\u000f賟ɮ?m\u0013}W8\u001a\u001f*\u00161(\u0002\u0003ƙ\n2J\u001bw'\u0001MG~4\u00114\nd\\S@ϣM\u000fH\"\fp:\u0016ZٶэfRI}\u0003)sE:H\u001az@R@\u0017bA\u001f\u001f\u0012&EDcxڽ\u000e\tiv@\"'~\u0019zlX\u001ckHؽ0Lx[1`Q@.Eq2i\u00158@\u0016ʲ\u00026J\u0011\u00148T\u0003)\nc\rM~m\u0011iM\u001b{\u0017d,+\u001er|\u0013Pꬴ\u0019̵\u001dzZ\u0017\u0002\u00154f&KT\u00010\u001611~\"\u0003)^\u001fMӏVԱ҂QB'z\u0015jOQΓ\u0012\u001f܅(aE>2hs{W\u0006+O}\u001d0-\u001fݛn9\u0001ӤfUD̂Jf2Ϡ\u0014z\u001f(3!\u001dעYʂcP&/1ӓ<MzD\u0010B3\u000fT;\u0007L?GXw\u0006\u001eK?\u00045}F̋q-x/蜿\u0014u~cOTBE\u0013\u0016jقPxC^>#\u0007dV9Qʜ|B#\u0012\u001aFnX\u0019\u001f9O,S*{\\P0+`H\u001a1\u0002.\u001cr\u0005C_~I2#4O0\u0012b6\u00181\u000e14,\f=(\u0017SOej2\u0013p\u0000\u0002pqW\u000bgH/Z\u0016evx?\u001b^']AO*id\u0013KzSFUfP yyO?f/ߏ$\u001a\u0012%1\u0017藟}_|\u0015\u001fOXvZշ_jgA߿u<{Yۈ}\u001b5j'o%ґ;:\u0001_w\b`\u0005s(\u0001 \u001equo>*zq\u0014\u001dI\bg^\u001a\u0000\u001dd>0N=·1$\u0017\u001eی\u001au~6LUU6qKca!\nA 4IH1\u001fs i;lgTk\r'\u0003ڵ֋f\u0000;㿈Y!؟8屿\u0015\f\u0001\r坜G\u0017=5G40PA.\u0003?:81>+聨>\u0003\u001dp\u000eu&l\bNKi{n_c^\t\u0010\u00004#\r\u000e\fްaڎ+%\n\u001c3dJU\u0015w(^3UAFSs\u001c۞\b3e9<\u0019GG\u00027\\Ղue\u0011$\u001e\u0018\u001epVHXY\u0014\u0000\u0012\u0010\u0007\\\u0019\u001a\u000e\u000e *n\u0013\u0018\u0007\n\u001a\u0004\u0012\u0012l;]\u00066R4 B@\"364$\t\u0005GV\u001b,\u0002\u0015;\u0002f\u001c\bms\u0016%X\u0006xF\u0001aV \u0001\rx\u0004.Kvm8?\u001bj=Zt4#x!r-MQa@\u0015mUa\u0016\u001bt}Lf?ޖ\u0012\u0002beɾľ(Jt;NW]\u0010#3x\u0017\u0014%-njA&{x}\u001b(\u0010nDC\u0012\fRw[~<\u00054t\u000fq\u000b\"S8 s@&\u001dn%\u0006\u0001EBs\u001dST\u0005\u0002,u=\u001efGMH\u001e(]aG\u0015)kjAQC5&b,L\"xX?Ѻc\\J!3O˗Op!6\u0007M. tPy\u000b+\u000f+E_GW\"ΖޢR\u0001\u001a\u0001Q8qE}|^$U\u0015\u0000inc+%5@Q\b&\u0015<!\u0014\b\u0005tl\\p-X@IC{e/kI\u00059\u000b@3w\u0010/?&C\u0015\u0004MG5|.\u00139#h3n\u0014TP5`\bX\u000f5H\u000b\u0016\u0004\u00120E\f\u0003ʏ#A{\u0006j4\f9赲(8ޖ#\u0019\u0019\u0006|R|ʁaq]\u001d/Hg\n9O\u000f<M-:=Q}@`G\u0001\u001aP\u0014~\u001e٘cmMXt.~'YR\u001a\u0007\u0001°qV\u0002tdp\u00060|\u0000~\u0006\u001fL\u001cE\u001b;x\b\u00177?\u0018Oit̟{~bTd؁\u0017t\u0012vDcg\u001e]\u0002W|\t\u0012!G\u0006iog\u0018y }+fZڒg.\u001c\"H\u00136=\nqxu>ƣ-qvս\u001f\t:o\u0012?x\u0001nE*B}\u0003G5NJ.zIb9N+ES\u0017e7񐑱#V&\u0010Iݶ\u001eR6\u0005\u0004f\u0005{u=AܲUХ=4U\u0015JqzDtϪ\u001a~\u0015;#;H'^@\u0014q\u0017\u001cØf\u001cC\u00077{ӌ\u000e\u000bx+\njxY\u001a1o\by}Ƿ\u001e-H=?Ƭ?Cu\u0019X\u0010n\u0011\r'^\u0019\u0017oñ\\!n\u0006V\u0014/\u0012a♡X\u0007\u001d\u0004Q\u0015\u001aĘ)ګɤ \u000e\u0015Bǜ~jC&լ\u0017\u0011CɎƄ\u0010XԲ:GN@\u001f!x:Ue29bS`%XIR?Eh3j-NUIc} \u00053\u0007WD\u000bǊaVC\u0019BTdɎe\u001d\u0007s n,\u001c#W;PKoǪvjsbK7WJjQ\u001dP4Xg@ yh߮ޕ\b\u0004\u001eMT[E\u001eQ>]U\b\u0013S#\u001d]ق\u0011Tgڣ\u000eNo9\u0010HGC\u0002W\u00195΢\u0000$*qOUj\f`d\u001cRw\u001e_۸\u0017R'\u0011\u0015Thl|!Sq\u000f3|\u000e_\u0004\"\u0017!\b[Ծb%H23mx\u0013޶\u001e,\u0004*:s\u001d/Ӑ\u001a\\\u0002`oe^i\u001d[Ȇ\bv\u0011j^eE<R\u0002\u001d\u001b,5o2\tNAaqp{\fܪ\t\bR7`\u000e7\u000f%<U#wJ΄֌o\u0014ejNG^UyyxL2͏7\u0018gӳY\u001c~(~\u001d:ԑq5\u000fV?7rTRBfi)U?\u001d-Ƥ}͎hZ0zg\u0012\u0014\u000e\u0001\u0000̚\fr\u0012R\u001fȹTmG`L@rDfn\u000f-\u001cs1Y@!o+\u0002c͚)1\btFB\u0013\u0005\f@_\u000240M}%^+@J->$߬nА\t\u001cx1\u001c>P\u00047\u0013\u0019\u0018\u001e9zT\\d+\u0007CrHG&\u0016b\u0011\u000e-^Y\t?Ala/A0\u0015$\u0016޲KUvu\u00038Zް`o\u0005-\b#)~vTԢ\u0014$8\u00020䢏\u001bEM{Zt\u0001n\u0010t,Xm_z87>psEER\u0017@cי||\u000b\r+Џ\u0003h\u0007X\u0010\u0007:#8d.t*[\u001c95(@961iea3FL;rOm\u001c\\|Pͮ)jK\te\u00155$&N{P؛;;\u0003P\u0003\n\u000bm=hq\u0004R\u0005S)\u0018,\u000f\u00014m0\u001d\u0013݂p4.{A s܎%N\u001b:#\rߴ.b\u001e±\u0004Ov\u0000u*~蕐\u0007\b\u0014@^\u0003yJ/fh\u0000H]'7umFLuG\b.v\u0018SRpzX9\u0002]\u0013_˓8ve\\;\u001abo$6\u0014R\u0007$gJ$\u001f7\u0007)Lh]Q~fkQQ\u0002ıuEI0np9M~\u00144\u0000d\u0013}}+>8좴WoHiHLFQ\u0019Q|:\u0013\r]:t\f(`JOk6.\t!B\u0004?vm?rB$a+Λy_eU5\u0003/%N:\u0015:ݒK\u000eDۥ<27\u000bոT>\u0012G\u001cٲ\u0010\nNzZe\u0015\u0002\f\u001f\u0017\u0004-D/+\u001a=~ǶWt@G\u0010فx\u0013\u00110LWq\b\u0017^.\u0004?[.\u0003*H>5zF\u000baN\u0003Yn\u0006 )bJ\b,6{fp\t,ktǤ\u0013Fg\u0000\u0004(\u0019\u000eړ\u000e}?!i#w#~\u001dEڗ\u0010NvxF)3\b\u0004N\u001e\u0019$\u0012j[\fT\u001e?s2命_o\u00107,5tЛo\u0016[GD\u0013vvܤkK*=\u0014eu$}\u000b~ힵF|yd\u0005of\u0004&\u0000,Д#o+7,t\u0000b\rl\u0011לU\u000eb9cR\n\u0013nғd\u00142\u001e:\u00107(\u0006`7\u0012|q\u0006m|LŻ}IŜE@^\u0013m*\b30&ʲ)ˎ,-g\u0018\u00194v\u0013Ky_\u0006x(\u0010;U\u0018Ib]u\t@[#\u0010+1v-n\u0000\r\bz\u001d\b\u0010\tkI%)\u0006J^V\"ʹd^8p0edN\"\u0010#D\u0018QSSZD\u0019Yś\u0013\n9bvE+\u0005b\u0001s\u0010oE/i^%ޔ \u0013\u0001\u0002ץƈ\u0017\u0003cT7#\\t8W\u0015jMVOщh7#Kp\f\u0014#|]VLSǦn/g!\u0012+Y\u0017\u0006YYR'U\u001dҭb?<U)v-*T%؛-\\I\u0018p%WK\u0017.`HaZ)\u0016\u001e3(\u0014\u000f\u0013\u0017\u00015x#Biy]kܞKsQ!g/%rT\u0019lXrÒ0v-\u001ba\u001d:nE}DjI\u000f\u0010#\npS\u001346&x\u0018_r^ʥ\u0017!\u0017\fܛ\u0018$vn׭\u0001\u0002\u0010\u0003p\nUo.\u0013+ƬS!\u0019smpuvl0=\u001bu4~mM\u0015Qʓ\u0006\u0013+\n2\u0002`2Z\u0014\u0005\u000f^ǅ<1`\u001b\u0016m0L\u001ct]s]>%݇͵xn\u001e=z7h>n嵜-|>(nm۷um\u0010>[C1Mٷ\u0019\u000f>U9֊͛tֽuo\r0p[\u0000n+\rp]P\u0011\u0012O;⺨ޱ\u0019\u0006x\u0011!x\u0006&\u001470\u0006fE9\u0007刋n`q\rks\u000bn0\u0019=#\u001b8\u0016b\u001ep#(nAgOKGP|<݂Ɖ] S\u0000Y\u0002\u001b6ipCv\u0012\u001b(얬@eϳ\u001b(>l\u0014>i.w\u001fv\t\u000f\u0000-go\u0011\u0006\u00141#O]\u001b_\u0010+\u00047|}7Wh\\qx>{\u00040(:\r`sï*?7ztBg_\u0017n@[ѽսn\u0018u\u001bFVoE;Li5\u0006s\u0016\u0015o\nyU?-bPG\r\u0015O\u000f\u00154~+\u001e([\u0006NZGAۏ*\u0015\u000b_ߠ7\u0000z~*7R;p\bh\u0007G3Vxތո\u0011%n\u001byFԸhdkw\u001ay&j\u0004<\u001c!Go\twiY\u0011m!'g?gFǬ\u00077`D\u001bQ;b2o}NSn8!r\u000f4\u001ab78Me\b+#{oq,<]kr>\u001cvD#\u0018\u000fz5;a5\b']{\u0011Sv`ޛZ\u001cI\\ o;\u001c\u0013Z7Ϯ-%\\[_>\u0013\u001e^\u0001a>h_\u001f鵃3B\u0001no\u0015Rp{I\u000f4%\u0003b}$\u0007}]a\u0013\u001fwy??J^\u001a2M#cxV\b\u000eeMH\"0 m)Zl\u001c *\u001fv$4@[Fi|\u0019\u00117\u0011ٳ\u001d\u0003˳\u001dm:x\u000e8\u0015o\u0003JC/\u0018\rKq<\u0015ܙ\u000e$Ca)W<9_/#Bm\u0000Ǿ*\u0003'>#\u001e\u001f\u0016\u001f%\u000eTpX\u001dY\u0007dmXO4_IU׀<Q(S?o\u00067.Ƌ\u0011+򬀽\u0019B.˂\u0000\nrx6\u0011Ua\u0016;(I\u0007ބW}*$&UQOvts\u0011G\u0011ky4\"PT@Q4\u001e3b{}i\u001fUmѨ\u000f}B(#dNhE:L#\\qѹ}H\u001et h,\u0017~\ny~-O'Mvcg\u0013g3@0ÿl\u0014e\\5\u001aQӓ\u000f\u001e\u0001x?~vy\u001f\u0007~\t|>11ì6!a?wsm:\u000f\u0013?\u0007Fj\u0005\u0006m6۬Aûs\u0005N\u001fNVJ\u0003\b\bI\u000bڷ%D4K\u001afg\u001d`ia\bSr?QE\u0012F X1\u001f\r{Mis\n#`컰%A\u000bU>\u0014/-`m#_c/0x([Y\u00006\"Wg\u0015\u001cۢf3}dD\u001asڷ3_;C3B5{r6u\u0017\u0015\u0014\u0018\u0015AZ%Y\u0019=DZ<B\n$)l\u001cl(#ŵ&7\u001azD!ga/>#O4\u0004f\u0016\u0012{ۉC<6E\ru\u0018k\u001aQ8K2\n/5xijG\u0014<]{BwuC#UV5z\u001d]Ô!5l-j5\u0003fP~՘fMf\u0015\u001b3\u0019sT\u0012>\u0019UR#hdW\u0012n\u0011חsc;#\u00117mʸ1w_逩\u0014% \u001bOڧ\u0013:>ӫǩ몗G}|ϋ}\u000bWb\u0005Ŭ2 d\u0015؟}\\@}@Uґ\naf>\u0011\u0013J2]b<c\u0002,T\\MDN$-\u001a^w\r<+\\=\u0001ݪ4=DBҚ\u0003}:\u0002\fꅉK\u001dW<2\u0011h+]^@\u0011nPXQଇ\u001e\u000b{\\RTz\\{\u001ev/cc;i\u0000\u000fB8v\u0005d\u0010(\u001ee{\u001c:e>?{}ܙcs\u001f9W볼/]O߅\u001ax}ż/K%܂v\u001f=Z~\u001f\u000et>\u0014\u001f9̈́2\u0005X?\u0017Lj?cҏ\u00154[;\b\u00160?ۖu,D0Th-/cV<\u0015>.t\u001dƎ?)'\u001a}To*gYﲔ\nfGA~|\u0002!@![[4,.Pd\u000bOiLRjEEv\u0006\"f9\u000eߑK[W|R@@#Q@5!!#:sEܚ\u0006衬6\"z\u0005KL,\u0004<FDđ,Ɔ[T\u001eH'\u0002S\u001aY\u0005CEm\tj\bI\u001d\u0000h 'ŤLl\u001cz:vV5X\u00122\\q\"a4AbSt,3|\u0006iO8mB\u00193\rmJZo\u001dl8c],Y_!HL݇\u0003R\"\u0018R\u0000=\u00019!ԵO\u001cS[ A\u0004ǟfܺ\u0014~%v&fT\u001cc\u0011W\b\u0014^!f M\u000b\u0001:n!˹J\f\u001c\n\u001b\u0016?#\u0016C+\u0001T\u0018xlT~GO[\u001f`4K/\u00155Щ\u0016\u0001.7V|҈$\u001e ]f_\u0015$\u0001Q~Kڧ\u0017ޝ=q%O\"\u001f)4Q[*\u0003\u0012O\u0013?~0R\u00021*q\u0017<?J\u0011jB\u0017GI\u000eHkٱ?\u0019́V\u0002|m@\u0011g[2\u000bڋ\u0006bKߗto\u0015\u0000hN\b~|B\u0000t8\u0006?\u0011\u0016yf$OW3\u0002~X~(\u0001wK$?\r\u0017J )$\u00066c\u0001N\u0000\u0017\u0010߶\u001cL\u001dG\u000b\u00011mOɃ\u001c\nuZ \u00074*\u001a\u000bŘ56{4or\u000e,\u0004ro0\u0007\u0003\u00104!07ɛ\u0011wGڜ,%囒f%\u0014߈\u0007f\rC7\\T19AX\u0012N>Ok[d^鄄lV{h\b\\o+޶աQ:\u00002$D\u001e\u0002k_c3<OTꏢȚZioZh=]\b3\u0004\u0018ʒ:]\\7D%%ѿ\u0006A\u0000JF\u0016Ќ==1>^\u0001,\u001e\u000e ${m\u001fⷼ|\u0000mTQj\u0007\u00066k`&^~11\u000e\u0018K[\u00023yb{\\1'b[}SM]V0ʖ0UB>zub}0͒vυw\b\u0003lTG㿽Nre_c\u0004䩸Y\u00190Jje\\W\u0003A<$qB\u0007 y\nknu\u0002\u0005@f\nޯ \u000f\r4 c!Io\u0015nV'Zwu?<j4Y\r{ë)g\u0000\u0017wF-\u001agϛu\u0019o\u001c²\u0015V?򋭪K\u0018U@o\"\u0016=;\u0019dթQ-!=A\u000fi]'l8Q@\u0010cEڰo99L̮8'\u00102r_9wBBDc'\u0001@\u0002#\tYA΄Փ~s^cH\u001aE\b\u000f\u001cvs]=\u001c\u0011/Je+|D\u001a\u0007y\u0011\u0000]T\u0016y:2|\u0012\u0016y\t\u000f\u0011(ɱr\bC$fX%Or>6\u0010\u0002i>(G\u0003/4ω->81'<X\u0018Gw\u0018x\rۉ OjK\u00131:\u0011<|\u0000G/,׹e\u0018\u0004yyII(=G.9o\u0018ރL1n٩!y`G\u0012_|N!r8\u0006[zD2\u001f\u0010.؉0R\u0019\"&S\"Қd68\u0002\u0015HˑhP1;\u0014\u0004Ţyt\u0003fgbb\u0014{FHq0ϛEG2CVC}\u000fAK7-\fǟCz5ʲ\bLy\u0015#2?|^Yy\u001c\txd?)k16\u0006\u0010cc%^{%/y(kIU\u000b%\u0018ҒO4abBP\u00023\u0000ĖfP0\u0006+ZFc[vFj\u000f\u001a[T#6\u001a]Kם;U`\f+/e!\u000e\u0016U^?l\"\u0015l3Z޲W\u00027\u0007b2'Uي\u001aU\u0007\u0012h\u001b-e\u0015a\u0012M\u0001}Q\u0002_\u0007*[-Cl2\u001eli0P?!ձd=tJie/E\u0016v':EpI\u001b5!j8m\u0010\u001e\u000b^]\u000b\rVQ-F\n4_݋j\u0011.[.Z谘G>T\"ef6*\u0015轤\u0016c\u001dǱ\"^o9c/*yI-\u001e\u0017'E\u001d]k\fy)//fIk;C/a*,ƊPr+Ɓ3\u0012r+>\f\r\n0޿\"C~\u001fg\u001e,}\"-X\u001aY;\t,\u001fXfL-fcO\u0017[},\"\u001eZK\u001f kD[)g>Ȼ6\u0016\u0017P\u0010\u0017b'Q,^\n3.\u0007^X}3\u0001UߺX\u0001\f\b\u001d\u001c\u001eX\u001aҥy.\u00133m\u0005+.\u0016WRJdNKt:\u0005\u0001Ƭ/qE6\u000bK\r,ûw\u0017\u000b;S񡋅<q\u0005Ū3.\u0016p\u0010혙H\u001aq]_&\\;=o9F%n-E@/N졅S\u000f\u0011\u0003 myWx\u001aiʈӾ]\u000f^\u001eoպ\u0002S:WA*\u001d]o[\u0016N\u001e\u0014E%C\u000b/6\n\u0005y`-̺t\\yU~\f\u0013oN'\u00010Ynyv\t\u0018\bdǢZ~6Y}X\u0003A;\u000b[*g0\u0016@\b59?0KJ1\u0015H7rc<{V\u0019D8\u0007wbJJsO\u0006l?3.+4\u0019ofŜ\u000bۆؙcʌUAPS\u0017H'\u0017½Eb\u0015X@\u000bd,\u001bY5\u0013<8:\u0002UAqm?\u0010M\faE/*\u0018-zXjobvKHcN7\u000f7;I\tZ|\u0013w3Ǻ?|\u0013B\u0013^.\u001d\u001c(\u001eCCt>p;;=4Fo\u0007\u001fT%P{$\u0005$!(;Չ5zT\u0003IYƮx@a6Uu-;\u0015R\u0000.\u001aa@l\u0014ىm\u001b\u0017<\u0002\fB\u0016gyO\u000b\"38#z,\u0003jAoFړd\u001e`ʢٶa\u0018RؠM*yeKWklL&o\"\u0001\u001f27l\u0002J)Bqu(N]ߴ\u000bxC\u001c_U\\-\t>hxv\u0004\u0005$\r߁!泲]â}\"0\u0004\u0019DvaaZ\u0011ڐp`\u0014~R[A+\u0019:\"\b5RIX\"]wN`nua!N)3>,\u0018Kڞ\r.^\u000f\u0001dpkg\u000e=u.\u0011i˺\u0006]CN,E~*{`vRW<ئS\u000b<&\u001b\f\u0016\u0005b7\t\u0011|\u0003\"3b\u0015+)QBXqL\u0015MK%l=+g\"~PCZx+\u0001!+C\u0000^Z6b+|o/4}\u0016Cl:b.lQ\\\u000b\u000fNM\u0016`\u0015\u0017\u0015]B<5fJot\u0004o4Q!ݕ\u0010N@mJ(Y|\u0013QCH[41\u000ey%dC䕄\u001dSGݛSm\u001d3~ע\\E\u0005\u0010*\t%S\f(\u0007D;Hӓ\u001dAp(Y$Ϣ:\r<\u0018ņU\u0019\u001a\u0014;d63WKgA$\u0007\f\u001944\\=U섂z0])@&hî.\u0007\u001bT\u0017j^Ȗԭ\t&%\\\u0019^r@Z׫!\u0004\u000096\nSߊV/,Bjv.p&US\u0005~d6n\n^>\u0001o$坍\u001dX-)i%p\u0005f.%p'\u001aaTBzpdpP>\u0000|@5\u001e\u0006\u000f\u001e>k/5;\u001b,hB9쌯L'1\n\u000e|k~o^G7Ə`\u00064#G\u001b\u0001v%$\n\u000f\u0016;NM7p\u0019\u0001$\u0002  \u0011{#/*\u0001-.Iv\u0016{ō\u0001Ehn;\u001di\u0005\u0015EQj}Sc'ap6L%!r|U#6e!/\b\u001e7u#(2b'4ӭ5]S\b{K4r_\r3n,\fNS 7sIc]&NNvD\u0005Ff4Vc8D]h\u0007\u0016}\u0015\u00126w'LP\brB\u0015`m(FmKZ\u0017\u0011\u001cL1\u0002\f\b\u0007omyW=[z\u0007\u0004\"DC\u0018<sүVR\u001drL\f{\u0014K牗+s\u000fҁ㿿ž_\u0019\u0014\u0013\np1w\u0007U\u0004\u000fZMu\tc]\u0017X\bq~\u0006օq\u0015S\u000e0H\u001eR{y\u001c#W A\u0013,BPA\u001b^`;3\u001bÊSڽs)p2\u0017\u0010'`n\u0007\"ZQjbTx\u001e8RfK\fZc\u0017\u000f3$#U\\\u0006MQ{t̖Ckexp{lyt:Q!8K)w\u0017굄'S\u0014ĭ_m)D\u0001!\u0003<\u0014+-x\"{L{F\u0019^3i\u0012zWX3K1\u0016\u0011m1/mr׫\u001c8\"yn7\u0015&{\u0010}WWV]\u000e'$RGRJ\"5K\u0017\tԆ(\t|İG\u0006Ժ2'uM#\u0016\n\u001dU8h[\u001bI(0\u001eyzj)\\B\u0017.T;>n\u0015\u0013:y\u001f[i\u0017BDxBWv;ņ\u0012C+{e&jc\u00019N{ŭtn~ny\u0015xtc#=Pڍm(tlzc3_\r\u000ei\u0019<߰#{at\u001c4NpXwn<507Ⱌ{%af\u001d^gX\u0007a\u001dt\nrz-2\u0006sz7;-t}sH99tz_<c/3\u0017\u001ci\u001ai8U\u0017\t\\]`]4IdjK8\"2\\9~=\u000b&7'ZP9bG\r9l\u0018q\u000fK'9v#KvJ\u000f5V癚8h칧]FH].到G\u0006ўٚci^rK$'}?:.#u4#'޳\u0004V'c\u001f\u0003H_\u001c=wd\u000e5k\u0006^f\u0016\u001c(DZԟ5lz\u0010\u0001X*zU\b\\U\u0019:SBU¨09Yr\r\u0017p/$1+fS{\u0015,/\\!oUXˀ[\r\u000eWC\\<|q\u0000Y+{\u0010Wt#f:K\\u/x*N9ŗW\u0015V\u001f>N{\\RKӸ;+[qG\u001d^\b/xm$<}\u0011qsxXlmٵVڮo'x3=XMu\u001b\u0015{0_kSA׏s&\u0006ص\u0003vDgg\u0003u}Kfs,\u0016z:V]=oȮNs\\]\u001d\u0017\u0018!W\bĵg:P5]z#Z\u001b\u0001\\<\u00043\u0000t\b~\u00030\u0001{8܄Wȅ\u000b\u001ddc\u001b;\u001dV\u0000+!X*>+\u0019\u0016?5Z6>\u0013[:\u000f)݊\u0011\u0011\u001f&\u000b+8!^UD+.W\u0000\u001ck_JX\u0001bw\u0005b\nI{6_NYp\"\n:\u0003@\u000ekI\u0003/A9+aBW\u0018ma\u001c\u001a\u0003G΢TnK}\u000e9\u000b\u000eJ+\u0006t_\\\u0011鰧\u0016갫RC\u0002ȺJC~:<+\n;(';(\u001cĮPȳ\u0000ZvpiWw(}ߡ]#\u001eo{\u00141\u0019\u0017\u0001\u001256\u0002.}܃)e3f\u001e\u0011s#]\u0013ը̃\u0019;%t%(\u0000\u001bط)\u0010_NJ\u0018\u0011ɗY;SW=Em\u001a[w(\u000eX;\u001a\u001eS\r\u0016&\\T)캻u)`4Yi^{Bkѭ\"xkҿ\u0010{ϽC?P_zېu+fE7\u001bnѾ5?{~'5t0\u0018Q\u0006\u0003\u001a\b\u000f\u001d򉦌\u000fQ6R4Ld\"Df*WrsA)\u000fJ\u000e\u0014c\u0012N\u0005fGeD9H\"yYP\u0010G[Vi`\u0015ĝȽU6Q\u001a\u001a\n{m_\u0017e\u0018_U24?ĩ@*<\\\u001d\u0013o*08\u0014u\u0004rW7!Jo8\u0003,\r\u0013ۚDʵ Y\u0007W$\u000bcl\t\u0016$5\"nF|]\u001bauByW\u001dy~'[5oAj<W3_݅\u0016\u0006Poq+t*?\t:XeW\u001c\"-e]-\u0006g뻸/~u|CE\u0005rU/H8_5鸩>j7Psz\u000e2\u0003A9$A\u0016Rc#\u0003CNK\t\u0016rzy-\n\ra B}K9S\u0016ט˪!.J%|UVWOy\u0015R\u0002\u0004!U#V'9#\u0007\u0011H'\\JH:eSg#x\u0002:>j[\u0014\u000eC\u0001S^QLR-~?l_8L}] 15o_x\tl\u0012PD)[\u00065s\u0002/LivкK7\fE/\u0006$\u0007a*͗NSR$\u0016\u000bl\u0015 Hf4atڲY)u\u000ejPF-H\r\u0011~{\u0014$\u0012Z\u001bW}о\u001dޛ=>\u0016p\u0007MpE\u0019\u00159A(KF}^p\u0015p\u0015ϿUw\n^W]%8zX;Ŵ\u0000qϻjEʑ&g6\u0014?qrM{oq&f*8\u0013Y'YWq>v\u000f<\fVb_q\u001f&mۯ\u0011-Rs\u001e-y|[\\v{uq3\u0001!\u00120\u001d\u001423`\u001f'\u000b\u0013\u00140RZ`</\u0016#[(:iZH\t^\u001f[X;-1n\u0007pP~\u000f\"m\u0005j;\u001b.\f7x\nw[\u0001\u0012\u001e,\f\"-2MP|n(֫u2\u0003ŀV8\u001d_=?RX락w{26ɴl}x<Qq#h~ƫOATq5YD\u0006\u0002a i$լk$oK#^F?uǛAwjX鷔g\u0013\u0015`|\f%9k\"sIO\u0001\u001a-<;\r:\u0017obP\u000b3\u001e\u0018Ewn_y,>b%Qwsa_cK?B\f-Ֆޯϕޯ1-k<n\u001a½\u0014gfL+羯3n8K_kdEů֋7`R\u0005\u0004)D%5AvSa\u0016[$]k\t6jGXZ]c\u0013\n~\u001cwkV5\u0017x\u001b\u00016\u00006'?\u0011\u0002l9G\u0006:ta\u0002l\u0015≸]@Xh\nYLEu՟!\u0013|UA\u0001\bH~؎\b{\tH\u0013`+,<ړ\\ʣ\u0000[*֍\u0000\u001bA>>q?\u000bU \u0015\u0018yRN|2ËӘ\rv\nlK\tJ\u001b\u00056XY|gGO\u001a\u0006(R|\u0004\u0017c#}c\u001ee*\u001b3\u001e\u0003\b\b/d8Q1kÉ l\u001a\u0010\u0019?/ld]W;eD\u001eN\u000eE@/uB\u0000Sa\u0005o\nbA.\u0010j`(\u001b7xtD`Mw\u001fk.\u000e/I<\u0012\u000frj6s|D(q\u001c\fizPe\u001e\u001ePr9~+\u001f~\u001a-OrO\u001f?~/w\u000e\u001eO\u0007\u000b=~D:i\u0011\u001d%8@#qSh$:fDٞ\u0003\u0005i\n\u00146\u0004aH\u0013^KGP>l(\u0003(2Fm\u0007\n\u0005tK3Ej\u0011\"\\a4/\u000bD\u000b\u000b\u000eQG;M\u0013\u0011eH^(ʞ\"\u001el]PL=\u0000󵢸o<\u0016k7@1Ɖ\u0019\u0018n\f*ǗoWY8*3Xd|J2\u0013gK׳[\u0005~\\%_VpުC\u0013D\u0013\u0014@\u0010&#Lo\u000fh(5\u0006u\u0016OAe\fp\u0000L!\u0016mM_\u0019DK\u0004!ve˽e\u0002;7m1M8U̯޼dr:\t9(\u0011;Tc\u0007\"&@0DB`P@|:q[e\u000f}K(N&\"\u0017`\u0014\u0011UI:Py\u0013;}u\u00016RD5Ĝ\u0005O\u001d\bde!ǾSPc,\u0012\u0011#$\u0003DN$]P\u0015 =A\u0013YO\u0012T\u0003\"aM\u001c\u0017Ò\u0011RskE=\u001a!=m\u001c@\u0005\u0000\u0010sVC\u0011\u0014\u0010aF4_QS\u0001X\u0007!\u0005\u0010@'@v\tx.=}8Dϕ\u0001\u0001\u001c`\u0012|\u0018KW@ǝ\u0000j;!=Y<k;^\u0016iK\u0001HحT-F\u0006\u0016\u000e\u0017s_\"4y\u001c\u0016a_[%Dfa\f3\u0011\t`KsXDŲ\u0007|\u0007no\u0012H\u0015d\u0007ߜ}B\u00160r3P(M0\u0015dpj^5Fp\u0014\u001b\u0005\u0002+ASh\u0010,N(j\u0017V!'\u0004\u0017돑RHjT\u0012\u0001Df\nzB\u0019&Vq@O\u001f&xeC\\!ʗ\u001b)\fh4\u0000'p\u000e{\u0018@\u0015*\u0018{ThZ\u0003y}\u0004s:/о\u0005f)H\u0011\u0018\n0C|]H\u00037\u0014oS\u001a^,ïh͢\t\u0001%\u001d\u00150!<Q\u0005?]ào\u0002GP=c\u0012TY3(\n\u0013Z\u000b&ϟ-on2z&3\u000eWa]lڷ5Wt\u001e{2,\u0003F\n=:eJZP\"zCM/\t\b?\u0015\u0013L\u00014\u0004v[\u0018YJ\u0013S_\u001dy\u0003\b?f[\u00015K[\u0010+k,÷cW8riRI`80\u0019<9w\"PX!\u001b83rȋ]\n,N\u001bp!0q#XҐ\t7)\u000b\u0010Ȃ7\u00026c\u000f$\u0014Tb\u001aޥRĪ\u0013\u0007\u0018KW0\u0018\u0005j\u0007\\\u0004> #L*\u000b\u000f\u0000\u0019h/23SY֠\u0019\u0002;Y5L\u001f\u0015z\u000e\u0014c\u00042C\u0013\u0005\u001d~\u00125[\u0002ݝ<\u000b\u001f\u0010\u0019ˁ(9(D(/\u000eILsqL!ZJ=2sr@+\u0002\u0002\u001c\bZ4gl\u0016Zfm\u0001]?YG02`\u0010c6GQl2D\u0018=M\u00024O(\toM$02^\u000bvl \u0013\u0017d0\u0016x@\u0000v0@b\u0013[7G\bHZg)aq%r(:D |\u00002|\u00002Hڶ\u0015\u0007\u0000Q\\\u0004^4mԓ\u0019M\u0002L{d\u0005'C&\u0001\u000ffj\u0016-\u001d$!;Qĵ8`{\u0016\u001cCY[3@\u0016q48`$\u001a\u0015GlV?=\rnY\u000e\n{\u0014*t1XO\u0002c\u001bI\u0004%W\u0014\u000etM{R\u0017`,F$_H\u0016?@\u0003i&vbP{z̫@K\u0018*\u0011IZ\u001d\u000f\u0000L\u0003Xl['xQ\u000b\u001aT\u0007R$\u0006|\u0010>댚\n\u0005\u00065&\b\u0019z\t1\u0003jN*DRf\u001e\"zF=[\u00159=M\"\u0001i\b72oVQnT=\u00193c\u0011f#į\u000bn\u0011iO\u0000\u0012<}ϙp<ǅ\u0016H!愇E\u00057I\u0018JlӨ#s8\u001e91\u000bۑ\u0014\fWgԑxg+\u0014o\u0017\u0017b\u0010RbG4\u0017/W\u0010+\u00026!\u0010p*OM\u0018FA\u001b>aTYb\u0014\u001b\u0019pz\u0012Kهa:H̗Y\nd!kA*CI\u0010N#חc\u0011N\u000e\u001e\u000e\b\u0018X&HiՖbY%rf׷x\"Iq\u001bf\"IOQc'zH\u00152\u0005\u001b\u0010x$Jma4dk\n\u000b=аHd;+q\"rNmx*͈J-\u0018\u0010%HU,\u0014neS\u001d\u000b[sA&~U\u0013!3kaM\u0018`\u000e'*9\"ʾ)iђ@]㑚^-ZaDg\u0017 g\n\u001fC\u001d\bs\u001f;\u0006QR\u0019\u0017e\"Z|Ԁ\u001b)/7\u000ed\f[\u0006\u0002]hqMU9^GR\tjNĔmߤ~_H\u000e;J\"{e\u000b-\u0000\u0013#GQ<\b?l}Rdl+X\u001c0 jzSVi\u0001-#\u001e[Nha~L\u0014Yp{qGl\u001f\u001f\u001diٽ'QgWgPzP9i\u000ea\u0018]-\u0005Si0]\u001f%.\u0011k0\u000b\u0000\t5\u0006l?x\u0003E\u0005\u001et\u0014]ɜf\u0005#`L9mj\u0001x)\u0004'$3t2\u0006]~\"u\u0014=;\u0017i\t\u0019\u00185o\u000bU`wihy{Z$DI\b+\u0007LUJ2~dg\u000b\u0005B|0,=\u0002 \t\u001e@\u0000=\u001e\u0015#7(?3\u001b7y\u0010X>\u0000~I\u0015\u0002k7[\f\u0016\u000b?5 Ζi/D\u001a;X$\b5W\u000eC\u001apt ] S$Zs}0+|DD\u0005mG\u0000H>\u0001A\u000fQ\u0019'R=`%J>+$*Qf\u001f\"@\u0014\u0002ԗX\u0016b\t<<V\u0000KZfRoo\u001eN\u001fR\u001aDW\u001cQIyKf\u0004>\u0002/Bt\u0006\u000fs\u0016\u000f\u0000b0\u0013]֜P3XNܭ?7\u0019vµD\u0019&\u001daQ|UB\u0001\u0016V\r}\u0012-D\n?BȨR[xm\u000f[NJŀˑ\u0015\u0007A\u0006\u0010XSWZ\u0004\u0018X\u001a/kBP7\u001951SEkJjhG\u0002+NϾ\u001c\u0007\u001b7m}\u0000ޜ\bΖXK\fml\n!+\u000e\u0000\n\u0004\u0015\u0015h\u0007Ȣ4u]iʾB9\u0011 SPB`A\u0006\u0004i_\u001cyf\u0016\u001029ZR\u000fA\u0001F\u0015{CL^e4;zy)\u0015\u0001lg]=,mI˕2/q\"\u0000\u0014D\u0004k\u0001\u0011\u0013\u001e0=\u0014\"ga3Kh\u001aK\u0000ii~C\r\u0000\r\f\u00023\u000b_K䟣T\u001a\u0007\u0000HȮ\nU6\u0017|z\nK\u0015\u001ctWQ\u0001tW7h|3g\u001b&|M\b\\\u0013to$R(b|\u0001GJH,\u000fx:\rA\u00154* {KqI\u0017\u0017B;\u00107\u0012s\u0010+w#8kb0\u000f*\u0000-RٶBiz\u001f\u0005nޕS?\u0004߁\u0005\u0001\u0018X\u001b@jj\u000fqC&s\u0002qk3jx,=t\u00116\u0007O/[\r\u0003m2Z\t\u0015`M~8[\u0004P\u000b뤣\u0002\u00065i\u001a#\u001a\t\u0011\u0011FBކݹ$~\t\u0007\u000bh/Cc3-\u00168e^iB³!\u00135\fF>{b'yJ\u000eH#\u0015\u001e\u0006=K\u0013\u000e\"\u0016BP\u0019e\u0003f;!\u0003\u0003bց\r]J.%C9\r\u0006\u001a\u001f\b?m\u001f\b\u0000P@'\u000e\u0002|\u000e<X<D>\u0006ȗ[矄p1'pQ;EɖpFO'\u0003\u0013\u0001RjfO!<\u001d\u001dH\u001dW3'9[\u001f;̡2$\\GO:-&۽^\u000b-\n`{&Q\u0011^v1}&pb~t5ó\u0010\u001e\u001d\\2ڣ(A0r\u001c\u001doFW\u0019Ӌv\u00112@\u001agd1\u001av\u001b(S\u0002\f\nh%[w;}==GhqUn6viը\b1mE\u0017$\u0012m2$\u0017yWSjD\u001dZQoKB\u001b\u0013a\u001d]\u0014\u0018Z}0\u001bAbZx3\u0012\u001b7\u0000\u0001\u0011#nu%\u0019R&llϫTqi\u000esg6x[*>\fx1Z\nNS$\fkpT+\"YÙ5\u0006y\f\f>%\ny /\\1&,$\u000bv\u0017\u0010/M&v\"*?B,H\u0016p):ZqUԪP\u0007g,\u0019**vowlƈN{\u0019q=-CroR35\u0013S\u0003\u00126\u0002\u001ej_5|Z@P9\u001fLZ\u0007Q6\u0011%G\u000eU&EE]\bG,F,N6AM%a\u0019H:\u00015\u000b1/#Y$lX3\u0010KN-\u0004\\rt1$S\u001357'pZ\u0016+O}mFo?: \u00191w~C\u0015H7K)f81ircĚc&\u0010Zb.Oc\u0019\u0000T&Lp\t\u0003as\u001cŉ\u0007z\u001co!=`&ژz\u001f\fsp\"\bKf\nNj\nƚ7\u0010\fGB\u0011N#d*\u00001/V2Qxkq)[MxÈ\u0006_L:@\u0001U}rWF'OP|݌Kɡڥ\n3r=Y\u000bp_\u0016\n\u0007xJpE<?e\u0011lR\fmeor0y-+r|\u0019 4iKTI\u0002XW̕+dx+r⫐\u0018-2+GXG[^\u0011F\u0006\\o\u0015͵\u0019 :95fjǙy\u0014\"\u0017[a\u0007L\u0006m)8?bTG,\u0018ײu>C\r#g,uts\n?\u0019!\u0004o:RLȹ:\u0018j4!taC\u0015u\u0007Z{\nI\u0012ʗK7w*\u0013\u0006\u0017>#{6\u0016q\\м#)T\u0011'Z[,?ƒX\u001a|U{\u0001IB̭|C`\u0005\u0007\u000ek\u001beh\u0010\u00155Wػ\u0014b\u00024jDp\u0006\u0010p\"F\n\u0012\u001a\u001bK{j\u001aS\u0015\u001bM~\u0001ck}^\u001f,;\u0004k\u0013ZeZ\u0000ۄK1È_\u001b}!-/\u001dL wK.}RBN+CLk5 VShtmhApJ\u0018%6wk\u00039#Țn>?U\u0011M\u0007PKG۝uݽ#\u000f\u000fsog7\u0006?\u0006GuȄ\u001c&a\u0006\f­\u0001pס.7vZ\u0001 nK:$~G8\u001b@-8t^9j\u001cPY΁\u001b^\u0007\u0013r\u0016!w\b\u001e\u0001q )\u001cj\u001cl˹Q\u0007r\u001eAa\\LlkXpq\u0001\\3y.Drؾ\u0011\u0006\u0000\u000b]ph\u0001\u001e]9.buXK\u0017y\u000bt1C`_.0R\u0017O\u0004\u0003\u001cluG8KH\u001c%5\u000eώ\u001cwͲ\u001c\u001c%jm\u000f[SǉmvY犌gj\u0003;t7Ö<A]\t`A+\t\u000e\u0000O]Yãw\u000ew\u00157\u00033n`_qS\tb\u0007\u001b֪=\u0018Zf3\\\ryonZ\u0015ĉ+\u0006ѕmUэ\u001bYn\fg_\u001fu<FfvN\u0010m(\ny즜h7-}MJ\u001dE~7{o\u00125kpo_\u000f8q\u0003|&\u0001\u001b7Q?~*qi\u001bmNBd7ޖ>`MڅK+L\u001f\u0017ԤiUrTB_\u00149~\u001212Ou\u001a-\u0016z#v?\ff,,umFţ\u0007\u0014k\"_\u0017E@\u0010Ks|$%hwi=n\u0005݌\u001e\\M\u00154o6\u0015P\u0004<mZfq珚[^?ڔ76ݳ\rdw Hk+z/-\f-\u0015֭D\u0006pgEd-:T֣tEAذf]v;B$\u0017\u0002=\u0016Hh䳤l|\u0015\u0005~\u000e\u001a#\"\u0015\u001b~x\u0013J\u0016T?;)䳢ʼ*\u0002\u0000\u00108ۍ:\u001a\t\u001a[JnT[U\\D}lo=bl܉;ƺDڒٞ/_~StY;QqE'\tF\u001c䖛QkS-p+\n16GT\u0007{Z\u0006㾴rݵ\u001a*fQGC:\u0002M((-?-NMwi7\u0003f\u0016X\u000e?\u001e|A~ŵm\u0016s\u000fۜNT\u0012\u0005~\u0016P|\u0012\tNy/\u000f͵ۀNTh\u001ad;MZF'RP̃̽{\u0013mgkN}'?O7)\u0016dW0b$oW5[܎` \u0012?zşM`+]a\u0014jzP쎸V~YK\u0018w81IdF~i2Tsc4\u0002sK)6j(i܋u7uS\u0004C-u\\\t\u0015y\u0016ez+\u0012a*\"5*\u0004\n\t\u0012~=)!C\"6{ϴg{@\u0000HMg|Ѭ\n:OP\"J&\u000bA\u000e\u0000\u001a\u0000)\u0005~TF\u00166\r\u000b\u001dR#R\u0012Ϊ\u001cꞖSGHDslUY2,8\u000e\bX9j\bV:P+Hz#S\u0017QxBw\n|q\u0000D\u00153\u0004~Or\u0015#S\u001655\u0006\u0011/D ~f%>Epk`2,>\u000fB\u0006\u0013e\u0003庻tvl\u0001E\u0000*oQm׋^ԣt\ne=o=?\u0014b\u00151K[\u0013\n/t)R.S=?}+\u001e3jK)\u0011m^\u001c&\\J9<|\u0001\u000e+jE깗mpn>>-N\u0000ET$\u0007l\u0000-r\u000e.bAu=\u0003\u0002\u0011>v\u00160ΐ\u001d<Q\u0014Sw9~\u001fp\u0005\u0012͛\u0005:Έ\u001b*\u001b\u0002\u001a2\u001ey\u0003\u001e/On:I\u0010\u000e0x0P\\$\n'5\u001an:ݷ6\u001a;_\rth\u0002\u001c0o\u00037u\n\u001a5UK8$9i\u00002wI-L&nAC| A)A*b0[?aG\u000eS٪AI7sKCGȰ95,\u0001c>\u001a\n\u0007s\u001f΂$\n\fۀ9L\u0011\u001aV'f6'Zպ\u001f\u0019\u0006]__\u000b\u0011kZׁwqu} ]ִwscgxaݓa\u00070qF\u0010e4%KwPb\u0006RS\u000b`-b2Rs1{\u0015J2wWd\u0002[QH@u\u001dT;IF\u0005Xe\nܙ[&>>Ox(ZKS!\u001arnct+*Ųf5G\u0004P\b!q]N^L,8\"Gxa\\\u0004\u0004h!y1N\u0011<SECn\u0005\u0001\u0011x3\u0002\u0007\u0013?BqbQH;\u0018Π\u0010s/TQ4ܹ)f/\u001f7\u0012~<Qsb7\u000fvQ2G4c\u000fkH$)E\u0011[8\u0019\u000b\u0012}T\u0001!k̠\u0003jжQ\u001a4$v\u001dc\u001a\u0004<+2(!~ya\u001b\u000eҷn2!w}\u0002i čC'\u000bҀG\u0017\u001eԩ\u0000#,8m\u0018h[S\"\rȃрrBhX[\u000b%^\u0003ƣj\n\u000bT\u0010nDf\u0012\nQ=rW\u0007$\\e^%q\nWdO0q\u001d\u0011$\u001fKx\u0019\f\u001d\"\u0007{D\rvk%\u001cv8$)\"6\u001aԁ\u0018R@bO\u0016i%8\u0017o=&hEl\u0005W?\u0002=0hF:i濔\u0013\u00158^\u0010%G<fC\u0003\u0007@d:\u0002N~m2\u0006:\f&\u0016\u000e\u0001ӻoŗ\u0017\u001f-\u001e#YA\u001cL2A_to\u0019%Ψ\u0013\u000b@\u0013֣Q\u001e#\u0017vh\u0011\fVdY#G|?뛕4c@<~b{\u000eiuЦ\u001d(p\u0001Ay桔%t\u001d*l=!zvX\u0002g\u0001#LT ڨAmz\u0012%m\u0001~\u0018+#Sl0\u00067Uta\u0011\u001f@\u0005>#\u001c\bϘ4\u001b̈́\u0015e\u0017cV\u0004bJʽP_i;\rCazVz\rqHP:j=WpF4^\u001a73\u0007\u0011D\u0011Ij\u001d@pn&\u0018C;\u0012M\f *D\u0011&.iN4ͷ.v\u000e\\WK\u000fi\u0005Y\u00060\u0010\u0018\u0018$~ʹJ|cvmIi{\u001c\"z\u000fgACSS\t-?}\u0004\u001f\u0005_Rj}L\u001c`%)k\u001d\t\u0010\u0000c?#0|J$J\u0005\u001dE?/\"1V\"om'asy\u000f\u0017֛A\u0013%\r\u0003:ZP^BZ^fil-ռH\u000f15c)\u000f\u0006}f\u0012;HN\u0018%ȡ7\u000eWJ\u001a#@s͒\u0003*[\u0001\u001b>-%[g\u001e!\u0004kݷH)\u0006?\ny\u0001v~ݟFx`\u001a\u001dBW2\f/,[$\u0014o\u00167ݸe?_m}o%Q-QӨ\u001c\\nD\u000623ˊd}i$?TC\u0011T\u0002T͚b9\u0004E!Nc5\u0013#\nHd\u0018MAO\r\u001a]}@\u0006\u0010K\u001f$^`v)}2Ҁۑ\u001bseH=\u001f#7UB\u0003Pd1\u0004&pJ\u0005(\u001c\u0000|'9(Q2\u0018fW\tBqNl\u0005\u0004AKh2ҕP\u0000QT\u0013-ƗjgbLfe%RO81籷\u001d\u0002j\u0012I\f.>!z΃X\u0013_Z\u00101qH.D'\r,\u0013he\u0010N\u0013ƕ\u0012MM`<vm.~\u0011LKN\u001cUbے/.<\u0003]\u0001)8,\u001e=@L\"VB[F&\u0011u/\u0014q\u0016`q%+z\fJqyN9H\u001cn\b\u0012\u0000\u001f\b\u0015.^J\u001f\u0015\rL MToutKȭ~JG%!̱_XB%'%>\u000b\u000fr\\-\u0011Hkq~\u0005X\u0006@\u0005@\r\u000b1.\u001bb5w?J̈1@fb\\\u00036ZY*Wo\"\u0005$]K6k\u0002\u0010Peէ/W2r(ar\u000f3'87%9\u0012%EtOuA[\rX׃O\u0013L<\b0];ƧIH\u001f0=Z7>͂b&\t/Y[|riyt\u0011ާtM\u00056Sz(\"ȳ>95Nt\u0004%gni\bٛ\u0004+ΩQ(C4P5zqj{V\u0017\u0006\b=]Ԅa\u0002B,>85\u0006@\u0014\u0001\u001a3y(F\u0004g\b\u0018<c/{gf\u000fg+N\u001fu;3Ư2ʿl\u0004̾Bg{\u0015lUޅձ}ï+\">Ӑ,銏>Q|m\f@f#QfJ\u0015\t+a~σm}\u000e_^B>}|0-\u0013h\u0012\u00131o\u0014\u0013c\u0018Kp{\u001ee2\bE\u0019!3\u0018ɐwk\u0000TGT4-F<׈\b3~̶\u001fjX@\fmV$Js\u0002\u0001\u0000\u000b]%fK=@`2\nLuNkGЍ\u000bˎ\bV7\\72'?XP\b\tW5_yU[\u001dĳ\u0000\u0011@R\u0011oD&\t\u0004\u00004Ao`Z34\bO|\u001c\u0007\u00104Q@W)\u0000OG'FB[gb\u001e}\u001f\u0019fNaՕe:j>$voߩS1:\u0006\u00170\n|\u0018~\u0007McS\u0007\u0002'\u0014\t8p\u000e\u0016\b&\u001bO3ӌD|mF\u0012\u001aauv\u0005@\u001c8U3&.:\u0015\u000e$غ(\u0017r)\u000fw/ADJ]\u001bqm*lH\u001fu\"d\u001f;=\"Ĕ1&\u0005F\r7\u0003Hx\u0016͆\f+y3:}|ߏ\u001bP\u0006ޟr3H+}V\u000f=RhKGoZ\u0015;\u000b[vB\n=FB\tZ?D'l>7\u000e\u0003xL0vx|\u0018\tu~\u0004Ǹ\tB\u0013o]\\caxZ\u0015H'Ͱ:\u001a̓B\u000fu\u0000\u001b\tTS\u001eQ\u0004Dg\u00142!Qg&9O!4کЈԒ'_-\u001f_\u0007\u0001Ŕ\u0011#]1i_amy1g{\t^+\u0015 \u001eV\u0000\u000b\u001cM\u0012\u0013\u001d$\t hG0\u0012\blof\u0001C/_$$NԽ\f\u0000<DXny\u0017H^.!5\u000e&6OΎε\u0007Nyl\u0003u\f:[\n\u0002`(\u0003E1T\u000fz6\fFuPoD\u0005л7U%g0\bDP{-rZhY:&Y@iK\u0015c`/(JlC\n\u0015)\u0007\u0018\u0003&4W( gJvfJ\u0004u\\~>i+]9ΤD\u0007ƌvٕ*V!\nsI\\&|\u000eUm\u0018REK\u000b\u0012W\t\u0001$ZePȪ+>+r\u001frġ`\u0019\u0005(\u0001^\u001e\u0001\u0019y\u0019G9YiCs4{*!T0\u001dEd-\u0001G>p/BI\u0014C\u0004$<bD\fY\u0003\t\u0006|\u001b?E lh, \u000e\u0003(f\u0019Y\u001f\u0019r/\u00124R\u0004\b\u0002/\u0019C-\"&E|h|iZ^ib\nl'\u0003Wȅ!t\u0014̢v\u0012\\*l.U$#JTUF'&\u000f&n\f\u0017\b3+~\u0014~\u0004:6\u0004\u001cD\u001cؾJ_+sMH.l<5D%2).arJ5\u000fVHBpk4[ǣ\u0013·3W\"@ҺJ͒\u0016\u0004XҙHHSI\fz\\L dF`\u0018\u0003\u0003+$F\u0017D 1(OI\f1D$\u0006\u00055u\u0016ό>AF\u001bYohC\u000ei%z\u0014]|Of#vA\u0015$$3R_9\u0018χ\\\u0006=By<\u0001@\r2}yD}.cJs\u0002>\u0000c)ۘ\fK\u0000S\u0016s\u0014\u0013\u0019\u0006j=U\nof\u0007\u0014DL8DF\u0003uinsX>C(+Ql3̓\\\u001a\u001dh8[\u000fF2~@PF\u0007P錹B0\u0003\tKP?\u0006\u000480eo\u0011 [+A|\u000bh\u000b'\f[\u000b\u0011d,7.g<Af~m\u0005\u0017d+*-\r\u0006B_`F\u001f\u0002y#ha\u001eNslUp\u0016^Lf\u0003\u001e.gQb\"^w\"\u0018@b\u000f31bS)˦c\n\u000e@ 5j\u0010e<\u000f\u0017\u0019PB,2d\u001a:@gp\u00174&ԧP\f\n4\u0006N\u0013]ʹvY\f\r\u000bs!*\u00174.\u0011s!\u0011d:@\u0001\u001b|\u0016;,&}ͬE%̉\u000fY\flY\u000e>&Qu\fL\\ObDH㇙\u0003X6P\u001cbg4~fݑ@Nʜ\u0000~n^D̅\u0004\\\u0015⚆'6*\u00044F+\u0011Omp\u0004!\u00195ah2OQ\u0003L\u0019nH|Byk:\u00172Z\tk:i\u000e\u00145{:#,6CLN.jtF,Q+\fN8.\u0016n\u0019x\u000b-J\u0016fF\\:C]\\\b\u001e\u0019\u0016@x]\r٧3I(kb\u001c|}n\u0011!\u0006\u0002\u0001\r\fJ1\u001eB\f4\u0011\u001eR\u0011!\u0006M`i=Ā}\u000b\u0012!\u000b4{\u0011.\t\u0002Ma'^\u0001\u0005\u001aDe\u001et*r\u0002aj\u0017\u0007\u0014tծ>Q\u0007\u0014w\n\tqmh\u001eP\u0016a\u000fJ'\n(\u0000\\ڴ*n.\u0015P;\u001f^Z\u0001\u0005|KԀ\u0007IՊ(v!\u0016p\u000f\u0002\u001b\u000b\u0017-T+@㴙$D \nxL{ \u001e\u0010\u0005<\u0015$H&\u0006k!\u0012\u0013\u001eQH\u000e9\u0006}\u0005Q\u0013\u00199\u0011\u000eZ[\u001bDc\u0003-Ͽ\u0006Ze\u001e\u0005?:\u0000Q\u001du\u001d7tn\u0017ᇮ=^\u000f+-x\\!\u000b/%I/},1\u0005\u0018J&V\u0013E|D\u0016Y<\u0017;?\u0005\u001cr\u0002/5a\u0010YL(mbq$,aڡIn\tLZAv\u000f`k\f\u0017Ͷm\u0013](r70j7SU\u000b[&y\u001ak\u0012 \u0019c`\u001fo\u0007^I@/nZ$jv5y+\u0003\u0007#m\u0013oD\u000b=H\u0016#N=\u001cED\u00170G\u0002Q%JN5]\u0002]{$Mjz\u0015%\u0016,\tq\f.o\u0016\u000f-\u0001\u0017'Z=P\u0011o'\r-\u0011fT@Kp\u001dݒnIp\"\u000eQȭݒ=uKx]tIDmYV-y1\\ѮwK,C\u0003HiB<M5CD\u0016&N)$jm\u00049&\u0016\"/b|4c;O`\u001atGצI %b\r\u000fM@̐prci\u0002W/7ɯf\u0019aC9_\u0013L\n\t\u00040.ˑy'z٣<K=\u0016Ճe>\u0012Rd\u0011̋}! EٻU\u00138Tʳ=lΞ5\n\u0003t\nRTfn\"$`\u001bU)}\u0003\t`kW'c`?^`^lY8yq5WD\u0011ʶ|\u0012I$P$#c.\u0002.\u0012A\u0007t\u000b\u0001\t!ˤS6;Q\u0000\u001cz\bkWwL\u001f$\u001fg׹غΤ\u0005\u0010(wwF*O^\u0012O\u0012NA\n\u0007<(&\u00154[f\u001a$\u0000ءcݪn^Ul:\n8kq\u0016-cBϨ᪉ڳ\u000b\u0013\"{s4?\u0013\u0018sr2XnæAcN\u0019\t,[`\u0007\\lS2\u0011\u0017Gt =6aW1\u001fa1,\r]\u001a<\rx@I Vb޵\u001d]O2\"aےrI?J\u000f|C\u0011\"8|QF\u0011\u0001-\u001cl\u0013)3w\u0011C\u0016g\u0013z/ |i?.\u001c`\u0007f?]7J+L3ecOP\fB*ZvB[\u001bZ<}9K$!v[\u0010\u000e\u000fH-?20+i!8M\u0019QO#\u001dd%\u001fGgf\u0014\"^\u0018\u000eX$u\u001eӑ):hCm\\\u001a\u0019c\u001bD*ZkQu\u0005*\u000fm\u000b\u0000ܘY\u0002.vI\u0016άi\u0002].YIuߡ\f9\u0018!\u001b\u0003\fKh\u0006\u00109%d\bÓK=H\u0006U|r'@[\"B*\u0001<\u0018\rܫ\u001c8\u001fFM-~Vg\buv_?\"ݨ`i6y\u0005wب\u001e\t\u001aƕz3`8f=%bdH5Xl=\n\u00029jBC4\u0010\u0016ͩBU\fĢ\u0018Xf\u0007Z̐+b\u000fҠb̃1 堈\u001fNUK.bcj0dv2\u0015\u001ekf\u0014\u000f[2\u0012bӲ\u0011=f@\u001aJER\r-S\u001b;g\u0011y)nPS80\t>U`\u0006\f\u0011K\\%\u0003x8\\\u000en/.\b-؃\u0003DE\u001c+'SiG\u000b=0\u0003%']<bC;QW$1sy\r\r#Jv| qYdWY\u0003Cu\u0004l\u0014\\SB-\u0005\u0018A=\u0006\u0003i3\u001dP_%1!GX\u0005(\u0013ZxG\u0006Ku?Ϧ\"\fP=bh-$})ݯ(5ClAm#jW%\u0015c\b&\u000b%Y2g^͆\u001d\u0018bt1PH\u0004\u0003,!\fx\u00184A(l`\u001eqc3\u0007\n1\u0001L> t)\u0018)~\u0012G־]j]*B%/\u0005# \u0001|Yp\"6&+R \f\b'\u001a\u0006\u0006l\u0019\u001a{>\u0016FLŲ\u001fn=\u0017\u001fo\b\td6֮]ݤ24\u0010Z\u0017BcbB\u0018UH\u000b}Mb\u0005z#W,Dؕ#X\u0006[\u000b]:\u0007\u001a\u0006suW\u0010\u0014?4ǗJ\n3/#W\u001fRf%}\u0019ϘU\u0001\u0002\u0011*3\u0013#E\u001bN\u0010|ML}yx'lSB\rc\u0011vL2*\tbPtJ6\\8u3\n^G\u001c\"O\u001f<\u0017_KJ\\JGN!V<pt(ȁ\u0012_r\b%\u0014?\u000f*Ʀ+\u0000tM\u001fCj8^QZv\u001f\u0014\r;@=EъX1D\u0016Thdjj,ҏEjN\u0019ג\u0017h\u001f]\u001f\u000fz\u000fK)\u0013,fgQ7Q^7/bSͥ\u0011[wG\u0007E\u0004^\u0016S.\u0011\t֪#mߺ#Dp/C\bG\u0017C%`wl\u0004%\u001aXfPcV@:lb\u001eea@2\u001at\u0019\u00066\u0001(Q,1\\\nða4\bM\u001e\u0010~\u0014ay{-^\u0011(N4t\u000e\u0000RЎgY\fS9<\u0019@Q4r\u0004oT\u00029H=Xbv\u001fE5\u0018;kK\u000fvWM\u0017\u0014':`f\u0016J\u0005\u0010L\u000fNDO\u0002\f0XWod+C\u001483n\u0012Exp\u0010\u0018/ls\u0011!pzhѿt9BODٲ&M:}|\u001410O[׵\t\u00169v\u0018#Ѷ`G0\u0010#6\u000bpNY\u0007HX\u0003 N\u001aSߒ f^V!h\u001fq\b5j\u0005#Bv\tqx\u00148\u00008a}<Frn+\u0015H\\HK!0 iLY\u0012\u001a%Gٲd1\n\u0018;6\u0011\u0014C\u0002\u0012\u001dkSs\bR=CnDI:\u0013^ed\u0002\u0019xT\u001fR\n6WĔ\u0004N\u0000\u0010K~#\\\u0005\u0012O=?\u0002e!\fl\u0010R*o+\f\n\u0011ޏaڹfj\b\u0004GBBe\u0010|\u000eJ\u001c!;P\"r;+f\u0000|]\u000es;1*{F,A\u0011OP1gW?\u0010?*\u0015'\u001d~LY\"\tnx,}6\"4\u001aj_`\b\u0010K\u0015\u0006\u0016\u0006->Q\u000f\u001c\u001c@o\u0001/4AǕ\u000f T\u001f\u00002_J\u0014v\u0019{\u0003ō\u000b\f3\u00196+57ѫ(\u0006lkl\u0017V}\u000f2zՉ\nmox]\u000fқ \u00120(\u000fu4vX\n\u0016 \u000bfo]\"&'lr6\\\"(VZw\u001a\u000b_\"*\u0007psH\f\u001b-4\u001f̩ҹz@u\u000fU$kM\u0019$\f4Nɖ\u0017\u0012Lm\r<\u0001I}b_ R뱒J;\u0001S\u0015Tg\u0014w%s>.>Q\u0005\u0011F/4Ie7\u0018 v\u00188ңHQ}B%zY&Ss%\u0000Ju}\u0017>r\u001e)ho4?C+2mo\u001aA\u0002\u0001b\u0002¹i&I6A@|Wj>\u0000a'}p(s\u0012p7WI攩\u000e\b҄ M2SJA|}hx\u0006:e\u001dy\u0004l)k##<j462GK.3ݽ3:sL\u0003iXil\u0013\u001f/\u0006.\u0007e\u0004M\u0012L7Z\u000b\u00038?e6\u001aD\u0015^\u0012g\u001cY//\u001dw\u0006\u0005`\u0010\u0004N*Al\u0013\n~`m՚)\u0016F2\"+\ri7TI4O@3_\u0013/z_I_{\fɬQ\u0015YPZ^JK`\u000feyR\u0016\u001cwX^/\n\u0005^(4sKB%\u001fioU/\u0011\u0007\u0000%9D8>7ދ\u0007O\u0017}ͺᑢH8inuUyѸ\u000fs:\u001f~\t3Z\u0000\u0015\u0019,\u0017 84Yz\u001c˖j0'NJ\u0006O\\i\u0014\tt(NЯ\u001f\u0013nk,Wm|V\u0018\u001aT^iͻ񓆐ta\u001bCH\u001f\u0018d$k[bs|U\u0011ۚ,1r q)Tb+$|;NgW\u0001>\u0018,ɲu7ċ\u0004}8\u001cF//&b\u001d3<\u0014f\u001aJ8)RQyY%~Iȶ\u001aCco)\u001bJQ5U\u0016#v!>\n'c]0**)ߢ\u001aXd|\tc\u0013s~.2\"k*5\"=U\u0010\u0010=\u001asșڃ\u0002hkg\u000f7\fw\u0013/\u001b_M&A5\u0007#}뀸yX[0@k\u000bOd4w軆Эe\u0006\u0013\r4ͼ\u001b&\u0000\u00181^2\u0018HL\bGt\u0007\f2H,\r-RO.\u001aи-Ԡ\u001cri\u0014l>\u0012r\u001d4nD\u0003^XRDry\nH]9;bKr9њ\"\u0018M\blB\rrT]\u001f>G;\u0010E\u0000Lh>T_i\u0000[\u0005ގ22\u00017\u0001c+D\u000f\ba\u0019V\u0017u\u000fW\u000e\u0010Y\r<|9\u001d$ߢWJV\u0001OhY\u001ap\u001f\u0011\u001a\u0017du\u000f\u0014g\u0016\u0000p:}[\n5J\u0004<2WҨ\\\u0010c'|/z\u0019w\u0015u7\r.ڰ:ZҮ~gw#\u0002\u00104X\u0018\u001a OIq)\u001cYK̶\u0005\u001baraS\u00020!\u00012N{vBsC\\UUBGqe+|,KS\n\u0001s3k#`\t\nqJfADB4*s\u001a3u I|\u001ai͢\u0005gTŶfT\u0018Υ\u0013\u001cEԇ]D\u0006\\*X3и>\u0017\u0005\u0010b2\f\u0000M\u000b]Nr֖<Lb,W\u0012A4X[pO图div+dh\u00162ìYAM\u001d]z\n\u0016\u0010F/ɴL=\u0007_[HkX\\\b\u0013&\\ɻ6\b\r﹞*D`\u0006\t<i\"\u0007rڅMUCF\\6K'O#y\u0006,\u0018*#(E\u0013-\"Wb\u001d4\u0014':\u0016\u0018\u0003iĢt\b&n^kY\b@\u001e8k\u0015}-תi#l;6\u0001-\u0004պgv{\u0012o1*31YѦ\u001elͿ[\u001b\u001d\u001dw\u0005\u001a\nW\u0014ÂY\fnᭈ\bvWh&X1\u001a~70{#:~#;j\u0007VĊ$\u000ef\u001ct-\u0007qoEmC\u0003M\u001bDj;DȦՋ8hsD\u0013Zwd\u000e5Cu9\u0017a{_pfΩ;\u000b\f\u001c-p9\u00178ܝ\u000bn\u001co\u001f%M\u0000\u001cvEj\u000e{\u000fV\f\u0017\u001dч+Ŭ1].~\u0002\u0018G]\u001cp|Y]^0>7Y1$ǁs]p.m\u000f[S@QvY:Q\u0007^Z\u000fm9l'%\u0013|P(XPpj\u0000Cu\u0014\u001f%\u0018?\u000b-Q\u0002W\nr\b\u0019U(?\u0016t\u001412?ձdZ#&K~De-\u001d1dueƕCݼ+\u001b\u001cr%]7|4sfi[:#Ok\tڏMel?񭵰&\\Mލn&5\u0007X`qN?zk\u000fm/~zpm\tĵ\u0019G\u0019]<D ɽ\u0005</ťLYS\u0006ap\u0004k\r~\u0004T\u0017k`XM?%g\u0016\u0002⻇=$m@\u0012\u0013;v}D\f\nU\u001c\u0011D\u0005X=it7)7fjnp\u001atn\tU@(m{4kگϴ6ۿ~۵\u0001߇sܷY;`{}l\u0004~}\u0004FW`_[4+o\u00150\u00177ơ\u00138ш[?O\u001a\u000e+}\u0014\u0012xK᛺\u0016AZօ3( X\u0018\u0010\u0011/3nsMׂHb\u0017zⶈT@Ū\u0010@?\u0016w\u00138e\u0011Rд\u0001\"h<zX\u001eㅸwyu`h4\u0002ꢨX\u0014Uj\u001b\u0014\u0014p2s- \u001dV\u0005hG.\u001d}{çr\u0007*)=/-f\u0015r3!9efk?\u0015r꜉\u0016ǚU+\u001b\u0006)s\u0010Es\u0012\u0004@}\"-K2\u000e[AXW__+Ώ͚B\u0012L\u0001\u001d$\u000e\u001b\u0005&*Y7\u0000l\u0010ޠ5ۿ-\u0004.hG\bkF\u0003܉\u0010K\u0011\u0016t^e\\\u00068\u0006<\u0016dNX\u0016'q5rqv1_~_5\rWǺy\u00187QBs\u000eqXMR\u0001 -L=>\n-q\u00195\u001c\u000f\u00170\u0015n\u001c6?[6\u00115k\u00141\u0004H:\u000eIk 8ɯg\u0018Z\u0011\u00032ɂ\u0010ߛyoy/ï\u001a Du.+\u0010\"X(C\u0011En~e \u0005\u00069R\u0006\u0006QN7K\"?2\u0003; p\ttן\u0017D\u000fJc-\u0000BE\u0015\b\\V66\n\u0018~--\u0004\u0000oG\u0004s!ǐb=\u0015\u0003^@we!tӅ\u001e\u0019di\u0003:Bv\u001e\u0012\u0006\u0011 ۬p^Ă\b\u001f\u000bλ>\u001aC-8\f#y\u000eؼ:SĘ\u001eP-\u0015[L`-\u000bV>Yܹ\u001dWlз\u0004W'D\u0010ۉN/\u0016^\u0003;Ѽ3(3O\u00014a;EYInN/ަa39Vs(B{\u0013HDD/OƸ3\u0012E1Op\u0012,\u0018\u001bG\u0016\u0004Ei7`*'zgȾ;/]\u0005.os\u001ee$<a\\G\u0006(dvz,\n\u001evkĮ}\u0010,vsfŸ[2(Ux }oPmfuR6fB\n`eX<@\u0013Ėw7/\t*'yD{\n8,L\bA\u001f30\u0012>#U'N*yΉ&+A/\u0004a)E\u0007F\u000eYsPvM=j7\u0000\u0001>x37\u0002f\u0003\u0019\u0010\r\u000e-C\u00117]J5FK+ Fo\r\u0000\u0015\u0012QN7Y*k\u00012R\u0005#@\u000b\u0019:qڳc\u000eS'=\u0019twt\u0005g2-{\u0015\u0007N}խ͕:rխPE\u001c~:\u0017l>\u0002g5%_O_`2i'O/m\u0004|0\teE)jo\u0019\u001f\u0005\u000eU\u001bXj}r_3ӮajZ\"??g\u0013۱r\u001e,NTñ:Q\rrE5,#u\u001avUq:MIjq:%q\u000bE;\u00144\u001cNAqܮ\n\u001a)hn㻝\n\u001aIiinuZ\u001aiiInDZ\u001aiin#uZ\u001aiin']E5\u001c*NvjjdNRÑ:I=٭pdSRcr~I~,J.G\u001aL[$\\Ӄ94\u0007\u0014>NȜm3oR^\u001c2#\u000e=f\u0007g9\u000f\u00123\u001bUf^eαt\u0014ƥF<LY\nϟgM<\u0000\u0010(oO\u0001Ƌو#\u000e#\u001fvt:\u001b\u000e\u0012\u0015x\u0002\u001097׽%$I:]\u0010f\u001bs\u0010\t\u001f#dR\"ԻN\\Y*by#t\u000e5\u000f9GY\u00060\nJy=̵e7lt\u0003m\u0017<_\u0018Z1xPUN<.\ni\n$S9\u0019~\u001bM'N\"\u001cq&$.b\u0010\u000b0J3|n??D\rM㚡b}\u0010C\u0016Ϊmtw$\u001et7\u0018\u000b\rIk⼛J\u0011lW\n]\u0016B?\u0010\u0002<\u0010\u001c?\u0000Hh&sri,^w\u001fng[G٢e3_2ͳ\"EsKX&^g\u000f\u0016AZ\u001f?\u001dvE/E/E'N&);A뜠ɝNn୓:U'@N'9C;\u0013B/B/B^'w^'wt^0w\u000br\u000br\u000b\u0017z\t\u0017z1\u001b~#0w8ç*\u001bz1ݯtǻ\u0004/-J\u0011$7lkBt\u0016NlvsOJѣ=\u001bX\n\u0013OR_)n\u001fm*\u0012YJr\u0019\u0014FHw?-\u000b.\u0002\n]8CƿCO\u0016V]Q,\u001a\u0019b\tcN]1\u001f?SeZ6S\u001buE3\"^\f>}O\u0012a\u001av}\u001e\u001ct\u001aNUʹ*A\u0012!f|FUgnR{T\u0015\u0016QY5Ķ\u0010b\tCgqܺ85\u000eX67(g$\u0018|\u0012Uq蓌NT1\u000f\u0010a6\u0019\u0011a-\u001f ^T1q)mD\u0015Q\u0019U3/a\u0007[XL\"\u0014㒼b\u001aX@\\\u0012oL)v#@5=+!҇\u0018p⊌u\u001d=yqf_i;\n\"w\u0014\u0015L=%(5b\u001dg瓪(qv\u0003s\u0016Z`\u000e?/oG|\tV\"_\u001fW,ڧ\u0017\u0013c8\u001dhə-j+1\fd\u001f\u000b\u0012\u0016)0\u0013ɬge3\bVΌ\u0019H]\u000b\u0003haُ\u0018Y`ɌYW[^ziB<vZ\u001aJŬѱEA¼Z}\u001e1kڬ\u0003]\u0004Bĭ7i[C]8\u0015M(h\u0003^0\u000f0\f+^7+\u000e=Ӈx)e\u000e~bn24\u0006A*M{!Se\u0007^FBbe^`7\u001df-\u0013\u001dKv\u0007!z\tPSQe9m\\\u0011\u0015B'>Gl \fK?Umn\\X\u000b7)\u0004n6\u0003ȫ\\\u0019Tᑗ\u0017\u0001/^\u0010\u001ci' kdf(oI\u0016o&\u00184\u0013\u0007LV\f,$<zWas@\t~RX|fm\u0013Q\fPzDo\u0003 \u00017i\u0017\u0002Bs:ؼyξpq\u0004\u0004\u001a&Ҟ4<c#2q߇M2`tI\u0005{t\u0016L(VZHbH'2\u0007\u001c[k0wЮT>Q \u0019\u0000\"eӇ\u00071XH\u0018v\nLn{|`n\u001bp}\u0000j7\f{r?3:3ֈǟ4nez\u000f<ɯ\u0016}Ʈ'_cOwhaJ\n\u0013h\u00155.مH\u0012#\u0017I\u0010\u0002DH\u0003\u001a\u001c\u0001# ꓰm\u0003b]J%H%k08YA)?\u001a0\u0014\u0014\u0019,p\u0012LA{\u0011z\u0002)]s^\u0018\u0007:UȚ!\u001fW\u0012\u0013\u0000g\u0003å{zǩ䝼\u000bFQ?(vA 9\u0019u\nJ)ϒ\u0018\u0005?|<DB=u^\u0012g\u0015\\u/\nzv\tM\\\u0005JNH3Y2И1?.Hi\nU*>r!\\[\u001e|U6>\u0007=`B\u00118!{\u0002.[\u0001HFߧ\u0002\u0005©eR\u001c@x̂*\"\u0007_DI\nZ\nH=>\nq\bx\\h }y=<t\u0005\u000eMIS\"kOBC$t]CTn*\u000f[HA\u001dt>Y: !XH\u0011Iֈd\u0007r\u0011L(\r\u0002HW_m\"m|\u0015Y\u0000\"\u0003=e\u0004\t\u001a\u0002\u0010\u001f.\u000b#) D)E@pG$(Gʸ\b֓!Ck˶}}E\f|ܑOQe\u000b|<sB#Q\u001f\u000bR9~\u000f?RJ?WK?}ß_9x<wGZ\u0017ͩUq)SaR\u0016\u0005\nlTze͔j\u0011\u001et`Y\tUM\u0018\u0014g}{uFG\u00011\u001b7>vy \u0005FiJM!.Y?.|&17\u0014ذ\u0013b\u0012fNz\u0012\u0018\u0006\u0004yVh{\u0003!L2(Pm<\u001a9rY\u0001A5`fqHW.\fB3\u001e\u0005d\u0014\"y1\u0014\u001f\u000f%F޼FeAAc\u0017a:Q%\u0016E\u0007\u000bOx\u0013=\u0001-\u0011ArA\u0002Q38Q̝V(1_Y\u0015ޞ]J\u0002,Vo{\r\\h\u0007H\u0004\t\u001e\u0001aaYZꆝi\u001ez¡DJ\u0003B.t9PmƢqCW\bĀl\u0004i\u0002G<;[\u0004\u0017UBSb(j\nΫ\u0012LWx\u001c\tt6\u0014UYP(!\u0001Ǻ\u00183-[H\u0007d\u000b \b`zO]) \no\u001by\f\"C\u0002IP\\rr \u0015\u000ey\u0001\u0019\u0006ǡ\u0002C\u001aZ-c4q=^\u0002\u000e\n\u0001eש@B0\u0017U\u001d)w\u0001}H\u000f\n\u0018d3w.T8^1D-Tм`\u000e\u001e5?Sl\u0004j\u0012$˽IK(1%i1]Jk\u0015J-\u0014'؉\u0018w..*2F+1v+\u0010I\u001ao\u0010\u0015H\u001a80L`bڜ\u0007=.q\u0011fegT/B1&m#,5c5<Qs~vqK\f\u0018#Y\u0016k=\u00113T@\u0007mbjطs l x\fFqNkh]z\u001eWRA\u0003\u0016\b\\\bfVx@ZXث`Ӛ\u0010ْ~\u0019\u0002>̝\nyN\u0017E\u0007'Q{,\u0011iV3\u0013˜Shs)km\u0002/CD[!2/\u0010Vc\u0010gJ\u000b(=7\u001bv\u0006.o\u0013NnLJmiGt\u001a]<e{o\b\u0014A\u0014,~c÷zc7\u000e8Ů21 \u001d:5ۦ\u0014Le\u001fE\u000bq\u001a\nc\u0001✺R\u0004\u0019G/\u001e\u001f(A<I6Lj`gݵ\u001b[\riTgbO\u0016#\u0000\u0015Zeo+.SbF\u001d\u001c>3^ T\\d|\thg38\u0007ФKan97V9r֮\u0003u\rG\bg\u0005\f=DP,\u0013c޾OI\":1*kORu(˓h3\u00001DĀ5(VE\u0006[=^#+ikbĮd'\u0001,\u001db\u001fQ,x)\u001e/\u000f\u0004s} %2\u0014mP;[aw:G\u0012N'3؆)J\u0018\tw\u0015\u000557FdN\u0005/ReQ$rt:Jn\u0012<\u0017`/<>\u0013LysbъU\u0019MezHyM\u0015F\u0018FՏ6\u001f%B)*5k\"MN\u0002S\u001b@\tΣ)Cߚa5\u000b\u0018P kwR\u000bv)(x6~UlF\\~<*Bv\":%8,\u0007KNCِ\u001ahƂnQMJTG$1f 3bH\u0016@_b\u0016]RN\b$1B!?v\u0000!Ճ\u0014t\u000e\u00063a9O%CD\u0013Ub!?\u0006\u0019M;!t\u001e\u0015\u0019pyiA[\u0019,f3;ۉ\u0018NVY;qYuG7\u0001؇\u001d\u001d>2_PǕw\u0005AaKuZGHF|/<vSNĸ\u000bDh8f\u0011rCX\u00062+·N\u00166fXd\u001f0\\l\u001f\u001d\u000e\u00037\f\\/\u001c9o\u001e_mi\u0002̸\u001ful-GP2aS(з\f1\u0010[KUFۋ9wlβ-x/3\u0016@6\u0004\u000eLb\u001c\u001dMR\u0001iή]*\u0001$\\\"j\u0006U͏G\r)R\rzӀh9{}\u0000S)\u0001\u000bWX'_㰶x\u001c`+V\"^\u0017;Qn!Jy'\tҫ\u0013kk\\%UD\tH!Ƞz\r ZoHFA*NM|ٰ򡙽χ\u001a*\u0018k\\\u0018flэ-μ--@\u0016\u001fQ>H\u001c_\u001d\u0016vAe\n̈$˗Y쑔\u000fNנ[y\u0013>؇61Y\u0019\u0004ؖ><w\u0001ߒB\u000fKHjY\u000f)?\u0006\u001b4pj.arG\u0013.wKظ\u001f\fE\\\u000f~F*-\u00029cö.7\u00012\u0001\u001dRhTi6.gT\u0005CԺt>&\u000bOޜ(Y\u0005\u001aKjW[xlj\u00131\u0003&S\u00149b?\u0010kB\t\u0007Zz\u0002Tq\u0006\\s\u0019r\u0013\u001b?uƔ\u00030fi\blH\u0001,,1\u000eu\u001a|1\u001f]W2\u0003\u0016;u\u000ehf1KZo\u000b\u0010\u0004,\u0003zVrŪ~\u0016\b\u0019hb|(04nc-P\u0016jFI\u0013\u0000JhU})Z]|u%Xq\u001e^v\nt{\u0011\u000f\bMJ\\{/f܅U4*lFC\u000bmM\u0004.7\u0014~\u0016Z^'N\u001eʷ\u0000\u0003uP\u001d>\u0002§\rq\u0006\u0006M@\fIJat캔L68\t^n\u0011\u001dhy)fHȡ\\kaw\u0005YCvz\u0006\f)\u001d\r\u000bplI\u000b\u0017mG\u0018َnsdE䃴\n\u0006#:\u001dh]\u000esC@\t\u0019NiTNgYv Sw\b\u000fH\u001f\u0005\u0003\u0007\u0016N\rck\u000eJ\u0007}+'dC`9\u0004EYx>K\nW\u0004`\u001a:\u0001e\u001cە%\u001c{1\u0005\u0019pU;h\b@rkbHdd#\u0013\b׷ᦈ\u000e&Wn\u000e}v\u0000(\u0001]`?n\"\u0000<u\n(\u001a9u\u0007i~@^gܙ\u0016\u00046,\u001dp\u0014\u0014'\u0012fDH\u0004(ms\u001f\fzν\u0001h?`\u001a\u0012\u001dj\"V\u0000\u000e\u0004\u000b#9|p\u000f+5ZF\u001d@S \u000b\u0011D\u0014`8M\u001cB\"̨{14\u0012CdEP\f+iZ\f8n2ν!*Y\"dOE!\u001f\u0018^\u0013`\u000e\u0004⪝M(\"݆\u0012L8tD\"K\u0018@\u001aG\u001d$xXa\\\u001aFw:\u001fR00}\u0003?9o&5\u0000Y)>QO^\u001f)LW2\u0007\u0006r|r`\u0011{fE+L@>1=SR\u0016[{3DȄ\b\u0017-\u00010<݈,&\u001bS1; \u00170\u000bZ4P\u0001\u0006\t\u0004r@dA\u0012@WRX,ʉeExgdia\u0015F\u0005~Y\u0019\u0016\u001b,\u000eb$.x\f9l\u0018WyNs\u00035vջ\u000e(JP_P\u0002\b֢\u000f\u0011-\"ߜhp\u0012^:\u0011E\u0006l}}J\u000fғ\u001eae \u0001?,MF2\u0014d\u001d'˓Ad1Sh+n\u0013D\u0016\u001e6\u0011\u0018!A\u0003\u0000ŏ/B\u0014\u000e\\.0vJf.m:R;aȌ$/GkK\u001cA1faɸa\u0011k\u001c\u0017ٶlʹ\u001c\u0018\u001b0\u001aQkR\u000f{e-ÞB|}ܷ\u0000\u0003%L\u0004\r/2Hg\u0005&H:\u0011靰Z\u0001\u000beMq\"Y\u00181\u001cf\tB\u0001\u000f\u0001(Y\u001cA\u0007\bjvfI=sqس\b#m\u0013h@7k7\"d!)@\u001bt\u0016{Q\u0010\u0018Pg)\"fA-p\u0016w5#M\u00078PYrL\b1VШ0i\u000e\u0014Jw+{\u001eO{iTȐ C\bfMș{ӐlvUe}\u00010\u0003\f~qwfdF^UYuu7ir{qdfwEi\u001evWaWd\u0002PGE8e\"+2di\u000e\u0003`\u0017ϐK-?\u0004F\b\bk{O\u001c}A\u0006*4X\u0015r3V\u001c~ȓ9ò3-Ŷ\u0003\u0011:\u0003R.D]ĦG\u001d!\u0002Fm\u000f0I<\u001eQD\u0007/X\u0014N@ 99Rͻ\u0011\nc~X󾐛a\r_\u0018\b\u0012\u0001\\`\u000er\u0005cѴIPJ\t\u001bg\u0004IhS/M*}pF}2\u0001\u0004\u0012?\u000b7͆B\u0010)>DK\u0018cw\u0010{08C\fm&0\fn06c\u001a\u0013xBKlw$<`א\u0005F\u0016p#sT\fF#\u0014X̟\u0000Gh_\u0019~J\u0013MRzMh4H\n=\t,:8n H?6T\u0007k\b<X%ĒP1\u0010q\bX\u0003\u0013s-#@\u0001dRO_U[<\u001a\u000b\u000bSw$\u000fh5\u001aL\u001fјi\u0006_-Q\u001b\u0003oh@?\u0012NsvP(+LESL4\u0015\u001fσS\u0014\u000fOA\u000f\u0013b\u0013\u00111sHK\u0018\u0007Hɦ\u0014blKa5R1H\u0014ndT&IJ +j@\n2^HahR:H\nR_Ra'\u0007JJ)LQJ\u001a&WR\u0018I\u0014*f6\"(\u0004,~OhOdiy\u0014F\u001aw\n6^QORz~\nZ\u0015F!zw\u0018\u001d\u0010ikbDFQim\u0014\ry7Lې\u0007<1ގM?6j\u0010M6(h\u000e|\u0014\u001eh\u0014A\u0014c=\u000e޴b\u0014\u0016vz\u0002n\u00149\u0019L\b9C)\u0005N\u001c{++\u0005\u0016OF)\u001fZ\u001a>\u0007½y)\u001b0\u001fELS^T\u001e\u0000-G\b:;G\u001140PM%AǦ)R\\HySy\u001c=ȩ\u0003:JB.T*xGw*%(Oä|쩬>@γOi<\u0010@*\rh|\b!N\nASF\u0017Ԧ\u000flrN)Mf4b\u0016z6.\u0012OhŨfb(\u0017q\u001bnj\u0002aZl{4\nLY&B,LG\r0&ĊfccN\u001c&\u000b-!+bQD6`4څa\")ʼh\u0002i\u00116%M\f\u001b3\u001a\u000e.昛,g\u000eq+\u001fL]IIosc\u0003G~ƣ,t4$ާѐUG7|4$h\u001f\u001b\fN\u001dXr\u001cЩIz:F\u0017j4T~ҡY\u0004\u0003\t;\"TAA8}l#\u000f\u0001,\u00182u\u001cA\u0003j`1\u0002\u000fVm{q\r-\u001fP\u000e\u0018/\u001e4-RB$\u0019\u0016Ce:ǘ\u000e*))Mh\u0010\u0012\u0006N0Ly\bl 3\u0017c\u0005\u0005`S&1\u0013\u001f}݈х\u0006Jov\u0015b_asξ6\u0015/q\u001dR(A1\u0007Gӿ\u0005g.H\u000bLlZ?yBZ\u0001צt!z\u0018B\u001cWbdɃcX$2\u0001(%\u00019\u0013\n۷\u0001Z$\u000bǬ\u0001>\u0018u \u0012wY(!\u0014\u0019m_z\u000ew\tb7%D0?PoXdJ\u0018s;A\u0014X\u0014\u0019[,h,G,&]'?e\u0002~|-ly#&\u001c]wͤsS\u0014轻\u001d\u001a7`b\u000fXTW4zPߘۃau\u0019ƣ8\u0018\u001cFozm@ۍa\u000e\u0006c0\u0005\u0016hB\u001b\u001a&{ܱޯ3I1-yŬ\bq\u0012\u0018S!\u0013 4,ذ\fѳT\u001cEk>@{4z\u0004VU!0W4v+2+\u0002\u0014mb\u001c\u0017hKm\u0014|\u0013<P2V6Q)-+y$R\u0004\u001cqn\ti)gƦX\u0006?Aƾrh0*\u0002^'@\bl?uF\u0016KC26}X'\u001dq \u001bP\u0018\rGh\u0010\u0018-(#\u0010viBL\u0019Lq\u001dlb\bG\u0010\u000e3w\r4@\u0017R/[NE\u000e\b1>&\u0005GصBO\rEb?m/7\u000e\\4VrP\u001a9X<!cDX{sd\u0018f\u001d\u0012tp\u0003JO\u0004\u0002`ߵ\"Σ\u0005\u001b\u0019h\u000f\u0011[ \u0018 uS;i\n\u0015X\u0001\fe/nS\u00103é/*m\u0007\f<z(\u001f\u0006w\u001c-\u0002c\u0014\u0018[G9K\"lC#[_\f\u0018]-\u0001\u001f\u0007H\u00017ȥ\u001c]\u001514sm\u0011Y\f\fܟȤ|1\u0011C\u0010\nt{\u0006\u001a\u000bV¾H逡KBLuKp[63FIB:5?ӛAY55\u0000\u001f\u0014la=m\u001b\\)[7@:6|\u0013eBh\u0003'\u001fY%0\u001d\n=KYLlL\u0012 b\u0005A\u0011ch?&M3AG%UI]Qr)\u0001\u001b.#*OwGX\u0005\u0006\r\u0016`.^&k&\u00015\u00064&RPt\rxz{x_zQK\u000f_SӞ\u0010Omk$WM\tԹH\t+%US4%G7#\u000eJ)\u0012Z+RmR~.p\u001ez\\\u000fSmJyq\u0007p90ā.%{ A=La\u001e\u0018\u0010Kl\u0015p\f3\u000f/\rs(a\u0017a\u0012\u000b%v{\u0011\u0007Lʑ\u0011\u0010mlcܰR\u0003T;\u0005П.L8\u000e$.X9d8\u0006^8[1\u0006\u00016T\u0007L\u0012geZ\t\u001cO|AQ!l\u0002\u0013,1f-sI\t遰\u0018YʤF/R#vh\u0007.ʄ\u000b=I\"ǒæ={:a\u0017\u0018rDPB`\u001b\u0014\u0015\u0002\f|E6<\u0006bL`4Na&q۱$j\u0016\u0004X`\u0013U\u0015Yǟ\u000fi`rtaB\u0014<\u0001ȡ\u0001c^o,)b=.~ia3r)H\u0018\b,Ev\u0018 ̫j\u0003L8pV\nA@\u00045{&\u0015\u0018\u0000\tF\u0005\r{bR\f3iSM\u0005%/&\u00075\u0003\u0002\t,L1\u0002'\u0018\"(\u0018\u001e\u001f\u001e{Lv\u001c+Cj 1.8\"FJۆSK~\u000b)\u001a:\u00009qd\u000ec`\u0012,p#S2\u0005A0\fK$\u000bRM`?lVd\"!\u001f21*8&\u0011b\u000b\u001b3ύ\u0005\u0003!8\u0016\f@1FQ\u0001D\u0015\u0010Ih6h\u0001\n&g2r֘y%\u0002\u000eJGT\u0016L\"hh\u0012m\u00130Bm\u001aM/\u0018\u0007,\u0003\u0003\u0005\b1T+649\n3ei\u0017\u0019P}aB'Yt\u001ba|\u0001\"4<`\tہAg\u0002\u0002Sp/c\u001d\fm@X$ttVm\u000b\u0017B,\b4|΍+L(ք`\u0017:\bF\u000b\u0010L\u000b['!0\u001dk8\"mVΰh\u0006|±a|iB\u0007)9\u0005n\b\u0016óI۸$Ćfa!L\u001947[}ۀ\u0010ل9\u00027\u001fa)\u001eX\u0001J\b\u0011\nh\u0018\u0007$\u001enx4\u0015h#-\t\f\u0017\u0014MȨ\nAcO\u0004H\\\u001dqu`ǅ&S\u001c\u0018aAQ\u0016\u001fdU\u000b&9G\u001a~^ИLnג\\s9Xm&d\u0002p06\u000f\u0011$LbTLF&OUҞYc؎TҊ,VbbFLƿE\u0003\u000b=&xj \u0002\u00151>\u0000\u0015\u0018\u0010SQsz\u0015y43dnT\u0011m\b\u00023[\u0014\u0010-4p\u0016G\u0018\u001a-m\u0001D/l-\u0019\u000eg\u001e\u001bkL1%>Vol42\u0015`/٨F\\\u0001\"|Lĳ&kQ\u0002\u001b\u0014XO]\u001c\u0014d\u0004`iĂ\u0002EFCmJciazF\b@Tm$\u001e28\u000bv\u001e\b^\u0006\u0002Mb\u0005kԴb&y\u001a\u0005F\u0014 \u000f\u000f\\\u001b#\u001a~1u\u0014\u001d'1\u001cZl\r_qm\n-\bz`-\u001c61cQoF\r-Zڠ@h\u0014#mؘ\u0004\u001a|!\u00166h\u0007\b0\"[C\u001dӜL_9\bж˹)c\bm@\u000fv\u0006j,f\u0010\u001eo\u0012\u000fqo\u001a\u00053Z lg\tl(gZcu{KӜ,4T2\u0014`4UM\u0017\u0018`M*a\u0001&p)\u0012bZQ@\u001d`6Fi;y\u0014<\bCA\u0006sEH\f=bp\n\u001eВ\u0018\u0017cm\u000f\fԹ`<L\u001aRN'a#\u0010/ܞ'\f-&BC#\\VwMX8?\u0000=\u0018{jሷ3^M&M-Ԗ\u0004t$\bc\u0011\\as\bH|0pqM%_=1t\u0000;N\r0\u001d\u0003m\u0006[\t\u0006B\u001c\u0005\u0006Ɣ:¨m\u00126\u0018wB\f\u0001\u0000BO3ɨЖ\u0002+6`MM&\u00003M1=\u0011\u0010\u0003!&@\u0015M\u000fA\u0004\u0005j\u0007\f\f\u0011uC\r\u0004&\u0017Fu?=+\f\u0014!6\u001csT\u0002#\u0011&A}zh%2)Z.x(\thM.D\u000bƾ_u?\u001f7^;Dj\u000bR,&)^5{\u0010K}\u0014wL\u001d4\u001dwR:uD,+;&\r\u001b?~͇wWk^|}\u000b\u001cgz9jɯh\u001f\u001a\u001f\u001fW?}}D.$7W_j\u000b,Uǘb\u0012\u00123o@;9z{_T?\u00071n\u0000]\u0003{_?{ݫI\u00148bsPwq&{v\rSt5x|G]?p\u001fv--\u0004\\!PԻyǇo__yw{\u001f\u001eܼ8\u0004sچ\u0017\u0010!j\u000fo}!YGoܼy\f/]w߾cyV.2 s\u0003\u001b[`|\u001fs\u001fՇ?!ÂF\"ȼ\u0011w,L\u00110g\u001abdJ\u00030\b\u0011\t\u0015\u0011\u0007?\u001fK{0a}UnL\u001a,2]\u0013\u001d԰]Ƽ\u0004`!RD,F03\bo`s.E5}\u001axˆtCDE7\u001a\u0018jh\u0007\\%ŕDn# $\"mBx\u001eg\u001f\u001c$7Fw\u0012\u000e+Ϥ\u000f~8C\u0007\u001563И\u0004iaոtP!}\u001e\u001b\u0012=5`eb\u000fz\u001d\u0005\\Yz]K,FKĞ\u0019;X\u0004n\u0018*\u0011cSȭ\n\u000bՂ.ĠX\u0013\u001dU\u0017k\u0004,\u0011N78̌>\u000054I\fa\u0012\u000bql\u0005*G/R\u0018p~L\u0015\u0017GvPkAĘ!6D\u0015\b6Β\u0019\u000fY,#\u0018\u0014sDI\u0003,b\t߸Iҹ\u0002&\u00196%{g?O\u0013\u001er\u0000\u0015[W(?qY`w@\u0019\"I\u001bѴ\u001f\u000ei0\u0016Jq\u0003HÊ&G!\u000e\u000f3ǢLa\fdNm\u000fw\u001fݾ6B7\u0011-\u0005^mCg:u\u0013Chna\u0010Á;'}n1Pz\u001dBsLt@Dy,\u001c.\u0012Kc\u00002z<NBO_\u000f6_M \u001dO=JӾрX\u0011\u0016\u0013pSVIMD͋\u0003$Ա\u0017-7KauާX>\u0016Cq\u0012!GTR\u0014Q6\u001f\u0019\u0011wLc)o;8gj8\u0013.>\n#\u001cb!9Έ\u001eND=iz\u0013D]\u0000x'd\u001f\u0016^\u0002]q\u0019%\u0004\rL+&c15vn?@AJޯ?d\u0011f+y\u0010CqĐ\u0006zw$ʄ\r~!+zmgl8z#U@J \u001208\u0010-&lJ\u001cD\u0017aTH\b&\u0013)1D\u001f\u0019f©>D@\u00158pn \u0006KgXE\u0012eh\u000fBhU'UFP0$L\u000fk4;@\fMaV1\ts\u0016d\u00044\u0007,Be\u000f?v\u0015\u0013-j\u001d\u0012]㸇nI&&П['>Lw_(E\"$\u0007Hau>DA0.8\u0006\u000f\rPT\u0010\u0017\u001a:'i\u0018\u0002MSWӤ\u0011Xh\u0004p\u001cT'<8.i<0\"F\"3vn\u0013!*\u000eΒt\u000b.]ǒ2&%\u0002$m\u0006\u001d\u0011\u0006h;\u0006гZӳ\u0001=+ҩQG6\u001f^ej\b\t\u001e1}  |>\u0012=\u001c%ᇥ%E^Bau>DJ\u00127ȘNa\f;>\u0011\nHB^\u0017\"T\u001e\u0003\u001fS@tf\u0014Oʇ<1\u000b\u0015$\"_2Md/,oL'a#A\n\u0001Z}UD8\u0012\u000fSd,^j*n<f\u0018\u0003\u001eg¹>Dm1AwEt_\"`bo\u0017\u000f8 ʚ\u000e(u\"3E \u001a\u0004\t\u001dĕ1\u001dAIp\u0011q\u001d.r'QKn(cW0m\u0014\u000fӘ<#\"٥\u001f=D~:\u001a\u0017\u0012kQѧ4u+2\u0003\u00032$u!\u001a\u001c\u000bʌ|.FJpկ-\\4\u0013'j\u001c\u00131nC\u00044\u0002ӏ*Z\u0010bu=1b'\u001eׄ\u0017!\u0013\u001e8\u0012!\u0013\u000e.hX=\n#]\u0012|X\fyHv\n;\u001cч\u0017\u0010`F*-D\u001bYG!\u0017a\"eИ^<\u001f\n iJ;\u0012\u00044GY\u0015Yqq6\u0010 8v\n\u0013.!Z\u0016֢iN.w\u0004Jl\u001f\u000e:\f\u0015\u0011\u0004\u00036\n\u001dD\u00140O0:\u001fNݽN}C[R\\ؒ9XDte2i(s1tVp0Q\u000f4z\u0004\"aubYK\\\u00180_S(ŹО$n\u000b00iH\u001fS\\[=#H\n\r\u0013%&ZĶ0{/\u0019!rQ+AL0RhT\u0016n^Ja2&\u001fI,,Ԫ\\\u0000\u000b\r;rƗF8H\u000b\u001a\u0011\u0019\u0017ΝB\u001b\u00141̄U\u0018xHH|+x\b7M\u0012103\u001bOx\u001eb\u000eq\u0012=n^G^\u000fr\u001c\u0010\u0011]u\u001d䁳uMIxq:\u001e\u0011)Mp\u0001<q\u0019p/xćfJ&\u0013C4itKFE-D\u0011[IzADƁ7\u0014CN.\u0010\"ETδ\u0001\u000ePY\"R\u0016x/k:`vJ\u0010=D;9GD4iَw\u0018Ʃh;PmG\u0018U{\u0016\u00191)t|\u0016L>\u00135H\u001fzh\u001f\u0003'\u001eO,\b\u001fĻ\u001d\u00026\u0018FC#K\\ҁMyX\u0011>\u001cW÷\r;9hM27z\u001a{\u001cu9eCi$_\u00195c7\u0007G\fU$61y\u0018DĘo3\u0003͘_$2\u0002E\u001cwx2\u001a>ĊP@x|!)[H|(Iq)<\\0\u0014\u001e=boFNC\u0012qό|\u0015\u001aZ7U+\u0010Wڎ!y91\u0014F7z\u0011Ä\b\nR\u0011=$8|_wlT\"'V\bwo#Q1\u0015 ZP\u001c\u001e'P\u001d\u001fC*\u001ej\n%A>\ra2tF\u0004>i\u0004̥uӈ|Pmd'\u000fhPN\u001b+2\u0014tD᚜fеr+ԓ==\u0003\u0010މ!\u0007a$W?Ȅk}M@A?\u0001Tpwa\u001a1΄\u0003\f[\tfC{.\bʡ0m@tl*L\u001f1΄s}u=\u0014$\u001dfY۹\u0002a\u001b\u0001ѣ(r@[\u0006\u0016Ț\r'<\u0015\u000f9\u0000\u00102t\u001b\u0013\u001cn,i\u0014XL\nDNK%Yz\tg\u0000C\u0010s.C\u001fSg\u001eʣ\u0012ɘY\tU-WDAH*&~^\u0015^\u001d\u000b4\r\u0005F(\u0019;\t\u0000\u00053mQ+뭧[ifa&o\u001cQ\u001d\u001c\u000b+՘i!=\u001bZF`\t\u001dQD\u0000py6Ϻp:\u001aΊMa}P}?b\u001aWE\u0018Or\u000e2v_T1Z;֭p\b b\u00132T\u001ey?@R\f\u0015&8*L!!SnK#,#]VZ&]4=\rċm\u0002A\u0004&6(\u0003\nd\bws\u0018W7FdlxKau>@\u0000nN8\u0004/\t\u0018:\u001f\u001d9\u000f#횸=7N\u001f\u0007S\u001a(Ȣsfez\n\u0013.\u0001JA?މ\u001c\u0011EEz_h\"\u0012\u0005\u0002ňu\u001d\u00191.Ixl`z? Q)^ǜىFdULS\u000fPa\u000bNxC\u0019aſEt!Q\u0005#6\u001aDkI#Qz\u001fҭ\u001c3Vҳd02~bl\u0011\u0019R4\b\u000be\"+\u0002*;K$2R\u0018`K\fu\rݻNԌ\"ax\u0000=cN0=\u001c\u000eFQ2PD`xܯ\u0007L;\u001e!a/@F.7)8iHw!/;\b\u0012\u0015\u0011\u000b\t vn\u0011$D(\u0017FSaXeL9L}\u001e\nXJSt銉!:\u0011?@LAxP-\u0011~\u0004Gp\u0013C'=|*W\u0007\u0011\u000e\u001dDtĢ\u0015X\u0017@CY;?Gx\u0002+QpPK\u0006\u001d|ƃI\u0011;_d\u000e-5m\u000b\u0002E298f\u0001#ƓCC\u0012(/,=LF@,,<=\t\u0010Hx|)>\u0007a\"\u000f'\u0014e!`{,#=\u000e=IgO0M.b-\u001f]ł\u0010\u0012]X(=C+\u000bȬC\"\u0015cI\u001aY3tD\u0017F\u0001U(r\u0007X&\u0016C\u000f\"ˉDmЄc$\u001e\u0010X\u001fu\f=#t.$Z\u0000\u000flyizj*\u0000)\t7RiE`y\u001b\u001e&^RV3{\u001d[O\n\u001aG7N4$ع1W)&%\r[\u001b\u0017;0ILb\n\u00000&n?,\n\u001dCbBI!\u0017\u0004\"4P\"\u001aiBX* Œ+{Aȹ{ؔ08\b\u0013H>چl!B[\u000f\u0005\u0016\u000b44in!};c\u0018\"I\u00072&Ê\u001ckKDwќ䯹Dwq%\u0017K\u001cAq\u0018m\u001c@\u0006D\u0013\u001d_Ǳ=.Z`KӝE\"L܋$!\u000e-W~xxG0DfSp\f\u0018H\"\u0003Gޯ\n \u0014y\u001d}&\u0010\"7i}G\u0016\u0016fg84hm)\u0012Y\u000e;?C\u0015z$8vQRt\b\u0014\u000f0\n\u0004\u001bGt͑F\"jh]\u000e\u0011+?0v\u0005'\fwH\nQu25f\nvSB:X\"\u0016D\u0017?a2N:,eFA\u001cсmX\fVW\u001dC\u000b\u0002k\r#mq3KLc:&M3^=f\u0004K\u001e<\u00126l6\u000efLC[+PvJ\u000eBz\u001c\u001ay4\u0004\u0016Frpa'\b\" \u0002}f}dܹ/xT=\u0015\u0011d\u0004\u0015{\u00162\u0006n]HG),:g& 1$\u0010<&^tT|\u0019!HWskP\u0017A\u001f\u0001Ng$Zd\bVd1={c\u001cLn0G\u0001KG]=H\f\u0013\u0010VyDH>(r\u0000\u000b@ϸ_#=\u0015\u0019xA`\u0018y-]yS.r^ztj$\u0011GEӬ\u0002\u001859tC@a\u000fb\u001a~Eb4\bcBF9\u001cݎqa] H\u000e\"K\u000by*\u0019 \u0010rV@\u000b\u0000*\u0016Ь[*\u0000\u0007V\u000b\u001fZA[I;\u0003$Yp`˽ryf\u0007F#̫\bJ\u0004nXJ_ؚxt0\u001cG\u0007CiMB,Ђхrd\rv\u001d]ʈ.pDb!j\u001a t^84\u001c\u001e֘\"&\u0010M wt6dT`}>\u0007m\u0007\u0018?w\u001b\u0014!ʪ\r2+QNG\u0005o\u001f9\tDN:\f\u000f<\u0013oQmէ~GP\bh\n(\u001dĵI<gIq\u001bDSC\u0004BH\u0003\u001b\u0015WK}uD4ȅ\u000e\u0018\u0011c~d\u0017gT8$\"F0%\u0002\\\u000f\u0010{p\"X Kd\u0013cFl\u000bc$\u001b{o𩉡|E\u0011]9~w\u0010?\u00050\rQ\u0006D#Fʐ\u0016fr2\byᨴ\u0012Ѱ~!l}\u0011\bA<ٗĀ\u0011\u0002\u0016p>E\u0016K\u0019+sY<a\u001b\u0010\rC\u0002c\u0014-#9n#'\r\u0010\u001b:\u001e8y\u001a\u000eKjg\u001c\u0006ݿ<79Y,$sz~jvO<~\u0011,%'#:iN\u000e9e\b\u0000ɩ\f5̀{VKQ|\u0007\"6m'45e'Ҹ3q>\f+lDƇCo\f;Ahڽ\u0013\u001b2 #\u0016\u0005rǉۄ\u001fw-\u0011-`@iQ@[\u001a\u001b\u0004^y\u0016Z$#s}r\n \u0014\u0018\bQԒ\u0003A\u0004\u0014\u001b{$\u0002\u0002f$cm؁i\"J\\\u0001;\b\u0016Q\u001e˟=dml#Nae!XX\u000fB~)\u0010\u001a:DZ.vv@mO\u001b@ B \u001d\u001by@O')n\"\u0006h[KLx5vLI&5 \bʥISD2\u0002:I\u0007\u0014\n\u001a\u00051?at\u000ecG\u001c}HcGV#j6A\u0011-\u000eά#刭I88'g/A\u0000a`!8c,!|Ūʟ\tgB\"1\"]1\u001fā96g:FIR\n(㘧w\u0013\u0004[\b\u001ekBbYzx@a\u0016\u0017b>+z\"\u001c\u0007;2Zl\fzg\u00064̓,EL7pXNXѨF,\t&qH\u001aX\b5\u0013&\t\u0019Z/\u00178a/\u001fJ\u0017 }G \u0007=\"!i.{k u\u001f\u0019\u001d^+54I\u0005]aE*VH\u00078\u001d\u0000\u0004ф[k\nt,\u0000[8%Ɓt\u00133 O?BG0\u0011\u0003s\"pA\u001es^.\u001c\u0002\u0018Ǌ(\u0012Qec2(t\t\u0007H\f\ntuƆ␎\rfbM<\u0015A- m4)@ު\u001fN!\\N\nWb\f\tQ\rD)c\u0012u\u0018\u000egci \f\\\tFYIFx\bZZIe6\u0019y\nf\ne\u0015>\"*~T9k**c\u0013*\u0006%GwU}lք\u0016;+peB\"hG%\u000f&I\u001d1H̳&\u001e\u001e\u00168\u0011\u001b\u0010<>\u001d\u001e\u001a<\u0011BIBb\u0017\u0000Lq܀\u0019_d\u000e.nbAl(p5BpbRx*d\u0006~u\u000f0c(r\u0017x9rx\u000eH夸\u0011\"\u0017.)X.&I\u0018Bғs)(cBt\u0013W\t\u001bJ\u0002كzW\u0013H\u0014\f<Ja(dJ\u000b\u001004\u0002Lڛ$\u0002ի1\tKDt'bO6\u0007+\u0013q\u0010ȹO5d0B\u0019L\u0004W|l\\\bE0l[O3'8\u0002R\u0005#o\rq4^I3^\u0001CIi֜l\u0004\u00064Fx\u0006arj\u001e\fmH]+\nG \\}\u0018\u001ebǒPJ\u0006\u0014׎\f\u0015se8LNS19<Qݾ%\u001b\u000baȝ՟\u0010\u001e\u0003\u0002:t\"bzEbH\u001bL=\u0003(g/Ca\u001c؂\u001e|\u001fƹGfH,3\u00175\t+|<3/\u001aK9,B\b\u001aq\u001b|ϰX\u0011\fEnQ\u001c\u001219DR\u001ȩ\nN5F\u0003\u000f<\\\t/kL\\l15U0U~\u0004*禭{}!a\fMYN9U\u0014A|'\u0002\u0007C\n\u0018,\f\u0013Lϔڵ0-Jl1w\u0000O䐷\u000b\u0002(=ss\"7Y%\u001e_9i~6tIe\u000fHK/\u0016ME'9]QFwF \u0014WNzW@CD=b}|\u001fY.77\u0007e\u0015\u0001]\f@D86\u001e0YDua#E5/aȢM\"\u0003եT*S˟\"Cs7;\u0011ژ\u0006T\u0015\u0013Q\u0007\u0011}\u0011\u001dwhX)*weR\u001diF\tqL\u0016\u001feǨkg3\u001c\u0014N*:\u0000k^g7\u001a\n\u001e\u0016\u0001\u001d\u0014q\u0013\u0010>h%2\\Sl\f8\t\u001el\u000b%S:~c\u000bDE\u00176H,,$plF&\u0012\u0005aL\u001dvx(Q<KEtH6o#&\u001c\u0013><yTRw\u0014\u001cvN#AWq\u000e+\u001cV6xUڼ.#\u0017a<EW\u0019ɯ8ARg]bMǇ\"*'\u001b\"D\u000f7YF\u000e+\u0001|t\tWL\u0014\u001c!\b(֏z\u00100\u0015\u0003\"\nc6\u000b9՞z\\a@&IY\u0014t69N^L̚Ou=!\u0005W@d>o0\u00135)XjƠ\u0017\u0017d@`\t\"b̝a?P`(\u0002F\u000fcw5\bbMFLPSk\u001b߹WpCxBWVc+\rDBT[\\Z\u001d\u0007}\u0011\tql2I)ӾPh0 \u0016__є\"=,|_wD>[m\u0004{H\t|nd\u000f³\u0016E\u0014PH\n+qg!T0U4Jipb\r3CMvsz(\u0018\u0014\u0001>)QA0zG\u001eX(\u001fO(kIb\u0005M\u001f\f:H\u0016c'\u0019@MDw\u0019я VGff>M¡\u0012\u0018I|N\u0003pRS{9\u001bQR\u001b\u0019iC!XlD*\u0001xm[#`<@Gp爱\u0004R \"\u0011봳\bx\u0011(H rA\u0005Y.mL/>\"Wt-@\fEHc\bA\u0014xP}FVs/+(\tAz\u001e\u000e`\b\u0017 \u0006wNhu\"\nʙ'\u0013@\u0001%dT\u0001\u00137\u0007\u001bI/񲇎\u0016F6<8*J*jot\u0003tF%uC΁14w]򜑃[ǖ\u001d\r\u001cy*\u0010$n0`\u001f&93D\u0002\"|]5\u0004cy.D\u0010@׽cM'\"3\u0012\u001ci\u0012\bqoe(7m\tmu\u0015\u0001\u001b$wC{.bBh\u001d73+ /ѧ\\66FI^\u0003RL\b\u001dT\t&C\u0005t\f\u0012#W\u0005O\u001a:Wۑ\f\u0014\u0002r#CfU\u001c\f\u0011x|8./\u001cRJ(mHFXVzn2}/\u001bygC ITC՘s\"לUID_C^8%\"]G7gK/qR\u0006\u000eGWݐz(N\u001dVS\u0010Ĩ\u0014BbWMe(|%bC+@猜\u0006SfY}!Ě\u0012>ڊ3A{+GE?M\u001c]]Mòۍdi*\u0001\u001dFI\u0002\"?\u0012\n$LBA0T\u000fL:\u0006\u0006\u000fc[fwT\\UaIO_Ç]\u0007m\u001bS\u0018w&\u0015AF\rU\f\u00101%\u0006DD.Z&6t\u000e꾢b_=X\u000f#[zc6dE/\u0014s\u00011ṗ\fչHHW\rC+\u0010#_:ԥRĂjo9X\u0010c\u0002KǢ4]#cM߇\u001d2pV\u000f4)Z`UO\f@Z\u0007Ze\u001aq\u0004bTb\u0006|Rk:Ƒ$\t\u0007\u00198\u0010\u000b\u0010\u000b\u001e0\u000f!D3<\u001ck\u0018'>y1\u0011\u0002w\u0012\u001a\r':'\u000fOe\b/Kh<!\u0003;H\u000b\u0018@^߲Xb81&ߨ}\\\u000e!#\u0004\u001e<a*XŦ\u0017\u0013炦NqRB[\n\u00105̈\u0004`\u000btPXـSC<@\fUL\u0000\u000eGkbJ3\u00122´LMcL8]Xp\u00143/F#\fXDTC&W^'ڢ\r,vkh9ׂ \u000fF5T\u0018^$Yl:\"qx%}-J\u0005q\u001a\u0002ᓊ\"7<)Ǩ$\u000bo[\u001dsD\u000eȫ\u0002e51.Q{k\u0003@Ll\u0012*xORz<Aj\u0019.\t=+[-.\u001a)|5\\F\r</ 1\u0015;[\f\u0015.c\u001e\u000eɼf\u0018\"!'\u001ec\u0017:FV\u00102%05vK0Aa\u001a|VE\u00141a\u001eqf\u000blm\u000fs\u001f\u001auz!:`0\u0010\u0002\u001c3\u000f.\u001aN\u001cΔ\u0011J\u0010ƻ.\u0019A\bc0m\u000e$9(Tj1\u0003L_$\u0006(Ɓ3\u0019\buGVٷm\u000f*{ޝ\tF\u001c\u001c@NуG\u0000\u0003ɱt`4\u0003G£B]NC\u0014Ί\u0007;ę@s\u0012\u0007\u0001GǇ]m[k`\u001f┹{\u001aB{vLL\fͻ\u001c.j/U\u001e502MV0\u0002T\u001a\u001f\f\u0001\u0003G&f\u0004\n]D\rgP\u0018\nnq\nC¨*.\"\u001ev@S\",R%'\tFn\u0010si|#kU>i\u0011\u001b\u0001\\*\u00012y\u0004'qjAU7\rpyX 4s\u001f2\u0012M\u0012;f\u0016`\u0007qQ6~F\u0018-G'`c/`\b\f\b\u0005\b'Gv\tTݷC@{s%\u0002(&fC(Y\u000fS\u000b͗X\u0007̆\b1S8cc4bBY#\u0006i\b\u0018cyi¿{k#ESW6\u0004\u0002Yf\u0015/aPpn\u0000ŉ%\u0005\u0013e5(R^&:'\b\b\n&\t\u0015\u0018Kviy\u001b>\u001a:b\u0007jn\u000e}\t9hR\u0019g%\u0012\u0002qH\u001b\u0003G\u000f5P\u000echt>6ڲa\u0013\u0005ʠ-\u000b\u000e?\b4X\f/8$\\ӆ\u0006@h0\":ًDWfаdC*3h\u00182=#._1;`ay;\f\bv)yL\u001b\t&3{Gƿ\u0007\u001e\"l\u0012n؀0|.д\u0004\u0019e,N\u0012To\u0002 \u0003;<\u001e\u000e\u001ac\u000f9BJSYa\\|ȩh\u0017Z\u000b>Fd\u0011>Չcn2\b-4-r>m}W\\8;Q2\t'\u001f#㤤\t:☄\u0001\u001f9P}#7 z\u0014|.\u0006)1\u0006\u001d%\u000e\u00125c5\u0019a{:؇]H ģ\r\r\u0010$]8Nk3*\u0002OC\nS,8goj\u0005Ok\u00137勳\u000bj)M<ܳȏ&\u00058iFHJPD\u000f\u0015\u000f2$@^\u0013\u0017(4RWJ\u0015a\u0006\bcᜓ\u0012yJJ[J\rdeϥRԿ\u0018DF\b}.L]M\t_NtƓHoaPJD<\u0016ߧ$u\u000b6ӋEt(\u0003\u000eq\u001eM\u0010+ \u0012$\u000fV]\u0010\u001b}h8@b\n}(tuI\npS0NCc$\u001ehH?\u0007*dR\fN$y\u001fW\n\b\bۮ\u0012\u0003)40M9D\u001f\u0004:\u0015@~,u\u000eDe\nPX\"\u0002*\u0002U\u0018:Q#U7\\B{8bq$tF\r]$~I1T+xTH<sgb\u0004\u001aH\"H)%CVb\u0011T\u001aŇܐYF-}\u0012\u0004\t\u0019q'\\Dd׆>Eq &|u(\u001c}Xl\"\u001b\u0002W`\u0010>Bn\u0000z\\-\u001a\\ڤD\u0005]\u0018*\t\u000fn\najD2\n\u0006\b(h!}]\u0015ʰGH)*\t~g⨞\b,$3i^?\u0002.\f2/\u0012I\u001a(\\aβr`G*_6B\u0013q\bLs\n7՘c\u0016\\(5\u0001h`TPCrL`\rF9K:\u001a*\u0011\u001b ңER@!=\tlF\u0011c鉚ALȇ$\u000fF\u001eHߍrQQN\u0005<Ȥݍf02Ca\u001a\u0003\f6/RNI\u0003wm\u001cу0x5\u0014AH\u0011B#z0g0*3\u0017˓'{8\u000f\u001a\"\u0004ͱvȃ\u000b\u0013%\u001dT\na\u001a[l8AyU\u000030\u000f\u0002Kp+UGw\u001cmH\u000f\u001aO`\u0019*\t\u0010?\u0014I%JAru\u0019\u000e\u000bS\u0003OJ-\u001fL\u0005\u0006J\u0007\u0007A=A\u001d<LopPʢ!R֬C\u0018\u000e\u001a\u000f\u0013\u0003bEKa{@U:5\\IlLz:bD5~(r\r\u000e£(\u000fB\u001ecTd\u0003J\u0019兌_\u0019\u000e\u0011&혌F{3}nD\b\r}ްe=r\u0013\"=\t\u0003Z\u0018p\u0005\u001f$}|9\u001bʀ1y<>H\u001e|?$rE x'\b\u00030D{\rr6Ԯ\u0015^KOm?^C\bu,$m\u0018$gRNH&ND\u0016\u000f\u0012\u0000\u0015B\u000f\u0011\u000b/\u0002dUE#ϕNOm?D0MԿŘ\b\u0001Gve@+͒abC`8{`o\u001a)\"ѣ\u001a(,\u0001c\\POJ-6\u0019k\u001e^\"\"`]z⇳\tq$.Ѡn8eQN\u0012\"\r+'\u000bP; \u0011U]\u000e\\ajj\u000e3~Xg\u0013\u0016T\u0015y8눀DMYKJPd\u0012l1ALzkW{Qbt\u0002\u0013.!\u0019K%\u001dA\u0006zvtoBa&?*\u0004\u0007pŢ|+R\u0002Ju\u00061_g7J)\u000f@0&b)yL\u0012\u0019\u0019Nm/I\u001b}!\u0015L)'M+#9J\u0007>S\tG\r\u00033$|HW\u0005\u0010r\u000b@:@\rI?&\fg3c\tOCZ3)_7%:y\u0000\u00114)\t\u0005>g\u0013\u0017\f\u001bH;Q\u0012H7j\\\u0016E|\tvۄ!=W׉\u000b\u0014\u001f\u0006\\>\u0004j:%\u001bʥfn\fx\u001f!\r/}*|\u0010{ܷ|6/_fJ9`I\u001c&x\u000f\u0017e\r\u0013H'\u0005\u0019፵?Hu0@y\u000fbz\tC:\u001a`\u0005*c\u00126|o+)z37\u000e%_6&\fFIHg(0\t\u0019%JAc\u0012!#/[$Pd}X\u00176<\u0012UN/b\u001fg7*x\b\u0019z\u001b\n\tW\u00179\u0018}ؤ©D_a<w$k_eA YR\u0014%fgX\u000f!ߒ\u0006\td(\u001d[}Ƃ8μ\u0007-[O>L~2 *\u0012\u00134}\u001c)\u000bݓVy\u0011>-e&v\n|ɫ&\fz+\n.l=2*vI'#(d\u001c\t3m\u001c\bE6\";8z!1F\u0011j8>\u001eH\u001fQ;NuJ\u0007w\f3T\u001fs׀\u000fm-\t\u0015tK0\b\u0014\u0013\u0014Q8_s\u0004Wd\bSÄ\u0007>b\u0002\u0017epЙťdާ'|2h}-j{ݷ}xᝣ6n^y)}ݻg7/2\u0001zs SGw\u000f(;\u0003\u0004ßaAf#sv\u0011d^\u000fw)i\u001cvʀu9r[\u0017\nIXf07G\u001aOdw\u0013|v̬\u0017v0lvsٷK-_\"ߺn#s_e\n2d͟p_E\u0006C,\u000fx\u001c~B\u001fn8̑)30c~\u000es3\u0013l=A\u001b\u0017k\u0010\u0015-m֑Ꜩ摨\u001d+GQiܿZ\"a}\u001as`Y\u000e|aPh\u001f//+7z_ݧō7+|i6WV+\u000e;oJ;op2[]Pkg\u0005\u0007/_uz_i$xXv/e|8\u00134V[Am\u001f&\u0018vNep=R],\u0015փn\u0019uN>l\u001dryk0h\u001f[7k)m@vD([ښ:sA={<Pu8.^;Z\u001bKzs-Z'0yaOO~h\u001f|\b\u001ag\u000bzcFtJaPߺ)?]RݥS^ׯetY\u000e\u0016x'W(u7N7\u0006->g'˥e7zsOeYؾ\u0014iYvPc彸}\u0001Ce\u001d/\u001b\t;-荕xP]UAe/[ؙ\r׾X.=Z.Ms:+nD]\t{(\u0016x3ӫ\u0017頶({xSNx WY\u0010]\nQt1ZZzs=\nQ\\NU벰v]\\:|cR̗7gQw1Wl\u001alӠq6\u0016j6w^7fkꞮ6\u0017T/_kׅsYol\u001cqmMؽzY>\rk{KaUw;{\u0017\u000fޕ;^.W3\u001d|޹!_Η+[oׯ>)\\w\f+qI\u001a|#V?ʖ9љ7`1\u001c\u00039UvY㸲z{p_ZiyƋh\u0018zOū\u000fZ-^u˝_!Z{\u0011]*{fPچDjeIg\u0000>Df<f[q\fڧAz\u001c'y\b7N%\u0001-%_\b;ӹZ\u0013՝\\q$\u000b\u0012_\u000e\u001c$V:?|\u000fjj8oL\u001f-y)jŽ~\u0011TNJWy|i'l\u0019W`GqY}\\y%!B6_䊛_,\"\u0007\n͉e0\f\u0007y\u0017d\b\u0017f9ބ\u001dXޒ\u001c)\u000eM\u001b+7\u0005Z\t;o\u001fUz\u001fݓ˝\u00177t!K\u0012o̅\u0019ޞ\nT^T\u0006n\\=xU/\u0013Ԣo:?}^٘\u000f\u001aAq׏sՃa}Vwm,սa8^/_렲Ǎwolq\u000f8\u0015lQP^L<\u001apƀI|\u00145/Y(j\u0007݅+۲}Z\u000f\u0007_\u001f\u001foַAuEyeqUyދ\u0018\u000fo:k]Wu\u0011n8\u000e_^KpzgXkY\bsQt\u001e-|U$ʵxR=/yiuC:fu\u0005ٟ\u000eZ_T\u00175˲ׁMhm.[^dk\u0016Vz9ϬP\u0001b!\\zR\\}V?.m^M}]mڐcl\u001fry\u001b\u0017ͷ\u001fxE\u0006Aℍc`q\n`gg|Pǃ~\u001eNWU)W\u0015bh:_۳bW\u000faAͫ\\yKzXiW/v[\r\b2-\u001c,jy?_=\u0013mKf\u001fx0W[)\u0003K٭^\u0007`\u000e \rYm?n\u0017/iў\u000b;_\u001d\\7v^fK9o\u001dyP?ZRyޫM=+n<켆 yko*ϧXm~iF4NY\r.|[ dg.Z[wuy>W\u0011\b,;+?׮*o\u001f+_\u0005s9Xݿ\u0003o\u001eͫ\u0003\u0002h<[Ս׃?N~l\u0006\u001e\u000e\u0000k\tTИ\u0017]\u0010\u0010-^=[gq\u0015^~\u000bjqfVt|;\u001f>FP\u0007>=eKsj%W\u0012\u0005ћg\u0005\u00056ٜW\n[qj^ωy\u0010LM\u0015A ±Yoڑ>\u0007\u000e,\u001d\u000f^ܙ\r8\u0000êZ\u0017彠h0\u0017f/T6ޅm\u000b\u000boYmōΫ5\u001c|sfYk1ZcuMmՒB7L\u001e͇\u0017uT9XxoJ˪\u0001YAP6\u0002=W=\n\u0007u}\"\u0011IQ۹mӠ\u0018<{\\yo9\u00166I}A\u001fhn|>V0EL\u0003[~\t\fpp7Z^lFkW\r8l_O߸Qa\u0015pVMV;ו\u000foʛ_\u00157^)4\u000f[/\u0017\u0016\bx+\u001eV6^6_/3\u001fIswg\u0018<}uuw?~j*l\rgA㴸v]];稥\u000e|y\u0004h)ނ%\u0000nkp6lfAת\u001eϲ\u0015\u000fj/WKӹ֊/\fl}מ竇p\u0002AO3L\u0014fr\u001d֎Y<\r\n;KQ1dז\u001aȾ\\jmu\u000e\u001cxcQM+W\n?Y)[\u0002\u0006\u001c\\\t\n*ƣli7`zph˃תs%'pA[_}3\nӫr8\u0010ŃE\u0006*P;7,_ω/\u0016\n \u0004pc\u0018pVs\u001b\u000b\r(_هs/օd)|VD𫝩(W{m\u001fg3w@g\u0000\u000e\nFP;)\rޮ?\tBc{M}9\u0017͓\u0000A}\u001ato\u0016堼v^.\u0001 A>30}\u001bPWd\n\u0004T?~v?/ɻ?q\u0006L\u0006~]y\u001bv.A\u0003F\u0006 Sjo@%׶\\ZKzG4ϊkO˃\u0005\b\u0017݃w?V7_I\u0002\u000e}qwW\u001f_z\u0017<A\u0005\n6\r^\u000e\u001c\u0015N2p6y&h@t\u001a|\u0004ܦv\u00126A\u000f1*\u000bjl]\u0002\\?ؿ\u0000$W\u0002~\u0002\t$uR]=Y;OGKj:[ge\u000bk\u0007eP\u0006ZyV>[V\u0015h\u001bS\u001c\u0001\u00032k\u001b\u0000|؝ʖ\u001f\u0015>k=^dVk33\u0007ͬh\u0003gՃx\u0000sg`k1ځj΋\\М\u0003.k\u0001(]3|\tR\u0005\t,2p!\u0018\u0019\rsXDc\u0010O׹\u0016~$\u001a'Ayg>hYIn0x\u001d\u0014#:\u0002<I\bLz\u0000ߢ~\u0017mG˿{[\u0010sg7\u0017ߕ^Q]Z_=mkcu}m\u001b>\u0003Vh\u001co^~W]\u000f^pxz\u001ao\u001e}X\u000eEuM'0֊0SK\u0006y:x;A!_*\u001de\u0000ZD(=8+/E\u0014'l]j\u0007ï\u000fS{3jp\u0012\u0016E\u0007mAw\u0003+Z~U@6)p4\u001bmNN\u0002ws1ϻqb\u0006\u001a~\bJ?Zdr\u0005\u000e\\Q۫LЙaM|2+%PAo\u001dՎkG\u0016׋rc\u001ed#^9\u00045AɟV@h\u001a\u0017^;Aiw\u0016yo)\u0004\b1\u0018\u000b̖\\\u0005mP\u0019ۨ.~X?\fn`\u000f\\mL\u0001\u0002\u0018(u3:pl\tr\t<o?Y\rxQ\u000b\u0001:^)u.Yђ~4/,\u0014e\u001fqw\tb7e\u000bǋ_?^\u0001\r\u0016\t\u000b\tؿ._\u0001x^ڮv/T{\rR*^\u0004]Ж\u001bg\r^G_7\u000f\u0000Q,[>Aܽl~YڼZ';\u0017\u0007A,8j\u001d~}_G\n{OEuy綸\u0006mx~I\u000ft\tY)l\u0014\u00077\u000fͯXZt=\u001bvs]v\u001b\u0007`,\u000b4_>oŰ]_`q:\u0005\u0017,۵KbZ\\-m?SA\u000b$T}}\np1\u0001㇭\u00130\u0017|3\u0017\u000f<^\u000b\u0015ʛ7q2\u001c-.\u001ah|\u0018p\u0012\\8\u00012=\u000b'\u0001L\u00038\u0018\u0005\u0018#\u000b`1\u0010/%LUndgYf\bG._\u0004+rTnj8\u0007\u0007A<\u0005\u0001\u0004ne2x\u001c\f\u0005\u0019Ġr\u0000\u0012\u001f:؀\u000b\u0005\u0000xQ}>\u001f\"7Z[U[9|2\u0007|r}.=^.N\u0001s\u0007\u0003V:>~J񯧂rQ-Os.N&W[\u0016_?Z\b\u000b\u0004f-m5`\u0003;\u0017\u0002^\u0005k\u001fj\u001e5vKUKPATvAVvy\\ԙf|u'_],E\u0000\u0016\u001cEWlݸVwZï\u0014\u001576^wZ'@d\\}o.\u0015\u0006/k\u0007ߕ+i-\u00176\u0017:pޗ!(u\u0010\nh.<Yy\u0012S&[kOۧW``.ʃ֫y=x\u0005\u0007\u000f*j\u001c>|\u000bxa_\u0015?\u001bG\u0004s{U6GuE,D\u001d\u0005\u0001W{/(\u001f;\u001e-\u0015Qחl\u0000\u0005)\u0001s\u001e\u000etj$\"JM Y\u0013\f\\5\u001b-EBW]\u0002I=:3Ar\u0015\u0014-^[ͿZ\t@\u000e\u000fצ`\u0004Eю[\u0017խ\u0016Kj5d\bx\u000e\u0005Y̱L>Zf:\u00183?YR\f^c%0'\u0017ԯf9Ok{\u0014<<Z\b\u001ee\u001fϳ%֭\u001a\r[a,oĖ.{YV\u0015z?\u0017Ad\u000f\u0007(EӥY޸d\u0015=\u000b2͛sQ\u0017oK\u001b/yu/]\u0018|!lNiw.ZjYrX\u0002ǻk\u0007u\u0002z\u0011XvjpR[(ll\u001f~9(ۧ魛?û\t&\u001b|;P@/_-~&ۘem0Vw{\u001au7/-n?)ޜ:0HP\u0012j\u001f|n/FxT\u0000\u0014uzWOV\u000b\u000bJcX%r%zAa8\u0000y\u0006+\nZo&מɃZ{\u001a\u000b\tF=Y)Q\\\f;\n@iCwAIX{+\u0001\u0011\u0012\u0004E.ÿEykIfR܅o,\u0007@0ɍp\u001d\u000eaf)սZ׃-V\u0001\u0000\u0005dQߙ\u0017-yf\u001a|\u001b\u0018Ԋ\u001c?-\u0005VlF\u0003\u001e\u0005\u0011xTm?fj\u0011DPg&ٰ\u0007هGsHz/\u0000WӲ{\"sOB~\tgf:\u001ftj-\fv>\u000f_\u001cXUCsq[Px_\u001c\u0007-\u0001\u001cvPѪl\\?gSAs!\r\u0018O{O?\u0006\rԚ\u001a[z\u0000]Uw\\ǵ\u001f~6j>g\u001dxXx\u0013/A<ry\u001f`P$\u0007ͼ\n$쟾jf\u0015֘\u0003\u000bUӓ7諿\u0017_iN6v&\u0010=\tȗ\u001b\u0010XpMD\u0015gsr<d]\f=j5v_.jвJexԻ\u0001S\u000biPGA!Y\u0019|\u0004r\u0004\u0018\u0017H7Pkjqc@\"?Y-CMϪ~}w2j-\u0003\u0012np\u0000reމ*{5\u001c]\u0000\u001dC\u000f@F\u0005\r\u0014dD}E\u0005\u000fCP\u0007\tt*P@*11|j\u0005F5g\u0016iOeFgc\u0011dK\u0016b(OÍ\\ywuY\bjjbAa\fv8\f&i\u001c4@\u0004\u0011_\u0001KZ\b'W`cAnG#`zV]TkAu\u0017,\u0019\u001c9\u000e 1/\u0011,~\u0010TvwUw^́_\u0006Cv]yۿ^!\u0001i./2Q3j\u001ea˂!\\=\u0017=㕒.!/j;_W6߶~̶.N\u0002\u00044\u0018-x/h;5v,Σ\u0018P\u0002]R^gݣ\u000f??˅gs<(w_,k>^\u0018O~s\u0006\u00055招Sߢ7o\\b+na/l; \u0016Dj>˦W\u001c\rj\u0015,\\y\u000fg\u0003z\u001dQ\u001aXjS1\u001aTמnT(\u0013Ab\u0002|Qς\u0004b8.\u0001^܀|\u00044[\bj9\u0007Mw{_b\f|&[͕l\u0015D\u0016AU{ǵ9\"\\z4\u0017MV`EK?3A\u0005js9\u001az\u00165NK3%\u00144t]OtN\u001eiv#W>+قz\n;\u0001Xm`\u0015< sՠ4\b\u001b7ŭq-nfqc;|y\u000b\u000eU9+o\\]0.y\u00186\u000eUA\u001dvnN\u0007\u001d`΃\u00059뢾\u001fwN`K[/}:^)8Λ=]]u2/\r\u0018i\u0010\u0013PE<Ϛ{4woA\u000feف}[\u0010\b\u0001\u0018RR`{\u001fz\u0006'og5\u0010.\u000eܚE>VT\u0007tZv.\u0006X`̲jքP\u000eXFW݃\u000f\u0012qa3QfIec\u0010Kս\\\u0007+3\u0007Px</\u0000\u000f\u0001zQm.mz.\u001feV\u000b\u0001\n>B\b\u001e,[Qs#\u0001\\x\u001er9'Kŋ[k{o\u0018|~\u0016Ѭ^7x\u0000n\u0013+n}6^*J\u0005\u0004TǕL\u0016xl{\u0019.Άr\u0007X\n'KE\u0007Ԥ\u0010\u0003\u001fps<\\x\u00120RY>gl־b\u001eN`6Xu0\u0018X)x[@WY\ns*\u001c%\t\u001e, k\u0006/\n\u0018t׍R\u001c\f@իQи\u001cO\u001f^8\u0004ֱ\u0014\f\u001ait.H\\\u00179_Tݸ}T\u0016֮;5\u000f}\u0016π\u001f½.<c\u0003Ja;\u001d&zg6£gl\u0019Tf\rR\u0005.\\γq\u0010b\r\f;Q$WaȻN\u0003`\u0011^|\u0011\u0014E\u00020]\u00177߰*FڍZʃ\u0015\u0015\u0016\u0017z,p_@.\u0006U^t\u0003'agD\u0018CoZZ.>Y,L\u001afz\u00126/W\n˅}Ѹ\u0015\u00059\u0002{\u00058`nɊ\fkG׋/\u0017\u0002\u000f;\u000b\u0012k\\i?WY\f\u001e\u001a\bV9`cپhlg\u0015ޛI},\u0007\u001e\u0005\u0010c\u0013뭩l}\u0019l\\9\u0005lО\r}U\u00008*O\u0013N-,p'\u001f>_碿栒-\u001ck'VP>-\b`\\\\s<o\u0005A\u0006pܼhlɗva\u0002y?U6\u000e?\\{U?}i-|z݃\u0018ā6TV\u001eRsPsu]?Y?z\u000eg\u000e`͟j`Uwo9Yz͓T7Ocqu]#\u001cEQ)\u000e8^\u0014fy;[\u0006\u000bQw@<G\u0004}/[]\u0017v\"Oe\f-oź.lpYO\u0016R׶-z.4%,F\u0003X\blCLgY710]Ey\u000el؝\u0001\u0006o֭?g\u0017d\u001c~6\u0013\u0001\u0006\u001c\u0014\u001bb}>\u001c\u0014^>ַoeо\b[\u0015ا3%j\u001dˢ\u001d]?x\u0010}1g+8\n0h\u0001]ld4z\u000f@n}8N_}8\\S\u001f3ˠa\u0004\u00134|+[yZ\\*Gnx\u001dP;/6ׯsƯgf8\u001c%\u000b(\u001f.(0(@2~>\u0016Vc=\\l\u0015Opf`,|0\u0003|;[~z\u0000&\u0000|9؍\\bq>h\u0015:j;oBx\u00156O*\u0018\u0017+'\u001a\u0018[>Y\f֊F\t\u0004c\u0004\u0015WΫkK2xUwY}WD\u0017CEUmequ!G{09n?=%MĜ\t\u0012\u0004\b\u0002 \u0000\u0012\u0004A0眛sAH\u001a尊+Yk%˖\u001c,ʶeYswoխ{_V9$}\u0002kT\u001aӇ\fؐ\u0001\u0007slu.PvvG̰\u001a\\yp@B⇾\u0010뎀\u00048\u0013qs%W\u0010ά\u001dycsH\u0006?$X=\u0012\u0018@nAErCf\u001b\u0013zN}\u0016*&5&\u001d\u0004k\u0010@\u0013\u000eQi\u0003rtBC߯)h3d|7vQY'>n\u001b\u000eh6xL?Ș1k𠑙ج\f\u0006W`DC\u001aq\u000b\u0019@I>b\u001e\u0001oM`\u000e;\u000fL\u0000\t7\f(Ԯ\u000e, R@\u0017v,1n\u0001m,\u0007'\u0007\u001b,\u0003\u0002M'uJ\b[ֺ\u0016N\nقCF怞\u001a6\u0001\u0006\u000e\u0000ق\u0000=\u00021\u001dҸ Z1b=qOZE?oD\u001b\u0007+\u001c\u0003:w\u0016Mn\u0011&h\u0016\br@\u000f\u001dfh 7+\u0004TsP\u001fCށFC\"c !{;& G\u0003\u0006|60Tq;\u001b@Xp\u0011V`̸\u0004m\u001bO\u0019`S \u0013N\u001dȻ\f=\b<a\u00174N\txq\tb\u0016{T+cb]ʯ\u0013A3XS\u001d(B־c1Ȩ\u000f\u00173zT(\u0003\u0013ƭ#\u0006\u0012ܚ\u0011j7^ߔKK\u0010W\u0000\tD\u0004\u001fbF!G\b:<a\u0004x~\u0018\u0004#9}a'Ǹ,¤Q\u0006U\u0004ȇ\u0018o\f0\u0004L\u0005#F\u00056;õ&\u000eA-1\u0002n\\\f8vITc;2sp\u0013fE\u000fh\u000f\u001b4\u0000\u0000\u0016j\u001b7\t|k5#:\u000f8iflnOC\u001c5/c_ W\u001b\u001bL`Qͤ\u0007\u0010\u001cO~\b\u0010\u0015\u0015uHH\u0003A\u0012`is$:la']K1_z-@\u0000?lB\u001f@GĈ\u001ef\u0019\u0005τF4\u0004Q\u0017\u0006L\u000eTC\u001aG\u001b40\u0018v瀲x\u001b\u0007D:i\u0003|\u001c\u000b\u000fY\u0007@\u001d|= S\u001aJGQ\fqVB00\u0017\u001eTb?'\u0002i\u0007\ruMA\f0\u00124c\n\u0019\u001b\u0011@x\u0016*\r݈GAv!HXV\u0016~=\u0004\u0006@\u0003=\u001e{\u000eh\\\u0007=YğC<\u001a1\u0013\u0001&\u0013\nT4pjƓ\u000e\u001eX\u001b#\u0003N\u0003;!\u0002\u0000\b\u001dAÓ.\u0019,\u0011#!\b\ba1b1'sxHbBT@\fk!->b4 Z]\u0006\u0001,#v\u0007tjH\u001f62N@l`\u0004zpܽup=\u001bs1|\u001a+\u0000`utG,&#1\u000f\u001b&\u0006|D\u0002~\u0001\\\u001cdy꤅iWo|\f7\u001eC\u001a/\u0002s\u0005\u0019k\u000f; \u001a\u001c\u001e@w\bp;\u0016\u00016\u000e\u0006kF\u000e]cр\fnH~VwXko\u001b2\u000f\u0001.`Ү`F%6\u0018<a/\u0004H \rdp\u0015#f?\u001c 1$\u0016\"\u0006n?}\u000b\u0013\u0018sr\u0010/\u001a,K\u0017Y\\{E3r)\u0007\u0004rFLH+m?\r1\u000fYC\u0016̡T}\u0017a:'k@&ߠjL̸C\u0012@\u0016l\u001b\u0018{3<l\u000bޡ%k\tp\u000e8\t\u0011\u00036%@~}z\u0005\u0013I+2z\u0013f\"\u0005<6j&uJyG)\u001fA\r\u001b\u0003^\u0019f\"A\u0000?j\u00118\u001a\u0007/Gd(1\u000f\u0015qe<PX\u0001> \u0001\u0001B\u0018\u0007`0\u001a62\u000bEXƄ\u0007\"?\u00108Є[c\u0017Ȥ3b\u000eI30\u0018qa#v\u0010@BBP5&wM%&a\r\u000b\u000fk!`cW\u0019t\u000emq4\u0010e\u0011fL\u000e\b\u000el6|H+\u0003gea\u0006w&I7}}~\u0015xNIp\u001c\u0005%>\u001b\u0001MI$\u000288L@Pͨ\u0000\u0004\u000ff\u0010C\u0015TSH\bWXƤ\u001d\\%TuJ29.l$:<j\u0015K1Hm^U-\u0014T\u0001~1t\u00026\u001a\\1/*`U\u0011+\u0014|r\u0016\u00106o%?cB9Qٖ+X\u000fX\u0018荺\u0002%0ɐŜt\n\tdF|\f\u0004>rW\u0005̣R-Vq\u0011\f\u001ffd|\u0002|7FDI\u0002G\u0000w@\u0002\u001a!ak`\u001f\u0014\u001eӺxT,tz\u00017\u001aݟu\u0007\u000b\"P1\t\u001bC\u00043\u001e:]7Xs%\u0018 Bdޤŗ\u001as\n\u001a\fs\u0012\t\u0007\u0006k\f\u0001]V2a\u0006;I\u0017H<sHZ~\u0000cA*v\u0011#Tx0$-AF\u0001\r\nвb\tUP2DlD\u000e$\u0016\u0000\u0010\u0002\u0006\u0011S!\u0003׍pp\t:i'\u0006CXݢ\u001b!܈3j\"t\u0000\u0000_-(@5NKA:\f>%\f蜙Lk˞Ё\t$\u0011\u001359X=+ک$\u0019\u000ev|Y\u000b`cԐ\u001cG$H`\t\u0015+\u0002@\u001aԶK(\u0000\u0012j 3\u001f3.d&\u0014;@\u0001XFӈy\u0012.Ocbɟ칅\"\u000fO`f\u0017m؜JSr\u000b=\u0002`N|\u0001\u0013k1L\u001d;K\fG()O\u00133Lz\u0011,\u00193P\u0003PG*\t5\u001eLFm\u001e@Dt|\u0017\u0001Vt6,u\u00152\u0012\t`\u0011+;jg!\u001e\u001aa\u001bCÓ\u0004\u001c>?\u0003t2Y/\u0006z=p\u0013vI'\rx\u0004:\u000e\u0018p3uv::o0\"\"pBPڸ\\7C\u0010\"@\u001apڨX\u001c\u0016-;x\u0015\u000b\u0019c!7\u0002c\r7\\\u0001a\u0012\u0006L\u0006Ex58\u0003&H\u0013\u0000\u0002@QI\u0018y/a14\u000e\bGLbrT\u0010w\u0004\n\u00078\u0004PpHn&CEj\\K\u001a>\u0014kSj\u0007\u0012-;ؼ+[i8\u0019N.JB'&=!T,\u0001~\u000e\u001a(\u0005t\u0007DM8p\u0011\u001c\u000ed\u001cL\u000er\u001cT4\u001ez\u001ab\f8Ղ|`*Lz\u001d.{e,G\u0002I\\\nU\u001a\u001eaR'S\u001d,T1T (P\u0016\u0012\nA\u0011\rP\u0010Ś\u001b4W\u00054=U 3eB\u001d\t]\\Jސ\u001e\"\u001dkSj\u001bi};3up\u0019M&tjM/ԞW(:{trv-9\u001cgR\u000b4\u0011ژhQ\u0011A\u0001\u000e\u0014\u0010\\ɕU>;'\u0016'=2̂/AgLB\u0010q{`,~G\u0006\u0001lc#v*\nLH0\u000b@\u0016\u0012H1\u0017Q\bUZ0PB~KPK\u001f0ZTvWiO=\u0016wcD\b_X@#u6=e;x)\u0014\u0016T\u0007\r\nendstream\rendobj\r17 0 obj\r<</Length 65536>>stream\r\nR~*R]R=G+t\u00022!a\u000b$\u0014?\u0004=\u001ejb\u0015x\u0000ݧ4\u00071\u001e-d'7ڦRt\u0004@5PݐG̴\u0006D'פ\\H56/\u0006o+ |ώ9@`ѯMGZ :\u0013N\u0019\u001cL\u0012ܑ\u0005*q)0ϥ|\u0006\tR*aD-MFd\u0017\u0005<\fn+V\n[\u0012H\u001bpeEi\u0013\"!tǟҩ.y\u0007^Tr\ty/R.~`ɘd?_.͞-͟\u0011svK\u0015PuZm\n\u0015&\u001ei]3\u0011F9(\u0010/R\u00039SN\u0010By0T\u001ezM%gj\u000ftpKHM\u0010j{\u0019\u0003'fpc0|qh9\u0003na℃BdՂ~ef]RJOB\u0010&bvz V*\u0005J\u0010.7^+\u001aP}0\u0010l\u0015\b\u0007\fB\u0005YI'#M\"\n\u0000]0YHmq%\u0013@״:\u0005L+\u0017r}\u0013T\u00039hs_o&gNfO+\f$#Ź͟t\u0007\\GCeoIE\u001e>'gf,jF\u001a\u001e{Z 3F\u001al\u0017orɶ\u0006\u0005UUI)\u0017BP}\u0017⏶L2bl&T\u0019*ն\tpq~\u0017\u0015mk\u0018\u0011&cӔ\nf3f21d\u0002gڽ2\u0011*9j:[LOF;`8\u000f\u001e \nY|IP\u0016ʶ>v¢IAs0)\bl߷x\u00056EJdru8yع\u001fs\u0005xb#@v}Or]\u0003iZm\u0004Rpmݟ_\t7>\u0011&B\u001aY h2u*;tO\t>#eO\u00196=\u0017k\u0000\u000f I4hPD\\\u0003\u0005g3N\u00049(l\"\u0004S\t,\u0016m\u001c+͞A\f\u0001\u001bdå\u0000\u001ejc79!\u00167\\Ҩ\u0005\u000e\u0004\u000fg?'cm:\u0003-\u0014(\u0016K5\u0018T7Tz%'X\u0002\u0018\u0018'\u00123SXHjLߺ\u0004\u0004\u0006e\u0018mT/uv\u001dtK4HU <ؿX/?w!S\u001asP:Tp\u000b9`Q656sҽ\u00137sGa-\ny@]\u0012\u001f\u000f׷BjꄑVM\u001eO40>3jجmSۼ2wғojTg\nKWmgkؔKԄ[p)+\bR\u0018H܌T^ԷxLZ-/=;lfnJj8sK-^ \n>ye'\u001c\u0001bbcDұ\u0017#Patg}bm\u001bչW\u001fprI1Ӌ5w#ͫ񛸔/6(Tz6;{K>R닖,G\u001atz/\u0005K˱Αx\u0018f\u001b*\u0015k1ɞK̳n0\u000fK\u000b#m;\u001by1?\u000b\\\u0001\u001e\u0006ڄ.dDw<j&Ը̴\\[\u000bWͭE`Ko\u0004\u0013\u001f,LGڶOfNז4\u0011a(@\";\u001ekk\u001b勭+.?\u0019?5f\u0017\u0001P\u000btz9PM/\r\b\u0005KL'\u0017L_&[d\u0005*\u0006U\u0000\u000f\u0017\u0012HeV*n.\tj9w¥Hu\u0015\u000fWå%\u0019,;\u001az[Ju\u001b+u6ْK0|l\u0005\u0004PY8غ?\u0017mHE\u0002o\u001f{ ZY4{\u0003LnC_.6%!\u000ep\b\u0011\\n|w~bv$\rUtn=#A\"@h`rWi|\u0019.̛}\t21W6@yܸ;0d\u001c~W(\f&-1u*;\tr\u0019LN\u0004-\u0018H\u0005`F\u0017ކ1B[]\u0007\u0015\u0000\u001e_^ʵozg\u0004R3KP+յljf̭ˏe;#v?!CE,cf7?\u0016` =67cݩ[w=5wYQ:^:J>eljVn/t=8wٍ̙㘔Y\u000bfxǟʥũz'\u001e\u000eVxp\u000bJ\u0015\"U\\\u0011sf:\u001b*egN`\u0005\u0013L\u0002&q\u0011Ntd';z\u0017*'\u0010>:4+kR*8C42\u000bP62\"eRkbȵ9Li|>z7q1\u0013O\u0015fNg=\nh\u001a\u00052Bv&ҡ\u0001;E\u0015n\u0000Q4Wںda٭;p\u0001>6\u0001\u000bk\u001e:w\u000bjeyf]\u0007؀i\b\u000bக`7~zԵPGHE&T\\o\u0017V,&{Rm\u0003O)\r=\nRY>yW\f\u0010'=yğ\u0001N\u001b'x\u000b\u0001rcCoͣ+`@~Psɂh#M\u0016.|iOW3jYѸTWҝ#\\o:\u0007nAJ1M)-P1:L56<0uVM\u0000?\u001fiy&9uk6v9&\u0013\u000bSzwKYq8-z\u0017>^۹ٹp\rJ잼wדn7K#fSX<>I͍\u0013{kgB6Z_uwX\\NuzKW`X\u0001\u0003'\u0000\u0006\u000f.\b\u0010⦢U%4V\u001cLV\u001c$X\u0017mJip`/3A(Q>MǛT\u0019q㸊-C\u0016\"\u001cx0{tF\u001aSՍמ*Bm).H*U*Zs\u0004sP6̬\f\u0002hsP5ɩ@\u0013f{nt\u001b*f{;ՕsՅ\u0013ަ\u0010o^7sE\t94&C5~,\\;e]L̥Gxxi\u001a\rfSSSgR\nKwVSqx1\\:'\u0001\r\"@BT;\u001bŹ\u001ez\rOwUGr\tEp5n\u0004\"Z8zczO*fk\u0012gL\u0006\u0013\\ֶ\"\r)w0q\u0011P:5OSP\u0014\u0012]Wp\u0010\u0018\u001f\u000f\u0017KsוS\u001f36NP\bl!\"^}[\\n\u0016\u0013A-\u001cy-ٍ773].5:O\u001cl\u0002\u00004x0w\u001d\u0010j\u0005>\u0015\u001d%\b\f@\u000b\u0005 Sɞ7{\u0001Kv\u00039Pcw\u001e1\u0013*0..Cp\u0013JĴ\u001e7dZNƼ2\u001c7`ƤAL'ZyZgff`n219sLtR͝+ϸWOv\f\u001eہf|PX@\u0002\b\u001bW!CLϖ/nNm\\K4ʕu:TX=~#ҠAr\u0012]R{\\v'\\\u0010&E0ˁ\"\u0015\u00052jsWJM5)\u0010*2i(\n\u0013\u001a;S @q7\fu\u0007\u0001\fa\u0016GrsD\u0017ƪߋuR)ȪHdF!ѐvs\n\u001do\u001bGnnTv\u0004\u001cIHP\u0014\u0014i\u001d\u000b`n5/*\u0015\u0017޻HsaO;\b@z\u0019\u0013!~*Zc\"\r48\b\u0012\u0016*\u0002QkjOmk\\T\t1/&\u001bc6\u0006P#7!Syh-2ڜvB\bl;큽XDŻryOOBۺ$\u0017p\t\u000bI&tl:_\u000144\u00018cՕThy\r_eպ\\3D%Y:G\u0012\u0013ڶQ*4\tB\u001b\u0012K\u001cytv\n\u000ft7{|aQ!]?\u000b\u0011bvL~TU4\u0018׸\u0003c\u0016Z\u0004\u000f1+\t\u0010'ӳw\u0006J+\\v\u0015Z\u001dH;%#7d\u0013Vv2S:d,@F*\u001eMH\u001e@G\u001bLeĤdHs\\^\u0007R\u001f\u0013\u0006G*ǯK8eX]\u001a,K\u001bJvF(ju|g{L.\u0001%\u000fg+'\"Tofa[b.\u001baR\u0005z\u001a\u0005W&em>7\u0010stqDcWjr+=\u00176Ly2R##{W\u000b+\rj݅+F<h\u0002NZ1\u000fn\u0005\u001d\u0005Pp\b&7\u0012`\u00130)fV7t\u0011\u0013u\u0007y\"/9\u0015?n\"L\u0000\u0007q#@Ԁ=%!`f-Oxhg]2K\u001e|'ۗZgFS\u000b6-;񌕗`P%Z߅\u0019)ϟ=z_7Mz+V\u0017uXhp\u0017sE)\u0018.nB\u0003h\u0013Y|!\ni +ř\u0010\u001e-^g*͞eZ\u0001XS\u0014\u001e,\u0010FbP.FG+r&`\r\u0014@D\u0007\u0016.[\bos<\fAy\u0002sNۼa:T\u001e!&,\u0003HcTH\b7pL{4wJF\u0011.wA 摡\u0002\u0016L\u0018\u0000\u0004d17KEw0pYT(مTk<wF$Bc@\u0003\u0016\\\u000fgUY/_a2%aʜSe&1j^\\5u\u001eaJ\u0018]E[\u0012( ęHy%3\u0012\u001b\u0018}@6\u000e\u0015f}ኛ͸,\u001e[|}!W7jZ.)\r>޵y#\u0013f\u0017L:s\u0006\r4aEȭ*m1,K\u0011#\u0006\u0003\u000bLe!#\u001e!㓋A:vVi\b\u0016\tLI5\nH\u0016\u001aiEp%\u0006ZfgT\u0018s#&8(!7\\A[8r9\\ZP\u001eH8\u0019\u0014\n\u0015\u0000\u0015dyКDmɯVLa;\f򆔝3<6#ųcjmUM`|\u001e\"ݯOiZ\u001e\\caJe\u0006G6ƥҹԑ@\u0015J5wN][9usF9\f\u0011i\u00132s\u0004_ba\u000bL\" ~\u0005:h\"BX\u0007v}8\u0016opp\t'F\u000b`p!mj%{y<zBI\u0015`p\u0005܅\u0011\u000br\r\u0011R\u0006a#\u0005\u0016Ϲ\f&\u000b\u001ej}%FM\u0019Fuà2m1=;x\u0004L x2l0!\u001dLuS#6$ջz`\u0003J!#Ps\u000bSJe\u001d\u0006<\n\u0004S:2{\u0002\u000fksBv\u0011<l\"JY\nl-\u00162-\u00161&\r\f!\rz͈\u001fT\u0019\u0013\u0016\u001f*n]k']?\u000eՇ%P\u001ebc\u0016\nS-,<&'\u001d>#\n5\u001b\u00153fa~Kmϩro\u001e\u0006\u0005\n\u001e\u0007n69vt\u000eg:iұ?QV]~}NO\u0004\u001aΈFvz-XP\u0017qén.E\u0003*dI6h\u0012d8ԦlTQ9e\\R,-\u0014֔ޢC990h(wpҢCh\u0016 vq\"@(+l\u0015RI32.gl6csu?;ԴNi\u0003cC\u0013v\u0003*ŅP\u000eLN\r=kLf\u00166\u001d\f貃S|$8p6qq\t\u000b54n9_q\u0007\u00116\u0003\u001a\u0017g&4d\u001c$\u0005\u0010\u000e\u0007%/]9ejCvϤ'\u000bJ8!sX\u001a7\u00136c\u0016WO\u001c\u0004PïB%>5CK{W[gƬ3:\b\u0013)\u0006t\u0000\u001a\u0015\b˘T\u0004H2\u0015sSgkD{\u001c\t|*C4e*R+\u0015Dg-]u0\u0015)-G+bfn\u0001퇭\u001e.%Z\u0006;04\u0003tokX8fP/\ro8\u000f\u001eTv7P9\u0002LFRr{z\u000b/?ԽOW~'\u0017O?<w\u0011B.\u000f\u001eQ=t,fK|}[m̮m휽|.<\u001eۼx[\u001bO/|٭S\u000b瓍y\"q\u0011F:&$H:w\u00166v\\8}\u001f}\u001c#W\u001eWwy\u001fߞ>KE6R2hO\fkl\u000e\\6:^?ZYllu6/\u001d'^\u001f}?9q출\u0018\u0011-nEFl?]_s\t\u0014٭|-ޘ+Xs~q{\u001e/~\u0007\u0017\u001f|}|gD\u0011ͨBС\n\u0003=\\r\u0015)]WtS-wOl~\u0017{\u001f\u001f[\u0013Wȁ]4\u000ea`\u0010sfsr\b\u0015svԗKݭs\u001eW_/凞;3<|^}^x\u000fo^\u001b\u0019ݜ\u0001{(6?\\UrSZd:;s[ڽ˿\u001fx[!gXsR)15\u001f+mjl܄kE9Ja\u001b\u0012ʪ\u0018\u0017Ws#.ݿy'T\u0017䦎R~H}㠕dZk~a;_\u0013OO~_~ɇ\u001f?\u001f~ϽpTwLvL\u000eu>V\u0013j{٫g.߸3~g_c/>;?z~ŃϽq^0cRyf'\\\b\nBmzq7o=s/<ko\u000f\u001fѫ??\u0002?G/\u000e\u0010jPέoñr>7_|;O~ۏ\u0017O\u001f}\u0017_>\u0017=]3~esRr:^ߴ\u0014'(șrcf;ugo<o}_}O_}ŧ÷ѻ\u001cR|RITYY8~\u000f<o'}_|_\u001f\u0005_~«?R+\u000b\u000e\u000b̩q0fLrs)V$J\u0013\u001fx#O^ɯ?y|w>\u001f?o?7\u0011-v1.wx46\u0015!dk٭cw^Gy\u001fן??~ѧ?*Oo%\u001a\u001blm\u0018\u001d\u0004\u0014f\u001bJuji+\u000f>//\u0007|/_ލG:|EU/):\u000bǎp\u001e|7zG~ޯ{鵗_2\u0015+LZP\u001e$\u0013\u0012CJX޻|σ\u001f|O<//\u0017\u000f~|<0v[gy9HVb+Nm,oom^t}\u000f~·~_\u000e\u0007~\u0017_\\}REy*fhܚZ8rGO\\v7\u0007\u001f~y7?ෟg~\u001f~o|[βRT46y\u000f$hX\u0016͵\u0007\u001e|\rhǏ{?/~\u0007/\u000bv2\u0017!\u0018\u0015Tt;n4Wzs+<3Ͽ\u000b_\u001fGO?7߾3Ά56ZkH\"rtwgy^__᧟~?}/\u001fѻ':sf\"ń\u001ej8\u0014X).\\?goO~\u0015~w?;\u0017nN\u001fJa=nr\tf'z\u000b\u0012|tk\u001e}^zo};?/?__}GϽʩ;,v-HrWҹbk\u0006bjw~fec7\u001f~\u000bΟN\\(\u0015\u00181\u001a3(\u001elRwS;ny]rG_-j\u000e\u00174\u001d\u0011\u0011/z4#l\u001fkqD<\u0014\u001bgΝv=\u000f<v\u0007?{\u001f>䳏yŽ\u000bssh\u0016PxNT0{\\O}\u001f~g?~o/=÷{s{ܞA\\~\u0017\u001d1a3\u001alJ\u001c>ҩ}~W^{^/~Ο\u0017_<b{sj*\r'h\u001e\u000f\u0013>\t%jX,.?}G\u001fz~~~3jɁ\u001d\u0010a7b\u001cD\u000ek.\\RDugWvN>}Ż._zo\u000f+\u0017_x~o#G\u0013ٚ\u001f2!d\u0018\u000fci^ɻ0&W7^v|\u001f?o\\z{xSgϬ[XW\u0013C@nNo\u001d.:.\\r[\u000e^鉧~ч_|w~޳,nfu_8cDyԚ\\\u0016\u0006B4ߩt\u0016\u000b[(Ǜ1\u001bQ\u001e`\u001e]zû|!\u001bʡyE\u0017|,\u001f\u0017\u0004%cC0\u000bq\u001fX'8j\u000e\nv2<n\u000fhLZ\u0007Vr`\u001c-g{{9%(2gvz}f8rI+6jA'\u001d4 I\u001buP\n8\u0017EHP$&H\u001c\u0012j:*\u001bˢFczUyNp~\u001b#\u0007|z\n\r>b9ـ\\9QJ\u000bl:Fd%\"/7\u001a\\.贔T\u0019\u001a\rD=\\ځ'M=s\u001eF4\t߂9ӬT̖fcr&Ux#Gd^/SNSOeVa\rDq\u0005\u000eǨ(\u0017KJVM\u0012\u0015\bۜ(JJ,Rlٞow\u0018Si^ޠF\u001d2z\u0007[1\u0012\u001d2Ɓ06\u0006\u00145-\u0019FL\u001cvIt\u000f#\u0018c\"JgXYPEFY&H!\u001ch,\u0011O8Nz\t\\\u0010\u0015)2\f\u001e^To;hcD7q\u0000Z\f&}b>U]>~S\t\u0010o`\u0010`$\u0010:M\u001eä9\u0019\u0013\u001a8l<u=\u000eLD0ڠK`O\u0012\u001b1n,>JfLr\u0019'!\u001f6N\u0001\u001c\u0018xy9(W \u000bRaE]\u00048(C0\u0015Y}ҤFa#\u0003vV<4x\nYE5vҌ\u0006&̘ڽ._\t\u0015!&c\\+d\u001dą>A?\u001f\u001aZ\u0002&d\u0017\u0003y7\u001b1&7gv:Mo@4:f'\u0015I^.\\M\u0004<dĀVr\f\u0018f}H\u0003_\u0014@H\nL\u0018<:M:F<u\t6BvY%QИHt !I8ØeDF|\u0011\u001b\u001ft|\u0011.6\t=|!ճyCu\b\u0017E+\u00012\u0015-⠚m\u001f1\u001c\\%qȕ=\u0011-$,vԜ\\Vk[s\\rfԈq6<m\u0007\u001d-ҪϝŃQ#v\u0010;&Bk\u0007Y\u001e-.˙9\u001c\u0019 `FI歘\u001c,u\u001bl2\u0019H\u000fM\u000ejl!mDga\u0017Pa\u000eeRJ\u001f+\u0013R\u001ev_A݁`PR5bo\fi\u00185\r d&Q_\bf\t!TcФM`\u001fQJ\u000b\u0017VL$hCZ1jtY0>\\\\\rdh\t\u0019I\u0002т\u0000&~'b%>V>uX6!~%նb¤\u001c5y\u0000u\u0016B&C%*T\n\u0002\u000b\u0003`~a\fHO\u0006c-w0qH0EFij\u00132&\u000e\u001450bډF|cHǰqB\u0004.Ҙ<n_\u0004e\u0012voȀpzg\u0011\u000e3E\u000b\u001e5yT\u0019+LZ(7\u00047:X8Χra\u000b\ri\u001aC*\u0013:!1A->j$-hH0eD1f\u000f\u0000\f&<CE?\u0019H\u00063KFTX5\u0010o\u0002i\u001a}Ca\u001b_\u001d\u0000]U1:CxW ħhǌ\b\u0015\b\u0015V\u0011&\u0003\"\u0006a\\ʎw\f\u0010&$\u000b\u0015xeT~Р7a\u0013.:>b򹙔\u001c\u0016)\r\t\u00184\\:u\rOحM\u0006MLOc\u0005\u0017}b\u0002\u0015\u0013\fq]@t%ffHy\u0001SDE6eSnd$T'21(3nJ tF(T\u0001kD6cMS.8\nq^IզN\u0013\b\u0014Gp\u001cl1\u00019\u0019Z9Z<fpX\u0010\u0007@\u0017S\u000e\u0012Z\u0005\u001d\u0018pw|[b.:g\u0003Ɛ5`\u0017 #\b\u0019%2e-x\u0018##2\u001aHY\u0011\u001d\nkƣFL1a>=m;Ƭ\u0016\u000fe}Pԇaҭ\u0014.\u0006;`x\u0018g\u0007\u00197aAk1Y.>\u0015-/bA6#f\\Eq\u000f\r\u001e\te|cfߐ\u001ezʪ}T`\u0011-0' M\u0010$\u0007jI'cB\u000e:mRv_p:^Q\u0011O \u0007\n\u001e\nc\u001e&cSC\u00136\u000b*?ac\u0006\u001bpi@}\t]\u001c!\r&A/E\u0014\u001a\u0013С\u001cի\u0000ئqǨ}\u0010~1`@\u0006\u001fԹ\u0004BO(;9mCIԊ6Ow\u000fO\u0010\bng\u001c\u0004M'\\wLz@ݖ6/6<`9Y4ԠӋbuGi\u001ersDln\u0011f\u001c\t}\t\u0007!Bm62ᖀ\u0013,8\u0003A\u0011@\u0016\u000fd݃=^\u0006[^2\u000f|%d\\\u0013.j\r\t<bџJ\u001bd\u0000\u0016*\u0007R\\+e_1&F\u0006XM؁@AP\u000e._\u0000Ek,Q\u0013#V\u0016\u0015\u001bpk@(EJ6\u001a=f.&\r\u0012cŭx0}H\u001aP\u0007\u0011E92.T\u0010.S8-o]sS\u0007ƭ\u0006\nؽa_*f7\u000f\u001a\u000eh\u001cCztJ_E4\u0013kH\u0005\u0013\u000bT9ؔ\u0019An:\u0011P̌\u0019\u001cӸD\u0018\u000b\u0018w~ulD<\u0018RS>)OeG\u0018@A\u0017%,\b\u0017,S#6odLIh\u0015JEFvp,rq%T\\S\u0013Na\u0013ƕfspZDe\u0018s,9h\u00034\r\u001e?>8atN\u0001\u0004\u0014DІIz\u0007;f$,4P%AL$6EV#0\u0011:;uǰ~\u00077\u0016CF,4(>\u000f@\u0011K9| +N.F\u001bW6.=ieb\u000e:Wbz>\u0001\u000f[Trag\u0007W\u0006Sŋ֮n\u000eB|\u0018mnxX|$\u0019Bd$ټ\u0017kK$-\t\u0013-\u0015)B-3㡱\u00117uy\u0007Ge.Szw`Hc|D٧ \u0014O|\nW\u00125RCy\u0006SVR}Ě6m\\F\u0006\u0004\u00144n\u001d7!\\(񩾗K\u0002i.Z` \n\u0019b\u0017\u0012I|\u000efB\u0016b\u0018Ӏa\\\u001a\u000ffD'3\u0016\rp#*Z\u00170xx\u001d*x\fƦAG\fG&]f\t{\u0002e*d\u000e)CiP\u001e\u0005'\u001d3y$'z*u%ؙ\u000fSR\u001bCa@Lέs0\u0004qUhL0\u001f.L%\u001e*#m'\u000ek=\u0013&ʊE\f)5p׈*c\u0016E\u0000o<\u001f7`\u0013f\u00042x\f\rl1Q`\u0002^*X=\u001a<+\\\fZHrř[q\r/j'\"s\t-r\u00053FR\t܅Pe˧ܴ\u0018Imu\u0007\u000e\u001e6kn\u0013q\u001b\u0001D?TN46L4u\u00014\\#do';{*7w:9\u0012il{\u0012\u001aL:kzo=A\u0007\u0011&\u0012%7Fv\u001bJ#ܱF\u0012gHI-+2w\u00153\t7v\\ՆG(p~zʓt.>e>f\u0017}>Z\u00102+L\f\u001e\u0011i&\u0014;\u0019%Ē\u0005\u0007\u001eVt\b\u001eP?\u0006\u0000\u0017iv6촪w1\u0010j`\"@s:9H\u001daw5\u0012\u001b\u0010r].%\u0007\u00157n?uMaGc瀊\b*XuY,\\#Վ7Ұ\u001e`\u0000'MFfm'\u0011\u000eBb¸,pspN\u0005_03i\u001bQ\u0002iT*piLbB1\u0018x\u0002NV6BxczWX\u0010\u0010\u001a$\u0016\u0016@wpI\u0003Ӣ\u0018\u000fsT|cӾcvYwT\nL T7\u001e\r4h\u0013bzt DE'{t_,.Q\u001efc˧\u000fjF7g\u001b\u001b`\u001exumN\t\u001f\u000e4\t\u0019!?ʪSgG<W.f 3\u001dm\u0014K\u0016\u0013f/[rn7ر9\n<̴T^֠\u001eK\u000bbi\u0015\u0015J\u0016@(P9^]Ԇ[y\u001c\u0011\u0002dmoĦRmHY')\u0015۵sxM(\u001dBiOZwgQ\u000bIm'[u1H~]\u001d\u000f\u0017)p)iP\t\u001b܅ŭ\u000bO&;Ǡy3k'̄OƚޑGc͓@\\(\u0003c& \\\u0015,j\\\u0012I;\rfo\b\f\u00166a\u0011`΄zծ\r6l\\F\u0019+\u001e>y\\fm%:v\u0004bB\t\u001e\u0011\u0006\u0002I\r\u000b\u0018q$\u0017\u0004j\u0010\n*\u001f̉%TE?>꞊Vw \u001e@T\u0012\fr@N\u001ar\u0012Kt\u0006\u0014\u0004\u0001X2\u000ev\u0012@\\\\\u000bĞM7>G\u000fkݐmVJB\u0011\u000b|\t'6\u0000\u0013\b^3hyUEk͹gy>`b>ڕt[꟪ΞQ;\u00130bx4\u0018TPZ@!\fd1|0q/(\u0011pmMpJ9}\u0017@Hu#>\u0012':\u0011!h!~$:c\u0010,>0P-\\\\ϟ\u001blk#]l\r;\u0011\u000baT_\u0013\u001fnޔ2}!3\u0015-;\tuJ0kou/=YZ<Kjtn5dK\nzu_)\u001aPIm\u001c3KhHGZ\u000bꂩZ3n%\u0018i \u0001\r\u0007\u0003\b\"\t^\u0003Nit}B~n/\u0015˸\\\u0003_ы\u000fڨa\u0013gsj?\u001f2\u0015+{n;4yd26%e/WM\u0003\u0015\u000fD\u000f?ΥQ0T\u001e)M̟|4?sA\u0016\u000f\u0007、za+qKxh\\\n\u0019\u0004Bi\u0005\u0010Ztw<;{\bh\u0010gߘ<\u0017Oi\u001c`K'h+\u000b\u0017!C\u00046\u0002WI!kD\u0005?(6Q\u0007xi\\\u000fGq\u0011\r\u000b\u0010+il\u000bŋҘŧq0\u000eFť_H7ߐ\n\u0013JXZO\u0003\rõ\b!+Q^&5c*\u001f@\u0014\u0013u\u000b!\u0016\r\\]Y~\u001bLWvRM+xļTZ\ndp=O\u0019p)TV,(x ;E\u00162A\u0000)}N(\u0010\u0015\u0011nE\u0017$|JU3\u0011:h:\u001bnHg.-V^{*R\u0001\u0015k쮜y\u0003oToQy;\u001cR8Uk\u0013u#ͧD\u0002.9w\u00074nq1pw\u0016Rui*\u0001\u00066CZl1O@S(\u0000\u00123\u000fGs\u000edg΃ұf\u00132kťXn;\n UL*y'TaRsLfV-W\\q\u0001=\u0001\u0012Hұ+\f5''\u0006\\&׆NN̊m&1&fƭ\u0018KqFF]?z홙ՕKܒ\u000e\u0019\u0006[hy\u0015\u0007\u0012Sv2\u0001Sʫ\u0006Lcnr,-f\u000f\u001e6~\u0011\u000f\r7N#W\\t֊+Ҷʁ\u0011\u0016\u001fz\u001e_ Teef\u0007\u0006&\u0007\u001eB&Bep#doC\\-\"\u001c\u0015F{xT{Q#\u0017*\u0001\u0019\u0001\u000fT\u0018lW5p,\u00007[]S3w\f\u001e|r=9=6\u0004w9\u0003!ʥ֍ڵTTmbe\u0012\u0015\u000e@\u0015r68tWTq\u0017\u001c\u0000\u00126y\u0011:\u0006\u0001\u0013S*;\u001c\fH\u00050B\u0019RL秶s'㭵ڝųS^nhq\u00181R\t\u0017\u0014H0J#FbH\u0011*abSؔ/<l\"\r $\u0001Ҡ8`Ri.0\u000f\u00056RZ>r_fus\nN:{K'\u001f<r~\u0013<\u001b\u0011\u001eUY.\u0016(\u0014kxvh؆m蚞\u0014HJԌ$ό\u0019hW3\u0017q{\u001bET02I\u0011\b\t\u001ff'tϊ\u001e\u0011\u001fqr\u0010\u0015\u0005AF̃\u0003y\u0007\u0019<cͨN\u0006[zieѳ/6|䯜\u001dq˸Zظ\u0015\u000f\u001a<\f)\u000e1\u0017X)\t\u0002$h\u0011\u001bM\u0017\u000bhJz[[@m\u0002J\u0004p1H\u0012S#v\u0005D?cO\u000e\\OTW:6f\u0002#V,\u001el:I\u0013cB\u001e>wƈx<\u0001&\u0003r1h2X~̈́A3\u0002U62\u0013֪\u001bZx\u0007\b+A\u0004\u0018]%X\n\u0016GE\u001e^\u001cq\u0001cc!\u000b6\n􊎢Z6XMK5rM ㄒ/^^KMm\u0006,!.j'\u0007\t\n!\u0006;\u001b\rUϥwϠx\u001b4M3N0I!9U\u0012ũ|{\u0004=\u0012w7,^zu\u0007'\u0019zpw@A\u0005\u001d\\\u0012\r4Zwtf=9\u000ej\b\u0016R|\u001cxe\fd\u0002\r\\\fH71.\u0016\u0000>!\rVbe:/Z`-Yu/F+ͅK5\t \u0005W\u001e'NH+\u0016&\u0006>8(ew\u0000=T\u0010\u0003\u0000\t\u0001\u0017ѳɍh&:\u001b\u001fx\u0005QX7XX\u0000\u00056TZ#\u0019+5 Q>jC\u0001̏V4\u0010\u0001۠JELg\u001a\\,\b\u000boL?+M\\*\u0017F\u001e\"z5>6\u0019vrf\f\n)@nbw|bt\u0012\u0016Ϩ\u001fs ½rYH\u0003:\u0005h\"NL\u001e\fp1\\ ÍoY\u001ei'\u001e\u0000ʄk\\%{R~Y,HY/\u0013M\u0017Q)\u0014\u00128\u0004*\u001dؼq\u000bC\u0013\u0017G\u001cg8n`d\u0004QbM8\u0017\u0012]1=E\r\u0000R5\u001f\u000f6DY2!T3v,d\u0018\u0017qQA\u0003h%\u0005ÄGi#\f\u001dh\b(\u0005YW%r DnRQ\u0014+q)^eR(-^UbܟE\u001a[\u0004b%$(\u001bܨ\u0000n`\u0006\u00060>\u0003\u000e_/\u001al\u001a2\u0010YOj٥xc6`if㖔\u0001\u0015`۾\u0003\u0015jr*8eL\u0004TH2\u0006/\u0018\\/\u001a\\nP\u000bRb\nBvDP\r<\u0005\u001eZ\u0000(Ņs@v,\f\b6?JYW6\u0019\\\u0006;\t\u001e\\\u000e\f]I\u001e\u001di.W`5?Kz.&6x%DЌT\u0005D\"-fIN\u0003XCq¨`Vk0M\u00195\u001a\u0019j\u0004j\u0001\r>%Rg@$\u0004\u0017\u0016bMz\u000b/\u0015+jЋRҽ`mSlWB\r!ٵ\u0010\n|w\u000fp,uI\b\u0011\u0002BXq\u0010u\u0019\f&\u00116&\"\b\u0015\rDC\u0018\u0007=Xwr,\"9t\u0017.\t\u0016^\u001b#\u0016\t\"@r@X<\u001eG;e!@c\u001a1;q\u001aL݃#MR\u001d>\u001ars\u000fKGK+s\u0003r\b^dm_g#=7\u0002\u0000$;\u001d\n\rNKȘ+aeAR\u0002&X=$5]^\u0011\u0000C\fX#\\]?\tU\u000e`ř\u0013\u001dLO\u0004-HW\fva۰\u0010\u001dE@\u001arV48QJ_(_o?\b\u0014W@\u0017;k\rN\u000e!L\u00034\u001c\tM\u0002fAYA\n\u001dkյµ͇z7|{??\u001b\u0014ߐKׯCG\u001e2L%\u000b5|S\"@rlhJ`\u0015\u0002\b\u0007ō\u0000r\n\u000eVX.\u001aH\u0001ă\u0005\u0005!ap\u0010\u000b\u0002\u0003\u0012\u0013TI\u0005kL/V_\u0017gB#\u0015x\nW\nC>\u001as\tF b\u0003jU\u0010^\u00114a\u001b9l\r\u0010uW\u001a+\u0017D3\u0004w#\\[W\u0015,qi5R[=\\bgl|ҫe֌\u0017gtppP\u001d\u000bJ\rWA,\u0018\"A\u001e A\u001d\u0012 ,`\tW͕gy2P\nja0}j&ws\u0007B(/|\u0006k|\u0003\u000bqH>1\u0006\u001f\u001b\u0019\u0003ea3y|}l1l,RU,\u001fh\u000b9\u000eSZ\u0016n\u0016\u0010FlE&\u000f\u0001՛\u0007\u0010X,Μ\u001es\u000fM^\tBʉ#\u0016\u0012y'\u0012RF^E\u0004\u0011`\nzI5uEBrݨM\u0002\u0001RayC\u0002\u0017Zr3\u0006ȅ=LKl-xH-\\\u000fp\u001d\u001a~'Ǻ̴SFYF$tp\u000e5OpZ)ӷ\\g\u0017?=c\u000eZ7\u0017X\u0019A9\u0004\n5Y~\t\u0017C;f%\t3;6w;b\fd`1$ Qhhk#v\u001a\u0016S\u0000G쨃zxЕ\\\neg^|t`U\n4Z}\u0010(\u000eMv\u000f&4\u001e\u0000\u0003&\u001dun<\u0005B\"Q\n\u001e\u0006\f\u0012\f#(&7;lEO&׎7ɕ\u000b\u000bp2&')1ўZR>bcvL镋\u0014!'YѠ\u001d\u000b8&f Ts!wx0\u001d\u0007\fי\tϐG*9\r\\ קٛ\u0010zb|n\n)1.\u001f\u0011!f\u0003YF @\t_\u001f3,\b\u0000xq|z\u0002\u0019\u001c4\u00065!=i8\u0000*f\u0000'$jkR\u000ebiȄ!LL\b\u0014\r6Ԩ\u0015m\u001e\u0011\n\u000f\u0011o\u000e^\u0010\u001aw\u00122\u0000'\u0018%IKQFMaRJMM=m^6EkU#5LHz\b\u0019\u0013n\u000et=\u001f\u0000C)eR.)i/4\bZi2 8a\u0002\u0000ڜ-1\"ftN\u0006R:ep0\u0000*\u000eT\u0001F\u0003\u000bb'0\u0004R/X\u0017ŅիzyzzpI/-l%uꄋ\u0005ĉ\u0010)gH\u001dXe\u0007{j|\u0002*õs\u000f׮Y?L#`1\u00132T,$\u000bw\u001c!sXsCLv8\u0007ݪV,\"Fz\u001e&7Îo\u000f9NqZ3R8X\u0011U¥l\u0013\u000eL\u000eVnՋ\u000foNw\u001bHIkRr<(f0\u0013\u0013\u000eGE\u00101c1'\u0003pq\u0002,C^&\u0001~cC\u0011#lrҌV\u0014R\u00195V뭜\u000fdڰ\u0014{\u001b\u0007@\tS\u0017XUg\u0010\u0017\u001cf\u000f\u000f\u001a\"DF\\Ddƺ\u0010\u001b/\u000e_8e\u0002c\u0013bO\u0005\u0004M-UY>{\u001d\u0013\u00141)\u0013\u0012\u0010\u0014\"bbĂQ' jI[=Ҩ\u0019\u0005E\u000eND95ju \u0002.M.\u0016DZ2]\u0003rI+-۠R|^\u001b\u0010G6\u0016`g'\u001c\u0003\u000f\u0006*NO@\n8Q\u0011\u001cs\u0011/\u001bب\u001993E0.ķcgCf\u0006+\u0003/\u0004R\t\u001bƩ\u0019\u000b`jV^/g۽\u001f\u0017\u0000g\u00046\u0014*/Y`Br֧d-L\u0015\u0007\u0015>9j\u001d\u001a\u0019\u001d`u\u001b\u0004\u0018,j\u001a}7\u0013%ԒtϖO~ML6\u0011>X:\u001b(d:\u0007ݍG\u001bKB\u001bJM.ޢ)\u0013;\b4OG'PǊ\u0005\rn\u000b\u001c\b\r\u0011r̈좜[&\u0013.ət.\u000b\u000bO6|'=k]/gx\u000f19\u0019,ŞE<!k#v̂(\u000e\"\u0006Bd\u001a\b15RʏXc\u0006\u000fLJl\u0005ݐ|\u0003-L R\u00023V{Z.]YHUgBTX<X\u0003o\u0003Fl(\u001dUKcÐCb\u001cI\u001cիVpjo\u0003u\u0012H\u001c\u001a\u000f5XL,]g\u000b\u0006;:fEm>G@136nh9n!#r~ɧtbz\u001f2\u001aw00!hu&&e\u0007y5ٚ LAAF٠\u0003\b1;dB\u0012D׈{ɹQ\u0012]h\u0000fT&܌bj\\\u0016wYqj\u000bp[\u0015\f7\u0003PpN\f\u001f\u001b2\u0002I\u001c6N\u0016\u0014vRW\u0017\n(_^\u0003y%\u000egD{''ẗ́\nT\u001fS\u000bBAU51i2k\u00001#\u0001;\u0011p!W\u001exT3԰K|5x$\u001b\u0015b]T)PJvnZyjVdw8wyrKja5~%6*e*P\u0001`)&fY{\n\r\u0000l{{f7\u0002[\u0011V\u0010>G+C6jĎ\bblpyLv\u0003\u0000vwEj?]ڎ\u00033.\u0015(Q@Tz\u00118$\u0002!A\u0007\u001c\u0004\u000f\u001e\u0000wƈj\u0005\u000e⌍fHsKHt\u001dLN@F4\u0000\u001bP`\u0016wz\u0010HF\u0006e\u0004F'\u0005q ~\u0002ҁ~s皇\nrz\u000b\u0016Lvu\u0012B\u0007 LG\u000bSmM>.\u000258huC>\u000f\u000f\u0007@BԈ\tF\u0007cS&\u00122|Ci%5pS:P\u001e\u000f\u001b\u0004fK?]\b(#\"\\YXy4*\t\u0019ri91n\u000e$`vF\u0017kv5؟4\u0001';zq63{\u0010`\ne7\u000f71E1f\u001as\u0017'\u0006rs4rOsSyĆ\u0011NFt/&m:y[Jv^0줍@l\u0002\u001ap\"=OgV//(\n\u0015ٮlb|p;^\nWMX):Ȱ\u001bt\u001f2b% \"hyɂ=(\u001dS,\"\u0016`\u001ds؄sMykN뤢Խg^z\u0006\u001a\u0010\u00199\u0017n;\t݆Ȝ^)L\u001eJi\u001bn7x\tF=\u001e:\t>u\u001bXHH'Rۘy$\u000bS;fj\u0005\u0019G\u0006kT1\u001bx>a\u0002\u0018\u001cğ2\u0011\u001eFŤ\\\u0015t۽G.\u001d2{4c\u001ads0\u001fBe\u0001CG\f\u000enΙ `܈,Iڷ\u001b\u0018<6`h+Y}ڸKƤmc3&\u0002p2\u001bȩ}\u001dTX1*@Ɲ\u00152#50\fD\u0006͵@\u001aH|'\u0017\u0019\u0006]+\u0019l䋃嫠\u0011\u001b$u\u0007\u001d4b~O`\u0015.Yȑ@iz=L4\r.\\\u0004\f\rn`)j%\u0000N\f\u000ekRkye1|qe\"\u000f:P\u0001ǆ\u001dTC\u0019DIpL7!\u001aDG\u0005?Uί\u001fNB6ζ7^?x6x<wόXEG3ڽd 8'&z\u0016L\u00056\u001aL5i-?\u0006Ɖ\u0013ĨSQX\bg?p-7\u001d\u0018s&\\sr\t*T˴7r݃ERpӡPu\u0011j\u0017\u001f\u001fnϧln'r~\u0010\u000b\u00112q\u0007\u000e\u000bZ0t\u001f\u0013\u0014{\u000e\"h*t\u001aom\u0016Ooj.\u001d\rN\\j\u000bW_Η_\u0017+c+e_&|~\u0000?\u0007s!\u001bf^\u0006c\u0007<b٥bjRgԹǹ\u001b3wo'gS/ݭ\u001f\t]\b`\u000ek8\u000fx[\n@86\n3\u0005N\u000fۿuxb\rDA\u0014\u0013ʋ\\iE:!-:6ɧgMD\u0005\u000b,\b6Z֋G{;>2\u000b{Q-i઒u:@\u0006\u0007˻[ɓމ\u0002zȂX\u001b\u001e3|<j.ݝݿwIwz..s\f\u0016\"4{p\u0019rʳ%T-Lx\u0004';:\u0006QFr\fRƄkn~\u0018\u001a\u0006\u000eǚ\\\b+\u001b\u0010I6Wlw3PV\"e.R\u000f&\u001b7';\u0000зX}e0M\u0007ꃕFm\u001bUI]\"ha\u000e\"\u000e\u0019\u0000\u001d-Μ:\u0005\bR~^-\u001dx6\u001ez\\p.@*gs7k#)\u0003\u0004\u0004a\u000b\u000fS\u0013Fl\u0018tX'\u000b1Ac-$'\u000f<l\\w+}|\u0012\u000fTP=Z^\u0004#=g{\u0000\bc>\u0017ҧ&ЁK\u00056ڕ\u0013VD58i6TIv\u0006=\u001d\u0015ӈƴp%Y[d\u0003ҽpe\nt\u0018\u0015@gV/|#\u001f\u0016cӸ\\d\u001e\\0\u000e\u001c\rh%9=IwB\u0003\u000bc\n\u0004r\u0004\u000f\u001a4`~ʵwKK}|\"o۹vkp\u001b͵+|y(5wYm[;W7.\u0003k3f& 6=l_\u001c0x|LC\u0007>Bz\nl8{{\u001bZ\u0017k-\u0015\u000e\u0007\u0013݋[\n@2\b'>\u0011ӳL|FH/\u0012qf|Bҧ\u0014,\u00035\u0002}\u0012@!\u0002X<\t5/\\/_\u0005\u0014\u0007s\u000e@X\u0018\t\u0017[k֯<=x\u0012.\u000bɆ\t9]̅.N'\u0015T-4ƒ\u00195t`իXYx؎l?Y_\u0006}ذƀ0*\u0017.'+kڪ,.\u001f~\u001c)Hw1;u1^۔s\u001ea؆{pBk`Y+dTr6ӻhB'G/\u0001c\u0001`\"۷_ZY\u0013a/֏ƽq\u000bY)SFā(ɭxscJQEQW239ꕇ\u001fɮ\bЃCxmys˸ZE\u001c\u0017j1OL\u001c\u001br\u0002\u001a\u0004\u001fS\u0007}nL\u000f\u001bQ7!*>XrԫbC\u0006q9[Vf\u0000jBTח.l\u001c޻;ަ락Ͻ\u0002g?hکC;-heR\u00035B\u001bWCz\u0015?cr&СJnV.Fop!\b6<\u0019i\u000ejN@}+\u001b3N)\u000f\fFo:՚\u0011<\u0011iEU<҂*\u0019\u0012*(m\t\u0013\u0012\u0010\bhmp53\u001fVӭ^km\u000fw\u0014\u001b\u0003c^\u0013n6\\^\u0015\u0013Sb-\b=\u0002G\u0016 oNVD!L.:64`trZ\"\t\bxi`\u0007<v-Z\u0013\"U\u0010~Ч\u0006+Й\tAd.\u0005=:648\u0019\b\u0002la0h>!0L/.1\\o>srmR\u0004˥\u00019q;s>P`\u0019L;Ȅ\u001bl%\u001f\u001d\u0017[YLn\u0019\u0001Q7hMbjYOԯ=x~sRTmfnR\u0012\u001dXa\u0003Ysڈxhu\\!l\u0014\"B/\u000eL\u000eY}\u001f\u0018Ðκ\u0018\u001f`j\u0003MF\u0006s5شRҭ|8\ngx=>۽3yTo\u0017fX\u0007jQ,\u0001c\u001c\u0012ă;\u0010\tMʩq'\tl\u0005\u0016bJzz}ӻ+\u0007Ӌ;?7\u0017\u000f&KL\u001e\u0004+g㭝{\u001blܺC63a<2{\u000bo*v>O>FEƽG\u0019N!&Jv3\n\u0017+W\nRe|khғs/\u000baˏ?^<4Y+\u0011N:1@TAEAU\u0003u1\u0002\u0011[\u0010U\u001c\fB\u0001o~`&\u0002>wǪ\\+טV\u0016,\u0010\t\u0019\u0017f\u0015i\u0010\u0012NL\u0005o1y\u0001N\u000eSn\"\u0004D8J\u0004-D[ʆ\u0005\u0016lЎ2nFB95ݩ\u001eW\tѺO\u0000\u001b9+0Wt\u00032R\"C\u0016/4\\â\b\u001bř\u00035?.^\ndD)5c\"MLLY\u00107\u0018\u000eX=19~y}Jy\bGj\u0002I\u0019blķ\r!;eX)\u001f\u001bq@i!X^P\fPkKtv4\u001b(f:GjQ\\քh\t\u0016ÕXs\u001b\u0019A\f:\u001b(1\u0016\u001c\u0002`<3\u0013n`Ġ\u001d\b\u0013*iLgxaf`A~j{өGkߘ})\\c\u00155\u00176.ޗғzaty\u000b\u0004@NrJ,?y7_u\u0011%3'zzqej{z/vp5%;\u0019o\u0000ܮ.\u001d}\u001f\u001f}uww_V^JRv>ZnYSL2l\u0015\f~nƌ&X\nq\u0017\u0014\u000b\u001bj~G˓V\u0010m%7&Z\u0000&P;X\u001a\u0019HѢh\u0010zwpSɯ< !g\u001dOjC,\u0012\u0018urK66(h5_/N]6֢B%\u00071\u0006U\u001b|TTH\u0007BFjy\u001aH_\u001b\u0013EP\u0018`͉&un\u00129Q\u0015|j#V܏*\u0019!ݏ5p\u001bWr$H쑆-\u0014*$X*R\u0001F1Ĩ\u0017D\u0010\u000b\u0017\u00114)P\u0007W\u0006E&tΘр\rV̑SJlX$Y\u000e\u0017&I-e:rz\u001aX\u0014\u0017B9BZT\u0015a!\"&rn\u001e!\u001cB.\u0004`f\u0000ͻ\t́&7z}|\u0001$\u0007)C@\u0013!Bar{\u0001twԓjZ\u001c*^0EY\b\u0014i6\"&t{\r0@\u001a}56#rgt>8\u0011IU\u001a{ZK;RԜ۹څGo_yK;͕;Gw\u001eo\\~ܜ;yڽxO\u0007\u0013O>i\u001c4v\u0012gh;/\fOy\u0014X\u0010Dx{h]1n}Q2L\rkUDo.>fן:cn\u0011h\u000f1ID.'\u0003D\u0017#vg\u0006\bTg\nW!6N\u0006lnb\u0005H\u0011$o\u0001\u0001XJVu/\u001e4WRS\u0000\u000e'\u001c#,\u001e\t \u0013C{\n?\u001dNIO]\u00143RtQk8\u0015ր2nЧ\u0002\u0015\u0010!F0\u0004\u0010ză+\u0005\u000f\u001b789`\u001c\u0000\u000eO\u00193f|N\u0002q\u001b\u001e\u001b\f0'P+\u0019\u0016J~ND̰.)D(7\u001b \\\u0018oj\u001btp)&j6T'Ƀxk7=GE;\u000b6X15TcU>=\u000e2@#\u0016\u001c0&\u0010.M|g'h-O\u0012u!=I`LR=T\u0004\u0006V\rWΆk[9\bh\"ri\u0005PfD\u00183RB\u00117yQ\u001bQ7i7\u001di]GbR\"aԄ\u001c\u0014|w6R\u0014\u0015)\u000eU2\u0001Fk`$P\t\u0017nBvt,Y]غh,\u0001WU윚\"-\u0017\u0013v\bAі/x\btg`M-7)\u001bw~0w\u0007Jftby])^Ro|wS4\r7wGg\u0017./\u001b\u000fݿG@T\u000bH@mj~/.\u001a˷~f\u0015+&\u0003At\u000ff\u000f{u95{Xyؘg$.\u00175V\u001d\u001e=x<7\"s˳^0>p\u0013ዷ߼p-=;\t\u0005\u0003e^&I\u0005ZLXۺ~xe\u001b,['a\u0015\u0007̳\u0004A~MJ/q&\u0015bF\u0005\u0003J\u0015'bRLMk[r領xiޟ[mV\u0013\u001ei=\"!Dx51f\u0007L~\u0013(H\u0019\u0016GHaA\fC˝zy}@(F*Nt\u0014P%\"\u0014$\u001b*YK\r\u0003\u0013\u0011\"\u000eX\u0017AZ\u0013v#`\u0011Obh܉ |P|R?7srٟl\u001d53\u001d`a\u000fH!%T\r`\\bϘQ70 47\"*ilS\u0010!E)9/\u001d!L\u0007pQi/˨p62w1\nl0j\t%PC\t\u0010^qFQrՋ\u0001\u0007\":\u001c#%L>5PX\fUVD6wYll(o.\\\u0016f`6\u001e.\u0005\n3r̈́\ny\u0010i`^ؐ\u0019^>O\u0006KBIH\tQe+Jo\u001d@ktrw>\\Z\u0000\u001f\u00150.άo\\\u0003\u0005PP\u0002P\u000f\u000erZqNNn\u001a(޸Z`ؘo!N`QZ\rU7Be%}/n<z{J\u001e\u001fvM@\u0002Hcz\u0017D\u0005(!\u0012J7T\u0000\u0014\rD.`N\u0002qNM-\u000b\u0016Dq\u0001&X,.%0k#\u0006FYAv=\u000e/FxwO\u0018=%\u000f{74\u001bjY5V1:$.|T\u0018e└'ˀ\\RԊ?[-\u0017/Ȁ\t\u001dVNf|(Vp2@MبtA\u0014¤\u0018\b\fHYMRu$%zũszvEj`J\u0007\u0006q3\u00120\u0005VoM2ٽG\u0006; I<0\u001d\r|ʁ\u0005\u0001\t\u00032)\"bFINj\u0016\u0000PYa\t\u001b\\=\u0005\u0018G>ZG\u0010`\u0006\u001b\u000e[\u0011\u001cJ\u001dv\u0017\u0011`GR/{FK@gGE\u000fs\u0002x=\u0012@$#'\u0013^C\u0001/\b\t\"fq0x@vtp)\u0017\u0011\u000b\u0016y)L\u0011\u0017:QU[\\\b\tD\u001c\u0011rqJNI\u001cB&\u0007>dp\u0000S\u0013#1ъ\u0004Ksj8VM@\u000fL@d\u0012V^!\bX1S\u0006ྰLqBcvu敼2A7.zqM\u0000`S\u0010>DY5TM\\jBԓ(ۼ\"\rbx\u0011\u0013\u0015\u0018)^F9]Ͷp=\u0007!'ʹ;B(\u000bR5u\u000eܲ`\u0006\u0011` X\u001a.T\u0010*`r\u001e2\u001b\u001b/I\u0016DpQ\u0013\u0001\u001a\u001d\u000239\u0019;,;p\u0002+&`CdRJGVXu1S3}9>E\u000b.BW5\u0001Ct\u000eM\u0010ZV<jt[0/i9\u0019\u0011縓\f&<Lҁ\u0006\u0005ӄ\u0003bڱ\u0000DG\u0001\u0018\bȸ!\u0016\u000bāTK*c&\u0012(FRS\u001e\\w\u000b`&\n6\u0000jڸ\u0003\u0003U\u0003wB\u0014&\u000e\u000fas\"8`lbs:]^\u001f(ǜ:\u0000Y0?v6jݨjX\b^\u0016'B\u001e\u0006c>:(\u0017\u0005982\u001e\u001aOX\u0010І'F\u0011A-VR#\u0005A }tlyr52\r\u0016\u001b\u0012\u0006\u001a%Q!\u001bpM\u0001\u0000긃!6\bq\u001d\u0015H!NG])RC\u0018l\u001eAy\u000b^\u001fMw2[ذ=<\u0018p\u0018C1?&\u0004]K\t-aq\u001c+7f6\r)T%`\u0010\u0015\u001c\u00167\t?#\u0005\u001eot`\u0016yh\bt@8n<\u000bt21\u0012΀\\x%F\u000f*|q9bD`NXݢ\u0011jEĤ\u0014B\b/k>\u001b*\u0000A\u0000\u0014ǆjTOL:Ec|\u0018\u0017#+`\u0000\"E\u0017,x0&FN\u0004ڽ,\b0\u0000|Fs \u0012l\u0004\u001a\u0018iC\r5ʇ[N\f\u001e\u00021\u0016'1dp<\fH\u0004b(OH1+zl:aMlނ\r:IsR܍J.D4;!\u0003eB\b\u0000ك\b\u0004SӇ\u0018V\u000f)\u0011D\u000bdp)=8Om\u0007CY \u0013\u0013fl\u000e8O\u0019v[@\u0004\u001b\u0011)-T5[q\u001bābNQA7,|Z\u0019HN\u0010?Ll^a\bq󘕂\u0010?؞\u0017OM JIq291\u000bzz\u0005Ӌʴ͒|\u000bO}'Ǐ\r@v\fΩZ ~\u0012-\u001a+)\u001d\u0015SS\u0006\u0000\u001c\t\u0013\u0016a'X\u0002\u001bW뗬\b?d\\I\u001b!\u001aatR9%\u00189ƟG\u0019*)^\"\u0019Q'!sxq@)\u001e<qb1,\u0012N3z\t\u001bqx\tΟ\u0003m;i\u001b24?Q\bH+C\u0004(\u0011\u001aL0\u0014v\u001f-\u0004s2D\u0005\u001chA˫i9T08\u0006\u00034\u001a\u0019gc\u0010\"\u0011%D6\u001a}3;|6\u0018s\u0019-}sÄX\u001aL\u0001\u0014YAQ:&y\f\u00110d#i9<8(\f\f\u0013\nJHv7bCe\u001f\u000f8ƀ_2\u001er\nCr\u0011APYݒ\u001b\r:\\\u0019\u001d\u0019Z\u001eMUx>AϯMq\u00196\u0016f\u001f\u001awN<lwG/\u001c7lg\u0018%O)\u0018-\u0010Ɇb\u0005)\u0007!\t \u001e\u0000k\u001a/4<c\u0019\u001b,v\u0012\u001eT0y\rи\u0005B,LET\u0012NO1q4B\u0007NG>ؐ?Ȁ\u000e\u000e\u00177ȎQhԂ8xF`x!y̤N\u0013\u0013\u0005'F#L\u0019Hd0Q{^W\u000bF2嶞8l;cnP\u0012@\u0005;!s|jziIK&\r\u0012h\u0005cx&\u001eOG积~ؚ\u001b2Bg&\u001cg\fV\u00169uU$ǫr<\u001efybp8$Fl.ZNUSjH\u00114Mɠ\f\u000fV5c \u0005Y\u0007UQ\u0018D\u0000\u0017`ϸ\u0003\"d[S| \u00116Q>y\u000f&X]1N->&&|`vXG\u000b삠\u0018P\u0000ȝ\u0002||(]\u0016y>'I8},L*\b%rNA\u000f*NYRp3T\"\u0016\u0002AN\u0014B\u0012\bI\"4\r.ŃH`\u001er^T\t\u0015nލ(\u0019p8tX\u001c\u000e,˕lWI\u0017vm?6\u0017\n\u0006\u0010Z`\u001e>\nNxCV\u00025l<\u0014E0_S~IR^\u0001\n1/,\rc\bp8)|\u001f(ؽ̩Q\u000bG4\rAÃ9<\u0006\u0013y\u0013#\t+aqP\u0016ɜ\u0017e0-\u000b0?31ZLLCq\u000b ۅ9l\u0016t\u0005)f?S-T㉌VvWZGK+R)RB\u0003g\u00172\u0018&l.O@\t=sL\u001cU\u0002KJ8\bl8\"\u0017\nL;z//߸z6[\fۆ& \u0006I\u0014%Hk\u0002\u000bH\u0018L7JZ<6t\roͯo]/\u001c+\u0018,\u0019.+Hn3AU\"4/\u001d.\u0013ROg\u0016o=~#Q脇\u0001<z\u000e\"fO\u001b\\ǏP8\u001a\u000e\u0017\nT:A.`\u0018\u0019A){竝?\u0012[[d\u0010JZ\u0004q9&\u001a(°YGl1\u001cSa)ks~.ԕͣ\u00077?хͩZ4\u0016y`ȅڜ\u0004J@M&(\tGqsqQ\f\n^33Uyv}{\u001f</ϾLZD# \u000f(w4E).\u0003RJ\u00062!Sv3lss.>{pj\u001aE\u0004q1Ōѓ#8e:q8j;\u001c0dDLZ%\u0017PE#d.Hڋ0N\u001bAZ\u001d\u0014pJZax\u0017<n8Go^{w{W\u001f_](ə,vyp[\"I❔{(ﭕNƹΣo̼}o?~?:u3\f\u0016ui%\u0007s\bT\u000b-q+k7g]|/\u0017]gWW\u000f?f2\u0019!ˁKii\u0011ڜM\u0012SK33\\70<x~\u000fy\u001bgצA\u0010DS\u0006\u000b'fcF%8G\u00025;\u001a9\u001e\u00051\u001d}zw{7_|1:53^؝ڸǇn\"a\u0011ɭН֍z|_>go/{w\u001f?|xϿ|O̧Tr@&\u001b\u0014l\u000fq^v6\u000eOߺ//\u0017g?O;_\u001f|VNymdRѓ`eŰxy9K{*_s7_=\u001f_|/?/?w_|{[j\u0018\u0016\u0017M~\u0017AVm\bOLrq\u0017ٟO=?\u0007/hW\u001et=\u001a9\u0011·J\u001cAd4Vk&_?wO?~.\u0018??Ï^?Z\u0017b!$=`(RR{]|Ng/߹+[_}p?}Ӈw~;_qB.p<\u0007 lx\u0000Ol@\u0007.<~d\u001f{?~ʏ?/g{?ywm\u001fsqX <\u0014纕vr_\\o;叟'{~~_/o߽w.,wc(l\u001d\u001a3X>R9Sj!OUw\u001cN\t֓7\u0013\u000fWy[<[٧7??z^\\u{bEH<\u00177\u0012j\u0006oz\u0017\u001f]/n|^[_>Wo+msg\u0002c\u0006ccn%:;\tx-_Z;=ӯǟ>\u001f_=_W\u0017\u001fU\u000ef\u0004\u001dVp\u001cb\u0000gHQour\fK\u0013\u0007S7&x}\u001f\\~ŵ+Ư>\u001f\\/?\u001f\\k3wwT\u00000\u0000\t1&Z)\u001b.Fz\u0005mƟ](lw?ϯⓣ\u001b\u0017\\ \t\rA^\"\u0015\u0013(1[`O\u001ew/\u0017߿s֝ՕbXcIᢤguK*t^篮n~?~?\u001ewW~ŏmklUŲ\u0012rj\u0006(\u0012pAGsXB&qzs*30x\u000f~/ߺ+]{|8h~e5\u000e2\u0000=\u0018f\u001e\nk\tId迱Y\u0017\u0007';?/><׏\u0017;߯M\u0015d\u001c,ND\r\u0013$GT(\u0005LG=g\u000eO/6>|_?G?n<4M \u0011:+dA\b+b3J\u0010$of\u001f_߾vֵޯ>o}xsO/L맧\u000bjG\u0019ZDI\r\u000bGi\u0006\u0002\u001e~l7{~|gbٕ'G\u000b۝N;ՉNA\u0003i\u0007*\tZJJZVVbT:\u0013V:?_ML\u0017bO/?yyןϟ߹7ޣ𽳅\u0012\u0010`@pX\u0017f&;)\u000b锻\u0013\u000bee-Z?-w\u001f?_ޟ~o|G\u0007sV!\t׆n \u0003\u0019\"\u000b\bJ+\\`psKg?zz\u0003\u0013Xq3d\td\u0016Ju\u0005! RT)\u0011Z>^h^{O\u001emO_*M&@D\u0017tUٰ\u0003\u000b:\b\"i5GtC#,\u0019*\u001dR!9\u001f\u0011ֹz/-:T#\u0015\"I\u0001&,\u001e\u0012p>\u0005\u0013~\rǣ2l3]fRWWRܞw\u001eݣ\u001f}϶>;/\u000fg#\u0001\u000b{ W\u001d\u001fec0\u001d6C\f죳d5\u0015rz\u0004Yo\u0005MG//$>o{_z7.><wlJh\u0001U3j1\u000fQ\u0017\u0002|5:Si\u0007N.J\u0005R~?secj_\\@((ʚ!nB\u001aC\u0012\u0014F\u0010\u001e7\"рID1\u001eI\\Tb:Sq_X\u000e0t/&\u0001\u001b`R,\u00059\u000b\u0004 \u001eRL8[nKal1xqTR7'3%}\u001cH^\u0017Q\u0005!*)\\x(\u00063L/\"JJF:)a\u001cğ^zuvw[\f`^/d{q>\u0001\u001c\u0000\u000fNɊhb!\fJ*\"\u0005/Hq2DcNl\f;1Ѳ\u0018\u001d(;,3bT\u0019'3e\nl\u0001X:a\u0011YFp\u0010rz\u00191؉Q+f\u0012ri!#\u0000!\u001cH\u0013I\n5\u001aR\u000f\u0005@@\u000eC\u001c\u001f5hIbj\rԤ`\u0005g\u0002ãQ\u0015#ˢеP\"\u001c(eBy\u0013ۙ--V&HGsѰ\u0013\u001e\u001f6\\{X\u0017F6\n\u0011\u0010/d+˩lc\u0018Ms!>I\tYme]yL\u0012Qe\"|(K1\u0017\u0015W㓙L `wx\u001bAyMR@ Lz<Y\u0015r\u001e26\u0001\u001aqZ(\u0007\u001e\u0001Wu\u0011FIm>\u000b\u0019\u0019\u001d>уČ\u0012\\\u0014E\u0005r\u0003rv\u000fOq\u001f\u0015ĸ$\u0017n*٧|d`\"3!\u0007\u001a(\u001dFP\u000eDZPؠ\u001a+\u0012a\u001a\u0015T',a\fc|zFߌ~EȄχ)\u001a\u0004\b\u000b\u0018U\u0006ʸOa0e49))\u0019\u001dB\u0013oS=9+vT\r\"EFz6TZDDҙ\u001fu']c\u0010O\u0004bzVLIH\u0019ƟLБOu\u000b2|ʊ^\"QɎ\u0018L8U0)\u000f\u0011a'\u0019:̈́\u0006`p\u0013\u001e&H͟hJR0ՠ\u0004x\u0001\u0017t%H\u0004\\\"';RI&PtI\u001b\u001ep\u0010A\u001b\u0016\t7\u001d3d7B\u000fi\u000f\u0003)-RE\u0010(N8N\u0013u\u0001.ԑgB\u0000'=/A\u001eH\u0002Kc\u000er>\u001fb@^\\\u0012d\u0018ܞLH9\u0017\u0015\u0005\u001f\u001b\u001bL\"\u0003l\u001c-ժ\u0005\r[aIjg\u0016\u0016\u0011>E.tR139\u0010\u0018⨍EB)%zlR#Nx)\u0013@q\u0017j .i\b\u001b)tI)\u000bZI\u0002Hy]-x$K\u0017\u0007ݙU齉H}fU]վ}p\r$(J \tЛ^GIJ\u0014\b\tz\u0010\u0002Qgr2\";~&9E{\u0011,Q\n\u001e\u001aB\u0012\\;\u0017\\ G2ҏ3\u0011 4y$W\u0013.+1*Iu08\\4\u0014iGR\ng\"+\b\u0019\\ϊ\u0015PN Z$HGF\u0005I~\\^Qn2Nju;z\u0015%8ZKj,r\u0013ruk7StڹƔP\"HXK:e<d\u0003~ʸsޅ.JFt2}gt9oZ\u0010Z}2a̞qG\u0017scD]J=OiY'XNK\u0013$tjW\u0006rfybk4\u0015&29\u0004s;2@)\u001c07˔\u0013cC9:g܃<dA\u0014\u0011i\u000eӴ\u0007on`JdN3C=\faQZ'\u0007l\u0017\u001an\fJ\u00131ctI\u0011a#%Kj)\u000eĔ\u001ee~(/)?ǵR?50-xf9FFq\u000b.Y\u000b|Fh\f\u0011m T\u00163.\n\u001cCio!FpRG=dkJZi=\u001f6S<h \u001cSO\u0011$^\u0001p.\u0014n'hDn)Cz\"\u0014\u0013AL̜RN2%e5x5\u0019#\u0000\u0003E9T⨙&dI+2n(\u0003Aʵ}~֎\u0011o㸳CXc}t݇q,o\b#ν\u0013l=\u0007QR[/\u0011i}}gK$6֤P?\u0015\u001a>Ίm\t{!\u000f\u001dL\u0007\r\u0004Se\n\u001c\u0000dX7=\u001b\u0007Qe\u001f?2N(oRG'ߏo~~<x'8Sx8m\u001aи\u0007\u001fj\u001f\u0010<szsҜ j\u0017,hw:=~{3^J\u00101ջ\u000f;[p$T\r_ÔV\u0012SBE=[\u0005ʝ4SU\u001az,/z\u0019ˊ\u001dY@g64WMru\u0001ndBQɘ#\u001c\u0002QYby2i\u0002}\u001e\u0007:;Hۻ]\t\u001c*z$wV\u0013D+ֈCܚD1#X\bv\u0013ۀ\u0010`AJs'S\u00157W9HK=ԡX`R\u0010\u0001\u001e+\u0019\u0017\u0007qJ̽\u0001iqs\u0016ʰ[)&W\u0000>Yx%iLuۓjǤ9\u000eh^b\f(~L9V8w\u0001\u0003]>L\u001e\u0001 \u0014\u001aa\rQVPVwxHBofuO{<i?+\u0000\u0017\rTƸfZd>gq{ʾ:o\u001c~oB\u0003tHqw!Ζ# '*\"\u000f3{bs[S\u0019\u001cRvly\u001c\\Sh+ͽӷ_|]0m1</*=o7<m*ϫ{_4O~V{ԎrWon~Q>ٹX</\u000fVhf㪵\u000e\t\u0000M~5v1~^\u0014Zy\fM4\u001f)2\u0010+bR=t\u000fzccH\\\u0017oY}'ͽ\\\u0019\u0012ã\u0001Sޓ\u001aGJDa77$7b\u000ey%UKzBV\u0011}\u0012+c~YP|+IV\nbGj]kgL4Iם\u0013`ֲ2\u0000\u0017\u0005\u0010:~\u001f(k\u001fj%-1??uky\u0016,w\u0000i;,GɜHqu\u001fRk_GrZ\u00125b\u0001&b\u0010Blx;o_ \u0019Jn\u00123T9cdR\u001a>\u0014`-'\nR\u0018<.\bMDl\u001e.q}~xK\u001a}`\u0013H*{p!T?aI9\tnOUe]eNi Y*5\u000eP\u0019Cߧ+1\u000e\u001eh\u001f\u0000VGc\\ef\\Xd\u001e\u0018l+Uo\u000fWzcsOh\u001e<s>n?\u001f\u0005\u0003\fFvF'U(gp^.L[\u0007\bglN^3\u0003@m,0B\u0019;\u001a)UP|9/j\u0005ʶ S{o5':I\u000eeMf߼߿y\u001bq꒿_Jm-#ePo:g?-F/\u001c\u001b=Y裗~9<u'\u0013 \\_p\u0013;\u0000+^ξ\u0004\"z9[9dʻ}\u0018\u001c=o\u001617޹\u0010\u001bG5CAoRy\u0016_N\bQĒ\u001azҝ<~\u001e\u0002ś\u0016휸\u001c0\u0018C|\u0002铢2ZMN}Ih-<S7ӟkhQ{ӿ\u001a1nϰ\f[\u0003nҺ\u000f_/N&\u000f|L}2'ݧW䆱\u0007\u0003\u001e\u0018P\u001dAi\u0003\t\u0002Bȭ\u000bL\u0015\u00167}]?utVmq{\u0011|yN\\{?FhwB캣\u0007wl曳\fz'1-R\u001d\b7J?\u001ei-\u0007^u\u0000bW\u000eۧ?>5<5Ff};o}ٍ\u0004՝0sqɚ>\u001c5zV@s&iDjde\u000b\u0007Z]d\u0018'KPFK\u001c5N;\u001bwtOÛ,\u0003\u001ejK-\u0018\u0003wakP\u000e\u000by\u0014A\u0007q\"7N \u0000Jꜟ<\u0015aJJkO>~ok\u0001\u0018g߾\b'׌Iɗw\u000f\u0019?9{[`<Li4ލ\u001b^~<Y;(KQ>Sb\fw\u0001F\u0000E\u00123T\u0005*\u000b˱jXYIZsݕE \u0001M\b5U'\u0005WR\u0012)oi\u001c7|\u00152!MAu\u0017\u0016a?y\u0002Lk\u0017897N=ٯ[!k\u0018vO?D\u00109+|uןh\u001f}]}_Xkޝ\u000f C={aΞP>2z2}>Ή+pt_\u001f~\u0005g{ft2ݟ__\u001e_%z'u7\u0019K>n\u0002r<\u0017[1{Ͽ\u001bs\u0004B\u0019>WJQه?lW7Fl\n\u000eֵ5zY@yy\u001fg_\u0006O;u\u0018֔pg%W\u001d?i<?~a|\u001e1gd,^\u0002JR\u0001Ҏ\u000e`S83\u001a=->7נ@x3\u0014Ȟ<w_wߊ# '_5h\t`Mm=V\u001b`q5rK\u0003hWqu|y7\u000f-\u00191{+ep\u0013<^gܝ׿%5xu<}7\t\u001dq#r(K\u000fGj7Kwܙ>#ͬ\u001bJ\u001fq8I-I\u0003\u0010l9M\u00130-ƚeJ\\ZPBn^9\u0005\u0007]9$l\\\u0004\u0013ȣJ\u0011#Y](\u0003\u001ef( Ή;f\u001988\u001ad![?\u001fAACj54?p\u000e&Wڽ;\"f[ǿyO,\u0002\u0017*S\u0001\u0006\u0017\u0001\f\u00117j39O\u0019T7aYOF!\u0001l\u0014={eޅ90\f\u001e}W\\?0\u000f<@ʜ\u0006{\u0017\u0000\u0001rv\u001c?wאE5^}_\\}\u001aAR';/\u0003}f?|\u0018IV2fRzx\\}\u0007v&LTN0q/Ҕ\u000e} VR\u000e_\u001d?Nߪ\u0003\u001a,\t\u0002ʳR,\bj\u001c`pfz{*=BVGWV֥5ܙ?7CS&lgp\t\u001es3D2\u000f1ze\f`z(Zw\u001e\u0014d9FJz\u00189>\u0015i8' tO\u000b\\c;@\u0016&Ps\ro>س҇\"\"XQFV\\]\u0018ݛ\u0002\u0002x\u0013\u0004a'\u0019S9$[)\u0015\u0019Dq\u0007_j\u000bc/J4F\u0018zLl\u001dE\t]\u0010\bpO\u001c\u000b9n>k콰\u0006B&\u0019WV\u0001|N\u0017:N9wvOˣ\u000bu\u0018*\\[`ZUe\u00009*=GHId9h\u001c_}=*\\R$9R\u001c\u00111i,\u000e5F\"./\u0000WS\u0014T9KP8j\u0018\u000b\\K3J\u0000kY:EYr}28.ϟ~v\u000etYɍ+r\u00046\u0007,CQ\u001fk\u0007?M34[WzݽjgBHl\"\u0010\f׵\u0015$SE~ebO7O\u0019_\u001a\u001cN\u000b\u001d}\tU//^\u0002W\u001d<}\n\u0010;\u0019LP=.vF\u000fM\u001e}s%\u00119[szL{:M7:}jH)8mE\u001azzeH\u0013\u0001Q|19yW<yV'/1s?LnDPk\u000f\tX\u001c1{/m\u0016\"Dn\"\\+MRCpIЫY\u0011+sL\u0013\"\u000eqkj\u000f\u001a݇F\u0012\f/q\u0018wƟtr\u0007&ë\f=@9WqռPŵ7yDY\u0003)yl\u001eV\u0016o\u0017\u001eᛜP%ͮ>\f\u0017\fyNüE\u0001a2&3`fNhF0'۠Y|E>׬;\u0002U\\\u00182P[/SL\u0019\u001aڃzj(\u0015,q8øH=ә_˕j[I!ȋ-\u0019uJ%z#ot1>78`\r/\u0002z|y/h\u0000\u0005\u0005w\u0007??-S\u0013Սd6q2F\u001cT\u001ess\u0015F4iu\u000f^D\u0004>*\fS\u0006\u000f\u001eg\u000b))g\n0 -|\nU+w\u000e?G2\u0017>4WKQ J\u0012r<{>\u001a=PV;PŘܣ\u001d0k`\fYk:`Ljt|MQl\u0003\u00115P\u001eΩI\n\u0017,_㼹On)xL}k<4\u0019E\u0014|\u001cQ^ R[o\u001f\te\u00100Ϩ`}\u0007cB0VS%=Νq?\u001e^m\u0003\u001dN@RXϊu<ɍ8ֵz hKj\u000b=ZR\u001cqP\u0003/6\b\u0014јr\u0017ly\u001f3Y\u0015}꟧\n\u0002Ԋb\u000b\u0018\u0019>+\u00043Ƌ\u0017\tҁ\u0003k(O\u0010+f\u001c9Aa0\u001d\u001fSa\u001d\u0007&1z\u0005/VQPʐ`3WLm@*틒$X{\u0004*青9,j}`+ΝS0R8c\u000fLa/R|'+/ƏfKFD\u0011\u0013S\u0006\\('B\u0005\u0000[pK\b\b\u0015\u001d\u001c;-Ź킆飭\u0010ChQ3>\u000bɝ\u000b\u000e@8ÒT2fvbv։X;\u00040O\u0011?-O\u001eh\u0002svP;G@\u0017qnh\u0001\u00156\u0004-T\u0010[|_Ee`~EJ>c~e{2{\u001c*\u0016\r\tCɝ-|3%b]5\u0016/\"I.VXl#\u0012F\u0006\u0007\f/vHݧR\u001bLA+M\u0019ZfA\u0005(dR76 Hc@e{f\r\u001e\u0002\u001a\u001bZ\"i\u0002v.^7\u000eI\u0013\u0018hqHX\u0003hק7ͽ3b4\u0001\u001f>?t/暧\t\u0000\u0013j\u001ee\u001a@q\u0002v'\u001d>W@uc\u0005\u0004:\u00047'Ar>>WksTn&$\u0015n\u0004\u0010\u0005Z%CZ\u0013\u0006HmT2^ut-y̽V\u0005\u0003f\u001bY0(Z]Ph\u001bYrwڱغ\u0002QJ\u0004l%09E\u0011.]@°D5\u0015(@n$\bbd.a/7\u001f%L1{\b\u0013\"E5Z2%\u0019\u0000GE\u001bɲų\"IX\t\u001cȏ\u0014͌@=V?\\\fB'(\u0013\t\u00161[V$w6#~\u00063s\u001b\t\u0012-<O\u001a*\u00053\u0000\u0013H3V\u0014\b2=yw1ަn`DkS\u0004k\u0011l+ɸZ\re\u0004{?D@ꪍS~Hョy\u000b\u0005\u0007wS竀]PJ@O*l\u0004\u0011s^P\t\u0004\bʱxQC\u0006U\u000fcs\u0001p:SPjy\u001e\"޶;\u001f\\xѿ@Amw9[r@fq@-\u001c\u0014\bQ-oR\u000b \u000fs[9\t4\u001a|cP:;zwEs\u0015$)g=bj\u0004/\u0007\t\u001e\\l\u0003\u0001\u000edjH\u001br;J㴶~\u0018=O]6jmJn\u001c!]̜r\u0003<X]q\u0011Wڰ(w{\u0002<bl]\b}Bcr\f>}5BK|0mZIkH';9L\u001bâ\u0002%u|\u001eE1w\u0013}\u0007FFl\u0012i\u001cB\u0010bvϚ\u0007\u001e|_J0)C\u0004\u0014\u0015\u0000@\u0010i\u0004(\u0019\tyNh\u0002\u0016*AoQ̨UQhB- >蜍$\u001f/%\u001cVi\u001d)i2ϖ#EHQ6'5\u0010(Ub=s66\u0011K\u0012p(\u0017+J\\\u0019ήܸ\u0000\u0011\bb5۸1ꄒ\u0011\u0018\u00071W\u000fR\u0004Ovrʞ:%qA(GX<)z++5_NL\t4]UlHvsz\u0007\u0007s/oPo3\u0001<IWo4~\u001eiTU*s)\r=%=oڸȲx\u0017I\u001b<Sb\u0018\tg^y4Oq[?TI\u0003dr\r?/\u001eؙ2ovn\u0001~MĚ\u0010\u0003Ě\u0012{2AĪVUw\u0001kS\nFY\u001fΤ2ULnZ+\u0010F/\u0016PZ\u0014\u0012a\u0018\u001c\u0001a/'2\u001d\u0000\u0011ԛ'5\ne4\u0015\u001e_;5\u0006SDn\u0000\u0016J{s\u001aejQo#6D\u0014Gu\u0010L\u0011Fk]\u001dj\tIӚ3\u0004\u000f͙by2ƘP~\u0002wWj\t\u0013\\f&\u0006ej0{,Cu\f\u0000\\\u0002byu3/GK^xp:T?@\u0003iVDsjd=\u0013I`~N,YR@\u0014!A\u0001|\u0006߷U\u0010\tc\b\u0003\u0015>\rVA/\u0018F<\"ų?\u001f~E8D\u0011atTKjgR\u0004\u0014\u0006F\u0005(yRF2\u0018w\f\b\f#<&k`Ȼi\b8{{B:(Wf435τ!h\u0018v\u001b/Hǥz\u0002M`*i-y\f\\\u0010R/\u0010-\\\u001f6K{\u0012%;k\u0015N\"%)7On~\u0019\\\\&\u0001xz\u001fGJ\u0016aӗ;\u001c=z\"fe\u001fGQ%TCy\u0019rwA\u0019;\u0002(v\u0000\rb%\u000bS\u0016CI̬\u000eoj紷 Y^hm$\u0018G\\\u0006-\u0010huSH\\Pnd@G1\b\u0004q\u0002Spp\u0017-jX\f5rO飒\u0007sJ@[\u0019\u0016\u000b\u0019t\u001dR%(\u0013q5O_OJ`fVnpA]TFײ\nZ&AQ8\u0016\u000bց\u001aS\u0018?,%X\u0007\u001bx\u000b\u0010Nn\u0017$&\u001eRFpwq{*Xo\b\u0005{C@2.>V\u001dDi\u001c7\".eY?s>?Ӈwde/'W\u0010Z1P&TR_K80pC%C9$5\u0001\"w5\u0007ҺV:I{\u001f\u0011'$4S\u0005$ywF=<1@\u00127q\u0007\u0006Uun\u000b?\u0019rq7*\u0001(YIUDXsT帊;nj<\t{\u001c\\\u0012?=\\O1D\r\u001cBFZX\na1RrU\u001cU6it\u001cw\u000fFG׽\u0013S:rXnpnp7B\u0016s{d{12\\B\u0002'E\u0018[4Z|e7lNl'Ji͋pNZ\u000f5,\u001e@>oO7\nKR,\u0003Cj4aɵ}{\b\\#\\s >%e\u0014\u001b\u001bg!\u0003\u001e.'\u0011};ůhJ؍(gEm\u0014Z'1}=\t\u0016)\u00197\u0002TW\u001aN\\i\u001dJ,\n\r\u001e?~28EKw\n\u0014\u000b\u001ckJ5ڌ+n\b?L^7篤~\u0018\u0011CYPα\u001eh\fstz޳\u0000NH3@u`R\u001cҳGϫw6ʐvs|wc\u001d\bjg\u0018p7}]\u0012>G\u000bz\u0002wRt\\ξJ\u001dʤ+Hm\u0018\u0004A-r\f\u001enI\u0010cb|z2ZN\u001b\u0019\u000eԋRQ0:eG@f\u0004%Y\u001e^Y`{W\u001e+'\u0005\u000b~\u0014bJ\u001a\u0006g\u000eO\u000bT\ts=A$\u0010R\u001b\"\f\u0005c\u0012%!\u001d\u0000\u0019R\u001f$\t\u0007~\u0017AzU\n\u001a޺Rhؽky&\u0014qV\u0012!ռ>zW5\b{ar+A\u0014[8\u0001V3,U^?YR28+rr\u0004dUP{O\u001ev_\t$>{\u0004n񏖳+1f=g>ʵHVl=j{\u001b?\u000f\u00148I\u0016TqqBu;`6Ur\u0019\u000fҲʞ=gqQ\u0007\u0006(Ft\u0000u`Q^RX\u001eQ>?\rAvR\u001c\f5d/\u0018F\u001cjWo\u001ddg\u0002WUj{54\u0015jN ն\u00105\u0006tbs#+Ɣv\u000fPu皠È\u0002}\u0018\u000fVc6S朲P\b\u0014Uȫy\u0013?\u0004\u0007\u0017'ͼ\u001cC 0\u0006+1-38~}\u0017?\u000b9\u0011;Ms|6\u0002B\u001f\u0019K\u0019)\u001b\u0018\"m#j\":̀Lm9\u0005G%FN :\u0014cHă٪\t2a\u0010AQl4]\u0001\u0011F\u0014\u0017ڬ?\u0007\u0010E\u0010\u001aNns/]R#91jY\u0011&E\u0004?Ju+#le%(F\\d\u0004#\u0019*&DJPV#VZ\u0000\u0004\"\n\u0015\u0005\t%h+\n1Yȍ\u0018\u001eJT\u0001MFJ\u0010\u001dYjr\u000fVʏV\np-س\fw9\u000014]PM(ZG필J0\t\nOQ6k\u000eBk\u001cr2Lz|^E&H\u001a#R(\"\u0001fZX\u001fuN]|+.b\u000e\u001fAL\u0011v`H?4\u0000\u00193+\u000bP\u000b`R;5\u0010T\u0007L\u00048+\u000e\u0003$w7\u0016HI̺\u000bDj.mf7%BmJI\u001edfN.\u0018YN\u0004U\u0003%Fػ>6f8$n8Lj1=O7\u0005V0{'7\u0002(,\u0003\u0004\u0001IW(\u001f݇Z|x3y\n)AK5\u0019lȵ$ ˈW꧝\u001f+9kq:VTyi-\u0001\u00021\u0002ҽ|\b\n?ZTåPN\u0000\u0018re\t\n-'Nb^\u001cv@\u0012fX=) HQ\u0006Ҁ\fY\u0003\f\u001e#6L<KZo,\u0004\u0016#\u0013zlwJr<jQwWBX*\u0014iCv(R6\u001egmeH^HF\u0000KV\f5#\u0014&\f\"~\u0014]s9ʘ՝7;zq)\u0006(HKT@yڃ\u0003*^0ORg>uA\u0012D\u001f3np\u0005U@\u0000g(;QD\u0004sePDq,ff\u001d]3\u001a\u0004\tpA܎\u0016\u0014Dh\u0005oB;3H<\u0007\u0011D0egy,\u001eq`u<_\u0005\u0015]\u0010@9U\u001bWBv){\r\tcHAa]|\u00133(_9\tJJ\fDK\u0015inžX9ʇIIidBY^\u000bV\u00173qL[M\u0010W>dr\u0007a\t6t\u0001I-\u0018,'͌Z@\u001aUF9\u00194sr\u0002V_MycnI^|?i^꥙F^F\bw-+\u0011\rs;\u0007`(\u001e\u0006X\u0011\u001d\u0016(li\u001bǥNdB\ne\t\u001bے+9sTh@/GK!t-&\u001c!\u0002\f hB\u001bkӥ0\u001a\"Y\tdh\u0010+%+hq6\u000eF\u0011T\u00069R\bYOPI\u0016T\u0019*6ӄ\u0017\tDj\u0006\u0004ZB*i; \u0012b\u0013)q\u000fagqj9Nr\"\u0001e\u000e\u001dA\u0000]P.0\u0016$7R\u0017\u0005>*ޏ\u0012QĀr(*\u0005B4 J 6KJ\u001b^ۨ\u001c63<dH\u0012T\u0000G-B탌\t8\u0014DjIc(J4\u0003\fB\u0001P3ZMPѼ-RCq\u0004q\u0003PP\u0014I\u0016\u0002D\u001a\u0010e\u001e\\Ĥ6p\"\u0016\u0015\u001bڠW\u0013v\u000ei),\u0004*=~WO\nR\u000bx\u0018ű\bj\u00146\u0018pN:\n\u00170\n\fZ)\b5 ЭLZ|\npe5I\u0001:\u0001m\u0017\u0014*#\n<8\u0019\u00023QdGG/R[\u0005mWzi6\u0007@\u0017^d]\u0000\u0000%ыVF2X\u0002iDpI\nա`\u00006(\u00079f\u000632<Mȷ8s/L%\u001aW9\u0001_\t\u0012pt\u0015zx@X\n.X\u001cZ$\u0017>c!\u0013E\u0003F'~\u00123x%SKj\u0003\u001cbR+^0oSkq\u0011zqAI^++uP\u0003R%8\u001d-\tc\bԏ\u0003;r\u0004fei\u0007\u001a5uYǰr\u0018Du=-\u0000BQ=E9y\u000e\u0017\u0000\u001f\b\u000f\u001at\u0017d<\u0003jH\u0012^\u0002%En\u0005@S%5KYf;ֹ\u0002m\u001c`Bi\u001fT'7i\u0001A\u001b}S\u0002j\b \u0006g\"&4\u0005܇TI\u0004U+;v-c ظ\u0006\u00188\u0001\u0006'%\u0006uys4Xˬ\u0007\u0019;M\u000eq2\u0010\u000f\ta\"\b8\"Z\u001e\u00020FAW+C؁b̰eʙl\u0014/\u0006\u0000(Kr\u0007xj-A\u0007__h?VҴ\u0011\u0014E\u0002@\u0015\u00009X_9\f\u001eJV\bQ\u000b\u001arA*\f>`q(\u000b\u0000xa5-GT(0\u0010\u0002\u000eak\u0015!W9\u000bUPkˑ\u0012\u0014\u0017l`pm(<\rR|u9T\\\u0010F\u001e@\b`ҺG1ZןnѬ\u0014a\u001cx5\u001af_v;|$ך=I\f2zъQR棓\"rBW\u0018j\u001dv.H\u001fW@M@-D\u0006v`Aio\u0015\f`\u0016>\u000e:\\@S.)+\"A\u001abV^iS܄W\"(yS\u0016W\u0006JjݿS\u0000Ғ.J\"k7zL\u001e$1+^TH\tp^N2D \u001b?)JpQH([&J$Æ3\\(k\".qv7E5ХђR\u001a)\u0006:v\u0000*Yo\u000e\u0015FU\u001csv\u0017{PtFqm\n-\u0014\u000fâ\t5\u001c\u001feyTZ4\u0011+\u001f\u00057\u000f\u0004\u001f2(7j\u001fN\u0006\n4Q5\u0018?b[%Ⱥno\u0015e\u0004rw`slԋ\\-\u0017XpE\u0019CPq\u001bI\u0006T\\\u0002\u0012gZ\u00145~\u001fB\"J[ψ1\u0010\u001e\u001eJ4G\u0019\u0017y\u001e\\\u001b+[)ӵgiH\u001cU\u0014z׃*S;L?^'@h}Q\u0017T\u0017_5M`y[\u0005m\u0016Rz\u001f}'߆\u0010-\u0005F:\r\u0003&1ANo䵴\tdJ\u000bb\u000b \u0005d\u001bQSl9ǰ\u0014q[\u001b\u0005\u001a- }+9\u001ap\u0017f^\u0004ic\u001aEaHCC\u0019\u0000C> F\u0002d\u001b焎=|l\u001e\u0010C0-Z\u0014hp\"^2b%;ˀY\u00180\u0012E\n!8n\u0016XHzfAD\u001bqry\rx\tV+9#A\u0018US\u0004wioǛ>5O\nJ?\u00009,eX\u0017,Ac_:\u0000\u0017KzP^\u0012\u000f/\u0004ݕ105e֣HL\u0010b3/\u000fZ\t޹\u0011jg|e(UGI2zZ}?T@0s>iAkQk#ݏ\u0019\u0016?\u0013r?\u0011GTRar/RrWJ]\u0011@n#L%\u0013tHQhc\u0018z0.qr%\u0012νmd+XLY\u0006q\"bPQǍ!eO~\u001aǄ\u0014Eo\u0012n4aXWrpUƘ\u0000Aq#ݡ6B[I:F!AQo\u0014\u0007J\u0003q&p?wb${\u0003\"\u0005\u001d\u0004\u0003f\fQG0\u0010ː\t\u001aI\u001fg\u001c\u0010Vڇ\f\u0001\u001f$\u0018t(\"p9\nR9\u0006\u000f7x2!4`'\u0002$\u0000a\u001bW=M\u0001WP\u0003zgrd&aQ)_9M3յ\u0014H\u0002\u0014չV\u001b1b %e\b\u0005\u001a$\u0018{\u001e%f\b5\u0012\u0000>3\u001e%KrIc3yo-D´\u000eZ\f\u0010\u000b\u000buC{\u0011Լ\u0017*l$$n\u0001\u0004wb\u001emQf\u000e=Rnn&\u001co<\u0007\u000f\n4AqqT-IxI\"`gx\u001cyg?}+ tA\u0017m$t\u001f.m$3&ao#kQ\u0002\u0012;M؟g#\u00040\u0005\u000ePɸ\u0017ŗ\u0018\u00168*m\u00050qR\f1\u0001\u0001 c\u0005=GU\u0010)!Q\u0003'N BXj\u000b1D\u0001}\u0014EגD#)l(j{\u0016K@\u0003\f\u001a\u001e7gqu.NVL+\u000bPԷJYIYʳ\u0017ݷы\u001c\u0003\u001fAG\u0011\u0013-N)[\u000bRr\b\u0003$\u0019rLS\u0015\u0007\u0006C}V?g=\u0000@\nk\u0001\u0010J֛\tP\u0010uU9'4\u001a'J\u0010ȏ\u0018\u0016ERwX\u0010;9X`p)}\b\rtf\u001azj5#ɲ4]qQG0;FK\u0019Oqsfj\u000bOm<\u0006\u0017=17ݗ[T\u0002B#0+\r\u0012T\u0003:EpF\f\u0013\u0018\u0019?_~G\u0007\u0000\u0002\u0001[^IR(BmN8{yaa3$qZS\u0010K$'i4{ ({\u0007D~IꕄfJX\nBY1Y}\u0006\u0014&P\u0006\u000fQ\u0007J1>8\u0013Ch:s7L\u0002'yc_x5\u000b\u000fv\u0013D\u000e51\u0001\u0019g\u0011,c%+Q\f\\VVt\u0010)\u001eq\u00067Vc̽b\u001aJIR4m+yI(}(%WO7\u00010\u0000\n%9\u0001\u0017l%Ȅ,Յ<:\u0017зi\u0015ӀŰ͢dtXi_ҕ=p4Y\u0017\u0003\u0000\u0019o@\u000e\u00008Ͷ$b\u0011<P=B\u0014S\u0001a\u00140u\u0013d`r\bJz\u001a<h\u001d\u001b>\r.VR<ȉ$IIU#\u0005i3\u0002װ\u0001\u001fQt%EK\u0002\u0000\u001bQ\u0000Lc=\u0002\u000fsEe\u0000gI\u0006nd\b᫈P\u001a_]W\u0004\bvQ\u000032^\u0010n[(m25\u0012uwb'\t\u0002Iq\u001eiNO\u0011^>\bΓuxm浂\u0007s8ILQ*;ByA{)\u001a.9HN`gR8˹;5\n\u0018.\u0000h\u0010?\u0004ߌ`\u001f̖ ;\u0000cl\u0005'a(ƙ\bs;Fn\u00182s\u0016@\u0004br7ZT#Eg6ͳ-\f\u001f\u0001'\u0014f\u0000)\t\u0001D,jd;pid5swfEiҖ˳:\u0000Q\u0011-F9Zi1Z\u0011B\u0006\u0014f\u0003\u00154.$^\u000b\u0015-8b+\u00190afܾ\u001eR\u0019>\t-(((f\u000b޾3xA\u0019\u001b*9[+n0%\u001e)t#h9TnC=W\n`|Cn\u0004\u000f_\u0002.(3<ŌFY3^I9n#C\u0013\u0001ZH\t\u0019y+-As1{Ny3\u0010\u0019\u000eH\u0002WHk(0j\u0000\u0007~3rTR\u0007\u0011T\u0005ۘ5Bkf\u0003S 갺\u0005_PP~+Kz\u00147n}sMJ#,QV@A\u0011\u001bl\u000eOcBi!:P9P,+qyg\u0014tD\u0019\u0011nw\u0003Z\u0013l\u0011d0&\u0012<>{\u0005aXƄ1$Zv=I#b\u000bjJL\r@={O@|~\u0000}\u000b\bA\u000f}ه/u\u0000{!\u0014\u0006X\u0015_\u0018r\u0003\u0013\u0015b$z(\u001bL\u001aĝ\u001cXOQ&\fP\u0019<x6\u00020\u000bxKH\u0011v8'k$]^[\u0011<e^A\u0018\b!\u0002WA!\u0013fV\u001f㷳07|0UAy\u00166\f~0\u00159ߺ`ZFh0}8%}\u0006I`z\u0005,\t\u0005j\"ba \u0012\u0014Xra3'\\\u001a\u0005c\u0010\f4+\u0011ƌ$\u0011Bt\t\u001eʲO6B%\u0014@\t.5\u00126fg&e(Ľ휺Ҕ=<'Ek-%M(jw\u001fd\u0011\u0003Ґ\u0019tPSd\u001a\u0005a-x2< \u000fֳ\u001cp^V?\fc\u0012\u001e.qp=_\u0013\u0014E\u0005U\u0013Ɲ/\u001e`\u0005\u0002_\u000f\u0017O\bI\u0002.϶Pp`Xp\u001f.\u0018z-\rZF\u0005,@\n16E\u00150^Yə+i-#\u001fCXQ+j\u001ci)B.\u0001a\u000eiL\u00004VS\u0002\"^e^\u0019V_P5P\u001foh9\"_\u0004\u0013\u0018\u0007(73fV\u0005\u0015\u0000ʞ\u001d[r-ո\u0013*QO,߇I>L\u00106`3j\u001a\u001f?EZ^\u0010iC.gzna626̘z*4fĮ5xN$\u0004J\fRi\u000b\u0006\u001bE~Z\u00135:ROHko9lfC~jkyi-\u0015r \u000bKa4Q2ܺFFN,E\u0011\u001d^xh\u0014~>x{E@*֓R\\\u000bnVxӇs'KV^n3qI8admΞ\u0000<\u0013\u001arDzp\u001e\u0006\u0003|5I1.X\fS3\n%X\"/\u001fI\u0016\\<\nbIh7/(w_>\u0014맡~?LD팸9.㗷!,ٴ1!)\u0018\u0006!3\u0010a\u0002G/\u0011N\u000b|'\u00134wbEGk4E}\u001dŌ)DF^t&\u000f\u0005dh\u0012ps\u00072\u001b\u001d\\\u0011)p:h\u0003\u00100E8(\b}wu8~f3C:6zV\t\u0004wg9E<Οaǫi7\u001fW.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.\u0002m.˿-\u001bi\u001ag:G\u001f,\u0007ki;Vhp\u001fhV+F\u001e\u001c1d98_*\u0006ţR\u001atK%Ԓ~0\u0019MvMי\u000fg73n!Lt# \u0013I\u0006H!NF\u0012A.N\u0007xwk)Nz>:쎖6I\u0011B\u0006V48D\u0015e'1;\\$׋\"A7\u001e\u000e\u0007H/߅]gNKr7\"\u001f?'AOP\u0007Ǉcs\u0004\u0011ӻ\u0000bvv\u0006o/Kdf%?/O?\u000fp\u001cX|\u001eKR\".\u001a>lX~H.+,\\\u001fP\u001bL>[?6Wo&w\u0003\u001a+\nRqi\u0013~\u0012Vom-!A%-_ҿ(a\f-1M?96\u001e\u001838\u0006\u0016O-!jK\u001fEL4%Kd<\u0001\r1Q/x\u0013^\u000f8޵\u0007\u001bGq)*$P \u000fR\u001b*\u0011T2~h?Ex1p0$f6@v^G1sl\u00175F&XQ)^In\u00103\u0006\u0005iPQ]B8d(\u001bQZ9AiA\u001df6r\"etP29\u001ffv\u0002/~F\u0010c++&ro&cty)N\u0005Y\u0013\u000e\u001cf&tyd\fbc(\t+k\u0019Ysic\u0005W;\u0013;J\"NKVQa]}֎\u0018__47Jh?k\u0019n-NF\u000bB\u0018'x\t\u0012+I\u0005uP#TҴ_i +ru\u000fTm4\u001f**>(\u001c\u0010YYU6\\|]\u001e7Q\u0013mt;+\u000bZFogNmrH\u0011/ىg\u001bHAO\u0011\"\u0019*\n-L1;R4W'r\\\tDV\u00160+n$XAZ\u000e#?,ǉͬ\u0000o\u0014QIbn\u001417R<Br\u0018\bk\tv9BDFji\u0016.\"ΙO2td#R'q\n=I@wTe#n\u001cS1\u0012E1G9\u001aB\u0010+\u0005[zYҡz\\K`yQnF襙Z9ao\u0004nXh.861\u0018&wv3{\u001aÌXz̖3\\+\\DP^\t[`=\u0004\"%'k)n9\u0016,Q\u0017%r\u0014\u0012T\u0019bݴ_(}\u001b\u0011QT\u0013v\u0019\u001a/*\u0017a\n13\u0007/MFgn\u0014'#E-\u001a`\u0005\u0005\u0006b)\\ZT\u0019z;V#\u001bŽ(J6>.[`eݭ6Bm(le$\u001bJaUDJ ^>\u0005-d-FYz\u000boG3_\u0018ppPGXR1TR\u001c\u001dfnF7nwێĎ\u001dơq;<\t:1\u0006\u001c3d7{_}kiiVK~PUl\u001b~ڄ\u001a\u0003PĔ\u0011n\u00183\u0004\u0007\u001awE~\b\u0018p\u00110<\"6Լ\u0013Og\u00032BRqbSfmA\u000fM[Q\u000f\u0004JpuҊ0\\XrEyYX\u0001+qK\u0002(uR`\"f/c\u000bJӰ\bvymḘ\u001a*\u0017\u0017j҆'zݐ0\u0005M!9?@\u0014ZLv\b'U̶1$M\u0000wҶּDfo\u001b\u0005'\u00139ؤRRq-\"7L)\rFfz~\u0010\u0010P_4a\u0005F\u001dT-0E*\u0012\u0010\u000e,\u0003L\u0005KS6Tr\u0006\u000f\u0003\u0018\u0003rE'\u000f5\u000f\u000f07\u0005x/\nY;pY6\u001d(\u001fR\u0007G\u000e:\u0019d=LM6S*ޑ\\^;\u000e\u0000\u000bK=\\/uaXӷu1\u001en{(}\u0014O8mF\r.Cd\u0000Ɇ`t\u0016QldE׼lV\\~C:ɑ)(ϸS6\u0014BeAюƀ\u0011\u00029\u00075c#f\u001d\u0014Ђ=\u0018fXLp\u0000\u0015>a\u000eOY#6\u001c=t!\u0012\u001f\">*u\"\u0015\u001fYC Sз3Έgk^'FRqOS\u000e\u001ch\u0010\u0014\u0014\n`V`P!p7)\u0017銛*ِ=\bu\\\u0003W`|~ENx/%s0Y(;\u0017OĄ\u00055{9ODE*O\u0015Q@=e\u000fjBn\f\u0000s\u0000QE;윏\u0007_\u0007/sR\u0019Jˍ\u001c\u0003\u0010};9ˤtOT$Zr\u0005PqӅ\u0000WqF\u0016 jtglP\u0001Dz\u0000~P^*\u0014VT{C\u0019;Eb]\u001fSPЌ1 \u0011\n\u0017\u0014\u0002Q\u000bF\u0016\u001e\u001f\u0012vEdL\u001e\u0004\u000bX\u0003{\u000buB[ps\u0005.eJJJ5Zݩ.Jwyټ1\u00145\u0006\u0004\u00170i;>@\u001dIm}۴h]?\u0016\u0003\u001a\u00001{ᤗLAl\u001eH}.\u0007No\u0012\u0014I\u000e\r>qθx?];?n\\\u0003qk\"MY0W0{9'5m'ᤏ̙|Ҵuq&\b4rb.8m$\"֍؜/jEM~DXSz\u00041!1_7\u000fm`ut\u001dx`2\u0000l+\u0000\u001e졘\u000fϸisx\u0019\u001cԩ\u0003Qa\u0019a$\u0014tM\u00003.v+\u0019<9\u0010Х2+To\t7 F\u0019\rZ{.4+b\r1!\u0002B\u0019Iu'wY\\n-\bD\u0014EDP1\u000eQ$\u0018u\u0019+\"É\u0000_\u0003?WD_*.;)uE18x\u0015(r\u0007\u0004\u0016xwNىD Z\u000f\u0001lri3^\u000eI\u0016b6$J< ҫDz\u0005O,`>N͑ɞ\tMX\u0011~$1@[̴vg<$Ձ]\u0010]OyZ7]v3%,\"cmT.'@\u0003\u0005I\u001a\u0004zI[\t$\u001cȂ#ZC)'b\u001dLGf\r\u0002^\"\u000bh\"s@p\u0014P\u001ag<\u0011\u000e-\u0001@Y\\5\u0018\u0005q2vj#ι\u0005\u001di\u00171a\u000b?0횴E\f.\u0003\u0019\u0003\\M\u0011dӎȌ\u0001hqe\u0010\u0012>\b\u000e\u001d\rn\u0019\u0016\u0012g&,\u0019;5c~Ňe\u001e@\u000bMLZ\u0007|La-}$8U\tf\u000f<<(\u0000\u0001\u0004\u0000 '\r>[\u0000>vSi\u0007\u0013b˹\u000b83\r\u0001\u001d\f*FQ#\u0017w\\T<7\nK\u0001cn0\\s*]sPX\n\u001c!\b_l\u0003\u0006X\\\u0001#m\u000bt\u000fU\u000e\u0002)\u0005Zr+\u0017\u0017:i\u0015Xr%\u0010\u0019XHB\r\u001b\u00105P!/DlE\u001b\rk\u000b%\u0013i\u001f[Ƣ\r\\i\u0011]TkdcS\u0001\u0018\rNz|n}\u0003RueE\u0005C7)\u001dpd`\u0000[8\u0005?Ϻ\u0019\u0017\u001b-\u0000\rU\u001506PY\u00179$\u001e\u0011lC\u0001mJ[\u000e\u0012p\u0000gM]@Z\b\\7YI\u0007q\u0012qD\u001e\u001aT\u0016\u00073UP\u001c\u0011v4\u0005\u001ce\u000fO;9\b\u0000\u0003Ju2.Ǝ(@F8'A[0fpr\u0013\u0016bNg@&<\u00006\u0006\u001f]Lf-\u0002c\u000ee\u001a\u00003ʆؒ'͹9`!'\u0003\u0006\u00140]NbA%O@AV`!8\fc\u0004\u0000U\u0000y\u0003g$\tK}\fmэn\u0016\n3L8\bA\u001f{|I\u0010HB-0\u001f\u001e:\u0017\ba8\u000e2=P\t\u0015<\u0014a';`?X\u0003]2q:Z2+>\f\u0016f\nں1$\u001b3D0?_\u0018_΍/\u0016M{ͯ#2[;\u00100\u0007C\u001a\u001eH\u001c/\u0016T.!D\u001e\u0006\u0017\u0011H\u0000\u0001\u0012',,*{,[\r/1eJ6df+x\u001c\u000fȌ5dp\u000bP7\u000eSv\u0012s6SN\u0002K\u0010\b$a%ED?>\u0012o\u0001Ti\u001b1dL\u0018|\u0005\u0016J\u0011m֭\u0004g\u0016\u0001\u001b\u000f\u0007j\u001dd\u0015˯Ŗ9\u00187\u0012^2%rZ\u0018i\u0007\u0001i~+^\u001dQ\u001e,~E\u0010\u00125dHAò\u0003\u0012\b\u000bd?'.#uRF\u000f@\u000e\u0006P\u0001<\u0006nA\u0003\u0013:\u0004ل5\u0002krq\u00002E.L\u0005r\u0000S\u00116aO[)l\r ǘT\u0003ٝrQh<ä́ͭ^\buLnaɂ{#)Rf\u001a;tf\u0000G$~fTpd\u001ca1\\AnChмaFlفg\t'E\u001aG\u0012-CҙP\"\u0012\u001dTJ͗L-\u0017毰%W~+xOkxzŇ\u0010\u0016T\u0001t\u0001Bl8tj8\u0011[>\r~\u0017F^&\u000ba\u0019.\u0010\u000bѩ%/<&(\u0016\\\t2/$V:9\u0016-aŌD푄=\u0007nN9P(\b\u000emhF\u001cp|?Wmr&\u0017D\u0014΄)hr~'\u00161yp5?Q0]9m\r4\u001e4~\b\u0005\u001b\u0002P\u0004nqQg\u0001\t\u0010\r\u0000\u0018a\na\u0014P\u0001\u0019\u0003ׂ0H\u0012\u000eD~a\u00009\u0017\u0006:1\tI\u0017Ū?0휶a\u0006\u00170\u001e8l-a\u0000%b]BY\u0018h(xf}7]\"\u000b\u000fP\fhp\u0015@J\u0013Ic\u0000ܴN4\u0013x26&4D\f\u0007\u0005f\u0000\u001b!\u001d\nKmL/3,qRx\t\u000f\u0006רoI;\"qZs^\u001a>)!h+MkXoY/c\u0001FHHWd\u000f\f6P;\bU슐[\nGs\u0001aCȴR\u0018$\u0002Hpbc\u0006\u001a6uiN\u001be\u001dEX\u0002~s\u0001ˌuQl!RXQ\r\\\u00009\\\u001aNC1`K:3o .E Bf\\\u0007\u0010\u001eӔ#F\u001b|i,Bwx .Q\tWZd߈*\u001d\u0004\u0017\u000f\u000f*\u0014<\u0006\u0000\u000b\u0013?\u0005)\"Bܶ\u0007H\n\u0011*\u000e\u00010\u0005\u0004XR\u000fZ;Ƴv$\rvڂ\u001bYCkߔ\u0006@\u0007PMX\u0019'y_2fJᄞ\u0002hBu\u000e$j\t30fX\u001d\u0011f\u0004dL^}67\u0004\u0005?:\rp3f\u001fpU2`\nFOZB\u001e&sRÉ&tFy\u0004\fn\u001a\u0002'6I\u0013\u0002Map\u001em2L\u0007;iOB\u000f\u0018:^*\u0013*\u0018iF\u000fq>=0z,>\u001e\u0014\u0006*<\u0004\u001b\u0006]EQ\u0019r yw%(\f\b%5\u000fP\u0005\u001ad\u0005D0ire/\u0012y,7\",ɯok^2g\u0017\u0018uD(\r*>\u00146\u001dD\u001cN:{ƾ\u0006\"\"Hv!k#2p\u0002Tϭ\t _\u0002&FDSn\u0016\"\u001bC\u0016hcuSHr0\u0006\u000f\u000fȎ$xu\u001c+m\u0004Ų= &kX1%l@)MkQ\u0007Wr\u000b\u0015w)s\u0000\u0007\t\u0000R|\fRTM\u001e\u0013I\u0004'X\b4>3\u0002~Oq\u0002zd\u000b)\u00104g]`k\u000b!`\u0000E_\u0000*88*$\u0010Ɇ)\u0010{z\u0012\u0004#ه'->.'LǂP\u000bkPi\r)\u0018c\u0000)\u000b\u0012$3PtEê-pI\u000f\\\u0000}\u0001F\u001f\u0007gM\u0001\r.\u001e\b\u0016TO;97\bhIw'f}o\u0007\r\b\u001cE)/8YϬ\u001d\u0003\b~͂\u0014\u001a\u0012Ty5U\u0019s`D\n\tW\u0018X\u0011\u0012d\u001fV\u001bn\\\u0019o$m\u000bB9b3.\u0015X\r甍4EG\u001d3z\u0007Ap\u001cvP\b$\u0016\u0014\u001e\u0018\u001e:<2<\u001bK\u0000-\"J\u0017۷xs͚\u0002\u0012d@?]d3KŅ[ֱ]\u0013[I3\u000bJu2=\u001f\u001fp:X=G\u000f\u0018\u0003F\u0000\u0017r\u001c@\u000f\u0003|\r\b*ܳ\u001a`0\u0012S\u001e샒\u0006\t4:\u0013\u0007f0G\u0017\u0001Rqx>p\u0005Xpv.Ⱦoyr#30\u0012\u0017.9\u00046\u0010\u0006\u0013sI+2\"\u001cs1M\u00028FQpY\u0011xLXED>\"u!jA\u0006;\n}\u0006߃S\u0000\b\u0010\u0017\u001b\u0000[cq+&O9AFu>1{9H[鎐LjR7\u0016KC\\\u0007d^!@d\u0018\u00050x\fT\u0001s3_\u0011O6|t9\u0004\u000740N΁\n\u0010\t\\*\u000f\u0013PJ;>k'ȳNv́Ok,]ѳVćf\u001d&\u0004SS܉kR~NL~o\u000bQ=e\nͺX?%bM=hfao\u0004\u001f5L*\u0003OI\u0010/\u0005\u0013\u0019Q\u0007W\u001f@ṕFg͡T!RJ\u00133\u0017$(f5!講HZZ\\<~L c)\b2DEGru3\u00189Gu9V\n\u00016+\u0017\u0000l\u000eB\n2(JK}2ݝEB4x]\u0014\t\u001d*L$F|yU\u001dH; 31\"I^p\u0018uh\n\t-\bP\u0003+ɸ\u0019C;\u0013s^7\u0016\u0013T\r\u001evF?S\u0007/h3\u001cD\u0017\u0006'k\u0017?`OY1'`\n\\X\u001a\u0013\u0005hw3cC06h[;\tIЉg\u0000N\"\r\u000e|\u001f6mE\u0000\tΐBF\\\u001b\u0012Sn\u001a\u0014\u0013x\u00195\u0004eɇ<)\r^<)8xLn\u0019!BE-16u\u0006'nt1\u0006\u0007\t9\u0011\"(\u001a)\u0015(\u0002\\\u001c:=\u0017\u00130#KHn\u0017r\u0006Ss\u001e\u0000S\u0002LYPj\nNZP'\n>0q\u001fی\u0013BK0&\u0017O!c))\u000e\u0019e'(n,\u001e\u0011ʱ\ny\u0003K8\u0015`F.<\tB2\u001eo!\"PYu\u0017\u0016lBBKt7 }[\u00008\u000fj\u000b9}\bEXH4\u001fW4@0ؕ\u001aDv\u0015A;E\u000f^f\"\u0018u\u001f[A侓.\u0015V\u001d2Y{8f\r\nn&l\u000e@S \u0000\u001a|)KA{\u00128%*JqdpQ .\u0000]?eκHX\nRR+(Ԭh\u001c8\u001ftܿ\bbvUnMt\u0005\r\u00052\u0007,)+\u0002\bGd\u0017\u0012k\u0016D\u0005\u0005\u000b!<a\fB\u0000B@_C\t+\nr\r6Sve@@&?\f[ ɀ\u0012J\u0003PtG81&˸[<\u0017KF39\u000fBvaQu\u0012`یĽT\u0016Ƀ%O8g,+\u0018\u0005-':ڰY\u0007p,o&\u000e?\u000b@)\u0010\u001bÓ\u0016\f\u001e`\u000f\rx\u0005\r\b'SU\u000f\u0016 R4\u0011\u0011\u001bF\u000f?)v\b\btL\u0007c\u0010\u0018O\u0019\u00079Y\u0019\u000e$\u0015U,~y\u001a\u0000%\bZ\u000fX6@\u0014\u0005Q:abC#r\u0005\u0002 p\u001d񼛩\nx,_r\u0000\u0003 \u0012`\u0018l}\u000fa*b\u0010v*搈yL(-h.:7}|ϗ\u000fqm\u001c\u0013U/[8\u001e\u0016f6\u0004h0<!\u001d\u0011y7Y@00\tSH?ōi!\u0015\u0012'`38&\u0001\u001eH\u0016\u001aЛхI\u001c\u0004CDja.+Ő\u0000ʃ\u0019A\n\u000be$\u0005\u001f~\u0001=5Y;\u0017\u0004\u000bQO~CO5L[Isxɘ,ٚ-YÚ|\u0016\u0012AG`C셸64T|`\u0006o\rC1_09HGؚ39ikP\u0001C\u0001Ex,\u0004*\u0018Pr l^iANN\u0018Q'\f~\u0010,]hrA[!k8\u0013s!&\u00067opf$}L,Cy\u0011\u0005\u0018\u0015\u0013xik\u0004\u0010b\"\u0017cɹ੹\rp.3^df8\u0004\u000eR?gav&\u001f\u0010\u0017ipfrF/\u0007:\u000bB\u0006A\u0018aLr芨0\u0000-ȅH'>Yˇ\bJ\u000f.f\b\f\u000b˄\u0002.7q\u001f*`g4J\u0017c90^8^Hw/\r'GcDy\u0005s@bbKP,/] E&\u000ePiL{k=\u001b4xy\u0007u'(\"=\u0007Z\u0019[\u0010Nva\u001bA\fde Sv|\u0011YC\u0019{b#|K%~>\u001ck\"s91EΜC\u001ayȆL\r\u001eqAy SF/\u0004_\u0005u1t6|\nZ9\u0011O\u0001\u0000\u001b}1_\tG{\\fNl)Wx5\u0004t(K\u0010.O*=w\u0005\u0005N\u0002fV\u0002e( j\u0001l\u0001\u0019̆\u0003Mg\u000f@@~\"\b%a\rW-}<c\r\u000307\tה\u0015<~\u0005\u0013جsӓv9C䝘r\u001ev\u0000lD\u000f\u001a'f\u0000TOr)\u001f^U(\b\u0014'!cRKz\u000e\u0012'42l\u0005a\u0019Q\u00001FpjA=\b\u0000Up2͘ͅ&\u001e͜-\u0005ز\u001d8e\u000bO(\b|v\u001cf6TW(\u000bG7\u000b\u0016\u0017*d\u001d5\u001c\u001d\u0015=\u001a>QT\u0014T%\u0006\u000eB$MA~E̸HX\u000e,\u001dZ\u001e\bkQm|\u0010\u0014g=~\u0001K\u0011rǂRf(_4\u0004{\u001eE>*a5\u001b\u000ePۃ[V46i#'\u001dE?\u0004!\u0007HBLvK?h\tL8 WaDrh\rE\u0011\u0016 `,\u000bi\u0003r\u001cy!څ('l!c\\%ռxW\u0011hfpr~23fMEK0ȯc\\fց6zi[pvv#rR)t5w3F'\b\u0018I32i\u0000$0a)4\b(!\u0018@\u0017Ah;<1훲iߜ\tzᙳ#IT/j\u000bM،[tr\u001e\u0001`\u0000& [\u0014`F 30DS\u0006\r%1yx~\u00037\u0000}}X%@\u0013v\u0002#,ˤ\u0013Va{x 7g8\u0005T3eG'L茝5\u001a\u0012q\u0000,\b\t38eAO@p\u0010.\u0018\r\u001580\u001e\u0010\u0014>\b\u000b!'*9BLa!\u001e򩨍CRA\u001bjA*)\u0018v\u00046$\t<F \u00040\u0006d'C\u001d\"1H6\u000eʔ\u0017-ڧȃI+j\u000b!h\u001b}Q7\u0006\u0004`\u001b\\,57sށ\u0006H\t!\b\u0004JBx\u001a%2XEpV4a\u000eׅ\u0001? 5T,Q.K圑$ \u001fbi\u0013`\u0000\u0004L\u0005+F+M4 (\u0018);m\u0000B-h椧m\u0003SMf\u0011[Pآ#\u0014x0W'36T\u00073\u00195v&\u000f.\u0003\u00136\u0003\u0017^1a\u0002AbQ&\u001f\u0011Y\u000f\u0015Mzj8!8MXNN\u0001H\u001fI8Д\r$\u0012i;~\u001aIְ~*\u001e\u001e1\u0015\u0004b\u0005>m\u0006u\u0004DD\fN*'|}\u001eRuGR\u0010uk4:\"*j\bYf4\u0011&oC#:e\u0006w\u0001\"5?;킏\u0013\u00190\t\u0017+ҔϥRq\u000e\\3\u0007E\b\u0010?~چP\u000bPU\\h%?W\r\bSNZίxk\u000eݠ\u0019\u0003\u0007a$%43\u0001:cA\u0015>\u0002MfAv!H\u001a/?\u00008II'>i\u000bO{JPG\u0006\u001aCɄFp\u0011i?W3C2󒥐\u0000{\".TA \u0002\u0000\bC1ְ\n&h\n;ʗ`YD\u001e!G\u0012?\u000f\u001d\n\u0002\u0004bNIր0(s\u0007Xʤ\u0015\u0007q\nnъ\u0000b\tKdʌMS\u0016N§\u0012&\u0001`\u001dtIo\n\u001e\t1,0N[9\u0017iq,\u000fXJnO%fbf\u0013\fϊ\u0019\u001b\u0005lps` =0a2 \u001a\u00171O$\u0003܎JMj@'̑\u0019~o~v0Mj@\u000bR\u001e\u0001Ϗ>ČW\f\u001dBX\t\u001a\u0001\bL\tPသkD\u0017Iv\f^\u0001\u001e 1$>:\u000f\u000fjG{\u001f>\u0015&$j\u0006'\u001fIFb\u0000_\fEJ\u0006\u001ekyr/\".D\u001c\"- B\u0005bZ)i\u001fxTyp\u0001\u0015K\u000eDrES\u001eF\u001ah\u000e%L\u0011k`{\\ vNOip!8\b\u0007gt3\u0019'>&n<\u0013`K~즊^\f<f:?P^sN뜏Ć\u0001\u000e\u0004c\u001e'\u001d\u000b\u0005N\u0014H2y\u0018cp\u0006:܁X\u0001\u0013N}@\u0010\u0001\u0018,F͓\u0016<h!\u0003\bӦ--\u0018#\u0019+qQ&b\u0002'B'\rA\u0010G4t\u0007Ka\\fm\u0011{0\u000e\u001ex\u001f#)`c?\u0019:1uʌztQN@\u0003L\u0012\u0000_4z\u0004;`!'W,\bLYh ۂK'\\@\u0006MO\u0003=\u0015M߿A\u0000\u000e\u0013\u0010\u0018sH\u001c`\t3y3\u0006qDH+\u0014̈NB@p\u000bsE\u0011ي̺H\u0016NBS\u001bE>\u000e:7a\u0003~\u000b|1\u0002B\u0005\\17\u0012\u0007B7\u0019uHMTj\u0004\"g\")vϪ=2vY,\r\\䦲a\r&\u0019\u0018Qj\u0004q]T\u000e0\u001fID\r\u001a\u0017ͺ\t@>T\u0005\u000b\u001c*Og\u0016ʖO,\u0001ԍ/(\u0000MX@#<,1˧y=D\u0012\u001d\f\u0006WfQF\u0017\r\n5,4O\u0012@Őn,\u0001ɁƽdP\u00060w~U܍\"\u0012tJK|Lلm\nӊ\u0003~\f\u001e\u001e\u0003hv@-`5\f\u0012/N#>2a\u001cG4c0\u0001M{Z\u0001\u0005\fɜ\u0017'm\u0011y\"\u001a\u0002-C\r.\u0019\u0001\u0019@\b/-\u00057$\u000e\\gp60eA@U\u0001Ţ/\u0007b\u0012\b\u001b\u0014\u0017<\u0000\rИUM2d99$T0׽l\u0006SS\u0015x5tb.hpVD+\u001b1t\u000e\u0001f\\\u0019MBEbHjoq1!.\u0010w\u0002\u0000tOn\u0007vXi{i̓\u0002\"7%\u0002\u001c8<h\u000e\"W\u0019\rV@$Bi\t\u0000~]\\a9؉UטB@\n΃G%:\u0014SDnP\\%\u0014a\u0005B\u001d\u0013\u0003/_\u0005ma4&VvB#r+\b@\u0015xU\u0017DΌ*]\u0002\"|-SV\u001aN\"0/\u0019\u0012C7\u0005DG$mE*\u001c\u0013\u0011k~&\u000fzmE Es\u0017\u0003\u0006\u0010k:\u0000O\u0018H栲sh\u0001s@\u0003\u000f\u0010\u0001Ҁa~DdZ@\u0000|lIT\u0006֐J\u000fh\u0013.B\u0005hG\u0015[@r!\u0007\u0004\"kB\u0015bo+̙BI3|o(\u0006\u001f񐹰X\u0003\bq,\u0011h=-\u0014\u0007\u0005U.ӏV\u0016C.7DoԐ@\u001d?\u000f\u0019\u001aU;6E+$ڀ)\u0017\u0007逨9Ð2\u0018[H`\r\u0017\u001e\u000fq\u001a&WCb\u001dr\u001ct4Z}x%g]$z^XYR=6(WtH5PDTw7? 3}\"b\u001cz\u001c\u0010\u0014\u001eo\bi\rؠ\u0015I#J3Uȏ\u0000iN*\u0007h\u0014\nK+\u0016m\"\u0001\u001a\u001b\r?R)'b\u0016_rTfdrtR}DUM\\]`K|yCl1%**/u\u0013\fIu)*]\fe\u000fG\u0012\u000e\u000e\u001c80\nD}C+D}\u000b8يP\u0005LidLBYsP\u001dOp*x\u000f`\u001b\u000f\trE,\u0014+Dj\u0000T>7\u0015'\f+H\u0005CiPv\u0015\u0016|ʔOG԰\u0004R\u0002<;4S/\u0016+ͭHf U֣U:\u0019ś[\u0018\u0015\u0016Lo7Z^r⪏)g\"e:R9\u001f$\u0014\u0001b\u0002L\r#\u001e\u0000|;_\u000fO'\"rc\u001cj!\u001b\r\f]upTY4<DF@B @p%hqGfAt,\bL\u001bI\u0012\u0004TP\u0013hyIl\fJ{.\u0016\n]\u0010J\u0011~u[s\u0010J3#*;\u0016J+6<3-ZmD+cȗ\u0017u@Rd;\u001coxl(Z\u000e+%\u0013K+n{f{F\u0016d\u00177ύ=~\u0019^er^:\u001dBӥL\u001f/#~(ދw<\u0006j:[\"2c\"=\u001f//7nй\u0005\u0003\"C@\u001a\u001eꫭ:pHXB|Ij+~\u001eNv\u0002t\nA\u0007y]\\\u0019#BuFRdS}\u001e%:{6<`0\u0006\u001d\u0013JR#:;\u001c\u0000XTo\u000eI^\u0012~\u00045[\u00067r'1u\u001868.]+_KH.k[\u001bW\n\u000bg\u0002B\t5\bu\u0010IuˎpV|tCetL\u000fd_n\u0014\u00172cT\u0018GK\u000b\bjFV\u001a\u001c#JIjBvi\u0006\u000f\u00114G~}V̓a5>|.#y:W\u001c\u0014qT\u0019\u0017\u0005\u0019T:R\u001a\u001bByUoWeF\u0000۱be-(cJx| ݳLv6b\u0019\u0002]H,\u0003E$Z\u000fn_Re\u000eҽT_Rm-\u0018-\u0007|X.\t\u0005?_Z(\u0016Ͼ|1\u0007\n\u001btPhɝ#BO\u000f4\u0005Y,\u0010Kv|=tU[4vZkW\u0012;By/ILwz%;\u0000x\u0000Y#1/&>(TY\f\u0017.1p\u000eeNx8\u001aj'ΟFgK\u001bh\nG !-\u001dG\u001b\u0000Ba|5:\nƀ\u0004\u001c\b*/W\u0012]\u0017\u0012\f\r\u0002:A\u0003sd\u0000VrJuT\u00124\u001f\u0016\u0007\u0003hq~|!pv#?X9\u0018\u0010x(av\\'?1y(Z\u001cCc\rRcemx޼\u0005ıx\u001dXT*g\u001b\u000f7W.l^}z\u0011\u0016\"\u0006.+\\I\u000f[n>JqH(Uʹq6.?'\u0016Zst,\"wJ/\u0013}/W`Tc ry^%;Y ^Xuv^\u000fIQkF#Tvӣrc\u001f}@f\tɴ6\nk[K?q23H5w:;\f\u000e\u000f\u001e_\u001d\u001bq~C\u001b\u001e!R\u001fTWo\u001f\\\\{h3dZ0:sO[UkF\u0017˭\u0016\u000bdsɶ}Ff|e]\u001cڻҥhur\u001esy\u0014N4b\"WV[w3A)O\u001b\u001anj\u0017x\u0018h\u0013h\u001fWKWP)X\u001fTg0:S_>y;T\r\\nߪ._.,\\Tg\u0019m_{N\u0003D\u0001\u0012+sQwKw_\\vsE&ն\u0001\u000b|eWn^(<$\u0001\b#\u001aP\u0014+KvhϲyP1\u0002\u0000|Q\\8Z\u0017@\rkk78t/\u001fǚH/VVKg\u000ejhC4\u001bW`Ji||\u0003/\u001dX'璭mJ\u0007[\u001eݼlwKbSY\u001fn<?~?hi\u00132쬇\u0010\u0011vhlIϧF\u0017R\u0003ZVbǓ\u0010h\u0010\nDsFlQ[8N77L-*c+oad+\"\u001c\"h\u001cԢ\u0006\tc+._/]\u0003Vaqbp;KU+g_|>\u001e&\u001d,v\u000f=\u0000٩\u001f>gwPپ1<Ts1Ry~hml\b\n\n\u001d?ٽz\u0003+++\u0019@u|nt\u001f_X>ԙG_ڸDh|~a&j3Ry]\u001d76\u001f^͗k7֏n/l_!\rZ\u0017BqQmo/_|nS=\u0005܂6\bǪLG}X1PTv-(\u0015,E(6\u0015_\\\u0014KŇ?rw*Ԫ\u001bw7]\u0014\u000f0\"ד-\u0000IVѝOo\u0011BDi7\u0017.xdn,7׮6o2%\u000eh\u001exm-VYvD \"?\u001d\u0001Q\u001f=s\u0013͵k\u001b<B\u00100}\u000b}9]ۻs\u0005؀\bJ\u0015\b\u000bவccÇ^2U#Bͳ\rl\u001d\f>4|lN*-%GN\u001b푛{nZwSڸxE?h#pY\u001d\u0017Jkչ\u0007|e9@%;(98.\u001dr\u0003\u000bI\u001f\ba^Z8_z8>\n\u000b\u00151q\u0012<,gz{ao2}cVqt8I\u0001\u0015㋣Ƈ/>\u0019scdwy;pAm\u001fǅB6sX}C,/%:[/|'+^:scsO=uӜ6pˏ~\u0002\r\u0006|ia|vp\\\\8ܾ]^FGWZ:ka~Bh\u0017//]xs/V\u001cw5\\\u00048\u00010x:\n'h\u001cBr5\u0016ýs($\u0002\u001d%\u001bۍyn\u0006(\u00150B]\u0003\u001cΫc'TmE*7/uwn${d\u001f\u001aѵ'?#Vhcz\\\u001fx+?Wl4B\u0014,\u001b-l\\\u001e\\RҹCͥxa䳟\u000f_[9wώ\u0010B$::V7bc/~o\u0015ګX||zD{)\u0000/6F;sC\u000b\"8$\u0018Э\u0017\fڭTƥ\u000bO-p5X\r0<uLU[8wP\u001a\u0014Db W6s\u0019?%rde%$\u0016\"|y-\u0013V\u0010M(tkqeS\u0019$ޘ\u000b\u0000\u0017Uh\u0004)?T\u0007хkEDVңn\u0007o\u000b'\u000b\u000bquBf\u000e<!\u0014BR\u0011\n\u0016\u00004Ps\u0012W\u0018R\u001e\u0015Ty\u0001h\u0001\u0000djDŪA*-Fť\u000br\u001d\u0014\u0012\u001dkbyT!\rhm\u0010\u0014v<+H\t{$T\u0007|\u000e\u0006>'\n\u0015du\\?t`|awNi:[\u001cG}\nK4C\u000fuAn\u001e\u0017\u001f7-J`\u001f2\u0014Ty{g3GO\u0016G\u0017!j_yt\u0016\u001d\u0005<%whm\u001dW\u0014\u001bXUX]vnt!Y^\u001e T7i\u0011c51/\u000fk\u000bGX\u0012@\n>*\r}\u0007\u0001\fawjlf\u001b\"U{r~|+.CVEcm7Df\u0016FRd/,WV£r\rRvy\u000b\u0011!\u000bC_6/\\zntxG셥;/.@+D\u0002f'\u0014'\u0006$R- t8p-q?\u0013Dih\nЮHHuqu\u0004\u0002S ͳّ%\u0007\\j\u000b\u0012\u001bE\\aQ*eAmzKg\u001eKvtHwXm(\u0015Wj\u0007h2\u00018҅e<;\n9)7P[\u001b^&;מ߸bq*[\bp9\u0018\u00122\f\u0012J81\u001dAUʢ\\[\u0016*KJs\u001f-DM&h[۵\u001b#1׋\n6L6x\u0007\u001aDL~\u0016 XRZRYDnEk\u001e*.dYP#\f-._pPI\u000f\u0001\u0001V\u001e &\u001dy7,Ώ\u000eT;`WZ+\u0012m\u0017*ᕧ\u0019\u0015֮6y\\`\"3Wj\u0001ZG\u0016/\u0003Djw\u001atDtd}G-J%\"مf%\u0000ID}=VYm^\u001d\u001eܥ=;XD\u0007?\u0013\u000e=\u001aQ\u001alf7o±\\}yt(ɘ\u0011^\u0002!&Y\u000f\u0016[{\u0018\u0014\u001c¸Pܴ\u0004\u001c2✗߬Geʴ#lv,\u0006\u0013\u0007hqJ}Dw(~A\u000b\b\u0005\u000f\u0015\u000b+\"p7\t/\u0000Q\u0003\u0012h\t\u0002f-(\u0014X\u001c\u0013\u000bLGXZd\u000bc\u0003졔o`<\"e3Yb\u00113فbnvp\u0001*ټ~+瞦ҵJ{im\u0007/\u001d2yLi%1\f\u0019IᱺIC\u001c\u0015@\u0006\u0019\u001ck]xq;t\u0007\u0016d@'2]&c-\u0007*b$]\u0018XM'@;~.\u0003[\u001d_ICpשd\u0013i\r\u0001*ͧ:F\u0007:m,Q^\u000fΔ\u0017Χ~\u0010_.\\hoY4Z\u0014\n \u0010`T\u0015݄\f\u00019Q_%-,VCHԶ\u0017:\u001bdǍ\u00116\u001b/]\u0011G&cupRiR\u0001BDKP2D?=\u0011{\u000e<n\b>*\t\n\bq&Vt[\fn\u0006krm5\\g]Lb\u001a\u0019k0epp\u000b\u001e*q0FRX\fP\u0019eb/}\u000bF\u0017\u0016 \u0014\u0002G؋Ys\b7%T\fn\u0002\u0016\u0016fxQ[\\o6t\u0012\u001a\u0005<4H\r\u0006(JkYPx\u0002\u001f\u00029S\u0016,ѾPR͠\\DD4s=.\u000b\u0001*&\u001b5z\\Ǔ\u001d\u0011|x(Yp\n\u001be{7\u001bkrm>0ڄ\u0013=&\"\u0015WyU?$`Y1\\(ç*ų`BGuwnՖ˥Tyt{ן1\u0004T3\u000b`\rZi\u000fi\u0004=tɏ\"_ц\n\u000bWCъ\u0005l\u0013\u0013\u0019[$4Xk~<ep\u0013]p\u0017n\"Ū}GH6Tt*&\u001fjy,Z4zH\u0017FS/Aeg\u0013uW`4*\u0014ݽY7A+by<\rkN,D%\b\u000b\u0001\u00146\u0003Y_~z]\u001eF\u0002rXفr^\\\u001f \r\u001eoߊ׶\u0001̳\u001eϩd\rOVTS.m'Zb\u0019\u0017>cC~ʋ\n\u0011.\b\u0006'iBuB\u001a\b\u0005>2Ѧ\u001d\u001778X\\s\u001bDa\r1\bl6Q\u001dWWgr\u000b\u001bҹ.\u001e\\*xu)\nnGK \u0018ӵXqTG|%\u0014/\u0006D1&jA bk%^\u001a8\u001eaт=\" \\\u001ahMj6V{\u0011\u0016Rd^5;\u0007v(G9>?ESV\u0003ZW\"EDN*0EcXj5^\u001b7\u0016/KOHK\\^E\u001d'MiKЅJZk+U\u0007SQ)gjPQH.Z13%;):\u0019\u0005OJshf́ \u0016\u001c%\u0015BtڅɶpKy\rH\n \u001c!Nݹ|wh?\u0013ĭ,\u000b!biچf/\u001d`Tϛ}8ѩ[J5w\u001an\\rFn9cq4$#ln\u0007aH\u0000^JEc\u0019ˤRN5V \u001a0j\u0004\u000b}]\u001c\u001f\u0014\u0017\u000f@m.gڻaarQ\u000fL:Nh9w\u0005\tkƂ82U\u0006G\u0001\u0011k<\u0011\t2)*8i\u000b\u0005\u0018\u001ej\u000bj〒,f|\\,_>{O}\u000f|/o'??~/o=Rs<v_Q\t8/\u0016k`?\\8|_x\u000ft\u001f=ǟK>/~/go]\u001anҩ*g\\W*\fx1T+Í\u000bgn<S>񑗞엮|c>/|Kꗿ?ճ7L-&]a>$R~6ӹL__9smb{m{wf|teʣ~埾\u001b?|W\u001f~Vhԍ(>,\u0019fZm28\bYaAavWˏ_G>}w\u000f?-\u0016.<ĝA\u0001,\u0004ꊐ%+\u00035_鏛KݫG7zc{\u0013\u000f7wrs㝫\u0016\u0015]D\u0014\u0007*\u0011\u0012{\u0003\\^Wf+j{̭'_Wxُ}3ދy?˯<̇\u001f\u0000\u000b\u0015p)+冉ʚie%TG\u00166\\#O=ʷ_~ǿ?;\u001f?:k\u000e| \\9Q̷mC#Q.Q'亟\u0004dD\u0011BwǞ=g>O|֍E6٘\u0013\u000fNYQon\u001d\\pw\u001e׾kywoowʷ|is^:\u0017$tn*b7Z9po}~їO;\u001f+_O~;_\u000f?˿\u0017?[\u001f\u00003VtΕF[rYlWwݾs\u001fg^\u0017\u001fw+/\u0011@{ٯ\u001fg\u00121\u0010&*\\_8<\u000bWn=\u0017?}~\u000b_}k/_\u001boG?G-tքDjap\u001cd\u0010\u001epmG\u001f/~?7ׯ~?|;\u0017\u0000s&J~I㵕xy3Yۿpt~O>?~__?_7t~_Ae\r\tF\u000f\u0005i\u000b^\"E˒-^{\u000f_~߾?+߼\"\u00118C-@\t\u0005bI~#w\u001f\u0017կ??߽oO_\u0017^꬞)\u000eKlIR|6.wܾ_ko{_ǟʷKx^)Ӊ\u001e&[\u0017.]c=ԓϿ7?\u000fOo__\u0017o߽qp&^HTBL\u0017QHAeT\"5[3\u001f'\u000b?٫?_zO\u0006|\u000f-\u001fh.\u001dZ\u001az+|[89<{xc}\u001bw\u001f;篽/oyoǏ?duW\u001b\\\"Ƴw^yջO>׾^7\u001fk{睷~o~oů}]0.\u001b\rӍM\\*R6Zk0\u001fs_O~?{_\u0017kw>*䁬D,*+7^ħ>/W_/?޿7\u001f~/~}SVm\u0001ܨ\u001c S@\u0011Ntps\u001fԧ|[ӫ˿W\u001b?/K7>mγ\u0013l~2vHz\u000f.IK$L}fDɰ\u0019eޛ򾪻T\u0018?`\u00063\u0010\u0006V\u0003\u0002E\u0002\")\u0006$rt\u001e}}{N:U\u0011//&[\u001fo_?Ͽ\u001f~WW7\u001f|7'O)vɁa\u0013\u0006Q\u0010Bj\u000e7On?|_~_\u0017ۿn>x{Mr#YԚr+V+\u0000v\u0006k+[\u000f{o<ޭ\\k\"B1>\u000e`Ճ[=݇#`Bl\r:x}|o=xw\u001f?\u001eV7Drn\u001e\f\u0014\bD壓76\u000eorzpuox;ɟ??|G_^*3|\u0000t\u0000!b/KB7\u001c6nܸ\u001fOO?_~{zg\u0007GWj5\t(\u001aL̃+s\u001e5G$ǩlzgϾϾկ\u001bG\u0007ۍn/[oՇ\u0018x\u0005I5@\b4'rFccޭW\u001f~\u0017?oo\u001f>ۥF5\u0006̰Gu]@s0+Yxm}|zփo<~\u0007_/w?;zyr$]hY͉0\u001e(\u001d\u0017RX2K0\u0016%r;'/~G}G\u001f}/η\u001e}[\u001f;{r<\\ӡI˞0AIj{{Ǐ<W?\u0007^>{/?>\u001f?~sP\"\u0002pƅH6/es^\n \f\u001c\u0004\u001c/!K\u001eGX\u0017: \u001a\\G1\u0001\b\u0007Q\t&5?#E\u00144\u0002|ʲC\u0017F|a\u001cgESHy/\b\u0010\u001d\u000fPb\u0000?ouۼ(>\u000eb<c*/\b4ʤRoywɆH潈%@8â\u0013\u0012,~\u0016i%+&k8\u001f(\r-U]3bl:gkdK1\u0013dK%C\b%2p!#Fڬ\u001e\u0004JEEMʍB\u0019fkb\u001a8Ȉ\u0010G\\\u0010-n|\u0019^Ykhz19N\u0014dϖ\u001f>~vIZjm4/[|\u0007GY\u0001\u0002,:\u000b^7]q^+f!)sUZ!T3Ulz('R9II\"\u0011/\"V\fu.Vx,Qeifbw<}^\u001dU`@UT*'H:ю\u0000\u00066\\ryMo,x\u0011\u0015\u0013.(\n2AɺLd:\u001cA#\u0014\u0019\u0015hx]Mw\u000b\u001dб7./YQːJ)[l]Ӂ\u0000oq1O(\u0015`$ &\t)7*/`D`y9E[hށ\u00061\u0019xQ+$\rGSӞ$~bчyIG$<\u0011!s\u0010D &A\u0011\r \r\u000bYL/f=j0\tࠂ\u0011\u001e^%@l\u0013ڬ%\u0000\u000fצ\u000bjh=̙\u0010c\rP\u001eDX``\u0016\u001e*\u00001>\u001b\u000bAB\f)\u0016\u001d3>oXƸLREȮ\u0013wyO\u0016\tY~((S|,L\b(\u0015sBҢZ\u0000\u0015f)|\n>H\u0007\u0016=Z\u0002%(\r\u0011fh莙,Y\u0014`: \u0012\u0005Âw\u001e\u00153\u0010L@\u0018\u0017\"1\u0015\u001c\u000f|9;G9;Ǜڶ\u0000<VC\"\u0017bA3<عY7x _\u0016\u000e2\nES\u000eTvꢗ\u0002\"\u001bM\fQ?J4\u000f+wʼ\u000b\u000b\\47.\u001d-dVp4~>0o\tf \u0011;\u0010w\u0013\u0000(\u0006g-#P^\b=\u0010oްÌt۴ɤ^\u0004_/ڼ3v=uFV^EY3\u0011j\tJ\u00012\u001eSa0m\u0019J%\\\u0019ۙy4<\u0014B\t@ȥ0նE\u001e\u0011&ŕ\u000fS(.^noRa\u0016d\u000fλ`/&\u001d!$:`0c\u0010/Q\u0010r\u0000Bc>\"E\u001aDZL\\r\u0010kf{>Ly7\nK\u0018V%\u0015\u0004(eAR\u0007\u0007/\u00181'$ٌE[\u001dVfKt\u0010>$B\nɳHЬ~33\\K\u0010EV7\u001a&cH4\u001dhNwo\u0006f+x\u001bM\b\u0011K\"\u001ai'='9?m,\u0003<ڌ\rB(e.s3s\u000b\u000b6|Ey\u0011MMM9@k`p\u001dQBlFL\u000bQ1.!:sE\u0007.Ya8\u0012+6161\u0004t5)u\u0007ja\u000eIPt\r\u0001H\u000foh\u001d(\u0007ac\u0019+\u0000n䆢\u0019/PRQ4'\u000e\u0017\u000e76\\\u00013Y7\u0019ft\u0012\u0011Ь\u001dRjkI.A9\u001b|i)\u000b\u000b(%M{2-@^\\!4/:E?\u000bhIvJiZIYBJK\rQX\u001d8\"\u000e\ftb\u0018\u0010\u0013&V\u0019s\n:\u001eL\nqi63\u0012,xp6ǻXs\u0016$\u0014*\u0007)#HM[L^9ݸ\f>L\u0004ፋ\u0015T(Z?I>-'\u001a /\u0016ܸ?2)2֑\\j\u00023Di\"3Nx*0\u0017b\u0010\u0015\u001a\u0017QBc\u000b\u0011r\u000b^j֎.t\"\u001bq̂ϋJaư\bG\u0004I=\u0007.\u0006U\u0017\u000eذ\u00049Hܘq\u000e/\u0005XF\u0006یxp\u0013/ĦP>kO\u0017ݐr\r_?g=;\u0000g%Ib6 \u0000M\u0010B\u0006\u001c\u000f#kEK(ƴ \u000b\u0000vt\f\u0015PF,\u0016͡Ѽ\u001b_,0Dv\u001f6ء2z^w݉\u000e'\"\u0006K\u00011Hf)':r\u0019ր=\"\u001b\u0004{f18o\r_\u0000_\u001d\u0018B\t\u000e˄RZ\u0000\b ,1dA|\u0018wfҒ\u001f({s^ᒛ\u0012|Ƃ\u0002u<x{p\u0013Y\bqfr\u001bJ\\拫Vm\u000f\u000e}RPt\u0011\u0012<d:\te*\t^Dd\u0007`B\u0001\u0017\niikJAHiX.\u0004,רD\u0013\u0012Ra3cO!6\tBKp!\u001b5jY\u000bݨ\u0012f-K\u0001PX\u0003uf*Mo_\u0003M\u0001%̻1\u0007\u001e\u0005Diz1نhSʹKw\u001eT\t1)8\u0003ѥ$\u001b\u000fq1w\u0006; \u0011GxPk\\5@㌱Q\u001c_-:\u0011/,\u0004\":I\tK \u0019\tE\u0019\u0007#_\\4S&&\u0017dgڔ\u0007gNh\u0015gH\\a\r\nendstream\rendobj\r18 0 obj\r<</Length 65536>>stream\r\nBܙ\u0017|v\u0011\u0013)19в#R-1F͉ʗ\u0000PXGX<52ݓ#L\u0004'VGe$/z(pT\b\u001dw\u0017\u0016\u0003\u0018mgK!قIWRF\u0006ɨT\u0003c\u0005{qB==\bbKC2\u0010P ~Lu\u0004\u0005\u0017e@\u001b<b\u001f\\_\u0016\u0013\r\u0010z}yv\u0011\u0002\u0017\u001e\\r,ypH\u0003,Y\\ҭ\u00190P!$\u0011\u001e\\vd'h2DGɭiXiIϻIMuZs\u0005\u000fǧ+Ԩ0۽b:{7^BԒVۈw\u000e\u0013jjtJF\u0010e:oM^Ttc0q\u0016)k\u000f\u001e\\[\u0002̕\u0012\"2\u001995\u0000\b\u000bzC\u0010\f.inRj\t\u0019(|=Św|ށ\u001bNT\u0005%h7\u000fD4\\J\b#\u001c\u001fxqy M\u0005\u0014ь0B4\"\u0015q!\u0000%.\u0001tb\u0018\u0002\u001bw!\u000f\u000e>JvDF<L:Zy\u000fAuTz'S\u0006H&\"sLJ9$ݨ\u001a\u0013\u0011u͖#Q\\WZ-AU LL=l\u000fF\t\u0000&&Xk\fĵ\u001a\u0004p\u0017\u0012l蒛a0\u000e\u000f\\T\u00027.\u0016ؒ\u0004M\u0017!:UY\u0002&p\u0013\u00012Ŋ\u001anz6\u00197)\u0016&0\u00189\u0019\u0005\u000fí\u0000\u0011bK\u0010\t7ꐔwQPZc6Z};\"X..Dj\u000b\u000b\u0017=\u0011\u0014;GV9\u0018\fDb`\u0000!:jt{_)wC2\u001e+gǅdr}UD4?{ׁAB*mt~y\u0012ZvdbEAl\rM~5?~C*o{(3@R\u0003\u001e\u0016\u0017LMFIQg\u000bO>ioa\u0001Ԥ:W \\v]o\u0003gD\u0015\u001e\fPqBz\u0011\u0011\u0010\u0001\u0016a0f\nE/I \r\u00126efs?$\u001cp\u0014@\r\u0010@sx\u000bٿ\u001e6ZX\u000b9Wd\u001b*\u0013FK)\u001b <\u0018h%;j\r\u0014\u0011j#q\u0011\nޤ\u0012H\u001d`w@\u0005\bEsL\u00135JY>\n\u0010ʬ-\r0\u0000j%\u0007za)@)eR[E\u0017E*1\u0018S\u001b\\\u0011S}T(L;Y \u0013\to$ukP\u0018 \u0019Dy\u001d\u000e0~\\ó!\u0018H\u001c\u0010ZQw;ta!\b(W\u0000|G\u001a\u0007\u001d\bf܂cуQ?UR1\u0001+Ʌ薐[J\u0013\"e2C6T6\u0010N{/\u001a[.XC0\u001bTuS\u0003.9X\u0000\u0005i;,Mw@\u0004L˥3;a>\u0001{a2#FJv8/u6n\\\u0007Ҟ\b/Fqvl:\u0013dR~ֶ<fqrvO rfIjTcNr\u0011U\u0006k'E*aqV&!J-\u000f{O+wX0ٳrsp|dK\u0011F/5h=VK4epYR=\u0000Y\u0003zxxL*8ݻ\u0005\u000fA*dg/|=3~:as\n\n\u0017%X5\u0003c&C|\u000e\u0016+VX\u0005.\u0012`ٛ\u0001~\u0006X5mљ\u000epHb\b}?_Sz4 :*0D\u001ahh~ %\u0002\u0006\u000bH\rf]8$\u0018\u0000+\f\u0010\u0000*/W&6\u0010Ʀx\u0018%(@g@<\u00039F\u0001V9IU&\u0004%\bT\f\u0010Ki/\u0019\u001b\u0017\"\u0016?{g\u0017\u0017\u001dȜ-\f\u001d\u0014+PHU@\u0005\u0000&\u0010x]tz\r\u001bkvVoy}1ǔR{E0Aufcr;9^BY'9`PA\te:Hi8ɨ^J66h\n/P\".ӗ\n\u0013Vx\u0019|K\u0007&SF-.Ǜ{T\\\u0012:kTl\u0001@\u0004\u0006Ԛzefi\u0005+/Y/\u0013d\u001fk\f\u000eTr~\u0014on\u0005%7\u0012dL17\u001dq\u001f=q'bT\u001336ݝXm0f}z\u0015'&W&\"TX\u0017pcڭN̶v\u000bE\u001fufoD\u0007d'צ{\u0000\u0001$[\u0001>IHR_ݸڻ_Z\u0019^Q*[QŅG?㓇im΍K&\\^EW֎_|c.F\r*92zW[\u000fKOƁN\tƫ/h<0T*'k\u001fV;\u0005 b\n\u0005\u0007:磭a\u0015צӥ\u0000\u0001Lp\u0005i1\u0011>\u0003ύS녵{+\u000e}\u001bh\u0010\u000bpmtMHA~\u0012\tEVy!u.X\u0000~\u000b^L\u00059lgKGK9(L~LC\u0000V V0`ao\u0004\u0005/i\rK\u0007\t\\-L\u0000|\u000f0=nvOni\u0016iv^\n\"TF/y#\u0003j\tH^΃%\u0001\u001f\u0014LZ*J閗ݸhCİTLw[oD\\}t\u001d&PXV}T\\)\u0015VK!Z'@\u0018uT\u0000EIʜE\u0001\u0017n\u001b}q(6`.Cd{J4<N->+wny7PPnyi\u0002\\V}eǷe]:\u00162>\u001a\u000bt\b'M \fό\u001da5l\rDT\u0012;/\br9:\u0007\u0015,\u00065[x%;\u00102$\u0017Cr\u0019VuU\u0018dr\u000f([9\u001f&\u0004bJ`j\u0015U+VfWܪo޹ڭ\u000e\u0002Ȋ0!,\u0016\u0001C]rPK\\QJ\u000f.,!IOQ4=+>qQO{pOV<yko6\u001f\tM'\u0011qN[Q\u0003fJ\tQJ3k;N83\u001fptu(\u000bs?88$\u0011#ՏƱQ?\u000f79\u0017Y\u001b~\u0016 \u001c\u0004\u0003\u0012AVWBe=Ah5F̲\u0013\bFT\"\u001cEC\\ktR(\u001bw\u0001~Ӏ\u0011p\u0001^vUӆc\u00020ƮYY9q\"\u000eD%VRJtverޫ]'\u0018ZϳÛ͇GtjpM\b~D.#K3iXj0Q}σ\"@L\u0012\u0006`wCx\u0010_HT-\u0003-q)O)訲vz\u000ev\u001f6p\u001d\u0014F׊h~Eg` \u001e$;.bƎ\u0011ZˬD#69\"Μr\"\u0012̀\u0006\u0003LZެn\u0001\u00038\u0005.VݺG?[\u0010\u001fL&1m\u001bAZ\u001c\u001b׭p\u001eYG\u0003T\u0012(L87\u0007>2681_}uJ`!$EJM#1\u000b\u0007t)z .\u0005ۊMT`\u0019@t#6\u0019Mv,pSjsZm|(JM,\u000f+\rP\"Jy-,\u0005D!7h+`E|\u0011=7/~ܒ\u0003ڈ\"J^t0\u000e,\u000eqY;~\u0016\u0010\u001c\u0015QA:.O[{\u0018LWBL\u001c\u00118\u0005q\u0017w<Ԋ\u000bE]a\fr\u0007$=ك\u001b\u0001 \u0015\u0012/BB\u0010\u0010M;/\u0005\\\"+:iU&R--)\u0001\u0013ru0|t\u00101\u001d&;\u0019o6a*\f0ټ\u001bmn\bL?\u0013} Pԁ>:$G|v\u0005כ\u0000%aA\u00119\u0018\u001e=ߺW7q~tћ7~QQ1_4\u0019\u001d_\u001en?\ro.BA\r\n\u0006\\\u0002ٽ䦀\u0006,\u0006\u001bX4\u000b|\u001e`#Sͭ#D\u0010-:.\r$ͻ\u001c\rX{?3\u000eҍǉ)\u000fr\u001d\u001d\u0010\u0015\u0003\u0000%\u0000먕7cWg\u0012S[oL|j\u0018l\u0002k\t?릖|$%=:5Vč\u0019fc?r\u001dx\u001bL.\u0005I(\fl!\u0012dAhxދ]XY!\"w;a9\nN\u001c\\\u001cpd\u0005k'-b[\n\t ag7;\u0005hq~\\wMMTXNoޣO]?b@eh\u001f͎P=\"$-LLp\u0004\fT\u0018\u0001\\\u001f\u0003\u000f,Xg\\\u0017\u0016}g\u0017|\b!\u0013\u0010`\u000bɘ#@j9j5\u0019^\u0015+ZՀAʶ`N\u000bs\u0000oMJ-_\u0013]5M\u0017DY`\n!\u0015Q\br\u001f\u0013b\u0019\u0013\u000b\bHv!x\u0002\t^\u000eX%z'!R\u000bSri)ڵL{/Sۚ\u001c<L5a!ǉe\u0002:f7$$k4Hm\r}<`\u0006\u0015\u0000ab\u0015~ÃJRz\u0015ӝk㷢\u000e\u001f\u001e=\u0015\u0002B\u000e/lhM9\bJnZc)\u0004Z\u0010G\u00151\u001cL/ʫ\u000e¥\u001d\u0010\u0002N/(\u0003\u0006\u001d\u0017\"\u0001\u0007[\u001e]Ģ\u001b,^\u0006K\\\u00163\u0001\u000b%1;\u0013].3F$,/_%@=\u00172aat\u0005$(D̉ђ\u001bz\u0012\u0004 LF\u0013=-أ͞5Y\f[tӛ\\sbNL#͎:\fOAU?o\tˉv<\u0005p\u0011X8*\u0011W\u0000_ؽӻ+nT'\nWQ1'Ǳֱ8*M\u001e#>;t\u00112\u001aM\u0010º=\u0000\b\\pG@\u0002o2NK(\u000f\u0011\tJ\u001a`&$\u0001Nw\u001e|{la\r|d\u0014'{r \u001d_\u0013q\"D\u0018Z\u001d\"TGbT+\u0001`{6Hq\u0011@\u0001fK\\\u0004\\hzKg^R#\\i<\u0019\u001d>\u0018_}1l[f8ȧS)ByJ>8Da$}\u001an\r)7,x\u0011IH\u0001dS^\u001a,X\u0000@BS\u001dz1\u001b``<q\u0017\u0000\u0017˶ ;K[\u00077i\r2\"TӐ\u0016=\u0007+nyrqgr-\u000br:_9|dG\u001250J6\u001fCň\u0001ٔmoj\u0011D\u001b\u001b\"/l>\\>~[/Wwn7EɎ\u0017\u00032tv}xg\u000fG'-!\u0010\u0019\u001a\u0005 \rK\u0004H.5$\u001ak\u0002s血\u0003:e\tF\u0017\u0000Ly\bBj@ek\u0006\u0010m\u0001@H8h\u0005\u0001\u001f\u0005\u0010\u001a\u0016TKZJaj)U쟈m:=dr6-\u0005y;TD(\u0001b *\u0010D',\u0000џ^\u0012\u0010\u000bpDWS\u0016\u0000\u001e[[R\u0010W\u0013\u0017A&9\u001dp\u0014rĤ\"OZ3j1]]:n`r+\u0002XB\u00028A^ ǁλi'H\frd\u001b[[HUFe4=l\u000eOy,U.bc-.9@5 ]XB-LЁв\u0007Nbܼoށ,\u0000d|ms!HpϤ<tJDK\u0000X5FG֎\u001bU\u001c\u0010\u0007M\u000by<VW/-l\b\f|\u0002G\u0005\u0017\t\u001fW\t {nX\f\u00121\u0014^StN]КT\u000fZ+W\u0001T\u001cR\u0010eB\\\u0000\ra%\u0010\u0015IzM2x\u001fԒ7]hdzuMJ\r[=*lu\rXs~k@y:}\u0016mv/9\"Z5W\u0019ח^\u0011!\\Yɯ\u001da̬\u001b.9QL)m\u0000}\u0007Jy\u001bStetI+l7\u0003;Go|vٗ\u001b7>\u0002!\u0017\u0010!' ܑ\u000b9\u001b섄\u0005/\b9`\u0017좏uC\u001cP Pf<:8nsM\u0014\u0010~jlCӆ\u0006b\u001e\u0002G\u0018P yr\rx|jyt$>.\u00141pBMD\u0000XT$`/0\bnԍJ7ڿ?9~voox\u001eMq)\u0014LyAuFMyqWv$ˀb^<\u001e$ӸP\b`/,i;>\b\f׬\rsI^^7J\u0013J-\u001e<)\u000f\u0004\u0004lgo\u001e\u0012R|{\u000f0;ҚQXc\u0005!@_A_;gwY\u0010\u0000 qvyɆN\u001a\u0000\bӻC\u0001\u001d\u0011\u0006&\u0014Oȴd\u001bҜ\u0003G\u0014oT-b\u0003\u000b\u001eH\u0000#L\u001c#l_0~\u0002Ȍ\u0013\u0003vd\u001c.ƓO7N^\u0002\u00069Zk\u0002MOq>\u000b\u0011\u0012\u001eBQzh\u0006\u0018\u001eJRMάѬCrJKց\u000b\u000e\u0000\u000e@!q֎;\u0005/ᘖJq\u0012\\0\u0019\u0010\rH.T),ep\u0006R/9k{o仇kݽ7wvD)&h`D\u0005Y\u001dK.4LT\u0014\u0012mǊ^pv\u001311\u001fox{w+o>/\u0018sP\n\u0005h+^eXZ'|%=\u0012C-i[Ս'\u0018bߘ}sw\u0019v\u0004Dڧ;\u0011h\u000fo~;oڻ\u001f&/GODOkbvr=ޕde(\u0019\u000f\u000fS\tT(\u0011i\u0000h\u000b.DGLɀ~nλ`G\u001c~ѪBr\r+xQ#bB)W\u0002H^M\u000eXN\u0017'G^\u00059\u000f8 \u00012\u0011$\u0012V\u000f\u001bDuN)'W'\u0007y8@`ٌP6@r͕G0A\fDb\n\u0005\u0017\u001aa\u001e\u0016l~\rN\f\u00141/\"QyfCv\u0004Y\u0010ip\u001f]_\u0001*\u0002é$;\u0000/kE}8\u0019`B-\fRnMQ&`B{E':k16\u001e\u0011߸`[:7s\u001eD\u00128b{\rl\u001e<\u0016\\e:ٓkZ}4W\u001c^\u0019\u001cy9`F@Cf}S-\u0001JkaB%K\u001fEca6(0\u0012BFy!&I5!?*\f\u000fj'x\u001d!Erv`Tv\u000b;Ǎ|zhF;WR\u0003|t\"0'V#\u001c%À\ts>$/sv|C\u0002R[R~VʻL&\u0015\\˷;6RRq]Hx\u001bt+\"&\u001d\u0002]#L\u0018\u0015\u0000A2a\u0005chX^p\u0013,\u00100\u0001*\u0007D\rԐJ6=\\+b\u0006N3^akr#5Wa>AY%vN@Q\\a\u000fIѩRs6|n>\tsl47Q\u000eEIgr\rI\u0000YR)$[>ËK\u00100|mRhnZؒ\u001b0e\u0002%'nj\u001e\u0001\u0012ˍI\\ә?ߦ\u000bV\u001f\u0003\u001d\u0019\u0018}R︦zQZ_f{6o\u0004Ӓ\u0003s\u0000\"0E\n\b\u001b\u001a!\u0014\u001cZ\bY\u0010B\u00103\u00106m^~j\u000b1\u0010\u0012Iul7Ng\u0000KëZeC̭z>\u0010Qͬ?ygd\u0007\u0017\u0001$;#V?\u000b\n;)o\u0006(_^\u0018e7q\u00132Zy%ݻĻ2\u0004W+|CM5\\1fN/u\u00008QK\u0018~ڴb2c|t*\u0019\u000blD\u000f\\1l*zuޭ;wjoG?hf\u0011N\u0019\r`,]\u0001\u0000W_-uGP{HF\u00124<Ԃ7\u0002\u0011t\u000e0h(4@~P\u001b\u001d7WRFՉP4\u0005ի\u00006\u0001\u0001\u0007\u0010\u001b䡈\u0001@o֎j\u001f5ʋ>bC3aeA{\f}LK #\\'&|\u001e\u0018\u001bPdŝ\u0006=@2\bv?\u0005~C\u0015\u0002Ё^\u0006Q^*ja4rr[\u001bWڼfkF\u00001.\u0013UOxgS8\u000f\u001aŦ \r>(ٴy\"\u0012\u000e/\u0005\u001a(_\u0000@06\u0000\u0019}Ɓ_]A\u001e\u0010\u0002\u0018PZMMuB\u000e\u0007bc뵵/ׯ\u0014\u0012䶶\u00136,\u0015\u0011\u0004yL*\u0013\u0012zkrĥo\\=\u000f5!\u001ed\u0010\u0005^_}(Y'im.;Ыk\u00045\u0018x|rrЋkA2KUY3y(Ӏ\u000f>Iiw.xp'*yɤ_)\r\u000b\u0015\u000f\u001d?\u00133М\u0000\u0001\u0006H/Oս۽;\u001eJ̊R\u001cJ\u000e\u001dz{;7>|=T\u001b;1\"W}d<\u0004ԇL$Dm;Yvay+^~jƍ.K}̥s65DAL\\OAw]Sda嫟}\u0005\u0004OT\b\u0011~BRToTF7#rmow\u00069\t\u0016!\u0002G^|&TcLbh\u001d-#O>,8ê\u001bd\\$1ݣN>o\u0003\f6@p\u0001nAX!Czs9V\u0018WO^pn%FN\\ȅl砲r\u0003RQ\u000e\u0005\u0010Vo\u0011\u001d>&ʺh~>k<\u0010\n@\u001d֬A\t\u0017KπsY\u0007\u0001|2\u0018HL}s69\u001f(\u0015\u0011SL\t{yi\u0001\u001eZY\f-{=\u0017h+V\u0007&\u0003 E<;ݾ*IGb\tl\u0011Ͷ )aZ{RL破|-?ƫ?\u0007\u000bXZ\u0019`'7ҵbsB{v\u00033\t\rm4x\"q\u001fYYE\u0005[\bd\u0003\u0002t\u0012 ?^PsOA[\u001bNjoݮ*q,\u0011l4۹!d.\\\u00054\u001aui\u0014Y6b/dXk\u001e\u0010m,8GDG3*JNHhlnZ\u001d\\\u0013ѽD23/\u0006DX(Lڇ@a\u0004\u0003H\u000f3F:\u00111',f3;Z9~ݾ?}pnJw) D:I\u0015ӎ\u0002\f'hr΃\u0002XEfzږTc{mϿZ޻;8z|\u001bo^y~Y{km}}B\u001bhE\b\u0007t/Zn[D\u0018B\u000bKޯ_\u000f\u000196̘T}+j6pJ\u0006dGF\\~́Tb@FfwXݺ;z=~\u001e\u001f\\far|kobZ\u0019鬒C:IVۻɋV6}R@ϹpkD@tyƬo\u0018\\wsڋ/\u000f?<|\u001ff;\u0018D^߃\r\u0010#4oFF}^\u0015\u001bR\u0003ޔd/c}&Z\fqP4̥\u0000X4`@.Սֳ-UHw0>Wch&;D;]2ڿ\foMz\u00101ӝF=\u0010&\u001f\\oX\u00020\u001f\u000e\u0005\u0002xr\u0019`\u0011&\u0015:?y{\u001fw6,̓\u0017\u00031j\u001cTןv\u000e1p@\u0001\\9v}x\u0003\u0001&3\u0015nvt\njw=9\u0001\u0019\u0011Ad}\u000b\bG~t]/!LU&XcMذ)\u0015692+nTild\u0007SMǄ<*q4!ȶXظs;xcBt\u001c\u0000gn_\u000evZHUWXr\f\u0007+rq1<ʒs֋\u0016xE8\u000fJ#\u0000r$\u0012\u0013\u0016x7@W\u000f?m?\nsBxrz\u001b7= ڨϭS[GJqcO:\u0000IL8g\u00016?^@a&\u00011g\u0018\u0010\u0003GS\u0011Jjuͨn]}vc6N+7ZdG\u0019\u0001jX\u0019\u0013\u001e\b5&\b\u001f\nވn\t1a>\u001b+.@X|\u0019A+\u0001>G3\u0000\u0003\u0004x\n2jiR]y\u00038\u0010^ON\r\u000b\tz\u000e@NHνh\u001cD50\u0014\u0011)lmUt}e\u0017<ݜ\u001b{#^d;@Gl\n\u0000\u000e\u0013oFlwl\u0005g}!%a6Q\u0019).I\u0015=\u0011({;4dV\"^6\u001b\u0007LZOy\u0002\b\r@\"gW~\u0017jKaJX?oV\u000e+|fMr}ƎP6\u001e͹I/\u00058\u00004*TK\u001braV\u000bO>|UC?a[tkrڳ\"j\u0013\u0013KQ瀅K]\u00037\b\n\u0015RǾ9xabqv\ffJO\u001cPXDEӽlrati-ެUk۷n|T\u001a\u001fNn|\u001bœW?xֵp\t\\huRL\u0003ε\u0007PD5&pJ\tGAMFw\u001d_?n\u0013rx\u001d\r2ѝjr剛5!\u0017ˀ`UڲG!L$ju+,\"f$C&i0I%7\u0006̶\u0019OB|,\u001f\u001cտVmD\u001bԷ^TVzU6&ۀXW\u0006)\u0016b=!Le1\u000b\u0010q'ģ\\RISl`ƊQT\u000b!\u001ax0j^Tm\u0001\u0005ӀO}O\u000fu>t,D(@;9q[AlknǊc:\u0000\u0011\u0003-$\u0018D\u0017/كB;xz]H\u0001)\u001b7aP`\u0019\\*-\u0004S b\u0015[\\rQwMpg\u000fγOH\u0018ZOJ+w]8\u0006t\u00103\u0016\u001fF\u001aȚKv\u0014\u0002#R\te\u0001<;\u001ft`۟\u0005;z~>`!&%za#\u001b\u0011Y;fgڞCV`Jv˓f}MLcP<\u001a\u001a RQMw+'\\9ʢL<\u001e\u0005T/y\">T\u0004ߓR'\u0001 |JΏ{lꛍӕ뿼cnj=3:5\u000eҽˣ\u001f<).{\u0007ln$re+3_yvk?n\u001d<\u000e.\u000f~\u0012VX]d+\u0002jG^}Zٸ}Pٸi\u001b[z;[\u00035,\u000f?{?ں^mVY'N\u001c81\u0012d\u0002TG%AUG\n\u0011k0\u001a>BY\n`\u0017+ւٌ\u001b\u0001|orY:\u001bƖ[\u0016*Vq\u0010w\u0006!U'\u000eHn\u001c\\.D(\u0006Y\u0010|\u0007\\ٜ7B\u0004y1&Q\u0007C>\u000e k:^ϸݰ\u0010\u0002+\u00160H.\u0018`\u001a\u0015Gi/\"\t#?Q]=U\u001bX\u00069Ѩ\u0001$)\u001cf8_\u0016\u0013]\\ȹP)<]z@,yh\u001f^X_.)äFH9\\t;\u0003̒\u0005R\u0000kQ\u000bf8\u001a7j\u001e-)`zɵD.FEvuRKF$OVX5Ku\u0000s\"\u0012a.f\u0003[tE)\u0000\nFig\u000316k\u000b\u0001\"\u0006r\u0010&\u0018U7\n˽۫{\u001f39-/_ټw}~[j^ytM1?+\u001b\u0007 \u0000R=8\u001b>G':\u0019ݵ\u000f'\u001ff{OO_~G.ҝ]`7ß\u00177חzj-%\u00167+\u000f\u0018]\u0000ךRl/:QՁ0\u000erYYx\\>c\n˥\u00156\u0003f6;ΝFALVL0\u0013\u001f\u0013&9p\u0005N/@L\u0012h\u0007ޜXGq\u001cQZ\u001dPyR\\elG5\u001f1B\u0013U\u000f\u001aE\u0018)JǪ|Eje \r$_G2-P\u0018X\u001f\u001d\u0001\u000fh1\u0015\\z.1wD\u0002:x?\"h1KKYK\u000b\u0013\u0012]\u0014gT\u001aRE\u0018DiI(\u0013EY\u0014(ә!\u0001?\u0017=%\u00076e\u0011bS\u001dse{A&\u0011@ʯ\u0000JˉY['\u0004%T\u0015\u0013Bf(6\u0000\u001b\u0002CH\u0015#;\u0015V,C\\|\bq\u000b>\u0000\u0011HR\u0010e\u0002\u0011!Jete\u00137=RϪvoY\u001dxePH4bfI66}6^j(\n.%*jOB߉JZ^(ktzG/_Odqwnك\u000f\u00177;'wt7>n=\u001c\u001fnKw\u000e|:/:y/+E67;J\u0011*}!\u001b.T2Iq\u000b`co<}\t,\u0016T\u001fњޭMmr+o>z48\\\n\t\u0000\u0012`T+n\u0001.$+ Ps#*\fiҨNvx\u001b5\u0017\t*V\u0002\"@\u001b\u00172փ[\u001fv\u0013[\u00066pA\"(~p\u000e#RJ>V\u001c/\u0011\n\u001b\\\rR[8s\u001b\u00002QPF\u0003D\u001d瀅^\"r\u0005b\u0016\u0014\u0010\u000703v|\u0019Yҋ\u0000ܖst\u001d3rކ8\u001du83hDtQϡB\u001aBAhXu+>6[Gtx+dZ\u001eLP4ݻ\u001f Ԫ\u0017Eqլ멦3H_\u0006f,\u0005W\u00040Ηh\u0014\nQXHZQ2C>?*\u0018\u001a&\u001c!\u0002T\u0003Bk\u001b\u0007i+:\u0001DDq\u0002ʬGP\r\u000e[Dp.\ts\u0010\u001dc\bJ\"e\u0003FHBX+\u000f\u0012\u0011nž\\/\f\u0000:W~=x\u0004FR4k\u0011>\u0019\" Bˏ2mrz\u0014/h\u0017d0Ε0hm\u001f\\\u001b~\u0013\u001aӏkQf;n*ty=,Ϲi.\u0016^?xEef{ϗ ц.Fk/\u000e_Pn:;>EFd7.\u0001@.\fON?\u001f\u001eIի\u000fo[..AKhFJ}ȪgTʨ[\\n]*h\u000fr\u0010\u0011컷_~\u0017G`/pYnD,ef\u001cؿw=_Yy\u001d\u0001g;\u0010\u0001W[>Z4%* ;̈\u0000´!'TD\ne_[|T*MBm(ŉ.A⢏qB\u0002'85\u000f3N\u001fBӏ\u0002T@b3]W\u0013xݬ\u0015n;H\u001fZCL\u0000\u0013D\u000f,\u0004a6&T,,C`;b,\u0005\u0005OD`\n \u0011^\u0002e!b\u0005R*\u0004\"JcN<\u0004GQ.Ny.hlX=y߽d{fq\u0016F\u00169DiP\t=:1G\u0018\u0001\\)-D\br&0teQr\tc0kb\u001a݊g;N)ӧ;e<dcEVȱjf aaCQRիhÇ\n>8ʈY0\u0013}{X5*[fcW\fZ7\u0007\u000f#5ɣde\u0015aQY}ƬR\u0006f\u0000טi_Ԝ3\n+0WPrkFyw\t1#bc\u0018\u001f_ۇZ0?W\u0018ߊ6AǄ,\u0012\u0011VwoM\u001e\u0002\u0005\bL57\r\u001bժ6/i\u0003jjT\u001f{\u0010Rx'dXm##ǊW&\u0007m\u0001\u001eDzu\u0005\u0010W\u0001\u0006*\u0010xI\b騔Z޼ooP\u001f1X\u0013\u00111GX\u00178\u0010/\u0004`5~{\u0019Wk\u0011\u000f<+lN+\u0002謜q\u0007iO(\u001a\u0018Ģ\u0019\u0002.\u0003EVbߺ! c\u0018Ӌv?3=fLUWl~\u0006\u0003_t!2\u0001r\u0002\u0001ؐ\u0001RRs\\Plqu^\\\rzoma\u0011?\u0005\u0013MAL;\u001c^X2Ji\u0002')9\u0014x1\u0013r><\u00060u&UT(ّaG{9r=$;#gT@\u001cP\n(\u001bh\u0000ݍNi''rf8\u0019&1)P\"%Q\u0012\u0015V9ZҮkk_s/sp(T>|M\u0003bbz\u0014`\u001e\"A'!R(\re\r\f~D\u0017r\u0005pw\u0002\u0007:Vs9Okzu\u0014@\u00053YB9N+f0AK\u0019\u001c@\u001c\u0017\u0018|JEp9`\u001c<\u0011\u000e\u0010o\u0000\u0005h\u0004\u0012\u0005N4\tΊ$\u0010\n|el!|\u0006\u0011ODCJ91UB\b\u001d.,D dl|CPXL7\t){0jE)\u0013a\u0004#\u0014\u001a}ŮZO\u000b˭Unu^jn8DT\u0014\u0013\u0010\u0001\bgPZQul\u0017\u0013\u001dA\bZ\u00165\\H\u000e^q1J[\u00188B\f'0PVS=L+)#)R2yǼQ\u0004j7J\u001bZi\u0007\b80,ƈd\u0018\u0011\"\u0004\u0006*T\u0010K1TQûw_y?Di^Z\bQ\u0000z\t E\u0001Ct\u0000ew#\u0012!#\tQjnnZX!T\"-逸QV\u0018\u0003XŤ9W\u001b9ɤ3}fC!\u0006f\u000b\t\u0016A4\u0005^\u001cr\tJL\u0003\r$0e\u00030\u0006\u0018X Bw]q\u0000$Q\u0001>\u000e&SqBwdj1LR$i\u001bR\u0000b\u0001&s`\u0002(\u0000f\u0011\r\u0013J0C\b\u0006طCH\u001c\"\u0014\u0011.\u001dԥ\u0010\t@wޛŸ\\p\u0014Ua&\f\u000bW\rQ\u0011Dl/Z)\u0010\u0013\\\u001al2Q\u000698\u00140\u001fX\"\bYθ @x*VW\nq,\u0005_v?7\u0013:3\u0017>\u0006X\f`l\u0002\u001b\u0018'9/\u0005?!8%\u0003)\u000e8\u0018ĽQ;̹E\u0018\u0012r\u0000\t>Ul@j1B\u0005\u0013Q\u000e\u00023N(v_X|ΗqGg\u0016KA8Ayג2x z\f'\n)ߕ\u001apa25żQ&\bR\u0010S\u0018\to\u0018Ǩ0'c\t-iVJq1Lвl\u0016@.{\"1  \u0010u!!xzigQ!Hq[rfEa卫Q\u0001\u0006\u0001P\u001cc0V2+!\\wG\u0004gb5\u000e\u0006\u0000)\u0000\\|,!x+E\u0004\u001f@\u0001\u0001\u0006K(\u0004\"\u000fp\bV\u000fh\u000ev.gB\u0019b7L{C?FD\u0000^0ʸf|K^he#J-Q_\b8Vt\u0018A\u0004O\u0010a\u0012Λ`(>\u0010\u000e8\u0014aR\nAA\bF\n ZH\u00010t7L=sjiɓX3|gB^\u0012X\u0003b'\u0013a\u0016J .|LEai\r%]=; \nL\u00198??{3#È\u0002ٳK\b\t >EG@pQ30\u0007\f9>\u00189_Y|n\u000fC\u000b\u0018&u]]\b\u00118\u001f%5TaJ\rr\u000b\u00008\u0014׾nTW̜\u0006c4#E-L\u0017YQ?\u001d\u001f]p\u0011\u0015\\a\n5BX9JڄV(kA4U\t^$A\u000b\rl08J*B9p\tO3t2\t+H0Jӗ\u0003p\u0013\u0017Ϲ\u001bs\t\u000e\u0003Ӛ8$L0\u0014\u0001S%\u0013& ,\u0004\u001c(\u0010௜B0qf!\u0018\u0004Ft\u0018\u0011\u0017\u0003\b8\u00133Sm\u0007\\'\b-aJ봶M\u000bӥޮ^X\u0001\u0001d\nL+)\u0012iu[N\u000b0 4q\te\u0014\u0017\u0003Q\u001d\u001a\u0010\u0006灿>9w!\b\u0014`-PAPb\u0014M\u0005#X \u0018[B\u0016N@oqq\u0012\u0016\u0018[b\u0014pf\u0003ϜZx\u0005O2)BQU4\u0015Q/@<\u0007Zsg\\g{\u0017\u0000FN\fܱ\u0017\u0019gg\u0003gλY%P\u000br\u0007\u0004c(z9A 33\u000f\u0007#4;s^$\u0014\u0007ɹ\u0010Ns\u0004Mp\u0002Qș~7!\u0004XBg\n\tA\u000eq(LYo?;?\u0010\u000eDZetaEHl\u001boo's(:G\u0002IJJҦSp1+|~)x~S\u0002q\n\u0018UUr\u001c\b)\u0018\u0011\u0004drd]><8]\u001c9Րd2JJ@z\u0012 y)T!))F\u001ag\rA\u0005س莁Cdˍbo\u0019E9=q\u0004\u0010gC9B\u0012d/,A`<\u0001XPJk_e\u0015(Ȃ\u000f᪨ܩr\u001a|s,e.U&+ \u0006&d\u0014XA#T\f\u0015`R#\"[,'s4II=\n\u0004\u0010\u0004BQp\u001fO\u0006$\u0007T\\8JQ\u0011Ɠ\u0010rQDB\t=\n` \u0014\u0006~I\u001a]:\u001e^ʫ\u000f/MPr\u0018@R/;u\t@C<\u0018\u0014#I֔((GX\u0010\b1\u0013\f\u0005'\u0010f1B`8[+8}v̩θ/̇g=b\u000bng΅NF|7HzP0\u0002R\u001ce0%)N8\u00024%d\u000bE/ |4\b\u0004\u001ed\u0017VZt2d>ػwcgbV崑vD\rxv\u000b\u000bKH\u0004XNI\u001e\u000bUt/T궬s&ʦAiIJrm~zғ>bpaa)\u001c( O *\u0002QGzd%ߩ%\u001d\u001dqC}{ۯ\u001f'\u001bUf\u0019Ct\\̤T1\u001buk\u000b)w\u0016\t`$\u0018\n+X+Go|\u001d\u0004P\u0015g\u0016\u0001<\u0000b8\bs\u000bS&P6J˧cP8\u0012\u000e#Zʍ@ޖUȇQ\u0017i頬\nqbNX5SZ\u0014s\u001a7\u001d\u001d.zqX|ޫ/\u001e\u001f_wpز\u0016\u0014\u0011\u001fQ\u0000\"b<\u001cS[\u0015}Ե'ه\u001bo?[W>x\u001f~_z|rlVEAAx8\u0006J6ɚ\u0010\b\u0004ZV/\u0018|n\u000f\n+ݛN&+/pj޴\u0016ӑHxf>\u001elx>>}5\u0010\b\u0006p ,DP[\n\u0012KR`m\b9\u0017HX_0\u0001EB<\u0016Q\toՄ/̗t\u001d\u001e\u0018֭oW^?|~+_xq\u001c`ހ߳G\u0000X?\u0017]a6+{5>^~x\u000bo<\\{7\u001f|7_TΦ0߷aS\"\f,\u0012n\u0019襞puU}z\u0017\u000fVe\u0017}O\u0017y<O?{GOxs:\u0010E,\u0010zǸ4Nqn鵞3\u00196W7\u000f:_~w7'\u000f\u000e@\u001e_8\u0011Bų\u000bgN_\by\\:\u0017E8 :ӹ`6Hñ֓orão|\u000f?k>(Wxydx3ѠOa\u0010S@\u001b&qyx|yrO٧oמLo?~}߼_㏞?ȩL,\u0012\f=Q$\u0001\u0006\u0004%F%~zg{ңчoÏɇw\u0017𸾷VZ6*2\fkP+ب\tww\no>k7?zO_\u001f~׻\u001fsO_iCu{\u000bQo\"\u0018%\u0012\u000eBa_\"\u0011-\rK̍Ⱥyrs\u0007/z\u001fV:\u0010*8^H2\u001c^2޻_ɗn'~50\u0002V҆İfdh)f\u0010k%ʀav\\[??[}?~}ڽRZf9\u0016@'\u0010\u0001PW\u000f/*^7}?{\u0007߸>?}?|㯝Gr|Z-:\u0001G1\u0012ɠhix_;\u001f\u001fW^_>WA\u001a}\u0017\u0017!\bHe\u0007%eĚZƐt}xyfW?Go\u001f>\u001f\u001f/Vk0\u001a;A\u0004WӖSNmP`\u001f\f~;݇wx\u001f>Ͽ/?yG?՗\u001f?B@)<Cs\u000bSG^\t3ɲtgyz͟Փջ'o\u000f?\u000f?zg߾o\\/l{q}-Pa\b\b:ƤRVM~\u001bC+\u000fW\u001f~p\u0007߸?}W<\u0007'\u000f>\u0017o\u00164+9=\u001c\u0001\u0012BZYC\u001cRwͧo?~{wW\u001f;\\Ηo?~(̤\u00124\u001foz:^9i}n˯/7_}{qj&\u0019\u0002' L\u0010\u0017IG٬\u000b\u0007'G\u001f~vǫ{g'\u001f\u000ft.M\u001aj]6Z\u0000\u0016\txiEt:#\u0011]4tǙ[\u001b/_wƍO7S\u0002@\u000f:\u0010hYm\u0012rf2*ZU\u001e^j~\u000f;w\u001f_\u000f_7\u0017['|z\\\u001aV$\f\u000e{Cj3(Y*RdCCv[;|w_o\u000f__~_~գouA^R8g\"TTI<oV7,|=-qkW~ß~7\u000e[kqE9\u0004H\u0002`(Ea\f-r\u001cV\u0007ś['7o~~{G}x9uo \u0001q\u0014\u0001g\f%fdQӥ\\`yhfǕ+[???\u001fӍo4z0ҦtQU<#\t`p\u0000mw\u0000$\u001e\u000fkduhvRKOϿo?}[_:i*Y\u0000~Tl,\u0012Fca3\u001a_^^h'ʋ\u001f`A\u000fF\u0001ߢ'x3Rj\u0019\u0001\u0002I2n22^/;\u001aܮ}V2ni&1\f&R!B<Hh;f1(dPTI9Y߼ػ:\u0018\u0007\\lK\u0013\b\u0012\u0018j\u001b]\u0011\u001er0\u0004\u0002p T閊ۃڕ\u000b\u0017s￴W\u001f|\u000f޻/\u001eo{gƺq8\u001685(()\u0013a*͜c\u001ckcf7\u000f}??w|^&VPeK\u0011E9\u001bfZ\u001a]ʔSbdr0_]-<8<^L˖,\u000b4'yȌ\u000bx\fXE\u0011[\n\u0019T\u001d+HgUlI\u001a\u0005\u0018dR\u0007\u000e=\u0010\r\u0012b<\u00009\u000b\f7Gc\u0004ʅlu<\u001bVk^MޮokkK+]W˩q*kB`a㎄\u0011j\u0011,uv.Ss\u000bx(д\b5KIH?O5筻_xan14RJ7\u0018\u0001\u001c\u0000\u000fFp,$IU+Ŭ%\n(&\u0013\u0014Pb\u0003\u0012*,\"=\u001f&\u0003D\u000b<--ԑX\u0010\nb,-04\u001f (\u0019\u0018\u0010|xΤ*;F\"&y:q\u0010\u0016(\u001aFj\u001a)\u001bX/j\u0012܋\u0011*Lg\u0013j[b̜gnd2%\n減;٬_짏+W6'bmS3.wdly\u001fl`O\"\u0002\u0018bc'W4\u0014d,+\";/߿qewjXD8☘V4\u0002\u0014\u00067\u000b\u001a˥F+7^BP\u0012l^,\u001d1j8H y~\t>;\u001bAº'F\t\u0001?\u0014(6A\u0016(  $060&xh\u0014x@6\u0010HTͲfW΍<^O\u0014F\u001b\u000eJ\bʂHW18:i&\u0006S\tLF\tuɋ\tE\t3\u0017g]]VR \b\u0018O\u000bp\\ N\fRI9>U%72Dε\u0000s`w}f\u0010\u0005%o̅Ӌ0B~]Ȭ\u0012:\"\u0016h\u0018\u001fSV{\u001eR8!Z\u001cO%H\u001d@NA&´C%\u001b\t\u001c\u0010a\u0004Ps(\u0010bR\bVKtEuH)\u0003j(e\f5h\u001a\r)\u0017\u000efi\u001aa~L\u000f)1(@RHeJqF]/\fٞlV\u00138O9!4їQ\u0010,ƞ\u000f/\u0018Wf\u0017\u0016|`ړ\u001fc\\(hJ\u001fa\u0010>}<\u0019\u0017K\u00112\u001d&m/<7?m\u001d!tF}LmzQ\u0007!\\S#:%Q\u0001ҴVenL{d\u00103h\u0005F\u0015\u0015\f\"T%13b^͆\u0004oDS2cj].oje4\tY7$!U\u001f\u0011b\u0011\u001cZΎU?P+sn\u000b!Ӈ.6eu(fWqL$\u0010\u0013]!gCg]hsV>\u0010U/j,s\u001eb)H\u001dMgfqT4DJ\u0017\u0013\u0012Oĥň\u0000p3Ϻ\u0016p%vne|\u001c\u0011V\u0005ʨVK\fܸER\u0014X\u0000\u001ce\u0014;\u0013 =d7\u0011^J\u0000\\MϿ);\u0016hk$&cM0\u0015\u000fF4QgV5ĸ[qZ{VV\"Y%\u0003{%ٺT\nUjT'1]N\u000eT;*UrE\u000421<|\u00143\u0017\u0002\u0007V\u0012J-HX1\u0000+\u0010if68fi/q\u0017!U\u000fj/G\b\u0019DeFQ\b\u0011(ĵF{`\u0010h\u0010\br*ȵ\u0010\u0013Jٟ6َqD\u001ejsvC\"ㅸY\u001fG\u0010&\u0016p\u0015\fN\u0001\u0014bT\f\u0012v)ƅZɣ)\u001e;[ӟ,b\u0017d-l@Js\u0006ъs\bmԞn\b\u000beOg'ReW*^<\"\u0002,&WIR\u0011*\u0017\u00039\u0002ԌĢ\u001dKq\u0000f\u0003\u000bPC+\u000e!%s\u001e\fh?.F(\u000bkA#J2\u0017=\t k pϭU*\nI3\u000bTiuJE\\\u0018oq\u0015dǴ{zyzMeM-ܸ2\u0013]\t#Vn^BӶ\u001ajs\t߄V/\u0017@\u001eUȋ<+jX,\u0011ƴ\u0005Yv\tr6}Jb~d\u000eΑ:*Fyc\u0013j#5}ܻrkݿR\u0018⌎\u001f\u000e\u000e\u001fzTς[qnt';j\u001dD3õ6$W@|\u0012΀4;ǯF\u000f\u0010Z^jD~)AְYT*Qɟfb\\\r&\u0018b9HeZވV|\u00193\u0006`0M6IdctE\fΆ٨X&ULk\u0000\u0011\u000b¢htH6\u000eDT}/U\u0014hcd\u000f#Ӌq.\tG-m#b\u000f\u000b3ޤ!\u001e'\u001bMN\u0017B͎#|\t(0T\u0011\n\u0013K8=*;s\u0011\u0010jʁd\u0001/d\u0010#\u0013\"l>3B|vE@6nB.\u0000\u0014A\u0001{|Ϻp\u001fc\u0015!k \nT\u0012I-@~*\u001d\u001dn9\u0000\u0013\u001c;\u0003 \b11u\u001a\u0016\u001cB2\u000bIaP1P\u000b<T<L!(BI\u0007OᥝX̏/U|1\u00018\u001d/v\u0001 2`3\u0013{_=ѪIhv\u000f(itt_\t,Iͷ\u0006WNF\u000ef\\|/\u000eV\u000e\u001fFY2tzW2+w\u000b/WSհXQKK%\u000fkK竓{׹$*\u0014?Z `\fi'헳/&[q\u0018e@\ts6Ⱥb2*ygm}\u001f5j%\u0007bymWֶ_vɭ\u0017Vn2i\u0010\u0018\u0016S\u0015!*HgݍM\u001fvS2+ݭ*+!34;W:YԶ\u0007Iejn<\u0017lя;1,\u0014w\u0011Ld(\\}ه\u0019g}ԅ\b\u0000\u0012:_\"w.\u001fi\u000bKA+\u000bW\u000b\u001b\u000f\u001bEN\u000b\u0011\u001b\u0000\u0003cw*]WDIPb<O\u0000:\u001b$f\u000eҞ|3.(~'\u0010\u000e9\u000fj\u001b\u00070eDlL(%1\u0000yDɬ\u0006\u001b{\u0013Z%Y\u001cJ]\u0004*U2=nSv;?'Nrir\u0006&\u0017\u0013j\b\u0011d3]0;\tm\ntqV0dׄ\u0006k۷N^s+}Ja|T/}0eDj]/ݯm>tzQΞ\u0005N.AR)Zd8\\|quSF8\u0019Xk-KGE~\u000b/AD<Ы#!?\fŘbW/=^;zr\u000emL$netX;A\u001eTaK\u0018xoG'\u0010\u0013D\u000e/\u0010Sr۩΍ƣ7\\l]M76g\"Pc6v?_kLf\u000f\u0012+vЇY>̤\u0001[ǭ\u0011Ptjs\u001e/7ZǴ3}^\u001a^zx@\u001el^-->]XG\u0002u\n>\rB~ֶae\u0011\u0010oJ덍\u000b\u0011@\u0015\u0006Mmǥ\u0000oV{[2[\u000b\u00043W<25r؃^Da΄,MJe0~q\u0005}L\u0004˥ѵMGEp\u001c0\u0004\r ( MFz\u0004Uq\bչ[}=-=;X=zY8[,˻nW:>᝾+1G\u00177ni4VKݭ\u0007|~\r-VB\u000e\u001c(\u000epv1NZ\u0000z\u0016\u0005\u0014\u0019&/t\u000e_\u00051)\u0016&AQmɴ̲ӿ`\u0019m\u001a\u0013ӛ\u0007tf\u00050y?\t\t\u0005QV\u0003wxv+^TZu+D\u0019aR˴vt\u0007O\u0016j~rh]sni\u001bRV<[Z2[\u0005U\u0017,\u0017w_\u0007\u0005\u0002(\u001e\u0013,YE\u001fcۍG-)7\u0002zэ'`F&嵻{[;!&r卛1B|~VkicQaS,՟\rIR\r\u0010\\ڐ*|i#aN\u0007\u0007T\u0004@\u0014lp@fj\u00079z0]\u001ecE{΄\u0000\u0013BvL\"rÍ\u0000?e\u001d*O\t-f@$\u00044PĴ\\ڲۗ@.Ji89kQNsrttjq|]*T\u0015\u0018\u000b\u0012Üfv ݿnN.kvҭ BZ{u/ }ӼY,Ex0f/xH)qF~9Nh5{_\u0018\\~{rvxJ?ٽZ[3\u00001j\u001fm4ٲG&˫\u0000\u0014ƾPڑj\u0007;jō͓W\u0017'ܥ;5抻zjnxV>ƽӎl\u000eJ`]DfZkwZ!O^@i;\u000f;F}]қ\u0017+. 1\u0000?V\u0017Dnqj\u001f\u001bvqRϮ\u0002t[[\u0001\u0001\\M\u0017meR]9?\u0004\u0004{{z\u0019\nYQk\u000f}\t[wOwgH{_uAD>:8Jw\u000eª[ǬRL\u0019&/5./_5{F\bV*Vo\u0010j=\u0010cOP\u0007k fYB\u0003\tһ!9c<I\u0003B\u001f]`NA\u0007F;.\u0014\"LΏ\u0012ry@\u001e\u0002\re\u000eꖔ\u001faF(\u0004PJ-]\u0002\u0007G\u0002oӹ\u0019\u0017\f \u001cVax#?dGq\b\\*UWf\u0013\u000b\u001bG`._|q<Y~\u0013\u0000؜\r9V}n]$\u0006lW/3u\u0001\u001bKTɮKluK5\u0003VNW(DQ?d\u0005Tz}e\u0016PXʎ\u0007wֱr-(ZKV~eN{Y\u0017\u001c\u0017S|U]TJ\u001bZ\u0017>\u0007n\"H+v\u001bOǷ/<\u0005vu\u001b?[̄X먵_}wV$H\u0018jq,\u0017[\u0000\u001a\u0017J1:\u001d?YQ]Nnʹ\u0011H\u001bK\u0006*\u000b U>́-?JhFgV\bKULd;ziH%w\u0018d\u0000\u0000f\u0004Q\u0006\u001es.H\"6fy-ٸ8-\u000e\u000f\u000f\u0007lv!*l\u001a+ʶ^fg)AtҨLbL~!,(:\u0016cZ[˹m*M׷mD+\u001eؘ\rK^ĤA\u0017c\u0000)\r·ȃS]\u0019EĊvC\u001buwB!Rum+-c.bv<XRnU7%`ژ\u0004;#\u0005zL\u0015G\u0013Ƙ\u000eTk\u0017Ap8\u000ecv$ܒEDNY8r:d8\u0003Lw\f\u0004\u0016ӚZ\u0005\u0018I+u!<eVaxq\t \u0018ڵo%=\"d;?8*\ncH\\a\u0001\u0001\u0002dA1<x\f\bG.\u0005^\u0010\b\u0016sa2@b\u000fO솘U`se-%֜_|>HtN\u001e++#.'\u0000} \u0001Oe tN_.\r\"^}z+\u0003cyV==UwbL;:~s׀b{$\u001eu/冢8xq[Z\u000bq\\K=>F+܌\u0005=Ҝ\\rؒ\u000b~m'Ngs/B[RfSm%\u000fn{\u0016\"V\u0016\u0000i>mC%|6\u0003Z+\rKEr2o]<y\\\u000b\u0005Hjʻfy\u0007M\\1pI`TÄ;=Ta \"7\u0012z'U'\u0002?\u000e杲x\u001dQmۍlnx>Dr\u0015(\t\u000e,#L&e\u0012Jj\u001f\u0010z\u001dȔTXӚfe7\u001b\u0011.k\u00154^I!܊\u001aQ\u0002+u,\f1mSFÅj\u0011B\rw\"\u0005\n8kZ\u0003\u001fz6)@cr1\u001d>\u000ePiXȃ*z:K{\u0016cBVUޮts~v\u0011JF\b6\u0010F筦jmުo\u001b[\nT\u000bR\u0014ZެO\u001dNeXf6(hZZ\u0012\u000b!z6@\u0011\u0003\u0016\u001b|nS(,r\u0010+\u0000\u0011A=\u0010\u0006V׮׬\t\u0001*Vw\t\u0003dć\u0001XvJk+\u0010\u0006\u0005loq\bV\u0006\b\u0000Tةm\u0003mdXJw[\u000fe\u000f,E5\\\u001d\u001d,F*a.\u0003\u0006aQ\\\u0015ף9ܨ/\u001ca\u001djϷv^%~^(0y-Ed?/ŕ0e`B\u001f>M3Po\u001eRs'q\u0019BfT(CBI-ri\u00000Gt}Q~t\u00071.; j\u0000Q)S\u000ee\u0007\u0000\u001dWo\u0011fg&\bT-|\u000eO\"b\u000bRѫ\u0000h\u0011\b/rEl\n570e\u000bkn\b$Q0\u0007tz&;a%m^\f0\u000e\u0004>EPڇix>;m\u00068Is\u0019`\u0006\f&g\u001fn*jLQ\u000ee-S\u0015`\u0012\u0015\u0018k)β-F\u0010\u000el9/\u0015 h\u0016\"\u00140:\u001du֯\u0002B25J\rT+\u0011Ɇ+.0ZY+LWɁ\u001e\u0004ز\u000b\u0002<m\u001d\n\\\t\u0018!\rLz5\"V\u0017c\u0012\u0006#O/@\u0000\\~}~u\u00018e\u0016b\n6Ü\u0007Rq9Jـ.\u0004\u0018 ɲQ\u001e#B:Li\u0001҈%ZV|v\f<%$>\u0000I\u0003XS\u00112\u000ba\"Rqx\u0002\u0015\bX(\u0017zo\u0007\u0017lJ+饡ӹXp1\u0015EP\r1L\u0000du'?*8\u0000\b*[l\u0012\u0015p`kvP,)(\u0006$&g\u0013r!g*l΃Ó\r\u001f,\r\u000fi\u00016ƭ(\u000fvAu\fG:h)?:,:{+!\nf@}\u001f\u001f}\u0007LaK$\t՚\u0007!6\u000bOdvKc0MAu\u0010HC\u0012Z\u001b|~{0y\b\u0005\u00173֦b1\u0015@P%M\u001e\u0005uދ#R\u0019\u0014\u001agࣝ\u0005X\nSV+X\u000bS0\r\fx·J́i)S\u0001͆Y35\u0003.\bvJ.`{zyŇ\u0001Bs%R1\u0014/\t֙\b\u000frM\u0006%@,Q.(\u0019*Xj`/W\u00197\u001e>\bn$\t$e \u0019+0]\u001f\u001c9-?\u0012 lW\\\u000bqZUs q\r%|=\u0007M\u0017ъkzq݇j[6ց[9Y\u001f\u000en\n,L;ͩ&'aY?J}M\u0011zG:h\u00147d\u001bb\u000b\u0017\\輟2\u0005?\u0018\u0016f|E\fH`\"\n3iR\u0014\u0016\u001cצ5E\u0004\b;fvT\u0002\tl #\u0018gHgQ{\rz14 A\u0011:+0OM6!.3\u0007Wd\u0004PU'bB*F\u0007\u0010\\̯\\+ozg)\u000elo)U\u000ew\u000f\u001f$k[p\u001d\\n\u0015\u001b\f(Zy2\u0000-H\u0003\n\u001dT7\u0002\tfAȍSk\u0015[֎p i!|\u0016\u001c1QҠeS][_ce?a\u0004iT!`S@9\u0007@\u000eRL\u000e)\u0010nHffx-7l\u001e\u0007\n6rv4&W >u\b>]]2`XJJ#.ҎZ\u0004L9Z68g\r\u0001<ӶiR\nF0aD4lą\"\u0011ȭTeՍ*l.)M\u001egCsss\u0004.B\u0010h\u0007n=\u0016sKP(\u0016{Rv\u0000\"\u0013H+.\u0001\u0001\u0004\u00013~rڐG*/5P[D@Ђl3\u0010%CEPϝ\u000fi߂\f\\1z.G+\u000eB$6CsM \u00053Ɯ\u0017\u0000ϺID\u00005ąi\f/\u0000\u0004\u0002X&Rd\u0003d'H\u00194$dV?d%X=J\u0013(|\\*ΊTVKè7F\tҫW:h^*\u000bpř \u0019#e^\u000b\u0012cTT\r8/dnV7XE\u0002ēmڻՇ\u00111\b˒ӣ\u0018\u0007G\u0018},b0xc,o49#tv&/A*fkRaHV2}'-la&OۣTD\u0002;fދ\u00021g\u0004\u001d,թ^w{\u0010Qnf\bTm63!,\rh;\ngPWv\u0000|&K\u00136=EP.(\u0010BX\u0002\u0000\u0001Ⴣ`e\u0000.HS\u000b\\\fA܊U6;I\u000feH\u0003-Nix\u0005כ!:\u0013\u0017k\u000bP\n\\\u0017VA|\u0012D)E-̆RXŹ\b7\u0019 \u001a-9O\u0010\u0016*VBKy\u000f\u001a\\1a*\u0013f\u000b<]w,Lg=Qn5\u0010ZǴ\u001f1U<?uOT\u000bg݈U]^Rgga Y8#y7L\u0015\u0011\u0016e9Q?\"\u0001K\rXm\u0001D\u0007\u00073}1\u001eK6}(.\u0003ϔ&K\t}>\u0007q\u0016LppFn|\u001f3sӇ\u0013yRaF\u001ccw:pR\u0007\f\fs8%Eq\u0011ӤѤ\u0016@#`\u0018\u001a\u001d\u0003#ť{q\fbiMwww\u001fs]/j\n\u0001\\\u000bRc0Je4ބ\t^K\b\u0019\u001fCe<\u0016\u0017\u001a\u0018äڂ/'\u0006\u0002!w5ս\n\u0012;,\u001dl\u0010J\u000f{H\u000ec:8nl\u0010\u001dӖ\u0017W^o?P[\u0001T՜`]tbL\\ Y\u000be\u0017\u0002\t\u0014O@2P\u0003\u000frczEz\fPЏj^wLZ\u0003,Սr\u00001!\u0002\u0007e\u0002Q*f2\b4M\u000f\u0004\u00112F\u0013\u0016ʙfe\u0007=\u00051#!Wq\u00125\u000b0\u0011&&\"֢Ӟ\u001a([!ҙ\u000f\u0016Qm\u0011k\u0000\u0007\u0005\u0004D͏º7a3\u0001\u0000Z>\u0014\u0004$3\u0017\tӃ.h/^1%Bf\bgK^Lׁ\u00059\u0002.<0fgb\u0017|'\u0002\u001bHYTmt+G\u0000BL\u0000D\u001aD=\"\u001d\r\"gVY\u0001T+/$\u0017Bd\u000e\nC>\u0012c\rH*\u0001\u0007W\u001e*ۋqf&iz݋26\u0010R-e:[\u0012\u0011K~܊qD\u0015\"4ARn \u00017\u0004bE<\u001eAbeXR\u0010O\r!.7C\u000b\u0013*u\u0016#;\"B5Z\u0015\u001dj\u0001\u001d'Z\u0005x\u0003\u0015XV{FW.Dم\u0010>عo5v\u0010Pdٜ\u001bwd\u0006\u0012ze\u0013\u0016\u00111R-7a\u0002\u0010]ƌ\u001f@RT0EX\u0006ӋY\u000f.Lk\u000bKs6V**[յޛ\r\u0010\u0019>\\aF\\()f:cw#I>*~:\u0010=̕\t{j;N\u0018(:)/\u001dK>Sy\u0014\u0011f`Ao\u0017A<\u0005ggc\u0017\u0011?\u0006\u000fB\u0007\u000fb\u001d\u0007 z\u0011\u001aeKqu&\u00023Hͥh\u0012\u0015l~CiSCi?.\u0004\u0019\u000fIT~4?sL\u001cq:CT?-ʺ$Ky[>/W*8'S-\u0000`[/\u00155@,\u0013\"t\n2A:EY}\u001blni_/\tp\t⣴A(\u0016`\u0010e3fh\u001dPSf'ar\u000eT֤҄\u0011j\u001eg\u0006`\u0019S֖{\u000b]p*D\u0001\u0007]s'Vz\\1!j\u0002<\"\u0012FL'[Ս\u0001`\u00074TcB\t̗\u000f@.b\u0019>P\r\u0000z~RLjѳ!\u0006Ћya`U\"ՕˇW/j}.\u0003L7ҍ0)`\u001cJK1\u0002\u001bjxsn\fHxzv\u0002 0\u001f$\u0010r\u001dg\u0002\t)D\u00000)-D,p\u0003\f\u0001\u0014\u0001ze\u0016S\nR}\\-Yp̯ba\u0012\u0000,G\u0013\nh%\u0013J\bJ\u0013Ww0\u001bJy\u001f\u0016Rex1i1&\u0018=^\t\u0013\u001es\u0017\"\t!7y֕xf\u000epjElް8\u000ez\u001e\u0000\u0017g<LT\r5̞-Wn&L+Ʃ_7Ą\u001a_\u000f$taʈs\u0019hpfKDH;m\u0015I87Hy@y?n\u0000U\u0007\u0013\u0006+Ռ\u0019BoqU\u001aGe`C,A4{B~\u0013\u0018j\u00100Z#!Wj\"՞+3!.d\n7ݻ\u0006kR3yHqa0\u001bd4G܌2\u0005KPB\u0000\u0011,@\u0017\u0001\u0002UOz\u0001\u0018S .\u001f ҳQ9*V!Mc༸5\u0017z \u0010B\u0005\u001be\u001d(A.85\u001b[\u0017\"< YL@J\u0013\u0014tu,oF+J\u001d\"e\u000bv>!1:Y\u0017:=0FtDi1وTQܼ?1VOc&0D )|tX\u0000\u0019J54ZW\u00003a\"\u0014+fa%Ȯ\b0G0\rl87> |\u000f\u000b \u0019\u0013 DN+D,\u00061`rq1y|\u0003\u0004 \nr1Xc0\u0013H&!rz\u0012\u0001\u0010\u001c䟝\u00068>3#K.m\u0013|P̹\u0018`\u0004_R݅\u0010+=ņ\u0007.M0kJYή 3m~ԧD\u00145@ɏ\u0019M$+Vt\u0000\rs\u00054V\u0004'\tkulZϭU\u001e\t-\u000f7I\f`)m\u001f\u00074U\u0018FKt\u0006\u0016\u000f\u000b%?*\\2fy\u0004\u00157\u0001\u0016\u000513\u001b4m\u000e pz.<F0\u0018\u0010\u001e\ns\u0011u!\f9L, 1,Շ\u000e\u0016P.s.x. B!QL\u000e\u001c:ln6\u0001\nS6 cA#\u00146\u001b/(\t\b\tRrF}6_\u0013><\r5)7)\u000fo\u0013Ѓ\u0018\u0017'.-E\u000b>\u0000\u0016 1 |w\\:,F8 a&\r\\\u00110<eI/򂏥@\u0002\u0012.\u0019F$F87rC\u0002a/\u0005i\u0003!fƃz)o\u0015\u001fj9_\u0007~G;djy!9A<eE4N;\u0011*\u00034@t>s\u0017'Rjz|XtE\u0015wTr8P\t\u0003'Ϻ\b/fZ{!\\g ;\u001cuSZfK+33KL\u00032qE\u0019\u001f\"\u0003<\u0006e7JZ ִO\u001aT\u0000\u0012v[ʭQf\u000b,\u0001\u0000\u000e\u0011)/,!\u001eԈ(\u0006DE\u0018\rXUV\t\u001b,\u0004\u0010\u0004q\u0005\u0000F\u0017G\u0001Wj %D\u0015|\u0017\u000ftu(\u0001\u0014\u001d2GpSp-B\u0013>4\rc\u0017⁸DeWLS}.=6d>+>#]\u0000-\u00012\u001bW:^\u0018k*Ǟ\bZst\t\u0000 \u001bU+s.^T9\b&;I\u0010la&0A\u000f\\/͇\b\u0005\u0012e@N=qͅ(S\u0011l\u0007h\u0014\u0011\u00013\t+\u0001\u001ep#y?\u001bZuO.G){Q\u001aQ\u000baa\tR@z.D\u0018\u0002&AH\u0005\u0016\u000bP\u000e \u001a\b0ؒ`\u0005\u0007sy\u0010g蟗g,/\u0017|L.3\u0004\u0000\u0005\u0018O]POO/$(a\u0000׫\u0010s]\u0011\u0003Ys$Yv&ަ~5Օ\u0000\u0002}}w\u000f}\u0017\u0004\u0002}̪bW\u0014\u0017#)\r5Ҙl1IO\u000fIIr@42`4\nC!\u0003\u0011\u001e{η;p\u0019/\u0018ZQVrF7QT2=2daYlQJ;Z]|OSּH ~Y֨wwIBը\u001fg1\n)rvA^7WrQ\u0014sB$/W̊FbFڰ6J}#UZ}GAm\u001ev\u000b!4\u000ehe6N\u001c\u000eEV?5\u00002\u0000\u0005Q+bhVVkdc5\u0006\u0015\u001e\u0002T\u0019Rz\u0006'ju\u0001׆Umo\u000bfo\u001dB|:/U\u0019毃+)Z\u001eն\u0014aKB:*ɽ\n>r\n!ḫp\u0006\u0002s5{\u0013Lz\u0017\u0004\\M6\tLWj\u0007OEx9O@yRZ;w\u000f=`<\u0011G\u0017\u0003\u0010n\t%{.\u0000%;z]\u0005idӣ\u0018\u0003fA_~tht8\u0002M[tJ6e+ d1\u001a8zU!\b(6\u001c\u001a\u001e1r;WHfJnCnejoi$\u0003\u001cXcsG+Rj\u00174YU#s1GFħ>\u0001c坾\u0012-EM4sB\u001f!mN3lT\u0004-\u001c\u0017\u000f,񡮡u\u001bP\u0003m\u000e)|\ncٸ\u0001(5xzpM+h\u001b+D\u000fG0;\u001b,\u0018N{x#FCZL\u0001b\u001df[\n5s\u0005hpaג7!\u0005\u001eiBWϠyJMf\u000bxƽ̎\u001b\\PV\u001f~܊\u0005ٽQ܂=\u00040V'z\u001ayc?#\u0000N\u001dҔ\u0005\u0019\u000f?avk\u0019\u0011Zx&TA|Y}Jgo\u0012+F4\nR\u0013v@?'Ͼ2n\u000eU\u001d\u0017RP1\u0018-dQ=dT;'p\nvPP\\xcrR\u0010CYX\u000b5\u001e\u0014t$NV\u0004H\u0000hxK{a'V\"\u000eJ\u00068Uoeodhu9'^e.aC\\oZƤ9\u0012M4{k4@\u001cu8gX#\u000e5uZ9\rq\bBi6=wzwy\u0005]]TEv\u0002TP\u0015+'eGi\u001dv\u0017\u0019MtG\u0017ݿ\u0000R\u0011jwp#ڎݴojg%U[$:\u0007\u0005ș\u0015t/gѲ$׳zc393{q\u0006ٸr\u0013եhx3\u001c{x\rW0:ǍX=B\u001a\u000bxYj\u000e?ɵC!ӤP2͓bͪ%4q|.:\u001c)CugpٌVAmRm\u0017op\u001c=n\u001e\\c\u0005o)sٟ\u0010bWv\u0004*.KPq\u0014\u0012ɝެ\u001f'(\u001bIpU\u0002]mUx-أ\u0002Wzb\u0000: FvnE\b\f)k\u001e}8~\rƣHʤ\u0000\u0004׽\u0014%X\u001e\u0015}pp\u0003mV1F?|WwST\f7\u0013<&>4=gzX\byfk99+@\n4\u0018oL|v\u001e\"\u001cB\n\u0015\u0005ۃ19$,-)*.XN 8\u0017\u0011\u0010lsGBx;{\r\u0018͊\\\nRk\u0013Zwa\u0016\u0019w$+\u000e8K\u001a\u001d!XBVoG#,i\u001de>~i\"\b:5WZ36zxwR}˸@>~C\u001b(k`{g\u001ap(\u0019!m\u000bh{8w\u0006\u000b2\u0015{9dkK1\\\bZn)\u0017ÏM\u00107\u0004>zv9+J\u0011\u0004?zgZR~Y-p\u001eؿ\"T\u001fSҰGz\rt$aw\n\n\tuCp7ϔ\b\"d9)7\u000bPۜ\u0014>{\u0017`vӝOk:<M]&5I\u0007S5g)\b|\r-_\u0004kV^v\bs܆\n$Q\u001av븾xS[e0\u000fA\u0006\u0016\u0004{/)6\u0002l\u0001j$/DP\u0001:#fI\u0004>Dt\u0014\u0011\\M!\td\u0018+w\u001f9w\u0010Z\u0007\u0012\u0012 \u0018a^߯\u0005\u000b\u000b\u0003+a޼=\t,S{:fiP\u000f{}Y!Z\u0004E\u0016\u0005ݼk\u001d}C{ˢځE5\u0001>7^jݳǇwz5J7\u000fiAn\u0012@\u0000\u001eEViY\u0015,mF\u0017 \u0013\u000fQr\u000f\u000f!2G;=_\\:Zj\\P&\u0019jC\u0016֨(39\u001d?at\u0003L ttN%-K5\u001d}D\u001b\u001c\u0017tDbfI?(`\nq~]{\u0015\u0000PjoqS\b\u00044\\'`O(!KJ\u001fWBEwkwE(uDEMӦʌ$\u0017Fs:Wl\bJ/\u00105\u0019\u001a\\v^\u0019iMXw\u0003*y^n&i7I9=-n~zW\u001fB　p*J\u0007F#&X\u001a[d?y\u000e\u0001I9 =%kO\u001d\u001a2\u0006`\u0014\u0011>\u0007\n2U&^6y\u0006Bh\u0003A\u000e\b\u0015\"pOnFh\u001c7W\u0013>\u0014!?\b3M\u001cm8|.U\u000f\u0005bڭ\u00136\u001cU\r0ha&`>yY\u0011Xk~\\\fXGVk\u001dϻy{qro\u0005 \u0017Ҙ\u001c}c^(ѡ\fgLYƠtyWo\u0001\u0004bZtF39\u001a+T\fO87>CB\u0014i#P\u00159`{\u0010Zt9&L\"_^\u0007Q\fuVwrҗ\u001e'y\bSѺzz~4\u001a\u001ccT$?\u001aFR<\u001f6\u0007xg\u0006\b= \f)X\u0003mv~Fh<״py>Je \u0019 SY\u0005#\u001fD\\\r~{/f}R/\u00004\u0000,ٺ\u0007O\u0005Y1B&ְ5.w\u000fam3l\u0003G\u000bM\u001ee}ޙ<\u0011\u000eocp@\u00118c5?,\u0013z;s:\u001bxy?\u00197N9^_5긨DZk=zN>1M2\u0001Dh\u00148\u000f\\㍞\u0005\u0017v\"YV\u0015->=(a\rڢiՅ\\98c~\f.iw\u0006֩\u0012Lpfs_\u001e=,JjO\u000esNyw(\u0004f&9ay^ض\u0018uO~\u001bzHC EG9\u0007*<#'6\u0016LdZ'\u0019<eiI\u0014\u0004$b/V8\u001f\\K>\\\u0011\u00009\u0010?f,QGE\u00166'\u0004(I\t\u000b[kR6%dfVα!D^TFYnKy!z+\u0013_?\u0002d({P\u001dP\u0005ȅV;\u001d42xsMпLYW\u001b_/>\u0010b\u0004D-(M\u001a\tMբ-]%X@0fUЙ\u0014Ƭ(w\u0011\td\t\u0017,)gT2;\\?N_]{!\\\u0000\u0015\u0017\u000e?\\)j||ʀ6;q\u0011\u0014\b-֨Gx,\u001f\u001a\n g\u001f'\r&\u0007\u001c{cnY#g9ǌo\u000f\bӴe\u0002W˳!kė\u000f8Ƌ\u00107\u0007\u0000W\u000bb*\u0006Ƿ~.\u000bq\\V\u001b4+S=q2C0{rzk֪\u0018\u001dorsw˧\u000e5(]7|\u0010\u0005URz9z|pmuz\"\u001bRj\u001fɉj\u0015jۂC$ISA\u0018\u001a\u0000&7Qd`&{\u00121\u0013):3ۗHGi>C;Ju\u0005bhn\u001e}:\u000ed'\u0014\u0007̗\u0018.ƀ\u001em\u001d^\u0000Ͻ\n\u0001c\u0010<1X)mJn\u0015\u0006F_\u0016\u0019*HUܢ\f\u00192\rwX\u001b\u0005\u00050\u000b5\u001b[9\\0f$Ԛ;\u0019\u001f\bA^og_\u001er\u0014\u001e\u0010{?Q\t\"7\u0003a\u001bosƟByJR?m?E\u001eޕaZ\u0012A.0CZ8\u000e$\u000fX:\u000b//~OJ+x\bʆ%\u000fsB\u0004\u0012->tpFWD!\\\u0013\u0016($m\u0016Տ^QC\r2\u0000\u0001\u001f_j4\u0005ǇKg{\u00156\u0005Q=b!.\u001d\u0012CQ\u000f+Awj'\rJPmn3B#Ay\u00005\u0005)Lsn0\\~w\fCEĺ<nΟ1͡?/{{W\u0007ET\u0002BՔֽ\u001d`^;y$V$\u0010uE_2v*\u001c7\fƷ\u000b*[\u001a4\u0000M\u001e\u0006).\t>ZV%S2&Idm\u001f}S\u0011Jv췗\u001fMc\u0016۔([\t޷\u0000\u0014\u0013*??\u0017ɲV7{\u0007<cMgo~ϝ9\t:y\u0006\u0002\u001f\u0002ʾ)Q['yj_z\u0015sD{k>آv(cϕhR,vkj^~b\u0018\u000e/^r\\0gi^!\u0018zGn?\u000e\u0017L_\u0000\u0012V}\u001d\u000e.qVMҜ9\u0017wV\u0001(O=bf}\u0019\u0017^IMTJ\u0004W\u0007y\u0015ݒ^QZx알ܖ';1x2t(Zf.iOnpcA늵ec&Z7;KrA\u000b]\u0012j\f9\u0012Em*%y|\u001e\u0003\u0007٫\u0018\u0003X\u0006Ν$BGh]3\u0017\u001f?3\u0007\u0017B,5\u000e\u0019g F+{p|_\u0017~JV\u0002WRvI+BpPP:չK\u0012:r:?(jt\u000bq!\u000565!{_\u00196بpip[}djp/2R\t5Բ\u0017\b\u000bp:\u0001\u0004n&\u0014n\u0007'Z=\u000bR\u001f<rtt\u00125~'dzI\u0011VMsBy7Sw2Ŷ%c\u0004\u001a\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷ\u0010}\u001b\u000fܷf_/if\u001e8OO\nt\u000f8~ӟ4ԊpϏ^\u001c>{\n&U\"/NUֳ\u001b<;::'Jks-wL,_>\u000e,˰eQ<<)3!C\u001b6\u000419?\u001e^<;9M*>z}xz=|\u001dOq0=\u0012H\u000b\u001e\u001eE\u0011'@rF\u001bӳy\\%ӟ\t*A~o?)\u000b<CU(by$EM\b\u0005 %AEAdWB\u0011\u0004)cϯbI\tGxƫ$.~\u001b\bR?_|ޫ''j#q\u0013r\"&U>ċE+_NűcI\\>1\u001eKn\u001d'wSsBW?}o\u001f#9=^lQӟ\u0010n`'Y|8CK?z)X\u0011\"@\u0013\u0014G8|K<~?_L0+%|6Kb\u0013KND(O\u0018kPje#\bΈ1>\u0018m8wJn5h-)\u0014(>k\r\b.{Cp'zX\u001d\tц\rJ(7R*K%R_\u0019ss!5NluBn\u001f\u0005eӽGpM\u0019ciYi*m`)KgpE8\u0004i>&c\u0003RM0zO\"/H[1ψ>\rѭ?{S=Fߒθr\u001b\u000bwtWS\u0017t0uޟ1ΨҜ&\u0014RZ]p;LQ\u0016>6G9E͸\u0013LuFR0g1eMj\u0019iϲR#i6(uuy!s\u0012,چw\u0005Pyc\u001cH-ɛg(o\u0016ZIjfIn\u000b\u000f\u000fYoɸ\u0003rQYnZzR1\u0005\u001dXY\u0014FQJ6+˝\u0014[}RPw\n\u0001a\tR\u001a屆|5K;\u0014\u001dY4s|\u0017&cNh}PQ:Y&.p޴$7\u000eJj\u000bӔwP6+rs9\u0015ܥ\\(M8:s\u000eꝫ\u001c\u0017H|D6\\kҞdF\r\u0005wtά\u0011%7Ω\u0010Lj3+֑\u001b9:⭾ݘgh+MYBsJ\u000bXw\u0016I7{y֥9\u000b\u0017>.\u000b:ip/:ׄ&޺o9UҺ\u001bi(Fy!\u000bq?\u0014\u001aGe_V{i? \u0016\u0005\u001a|\u0015KcuV\u001d}\\[\u00056ɋ;omp-g\\P2{Y>4ڗ\u001fG媛J&q]xTF$JAو[c6MƠb\f+&3~n\u0005\u0014w\u000b\u0010eٸ[Q2F|\"[-GD^k,\u001a\"JNV^\u0019Yd\u0016>QS=:0~Yj\u0010j'\u0001BG#18ڗ\u0015(/\"\"3ea֏h[QOrR|\u001fDIuޙ\u000bނѺ{\u0005\u0005 V0Ӵ\u0015(\u00032udi\u001ccBhȇXN*\u001d\u0017\f_xR\u0006\u001f~\u000fg{Ey\u00127<|'D,\u0017~.vQlY/\\\u0015%`z518h\u001fe0A97էF?ָb\fJ\r\u000ee8yF\u0015)2h蝰\u000b\u0016_uW\u0019\u0005gln\u001d\u0017\u001c\u001e\nKDj\u0014%*Zc\u00007ښT\u0011,)cr\u001eyoPҚ5p\u0006O\u0007\u00176mcjqho=eeo]}jr1Em}\u0006R`c:>l_\u000eqkZNRn(3c\"lJ!S|5)֋Ƙ6Hwt@YXgu\u0003}R4\\\u0015;[T\u0003LkYn\u0014jl\u001e\u0014d\u0004,\u0019\u001d<QԐTx~7''\n^Q\u0011eƹX=cuc6.\nBq>WQּ\b'i{('\u001a`\u0010c@\u001c\u0000.\u0000ƣ\u0014(fH\u00105'iQl&הּ`\u0005P\u0001a$\b/hc`h\u001dZk\u0011Js7/hR\u000bXs\"s\u001b\u0015z\t[G\\[k$X\u0019gNJZ0\u0006i\u0003?\u0003m\u000f+f\u0018lZzy\u001d\u0001lH}1n\u0007%\u0001Y?T؝)IuNcƟ֘s\u0015g~eN=悙8;gʂya}|)3EWkǌ=L\u0014c?Å91*x?UbG7Z\\\nsB\b%3\u0016qo\u0002gB_\u001d޺K6G|}Q]]s\u001d2B5\u000bSҒk4ˏMv*\u0001&}=;%E\u001b\u0003D\n+5\u0018P\u0002:O1>\u001c\u0010\u001ekoJ\u0019\"^0W򴟣t/\u0015\u0018,\u0013$f\u00000('\t(`\u0011jiaY\u0016EXV]SMV᧤9#: =N<6\u0012 ֑\u000f%h=Ri4擴P\u0016XF\u0014, D{\u0012tN\u0006)}@8i:LQnRT_;}\u0017bKaws\u0012g;\u0017Z㄰8. g(\u0005\u0018#\u0018hFFE\u001e@T\u0018mε=)6QomE\u0015Ĩ$79o\u0012\u001e(.y\u001aNV.a\u0014\u001c|\u0012`}\u0002\u0000\u000fo~KV7Jn ٞFW\u001b!bĊb2Rtw;y4NQ;34Z'Y\u0005Ή-\u0018Sy&OӓmeĐu&N~~\u0005݋俵Ƨ\u0007%\u0019iOƨ\u001dI<V)➧ݼ£\u0003^Z$\u0018<ʱ)\u00124Z8E\u0005\u0005]Q\u0006fmD%\u0016\\2:zJ\u001e\u0011\u0010\u0019\bEIUh\u0019c͑DgJʝ<\u0017\u0010̒&\u0002_\u0005\u001dT콒4#Jb#W\t}(O\u0015\u0014\u0018h\u0003\u001a7\u0001\u0017!\u001a;e1=$V?\u0013\u0015cMhe,~3yd\u001e\u0002[gA\u0004\bWL3O2h+\u0003\u0016\u0015=<0\u0011REѡ[{yq)rxWg4w*N\u0016p)I\u00003;\fv\b\fҜm4y\u000bq%<\u001crq&$D;\u001a\u001bh]kչ\u001cL\u000bR\u001dG#@}!AH\u0017by5ǯ~MnX]1Z)3u\u000e 6zo\u0000P\u0007s/1بPq\u001fR;/u\u0018gTZHF!Է঻|c4%͹\u0013΍\u001bz\u0017WZ\u001b^߆]\u0004bQM-\u0014;\u0010\u0015\f\u0004(m|$mB\rq\rp\u0003ژ\u0013֙C`#\u0019*l%`6}DK\u0002\u0002\u0007qS\u00180\u0014IIpPV3UC\u001ch\u0010\u0003\\rfjpX\u0000U/i:@\u0001R\u0015;I%\u000ex̰~YEy=Q2\u0019\u0010\u000fM /1gΙk v\u001c\b4ÄiI\u0003*6_\u0010]Ɋ!\u001c,\u000f\b+\u0000p+\u001f\u001cYEmAֈ\u0013RdH\u0007IZ\"w:jG{7\u000e*zl\t\u0001\u0000{D{}!:#\u001bOm߃x.\u0004sqϛZk\u000baZ\u0014w\u000b\u0006Oshߚ;ƛ\u0001d{\\\b\u00018kO\u000f_dx+\u001frjl\u000e\u0019w\u000e[5~)uCSl\u00008g\u000enɫ\u0010yuD9K\u0012*\u0019\\\fgzq`O,\u0014.!)s\r\u000eGOembOC\u001f\u0001\bjAWqcn.J\f\u001a\u0006K\u001a$*:@!_>V\u0012OAE~2\\,̠Y$P)ꉊ\u0015j\b(Kb?I\u001d|\u0012E\u00152\u001e\u0007{͙#&72>I\u001b#Z\u001fBV\u001aD~Y\u0007i>_|DI\u001c\u001dY\"1Lb?\u001b%K\u00148\u001d׷\u0017Ђ\u0010H\u001fc\rr+Y13[\u0016[ɲ\u0000A%\u0016,6f\u0005\u0015䛡]<\u000eR\u001b\u001fD(]\u0003D\u001dtTy@9;yi'e\u0002\u001fp\tM\u0010&\u0016,G9E25D-\b\u000esD\u001b\u0001(VFZ3<e\u0005iwL0Z|`xG}\u0014\fi 7+@\f^RmnRK[=ޟͭ\u0014f\u0015{\u000e/napxsujjkq\u000e:\u000b\u0019R\u001bJ=WTa#\u0014\u001bTT]\u0000f\u0019Z\u0017@JhC}K\u001c)ъ33&)</\u001cպ_zNfImၽ۫8\u000bR=/\fs\"\u0003g\tLwS\u0011؝,]֚i\u001b%:\u0017%Sq\u0015+1;\u0005qN2XxqQ\u0004/L-\u0007\t?L5@b``\u000139.q\u0010%I-͝\u0014(*H9B\u0001v+\ntBZ(\u0017\"xP\u0003ΙB0pڱ^?)5p(4s܍W\u001fYG\u0000vs\f\u0007!_2KB\"ub\u0000'ki-(\u0018e\u0013\u0015\"\u0014¨}\u0003j9V LsNnf?\u0002`~3q[O6`Ҵ\u0005\u000f8գUjÂ\u001cZR8I\u001b\u0015]57Z'\u0010 ޅ/]֝{;x+WWi?L\u0010f7'\bࠋjO6\nq\\6:n\u0019>HiM0^]ǝylCPZqg\u0005\u0013j@Kwb!\u001c\n\u000b9< ,J\u0013SJյ7}enP\u001d\u0014쒉\u000fFmfNYG\u0002P}X+\u001eSF\u001f{\u0001ŋŧHl\"v2j\u001b\u001d\u0000\"%2(\u001e\rJb\u0007Wb-\nB\u001f%*\u0016\u0007v\u001eI[\u000e*gf찜18C90ɊQ\u0016y;(Ɋ3j+0u򓤷[0 h_\u0017IΛ<=[GbvDwa|q^HR6o9qU\u0012E=My|Ps)҂N\"\"E8T6=y\u0002+i\u0017):OJ=9jPNIw3T$wf\u00027HNm\u001e倮A^2+r4\u0011~\u000f1=|F?ͳXRv(Q \u0007\u0002h^m\u001d^f\u0000\u000beY֣7\u0017z}ϞqB\u000fsr\f[\"\u0001NqQe&X\u001b>g/xo\n&3b\u0004a;\r\u0016V[e(QS\u0007CT\u0012^6}\u0007\u0012\u00174\u0017ϕzi'8\biGt~F\u001b+opI\u0018\u001c\u0007a \u00019八\fJm]lVIE\u0003**^x@%\u000e>*\n\u0000^\u000b\u0015/I@֎\u0005{e\u001c<P{E\rc}@=5$\u0003\u0015âR&N\u0010BZyf\u0000{Q1F!\t\u0013y7z\u0015&,R\u0016fYjQZ\u0007\u0000u\u0001LfNqyO\u0011\u001e\u0000סJ\u0002fk=J2;I\u0019Qf}W\u001e%dIJO\u000e0ņٳz']ɖ8^\ryI@EdK(D_Zz)؎\u0001\u0011rh֖P!OEo\u00125Óy8'W}lXEc\u001eǪ\u001d(-MYb`q#\u0019RKol:7\u001aBx@֚8\u001bO\u001d&{xSZ9\u000eǇ+sY[}N_Tg>3\"e(\u001f\u0017>\u000e79o\t\u001c/h}`\b\t{(sqbNޟ^|/%H}@\u0010L'\u001c]Zj\u001cٵ4\"Yyf\u0018_9\b\u000be\u00180Gij \t\u0017#I\u0003\u0019ݓ\u0004[\u0012H\ra!G!\bbLRO2\u001cx\u0004\u0005vyIi\u0014(Q\u0001x]- $*,DVm\u0019\u000eN\u0012X\u0007v\t-'^q\n=AzZ[Ɛ4iD\u0016D|X'9\u0001܇r >\u00134\u0015\u001ct\u00147pov%-YqdI.tIJ\u0016DF%NV\u0004{|6*Z?\u001cZM\"҂k\u0012<\nIa^;m\u0017? 1iCaB7BsV_\tg\u0001\f\u0016\u0016\u0016꽠{\tUϹ#<!R\u00155\u0013х5H\u0006\u0018s#x\u0016\u001azКͧ5:i|\r#W7V\"Z1]k\u0004p \u001a\"zJ\u000f\u001f\u001e\u001c-\u0005\u001bB'mۚz)1-\b\u0000\u001aCmsҡyVw\"Psu\u001cRv\u001d͟ 4)mtS[?);ݸ/\"JB@(}ۘ\"yW6\u0014҂%6t@Y&'Wobx$8E\u001d\u0014\n憲-\u0019p\u0015\u001d:\f[S/ȄP7nXG\t\u0002c\u0002'\u001f\u0014\u0018\u0014{$##\\\u0005\n;`\u001d\b\u0003*K\u0015>ey80F'Ze\b;U6\u0013\u0016hF869(4'줹B$i=29#`\u001f=\u001ce3ƌ@i&򤝆u{y\"A\u00076?]\u0006(GYa\u0004uhC+m@b\u0018'\u0001xbjT\u001a?\te\u000fJ\u001c/\b\u0012؈\u0001ڂлN\u001b߰ΐ?-\u001cst\t\u000eH\u001f\t;\u000f\u0005i&i?:gq^F7Wp'\u0019\u001epW8m\u001f6N \u0019g.F\u0015k5UuJrX,\u00138:\f`/3n0m8}\u0016\u000eO듋\u0014a\\\u0014\u001fU>IR\u0018S) 5aRQ|\tUVY~Ċ\u000b\u0005&r\\\"/$\n\"6B.Ή\u0010,b\u0019\u0002 fx\u0018@l\u0004:'4\u000bRwN%i\u0012%-K۠*lPŴy\u001b\u00068M/4afZK+j<Ma/2\u000e+V3\u000b9A\u0003T\u0013\u001e\u001dT\u000e\n׊\\rz\u000fұ$X\"-Je|@\nlWLb\u000b\u001f}\u001e\u0012i:Q\nq\u0003H\u001a3.[|A\u0006\u001399t\u0006$+\u001e*\"bf*y6J\u0013Njyp=q\u0015\u0005Էr0/Ю\r5\u0000\u0002KZH{\u000f4\u000efIC@G^\fÐ5@t\u0007\u0015V`v9!\u0010O\u001fO\tkGX7c\u0019\u0010u_9O\u0019~Tۤ9\u001cDIq\u0016\u0004̚ˏz4yhƒbnY!>ŭ\u0005#\u0013D\b\u0007wH\u0005١b\u0010\u0000`Xb$\u0014\bVwa\fp4)kR\u0014mu97>8k&V1f!\u0005|#d\tꥼ\u0012ГX\u0019\u001eǗh)+\u0011喙_PrAΉMβ(\u000br\u0017,\n\u0001x\u0004k\u0005)\u000e\u000bM[d͑8A\u0017dR\u0011-\u001by\u0013eEWN\u0012q\bJ\u001fPƘ\u0016v̌6^t\u001eg\u001fh`\u0014Q\u0005~dIHUר\u0002IRdc {\u00043T\u001f-ցOЄ\u0005\u0015\u0019ȓZ4$\u001f\u0014/\u001f\u001fАd9&HS. Y6s\u000e\u0000e\u0019\u000089*dav 2\u0018aYحsBb\u00023\u0015\u0019x\u001bVE4.`p-bJ4P\u0016\u0016\u001djSC\u001fT,ɚFO\u00104av:{\u0015s\bgth\u001c\u0017:wz9LY567\u0005R1:J}ENJ+E{e\r(\u0005+\u00136\u0011ztb;\u0007\u0003\"B_\f`KpwTV\u0005vPRsz3l\u0001r'\u000e(487/M>FN\u001c_\rlQ\b\u00104E\u0005I2Γ\f\rb$\u0000t|N\u0017\\GI\u0016\t\fW\u000ea\u0003\f0\f['nվ杩-HS\u0010O˘}ZoȨ\u0014\u0018}\u001ae'I:Y%'\u0002V\u000b\u0005-p\u0011FYj\u001eg\u000f@-V\u001f\u0016-N?AAFbb.(@W0Ē[;{%˴H飊ҭ(CJ\u001b{\u001d%2֩m*b\u0014(I#QLHJmF\u001br\u0017\u0018\u0005C\u0001f|\u0011koQze\u0003\u00134K\u00120G\u001fd\u001aZeW6!\u000f`\u0001iF)\u0019ҕCsfbu3+\u0013G0&96(+\u00143T\u001et q%wnTa,|8cR\u001c<+%\u0015Bmeyo\u000f\b\u0003\u0012tpC\u0005?|\\^$g\u001e\u001em\u0018\u0007j~9&\u0005\nPG9d,sYT:9|׿/HW\u0013\u000fX\u0005\u0011u\u0018Yb\\\u001e\u001c֗yn\\\u0002WyA\u000eRt[ BPȜr|^\":\\nQK.\fs]8֡\t*f\u001aJ1kY <n^(n/Y\u0016\t9JRV6nA9b]3>N)\b~TT\bWP\u0012J.\u0010ʗO\u0004k\u0006IxhI\u0014be>.\u0018@\u0002nIlI$wL(w\\\f*n\u0006`\u0007y\u000eڂS@D Ӄ\fk$ŦJ\r~<2+=FiRJ\u0013\u001b[\u001f,{\u0015iS\u001e\"\u00015\u000eJfp\u001c$_\u0000kSO#G\u0018\u0019.\u0016Tq\u00109UY\u0010*RX\u0016\u0002hA%?_?\rB8(ņ\u0012p\u00015so\u0014\u0016p\u0014}h\u0001+2\\TцRu7Z\u000f.AC\u0006J~\u0013r\u000bRa3LԆ(=\u001c\"\u001c5RyÛ٧[U\u0012)!5Ch\u0015>)YCAHzO\u000bfX\u0004)H\u001c\u0017_\u0017FhZ.`'EÊBFd\u0003\"\u0012\n+f\u000fmlT\u0015/QRPl\u0015{\u0011[_ԿHH\u0010\u0007\u0005iDLB5O;;+IAQ\u0013q#\u001cvR]\u0017TYÓ\u0005:a$3##\u001f}f؜#v7\u00144!\u0014/vI(6XYE\u0018I׎vJ゚d\u001c|Dk\u001c.\u0004\u0002vr2\u0017\u0014\u0019o/*V]6\u001e\u0019T\u001fetI\rh,]jTՈ=*Jx\u0018 bp+\u0000\u0004ޮw\u000eX\u000f\u0006<t\u0005\u001f&:9\r'wNs|\u00003\u000ec\u0014`/\u0018nYwDŊF\u0004\u000fuS1\b<\u001aag8갍;t'\u0001h\u0017F2\u00196?!\u0000*\u0006q\u0015\u0004#\u001dJJ\n05,eAd\u0010\búSwnNhc*kܗ)z \u0012R]9\u0005 \t\u001apAB\u0012gH\"a%oe!\u0004s\u001c[\u0012CBT %d\b\u000f\u00013\u001c_\u000fO\u00126N^\u00154AOAADFy5Svr\"NV~ReȆ?CBr)f\u0000\u0004a҄*\u0010\u000f\b8xyjևX\u0017;,WP\u000eAD9H\u0017\n\u001e\\\"'\u001a\u000b\nRx\b\u0006\u0018S\u000fުgﰛj\u000bR\u000fcN\u001e\u001deHo>\u0012B0kkΝ@6\u0010ZRm#E2j6Z\u0013M>\u001e\u0018 \tcFQ~\\xDYWZpN|R&f}i4ZmC;3\tDVހ[W?M\u00013R0-!6\u0012\u001dW\r\u0015\u0016kOh\t\u0006aO;4W{RvK\u0016X#7\u0005moO萴\u0007Ȱ3\f\t8g:3Ҝ\f8\u001d<\u000f\u0007oo9w\u0005\\Bd`($\u0006|d\u0006\u0019_`\u001dCKW$\u0014Q\u0017elرS­\u0011ma+1\u0007\u0019Gb8X\r\u0019\u0019~`R\u001b%W\u0010{\u0019j\u0005\u001a\bf=N\u000bS<\u0011\f\\APJ[q'\u0005L\u0016\u0012߀\u0006)%\r4f~ QB\"'Q1)7su\fͫM;l|XY1A|*/\"zbA/AHs\u0011Pg;_;Hx/H7h05\u0006\u0012f\rվ8Oޅ9qGW\\0\u0017kqM0{Y]#y\u0018\u0010F(8bf\u000ejqQ\"\u000bXo7?*\r\u0010։Oơ=\u0017C)\\s\u0004Yol'vQ%b\u001d`\u0011i\u000e\b\"\u0019^LfR\u0000|\b\u000b\u000fWNC:U'$8%I\b<\u001f#\u000b\u0019s̑ջ毙`T|\u0000#\u001cd#\\ҼN\u000e*7OU`#\u000fx\u000e3J\u0013P\fw²Ԡ^?C\u0006)\u0010)cϲbua?\u000bR\u001bR\u001f{\fP.֙\u0010*Ƞ`2F\u0012q3|\u0013E5NZs\\\u001d$xR|!{\"X}H}\u0011%cR%5\f.B\u0012\"KKƘԇpT(~\"/U\u000b\\=\u001f/Q\u0002ؕh*Eh\u0019Ҕ7D\u0002|\u0014@SW9r\u000b;y+ڙ\u0017\u0011\u0007\u0005(ͧ(\u0010=ݩӻZoKX\u0007.\u0001\u0016\\X;R\u001an\u001d^ɍ-DW\u001b~D[}J\u0005+1:\u0004Jp.Hk\u001e\u0019\u0018->V~7 Yisxn\u000fpźs{\ta/\u0015T\u001fM\\_.΅ډҾһr\u0016;q\u0014NRvߛ<\u000fo\u0011ah#QV.avZv\u0006x<z\u0017=Eޒ!kXۤ5\u0001R0ÇOsAY\u0014\u00160<\u000e_bd\u0011 U'z\u00139a\u00108r@\u0017^A\u0013L. -53\u0012\u000e8WFrF0\u0011\u0006\u0011\u001d\rWz\u001e\\%\u0003xӫma\rιX=4\u0018wB]ĒT/r!!F\u0014܄\u0018I5\u0001˹S<cOHc\u0015Z9|P[(c(\u0007+u\u0006\u0013$rE\u0001\u0006[T;oѹ?\u001a]~ppE+ke=xE\rg7)hmyI\u0010.@8 \fa\u0017\u0005\t!}%Z\b\n>\u000e\u0015mo)>aHo\u0017\r:\u000eO3\tgwZgR45Gwӯީح;}LC\u0000`V\u001fhQGjz9LCd?E^E+q&ꚵڴٮ]FWWa\u001cNTBu\u0001ԺW7{\u0019_[]7}UZB\nk{\u001apz%r(k䏛˗k`rAb\u0017\u0011`AbEe\u000b\u0001\u001eNa0'RmDR4-Q\u001b\u001b\u0014ٿB5o\u0013LPRr\u001f+|\u001d\u001fL.Y?|\u00020z\u00175K[맽wmE28>\u0003M`\u0011mv\f\u001c\u000f7j\u00048O\u0017x#g2^\fO?O?\t\r\u0006\rTe=m}p\u000eY\u0001\u0004k\u001b9>ܼ7z \b\u0019jK\bPGB\b(XUOvgS\"08\u0001\u0013-jsgpOoTC|uϺoS{.?\u001cz\u001bίٍ7g\\j\u001dɍ5e\u000fLǒ,޵^՟5/:V\u001a\u001b^46Շ:j\u0015E\u0006ٽSб7{!NIc\u001d\\Z\u001d\u001aQ\u0017V]?W)1Ɓss\u001ev}\u0013ߴ\u001ce\u0017<n;?:-_U\u0017/֖Q)g\u0005\u0018ak{1e\f*3XP_[\u001cln77or)%*b}e\r.e{5\u000beNsBH\u001bЖ-\u0013ko\u0014HX\u001e^}{'\ns}>o'E48|_R[35\u0007\u0017B5́95:gZ4Z\\;\u0014Nn_UWE\u0015:t\u0017'\u0018}pI\u0014sn?ܸիߟ~w\u000f\u000f\u000eJ\u001a<sF!6\rL\u000e\b\u0013ɛ]_g7۵\bY\u001e\u0002QZ̟n\u001c;\u001e\\w\u000f\fN\bf7Û\u001f\u001euN޷O\n\u0016wݓwW8w9_qH\u001bߎ.9U|~=}+⣹7<f7\u000f}hN5IY,\u0000͏ڻc}v?Hz\u000f/7+q\u0010s3rNU(T\u0001*P(sht@\u001cf\u0019Q$%QT\u0015GVdAc9ʒl[8\u001e̞gB{\u000e\u000e\u000fj\u0002U{\u001e\"d{h\u0019 c\\+,@yЍZ\u00195\u0011&\"88\u0019ւm\u0013\u0003\u0010%Ĝ\n(\t\u0013r\\\u0017h}+3Qqx\u0006T(:\u0015\u001b).df:\u00124\u0010\\MpYW\u0007kp\u0013t\u0006\u0015K:&ЀU\"s\u000b)7FBX<\u00000Fw\nO$F\u001e\u0017\u0017+@\rT\r\u0003ڵr\f\u001531)fj|-S2IюT^MMINƚ\u001bSn%;\u001ad\\+x)SR(6\\FneRyrwqK\u001a4]\u0015Vt\u0016\u001d+c f\u0006V\u0004[VAx=;d|r@KR%3GE{جM;WuTb@c}\fVBӉ~ۺ51_{ޅAqB{x~0y#\u0013KF*ś\u001aHs:3s|5ެ͝iBTfbrEm\u0012nbjq[sJ|\bd5X-0`}=ܢx{W'UwiRdt/ Kq\tԗƄ<0&2]OE;tF+X\u001dͅ*+\u0001ݛKw3v)\u0014W\u001db8q8{AD$\"͝`uW\\\u001eTl]~\"V\u0012aWtL@C/8ctz#>:\b#T\u0002$NNcM>7C\\\u001b*\u0018t\u0001\u0014/3\u0019N1o\"=W\u000b22rEw\u001dmݛ\u0012+d*d\u000e,>lGgyN`\u001dg+S\u001a\u000bUhiuj@~Fm݁\\\u0006rp.;_\\\u001b\u001a\u0015\f{BBk\u0003oq[\u0017D'TU6vChb\u00009\\g\u0017+7-SjG\u0018\u000fw2;'59lGnK2D\u0002\":\u0001\t\u0016n\u0006.H\u0007\u0016IT8gAUՇ{\u001bGyb^csdug=\u0003\u0013\u001dWng/A\u0014\u0016щۗ\u001fyJ\u0007.Lks{❝Ν'_\u000bW\u0006u\u001con\\|bri.TjzgQo!vrj|c'\u0013{ݥs\u001dO1ɮ3Tw\u001bBvyyAov\u0005Z\u0010Kf&\u0017B\u0011VLJ\toz!1qZ\u0002\u0014\fð3Wp\u001dy.?u&\u0007֞X^/\\Nc@V:ǧu|t\\GĚͦk{7^@/JOJu:BM\u0002d<7/'1Z2+\bV%\u0010ŕ\u0013'\u0017uW.`4s\b5=}Iى݋\u0001Г1\b\u000b@bt{)=DgVw{EˏKU<2I&fBi^6=%2KPX\u0006snb~&7(^O\u0013\nԶʺ+2\u0001N˧=9ZP^K+Be3;w\u0005pH\tb\u000275\b\nx7R[ONg\u0015˷vRN8Q>/ZX\u0006\u001f4N1\u0013l[bq\u0005\\\u0019D+\u000b{6R\f\u0016\u0013S\r21\u000evٹ+T<s\u0012\u0006tG\\n:9\u001b(/6z/Lw)d\u0007\u0016nnL>P\\Iӷ/>\u000e\u0006\u0001/\u001a\u0007JZz\\s\u001a*Kn4\u0017Z<@i1dflܸ]aSc\n\u0004H\u0000\u0000\u000f\u0015*fl@k\u0005\nb\u0011/\u0019AT \u0006k@Oͤ&\u0000y\u0002^Ƨ΁QZ٘3T1\u00010JP\u0015rrԫ|D\fUݭ|o/̛LE\u000bK?\n\u0003xgJb\b\u0014\rL\u0004˞xWp\u001dQ5\u0016\u001d\u0007s.RܮvLV;N)LJ7=z\u000fkWm^#\u0019C7 |u*>evG.=so\u001d+vChg?ݻAJTZ\u001c1c&\u000f$D\u000eJ<l\u001e)+lٓ\u0001pYPyezfg$j\u000bb8d&\u0015WIe>6C#\u0014&\u0010O\u0013n\u0011\u0003!_io\u0010k+FO=#N\u0001\u001a\f삿\u0011l\u0016\u000e&Nߦ]ēn\u000eobP}#TY76hCl+4a#\u00192P\u0006๹3-\"T2l,䦥j\u001bj8m;@\u0016 \u000b@f#M;\u0013}Tw\r:\t\u000e\u0005~g;@\u0005\bn%L,q\u001b\u000b;XU\u0007\u001cp\u000581x>^U\u0017e6&\\^ފw/2Adb\u0017\u000fף+OYWwvo\u0010jtz9ԽIϏh\u0013\u0019\n!CNf\u000f+ZKÕM!wn&+cV\u0006p\u0014T\u000e;ڣ\u0012=M%66<~\u0010NQLU\u00133DIg\u0006\u001fmUz\"ʯ 5\u0017Dm\u0004\u0018PHcAAv\u0000 \u0017\u0016)r\u001bnZe&\u0011nAV51Y=\u0000\u0006*W.3Hvv\u0013SHOC\u000ed=`u\u0005M*5\r_ۺ]Y<\u0010ssf2}Pez{\u001fHtl\u0016 ~\b+G8'`?7\u0003B+.KMT\u001b3{q).R\u001ea\n+x6\u0002BFʈީ<t($jL\tx\u0003\b5,\u001bkt0\\\u0011_\u0016pL`IA56Aq\u0006\u000bsf\u0011io\u0002eK\"T;81Y3ypS\b\t\u000e\tB\u0005\u0012;!\u0004XN\\&R!':\u000biRL\rWRʄ,)31'U!-\u000e%jD\u001a;\u0005:;G%:*\u0015(˫ttda,MH)X6dv^ez](u\u001d.ڄI@By@\u001d*\u0011>RY,^\u0017r+\u0016Q\u0005֟_ܹG&7\u0015ɩB*\u001dE=\u0015s\tbD0_hl\t\u0005D|_ࢭ\u0001R\f5\u0011>\u000fg\u001a\u0000*:\fs.\u0013d:\u000b|a\u001c]\u0019&PVM\"\u0007Ow+s\u0015fFJ*\u000b\u0017\u0011_^2j6:Eu@\u00114b\u0001i̝\u0007\u00070BX%&z\u0002\u000eqR\t\u001ep\u0007d\u0001\u0015:na<=P.CK\\~R`.Q\n;v\u0006a%bq@\u001c\u0015лr\u000e9\nmwl\u0007FB1z:gaF2L廻Ҫ;:ᐪzw\u00183f|\u0001;n^i%b݁\f?:t\u0004-lO2p\u0000r$5\u000e︁{bAJW2\u0013!^Mn?X9';\u0013\u000b\u00173/\u0007Q\u000b2\u001c\u001d\"\u0019hLFfrV*\f݉i-\u0006{r\u001b\u000eh7_NKA~\u001d\u001f\u0004\u0007OΧ8GN\u0006ec#JDJ\u0005v\rP<\u0003&*\n5 \u0000po\u001aaJ%;(0\t\u0013zrlb:ZMc|Ni\u0018'\\WXi\rA3.P%\u0019٬\u000e\u0011T\u0004{*\u000ewܕ`eUf\fi1-3;5v\u001e\u001c\u0010?7Oݾ,\u0019(\f(\u001d\u0016:A':t[ȸJLJcaK\u0007TvРj\\k7;\u0004J,\u001fQ\u000e&߫On\f*,:ec\fs优[\u0015sKa\u0011J\r(\u0011XXP*\ry\u000e!HbeJ&F5wb\u0017aG\u0012pZ+닶pn\t\\x\fD\u0000\u0010M_\u000eU]Ѫśa[tRy\b@bH_\n&\\칤=w\u001b8<'&(KH@y0s65%\u0015g䚳wca)86\u00198ۿr\u0007*1!09X\n\u0010R_'ZtVv\u001a\u0011\u00062k\u0000x$fO\u0003H&\b'¼`\u001d\t4\u001cX\nN\u0019؈ \u0003i'\u0013S@<ʦL\n\u0013Zwp04\u001b\u001e*\u0003](\u0011/.\u0014\u001f!H~Z(-ЩI\u000b\u001bФAX-TxP\u000e\u00016`\u0007.S^b-0j\n\u0005s'\b1F\u000ef\u0013r\u000b#7\u0010\u0016t )\u001f3͜Owv)\u0000TLF_ \f\u0014\t\u0015%\u0004+17M\u0006jBrFL:\f\u000eڙqIM.+!\u00019:]uxrluP.k|\u0011!\r\u0001)gP:xR\u0006\n=\u001bxg9=\"&j7ՙm>_&b\tOI\u0001FZ6*2U69}\t&\\b\u0015g0\ng\u0003bcV_K\u0013\u00058!CL\u0013)\rm6JPq+-Ao&S3z*\"bC%T`\u0015J\u0007D:[\u00103\u0006.h$gjERGG52\u0013\u0002.|a\u0013A9\u0016,1w$\nqO\\Z-oɒ#Cu:1:FȐ؈^a\"̴7\t\u0013ؽgBq\u001d/\u001b(O1d\u001cu\u001d͗TbDC\u001c\u001f-%ɐ\u0001),Rc>'d$$\u00050\u000e\u0003!/QqmFb\u0013FwؘĸyX\u001c\u0019\u001c8e{lt\u0002ezW+{RkA\u0003=H\u0019\u00112;me\u0002Ri\u000e2gvDeřKT6\faQ6M!\u001a8\u001c/<u\u0010n,n\"\u0017\u001cR'6*\tV\u0015zQB\u0014- LfH\u0018Y\u000eݛ1Qɋ\r!`2\u0003\u000e\u0014h$Woάmq\u0013<\u0013'\u0017>ܿDzb\u001d\u0013r[5.3\u0018N4\u0012F6>8}#\u00077޿7\u001f{鵷{Hy\nƍN[ʓ\u0012\tSXܮO/N.m?sk\u000f?qٗwyt\u0003\u0017\u000fy_ѻwng,Op^av\u001d7T'*NOfvb2R_\\~G\u001f\u000fOO]S\nD)hJ\u000bfg`D=Bw%^\b|;Xپ{×<wxpɳ~ܝƩ\u001e\u0005\bݐ}YKc%1S\u0015l}ލ[>Ͼί[o{i'\t2\u00130\u0011Km\u001e2\u0011A!ٍ7Wٶm_^o\u000f<s#{w?xg^yG{\u0007c&\u0016Jar\u0000)؄W\u0010-Vt}~fBmrfeƅ\u001bgkݗşw\"c2\tHDT0<FTv\"$B'v\u000e孤P!)Y[?}s7zǟ_<u0lm|8Z-\u0016S\u000b[\u001b.;cOO~_}ɇ\u001f?~kϼ<y1XSc\u001e\u0011|RƤpPi/lowGz_<\u000f\u001ey7/?7~ϗ~;ϼ\u000fXME*t0\u001dN\u0017;3ϝuǟy^}띟?^_G_\t/\\}lwA0-8\u0012bcrq\u0015\u001es;Wy\u0017ǿ݇_s}>/\u001fG}e}܄$\u001fJzh1\u001e!+O̯p훏<}[s/ӟ~џ?~\u0017y5Cϳz\u0012mO&7v]\u001eG_\u000b?yo֟^\u001e5\u0006UvP1[\u0016*Jp9z\\yo}絟w?\u001b?y\u001fo?\u0007\u001fOO3}f @(`\u001bٵ\b\u000b$QuW.\u001c|O~O~_\u0017_>O?\u0017\u001f~z'rpy\f\u0014l!9\u0012N\u0007`!Q7\nι+w\u001e^O>oǳ}Ov\rU1`j}zf~ckgKWo\\\u0003o\u001f/>_/|era%q\u0011XY%n/\u0015әܸ\u0007\u001f{^//\u001f?/\u0001«{7wZK7\u0017ݾ\u0010)G\n`\u001aH\u0014ZKŕ+.}{o}\u0007?Ͼ?`;~?>7ӫw\u00166x)\bo\t$sꩳ._o\u000f??\u001f}?O?\u000f?׿d}B\u0016\"He_jFF02\u0013\u0013\\eay;\u000f\u000e_>7o\u000f_}/˯.L&W\u0010-\u0016X\u001b+W:sɹ՝\u001e\u0017_~׿_w_\u000f>O//^z\u000f?/i1aL\u001c\u0010J\u0013C \u0011r/k.m~쩧^z\u001f~׿}\u001f|_ϟwǟ|{\u0013{o\u0005U\u000bM1-J\u0019O0\u000f\u0017k}7g}~~?oy?ٻx\u001fx:Wq!wB\u001emr\rbbwpϿ֋_\u001foͯ\u0007\u001f}K/^2Ejʪt\u001aKf\u0013\u0010\u001bS\u0013sK\u0007WݺsĲ\tXqJ\u0011jL\u0011\u0016$bQi4WVW:ӝݵ7/sWZ?w49Jq/uԚ&;inřSX<N,/^\u001f\u001f\u000f~G\u001fO$\u0013P\u0015+1`\u0002+\u001b7ojblNxG\u001f~g?yK/>ăｶMhfWI5\u001adT\f\u000ec½ׯ˯櫯_?oۅsV\nZ4_6b1\u000eQIL>3p\u0007\u001f~g\u001b?O>^5 .\u000b0<%\u000e\r(ON[('YltskϜppի׮~^~\u0017߹phqy\u0015VFp\u001fJ\u000e+̈/6/]3/<.]O䧿~pKc\u000f>{vo~qTm\u00076\u001bu9\u0003|Ym\u001a`vcŵW~׀\u001e{\u0007\u001f~{g=/_7ȕ.\u000eʎkqYcVNb:3\u0015+Ū\u0011Lgw).}4;\u0005\u001e?t||Tn1XëRVC\u000e\u001cBi\u0018י\u0010٪AH!(7A\u0006D\u0004oX\u001e\u0019Skl&њ\b\u0003B98)l\u0004\"x&Ukw\u0016&\u0016}AjAuT),Dq\u0003ApQ&C\t`\u0007=+CѰ\u0014Gsrw\u0013@0TTө\u0014KyV\u000eeM\u00116ֲ2\rdF\u0016.6\\%$ bM&zU tF\foT\u000e+,C21qD 1$`$\u0017\u000f._[L%\"R)͵\u001av\u0014fc\u0010\u0001\u0015#\u0003\u001a˸'>B\u0004(o\u0017\u0013R$\u0015e\tڧ3Z$/r\u001eo4(TjSPV;#\u0011ǔ(\u0006+I\u000eY:E\u0005}24ӓL\u001a\u000bS{n.3y\u000fb43!\\@\u0015\u0011B>#aƐʛ\tIir.c\u000b\u0006C@0\u001cf)cq⌐\u0002y>\\Uo^`hqTy׀Ę\u0001$Tkq[ɈKEsٝ[r\u0003\u0016e\u0018\u000109fWHe\f)\u0011W#CN*\u001b\u00076\u0003Aa&Pv\u0019\u0007\u0015C$:lXh\u001c\u0016Ԉ`FL84\u001b\u001d\n+e@XU\t0Qė&ļ[H̘ڌ\u0001A\u0019#|I\u001f5:M\tk\u0003#z`]-PC,8ntq\u001eQ#r}\\o7;|no\u0006b2BE힄\u0001)o\u0011\u000f\u000fˏ\u000fj5\u0016\u000fBFxf蔅J\u000e(PR[AypT'Wd1NgY!S~\u000bFp\u000ek!P\u0011˱1x!ڄKj3=Q=5j`a\u0015\bg[sgpfdLC\u0003t6\u001bg\u0018\f,&Gp`\u001e\u001a>>j4;]cZQ!<\u001c\u000fT'ٽ'e&*P\fhiL.4W\u0011x@\u0005OefBQ\u0006\u0007uK\r*:)WJrbL\f*\u0011\u000bJFRMD\u000b\u000f-VKgSfwȠ~p\u0010Iv\f!\n\u001b׃\nP\ndf\\\u000f\fjLGmF\u000e\"[$\u001dn\u001f\u001b1\u001f\u001d\u001d\u001b\u001c\u0006dz-3Q;'\u0018k\u0007S\u0018Bٔ\u00110\u0010!\u000b\f%%\u0006U\u0012RVG\u0000c\u0012'eqbhyȨبNf$L\u0015l\u0012b\u0015RZ@<kc\u0013Ǎ'dAY<\u001dtJ\u0015XLH\u0007J\u001bJnTRZ,\u0010jRa[N-*KִgT\u000flPu\u001aLY[\n\fA)L\u0015aU\u000b\u0013>6nPY8X#쒅Ό<\u0003J\u001e鰯\u001fuB92n\u0004-\u001aS,\u000e\u001d۽\n\u0013%72\u0018\u001f!J\u000bA\u0003*\u0004Zɸ\u0016\u0013G5ߟp\f\u0007\u000bhCHwt\u000eq1\r\u0017GdǕ\fGA%zPW\u0003r+<A\u001d\u0014\nʬ\u0015#]&SZyPL\u0014fv\\8>?1f6\u0012\u0006FW%mLNC\u001d\"PWCH7Oy&w\u001cf\u001e\u001f3dGNLJl\u0011A9ͣ\n\niN2;C\u0003*\u001d\u0011A+tKM1ac\u0004\u0016\rOO\u0016FF\u001dMk`\u001bL\u001aspa+\u0017>0\u000f\\_M\u0001-8U.>jos\b\u001b|9ː;ԲxJL\u00019\u0002-ֿb%&gX\u0004u#c\u0001EF2슴\\fLQV\u0016;\u000bg0q\u0000\u001a1\u0001\u0019\u001a31_RX\\ZFN;%_tPaT;2\u001dR:{?O9\u0015OGfgDJuPܷ`3i&<9+Р>\u0004'\nV:6\u0007dV_5\u001aP\"cc\u001d\u00155XS\u0018br\u0003$l\u0000Ed\u0002u6!\u0015\"\u001cG.;AZ\fʥǾ\u001a3FE&WFEGun\u001c\u001cBƿ~xq9))\u001d|Iu\u001c4\u00118\u001e\bGcFr\u001a*kpDT\bVk\u000b:o(;fsU6\u001f#:\u0019:5s\u0007\u0011_v|f\n㒠\u0006#z\u0012%U<R;\u00053(3PZ8V\u001d\u001f6\fYr\u0004Ԙ\u000e\u0014\u001f\u001eK1Sn,q\\ubԪE\u0005]OLv\u000ehgP>O\\\u001c15j\u0003w-\u001fT\u0016/\u001cQۇ[vfXY7[//{@KMa\u0013v\r8歑ѹ\u0011\u000b\u000fr'd`(\u001cB'P:ax鏼}9gefOBOEm\u001c.\u0015Mte\\\u000e]e+\b!(\u001du\u000b93Dçq\u0016Wp?E{hD\u000f\u0005f\rfmdk\u00141}PQ֕re\u0014Nl\"D>R\u0006J\u001fT6\f1..XY9@رqӠj\u0002V\n49z&*>'P}]H\fk\u0015V}\u000eo\u0016\u0016\u000e)\u0016M1quX\u0001Ș;X\"I\u0017\u0013J(15,0-U\t\u0019\u001a3[0\u001f\u001a6~0\u001f\u001a6\u0010\u0013lx-\u0007r\n9s\u0002\u0002%0f2\u0016\"%che]g\u000f\tXa5\u000eGe%ra=\u0010ft3jb%XNBa䱱9XsI\fN5\u001e:<l9:\u001b8dF\u000f\u0018(\u000e\u0006rH\u000fi }K.>Ge'bՕnа\t6B':!\u001fQ\u0007^%+(bMKa0AGE\u0014F*J\u0006SW.=u\u0007\r΀Kp)olʟ9Ý#*\u0007\nU;7͓!CdBA!*n@QY77\u0013HյPc+:Z&*T}bo\u0017ZRccT\bD9\\ʌ\u001a\u000e-dL\fQ6\u0015i-1=$,Ww\u001d\u00155\"(&|pq\u0001SОLEWXcQAaA\u0015V/ɲѶ9\u0018\u0015hPO@K\u001a׻A\u0016\u0013M|F\t#z\u0006;\u0001֩@\u0010*2\t2\\O1*Ti崈WK(lQqM\u000f(\rh\u000f\u0007Մ9WqKu\\(ZY8ǰK\u001bA7\u0012\u001dXW,ɍ$N\u0006\u000e\u001e$׏+O[6\u001e\u0018`\fYd\u00067&k,.\t\u000eƗ\u0016H\u0003\u0012L@¡\u0011NFT\u0016\tX\\q8}\rU\u001cҸ͸\u00042a\u00052Ǝ7Y}V2D',@\u000eQ?&\fɨ\u000b%>хpzb\u0010\u0019R\u0018#'i V\u0016\u0015&6E:5_7'{sv6&&;d얌O\u0016n##*\u001c\u00196~X@\u0013\u0011qys\u0012\be'WoQ:\\KtwguygLX_k?Y<w[nc\f\u000f糄P\u0011K[\"rqH'ɕ\rwo;\u0017\u001a\u0017\u0018φ*ZP{33dp\u001a]!B(8͓\"Di~ً23d\u001c&\u00133`N{s@&\n\u001b\u0007D=\u001e*̘\u0005:,&:No\u0006j{XCX]A\u0006@\u0002jX\\;%\r\u00066\u0002<\u0015(*\u001dPK'\u0011]d\t%.1-z\u0006\"xhXl<s\u0014H\u0011\u0017|\u001e\nF2TzW\u0000~\u0007\u00149\u0003\u0015XBJ{Uq\u0003FĄP\t\u0013r\u0011=Υ\u001dL|Tc\u001fVZ\u0011w\u0000Kv|v\u0010x2Ln\u0013IVd b:L؃ro192Rz\u001a|\u0007\\cpxV\u0004ڹ\u001c)#\u0011\u001aQ;H!rh^ld\u0002\u001d/\u001b7ڠ!ڦ2zg\u0018'1\u0013kcm6łUg銵L\b5.*+7)̞9:fTZ(]A\u001e\n5`cXG(\u00157tXi\u0013bqQ[(\t=^yv!\u0007+t\u0013,.[ە}66Sl*$g\u001c\u0001\u0019+;|nv9.GD/=:e筞\u0015U`Û\u000b\u0015\tl$m\\\u0012\u0002Vܑݗ%c5>L6L׈jqjtb\u001f0QX;s@;1f$\u000bfwޟZ;4\u001cv\u0014(-ez'8Έ\u000e8w2{rH}\u000b\u000eoba2uzH9D\u0018nD: \\VRY\u0003\u0005`1Q13\u00193@ѣz'q\u0019ħBΰLإ\u0006_ޠK:*}n\u001066)sjRi\nv\u001eEeF N8X|\r$5;D\u0010\u00160$py&>ɥz6`\\N\u001b(A=2b\u0013\u0011g\u0003[0:\u0001#\bu A\u0018PK/\u000fJAQ_\u000e\r\u000f˭'-mǵ=\u0019N٬\u0015\u0019ׁGӣ\u001a\f \u0010X?XX\u0017\u0016*g,\u0013#\\*X3`#-tڈ3٨\u0018\u0000*HC#IpRB\u000e\u0013:dl\u0012\u000b\u0007\u0017rR\u001e(.\u001bں'5|.!և i\u001c\u0000\u000eoїYJMGp3\u0019R}Fr@\b\u0011K[|퉷\u0002Y\u0003\u00198\u001a\"\u0013k֖/ǳ3gBV\u0016{\\q-\u00019LlK(Tb=+q\u000biuL\rk\u0006u&\u0006x\u0015}w\u0000A$:\u0005X6VΜ)-OMnG\u001b\\f\u0016\u0015(\u001dz\u001fl\u001e\u0011ޓ*M̆Rc\u0015l\u000fk8iT\u0004<\u0012j[ك\u0015 Bt3oM]\u001a\u0004L\u001bmM~85q^nᎂ3!rI-1fQor)Hg\u0010\u0013\u0006\u0014T\u0004B+\u0015넚;sՍۍ~\u000e\rsm:\u001a3P\u0011\u0010O^;_JO\u001d@Z\b4'Aq\u0003\t<6n\u0013u\u0006`iT8\f#1Qx\u0010+\u0001\u000b+=f\u001a\t41\u000b\u000bnpK(Sӑ2\u001dRa#V7B}\u00064?\u000eW0Ki\u001d֐jD\u0002\u0001\u0007$$\u001b.i0\neƭM+ً+v&oEkZhR|G'&Q_)T^Mw\u0004P\n9>\u0005\u0007\u0013\u001d_a\fD\u001c\u001a5\u0002@\u000bdܒ¦fd\u0004S<.\u0015Ԙ\u0010KT/ZP}颍Odsg?OO\u0000e\u0005\u001bs{z~6\u0011ғA-R\t)0ҿn\u00049DH\u0003t\u0016ȘeL6A;\r.\u0019\u0018\u0011\u0005ʠ!T}~\r2X1Ac$4V0?39l 4\u000eb\u001cب3X\u001fOB&(\u001fLvME\u0003.!|gl޼;:wlwvg2Sg1\u0015:u\u0006f&\t\u0019\u001c\u001fr\u000ezB9j.YudxbX\u000b9mjɭ\u001bןؾUD'{\n,p\\\u001f\u0005s\u0017\u0003y@M=\u001e-=\u001e\u0013s\nDkPl%T]\u0003\nWak_1;\u0013ZT$Ś\u001e\u0015\f\u0007\u0013\u0013rLnb&\u00062?\u0006=fF_\u000f!`\u001c\b\u001ei+P/&P&Lt\b&-\t\t#C6W@\t\bCF@\u0002<\u0003hDaAL5>ʭC(Eꛉ\u0019\u00113\u001e+0N+7K\u000bףb ?{\b5N0:T{:;gig\u0016V珀\b&g\u0010\u0001p\bT\u0012\u0017wG4\u0000'F8RnjtXP9KJ\u00156HĖ;>$\"#fh\u0010\u001bn\u0004\u0003J\f\u000522\u000e\\W9\u0015f@I\u0000\u0014^w\u0011\u0001Ngg/\\%w4f\fZvkϦgC[H>٢\u001d\u0015\u001b3Gd![\u0007\u000eIs u\u0007v\u0005sk{?\u0017򐑵\u0019+GM\b[\tW}eC#\u0006xZ&ѳq\u0007BP\\Awjp\u0001Mũ\\g]HO\u001e[\u0002H\u0004\u0019HO_ֹ\u0012#zQ\u001c+|\u0003*UkE\u000b\u001a\u001b#_?<\"\u0015\u000bؔ_cr\u001c\tԀ\f=tL1&Nn F\u0019~0PZDPz\f\u0019)x\u000bTr\u0019\u0016W\u0011>4q\u0011̦w&'2\u0003)3P*\u0007b*4p7\fX`?q}pR\u000eC\"7\fVP\u001bk\u00101O<{x\u0010ko\tA?\u0012fܯ;!SbT_[\u001f\f\u0012cu0Q[neD\u0019lQ\tW(m+\u0016d\u000b3\u000f/{po[;N_\u0007>\ti-׺PeҝU+a\u0011\u0010wMaȕ!\u0011\u0015\u000e\rY\fB7Ԙ;TB\u0003e\u000b\u0015HPqteVoj\u000b~\rpnD1_ r\n\r`<8a\u0000M\u001f\u0001@b\u0004t{|n\u0007[\u0010Ą\u001ag1;%BM\u0007\u0002+0_}@h\u001d\b\u0019T#|\u001fǬ*D\u0010\u000bK\u001d`\u001bē28|B1nt\u001a\\PZ{w\u001e/\u001d7{w\rMXpq\u0011'~x4s+P؅\u0018Pd\u0015,\u001c\u001d\u001c90K\u0016Ӱ\u001c1Pf6OEgN\u0015GU6\u001d\u000e*&tDf\u001cJm'pFl\\g\u0017P;\\wG;Lz.\u0019g\u0011&E=\u000e \\)\u0014 \u001d1]'G\u0003\n;t}\u0003\u0002\u0016:r=P՛{\u0016\u001d@\u0017\u0000)Z2^\u000b\tV$\u001a%U\u0006\u0015&\u0012uK\u0006?\nVp\u0018QI\u0005=1iIY!x\u0005\u000fi\\r3@G\u0005Fׂ{P\fCtSۅHy1.\u001ff:;Re\u001d\u0003lNϊ5wtF\u0014t\t\u0005\u0007\u001a\u0012\r>< \u0002J& !L\u0017Cꯟm,\u001bnysvm\u001ewBsW$(Tus\u0007B%h;Z[=O1Spx\u000b#z]C1#\u0019&Fъ\fM\u0012H+q\u00018:\u0005aGie`ӭ-I\tȈaT㰑q=ѿ\u001d\u0012:b\u001dB&+t{\u000b\u0003=#J\u0001?10)\u0005W<.<\u0019_~u\u0000Aj\\b\u0003l,\u0012bmk2!Zw?&N(\u0010C\bH4QG*\u0007\u0001cx\u0001*T-|!]Q|\u000e>6&w5_a5ս \u0016WhSy }u!fL\u000f\t1C\u0002e\u0018\u000fgm\u0011lxPޮ\u000eCKMS\u0003Wb\n^\u0015fK,ɭL}%#&xCe#\r\u0018%$\u0014\u0004\u0016\u0013#\u0011\u001f7y+101sD\u001d\u001b5Gm\u001bHc\u001dڪ|qx1O,\\6[+\u0017:[ww7NS;/V\fT8^qF6\ne]:ʕ]RH\u0000u(@NkN\u001a\u001c!X=cZ$qlTK\u001c^x-3\rp\u0004t.)\u0016`aƙ/1M\u0005\u001a(\u001e7Pp%^\u001b\u0006u:RPsY \r6XʶF?fv7\u0011\u000bʥQ[c\u0017Vi\\km@7E=\u0007JSAY=D-.%z\u0007{}\r\u0017\f=\bWasƥ'W\u000e\"#V#@9\u0005$\u0002\u0012t\u0017\u0001·8 \u001cԨ=\u0004aJG\rj\u0019C\r/=f  DB=(\u0011(\tɭwA!Z4\u001e\u0012ʋ\\vқ\u0005Lf\b7@!Kj#\u0006JfjNAbU[y0D\u0006\u001fT;\u00065Ĩޭ4fCl{T\u0013U{\u0003Y\u0017@Hy8xx\u0019\u001cPrJp_\u0011aN_Zk'\fg'̈́:* \u0007̌\u001ai8Q\u001d1q@\u000e$|\u001c3PHV\u0017\u001e|g\u0019fLftRjm5OSb\u0016d`Je\u0011'tPZ2{P82l<<\u001d[G\u0003Loo7\u000f\u0019\b%9Cj\"K@aI*\u001a\u0004Bk5VW84z\u0013!x@0\u000f;\u0011q\u00198!\u0003t^\u0018`51`~\u001b$\u0005_Ovk겘`\u0013jib\u000b\u0002\u0019\u000fȐ\t\u0017FRx\u0000}(\u0010w``To@9SrrpyL\u000eo0Qܻ\u0005nVŝPi\r5\u0004\u001fkqť)@ú1=s\tD}=X=!\u0013|\rF׿\u001e}0!\u0016Ls\t#\u0019\u0012>k@\u0005\u0013\n\u001b¥|9\b}X旹\u001ceu\u0005\bn}\u0017ܾ̩\u0007P.y\u0012V:\u0002G'Uf\u001e\u0010V:\u0006H<s\rk]*\u0013\td9\\L[go\u0017N\b\u001e\u0007s,,E맅b:h\u0013^?Ѐ\b^\u001bX'\u0007\u001an[RsXK\u001a\u0002f0hAia\u0013\u000fQ#\u000bx\t\b)7\u0006U6⢵hm;u\u001dʣlKHt!;q\niP'\u0016J6!\u001dU!~\r\u001a08(#^=)3\u000f`\u0006M'\u0016'\u0005IOO\u000b.'&\u001b\u0006RHLj\u0002\u0014\u001d5ˋmTܗ\u0012\u0012SNW'NvXй\u0000d\u0006Рĸ=\u0005\u001cջ\u0006uLfb\u0002B'\u0013\"%&XZ:)Gm\u0010%dG\u0006Vh\u0000\u000f\u000b\u001e8)\r-\u001a\u0005qL\u001cW \u0013NO`N>21>:u剙\u001bmfW\u0016ӥ\u0012JEM\u0018F7\u001d\u0001=y\u0007D&\u001a#<!o0\u000f/G\u0010\u001c\u0014Ff@f\u001bT C\u001aLޗJaX\u0002h\u0011\u000f$\u001ah.\u001b2Q\u0013\u0019A\u001c^B\u0005kŋJ~bx1\\2\u00039e\u0006\u0017xǈfq\u000e6IKedm]\u0003g*3-\u0014\u0003S.\u001d|+;{\u001b0Y锅JBKsLj\u001acFJG\u0010[ti\nhcrF1IQ̗\u0013&+#*cgRaB\u0005(+\u000bWo=ų\u000b_}\f\\r:DXy\u0013\u00063-'\u0017\u0019ע\u0016\\\t\u001d9\u0001\u0017E3\u0002~fHf\b7K\u0007[`&\u0013|Y8#$VFҝ=\u0010\t=\"Ԕ=dw܃z\u001aQH0DC2`ҘeH.]nu/\u001f:\u001c\nб./V\nKu bLBElTĄ\u0018h#CJgq=>#T&fXi9>(;\u0013\u001b\\Pids\tʾ77\u001foRA>\u0016\u000f\u0004kbe`\u0001\u001a׸֭\u0007\u001c\nBN[\u0005tGe(%3iam`̌\u0002v:_?2#\u0007\u0014'\u00156C)8d'\u001aj'\u0007D&T\\љXy\u0007Cf4${|z\nR*\u0015xJ\u001b\u0005-\u001e86:9i\u0000$hFg\u0010sth.[;=BG6.-\u000bDts>\u0015nU\u001fyb\u00192\"Ć\n\u001a)3dpL\u001c4z2t@퀜'g4\u0017֯;k@Mǹ{k;kןS[lr\u000e@\u0019eW'\u0011:\r8\u00046A6\u0016\u0013]B& \u001b\u001c\u0018`C*\t SU\u0015PoD`D)\u0007x\u0017+N)GPY\u000e\u0014Ni\u0015dFVm!D(U5\u000f\u000f\u0016Ro|\u0012F|E7orGJw\u001bt\u0012B\u0016\u001b.\u000e/2X2\t3\u0014u\u0013ި\u0006\u0019Q!j\u000bkE0J8z/I+XD\u000ehS]>ό\fa3dʪ,MWjo\u001d\u001ap\rK0\u00040\u00045C\u000eH~F$G#iFFZI{j\u0012Nxq~?\u00197bVP\u0012u\u001dC(ۘ;e\u0016<\rN-\u001d_Θ\u0000O'\bBH\rT\u001a\u0007z+\u001c\u0005\u000642\tMZ1sB!VHz\u0003aO@ԅI/@t]tH'$\u001c\u0003\u0001]N\u001dw\u0012.Ji<R}\u0015o}l\u0002\u001cNvӇBvOB\\sT)3C.L\u0000H\u001c2c\u0000\u0010vKÇ\u0001\b'`)\u0013L6t\u0011m,z[R\u000b\u0002\u001a|֪X⣝dmb\n0,dQ77l 6Cu+\u001eqR!\u0007Ҩ{Ś1`\u0016\u000b+7\n\rJ+23n^|xNg/ohˌ)X\"0Lt];nK5\u0006{|\u0016mG\tgGP\u0019hA}\u000416<&\n\fvOe\"tt\\2(M`R\u0000\u0005]d\u0004DE@\u0001\u001c3d;+Y\u001c\u000b\u0000蝟\u0003'̰\u00159o\t6hJD,\f2W\u0001C'\u0001\u001c\u0006]A Mq #v|gШ\t\u0003\u0001}rͅI1K|U]<m>y4Z/BT͞M\u001e2\u0000\u001a\u0015CzS\u0007_Ͱ\u0013\u0005s\u0005 _&;vq\u000bi>>\u000bCg'/\u000efz$61!GNL\u0004\n\u00173ݓM;\u0002-\u001f#Jͥ\\E' .p\u001c\u0014ʽ\r\t3jI\u0006'7\b\u0018\\\u0001\u000bLs\u001b\u0019P/PI셛p\u0010R\u001b{'\u001b\u0016@\u0015?jJ{〗\u000bg/>Kw.iE,&$]&:elҨ\u00055=\u0010\u0005\u0006H\u0012\u00153&`r6jq*ky6\u0015U\t@\u0005`c.\b\\GFQ/|H\u001bcΝ\u001a91\u0017P\\Է\rӴdgW\u0002M\u0015>7ezL\rtۆf\u001fGl{\u001f\u000e/|\r\u000e\n`©a\u000b\u0001G]l^\u0014\u001aڰ\u0006\u0012T'\\~l\u001b<\td\u001c\u000e#>rp@3xq@pv$2\n\b\u001bǫd2ݾx3\u001f1/d\"\\pIP]:j%,䤝\u0012N_0r;'Ώ.hMv\u0011\u001cMOo\u00058e<?\u0000\u001cP\\gE#y1馬(ox/\u001b!\"%`kkE2G};\u0017h>_\u0001o#!A[\u0019}y}\u0019\u0015\u000fOC\u001e:\u0015XũR~|3R߈VWӝK:\u000f\u0016P>&N\f~H\u0017RL\u0005P\u001fT\u0004\f+VLwQ\u0005\u0013gƝ '}\u001d\u0000\u0005\u001fϵf\u000b5\u001bkٽ3ۏ*^(\rϾW}>\u001cl6WNbսX2\u0013\u001a<p\u000b\u0011;uj\f9=\f8#yl83sÓw4&aFF1l[{\u0015g0e4\u000fAT\f\u0016$]\u0019lg\u000fqä݄nDPaA\t\u0006!$5׵\"a;%:ڸS[8\u001eܸ\u0014_Wd\u001bK#v\u0006\u000e\u0016P\u0001\u0015\u000e\\Bi/]0'<\f&\u0016XRI\u001fy\u0012).,۝O\u000bRכFk_γOHK\u00052\\x\u0005\u0002u@7N\r{\t`gF\u001c,95qf\t@Ҋ\u0003\u000e!W\"yR.\u001c\u001eiJ\u001d̤Y9?\u00032\"\"q}nm㤸rOim?\u0010\u00122~\u0010\u0019*Y94<5݄2\u001e\u001f)/\u0018c\u0019\\\n̥3'ǯn\r\\qQ`0\u001c7Cr}0s\u0014-@|vE@#vl\u0002&A\r&\u0010έ\u0010JyI9I\u000f\u0015\u0001P3\u0001\u0003R*࿌^h5V[twR\r);\"V±ʁ\r\u0000E*KV6z\u0013*FͰ\u0013\nދ\u0016f\u001c\f(aVDI\u0000/|^\u0004X\u0004q)63+W[\u001f=Q}I*s{`\u001cX./>5X\u00178 ?}8^Y;3\u001f\u0002\u0015\u0016\u0013Aa-,{@4W[+=T\f\\\np$ڻb\u000b\fa$#&84r6\u001bZ\\tGmx@.ƚ\u000e1\t\u001f\u000b)\u001b&0J1V\u000fHRy'@\u000epfՓ\u0017_5\u0017=TL\\LN|0aʰ$\u001eMذujQ\u0011QV\u000f\u0015 G0#\u0001\u0012ww{ϗn|_顢Fod{K߮\\\u000bg\u000b\u0011_^\u000ff{+w.\u001c\u0001j\u0012ZZ\t@b\b<d93\u0010\u000b\u000f\u001b<\u0000\b7\u0019\u001c\u0016.\u0019)7=swB\u001b/dDDJqVYb\u001d\u001bV\u0006DM&1Ctb\u001e\u001b\u001e*iQ'c`\b\bθI0h\td\u0014 \u001d\u0001\u0014(妯T\u0016\u0003\u0017\u0007\u001f\u0017Ӆ6\u001eF\n;k^&\u0016XE\b\u0016H% E$\\<\u0018\nK@H,?GkV`r\u0007,\u0016X*\u001ay\u0002\u0011\u00008R\"BT_!\u001d:釜\u0004lJsE/op\u001e2.X;z\u001bl2+\u0014wj{\u0018m\\iv\u001f\u0000%@\"[wtCfA\u00147&\u001f׎+c\tw\b\u0015pvg\u0005M~Z )\u0000аpO\u00068ܻƵ\u001f\rO=۸}\u0007\u0011̗ 6MI7szoΌ`\u0003n\u0010|\u0001:-\u0016\u000f${Vjh\u0002\u0002uӎ-G\u0002̤]h\u0018^56=H(r>\u000f*\u000b'7^AGo=a^~}*҈/=\u000e%[#.\bP@Y\u001dpp¼WJ\u00067\t4\u0001Z}=ݭ*/\u001d1jw8?w\u0006E`Vs\u000e*\u0017\u0002+\u0019@0buƗ'`f\u0010=4`KTByK `Y?\u001dҚ\u000ekƣdgW\u0000}+PvZ\u000fN \th\u0015@SW\u001dXh\u0019P\nL\u00043lnG\u0014QZH\u0003gǼ&_\u0010\u001a\u001di!iF\nѺ\u0003~\u001b\u0007$w;/Z+7\\VK&w@\u001a@g\t\u001f\u0013W㥅p;jN]\b;\u0012\u0006\u0013PyhGHbQR&\u001cRޜpU/x\u0001.zc\u001e X\u0011u\tؓ3{Y\u000f\u001eNV\u0001[\u0019'\u0002\u0016КH\u0017hƣ\u0017W@nj%)\u0005tVrK kM\\S\n̥}\u0001͎/\u000f9&h\u0007?8;=d\u001f\u0004DZbr6\u001co#T ĔyОFX0Q_vsӻΦ\\aJݹ86x\u0019\"r)^)4\u0012\u001ay?\t\u001e1V\u001f\u000bF\r\u0005#D|s{S;\u000f{S?wߦ\u0006ͯ^׷\u001b'7iδ7|?\u0010\u001aP%/'\u001c3svyN~6cꘛ\u001fq\u0005Ǽ!\u001b\fD{Rrp;ҵ\\Y(\u001f\u0017Wv\u0007\u001a\u001ak>8z쑐#`n'.7\r8 j4Ta\u0006gp\bɘP\"\u0011;\u0004\u0019|{ew j\u0000*}*RtuV+3\u0019/؜N:`HyI\u0017;8F\u0013>J\u0007U\tbc i\u000e\\\u0005\u000bl2@\u0002\u0011N\"Hi>,5oZC\u001cvƝf\u0000x$\u001bk9P\u0006F\u0019ܡI\u0007=n-^ƄHzcznz̺Ԙb\u0018k\t\r3@OgXgF\u001f\u0019,=@F̸˟:}veĄ\u0010у\n\b\u0017\u0007WL\u0006;1bF\u0005\u001b\u0007&\u0018\u0016{\u0002T\\r\u0004ءRw)\u000e&\u0002RVմR\u001f\u00154\u0013h-GsJq9R\u0002gr p% \u0015OBF\u0018\u0002`/\u001b\u0014N@Ġ\u001cxHBn6ܬ\u001fN/\r\nendstream\rendobj\r19 0 obj\r<</Length 65536>>stream\r\n|\\t\u000eu\u001cy-s\"\u001f*sW\u001e-/\\n\u0001\u0001\u0010.RmR/F2wڹ\u0015W>\u0015특7z{oD+ˍϾɛT[.\u0001]Z߽\u001b?^+~\u000f¼gSZetoڇg~DR%0i\u0006ݴbtj.?{=Vh/\u0013B\u001aT Z\u0007f\u00127Q)j9.ZEJ{X\u001d̬8\fptGhMĤ@m5n\"\rH?U1!g\u0005_([YLZH\u001dVdЅƎf\u001f(\u001c\u001eё2*d@i@Z\u0019-\u0003ae\u001b,N\u00036PM\rԒ\u0019\r\u0010\u0014L҉^z\tW\u001ap01y)Q\u0006\u0017;d :FjP\u0004\nl/\u0019v(\u0010\u0013\u0001\\8\u0005\u0003\"<\u0019d 2\u00029lFMB\u0017,\u0001`\u001c.\u001ec\u0015\u0007\u0011Qc\u0005%Flr)@IXG>\u0012T\u0003FGr^Ze-.=\u000b\u0010\u001cJ^895\nI9\u0011\nqNܘE+\b'\u001cB9\u0017&\"l{k\u000eDk\u0019\u0015c|R_<s]U\u001dOyIV*Zc\r\u001f\u0013ՊJ@\u0004N,\u0017BO6\f>N,`[=̵xZ<y^_f|m7\u000fw\u000f>;KG\u000f[\u001f=\u000f6]^[]9nꪇ>-\u001d2\t\rYP(\u0015\u001arRw\u0015\u000e%\u0003ؽ\u001fJ\u0013,\u0016vw}`c6.߹Lw&H+|b-;ZnrI(7_K7F\f1WN|\\>>\u0000\u0016Q+Vs\u0016\bxs\u001dSJJ@\u001akmK1j\u000eILHka%/`g?4\u000f;\u001c[\u0007#.\u0016X\u0014\u001b8:*dP\"jIt0Y_0\u0000S8Sj\u0015\u00002aR\u0011DȄ\u0000,E\u0017\u001c̺\u0002\u0004\u0001\ty\u0003<l\u0001O\r\u00068\fqȄ*t\u001dT6In\u00181\u0003s\u0006$DHsjeC.j9 &T\u0010\u0013=h]F\u0005\u001d\u001f5y FJ\u0006\u0007~n~v~\b\u0003\u0016i\u001f@da\"\n\u001ahcr\u000eIy\t\"N\u0004\u0001\"R\u001cUPDh/d\u0010\u0005撬^\u0013PE.j\f)&\u0013\u000f{q\rh>i\u0012|\u000b'r5۴^dS\rO6kK{\u0000ͭ;/j7Hr\u001e5'9x$Vۼ\u0019.\u0000V\rm%\u001dR;\bA蠰u&TX\u000b͵Bz\f=wO˕\r}\u001f>H5\u0016x=.Lx\u0017L8\u0015Qj;k\u001f*y9V\u001fq\u001fo\u0004);'\u001bw>\\q(.}Gڊ\u001b49\u0000޳\u000f>);ތ\u0014\u0016N^\u0019qXI'\u001e^Xh,\bG}s4U:5O\\zqfߏ7r;'6\u0018sF?,7&bT?;\u000f\u0019͛^5{23\u0013!\t\u0006g\u000ew601Oj5D\u0001u\u0004\u0006\u0019!\\\n@\u0007\r\u000e\u0010ĘxG.v;\u001bwtω\tz~62q\u0017;l%\f.\u0006U<E\u0002!\r\u001acN:b\u0012N\u00184\u0014LjfzM6$\u0010èE\u001b\u0006HFY<!4\n\u000bP0T9\u0001dX\u0013,8\u00183,\u0010 \u0011Zȁnja\u001e<%d\u0011*j<\u0018UL\u001bb1G)\b\";P.|\u001eB(\u0011\u001e\tH~Rp\u0004\u001b 0\u001b\u0013\bD \u0010L \n\u0005d'X0gu\u0000vKUtm\u0011\n\rf\u0016W\u0012M)\nS\u0001!\u001a\fGy9\n\nℛh0.\u0019\u0010s~6%I.6&<K\\Y7nĚހ\u0016ojio@Wr});\u001a\u0005Re_ \u0006}\"\u0017\f\u0013rSP|F,J\ra\f\u001fI\u0015\u001axXY\u0013JkQ{CL\u000b3K\u0007\u001bw\u0001+\u0002SM\r~%ܸ\u0005\u001d\u0007T:y\u000f^Ԉgʌ5\u000f_Kr~1\u0018N/o=yō\u001eri`nn>\u0010\u001dhUNܘ\u0004D|\u0005_~j;Q[2:E:sʜ\u0017\u0012\u0011.\u0014Fm7jp؜PNG޺D\u000f:xw|\u001eFwm~붘\nh%!3g\u0016Ta\u0018\bFM\u000e$=\u0002\u0011:ƦB\u00162\u0000,\u0010\u0019c\u001c\u001dJfTr\u0010-\u0018\u001c3%GrS6\u0002Ф؈:0\u0004\b\b\f\u001c\u001fkbvvsbjځr<gr\u0007m`u/\"\u0001\n\u000eihH-Z\f\u0003\n\u000bY Kŭ0p|L2\u0018k\u000bz\u001d\"P0{\nx\u001eO\b\u001e\"D3}[1gLpEH`#*\u0016T\nhZ \u0006\u0014R΢8%y%\u0013\bFvZa\u00167\u0000\u0017t8G)p:`\u001c\f\u000e\n8^\u000b4\u0005\bxe(VA)m\u0010MR)訏\u0019H\u001dl8CI+|a\u0001^\u001d\u000bh?70 $\u0012)%}\u0010\u0003n@h\u001b̹\u0013W|d\u001f`fH˝\u001eu\u000fօŧsӇՕcu#\u0002D0\u0019'\u0002\f[Gɸ5>VYᣌ\u0018\bf\u000e\u0017d\u000b\u0017̐:<ۇL1HOa1me\u001b\u001c{\u0002*gf}1!T4\u0011pRv/B\u0005q@!&A(vA\\_?:z\r\u0017>ځ6_\tL/\n\u001e\u0015\u001e5BM\b¢\u001btf\u001fqp>Z|4\u001b)K>qz\u0007\re\u001dk^\u0005q\u001519ּ\\\r\rO86/)8\u0017yEۘ-%~6\"bV(\fXLJM!40*\u000e,\u0002T\u00061\u0010F;_\u001csY\u001c\u001d{~\r\f\u0001y\u001b\rLRNw\\r\u000e%4pH\u0016\u000f\t\u0010/Y@E\u0010`7\u00155/\u001a\u0010\u0007\u0003*\u001a6ACހ\"6\u001fa\u0018&\u0017uyxx=`\u0007\u000b\u001eh\u001d>8IiS\u0011\u000fyp\u0005\"5\u0017ǝ\u0017F,F\u000f\u0011ƝC\u0013\u001e'AB$ϫY:ta\u0000!+Îe1\u000bL\u0004\u0015n\u001b6z^`FiJ)\u0007I(4fEN¤scfω\u0006-\u0010TiJʹX5By\u000b\u00195\f\u000e\u0002@-PhHK4s&Фshzq\u0013\u0018\u0004BB4\bQ$H:\u0013K7\u001fN0LZP\u0003\u0012c!#lt\u0006\u001e\f%p΅&~\u001d1p;\u001ef̌dũX'A%\trf\u001b]\u0010\u000b\u0002\u000b\u0013>wpjg.\u001aǜ\u0015 |V\u001bhJv\u001f\tn@\u0002@\u0000.. D'VZ\bE6Dt~J\u0019u0\u000b\f$\u0003Kщ\fO&LN{\u0002\u0016w\u0000\u0004\u00180T \u0012^\u0016\u0014\u000eF\u0003A*\\\rx\u0006\u0017e\u0013F\u001brajv\u0011 \u0011\u00003r\u0006a\u0011\u0013tj4n7wx\u00192P\"Y\t\u000e\u001fc\u0017F.Ch\u0005\f\u0005g\u0014^y|\u0013\u00061\u0006D\u000b\u0016Llbp\u00024N\u001bFh9!ۘ\u0011$/\u0004T:\u0014\u0007EVwn)u\u0004$P\u0015i?\u0016vzI\u0010I\u0017M_~aĄ}!p</\u001da<\u0006\u001b6iEFй\u0011\u0007\bN7tԋHVg\u0000tR2s敱SCf\u001dI^ׂZnԆ\u001aݴ\u0013\u0013!&\u000e\u001e*>\n\fGHغ{;\tqꥡ3CF\b\u0011V\t\u0014JzkWM>kAL\t;#D\u0011`8\u001c>\u0011@!\u0006Ң\u001bPC1;DZݰ͉@XH\u0010\u0005No4\u0000!D6p#\u0013NՍ\u0014%5,^fM8)\u0007\u0013~F\u0003hv\u0004H\u0000>\u0013\fŃV^cX\u0014(\u0010R|V+1+(4\u001c\u001c}\u0007D4M\u0007fz^hM//|K\u000b#l\u0003\u00002\u0005.+)\u000f&i\u0012\u000b^\\\u0005îƪdꂁ\u0013E8/\u0012\u0010MZr4w䁩\u0011g\r.X \n=\b*uBa\u0003X]c#&%|*gq\u000er\u001b$(a\u000bcqY\u001cԹNB\u0010\fm\u0000F\b#YVʀvxh\u0010\u000fk\rO_~eƑ1\u0002cIШ}\b\u0001/1^r~\f%|tn2<ᙴ\u001c2~T2Z\u0003C#^\u001cdǰ}賹xR\u0013f\u000fBP(R\f+f6?\u0012RBM&Lv=n!&\u000b\r1Qyy|~nq\u0002J\u001e\u0000'L|jaAǝаg\u0010!\u0010(zR\u0013ԍ\u000fr\tqQ\u00133$E\"ϰyNו\u0000\u001aV\tE=\u0016LT\u0014 -\bN\u00032<\u0007NsB(3\u0002\u0017#\b)3b\u0016D/=c.\u0015L1UPRTK JrO\u001c\u0011w\u001a\u001e\u0013]\u00183XLH˖;͙9:\u0003\u0005\u00195y]\bJ wH0DiQ2T8\u0006c\u00136\txѠ\u000fcHFD\u000bbr)VI*H\u0011X4\"\tRd`(\">\u0014ḷRIL[\u0018\u0005T\u0011sx)\u0013wC\u0017\u0011ln⤜>\u000eB%X-6j5s\u001cWLErpݹ{J_\u000eK><hR!Xxx_\u001a>}d`@C\f\u0006ǅa\b!\u0004>\u0014b٠\r[\u0010S4\u001a~\u001fN0\u0004(-$e-nç^0b\u001f\u001a8rN;_:g;s1nBVhX\u001d^%vC\u0001\u0017B\u0001<?\n\u0013\u0011/L\u0019>\u001ftf#Š/`57]ʖhR(\u0017#;KŅf>2\u00119\"`vqHJ1\u001aDxLf\u000bZPX\r*2A\u0007\u0014fvrcݛG\u000bc\u000bv\u0007\u00070l\u0005\u001a\u0012i_=\u0017\u0013ռKP5/ONn/|ylN\u0000KAtty.\u0010d8+łڨ%jdS!\u00172vefaӷ\u0005MؼCc<\u0000\nPjǤ΍:N>뇼dx\"\u001d0\u0012t\\?(5[!U̫Ʉ\u001dBMnu*D^;\u0007CT*ŸExZ5ʉB_n\u001f<'.\u001d\u001fnt:e-z\\^\u00032\u0010\b&#\u0018\u000bC0\u001d:]Iԭiح\u001f>K\u000fY_.r,ù<\u0005\u000e\u001aF*\u001e\u0010~oB\ncRR\u0005ulWS\u000b3;\u001bW{xnPR#*M\u0013\u000e}hbv\u0010#\u0006蕋Q\u0003|䙳\u0013ã\u0016k\u0019\u0002|x#L*N'UEԄG:7\u0001\u0012d{\u001c6\u001av1x7K{\u000e?~;O߻o?<||Gu\b%'\u0016a\u001cq\u001auی͸s&\u000f_U\u000f\u000bVqeqr;O\u000fw\u000fodbah6\u0019]0\u001eDp>{Y6n?{қlpW_}oko>=yzkz-\u0016=>&`EP>T卩H;LrV|\u001d;Xh\u000f͏+S@Ǎ\u0006oس\\\u0019&$ʭh'&VӡnE\u0003>=[[{_}LNLO5v:'RpZMOan{[[6˯~\u0017w\u0017?>şϾϿ~OmaO\u001a>?\u0018\u0010\bZdM\u00137VS7?zٻWߺ??\u000f/Oo{zk2jb,\u0016\u000bP8\u0015\b\n)Gyh1ڵ\u0007/߿_\u001f\u000f_?_|W_}͓͈O\u001a=GF\u0007\u0006B\u000ec7\u0006\u0016\u0006N:?[̭w\u0017\u001f=xɥ]{দFl>\u0003$$@3-{7\u0017o{/?\u000f\u0000:^e#2\u0017 YQ\u0012\u0018\u001aĽy\u0019N×ZѬx;_|v|\u001f]O_?t$HR$0!\u0006\u0005DHLI|/A>ZS<̼s\\ⵅ;?￼Ͽx?=\u0007;?pן+k\\J<ra\u0007lY2\u001f~x\u0016?ym?{7_=\u0017\u001f>o\u000fV\u0004.\u001am\u001e\u0007I\u000eeWIw;k[kG\u0007\u001f-|Χϗ٭\u000f_O叟7˭k9\u0010>i-T\u00068x7[}yGoo}>_Ջo>9/y]~V(\u0001\u001a\u0019>54\u001a倭\u00194^ŝ_?kW||v\u0017Žp%+A\u0018y\u0002\u0004\u0007a5Wt3Iu\u0013^~V˷v~Ow_ovo_>Ïo~j̓R6.]\u0004\b\u0013a8!Rr\u001a^nƲr??,||\u000fs/_o>}ܻ\"\u001b\b\u0003b\b.kL\u000fwʟ>]\u001f\\~_ׯ{[^)B\u0000EP\u000f̰b2$%\u0005A\u0017i2\u0016Mezk[\u001f?z}\u000f~?[\u001bb!W\b)O\u0002D\u0002,6(j\"\u001dD9\u001b\u001d}{*z8\u001b}~W\u001e~WT-g\u001a|\u0012X\u000f\t.+\u0000\u0015!*\u0010\t\u001eB6J>Y{;~?_~zW7OW\u0007;_<,l;Y\u000eڍ6\u001f/\u0017\u0016˩|\u0000ɇ\\Gӡ'{gW\u0007{Ǐ;\u001f?[qa\baR|x8s4\u0004Z\u001eE1Fzz9mXͿ{n;=]^b*K\u0014D\f\n\f8`\b'v\tUTlr|N+^;j*ۍfS*\\\u0007q\nx@01VHqH:H*|BfKNaW\u0017~?>:vG)'\\G\u000f\u0000'\u0018iy\tm\u0002\u0018ⶋ3+\"sV?~x>͛\u000fl\f^3;!C.{@\"Uz\"8[RvG\u000fV?~Z\t\u0019-1졕D;]Y-\u0018\fGZ\u001cԕ\u001f6?|B\u0001w\u001d$UE^\u0003\u001f!N|\u001a\u000bDU\u0014\u0000\u000b\u0011XB\u00132Q~Eߙ)\u001c,//׺V.LǫqM\u0015\u0019\u0014\u0003@\u0018]Ą\u0017\tY,Nwx\"PK\u0016ZKK|\u000f\u001e-㟼w_<Y\u0017W\u001b3D.;NV_\b\nDb\u0013^\u000fJq]#\u001d\u0015շV.OiGs/^[\u000fΗo_y|?X-QAi1\r@(R$D%D\"1\t>\tʹVK8K^[lreLKA5\u0018d\b\n\u0002\u0006;9lώ&\u00003E1?$$1\u00193hNW<D3*'\u001e\u001e(,5\u0001\u0013x\u0003?\u001bɴ@\u00024Z\u0011\u000b`2L{y%4\u000b_Y(,䃗3\u001b|^\\(HLx*fD2:lt}<\u001dp/O\r6g \u0010Wq׌\\pZv{ݭz\u0006\b\u001cC\fKu`*\n\u001c\u0018\u001e\u0018HZ\u0002EqeS19\u0005*+\u0002\u001087b\u000f\u00196?O\b)\u001f1#\u0018-8%\u000b>Cf\u0002Yb+$\u0004\bٜM]Ĩ\u0005\u00196!N\"\u001a.ʅ%KR\u001a!%\b|#A\\6\u000brO\u000ek\u0000@\u000eŅ\u001e\u001csv\"+\u0001̆0!\r\r\u001bGM~\u0004L\u0013(QE'Z|gԌld/5T=\u0019&C\u0013&K\u0017-Cfǀ!K\u0015\u0017&I\u0010\u0002\u0003e*\u001eco:t\u001c!\u001e\bو\u0003S2f(l\u001d${4I݅Kw}\u001059D$%bB*]ѵ4\u0015V\t{^t\u000e\u001b1+\u0019;Q\b&,f;\u0011o\f\u0001gn0.\u0018$\u0017f\fF\t\u0018(=XOH\u0016w\rw\u001a\r6aB\u000e)EJBH\u0010iley=\u0017\u0002{q?\u001cP~\b\u00199QO%_|w;/^\u001cxAW\u00051>/L\u0013 \u000f\u0006\b\u000b\u000b\u0000`ZkPEN0^R\u0019\u001a)y\u001fQ\tEa̘cN!\u001aa=T($\u0011J\u0017q2`Q|\u001b\t1q;3l\u0006%t\\(ٌ\u001dQllDۆۣNzɍ8w ʨP*pqQ\u0002R9qMFQHH%R.r&W\t>FH9G f%+\u00126eW #\u0006\u000fD\u0005V))\\\u001d!V\u000f*9?Bc$ǉ:'\fI\u001b%RnrU'\u001c㯌^\u001eX\u0017!զˎX\u0011ˠ'?LF\u0000\\0ˈl\u0017\u0010m`y2¦\u001dXĎiF(tjdځJ\u0001\u0015Vad\u00147hCD>\u0015a#jt2>*B9Rٰ+Xa\u0010`d&̰9czyv\u0003JI/\u0018X\nE\u0001|!\u0013K˱f0ݷI\u000f\u000b\u0016ʦW\u0007c])\u0016Epj\u00129=\u0001|EC\t\u001f4R^gc=?3䰸\t\u001bݳ\u0013JP)1=#$s\u0006t܊!\f\u00018?옴nLf<F&y,\u001bs0\u0013\u0005M'̼'FB饣ԶAb&q9O`]DFRLd@\u001cکkՕW,\u0001\u0002P~\u000b\\\u0002\u0013e\n1;9$vx\u001fW\u00024k\tfDa\n\u0014Ѷ\u000eU\u0017\u0015\rzy\u0005\u0017s\\\u000b9,ҒkF(ژ\u001cc\u0005\ty\u0016\u0015ና˺Y\u0016ؖ\u001d'\u001d`A\rސ?IzC9\u001b\u0006R\u001d\u001a^r\u0015<*&\fb#&8 \u001c\u0015\n\u0006<t}l.JXb*8pi\u0005\\#XU\u001b\brD\u001c5\u001b,?hb~\u001e\u0001ѺC]4Af_ІG0\f\b\u000f\u0006'\tq9T,1zgZQ\u0011H=BU6g\rI?\u000enYH/\u0015n\t\u0015(e7\u0015u\u0010\u001aH\u00110\tv&VX.sW&a\u000b\t\u0007s7a\u0007\u001e1_\u0007&\u0016xȄy\u0014\u0017S\u0016Dh'<\"$VQ*\u0015;?y\u0001\u0006\u001ahv\u000e\\7zE+\"}!7\u0019@@ಱ\u000e\u001d&b=<pWF~\u0001Kp|IjN6n\u00077\u00031h\u001ei\f&dtw\u0012\t\r\t\u0017u\u0019\u0015pĜ/4\u0018\u0006Qvwp\u0000\u0001\u0017\n*\u000fZ\t\u001d\u001c\u00004lbx4\\b\u0013]W򚘝3ӛQ\u000b^q^}Ayּ\u001eRrUMtZ뷌XA@hQpy;޽\u001a\\\r\u001c`)\u0011\tfA|z\u000bS\u0013L.1\u0006TKa|\u0000M[ i\u0006YC .e8\u001br2cn\\e3V<%̬Vm\u0001Ng`\u0005\u0006S\u0001j[\u0003QO(v/\u00168ߋvɦ|'ԱH\u000f\u0016@Ĭ^Ut\nE+,\u0001\u000bh\u001d!\u0014.K\u000e\u001b\u0001m\n\u000b7w\u0018$fT\u000b>6s\u0004\u0003\u0011T\u000e\u0016KIH\u0018l\u001ari\u0004]\\Ir\u0011\t#f\u0017\u001d ,y;\u001e\u0007\u0002>My@\u001dt\u001bѮ#XA^H\u0000)bmFXqg\u0010\u001dнN~\tĄ\u0003jM#byJN:\u0019\\\u0000i`\u0019\b\u001d[@i\u000b\u001dn5 \b.6\u0006K\u00056ճ3:*1A TkRlo8\u0014´\u000b\u00022\re\rؙ| \\\u000e\rH\u0018\f/w\\b긹,;wJ%\u000f\u0013U#\u0011\u0000v\u0002z\"\u0019˵]yY5/~Dhu\u0010\\%\"Mg^!%gK'Qu29r 3N\u0012\u000bh(9s=c=;Hu|kniZ~B%N&vZ\u0007\u0001#\u0003M./.<n\u000bm7r\u0011ۨV=k%'\\A+\u001c\u001d_sryNZ\u0016\nklf&zGۃ>d \u0010\u0001b\u0002\u001ei3\u001eIx-\u0014m|lA\\1юR%3HtW\fpǧ]L\u0011Egr}3\u0016Ӌ\u000fL|ք_@P 7Qq\u0017|\u0016YqHƴv=(9{NNBR\\\u00024N\"\u000e:a\tAhPzy\u00112{\u0005PbPp\u0007uJ\u000f{\u0004Xi\u0015q!\t\r̈bk64b'\u0006H5q&1'\u0015&$c.&-\u0014]TC'|\u001c\u0002xJq_\n\u000et\u0006\bpa\u0003Z\u0005*P)\u0015\u0012L/Cuȥ|a(zCiH(bZ\u0007\u001e\u0006\u0006<;}5\u0001\u001dL\u00056,\u0002i&3Kj\u0003:\u0006U\fS\u0007\u0013&'Z÷Lv7\u0001\u001fnh-\u0000i\u000f[\u0018\u0003:5\ns\u001bOb=Lkr5=媓M\u0013h0]#]!\u0014LϜ1z=iI.XȔ+X&#{[ρuXvoTW\u001dTGB٫\u000f>WL~\u0019*W\u001e|O\u001b;Č-\u0010gƃ׿b\u000b6\u0016HQpu?3{Zu\u0000\u0005SHqnA\u00181\u0015[|ij\\\u001f\u0011Jfʺ\tVMBh@|\u0006Q@\"1\u0017ZmmB#MBkx<&\u0014z\u001b\u000bI&\"\u0013=Hy\u0005\u0007Dj{\u0000?k&=\u0012\u000bJe=ڼ4\u0006\u001cR3٣Q\u0007}րBથVH\u0000Սy\u000b-ۻ9^\u001a`\u0003{\u0016L\u0007oZ3\u000em]{;2\u0011Q|rFDmD\fԦPv59usvZYڸc<L^NO\u001fH\u0015<\\U\u000b(%ڠ\b\n҄MF\u001a;\u0010ss)P^w;5[\u001e JYz[\u000fRl,Y9||ܱ\u0015;۹\u001dZo*U\u0015kl5Vn\u001e&\u0017{Fm&\u0006qsN&\u000e/ֹ\"\u001aRZԪ\fX#5\u0003֧G &d_(4w^UW|rs\u0012P6Ƹ\feTA\u000e80FDs7c\u001e&Iju\\-\"z\u0013QPnYpَ\"\u0015\"B\u0012+reE)-k\rb'4BhpܼX$S9D;l7\r&TbM̀\u0002\u0001\u0014\u0017*Hqҵ{ߛ>|^\\\u0013\u001cr.\u0000ŭ;?6\tQz85sj\u000b$v7f\u000f\\\nqDﰼ|R\\]ΟE\u001b\u0007r\u0016T\u000eg\u0002+\u0001\u0015\u00018sF҆  |;o\u001a1;Dz@iZkž<d\u0003\u0010䔏؜/X\u0001Ҧ3}_Q\u0010\tV,\u0002\\Ib9*\u001b PQ\u000b΀LhuvzRSD8\u00070ۿ:aFFZe'ݻ\u0019ii\u001dL*Hy\tD\b\u000ev&\u0001G,饍\u00036=dV^--?\t)Ԝ/P1\u0015\u000f\u001f|T[\u0010\\ˏmj4T\u000e-\u0010\u00036Zoy!dz(U&bSWgٹG\u001b~\u0014*-\u0013EHRRi7޹M\\lx<{<XH=B+Ua\u000bTc{zjyG!m&T\f(mi@6i].j\r\u0014k]\u0012\u0001@.[p\rKʺZWR\u0001\u001d\u0002ql~\u000fx\n0W\rv+pa9\u0000\u0007\u000fc)\u0003ԾMF|j:Z^X}<zhQ;\n+\u0005z\u0007W\u001a+{\\\u000b\u000eV\"5>c3\u001dk\u0017\u001d@dǔ\\jcԷ\u0016<\u0019{(_Y\u0017.)\u0000ÆU+2\u000eY\u0012.l~\u00140\u0014LjRM.\u00038\u0005E\u001fI:\u0002q3\u001c\u00073\u0006^Bh`\u0002\u0012]8\\\"Χ33JyPk0`D|\t/0 Dj u\u0007cs\\{TJH0//\u0001\\x5տFjvR\u001cx9`i4J\"2МZK\\P\u0010IJ<#gAv2\u0011Nk\u0019.ּh\u0011\u0000b%\u0015\u000b)v((䖥<p\u000bkGoM=\u000f旄\nTER=\b\u0014ͦcݫ֑XVdr\u0019DјS\u0013\u000f\u0013^7\u0019pzc7_\nglm\u001bx$\u001a1\u00131Pc哩+g\u0016O\u0000.nzcՕ,þ\u000f4\u001frv҆/ޛ*LWwW鞙ݞݙ.\u0016䂄@\u00012\u0010AΫYR\u0014W\u0014I@\u0012DމΊxqϽLċw\nbSh_s|fxg_M=*77pu\u0011Uڞ(a\u0003˿_4On\r.x4jZG,<\u0007'_[\u0013\u0013nK!Z.;1ʺsћ/\u0015N-phMlb|\u0001\u001e3Eვ:x\u001e\tW`Ag'o\u0014d\u0015\u000b׍\u0017j\u001e\u0016\b҇9܅,C<\u0015|pZ?,_Vl#\u00156k\u0018`V[\u0007PwU1\u0006#\u000f+/Տ%\u0010K[],\t\\_66\u000b|\u0007z{+yX\u0016`\u001a_Ĉv.\u001d\u001ap^\u0006;R\u001f~1<\u001f/_+u9\u0003ҝċO\ts@[\u0003y7\u000f\u001b_9Op4cC2/\u0001`h\u0005sZ\\n\u001e\u00159KmLΞX\\b~M[\u001a\u0011Rx0<b|KH73g{5\u0019 >x{P8\u0006\u000bGU:\f\u0019vOG/\nQ:V3|iue?Y~韢j\u0007\u0006/5e\u0015\u0018Wo^G\u001e-O\u001fg\"oQs\u001a6N˪wξ/)t_\u0007]Cs\u0015?|Xq\u0007\u0017Nۿx?\u0005f\bo!VFn3ޚ4F|}\rOqk\u0019\"m%×&O?(~u{ΙI\u0010U?8~kޞn\u0017t\u00026es\u000e\u001faLg$Cm\u0015Ų2bM}9}\t)9\u0003kp\u0005.\tV\u0015\u001bV\u0017bVB|X_~\u001eބ\u0017`xþ#~@Sҙ\u0001\u001b=L9 \t\u0017-K֛\u0012z4{?n\u001d%;og:0{R4'W\u0005Ť\u0016ivZb}鍠6VE>\"Qo:h*p _`\u0001\u00077Zs\rXm\u001bp\u001bwV?}M\u0010VP֛\\ג{-fh\u001eOǯ\u001e\"F\tIk\u0000j\rNֺ<~.a(nt΋\u000fP@Y`|yoڿ4jGË`rSi%:+kܞ,\u001e*ų˯A\"\u0002\u001fQF\u000fS;`u7oZ`\tk \u001b\u0000#U)X;W_1f\u0007\u000bl\u0002\u001dk2\b\u0005`>t&w/wןn\u001ewKbޙ\u00130k`\fɳ7)4n[p%g0\u0016t/hk\u0002WaBN\u001fڠ@x\b\u001f\u0017h\u001f7zn\u001f4G\\m2Ko_/\u0011^@LI@iO2B5iO\u0019{\u0012L\u000e\b/䤿`U\u000bj\\\\]m?L\u0014r0\u0002I-Hk[\u0003sL8\n?Ar\u0018ox7{nou|\u000f.p\u000f\u001aݔ\u0018(<:\u0017|x҆\n\u001d\u001e\u0017kz\u0001W5\u0006F\u0006VrWU\u0001\u0013\u001c~\u000e2^DUsJ.ǧv։;\u0007j-jSF<d1\tlnEŴ!$;쑨Տ^\u001f>\u001a\u000b\\\u0005<Uh\u001aMޑ?iՌi\u0001Wo>\u0007\u0017\u0019BGҺ%&ݥ޹&yrEP~\u000bNy+\u0000\\1ۧ˛\u001f7z϶*z`2hT۠.Q4\u0001$icz\u001d\\jJ&Z$\u0018?W\u000051l-n;\u0007oa7\u00198ɲuB.[R=\bWx\"h!\u001a'g._Jv[&{gy*\u0000\bl(ZSٙneLe89<(֋fwVq-\bÄfoGٳ\t1*\u0017\u0011e\u0013\u0014\n׸=hCH?)\\UY'=oLk~P3%#-hJ\f;vx=x\n\u001b\u000ex)WުiMh\u0001_}/~omU\bF뷘\u0007(F\u001e`7y՗b\bY!@\b\u0001\u001csAHNoyYgL#H*!\\+\b\u0016k\"qT\u000fTؚYUX\u0017W[+uÞdkY\\\u0003\u0003jCܙՌ\u0001l+6)(4nSc_C[\u0004s\"Wy&GENY3տmM\u0011\u0016Ԛ\u0007\u0014wj\tqs&Ϛw[%V;ã79,^\u000b%%\u0013ioVĵ\u0017\u001d\"U\u0001]\ff<\u0018\\dQyt\u0012*3L'\u001aU>|\u000fj3޼\u00077lreN/]X%;\u001b*vr`<\u0004)*Ӧt\u000foMNy.ǳ\u0003\\\u000e\u000f\u0018c_䳈ڜ>\u001d\u001cG<nv^\u0006\u0015E\\7o{MHGM%^$\u0012jr4z]PJ@Opл\u0017Z)߾acʝU\b :\u0015g\u00103o޻*K~T\bPѭ\u0005w5\u000eA{oFW?a\u0006;ϟ?;yٛ߄;6\\>ʞ>u hZmZTZ@~lv]Mj.؃7@n\u0001aQY}xELH5NͯF\u0018\u0013DnP\u0016\u001c܂9 'xpk\u001c\u000fp\u0000S{\u0005ʫIu\u0012/z\u0017\f~\u0019D\u0019X\u001b2\u0019^íS>:;h^}׌3I.p_ԟ\fgR5\u0006f\\\f\u000e`cvoմ'Y3˦q&5PA(\u001d%\\\u0018i\u0011ܼϮKoOwѾӘ8C\u0004ş\u0019Fg?y{[`0\u0018\u001fqg\u0000E\u0005\u0000\u0004&Q;)DI.N\u000bt\u0004\f8A_Yz=Fu\u0015+\u0007c >X4|V5SI2Dj\"\r)T\u0003%>~I\u001672\u0015v?ǦK\ng\u0003eN8uw \u0002AV\u0010:dp4N3Q`\buRΐvF\u001dJ\revJ8_yRx\u000e|F_q\nU(ų]荹\\_\u0018_|wݿ|Ƕ0c`46\n\u0014fp͋7jxyAY\u001ek\u0013\u001aBɍS~|\rp[\f6[R0K:hT*08|np;~Mn\u0010\u0005ȆC}Y߼\u000f`g:F<>y\u00173b\u0003{ćbpvm5cQ\u000b`mw+.\u0007+q]_|Z=\u0019ų >ɭѹ 1P~U\u00142U\u0001\u001c\u0018\u0017u\u0006O\u0005w7N@\u0003\u0014(\u0018=Uu\u001ePE;s\u001b.߶63\u00102xi=Y:DTa\u0003\u0010\u0015\u0018\u001fGSG73\u0010f\u0006t46Ks9\r0]\u0015{\u0015e,\u001a\u0003[:pczI1\\%\u0017~/n{\u0015o (֟ \u001eWٸLz\u0019)q[R=J\u001c\n5nJ')H8\b\u0013F+>'p.\u0019]\u0006$:\u0018\u001fg}Y\u0012\u0015؇\tϏ Y*YJgg_Տb(|9bԀڜ7G)8)q\n\u001a5꒒Z\u001dV\u001bF`\u0018эԿ\u0002#evia鳧/<z{s7Y+\u0014aJ\u001f=3;Wa\u001byQ\u0011\u00156`wRU{RF\u0016c\r2e\u000eDw1*BRr_׏\u0006a\t<(rڹ\u0018^p'gߊ\u0012<`q^=/r\u0018\u000f>y\u0017_\u0004\u001a\u001fDݣn/X7O9yҁ6ǒ=ev&x{Vښ\u0002\u001aVɉ\u0016+\b\u001fV_*3~D,a>\n\u000eh7@\u0013?kn>&bo\u00102$U\u0005%Z-l6g\u0019'Tl\b޼DO\n|\u0010ܖ5,\u0011\u0016t\u0005\\P<Ѐ\u0017U2\tWiEh\u001a\b*\u000f\tgp$4b\u0013EwiTYO(=\u0004\u0014Tr\u0007\u0016j\u0004\u0002\t4\u0013~b2\u0006|\u0005\b\u00069\u0006h+9\\S}t}317;fsnVZT|\u0012:6F} O\u0019\rƝ^\u0010^i=r\u0016c}Lm\u0000%\u000e\f3A\u0016ep\u0011T;8s&/`bK\tFqfIAg_Ϥ\u0005c\u000eRUL\r\u0011\u0002):\u0013^\n8{b4`t\u000e\u0006p\u0000\u0011\"!a8\u001bJ\u001a6G\u001a9L:{ck\u00035\u0006%(=ƙƳ'nsjxMwJoJr\u0013>nn*He+.YoFͭ<S榷yYaLr\u0019@67?qf0Fo_U\u0006mO73|O\u0011\u0010\u001cGzR\n\\S\u0019p/8\u0006֭p\u0016FXEԡ3+\u0010v3\u00149VC\u000e?nYB_o!{9oN\u0002\u001d\b\u0010\u0003]\u0017ȐzR:\b\u0013jFִ>L؟T\u001fhF\u001bZ\u0005\b\u001f\u0010E\"\u0017HP\u001d6\u0016w\u0006_kP9T\u001b\u0010pko-nt7X@'\u0010Zu{VW[~f\ft\u000f\u001d\u001dcw/\nEj\r9^fZ%07\u000f\u000f_\u000eF2e\u0000T)/{g߳\u001a]08-\"\u001f\u0017:^t\u000f޷\u000e\u0005y\u0003\u001blP\u0015\u001a5\u0013N~\u001d;?\tWUjA-TJPK\u00121ktxQz1\u001dԋ9`\u0003~M?;|\u0017ce\u0006@IvVws\\|ܕ;ʞ.qI&UwK\"\bs4\\g\u0019*FXel\u001bh&\f\u0013J73\u0006\u0014,\u0011\u0001\"-^\u001c x*\u0005\u001c#p>nQ]c=RU=LEߚƓxR0s e\"RHUD4J\u001fc}˝>!؃\u00197w'\u0019.KlY:l\u001e0%l\u0006Go-l\u0007-)2ؾuwEz5I6\u0002\u000f5|Z\u0013bb\\mfOkR'%\\Juϣs.<\u001d\u001d\"R\u0003P\u001d\\'\u000b櫾&\u001co޵ܺ=!J`Ki\u001e`!{0JJfZ\u001fh?sj\nGo2^\u0019([Rx4/YoM#\u0005&ܯ>i\u0010j\u000bE&Wx@Ѽc9>S>c\u000ekr'Mz3g\u0003}\u0005\u000e\"2Sf x\u000fK\u001a]&<#;K<#,nT\u0010F_\u000f\u0019\rݼ\r/Ɔ`\u0018g\f,D{5\u0004z\b\u0019W;E>\u0015n7ziL\u0000H-\u0019d\u0011!Z\b+\u00115\u0018\"(\fjJ\u0017\u001cGR54'Z뢱\n4Cl\u001d\u001cW$2bL\u0011ܲ%/,ffq\u001bQ0%!\"&Qj\u001f8\u0015&̢&$\u0010Q9F\u001e\u0011KNS.<#L헥tY$&(EkK&/\u001e|\u0002&X\u0013~\fs/YgUf\u0013\u0005\u001amɟzs&\u0017?2\u0014Bk+y 39\u001a!Rϫi9\u0002I#E\u000bf[RTZ'\u0014mwwe>\u0007&zbʤvU\u001d\u00024%W\u001a]i=\u0003\u0000F\u001e'>dR>U{O*AΌpR\u001fhQș4j!BGk1h+gJ9KL\u001de G6\u0010ê\u0007%&Os|Qf\bG(\u001fb`\u000eAhk~\u00184i6@\u0010\u0018*5e0{㏞?PXk>\"W\u000e,\u0007qQ\u001a\u0015L\u0005ޯo\u0001޹\u0002_ݝ\u0002'Lq\\\u001f-\u001cW\u001bN&O*pX\u0015R\u00148zWi\u0005i$\u0019U!\r\u0002\u001ecz,+j0l\u001e\r\u0016W_\u00167R?ɑnYN8^QOw<u\t\u0007EJ\u001b\u0003Ȯ'i*-ׅ^ŝ\"H@\u0010p(ָy<i?KP\u001d]ƚϝ\u001aNݿ;譂N\u0018CP&ERr\u001ec]RiAV h\\\u001dhBg \t;Q[.\u000b\u0002\u0018\u0015)1\u0016p\u0004w@\u0011U@\u001dE\u0017hLEn!K˘#\u0010M\u0011\u0007C\"cjq3\u001aIw\u0006聊\u001e8!5Kw'ǧrW\u0005cstv`Z\\~jvnY\u0000\f(jt&ye\u0011ҧÊ2&ս;Weah}s f\blf\u001c,\u000fIBz? \n*Q\u0016W\b\u0015$4\u0000eS53Kc})=F\u0003\u0019[\tz%= i4퍞j:SҞtfE\u0005Ƈ\u0011\u0000>g\"(\u0013\u0000\u0002m\u0004ָ\bR\b\u00171v5;%Ck{c;j#!\u0002\u001e \u000ed\u0015VA+)@aE\u0006fs\u0018.>pqS\u0015m;'\u0012\u0013KR֘\u0010oTUN!\u001a2\u001abH\u0006UƏ 6矀H(\u000b\"\u0017Uv\u001fW䝊',K9ZJ\u0000*yL\u0018+ZuF/i{\u0013\u0018d\b,]\u0012KL\b\u0012k'BB\n0F;[w*r\u00063 C\u0010pR+\u0000Gc[T\u0007P\u0018{l\u000fn\u0019mOP\r0\bU\u0006@\u0001h*HSpRdCVq\u0006KPP\u0014\u0019D\u0000\u0019\u000fDIG=\u0001N\u0010\\\u001bjxgCZZ\u000b0\u000bV\u000f{jJ\u0019\u001a=\u0006'^`'\u0015Ȇ9\u0001] L\u0002]/ۻi)\u00012\u0018^2@Y̑S\\k_]\u001e\"\u0003:\u0001(gZ\f\u000fM8y3\u0004g\u000fl}&7QcL+ҝZr\u000e>+\u00015E\u0003\u0000&-\u00183gj\u001a\u0004i$\u001a\u001b@f\u0001I?6ɧ_(I\u001a%\b,f߄|۫O\nrUݧ\u0005\u0001G`U)\u0005'=pf* z\u0001w\tm5:d!ȭ4fH\u0002?EӈQ\u0013T\u0015o+T+\u0016k+b\u000fH{\u00017ܞe\u0010R%y;ڞ\nwz\nGU>ƕ\u0006c\u000fxk\u000fA\u0014\u0016\"R\u0007\be \u0001_\u0000|\"8>k]u\u0019P\u0003\"*5)&\r@k1\u001fLIs֟\u0004m\rf1\u001d\u0006fG! \u0012.\u0018]]\u0010g\u00001\u001820\u0002R\u0019]y(\u0013J !\u0018\b\u000f8݇[ll\u000eʙuFZ*5K\u001c<\u0015S]\u0003G\u0000!\u0000c\tt\u0013(FLȍ42\u0000ݹ)~U\u0002\u0019\u000fNwuMi9\u001f^CQTy\u001fTA\nճ\t93<{xJg\u0012KBg\u001c\u0003UFULCY3p\u0007\u000b{5}$ԸRy\u0006\u001dCT\u001fSJ^f\u000fN'\u001f0!O1e(\u0005EL$$\r`2~a^\u001c/~?Wl\tKS\u0010Ji1>m,/1'Ee\u0019T\u000fR\u0004W%u*b4gvo8>tcJ&\u0005\u0017\tBO)x|,(,\u0015\u0002+~%\u0003\u0005\u0007M\u0005H\u000e^\u0019k\u0000:\u001fxIOn\b-2*\u0017Jc/L9o\u000f\u00007#&+Gd6\"'\u0004gN\u0012\nJΘ7{\u0005RUX,%>jm@iDchvVtBi3~ojJ34YA85\u000f:Gn\u0000Tjc\u0002\tқ<75\u00037*JEe)X\u000573%>\u001fw\txt$wGt\u0003?\u000e\u000b\u001f>5AE\u0012\\vM\nY6uzɇqg|[7ɺ\u001b9L<&\u0011\u000eh_ M(\u0016\u001d\nT\\\u001aQAU!\u0001Kl.g.0\f\rJ\u001d\u0012r;YZ46˴iS(\r!!E嫿^|.3\u001ez+\u0007bϚ7Z|D\u001a#`y/)h:\u001f~7_omk`Ĵ>\rxY\u0011\u001a@\n7|$ApQ'\u0003d*v(k\f\u0002yc)pe>y8CI\u001bC蕸\u0000/.7aw\n0G\u0007ϐ\u0016H#B\u001d撱W 0\u0000CA*m@*6Mx\u0016\u0018ʭ%*ɧ\u0015\u0015.,su\\\u0005p,\u0005\u001b\u0005fPj\u0013\u0010\u0011\u0018,{\u0016ο\u0015i'K\to6N\u0013FpL\u0016c_\u0016X7U\u0013`NZGwl\r\u00130\tDVR\u001ab+O\n&\u0010!i_\b\u000b{lx}c\u0012WĵLU%-HsmrJJ!\u000ekH\u001a_h\u000b>\"p\u000f.\rYo_H\rh\n\u001bva\u001a>ޮV\u0018O3/r]Eݲ\b(ǀ2p\u0011\u0010ڜ/{\u0015iΓ\u001cM)9P\u001fڜXOt +~\b\u000eQQ.5e;cZ\",c\f\tۺ[Qw*:p!\u001bu\u000eX\u0004|\rZN\\\u001b\u0013ٛ0R=(e\u0003\r:M85\u001dn9ʓ;|L^\n틚1͂Ũ&\u0006\u0014\u0000\u0004\u0003_?g#[F\u0000/C6V&H?\\q\u0000*m\u0002\t`æC\u0011&\u001eH2d&(?j]\u0012Sp2\u0017br\u00040009%_?D%]0Ԁ޸.\\n\u001a[T@BPP7|!G%\u001eDsW`Xx{]ǳ`\u0016Fy6\u0002*\u0002i59\\ݟs\"Y)\u001fs_\u0006\u0004\u0007f\u001eE6z҈\b1Lr\u0006/߂CܜؓQ\u0006Q\b\tfx6X~JyU\u0011iTX\u0015+1`g\f%Z\u000eh\u001fo\u001fG.\b]Ei$I\u0002c\"1#B)9f$Bbb\u0014S\u0014)\u0004o\u0015->sᓒ\u0003Ɛr*MNQ*ʣ\fWfB<!&2\u0015\u0010r3\u001f\u001014\u0000Sq՞?sǟ2ゾ*H+bMd\u000f\u0013?ټ!Z<EMs Dq\u0002\f\u001a^g+R\u0017U8@:.V\u0015\\n'w_\u0013ߧ\to\f>B)1\u0011[En׌\u0010A+0\u001d ɠ|v*\u001a%*w\u0002\u001ale\n5}\u0010%\u0007]\u000f@*ӽ\u0004B)qM\u0012A6,=\u0019Wy\u001feqWh[v\u0017f늲|t\b\nd\u001b\f\nj\u0014o`&6D\u001cnhsPey}\\Q\u000fR0;\u0007N\u001fӯg`C\\\u0014\u001d*\u000f\u0019{J3RLtM\u0007͗\u0017)/\u0001\u0004\u0012Z=e>m8'\u0015&Tx\"C,E\"\u0014A\u0013\u0010=ifn\u0015<n!\\=\u0003P@\u0019Bb9(G\u0019\u0015H)Qp㏟5\u0016\u0005o\t%J[\u001b}\u001e\u000e\u000f6\u0003\"G\u0019J\u001f\"`NY\t8K.2b\u001f4U<H\u0007ˑ^Y}Q6w\u0010KG_Lo~G/Dw\u0001$\u0000\u0000\u0005<\u0007.H6d\u0002.Y<w)ԃ#g\t\u001fI6\r΍;yt\u0010/\u000f\u00012>\u0003\u0000\u0006&\u000e1̇\u0017zW\u001c\f<?3\u0002פּ\u00009Nx\u0007Xgl.XO߯Cy[3@Nd\u0010I{.Rv\u0006ӀkѾ\"_Ⓑ\u0007)\u0017\u0001\fK|\b6ϥ\u0018\"9A\u0012R?B>-.<\u00115c\u0018;}w\u0016^8gEU\u0019\u0016:mYj0bttl֌A\u0005-@fr)jM\u0011\u0010H\\oK\u0001)\f:&\u00012OY\u000b0UQa\u0002=1;gJ&\nT# 9j\f|zDps\\f;e4\u0005ďh6d:\u0003c!\f(N\u0017I\u0001\u0016Jm\u001cR놱g\u00054AM\u00103+^\u000eH\u000fImEG\u0000#Z:\u0000버[U@.\b\u001blwГע[qD\u001b#RR\u001c\r\u000e_I\u001b\u00105eM8,\u001bVl\u0018C\u001095\u0013\u00155\"t\f/U\u0011kZ\u00173FU]\u0010#̞8׽߻/\bs\f\u0005\u0005^f뢱|/6o0c\u001aܕ&\"FIyg\u000e|\n\bZu&PҸ\t6405(\u001cv6\u001b[>\u001cF\u0017\u0000Ǟ3Th!4\u0001>kf\u000es\n\u0007Ku\u0004\u0010\u0006$9ҕ5\u000bl\b\fU?Һל,\u001eFDEDCأUWF\u000efɝ<\u0002;\u0005.(\t=0:j\u001dpz\u0010c[ܚBA\u0015:\u001c>8h?zYLϣfm@rB\u0012\"֡Xv+\"wƺ\u0007\"\u0010\fN~\u00000!>&SU\u0006\u0019\fI&_\u001f\u0013Z\u0018\u001eA|\u0010ƠjVM\u001bOg\u001dȒGYQ\u0001\u0000EâЬ\u001ev\u0016j\u0002Ҟ\u0006\u0000O,\u0010\r*X\u0002X\u001c\u0004O\u0002VLX<\\4\u0000\u0011\u001a6LU'!CZ9J8\u0000\u0002ފނ65^ \u001c{(\u001da:Zw\u000b3甹4W (B&\fo\u001c\u000e\bxcjz\u000f'L\u0018wY_$\"7wEE.*%\u00174Q\r3s~\u0005Gp*\u001fP\u001a`i\\O̙ܱ\u0004{5\r6*%73\rr\u001eq94\n\u0004\u0005}e\r\u000b|y&\u001aɗpq|\u0006k\u0000\u0002\\#Ql:n9nO\u0014Dh\b/F\u0016<0'஦j\u0006yw\u001fTk)\u0000<dwh\u0018w\u0014mUy9\u00005 sFhxn2\"\nKp|)ݻIQ\u001fTğm\u0015rA[c\u000bkYI:pQƠ@t I@Ig <β\b\"9]\t͇S\u001a}\u0003x\\`k \u0012i{\\ࣂ%]E8/ʌW]{6ѫFa\u0016\u001fߐ\u0003\u00008}k]V-ʬ5\u000bG/f?|\u0007I\u001cZ\u000f`8\u000e5`V\u0006@*&@\u0017W_F\u0019\u001bF6Mpc\u0001S\u0015z〱9\\NÎc\u001e$\ti\u000e׿*\u001d\u0018Ԍ^\u0003)l\u0003\u001c$]f\u000fF\u0016\u0011 j\\(\u0013y(4\u001dm~E+7z';\u00155ɗ\"o'}TNr\u0014ح\u0002[\"\u0019bu0\u001f\u0017\u0012\u0013IA!ɧߵ~\u0010\u0019\u001a\u0016P&~\n1~rz\\\u0011j?n\u001e|b\u0019yg\u0018\u001dU.fb&kMQM*\t}ڃei\u000f#|\u0001ͲX/\tM\f#nb\u0010br\u000f\u0014gA,yӚ$ܼfom\n\u000bnIaV*\u0017\bD\u0018;9f;#|]\t\u000f\u0010nܰG w\n\"WV׼wH\u0019dMYctRPcF\u0017Ms\u000b><?IV`엔Cݚ)D'w8\u0004N\u0007m\u0000\u0002qIC\\4W_7?2\u0001D\u0013HG)&\u0005Nڰzפ\u0010??n\u001f}vn/dLW!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6\u001e\u0002o!6&!/dWB^OӟK\u00166{?qYV\u000f\u0007g[tr_[x9=[`}p\nwev<6U+\u0002Vز\u0014Q:/ΪUXAjKx2n\u0007Ų~}ypH\u0016u2]/m2fR!蒜XqSD\u0011%\u0014R\u0012U1\u0012+fw$?~Vu?IqT#\b\u0004GU\f%\b\u001a\u0011DB0rQ\u0004\u0001T\b\u0002'\to\u001dx\u0014$wR\n\u0015\u0004\u001eEaӪ5JU?\u0015\u0005'?B[V\u0006~1R[LX\u0018wV'8\u0016\u001f9\u0016nu`V)?砒E&\u0019-_\\m5d+/!Wgӓb[p\u0016ٟV$+:OiӟIRٲCVm\u0005<\u0013)JvLUJ\u0004;\u000e\u0002#)玿}~w\"J~B~\b\u0003(\u0007Kop\u0006\"`!H?)˧\u0007el[\u001d>]\u0000\u0013\t\u0018t&[H\n'\u0007=#տyֿ/UV\u000fF'V`\u001f\u00148C9 \u0000qOjR3O9E6w\t]\u0013[e\u0013Ҟaj\u000fi/KƞG9QI\u0018DjRL✡\u0012pI9sƄ\u000eWfT\u0001S1θc!:`C[֨(i)\u000eBsWJ|psR\u0015:@^\t\u001d\u0018Hi\u001eVEN\u001a\r|\u00065*lĻ3}΅+\u001afi\"%FQ3kkUN\u000b5O\u000b/\u001d\u001b\u001e\" Cޯ)\"\u001bc~E*Qfs\t\u0004\fe)?φ5\u000b\u0013C6e\fPSNVk^V~vk>jiW\n3\u0012F\u0016\u0019c93\\p7%c׻W\u0001\rRUIN_C\u0014F5ui.aW:\rPE*\u001c!\nX']\u001c׋tZG9v,헥*aB\u001aV\u001aQʔS`>Nc;\u00151\u001c.7KL\u0019\u000b+Na~U)%:ĔAM\u0011ꈶf5nM,:cϥ\u0001M3K\u0004\b54QP{JyhM\u0018<\tE59.5doBD$]i\u00005f9G~ҩ^gQ*DB1O)\u001b>r<lSϢm\u000f\\\u00073\u001c\u0005.%`<ig\t3K$\u001diR\u000bT\u001aE_wI\u001ci%MNr\u000f6E}z|uY\u000erzs{-ig\t\u000fח\u001e/4n\nQ|o^c\u0002f%\u000e+Y\n\u001b?A\u000b\u001bUvBXjW^QhVonUi?IJz#g\t'Ki4i'\u0010\u00187\u001biDˣV\u0001HU\u001et.\u0019v/yQJ!Z\u0011H*\r+|5׼J\"\b\u0003e\u001eoT\nJ\\Q\u0014\nIC]\ndTEɥ?گm*ʀІ5.~c`\u001ae&-\u0002+#]Ғe2mX\u0002_a\"qa\u0015e٫o?zU>tzGؓ4f~(0Oz\\\u001d\u0004`STI9?F\b)ܪزwz\u0019*5\u0010KU\u000f\u0016)\t\u0002B\u0018\u001e+֞([t'JP\u0019C_Y(\u0017r!tؼi\u0003R\u0012U0O[%n*C\u0001!Rĵ1eT\u0015ژ4\u0007Hc\u001a,p~Yj*_ěE)Ԧ\u0010.xkԚ*;x]\u0017٤gT(\u001b._W!j.\r\u0018%́nUݭjU1~2^Yu=%ݼ)K#D\bˊީJ\\p흊I^Hc\u0016l\u000e7\n\u00030\u0005?Ǭw\"B\u0001wD{J냭<\u0007I\u0005?[9IvU\u0001i)s)\u0005w#<\\$\u0012zm\bhvo\u0011Q\u0006*r\u00008\u0001\u0003(i\u0000\b==4U\u0011ˤJ˓aqe\u0019c\nFkWs\u0010\u0005q\u0010.(3,A*\u001bS\u0010\u001e]J\u001dP7VvFz\u0004\u0012\b'v\u000b\\,4k\u001a : r$IӼX'w\u0000\u000eUA&\ry\u0016eSQ=h\u0006ک郊An4\u000eK֚k>^bF|(0r;\u0017|8߮{Za\u001bɽ\bHafs@YY2\"\u0019\u001dP&Q\rE}ڙV\u001dB\\Q[gjv'b8ݡ5|><e|(\u0014a0\u001d\u0002D}Tv\u0011U6}4I\u0007`\u0006`\t\u0013G튜JG\u0005:@&D\n\u001b%_ǤV/@\t\u00146glpW3NYC\u000et?pW\u001a3dM̭,E\f\u0002_J[Vӈ\u00010>[t@\u001a\u0014׬TJ\bR<\u0007i&\u001dkEl\u001cP\u001d =I<RO!2$vt!\u001f\nS\u0015&|+^Qd(1,#\u0014,@_\bHkDkşAJ}ܫ\u0019̪J==Q\u0017b\u0012\t\u0016\u0002(>PЈל*˽$.6GȀτ6\u0000dC$+Bg\u0000D\u000etI{!F'j|@\u0019\ns]}L&@\u000fh\u0003(._\u0018?.\u0005\u0006\u000e>d)\u0005\u001c\u0000\u0000鷿˻_\u00165=Hs\u001b=#̤3\tXb7|tG\u0017xk\u001dZi\t*M\u0005@\u00192\b-[rWf|uC}v\"MT*3wҝvxcć'Rgj@\u0015_{5\u00139\u000f\u0012Ral%\u0003p\u0002*4?ʠ{\u0015\b/\u0012:{U#G%):\u000b\u001e~\\`wJjj\u00101eB\u000b2\u0010\u0014\u0005l^ӻ%.j&>*t\fj\u0002\u001cn\u0001'\u0005qjWtH\u0002epk??.?ɳ{e5S\u0003\u001a ]6$H2QAd\u001e$-n\b}\\PѠa\r88K\u0014ĝC\u001aTA\u0002ie~_$M\u0003m%i\t\u001e饫\u001a0Qo@R\u0002R\u0005W5\u001e4v$K~Wch\">*2[7e\b4\u0003`;\beC>\u0007qEˡ:0;g>)\nv)y3М.5^r\b8(c\u000e9_\u0019\u000b\u0010yܖ52\u000e$u_V_~OLa\u0003\f3CT\u001f~\u0003 \u0011.p\u0018\u001e\"\u0019\u000b\n?i1w0|9|,\u0015Ք>cM8wNC!\u000by\u001a\tԤE־v/pN}qY\u0002\tB5\u000bP쀨ɀ\u0000y:w+rrD\fp\u001e\u0003\u00112\u0000a\u0003\u001b[\u0016vK|jl\u0011ӻe\u0011\u0002I\u0005xo&my\u0011\u0001[\u0016I%vl*p\u0013\u0015\u001c\u0001u@)}֘\u0016\u00100@>b@\u0001ݲ\\ ]\u0014jl\u0017)<;{%q*\u0019(c\n7Ht\u0016Y҅9cJ\u001f\u0006\u0019<&6\t\u0015e\u001fP$s\u000bk$\n'i\u001c I\u000eP\b9d1\u000b\u0007\u0013;@Ob)\u0001{DjdXnR\u0015\u0005r\u0015&pqv\u001f\u0017y&6NO,!Є`3|\u001d.\u0010CRisZkx\u0001\u0003\u0018pTo\u001c\u001b.X\u0010\tg'}\u000eڸR\u001bBx&/jZ\u001f\u0000;:E\u0018Q_5ןwNj|I30[}aت}uaYc\u0015Lu&I\u0017S\u0003Ô<3O[/@gvU\u0019U@E(mR\u001f&$W5\u0007\t\u000bK#U[\u00078rF7%U\u0005\u0007Ndd\b\u001b\u0002蘽U\u0010(e4Rs\u00037!R\u000fP'E߆;\u0011D~k @ᣐT(o4K?DX \u001bG\u0016(<\u000b2\u001e\u000f5&\u0005k洯hc\u0014p\u001f#B\u001b[ZK\u0003\"\u0003i\u0016>_x\fW8U53E\u0016\u001aIl\u0004>\u0002eL\u0005%*4Gب%a\u000evKb\u0016`(CV\u0000-JE\u00074{c|S\n\"`\f/Tfb\u0000\u0007\u0010u\b\u0013h<RR4mc\u001c\u0001nEX\"m?Π8_I:\u0016\b\u0005s3ƙU&P<1OK\r\u001eQcXcP˂'4Wк\r(^\u001a/r}/M\u0018i\u00110\u0015\u0005e)wV%;G_+3W9i\u0003.XKs.:a\u0003,BvAiqbƬfAoF)kM0ˠu\u0001H\\K\n\u0010A5\u001eFET\u001ex^pRphu!\u0002\u0017\u0000nwOJvE\u0005b\u001e\u001f\u0014\f3$l\u0007\u001c\u001fU`e-]VJ\u000b8\u0011\u0015\u0007:B^R\fȘG9\f\u0014A#t$B\u0017e,L\u0000k\u0000\u0001kN\u001bC0#i`6\u0018\u0007R\u001b0I6nW3re\u0006p5.1\u00132\u0015r0j?.m白2 \u001e(&@0\u0000ΒwW9\u0001\u000e\u0005͜C\u0001U\u0015^\u0002@q8.\u0005\"(QQ%Ig\">1`1\"[\n\f,a;\u000e;g\u0007=3]15!Z{%H&S\u0012(Sǩ4\n\u000674V\u0007Vk\u001f\u0003Lr\u0017;Iɰuv\u00119\u001cfuZ\u000bV \\|\fzǨ:К\u0017z댶S\u0015BT\u0016\f#\u0000\u0007\u0007\u0019`eQƉ:OIkf_z/I\u001bJm(I}Ҥݕؼ\u001a7\fd~p\u0000-\u001e\n\u0002[J\u001a\u0000]bBvR\niRD=\u0015P\u001dUK\"ɹ36X(Q\u0005ꃵNUh^?\u0001\u0017WM\u0004]\u001a\u001bB=\u0000D1\u001d4]ҮWf\u0000\u001eeDxNwq$A򀝇zvJ\u0007g+~Ⱄ\u000epq-\tEbNfnE{\u0013@h!l=(P..6`Qk\u001b\u0012\"gj\u001a\u000e8[\u001fgݪm-?JS[y~£,WV(UI(RMЦ.+\u0000'\u00054=$OB:m\u000e\u001cRmt~qi\u0017\u00017(3_\u0015gt0\u0000]DXM\\n\u001a;M\u001eSLeQFU\\(\u001dD\f\u0010i\u0005\u0010Ҕ\u0001\u000bFiTCHk\u001e!N9j\u000ejjE\" 3yY\u0016\u0005]\u0016^g\u001fmn1SbTJ%fZ!{c\u0018ה)N\u001cANI\u001c~ݽsJ>\u0007J\u001eMyePI6e\u0017]l\u0006|\u001a\u0012Oz1\u001b?l!A98u\u0006\u001688喆Ը@dȬ\u000bd\\|\u0002\u001a)ذ\u0011\u001b= \u0016BU{JC@bf<q\u0001\u0000PJ;\f@\u0013C\u0006\u0015Z\u0011(\u0007\u000f,g\u0013F-^\u0003\u001a\u0004=һz70fb`kSn*5e\u0001\u000b5\u0003\u00145\u000e\u000e =\u0010\u0002&a# ^( \t\u000fk/KC-t@\\!#\u0000 \u001cz\\x\u0016'̤ūݲ\u0011\t[Q\u0005\u0017v2:igY\b\u0005һG\u00053a8\u0003c÷\u001b\u00118\bVO<j\u000fY\f(Dc\u0016\u001ap!@<d#\tӔ\t.l\u0002+\u0002ZD[JiWl\u0017ջ\u001cQ\u0015@\u0001\u001eFw\rZ\u0011\u000f\u001e$Dcť\u000ej#&|\u0004\n\t|\u0001\fTkw\fY\u0013V҂`Dg\u0001ZX\u0012M뫗PyBO9\u0005Ȁ\u000e2MPeB\r\\\u0013\u001a$\b%\u0014td\u0016E5}Nv2霴rx!\u0001\u0014P\u0016\r_\u0005\u001b\fF\u0002=8s\" MPR\u0017f:vNʘ\u0001h&TP7I%P\n\t\u00171\t\u001dH@_p\u001b\u0004\u000bĎC\u0018\f\u001e\u000e<\u0013fx+\u0017\u0003-8 \u0006\u0001\u0011\u001d81ц%}B\u001d\u0016i`\b:nmzh\t:\u0002\u0005\u0006I\fhHJ&\u0001hl\f-`Ht[\"\u0003\u0005!\u0018\u0012NE!.Av\u001b|8'\u0016\u0015\u001f@\u0013\u0016j d\bE\u000bKv2vH\u0006v*\u0018'T`G91/\u001fG\u0006\u0001#1\u000b\u0003>?=f't\u001e'0f\u001dz\u000e\u00112U!'Õ)͸A\u001fri\u0007\u0019\u0002e[\u0002=\u0016\n\u001c&FNRE,P\u0001\u0007\b\baaXXM\u0007\u0016ipN&\t$o\u0006\b=q\u0016\\K\u0004\u0000\t7A1N*\tN-X엕]x9\u00011\u001f@\n\u0019He8f\u0007NIǥT\u001ff\u0006_\u0012\nɫG>7\t^wp\n}B\u001a\u0011\u000e]52y'K5\u0010Q\u00180/tNҞrs\u001e`!'\u0003^{\u0005+\u0015PP3Wy\u0003\u00136\u000b\u001aԦ\rWƭ\u0011=vLJ+oQ\u00061y\u0003\u00067oF\u0011\u0003Xp~/tH0\u0004[7bF SvS\u001aݵ;\u0013\u000e[G\u001e\u0013\rրC\u00124cO\u0013\u0016\u0005_\u0007>j!BR\u001by\u0000\t&w\u0010\u0017L\u0016\u0012\u0014\u0013x\u0006\u0019\u0007\u0005qI(RI\\(\u0013l\u0010z\u001e\u00064j\u0010&\u0004\rrB\u000b\u0018|\u001f7'Ը\u0011\bi\u0011\u0014\r\u0017R\u0003.\u001aT><\u001c5`0#[c\u0016M$H\n\\4'\u001a+eǳN*\u0003,\r\u0019\"Z\u000b5\u0001u5EL\b@\u0016)?\u000e-y`=d\u0000m\u00058\u001a\u0001J\u001c\u000f\u0000<\nl-\u0005\rl 9\u001bV*aDe`a9\u001f\u0006Py?T\u0010fL6q\t\u0007ps\u0019\u001b\tbdu'\u0019\u0016\u000e\u0013<-昍K:\r#ڙ\u0016F\u0000JFۡҺP3f&=\u0002\u000b\u000e¸\u001aQv&\rFN<RDf\u001c\\M:h7sqnSvI\u0017\u00008n\u000eiMZhV\u0018\u00172B\u0019Lw\u0004\u000bA8\u000eilcf\u001c\u0002\u000f6\u0011\n:$\u0004I\u001cϸ\u00157Bp||^*m\u0007\u000b\u001a\n\u000e;q\u000ek:\u000f\u0014+h\u0017M\u001cG&]\u0010\u0000\u0010\u001aC\".Dǖ,drQ UP)\u0007\f;\\ˬ\u0002\u000f@э^yL\u001c\u0004]а\u0018kOX\u0016\u0011\u000e\u0011'\u0007N\u0000lk<!\u001b\u0011n\u0003Q-jv\u0005~\u000fuԣcFXV\u0007MG\u000e\u0001@l\u000eiQxMr\f6>T=34;8a\u001byt\u0005\"Ed\u001f_\u0013F`\u000b&\u0001aw\u0000\u0004CSQ#>28\n3b̂W:\t3=n\u0000h.zH8DQК`\u001e!\u0000\b\\m\fsPyͮXJ\u0000uh=\u0002`\u0018l-\u000f\u0010֣\n\u0010vr\u001a7a(\u0015.Df21d&lf\u000f2_zoB$4::$\\\"\u0016<\u0010m`IalG܃Sܨ*nlu\b&{+\u0016<&\"j\u001dpW\u0003\u0019꜃f4`l\u001a\u0017\u0003#TPm%ӆN1-\fN 9ɬG\u001dO@j,ؘ\u0001܋\b\u0013\u0004?\t+cR-Z+9<oD\u000ei&JxA\u0017^UUT\u001ea\u000bz7\u000f:\u0002k\u0005V\u001cb/m\u001b#H\u0012\u0006kq\u0007\u000enʈk.|\u001bչ\u0001`\b\b+\u0016)\u0017\u0016!Uƍ&L\u0018\u001a2\u00036(P\u0003\u000e\u0010#,HxH k\u0003\u0013n&\u0016vk\u00024Q>\u000bg\u0004Q>'\u001c\u0000!S6Pt@?8:4\u001aopӨ\r,OX\u0019(\u0011\u001fsavSv .|DkHL\u0018Y\u00102\b\u001e:Of\u0002\u0003@蔔0yp\u001d^(6آ;Pzt>lN?t390&\u0012!Ӂ\u0004g\u001bPAvljD$ J#&l)uL]0\u0019(L\f\\\u0004((\u001a,\u0006k\r=\u001a\u001eF4\u0002\t\u0011 OPD{FTz\"\u001an.;ɌB/,\u001a\u001dcF_B\u000e\u001a|\u001a3c6\"\fq@#\rzq+8\u001dR\u000e5\u000ev\u0003V<\t\u0010鸕\u001f6\u0012VvФ\r\u001f\u00035St\u001c\u0005r\u001f\u0018s\u0000!\u0001\u000e\u0007&\u001dA`bd3^6o\u000fܐOlPmX$`Cgg.\u000e!CSCc1\u001dЃ( j\u0001luN\t̆\u0011G\u0007g\u000f@@\u000e,itm^\u0015\u000fxP3\u00020:b_G:x\u001dLpbcf\u000e\u0019&<V,iB\u0015\u0013Sl\u0014lg\u0001\u0010K\u0007*&Oqǁ1\u001b\u0000Uk\u0017,HOټ\np\u0014\u0004\nPƃ)\u000bCEz#F\u001c'42l\fa\u0019\u00031\u001d|k:\u00126z#CF\u0002\u0001D\u0000\u0004:A'-+\u0013΄\u00038茓\u001a Cz{.6qF4G\u0006\nh\"L\u000e\u0017@y1 T\\B\u000fB\u001b2b-\u0015/<bGب\u0019\u0007eD.bKFZ\u0014z]\u0019y@#Tংf\u0014JΌ\u0004[E+GŪHI\u0018gAFDrzRk\u000e\t\f!#$q\u000f-O6\u00197\u0015\u001fiGLQiU,ֹE\u000f\r\u0010M\u001e#`ٯ\u0006\u0018\u0007H'\b?nc`̐Q&e\n6J\b\u000f7{BF\u001fDq\u0013A\fL9\u0002\u0016^E\u0019=f4f%'muDcvx$\u001f\u0010|m\u001c\f4\u001axt>\u0004*\u0003\nu\u0019A7vY\u000b\u0017X\u001a2\u001d\u0018\u000f\u0006\u0011\u0018\u0010\bO\t#BU&\u001br\u0006F-\u0019r\u0000\u0003P\u0007ZnlAR\u0019\u0010-\u000f;&!\fN)+k\u0019\\\f\u0019AY;*[Q\u0019\ntĀA~e\u00192jc#0l+\u000bfFj\rȑ)d@\f4\u001a\u0012\u0013,\u001f\u000f\u0004+\u001f\"\u0007 G\u0018!3>\u001c\u0018*q`VD\u0017\u0010\u0016&D0y\u001b\u001e\u00066vk#\u001e)B6=P\ny)W\u0000Y\n=aysaId'\u0010ɭpiL\rT}HmyPL:8ȿ\u0010'ş\u0006\u001c\u0002qipk\u0016,&fR]\u0006q\u0002@d!6\u001fh\u0019!\u0013n\u0014b~>{\u0004\u0016B\u0010Y\u001c\u000b\u0003~R\t\u0013\u000b\bOFI\u001b0|Q\u0000\u0003\u001eKTbd,F\u0000i\u0015\r\u001bqp\u000e\u0011j1f&rD}eaΧw\u0005m0;:mtZ\u001beRC\u0006eT\f\u0000`g,Bki)+.WǍ~;Q HNiJ-u\u001eSxS\r.A\r\u0005 \u001c>وD\u0010$\u0011\u0005\u000bT\u000f\u001b\u0007u1\u000eNiCu\u0003@\u00005 F'CZ߸\u001c7A\u0003\u0013v>+X|\u00115`\u001a>\u0005L5,\r\"\u000e\b#{\u0006\u0005\u001b݀܌\u0014\u0010䭳fx9\u0016\u001dupC \u000e\u0005%\f\u001b1HL)hg\u001a\u0017\u000fa\u001cA\u0011\u001ej\u0001|`cNnDJy7\u000b}@\u000fΌ0\u0012a*\u0019'\u0019\"Av&\u0007݂Av!H;I\u0000\u00010@C&;\f& \\\u0011K\u0010jSV\u0012L&4\u0019:\f\u0019k\rϸ\u0012m!ǌ\u0004=\u0010NU\u0000\u0000aW\u0001K<iMH\u0004;f`Y,X\u0016Dj\u0010I\u001c,t(\n\u00101\u0003>j,\u0006q9K4n\u0003s;eL\n\u000eS&n<X7ALy踑8<=4\u001b)C@, \u0016,qp5\u001dqp>\u0003\u0004\u0018\u001b3\u0013Ȅ\u0019\u001f{\u001f\u001c5,\u000fX`bAW\u000ek`x:tT\thq\u000b\u0003\n2Wh5n\u0006\u0013\rt\u0001#B\u0019\u001a\u0001o:jVv8N\rV\u0003:ؐr~\u000e4j\u0007FmK\u0000.ip}[v9od`\u001b \n\"гR\u00016|ڸ\u0007H\f0Lc\u001be\u0006\u000fq)\u0001'\u0002\u0015'=ؾi\"X?PY7u3iT`!Hp9iN*5jgG#q\u0018=\u0017\u001aR\u001awAQ\u0000\rL8\u0003\f\u0011\u0003\tN\r\u0007!VT\u001a\u0016*II;d\u0013?3\u000e:k!62\u000b<6i`@yQv\u0017h;\"\u00124$\u00044+i\f\u00020 !`5\u0005^ڄ@\u0013)VSV\n\u001bC\u001a. V\u0000\u000f}@}@\u0010\u0001\u00184N⡊_ݦC\u0007\u0010\u0002hQ+dt\u0018\\jq\u0005u6`0\u000b\u0011IHUH\u0014ƊFP&\u0011cz\u0015\u0002\u000f|D\u001f6x\"\u000eB\u001dyW5u 2TINuơI'\u0003\r&\u001fY\u0003S\u001e'PzU[\nc)\u0001KaWX\u000e\u0003ଡ଼\u000e޺@+\u0005\u000e\u0013\u0010&\u00136_\b`\t\ff\u0000cPKR\u000e\u0019m0ɮϹŒ7T3\u0019>$\u0016-tΈ͸!q\fR\u001bv\u0006:W\u00039yq\u000e6\u000bV\\\u000e\\1\u0017\u0002j \\\b)\u0011ʈPrRiX+\r\\\u0006Y,\n\\d!^\n&\u0019\"R~\u0012LBC*7\u0013\t/D\u00054\u0019\u0018|<BFs$\u0019r+v>\u0003P\u00007d\u0001P7\u000eC07k(\f͍DF3\u0016wq\u00054P\u0004@ŐnNlx\u0012\u000b`5W!\u000b\u0012\t)y\u001bS)OHW ~\bX}ϸup\u00014;A0`wX\u0005G\f>;\u001e3\r`\u001c2I\fM\u000f5jA0$\u0013vv0\u001e\u0000Z\u000e,a\u001eh\u001929n\r$)\u0001\b\u0001]%<e\u0012āƍ\rk=:gP;X\"\u0001Ď\u001e\"F\u0006f@\u0014\u001b\u0006\u0000ܺ\u0014\u001a3\u000fS\u000fv\u0014l5\u0001>\u001b\n:٢aȐ;\u0003^u\u001fp[\u0019YdXKD\u000f\r\f\u000eN~ƌi\r\u0012T\tT}r=R]a=HCL\r՜\u0000hC/G[G7X\u0015\rɮG*\u0003K8\u0019p\u001aI\\5TX\u0014&WL\u001f\rU\u0000~^LjV.\u0005\u000bT\u0014\u000e&(`\u0011\u0001\b5EeLDk`ɀ)6&\u000e4H\u0017Sz^ecwPUZ)M/5wj&\u001e\u0002yf\"\u00153a\u001b\u001d2\u0019방y*\u0007z؂s@Y\t7b!T\u000ea%@<\u0010ꄓ7:$\f\u001c>\u0014czJ^\u0010Qb=l\u001a܌`\u0001\u000fgiJi'tYX0\u0012\tDD\tRJJ'G D4xq\u0007w\bE,ڤ.xU;\u001d3a\u0011\u000b\u00115$mXaؙ\u0019S%\u001a)=\u0015҄GB׸<^'Si\u000br5\u0000Ċ'|\t \u001d\u0000rzw\b\u0014\u001c\"XSͰ6VL\u0007^*n\u0011k\u000e\u00162N^Tjڲi?⓫a3\u0003逨2(%?fTTʻ\"8h<2\u000f5/.6>bƑ[\u0017\u0007\u0005Y4Ҡ3Bv\u001fa\u0012\"e\b\u001a[x+T\u001d\"u\u001b\u0000*0BR\u00056\"U_\u001c).%;;4\u0013\u00004r>J/eO\u0004Z^ #6\"b\u00144Pa]&1M&*1N\nn1\u000fWtf.\t\u0015*'Bl\u0014YBng\n'3N>k%c\u0006\f`\u0003\u0007\u0010.%\u0017f$\u0017Wu~\u0005\u00060Y08d\\\u0006\u0019\nx\u000f`\u001b+\u001es1iT,9,@\u0002\u0005\u0000*F\t\u000b{\u0015_\u0002CӰPҪ[`R]\u001b\u0006\u0015uBO\u0013\u0016grə`y\u0017k\tE1\u000fYcPyE\u0000]^1\u0015.\u001abo+v*58\u0003̦!,᪍N!p\u0010\u0013\u0000x\u001b\u0003\u0019|<M\u0002>MbӔI4w;P\u0001>nc c\f7֕Nnd{Zd2\u0012,9\u001b\u0004\rT8u:ؕ+\u001bxl\u001aDG\u0001)|a7\u0001w\u0016\nbfV./Y*Z#\u0012(\u0005\u001aj\u0000ۛ\u0007x\u0000\u000fm@|J\u001f\u0010\u001e76\u0019JI\f\u0011PǖT'\u0000K7TRq\u0006\u0007EJ\u000briNtp\u001d\rxMtB\r\u001dk\u0012362\u0013\"rT\trf\u0017=;\bv4\u0019\u0005*\"c\u001e\u0016\u000eegKDw#A@\u0002\u0016m\u000fV;X\u0019\\,\u0015\u001buN*Bj\\\u0019(Eb~\u001b98蔖\u000e0t\u0003v0YWF_\u0004\u0011\u0003\u001bI$nՀ\u0003h}GmȕUxr\u0002txE2!ӑ\u0016\u000bEĚ\u001a`[\u000e.\u0000f\u0013Jsub\r\bcS[ų\u0006HNyXet2h)-_F;L\u000f\u0016LX8\u0011mі?ܔKX{WHSM1@U\u0013ڑK+N\tVLŧ:nŜ*gd'R,._l\fշLk%<g\u0012PčB~FG\u0004pPH%XZRq5;w69\n\u000edgr\r\u000f\u0007\"v*\u000fJ螡=\u0010|\u0016(B{g{\u000fyqsYx+؈47X,_j\u0014\n\u000b.1^)ål>9!\u0015\u0016f̞pEc\u0013m);\u0013mns\rCdd\u000f~)\u0017\r\u0005bϜQggԙ3ZeLЧPu.\u0005!\u0014oOG\u001b[\u0000\u000f :/`cD\u0004\u0005\u0017r\u000bd\u0014\u0012\u0000eԚ\f!bTjre->v󈘇#J\u001b\u0012#>ꝑ+;@u)\u0000\u0007K\u0005edMgp\f\u00141\u0015\u001ap̅k[ٹ3D \u001eF!00\u001e$\u0017ҳǓcمU p8hxhcj]cwn\u0017\u001d:P\u001bH\u0004o]엖.gnu\"4\u0017BCE`Q!;ho/./8\u0002\u0016&|\u0012.PH͝Bŕ\u0019\u000b`\u0005v\u0017&ڻͽחNwﲉ\u0019:P^\u0011m{7ؤ^icZ4\u0016\u0006o\u0000PN\u0007\u000bv\u000fsڣ/#\u001dT\u0016΋5.\u001e휒J7bAȁZJNL\u0016\u0016/{N޷y)<֊jkw4(.il_\u001ct\u0013Q;\u001e1#QH~leRcFaDwRexg=\u0016\u000b\u0017;\u001fJ_SpyW팊ln1X\nTדcI1?ۉ74{咐\t|uZ\u0012X$\u0016hT@0eOKv0ۡզW[FW=|\u0015`K\"R\u0015NW/gO'>\u000b7ﰒQ(@\"?>\u001amׯLo^?y)\u000b\u000bBa\u0015`\u000f֥e*\\wB\u0018\u0011\u000b@qJuõU1?'\u00163t|\u001aT\f\u0000\u0000\u001f,{:Q1\u0003jXX8ϥzjG\u001bZbz7P^M>7祉5\"RR;BfZ.\u0016O\u0007s_Tjk\u000e\u000b*LͶO>\u001c\br]˅֥\u00102d1+\u000e!B,nV*-_4E:#`a>XMoA?\fa\u0004ɁYkڡ#Bw7Z^Qi:=\u001f\nJK\u001aTyx7p*\u0003.\u0000mҳ <,N0hƚ\u001b\nJ{n\u0017߆RPn~7<\u0001xZqzއ~Glm|{U\r!pCמxM,]\u001c@G&/͟??|gH\u0000\u0003cnw|={w>tyӚ=]G:b!4vK˗gN>tŝKX\u0004U\u000b\u0014\u0017TK(\u0013\u000f|-R\b[P[@5\b\t+f6\u0010)o\u0015\u0016κ8i>\rE\\\u0005b3|Wꟸ|3H_=[נS&8CT\fWӝt,Uk;WnVV/bj\u0017'\r\\GK3\u000bT\u00006-)?\u001f*,\u0004rFZ$c\u001d {W./]ھw\u0007\u0019-\u0013m|}G/>bq·\u000e\u0001/\u0012r\u0010\u0016]ūˁLis7#٦щi:$\u0014Õ\u0003N\b~\u0003g6\u001e\u0001҉f\"\u0002x9e\u00163\u0007<\u0012\tΉuC\u0016 s\u000e<lǂ\\\u001d/fǊ+\u0013ۃ\u001d/Ϟ\u00135\u0013l\u001d+\u001e-\u001b˧OiV;'\u001e\u0018d;[\u001f=q&Rӻ \u0001faR{\\(,s).\u001csL|&P\\}R\\:\u0017ooϬ{?,fjڅ'G\u001dgܣ͝{\u0019w}|\u001a\r\u0006ijX\u001e-^Ο\u00133.B9\u001e˕̩Jk\u0003ʱҰ\u0019\u0003'\u0000\u0006\u000fW:p\u001b\tA76Ll%BMvx'\\Z--\u000e\u0013e~\u0012\b/cS\u001d$\\\u001fG\u0015\rik#v2\u001a)\tpc\u001bn\"B)9{\u0005.Y7VwωUZm0;PDBxs7_tQ:V]\u0011&3+ez\u0006tN\u0011Jqzr{cL\u001bJun>ܛ|0w\u001f\b9LE[JdyL/{=wSy_==X^y\u000f?:k\u0012mG#!H\u001e0Ne\u000e\u001d2M?\rUՠr\u0015|ErkTRnśkH0ܒrKDsAr\u001d͹\u0014T\u00044.Y,T\tglDH&`*Z.;~J\u0013.~ɸX\u0005\u001aAHVs<7ueCbq\u0011\u000b\u00152[\u0003[8hgfw<\u001c\u00173\u0016*j\\\u0016\u001e!%WV\u0000\u0006K'TEٶR[ItsRTz\u000e3l\u0017h\u0001\u0000d`O\u0004.\"*%:Sq\b\nr\u0012/#\u0005>;+\u0010ZrI_v\u0010\u0011E'H\r|\u000e\n>'Pq9p6\u0003Vo❁v}Jf\u001ce;G?%ͭOv\f>tnjFE$DHZR\u000b+s{LwN(m6R<}o\u0005\u0002Akba-=%\u0016\u0016+\u0012gI\u0005Vu]*2ɾ_Mt*[&\u0017i5Bw\u0007\r\\\f\bPND ;!5\"Xq)ΝJN0YȪHj!hXyMu-\u000fLq\\a\f<Jsg!e+G/=0\t\u0002{\u0015\u0015r<Y9e\u0018\u0004Ҥ[d\u0001\u000b0\u0005\u001a\u001c\u00040\u0016\u0000QG\t*{C\u000e:A%9Ӟrf_\u0000J\u00072\u0005\u001a6M;Z\u0017\"CR\u0016(t\u0003>\u001bELjF\u0007sR.4V{Wõ\u0015,ZŢ5Zm\u000b969\u001f(m\u0000\u001aL\u0000dc#?\u001f̝6.!$ZJeFjvgD$`H\u0010PH(^y7\u0018<\u000bf,\u0007K\u000e1\u000b\u0017~\u0014\u0016ϗΥwD\u0017HQi\u001a7\u0001әӹ;X\u0012!.L'P\u001aMDaf/?{HD$]\u0004;iկ4\u0010\u0003\t\u001f*6`LXgR\u0006R;)V̈́\u0012շO\u0013ζ5\b\u001fӧW\u001ak7\n\u001an\u001cN߫\u0016fhlv(̜Tj[@Y\b9;߿|%\\\\\u0013\u00123B08p^P!-\u0017\u0017\u00035\"0s\u001fx!\u0010o[q\u0017,ѱ&\u001d\u0003߻Y^ٸf\u0006\u0012֝Xn\u00036Lm\u0015\u0018uSI\u000f\u0019ˠ\u0010ƭXB*mJ_\u001ds؉8\u001b1zǭ\u0001\r\u0004\u0015&X\\ھ*חTN.e%|j\u0007\u000e\u0014\u001a\u000b) j\\\u00103\u00100\u000b..mBC(y\u0018\f\u0005+k\u001el_ͬ_<\u0006\u001e!\u001e,\u00175V/[|vJL4g\u0006#x8T|q\u0003sG%\\qxcՈE\u0006[T\u0012\rVhe\u0017\u0006`E\u0018\f\u0011A\u0006im_,xtk+֝h\r\u0016d@\u0013\u0016Q\u0010\u0003\u0015#\u001bOL:/82\u0013ݢ5\u0007\u0013\u0003NG!8D\fԹX'\u0011e#I#2\u000fX\";le\"`MǫK\u0017\u001ct\u001c\u0011\\j\u0006\u0004\u0002l\u001e\u001d)c\u0005  y<\\A\u0003\u0005D,B`a%;}t\f,=O2t} \bR,\u0012\u0013S|b\u0006J\u0019ܹdg\u000fM9H7zY;\u0011\u0006\u00058\u0013m\ns|*\u001b\u0016\n\nRa>R^uTȣb\u0001\u000fhڿ\u000fOZ\r\u000eK)\u000efDLk@[:>iFX0#ljm_\fn\u0016aÐܸ\u0005\u00051(O)@uA,\u001bI\u0001\t$|v\b\u0015*RA:|hvNL\u000f'`-Xā\u000fh\u0005\u0016mصTgNKJ{x\u0013\r&\u000e\u0001* DK5\u001a[Ȅk<NdL\u0013o\u001fk^(-L4WdJ\u0005jsw\u0011\u001f\r5Ĝg_\u0013\u0016\u0005˪wI`F(6\t\\],\u001e2ӑl蹛\u001b\u001bw2n!Oƺ`B%2Xu`Q;\u0014Q\u0011N\tZ\ba\u0019*9OgbNax\u0019\u0013\u001eʙ[0\u001e,\u0011\u0012.\u0015\u001cȤέxD\b\u000b4\u0019`\u0011ZiB?BJ#B\u0012\u001aCh\u0011QmP1=iŧl`6|r&\n*ޗsHK%\u001bc\u0016\f\u000b\u0002ٙ1\u0018\u001b\"\u0015Lh\b\u0010\u0016@)t\fڳxz<No53\u001e\u0007\u0003Y#\u0012\u0003ZkFib\n`\u001e\u000eF\u000bpxW)uV`|\bFQ=br\u001061\t\u001f7Z;E*{nR\tǥpJj/&9eg`=\u0013U\\*aMY|гq9\u0012ݥbi~S[\u001c(`!f3~1qVQ6Z\b[|MVt5^=yE5Ӿh^.\u000b[\u0011GҕPb\u0002\u0015S\u0006?wV(4\u001dͨy\u0016\rp\u0011o8)\u0015-ꖓ\u001e1&=h>qXg7\",X\u000b\u0010i2F\u0018\u0013B\u0006UZ\u001aCvsy{J(\\TH켇\u001a<ДcD2#ZY\u0014D\u0004xnQ\rd,cy\u0013\u0015G\u000bQXڙQӅ\u0004 QI\u0015md]\\\u0000fSf^\u0012Q_xpA\u0005\u000f\u0019{\f^tRMjԭO\u001c\u0004HK#`vVN];h/zĤ!6Ԫ|x\u0001a\u0019\u000bW\u00006BAJqBsj\u0000\u001b~\t\u000ff#9\u0006Rcb\rNC_{[陭`gcx}[/M\f\u0019\u000fN8b66#QH#Iֶ@eJ\u001b}.*BDJ\u0007Czװ\tjR\"-&\u001bfj\u0013_#7yog\u001f~???o\u0017}pTj9?L\u0017f\nՙRkl/n.:zڍG3g\u001fxbʽ'o<tgWxowneRLF\u001e6'Bb,oVv|=\u000f3\u000f}?y\u001f~ɗ;w\u001f/0\u000e#faX\\ܜ;>Q]XlvN^\u001f}?9sRY\u0010\tѰ\\kƵ\u000e\u000ee\u001a{T{Y%;˫nk<ҷ~pg/<ϗ\u001eyO7~\u000b\\\u001cX\b6R!G^N\rZje:3;ɗ\u001e|}}~\u001eꭝ6VP\u0011\u00174\"\u0002\u0016Ȑr\u000f\u0019=\"$b\u001f)ՙ7\u001f\u001e|_/?G_t\u0013^xwx;Hтf\u000bq!іs\u000b\\\u0016gZ,+6WO]Z;w;ƃx{o߾_?f0b(\u000f)j'2r\u0011\u000e\">!Dqҩ\u000f^}O<Kg7V\u0017gOҨ\u0001mAjszye3w\\r㱧}g\u000f??>7_xuĝٙ62h\u0015\u0012b3u\u000b7_'{?~??k~g|x7w.\u000ff,\\-\u001ctVd9]nίt龇\u001e~\u0017_x\u000f\u001fk??\u0002?ǿ^]<*z@(\u001d&\n><6xǞKo|o~{\u001fO≯v\u0007S\u0005N\u0011B1Ov]\u0007BJ^<v\u001f~W\u001fOџ?~\u0017\u000f;k'\u0002sHd\nWCPv[[<sҍ\u000777~o_7tً(Q_ѹI+\u0001̩w6,YA3\u001e~cO7ɯ?y|w>\u001f??o?ᵷNqo21ۯw\u0012\u000e,\b\\.ힼʽsß\u001f7o}?3t{GHv̓\u0011S&\u0014\u0012\f'\u001bjј]<}#O+o'|g7˿o|ǟt#4)7\b:<[Y<~W޸#=wѧ^~K׮/m%]9wSq/s\nGZ4vO]{\u001ey=쿼_w\u001f?;L\u001b7:w٭6\u001f-)v1L\u000b٥W~;\u001f᧟}C9~ۿ?⋷~\u001b<2u\"f\u0012\u0013x6=sܕ3\u0017Ov|W\u001f|{O~'}g\u001fG\u000b\u001f*QFEx юB\u0014QPuvw\u001f~7a\u001c?Kzg?_}_~\u000f>xW_|T\u0013@VڐsHݙ/m>}W_|w~ޯ_\u000f>O~//^y\u001eq\u001a\u0005x\u0004(^[GO=sϽ\u000bo|__᧟~?}/\u001fѻ򑧟9xy&;pQX~\u0003Oֿ\u000f?/_}ۿpw~wѧ?z\u00137h6f­ސûɎ`v\u000f=\u001b}ͷo\u0017oO/\u0007\u001f}+)9uCL/7s\u0002Ĩ͙免+7.=w޸|jA\u0004|41.Lp\r3:p\u001f.)L!_of:3ͽ\u001b{+'\u001dy\u001d?x\u0017إ`\"Fˡ<\u001b\u0010e\u0011B\u0011\u001cˇOܹw&˅ݝ\u0017ݼx\u0007?{\u001f>䳏{S/v\u0002\u0018/ \u0001\u0017\u0019d\u0002O\\]*43ǟɷ\u001f~֛=\u001ekwx\u001c\u0004Er^6f\t\u001b\u001aL nJ\u0010¹lzgs끛wꫯ\u0017xOË/w\\:јfm\u000f\u001d~?\u001f\n\r\u0018M*֥~G|_}_|_gx|Quc\u0019;1\u001d2a@՘Z_^\\8zr\u001b7͗_?|׾ҋ/<ϯ\u0007ı\u0013B\u0013\"f\u001fk\b\u001dťT<\u001fTK^%r;'|\u0017|=O>̏\u000f{kp~s{5=,\u000bޭˡ)e\u001b*˦s׮oWzg^zw~_k^-Z\u0004'C\u0006;mz\b^BrԫVgV|bІN8\u0013@\u001dbtчG\r:\u0013\u0007T\u0013}\u0011\u0000\u001f\u001b!5D0@q\u000b`L)%\u0013.OqAj\\j\u0011<@\u00187&J\u001e7!`3\fʤRwn~h&\u0004\u0003t.Ҍ\u0006̈s2\u00067@q\u000e\u0012%ChDD.ڋ벚'StT\n!sAVp)\u0013\u0002[\u001eAR\\(ӵr+$b\u001aS6jnl\r\u0006IHqsQ\u0015ט)gB\u001c{\u000eΎ1sBR.&3||]ǎ(\u00152ӭVZZ|%&\u0010\u00014fиux\u000e08\u0006ǘ\u0018)B\"S窌\u0014uz|\u0010VSP$-4:no\u0017D*\u0017>\"`t2#\u0016bp+\u0006_օX\r\u0013AYx'qb2iCSb{tfZ{</nWX\u000eR9)\u0018E0\u0000ER/͝\u0017s\u001a+\u0007쾰IX\u0010\u001eLҡh4Lt*[\u0015\u0010'h|@)z8=m\u001e|x!(ggXиqL\u0006\nuOPr)[[\\?}\t\u000bA\u0003yR@ؤKY)\u000b&6,tx|h2bLn,@͆+E$NR \u00136L!ļT&,^2D7\u0016D\u0018݌Wb2yl6/\t\u000eM>>D\u000e*\b\u001e3:n\u001aҹ:\u00035L\u0014\u0015TջhO00\b/\u0015#\u0015ɘ%B\u00057\u0019\u0016#\u0019*\u001eјF'\u001dv4\t\u0019\u000f\u001d\u0007+Rv\u0019\u0015f܊6T4z'uN\u0019\u001bzӉAL1ť\u00045\u000ez\n\u0018F$Nؼ78KԹ\u0003\u0016<frtuvchV\u001a2\u001dH'IY\u0007G\u001bQJtX3x\u0018pZ|!+\u0016\u0000CپL\u0018\u00111ތ6$籚\bgw3>Ď[Pn[8XçL\u0005\u000fk4,\u0011KJ}?+.\\\u00143\u000b\u0016\fŅL\u0007\u000f\f\u001b&\u0007w\bItkB&]:w8&c\\V\u0002U\u0004\u0015+%\u001e#XȆ:\u001beG\u000eL\f.u\u001bdRJύhz>jt\u001b]\u000e<\u0015\\||V%d\u0007K.*fRT\u00182NXmC\u0001l\u0002\u0019*\\*Wȶ\u000e<#:\u0002\u0005.gi\\.90\u0016?X\u00185xƌI׎\u0005M)&:\\S-(\u000fӹ8? SM4NĘ\t\":IOZ:;Б*\u0013iH\u0005\tT榢\u0000</\u0019\t\\&F\u0003\u0011ۊʼ\u0015\u0012\u001d\u0012\tTиp\u0011mth̢5xV?J||ED̈h\u0004\u000eF\u0005xOOw8\b©`vF);Ȩ\u0001#~Z\u001aGF-G\u0006|B}pjщ&\u001f<,Ф\u0013`#F2Rf1_R\u001d3{\u0006\u000b5:\u001a{Dĸ\u0016t5u_1ze#\u0012J%>5{6\\A\u0018|Ly\u0001\t\u0011!TlΝsʡ1+gb\u000e\u0016\u0003J\u001d2i\u000e\u000eMVt˦ƭ\u0014gL'\u0015D_Lia;u9P/d]>9G#S\u001d)9#fݺ\u000bhMNܩXm\u0005\u000bfh\r+BjO͢L\u0018Q\u00131n \u0006נ>&i'2*vq\u0013jÂ\u001e!efrElxP6n'cqh(M+nzp\t@۽ыӫ'(\u0002\u0000o<PKe*bb=\u0012ӡD\u000374嘲NbX'T\\\u0013R^6(-J;`c\b\u001d5XQ\u0015\u001a>)7eǍ>\r[0\u0006sV\\>4(\u0018\u001cEASO@\u001d\f.&\u0016\u0007w\u0006atʊ)F9Vqu\u0011\u001b\"\\/funP\r\u0013\u001d\u001f\u001e5L\u001c\u0015nٱ)MHH\u0013@8{\u0004\u0003\u001ayx+\u0016q9\u0017uQ<.\\\u0016s~>oGUZ\u000bi\u0006;t&Z>6&HE`\u0003+লt%&:DH&nA\u001a+\u0000:qOaix\u0013^hHu2z\u0017k\u0000\u00031ρ+NB_4cZ'Bv&m]\u001ar\u0007C:?\u001dC6b#\"m6*7cbqT۽K:\u00065dn6OFBvC\u0013>y\b\"cR\u0001\n\u001e/[^\u001aE}7TpYF'\u0015.3\u001fбK\u0002tL\fRԚSmTQ.9>\u0005\u0005b\rF~ap\u001a4\u0005(Zo'&\t9OnS64Y0j8\u0006>iMy\u001cKNW܈\u00014d'\u0002'P\u001d\u0011z\u0017ΩJqvHИ}v\"TN64\bd&'QO \"BOv\nL3)͈\r$P6-%:\u0013{Q2\u0005r4[\u000faI\u0002əHv\nXf Px8\u0013\u001a\ny*Lhm]\u0002}j?9$bS6\u0006\\caT>&6i\u000ek\\XFZOHj';]]H+\r\u0003\u0012\u0007kX`tfY\u0007\u001e:AN2zB  N,lr\u000bS\u0016z\u0002n^¥\f\u001b\u0006d\u0012\u0016b3>xa\r\u00020Cc&\r\r6\u0016#\u0016,J:`Q✐nBSzB%=bVw\\}'lKtr$\u001c+!+sL~p1elsJvl\u0007@\u000b\"xg/1}45s25{N\"b&<K͵sВvvRzA+Fh#SP\u0015Jn\u000b䜘5Ҩ\u0005\t\u000br$M\tq9|6AX \"`\"w\tYYUYjS5x!\\p\u001cV$:хt#]V/ZF/y~OsQ`$\u0017dqhLkVОRv䡓ԷXW(\u001dU@<툊GkrnL\byJ\u000b\u001bN&\bPW\u0016\u001f\u0007R\u001c\u001e2\u001e2\\97y\u0019ӎaB\u001e|fPXJ\u0003y0Ki\u0013vT\"QT(`|\u001elzʎ}gs\u0014q1.TC:u9}@ǡ5Z\fAc\u0000k8Q%\u0004nm\u000b4o~Q߽l\tP\u0005\u0018`2Ħ.[V?GEpD*.\u001d¡z\u0010H8\u000fe\u000b:d<X*\u001c)JՆ\u000e$9B\u000eK9;6\"/\u0007'\u000f!\u001aWR\t\u00108\" LbEsNfl2m\fF|<;\nyp3.\t,Z\u0019\u000b\"FP.8X^e'W\u0016oWV-B'K8\u0001Z%,^t\u0011(-u\u000fHz~#\u00120A&\u001bQ^yh\u0015<Q.\u001c\u0016OK+D\u0000Ujm\rv~{\u0003\u001b*IVjL\u001b\u0019#BmN{i\u0007\u001d\u0014ĐmhŇreE'}\"\u001eP4g\u00034\u0013oz\u0007V޾Ck\bO].u\u0018ha\u000bĎ.2SdF6dE@EVBmϹ\u0019$b5\u0000\u0012PNDz֞m!\u000eB\r\u001c\bH\r\u001c\u001cm\"\u0006v\u0010n+|z@۱ZgsмlE>\u0001Tc\u0000_Ĵ\u0016\u000fD\u0017Ig@\u0001\u0002\\Mud+v\u0007>26e\t\u0012$&L(&_\u0017}tBI\u0005s \u0018\u0002ፕ\u0016\u0011\"\u00161ERzLVg^Rw\u0013- \u000b+k;\u0000^\\1Y\u0010\fy0G9]\u0014\u001fo򟜝0\u0004/Bc\u0012MPr?RsC1Y>7ksNTNT\u0019Jz~tK̏2iB$?U7\u0002E7[\u0017\u0001GXN\u001bT8\n!o\f缌G\"\u0019kHЁX\u0010-/'[vX\u0001ދ㫨Z!U芅EW\u0019n]?~\u001f3.Bӽxi؜\u0002G\f7H\rW\u001b{6\u0012#9;zpJ\n}BRY(-)\u0000T\u0007gxO&\u0007do\nE[[/NUg4\u0019\u0007fk$ʻzXfR8c8^ܵg\u0007avvWOf]$\u0015+\u001a8xzpc{\u0002:\u0005\u0000hPȇ9\u0000E|,%\u0019Lsb\tdΌ/\u0012P\\\u0013k{^5NoR\u0006*1L\\G(-Π0\u000fq\u0012!a\u0003\u0007K\nAv\u0001&\u0018J*M$Z\u0017sT\u0010B=\u001dj3\u0002*g1&Z A\u0018PKɬ_QpP$@3\u000b&/'glȴ%\fal!V1D5$xE\u0004\b\u0004E'[L6w\u0012͝ʭ;/$e\u0007Xl)m\u0018Ƨzp\u001eNQT\u0003J\u0003\u001aaRNNFs#ȥa@..k]>$$ţ?aQ:^O4nfp-ݿ\u001a-I-\u0012EsY\b}n\n\u0000R[Zugpzw2\u0005\u000ei\u0007\u0005)7et*5HW^+q0J6|\u0013I)п\u001f\u001d<~\\ky$ӻaFE&\u0017Q$Y#޹.\u00176\u0010&z\u000bl\\{88gf\u0004<\u00101V\u0001\u0004l&~{r#p-V5\\L\u001d=˨N\\.nwi\u0018y8`Fw\u0003N4N\u001bxzaQyܼbgb^;|<\u0003@*Ra97zqy-\u001c\u0000v.\u0006.i\u000fc\u000e+:]\n\u0019\u0004A$\"d!\nqq^\u0007\u001b?\u0000\u000f9;\u001bn/LxҮ>\u000e\u0011\u0011\u0012Whэ,~\u001ex̂&ɣ~`i<~\u000eǊȤ\u0017S\u0011\u0015BO\u001af/xe4\u0004YM\u0004ieM2\u001ct?JE)eWoHqw\u0014Ƿ@& ZM(6D\u0014Os.L\u0007\u0001\u0007d䒜iɨ\u0013,\u0014KAcac)!\u001b\\KR\u0010+Nw\u000eJS\u0004B*DmK),E,u\u0019\u0012DIΞ5\u0005\u0000Q j[ܗ!>K*eMM\u00171ɶ\u0006{ۧ\u000f\u001f`\u0010U֝\u0017_$*K@YFnm\u0003&3\u001e\u0006\u0017z}g~r\b楒`p\u0014⿐]i\u0003M~>Ϥ\u0007`\u000ehH<޾7AP`\u0014V2o\u0013Օ9?\u0012ť{`10OfB=b\u0016k\u000bG`~Zǔ\u001aTQVrظs7[m$؊_fT\fuFOzNJza\n\blf9V=2|fi\u00039C\u000byWG/ZX,m%d*?Oշ\u00015}tŽ|t\u0006J.Y߶c33>gԖX´OM)DʍCy\u0018oآ\u0007Oɾ\u000fOrMY\u0016ⲍ\u0005e+[Pl,\u001d\u0002{i<DT@#tvlU2^gҽ\\\f%\u0018\u0011\u0005\\m\u0018h$d #b\u0013^&\u0013\u0000NtfuɎ\u0010-\u0013MVo{߾k'c`΋ikQc1\u001e^vbz@DK^\"6ai6\u0013ljdtRy\u0010a'\u0011d\r\u0006\u0000R\u000f\b%:9y:\u0012U*\u0000\u0018\u000bt,_\u001e\u001dTWO+'pA{\u000ewܰ8Q\u001a\u001dUs%\u0007\u000fAHjfhԶ\u001c%+FM>\u00191$BI\u0000\u0014)C\u0007\u0005>QۼŧRms@IV\u001f\u000676N>GP0FBaщkxJz9\u001fm\u0013y(>99PP)\u0017a4*;k'\u0017?5\u0006dB\"\u0019'0\u0005\u0005?\tEFZ\u0007\u001fV*nr\u0012B\b,u\u001418\u0000M)\u001būʊ\\\u0012p\t\u0012*kOO\u00123v\u0005Tr2\u0017̈в\u001d7*w`\u0004&_%\u0012=\u000fm\\6,\u0015SVE'ڂ1[(\u00061Ϥm\u0007T{\u0017cte)`\u0017Pf3Kj\u0000S\u0004\u0017]Cr\u0005z\u0007j\u0012ޱy_p\u0010[\u001cA\u0011\u0010K?;;*\u001bɌi\u0007>\u000710\u001a]>V\u00108\u0019-t6uv\u001fl\u00172>pSɄd+D'>\u0016{XMn\u00176_&?\u0000L\u0014la1\u0012rKւ(Q\u001b\u001fV\u0006a6\u0011$ͻ\u001f{{/\ncVk软xC'<\\\u000ew^enoY R\\<h\bW\u0010K|\u0006re\u001a{I\u0003lC\u0016\r5ƥ\u0007\u0002Ph\u0013\u0016\n\u0010\u001b\u0019nm6\u001e#\u0003Qs\u001d۸۟\u0003\\\u0004\u0005)Q{g|n|F9\u00149ɃKh\u0001}\u0007\u001f\u0013\u000e\u0000\u0012&?\u000bV6\u0012X-\u0007\r\u0003UB\u0001\u0002`I{(7\\2y3^a\u0018\u0006\u0016/\u000e-\u001fZmcean(Z;3\u001b\nO9spq8\nyH}\u001c_0O;^2<9\u0012\u0001\u0011*<$7:)ɉzqy1nˤrJuw\u001f=\u000b^\"\u000eʦ\\f\u0016ʶX\u0012J!561)\u0014dX7 \u001dB%̴gN@OV\u000f\f\u0000\u0016R\t\nU].\u0016p\u0002 !^\r\u0010oR\tzOɭ#\u0013&\u0012,F%T(A/x\u0014)U0xي@C\f\u0001\u0004\u000buGl!T\u001aچ`t\u0002\u001aU)]3)\u001bͻn|Q\u0016\u00123¢޽J\u00026W6C. 4\u0019x<\u0005\u0003\u0016\";L\u0005'B;kr}wBe93RK[Ờ\u0015\u0012gRi\u0005\u0014\u0012]>܁\t%%7\u000f.9i\u001bIGڜEΘgM~s'\u001d\u001b\u0015\\\u00173\u0000#\u0014\u0007\u001d\u0007)nBq 2\u0010let\u001dJΐlr\u0010Mn\n\r\u000e\t],KEF\u0005\\k\u0012Ve|\u0004=\u0017~qt\rKe;\n\u001doG\u000bZ Lqz?Vܒ\u000b\u0000\u001bLo\u000eg&7SnNcvLx{?p\u0002~\u0014\u001d0\u0005p\u0011\u0010/%{Ѫ/\u0015'QJj\u0016\u0016\u0013CyP^~l\u001d\b\u0005\u0007\u0019]Y\u0001\u001c\u000bZ70Y}PY'\u0001\u0015\u000bloeLV/BQڈiP@+l?bWG*\u001c/-\u001d-l܋$6Do\u0013\u001e j\u0013 \u0015\u0014%N-C`\t\u0002=2\u0005KP >vM^4'Sm\fmR&ܔJFhמo|u?;\u000bBsmrT:Pj\u0000u\"b\u00030{qd\u0007Q|r~*\fn$j0T!\tVR*VH\u0004`(RzgM\u0018؉/OVii5!5ĥ/nergg&/L\u0003\u001dAj@\u001aѮ\u000eM\u001ez5To,_{7^ہޯ\r\u001f\u001bp\u0015F=DY\\gRJPiNh7$ʤ:jkh|V\\\\پ//źRa+ٿG_1<\u0012RR^\u0000kV\"Hr,fD\u000b|E\u0003O,)0l\u0001EL\u000f)b3\u0010MP\u000f\u000e\fJ\u0016|\u0011(x\u000eBhXЩ\u001ehǊn7Tb2C:լ\u000e\u000fy`\r\u001e2MeH.D\u0001CD0\u0019\u00175fL>΃hP4DhJQ\u001b^\u0007qIwvb\u001d<5\f\u0005Eo\u001fƔ\u000b8Z\u000bK6ךUJJILNq,&\u0014pϪ) \u000e̼\u001e\u0007q\u0004\"DM5K_ioޢUT׫K'~{t}aDHVdO#6o\f\u0011j\u0017s+tPZV\u001f7c\u0005xflȼ\u0003r}J2Y?U/v1)Zo{z7\u0010|{ۉlA>\bͤ\u0005<]YV.\u0007-H\b8A{\tmA{qr\fI~2BRJiSW#\u0016%\u0017\u001b\u000b\u0007\u0010Ct\nA:\b>,\ncjq)ϏǂNiHf =AJ5ۯ\u0001\tk\u001brz!Y\\RXd%\"r\n{nkI^$\u0006;e6Qr\bD)7o\u000b'\u0010\u0012+,\u0005la̔\u0013^(\u0016+k-\b}t6*[X<\u0019=31.\u0002.Z9z7tGxHFX)i'qa7m\tك⬛A< 728<betʝ\u000fZ['NF\u001c{I;6\u0000>@*\u0004a\u000b\t\u0015\u0005ˋցQ\u000b\t/y\u0000\u0011*\u0010\u00116>\u0017Te\nȀ0 @dƉ:\u0011!/\u001f>wG;7n\r\\Ŋc1;\u0018=-Gn\\\u0013;ze\fiȋN,S~*E\u001fz543/\b5e\tNTWeZ)\\yZYudǷʫ\u000f`ta~\u000b\u001d\u0015\nZy5^\\eo\u0005\\\u0004sjF\u0000~\u0005UL/b\u000bCEkC1\bmIF\u0007jiچlZL.Ҝ\u0015\u0012]A\u0011#Lm-lq\u0007f/\t>rɎ\u0001N\u001c#\u0019ǥ\u001f|+P$Ϩ-t\u000b )\\\u0012\\\u00166(\u001e.E2Ѵj4p\r\u0003؜= MY\u0019;6&m\u0013.s.\u001c@ŃE!@sr@\u0005,ԡ`6n<\u001f>,\u001bK7z\u000f\u001b\u001bw\u0016\u0011+\u0019e.U\u0005#~B#\u001d\u000e4L%)$\u001dR\u001b\u001ar\u0005L*k7{O_}#\u0015\u0017B\u001e\u0011aH;Fn^uT^#Byp-;\u0010s\u000b\u0010[n\u0015'b}oi\u0005;\u0011R:\u0004#լ\u0015Q%B*`xp9Y\u001ex_y72h}3V{\u0019Uʍ\u001bKN43#6x0bщ^\u0016p\u001c%!6\u000bܴ{֊ؼ\fDcE!ۋ;\u0001\"bgw!\u0012fƷ-\u0014͔\u000fqi\u0017f\u000f`>J\u0015\u001a\u001f\f/_yrv}\r\n#\u001cɊe:сC\ton,]y\fy\u000b\"&\u0015B\u0016\u0015AR\u0016*fg\u001d(\u00110G[3(1\u001017\"{9\u0007\u0015\b)cGҲ͕=*wvap\r\u0000}4!ؠl\u0005\u000bpG,\u001eCD\u0017\u0013-ah\u0001/\u0016u\u0006\u0005\u001a\u001e\"5\u001bS\u0010\u0016I\u0011b{\u0017,=?svԅDy\fTlC\u000b產\u0003J1riUm얗\u0016-.ƍ\u0017\u0019!\r%\u001b\u001bJe\u0015R[\rGK\u000eT&\u0003\u000f86\u001e<Y\u0006\u0005\u0010\u0013uF)\u0007XTbaT\\R_o}矈\u001e\u001a$W՝d]!̏?\u0013y\u001b{\u00187O\u001b#&9t\tS@\bA\u0006'3l zΊO(YJiS.1gC6U\\\n۝\u001b\u001f\u001eia|<ۻZ.>r)8Y\u0015!Y7@\u001e2\u0019/\b\u0012\u0004|?a\u0011*N)\b`NpCZ\u0016ZD,ɰz|ȷVBN)Xc\u0012s qk@v5I[s3>W\u0011QO2BF˵\u00167@'!dəhYm\u0017o\u0011B}0y'\na:\tF\nKv\u0015*>ɫ7re+\u001cmx_?fc\u0005Å\u0002vҺɢ\u001e\u0014\u001a\\&mC\u00109$D\u0012\u001eT%Ҵ\rOP]\u0001\u000b`/8\u0012\u000b^}a\tA2յd{h-\u001f׵UՕju]ʯZ:A\bNM6k*\u000b3禭\u0010\u0012g\u001b\u0001aLuDo|ZWARY>\u000erV,eT/\ni4+U2ZKɎ]6]9v4&^&i\ns>\u001e*la\u0001>?\u0017ϘB\r.Et1>V[8\u001bؽ}Wo~?p\u0005\u0017\"\u0006\u001do\u0002XٕoW\u001eC\u0001+\rMLvZ`Ƿ3Z\u0003Q/洋u\u0013Pcϓe\u0000إSNoBg|-\u0003_.GtfǢA.\rU\u0011j\u00106>\u0011\u000bMx/\u00048\u0004)+\u000ej+s\u001erŰBu޻*d\u0017<lM&#|7\u0010B\u0001\u00069_L\nc@Fl>\u001d\u000f\u001a39i\b\u001dطO\u0005\u0004UDU).t\u001e/^}|n\u001cn/lL܇k\u0018+<Y)\u0015QL,3\u000f\u0019-ca\"isA\\\u0005rY\u001b\te%\u000e'jlِ/Z}R+VJ\u001b5<H\u00028_v\u001dZ;~ d\u0013K\\\u000e\n\u0005L2A|h]0[]\u0007\u0003\u001f\u0007#nJw#$SqZmz\u0018\u001e&\u000eO^-\u001f<r㪟JrM)u\u001fk\fG<g]\u001dݔ\u0016c1Rnx\u0014vS.JE \u0013iB{}evVd5VZs]&UwO\u0015SmwDk\u001e*\u0015\u0000t'i@- \u000613vլ\u0013M\\v',^s\u000e)6Gu/m\u0018񫷿ܽ\u0016\fZtڊ\\Y\u0016s#m/PӚ)\u0011Ov?\u000f1\\0䀨;wON#ƀ\u0007HՇz`|\u001f\f֎O~^\u001d\u001fÊ\u0013:'kT1i\\sy0>{X@l9\u0018ui)^M\u0014kG/u\u00077\u0015#;\u0012b{t\u0013\\\u0011\u0012AF7y8\u0004\r\\uMJ{:e\n8}32.W\u000eO\u001cS6\u001289\u000fJo\u000b\u001eJ\n\"t\u000bнw,RR]\u000e'S\"\u0003}{/f\u0007\u0019d^_p$:;Y7\"a\u0012V<f\n\u000b\u0011AYWۻlJy|08R5g\u0001\u001aB\\\u0016pbr\"]- {g]!V?x\u0013E<t&g\u00154Z`\t@P\u0018\u0010zAT;'oWlnʋ\\\u001f;\u001fڊQ\\8\u001euOrݛbvс+F\u0013\u001eV}93yBye\u0007fjzۯ\b0\u0000o#T/࠼p\u001b\tD\u0001&lmVq{>\"47.ߙ,\u0018=,Clƃi`\u0010l\\-zȄ=\u0014eLtkYo¥\u000fμO$\r2֠Զ1\u0000N:VF8cڅ[\"5`x+3tskuӯ3޽;<x:pxk/֮=ۛ??\u0001R\u0013\r.s#*\u000fD\u001bt\u001c\u001b\u000eT0??9녙\u0000\u0004I\u000flnlr&֘J/\u0010NTU興Jk\u0007{{/Rc.,.\u001fٸ\u001aS+HO*g2\u001bTbih\u000eY&W\ni\u0007nG\\DMfI6㍕|ocWW838ē\u001d?%=\u0007#U[`r\u0019ˣ{\u0016T-A\u000b+>\nySPJT{.\u0003\\OC1\u0019Ȁ|:O1\u0004=ۭ,^/-\u001cƫz{Gomsz'\u001e?\u001dqod*̐w&+\u0000\u0016r\"X7E0\u000f1ExAa\u001b߶B,TYWk|u\u001f\u0017\u0012˵ƕd4\u000f5n^=mo\rKE  \u001f\u001e;^πz#>6;1Nnt\u0012dk\u0011|2xJv&\u0018Gat\u0016\u0001\be.ќr2,$KՈ gb2d37x:&\u0016P%/f\u0019W뷷RX<N57D=0!\u0003qf\u0007>p~/%B9²3Lp0#\u00176&[r|\u0014s6/Sx\u001e!\u0012b\r\u0006I0x|va>[\u001c\u001c._}u鍧\u001e${J VZ_{v=Hmra%?[{ܚ/Rq\u0010gg\u0017L0\u0007=\fQ\rqiBщR[V6??zZ_Lk;gFC}2\u0013\u0019U6\"\u00146 \u0017݄f\na!\u0017V\u001dJA+Y!>sY>\u0012R<Y\\[~\b\u0014\u0007h\u0011 lX޳\u0007|\u0018om\u000bnHXؾǥ*~N#\u0013MLP\u0010r\u0001s\u0015%3\u0014u&Hj\\g\u001b|܌7\u001cICaS-.v{]?on>\u0011x4i\u001fʹ5sPq\u0011AB;߿<YdV\r\t%>3N6\u0014\u0017og\u00077\b!s\u0003\u0011ލ!tv_{G(}7\ng?|ьZC1!Vh\u0015jw0ܘS\u0010DK)G+R<y~\u0016d_δ\u000fxuc\u001e0%x~\u000bs^A*T\u0004N|\u000eX1M\u001f,9\u001aR\t\u001c\u00122jqtm!Y-\u001enun\u001fzO+ryʽOO\u001f_<}+/ _ؼ^0\u001f\u001dƪ\rJ@ε\u0000$3\u0016h\u000fq\tLi\u000fr'{bq;?H\u000f:&w5g\\Re\u0019I\u0006cET\u0004u{0\u0002R{Jm3\u001c-\u0013\u0016\u0011EXe'\u0006-B\u0016\u00110{w\u0007W߭o<,\u000e[K+W_ƪ+Zmujp=\u001fG\u000e$֥ݻ~:f\tDR]1;&\u0015)){P@y#\u0003)}wɌ8(\u0014}!=taqS}?X|#@?yg/=2jkr\"A2\u0006>5YΎ[|,*|k+QZ4ys^\tp$\u0005\u0016\u0016\f\u0017bt\u0017S+\u001f[\\\u001c/~5Xi\u000e\\%\u0000Sv!RI\u0014;$[9l\u0001\u0019偨{\u0011c\u0018Ipe;)\u0014퍧奻F{'^Ztg&\u000fD\rV4\b9E\u0010r\u0019\u0018>2yvoP\u000f/V\u00044o,hD~D!\\鹺Tz)DG\u000bqm<lJNipe!V]eCD.)nkO&&<sJy\u0017A%f/\u0005i\u0005\u0011¨xK_7O6xgd$Ѽ\u001f\u000e_\u001d<\u0012/کT\u001d,,=X۟<\rßE2\u001fW(FˉNw\u0007+ןUov\u001eTO\u001f|kp`|֛=Fj{;Ўi&?u\u000fm*2\u0019\u0010JLt\u001cXV\u001e26À͘Է\u0007+\u000eEN,\n᫳vʧ[r]7b~\u0015SڨTÅP]E\u001aJ+؂d\u0000/\u00007Q>\u0003I9o\u0003M\t\u0007\"\"\t7\u0006(,+asdH0:a\u00016rLǷwΐ\u0018+\u0015܂J:B\u0010x{(f\u000b\u0016/FD'\u0019\u000f\u000e\u0006{\u000fk+'Je=$~^׵0\u001aR\tGrP\u001e.\u001d\u001c<z@λ\u0018\u000f\\\r=7wAR\u000bS*)\\t}켋)8MCӱ|8\fsx}#ed\u001apS[\u001d\u001eEKxU\u001a\u001a\nFMRt\u001ad=;\"C\rN$ޘas\u000e\u0002v\u0001R0e\u0001\u001ejl\u0012D\fv\u0010t6YWkݓ\u000fO*k\u001b>\u001a_{gk)vtSK;H\u001e,\u001e>\u0002Hwwc\u0011i+?c\u000fGk|vQ||q;X:o'(\u0001nm\u001e_7~_??TRi\\{Gbc\u0016\f~yŎ*6$\u001a\u00122~>'6OZ7\u001a]V\n Z^d\u0000L[]<پ\t\u0015/JFMvdx4Z\u000bp\u0015 !\u001aCGXb5[]hYs^\u000e˹\u0001֜ƪ|n!ɺBc\u0014\u0017!|R\nt$jBM\u0015\u0006\nq\t$^B\"^pxۋ)py\u0012N\"EBa9ݽ\u0006DH9F!|F41!'{ڄ\n\u0018Ƶ\u000bs!0k\u0004$\u000b?0i\u0010ɝ\u0001\u0011s.\rvv,\u001e'+hٴk#J-š\\X\u0014͍FFFj\b\u001a\"bvA.C6\u0004!j<(. \u0007\u0000z0\u0016/\u0003g=\u0010\"\u0002DՂt\u0012LԪѵ\rH\u000b\u000bSdm1XLUǤRB8]Hu$\u00065^$UǕZ\u00033xdƲR\u001cQ9U*+bgvmtWo[GQ8z|O{?ܹza7\u0007n\u001d>jUo^{%,d\u0012\u000f۹ц͸)<V\u0018dFy.\u0011+Fb\u0017oRM\u0007Y#V]\f\u0016~KÛ^Ye($\u0015\u0000Q[֫/ۺEqVM><ܟ\u000f\u0010͡r2\u0005.p\t\u0014j~x@ZH7\"nn\u0010\u001d\b/5IZ-ñ1qD*~kz\nm\u001e͏\u0001\u000e-\u0011\u0004}\u0018\u001cPj\u0015\u0012\u0011Na|G,њL\u0006q\u0005'BdP\n\u000b2\u001doBXC4 lVA\u00008dŧĜ6\u001f:7\u0017<a'[0'\u0012rheM*-\n!g&iyT~:\u0010j9Q;\u0001#Z1Uٶ\u000b\u0013c$ӿ^XI*57셏19q%-l]2f\u001d\u0004da\\(\\\u0012AXL3j)gBaD'k0&\rLN\u0002$\u0001R+ɜW\u000e&\"g\u0007Z\u0005)B.J\u0006BlBۂy\u0015\u0001&$\u0010Fbz:[V\u0013jo[YX#!ӔJdk8@\u0018._ޕ0RN\bF\bε6>v F3TiMɏ9gS0)DkCNXy0xO\n\u0017<y?n@zsh4\u000e|wJ-%Syﳟmxe\rG\f[MV_yM˯烒\u0005U\u001cИo_,V*w\u0017ޞ\u0013:q\u0019\u0002rqd䣛Xί\\Iun>xq>8\u0002L`QD)_W*VAPkry{?\u000fN\u0002d\u001f~V\u001a_vYN$\u0016bstɽO\u001f|B^}?\t:\t`-\u001f\u0000\u000fi\u0019=RAG&\u0019r\tBVG\r/\u0011\n\"8ګ/\u001d\u000f\u0000fҲ<fe\tJs\u001e\u001e\u0014IA畼7=\b\u0019ٽG\u0007lP*&B\bbVOWN>\u0018^{Y|5\u0001և\u00022\u0006$y/\u000eǨhhlaъ֓1l\u000bD|/\bͅ \bj\r݃Hzc\u0013ZW$u#0%r]2Ĥً|T\n|\\rls/'KC8\nM0˔\t\n\u0019\\L1׷0|x,D\u0001R\u0003\u0011D\u000b$c3\u001cE<\u001d-D(ĥ\f\u0000Rns]mcڝxe!(El4UY0DkHuѴ\\h5\\\u0005\u0007\u0015=!rZq\u0007ְ\u0012n&;rv^;\u001d?\r\u000fHPm\u001f=6+H$ū+rn& e!&Uv2WzN8±\u0010_W-!#K>|@쫭T}\u0003\u001f\u0013s\b!Z>x\u0004\u0005((\u0001TӰZ)\u000bi\u0017|@s\u0019hJ\u000ehɏ~/N\u0013\u0000qm%TGӂ,Bt\u001cD\u0003\u00153Jq\u0001دtT bBgÁFDMpDHY/\u0012Q\r`\u0011A\u0004\u0010Nʹ\ra2\u0018W\u0004\u001c,o^{U\"FK*\u0000_qE\"Ѭϸ\u0002\\NalJ\u00022\b,\u0018\u0013՚\u0010+ڛͻ.*g\u00016FV/;f>-Y,\u0004\u0019\u001b>\u0002T\u0002|!q)\r\u0001ِ\n>JV|_nIVZSZ[ho8C\u0012A/\u001dM\u0007jD&!Y\r$)'),ƒ\b\t aqB&5T,Fs#54\u0000\u0013S<\u0014ΪaZ\t3\u001a%\u0019\\26Њ\u0011I\u001f\"#u\u001e)\u0011`Ĩ/knL\u0014R<T%\u0012M;|\u0014+g0\u0010\u0019!\u0017$DUJ;0\u000ev?\u000f&r\u0001;~D\u0014~\\br6*dQqD$eh9/%(<Ĵ\u001f\u0006V\u0013\u0017f}V'\u0011SRV\u0006\u0015>!v;rH\u0016\u0012\u0001&r1<\"\u0016ØQ;o\nM\u000b˯VnwBRT16\u0011 \u0010!\u0006H\u0000('\u0019{JGH\u0019QɊZ\u000ec5WHĹ\f/t\\.,K0\u001bBiN\"8A2iJOhe\u001f\u00121Yo<8}!$KЪzyxìG8!RR}dMbbMt)\u001cb1xpp민@\u0005?yX\u0000b\u0010&\u0007\u0006gnD\u0010\u0003ڂ\u000b))\u000f\u001b\n0Zf\u0014̘U\u0018X\u000bu\u0015dRZq)UG\u001e3(Y\u0003\u000e/)FNr\u0011+R=<X\u0002XDF\u0000*~:\r>\u00000\u0006a\u0011ʬ93>\u000ed\u001a\u0002 \t\u0019q\b\bQy[0\u001aqU5`a\u000eSͷ\u001e\u001cTAv)@'H(\u0001[j:\\^?\u0014bH@P,^\u001a@wށ;)ל\u0015\t`\u0017\"@Xtx\u0019?*5\nZ\u001ddq>\u001df08\u0003zp\u0012w[\u001c(J35\tdBM\u0015*Ċ!\"\u0001a;\u0017lf\u0017`q`)!JsLhO\u00000\u0005>2{HG\\6|h1\u0012\u0012֒^YzRA\n,ƃ\u0017BT(\f-0cZ<\bҬ\u001cK\u0015HAS\u0015R\u001c+\u001b\\y\u0000\u0004`\nQ$\u00133\u000e\u0011x\u0002\u0017+JZY=G\u000f\u001c0,]t\u0010T\\58\u001bˎ\u0004c\u0010 N{g\u0017څY9 z44\u0005}\u0010͎$CyY\r֏#*\u0004\u0004H\u001d/sXv%6?)B'w!\u0000\"\u001f\u0011\bsV\u0019\b/\u001cq\"P`\u0000|P\t.D\u0002\u0010>h\u000et.{\u0019:\n\bd2N܌\bV^0\t\u000bsz)_L\u0000hR&_I!\u0005C\u0001\u001cDy\tZBh\u001bFvg0\u0012\bBGT\\vq\u000e\u001fsb-\u000elf{sjkv@dD\u0017by\u0016#_r\u0011f'q*\r\t8\b -{؏\u0010&\n\tV{Nڇ`{^BK\u0019yy\u0007vy\u000f\u0019dF\"d\u0013P|w.߿lE\u0019\u0017t\u0018/\u0012ƍ\u000fF\u001c!!@k'b07\u0001pk0O\\qxlDJKZNM8)~p`y\u0013姭Az\u0019AY\u00125.H+\u001a\u001b`\u001ef'J\tZ\b)V\u0014b9\u001fyB7@btL˴1\u001ev\u001cw\\lUY/YC5zB$\u0017+\u001bQ!5\u0000E\u0007\u0015|$H\n\tC\u000e3Bl}t܃\u0010\u000f\u0006\u0001W\nrj\u0017M^\u0007F&\"i\u001f*(lI*[2\f\u00136\u0010Xio}{Åt\u001b/@1@ంLi\r\u00172@\u0018\u001d]už'H2BF1Rr\u0007P;\u0016\u000fN\t~f3\u000f\u0007\u0014t{(*g@\n`\tp{sfԼ\rR*d*\f\u001ef%\u001cDe<>stfh\u0016@fո^JR\u0002%\u000f\u000bP\u000fZsً֋Sy&h!\u0013d-8c\u001d\u0017Ah=Dg\u001c~Ҭ┍\u0015P&~y=g\r<\f\u001eI\u0015;<y&1s\u0010'ouIX\u0017b>\u001cpQdL\u0017\u001bxQw(\u0014\nԄ^l\fBks\u0007@x&\u0002;!sJ~ikK͗-\u0001l΅\u0011\tcUFV\u0013T\u0014Gߩצ)g$\u0019yMSDI\u0007C\"g2\bO9\\\u0016IQaÈՃRWQAU\u0003\f2<Y׎C\u000b\u001aK(*ǒiKZ\u0015\u0017l\u000bO*RǳF \u0007q.{{\bHn\u0012\u00111fT\u0010U@ALN$H*R\u001czJFa>Yh-\nPќKz\u0011ȉ\u001a'\u001a%(A(t\\'8QƢ\u0014R\u00140HSXZ[yPEڏ\u0000\u0013$T!\u001d\u0003Q@s{^qɲ,\u0017ͫ˯}LQ&Cx>NYBzfAC`8H$T%\u0016h Dx@y0\b2,GPb7b;^s9?wmz73(hQ\u0002g.{/-N\u001dǏr\u0010\u0016\t!\u001c\u0014\u00191kq!mf\u0007B{\\\u000eiQV\u0010GJdjӿ3Z%Lg$\r2pdqa\u0002-\u0010\rՆ\u0011&ESIVtZUW\u0006ƫG/\u001f?R8mvM[|0\u0003$RLdT\u0001\u0004_K\nݺc݊Tz\u0000^\u001f/_nR\u0006\u0017xLN\u0016%R,fR͆>\u0015zbB\u00112iEbToT:7\u0015{\u000bn\fz\u00193\u0003UׇXl?\t\u0010#V+B:\u0018adh^qz5\\ަ^,0\u0019\"Y%Ci%8\u0005AB\u0011&\u0002)jOIy[__\u001e\u000b3.=k\u001bo\u001fm#Ϗ$F%AIZ\"0B\u0010Эb8Z=|xn͍\u0017\u000fVZ$0\u000b18g\\*\f#x\u0017°.\u0014Gޭ\u001e}׎[\u0005}3nc\u0017g}&;q% >OdlRi7qE9RʕE=1B\be]B:=x\u0015\bB9j)bk'_~tg?|\u000f|/雿߿9d2\u0018\u001cnB\u0006\u001c\u0019\u0011\u0019a>Z'n\u000e\u001a7s4xrs7OV|/ǿJ.A8\\N#H0Q0¡v\u0012;ʫ\u001bǣ^oo^\u001f\u000f~O~͓\u0007\\.\u0013F@\u0003zAZ&\u000fң2Tg\u0005vY[or{/_||peo\t$;}\u0017.g.L{8\u001f2$$\u001bC3{bǀ8X2>zyק\\'ۯ{qfW\u0006\u001b\u0007T#q\"hJĚ)(ZHy}}߾/\u001f۟?or?z^\u0004\u001e\u001e@q\u0018\u0010FIλXf\u001f])\u0017O-Ϳɝ۷\u000fO?=YQco5\\.\u0017rD)\u0012RR\u000fV9nWwW׿~W'_?O^]M'\u0015#<e\n8\f\u0015}ω\u0007\u0012\u0012q9rY:ٮ\u001d,ٗw|Ɨ\u001f=xcCO{Q.I\u001cI\u00160O/\u001f[ߒ}\u001fcK$\u0001̝;9w9}s\u001b&\t\u0018\u0000D\u0000$ \u0012HbH<\u0016eJ$J`\u001f{e˲wîߧs\u0001f:T<[}w-8\u0002oϿ~V=k,'\u0019VHF\u0016]L{\u0007/~O>}w\u001e_럾?y~\u0007Y9\u0010_(\u0000PmϜ?}YG\u001f\u001d?_>__|\u001f?}_OyYQɅ\u0012\u0014໓5\u001e\u001fd{?\u001f~W?\u001f~r~_/鯾?y7GG,\u0006#\bP\u001aMJJtYO?o+ǿ\u001b\u001f?\u001f~\u001fs;m\u001a\u0018e\\UyM?}}\u0017{7?~㏾q\u000f~OG/~ɭ_~7~Wך7'j\u0016X_Y\r]xe%[ldGGܻO?G'_ǟ{߽_;Yvm\u0005S\b+88~o;Dܟ\n|cǿu'y߽?~W7~?/m}aNhF\u0013\f 1!fEYoVKrYW\u001e~w\u0007/\u0007_\u0007xkIl\u0006Hed%vݩ\u000f|O\u001e[対_ǟ>o\u001f_n:K\u0012$QVͲ\f+(͚rgY[՟~{\u0007g~{돾zgy|Nnh)V\u0010 \u001d)UټL\u000erif^\r;G\u001fWo}ɗ\u001fl|x{?4ˀ\u001eL(A3rpz,-\u0016m=3%joã?/>/{苝woWu\u0019GHJZD\u001d%\u0019m6m\u001fϿ~/O9ܞT#CvTCY\u0010l>\u0018ybV@o7+_~4}i~7~\u0017?}kG{[ͺf\u0018C\u0018\u0003,pfШIEz\u000eu8]jN*\u000f\u000fZow?z<ʫ\u001f=ۿ5o27f\u000bz\u001di\u001eUTdRJ\u0006ެߙf?~4\u000e\u0007\u000f?<wwO{\rE#D*\r\u0001GNP$J\u0011ɨA\u0006Rn\u0017'\u000f~k\u001f~_^\u0000\rbZ\u001c\u0012(\f7\u000fK^>߭?yNݯ;\u0006ybRP`\u0017\r\"]ڨND\u0010Ly[\"}gfww^{vka\u000b>{UL\u0010\fMY;D\b'%hJ\u00157\fR*C,d5GwZ\u000f\r\u001dvfI8\u0016E1D@M\u0013'&|\u0011%P(\u001e\r҉ưjpҼ]|Zӷv~ɝ{ϾgrG\u001f\u001e\u0007<\u0019=qL!&4S*fQE\u0019\u0014+BsXI\r{>\u000f_\u001b?x5&\u0018e-7,[q\u0005]dUd0uW,il-#hNݭק\u001a](\"c\u0018r~za%̔\u0004sX5r>W\u001b9'q\u00144\u0006h8bKr1Lq`Mg!`D<A\nR.46g'í42\u000f[MvFi\u001c̭Zf\f1Ƣ)1<\u001c`2\u0012W\u0019&MG)ʩqQm(\u000fs\u001f?koݚ\\\u001c1ZԴ~e\u0014\u0010\u0001xp\u0004]Vt\u0015Eo6ꕂUt#*iNJ$C#i+)]R!TfDW_˫\u0015ʭT\"fl\u001dXlh6ǈ,#DbH$`Y\r\u0011\u0001\"3#u\rKY%8\u0013yE#)\u000eD~o<>v\u000b\u000bzPC\t²w-FGBZfWʴq\\\\-\u0006\u0004[ylA|umS?ULV];\u0012M^Xxcgۯ\u0004R/-\u0016TJC_i\u001f\u0015+cat\u0011Z|Q\u000bRxXy?sm;LS\u0004\u0011QNד\"(O\u001emfw\u001ex'NRi\nV˹Uբa2(+R|Oq׏\u0016'\u001dF)H2F/\u0016ĀÈ1]sQ\\8d@.)1P4WR\u0010s\u000b~_A\fX>F)Jk;`4岹8Jq\u0005#u?vq1\u0012'4_Z\u000bR˟{yui\u001dAҊ9O\u0014\u000bh\u001a&e\u001cQ2ѕχ\u0004p\u001dFwLs؍\";vNAJ$xo9^\\Dy\"3\u0010K;b~[)̨m Z\\?䋁$2iR\u0017Љ(vZE\t;BZ!̠?p{5.dU\u0003nf}J\u001b8\u0011$'6cv8-\u0017Rh\u0005lB\u00107D&\u0012l>Ng}\u001c'uLpxFEj^\u0018*v#M\b\u0014'FJ7pr4.W+ѵk3J\\\tǹ,d\u0012DP\u001fX#B\u001fO&jF)׏̧&k)u\u001d@\bahQZⳌAP=[х#㉋A6%s\u001bR~8W\\0K9^CǵR7:ǅM\u001b\n^DNN}|*Jaf֎֙V?^Jx\u000b\u001e,?4\u001b]\u0018{dtoRa˟..B\t\u0013\u0011?\u0010Y`\tg7ڙczR#\u0014vi\u0011\u0002r\u001b%MN.G$\u0011b~=˗b\u0007QCt.@8{#\u000e\u0010JkO뛷cR\u00013\u001aIL[M*Ic랗PV+bi\u0012([ݍɫt'B\u000fw¾ڼEgP\u001e\rtXv\\qfbq\rKAP64^f~ϫō\\6\u001aM\r*;\u0006w\rq(\u00166(yFe!\\crZ|agzqT\u0012`\u0017q!5DP56ä\u0010˨ڈPbw۬;%n\rr\u000bQ(\r\u0018\u0016\u001aMڞ?.\u0004\u0013\u0002ov\b\u001d\u001cL\u0004(e\fRF?\u0002ENXր^&ւ$\t[I\u0018\u000b>*%\b\u0014)%Bg)MBS\u0006itt-.I7Vb3ʖ0u͂\u000fM\u000bz\u0014To&6܄I>\u001fc\\h\u0015DVTɍS+׏ʵK\u001er9J2\u0001<\u0013!\u0010L@\\1,\u0006(DȅM9\u0019\"\u0010A\fd\"):+e\u001f\u000e\u001a\u0018LJ1:G0a\u0005Sj|i5(\\0\u0015Lao!rj:mpn\u001d8>әTV;ӹgGmZu%ŤI[i_x\\~\u0019E\u001ad\u0017w>uB\u0015\b}T?\u00103?a\u0006nhRSE\u001cl\u0000e\"\u001d42ӑJ3{rgF}ߪm|tzLǙo\u001f=^mw|<{[}4\\OebB\u0001J/\u001dd'L,ϟ9e!a\u0010\u000eI&o?ܺ!eu/\u0006p\u001fikkѣL!f#l9\b]\u00150\u0012`Z^kI-6\u0013L\u000eja:/^\\p\"\u0013\u0015j5iTvl>۳;R~\u0002\u0014R\u0005:)}Hep\r\"\u0016F%\n1ø\tǺS~-:4d\u001a&\u0019o\u0005\u001af]\u000e\tA2U\u000fSRJ\u0000ٴ١sS*6{^L/Z،\tUP`\\\u00175;i{'s;5G1(K-J\u0017Y&\u0002>B\"+g~\\\tq{1\u001ddh\u001eZY\tq\u0005\u000et\u0005/\u0007^\u0010\u0001:\u001bba0a\u001b\u0017i\u001dڤ\u0019 09h7֞@s3\u0010T͖Tي9lR\"t\u0006f}qK\u000f1r\u0007\t\u0002u\u001f[\u000e˽d3]#2pxT6o~\\3̗Cr\u0013?\u0000NyDjs]kp\u001acCiݴa!(eh\u001dk]T݇\u001fO;6{+'\u0006{mxqR2N~iy}\u0015ZuwpVÇF`rV\u000fn\\,>[\u0016Ӡ`,д;\n[oI\u0012粠ۤ_\bs-!/\u0014\u000fƩ=2\u0006t֙T;f{7\u0014w\u001b\u000f,\u0014CeZtvC,m\u0003*\u000fӔT\u001aԕL~o#Zϗ;׵rBr K\b5rnѹ UGw\u000bB\u001a@H񝯓f/}:G:fQF~ׅ\u001735P՘%bB)\u0016~]z쉩AT\u0007\tbb0\rڵ\u0010\u0016\u0011\u001d'B\u0019=b\u0007\u0010fi7BfLч9A(')g߲\\!!V\u0004_FRJm\u0010o\u0017''o^\u0015F72\u0003>?d\u001eJ{jm{LO\u001eƏrGre\u001fZki-*\fUަ)E\u0001\u001c\u001ct[)o\r\u001cmǹ\u0006\u0018|Vo7\u001f6O\u0015GZi2=o<gtf\u000eW7\ryw\t\u0002REjszHwst}\u001dV2{[Te\n#~LggzRݹG\u0011RML,MC\\%t~\u001booz2mB\"A}\r\nendstream\rendobj\r20 0 obj\r<</Length 65536>>stream\r\n<OCB?yI mfop\u000fK?\u0018v\"lQtG}Graz5\"F\n_<\u001f^Lo~T<ĔJgn\u0018cY\u0013swpS\u001e\"R]\u000fN\u0000\u0019w\u0016w\bg\u0006\u001d=\"8c{m1PI魭\u001boz qUځP\u0001b\\4C\u0000EL5\u000f\u001a\u0010ow;1aGb0jS*;cݴ^R\\\t\tVqv_v՗\u0006<S'7v\u001f~\u0003ƛTo\rM?aiG\u0002xZ?-ow$:k7צשLS\rNi|:W~hNLл\u0006\u0003\u0003J\u001dhm0A0Vh\u0013\u001dcZ#)W֛7C֭Nwݻ9:~qWLl\u001bBnlwNOޭͽ\u001fYu\ruhX\u001fJ\u001bCzDfmާ~γF\u0006mVw__\u001fjR*ꝳً)k쥲\u0001\u0011zcsݔ#)l9c\u001bW\u0014\"9wH;m\"7&\n|86\u001a\u0007\u0011ڊRF{g^j[V\u001c\u001bn$ʸjPLi\u001c\u0018\\\u0018!;<[\u001eT)ov\u001d\u0003\u0006\u0001R[fm;HɕѵWoۏ>~Q>3\bG^<x{>܊q\u0005S~ZyVyT~\u0012aKϾ2{\u001dL.\u001eum\u001f(oV?x\u0017ό\"26BTPK\u0003\u0000DqE\u001ct\u0016u\u0017|+A|OE2a\u000eY{,\u0013oBzy1\u0002L\b=z\tR\u0014)wևڮ?mD<TB\u0002u'\nntۻ\u0001Lڎ[\u001bgn_ټ/W6L\u0003a}\u0007nＺzv|\u001dcgנBvfpn\fn2>F'׹?}OnǄ\\yzvv_{ZxAg>i4\u001c<\u0015\u0004z;>0NrfM\u00062B\u0010ӻncO\u0016>\u0015Grd'wkNG\u001c3#+fnqtƴQݽg\u001d\"wQۃwoTFOt\u001f#ƀ/K\u0011\u000b)֞;av\u0015&w1\u00183*=\u000e.au2;y\\}+;~(\u0014n<>_\u000fjn0i\u001d+)\u0010lZ\f5P\r.Uû\u001fl\u0011H;?\u001d\\Gn\u001fxMi{tr\\c+RONnegZyK*l=.\u00146ӉRvc֣j\u001cݵ-Zj\\z@jpZJV0m\u0016\u0000\u001baø{i\u001d\u000bM\u001cD\u0000Kٔ9!͉T>p\n\u000fA;)cl1gJm><*\u0018\u0017Qj<Ɓ\\v4h\n(v1\f QSyɃ\u0002Ci\u000fJ'laTkrq;Rm?\u001e?Ɨ*As\u001b;\u000fQ\u0019s}\u0002\u00199\u0003{\bꅁY;fs\u000f\u001btLmȅR&\u0016|$!\u001bjHo\u001c\u00036Ц`Ξ(kz\u0003\u001brfk\u0011(@R\u0016fOF+\u001fC\u0015%eqt\\e\u000f\u0014k>6սLu>8kwd6\u0014R@\u001e|i]G?-Oq;n\u001d.m6ugx\u001e&-7?ݷ\f\u0014ٷ@n}M3}\u0014g٥A)c\u00068\u000bgqtWȎxxfi|?xn4r\u0003WΑYLUrh\u000eXz\f<4[a<c\u000e!c.iOR´6];\rLk&Bez}t*B񤴔ޱzw2C+\u00180UMը\fUt%ȯ%8[rZ7tfm\u001dDK>ZM\u0013~*\u0000̴Ӄ\u000b&\u0004y8Df@f1\u001edrI!X-oZ%3-{7\u000f\u0001Xn4e}5ʖ\u001772ĥ\u001env@L\u001e@TQVil\u001dMEb\\k1\u0014g]v\u000eZJIK\u00052&y\u000fY&;\r\u0002\u001b\u0000d\r\u001exR\u0002mՌAyz{|=%\u0007QQ{J ^ir2U\u0006F\":N@H\u00027={\u001b\bG)o_^\rraJ(\u0015\"M8εvj۵ \u0015\n{RHmÁȐԺjqh|0\r3EqxUm\u000b[Bi\u0017Q\u0010اǯ\u0017G\u0010t\u001eQ͝ǥ\r\u0007)5\u001fkZ\u001aͧUN\u001a\u0004[\u0018n}ob1nj}s*\u0017;{)\u001916B~7\u0010\u0013fi{\u000fUkQ\u0011᪞\u00157rѳ\u0018\u0010j\u0012ΣT_\u00033B7{KRH\u0000ZN\u001b\u0010b\\Mo];r\u0007QeDfjv\b|Bq\u0013R\u0012\u001c(i\t!6qg\u0012Siiz\u0010\u0002/q\u0018w\u001d\u0010^Bť\u001af@Gop\b)\rP2GR8O\u0015wF-)mtNs\u0017[w?*m>y¨\u001c!8\u0007ԎuTmNB\u001ëe\u000ffy\u0019`*Hրք/ߺ:cwiw\u0016qm\u001f\u000f\u001dXŕ\u0006tU[{\u000ekw#I\b\nX\r\u0004An\rBE\u0002e\u0014k\nN\u001ct\u001f탹C\r.ATPjWg\u001f҅\u0003?_\nFiUdjY\n1ޔJm/֎Q%L]@D\u0004Yn8t!\u00128&>H0!TUwoWۼY/)0[\b\u0000Tvy\bȺ}z\u001dn\u001dnvnZTҲ6t1&5H{\u0004a\r^ݫl3*;qʞ>hN>Yq9YWGo&*\u001fSl\te1%I5\u0015Xg(=<N͟&\u0013Xwjvn\u0007zYIݴMiXCĪV\u00000J\t1Ki6Νo^a\u0006a0f\\(F\"\u001dƤ\u001f|V}\u0000ڔR\u0001+mQbe[n\u0019=8\u0005Byۋ@\u0013uI{dޏ\u0015?B\u0006'fs?\u0010}\u0014*ȠQ~>cP5\u0006\b\u000b6q\u0004\u0010rS\u000f\u001c lJo|:>:G;#:\u0001!18\tMp\u001bZZ\u0010\u00103/\bS\u0007)3䤿s\u0017+RF;6X{HmORdQ\u0014\u0003\b=\tq5\u000f\u0002<[^\u0017\u0018\u001b&\u0004\"\u0006&VLj%d\u001c\u000bH\u0017W\u00110\u0011\u0015\u001d7_g{\u0017jBŴJ!7i\u0017B\u0007F\u0005kVm3%f\u0011PeV\u0011\n !\\w\u0019&N0kfbT\u0001uQҡjez\u000e\n\u001f\u0004\u0016J\b|_Iyc~kxD.mT4׿V}\u001b\\_Kh\u0016\rqFJ+吀i-qT\u0015s\u0010f,\u0007\u00187\u0007Bn㕥u4\u0012\nX)V!\u0014T¤+RN\b\n靨X3%(?Bo\u0007PɬS0Sqgz!%ոpn2#\u0003\u0003-6qEbq':!\u000es\u000e\u000f\u001f~:[\ru\bF,\u0015@d\u001eK)moxy[)Os00\u0013\n\t8$m;7\u0000Z\b)_+!*U|\u0019*wxw\u0013v\u0016늟H504Iɭrvc\u0019\\\\\\X\tD\u0019\ba\u0014!\bÊҶ\u001f\u0003-E9\u001emr\u0004P\u0017e\u000fĞޡY\b`R4<LBkBa\u0017u1&@)`\u0001Rr z㙉ݺQ\u001cu'DΖ\u0006P۫1ޓT)\u001d\\vgI*uOiMnZ\u0007A\f\\OR[Њӕ0yŋ].\u0006Hw\u0019/cTN\u00003ۏ6XF3s*K\u0001\u0002L5ۅ\u000f**g*sM \f_ǥ\\ܩ1.C\u0000Z'\u001ez mvӫAf-*.\u0006Kk8Rڕt\u0013e^8ᬅyl=EH7A\u0005\u001dL~\u0007s\u0011c\u0001\u0000\t1YRERZp=yo\bu%Nŀ\u0016Vr@Juq\u00183ILc??>:~>9}]o\u001ez08x*DY0zvB[@\u000b3!I}Aa\u0014f/;\u0003\u0019\u0018_\tSNJ(/Fp%NY5jG=\u0019\u0005Ik1`J3\u0005/\u0001\t\u0019\\(\u000eDzB\t\u0011\u0019m/ȥa~zD\u000e\u000bu6JaTޓJ[qag\u0019}6;W-29>\"U2pTm'Z=\u001a7g\u0016CL)\u0006p!_\t1\u0017V\u001476-VC\u0015N[1*KX|\u0014\u0013)}oy1sGvZ\u0019RDxe9qٛ\u001a9W='ou$*S0\u0004$e\u0010@4\u001cH.\u0006<rm=iE,\u0011Z\u001cU,\u0005/\\\tjE<V=\tf9Lę'\t%jSF2{\u0011<wK\u0018\u0007ee?zu\u0015]R)\u0011<%\\\u0019X*\u001d\u0000\u0004\u0002әކ\u000ee5u-LQ'\u001dLgl\u001eJI6.&7XTi\u000127FVeY,\u0004\bFITYAf *\u0007[\u000f~:\bW.\u0005I-\u001d>OJ[oŤ0ȹ!\u0012B\tjxfQJ\u0007Q&Op!+0Őh5̍ݴ^\u000fOvr@٢lqgր8MTF\u001e!f\u001f[s\u0013DȫA~t\u000b\\0ZzQcz\u0007\u0015T6G\u0000zuNc\\\u0005j\u0012:$\u0002\u0004\u001f;iZ#`\u0000\u000fbh\u001dE0$\u0006W[gN&\"@K\u0013\\:C\bOJU$\u0003{G5\u0010L_YGhb\u0014ǼV\t\u001c㗃\u0004%?4g\b\rRbR=B}O]K+\u0000\u001bQ*uǢL~>/.m\rss\u000b\u0001ŕ0M98y\t7*I:\tWK\u0011OL\n\"F+\\ω\u0005S2LRnZ\u0017\u0010\u001d\u000f3侕m\u000f\u0011s6W\u0012ZRPś\u0010On}\u001c\u0006\u0013\u0005PM)E\u001d\u001dHR5\u0006\u0006FL㄄\nYv\u0017\b\u0002#S&\n\u00100a\\{z}g||p6_9c6r9D\u0018\u0011Q{|v\u0013\u0018FRԟ\t7i1\u0018@\u0003B  BE,oC/'\".\u0017s\u0003D,\u0006fZkS\u0019(]\u0000K\u0018wF#yR*\u001eNޞ_\u0016dbsm{R&n[:|]k\u001c0\r&G־\u0017\u0012Z\\!!P]\r\u0015_\u001eC&\u001a/ebJ{~Ev\u0013P0\u0019Iaxr&xf\u0010++1\u00111-\u0001KMԺݽ\t%\u001d7KP!^,9`mXw\u0002)[iM\u00171\u001fj\u0004r.uRR3>S\u0000ۊP\u0000^Ō5(״\u0005?\nG\tD+m\u001d7B\u0000Z\u0001\f\n]*޴m\\XrG\u0001TBQ \u0010\u001d[SW}u`G`Cik\t?\u001a}\t\u000eb L2ٍ/m\u0002\u0010zW(&D&&&&nAֻW>7I6V\u001c-W#lO>,DBm>6kIv12&\fYw\u0018g]\u0010JŭGDn#&U+i\u001b!\r 8a KŸX3D\u001c*rX]'2S/.\u0006R/-i0k1śRb\u0007֐}\u000e\u0004FZk\u0000ޠJFjS\u0016\u001c8\u001a!&GϝQ\nL+z\\#Rͬb!qiz<:uLK\u0012;t\\\u0018$|\u001ecl\u0005U\u001aKa\u001a#D\u001eQyy>\u001bQc9i\u000eB\u001cǯ76\u0004p+)7¶Tan %dF}'H;\u0017|zʌ5\u0012tO%I\u000b3^ru,sĄj\u0005T>XhkPaŵTȂCi]\u0011aܔ\nL\f74li=-\u0000>)\u001e1ƕ)\r\u0019\u0006\u0011m5-(ReJE/+I)%B \u00051m1\bI\u001bsUKV8^\u001c(mܖ+[@IDe\u0000r7Zo7{@,\t1&0X9=x/\u000f:\"\u00194q>\u001bc\u001c`\bvbWS´/J\u00114mtNLnd:Gډ\u0010r@+}xƃ\u001e4\u0013!A7ss?)6\u0007RoMڀj\u0015z<\u0004q\u0012j#!Va\u0002\u0003J5b@e~)L\u0000\tŝv䭄Y\b0K\u0011\u0016E\u000e(\u0004m\f÷P\u001c!$l{?J\u0018*\fޕrFB\u0003\\d~\u0017\u001e\u001csTqc1\u0007\u0010TJ$\u001bJ\u0011\u00126vSR5BX 2\n\u0016S\\\u0000ʯ&\u0014ƄV\u0010bE/d\u001aRy7L!TUZ-2j>\u0016qTw8A^X'V\u0002xb~KA\u0012l\u0011%W|\u0017b1K'rj%i\r\u00197Bnqp\u0006i7\u0016}b\\\bMݕ\n\u0007bQkك\u000bK߸\u00147$ĦP\tM(m%<cyŘUB(?J+6>cw|\u000e `KA\u0002UԉBtB4|~t\u00021O\u000f:=\u0014K\u0010z!0\u0012F;ԵV:[L\u0011>\u0006m;\u001a\n\u0015DqkQ\u0014\u0015\bO3T2:_\r\u0001X1\u0001X\t~\fT=S\u0018f\u001f:w-\"|)DfJ\\j Zq7!\tg9/\u0010(!L,ƹ\u001cS\u0000_\u001e,ŅW՘\u0000\u001d1}D퀡gz퐲q2\u0003q\f*V\u0011J\"\u001ak\rtaͷ*ySfJٝA4h8\u0010Rq%VÑz\u0007\u0002\u00114rX\bS9H\u001c눲\u0018|qV\u000e0\u0017U/!q.oS'&P51܀׊7`\\C\b\u0012\u0015\u0019$BM\u0013!¸q\u0016\u0012\u0001\u0000P  I{>>bɗ^\u000b\u0011\u0003&bb)\u000b\u001dYJgW.'B\fV#\u001d\f>t\u001eP%ԚRH'KsJ0F[N&kHN\u001a ͗\u000b1(_\u0006!&\"撼V+Ѣq*ę\u0002atVmYX9a\u001a\u0001\u00061g桌p\u0003t\ti>WyRn\u0002\u0000A>*Vl\tHUFw0@R\u001d>`Q\u0010Lg\u0019{eo\nWkq9%\"ty9&(Sč~,\u000011c`_1\u0016\u0013aL\u001a\u0001r\u0016\u0019\u0005R\u0007.H\u0010XLkjy\u0017J\u0012\u000bZ\n\u0011Wd\"RS.֦IkKYW/)ū\u0001\u0000x\u0007Ӻ\b{v\u0013\bߛ\u0017Sk1\u001ed<f!\u000f\u0006H'WikC*ƅ\u0005?|-\r%\n$L[\u0003!\u0014\u0001\bd\u0015(\re@\u0019\b×?Ɖj-M@\u000fcrTf\u001aW/-\u0003\u0019u|y\rK2\u0018&MrE\u000bK\u0016\u0002I2gD%O\\eO\u0007\u000bM\u001f/xHL'\u0011^\u000b𿗼\u001d9Dß\u000b^ȏ\u001e\u001dƸ\u0012'\u0006R\n1nraà3W.2fP\u0004ۓ۴=rAe\u0000\b\u0017\u0011#l\u0016ȏ\u0019\t\u0006Xn`4\u000eα#|\u00126>\u0010\t\u0019\u0000M(k\u0000\u0011gaO]\u000fFջ#ծ\u000b30_!偢\u0013|\u001eL<FJ\u001f̌Sj{>aj2iILfgwQ\u0007\f*vu%E{\u0000\u0012\nI*q)/.!љH\u0015@&D\u001b|v\u00001ӏW\u000285IBE<\u0007a\u0001_XR1\u001a\u001e* >Z\b\u00119V\u0004wF+F1\t9H:1\u001ex \u0012\u0004P3\u001a'Jy'N{\u000f^0]Ku\u000fn_\n\u001a\u00031\u0014\u0018w\u0003UX\u0011\r\u0016,j:-B)\u0003J(g\u0010*c\u001a|\tJ}}=wi5ze\r\u001a`L\u0019\u0010B\u0001\u0006/1u⊗\u0002\u000bDE6l \\7/Gp5\u001eL>D]3V\u00171\t\u0018Hڼ,\u0006 \u0003T\n0xZ\u0000Q°?\u0001\u001a\u0010S\b <)Ok\\\u0013k1!-74ZQ*A@]\bM0/y&b\u001d\u0015\t\u001c\u0013_ZI^^Dy/*A! r=!Sr\u0015^'#\u001cTH\u0010TR G\u0015\\i\u0002FR\u001e$\u0014Dm6;I0\fBP@2\u0012 q>-U\b\t\u0016N\u001bIz>\u001bV\u0001ECS,\u0007\u0019A+Q!UeL'¿B\tR\u001b\u001cUy+CY\n)n!\u000f}5.(G*rX$j\u0017\u0007\u0013|\u0015z>ZOfQRDZ2pJa\u000b`+\u00110\\~q\u001cxeJ\u0004u\u0002[MH\u000b!\n;Kd\bg Jƍ\u001fwC\u001d*\t\u001d\u001baf~\u000f\u0000N|I-rq\u0018bA\u0000K'\b_]x\u0004hFF\bՠaW@*jkCh]X\nF\u00043V\"\u001cM+~:\u0019\u000bln\u0007:\u0011JG&h\u0007\fk-@\nsfd9ȮG%xE.m\f\u0003I\u001dpk)\u0011z3y9\u0014BM-hcbş/W\u0002*6؄WT:tX6X?&Xg3ʖ\u0003\u0019,D,fjŽ\u0010Yau\tŰ\u0006\u0012j!ҊsEȿ E@]PuRy\u000f!;\u0001\u0010\u0012/\u0000\u001aJ)QĴ*\u001d3v\u0004l\u0013!-a|֪\u0013p0W\u0002Š&¸!L\u0006(%\u0002\u0002\u001a\b\tz\u0004GnBRrLq9r5d1\u00006\u0004AϏ\u0003W\u0017y<\u0012\u000b\u00173Dk5Q\u0000aA\u001e'\u0000/\u0018;\u0011ޤ\u0006\u0010\u000b\\-1}\u0004\u0018a[J\u000f\u0004PNSR\r|j\u0000\u001f\u0017wCKji\u000b\"@\u0005av%C͔&7(g\u0018c\u000bV:P7m!jB\u0005q[\bggr8Pt\u0000p%.xӡs\u0010;aln\u0016@k\u000b\u00144\u0017|p)@\u001e\"l-B\brU\u000fK//A$ &C|88wK7*zcz\u001aw~}+g)\u0017lep2z>4s5\"-&M\u001f\t2<{ U\u0011Y?XO]0VDlp2\bzi`J\r2>\f\u0016JB\u0007g!3Tf\u0012׀\u0013*0\u0015p\u0011i^\u0011\b\u000f48_Pi\u0003?A2\u00118i|EjJ)n~on\u00174㔍\u0006\b\u0006\u001b'gA'eB`|~=N-\u0006\"7!PH\u0014dP&9OY1!͞T9d\u000b!^/\u0002zSrB,\u0002p\u000e@*\u0019g\bڵ*iTv\\h@A\u001aM}n8\u0012&\tNR-\u00170s9&j\u001f\b\u0016|)F\u001aBR\u0006r3\fRvQ6*qͽk/y\u001b\u001bH}\u001e\u000fI{\u0004\u0003\u001dc\td\u000bq\u001e%-WH\r\u0014\u0014\u0002PHt1\u0014KkEOr]\b>vT\u0011ri7F\u0011L\u001cTۗTVBW\u0003,lbd\u0001J\u0014:Nm\u001cM\u001f[ݛ3[\u000e+\u0012\u000fsze)O(/;9sepy!oͼi7\u001e\u001f<׿s\u001a 1\u0018SԖ?m\u000133fл֊ŕt5,-لP\u0001I:YE\u0010}}\u0014\u000eq;ɕ\u0012\\ޛ\u0000}-Z\\\u0018p5%r\\\u00004ѥ$B6P\u00040m)\u0017\u0014#\u0000F1i_7;g0n!L&\u0005/:ZOT&JCX\u0018\u0012Z\u0017u\u0017Iv0i#U B\n=q\u000bhO,$sߴ+MpTA\u000en\u000eSjk\u001d\u0017C8)go\u001a\u001b\t\u0019A,(D\u0018\u001b,@Df޵wA..%\u0017\u0003Tt]A2\b]\u000bjȢ72\u0001<4X \u0002Qf3@\\j'|a/|YO9~\"C\r8]K\u0000̬;%2]`-?j.\u0005K\u001et5{c\u0017.\u0005B\rLjxR w9\\`/\"@&\u0001\u001c䫘E\u0006\u0015?q3\u000b|1eu\u0015(eΒL6kI-L\u001f\u001d˞%\u001f\u001f*T\u0011t.{0`0􂟍yLo.l\u0016_\u0003˱-\u001eJ\u0015!2+Aʇgb\u0010\u000bՄBj-'U4V b\u0004\u0006x\u0012\u001a\u0000\u0003@\u0001t` \u001a\u0003\r=\u0012\u0013?qA[)\u0017Fs=\u000e  C\u0013Aʎ1y@e\u001fTf|NNFCg$BK|)=B\t(\u0000΅\u001ea~\u0018\"\fo\\@\r\u001d%Q:\u0017ʸAڻ\\n7L篆\u0000!\u0012fX)\u001d\u0017\u0003h/6\u0004\u0016L,]\u0013\u00108\u000b25ԀL'd[\u001b)RW\u0010\u0011SkYM>P\u0000\u0017\u000e\tƅR\bM\u0010\u001d\u0003mTQ\u0006GH \u0015#m\bљֺP\u0001\u001cJJ,S\u00178QFr\u0007n<H\u0000trZ\n{\f\\o\u0004r\\Pa<btSѼ/x\u000b\u0010\f\u0013\u001f\u0015WW)\u001fG\u0006d\u0003\u0012Z!·5ĈX~Ba\u00075,J\\Ff>D\u0006E\u0006$zBKWk1E-mw\u000f\u001f\u001b͝0\u000f4t\u000eZ#f`10ZG~\"\u0017+QJT/\u0007\u0001*J:Ai9_)\u000b>\u0011\u00171\u001bis\u0002U6!t\u0000A,\u0019(0)\u001a\fb\u0003\u0012V^}\u0007(\u0015`j1fWP)\u001brV>\fhUۇ\u0002\u0004\u00168*cJ/v^5\u000f\u001f~Շ\")7yg3!0\u000f\u0002Kjm60\u001cU\u000eJ,l\u0012f\u0017$ʔTԻI2>\"R:VlL\u001b0]t`]Bٞ:Hgzz$7<D>H.tR2\u001aQ\u0015 KXKB2MԥP:Ễ;\u0003\u0011\u0015\u001a*\u0016\u0017\u0011\u0011z~ďW$'&ĩ\fa4\u0000\b ?%6R|m9_\\OE`*\u001a\u0005ӡ12Z\u001b\u0015\u001a@//'>wɏq<>LL歹=yVˡ7NWr'\u0012\u0005x\fCUT\u0001p\u0011wNpUښ̗]\u0012QIu\u0000){%*$\u0014(\u000f?Q\u0000[W|d\u0018QS\u001bgA:4amZ>&\u00127Û WA\n%!io\u0017,E(hY4k\u0007pl\u0017\n|JL\u0005Öb)RmzH6 Da1\u000fx\u001d\u000e\u001d|a\u001c\u0004Y醙*B^>L?d|q\u0017A8(`J; cr\u0015UkҚfZeQ=\u001c\u0000'\u0004)\u0011$\b\u0003^ø3\"e\u000fz՛\u001eL\u0010\r\u0010t4 L>\u0007*[\u0010ߨ H\u0017 mQZ \\\u001e᳘T\u0013}M\u001e\u0006:I9(ĸ\u001an+{:\u0010W\\A\u0001\u00101f߯;\u000e\u000b \u0000`\r聟\"R1ۿ6?O\u0012\u001cW\u0013B\u0013i\u0000zy=\u0019d97\u0013\b\u001ai\u0013Fy0_\nY{(_\u000f4\u0002'.Η2\"T~u&\u0010lc\u001cS?zi\u001d\u000e\u0014m>l#b}\u001d*s)\u001c\u0001\u00021M*k\u0003\\Ǚ\nc̯\u001f,\u0006\u0010\u0001\u0000[\u0001\u0004\u0012D(G ;kF댳\u0006I\u001ca\"#e\u0007/.\"pcRc\u000555&\u0000rB\u0012SP7uZ҄CL.\u0003\u001b\u0011*UO[o[1\u0002\r\u000523Z總\u001dk)ke~\u001dč\u0012R\u0003\u0014\u000e#\u001c*U\u001f!+-Eyq$\u000f_\u0003\u0001&ljbz)\f\u001e\t#ɺ1v)B\u0003Av)įF0\u001fN/\u001fDX\u001bۤ3\u0000 0EP\u0012ոL\u001dDn:8֯̀Yo$Y&^P=\bdeDtfﻙӝ\u001ad0\u0016ƞ\u0011EfUVeUumS5n̠%=h$\u0004\b\u0018\u0001zу~t,zZ\u00024\u001ai\u0004\b\u00101M\u0007t7|̌gBns`\u001b1)/\u0007Z'm\u0010{ln><\u0012j3FbaJ͸PHJ%u09y\u0014:%AW\u0016\b\n*U戅em\">\u0010f\fQ\nj(_bFdlZER,pv\u0016Rq5\tet\b\u0011D\r\u0016d0&Tg9]\u0000ɽ\u0000\u00194.3\u0000OgF/?}(L^,Yka\u000e\u0007/%\u001a\u0002z8;ի\u0000{\u0002ynxh4U\u0001c#\u0010<\u001eYqE-H\u0006`R2zA'\u0018\r\bv\r`sQ\u000eh\u0016VMY+q*o\u001dcZs\"b1Zw'=\u001b \u0018\u0003\u0012^o(\t\fxcuNf\u001b'\u001dr2\u00145x\u0010\u0001I\b\u0007\rʸր\u0019\n#r.\u0014v8X`\fҎ<\u001b$;|\u0017\u0017\tO\u001b\bT\u0005Kn)\u0007{Z\u001a{)OCOpW^\\,ncr+(UH~?Do\u00044P.5ըX!8\"FRäzE<6p\u000eoa(m\u000e|\u001e훭\u000bze\u0014Ors껜; !༲@5 ˣ\u001d t;|9\u0004I\u0013TDv,=cuvϽ{+{[/\u001e%,63KU|\u0019(x;p1V7θk\u00116Ng\u0000$ btv3.Gxp`XԻ]+\u0016z\u001foiP\u0002D\u000e:b@j\u0000BzeW+Yg\u0010\u0017KqM<iNn8Rk\u000e'_>u\u0005i%\u0014\u001fXUK \r沓8vgշ\u0013*\u0019\u0017P\"niݹU[yBǁu`30\t9\n\rTXK01\u001b1$)\u000e*5sZQR\rAƉ\u001c.^c\u0015W\u0005hۮ&g\u001fPIXݴՎ\u0015h Ⓐޮbʌ˳V!&@\u0002\u000eJ)Bli\u0013#rG+/\u0016IэݽFNv\u0002h\u0018݈8\n%y\u001d<\u0010e$WF\\E6?\u000e\f8Z\u001dYX@;AŔwz\u0019\u001bztu}T(~.\"W\tkЬx<QAl^w\u001eF\u0003V\u001bSk)j`\u0019\bM-\naFJ(\u001f\u00033\u0019y\u0010KQZ@\u001d7\u0018S،+I%JdB\u001a$emE͘\u0015TJ+p)\u0011킘ߊ|v9Vo\u0015c5)\u0014k|\u001aH֘/\u001d۽Ηbq\u0005Q?\bљrq[~$lm\u000fj\b\u0015t\u0006 `֓*\u0018{Z\u0019\u0004\u0011k60f\u0001(g\b_\u000brAҍ\u000b\u0015ځ;vr'go~7x\u000fd\fW.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6\u0002m.6 #\u000fdGq0Gg\u001fi\u0007\u0001%C\flv\u001fAJ99ӗz!I\fʳў//|by\u0000OV&Y\u0017^\u001bN$\b<qD\u0002\u0018\u00121hė\u001d,'Ydy\f|DfG\u000f)j\u0019\u001f\u000e9M\u0019R\tf\u0013\t\u001c!|&pz:t>C*{G;?@|\u000f_?HP$%4Fb4#4hL)\u0006\u0019*/_E1D 4F\b\u0004K>\u00040\u00105N8B1\fJ1\bE;^Ľyv~\u000fpJds!~\u001f\u000bw\u0019}! B\u0001Zc\u000fb|ሯ\\\u0007ڣ\u001f# ތ7߫3\u0000?\u0013\u000b)~>XNfeK5\u0001\u001dG|zI|\u000ebq_χ!\u000fEH\u0000;~~\u000fӾ4\u0014>N\u001a}<\u00024q\u001eX\u001ff0\f+R1\u0004#\u0006e()AC\u0019\u0013z\u001b\u0013+qΐI\u0014e(P)U\\X5Bbqd'3ƭ![؜?\u0013L\t¹\u0003K+&73R\u000eQ\u00198\u001e*U\u0004w)i\u000fQIeNp\b&iiRZӇfr\u0015&\u001f-/j\u001c\t9E,\"R0Ač84;szhͨPQ;\u000eΙ8t\u001f\u0015fuìKH\u0000a\u0006\u0010%بRz~TFE|/\u0016L\f\u001aŵ&F\u0004Q;!&6\u0003\u0015c]0\u0013\beE\bBvLj(03xk'\"|1A؈Q2\u001bg\t&\u001fg5$\u0011nzw\u000b3C`PA\nmP\tQ:4X\u0004W1\u0018@tƈXI%?y\u0010עVJ\t\u0014\u0011R5$3!LK1V\u001f\"\u00109L(O-L%R(mA\u0016\b\u001dgs[q>J\u0001JIHhݴܦ>\u0019sA}ti7\u0011BK\t\u0015Ι(%\u001b\t+G\u00140\u0019k\u0010\u000b6Ҏl^/-(\u001d!N\t%&3f\tT\\7)\u0001T\u001dgXw[cz%]Dp\u001dJRi](\u0003\u0000yGEHSmOJ)\u0012ba\u001d0W9\u000b娷\u0017i6F;\u0011ʎPn(R\u001f%j\u0004V0Jg\rfR,jS,dוɳZr\u0019>7[gKsId=۸\\\tT-:gDfJdI\u0002+`\b_܃G\u0016e\\H/.l%$o]\t\u001aTKJXO)-T>nDX\b\u001b\u0011\t6o1*JI΍V\b3bx&\u000e?L\u0000\u0012U\n\u0013~\bڌp\u0019\u0013BL\u00103\u0012\"C\u0013T!b\u00173\u000f\u0004K%\\m\u0001\u0006R\"ߠRM\n{\u0011GA\u001cɚ=ٝI4\u001f bH\u000b7\fʸ֥^Z(oD9F+l\u0000\nD\u0016bGH\u0017Pdv\u0012KaL&,B\\DQ=gF\u0006N\u001c{[W\u001eQ0D\u001f\u0018s\u00018\u0012\nS\u001dRjRq\u0012l\u001f\"\u0013r=yd/q ~tj)ͤTu\u001a]u;$J9n5\t\u0007eS}w\u0010HiMr ׎\tk*TDP1/)Q\u00150\u0006) >*5\b!\"iB>ԴQmUsγR T\n9W^8L_݋9x\u0015\u0015\u000ep\u0017_z\u000fgw*kiS6o\u0006*{;ZTT\u0000dfvcR31m(UO\u0010*Ba\u0015\"-D\u0010BD\u00062\u001b%8\u0005\t6\u0017#2\u0015\u0013\u00132BΈ5\u0000ì/oĸ0J-̂gJ@έTTF}B%Wq=![\u000f1q/L\u0012\u0002 t\u001c\\m\u0002\u0001\u0015xTǃ]\\\"r;F\u0017T\u00065\u0000VJ\f:Iu\b\u0016\u0012\u0006I\t\u0014_0aLG2c\u0005b\n\u0015:\u0014/ff}\u001f\u0000\u0000ޓ[qj\u0001\u001f\u000eZOʕa[YqK \u0007膨\\`)6\u0002ے$f\"JлI\u0014M*M\u001f+Q[\u0019auD,W\u001c:\\wbq~LG*6*C1V\u001d(?\f\u0010\b]ͱ[26tnJj\u0003\u001a\u0016cwx;\u0013h3M~vYw(\u0017'z\u0007\u001fJ\bR aB\\kqa\u001bӥ܎f.M2\u0003oY\u000eh\u0006\u0013\b`&\u0006\u001dKqI5\u0014^L&\u000e\u000eh{7A\tĽ-\u000fҟ6SV&l!B\u0015x&孉p\u0011\fcF )o$[HKPL()=Y@#\u0002vJ\u0005\u001a\u0004l \t3!\u001cz\",B?m\u0006؄,\u0014\u001b5\u0001V\u0007JGAL\u0005`Gi\u0017\u0010ipŵ0\u001b@tB~\u0010\u0012t\u0019\u0011\n\u0016/J\u0015he\u0016Z~\fJi\u0001zȠJuڱ\\\\D(\u0013f_\u000baΙvR*3etQ\u0015<\u001aT\u00131k4b$\u0010Q\u0016Z3KzyXmϫ2}\u0014*Qډyhy;ρ\u001e0P\\R~ary=%98xG\frq\u000e\u0004\u000f>WG\u001fJ1.̀\u0001؎EIޮ\u0018Pb1:m\u0011K'bXq\u0005\u000eե<\u0014Y\u0002\"܂0ܮ\u001fO\u001f\u0005i\u001bZZ\u001d<vGScW/?s\rhA6\u0019K\tcv=6!݄i9B\u0017\u0011%^\n\bTT\u0017\bO֒~ԊR$WSݏ[I=TYwO*\u001d=&3IIu@ (\nH?)n\u0010\r\\nZ\b[\u0010N\u0018\u0004Rr@J\u001bq9Z\u0001\u0004h\\l\u0018fj#Sz8\rm4\u0007p\u0000A\u0012\u0016\u0000C҂e\u0006\f\u001f!\u001d\b\u0015J\u0014w\\-\u00042RL~#|\u001aH?\bж]Qo$=:\u0017B\rD)\ne)@{i\u00114va#Bc\u0004kIy-RZ>N\u0001g@3\u0000@\u00162+u\u0005Un\u001e\u0012f7\u0010\u0010zMɍAsGa\u00152]jG\u0019\u0017@&\u0001wj\u001dRZ@I %w3w:xTʴ3\n;\\a\tɎ\n7߀\u000b=E..A}֘\u0007monކb)\u000e\u0019\nBpVܿӸP$\u0016{ۣ\u001aP\\\u0018׿{)\u0005$\u0010\u000eNA\u0003\u0002\u0001bl\u0011F\u0014z8cy\u0002FnZ\u0017\r$b;%m' jl >fs\u0005I\u0007zy[@\u0014n\u0015gJ\u001b\tq-Bm% DI\u001bk\u0002\u0001h\u001d\u001ař\"pT\u0002UL\u0001\u0002\u0001l'\u001a] nm& \u0019#\u001e\u0011}q\u00194\u0003c\u0001\roc\u0016]3uk\u0000iFi`\u000e Z\u0000X(\u000bk;\u0004S\u001at\u0007!\u0012(h#\n,\u0004G\u001c\"D\u0006CMhOra'\u0017@cJ#ڶ\u0010\u0014D4*L\u0012\u0013I]OPiqVR,!T\\p\"{V+Zk\bF;R^C#.euȬ.s0\u0005!egՎ^=r8mtX\u0005)\u000b8󃧵ūg7Lq\ff:{5|9!zG\u001f۝+0k;)١&\u0003#^;[\u0017k\u0010\u0011j}\u0004T֠.m\u0003\bw<{2v\u001fd?*׌Q}Vm\u001cl<)U1\u0013\u0000?p\"[i-L9\u0016\u0018smM8(u*5_Rބ)m`!\u001c&&$<YI\u001as9v\f\u0014>\u000ek1їTCT\u0016>\u0002\u0019qx3x ~ ׄܐ2l㔵a2\u0017G1uPI*\u000b\"3!BӌT\u0011aDr\u0010Ø\u001d-5\u0006X\ry)Pf\u001f\n\u001c\u001d SThrp!3X\u0004[NATOЅ\n\u0000\u001e\u0003QP\t\u0013t\u001el=C\rb:<\u0012*|P+\u00039ø\u0012oPm-¬\u0005ɍ\u0010\u001b%\u001dhǜ݇Kɰh\tY\u000f\u001eC]P\u000b\u000691\u001dj\rZ<\u0017%W\u0019^)\u001dzb~[=D-Zr\u001dʀigs\u0005cTB NB\u0005|RV(1Bm1?e\u0001\u0011T\u001bzNk\u001ca\nR=\u0012J\\n\tv\u001b^\u001fa\\@\u0017 $8w&WN\u001ej\u0004\u001fB\f0\u0006f\u0019.\u0010iJ+CLqs\u0006888hMDo\u0005Ǫ\u0014VYut&|\u0001\u001eС8kq(0\rz\u000bLw(eRZv!;!2\u0011\u0007>.6^\u0015s c֢0i\u0010\u000f\u00111\u001aB\u000be+%\u0005$5\u0000`V\u000fHpÄ\u0003Ɓ6$L/\bz+A;Q_\u0003ȥ8r\u0003PH1EEqf@i\b\r\u0001\u001a<Jgf\u0015k\u0001\u0001C\u000e\u001f\u0001\u001e\u0007\t\u0010rq9N\u0015L$d6Qn\u0013,FB\u0006r\u000b\u001cp苵\u0018'/ʥ\u0004ji'Y˛LR\u0010Z8'\u0010\u000e\u00067m$\u001cX\u0000\u0007:\u0015N\u0005w\u0014e)j41))d\tm>;0\u001aBa\u000e\u0002\u001bKL,Oe\\\u001ac~f\u0006\u0001BTJ0\u0005G\u0000\u000e\u000etQvpBf\tW\".OgVqn{2نR\t6ڹP=\u00009z'T\u0016Rq\u0010؊\u001c%\u001e,d}+BÉ|\t\fT9@.ɀ[p|a\u0011dܵ\b\u0005ꃵ\"&*U!\u0017x!\u0007\b$\u0011v̤\"#d\u001c\u0003\u0014\u0011\"LXP\u001aJ\b8]\u0002N[pQ*{\n\u0007<j=*l%\u0012\u0006=5\u0017\u0007Q\rvRJЙ\balYNH\u0001tj?jn#zT\u0002\u0010h30.)\"`&\u0000\u0003Qi{Ra/DfGmT%\u0006p*_\u000b1\u0018@?݊E\b?ER0lh(\nJC=9\u0010F\\\u001f>c\u001eR\u0019Lvw;חj\u0010\u0015BZ \u001eD#i;2\u0006cPQvs\t`W{rŏI&j\u00007C\u0011҆73\"v\u0004ׄ\\\u001fU1ƅ\u0002´\u0000aHs|n5\u001bb,X\u0010m\u001b\rL*\u0019=\u0012ݡ9nZoSQBB\u0002\u0018w\u001d>N5Ro.\u0002gGX\tyF윑F\u001bt\u001aS\u0005ig\u001b|\u0006\raV\u000f@h\u0017\u0010\u0012\u001f5\u0010Q϶I\u0013'|+\u000e71q\u0013Ӷ\t\u0013\u000eyy\u001d^\u0019ݔT\f\u0013 <$\u0000\u00002-7F\r\u0012\":$+C\u0003%y{\u00169\u0017Qrc\u00145{;il@6)\u0019Jkڈ\t\u00000n\u0002\u0015<S1 \u0012B\u001d\\D\tC\u0014\u0016\nN\by2\u0016\"J\u001eAc\"sQ<\u000b EhR$L  l9F\u0013L\u0001\u0015J\u000b.J)Al#2ߟ2b\u000b3\u0005\u00101Al%wk\u001f7\b\u001c%7H\b{v\u0003\b~\u001bѠ\u0015q\u001basR\u00058A6)S,\"%\u0013P*\u000f/\u0010\t\u0015/HHGv+%X[AybR\u0010\u0012Կ-6ZWZ?!06!\u0011t4{5\b\u001e%;Y\\x\u0003\u0015\u0002p40}\u0007%ƥ\u001b&7D\u0010a\u0007ĕV9l}ȍo\u0010SMj *\u0014\u000b\u0007Ri7;x2坓?\u001aOD\u00105A\u0003(%aJP\u0005\u0019\fB\u0002=(s97\u000b\u000b褤Xm^'q1%WB)Zjcr\u00135;\bڏ\u0003T@\u000bKhXP&i\t̠{/nD@JL|ŀvD\u0002Djy\u001ef@eX\u0012`bg`M\u001c\u0005A#mA>\u0002\u0005\rd-u\\.9$QO\u000en\u000b\u0018\u0012*=A9Jo>TxZ\u0004v\txRb&!VTw\f\"\u000b\u001aqG\u0007\u0010kdGJRy\u0010A9 \\\u0015\u0013h*s\b1/Mf\u001dR\u0019\u0017\"\u001cy;m#:\u001dtv;h^?sIj7\u000e\u00171J'L\u001c\u001e픆+51;\u0002N܁سƈ\n\n\u0013t#|Brv\u0007(}3.\\\u0004`b\u0001\u0016\u0016&.V.zBo\u0000ɧl@͆\f\"\b\u0013\f\\#\u0006xRCRJȗ\u0007\u00077J\u0000|\bFF̌]\u0019s==\u001f\u0011Zi\u001e\u0002\u0012$i?g٣\u0018O)uS蛈J\u001aSt$WF2\u0012tIrз@c\u0005\\P頝2Dk\u0011\u001aXAZ1F\nVQ螼}/!\\֬.0GLiU+{;BI8e&[9F~vQ> %\u0002\u0018\u0014[Lq%he{W?ϟ~[1:\tsK\u0004B\u0005\u0014K@G\u0005\f8(\rHHR\u0019\u0019e6|\u0002\u001d\u0013x~C\u0007!\u001dNmjC\u0002L(إ\u0019t5\u0010N[h\b\u00031v}\u000f1vB'`J'$\u0016IvSvE^aj-@lE(B9\u0001F{4%\u0015g\u0002\\\u000fk\u00014iCm`ix/D\u00105\u00005DnD$\u0003:0\u0011jRAI\u000bQ\u001bq\u001a&\u0010p\\\u0011(\u0017\u0000\u0005}9)!p9d\u001b\\a\u0004Ox\u000bkBD)\u0000͎\u001b\u0016^J,k<:))\u001aziFXʹ`BƔR\u00163_'jZoF\u0018g\u0013.U27|d\u000f\u001f\n@wg1u\u000bSz\u000bzZ\"tʱV\u0007q\u0015ĵ8&[(\tp.\u0018@Z}\u0010!>\r\"\u0011\u0002yV\u000f]_?%CsL\u001aA\u0018NI\u0014`1iL\u000e8\u001f?*%>^BMpF\u0003v\f7Ӟ₂/B4$Ҝ\u0011ڍf0\u0005\u0007I0\b02ER\u001fjsDiB\bSUAB8Lۍ\u0005\u001cK\u0001Hz\u0007Rz\u0010L\u001b\u0011TǸB\f\u000b'\u00013Aـ0\u001aT\u0013\u0015m%\"\\\bo\r1n;\u0001\u001ckDHcL\u0002\u0005\u0013(\u0005l#\u0011\u00012\t.|TRPPy?F3\u0011 R&[ j\u0004\u0012l\u001f\u0004\u0001\t_>̂a|\u0010\u0012Ҧwf\u0015\"2\u0012tT:U\"\u0013Hi8@\u0010!׃;v`E׸ShЮ9\u0001\u0004\u000b@ԞY̍^\u0018T!:PG\u0001 #?jB+CJ\u0018\u0007f\u001b,hpf͌Z=J)6:\u0001>\u0016\u0017ZFbl\u0011\u001b\u0006Q\u0002:3H\bhT%(\u00147W1eR\u001fO\u0010A\u001f=H%j%\u0012qW+׀\fW)\u000eM!L`\fi{嗨Ҋ{Wm\t;\u0007\u0011\u000b#\u000ebR3-ա^\u0011q;\u000e%\u000e]Г2i]E\u0015S~3m٭\u001a)k\u0018[մc~Z\u0014\u0007\u000bv\u001bSZ1&\r9\u0013\u0006\u001fe\u0011*PB\u0006|5ɖ\u0000#\u0003Eb\rS;3'\u0018f\u0007\u0012n$~\u001f\u0003|ϏC[x2\u00146\u0013J\u0014FR\u0017\u0011ÏXm\u0017Ձh\u0017\u0018\u0015\u0013h(\u000f\b\taБ[\u0000 @nńO\u0003ğna i+ꐂs\u0010j\u0010](\r%Z\u0018q\u001et\bZO-,S|\u0019&hM\u0014މwxcfTΜSC[}\u001a\u0001몔\u0014.(\u000b\"+0J+8\nxƀ\nrri4{m4ϓr\u001dܟTާi\u00003Ä\u001eӔֆdaJS*\u001f3bZ*q\u0000c\\\u0019\t\b\u000e\u0006О \u0012\\9B\u0017H;'Ł\u001fz\u0007\u0016SSv$ףTv+·S\u001aot0\u0000\u0016\r6;\u001d_\u00079R\u0007\u00119w5J\rLK(X״ 6\u0010lJys+\u0003uo\u001b\u0007\u0000+\u0007a\u0003\u001c\u001eLgfzL)Z5zPXRO1=-W1H\rɝGF4\u0019\u0011\"\u001elcQѼ(j\u0001l\u0003b#䷼\u0007@\u000bHP\u0005\u0002h-[Q\u0016MOS(h<\n&(픞`K\u001bq\u0000$WNruTh\u001a%}@\u001d'ܧ~6\u0006@m)&ƖP@g\u001fB\u0016\u000f6\u0013\u0012O(dv\n2G\u0013c7SHō\f\u0000,\u0000d9\u0000T\\\u0010Ys$V\u0001\u001c^Z:q0)AH`x>i¸\n1P\u00110\u0006\u0012ѻRfgG\u0004\u001dg,T)v'myX{ \\~'!zTR|!D\u001a)q+%Jp%\u001e0VGg~Fu\u0003W\u0014qZ\u00035n}(8C\u000bF32\\O+0~+\u0011rc\u001fLv#&m$[P\u0000v|>))FH]\u000b*\u0016Q*Ck\u0000z\u0001\t\u0014\n)\nJ\u001b\u000b))\u0005׿\u001e\u0013\u000es\u0006]VcB3StΟ:.5̆\u000f\"d18vN6\u00041i3FP\brY\u001f\u0004?\u0006x\u0010T\u001baz#\u0003$8{\u0018(L\u0010.%(\u0003tA0jFf\u0017@\\\rx\u0004F1\u0002cOl9Rn!FRFM\u0001t\u0007-\u0005N\u0001\"f\u0015cZ>\u0018\u0017m_J\r\u0006o$\u001bi.ryHz\\\u0004\b˲\u00167aڨ\u0001d@58\u001ebף\u0011\u0013 ,6IlA\u0007>\"!n \t*q VQIZ4\u0005*\t¤\u0002\b\u0017Z}|\u001ac\"ts\u0003\u000fY(\b\u0005y6I\u0000\\\u0011$Pg2S1S\u0018>U>\f9c\u000f!~\t&_0t\u0006\u0011P\u001b\u0013¸?ZCĊQ?hܔ'W`W\u0011\u0004\u0007\u001dR\u0012#V\u0004\u000ehQ&\u001f&\u001f\u0019>cudvJz/\u0000F\u0000\u00034%`*X1\u001dC_B\u0003g\u0019\u0010~\u0007g \u00175K*1\u0013\u001f#_j+H\u0017VD0՛\u001bq~\u0000ي1\u001e\u0000z\bQÈ\u0016\u0006B(.?!Q\"2kvH\u0006S\u001a6x;{\u0014>b-ϻ&*@7\u0004\u0005M\u0004 J9'b\f$S\u0016p?o(띊xg.fq\f\u0004l\u0005?^\u000bCM\u0010V,mlDxR'!ҽ@\u001a\u000f\b_\u0004\u000bU\u00031AT\n3\u0019O\u0018(\u000b7;\u0012*\u0010i\u0014],m\u0006~\"AW/!K\u000buU\u0013B5LZ`~q%X\u000b誂9*&L_Rq\u001a'\u0001uC3c d1\nvP*\u0011\u0005ֻۘ \u0011\u0006m\u0017\u001f7\r\u0004\u0001\u001e7Fzl\u001c0\u0010L\r1* 2\u0010Rb\tJe)\u0015Ԧ!ܧ~l#J\u0018\u0006s\n\u0002 l\u0019$q\u0010L\u0011;caY\u0010A\u001b\u0003Jnz\u00047BAT@؎K[qɟ24OAzDIw#*@Jۈ\u0015\u0001z\u0010p\u0016b\u001f\u0004\u0019B6gv\u0000 \u0013t}z3\n\u001a\t1,\"L %c,\b[)Pq\u0001tƭrO\u0003C0(\u0015b2\u001fA\\Gd=\u000bS`\r\u0002\u0005t\u000e+=\u0002\u00064~/o޽Ua=̆\u0000W.H&\u001fΕi\u0016Z\u0006&\u001d.*OY]6;$\u0016ȆP6\u001d30\u00015Ҝ/L\t\u000fh1$i\u0001\u000fj\u0014jz\u000fb8N΄AE)\u001d\u0013w5ZۗC!;ƴ\u000eet(%8\u0003D́[4{\u0005Fͭ\u0006\\fvS|·^ՠV*js @cZ;@d\u001fĕ\u0002J(\r`o\u0014b\u0011~\u0014\u0007M\u0010Bhm\\ r\u000bS:cALAAN_V\u0007KP8A0h\u0012=\u0003\u0011L\u000e.6AK'\u0019(2U\bU\ngO%g\n\u0002X#v`\u000304X\rBkH~\u001a\u0011\u0003\b6#\\JdV0F1`0~'}<\u0012\u0004WŔjP(&o8\u0003\r\u001e@\u000f\"1.WQ\u0005>Y\f5<dP{\u0011\u0002t]b#|\u001e\u001dl\u0010V<e+V\u0011\u001aB'F91һ\u0015xcP\u0005x\u0004\b\u0007X?ZG\u0000\u0019eJ\u001foj\u0004\u0004RJ\u001ds\u0000K\u0000^Y\b'Wl\u001eR=R!zg\u0010j)\u001ac\u000b8<&c|)Cco\u0005>\u000e7Z;&.b/5g̖\u001b%m\u0018{H-bnښ(\u000f$y\u0012p\u0011\"Xg\u0002\"\u0019\u0018mt\u0018\u0017\u0004I)PSr\u001d0\u0017\u0016\\~@#\b\b<\u0013ȇ{֌Α\u001bJ>L[mz\u0005\u0005ཌྷ\u0006h\u0004\u0003\u0006ś\u0014\u001cLnc\u0019ƔX#>\u001d\u0005A'sybp7\u0011N09Lj\u000eĞ!LRzN\u0010\teQ\bR\u001fG{\f\u0001]JB\u0016omTIz0jC\t90 \t\r_ܻ\u0011\u0001ZXG*\r%4qk\u0019\u0003 \u0004ty&\"\u0003\u0013R\f7}\u0011\u001ajp#\u0012Y8\u0010;\u000e)!Ȍ4j\u00007Ba wթ,d:\u0002s\u0002d0\u0006֍ABq#nEW{\u0001ҏQ<ʾY߷;:\u0010V\bӷRZ)\u0013>?+N\u001e}pCz}M\tDi.J;/%N0rYG;#`\tB\u0007\u0010\u00130Zo>rc\u001f|<\u000fSG\u0003\\]\u0010\r3rH̏K+\u001d2w+}6\u0019=wBnbPjN\u0015\u0006I\u0000\u0013\nӤRNP\u001aLȏhC*m\tQ(-`*?n\u0007I\u001b!\"W\u0003KQ\u0000\u001c\u0005e\u0006(\u0006mSR\u0005\u0002\u0007\ffϨ\u001dЄѡ3\\\u000b0 \u0003\u0007+=jM0\u0011\u001ah8l\rz=\u0010K\u000bKf\t[MkXD\n\\Zҙ\u0011L#Rb\u0019Tbqc\u001d\u0014\u00040Pkf\u000fl/aj\u000b!\u0010ϥ\u0016T@/쀉{\u0010\u0000r1*\u0007\u001d\u001c\"g\"=0\u001aK:i>c\\tf\u001bqzԮVT(\tǗ!\n\b\u0007Z\u0005(S-\rSBҫӣ\u00018hx \u0016\fi6S\u0012|K\u001eqŹ8;Bi*\u0016Ӗ˓QaD,X-\f;/\fS@PBn\f3T\u0006c8QqpX=\u0003%:l\u001e\u0002iAv\u000e\u0019J\u0011IeFcOʕeR{\u0014\u0017ӧ2=M/ι}\u000fܸ>\u000bq\u0005\u001eX\u000bPm(\u0003J%\u001c\u0012\u0002p`1yy\u0007\u000fB\u0019\u0013\b\u0016$8R\u000bfB(\u0000A\nj\u001c9\u0003P.tbu|n\f#WwarLTo3]_ڊeֆ\u001e|M%x8hrG\u000fʎ= 3ʍ\u001ef:.6,\f*GaR(զw\u0006hYV\n\u0013L.\u0005PL\t\u0000{s\u0001t~=h\u0000>R9򪾸.n\u0018\u0006\u001b\u001c\u001f3bL\u0006W*jyQ?*<\u001e]lĸC(h@}6;6M~|-UvDhЙ6\u0017(\rꈲ\n\u0006Q~t\u001cqqSp9}ʻE\u0001\u000fxnWq\u001d[[*υJ캺|TJy\u0003s\u0019@\u001ew\fX*L\u0010UkTú$דs\u0015f\\nv*7\u0006O+j\u0000SJ|\u0006\b,V\u0016Ў\u0019]XPynzv\u0012!DX\u0017K+\u001dH\u001ct=u*jceg\u0000ܘ\u0010\u0011 ԢVE\\=\u00147Rv`\u0006ix-\u001b;\u0012|\f<\u0019)?GY~z\u001f_\u0003sPAiM\u0003Rj\u0013@\u0017$K,I-[&\u00110mnz\u0017\u001b2w\u00060M^_9]s9aP,ũ\\[鵕\u000eʽӴRG\\ZH\u001dpzו:l.\u001fg{1\u001ej]Çų\r펓RլzՏ^[\u0007zcU>\u001e\\|X<en4~'zm/7ډ8v\u0012Z[)\u00198Jq\u000eΉ3\u001c^Y\u0004lg;\u0007ݝk\u001ad\u000bDŴ\u0016r;fan^G\u0001CGY\u001d]{?\u001exlGovn~iOL0\u001b6{F}\u001e\u001b2? Q_:9v؇J!Dj^ \u0017Ճj|\u001fjinrevΌ=̮'J'\u0000\u000f (\u001a\u0014R^@\u0007Ϙ,(^Jԕ4?^tNξb2=8T^\u0002jL\u001cQ_nϏI\u0003;9\u001a{F\u0010xF\u0010فX\u0002ǅ\u0013X{8\u0002W\\\u000e\u0004\fm\r3\u0017׍Wӯ*'\n\u0004Ne2?_\u001cLkU5\u001d.7\u000ev\u000e?.o&\u0017\u001f\u0013|\rEI}bx\u0019EN\u001bu>7\u0004ew{ĨBm-E\u0017L|S_,~ӿWF@~^).\u0011_`z'(\u0013g\nή;8-LVv^\u0000V>޹\u001fj|Usev\u001fV9On~Nd\u0011Q<eu}o\u001eWRe8^xw'?\u001e?~O\u0019i{K\bwo<~\u001b0\u001c^=F/>^~)\u000e$W螹'ɣLw|7v!\u001fڝlL\u001e2A\r4\u000fOH)π6!I{}YV]dz'œz>8zyٯ~\u0007l)\u0017'gͽ7\u000b8rǨR\u0002\u0002$ڇ\u001a/KgG>fp\u0019Ωݿ\u0004C-\u0018Gu[0#d@qɅ=,L/3BB\u0017*\u0000筽#:2mӯ~irY?J䪾{\u001d]=\u001c>ίⰺzjw˓;X|wp޿W^:\u001e~|ŇR.켸x%&;Vm݃X^<fxe\u0017aQ\tLDfx\u0017ËW?i\u001fuw\u001b\u0017\n`\u0014h4]\u00109ѕ\\]ia4Ԗ:qg7뼹ysEuڬꐋ)&̭uEsh\t,N[_^V\u0016ׅC`\u0001\u0007UKџc{\u0000;\u001a>/8W\u001a=)'?;IS)CE\\w_N\u001f}swws@U}u}W7_ѫDz7Ëo\u000f;7{\u0010\u001d\u0019}uP\\\u001e\\\\\u0016;lVry\u0001+6\u0007/O?'M-\u0005I\u00042Z\u0007V{x={ߵ._̞\f*E>\u0006e;B!T:U\njw~9 Vxw2{կS)+\rFg_C\u001dh|4{Nrl(;$䢱[?\u0003X=ztoΞX)SѷO>?\u0017?\u0004؀ .\u0005PݳξͶ\u000fϟ~_\u0016;\u000bڬh]}n\u001f\u0015Ov\u001d]>,,\u0001\u0012d3u\u001e}=}J.\u00022am>\u00057ΩɅiyz3\u001e\u0010\u0002dnB7/E׬-ޫo_gٝ\u001dӤhHNe~5<z98|:\f~Ҍ긵z}[]<.fVՓ/Iܽ\u0016P=_|S{m//~\u0017e6\u0017ۄ\u000ess>\u001cQ[>=?o;<9|t/?,Z7䯡ހ\u000fmܴ^.|W\\_y8x\u001b?ʏ\u001fu\u000e>;|ʻslK\u0004@I\u0015[X290qG𠷼Qɀm쩵Uax9<\u0012'7(yk4WLaa.wӛTL+bnή*\u001f\u0005c\u000f;g_Ympǽ/2K:k\u000b*;`r&;õV\u0019Y\fTMiff}w\u0017rq?|9fzaÛ\\s__~\u001f\u0017\u0015Iymi*ӻ`W?˿՜~W\u000f_L\u001eJo7\u0011ډ19p}`g/?ῄv)Ơj\u0004tEs_L-{Oj+VO89Ue{LYM\bPsԏ8:\\RDY\u001aL\u001dUu9\u001b\u0006H+HQB\u001bIe{ΓN?}fp&mNMus7[ݢf~\u0010`\u0000=wzܡ̢Y\u000f{/'_4\u000fߩcj\u0017;{@\u000b\u0005SC9#S_N>k\u001dv\u0006AB\u0013\u001cHe0n;Ju\u001aq!wq\u001arq\n:\u0003\u001d\u0013V\u0017Z|}\u0010\u0017$;x:}n^~\\~\u0018\u001d/}M\b0v\u0018<\u0014djxws역՛Q\u001c=~\u0018\u00059\n,\u0007~\\eW23m=z]srX\u001d\f_CwY_.tVW\u001f`*?4UYt{ϸlԡ\u00015r\t\u000e\u0003\bIqxQ\u0019\u0017[\u0007V\u001ao\u0011xU&;A\u001a8\u001azCP\u0019̓\u0017\u0018\u001e\u000e.6x\u001fx\u0006S\f\u001f{k~_\u001e~\u0016\fi>\u0012`?qMy\u0003h3\u00058\u0006.-n{o^Z]\u000fePR|V,΄\n<\u0005Gj\biJiNl\u0010\r\"yP>rGfyԟ_\u001e>iaP,MT.ֱ8\u000e\u0001&\u0000gc~9|9|>L-1nwsLW\u0007W:|o\b\u000eS\u0002SƁCa\t!ARv\u000f=tGx纓!B~X\u001a_O\u001a}f|\u0019PH0\u0000ʇp\r :<~>x=3OP9g\u0016\u000bsAg'#\u000e]\u001f<\u001dN\u0005T.:g\u0000uB\n9S^C\u0017r#\u001aXh^<}\nre|6?Le2{W2XQuw;\\aAffyݯ#BW~?x[>\u0001J\u0004_N>w\u000e_ft]ape\u000fXA5Pe^P9\u001fe''?\u000b8H|lmJe\u001djV\u0001xtau\u0014\u000fVO~\"fD6w)D\rZ\\[`QEw\u00130vaV\u000f\u0002m<-׬fR˂\u0004!Ǻ;8<Y%&Ԭ\u0005\u001ch7\u0019M j^~|if+8\u0016zBV\u0019\u001d[\u0003=a{p⧻\rڮU\u0017/v^XSKZ-X\n%\u0015gאŇ7;~kN\u000eYm~\u0010ޥC4\t$\u001db\\\u0017<ǧ:\u001f/.\fNNdrT\u0002\u000f\u0014ZkGRv`8kQ̭C\u0019A{Z\u0007*[i\u0015\u0012\u0018@.`Q Q\u0006\u0013f$D縱\bjQFzr5՘Ll\u001e@\u0000\u0015Gb\u000e\u0018D*l?쾞P\nSDZ-ONZCgg*N\bgڐ2;=5Z'/Vz\u0010r!\\AX+\u001ai\u0000\u001d\u0010Lez]\u001f[]\u0011sN8:SK3q\u001d9wgɋ\u000f@Z\u001023ե< J\u0004l?\u0014GHz\u000f/ǭ+3\u000eX]9 \tH$\u0000D \bSb\\]]աsTZj\u0015-YV,'e˖,ʶeY㙹ͼzZ\\J%6\t\u001c콿\u0007\u000f@fQ.ŕ~\b\u0003\u0003&\u0007\r\b\u0018XPD\b\u000ep)WʓK\u0016!¦D#+\u0006\u0007iqsbZf)`\rHNA=\u0004#\u001c\u0018/z\u0013\r1OB9@\u0001@i1\u000b&V*%#.\f(/\u000f/)\u0003ʑJ=\\;\\=<TfHو\u001301O\u0007\u0002e\\б.%o\u0010\u0011XVIi=SB2>\u000eLHkBitz0\u001bo\bƉ\u000b'n\fZI;BM`\u0002)+X\u0010\f.\")C^\u0019\u0011\u0013H\u000b\t㑎\\;\u001am\u001e31\u0007Is>\u001ed+ʣ\\Ϣl\u0002\u000b*{\u0002?IG\u001aX\u0002\bT\u0001\b(U\rѡҌT]bS..\u0005Ɍ\n\\N5\u000fذ\u0011\u001d1\u0001EE2`_\u0002c o4RZ8d@@ҟ\u0018O\u001f\u0006\u0006i˯h\u0000\u000bVPR\u0010HLtqL{B.-\u001e\rȁ\t-D`\u0016\u0002xr9;\u001dHς`>d,0\b9:ܔ2rv\n\u0011_O\u000e\u00015xLM*ZoP\t_ۺ\u001aVTN7\n\u000f\r\u0016<b\u0017\u0019\u00191`<,f@Ve\rn`הe퍓[-2\t\u00140\u001dH\u0019f\u00130\u0013\u001f\u0011FqQ\"%*S7V\b&^|~Zv[L\u0005ӵtw_ԢB,\tī&\u0018f\u0014\u0017\u0013ոY\u00050~811B˕.1[J\u0018\\nnInڃ\u0011\u0007P\u0003\f92k!\nX\u000b v6& \u0004\u0015:Qvq2!'}\"*\u0002ZezEgfHG[l\u0012\u001a\u0007rp̦h9?#dI=\u0002gReٗẝM\u0001]32a\u0006p\u000e\u0016ֆIɁQx1QbNƄ\u0014`\u0014 \u0005 \u001cvRۺ8ˤ*\u00036X\u0005>\u000e_qH\u001c5aV\\rPQ3~wŁ\u001f\u0013j^-$!.uvZ*vH\u0004x\r\u000bZ\u000f\u0002eσ6y$g&NUf/0(\rE\u00004\"\u0019*{\u0012Xk)6%Rn\"T\u000f\u0011\u001b\fY`&\u001146rߠ~`̡PNVW\"%ğ\u001f1Z\r\u0017<B\u001e}v@\u0003%tD.y؜\u0015JHċΑ3/~{7/?~?~ǧ}\"7y\u0018%f/LEbta<[\u0015ڋƩ\u001f|\u0003O\u001c\u001e|[O^{7Yߍצ1!B>DGH ƄZ5<rdm뷮<Ͼ}×\u001e<ӏ?~w>|~)2\u0012I9\u0010uJTBbY;\\,L\u0017Z+sn=ܯ>\u001fە޺n\u0019 .It'Y]rR1\u000bN\u0004Z\u0014MKN>=uĵ/~r}\u001e\u000e\u0001\u000b,\u0004%|ł+ɪo$+\\{5leG?|\u001f|W~ˣ\u0017o\u001dKg<\fF7h\u001fǂ\u0019\u0013\u001c:\u0018H^\u001e*t\u000f~[O̭/>\\sg^yG{܍;gnz!/Li\u0016LNzŲb(ʵ\u0016g76fN;r˷ڏ~?|\u000f<b8yP\u000b\u001f\u000e2\u0011LLG\nj+3fX\f\u0019 l\tYQM+\b\u0013U2ͅû[\u0017n޻{\u001e~إNfb\u0003\u001a[\u0007,O4g\u001e9vv\u001e{7~G_|?>w˯_\u001f~s\r\u0013\u0010ITTbrtSw.{#Oß_=ڏ\u001fy7{|?{~ϗ~gX9}\u0013xe8\u0011ϰ\\,W\u001fݽq\u0003?3/w~\u000f>y{O?3\b/{F0\u0002\u0005EpUƧk7\u001fz{Ͽ/\u000b?Ə~ǿ䳯_zW݊\u0016'nje;\u000fHbmr\u001e{\u001f\u001f|o>o>?7ߙۼ\u0002!H\u001b\u000bt'h\u0014[sGVw/ߺs>׿ۿ\u000f>{_|lx)\u0019;lʩL\bb\u0012\\\u0015ڳ.>ȥ\u001e΋⷟/䝏{\u001f}?>ϼ{q\t \u001cte[[=z\u000fS/_7׿}/?ǟ_ybw-V[#M}?gDbB\u0011>RNfKۏ~7Ͼ?|\u001f\u0013Wns\u0006\u0016,{\bњ]<rt\u000b\u0017._z\u0007[\u001f_?\u000f~\u000b{Z\fv<lvsW\"|BPsk~ƝǞ\u000b?ßWӟݯt\u000f^x\u0013\u001eXɵ}bVN$\b\u0013S+sk.\\\u000f~\u001f'?{Ͽo\u0004>w?z翸|&jPR\u0014@8SlL̬\u001c>q~ةc\u0017^卷~\u001f}w>O>_~_|ǟ~\u001b?:uLkE.2Wjbv\u001a\u0018\u001d\u0016tX_Z]}Co{Ͽ/?㯿\u001f}/?K/2\n䍀bdSH݅C?\u000b/?\u001b\u00077G\u0017?_W/\u000f?oX0Im4f\u0000VT\u0000%\"SK\u0016K\u001b[?S/k?|Ï߿G\u001f˗|go?\u001b\\\btGmA\u00199\u001f\u0014BJo~}ֿGo/7o;w~w\u001f~OoݼLHC:\f\u001c>;L̈\u001b*͝W~\u001bo?oo>g^zK3K[x3Y_\u000fb+7|c\u0012`˻7n_?w̉ݓB\u0011nI\u001b¨Mڄh-\u001be%1N*x{qmca};=zbgo޺zWn\u001c޽P\u0014%\u0002.\u0015*  \u000fx)_`}ڱh2UʥWWwNz\u0003~'~ŧO֙)8΄sn߆q?vTl'福\u001d;ӏ?/oK/<ĝﻲ~؜怢9N*dBC&5ʂ\u00198MDleq龫W^}WzW{/z={l}uh&J5\u0007S[`\u0017\u0002/;pM(ɈJ2_n.<~\u0007~\u001fo>˯䓏>-\u0017\u0011\u0019V[ȽC*hHrAI.xw7qɳ]|\u0017_x'oW_=w^y[^<\u0019KW\\^AL0\u0003\u0011\"F#.'g/$\u0017W6/\\g߹p>_?{/<<xRщڅ-.ֺ;\u001d\u001a\u0007lr1:3jwRdqyy/\u001aJ=䝇<s~ksb\r\u000219\u0018f)f\\8*fg\fgB0kp{u\u0010\t6bFsaΉ\u000bV7Ƃ'\b{h. \u0010bv-.\u0014\u0011:KY\u001d\u001a\u001c6:;\ta\u001b!j\fC\u0002v\u0014\u001eg8\r$IDT>tv&Vx*\u000b2lvlCJj$\u0019L#E\tCD\u0000c$!\u0014\t L%Zo>(+HZoY\t8^+Aq.9'9h:hV*yL\u0015st2$9$-,jL&Vk5D\u0011\u001c\rLҎ*#:wh\u001dCj1f\u0011Iϧ\u000bHJ_rf6\u001doTBqbiU\u0013?\u0006\b0\u000f\u001a\u000f\f/\u001aK%>B\u0019!i%\r'\u000b$+Z\u001dnh1 $\u0012r9lM\u0018F&`kAߊSb\u000e\u0015\u0011\u0006(z\u0018\u0002lsc|bmz\u0017Y6>GI\u0013!\u0010\u0010ETvvHgԈoݼT\f\u000f\\e\bb$\u0012M#h0\u0001\u000f!p\u001f\u001bL\\0\\c\r}\u0002\u0017L\u000f\u0018\fj\u000fZ\\>7\u001dǃD7}C\u0004\u0000ޢ\u0014\u0016\u0003#\u0001Q\u00117j\u0003#\u0006MH`~ϐ1H\u0000\u001aq&E=Iب\u00051\u0005SLaR\u000eL\u001a285\u000e\\f\b\u0007y8I'@\u001c)|RLN\f8(qDRXp^ o\u001en\u0006\u0005\u0015\u000bjHE\u001a\u0007\u0011&7;fBtvqO\u0003LF'c<#oT70l1\u0002\b\u001dw\u0010a˳i\u0017\u0019ԣF\u0017crZʪCjUZ!r\u0004\u0013ra,L\u00107j!F@\u0019s\u001dT/b!B191=yU6Fe\u001bА\u0019b\u001b\u0015&\u0016OɱH\u0000\u0003I0\u0016TO\u00181\u000fj]\u0010\u001e\u0019T;uCv-\u001d0\"<8\u001e\u0010D\u0011\u0010\u0013\u000b,P\t!N\b\u00197h\u0004\u001fegr`\u0015\u0005\\\u0019:|Q\u001d\u001c0\u0000\"SƙĔTZW*kL|r؀P:m[a\u00074\u0016\u0001VnTNeǝa۰\u001etXhψm؈ilJT\rԔD\f\u000e!$`\u0018\t78\u000b\"9SM&XzPc\u001eZ\u00076\u000b*:'\u0015rSn_BNv\"iϢ\\ֆdŦ-C\tŀ\b\u001a\u00196CD0Oc\u001bM\u0016\u0017\u0012*AU 7&\u0006\u001aZ AsyK\u000fh\u001caӌpb~MMQJ\u001d\ff(Ya9\u0007BNe\u001a\u0005RS)operiA\u0002*+1lAԙ1\u0010\nP\u0002\u0003̎ \u0005#.o\u001fi\u001a\u0015MZѣؼ\u001a\n\f\u001a<6LP[o\r\u001c2i\u001c\u0016\u000b\u000f}1GCm@\u0018\\A3\u001a6\nS\u0016LVIG\u0000蠟Ǉ\\b\\u0\u0010LcZx߀a߈\u0006\u001d6\u0010fG{VD\u001eԹkĀ\u001f`0\u001dtxlO\u0019<B+ldz'1\u0003öCj\u0013ʔW\u001028\u0006tUA%\u001d,iA-9٬/%-\u0013*Ad\b@J}L-B\u0014\b\u001b\r\r!:tNPi!#L2~\u00042C9\u00191'\u0015\u001d4._JFlƧ\u001aWG\u0018\u00184\u001f8\u000f,.\u0016\u0013xi\u0017`Ҿ\u0011Ȍ\u0006`\u001d\u001d;G޻]@T\u0011LMf;[\f%0\u0006tt\u0017p\u0005\n\u0006L¡\u0001gP\u0014\u001fu\u0018DŬL\u0005JW;\u0007u.\u001397>\fǜ\tDt\u0012\u000bU\u0006AB\u0001;!ى~\t\u0010Z$\u00177N7f]^\u000b\u00070Å*\u0019jęX@)?b\u00191VOP=='\u0015W=6Z\u001b;\u0012D\b\"\u0004_t3i3*\"D(]w\u001131ukB\u0006DֻE.5=#\u00163̹(Ict6\u001c$\u0010\u0016\u0012T];`;90v\"jD\u0003ZkD8\u0006smFL\f/LBe/\u0003EN}kz\u000e)tpjFB\u001a+;\u0000M`l\u001c\u001c\u000f#ָ*ψ\bv*i#\u00136<R9j.Y\u0010̦P6\u0007{\u0013/\tRFX\u0004j`jvLY}\u0006;D\\,V\u001f7s2X0\u0003o\u0013Xez@\u0012%TDkg,\u001ey\b\u000280j\u001fV\u000e:\u0004Tc6\\\u0001P\f`옕T(\u0001a\u0001!ۂJV/{F\u000fY!O\u0010ao\u001e2z\u0019sQ@Vח7yF\u001c[Q`yC\u001ff2SPVWw\u001fQ7\n&<fRФ\u0013\u000bc.\u001e\u0004;xH\u000b\u0004%iM=^-\t\byE7\u0017s\u00066&\u0001EB@l\u0002\u000e._X!B57\u0002BLP6ᓊ^h&\\4A72b;f\u0003\u000b5PgJ(t5\u0014Pfϰ\u0011ѡ!7\u000epFI\u0015JAk\u000f\u001b`\u0013\u001ctPQ/\t+\u0018ͮGɃ\u001ahXca7\u0003jr\u0011\r &(%l]2\u0013G-z<\".pdrq )\u0002\"\u0001{Ԃ\u0001\nI_i%d$n-!#~S&vRqQ1V\u000bI?v0\u0011':{GV,ꏌ\u000b\tRRQ\u000f\u0007\u000e\u0001pxu.NB9ج.]@ z~\tH0&\u0002\u001c\f\r\u0007FmH\u0005!`&\u001c\u0001\u0015,r=.̜&\u0006\n\\\u00119Ok\u001eރ \u000eY̸\u0011\u0000\u0002\nDЊ:;=b F\u0014(}\u0013\u0017|\u001b\u0007ńCnony(\u0004.F9\u001b3EP\u001dX\u00149ӡc\u00010Pde\u0012@θŒI꥕\u000b[|\u0011;\u0015*`rZHNsT߈hM\n{,#&܊W\u0013\u0011)Y_>v\u001d\u0004\np}MilDǏF'\u0013\t\u001ez2w\u0002\u0019\u001b\u0019`,\u0010RC`L0+\u001bri'nt\u000em+zL\fy\u00137r9R,*K\u0004\u0005OX\b\u0019;\u001a\u000b׭LJJz\u0007%hҟ\u000fw\u000bh%:\u001e&I&7~ \u0002JcR-\\\u0006&L\u001aQf\u0010N=0Iԟc՟\u00190\u0006wЂ\bV\\\u0004_9;\u00003)N\u0002\u001e#\u001cU9M\t\u0016aHu\"$\u001a\u00157\u00071\u0006\u0007s\u000e*by\u0007xו:\u0007MБwH>\u0001!\u0004@tRCZø4\u001aW\u0001\u0007#Ce\">\u000e.%*\u0014!M\u0007\u001ccF҂]\u0014)qG>'FQ=2f\u000eAEgnMI9?\u000fL\u0003Pߋ\u0015Fdm2*\u0013ROaP$-GLШ\u0005UmX\b\tdtLP\u0004q)\u0003!i?o6M\u0011J\u000b\u001e.)gLS\u001chx=ht<S_ǄQ\u0013\u0002\u0003\bqPVhaj\u0003n1rFw\"3u2:\u001c|WZK/uߎ\u0004_ [T6=Bk\u0019W\f\u0004Mcq_bN,\u001dMuq\u0005\u0013!0-;#vፒRRjp ;ΥkN>E.;CgHN\u0004R\u000b x\tmD\u0018\u000b\u0016nIgm^Pt\u0012 Gͤ\u001b\u0001\u0000,\u0001\u001eyf!WVls\u0000Ԁ\u000b\u00014\u001bQ[.\tU\u001c2x\u001e\u0013\u0016&U\u0019);g'#{Gm\u000751+uH\u000bm\f(E\u0018_%4XviD\u0010J\u0013ټa\u001eP\u0001\u001c$\u0015J0ZwmXpP0\u0010&\rj!\u001d|`F\u0004s?2{F\rn\u0017\u00067\u001c\"|\u0019\t\u0016̦PN&bDtNQm\u000f@\u0014\u0001\u0003\f\u00154n\u0004scpZ*]ܿ\u001d;0b\u0018N\u0003#CePDXHrv߈n\u0004\u001baWR\u0001V\ng\u0013'dHN0?GF]k˗?S?y@0\u0018k \u000f#\u0013\u001d#VRo#ޘwpH \u0015ʲTZt1\n0aXy<\u0011nتϝݾ\u0005s1\r)3;6A{#\\\u0017\u000esޙn\u000e\u0014ބ\u001eq\u0018-/J\u0015\f&\u0000Zś\u001e@'|isˉh-LnɫOa3IM\u0007]vJR\u0016s\u0013F\u0001\u0019\u0002;S?vx(8ɥ#&\f\u000f#Xg;=Q^>p~\u001c\u0014.7\u0010\u0001,\u00001I?vEl\u00140{\u0003 \u0011\t\u0019-:c6:Q\u0011be2VB)e\\*\\\u0016ᲸTEJul\u001e\u001e\u0016#Č\u0001`̀\u0010aЀ\u0002Ir\u00026\u000e\u0012*@`v\u000e@\u001b&O\u001bdA62\u000e\u0019\u0001!\u001d\u0014q+P\n(AbX2~\u00059\u0007\u0014X[ee=q\u0001XH\u0004\bp\u00057\u0002fUf\f@uRT:yڳx\u000b\tf##|~\u0017:'ʽ\u001d1\u000e\faI\u0002\nJ(ŗ@\"Ɉl<\u0007|\u0012\u0016e:9zwčuHJy8\\YD\u0003Y3&zB \u001a\u0001gƁ\u0001ƅ_jmN\u0012N:j\u000ezЌYI\u0005\u000fB\u001b|\u0013HM+v:|S?n;q\u000b\u0017fOym^\u001a\u0003\u0016\u0012>8\u0017*.`r[.-6r^Q.5fT\u0001@VOTҭQ\u000bgت\u000fx#uX\u0001\u0004l\u0018^=qVaduLvj+>\u0012ϣR\u0001e>󷭤0dD|sZ\u0019?tF->\u0015Kk\u001er\u0018aLHͣمK\\yUOFp3?ٸ0\f\f\u0015SDgg3:W\u0000s\u0014\u0001\u001d<d!.\u001e\u0015ӥ\u0000\u0001L0I7%8V&ٍӻ#o=\u00044\b\u0011gqbNL%\u0013᫹\u0001\u0002\u001b,D mF\u001a;\r\u0006Q;Ҩ\u000f\u001f-d+\"\u0001V0i;\u0016Q[V\u0006\u001eG̸Łn)(3*\u001dPal|[nl\u0006\u000bKIPp\u00045{x:y\u001b5&D\u0001\u0007x~P0I.Ūf,`D\u001aeb%?YH4W->\u0019\u000ef\u001cBjғ`|1TXS=lf\"\u001c\u0000\u000b\u0017\u0016X^㲳N:HmP&L$*\u0013kfZ+'nl}r\u000eӅ©OreEjG\u0016v\u001eyd|FǇ-$ʤX\bbe ZW\u0000?\u0013\\~Kmى\bpwfBI2\u0002\u0015,\\\u00035m-.\u001eNG\u0010\u001d\u0001(q\u0004r b;Ԩ4.Q*R;!\u0016d&E; |\u0001P%|T/͝:r:\f\nQӟ\u0001\fuHGsH\u000438dP9\u0018*\u000b}\u001e\u001d\u001c\u0000󹙘\t\rZWܺQ^fXx@o\u0005s\u000b\"6\"&lD\f\\\\#ҞaE\n=*>0dƞA=\u0016\\iC(oH5'2-7m4A\u000fi<t\u000e‿A~\r\u0010o\u000f!aB\u0011\u0011\"ѣ\u0002&\u0015h\u0003\u0010!#\u0013p\u001b\u0015*NR(\r\u001b\u00001\b([\u0006~~1\u0016tyIO\u00195\r:7Kxk3;ԗ\u0002r~kNs\u001e\u000bJڽե\u00052:~Ȉі'z}/MŜ\\\nODjPi?(F\u000fDEm\u0000v\u0001'_t0\u0019B\u001c0؁d\u0007RD0XON\u001d6ƗVgOJK'2\u0013ɣԤ9Ax8h\u0006\b&/2Lb}H~/\u000eB\u001a(\u000e0E|n0w\u000e\u0007p\nt0G_j\u0007c'dJH>|\u0019\u0010\u001a\u0017g&T׈jݯX}6\"\u0002Ȃ+́\u0005\u000f\r<zDCM4s3w^]`yuy\u001b3zB*1\u0017&\u001a!@\u0014\u001d`q\u0006\u0000\u0004:F|\u000b\u0014_*v\u000fK).;Z`\u0019\b:1hl~6ٿ+⠑<v[<bd{~kߘ\u000e\u0000_%=\u001cQ:$\fA-^ccuPP\f\u0002Q]~$\\]FH47@)\bu&H&:\rξ]\u0004@\u0004i1:\u0003\u0000[\f\u0010gp3b;b\u0007Ec!\u0003:\n BhUHֳ\r\u0000X U߭-Ov\u001f\"fߝ+N\"Qܽir,>]f7\u0006%鏵h\u001c>o!TdILb\u0005Dk\u0010\tʳ\u001f^ڽsS\u0013۔X9~=I9\u000b\u0011\u0012T\u0017\u000b+e7s(\u001f\u0010_IN1QcF\u0002mb\u0000A-\u0006pŤ\u00006|.Z/\\p\u0007\u000b\u0006ndۧRct?\u0007\u0018pщ΀\u000e7aσp\u0004\u000eX}\bt\u0000FBeu\u0014rsbqʙ;\u0013W\u0010ꏎ\u0014\u00033v(?\u0007\n\\\\֠\u0018\b\u001d1!|̫FD+mm@֎Rz\\^\u0010Z3;uN;\u0003=#N\b,<\naO\u0004.2R=\u001am\u001fP\u000f\u0019Vտ\u00021\u0007\u000b\"ɕ,p\u001bUF؊rÆ~\t+\u0019uqy<\\o._X\u0001\u0011z$\u0010Tꋵ|?\u0016V!IE\u0012y\u001f\u0001\u001c0H0OIe\u0000\u001d܀ھgp`Բw2\u001e`M.\rl!\u001e\b\r0-lj\u0012\u000b\u00020H\u0016\\4[3m\u0013SfT6@4SDH\u0005\u0004\tb\\\u0006f2 \u00170!!\u001b$;\u0010P<\u0004:'pa\u001c\"\u0004@@t3[r8[=\u001f8X0U1`sru×\u0000\"^\u0007\u0016R\u0003B\u0003\"t\u001a\u001d/@}\u0010L\u001aҙ`M\bX}q\u00173ef\nT\u00006]܁0\u0019>I4\u0007Đ\u000e#\u0002e\\(ټ{T*Ac|\u001f\b\f3|c:1\u0000\r\u0004Jq~\u0018\u001d\u0003\u000e67q\u0014gNNe\u0000\u001f8LG46?\u001d\u0010:'ҠmT,{B\\(\u00069\u001bύ'Y=\u0016ң<!U\u0003Y\u0003\u0010}J3^Rl,rS\u0010TfP_l\u000e\u0011=\"r]AU߯r\u0005Z$\u001e\u0004p\u0010X0\u0013m\u0004S\u0013\u0007|5\u0018a\u0011X@\u001bnl\\Yg\u0012m\u0003\u0016\u0000ko\u0001\u001f\u000bj]\tS\u0000#F\u000fX}w_~z\u000e\u001c\u0002\u0013\u0011Iϝ\u0018\u0000ųO,*;ޛ\u0006_If{n+WunVd\u0012$!Zs`Ύ1R'd\u0001@=)\r$\f\u00180 Lj\u001b5f\u000eVvѿC33.`d\\ۜX;=zwܱ3rcRS.n\u0019B,x-4X*]\u0007\u0004ي\u0002ly[봄\u001d\u001a\u001dP[Hܟ!\u00001Q\u0002.'\u000b\fC\u001a\u000fh=X^;y``q\"g8i\u0010*\u000b*3wت&T&\u001a\bO\u0000\u0006\u0017\u0016&6T\u0016b\u0012*,z;S#7\u0012\u0005gv\u0007m\u0000FIc!,A6%js8\u0001f\u0004\u000ePYIϝl'S'_{Dw\u0016@uj!V[;rɵOξ17I\br\u0001H\u0012\u0001K\u001d6*\b`N\u0011\u0000SVf9x6:9\u0004\u0010\u0002`@@H \u000b\u0002\u0007 p\bUn\u001c,L\tŹHkӟ_ cD\u001fmGGcvF\u0014,Xf\u0001<\u0010D\u0005?lͤ泸E3|TpF\u0001pb:Ԗ%4<SRY>3|NE\u0006MsIB \\\u0012s)>\u0013+L9P:*!\u0007W9Xp*+9fA\u0003\u001d6bNK\u0002\u0015.g\u001aKw~\u001f:\u0012B~''\u001bkՉ㌜c\u0002\u001dzCU:2fj\u001bw`̽o\u000e\u001bG\u001d-:\u0001p}\u001fi:[gF\u0001\u0015TD\t\u001a.(u:\u0004`UXOV\u0017pP\u0007\u0010d\u0014\u0000GsDaИcHv\u0002$\u001eqĀ:oEy̟bMoB0 \u0005gz\u0002&Tp.]jW'\u0002\u0000w\u0012aBlp6$\u0000\r\r\n&\u000b\u000flv4\bQ\n.\u0016\u0016ρp!m\u0000v##hu$8̀\rf\u0013i`qZ6\u0015OҭMRn\u001cyH>˅\u0006\u001b\u0003o\u0007ʹ\u0015rӹ`jAG-s1{\u0006uH\u000f#X^\u0000Gu\u001a- _\u0019ғA_\u0011\u0007vwrj'<?{A4\u0002i7baGCFρQېƩ\u00113f\u0012X\u0016\u0011*ى !s\u0013,\u001c7<\u0001ıh\u001dJy6~C\u0003\n\u0002G\u0011` y\"qJiZhGB<W,(ă\u0001{\t\u0011\u0014O;ln&hNm\\L4'v]EK(\b;lY9[<fFͨ\u000e&N)\u000e!+*\u0018\u0019\r\u0018ʦm`qqCZp\u001d\u001f\u0004kP\u0003\r\\x +=OO^ʵi\u0005❓hx&U[\u0006\u000e3)1;-)nA47iV/\b\u0000\u001d;?Q\u0001Lͫ3C6A-d$M\u0003\u0010#5\u0010KC:\u0014TP<\u0003v5A,0\u001e.\"<Gt.\u0019AV[1#\u0003z\u0004\t* \u0011O$8v9IR\u0000MWJ+(0\u000e4\u000e\u001fP=/\u000e\f\u000f\u0011(\\1\u0010t\u0012*\u0013F\u0006B\u0004\u001cο\u001c\u0001p\u00002w\u0007\u001e\u00191c~\u000f&\u0014\u0018\u0015\u000b\u0012\u0000D\u0003\u000b\u000ef\u001dl\u0002(_\u0004\u00171֕Tc4X>W;-\u0016\u0017<L:k\u001a\u0017hǘ\u0001v2eX\u0006Xy\fT4\u0018ğ\nW\u0017gݷr;\u0013\u0017\u001e>q\u0019\u000b1I7u1iB\u0005sn~?;qlH&\u0000[n\u0011UX\u000bQo\u000f[\u0019\u001c{|\u0003/h;=R^t1\u0011\u000b\u001b~PmcboZ{2\u0014OtJR ֈ'`\\cA]\u0002i\u001bR.jl~[zd'\u0015\u0007}ߐyDYIJ(\t$Pvi>Z.-_\t溵ݣ7\u0001\u0012:;ds\u0006b\u001d/4dB\u0010\r\u0004ц+vLQvXVho!\u0001\u001d\b\f7&{D\u0006.%\u0010dynr\u0002e+(bL\u001cDR\u0001x\u001eUc#4V\bG\b(bf7g\u0003\u0003F\u000bx1\u000b\"-^j\u0000T9-\u0014\u0017S#Ry@X>w\u0010\u0005\u0012`j,>'\b<q\u0014\"\u0001#X(\u0015'&j\u001e\u001eT;\u0011oƾ}@c7oP?M\u0000g!ejsRr\\cB}|ڀ\u0004P>GF\\fZ(-g{k?`n*`F@CriM\u0003Je\u0012Ӯ@\u0000s\u0018\u001d.\u0010უ!IkAm``$PS@\u001dT\u0004lj\"^-&/>v\u00116рPqU/ǏoU/O3X<z\b%u(m!\u0015[XL\u0011\r\u001c\u001308&\u000f;\u0002#>-:h\u0001gy.5C\u0006sK/\u001bTȥ\\R╹\u001bWOu\u001b\\f5p\r2P+\f\u001d\u00026bF\rp^(\u0000\u0006c\u0016pnĈSAdڈ$\u0010e#PCBkq0V\u00162F)jX<L9\u0019\u0005\u0013hM\u0003%hpKZ\u0007gr\b\u0019V\u0016\rL.\th$\u0015X(ADYm:\t UH\u0012{xё۟vST̩Ș\u001118\u0017!\u00034czTmBH)jm\u0004F+'\u001er\u000b@J'|wcB\u0001w2)JQR\u000b\u0017\u001eO,O\u00014Ct\u0016\u001cH/ސ\u0005\u0016063C\u0015D׈Cm9\u0010hgƤd{\u0013\u001a\u0007\u0005\u0011ϒ&+Lwvƣ/\u0017:\u0001\u000egGS;B~֟Bźo!|\\te<\\Ɓ}CZ\u0000z\u0005\u001dgc\rR\u0006\u000b\u0016\u000b\u001e)\u0017HT\u0011o-5PF\u0000hy&R'\n\u001f\u001b˔\u0014u9zX2cUNnF#\u001c%7-dA'\u001eS\u0005MD\u0017m#<\u0011̬/u6H%N\u000b3\u0013kWO>PY<秚\u001e}\u001d_m\"\u001eDHe`,];n˴L\u0016p#\u0011,\u0016,\u000f\u0011\u0007#6u`3\u0013>J\u0005SΑ\u0018@~.]بL\u001d%\u001e\t@(\nX\u0000dMpv\u0006H\u0000\u0006(>)7j\u0006M$\u0015ig*LmfL\u0006\u0019'\u000ebR؀\u001cL]~ im$(#:\u001b\u0012/\u001682\u0012\u0000:+ \"\u0013PO+\u0017\u000e;{j{\u0001&%\u001b*\"t܎&W&/e\u00075\u001b\u000bc\"\u0015cs\u0005]\u001eYg& T\u0000h#FtnY@=.J\u001cСG\u0006;]4\u0013B\u001d\b\u0007\u0017ӵ3g+\\\n(3X2n.\u000b1)a\u001cRGo\u001fPkM\u0005\u000eNk!\u0019|z>s;\u0012_\\\u0013ba:=}<4ʔ8~~ތ\nv<r\u0005>=S95xNΐK\u0007\u001f19#&T\u000fsf<\"&l|҄\u001bW=*ǐ\u00197\u001b\u0007\u0006HR٩)\u0013!\u0010r>is:\u0019.$ˋ'[\u0014,\u0016Hc\u001d(X\u0003\u000f\u0018\b4\u0010)-\u0018\u0010n\u001aBuun\u001a7¡C\u0006P\u001fsnƪv\u0010\u0010\u0015zBy5܌5ZH$ݹ~w@3\u001a_r=61\u0001\u0015\u0013M0\u0013\u0013@qoi\tF!L\u0000G]\u001c>u1sLFZҲxS2T;d5}Φ\u001bAy\u001eUd\u0014]4\u0010>\u0000\u0003:L\r\u0005LDԟI\u000f#kg\u001e^8lrB\n@:Q_O\u001esQ\\r2i\u0010,>٧1:\u000b\u0003_~kvP\u0005 `#6%\u001cNm\\\u0001\u0019\u0006u\u0018^eK,xAI[pBnVuo_Μc]<\\3~Kd\u0005\u000f\u0015W@[}ʰ߿WogNʄo_e\u001b1yh!CZ4r1HٗB\"\u0015\u0017͍x}5J}\u0002϶\u0002\u0002\u00178\u0013\u001bB\\<z~6;drR\n@}LAtLO\u0001\u0003d\u000e\u0016ld\u0004 ?^PډRo͊jkw7owJ3ǃn(|ٷN=\u0016d$\u001e_\u001fOԏ\u0001\u0001\rRȍ}jl\u0006\u001br\u0006$bօ;;ןpҘy\u0004/Ntk=>8\b\u001d,WAӱr{:if,ogHfT̂@a\u0004\u0003HwQRZ\u0019 J<9qpRH7ɷl'P%\\ɘ\u0015\u0004\bfݾȐ\tպXB,HX-ϭhyazOY>=~sM\u001d:sJο\\~\u0005\u0007&2R\u0017j݂\u0006:򇪠n\u001buSR\u0000\u000f\u000fO{`\u0001@B&\u000e%עy\\F\u0002\u0019\u001dM2:Aun?\u0011i\u0011H%\\+̟i_il\\/\\\ro]98\rDȡB)ڟUFd{w#~P\u0014C\u0006Tm<<#fT17umz\u000b\u0006*쾸=X\u001b&\u001cfXN\u001c+M\n\u000b\b@\u0015\u000eʏ\b-M.Zlr!TXQ\u0007v\\t\u0014@N\u0002\u0006pq&Q\u0007?X\u001daDc9=ioHYT\u0016}J-/o_X9i%$oRMl#;<\u000e$}5^UY a\u0016,f#\u0005\u0002;R:vNe0\"sbu8sfS\u000f\\f\u000bװ@\u0012XZT]\u0018?Ot\u0003͝\u0003Zt\u0018(k}a--%&CxTmwG*r-R\u0007\u00163]`\b/T\u001e4\u0003\u001aO7FWYI\\N5\u001daS?\n\u0019+!r:rٝ3<\u0011*:0\u0000,7\u0017ϸ\u0014\u001bp\u00053:\f\u0007kHG\u0006\u0012cV_\u000f\u0006Lg-h\u0018\rm G<!VO\u0003$nNY:tqႋ[\u001b7/>ٜ=uPux&9W׃s\u0017v\u0001qxsCx\u001336oj;l>\\\u0002!\u000b\u0010E=b\b´T?zecB\u001bm.gN\u0013URSˑںlD2\b':6Φ\u0014䖋N=A+7\u0000brN\u001f\u0018\u0016/\u000e܆\u0001'P.g{SsŁ'l\t,U|sǧߖ*L\u000e\"Eڋp\u0013P\u0019`(<\\\nF\u0013)>ް\u001908=aG\u00163Dm\u0011Ⱦa\u001b\u0005C+p)XjvJ_<qg8*LT%f\u00103l@\u001e\u0003ڡ&б\\^Mww-\u000f\u0013;u3\u00027\u0012 #]:\f_^3ca'!>3kgN\u001a:L|ZȯҀ\u0016Xc}Ȉ\u0011N\u0001\u0011\n\rH>}g.h[1ߊŪ+K[W.z\n\u001f}fߐ\u0015AQ0\u000b:tϠbB\u000fk\u00116\"r)x,<\\\u0017k&Z\u0013\u0011Bw8s~\u001b\\/=\u0004ҝ7[h+Yߺ/nA\u0001\u0011)cs6X\u00020w@M rn7W.Vvdv8\u0013n\rv\u0016W\u001aY&P.gP0m\u0000VD\u001c\u001c4¼++\u001e+TEE\u001a\u0011`(\u0013w3\u0011\tE+\u001b7[o\u0016Υ;J\rԷjNm_\u000bLp7FjX'Oۉ\rx\u0007\u000bѦ\r\u000b!\u0006#X\u00138{\u0006m\u0003j\u0011\u000e|:^[c&DZ}Biy\r58I@ǯ|+#\u0019F\u0018^\b\u000b\u0002@G56\nf\u0013r\u0010tUVb߈UelX\b67\f\u0006D`JJ{l8sHkgõꅩ\u0013W\u0017NK\u00057W\u001cW<՚=v\u0002K\\΂)\u001a\u0007`OP6ʠsp0\r\u001cu\u001b\u0019F'P$ko>~8qչKӑ꒔\u0002:q2B{\u000bd!-\f\u0001N\u0011j\u001e.\u000b{#6L;lYCOhD\u000b\u001f^\u0007\u0015#m1=\u001bJN`TޠČߞG'D \\\u000bSa42ѫ3\u0006(b~\f\u001fW&7p?%\u000fP\t3fX`?\u001dj+\u000ehD\u0003sON\u001eQ=>9s1j&>q<T^57'6NkRnɮ\u001e\u000f\u0007cɳ'3Xuraso\bEǠ\u001d2io\u0017*.e\u001b+'/?ur~vt6?{B-O6\u0017Ϭ}ާ\u001afZkW}\u000f\u0014gw\f&v\u001e\u0011UvF(\u0016\"\u0002\")XP#=4?⮙iw+P\f r|9\tu*\u001cP\u0005\u0014\n\u0019\u0004@\u0000\u0004L\u0014\u0002%Qʲl\u0005[jӶ9vnL{\u0013ZwҬU\u001fB\u001d{\u001eTw;a\u001dW^TÀ\bŊT\u0005|5FDMϷ\u0015ƥa\u001eK16\u001b@_\"\rB\u0017%!~|p2 '\r\u0012̧@|V\u001bP\u0019\u000fℸ0\u0015d\u0014i=/g-jDXp=\u001d_}.\nsA`x,\u00050\u0019\u00066q\u0000;#<\u0010Btglix,\u0017V|n&ZYMuä˅\b\u0005lŸ3*D[\u000f)7\u0013gCO=u3C\u001a\u0014TH\u0003\u0019ONѿ:yz:tƃO9/K\bGhC++[\u0004'\u0000\u000e7KK\u0017\u00031HiE5ղj#L\u0010Aa\u0012\u0019/\u0019խDk\u001fx=\u0007$\u0018f\rJ'\b\u0018\u0002p\u0010m;\fӳAA9&J{veu|tQw_h[3-!QS\\cu\u000b|fA-o\u000e\u0000H4\u0002mW\u0013k~\u001b^\u0014#&9PKo,\u001dllu\u0016w?\u000f\u0014s\u000bvs\u0013vmуw??_}oͽ7T֔\u001a[\u001a7?\\\u001cSj\u000f\u001dQy\u001e\u0012ì\u001d`RlnrG.\"UY\"\"ku\"l\u0003$fqpqMLVIH6QQ\u0018\\>'\u0016t\u0001?Z\"31j6DZ\u000eg&}tLȧRr!JT*66-^dR=*\u0017\u001dw\u0013;JCL\u001c3V\"%6Qǔ\u0002(\r\u0018\u001a\u0010F\"^!꼟j}\f1kn,B$X̲D\u0002at\u00101O)BHA͙uGp0\u0013-L\u0002\n0\u0013SOLAFH+\\\u0004\u0007\u0007\"<f`\u0004\u001b;5\u000f\u000eX\u000bR9BZLS\u00000S\u0015)\u0019%\u00152%YZ#T4)b\u0013%5dOȯ\u0000o\b8\u0007\u0015Zj)]\u0006?\u0004Q\u000b\u000bAL^`\"H\u001cJ!\\\u0007E\u0004UŅU|/majJN7\u001b\fb\u001fs\u0010mF7r\u0013Vu%٦rL.\u0005iP,,vծ,َ#*؍-0\u00143ʕ®6K\u001f^?rk7<zo]{/y^5[{퇃v\\泯~ڼ<<bR:zB~\u001a\"e))u\u000fy*\u001eҒ#s0r\u00031{\u0017>x gD\u0007RjQU^~ i\\j3\u0015䀭\tI~2\u0015\u0015ʅ\u00009w@MwwqlLPf\u0017N\u0012I\\Ƀ\u0013\u001agdv/4\u0017}\u0000q\bg\u0007\u0003cbJ2\u0002\u0018NˮDR\u0000\u0007\u000eę1{.H\u0001A\u0012UA̅3\u0000φ\u0010\u0018i\u001f\r\u001c\u0007Ós\u000edCL\u00026\u0015~j24@]\u0016\rd\u000eHt3g\u0002xP%\u001f/=KuJ\u001a\u0016aNJ\u000bv0ӻ%\u000f\u0018vd&j\u0000qjr։\u0000/\u001ccQ:qBw7%\b%'\u000eY\u0012t\u0002,$(P\u0003T\u0019sF\u0015a\"\"$;1\bdև\u001a\nB\u000f1n$X\b3\u0017$D\u001c\"T^2\u0013r%\u0010\u0016[Vl\u0017X:zm6\u0019j.߿vm0^FX+\n\u0001Hjo'\u001b>m\u0003፠l_\t&4z{apKݝ\u0016;\u001f7nt~T)=kje/|{\\g]\u000b/ꅇs\u0011`RF밴|\u000fʚjy\u0007\u001fL٨\u0004\u000f~con{ֶ\u000b\u0012]1\u0001\u0018lx?\u0016Ûo&*OM\nMy B]Ylޢ\u001b/`R!6\u001a\u001e\tK_ߺt8\u001aWsjn\u0001)g\fd\u000bd\n'\t\u0007}/!kܿ~Dȅ\u0000Y#q~\u001ei*%s\u00030#T\u0001\u0015!41Q!\u000f!.ťzmx߻+䗂bWܒ\u000b\u001bo\r^\u0011Pd/B:\u0010JI\u000e\u001f<ǃl2g-~\u0010q@,gTrnm3\u0013$0ǙU\u001f@Y\u0002Nx\"\u0012&\u0016:,\u0016\u0002g0B\u0000FT7,\u0001'*%Pٽ\u0010oV@3J\u0011e\u001eH`j<4\u000b\u000b0Q@\fVW.\u000e\u000fv6Kم\u0018\u000bmFc\u001dFeb>\u0017N;`W\u001facR\u0018W\nD\u00123(mQ60\u0011\u000fSz\u0003jV;\u001b\u0006,?ͬfzB(%)Ɠ\u0004\u0005q.̝u㸐RO\b\u001baSjv@\u0015ꦐG;R]3m8((PHuH\b,LBz%8\u0010gD\n3Y)\u0015YINN䪃`\u0007@m(Q^\u0005\u000fs)\bᆛvo\u0001\u0002(\u0003fҬ\u0007\u0005T+yW>pBSS\t/7\u001b\"rM\r1{\u001b_yތ\u000b{z\"0g\u0001ͣ\u0003\u0010!N?iq\rFl\u000f_y ڄ8\u0016\u0012գLc\u0019\u0015}Fk1!I\u001fDyӎ/\bS\r\u0018*\u0005v\u001f\bw\u0006;kϩEʪ)e\u0011d\n\b\u0017#UJL\u0002;HGp\u0003&mI\u001eetSJ+:kܘ\u0016  { qG\u0013Y\u001f\t|l҉\u00058\f\t\u0010\u0018\u001b\u0012jƏ\trnu>9(/a\u0000SL}\u0015\u001f!\u001dD,Rj\u0013Ҽ',(IɬM{\u0000I\n\u000b<\u000e1io,\u000eH\u001bI)eԂba&\u0001\u0005\u0000`1RrPaZ\u0007\u0013\f\u000e.8#s\u001etG7B9Z\t3iGKZi91hiFF\u0012\u0013N?F\nI+A'p\u000bt6^\"\u001c\u0018\u000e\u0007G\u0001_\u00024\u0002\t@\u001c\u001b\u0018c\u0006b\u000f\u0006<mԣl2ʍwD´\u000bi>b\u001793\u001d\u0000V'OM\\Q\u0018\bZ6\u0012Ly\u0004\"|L\u000eԏ \u0014fARծd\u000e\rw\u000f\nLƃ\b\u0017F \nM2:tKN\u0010$`Ru\u0018m\u000b\u0011\u001b\u000e@\fGq\u0013\u00183\u0002Lry?\u0010IPҫ\u0017w/g\u001cHU^R\u001b\u0011\f@ۏA!>)(\u0017\u0005a.Cƛ\u0018\u000fdww_}\u001f:l\u0000W}Q)\b\u0017\u0003\u000fy΋L;a{>\u0003\t^DuB|uG\u0005OFSDmM+`1\u0018@U٪Kv\u0013U0Qځ\u0016\b-WH\u000b:}\u0010#\u0018x鳾\u0019\u001f\u0005\u0018_\u000e)/\u001c\u0007^L-b\u001eJ\u0000O\u00004?a\u00010\u0006G3!O\u0003Nυ\u0001\u0004I\u001b8\b1qj>$j%3\u000f!j\u0000\u0012\u00021\u0005\"-pK\b\rSIg1\u0004\u0016I\u0010E\u0011\u0005\u0011L(+$|<\u0001N9c\u0010i\u001c\u0014eB`s@.gռ'DƘD\"\u0001\u00163SYg4*\u00137\"Eи(fa$\u000e_jdx\u001bllƃ\u0001l`\u0018\u0013&'θ11\u0018u\u0011\u0000L\u0018\u0019/\fgOqAL,sEr\b]!t\u001dr\u0004H\u0001\bcf\u0017Οr&\u00133޳^(F \u0019\u0019Ud\u0001U\bM\nJs9\u00044eZU\u0006N܏'3Hy#,-ex)IsޘӏC\u001fT\b7C1U1bڏhdA.;<0\u0004  <;;\u0017A㡝8\tr^,U\u0005ު:+G^\u0004\u0006\u0001P\u001c׵L?U[\u000b>T\u000f\u00101@8s:\b\u0000$\u0007p1\u0000\u0018\fs9W0\u0012c\u0011\u0013@\u0001peuBʃHpC<(\u001c\u0006M9\u0018m\u001f`\u0010N\u001fzf\u000e \u0011\u0002S.\t׬30<ux\u0017\"n! \u0007Ç\u0010\u0001e\r0\u0015@CQ&0\bCD\u001cP$\u001c\u0016\\\"|f9\u0007L\u001d\u0013O<=;:ታ\\'|3N\u0002J\u0006bK\u000eo\u0018sƅ4P\u0015O\u0018\u001e\u000fB|DIT?\u0010 Bwٳs_>r\u0004ɓQ\\y\u0013>5\u0015\u0000\u0019\u0005MB\rR\u0018cZ㙙_gfp,Bˊf\\)Zi\u001f\fA\\4\"#Lz\u001a\u0000dz\u001b;\u000f\u000bꉉ\u0013\u0013No\u0004DݣK;\\Q\\h>@9?\u0011%USi1\u001eO\u0014\n0mFqb\u001aqX)io\u0018\u0005Q\u0018T\u000e3`1MRHPz.\u00050JK9Fx \u0011O\u0005/c\u00075Q \u0011\n`*<\u0011\u001f׼\u0010\t3@2rFЋ3Ӿ\u0019/(4\u0002B%Q~\u0013\u0005wb$se9\u00197\u0004\\JWicl\"Ҳ\u000b@1Le\u00052\u0015\u0018k3j\u0005\"L0fȶ!\u0004H:I+\u0010*@\b'\u0018\u0004dvz\u0004a&z>8u\u000b\u0014\u0006MPAP|\u0010{\u0003\u001bqr|!Es\u0019O\u000b\u0017L̃\u001293\u0013':y'vxHR,\\\u0017pR̜(Z\u0001t x\u000059\u0017~gN;fN\u000fv\b\u0016fC\u0013\u0019'S\u0010nq\u0019`O<sz2QB;5陜{\u0018KZ!iN/51\u0005y\u00038;&Ψ/\fēsGPHlڨv[1PLg+--q'\u001c\u000eGJV:j\u0013\u0004j4\u0002\u0010R!Ax\u001d@<L*\u0013팵x̜\u000b%8aTUx>\u0010\n˲`\u0006`N°ey~wu`e]d\u0015%\u000b@ǧ:b YA2\b@iS z\u0001̇[\n\\hI+ׂ\u0019-0\u0018\n`'|_;pF\b:3\u001b\u0001S@d\u0015*+@A]P\by\rN\u0011\u0015\u0013\u0011F\u00169\u000b\b\u0005ab\u0014hNŘx\b \\ń\u001cƚ4#2$Lh\u00169^D\fbX F#8\fPE<\u00001 \u0011y\bU|a\u0013dQ\u0001ƴ`x=>u\u000bP%\u0006RA\u0017^=Z\u0010\u0010\u0003j\u001f'gɧϸ\u001c\u001e\u001ch\u0011p\u001c%UI%`\u0018\u0002!fX\"X i\u0004(ƒ'Lt=S̟O{\u001c籧N\u00078;q60B^x\u0003ʇa*\f\u0011d\u00031L\u0010\\r\r=}f~\tEl0\u0010\u0018Wh)-aXY^M\u001cno\\Xf\u00136\u0002>urzz\u001d\bD\u0004XE<\t\u0019\u001euŊ%j\f򢡓,eB\f;[{\u000f\u001dݾqsř̬?\u0010!<q\u001c/q*\u001bm⣅L\u001a,[w;o߾{\u000fVWJES<\u0003ṈAmT+fi5q\u0013&p\u000eoK\u0002_\u0014\u001a\u000bm<pt\u0007M\u0000x\u0000zE1f7NM\u0007~d\f,(\u0016\u000bL\"\u0014\u0007Bi$YR.\\tI9^3\u0019?()ۈM!(L\u0011\u0014xؖ˕6l;Kz7nlۯ\\}t+{~J\u0010\u000fn\u001f\nc:d\u0014\u0011\u0018a)$o͒V/ju0J9_}ڇ/|ʅ?_ۏ\u001fn\u000fk\u0012\t\b\u000f\u0001#bF\u0004f\fhb9eu[1{مfn}sѭk[<8~޳GGJL,K\u0006\u0002);@N9g\u001dȉ'NMN{^s$z5ɜ@c\\*Ϛmp|\u001cHX7\u0016\tX$ cΒ\u0001\u001f\u0018.n\\\u001az{~\u0007\u000f'/Z߶m\u0018\u001ec\u0016\r:m\u000eꦐn:\\F.w+\u0017qsbѳ˯\u0019p?|{ٽB*8ݮ\u0019g\b!D\bDGu\u001dksGK\u000b|k\u0017a\u0017_|wn^_7+w6.R);\u0012ea\u001a\bVҔ\u0019~-&\u0016bga\u001eҫ\u000b;ͷ^<o/{sۋ@g\u000e?Ӟ'N94&lPRjKcͼ4hX 5v\u0017\u000fο¥w\u001f~K/.pz}\u0018%QQ\u0006v~AԾ___޾ͫk?JZB\u0001\u00118i O:w/컏>{\u000e>yyoy\u000f?~'\u0017޽ۼsP\u001eJD5%s\u0014E\u001b|\u001bWo.?Tx~\u0017\u001fˇ\u000f\u001fˏ\u001f\u001e>{}\u0017_\t]wFNO\u0007\u0001\u0002\u001bbA\u0007zEd.7J\u0003h%rх\u001e|ۖE\b(Un\u001aߪ3ϮZ_~?w?\u0000\u001f?\u001fR1\u000b\u0014ͫz1:6#\u0017z\u0015w\u001eg|ꧯGWÏ\u001eҍ|B\u0019\u001a@\u0013\n\u0001Ԝ&/e\u0017w7\u0014޹Qw˿~?|\u000f\u000e/?w\u000eJ9\u0003(\u0011dԫuR+uZ\u001b\u000f^_}_}o~_/{_%`ufjD\"LӽXC5{IIx_{k[?\u0007\u000f]\u0005P9ayKj&*\u0001.v\u0017\u001f_/|yǟϿ}r?~v\u0007-IYHfjSSAS|$t\u0011\u000fo]\u001fWo?|\u001f>o\u001c}oTF0D\u0004F(NCx,5\u001bQ72\fzg߹\u000fѕ\u001f|/?y~>\u000e{_nқ\u000f\u000ekŴ\u000f\u0000Q.\tJ9g,ac\u0007-ڕgm\u000f\u000f_＾v\u0017C DŁ\u0004\u001b[r</\u001c?}e˷/胫\u000f\u001f߾aP(\f\"\bǫYI*tJ.\u0016\u000bKgw*\u000f{c\u001f~/|x黯o䣫v΅ިZ)UD=GY`\u0017\u001bW\u00143O$\u0002ֲ}\u000f;\u000f|w^+\u0016\u001e\u001d6nn\u0015V;r\u0016\u0007\t\u0011PT\u0006EpiCI*dFƖJҝڧ6~ow{\u000f?xO|7W\u0017[P{x\u0017\u0005\u0004;}QY$3=^0e\n-\u001a]Bׇңo_?\u001f?}8\u0018Q\"/\u00055Dbl'A\nk2wr\\?<:W~W'w?{e\u001bF/.e\u0016$\u0002Hfb*\u0004\t50T:]^?zuWowN|Z\\\u0007D\u0010\u0004\u0003\u0012\u0004╜ &L֐3*RK\u001e,\u0016/\u0013t>}yן^\u001fz{G{sŕ(~4\u001a\u0003\u0006GL Қ a\bG~\u0015\u000f\u0016Ut\"wػK\u000f-ᇏןOz_GGj\u0002 L\u0002~8H4Eigĕq8*\u001c\u0015;s\u001f?>zʍz\u0017\u0013\u0019uz\\3\u000e;\u001a|c[OXVpϯ-^_m\u000b\u0003>{cz\u0005\\l4SeUYA(\u001bP3f\b9K9+TU\u0012gt9\u000b\u0005\u001b5Π+t3m*P\u00109\u0017`\u0011&\r\u0013{<PH&V>+_\u0018Lo˷/|\u001f|p\u0007]k?ko_\\Z656\f\u0004#{\u0012L% pI(B\u0012Zڶ@Ì?\u0017o]}R;h2fe\u00033\tу0ðZPKHLF%\u0016BvZ٣RnyM4E#\u0019\u0018\u001c~zIN\u0001ϔc(\u001a\npl.$%Lʴœ)-JDd$bB\u0005\u000e=\u001cむ\rb|\u00039\u000b\fӋ\u0006C\u0018KTiq^*\u001br)~u^\u0016/\u000e\u000b{\u000bٵ^і\nłYP9c>ʘP\u000e zzfr\u001d\u0005%%li!Mxih?Ƴ{I\u0004LH\\X\r#L\u0012s\u0000<\bЬ\"\n\bK\\JO[b5$\u0018-\ta\u0017p@L*(gMq\u000f$%?+h(sT\u0011XLV\r(\u0005 \u000b\u00109A']hLƋ\u001bze\u0013\u00112Gi\rF\u0018QNF4H\u0013כ͕nw^_\u0016^ \u0007x\u0013B\t\u0010~2\u0015\u001bVU&&\u001dӮ\u0018\n^f)JRUb+}Z&\u000e\u0017V;F73V2|\u0013sӮ\u0013g=\u0013n<ʁ)^U7ҹ.M\nu&-\")>=vK\u0017FzՔ\u0005\u0002G#0\u0000nqc61Bw9>Nf4\u0013\u001f\f/\\\u0017 KI*|ö\f%X(\"NB'\u0006'\u0017\bA$Ō\u001d\t\u0007 \u0010rDg0 so\u000b! 1- s8 '\u001d1:E\u001b-1=pDįt:|$\u0011R*5a4J\u0016r㲝h \u0010\u0011CD\u0018g\t_\u00103bLfƍ뿜ړgg#(˦&Q\"\n!,iLBa\u0001dLHE+bဧ\\\bkuΑ\u001e\bAqp(~\u00189\u0016e0sR]A'f\u0002S~\u00062\\JϒRx@\u001cdǛ2L\u0015Uh<I7D\t\u001a\u000b~a\u0007V\u001anO\u00070\u001b\u0012T3R\u001bx\u000bI\u0002Z-\u0005\t3L'1Jj5Z\n.o7I9Ej\u0000r#\u0017czJ\u0006#\"\u00041\u0005fMF+\u0010R+ZڢQ,N\u000bjrf\u0001DP8\u0017d~♙ГS\u0010\u001fb\nuB\u0017{#t\u0002p\u001895UF)Շ'|>'儥\u0003Fi\u0015r\u000ekNpA\u000fU@.M:1g2\tR-Vˇ'\u001cEtR\u000brn*\u0015\u001e\u001cPF;H8fx#rE,T缘\u001f|DRf9bj\u00156ʎ\\:\u001bVG](ity˧aD\u0013|_CLI,\u001d^rlX>f8X\u000408s'\u0003^\"VԬ\u0015bB\u0004\u001d\b\u000b3\u0001n.\"y\bۅ_{rN(E<*׋\u0007\u0001>\u00050%2mdtq\u001e\u0015\u0010r\\\u0017Z?&\\w3\u001e܁XTjU*\u0013%H(z\u0010un-tOXA:K\u0003.=\"6m)-:\u001b}\u0001e6\u0014\f1I)`׷\tR\u0013=uAIu.\r< 2bR}$\b\nŰX\u0001,^\r3\u001e\u0001I1\u0010\u000f7EV\u001dPVgK\\o\u0007JDj\u00036D\u0015S\u0002L\u0000\"\tc\u0010+ \u000eVCժ\u00177k`j+6} Q\u001dK |I\u0005wld;ĤbJ%,'#I\u0007\u001eemg9QG$pHeT\u0006\u00128?\u0013佘\u0015ra24esҁ#\u0010팊R\u000e+ՈTa\u001eL2@Z \"<P:GFBqKm>3MzhD,jم\u0003Dڃ1\u001bsN{b\t\u0017\u001esBjQH.zP󬇘Č\u0005hY/O{'\u001d\b@w\u000f\u0010\u0013RJaqĀS}6=$SKDr)\"\u000esN\"\u001e~%\u001dv6š\u001f̣D1^\u001e>kv\"㶱*\u0016o0\u0011Yu?\u0007ρ<*\u0013;`\u0016\u0001q\u000b2?i\u001b4\\k|f`wUQzaex\u0001f6;no=_߾ou/d\u0007W\u0018if;N<\u001e`S Z~\u001e\\K;\u0001f4ۨڈE\u0010Ífsxy\u0011O\u0010\u0007fDJ~\u0019V>*\u0006YC`!\u0005wL\br3a\u001bB\r\u0005/\u00142C\u0012dM\u001fe\u0002d\u001a@mr#/tG\u0002A>\u0007ɵ\u0013KZ\u0005\"xެ.T\u0006DJq3^َ7g\u0003\u0002w(k\u0011w{\fn̖QpڅDL\u0011v\u001fO,ƴ<\u000fBM-\u0006<P`0P䲫ޡ1lō\u0000\bKOAϥ\u0016#\u000f\u0019Ѧ<s/\u0000T[15#<lP\u0004y\u0007ty\u001cӔZAP@=&\u0012>\u0006F\u0019=\u0001\u0010SVsK~ƴ2nuh\u0010fK+\u000bl=\u000bK\nZ@g 蠲^T.\u000e4\u000e|n5x{qq9/\u0001\u001cbg\u0006\u000bלdb\u000e\u0004U:9[Gz\"hfY+bz DqI&jeK. %/d\u0017F\u001f.<\u001cհP\u0002^h,=\u001bxn_H.\\.?X8&RK~(G{\u0003Zo^mfitcpɎ\\6թ\f\u0002F\u0007xP]>R?\b3 \u0000Y͓^z.$BW\\:I4Je/ls>e*\u0001\u0002\u0015\"e\u001an/#nRrv=g\u001c\fK\u0011\\FÈpDڮ^\f\t~:F\u0010[r[ReGn<\u001bGϻ\u00108pa@B\u000bobZso#q:n-$Gϖw^̮f+fT7:M\u0007hx4\u001fy$\u0002\u001bR@q;\u0006뤗(cf_N\u0004OE|F\rwa\t?vHsU3\u0017\u0016ݷ \nqy\u001bb\u00116\u0013Jѣtju~L-*>t\u001e\bxeI)AXT\u0018F#\u0016o\r{]\u0011r\\~6e\u0006*nq{\u0014QZ`k!m1\u0004t\u0017\u0010E\\a\u001a+\u0002bZ.]\\>+nș^gt׿\u000e\u0015wq~xzn\u0006\u0019,0tb>\"佴\u0019V\nNƬNe1nu\t\u001b\\AfϓaE,n\u0011R\u0014'l\u0004S\n=42}\u000f\u000bu:1S mC<[saTkR$ۮisW_˟v\u000e_3>*Y_\\H8\u001fcWS˰\r\u0012Չ\u0000MXɵֹˣ\u001buhGu!\u000b1HGQs\u0000/:\u00005z\u0017D:\u0010_ƕޝ\u0002y\f\u00199!\u0017\u0012 \u0012\u000e.Oe\u0016Mv/\u00002f~r}:t`0X9<1 Au\u001bav酣\u001b\tF_=1s\u0011\u0003x&;oZ3\u001fo%e\u0016\u001dDI\u001f\u0002I*.^^ell*wx[r~9=\u001f\\\u000f/km\"^I56\u0005E\u001aHmP\u0004Aa\u0005iV\u0012CX.\u001c(vf8\\n9kp\u00195ZZ^1\u0016]6\u001a;[w<޺ne[\u000fJ5j5w[^]*Zk\u0010mD.\u00054x\u0016\u001bXX\u00187\u001e21\u001a5\u0002(\u001f=}\u0011$\u001d)ըޝ\u0013.d\u001d7\u001b)\u001e\u001a\u00077v\u0002`n<eiMUU&)Қo0&RftUol\u001b-gU\u0005P*KU\u001e5vm\u0001rH\u000f\u001c$f\u000bט2Y\u0006\u0005\u0002(^Th\u0007R\n̓\u0018^yu7տ\"\u0007Po߽c\u0007\u0007蔒[.\fo䖯d|Tk!LfJ}aunvC$=\u0013\u0010t1\"\u0014J\u0018O\u000e\b(N9i\u001ff̂IG\u001b9d\u0016ڔ|r\u0007\u0010TTnRTG⅑3$\u0004/\u0000\u001drZ\u0017kVc\u000f2.C2\fR:k6\u0017sBn1,Ex?cɮ8/NtVݢf\t\"\u000eCu\u0004^|~\u0018`lU?W[>޼b])?dZwRmteu嵵oο}>տȚ\u0007[\u0017_\u001bbZ{ \u0006\u00036\u000e+u4:RX\u0002Wq\rZrjne歘Yj[dn\u00036\u0017ܖV;JafP\u000b\u0007ެ\u0018v\u0011\u000eiMhER\u001c\f]^-t|,\u000b$\u0002J[۸=M++V{Omz\u0017\u0016 1\u0000?f\u000bD閇P\u0016oZKVjnt/ѽ̦@\u0001ڻx\u0018_\u0003v{1^\u00123}@11޸ݸ\u0015/\u000597L׏^Z<w\u0015XS_} T\u001b>at_KKި8O4w\u0012^Fl:\u001b\u0010x͏\u001bѵ+_I\u001c\u0019\u0003K~7K0!Bwǌ(W\u0001M/b=3\u000b{b\u001a|}E9\u00060g9\u0005E\u001f\u00180\rPi7\u0012q\u0003yHVD,0ք\u0000W}JyRra٨of\u000b88\u001c`\u001c^|f\u000e\u0002\u0010\u000eB+ۿ_R\u0001L.K\u000bGQClaxu\u0017w˹M,Vi2$\u0000\u0018@s:feͪobz5XJe\u001bV^\u0001ٍd<oT@\nK\u001b\u001eZ\u000bRqC)mi50\u0011\u001aWv}57M*v*\u000bkW\u0002|jp-ѻ\u000f\u001btv\u000bDLX03\u000b\u001b\u0017\u001b\u001bOAa0#)WaOn<p[խW/l<\u0004vuc+/ܞE\u00145asYz}M}t9(f\u0017\u0005\u001aԁ:\u001d<\u0018N/-F\u0000YX\u0005\u0005gs&:\fxd\u00061RY\\6!dmC/F<[Z\u0017R\u00015ԃ^$Wցǜ\u0012sa\u001eDzU]T{\\\u000e3\\s\u0013T\u001er.*G޸\u0010/k\u0011k4g\u0003LT(De\u0002nf&\u0006Y9n_%De\u0002I~\u00195\b\u0014Ct\u000e\u00003a6@޹\u0010\r\u0018y0hE؃\u0000_tvI2\u001fxEo+u)\u0006x\u001e\\\u001aM\u0007ȥ\u001564a\u0001إ\u0006Հ@ί\u0001\u001e~fP3EltPkMP\u0003L:̦\tI\u0019M8JLT)9\u000b2\u001a.%\u0019\tL}\u0000\u0004\u0016QkQ\u00040\u001605\u0017e\tֲʭ٨8N/\u0017Ǿ\u0015\u001b@F\u001bg\u0007PH[=է=\u0018\u0002߹\u000f\bG\u000eA\u0002O\u0012Bj\u0000I?4>ݵ+˅Faэ'\n`%`se\bu)=t7ozL\u000b]cTgRKlf\u0014n\u001bdD,ι\u0017W3=\u0002\\ċZ\u0019\u001c{\\;ޑZ\bQу\u000fb;aH,ʥDX\u0013}l<~8*}L2 cZM\u000e1c!\"ւtV,F\u0017!gK>:?\u0017\u001d\nUJvsq#@T\r)\u0003Fq|%\u0017g\u0000I6h܀3Y\u000f\u000bh-߿fT\u000b\u0005%6\u000f==\u0019:18lD\u000b[Fa\u0003MOE1۰TF^@ƴfr^)SJ\u0002?\u000e֝Zh\u0011\u0012\nA\u0000k\rՍ;tGb\t(ITh\rH,\u0004dIƤ\n)!;TkݥW3\u0002L\u0012UR~q6$P3H\u0003v\u0006\"$UxGrA9X\r09X\u0001S\u0001g\r\u0015/&\u001abR!pD%[\u001e\"\u0001q\u0019\u0010X\u0002YFb~3>zϤ0B,Ti7uMD zXfW*״ڸBI%:0\u0017\u0014ش\\Xnw\u001e\u00115'<L_\u000fX<!:W*WؘD/\u0015\u0007G\u0000\u0011A=\nI\u001f\u0000VתK.C`\t=DZ.maz\u0013Ȉ\u000b=h燣\u000b\u0017\"L\u0002\u0017>0Sk^*\u0000P勽\u0003\u000e|~-:j\u001d=D48\u0000Y\f%\u0000\u0006_-\\TsA.U:_ur\u0016\u0003\r|Vyf}0\u0007(Q*\u0003ـ膵ٰS欆FǻXk\u00037\u001c1oXD\u0019+֣r-\u0015\"\\^/1\t\u00000|Afp\r1&ʞ<nN\u0018\\n/ջZ\u0000t\u00053\u0013^PA6gh\u001d3NPgVZ\u0005@\u001b\u0015s@2\u000b\u0017*\u001br%B~&\u0005?\u001dG@\u00121G&39'n\fʹ򪇲#\u00130\u0003\u0015\u0019\u0019wgSu\u0017\u001b/\u001c&\u0001fv_-xv\u0006xu܎\tC$\u0017IfB)\u001d!ٞ\tS>\u0014SNGf@\n(Ex\\>\u0002\u0015\u000bQ\u001aʠZQF\u001bSsaR\u000bj~K4힇.E+O\\?\u0019\u0012\"\n\u000b\u0015*\u0014K3!\u0001\u0001w\u00178\u0013\u0011PD\u00000V2U\u001a&+'tHڔqD\u0018$,@\u0017R\u000bk\u0014\u0010I\u0017\u0016\\O\u001e\\\u000fyȹe6\b܃(fyhĭ\u001ewx\u0000O\u0001.̮\u001f3q1\u001f\u0002p\u0005\u0017\u0002\u0016\nqr\\ioEy-߷%;\u0013[\u0004\u0010a\u000b\u0018_81\u0015\\QJ\u001b\u0011g<:\u0002dR-Sgf!7$\u001b\u0006\u000f65Zy.\u000fLA΋)\u0010\u001aRsE'\u0001*U\u0017k\u0015r\u000e\u0014S\u001b\u001e:5A6B[^\\\u0003-;\fpeBf\u0011*O7\u000b\u0017|!\r/mx7k\u0015S\tUk;>:\u0005؍%vp~i@c0+:`\r\u0004\u0012\u0000?Ѻ\u001d\u0001Ђt}UL!>\u0017d bJ\u0016`pvQj\r\u0002,s4$\t3Y։iS)?\t\fNe\bCKv\u0001ӘѥRC6\u0001\u000b.\u000f\ns4ֵ\u000b=:\u0017آdS#\u0013\u0001\u0016\bJ\u0000;\"\")\"QK3hHdZ@lO\u00078\u001fU@$AD✟ʚ\u001b\\1\u0010E\\X1\\)/vz\u001e?!]5\u0019\u0019\u001fZn\u0005\u0015@Z}K\u000fqgN\u000bpMJA̻ \tƝX\u0013P\u0011f\u0010n.\u001f.L1mXiHULiD9xM\u0018t\u001979&\\33\b\b]13\u0012Co,>n|\u00105g\f5E.z0+H'vT\u0002\t<@FPvL.0CBх@\u0002d\u0019 :\u0013ktzE,\u000eT\n\u0001@f\u0005r1@M@b~5p1x\u0015֚a`{jٺ;w[)AJ%;_Z\u0015VN)P6\u0003Z\u0018f\u0013\u0014D)+.^\u0006X\u0005.\u0018o^L/\u0000܂Fyq3ʦ;\u00101ޑ\u000b\u001bl\"mvܘ>%a\u001c\u0005\u000f\u0004\u0013xp6\n\u000f耏HΆD\u000f\u001a\u0007=\u001f\u0011(տ_L/^Sj\u0007^\b\u0017R\u0010İم&\u0018ǧ\u0011m\u001d\u0018g\u0002T\r\u0005)!@A2͘\u000b@:c\u000fO?!mZT{P\u001b\u0003x\u0002Wa.\u0007\u0000玊a4\u000fK1{R~\u0006>Щ\u0018.\u0015ND\"\u0016W+?oRS\u0011_ε\t\u001eL sa\u0001\b 4\u0004\fp<Ba6\nL\u0014\u0004-)D'\b1\u0019!\u0004\\19\u0007\n\u001fnN{kMAd\u0012s!rҋ\u0006\\\u0018\r\\k\u0010<\u0016%M'Йi<\u001e@\r\u001can+C5\u0000\u0000VxL\u0004)\u0003+5\\(MK|b.ŃT\u00123a!G\u000bBn!&1~8IV\u0002\u001eFs/|&x\b\u0017Y5^e rKKH\u000e/AfGi\u0003D\u0015D\u0017/5vfLB`I\u0013b3 0\u0017\u00051'mgf\u001acQ8>yLMxوmsQȎbJ1>'n\u000425\u000f\u00123\tZu\u0003g#Z\u0003\u0007\u0011ěťc\u001daJvAզ#\f\\%](/@l\u0012Zq\u0003\u001fщ~΁vE\u0010b,p\u0004\u0006\b\u001f)^\tUJ\u0000\u0006rvj3~֋aDFJeǬ\u0019!/ZG&|y:\u0012\u0007#rB2\u0010M\u0010RNMw\u0019*e!>7\u0019`&(%ey>74\u0005L|чYqډv ވ\t\u0017'~:\u000bsdr\u0011\u0014\u001bƽ)\u00179⤗>9\u001f5KqH>y\u0016\u0002/\u000b\u0013|==<1\u000b\u001aS'9awT\u00000\u0013\u0016\\\u0007\u000e\u000fgB,T}uܢ٘6\u0015l\u0001a:Xno-DoM7'\u0011BX+*)喁B.``\t!\u0010\u001aa\u0001\u001a\u0001Hfhj\u0011\u0018)&\u000eӆ\u0017Q5ݸں䶜\u0001QvLzPՇRvI,\u0002p\u0019\u0010h\u0018pA.XD\u001b6#l\u000eA.4\"ZKbZLq\u0010rG\u0011\u0000Kj\u001bјJDYؾ]ٙS*)UYJ*d&w\u0002x}+\u0000<\u0010 A\tdJR*\"U[mvY31hGLLw_s\u001f@\u0012\u0004@\u0002\\R|7S)s󝻢\u0019ڇ\b>Ba+]V\u001bczz\u001bwO;\u000foptvw\u0010Ӝ\u001ft۝X}\"[u^\u0001@kE\"\u0000*Hs7+S5K|d'Y\u001f\u000f\\M0\u0013P.Y\u001a4:{RkiLfwM<d+]\u0003$F\u00172c\u001a91AX[\u0016^1\u000b\u001c:S:\nfNR^\u0005\u001aSt\u001a՜L\u0017\u001b9$\u0010-\u0004\n`\u001asRkI\u0002]O\u0015\u001fbs\u00040:\u0004f\u001fբ{`918\u0016-\u00067Б\u000boƻ@~]ؚ}\u0000Mx\u0016)XUsn\u0005_\u001bL~O2N\u0015\u000193J\u0007\u0002Rm>\bKw'eܝik22Θ#Uq++\ro\u000f/ϭuv/\u0013\u0014ɚ#%\u0016\u001e\u0014X@\u001b\u0002_ru\u001b}L]ϡ;\u0007@n@x\u001a,Ɨ'H\u001cFW٠\u000f\u001b}5gV}\u0012\u0000ay7`ΚX\u000f\to$V޷PS{^4U|\bFֽ\u00129_\ry5\u0014.`i]K%Kӕtn\u001d/\u0011V>8\u0005XW\u0010̏S\u001eմiDk%Ks0C`\u0002\u001dc\u0015DKbqҭwݸqKB\u0013n77]*Z@ؽJ4wph3\u0018\u0011l{Ζ09H{:c_w\u0019\u0012E\u001976cŊ\u0013q^5m$\u0019\u0000PkZ+eoW\u00025\u0006kqF\u0017\u001ec|.\u0018\u0003+3\\\u0013܋B7\u001dC3><EǴvW/4\u0017FWtz9\u001bÄ)<F[46Fo T\u000f,&\n\u0017^^ \u0004,% 7]zGR\u0007X'θ!0G9T՗}Ò^xsR\u0003\u0019s&l\u0002ɰ\u0014p\tڑv%WW|M\u0019\u001cZc\t.%5GW7@>\\[\nm/n\u0017ZK\\m\rq\u0001\u001eta~jC\u0000u\u001b\u0015l\rѦ\raܜ 홈p;S\u0012\u0001[\u001aeh/ܚ`\u000bVrn\u0002\u0019.\\\\o\u001f\u00119N\u00042\u0015\u0000v\u0016_\u000b\noʝ\u001f\u0018\u0004m\u0005&)\u0014\u0019k4\u0004M֮\u001dȿrjjxi\f]X0hf,1܂}F\"\u0001\u0006\u0013\u0004P_\t\u0000\u0019kX$,\txyzM\u0010\u000b\n-V)՗,ތ(k4\u00049s\u0011ZphO-oŖ7c,5ڳ|e:[x*1Y\u0000xׂ+Qq7\u0018[(k-̊tqR\u001737+\u001f\u001fxe\rmeJ\u000bko\u00111ƅioV3W\u0018gHXte\\\u0004D}\u0005M\u001c^8\u0012:Ϝ3Q$Egl\u001aeQ\f\u001d\u0015\u000fnDsdI癅\bE`5\u0001\u000e^\u0001\n睳J-u\u0003)\bnH\nCÃ){[\u0006\u001a\u0017\u001cFkh\u000e٦9^\u001eӅh\u000f\u000bo8bV!ZօD5?\u000fj\u001e\u0002\u0002]\u001agȪ=Y7\u0004W8\u0012p\u0019}d\u0004~`\u001d)`\u0017\r3\u0001\u001bh\u0016[;͇EҖ\u0019炜?\u000f\u0006xp55yFzP!o\u001es#\u001a?|{:mbܔ=ú-U}h\u0005\fl魈pǞ(q8cz\u0016)}:î\u001aXg1?6R1n1f\f\\lP\u000fCg\u001c)a0Ӫ-P\u0019Kd\u0005\u001c\"\u0014\u0013ς1\u000fvγLH\u000eAc\b\r3^ri2\u0006լWk\b1\u0018kINor\u0017V6˿\u0007&i$hh;2j6MYUK0;x0}d\u0000M\u0002\u0012e,4a0.G0Fʦ\u001aʍjZ4if8Ə\u001e\u001cZ\u0015\\cK֯S\u0017eO|mv\u00072UWn\u0017\u0006vAo2֐\u00100zf'ְG~\nk;Eo\u0016Zle[$g.\u00110>t\u001a<K@iт7͡5*SU>9ђw)ngm)\f\u0011\u0011IK\u001c9e4X\u0004hB'z-5\u0006l\u0001\u001cyƷL\u0016R-\t6\u000b\u0006LҢ>ࢠ3㔗0gɚ޷`&4FKpi\u000b\u0018\"X`S|q.Xm\u001e%^ՇWMʔ)0L%\u0014,aOj\u0015Hsi\u0013q\u0003q\u0001\u0000(kғso7?\t-mJ}8NZG\t\u001bnpc[֘\u0018Z]`@SpI\u000f=\u0000\u0005FfӬ\u0007`qe\u001fm)Ɠ\u0005\u000eHl8\u0015\fu\u0002\u0013v$ּsq6\u0000^L,08@\r3\u00134\u001aZ1\u0007ƺ}bmИͣZ\u000b\u001asS\\\bAQצM:,똃Ns/v]\u0019^\u001eu\u0019ݦ\u0017dj.\u0002j\u00032ǴȈffJoЎ4_jw9wDέ_2՗t\u0019\u0017^\u0004f\\1\b\u0018.gOVC@t\u0014:7\u0015\u001cP\u0002o\u001cXt$h\u0010\u0000\u0002L{Fp\f0\"\u0014֢;ɕ-kLDyfgx\u001f趆\u000f=K@b7'@=8\u0017HVC#(/;G3p9`Ѽg\u000e8kM\u0006\u0017_ݶŪx\u0018*\u0003ct.\b\u000bj>W=-C\f)\u0003go\"k@ZH.ٳm2\r-[+w,P&}x\u000b=5p31S:n\u000b\u0001iL\u0012qO!?Ȅ$cg\u001d@\tr;\u000bp5%Fp\u0004\u001d\\Yon\u0014\u00035b\t[\u0000\u001fd\t7\u00157K79G?Y=Η\u001c?$G\u0019ߌ>\u0004s\u00050:\u001b :Ē҇Ԃ\tSM>4FA\u0018K\\^%DY\u0004U\u001fјWӆQE9\u0014\u0000\u0012u+]\u0019u\u001dL\u0001mzW/r1Շ0)3Ǭ\u0001\u0019]1մ~\f\u0011N`e\u0006\u0012eI0\u000f+7>ch\u001dH֜P\u001b5=mF045\u0007-*2Z\u000fj#\u0006+Zx˿Η3y\u0004{yRwUc#\u0018kNc!\"ak\u000fx1\f\f\u00116AAC\bX\u0007c\u00078Z\u0005x\u0019<\u0014/[tej:2H\u0003\fB/\u0003\u0000:np\u001e?k\r\u0017@(sT@q\u0017SL\u0010N\u0010P\u0007CɁW[2&[w\u00116H\u001d67s\u0003\u00054\u0003}a=we\u00131`&!{ўa=Џft\u0019\u0003q?\u0001dp\u0007y<\u0018IoUst3\u000bp\u0001:#\u0010XDV=\n\u001a\f\u0001\u001bCxg>iKR,\u001f*r<Dk\u0000<V\u00179\u001bc\u000b\u0000\u0010]ў#]x\r5_}4N\u0002s)C\"z7Q8ř):I\u0004}9p˼k& \u0019+i\u0004\u001b=\u0007;R` xF,\u0004a6\u001d\n(3\u0000\u001aH0Ez\u001a'ܤ%i\rhb|m\u0014\u001a|y̒0ʜ\u0000\u0019_n\u0010\u0001UAѾeK\b\u0017]\u0006ZM1ƞ\u0016\u001dD--Ҷ5ef\f)27F\u0001B\raҖ\u000b\u0002\u0003\u0016Awni ,)\u001cr!\u0014\u00004\u0006\u0019[\u0014^vf֓ŷBkmh[B5y2\\\r{\u0011\u0010\u001e)i\u0014\u0000Rj\u00011\\Q+NY\"\r,r\u0001T4&p=K\u0002˼3c\u0002Z\u0004G\u000f\u0000\u0007Σy\u0017Tŀ2\u0003s6Uܚ\u0000܊\b랅XU\u001fX\u0001\u001bх=\u0004`\u0000\u000e\u0014Mu茴3cKW\u0000\r_\u0000;5[ƃ?|\u001b=5BM\u0014)\u0004`rM2\u001eЙ;̞6D96\u000fN!\u0000\u0011Cs%_.;\u0000pth̤1;fM݁{H蚭s9`k#j#t.p\u001cwCe}`s\t}\u001a^5Fuj\u000f2\u0001H\u0000Lw|Kw;H+\u0006\rӰ\u00193\u001a̞w/s'o1]{\u001e-k\rQ?imR*+7?'F\r^5YҜ'6J`8:=CZ\u0000u\u000b\u001a\u0013\u001a0\u0005\u0005񡱠kO\u0011,x\u001e1ɅW!TlU0z\u0002|`\u001aṠQHV(gOp\u0018\u0017m\u000e\u0019K*Z;\u0005@j\f8{`Z<I'MMxNb.`gM\u0019>2O\u0016\rRwt\u0019]`p\u001a\u0019gVM;gh\u0017kObek~'%!\u001ac-y9:@3U\u00011\u0004Q1ytCi8$eaM_`=56(q~k ;M9ƵF!_@huO\u001a<e`nr\u001dl\u001a1is,\u0019h2p;?\u000b 7>E{hKCC%ޱsp\u001e,@\u0016)\u0002\u001b'\u001cpP$\u0002\u0018\"/]#N\u001bTj55F{@\ra\r԰{9S\u0019qnRZ]pt2:FڰyPQq]go|(}͙OP\u0017s\u0001\u0011Wu\u0018\u001f\u0004Nג75ν\u0004V\u001ez\\MO\nLcN\u001b3[so\u000f\u001f|i}\u0004G9:\u0017L!\u00113'3;cekd\ngaR\t0\f\u0002L郤3<}\t\r\u0011#=$uE=12/:[\u000bJ8\u000b\t\u000bԈu,<W\u0004:D\u0003\u0018\u0013=\r\u0003msY\u0010/\u001d[y\u000b\u0018\u001bi\nit^\u0001V`ƈ\u0018g\u001c,T\u0012Wg4zޑ1\u001ceYp!s\"wAq:2cL&ܳ?\u000fXb\u0015cH1\u0004H)S_\u0003\u0005\u0001ȖW+E;`pk\u001a_(}\u0003B5\u001b-E\bۜ!R\u001d\u0002ڿ<Jij9[H4y-\r\\\u001e+ֈ)\u0018\u0016r/s:,ј5nC\u000b7y\u001f\u0010fW5^\u0002\u0019b0E;kXKWqL\u001f&^mL^#\b5\u0005\f+Sz`&1\n<DY6Jz_\u001e:fFseJ?.S\u000eM\u0001K99XuZ\u00176G*XvpN_Qj==kg7rM\r\u0018\u0003\tz\rs`.5g\u0014̑;\u0001X\u0004\u001a+t'me5>Iص\f60qt)>h\u000b[\u001b[\u0004\u0017\u0003Gk\u0003|\u0018\b)a+\u0010`A\u001bqK\u0012$N\u001cMК3\u001c\u000f\u001a\u001d:\u0011x٬s\u000e\u00164C6%r\u001bߦ\u001d\u0018mI\u001e\u0014bGZLU\n\\\u0018`\\\u0000\u001cj@oƖa\u001c}\u0012ٰ%ܳ[cn\u0004\nC\u0007\tww̑5\tH1P\u0004[Yno\u0011ΥiC\u0014\\T\u000b-g|0)[\u001a\u0011\u001b\u001fn3c0e\fM}`\nLBZ@\u0000ׂg/56DLㄕ0\u0000d\n^S\n.x\u0004 {V\u0004agmIp\u0017\nU\u0002tcѷ\u0019\u001a=3n{t%U~7~z}>\u000bD\u0017x8q\u001c8QK$O\u0013~Tc\u0001Ŧ,\r\nendstream\rendobj\r21 0 obj\r<</Length 65536>>stream\r\nǘ\u0011\u0005,9X\u0016^6Fh#\u0018~DKz\u001c1+\u0013F> \u0003\u0004ìmVC+\u001f\u001c\"\u001d'\u00007AWMc.t;}\u0016h\u0001*ai5z:3\u0006C;\u001fG\u000b7)\u000f$4u\u000e\u0006ѕX\u0007\f\u001c\u001c]oUYg)G\u0001t,LB\b5Rۋofߏ?\u0006GG5(X7̖&KX\r5\u0000\u0003(\u0019t\u0011\tjIf\u001b@ՠ)(7X}W^\u000f@*s\u0019+g`P4$;(tդ\u0000$p5[e\u000296,Z/{w\u001a25a:-P\u001aW0EWA\u0016h\\[\b\rx\u0004\u0005R\u001bX\tJ8\u0017)-Ry\u0016Ԧ֚1\u0006W\u0012ců\u00151\u000f1J[˾L9&6ˑ\u001bo־i\b\u0002BO\t77\u0019\u0016>A\u0007\u0003Ih4&hr^Ώ:\u0000V֔'\u0018|:_3_$68Ov\u0011\u0012\u0014@\u00165qk4\u000f\u0016_\u0007o\u001eafӌ0Ƨ\u0018}\u0011`2\u0007\u0004UF<ZCTc\"PV9 \u001aKڋ\u0019\u0000po'س}\u001e\"`̻\u0001\u001d\u001av9P\u001aӓt\u0016Z\u0003/{2Ϋ \u0007f\u00077Ek\u001dW&t>dt9Wpꢕd槡;@\u0001-R|\r&\u0000(@\u0001XpŖ\u0000[0@\u0013\u0018k*<W-5bm1*\b)O!0^W\tp.3;\rh\u0018\u0004\u0003h|\u0004\u000e\u0012\u0000%ʹ\f?\u0010qڥ5Eka˳e\n\u0007zV0\u0005p\u0019|sS`\u0007BL|=V2'kH7Љ\tj]i5`k;ݴEV\r\u001a#\u001a\u001e\u0003\u001a\u001aS\u00040͑ܰƀ\u0017:\u0007{F\u0017\u0010}\b<x[Ⱥ9w=\u0019=W\u0016\u0014?o]\u0017g\fq\u0007x\nHn\u0012=SUҽ0i\u0000m%MaglŃV)@\u0000A]\rk\fT_ȬI0B\u0000)nJ`е\u0019\u001da\n\u0004f==Af\u0014\u000bʙtĠU8֤+n1֐\u001c\u0002فXKj·1}\u001dW\u0006\u0004nv\nϾ<\u0003\u0015H=KԦޗ\u0001\u001cMP\u001e &N\u000bu\u0011Kx\u0012ZYg\u0014\u001f\u0001\u000e\u0014\u0007\u0001X7\u0006p\"\u0018\u0017\u0010e\f\u0011\u001a|\u0007\u0017\u001aF\u0006\u0016\u0015r't%>GY]-\u0003D҇4O\u001ab)!6E 9% \u0016T+y~Z\u0017,Tt%ܞDi߲\u000f\u0003wYO\u0016:\u0014@\u0014n$-Mڝ6&&ڕ$a+yP\fe+3\u001ep9\u0011m\u0006\u00068\u000727\u0012-SdrRN[xFu\u0004\u001a\u0016<3JI\u0014ퟤ<\u0019M\u001fЮɟYxϖZ\u0003BH;\u0017\u0000I\u0000W5\u000fg\f\u0011hW|94\u0006E!\bn#a\u000eYBY{t\u0014\u0003\u000b\u0016q߆Ҷ42\u000b+3c\fkQl5ƇTJ\u0018[W\u000e5c\n+o{窓k\u0004('V_2ġ\\,+NhLa}V̑\u0001LX<mMN\u001d``MY}̜=EWD@I^\u001ce\bޛ\u0005~Puop\u001d%L\u001a^Ѓ\u0000,I\fH\u0000\u000b\u0000W\r`h7\u0003:\u0016\u0000J\u001fui\u0006\u001d\u001a@\u0013sq\fw_89Аn8Rj])=,%Xy\u0016IK|fo\u0010\b4EѶ\u0014\u001eѓn\u0000]\u0006\u0004\u0004\u0013uO10h{Aye}@\u0017Qm)5Jƨ\u0006\u001dh\u0010i(1ao\u001ak\u000en\nNyOĿ|\u0010YQI'4\u0004n\u00033\u0016\u0016\u001d\r\u0000~B\u0001.Θ\"\b˴>lMMU38we\b}\u0004\u00100&T%1e3%{z-_\tsj\rN1!ʖ),{\u0017n\nwL@Nfo?舯XÀ'A[`їZ\u0007\u0004C0\u0006U\u0018x^~\u001aSgvkw.\u0018\u0017\u0019.`\u000f\u0006Ǵ\\ɚon\u0013QWF0WT3S[B1'\u001b\u0012w/W&u3\u0017\u0004H4:c~u\u0000\u001e78,P\u0001-\u0017GҒ\u0006(\u001d\u00043*愦\u0001\u0015r\"degL\u001956z\n1B$V`V\u001f\u0002rkw\u0012\\چfR*@?S\u001a)\u0003h\\'=z~?No|\u000bկm\u0006o.t\u0007_|a!s~]{\f\u0004\u0003.L\t&\bT\u0000Ɵgo\u0019IĴ1\t2.@iWN1qhq:H次J5}D\u001c<jmܞ\u000b{n\u0014\u0007\f\u0014)s\u0005t+)zs1dc\u0016aI\u0002\u0005\"\u0011k`ٓ\\q]*\u0015,X3519&\u0018\u001f\u0014)YG9(ieƠ1ƨ;sӟk\bWgL\u001a}\u0018^1O\"Pѿ\u000fҵɍ\t\u001dTs̏\u0011\u001eմu\u0014-Va#X}\u0017\u0007S\u0018_\n.-ޱD0K\u001aF{\feW|Mk@[Ҭk?ӷ.q\u0018\u00039Z\u001as\u0012\\\u000619f+D8Ƙ\u0005\u001d|\u000e_\b'x\u0006 KA'9_֖\u0011̽]ؚWg4);fXuLN\bS\u001e)[]Ӛ@75 #3\u0016e]l\u0014\\\u0002p.9_\u0018%)w\u0010Y|3Y)\nR<y\u0013[=\tWk\u001c]\u0007Dz\u0019aWb\u0015l:p\u0003 0jlm\u0014O0Sū\u0004\u0006ub}ˠǘ1sn\rWEz#Gf:\u0015s\u0012w\u0001N+(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-,o$T$<>:\u0016\u001cBS|)|iꥳ$&4b\u0010<jokUҡgTژ(TT\u0013*\n+*<煊8Aq'B/\u0014r\u0005ubrj!\u0018uΓj\u0012gB\u001egXOj9_+f\\]QMXw]X\u0011c\u0016*b2u$I\\\ny5:GD5M\u0014\u0004\u001c\u001cQ\u0012zգ._T\nd/_R\fkH9\u0011*i\rMc$Mb4Fu)\u0016EhH`\b0Ub1xXa(b3Y\u001ecv\u001c՛cKՃ\u001aR\t\u0006@~N5\u0001?y\u001dY\u0002㳓*=,\u001c\u0017=\u0013=BZ܀xĤ*\u0003\u0005L\u001e!Q(Z\u001ch[}Q\bMꞞgCj\u0004t\tVD7\u000f6w2r\u0015hwFE\r¡'^-^¯jOUXou\u0013Be\u001eWiK[\u00001YmVj^|ߋ/+XmߺJ\u0013\u001a.؄n\u000fY\tLч+;qe\u0006ZU/6bC\bod\u0012,7D\u0018Nj-.}$CaI-jus=o\n7RtKX\u0017\u001b5GP\u001d!ke7hÀ}\u0011p7buK_\u0014Z<\u0003Y\u0010B6(WeL{BtŠ\t\u0016m.l}x}\\'\u0000ؓ=H\u0012\f_\u0016\u0002C\u001bZnU7mj\u0001bjdXcV\u0019Ш\fEyJby41Yʵ#Dp[Bs\u00005lm\u0019E\u001bsd@ma\u0013J\u0003\u0004Y\\\"\u000fYC,szzΩ\u001cGMkM)\u0019CV\u000bPGPPS;US;US;\u0015HNe.zrd;u\u000bFY*sAc\u001a͂CY\u0016dLn`ʝ9*0@\t<p\u0010mώ5I\brFP\u001d\u0007S\u0018(\u0011\u0015\u000b}Bah\u000e.K\u0001\u0012\r1Y\u0011\u0001DsA\u000f\"r\u00198p\u001fQkhUQ\u00030\u0019K\u001fm\u001e)SN}{h\b6{5hw~{h\n}u\u0019VR,݊\u0013ykV\u0015 \u001cuW\u001eq7E!/W\u000f'\u001c}d\u000b\ns̱\u001e^'+mf*n4pn>y\u0015ev\u0014(l'I(P\u0013j\u000f\u000e\br.6e9{0\rr$kIRnF -+l\\#t'Azbm@3tLRP\"T\u001e\u0006\f)\\\"DvY΄869(W>g{ܯ\u0004wJs?ǚ;$c?\\#BNçrY\u0005BoN\f\\\fLt\u0019LU\u000blM\u0012/\tږYrZ}TVE34tQ(W\u0004YS\u001f2)\u0014ʛC5r<TbG\r`qp\u0001Y֋gņ>\u000e\n&\u0011\u0013\u0003(K8\u0011\u0012ʱsrN\u001e),>T},\u000f?\"%ǅ\u00069ޱ\u00018BLB9bGԣ\u001fs!ǥwENz\nfMǮs;k䨊ǲrrc\"u\f\n\u001b7u%Z\u0015+q\"00\u0010a@ǔ*Ci{e9=\u0018JVq-\u0012r\u0014o9sG0\u0003rl\u001982)ycZA\u0001\r;|vx8rp\u0010I\u0019ډT;T=?~a\u0015z\u0002%\u001dX\u001f\u0013MG@X;7g_Ajy}\u0004\u001c\u001aP>X\u001bzQD\\\u0015\u00059)\u0013[)|~s}s|jP[U~ =B\u000eIR\f|ce\u0011P(77.JC\u0004r\u0014tW\u001e@vV{ln,\u000f\u0005SR\u0019~PQ\u0014oQ\r[BtV\u0018ڐN\u0003\b?D\u0014ïrl\tr\u0014nWn\u0001s袸}\u00159֖`0\u0003<\u000e9΁rS=P`{\n\u0013SmN6`'ǖRV.O^P\\HP\\)+..)/]\u0001xv)/Y\u001b6ybv̩vIY ]qT.18ڥ3c`\u0006䨁'\\$OӦ]j%9+ޣK\u0003vI]:C]RNg\n-/S\u0018\u001fe\u0017;\u0019ocK\u001d\u0018\u0014\u0000{q2<\u0015d\u0005\u0011\u000fBs\n\\ivYMt\u000f$)7y\u001f6S/\u0003AC\\\u000f\rl'>ĕT>^Ulr]\u001cz\u001f̼rXar\u001c\u000f<sw=`Z\u0001CR\u001c\u001b_E\u0005\u0016?,22M\t\u0016\n,\u0001X\u0014Ac]g\u001a\u0015\u0017\u0014TרDZpE\u0005\u0014\u0015PT\\$\u0007(ʱ\r(5Cr\\{ҳfuʱvfz\u001a+CiOcUvnkld8\u000fyuqC\u0014ᏹ*W\u000bb\\-rpC<\u0019-<\r<\u001c\u0010xO\u0005=#\u001c<W\u0017kjCF\u0007\u001dm\u0012\u0004i\u0017Sz\u0019\u0017*\u0019|6#\u001c6弽ɲ݆>oOdZz;52mcma7j|Z\u000eqԉA*Ymwio(ȵCϗ8 \"Һؔek\u001d\f&kCk\u001c\u0011\tr |\\\u001bEF\u0004en!ڀV;e(\u0011*}D\u0003&2e.\u0011u\nYNqlrF9@\u0006Fq-\u001dCt\\ꂩh9l }GQ\u0006NGʷJ\"lgew\u0015u\bw\u0017MWf\u000f\u001cK\u0003\u0013^\u0004DWfe%2Ps)3\u001a`VfehǼäXl\u0001tj\u00188é8É\b<\tB\u0002+^u\b-V*-J]\u0014z0Ϣ\u001ejyYUĦ.\u0016P\u001d4ufQ\u0002w\u001d\fURm\u0006p}qb\u00059/q,C\u001e\u000bxyC99ʷ+`m<\u0012\u001cQ.>1Y/\u00029r<\u001c=ֲkU\trk-Qy7I\fG\u0018Rkמ\f|\u000f=&\u0006;ֈZ|CoV2\f)Cjʐ2&CA!!z&\u001a@k\rפ5eHM\u0019RSԎ(2\fE!cl(cX^ݑǗ\u0001tN\f\rB ,\u0007\u000e{\u0011\u0018C\u00141\u001b\u0002ӓ;h\"<|\u0007\u000eƉy\u0011Й-ߩ\u001c=#3\u001f<#GZ}g*fD(\u000f۲Ϝe\u0019է>tFK#CgDb\u001f0,K85,G锃\u0014R\u000e;\u0003\u0012\u001e}\u0010@9\u0004\u001e\u0003\u001c!X9\u0000N9\u0000,\u001c\u00007\u0000:\t}\u0016\u000e{\u0010\u0017(ǋcp\u0010\"i`M\n!H],ȵ5\u0003ϞPr\u0018G3-Ѷ%;\u0013hu,r.̿)^<xI(Զ\u0015v\u0002(^ʹ)h's/9\u0019Jt2R\u0012)l3V{{y\\rh[Q\u0019\n+RI<\t(׎\u0010m\u000bGMR\fݢ\rMd}ؑ\u0006o8{n\u0006o\u0012fE\u000e:G9\f\u0015T9߬f}\\t7\t\rU\u0017ol\u0002,\fAfTЃ7և^\t\u0017-\tjֆJwJ=\b)ǰ}fa\u0018{0*p\u0004+!w,\u0012[!\u001ar3_J+/ٮG2\u0014v4ݢV7psxIey0V\u0018}\u0011&r>O>\u0011劈>P\u0013X\u0017+ZY\u001b=a}Tc\u001d~7\u0018>0$eFt\u0017\f6\u0005y\u001e젌8\u0007?)Nrr |&H\u0019\nxs\u00149$_@a=˴)Yϧ\"JkkN\u001e\n\\\u001eJt=,:j=);T8?UCS9nWڱS9➞\u0019+AU\u001cTAU\u001c]cz8A=cx\u001a\u000e\u001c΍z[?r~vZ\u001fs\u0001LXKcdp7\"\u0018\u00199=\bX\u001b\u00025\u000e\u0006*ڰ\u0019\b\u001cJhY^=]Ebu_ӫZj\u001bBsn-\\\u001bUYBR_;ҐRUB\u0016\u001bzLhr\u0005\rAT\u000e<9ʍPm\u00060*}\u001f[@>G:W;Y;V\u000evy}\bc\u001cGew8>U>rwP.A</\fOw\u0018=f(#\t)G\r/GhB\u000bg5{D閵6b!(֞[%y-ȵ|~+:mc9}\nTB4\u000f!2\u0014̝[\u0003=镥qc8omԪ\u0011c\u0015$\n<dPP֗ܟw̚<\b&罏[>e\u0004$B,<`@Y\u001bZ\u001fH4׈Bd܌\bA|[V6`\u000b̛<\tEk\u0003<Ry=\u0012\rX$s\rNde<\u0007&\u00120\u0014|D6Yu2s,K㥘\"}\f8&Y:\b@:6z\u001e\u0011a\t]X嚞+HY9,G\u001drTNA\u001aөA\u0001\r\u00051uCNFd٤\f\u000f*OOd(\u0007\u001bYcIf}\u000eyPF9\f\u001f\u0006$s_\u0001!/GuY\u00189>\\#\\\u0018\u001d\u001c\"(ӼF:k8Q!HC\u001d\u0013.<\u0013FxST㲼.4'\fc1ЮD]6@`f5\u001f?\u00004\\EL\u001di\u0018Pqb q()!9\nx(s\u001aVP&\u001e󩉸\u0002rV{?JG\u0006(\\cE=\u0010Ψ2\f&/m_9]9TSV&c@;ZWuo?\u0005'E\f\u0003\u0010A5)\u001d6K6_GRӹVOZ=/Kj K}[F^\u001c:g4z\rժ\u0011\u0010I:J~n\u0013W7/6ZP\\w\u0010'/c*K*/m\"r\u0001S\u001f\rFs8Ò<F\u00134II:5\u0018q\u0004ϐ\u0004Mc\u0014Ix\u0002\u0019!Xx\u000e]2\u0002Jug]hf\u001b惟Vٖ\nTA\"*@21Q_&5$<@ͨI\u001ci\u001cfX\fʄa\u0004Ic\u001c\u0001\bQK\u001b#9!\u0007\u00032S}\u0005FR/_*BCdAe4;\u0001B9w\u000f$4\u001ej6/\u0019\u0012^:T:\u0004ud\tNR|,\u000bIv\\Jَ\u0006Tn5\u001c04K\u0014FA \u001c\fGr\u0004Ǒ\u0018&'hz\u0002'1`iA\\oA\u0019H)\u001cg\u0019m}\u0019T\u0019++Pm]EHQ81\u0004~\tXf9\n59<dHh\u0012Uq+\u000e\u0004+(q\u001aUc\u001aI@\u000b͚ojͽyg%Е\r\u001dL8\u0003Cfh9߫\u001aIl'\u000f\u0017XR\u0004>\u0000|\u001ft`\u0001$kF\u0018P\u0006^51ʤ,L\u0015C\u00063\u0003\"ۺ,a_\u0001\u0001Ǡm\u0004I\u0011\u0013b\u001a\u0003\u0018o4Rk&vLhTpU\u001b\u0013Jk#\u0005zs>^)~\u0004raOj3d޿\u001aVn[ہK\u0017JajmlB]M\u000e%\u0011v\u000b7;:ۍTECMHq\nYԶ\u001dg\u001a\u001bM\u001bFdTۖ\u0007\u0007`(\u001e`'\u0007-oYW>)H&qvv\u001f}ׂH;\fI0y\u00102\u0019\u0016\n\u0004LDd@\u0012\f\u0019FEh\u0016RKɼt@tx\u001b\rcaZ5/A\n\u0016l.;B?ے\"\u000f1_%\u0003Cـ&s@9C\u0014x\u0018\u000f\u00183!\u0001\u0003!\u0001\u0011\u0004\u0013\t\u000b6\b`-P@O:l\rF\"T\u0001ƉP)\u001e9\u0000a\f\u0010N\u0000\u0000<10\fA%\u00009U`\u001aGp8\u0002A@\u0006\u0016D;\u0001[BYP]:\u0015A<{cI\u0010#\u000f\u001d\u000eބ~bO:\u001dqzU\u001fy;J-%mA>I6^[-bB؋M;rWdo,\u000bP\u001cY?lI<Y%`G*)qG.Z\\'ҷb\u00057xI@o\";H?9t|\u0011X\u000f\u000em\u0019\u000fw\u0018\\_CpG\t58\b\u0001l\u0010R\u0004A\u0002C\u0002i\u0012!d\ba0p1\b\u0018p\u001c\u0000)p!;\u001aH\u001cJFe$\"t;r\u001d:y,EVV$\tQ8FS*.3\u001cŰMF^<Nѝ \rXgg,!Rj,1\f\rP\nX9)!]\f-D\u0013&\u0013\u0010\u0005D Y-Pl\f\n\u0016[p4JRo=Qi*B@Dcŗ/\u001d<\u0018Y+j\u0017E5E+च#\u000b@\b<p\u000b\u001f\u0013#(\u0015J?&l9<\u0006ROYP\u001ep1@=\u000bh%A\u0007U\u0004}Au;!t.O3\u00055^H5Ey `Zd@}r\u0002-0\u000f)\u001ap^\u0016dh@\tz;\u0011pb\blC>de}\u001d\u001cbVkU\u0015\u0000\u000fkMǰ}#8I#\t\u000f;\u0019&&M1P@\u0003\u0000/D\bZxj\u0013\u0014R;\u001c\u0014'އy\u001c\u0005w\u0019Ra|Gp}\u001e)!JP$P;4\u0014\n{WVjj?ƥ2>\nO~_\u0007dy@E\u0006u\u0004P)\u0012\u000e\u001a9JzzaZ\u0016%xm\u000bz뢂ރ\u001dVּ,\u001eX\u001bP\u0001\u001f\n\\|>p1Pڊ4h\u0014\u001aLiXC9I\u0005CЭ#A)+\u0002X;\u0006NRH\u0006to#Ixv\u0012zi8Xĉ\nt&dhZ\nBt=Z\u0001v\u0012?!<G}z \u001d\u0017ꕎvQՇ4xn%?Fq\u000b9[SxWA\u001b9]䉞\n$z+\u0010i&Tݟнy\u0007'ݧ]w[IU\u001aJ\u000eg ֱ\u001eb\u0014(CӨG~VsS\u0012\u001d:8M`N3J8\rF$|İ\u0001L\u000fy/׃'/\u001et\u001dWX\u00137[#\u0011k֞\u0007M\u0004U>\u0018\u0011¹u~s8ɑ\f1z \u0016PН\u0019\u0007\u0006-\u000f0\u0006栓\u001a\f\u001c>!!(\u0004\u0004\u0003\f\u0010@b\b\u0003h\u0017Aa,Ah\u0002łp\rͣ\u0004 ۢx0-\u0014\b\fI`\t\u001cAtiQa\u001c\u0010\t\u0012'Z֖+J8kAX?\f\u0006\u0004j5\t\u0002\u0006-F\u0000\u001c\u0007\u0001-*\u0007$'\u0010(y`\u0014qRaph\u001c\b\u001c\u0005\u0000\u0012Ӵ4Ԇ\"A1\u0018E`\u001cD\u0002u8' A0*\u001cc4P\u0018o4\u0000b\u0001\u0018\u0004$`?:2YfZ,w'\u0012\u000b\u0005fdP$\f,\fʙ[\u0001܆\f)\u0018\u000fp,3\nEA#\u0016BQq\u0006T\bVՙ\u0011\u0017\u0000\u0005\u000fY\u0018\u0014FD<\u0018\u0005\"}0\u0018868t\u000e\f<@8\u0006JP$\tEґ\u0018c<S\u001c\u0003Bm\u0018\fDG\u0014\u0002*\u0018NsAGe\u0019;\"meZ=`Q)X\u0004DbѨ)*\u0011\u0001`q\u000eQ\u0007+\u001agY\u0006rۍ\u0001uH9X\u001au8\u000eà\u0007\u000fq)6P\u0002\u001epC\u0014\u0004\u0003\u00009̄\u001e\f\u0002>\u0000\u000bGe\u0016\n@\u0003&/\u0006Oju\u0006af$\u0010%\u0018Xb6?x\nw}9\u0001\\`6w OXEXO\u0015hHs\u001dB\tM@T\u0018\u001crl\u001f+}.y]F\b@\u0016,0\u0016\u0000$\b\u0016oO0ń\u0010<\u0001,\u001bia\u0000O\u0001r\u0019\u0015bܷG\n\u0019D\u000fp\f\f\u000e\u0000-\u001c:K)\n|a\u0006\"U\u0002a\u0005\u0011xp\u0018\u0015rRڢJWy\rEqT`\u001e5hl\u0003\u000b\nw>ɒ+>/u\u0011J*又~pC\u0005\u0003}\u0006\rp@\u000b!\u0003h\u001d)<\u0003\u0011%i\u0000\u001a)-]$%[݄Vv\u000e$/e\u0002ڟf~\u000b\b\u001ay\u001c@Ћ#}]Z%\t\u0001\u0005\fpc `\u001dKdk\u001a\\\f\u0010CԎi3\u0016ZO1&\u000bf,\u0002lO\u0004)`~_\u001c\u0018O\"GrRa\"%H \u0019zO+b_\u0004\u0001ә4Pi\u001cY\u001dqH\u0006oyR\u0002\u0005\u0007\u0013\r=iYp;'\u00067]uP\u0018Z1z\u001b'?U+\u0011֞E墤j2j\u0005\u0007O\u0007y\u0000h\u001bP\f\u0001\u0007T$\u0000\u0013do$(\u0019\u0001_@ˁ\u0002\u0001\u0003S\u0004o8e\tJZPȫ8p0v\u0004w!\rV\u0003\u001e?htˢ5$Z\u000eMb\f\u0013\u0001z(\u001a \u0005ucV䢑A\u000f&URa\b$YN\u001b\u0001~\u001aUȣ\u0002\u0013\b\u0013H㌪jh(?\u0014@\u0000P4H>{gH^\u000fCK!U \u0013.8\u0014\u0015j\u0006\u0016\u001aa)(=\u001a !XP#p\t8\u0016C֌(\u001c\u001dA\u0011ibCEQdX\u000f\u001cb\f\u0003׍1j7;lAgXwB\u00019H\r\u001e \u0003`17^Nkxj\u0001\u0005\u0006z};\u000e<\u0001#~h\u00044ThT\u0007G[9OY\u001e~\u0010Ξldc\u001d\u001ag4$IBhpǤ\u0000h\u000e{ \u001f\u000bo\u0019EV'\u0007\u0003K\u000bAAQ+\u0002T\\FCB,\u001aKG邓\u0006\u0004`ڲG\u0016\ba\u0002\u0005qCJH\u0013\f\u0016ƔoX/\u0002{mĖ]]\\<$g\u0000\u0004-V:\u001fp\u0018G@\u000f`ޔ\u0012\u000ek\u0014s\u001c\u00136 lh\u000fh1vRs\u0012t&&4\u001d \u000fFśP1M\t]4&#,\u001a(b\u0001qU\u0000T\u000e\"=T\u0000үRI\u001bD$R1в\u001e\nK\u0019\u001f~co\u000b\u001b]\u0007܍?d̳\u001bT\u001b<dcx\u001f.\\}'~C\u001e~ޥ&>Gs\u0013\u000f=>_4Cqչ?t\u000b\u0017_~\u000b\u000f=??s=Ѕ'\u001f?\u000b\u0017\u001e\u001bw./g\u0017 \r?\u001cy\u000e\nv\t\u0007_-3׋W\u001fwg'\u0018\u000f}I^G/\u0005zyѶL .\u0004IQ@O\u0004\u0007\u0004=<!5Ԋ(p\f\u0002\u000fsZ,<\u0015BN-p\u0018\u0004HRM\u0002\u0003*\t<\n\u0001+\u0011ػ\nq\u0015\u001ca\u001ac\u001aͪy\u0001s<&LN,\baIJ\u0007\u001f\u0017{VJڳ[f4DZk2\b9p-n=if\b+\u0002\u0003\u0000\u001d\u0005\u000e^K\\rW\tɀ\u000e.\fv\u001c\u0001r\u0006֮t#{\u0003;}\u001c\u0015Aõ?\u0002wƣyG˗w\n\nBZ\u0002\u0016w\u0011xZ4\fcWV~̀ʹJá:j}]zCugh [xשp\n\u001cv)\u000e\u0015FS](CVCWzXEURrkh{v77\u001c<S/:?<T_\u0003yEEȡ6|\u0005Ir$\f.\u0004M\fPA\u0006-O\fFJ\u0010\u001d\tԇZUyrq\u001cUwpUN\u000e\u001aI$C#w\u0017\fW?Ñ4H'\u001f\u001eC!1|˭܅\f\u0004R]@fr\u0016\u0005vT\u000f\f\u001e{\u001f)%qV9\u0019\u0011h\u0014;`\u001bnÅ~M\u00123m#U\".q\u0006ޝ/߆O>P/\u0007fz*PW\u001fֶQ\u001a\u001f\u0013O=U?!΁8K\u001c;h\\\bi4y/S\u001c[l7f\u0007y3=1:4<УzM^MO\u000flz^0\u0001rK1\\-\u000f'vӓc\u000fkb\u0003?g4{:4\u0003Z;]ZH-u>^\u000f>]GJp\u0013gK9K뱧$>\u0010K\r2\u0017\bK[\u0006\u0003\u001dֽ1cG84ӈV3BGs@۝;^\u000f_^\u00189l\\+{UI\u0007\b,cv<\u000ewpI\u000e܏qZZ0\u0012#nyS\fU7\f:?'Zl4{}b\u0019\r\u0002\n;W<lQ\u0017̠ePa<>NVYf\u0003l掯S\u0007{=1}1|\u001e/k@)z\t\u0000߹'\u001e\u000fKq\u000fg\t\u0007Tƽ{ۋ񣥤\u0007=\u0007hñH\t|j\u0016\u001bЇ\u001eSCtaA&O/zsx=V,4$\fٟ@\u0019(\u0005ʺ٬Z\nV B-'f^>\u001b5MĲX aD%;\\AtP\u0004C1HC]NH|\t[B\u0000REt<Zţ(DW:j\u0000t@+\u0011'\u00007XV&>ɰ\u001d[&)H@azQ)!\u001ak\u0016zROqZ\u001b>bDr뮞>\tuWr\u0002\rjaO3Ə\u0018-;p\u001aH6sl\f6\u001a\"Y|\tdTG\u0000J3(4Q\u0006euز}syف_I\u0001\u0003,M\u0011N\u0007?\u0004F\u001b+h\u001b7:\u0016Z\f\u0003\u0014XR;˴WUWf,rͳ\u0007W\nvт\t;=\u0002AmCXTQUģcS>\u0014QRԾdkp{#x+\u0012\u0013\tH\r.]\u0002\u000e%9B}\u0001})\u0007Őo<DVZz\u0007$\u001c\u0013\u0018mWpF܅=\u0015\u0013%߯.{b\"a@9\u00078IIKMrK\u001b\u0006JxS\u0016\u001eMÚu:\u001fZ3&kXhw\u00019ݙ9ӞYПy\u001ahZ%\u000fܡok5רU6e{ﷆ\u001f3#o\r?f>[\u0017\u0018)\bm\rɉ\u0002.Ă~[ÏYEXo\u0015\u0013\u00157|*[3;\u0004\b\u00039k(\u0017P\u0006}\u001c\u0000e7\u001c\u000b\u001b~ڏ\t@ϗ\u000b\fc\u0003b+>p؁grb\u0015g<y>D=\u0007S=\u00035zh,\bBp\u0015\u0018\u0011\u0005=jEk;P\fU\u0012k8|\u001b9\u000b=\u001fᨻA8\\3\u001a\u001e4yw\u0003(o\u001ce;y\n8SPD~\u0010\"\u0010\u0014\u001f|\u00039\u001f4{=R\u001f$ _\u0003=ym<\u000b\u0019\u0007M@\t\u0004%p\"\u001bpÅ\u000b\u001d'Br\u000f=/<Щ%yG.^tSKG.=/?u\tRDǒ^\n{O{\u001dv\u001f\u0015/>^zG/^裏|\u0001G\u001ey\u0014\u0005xr\u0011\u001e<\u0005#_\u0017Ǐ}\u0011c\b\"/\nx'_QLWy}g~/}\u0013O<3<?쓗\u001e{KxS<+=\u000b\u00103O>3>\u0017Nώnzu|zfrK_}+kc\u0013\u0013c`zzW'&G_}񥫣xtJ\u0014Eb3\u0013T''c\u0014\u001fzSyvD59A@\f8^;\u0010\u0017_\u001enhyeyT&]f\u0015♵<>/~E\u0012r^zJmNnn7VD0Y\u0010Jf\u001b\u001f'+K1N\\ߨ\u001aۯnTW\u001b\u0000\">ůjb1't{oXmy|\u001fG]\nR3{e\u001b\\\u000f'o~\u000f\u0007g}h\tV1\u000bo]o7?~o?[\u001cI:P}Vcceo~||~//O?ג\u0019%/]ǿ_/\u001fG\u0017o/~`GSz'oqkoW?݈ˏ%(&^_ݲs+T/\n7~GWg?֭zy\u001fow\u0004\u001fڻY),\u0017\u000f?O\u0007?n܋3%~?wT$\u0015]gG?x-&ƍJt[?/~6k}{w8|4u2˷>\u000fwVvJg?o^6<j\u000b>b|&_ݯ\u000fv%\u0013N\t\u001brv>@^yKO68\u0016^{fq9f\"fp5iIJ76ח<3_RKm.<|a3,\\n\u001bդvӢcWt3/OL]S]]Ho5cW^z+zKOУ?362:뜉|e-m|+Ʈ]yŧ\u0017\u001eW3|ū\u00133\u001a+_~I˪ɩ\u0017|\u000b;p'O=\u000bWՆ`2f~I~'\u001e쑇\u001fz\u0018 K_|K?s_~|鱋'|gyK\u0017\u001fE\u000b(\u0004\\\u0017/=\u0018C/ \u0002lBX~\u0005\u000f#X{c!{\u0018y\bHu\u0003$\u0017\u001f+<\u0019\u000f\u001b\u000fI\u0017\u001e~䋗G\u001f>-{SXmN/\u0007 SYs\u0018.iԔ@qj\u0019t*8\u0002+N\u0005kLVoBXkb\"%:(/VBQs\fQ@\u0016Dx\nǅk^\u001cO.&\\uQLV\u000b5\u0014\u001bC\n뢷Z\u0010o\u0007\u0004.{OTZĖF{<r+:W ,&\"ͫ\u0002A9\u0012'\u0014UDb\u00189\u001ctrhcVunYfxtM)\u0007d\u0018\u001eY 8E=ha\u0004#\u0014p(BM,0RyDQ b!wz\u0019tANmh?ԇ,IuktJ?898D{bgB4͞E~$?E*9\\\u001a\u001c#h2i\u000e{{_gC\u000f\"v@z}!*ؽ#Ɔ(ԅj^\f\u0014P\u0014t\u000e\u001c\b@\\]\tsbyRKUf\n\nU0\u000bu0m\u0005tkЀ[PWFoGMZt_FS\u0014h{\"O\u0013]\u0017B(V\u001a\u001a\"4Oڭ4\u000eJC\u000b?oK}\"|\u000e\u001a\u0013B×c/\t|\u0006Z\u0012!XЊIGR4Gu*.\nI\b<\u001eTO@\u0002}L\u0012`?$\tGJ\u0015Q6P\u0001eqIgQs,d]B\u0015\b..]WǤZ\u001b\u0018\u000e/19IC0*jmI-Q'lMZKa{Rq)W5CȖ{Z^{K\u000f\u0011ߣK?C\u0005l!^'֡`Uj\u0015cAhU;Z\u001d*1q\u001eKwZ?_\t;ѷ[=햮\u0015\u000f>Q\u0011\u00041\u000e^k\u0007xG`\u0007̽\u0013\u000e\u001a8ܮ\r\u0012VU\rM\u0002uC\u0010ZZ{m}\u0003u\u001dW<j]K-UU+JdEHgP\u001b)>ěB~HwjY 5Q\u0015.\u0016\u001bbsR\u0003V*\u00125-Uj\u0019m۩})?Єr\u0014!R\t۱Q\u0001\u000f=\u000fdT>h6vH]9Z-P4h$1e8B,\u0018CKJqI\u0010];\u0013\u000b}Q,w\u000f\u0003v\u0011}>zIsj\u001db\u0011K;I\u0002H\u0012M7-vwI:ʍUWIզ\u00022\r!ԛ}^\u00166\u0014P\u001dIkdCt\u0014B՚(\u000eh0t'1ų\fCWa\u00188m4N~q[<QI\u0007uPOzf;1\u001bs\u0007lUVJoFC$\u000e\u0015\nq\u00120R\u0012\u0013\u001cz'&\bI\u001c\u0019zP\b:9\u0010`\u001e\f8I\u0017l,\u00009Զz\f,v\f\u0003ۙܞE=vG6\u001bb$\u001eU6[D83#eU[\u001b\u0002M,*%\u001b;{^SmCO$j?f\u0001\tb\u0014 way\u001c݃\fE\u000ed1xǀ\u0019xA'\u0001\u001eS4\u00189񹑯3퐫T\u000bG\u0015\u000f\u000e<K\n<+ q\u001f\u0005\u0015x\t2pFl\u00038p\u000e\u001d\u00172e<ז?Qq\\΂QP\u001cӅgU<\u0007\t3i\u000f\u001e>\u001b\u0001zqt1\n4! H\f~E\u0001\u001cO$0\u0018\u0018\u0005M,ja8C8\"=\u0006ٻ\u0015\u0007o1q\u0018a$Opga\u00110\"*\u0000W\fbrtPkMǿ_R\u000f7?{o#Gr\u000b\u0001\u000e\t,f\u0002NP3hv>ӒxHF\u0003\"~:,Vd\u0015JG\u0007й\u0010y^HjH־B#*3ݫ*2\u0019\u0015i$Xʌps>3s3?^}7߇\u001fpo{o&}L|/֏\u001f>M'^UOr\u0007O\u000e\u0016J\\Ly1+Gϑ׳y]7٫+/ŭC}[\u000f&%Wh\u001f1\u000e\u001c\u0014Z3ԉˠ%Da\u0003Ac>kr\\y\fa>\u0017R2)_\u001cᵞҤtu&\n\u0018*\u0005<N\u00171\u0004tQ(Bj\u001b\u0018ơR^\u000f&rܹ|1x\u0012;g,HJ0aw\u000e\u0012L\u001ces@|$\u0005WVmjr\u0003\u0012\u0010x ڑ9\u001f\u0003\nm4\u0003\t0Btp/\u0006\bAp\\Ѵ#Z2\ntGQ\u001c(\u000eE(\t_W-\bA9%[oIbY^`\u000b>\",_ND;jS\bۍC!%?\u0004Ip\u0005禍1=z<Xj1C%5\u0017F\tН\u0017\u00129fm BV=|Bʥ;\u0012m\u0012\u001b\u0006K\u0007\u001aH\u0000\u0016\u001616tVB[9,\u0010d\fKŴV\u0019,;3,R%CPs B(b긶wX\u0018\u000f\u001bAKFHFz\u0002=,.lag\u001dOk]P'L@\u0012H\r[(M\n^!abV\u0005\u0006\u0000_ݥU\\&\u000eb[]<#-\u001f\r)|Vf\u0001iJm%\f;\rD)m\u0018\u001e0;i;Rx\u001e~!'hV\u001b4iP\u0018ɝf`B[i\u0018\u0007\u0003R!eˡq\u0004e\\6?,V_4/q~MA`Q\u0014T\u0018,Fa@\u0019B\u001c.Z\u0002Fe\u001f2\u0016CI&>Z&a3#%cq?Xd\"9mmcbB\u000b\u001d\u000fƚ\u0004\u0003\u000beW\u001a+qGY}'\u0005\ta\fYV߲\u0016J\t֯P=\u0007.{Xj;\\Y外)\u0015\"{筑zZ\n0\u00116K\n\\\ba:aűXT]4;%}SW\tRw\u000f&A ԙB(e\n\u0001;(Sh9t\u0004%\nm~=\u001dd|\fq`j`\u001bYGhy\u001eL;\u001f+E\tw\u001aUܺ\u0017ɧgg.ɋE?\u0012܉\u0000\u0011\u0000#\u0005c\b.\t,]3;rjL8?D\u0007MT1Xj^Ì{\b\u0018\u0013>$b<db\u0015DD2HTb%ftg~\u001ail\f0|\\\u0011y\u000fUǓVf%%=\u001e%|&|\u001e6>\u001fjꋿ\u001d'L\u001fAp\u000f>]_~W7WW\\۷\\>?]}{__}80,׳\b\u0012~zvRNbx^D8\u001em%J 1ioMXUB'O*~(d,\u0017?G\u000faq\u001b\t.`}M\u0019wNx#LaE$\u0005ϼC?kO;\"9m\u000fgɳyՓ5r\u00070o]b/bV`\u0006d'0x*Z2\u0007Ag\u0019΃5wϘgky4\u0000H+j(\u0010=\u001eh {\u0016wE&>(;w3\u00190#bC\u000b:\"'?}U!\r$'?`𧼗1`y\u0018ԼupggX\u000e&ccVf4Rq\u001fN8T\u001a\fbA^1&RN=kY>ׯPCe6FڼNl\u001b.޸\u000f7a3F\u0017'\"\u000bRtg\\HEV\u0018Yayx\u000f)݇8\"NC4\u0006!\u000e\u0003F\u00070M\u0013\u0011\u001d\u0015\tciL1\u001e\u0014q\t$-INz@2=^C,k/\u001c Ϊ`ݴr\r\u0000־o\u000fA^Z(\u000f6h\u0007*S\u0019B\u0015S\u0002$\u0006?JtX&#0\u0019\u0006Q\"tU\u0006x\u0003\fƃ\\2\u0014@67\u0007\u0015\u000e\u0010lDQU%G\u001fF<.hnlEB\"#d\u001bѶWO\u001d\fC*\u0003BҜ )q\u0006\":Jrβym#&)Lx\u0007\fۻW\u0004j\bBPBPBPB-\u0011SP\u0011\u00143\u001f6\u0016QZ&BHiSF\u0003ꅎ-o3*\u0019|XPN{<¦J\u0007U[\r,GGŅT3T.\u0004&\u0014\br@n\u0001<q\u0000%-ae@\u0006Zݮ+T%\u0001)԰$CBBBB%*\"R!ąąąąB#.$.$.$.$.<v.\u001cI5h/#\u0019BK\u001dJ!N\u000e)5x?8;TYٻqV\u0012\u0012\u000e\u0016fGZ6K\bIgj\u0002J\u000e0\u0007!s\u0004\u001f\u000f5?<:݁s\u0011A\u001b\u0015 \u000f\u0011zmEb=$c<\u0016\u0011A\u001bU\u0006\u0013\u001d\u0017Q#6A5mǅm?~`EE\u0004V\u0005VǕzDPFEq\u0004e\u0005e0Petp\u0003E\f!Ox9\u000e\u0015\u001e{9M\u0015\u0005#d!x\u001e#<l+E~\\޻\\o<oշo3}\u000fW껷f\"ɔ\u0005]˼\tW7\bΞ]B\b\u000b-/f\u0019z6<2x*Zr:%f\u0016VB\u0018N^0<A}(g@ܙ\u0004\b\u0013;hW;Er-37)Hɬ\u0018Y1l\u0013\u001d\u00135c 338y\u001c\u0013Lq-sJӞ\u0001$1In\f\u0011\u0015D8t{=\toooco7\u0012\u0011oooV\u0010~\u0013~\u0013~\u0013~\u001f=~wr\u0005*\u0003A\u0005\n9-\u0005\u001ei펫]#Yw\u001f=v߀u#-  \"\"P\u0003;V\u0006\u001aiYĸ\nXu\u0018|AŪ\rf#-\"8p0k\u0013G\f|\u0016\u0019\r\u0013\rZY---\u0007\u001fX!\f:6RZr<\u0012\b?Qל\u001a'<a#\u00147\u000fNl\u001f,[w\u0013\fP-Tᴌ\u0014Z3\r7Qn,\u0000\u001eq\u0016\u001ekԁ\u001c\n\"?{\u0011\u001fD~D~D~D~D~GG~#=ϒȏȏȏȏȏo{\u001biK\u0003'?x\u001dMqf\u0015\u000bW?V\u0014`\u0010\u0004\fĀ\n\u0018\u001dBX\u0004aϞ\u0015N\n&rp+DS;B4ul45qƝ=ziѽ\u0007ix:t\u001d\u0018ϝ\\\u0019UbRˎsd\u00034)tt(\n`\u001b\u0003ցS\u0019@uj\u0010B2QJe`\u0018\fLj0\t%\u001b]d0>dTd{m\u0004LY-A>:d\u0017FRHjj\u0006\\z\rd1=G\u0014\u000f\u000f@W4qЂ:\u001c15AI?\u0001}\u0006w@9\u00072\u000e\u0003\u001a֓_\u0015H\fB\u0010C\b\u0001)\u00064\u001c\u001aIĀB\u0003\"KG|$.\u0010n\u001e\u001bn\u001aKI9\\\u001ci\u001d9\u001c\u0013V\u001d\u0019VQ\u0017a\u0015a\u0015a\u0018j$\\U:TmQ# 5%\u0004$\u0004$\u0004<^\u0004[!gRϤ֟I>\u0006I5FH8bXt\u001fu3#٪\u001e.35\u0018U|\u000e\u0003#'/FyFS,:m%\u001a4(N3Uh]d\u0005\u0003\u0003\u0007+aS$'mKvG\n\u0000ҭ\u0005mD\u0014)99z5\u001fT\u0001\u000bb%T8X̀\u00169PmheF(\u0002m\u0014\u0006&\fcL\bZ׶rv\u0015bnm8xԯ)*\b\u0003F*&^\u00079G!\u000e*\u0000j&C\u0001A\u0003`\u0015+\u000f@#So\u001c\"RuB6BwC\u0014*\u001d\u0003\f;TJX)T:lx\f!\u001a#o sv\u0010$t4P%$%\u0001m4n1Ѧnaʖ\u0011mCm\u001dVEK\\]շW|۫x/W]}\u0007yr\u000fW_~\u0013n?\u001b\u0017xǏ7 \u0003z!6w4;lDP>`}\u001eCF\u0003\u0019\rw\u001b\r\u00062\u001ah \u0001\u00063N\u0010>Ib\tb\u0003`\tJ\u001dV\u001ap펵8JH).-L\u0001\u0004Oz&\tA~+1ߋ,\u0002m.qذ\\\u000b2\u0006\u001a_#c)J \"\"\"\"\u001a*KIG-͇RKKCc)1z,\u001d1\u0004RB f)\u0018p:#ɴ\u0012h60ioS\u0013\\ (4\u0019^+\u0005`_ د\b\u0006\bԄ}08o\u0002;As\u001d\u001c\tbX*\u0019,>xN,Aj\u001eI\u0010G\bB(`]8υ (̑c\u001a\u0014\u0000\u0007\u0003K\u0007<>\u000eT\"dM?r+ir>lp\u0011L#\u0004fI\u0000G\u0000\u001di1\u0000FUNZ\u001fI)J\u0016@f5\u0015\u000f|\t\u001b3\u0015\u0006?\fjy$Z?:b\u001buqm\tR\u0011\u001c}H\u0012\rdXS\u001dXd\u0002M\u0001>;uYM^>Hߎ93U`vɛϼu͛J׎()\"\u001a~\u0006ԋE\u0006\u0014WɀBa0pm\u00145zح3WG3;i)@p\u0016hϤZk]pO9\u0016K3\u000bT܇]gL\n^9\u0018L+\u0004ZJԪG|X\u001a×ve\n3ŃJB\u0016{ؑn\r<\u0006,\u0019\r<:-\u0005b LvCYj(NJgg'OoXj\u001e\u0013N\u0013@M?H\u0014:dk\u000ft.llF1(\u0011V\u001d`4bF\n\u001bm\u0006{-֝\"uk\u0007\u001fΦg/'\u0012Z߰Xzv\u0019[SˋY9zd>:kgVt5\u0011\\\u0013\u0011\u001c\u0011\u001c\u0011\u001c\u0011\u001c\u0011A\u0012\u001c\r\u0010\u0011\u0011\u0011\u0011\u001d$j\b\u001bh}\fwDPE\u0015\f\u000bUd\u001e\u0016'[l\b>^#[L9:Hm\u00008'J\u001d\u000b4lWv߽՟'Ϳ7Wo&W\u000f?OW^}WL!ғ}6<|ӚGu@{5#>fY)=K\u0015\u000fjZ&lHM*\u0007 C0F[e\u0015Sa:\u0014\u001fr\u0013If\u0002E\t߁\u0002\u000b.G_=\u0000{\u001eѿGh$\u0006\u001bثQXda\u00112 $\rVd`HS\u0012Y!VJ%sMG~MRpe\\Pr\u0003\u0016\u0011\u0012\u0015A\u0005!(!(!(!(!\bJuLE!\u001c\nJI-,\u0005\nR\u000bbFu\u001c,\\\u00128\u0007\u0012\u000e_BH\u0006?JtTJ#10\u0014H867xQ\\j\n\u0006\bYdhA\u001b!>xڒ\u001e\u000b)Җ4mI!iK'f5\u001do/wgRn\u001dM٭\u0017BA\u0001߱\u000eg\u001b\bm@\\9\u0001Ci0\u0001\u0000\u0005g\tk;\u0003\t.\u0010ڮT+Kb\u0006w\tt\u0006|\u000b{9Ҡ*Nc\u0001\u001dԡȂ\u0002{GF&\r\u0010:\u0013:\u0013:\u0013:\u001f4:k3Rt>`I\u0014XKF*&^d\u0019Ø\u001e^\u0019/\\\u0018\u0001N\u0000\u0005.\bp2%\u001c6C\u0005[+~\u0010a/r\u0012EAlF4*pȶ00#*jKP\u0015T}&\u0005Lj\u0019\u00184I$|o\u001a#\"\u0013~4w\u000bw¯CWܺ,ɓ8GYRmI\t>\t>w\u000f*\u000eoD\u000b)Q܂\u0004B\u001e\u0003[_\b\u001dhR\u001f,&\u0012W\u0006\u0000\u0007XoCdF*E f$f$ǂ\u001csm\u0001>\u0013\brҨaVzQ\u0017-W\u000el\u0012n\u0001+Zݮ+S:Lҙ\u001b*\t/w^@\u0001\u0013`\u000e\u00150< \u001c~<\u0005b(\u0010C91j:ƀq8?\"##F:\u0014q\u00180~H\u0011צ]m*\t\b\b\u000e\u0010ڨ~\u000fƷ\ng<\u000e\u001fߠC{-BF5C4\u000e\u0010t$h/Q(A\u001bA\u001by\u0015\b`GZZ\u0004J6قz\u001f?wWߵ\f\u001d+8Q}\u0010n?j\u000e\u0015켅mC\u0005mtC\u0005P;)S`mvggX\u000e/0\u0004\u00033I#\u0015\u001eƀRk? &y\u0015c[-%#G\u0016,ӿd\nʷkAKV\u001e!2\u0006\u000b{~?F\u0004e\u0014\u001d+tQ`롫\n\u0011vVU \u0018\u00182\u00104m\u000e)\u0001\u00039\u0018bѕУc`.W'R\u001e\u0013\u0001(\u0001(\u0001(\u0001\u0000:t)Ҫ!j\u0015є\u001fwggu˷+v{w_߻{ػ󱿸R\u001c7Ҽ98⸁pF\u001c\u0013s:\u0000|Fpƌ\u000fG*p0&\u0004\u0013\u00023Pvuc\f\u0015\fDrDr}\u001cd\u001c`FgeI@\u000fQƠ\u0000Igc\u0010|\u0012|\u0012|\u0012|n\u0005tR\u0006'äta8\u0002'(.s(\fbFbFbFbFbFbef\u001ci3\u0015mQÃ\u00170R\u0003%:P6]2rob\u0017b\u0017b\u0017b\u0017bA\u000bU\u0013Z\u001es\u0018o|;\u0006Զa\u0005b\u001a>)Q@3)Q\u0003\"%\\\u001a{\u001f\u0004)\u001d\u0011tQ:=̣䗇Ne\u0011E(bt\u0017QwcCK\u000e\"###\u001b\u0018ō\u0004 (8b8b8b8Cshlce\u001f\u000et!l\u0017]v!ۅ\nxxTbNHdRF,e\u00123.3H\u0000\u0019\u0011IFV:k\u0003TJ@aO\n7!\u001dv4oׯ\u001eގ\b\u0004Wj՞>?\u0001!I\t`e'B\u0007uuus/\u0007ݣHx-6\b*ߥh\u001dҎ\b(\u00023\b#0\"0R#m\fO@@@@\u0003RP#ݰ&R R R R R\u0005)\u001d1\u0004\u001f2\u0019ˌ\u0007V(H9OJu\u0019.|2@M8h\u0012wϘ\u0002S\u0003~\u0016\u0014ŘsV\nac\u0017]}-6\u001e\u0014xVK\\!\u0000%ׂ\u0010t+\u0004CD>\u0003 \u0004ed\u000b\u001e\u0003Q~\u001c!q!\u0019\u0019e\u0007\ne#m\f|PFQ\u0003Ͻ(\b@\b#;{\u0000J a\u0019a٦X6\u00067D1L8G!jtЬ0^FrԲ\u001e-0N\u0016Ѯ193\u0001b\u0010Rz-\u001dҮ4\u0019\fL'1Í5(nER䖌6mi\u001eNVz\u001f%ah9\u0005m\\A\u0016U!N=Hϻ\u0018!\u0014rlzZB\u0000\u0000$BK\u0015\u0016#\u0001\u0002$\u0010E\u00024\tk7\u0011FP5\u000e\u001aI\u0001\u0001\u000fB\u0003Ō\u001d[xpps$Cǆ``sIB\u0019gLP5\u0002z **\u0011@\u0015\f\u0017XcGw\u0007eT0y\u0000J>\u0005}z\u0004=\u0001d\"\u0000#\u0000\u0014\t\u001a\u0001u>vE$(\u0001,\u0003\"\u0006\u00116A\u0005PG\u0004d1\u0012\u0000\rx\u0013\u0000\u0012\u0000;\u0000:=b\u0014;4\b\u00157if4 =\u001fjPR11\u0011+\u0004ZJ ė\u001bd꣥SV2qe\u0000y\u000485\u001382.\u001cI\u0011\u0001q!qᠹ:\u0001ǝW}*\u0004G@t \n*\u0007\b\bg\u0000\u0013\u0017#*H~\u001e>NTGTGTT7\u000f:AS\u0013hb\n&\\\u0007\u001b'pN2ۺ}R\"'\\\u0010@Nrp\nԫm-!##xظo` XAI\u0004ɥ\u001a\u001f+\u0005J2&Ad\n`\u0000;8!y\u00020\u001fZo5:\u0007<֯\f$>>;$oו$Ж]E\u001e!\u0002|/.:'OH\u000b\bG)\u0000~\u0005Ω\u0000\u0001\u0015S+\u0010{\u001dU5͌uk:ɣ֮\u0010\u0003\u0018I(\nUB\u001b\u0004/-Ft8w\u0012H\u0005\u0014J6\u0006\u001c8\f\u0000R\t\n\u0002صpƵˉ+6L\u0010,Hj\rw*)g0'\u000f}͚ϤI?}&\rk\u0007:\u001dӡD\u000bPpc\u001eIYa*h@%2{ܪɋY^`\n+\u0003\u0016_\u001fw?~<tG\u0014|\u0010:8X\u001c{\u0012\u0006ٕ\u0016A\u0012)\u0003<t\u001ee6\r\u0005rl.\\v\u001e\u0000<c\u001eHc6)Pʵ3Fpƌ\u000f\u0007\\s17K0!B,DV\fTWevhIXzM{OhSgy`\u00112B\n\u0010!\u0012\u0012\u0012\u0012\u0012\u0004bA#X\u0018\u0001KeY\fl<T\u0006\u0015\u001du\u001a\u0005̵V*\\\bvB\\)kRX?+md\u0013Vq%=>^\"}~e_\u0004S\u001crdOPj\u001b~,1q1H\u001bc2\u0016R.K(\u0019$A/7h4\u0005\t6Y4}$s\r\bWZ9{r\nfV]\u001cd\t\u0016ei\nC0` ~,F+a\\\te[W\u0014e\u001e\u0015\u000b\fr-.\u0003`\u0002\u0013`[pN\tgE+d^P\u000e%iaanh\f7X!*J\u0015f6x:??e\u001b\r֑\u0003bh+X<\"O'\u0010\u0012\u0012\u0012\fbG\u001dCA`\tgVbsŅ\u001e\u0003\u0000-%57!]\u0019+\u0013\u0003ji0\t2\u00008\bAG\n#ي\"^*\"^22\u0018\u0015\u001e\f4}w\\1\u001fUG:܉pk\tÙ\u0006&56\u0014(Z9\u000fYFB:\t:\u001d]wpQ>GjY8XTRk8Ji\n\u000f1%\r0<\u0007Uu\u001e\u0004V6e+\u0004e\u0004ec4:F(3Kp΃\u0013-@+\u0017M\u0010x\u0013\u0000c^\u0017\f^v\u0012l;B(\u000e=h+\u0004m\u0004m6O\rP\u0006o𐹔B[H\u0006~R\u0014\u001c\u0003y\u0015L{clX\u00162$\fw1Ṇ\u001dJ[kB\u0016\u0003bU.aͮ\u0017ɨZ<|\u0014\u001c~\u001c~\u0011WWIJ_|e^}ra\u0015^.Õϔ(/fH\u0016l'ydE+U>{:-/\u00038$\u001bq\u0013d$HJOv~0EzD\u000fMGԴ2Xo~\u0010\u0007\u0013c-3=S\u00169<Óѕt :³^=C2\u001b\u0014\u0007\u0019;_V\u0014\u0012~52\be0R\u0019.\u0006a\u00056\u0003\u0019\u001d\\2bJr2(+jC\u001dr\u0003t\b\u0010J\u001ayjż#$%\u001d;\u001aɭ\n\u001eă<+ALXat2\u0013\u001a\u0015\u000fo幔\u0003\u000bTbb^b^bށ3$%ȼjBK^/\u0005\u000e#\u0010U\u0004Qʬ\u001b\u0003t<h\t!\u0004gN-vb Lyτ΄cA8A|L΃@8'\u001d\u001ee7e!4lӂi/\r5$(@]\u0014\u0006\u0011>8N4vJ*q\u001fʵZcp:\u001c($|'a{\u001e(W\u001a*.N/H'\bR.@\u001fk`Ak/\u0004(渶cYӢVB8\u001fV0\u000b\u0019s]\u0014\u0016܄\u0007ڵEQЋ4@\u001e`kll\u0012\u000e\u0000[8\u0001F l4\u001fx\u0007XF$\u0012y\u00111C+|\u001c\u0000-^H/&\u0006K/Yn\u0014\u0011\u001b\f*\u0015\b}|\u00196\u001cE\u0005&\u000b\b|\tY@:gt\u0014f\u001ctC;Ӎ\u0003cndt\u0003Q.{\r<a\u0006FK\u000b\u0000\u0013x`\u001bc1ƙ@I\u0000p\u001a\u001cY%Uū\n\u0005+)97á\nntBH,l\u0002i4̿\u0011ΰ ?6V19Lܲ0to\tT<@JJ\u0004}!*%\u0013\u0012>\u0000bI/5\u0001\u001b*YmNa^7\u001c,W0e\\\u0004 ao\u0005gW\u0002\\Gm\u0001/{Dؑf\u000ba<Dq\u0005&\u001c<͍\n1\u00009P{D(M\b5T\u0002JJ\u0015c\row4\fw^sc&\u001cf\u0013F댈>E\bG\u00043\u0006N0\u0003\u001a+%x\"\u000fcJ9p?K6\u0011Wa\u0011\u0002\u000f\u0001%y\u0014\u00078!s><\u001d\u0000\u001d`!2ã2CyC>\u000bΉDnkb`N+ \u0000U\u0006pF\u0002c%\\\u0018\u0001.xȌ\u0016^Jx\t\u0002jH,\u0015\nMb\u0018\u0010m>ʥ!P\u0011!H󟨿\u0018[lwѼ\fC x&x>>xN\u001f\u0004ϻA\u001fr\u0011<\u0013<\u0005)j{L\\H\u001fiFpîde\u0007a{/@\u0018R\u000e˭6 nku+:\u00142ntt^:\u001e\t7R9]\u0006*\rJӘS\u001a\u001b\u0011\u0019#C\u0013\u0010$8@sv.B+\u0003\bv\u001f 3Kq#\u0001\u00154NFTHTHTHTHTHT\u0013\u00156\u0018Ha\u00001?G\u0007rƐ͎@N6\u00039\u0007\u0012T#:\u00067\b|\u0019naZAݞ87Ⱥt^o~\u001a=;w{z\u0014û5GdR\u0002 ֗\u0005\f\u0007\u0012\u001a\u0019\u0014J\u001bB\tF;\u001b`\u0004\u0015s\u000e.jGV\t\u001f),Da!\n\u000b\r5\u0018\n3R961#1#1#1#1#123YNNy]Q&qJ8\u001c\u000bi\u0010Rz-\t\u0019\f't5XFb\b摌ծFj[\u000eHp\u0010*\u0005;:`~-#ّt#%3K8K8;X]\nIW0'9)x&Q!*qg\\\nJTk\r\u001e\u0015ҫpB\u0011\u0005gës݋d=뭺\u0007^%\u001e7Vj\u000bɨ0@+g4VZ\u0001\u0003=\t\u000e\u0006OB\u001a\u000f\u0004H\u00054\u001c411\u00128_9-܇/y)2qe\u0000\u0001#6E$l;2l\u0013hbs^s\u0016ۤ72!k/4dq]#}\be#M+1`\u0000jjg>?U)m0蠑݇\u0014.{\u0004ؑdH\u001b`7pՕed;,#B$!#?F\u0018#O\u000fݓ\u001fiG[gggC&^\u0012<\u0013<\u0013<\u0013<\u001f:<{gggg\u00013\u001d\"?4\u0005Jm4F\u0010F\u000f{P6fb`\u001f~rf\u0015?Vl\u0005&\u001c-H L+1ߋV+\u0003{9{Jĕ\u0001\u0000(\"?vf\\db[Q\u00103\u00123\u00123\u00123\u001e'3R\u0012\u0010_am#M+'l#l?m)\u0004m\u0004m\u0004m\u0004mwAHә\u0005m}P\u001aˎ9m6چ\u0001*#t\u0010\u0019BSFQ!V\u0019\u0006\u0000UN\u0002-4h\u0011y\u0011kmk\u0005\u0013\u0002WDSjL㕥A\u0000CJ\u001cݰ4\u0015Ks&\npۆL\u001c\u0010\u0010\u001a\b\u000e V~l\u0017<(fٟBdaㇳ˼\u001dW\u0000\t\u0013\"Gy=\fWdD\u000b\u0016*/f\u0019z6<I٫iy9}M̛b^:xwK\u0010\u0012y7\u0007\u0005.>=;YM^\u0006\u0014\u001dsm\u0017_\u001f?~L4J4J4?\u001a\nҨSd:ma9\r&M\u0003zŜ\u000b+V\u0019(+\u001e@\u001dҥ\u001cw8\u0001l\u000fO[w0SC(ɵ*\u001aJ\u0001qB\u001f؆JY\u000f\u0014\r\u001e\u0019\u000bEL10JÐc\"5\u0017\u0000vA\u001f|vg\u001f0qۭk\u001dba%_\\~uHF\"\u0019w\u0019ԌaF\"Z\u000eZX\u000b(H;7}qW^o\\}w\u001d|ꛫ?\\\t~_Oh\u001fdϔB#\u0014N^xK^\u0000\\vz~{SK\t:ês:WRH\rv\u0003u#d\"\u0017i4XBTJd\u0005~䞇d=x\u001eu<\u001f\u0014B\ru68\"\u00064!\u0002h}|>L|&\f\u001eό\u001d/WkwraOW߾MAẗ́ϳ\u000e\u0016\u0011aH(6r\u0010iXͷ%e$C\u000f\u001be$iH(1\\,Oӿ%jJ-闊1Ƶ\u0000_Y\u0011n\u0005\u0010XZ\u0011?2n!3!vu\u001ef[\u001f\u001d;|<\u0004vd\u0007%\u001f$-\u000ev&O~ ^j6Ɖ;ř\"ٴMVO~'\"^zHي|aaADO\u000fp;Q$?\u0003\tݱ+\u000fG\\:ɔZ8]VɬY}ׅYo:w\r\u0004/~O~\u000fSGxIC@e\u001e&S\u0003f8LOF+f`|Zr:D\u0018\n*StS\u0003N\r.ۛOu\u001a:'Ӌ\u001f\u0011om\u0016a0#-|\u0012R\u001a\u00142- <Q\u0007@\f0#\"?D\u000fELOL?V\u001f\fWK}_߶؇Z\u0003z\u000fz#wL/줜VoKh\u0019Xg/_|x\u0010\u000e>\f3^\u000b\u0006\u001c0{`8c\u0005\u0018`:d9UV\u000b|+^\u000b^\u0017_ٝ<m.ǉO?\u0017\u0001\u000f\u0002)m<\u0004\u0011\u001aEK\r\u000e\u0013`:p>̈́?\u0012V۞o1T>z_M~_\u000f/_\u001bk\u001b)ɛ$\u00155όh-'$F,߯tPk.ZI->=y\u000f.7Bv\bzKF͖ը\u0002!\u0000A%D\u0014[r.\u00019`?uh\u001ebRFzg%\u001e$\u001a\u0002r\u0019\u0006އ1h\u0016+\u000b᠝dQ~(_;d;\u001dG\u0004En7hA\u0012G\u001c G\u0001>~6HUx8|Ix\f߭Y~v\u0001>Һ~{uwޮ1\u0002~I=+a>?o۵w~e~Y?G\u0010ƶgt\u0007y*_=?9{2=)0/\u0013]y?]\u0005>^\u001d\u0017_ėabV\u0017\u001f\u0010F˅d\u0004$:u\u000e䡣As4hPVu%,bؖ\u0016\u001a\u0013@pq\tQ0V2A\\\u001bq-\u000e\u000b*qf\f\u0012-ԫ[ef\u000751zJT\u0007$USPi \u001e\u0000ws\u000f\u0003\b9\u0011N\u0012\u000e\u0011\u000e\u001d6\u000eY¡Z\u00152jg8H\u0016{Y_Y\u001al.\";\u0012#.hzz\u0019m\u001a\u001fP\u001aD>UӉ1\u0004\u0011Z3!%dУLGhO=`\rMk{\r\u0016J|\u0010`\u001dV\u0014\u0016\u000e^͜,$H\u0007h<)'[W_\"`U3ŕ\u0013J9\u001dҭ@\u001a\u0001N񡄋k\u0002\u00131+삭\u0017إ-&}[gݱꖽcy3j\u0007q[1\u001e7X\r =m/\f\f\u000f8b'<\u0019;\tQ\u0013༚sx?\u0019ڃJOK\u0003yJ;gCz(2g9`smT8\bBW\u001eIr-#ֽ?\u000eYj\u0013] ?\u0007<ED|0ճ$?m\u0005\f;n2/`h4toy\n{\u001cF\u0014\u000f\u0002\b7t`)\u0016Ts\u001f﫿Lz?Oog\u001eo=_óexpI?=\u001bN^d\u001ax\t`&\u000f\bsI^˿\u0016ju?>\f\t\u001fO\u000f˯Q|zR^;Z1\"|8x-b[o-j[[opTw\u0002x\u001f0w{\u001f$}Blyk~I\t7Y߬svQ\ro\u000e\u0006=rcr\u0002=^a\r3)\u001dJKn9\u0017@J>w%WRj\u0007|G:j#O\u0018e֚#9o\u001f-\u0007.x\f_͵ZRy\u001f3ΉHHHHHH+73o\u001eTW7Da\u0006߫\u001a\u001f꛷\u0012\u0013ܾ\u000f'O^|o\rᑄHqʯ{mSq0R`\u0014ץ\b`-s Y\u000eFJc<¢P+A+\u00195ӕ`f0>\u0012\u0007#4\u000eF\n\u001c\f|]\u001a\n\u000f\u000e2/)iO@\u0005\u0007\u0004=\u0012,v,ˋ\\\u0005n9f^w0\u0014np(q_\u000fEh\u0003m\"q\u0016?\u0012֌p!\"2\u0011B|'\u001bhB!=C8\u0016z3\u0016vDJ)`\u0001Re\u001c\u000e\u0001=p&|Q1\u0007\u001eH\u0018\u0016NP+K\u0015Tkyd\\\t\u0003`BX^\u000f|\n͇\u0000d/\rF4Vk\u0010f\b\tHX\\*xan9\u0013\u0005\"V.\u0016^Y\r,L\\Y,0ccaluilNRq\u000eK\u001a?\u0017\u0003y\u000e\u0000\u000105,q<9g\u000f\u0000*P;@\u001d\u0011``\"W֒\b+aYlʵ\u001e,JԮ̚\u0002\u001fX\u0001X\u0018\u00009,w\u0007\u0015jM\u0010,\u0019,/l\u001epfU\u0014xՙL!t\u001a\u0007\u001c\u0006VL\u0013\t`򔨰\b<<=j\u0017\brmu<ҫվob$A%5\u000bKkY%\u001d\u0007\u0006\u0006ג1BV\u0001U\u0004\u001ȧ[\n\b\u001c\u0004n\u000f\u00018\u0004\"ywh)3P\u0002:en\u000eKpuXaq\u0002ԭ)8\u0006ـg^\u0011y@!U\u0002r]d\nFr\u000fg9\u0006t\u0018zt:H\u001d\u000f\u0005\u0014}>-(;\u0002gn@Q#v.%J\n\\\u000e0\\S\u0004\u000b٩Ok逩\u0000\u0002:\u00025\u000e\u0018\u0010\u0006\u0018T׺W\u0003\u0017׮]\u0007\u0005\u000eғ-ٜƲY~2$a>\u00182줅A\u0000R+\u0002LbI\"@2h7pU\u000e\u0014\u0014P#0\u0000s`ղ6Z2_2e\u0019\u0010 \\\u0019\n\u0000Ӏ\u0002`;\u0000p\t-\u0018`\rS\u000bǕ\nV\u0014\u000f6\u0015`?|\f\u0000W\u0015Ƽ(u[eU_1h:,'o&7 n$w+~z>\b[ln|rrqyvV;\u000b\u001c\byr\f(=\u001dմsvMrj8k\u0014oNų\u0017g\u000fu5C_3gCp:\u0013|}\u0018\\$\u001fN7x\u000fK\u0010_=\u0002nKۨ/OU^_\u000f\u0016|\f^\u0017L\nۣ<7Wy/:_\u0007fyz\u0018˼'c\u0014|Q|N~Vcf@F2{>U˓jV-^^_\b7$cN=__:\u0000\u0006o0囋뿹C\u0017\u000f ţ\u0013~ןw|NX\u0017~J|qn6N嫺0igӳzx3P֟'!\n^\u000f\tn\f_4\\4_<,^E቞]֏Ѩ\u001fíGimG\u000bBLw\u0002<(*\r/\u0017/;XJGj|xs~qRyLn\u001aǟ4:,Q \u001f#\u0015KJ?˟N} E\u001e/~a8Pݡxc,N¥W$@.Gӳ\u001f.\u001aѿ\u0017`}}ΏNE~>sz}$OWǧΧ~X\u0012>=_v׿~\u0002\u00038CΏf'p\u001f~yy3ho{-~i/t:-/nW\u0011|-u\u001f뙿Vq1<{s~>/.&䲞zv>;0tC</O.\r:|yԷ9\fdΎ{>qJ5\u0014r\u0007c(zː&wS\u00121o/5a%}e>#`Q\u0014'7Opǲ1F\u0011k^;\u0011|P>[T/\",(3iN\u0016M˓I~z/=\u001eGl\t)a*>zszΓ]w\u0018ko<\n4ӓzrY\u001d+_|26'\rr,\u001fG=qM|!^\u0006p\u0011ʣ.\\\r\u0014P\u001bW_\u0012}\u0002\u0006e~V^\u001aُ_\u001dhyE\\Eo\u0017\\d\u001fsy|ճt\u0001])\u000e\u001bGN\u0011m@'Y\\7yHc}ʔ<{S\u0000#g]<E\u0018[洞6gUG'Z\u000e#E2_g'\u0017/aY,C_x\u001dpa\u000e͜ݢ?Yu(OO'\u0014_Nf\u000bPIa\u001f\u0007;tyV_\u0003\u000bpy-A&`s,i^\u000f\u001d=7h\u0012m{/\\O4?/.i~I:~^LDoTj\u0012&\u000eF״.U*HM2z\"'{9\u0016=\u0011g\"z\u001cgI\u001b.Y\u0015͘\u0017:zn\u0019JG÷6ja6\tĵhh^F\u0013\u001f\u0013}J\u0016*@U\u001d?eu\u001e/W%ɇaJ\u0019K7zH\u0012n@mh=T!} \u001a?K0\u0010\u0014ţ\u0007\"C\u0018E,7\u001d\rVĺH,a\u001f/xEx)E\"^\u0017(V1;\u0017ժU6\u0018\u001d'3\u0004NCc \"!xd2{.^c>z2\u0007Z\u001bK-\u0006a\u001f) nBEl,I\u0019U;}Hq\u0016(P8\u0016\u00121\u0002X1ǺC\u0004Od\u0012e\u0011ώ5'a,^\u0012ږ\u0010oLoJG7gLplS\b\u0016#`c\u0003'XœX9t%,X?\u0015èo|b=\u0010#m<Ubq1\u0005Ǣ\u0000IGo'\u0014p\u00111$l\u0014\u0017/\b\u0011\u001e21xUx\u000e]\u00062j\u00161iZ\f &\u0012\u0016P<\u0017\"\u0016'\\\u0004\u0013/Č\u001e]H\u001bCU\"A`bDcH&L0ؽI`v\u0012@0\u0001⏔\t\u000b,k\u0002\u0019Y,2\u001b2F2Mr\t=N\u0018\u001c\u001f󽏍\u0013\u00192\u0012p\u0013|\u0019`e&\u0011Cf,n\u001f\u000fLܮÖǪ\u0019\u0013\u001a1\u0001>\u0012\u0006YfI\f.*ie2a\u0014/U\u0015O\u0004OPZL0;\u001aLĔ\t:\u0014W1\u0019i0b7OBJ1\u0006x2Mx\u000bu0jcI㒉O_\u00130\u001aO\u001a\u0015k7e1\u000fX\u0003,\tO30\u0019pt0~t\u0017?g3>V^\u001bb\u0017G,m*D\u0013+t\u001cp'\u00022\"vd|\u0015\"l\u0002N\u0019@1ľuʈUP\f8cHDwbw\t>^y\"q|NTX\u001b]c.\u001eL\u001b\u0014*\u0015L5V8Xc\t`H\u0007_\"\u001bE<31\u0011R>ֽT\u0000*V\u0017XG,~O'e#㈩m[r4baZ\u0010\\|¤W`\f\u0012)?6Ql,$5qx>P(\u0016e\u001cv1\u001a$1^ޱpxb>'?\b>&4\u0010klǂ=\u0016$P7X>\"\u0006u\u00171\u0019\u0000i$7qqc\bO\f\u001a6\u0015̋y\b%v\u0005YOy՛pX]XqޥB\u001a\u0003<1Jل}\u0019b<,r)!\u0016cz/6z\u0017{H<67Ebfb_Ƴ2bx᱃$\u0012b%P5\u0011m$s\u0010Rb%64\u0013\u0011ĖsKO)#A\u0011q^)<+&$\u0002\u0012\u001b-PcS+ \u0011\u001dC\u001b?O,:Ĕ\u0003\t\u0017?bbX'mb8cͦv=\u0013u|pE\u0013#h\u0013XAc*]b*\u0011O\t1a\u001aj\u00126ljc\u0016-\u0005\t/0\u0005ҋ\bM\u001b\u0013KC*\u0006\u0015\u001bԱ\b. \u0012@b\t:UL]tn,Dl ',\u0004\u0016Š\t\u0007$\u00051\u0017'sy\u0015\u0011oOlB'\u0012DND\u0012$\\x.\u0012^VZ{\u0012x\u0015Įxlnxئv1D\b$eIŠ\u0015\u0007\u0013>Od>Dg\n`\u00126\\LؓL$%R\u0012\u0014#@ұ0\u0012~S*\u001a3H1J8\u0004a$Ԗo\f2\u0012S>t~lS!<ay'6\u0013oL2r\t\u0018C*}2^Vx}\u001cOE\u0017%R\u0012y\u0006Mad\u0001Sҏ\u001d/F8\bJK\u0007S±SJ\u0011E\"-Hc\t e\b$<7K<c=c/)C9AV,L&2R\"\r+&p`7&0?Rt)N4D>&X\"K.0'BZ1(!b(!xK'r\u001f\u0017\u001b3.\u0019`PIbL,\u0012k\"\u0017SF$D\fD\u001cxf\u0012Z\u0012<A\tyDʔKr\u000eK\u0002G\u0012\u000b>Vt3y\u0012k~\u001fV'\u001c\u001f|zvRNzQ,\u0006\u000eܼ\u000bn\u0018\u0006E<\t*Î\tMMr}z0MQ|{\u000f_/ϧK\u0016w\u00111떀7O\u0017o\u0017#w<Y0rWM ֡Pbvu(`</شG7xy[P-\u0015bϪI9=&bb<¢:r\u0002/It_\\ț5_/.\u001bBޗ\u0016q\u0006|]84<gW0ΓjrqS|Xg\n\u0019{u6-_MA/fӥ\u0005]CVk`_.Jjq˫~~ӪbiΧ\u001f\u0004V\fZmn>q~\t\u0014\u0002U\"`[^\r\u001fZ>p˿9j'~8Z7E\u001bq\u0017ϲ\u000f\n&S\t0W0>\br/\u0019&\u0018]ӧm\\Ӌ\u0006\u0005\u000b27Mg7\u00151`N}c\u0006x\u0011/\u001cfÓWX8fŻT$`\u0010[e\u0005yrŲT\"+\u00158*E+`1O?kѧ\u0017[J$큖A\u001cgwEs6\u0001vsdʳ\th\u001e\\\u0013}'(s7:\u0006آښ\u0012U\u0003F/g'p\n7\u0010?\fW.s.\u0019)h0qш\f䤳\u0017#ã\u0000\\U\\Fo0r\u0011)d\f6\u000f@\u0013\u00039r:#\u0015TpK3Y\r\u0017Y%\u000bJՙዖ<E}mr6 \u0019鷕Õ.eϸ%\u000bL7pUz^Z&j2L,˥15|]\u0015`i9]f2\u0014\u0015wU2_\u001erky\u0000qGy V(Bs~|%sY-vy٣\\̟lm\u001dc\u0014;h\u001a\fRJ\u001b%e\u0001L6KRxQ4Iu~~o\rZZDZ\u001b\u000e\u001e-x2\r\n\u001c\u001bn2<x\u000eZ0/@#63\u000eYlF\u0017eF6\u000efLg\u0001qڗ.O^ϱaӺGh[{>B\u000e&\u0001׳\u0006Z/l3-KYZQnD3w۾K6[?\rW6\u001b?yY+|V\n56+r%B\u0000H\u00027zzR[>\rW*\u001bptYY\u0018\n3*\u001f*۲O*^=\t\u001dB:VO5C\u0014n͹gB8@2UQ6e2\u0001ɊdYkk\u001b.\u001bgD\u0017/yqd춒\u000fAu\u0017\u0017.\u0014]\u001c\u0012\u001bd\u0017\\j.\u0010c\u0006_bS#\u0007\u001bj\f\u0012B\bE2ElKT*\u000b\u00117\u0010\r\u0007#=\u0000\u000bɄ6\u0004d_\u001aִQ\u001d3c\\nlV[xgyMfK\u0006G\u001e٦\u0004w؎\u001eƨ16*]A\u0016LalwL3^yKĲڂr[E\fX.[\f_U\u0003p\fW\u0019hLR\u001b]\t#5f\"Imj\u000e\u001e~P D:\u0010%Ų0\u0015P3+rWrm'L<(#vg\u001b-nekV#U\u0005<2hd9΋yye{4\u0001.JRnA\\w\r%k83e&\u00002\u0001\b\u001dMʼT.T-N\u0015\u0018Ժi\u001aB\bVkp\\eB5^ee]2}\u001dA*I<\u00164B<b*עMV\u0000\n\\,\u001dX\u001d01}nF\"av[[0\bi\n\u001e7:\u0001cղȼ\"+5Hp\"/fjGNj$V#6\\5Ȁ\fLVM>MYd>y뺄iZk2E\u0005\u001b\u0007xR:Μ>8X\u001clt]hQ\u0007'D\fT6\f<g \u0016\u0011h\b\b{L3)-Dew\"N\u0013\u0004\fTs6rmν̔lKXj3Q6N`qu}ŋ\u0004B(H\u001dQm3`=\r\u0018\u0006^d+\u000bX_(ވUOWvI0]PMmm\\+5X\rk])!l2=b\u001b-6T:=F\u0013!-{\u0002 ծ5z?\u0001|V(ƳF{]\u0019]%qu>[d\u0003 שv^\u000b\f8<Y\u0014UfY\np\u000e\u0005vr{59\u0010JYa5W&\u000bzX]\u0016\u0015:\u001c\u000bt3ڸj@ko@9\u001a\u0001jY\u0004&+*!2JkmzĲ3]<=\"ʻ\t߮\u0007\u001d`@2\u001dSF\u0019w\rs\u0012wZL3߀d\"{3\u001cn\u0001\u0002+Bl5\u0002j칊nR7 ${\u0002ժ\u0000;A\u001biu&7\u0004V\u0012IG\u0012*:F\u0006O`%2.k7yQmm>iU6]7]J>\u00074L̅)ȝTYLP[\n*MY1V{$5tP\u00010:\u0006\u000b[\r\u001dWXz\u0007\u001eu,W\u0019W\u0005eaJg}C ~4􆏞\u001e\n\u0011[\u0014P2j\u000e&\u001f\u0018s%X\u0015H%3:=f\\\u000b\u001ab\u0014Hnei\u0010%\u0013b@\u001d%eŴ\u0000\u0017\u0016l\u0006\u000e)tVtB;qgZ2?\u001f\u0012P(!\u0002Te\u0000|\n*+d)pᴔ\u001e7$Bc@x/rC;r\u0014r3\u0006(X\u0006\u0000\fTX0Q`}^^\f\u001bϙ,.\"\u001e#73\u0012\rM4RZe5\r\u0018\u001c8ƙ`uΖWZn'u?r㐛\u0014&\n㝭L&8cX=LֺM\u001aGm/<4GpbK#\u000epKg<(\u000e\u0012BXs\\0[M-..\u001ci[&d\rS4hL\r(\u001aDQb\u0006ƻ\"uo.D`Ǥ$*\u0019ŻKJ1E\u0005\u0016\u0005 v\n>\u001b3,$3'{,\b,N6|Q\u001bJ:0\"s%\u000bYQiiaef\t-E\u0013)\r\"\u0010\\YИ\\c4/\r\u0018\u0005\u0002Ǩߵh\u0000\u001ao\\|\u001bD'\n|\"EQgJ\"+\n3YwN\u001eݥkuK':G\u0012\u001bD'loD\u0006\\\u0005QU\\9\u001bzl'xzrCZ<o-\u0016lPgu/)Q<k\u001aL\u0010W%PrJQzfu$1ۓX$ƺK\bY\u0016\nl:\u0007h\u0014ʘ\u0015 >;\u000fOϞOy58\u0007+c[#\u0003\u0006(`et\u0014J^9G^g\nS<qj\fF\u0018n&\u0011D\"\u001fDTw\u0012\u001cYYűMd2\u0005+2ShU\u0019%= /\u0010@p\u0005»\u000b9+,=\u0016Wy\u0015\u001e\u0006w\u0001K\\\\v`\u001al\u001b\u0019LBL\\\u000f[\u001a=\fX\u0006j*r9\u000e2趱ѡDwI<w\u0016\u0006\u0019wavb9:ɤ#>'a+\nEt\u0017PEny٠\u0014dYn\u0001+xɜ7q\u0002\u000f\"\u0014׏\u001bw]דSt\u0001\u0002|c8\u0003F\u0016B΀kʔ\u0017 Js7^]d{̏Eff\u00033RLե1XWg\u000eh\u001b\u0002ey'\u0014?Pc\u001f\r\u0007\u0017\r&e\u001c$]Ѫ+9e\u0016̚\u001e٪xEdv;Ԯ DP*gpXQΫ,W \u001e\u0014\u0013Z\u00196_*z\u0018\u001ano\u0010#h,\u0013yQ\u0015\u0000TDV4gME}c4.M>7'}h7o\t^0ۦ[l8R̖\u001a\u0013]2[q\u0003(+V.|1l-\u001a\f\u001a\f\u0010w\u0017d\u0011V\u0019\u001a\f\u0002JM*6}瞋Spk&\u001b9aM(PݥJ\r\u0018ܚy@:q\u001b\b\u000b3\u001b.}YB=&Υ-#6!\rp.e\b\u0010ps\u0014YK+\u0012U}l\txsyyoDn\u000bXY6PdJ[&\u0003B\nlٌ<+k<Cpkf\\Lʲ-\u0005Ć+\r\u0010\u0014fe\u0019YKI\u0001Z_Ys6i9~-Zͱ\u001aKJ:3%&\u0007W\u0017:yS30욲^F0\u0015Ǩw#T#}TdW1\u0002d'\u001c\u0015n6e\u0015xQJy\nunڇ5;\u001e5-u,Us\n&2\u000b\rH2o\u0002{E:J'L˚]x[Ac\u0010@uW\u0002Ԩ\u0012`s,VQ!-W\u000e\u0006V\n\u001ai\u001e#\u0006+plXGز%$01nCe&/2oP\rQޜuZ׾\u0017}\u001fhBo`^4\u000195VIX\u000e\nřͪRJ.DՋYfFǴ\u0006'0;?v\t/J*<vR\u0003V\nK0\u0002{po<􋓳jvg[\u00030[u\f\"\u001d\u0014cZy\u0016e\u0015\u001e(58ʢe\u0001{.˦*\u0000nq}aÕ\u0010FJ2\u000eLB)\u0007O6`WX2\u0015/N^EA*\\\u0019\u0007$mh^G+UJ\u0016@?%P\u0014\nA\u000456_˫\u001es\u0013\u001a2/:Q\u0013å`wRŕ\u0016%Wjl*aV\u001cq,W=np|0=|-Y5\u0005<\u0014MW\u0000v\nV4hˆt)jTLjc3n/ȭ\u000b;je}^[vWcMʢIW\u0014xo\t`ڛ\"W}n\fn\u0012W\b9$R3)\u0005r\u001beaWIʉKr\u0005 \u001cVJeW.Uc&Wj;\u001f?\u0006,(]P6FgFd\u001c\fRf\u001eST=࿨g/g[#\u001e\u000fU<\u0018\r*Yoʊ\u0010\u001d\u0014d\u00195u\u001bϪӎܞNn@LI+\u001a\r`&|mraKkm\u001dS#8:v\u000eU~hTYp<EQ\u0003N\u0001!j-)FȺG\tˎ\u001c%\u0006]j\u0003ca\r6qm2nAD\n`/]3^TJZ@:OR:|\u0016`Q$srgEdV{Q;\nh-ө\u001bl\u0006\u0003h\t\u000ftl܅ރY\tt%@߷ \u0018pyO+\u0000)ȭoG}#\u0010;keVzA~/6oESv\u0017yyun\u0015I-úIyV:'_\f\u00035\tmk;QyP`\u0010פuߙ$=h] .1\u0007ux`IWi:']m*\u0001\u000b\u0006ZRU`jՔ%mH2$nupcA8ﶳkrqSde\u0003Nq.2'Ϊ\\\u0002>2劢\u001cOϟȹ}\u0007#}\u0002\u0001g.i7\n$[o\u0005s}n\u0014eFV6\u00036\u0006\t|a\u000be2<SV )k@6_\u001e\u001c\u000bt0зl\u001d[c\u000b9W6\rzNa\u000f5D3\u001d5/=t~v/xڤ\ff+\u0003]c5ڰ$\u001dX2Y2S\u0015|\u001bt}\u0001TKTc\u0019\u0007Ӌz#\u0011B-Ed\u0006,\"]DK\u0018A\u0014@\ngҲI!{l˺|<m\"+\tQ,\u001e۲jJ!\\.uc+ϙRGi^L\u0017^,lbR(&\u001b,hK\u0001b\u0011E\u0015YS52IgÇ/Ξ,9XBP\u0002\u001cU,\u0004\u001b\rJ\u00014*\u0015Te^g\u001dq'v\u0018\u0012Nmm\u0012V-0cM[[[\u0000L\n!0>QaqcJci*k>ߚ:9;;Fۇ\u0001\u0003\u0016H܈9G2e29'@dGg`DmFfj仫Q]㶐\u0017\u0003+JUedRjiqꊄes\fX|w%*l]5E2Q`#5\r։\u0019\u0007IAݖ\u001a$AiMLiS \u0002w`Z7\u0000\u0015M8A>3\u0017oz{UV:\u001d\tJ\u0001z\n5agrZ\rє[8>\u001dGl<ү\fVtwMbEdm\u0006>\u0004.}xFT\t\u000bYu$&Ţ\u001aZj\u0005曐e.aVJ`;\rfC]yɐנסn9d\u0015oTv\u0011o40YY\u000b<ZV;XvѸ3٧pG\u001a\u0001\u00139uS\u0015E֔\u001a\fnєgfu`eS\u001ej<Y~97oؠ\\VInrF\\V[n7㵪\u0018@@80\fѬbMr\tyd#,6\u001ef\u001csT+\u0015ܣ\nO\u000e\u0001+UX\u000eq8z;Q})1ɻSea\u00167\u001eȇ&Ri \u0006\u0018XמO\bEpj\u0003o0XW\u0017x(`R\u0015B:logKD*7PBrٰ8\u001a:̫kt\u0005c0zKU}_Vj>mчM\u001a9 EUU\f$\u0018X\u0016J;LXyxk=\u0005K\u001fL؀eD\u000b\tv\u0011x\u0002#pc3_4& >\u000fn]7gΦ_M#v\fg/ݺ1hlQX\u0006kYe\u00049/ʼFA7*\u0004gÍ)\r\u0012H*\u001aڊr!3\u001cإj\\0c\u0001Ŭoz'zQvi\u0006*\u0019]2,/i8x\u0007eKL@ox^\u001e3\u001eoR`p\u0012\njL%U-r\n.\u0010@t]ʭeUG߰vv\u0018\t6\u0014,+1x[y\u000f%YB:\u000eG\u0003\rU6\u001bG#h?'ָaW\u0003\u0001p娞M.r[\rW,-u\u001b\u000e\u0012U ym.\u00152}\rߺ\u000f\u001fݠ۔1րl\u0003\u0014`\u0019\u000ba}fZ-狗'wkĀk\u0006ں\u0012pe`Ӹ%\u00004\u001du%ސ{ʹ\u0001\u0017\rH\\\u001aN\u001ac$LF4y\rwbǤ,/9/^ɋ;牋m\"7ha\u0016yAVn*x\u0003\u0006L0\f0׶Z9[6Zrѣ\u0013ɦ\u000b\rsˮe݅\u001b\u0005nS^f|\u0011\t\u0005\u001e%\u0001WXc \u0016^\u0017\u0000跒\\oc;TS9+-VykͲy&Z*]]\u001e}ҫb\u0014k\u001b9ۉl}CP\fs7\bWSgdUQdTX*\t}ZZ+^rc\u000eЪ:[JK\n1:\u000bdӀ\u0019j\u0016\u001egYV\u0016\u0012,Z\r\u0011#bzAD\u0003=dw\u0019\u0001B\u00156eŬB\u0003wZW 1;%X!\u0019Ʃw#\u0013\u001c[ݳhD\\D]U\fg\u00115xbmG֞\\\u0015sw \\wl\u001dh.{9:J,U\r\u0006\u001a$0h<s9Yu]>/$Vb}6G\u000f\u001aM.{9:\u0017E8؅J\u0018e\u0019{+TcYR\u000f2gf.-\u0005V\u0006\u001d,\u001e݀f˲)ǐ\u0012u\u0001bSB\u001cӪظk8\u001aZʔ&\u0010\u001aY(Q\u0018E'.ňA*M6%F\u0010\u001atvFnn\u001b;\u001d6\u000060N{؉\u0003X\u0014I޽~\u0017 UH\u0005\u001d̽wO֖\u000eN#\u001a5c4\u001a[ܪ'ܪ7uĭzjs@\u001b%\u0006\u001aMSɓC e<b4\u001f|{B^iږ(`p{BeY&йVB\\\u00076}\t^\u0014:\u00141),QI:PEs)\u0006pL\u001b&BJBY3&ZQ\u0018JQ d2\u0004ea*W,t\u00192\u0013V{VT\u0014$H\\\u001dUhB\u0016):>\u0019k@D\u0004\u0015T\\(~4#;\u00100CY8[>07eH\u0006DC\u0017ږ\u0001mr#\u0001c\u00173f!*1,Km5Om\u001d\u0002~\u0015\fu\u00039xi\fSDMrrUd@2j\u0017kJE\u0011\u000eL!pA9d!\u0010dq\\ְ\u0002\u001dٜ[Tn+Xv-\\[u,j5\u0019}Jԥ,F{;Rو\"Qk]\u0011\t.ŽTh\"Bn}؅%\u0006*I\u000bD\n+i\u0011d)\u0018[Ubؘ3\u0019\u0017C 5GSTQMD3<r*2\b'p<,ԑbrq\b\bbpP\rC5\u0019\u000b*-\u0010\u001e]E2fF1\u0010.I8q\u0017J\u0016J\u0010A@\\\u0000F\u0014r_J1]fŀ꒢\u000eцhJ\u001bEq\u001cM\u0006\"j\u0014C=µcP2ˀUb\u0012z\\[\u0005l\n`nmK\u0011J\u0018u\u00024q3B]\u0013\u0016\u001a4%\nFub\u0011JhDS\u001bq*24\u0015`W\u0013\b\u0015\u0004(4 Tt1e\u001ay!#C\u001dw\nQG\u001bQ\u001d9pTL\u001d\u0012:ӑ\nr(ԱTi8ޑ\"^uȈNGH\u0012BepSA@Z:05U\u0007\nUæ()\u001e)6\\4\u0014\r\u0001\u0014|G3WSXrybF5G(l@M\u0001k2\rQlۨDe\u001a\u001a^\u0018T\u0002\tU\u001c]\u0014f1ŵ\u0011@\u000e!ad\n\u0006HL3]\u0012\u001eBY\u001a*\u001c'/\u0006\u001ba3(/I>R\u0014^k`KpBd.cP\u001d\u0012\r &%YHȇ\"DYI©B\u0012\u0002\\ʮ=*n\u001d\u0012]2B\\ˠ%Z\u001d!IY\u001d\fɨA\u000fTHu]8jͅ\t\u0005\u00102]Qe6m7i֛o)}X\u001cT\u0004\f\fF;)\u0003D.|I\u001cqr\u001c#\u0003\u0001\rbAՆ\u0016+Qs \u0012t\u0016#RYdT)Sq\u0015D\u0004\u0003Zkig\u0011k8B['T%!_\u0004̂l\u0019#J\u0014C(66E\rl\b\bV\u0004MT2-͵m2\u001d-\u0017~\u0012b4QG&\u0001((&!\b\u001ap\u001d\u0011r`p\u0015\u0012\u0012Bl\u001eM5+Z\u0019M1\u00137$I 0\u001b\u0010G:Ӏ4\f\u001c.sm\u001f W\u0006ոKߠÆ,D\u001c\u0005k\u000eVe\u0014\u0018:\u000e\u001dY%\u0010-VaW(y\\\u0018vY17$\u0013b!\u0016\bX8!\u00005\n`\u001bn8^bKަm\u0019EBF*<U 2\u0011\u0006H\u0015\u0007aG\u001f@C*E\u0016\u0018Ӕ\u0005Q\"\u000eh(#J0C`6ruq pmjp#s\u0010u5\u0015ꚉjhD4ĜJɪo.(I7\u0004Gݏ\u0013n؄kqj0x,\u0005)\u0000D\\X\rD\fs$e1G2<e\fn\f\u0006\u0014\u000ewDA\u0002\u000b\u0012\u0015\u0018\u001aUT񪻖G\u0019^u:2.,@,\u001aQH1ьl\nU&fA\"\u0000c@#cXLTm)\u0005#mdbS<Ś\u000eM4\u0015-g&@wtlVRݤK6Qt\\(\u0012EDQ5ʀb\u001el\t\u0001q~t.\u0010%Jf5\tY׊\u0012\u0018](DHj\u0015\u0000D\t8wp%rUCvhjKK_HA\u0018ptI˓L1-\u0006\n\u0004E\u0003\\[\\pU\u001b.VIa^%\u0014n)gR@\u001eeđ\u0019GQ/B\u0014Sf&\t\f\u000b\bE\u0003T\u001b\u000b#\rq=;f\u0018.7\r,\u0018iBZ&\u0015ScrX-#6\\ƪe]bQ\t3[G\u0013sti\u0004i\u0010\u0001^5g\u0019\u0014p$Tc\fi%Vr\u000bpkTՅ\u0019$H߭b\fб\u0000Ӹo(\u0017Umkb.FJ\"\u001ee*2g?)D\u0017mtbE!E!\b\u0001&8b\u0010\u0007\u0010lin81^\tqI\u0014e\u001actF4* &@D\u0010\n0\r\u0010D9V&nVy$Qk\u001a%\u00070Ft\t\u0018.Z\"YԀN\fMa\n-\u0015=ٮ(BF[\u001c\u0002mt\u0002L\"^\u0000T4dC\u0012EY>'jE3\"BF_\u001chث\u0002\rs3Y\b\u0003t\u0011\u001cbf[eb\u001cCL!EyƄ\u0012F366W+6!\u0015\u001c\u001b\u0010H\tr\ft\\(լONu%<fQ1Go\u001c|c!ĢG\u0015AɃD{r¡a\u001a%Z_??Ujn]қ)RB#Q|983r\u0015/($\\pk\"I\u0011\u0005\u000e3Pͣ\u00122AijIP+$\b:~j;&Tc;M5h]\tP\u001c\u0017;t\u0014\u0018\u0016Tcf)C3 ;7d'\u0005\u0013F\u0016U\u0000\r*\u00186\u0000Q\u0004^\u0012\u0011AD\\6!AX5p\f&.\u0017L#F\f)aQE1/Zw5mت\u0006+\u001a*IBG\u0019\u0005UT\u001e򿬢\fE\u000eo\u0018L#\u0002[\u0017x}ŢPĕ\u0003\u0015B*R\u0012\u001f*JDBW\u0015!N#J\"\"O\"Uj\u0013U8EUe&wL~.麎<TAaBK\u0005g˨e\u0003hB,ğ4`LU\"ʞ#\t,wMNq\rO9\u0013)G,Wts5b.RQAͽ^lXV\"1,4Ǳ25b#\u0006\\\".8\u00024\u00151p(!e\u00167!s\u0012\u0018p$ҋV,\fy\u0012ي\u0010pAºu\rRI$ѱ`\"pJ\u0015\u0005SE\u001107\t\u0004Q!ds\u000f\"\rF\"?W,=ճ-X\u001e\fy\trbfr#`n$pҨ\u0019\u0001\u0012\u0013<КRoE\u001d\u0015! {$)F 7)؊eX\u001a0,\u00101\"\ns'\u0017qӜ`\rFoHbumvF\u00180+#J\u00049XIŪ#XͲ\nm\u001ftCW/\u0011p\u0011\"#L eT.eD\\Q2\u0018i?\fL\u0007sѦ8\u0004Pչg)l'$2)\n̢}zdt\u0011\u000fʡ\u0010ԐP\u0005H m\u0001L\u0000F/Tb%fKr\u0006%PL@W\u000b\u0014C9\u0014\u00036\u0014\rs.s\u0011P\u0019p4Vf\nn3: X\u001dZ\u0016\u0018h=z↟\u001c\u0018\u00152\u0017[\nw\\\u0019R8*\u0006\u000e0\\JvRe~\u001d14T\u0004\u00134X\u0018r4\u001cnO(\n\u0005\u0012.\u0013U\u001bX&UNuMM\u0015Zb.d\\[ի\u000fS\t'\nG\u0004\u0006\u000eNTO\u0018ܥ\u000e5$^FN&{~\f\u0012QB\u000bA }\u0019J\u0010\r!\u0016W\u0000Eh\\\u0001JeP3\u0017#\f\u0014\u0006]\t$dȔ&\\ۥ\u001a\u0004\n\u0017PY\u0001\t\u00110\fQ7\u000b:YD'TM\u001f\"5urD\u0006݊KDT]F\u001b\u0012@)v04\fV\"\u000f#ɉ@\u0003\u0016%\rK\u001aUktSLp9A\u001cN\u001aP\u0005!\u0001tM\u0012\u000ei$\u0004\u001d)3\b.3[[\u000e-Pm\u0001\b@XSLU\b#e<\u0011\u0019CgS\u0001\"#\\qm`\u0012qJi\u000eE%\u0016*4\u0013m6gDY[(E\u0018FĚcp;SE\u0005\u0015!\n\f\fHCz(=aZR~\u0017am6O\u0001\u001b$ܽ6f\nF\u0002M\b,DqYy\u0014#\u0017rв\u0011\u00034rHP-jOyn:R@y\u0010\f\u0005\t0\u0004zߴiY\u0012ba D)n2wM\u0002!\t\u001e]8Ɂj\u0011\u0015@Z@ń9\u0007#\u0000UD\u0012i/;R,JQh#K\u0016\rTщÀei83T,\u0002%lf2æ\u001b\u0015$Nd.qr\u0014&3\u001dW*\nQ@V\u0000RMEh\u0019%%>,ǊiRi?\u0001[+N\u0005((9m\r,\f7E8[H\u0014U,S@(T\"z06T\u0005\u0018k\u0010OyыSGF:\n\u000emC#襐k&\u00141Սr6EKLkPG&tq\"\u0011&*O$5\u0018\u00134jH\u001aq\f\u0014\t\u0018p(diT7\u001fY*\u0019T2:D#@5t\u000f\u0002\u00012Od.(XS\b!Ĕp\u001a\tia.5xT[9\u0018h倹0-\flT?-84\u001cd \\fr}\u000fD6ͦ1\u000f\"\"\u001fH)\u00106\u0010U\u00018i\u001bK@KEV%;XT\u00056iq[%,\u000fͧݬW\u0016m>Yp\u0015ekijzaE\u0012Q<oA\t9\u0012\u001e\u0003C M\u0015)\t.Tt\u0010r\\L[s2#\u0007}ZКS{LCA\n.D@Sߦ&E3\u001dێM\r.\u0014\fc\u0003`2]HG\u0019v\u0001ə\u0010:hVSFL\n\"dK07ȁ\u001d\u0013K\u001b\u00044פ\u001aߡRbaLRG<@JH*+JrO0r5*\u00167\u0018\u0016\t\n,L\u00190\u0014]\nv؉~w(hg\u0014<Q|\u0013O2Qh\u000280,PF\n\\B\u00192\u0005e\f\u0012E\u001az5\u0015&QKË\u0006\"}\u001ddUmߍ\u0005\u0019\rnQlIEC!$\u001c\nsR{/N#\u0011CyHt,oE9U\u0002(c\\cpf@*VUoS&نs9C7\nm\u0001eŚj@N\u0015G\u0005\u000ecH&RsX\b]k2m;bȽ!Ewi1EMG&\nP\u000247D\u00114\u0012ʹ\u000ea$\u0019p4{$S;\" Z#\u001aLM\u0006\u0018х4@\u0018b\bq\u0014Luqn\u0014\"T\u001ed\t-Y\f(Y2j:p\u0014E0\u000bv;\u001a\u0019\u0014Oe<d׫\u0019HcY!W\u0019Ы\u0002\u0003w\u001f\u0015\f]\u0016ct\u001dn|\u0019hnh\f\u0010(A\u001c\u0016oA%{zjȲ`Q`2T1rPEQf\u0003\u0003&PU\u0002(LtCQ\u0015G3\u0010-[Ӷ\fY8D\u0018<eeV12BMRb\u001b6\u0004@E\u0006DQ5@\u001dM\u0018U\u0013'$y\u0010Q\u0004(Q\fy Qk\u0006pt\u0006\u0005]QuKE%\u001aa1y6Uo,\"Sj4%>`fc\u000f0W(Yp\u0018Plh]jzɒ\u0018h\n\u0001Dd\u0016*\u001aj\t\u001ap\u0016\u001c@,\r\u0003\rro8%\u0006^\u001a֓_\u0018NF\u0000H\u000b2Z_Z߶ V\u0018\u0003a\u0002T*bòMX%>UjSyQ4\u001eu$Gtl\\\u0013QyGS\u0015`@G#\u0011?<\u0003 \"\u0005Y\u0007\r1) ^Y$\u0002Lf[31#;[b HR\u0018,?/FqɈ`\rX\b\tڈ465\u0001E\u001dյuH\u0001Ƒzoƅ}M4״\ft QLn!\u0005E4 N4C#MB̃FֿQs7\u000ee\u0004\u0010\u0004;ц\u0003,S0\u0010\u0011VVMzN\u0016k&mg\u0006D0H}lu<+\u0004\u0013'3ׂ\u00040\u0016)\u0002\u0004ضc0T\rS/\u0015 :^6aWfp`D\u001a8\u00109&\u001aӨ\\\tS\u0013\u001dM`.R.3AUڢQ}\u000e\u0014J\u0010\u0019\u0014\r6r)\u001ac9rb`RM@$\u000f3#X.AB5>:\u001e}L9Ua\u0001j\u000eP\u001d\u0011a˴)::CXbnX铗G#\u001aX+\u000410T8&QD4{$Yip@vwe`KH8)Qi舆(kJ\u0019$eQk}N\nDt\u001cm\u0003Ȱ\u00100,ߣ\u001d-t\u00179\\\\riflMh;\u001bj\u0000r4,[E\u0016Q\b\u000em|\u0012M\u001fh(j\u001b_)XJ(`MQe\u0010\u0003P\u0013oj\u0002#M\u001fD+F\u0019!F2D\f\u0015\u001ddt\u0006\u0016R\u001d\u0011\u0011=e\u0018@f(2\u0012\u0018m̑\u001aOIƱTL\"ޟUQ\u0010\u0001E&@\b$R鑥Z\u0004ho\u000b6(ÎDZK\\J,F\u0001u]C\f\u0011 K\u0003\u001d25xɧq$z\u0019ɜ\u000e}rjm\n\t\u0013\u0007EDg\u0000T7,J[Ps\u0011ޑ88Gh\u001c_qn\u0018\u000e\\R\u001aܻ\u0011\u001dI\u001aU()&ks$So\u0004uFo|!\u0005l\u001aY@Ebaem|H\u00038\u001cY\u0003rÝ\u001bfA\u0000\u00103\u0000DAۆ1\u001atJ{\u000es4}\n9:ǧ$DG\"s\"s\f\u00010\f\u0010&i`\u0011.1:4\u000f̶\u0004\nu^\u001cQDqv,\u0001S\nk\\YSE\\oL]D\t\u0004\u0018l0DKW\u001dku8ފ3\u0003jo\u0010I\u0010:\u0014!\u0010\t6DU\u001bPhCnSc[\u0013AJ-\u000e%z6\u0005iѥ!O\u0013lP\u0007\u0017a4Ww\u0012\u0015غc)6.d:庥Tڴfg3~z( \u0007|!^:4ޣ\nm\f`@čf͐[i\u0010[6ņ%ڴ_S{<&ԑ\u001eLl\u0016o\u0015FEHV\u001d\u0007X.v\tR%hMrG3bь\u001c_郑\"%݈\u001aXARQmPh]\u00188Ln2N(\u0017Sd\u001c҈8/]Rs\u001aq-$T@,W\u0003H7n\u001b%DSIъ\"cdu0-I'S3lU\u00106Ҏ\u0018P\\,9jۦYf\u0007A]$K4H>/i$݂6Tn/hX4\u0003\u000e\u0002\u001d\u0015[Ҍ\u0012+BH\nQ\u0018Y$I`a1\"}Z1\u0003\u0001bW\r\\s\u0006I^*f=Ѵ\u001e<^\u001el\u0003j6\\ \u001a\u0003憃\u0012&zk+\f*\u000ean=b$Mdq$\u0014CakQQ\u0000U\u0011Al\bnb\n%\u0014kV\"S\nۋfW+DJy1\fnyBC\u0002>F5G\u0000\u0016 8t.Հh\u000b>6\u0012\u000b\rV+U?\u0016d,jG\u001dTk<a8\u0014׸6Qu[sTCT\u0016B\tk\bV7T9SB>gkৄ=-@b*\u0011\u0019:4uhJ\u0006}H\u0016}0\u001dQ)rT+&jj\u0001Ak@\u0018kN\t- 7Qb3\tcr\rT5\ru\rT\u0018[e\u0012i7fD\u0005\"&u\u001eI\u0013\u0000\t\u0010.T\u001cQaQ\u000b\u0001K\u0014,:>Q4fnMx=\u0010\u0005WQ4@\u0014b\u0002K35!ZM\\)b~b5TĿ:\u001f~\u0016,WP\u00150r\u0017FA0l\u0002\bMjXףG\u001dzJq\u0011&*O\u001e\u000617\u0002\u001cʅ\u001a\u0012\\\u0017XX1)\\FZbͪ<?j={)z\u0015IB\u0010,9\t6k\u001a&5eY\u001d\u00003(9]\u0004\u0004rK@E&\\S7mt\u0000\u000bD\u0016\u000b\u0002\u0002H\u00169\u0010\u001d)\u000e6 6\"X-3ЪXK(fA\u0018#K\u0014Hr\u0010EG&M \u0000q\t\u0001\u001c\u0018#:*hy]\"^\u0007PE<\u000e*U\u001cT!@\u0015\u0002\u000b!J\u00113\u0001a\n\tTC\u001ef\u0014n檿o;u95f1\\ˠ;?*\u0017_\u000e\u0013\u0007\u0014`6\u0010>\u0004M:Fs]&C`1N$PA)M+:ʿL7CҘ&Mr\u0015@\u001bӘ:\u00181HƸYP6ݧ9-V\r\u0015\u001aI1!\u0017j֩b\u0000MN \\qP][ӈ\u0002\t)\u001dA[LBΩJ>\u0003=hڈ9\u0004Mi9}\u001b\u000b>)W\u0013:\u0004:#\u001aZ6}\t:A\u0012\u0004\u001d'Ay\u0014t\u0012GQ\u0005*Z0 '\u0000ŵ\rfc\u0012 d$[!I)5Χu[\u0013]\u000f\u0001Tt*ZBn<Ywm$^bd]=\u0017\u0015.jF \u0016*W\u0014g\u0003M\u0003e0,.i[O&3\u001aS9{B\u0005Kh\u0000нv\u001fr\u0001\u001cdZaR\r-\f\u000b,Sâ\u001c\u000eWʌZPWOwƭz*Y065C7Ck6%m(\\h\u000eJ4\u0017q\b2\u001d[%:@xF\u0005ygYȳJuf8QE\u0017rTn\n \u0006\u001cW\u001adn?:Rv\u0000.B\u0001y\b*EMJA18eC\u0007`v\\\u0013\t}nK\u00016d!)O\u0016s\u0007\u00140UA\\Q\u00158R\fUb]\u001c,r\u000b柅~#j?%m4f٦j@Q\fp\u0019\f j\u0018\u0010QGJK\u0002&\"UHp68YSџMU-ĝK\u001b8Pԛ\u0002,fkܦ,\u0011bDމ\u0012H\\;R\u0007J\u001d]\u000e3T@\u0011\u0002qP\u001b\u0018X9.7\u001cuBJ1\u0018ʈGT\u0002%\n\"p\u0011&n8\u001a25ĐkAx\u000fש!\u0005E\u001b\u001aYfhͶ]\u0018km\u001eWq\tm.\u0010׈E\u0007E_=S|\u0017<#k\u001eC{T#cqͣp͵u`\u0005>\u0017l\u000f2k}ce\u000bX|\u001f)#o\u0015j\tu\u0002q2\u0000X54\u001b.a%o<&(7$\u0018Q\u0011&$@bk:0-\u0011as\r\u0002,\u0016CUJ|yc\u0000L\td[\u0006&{k\u000519\u0018UL19:f\u0006CE#]?ds7TB\u0019%ƣ=\u001b&Mb`6N\f\u0011th#\u0007fD\u0001.\u0003b@\u001d\u0006LhbUf\u001bjA>:6\u0014.H\u001bM\u0019Y@]6PrT\u0010K\fT\u0007P\f\u00052\"\tF<\u001a,\u0003%#\u001bF<\u000e1\u00102-\u00060\u0004prLL#CL\u001cRJy\u001ey/lKQb\r\u001dUpéq8Q\twF-p@[ź*PNliUe9anV{?\"ml7&\r9ޠ\r\u001coUޫ7p+Έv쉓Fe9:6VZ]Vގ~']5\u000fp|]\u001f6kV\u001fM/A;4g9\u000b֪W~\u000f^Cw;K~oh\u001a?&}<|iY`7+ӅH=\u001a*VZis)<\u0015=\u00030A^^opC}!c\u0001\u001a\u001f5o\r\\\u0015&9<7lTZoO\rmVOk#\u0017\u0016o_+\u00103.\u0018e\u0013~:\u0015GqnƯ^߬Ú\u001c?|A:*;\u0017Y\u0014m֞[\u0002\u0006f7\u0012|h7~awJ{Rw;lq\"3|}qK\u0013i,\u001f`f\u0010\u00196<Ii{\u001b\u0019\u0017ms%\u001f78a\u0014Y\u001d^w\u001b.\u0001܊\u00172pOO\\\u0006V\u001cm\u0006/Hrѻ\u0011i}p^_Vv=݀\u0006\u001f\u001a~\\\r؛:˗\u0007EGKNx5\u0010\u0015\u00037\u0016{\u0016hE\u000e(N\u0018pvxlxo\u0018u\u0007\\ႴY۬teVV8cXn70/67\"'\u001e,>ɚ1\u0003Z\u0007oJݎ\u0012hE\u000f)rNS7ekj.-ٽ1xm]wz\u0002\n\u0013\u0007 \u0006m\u000e5nbۜ?Hk\n;*me8+\u0017L\u0012\u000b<A2[k/;Fӭoĩ6xt\u0019Y\u000e\u0010-6?b<SǷZq?7{Ll\t\u001fm\u000e|40\\@\u001eY;\f\u001e`16{.c-qhJ]q/Ig\u001b&͠J\u001b\u0003\u0007n+*\u0015ů\u001ed\u001cË\u001f->7ߥq%ަV܉6\u001arw\u001a\rڶET=\r4aO\u001fJQzจfDSD\u0016%2et\u00144V9?W\u0003uA܎\u0019lVW\n_`nJQYE\u0000*5\u0012cP0bLq$C\u0017\t\u0004UX~_\u0019\u0017P|?+KK!\\f/!6\u0012nS\u0013{G\u0012>Xo\n9H\u0005Ԗ!2M\nz\u0012Q5VO^eO\r\u0001K?\u0005S@k>w|<~ˬ\u001f.o?Ώ3.\u001d\u0011_\u000bT&lQ逸4se۵V;f6So%כU$L\u001a#\u0013L\u001ce*˼\u0019\u001b5{.)\u0016U\u0013\u0005\n'\u0010X!\u0001Zj\nZ*Z5L!OY@4 2S\u00013\"@7\f˲n\\8)2Gr.Gj#{$>ծT3,q'?]$IP\u0016Ys\\\u0007rc\u0019\u0019iVb\u0013ʢ,<ipS\u0001:1\u0012\u001c\u0000%n܈H\u0017\u001b\u0018x:\nk:\u0007\u0013d\u000b\u0017B\u0010\u0003C\b\u0011ЀJ\nd]O\u001b|X\u0004΅\u001d~r\\xQ1}p\u0013]M9\u0015\u0012GpHljykTrz\u0016C\u001f㛇'Ry1.ZsƯw\u001a)Z}g;Wj^0h\u0003SB^bSz\u0019\"A\u0014\u0004BHia\u0016\u0017 ?\u0003\u0012B%jSK\u001cNBx {\u001f\u000f\\`%\u0017}i\u0018\u0012u\u0007iҿhf/{\u0019Xo<ՂaD;Z29\u0010(I\u0003WKϠ(\u000b~'A\u001f\bX,HO\u000f:`DI\u001fNt\u0003IO\u000fr)\"\u0019\u0003^+\re$\fZ'\u001d+azT\u000ekn=(]5#\u0016;0Ĵ;{O^i+3\u0015IcU趈\u0014m\u0005\"E)jVlsW/\\t&\u001bo[4ΥY5\u000b\u0010\u0005\\l\u001fV^8\u000b#ᜌӖS8\u001fĿǯ[ސgx\r~GqQPT,{\\TB\u0013-z_c\u0019o\u00106\u001bxW)\u001b\u0017Fb{x~\u0011;x^}\u0018\u001a?w۟\u001aזo\u0010\u00058v\bHpY\u0012w-6Tjig\u000fR6aX[v'd*}\u0011/2\"\u000fqݛ\n[bw۝6\u0014\u0012u`0\u001079\u0017mq\u001d\u001d\u001e!qKlsu\u0005Gm@\u0004\r~\u00131_ys\u0006QOz^\u0005\u001dMo\u0011Ǖ#u\"^rS\\c7SɈO+~7`\u001dĴ\u0015v\u001ew\u001aT3΢^e\n+p\u001c\t\u000b\u0003H{?\u0019)\u0018l\u001fxb\u00145\\r/y{.\u0013\t\u001cQ\u0005v\u001b\u001fi\u0010rڑw^@\u0003Sk6G\n˸5+\u001f\u0013K\b|#V½s\u0012{Zfޏ\tVlOqg5\u001f]T?¥-w`\t\u0011\u0003Kmd+eMo\bYQWLVf~}\u0001\u001e}i</75k֔vn\t5S_x\u0013\fثط]ZjE:\u0000\u0017\u0010^o3&Iǹ+)\u0013\u00197@I\nCرi{a5UfNr>\u00065GD̀\u0001)%-&\u001bI_T\u00109^\u0000(b͡Hhebы5<!\u0003\\\u0005N?\u001b\b%rZg\u0019\t4\u0014q%T[mۿ,gX{\u001d\u0017yA\u001eedZ%y}\u00072Wc}\u0011Bl`[szzMjUYƼ)O[\\ vk|n>fVO;;?\u000f+߭t\u00066~΄ic\u000e\u0019p\u0017\u000f\u0018\u001f߮\f~S,\u000b.̋\u0000\\~R\u000f'o-pq|y\u0004\u000eƣ֘\u001fv)S^bb\u0011W&\u0002\u001b8?\u001es\u0007%orh;L{.i?\u001bk\u0005,\"O_?*?|ê~q׃tǅk\u0010εt67OgM\\]\u0016ף\rmvriL'Ԇy%<yW\u000eVߟoԝ)t|l\u0003~nΔ󾻳p~;>~{\u001b-l~Õ)>M\u0013\u0013\u0004 rb\u000eP3\u0016&f\u000ef\u000ejKα:|yaONW^T6VOŻ\u0002R=Fu>\u0015ْV\u001a\u000b[?Onn?0ei+{\u0005V^ˋS\u001b糟vMd\u001fn+_Z\u000b+dOjݏڽ5܇\u0003gN/\u001en?}ZryU,~\u0015:3Kk{U<A>7O^wh\u0015MA{w%~/?׺$k\u000ekn.\u001c\u001fN\\*[3+x\f>Z|[9R\u001bS?\u000f}]\u0015UNlVN\u0016rBC;inMWkb\tmN,~[\u0000+w\u0013\u001f\u0018:\u0016t؞\u0000G\u0011ߒ`;Жp\bw?O`Y]vXG3\u0012\u001fg ٙ\u0005>})JB{c=Os{?_btq_myC⩺\\h˄H:g?Hd?\u0018b7Ȟyr<{u\u00196^\u001d#0en\" 8k\u0013s\u000e\\\u00007\u001aCֽ\nW>漾fVf&f\u000f2:X^8ƜsBXXPQ\u0010ғmbF=\\Y^ٻ84eS9Lsfy\u001f\u0011|1tcwbib_|bUݚ\u0000X\b\u0005%X\u000bz~NN0Yûk/\u000fAoxn\u001cf1I|sb+|ES17\u000b?M^V6~ژ8\u0017G#\u0017s\u001bWWsUw*B2\u0018|\u001axq:%\u000eH\u001fTAŵ}\u0016nvYV\u001fwZm5\u0015rU4m//~S'\u0005MT\u0013%0k}'qVLg&<qwmK\u0000\"(i\u0003\u001a՛ƛLkvވsyzΚxu\u0013>Iګ>5uL/tvopoK\u0012ɽ_d\n\\ 2?Mg\u0019&}\tW\u00075>@7\u0001PL|>;\u001b!ҼYyf:\r}\\:?HW^\u0006Y{\u0017ڟqp8~\u0006Wf?\blwO3[?nk4:ob7\u000by~av\nݵY˛j¬Ņ~p\u0011ɽוY\u0012ge\u001b_\u0016J8\u0016.\f\u001c׽uccBшzblwf\u0007sY4?^h6î\u0016;:UtY*h\u0013xi{3aևyxg=\u0006\u000e[j*hsݳǃY\u001ddr7+&ݛ\u0013TOze41i(\u001bqi7?nn\u001e8f6aG\u0015~r5ݴvϾ<\u0010;Y\u0017gf<\u0002q\u000f>})l7\u001f6[۱\u0002z¬`\fx\n\u0003N̳|}PŬ\u0003eju\u0013s3:υάBV!E2\u0003O4ob<6w\u0010uz>\u0012AAq<8Y7Z\u0003Znzz]\u001c\u0017\u001frzqueP^#`g\u0015x\u00137+v?~]\u000eͪ\u001d\\o}ͪ_:Ҭ\u0007OA\u001d`L޵\u001e\ntfpTj6Vz)[d(t\u0013<|\\l\u001aQ\u0004tvb鰷4akzG5FY5؛FћKCJ\u0007_kM\u0003-6Akߌ\u001eLl|9\u000fW\u000fZ=O\u0016\u0017Og\u001bk\u000e=h܀دoh~nҠ=jF//k\u0016\u0001Os7۟n7\u0012p;ݬl%`i[z\u001c\u0007N7~}Wzv׻_oJk\u0005\u001a9uH￟w꘿~_x]C{}\u00151_w䒱\u0017Wvwמ/\u000e'\u000eWfnl=积\u0013]\u001e+:uMu%=Oo;\u000f\\\u0003\r\u0016.x:1\u0012b\"uzOUoVN\u001b;;9p\u001a\u0014f_xn;\u0018jyE[+G;Srg}򊀉ws/$wif&wkYJe\u0010ӝ}{\u0017?ٚ\u0002gff\n~>\u0007S$ߞ\bW\u0016צY\u00015wp՗+6ۛ18M;\r12շ\n:uݨ>tgݯf;YjNg{W[_\u0013:}\u001c\u0013\u000fP\u0012\nWW{AGOv)n̺\u000fYN}۫or\u0003K=\u001f279\u0012I\"\u001a0Z7\u0015y\"\u0018oK\t ±U/j&r\u0005\"\u000b{_JUDJ\u0012gU\u001e]ַc_)>~M\u0002d_xs(.\u0010ޮ6+ƉW\u0016{:W`_X\u0002G7Y\u0013\u001f\u000bD\u000fY\u0018+{41׳㛸וi?HQaDnmh#\u0007k\u001f\u001f\u00138hj%\u0018\u0013u>lvbs#Dw\u0018J\u001bb\u000fK\u001f\u000fQO\u0005Ƌ51E_x9\u0005\n[r#F?\t\u000f\u001f\u001f\u0004!\u00073×rvD bH(X7k9̇\u000fz:\u000f ?v\u0003\u001b+µ\u000f\u001fKutzqH\u0013y;tZya;\u001f\u000f~yatM²v\u001f##םO]L;&@O\u000e'w0\u001c~Ƚ82\u0006i]]#ҋ\u000ef1a\u0012{h٣-\rs{~\u001b/{R& #\u0010Ո?\u0011Aħ^jfݾRȋu\u0007-:$g\u0019|Ki<9>/\u001fs|7\u0013IB<=Pq\u001c{_!7\u0007\"&tܐ/τ=J߲5+\u000bYvXz5\ngr㙎B%Ί=\u000eR\u00186OɊ\u001bJ.\u001fhLVkf\u0000j\fpi`=\u0011<L >-ӥK\u0010t\u000f:m8GgC׾-\u0010dX$F[ښ)ąAw{\r8,,\u0001/߸R뮕|SRӬ>\"6(\u001czw\u0011=(z5'wF\rgk.9xy\u0014rď\u0000$/k*Q{ɗNîGOu:ژa=4\t2F\u000b2t-{#B\u0002b7\u0005Wa3ZX\u0014\u001b\u001fʝ}Wޡ\ra\u000f8C\u0013\u0002hR(^n,b[w?\u0012ER\u001e [h\u00134u\u0001\u0010ʁ\u0013\u001ezu:Y\n{\u001e6N'\u001e2z|\"N\u000eH35<-gJ耡,\u0010ZIB\\@,FޫI\\IO\u001e\u0004\u0002ǂeW\u0012b\u0005@y;^aZ\u001e{&j8R0Y/8\u0003\u001eL̐\u0010[B$Q~\u001df\"ik\nQ|YRDaD\u0014$\u0005dDCYQЏ\u000b$\u001e|{q6]o}0 cG/N\u001b-lڋLjHsfW\n(\u0019\u001f\u000f}^adJ89x^af_\u001ed#\u0013ݸ4@edC\u0002(\u0015s#? \u0011L\u000e͡Y%+#e4kN\u000b(o\u0018=Sb!IF\u0011.,p\"w ::z2\u0002hh$!s\u001aۉ\u0013\ngل-툥_?&\u0001i\u001c-\"Ƿ~>-GLW5\u001eGk\u0011ԋ|8\u000eb<msCBW\u0012ՆIw<nǯ\u0013a]XlK\u001fT`(8\u001eP\u0007ӑ\u0002Yg\u0013|gfl\u0001q@ap@Rf{\\m9@y{w\u0019\u0011\u0014F~>fbQڸ4Cs`\u001e$'S0\u0017?p\u0005\u0017 oŸQz\u00029\u0006Zʿ(o  A\u0011zC-˙\u001cr\u001cUygEt\u0000~|oM3\u0013kKy5)?6^\u0012\u0004\u0003it~6߹gi<k)/\u0012i##nM\"x/F\u001bV}O>Z\tҭ!\u0005Ļ~\u00014x\u0006\u0013*H71J@\u000e,W\\oD奾{P[m1Y)\u0002\u0012kt:,#<\f1r\u001f\u000ecQT϶n߄\u0013%nl\u0000\u001f-͟0M++q\u001b\u0012\u001e؂r{\u00056QܽHh({bnw8\"\u0006MkJG\u001e3槥G:\u0018Ut$ylbSS(r_棕e?Sq&33jN(\u0003^E\u0007*#9\u001b\b/\u0014\u000b\u0014֏h =\u000e_?~[Gd s+\u001fJ\u001eRyY\u000e\u0007Id5t}Lz㎄x+'-FKd\"󧦔\u0011\u001c4)rjހ<ip\tb.5_~Բd5nA&FdRJ\u000fo݃Ap һp\ne\u0012\u0016\u0018\f&ĵo{9\u0015ơãI)$1>\\0%th3Rg\u0001J\rC%{V+-o8x-fI'%\\{b*MSO>\\xgnK\u000f9\u0000~y<Qf~&Ŵ!J\u001f]ZV',*\u00125nEuˉ'jba^<z8\u0017\u001fݞ\u0000OW\u001a<nl0s\u0003i\u0001>V\u0010Br.\u0011|\bVqwz/3\u0016Yi/\u000b\u001f>MS\u0010\u0017i~b\u0015L\u0010\u000b\u0005\u001cqT\b!\u0019\u0001KCB{;t\u001eDa\u001fԳIHMԸu2oqa'IIu\u001f~\f{k\u00114`b+aVrK&aP\u0007\u0005zx\u0000$\u0005WO$FGq\u0017o?Z\u0012B6\r!9\u0005g΂W \n\b\u0015պ̤Y\u001ff]AiW2Ⱦ(³44\f*Q#\u000e{\u0004tȾ\u0004flwH!x<|LA\nĒ7k\u00157\u0011xic\u001dj\"4-r\u001d%r鷇^&k=nF@\u0000`ｙl\u0013fgm¹\u000e<sbOP\tL48e'\u000fn\u0013o/=)Z67b\f⇝\u0010\u0004{&\u001eUF\u001aqQ@\u000bi\u0018G\n25'w\u0006;\u001c\b\"O\"C\u00075H\u001bO~\u0014)\u0018~H[V\u0016 yM\\Uyz()v\u000fVұ\u0001X{L?@,\u0019ʹɂQ\u0018\t-e\u0005m\u0005BUᇼ \b4\"!pf$Eq\b\u0010aR\u000f\u0011)\u00029<\\9Bn<lF\u001cYk\"\u0012\u001a\u001a<УD2\u0010t2$lf\u0017zIH\tG\u0010\bKx,B\u001aK\u001b:FrA=hq0ی\u000f-\u0017:в\u001e\u001dZ\u0016,u\u0003\u0010~x8\u0005\u001fyO\u000e'\u0001^ґi\u0019\u0003y ,D) gE.!X%#J{vu\u0018\u0010\u001e#FV1\u0000\u0004\u001d\u0004E\\>\u0013qT\n\u0019\u0012`Ҿ\u0013i\u0014<LHyq\u0005J\u001a\u001d\f\u0019.\u0005G\u001aaqR,̏)kq\u001eʄ\f[)XP`\u0003\u00170g,(\u0019{`E!q13Dl\bQߴÜ\u0014f4$1{ރ\\\u001bO\u0014GʮKe쬣R\u0013M>|ћ\u001b54p4=z\u0013iGGo<v-U(\u001f3#ћdd\u001b>\\IxOX&sM\u001794`q\u0007\fzcYg#\u0003HΡ\bX6\u0002\u0010\u001b\\(!-\u0001qԐ\u001eږ1ũ]K\"o\u001c\u0017Lf\u001b\u001b,\u0005ƕl9y6|s\u001f{\";Df\u0006M\u000eyӯ0Ė$\u0010۾ɑ\u0002:,bO#Φ<İNH\u000b́ȩ]'\\J=]l{\u00057S3\ti!\u0014GLe\u001cMˇ⸔P7Mu\u0013.4?4\u001b%\u0011\u0007|\rTL\u0007mhoaY\u001b%\"BI\u00147$\u001fRMp;3KslVV;u\u001f\\11vbx@CyJݒP\u0016\"H@wZ\u000e>9\u0002\u0007R(.\u0014ČJ؉c\u0018vy̨\u0004`TĤ\u0000FsI\u0004̨i\u0010tbFؑ\u0018h(fTb91|Q\th*\u0006֊cF%\u0000\u001c(\t~\u0019\u000edw7JG>T\u0019edZ\"?7d\u0001i8\fR>,!V\u0007`#)\u0017\u001bh(6ꪵ\\)\u0013ˉ\rˇb60\b1\u001a\u001b-q^\u0003؀`K<cI(4Y\u0019ɻ,\u0017W6\u000e-F{ʨ\t\re?ѬBjp#q\" qEb\u0013.\u0007\u001brx\u0003\r]5\u001fe w@5\u000b``\"hv\u0011\u000f@H/EyD)A~\u001b:\f\u00136|H\u0000ψ3\u0016Qk\nڋmyA$:wCh\bT|[@]!|O\u0001%g\u0015d1ʈX/8odo/\u0001s{9v)2p\u0012\u0015\u001dPࢲXQ6\u0003I\u000eZ6ࢲC˄bEtpQYXE\u0001ll.M׃n\u001e:Wևf\r\u001e--\u001ay]˳{\bU>lT\u0002pхM]\u0016+e\r\u0015bE1pc\u001d@YA,V4o\nEfÊz\u00128\\T\u0016+\u001az#\u000f\u0017k\u001cVԷ\u0005\nEec=La!,V4\nHEfÊ@!,V4p\u0005Eg\u001dĊ\u0006@\u0001,V4\f\r\u0017ͺx]h\n䅋bEpQYh(r\u001f.:scE2!%ᢉyo\u0011T_PI\u0017bED(K`EǤ{zEe]cqN,Vt,E\u000el.^\u0007S\u0014.*\u0015Ӯ\u000bEcv\u0018\u0015-F\r\"XSB\u0010R\u0016.*\u0015-oV3\u0002\u0017Dw۵cnpј\u000f+_eR\u001cY8?v\u0007z\u0016\u0017I\u0007\u0013o\u0004\u001e'}\t}<~\u000e=HzYUV\u0017\u0019y6?vK\b\njjtPl$#\u000b\u0010\u0001\u0019|?)\\{c\u000b,\f\u000et\u0014\u0017\u000e\r\u000bNYmL\u000f\u0019/ۘ;LsEۘvMl'2И6\bic\u0007t,\u0007zu6\u0011\fu2֙mLo\u0004NU6c\u0012\u0012ژЫY(ژFrXvS2ژ{\u000ev2-\u0018cqC4Jicˁd43\u001a^{r\u0007\u0011ȍ\u0013^\u0018(\u0018wc\u001ezw:˾\u001f$Bzl4,13`=\"/W`E=\u0001\bVmieS\u0005?q45\u001cI?)y]\n0Fl)\u0017(-X\u0015k\"kJRM\u0011\u001c\u0011\u000f!!\r}\u001a=A2l\u000bf\u001c(0R/ m8!\u000f?$\u0014<p-_l9G4Ne:3\"\u001aqk\b\u0004SV(dIIK\t5Ͳ\nȭܲkM\u0001a#u>斟as{\u0000C\u0017˨v\f=1\u001fSc\u001b\u0019X\b[V\u0003H2n(\u0007ߜ:7|1YkژY\u0015\u0004fU:?%9Hicf\u0010R`U9\u0007S$S\u0001\u0003~\u0017Z`\bq,\u0011B\u001a)\u000bz<4ܻ\u001ff\u0002I\u0011`x,\n]ȏcT\u0006m`;'f5OX\u0002ì&V\u0002\"X\u0016u.s+@CCn!0g\u0007a)FHh>߀o3-5 ld(E&4\u000fZ^ntT1M@Ã\f\n=ze\u000fT[XlU\u0019Mnp!_AR3p\u0004euK$\u001d[j7e$aj\u0004J-59X\u00181noCk\u0019rH&%Ѥ\nPH9b4\\\u0014g~Ywݮ7-{\"\u0003k\u000fXƾ\u0006,gqIiI\"G#^٘l\rN?C=X\tD%ט|p1\u0014\u0007I:\u0016\u0015Ő\u000eqjxS]\u0000s\tON\u0006*̏Q+P@Y\u001ewGd\u000fQQܔ7Z2.wɛW?S\r\u000b)\"n\u001b?)7ŷ4C\u0017\u001dWS䢃^N)(\\(T+1P\t(18A,9P7qSt7M\rhS3!E9#~'1#wP\u001f%\u001aƩ\u0014\\bњ1\u0011(iɍR\u000fF\u0015-6{zRGK\u0010bF\u0003@\u0016ҍRÑ۴цJVGջ`LrF\u0019g@{Z\u00143'\u001c>R8'\u0018\u0018Ѿ`S]D\u0011\u0015\u0018-aI6\u001d+\u0014\u000b̪sR3Ym/h\u001cg1&t-R5O7\u0010i'(gao\u001b\u0006W~\u0013i\u001d~D+J\r/\u0019rt=d[\u0000\u001e|yE[+G;Srg}sΧҞ޻{s\u001f>95\u001b\fC~u\u001f\u0017EYNl|\u0007WIc\u0001llVB\u0016@\u0018ǚt\u001bZߧ=uVW07# 30kCI+ܫ_]u5\u0004QJSf\u0007f_\u0005M\u0014\u0017\u0002\u000bG) s-O\u0016\u0006|a3QY\u0013h>~[:L \u0006WwuY$\u0001ɾPE${ҰKɐǯWk\u001f\u000f|NBibx\u0005_jWv\u000b$l#Fܬc\u0016?\bK<d־\\^ώoME/\u001e9{wLDiZS7\tb\u001c}~OF:x'zLԢ_zm\u001a}L)2\b,P\u00113rq\u0003)#ɠQ#)y>;G\u0006qƲ\u0000\u0011Yc'-a'\u001a)\u0013~|E\u0016˺g糹@\u001abN8\u0019H\u0010`6:ݲԭKg+w8{\f<{\u0014a&Ku\t$,+G<vⓌJYى\u0001u\u0017\u0013]?v%L|#\u001d%r\u000e4niQ\u001fqћAȃ\u0010ҡ\u0013=Xiؗ,pJhPt!Cg'\nm786-!ۧ\tD9b\u0016GL\u0013D'Ow--l,N\u0007n^df^\\jG0fњ\f\u001a\u0017\u0007\u000e-R¡쾃ypk)2\u0007js\u0018$\u0010GlO`hֱYF]\be4\u0016_b/%H\t\b\u0016?a\"&\n5\u0006Xůf&20QanͲ\u0004C~Z!9\u001f\u0006\u0003=Lp\u0001yh\"0\u00189b{5;ց.J\u0017cgO>@{:?2cd6ǽB$2@C&$3Ró`SeYrǋ=~_\u0002K|Ԧng\"5\u001dd/AD2\\|C\u0001O ;Gk/\u0012IwVT&Rv,?B\bR6\u000e\u0007R\\?E\u0006$R69lW*R6xIX.pyal4r\u001d/î::jE\\a>2m6%\fWx\u001d\u001d\u0018h\u0018DގJj#7\u0017È#{MX\u0012<\u000e\u001d\u000f,\u0003\u000eЅ$D?ٰ6%-\"Wڬ\\4|/q@^\u000b-\u0007\u0010x\u001f@]\u0010P.\u000e8\u001e&uk@)(=G68q\u001c\u0017\u0004\u001b8p8\u0017F/!7y~X\u0000vhlS\ndnZr\u000e\u0005\u000b\u0002\u000fy/a\u0019s0=홁R\u0007$ۖR.wOI\n\u000ezK\u001d<+\u0001KFbsB#,>y왈%O2͍\u00120\u001e\u0012\u0015)ؕ\u001eN\u0004,e{L0@,9PVcqu9;6\u0017®\\r_D·*1.<\u001cPfIW\u0019\u0005\u0006ݨ\b8\u0007',v+\u0006|Zz~@z6x\u000b'Nˇ\u0014jyإ(\u0014.\rM=\u001f\u001d(o\u001b\u0004t\u0019m(!\u000b?1[b 6xD~\u001e\r^$r+J&\fmz\u0007'F\tvSs>:|#Ϗ7\u0012\u001c\u0014ea\u0007\u000eǌCB&~vZ@12J\n\fˏ|9\u001ew@e\u000f^[.\r\u0011\u00156b%r\u0017\n=xp¡Kt\u00008EecZMAǟ&ᣕ\u0012\u0013\u001e\u000f_\"\u001fxlA\u0001L>赝8J5\u001b\u0004!G.!9P>*Itڧ\u000b.\u0011\u000e9W~[\u001ah_qn9\u001a/ʏw+ǂ}\ne`wфDte(*!\u0002%vQNB295d\u001fh)\u0015\u0003we|j5)ޚ\u0005=\u0015l\u0019<?\u001cc\u000fcFrQx\u001cLs |HmјlK\n\u0001H-\u001c}\u0012Ԇj\u000eqIsR7'\r]JPVb\u001e6tD~s.5O\u00135eѾ\u0019LJ\u0004iu%\u0012\\USb\u0019pckl˧mNa?rIΎ7Ojeeܫmt\u001cznӂm4޶G\u0004XE?緽/D\u0004@[C$\u0002\u0015´-_C5\t5\u0007켭~DYr\u001e\u0013g]ظ]h$qӤˉ{{[`4)O݄&~H-C{vW]\u001cڇו\u001b+i?ӺNɳ7z&4,3^оi˯wt\u001d\u0013\b\u0017\u0016\u0001rOu\u0016sf\u00021>3$ u\nD{\u00056\u001fN\u0012gU6\u0019W`\u00023'+ɳ~߹ID8zr6jʬ7E\u0015 ڵ4k#k\u0017Oxpɾ^շH׳Zi^x+RSXJP\blyr&n\\\u0004TR\u0007=\u0010ښ|Ks\u0011]X0\u0011DgޢhY\u001cH\u0004|38KȋGaef7ޫٯ\u0011=%4t>󨒺YF\u001f`b1rG5+t!\u0014e\u0013ڋ\nًJp\u001cju)}YC%ldP,K:W=kMhP=3\u0001,=;xk{o{O\u000fR2S\u0007}\u001fCWq\u001cbq/~\f\rɆJ}&-=\bd,׹[R-U1\u000e7<\u001c\u0002c,P\u0006x,\u0018}I\u0018c+9\u000b,c^X۟\u0018\u000fr\u0011q߀\u000b\u0017\u0018=\u0018KG\u0007S1ƹ\u001b!qY\u001eط܃iIi\u0003t'x\u0013.Ӛ=Nc\u0003`?ysNc\rk\\\rk4Z \u001ep,&Ѱ6G'Ci;ġia\u000e-\u0005\u000e\u0014ه$\u001119XU [LJ\u000e؊\u00079@/Qp=3xMo\u0010)VAI(6=E\u0006|U3!\u0013-1$\u000b_%[\u0002+&7El\"<Z$\u000ekK@H\u0015JC\u0013I% vNE\u0016\u000f\"7{swy|\u0007\u0012r?\u0006Ls;m\fr\u0018L\t\u001aP'X2\u0001ݗB՞/Db\u0014#A\"@Z:L/\u0012!'iYͽ@Il|X\u0002\r~c\u001fo\u001b\u0015=\u0006]s\u0001oZ,\u001c3\u000b\u0004'Gq1XLǢ\u001eO\u0013\u00142qy\u0014ȋ\u0003]Ee)<\u00156KoG4ÆϘd\u001c\u000e\u0013-qprq\u0019G\u000b]N`\"7\u000e\u001a<+\u001beHl\u001c\u001c],qp%G4\u000e.\n\u0014!9xo,.\bU?\u001e\u0003F\nW]\u0010T\u001d\tBf\r\u0016\u0004U8=\u0001sҮp\u0005A]s\"<\\7M\nW-\u0007>D\u0003RAg'Ύ(\u001d=&R\u0004tv$kH\u0000cC7i\u00192O/7\u001f+bRw7GCA\u0010\u000e\u001f\u000ewӮX1n<@7KLWuLL\u001380~)_\tv:`w<`:\u0001;\u001dG\tv\"W\u000fe4\fە\u0004;\u0003v0?m&؉\f@Ie\u0019;s9\r\u0004\f$O\u0011ݴ\u000b-9׊^B\u0006Dߡķ~\\RF\u0004y@%9i$[>\u001eJ\b̛v3LA\u0001D~7=ȗi{#\u0005Y\u0016;{I\u0002F\u0016d_\u0001\n(7P\u0019mٗ\"hD3s\f\u0010\u001fen̝((`OmŨΖl::\u0012(&l޼N1T3\u001cv>eā\u0012l[YeCߖo+01~mے\u0002]@\u0019:\u0018ىOtvJt\u001b6]\u001bZ\"r6߱Yo-x;\u0002`:m=j\u0006\u0003]wJ<M3>-K\u000f\u0016R\u0011\n\u00062\u001b@E_m_h=׷\u0014\u0004v\"BMF\u000b\u000f\u000egn\u0007\f?Q#\u0012 \bY\\(Ilޟ\u000b|azog\u0001m\fZ:_}ԷW\u000e\flsr6Qj+G{uOl\\l?\u001dm\"r{oB/_:͉\u000f3\u0013\"61@@~'?\\\\]m.~Z_\u0015\u000b|{_w^r\u0002\u0000\u001c=7\u0019~\u0017xyr\u0003[/.*\u001dނ9mz\u001e~&\u0005\u001f?\\tOn\u0016<l6wWj\u001dnOd5k\bl,8\u0007_\u000eLw牅\u000fwdrh䤹r67U?\bF5gXv>-tk\u0019L/5Գ\u001cNk~\u001fͽ\u000fp9wXi'F[Co\u0017tR\u0010%[6ͭ\\<6Ɨݯ]b;6O>o~x}Wr2yC8}y;vy2˪H|\u0016e\u001b5lxeuۉ}h{\u0004:\u001fj;#tXf^\u001e~'q/*3\u001e]`|q5w\b&B\u0011|R92K3?t8H\u0013\u001dtDL7W\u0003\u001b|7rZQ;Tf\u0016&u\u0001g6^~y69\u0002%9v.(q6mncb\u001bG?EٍE{[kWE Hd%\u0014&@\u001dR7J/% 3[gE\u001a9\u0000\u001bwkLÀ6.\u0017X\u0011qlN<Y\u0011\u001d\u001d\u000bc\u001f:#\u001bv\u0019RDyGѥ\r\nendstream\rendobj\r22 0 obj\r<</Length 65536>>stream\r\na\u001a\rsi6\u0010KKM=\u0017Ǉ.ջ}r|\f\u000foa׌\u001fw\u0004oZ3ہ\u0007V\\r\u0011[Â_~`݀l\u0011d\u0018\\(Bi=<2\u000e[4tg1h\u001c\u000bFkIRE@\u0001?gK+v:a,JN,x_ؚ͈vik\\ϗ\u0016#\u000e]0/\u0013\u0001k\f\u0011Yng^tr8<D\u000f˨1`\u0015vΤ㭍gߗ*LuƷ\u000b!\u001d\b/TjG\u0017sh%8DέkWB͉\u0014\"_Ç#mi^^Vt\u0018ٔ<;6\u0010^`8GK\t\u001eiˁ_x\bS\u0011#7\nt42$!P\\l|o0#8\u001enjZy`6\u001e(gɲ'{BO\u0007\t\u000ef\t'#3ƀ6\u0013G鹒b̫!|\u0003WF劔儻*#Fݨ\u0011c \bq \u0001WEd,\\rU,\u0007n^\u0011xn4NZle\\k\u0004\u001f\u0016~y+&\u001d\u0007>\u0011B\"IJer\u000bڠɔ?!\u000bO\bDVh6h}\u001atFݒF吂_f\u001akZXM@\nM\b.S&t\u0011wh`4\u0016s\\`ͳ\u0006zGkF)yNىe6QkSxI\u0013Y#\\)\u001bso@!\u0019\u000f\u0006\u0005^\u0019\u0002g[F|Kev-'\u0003q\u001aI^\u000eLi\u0017CԤ\u000b\r\u0003쐂#\nN;?;p\u001bUb\u0016\u0013w \u001cvD\u001a\b)\u0002\u001c/.c\u001fa\nns`\u001dzKr~\u0019\r\u001cb\"\u00068(}\u0005b'hMrd\u0005\u0005NB\f;Ro]IdZc\u001b3~C\u0019[\ts~+\bT+\u000fƛc$8\u0002he[p.\f\u001b=o̓\u0018w\u0004\u0017\n,$=.sIJR%TJ\u000b\"\u0012Nd\u00148~cfwo==R}o5XO\nľ՘\u0005rP\u0005گ][̟A\u0005(oJ\u0017yb\u0001l\u0002?)o΢\u001a\u00029d.p\u0002෢jϽ%٥m'oic\u0011\"F*\n\u0017}\u0015\"oD&\u000754n\u0019oשZEUk+\bb*\n*xE3q(ݵ{t@Ӭ-t9x\u001byESLg|좗&lΜx\u0013n$W_T˰4\u0002\u001cXıʗ9|\u001fK^\u001f3\u0005G{\u001c!I|=ɋy)zS\u0015^\u0007\u0013yXyV|/wo\u001eG_Jz\u0011ODug\\)u\u0006Ob\u0017\u00161ͻ\u0005!c\u0019?ԏ\u001fpjX\u0010i\u001c\\D\bTJ`\u001f\u0019\n\"K9eV~\tU~񕬲\u000e&2Gt&25|[9!/EU\u0001\u000e\f+zrǱKy:RCno`8LrٻEn9O\u0019wMnFt%wws=h;X\u001f[JIS\u000bmC\u00118_jhiCb\u000fZ\u0004\u001bj\u0018]R6b}6#f\fy%M//|36e\u0011y\u0017r&]wG\u000bح\u0001,ɱ[Kދz9\u000bn\n\u0011^lo\r`ܴG\n\u0003x\u0012٨M@3\\23~sp񷤤]⊿D˭<\u0014\tҙԐ(\r:l^!\u000fxKR\u000b<\u001b{E\n#U\\2\to+V@Î\\\u0011p>\u0018\r,>:ʼH3ٽ<c\u0016^쒝W!P'%\u000fK\t>NW`$\u001874B~r?܈q8dg9ikY:a\u0005SF#A3)ZǓY9R5tt\u001f2l7V{aK\fp>2(hξe,'xdAs<7X4\u0018A]Չ?E\u001a#ɓ/hL\u001e\u001evi-F9*\u000e?~T'9?M\u0013|$|Lq2\u000e\u00184L\u0017\u0010(\u0019'Yx\u00146f'K8.\u0011$H*=rrV|04%u|.Mho9T/ܠϼ)yT.GV\"TnAT53]\u000eݴs+Re\\ζ\n\t:+t{>#>\b4\u000b\u0005\u0012@o$rL*\u0015\u0016o%Sܰ7\u0015$O\fv`\u0011\f{YҞDN&x&5Urn\u001aa\u0014\u001c.km;\u001a-\u0007z촖\u000bu(_\u0004\u0018Ttk9U۶CI;oDni96Xըr[\u001bi)jDvk\"ɡ\u0019]W\t϶\ng|;\u0018,cl[ uˑ7k`ޮX\u000eZk\u0017lPt\u001btH|N{\u0007U\u0006u \u0017q\u000b*\bt\u000bI\tR܉na\"]Xډ\u0005g氦\u0018\u001f\u001e(.ocf|TP>cш\r\u001c\u000f`W\u0017\u0015N틮c\rm_YܚcR~Óy\u001c\u001d3o\nV;[nլ@K7}V\u001a3[Jdx{;xQa*Δlqnz\u0012\u001f\u001c]km_\u0014?HZ\u0017h*>\u0005O*9p@\u001f\u0017\u001fE\u000f۶or#t8!-iN:\t=S|IK㷖\u001e)!yٳ}=h+ŘeF{^l\u000f7\u0012ͷ\u000baԞ\u0017;~/|h\u000fFpix\u0002?r]S3\u0003t?KI|r\u0014:+2/0h.զ]_j+V_[֌ЪM+#\u0007$o\u0012t:e\u000fHωϾ@˷@_\"AW\b5&F \u0017\u00199c⷟EF \u001d{P=\u000bq̯ٙG\"dcYSk\u000f{\fF\n#A7M[o*ŪiMH'XD::g\u001e)S\u0017ef#4^5:tf\u001fnZ!yAM#M\u0015US!gM{>wwq9\u0002SW&\u001fJF㿨ۘUʡLU%\u0004\u001dd9\u0014\u0005Tkz;\n}\u000fo\u0015\tirNQ(Y\u0014U\tu\u001eI,q\u0003\u0015AĪ\u0011Rx\u001a\u0014̸%>ߦk\t>SnN㆐\u0018w\u0004V6R]\u001fc\u0005O\u001f}\u000ekV\u0012KmݙV'k$Ί!:xYc\u000bU7HUpTy_'R{z&\"}w뺟{\u001dE:\f`3\u0002\u001bRU6BKj.zUT{Ol9U\u0002\u0016㋫\"=P\u0015qV1c\u001ck3fbٝ'W촛Ux<Љ'T:*i3l;H\u0015x'Z\u001b:1p/Mƭ)]2񄦿yB*\u001cHkE\u0004a̙l\u0014%u?dpVr\u0007;xߤ\"kL\u0003/贌htGF\u0004/\u001cY\u0003~\u0011Dϸ1}\\u,Gq9K\u0004tS\u0016T\u0018#}$b\u0002ىQoyh\u0001\u001fQ,@\\elo\u0016hÏ6cڡ\\YHe\tVAJ卍\u0013Uǚ\"VvZ3e\u0016\u0004\u001fYQ&/ۿW7\fn\u0007_&!ecb\u001e1]ѳ߂ew\"{|_Dm_p\u0006\u0019^A,(Xő:\u0016yX+Ah\u0016OwJ.\u00011oYi)|L\u0014V2v\u0015Cu\u000e\u001f,6*_\u0017X~_Ig7wH@-aZa[\u0004j99|7}h.4|>nuBU\u0011%b\u0019|\"sK(=\u0007J,뽭pߝ⸂ą\u001aw*2S^g^+^_r;m]\u000f8 v@v2A+yd%\u0002V@\u0017\u001b\t6d\n8%Ƞ}\t~='uװ\u0013\u000eOَ\u0019\bG:\u0006\u0017\u0017O\u001f#\u0002\u000fn6ܡ\u001c\\X\u001dϺs4U3P0\b{zcC9\u001c?\u0012(l\u000e\\`$?ȓUQZGR*QD?W\u0001qH[\u0017ʊ\\Q|\u0018z?\u0003A:d>\u0015p9K-\u0007~+r1w\u000b\u0001PHՁ\u001fgxk\nVAQ!;\b2=)kYMU\u0014\u0015t\u001eer%>@My23\u0002W<>)IL2L[aV\nn\u0001\u0001d􊧀6SF\u000e'G,\u001fÃ\u0013m\u0007KA\u001fq\u00198)#\u001c$ѝy\u000fc\n\u0018%[Wl̀\f۱xU\u001e\u0001(sxb\u000e@F\u0000:Wݾ\u0001\u000f}\u00106\u0006\u0004\nO\u00048\tuS{\u0012f#I/~`\u00029A^ʨ\u0011Wκ'N\"\"\u0007G\u0002g\u001fK<\u001a\nƊ\u0011lp4K@Y۪0c}Á\\Eɯ%V_\u0000E|\fga\u001a><U3\u0015\u00161S0=\b.cbQW\u001a\u0019q^c1߱rLi9\u000e\u000e;}j\\Xe\u001f'iG&SZ\u0004\u0001\u0010|\f\u000eN6r)[\u0006?b\u0018rm28\u0014σ%}ݓE\u001a\u0017\u00114Kg-\u0003n\u001aCz\u0002~\u0007\u000en\u001f썿VRdnwL@[`an\u001f?[+ۨY!e~ƌnqg\u0005O3\u0011o\u001cM5[gs#Rp|\u0015S5vv\u001cK\u0004Hb$,\u0010vpŻ_i<\u0011{+PD(X\u0007SOkd\u0002֕kG;3\b\u0019j:۬\u0014_\u001c[3\"CO_tn?Ϳg_pN8\u000b\u0018Y`M\u0012k%?\u0016b)g\u0012;d4]>Ņ\u000f\rgs^/\u001b\u0003ezέ\\\u0011w%ϋ_]\u00049\u0012Oٙl,rϡK8M>>l8o\t\u001bW\u001c\u0005%}pP2T`\u0019pO^ta=\u0015 <h4M\u0005^դ`\u000fgvED<7ͳi\u0017x֦\u0003.]\u001a)7g\u0016x\u0002ęH\u00056\u001b\"r(M*v\u000fi\u0005\"y$bכ\u0013Ő׷)~oKYkal2\r{\u0012.ۺ!ށC]Է!#uw\nq\\d\u0014\u00032;0a\f\r)ev\tc|6pD\u001cK/\u0019v`&\u0004\u0002x,=}\u0014ORPsb~&K\u0018%$$G߂)J)8\u0011i\n9a\u001f\u0018H\u0017}[M%ٕkb\u0007@,@=t͉\r(\fcesk\u0006fn>y<\u0005ffb4/J^8rdE\u0000f  QQV&Y?(H=vT #99!}\u0006K\u0012'\fAfg\u0014\"\t>\"f\u000fS^ϳ\u000by/嵵vZMRk@`I\tR\u0007L\r)4\u001d)\u0011H\b\u001cP @,sp!_I,'\u00056o6f\u0011pn}aұ$&\u001bHKBdO\u00112Y1LszH\u001feʋY\u001e%<QaŤ\br9F1޺x\u001cqqhG\u00176\u001d\u0010<J\rDf8{Z&j&ǈgx`&~yF\u000eD\u0012(3iYfSf\t\u001b\b\u001e_>6o47\rșl?+eZeYuSw{\u0014C3\u0005\u0018[13'e@:Yt\u000b\feYÍ\u0019f&'Zx#\u0003n#˼^*\u0010\"^\t!\u0006\u000egkEX_ZFq\b\u001f'cqS3=3n@\u001eq\u000f=%WOn \u000b0LH̬\u001dt>NBV8\u0013884l\u0018>גZ/8S!\tە,vdqlf\"ЎK\b\u0001O\bgr\u0003HO \u0007ߑ0\b)D%A\u000e\u0000į[@1M\u001ct\u0006^\u000fau?\u0019>љ\u000e󦁃W\fI[%^:?p`\u0019NB\u0017^g\u000e,\u0012~\u000fh\u0005:\u0005k4\"7\u000f*Sf\u0013\"7L@\u0006\u0015l\u0012LkG!\u0010#ZQ\u0006k]F\u001c\u0017\u0005`k\u0000:FΤ/\bi1\re\u0005\bbPpOJ@\u001a_l^Ckz& \u0011o}Ӗ0\u0002|r\u000e\u001c]`n}\u001a\u0001,{MSY\u000f-I.\u0012¢yc\u001fBČ\u0011\\D\u0010\u0004MҬ0%&*ƤB,f#\u0016~nzv\u0011@\u0003m\u0000~Z[\u000f|xf\u001bh(\u0015Iz\u001a8* \u000f&o)'S/sL-6ej@M%כl\u0006*cag8*\f&{.AKOS\u0015\u000bhy};Vg2708>T<%M1:Z\u0004ɋ\u0016\u001fLh<칋,(lɼyC}\u001e\u0015!q\u000e|);@Ѥd--\u001c\u0003[N!yUXLX(\u0007ƚ\u0004pcwBtw#i^\u0016b\u00000}~?5\u0001O^r~09[ǫ\u0012ds>OR\u0018\u001f5 \u0002c\t\u000fX\u0016\u0015<\u0000I\u0011l)aXp\u0006\u00103Gw\u0017\u0013\u000e64\u001aVk\u001eN#\u0004X3YS\u001eXĊz\u0001>֊T\u0004mD\u0000\u000f\t\u001af? h9!8K9\tTUD<\u0010_\u0014\u0011d\u00113\u00102PBճ)cNUЙ⃏i;_\tP\u0019@\u0005ı$L:H<,L\u0015`\tEvVhJLFs Ad\u000e{\u001e΀G ;|fV7of`g=\u0013I\u001f\u0016\u0007*@\u000bP0\u001aohZe%m*:)\bGuƮX\u0018\u0016_4ܖrp\u0004'1X\u001a!67|{\u000bW$U\u0002-fWD>\u0007@!ΔE\na\u0006Q%J/\"\r/\u001f5rL\u0010\u0017\u000bX>0.tX0GP\\ȆO?x&jFÒ5E\u0017b֛|F\u001a?Fc$\fm=M\u0004\u001d\u001f)\u000epIM6m)H\u001eٙ\u00175\r(O}\"߹PvXS\u0019;y;6w\u0016b\u001cG9hx\u00112Yz\u001b'\u000e_x\u0010rRpNH.an:>1\"\u0017ta$<7\u0012\u001d;|\u0005\t済>\u0006\u001e\\x\u0004\u001b<\u0015\u0007fq\u0015\u0006(`\u0013\u001dޤd\u001c\u001aQ\u000685\tä\u001bk#\u0004b<b\u0017It3T\u0001M\\ZOW$q\u0010&3W\u001a\u0004|u\nՐϐ\u000et8U\u0014{/\t\u0019)Z0%x\u000bLRVP͙\u0019i\u001f.QAL3TC4I{1S\u0002\u0018=R$\u0018yxb-7ttțܮJ㹘y\u0018EcyG'{\u0018\u00069u\u0013˓ޞܳTo\u0010Rƌ]\r6x~&\fK\u001aDv\u0010\u0003cB\"\b`E\u001eS%\u0003\"M\u0003\u0019F\u0011XI=\u001ar~x7 g|FaMQ \fwRB[CT4-h#v=@L;\u0015I\u0005\u0014ehj?w\b\u00141N2\u0011\u0004b=\u000eȁEyzWͥh,w8\u0015)'\u000ba\u0010@QB|!tt\u001fSNj\rX.I\u0019W0\u0015#b\f%\u0014c#'9\n\u0018\u0004/8d\u00149:'OCC3\bN#DMSa~8E_w]3V3bh\u0011=\u0011L1A^aNHo/8\u001f\u001a]+fݳ\rsDD\u001aD~7-a\u0011@i>R\u001b\u0007'!1j\u0013 \u001b]+HD;\u0007\u0006>͵jI\"ę]s\u001a\u0004$:o*}\u0001FZrqA8vAᵐ>-Q\r\u001f]6jL\u0007HlQȀ\u0006\t/uPW1lP\bM`lȠY\"#\u0003Lb[˒ab\u0002\u001c\u000f\u0005WE)\u0015+ʝśr\u001f@iBĂznO\u000fĲ\u0005KϘET\u0018|~\u0003\u001a\u0007J\u0018&/\ro\tFJ\"y\u000e\u0005\u00158\u0007o\bJ(\u0017ΞJK̚\u0002!C\u0016,\"\u0018\u0006\u000b\u001e'ıKD.Q\u0014&Fw\u001b\u00110e_|>Wy$ #T\u0004L!q͈'\u0012l\u001cmd\u0019\n\\,˵\u0012Ґ\u0004z4H:lz/g0ar~Vi\tgfDl\u001480&~Z0AB1\u0010\u0004\u0018(B\u0017+Ei_ed\u0004=R\f^$˛\u0017[\u0017tm\u000fxQcZ1/\u0001^YUo\rH`]Z\u0002\bx,8k\u0014\u0003\u0010\"4\u0000Pc /~\"l>_\u0000U%\u00067\"&]Ͽ^S2\u000b+IK:v\b\u000bL\u0005(nM\u0018d*g]>0EZ:䎥\u0000\r\u0006 \u00103\u000bafnP;dorl6B,VQܳ\"\"R\b[1-~;l%t\u000f-\u0002ޒ{#t\u000e\u0002\u000369\"ؒ*es\u000bZl\u00123+\u001ctC\\/\u0014\t׈>U\"yo\u0013K$I\f,\u001c\u0001\u001e0W,%뛑]\u0018LϢ\u001dDJH\u001f0\u0006jh(\"\u000bՄ6\u0014\u0001\u0010\u000b73A3\u00114\u001c`\u0015C\u0006\u001dGn0io:\u00151*i\u0014ᵪp4\u0010^\u001dؙ.Jt.~gJeyzdI=\u0003\u0017X\u0017p*vԇr4st󨪄<eeg03E\b_қ@\u001as\u001fH7O\u0016\u000bK\u000f5,V+\f\u0012 \u0007 Ji/'\u0004ٯ51)\u0016GY^H֙L*\t\u001e\u001fA\f?+}M\u001d+ؕ\b\u0002mF&P=u7bRLp|xA{7t\u0013~V䄾KzΞV\u000fA't:!O4\u0011y_ΓγI\u0003QA'\u0001eY\u000b$\f 0t.K^\u001be0\\quɥ:\u0019ju\u0013\u0010\u001aL!}&c-\b\u0005z\u000b\u0019\u0006,e2ѴkZ'e?NRh<`MEWɗ\u0001#9\u0014B2͋PJ\u0016|K\u0003bOs\u0013,?o2\u001fz\u0000S}IEKGZkA]CΡ:E\u0016\u001e\u0005#B!\u00183\u0014ywG:*\u00164X䗧\u0016\u0013H(\u0014aלwWA<DB>[\u001c\u001f(S壂Kg2Ka\u001a:\\l\u001dXW\u0004i.b~\u00046Yݴ̧\u001e\fxL\u0015VV7[;$Y$M泠'\u001fxȆ\u00051˹Ky]\u001bSr5\\K޿k7\u0011'}+1*E\u000eV\u0016\u001d$_\u000e\u0004\u000byh\"?\u0019~4ީ\t{\u001bfBkHuƱys\\Uqň:s_bQwnf\tl)[X|V`At[N\u000b:\nk3լ^S^\u0007J鸈>!V\"x/c\u000b@Qc8 \u00128\u0011kY\u001dV%1R\r\u0003K\u001f9|`s^SP\u001dx\u0017IW\u001bM_X\u001ck\u000f\u001b%ؔ9^\u0000)5\u00177KHt4̜k,L\"LkH(\u0016ŢeJ,^v`z\u0015eF#y0'+@\u001bVhƜ&\u001d\"bEб_י\u00190-YC`2=k\u00010N\u0006P\u000264C\u0004K,U\u0019`^\b'VO\t\n\f#у!1R\u0013QO:E6,fLn\u0006ŴJ(\fK\u0002L\u0010j\nhYg\u0015W1{\f\rg:o\u001dZrĈER̚E`́_\u0012=Z\rl[\u0004,\u00030S$f\u0014\\\f'\"\u001f<p9-`J$\u0005gp3^)!c`R\u0019O\u0001\u0007F\u001e\u001c\tz̀\u001cG\u0010Iөj\u000fsYL.\u0012R1|ȶ5\u001a\u0018z\u000ePFzWu\u0011ߏ (\u0017ދt\u0002\u00148cF\u0015a@\u001c<ͫ|QM&K\u001d\u0006J$nwIOhc\u000b=}Z$\u0013\b0{ѝoq&UT&)3Tk,>]3.\u0010\u0013فF_獔f5fQu\u001b!3oH:gjM`-Qq'ܘv\u000b\niy;\u0013\n(Rgx7M\u0002\u0013\u0007\u00058b.8߾\u0018j:1\u0013ԖxD\u000e\u001f\u0005&G\u001aZ1Ś(rjZ%1ez\u0007En\u000e$\u001c`\u0007%\u0007,\u001c.rjBO4*\u0014TXc\u0003zmKae\b\n\u0011o৒\u0015p#\u0013a\fr2ٯb+x\u0014Ͽ\u0012q(J\u0004md\u0001-pOH7_|q&\u001bJ`5w򼾕ͪ\u0005VAPR,݉EHg\u0005 L\u0013<M\u0017S\flpG`\u000f_/\u0004?^nO\u0013-^a[My>\"\u0017\u0014r]B\u001bQ8\u001d؊Ǩ;6UٕkE\r$\u001dْ9U\u0012_'q!a'LŰB\t\u0016\u0006\u0019g4gV\u0007+E,\nY\u000b~QI!|D$ 3m\u0015\u0012\u0014ǳI)d(1Ln_gn\u001f/*89NÔt\u00076_Ƀ\u001clO\u0011\u0001'G\t'=\u0018D\u0012P;\u0005r\u0019^\u0002YcN\u0019[_I\u0017)J%\u001e\nNG.+ӮLU&U`?x\r1=\u001e(Pk\u0012k\u0000\u001e\u0000܍X\tU -wxr\u0012$`Fq\u001cDmL&7 \u0007p\u0017\u0005\u0017h\u0006'\u0012IE+Z˅v\u0016}x\u0015zn~WJW\u001a\u001dr\u0006>n-6V>*\u0016\u00010z\u0015<?7xӽ\u0011/\u001e0'23\u0005~E\r+@\u001c\u001c\u0005ު\u0019,\u0011V$7DޭJ,L\u00103emI\u000352\u0017<MXO\u001a[&Yð\bgZv9R?\u000fV6?-\u0005O\u0003\u0014:hC CwH\u0018hү\f`6\u00167Jf4\u0011l*\u0014F 9W!@;_/_R2VhNo\u0012hW\u001a^UC\rw΃&%Xiod\u0018|`RZHԓ$<\r\u0016\u0011\u0002b\u0003sgRxa\u001dX\u0011pJo$Y\u0004Hؔ$R\u0010[g,\\gGy\\\u001fK$Z#QLmXTLvsI\u0016\u001cR\r\\i}!D=uhlO\u0004G{nB-\tL`G$N,v[rS\u0017FOlRvwX9Tyd\"%ˢ\u000f L\u0004*I\u0011?apgw6$*uBl:nx\u0004Oz\u0019\u0018/6%c\b\u000b\u0005\u00108CG2F\u0000G[RSMyh\u000emEg\u000e\n=&\f\u0005\u0012.>\u0003\u001alr.M\\u,h2!ˋ\u0015<O\u0018`Z[X>,\u0018PSS\u00108'%r4U\u0004]k\u001b0\u0001gCb\u0001\u0019Fn\nC\u0017\u0017\u0017X{X,-sv`M\u0017db2\u0019ĸ>'\\}weǱ 7t϶;֣\\!WcLL!͔ls0Tj\u0001h)d\u0019о0.B7\u0004c\u001c|k{\u0001P\u0010\u0014l)y6\t5\u0005kݳ)cO1d\u0002t(7\u0015&0,N\u001a\u001fWo\u0011\u0016F\u0007J{Bƴ=\u0001 Y@\u000f\r\u0012C\u000bc;D'\u001d{wB= 9\u000e2J=L__\u001b{JM\u0014s8}Ħ\u001f/x=\u001fL1I\u00075j\nw<\u0004\u000eLå\u0019#\u001aK\u00047G\u0019(I[A{|XK\u000e+%B6\nb[\"|Jϑn'\u0012Fc;\u001aG\u001cC\u0013R\bPx\u0000\u001c\u0005\u001b\u0002}\u001f]3d\u0015L\u001fi\u0001'ȤM\nX<0_ڛ%\n\u0015\u001fH&\u0003\u0000(J12j\tvM\u000b\u001eS(<ry/\rCT뵎\u0019os9aC@\u0010\u000f,\u0004ɍ8(X+\u0006&HILг\"\u0014Z\u0010\\}\u0002\u0015\u001a\u001f3L<\tΤO\u000ex}\u0013ArX\u0015q\u0015W<\u0018f%XFY\u001cE/EjS̏e=\u0003<?p\u0007G6RXM4\u0005K[HZ+{\u000fey◲:gxU6Mis-J\u001an_ }kW{bX\u0015(\u0002k#k\u0000\u0001-}cҔe\u0016ƙܸ5}կo~iZ lsZSf\u001aۺ+ww\u0004:\u0012&[|Qq=Bʿ\u000e]\u0014͏w\u00132Cf)F`n_\u001c1\u0018nM\u00104˛ƻs\u00038%&\fx;\f6i_h\u0019>4f|{\u000f\u001e\u0004S}_m\u0002,g{\u0013\u001cӭ1}z>Է\u0001=\u0014a\u0011ۄ\u000f_n<L7q\u000fd޾}W\u000fk&7G\u0000GjzO\u000fPN\u0018J&h\u001c~\t=a۝\u001c{]\u000b1ڿ\u0005jC\u0012\"R(\u001a+\u0017\u0004b\u001f\u001f=?z{|\u0015odxn6*7/\tܜڌ샘u[\u0017\b;\u0017M;sݯ.P\u001bm.3ަ^b\\zl-^yA%4}.^`[N^c(i\u0017P$5ڳRR?%%Ŷ]F򃥊\u000bȔ5jM\u0015\"j\u001dvՃ>濯NS\u001bϟӋ\u0018lɷi\u0017?xyl(5f:#p\"֛Եs毛\u000bh\f/Ҟn\u0012ڟCۜ^5Eko\u0011\u001bl\u000f;nnAIԞ9짡l_|4?\u000eӝ|o\u0006\u0017\u0016CJ\fM;+\u0019ZwV2d\u001e$m1Yb:X6<E\u000594Ɔ١6U.9ze&n[OyDjm\u0013S6\u0015Kҝ\u0012\\H=ŢO\u001a\u0015Y~kBZI\\MS\u0005V#G\u000e\bN ?ؙ0́:HޞSlROr\"+\tތ\u001ek?f=1žQ~B\u0013NI<1\u001c SutɹI,>\u001bk`ɇ鄲k!JڽI\u0018Kb\u000bo}ŬEWYEV}Z_y_;03*\u0013VChLz5D\n'H\u0005/3\u001evW\u000f\u001b_{<9sn9zR*WK\u001ei1 \u0005o@\u0002}?dg2U㔹>8n:[,Ƌwn/\t@\u001e\u001bh\b\u00182έt]̪\u001b\u001dUꀥfWT`[\u000fv-AG\\O]@\u001eCv{\u001fA\u0001[ֆi\u0013]\u0013.\r\u0015_/OS@#j9rZΧ%b}wQXL1CpK\f5O1xc\u001c\u0018\u0015ǴiЄ0e|LV\u0015NQEl悭eV\u0017B6ߡ<|k-nj\u000bKXwK|\u001f\t'\u0017.<\u000f\u0004ъ\u000f\u000b^oʹ\u0001\u000e>:u-\u0012ٕgM[0\u000fi3GG\u0012dS\u0011[3\t8\u001f,{\u001eSuh|=#$F\u001a\u0012}N\fD\u0012SFEIu)Ǯ|V$9\u001cAuE6ĸ9eڼWMC8;N_-\u001a-/,U\nLbO5\u000bLeWn\rBRD\u001b\u001aإ\u0017[8\u0013)~_PK:E_kB``\u0014U\u001b0Ql]nj4x\u0012\u0006oo\t\u00123C\b`\b)\u001e^b/1\u0017\u000b׬\u001eXxUm̋\f\u0004lҡ\\;et\u0018g\n\n\f9\u0017ygQU\u0007ZW\u001f\u001aN]\u0019y5-~W\u000f\"OS<ͥ\u001e\u001d|\u0001d!;\u001c\u00195\u000b\u001a\u001e^(U,\u0016v9ܘM1|d+:e_S'\u0013ŗ.\u000b\r\u001duѣ-\u000fg[\u0017\u0000\u0012¸\u001b<\u0002\u0017Q\u001dب۹\u001e\npߘ2\u0016r\u00178sJyo&Uc\u001bEq9V0F~\u00058ѭ9'~5ԺƦF\u001fIi\u0017kl9#|zfR\u001b\bOr|G1d\u001e\u001f\u001f\u000frd-wr\u0001\u0006W\tSD4\b6\u0018\u0017ea;j\u0004BCt^)\t@3QTH?aCj\u001f\u0017)ꢈNc\u00101NEȑB\u000e<(%Я\u0010|s!p \n'o'2t6M4\u0006gV\u0013O\u001d&,j\u001cnE#7'qn\u0017wsvUIc}yO8<\u0010h\u0016I\u0003\"O5\u001c,\u001em)e\tk=Ų5U\u001c6>:T8\u0012NkX\u001a\u0011ʎ (yf\ndM8]x)(L)R*ʬԁ\u001dX#٩%ְ\u001d|V\u0005QC\u0014\u0017\u0006JK#ѝ\u0011upo9_]פ`ʭ.~o\u000210ڹRփ:\u0015+tR+xW^ j\u001a}8:2\u00151*au\u0010K:\rWTά\u001dQW\u0007oi-\u0013߆ol\u0014r\u001cnԑ7May\u0011`nВn'騷\u0007\u0001\u0010_*\u0019\u0012v\u0014-à\u0012D\u001c\u001b\u000e\u0000\u001d\nL@ÜM4*\u0007zW\u00059\u000b\u001dfl\\q==Q.\u0000Xmծ\u000e0.<z \u000fZ$1R\u00111y\u0002\u0011tl]`\u0000\u0002\u0006.lx\u0001l^c\\\t<\\+\\ˢ-]\u0017G>N]\u0018\u0017sjvR`\u0016+pCH*(=<݈+GG1uc\u0007\f\u0018h\u000ea\u0006:JUZ\r<Cp\u001e\u0003z\u001e\u001a\u00199b4\u0001b\u0003\u0013`#\u0017ҘFm\u0013^\f(C\u000b9U\u0001wy\u001eVb?߂dʠHN\u0010N}'3\u0010ۃ-)G݈Z8\u001fD5\u0010p\u001a~д\u0011\u00028]O?ei\u001b}sYͷ?`\u0017;@iA\u001aPz,C8W\r_<\u0010MQ\u0001\u0013W V)3\u000fofrcZj7H\u000eB\u0019\u000f6?x_)YB\n\u0000M!vw`hsOS\u0015\u0010X]35b{\u001bw) <ET`\u000f.\u001ea;\u00068i\u0018p+\r\t\bSS<\u0003MjQ\u000fدoYmm\u0007\u0017q\n/-3\\TGaqwLԠPCE6+00Ov|.?/si-\u0001V\u0000I_\u001ciEchx\u0000j>ZT~B\u00058}gm\u001f\u0005ЍSa0\u0016^L(O0\bE\u00178@1Zd\fSrW6{I`Z\n\u0018+H\n\\\u0005`MW\u0019iyOrk\u00143\u0005=v։h\u001dD$8{\\jjZ\u0005,\u000bJێMO\u0011\u001f޶g_mG.\u0012f\u0019]Gz#r))m\u0003N%nUs\u0016\u000f͌Ug'ٛ\u001a?6Ӄ\u0006iΤw0wQǴ\u0017\fn \u000eneW}9k\u001bO\u000eqV\u0005n*F5K\u0017Y\u0014u_\u0011cWRTTk+)*U\u0004\u0017+)*\u0012z%EEaHF\u001a[*\u0000TZy*\u001b\u0011_\u000e\u001b\u0016\u0004Aֵm'ľ\fy[\bT>XA6ԻuS-\u000e[D,_b^#g\u0004G{,tƇT]>8s$\f~b橫\b-<-,<NCMkj>S\u000f\u0015ƜTTU\u0015O-\u0013ۆ]LU-\u0002EBu\u001d\u0014:WT\u0015\fA\u0001ԋ^G\bizhTMA\u00141\u000bM!#Ѩt׏s\u0019\u0018b/\u0005V:0vסh\u001f\\\u001a#TM=\u0017~g$f\u000f\u0005ᑆh;h[S\u0003^;E_\nWMI\u0019/DIݧيo\u001dTl1Imb<c!@bƨO-\u0005\u001cKx'\u00136\u001c(U\u001dt\u0013au\nD\nXr\t\u0010\u0019,ෟ\u00014%\u001f\u000bOX\b7\"\u0004<f\u0001;\u0012#Ac_T,\u0007N̎&#wl8g\u0000\u0006@nI7'\u0003\u000bQ4\u001a\u0019w#?SO4|\u000fQ[\\B=\f\u0017:HSM\u0014Fݺ\tGM\u0011]\u00159I&*\"\u001e(80ε\u0013}wsƇY\"zOr#_U%\u001a\u0015^\r\u000e9 %Xf\u0014[\u0000y\u001cbS\u0011\u000b_KrTK\\E3E\u0017~ˌCL\u0013`׋\u001e'\u001b;E+\u001755t>]cF%\u000f\fQ>*Gua\u0003\\S$,ySDiMX\\һ\u0018w\u0005砣*0\u000b\u001f>j\u001ed'W\rIT4Lӵ*`&tal.l\rǰ#|\u001a5\u001cMfR\u0013%?\u0014V.S>;`١\u0000+IMhkdc\u0007!o^tp{_ޟ\u000fe2)j.d\"\u000b@,O+4wB*d\u0019K\u000eAW߃&N\u0017NR\u0010ZMDC\u0003 z&.3Iܲ\"۲\u001fzkSB\\};˲ɚ\u0010L\u0007\u001f\fX\u0007\t8\u000e\u0013\\\rb_Bh\u001eUuB37_S61u\ttB!\u0019Eˎ.G\"azc\u0013\tҪ_\n\u0002\"1A3vƋ٬\u0004夾쿎U8'\"&Q\u001dN\u000fl8\r\u0006X6lDg\n%ŢT\u0011w\u0015ɠ\\\fDؾ4\u000e\u001au\u0014\r\u0004ᵒǆiYzMc\u000b~ePdP\u0012\u000b758~%-\tF@y`Ǝ13д\u0007V5\u001e9~*(i\u0017'^i.M\u0006\fI\u0003\u0002ݴ-t#zLЍ\u0019uA21sx&(M4\u0019LP.M\u0006EW\u000f!,\u001c\u0004m($ٟ\u0019% 4\u00198}n^<ި%ƙog1zqy&vHu2噠w!ujA\u0003?S\u0012\u0002\u0013y\u000b2o4Ӟkw俆NϔdQ?c?G9y\b\"y$fg4\u00123XF\twR~;Y\u0002\u0013\u000fz\u0002_\u0019yTe΋nw~S%6`\u001b)\u0010ټLC\u000f,U\u001cV\u0018\r\u0000}EWy؜\u001dyQ缃mUF6%u\u0004]y1닣\u001df\u001d?&\"I\b6I\f\u001cˣa.9Ç\r\u0015t\b+s̕O\b̎9Tš\u0016?\\Q4fP?\u001f2<\u000b/Ysq)Ut ~7\u0013>7Mep\"#j\u001ckD\u001a_\u0002*\u0002E}\u001aN\u0015~.\u001e/p\"\u0007\f&Bc\u000b\u0003Er\rSbR\u000fS\nN@aEd\u001c`aIpW\u0005aX\u000f<\u000bT|:`\u0019(`[(޶E'zÞH}6ˉ\u0000Ժ\u0010cFC\u0006zI?7?j&&$\u000bs\u000eޑ]\u001e?ssT'\u001eƏݨJu\u0012׳Sѹ\u0018?\u0002\u0011~RL[nA\u0013CA'\u0017_ׁy\t\u0007\u000fJJ\u0007)0\u001200\u001dm\u0018D\fL\b)\u001e}@>MJ?\u000fy\u0004\u0007\u0002Ok\u0000EoR\u0005\u0000Rr+c %5b6.%0\u0015\u0007H6 \u000f䘗*L\u0012g>֒R\u0018-s13|z)(iKO\u0019ؐ\fbΙDwB%vЧӅe\u000e+)\\q/+\u0012}3k\u0006?A/\u0007iO\r10/<jl18JyT΂2r(ٞ`[{\b;h.F?\u001d>\u001dk\u0005 V>\u0001+\u001fd/՛kʦ\nl\u001brX\u001e`\rє?3>\u001e\u0016\u00189oc2\u0000\u0010`\u0011Os򨚧O\u0002}`/!O(*cP,qfMt'\u0013ї9Z+\f\n4ʯ1\"@n2q\"\u001c*R}$:G'0GO\u001aQ\u0017p.ɷc\u0003|_\u0019\u0004\u001cK{xKe zdw)\u0005p\"~d\bb\"Hi4:7\r43\u0001zq\u0017ҍ\u000byC\u0014\f;\u00110\r!V~7Ǜ7pĜSEK{1!<4ef2Wp*Y\u00194\u0015L.)\u0000A}p@T\u001d;M\nW꼿\"\bX\u0002+l\u0013\u0012J%ʷ\u0000/7鷬60ߵ^X'a\u0019p \u0019#iY_ñHmi$\b4Et\u000f?\r\u0002~H`\n2\u0012|M]\u0017I\t\fQ=[oޣ6\u001f]>_In\u0003,C\u0012k\u0016;l\u0014_6.ZGK|z3.z\u000f=\nPf(x<\u0019\u001b\u0019~qJ\u0002'\u001dؔ)q\t6\u001c׌+\u0001\u0014\u0010Ș\u0015QD\u0017Ǆvûy£S\u00152L.Fke!L'Geɇȋ\u0016\u001a3S콦~\u0015y35)nv˪QEf\u0002\u0019˷J\u0015m.g\u0000lѥ\u000f\u0005:\u0012e qف^r\u0010<\u001a[#X\u0005i\\Y\"'\fSQ\u00148\u0014jv\u0006ikd-e`\u0018}+x\u0011*%\u0000T>Ү$PNÑF{Ğ\u0004Z2a*g\u0015*z\u001b-%\n\f&gi\fuyõMV\"'JK\u001ex\u000e\u0003%3q4XaGFqw޸^sC?5?e/0b\u0019{?qN2}xT'ȵ46\t\u000b|8 ̵xcЛ\u000b1<Ap\u000en8B옥\b={N)~&DYF;H*ֿ:Z/hVlx0\u0006\nG\u0010ӺxJRξ$V>%\u0015T\u000b,^V\fq+\u0012O\u0000MFB%\u001aŘ\u0015GG\u0017oy0OЕvMYiI'ٟ\u0016d&9/דt\u0002ֽZ@+9e!ҹF1\u000f\u001c*A\u000eʎcuk߂\u001b>6ܻ?Z?\u001f-+(PN\u001dNB`\u000bb9kE[ɣ:RMҴ^j?T+=\u000f!O?W4G#\bG\u000e\u00059Z\u0012\tBoi?\u001az\u0001\u0019b&0\n\u000fG䖎%g\u0012\blx%=g$a\u000e'\u0013M+&\u001c)\f\b\u000eL=?&2NJVN+b{;&#iC\u00184*\u001c\u000142_kĵgEBi \u001fZc\u0013\u0005$aX\u001ad:?S\u0000,ژo-!;!)fW53yԢ\u001bƩ1\u0013!|Y3걃N\u0015(T_F^X?Y9b%\u000fV0\u0005ʻMNX)^\u0012o'\u0004ʔhT@bn#F\u0002Y\u0012;P&j5W=\\y9ݭkrK Ӕ\fQSju?yd\u00136D6\u0015`\u001dO,\u0012'\u0015\th\u001ec\u0017I\u0013Hf\u0012*U\u0011}\u0017\u0017\u0019Et>e0A\u0005Wxٯ\u0017\u0003\bg\b\u001b:\u0013So|?-\u001cU$9\u001aXdT'\u0002r\u0007G\u001f߫\u0001@8\u001c\u001f|y\r~7\u00191\u0017's嗺SM\u001f~K+4T}\"ir̙d\u0018\u001e0\fZ&ѧbˌӎ{!B\"1\u000e}^K\")0|Or;wPUG\u0014\u0006\u0011G\u0012d\u0006ODyK\n\u001cI2T\u0010\u001fn\u0000<Ѳ\u0013{yOc\u001f\u001d6?TDeDn\u0012krsT+L_\u000e&_o,G\u0014\u0013A&\u0016Lݔwh^\u0002핻`I\t\"4JŊf\"z\u001c\u0011fq?O~P±\u001bbi&r6\u001e<L&\u001eJZx4\u0007s>+pĻAaτlQg2\u0011#/\u0016\u001b.\u000f\u0005qcQ޴\u0011'\u0015%~tw?\bz\u0016!?G3n\u0006҂\u0017\u00196\u0019bFFT\u0018Z_*Gi{(̕Y9\u0013\u0019Dj5&Li˗8\rO>q\u000fj.z!3\u0011:\u0017(w\b$~l\u000e^o?x\bm׭;O\u0017\u0000=7m.\u0001;3\u0002\u0011%̷\u001cJ\u0010%^/~GI\u000eLI\n;7#D\b=\u000bpt\u001a4\u00110H0'Ǖ\u0006\u000bG[F`SƏ \u0019$܀5z\u000bF\u000eZ\u001ela5\u001b$g\u0012k#ڞ1_Dh\u0007\u0000բV?}Q'f\u001dĞ\u0017oc*1\u0002l+ڵU\u0016\u0010J\u0010.XD/\u0010Zv|&6Sqr\u0014V\u0017\u0001IK\u001d:\u0019;l\"Wp\u0016\u0004OkS1'-|-Q\u000e9\u0015臁qk`\u000ffF\u0015U_\u00189Xe^\u000f]n-\u0002\u001fR!軵aGۀ\tʬP7\u0001;O\u001eyNt#a\u000fAcv\u000b\u001c43|2]r3&z)<Q\u0015z\u001d\u0013l(nڮ̙/\u0013-3h'\u000btތkXv6\u0012'hK\u001dkzF\"Y\f\u0000c4/3x9> `3\"֙Z1=CX!\u0010\u0010ub\u0006\r{LwF\u0005\u001ewnNJp\u0004^;\u001aYzh\b|Կ\u001dnl![Cca\u001ff\u0017ZfsX(K!ϛlBzB(ՍݪX;UF\u0018ߚyag\u0006c: r\u000fqد\t}|t,g\u0001̲?DG\u000eǛݦU\u00045|o\u0011p\u0005j\u001e\u0006MA\u0006M\r;%/l\u0010Z\u000b\u0000,\u0004ط>ǌ6=}0-l#\rBUąCe\u000b;\u00036-\u0006^010-ٔ9{-Kb6iĽQ\u000bc\u0012{\rN!v\u001eӧ\u0013f]\u000e{Ȉ$}[PL?\u0016ԭzJ^xm=@b'ʙ}p\f,\u00073':݇\u0018r\u001d&\u0016pHG\bz.rn*ͮ-Iﴵ܃Wss1v\u001fhdޟŖY)[7jl\"_SxbǞ<?\u000f4vf\u0013\u0002*&\u001e\u0003n4\u0000qF\u0005Sd(f:*TH\nΗD_rĩ\\fx#1S7I'930ŖC\u00071,#e0gUq\u00075\tHK<_ǫHdyDx\u000eز\"8le\u001fP#E%\rS\u0013ͤ=%\bo78\u000eO\u0007l\u0010@\b`Y\u000e)\u0019ޤ\u0013L;(\u0017\u0017\u00011/\b[*1:t=zr4\u0012~KK<_V\u0005S++%L\u001dG׻\u0013EK>6@_\u0003`\nOk2tD5/N\u0011Ջw܋;\u0014װ\u001f\u0007O\u0003\n.9?YSb̦Ԍ>)\ba\u0016\u0018k\u000ftu\u0015\u0014\f8\u001dKu\u0018V!U\u0014w\u001b\u0010(ǺɠX3n̗ҿT6'm2(!o@Ꮆ\b\f\u0007R\\>=')ukCf\u000b/<=\u0006%P;ehE)#8cHO qw0O-czn\u001bd\u001e4]wƵbhG.YmG2Ñu!9\\\u000e\u0014ΰ\u000eYS߯\u0018}l@ۣ5}\bӮw\fa\u0002NdyQC\u001eı9\u0016_\u0006\u0006\fW̛#\"\f2~N$i+x˱o\b\u0017\u0017äk\u0004-/\u001a.\u00031%#o\t\u0019%Ÿ\u0016\u000b.O#\u000eYp$\f:\u00174Jֿ\u0017[W+o\u0016S$[u.9|?3\u001c\u001e\u0001Oõ\u0019\u0002\u001d9~/\u0012c\u0014ϋ\u0012q\\Txr\u0013Z\u001a^\u001eq_fݪ_N#bM1bgz+C\u0019sL#bFJ\u00012H{\u0011a\u000fs1\u000e\\h\b\u001dhx#~i?*L]0T:\u000f&r<1|.[\u0013K@,Ue\u0019F)+ڲ>rr|c\u0015 \u0019.\r\u0019\u0004C Ft\u001a%'X~'6\u001dUSJdܴ\u00154\u001d&\u000f\u000eH/1<D\u0017h\u001e\u000f]MM69l\u0019D{;^4fZ\u001827WQ\u001f*\u0013\u0015ʁ9>;\u0015BX?oϰl@\u0011;\u00014-YΔea#\u000bz\u001a%\u000bw5\fHc\u00156\t>bZUB\u001en\u0004\u0000zq*(7r_\u001brx\u0015]W\b_fkQ\u0012\u000f\u0016\\\u000e\u0012O$ץ~nx\u0006ws\u0007\u001cM,?ock(\u0010.L,?iI\u001f\u0005eO.ZE3*1~7\n?\u0003l[$o/sO$Ec_0/ic%\u0014뽒M=z\u001er\u000e\b?\u0006\u0005rJZO$'{$c4I[NH\u0015\ff\u0018g\u0002S%\\2yE:UP{S\"\u001f@J*&ո\u0015_SMպc9I%2\"L\r)\u000f \u001d\u000f\u000e\u001d\u000eljIWkN8\u0019F\u001d~E%NkC%\u001d[>\u000eg;#4?\u0002g\u001aş6\u0013\bwVke8I(\fGր{\t[ߢMe|'\u0007׾\u0017J\u000e\u001bmO\u0012ὑ'\u0019\t\u000f\n\u0002\\\u0014\u001a:\t^\u0003\u001fȉ\u00057Y>ʵ쁂$%6\u001d@,\u0016lU۬\u0013.M\u00008\u0011n 4\u0005\u000f)\u0002x?h\u0010\u001ciBX%|0̛(p t\u0012ѝZ\u001a\u0019aq@4ܧn1C33&DFS|\u0010ɳ_\u0013P-XUJ\u001e\u0013;ky\u0013ؽ8z\u0017\u0002\\D\u001fJ\u0005K\nC{7'SmƜW\u0015skڏ\u000fhɃ9yL(p\ba\u0019!\u001f{ߵ,}C`0\u0019)M9\u0018\u00136\u000e`rzHB\u0012ཿf\u0017F\bT]];US2K#á\u0007,$*\u00106\u0007\u001b'|\u0005ZqMw\u0016PZ\u001d$\u001aYCX\u0005{\"\u0013K\u001e6e-\u000fG]\b(eVq\f\u00038Jo+1D\u0019T`r\u001fG\u001eSNA/k0Ϧµ4J\u0017.5\u0005 \bC,\u0018QÝF\u0018\u0011H4\u001e\u001cuj`8x\\!P59\u001eL\u001e\u0000ؤ2[bY3`*w5s#\u00125hd(!\u0015w\u001f\u000eZcK\u001d{\u0012a\u0006e\u0004M[\rޱ^5\r_\u001evϕR &ҦU\u0013-\u001dm\u0019\u0005D@`*k\"em#\u001fIdaƁG\u0007(ڮyV9\u001f6\u001b\u000f#\u001f8\u00044wJA1:5:9CB\u001c\u0017wvn\u0013\u001a\u0016yx`\u0010/\u001ezmg.\u0001\bZH#)E\u0013\u0007X>\u0014\u0013a \u001e6a\u0015\u00075R(ɑW\u0010\u0001lc\n!+O;FZ\n\u0002T?\u0019xH\u0004$\f'&-9\u001aϙ\b\rJ*\u0016:X\u0015MnnF\u0006e\tE噼kL\u0012hn\u001b\u0019Myz{\u0011ÄZz0L~0n.b-\u0017g`d8!l\u001aL4b?]ɶп|gكRו5SmuUk*׳JwvMI2\rS&91Ik_9)iw\u001f*TS\u000e֒>M\fK{\u0007͂-Fz\u001d?\u001fU\u0004rL/QS\u0002\"F٢ݸ}\u0014<l\u000bȰomn\u000b&*_ia\u001fC\u000fݛ\u0013\u0004\u0013H\tfxHKwMQSC~{n5\u0016\u0013_\u001bٵq|u^g\u0017\bNra>\u0011\u0015ίa\u0013ؕUf\tҶ\u0014#~\u00111\u0013Q;H|\u0006\u0019\u00172YzI\th7P>֤3].\r2KEy\u001d>\t7I?\u0016\b,i2Jج`~dKFOMF2[fjj.a\u00021O\u000eb.:\u0005\u0004\u00053珌fH-\u0004\tð\u0003·aY\\\bM!qĹ\u001ddA5fyK\u001e\u0004\u000f4\u0019\rWY6eur)49U:DW&\r&9;.3GB'y\r{4)J<\u0017㝲icuB\u001a\u0016߀\u001fj\u00154\u0006\u001b1W0\u000b\u0001\u0006fΖM~\u001b̓<?t\u000e~X_Ҁq\n5o\u0002MZ{on֭(\"~\u0013g(\u00178a6k0/,,i\u000b6~p0O\u001atyQv}l^m0oUovf옄>auv_\ry?pV\u001a0FI\u0001uy1SmNv_z܌{sr\u001dQG\u001b\u0012/\u0006/h3Ň٥Ү\u0013582\u001b\u00172\ni!2^xk̔\u0013n\u0011o\u0004^;XY:\"kͲ9H'ѰJ>||f<Q|_1k{+691Wo\u0001\u0014E.pY\u0006hqY\u0006\u001eZ@StdnH\u0014Ur|]\u0019PKgYL)Ρ~ƈKt\u0018hpo\u0012_*i\u0016\u0004y\r~4p<Qv\u0004^4\u001aTP\b\u000bDu\t+A*\u0018\fCy\"\u000f~\u001eu뢓A\u0013ҕ\u0006Ӌ4<1\u0017\u0011<1\\-\u0005/\u001c['\u000e؈Nfli3\u000bz\r41\n]$\u001c;~\u001e0JgPs\u001f3?궔:,~s \u0012Y%1LqM=V\u0004]v\n|\td\u000bn\u0006\u001fn\u001c\u0000\u001d\u001b$\u00147\u0014u\u0000Yd@ء&\u0010v/Y\u0011\u0017Pn\u001e\u0000]\u0003ER\u0004\u001c\"=a|yK\\\t{av\":\tRANC\u000euA\u0019\u0013-~헫)[?\u0019\u001f\r\u001fX\u0019\u0004Hw(fH^j4A!C\u0014kĀO\u00166\u000f\u0005t0A\u001f2\n\n\b_\u0014.;\u000b:uF>S@/N::\u000eif\u0013i#]\u0007u{Db}\u000fo-U\u001d-9K\nZ\u0001\u001dGD3^\u0017˘\\bݿTlg|v73S!\\f*\u001a+!)\n<8\u0018Z$EF\fM#|7\u001fi0;\u0003ɰ\u001c\r\t\u0014\"\u0018{\u0014\u0010s.*\u001dj`\u0019\u001a\u000f&AS\u0010\r7\u000f\u000f2?퇿\u001aGo$# {dpk\r?#-ʄt&\u001f\t.yRI,\u0019\u0010;`\u001f>9Xmc&l(s%\\PZdcjC\"d\u000bcBod\u0010\n;!ox,{9KзD\u0018\u0017\u001berR\u0012_\u000e\bT\u000e\b\\ӎ\u001bY\u0000\u0018bS4W )\r]d6\u001d-N2{r4?k0{'#M#\n\r13&\u0007\"\u001a=R}1p$&\rQk\u000e\u0005jr-F~FsWs\u0004o=\u001e\u0006\b^p}I e#\u001e\u0013_Y\u0013O\f\b?.'\u0004I\u0005L'$Hd\u0010\u001d~ݍ\u001dhر@\u001d\u001e\u0006\u001fj$\u00063C\u0003&^șxKX\\\u001f1V\u0019ł`s\u0005ꏈ8yw},\u001f\u000ehD%C9K\b\u0002L㇬\u000bwƅ{Snm\u0016뚃k@\u0004^\tBI<FJoq\u000b^\u0014(\u0010\u0010zz}\b,>rPy{t0_Z`l\u0005]\u000f\u000f{+\u0017!%w1O<;l%'\u001f\u0014\u001ft+}\fGh\u0014L\u0016rt\u0000W\u000ezN;~\u000bdOyo~{m\b4P#UnWh\u0000+YV\u0003s\u0006#kF]y\u0018\r\u00112H+\u0001=\u0017(\u001b\u00189gnkY?\\i%+.(e\u000e-F٬_\u00122e00\u00177gۼgPk>E3xr\u0011\u001ag\b\r^ZשѸzN \u0010B\u001fJ\u0011jݜ^qQ\u0018&CW`u\u000eH\u0001\u000f4\u001e^?1\u00035dJ󙗺!:vI%^|\u0002zp<;%1iL9:\u0017,]d*\u001f\"N\u0012\r\"\u0004\u001f\u0016w[H@8\u000fS\u0013ס]>Immߏq&zͿDߋIu{f?5f2C\u0019ٶHN}c*\\ijzALo\u0014aUW\\2kW\u0015[\u0017\u0004lT_g\u001a\bI\u0007](&s.ܡ\u000eA6HK%\u0013&,)<HjpIK3B\"H,6\")u?0: \t=}kJ_\r\\\u0006}A|r\u0014q;qhTTbl\u0010M.5>R`\"2mg\u0011G N(\u000f|(Xwu,]Չ\\tm\u0010\u001f5d\u00075\u001c7\u0018yn8shsgA~\u001b0\u001a,T[kͭR9bd^\u0004}q9%E^Yx3>h\u001cOѳ@td>ߋn]tTzaQ:#G\u0002m?NG\u0013d'#4\u0015؇4&0B\u0018tz@\b\u0015&`\u0010&й_Mv1$'R7ู;%e\u0013\u001bbUoxID\u000e6ԼJ\u0000:\r\u001dkj7ݪ}\r}qa:zJ2E'\u001cSy\n|[\na\u0014\u001c4\u000fZΰϘo4\u0007F%|V{(éް;7lƄ7\f2;B[\u0002qd\u001cVP=E%DrN~Lm\u0016\u0015/g\u0015\u000f\rbpc#ӊ\u001fR\u000fɳXgtuu\b~+tB`0t\r<YJf\u0015<HvƄJ\u001f!\u0012yE\nv\\넃q>\u001d4PI2!o\bɔV!VCgJQD6IT8GmtWS׽i)W-!?WW\bz9|q\u0006#C\u0010_*<ch\u00113#\u0016>z(qw\u0015\\NL~z\u0015\n2ݭ/+.\u0003vjZ\b\u0019a[h\u000ffZ~K%jghw[JJ`G\u000fX*Z<\u000f9=\u0002\u0010Ef\u0005!'Dgݣ&3Mc33(=\f^$|\fW(5\u0015P#\u0001\u0006CJ&\u00118 J\ft:+\u0011\u0017\u0010kv\u0001\u0000܏\u0019K%KHڍ%5&o\u000e\u0016NꔄRi\u0004/9Z\u001f\r\u000bBk\u0002eL:{\u0018[\u000fuS\u0005QrO=5\u0017].8ۛ\u0013$\u001f,t9cWpkL8T[x\rC\u0007\rꔒ|\u001c'?qRTuP0\u0004>\u0006\u0010r%N\u0010j\u0007QAbHE\u0005ٴ~\u000bҎdz1${\u0012\u0000n~y\u000b@\u0003Oj%\u001b\u001f/\u000bB(\u0012­b\t6*o%'\r|\u0002\u001f]\u0019\r\u0013[\u000e\u001a\u0017x-NtА꤃3O/>n\u0012qH\u0013i;\u0018OlMߚ\u001e\u0013D{r~`^4P?\u0017SVnxB̩B\u0012yl䣰9\u00106H<\f$?ի(o\u001bG\u001eo%\u0002\u001d<Mdկ\u001bv5:k9:%^O\u0003QڊP!HtKXl@ERw_2 Plt?Z\u0017\u000b\b\n9\u0018nw\fȧi\u001bb.\tp\u001czMPvząHa\u001dV!j>4$\u001e\u0010Y\u001c5\u001cf0j\u0006yrφE.p/\u000bt\u0010\"g\u001d\u001b\u001c\u001e(&=SYW\u001e(0YI 罁\f?]:'\fSY٩W%UԞQZ1U\n8<!\u00165'.Os\b\\T\"W?+cJʊX'P2&osRq2\u0017\u0007Z+S\u000e6\u0017{z{\u0011\u001e\u000fX\u001a!{\b t\u001alov\u0003\u0004.'\u000e6yyO0\u001b\u0012\"\u0003Di#k\u0012ucy`\t\u0012}c\u0013Uk7\u00038%N\tQi\u0018ۗ/H\u000eCD݌\"5joJ\u0014,\u000f]}l<2]+sE4\u0014 lƥ\nOZ/ڛ\u001dٵow\te\u0015CrǸJ\t\u0015nIt.|!*ϫ\u000fA*\u0012\u0017\naQq}\u001d8ށ2\u0017\u001aa\u000f~Q>B9״^18n\f\u000eƋ\u001bSu\u0007\u001a:uқƠUu\u0006vIAުk\u001d*\u0002-Ao(+a]_cpsD\u0012\u0002'U4\u0006\u001e\u0006Zc0ؗ48Cc\u0018fuSZT\u0016b$\u001c/r|s\u0007c\u001aef|/o͞eL(\u000e𑃼5ycPʖȻ4\u0006%\u001bv\u0002+K\u0016p'-\\/\rq}%3}%+XI~:^94җF]8G\u001d\u0016\u001aG_$E3{-\f0AХ\u0017O(^A3\u0005\b\u0013KBi%Jy\u0010\").\"T|\u0006s-Dqg-(\\И\u0004,i?g7\u000b1\")jv]p=ȿP.\u001a1\u001e\u0004g%AB81TLTa솦9Y+BƋmW=4\u001av$6 C\u0004Nȑ1=a%V?ثt1`[(,\u0006\u0015B\u0019\u0001ā'6R\n\u0000*Np\rYֺSYe\u001ev\u001e\u0017?N#i~;\u0003ku[C%=ha\u0013>5\u001fo9p+Tl^P/d,c\u0004G\tV\u001bW\b\bR\u0013D~0?֘K\u000f\\\fr~r|cv#\u0013)EuŒ\u000f]bSd\u0011sSegYso\u0012sF\"\"߮N\u0000\u0001Du\f\u0016\u0015)bEXWwmpbQΛ\u000b\u001a7Fy/\\'\n~\u000f\u0002E\u000b{\f],۱XFppyW4#Ę\u0012BʆGxb\u0012:.熨'%\f>BU]Eg֖;<US\u001a/u4zڋe\u000f\u000f\fBTa'G1!b)\u001d\u0007\u0005[J^tɧaִR7R\u00063fh\u000bq9O@.M׿3\u0019>AR-2\u000e6Źd>L'PR0\r]\r&aDz˺5t/f(\n5̚Dp\nZڵfpYA3%gA|ҙu;Nm\u001c`\u000e\u0001c$xsJ\u0004\f|+bg1\u000e$u\u0007\u0011?k\u000fa\u000b;L\u0018N_\u0016AL{:\r;%!/T)ޕFd;Y\u001ei_OPЫ\"\u0006\b\u001f\r\u000b\u0011\u0005\u001f+\u001b\f*4\u0017;Sy4N*)Po]2w:\\U/0ը/^3>9@EPKNIa\u000fŃ#Sȧ\u001fUa\\\\*|Nl%*9iҹV(9F,]+l\u0000t\u000ekK\u001a\u0012b;TI\u0018J\u001dV˶\u0014'\u0004<?9F)Z$\u000fv\u001f* W\u001a9\u000e%bAG܌']\u0006\u001fv\u000fl!!\u0007>/~yQ}\u0015t4Kt\u0011nu\u0000s=&;;8PnM>Ȭ~I\u0006\\:A\u001c{\u001aI#\u0000sRȾvG\t˿\u0018PܩW-\u001f&|nnRCeAm\u0002\u0019{p\u0003\\ŦS\u0001,qB]L3@h\u0018\\!g*3C]\u000f}ѱ\u001ez\\>X*.zh|xK\u000f}\u0003N\u001a9_\u001e9c\u001eo\u001eH\u0005_=l;+x\u0014dGbc\ts\u0019]C;\fء\u0014'\u0018\u001c&Vkh\u0019|Z\u0013Se/N٪E\u000e$\u000b\u000fU\u001cm\u001b/dyo)+=C/)ӵX[\u0013\u00164d\u0016ʹ\u000b\u0015R3lI'\n3ߞ\u0014F./w](ݫ=/(\u0015i&\u001amdR#\u00021k\u0018lH\u0005oh\u0013a_`n\u0011J?m\u0016ҹ\u0015-\\\u000eT\"$5\t[6u\u0017Z1L4R7JM/\u0016}n\u0017\u0010\u0017}qy+d}\u001dM=~3ېY(L@B%4M0;pm=F̰(gĵ_!w{%{FY4\u0005.i2\u001c\t%+暉\u0004\bi\u0002?+b\u001cdϪ*\u00054&\nvP \rC\u0013\u0005\u0015\u0007C4\u0018Na\u001a\u0016\u0002A<=`3\"3oK9s̩x`\rָo#V^pi@+v)zh\u000f\u0000kMIC]y;\u001f.3ԥNvQ\f\u0002+6n\u000b}\rHJ$:ڞ5a/(\u001fJ|-sf\r5\u0019?\u000e<7Oج+204QJ\u0002kyS=]\n-0b*O*NI68{q;LZ\u0018vn8f4\u0000\"\u000bC:\u0017n1w\u001eH]f+J.4~UbYL-\u00020hIm-.J,%Yѽ9$\u0007;\u0013+!F\u000edQCv\u0015&2\rG7YH^|C카\n7LSt-~;yQֺ\u0013\u0019\u0012;]\u0016kƏ:20y(L&|Y\u001f#|\u0002!e|>HoSa(\r;ð\u0012\u0003w\u0015a:\u0011\f\u000fK\u0003\fU\b\t9U5:\bO\u00058z=\u0003l\u0005\b`tm\r\u0002S\u00046GV.MLx\u0007/\u0010w*\n\u0015dZ\u0015\u001e.p>_xo-\f($\u0007\u0014S)\u0002({5\u00044L\u0007V\u0006]\n(p7CW\u001bw^CX`\"fQ\u0011\u0018sA*!\u0007_\u001b]\u0014U@ٛIkǔ5wZՑK`R\bZ\u0011i\t\n(۹%0E\u0015Pȧ>cФau\u0005\u0011\u0003WUϕ@r#]u<\u0005$&?>$\u0012\u0012.\u0005xxVe0Ed?y#:r2|;\u000bc\t﬙.{[E]B)k=p8\u0002x\\\nST\u0001e.)n)c\nişJ=Em\u0018PD-ǥ0\u0005\t4r\u0003Va\u0003\u0000x\n41#\u001d \u0010\u001cP\u0001\"6KZ7U\u0017yԞug\r$O9C\fs識\u000fێ%_}M4-r\t\u0002\u0013Sa9^}X{+ۅ#K䞣EH\u0003QA\u001ctQK@a 'oAC\u000b\"qO!`x0Os6T\f\"ц9\u001dk\u0011\\<\"tC3\u0018K\f8>hk\b\u0017\f1n\u0002(h\u001a/+![3 kfm4ެ>{\u00036[L\bT;ABq\u0018\u0004\u0010JȊ\u0002!Qpw@Swd&x\u0012\u0010c'L\u001aZsh_eB68\u0012\\\u0016~X\u0019c1G]GZ!dZc\"\u0005k\u0004Rv\u0013\u0006\u0015e%̳\u0013`.ٵp+zٴ\u00112\u000bN\fRǮuKc$U \u0001(\u0019b;v_\u0012#=\u000fk{LU\u001dQ\u0007_?6sgs䂆2Z\u001b\u0005J,W7s 3-\u0013m\r/G\u000eiαŴ '3\u0005v\u0015N/9g`k;a'-;(Уٲ\u0015\u00065\u000f?_Ƃ| o|C@\t5\u001aTY\u001e\u0005j\u0007l);b6\u001fWk0\t7ʅ<~\u001b\rrrAu[\u0004ͥ*+^xz7Apv\f\",3\u000e>=MsR}\u001d\u0019 iSKScu|E\"\u0004\u0016h[\u0019Jw\u000eK\nߝ谣CP\u0014137|5;\r5s3]\u000b\u001dۛ\u0005@\tco<YW4[\u001d߳<Nr.\bbH\fd9G\u000e\u001f(\t\u0006\u0015:\\Qf~W\u000f\u0003egIn\tq3\u001b̋\u0015\r6cF6@og\u001ew8\u0012sHp\bE\r\u0018\"buNic.?#t\b\u0003PL\u000b\u0012:/&B\u0001\"\":{\u0011lZ\u0010=Ag;iX4Ȅ\u001fXڠ+a\u00071Y3\u001b1\u001dk#E\u0012rsE':v</\u001efl|'[n\nEZ>\u0016j,VҊ\u0000K\u001cS\u0005Nͅ_TmB!\u001f\u001c\u001090b \u000eOʜP\u001d\u001ah4Dj5L>LLz\n8\u001c?&l%~G\\2mqJfHS\t\"\u0016\u000frDc\u0014\u0015TCζWҖm\u001cX܁u۫O\u0003=\u0015\\\"hcWg?]?E\u0015;Nt\b!\no\bs'j)mء\u0001_C\u001b\u000b\u001bRF\u0004׸~\u0001F\u0011~^kDQajK\u0010&5\u0013sǜܸ\"\u0003\u0005\u0017\u0017UΈP4\u0014FLY`\u0013OKyo\u001cjY+qwmHE\u0004\u00112Gٛ\u001f\b\"5㤈?Ç\u00039k\r\u0000H咩:\tS\u0005\u000bw1O#\u0005\u0015aTI#\u0012\u0016}GmXA#╦LRf7`&Gߎk:L5L,%|rC\f\f`*\u000e肁\u0007?؆<3D\u0014*gNcaS\u001a[O.\u0007B\u0011.\fX(k\n|;\u0012+ڀ*WXvzz~\u001a\r\\\u0007c,P/eއI\u0004v\u00155Cx\r%\u0012X\u000et\u0014f\n[+U|\u0015@y\u0000\u0000-f{\u0004\u0011=iI\u0017mw<N |P\u0016i^\u0017:\u0001\tۓTC]µ2\bU\u0003\u0013[ja֝g\u000f2~x\r<o#k5\u0013n\u000f\u0011?1TG\u001a)Uy聡\u000exf\u001a&9V`؎L.\u0006\u0013\u0010A2\bYg6Qj\u00105H.\trI8r^\u0004I1ع\u0012\u0018\u0003\u0011I}ތS{NS@$?q}%[+-\r>9${-o\u0019C^<ƙ\u000f,Eu}lN\u001c\u0019t!69bV \u0019*HQiC=L\rӦ`\u0013y\u00026:sNXOf\u001c|y櫓͔\u0013O\u0001\u0015/><ѿ>OI\u000eG[<Q?\u0018\u0007_p}\u0005T/>ٓ}՞\u001aVfs޵\n%W\u0018\u0007\u000bhoi@MNcX=5\f\u001e܎}~񩔸#Eş\u001f\u001b]6Fk'&c/C䙂(ac\rgYs۴^t~)q.|L9oGFĿBEFҼy4/=ii~*\u0000\u000e13#w<ي8mtkHybK>ܒۺ6<>:qh+qExy\u00178nv\u001e7Pqz\u000e\r,w,_H\u0004l?\t(JB\u00049HD˚<)(]P\u0006:Vt`-<~\u001fq\u001d\t\u001c)w#^ǥ&+izR\u0018\u001b\u0005>*\u0014V`1\u001fK8\u0003\u001cF`\u001ff;.\u001eG陛p\u001aPD,\u0004&Lu_!'\u0017Ҽ*\u0001ģUyUл\f\u00119\u0006z\u001a+5 \u001eܞnK8Q\fea>#\u0003xW${ǾfGY\u0005OC<\u001a\u0017_pןfk_\tyH\u001d\u001aT+ԨW5L!ijTjhq=~^|bD(ği_)S12\u000b3śmm=[S\u0005\u001615\u0004\u0019HGk\u0013:wi\\ˣ✛\b,y0.ݨ\u0018Oɴ\\c](ZI\u001c\u000e>-43OQnCq\u0004ϸ;_j\te6'.SR\u001cw,Dr:\u001396s\u001c)\u000e3\u0003u?ƁDQݴ\u001crh3-wX\u000eoѴ|!\fo\u0018\rhZ~cŴ\u001crJ\u0016 xĴ(1Ì{1rp\u0001\u00134S4~\u00063GWBcZ@XϞn(6~iB\u001dl*z\u001cF\u001fB+\u000b%\\\u0002sL\u0003ݲn\u0005\f>Qf\u0006s᨝\u000bc(vF:6~9sNyǥcXNa[ZLq,\u0010\u000fMq,\u0012WiciS+\u001f5W:3\u000e/=ј\u000eL ^4>u\"_}160$[\u0010\u001fG6\u0016tu/9G)2cҷ\u0015\u00070E_/%n@])e5~%pk\u001c!I\\=ɉ!%#@\f#g\u001c<_\u0000\u0017@i\f@6A=>HM\\\\q.8JʓW\u000bt\u001f\u0003\u00115\u0010l'JN\b3\b`@#\r`IZ\\kNI2M\u001dYŜPbmBׯ\u0004cL]5}\\2Lq4u>~?A-\rA\u001fCW\u0007t\n3z\b\u001be\u0003\u0013pk\u001c\u0007\u0010\u0012qff\u0000Ә\u0015\u0014ݭ\nԺ0U-\u001cz(\u001fp\u0011}\u0012ܸ\u000er6Wސ\u0016Jѧ9%υׯŶu=»ڊn0W\u001e}\u001aB\u000e|;'\u0010rΘ\u001cPOMqwb\u0014I(S>[w\u0017\u0003]Ǯ%`;ICq\u0014cp\u000b'\u0006i}\u00017if\u000bX@P GЋI\u000fn쾻\fh'h6\bv\u00105\u00183->E\u000e0ab<=\b#\u0007\u000eΡt-\u000fK;KT@\u000e\u001c=C&c~\u001ah*\u001f+\r?(0C}\u0002/7\u001f9\u0016e^M\u0005Ŧ$\u0011\u000b\u001fz׏`\u001ee\u001a?d߳C\bR\u0002?\u0002r]s~x$\u001f\u001f[6\u000bT9H$Iy\u0004*/Ԋ3\u001eKԜO9Tmo5\u000f\u001c0c9\u001aU8jWc^|\u0007V{<^\u0007\u000bφ\u00006\u000e\u001aRt\u0014yM\"\u001c9$}w~m5Co\u0003\u0012ypOZGYs\u00198^l|5IkSk>\u000e%\u0000S0Ċ깯\b?\b!$=~bSQ5>ފY3w]ĝ I*w'Z%ڀ\u0010mf͚-\u0017o2\u0001'Wzz囿/q}ggk\u0002D\n#\tpe9=Pt\u0007ُ8>\u0003\t\u001cg\u000e36\r\u0019\u0012u}_G\u000etP\u000f-rnf?\u0002g\nU.-G{u\u0007,?(+7:\u001f-$_Ud_`8Z_2s\u0018S+ 2\u00130\rvl_U\u0013],\u0003k1uI)q\u000bO]N#%ynTob;b3\u0014.;JGK\u000ei*w%;]Cr%q\u0004..\u001dTwN<:O/EGW营G5ҒM~ac?\r+\u0019L({\u0001\u001d\u0018l\u001aKd02l*[ÍWYN,\u0006\u001c\u001d{\u000f\u000b\u0015\u000e(y\u0000?9\u001c}\\\t~zV#t90z\u001f3Ā\u000b(\u00156\u00155uWτh\u0006\u001c,NVƅ\u0000j/\u001b\u00177\u001e\u0017-1+|(ɿ$\u001e4yø<9+\u001a:\u001a^Mu_[@\u0004S\u001fɬlӬ%ӨZeU\u001chT\u0002{k\u001a,.D.p~\u0011I?w\u0015\u000e,\u001c\u00113(\u0018n.4\td.,jI;\u001c_sWT~8WX櫑\t/t#1\u001f\b1yf8m\\~.h+v~R}nϑ~v]؝Ҕ\\V\u001f\u000f޺?\\GA3)<YA݊Юwo\u0015bw 8SAN>_-O<\bY\u000b\u001b\f'2\u0006\u0000Va\\ucp&kI\u001a\f\u000b~\u001ae3{w?F\\\u0018nOvec\u001aSc\u0013\u0006*S\u0003BR2j\u0012EqU\u001f1VO!)-my\u0003gn[טTap\u001aJѽeGJLĔ;\u0005\u001f]vK辣\u000b\u0015\f\u0005|\u00191t䘴.o\"\u0002\u001572\u001d({\u00015T\u0015lQp\u0014A\r_֏wsq4\u001a<N6LӸx\u0018#.ubp$olB&0Vhj\u0005x\u0010GRI^\u0016z|8%Gu¿I\u000ek{te$\u0006\nS's-5X7&l\bi\u001a3!઱Yޒ\u001f֧E+\u0006;_av\u001eU9'\u001eg(\u001fP-sB%L\u0010^g,*\u0019zZM~GGs&獢$\\Y$A\u0001\u001dNf'Jܶxr__Z\u000e8(ϣL%/\u001b}s\u0014_bl2g{Hb\u0002ǳQ[Nc`Er{`j$agY4\u0001\u0014PB\u0002j$++\t\u001c\u0004Lhl2\u001bi-vV!08-\u001f\u0002I~\u001fM\t\u0017c\u0010w.ݡ\u0019'̻\u00006 brO\u0005Vwx\u00167\u0010y\u001b݌3VO\u000b\tU\r-f\u00172OF\u001aK?\u0019>%\"7~97DS\u000bJ\u000b?\u0019#o\u0007OFu\u0005AFgg\u0017ǮK\rku\u0010rrf\u0004X\u001e:j65WK.{G9_\"a\u000b\n!v\"\t\u0006K\u0006e\u001a8r\u0007\u000bQDnII\u0013Gã~{G6}!cMϴ/\u001bOÇ\fS}Q]\u0005n2^'\u0017\u000b\\\u001fNB5վ\u0010\u000by\u0010eCnJ\u0005z:q\u0016\u0001L\u0007iK\u001eT)]{Wj֓ti\u0013L\u0002SLyo2\u000f̆g\"\u001eY٩WjMWxBsטK\u0015|\u0004.\rY|\f^|\u0018\u001a3*k\u0015X[CeL]2]A2&KRP\u0000fo~\u001e%#~E0\"w}M\u0003w}k;[j?(|O\u001c\u0010˷~z}^Z}\u001b{o/B|\u0018\u0000\u0015\r&I\u000fIm\u001az}P\f'\u0018}c\u0018#f\u000blt\u00035\u0015b\u000e\u001a_9^sd\u0018$\u00059\u000bgLtx\u000f\"3HFc?=o\u0016,\u000ev{G\u0016 %r\u000b$0o\u0018tX\t1B\u0018\u0002Wl*;G(PY\u0010\u0014o\u0018$\u001f\u001d7{[:\u000b\u00033&tt\u0014FNJ9aۏ|dTH\u0002cDۙ{;5'4\u0006~\u0010\u0007U0_b\u001c|\n\u0016)o*_)͂\u0007q0k}`ؙ\u000f'6\u0006/ j;;\u0010\u0012\u000f\u0000I<\u0018f\u0012 \u000f5+p\u0019׆LQV\u0001ضT=˧nѶ\b>\u0018ʺ\u0019L?$\u001dz`Ukd!}VF^nq\u0003,׫aOg\u0011d\"$^A}iKwP2vr\\\u0005\nb\u001d\u000b_o#֝o` X7գd;ͯ\u0006.\t<0NVg|u=\u0001K\u0015_~us\u000eϣQF&3d\u001a9ک\fv\nwQ[&8\b\f{v,EeqEnvws|5_So\u000bަ4]Es+<ss\\\u001c\u0017\u00112Ņ\u000bLeQT} \u0017`%.CPD<\u0019\u0014\u0010 ~\u0013\b;%8\u0007o#WRXnx\bG%=>/k\u001eЄ<>qie\f\u0014d Tl'\\Q]a[Q4G%o{\u0002\u0013a4\n\u0005?_-3\u0016\u0003[\fg\u0003y#uQ·i'C\u00196G2Mǣ\u001ek3.A\\\u0018K0\b;\u001eB;9\r-m5&Mȵ\fe2931[\u0004Np)R;sj8ig8\u0011I7\u001b[U<Jt?5pFk;R\bU(4\u0003o4X\u00149 P\u00160\tn~\u001dѮ$\u001c\u0006[I6Ij&̯\b⟂XCZ\"T37CԔJr&_ybvL~E\u0000֜&H\u0014I9s^jWR\f{\\ݕ\u001d-yh6Y\u0007_>h?<2\u00173ݕ\u001c='xd=ZwWQLm8iw4հկ\u001fs{\u0014\u0015n(\u000eΫ,Lc{ԴΧgw\u0005t|t]\u0012p\u001fL?~暱\tY\u000bzE}\u0016Rj\u001csBx'r7[dך\u0013;/~6۟\u0018[Hy\u0010/\u0019t*SG<d]AD0$3tx=Tlq!^GG<\"=hPڠ\u0015eszredn_KI\u0011\u000eTFK\u0000\u0018Ih\u0001L4\u0002C\"1g\u0018zYm\"\u0018Z\u000bږd%Nm&&8k7$52\u000fXw)z\u0018\u0015\u0019e#y\u001e-\u000f\r\bo{k*Qe=A.\u0013\u0001C\u001dU>w1\u001c7\u001dzY\u001b9~3D\u0011\"\"KXN\u0011M2{B՛\u0013K8U\u0000C\u0010\u0000fY[ݕ@]\u000f+\"Gy\u0001y1'hX\u0013iֱ\u000f?I\tce8\u0001O\b\tתʮ۾$=\r۴\u001d)5\u00188i\t#ݛ666;6?i2H''ԟ\u001dFi\ns43Yk'0Cc\u001arqk\f5c6)k㛥O,\u001b}dl[!'~/O%\u0007\u0018%ZNB9iXA\u001dAR2:\u000er\\(\u0019\u0018*\u001d~͐2\\\u0002ct\u001cg0]rJ>=\u0015\u0019yͪ\u001d\u0003.Guta!\u001f~Ԡ\bk˦9B׊.P>Ꭽ\u0015$\"A?Ď\tz!o:k(K\u001d.\u0014\u0012?ͮq۾k\u0011׶di\t\u000bGj^I\u0007V=*r]gwh6eq\n?q6H\b}\u0005WQ<7R\u0017\u0005\nmLF8-1B\u0016\u0012\u001dj6M9c\nvdU\u0002\u00054\u0015}5h\u00138\u001b(F>\u000b_\u001f܅2Ffz\u0016tV\u0007To\u0016Y@L1f\u0002ABS4jR\t\u0016\u001f'Nhk!\u0014`\u001f/\bLߧMsf۳J|j7\\q _>\u0013y*bF\u0013[-%b|J|]ڂA>g\u001a\u001b(k~h\u0000r\u0012k35\u0006^a\ň\u000f5?1w\u000fwFAz\u001bB\nb^s1\u0000ex,޿<\u0019ꂠ<GD\u0011\u0002vĨk\u001bF\u0002!\u0018Y_Dк\u000e)\u0001EQ\u0016e;`T:â8I{Wd{\u0018=QE&iMJ\u0018/N\fض=\u001bSl\u0001FX]\u000ft4\u0010<\u001c\u0006D6ؓ\u0013╶'#\u001cg\ny`&޺Q\rdSex`tE;\u0006ܒv>F\u001f}\u001fCth(\u000e2\u0014%(ӥZ\u0012\u0002N\u00053ں\u0017ɪ|:jKK|(df\\D)\f؎\u0012\bؼ㧍\nW#e<t,-qajhfGB*!\u0006XD%-\u0005H]F/:=\u001360\\W\\z̎\u0015*8p 2`$*+\u0002#Z\u0016=av\u0006\u001es-f^_=\"c\u000e+GB\u0000HqE\u0013\u001cfۙ$~՛%r\u001bI;nZB2R\u001e\\\u0017\u0003bxot\u0006\"W㮜l6KkO9@+ްxfۥ[~:cq@<u1\u001e\u001a?-YgΛ\u0016\u0010%\r#V~\u0010e\u0006t\u0016:\u0018\u001b/i̓\u0001/5՘~wꂛm4Z 9us[\u001f|t\u000bFip9\\\u0002\u0004Z/M3'_\\\u001dI'bK#7\u0018P^DIϧs\u00198\\\u0012K{@s\u000b\u0010T!q\u00166J*E)iBJ\u0012<*k\u00009#\u0001+P\u0001F.0_`\u0005J\u0015\u00144ŘaEwk\u00148\u001b.2n6+C\u0018\u0010K׿\u0013?(cwx\u0014ׂ K6{\u001a=\u001d\bs\u0006\u001c\u001aXw㦌z\tEL}\u0002g\u0006\u000f'S=\r)iO6\u0007-٘CBfNh8\u001cBثlD9\u0015\rNf1⎉+zvA&~K/:\u0014ˡ\u0017zHx6\u0007\u0003ݛ}7\fh\"w\u0017\u001f[\u0003Bh\u0010_ӕZ\u001dt7th\u0004a\u0000P`m\u000eX\"\no\u0013wC ԯ6Rh+MI.EDe%\u0005Jwb?M\"}\u0013\u0017O-6\u0002tö\u0006+tgN*bs-'V=\u001az\u0017Iݾ|B%+\u0012J+D\u0006X/\n`*:~H#\u0013߸g7Lqg.L%mWVG\u0017PtEx%iTI%\b[d/L\u000fE\u000efܤq1Ca\rJ3nJ!\u0002I[3\n%Dcp\u0014IR\rn&\u00014ｉ\u0010J\u0006yyۆ\u001dL.\u0013s\\]\u0017BoHׅ\u0012nퟅC\u000bO]7wU.\\F(彖)Fm>\u001c9f_\u0002~\f\u001d\u0007ovM꛳#0%<t!\u0004.i5,)Blr\tQsrV+_f:甾\u0012\u0007i\u00138X9u&Mq>L|5勘v\u0004q\u0006;`\u001f#Yd;$O ٟ֠\u0017yo(i\t9\u0015g(r]\u0007\u0015[J;E\u001c.\u0000\u001f\r.\"V\u0016'b\r2ϑj+JȆ`KAMyi+*C\u00037=OJK)j#Q\u000et\u0004`6e_\u001eS7ѥ4\u0005-/[*Mqy~zrn:\u0018~JOrzRU\u0012$$3=o{>E=Em:̨g]s\f42I\u001e\u0004|R2|M/\u0013>\u000ei\u0002bmwj7`\u00049ʘF)Kf5^(\u0004\u0003\u0018V\u001bK픿\u0014l>\u0015cwL\u0011픦\u0003\u001d;\u0007,~B|\u000b4N9 a\u001f\u001cX\"b]X܊(5\u0005v\u0015㊯By4A/9a_#^(2F6]d9jU\\H8Ή\u001dv}xÉ\u001f93^+7^-F̉#\t\f)؎\b\rʚ\u001f\u0016lrkź8Ouqbjk\u0005@G&\u0012k={K${\u0010Huqbjc\u0016Ĕ<.D3-ŉEI)X\u0017'\u000f'b]F b\u0013oP@7->B8G\u0017\u001dcR\u0004Pwcr\u000eDL\u0011e93HXb]Z\u000bh8eMr\u0006\u0019\"\u001fln*y\u001fft\u0018\nfcDH԰=DIl\u0013Ck4Z\u0013Sh.N,MwnRԧ\u0013S\u001b$X\u0017'\u0016/Sh.NVź8ź8$:\u0016Ĕ|{U3-ŉ\u0017sbq~s\n-\u0006@]ahC\u0001\u0015[Ϙ\u0013O #%@<K/6Si/\u0001:Y\u0010\u0005\\U|LYg4i[H0\u0005`GB\f؏\t竰 \u001f)qb6G8@]<d\u0013Qh\u0011N7dx+\u001f@&߉bZ >\u0016i.\u0011\u000b'&'$Z\u0013Sz\u001dOk\u0015CQx\u001a-ŉ_JIrـ\u0013K\u0005Gםh=\u0017zO9\u0007$n\t\u0015\u001f*7ҝ?\u0015gr\u0006\u000e6&\u001cE}u^!|7RM>\u0016W߷y.=ßaHf6\rb5E+\u00176\u0014\u0005j^D+jW.P_'\r\u0017\u0014o,d_\u000b*b}\"Y\u0003\u0012Ll\u0019x\u0005P>P\u0007\b\u0016,*\u0016Đ\u0014m:XBLCi\u0002\u000f\u001ey\u0006\u001d,,_L>S+W\u001c^~@#N&Woɘ\u000b\u0007\u001d:X\u0013u+xx\u000105˹\u0000R;C\u0013fiq\u0001h\u0005uD\u0004KI\u000be<Vޛpߡ\u001c\nyBT9s]SsDm%3/tjc\u0013w{\u0017r\u001dlW\u0015\u0002\u000bcgۇ\u001fZ?\n'\u0012-\n\r%FRpѰd׊Rk\u0012.\u0019\nR`\u000bKd((^\u0002:P?\nN@\u001f\u0005I_@/\u0010Gz_\u001al\u000e &0#Ы<\u000eħwe\u001d{~ꔹtuJ`\u001f\u0006((N \u001dCa}}CN!Z\u0019\u001cM'1\u0010|(i\tkg\n2m\u0003~\u0014\u000f'\nYt$:ȵ\u0004?sv\t\u0003wLg572+\u0012:XZOip@\u0007S\f{϶\u0016X\u00009aD,9'\u0018y8\fe\u0006?O\u0007a-D\u001d\u0017Y\"H\u0011\u0005h-ish\u0018\u000em'Cd'ádR\u000b3\u001cWg->7\u00119\b3\u0001@<\u001f\u0006 OT\u0004 6Og\u0002c۔k\ns\u001f!i\u00015Pa%Zn<nkc6zJ *,d}_kp\u001cu*\u0000>\u0004[i=2&i\u0006\u0016ܖQkΘX!\u0016.\u000bj\"2,>\u00151\u0010J~O\u0005]\u000bw+?lWVZKk9IJAi\u0007|7tZF2]GH\u0016zn\u00163\u0013e\u0007;yz\f\u001a\u0014mQ5\"\u0006\u000bRg6\u000bR\u0006$O<bK,v}{\rjN(}\u0015^+\r\bk;\u00127VDo)`\f|}[\u0000'3\u0017\u001aɃ \u0016:N\u001c]g\u000b(C>t\u0012MyNI;K]hI_\u001b\u0001+:\tK`U</6wN\u0003Gi\"7yw+\u000foJfX6\u0005َ'\u001egr3|Qxrl _1\t|\b,_,=HV7d12mF\u000b%\u0007UNIy@\u0011icU@s-U{Rwr:h\u000f\u001dAo$\u000e\"!i(VUZ``U'\u0015~.\u0018F)q遅\u0016_\u001e\u0017߸w&\u001e&\u0006eH}~'dF#`pXzKT(\u0019\u0007\u000bL$M<?t:Pn!P}Y6e`\u0019q\u0006s͙Ӫ#\u0003Uyo?N*m]N򄴉Rs\beO*Ʌ\beOYV:]\u0016Ǯ2A0WL\u0001ͪ\u0018\\K30Hb\u001aZ\u0007\u000f]\u0003.ʜWĿb.T}$5\u0003 \u001e[Plkۃ)\u0010EwȧQ|ۼA!pB\u0013>΂7\u0018D单7+z\u0016Y\f\u0015OB^-!'\u0017\u0007=4CO8وOe\u000f-2\u0012cj7)[\u001c\u001a\u000b%\u0013*lkz\tw\u000eWW\u0006\u001c}2T<e\\0sv[%Q\u000b\"*I{\u001e/W\u0011\u001eT'Kf\u001aZ^++JΒS/\u001b)[^n8ɕ,}{73i= B\u0006qY\f4\u001a7g6^\"6Oa\"-\u0010\u0017J\\\u0002W-e-K\u000b]C\f\u00133p\u001b \u00170*|dJ`oȄscGY1\tUbWg/8Tr#ŭU+B)M(vd9J4\u0007-t\u0007 :߿ퟆ\u0001NSkP:(\u000b@Kl\u001c\u001d\u00145+\"!\r\u0019\u001a~\u001056\u0015R@zO\fnӫ\u001b\t\u00161\u0014CS=>.*cPp¼\u0010?m\n N\bf?e]\u001b Wm@y\nf\u0004-pR)]~\fϤc\u001b_M<ytŝyg|\u0003vGl\u001c+G\\\u001an\u0019\u0018,5\u0007N(ub[CH[W3e(\u000eE[\u0017\u000fP'wH.\u0018-wosz\u0013a\u0005è\u0017\u0013z}q'\u0018Q}\u001b0\u000f&Y\u001bo\n\u0018H4sYw.~\u0004\u001eHAsA*8sCqM[\u0019z77sO+߻﫜#`::\u000b0K\u000e÷\u0002[tt[ߜ1\u001eU\\z,0`\u0002_39mtX\\@x)l\bI}@/LAV9T{\"t^J*S\b\\gJ\u0004\u0005*kq+ܣvM\u0019΄rvOU\u0007\u000fiT{e{\u000e5\ti^L9\u0001\u001eКg\u0005s\bqJ\u0001GFJ)r'FșV\u0004S3]2-v\u001aQ\u001f=!.#¼VX37`\u0007~g\u0010M<_wz.R.-'\u001eЧ\u0017Zp\u0003IY\u0012%ujt\u0005VS\u001d\u0017>h8i@\u0012)yV</c\"ż˄%\u0012ĳ\u0012\rY̞)W{xExzɤS6k\u0016\u001aaEUV\u001e+uu\u001c\u000fxHyWM\u0006~\u0010/\r(h\u0014Ɛ\u0019ؔ\noYrN\u001c\u001dT\u0015SA`ǤӇӑ8\u001cQsme󅏝\u0005)tBk?;Sl+&co1u\u000f<\r?\u000e\u0001$\u0006\\}}\u0006U\u0005n\u0013l#P0su\u0015c*\u0015\u0014g\u001e_~\u001ek\u000f\u0002g˞\u0017Q6;if\nl\u0007\u0002NiU\u0017㝲xq\u0014+`EЬbb#@\u001dO޵s|\u0013Dqf~F\u0016F~dy@k|\u000fZD\u0006;\u0012Gx\u000b4R6@\u0007*t|!$i\u0018i|\u0005\u0012@\u0007ϦQ(\u001e\u0013$AYuK\u0015kh'1Ӵ=f#O4ŰۭJ\u000f\u0003#imу/N\\Τ!,1)qjͭVx1\u0005V\f\u001f\u000b$?uS*؃ӕ57\u001c\tJ0Do*\f\u0006t\u0006!pcHLR\u0014)\u0007L$#Nu\"$7bY?ZKdUC&-pysK#|i*ϭ|TKڠ+-iٿo\u000eg5M67c\u0010Z2YA\u000f&\u0013\u001bl\u00161\u0018\\\u0016]2N\"(e\u001fBi\u001bM\u0018\u001bێgE4qn\u001c\tj?ۤΥ\u0006N\u0003T\u001c'Ih<N*!5\u0019\\g\rV߷`|9bld#&B9[1\u0012\u0006{>Mim\u0013%b?_y2P\u001d֯M}}JHJm#nO\u0019cfgGӀ:\u0006ń&G̮\u0011l^=\u00046rWq\u001c\u0004puu\u0015l)\\\\Ez\u0000:V\u0014o3F\u0004C9\u000bzt_Qymɸ.ݓsl\u0006s?nO:hL\u0014Ʃ:I1v\nF\u000fTT@=3`mO++r~dV\fȞt?\b\nV=\u0017\bKz(C6)0p\f3'}f|d7\u001dY7NՇJ\u0013{Qg[uGJz2b87v\u000bQJ00g\u00181\u0003{!1\"\u000e$u:1\u0002$\u001fM\u000bV;9@\u0013c3(W2焞)I3iNK-\u0014ܨ\u0004BJ7暖\"'\\=t\u000b3q[\u001c.NUhRwzI7|DYax%\u001a6\b]sѥ4M\u001b\u001eMqZ\ngΰvަZF\u0012~?RI6{\u0004g\u001c.\u0011Բ$+y\u0001\u001fk\u0012哔l:[>7\u0015q\"\u0019+$?I}c\fE9C.}.?gݮﺞD\u0000\u00132q\u001dScb\u00128{B\u0019xӨ+\fVcfQ\u0000\u000b=\\yZ,`44\u0013tFxJGXؔX\u0007_\u001e櫅$܌.3Кyoݚ\u000b\u0017Ȩj ?2P\u000eQC~&%I[.-\u0007\r{-`\u0010\u001e^HvH\u0019\"euw!\u0012|j!4J}}cp|}~\fa$_\u00064To\u0013n\u001e9J6Q\u0001␌;u(\u000f%6e{\u000b\u001fE@\u001bЎ|b\u0012(1f|vO4C%\u001b}뛙AddgA@⣢)Ҟ\\\u0003/m9﵅\u000eWg.\u001a*\u001d\u00054\u0015\u0011\")\\ZB\u0012Ql!o0Ȯ5$\u0019`\u001ezK\u0001~-\u0017t/j7ҽv\u0005ZJb=kU\u001d\u0005EDmc?Kľ/,\"z_Eg\u000bۄ+\u0013k\u0019/Og.\u001d4\u000efthzZr~Ǚ\u0016`}LYmȇz\"?Π`'yWs讦hJ;8Ja)2L>;L}\u0001;\u001dOH`?ڙ<u >\u001d\u0014##hD\u00148\"+hL6-s\u0003߅Hv\rWڟYio'J{;t~\u0013[#0˲O`1JH \u0000v7+7\u00181H]u͍A\u001f\u001eu-4\u0006\u001c_JnY4RG2VT\u001aK&>&A*8\u0013U\r\u0019\t>3\u0005k1.>>̀Y\n+Z\u0015IfT-\u0016ݶ\u0016EB)emi\f&\u0018?&맻\u0002c[0ZKCu^cP\u00059T&1ލ裶٤P5){8oϙ\u0007*\u0007-CeRxhf}ɉ` vr)\u0007;q\u0013v٪.u\u000fQ[\u0017\u001e-h=\t_?|\r\u0017к!<#\\=\u0007m\u0011\u000e*7\\pw\";C'nJ\u0006b\u0013Єiy\u0007\fȘ#rr녟'\u0003R[\u0001R\u0014=&d\tV\u0003L\u001e4ywWK3%D\u00180=%q\r*WM6ɻ(\u000e\u0003[x\r\u0015;n\u0010iUWۈ'\u0017>:Jv3|'ޝipJl'\n'D\t\"þL\u0006fܾ\u0003b(g܊oőG\u0017;$cIn\u0001v;;a`\u0012`NKe\u0019JZϨlÿm_{٬|{fAs\u001d$]|1(5\u000b\u000bG\u001e\u0017dPl\u0016b%\u0005\tNһ\b9\u00064Y.M%}\\j~E\u0002\u001b59>])>ƌ-B\u001eM9稗1A\nB/:^560\u0017JJ0Kz50]٬\u000b4\u0015E:xh\fNN~\\D\u000fK>zpfG\u0002{)8|=X=_7\u00157-K\fY&/&.O+v_9 W\u0001\u0007yO,7?\u0000Ln\u00073\u0002\r\u001f/S\u0019+\" P$M\u00060h{\tf\u0002&b;xM6{!sG\u00013\rw'\u0002斝RxK\u0002\u0016-/ 6\u0018G3?wSAY(PƄ>/B\u001cs\u0005SH,`|q\u0015ߘNХ\u0001sN\u001e\u001e`\u001a?K{Kyb\t\u000f\u0019&UL=Q>3Oa$=e\u0001-OF2\u0010_d ٮP>L+ڤ$&F%\u001b~9vC\u0018X\u0012*Dk\u001c>+\u0000P\\\"\u0000k_5g/c`ˆg4\u0019\\\u001e~/׏A\f]\u0018\u0012]k\r/Cq\nNœfO{It/>w\u0011?i*\bin(i\u0010b5\u001bYN\u0000zR\u0002z.[C2F\u000fl\u00185sC&\\12O)k\u0011|rkOF\u0003\u001bٴf;#0[h67?ޫ)k\u001b=\u000f\u000fAr@\u0012\u0011fYDQ\u0010%ETww\f\u0013\u0001j{bh+_k\u001fiv_{9\u000b̈.\u001cH<s\u000b\u001d-K p!\u0019\r1:w\u001eD2Z#g\u0010\u0007o\u0019E=e\u0005=dɘ\u0014\u0014QX\\0eni\u0013\u001b)sKe\f\u0013r\f\u000e$p\u0004ìl*t%T(#x&l[a(\u0018~\u001ci\"D\u00180enW\fS䖹(\u00194_> 0V[.e<[\u0002,s\u001fK6Kτ;\u000e:pR\f{f)sK(J1^\u0001ع=\u0005\u00172\u000b\u0018?7?>}\u000f82d\f\u000b\u001c0_+c,\u0004\u0001\u0012:\u0017\u00101/\\\\GDG\nzQ_\u0019\u0015lO-)\u0002sRVde\u0010ݦnȁ1C-kpiUmhM0\u0005aP\u001dQ_^H;U5\u0001Bm_B=X@Z\b\u001d?H\u0013\b48iB\\ׁ%ʑV&\u000fA,\u0012u\u000e]\u000enwm/҄N˥Rz6!\u0013P?~kf\u0004Rm?uReQl\tџvq\r'Ezy\u0019{\u0002\u001c\u001bɪ\u0017:Rl\u0012\u001cY\u001aR9kָƩi3{Tָ&e\u001c5~\\SHi`\u000b\u0016_nX\rOL]\u0004x|\u0011c.z\u0012}t`n\u0017\rxmF/+:jK5}8w8Ah5lwO>gx?\u0000\u0011jB<\u0001\u0011R'\bC?\u0001\u0011jB< B\rPr\u001fDA\u0010\u0007 B\r\u0010\u0000\"Ԅg4'GhD#'~\u0001\u0001iӰ`(Jt7텴,@dL@\u001d9|\u0018\u0018B?\"W/n\t`\u0017\u0001Z\u000bIy!=VB⏍8G7Bڛ /TeZ!m\u000eRκ_vvS\b>\u000b*?o\u000f\u000f>\t3\rń^9`)\u001fb@}л)s\u000f0\u0014?@\u0015T\u001a\u0011QE+\u0003v\u0006m@L'*w\u001988`T8\u0000x\u0015OiWCRm\u0017C\u0011F%8\u000e\u0005Ô\u0006_=a\\\u0014}1>W'a\u001a\u0014X5\trއWt#2s\f\u0016w\"B3\u0018K__(\u001aV}o}XyFPx\u001b\tuHE\u0003\u00138\u001eBE\u0000\u000eN0\u000f\u0010B:!KWwN?^\fEi)\tk^ỉ+-.g6ar`\bX\u0014J}F\u0014ff۟B$\u000309\u0014>7\"`B\u0018MGFFZIA\u00041Lr/|\u00074;ʷ,dK)\u0003?U~\u000b\u001f\u0017{.E\u0005\u0002k\b\\\u000b(QY-\u0007:\b>\u0000\u00047ȼb2*Y\bFܢ\nU9\u0017\u001fͻ_x\u000fCԇʵ\u0007E\td\u001f\u0013V`\u0017e\u001e\rvĿhG)\u0006\u0001Lst݂Map7=т,ׁ)\u000fJ\u0011QGG/?}\u0005\tw\u0003/\n}\u0006\u0006NFw)\u0011\u000b\u0002+sjM\u0003\u0006SZzA\ti7̺\u0004{P8\u0006\u0003\u0014\u0004\u0000%.\u0005C\n\u001e\b$\u001e*\u0017QC+\tz(ۜ_\bd6oD<qDJ7oߟ\u0006Ttw(ma{ooWXuߠKȝ\u0015ĝH\rq\u0016>.˳s=)|P؝\u001c+3ٻGoN8Ȣ\u001b}\u0006]'\u0006udm3j\u0010E~y+U~H\u0016ob!ǮEd\u0007'Z(]y\u0012JߜyowW\u0015bKE/P\u0006BpSd\u001e*z\u001f\\ߥx'`Tұ>&_Ju-\nOXR\u0017lk\u001bD\u0006r[?*2nCa'\u001c˷.\u0019QU-,d\u000eT\u0000̖h\u0003G\u0003v\\\u000ffOGXEJ\rJǿ\"[O\u001eX/]:=_aniz\u0019d,EUaANR\f,sbxD\u001e\u001e\u0003H\u0019m`Y\u00052,\u001d\\Q\u00055ͬw\u0007,ł]!TS{)7\u0000Ӟ❮ûC\u001e*|#<K\u0001J\r:\u0002xmg)y\u001f,+87J̺\u0005㽅\u0000\u0002\u001a?~\u0006L\u001f7;Gnܼ\t\\#%hX\u001a+Ap`\u001aYV8.˝wE::D\"gFْ\t?\u000faC\u0006_o]v\u0007ubxu\u0010+\u0003FV޷H.Ur(\u0005|s\u0007b\\1e-\u0000LI\t?ҺIХ\u0004\u000fG\f \u0011\u0013'H\u001b'\\\\tR^hI7\u000e[\u0001;Y\u0002Td^}\u0003\u0007\u001f/\n< \u001dQ:`bFϼ&>r\u0017\nF/J\u001cts\u0014\u0016N?݌t\u001f`G\u001c:VM|-H^HA\u000fvR\u0014U}d\u000fW\fvȟ*\u0007?3T\\Q}:3+RR0\fkOwUhBE4\"\u000eKzsMva+=wE\u001e\u0016_F?+7]\u001b݃O׊\u00198pwh7t=$g*C\u001exE\u0017[nK\u000e)g\u001d}Y3\u0002\u001e\u0013Et(pOK;\u0001EcRUk\u0001UҧwO?aӬ\u0018T\u001dGi\fWz$\u0010\u00056D\u0006OįQ\u001aFo\u0003l>tŸkBH5+ƕC@@!й\u00070O5gY\u0005\u0003G9Eq^ֲ=-\u0004]\u000b]O\u0011mf}ʷ'Y+ʿ[ΦU*\u0003\u0016\tO\u0017~ȫYS|^,)jC\u001dD,\u001c~B\u0000YI'j\u0002GPJmBh*m<%\u001fT\u001ddD{n\u0019u\u001b}h6,%ݢ-~gi=Z\u00061\u001b\u001el\u0000\u0002wNu\u0011\bv\u001bFn7C\u0002*o\u001c\nvwXoÈCG\u0007\u0005\u001a^o\u0011r޿W~&VҢW\u0007\u000e7{\u000ev7\u000f\u001c)ͧ\u000f\u0012wK\ru\u000bpr\u0007M1a?(\u001a:\u0018x\u001f+_\u0005\u0005>S~Őv`7o\rk9sz=5{\u001a^&[ͨ\u00180\u0006A{h\u0005u<F{\r\u000f\u0011vRf\u0018\u0010xz?1ܠ\u0014n8zo$d\u000f\tG\u0017i2\u001a5\"\u0001a\u0017OoV+)r1?=\u0002k ţ\u001f\u0000U\\y2޹u]m\u001eϿɺ\u001f@x\u0014^\u0012~\\9\u000bIcge\u000f/ܬO뗫\rU)1Y\u000e\u000f|@n5\u0016؃zVӮ6NoSX3;j`g+g@t=\u0004\u001e1^sO՟iӛU\u0010rC\u0016CNu=\u001e\bd+~W*`֚];z]\f\u001cP\\o40*.{[SpfpMC\u001d\u001a,>rq)g:Y\fOIVܕtw#2QR1K\u0011\u0003C)mϮwQ稃ITs+i>ʑdn\u0013\u0007}/n<\tZWKޖ\u0004goM'3l6\fd\u0019\u0018Rh`\u0003,лOpό{\u0004.n7lGH;lg3\u0000\u001dLr\u001e?\u000ftMTLQǡ|.\"@@[\"8z\u0007\u0012\u000eK\bJ߅\u0004{(\u0016f \u000f`M]tH39P\u000ew¡A\u0004K\b\u001ayG\u0011\u0016U\u001e\u000eŬiv?+\u0015QxW\u0015f'&~Q\u001ah:U\u000evʳ\u00023ja*QE&vլg~R\u0006T:j驞\u0018\t#1쬂\u00195~nS?qlF=zYsb6Y\u001aW\u0013~G߉[\r\u001b\u0015V.jso%<$qHL($p\u0019ZvB,Ϫ%d\u0019\u0014ng<\t\u0000\u0011bgBzx\u001f`\u001b݆i}\u0012\u0018\u0010^|\u00153$\u0002Gx@w&!\u001e7+\u0005\u0005\u001fXc\t\u000fz9F|??\rwsKK\u0007\u0006wj4!9\u00140<Б\u0014U|0|\u0017<dA\f:eŠ DY,˻/\u0018)$\t-\u0016ń$>\b\u0006\u0019\u0004\t\u0013BwR\u00131c^NGQ\u001dLo\u00164\u0016q+O4YjR>X\u001cJ: \nv/3\u001bT-<\u0015Eb(+\u000b56zk\ty\u001bAeTontYo.\u001f\u0001]\u000bI$!jrgC\u0011dx\u001e\t\u001a4)C\"cPT&FC\u0013`RbhhD4@x1\u0014q*}]^J!&;\u0017r\u0010\u000b\u000f\u000f=/\r\u0017B\u000b)ۢ\u0011)a7n\u001f\\\u0010i\b\tɉA\u0003+]V\r3y\u0000o\u0006?a\u0011\u0004>O\\y*3I7\u0007lYrFp'?6}\u0015EZmj!t`[>%+\u0006*fK]\u0015\u0010s06n\u000e<\u001bYv\u001f\nW$fDzj=f&tYR:F<\u001cP\u0001%'\u0019\u0016\u001f\u0019&̆\r/\u0004g\ntĉcJ/+UV\u000e\bDEhXr4zv#ݰ>6mb]X\u001dP;3}|-ec\u0018\u0011\bx/0,=5<Kn%Abn\u0018}۫\u0018IET\\[-\u0004\u001a`,/݁[\u0013_~h,\u0003]靈$w(+z6UC\u0002\u00055\bwxi\t\rp̯!t\nE4\u001cD\u0013@_\u000f\u0011y(0\u001auCzh\u000e=DI-[к@\ne{4g&{ۑXډ\r\u001fY90؏۬`9E \u001e\u0010r\u001e֘*\u000eHo9\u0004Y\u0007\u0004s\u001cZh*\u0010B\u00169e%!\u0002+`nHEuZYrŰǂ%!0~ G+-O\u000eg?\u0006\u0013.RV]bOF\u0014\f>TtxR\u0003\\ʁҹЗ\n+Ib6\u0006\"d\u0005@{0*J3a\u0005/[\u001dj\u0002?U6pߴtS2\u0017ZhU\u0012DC\u00041Fy3t\u001b\u0015l-z\"\r+\b\u000e\u001e<8/ck\u001bcW-26\u0014(3實~G8\u001d`\fĬi{3EnNȵ9I\u0010Em\bi%\b|!\"ӵ$ޒ\u0001\u0005X={ۊ҄4\u0007/#}LpZ'< {ǌ)\\\u0012j5;\"r4e]i΀Qa3\u0005ٻ1?e5\n_'N4n=$da(\u0017&MnuHd5:4!v/#]I\u0003YxԖ2\u0010\u001d4f\u0005[Z\u0002M\u001ax6q1Ws3#h\"5W\u0004+T)\u0005}zQ\\\u000b\u000f\u0010\u0000!A\u001b1<\u0011Z\u0017\u000eGKm̉K\u000bޞΡ{w\u0004!\u000e\r\u0016pbQ$Ks/֎\u001cH)\"4ÁsȣDe`M(#NvÈW߅/H\u000ehu=Q\u000b3Ѩ\u0014bO\u000e\b\u001d(.hn\u001e\u0016\r/Σ^7\u000f\u0004L\\cva\u001d8h\r\u0002ㅄ\u000f\u0015^p\u0001pgn\u0002\th\\i\rdd3`sDq@j\nʁ }@}ij;\u001fMdU\u0004R_wQh\u0005\u000euރNFױ\u0014\u0016Uu]m\u0016ު\t$6nՒο_U)Y\u0004\u001c촮fki9Sǰ\u0007֯vBZ\u001c B3\ng\u0006:Zhm\u0016,6׵\u0019\fP>\u0019\nG(4J\u0019BX\u0004g,H_yM\u0001\u0011ǉcJĻ\u0012ʣu!@9# \u0001CH,@ڿX\u0003Q\u000e/`M>>\u001aGp\u001c]1#\u001f{\u0012\r\u0005鉕|Te_oڦl\u00056i/\u0013ۀepv3K\u0004/b/\b\f9,r\u0012\u000f0>4Nbz \r\u000ea\u00037&]\u000f\u0000Evh\u0013ŸodBo9\u0014zB`=H\u0010'کf<Y\u0003ͦo=Q\u0018;\u00144D\u0016I\u0002\u000b\t\u0014a\u0018\u0005\u0001.4B7F(0ׁRp\u0003P~D&c@b$[EkFBߌQw_\u0015Vu:o[VfT\u0013zC}3+.xSR\rOXk\u0004P\u0017a\u001d!,^UuPůP\r|\tߕB'\u000f<JT+Fk\u0007\u0002!\u0004iB!z7*4MsU\u0007ؗϛ\u001dⰊX\u0015,3D+f=DH\u0016[<fVXhC\u001a@\u0001\u001d\u0001\u001c[](\n\u0002i:09J\fG\u000e׸b\u0016y:g\u0015Uuvˮ8~ryy&j\u0005v\u0011\fڍ뽣>a]3\r,d^Y\u001cVk\u0000+\u0003j\u0012 $w\u0006vV}6Eǲ~)<\u001eBs\u0015\u000e5$\u00056\ff}v0$,\u001a\u0011\u0019YmB\u00116'<T#\u0002;+\u0011S\u0017\u001eն\u001d^a=\u0006=\u0013y;uF;6O.\u0002k)\\[\u0015\f68[H\u0006C\u001e8+%\u0013ZT!<#-<C]\u0013\u001a갋\rH\u0019ge9U\u0018:F\u001d2]^^c\u000fG{\tpg nwkA,.>8sTz\u001akM0@^\u0006\bJ>'۾FhPtw\u001b\u001f\u0010㞄\u0007o\u0010\u00141Xa.\u0007\\)\u0002&\rA\t\u0000Q%缱\u0007/a\u0007c_XɰRBe9d!ټ,I\u00025m\u0005F\u0011T\u0019:!ⷲ\u0006xH\f\"Ln[^&\u0003_x\u0007cS\"Y\u00048!E\fU9B\u0001\u0014,\u0007\r0k2Sb,\u0015'bR4À/,@\u0007$`^ȡIѨ\b\u0001E(#\u001ee\u0015u.:4Zʜzh&VC3#be\t0\u0004\u0003|AaC=Lo^8v0\tG5\u0000\u001aޣ\u0011\u0018,RM\u0011^N\u001dn\\\u000e1z#S8k\u001cKf\u0015\"fo\u0018Ө\u0010p\u0001t\u001cFVDLA\u0012c\u0004wp-\u0015\u0012\r\u0013v'\u000b5*B\te3з\u0010%\u0007\t,z9B9<\u0010Ge+Gt iJӢ\fFkR7Qc&-L\u0019!Z-xon\f\u0015;T\u001bn\u0001\u0012yota\u0014,&\u000fyol\nd1Ϊ\u0005Ppƛyol\u0016GzolZ'Q\u0019{s\u0003Eщ\u0011 '\t4_\u0001N2ɹVh=QMH/H\"g]\u0007\bgϙgc\u0011۲&{^LVțe|U\u0004^\u0010֨\u0017|#u\u001cBXUB\u0004\u0015\u0003\"ElZ\u000euqZ\b\u001a\u0003\u0001\u0014$Kwr\u0004HW!\u0018\u00019nn2gc8\u0014\u0007\u0018\bgBiy\bO\u0005)i|VG/,a\rR\u0014,8FA)\u0018\b_Q\u0018E\f\u00108.s\\b$\twÄֻ9i\u0002=;L㳁)p\u0007\u0017gl6cd1\u000e<{T\u0006:\u0018@P8\u001cCk(((%\u0019հ\u0011=i\r3z\u001a\u0017 ƌ\u0012\u0000F\u0003\u0002F\tŦQݜ\u0019%\u0000\nfiQ\u0002(\u0011\u0019{ǈz\u000bpʛ\n4\u001eL^\u000eOþs$\u000e\fﱿ$E\u0010\fd\u0015\u0006\u0007\u0007:=HD\u000fd풴~rAѬ?fp\u0001m\n;\u0013F`v\u000b\u0006b*?\u0005h\u001f\u001b\u0016\u001b:`cg\u000eBj3Hlfy@3QA\u00104E\f֚@x׺1b0w\u0010=\u0014!N\u0004\u0019E\u0010=&A\u0006N14\u0000!Z\u0015T\u0003\u000eMr,\u0004*5qb{Iy?$5\u001aR^i\u001e\u001fb{\b5Ui\bw\u00174ƞ7p?\u0010\u0010|S蟈҈ju>i3\u001be\f\u0017%Ŋ*\u0018(4XQ='\u0005(\u000fࢤQաYbE\u0012`,EMB\u0019<\u001e.J\u0015Ud\rA\u001eU+;5ѡ+\u001c]Zk\u0010i\u001byn\u0019u^\u001eWՓ`\u001aB(g\u000fk\u001a~s&XQ\b;\u0012.J\u0015>GEI\u0019u$\\\u0014+jC=bEmRࢤXQRH()VT@\u001d\u0003\u0017%ŊJ#ZL!\u000e+j\u0013V\u001f\t\u0017%ŊEI\u0012\t\u001c\t\u0017%Ŋ\u0002GEuNX\u0017+jCţᢤXQ\u000e\u0002\\\u0014+jᢤXQ۾ZQpQRgsX&V;\u0012.J\u00159\u0012.$E\u0006\u0017%Ŋ\u001a\u001e\u0019VT4<\u001a;1IᢤXQ,\u0014ImhjF\u0011\"%vB\u001e\r\u0017Y.VwC}4Dk\u000b X\u000f.Oq\u0017)y\u001br$EcێY\\5\u000fH\u000e'{n媛\u0006a\"\"p&a֔dI*pGPm\u00106ͳ!\u0003eM.S*\u0019\u0011P\u0011QAj˵ǦBV\u001cBzh'<6\u001afCduw25̟T\u0011\u001dic*DMp\u001a1\u0015RF,!\u001ficCEh'1\u001aۘ\u0004L!ѲNhcj;@?)V\"o|IF6*SmRg=46vR\u001bӃC3h<\u001aB\u001dt25A\u0015g%U\u0006\r`A\n(De~ZŸ2\u001c\u0003sڔWV4\u0010u q5mW,X\u0013״)\u00018RGذ\u0005?\u000fԡJ6\u0004Yڂ=\u0011K\u0018g>Nڢg\u00161p\u001d\\(g*FL\u001dTȅ -fyS57$(AU:ɒ\\\u001a\u001cf8\u001dS5U9ȎJ'd\u001e\u000b4\nf5nfL&\u0005\"ƐAM1mm{L!Qi;\u0012Ie\u0019g\u0000G?&\u0013뺜E&SlXWa-_Uj  X\\7a\u0019l\u0011+T\u001c#pHjR3FH+A\u0019zE6\u001e*fL!LY\u0007h]qբγ\u000bqҲ@R8O9u[\u0013\u0012W!u=ysnNML\u0010u.'*aVO2,z@A*\u0006bȇpPy\u0012\u0004\u0007D\u000b|t;p\u0014\u001c.4oItKQtKɽW\u000f\u001a\u001e\u0001<G\u0013j\u00022\u0005nzt \u000b0<\\\u0001\u000etn6'vK5F,ꖊ\u001b\b=[T)<\u0012?,\u001a\u00109\u000b(\u0019v:\u001cKP8G2=`\u0011$%B25=\ti\\\u0000a3\u000b\u0018\u0018Q0a\"4qba\u0014Q&\u001f=/\u0010@\u0006Hdŉ\u0015I\u0010J7ӭ7/Ǩ\u0006<\\Femk\rA,JC\u001aJ=iNMC\u001e\u001e1I}h#\u001aE'[G4+\u0003Y\u000fUu4Yv )\f\u0003\u000e\u0005v\u0018Մ4\u001aMSFXx^0H!K(?\bRy\u001ah\"RG4Ad]h\u0016_g;(\bH\u0006|'h\u001dD;Oo\\(;NB\u0003\u0011\u00196Nh\\,T5L[uKFN\u001euv Vg\u001d${4J5\u0010kl*(\u0007RK7JU\u001e\u001aq\tR\r\u000f|RmOlj3^֑Ru<hm*JOmL3`\u0012\u0003m\u0015ζ3݀UAkAQa\u00023\bj\u001d\u001c$PFVl-\u0002W#J$KXL!\u0013ku'D8&㿸F/s݆b]Ff7E3P\u0016z/֓/g\u0013S_x*9\u0012s|>\u0017ÚHwKY\u001a_Oe\n\u0016\"\u0006\u0015N]9;E}}#lgխ$25z6|gB,4ggA^>Gi\u0018R̪Aϖ.ѥn{^pg~RY)T:C;/n\u0013\u001czvdײ=V5-\u0007\u000fY=i\u001371\nnw91W\u001c\u00026/w2\t\r\u000eeyo,-X[?&$,\u0017m\u001c7\u0001:Yv\u0001`U\u0006w,u3lc\u001akM(\u000fn4\u000eQ'<D\u0002\u0018\u0004\u000b\u001c%$f}5,\u0017k, J\u0013xL{Ɋ/gJ9\u0006j\u001fh&mOSmm<\tZ\u000e9!Qbo\u0004%IW/oj\u0014e\u0015|j@ D]\u001b(SF6\u0007F,e!\u0013\u0003\u00057\u001cD\bhUs\u000fjs\u001eB5dl\u0015P'\u0019`;,NQ->QF\tIdP\u0014̻e遖\fF#V6!JΫ\f\u001aeuȖe_M[@4xM{+I/W]\\Iv\"XjƯf]El\u00066\u0013Ǻt&\u00045mpX<Sv\"Xy\u0003b\u001c<aP\u0013'xrv\"\u0006L\u0003dR$\t\u0010\bz\u0010r{jv\"<\u001bô\u0004\u0002V=\u001aa\u00012P`7S@{R:gtlJ֣+\u000e^)9*\u000f\u0012pP\u000ep^c=M\u000f\u001f]\u001dfI\u0016Vpk=|g\u001aIU>\\\u001c|k\u0011vRfI7oe:Z:ִ\u000f:bj) ؆Y\\:OC\u001d\talJ]hf(\u0016\u00070iA\u0014KC\u001cM*G3óX;4<\u0000U\u001b\\\u001f\u0012^X9+\u0007;e\u0017iG\\\u0005\u0018cff!\r\rtENQn\u001a\"\u0001\u001fЁb\fy\u0014W1MQz6\u00135Eխ\u001cd\rͶ;DL9@\u0013D\u001a2\u0013K\u0002\u0017c;s6E\u0010Aڄʰd 㑲\u001f#euyΏ\"emƛ\u0010)+\u0018)K,^\u00178+RV~P\u0017Vt(զN\u0014&r\u0007,\btee!5\u001fXW*m~\u0014TH؜a`\u0014\u0012tw\u00139\u0005 B6\rk2!v\u0007$xXK?ܼx?D\u0000[@\u0007\t\u0001@o)6_?[(6\rY\u0002L>#\u0007\u0014%,Գݔ\t\u0004\u0007MwҦ``-''AݢPZ\u001d'{x6qVT\u001fm)\u000fs\u0007\u0005A`<\u0019Ү \u001dROĮ(΁]i=A\u0018\u000f`\u0017cWt0\u001ep3`({\u0019h7\u001f0\u001ecd*]uH;6\u0013S:5\u0005ym\u001c$N\"\u0007\u001fM\u0012'\u0018vb{If3j~p$\u0015󄊜\u0000z\u0005\u0014i[\u00076x\u000f\u000bc͇ƶ{X\u001c\u000f8\r\u001e8p\u0005:0m\f)W~RMѕF?a9\t\u00072yF{\u0005t 3 ڬ2<\u00049yV~\u0018@\fYN@8\u001c\u000fa\u001a{\u0004\u0005Q $ghK10(U<8'\u001a^Qv\u0014t\u0011\fd?L\u0000o@̃\u001fF.%r\u0014\u0015g/\u0011j\u000e}d\u000far<maQ(?jJ\\/\u001d߮y:5\u0010VTἃ0\u00129\u0007lf$@8\u0001n#\u000e\u0007:}:@R֚a>R*)\u0000y!;[Fu>*f\u0000<OJ1%wt1F=5F^g}顝}%J\u0019IyDaʃ理(\n[\u00127>EQ;0\u0015\u0006֡6\"?HĳNmi$*t%r?XݚԈЋ\u001fa&\u001f-yLŉ| g\u000e7QS&#0k\"\u0010(Y<}\u0019[R.y\":I<{\u001dZ~Rֿ;t.8e_1z@VllGUrcۺK\u0007[\u0015/̘͢4Հ#\u0019ͺ\u0003\u000ev0g=WOiށog\u000f?G1*қ%ĳ^̔G*>\u0006\u0016rӵѫ\u0006І\u000eMݘV\u001f]kݒ]k/\u0002\u0015Ţvf6\u001fK\u001dz\u0005)bL\u0019}2\u00182WkmU\u0018f\u001d\u001aa7Q^=nf}3K{-7\u0015`fMV\fi\u0016m\u0013{K@\t\u000b|n\u0018uW4 d\u0019.f1\u001c\u0016\bw/L+hp\u0006YQլ\u0011ڈ\u0004/;쬉󶈛\bٜj7jj#d9(8\u001cyզ\u0006ɖ\u000bI!\u000fϸV\u0000Gx0wpz\bʸn;Baoq-\u0017Y\u0006{\u0004ϼ/O\u001dnm]'Ӌ\u001f{(\u0007\u0010*@Q[2ι=]23&m,K\u0019WK&HG\fP=`\f\u0001:(fLJw?*S\u0007'Ax7@e1\u001e\u0016b%>k\bvδC\"U7\u0001\u001bDw,,iܳشI\u001an\u0005g4\u0006C?8G\u0014us޸\u001e\u0019\u001fTݣ\u0003EK>+As[\rg\f\u0013CS)Ec4a^'ZG9̇Ꮣ#xAÿ\u0018k\u0002\ncz\u000ec 6i9\u001dcl~8'\u0018gf1\u00164\u001br\u0018c\u001bju\u000bc\u0018c\rk\u000f\\\fcl)φ\u0000c9/SumgLy,\u0017A'iMKWIAt0\ttҵ\u001175E\u0017Z:4f\u000b;(xh$t\u000f\rR:\u001fB\u0006\u0015&>`\u001cfgf\u0010n\f63,iq!\r?4:Yِ\\o{\u000fz)\b[\u0013\b▴BGŹ_l~\u0004\u0004gR\u0016\u001cT.?/\u001e(\u0010\bqA+l\u0000\u0004<گx3\u001eY_j\u0012\u001bff^6Ӱ:M`ޭtNZZ8\u0017\t\u000e+\f\u000f0=F\u001dDH\u0012lD(e%e\u0000k\u0007$<9*(<\u0006W\u0003XSa51)'7\u000fni_c\u0005ʲ,K6ڞ˥QvrYPf1\u0016\u001cV:jgtq.@\f=5\u0004çͤ_i9C4\u000e&nrZ`\u0005zڎ\u0006a\u001b\u0007e\u001c\u0003+k\u001cey:V\u0019\u0010+z/Fُq\u000bּs4\u000e{飧5\u000e&\u0003bǷ8\u0012T}lEP5.W\u001d>\u0012Tm3kn6H\u0002-\u00022\\N&eiĸ#AG][\u0003UQ\u0011#Aws@&$@=,l\b`>Hv9\u0007-{9\u0006:[Kζi\u000e\n>nwhӁ.?{\u0006rk\u0014Oo \u0010\fOݏ\u0015(\r\u000ed\u0014MP(\u0001~`V\\qM1\\nn#l)N\u0004;-\t6\u0011&Wu?\u0004\u001b\u0001[7&Xr\u0019\u0004\u001b;\n\u0001\t\rdefCM\u0004\u0018n\u0004\u000bTyMs\u0013 }\u0010fJ!J\u0019[\u0012'ehy\u0003 Ԓ&F&\u0007TyVD݀&M[\u001f`Q\u0006\u0015X\u0013\r.k4\nݍ\u0006:ĘjFRE| F6\u0017h h^cߛ Rg(2YH;h6\u0013Ggs\u0006J{<g^'Cf\u00069=2ۊ\u000eA;BGl\rNp\u0014>NF\u0003Y\u00108\u001d\u001a\rt̆()hZ@_S|#gm\u000fE7m&\bNo}p7ͷᡝͷN\u0005юj\u0011A\f\u0007ʤ\u0011\"{}oz}(\u001dFH˂\u0012>\u000em&df\u0003ۇ3H\u0010U\u0019\u0000je\u0019M\u001f\rU&ڷ>D%&51@b^6\u001e\u001az\\ӱn>\\v!tu1\u001bkoG6T\u001a\u0001+\\b~\u000f.)m\n@\u0007\u0017\u000fu.+q+7n>/`q=L\r\u001aL\f+\u0001E6˯\u0000e=V)^;g:\u0004O\u0005\u000bW:役d\\qUd=x:}[\u000e5n8i.-+_F{|]@%i\u001drIV\u001eni\u0007%j\u0016\u0011\u000f{\u0017\"\u000f-[r$;S\u000e*f^m\u0015\u001f\u000bտMK(\nD\rh Zaq\bdvnJ\u0004Cd1h%WuWP._\u0002z\\ؿ\u0012JQL<ӛ\u000ba\u001d~xA^\u000e0dDL\u0016\r_QN\u0005QdF\f\u001f4W|\u0000\u0005oG\u0001|0N\u00062q\u0018~\u001f\u001eJ4\u0004+a\\\u001a\u001eݕ|\u0001b\u001eB8~,/4wUuR*ֻ}H2O\u0005}ˠg\u000f\u0015\u0010VN\\I<s\u000f*Xν8|FL7E]M\u0007+Ń\"o\u0017z\rT&\";\u0012zs\u001bWBbWV=EmL-=R\u0004D#/\u0002\u0005o=(\u0010y\t*]5k%\u0016q^5y\nN\u00039\u000e\bhELH2i\u0018LK\u0005}_\u000bWmrU\u00129,\u0007(Td\n)\u001d]7\nːnm3c6W\u0003o\u0019YȖv\u0015+]tkmz\u0011\u0005\u0003L^K \u001c\u001cGnro6]M\r [\u001a\\d\u00031a__j\\pz@ w0k Gz+nQY\u000eD/d\u0017׈53Ir\u0016cZV \u0011kq2<B8\u0018<K>\u0018hIwG\"d^s6E\t:\u0019.s7mT4Eo>\nlkR@D>\u001fԿ/0\rx\u0000S\b\r\u0002\u000fHt4dlY\u0018o\u0017,4\u0003xb\u0011\u001f>[9\u001bBQJ\u0016\u0001=U\u0014'ddl@U]>(?n1Ө\u0011[cHH\u001fō1\u0017pзxe'\u0012ȒZCd,49=j\fPqj'B?ߖ@\u000e#\u000bk{\n?|[ҾĝnF\u0017lB\"=h\t\u001f=\u000b2\u0007>u\\CЍݳ\u0006V\u00031;0\rT_fbA{>K{8d,S\bm\u0014R\u0006v%p\u001c\u0019(m#\u0010\u000f\tW2\u0005j\b5\u0011˔|*I\"Qt`o01\u000boQZ5L,#oI\u0012{Ȇ2&Ƽר\u0010Tã.4\u001bvD j!\"mE\u0004â%/<=}\u0005f5:%\u0006W9\u0001$V,gkK5c=E\u001eK\\\u001aRn\u000fͭ\u0014+PQ\u001f^>\u001b`KʳA\t⮋\u001d8ߛHY-pՊ\u0019\u0017ukQ\u001fM>\u001ckUӓPz\u001e\n_\nG?BeXwP\u000f\u0005C7\u0003>|\u0007B\u0003\u000fԿ\u0013CSa\u0012?\u00186V\b4\u001eK_eX\tތ:B\u0000\u001e$\u0000R\u0000sMWAb\u00044p\t\u0012)C`FC=MP\u001d(\"\u001b\u000e\u000e'BO[C;\u0004\u001eP6>\u0004mMO!l\u0011(d\u0012ؒ+=-Iy\u0012:UgcE?ʏ\u001cNדȌ]\u0002Gݭ'\u0001\u001d\u0001U\t\r\u0003\u0014MLT\u0016U9\u0016\u0010S\t\f5\u0018E+\u0007GqO5\u0007]IdrY\u0003_y\u0014&̷Yw*)a6)</(v}/U~H\u0016ob!/(\u0004,⭟+RN+\u0006_cU\tv!Y&G\\LP55\u0019\u000f8Rô);\u001b\u0010\u001cDAۓD\u0019%g\u0010Q\u0017^w,T/R\u0017zMѵ?\u0018x7D\u0014oX\u0017vbY)Kя\u0011|*9\u0003ۛ4_;Jy&\u0014i\u001b\u001bعCq5}3\u00148n.\u001a\u0007%u\r}|\u0003l\u001aH!a\u001bv}gHĔw\u001d;ڤF\u0001݄N_'?F\u0015š@~\u0010j\nZnn7m\u001fHMlw!*\u0013\\o6\u0013kDNf%^\u0015\u0015\u001a\b~׳/\"%m\u001a\u001a1堻9x)\u0007\b\u0011HѴ*\b̆`EdiB\u0018Ɋ\u0016\u000eH_\b9\u00019ĵ\u001c0\u0014d+t:A\u0014DM\"\u00124{\nA\u001bP>gR-bo6ue[.1]ȺjHg\u001csU7&\\&SəT\n\u0018oNZ\u0006?GPJ9xhjAG G\u0007Cd\u0012\u0005x)[SHZ\u001dk\u0019J9)%^mD*fTLI9\u0003MJ\"w\\Soŵ\"\u0019S๵H<CQ,\u0007y\u0007-в%z2D#\u000eH\\NA^p7JzhlO\u0001,\u000f#_\u0018:\bG\u001dDqJ(\bQuFVQ\ts\u000e҃M*!h1;w⃺\u0015^r؋͚\r\u0006-n\u0015:Gu7񱉂AFg\u0007cB74q¿k\b\tS/\n\u0016c3ھynjBi7M\u000e\u001c(=Z\u0001&\u001d3h\nipxl_\u00009n\u001c\\ԇJ\u001c;xBdiN,.\u0007\u00114\u000f\u0004-ΒxW}s=;A\u000f/5A[q\u000eپ'\u00114kS\u0015\u0001R\u0000?}?MgE\u0013lr݇d'Һ\b9+b\n.߸\u001b\u001b۾\u001b\u0012u.FF/\u0011عWW\u0013=eH{Xx&ON#3|0k.H>]{X'\u001aeKj\u000f)R<\u0014I|=|3Ţ\u0001\na,գݸ\u0016L#I>Ҡ\u00073\u00194,U+&ˑ\u00051@-y\u0007\u0014Dj\u000fSɇe\u0011G\u001eF\b#i#\u001bi.\fO<lWDW|7\u000b.7x\u0013\"bwA6ҝ\u001b\u0004>^\u0016Q>4<GOđ\u001ed\u001a_}r\u001f&\u0010&\u0018\u001a#\bI\"<\u0017\u0015M±dI\u0014}\u001c\u0017\ty.\u001c\u0000M\u000f0dn\u0013r\u0007-.G%q31&ˆc\u0013e<\u0013\u001d:\u0013Ĝm)\u001a=̭E,XtrDZ6ŕ],j15G\u0007#D9EO?\u0014\u001d-`#\rS\u0002IRA[Ё\u001b7\u0007jӀN\u0005*K\u001d[#,'a\u0004}c\u001fm=\"Di]GS{*Ik\u0005C\n#\u001b,\u0002dYET\f\u0000ZzN\u0017س,\u0019τ$X*>͊N\\\u001b'UT\u0004w\u0002*dE\u0019j\"\u000fb[G\nة*K,U)_ѕ?ـ\u000b+\u0012p⿅U4?A4\nlB<%Fa(\u0012/3\u0018dSg?|}qnl\u001d+;$!\rS=)\u0016\u001fs\u0007.\u0017\u0002i\u0004K\u0002kָ}\u000b:\u0002ly˿ԜB28@1 V\u000f,\u0007`(+\\]T\u001a\u0011*\u0015y^pK!fTy\u000bQ\"`\u000b\u00100l@rC%\u001eJx\u001bЏ3%\n0\nȅ\u001f_6A\u001dJǀ]\rǐ\u0014&V9^\u000eR\u0003toςϺ\u0007⃐%}\u00124\u0000pL\u0000:0e)c-c\rx?2D\u001a6\u0004)PK:\u0004\u0013\u0013KH\u0006\u000b\u000b\u0003p[*\u0016k\u0006(4Q~*/\u0005\"ͻ\u0019\u000b>\u000f\n/zS\u001c}X\b.Kߐ\u001e\\Ga/:B\u0005ÚJ\u0011y<H\u0002\u0018Rz#M:нZ3hOytg\u0017ɸ?`D>8f\u001f\u0015\u0014*א=\nD\u0014\u0001jJ1\u001dT\u0007\u000b]Fn0\u0014W7\u0019118FL\u0018c!)`F\rAR3]G\u001c|iQ=Of|,\u001a(>*p7SnƏMwrO?~h\u0014U\u001d8+h\n뾤\u001feih)1^Ҭ/\u0011Żn\u0014u_\rbwX\u001exr\u00039x;Ϟ4=B&\r\u0019KDT˸а\u00163\br\u000b鄂\u0005:N#!J\u0014[J\fK>s[%u}ָ4\u001747\u0017ߥj;tVm(*E~Wx*\u0010.RR/7\u000b/9\rXw+R{e *nڙC\u000e<\u0016\u0018v\u0017)f\u0001nr\u0006jȷf][pJH\u0007I?\n\u0011#\fƍD\u000e\"\u0012ܓ3\u0007Ⱥ*-9\u0007{BVsCf\u0004?+W(\r}I\u001fԅ6qī \u000bWow]\u001a:C%?oL\u0015eUAQi\u001dv_0d*\u000e\u0006rYޖE]\u0007M\u001c%*\t<ܯc^+\u0012\r\u0007P\fNW\u001dDoh7~*B`\u0012\u0015\n\u0010qXW\u001c\u0010\u000fK\u0004*{ifffJ=r\u0017\u0000,Z;\f\u000eҽ4\u001ex_/qR\u0012,j\u001a\\g1e\f|+A4B:\n Pr2U)6%thTuCwW`ω^dyli\f)\u0002L\u001b:0eq\u0016\u0005u3is\u000f#M>\f.q,X;\u000b̂\u000fL}F%%kM?0\u001drw.@\rSEd`j9r\t\u000f3cV=\u001a\u000b\u0003\u0001_\u0000\u0015G4=k})J\u0003O\u0014]xpПk2\\BӣD1o\\\u0005k\u000b{-\u0012T\t\\ɂ#c\u001d\u001dv˄s&r\u0002R\u0007<{\u0000R3E{Fmcw\u000bf\u0002poHڞ{'S\u0001\u0005y6o\u0014x\n\u001b\u000f\t/Aզk0aDP!1bݷ\tT2Z\u0001U\u001b\u00030\u0002n~iN\u0002I\u001a\u001fVL.]e2Fug|>.9\u0018e%u=w0=\u0012`oВ\u0006.&\u0017zݿ;PeЏά\u001fmFWT2\n^s-A\u0012nL\u0013i$(SW)܍t%nP7`H`SB\u0012\u0006`:,@a\n\u0010\u000foM@ܪp'r^\u0017\u001d@&=@y*T\nL8L;?#-#B\u0016R\u0014,\u000b\ryRZf|PO\f.p5v㍴i\u0017\u001d_@\u0002\u0005\u001ec~TZ\u0006LUц\u0001Y4zd2qe`N\u0003㢑`\r]\"\u0019Yp^n\u0015D*\u001d\u0017?\u001d\u0002\u0017&<B\u0017P\u0007ћ+߰\t)?,k8@\u0018f%\u0007\f\u0012,:\u0007\"\nXwu\rf#p\u000bA\u0012\u000e9@ʁ$\b\u001cnX\"'>^&\n\u0011̩\u0019K1 \u000bD\u0007o\u0007,.&VLBg\u0006 }v1\u0005aX\u0016 8\u0015]\u0003q0F ?\u0005÷f|x\u0005\\K\u0007\\](G\u0011g/K}ט\u001d܊+\u00145\u000f\u000f\u0002G=֪A*A'd\u000e.\u0013\u001d]\u0002K\u0002\u00042n\u0003$J\u0017\u000e5 h\u001f7k+\r&mzi;IO&\u0017\u001ct\u0011dԀ\u0005c\u0000~̚1a\u0003ڀk7WW\u000e\u0002@ eH;\u0001[g\u0003\u0014U\rL6n]-q\u0016C$\u0000\u000bLL\u0006(<Upe2j%bH\u0011\u0003@\u0004C\fH\t1\u0003͋\u000b\u0000sWa\u0003\u001f\u0017`-^oNƌc7\u0007t\u001dȏ\u0010xsA:I\u0005/&\u000fBơg=\u0005\\e\u0002\fkVtLB:}\u0001\u0003ώBS|-\u00129\u0019\u000bB~\u000e\u0005g8}\u0003+L\u0013\u0003J9\u000fd#\u000b\u001f=]y\u001a̘\u0000z|\u0003\":~\u001cy9C\tU\u0017#6M+s\tio\u0007m\u0018\u001a\u001e|g,\u0005?gtc\u0002n]./@%\u0016e\nyVhri|Bڐ\ra\u0017Ng{+3_9x\u001bݰT?\u0014im\u0012z\u0001b\u001c4eD6u9-<G2<,\u000eϝt$r\u001akRj'նS+\\5\u0001i\u000fnxb\tZ\u0004\u001c-]`\u000b\u000e2u\\W\u0006\u000bL -T\u0002;G^n͙hy:\\#ZF\f\t\u001btS`FY \"';|ຣG\nB\u0004=ϣi\u000b41-#\u001e\nZnD\u000b[\u000fEzXp.;E7*[g\u0010Hj9\u0013\u0012O\u0015\u001f]{ȳ\u001b\u001e?[l\u000e\rXf{7\u000b@Z-(\u0006˗}^$QNl;\u001b6|i\nt\u0000\u0015N`$\n\"ZѯUz\f0_\u0006\u00191YX>\u0000úb\u000f(/pbFgP8\f\"|Z2/яҞ/&\u001bd53˽%\u000e~:[tXz\u00022rw\"\u000b\u001fdxTQԛzv\u001b+L[\u0004\u0018F\b<\u0005\u0017?ztCN*\r\u0016i\u0007fl[.=a\nOhx\u0005;'\u0005J>\u0003\u000et\f\u0002m~>_!\u0001:\u0003͂\u0000`}{\u0006s\n\f\u0014\b\u0014Wq5Hq3Z.\u0016ԬQcFٕ\u0003UXťF]hT\u0001s\u0018\u001dn'm\u0018]\u000bUM݀pKZ.-\u00039_9O!Y\u000e>n\u0000{M}33\u000f\u001d g,fanZA\u001f'/O\u0005\u001cJ>8\r0S}\u001ft\f'H\u0015vj\u000bt^\u0003\u0013]̏l6wHuo%w4gpe2Z\u0003eg\u0007|õa\u001e@ȝ\u001c\u0000c*3h\u0001U\u0013\\åy,(z\u001cd\u0004\u0013\u0017\tbXx\u0011K\u001a,5\\\r\nendstream\rendobj\r23 0 obj\r<</Length 65536>>stream\r\nAF&\\طC_~v=*\u000f;\u0002\u0016ggݖx\u0001lVN\u0014+\u0005\\%nU\u000f{oًA3*\u001d\u001c87\u0014\u0006\u0004r_0&\u000brw\u0017(54!\u0016=ȸ\u0014og^k\u0003Jt3R_s֗\u000fRu\n(\u001f:\u0017ޞjG}ȷ\u0014Xe\"-\u0017\u0016瘷yq\u0007\u0015\u0002\u0010l+o(?hPw.\u0016缍F7w$*d~t;Y\u000253~\u0002[ԸT~\u0007)ƒ\u0003 6\u001b\u0005h9\u0002\u001e'\u0016Xq;\f\u0013Q5`\u0013\u001be'<^\u0016\\;\u000b,~z&7@O\u001e\u0001m\u0010Q,x%\u0000_RN1f'7\u0005KVJ>G}@\u0019\u001d=G\u0005\u0013~xX3dɩXDВ\u000b\u0003:3t%\u0011*+\u0016=6ͭ\u001e_8N'R\u0007K\u001d\b\r:P\u001dNH\u0012\u0000֫Lrp\u0016|\u0001h+׷J\b\u0013Ȗt=aƗ+KO<\\ts!]:y懦B~Аޟv\f-}aZD\u0018Ho.\u001bnWs,_\r5\rmrwFLͦB.\u001c\u001dF\u0005⛔\u000eJC\u0019bc@y\u000f\u0017\u001ak*kJc/c\"\u0014ǌ~gӘ&@\"ŕ<羲;(i`\u0003y;a\u0000)7CHA\u0005$\u0001n.<7^RQ0~\r\u0013f\u0000r>sM\u0015_̄])\u001aQ\u001f</?HpHu\u001737;զ\n ٫\u000e \u000e_\u0014٫n\u000b\u0001?\u000eU\rP\u0004t\u0014\\\u0010 _ީLO\u001c2X\u0011N=\f/Cمqtǎ\u0007}%\u000b\"eYHsH9D#!\u0014vP<\u000e\u001d\u0002J\"\u001bϡ>|\u000eC@$CdoS\u001b\t.jW^9h\u000f!K6\u0013C\u001d?ez\u0012\u0003LfDZNDb`v\u0010^o8b<(F\\9yOPFcuf\u0014)\u0000~\f\fz\"\u0010EĲ9ǎ\u0001\b\u0005t`]\t7╯\u0003fOVH۫\u0011\u0000'!\u001b:'H65K_h\u0006O\u0002-B\bzYU2}ST\u001a?W+\u001d\u001aUo O}QS(\rH0\u0000v\u000eHJSJ#\u0001DJ;VRr\u0011\u0007x4ft\u00187\"\u000fU9\u0000\u0015\u001c\"|zX<4ҍpoJew7\u001cc#ǑO)U)\u001c\u001a\u0018[JbFO#7abE칀\u001b\u0011<T|+\u000el\u0001bέ@cȴ]\u0004x\u001dJ<j\u00116Oc~\u0012ڄrI:ɏ%OE\b!\u0005P\u001d?J\u001fFcc@L\u0013\u0017\u001f1O\u001f!vH<\u0003\u0002bxXZ~m\u0005A\u0003zy\bI{\t1\u001bf\u00051O\u001e\u0013\u0004V\u001b_\u0010\fS\u001fZ·%؝FTף`\u0012\n\u0012`\u0015\u00178{E\u0004r>]]/ϙpnW_\u0013Hgn\u0002\nߥ\u0003z\f*a{ԓX)\u000f\n\u0004\u0000GW8MӔ|\u001f5\u001f[\u0003zrtp\u0015/q\u0019i\u000eJ<+H\u000e\\g2<O\u0004\u001cMVIy\b.Ϗ2\u000ezЁ#JT#\u0012\u0016ACORsO.F\u0017\"cYvݰ\u0000ƽUH:&mwW\u0015ž\u0004\u0000gr9\"_T6\"tƃ\u0003*\u0004\u000f廊{\u0013w\u0002\u0019\u0014\u0017k$D\b%\b\u0007f\ny6\b\u0010 \u0000_]\u001d|#\u001eA\t~[A\u0006ޞ\t?\u0019]蔪+}2B,9\u001cS\u0012\u0012{b+~CK\u000eQ$\"\u0000\u0005>&^%|a5U\u0003!#\u00157\u0015\u000b6TmJ`\bP&M\u0000E}*pKٰ\u0016}\u0016\u001eDZ\n>=&sYn<D\n\u0004 \u0000QG\u001b\\t'Ƭ|j\u0010\u0015\u0015Y\u0014ȔGk:x\r\n\u0015l\u0004| .\u0000\u001dԠDW*\u0007\u001a>[n/q;Y6΀k\u0019p\u0003>O\\e\f\\zI4SJ\u0010\u0019C\r:\u0007\"`ś**^\u0019^\"\u0004.\u0001de\u0003z\u001d\u0011=\u0014\u0001\u0016\r\b?@\u0011\u000fgZǠX_`\u0001\u001dXY\u0001\u001fPA Z6w/м\u0011J\"\u0007~\u0005\u001dǫtp8_\r]#uɖz>o\u0011v#\u0015I,Y\b rUHF\"\u001e\"w^AXbۖo\n~b1yn\r\flif\u0001ޙ|1\u0004_]\\4n3̐1ÔO0\u0013\u001b0/\u001e_e񔊐)!2^\nd0\u000bEdΧ\u0004\u0000N{\u0014>%@ً_\u0000!D\u0014}\u0013k(«\u0002 :RznsE>?xػ'D:dLoA\u0006\n\u0012>zp%\u0003\u0006q+\u001eT\u000e`kuosƋI!\tH̴e/+]\u001e\b\u0018\u0007;\u0001\u0016:\\cA<oB\"L\u0013ip\u0019F\u00110\u0014:~#aʁۿDcH\u000b\u00052\u0002N\u0005\u0016\u0015\u001fD\u001bTC\u0003FiG{q\t\tR\npȆT-\u0002\u0000~tX+pJ5$\u0003wxw\u0010\u0019?&\u0002٫\u000eۤ\b\b\u0013(ݦ\u000bZ4\"8t\f\\F6)\u0001y\u0007Y琇9kU\u0015Tt<ډC.Pp7Wj(I2[\"-pA7k\bGI8Z:lWHNWkO'$\u000b\u0012]B\u0013\u0013~R\u001fC+ǟb\u001dyށԫQ0\u001a\u001e\u0006\u0002\u001ea_z|x&6\u0003=CJ\u00005\u000b<\u0000y)\u0001\u0011\u0003a*\u00170Lў=4Z\u00135oϺ\n&\u0010\tӵ\u0019\u0017<b\u001d 56U\nlB\u001dS޷\\R\u0010\u0018\u0002{\r\u000b*t/ΎDs\u0017Him^~y~$<n'\t,v\u000f>=^WK\t).0\u0015vnAY\u0004~Y\u0019|Wo\u0013e!K0,\u00192W2RH\u00105ƛ+# L1њd\u0005!\r]aF\u0019\u0007k\u0007\u001er\u0007t\tb4JYA`]\u00128\r\t2\n{,\u0003+\u001a+l\u0015k\u0004z\u001bd\u0004o@՞͏џ|\u001b\u00128t\baq\u0006T]\t,4h\"PУ\"@@wC\u0013%$\u0018x+@/2\u0015bQp\b\u000f\u0002\t\u0000aJ\u001d\u00145\u000eD;\u0000\u0002&5,A@)\u000b\u0014FE\u0000\u0004\\z6*7N\u0007??̘ݜQ\u0015U#9o\u001b2\u0010\u0001\u0013UfB>Š\n\u0018Pt\u000b\u000bfɶw?\u000b開<@s\u0018&\u001a1QfGab\no,\u0017)1rSt9?Q\u001f\u0001G>o Hm\u0017ϣ\rr?<\u001b\\w<}vU{*\u0002K]\"<R\u0013\u0001>\u000foD2\u001dH{&WՒr\u000fP\u0005z\u0016B<?l<VK]\"\u000b\u0001\\\u0002Ι\u0000!4\u0006Ee\u001a+?\u00148zJ&l\u00124\u0018S\u001aL:& $AT:&&lW847\u0002AIQǀ\u0019\u0011\n\r'[L\u0010i/p7}f5,46|{HoOMn͊J\u001aRh\u001fŋ¾d\u0001ޠ\u0001O1ˌ*\u0015 o/\u001dJw\u000b́+2BO\u001b*\u0013h7{7\u000f=\u0004Qp\"\u000fs}~X^CW\u0013\t,t7\nn\u0017\\qx-5EF(P8D\u0000c\n\u0013?*`O\u001dD=~nJ^RZSoN_(y\"V\u000bJ\u00145Ke1\u0015\u0010\u0013`b7wn56ȍ[\u001b<\u0003K%R(\t*2\u000e\u0003o`\u0005?/>Ė\u000e\n+nԙp>r#\u0017U\u0016;*V\u0000\u0002.(|}OڍL\u0019\u0004d\u0003.7[\"M@\u001bp9Xxq\u001e\u000e\u0018\u0012[z?q;D1L\u0012d\u0014\n@H\u0006sPU\r EU\u001eHXHi+U۹\t+JuSy뾚?6|#R>p\u0019\rol\u0000622b\u0014\u0003\u0010}\u000b|\u0014c|\tiRT\u0003NU*\u001e6԰MB?H6\t׫ȟv^6#!Aj\u001bZ^t6Q\tF~\u0018׽\u0004\\i,~a7+H\u0006\u001dPsKCe-~ul{aG&Xe\u001f\u0014ˏ_ZO,*]ᨚ~W&ԁ$;\u001eJ4MNjPtS\u0001S` Onhx\u0014g\f,WAL\u0011c\u0014\u0014bzgQ:\u0019P6\u00104f1\u0010\rzw]7\u001d\u001bLn\u001c}w\u000euPӡPU\u000b!</\u0019#\u0014\u0017V S}\u001eQ1_\u0001ſ7\u0007ڬ)-ǋV+e.p\u0019\u0019ϥSm%$63gl\u000b{fF\u001a\u0000P\u0011\u0011`DӰк1wd\u0012`@\u0014!)*F2寝S\u0002AI,z=Ύ%\u0003\u0014T|1gNo _e:\u000f\u0015oZ!\tJ\n\twt(QYJ`Wo\u0013P\u0006|E9b\u0000ޅH+J\u0015Pj\u0012~\u001ftgǶ\u001bR848u;<r\u000fps]\u0015k&`\u0006g!.$\b5,AP\n,Ģ>\u0003b\u0000\u001a\n\u0001X#\u00020\u0012c\u000fL\u0013\u001b\u0017D\\4ԊoE=\u0016\u001a/@i݆?\u001b{~pv(\u00176Tm\u0010\u001fD\\0q!MPH\u0014FB*eH;~\u0003\u001bfX\u0014Dhfڶ7\u0013+\u0012j\n5Ξr3k`\u001a\u000e\u000b\u0017TŊ\ft%֡NH|e\"ߙj\u001eY?{\u0003\u0019d?X9DYVmIcI\u000f\u0013קXD%}>\u0015QkI'DI|\u001beFoe֕r@J\u0018\u001631*\u0003\u001fPc|e\n<P\u0000Q\u001b7\u000bM\t(uv\u0016l\\\u000e)j#\u0006*̲R}ph&js\u000b}\u0001;)Z `ߋ\u0007?vQw7\\\\tuY-S\u000bP\u0000\u0006hOK0݇g\u001d֩\u0001\n]\u0002\u0004%n\u0019H07@\u0006كG\u000e!\u0003y|h\u001a#y|4x!)ǃ.K,\u0013).\u0006?i,}6\u0001'w\u001fw\byH!\u001a\u0013pQz\u001a\u000f;1t\u001fw\bqf2IPH7z?\u001enŕ!pQ5`\u0005p'v\u001e/Q#3v{8gL9L\u000eS\u001f/Gv[\u0015\u0018\n_>\u0013o^kLnЃ\u0011P\u00143|1iC3F>*&DPޘ9irЁ\f]\u0013d\u0002\u001b\u0019rSd\u0002\u001bY>L&\u0005g\u0011fr\u0004\"B43F\u0006Ӝl&\u0013{J\u0013ཁ:?I-bVc;mś@tK.df\u001eh`fKjJsgޥ.=[V%UJTRAYp\u0000^6 \u001ca\u0018{#n\u0010\u000eܘrM]\u001bް\u001d\\L8]_l\u0000ŀ9R֣{\u00074S'O?SNbIv5/\\A}Pb3f!33i!{Lyǆ\u0007|dlwMi=f!o6h󰘘m_H\u000bQ\u001f\u0011`HO<\u0001(h}f\u001e(\u000f\u000b\u00191S$z\u000b\u001a{\"\u0004VsT\u0018K]\n,_.M+[.\u0016%)Sk\n\fE\n^\u0006XA#s٨s\u000f\u0016c\u000eV\u0017S\u001aÇ\u0015cԀR\u0003aT\u001dix9dG&]t,R>V\bg\u001b\rYlo@2RqψL\u001aHǻG2\u001egSI\u0004[92,\u001fn1D,v]\r\".K\u001a\u0007JEKo\u0006\u0013\u0013J\u0014!\u001e惡.н׾W}d\t{\u001241\u001f\u0014\r\u0002O4ؔJ:I`H\u001clpu5NfPiS\u0002\u0014\rxOUb*\b\u000fqxQ\u0019\tY`UaQa9Fcaenlx\u00196\u0010dFc;\u0003\u000b,CW\u0013|\u0002a'&4c^-\u001bݐ\u0002H{\u0011!y#|&MyQ$\nX!hҧ\fAGšXDuxsi\fԲ৳r5G!bVl7EM\u0016&R\u0014r>\u001d\f0ML0l\u000f,^b>>t\u0011.Ƞ,όӼlu)D*\u0016.ޜ̰>䏙.\u00140EP7Q՜VęH\u0010oS<>^\u0016H\u0007CfrOJQnc\u0011j k,eWoxykf+\\\u001a5d(yG'\u000b@6_ꡫ\f\u0011\u0016%xsd \u0015ڻ0\u00068\u0016nn\u0001W=\u0003ܙcNN6~QS\nx8KO\u001d\b<lȍS4a\u0004eiGVVv]\u0007\"s1޳xxIL\u001cn_c@lz`~Tn٢#f5&6'!+ٞK;l\u0013\u0018*emO.<\u0014S117a-z\u0012%\u000b&\u0005*-\u0010W\u0014Ϧ\t\nx+/tY\u0018fKڣ\u0006NICg\u000fyh7l1kdL}DG\fQG\nhi@x!ev?\u0006\u001801+\u0001&݋,L[gs5js5K\u0006I6.*k쉚@qF咹J\u001f\rnNT5W6QS\tY\\AJFC\u0014i).\u00025\n\u000e'\u0012yy$33\u0001B8t#6}Q\u000b\u001b+\u0013(\u000fX{\u0016W.,g4VW[\u001e.p2.\u0007'dx81-E8\t9(\\ꛛ\u0013.u]Oh\f׺1)2_\t)qV\u001aWF\u0016_ctu\u0015>.\u000buQ\u000e\u0012\u0018zAlY*170a\nqDrZy,\r9s0a{,#\u001eK\u001a)NK#r`\u000fR\u0014lxsF+ڱE\u0007j'5jTvG]=ܗ.hG1ݒmU\u001fا\u000fR,\u0017q72R \u001dZ\f1.F8:f\f\u001dg@\u001eFʂ37Lg\u0015\ndL}s7gaډq7'2\u0012i/(36h?*&\u0004vsh{w9<~;d,)\u000e\rfL$/6OxeЖІ Ccbi^\u000f'i(sv\u0018_\\.L\u000b30IMY\u000f\u0005\u0005eł8d$.N\u0010]9mi\u0014Mnw{S+m\u0003ŕQ6+_}\u000bSfۆ+Rh\u0013q1\u0019\fxw 彮|k\u0010Hfsep_\u0019fD\u001c\u00154QYpE/\u0013:4)U\u001f:d7\u000eȽ\u000b\u001d=^-)/]\u0018S2\u001d7k;P\u0007t\u0012\u0019LC\u0013c\u0012<^\u00183'1\"\u00073Glge\u0005.\t\u000fdC֪-\u001fe\u000fIj\u0019lM)0z;ؒHRnW.ߘ\u0018\u0005;1)K\u0011\u0014J0\u0019OY*K\"\u0003ey9j\fNW΃Αclteᖥx\n\",v.Ց\u001bd+\u0016oMmnllضL@n\u0017C\u0014nR|L\u0005X-W::;=St-I\u00062FZvDږoB:>:\u0018\b\u001a=\u0014=';\u001b\u0004˶\b|\u0006h\u0018iTK\u00024;\u001b\u0010~<\u0018.\u0000MG93\u0003.\u001ajo\u001bY2H{\u0007h\u0012\u000b}Bqtu/ցNy얰#8=a4\bK\rr\u000el\\rvk\fzPQ%a\r3˥\u001dG!\u001c9'zޮ@Ťs\"m\"_Ͷc63\u001b_8be3\u001do\u0003\u0013hnL(aOWo7+x3++|ҫ\u0011LoW&fzjfVtͬ,X\u0017h7+kҫ7f,Syjy3Ac:ia0L\tJ\\L\u00178՛ɂ)6Tkd\u001e\"J\u000b\u001aqԘ>gmnhӧweNs#sRwIJ\u0012t\u001f\u001c%\tr\u001bm,v\u0000bkl~s8 7o\u001c\u0010'@o9\u001akJL\\7men\u001a||.zk63t\u0010ތ\b#\t1bS7z\n;-B\u0013\\̕~ݖl̕~V\u0006*->=s_a4[\tx;K]{\u0006MpaǅM+4yj\\7m%\u000fRXSWL\nԑo@S[=+}\u0007Xlt\u0019X\u000e˫E+K̠lKzgwlh\"AVV\u001aZ:v+@\u000b-򢙊\u0006\u0014<\u001d(Exe5Nb\u0013I6ڜ\u0004=\u00079϶#{\u0004=c>)PUJ\u0013\u0014\u001a\u00136l6[44v64 \u0019Ikr\u0019K\u0012cn~Ū|`x%췂\u000fb=Y+V\u00045&)r*\u001f{ZrsIbALU\u000f\r$Y%Z$\u0000Wnpw ]͎dgǽ<Z\u000e\u000e,<^{m7;\u0015\b\u00128`lUiKT1\u0005\\IW\u001a0Էl\u001eq~t#/W0voLLDsǐ\u0018\u001e>\"]N\\Zbӭ';؇`sMgy31)\\&۱L[\\Jҵ>%I=\u001aR\u000ey躙ľ?_-\u0011\u000133ߠ\u001a#YMy\u0011<2Wytޥz=N\u0007#ι\"ƈsLUA\u0011,s&ƈscny\u0011%=\b:<_\f'&\u0014qpLo\u001e]\u0003=%46r1םj寧\u0018ylWW\u001et\\$Lvw\u000e&HbZ@`-i>)r%&44\u000e]\u001cMt !,V|xv\rNѐHR\th]\r6|?֩,e*\u0005A\n8\u0011#\u001a(C \u001e(\bLHfW\u001d\u0003T\u0014\u0000te߇M\u001dpݪ0!0>~\u0016\u000b\u0001>\u0000Ȉ\u0001:%\u0000hM\u0014DߨVnf6ژ\u0013\u0003\u00051vMHl&g3H\u000eĪE#\u001dFPF,\tv\u001cTfc\u0017{@\u0019_t\u0005'J~\u001e6\u001dMG;WZcל׺\u001e.'G.-\u000b\u0006$ĽvfA!3/աɑںؖZQ\u001f^#[Ʋr\u0004cd l,~ ~\u0004\n+$\rwkFW,ͅG\u000f`u8g\u000b7\u000fĭDfb~j~c\u0003F{c\u0017l}sfm\nS6\u0014 Q\r\u00183ikX\u001d\f\u000e\u0001@@P[%\u0000(`'3+dw8\\1\u0000\f.\u0006\betv(%\u0019&=K230i\u0004\u0002uR\u0010\u0003́޻\u0004\u0012殻)v,\u000b&d\u0018eRt$\u001e9er۝6}={㠞**f=']f]Kz-7\u001dML͑Cп$z,&dbQ|zdK+a\u000f\u0017iY\"i@y1<1uU\u001cK/5\u000b$<\u0015_Y:ĥĴ8㋫xh\u001bA\u0016\\䙶ǧ5,sgڢj\u0003.Y\u001arY\u00010W\u0001\rz\u001ap\u0000zg<vB8=z.ӸE\u0015g+f.\u0012֮\\\u0013>$:`w\u001cǦ\b\f.nLp?@mm9mSЖK5f.L[\u0014pۂJtǯid|ye$LFn>:\u0006P[\u0004q>4\u0015VJ67g.L[Ħ\u001a3m\u0011\u00136\\\u0019\u001di?۵g.Z]y\u00119\u0015H\u001f[\"C4*sgڢc3\u0017y-⳸ޙUe.L[\u0014(Ox^G\"I$ChT\"$Rͧ:ܺ}DF\u0017[`\u001e\u001d0N\"<pI\f\u001d]\u0004ass26<\u0016\u001a\tЍ]cGnIWױ`\u0011RP)(Ph\\#[\u0019e\u0001ɶ\f\\\u0013`Ħ6T&;=={te:\u001dC\u0017y`-?:U- 3\t\u001a.I>m|ϫ\u0017G}^k$)l[W`\fip\u0006/寶F=1\tŅ:qX(B\u001bƘLx\u0018.l}:}tj`%\u0003\\\u001a\u0012\"_X\u0012Q:wueIyG{>bO9=\\vU-i6;SX<v7\u0019X\u0014º<?6ustfd))Z|v\u001a,l\u0000<\u0019\u001e_<I7yz;.S\u001e(=kH_\u001eߍf\u0016\u0018jWYpg,\u0011\u000f\u000bBHh6ys[lG\u001b3%\u00158-/J蠼P8\u001fkW{8\u001f\u001ee\u0002Q2&N\u0017,s+\u001br~*@U.*PZ\u0016G7r-1,^9zc\u001a[7-mhG#i{Si(-\t{\tp\"dR`\u0001vMyn;K8\u000fU\r\u0018a\u0015Pؔdvq\u0007=\u0003x6\u0007\u0005Uz*lH\u0012t6fF\u0015՗Ge-_%h\u0017Sc\u0018\u0002\u0018ǭ}\u001c\u0007UuG]\"?j|i0l&?\u0002G\u0005qcomxetM\u000e2w/Ӧ&vqs\u000fˉxG\u00121cyҗ4Ǜ=#|q\u00190\u001d\u0000GNk'+͓eÕC+u\rvfid\u0007+\u0001+Apuv\r{']CJVfB\fV-35:Oui)1H۠`i͑x9\"\u0016Jec` $ڕO\b\\\u0014O~q\u001ao\u001d#\u000fx*3q\u0018\u001a{Eߖf|4#[-h(\u001e\u0019\u0005 CW\u0014Բ.L=SK­[l/gρN,\r_7ԏ(3ű+^яI.Ͱ\u0004{/e:h()Y\u001d]k=gj\u001e\u001c\u0002q,\u0018;=)ѷ[n՞q\u0019=~\u0019W:4:W+dJBwo\u0015gn|Μc&õ\u0016f-HƲ|\u001foT:f\\x^(̷Y>v\n\u0011bWStY\u0019>\u0011\u000fBL73<*|~~D~<)ε\u0013a6G7[sLl~[\u0019)\u0003WhmG\u0001=t?Jq\r+A\u0005xrd)\u001f\u0018IFhn9\u000euv\u000brLh\u0017D+\u0007\tQ\u0018;n\t\u001b\u000f%:˒'Yn$貿\u0004ƍ8\"l*дNα٘=9{छff\u001e]\u001c\u0012.^5\u00073\t\u000bn\u0004.֝\u0011[ci\u0003'rTw\u0013tjv\u0016\u0004f Kc[\"!l9zlxne@:Jl[dk\u0018:\u0014:bJ٤\f\u000fT]C͑bs$־R,B\fgW\u001d6S7\u0006j4\u00102!\u000fɖl8\r8YP\u0002fjq-º\u0000^dكY6I\"-G XSx>\u00122 g*-\u0012r,0ҜE.\u0015o{Pꂾ\u0018\u001e`\u0001$Kk\u0012t\u0019\u00027\"\u0017z\b\u00155\u000e\u0018yLa̋\nK\u000bzL\u0011Q~K<_K]Q~-Y\u001b/X*\u0003S6\n\u00161\r\u0006@{U\u0002e-\u0017B5\u001f]\u0007bIfn[uMgѐi^'\u0002KS\\7`C<G%򽆗\u0003.<n\u0016QG\u0005u\u0005\u001cME5\u0002\u001fEY8)H\u0011A<+pVǸ\u0016\u001fUƠ\u0011,ɯO[c\u001cҚ\f\u0018t\tmHRl{`i9~e.)͝vz\u0019KC@:5w11-n2?f]ψ~\u0018c9A\u0019X<J\f[ҷ0W=`e\nP/#7'g&&jxt!s\u0010o\u000bm$ظ\u0018\u000e\u0012S\u0017w\u000eW:ږ\u0013t%AA[ǡNo\u001e0l\t╭xH{Rl1_٣M-L\u0016\")|,U\f-5dK0-{J/[0P)[B0\rȖwjL\r74[=Jt\\%T\u001a\u0010\f%GT_Dln/_\u0013ĔXRɝ\u0001\u001ajkݼc\u0015\u001c\u0018tY2NkT\u0014ځzyt75\u001ckfiJ3hs8\u001baf\b\u000e.\rػM2+>}{a\u0004ٽ\u001cVo hdBl;\n\u0011\nI?i\u0000kX\u0010L;vlz|f_ȍKCqyh6_?\u0010vfQq(6[&ܾiZɴ^an~Vm~k[mum~R\u001az7v}\u001d\u0011Q6\u0011%no3.k[=۸v[V\\F\u001d,\u0017;#\u0010\u000f3o\u0015n\u001f\\c\u0015=fyi׫\\\u0015,&RK¬{%6up\u0012O$I| \u0017\u0017ZsmqSW\"W\u000fr0*.%]\u0013&7Y\u0004\u0002 AGZ\u000f\u0017\tz0;\u0012\u0005m24\u000fȒRP\u0015\u000258\u0018gtߩ+>HW1{UUfq}6h9Wc\fXۈZJcu;y)\u0013\f\u0007\u001d3gy\u0004zvklfH!yUw۱{T\u001a5\n\u000fNbU\u00182!ym\u0016*'?1\u0013\u001ew*<M\u0013\u0017ɂ#1cf?\u001fK4N\u0004rSo\u000f 2\u0003$<\f,a{de=\u001e\u0010tLnP|L#\u0015НgǆZ6lpE\tg;zjv/N[\fDb::S3۲KTٰ4=΁b쳲#&^!\u0004':\u0011įMcc\u0013I\u0018\u001chؾvuyXGP\u000bK{'p۰Q<o=l\n6`HM\u001d\u001ao\\5p+*Ԇ^a=\u001aX\btzӣ\tXLUOM(F>4k$g6Q\u0019s\u000f-YK6:,_>o*RF͑35]z=\u0015۾N\u001aY\"\u0012\b\t̏zd\u0005p5M]Y`}糙\u001b\u001f+.Y\u0004:\u001a\u00118$N3?G\u0019u'&db_/n\u001f/ŦR7i`NouL[\u00112\u0005IEm/\u001dw7z/)&\u0010+`|U\u0010+]\u001e1Ri>\u0013ϫ\u0018\\Ac\f\u0018\u00114zj\\?a]5\bҽ9FJwlE&dKm)A\u0001|vE3&3P*)G Kd3>\u001ef./eL*]\u001f\u001a\u0017WFNk#Х\u001680^y%P3%uJ\\\u0016\u001c%T\u0015Tz{liPbmto^WfAwuq\tx<\u001cz\u0007X\\^\u0007-!ͅ׎I\fTqy9x\u0016͵b{Vof{_Z\u0014X!VgSױZ\u00013Y%\u0017e\u001aut\u0007^\u0012s\u001bU\nb\u0018ORȖj\u0002ǘǁZA\u0007nx<\u0012pMlVk\"}mv-\u0004ޯuu.\u0011d<.иGIˆ\u0012,\u001bFxnቑddL\tu\f\u0002aEb\u000e\u0012\u001c\u001d\u001f\u0015r׸HD\tu^-e~?-ln!ѾK$uرOƇg4Ɏش<6\u001c_=\u0005]5Z2\u0011eT݄wA\u0013eϦT\u0019=::\ntFYwd\u0015t\"ui\f^넋\u0006\nJ'-\u0004:~\t\ru﹵ֈ\u001c/\u000bg#a;̔uFlmك19%>ބB͖R.vGb\u0003qCtU/y\t;ż5|%a{>as~CO͸\u0018<\u001116\rë\u0013[-',@~-Dצo.\u0016^Ce)\n3C=yVRf݌wV'ۡ\u0012C_r<J\fݎoޘ#C\u0013\u0005\u001e;{p@srSf\u0015Yc*\u001e*:t\u0003Rf9\r* ;|YָNmaF5>eVA\u00164:eVA:\u0016_Es\u0016(\u0007\u00052P\u0016PK\tĔ\u0014gY\b-W\u00162\ri\u0004fە[0\fobO\u0004uмp%+\u0018TgNRϬ0Fw\u0017cЊr`tS\u001c˴vT\"5\u0012fbbGMG#lk)̧fyр{\u0006\u0018ύ\u0005◲B\u0010QC8v8%\u001fφFŵKm\u001ak_iKL&v\u0013t-|\"̴V\u0011gc\u001aw\u0015(\u0002>6\u0016qW@SE_4쎔N\u0013t7gw\u0013eܜ*`~7\u0016(>ڋ'$\u0007.\u000e$;~\u0010krPnG\u0012d\u0005\u0010K+XGܑvSeB\u0007\u0016k-.A7R>vj)CWTUME\rqNqYa)\u0016\u0012_ێS>*qx|ZM;NYj\u001abĀ_\u00151PXi8\u001fkhTq*\u00151P\u001dn*Pr\u001dn[58UvSp\u001awJ'#Sxzq \u0002k\u0004>>V6Rl\u0015+|!d\\'.'_\u0005EhJ\u001fk5\u0015\u0013$N&[Ifm|o-A-G\u001dGlEi\"\b1=E\u001c;LT1`i#G(emR\u0012M9(l \u0003\r\u000e7[_eKcq:;,٣M\u001b=cz\u0014Wn\n=\\n\\>\tZaa~ory\u0019bE:B\u0011ሗe^vy=\u0006^[-62)pT\nErDl_Sk'\u000fX\u001e\u0016S>O|\u0012\u001d\u001d\fʻkzXq\u0011.=oĵ^r,bWm11MoHv92Dmnl\u0019\u0015_JpOl?<K\\\u0018\u000f\u00177vEI\u001d\blXk,osO,)̆lM$EW\u0013Wgi4#[mmp#͑\u0012}l\u001ak'SOr\u00162TUVjU|ԇ-%\u0013e\u00010\rߙO\u0007m\u000fB\u0019\u001b^_\u001czL\u0012z8:\t#d\u00146ٹ}S%$!\u0002ON\u0006t\u0000:HWwS\"\u0013tᡕ-'|Ƈ\u0002L\u001d]\u0015\r{@q̧'\u0012F@#f:lfsn\u0006\u0010t5ʷC\f\u0015t?\u0006\u0017(\u0014k+a*1!6UGGQC~<;=\u001aNlůt\bXͣ\u001b>]Z;OJ#\u0003<d\rt\u0007!UGG:\b55lGÕ݆|N\u0011V\f\u001a_RSUtiԺ\u001eWI694_\u001a\u001d918T>#2i}\thdس>vOj\u0012@ŝ\\i\n;\u001bpvT7\u000b\u001b㱩H7\u0016*(a;[\u0012e0-aӘE!\u0018榄+QB6B`\u000fА3\u0003\fp\u0013G\u0005]m\"OSM6.sg\"\u001e\u0006װEi]Ei\\Ngw~9j\u0017D\u0010?%t\u0001~-c[90LXpӍnGN_gFG|GvO;=Q=G\"G\\\ne?\u001aA\u001b/d?r>z5zVN\\wn\u000eݰ!mbw!m2UF\u000eana6t\bs\u001b\u0014^0\u000b4d\bs\u001bX\u000ean9!ml\u001d8Xy\u0010j8s\u0019^\u000eG5Ā{OM\flV\u0003m`}ejt\u0014*\u0001]oDltԸ` b8\u0017;e{ǁ\tk\u0003\u0002sO\u0001\u0003\u0011x=\u0001偨Uv\u0003F\u0003l0YKK`>::a;-KcSƬm݊\u0007\u001b\u000efI\u0016gFP\u0014\u000ff^\u001cY!r3ܶh\u000bAꋹ5*Pm\f1uբx\u0001v3yӵ\"\u0019zl\u000e\u0016>iE:y\u0002jϻ@\u0007\u001fo0_mrvL\boYz)<\u001f-.\u0007R} R\u0015c1\u000e7\u0003q`|6\u000b.r~ؙ\nOw\u0017mG7u!o]IZYb\u000b\r0k93WU1G}kd#lA\\lC\frsys\"S/8z.\u0005\f7X(\"1)\u0010q\u0004\u0017\rCM=1HqwW@\\[?1hbn3&|r._nj'ۣgpQ~5zd%^\\[\u0011m_A2WMo0{ƬB27Vr\\\u0007mqU\u0019U8h\u001e[Tr<j?1\u0005/GcY\\\u0017\u0007FvZ\u000bQ;dn+Ajrh\u001eZ\u0002\u001eY\n\u00144TѢ`M{S\u0007n\u0012/Z wKu֮\\\u001b\u001e\tkѩ+9~\u001dFP_b:[ָ6g\u0014\u0002K\\Ykrzn\u0017\u0019&ES\u001dVN\u0005Nf-.\u0007A4\u0019U\nJ}Q\u000ea+0u\u0003>\\`T\u001dP`C[>u\u0011A\u001c\u0018\u001b):WLљU\fbϲY\t\u001fJF\u00032f!:b\u0005)XiqE\u0006F\fg,쏍L\u000b0Emyvv[c$Қܲ喑M\u00166,~\u0007F0\u0018\u000f0KSLS\bH g.{Z0園*ܜ\u001aͬEW;߃fb\u0012IBVG\u000b_8\u001eϞ̛\u0006_]\u001d\u001c\"Pns;JA\u0004\b\u001fT+\u0004ee*\u0013h\u001c]>?\f\u0005Sy\u00043@Vc~>}r4ZL\u0004{OzP-a\u0015JÑPzr06K\u0006;ӇuKv\u0007&!`,(j**&\u0005DEɂF$\rTQUK*Ʉ}#jY(\f\u0010ʒ.\u0010]\u0011TM\u0012\u001b*D%WP*f0\u0007*24\t݂^\n\u0012!8\u0015\\)\u0004\u0003p\u0010\u000bEӂT@S\u0004jN\u0013A\u0010\u0007VYfG\u000e;D\\hVB\u0004B.M揎ls^̇A|nƸ\b\tF\u0014D:%*zP'4(Fu.p\u001fm\u001fM\u000fwF\u001fw\u0003%GV\n7D+v\u0002CK\u0006;C\u0002M'f\u0014P45*\u000b\u0002\u0000=I\u000b`? w\u0003*.ۡ\fL߸_\u001f?~w\u0007w??|\u0017/~}w7HCf*{ƿCp2Q.ğ\u0005V-ip\t\nT8\u00131\reٽfhשY](RtuRYީАgg8\u000b~==,\\OO\u001bWֱ՗Jo7W׏̟t&wһbz2fُOp`\u0003Da>wX㏋-Zw\u001b\r~v\\}!ϽZ޸Q4Ȋdp2}ޝ;I 9B=m-\bBU5UjQkJm]J#ޑuS_ۉt~}7w8y:\u0010\u00158pJ\\CC,h3i&\u001c̒q\u0011FJ\bo\u0018EOLub\u0007~1v-Yi}'_`_H\u000270P\u001f'/oXͻ+\u000e\\ӄF&mD\rIմ\u001eTAݐuU4e\u0013IRF[\u0003hxA(A:Oԩ2dh:].R]tݫ;tF\u0011\u0014f$3\u0011Md#,JҚg5xBGY\u000bv<T9\u001frJK\u001f-\f1\u000f׾_]GVޘ&\u0003%\u0007)h֤D r\u0003^\b*\u000b:t>%#f\"\u0019E\u0015\"Ғ\\\rMP\u000b!D\u0012\u00056$Aiƿ'\u0012%\u0001\u0012\u0018'\u000e\u000bT\u001fiK9!\u0013I\u00195\"ʲH,\u001a\u0000\u001a=!{B\bڛɜ/P\u000bA\u001aB҆NDAdr\u0014a.\u0016ň肜\u0006M& \u001a\u0011\t\b\f40N\u0018\u0007\bQ\u0005\u0016\u0015IgD\u0011<G,IgeY\u0010#u*U\u0011\u0018r\u0010Wdr$t{BH\u001e!ސ&s\u0010^\u000b!5\u0010\u0002ɮTGt\u001dd\u0004\u000eAa\b$#l\u0011BcSM\u0017UMEPP+j\"QuRaXO+YYP#A\u001fY^%\u0011M\u0016tZVU\u000bQ67\u0010u\u0011\ri2\u000b/Sl:]T\u0004]pae!DU!1/%wmq\u0017p8}G\u000bb\u0002lgsC@Ӳ퇊(\u00185=x3\bO@\t\n([\u001eE\u0017f1ȼ[*//\u0005\b+Z'HEI\u0016ii)\b \b \b \b \b \b \b \b \u000f\b\nA\u0010\u0004A\u0010\u0004A\u0010\u0004A4O@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010QW\u0001A\u0010\u0004A\u0010\u0004A\u0010\u0004AA\u0002 \b \b \b u^\u0005\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0007\u001d\u000b\b \b \b \b\t\u0016\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004\u0007t, \b \b \b \bR'X@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010Nз \b \b \b H=c\u0001A\u0010\u0004A\u0010\u0004A\u0010\u0004A:A\u0002 \b \b \b \u0005\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0001}\u000b\b \b \b \b\u0003:\u0016\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004\u0013- \b \b \b \bR\u000f[@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u001eз \b \b \b H=o\u0001A\u0010\u0004A\u0010\u0004A\u0010\u0004Az@\u0002 \b \b \b \u0005\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0001}\u000b\b \b \b \b\u0003\u0016\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004\u0007- \b \b \b \bR\u000f[@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u001eз \b \b \b H=o\u0001A\u0010\u0004A\u0010\u0004A\u0010\u0004Az@\u0002 \b \b \b \u0005\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0001}\u000b\b \b \b \b\u0003\u0016\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004\u0007- \b \b \b \bR\u000f[@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u001eз \b \b \b H=o\u0001A\u0010\u0004A\u0010\u0004A\u0010\u0004Az@\u0002 \b \b \b \u0005\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0001}\u000b\b \b \b \b?\u0017FW\u0007A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0007.㍮\u0011 \b \b \b \u000f\u0012[@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u001eз \b \b \b H=\u0016н \b \b \b O\\\u001d\u000b[@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010'^\u0005t/ \b \b \b \br*\u0015\u001c\u000b^@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u00102:\u0016з \b \b \b H\u0005\u0016н \b \b \b +>\u001d\u000ba@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010j\n^@\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010Ħf\u0002z\u0018\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010_8{\u0015π \b \b \b Ҹ\u0017\u0004\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A{\u001b\u001dg \b \b \u0010\u0004AC> \b4r\u00140\u001eE\u0010\u0004A\u000bSS\\&o\u001f}\u001e{\u0004 \bR\u0013\u0014\u0005qD/\u0013.J.}̙\u0010\u0004A\u00011z̓ }\u001fcRTJ.H'4=\u001dxٳ\u0000oG\u0010\u0004Ajгg\u0016x̓LꖪL2TϽ]矽\u0000< \b\u0000Ϟ;Ͻl)&u-Vs\u001fy\tϜ;w\u0018lnii \b\u0004~sπ}G)r>Ͽ\u0011\nG\u0018 \bR#h$\u001chm~8t\u0005 r]x=\u001c\u0013\u0015\u0000A\u0010\u0004\u001eM\u0011c\u0017.\u0003\u0005>sϽ\u001a&J_|db255= \bTjrb$ާpϝ;ԓ\u000eE\u001bxǅ\u0017#rZ: \b@zmueyiavrOx\u001d\u00012Ϝ5\fN][\u001f\u001c\u001e\u0000w\u0010\u0004A` +zmnbPp\u0019Cѵd.Ss=\u0012\u0007'\u0017V\u000e\u0007?\b H\r|\u001fx{s`kearP\u000e<)}\bd\u0013MgϿN&\u0016v\u0007?\u001fo \b U+\u001fG>wv\u0016&H\u000b6=}G\u001e{_h\u000e+s+/G7?Og>. \bR\u0015 :?;'>K/\r+\u000bo\u001e)'\u0003oM^ۺKo}_x_\u001f \b U$痾\u0017>zW~ֵɾX\u0002O2G\u001e;wCϮ\u001eG_^W'\nE\u0010\u0004A||?xsz壿x:\u001b\u0017;η&@>~^\f)#\u000b;\u001f\u0017?& \bR5\u001b\u0017|sk\u001f[\u0018QB/\u001d2`XXg^ʟ7ۯ} \b U׾7?ʫ͏҄\u0016\u000e?T>̳͑{^?\u0004A\u0010jw׾_Wߛ_4?L\u0015,f\u000b-Ѿ?/|Ͼ?B\u0010\u0004A׾g_§>T_B}\u000f_\u000f~\u001b \bR5G?_ѫ\u000f\u001cN3T̍O\u001důշ\u001f) \bR5~\u0007צc%2~bl`&}O|K_k\u001f\u001f\u001cA\u0010\u0004\n\u0010\u001f^׾O|8=3\u0010xO=Q$s2C|K|\\\u0013 \b\u001b.u|OW>tes(s\u0011\u0004A\u001a_\u0005\u0004AF÷sh\b \r94\u0015C\u0010\u0004i\u0018Ǌ\b\u0004AFq\b\\ \b(N[9n\u0010\u0004A\u001ai9n0# H85#,G\u0010\u0004i\b>r<\b yp\u000fJ\u0004Aq\u001e: H㨼:\u000f\u0016;\u00138|KX\u001e\\X:\u0003\u001f/#\b 5\u000f~}ϝA9\u0019+T̘D{gο\u001aQ\u0006'殭n\u000f\u000eO;\b HU0y|x[671DZ_8SOZShܡ\u0014w\\x=\"\rO.,-3\b H\rVW\u0016f'H\u0017\\ӝ\u001dL={\u0017[D鋏LLg\u0010\u0004AJMN\u0014\u0012n}sg\r5ה̹\u0000g]x=\u001c\u0013\u0015\u0000A\u0010\u0004\u001eM\u0011c\u0017.;4Ss-ׂ>\u0001B\u001d#\u0014D1\u0004A\u0010FH8\u0001\"\tk\u000bݧ\u0002Ϝ;w\u0018lnii \b\u0004~s\u0004*\u0015̻\u0000B'A}w\u0017\u0010\u0004A\u001a`\u0012z繷\u0005 r\u001fv\\>ȣL6=\u001dxٳ\u0000oG\u0010\u0004Ajгg\u0016xIG- t\u001fz\u0011&ux3gB\u0010\u0004Aj\u00063O>\u0004̱P,r-UG\u001f}\u001e< \bԄ!EA>$nk vA>D/ \bR\u000f\\>\u00045!x\u0011\u0004A1-\b H\u0003$o\u0011\u0004A\u0010\u0004A\u0010B[h~}$}\u000e4-M\u0004\u0012Iy\u0015O\u001f\u001d\u000e\u0003Mj,qx<=ϧ\u000f_\u000eH06K\u0006;A(\u00129×\\(\nvꢖ[\u0017$)*B:\"R&\bBd]%\u0013%J\u0014\u0012\n\u0016f3R0ͧ_b[\\LاЬ蚼\u0011rDB\"9I%q]DEtV@\u0010L\u0002M'\u0019\u000f\t\n?K/\u0007\u0014Mʂ@\u0014U\u0014E\u000b\u001c\u000b4E3;e\u0011wYq_\u000ee\u0002M$yW\u000f\u000f_/\"w?ݻ\u00058ů/(\u0010*hTwh\u0013#r\u0014\u001aB\u00158(jTU5\u001a\u0014e)RJ\u0004MQ\u0011HQ*\u0002T\u0002F\u0017TDQNtDH\u0005Y\u0004UV\u0012ܼB\u0005-*k\"\"\u000fY2+:\bw)Mע$\nE`*pV\u0005h}\u0006\u00153J\f4Y$RT 9\b=m>64\u0014hZ\f4Pp*9\bƦsܺчO;.Xmz\u0007\u000e\u001d󛻹\u0004?=GֱY\\ԋsu{xzq;wG'u8\u0001||x0;\u0016\rƆooxw?QːPc|z}PZ\fƒvzw$~\u001fWuj\u0016k\u0004ҪJW]5}(5J.oّaz:w)ܯD:;N<oW\n\u001c8uD6{7f,\u0019[J`\bbshg`/\u001b5\n0L6?<N\u000e0T\u0000dY۪Ǩٶ\u001c7O\u0010#\u0003󾄦\u0017(\u0016Q,XD&\u0016\u0013iSL4\f&Nճs[WKgr:9\u001dɭ^ʽj:rFY\u000bB\"\u000f&\u0019\u0004^*3a\u001c\u0013Q\u0000ř袤Ay\u0015\u0014l\n* p}aPgu])U-\u0011\u0005-\u0016TW*+\u0011o4, 7ʊmp)ͮR Tr\u0015k}y7γq\u0007\u0001 Y\n>}\u0014\u000f/HhVUJdHޢ?_Q&$\u0010X** Az*L@\u0002\u0013M\u00164\"1\t+PAt\\ ]A\u000eS@\u00175\u0019!*%] \"c\u001bD7\u0011o\t3ₙp\\ph Ȓ\u0007BdVhT\u0013\u0006ՃAc\u00111\nÁ\u0004L[s!F\ryFt½B\u0003eW<\u0000Ղ\u0003c#V\u00011\u0011>dI\"K̋ÞD0$\u0005y\u0011\u0019F)(cQ.**\u0013N$Q\"(TE$\u0017Z$J5]\n\u0003R0\u0011MU\u0001\u001a:ȋ\u001e.k\u0011MR~\u0000.KЇTU$\u0006\u0014\u0001\"2̊\u0004\u001aY0.UXTP\u001d{\r8Z\"ԼT\u0001~RVDpO;!//@\u000bȋh\n<Tx)d8x\t\t\n\u0014^\t\n͢\u0011 \u001a)$*I%fؗaCW\u0017L%j!PJ\u0002z5hT!Q#xQDdƊ\u0017j\na!hK@\u0015nDpQN~\u0002=k# \bS\u0015\njT.WfO,CV\u001dk\u001c}\u001f.YLK\u0000M|\u0012UIRYS57q\u0013YU\u0012ohOM\u0006IV\u001a\"t{G)qx?4jF|eÉV\u000fG{RӹƶwsCJwD\\MbMo\u0005\r;zLiWXyG;\r4N7v\u001a\b*7-)%/\u001a\"^U$U0\rBpn>tA%\u0010\u000bg5\u0018\u0013օ2}Y/(\u0014:Fc4\u000b\u0015W\u0018󮵨U\r\u0018\"ED%V*VȾג+x}rҪ\u0003\u0013A+\b6|zRԮ\u0007(\tf\u001b\u0016bJBjJW\u0010%RR.i\u0003\t\u001exw[+=ᡆ\u001a\u001ejxF\u001cp\u001e \u0005HQ겪+.!MLY)T\u0004[R%\u0015\u000eYJJ\u0012\u0011%I_PeʫyU*9Va4\rUQ\u0002F\u0015Eרqo0u*\u0004r0G+\\^j׽ue\u0017<P~ު\u001aBV\u0011\tף\"\u0015\u0015й5\u0014|ơ|c|y)\u001a-bR\rU\u0019\\z\u000fL)tB5M\u0012D\"\t^\u001e-\nS(U$\rD\n\u0005Z\u0018\u0007J}ieYr䫄\u0010\u0002C\u0012-3?b\t\u0011\u0010Ņv]\u000b7[z\t\u0003姭\u0015\nP٢$j\u0014f\u0004Y\u0016Dn)9\f;j6Ci)0J%nU/X\t\u0005 qJ\u0006[Tbw\u0014Je,*%i\u0012=ZThQE\u0016ս<UJMo&KHѹ\u0019v\u0017s<`pSy\u001e\u0001\u000b\u0016E:\u0002\u000e6\u0007oQeÌs6\u00197G(3\u0003L4R\b<\nU 0c1\u0016d\u0007C\u0012\nAM\"JI)v2\b ]f%*[\u001c\u0007\u00191VD0QB5\u001ev-hAM\u0006㌅PiYz+BqYݹF\u0000\u0010+El\u001c~\u0010\u001dYgA\u0012V\u0014ty\u0010E\u0005jX\u0015p9\u0006@a7\u0002:\u0002{!DEUD\u0015%MTRX\u0010\n+B@m\u0006\u0014^Dd\u0007QR\u0012h:x)V߁N\u0013\"\u0005ڑZڧ/9 z\u0017\u00014p=J\u0015/\t\u001cs)\"u(;`\u0007@#gʞ,B+)\u0006\n÷\u0012Re\u0007灨\u0006栮Ԉ),DY\u0002 \u0018\u001c &Ah\"-{f\u00115\u0015\u001cxCuY\"JqF#`iZj24a2KjI/P+ͧTI\u001eR6c,<~D\u00117o\u0014yD^}ܚZ;R95xo޸5\u0010%v\u000fm`r\u00192TL/\u001dTwCR\t_T\u0019\"F(Q0k\n\u0012*\np\u001d+_l*D*Anu͓ވ\u001et+[:WZ1P'G\u001e,Os\u0006Trw\u0001\u001e\u000b<xo#\f@g\u0000:\u0003\u0019p\u000f\u0001\fPʔ}\u0019PŴ~aY\u0007,\u0011\f(?{@3(`ᢇ3\u0000J`p\u000b\u00028V:\u0019\u0013\n\u000b2&ܬ\u0012\u0005ɀn(ʩFK\u0011&YY\u0007H\u0012(n\u001beE\u000e\u0007{Y[V\u001bn\u000f\u000bv-\u0000:Pfޗ=r'Aٳv6\u0018}c*w[\u0018\u001daʖ;?z\u0017\u0005\u0012T\u001ePesˉD\r馣tP8(kB*\u0019]G\u001a\u0015>\r\u0011eΪ\"e.ki.\u001ezRf)ux.Y\u0000l\u001dր(\u001bM\u0006&K}I\u001c\u001fN1\n b5\u00035\u0010\u0007V25P\u001d6_vs\u0004\u0011\f)RI1B\u0003\r8P n)b,N\u0017$RvY\u0016k1br\u0014skz\u001e1\f5>\u0007c\u0005\u001eHV/Oˑ\"?\u0003\u001c/dqd\f,Bq>]E?Ct\u001bуw_|\u0005v֓QI|T!ɘϝ\u0014V-\u001bZ\nXeʖx}&d\u0010\\@W\u00062\u001e0W\u0006˪UJ@f\u00019tY_N\to&nC\u001e\u0019$9\u0014\u001d\u000f4Frwti\u001b\u0017h#7f\u0004E)[\u001e%\u0017f)\u0004\"P6^\u000b\u0007JR]\u000f4-%\u0019A\u00049͑\u0007\u0000]\u0004\u0018r\u000e7!\u0007c}\u0000\u0019r>\u001f!\u0001c}\u0000\u0019rn\u0007!\u0001f}\u0000\u0019r\u001fn\u0007!\u0001f}\u0000\u0019r\u001fn\u0007!\u0001oB5\u0018\u0007!\u0001lD5\u001b])-k\u001fn4\u0016n=\ri\u0014\u0015\u0018v6~t0iH=Tǰ!UQsB\u0006F\u0007\u001ez㡇\\G\u001f3\u000f\u0016O>C<s/<s\u0017Ο{[\u0014C\u000f?z.\"ڃ*\u000bg<C{ywJ:}pȤWO=f\r\u0017B\u0003Wv}\u0007#ݽ2ӏ=l\fs}⳯~+ /Oo},S\u001aGz{/_<H/:uƐ\u0002\u000f?ycto}\u0007?\u001f?HÏ~og?>ry\u0005}?'g?O_w\\hz|\u001b\\U?'֗?\u001bo~\u001b{k\u001e~|\u0003x/n^\tc'/H77\u0007^n~\u000f\u001fN}\u0012gS\u001f?^ժ==Z?Ώ\u001fԛl#oy;=['`Q.\u0000䕏}?\u001b]\u001a?au'Γ\u001f<ү*\\\u0000<~Ͽ:>'<'?\u001aPǘrH\u0005r}~`uO*}fζ\f\u0016КCyWև`p,\u00164l[\u0007μfo-[l\u001bү\u0001;yK6_g\u001b9\u0005&-\u001bki\u001d\u0006A(\u00129×i{Ln䨖dc#\"\u001cdd=J\\N)D\u0014ͺ\u0012I*\u0005{|%VY\u0006ͩ9Y(zD\u0012IDWrt]\u0016rS&v\u000f絷7;\"jTQdUR%A\u0012tcN(QM\u0013\u0005,_.P\"\n\u0018\u0015.TD[GcDUTwN-\u0011\u0004\tXDa\b\u0007u3\u0019\"\\Y\"\n$\u001f(*/ƶm઺&kaE(?jԸ6v4i̟Iv\u0011k.*ԸAڲU\u0017g\u00188:\u0017d(T\u0016%ޠl'iHeYkJd{.T\u0016?\u0003I\u0013p^\u001a\u000f\u0018;\u0012D\u0004wb Dr>Y+ܱVt\u000e%\u0001]n|k\u001bTV;/\u001fV3{`~J}j\u0011DMST%4}t\u0011[G-\t\u0019*\u0011#mf\u001et9\\\\TKY{(;(\"\u0005{g7-<)ͥS\u000bOJՊI+ާx{W\u0017|.[7\u0017<帟H\u0004\rM\u0013s\u000bDJ$ESlT\u001c\u001c{xN{6*UTZu,\u0004\u000fBS\u0015z5k\u0003v.$mTi\rBҊ)N\u0016ZuQc\u001eMNٝUY\u0011Pa#j\u0007\u0014K.2\u000167g\u0012xvF@epKQ\u0018q\u0006JUu\u0003f(#5\u0019\u001ba'd,'etCQ2.  %{\u001ct\b(%E@xR>X]L\n\u0015VîVUS\u0000=\u0012\u0006\u0013RE4\u0018A\u001e\u0010c\r_F\u0004j\u0012,\b\u0012TՉY%GJ&9\tLM f,=Drd(qYkQVa<pZ\u0004R\\λWi%Jnִ\u001bQ\n,\u0005|,\"<J]\u000f:+-\u001a0-\u0006}'^\b\u001c^\u001czqš7qx6\u0005\u000e~pl\\\u0012j\"drwr뫗r/\u001a<Zs\u0002T\u0011t\u0018K=)6t@\u001d# *5*90;Hb}E\u0005EA8\u000f\u0014\u0018CAȚ\u00128,\u0002Ñ\u00045Tךu\t;b*ư)\nB\u0007\n\u001ckA3T\u0011J.\u0019շh\u001e;K'\u0018P\u001ep3k\u001a:kuHG#OhF-3+\r'DU\u0018IW&pwo]..\u0002c(2%$AY\u0019D\\WR/\u001d_7a\u0016AS'rvRV*(h[\u001e\"쌅\")HQS>hl?&pzDF-HѱlO\fL\"R@ N\u001ekT9#Eu\u0019T(4* '\u0012/\u0002Jh#\u0012N\u0007o\u0012*Pc+\u001c\u000b/\u000f<\u0007u\u001754\u0011-(\b\u0000!oVS(B({yxV$\u0010#Z\u0002\"\u0010tiV\u001fF9/\u0007,\u000e\u0002\u0015n:2(}FKF\u0011\t\u001dQ\u00053+$ٯPI)\u0005^\u0005G)-\"*\\?6*D5h\u0003A3\u001awu+\u0004Fe\rZ[}5^@A7'ע\u0004^\bP٣ԃnMw\u0014kvS\u0015b\u001dYzH\t^BOM>b܆ݓ:\u001bQ\u000bcndv?J\u0014\u0011Ú\\ǻn}R,[\u0016ݭl\\\u0011\u001d\u0010^D7l$74U-\u0019備Jejvy)\u0018;UV\u001bJR\b?\u0011'>ai:\u000f!ZY\t)m\u0010NB$c\f*.\u001bs\u001f\n\u0015J-c\u0014l(ER^$lFyܼOv}B29Zim\"j]vU\u001c\u001aP*Tf\u0015/5\u0000O/YS^tޠ@SQ/W@Y?\u0005c\u001bbx\u001acYp3;;RP?6\u0012*\b\\a_k*h7ا\u000e%G@ZQ[nC4\u0015PU­\u000fcԋ,\u0012\u0012[G\u0015EMs\u00062K5ȶ5l+V\t:l.(`|*\n`׺]a||h2C\u0013υ_\u0014\n0^\u0014`GdV7ˎ\u0017\u0000\u00184ZiA\u0003\u0006]H\u0003=\u0015bG$\u0015F;bP@̩\u0015Flhæ#>J\u000e\u0003Y+Xq)\u0004óe2N\u001f\u0005\u001c\u0016\u000bf\u001fE]-첣`+fcdͳ\u0017\u0017\u0010\u0005U\u0001>y鵉lk\u0005Y=\u0012f\u0015\u00021b\u00072\u00145a\ty\u001fAY.6\u001e[B\u0013\u0013\ns\u0014͢\"3Z\u001dVT^P,\u001c0zl.z\u0015\"ٯ\"QETE4#$GӒ\u0001\u0017\u0013\u0005nr\rHN@Ur\u0011Tf:˚J3J\u0002T\u0016\u001b]\u0011E\u00147\u0006,gU{q\u0012띚\u0007d\u0015\u0014-)f\u001e,U0G[噕HT5}sv[iv\u001aV!X\u0011g=]pٮ\u0000\u0013iQ간i)-x\u0011I\u00127Ĉ0\u0001#B%_\u0011&iv\b\u000b\u0004ܒ)Kl\tOQ/چdhe\bq8^܊\u0014uaZe4V\u001d\r\fD$mi ,\u0018BC\u00177\u0011\u0014~\u0001b\u0001ښ\u0000`\u0015u\u0013ޜ\u0017m\r\u000fP?5\u0001\u00118f\u001b.=3\n|\u0019:\u000f0\u0005\u0015v5ʊI \u000bur'އ@jk\u000fA:-pǹ\u0003~]ZJV:\u0014s/\u001cA2v-\u0004\u0011d~=\u000b\u000bx\r@e?|\u0006:D\u0002#s\u0005.u;\n\u0012YMGT\u0010Z\u0011)KG2\u0010%-i\u0006ɩB#L]_3JG4YRi(\nh\u0019\u000f\u00132NEp\u0015\u0015x(H\"I\u0014\u0016 x5~g&\u0012K\u0011YIӈ$)pkF\rM\u001al\u0006T\r*z\\w>V\u000bm[UG\u000bõ쳁(yjoL9&TLI1\u001f#r3t&E\u0006>ľVE[\u0016<~X\u0013<)\nd)<RbVT e\u00164\u0005@Tp\\6]33\u001fyXR\n\u0013F0EAeQZ5`\u0005@aQl8\u001895\u0002Fb~udОmX?\u0015А\u0004ǝjK]d\u0004\u0004n7N@񟺵\u0015e\u00046I4@?P\u001cW(ܢ\u0006mw\u0012Cn6XA#)GTQ2\u0000\u000422Df2(\u001fߪYѼyAaԌa(C)\u0005\u0011Aπ=\u0014l$M:g\u001498q\u001eG\u00186/!S8q%(\u0002\u0016)(ϊPxw\u0015DR|bYJ*.e=\u0014nٝ\u0000\u0003c\u000bk*D(/x.Çg\u000bڡ\u0017\b0s5P=E\r${؛^TJs\u0017(%\u0014%ӤmvAQRJҍ;q{P\u0012\u0018*\u000b*\u0010\u0002m\u0018\u0006~8\u0011If\u001bvPC\u0017#tPƐK\b$d\u00004+z&`wFj[Vb\u0015\u0012AKWN=o-uJ@\u0014\"\u00022O\u0013EXtLp_ڃ+Jy]9&AHy)^DTL^5=1J:\u000e\u0014*AgؿEURp+\u0017ɖR^j,\u0005F'@\t\u00189Wy\u0018Z\f\u001bQ\u00148\u000bRtsglvz2*u\u0004\u001f}>`QgCRhȢ\u0019,1jZ#xʹ\fV\u001d3XD9T\f\u0016\u000b}0@>1%>q\u000e9,F0fG\u0014Q)wJEb.6\u00145C\nIL\n\u0019QdťvRƊ̇r.(;Y('JY1\u0010c(*H8GRsyJ+cY:r\u0014߽K%ԮY$ rJyRY\u00115Fp*)^\u0014ԠVHH</u@\u0015ڧ3*\u0015\t&\u001fPUU\u00171bPȽ\u001bP+M\n\u0003\u0019QI\u0017Rդ\u000b7\u0000=cRZc\u001c\"_e\u0012N;\u001d:D*qq6:\u0006\u00036\u0015:\u0014J\rI3V02sT,%\u001b[̊6k$C$g%K+\u0015QK_Se\u00058:\u0010\r\u0004@G H\u0003~D͠\u001f?\u0010$EP )DdA@\u0003*\u0010\"WvRqM9Z{c~UR)byzyve}8QN*RY[٩8$wNw\u0006?8D=9ӷôі*,ck%b3DӇUK&/M&MSݮ4!m.JM74\u0017\u0007<\u000b\\#9\u0018F%\u0006qcm\u0010\u0011\u0019\u0012\u001e\u000f'\rk4\u0000̵\u0017qR\u001b \u001cW)\u001ft\u0013,\u001b\u0002^\u0017\f/т2IŭY\u0006KJ[0ey֋Y\u0003TQAFF;`u|0ςzpB1V0u2V\u0003\u0013c#U;jfm)\u00054M3E5\u001b\u0013Ȍ(e31if6/ߎTsoNӖ?mҕ\u001aA.\u0012\u0012gǀ#Sg&\u001eAw\u0003ꃝ\n\u000f\\dt!!HhmD}\u0019ɂs\\:푢L\u0006@Ё\"D\u00042z\u001c\r\b`\nk:ۯ\r/-\u000eK}RB`ڼ@`\u001c!m\u00107\u0017\b#\u0004\u0011\u0002\u0002us@\\ n\u00107\u0017\bܛ\u000b\u0004\u0005\u0002\u0002{s@\\ po.\u0010\u001cYC\u0002{sH5k\bs$\u0002\u0003T\u0005\u00066\u0003\rX\u00177-4^a=ho0#\u00056z5\u00024\u0003K\"^'\u0001'O6b[w7ݵucUUMXmSf@KzMmWVrMǶkO\u000b\u0004]<IwoXܥ\u001d]\u0007=6~\u0013/\u001b|c\u001fc\u000etu^QQ۶\u0003?WW:oW'>4|XV+ޱG>?}o|{o_GcʨK\u001d;\u001f|\u001fp\u0007o~;\u000eߩ\u0015k7}S_yzw\u0011y{+zl浮U;ē[_[j}~~I}\u001bx\u001bM|zyn\bzo}\u0013}{6[vK\u001f?;\r޻\u000f]:\u0015ٷr]\u0017}⣿Kة;\u001f}vѷr}|7{?뱥\u001d{\u00020\u000foxFh[>-\u0016o-|Z<\u001dzot٧EG,o\u0016%Xx931:ۯ\u000eAI|b\u0003\u001e3\u0003(KcώM@BtFQ%ffE٬[\u001d\u001d\u0011\u0011U(u\r\u001f3 rTb0,uVQ\u001bET\b'JFU?\\\u001aB\u000b\"\bBrxr\r'+\u0002\u0013_\u0012F9x;0,Sm]w\u0018$VB*!:O#\u0012wQὤRȥ9a\f7\u0018sw\u000bN,\u0016eQY\u0003I\u001bk*\u0019ג\u0012j*\u001d\u0017\u000f\u000f\u0003R\u001eݶ\u001da\u001bՕ\u001ftTW+{;Xs]r\u000b}jbdne@\u001aP|'WpG+Yk\u0011&Myr回$&\u000f\n=\\yA?642&\u001cA4\u0011|RDȨ\u0004uP_ۃ;S;\u0012S+\u0016^(¾Zy\u0019o%Qm\tiJ`G\u0019Z\u0012-ʴ::Hg \u0004nt\nFil>rI6#%S}w\u0013\u0017rT\u0016dz/ޘ\\,ܘ\u001c)D§y]HM.H>iF\t\u001bŸF{z7_Zfe;-\u00046.\nIl6Y7\u0011F\"]8/W!͒Ep8k6(JR\r\n7w%c\u0007i\u00067S\u000b?>$\u001bK(g\u0014+VJ\nPS=aV8#-\b:HZ\u0006\u0013JcS+\u0018\u001a1ox\u0005\u001a\u0018\u001eV2iC4+[z&dʦ h7,њh\u001f6rW%Kbrjb\u0010n29ѭ\u000b\u0003\u00063S8\u0005\nCp\u001a6\u001aL\\bxU'\u000e`DUe\fXف0\u0003KM\u001e5iO%\u0006&p:.MDP\u001aZG\u0014)*Y\u0012Z\u0019U\u000f!L?\u001cA\u0013Pϵ\u0006S\u001bLm05}8`@\u001b\u0019h4b\u001bš\u0001;tifqVqdKC\u001ef\u001d tC]^&s~jwO)\u001ee0z\u001c{\u001c&.`\u001eýS\u0001\u0016\u000b\u000bKM`uy!^l~^LU3}.4\u000f\u000bWЖ\u0016^,'\bX>\u0010z| b@\u0012\u0014\u0018]h^^\u001dׅy˼Ti\u000f\u0010 @+\\4Ҳ\u0015\u000eU׬Yށڢ\u0015֬б~:X{\u0015vl޾mӆu2 u\u000fxc5\u001d[w{m:֯^~\\}-\u001bUk]цuN\u0015ouP`Ͼ6oܰ}Æ\u001dmk׮۰=޺m}[綻v\u001fܵ5Fbuǝ{֜ߵsGww׶;wk\u001b;7y!b{\u001dۻms3zՁ\u001b_7lQ\b=&\u000e\u001f<x̎w_\u001d?{\u000f\u001f\u0007uﾬ:z*w\u001d\u001a:\nm9>\u0007\u001c;q⸱}Ǐ\u001f\u0003\u001f|\u0007\\>x\u0007\u0006-q\rڶ۫쑣'\u0007?v\u0012^:\u0007O\u001c=.~Ï;u,\u0014?xv>r܅KzR\r68@ѾS.?wˏ?+gO\u001e;~\u0003'O=xsg\u0006\u0006/?\u0006ŗϞ8rx\u0017R\r+uvcg^:}O\r^{r\u0011\u0013'N<uv\u0003\u000f?G>f3\u0003\u000f^۸ 'Μ;w\u001f*塇,#}'N\u0002UЫנx\u00020\u0003'Ϟce>lޕGđ#\u000fy葫;{a͸9rԃ\u0017Nsŧ(HtnצeNӫX➂cΟ?&پ{vo\t%rż{{\u0017پaM4Vڽܝٽw{\t9;ӵu˶ۻw߁xOf֭w=_s6v};lv{-0;6vvnݽmw\r흛޵4`ٹ}\u001d\u001d\u001b6\u0002t\f[\u000eE[\u0006(\u001d;6t,MxkLi\u0007fZ;z\\]Q*Y\u0002u\u001e\u0012,`\u0011+ÄkB(pK\u0015#Q\u000bɴ\u0002^\r\\ͻ\r\u000bq[\u0005\u000bbeLfaBfy\u0015ãA޾\u0001J\u0016b\ny\u00018;Y,>:1r\u0003\t_/\u000eL\u0014\u0002\u000bo7&_*dz\t)2\u0019}Vq)j]0fY\u0011;\u001f6Yˋy-yaDz\u001dæ\\uU\u0007yF\t\u0002}Cq\u001bA%n\u0014dO*+\u00153n.N-%R^owA:FYlQH\u0018+PGA~Qu>?knRRe*ma\u001dUvïRQA{\u0015zP\u001d\u0005\u0011孤JR)ub+ɥ\u00059|?\u00194\u0019Cx\u0017cVLY\u0018,*\u0014F\u0017R\rx\u00060\tA\u001d<\u000bL9\u0015\u001bh,ҹI5Lk\u001c_1吭ಂ\u000bQD\t\u0011Wns\\Si\u0018q1c_\u00182A\u0013\u0012m\u001a\u0007:g,RfU%Tj?\rRo\u001bEU\f¶yR-\u001d<Ex҃WT_#]\u0004Q<\u001e\u0001_s*\u001cZqQk΃\u0013u:S\\\u0013N>MJcH¨8T\\9,ٹǝ\\\u001eCyaH6K4`A\u0004T=pPsxtT\u0007\b*+\u0001*8\b\fw\u0018ì\u0002\u0004\u000e\u0012Q\\hGH\u001ai#A\u0011SƍEDD)-\fA$'s&E:\"\u001e902p;?\u0015#\u000b-fxH4A\u001f\bC\f\u0011)}APcRb!a$yQ69&\u0011V\u0011y\u000b\u00188\u000f\u0018Lvj\u0001N@v\u00027z҆`YuiZg:\r\"Y\u001e%rA(vTݗx\u001b\u0002$A4\u0000\u000bJ=\"4\u00054ޘ\u001e\u0013\u0011>4m7{^\u00151K7hRw\u0014+^/N\u000bZ4\u000bfsA{c\u001e\u0012B!!tH\b\u001d\u0012B6!t\u0000n\u0011\u0013Bg=C,\u0010#&jXؘ\u001fv^\rК\u0010\u0006de\u000eaX\u0006X\u0010d\fad\u0006X\u0010e\taX\u0006X\u0010Ffe\u000baX\u0006X\u0010Ff\tad\u0006X\u0010e\tad\u0006X\u0010Ff\tad\u0006X\u0010Ff\tad\u0006X\u0010Ff\tad\u0006X\u0010Ff\t\u001bP\tad\u0006X\u0010\u0007X\u0010g\u0006X\u0010Ffe\bR\u0013\u0015G\u001dRe\u0018\u0001\u001c\f\f\f3@3c2\f\u0000\f3\u001aa\u0006Xh\f\u0010`ia΢˺wC\u001cV]6֮^Uk7nޱ\u001d][7]U\trMݻv\u0006-}7LSrMǶkO\u000b1\f矾v$ݳcMER\u001d]\u0007=6~\u0013/}\u001d?}ÚRUm\u000e\u001a'^W^m\r~\u000b|#g\u000fo\u0013ʵw9>|O_\u001b߾o_O\u0007leŪ\u000fw\u000f~x[\u000fw꿽oGٴn枳+[om\u000e\u000f?FWaV\u0010Oo}oK\u0017\u001d'Oވ3o{&>ov\u000bt\u000ew\u000f]:\u0015抵[\u000f_wݥ&l~_Km_\u000fFa.Gﷆ\u0000~W6nx󝥦j\u001f>wtW\u0007m;3\u0016\u0019лwê[\u0007:ї\\ݚ~*\u001a-3~*-h?.{K*OǷ\u001f~~fk\b\u001dߵxl*-&뙭\u0016\u0011|\u0007|@jZ\u0013zzL`2k$P\u0012ȼX//z\fd.M=;6\u0001W\nRރښѢf#٢\u0018gȫ\u001d-(/\u000e3S\u0005bl}\u0003Ld\u0006-^ο=ZN\u0000zp\u000frGZ\u0015|f\"\"dH(!Шʾ'-%\u0016-\u0014u\rSJj\u0005\u0011\u001ayF-U\u0006s\u001bN4P\"9-a.JˤT[x%w쬕Jr9ĥ1bns>3U9I\u0005U$i\u001ed\u00199 pL2|Z\u0007fx5QvUakv?\u0007᧩?#U?Jc\u00024&*tZ\u0011\u0011T^:xrD\u001aI.\u001cנB`UII6&a6Ţ$&Hb\u000f԰ƌ\b5w%=DP\u0002*fr@\u001b`D]d\rCa%\u0006q1hx\u0019e񵦑8fYKlJЯh\u0004_\u000f,&=QJݟ\u0011@L\b\u0006v0\u001c!\u0011(EQqj\u001a\u0019M\tLAJ934QFD:DK\u001d^l-w\u0014\\ۀ/,$\tMTDM\u001d\u001eh$V_J$_?s}eA⍩ɑH7ydY\u0006\u0004 hkʹΈ\u001b!U$`\u001byc:~\u0012ϲ\u0019g`e;qn\u0013 \b9a\u000ei2Z\u0002c\u0004j,A,D\"RK8\u0003QT\n%\bYYz.\u001c\n)e]\u0013=\u00115Z\u0006&6W^v;\u0017~|\u0014O>ON\r:zbtX\u0003<^6e`\u0016&\"SaJ\\G40;2p\u0014(J<IȌ{4oh)1\u0002B\u0003gzUJ[Z2Ƃe\"JTߨC\u0002QO\u0016\\kxDYjETUqc\u000ekxnp@\"3!\u00142\"S\"Щ\u001a\u0014^]XV\u0006\u001e\u000bpn[!O\u0002%\u0019Fl5\u001aÊ8GoqֹD0j\f+{\u000fa\u0011A)X\u0011/\u0011T`Y*5e*(Fa^~,9&\u0005\u0007\u001e{b&'j\u0003{aF/3}X~=nopqo\u000e]\u001aYU\u001c\u0019zҐǺYi`\u0019(3qc\"Nx^D3^,\u001aA4I9\u0006&9G\u000f\u0012\u0018\u0001J'X7砏P\u0011\u0019de\"%U\n-c\fhbgV\u0012c*mp\u0001,_5L'\u0007\r+B.֜Ue\u0006&nFfk}=<ͮ\u0019[5\u0013z\u0002\u0007k\\d.sc\u0002\u0011lF3&-ez(F:T=\u001d]߼--/0jW+})TS\u0016\u000f\u00026pP\u0010\u0017؜xK\tP\u0012'N&B\u0004!4 hC\u0004\u0001\u000eA\u0005(T4\u0017\u0010G@]@j\u0004L {`\u0010=0\tA\u0005\u001e5\u0004Aj'\u0010˓\u0003\u0016-\u00078h\u00067\u0012ubM7K\u0019\u0006\nJ{@M:A\u0010\nnT~$TaħI,\u0015` z\bV\u0012'\u0010F(=\u0004\u001b\tѲ\u0002!\u0015\u0001%p\u0003\u0001gBn9֠C\u000b\u0016}2G\u0005 \u0003[1\u0002b20gZ260M\b#|ˡ6f8@-Zm\u0007QX\u001dp<#\u0018y\u0010\u0002Ƀ\u001e\f~QL'> P\u0002O+$)XqP\u000fLQ0TW#\u001d\nQ诤\u0001\t\u001a)DD9l\u000eƊ\u0016\t\u0002CY+\u0005\u0018\t\u0018\u0002\u00062\u0005\u0007\u0003\u0001\u0005\u0004\rF\u0019\u0005\u0002\u0004~CЪL\r\u0003UF\u0010R19ipBLsp^F\u001d79\u0006݀c 4ѧ\t\r\u0002NQ\u001c\u0015#\u0018\u0017\u0007\u00078>\u000bW!9/\u0018\u000e\u001d\u0014g0\"\u001dt(\u0013\u0000.:,̠0\fq@\u000f\b\f~8Ds\u000bx\r}z!ǁ\b\u000e0˙I\u0000RIeJ;0r`\u0010lՠ\u0015#\u0018b\u0017nQ#}\u0011z\u0018.\u00021\u0004/{Or\f\u0017@\\,\u0000\rR/0E \u0003F\u001d4?M#\u0014 v\t0\b`).@<p@\\+(HO\u0017 oPp\tq\u001dfA\rPUG\u0010(ל-?Pp*_I%m0K\u000eE!,\nPZB\ngNr:s\u0003i3H\u0003E]jO3\u00064(Hȡ\";~\f\b\u00024p\b~G\f8P/$p\u0015CAqH+\u0019J\u0010\u0011i8TD˸4豠Z\u0003ה0~Rq\f\u0017pHzJշf{՗t \u0007uK3!Idj\u0016icиY\u0006`\u0004(<\u0016z#&\u0010l4V2Zl;>0\u0001gȘ:#\u0016uYuĀx/1%K\u0006U\u001aᕉAciɮ{W\u0003&Jl[\u001c\f\u0017ƽMiwz7\\w)LY\n\u001c_C%}\u0017-{8\u000e\u001e㩩=mp3\tNuD=C8\u001f\u0010·p~aIy\u000b\u0016LO\t\u0001c{?)2\u0005d)죸KHۣ[\u0015»H\u001020\u000e \b\t\u000e~X`8\u000bω @{r(IX\u0016\u0006\u001b\u0010A>G\u0004B\u001f{W`\b{=8#lN\nk\bP*\u001dpL\u0004\u0010{#!#\u0011V\u001a|\u001c)ƶy\u0014jp)(ׅ\" \u0006\u001fs\u0010\u0018߸\f.\u001f0p!NrN\u000b}eUCFrgV\u001d*\\\u001a}$\u00011nYz|A\u0016\u0010\u000bwA.VH5\u0000!; FPj+\\\u0010!\u0016\u001e8\u00057\u000eC\u0002wS\u000b\u000bwn4k\tOL1Ft\u001b!\u00155ԭ\u001c\u0012\u0019,qOa#\fH\u0011\u001f`(\u0001A_0\u0001\"ԁ\u0011,P\u001b2(1\u001d\u0005!t5C/\n$BEA\u000eh&@&~[(+\b\u0014Fr0\u0010\u0011\u0006560P\u0013x0,PD±6\u0006+w\f\u0006Co\b,\u0015\u0006 nҩ\u001cP\u0007\u0001cr}\u001fb\\|\b+\u000f-*a/cs)\u001aԅ+H@8\u001e\u0006󵄧 dЛc\u0010L\u0012(\n\u00060\u0016}sQ0\u0001ʁBLNR\b\b\u000fL0\u001fP'S\u0018c!A i!\u0002-\"\u0003B\u00142Vㅪ@G\u0001da\u0004RtH1b\u001a9\u0006hH.Q\b,\u0005\u0006Q?\b+F)HB\f\u001e\u0007! )\u0012e\u001aP-9u&*#aЂ\u0004x8\u0003\u0015W\r\u0012\u0010\u000bTAʛǀQ\u000e\u0018\u001a~uOK(0X0\r\"pA-(\u0005\u0017ʭz\u0002_z\u0018~ࣃc.\u0007\u000eB\u0004\f;\u0010f3V*'c\u0012U\u001ah)b\u00115.\r\t`\u00053@;Һ\u0017^.P^\"x%\u0002\u0017\u0005V\u0012\\0E2\u0012A\u001aJBCFE9Z:\"q\b\u0014nqK@V(\u0001\u0019\bh<\bn,5.kPԠ%`PJg\\e~\u0013\u0004# \u0002\u001f˞­İ:#AQH\u0004k_*I\u0004\u0013\u0016 }E\u0007\u0018 q\u001dQ\u0017~\\5\u0004=cX\u0018cp\u0019\biYdt'<ڋ\rIx0tia\n+\u0010VH|30\nU8\t2\u0000\u0012\u0005\u0004`)'oP0h\r2/f`\rP\u001a\u0012h5\u000bCӛ\u0003T\u0016#S)\u0016ǪS@`dq\u0000XjE\u0015?\u0001J\u0011Wa\u0019qe5\u0011\u0015\u0015<Dƹ\u0006,\u0005\u0015:F\u000b\u0001\u0006Y$D&\u0013\u0002`P\f2`hp\nd<\u001cA\u0007MA\u0004:\u0017T=\u001fڦX\t\u0004μýqIDu,T\u0013bxᾫ\u0006\f=}C^~Le\u0012[\n2˝~Ɗ[X\u0002\u0017Uz\b\\:;\r\u000f\">Z.\u001f03\u0014h=t\u0012\\\u000bz]\u0000*-y\u001a,\u001bT\r}hT\u0006.\u0010\u0001u:\u001fwAE\u001eoD/Bc\u00113\u0014=\u0003MW3\u00190{`1b\u0017f\u0018\u0018\u0004Aeƫ*\u0014|\u00056\u0004'\u0015\u001a=\u0001\u0018\u000f\f³V%\u001f\u0018Rƞpe7\"W8\u0016u\r\fk\u001ayw;S0(X\u0004ΰOYVF0nքP#0\u0004l\u001c} ߫\u001d\u000b3G<\u000ecT\u0000L\u0002YD0x\u0016?\u001dv\u001aE('\u001ctyYka\u0018J0]w\u0015\fM\"!&@Z\u0010o,\u0010ؒ'P\u001b90p$B<lihkh밳,\u0014d4KR\u0000K_=5Y\u00156[۩꬛_g^yX\ra5.hnu\u0017[I|ڇ<<{\u0006r9˒\u0000\u0012x\u0010C\u001cA\u000fXbHiH\u0010\u0005J'\u0019d=\u0005~LG*\u000b\u0010;jH$~OC%+Jt)\r7ac\u0006f40)jre!8XĒ\u0002K\"\r)!h\u0011,*Jv)dbVӻ$5@j*;/^0tܮW#qJ[c\u0000;L@H(T\u0004hP1\\5Z)]\u000bP5\u0019jF:AjP;*EB,h(6\n!\u0003VJl\r|u\u001aM6\u0018\u0017T$\u0004\u0002u^7\u0012--\"i]d\u0018\u0004g$HBj<4bMM\u0010VjA^\u0007Ĳ\"1\u0018p2kM݇2k&pVqXJ&Z0<\u000fRN\\\u001f\u0006\u000fZI?S!\nT\b\u0016 MngY臁^E-Y^db\u0011\\C'F:MfH%5\u0000A\u0010\u0001p\u0010hSmD~tH-\u0017HFbd\u0019j(~w\u0015R)`$ɬŀt$':\u001a\u0003Vv\u0004\u0006W\u001bl\")\u00050*[$~'3\u0016\f\u0018\"jtKg\u001a$\u001cRjr\u0014\u00013v*I+K\u001a\u000b\r\u000fG<y%I|5\ry8?hSr[[t\u001c٭w~\rGvS\u0014\u0014-STWC/S\u001d\r\u000bVLMy)X\\(hDB۞)~\u0019$x\rVf=HնwSG歐\u0006ּI\u001d$t]n@(Gk\u001b\"P JmHH\\7*m3KG5Z1j٧>X\u0012}H\u0002T{b@*Z\u0005=Cuo\bN\u001c\"YrS\u0002q\u0016F *`{r1\u001e\u001e}8d5t>kӐ<d)\u001bm\u0010K>f\u00186!fTݨ|\u001a\u000eT0bgp\u0010o&4፾%C\u00030>NS0t;'6ʿF\u0018sb'+r_Li`#TR#eP\u001fC)q'\u001e~p6;PA[[d\u0015*[y~t$Rׄ2P7\rg \"N\u000bȒd&+ո̄.\u001dn\n(\u000fAW\bB\u001aA7{50?>7H\u001e\u0004gF]]6\f7܏\u00054ꂪ\u0011TuRUz&\u0017r\u001d'\b)y4'\u00043$F\u00191fV)\u001d\u000eA\u001c22!?Zk_pkNI\u0016܁\u0014\u0002x&JiRY[t\u0010E#kh?S\u0016\nҐ%nˏg\u0019XJd$ q?+L\u0016}:,X\u001bFۉ|4Sfj2\u0015LLE,,Vbj2\u0015LLE,-̄e\rvG<TK祪3/*1/Ui^iRՙK3XfVB΂ݘv%\u001ezׂ,ȪHE`:\ne\u0002I\u0016\u000f\"\u0011U-#w\\Ј\u0016\u0014IYz\u0010&^\"ΰ\u0005D8%)8#BE*JYy~,$+NE/\"!\u000e!tX\u0001at\u0006b\u000eDhU?HjA\u0005`ZغnR|xou@)l\"wW\u00148^d\u001d\u0014Gse@Y[\u0007ZAim<\u0013\u0011\\U$3A\u0018%-\\h\u001fW$Vt\u001f7Jx\u001b:x7Ϫ~\u0016<oj篪CΊ7\u0006AG7!oT\u001b\u001b\u0015\u000e^Z6⍊xRy\"!g\u001emF\u0012odrfLhN99U[)hNhN99sjar)5剺\u0017S/҃\u0007AK?3UF\u0011y[ hi遙\u0003S)K\u000fxg\"go\u0005OY%HTC҃\u0007R\u001e\u0004OT҃UJϰ\u0010\u0007'}6h:Cd\u0002C\bD?J\reCP~'<\u0004\u0016ZPj\u000b\f\b/<0S\nYr\u0000N\u0004Lkekk\tWסJu<W\u00068u\u0005\u001f$ն3\u0011u\u0007׆\u001a\u001e>H\u0019\b\\a5\u0019\\:hyM&dhrMdX5\"v!,XS.J֨2kjb\fY9К&К&Ck\fY9fZ$.\u0004yhm\u0018/\f7%ְÀVфR\u0013JE\u0013\u000eUbфRфR\u0013JE\u0013\u000e3s0;=kJHօU\u0018\u001d21\u001e{g\u001e\"O\u0007'ޥ4&\u0018\u0016s\n\"W\fPr2Z|%!iREV4A@85܋tWpDz}ʻ:3>>\u0014J\u0019rUG˨i\r\r\u0011T\"\u0015eMǨr}I*Jl\\+=ṫǊg&F»2Ĥ\u0015\u001e`\t1k?c\u0006\u000bx\u0003\u0016UY,=oMq^OM&\u001ffVt\u0017S3lˉ˥\u001f\u0017X\n0gO\t#QV\u001c]\u001cg\nj|O^WSs@6FK%\u0012\u0007}ô\u000f秞\nSc:?uѲsތ$\u0012-ڄ\u0007\u0010%Ƭ\u0015E5֛W\u0011)G$\u001e\u0011X\u000b{\u0001S(`z}¦'\u0018AL\u0019\u0019Opj*LjdF ~jw\u000e|ju.Z\u0017UZXF\u0002H/$ne\u0011FzUF1a/^4iRӲN'IN:u:I鵵\rk)i:.CnN_>#\u0019\u001fyC.B}\u0017`P$賨a\u00142)?c&*\b7\u0017//0BY\u0016Eyk:\u001eXDيP\u0012 7\u0004X\u001bM\u0013\u0016\u001av)[O\t5-\u0019\u001f\u001d\u001ci|x(U\u001eI\u001f9&l\"\u0018\u0014T\u000b.\u001dzq\u00010O) \"\u0003\u0016%\u0012`\u001b|wϣOИs1\u000f\u0000B$u[h\u0013MS{@\nӿ\u000b\u001d\u0006fPs1bmW?G\nCYMu\u001b8#F,x141OD1bXCZhw28\u001f&ed;2\u0003\u0002؃\u00190M\np48>0Ƨ\u0013\u00104)@*3\u0010\u0018=BA\f\u00142<՘\u0004.\u0017f\u0010rZ\u0010\u0001\u001duD,#\u0004\u0001\u0005g&˘\u001c\u0006R\u000eA\u0004|pL4.F$\u0006H\b0\u001f\fdb\btGb \u0004\u0015S0\u0018\n{j`j32\"\u0006\u00142\u0005\u0014\"p\u0016B!3]F\u0012#2\u000ez$cF\u0010\u00128\u001dJ8OyO\u0015&sq%\u000bgυ\u000b\u0006P58\u001d\u0012f2Ab5S\u0013֙s3M\u0016\u0007\u0011t;.Z$湍/8*i<\u0005fQ.Ix4I\u0013]+Sy\u0012_ôP\u001a\u0017EW\"㌒T\u0011\u0005XFRqO~~93)0RE\t[b\u000b0!Qb\u0011.8/=BT<bQ%:8)M,@\u001f.x$Kx42X*˄ϡ~;҆\u0019DVXS\fI \u0000.5\u001a<\u0003\u000eLr^HxA\u001bP_\u0012cC2)KZ\u0000p9\u0010158j4^JE'L~\u0019[\u000b\u0003l\u001b޹\u0007]'Ki\u0016ݬTv\u000f\u0004@Z\u001auk\nSq+\u000bSђAC2\tX~91\u0012\u000b\u0001r\u001dS\u0018\u0004\u0014zo`Ac3\u0019\u0005/`69]GL4q\u001cxĸ\tg 0*K4`\u0011g\u0018jĴ)`(;1s\u0018d\u00004bR(DШށ83c0K\u0010\f\u000b\u001cܔ()\u0017\u0015\u0003\fW)^I\u000b\u0002o;VA\u001aѺ!x\u0015U!7:H\u0007z\r\u001c\u0010amVA1O1L\u0011EZ\u001eP0Qa\u0013[6I+\"Tx\u000e*ť\u0011, f>.3nH\u0019勍\u001eX[Z\u000eɂ#q1\u000f,ؘ~\u0011$OMff~3\to@|XH偟\u0003jT\u001ehU06U>˅Wzx\u0019nVAN\u0001uY!5xK-a)Ǜ#g\u001a[5ST*9,7&7_N\u0016t[X\u000euc\u001f\u0005%˨Sx\u0002c\u0012\u0011\u0003F\fF?{4qvtYR\"n:\u000b٨V\b('G=~}t?\u0001\u00138uB͛\u0011\u000eLm`.]n-x\u0016\fw\u0015߂\u0006Z\u0010<\u001bS\u00071~\t[BpiRxi\u00145\u0013'g^ݭ^1K\rȡSg&\u0006/\u0015'q\u00000`:yd$\u0016\u000e\u000ew\u001f:Y,\u001e\fN\u000fEgٽJ*~\u0015nxuk@wS!j1*ZX^K\fSJp\u001c\u0004\rM6S^/,-d(\\<>\u0019鄇M\u001cu\u001c<<\u0016<h\u0013W>R~qɠ1Ft \u000b\u0011\\\u000e\u001c\u0019?uUW\n^+ƫ\b\u000b+ўv,\u001fL)H\u0011\u0013s\t\u0014\u0004\u0012:\u001f`@O\u0000\u0003\u0000]H`@\t\u0000H̘\u0000?\u001d<'+\u0003 S\u001c'\u0012.vZ/\n\u0005\u000b\u0004C<mqg\u0001<\u0006s[Cld+ztd裂68/WX\nxZRU`\u000ey\u0014g4j\u0012\u0005\u001a\u0013+\b;6,MەJP1\u0006\u001b]_a\u000b\u001f\u001fb\r`3MmBoe\np;mqvlxRs\\ߜB\u0001*\u0005\u001el=]5V(^~T'K$\u0014<Xef0q\u0005\u0011VpMa\fM\u001eGTH\u0006(k\u0003\u0005\b\u0010 @\u0000?c\u0001\u0002\u0004W\b3.@0\u0002\u0004X\u0012\b.@Ň0\u0002\u0004X\u0012\b.@Ň0\u0002\u0004X|\b.@Ň0\u0002\u0004X|\b.@Ň0\u0002\u0004X|\b.@Ň0\u0002\u0004X|\b.@Ň0\u0002\u0004X|\b.@Ň0\u0002\u0004X|\b.@Ň0\u0002\u0004X|\b.@Ň0\u0002\u0004X|\b.@Ň0\u0002\u0004X|\b.@Ň0\u0002\u0004X|\b.@Ňa\t\u0010\u0004,5E\u0001\u0002>$]z\u0001\u0002,(N0\u0002\u0004X h<\u0002\u0004\b\u0010 @V\u0001Z\u0011VX\u0019 \u0015VUk֭o\u000b֬Z\u0019sjŪwl۾cg\u001aر}\u001dkWEZvCמ&@\u0015hӵah8w?zቡB*\u0018\u001ez]~@X{Ǟc|\u0017?ɗ\u0003T'?\u001fx؞;:>\\\u000b\u001fW\u0003T_'?pm[~;{\u0017?\u0001[\t}S\u000eǿa*x{Ϩ\u001dm\u0011vOo\u00017_>9lvTxK\u001dk.7x˅ 9\b|j\u000e\u0002 9\b|j\u000e\u0002 ɧ\u0010Am\u0012túJ\u001dYW\ttuz.փu\u001d\u001eTG\bߥAw.T\fBw\u000f\u0001T\b\u0010`Tڹ\u00019\u0004%7\u0017horXajD~\u0011,x\u0000Jسc\u0013Px\u001f/\u001e܏\u0007y\"e\u0016ꬰѬ՜e\u000b#\u0014ɨPщ╩ɱg3\u0007\u0006\f\\?[\u0011{сqE\u000bH \u0019-\u000eg0=<Z\u000fB*Ɵ.\u0001Og;\u0015;_?.rh29͐\u001c\u0011\u0012E%L),Q%!e\u0019\u0002e[\nJ\u0012\u001a߳\u0004\u0010eT*I)f)\u000fRg{[Td\u0007㿹TqF;\u001fl2\u001ew\u000b {bHq3f$\u001e\f#GT~#}O\\V\u000f\\qb,=>62\\<\u0000\u0006&nF2y\u0017&F՗_lߘ(Ny:̛S7n$?~/,έ\u0019zD|.G^Yށ\u0004X~\u0017#\u0019UMk>7&\u0019Qf=c*5'Rz\u0016'@\u0017?\u0011!j*M&x-{ح1U/\\xqbzNq6\u001d@q]N\u0015\n/\\|c*\n'va\u00104螃WsgǊ#CrP\u0001\fV++rJ@=\u001a\u0018UZG:U\u0018{*,г/\u001eе\u0015_\u0013M)ԂB\n\r*4\u0005S}H׀0u#}\u000f\u0014˯ǭ\u0018.\u000e\rءK7#C\u000f\u0015_\u001aX7\u001b)e\nLܘ0E0\u001e@\\_FG(i\tWZJ(H\u0004UH\rW\u001c|r(HC\u0000\u001cC\u0012j\u0015\u0010\u0018P-9S5\u0002\\x]WUyJɵ>$<Мؙ̼\u0005\u0014>bR`\"\u0019\t\u0001\u0006\u000ez산\u0012\u0012C\u000e$r\\k7\f\u0006N\u000f1\u001b\u0018=݀)ʜjY\u001a+M\u0003re96\u0018\u0005j\u001djfD,7\u001c\n$r%9%5\t㇛\u0004KH3\"WF\u0015\rȭ\u001f\u000787V\u0019ҕ\u0017Ǧ\nϝzaj\nuIxJ'<)42&\u0018[\u000b\u0010\u0018Ms]$\rЂ\n\u000eN\u0016pEҼr{451fX\u0002L-17_njq\u0010\u001d.\\}~O[BMPa\u001e\u0006&\u0012i\u0018ŉgK\u0018ԡ3\u0005\u0003&cM^\nZʖM\u001c}G<5ucrH\u001bωea\nHYd=F s0p\tTH$\u001c0\u0014&\u0012F@\fSFA\f[SG\rF\t\u001c#\u0013S@nZ5OGJ\u0002GZ$\u00033\u0017k+3)؜ZpzT\u001aJ0&YM-s\u0013L'#h\flmwY#\u0017\rإtk!ScPiUt|\u000649\n\r\u0014\u001a\u0019\bҔ(;|h+\u001a(u*wg\u0001kէώMīP\r?{xkP̵OF+\u0014\u0002\u0005կ3\u0018%̵ `G@\u0015?@\u0000*z\u001c\t|$4\u0013\u0006ڗz\u000bW\u001f9H~۹\u001d[LH\fN*r=fZ]slMDn\u0006\u0019g;#DnL,*GKMb@okCokCokCokCokÏ^\u0002d[˩m2\n\u0011,hk\u0000\u0001\u0002\u0004XмʽM``a\u0015+W^futv,~RĪ\u000e\u001eXf}GugI\u0005Ə%jaumm\u001dܵkˆux\u00060~+c\\Q\u000b+Wܲ}Kڎmsז5Hպ\roް~zꚎ}WBX\u001apY\u0003lߴ~5[3QNk}綻ݵcS׮v\u000b߼~.\u001dwt_cCG{[[;XqG=;h_v݇8&u;6y޽;m\u001cbvlEWs/W2{-z\u001d[wmu͛k_N\u0004\bصO\u001f8@m6mڙٟ5}űw\u0011׷a{22wg]}yf߁\u0007=w=k\u001e>s\u001fλ;~~sW{{Quݷ@9qf+\r\u001c9\"9~\u0014<zCLn=v\f=~N<h9Μn[ն^yفs:?0xǴVH߹k\u000f@\u001fؽ7G\u0006iʠ\u000bg\\<c]xXۺ>oݦ\u001d\u0007֜x\u0017N\u001c?cO=r\u0013G\u001az\\#\u000f\u001c޻\u0007.]x\u001e{GN?yl%}+uv\u0003?п|+OG=r1{T\u000bi?y\u0007\u000esP<xܱcg\u001ez}\u0006\u0007\u001e>wԙĞmq\u0010XvԹǮ=z\t]z\u000b@#D\u001f}#G\u001e8em#>ȅ'8\u001cl.o<rX߅gO(7ϟc\fdu$w޽ڵ_\u0010B\resGq)̑NvmZ[=U\u001e=~T\u000f?L{w\u001f\u0011{ﹷwnug}=#ǏY\u000e\u001cUپa\u001f+vvp{`n\u001eݗ#[߽{߾ݻ7vnܲcw1z`߽}׽\u000e׽i}<Wmڱ{\u001bL;os˖;wܽ[lho\fE۶mlؾsӆ\r\u001b7o۾kfhc\u0016N\u001bJe\u001b:Q_耉aƍ\u001dm׮Yv}\u0006v\u001a\u001345֮]\u000eq_nW(;<\fjJYVrE\nϧ:M:>Z>ƋX=SG\u0017ZU=QO\u0003,9,RƘ#gY/\u0014Ѭ4ȉ\u0019\u001eVftfJItojޝ۲BgFC[d-2k\u0005\u0005Dy޾\u0001J\u0016b\ny\u00018;Y,>:1r\u0003\t_/\u000eL\u0014\u0002\u000b(=7&_*L/7'N7J=n\u0003\u0013\r!\"ϲFBV\u0014D!\u001f,T:\u001dæ\\uUy3{\u0006!AF\u001a)\u0014\n!`)Q8Lr-pr>L\u0000ݴ\u0005\u0017,Eua4e\u0017tݤچ*9\u0012\u001b~\u0002\n*E\u000eMZ\f\u0011{:^ іz[w\b%>eBR\u000fHDq\u000eGpK\u000eCxİz'/\u001d.<3Bք1NV<\b\tK\u0014X\u0016`Krt\bB\"\u0019%&.\u001cPaY%)L:WZpIS\n+\u0016K\u0015SAJP\u0004&iA\u0004X$\u0016XSDga7\u0014^kk\u001f\f}ͼy7_~/_\\\u001er9\u000bMvQSBu$4eesɦ\u001cgFRJ!FH.s&\\\u0011t\u0012+s\n\u0006\u0004/f\u0010\u001cQ\u0006:̴\u0005ɒZ\u0003<@}\u0004\u0011,\u0003m0k(TeN\u0015\u0016oo\u0010t\bj\u001a/W\u0000둳\u0018\u0018\u0012\u0005\u001ddo8\u0005OeDMM\u001b\u001dJ;y\\g=\u001fd\u0003<(\u0000eZ\u0015Pq:z\u001b\u00000wEƞ\u0006ѩ]Cv\u0007cK4*`F\u0019\u0003\f&\fOj(\u0003JrpňRD\u0011N\u0012\u001dn(\u0004UܝZ\u0015'T\u0015XM|ŝ<mĝcIJNB|3[!rVYɴPHb9i0\u0002L0!U\u0012%6DX HM\bGƀ\u0014ŀ\u0012*)(\u0002$\r#4Z]Rs*\u0015#o8\u0007@\rESU. \u0017s'CD]]vhtd4\u001dy\u0005\u0005=tfMQZ=L\tó\u001aLSĝ\u0016\u0004\u0018/gs\u0017\f#t\u0012\"1\u0010xNtv>ߩ)+\u001d\u000e\u001ej\u0012&:,1XU76\u0001n4:\t4\u0011\u001c\tk@\u001f\ftLj\u001a\u001d脶5u63\u001dqVoVu\u000f\u0001\u0002Q\u000eWpt|f\u0007m#{?SxnjY^٩\u001exUPC7&\u0013SCcC7g%P9W^>|c|`T~PDr\u000e[32ѳQoKA\u0012p\u0010K˵DO\nh:9zc<pǓ7\u000eqD~\u0018\u0016К{sb+O&/690\u001c\u0010Rz\fGMgL[5 ۘ]\u0012j\u0005Ү=Ԁ\u0014\u001d\u0014\n$Ic7\u001a\t\u001e.@LN\nJ\n)X'(p,Kp,<A\u0017\u000f\u0017'd<\u0014L\tp=Pz\fn=\b@\rF\u0000`\u0015\u0000\u0002\u001c*@\u0003\u001bйҌm\u001fL\u0000/`A@\u0004%Ib\n7\u001801`JnZi\u00049@̢q\u0014οW\t%5N\u0004\u0004\u0001g\u0006\u0016\u000f]C5\u0007\u0017b$e\u0001B`\u0003\u000ef\t\u0010iiW\nJ̏\bG\u000eP\u0011r*\u0003\t\u001bcnl]t\u00028\u0000\fF\nFPpG\u0019\u0016#DsZ)\f\u0015\u000e.dCv͊[|5Ī+\b|9p\u0018\u0002\u0002\u001e \fA7\u001fƦ@|\u001anյFt9H䍛7#QJ֖3K\r\\9舗 \u0012\u00053E\u0002\u0017,NC+ȕ5V\u0015\u0013\u0016x\u000f\u0014DOFJRP=߬TtzW\u0006ؙpp\u0010iJaG\u000bxKDeZ\u0015h?_Ob[{\u001c\u001b)֗Dqfbd1q\u0014Gʶ^\u0007׎>ϵ\u0017E\u000fZg\trA\u001f; Ȁv!HfQ|ٯf<ܣ=y>\u001c\u000bգy@znW\u001f$1/aؾ\bN/QDcc:gG'qh+Y\u0003\u0011Z3\u0019}\u001dl'?\rڋ΂y\u001f\u0005݈ul\u0019)ITv\u0018e\u0006o\u0014}irc4Δ{~?m\u0019\u0013|9,\\z~B\r#\fx'\u0011z7yT\"\u0015K\u000er\u0015\u001c~E FX0E6PiR\u0011\u0015mջ)9g\bۋW_\u0012\u00149\fG}&\u0017Anǀ3>m1\u0012?ZGaE2B\u0012Q>\fh߂\u001a<\u001anFs1nUW\n5|\u001dv1my{D۩{Z&.۔ү\u0019[\u0015|svvŽ9+⨝mi2]\fR;d\u0016,qR\\U/Nw]3<l\"jZ\b<8\u000e߿qY\u0015G5uyu1?2T_c!lW˦l\u001c\u0018O\u001f\u0015gɭ\\ ,6D۸k.\u0014\u0017=H\u001c\u0004\u0013\tz4\f\u0019][YdSXxjy-\u0005\u0001%\u001a.4nwvP`Dzq$d~d\f\fW\\,q\u0010Z0x56Z1s |,p\b4pI!\r:S\ns˛n\u0012A\u000fPTk\u001580^\u0002f%s} \u0002׹\u0005@Ør[XT\u00100`gޚ\u0016OJM}oR\u000b\u0000L\u0018(7\u001b|\u0018\u0019j!̓\u001a\"\n3֤h\u0013mq񴶵yR0F/9e.}jzB\u0011\u0015(7S/ȏZn7_syfe{r檞<¢dxcz~|vyfn,IgdUfq<^E?o\u0018^-/ϖi+\u0002]uePSz*_!6}\u0004(lArQvڶb\u001b=쫓D5mxԄ*T\u0002-/,p7\u001aƹS\u001aO\u001aNsX\u0006\"P<\u0001c,WT5\u001b5&3y=E^aIf\nspts\u001f\r:hC|˯b~;)\u001al\n&6h/h')J*6\u000fl4\u0013\u001bm^N\u0012\u0013IhN6@f;`>i}A;Լ\u000eWu\u0012\fL:F_\u001cӤ<</\nm\u000f&Pq^\u0017~e~=\bIҜw(\u0001#oЗ=#\u0003Gz\u001b?S\u000f\u0017IzсR\u0006^5y6FeEeՈZj\u0006s5FبQ\u001c\u0002Ѣ&tg\u000f=D\u000eL\u0014_\u0018)d/Кk\u00164\u0005-͵!\u0014Y\"OXm|&g8$\f\"[\u00169W\u0012\u001bD\t:U\u001fx>\u0012\\\u000b\u0017\u001eY]\u001a̿Tf+G+Wi9f\u0001Q3)\u001fX8\b+\"&\b\u001bpag\u0018\u001b#7u啂\u0002[nP-N!\\q\u0013T&z\u0007\n}/u\u0012##\u00078u}\u0015\u0010U\u000b\u0013\r`*RQ*nj\u0014Pp2\rDD8vO?\f\u000fc\ff\u00153º5FƓސ\u0014&qyjiڸ\u0003\\;\u0001 \"&\u0007\tY\u0013Hg\u001694HH?xR<\u0006\u0015!9\r&*S]\u0007\u001f\u0011\u0003`d\u0015\u001f;N#Sv,'\"g\u0014tP\u0019.񻣯Ċr7D`e r\u00101F-s\u001e\r./\u001aE\u0018\u0004\u0018֣KЁ\u001cՐ5LKkY\u001fU\u000bu\u0018\u0007xEqRBW2~)At\u0003X@\u001dkܝ2@\\;63}$c\u0013c-Gc/\u0013exߣYj\u0017׭Qk5ݲ\"h\u000b\u0014\u001c\u0018|\u001f}^\u0019yH\u0005xt9\t'\u001dˡ\u000f\bY<S\u000eLxV\u0012dJ\u001e'ފ]y+\u0007TESƒ;-T;im\fSܗh$\u0017j<\u0005\u0010)PZW%\t\n\u001c\fMO>0\bM<U\u0017HԔ\tp\u0012*_&uJkIB.%\"ST)Pˏ[$H\b!Q+BA\bn˺\u0007d\u001bk\u0011X\u0013a\u0015o89-&ܗH\u0010xK\u001cSS[\u0006\u0001\u0017 \u0000P0A\u0003\u00189pԸ`\u0001\u0014vh\u0012\u00027oQ`$\f-j$WT\"\u001ain|\u0007ih\u0007zmo\u0012̨\u0019\u000bpۍ\u00123rR\u0012%\u001aod\u0001eJ\u0012־J\u0017\fUY侼Mq+\u0001f\u0019DA\u0013MK\u0006\u001cBk\"\fϸn\u0011\rkѢu|uL@Vq\r7\u0015,HY`eH7_\u0004\u0018\b\u001c\fn\u0002\u001dT\u0001-\u0007\u0016\u0017'x'\u000f\u0010\u0016B\u001a010؏M;y'@V峢?k\u0012V6]UеwzUkJ\u000bj\u0018!d\u001a\u0015=)2g#\u0015L\f++\u00193p :Qq;P\u0017]GŅإ\u0005s.&\u0011\u0003\u0010\u001a7\u0006ʬQRuI%<+\u001b-Q\u00136\u000f\u001d\u0019\u0019\u001e.H5^RG\u0019\u0016\u000b\u0015F\u001dQvן+p:x[\u001c\u0016pt\u0002\u001c\u0018\u00053R\u001e\t*Y{F\u0017&\u000f\u0018򚳉UJ7f\u0019J@.\u001ft3,Q+LiΕVU^\u0012\u0006[9\u0007\u0003\b\u0005k\u0000\u0000\u001a<2,\u0004\u0002\u0014mr]\u00022q\u0010\"\nLbAy;]\u0000\u0007`\u0018\u0012q4C\u0001A'\u001a\n1)ucHh%f\r'bY`K\u0015\t`ap\u0003Sh\u0018!#NA\\a\n\u001c-ڀ%8\u0001ث\rxv\u0010=#ZQL{xi.N0A0%\u001a#\u001cX\u0003 aRC*AWֿ\\)\\P-rd²㏹v|\u001dW>b\u0019ZŽ`>mr){<_W\u0013̧ͯ`Y#_ɲ\u0006v^L0).&Gۿt\u0017\u0013̣\u000f\u0017\u0013\u0017\u0013~akD7RU2\fLh?=\u0000BR\\iLdJ\u0007G5<5{ZK\u0012ܤ\u0014i\"в\u001f\b-0p+NZ,\u001f\u0005M)H}g|!\"\u001d\br\u0016;b\u001a֌]+LEc\u0002^fa0YEa`z\u0011n\u0018ao}\u0013C8WgH\u0016voX6d)b\rJ]`;t\u0013<>jW,\u0010T$\u001f\f(\u0002?\u00069\u0015RRR3M\u001axҰ!Uvc}\u0000\nuT\"\u001a\u001dbi=j\u001f̂\u0011YH%\u00125M\u0010\tF\u000f\u0012o\u001ffߨ\u00077g\n\u001c+\u0015Kt:Ui\u000fl@7`Xov40ltjvF?-YF\u001bJK\rZ\u001d^\u0013\u001c6\u0019g\u0012;vYql&N]\u000b+\u000fv.\u001a+\u0014/?x*sbg4ng2ɼ/CAT♌kϥc\u0011V/\u0000\u001fvUO#\u0003w\u0013\u001dhJl6^\u0000\u0001Z\b:u\u001c\u0004!0\u0004Q$\u0004i\u001e\u0004Q$\u0004i\u001e\u0004\u0018\u0004i\u001e\u0004i\u001e\u0004\u0018\u0004i\u001e\u0004\u0018\u0004\u0018\u0004\u0018\u0004i\u001e\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018\u0004\u0018W\rKMN9{\tXj\u0002\t@[\f@[\f\u0002\r2}!UA/\u0013h\b\r\u0019dz\f\u0002\u0019\u0006.Ф4X?TA\u0019f- \u0006s\u0017e\u0010B\b1@\u0000K\u0005KQZ\u0003V,\u001d4AʥETBXڌK\fZz͚5k\u001d[\u001cAH!R2$l\r\u0010c\u0000Zkk[\u000fDAj\u0019X\u0006okйqӦ;\u00006/\u000e`S6m޶\u001ee\u001cRutnڼu۝]ۻ\u0001v,\u0006`Cۻܶu\u000e$\u000eifڪ5뀰;vu={]\u001cvg{gw;ukVU-læ-];wwl.׻Xe\u000f\u001f:o][6m\r([\u0016(ڽký\\#G\u001d;8p#F\n񶢒i;6mqϾT\u001d=y\u000b\u0017/-\u000e\\0xG\u0015=\u001d[7u`ۊ\u0015ȴ-ʣ\u001fzɧ\u000f/\u0006\u0019zkW\u001f>Tfӽ\u0013V\"1펮]ĹG\u0018*ɩ\u0017\u0000n-,`\u0013SO8#N]]wxŤ!ӶsX8瞿\u001fb}g?y瞾z<gVd[D\u001a\f7uOGc_/W>\u001fO\u001a깣tMVG\rښu\u001b6w>\u001fyzW?W^ys\u000b\u000bg?/KO?ү\u000e޼\u0001G }G?ܭw/g\u0012\u0017\u0012\u0017~7?k/\u0013\u0003/\u0006m㶻\u000f\u000f\u000f=Sg>/?#\u0016\u000e?\u001f_?/C\u000f\u0007޶-\u0007@ڶMwsHZ\u0017?|/~>[ūա{Զ4\u0005ܵG?/G\u001boͿƟѫ_?v\u001c<(zm\u001dwgr⃿_n{߾W/\u0007'<${\u001du\u001d\u001d|g~?\u001b{\u000f??y?~=դu i.\fM\u0017~?|\u0016\u001e\u000b+?;9t\u0018QKZﱋL}\u0013?o~|텇|L=sXo\ri:6w=~)Ͻ_?;.4\u001b?B޽ݛ;U\u0003I\u001b~_~K?/@ؿ.4\u0000q?~_za\u0018IQO?ݛ;Hق mOo|㏾ʧ'\u0005&\u0013nO}nHܧ~t}DڂS\u0006Ť})^[\u0002^\u000b\u0005\u0002i@Z -\u0016H\u000b\u0005\u0002i@Z -\u0016H\u000b\u0005\u0002i@Z -\u0016H\u000b\u0005\u0002i@Z -\u0016H\u000b\u0005\u0002i@Z -\u0016H\u000b\u0005\u0002i@Z -\u0016H\u000b\u0005\u0002i@>}L-㓎|2<U\\\"/\u00132-`ޱoXy,[P1Ɲe{O2iY߉o\u0012[-[]\u001f[J.8\u001d1ͯq܈eyp\u0015yK\u0001\n,\u00189w_;7 rTq\"\u0014\rMN\u001e+LݘO9e4{\u001f\u001c\u0019@\\\u001c{vl\u0002\n\u0014C\u00112\\\fBB>+dK.J!y=jmPщ╩ɱg3\u0007\u0006\f\\?[\u0011{сq6/lGB)\u000ef͈\u001e)XQ\u001c%FU?\\>Y\u0003v+v\\\b#*a+\u0012ʹRp\r\"\u0004ʬ2i!5[Tɵ<6K}ߵ:ۙe9㟖\n`g;\u0010\u0007߅q$pf1H\r@\u0017BK&\u0014=}F\u001aMhލm06`0Ÿc06)!tB\r\t{%lv޽[;\u0019c\t$I(\b$K:ztѣ5Qp$\u0010\b\u000bB8\"\u000f\t\u0001\u00130q<\n{a6\"\u0004y\u0004h\r\u001c:qp05\u0005T\f'\\,r\u0014*\u0018k.\u001d\u001an\u000b9\u001c]VE`U(hqo}1\\\u001c=>Z\f:k y|rq\"SY욞\tDi*.O\u001ccWCK{{佶x_P\u0000v\f\r\u0014\u0014\u00125\u0017WmO߂w٭{d\u001b\\1=>~GC\u0006aôKWy`;GUU\f\fu-Z?`ᜟ/I<D\u001dFn\r\r.\u001ds`:;\u0006~C\u000fr\u0007\t\u0017\u0017\u000b_p=MI\u0015пeA\u00071ܱx$y\u000e1\u0019mm`@=w9~\u0013\u001c2y򲮮ev!fc\u0003dhT8;\u0016\u0003N:>mVf\u0017;yӇuߙ\u0007Bӝ\u0019N&`HJO2}^~I?\u0012b|~6x_I+HbG\u0012;ؑ.ؕ\r\u000fw$\u0006HeK\u001f֟'V=^V\u0017m93ge{|S/zr'Ct \nD\tǈAj\u0018\u001a\\3}y\b\u0004oi\u0001?r9;\u0006\u0006Gv9\u001a:V\f;i:\u0017-n\u0012\u001c͇¾` \u0018\r -\u000b\t ^\u000e\r/n>\u0019K^R\u0000ܮ=˺\u0000_`}xfN'ag(,\u00061i\u001f!j X=zk)g',\u000eG\u0007Y\u00168KCf\u0001\u0019\bd;\u000b&.\u0016\u0005 -z.\u0006x\u0001\u0015H\u0018lm]:\u0000-U\u0005s;v\u001f'~1ݿF_H|\u000fo֣9?*x$M\u0013(.\u000ehG4\u0003k\u000e\u0014k\u001e#k\u0017\u001d<uHG\u001e\u000e~ZAȣ\u0015[ϿOO}QŤN\\xWsuJޣ5\u001e\u0003\u001fZ\u00135؍\u001fW/Ť#o]|\u0017;_x\u0011Il\u001f~?yP#it˖Ο~f\t,:6iI1:Q$<$-qُĿ!~+\u0014\fq!\u0011\b{\u001cz;n/w::9}db\u0013*\u0015eu:>y`+`و7vx;:{\"^\b\u0006zY>\u0012x(_&^p2%\u0004 $\b\u000f9\r\u0016\u0013\u0016B\\0sB\u0015 \u0012p\u0006\u0011Gh\r/\u0010)\u000b\u000e\u0017\t8(I_\r{M*AR>>!8\u0003ſΠ\u0001_\r!w)ȇrB)\u0012\u0015|9\u001a#|0\u0019h\u000brӄc#5%̷}Bۃx㱐\u0007#\u0000ϣ\u000fn;\u001e\u0019P8\u0014\"Ѱ m\npw\tN|} \u0005l\u0000n$\u000e\u0002+@(\u001a7\rGDYx\"B'H[\"a\u001e\u001e\u000bNt!sޏ\u0018vB$\u001ca(<(H\u0011\u001fE\u0005\u00170\u0013~\u001e\u0015\u0013>?W\u0003;\tB\b\u0005E8\bsq~\u0010&\u001aG\u001b\u0018|\u0000\u0017\u0005\u0002\u0010\tt\u0013ȗXy9wyt\u0013<HpP(\u0010\u001c\u0007\t芻<}\f8w\u0016w\fM.x'oTW\u001e\u0015P\u0004H0\u001c\r\nQM\u0006s\u0011\u001db\n\u0001\bEan_@\u001f,'e(m\u0004I x΂b0(3S\u000fdܗ\n\u0007Sp(\\\u0018\u001f\u0004!^EC\ty _\u000e3\u000b\t\u00180\u000f=T\\0i_B\u000flCq\u0010\u0004!\u0010\f\u0006Q:\u0019HXH(\u0000i5˱p9!\u0001,!rPq\u0013q\u000f [\u0001e\b\u000b\u001e\u0002\u0013l\u0018\u001e\u0010\u0000\u0011\u0006DQ\b>\u001a\u0004\u0019y}e\u0004\u0011\u001bbxC\u0013pb26>Ê~\u0004\u0004ǿ\u0000m\u000fOb\u0010\u001d^<pA\u0017\u0003A<\u001d/\u0006\u00103i.\u0011LᎬxܹ;\u0015P\u0013dܝ̝G\u0002\u0013\\\b\u0017\u0018L.\"\u0004&%}睜Hh\u0005@\u0001!>H\bUx8\"\b<\u0012\u0010\f\u0005B($D\"h \u001ceqwX޻rl8\u0001ӟ\u0000\r,[\u000f\u001bBA>!\u0004\u000e\u001b@/g\u0002\u001e\u0011b\u000b\u0002Yۗk٘\r1\nL짒[ƿ֣-&mwt~|\u0004wV-_Qr\u000f-\u000f\u0004\u001aﲒG\u001eV<T%\u001ex@KqMt\\ݾ\u0012%> ]\u001eB\u0007{]x^1\u0013ƅEѻ?\nUHA\bD\u0016\u0005<\u0016=\u0003A#!G\tr</N>\nQ\tw\u001b=0MLmI\u0007ƥ\u0013l?\u00140Ex6y1\u0004\u001b&<=]o=Y\u00199g6\u0004>\u000fP\bRWpN\t\u0002詀W({Oei\\ޒ\u0019L,~yq'؋ǷLd\u001f.l\u0014k\u0018A􄻃\u0006\b \u001d\u0010<Sr\u001bCz\u0004>ûq9Ti\u000b\u0005D\bCQ6O'N\u0013]z|˃\b\u001a|X\u0011-\f\tl\u000b\u0007\r\u0019}\u0002c\u0010\u000fn\u001dޘAge\u0010?Ih?\u0018O0'7ɘx--]3+~>y\u0011my^<]P}}2㝽az{1ý4\u000fE/\u0012>\u001fRh\u0006B Ŏ\bu C<\u001c>įp4>KT\"N%\nM>2&JL!8[Dgw@!\u001f\u0001>\u0002\u0013]Lnxs烑\u0010\\W\u0000nrJppu#>*\u0004 -\u0007X>(w@\"[H\u0014\t(ktߺC\u00016Yr{늯;Ka\u00159<щ;mVl0nS$\u001aE8:.h;\u0006Ca8$n\u0017׳\u000ew\u0006Q\u0010M\u001c\tjU\u001c\t.+0=b<U&w\u0003~[FdܽTw]w\u001ar\u00059x \t\u000eoK ,\u001bc\u0007\u001fJ1)[\u0013\"!n\u0006cńH(·o\u0004q\u0007b'{H)\u0000)pP\u0012\u00002+фk\nڎ^a]^/<\u001bt`G\u0002ddq\u0000z\u000f/\u001f\u0011\u000e\u0004\u001e(\u001eQЗtqPS\u0001BC=n?6o\u0016\u000fу\u000bE{g\u000f+ËQ\u0014H@H\u0004!7\u001e\u0001'.!r=HF=skh0\u0011yx\u000bPY1<\u001fB\u0010b\u0011xZ@/\u000fax\u0007x\u0016pʮ\nȁ\u0002E D\u00114\u000e.\u0004\u0013Q5\u001e(%\\Ol\u0007\u0012n\u001d\u000fb ,2-wd𨵞`\u0012R|6aԅG\u000e\u0001_\b^g@'\rH\u001b\u0004O\u0010\u001f?\fJœ\r$Ww\u0004\u001ev\u0001^8O`uUU] V<p\u0018\"Ә\u001eCm\u0017&\u001eU\u0007&\b\u001d\u0019'k<Z\u001bE\u0012@4\u0012AI}4N\tI#(ϸ*e#C\u0003˖ޥ\"L\u001e\u001a^1Z|s'8pTK'٠O>\u001cz\u0017\"_\nE$\u0014\u0017\u0003\u0019/֒KH?-b\"&#w{&nr@\u000f\u0010\u0007aߘF.c\u0007\u0015\u0010]\u0000}\u0010\r\u0013 WQ\r\u0007\u0010C=_&h 8q\u0016_?>gC\u001f,oCG\u0018%W>Pv{Xnphq\br\u0007\r+IFF22dd\u000f\u0006 /\u000b^K\u00110 \u001fM6{\u0004\u0003\u0017\nG`0\u0002\u0002a^xƶ\f3/\u0010\u001b=\"?\u0016\u00024ώkxk;\u001d'1wGHgZ=L0}N+ot-PM\u0017jz>?)\u0005<:f\u0005[6M$ԩ\u0013|B5\u0013\t5\t{\"&vO)\u0018o)\u0010\u0014\fAv\u0007s\u0015\u0013\u0007!\u000f,\u0018N)\u0018)K&2}\u0007\u0018\u001e\u0006\r6vp23\u001e{x|LR)|\fE4: tkm\u0018h]{\u0019z]|\u001c\r8\u001aְTh(4m}\u000f֦32\u0000Wh$){cFy{\\j\u0016\u0017{2E^B.ʑHd\\\\fg<$;G\u0010WЀc\\DPȲӾ7k\u001a2Wnjҩ5\u00066\u001c\u000e\u001bpی2p9FdVQ9\u001e6۝\u000eV<JW\u0015~v\n\u0015\u0001?\u001cV44֕pVo\u0013*jJB>nJˌ3gL.),J\u0006Yo<Vwtօ\\ޒօV,4sNǂK>\u001aM]7g\u0005#+׬z#}]\u000bG=j\u0013\u0017h_\u0018\u000b\u00144\u000fmwd\r#VCǎ\u001d>wƠ[z\u0013\u000btlέݳޝ;̞Ç^[f?~눓KesV=w⑃ؽ+/+7N=Ys\u001a\u0006׬Z1oGϝ9t_>YZK\u0004\u001b\u001d]\u0017xgO\u001e>zW\u0007?x+E`S#\u0007n>sh6lqƛ\u001fk|1G\\4=kG^z_tC\u0017_yÏ\u0017\\z[0ѹddc;\\ػ#/\u001fґUSGLWz\u0016.\u001b߻W_z\u0013\u0007ݶk.ط5Li=\u0015=3.|\u0017Z3iFEϜkW?3XP$C\u001eyb`v\u001e9{GnY6z۞v=ʥ[SgUVϜ\u001cݷq©\u0015E37<tsO/dd\te\u001ey\\FGZ:Ϟ5f[ٹq`\u0019\u001d\fn)Y-)\u0017PŤO^w~sqy\u000bXlZ:+<|KtRs[碥k\rN/ჱ҂Rde\u001d.3mrbՍMSˊx\u001b3({jҤW'M>y|\u001a\"i]\u0003Z\u0006=e̔Q+z\\\u001c%YҚ\u001c\u001eme\fJ\u0014ӌ3\u001aiwGǪDC\u0017C2+iLͥn\u0014\u0004\\&d-\u000bIhVFzzf47O'd9\u0012\\ȕe}w8\u000ft,-Saޮ}\u000f%\\h;q,>1\u0017\u0007{<-=\u001d%y߅c\u0005,mlj&\u001e3>ݴl2\u0019oOKoOkpGXF$'>,\u0002݁\u001e{X\"x\u000fx1{az{;x\u001b\b=`W\u0011zC=PWv>^C@/\u001f\u000ex#7vz<\rFzB=h78au/˷<\u0014\u000b\u0013==\u0007,ٱnI\"\u0018@,W\u0015\u0006QD\u0013p8]:{{{p:Qo3v`\nBg\u000e `T\u001a\u0007>\u00016PH\u0010u\u0012\u0012BĆ(4\u0012\u0015\"\u0001cA>|׮\u001dlG\u000f/ݬe{t\u0004]\\c; υC\tOЀgA\u0017c\u0006ay@\u001d.DXLZ`;\u0001Ǣ\u0013,\u0000B\u00031>~B\u001a'Y.E\"w]+h\u0007\\(\u0014\u0002Q\u000b7EA<鼵=\u001eΊeKѠ1K\u0018ے%=\u001ddS\f\u000fw3f\u0001\u00165-\u000f\u0006C :mI4\u001dBh8\u001a\u0010\u0015>*\u0004C\u0010wl\u001a\u0011\u001f\u0006\u0019!q\u0018\u001dn7/\u00133(\u001e[\\y~@\u0013?\u001c&\u0010^As,HϞ9~n\u000e>B8\u0012V)~p&>Gi'KL\u0017>%[=\u001eNweHjGӍ1v2.mo-cu?ҿ]\u0004IΤgLw~|~ׄ/><}\u0019{گ/>#|s^H?\u0014!sLS\fG\u001eIvd\u001c\u001f#>q|L8>qERC!\u0010O|~2\u000f\u0019?{\u001cg\\VQ\u00022\u0019g\u000f>0\u000f:C\u001f'\u001e<O\"m&\u0013A\u000f\u0013\u001eH?X?YxS\u001anٷfğ\u0006\u001dJ\u0010W<\u000f\u0019'\u001e'sk2&\u0010\u0019J\f@R\fϘ@w>A;2.\u0010HfF23}\u0005s@\u00135\u001aj\u0012:HA\u0013qc\u0005тD&4}N\u001botsM\u0017j>?)\u0005<:f]'\u0012\twRr̅PP'\u0012j\u0012o\u001e\n\u0001OPO\u0018ow?'_Aؿ|?}\u001bP΂ᔂA\u001eR-d\"7kz\u001b>тhAd 2Z\u0010\u0019-\u00164тhAL_]\u001fߞQveƋ\u00197З\u001e/:C[?\u001e'l~AF\u0015v*4\u000b[\ngdH>7՘Fst\u0010\u000fb1Kǯu\u001e1&\u001c\t(>\u000eи\u0001\u001b113~ךQ>00Gw\u000e$\u000ex\u0014\u001fhtxꡏ>Z\u0007\u001aQ\u00077H8!\u0010\r۽:,v\u0002Qؙ7(l\u0004$F&4Q ,АL&j?#ݓG\u001d]@ܑHq\u001f[=\u0010\u0012[K_~\rA\u0016\"\r\u0010iگp7H\u0016\"\r\u0010ip\u0010q-D\u001al!`\u000b8C\"\u000e\u0010iH3DH3D\u001dl!`\u000b\u0006[\u0019\u0012qH-D\u001a!,Dz!`\u000b\u0006[4B-ΐ-D\u001al!\fQ'e!\fQ\u0007[4B\u0016mqD\u001cl!`\u000b\u0006g:)\u000b\u001eg:B\u0016\"\r\u0010o3$`\u000b\u0006[48CIY8C\u0016\"\r\u0010ix[!\u0011\u0007[4B\u0019NB\u0019\u000e\u0010iH-\f8B\u0016\"\r\u0010uR\u0016\"=\u0010uH-D\u001al!\u0016gH\u0016\"\r\u0010ip\u0010q-D\u001al!`\u000b8C\"\u000e\u0010iH3DH3D\u001dl!`\u000b\u0006[\u0019\u0012qH-D\u001a!,Dz!`\u000b\u0006[4B-ΐ-D\u001al!\fQ'e!\fQ\u0007[4B\u0016mqD\u001cl!`\u000b\u0006g:)\u000b\u001eg:B\u0016\"\r\u0010o3$`\u000b\u0006[48CIY8C\u0016\"\r\u0010ix[!\u0011\u0007[4B\u0019NB\u0019\u000e\u0010iH-\f8B\u0016\"\r\u0010uR\u0016\"=\u0010uH-D\u001al!\u0016gH\u0016\"\r\u0010ip\u0010q-D\u001al!`\u000b8C\"\u000e\u0010iH3DH3D\u001dl!`\u000b\u0006[\u0019\u0012qH-D\u001a!,Dz!`\u000b\u0006[4B-ΐ-D\u001al!\fQ'e!\fQ\u0007[4B\u0016mqD\u001cl!`\u000b\u0006g:)\u000b\u001eg:B\u0016\"\r\u0010o3$`\u000b\u0006[48CIY8C\u0016\"\r\u0010ix[!\u0011\u0007[4B\u0019NB\u0019\u000e\u0010iH-\f8B\u0016\"\r\u0010uR\u0016\"=\u0010uH-D\u001al!\u0016gH\u0016\"\r\u0010ip\u0010q-D\u001al!`\u000b8C\"\u000e\u0010iH3DH3D\u001dl!`\u000b\u0006[\u0019\u0012qH-D\u001a!,Dz!`\u000b\u0006[4B-ΐ-D\u001al!\fQ'e!\fQ\u0007[4B\u0016mqD\u001cl!`\u000b\u0006g:)\u000b\u001eg:B\u0016\"\r\u0010o3$`\u000b\u0006[48CIY8C\u0016\"\r\u0010ix[!\u0011\u0007[4B\u0019NB\u0019\u000e\u0010iH-\f8B\u0016\"\r\u0010uR\u0016\"=\u0010uH-D\u001al!\u0016gH\u0016\"\r\u0010ip\u0010q-D\u001al!`\u000b8C\"\u000e\u0010iH3DH3D\u001dl!`\u000b\u0006[\u0019\u0012qH-D\u001a!,Dz!`\u000b\u0006[4B-ΐ-D\u001al!\fQ'e!\fQ\u0007[4B\u0016mqD\u001cl!`\u000b\u0006g:)\u000b\u001eg:B\u0016\"\r\u0010o3$`\u000b\u0006[48CIY8C\u0016\"\r\u0010ix[!\u0011\u0007[4B\u0019NB\u0019\u000e\u0010iH-\f8B\u0016\"\r\u0010uR\u0016\"=\u0010uH-D\u001al!\u0016gH\u0016\"\r\u0010ip\u0010q-D\u001al!`\u000b8C\"\u000e\u0010iH3DH3D\u001dl!`\u000b\u0006[\u0019\u0012qH-D\u001a!,Dz!`\u000b\u0006[4B-ΐ-D\u001al!\fQ'e!\fQ\u0007[4B\u0016mqD\u001cl!`\u000b\u0006g:)\u000b\u001eg:B\u0016\"\r\u0010o3$`\u000b\u0006[48CIY8C\u0016\"\r\u0010ix[!\u0011\u0007[4B\u0019NB\u0019\u000e\u0010iH-\f8B\u0016\"\r\u0010uR\u0016\"=\u0010uH-D\u001al!\u0016gH\u0016\"\r\u0010ip\u0010q-D\u001al!`\u000b8C\"\u000e\u0010iH3DH3D\u001dl!`\u000b\u0006[\u0019\u0012qH-D\u001a!,Dz!`\u000b\u0006[4B-ΐ-D\u001al!\fQ'e!\fQ\u0007[4B\u0016mqD\u001cl!`\u000b\u0006g:)\u000b\u001eg:B\u0016\"\r\u0010o3$`\u000b\u0006[48CIY8C\u0016\"\r\u0010ix[!\u0011\u0007[4B\u0019NB\u0019\u000e\u0010iH-\f8B\u0016\"\r\u0010uR\u0016\"=\u0010uH-D\u001al!\u0016gH\u0016\"\r\u0010ip\u0010q-D\u001al!`\u000b8C\"\u000e\u0010iH3\u000e@ \u0010\b\u0004W\u0006xۯ\u001a\b\u0004\u0002@k| w\u0003g:B\u0016\"\rr[!\u0011\u0007[4B\u0019NB\u0019\u000e\u0010iH-\f8B\u0016\"\r\u0010uR\u0016\"=\u0010uH-D\u001al!\u0016gH\u0016\"\r\u0010ip\u0010q-D\u001aPgks249\u00194@ʀy:#M&3\f\u0005\u0016F-ƬtUt*'\u0003V\u0014B:ltvraN:G/g\u001b\rN˘\u001b(r>ZXD+~b[ơ\\Tw64O՛<\u001e\u0016vO_ç{?vݜ~O\u0000/`\u001b\u000ea0}LODS\u0005&l!s||r~~4bRb^jr\n\u001b!x>!Ч\\t!f\u00143].b\u0015\u0017[^,1(,Zn}FJ;qlWޫ}Xm\u001aG@\u001a'@k\t\\\u001d/]N\u0012?Bc_}%FÞ*l~῀\u000e΢ut\u0015v&麵<\tu&YG\f\u000e/\u00001?#>/yѿ\u0015&f\u000b\u001dK[*\rOj\u001dFjćUv$W߫_U\u0005ʭ\"o[߄SfVns\u001dw;;\u001d{\\ʣ~ŐJOj?u\u0001|\\cxw+oWo(Vjy|RZ\\`R@_R\u0004@\u0013\u0011L:\u00196\u0002'Ɲ~6YVݫ\u0000<Mn.FfSޥYT\u0005\u001c5\u000e*))IjUܒԒ?b\u001f6?a\u001b2\r2y&E?K\u0007gX6 \u001b\u000fr\u0017\u0001tn?-_@őR\u001e(6Ⱥ\fN\u00030H\u000b0oI$_{O\u0011Hv-D\u001a!,Dz!`\u000b\u0006+Y\u001aY\u00194pʌ4Uf?7&J4LgupM95쩪ij\f\u0004\\dV:%?+&(*G\fuV])I\u0005[V\u0017\u0010n1׈\u0003\u0018\u0001&(V\rQ'6no\"Cl\u000b\u0006xƧ\u0007\u001b4\u001c\f\u001a\bƣ\u0011DtZ`ND{\u001b3_,\\\u0002Z8!/nD{xu,L'\u0005t\u0014L\u0017\u000b\u0002&\u000bV\tFR˫e]a{wMz[\u0007QZǵ5;ݫ\n.Io\t[U'x[Uu\tk~\u0001@4E&0>\u0017)H;\nk\u0010u\u0014=׹[?_\u0000k\u0010\u00022g;h\u0017>O\u0000c̍/\b\u0013g`~R\u0007\u00170\t\u001d\u001fT%cەȍ+z۷mqW\u001b2KਟpU.w:vzTz0=v|Re\u001ay[8{\u0015w,o-\f^hZem\u000bQ@\rS\u001e\u000f\u001b\u000e\u0005`ft=0hx\u0010:5\u001bۂ]Ҁ]#z[0+Z*W*\u0016\\mƖFvm#ډ>v1; \u001a[m)y\u001fB\u0006 Wk\u0014]mO iGV\u0002\u0012o\u0015A\u001bl!\fQ'e!\fQ\u0007[4XF6^ۂi\u0005\u000fk\u0000Ѩ9\u001e~jE\u000bs*\u0013M3d\u00193\r@V[.-Ie\u0015JY<67sRnf@^j8&B\u0019\u0006]HҕMjURKfi59`x\u0001S|A\"sM\t\u0003ZzK\r&i\u0000l\u0007\u0016\u001bն\u0015'-b](V0\nXʖΡQt\u0007F\u0002Y\u0010y[zr`zvvZf=^t{2j:\u0013\u0013n\u000bMℽ}E_[\u0010yN]m\u0019\u0004o[>Pֺ>s\r\u0005\u001dk'BN\u0017gzΫSRj~30F\"\u001bw@,v;\n#&.$cO&?,~Pj\u0006?#l\u0017>/\u0010\u0000 K;'9\u0006mCEGk]؊\u00159\u0004A\r\nQ\"c\u000b.>^\\[0o%e\tfs3*<s]mŎ5)!o2\u0006gKu!d~*GUW>@GS\u0001GQfy\u0015\u0019[xJt)j(\u0017#y0\u0011L\u0004\u0004#A\u0016Y0>Vfj7\u001d-]#\u0004vS\n\\-x[xl\u0015V2dl#]\"\u001a\u0001߄,\u0002\n\\BvN6]Ӧ#c;\u00107&Tb\u001b7\u0012۞ۍm\u0016\u0019[ɼKm*Hv-D\u001a!,Dz!`\u000b\u0006+jբ\u0015kf萁Mw:TJ6hEcKd\u0018\u0012&7ݞ+卆0MEͦB8ǋ\u001e5^\u001b\u0005\f=MT\u001c1\u0013]`\n(c*z,jI\u001aP#M\u0001zYz\u001c1U1Yޣ$zـQ/'L%&\"l^گ.2H\u0007))\u00170\u0003\u000baZ(\u001bzɰQҢR\u000b\u0018ញPE\u000bŖk%\u0017K`oXo^.Q:_\u001cGS\u0005\u0018\rb!sȌmETh\t\u000bmr\u0004*L޾\u000bu\u001duOkB{}I`!kqO\u0007;\u001dS!ەt\u0014 \u0007:\u000f\u0015~6_\f\n\u0015qqvve\u0012GNp+ڹ\t\u001ejE\u0016hi\u0015U\u001f6x>\u001b[5g\u0007b@[V$j)\"l`l(n/hh\b\r6lwo^s$\u0005ʥ\u0015\u0003^#T\\k~\u00052ؾVbyrR\u0011bjT`B%\u0011\\\u0004-u:l<\u00152\f\u0019OGCM\u001e3~6f\u0017\u0019ۧ\u00017b\u0013z\u0003\u0001v5\u0018[\u00072C(gR;uQ:t\\t&g\u0016d:g*AYϯ3Z\u0018 H\u0017&mhl%]zdlG+!!W\u000b̍\u001b[d\u000e) \r\u0010ip\u0010q-D\u001aOO3dj\u0012aAn\u0014-1^\u0018\u0015Ѧh٘\t\u00160eee\u0019eʴReZ\nQJ\u0010\u0017\"F\u000f˓9Pp*59,\u001auTcv3BL702K;\\]n\u0005ȝgdv\fo[e3M\u0019T4\nJe1yfI&{ĬXPwf-f}tJ٫\rr\u0016int*\u000f\u0004b\fr\u0005p-\u0017\u000b-Vgb̍2`j=11t>\u00173/4]*4_.6_)N\u0017K,7QѭU۾Qa\u0003o6\u0002}n=b'xۏD>u\u000e\u0005+\u000bc>yK?\u0017vXba\nqɂ{gλs\u001es\"^Zض~j)\u0010\\|[Ŧ\u001f׺#Qb`omC/\"!ǍDo\u0006G5Nя0ni\u0016\u001e(tu߮U.Α\u0011zfyjśڊV7\u000bKU9Ζ\u0011_\u001ao4ox\f\\Ml{:\u0002ހ[\\+4]+b.GM\u0017\u0014pN@ŵmlCA㱐q/li7{Qi>ɣRop:T\u0003\u0019ڧ\u001cv咪'î'ÞUõ\u0003%\u001e:Nˢ2`o[ٓd\u0019\u0006U-7\u001b\u001a\u0016-\u0018[\u0000\u0019[\u001a\u0019\u0005g\u0014IZhishmp@\r:&Vu\u001eS\u0004`\u000b\u0006g:)\u000b\u001eg:B\nUFz^`iuYlTb\u0015;DҚs2L\f9&L29NYMUQNRh2j\u0019u:$]F#y\n-Rf)ZK&\u0014`g\n\u001auF6\u0013Zd$3͒fc\fF\u0003N\u001cI 9ƬFm&[`6#ct8s-\"T.Fm\u00056T^Ygt0J\u0012|Eq d<Y`:SE\u000e\u0017^+X8UXfQx}0h<\u001aG3\u0005bBb\u0011s\\\\\u0007Uj~zr2k7*moTa&*{\t{|AZ\u001a\u0013c}YeVp\u000e0Yeyߒ\u001dU'=OE>:\u0017Ì[֚o7nJ_KYN\u001f귽y-\u001c*\u0013ldfE '\u001b\u001f[CV?\u0016-ɲZ\u0004*ǻU\u000eT 3\u000b}<jEsj{J:e+\u0019tb[[Ɋfaq\u001d^6SW~ثy.*Y1ŨL\u001c>p-\\BDm\u001a\u0004\f\u0003nԱXպQX\u000f\u0019\u000eT\u000fySzr(r(Uܟ)UYG%}EcMu\u001a\u0016ź\u0005miwXtVM\r\nendstream\rendobj\r24 0 obj\r<</Length 65536>>stream\r\nUL)6Z\fM6j\u0018ocH?*6^\u0015\u0019mբ\"6\rY2\u001a\u0014\u0019II=\b$\u0016\"\r\u0010uR\u0016\"=\u0010uH\u00154e㪌\u001aP-8\\KN\u0006ad0ifI\u0006XZ\u001cB2*0Y6Yv:BJ#\"jNa-P=\u0015\b-<7Y\rf:gI\u0002m\"sm6t/?Ǖ\u001b͜aBU:Ր51N\u001cV0+Jt2P`[\\\u001e\fgorT<Lq̍vt\u0011.BY0.0-01\u0017Pɗ\u000eNFc\u0011j?oj(v=a'sZbET\u0019\u001creWmW\"ިUzN\u0017&B\u000er%c}\t7\u0012ry5<ݖ\u000f~-\u001fg&u׹\u0013\u001f\u0003xVG\u0003R'S17m/7]saOX6^D\u001b\u000b?\"P\u000233\u0019Aȿif?\u0010\u00069ZP\u0001Y߃Pċk}\u000bfx\u001dl95\b{i\u001c֗?}Zi+_3Xdմ\u000bv+_5=:TͫvMks?uRȼ4WZ(f\u00171Wb\fjf[@_\u0014s=\u0013\u001c4\u001c\rGxa[\u001dW\t,-Nt\u001bީYԬAŵJ\u0000\u0019[jQȈerآ|\u000e2EbI\u0006+ִԯT/\u0016l;Zt=oRNfϾ]@\u0016O,Emlł9ZT&۔Y'O/gF\u0015Bnv4\u0017Drk)\u0002nH3DH3D\u001dl!``6qz\u001dO\u0019i\u0004-z?Q\u0007\u0019`om\f,I7ޖLHQ1Uedz9\u0016IV6\u001dEŵ\u0006CV!k!k!ɜ5&cN>cXPHg\u0002f,tU:WdC>*[*>ϭ\u0000K;\"q+T4c|-s\u0016T%\u0006u\u0000J=\u00114\u0011tݚL:{&\u00199n_\u0002kcTenZg\u000f\u0004\rB!`:\u00104\r\u0018v\u001d^fj%-oՍOQ\"ԉ\u0002L9\u001d5](D\u000eRJjZҤ-\u0001U^L:J`\u0006a^a\u000ezB>\u00131n\u000fFH5g\u001dyϻT\u000e,\"\u0000xR\u0005`6zP]\u001fZ-]}~dU\u0007?bN\u001c7|޼>JZ'*m\b\u0003\u0019\u0002~\u001a\f\u0003k\rnF\u0000\u0016\"?i\u001f6^U܉\u0015uGyX\t$m_\u0013+\u001fպ?uqk^ƣ;?xpGņ\u0000FϴiK\u00118܏\u0012%\u0012\u0013\u0018\u0017L\nMQmWd4ω r`\u0006\rG@~=S٧>тѬwkP=dz\u0013ʁC^\u0001֎Z\u001eG4#آ^]\"\u000f\u0014m#$zr{ʢؼa\u0014\u0004\u0017\u000e#NSt3Tٓ2\nYq\u000fl<;$\u0001\u0019#\u0007r\"\u0006[48CIY8C\u0016\"\rVhM\u0010C4ը\u0019I\u0006h\f4\"ɰJN\u000bl&'Ùj#$6yN@\t\u001au\u0005fFQˌ;\\T-\u0019܌\u0006ꂥmek[\u001906dUn/v\u001e{楗Yu}׺\u000b[W0wጥ^&Dn\u0005o;^[S-6l.6\u0018.6n,2l(2trؕO;gtY=PAݶن'(R(\u001bK%\u0006b֤4M\u001aa9\u00186\u001e/ފ]K.K`oZ\u0017Y_,*`oEoj8Rnz|>j:\u00162g|}~F[<~yĹ]\u001av.V6F\u0011ɾL\u000fwkq7\u0016cɅ\u001ffʿ{q!꥗L?\u0011si\u001ez\u0016z\u0013\u000b<?i\u001e,\f\"?wo[\u0003\u001eo[rGV;AavE\u0002V\u0004Z\u001b93}\n\u0000\u0016Uj\u0011IeTa'\u0007&]>P9k\u000bՆcj\u0001uZZԞ\u0018N\f\u00079\u0001VGӭRmw(9:7י֘\u0015\u0019\n:K+I\u0016%\u000b\fW/\u0001^tQ\u0006\fPCbج\u0018/\u000f\u0011l<l\\I\u0001v\tƍ-F[\u0006c_w\u00193\u001e[6m.WENt,Kjs)\u0013f6gNee>YG\u0002YnY\u000b+d7B\u0019NB\u0019\u000e\u0010iBlfn0d\u001bPq-XZ:;*ɰK3mRV)*unʣ8dVIYeUi+0m,0`\u001e1Y4B[cTC9Z\u000bk~uKkI{bd4\u000f\u0007;*\u001dUm\njk9\f|O=d惽\u0002\u001a~ZAk*\u0005+i\u001d¤1\u001b\u000b:+U\u0018\rRԠmL}o9{DFM'4\u001a*7\u001a/4_(4_\u0014\u0012\\lZb^b}\u0011lQj\u0003{vz9\u0016s6Zr7[\u0014{\\CnZK\fլv+\"Ek\u00005/G\u000fk?kf\u001a8\\ͺB\t\u00043yZ#ԋ/?%e\u001b_7s\u00117#\u0019M\u000bW\u000bM3_5O\f8ީy+ɛ\u0015bsDc\t' g_\u0016K\u0017oT8>v\u0001\u001f \u001fT9ޯtWXWLw֢ezsIB)lVl)`EXmSpj]%v͠MЦ鶨;,9fM\u001bI+[itZB+ѪfZ\r\u000bSrQ$\u0002\u000b-\"Ӎ.S^AѢ.n(_\u0000Pgšls\u0017he[\u001c\b\"p3ۺ\u001d+2\u0012[K<\u000fu\u0012\u0013g\u0003gzE3\u000b6)rHl$\u000b!ͶJmRm\"Hv-D\u001a!,Dz!`\u000b\u0006+\u001e2n\u0016*H2֒gu2\u001d\f,.4NӨ]\u0015F#{\u001fÂQ\u00123\n(C\u0017Z?:\u000e3+_[Bg}z,;٘\\88-k\tyμּY<[m^a^No-\u0016d=%IKZrKͫyծ Zk64;\\\"NfS'H5,5fC9+3j`m_V_bRْ\"HF\ru\u000bS1n|\u00168\u0005dr-WJQ]KE\u0013\u0011Y\u0019\u0004k<\u0007\u0013>qaUjβ8{}u?Y̶T@aS_5s`c\b5s\u0006\u000f\u001a|grk6_\u0007o>L\u0012i\u0001'/?zfz\u0002\nr1e4\u001duUa]r\u0000D\u0016Ҏ\u001bJ6p\f\\+6/0}X~\n)Vþ\u0016c·SA\u0011V׫T͠I\u001b\ru.ۮ[V\\nU\u0006s0fg6#l\u0013m3|U?Ӣ\u0017\u0019\u0016tŤiMjQho7\u0018JXϟϟnkQy9:+8:\u001d\r#2v\u0019say\u0001-_lʝ鵣f>\u0017!v\u001ez\u0017\u0017ъ6)rH6*ɲJ-,4;\u001eS\u0004`\u000b\u0006g:)\u000b\u001eg:B\nTnnL3PZԴ6ݜf`l-ݓe\u0001.9-捺\n\u0019taBΊd$9\u0019̩Q\u0007z}Y.Φ$[bgK{L\u0007kCCuq\u0018@i_R\n\u0015]\u000ep@}e$zz˞Ik\u0018`G9\u0017\u0016\u0017\u0017\u0017\u0004bαQmqwr\u0017x^ް?d<\b\u0004Q:\u001a\u000eSPoE独WJlW\u0007\b1ө\u0002\u0014l>]h>[d9\u0007\u000er\n\\.YNIpġ;h\u001e12\u0018\u00056IͱQ`^p,\u000f9>]ײ<`yV\n\u0019T~PY\u0013xC1=i_l\u000ez\u001eE\u00173{v6GtMϚ؟O~ٌ\u0016<2}|ȹcR'\u001fn=7Ă9;jT;i_\u0011+\"/ː.\u0016R_+^)6_.2_*4_1g\bӭ\u0006\u001b{2`8jyԻ]g\u001d\r>\nqǸe\\4vhlAE~b1ڇxs1g\u001b\u0000|\u0001ּЇ\u0017}^MwNj\u0003W<\u0007y[\u00046nEjʹfYusy\u000ezM\u000f̶\u001afY\ff\fF;ͤ\u0005[=RM1\u001a\rz\u0012\u0019^]^.IϝϝPLW4guh%(\u0000-\u000e\u0016yE%j8Br^Z@)vH,jE';JY\u001eS\u0004`\u000b\u0006g:)\u000b\u001eg:B\n7\u0001ނMg`.ɈWB6Kf'7\u000b\u0016B\u0015};7{1ҁ-J*2F3͔\rs{)\u000e\\\u0006zđ:\u000bX=s%1\u0001LfCH>^\u0017T|8\u0010R?\u001dl\u0016czr\n\u000e\u0002ww\u0019\u0005&w\u0003^Zق\nϯ;89qjT&\r\u0003{Q\f\u001aeO\u0015\u001cOT=㫖dus\u0001~OP?h8\u00146\u001ePhX[d8m9tQah])~X\u000fC\u0002\u0004Ӊ\u0002Ip\"g\n\u0001hrg\u000b-\u0005\u0019OoT\u001f7jϙ̆kfuxѤ۬J<_t\\+wl,o)\u000b!ֲc6,'x9zvzߏ?o~\u0001a\u001aמ􍗘3;kL\u001f?xޟɝ|*ɾlFw\u0015j93yqꊁ7,{}˪7Y/m\\vi]mS֕\u0006\u000e\u0006W7Jm/X^-2_.d.\"\u000fk:\u001dO\n\u0019\u000f=n_íT2w8װ\u0015>jm\\28ҽ\u001ek\u001edmO\u0004\u001c+\"U\u0002wi=;\u0006E3o9\u0010N\f'c!Ѡ0p ?^nK٫]F\u001dFXuڜNARE~,7,_Z')r\u0006yOXPoQyϘ;V\u0005;\u000bLE?ìh\u001a)$C~6ZRV\rZ\f5?Mө]@!?ۃ\\\u0014@u.i<\nV̕\"~ܫ=\b$\u0016\"\r\u0010uR\u0016\"=\u0010uH\u0015L̖tUVi&j#[EW\u000b\u000blr\u0005W\u0016x\u0007`oK\u0015\\yu~;\u0017l)\u001d3\u001fo\u001eo@\u001cdy\u0002\nuM\u00006Zϫ7\u0004\u001bC\tـL\u001av[)ǠZ˫6\u000b\u001a8*\u0013b\u0019\u0016\u0016i--`r\u001d'؏4\u000e6X_5bvTR}m\u001e\u0006j]sݳ~\u001d[J\u0006\f{E\u0003AHfmχ\u0013\u0005ԩ\u0018\u001a\twwerj`Դ/Dpv\u0002s\u0000q2ƜY,}qSuЬ9hP-W\u001bvm\u0007yfn\u0017/y,TfQ\u000eد;\u0005W\u0004\u0017\u0005C>\u0013>fM\f.\u0018o8\u001dĘ\u001fֺ\u001dX\u000e5^`:~\u0016z\fJ8Ү*\u0007uOr}P:W1dO[#ӏ\u001ewe/}}So^\t&ŧt\u001d雽c2~\u0006z8H!\u000fg;nV0NF{:r[^楗nEE~P1\u0012t>\u0019V\u0017<ge\u0018}48[\\199\u001d6N\u0013axx4dD!\u0003pހn\u0019\u0005}|\u001d\u0018'mʕ\u000e\u0002C3_+]8LvMa[|gi$*Yb\u0003ĞQg@?\u000bME`rŦ=\u00140ݘ;ͤnQ5Fu^YSTirKrlF>MݪjSKuұƶ\u0013-2RԜ\u0016\u0019[&\u0012V\u0018T\u0001M\u001eRx<[!\u0005\\\nX\u00105yү=\b$\u0016\"\r\u0010uR\u0016\"=\u0010uH\u0015?\u0019~֖ked&tPWQ\u001cT\u000fYfd<I*\u000bCc43+zE\u0006En\u000bu9\u0001\ng`c\u000e#ǺS=\u001be7\u0011\u0012sc\u0015\u000ba!ޥ~\n5*V\u0019/\u0014Apʵ;>Tk\u0014ա>.=h=<LTFہ\u0006˾Z\u000b5vWJ\u0000ܦ^m_\u001emhiw5ω'/\u0004{\t{{@|$b<\u001a1\u001e\"N\u00175]..\u001c2{0r\u0007\"k:\"0ǣx\t\u0018wjP&\u001dxX0w?ɹ\u001di1KWJ\u0013\\-_/XfY\u0004B9_\u0017cW\tc\tk]3/3OqAΰ\u0010o<\u0011\u001fG9\fJ姞h42%T\u001bN\u0004Bt\u0004O\u0015OWFFŶ\u0015h(ToVÑO;޴)\u0015[VFWWD*\f\u0006\u001d\u001bg=.\u001eZq\u0015KSKz\u000175\u0017yM\u0003>f\u0019\nG\"U\u00051v]!\u0007f\u0016LZZj!s|1\\(@|t.j:#N\t\u0002}\u001cZ8`?\u0017owx{8zrG>h]_\u0012\\]\u001aZV\u0018Xdv3jiTUA*6]]\b\u000bibm!\u000e\u0005*ƶG0]/kJZ9ȍFU#7*+52T%kPK[ZYӔYXtk%qo˪r\u00065J=I3;\u001eco\"\u0006[48CIY8C\u0016\"\rV\u0019tVA#f٥ۺuGIb\u0001.'YDez?\u0006\u001a-\"M\u0017'&[\u0011}غ\u0011]/t?vO?\u0005~\u0003Dc oOds~.G\u0006#\u0003WYז{T\"g-Hehow\u001b\u000e֙/Lw]lumq\u001cm\u001ed\u0003ƶSk\u0006X^^Utl\u0001ڝ~sVտ\u0019y>\u001e\u001ca\u001fܐ`p8d8\"\u0018\tƓ\u0011ɨrm7O\n\u001a_\b\u0019}\u0011z\u0018\t8\u00181\u001d\u0016CQ\u0006 uѝ7\u0007\u000eno8\u001fB\"\u001fBd?P\"b\u0012\u0012\u001bp\u0014q\u000e+?$s-ܦBv}ouԳ2h_\u0016/#e)Z.c\u0016\r*00\u001dVB~\u000b<?<yjMJaKMtk*:Mkzҭ+c\u0018:zݦN8\u0007=\u0001\u000f\f\u00010o_\u0011vzļ\nkbUQc`C]F\u0017Y\u0015Z\u0017^)dPef\"\n\t8\u0013\u0005K8\u0016\u0000\u0000n/{ӭ+7U;\u000bm][\u0011\u001d\u0016|\u000b|.mlM|]Maarj\u001a\r5-y\u0016TV\u000b,d\u0014\u000bؚ\u0014=j֘\u000b~EݢnϞp(;r9sۜ3\u001a]^!QYUUJYJҔ95/U\rvCl)p*?_\u000e;̎ub\u00018#d7B\u0019NB\u0019\u000e\u0010i\u0002-O\u00194d\u0005֛\u0003\u000b^&'ȳPM\trص\u0006}F#\\}F!\u0013Tcɶ'E{>y+c߯2K}78_j;~\u0005]ͼD|fP\n|;99\u0016խᔇqo{5\u0000g4}q|ppkM*\u0011kl\rNfjGݫUi\u0005`r;9.\u0017\u0002\u0011\u0001{0h8\u0014\u0004k<\u0012E\u0000RްiW;H\u0001χ\u0017B4\\\u0000JrM{UxB}0eg\u0011?߲߱S\u001333Es\"\u0013\\(^-?vZ;@\u000boV:O\u0017O[J%\u001c,oż\u0005OezH:ٗ\u0006#@Y\u0010g\u001e\u0017{͋Yb\u0016\u0001ֺo\u0011{jb\u0005\u001eSǴ2*\u0016{Aֲ=F\u0002v0\u0004\u0002B:\u0004r+\"A֐ht D(]\u00053\u001bc.\u000b1Ӆ|\u0001*=+0bC]t:\u0002Ч\"\b}\\H>\u001c\u000e\u0005)jy3A.\u0006GưkIڧ6eCU\tMEڴe\u001dI\u000bSPsV0+\u001d˙\u0019TBSn?\u0002Y}zDd\u001atUN+#Uw+:]\u000eݭΝA6e\u0011yvA9I_QԪM\u0006EFc^Lò?O\u001ewޤ$,\"Q\u000f%+d7\u0000\u0016As:sNܭ,$#H\u0002\tId\t%\u0004B\u0012HHB\b\u00003\u000e\u0018\u000f\u000e`==\u0018\u0013\f8'x<`{k\u0016s^uWU_ZgV\u0017]_}\t[\"\tg\"ՙDJ\u001fD\u0013DJ\u0013V\u000bI\u001d--#[\u001cu*v\u0011mfzL#\u0013RV+\u0017F\u0015F\u0017\bc\nѹlZ\u0004K\u0006JlAoS\u0019R]Yr%d\u0003p\tŅW`Xx\t_t\u0011\u0007]x\u0011H,|\"~W}[yS\"H.ۢ\u0015\u0000E\u0017\u000b5p{ZcboI$dJ\u000f\u0005@o$[\u0002ĽESړTs{p2%[2:%O\u0007p6jyZ\u0010å(#\u001d1p;Mm5SMqV\u0019mLLɣ\u001e\u0016p4\u0018Ǒ䚈q31n!Z\t~\r\u00019B|Ѩya(+-x\u001bFqt/Z,sJ\u000e\u0007\\.!P\u001b\u001ep9:\u0004Φ$CTB|4Eh|,A֥_1n\u0012-#IDD˦\u0005PR~o|6y\f\u0003~#\u001cn\u0001\u001b\u000f\u000fs<nz\u0011~/\u00031`\u001a\nX\u0007|fv(\u001cp7(M:f#>a\"'-63Wz\u0005g#L6>\u001b?t/m\bpMǆveE]ڝ]mGwb\u0013ظQQ1;ev\tc!\u001eH\u001a\tb̦[\"\u0016\t\u001dUxR]4tQ_'oֶ*ʸQerAL\u0000$[#\u0003\u00058\rb \u001fSid\u001b&zccqX+6=!.\u001dj\u00061Vcb.]λ\u0007(c`[uU\u001ag\u0010\"%Rp&R\u0019KL:aK4aCwHqly\\<n\u001eq2鳲 \tclB'\u0013ͽm1\"qt(:\u001b)'\u0007'\u0017D&$\u0006@2 n*i\"nzM隸銸\bh\"j,l,Zt\t\u0007.bQ?WPsWy]>򟏛\\̼Wӧ9`xw%O$\u0012\u0013ID2PTR݉Ba|/vlgUX&J2*z5O\u001dr7x!ݤ+\u001aP\u000e;\r\u001bx\u0005\nf.p̌o2bw\u00181b&\u001c!(k})dXk*9\u001eﰓ;M(\u0010OQ˘=v^x\u001fu^{he\t\u0001适Q\"GViPNx\u0004$?W\u001c\u0012N:7Aލ\u0018\u0007|HZA]!\u0018\u0010\u0001hnDadip&\tw{Eʹ۫NTWIUrRUH\u0005\tSe_Iߔ~]&2;5RvF\u0012;MĨAZ/c\u0019\u0003\nְ3N󷛰\u001df|҄|0\u0013N5aQÿ\rx=rV&a4\u0012q\u0019\u0018+\r#\u0004\fL\u0011T阢\u001eOm \u0010wd̓etcAu҆bvT\u0011;b\u001e;j.{\\\u0016\u0005{N>\u000b0[č.p0]\f\u000f-GӲRhitDNz\\N\u0006\u0010\u0019\u0019kEh\u000eF\\1?U\u0016`Q|AT\u0015v1\u000fI.jE\u000e\u001a&g\u0010\"%Rp&R\u0019KL:aK4a]DtA,HhY@\u0006}\\Q\f\u0014sEDjm%1\u0012IL\t¨\"2j.v\"rJ7J\\,}M5k\u0015+V\u000eQ\u001c!_~]lukҖ$\b\u00118o\u0015a%rxE\u001cX>ϭxY\u0002\u0005ڼ\n\\tk\u0003~\u001b3!mgk')=G*\n#!͕w\u001b8\u000b\\jvI$^^ǋY(ncZإD*\u0011]얳ր*]2V*0(Y\u001bQ#oK`\u000bu\u0013YF\u0004:\u0000\u0017l4\b\u0000!\u0003*eI\u000fzFҼS<)-f|Ll5f\u0012E8i\u0011nVvY\u001d-i\u0016\u0001;%c\u0017=E@\u001eK\u001d\u001fORO\u0007~FW*9\u0019~\u0004K|S~\u0003~х%?tg#kWk;@j\u000f\u0015Gr}s'+Wd\u0013\u0016D)\u0015*_7Ӏ'\u0017=>T\u0015L7ղg*d\u001dR*\u0011cH\u0000Čv2[ǭ&:ȸnqz\u0005O\u001aP7كjΠ3lsGQ\u0003oDO-\bG`D\u001f\t`d@\u0006k^(d&\u0000+\u0019S1q:&Ϣ6\u0003S\u0010.q݀m}dcjbe\u0011'\u00155\u000f\u001cLv.sv\u000esN\u000eD\u0006ZK\u001cZNEDe%3rtFA6=?^\\@+)\u0014Ji%q!ˀj[\"\"z!\u001eEp\u0014v\\=\u001eU͛]ɟ]G\u0006Ǚg1i\b\u0012q1\"%Rp&R\u0019KL:aK4aETJ'6+5nV\u001an844,\\y&I\u0004.1Y()\u0012!\u0005-($ؖQ\u0015Ҹ\u0010>Bbk(^WME\u001bJo*V\\/,[v^EOk\u0014\\\\+0\\m,jLT\u001a+_kNs\u0012{;yp[ߚ>\u000554L񦴗L&\u000bw\bw\b\u000f\u001e6<R`xh\\<R֚27a,0(Z%jmb\u0017#&,n!/zʬ^$n0zB;P\u0019x\u001b,\u001b\u0013\u0016|N[x}:~DHZ&5v\u0006=ӼRia#\u000e\u0018\tލ'(H`Dn\u00015[oDlFw\nT\t3NTOWl[Pzl`>xhab(?FK\u001aC\t'\\.qtZ?\u001b#'.[[9/q(\u000fhzl\u001c-\u0013#|\u000eu\u000b=X/2~\u001fOU~S%\u00030:R\\])\tm\u0001k(M\u0018i\u0015Ʈ\u0016ǵ:$N))wK\u0019]2Z\u0005kK5Q\u001b]Ł?WnqV\u0012\u0002m\n4L!PdbtLYNx\u0007C\u0015c[]\u0013mn\u001f1\\<z\u0002@1ssr\u0018(ͤ#2\u00160+KUe̪Jj\u001azm-^_O_HQ\u0017W *v!-\u0011\u001d\u0014\u0014jSZAT%J9(.]̙U\u0005>{\u0007?iX\b\r+CD.7aK4L:3HÙHuHi\nD\u0012;+%. 9.\\j&0j\u00041W\u0014] \u0001<2[&FZjP6\u00129\u0007qۍ\tuu\u001b߫;Ԯy[\u001dm[\u000b?^~WpK_K߾;WxR\\i\u000b2s^9Opj:Nr\n\u0017>ﹸc@oZ\\om\u0011{n/KޕLL&v\ne/V2<Z\ftb͉\"y&2n1\u0011B.QV([W4feQ5bjiVf\u0018Huuʙ=*v^ݠ\u000ehy\u0003(m2\bU\u000e\u0005[]h8kԜf1kZgW\u000eUd;5\u0003:F`POE!`mFЪf|4\u001e\u001fåc\u0002\u0011teFOz2V\u000fڅ\u0005\u0007\u0001\u0007\"\u0002\u0006\u0001\u0010 \u000f: \u0012hЁ\u0006!L\u0000#\u0007l~;ۈvt'\u0019\u001b\u001c^{fomF-_]`\u000fG#)\tB\u00118I}3)qalV\u0002S~k4{̭I$*\"n\u0015\u001e*\u0012ŭ\u0012ƵR\u0011%T\\I-#cW\bV\u0010+EV1}*a$\u0014\u001cܖ`\u0001) \r'$\u001d\u00061Y\u001a&\t\b8>\u0001\u0013\nn\u0001\u0003 2\u0012x\f'$|F\u0018n@}D,Xm:tݡU\n\u0005\tы\u00161\u001a\u001bV.e.[XL[\u0014!>f~vT\u001d\u001eUIY8'\u0018Yek\u0004s\u0016\bfSaQu؜T\u000f?Y\u001cctRϷεwF(~/\f!r\t[\"\tg\"ՙDJ\u001fD\u0013DJ\u0013VĘ\u0012cf\u0005Ul$\u0014s\u0017\u001csW0@ܶH\u0012\n}r)RK\u0001Zp2ᜇJwܶ5~Smwk5޲\u001dWW~ݭ[?02us\u0015+_-\u000e?o_\u0007{hi5ZovnJNS$$ӄsVArOOj\u0016c1\u00041xRa21mܪ[mYYmV\rFN+]-\u001bR]\nVݣB\\i\u001a.\u0018Rls\u0015J*3/kRrר\u0010=jZ5o\u001d\u000bh\u00054^\rO7\u0003:\u0006=bP\u001f2\b6E\u001a\u001e后ߟ\u0011\u0018\u000bnZ=oKiYg\u0019.\u0002=\u001cXb\u00174X0_䪖8ۇ9q6Erf|3rj\u001akA\u001d\u000f\u001d:HB o\u0000uNcOC9:;zf\u0019zDǲ}5{i\t}:\n\u0010X,\u0006XAā.'إd2\"v)Z\n\u001eӄ,\b\u00101-d\"Bp9\u0001\u0003z\u001bX๩\u0018\u00138\u0017p}\u0002z(!CdAi)m!%\u0019\t\"KH2R\u0004\u0011-6+6+)vVq`N}C,ELݢ5uQ\u0017田N\u0017@lsT>}wju%Ҹ\u000e%m4vodų7s68\u0003FݡcTfu;g\u0010\"%Rp&R\u0019KL:aK4aE @/(Cم\u0004$\u0014අQ%2I\u0011K1\u0012t\u0016ϑ\u0019־m}GN|{&\u0003\u0007\r\u001f|7\u0017?>|[Uo3y/^`\u0014!*}\u0017\fn\u0005ݝ!yhTP;ܓ&\u0004mQ\u0012\u0014\u001dȖ\u001e/P=PyL\u0010Yb\u001aAĴe\u0014\u0011%~Ǌ5nkU\u001a<Vl\u001b':;\u0015.\u0005[^bQ#֪N[\u0001z`HX\u0015lST!Tn%[Y\u0018.ĵ*:\rpdky}Z^?\u001b@u\u0006Qt7&UO\u0014M5V\u000f\u0007,C\u001af\u001dwi\t2܌m7\t&\u0001`\t\b#p\u0003r\"\u001anƶB\u0010^!=ԶMZ\u0007Vۧ\u0007T(^4k|L'\u001d\u0012~d\u000fg?$|s\u0007~q={$ܖI\\\\/\u000fR\\AhX'\u0004FZᘆBH_E.FD7\bEXL*䦒TB`\u0003I8\"\u0011c'\n~$!Yo)\u0016[d\u0002F\u0002H\u0019n\u00112\u0012Č\u0004\t\rQDwtfgӬl\u0015FI;D\u0006\u00107k\u00116\u0007S-'\bi\u0018\u000eӡhzz#c@_!i\u0011G7scyF\u0002\u000ec\u0016\u0012s\u001a9%ѣ6ވ7l\rxCVryş!D.7aK4L:3HÙHuHi\n˜BX\u0011\u0000u\u0010\u0018$Qw勢$1Ҙ\u0012iL4/\u0013{l\u0005ܖۂؖ\t~֋7o\u001ax\u001fu\u0007\u001f;Fo8FnAKִ&y\u0015R\nвN$ Tdog&V\r\n}Aޠx_P/(\u0013\u0014J#R\n^L)/\u0017]\u0013q\u000bIB/\u0016қf\u0011>\u0012\f˨\u001bKR+URV*c\u0001^\u0015.%kգB,1V\u0004WL\u0019UZ5=\u001aP*\u000e%\u0002̷\u000bWɁ8E\u0003BMġsGrGMq`L\u001f3\n\fz>\u0000\t\u0002P\t\u0006>^E{4ݎ<`3w\u0013ھ\tm܄\u0000^olA|(cO@@'\u000fB!gwk9;2k䶠g0}`78\f+\u0013%R\u0012Vk]JaJԣ\u0016S䀚\u001c\u0012BHb1\u0002\u0000m\u001b\u0014qm\u0014LrR 8IӆJ\u0000[ON\tXTߖI\u001dr[\u0001['p\tQ\u0003I]894m,\u001466ψ\nZѻU\u0002 \u0013ggb\u0011\u001bg5dfMx\\\u0011+GKk\u0016E5\u0010kqbz\u001d\u0005$E\u001a!\u0016f7\u000b\u0004[ZZ)\u0018r/\f!r\t[\"\tg\"ՙDJ\u001fD\u0013DJ\u0013V\u0016_X(\u0002Jls~aEm)\u0005b˥qR#\u0015J2Qt0\fmTu(W~r\u0004>mC\tc7\u0012?\u0001\u0013\u0016힇._.ӄ7\u0010xZP2zm:f\u001346K:B˒\u0006}Atāt~\ftSibA\\ T\u0010WM0jE:1kHZ(a5H\u0001b)k]c\u0003u\u000ec֖\u0017\\\u0002U<`JCFj\u0004ZjS'\u0002\u0010n=Fw5\u0006ǀ\u0005:#kDo<g\"כ>\u0013\u0017O\u0002\u0003D?xb#`<9D1\u0018O\fLa\"\u0007Mİ\u0019E\u0019ōfbdƁA3>D1HфĄ\u000fxl#\rT\u001c\rĀ\u0011\"\u0003\u0006\u0017\u0001k:=^걵:l\u0016ѫiAoW[hӆXXHR\bWK6).#:d\u0017 #*_-\\$\r*bDG.Q\u0012\"AP\u000b\ny\"^\n\u0005M)\u0014Iwh2ۏ}T$泼|[\u0000\t|τH-\u0013)@득|Ӕ\u0003Bzp٨`&\u001cܡxR\u0015sDA+m\t\u001eN`OЫF7K\u0016˘RF^&bsy|Fl\u0001#\u0013\u0000GM\u0016V<HH&\\?C\\nHiHuf,҇3-҄\u0015ٿF:.p[\u0007a\u0007EܕGƕ*\u00142D$r[$\u0005!=Dk\rm7=77Gt/-G\u000f?0{\u0003vַ̹韈3s\u0017\u0018{G}6D\u0012\tnOr;؛F\u001e\u0000\u0010\u001e̐R+ٟ)\u0007!*\u0005qU8Vh\u001bAfef\u0019E^\u0002(\u0000\u000ehlӴejX75o\u0004\u0016M\u0007u\u000e=֡C2\t\u001ak\u001e#\u0016A\u0003u5z#\u0007\u000ek\u0004i\u0005EqDl0\u001bA\u0004X\u0010~\u001c#\u0016ᨙ\u001c\u0018,l\u0015NccVrM\bYE-0\u0018#1p\u0002$\u0019Bd\u0019M\u001e!F\u00003bB\u0014\u000f\u0017˛x\u0010\u0002\u00182\u0012\u001b@ȯ\u0007!\u00180\u0010}\u0010Yt2uU[oZ5\u0016MǼ<ٝ[)\u0016\ny\"@&I0]\n\u0014Z\u0019%#:0S\u0005E\f M$H%y`Hoi?1$\u001d[䶷#\u0000z\u0015=TKUc\u001e,JrR\u000ej)\u001bۦ\u0013uDr*e\u00186\u0016;k\u0014\u0011r\bV#1g4f>n01:qRb\tG+dĖ1b+Y\u0005lZ\u001dh0\u001b9\u0006\u000ec1cmqG!+k >\u0010\u0018qDCD.7aK4L:3HÙHuHi\n뜻ls~aC.!_SԘ\u0010\u0019uc]☲\u0002JJr)\u0005-\u0017FUoqdg'\u0004>Miϒ}OWn\u001f؇޳\u000fl\u001bȺ#s\u0007杊mܙ}z\\xIPs]uQy\u0001;؃nI$mw&bT\"'؛J\u000b\u0012D@`\u0010\u0005Bf\u0003T[zԼ\u0015\u001a^Z\u00004'$&l\u0002ma\u001dz6]z\u001c|H5\u0010!\u001b\u001aP+G\b\u0007I$`\u0016o06ZD,b`\u0018J\u0010#\u0014M&\u001em-6ɸ].j\u0017%[)& :\u0013\u000ei(nsJ'\tdS\u001a|!\u0011;:܆\u0012m=؄[l\"\n1\u0005J#SP\t:Qh&\u001a\tGah\u0018\u0004h\u0004h,O\nd'.hk-z&^9?^\u0016JuN\\Np\u0015\b\n\"Bn-új1!s\u0015d\u0004K\u0017\u000b2\u0002 B~*O#y)$/\u0014\f\u0010Djw;b\u001bz,/Pэ!uS\\O(\u0011\\<iE89t\u0007nP\nE\u000b\n$b)Ep@o\u000bu\bY\u0017}:z>Ee\u001be\\f\u001b-Ÿ\u0018w='\t~\u000f!]q\u0017g\u000f\u001f0\u0006-~\u0013g\u0010\"%Rp&R\u0019KL:aK4aEj\u0001@\"$bL*K<+j+zV\fmm+)Ez6Y|pmk\u0006\bJ\u0007?K99z\u0013>Wnko&|\u001c\u001cv#G89_킵\u001a.c\u0017yUYe/2_o\u000f8x{deSIT\u0012\u000b6\tJ\u0012{RP3\u0017\u0018\u000bHfPnQpW+\u001a*Mjv-ޡûtx\u0011Z\u00132c$ׂ\u001auD/ZZ\f2+3\u0006,~xU<hl\u0007!t\b\tl\"\u001dJmQl]6jG\u0011\u0018K7ۥc\u000e\u0016; \u001dV\u0019eHW;dwtw\u0000\t\u001d.9\u0004KA\rw\u0014.\u000et<A\u0013\u0001/vd\u0010']2x\t؁\u0012mdۨ$[\u001d\bP#\u0019w:c\u001f\u001crpx.]\u0011\b87\u001b*X`TTe:tߪ\u0014Hi\n\u0002c1J\u0001s%\u0006\u0015\u0004{%\u0012s;%\u0002P6@+͖b\u0012Ar4\u0011\u001f6(\u0001ަ\u0002\u0004/\u0019M\u0011IpCd\u001dPz\u001b\t\u0016<g֭st;\"s(ᵱ\u0001\u001d\\Z)a%r\"OA\u0001\u00127G\u001fs*\u0016.s9\u0013p7\u0011B0N\b&H\u000e!6)O\u0018c\u0012r/M3I\"ƜNΎ\u0000ٿ3&l&Tg\u0012)}8\u0013N\u0012)MXጚ堐rP\u0016!Jq9+fV9ծE\u001d[*\u0005-b$-\u0006\n\u0013y;n\u001bYR\u000e~riGv/i\u001c<O>_W0~s5\tujǖwM[\nQ`\u0005NK{<`\u001f\u0017u_ ߟFFM!Sɽ䞠pPn\u0015jA\u001bU\u0016\u0003\u0005o\u0013kH`{\ruzJc)@iI0u&Ԝ\u0007EmY\u0006pE8\u0000Vk\u0013\u000f%ad.\u001d\u001c\u000eM:nqǝ\tlS>\u0012\u0014%Pd\tHT'* Vr%r+)bʣ@Gˣ\u0002ӼT#w{S\u001e.{\u001blG+G1A-Ct\b\u0012ãtK$\u0013.\u0004X[:ᒌ$c\u000ei[Jrcekk]\u0015\u000bw.\u001d)\u000eMFJ2[q*\n-r[\u00141r\u0001s\u0015\u0014q;DU\u0004T(dY22KeHP6C\u000b(\rE!/\u0019VK\"n\u0011I\u00141\u0004սe{)Bb\u000bJ\u001br[\u0017E\tz6.\u0014v\nmõњd;\u0002ڔ,(WER<G\u000bl;#ΌYa\u0011v\t\u0005{D\u0003\"<eP\u001fUJ'EŢ9ˤ˥qK1\u0006Q\n\u0005\r?C\\nHiHuf,҇3-҄\u0015Y@B,Hk\u0015&̨\u0014i<|woFӪ\u001a9Z\u0016V\u0014U!^mw:rew6j~_k\u0003K?7嶟˯gۧ\t[?q(\u0018\u000f}\u000f=Yh%\u0002<_4|i`5sAlno~\u0002ӥվ݉d|\u000fr[b\u001ay \u001f$j\u001bERR\u0005M\u0016\u0018Ե$GgC4V\u001a>3DYF\bh!h.d\u0017\u000f;ģ\u000ef\u0014o)C2\u0002dge[]\tlG\u000e8VN<z\u0014;)9\u0005܉\u0004 nGۣ\u0003{<jG׫1)Ϗ;^>>^bO\u0007Q\u0007\b7\u0012i<0A\u001b\u00191fwQ60^8gv\u000f\u0015\u001eJc՗\u0016\u0007=-\u000b\n\nk3mi\tnAp:0j\u0004\u0015Y-k\u0010qDU\u0004ʢOvyl%fmV\u0014eHt\t\u0016\u0014cA!?\u0006d0\\\nN\"q{q\u0012\u000f-e>\\[0$\b\u000e>\u0014\u001fOFPbk/zkFwy4\u000f/؟*ܓ**b2Pg<m$W\u001f\u0014aGD1\u0011~TL\u001c\u0012Dx^.WI\u0019e\u0005rFQ\u0003\u000b$z)^\u001cg\bM\u0012)M8\u0013Ό%Rp&R%R\u001ds;f'fV+L:I/3zc\u0006\u0004Q@\"Z\u00016_\fR\u001a[)/mry9ùù\u001dic\r\u0017j|S_d=e/ןY?\u0007GuK^\\\u0016/_\u0014,8Ǯ|k͜}Yٲ՞'jmoM~er\f4\u0002\u0011$\u000f\u0003F1{,P;t\u001a=Z}fQ?BoB\u0000TB9+췐Kk\u0015\ră\u0014#h]Ҏ\u0001 N\u0004Xl\"\u0001-AjFKA`C\"Rފt\u0012\u0017̔§US\u001e\u000e)\u0002~!@@u0\u0000#~\r\u000eՇC(Q\u001d+\u000f\u0007ѡG|V^P]A/P\u0001wF<(CC)𝸇j\nMܿdΆ\u0012p۱\u001d2ztf\u0005Fr7:\u0012^!8\u000bcu\u00116\u0001]\u0016q\u001c&nYgIR\u0002g|i4^UbR\u00175\u0010\u0005zE\u001eeA\u0019&Rłd!?'z\u001bm\u0001پxooz)d\t|6պE[(;\u001d\\ǰsArQtr\u00197t+\u0002uo\u00134/6Hn\t\u0005[}17Iǟ<\u0017/ERP\u0015\u0005sEl!7d\fAp2\bv\u0010g\u000183\u001dgd,M0~/\f!r\t[\"\tg\"ՙDJ\u001fD\u0013DJ\u0013Vxzf\u0015i\rzVV*)\u0014F\u0015eq(W\u0016h*il4zݔ$:\u00161Ń'~\noY\u000f}{_f?e_x|=O\u0007>gۧͦʯ^[rIhX܊ԽN=\u0006ho\u0014v'W[ݗZ\u0013/qE#! \u0003\u0018F,sW(\u0005\u001a\u001e[p\u0001dUn\u0018dE?Fp*\u001e\u0006IFNg\u0013$-딎 `\t K|\u0015;\u0013\u0014\u0010#{E\u001au\n/`Ƃ\u001ei\u000e4 }\u0001p\u0000tU{$Qs$Q{$9\u001a@\u0011%hD\u0013ʩD}\u0014\u0012?\u0000ɱX\"䚣~4xد>\tH E\"0|\u0017)! \u0000Q\u001f\bߧ>@^t>\u001d\u0007WԷ\u0007\u001dޭ\u0013ʶ֗\f\u0017\u0006;2\u0017mUeİ\u0014$o\u0014\u0007~\u0011.\u0007cucu\"N\u0003J\\n;-\u001aT\u0014E\u0006EAQhP\u0016ū\u000b5EFeASd)%A0E'\u0005I$/\t6p[lAr8ԡ;SzZ-2]`\\9\fje2幔Zhr2 q?\u001f\u0013\u001eo2r\u0002(\u0013\nLA*\f\r\u0016ˈy2P\u0017H\u0004y\u0012A8\f!\"%Rp&R\u0019KL:aK4a/;\u0005mŔۢu\n|\u0015VESkU:\u0015F\u0001n\u001b3_\u001e\u0014Y[5t[,ẋy˜3_=E/\u0002O|߻|۾=>;gM\rۆ\u001exfs催5I%\u0002꥘B}[9\r.ؒKm\t:_ZbR\u0016,\f\u0012)g\\mUV5N`\u001cH6٥àVɨU\u0002\u000e;jlKF(\u0019uZ\u000e\u0007\u00042YԐFIl[#%;Нhe\u0014ZK,TxZz9\u001ar8=\u0014\u0000E\u001a;mZ\u0018\u0000~=\u0013I\u0000$)T\t\u001d\u001eOF#'`NxKpx\u0002bDW OҜ\bh'\u0002*p\u00015\u001bPSjB\tNP#R]t^&\u0006\u0016\u0006359\rE\u0019\u0007=}Hኼ\rESTݫHv*E且\u0018b2|T\u000f\nyKrp\u0016\u001acջefMQ]\u0016*5Kb.B*D(\u000byz<@\u0007bA9l,(\u0017&I\u0004B^\"\rInjށ&Pz\u00120\u0002StP5}\u001f.c:x\f{\b.JpL\u001cGO\u0019$cgd*]#]-\u0018```K\"9\u0012lt\n<&\u000f\u001e^g\u001ay*~W\u0004Ϋ ʕJRٿ3&l&Tg\u0012)}8\u0013N\u0012)MX\u0011s\u001e\u000fQWbAlK5*Z>_ͨ0\u0000^\u0000.3WZ8mmm_e=e\u0013_˹O~5?Ur#ϭ[}o˛I{\u0014ogOѶɃ\u001f=yМ?h>'_rMt\t XpV*m^?s-ꄗ:-\f!ŶR[䶪xj~FQ\u0015\b\u001b+\u001duHF\u0011'̎$c(d\u001cD5g=m\u001fMvҋnD*v\u0014S>\u00058\u001e?}\u0010\u0003\u0001\u001a889D5^\u0013)GuGC1Ew,Qw<Ew<Yw\"Ew1Uwo\u0014}\u0010Sh!7M_\u001a\u001a?\bC\ti\tOA\u000b\rj)W\u0014:x\u0013\u0000|JȈG\u001f>x\u0018B\u000b\u0006'\u0019:[ANLTu~#v<mhrhehU~}MkR\u001e3*\u000ee\u0007=\u001a.pJ-[`\u0011\u0019P'8g-X\u001d\u0018\rc\u00120\u001bX^^lT\u0016\u0019!\n!\u0007Ճ*d\u0005:yN^AD\u001b*4k\nLFuN\u001eT$\b\u0017]\u0002-\u0018.3Rڐۆ$7d\u000e\u001eӉ`ب\u0006[\u000b嶡Z Ҝ<|9ǅ{mA4q-Uy\u001db^ \u0001sqМ|ŬK9k\u0013?C\\nHiHuf,҇3-҄\u0015Iى{\u0002{\u001cXY!+\u0016EJ\u0017\u0019g\u0010\u000b!\"*i].\u0004;\u0001۳(HHm=Xs*~]k\u000772{\u001eK8qOI\tc7>ΟC\u0013>\u0005+D+ʋ}\u0016lٴ\u001e뻲sua\\Ho^\\bCz\u0012GAСwКx|.\u0002nI\t\t\t7u,(md{t{BHi!\u0001ѧE|\n\u001bQ\u0003}\u0001~0D\u0005\u0005(@@`pp4G4PUzA-\u0010\"LA1$Xt\u000f\u0001N\u0006\r\u0007A݃A\u0003\u000f\u0006u0 \u001aqC\u0010t\u000fR/^:=\u0019\u0004\b?\u0016>%d\u0013M{oG8y'kwԖ/Z\\cQ-/(dSI־3NviYsҬ(?nW\u001eJv;\u0015I91.F%&16(\u000f^\u0006t6.{\u0015\\.`.\u0013\bX\u0002VH\u0000b[Hm\u0014\u0005z@S̥\u0005<tAoTǫ\u001c\"])\nq/`\\7qOwoON\u0010(\u0016'\f[j)\u0010[Ə\u0006\u0016\f7\u001bNgE\u0007!y\u0018L(&8m\u001e6M\u0001Nyviq8v\t˘ٿ3&l&Tg\u0012)}8\u0013N\u0012)MX̘\u0000\u000311g_+\u0015GKcPVvHZeB^[bdrVZm6\u0005GBDn{ܗ\u0005Sۯ.7G[/2s%߶O\u0013pt|t_&3p[Ŋdë/*ϵy}6޾l\u001cF7v`WW^Y|er\u001dAr9-s[|y\u0013xό\u000fل[2cl\u001cv3NzbIt\u0017t\u0007\u001d^Nb\u000fgQ\u0007\u0005HTKR\u001cJV\u001cJ\u0002HR\u001eMV\u001eIV\u001fEhhS\rSpXWݗ?u1\u001f\u0000\u0004uIRuQ\u0010SSSA/3\f\u000f\u0005\r\u000ffO\u001b\u001e\u0006\u001fNCr:h0!\b/\u001f\u000e\u001ap:%\u0012?E\u001dJC\n\f\tS(\u001a\u0005#\u001dF\"!N5ܗjX1Zd\u000bmu%]pDS>\u001e˓n\u0019UE]\u0002$Nr@+R\nw*Jr\\Nݖ+\u0012l\u0014zI^\u000f¹m8{Ln᳚\u0004F\u0001\u00014%\u0012F٢\ntRp۹\u0006\n\u000246O'r\u0010\u001c,G+@xAu\"9:EJ(\u00047\u0001\u0007ɝ~<P\bg(\u001c|rrmo.eC\u000f81\u0018\u0010 ;*\u001b[Ӌ\bp[F\t\u0000-\u0018}\u001eN<Vϙu<v\u0014oD&l&Tg\u0012)}8\u0013N\u0012)MXʜ\u0000\u000319gQ$\u00158:D\u0005zHC_k\\X\u0007[ƞ\u0018hBnKً]&7Sxy/|]%/|Sm޺w?|WN<\\م\u001bwܷ\u001fz\u000f\\bm\u0017]\u0014S*\u0003oGn+\u001ftcm\u001d%u\u0011\u0015\u0010W.,w]\u0000]\u0000ҫ\u0012m;\u0002n9z,1\u0015\u0015h'(7\t\niL\u0007kzg\u0000\u0007\u0000P\"\u001eLR\"MR\u001dIV\u001dMR\u001fCV>>A7R>{\"E\u000b\u000e{o2\u0014Idd\u0001p\n\b\u001a(\u0004cE\n\u000e\u000b/d3\f\u000fĈtә(Bt\u0019G 0<\u0002\u0011x)h\u001er$\b?\u000eQNn%m\u0011~(\r9/Ci\u0019\u000e\u0007X>l\u0004\u0016Q[2@Y\u0017}/y^Hs?ml\fR]vcvݩx}FqN_+ݭL2b\f\u001f\u0016c\u001b>!\u00076\u0002,\u0011p1b\"b.2YUN\r][*9\u0014z5ܖ!Jj\u0010Y\u001aY6U5ƫ\u001a:eZ\n&d|rXv\u001eӆ\fw@ۏ\u0007r8Y\u0000\u0019.'\u0006T\u0017ܶd\u0016\u0013b\u001c\u0019n1,Ar\u0019\u000e\u001d/#џI\u0013f>ٿ3&l&Tg\u0012)}8\u0013N\u0012)MX\u0011dF\u0001i\u0010Y(%굌\nYl\"\u000eCjԳ\u001a\rz\r\u001dkqWk\u0013\u0003t[\u001fyo|[7ů~Sz7e\u00176wo_~_?\u0017|Ob\u0005Ū벖kŗ\u0004/۶\u0007rd!ڛ~s}j[«mHu/P}e\u001bv\u000e\u0015rpv\u0007 iB2v+\u0010\u001e!8>~?\u0016\u001b\u001f\f \u0005|Vy$\t|VE5gghd5{5!EJ{\n\u0001\n\u0007R\u000fOOMJ\nrLaC<,\u0015*hL\u001843\f2\u0002&?\u0001\u0011Y\u001c\u000e&}Ucwޓ\u0002,QJO4D])E'\u0006QtŢŕSv-P\u0002ŝCٲBvف\u000bY\u0014\u000b\u0019A\u000bI\u0017\u0012\u001dm6?fןh\u001e\u001e\u001a\u0007tj\u000eh\u001c\u0012$F\u0011\u0018.y+12\u0004JnSpuzlNF+;\u0000]l]P;4F\rV'Hs{MmHr۶W\u001035T'0\u000e\\>-s[tBp\u0005|Z\u001e\u000fm\u00167&\u001b\u000bn[HmU&d\u0012\u0002yn\u0011άv)ޤyIŹTWiq[\f?C\\nHiHuf,҇3-҄\u0015\u0019tfT:k:f[LjEl\"\u001b؍Fb#mմU\u0016nƍ\r\u0004-\u00193Go\u000fw%}[w[~ߖ_w>7?\u001fz\u00157d^\u0013/-z]귃ʧ]+K=Wx\u001d\u000eϕ՞׺W;}\u0010~Htt\u0005t\u0004U<J\u001e/gzU{=}^>/P@\u001e\u001d\u001bP\u001fJR\u001fMR\u001fI\u001cM\u001eC\u0006meb\u0002EMߟ\u0003\u001eHD\u000f\u0011\u0000}0-䳆\u0010\u000f3~i h<\u0011\u000fpzÙ\u00145䰏!!5Q\u000e\"\u001c>e:e:i:\u0003a\u0006\u001fFf\u001e\u000edX9320ll\u00154BSs2̡|\u0004@\u001f>\u0010\u0014&k8\u001d?8^=\u000fv:\u000bN6oy)糐۾\u0016+9ɯd\u0007.$\u0013x%#p>B+LBCv}fa|Z[-ک\u0014n\u0003ÕR|@\n\u0005$\u0004V\u0019M\u0003Xoqs\u001eP]n-\u0006@ңnC-֐JCnB-PK3Utʃ*iP%N\u000b=\u0004e~-\rxHmsq \b^l\u0001F\u0007-\u0017+DlHJI&-\u0004/;9X9/4$ϝ泺fg\u0010\"%Rp&R\u0019KL:aK4aE\u0006;:\u0013DgqPÉnwUqjz6~F\u0003AKb\u0003dst<S!v_vʏxﻊ7Wy˟mUKIrεX\u0003\u000ezk]\u001dHcw{}Z\u0017\u0016:\u0003W).w.^ԜE%{g}!~\u0005z\u0002l@\u0001n{\bmt:\bbV\u001dS\u001bCiO$MVH܋ţ/E}dT-\u0015VN'њi}(h|\b\u000fKE0\fjQ1V3GƳj\f<\u0006\u001eE(kV<Hl\u000bp6t6\u001ch$xl3\u0015Q\u0012\u0018i9\u0006}fQKsAp;?x\u0014Eʸv23O\u0017L5VU\u0017m\u0001ݶtku\u001b\u000e<,\u000b`\u0019ߥ{^J\u000f_𽒓Jvy)/ɾ1B\u0014\u0003'}G\u001cƓ&qAqP'߫Pģ2|\u0012kXH&+y*^7d\u0016n\u0000䠉\u0018'(Յ\u0007\u00113\u0012FH\u001auFb\u0016\u0007:[KtkN\r\u000ekpAl)E<W\r+Ts$\t\tbDz;wv.7\u00166'<A\\\tɨ\u0010*n-\u0005{MK+hI.8|vg\bM\u0012)M8\u0013Ό%Rp&R%R\u0012DUg9-&Ds<gj\r&7G%cY҃GrH?UoުV{W}ջW}oͭob/\rkuXluQe|+zf/\u0011r]fV+ඝHf__\u0005\u0001 \"ĶO8Y}:\tPTD/\u0000UhI4\u0000ɚS4\u000fj\u001fI<;H4ݙ44ttS9ƳA\u0013ǃFl\u0000<\u000el\u0006ǳP<\u0003d\u0019\u001f>\u0019gMGhBy鉬i~\u0005䘁'\u0010\u0016*;\u001d'sP\u000eaΝ\u001cӯrMO䘞'BH6J\u001eGj\u001cL6:\u0001tzp١E`g\u0007'\u0016\u0014O,(\u0019_mAg{{N|6lLj³\tIIx.|j¹4Y%t |FK9\u0017^\u0010><2\u0019NZ4Uzn|R-\u001dWFrrP\"PqhmQh*\u001a\t&\u00041d%\u0006-F3\tl0\u0011\u001bM\u0006\u0013\tD7\u0000xn\\'{D\u000e_Htn=ޥ#;uDFIur\fy&x5$ncw6\u0002AoqaR!\u0013ܶ\u0012\\Ȯw\u001bs\u0015Y-ui\u0015\fGb7_\u0019Br\u0013DJ\u0013D3c>T'l&!\u0017ĕ\u000b\u0004qżyܨEjR3w\u0014ϦĖ\u001c^7$\u0012p-,dhN?/V͍\u001f?U}_w׾mo_o\nW_{#_e2/Ҏ%u|;i,\u001b>{ϰ=M۪7dˮ/\u000bj/v*]\u0002b{0WmM׺W\"{=k\"ÅN䳔\u0006^\nzrr\u0005*Px\u0005(w^\b\\R\nT9ոUQ\\\u0000F7k7\u0002\u001f$X\u0002I;u\u0010߫[Æď>ZqSҍf FKʍ%7$hXo6%h\tlIќx9p)bK'-7\u0017\u0007n.O\u0003$}B\r~L\u0011ЄC&͉7\u00107[oŁ\u001b\u001b\u00037Z7iIdI͖9\\xcI%\u0001\u001f$~ԜQK~F\u0016_z\u0007:<=Σ?;糓M<~*dDmO\u001d&9O??x.b:9rS.\\Ny.%i?\u001dƓ\u0016qQG/ߩOjjZ<\u0010v'Ar&KX\f#\bt\u0019\u0014(e桠早R\u000fON(O[\u0015\u0002#\u0001!WϣUvK]\t\u001d\t\u0004ɤK䐌%6CYW&3\u001c@\u0010\u000bD$\u00038JEz){נ\u0002dz9'5?=kyFC0˙춺?\u0017\u0010܄-҄3X\"\u000fg\"\t[\"\t+J<\u001f[ȍ.D峣9Q&][n/MV^ܞ%?V}L`xnEP\u000eK?\u001f0\u001fj?[5\u001fߪyV[W\\ҷ)zgG~苌\u001a<\u0003J'?F?q\u000e|h\\]m۪տ.&j׽ʚe\u000bV\u001bר%ש\u001d\u001f^ڵ\u0014-sM3=;\\|Y ]\u0001J^,4\bq||\"\"ۅb+eW//WدCt\\pVV\t87]Wިq\u001apY~s\u001a[\u0011P]yN:{wO%\u001f{?\u0018b!\u001f>\"\u0016>Z\u0010F|\u001fø:*.}\u001cz\u001ap\u00115vz\u001b>e｣ۺ{3-\u001d\u0004\u001bz\u0007\t\u0004H{MUmuBQݲlYdu{zK&3%S)I&߻A9(HW:wq^\u001c XG~{6_Y~0cL?k3c0\u0004h5\u001676<xc㷎['~l\r/\u00162u735gj߷i;rLȑܖ\u0007N\u0003UӔo\u00178]/_tAo[5T4)\u0019\u0019#҃ii\u0003z!z\u001b\u00057<R**ށ1O'\u0019ٮ\u001b;/\\r(/e\u0017sd\u00179\u0017\u0017\u0017r9lNғvqo\u0018lMRJ.I\u0012c@ou\t躷8/k\u0014\tSqi$vD\u001c;,\u001dLbg\u0014/f6k[-\u001a+\u001aNEIzäQ[bpgMg_!\rc!a2;+\u0016z&CXHk\u0018E}s5\tW\u0019\u0015q/|Y,\u001a_O\u0019\u0013AiG\t,قnr\u00125\u0001m\u001b\u0015\u0004I.~G]b\u001cv_{\u0003\f-74\r?KwR.eƟ\u000bgȽ3<̃;ӎѿ\u001b۾ˌ?O[\u001fK(\u001c>;o+\u0015~޹6\u000bc,߇q]\u0016\u0016'{\u0007Gej\u0018?*W\u0011\np[W0_-|BJ\u001a7k~Vucm@nz\u0003\"m\u00025a̠~?jEnVZJ\u0018m?o/(J\u000bmAcb']hd\u000b.b\u0018Ym\r?\rюE7s\u0000\fV3V\u000bSM?m\u0004\u001a\bl\t,\u001e}\u0011yw\u001b|A\u0007W\r\u001dƇHi\u001fdjo[շ3m_r[Ů/f}5\u000fm9\u0002s3\u001f#To3.hRN\u0015'cj~\u001d{\u001fe\u001fб\u000f9-\u001ed\u001c\u0006\u0012[pطܠ +9W\\\u000e9]:琂ÞΒKNgJOeJDǬCVAE\"g\u00141\n۔ҢTwNFnK\u0005<~@\u001c+\u0011Dw:yQ].aL(fH\u001a78888j\u0005-Ϫ/5f\u0016*B \u001bBZdHwV,Lt0\u0003RT~~P;kN1%͚\u0012Gc\u0004_\u0017CY\r\u0015Al݂\u00047?Qr[`-r\u00072?~ϟ4?K?SU?K>\\py}rN~\u000f\u0007~o;\u001a^RK_iOd\u0013?\u0012\u000e}]no\u0016]\u001f\u0001e\u0011\u001f\u0007\u0011.^\u00186\u001ff_Aqƃ2գrՇHlQhw[\"Ԁ~J*+jkA(EzG<~^]A\u0010X>nF\u0007\u000e\u0016P\b\u0000mCzS\f2v\u001f*E\u0016)'Q졝(l'X}J\u0015k,\u0015RcWl)e\u001bka5\u0014_0>m\u0001,\bp\u0016ZkC&\u00005\u0016\f\u0016x#\u001fb\u0005zඍmA\u0001p[[uG[VW5ߨ|Fsn4=t\u001fl\u001f\u00029/f}\"_\u0002nVeRקե*\u000e\u001a\u0007\rz!\u0003码{̿r\u0003𤼇[4?Zm\nw[r/ȯd'_̖]ȖsJ睒yC2gx!=)>a\u0013\u001f\u0014\u001f\u000eۄ\u0007mp{L\u0006A\\\tLI\u0018\tnA4&\u0006ܶG\u00143 \u001bW&ͦ&`Ƶ\"PGPTl<̿+\u0004ra,5LtgBZdHw\u0018\u000bi\rpG}>;s\u0003DM6.WM\u00197\\(ZJl5qQ\u001e!;W\u0012${ة\\p-ZOI?i#4zp\u001f;S)\\p?<W{s}#y?_v˯U/*}/R,y'\u001f۾bH</B\u0019~\u00073!\u000b\u001flxYT1\nsިQ(U(͸]]PRuR}RuRJZa\u001a\u0017k_UF\u0003|V:\u001at_~A\u0006ݷ\u0011o5z?5`ؤ^M7\u0019d\u00188m1\u0010\u0019Gm\u001fcylv\u0010 \u0016\u000e\u000b\u0015颌\u000b|w\u0005۫\u0005\u001fP\u0015Kk\u0015m0Z@OZp2K͔n6\u0018\u0016#T\u001f#hD4ދ\tdcp\u0006j26\u0002E\r48ojUF曵 m\\ pa=_w| ί\u0014:μ42k^5_Ч\u0019RAl\u000f9\u0007tCz{\"\u0004I\u0005EnE[\u0010[U*+98͖wʀy[Sv\u000eHSvɉ,p[1&9b\u0015E{me\u0014\u0015kLBnknvN_!54\"\u0017\tcz=>Q$v$9a:vJeae\reZ<MUB \u001bBZdHwV,Lt0a@l?\u0007bKI+oQCJ+B\u000b٬ڸ(]|!!:\u001fm \t՛\t\n7\u001bS(ň\u000bp;\u0005\r_7_~IRTW|[.x?)ҟ-̿:!\u001f`;\u0013r_kJ¯36S*v۾ͦ$zb\u000b;Z9+\u0015lL͖\u001forpM\u001flBnݵ<Sv8|Y|YeJ\u0018/T(/Ud\\J*\f\u0018\u0002ʷU0^V]Q]VzNN-~N^:zT܀Q~fVV3\u001ao7#>h}ТӬӪӢ\u000b\u001eE~A~~A\u001b*\u001e\u001fA\u0001\u000f;\f\u000f;\u000f[A(8<aQ\u0001\u0002nzfxf|2<jfaaa+e7?U\u00076#8؊^\t<\f\n2M\u0003˻\f/U{Yw\u0011ޔNN&&FF\r\r\r\u001b\u001a\u0018oÈnW^zߦng\u0019\u001em\u001fjk9_-p>ʵ˶ܲ߱j2g0\u000bvXy88[͜7\u00133EKRO\u0016(R*T\u001c+H>\u0000'\u001f\u000f\u000f\u0007re}ٲ77]\u000e\u001ex{x]=K-K%SM*b\u0011j\u0011b\u0011l\u0014h\u0014\u0017l\u000br墢T\u001dgFn\u001bmo\u0001m<b\"#i4=/%C\u001a*j\u0012E5\n\u001a\u0005PDJb{\tdD<K-Kpuַ+m\u0012tXHk\fΊɐ0\u0016\u001aFn\u000bcnQ\u0007-\u001e=纅`5%xDl GbQCyM9oU'2\\\u0002H.o-X.߅s?Sw}Σ<\u0007Yvs\u001b[dϚB}\u0016ڊ³sy\u000b\u001eo6vK\u000f6\u0011Xl?^\r:Yr4B9\u000b\u0019\u0017\u0017+\f\u0000RR2U++5k@iUoת֪\u0005ki6ho4n6n4QѨ{YwIwYA\u001e4N\u001en\u001bk3k5o3>h7>h3o7=\u000b&x\t\u0015Gh4\"!\u0011i,:\u001d[>l3\u000f\u0011PF$^\u0013v`S\u0019\u001fuV\u0003\u0007\u0002rmL\rw`m\u0002Ci\u0002i\b\u0000&\u0004\u001b\u001a7\u001bc?\u00070q,s,r\\J\u0005;٦Y9[.p{f\u001fpIO\u0016)N\u0003N\u0017*N9Ur0DA\u0002\u0011O|QGv\u0010\u0019ttotKf\u0004㔀#\u0010m\u0012)\nzk\u0011nFz+x,xق((d%\u0019ə\u0004\u0013r\u0018c<\u0000z_=fO(Y鉽qm\u0016at(Y\u000eIL<OأHU$t''v\u0013\u0013;\u001dVi3\u0010醱0\u0019ҝ\u0015\u000bi=!a,5\u0015hZD~\u0001=B䶀\u0006&>\u001aa_ 6ɡ䲂ؾ'kK\u0003gk6~Íbщ\u00021ਇ?/<Y(<U$\u0002N\"~Npn4gk/\u0015̓\u0002\u0005K\u0005\u00139{]\u000b\u001f\u001f\u0003b{%;8_~By\u0011Yr2l5(R\u001a+U+\u0000(-kuk5wk\u0000`(ހzݍF^@iu7u[PJ{\u0015i]4\u001a`\u0004o'R-G+RZ\n\t\u0018\u001e\u0011i)\u001a\u001eu\u0002fp\u0017\u001aM\u001fu>#.(\u0005>+\f\u001fv\u0007؁\u0016,G^5\u0013\u0011\u0016a\u0014\u0004\u0007\"\u0005E/\u000f\n\u0013\u0012\u0016d\u000f[P{\u0017ٮn3ݻXu6iGv\u000e\u001b6\"kЀ~`7`Y_?~ue4{\u00043\u0005l\u0002ܽ\u0017r$lY\u001ag\"ŉ\"űE\u0005ɇ\n\u000f{\u0010\u0007\u0007se]9򽠷97٢=Nnx;]=S]zxM&|*\u0000\u0005},(LM.U8\u001csR,\u0001-\u001e-kZ\u001aWzQt+nn*i\u0013u{\u0015)0$#V)G</\nn\u0018\u000bi\r!Y3\u0019\u001dBZ(rc>\\n4,o\u00028Qڸ(m|\u0015\u0011qBV\u001e?qô)B6m֫\u00057\\:U s\r\u0017t\u0011XD)\u0010\r\u0017\u0015\u000f54\u0006Ou$=\u000bKKŲ.\u001aoxw|o\u001b}n|Ź 55K՚PAiԫߪ\\ռUy^{^vZZF;uw\u001au6k_oh6dl|~\u0016í\u0016#~+\u0014[m\u000fZ\u001f\u001at>h7m740|t\u001a\u000fM\u000f:1\u000f;\u0001Ӄ...NN(,q(\u001eX\u001etF--\u000f;Qa7\u001e:aD\u000f\u0010n3\u001a;\u001f\u0000Rcta\u000f\u0019\u0003`ze\u001a~)\u0011xX\u0017\t=\u000f\u000e\u0013zUK;za|\u0001\b\u001f~~\u001b\u001em\u0018\u001boSo\u001f>&x\u001b\u0000oֿߢբѬG3][vm\u0005d~n}aAn^l\u0001!\u0010u:\u0007S`*2+Vd 3N)K?\u000e\u001d/I=^v0hH\u0010\u0018n~2{s܀|_tKK)ٕ-ݑ\r+fl˒alf7\u0004XCZI:%[mjXog\u0019\rkR4%m\u0017ǴQh*nۓ8[Eb_rB7<W\btXHk\fΊɐ0\u0016\u001aF|n?_\u001cm\u0001\rRZ4\u000fY\u001f\u001fmeĖ\u0011Bֆll.n+yY[<\no\u0014l+qm/sp,Q]`4\\+/KO\u0015\t6`\r\u0016BRv%,Ň[Fߚ\u001949va|@قs狒/\u0014%_*NT8둟p?\u001a2ì[\n~J^Mb'TBRb2\u0014uK\r+\r\r06\u0019n6kMw`l6d|\u0019^zF=|\u0005l1l5n\u0005noow? :,ww`z\u0013\u0015p\u0010={=ݖ]\u0007TmiCA\u001d\u0010\u001dDc\rև=Խ̇\bu\ra|\u000f\u000f⇡䫽¿\"\u0000\u000b~\u0018xyft(en\u0007cN6m4jjbz\u001f\u001f7Qq\b@}#z3z˝y7qcq)>W>Vv$/p[q(7XQ|B|B|fZ=W>S>[>U:Y<^:Q<\u0006\u0014+\u0016\u001f)N;Rv `Aځ<)R{\u0014o%Vv)v]9mם\u000ek\u000e,\tMRQ\u0015Ȭ\u0004OoFեjk4ь^9n\u0018(bdq\u0003)))}\f7\u0019g$}Z\rc!a2;+\u0016z&CXHk\u0018E^\u000bb,\n6J\u0013\u001fE&\u0014J\u0002\u0016\u0016$u6f[^rgnηowl\u0007u^VV4ggEޮ\nϮʂU{jJwח/4`󨃊tUt>RԭKQ.\raG\u0018((\u001d\u0017.NO\\4;y\u0019\u0017ώ\f\u001e+8[q4BY2ri3]y\u0019;r3v{2,P-P\u001f+י7.4X/6.hddrJ\u0016f\u0016\u0016Ͷ[\\k|-wl\"띶,\u0018wd]oϺљ^Wͮ\u001b]PdFެ=){\u001c8nu;noo@u>\u00070;;H@c\u001f\u001cqpӉ~ǽ~'?>\u001d߃y\u0010=\u0015zd\u001f\u001aKnN\u0003(zȺӝu7냞\u000f\u0001;\u0014]Y2ougFo\u0013ƛY\u001b\u0014gaўy\u001eІxN<{\u001b\u00057\u000brngh}|t0W\u0018AL\u0017L\u0017u:Y\u0018\rgџ֟֝ҝ\u001d\u001e\u001c-\u001e)\u001e.\u001c*\u001c,A/+R#\nU{\u001fjOrO~]\u001d\u0019o3^selIےٙ9;To,j\u0002\r\u0015oJq\u0019sU.m\rz;\u0004ł\"Õ\b7\u0015CII\u0003Ԥ>\u0005\\\u0005m\u0012tXHk\fΊɐ0\u0016\u001aFQ\\%\n֪JEUڄ\u0018lQh;/1_\u0013=Bpۤ)jӼ\tŵ7](-uo/um+\u000evޖv.]\u0007b[qTg\u0015\u0007kԟ\u0018l:=vjº\u001bm=_>닇߸iufϮ>v͹uk.lXwa=\u001a/_{nfԹ٩\u000bf'؉e3J|\\Blhng~[n\u0007Bİ|6t}q18oEVǅ6\u0005\u0018[/;/e_Fc{\u000ep\u0005\\\u0001:vv\u0002:]W]W;o~\u000bq\u0007~N]sۗo\u0002!эp7F\u0006\u0014}h|/&0DǏ\r;q\u00017\u001cDO\u0002 ~\u0000\tAǩ\u0017oį&>}}^E/\u001ej('n;=n\u0018'\u0003\u001f\u0011Sr]y\u0003\u0001\u001f敎+\t\\i;\u00048/B/A-&ǹ&\u0018Sо&S\r\u001b2O5fl<Qyvvv\u0004a=\\c=Te=Tm9Pi9Pa_i[nWn~̴԰Դ\b\u0012J\f;;tۊo(@\u0002k\u001e@5O.o-+68\n\u0002CvmJz\u0003o=b\u000fƃvJb;Qz\u001b.&'\u000e@o\u0007R@oRpB \u001bBZdHwV,Lt0\njP\\\u001b\rVK%1VGn\u001eЦZ\u001b\u001d\u0017r,en-~Ե̽<oGYܝ\u0015Pvw{vU)U[tg}\u0015{ju\u001fo96~rknu_\u001c{w̻[g:{c챉SǧNL^\u00068n\u001cz`\u001dř鹙ӓON\u001d\u001b\u001d944tv6\u00138S5W58Ze_iVfV\nc*-'N睄\u0011ț@7@щjLN|g3999ߓ?ߙBw\u001e\u0004\u0017|/\u0015B}R\u001fPxr_!܄@ѕEW\u0006\u00077\u000b/:x\u000bs[EWy{0p/u\u001a5\u000em\u0003\u001e5>H`«6=v0W WH\u001f\u0017\u001fx=\u001b\u0002\u0015wWtRO垢KυBӻГ>\":<g\u0003om;۞7ז7GhәּӈSnL-X3Hc&ס\u001c`Cu5}7koV; \u000e\"kGeLGRK3_/m-m-m.Rd\u0019\u001b\u0018)-//1\u000b\u001e3W_gjiIxZ2ml$]\u001c׉s$a\u0014&\"</\nn\u0018\u000bi\r!Y3\u0019\u001dBZ(*9@l\tњh5r(}bT z,p[jԐ:elr\u0018_r_\u0005w\",Y\u0001qwu*ϮE;jv6Tu\u001f^~OO\u0003CG;O\u00190z~m\u001a[/O\u001f\u001a\u001f;4>qxbљc3gf\u001e_3{b͚\u0013x<fɵkO!fO=>3ul|}Վcuc\u001brN6nthp\u001dV:gwPX[]:\n{)Dg.S>Nw\u0017F̙\u001eL/%s^z>\u0004+>Wr\\_R|\u0005<\u000b\u0003s&U_\u0018,\b\fyo^\u001c(\\ť2\\b\f\n!|\u0010\u0014u\u001c?\u001a\u0005U\u000fъ\u0000e\u0017\u0007g}\u0010^]D/\u0002\u001e\u000e^\u0018\b\u0017\n~K|\u0005X:O\u0015%zK'6O}z=g\u001fӝE(:AY^\u0000ƣmGZ=GZ\u000f9\u00044{9ؔwɳ1\u000fۘ!͆=ݵ]ݵ\u001d^r\u000f\u0003zUkٯUV\"gKskRҬơ:wyMNI̚[br\u0015\u001b͒\rF\u001a\u001doTIFӒQz+ms\u0014\t#itP*b0E\u0019.qۧ\u000690\u0016\u001a&Cb!g2;QsV\u0012cx*2-?4Y/bUv\u00177iQ2c~%7Zi$gG{'m@lwWzT\u0017-Pvgkў7;kww5iײw}p硱cS}'g֏o8ԅ΂޾4u`lCSLO\u001d9:Y3\u000b1ܵkYs\u001c1s\u001cL\u001f<29qplt\u0006\u0006&ɦM\u001ePp{op[ᑎE\b\u001cb]%{JNt.9]\u0001Xz\u0014ЃGD޲}34(}ف.\u0007/q~\u0002S~\u000e\u0018,??Xe\u0010pP\n 5JM`\b\u0003G#DG\u0017\u0001eޟ\nXŹsCo\u0007a\u001c(^9ZA罔y~s\u000b\u0005}P\u001f \u001aKOuAɮ\u0012\u0004\u00148Ur\u0004s\u0014\u001a\u0007cw<VxP[\u0001\u0015(}-}MZ\n6݈Ր޳>og]6/7j\\5Uծ-UJ׫\u0015\u00159eo\u001ak\u001e(klʯl+uV;\u000b+\nJmy\u001b26Ze댂I\r75[ܶC\u001e!$'6\r\fAoS0\u000e\u0017@N7ɐXH\f\u000ec!a\u0014h1:TD\u0017\u0004rG.@n.\u0012$\fWVv\u000b[֓\u0005nص4g{{gE]\u0015uE;+w67lok<[vGw\u001d=ͻZ\u001c\u0000=2{tz3\u001bmϽ8\u0005\\xqĚ}c'Ao\u000fLM\u001d84=}xz\u000682K1{df\bt)=wā}##\u0007׻6\u001eo=9999ܘ{\u0018pG#%G\u0000(Ju\u001e\u0001JݥzJ.;у8SzK\u000f\u001aO+?Ջ+\u0003\f\u0003+\f\u0014\u0003\u0015 *\u000eTbnrn\u0010s\u001e<;Xy\u0016!\\b~r~\u0018ݜ\u001dDGbp9|\u0010FA\u0018\tfZGt<+ύ\u0013V\u001fA\u0007\u001f>C\u0005\u0005`\u0013\u001a^Y\u000f\u001f\u000b~s\u000b.?~&Tч\u000b@-@}\"\u001b\u0001j\u000beǻJ\u001d#УΒeM\u0014\u001fVX|P{с\u0003mE\u0007Zo-ׂƽ-\u0005o6\u0017Aj\u0004xv5zv{ףq\u001bP\u0007Fmky[[krTnvZj%W*\\H@_ugKQMS~E>UR,\u001atdmJ]g\u0005i\t]Xlq]݊t֨=\u0019`\u000fqtKAN7ɐXH\f\u000ec!a\u0014XoIN~bB\fb\u000bV\u000bG8$Y=$^5(YB\u0007\u000bkl\rvn۫yY[\u000b\u001do\u0014l/uUҳ`gMmuڛ\u000fiݴigo7:t\u001b<4wtz云\u0017&Ͻ0u/N\u001d\u001b?6\u000e\u001c\u0000W845uhj\u0019\u0004,-ehD{dj䡱}{\u0006\u0006vj;azN\u0000[\u000b\nsȑ] GK>(2\f.zˏcN\u0000}4N!*NQE\u0015>:3hL@f*q1Wr{\u0019<O\u0019L#᠟=\u001fg烏S*=sX燼}/A+ST\u001f\u001daL\u001c\n(\u0019P\u001f\u000ep\u001b5( 0Z\r\u001e(8F<w_[\u0016doXp7T!\u001fрv{\u0003\r,0V\u0003l\u0006@r_}\u0012p4\u000e\fwԶ\u0014V5W6չK\rδYtTMM\u0004JVu&\fF2X\u0019\f\u0014\u0002iT2')AN7ɐXH\f\u000ec!a\u0014Z,\u0018\u0007?H-\u0010=\"D\u000e?C\u001c;,Y=,]=$qU9*ݔۭ\u001e\u001bmrV\u0017-\u0001bTFK7Al\u001b/\u0012\b/r{\u000b6\r47\u0017U5\u0017V6\u0015T4z*,Rvce[֞>\u0013gpSzR\u0012:\u0015=)I#*3\u001eCY8e?/\nn\u0018\u000bi\r!Y3\u0019\u001dBZ(زb\u001cb\u0019\u000f\u0016\u0017q¤\u000ei\\$n\u0018Y\u0011@W\\uY͞Lp[j;]5ؖoo~~GGo\u001e}bB |tV48k2mՙ*f*\rE\u001b\\I[FПIIMMIU\u000ff$M۪9J\u0014ݎ(9m\u0012tXHk\fΊɐ0\u0016\u001aFa`:I%2^>X-\u000em\u000ei|$\u001eܶM\u001c;*[\rWW\u0011}aM~ô97B\u001b%\u0015\u001dXl^o\u0005\u000b\u001cB+i\u0004\u0000|Q8\u0019tV^ȋ(\b\u0018\u000b!Iಕ<v\u001b Ћ\u0005ZpB#k\u0002#\u001dg\u001fZ}\u001a}\u0002T1\b\u001fN\u0006+A\u0003\u001f/w9pXt\\Q\u0007B.BaO:\f߼-_roY\u0011Oon*Tlߐgg\f*^\u001a7%GЛ\u0012ߟ0bOjX\u0006{T]x̿+\u0004ra,5LtgBZdHw\u0018\u000bi\rb/\u0010s\nۺ\u0005,PZL|8\u001f\rJ;\u000e$qDWܰuY\u0017]֭\u0005K]*\u000bՖmk\u000e?<\b`\u0011jOBݖrX\t\u0006!/\u0002\u0000F\u0004?2b\u0002\u00170OL\u0006\u0005z\u001b\u0016\u00045\u0004ܖGsۈp\rP\u0015ilȒ<\r\fN]\u0006\u0002Mb>`\u0010r\b8t\"w\u001dM-6\\2צ\u0012\\ø-mH/SqӒzSn;J-*Ψ\u0016f\u0010}J\rc!a2;+\u0016z&CXHk\u0018\u0005\u0012[\t\u0007(prE,*\u0005m\u00175\tbjy٫ƒWO\u0000S\u0003%ͨ\u001b\u001dW=Js_*\u000e\u0011\u000bOG-<\ny\u001a!7(v\u0014z\u000b0\u0000%5mi\u001ak\u0010\u0007\u0011lKA\u0010\"KB^/\u001b\\:\u0002\u000e_j*AV\u000by~4B\u0002\u0016-!r^^0\u0013@\u0010\\\b\u0016,T>2\t:>[Ch\fp[mE \u0000\u000bHQģϿ\u0001OƲ%u\u001eC=bV\fi\u0003JNojboj`Z☊=aOjcJ\u0016Gg_!\rc!a2;+\u0016z&CXHk\u0018\u0005\u0012[1Pٝ8p\u000e4\u0015\u0019m\u001d7\n\u0016mԤb$r[(@o;L/[Ks~a\u001fi\u0015\u001b:iW4\rWZ?dvYV+\tA\u001b\u001f/^>\u0012\t\u0002\u0018$\u0002@-\u0005hn~vn\be.\nm\u001c$MHn\u001bfz?춄\u0004\u000e&p۲쵅S.hfQ6)Y}i\t#*ָ\u001aܖ;\u0003\u0019p\u0017@N7ɐXH\f\u000ec!a\u00148\u0013ۥ\t\u001dvI|$I\u0018S/ab?_z\u001eiE\"zF\u0011=\u0012=\u001c\u0005n;\u0016ɝ\u001fs3,ZD\u001b[\u0005\b\bպff\u0013@.Hf\u0011&\u00041$ыU\u0018\u0011 ߄_\u0004Bob\b\u0001GG+/7\"qp}cdё\b]/*NshQ\u001cf\t,\u001aE\\#:/IK\u00112_\b\u001ds\u00174\\*åmsA2r\u0012Ǵ2\u000eS\u0006u\fN_ZR\u001f2\t3\u0001厣O\tra,5LtgBZdHw\u0018\u000bi\r(r\u0001m8m\u0016jXrd?-Y=\u0012I\u001d\u0005MO\u000b_c,%h\u0003 Q1S:\fn\u000bah\u001a\ti\bAYjhŒ\u0010ҊpB+\u0005\u001c\u0018bFU\u000b\t\u001c%౨\u0011Th\b4b\u001fOh\f\u0011m\n\u0011oQ1\u001aߨ\t$/\t:\u0002\b`o}\u0004l)D)+^NSf\u0001\r`*\\\u001b]\u001bJk\n\u0013.HfƐA>\u0011\fdӒ3m\u0014J\u0018qۧ\u000590\u0016\u001a&Cb!g2;Q9\u001d8\np[\u0010F6᭚I^\u0012&-f6-vV+{\u000b:>Ga)l\u0006\u0016G~\u000bl@ixݖ\u0000,Wi\u0017X\u001f/\u0011uy\"\u000e*~.\n/5ɄOl`}J}>\t»lύ,ඉqH\u001bAu\nL\u00124\u00039\u0002\u0014DۂϊA\u001bf41\nl\u0004-Y[d594\u0001\bMO\u001aJO\u001aS'Ԝ\t\r\u0017\u0018\u0003z_\u0015\u000290\u0016\u001a&Cb!g2;Qveq\u0016al(\u001a-{u%\u001b-X--wu\u001d/E\u0014\u0005b\u000b͈[I-\u0002k\u001f\u0016-`\t˱Z(9\u0019Eq>.X-?\u0002\u0014G\\\u0003^9}&3z\u0012+7I)dn x\u0011h}|h\u0017.R~?j%vAl5|2v\u0001ۥ$cTrV|2mp9\u000b\u0019.<cԷ?6Ե9o\u001d1XӇ\rA\u0015o05\u001aS4\\4-\u0019\u0016g_!\rc!a2;+\u0016z&CXHk\u0018E,\u0001$E\u0014(Gנ\u0016mĖ\u001f6=f]zze`62\u0004\u000f$B\u0017\fUX\u001aja&Ml#ʬҴ|/\b\u0001Q\u0016\u0018)/|v\u0019\u001a\u001bOZ-\u0011e6\f5(\u000f5q0\u0012U.D68dZ\u0017=\fcBiH%^c\u0007\\z\u001d\f?\b3CX]DCh\u0018PTJ@9<\u0016\u0018nF6FyBE|۸4\u001e1i\f֨\npn%n \u001bBZdHwV,Lt0\nJl[M\u0006\u0001\u000emQ\\\u0012z~T Q\u0018&Y-0\nɌ/\u0018\u0015[Q`P\r1>J\u0018|hRhix]G\u001e\\B) @\u0018H\u000e\u0011q@fd)dr1EN\n\u001e\u0007\u0004V|F,ËBl/IKoe\u0000\rY\t4a\u0002Q5X\\o\razF/͙-OdsʐN4d\u000f'\r+\u0013Z΄F\rwLC$?%醱0\u0019ҝ\u0015\u000bi=!a,5C*k\u0012šĖ\u001b\u00052[Ez[\u0006\u0005ŀc:q\u001bul_;\u0001[\"{V\u0014$7Y\u0010\u0012솯Bn\u001b泋ɬ d#%O\"\"5\u0018W:m\u0015Om\u001fk\"\u0016\u0019bW\u0013\u0002vK/8/x-YuHXd<\u0014#\u0001hSe\u0017\u000b\u0002E\f\"wF3\u0016x\u00055>:3[ȵfGi\u0006Iݟ\u001aR&h;I-oB˅W\btXHk\fΊɐ0\u0016\u001aF&G\u001b#\u000bcjxQU8ܖ\u001aJ&At(M\u0012ۗ\u001aHGbRn\u001b.˱ZA0 %8*^b\u0004`\u0011\u0007\u0007l.nL>\u0002d\u0011\u0000\u000b\u0000z++\"~R]y)\u0016B\r6\\\r?Q',7ۍ`٩,І+\"\b&[e|j 5\u001aᯝrj\u000eWQߋuIu\"\u0007_ \u001dmGq-w\n嶈1-m\u0012tXHk\fΊɐ0\u0016\u001aFтB:~4Jl9y5XlkyQFAL0Y\u0014)\u001bNn!V$%yගͣ(}FZi\u0010\u001a%\u0005dvQbb+\nb:\tIkN\u0016N\u0014L\nVz\u0004m@oz\u0001\r90+^\u0013v֊\u001a~~ibPK\u000fvATs >\u0004A\u0005x\u00045:\u0001[/D@㳴</\u001a\n.KR_?}tmm\u001cR\rC\u001a~o:k0\u0003m<\u0005zܖ7=/\nn\u0018\u000bi\r!Y3\u0019\u001dBZ(@l\u0005UHlWUlkxkQ\rh*2mL3\u000em{\u001561\u001e\u0016>\u0015\u0006 \u000b@\u000eU0MRs\u0013#Ym.)}4볊\bh\u0005\u0011r|ZA\bT\u0001ndaZ\u0010)\u0005\u00198m\u0005!nг\b\u0016\u001cB{?w7lUb\u000bb\u0013\rb^O\"Q5Ix\u0006jŮ\b7\nh\u0015-\u001bЅr\u0010oLA4bW\u000ej\u0005\u0003J6v[Τ;Mmɜ\u000490\u0016\u001a&Cb!g2;QP-\nmy8ͣj2[A\fm(U\u0012ە\u001c?H7Pn,\rRZJ`E0F[\u0015\u0005zP8\u001b'YEMhXtbn\u0006v[\r\r>\u0001\u001adBL@\"@\u0007᳢=\u0012_!\u0013\u0006lW.\u001e\u0014O\u0014\u0006\u0002+-\u0016R\u00111Drş*]\f,\u0011\f\u000eې֧\u001b\u00131zĒ<\u0013\u000e*\u00038q<[O\tra,5LtgBZdHw\u0018\u000bi\rEp}SymkxF5\b؊cڥ)\tc*?\r-CwH\u0014.\u0014\u0002\u0004@#I!B-y\u0015h1}\\\u0014D\r AnK\u0017tnbv\fn\u0010\u001bz\u0010@h\u001dGH\u0006Z\u001b|ğz\u0005y\u001b\"ˌw}Ϋ4\u0019MH\u0016$\u0019yx!\u0018U\"6rv*<@n;\u0013\fC\u0019I#*֤3S3\u0010醱0\u0019ҝ\u0015\u000bi=!a,5\nej|b[ˏ\u0017F\u000b\u0010JiIDۆm6Bb\u001b*8+OoeBmwԼ$gY2\u0003YB\u0011\u0007M%ePp\u0013?ۢi\nVևHOWT}4Xx^\r\\ɟs#:rf8<WG\fb\u001bn\u000byn\u0004>\u0013ɍ49yu<C=j\u000fiCJ -mQh;Ohɜ\u000490\u0016\u001a&Cb!g2;QWvU\u0000ŵzaL8E\u001c*(\u0012TދxW\u00066|BR\"j\u0005\u001cGOZB8.w^X\u0002b\n99~M\u0006E\u0007Ц%c5,KA9/\u0002\u0016\u000b=.|)ShDB_/\u0004\"%\u0018y\u0012<w\u0007=nf2m5\\\u0015f<lpa`\u0010\u001dRuY\u0003Zϛ1\u0010}J\rc!a2;+\u0016z&CXHk\u0018E%\u0017m!\u0013[4\u0015\u001e\u0010D5Q@\u0014鉓\u001a\u0015<Gj<ۆOH\u000e\u000fm\u0017\u0017[У#Ö.j\u001f\u001fF&\u0005C%b\u000eMf\\(\u0000\u000f\u0011-`Џb5Eܖ3y\u0011\rW\u0004\u0015}9\u001a\"<Uh\u001b\u0004\u0018nR\u0007~IB6\u0015\u0014k\u0007\b,Yr\u001b8bQ\rTyA\u0005mi\u0013N5yT/\u001aT\u00191-^ok s\u001etXHk\fΊɐ0\u0016\u001aFQ\u0016o\u001a\u0016h\u00104VI\\4\u000f\tɊLH\u000e\tm#\u0004\u0011[;\u0015m%eLi#>E\u0017M\"\u0002~MRA\u0000\u0019m\b\u001b[DiɑMs\u0011\u000f]\u0014,\"ҊHB\u001d{n\u001bP]\t=@\nt$ĘdV\u0015gK\u0016Szk,Kr\u0017\u0004\u0001nȴǹQn;\u0013\u000e+z!\u0015k\u0002OHFn'Sn\u0018\u000bi\r!Y3\u0019\u001dBZ( NV\u0010 iF\u0013cۤJ)-oAFEjn+\u0001\u0005y]vI3oM<N\u0011[\u0014B=Ȭ\u0018\u001cg|2+PVK\u001dm\u0002]\u0018m\u0017p\r;hG+\u0011ފ\u0016rE$׻W\u00155\u0015Y\u0012p\u0003\u0007B} Jn\\!嶀ϲR\u00183\u0005nݖ\u001bp?1An\u0017\f8\u0003\u0019*ָ;\u001a3F>%醱0\u0019ҝ\u0015\u000bi=!a,5\u0016_\nm\u001b\u0001آQhx͢v١-Au[3xQM\t\u001a-rA¥|V&B\f\u0011/EVx\u001aޢ9rRj\u000f>h$vEzPE\")\u0014\nO\u0016\u0013!G:\u001aހ\u0016\u0006Ǹ\u0001\rސ\u0002[\u001fk\u0018)-ۆi<wѫ\b=Fo%퟾~~:[;fU\u001aC*`F2qTÝg\f)\u0003W\btXHk\fΊɐ0\u0016\u001aFA]\u0007'эF\u0011r[$I\u0014\n6Y6\u0005ܖ\u0014+m&\"m\u0002\u0003\u0011qHnX$d.!+m,l|cɆ`PRa\u000b[\f=d\u0003\u0006\u0010ɵnZӒ\u0017\u0013`AQнTt\u001bJr\u0003n`^,p5\"lW\u0015[,e:֏frd޺d]'7B\u001bar2@V\u00139qb \u001cVsI;iO\u001b3F3\u0010醱0\u0019ҝ\u0015\u000bi=!a,5\u001a]G\u0010 \u0001mĴIbۤq1\u0015gV_g\u0010n\\mrB%$Rn\u000bDp[EQ˛x\u0012Xg\u0017\u00105$#\u0005UI\rq\u0010\r!k)ԎRKpǤa\tې\u0001=^r\u0019.~LU|\"\n\\\b'TK\u000bsC6)6m\u001fOr\u001f;E9Ft[m$1LXS\f\u00115\u0007vX\u001aQ&&ɂY#m\u0012tXHk\fΊɐ0\u0016\u001aFGklK٢ \u000eY|wrpzҤ$\u0000}ɺv\tK\tmAfbw[mV.*KjS&\u0019糼~PH\u00028 :ٴ6bb\u001bj\u001eCs[Qh&iXBt\u000fҐT\u0018oyM|ѭ?/ŕy/\u0015\u0014\u0016F\u0010[\u001ad.23ne\u0018Cn+\u001eVs@lIC:I0Mrۧ\u000590\u0016\u001a&Cb!g2;Q6\t1\"$8t\u001fY|j=\u0017l06Y/AnJ.m?J[\u001an+\bZoݢ\u0016\u00141Zh}\u0016$ȿűKh\u0017,_(\u0002X8ZS(\u0015\u0016a!H{KFl{Ki\u0010.že\u0017\u001a|«\rEC[\nyR\u0019~cMQ^Do?ۮu\u0019&3|-\u000b\u0018V%M\u001a\u0006O\tra,5LtgBZdHw\u0018\u000bi\rhжQ\u0014\rb\rm=i\roQUMMB=\u0019o$\u0005n}\u0002]Td6jNġ6\n Y\u0014\u0006\u0011,\u0005\u0015\u0006nˉnC7.\u000f\u0004a\u000blC\"ZGpnmm)\u0012GF^.J+\u0007!\t0\n\u001f/!\u0019<&-\u0007Orp}\u001d.,\b2e(mCL\u00122e\u0005K 6ۮ3Nm~\u001dUǵY`O\u000bra,5LtgBZdHw\u0018\u000bi\rh\u0012F7cHlۥl1\u0015kQ,z*z%S%+m\u0015m`N\u0013`Fh\u0005%Y\bj\t5\u0002`\u0014\u0002mC\u0012\u0017Ϣ~\u0015#c\u0002JisiJ-J\u00054v!\u000f\u0006V)\u0019 f\u0018\u000b8XoEPc\u0018.8C.+\r3T>K_\u001b y\u0016\tm?01wzܵK^u\u001b⶚01Ngc\u001a\u001ev05NykLg_!\rc!a2;+\u0016z&CXHk\u0018\u0005^f\u001b$kƵ-\u0019I::\u0005L񫙒ڜnb\u000b\u0017.s\u0017)Td:z@g\u0000d)\nG$|p[Y$>\u001cgukilj7\u0011\u00166d+\u0001\u0007B3S$\u0016<ZSd\u0001)-0WLZ1}rX\b!\u001b,vq[Q$\u0015Ė涴\u0016BnA݄τ?ebr|LV^<\u0016E\u001aΌO\u000bra,5LtgBZdHw\u0018\u000bi\rh\u0012+%qخq5{hFbrds<&.FRKLB\n\u001e\u0016B\u001fptN\u0002r[\u0001K+d\u001bpG\u001cJi\u000bF\u00000\u001a,q\u001aicƐR$mi\u0000J\u0005~\"]\u0016irD\u0007빖\u0014綁2s'0\u000bE#\u0003U6D\u0004m\u0003'\u0007\u001e\ne\t~\u0016xk\u0018ָ,}\"}|n\u000bDr\u0017k\u0019\u0013F騚;s[p15gZ_KiAN7ɐXH\f\u000ec!a\u0014h6r\u001c@})C\u0019\u001azL˙vܫ]Er[Jx\tmE\u0014#\u001a!GCY:\u001a|\t\u001e\u001c(5\u0004A<WMDJK]\u0014\u001fF\u0018\u0002Sކ\u001c+md>a\u0010YtM\r\u0000\u0011mV,H~T>ɕ#hf\bSe󖩍B\u0016>\t!2<?m\u00101T\b\u0002]:5(y\"Kj\u0002Z\n-oT\u001aVU\u0011\u0015gJϛ5k\u0000=%醱0\u0019ҝ\u0015\u000bi=!a,5\u0002o!\u0015\"S\u0013'T5&&%\u0010K?\t\nmumŶ8%~*M\u000fjҞM/QHu[p\u0012)p\u0003bk\nnZ}\u000b\u001bRAz&\u0019*,r\u0011rT-F\u0012TYp+\u0005~@<vʎP'*SkB;*\u0007d!\u0011-=\r\u001c\"\\\u0000hHn+\fKlm\u0003n⳨\u0016\u000byR?=g\u0011.%}мΩH4\u0011\u0015\u0017\u0016IƹY̿+\u0004ra,5LtgBZdHw\u0018\u000bi\rhĶ!$\u000f'h\u001b͂\u0017m2[+mγ-#\rn\u0015(\r,B\raV\u0017\u0003\u00156V\n\u001b#\u0019m9>\rXmPt\u001b\bg\u0016{75\"\u001b7Bۈk=^2_\u001aJ|Kg}X~}qĞ\u001aN=/ɵR_\u001b\u001eң[q\u0006\u001eE8x;et%$\u0007\u0005%\u0002lo&bLecA$z\u0003\th\fO(zA\u0019nd5}6`eGm-\u001bsS&\u0019J\bn'5&O\tra,5LtgBZdHw\u0018\u000bi\r@uJ۔1%kURxC!y3|{n\u0016p|n) l1W%`p\u0016d\u0016LA0\u001ai2\u001bD iildiR\u0014n3@m\"5g#ӮcL\u001c\u0011oHE2m^g~?RZỗـJh,\u0014\u0018mj@r\u0012,lAnK\b\u0005[]DeUt\u0003\u001a<7h>!YQ3zlz&j\u0001Kۄh\t1 *NN9~ɥ~\t-/۾Zbyѥ5a\u0015wD\u001eF\u0001Njy3dӂn\u0018\u000bi\r!Y3\u0019\u001dBZ(Zѥ⺓{S\u0012\u0006X\u0016m!eͻ:ԐΗ⍤(U󑷂۪l@gy&G)OZ\u000e1HbK\u001bJ\u0003)m$\u0011%ӂ`OobKKW\u0005t\u0016u\u001cFzb\u001b'\u0015\u0007!]~2͋'\u001fǘm\u0015\u0018׬\u0010\u0015\u0005lR\u0018wۆf245I\u0018\u001f\u000fNĥ[[\rn\u001b=ԫA*?VaKn#&'4\u0011%wD\u0019QG\t-oO\tra,5LtgBZdHw\u0018\u000bi\rhu{\u0014q)cJ\u001a#,h65Zw\u0013M#JI&ep\u0002bgi}Wщѵ\f\u0012)g\u0017\u0010[Ap\rWZiD\u0015%+i\"^109Y`\u001d&\u0006rF\u0011\u0016D@eoaObg\u001c\fNi\u0003&+\r~\u0000S+oA\u0004izKMZ6&\\*HZzbe)뭔K\u0014:\t9d\u0017W*/̕\bn\u001b^rMzW݈z\u001b\u0017pSAWOV=.\\jy%O*\u001bGU\u0011\u0014rGU\u001cpY\u0003m\u0012tXHk\fΊɐ0\u0016\u001aF)$\u000e'NkM\u00173E/[\u001d\u001b}y<g\u001fl*\b\fn\u000bb\u000b\"\u000e\u0013r\rb.}BV\u001b~\u0015zKrE0Ji~-ZKs[Q\u001akI\u001enV\\#Unk\u000fX%4J*<pӦ\u0010c\rZ\u001alJ!{n`Z,t_)Z+.-]pfr!P7%d#6\u0006\u0012~vi!,ҥXs9\t`\u0001\u0015\u000b\t\u001e!snKm7X^S:\u001aܖ3bc\u001a\fqۧ\u000590\u0016\u001a&Cb!g2;QtJ۾Q%k*|)S\u0019)֕wss)cAHn\u0015p|\u0016h\u001c\u0000\u0012ZEw\u0019.j}nŖ\u0006㟖MK6\u0006+EYI$\u0005lc$dSJF)ߙ&N-R\u001b /ކ\u001ch\u0011/'\u0004V+{Y.9YLm!\rmehG)ߦR<d|;\u0006\t! \u000b'R\\'sHJ\u001b\"|5\u001cv\u0011/D7t2I28\t!\u0004T.\u0018\u0017'%/mRli=L\u001dWQzݖ}Z\rc!a2;+\u0016z&CXHk\u0018E<G08xW%7z<W:sϴz\u000e7\u001flk\u000eu[k\b,`+\"^ȥ\u0010ˉnr[\u001a[ߦRKv[nF1?xf2?dumڻ\u0011\u001bj&YZڐ\u0019'{'2GZ6,M\u000bEA\u000fا^Xt\r\u0014Hr\u00158fD\u0015[aB\\,x,ܻR{z\u001b\u0010[\t?=V\u0012\u001e\r)DtuBNƢNt)]s-e\u0005MY)`B\u0005E魒3NiAN7ɐXH\f\u000ec!a\u0014(M\u0018`5m_I^\u0012ouHuyx\u000e6o*\u0014mB\t,v[o\u0015Al\u0018,F\u000e\u001cBIQ\u001a[=mZ2=5\u0010\u0014\u001a@\u00116t(aZvU!ΐ9\u0016`H&\u001b)\ruaB\u000f\u000emEa\u0019nh\rbk\f7+\u0006\u0018-Nl\",h-U\u0011%\u0018(8\u0015[zhVd2\u0001=\r\\I\\ۆ|ul&.`J6^\u001b!Kn\u001f[m[\n/S\u0018\u0004^qR{_\u0015\u000290\u0016\u001a&Cb!g2;Q*\u0012\u0006\u0012܍FKV+-v\u001eμ8ߘ@K{@WUkRwƙqk:InMnB\u000b\u0013@\b\u0010bt&*( 4gF;VTf\n\n\bInr9\u0004\u000f{v=sOn\u001ao:~flĶ>̶\u0016IRg;oK5!\\a\u0014Ӓ)\blEZn\r>T.'YIųf>7@6CؙF\u0003\u001fHVv;~HL)\u0013\u0007¡eE|[̼\\Y]|hr\u0011Ͷ3\u0000\u000f@@.PczQ˷50\tbYd[ZY~dU@\u0019˶\u0018ol@k;ِmD)ζ\u0017WvìxiX\u0016N̊e0+^\u001atMJ315\rX/.\u001axbJni[xMCƲ5$g #-p\f2mvI\u00167\u000bN\u0005b¨dEI\u001eo+UsrU\u0002``mhm\u0007l;)yV\u0002\u001br\u0005\u0016᭄fR&'Q\u0019&]:R&BE-$8v\fcɲN[\u0011iՎs'L\u0005\n*m$vȼwM7ep-$,\u001cζ\u0017IvìxiX\u0016N̊e0+^\u001a\u0004vfV{|m\u000b\u0006Z\u000fO-~lB֦M\u001aJ\u0001ۮi*H5K\n9f\u001dhڞo,uG}d\u0001P{ӥp,fqA+Ztk WI\u001a坳dl\u000bB'\u000eܸ\u001fq?~\u0017g\u0006t/~ƅj:LŶo\u001d\u0011\u000eT\"Mv\\\u000ew\u0015N.\\ŉeR6mf\u000fĘ\u0001V#\u0010,Aa\u0002\u0018(~J \nl{;mrK}ؼR|=\u000fV\u0007\u0016U\u001fz|k~&nl\"n\u0015/\rՉYҳ,^\u001dfKÔfdmk\u0017\u000bX\u0017\u000fq\u001c\\hScѺ5k\u001b6$\u0001f!\u0011\u001a\\o\u0015N\u0016G\t3<٫n\u0006*LL\u0018n#\rĝ͋;\u001fw0Hйaq?\u0006Nt*TkxLwM\u00000ۡ4:j;#\u0005ì\u000f\u000fҰq%\u000f\u0017XH \u0019\"G%WISjR\f\u0015mY:\\e\u0007QDZu˭½~YXsdjVƤ\u000em\u001fp-\u00186+`ͥtc6f[9K\u0011\raY:1+^zūìxiMYf\u0001ݟo;4hĢM\u001b\u0004\u0016m٪%[&UEc[d\u001au\u0001lK7ފ\u0011e\bYh8K/X\u0015ۚXrRo֬WP-91V\u0002)\u0017\u0019S\u0015_\tyvD\\KE<PJt$j\u0001xH\u0019\buc?Ym#\u001a{܁Q\u0013]Ώl\u0017\u0015\u001f\u0002F7J+@.~+7er9\u0003L ^l\u0002\u00069+\u0017shZ?kU\u0005\u0004X:쵪\f\\3ä4ӌIN}_N\n\u0005ֵ`X|nM\u0010ldٜm/YҰ,^\u0015/=aV4L\u000ea|_en\"EK/^Pz\\چ\u001bJwNQm\u000ea[ \u000e;OUF\u000bTx\u000e\u001e+$\u001b\\Hd,Ē\u0016%lKV\u0018+FaTxnP\\ȸʸ֪6QX\t@5\t\"\u0004rH]\u0000ᒕCmryghՐ(Ye\u001fɇʤ\u0015\\D\u000evb my\u0019Vm'JUE\u0002`\u000b\u001f-ff;bۅз}8}nNl\u001dۙVw#﷽X\u001bfKòxubV,WY0}9\u0001˼|˂\u0002ۡ\u001fm\u001ehCCqka\u001ayո-F}[\ry6\u00111']+Azli\u0015~y[D\u0015[+EO3Xш]q6\u0014asE\u0018i\u0013j\u0013 %\u0004%\u0002WGk\u0005m\u0019\u0011vP\\ːШnb&Yӫ\u0002\u0003Ձd\u0000\u001bj2$\\p:\bd@FsFM`[\u00037\nGa\u0014:K+l6!ɒ9Eܲ\u0000~0\f\u0017ؐ\u0016\u0010wf_q\t6\u000fBCwz\rt3]r{;\u0017KvìxiX\u0016N̊e0+^\u001a4o\u000bֺ{`J\t%\u001a5\u0000]P|u})5{mm]\u0016ȶ@^\u0015Qٖ|\bv\u001aqR>j8Eʯrlmp\u000bnd@FOqǟ\\6:\u001e\u0012+Y-qZǵ\u0016\u0007'\u0004\u0012\u001aPc\u0001&\u00078\f\u0003eq\n\u00123?Ň\u001dة(2-Ķ[s$yIvj(tQ[AN\u000bZIx\u001b\rR΁\u0016?)j:pάvwmɨ\u00030a~[ѷm]\u0007+܋J3\u001fjg5G7\u0013m,Ym/YҰ,^\u0015/=aV4LiN往\u0002{'l\u001f_\u0011]W_te]\t}Cl\u0013[\u0004${d6'\u0001r\u0016\u0000\u0014(2f\u001cKF[Mel\u001d^ѽ-ںxmHh\u0019\u001eR\u001cZ\u0002\u0014Z\u0016Z\u0011\u001f\u0018\u0010\u0010\u0000\u0018lJlOh\u0003;:\u0001mE<۶.Sm;\u00174`wX0NEmF\tuW)h'iN\b\u0002ZDcڴ%{\u000fKzo\u0015d+\u0004dj~[5*~\u0011f&#3Umϗm\u0017W/\u001a\u0001B,\u000el=[\rY/\u000b?Fo7̊eĬxY\u0016\u000eaJ\u0001Z\u001fi\u001cpׄ\rEka \u0019NZ\bWlT1\u0007g6uȶ.Ķy\u0000L4m\r^\r,\f8\u001aͶҐdu9EJ\"y-`[uvﺡS^Ӵ\u0005߫mL<Ըx@m\t-%qm7%\u0006\u0016^3x[W\u0018T\u000fMK\f]tuBhJB\u0010@ns\"tr&Jhl{6\u0010\u0017V6\u001e\n\"j<V\u0000g\u000b=.H\u001e9\"\\q\u0014\u000e\u0003Ͷ~Aɇ&q씇\u001br-nѽ@jpƵ\u0013FX\u001b$rK[\u0012m*\\iJHK\u000bgI?\u0003.\u001e^RtKs~f6togrbn\u0015/\rՉYҳ,^\u001dfKÔ\u0006,\u0017\u001em\u001eiC׌\u0019dM}9\\яhxl8\u0005\u0002V-[D2^祌?jiq6mŶM\u001btuݤ6C\u0007-juV\u0002is\u001djۚ\u0012ښ\u0013&$ӵmvY=B󺇗q\t\t\u0013B7$#MK\bM\rȽ\u001d\u0005NZ&¬\u0014[ˊ\u00106٬L {T֭jэbݪVe*Dl\\\u0019\n\u0010\f}[+m\n'ʷ)$,E_\u00152Jx~&YiZqR*\u00152Yv\u0000϶\u0015\u0017-\u001eZ\u000e\u001c\u001d\u001b\u0011^\u0017~n\u0015/\rՉYҳ,^\u001dfKÔ\u0007'\r\u000fw\u0016oi,yh٨Wח\u001a[y>qcӁ\u001a-\u0000[\u0015ۺ\u0011QlN&YRġR42ނfbߖXmsL:1,d\\\u001a][\u001f\u0018\u000fvrb\u001e=Kzchq\u0003Bs{5'K\b%tKm\u001b\u0019V\u0011Z\u001aR\u00182$:\u00126޶%j\u001a_/ٵO\u001fyU_D';Tx\b$\u001aoۡZ%\"9\u001aOd2E\u0012\u001a\u0003ۏ\";m}\n\u001e\u0006\u00051\u0007m)`[ m\u0006/\u001c\nwy\rov\u00019\u0017MvìxiX\u0016N̊e0+^\u001a4/Ĕ&lo.P\u0004-h\\چ\u0018纺?}ug2nu+V&Yo+-Ĵ\u0015ǧY\u001cܨ6\u0003YnѺ-\u0014ۢqR\u0016-\u0000ۦ\tm\u0013\u0013\u0012K{\u0004W\b\tGpe\u0005=`81>ؘ\u0010ݸpSc\u0013!\u0016ŵ\fk\u0019\u001eZ\u0005l^\u0012Bχs;\u000f~w\u000f&ҪUuA'$ˊIY>҄+d2V\u0005\u001dN\"Zd̶Y~Sg`[EÜ\u0007Y\u0019n\u0004[M.ζ\u0017IvìxiX\u0016N̊e0+^\u001at`JѾ)%&\u0014oi*YPv\\1M#i;m\u001b\u001al|vִb[lz(\u001b\u000fI\u00131\nx+BQ\u001cd\u0000mH^ҭ=0bF\u0014E\u0010:\u0011vѮ\u0019\\#Ghs\u001eu=Cz\b)R\tpfrCB.[\u0002\u0017\fߣ0e\u0010b\u0011q熨4\u0010A\u0010lNk$bݳ\u000e*~[\rj*\"N\u0015V\u0013S_ͪ,\u0007X+إV%{o; \u001bN!yLo+g1ʗVz\rX4<{|\\[stp\u001bfKòxubV,WY0'XdcCɺ\re\u001b6o\u0018_mrkn3wN~nγ-PO^qE\u001c\u0015\u0019/ jY6[\u0015h\u0018\u000b6\u001b`\bn\u0011Zex+FRs\u0001l$M\f\u00153gxW\u001dC[{6\n\u001eZ=Wx^Ѝ]w$\u0006\u001a|^{!\u0006cɣZQ,Y{N+#VE]\u0003Cȡ`0;\u001ao?\u0015\\*l\u0014mxR;k.ش5D\u0015\u0005k\u0015\u0019ci\u0016YT\u0012NLoٶvPm3\u0017\u000fO^0zo\u000eV8QJw3gۋ%~aV4,W'fKϲxu\u0015/\rS7t72mW)\\S_luCM\u0013Fv\r\ro=W??oF'ml\\umYRԹ,4pe\u001f$kh^\u0012rMإ%֭A֭\u0013\u0013ڦ&\u0006I\fL\fn\u00153h>z\u001e\u0011#G\b0\u001e]CwAU/\u000b.\u0015\\+gm\tq#Z+:\u0003\u0003+?A-kU_-v\r3:ZZ4V\r/Ds\u0002N\u001a}(u\u00173<KXI\u0014\u0019\bWĆhh,\u0015p3[l,)/nj\u001d6k|2c\u0000Vg.-Ny`mV|\u0000\u0016|\u00120+^\u001aū\u0013gY:̊)TdC\u00132mK\u001e|}S։U^3k>ﳯŶ@\u0001;$\\̲ܺJ('$K\"\u0004J\u000f\u001d2\tpZ-tĶ.*za\u0014<*V\u001c'69!8-14=1\u0010i\u000ft\u000b?-d'u\u000b?-[xW!\u001bz\u0005\n\u0015\\+Wpa\u001emÉR\u0015qȊG\u001c\u0006[\u0002DiR$;0M\u0016@`c\rIZ[D\u0015'*CAn%=l\u0017`CD±\u00159W0|Cǝ&m4z\u000bl~+n\u001c6xYy⢔E\u0002 X28^\u0017~n\u0015/\rՉYҳ,^\u001dfKÔvO(ThM}qkK5T<<rĪf?>\u0003͝\u0007l\u0011z\u0010*fI\u0004b\\Z`(¶6vaCȹ>\u0003\u0000a6w.\u0018l~[U˭\u0010\u0018.1tC\"ǻ\u000fu<5rkH\u0000r]\u0007\u0003\u001ezGhG\u0010\u0000MzB]ҳ<.\u0000VǷVIpJh~*Y\u0001x\n{7\u0015^\u001fb\u0017y6\u001fi\u0010f\u0017_y\u0010?gĶ(\u0017 䗜\\[ᅛp%Ե74(VGsm{JTf[V߷Slk>V\u0015/탅y\u0003-w{\u0018o/\u000b?Fo7̊eĬxY\u0016\u000eaJ;K65\u0003l;xRhڎ\u001fbc\u001ev̑;&=;-\u000fܡo떳-n\u001d<G\u0015JV1dbe~4i(Z-y\b\u0016bօnU\u0003\nN\u0012\u0018)1t_E\u001aykO]@\u0016Gb]ρcBz\n\u0015~YpcO8{jy2¶5q\u0002۪RHvjSvo+`o\u001a.W\u001a[;5б o-\u001a)ejrO\u001f\tVrn%Ӿ`zl;'\u0003Hz\u0010K\u0006Iy\tzzOlޜ\u0015y+3\u0015,\u0019\u0015-j\u0017KvìxiX\u0016N̊e0+^\u001au|\u0011\n$m({\f\u001dSF^?3s?;Wqd,~\u0011Rfީ''RQh\u0012lY\u001bvrhH\u0013o\u0015flk\u0011}[X2Vhv\u000f.2rf]\"J31+e]!\u0002\u001d\u0019~gG{\u0006w\b>#\u0017dۦpTU\\v:֎|m¹IP.pn\\ϟ\u0000BV\u0015֏Z\u0007*:|&\\ړu\u001b\u0015SL&\u001b\u0011ekTƌ;9WJ9H\nׁv\u0000ozXL?\u0003*\b.\u0019X8vo\u001emolgI]$\raY:1+^zūìxiҖ%\u001bJ\u0000iǏ2z=}Κoxq-o>tgd]붃\u0006zc+tp8n\b_W|52 $$jm\b%tk=]³D\u001aY5[d\u0005UHdYR]Ç{\u0006Sʏu\rm\u0016\\#8\u0019-\u001d\u0017:\u001a-nG|Bإ\u0015c\tT=N\u0013\\̿1\u001fr]\u0000۟ߜ8mE|f9N[?zE`9\bf}4ҦU邁{\u001edYRmo\u000bV\tŶc\u0010ۮ\u00184mp'`Yy;=:^4\raY:1+^zūìxiFdڮ\u001eWl}c\t'WCvgӟ?㥥\u000bmu\u000bJTG\u0001i\tjFN.Օ1H\u0002amz#6Ʌ\u001d;LCwt\r\u00035\u00002ĳ+(]\u0005K_<ǮgJ\f\u001fL\f\u0012#8%9>6nd1V\u0006Dؙ\u0010GE\u0019^(؊5\u0013z`\u000bF\tlEn\u00056zz`Z)U\"\u0013h,.\u0005mm5m\u0007W\u0015/ZY\f}NNvbn\u0015/\rՉYҳ,^\u001dfKÔ\u001en,\u0005T\u001ej=4mv^=k<}Ŀ̺3^\\|˫o{gݽ\u0014zl\\lj,uQ)\"\u0015q\t\u001av&\u0011Z}M@IQ,Y\u0006LAi-PxeН]v\u0000]}ۮ2\u0016k\u0005\n'Kȳ\t\u0013O$L\bHl;>!uL\f)j\u00150*\u0015?R\b,|m\u0017ΟOhصrmF\u0016\u0011s܊ZbpA'\u000b9\u000fغ\u000fI`L퐊꼒W.-r.*-Cl$~aV4,W'fKϲxu\u0015/\rSZ\u0000ض|-Sa|5}ں'nj}\u001b_Yv\u001b|g\u000bm=ĺ~!V[[M\u0002H v}9hue2'\u0015\u0011.n\u0015l\u0018Y5<[d\u001e`n%ȷ]\u0002\u0015v1ȿ#<\u0013\u001f918=!8\rmK\tlj\u000bZY\u000eYb%NN*\\l{7ͶQ?$`K=\u0014w\u0010+ǷlɛpqRCbɢ:\u000b9\u0002z\fm\u0003%\u0015\u0015%J\u000fB5ߓkí\u0007x{_1\"~aV4,W'fKϲxu\u0015/\rSZX\u0006Ta|ŖIU;z|n绯ݓ>ok+n{ͽGUl\u000e o5\u000f&tliyl;}\b+\u0011 ]\u0012\u001aHꍬ$aj˭:fmȆ. .Fn\u0015\"+Q4m\u0001.\u001a~kx^쮡;@>18-mbSķ\u0006\u0004n\u0015m\u0005JMbiJ-І_\u001b}b[i\u0014\u00125H\"\\a\u0017Z\u0007>\u0011JoAh\u000eX\u001fR)XŹRF\u0011lijIF\u0016Oh&ۺPV\u000b./v.\u001e?zo\u001eb[IX\u001bfKòxubV,WY0u\u001aiy)5{\u001bspfӑ'u5-\u0007o:n{\u001bSF]gfIy\u0002\u001dJ\r(9(Y\tj|.\u0013]Kbdm\u0015\u001b%)1@ȃ\"KEu\u0013\u0016h9aۥ\u0017t\r\u0012k.\bNN\u0000\"i\u001eGVM`\u00149+IF\u0015\u0005%\"\u0006:\u000f?\u0011l1\nHKr]\u001f%Ү\u001f\u0015yG)miǒщ slN,\u0019v\u000em+CW./q.)r,@l{W\u0007%uo7̊eĬxY\u0016\u000eaJWm;mL9m3\u001eyז{^\u0006ǵ~[-uM֭\u0006\nQdoKŒt\u0016Ci[:0\f\u0011\u0012uW-\tȺ\u0006G%/\u0013\t\u0017-\u0012Ķw\r\u0007ض\u000bbۄ]3u}2z\u0013\u0001c6)4RC\rAdTCrx)\u0005\bxFU_Z!l\u0014\u0001!R`+{Gn\\/~\u000e\f\u001bUk\tb[+u2zE&k'[\bc[ھjUiˋ\u0000\u000e5\u0001;.YҰ,^\u0015/=aV4L\tGl8rG\u001ds#wLz\u0016[__yk}w7WS2\u001e\tHa*R\u001afR«hLQ-\u001evD6\u0001\u0006B`+LKnǷfc~@]!.\u0011\t\u0017u.\u001b^5<[x6\u001cKhV%a\u0005*H\n-؀p\u0014YʇL[am\u0018c&\u0001fѴM\u0011\\ϒI\u0000Vf*Jљd\u0003\u0019RCVC\t7o+[ZɱC*\u001f}[Y\u001ar|k{l4V䗌p\u0017H[QP|^\u001d\u001e^$\raY:1+^zūìxi#64WnX1O\u001f{?=s^]~ۛ9n\u001b`*9U-`v#ZTDY\u000boETQQZ6Y,\u0019{s´dll8)\tylȟ\u0012#$F$\u0002B-\u0016^-|_%0ll.?Sw`\u001ab\u0014\u0012'\u0016]Waݭb2YB&$ȏs\u000bR)_6rO~\"j[q\u0001\u0000%}>\u001arU6'YuY.\u0006\n$nBxrl}o$LI~1\u0017\tYGy5hՁ\u0015\u000b\u000b\r47gI],\raY:1+^zūìxi҆\u0010lwNsmGc/-;kg~\u0007m7Y6C2p\tϚ[j U\bYmxm\u000f\u0010C\u0001En=r\u0002?yd{BdG\u0002<nKlM\r(\u000fʛlqM9@6tD\u001an\u0007\u0002p\u001a@*$uZ*\u0010`\u0016c2vh=\u000e̶\u001a;4\u0001E\t$vVmu}no\u001a\u0012\u0006\u0016\u0012̈́VU\u0001\u0014Tx\n˲\u0007,I^V9o\\]\u001eIH\u001bfKòxubV,WY0u\u0015*7M7cܓ47\u000bnzumo=t;kga·\u001b|yO$+[iĳD\u0006\u0000HٵQW$َ\u001c[\u0015lCIA\u0004$\\l)b\tc^\u00150\u0003yEC2\u001cm\u0003\u0002Z\u0003ć- 4Jv\nreKNmVDZ\u001cl\u000ej\u0013؁kUdi\bxE\u001d\u0014ۢrX2\u0019X|\b\u0017\"h\räz?2mo\u0007\u0014pX\u0016\u000fto/mK\u0007(M^Q\\R\\0\u0006G%sX\u001bfKòxubV,WY0mkv^=zQ{\u001b̦?9oxap\u000f\f$#4gd[D\u0001bz4HͶ&nS\nr5\t&;l\u0001VWܪv\u0000\u0013hy1/O`)c[\u000fbہKj\u000bHm؊E\"ã\n\u001e.u*K-bc\u0013_@㭗P[Z:6m}\u0017TMj\nQ'\fuEX\u0017m}Wv3ؽ\u0005l\u001b\u0000Քǒ;8\\5heY2>\u0000[nMwy\r\u001f#\u001bfKòb:vM}q\u0007g6>uħo;<;-͇z{ﮟ9\u001fnі\u0017IvS`+\u000eʕ\\\u0006\u0018E\u0010,\u0012 QR\u0014R\b>\u0013ǒ@2Bʍī\u0015\u000b\u0014\b\nVbtȶ\u0001ɥ%k\u0004<Y1\\ XSĠ\u0004K,\u001d\u001e3/8LC.ZsTDYζҺ[\u0019:Lzb\u001f*\u001bo的듷ߪ\\iZ:݁o+\"E2~\u0002i\u0003UQβXm˲\u0006*O^^\nI=06\u0017\u001a/\u000b\u000b5;\u001a,WY0Ǯ\u001bčO{}t@?\u0017[Y?}qGijmgm\u0000\u0004f@25NJZEAI@0Ƭe\u001aNX`݊l+sl4*nI\u0006l\u001bHR`k\\ȶVӁXi\u0001lfg0\u0013\u001dR\u000b\"YM\tm9de,\u0002Zq;\b$\u0007֭f8'[iN)Itl\u0005E?Nbl旎\u0015e\u000fYY4yYBǜ\u0002<%ǈYҰ,^\u0015/=aV4L\u0015n۬k1\u0017\u001fեVf\b\u001fmYR\u001e-\u0015\u0001iFiM>\u00044ȸ)\nch㭢\u0016|\u0002j\u0005Qm\u000eMքx\u001dpqj8\u001b9\n\u0016h3\\1\u0013_Un%\u0013nX7Zj\u000f&\td2med;okɚLtO͹*V;Lz;Az9R|d,\fe\u0002ڨd\r\u0010pZMr\u0005o\u000bvXYΐ\u0003^ۖ$/\u001a?roE\u00120+^\u001aū\u0013gY:̊)sͯ>4͇\u0017|m[kf7W\u0001wڮކ9o<t\u0017Ї\u001eS۞ߜdIn{{lK֨E9QZm\"Ued\u0013l\u00064-\u001fغU\u0016Ҵ\u0014HvYy\u0016\u00133mE'\u0017\u000eIN{dm4h\u000e/\u001d<Ox@IfW4\u000f%E\n6{U0tl[Y2nRW\t\u0016Lt&gme\u001d-01۬Ccn~[\u001a|\u0016\u0010;c\u0011V -\u00190pEYʲE9^$\raY:1+^zūìxiҋ~~\r/.߾GVy>i;M0w\u000f\"bs!\n\u001a<Ԉ%\u001at馤\fSR9I=-Y=\u001b-9\u001a\u0003f[\u0003d[<$N.ф֦\t\u001cܱMU\u0002oұ\u0016M>)xV\u000exVCv;pl\t+gVw&L<ɲz$'\u0017z\u0018l+~.P\u000e鷕u¹X\u0018o\u0001\u0007NHY\u0003W\u0002-\u0005l|`mv钿cDvìxiX\u0016N̊e0+^\u001a;zx[\u000fҢ__qG;~g>\u001fnіyǶ{ͽo[N3vٶ#VIi1\u001924SR6b[em\u0007B\u0010cν*u-`[HlE<+-d\fGTw\u00166.[eU1\u0003GPTT!rl(6Ғ^]V\u0004mx|<2unRCv\u0007ܷZeۗp\bY08)<\u0018eѾ'2QJ\u001a-e哅f[ۊ%-Ⱥ\\aut\u001dma育\u0011ms\u0014g\u000bl$\u0019}\u0003͗\u001f#\u001bfKòxubV,WY0L7aۗu\u000fs?>ݽ\u0018b[(ٶ;ڷn*+->{li\u0015cQ}[7TSSߏnE?!l/z7a[~[)l5Xtp\u0014jocv\u001alɐL'M\u0001\t*K\u001aTO.Bd9\u000b->dI{r+O\u0014Z'h'ȍ5atUDe\u0005\u0001d\u001d4bŭ\u001ax5!k.ͭ*uQ~+@Z\u0001K-z@b܍JOju}[<KJnQ\u001d`ø}\u001dض754kЪ\u0014r\\X\bؖ\u0017IvìxiX\u0016N̊e0+^\u001ay{//w~kt\u000f7=s\u000e߾5\u001fo\u0018zI[7%\u0001@-\u0000\\`Unݪn$%\nmLC_z:&ÐUF\u000fa[\u0005-m\u0005^Itl1!\u000ep\u00044f#K\u000eDr%\u0013f[ҷKp\"\u0003XY+~l*]R[4\u001eYZʷuH<>z\u0013\u0013\u0019F/f[9\n+h-\rB\u000fңYrk[\fL\u0016&J/\u0012\u0016!8*9$[1=|%ఴێ/\u001b\u001b\u000eض${\u0015e\u0010o\u001f\u001cocDvìxiX\u0016N̊e0+^\u001a/-%wz\u000fmMl[\u00076C\fom1\u0003N!\u0014pE\u0003d-\u0011$,jV_\u001cH\u0016\u0016,r9i+%\u0019mx(\nf|Bsh۵(g=\u0006@\f\u0012\\ux]\\\u0002(fKJiN&Gk-Er0[uܦ$\\}@әdɽ\u0015\u0017ݢAm_Mh\rPo;t(8Kjx\u0010\rޕ)K\u000f\u000es\u001b3\u0017IvìxiX\u0016N̊e0+^\u001aE\u001eYʻ\\u;kfWulײlߞ\u001fm-\u001dXl낎2zԈ)ɆJI֭\u0013x(T:\u0007ė4&5\u0007!\u0015B\"\nUQᯬ\u0013m\u001dBKYb,\u0019mh\u0011\u0016\\n*--HŲk墋\u0017թ!KJ2u<\u0000^3k\u0012\u001c\u001c*f,M]&,mCȴo+B\u0019-'\\:\u0013ܨ\u0015Vx&^cu\u001ee2YOmu~\u0000HnI>\u0019\u0002EKoMms|ZI@mi֠eKS\u0014;\u0017\fE\u00120+^\u001aū\u0013gY:̊)\u001b\u0017|qh?9,%w\u001e\u001eޕo\u000ffIem\u0015Jf&\u0007@эZuVV@\u0019ɢ>ldQ:Fl\u0002pnRS~[I\u000eP\u0000aXr*\"T[\u0000lZK;\u000b>\u00065&$Yd5\nR\u0019*e\u001a\u0004Zѫ2BӥTOq\"VӴǒi\to-rVto[$W\u0018l\u0003\\\u0015Hڤ5@>̷\u0005l\u000b\u0014pX\u0016mA-\u001fG\u0001J\u0006*K[^عp㒿cDvìxiX\u0016N̊e0+^\u001aѮv8~];͕w7\u001fus>\u0006wk~e>$\u0016kd2e\u001a[2TJ˥\u0011O69Mt\u0014PJO\u0003lo\u000bPflqH㤰hv\u0010o+nS(\u0015v\fprr0rȶhyca;ԩfz2@v\u000fJZq+kM\n\\9HJ̍y%d!-\u0001kf_kz\u0011oq-rfiV\u001a*$cMOgxz%\u000el[/\u0002l[5\brrĹE\u00120+^\u001aū\u0013gY:̊)z[kpc;}mG;|s駻{\u0019O\u001eY^Yzu~jfxn-n\rrV \u000b`bR\u0006SCͳR\rqev~9/\"\rF+\b+̒\u0012\\W{8-9Upl+ŏ킁fi\u0000,xD\\,l4Ӭꓳj4oWU7ʐY \\Wk3>WH:B˻\u001c[a5,Br\u0001\u0010=آwG$TK\u0016ZU-V),4ڌ$,QͶ\u0019I}\u0010ޚ&,<\u0006E.\u0016hEiJ4-yYq%ǈYҰ,^\u0015/=aV4LUߺ^q~\u0007?\u000f7\u0003o?tom\u001f\u0013ۺ$Qk'`\\8kƎ[1l)E\u000fШ\u0005X\u0005VbnE2*HZ\u0000ρm-8\u0018DͶNiH2L&\u000e I\u0016<gؙ\r\b\u0000\u000b\u0016bl]4\u0012BFW\nH\u0019uc)L'BX\u0003l.\u001a$E\u0007\u0005L%d\u001dX\u000f\u0014zi \u0011`EW\u001c\u000bvr\t*L[m}V\u0019jtlkUoͶ^\u001d(l3A%\u000b\u0005$\u0014l}l\u001cĶ\rE!We\u000f)\u001e\u0002vEYʲdK\u0011\raY:1+^zūìxiƊ#ӷVg~mɇۗzoﯟ{^u;9y'\u0017_0ۺlk\u001fP)ζrVA\bi\u0007\u0014WM%'\\N[jC\u0010\f\u0016(\u0000Ii,f=L2FWĳB-BZ\u0014EF6nI\u000e\bd;\\37D1\tjVj\u001eʯf[¹)oKoEL[p\tOzuS\u0013Z\u0017q/?\u0013\u001f{&=\"\u0000V8m\u0016mdUIQmsb-\u0019'%Va&ۦk3lT\\3B̶\u0006rےܷX\u001bfKòxubV,WY0\r\u0015Fo\u0000xsTQgұK?\u0001ulǒ/ymƻ\u000e Y\u0014&\u000b$\nݡR2qӜ4\u000fLT%~\u0016fHZ^]MMBl\u0002l\u000bSfa\u000f;\u001cB\u0016[4\t^d\fi\u0018c\t4r oJL4;\"d`d/n YZeal2\u001c\u0012y>;XE\t'lHx\u0012hs{>\u000b\u0007\b&>P+\u000f\u0001=\u0012. \\M\t)/^%KlK>xbInmӓ\nlʞu\u0003+rG@\u0016I.\u001d0hEi򒔥)\u001f#\u001bfKòxubV,WY0\ri\u001bFoV:\u0003\u0001f=:&qƺ5\u000f4y\u000eYRm=vm%֭s֭FFYVCiƣr\u0006\u0000~jd\u0011em±\u001d\u0013Ti0\u0016-mql`a&\u0019b\u001dٵp\u0019FvmP\u0000a\u0011lE\r /V~m?aa\u0015Nm\u0015?&/\t\u0012\u0003;\u0006>Xem\u001fj#]vˇz\u0000r\u0010e\u0013=^:\u0005@@O\u001d}/*euڊ{\fRm\u001e.\fm\t\u001a(\t\u0006.Y\n l\u000b$Uk\u0007+\f/\u0019RvE\u0019]Z/\u0018\u00110+^\u001aū\u0013gY:̊)mH\u0004ض\nmQ;G\r]gLΞ.\u001b=\u0007=~\u001aۺ9\u0002j\u0011\u001f!C4lQGFm^\u0005\u0014z\n j6[2K+R-2H\u000e,\u000e\u0012[\u0000N\u000b _VT[\u001e6j!d7_\u0004T{Ē\u0005%GamE3c\u001c͓U9\u001dJ\u000fWvh%\u00196\f@Gw\u000b Y^=C=_=,\u0003=}+@\u0007{t' \u0017W\u001f~(\u0011l9\u001eV=EJz;A\u001ey,Y\u0012l9\u0017\u0018ޚ-ͶF4\"-\u001b\u0001v(`\u00124NjyI\n%uo7̊eĬxY\u0016\u000eaJ\u001bFmLT:}{M]\u001e~dLzc\\O4\u0002iOwmݚd\u0002iMiVӷ\u0005\u0001Z6c?\u0006[\u0005\u0002\u0015c\u001e2!rl=\blo\n6/\u0011\u001d[j- \u001crHh\u0014\u001c\u0010Y\u0006(\u00037@ے\\\tlѹUs+OD:\u0012?赛dر\u0013\",\u0006OB}^>'{t׎\\ӗ~׶\u0016g[[ns\u0017\"ܞ/\u0003C\tO\u001e?*)@2>d[6\u001b-5''%CVO¾mgx<\u0007*K]QE\u00120+^\u001aū\u0013gY:̊)=\\qdږ[u6kw-`۬Gi\u000bt`g\u0013`[mϳVm1vbVc-F\u0000\u001ac5\u0000e\u0001\u0018!l[a\u000f\u0018%<\\ڥ\u0015&'ezokp!id/\u0005hlz~[;\u001cCǱdj0<,A.e\b\u0002\"(WthUï_a;yf(}e;ql\u0011> ymF\u0010>c{^{7\\3__\u001e?;~}$z<;aߎǀ\u000ezm{¾ǻ\r@.\u0003=_\\x+\u0003Z:m/n\u0011\u000b{,ze\u001fU/d\u001d@j=ʞ7\r\u00159C\u0001ۖ\fy,u%n/\u000b?Fo7̊eĬxY\u0016\u000eaJ\u001b*,۪2dn\u001f5`Wmُ<6x{xBY1jF:\u0001(\u000fZHX\u0012\u0002\u0018`0+[\u0012\u0015Ոd+MJd\u001f`\"'OQ\u0018Œ\u0016!L$ظ\u000eLͶP\u0014İ)?K\u0013\u001cVM )'Ǣ6C\rAQ\\5F$Q\n!\u0013?\u0017,%G\\#\u001f?[w{\u0013D:X!p/?\u001f{Ǳ.ф\u0013\u001eߑǀ\u000ez`pmV&٦:!>ۢe\u0011ÒX@ط\u0005ۡo\u000b&5T啎\fp\r\u0005*\u001e29/w\u0015d[^$\raY:1+^zūìxi\u0012$m:mG\u0003zdL:c]m\u000f\u0000m\u001el\u0016mSFe[e )s6\u001fď\u0001T`[Ymĺ|[jfA~TB\u0013\u0000ȀM[\u0017$KmNY&\u0019>Il+4XN|[\t4bnYQİ\u0019f}I\u0007EVSc+صџ\tؒ\u000e\\i-.\t_Gv]sO=U|~k}<z?wO%\u001e~\u0007GzmW]\t'/{e/Ŀ&9z\u001aYM\u0016-$\u001b~[4\u0018'ʪl+d[oV5:P>[T*-h\u0012cDvìxiX\u0016N̊e0+^\u001a\u0012-m3vfu9{f\r\u0003\r\boYRķ1id]L[ɜoK}\"\u0014+4jb\\s0jZ\u0000\u0015ٱuI`(=\u001d[2BJ\u0012H$\u0003E62,BYRa]+D?\u000bOȴd&O{(\b-\u0002,,.՘\u0004b蟢s*jڥz-N\u0015\u0016F\u0011bE)eoo{\u001fw^'O,\u001dǶ\u0013\u001fN|h9ć\u0013;7~Ջ:|co=\t\u0007v&\u001fCpC~+_D\t\u000b\u0013dl{\t%\f+Ē}2l%\u0005IL\\\u0003WZ.ędU0z_1\"~aV4,W'fKϲxu\u0015/\rS8\u0002IZ:s{M掚\u0001~.Ѻ\u001b<pT0$N&ۺhf\u0016fX5zum\u0001ͥ[n!آ9aƛZM\t>!%\u0005֭\u0012\\\u0015\u0002\u0016\u00004\u001bų|ld{jT2b[lȘ=\u000eSŀ\r _Ū4᪍]%\u0011>F1NAۿ]q\u001f??\u0015|׮\u0017i\u001apӟe:~\u001f|il'?4\u0003_q\u0017˿ф\u0003[G~_z/otRYm\u0010`\u0011&\b)ʴY;5Kjf\r*j\u0002\u0015m+\\C]mKVr\"n\u0015/\rՉYҳ,^\u001dfKÔ\u0000n\u0014\u0002;F\r9:s\u0017^\u00004XzρF'\tۂ{¶\u001dlDZmMa[*2I-n-~rıdЭINQj\tm\u0005̒(f#s|\u0011\\M\n4aT@Uv%E\\i\u0013n\u001a\u001cfOAGV\u0001.$7\u001a,Ά\u001e#`g\u0006\u0019\t\n\u0015\u0012\u000bW~\u001fr7_\u001e\u0017駾>ǯg\u0000ru곜Sg4Nf/ݷ\u0012\u000eGk\r]\u000e΋pUJ֪\u00173Tk-&Ya\u000f@%oŶ\\;iĄ\u0011\nW!%C-|4}U\u0019m/YҰ,^\u0015/=aV4LiSeƖ\u0019[rp-l}8P#`[\u0013}OMiOlaj -ͶQ~jZr^En֪\"\\*m3P;4bɸ\u0016)f<ao+JioK{\u0016/*9\u0017R-\u0015]V;\u0011R4*/RidaP]\\\u0006$8/>;}zϷ/v\r\nendstream\rendobj\r25 0 obj\r<</Length 65536>>stream\r\n~낳_*pD\u0013C[/lSq#w~w\u001cJ|@^~\u000f~_ǟϷ߶-Ut\u0000.I[QH \\\u001eHIPenJQ#+%m]+x&n\u0015/\rՉYҳ,^\u001dfKÔ6ARi[k\u0010Vgx\u000b>V~s\u0000mP[,I2HJ;\u0019\u0015GzBE\u0013\u0001\u0016\u000b[i\u000f\u001ay$\u000eIV/Q \u0002\u0003\u001d[\u000fhN[m\u0001\u000267*\rJ+M\u001e:Eo\u00175\u000etx0_-ҎW\u0014 P텓\u0015\u0017K\bWl\rDk>{}w\u001f;?(\u00000{!g\u001d\u0003:nh\u0004H\u000frrH˗3G\u0013o#:x/zϗ̯|W(w\u001c\u0019\u0017ύ:0YLEc,Z\u0005C.\u0005>LӧVM-U!-\u0019:,풿cDvìxiX\u0016N̊e0+^\u001aqD\fv\u0007o蘜u}\rMC}ONPm폓4ފcc[S̶\u000e8\u0001T\u001cf\u0005+u\u001aUJ#{\u0012ޢYR\u0014k^4\u0012Y,Ɋہi\u000e\fm1dtnZ`8\u0005Y)d\fJ\u0001G\u0007e8\u0007e8l\u0001^\n0\u0019|\u001dk>8I&\u0005V\u0005~?\u0019\u0015c\u0015h|\u000eg\u000f)\u0003D\f\\޾u,Ou'O=wA-\u000f;w܉g\u001e/\u001c7~jl\u0014\u001c\r-@'\u0007|\u0006?|b?^\u001esy篿yOuo l/죎j{]Vm=$\u0000%8z|p\u0011m'}\u0019uMZ7xTl\u0018-\u0000۲!9CV~ۋ%~aV4,W'fKϲxu\u0015/\rSX\t\rV\u0006fwS\u0007ֽo\u001cbFfSo\u0012m;m5m;e\"\u001cDӀm\u0001}о!-n\u0005ثi+%վu+m\u0001-uSt;fC\u001cL!ͤs\u0004\u0012?\u0001T¶\u001d@\"킋V@\u0005D8ZEP^knEX\u0013}鏦+;\u0007Ho'RSæƣ/?s\\3ŭ\u0017;UrԈ}=_zkj;nl\u0005:1KsN\u001dOS\u001f_\u0015<\u000f?\\&''okg?$\u0003\bC\u0002\u0019~kFM/\u001c3_^)\u0019)¾miЕm/YҰ,^\u0015/=aV4Lic%mToGv\u001d@{\\{\\09}9No\u0012Z\u0015~:˶(d\u0017$\u0003*\u0011LhPR\u0000\u0000HDZZ[;L2:R>D[75Q\fL\u000fLnln-\u001f\bm^b\u0016?! M(r\rM@ik\u0010\u0018Z@V4uJ \u0000\u0014\n{uh\u001ar\u0015]~ڨu\u0018eKmI-\\#㷟\u001aO|a:ٚ孧+[Դ\u001eCi˷i?zJϗ޸WƋ=^w\u001bߙ/|g>>ӟ:~8~~_~Wm[y&9UYYV\u0000[s͐m:I~׎f|I\u0003`\u0011rp8N\nIh\u001bfKòxubV,WY0M#L\u001d5Yo\u000bvOk_@P\u000ff?Ŷ}pmVͶ.ik㤢:Jsm\u0005`+A\\0Q\u00026lXIXH#k,5'YruqR\u0016\u0019z9d\u0001C3Rpm\rZ\u0003:.\u0005nDd\u0002)r\u0015\u0017\u0003IA4heԍ\u000bW\u00020F\f_\u00072\tئX\u000b\u0016c\r`\u0017)\u000fW{+\\䓟YN~i=ǓZ\u001agΎ\u000b\u000fj=EG{v7=_tw{\u0001ggU߾~\u0017/]q\u001fW|߾+\fI(IU\u00126\u0015\u0003}\u0007 \u001cC?\u0002:Ķγ=S\u001d}Uy\u0015(<\u0005\u0005ؖIh\u001bfKòxubV,WY0MGoV3`(Ķ9{`\u0006ρ\u0006Ͳ~\u0014YR\u001am]\n\u0007\u0002\u0012Fc[2N\nf-n\u001dm\nRm>;Y#-~hf[{km5@pHDaw\u0014KP`\u000b p@\n\u0007\u0007S\u0019f}_I\u0007}t)[^x\u000b}[:\f5BŒiM\u0011Vp\u000b :\u0003\rD\u0001r\u000e5I^\u0002X \\rT \u0015gWDM>ɦӅ_O}c\u0007g䶖``۔๦mߧ\u001aW'ZNd\f|?Đsu?۷W\u001c\u0015\u001fH;Ц\u000em}\u001dR6ˬ2ؖB>nS\u0007\tuZekO\u001a1:P9[<3\fm\u000bpEY%ǈYҰ,^\u0015/=aV4Li#\\\u0000*c{Mрma&y뱱n\u0000@\u0007\u0011>%չ9.,ҁ䎩M@Q\u0014|(2[xn7%~[#ZljL Iva6Yzd\u000fal$lTc~kL\"Xj#T\u000bH*\u000b'\u001enMIiR\nDy&̀}gpDMCNw Y\u001bx%\u0017fql(-m:ɔs?Nm;\u001el\u0014\nN\u000f\u0007o\f\u0007\t\u0007[*?zNrrjP᭰3ܷ9?NtՉW~ƕx!\u001aQmgl܎h\u0007P&\u0000X\u001e\u000b\u0000\u001d\u0002[]\u0001>zx'蘖tUZ+S]\u0005\u0007mm\u001fn.>f)5h\r\bO\b̶9\u000f\f\\\u0017~n\u0015/\rՉYҳ,^\u001dfKÔ6<2sK\u0015\\\u0000{TY1ֹѐd&\tNۊ`\u0012J\u0002fێZY,\u0019,bF\tl\u000e4N&Y)\u000es\u00039E\u0002Q}[\u001ahڊ9d<WJpr%xp\u001f\u001d<!âO7\\v#\u001egIYqM\u0004[-H|ۂTG:\u000bCrb2-7Ś\u000b~d\u0017R'y'\u001cѮ0\u0001嘒ĝ\u0001s]|l\t`\u0017\u0000\u00058gھO=w&lF[ˀ`pppphf$41\u001c\u001c\u0013j\n\u0007ϕl;3tU멒\u0013s_;߾>U߼u\u0017/]y<7S9\u0013|r\u0016:FxzڴEmCd7!Im_&Z|Bm\nV_pMFĶWW_=z\u0010\\\u0003\r3ɥ9\u001f#\u001bfKòxubV,WY0͕\u0019[FflsohmΞ:}\u0002\u0013OOwĶR׭\u0014)@Us2jKOm\u0018;cRq#\u0006\u0005:vo\u001d&\u0000ط\fR2V\u001a$\u001c\u0001\u0016ڄ?6cy'5_0vL!\f-dM\fv\u000e\u0016=3J\\#<v\u0003y\u001cB,9@\u0004PXSy\biW&\u0018&MH\u0006P\\\u001e\"%,Cih+\u0010&Y1\f\u001eݸ)6)3> \f^<ǨK\\ȶh\u0001m\u001fS%x5 \u0002o\u0000o \f:2Czˏ\u0019m\u0006\u0004[sB;\"YHxN$|g$|S$tm$8)\u0018jm\b\u000fXvܖO{~oߺW\u000b0p}Z㑽\u0012*cn.χ~/\u001fhx\u0006dd$m7M\u00186\r\u001dS+\u0015\u0016&.\u000b?Fo7̊eĬxY\u0016\u000eaJpHȌm\u0003Ug\u001c5`\u0017Zn8\u0017Z\u0000\u0004VINǳ:8,\u0004\u0011Be1/>.\u001f6q\t4sGqocKd \u0010y\u001cB'Z]GcдdpdQ!\u0016\u001bo7bؐ>\u0017tT՝v#oBTd]Z<-+b<(݁Zn(olǑ\u00001\u0014\u001315@[[Iӥ/B\u000fJO\u0005Ҡl6뼈g1#->\u0005Ho\u001a@R<9\u0019y\t1J0'[#Cg\u0007d\u0005\\'\u001cY\u0018,D\u0016E\"K#\u0005}0L,O\rM\bՇ3:/>\u000fzvﯤ96\to;Vk\u00142isȶE\u0011\u0017؇<_7\u0015\t\u0017g϶\u001bM\u001fsEpTmg%ǈYҰ,^\u0015/=aV4LiSe֪\f8$zQp\u0001\u0010`۽ܰ߶\u001e\u0017\u0004,)rۙ.ѺFm\r9J\u0007\u0006j\u0001lcScCQGWk2+\u001ae#k\u0013{?%a9Lm\u000fw\u0006oP<~<#\u0006\u0001\u0000ߖ\u0010.xI\fK\b밈d\u00162U\u001cn\u001f\u0018\u0000'\u0000x\u0007\n[i\u001d@ԉʖ\u001d6gd[@:-9\u0016W\u0013\u0000lKBZi-\u0006^K\u0015K-6\u0018e[e5'\u0018tBp8/\u001c\u000eD\"#HHHhZ53t.9xvrp\u001bCϷ/'\u0011\u0016\u0000aYV,\u0019ط\tx+c[\"UFlcL\u0012޿m77\u000fgܤkF]\\\\;\u0002m\u0017QvìxiX\u0016N̊e0+^\u001aidƖ-\u0019;j\u0006\u0012\u001dz\fxxI\u001d\u000e ,)rS\u0000lF\u0000\u001c\u0004xsteEmEY٠4L2EX2`\f}L}\u001f\u001fF\"\u00011O6C\u000e!\u0017eӜ[./\u0019UQZ7\u0006|k\u0003\u001f\u0003\\K)[;](ւ|[D^j\u000f:HG39,nZ\u0018\u0001\u0016 -\u000exᐮ\u0000tⓁv͊zl)E\n/\u0016\u0000(\u0016\"2qEXyl>lKH%[$M\u0018o!ۚ@I\\Hs1+}I^\u0007\u0010\nF0b[\u0004\u0005H#Ý\u001d\t\u0001ᖴS֓s_O\u000194;MyZ\u0005L&)zEV\u0019ZV\u0000[h\u0011b%k[7'lm\u0010/ᛚ^;j*+h\u0013PQ9 \\^,\raY:1+^zūìxi0\u0015Β\u0002l(\\n\u0017f\u001a<O4zo;DmS^ѿOJ>8HJ\u001a'A=*\r\u001e; //\u0011mTr;kt}>];\u00175\n`{o\b_\u0013<@Vɐ'[J\nrYnLq\u00141\"`x5/&c:,o\u0006.[8Iw&;bg \u0004[ȶv1s\bH\u00042o\u001a\u0015E&\n$\u0003\u0017]\u0012\"MFd \u0001`]J\u00162x.bݚDC\u0011.E\u001bx\rp&\u0012ùp>\u0002AH\u0011H0bPkj픭73%M<) *\u0019A.:baU\u000eBYvWUGĶ\u0016\u001d\n-\u0012d[\u0003Ŷ\u0010itm=fۤ\u0003\u0018u\u0002l;q׍>rjM`H_Y-m/YҰ,^\u0015/=aV4L\t.EQY0<ZX\u0000X\u0017\u0000ۃC#\u0013YRWf@߶=\u0015f.уJ\u0005\u001aQ>lHss&@E\u000b[\u0006W\u0002JOꝩ+$\u0001\u0000CŹ\u001e\u0003\u001f\u00030\u0015C\u0013t=7\u00122V\u0015.\u00009\u0017Q-%\u0001i\u0005Ov\b1fznu N/\u0013\u001d$C\u001dBhw\b|^%\nid{7U\f$Nd<QJ2draB㹌2KH ۍ\u0000j&Vxpm$\\`\b\u0017m[V%#x&{gNdt^iap\f8\u0001v\u0017Ƣ[Km|[!쓛 \u0012u\u001bu.$A'N*>~Ќ\u001bVM\u001b]PS+\u001b/\u0013ɞK\u0011\raY:1+^zūìxif\u0003(}{5YFg3&\u0007qx\u0007\u0010m\u000f5$+ң\u0002\u0003\u0010r4:mkK@ӶntMq~.Tk\u0017\u0016\u0003Qt-\u0016\"b27۬óP-b[\u0019ѻEE\f[Z;v(Ì\u001aS2Lm\t\t\u000f\u00013R\u001a\u0019&=\u000e\u0000봒>VP-\"\\!'V<\t]O\u0002\u0005;\u0004.!\\s27Q ظҌdk9\"e\u0011V<ba9d޷`ұdѺJG_\f<O5##\u0006\u0004yHp\u0013\u000e\u0006\u0004e\u0004Oz&FOI8\t\\{t\u0015X\u0018\u001da۵6J-X^D$lP[b$-Ŷ&\r6~uVuMк^8-[<S|_1\"~aV4,W'fKϲxu\u0015/\rS¦֚\u0001;jo;&\u0007-췭w?!\t~v\u0015B&\u0019o+\u0011$!ɂ6mjll\u001e?~TE/ي1vރ\u000b[\bh\u000e%te1ȶ8\u0003_\u0001ϙsf#K\u0002\"\u0011\n|;\u0004Њ@\u001a\u000fi (\u0006)̒\u0012H\u0018K&C>:\u00161/,}!\u001dEї9\bI\u001eB7/Ŧ!ËCΙB9͎aYFYe\fNoٖnd̹b\u0014\u0019ſ=v\u001ej4\u000b$[\b\u001a\u0000YG\"qXHxT\u0004&P`\u001e!`T\u0019/-8lk8:vx\u001d<pa\bc\u0010\u001brm\u0012\u0002\r0\u00151cUVmu\u001eC2n,m7O\u001ciuoV}]cQcU\b\tx\u0018%ǈYҰ,^\u0015/=aV4L\tm5;F\r9zu9p8q\u0003n8'\u0019\u000eI~+\u0016\f\u0003\b\n`\u00154c\u0012\u001cP?D\bx?\u0017^Pk\u0015\u0003L7ػWi@;>F{\u00135\u0006\u0011v3\u0014BkmEiSc\u0003fL\u001a/YT\u0016-î\u0014!vHd/\f'cDH+\u0002/G1,b\u0004\u00161f^\u0019PE]\u0017T\u001byQK/\u0004ہvAL^\u0013M.|kGLٖ\u0002OAX*\u0013N^\\a0\u00132>o\u0000\u0007\u0011\u0002x+o\u0012\u0007U\u001d@4\u0004ll;|[Ӡ\\=fzsĚܲ\u0011ޒ\u0011\u0010oy&\"n\u0015/\rՉYҳ,^\u001dfKÔT嶰6{GdL2d[\u0013MCMOO`[j\u0005I.o+\u0015ɓ6֏\u001b=lPf[@i7\u0001\bl!t}4\u0006\u0003\u001fJͧo\u0004\u0016\u0001V60\u000f.\u0006\u001f7ehl*G1Z\u0016\u0013ے?vj,%\tz\u001d\u0012z1b\u0015MJ\u0018ԣPR\u001d؊5KP|+>\u001f\u0016t2\u0019-`v\u0018еK\u000bXBj%\t\u0004P \u0019X6bEۇqD`\u0004MI\t\u000fD\u0007*'\u0017wzuEX|1mz \u0014E6\u001f\u0012WJ-[O'mL\u001aiΦkjfLZ_\r\u0016Y\u0010o/\u000b?Fo7̊eĬxY\u0016\u000eaJз\u001djΚݣ\u001f́sǺ\u0003L\u0004\u0000\u0014)L\u0000g\"\u001eV`[o!l[V,*,\u001d\\\u0010HOVk\u0001ҚxIÌu7ݷt\t,]B-D\u0013\u0017l;E\u0019>>J\u0005\u0005\u000b \\.p\u000bn%u&EHvMјn\u0005WAŎb&LɤL$oKҳ\u0016{w\u0002I\u001e:<':\u001eiș0nR&XCԐ_XE.d\b(\u0006@1[3Mz°\u0012\u001a\u000ed`RKyɾ!\t+07\u000b\u0018+!b؍,2\u0010le\u0016ݚ!ۆƠ,)\u000bP2\u0013\u0016$*\u0005[\u001f*)Bg7M!ROR-\u0006[B\u0018]\u00114EZ[\u0006]\n2g5C\u001aÌ\u0012lh\r\u001eض`l5`۴\u00176*m\tO?\u0005FQxux,^\u001dŊFQڅ\u0016\u0000Ģ业uYpv/Z\u0000\u0004ٶr~to\u001b\"b\u0016'Y\fb}[i[\u0000S\u001dʶ@|̩Z\u001d:ySg~Em'O<\r\u0002$gKٖUt0|\u0005\u001b7Z/\u001c\u0000Ɔ\u0006jq\u0000p\fإ\tjZVX\u0002N*CZgVh}h$\n/TE\bڵ\bB\u000e \u0011loK7\u0001\u0005\u0006t\u001aG\u0016Ҩ1&5^\u0019\\\rž-iK\u0016*O_\u001b\\w&;\u000fދomdj\u00128[8lɼ-`±yggO0+\tqm۟\u001agl{\u001f7\u0015/ūeKd(V4Үd6%bblMz\\mzl]&In67\u0017\u0000\u001d2-e0K*(iޖ5\u0005VI\u000evf[3F!,\u0002>\u0013#>\u0018>;>w_wƶ1\u0011A\u0018fGj\u0010j7PPu.(F\u001b\u0004Ps5\b_cjxWx\u001fk!\u0012ϷQ3k\u0019\u001c֊v\u0014Kovjdbࢗz\u0004:QO7ZLQ'o]&>\u0019m\\H\u0000˶e@\u0016ڐl qR6#uk\u0011Ն)\u0005\u001bCmL`-\f$?*ݺuNKG\n?\"~[\n,\u0006YPokrI5±5y&0=rS\u001c'$<=$\u0003w\u0011ǍbKdtY+Y:\u0015/kHihq\rYq\r٦9\u0005p@\u00141)ێT\u000f\u000b!T*K,I&T+c['\u0016舐!g&k\u0013#@w\u0003ztq37goXb1\"e~O\u0012z?T\u0001O?c6:h\u0018\u0004bp-<\u0000\u0018\u0004W(x\r\u000b5^c\u0011\nxCHx\u000b\u0016m\\(97\u00031-k\rɿ܍~;]\nF-\u001d,\u001e\"-rr5\f[S\u0018I\u000bž-\r\";\u0004$$Hm^\u0014\u001bC(آ8)!T%qRV\u0006u]Z\u0014]ۺ Y ΨVrG/\u0018\u001b5VINF%\u0015$˒mT\u0016O|>c\u000e`\u0016%%OHxfܷo\u001bŊFWxu\u0014+^\u001aEiW\b\u0012\u0003\u0016\u0019qYqm\u0001Z-\u0007'\u000fM$\u0003\u001e\u0007O^+\fb5\u001b<a=\n-\u000be7:-\u0000ۑZ\r_Ԃɫgmtw\u0016&\\p\u001f}^*\u000fFl6\u0012-˶\u000bW@o\bCb\u0011\u0004Ĺ\tF-]H\t\u000e:%\n\u0018u\u001a\fqWv\u001d[\u0007l)$rJbX&\\WLVD\bKre,.\u00182\ng0\u0014\u0012Q\u0004cg9.$\u0010lEdA}[\u001bZ܇L?5h֎贬Qfچv-u%e%߈_g;a\"Y\u0016r\u0005Qɢo+nEöȷ\u001d@fWɿpuAYf0iR\u001d&؞}\u0013(V4J\u0016N\u0015/ūX(J~ۊʴꌸ̸=ms{\u0007lڏYR\u0002F\u0002\r=ɲy[8lK6}ۨjO/&F\u0002>[|7$$\n\u0000og~5pl`*̰\u0010l\u0005\u0004#%\u000f\u0011\u0002\u0000H\u0016\u001dt[ \u0002EW\np\u001d/t7C\u001ca[,mNȂ<\u0013K.\u0015N\u0012I\n֭ޚZSXIz-p\u000f\u0016f\u0010fn\u0014\u0016\u0006QK\u0019P%\u000bmdqg\u0010\u001b-e\u000bsՖ,KdI\u0005ήZQ\u001a\n-Ӑ\u0003\bjټ-m'=\\U(M6{\u0019\u0013LLqONxf\u0007\"\u001bŊFWxu\u0014+^\u001aEi\u0017o\u001bS\u0012\u0003\u001bbk-ocڛg=ɓl\u0001NsP\r\u001f\u0002ؖ$;I\u0010\u0006`@bKY\b.^\u001e\"ckB\u0019\u001bz\u0001➻=#wEnI\u000b\u0005%.`D \u0017\u000bs6z?W݇e[\u001em\u0004(tE\f\u000bπX\u0010F\n:|`\u0004\u000b')J4\u001c\u001c\u0012\\+8m$0e1zi\tnY\u00164\u00183ғIa[?H̤\u00027\u0019CMx\u0016Q-B^-آͶ!(9Jhe\u0000k*\r\u000fc%;HOr(.&mbf\u0014^\u0018]gȽ\u0007\u0019uғul\u0010\u001e\u001fH72ȶAȷ\re}2ĶEgLKp\u0016dq\u001d<\u000f~\u0017\u0011(V4J\u0016N\u0015/ūX(Jw#L=pm&m5˅9\u0007쇧؏3a~\";eIY\f\u0014oC\b޲m\u0016<:J?:p\tIiy\u0000iy@\u0015{o\u0018mR'w}i%vvO޽\u00152X瞷R؜\f\n-'\u001c\u0000T\u0002\n`\u001b!Z˨0\u00072a\u0001ϊ䋿wx\u0018 D\u0004Bo33<\f\u001cąadޖ\u001d\u0015Ðo\u0019*\u001b,5|\u0006fyBVpu4c\u00191@\b=\\n@g\u0016EHEfFnQ ڵi\u000b\u0000\u001eRm6)Z%`+y)sYR;.?i؟\u0015XE\u0001Sp\u0007\u0006m\u0002B=\u0012yIck\n\u0012k&\u0002}.Ԥ\u00138/ǍbKdtY+Y:\u0015/kB4\fIF=p63>+1'~O.lH\u0006l{~d8o;;8$󶒆d~̌Rt#c[y\u0011a\u0000o1\u0002\u000ex`G\u000e\u001ecMYʮQeWr*Uٕ\u001e'tO}\u001e]]*X\rI\u0011zȶN8p\u00132YD\u000eڜLW2\u001bĴM\"_$+l\u001e{B#\u001b\u0002{\"no\u001bU\u0003dHصv\u0019J\r\\;f\b8c+\rU&%ARZsIKȨ5\u0019CcCᰭ\u0005E\u0007xEY\u0018z\r\u0006w̄\u0007qg2&Aؓ\u0016Bh([\"\u0015*1px\u0007\u0010ڲ̞ cke );\u000bL2\u0019l5@z1Nbg2oԓvɶȷl[g\u0001l;3\u0016Jl{FQxux,^\u001dŊFQ\rvdEZLEjl-ʒBM9p޶9vh\u0012mNN`v\u001f\u001d@dFGE\nl[\u001d\"\u000eI%\u001ew{<-s\u001e7/CS^\n!w\u001e[TI\u000b܀`3&Gu7e[29+^%\rD-O\u0007r|^\r{Q\u001f\b]\b&\\\u00130<Dmx;<\fd\u000fYR3n%vŰWպ^(C8$\u001aFYy[\u0003\n\u0007Hk`[M\"LHJv<uAaOVV+l7Hԙ9mdڒ\u0015V1!9X6ok\u0011j侭FVMYRygH}i\u000f$Ml{\u001f7\u0015/ūeKd(V4Ү\t#˓mmF,\u00009\\ss@$I\u0014d[ۚv\u0000Ż6$m\u0007Ыs\u0017y^}ԉӀC!T;crǬ=\u001cґ\u001d~o7Dy-˗\u000fswQ*#cZ#K\u0001\fr7_9jO>;q[\f~\u001bs8hs26a\u0019\u0016u\u001a+C`\u001dz\u001b.\u000f\u0014\u000668*$p\u000e\\\b-6sq0o\u001b1:EJڟ*TBZf[\u0010\bm\u001bh\u0011'Þd@ڒ8PxalЊ\u0005`\u0010mJv#\rKd,a[iNv`yT'\u0006%dcz\u001bbcmu A\u0016\u001d^\u0000fs5^%U5ᚢĺ|낌ܙi'1̔dޓ|\u001f7\u0015/ūeKd(V4\te18'9.+>+\u001e$ÐdKs\rSl\u001b{i\u0014m.|[\u001c'%\u001d@\u0015\rՍ׬=sǟ}\fvJǌ*Yժ\u0017\u000fyh7O\u0007-8hAK.\u000e\nQ\u0007-:\u0001s_>o\u001eyj՜G-v\u001b\rm\u0006镽>\u0005kւ_QQ_rIqI2\bxVZ؊\u0019%G\bQ\u0005cE̫w \u0017\u000e,;N\u001b!x(;XKH~&3\u000bVg\u000f'kmz\u001a--FmlH0Wnp\u0001\u0015b5\u0003\r#d֤׈`K\u0001.k\u0012*%T镮%7tӼ4*\u0005l;dEߖn\u0005\u00069'\u0019*^ғD%`Iy\u001c\u001b`۩Ϧ?Fn\u001f\u0007?n\u0014+^\u001a%Wˊ^Qxi\u0014)\u00151Ui!9+^okl{vإo\u000b<ql,c[!\u0001d\u0000\u0002l;cfsu{To|V\\\u0019ׇl1xmW_\u0019u\u000b>\u0000{_?~\u0006\u001eOu\u001f-w{\u001eow\u0000E%M$XpoEVGzuo4\u0015\u0019\u001fG\u0001|EhqZ0\u000b\u0018<պh-v,ql#*{'\u000bl\u0014l˾LD6,\u0006\"ʸ'bd\u0016\u0000ѳ\u0001o!0\u000b\u000f\rb+2\u0012BV LE\u0007\u0018xt%ei2֥u{o[,NJGGndl\u0015$y[V[jsM_lcyS8'ǍbKdtY+Y:\u0015/{<lH.O\u0001x[\rs\u001ayȷ=<vlm9&ȶ\u0002՚xkFW\u0000dY\u001e׫^lR-8;`Ł+\u000fps~;>!Ԏ\u000f\u0002|\u000b\u001f\u0007-<7pމSU5\u001c-o;۱\u000b!+G3\u0011\u0006\u0001o߀Spp72m\u001d-\u0019n!Bg\u0003>y[;\rr\u001aA\u001dUD\u0018\tۺ\u0018\u0015\u0019e/\u0002\u001aHdE+\u0004'\u0017\u0019[h:%k0\n-\u0000O\u0006\b9\u0002\u001a>t\fH\u0000I9tu`*6$\u001eekQh-\u0001\u0014DԨ-\u0019m\rQl[>\u000fWOJɵL=#mv\u0013ic'p_\u001bŊFWxu\u0014+^\u001aEi\u0017`\tm\u000e̸tԓeڟ\u0007ٶ9\\d;:9ŉm\u0010m鼭`\\=KJζB꥽\u000ez2x͍[\fo٧W~_\u0005_'~\u001fw\u001b\u000fY~e\u0003_;ѷhg\u001eχ\u0015e\u0019|[<\f\u00196JZѱQ\u0014f#I\u0014\u001a`\u000b\u001d[tv?\u000eڮ\t\u0017M\b\u000fժ\u000b}`d\nD-e^Rz\u0011X>kuβ\u0018C!ۢy[l\nT\u001bd0Z\\#\u0004I\u0000d!\u001e\u0019C\tHti\u0014qlt-~=If\nKY^Xtku\u0016$[\u001d@\u0016ܐ,͒*)pmm&4+c\u00172񑌔\u0007\"\u001bŊFWxu\u0014+^\u001aEt\u0018T8o[\u0015}[\u0018$g=P`=X\bmem4b[\u0018$\u0005Fc&l+,\u0000\u0012\u001boK\u0019䆅:+To\u001c|C?\u0018Zِ5~M_5\u0002ޯ+/+>m\u001f\f]ސ\u0015W|\u001b0Wa\u0015nE;<\u0000\u0016\u0014oqѓ0\bn\u0010!e\u0010lE\u001bWG kQK\u001a\u001dثeVmqjWB\u0005u\u00012Tv\u0006~odz\fVۍE\fз\r\u0013{d#3im\u0011\u0000IN#RG#-#ԍ\fcÅ$$\u001bl\u001et8j<K[y8oz\rtO'Y\b2=\u0012Ih6R\u0007{gM|qҸ\u0019\u0019fN}\u001f.\"Qxi,^.+^z%WGQJ'DMHm\u001aaTS~\u0006$Qټڟm㥾,ɒ\nkCKvaw[\u0016|m?D\u001du\u000eo\u0012ﯿ1x饁/unwy\u0014p/\u0004xMζt0r\u001b\u0002[a\u0001\u0010qin v86$GY\u0015|[Ґ\f\u000e\u0013HNɼ+w.u]Yo׵h29X_\u0011K3o}0q\u0001\u0010\u001bl\u000e\u000b\u0012n(=kԊLN)Zr`w\u0000:\u001b.s\\Z2K\u00001vd\u0007\u0010e[Y:^֓<\u0015$MNɷ\u0001}3hf)\u0013fe>;qt\u0003w\u0011ǍbKdtY+Y:\u0015/T:!\"\rgId{r\u001b\u0000[m\u000fMI`\u0016\u0018\u000bٖ\u0001$ɒIv\u0000\u0002\u000f.d9\u0012wOx->oCkƷO~G?\u001fO|\u000eo\u001f\u001aܷ!n\rYy}ܓ=7{e>\fmvb'EJ\b d&\u001b\u0003LI)|@Ȣu\\\u00071po\u0013v\u0000\u001ec+e?\u0019v\u0006i\n]]{$m\u0005\u000fW/\u0004\u0002v똳\u0004U\u000fm\\\u001c\u0006{aN0]\u001bN݂\u0003`<l\u0002-\u00036B`g<]+rK[ʪQ\u001bJ=\\\u0006ZdQ+\u001bm`K\u000e6}\u000b\fA=\u001a⤭M\u0001VMv\u00000K\u0016:T\u0013?+c\u001eK\u001d;FQxux,^\u001dŊFQڝ\u001c\r\"%:-zb\u001cIn1ͳϷ5\u0017\u000e\u0015\u000fOmC0ۚmD)\u001dۆ\rɿ/>^rk\u0005U^\u000bG\u0003\u0005${GS;\u000bo\u0007G|?\u001bR\u0007;֨WxL.\u0011V¶Vndx숐4!\u000bY'kK\u0016pW4H\f:H\u0003$f#\u0000˾\u0007-;EkS,Ʋ7)d\u0007Jz;vMзƆd@f¹H!B\u0011po9jHFQtY\u0016u)P)҄L&pekmiхu6r{\u000f\u000b\u00106Q\nxN\nx\u001bGnw\u0000m\u0001VMynRbm\u000emif3R_~`\u0007\"\u001bŊFWxu\u0014+^\u001aE\t$Wdu\rqmrs\u0007 BT\u0007\u0002dȶ;tbO2\u001c5\u00043\rrch\u0005~{n^{{ޭ\u000b>߉\u001fO~\u0017;߅|CAp[?go|>\u001fkos=SͨZ1y'`[d\u001a\u001f|?y&|uO2%)\u0018u\u001dҶ$-zԱu,);!dᬋ\u001ecD\b\u0011uq|μ\u001c\tK߀\u0016@^-L6\n]BH2^ҋؽK ŵLZԮA\u0015W\":[\u0003?Y\u0015-Bf]\u0000ܓ۸@q\u00165F\u0015\u0000VaM{!I\u0013\u001f|\u001f.\"Qxi,^.+^z%WGQJcJC߶\"%:3~Of\\}\t-Ps\u0015N\u001d\nm]$C\u0015}`\u0013\rI&ŕck!mE}}uc5k1ۮ\u0005vMͷ\u0014z3;w\u0000\u0007\u000fȶ{~G\u000f_\u000eѠ\r,lr\u000b{T<y=\u0001_\u0016\u0006%z)Z\u0003ul\u001f<=r\u0012͜-ּT\u001a\u0006'$фdL\bo_zkc{ibڒdoKօoKU6b\u0016v\u0016M[o+vS6\nłA64^\u001b$v#S\t\u0010L:-\u001c\u0005\u0005l>dDbO2et+c\b}μZWx\u001f6KE\n$c[!\"\u0006ձ\fVm备k'nȷ昫sLϢ䂧f<?]DqX(Y:]VJ\u0016bK(N\u0018Y\u0012]bPOrS.o/zvh\u0012P,K3%TK\f\\ICݗR\u001d;\u001cc'>{m\u0001v\u001e?u럡7\u0001${\u001f\u0005`}[!mo\r\\z+\u0007=4fx̨c\b#'GeA\\q{i}m\u0000f\u0011NpU?M=}]\u0001mW)\t|Lj\u0017nѿ#\u00167{ȪzZAoV\u000f}*xaCȂ\u001d\u001blܵyJu욭/J\u0006l]2LZ\t;Vb/E l'\u000bs\tb\u0017\u0004aVL\u0003\\)%\u0005m\u0010+\rW<\u0016Md-F\brM(XFxV$\\xs\brQ7rx\b\f:{\t\\,)Qv2rkմdַK\u001d[\f$?*y[WY`[fm1\fۢG'%\u0015js\u0011ۦ8cl\u0018D\u0003w\u0011ǍbKdtY+Y:\u0015/T\f{Sc`Or\u0006̒l?zz~x4KJғLrŐd\u001d,m[6,dL>m\u0017}6\u0007{\u0007%\u001f{UB;\be \u0017~lЦ?\u000e\u0001l[>o|}Q[R\u000fG^`[jԊ+~ĆuqW\u00016l&߬僳V\fL[<p\u0007\u0014\u001bv\r1x!3i^{u܊E\u0005/}vٝ޳K̫zՀy5>o\fS?2ҠWBTQ\u0012ADHNZ\u0015㤈˴%\u000fn\u0002\u0013(.Z\u001ah\u0016 \u0011o\u0011\u001c[B:PdX0\u0018\u0006Mb\u0001\"v#\u0013\u000fJ7\u00019\u0013ӳ\u0018-%Y\u0006$:sL{{W\u0015\u0007oξdM\u0002\u001amطTOy(^\u0007v~Y\u0013_l\u0013\u0005\u000fE\u001f7\u0015/ūeKd(V4R\u0019aL\u0003)\u001bm@ Mmu\u0007j\u0007\u000f\u0004Wi\u0007Im\u0015wm\u0001\r\u0012}[pO+>>A\u001f'~\u001c\u000f ?\r=סG2\u000fC\u001a\u001eZ;=\u0011ϗy\u0000V:uRE\u00125l{B=$p\u0016߂usx?Nԥ\u0016xMX5q\n\\7\u0017_cFqgK<o/\u001fRK\u0015^TxsOϗ*z\\\u0001_\u001azmgw\f]2\u001d_.\u001bnA.Fn},vu(1˒R\u0001ӪdҖ\u0005%$[d\u0001\u0010IHK$҆d\u00026\f\nlЮ\u0016eWjVފmɒd1\u0018p\u001d@\u001a̱\u0000\b\u0003((F\u0013\u0018\u0013\u0014 $O\u001a\rzȶlӬ9R\rg$Qxi,^.+^z%WGQJ',OLARp\u0001\u0010\u0000lSs@P4\u0007mmm\u00106\u001e6i֥u\u000bsp\u0003˶{7?ܻKﺯ?O=&}\n\u000f:}\u000fӞz9AJU\u0000\u000eClYB\u0018\u0001oMBڹ\u0001S7\rN^y=-|\u001dϧL]zfgJU2UZUjUZς\u0019ۼ6oW)~rz뵺\u001e=[{zQ]=xe_\u001a\u0014'Tx+\u001fu\u0019زUO\bNzqҲY\u001a$\u0005@B.N=ɂu\u001b\u0016jBɠ\"R->\u0005@]:x4]X\u0006:oyTrX0\rLv\u0019*eg\u001c[\u000fyV\u0006;$\u001d@\u001am\u0006K|iNNS`ϳX*3aٹ-z\u001f.\"Qxi,^.+^z%WGQpO2\u0000۪5\u0019uYq\rq{s-@'\u0019ڏLf|!\u0003CokI6e[d\u0007M\u0005+W.^~\rZ}Y̶@G\u001d~\u0015yW#mwPM}_/Ȼ}y3^m_i|ygVɧ\u001f\u000e~\u0005EBNr\u0004qo#ooyd\u0016%\u00037oz?@2W{[\u001a@#}g\u001aUJpvߠ]\u001e/{Tƾׂˎ\rX}\u0017\u001d;_E\u0007{c^CWz^sld,5[%\u0001SR[@\u0002F\t\\t3NhjH\u0012\u0018mi/1Z\u0003\u0014b!fl\u0001\u0005B'\r7YZU6o+\nSm=\u001c]xO(Cw)dAj\bie!؎p4'3c.}[]k'\u0007ӆdmo\u001b/\u0010ѷ$`ۺIImsU٦Y\u0019sj\u0003w\u0011ǍbKdtY+Y:\u0015/T\u0012\rT\u00016-6=\u0016Y٦}yVm\u000f3l\u000b0'wM\u001fbcWܢ\u0019[%\u001bo\u0019߶\b)\u001d@m\nt/|S\u0016m^\n8wy\u0001|[kB]tc/,9\u001d@8NʁҒ|qW̓sL_zf*u)GbU\nH\u0019+U9kTk=r\u0002UM-Y5\\z\u0007<_W-=iug\u000686pA+O:W\u001ch뭦^\u0016Ӓ\u0018˦\"7X\u0005U'nŔJWZBzI'm_m\u000e\u0012VkATk\u0011BЈ4n!\u0002L\b\u000f\u000f\r\u000b\tö`-\u0016\u0007Id\u0013$+ܮ\rJ3;\u0019\r[Nܱ\b\u001dl\u001bzWm늒\u000b\u0011XrL3Θ8p\u0007\"\u001bŊFWxu\u0014+^\u001aE\t$T&Vդe05\u001a͹\u0002\u0002\u001d.mP\u001f(A\u0016]0f[B$\u000b`{lK\u0014gaǿM=\u0002؊l[w%\u001f)^Zv^[\u00059\"as\u00024g\ral\u001b\r@/\\/kU%iUɋTO\u001c@\u00059Ы_]ߨV1cs=^UZJfz/<=_\u0015B7]+[.\u0001]sj\u001deG\u0006h\u0019\u0014\u001d:IM\u0001[t&K])LbO2yig\b\u0017]BO2YЖ\u00169\bAqj\u0003\u0003b\t^-Ӗ,ۢVdxF68)׉RP4Ee\u0014_bs'Jɑ&Iăȶ\u001a,m&pD䰡\"N-̒T_`o\u0003`kȂ9}\u001f.\"Qxi,^.+^z%WGQvÞʔX\rYY=9\u0002۾\\ہ\u0002pCƶRՈ\u001c,HBD\u0013\u0001l:Ppu'9às?\u000ei{뿂\u0013U{}C;ޛO\u0007ȦZ6\t3\u0013\n;a[a7\u000eL]5n3\u000bTɋ=',\\\u0013m:Uj;TzPz*wn׻=\u000bh_\t\u001aV\u0001[\u0001n4taŭ~K<jwlx\u000f3Nk'2CZ\u001fk8\u0013gi#\u0004{\u001e!\u0012c\u0014p\u001f%\u0018\u0017\u000eע=Ap-`[KX(y[ܳ\u001dU\u0003<\u001b\u0002X\b\u0001\t\u0011B62#\u001d\u0015Z\u0018\u001cgl,ےd,5d@Aۺ̞*3֭:\u0007JC1N\"j\u001ami+a\u0019OVO}(^g5WfdJ;-\u0007\"\u001bŊFWxu\u0014+^\u001aE\t$\u0000J\u0018W\u0011';1\u0007.ݟo=Xh\u0007l{tJB4o\u001bg{.$:m\u0001$k\u001dDlkRԺsRT\u0018;\u0011R-\u001cˀ\u001e\u000f}~ݧ髾\r3*\nBH\u0014\u0002[\u0013𼭬'9QXM2({U\u000b=畾\u0002 G*hfV\u0005ڵvϭTZj=_\u0003W7\u001b=Vך}ן␭+\u000fx?f\u001bີuƋö^\u000epwǵ{Xj==#\u0003lq$kҴ(@pX:*\tA[@ؐ\u0000\fרKB\u0015\u00006D\u001d\u0017\u001a\u0018y6$\u0010-\\GKZ\u0011o+\n6BvWj%H+#Yٙul'δ%-yO2nu\u0004f_З\u0002ؒdʶXM`\u0011~,L{~Ҩ\u0002{}>d\u001cSYufi/<\u000f~\u0017\u0011(V4J\u0016N\u0015/ūX(Je)ɀmcm|}&\tmSu/mط=&cۡ>#\u0003(ۚ,)\u001d\u0011t\u0016\t\u0004D`\u0002\u0004/1Y=Ξw_\u0003\u0014\u0002ǟE\tϥ=HäM}ӗ0c\"cZjv\u0019;T/Vyo~Iz;\u001c1\u0013=Vtg~kN//}+hBKn\u0005\u00155`{\u001a\u0000[[֯8PL;ES,FlR1ö$\u000fY\t&ad27F-\\ek\b\u0006\u0015\u0011\u0000(\u0016p@qط\\\u001c(NJ\u001e,vm-\u001dӵΞ$\u0018\u0015\u001bd,]\tĂ-\u001eIs2\u001bL,к\r&lp,)(S:6X\rvDdvu\u001a\nl{-u\fSEf3g?\u000f~\u0017\u0011(V4J\u0016N\u0015/ūX(Je)1\u0015\u001515(K\n\u000e\u0000\u0015ڰo{ɷlkb|x&Kʤ\u000f13xk<\u0005\u0000K\u00056E\u000f\r\t\"ۮں\u0015E\u0019zgN`8uf7P-X8TdQK;6n\u0005#\n4MZ\u0013;iT\u001by\u0015Y;\\mk\u001bT\u000b\u000f|k\u001az\f^Gt\u0015-}V>k*o\u0019+\u000f4|>\u0001eC\u001bЕ\u001f=\u0007W\u000eT-:P#FLUm\u0018Zb$=f[i8r:/\u001b$eԚڑj? ժU@Z\u0004\u0001\u001b\u0019\u001c`۰4QFfo\f\u00000'\u0019l]ޒ\u0005@̶ b`(Ӓ]-\rKO2\u0000X$KJ]\fbO\u0000\u0016G\u0013\u00105\u0017-VD\u0005\\s-I.\u0007l\u000b<\u000f~\u0017\u0011(V4J\u0016N\u0015/ūX(Jp\u0007\u0010m&e7d\\˾\\[s>m\u000f\u0002pl|ޖm<mMR\u00050&$A\u0016{~\u0016D:s2r&=3&BRu\u001f`R9\b׿KՍ.\u0006\u0007\u0018B\rإud603\u0015N͘Q\u0000E'mVAǶ]\u001eTo4V\u0000ycɑ\u001e\u000f\\wAs\u0016\u001e3\u00037_\u0001xĀY~_֨\\\b)\u001d\\^P7N\u001c߳j%{\u0012\u001ba+2\u0019cԇŹ,\n\u0018\u000b\u0003$\u001bJ+pЄEކ`VbF@\u001cVE\u0007>ddڪq\u001f \u0002\rz\u001cy\u0016o\u000e\u001biT\bf^;\u001e\u0015ۊQr᪑}8k50\u001boo\u0006ڜ,$Jdܥ(X\u000fW>c|[N#\u001d\u000bhZ2ʒ\u0012s\u0001\u0006FdiO2mG7\u0014&[k̕&/HFQxux,^\u001dŊFQ*O\u001eYdyۺ=YMm\u0000l\u000bm'\u000fOI8%E{i\u0019\u0002B\t\u0002΄b̞R\u00041)\u0003t\u001a\u000em7_yۀ*!\u0019[\u001f\u0005/=\u000eHqO\u0015N\u0002Hg\u0002l1u\u001d\u001e=ᖟ:Ϸ{Dg-;sѡ\u001eysŭCV\\{z3\\zypy/^oO\r-\u0015\r\u0015u7ϟ^vS\u001eZqd<Wvt)9QBs2O0Kӕw\u001f,tl\u0003\u0018\rAm\"l+Fy\u001f2ɒbrP[]J.k\u001d@l\u0013ADZ+k6\u000e\u0011R=N\u0007o%\t\u001a \u001b\u0019emɰ-m\u0007I{u\u001cse2<+ܷ_\u001bŊFWxu\u0014+^\u001aEtB\f`۲dؓ\\mokmʳ\u001e(5\u0017؎嶎\u0016\u001d \u001f'@+%\b\u0019\u0007 ۙyyyI\u001andhr\u00009]Jȃ\n׽1wvgJ$Q+o[r\u0005Λ\u001a=2\"}E,|,wjN2\u0019TVj\u0017\u001cD\u0015@{<ٱ+Ol<Hͭן\u001f֡K[{zй\u0003k.\u0014\u0003m95gߞuU3,l\u0013zt\u000b뚝֊<\\:]\u0011*\u0007XY\u000722s#\tՊGD,#\u0018œ\u0007Z\u0002l\u000b\u0002\u0006(\u0016i!҄d.HR&\u0014)q׭]Җ\u001cBSL*\u001fz\bl_R:Hk78\u000f\"\u000b\u000eE\u0003HVCzQvPHd|O\u001e]Wh(VYsL\u0015Y3fL}\u0012(V4J\u0016N\u0015/ūX(Jep\u0016fIA6#~O)\u0017ȶ/v\u000e4{gxE\u001b\u0014O\u0004r\flemXhSOd\u0014\u0015\u0015eML{z(=r]q*2\u0016jE&;\u001cD\u0000\u001bKpFb<2T\u0002\u0012\u001a%?SG\u0016\u0016\u0003=36q\\\u000fSܓs6\\1R˕^T{V\u0005u~+Z\u0006,:4`a̮?7h[[}V\u001c\u0004.켡p\u001eםv.T\u0013{\u001e]xu~kO\r\u0003{K7>ݼn熅\"FPAZ+\u0001O+i!k!dګl\u0014\u001eNU$_-ul\u0005eb'\u0019:o\u001b'1p;:~jÅ\u0016eD\u0017]\\-ϺL5d)e)j:]\u0003g\u0017\u00001Q\u0012\u0015Wܢ\u001d@\u0010oCQ\u0001.v\u001f2^\u000fw\u0000Y\u0000ėg&Qxi,^.+^z%WGQ\u0000ؖMHL͈GYR潹ȷ=Pd?4~djB\f\u0017-h mP\u0006lCے\u001f3E{촔$X\u0000\\X0F\"!&?\u000f\u001b\u0017Z#\bBEi%l\b'k\u0010\u0002E\u0018KE|~zTBĴIEo\f\\>uz7{cѾK\u000e]r\u0013\u0003מ\u0019X|y>O\u000fZ{f~[ZVo䷵u\u00188l2t\rG4zf+3֞\u001d\u0013n\u0005́\r;7,\u0013\u0012ƴB\u0015sxd=\r\u0012wЛ\u0018`V L*[f\r$4fq\b\u0017\u0000\nipMBHB2(]#\u0018ZLHXd\u0001Qɺ[]?6N\u000b$=mXg`\u001bL\n\u0018kcV\u0006}[%\u0000\u0002MDuI\f\u0016ͳT[Ķs\u001f\u0007?n\u0014+^\u001a%Wˊ^Qxi\u00142\u0014\\\u001aW=1zb\\}z|C)ϲ?\u001ffI\u001d,\u001fpxJBd\tj:e[u\u0002\u0004<n\u0000>dOЍ3^]nK|[=*QzW{\rȴ;iK}[|gltԸI\u0010l?\u00199\u0004OZ5yj<h\u0015-}\fX{z\u00136\u001f\f`3\u001b.\f~m؎%71l9ߪ>\r p݉\u0005{BV4,?ug2\u0012@Nl\\$kHm\u0002\u0012m,:[Ŗcҙ\u001c)_j)g\u0012WWb\u0018\u001a\rr\rp[SZȌ\u0012N\n<KrCpNɢuҢdVX\u0000b\u0007d)ڒ;\u000bI=\u0014oo+-̶dmCaB=b\u001cĶ\u0019q<'?n\u0014+^\u001a%Wˊ^Qxi\u0014\tpmUrlUjl\r\u0001dj65f[Y\u000e\u0002ۡ)\tg\u0003\"L\u0006\u0006l\rrM\u001an|flRfZ*ʂ̉i<=\u000f~8vxb\u0012^\u0006cs\b\u0016$HKL[x~\u001c3QYL\u001e>\u0011:EE\u000b\u0016{楿ԭo7yC\u0003W\ftqc>[/m~\u001b\u000f|)7mŇ!U\u001fivP\u0017_\u000b~_DТ--\r\u000f\u00076\u0006;u\u0007ڼf=ldU]]ʲZʶv\f.[98ӷᗀmG\b\u0006I\u000eFm\u0019,)[-;kGMHdVo\u0017^)5@r9LC2\u000bvIT0\u001b*I<Nʉmxv\u001f\u0017s1odjqN2ms`Nr\u0019`\f'ǍbKdtY+Y:\u0015/T\u001c]\u001a\u0003m'դץ5d\u001bs\u0000bvhr±{Ivۺ\u0004[Q#\u0019\\XX\b]\u0001g\u0002\u001cȘQ\bJ-pruŶxVx$z' 4+p\u0015)omT|{,;:`qug;;\u00040K~\u001f\u0004?ﻹuX\u001due7\u0002P\f@z;kG|\u0016\u001d\u0001ו\u0007>9diC8\u000bmʶ.\u0015Y\u0007-\tM\b9\f\u0006=Z[\u001d]P+\rL\"%0+\u000fF&\u0019բy\u0011A\u0014l\t\u0006\bm\u0003\u0011oKlJa\u001bo\u0012(P7n?/sy\u000b~Y^\u0010PB\u0004\\\u001e(5X¹\u0006KgoӸ4{إH+ϒVLPՋ\u000bHOZhHVm\u0001L\u0001m}&\\\r[S\u0005d[>o{\u001f7\u0015/ūeKd(V4R\u0004mb2\rY}\u0003p\u0014i\t-󶮳B\u0013H0?\u001978/'''AE,[a\u0016NjEŃ\u0012ii\u0014\u0015؄\bڟ,!\u0003,\u0001\u0002yyi)xIuLt'LK_^<`\u0001\u000b\u000e\u000eXvlSCB\u001dҰ+6:䦺\u001a\u0019v\u0017Tv'vP-\u000bn6^\u0018g\u0007h\u0019upWO~r'\u0010voˋ\u001c'M̶֜\"#z\u0005Q3W|7(X+_L_Ù\fB\u0005Tʌ\u0014\u0018\u001b\u001a( `גp&!PH\bl)ԭ[[]nty\u000b~^\n\tW!\bq\u0014)dR\\%S37rjh\u0014f[N֓,\u000e\u000egٖmg\u0002}lϔQ\tu\\\u000bPE6̒z7=FQxux,^\u001dŊFQ*M)OL\u0018[\u0019ߐ\u0005Mym'\u0005<okp\u0015$\fB\b\u0010}$~D擏͜;}ܬIhA\u0002 xM\f;W+dܽLx6\fb\u000f\u0017I{d4E/NlAN3}\u0012;*\u00001\u0017J{oѡ\u0003\u0019kV|\u0010Ұͭ\u0002\u000f~-`aokv\n}K0\u0000ew\u0002kޏ,i\u001dqjK+\u00018Zj\u0019mW\\\u001aV~|'+:(ۺj$mi*2biap\u0012[(=[%&^/_x_h;1\u0005k,P\u000b\u001dP\u0014 \u0019۲S\u0001Qz{tHZѮ\r\u0007\r)\u001bk[Pй\u001d\u0000PfAp\u0017W?]`uI\u0019$n\twd\u001b\u001e4%fɺ\u000eҜd\u001c'e\u0013s \u0013rbzk=gJR\u0003`[ؓ\f}۪\u001cseiwz\u0003w\u0011ǍbKdtY+Y:\u0015/T\u001cS\u0002㤠o\u000e1͵C9\u0007'\u000fO\u000bZf\u0001̶.{2ql)R\u0013-EYRd6\\֓\u0017;#\u0012\u001f&n\u0005΍\u0014'm\u001dԷ d\u0002\u001cWW}\u001c\u001d8A|9߭Wk\\\u001eVrKZ `ۭW\u0002\u0006\u001fj@UumMek\u0013\u0019w.V<JTIkK6]\f}xc\u0018l\u001c\u0006 \u0017$[ÙQK[Gä0󜀮9\nw̆`D\u001a1\"E+|5^\u0016PҮ6(:4p$I&S#\u0001\u0017%\u0007\u0007Ġdİ\r$3Y\u0018>dD?otk;.Hw~{nP\u000e\"5wk\rv)t\u00065,Ji鼭s\u000eM:{kg;\u0001$ɮےm'Y\u0000\u0004y[ԓ\u0011\u0013;aʙOVIu|sM\n$C}\u001f.\"Qxi,^.+^z%WGQJS`O2^n[ejFx\u0007dԓշu\u0019!Y`[2\u0005r\u001d\u0004]\u001d\u0011\u0017ۏD-j?[\"h\u0017\u000f\u0002ȥ9p\u0014\u0017GpJEw[v\fPڳ~\u001b/@xkA[.\u0007ln\u001dzǍ\u001d7_W\u0016\\}q7ۚ\\q>s/T6_8viz5\u0005;i^~ґ-\u0017l\u0001KG^:\nΛl\u0012\u0018ےȮeG#F\r\u000f\u001b5ܘ4<,)ʀ!W¹\u001c/%\u000em+,`\u0001l\u001bU\u000bH#(k4j\u000eC:VA\u001b\u0018\u0017\u001ah\u00056\u001faѭڎC\u001duo;ֽ{\tm;\u001fj߁6\u000f\u0015CA=Э\u0010.[̬ؖN:M2&/%Y\r\\\rév\u0000H/\u0005`\u001akmm+f>U3('ZglcȊ/ˌ\u001f.\"Qxi,^.+^z%WGQ\u0000ؖ\u0001MF{r̍٦&ȶ\u0003\u0005փEк=25Ӽ\toЗBo;*R\u000f2}D\u001aŹbCA-Z&H40ضd!Q\n]hL]\u0015G\u0003\u0016\u001e\u001cԐ\r֟p\u001f\u0010iw\u000ev5\u001d74\u0007.dվ\u0017weaqb.\u001et\u001bgv{gKo\u0000sjwk3޹X\r7.\u0015tƙR\u0000[[n\u0005(^Ju$\u0006YǦ%CEǌ4\u0006H\u000b\u0016m\u0018 GQI#\b\u001aK~!QJ\t:\u00161\u0013\u0010&_Bh\u0000'p\u0016=h _#\u0010ؚÂ\u0005\u0015\blC\u0003!b1o7\rm;H\u0016Img*\u001e\u0002j\u0007*}C%\u0002BP[\u001bX\n7؜,x6P)Vޥk郙M@\u001a\u0017;t-\u001aEN6o\u000b\u000e ĶE0K6Rc1eŗ%Qxi,^.+^z%WGQ\u0000\"6:=\u000eۚm\\h?Pd?4\u0002ޥ'9:Oғ,m\r8'!\u000ea61QzI\u001b9-\u0018i\u0013#\u000eɤ-ʘWl\u0004*r$E\u001f3S|^shמx1`y?W\u0002v\f(\u001aPzeD-}ٵC8S\u00020\u000f\u0007\u0007gݾPqB-@\u0017*o#\u0001s+\u001f_sNܙ\\}M2\n0kg6\u00120\f#BBְPsX(\u0004\u0010\n<!7 \u001bF@ow\fe g\u0003\u001b;+)\u0019*\u001cH\u0010\nE/u08,Ĭ2T\u000b\u0014ڳmj\u001ej}[i\u0004][\u001d\u0004oK\u001ej;@_6\u0000d\u0000i4r'U\u0014U/xN6.`XؙlcĜd'9\u001eC\u001a\u0016mQT1|Km:T\u0019We*>?n\u0014+^\u001a%Wˊ^Qxi\u0014؊ڌ,S})Ǽ7߼/\u000f\")\ta\u0007\u0010P9\u0006l\u0014:$.dᆤH&\u00009B\u0012\u0002j\u001d[j\u001de-&2y𲎥ݵǵo\u0014Λ-W\u00026]\u001a\\N!^Mqz׍S%Wn|v\u0013]@+n!\u0011\r\u001f^{\\Yl<2?+F}8:\u001cclbaV\u0003\u0014\tA\u0016-\"Yc\bԮi\u0017u4Z\u0015\u00195$180\u0000\f烢\u00197{\u0003M0j\u0013p7xiMĿ&DZL.xz?vԭr׺toϣ{\u0002vk?\u0006v\u0007b[:\r!\u000f!D[\u0012\tLfl5EYbڲ!:{KuA6dZBCm%O!\u001dP/Z\u0001Vʳo{\u001f7\u0015/ūeKd(V4\u0012bʴ'!\u0013yf\u0003h䄣Sۢy\u0010g˲D$\u001bBXvp}R\u0018\u000be2\u0006\u0003\u0012\u0013\"H2Ŧ0\u000b87\u001cI\u0002GEI\u0002l5`ŀW^\u000e|!m2n={_ZV-]\u0017`2p\u000f/7Unm\u0011iKW\u0002E5@zĶ\u0010c@\u0010%,tTr+jB4jd`5vEV`(\u0002/@Z(=\u0012d[\u0004L\u0017j8ސcmg<\u0004\u0012\u0000[U5U{oto߽sώ/:=~\n2/[\t\u001e\b/%n\t\u0011Zl\bSru\r[1K\fREvm=:-\u0019-\u0011\u001c\u0002Vۢyi\u001b\u000bu\u0005<ku\u000e`xؓmFQxux,^\u001dŊFQ*K\u001eY\u001aS\u001e[\u0016_\u0019_\t}}9\u0002B\u001ep\u0014nl\u001b\u0019鼭-nKf[ҐLYcL\u0014lHNbmqZV֙\u0010&pi\u0019!\u0010B;\u0013od-<;\u0014/\u0005\\\u001cbء]>\u0001S%7N`\\ҲґMG6]i)G½po+xK\u0006r\u000fn\u0011v&G5@0I`[JqZ B\u0000k\u0014 WҲ\rtJ7y\u0018m\u0006\u0016!\u000e7\b`R\baW3[HCUU9\u000b\u001ejooB\u0005\u0018\u000ba=;ܻ^\u0007@^wTmvkDm-\u0005`_d.|[I|Y0\r$kԭ4!\\ar\u0014Ivݓ\f\u0016̷dGk\u001a\u001cu\u0005\\\u0000\"Tc*l{\u001f7\u0015/ūeKd(V4Rل芴8\u0019ߐmj27X[-\u0001t\u000fm\\p'l$4$\u001bB؆dpH @v¶<dG\u0004\u0013'%t)aO-CRA\r\\\u0000\u000e҄dqtv)G\u0012\u0016\u0001ot1`a\u0000o\u001fZܬ+Ƿ\u0001=w`ƥ+([ꁊ\u000eUuaIpϕ:_N\u001a1Rȑz19\u0019B\u0016\u0003,BW\u0007tN\u0011̎\u0010\u001d[pىZ\r~cW\rIƥ}Ȃck\u0010\b\u0017zz\u0006HK\u000f\u0002\u0002\u0005T{ɣ=U\u001dώ<:Gǟ{uл:5|:ow?DySjcntq\u000fse5Hm[ҺP\u0015li`0oV!Ȳ\u001d@AP5_gۊ\u0019OBG]6Rr˹o{\u001f\u001f7\u0015/ūeKd(V4Rirt\u0019\n\u0002l[\u0019_{{a\u0014\nI\u0002pn󶦐$;-\u001aBQJ\"ՋQE\u0019\u0010QK⑵d=B\u0014\u0001[f\u000fuo%qRtD\u0017qM\u0013.XB\u001f\u0000\u0014q~ӻ6g;!/\u0015FzзjoW\\R\u001d^wcͳzn3Z[^L$\u0000v4\tI\u0016\b7\nO\u001aUh\f\u00162\u0011&\u0011?\u0017_E\u0003#\u0018Cv8y'IWf.F+Lb\u001dia$\u0015ِ\u0014\u001aѹ풪\nko\\g\u001f{t|۳>\u001d\u001bρ\u0000iۿ\u001eˋ\u001d\u001c\u0002^VP[C0`\u0018ڊ{\u001bKό\u001d֖\rvz\rrr5VHdŭ^6rKڒiO2\u0014I\u00166>4p\u0004\u001ad\u0003ɣ\u0014d\u0003(\u001b6qo\u001bŊFWxu\u0014+^\u001aE<5\"5r\"o\u0005s\u001bsMB\u0001'\u0019Ǧŷh~'Yq+kH\u000e%,\u0004#cƨ:$K 7Bf\n#dU.\u001b*\u0006Lk\u001f\t?|W\u001fo|͵ORE9}_ƶsL+bi[\u0006=#pYmݺe\\GE|[Ga,m1c\u001aXgV0jpgC9YI4{\n۵9\u0019\u0001,qYE'mðc[؇|\u0013gxZ@C\u001fvЯO}ۿ\tM\u000fǷ?n\u001df)W=~ҽ\u0005=܍.Ҷ0IZ\fo``N\u0016\u0006\u0005KV\u0003ĺ\u0002Ku߶,\u000bZ\u000fE\u001f7\u0015/ūeKd(V4R\u0005`۔ʉ15u\u0019q'9״7ϲ?\fۢ\u001d@Gۏͷ4\u001d@bv-l\u0016eGG1\r\u0011ZLa[\u001dâi69NJjY\r-׿||A\u0015^ZmŇ\u0007,~\u001aZ>/Uϳ%\u0003WW<zlm\u000fldl\u000bB\u0014\"1(\u0018';\u0001\u001c\rWPz5\b9Q\",(L*g[\u00036p$0`lFD)\u0012\u000b_F\t7\"aTM϶۞m\u001fz}ww!\u0015\t\u001c\u000e0\u0016\u000bmǿ|`};wn\u000f}ێB\u0015CiTrd\u001f\u0010++\u000b\u0016\f\u001e-\fO\u000bKj%lkc{Y%öwmk'Sh(@m\n$s?n\u0014+^\u001a%Wˊ^Qxi\u00142\u0002\u0015z3M{r,Mm-\u0007 ڎL\u001fp|]a\bN0te+nl\u0014\u0001D&2\u0007d\u001dd\u001dٵJM[a\u0019+nBvmu~[2oD\u0001\u0011\u000f9?}榳w{>\u000b\u000f>:9\u0001\u001b8~}&Yb^:TW_%AM\u0015k%m?:\u0001rI\u0014BK(Q2[\u001e3P88ʈ\"\u0010ڏi\u001f(z?\no\u0005\n#q2Yڙ̺iD%۰;m\u001fy}\n\u001e\u001d?{kߎ\u001ftg\u0015<BWw:~\u001a\u0000O:wto\u0006\u0007\tm\u0017\u0016\bE[\u0010$%qiokx\"\u0012\rfs-:q\u0016\rF\u0007e\u0016$7L\u001dPP\u00076R\u0016$gpO\u001bŊFWxu\u0014+^\u001aE<%FȒʈC9{rr[<o\u000bvݲ\u001c̲\u0015\u001bc1\t\u0002 rH@;h)m\r,!\\6\u00185\u0004\t\bdD+'3\u001f~zNťQ[,=V\u0018 p]y|Cל\u001ay]'-\u001bvHJ\u0015\u0005/\u0016\u0007?[<taqe\u000b\u0015w.U}x;\u0007/al=\\tl\u0010\nOз\u001dARKqƩP\u0004\u0011Lf\bi\bַu.%ص.\u0006_\nKBmɐj\u001eDQ\u0003:տ\u0000o{u|~\r\n\u0010zB}{׽`\u000f}axzGKrCe\rNM҆d;\u001bm\"2+n5B72;\u0016d-ۢ亩QTM\u0019$g*8?ǍbKdtY+Y:\u0015/T\u001aS\u0016[\u001eS\u001eW\u0015הѰ-\u001ebofoo\b\u001d`yO2%mX(;lk%l+\u0007a@c{KnFB\u0014m\u001d1[d\u0019\u001cvÍo8\u0014Bઓן\u001bb~kNn\u0018R3ۯ\u0006.92͚!\u0007O\u000f7\u0016M>4\rK\u0015\u0003^,\u001dpj<nTccKgl\u001bA6\\0\u001d\u0015d`\u0006o\r$K1sE50& ?*\u0004*lMJ+\u001f\r\u000f\u000btoGo:>h&\u0010Un\u001d}_\u0018\f\u001e{_\u0006lvZ`[&XV6u+\u001e05̟ITz8rK#kHOIշ\tQ0KRm+\u0001ۖe\u001e\u0007?n\u0014+^\u001a%Wˊ^Qxi\u00148a6Ǵ7ϼ/rvh\u0000\u000b&\u0019CNmC\u0005mY+G\u0001:(Ҵd#Gn{(\u0015e[\u0007pdԇY\u0018ҕ1Z%r5\r6^_wn[\u0006\u0015_Q\u0015zKk\u000b\u00017\u001dr\u0015XמԬ>Ň|\u0016\u001eYzgI?|֥o\f\u0007lZ2ft&GF4u\\݇#\u0004&\u0012^d#RG1~\u0006fʿhf\u0016M\"\u001da\u001c4!SΕ\u0015$\t\u0017\u00006.\u00158H\n$\u000e\u0012n\u0005\u001d[\u0000?;~\u001e߾\u001dwώoT_xtk~ǽ3O\u0018#b[~m=p[2YdVV&lAc-\u001a\u0016'J1mɌoKVXn\r\r\u001ev/l[1\u0013SF)r\u0017Xkȷ5CMl{\u001f7\u0015/ūeKd(V4\u0012mc3bk3!C9\u0007\n\u0007PO)cSٜdA.}[+\u0012b_Է\u0000£t\u0016$DV&2+\u000bhB2$\u001fE \u0013o/{|U5v\n}[S|#h975n\u0005ohL\bnak\u0002\u0016^}w홡+K%\"B\u0004$qZ0Qk$zlg|[\u0006,h\u001bـz\"fAPfr\u0011\u001a\u001d̎܎Kڞ\u0010\\$\u001f\u0003~\u001f\u0004\u0001\u001dmq\u001d?O{v۫\u001e\u001dƣ=aԏ}:\u0006;\u0001=U\u0015۞it(\u0004DGndsl\u0007\u0010s\bxKCYa\u0005`KoBvD=p\u0007Д1\rmaT.ɒ{FQxux,^\u001dŊFQ*KLNI;\u001asM{raOrs\u0001lK>Td?<\u0019mm1J|[\u0006@l+5m;IU$;\bWlEod\bWCֻhE\u000e&1YR2\u00121+Jj׸uVU>^r1rA꺱m\t&v\u0015;YUI-cc'dc%\f\u0016\u000eꄫ\u0011Z;&\b&H\ns.mÓ\u001b\u00180\u001e$\u0006j\rd-tTGGCNi_Ar7lKShs8xG\u001a;5Pȉ\u000em1\u0010ozwٻ:\nz?O?i\\p7\fjj?l{\u00110RߖC2ö\u0000\u0012r)\u001d@\u0015\u0019ycm5@pvd=53\u001eo>(V\u0007Rk.4Nl{\u001f7\u0015/ūeKd(V4RyZLD\bp63\u0011\u0000ڗg>\u000f}CǦ[f$\u001cm;g[ʭ5@,)z~/eDֽ\u0015{\tF}[:UVޓLQ\u0005[<fD\u0018ܤa(ú##FCb\u0004Sb\u0012\u0010\u0012QtBN\u0014ؖxv\u0002k\u0017;v%\u0005#c~$+&&)qb2#\"3cbɈV[3.\f\u0018\u0003\u0004\u000b!A tw^{\f-ƺЅhX\u0005\u0010`Ȳd\u0014)ڄ4U>y\u0017=2}8\u0017\u001fʓ_><\u0002Zv6K-K\u0003⭛<n\u0016Zk\u0015<\u0016x\u0005ުo U>WY\u001f)'O~翠??|_zo~EoG=_z~\u001fܓs]d[aEߜI!Fh\u0016\br!T[g62j5lK\u0007/<<׾\u001592l۸\u0019tۃr턣yL섣yx;h{ړ|`pxbO.D'YI}){c )oclREu\n-\u001a)?\n W$#,ޚ\u000f\u001fہnm\u0014-R\u0002U\u0001[@Z0%\bT\u0006ض;U ykFU⋋EJ \\TkK\u00168\u0018\u0015۪P\u0016m-٤%\u0017\u0007.\u0002)i9\u0006\u000fƥl\u000f\u001aA}ǚmKO>OO?_zOןמϿ\u001f\u0006V{ۅ$\u0005IRT'\u0016$\t޲p;x\u000b-\u001b\u0012\u0015mյA֓\rɭݍzsL+?!\u0013^np4>O8p>O8\u001do'\u001cW}by:'x\u0013>Rx{MYRBj'9L\u0005.^)9KmhK~;\"E7?F-\u0015\u0000Q\u000e @Z\u0002dq57\u0004\u0006y}9rlܺe7x\u00118RIxJ\u000bܮ\u00157dW1\u0006K\u0018HI5TKzn\u0011pB2$yۜ,\u00002?+>_G\u0013Ͷ\u001aoZy'O֞>YyIO>ӕ_xܓo\u000b\u000b\u0017&%Ţm~č,g2Kl\u000btf[޷\u0015d3d\u001d`Bݳ=o΄,\u0003r턣yL섣yx;h\u001a=ִ'^\\<ɝ\u001f_hbOrJA(vclx\u0013\u0000@\u000bBO?FEVf\u001d\rwޖ\u0001}[%SJ܁,tQVT\u0002\u0001RTv, Wy$\u0005+\u0001oѓ'CrAF\u0016?L9'k5T\u001aa\u0019Y1$ӻVI%\u001fY\u0001vvĢ\f\u000e[\u0000_#ӟ~OӢ-~ɟkOxgs\u001a~ϯ=5l???\u000bݿ@<?Z6'cB)*Ym²-\u000b9g\u001dO!\u0019٥/˶Ɠʃ/>ml6[;\u001b͛!'&x;h|p:\u0013;}p:N8\u001af$\u000e3\u0007kG\u001b7\u001fk}r.BG~sql;\u0006l\bm,.Fm6Qj?іWȵ=\u0004dWJ9+ݖgK\u0014'Ww]=\nle\\$5j37d2B~ ҉fw.$ղE\u0019\u0006l39kuJ\u001eZrk\u001f$uk8\u0017˃0\u0018C\u0007T$)R\u0006*Ȗa'l;\u001af\u000bfCM6\u000bOkOאj?ړ'/>g_Sl?b۟l\u00076\u0006 㲭\u001dEfl|'Ś\u0003\u001d\"(Q\n<\u001c'El\u001bcۥ}_yw_Βjٌl!\nAMxv<t&v<tp4^\u0000:UsJmz]$S\u0007aێI\u0012\u001d@ї$\u000b\u0011۲'J\u000et[Y\u0003\u0015jӖWns\u0017@͘XYqCv!'xV_[^1=&Q\nwlInd-jz\u0005[J\u0019\u001a]lQ֜\u001aٺ]0`\u001d@E YHq~TWD(\u0001O2\u0007#X-\u0002,n[\u0002@޴\u001dR[^E+ZP)\u0007cX5\u0015\u0003\u0000\u001d\u0017|A~W5\u0000*#Ͷ}O\f\u000f???\u0013\u001d\t\rTڒ\u0005IILN8+9\u0001\u0012IngmŴ|Iְ\u001e\n9wϵlD{\u001b\u00075\tGә\tGvx5;'Nn\u0019ݶpև碏E]ѥ/%n\fV\"\u000eg\u001dvȥ?qiFE\u0017\u0003ƔfzV1*q:\u0000lET\u0006\u0005PΡ>;oVȵvD'\u000em)[\u0019t\u0019}p\u0019$3QVREP%\u0000!9FT\u000f\u0004jr8\nCrDHMŭ<\u0001s$kǄ,ɴl+RFS?z^zo>~a?ړk_'kO/u)\u001f'\u0019o(\u001e\\'\bs\u000bС,b\u0013s#'y\tE[^ݗm\u000bȶ'yWmI>\t/7N8\u001a'N8z'\u0013ƫ\u0003O%\u001e\u0014>h~erG*۽nl;wKyG8NmeͶ߶hu۾mk\u0014\u001dxE/1eIdge\u0001l[ꚝkeԛBj uI-aW\u0016,)\u00039JKΣHjܕ\fbm[PrsmI\u0019MZ-\u0019m]bj̫lv*ãܮ[To9\u0019+B-)\"\u0013zK>m]],>?ӟŧWٯ<_y'~Y}L6)!-6&\u001b\\\u001c̹n+a[\u0012fi\u0000[mMTK$+/\u000f\u001f?׾sVMkw޼u&\u0001Mxv<t&v<tp4^当˷h}u[I>\u0017}rg{\u001d˶U5<{(BϾm^j\u001aXV\u0017rbm37-\u0015۞Qlhn\nAc%S\u000eZd+TH2o;\u0017e8HjEx\u0005a(\u0005iZ)=\u0002zz\r\u0018SPNr\u0003\u0018lbnMHroA{9fgrL̫nWF*ۚ2 fޑz]Ε{gyp6O79\"e[cE\u001e)$\u0001\rI^`qm\u0000J)]OMkb\u00054ҭUoڡ v%ǚD\u0000B+rn.i\u0006\b]Q.)ξ3|Uz~sj$ړ|\\Gfh\u0004OAMxv<t&v<tp4^SwN/_7lCö^|z٥ۅi1N=c?mf$1cܿ\u0011\u0014<q6ɺ-\u0017\u0000\t\u00111?j!X-\u000eyl}:G_\n[ٹqc\u0002kEH2oEŭP<\u0015F\u0016VVdH\u0014rd6*\u0019qjzf\u0003Uׁ['4\u0014V%\u0016\\E\u00060~EepaĖUlӶTktgEͶ\u0000]4\u0012|cg6fco;FC.mW[lGݶ+lHVx\bcڊ\u0017\u0014ު\u000b\u0007:wwZ͝vI>\t/7N8\u001a'N8z'\u0013ƫ=wkjvC*lK\u0017{m/[\u001cz2Ԥ\u00152\t5d㴖N(X4ZŶt+5\u0013-8N9ow$Z^\u001dðcL<r7nsu[`\nHmB\u0011Ij5-bxF\u001b윍\\e7\u0005][7`rVlkx6\u0003m׆$g\"Kj$/dWya!5)\u0005\u0011'Պ۵aȼ[rޡI.6[kH\u000bX\u0014k9\u00012U\u0003\u0010gm6chH.\boޚ'\u0016In9Kj\u0006H\u0014EՎ-R\u0007Pܜ˶39)?YpRsCSMbeo=zxodNտ\u00132\tGә\tGvx5;ǗN&'\u0000qR\u001foiVWv\u000eQm#l-m#5c%r[nsɡ6bBJڎRJLx슐k\u0012[CͰjBJ-O'av\u0005kF}F\u0017\u001f)GƲ4a.{fۖؓlm\u0006IJN\bR&ź\u001fqJ\u001ec\u0013\\-\u001bl[9\u0015G\u0015ƙlI6r-\"-ڼ;Yt<F\u001c\nە-w\u0000Qٲm;o\r.b\u0014\u0013\u001c#mŏq33+`d\u001d@\u000f3|tq-Ŷzkg-\u001e܄\u001bo'\u001c\u0013Ngb'\u001c\u0013N\tGl\u001fwOմ'yxO\u0014^~[\u0001l\u001b\u0019mu91l\u001b)T4d.\u0000d*\u001c+:?*7°#\u0011R\f\u00014}@\u001c\u0002Q&IHH_#H\u0014mK\u000bvԄF;6.ZZ\u0018M\u001c\nrР\u001cz!H*\t\u0017Ғ)\u001b8s|\u000b\u0007$ZVU\u0013bl\\C\f7\u00061$Ab Ë\u001c$\u000fBT2c,\u000e\r\\5(A.^\u0017\nB<2C^-W,W7!Mm\u001am4lv-l$5\u00019\u000b<[Kx\u000b?pO,{\u000f;f\u0003붊m\u000e\u0017zuk;[\u0003\u001eЄ\u001bo'\u001c\u0013Ngb'\u001c\u0013N\tGX=Y;VK\u001bgo6?8BS%zwc\u000b<#l[KL\u0001 )\u0016o`[X-f[\u0002<.h\u000b\u0005@\u001ap>+V_\u001b\u0019\u0014[\u0003ꦖ]N6ԗMH\u0019W)r[HJKYR\u0013b)̶Vh̕\u0012_\u0007U\u0001U\u0002̌2\u0015?y\u0018\u001fdo[t<fܴd\u001amݭ[\u0013Iu9J\u0015$k6ņ䎭\u0011)R4\"$9v-ێ`[\u001cH\u00122v\\u~Ev)qG/\u0019ۮhjmvZm\u000flˍ\u0013\t3\u0013\t턣jvO(՞;Vsu\u0007PӋmŶI\u0012m#CdmWr\u0013\\& Z\u001du#%բ\u0015\u0019ɒmA\u001aDd[5\u0018ʩY5˙9&ȫ2..\t{\u0005E\u0012\u0016Ksll33j\u0016Kbv\u001ei\u001bĶ2\fJ<ѲP6REA\u0002\u0005HƜ\\1\u001fUmQ\r\u000bD9(\u0000\u0002vx\u000b.I_\u0002c\u00196HЦ-BP-X> $\\\u001bM۵1\r[@5f6lۉ{gECbg\u0011v^P:'f%\f\u00075\tGә\tGvx5mOn\u001buۇ\u001b\u000f5?:bK.~rv\u0000mIT\u000bd\u0000\u0019Iއmsgcrm\u001co{ʭ޴-\u001bFbm)mvl\u0011l\u001bT99S&\u0015*ȍ\nI7HKQ>\u0011\u001e.Onfu&\\r[T-!sɐK-<^LL˅\u000en*杨.\u0001u\rۊZREΏ;UQV㤊CZ\u001dB.\u0003*΋YʜL5@EZ̐\u001bSl\u0007Pk[\u0006ÐO;'o\u0015_\u0002 ud6'n\u0006ӒAś\u0014%Jzۡ\b){ced'A\u001bkHfz\u0003Vm\u0019lݷ}\rm\u001fiݶ}Ow\u00006Zk[\u0003\u001eЄ\u001bo'\u001c\u0013Ngb'\u001c\u0013N\tG\u001e[;|5\u0001x|\u0016<.v\u0014ok6\u0005YR\u001alӳ1іVn\u0015\u0011,$ڕ[JCr\u001fC-Gk\u0004YF#j5x[Irh@S2\tܬ^CP0\u000bW\u001c8W5p\u001a\u0005ylضZ~B@Qbja(\u001cCiT\u0002 N8YRN\u0017\u0018st_`O2\u0003fkmY՟zܶ(:\nIΒ\u0012!\f6Qj_7X\u0014)\"s<cK\u001e%\u0005]ޟ!K\n=ɗV\u001f\u000e]Ŷg#]n\u001b\u000epˍ\u0013\t3\u0013\t턣jvN,gڃ\rͶ\u001flg\u0017ڟ]-Ŷ+_,v<\u0012S\rwٶ+:\u0014\u001a!+ȊD\u0011#$K]0lZ-!\u0019b\bo\\RBr&\u0006N<QQ\u000fƫW\u0013l\u0016&2^\u0003H$. W]Sjfz`ٗ\u0016uL<6*&$\u0013'TY\u0015\u001efw͖E%\u0014%@n\u00127ୖXSΑE:\u0016X\u00194m\u0012109iny\nr\u0016#v\u001c;r]1۶2\rϴo{Gw\u0000|G;vZsg=\u0001Mxv<t&v<tp4^\u0000:\u00045`[\u001aO\u0000貮\u0001rv1nn$\fh\u0019me\u0003(lK۵l1\u0003 ٧՟cr`\u0016o?\u0016lĶ>-ӓ\u0016,TdWk9,\\MXnkuUOQآX'DU9E\n\r}\u0002Ri*\u001e`ifLK-[W$O\u001f\u001blg\rR}R,)b۴m|Peh\u0014)[n}@m[q\u0012\u001c6omm\u001fPV붺\n~FOm5^~ۭV{w\u001br\u000fpˍ\u0013\t3\u0013\t턣j\f;\u001al۾om?Vx%1O2-v\u0000e(,)lJ\u0012m\u0016c@\u0015\u0011\u001dZEL`BF] 7r\t[^e\u001f&AHlUiE`1\u001dQT\u000bSvI\u0005r9Ŷġb\u001b\u001föX**ۂ0\u001b[\u0016e\\:(X%R[\u0000u1`*\u0006jy3 VlCq\u0016\r\u0018̻񶌕I\u0014-.b}mʬ\u001f\u0005+2*趑rm\u001e\u0014ۤ\u0001$z\u0003\u0013&$\u0012-Is\u0018Crm\\ړ\\fho\u000e䃚r턣yL섣yx;hݓK{'u\u0014h<j}ێ(}{<ۢ'ـm'Y+lG~\bmH\u0002ݖR妭\u0001Eyt[\u001e0$\u0013rk*tDQm\nݍH1&2>̌!\\öp\u001bFfF-Ͼ$Pi\u0016߬2\".b3U\u0016mս-c\u001fl6nBpQlsL\u0003r+ʀp\u0016[s\u0015 K\n\u0002`ǖc8'\u0019p\u0015K#\u000e Tu٥L}\u001c'\u0015}mͲmfV}y+\u0007~\u0007mϷ5n'y]mȒ:\t/7N8\u001a'N8z'\u0013ƫ>{v[\u0000zxx~|B\u001d@-gۚ )`7oE[o\u0019_\fs\u0004QOx\u0016rA\u001d3Y|6Ԃ\f\u0018'<ʵI\u0012d͢\u0010m\u0004s\u0001l\u000bzi\u0014\bW\u0000\\\rH-\u000bĶ)=/iݶPGnwo19YW\u0010m+n%\u0010\u0004\",r{ѐ?طW䲭Z\u000f)3vȡR~;9ɰo\u000b\u001d@=M'\u00198BJ.Z\u0005![r\u0016!jlmy\u0007ouOrZ}\f\u0019tG\u0017\u000fF&'yg\u0016&x;h|p:\u0013;}p:N8\u001afۧ3YR\u000f7\u001b϶>:\u0017}\f䋝\u001f_/طGeTEZlA\u0001\u0000\u0015?\u000e3\u0015w\n\u000bҐ&!_J\nOd\u0007o&.2\u0002Ղ-K\u0003msU`̨?Kg-.ڛ\u0012m-C&[\u0014ik8\u0017Bf떸5o1o͂\u0005a(\u0001e\u0014s\"ND0d.\u0000*T+:\u0000o\u0011ʭ\u0015%ewl\u0001Kmrkm;R,,؇\u0004&s-\u0015\u0000h=IAǲa۟)'/k}pY>8\u001fjlm6MNr`\u0003r턣yL섣yx;hmŶǗN~[\u0001j*\u0010ѥ3m$'bl2!+L!6ɛ`K~Q~9\u0013\u0000ʵҥ\u000e\u0004m\u0000[by bf\u0014mJ\u001f2\u0019\\ ˶Ie\u0013r\u001bZ1\u0002\u0016n\u00052?[M\u001c\u0002\u001dA@\u0005VP\u000fi)R\u0003Po\r\u001ae\u001f;:\u0018R,rv@x;tF\u0016o+)R9ZH^e%cTBn;Κ\u0012jmd\u0014m?<fI\u0018\u0002Gs2t\u00196qR8Ѷ\u00135/ɶjn_\u001f^\u001a<2YR϶non\u001b\r\u00075\tGә\tGvx5'wLk\u0007go>,\u000ex}[ΒH+\u00160Ql`A᭚\u000e$wY%W\u0015\u0007͏\u001dQGŚdNJ\u001egٍlVk\u0006\rR`N&\">+\t\u001d$wȓ,y6䢘K22+L\b\u001b%\u0003'\u0012H9Ɵx\u0014%GhwD[eR2=\u0019]ۭ2\b]\u0002\u001cdŭf\u0007N\u0014J[`T~B@Ŵdo\u0006Ŗ'TZ\\M\u0012\u0003\"X\u001dYGm5S3̶r߶e<o}SI>\u001f9\u001b^om4w\u001a7\u0003\u001eԄ\u001bo'\u001c\u0013Ngb'\u001c\u0013N\tGlkѶ{vt޺n}|HF^m.F'JhHN*U\u0013et3N\u000f6\u000f\u001cr?!ɆR!WJrkVqh\f$$pm)#m͇9E\nQu##\u0012b\u0011ɸ\u0012iL`\u001eYSR׌%_˹n)ӄ^]FӠT\u0012/(\u0002揄G%YN<&6n=֏s\u001era(\rqE$YRq\u0016\u0016 \u001f]\u0016O+\n0\b\u000bhN[wӖw`*n\u0012nաpf\u0017mؒ՛=\u0003m2+GqlM\u0016\u0011a]fjM-,mV,֓In~on\u001bd\u001ds\u001e\u000elˍ\u0013\t3\u0013\t턣j\u0014n\u001f_\u000e\u001al\u001b\u000fZ\u001f5l{.wݷ$;Vme[\u0005\r]n\u0011XQƊq&Hv HV0NQ\u001d0\u0012JV}lhW%\u0004նF\nT!m[\u001fr\u000eZ\u0016y\u001697cWmc\u001e6m\u0002۶23\u001dVI7F\rj~t[O\u001eH\u0018+PW\u0018I];F؞\r!Q<\u0004\u0002\u0013<\u00143lK-#\u000et\u0007P:2]Juv\u0000\b75$\u0017b-k$Z1QɺxEۑ}ܗm_+.\u000f\u001f](U`{lK۞i윩}'dˍ\u0013\t3\u0013\t턣jn\u001d_\u0002Omܷm>XoTlcobGێ$SHr-#h1-ނn؁m[i%\\v|Z:f[5\u0018[p\u0014(ϝ2\u0000Sd[Eݮ\f)*B۵'tn5x1xo\u0014\f+fYڙ\f$lZE\\,\u0012V\tق-6\u0004YO2iv\u000e8)l+mq\u001bwʵ,J\u0015@okp\r/x+;Ek7H\u001c]l{_`5kb˶v^S7$\u0000j\\^\u0011ٶj}Z{Vm$o~\u0003r턣yL섣yx;hǖ-Rl|WIh蓋ѧ?[/طݧ\u0000H=l\u001b\u0019V;>(\u0018'\"͎к$\u001bSr+\"K*ekm\u000bI 8NF1\u001fRfTۊi)-IX5<&\u0016\u0016Av\u0019SJJ\u0015\u0012.I\u0018$u[YRS$g!\u000bm\u0017\u0004V <9.2\u000e\u0007\t׭%\u0019\u0014J\u0019ŏ\u0016!k:e=]W擶\u0016\u0005ܴ\u0001{\u0005\\¾x;ʶĔyr3K껯}\u0006\u000f4۶tNVkwV\u000fYR\u00076\tGә\tGvx5F5dSq{WFFóG\u0017\no?vdI[l;wmA\u001b\u0013&62l;\u0010P\"\u001ey\u001f\u0019'\u0015\u0017jv\u0000{(O25$'\fғL+\u0012qrJY2\u0014m\r޲k\u000e\u0017An\u0002UX\u0005\u0002%A6\u001e'ERrk\u0016xV7\r\u0016h+nEm9J$c\u0014E%;\u0002.#\u001b\u001d\u0014)^)trdn!TS@8[o\u0001S29F9?\nvݶ3bHs\u001dl\bxO\by\u0007o{W\u001b[o{p\u0013^np4>O8p>O8\u001do'\u001cWsӵ\nlj\u001a\u000f6\u001a6ZXq{Ǘz?~k_Or\u0014$;-tm3YCm̓lb\u0018!\u0005\u0017+\u0018΅\u001f&bml̹D\\q\u00153\"+Edj\u001f\u0016P\u0005[ \u0002l\u0000mJXF\nfG4w\u0019WºqA\u00154j{ؓL+ ҒA\u0012ly9`pdv@˶\u0010Kէdp&JFz6\tdP!\u001e\u000blKmG4\u0001'\u0017\u00116\u0001wmɀ_$FmW!9,O28Ow^7\r\u0003hoкm`ۃr턣yL섣yx;h[ǖht$?Xl9\u0017?/\u0000ڧ\u00001$l\u001bA%6պjY{$(^3lKe+2:Tk\u001e,x͖#ȓl\u0011smJ$t+ي,֍XrE{\"\\4-k0\u00071\u0015\u0002Ղ(#Z}\u001c\n,R9d\nT\u0002v\u000f7\u0007W\u0001\u0018\u0002oؘW̛VOtW\u0004ȳR\u0012\u00140oW2\u001dt]gr'?f;B֐mgzmc9cuۖڝxpymjFcwðz`\u0003r턣yL섣yx;h\u001ao+nkO-[;lGڟhVmG3\u0014p%ѐlmdHn-T\u0002n;ry[\b*;.K#0=0$\u0014$r-$GY\u0016-B[ 2,2vm\u000bq\u001f2-,\u0004A\u0012Gh֨:p)6\u0011\u0010\bϧ,Zͯm׺n\u0002uyH{?kp\t]hqp!q6;)R`\u001e-FU\u0007\u0004lki)Roc\"\u001b\u0019}Fjȇl\nѶkn[Fji\b\u001am\u0014jO\u000f.\u000fMlv-$\u001fЄ\u001bo'\u001c\u0013Ngb'\u001c\u0013N\tG<}bidi%zf}طk>bٷB!`[$#f9-{4t\u0000!5Y~Ă#\u0015:K-\"#\"z\u0013#<:c\u0016\u001d)\u0019\u001cOK.XCX( \u000eʵ(e\f=%\u001b\u0017+\t%5\\\u0003tR1\u001f)-\u0018=*$M,Z$KVdILf(enT\u0016mY_A \u0014,ޚdj!rZ2AsΎmw\fXseru\u000fv\u001cmYlm\u000b\u0017F'\t\u001b\u0003\u001eЄ\u001bo'\u001c3iw_/'ۧ4;|4qR͏ε?>ot\u001f\f\tmƐ\\s6nNN)Ul+\u00006ˋ&/c[3\u0003\n\u0018WV㛶Jn\u0005F\u0001$-\u0016hOHNrwDe)r`=\u0010kL;(\u001b\u0012+\r\nr\u0012h\u0000U2'\u000325\u0007aPB N@dǷ\u000bj\rq-ل$eo[OMC$\u0017H\u0016.V \u001d@<$wFm-l!n.\u000f&%m_\u001a?hװZ}tw?)EߤW\u000e̤Z[\u0013N\tGhVqŶ;o4\u001eATGm/?{\fO2m|ٖضNAR\u0011[2mzVf[oK\u0018+mW,& ޥ\u001d̓K܏$g|6&J%\u001aQ\u001508}\u0006-xe\u0019u[j;\u0016e\u001f\u0016sf\u0002\u0002TR\\]\u0011\u0016}\u0006{熘+U[-\u0003z\u0002EQ,4犰\u001a\u0005JZȭa˹qxkw(9Jʭ=I\u0016I7i\"R#3E[(\u001am?m!_\u0002Mv1K\u0016yU^\u001c?Ql{{9u\u0001tP\u0013^np4>O8p>O8\u001do'\u001cWs\u0013Kmo^8Z\u001f\u001d@\u001fn{Y\u000bc<\u00116hf HjjG!wreޢ-blVo9ܣP)\u0000\b9$x\u0016oM\u0007ncd\u0002_5b6:{\u0012l1$ʬ߲\u001b9\u0013j\rԦj&Q$K\\׬vȥ<`K@X}+㤠9lݚ'\u0018\u0016\nsM\u0001\u0010&1xo6T\u0019\u001b򫱐d\u0000\"YR@\u000b\u0015Ŷٞ<_OM73\\&Ar[J\u001a6-lN2\u001d`[n*D)VUz\u000e>CJ1o\u001b$oG7]\u001bVh74BNMxv<t&v<tp4^cK\u001e\u0007ur\u001b}u[]'\u0005lH/NsHrp[rt;YR\u0002lv-\u0015\u0003,)\u0001,\u0005\u0012brTd\"\u001cQL#+\u0015꒚5[!K7|/j\u0011C:by֍D\u0006Mwu\u00197v!9SNͪa\u0016p(C֭\b)m\u000b}*S\u0019mq\t\u0017@Z0%\u0017bi\u0003kW\\\u000bN\u0014f[QlQxf\u001a|\u0007S'ևm\u0000\\knahN3t\u001e5n\u000bllt[ͶTlBfkot\u0000)\rAMxv<t&v<tp4^$\u001f_6+w45\u001enL\rP\u000bzSͶ+?_KjrjsS\u0000R\u001bl\foӳzR\u0012m5@,:\u0012l-9m'\u001eٷ\u0015\rN`Q\u0012\u00031\u001eY$\trG\u0013x\u0016\u0014Xa9fM[،43\u0017s .f\u0012\u0010E5Mc$.\u000e)?U~\u001cuC-{E\u0005[T\u000bexl`v\u00031\b9Mġff\u0016V\u0010.L\u001fI\u0007Z7ST#=2H\thV[\u0000[lx戣ɖ<ێu[Ŷ-Il5vo\u0006=\t/7N8\u001a'N8z'\u0013ƫyTҎ\u001e-\u001aOrz\u000b?<=ɟ^jFC\u0001ۖ_򡯫YzI\n5\u001d@l;70˶cȬ*U\u000419tM۾\u0006[>NsfԀv\u00156$9\u0013\u0016IG-yY\u0015튶o+;mmSn[qR\"j\u0019TӼc+KY.js\u0003O5)\r*-\u000epdðAR}~ٺS\u001cM&1*`6\u001f\n\u001af\u000b\u001d|^\u000eIֺmz)5e\u000eUH%[b\u001a9ͳ@\u0019BZMȶ@j57kӑX\u0007e[ێcgfeI\u0006CzC۞\u0007&x;h|p:\u0013;}p:N8\u001aF-'tݵƣ\u0007g\u0015^hz1m/<6_c\u001czU]8ݷ(=\u001bƲ3\u0015sPk;:Ү\u0000rZ\"\u000fDZ\u0015p6,@ڈ⤢㺭hMmc*-\n\u0016\u001dgu\f4\u0001uJYI_\u0019{n\u0017oy5Lfr1$c\u0007%󵏹c1\u0016:mrZX\u001d+\u0006ٷÍ\u0001d(Hnmc+&Gpܚ\u000600\u0003\u000f\u0000o0{Z}~i\u0005\r9\u0000\u001aa\u000e8~o|fۻg=6w\f۞\nl{@\u0013^np4>O8p>O8\u001do'\u001cW=%U{F{\u001f7\u001f@:lf)1\u000bl[6l[x[~2|uy\rI4$'\u000fJ\u0019Βz\u0006c3/\\ʮ9yr\toͶZ\u0005;m)ײzkr\u0006Ӓǯʊ[VoKI.Pmʀ*!wH9؍}S- \u001b\u0016iC@T\fz۷\u0005@֪&$\u000bt˝>d# JfV/\u0002۶Vx[g5&K\ro\nI+&ělg\u000evx\u0001o\u0015ɎġŹ\u0017\u001a\u0019f(zfyD\t,9˶oz7^\u001cܽu=\u0013$VW\u0013&x;h|p:\u0013;}p:N8\u001ac;'tŭb{gt\u0007У\u0007[Ɠ|AmK/MP<b夞d[)f/\u001c#U)\ng\"50nH{qCіL\u0005\u001d[:)[\u0002[J\u0015L1E\u0016\f7Q`{\u0019\"8-TLN\u0018s2ub\u0014W+5jq9\u0017®\\d\u001d\u0012\u000e\u0012\u0017ʀV,RYeȅ\u0015ZW;\"\nE\n\u0015Bg\u0004hGE5`'5T{ew!ỚĿAͶj\u0013xK4s}C\u0016SmzYs\u0015l\u000bofnjynj4'ۯ9ɆmEw6zvqtf`ۃr턣yL섣yx;h\u001a*=wO\u0002f}[Sqۑl`[3x[z^mVϔř,*\u0002ZgeTƨ+~0\u000bm3\u0011*8\t9\u0011q-\u0006\u0018sgMÉƓl;lK6-ٺN)JJ\u0005tvmf\rZڕK؋eڴE\u0016 EBZmuxToE^ئ\u0001RZ\u0004[2\\CfVhN2^'9k877Iΰ'\roDL74n$e\\\u001c3<12ao;m.62sSl=5L,'\u001c'f4&$iݶ|VKzsL};dI\u001d\u001bo'\u001c\u0013Ngb'\u001c\u0013N\tG\\?}ti\"궧-D%\u0019~\u000b#l;Zj\u0003VOz.Ut\u0017\tIvmG[\u0000[\u0000bZ(\u001aomKi[h\u00070,aN2Ɍ$Gm{D-L<Z-똜$\nE)֮xdJB\u001e\"\u0019\u0012E_mDK\u001c0%ږ\u0005qȵ]·<Ǔ<N\u0015En\u0006\rŴ$}8eĬۚi\u001bSu]{ö\fr>o6єxEU{gx禚x[m{YkwPn{L+?!\u0013^np4>O8p>O8\u001do'\u001cWsdI`mƃcͶmo{g-OYh\u0001\u00173sCav^ks/`Kvvtv *nl\u0005ȶ\"9Y=E6\u0015\u000fI.`\rPdF4#4An\u001aL\u0011Q)Xk\u000efF6=J\u001al+E\u0016g<LW#\u001aEOr5\u0001ĸ*Vn\u0005\fmϖ<69Y,޷ʹž\u001dz\u00136mm7tkq\u0005\nmKΥ:H\\U\u0015e5ޜS7Mz~u7o)]WH}ZW-8\u0015&x;h|p:\u0013;}p:N8\u001ac\u001a n7~ۍsǗڟ\\|z9I[M1E-8)$#j=\u0017\\}a\u001f\tPa\u000fBƚ\u0007ȶTq6\t\t\u0004\\\u0002p\u001bٔ¾mfIu\u0001o(Bے Do[7f\u0016e\u0016m{Beü\u0004`TFѶxW&ܡ\u0015\tɔ<\u0014)5vIpZ\u0014nׂK\u0019*\u0002r\u0006HO*|8R-\u0005I\u000fw\fl1o\t\"\u001d\fFr&[2\u0012-\u00104pn>yDeuun\u0019V᭾B&USR5\u001dc[o}\u001bۛKjn]=xW\u000fB&x;h|p:\u0013;}p:N8\u001a*ۚ\u000e֣ۧ.(mǶ5mloNx[Wß\u0002\u0001[ö\u0002*]\u0019\"UB\u000720\u001al\u0007\u0000\u0017oɓ\u001azM'YsmDYRh!\u0019T,$Ys\u0011\nqǖ\bcSquJٸ\u000eiQ\u0016-*\u0007Iu\u001c͸+H+ZA1o\u001aȭZrmq`\u0016[n\u0007DC\u001f(ճ`pѱgP\u0001Bfu!\u000fD_R\u0014~{;\u0018lo)0\u0019t[J\u00066N\u0018d\\-X1-rm[趑F&)ض>Vo}{7nltow7\u0016\u000f\u000fW\u001c_vb+?!\u0013^np4>O8p>O8\u001do'\u001cWsp[m!Nqo]gIh<>z+PgIړ<[ML禪sӊd!YI\"\\}--ϲp)\n)\"֬r`2J)t)N\u001cFeCR\u0014bHm-\u0010\f؅qR\u0000\n#\u0016eLΠ?$Z[fFv\u0000}@hHYZZv*\u001cξ--˵<\u000b-w݂-\u0019z6]\u001aQ7\u0000mbV,ۦێJl[H[B]mm~TK\\$J\u0001\nv\u0014ltx5f\u0012g~\f5&gzo\u000b߸ٽz\u0016jw_-J\u001e\f䃚r턣yL섣yx;h\u001amOQlt3k5%C\u001dö\u0017sj*\noꃒII2ȶ25m٥J\u001a\u0016\rɲ\u0006\bX\rI*e\u0011i֊9\"G\u0012o\u0007ҏ\u000b\u0000Z )ɓ\u0015\u00196m\u001evbr\u0012\u0019\u000b\u001e4\u0001\u0015\"\u0006Zn)\u000f\nu^\u000b\u0003୵(s1\u0006[u<\"0ޒnKz.&G\u0003Jen!-\\՛\u0005P)gv\u000e Cok\u0016\u001ba[\u0004dNnӘ\"r.4iɴc2\u0013\u000fI_b` UAd&IȖ+М+f\u0016\u0013Sʅ\u001b^?\u0013{l{-Ŷ.Ϋ\u001fYv*x\u000fhˍ\u0013\t3\u0013\t턣j\u0014<Z\u0016\f[o<lsmu`\u0017\\IVtunJm,!63X\u001bp3p5\u001afx\u0014NV-\u001a\u0016Kx(\u0000\u0011@\u0010\b)%e3!^٤!w%Z\u0016dG\u0011\"\u00165,Lw\u0005sH{\u00165\u0014!6f3\\V\u001dY}\u000f\u0000[\"/\u0017ݒ[\u0018x7n\u001f\u0010iY,5l\bg\t\u001b$]V\u0015\u0002mڶh%JonF\u00169ɱȍ\u00164f\f&fJscl+<W/s[[w.~Ւb|7+\u001d\u000f\u0003r턣yL섣yx;h\u001aI>x\u00185Ͷk\u0007\u001bǺ6|\u000bO.c̡Ԭ\u0016mI62h\u001eA۸Tp\u0017u\u001b\b7\u000bb\u0016EҐ-nѐ0c\u0015[\u0007o\r\u001cuP%CrAےbۥxd\b2)mǭ\u0016ph6qR\u0004d#\u001eF!\u0015=|`l[F(EFWZeǫP\u0003g\u0011\u000femmHT߄\u001ft#\u000fI(cl+\u001d΃֖3.h\u0001\u0011vy6y޽eZnshQF+<\u0003%^t\u001bn[V3p\u0014ώ$\u000bo\\ƵYl|𻯕=R\u001am\u000fjˍ\u0013\t3\u0013\t턣j\u001f8j<'ѓzfS\u0007[G\u001f_lj\u0005ö/$t;7\r4}\f\r1lR\nbܜhk$-\t\u0019\u0012\u0016?*.&\\M9\u0010\\H˶n*ͳp-\u0002s#˄Vt w\\Oƽ\u0012\"aӖjuZ\u00156>UN~%/\u0013ъ\\\u0016AR\u0015iH6®\fI(\u0007le\u0013l(o\u0015a[6)6*)ض657iv$!3&*ydvT%C2鶐%O֍?\u0001u۔Ifm\tַMNrݣU\u0005j=xd`\u0003r턣yL섣yx;h+7Vo\u001e2ީg7\u001el6\u001emj|\u000bq~ۚIZ$72\u000e60ZV3B]+\t\nooH\u0016v`\u000bb\t\u0002VۏM$\u001d5@mҟ};/vis)'6£ؙEEg2fI\u001elȉ> bN2\u0012n\u0006]Gƭ[6Kyv#m\u0002޼$\u001fRiۮV\u00100yfۡ޼'%\\\u0010d\"<;+n\u00052@k9'\u0007j9Z\\)ۮ ʧ,)*\u0000B-r<-Ŵ|\u0013?hkoj#`\u001b[\u0004[\u0000jrhvF붉Q59/];Q{HcQuS\u001a:\u000ejˍ\u0013\t3\u0013\t턣j\u001fպ\u0013[ǗO,^^^Qz輮l;u\bضlQ\röMöok6lK6sڮl\"8{2u`ە|bD8fL\u0014k1*9lK)RmL\u001cr\b᷃m\u001as\u0005'*\u0019)\u0012E'?\u000e[KH\u0019*\rI.{BZ\\j;dTNە\f\u0016!0Jl\u0016#Z0Vݭ[\u001bL\u0018+rS9N\u001aо-;zɶ'\u0007˶Ph+ؖ7mٖ\u0012)\t\nmy6\"9O\rP\u000fضFǰy\u0017mض\t?趻^;׻yySW-]?-~'dˍ\u0013\t3\u0013\t턣j\u001e<Vqb\u0016wOn[Yxև\u0017ψm\u0017\u0014N#\u0004.f!y\u001fv,᪩\u001a])$D'˵֓?\u0019(\u0015d\\eݖo\"w\u000b9ɝ\u001cw\u0000'KH\u001bs#\u0006hę\\\u0012Wo;rM@1[\u0004ԱK\u0016oĶ\u001afVndu i\u0002\u0012\u0015\u0015f[!R\u0001\u0010yshKXu\u0016o5@ȶg R\bئ\u0019l\u0018'Kݴ}EY|옜d\t`HJ\u0016X\u0014@Ǔ\fv7ݵSkǗRl[\tl{`\u0013^np4>O8p>O8\u001do'\u001cWspEKǵ'yĒb۽3wnhh\u000bO/#V56lk£j'94`ࠞ_&&j%\u001cn\u0002g96_\u0005@BMÍY3}\u001d\u0017mgS#I!h˞dKE]֔MEm[@=\u0017amQޕ{ŴhMX5Fk\u0014\u0015㪯69Qp1<dT\u000bC[R\u000eC\u001b\b1V+npmB\u001395~+\u0005y\u0003\u001amY\u0019$\u0015ŃRTtD-\u0010\u0016,)NKPgSm[f&?m!K*g6[;\u0017_s~Vkoqc׎-HZط=\t/7N8\u001a'N8z'\u0013ƫfU\u001e4\u0015ږvf碏.9'Yb\u0005αn+\u0016,S-_F>3\"7vm-9kH\u0006ѺmȲ`N\u001e/F\u0005A\u000e\u001aՏ;1d\u001cA׭\u0015jKVHdgx\u001fP\t\f&$g?9C79󰇫w,r\u000f\u0017RM-e#-ۢ>\u0012-ᒵ\u0003\u001b$\u0007dC0HJxoVn)Ev\u0000Y鶌<'ݶ?U5`[Fm\u0001\u0000u5᪟!\u0016Apv8\u0017\u001cm\u0011\u0005>}(gV\u0017\u0015mF{\u001b9Rr|ꉥka&x;h|p:\u0013;}p:N8\u001aڛ뇫׎To\u001e[>{jٷm>l~BEdL̓`Ors\u001fOr\u000b[\u0010V\u00143ZT\u0003[3m;\u0006r\\/2mo\u0006 \u0016)Q\u0014m\u0010jǈ\u0013$enr\u001c!]\u001b'YR]\u0012b1P[N˭kB,)HW\u0010( Җ+`e[\u000e(ڡ0\u001e\u000bIE?H}ܢj-u W'W7nk9b?en;\u000f\f\u0007cnѐl4igHtͶ7aT\u000b\u00119gv\u0000nk*4F\u0018f69S\u001b\u0001t7w.xmŶk\u001b';RUT{t-Mxv<t&v<tp4^͕Õk׏oB3;g\u0014\u001fn4\u001e}'\"ɶI\u0015lk\u0002v\u0018RN5\"?9\u0005o։pՓ\u001cY\u0013I.,)\rA\t\u0017;А<*ݎkI\u0011ئ:`\u000b-q&k%HnfTlǵ.8[bn\u001crKLܯJm>F]\u001e퐲UڮJb<2R<24\u0012,8emŲmnH;\\\u0018_w9ef-ۺ!ɲ(I~\u000bcܷm\\Kndgv\t`\u0015*\u0005ARr\u001b۷,v:&^֭\u000b/mD{\u001b'9+&x;h|p:\u0013;}p:N8\u001aʛko\u000e\u001b\u0017oX=wfI{чm[v\u001evt9b\u0004\u001a+\b\nu\b7kFKbVo$l\\YcK t^= ł-X\u0006K7\u001dz\u0010\u0017r\u000bVd[\u0000dDn96Ӓ-M;I7\u00166C/u\u000f\fؒ\u00130Ŝ6@\u0019EyCc˶PS5Z*0/:l䡳u\u000bG\fb!\u0013\u0007\u000b\u0005^%-[S\u001f\u0010n\u001e\u0012\u0007.nL\u0015<-+0ަۤϪi j~\u001b\tCr\u001co'9\u0012qR\u0006o\u0000o-ۦf3/\u0013LNJݾޖΒv\\mƩeŶWO\u0004&x;h|p:\u0013;}p:N8\u001a7*WI\u001ax|ls\u0018ls\u0015LZ\u0018m>,f6.~\u0001Z-ݮ\u00143\u0003+\u0002)R\u001ao\u0003#Ym;L\u0005\u0014/t[,)\u0002 \b\u0000\t(+\u0015i]qAR#֓LRtu3r\u000fnݒU\u00187pݜ䢑b\"Qy$<J\f\u001a+rˀEqQõ\u001bi'\u0006'oZ޷,-\u001b\bbi߶!yؽe6-Eۘ˜ڇpcx\u0012l\u001be9Q*%tٶ<Be\u001af뗿u;[Zw.^?Y\u000bl{\u0013^np4>O8p>O8\u001do'\u001cWsͲ^=Rl{|q\u000fݵڃC\u001d\u001c=m\\6\u0019IvqCrSq\rՂ[\"Sb@\u000b\u0015EB5D~fk\r9\"Yɼe[ڙ\fFf+VυeX^\bexG\u0001=Po\u0015Z7+̼E\\ZY\u0016r\u0017{\u000brЩ)\n\bPk̚gĶV\u0005G1rnn\u0010ϕ\u0002}֡Zu@@jWݭX\u0001P!ۥ䎱\"ݖ9Ʉ\u0018L-Gi\u00025T,)mFei;N\u0005 N<Mڷݏm]MŶgΙf#\u001bjO._9\u001e<\u00074\tGә\tGvx5^fYG-lwfm?WIdI*ͬX5\u001anAVo\u0015\r\\Ω\u0001JK̶\tf+֖&d\u001b$e\r澘J\u0002.\"ER5>\u0019Ye\u000e\\Z\u0001MۥZ[z˕@\u0015u\u001bi-r\u00122Uy\u0016%jq8߶Oz;t\u001fQ\fR\u0004dH7\u0010\u001cc!mN\u001a㝶,:QPTvlmܴm)kǶpZT\u00008ض跍n|n{*WVxrfkA=\t/7N8\u001a'N8z'\u0013ƫF#m\u0017o\u001d7SZ+kړh+z<F\u0015\u001d@\u0019ͶβmVHD+cٶ)Y\nԲmO\nvT4էaS\u0010Qk\b7\u00015@Cv\u001dW\u001fuUldr& )\u001c\"#ڵY6'[_q\t\u0016o3&$ȟ-=|`'6m{ȶ.\u0019iǖ(\u0016a<\\\bl~ʬ\u001a2Bm<KJڲj\u0005Pc\u000bZ\u001f̞}Vma[\u001eG2W\nu[;\"\u0010nL\u0011RI\u0010mn\u0003H#\u0015m,N\n(kٖu[5bKF\u001aWO,HU+ǂn{@\u0013^np4>O8p>O8\u001do'\u001cW\u001bZvz={Zfplft9ڷc\u0015l-2'\u0011gAU0ue\\&<]ͧ\u000farQ3-%'$F#qCN[Q\u0000\u0011xknmbv\t@Fr\u00033\u001diK,-g,K2)'\u0019\u001bo\u001fմ\u0014mU\fF\u001e\u000ea\\ZnՏyw$[-\u0017l~\u0014\b\u0006\f(\u0017\n/ΒFn9N3OG;m\u001a[\u0000\u0018)*9~IO\u000b<fwgc׎/_;t5AMxv<t&v<tp4^b[\u0013'UqdŝKۧo\u001aZlѹ=ɨαnV\\e\u001b\u001eh\u0013R\u0016l\u001bɆNxLSӭ,lǕhG[j\u000b6\u001dǶ\"T\n:\u0005nM&2Hk@jƨLҭ\u0013!E=ת<$GiyWUCBVcl՚1QʹR\u0005[z[\f;\u0002\u000e AV|\u0002.\u0012\blͶ\"!y6\u0006+Yy%dޱ& p\u001d'ɐ?\u0016os<i\u0016嶑\u0013l\u0012m\u0013c\u000bvŗoӺFVr|+N\u001a=ß\t/7N8\u001a'N8z'\u0013ƫQ`Β^?\\mK'\f]l>l~pNIc\u0004鶉&@ѶdNjI\u001fټ,5\u0001e͖\u0001\u0016\\\nY\u0011\u000b%ԵjX`hk(?^9\u0012Uo9HK`kmK\u000eK@v\u0003W\u0012RB\u0015Gͣ!gVu\u0014\n5yP:NJD\")CvVD\u0001\u0003iϒ\\[d\npJ1|yW_\b\u0018'%\u0018\u0014_g`\u0012{\u001co\u000b]FVmuc4\rlgǶm\u0018ɺ\u0002.э8@N2m;틷6\u001b[gjWUy|dm\u000ftˍ\u0013\t3\u0013\t턣j}|MmO\u001a Ŷ{m\u000f6\u001a6\u001fm/V m\u001d+2-<ʬEڬZ[2]͖!Y\u001c/=dU5ZUdQOM)'-EqdImu[iH\u0016!\u0017:h?6[uZ4mO\u0004I1v4Ԭ@>S@5QQ\u0018\u001bE\u0016e\u0011\u001eE\u001a )q/ӥb\u0005@6Qxܖt>\nZz8)\u0007o%o\r\u000b}`[\u001aoHU\\\n7\u0006C2)j\u0019cNfuVkw\\B2\"mv\u001c>\u0003WnPZ\u001f\u001c*v|ʱ\u001eЄ\u001bo'\u001c\u0013Ngb'\u001c\u0013N\tGռFʛkGW\u000f/)U+nOn\u0015g[Z\u001f\u001fe[g߶ے3\u0019؄\u001fcHrni֐Y\u0015^ ~\u0016hk\u001a\u0012ܷ\u001dR\u001eo\u001bnH\t\u0003Qɶ\f\b:<60V\u0002\u0001}[YE[2ߪϏF*h Jw$V^؃N[oڒͶ,V;i!eRTˀF\fɽBZ-ے{6\u0016\\p\rĶ8\\X\\`CrZ+\u0019Gm;\nO\u000e=W.rFowutʱ%I6l{hm\u000fhˍ\u0013\t3\u0013\t턣jy*=l}L;gj\u000f\u001aF˶\tmn\u0001Јh+r[\u001f'+Z)Xui%%z3dG<4AnZJz˺-˵\u001c\fpjəav\u0011{|hTڮ$lxT\"J\u0015CXn;O\b<\u0012.t\u0012Q\u0018\u001flK\u001bmAu#s\u0014XhB.ieV\u000egIɠi'2趆j1*͵9\u001b\u000f\u0011-\u001e\u0011pۮt+\u0001(Irm\u0003Am=5n{SfZs[{\u0017fړ\u001ct\u0003r턣yL섣yx;hwn{p\u001bG\u0016o\u001d[>vn5n6\u001em5yaߖ\u00166m5ےgX/B\u0001PM5Yю\u0013VkEA\u001csiX4'(5UOL7?yn-u⤒\u0018$\u000e \u0016SHoK5@\u0005]M[[\u0010[;\u0014DAm\u0017p3\"K\n1xӺ\u0010'\u0005\u000bdf6`\u001f͕բC\u0006uF\u001dV)\u001e@ŸkޅFbfoWk9o*ϝҁlS\u0013\u0016\n9\u00007\u000fmp<d\u0005EEY/ۂV+#\u0004\bl1!9m\rɸ*q˭\u0015m.\u0016d[\"\u0015d[G}g-öN,\u001f\u0018V핣կ\u001fLxv<t&v<tp4^ͻU\u0014\u001a]yL\u0013zVܮk}tx@ma[.\u0000Ě`\u00132{9?--[䨖أo\"\u001a?\u0007?dL\u0000vh[\u0011\u001e,)طu\u001etokR\u001dy\u0003fcܺp-zKR> \f7+%ٖq W+NO\u0011\u0013^egҥO\u000fG2K:O\u00107]\u0016\u0016\bwT[e\u001d\u0000\u001b\u000b!c\u0003\b}(2æ#Wmwo\u0019uNg\u00044\u0012$E\u000e}fޭzիǗ\u001cUl\u001bt\u0003r턣yL섣yx;hw^+vG\u0017o\u001e^9sjyTmoMG%?j<<@Z\u0002n˹RҐl\u0017lc\u001aQWaHI5n\u001c_t\u0000a\u0006>yM;2-ʣ<kF$$m>m@-\u0018qτ> xk-\bİhH Z0<jŰ-\u0016\u001a\u001cl\u0015-j-\u0018leqHTtKU,4Yn!8\u0002mBONma`̹#d&^1\u0006șy5\u0006lo+Ȗs\u000b\u0001\u0014\u0011\u0012&\tf!*93mYun\u000bG,ZC2w\u0000%XeӼJط]Nob\u001b띛mOծjOrU;\u0012t\u0003r턣yL섣yx;hw^fkG\u0016\u001d^ydq˷5o6\u001em=>'Y\u0007:-\u0000rmlv\u0006n.`\u0014\r\u0019Crza9H\tp)Ԍ\u0013QkKk\u0019V+]wVF%E\u0014<A1\u001cu`喤\u000eZٖ\fQ`Bɀ\u0000zVF\"\u00175?V3Ð199x[%\\p)U]^E%۵>,*];rmR\u0014v\u0015ɮZxqRd$g\u001b9\u0000rmSB5qRFftB7\u001eiG4\u0012\u001eՎl!\u00074%5v߶;p\u0013mbm\u000b/L=?%CIn8mm\u0017{|P\u0013^np4>O8p>O8\u001do'\u001cWb7*\u001e^Ul{Ĭܚgw`vCKm\u0013Ɠl\nd-\u0002`\u001aK&!Cm\u0005?9n\u001f\u000eI`[HqK\u0003-\tR\u001dn\u0015O5\u0012˶)r4m,T\n\u001foK\u0014X\u0015m\u0011HVco!\r\u001bF\u0015ռShKPe_jpepN\"tQr\u0017\bo˅]W_\u0017<ɶV@.1'Y5ۚ\u000e \u0003#\u001d@)\u0001\u0004?I\"SZE;:n:˶<ɣɈ̖j\u0013Җ\u001cYCr,'9a;3K\tŶ-L=\twy˶_vnxc{t{m\u000f,A=\t/7N8\u001a'N8z'\u0013ƫy\u0005۾YrX\u001al[]qk<\u001aof\\Od[o\u001b![Vٖ\u001d9\\2 o\u000bjW<*Ң\\'!c\u001b4\u0016S,b\u0014o݊\u000fa[2'crrG\fwm\u0017\u0007nEm[-g\u001aW\u001dUcx\u001ao\u0011ʨV\u001f<y\u001cɅX\u001d\b훲ZR\r}[n;V,)m9Vo%wq_}ݴ\u000fiIBh˭D4\u0003\br3iu37-bۍS\rͶGF\u0004I\u0005=\t/7N8\u001a'N8z'\u0013ƫAOeö7\u0015\u001e+''y=ɛ6Kja>ld^\u001d\u0013,lyk6n\nDՋ,| l>*骷&H\u0019,\b\u0006Q\u0000\u001d]ZYmg]6͢-S-D%\u000e \\\u00144nR-\u0000a\u000fv\u001ag-Hپ<!P)\n+,ePZeTy\"\u0013*U)RCnM\nu\u0000\u0011uO)ؖWn,\bw<ʁF6\u0011߱\u001dn!\u001e\u0019+nI\u0010?sK2$g&\u000eF֓L9ɀ9S35öQ&\u0011HOs=طrl{+]rd7+_?\tr턣yL섣yx;h\u001aŶ}۫m,\u001aZ5kG[Gc\u0016\u0012.BTr6\u0011۱d\u0016#Z#B4{PmE˻FK\u000b8\u0015+ll\u0016m~Tl+cz\u0010fKfǖ#8\u000fDz\u0000?\u0019\\^\u0005զ|J\u0003UiJ*IE\u001eTt샴Ê~\fϲ>\u000b~\u0005\u000bkD[+t\u0013KKXY\r\u0014!\u0014v|؆A\u0016e(~*&\u00029Ʉ6x?ۺsmm,'\f=ضstSGZʱ.\u001btۃr턣yL섣yx;hw_\u000029K7\"\\;Uk-˶Cm\u001dݶ)D[â-mڲ99je\u001d\f+̮%nD#t.䲆DdSt\u0002.ۏ\u001b91UD,RpɮvamR\u0006IPTmZ5dFNuiQ\u0005j%/1\u0000iU>\f> \u001b!ŏ\fm\u000f\u0011SC\u0000+\u0014)F&V\u0018\u0005E3x\u001d\u0017\u0000\bD[n\u0015?\u000fQY:GVBnV,۶rr\u00157ζM\u0000ڏmϿ|ukxLک\u0013\u001cWw\u000e\u0007=\t/7N8\u001a'N8z'\u0013ƫy{oT}\u001eQl|먎9v~w~oxl[l\u000bs\u0011ONO\u0019*Cܴڜ5$$qD\u000e\u0015}l2+i\u0001DJYk\u0016rc۵r3ה\u00019vǶdӥHEFD\u001eaV3MԀ}$\r\"˸2E\u0015jǗ5[F+U3,\u00174\u0002\u000b\u000eh[˵ܱ(JfvNf`\u0004l\u0018ҧ\u0006\b\fHk`ش\u0007i\"e\u0003uJyǐ,+n#o\u001e˶3+'\u001b\u001e[˿\u001fYQ`7\u0003\u001eЄ\u001bo'\u001c\u0013Ngb'\u001c\u0013N\tGP:']o{MͶǗvO״-y``l\u000bqRm~j,)%\u001e~K>f,'9^S\u0007I,TZ\u0003ib\bmOC\tȻ\u0006uIǖl\u001e!m[\f)nɐl,%)y[\u0012嶴i눰U&P\u0017Zm\u0014)GEea<\u0016dm\u0019@UoKYH?\u0006ȍ5-,\u0004X+\u0001R}3ȶQ$ݦ\u0018~#fD!\u00182VHaضga\u00147+\u0018\u0015YR\u0018?o*}do.~_o\u0016˅^\u001b\u001f\u001e.'dˍ\u0013\t3\u0013\t턣j~ZY;x\rl&Njtڽƣl;&KJ\u0014\u0014ܘDV\u0010XZpSp΃\u0006c'yЮ*naM[H<$S\u0001-qX\f^I\u0002Q1\u0010![ttkҥm\u0018֭V\u0002>>;nV~N4<\u000fx#\u0005VQm m\u0006(,{lX\r\u0018(τۛ3\u0000#\nmž-\u0005>k\u0016°\u0016J왟L#3\b\u0010\frQoݐ$M߷O=K{\u000f\u000f~Z%\u0017/~{u\u0007o\u0004=\t/7N8\u001a'N8z'\u0013ƫeokʛ\u0017\u001f[qRۧ-zöSȶi,\u0000\u001ao+MVlڜdQVk\u0005\\\u0007\u0014ScQ%4=\u001f\u0003_\u0000ii\u001b\u000fI\\)kGmA[\\5$ۡ\u001fo[v#R\u001e\u000b\u001c<\"C\\\u0007r<Qu K\u0019J\u0002\u0016|*|\u001aBdO̲-13Ge\u0015ێYeEO2 m$o[t:~G-㳤@e66g?{xiqXȦ3k|^]m\u000fhˍ\u0013\t3\u0013\t턣j~\u000f_/\u001a mG\u0017o\u001e]>wBI5+\u000fGtXMRTf[X>\u0012T\u0003D+\u0011Yt:]FXM'\u0019\u0015zaOv\u0001H\u001d\u00168ٽEn<\u001b9\r-\\w\u0016\u0011]N)EiQ ڊËiK©+2Vyc!Qvǖ0\u0001\t@\u0005\u0005uԟ<XO嶈dK\u0007<˺BF6as%S\u0003vv?\u0001\u0017ض`ʀ;q˶&p\u001bٶm\u000bt侺mX.\u0014rOo\u0016~\u001e:\u000ehˍ\u0013\t3\u0013\t턣j~j7^rzūG4,Kk:*yvgps'ٲIn(Y\u0000\u0004$+\rɢ6\u0012ȸrK\u000fF\"'$ZJmZn\u0012\u0002&Ͳ-\u0011~SL'٠m\r&\toŦQ\u001b!-\u0019n\\\u001c$)39b\"<!\u0013\u0015S+\"ULNZ+\u000b\u0011ɻ\u0007\f6\rYS1o\u0016\u000f\u0019iv\u0016]o[[\rwuj} \u0014vN\\S\u001b+LLŭ1KP\u001fPE\b\u0004)FmIm$gl\u0007KvV^H~?_.n{/|'dˍ\u0013\t3\u0013\t턣jMr\u001dY&\u000b@fЙoDJ$D\"\u0013JtUW\u0000\t A\u0016\u00005!\u0013\"Yݻcc3;Ujf=`~~\\\u001c7\u0012d՘%,0\u001bLH\u000b<xsΑf-\u001dLٶZjooQkl;SؖNd{ܽ\u0005uz\u0004\u0003\u0017O6Ƌ~z\u0019\u0015\u0017ŴdWlі~[G\u0004/\u000bw\u0015\u0002)\u0001\u001d[z\u001djche6Z*\u0011eҢ%\u0015D,g#9b\u0014\u0018ȕJ('mQsy\td\u00127E\b\u0013MH\u0013~ۘGkb6\u00189wB4BUͺP\u000e/VȶE=K#\u0019m\u000el\u00179\u0006\ben:}=,}[I\u00075Km)3?\\vf%\u000e3f-ُ\u001bceKcluV&VX\u0018ڍ\r¶[[Ǜt)D\u000b_<(;Kj\u001f-\u001b\fl[\u0016$2d_y,1J\u0016٪pr$g#u՜d[-^hk\u0007i\u00166\u0001\u0001؆bxބ+\u001boMcf;\u0004\u0016\b\u0017V\u001dί>\u0007B%XJw\u00042<9yUIfj/,\nVN\r(=q]bƲ\\#\u001d[8cӖ~V3\u0019ls6mMۼ{ehenJm~[\u0016/l,|7V\u0016wX.\u001e^=ZvMXҘ,[-ɲ1V4Fڑ#՛5q$$\nx{z￻\u0007:{\u0012Rhl%\u0007\rj\u0014\u0010n/=/k@\nW]t\u0017L\u0018\u0013i>l\u000f\"ۘr͙8݆H)!l+m\u0011촕_U\u000e#mYRc\u0007\u000fC^m\u0013\\\u0019\u001b⭵МOQ@\b=\\\u001ck\u0011Z\u0006\u0014uMH\u0016Qd=V3\u0015.V}u%VB:DL|p+wdۢf[%-:Fpoo;`@\f} \\ɶ\u0005¶}g\u000b#'Ϝy}%|u\u001fxs\u0017ւ+Gjl.~\u0018+[\u001ae37Y:ʖ(]ڍ-r{X-%uӭ;Eٖ??\u0007\u0016vm~[nr붇[h\u0002^ފK\u0016`(!Q=u6R\u001coc\u000bPe'J#X׭\u0000XhmS*\flP\u001c\u0015HN&\u001a'~&$f%er\u0000\u0014\brEjd\"4L}Xâ\u001eD 9Bƫepf\u001bȮ/7\u0001+K'\u0018vG\r\u0019QR-Nd[];ĒұՒ\u0019V\u00058,)Nfc\u001b\u0017>|h\u0011\u0017V\u000bףk׏\t_)1V4&VgjeKolu-QQ>R\u0001O4>m7<8EݼofIM`[5'9䦭\u0018$\u0016\u0003n:jEQ7\u0013xbYo+8\u0017|[Aw\u0004!?0u\u0001iSٓ+yc2ewQ\u001aY\u001fD\u0004l\u0001\u0018U6XB.F0a\u0015.Z\n\u0015O>\u0001GehN?fO\u0017\\ch\u0015Ík'GzX%\u0006[c+H}#ꢻbuv8\u0012l'T+Vk\r!\\~[I}s&\u0003g۷\u00176\u0016.}ok;\u0007\u000eF\t֯Y-ُ\u001bceKcluV&VX\u0018\u001b\u00156N\n|G'\u001b\u001f\u0000떲Z\u001f@jY֕D\u0002]G(\u00039VU\u001c'lȅ\u000e~\u0003[\u001cr{-OFZZ\tʞ\\1Ju*\u0015S\u0004zb-\"5m\u001dlb]\r|[\u0012ud\t\u0000sՇ17˸Vje2d5636h]\u0011;mdV\u0001\u0015v+ߊ?@9eζL~æ`۾v\u0007\u001d\u0011}7\u000e$\u001f\u001c?\u0014oh\\?Ѱ~\u0018+[\u001ae37Y:ʖ(]٨\\=\\>Bضѱc'\u001b~vuxfF厳$ۖ\u0015ۊ1=Ȓa?GQRVvJV@1%N['\u0005-KUB]<\u0012TŘ%5Ǎ.\u0002*(\\-y\bz]\u0019LƳ<~\f\u000f!WeѨ((FӥdcjB\u0014덭eGE0.\u001f\nr02\u000b$\u0007pl;cy-kcKYң\u001e}D-  ojy-ˢ\t\u00176\u0001\t\u0015]\u0013m\t^}\u001eH.\u001eN.mT.\u001eIշׯ~ݒ1V4&VgjeKolu-Q\u0002Nuzh6\u001d'dS-OOnmծ\u001d\\:\u0018e3.-\u0014)Ivzr/&$FZp%Z[1Ba~\u0002R6Rlâ6\u0015!&ܝ3\u0002l1ۺҽE`\u001a 0sGjNkq׭4me Y\u0000%Z:\u000ea-zrU,\"_V\u000eC\"fK1\u0005gv\f\u0005\u0011gX\u0002\u001e\u0003`-%yAdmH\u0016\u00179M\u001e\u00136;Y^w?E\u001dV9\u001c,߁<,}Lr{gᅛ\u000fC+GjW6\u00177\u0012\u0002I-ُ\u001bceKcluV&VX\u0018+km\u0002u>*D͏{xfNlK\u0015\u0003ҁ#6:0Qr6ު4\u001c0=1]/\u000084\u0011bTKn\u001d-,Ha`\tWn\u0002\u0012\u0000\u0007cI.\fF\u001e!fT\u001b;8%idLU%*t]T\u001b\"z\rsDǛ[-\u0012?b;s3ܛ\u0019pS#\u0019WAco\u0010[\u001d\\v`bA\u0004\u00072F[{\u001cД\u001drxtCem\u0007N w(:?U-\u0011Y\n,;PQ8ǶAi2\t;:9|\u0018$~'\u00177׎֯lU/\u001e\\?^F[n\u001bw\u0017Jd?n-ɲՙZқ,[\u001dceKc.oTب-6N\u0018%uDS-ʶ'7k\u000f\u001fMfێN\u0004[=hmr[\u001et[W$ݾn1FZrwY\u0004E\u0018[ƙd6\f\u000b}#5I\u001f\r\u00003j\u001d\nv\u0004K\u0012[□f!\u0005X\re6҇]AF\"_c@`R\u0005IM@x\u0014-Nq-l\u001byǩ\u0016 ż\u001bQ3]Y\u0001j|P7\u000b T\u000e ~K\u0003p\u000b*\tϒB̫2}퍅\u001f+[\u0013+[\u001bc5;Kjd?n-ɲՙZқ,[\u001dceKc.o$WT\u001d\u0010Uyqx'Qm\\ߪ\u0012Nl[\u0016d\u0004V6۪YR>\u0003lne\u000e9pUw-&L-O,S(\u0000R\u0014͎S\u0013zls-r\u0018o\u001b\n#VGxnf~H?eLGAR,V.UC\u0015\u0005J-\u0012X\u0018\"mD\u0003r?b\u000e\u000e\u0005\u0017\u0001jEː6-\u0007[n\u001crc\u0007MAU\tuF=\n\u001e@\u0019#*d{ͽW\u001e0Wwfq&Yޢ<|O̒0'9\u0000MjNnl\u0010e\u001d_ݲ$qcliLʖd\u0018+[\u001ate#vJcɛU:NhŒj?;TV~\u000e\u0001[ζE\u0003HO#YRԮ-Sg\u0007\b'ڄ>b[5)\u0017b-\u000f'w\u0000\u0014Y\u0014&>Tm\u0012f> \u0018$59%/o\u001aHF(\u0016bw\f)e*Œf#NYi00 g,\u0006FIWcT\u001ci%؆+zY<uJ,ma=\u0016Q>KVuO9z%c2ɬ':\" Ҵ\u001cN\\\u0007ȅ\u0006^\u0001{#m\u0016r/-0\u0015s\u001cq퀷u!\no'\u00009Ǻ\u001f͓\u000b7O4\u001e]l[vvu$qcliLʖd\u0018+[\u001atpBv{ǒom槧Pm>^A[mN\\V\u001fF[\u001aH-2Ex\rq\u0002Y\u0004YzFH-Uc٪rjmκ\u0005u\u001bK\u0017+nE-%V\u00010?J%+\u0006&Z&y8[\tdW\u001a\",G<d,9\bPW* p<p]9_6f[/\u0003rџ˃2oէ!djzF\u001e\u0000JӖpl\u0001jev-}\u0002\"4rgR\u001ejAZpl#\u0017/!s\u0016m_'\\/83\u00032z[eڂ\u0006ߴ߶]ޑm99xbN}tjI¶\u000fT\u001dl\u001f7ʖdLlM1JWh 9Yެ l{A&\u0001\"lk+y\u0016eKm5PN+8>P=:m]\"}Hy&2`\u001caB\u000eDK\t9#%\u001e1Plfr\u0019m0 \u0013Km\u0017fI+\u00106r֕,Lŀc{+Bjf2-݁[\u0015\u001c\f\u0015?*T\u001c\u001a16jWkъ \u0015\u0015i\u00118V\u001a(L^e.c9\u0007[iF/V!صtڳG\u0003,<\u0000\u0005\\QdI\u000bȕcЋ\u001d\u0018\f`F.;,\u001aocF\u0003\u0000O)G)Il\u001bqwiۛɻgw\u0001˧ďnZVFf֮X-ُ\u001bceKcluV&VX\u0018%o{B[n77k7YR`\bom$6Uo[6?!\u0019\t|[߁C\u000fuf*\u0016ע}@z \u000e\fo\u0002%P\nA]1I mκ-Kow~HGfdLu?jT3\u0012\u00071wu]}\u00145s15m\t~.ղ0\"ʲ\u0016uU0)riEpl`dUVx\u000frl\u0005fgIL2uۂuK\u0003\tص\"xjc=\u0019\u0016u\u0002:=\u0005췥m̧[֬[Z-m,wdV|m޷C&._/'n\b|1\u0001[nZ%ُ\u001bceKcluV&VX\u0018+\u001b\u001b\u0015֮ool~SO\u0019~~o\u001fcߖ-gׇ\u00132}66J\u0004\u001e#\u001fŵj-\u0001\u0014@\u0018\u001d2lK\n\u0014U\u00125p\u0016\u0013g)q1蠒hHYr+Bȱ\u001eedIVl\t\u0004\u00032a[9\u0018Pj3\u0007O\u000fKQ芰z%~\u001aY˂sŞ {\u000b`\u001b\u001f\u0004zlG1g\u0014mSMp~Zk\u000fWjd\u0019WؑOo\u0015~ˇGIuCI\u001cXyL[v\u0006i2ɴ76{\\Kna=.\u00194\u0007AfN2'\\oۖmm/=}\u0017\u001f­㍫\u000f׏׮mծ\u001evIXҘ,[-ɲ1V4FFfƑڭctN'h~vӭN7?;@LCc[o[QvQ\u0016\u0001\u001a'%\u0000\n߶l{g]\u0005\u001b\u0005 \u000eԖ*Rŧ)KΣX\u000f$Gj\u0000rguց\u00042\u001f\u0017r\u001b1[`q쮇k\u0010;;dͶU\u0000\u0001V\\\u0017hn'M-+7\u00128\u001c5C\u00129X+Ⱥ]gAΓɄm\u0001`RbnƟ̨^T\u0006۲eY\bYlwꊹR]C_\u0005bۮ\u001eQF-fq\u001fy۴\u0019SUT;/ؖRƾm)ö,l&\u000fxpK<5Df\u0018Zvd?n-ɲՙZқ,[\u001dceKc\b^9L\u0011\u0018\\uщ&%j}z٩秛po(dma\u000f-,e9+v\u0000iãd\u0017-ն٪6TqMEm\"ܥ*e[h]\u0004r>06ùm#\u000b;F\u0017\r\nendstream\rendobj\r26 0 obj\r<</Length 65536>>stream\r\n`ao+pi\u000fr/\u0011E`R9\u0017\\Z0\u0016S-2\u001c'G\u001b!_$T\u0013g\u001c?Hv\u0016\u001f\u0016ԱFmC!ԫ[c;\u000e\n';\u0007FLtl!%\u001c2^D\u000f\u00012ɭ>\b>\u000f1B\u0012u\u00023sg@2m9;_]\u0007_Q¶7lU>܈\u0019^l[\u001f7ʖdLlM1J\u000eW\b^ި\\-:KM:Nn\u0002j}~Snm~[۲;JŎ$6L-woU7.M#w݂$\u0004҂\b,U|\u00020i\u0002TbY-oiv㺜m\u0005[f\u00022,|^u\u001b;hky߶\u001066\u0006ezZݙ\u0001f1B\u0019\u0016]\"$e\u001a\u0019m+~\u001fVh\u0000Tpȥ\u001aO\u001c\u001eV\u0013Y-4ۂo;pu\u0002ɓL\u0012]>E$gAq\u0010@}]Ђ3Vlo߾\u001b\u000fxNn\u001c\u0013t86-Ǎ1Y:S+[zecliҥC\u0015kG*[l-a[oKĳ\u0005qL\u0017DͶV\u001f!2({j)CAN\u0012dd1vH(M?^\u0004li\\\u0011.mEAA\u0017OB\\n׼rS+h-^\"\u001b\u001fZ3Y\u0016vUJ\u0011\u0015\u0011h]`؆\fb\\\u0016wbU\u001d0oY.)۲Sf[c[c;}@\bl%2j\u0014?Z4K\u000fB`+\u000ex\u0001P&~,+kl\u000bk\u0016^aH{i\tۖ\u0005A\u0004u&}ߖΒrwm\t`C/֩֍˛̷elV/~\u0018+[\u001ae37Y:ʖ(]:\\>T\flY\"lbԺed\"uٶULma\n;pd5\t\rR.\u0004J 4K\n;bf\u0018b\u001b퐳-a.9;m-\"\u000b*+s-[q\u001c[O?\u000fI\u001fSl\u0015\n$jԨBȄ\u0015\u0001xЎ\u001e1\u000fJ\u0004E˭\u0002[1<cl56xxY]\u0006(\u00040\u001b\u0012Jv\u0005y\u0015/\u000fq5\u001c0US\u0012{+%;sL@&h)>\u0018kю侸$lٻ5y\u0007jL޽sg\u0019fm\f\u000ev`\u001dgI13yuxf\u0018$_n~\u0018+[\u001ae37Y:ʖ(]<\\>\\\u0015mu{~cv6n\u001fo|BDSoض$zi3d5\u00162ɽ0@ֆ$suq\u0014Ym\u0002\u00013m],\tida4${rϐu\u00022Υ@*v\u0012'&\u0019\u001a\u000bME&y$|LT+E\u00156r__\"d>x}\u000frW\u00151\t=Mx˧+7&/U%WJW7\u0004\u0016!8\\\\dj-\u001cl\u0007~;).:V\u001e_\u0000D\u001bNй\u0013M(lKH佺Pmge&YR`\u0012d\u0007o;\u0003k\u001f\u001c\u001f<5D\u0001d3ɻ(qcliLʖd\u0018+[\u001at a[\n[q˷\u001e:dӓt\u0013t\u0014f}$eIFC\\&獥\\G]Zyyː\u0015-3mjTQ\u0006ZCHad0pu\bwL^LZ Yn\u0019m88r\u0014\"uKز$o$lSĭ\u001a,ǊRt\u0006O\u001dbe2=\u00135s{CT(\u0014?Iu\u000b\u0000o\u0007L&X\u00004vR\u0002xCɪm2~,Xr\u0016leﭘW̨dBy\u0006\u0005l[ϱ-m~7̒\u0012l/OS=2\u0007c\u0002ַMُ\u001bceKcluV&VX\u0018%$_ax{\b$_۪:ZX1r)I-v=\u0001\u0004\u001cg\u0016uG*\u0015\fۃ=T(y9F4+wy\bYp\u0016Hfl\u001b\fC4V-)\u0001!`L(/WE\u0011T\u0016me@|MmU6p2=_M\"LǾ\u0012V[tA7\u0011R5drsVG-u\u0018\u0019\"x\n:/\u000b<)]\u000bԏ\u0006x[V$\u0002r#wɜ^\u000fOvˍZN'd`\u001b+\t\u0004+-!7-\u0010\bڅfamN[\u0004N\u001dhm\u0016o`/N89x䃃խ\u001aѥ#vd?n-ɲՙZқ,[\u001dceKc(۲5@W\u001a\r¶G\u0019۞dӒO5@\u0019|[ipPU\u0002ʋҟ{8)2\u001c8Ƕ }[.\u0002\u0004T\u000b*eTZ\u0012iu;\u0014-\u00138Gv|q6K*ZM[cvh`\u0000E`\u001b8i?(\u0015Pɽ\u0006\u000e\u0006\nrdcIj]\fbCŨ\f.#W\u0017%#\bWş#ď&\u0003tT\u0019(㤴1\u0016<|6\u0014={\u000b^=m!Fݢ\u0003+n٨dI\u001e\u000eex[`qQ\b$K3.ms@O8Ѣl|pe;Kjd?n-ɲՙZқ,[\u001dceKc.\u001eJ.\u001dN.\u001fJuQެܪݦ-'[\u0014oO5?;=ѷ-\u000b-|mq\u0011ZeVLx\u00006[\u000e=/\u0000o\u001b\tQzU\u000e(sV\u0010.;|2W_dxL#c#\"8J\\-\"Ӗi.!l7p\bC\u000ffZX\u000ec1J |\u0013._\u001b6u*̞G)MT [\nV\u001a\u0013F%\u000f\u0015}V\u0010Wي^f7ފ\u0015\u0018l3v&o[\u0006.R_JEX)rFCwȀw'_~0\u001b'77.mYR\u0014lk\u0017o[\u001f7ʖdLlM1J\u0017\u000f&\u0017Y-e\u0015¶Go{qdSON>Yv9ۖi\t=̪\u0011oQR\u0019EQb~+'$\\ᖸW:mQq$\u0007i\f]e4Ð!q];d\nd8rX[c|.B\u0002\u001bm\"\\\u001f)Ro if[FK|,n\\#*^xa\u000f4\u0012:\th\u0005-CƝ\u0000JYr\u001br;ARC}NEr-.\u0007L,Y?wBu\u0019v(\n*Qmf(u\\\u0015lNPfda\u0006̴\rɁ\b6ޖ:,#\u0017\u0003'svuѭ\u001f\u001e~yxFޡQ\u0000mwKXҘ,[-ɲ1V4FÃԷt6,)\u001aK>VE͏O>;ĳ\bf|[\u0003h(*{p!Gv\f*4,V\u0004{\u0019eQ>m^$:g彷b\u0014\u0018\u0014lP\u0010.r\rp}U#IN\u0014A_B\u00198-!lK\u001fv\u0006\u0011m\u0013\u001dU<IVYV\u001bZ\rNXxT\u001c-97ʼ\u000e\b8@\u0015⯾[\u0000G}[n\u0006lĴd\u0000^V\u001b,\u0011+? )@J\u0002\\Vm'\u0000j;smG,-Q\u0014l9\u000b\t\u000e'\\{ l{}~p\n[nkmwMXҘ,[-ɲ1V4F\u0003¶*4LؖM@[76n j~|Iζ{\b\u0016ض\u0004\u001f\u0000\bH\u0016\u0006u\u001b\u0000ۊ?G\u0005-ȅشdm=Dm#\n\u0016\u0014{\u0000[\b$~ۡ2p]Z/G\u000em)\u0001Vew\u0005\u000fvc\u001dyA\u00192\u0003$\u0012\u001d\u0002&|\"[\\%cfde+(\u0015d2N\u001astikqy\u0015ѴvQ>VvצGc?b\u0007PB.XX3pN[V\u000erU-EZIdcI\u0016CW\u0011nOJxOK6\u0001\u000enm\u0019r\u001d\"-$\u0013{\u0001l!\u001e9mJvo{{+Oo>}C\u0015ok}ݓ1V4&VgjeKolu-Qz@\f+\u001bM7\u0013OX2\u0019^xｊm}ͷ\u0006\u001f]}\t4Ȃp{jˏwҮ\u000766\\\"e[Lx29ElMJ8Ϧ\"e\u0013eP9\u001briX̕J\\L0-n+S\u001d2L2L5V<+dX.]w\u0006j\u0002U=:#¨\u0015v\u000bZ(zl]X#_m^0joiE\u001bo51VslO@^-yh)}d[>'9ۖ $|4tFmi\nm,6϶~[ێn?l{~\bmW7W,Ǎ1Y:S+[zecli\u0007\u0004l\u000f%\b\u001eJ\u0012=\fmch&\u0019no[߷>mYfSc\u0005蝶lG#g&w\bQf[ŹY>oPv[{;dey>y8.\u0015x+[\u0015vfj\u0001%ZT\u000b(8q+.L6[z[\tV\u00069`2&]7\u0001-#\u00047=!\u001e+EY\u0001˫\bce-\u001f\u001b\u0005LF^P5\u0014'\u001a䎫\u00018ԽMخ\u001f9K\nZv\u0013`02j\u001dbmL\t`c\u00186pL[ץOKv!f6,kl\u000b~h`[x|[P&o}&$32]n[swMXҘ,[-ɲ1V4F\t|[ʶ,|eJv\u0013%?:Z}yDSbN^\"¶ݜo\u0006Ie E\u001ePmf~[hi+\u0013ȒjRF\u0012|\u0007\u0010K#Rނu\u0000ʽ\bu+[)Bm%<(2\u0017NiR%l\u001boKrR*ou\u0004D]\u0016T\u000bOfƮ$eȫ_\u0011[+5x\u001eD&=TT&\u0019m\u0019qR8B2p2FZh\"Oނcn8)9H\nClfcj\u0010{z\u0005gF\rI\u000emC#mӉ9ߖf\u001fH׻v}\u000elQswMXҘ,[-ɲ1V4F\u0003\trA}[귏?!l{2˶o+m \u001e&ܜo\u0018\u000fo\u0005\"/*mf2\u001fr\u0014Y\u0003\u0011m\rr-\u0011\fHm\u001d\u001a\u0015\u00105v\\UB\u0004i*\friP\u001cB eBXCFԱVۦhjq\r[D[Unf\bժ\u0000^V\u001fW_\u0000B1}Hl\u00155ldnf$\u0011R\u0019Vdu8ŭNҙ\u0018H\u0016\u0011TA\u001d@C<BJPmyvkǛ\b\u001eI9\u0018]a#?%\u001f7ʖdLlM1J\u001f\u001cL>\\?<VnЖ[6QY6\u0001\u001dk>lۡVW\u0002x\u0014kQ\u001a-%M[u\u001bs{ZŽ\u001e\n\u0002o~\u0013LpcLxm,H\u0016n\u00139T\u0012\u001dȱɞlFHg۔f}qK\u000f\u0004r\u0019qLJ\u0004C*Va?_\rS\u001c$F\rh1\u001e\u0000*\u0015\u001c[Ly\u00074jѓ7VlM[\u001fG\u0010N|L-Dd Y¯ɞ4jY\u0014AhnC\u0001avNrC-\u0001Ɏ6'ٙ!m\u0019~[rv\u000fYRNo2\u001d.o\u0001Zvd?n-ɲՙZқ,[\u001dceKc>8@Ã1\u001b\f\u0013Ժݬ^ߪڪfn'\u0003\u000bw\u000f*ţ=<;\b6rUmX8\u001fr-\u00173\r\tEv( !\u00155\u000b{\u000b{[Z\u0006cVnUC$d6\")\u001e[H\u0011cuSTxٵb6\u0014<\u0005x[\r\u001cl\u0019RӖ\u0013\f1\rt\u0018,O2IvU`xl\t{\u0010\u000e\u0019k\u001cf\u0000o=v\u0010?ܮ\u0015-\u001b6)[\u0005@M@V方o)R.[/eM,:cͷ~۞SmMxڱ\u001bɻ\u0007chi}]1V4&VgjeKolu-Q@|Pr [nٖ՛tTr'v`[l;AR}\f\u001do\u001b\u0019N[1*F\u0007%\u0006 L\u001dxd]mUN.^^z.\u0005\rR/tܹ_$_zE?bH)ɺguˬE|ϐnZXe\u0016-#Y8pMy+QwŮ \u001aO>l\\i+\\\u0019NF-%W\u0004\".IDGz 9;\u0018\u0019CFӥ8]?|m,Je<\tw\u0003]>?J\u0019\u0019](bV-$\u0007$\u0013\u0001۶a\u0003W\t۞l{0a[Imُ\u001bceKcluV&VX\u0018/\u001eZ݃_~6z8#\u001b[귏7?]-V\u0005{2,GHa\u0018V\u0006\u0014\u0014:L|([!z\u000fu皅=X>:^Ah\u000en^n\u0001y}\u00166ð\u001cێx,Yt\u0019\u000e+,r%Ja*\u001c[u<$\u0019\u0019\u0019'\u0017\u0001ƙ\u001c\u001c$%yf«ѐdo\u000b\n\u001b\u0018S3\u001a۵jN8e8Y̕(rrx2z1Q\by.w\u001drmrt\u001b\"-p!`6o\u001bK߶]Ul\u000fׯn_9޼zL\r˶$qcliLʖd\u0018+[\u001aC/\u001e\\\u001d!ﵿAu~G\u001b7767)o\u001fm||ma9طN\u001f-VD\u000emiwd?-A\u0018I0Z\nFf4a\u0014Q\u001dha ,Q\u0005rǀYmw-AZJqna\b`WӺa&M❶\u000bmS\u0006`\u0013\u0006I\u0011ԢŰ\u0007ҪPGVcO|s\tY5-9ZӭK`\u0004\u000f^qdڿLwXW\\K~[\u0001.{ȥS#[OCĲ$) b\u000ewN#ܴ\u0005W [\u001a\tXpfP--ܦM3m{NS˰Uo{g)^:Rlk\u001f7ʖdLlM1JWkP\u000b¶'`)~?|W?>lۘ7\b\\ɶ=v\u0003i곤oFHi+n\u000e\u0005XW`S\u000bg<\u0007Dg\u0019jAӒ88LWX0\rXu|5-\u001e!%(lT28Ї+|[\\B\no\tۮ5Y\u0018Vg)'BZqyD\u0015\u00190W\u0012ļQ1*i䚰nŐdrw\u001eb\u0015?0N[[$jyEBms˃Ǫ\u000f7\u0017l \u0016Bmd3=ݲ\u0018$K\u0004eR}\u0006\bG'e,l\u001b\"J}\u001a>\u0003Ifm?8{(Dmo{\u001f7ʖdLlM1J_?m~\u0017\u000f\u0011uߎ#k˿?u$H\t&dm9Җe˭2m\b\u0002\u0005qR\u0001mCKsnƮ\u001dE\u0019\u0003ENn\t֑x\u000b\u0007z\u0006\t\u0010\u0019Ş%+զȮ]C\u000e\u0000[`\u000b^-\u000e'@pw,&!\u001eLDq\u0013\u0016v\n܅\u001eۆ|\u0005\rx\u0005\fc\t6iL\u0012\u001b\u0000α|\u0011˵\"m\u0005Ű+d&$\u000f\u0012\u001b{\nJym\u001f\u001dvm\u001f{@(\u001d$%0V[/%sOE\u0007%lK\u0016-\u0015l;+}[Ŷm-vs:ۮ\\}ۣԷ}PtqzH墝%[\u001f7ʖdLlM1J|dOg\u000f\u001f$xW\u001f\r_.ck\u001eÙ\f.>a[¡C\u0002\u001aʼ1Z\u0000mӝks䖐QvM[\u0017p5Or\u0003?\fg T<g\u0007Gmo\u001b«\u0015lz\u000eyĖ\"i\u000b\u00179AR!dA,\u001c,\u0003\nOr\u0014Va+W\nYEa\u0001's\u0013 Y$xf3QӘ!kGNX#?5m{WwuJ$m30WD,\u0019\n}J \u000fin''sSm9\fϕ1\u0002]¶\u0004UsgoK\u001bmS`xo.v})-\u001csm?8lvd?n-ɲՙZқ,[\u001dceKc~3[^&\u001f_ǃ'?=ϏQ1Ͱm-\u000eR\u001aziD5<}N2u\u00048+\u0013m\u0005_j\u0005biGٲFG\"\u001cl%Ja6Dm\u00102y\u001a%Ym2\\m\u0014X2oeH[`\boٌa5\u0004\u00053jE8\u0016d\u001aq\u000eUf\n*']ɭʢU#+UlU`K\u0007Iٖ0~euK6\fow\u001a!E\u001cbU\nx\u0013S\u0013\u0004qc\u0019bBrfI6`\\W\u001b[r\u000b.n3l;̳-d1\u0003+3m\u0002r?aͫGk\u001fl\u001e.m\u0005@\u001fZ-ُ\u001bceKcluV&VX\u0018~d\u000f}(\u0013]D\u001fD\u001f<W\u0018'xc\u0012a[/M:\u0011uƉ/\u0013v@3.6mێ3Ws*.0\u0013\u0002\u0012\u0005N&'e&Y\u0013œ_nx[EHgX`[qz\tҺ[n\u00136m\u0013_DFCxJy]\u000f+W[\u0013\u001dc+\u0004\u001b«MX\u0019y3e[\n02}ې\u0013T;H\\̶ys\u0016ؖANio167Q*X\u0016\u0011P\u00182v~[݁m!mi[u/ݾoxxwmT>%qcliLʖd\u0018+[\u001a~G׈~W\u000fՍՍʵ7;)l7N1\u001f\f%Áqn;,5\u0003jR+\u0000\u0002\u0003$ۊXlţ|2kEn\u0010ЩE)$cw6df\u000eұ\u001d%|L#*\\.\u0015\u000fڵb`rf[Xq%%1)<!yc6\u000f*\u0016?\u001fex[߁jљ}W\\C\u001bl+[Z\u0011xDyn\u0001i\u0007\t^y4ry'ME\u000bgyrn\u00112ɒmuU<\ne\u001c.@ 9ǶWl$3=\u0010]ܬ|hv\u0017e?n-ɲՙZқ,[\u001dceKc?\u0018kxt\u001eX/\u001enٮ#Gk7&-[G[\u001e'>aEN\u001e\u001f\u0007t\u0001R3\u0012݈cHsExS2ɡ\u001fOnb|A -\u0019\u0005j\u00182k|`L2,\bq.MM@&\u0001I*{cg9X]\n~!f^\u0001\u0016,b0$y\u0002ɸ%|u\u0016f4\u0005T<bæd\b\u0019\u0013@\\g8,_F\u0016\bW\u0007\u001c9śmհ)jڶwZn\u0001|Nm\u0011\"6mmoc䷠]l-\u00170^b\u0006<|8~-=dvd?n-ɲՙZқ,[\u001dceKc=\u00100ãk<ck~Gk\u000f'\u000eW7T\u0013֝ nQQ\u001e.Y*cSpF;1<\tlby\u0014[\u0017\u001fCJ\u000erGlY4$\u001fQK(\f`[d~``\u000b;Ͷ\u0012oQv\u0014r'$YX\" bƳM\t\tdyh5/\\|[L\u001eÙՑ}\\\r\u0018\u00022ȭ\u00038\u0003\u0015y&X+`mS\u001d?plam֨\u0005ÄQN[W?3|6b+ͻ|&yn92|HqK.N!Iv_\u0015ɶl%k\u001f7ʖdLlM1JG/\u001eH׏˙5L3nT\u001cN\u001ex{}kG\u001dLdېz[B;i-ŖTC6/uy_+%''gZɶj\r\u00149ɅL8\u0006}\tZ 9s*~\u0006rjS43\u0019\u0012Xe'ғmNWwl\u0010qRԷ9|\u0007j˷ᤱ\n2y\u001c\u0003\u0015pK\u000fR\u0001\u0013KN\u0016\u00193򝀷ҷUw\u0011Vܺ\u00197\u0018;\u001f8\r\u0004#&f\"UXjm\u0017J3\u0013\u0003+c+[7\u0012v\u0005ok\u001f7ʖdLlM1JoG׏6>O\u00133mڑ\ngۙom9؂\"b_\"ÈU\u0018A:oW\u0002\u0002jfMI\u0015-|\tٜ;\u0006+VmXLyGJ\u001dˡR\u001d?\no\u0005[Fv\u0016|uI*V(2ɐ˙GF7\u0002C\u001b21iYSEOq.f/{m\u0017\u0019Վ\u0005؎\u0018\u0002Eu\b7n3-٢|2SD^f6f*dIFh\u0012ے<ۥ`[̰\u000f,_ox˛\u000e'o\u001fn$\u001f\u001eN?hvd?n-ɲՙZқ,[\u001dceKcX\t/\u0004o/\fe}\u001fϬIC_\n$\u0002]d\u001aW\u0002\u00197\u0019)󾭶~\u0005n9;iJtiź[6\u001d\u000bNb\u0014tfM[Z\u0006)/hk\u001f\ne$D)e\u0000hUZ&\u0007CAܨ\t8N̑V\u001cVA{f3F\u000fEe\u0001c\u001a?G[\u0006rHݔǒil;\u0015Hw\u000btD7\u0002\u0014\u0014\u0003#ӇR\nRf˛b\u0011l\u0010\u0005E\u0016fI\u001a=΁!Q2Luff\u001fy5PzdF\u001e7R?@\t[wK%ض\u0015{na\u0002W\u001f<|\u0013\u00177k\u001f\u001e}0~k-|`\u0003]ş\u0012ُ\u001bceKcluV&VX\u0018WcEjz>O\u001dw\b<Z}z8q`\u001d|[,kdU-boM&O\n;{2Ɍ4\u0000a\u0002\u0014H歸r׭l@̕\nҊp\u001am%[1\b\u00151\u0016>l_eI\u0015x+}qnZ\u0006\u001dL҂c}[T m\u0015.\u0005s0KM/BxYa.74w\u0015\u001aggf\nd\u001cFN/PXxp%AP^(\u0012SeBl饫?9ƻ+\u001e\u001f쿽?|kH~/~\u0018+[\u001ae37Y:ʖ(0p^/\f\u0017Sm\u000fW\u000f{_e\u0015ϒڙm\u0001]JR\tʀ1\u00117p#ds'Lξ\rA;HKô|8ҐΡݵh-3\u0010\u0019o\u001b\by\u0016hWk\u001dq\u0013[\u0004\u000bfev\u0019mpZvH(Ib\f\u00144\u0001F$\u0000o\u00156طQ\u000bW+QTʵb\u0013f,xVܕ!dc4\u0007c\u000f.\u0019gL\u0015v@Op\u000f\u000b&/-3Eƀ\rR%\u0017Qe|\u001e\u000el뗺n[_yr+/\u001c?~s-|y}q伺콺俼_)1V4&VgjeKolu-Q:)=)>)=-=/_zaP:{|f\u0007{뵑-iNl\u000b\u0018;:V·\u0005ت\u0011Rx+m3Au;dm\u0015{;*Yf˂K+nG\t?\u0005iU m~R>HJ\u000b$sŜ\u000b\u0017!j\u0005+Q\u000bAeɪ\u001c\u0012U\u0018d!\u001f/]\u000f\u0005\u000bÔ8ނ]-QƭC\u0004\u00196ce\u0014z`\u000e5>$8\u0017\\\u00162\f\u0002\u001d3/\u0000\u0004|\u0001]h6ocl;po[l߽k\u0016g\u0017RשйS\"qcliLʖd\u0018+[\u001at5SsO/\u0014ε\u000bv\n\u0004l?=y_:[\u0004o\u001d@\u0013V Lլ*ZnE8Y+i7em\u001ao1&\u000e\u001c'%h976U)emn촅 \\`[@'~mSJ${lWh8Q*\b\u0017\u0004X\u0003uUɥ\u000fAR\u0010\"W\u001ck\u001dXl5}[9j,b \u0015ʔ\u001dm\u001c\tx%_p\u001d3,#hh#eMdax~Pns\u0004]1ێuۂ\bzŉlo~\u000b#A\\TlLtWS\"qcliLʖd\u0018+[\u001axs\u001c!\\sܳzdOԺ]'KW\u0002M`5K*öcfβG<ETM3ӥ&5\u0004rn?`\b)VC\u0001\u0014K\u0012̫Yb9B9H\u001bk@C5l9ہ\u000bCd<Eaq<\"N,\u001fL+\u0006\u0000}\u001ee_\u001eLr Gile9[nS1$\neX\u001aX \fp%M[.[\u001c\"\u0016)K2,\"jN2֕-yJrulF+/<\u0014=7p\b؞m>-\u0012=)_)1V4&VgjeKolu-Q:Ӛ%x{v~S\u0014rgn\u0011ȝ}fa_8\u0000x/$K\u0001o\u0002F\u0002omv\u0014yJE\nrAc2G\u0018o\u001cl\u001d\u0012]p\u000bҴ\u0005\u0015d\u000e\u0016\u001fm>b\u0014#Vh\\\u000f|^UD8U$s6֣UE\u0013P6̮'γ`AR9v`r6ը(ƳOE&Yj2\u0018M#\u0018EU'-ғ9|N[\u00042LnTmE]m\u001ai8\fm\tmtb<K)Lr?϶\u0017\u0003\\d{9BOv\u000bOv\nw\u0017Jd?n-ɲՙZқ,[\u001dceKc4f\b۞i̞mΜ\u001e.\u0016fϷg\t\u00138#ߞm-Jd[4Tjn!,w\u0003)\u001d6[p\u001daO.I./!M[qF\tD,9Pjy-$X\u0012#\u0015\u001eQ&\u001f(r\u001bo$FQ-?\u0013\u000e+@X\u0006u/%Ͷcr\u0019&\nQ\"&$\u0003\u00161_\u0000[czLr\u0006r\u001bTU߅-QT\u0018l\u0005\u0011kl2ɅAX6|[\u0000[C$\u000frlܡGύg\u0006v,ev/~\u0018+[\u001ae37Y:ʖ(\u0011ex;8̓D\u0004o!xۙ#l<>ywL7csv\u0003RĒ-#\u0015H$^9;\u00003\nooJ떝Sʹb*\u0003[y\u0016\u0016\\/da\u001ehD):ʇ2\u0004M\u0017kJfq#-Yx-kŶYh\byv\u000f*\r\u0016J&~[:b\u0013P&#-I\u0007Ѱe9+\u000fmU-$\u0019fI\fJGZjڒC\u000fD\u0019}@(:GضW<0w5KIsw\u0017Jd?n-ɲՙZқ,[\u001dceKc\u001ek{NhߓMʶO=՚y|\\{׏ߞmGzBb1j˅[Vv׺p끄];Fְ\u0015ʼm9ɶc\u0007ub\u000f\u0017s\u0002d\u0011N\u0016\u000bR[|¶\u00020W\bW\u001f0Y?\u001b\rWE\u0014YfT\u000b\u0011IPoFh*M\u0012l[v0psx[ή\u0004ҟ;m!wjPk\u0015QCo[s]\u0013vY¶OUdPCl{n8<wh䗫]8@uDXҘ,[-ɲ1V4Fmcߙ\f}>Ds\u001fۙg<@4=#\u0019m%Պs\"\\D\u0015Pe\u001csPl\u000b\\\b'?(&JzV\t[`|я\u0000:>$\u0015c~1\u0018ɻ̺\u001dQ\tWIN8\u001dko3'Y7j\u00131!%d\u001e-\u0002YAϪvZ\f12ãrS3 )|W fJ\u0015eLr\u001e2?\u0013|[LrUH\u0006$ݹ4-b\u0012-qKʷ=mq|nP3}gԴ=`}]1V4&VgjeKolu-Qz\u000el&Yn0\u0019:Wj\u000f\u0019\"\\ݴSg[\f+R#H&^fH\rrYSbId\u0006xK\u0006Vlq;ưVLbHW0mG\u0016l\\\u0004-1NOuJ݉e\u001f\u0019czqo6˵\u0010Bg\u0007U\u00102($Zfۑd\t͒IrՆ*|@2![\u0019]\u000bj>\u0011oT\u0007B`r߶vfՏv\u0010|q&gضL2essԷ-Й9ƶw\u0017Jd?n-ɲՙZқ,[\u001dceKc\u001ekRe`澳}\flD\u0004lg>۞K2\u0013m\u001d<KjslP({֭mE\u001d~1%Of[tL\u0010U\u0000iQdu\u000bmG\u0005UA\foY\u0007.]\u0000S\byddUF6؜}\u001ef^mI&uwq\u000eY\u0019Ӯ\u001f讕d\u0000H6A[\u0014\u001e8\u0017[\u0013\u0014eGwnʈm\u000b vƕ\tlK\u001e\"l;&}`K[+s\u000b'߶mmwOXҘ,[-ɲ1V4F\fZy9rS\u000bOgEDsw8V}Ϙ%lj%.6X崊gmQȚ4CԜ\u0014$g\u000eB\u0003b\t\u001cVZ6\u0018\\\n\u0004ˀ::Ko\u000f!ط1v2\"s쪖I\u0010c\u0016O7\u0019E'jj\u0000+\u0017۪pW܎\"9\u0004[\\)0mXD]9\u0017L$Ũ֕lۥmmkb{o>~{_~SxbtxtDXҘ,[-ɲ1V4F驅9څs3vN|\\xKn\u000b\u001f핽ߡxٶ\bl;l[~[\u0014KN6\fVcqrT\tW͞\n\u001d̶|[\u000fH}\u0015?\u001d\\Ea\u001a)\u0015\u0018\u00039ҲYb%l\u001dKE=bU\u0010>ƨ6.VQdv{vݝķ@\u0016Hs\u000f+ιQ\u001e%gZ\u001e/ϏB\u001c*&@:ϢQme-,ޝ`\"'ub\u000fm^\u0011]+P-|o\u0004lS\u0016-#\u000e,ruꜧ]ssDXҘ,[-ɲ1V4F|xWz+?O1B R꼔_\u001e_I\u001dG{mߞ̞nm'ŒQ\u0006.\u0007\u0003f\u0016JWB-,飩Zͽ\u001d\t.ΐ\u0014(`-a\u0019k\u0017H{o=|\u0014\n$\u0007\u0000p*oC5OV.p(e+h\u001e\u0017\u0001\u0013?\n\u00006boW\f/\u0002r=QZʱhTYo,\u0015\"\u00158tڂ+wfL˭[afW\u0002\rr-\"d]+\u001boc\u0005dUML[m{A=\b.Ղ!?bi<'vxG}\u001b\u0007[F,\u0005/s\u0003EGhOǍ1Y:S+[zecliү\u0007\b\u000e\u0017\u0007嗇KCܾ\fFT/z7|m\\:o\u0016\u0000$1q즑^D<,n#Whg,Q\u0004۲YRqfH2K\tw,1jB\u0017U\u001a\u0019\u0003/,]}ی\nc\nx\b%*K|Z1gl\u0002GgM[iCe\tɨVnɬ\n-yq3!&J)ue˭>T\nSv3 M12,tAԷVy뗐(B\u001a[WoX{P\u00037VW+\u001b]ş\u0012ُ\u001bceKcluV&VX\u0018\u0017KCl\u0010}5u_K\u001dJc\rv{sѿ\"v\u000f귥[\u001e3rζNj#g5A\u0016[%\u0002Eb-}A=ǣ_&\u001dG 9W`\u001c;\u0004U\b0Mcɳ\u0016\u0015\u001db-1\u0015HqVl\u000b\"Z'l+\u0017dfT\u0007ߏAÀG{;c)\u0015T\rV3,u@iE\u0002\u00062c\"h\u000f m,.EK3Լ̐|-^ܓe[\u001f\u0002xd1$YsR;\u0012T;dwo\u0017睹n-2\b|B&a\u000b'\u0017>p͵#r&S\"qcliLʖd\u0018+[\u001ayy\u0019\u000b1b`]X\\/,ȶ]@s\u000b=xǖ[ݷq\u0001WecF\u0013\u0004K-W\u000eIF\u001f\fdıL2\u0007[plJ͘;\f`zoa}>l%a'\"TK6\u0006(Re9պ\u001cl:d\u001a+v\u0017\tJ\u0016VD\u0014H\u0017YJy|\t\u00032W4'7V\u0011\nޔm\u0019\u001f9]\nZn\n(2\u001d\u0006I\u000bŊm@f\u0011K\u001e\u000ea7Nl%a۷6o\u001e\u0013}g=~c5|u9xk=?zc-S\"qcliLʖd\u0018+[\u001a\u0012a[۾J[ur\u001d{mXumg,2\u0011I{ž_\u001c\u0006\u0013F%cO\u001do\u0015+L^\u0010J&se\u0003Dm&\\}\u0013\u0010e[\u000fV9i&\fV۱Ŝ\u0001v\u0004cnf8^__b\u0017k\u0011-R@n׏\u0004[\u000f\u0007 nJjs\u0019hWle&&\u001c.\u0003\u0004\u0001'u3;1l\njE)ߘC_\u000128G\u0014)\tȨ\u00153CB5\u001bY',;jEP,\u001722\u0019-\u0002o;}c\u000e59X}o=ys5|jJxDXҘ,[-ɲ1V4Fš\u0003dhdf6f\u0006.n__Xv`\"AL\u0010`-h6d\u001c&,_\u0019'@2X\u0018Kp^V]^ַ\ri&y\u0010(Vl+\r\\GpZ\t\u0014dH,\u0007Rp]O\u000e1d1ۮJmKpT\rsl\\\u0004lcIpf.\u001dE\r+;@<,\u0012ߊrf(x<6\u000bx6vs;M[\u001d@r\u000f\u001a<=[k\u0019&9ɲٖmPlm9xcE(ɥ\u0007\u0012e-\u0017֢m.~\u0018+[\u001ae37Y:ʖ(0,ؖmՑC\tw콶HnĶ0N5ߖKLrֺhFK9\t\\S\u000bW\u0018)\u001boS9`\u0002%:=7Ie\u0010Ř&\u0016MV\u0017GI&Ix[\rаBu3T+\u000eX0e\n\u0003RPͰmVy\u001bD\u0011O2SP9EF\b6S@\u0013`\u0018z~D\u000fܐu.?2\u0001WS%rw;Af.cj>0J\u001fMU|72Sh׏N+6c\u0011\u000e,gI8\n߶\u0017\u0017\\!m9l{j\u0007\u000es++K\u001bk+vd?n-ɲՙZқ,[\u001dceKc^\u001c_Ch>F^\u001d:0*5f\"ݓm%ʖ[J\u0001`R˭\u0006Y/CxO\u0010&=T̞/b\u0010KfWdY\\Q+nG\u0007m}ƶܟmC-=\u0018xZfg&c]_bvUwoY6X\u0005{KL}\u0004i!e;+\n]Y.G].w@}[~OJ]Ķ\u001d̹ɴ\nI)e\u000fY?\u0004KykM[\u0014TVÓS1!YqkkL֭@c=\u001cKN[{H4qk\u001aҴ]p\nl\u0003Ŷ\u001d\u000b'޿ۇo\u001dKK\u0001\u0001זW-Ǎ1Y:S+[zecli=֖pn DʀqaNnm|#ێA\u0019\u001ar\u0000o\u0006Hwo=ŶȷU\t\u0017\u001c[Z\u00180O;,R|1[\u0000T\u0011Ӓ\u0013eݦ|z0زj-f14۪[ʪ!Gz&y\u0011_<_&\"x;T;s+0멞aO\f3G݈⭺eӻ\u001e톥\u00161G@\u0012\u0005T\u0001Sx}-\u001dʺ\u001d*$~b\u0016\rF\u001d\u0015̋lD2>m\u0017\u001cdچߊm<>z[\u0007\u001b\u0017'\u0017֢W\t.//\u0005\u0004rok\u001f7ʖdLlM1J϶ηs\"\u0015!~\u001e\u0012tYu$\u0016\u001122 \u0016,\u000f(~ôdlb&2\nlld\t8'p`\u0010{ԗY&6H#W2A@\u0012.ECx\u001b+e2Yg[\u001cB^CxmVW\":vH2'd;)\"YYedڊ+ۥTim_n/rȕ^t\u0015\u0016{l\\0һ\u0004u;\fxܹo\nF\u0018\b7۸\"{\u0019hZ2\u0019ɺҨ6\\q鴕\u001e[4{\u0012i\u0012ah)oٶ\u0013/\u000eҎlM`[:K\u001bWǯ-\u0007,\u001e/-z,\u0005Dw\u0017Jd?n-ɲՙZқ,[\u001dceKcj<9?499ܳys]b6mQc@Q\u0000c[5Nj\u0018YDNhB2]It\u0015xc\u0006\u0011w\f1Y%(ԣ\u000e]\u0019|zl\tK\u0005@rTƽ]_d`v\u0015\u00162Mo\u001btuu8i\u0013+'D向+\u0010\u0002o4\t]`O\"`\u0016.\\$[pApCn\u0012BLY(?&Nޮ\u001dm09jy|04ܱ\u0016w*V/i)m6K\nض\u0017)R\u001aCŶڜ䗏\f^?Z%~}q侐zw\u0017Jd?n-ɲՙZқ,[\u001dceKc=^\u0004m{lk'3O\u0012m\u0011yz~\\pnm\u000b:\u0016\u0004OK)ew%/lt\"H^Qd\u0016!\u00001%գKJ\u0018H%\u0000\u0000r-f'\u000bo7\u0018q'7}\u0007L&yE\\6K&\u001d$U\u001eYŶX2̌\u0018\u0016Sp\u0017ϡ\u001co텎RDT;q\u000bwB۝[py\u0010REaTdgCV=<iƱEmy\u0001YRt۾pdy_~S8w뗞\u001d/~\u0018+[\u001ae37Y:ʖ(+{\u001f}Gkpھ(6fϜmٖ\nm\u0006oo;q\u0019\u0010%3z+\u0016/\u0006.&\"\u001b^4\u0011F\u0010KF|bU^mߧBs}\u001d[_R-jH9}@\u001cr\u000f,TWj6\u001boш'P6\u00009ѭI-'\f'`1Pj\u00074Ѝ\fjǨ\u000bLnX\u0010\u0018Rm3NyEpśm\u0012[m~fg,*,VbH\"s\u001dٖ1$a\f$\u000elܡދGIs}nvSSS?%\u001f7ʖdLlM1J?E|/ME_VUe\u000f=\u000f'0սD-`\u0015:َ3ru1ގ\u0001a\frq\u0014زU\u001edmC\u0010FX5j\u0011e˶0`ps\u0016f#\u00131N*˛s˞&\u0000Rh-M8\u001fh%kH-\\krH2L4\u0006ňX\u0013\t,)~'\u0005V0\u0000^jXa\u0010=$W\u001f(|I\u0015zt\u001a\u0015Aݥ\u001bfV\\Rgv\u0001y\u000bE|xh6;*ՌW3mGh%\u0010d,mv3mwd[Igۯɞw]<۞}b~v?%\u001f7ʖdLlM1J?\rYD_{ALdϯ=\u0010Udض'-.f:3KV-jdRv[0pG`V7^GEܑ4vEJYJ<alK\u0014X2\u0010\nU-k\u001ds\u0003\u001fi3\u0006\u0018#¶d5\u0018$ř\u0014\u0010Ħ\u0005@9\u0012E1\\r\u00154ȍ'\u000f&P0\u0015R/5@KuΧҽ\n>z.w9@\u000eS[.s/M걕acYG3m'\u0016vLI.l+W\u001f:D9P8Ӛ=Ӛy\tXc]ş\u0012ُ\u001bceKcluV&VX\u0018\riW\u001bS~\u001a:̍^;m\u0019vs\u000b\u0019)\n~VP3ˀ0ۺupe\u001cމlǓT2ps\u0017!}\nV\u0002i\u0003YصLv\u001a٘\u0013n\n^\u00014\b徭Un\u0013v\\1\u0011\u0003[eݮ\tA&Y\u001csj\u001d\fo\u0001Bel\u0001'Pf\u0012f=̪CrC6íZ8g3'l\u0006u#\u001cƹJ] \\z(\u0003\u000e\u0018`]G-f޼0*^l59*RH+fX\bm[\\+\f\u0018ۖaT-f۳KW\u001e8vSzl~\u0016GA}\u000f[-ُ\u001bceKcluV&VX\u0018\u0004exKg?\u0019\\ \\Bm3{=${Y(#H.\u0019\u000eX-AEnP)ގ\u00052ȅ\u000e\\v\rL%\u001eF`mMA.-Mc\u0017!\fCw\u0007C\u0016Ztoh\u0004$\\\rl\u0006OxԸ⯷z\b\u0018ƢȪ\u001dk2jc\u0015\u0015ͺزnfXijlşhj.aH*Մ#-si]\t\u0016\tEm<~/z`\u0005]\u0015'\u000eB|\n{W\u000b!lHSl\u001bhlbS\u001b-\u0014\u001fm\u0010}A>޻?%\u001f7ʖdLlM1J\u0013ODp'_\u0011)9?\u0005\u0011߹{a\nm#O}̶AH\u0003d ܉`\u0016$VۘO\u0002\u001d\u000b¥]舙ޘ(mq\u001eieP96X\u0003ٵ>'_v`\u0013LOXo]?#-k][8Bl|2\u001f-dx6P\u0010l\u001cfrȊe.riU=$\u001fK\u0017@5Ngu\u000eB\u0002[\u000e\u00191\u0004Όb[weEP9`:m;4PoZN\u001e(~~kf\f\u0005{U_Z-ُ\u001bceKcluV&VX\u0018s\\<3N\u0019Q=K4N/&/V\u0017^Tנv~ЕS?(u3mE\u0013\tw\u001ce'z\u00011Ø)ż\u0011+ȱޢ?ɍ3Է-](Ϯ\u0002(\tW@R\n\u001a<\u0019B5JĤe\u0006mkJ=\\xK9W@\u0000\u0019ŷrn7gu%I\u0012xQ\u0002,wc\u0019\n1\u0004&lJ\u000eoܝ\u0004*ow?t\tʩp\u0018I\u001f4ƶ\u0001`iV4\u0010۾z4}\u0017֚\u001dZx«\u0007\u0017^=~\u0002ᅻ?%\u001f7ʖdLlM1JG#T᣽~X?~\u001fg\u0006\tr&g1g[:Hjosn_\tluCTY\u0003[16t\u0019]<fr\u0004\u000e\u001ee\u001bEʶ}M~*Xaѭ,w].B1\u0013?K\u001fh+\ni\u0015\u0002.P\u000e9kZ3\u0003^%f0H\u001eթ6\f>1-\u0002><\u001f{9\u0015r\u0010V_N1)ȶJ)m+\u0011R9ia[-mض[l_<{J2QjynOǍ1Y:S+[zecliҏZ>я\u001f\u001f\u0007',\u0004?\n.\u0004?Dϒ\"T\u000b*죃tȿ\u00103+ض{;iD\u0003AgQmV\u001b?r\u001f m\u001c(\u0015\u0011R\u0000\u001930\u001d2\u001d9僧D߮8\u0003b+4{\u001c-S\u00037\u0012Ed|ټ<\u0016i\u0004oc耵\u000e0(ɧXo'C\u00017R7R}DgWd-\u0006[3\u000b\u0011tA$\u0011Mu6(uy <iTIm\\h\u0016\n3Dkǿ\u001awT\u001cǛvbu`{c.u.\u000bD\u0017 $;\b@\bz.ٖ-wEqƎ8N鎝ؐ>3\u000bȎy}s>;.ޙLdWvR}\u0015\nm\u000ba@\u000e\u0003 ~\b\u00164BFΘE,\u0011#X\bP30323<+Rh\n3\u000e7W\u0002\u000ekeuv:\\\u0015n\u001djv-s[oݖ\\\u001e\u0017&*؍hIxy-5v\u0013FMZ\u001en\u0006qHp[:Z>\u001buoуp\u0014xS\u0010tN/A#uxхܬ0f(\\-ZB-n*n\u0005}J+s\u0001dn\u001f\u0006~7\t쫱f SM\u001e\u0013r9H.v#+zcu\u0018=aj\rI\u001e5v[']$yz؇V1hu(D뛫km٩­Q\u001c@PUd\u0010ě~\u0011ď\u001b\"FȈ\u0019\u00172bu\u0004X\u001aA1+>a\t\u000e^`@R\u0019\u0011T\u0015aWF\u0006VGث#ؗ\u0007nӒGoa=\\va(o^`#UE7[&v]W]&ɥFzn\nF\\h[MR;,9m\u0010/Lf>K>볁GuVtY-F-6&w-?n9\u0011_Vy\u0018-^{AbʝJN^-7ӫ\u000fejF8\u001f5|jVc\u0019ޓpG7mV۲]qN5jq\t$TN\u000e`I+*1'op[UtHut*Q@M?\bǍ`\u0011K#dZu\u0015\u0011\u0011\u0011\u0011\u001a :6&\fWGTZc\u001b\u0006gx}lxMdP]LX{[Z])\u000bժ\rhl\u0019<ns:^o\u001ed>I]\u0006\"!7޷Kt}n34j\t֡S۪,$\u001cd\\+25{\u001c/\u0013UZ4b|q$9Ԛ尡\u0002\u0013C-Lxm\u00194ms\u000e\u001b\u001f\u00103/ˣ\u001ee\u001f~aqM[QFN\u001b3\\\u0003Rnb>\u001cިUZ\u001c\u000eo~\rϿ\u0001o6֨zV\u0003ߜT7\u0007\u001f\u001d&趖@mAxMZ.*\u0006b6Ό܂V1R\u0010]_R0;^\u0017稏uF9`\u0007\b˵p\u0010\r!#VG\u0011\u0014M&wt;5H.\u001b iiOiO\u0006muGw$Ş4&̬eVmI2sy:\u001f9S9e\u0012[fn\u001c5pJk\u001cpsM\u0004[:9湁ËSTgppm\u0013Z7?\u0018-lTKכbz1\\ųnF-jdSBҢZB,G-ߺ5\u000fw[\u001fc&F:m^|\u0013\u001baڨ9ˋX:8\u0016=Wf1~\u0011#\n@>o&n\u0004nm^u[`\u0001i\u001a4\fphm\\\u0002!\rne1x~iOq-]^\u0007O59nNF\"$-IfXLr\u0003 ~\b\u00164BFΘE,\u0011#X\b\u0014WGJ4wg{n+UlTG\u0006w2Ao;S3\u0012z\u0012vV\u0015Nnk\u0005\u0018\u0012B\u0012\u001e\u000e\u0000u\u001a5.ַ`\u0019\u0006#\u0005NEœێ̭>:o4\u0014Gn.'\u0015EΒ\u001efgXz\u0015&\u0011ɈL-h,|{\u001eC3w4X|tS:%vmtlrnֱ볜oiNV#۬mEQ\u0016{$nLgr:W\u001e[>\u000bsXƣ<شu>\fƥ'!ғ#9/+;3`^vrwVRWf\"ě~\u0011ď\u001b\"FȈ\u0019\u00172bu\u0004X\u001aAѝ8/3\u001bg\u0017\u0010KovR_v\u0014gW/;ojdBjPHԽ@m\u0003Uqx\u0011\u001emƏ8\t\u0018WrٕAop3{yإ|Unq8mõ@\u0015\u0003Ż-vtWi]_`6m>F\u0006/fsn\u0012jM\u000e$&ZY!9q8]nx]\u001b]qX\u0011#V#w'+?U+&\u001a4fϽ{<[cie.*E\u000fy6w\u0011ѹax`jL6\u001e\u0013\u000fNp[\u001f\bl^FI,®ҁީ\u001b:ݙ=)*3\u0010K\u0006ś~\u0011ď\u001b\"FȈ\u0019\u00172bu\u0004X\u001aAb)3K,\u0005Y)sR\\)\u001f_;˻\u0002֮U2N\u0019ËJ1\u000eTZ0չm\\ݍzy;[xT\u0017s4k{w!qGOq0\u001futA4\u0003&\u0018Z @|\u0017\u001fhrw\u0011ʉF\u0005f:p\u001baԴ\r$XFYx\u001bzgֱ\u00176>Qqc=3~M<a<Gu͜۲\tV\u0013\"kZo{f\u000f\u0016ѵ9\u0012kYUI\u0013=n\u001boηvI7miiSz5'9/#q^f9I]HM?\bǍ`\u0011K#dY\u000b\u0019:E,hOؙ\u0012\u0001uJl\u0015!\u0014ք4yin/\u0007u\\09BV\u0003Ź\u000f>b;\u000e\\NoAlacM\u0018vҮ4fO?\u0017݄un\u001bU-\u0016jE9-}'\u0018\fn,\u0007Z-&Zw\u0016<ӢF3­V4\\\f\u0007\u0010l\bϢg\u0015,YQ3n5\u000e_d\u000fg\u001eN]\u0018jn\u001cmÆ\u000e\u001d-\fNi(tUZ_T?JoQiƚ1F\rbҡբ\u001a|<BlY֡sbU\u00147h,Нr'!\u0016)ў\u0014۞lK\u0016Ϸ\u000f!~\b\u00164BFΘE,\u0011#X\b\b\u0015\u0010\u0017\b\"\u001a]ͮ\">69>\nFC\u001b\u001c`mhiɊ\u0011z\u000bQ\f_u\\&>'\\e\u001b\\~\u000b=~x{;yęc\u001a<wҧm\u001ajJW\f\r\u001a=5\u001bM\u0002\u001b<\"#v|O\u0006ŦL\tv|`\u001ejmS\u0013o}a\u00189cϖ\u0011:b0{uaN\u0015<*2 \u0003|\u0016ttܾ͛۫xQ\u0013\u0007;\u001eSZ~ݣ8\\y\u0002\rx4q\u0014\u0005G\u0013QA8\u0012\u0017`y}\u001fc\u0004F\u00112bu,b酌X\u001d\"FPTGTG\u0007WE\u0007DDFX`P\u0007jê#5X\rw[myy\u001a5\u001bKf.?ߢi\u00028K̈mIξ\u0018ƚAa\u0004RC\\떻\u0011*w;Tv7=\tmNԍy/BE\t\u0002\u0002EGӓ\u00034`quJF\u0018GiFF]ػ\rw,d\u001a]\u001e\u001am(^W0]ܠ`zRZ\u0017\fnNf=Gf6=]\u0005|6ib0c;Tʎ015HX\u001c\\\\\u001d\u001bv\u000f1q#X\b\u0019:c\u0016BF`\u0011K#(J\u0013KU>h&i&j\r\u0019I\u001cI\u0015I3\r-\u001dp\u001c\u0016z;LrM7\u0011\u0017U6\u0007\u0013GG-\u0006:6x\u0015=\u0004\u000b6p\u0017@ ƨI\u0004\u001cNz~F\u000266z\u0016RVy\\\u000bmcB$F'wK\u0006˞\bV\u001bc\u0003fCE?|Z񆳔\u0016.\u001b4ؙ\\nnc\u001co?\u000f%\u0016\u0003\u0004E\u000fqY9F?mm\f߲\u0018\b=wȣ\u001fg\u001b\u000f#\u001eK\u0018<D\u001b4t2\u000e\u0017_n7@rV\u001bg\u000e4=o\u0014[ֱ%u\u0002Al}5F?F5OqJ\u0015Fݽ01d'C\u0007\u0018A\u0011,biX1Xz!#VG\u0011\u0014%Ao\u0013JU\u0013 ''2\u0019\u0016\r;qvbfRf<x{˹BB|ri\u001e\\#\tb\u001e\u0006\t\u0004$Å\u00188h\\\u0000&hzŘ \"Ʉ\u000b.\u0019deǮ>DW%imU\\V4W<\u001aB.!\u001c!ւ\u001a냓 \fs[\u000b?O`rOy6_8rn0g\u001dɛ'b^\u000f\u0006>{1GQc\u0018<D5.\u0012\u0013XӺ\u0005c~\u0002db[\u001a;\u0012\u0001D&WD?y__/$UFI~~\u0011ď\u001b\"FȈ\u0019\u00172bu\u0004X\u001aAQXX\u0000t\u0004\f\"\fm\tW{5\u0013FL\u000eWj\u001405&p=k\u001c$\u0017.0ι-k:iyѧ=;r(zΠަX&Fr\u0019\"\u0012\u0011^RW\tGh.9,רxM{ok3&\u0005v[p%Uj\u001aVO4\u001bxz^x4C\u0006^aE#\u0015f$\u000e\u0013\u001fuE,|dE7{\u0017\u0013\u001b}vc\u000bV;ZlcFNfSf'O3S?uQA;Zg\u0006N|\u000f1q#X\b\u0019:c\u0016BF`\u0011K#(\u0015\u0015\u00130*'`q<.m^6U''\u001d\\\u0015I#^mmU*\u0019pEr}\u001d!^>\u000e:Ϣ\u00170f\u0000eVˢ&\u0007͉d:}Q-KujIu\u0014_\\֫1N\u001fYi1&dE=~:y\få-/V!5\u0011\u0011A\u0007j/F5Ϛy\u0011l7bA|g}6RfV\u001bA;g'߱mɐ@\u0004M\t\t\\c!Ҁ\u001fc\u0004F\u00112bu,b酌X\u001d\"FP\u0014\u0017)b\u0005K&\u0014ʉY*Ir<cr|)D\\zBE̴P*\u00140\u0015-\u0018nxp\u00148\u00110#\u0018\u000ek%G\u001a\u001f2L\fVP[\u0003Q\u0006u^\u0013cBdDQd#Q,!}\u0011)HNFx2D%T\fө\u0018:<\\\u0007aܠ\u00122<\u001f.(S\u001c\u0010\u0002;ۨ\u0013G*FmQ\u001d\u0004\u0012F\u000f\u001e\u0001\u0005}v\r`3@i5\u0017Nbv4RgVM?\bǍ`\u0011K#dY\u000b\u0019:E,(ϗ/++T+a|\\|\\*\u0010=w\u001c5vyUz$%/\u0007\rKÔr\u0019Z\u0011^~_D\u0000\u00191|$b\u0006\nxyJ)g.\f仈N\u000bJVBYđ@\r*V\u0016MЯCxB+hµj ˷mfT\u0019%_jT\u001eYߺox@l@Ui\tv͘_#3ꑃ\nr-\n%'֬='3et̩9\u0019\t57\u001f#\u001f7E,\u00113f\u0011K/d\b\u00164\u0000ev<$S\u0015P@-V\u0004\u001cW̢r\\\t\u0002;\u000e<U\u001fȍ\u000e\rUC2MoGK.jň.IF2nBow\u001cxaj])\u0000saь\u00158P\u001d\u0002Om! Qn/Z&/nћcU\u0015Q2uU}\u0007<eh*/?%D\u0000\u0015\f\u001feܵG'Z~C6p$\u0011>b뻫Ƈi'V,Jz#Ǐ4\u0013'\u0001]Saj:]+^'?q#X\b\u0019:c\u0016BF`\u0011K#(deX̗R$kb'W\"Dɫ.-~)߯8U)@oU\nVp}=FBdmuN(`w[ŷXN\u0019MfF\u0005I~uoF?\u0013\u0010ậ2X)\u0006hUl\u001ah\u001d\\ѣ\rZ\u001bJ\u0016g\n\u0003L.QMMhOK\u0013؉Ȑ\"t\u000f1q#X\b\u0019:c\u0016BF`\u0011K#(I\u0001y\u0014YO\u0001n˒\u0002)glr\u0011C\u0011Fy\u001d\u001f\u000eU)s=zm}P|\u0007#\u0006#RTU\u0015+e#v\u0007=nKL#\u001dM\u0011\u0007pַo\u000bEk!BƦfD>b2>yĈ]z]L\u0000s\"mnl/TL(Eńĸ\"BH\u001b\u0012P9\u001fc\u0004F\u00112bu,b酌X\u001d\"FPLEmI8Ů|ۘ\u00168ɥI˜0G\u001b\u0003Z\u0003&X9\u0018\nQ\tq&:\nώ\b^<ĤO+ē\u0017++TO\u000fj\u0002ń~\u0011ď\u001b\"FȈ\u0019\u00172bu\u0004X\u001aA+\rzݖL?BDy 'ɽ@v\u001b[H]\u0016:ˈ?<H]K]TmMS}WN憶-kZ\u001a\u0006j+\u001b\u0005xYq=\u0005t\u0004gQYbR)&\b\u000f\u0017?q#X\b\u0019:c\u0016BF`\u0011K#(r$?d\u0017tn\u000f\u0005܆H01$<d\u001er\u0019\tB9\"m\u001bڪ?|lN\u0011\u0011aK\u0017\u001f;X3P9(\u001bc0xVuf9lb||\u001cx4\u0002<dH*\u001cA\u0010s'OSOɕ\u0007\u0018A\u0011,biX1Xz!#VG\u0011\u0014\u001eŦ-:\u000fag%?+$Vr[~o\u000f{.B:9\u0017FU.o*4\u0012K\u0014IC\u0013J\u0014x\u001a#wV#]t%&e>&!\u0013\u0013\u00131j\u0019DlqI3\u0013(\u0019l3Z~P;b\u0014ܠ\u000eLݤ8VMbl\u001b+xS\u0011-w?/\u0015\u001aoOH0F[\u000eCör߇Tn3!\t|PPN\u0011s\n>)ȭz7(UC\t\"\u0010s2%WAz6)=\u000eN,7+媏wvO\u0018{7\u001e?\u0004\\n\u0003l\u0001fX4x*ܩƗ\u001bUB̸\u001bZaOr'Ĳ\u001d\u0013[\u0013<9mQr<>5#\u0012[|\u0005\u0011\u0014TyQ{d*\u0011\u0010Y\u000f\u001fc\u0004F\u00112bu,b酌X\u001d\"FP\u0014('\"{b|\u0012\u0005򉅊:Yҿ\u00004S1P>H1\tQN,QNbL)A$* ''<~\b7\u0000T4S=\u00194sf\nL_v,lJ_ֿJ_X\u001dHk\u0002\t=Z=%փѿ:\u001dDɿ_OF\u001aL\u0001@=Qgzs@\u0019\u0006=9=_og9\u0011\n\u0017_?Zk\f\u0010\u0012\u00012Wh\rW:g\u0011\u001ap\u0003\u0000\u0003<}6üQoNݰ۞lz\u0000_<{)6okQ\u0019{\u0013\u0011\u001az\u0019lJXht\nvJ-ED7\u001bv\u0015-@2YU&uU73\u0010\u0016>WdJSLX\u000eIvL_k!&B7\u0019v\u0019\u001ag]~p/ekeIeZϻrԘ}v?\r1\u0010g'CR\bGMrRUtXƯD/\u001fc\u0004F\u00112bu,b酌X\u001d\"FPB\u00150\u0010\u0012%\u0012ËT\u0013s\\\nIIIŪI%*\u000e_JފQSRNو'\u0001\u0011\u0001&Ё/L&N\u0001\u00158e\u0016F?F%\u0001V[\u0005Wm\f^Eo\"E\u0004\u000biD\u0011\u0013a\u0003\u001aIc\u001bQN!bd'\u0002<4s\u0004hh4\u0003 R&.r{`#O9\tG,6f~c\u000f~\rŻ\u0019l\u001a\u001c%H\u0003%\u0019<KZ;\u001e\r\u001aq=\u00189\u0007\rb1q\u0003\fz\u001d\u001ekRˢ\u0000sbO\u0002\r Z\u001fP\u000b_B\u0002!\u0014kPKC)\"f\u0002\u0016\\kvêJ~d\u0016\u001f)\u0016K'\u001e[\u001d\t{// \u0003۞KՓ4kcK5\u0010R\\T&\f2('(&MWM\u0007\u0018A\u0011,biX1Xz!#VG\u0011\u0014 J\u0016aՐ`\u0013\u0016H)L%D)\u000f&_--tLIoLXj\u0011\u001eq`\u000e;;\u0010\u001dil \u00029j\r^|\u0010PU!\u0010X\t:,*\u0018,*'8\u001aj;t@\u0006\u0016I\u0013`\u000eh&Wb-\u0012\u0019&\u0016)\u001boH,6+,V*v\u0014G\r\f\u0006X%-\u0016\u0015\u0012>o\u0017\u001bBb\u000b-Qd-hػ={N\u001bM\u0004G\u00168.Z$~u߫i\u0015\nڠɂތoN@|\u0000\re7R\f-r6\rE@&^ϔ6h&\u000b=\u0015բ̣dTJI=\u0012-ge5S\u001b%>`\u0018p\u001dQI1v'\u001dR\u001bW0KG|::\u000fHtKO?x~]qge9Iٔ\"*\u0002q߮\u0007T\u0018e34S\u0000lUa֚!ARՔR?2M?\bǍ`\u0011K#dY\u000b\u0019:E, oVl1,\u001a\u0005\u001aIzRftRr\u0019\u0015:a^+>,F?\u0012p\u00018\u0007fY+\u000fgz&\u0012I5(),\r\u0010q\u0000i=!\u0014$휂aw\"m6K*m$k\u0001?`\u000e\nBjć6VTv\u001b\u0001Rs\b\u0006#1\u000f,\u0002#VBO2\u0002\t:2|v|6m0K\u0016w{H\u0013_ihAUϮ\u001dWU6xhux݆%L[($ڂpR\u001cc#A\u0006=6\u0003-X&'\u001b\u0006(m@Օ\u0002\rpH@;\u000fHudǸ_\u0019I~:\rvͼTwOfRgblQ8Դ\u001a_\r7\u001aUJߜ*_%\tl\u0006IMKӛ\u000f>\u0010̶iin\u0019jP)`\u0004Jo?F\u0010?n\u0004X\u001a!#Vg\"^Ȉ\u0011,bi\u0004Ez\nMĖk\u001bi:\tO)M\u00118e\u0006\u0018k_\u001aUdl\"1Ig.1h,l\u000eJ?\b*C@5`\u0016\u001b\"Rkpb*G\u0000\n3Y\u0010X\u001f\u001a&V\fL\nUlbZdN\u001ci͆\f!\u0001y\rͱ\tLl\u001484\u0016\u000e;DӇ\u000eiut<\u000e.vb9\u0014;܃w]aαC.hg8Bv$A\u0012\u001a̱Qs\u0003V5zkkǄ\u001f4MJWq_G%a#sxfIw\\E4~\u001b8V\u0017A+\u0016aau.\u001f10i2ᾁh6q#\u0007<\u000f ̅\u001bټk؉Ҙө\u0010&\u0019;\u0013\"\u0007ʋ\u0017\u0015w&9ۜ\r!ZW\tj#Ɇ\u0000ܫ\u0001`<W\u0007?ɷ62doIy\u000f1q#X\b\u0019:c\u0016BF`\u0011K#(fhдal6+5\f\u0019\u00013;9\u0018+E\\yNEm,\u000fLX4.\u0019D#\u0015$`C\u0016hx*\u0006\u0010*mHi0\ni,sf\u0015\u001c&\u0000c\u00036#\u000fk\u0007\u0016\u0004y\fwP\u0011\fRt|+s9 %caUv9\u000f0y\u00173AB\"mXB#A\u0018!A2JdZX\u0005/#_\u0013\u0006QARز\u0003\u0013چ6\u0014۶\u001fv͗푁޶tfkU?gvr/O:wH\u0019\u001dsH1\u0002\u001d6\u0001Kf\fY;m\u0004X3NY]VR]Ⴚ-h=\fbEb\u0004k;\"mAf\u000b7\u001di\u000b/Nnb\u0013)EX楸\"ms\u0013Ć4\u0003+ղK~Ѿ\r;9]\b+)*1\u0012e'R\u0017\u00194sAI~\u000f1q#X\b\u0019:c\u0016BF`\u0011K#(8{/3YIW`R\u0004f\u0007rWևңTL=?'ӈ2!\u001aQct[\u0013~gk}.\u0016D \"+\u0017tS<S:V.ȁ6ʼUf㔶dvr(iv\n)sRE\u0017%\n`n\u000b\u000b\u0004\u0017EH1&!+( vC\u0012\u0016]!`\u0005۲\b[}\u0006AU]Aܖt\u0007u\u00076\u001f Z\u000bFTݸD^\t={1q\u0010{\b$\u0010n~k[ݧ\u0000)zs{\u0016`*|H\u0005t\u000bƗ^\fc.z\u0005\tONI0]ێ\u0016\u0003AT\u001ao\b9X\u00029۷\u0007_\u0018`\n\u0007q?e\"j\u0012r%d6y+kSlE\u000ejs\u0004s\u0002\\(nLHB&Dh\u001b\u0012cؔF\u0015v4\u0014\u0016:p\u0005\u001al}{ZW\u0017Ʈ)\r \u0016l}@Qv\u000f1q#X\b\u0019:c\u0016BF`\u0011K#(h\u001f7L\u0005fM^5d\bL\u0004CzEWCV[\u000b\t*mjp\"(w5!\th^q\u000b]4TNr%gA\u0014\u001cӪcStؕ\u001dA]ItI줍A\u001e$\u000bQ2$\u0003\u0013Tq1\u0018\u0013\u0018\nVy燪CU=n.Q\u000fUPBT=alP\u0013\u000e\n\",\u000fWsw\u0010\u0013\u0012puo\u0018m\u0013ƞ\u0012Px\u0017\u001e\u001b\tlm\u0018%m@0z\u001e3\u0010!@oӄ[:~9߯{_\u000e\u0011Hj|\u0006%?XN V{\b\u0010QлO\b\u0003o]\u0012\u0016{BͿb\u001bJ+\u0018{B\b\\nD\t#wª\u0010e'&\u000e`\u001c\fVv<\u0018\u0006$lr\u000eL \u0006d=0%\u0014oħmd @\u001bZ\u001dĨYI\u000bC5=)N-6Y;\u0012bMLtĆ\u0004Ą̉\tn\u001a\u0012ܹ).vU+T]\u000f\nd73mJҤ4}\u0010Ǎ`\u0011K#dY\u000b\u0019:E,4\u0014b~:1(K\fJ?LܝLk&\u0006%w\u0017T\u0002x\u001e\u0019/h6d\u0004M-ʚ&\u001cb\u000bua,W\u0005\u001e\u000e4\u0011&v]U'\u0001\u001e:7$lYz#x\u0016\u0001\u0015D\u000bU\u000f7TI\u0018\u000b(\u0017{\u0003\fH.`1\\0L\r\u000f\u0012>CP/p\"\u000b\bMw\u0011DA\r嚅\u0019Eh\u0017\"8Va*n~n\\߀\u001e\u001eYdOW#\u000e~{>\u001d\u0005\u0003\u0002\u000b\u0007~/#me5՛8Vn.͖n}\u001f^᱘k\u0017\u0011\u0004|\u001f\u001c@\u0002oZ/8\u0007\u0013\u001eb~^M%ju7\u000f\rs[\u0011\\\b_! \"\u0010X\u0011iD\u0015J;\tj\u0001;\u0006&!\u0014ыUsYdv<>̥\u000e~\u0007\u001c.*am\u001dޓ\u001c\u000b;7.=LGSea\u001d\u0016R]YMd\u0004&Dug&5\u0006i@'-4:L5\u0016EUm*:*7\u001f#\u001f7E,\u00113f\u0011K/d\b\u00164\u0002ÁWH\n,|KjLt),5I\u001a>gro=C\u0016nF%md8ǎ]v&3X9 |`B0\f%EZ\u0005\u000eUC\u0017B\u0004\u0004ԡZ\b\u0013\u0011b(\u000eC\u001d\b,lFj#Q9Dj\u00173pPQڥ(<Z4J_\\FKY\u0012\rkuˢtlDD0ay\u0014h3\b\u001b_ⶤDE6t\b2̵*#l3x\u0005?\\e.z\u0014YVjl&\u0019\u0018\u001b%\u000b\u0006~lu$\u0013\"uڑ̋\u0000H0\u001c\\bĜ3~\u0007g} \u0013>V\u000b)sG4y\u0001̧\u0004TwA\u0018vSK\u001br(Sf5!^zqϷ\u001cr\u0013ѻen2.R\u0007:dČH/\f1L;7\u0015\u001b27&#\u001ei\u000ej\u000e7ZeA9a&,\u000bO$ijJv)~\u0011ď\u001b\"FȈ\u0019\u00172bu\u0004X\u001aA\u0001\u0002\u000bԙ[1\u001a%yfm]W1K\u0015u\tR$ˠ\u001br%mAc\u00156e\u001b+'`sp\"\n]Rv\u0005y`\"D_Cq+\b˂P\r\n\fM5\fPpܤe$\n\u00148(tRH\u0016v-\u0004\u0015TC.I\nQ\u0003@C\u0007\u0002\u0001Dˣ\u0018cˣ\u0003\u0007b\u0003\u0010c\u0003\u0007b\u0002h\u0007`<6\u0010Vկ|2V0 lA\u0012EX\u0012am\f=\u0004Fby\u0000\u001cYԱ\u0018H\u001c\u0015Ѱ\u0016G(Ch\u0018\u0013l\u0001zy7kݺ`ŭ׌[EvlV@vt\u0012Woe#\\l6wp隰9e\u0006ie\\A\u0002\u000fu4A\u001d\u0003P\u001e\u001d8*p\tk\u00071_\u0012\u0011\u0012XU$\u0012y)EV)&Ji55}s^Hp\u0002XӇ\u001a\u00177T\u0003\u0010/$a/izh⦔Ss\u00115MVI׾s\u00160BCsv{\u0013\"/͑Fϥi6\u0005z=f:F)DhS4\u00066\u0004Tu6%\u001eeV7\u001f#\u001f7E,\u00113f\u0011K/d\b\u001641\u0015MԪ.0,F(]V,vi^꽞ݎe\u001dXpP0\u0007;\u0015O\rQp\u0006s\u001am\u000bBս!(\u001a}a*0پ053~lj\u001694\u0001j\u000b.\u001e%u$K&K@Hɹt \u0003,gDE\u0012\u00033a\u0004$+c\f 8\fb\r\u0018N\u0003\u0003\u0016P^-\u0003khU\u001c\r-\tL\u0019buqu4ȒuܸA#N\u0003ui\u0004aq\u0013Y\rhw+$kKn]\u0006<$wm\u0004e;\f\u0017hm隠_W1b\u001dX\u0015X\u00034GLVP\u0002q ְ\u001c=\u001aa Z<ڰ\"J\u000f@ά\u0019j~X\u0016R*(L\u0016c7\u001cPEQZ`1&0YDmej.`Yka灸0!Y\u0018]\u000b#/r\u0002ڋ{ чS\u0002X\u0011al\u0004zC\u0012\"Q~CA4?\u0014Mo4[8Q\u001f\u000e.\u000e1iMYo\u0013\u0001\u001fB\u0011,biX1Xz!#VG\u0011\u00148\u0012{L܍b-\nK\u0003,%\b(хmi.1^Pw0w}L`[=8\u0014g\u000b\tKB\\\u001cYЂFށH\u001d\u0016S\u0012;*{\u0006r\u0006\r\\餜_\\dMl\u0018\u0001tXd\rK\u0001c\r$:\u0011Xh\\2g\u0011\u0013\u0013%\r\u001bFi%M\u0000$.#\u001beb#\u00007nʹ%l\u000f6=[\u001a7\u000f\u0003]G6A\u0013=qn֞[Zo^4y\u0004Xˁ\u001c{Ioɍ!a\u001b/Xѱ`m\u001b\u00196\u00197\u0019ֻ\f<\"\fsz\u0017׺87s\u0019{%=g?\u0014\"\u0006\u0004\t\\\u001d˕u%՚fq/g}j=\u0001j\u000e\fH\u0007\u0006?\u0016#Z\u0016qѡ]Dk\u0007Mv\u0017!.\u000b9k6e:\u001c]H/N\rÉ5T\u001a\fNSwv6\u0015?LWi+ZT`mMhGn?F\u0010?n\u0004X\u001a!#Vg\"^Ȉ\u0011,bi\u0004E]bgĢ\u001bUsBUx+Xs.\rlf\u0004ʾ/\b\u000b1s'i0\u0006b:QNJf\u0000[:-\u0007{*3$d@Sص\\f2EnF6\u0002.&a\u0012b3, ݈-m [4\r[0hܚ\u0000$\u0011oK4mM4mKbyky\u001b=Ѵ=Ѽ\u0003\u0013/sD\u000b\u001bH`ege\u0017[`]8bމ9ڑ`\u0002P3=JnOGY%B\u0003I\u001dS==y-\\![!_!YRҷ\\qd\u00013\u0001H\u000eF\u000e=!ٰK~d\u001axro\u0014X\\ڷ\\:Ug'6\u0014}ۆƛ%ě\u001b )Ǒ\u0004\u001cي#8՛C\u0005XX-.8=ˁ,\u00166kv\u000e'ar)W\u001aWO\u001f4Exgr8ϊ\u0018\u001bcˢ5b`\u0000\u0003Q\u001cˢ4K\"Kp~zi\u001a{đj` -.&^n\u0000:{\u00015\u001c\u000e\u0011Ĉn(\u0013^*H\\Q\u001b[n\u00197\u001f#\u001f7E,\u00113f\u0011K/d\b\u00164\u0002OŻbשٮ*0L˞0u\u001a\u000eS\u000fc\u000e\\\u00101L\u000eU?\u0016\u0003\u0011j\u0000H\r2d+)&ue5:_\u0007\u001aD\u0001\u0000N\u001aJN#Ӣ-dm\t\u001c\u0013)H4L4H4J\u0016NBĘd\u0002qOew2$=\u0004%{EF\n\r>\n\u0014\u0014Z$\n)BN#8\u0001~e??<9<'.b\u0000@<\u0001\u0018L?k\u0011\r؛f[Ek{`\u000f\u0016\f_%\u0001\u0016,Z#_\u001di9 9ȡ8\u0002zp\u0015ҿ\u001a\u001fpotj\u0012wH_`}@\"\u0002a\u0004\u0015~\u0017=(|\u0002<\u0001h\u0019oB qvMnxH0m8b\fefs\u00037\r\u001b\u001b\\Jv\u001a6b\\\u001fk\u0004w3a\u001d&8^w8՘nک[ԭծխ\u0001+\u0015њvuj\u00140o\u0014;w\u001bwycEZ@r\"\t^A:LMSu<w]\u0015\\t\u0010Ǎ`\u0011K#dY\u000b\u0019:E,`\r0UY;ê\u0002y*v=E8S$B\u0003\u0018U\"\u0003DoVD\u0005FVG\u0007\t\u0004qX_\u001a6h81\u0002x6\u0019\u0002.p\u0016\u0003\u001ak<̎\u0004#\u001aPiWiW\t,iOi/T2\u0013+MRdfr@'\u001eL\u001dH\u001dLh?\u0004\u0000X<f;\u0006z\u0018b:r$v\u0018\"&v.I\u001dM\u001f\"ۏf`<a?\u0006ȑ\fn1\u0016i8-\u001eK4Lqz\fL>I\bO\u001e\bw\u0016Mnd\u001euĚk\u0003Vl\tr(`G\u0002^\f8v\u0011#\u00026\u001f\nXWxd\u0011\u000fK\u0019\u001bIlÎ#i\u001d;j7\u0010\u0014w5_<7%\\EoDmm_\u0015$$$D^\u0007̸'Y@\u0018\t\u0018'O\u001c\u0018՞lK`\u001dgM[]-..nݘssA\f8W<΀c~}\\ \u001a\u000b\\ԭs\u0006\u0012:)\u001b2bWF\u0000Í,ßw4K#ԋ\u001dpw\u0018ww\u001eۯ+H1/\bM?\bǍ`\u0011K#dY\u000b\u0019:E,\u0013\tC۹\u00185a%dKH@$|oWQi&mufm\u0003\u0019\u0018gD/3nFP\u0016\\&¸#޼m\u0011\u001d:V7`\u0019o\u001doٓ'\t\u0005\u0005\u001bI`V#T\u0011(\u0011R+dXxh*\".Rn?\u001et<\rH\u000b:\ti8r\"#Df\u0010$2\u0019\u0010O\u0002\u0019HV0Kd\u0007\n>\u0011|:+\f#O<A3f\u0006YA!\u0006Cr6\"C<\t\fms6;\u0001\fs!`v0lfP˼j^ߪo>d\u0011 `瑀[\u0002lD\u001fEv\u0002ǐ\u0003g\u0002N)9uG\u0000d\u0000`;$\u0003\u0016o\fl\fl@t#H\u001el9$vXl\u0001ʭ=:o\u00113H\u0006RXa?i?e?i38\u0001\u001b*HO\u0000D\u001ansrV\u0004xx\rb=J\u001cn`=\f1r$Bp\u00158D\u001cH\u0000T[%Z0,clݛ`ޛ';+\u001e\u001dy\u001b\u0012\u000b;q4Nkܔllq;3cɋz\r༱:`mlhh*8d藟e\u0011%\u000e\u0014]$ma\u001f\u0010M?\bǍ`\u0011K#dY\u000b\u0019:E,\u000b\u0011k\u0007૸6[75Ѻu\u001bbow;ev\u0016a[\u001cak\u001c'+\u001bt\u0015??r | z\u0000\u0012z\u0010t\u0003b2 #)G4t5vלG̒\b(\u0014IJ9\u0002\\\u0010\u0004\u001c03\\V,Cg\\\n^\u000eŘ\u0013r\u001e\u0016s9\u0017(\u000byŜK!r8.{\\~\u0011KB8rC.O\u000b<-v 7%s\twL\u000b#7N\u0018\t$\u0017\u0017oA<\t\u0011v\u0007\n\u001dYZ{}\u0002Bd=>\u0019$S<\u0015p\nCr\n.ªݧ\u0003G>!YE2E|\u000b]$;\u001dG7K\u0017zmߑS݀wyj(KS!\tMCv0C\f\u001dr˘\\\u000e\u001d\f\\\b,x!;\u001b\n\u0015|!3bVL\u000f\u000b\u0019sX}v\u001898l:#D*-&r@L\u0011@\u0019\b,؎؎BL\u001d\u0006!\u001eJ8l;Zp(y\u0000$3N\u001bHB$\u0018$\u001aw\u001bw;\\\u001d.88@[\u00028\u000379\u00037\u0006A>\u0006&\u001d\u001cS++#+\"\u0003\u000eM?\bǍ`\u0011K#dY\u000b\u0019:E,X_b\u00037;ف\u0015\t\u001dq.;\f]=n^ت[2\u0007c\u001cJ\u001cL\u001cFPQXX\u0019nKHH\u0004HN\u0003g(NI˰HrC\u0016\bN\u0010>@(\u0011iQaO\rcj؝9\u0001\u001a85\u001c9\u0010=+wMCL㒻h1\u000fߝܕK1/\u001e$nJت{F0=\u001e\"\fE\u001a\teGx\u0012\u000fwM\u000b2-\u00043g0`aK\u0005As\u0016|cu.ɫ\u0005 \u0001g8.\u0007\u0004\u001c>\u001f3\u0007\u001f<￟sG.\u0007l:\t\u0003\u000f\r8pFXCd/pJ$Ǟ\u0013\u0015e+Ȗo-\u0018t|סԻ\u000b\u001dw]ว \u001c)\f0\"HQ}Ŏ\u0007G<X\u001a@I\u0003\u0011?@\u000fr1\u0012~\u0010\u0007K\u0000A#bb6#W\u000f#\u0015ǽ\u0005VM\\w/C\u0000So\t\u0006&\u000ef\\#\u0007zt\u0005h\"+|\u00073A/\u0014Ŝ}\u0015vZpg۩t;a;7Rqg\u001cN6\u001dN4\u001dN2\u001dL2O4K0\u0002{{n.a\u000bNV\u001fc\u0004F\u00112bu,b酌X\u001d\"FPw\u001ct;rBr\rrCo\t:de/?侼V\u0018d˅LaW\u000bï\u0016=\\\u0018H\"ǣEǋ\u001f+q<>DצG<]\u001eti3eQϕG]y\"慙/r\u0002T:\\zZ'@Co5&ݜNK?kK-\u000f;?̏er^毺?d_7\u000b~֗B`\u0016\u001eE0b\u0002_Ey[\\٢ϖ\u0014|8%.\u0005\n`8K))dѴ_/\u0003>s?^4\r/磾܏\u0016\u0010}\u001fNp>Ooz>\u0000gГ\rweەӹveB朴gj]ת\\OT=6G*b\u001e\u0011s<GSS\u0012qWqĕ\"ǕB9[bz\u0007f۔;\u00036\u000eذ\u0007_\u001f↽\u0001W\u001eaW\u0007{v×K;Oo؇G.a\u0004{Lz=;J\u000e\u001cYɡsx9;%Kl\u0006mp\u0017uo\u0015E[\u0014q13(,jy3߹V|\u0005<]z,䵮0y\u0016b\u001bVag\u001apz\u0018qѣZ\u001ccV\u0017\u0007j@U\u0013c\u001dXEcQE=R\u0012pqCE\u0011\u000f\u0015\u0002\u0007\n\u001c\u000fc?q\u0001y\u0013ߟ\u00171\u001f#po^=xsSp\u0011{rB\t⮜\u0010Μ`djȝ\u0003Y2.g\u0006]ʴ_Ğ\\\\:r\u0006رLH\u001dO\u001eK\u001cK\u001eM\u001cI\u001cN0\u0003 ~\b\u00164BFΘE,\u0011#X\b\u0007\nA\u0001A\u0001;J-˹!\u00148\u001at:HA\u0013%\u0017;u\u00179ΥZ\ry$ϔE>W\u0016y\u001d(^\u001eBEԏfDP\u0011fż<+ʘ\u001fWŽVzF7߮wӘڒoI=sёܴ?IOoz>7wr@Q$K/\u0003E]QŪ/W\u0015mUɗ\u00077N\u001fX6|p󌯷\u0018Z1}Ў;g\r={=*Ճ\u0007\u0007\f\u001e\u0019<Tq-r\u0016\u0017\u000f\u0013x'`\u001dr8LG\b\u001c% 9V?xn8$G\u001b\u00077PG[<\u0005SIOk2^L{-;O%2qWg8pˎl9;\u000b\u0007N\u0004l\u0017ud\u0000`%\"9s'\u0002{2'\u0003\u001e\u0016p3wyێ ۏ\u0005l=\u001ad\u0011\u0018\"9ug\u001e\u0000>&9seɉ˒\u0017%I7l#ݼOqln;{9:{gsuո~Ԑr[]otgݛ✟/͆\u000flD'\u001b \u0019D#_\u001fo\ns\u0018c\bo_\u001fHWj09T\u0001\u0003U\u0006\u001a5spL_mֲm.r})j\u0017JXYϗ\u0017eI\u0015iQ\u0017\u0017?w>[io?]_']\u001fMegڇ\u001d@\u0007sR?H{=\u0005iKʻIo5ſ~!zO]׻_u:el\u000bb~43Gϊ~vF\u0014tyԵ\"@\"\u001e-xl\u0012#Ŏ\u001d7\u001f#\u001f7E,\u00113f\u0011K/d\b\u00164\"XcU{<D,\fS#.\r17>==R\u001fG\u0002/ Q/VD43Y1Ύ}2* 'U7joո߮uS~>\t5'ߜdTڎ_t~ԕ_u~ڛ邬OXǥ\\2Y^\u0015E_,bU֕|\u0018|ӿP6\bJ\u0019vp\u0006wT\u0002େ@Z9K\u0005֣r\u001e\u001f:Q\u0011\n\u0013r,CI42>6\u0010O6\u000e\u0002\u0017xh\u0018<M\t\fb҈9\u001bag\u00106cr\u0016?`e{˦(z2~</9[iLx@Cͷxˊt-\u001c:;\u001dWdH/-}T縔α\\Oz>%Dr~$<+y9\u000fH|cݧ$\u0010\fe?${\u0019Oˀ\u0010_&qޓ]d;\u0002]G;ȷ\u001fo9(߶_vEǟ8\u001f|J/޶f՛?_>5E_\u001c\u0019<\rCi,s\u0000K\u000e\u001e\u0002\u001eē\u001e:_\u0003@U\u0007}\u0007\u001c\tTn+m,ۺ/ו|k?_Y\u0004eyៗ\u0016yi\u0016aQ\u0017~a\u000eY,M_ί{2~ݝ1Е˹\u001fu\u00010ܟߖ~k{I?mN|9\u0001x9\u0019Ŀ\u0018zZqV;_rR\u0019Re̋1/\u0006ύQE\u0019ϕG?[\u000e\u001by<\u0002<҈'J#\u001e\u001eq\u000f1q#X\b\u0019:c\u0016BF`\u0011K#(\u001e-v<q:qmPTS%\u0019ϖF<W\u001a\u0014lV\f#\u0005/Έ\u0004^\u0002\u0000zevV*'57k]oָޮuSzӆ\u001aoN%等\u001fbNGt'Yaq\u001f\u0017yɴ,+|\u000b\\Iڵ%\u0006M`C`[ʇU`vgЮY{f\r\u001e\u001c\u0002\u0005:R7tn\b4\u0016MY\u001fF`4\u0019\u0004Ŋt,\u001f6\u000f\u0003h\u001c\u0018Yi\u0010/ C\u0014id\"eB\u000b$_ź\u0006]:vg<7-O7$<Y~}Ӻn-ݲz-\u001bv`Q\u0003d_v\u0001\u000f\"w]\u001e=/\u0011W%w=&\u001b\u0002<&\u0001}Br%^Z\u0007ǥn\u001e\fȎ^\u001d\u0001.b<zQv\u0011S/ (>\u0017dO>/* ?xV\u0019ŁSIž\u0013*.#x\u0015;'/\u0005;9a\fĽXRsҶҷzO6|\rze\\\u000bo-m=bo)s{_<ql\u0017AfGk\u0007\f\u001e>0Ygzo.Ʋo(]_-bM_W\u0015/+\n?_Nt\u001f~I\u0016|֟io~ _ug+?pn?ܟ\u0002&%\f7wlrICkc_}\u001ay*gG??+G3WD]\u0019Ly$N/V\u0016D!ď\u001b\"FȈ\u0019\u00172bu\u0004X\u001aA\u0018Y-Ŏ`Ö$%3\u0006?[\u0016q,%T,N?e}0ŊȗfF2;ǳ_\u001djbި{\u000bu]z\u0005V\u000bߌ|Кa[/\u0013?L%mG+Ӟz2?]o\u001f\u0017qQ\u0016eY\u0003_\f\u0002o+Z[Hl6\rm1uж\u0019>\u0013g C\u0007\u0006\u000fU\u000eԥ=0t\nĖ7D{\u001d:<I\u0016\u001a+\u0005Jη h-0~\u001c\u0016\u0017[(i\u001dBm\u0005{\u001d2t\u00156\u0018\fIॖ˭\u0018m8^/wi[f47g[\u0012u\u001a\u001c>u˖l{cS8/;~\u00119yIv烲\u001f\u0002\u000f=)}\u0015\u001fK\u001f&yiOK\u001f~F3҇I\u001f\\vYeW^}\u0016[\u000f]\u001aGv\u001e9d\u000f=-zMdϽ&\u001ag^Q<\u0014Ǒ\u000bC\u0014/+N\u0000\u0014\u0017QsUq!]\u000f)|Oy}Qn3ynɁ\u0013vLp$Է30\u0017\u0003;S\u0000\u0017Z\u001f\u0004_\t%hFNuKހ{\u001a=i\u001f7v\u001c^\u0019_oM[?o늿\u0004\u0014}诫\u0003\u0005^ǥX-\u0002¬,Ȥ\u0006n=\u001f㌂_M\u0010I\u0001y{\u0007m?kI|5wZ\u0012nNx1\u0001ͺx\\\u0004^qM@uU1/T\\\rD?7\u0011l\u0005\u0019ț~\u0011ď\u001b\"FȈ\u0019\u00172bu\u0004X\u001aAtSeJ\u001dJ\u001dk]֕k3l\u000f>W\u0016\u0019\u0011!g\u001d#j0\u0014Y̌|uV `oľU\u000bnz\u001e5\u0007Pl?lEEG\u001d)_w;ӞzЗ\u0005S(ϋm}>\u0005\"Յ_SbdpCЦ\rC*6\u00033v\u0000v\u001a[9j@ALWiq\u0003(Fn,gOCZ\u000bBr\u000b\u0015DF[Y\u0011\u001co\u001fr\u0014\u0007!\"-__lʏ\u0016<r\\̗Үu\u001aT}\u001d\u0000.r-\u0017\u0007.-?{Y~N+\u000bw.#t}ȓ?d\u0000o^yGv%/RE/ar#;\u001fc^V<)\u0018YK'_T<U\u001d\u000f)xAG˯>I}\u001f|JO=B\u001e}Nȳ\u0007)\u001f~Vy\u0019x!\u0007!>|I{Ty+\u000f(U\u001e9:tBu}G.Ԕ֤7[8\u0015u_G=\u0004\u0011ݖܶe\"MC5s\t{S뇎\r\u0019C\u000eT\u000f\u001a;{h7\t*\u0006ޖ͠%[[ڢ/W\u0017}\u0012\u0005.\u0013m\u001f{;~\u0007\nѕyi?L9~{ڒkIz5Dۦߨ\u0007>jPo\\bbe\f:\u001b\u0017ٙQ̌\u0004n?F\u0010?n\u0004X\u001a!#Vg\"^Ȉ\u0011,bi\u0004œß,x4\u001aP\u0016\u0013\u0016hI홶Bөm!ɦgD3HA˳^\u001d\n׮\u0001ިyf5\u0013ط֚𳖄'~Ԟ_u$3s>yi඿]o\u001f\u0017NS\u001f_u +\n\\Yw`M!-ca没-@vvͨ3\u0007\u001a[9rP56\u000e\u001dggk\u000en,,)ymhg\\\"\u001d?2>4r6k\u001bj\u000fV\u0017ti9?JW\u000b[\u0012VN_ֽ'^òǟ?+\u000fzP~U\u000f}DKN}\u0015Oޓ3\u001b\u001f(@\u00077.\u0014_S<kOCk\u001fU\\M\u000f\u000f>%|;\u000e{:<a\t{\u001f>~]\u000bK^T>WU~\u001dWUO\\W=N3GV=\u0015ՙە.NW8\u0002qp#@oߘެ\u00068TթƯ[{\n;\u0003)s[\u0010Rsr$FX=\u000f\u0019ƞǮ>\u0013v-xU6}i\u0017\rc-?\"9 \t\u001a\"@܁\u000b)RFBixһIJy{̰g>uvv8\t?]\u0002\fw෵T\u000fm_*\u0007\u0005n\u0012~ϋ=+ϓޏf{7eyC\u0004z]\u00076A\u0014ϻɞwS<o%{L90\u001bPo];_w\u0018|!|hs\u000eg\"\u001ddԉp\u0013avDnA<n\u00165\fѝ\u0016\f\u001dhYq4X\u000fcCǻ73\u001cjw:\fmln_>pK\u0011+hB(\u0018^Cb{#\u0006x;\t\u001fV\nOqoJhJqoNx\nL@l}~2\u001f~\fu)pہo+\u0007\u000ex_;\bc>\n<.u\\p˄`SB mL\u000fz\u000b\u001bO?-\byyZV\r\u001c\u000eu56uMRZ\u0018ݶKD5\u0019WҶ\tlrG,\u000bev#\u0002FT&ZqMU#^͍j\u001c\u001dxb\u0001\\9\\iFMS)2SHFv\n\u0012%zX.R.ZN=xs,\u0005#}GGN\\᝻;w\u0006M[;M{\u000fA\u0015}ȿw<i3gIP\u0005\u0007OUp\rNn\u0003\u0013\u000beWu.6˰o\u0013sͭ6j*yJ&\u0013N^\u0011*\u0006\u0003{\u001b\u0011&:vNY\u0007\u0005{\u000e\u000b7l\u0013\"\\Yj`Fu\r\u0005\u001b6liNNoD}X:3\u000bxb&eur[]\u0006p\u0004_7\b\u0017\u0015)^\tK[\u0000K`n;\u000fEcZgGΈh\u0016:5erIC>M\b\b\u0018;Xh1pGߪ\u0007Sk%[W\u0003~.ߋbp>/ޏR@o3֧yõ)\u001e${އ3=&In\u000en8'\u0017cG;k]t\b\u0013\u00110=F\u0014l!Zc\u0010j!Zo\u00101[֘\u0015?\u0004Y\u001f\u000f:\u0015nw.|ݹxbkN? \u0004ˉWF8k}B\u000e\u0006\u0019o$:Nqt7n˽\f\u0007n9\u001e\ry\ry\u001eMyͅ=\u000bz6\u0017y=.zRYހ\u0017\u0015>/{r䀟k}\u00199ױ\u0003\u0001\r|3.\u0006\u0002\b8}\u0019C>\u001cy搖!-sZ慶\rm\u001fѲ eagK?/4+\u0012>Lf7$lJjْܲ%\u000553\u0000ֲّ=ug:>hٞ޲+eW&\"eg:\u001c\u0004-\r韶ߔƉAF߮10ef3Mmڬngv\u001d%.Sdl\u0003\u0007w\u001a\u00107\u0013\u0018\u0005u\u000f4(SHtoWo_xox̿vWs\u001e\u001c_/@xNxA'a3AsF::я\u0017E/N\\\u0012x\t\u000e_\u0012\u001d <v^xˢ''Ƨ\u0007\u000f\u0005ϰk'vO2,sDBC:\r44S.I\u0016^^n\u0018pI|^tAr^rNr^t`a\u001d[\u0000Dw6\u0014*:tL|\u000f;r6\u0010n٭=]YW:癡\u001f\u000e9e[rT\u00027\u0006\u001d)m\u001dWR[ [n\u00015uK\"-\u001b\u0013[6\fkY?e5\t[Wŷo]\u0011׺<uYlؖQ-\">\u0007Z?\u000bOsC?\ry?k軙CM\u000f~;mAM\u000bz=ui\u0001L=\u0004W\u0006\u001a8ߗ\u0006\u001831\u0003{ZquG\u0015\u001fVm.n,j)j,//zP~<y\u001ero\u0000\\e^Mwr1BӅ$@<n\u00165\fѝ\u0016\f\u001dhYq*\\8\u000b\t\u0017\u0013/\f6H9Iێpt-zS^x6`ӕD;\u0019n<\u0001\u000f=z6x5\u0014y7x7\u0003J\u001f~T\u000eʾO>ld|_\u001bbI~\u0011ܐ[\u0012vie1Ǿ_\u0011ae܇U\u001fV\\i\u001bG|ޔysLB!\u0002\u0012ں#\u00053;?33`W֧Y\u0001{s>| `n8\u001fo\u0014~\u0000ߏ1(z\u0010֣E#\u0016+\"?mM{0\u0014E+{cnvt۴ۂ%\u0016.t%iF֦\u0005K\u0011q߆Dv\n.2¢*A7%fZ\u001cSvhBvJqJeXl3{5U\u001b`ggg⺧⦟\rOOE\u001e\u001aIꟊ럈\u001b+⋷%\u0017nI\u0014*9{CRDrCFɳW⥫Ӻ/RM)6L-\u001amc9T?@\u0017\u0018),o'ϦĿ@tN\b!~L!I\u001eJޕ\\-t[r)\u0013}GN\\&9{Iryə'Hl-YXNv6\fo=z4h>\u0002\n/\u0016\u001c+DW\nї\n\u0011\u0010pC[\u001fs!@i=z\u0010?\u0000٭ؗѲ7eO:ϻ\u0001)&ڒqs#ޭy2Ґ\u0016\u000f}hC~>ك_M\u001fT\u0017\u0013~08gc\u0006<\u001d>\u000f+{7Wni*i(/++_naϻ{q3flY3.^Hw?_\tl!Zc\u0010j!Zo\u00101[֘\u0015㬹\u0010\u001bX\u001bh\u0007h{h{QV8U:^8\u0006\\q\u0010u\u0010\u0017\u001bZT\u000fy\u0010$w\u0004\u0017dwD\u0017ԞInr0⡘S5\u0015VTOLo\f/,\u001f,o͜>e>\u0015+\u0007WW\u001eY_\u001b_?XbiqiQi X\u0004Y.\rZ6jPCW\u0002ڬ\b[\u0019i*qeê\u0018\u0015Q\u000e+V:Jp^\u0019\"ee\u0004MÜ7\u000fw4y\b͉[ݷ&\u0001$mNtۚ%m[ۖd8ؚ%}k;}[Ƕd);R=@ݑ6k>eb%+ɫQwe9˹xQx\r\u001fDE\u0007\u000e\u000b-fLwӳ\"jN|E)}g\u0007.\u000e\u00168gQ=\u0015-GǏ$\u001f>߼\u0015V7HOgҦǒ\u0017H~H_\u0000\u001e@\u0005_/H<}%}R3UYKҽn\fY_\u00130{]uA\u0003&%:+1rs\u0017'?IMo>~!}\u0013({B'cXeMG>z&}XDXZ,(o ?uF~qC\r[7s\u0012#ug\u0014\u001e\bO\f\u0003Yg|V\u0012(Iv9\u001f\fxT\u0012:QU\\syT}Ft\u00072|ey?sfϭ\n\u0015F\u0001ԃ:w}Mހ\u0007>+}{.Y\u000bptˏ)'R\u001c'9\u001c\u001ba$phӁ(\bpþpP\u0010]\u001d탵m[\u00035[\u0003ըj6*\rPn\u001c܀X_|mU\u0014+:\u000b8\u000bF;\tƺ\bǺF;\u000bk#\u0007+xܘ-Dk\u0019;_-D\u0019;f\u000b\u001ab\u0000\u000b?}Yl\u001f>\fsq0o&\u000f\u000baRd\u001f:9R\t\u0016b>\f7\u0003S\u0000}LZ\u001f\u0016՗c\u0018\u000b#a\u0001\u001fyc\u0000:\u000f\u001cC.]\fk\u001ck<k<\u000bқfE\u000e\u0001z;}\u001f7};\u0005~AڇAfU\u0000\u000e~`Y\bfHf7\bVhv\u0018N\u0018v(D4;x\tj\u0014G\u0014\"k\u0011ó\u0000\t\\R<4G\u001e. \u000f\u0013H#$\u0011edr\"b5VŪ\u001c\u0018㼙ĀgOHߐ\\\"Z9UqFU\u001ezhd䱩\u0007fo/\u000b>9!Ńe\u0006\u001b'ѧϲ?[oI߼_堾{+I\u0007٧f9{wK?(޾y+CU\u0017ٜ\u001e+\u0007\b9=9S\u000bJՄra^\u0005K\u001e3A~SA{WW(T|(?~P뀶`\f\u0004\u0017?߽S|hhT4<77߻sZК)fʨ\"R\u0012oĳ(!Rr\\\u0017i\u001a\"oܱ2x\u0015\u0010r\u0005\u0017\u0006͏c*\u0011\u000f\u0003\u0002\u000e{+'7Xq*x<Bw,Bw<\u0012?\u0016!\u0002r$\\{`z_jgr`\u0001YN\u0019i\u000e)v)v񶬉q֌֌q6VVQZ\u0013\u001dPcj\fX\u0001\u0002\u0018J44K\u0003HC.Ԑ\rr=LGWTb\u001dHK)R5\u0001h]zҾ¾ڛٵ\u000f\u000fJ \u001e7f\u000b\u001asW\u000bzsBƬp&uq!CɝP\u0005c{\u001bɣ)6\f#\u0013sd\u001d\nYR\r\u0003i$[\u0006نNgѝy^b\u0013iC\u0016&%\u0006IVT\u0012\u0018؂J#HN\u00189 w\u0019\u00051\u00061\u000eatX/\u0000\u0007\u0006Ņ911\u00176Ʀrl\u000b\u001bU\u0016ݞA\u0003?-\u001c9\f'6݉pa+\f5fǤd\u0018]\u0003\u0002\u0003\u0006\u0001\u0001`m\u001b×,p\"e\u0011ı\bpHC\u0001\\R\b\u001c#H\u0000!9J@\u00128!@CSc\u0005jPCqɲQn`bdXkXV9\u0001Gş[X<ڂ;rﭫiQ17\u0017e\\M%a['\\UWV}pK^Χ?two\u001d[zKkY{c\u000b돮/n}~y[^G޽7{}U?κ3*diz\u001dCOMN\u0000{{U%%W^Qp{ue\u0015{+\u00189q|0NI+FɈSԌ\u00045=A\u001c\u0003^\u0018p\u0014\u0004\u0005 ˱89Ve2n\u0016\u000fbäp\t(š\u000bH\u0010>\"OJΕ%25-G\u001a\u0006pۆ\u0011\rN\rVF+]Jwפn^\u000f\u001c\u0012wZzܻ\t!|\u0003wɏh\f3<`y2x\"ڀs,\n\u001a0݁0ޡ\u001d́ŽE\u0013\u001cX\u0013\u001dXXclXclY6Zkf\u0015ڒYi\u0003*2#V\u0014\u0003t4\"=@G+\u0004\u0003TT,\u0015@OG&$+ȩ\nrd)\u0019*##\u0005L֍\rJ\u0012ǍBƜ!Bޜ!c\u00101+l-XYt%u!ņ\u0019HhM4\t#=\u0018EE\u000e^\u0006\u001aIO#1\u0001i$#Fq]\u001ck\u0016CKP,P%\u0001\u0000*IG!\u0011F*Ʉ<ךF}}珁\u001f\u001au(\u0006K*H#[ҩ\f\u000eh,\u000eaϦʰc1\u0010{6\u0013Tv\u0003ô2VL̊Egtwetcvcu\u000b`u\u000fdu\u000f@??\u001f@?\u000f\u0011&\u0001\u0002٤A\u001c`D\u0010\u00172G\u000e\u0015\b\u0001%WxЋmYjPd\u0003S>+*KacI=n,$G\u001c~hN%L{ueû\u001f_\u0004u\u0015w;-[:\\o>o>\u001dZtiݥ-O.\u0017\u0017;⚇\u0007^_\u0006褄\u001dk\u0002}ڭe97W䝜:Ʋ{\no* ˋ#\u0014X\u001c\u000b6A\"e\b\u0019\u001dV9e$\u0012\u0016\u0006UJbdX\t-FJ\u0001bZ\u0004\u0002\fw\u0016' I<E\u0003VJQ\u0001Q(R3l\fOlOm\r/\u0002Nz\u0016\u0012dy\u0010~;:3:IK)~}u{\u0007\u0017[^\u0018H<;tXÏцQ\u001f\"G#t\u0007B{\rRvLr⌷gcBl0j\u0000VJ5D/1b8ɂ`\fGh@fU$@iSd\fV\rJIU)]p]\u001c9c]\u0007+xܘ-Dk\u0019;_-D\u0019;f\u000b\u001aҢ%H\u0006\u0001Vδrr\u000f9Fa\u0014-F\u000e\u001c\u000e.$%P\u0001uKq\u0012p\u0005\\\u001dFUQIj\nII\u0015\u0003PH:*\\=TW%F\u0019u\u001duEb\u000b?UG%\u0016@Z31#[\u000e\u0010U\u001d\u0010U.\u000e@\u0003\u0016\u0016´0Lk\u0016Ӛô1xl;\u001e˞\u000f*\u0013趉Ed1\u0006\u0003{evgv\u001b6\r`N@\u0014\u0006 @lᶉ\u001f\u0007Jn\u0000ρn\u000b\b\u0006qI`\u001ey(\u001f\u0012\" \u000b(Y*,\u001bm\u0017뙕FmUPr\u0001s3n.-$ܺ\r\u001b\u001a6YWycY7V]Y3J\u001cO\u0002]\u001d<\u0015}͇]Zu~7\u0017|~7'\u001c\u000eo>ӫm_\u0016o|eӣóno87?ȤaC/\u001aysEuwV\u0017\u0007J+0$a2,\fpD\u001e\u0006ӗ¥X\u0014\b)`)-J\u0002\u0002ύ-t[)p[*8!9OYgIy2J\u0006\u0006nFQ?3t|kJѿUJ|ho\f\u001cr?8AyV'\u001b(\u0017\u001f(?\u0018hy9\t`}9rեDs\t3Ɠq\u0006Fhh\u000fVtLvЖ\t\u0018cˬe0k\u0019UVt@\t)\u0001+2\u0000jm\r!:*PT%)\u0005\u0001<7K\u0003M6I\u000e\u0000KI\u0003()J-\r\u000e[k8);\u0007\" \u001e7f\u000b\u001asW\u000bzsBƬ0ZtAt\u0006\u00005+YJ.\"u\u0017[tB\u0018\u0014\t\u0019=\u0019T(1J\u0006\u000bJ\u0006J\u000b\u0012V(h\u0014#F1a\u0014/@;\u0003ѻ#{\u0006\u001a\u0019X-E>c:@ieڣ\u0001, mm@局p\u00196<\u0013(ຉ\u0000\u0017\u0011߅us,\fO.#k1=\u0003Ff w\u000fb\u0018g@)-\u0010^\u001f&\u0005\u0000\u0005J\u0018.!<\u0002ඔP\u0001%C\t\f-mr\u0003Ғ]\u0005aUAe!{tB܃\u000f6ohVٴq{M{\u001drdl̙)ח?>:\u001b5n\u0017mol~Z7wCǺo?oqZ\u001f\u0015`mO.mՍ\u001d~{Sչ\u0005\u0019'\f\\3|C\u0015\u0018=k\n%T2p9\u000308BmA\rAB;ܶ]xC\u0011p,BŶp%(ɕ\u00007V\u0002G\u0000\u001d&EhE4{\u0014{4[V`n\u000b\u001aUB5ИW\u0007vyQhܯEcMH}fklXjY/Yi/{{\u0003d*/&Z^Ib\u0003\fj20\\#&\u0018OYPoõ\u001b\u0006f';':0\u0001c\u0018c`h;Җ^eMʌR\u0013\u0018`\u0015#E`zi@l\u001c-\u0015&!\u0005bY-mmd\u001bʷ֔.V.oH`=\u0014l!Zc\u0010j!Zo\u00101[֘\u0015@lHo\u0016\r$\b\np;;:\u0003ҡۂS\u001e::MġX\u0018p[\u001a\u001e\u001aEM\u0003\rF\u0005Z4\u00181Po{ӻbp@\u0011~\u0015-Fbbq\u0019PfY\u0000\u0007>ˑv\u0014\u0005`qు\u00022%Aq\u0002?D&\u0011Kn\u0012`<k\u000e\u0017\u001e- \nHQ|R8\"k1\u0003-\f\f\u0017+\u001b\u0000vq\u0005b\u001b%\u00076O\u001e6K\u0005,W\u0005C\"=܈-\u0012%\nn\u0012\u0003,1@-5\fRD\u0019S3o){xd\u001b;5͏/n}|\u0001Vqm߶ZGy|Xm\u000e||v#\u001b\u001f_\u0007.m<?,\u0007n\f;6L\u0000n\u001b\b/z\u001b#z\u001b*/\"]mqk\u0018mF\u0011\u0002bdj\u0000\u0016GL\u0004V\u000bܖ-OF)`e\u001a,GijF\"u7)\u0005o<xzV&%W_\u0017vF\u001b}[ݠ[Wz''''=\u0014<\u0017gfs=Z4+67R\u000f37\u0001=\u0012_#ĞȚ\u001c$\u0003ʁؚ\u0012\b\u0004w[c{nk$-5WKR\u0002\u0000\u001a8\t\u00196]IIW\u0000%)\u0000k\nk\u0001@l-p\u0004@<n\u00165\fѝ\u0016\f\u001dhYab\u0000s[Xq@V\r;h\u0017Q~}\u0018UO0*Y\r2\\\u001dr[\u0003lMhN/m \u001f\u001b@%i\u0014\u0003Ffҁs\u0019\u000e:9\u0002\bxib\u0018\u000eB(;\u0005b(9.\u0012L\u000e\u0011J\u00046<v\u0014\u001c' \u0001\u0012aBp\u0011\u0015xn$\u0014ƅE\u0005I\u0016W\u000e\u00039aId\u0010y \u001ey\b\u0012!mP\u00015\u001b_%\u0017h\u0019(ũ\u0000-X.z\u0016\u001dPu\u000fF6ꊒƃ^^[O\u0003W7Zwno>o>zv7-;~pÓK\u001f\\\u0014w.\u001f\u001e_zsè3Z\u001de\u0011gƆmؗ_[ކvO\u0011>vۈ/hq2qbඔab\t\"J\u0004\"ӽ@I-Sc\u0015\u001a,ShypN2Va<O57\u0007l\u001b'_~7=7<54xyG%ݏN1tt?@\u0006\u0016`lFU ដ7\u001d/\u0016vLwQ*Kz\t+M\u00128'VbCo\u000bڢ[\fw\\\u0014$\u0014@\u0016NEF\u0019jr\"+Plp-\u0000\u00176EXYt?_\tl!Zc\u0010j!Zo\u00101[֘\u0015Hid\u0003vLoiEӼWG>[2]ڮAKhd#ܙ\n.S!Bet3b\u0014#F61h\u0006\u001aŎp2\u001ca\\v\u0012]\u0005l7X0\u001c\u0005\\`\u0012D,\u00159I\u0012X,\u0016:w\u000bĖ*\u0015\u0013qbj؎\u0010\u0013|RĴd)-IL\u0003\u001b% GpBe[\fᐆpC\u00016R\u0000C\u0017|J\u0003SӋtr#/\u0016\u0019nYgZ&\"h޲\u0017\u001e8¢\u0007{ty\u001f_~\u000f\\\tt\u000f\u000f\u000fyMy;OK;k\u001b5~t}әw\u000fϽx\u000b5y\u001b{/،#wN\u001f\u0003\"c\u0003@T[sk#85\u001c\u0012^ATXs*j\u0003C7Kl=3EÌU6}mdB\u0005n+nn%mn\u001bα(bZL\u000bC,E{\u0015jEj\u0011^\u000f\u001c%vy?upث\u0001ϝmu\u001bC\u001f\f>/\u0005mC\u000e*p0̕M0^M0t9Z\u0014\t˼\u0005s\\\u001cqv6Z+F\u0015\n[JM(5\n\rb=\f\u0019n!Ȉ\u001cL\u0015%Kjiۢ}d(1\t-Ml-ɝ-\t \u001e7f\u000b\u001asW\u000bzsBƬ0[mYp/tFo|__\u0019/~11=U\u0018ME\u0006bOfI\u001aRl-nesZ\u0017>E\u0000q\u0016\u0000eٰa\u000b\\\u0011\tj,Ll$\u00020҆p{r{D,y\u0018>)\u000fv<LD\u001e!&')\u0012Z\u0014Ka\u00192,Keʰ$s/%OA\r\u00012&\rC\\J(\u001f\u0012§ \r\u0015@\r\u0017PE8)5Gk\u0018%zV]a\t/\fH\u00042\u000bjB\u0005V\u000b\u001dS\u000f\u0007\u0007Ɲs{'g7roM>og6a_vw-:\u001ezs-\u0007>؛ԝxSwMݏ@l_9#K/=45u{m\u000f疃w#\u0003?\u0006PZ6#Co8\n&N\r(7˾\u0014\u0001~2=|\u000b'jy|\b@K/H\u0003\u0012-\u0004V\u0006b\n,[-*T1r4\u0001)KcW_7qg\u0012SP؉\u0001Pi\u000f\u0004\u0000d`_\u0006\u0007}=\u0001R4]YO\u00139Tu:xe^9mY\u0013Xlc#\u0019#?Po+,iej\rj\u0016RB\u001dPKS5\\\r-G\u00036[6\u0003\u0019mz\u000epTa2[9\n\u000fm-l\u001f\u0004qc\u00101g|\u00107g-Dk̊`7\u000eG>A-QaW$dK\u0001w흇\u0018G;G?\u0010!5\u0015%fͤ\u0001cӡrز\\B,{\u001eӆM{#s|\re\f搇z\ftb\u001e\u0011\u0011\u0005E\u0005@l)IBJ\n6M\u0001\u0005J-(9rz.*9%JiD\u0018\u0001\u0005f'\u0002xp>\u0015\"\n(a\u0002\u0002J\u0016)Fijz\u0016&mMʿՖB=\u0014b\u0003p$\u0017\u001cjHvL㱕?]?˽=`Gyŵϯw\u001eg<>/zqe~yC/o\u001cx~e3[xzi՞Ig;\u0001Y-Z\u000b\u0017&&$k6DnkBnkũ0n\u0016Z\u0017n۾\u0018Mf\u0002մ-\u0010|\rtB\b\\l4X\u001aRr[%X:\u0010nb\bz\nz\u0001\u000e\u001b %*\u0014\u0016\u000fl\u0004@9B\u0006/\u0007I\u0007\u0005@\u0006HKw\u0002l\u0015\u001f\rӜ/ɟ̞Ծv4\u001a+z%Va\u0000\u0003H\nw\u0002\u001d@\u000bV6\u001bBWתr[ pZ2\u0005Z-nS\u0014%%MM߆KI,\tm\u0012ǍBƜ!Bޜ!c\u00101+l~_\u0001/,\rPCu4M\u0014U;p\u0019*X;X\u0007l\u0017| _<wCrs\u0000bk@n\u000bF[H9YN6\u0005c[\u000eݚCcl8\fk.ÒM\u0011@\u0016\u0010ɳ\bt\u000f\bY\b\u00019YDI\u0011QS%@lj\\\u0005=\u001f\u0017(\u0010J\bx1n6B\u0004WF|V@\u0016P\u0001\u0011h\f*\u0010(!-ZH\u0011ʍ0mvP\u0016\u0003Q6\u0013\u0013,.g\u001eҧv?Ԗ{Gػ7>n)\u0017͜uJѥ-\u001fb]<\u0005/amɍͧ77Ȫ+[g\u001d_c\\Sa@'ۚ&H\u0013YTKHiۚ8UhB2\u0012[\u001c賦v5mITgXt\u001c\r\u001d\u0016\u0005%W-\u0006\u0016P*pR\r&fn\u000b\u001an{n˭,i\u000e\u0014k\u001a\u000f\u000fQ\u001e\u0018L\u0016f0\u0015z\f^\u001f$7H\u001f-b+\u0001nc @ex`š\u0010͒nY\u000eHom#mV\u0018[m\rXh0i-r[r\u0016\u0012\fU\u001b(48fhYZZ\u001e+6s\t.\u001a[V5ҖI$l!Zc\u0010j!Zo\u00101[֘\u0015\u000b\u0006IiDY\u000bGv\u0003ύtQcޚAaXt{y\u0014˙v]޲8t\rcjT4\u0013\"\u0005y\bI\t\"r\u0012/ Gs-b\u0016|0յbZ\u001a\u0012l)-W\u0001-RQ\u0002PK^\u0017\u0018z\u001cːJ\u0002{F\t)\u0010HfE\u0018!\u0006\u0006BZV\bwbstMPo+۶Jn\u0010\u0013r[؂A1=\u0007@*w92=ʱW}q\u0013'WeJڌŵivooț4zU+6>?r~\u000bgZ9~ߌ\u0013󎮞_g\u00011;Bb=\u000bl\u0015[v\u0015\u0004-T]0\u0000^e\u0017زQhˆk䔡Юxh$\u0018a\u0012]efk;\\\r\u0006\u0010\u0018\u0016Gn[i#\u0003m\u0006R3\u000bTeuen%nu%\u0000F8pn*r+tp3F\u0014)vגD\u001b\u000e\f\tDJ\u001bض\u0016w-w\u000el\u001f(يvojiO<7l\u0017TG\u0016*ٞ9Ζ5֖Q\u000b֊QeIDJ\u0001-B\u0014\nk yZt\u000fLzindjgJFz\u0001\u0004+0`9:$mVڲʑZ\u0011nOA<n\u00165\fѝ\u0016\f\u001dhY+0ܾJw6\r\\<ѳ=gma8\u0018|<e\u0003ɵ2\u001cL\rF1M,LϠy(\u00110\b\b`tcvgv\u0015%4\u0019-YB\u0003V(qm!eIir\u001a0B谌R\u0015L(W3*5\n\rJͪҰ@ֲ*5\n\rT\u0004w\u0016(9r,]J\u0012R\fd!5VL1e9\u000b\"\\sB\\\u000b\u0005:f\u0016zkhSZm\u000b\u0011E\u0018q\r*41xcyU5)K+^(nkzQl+\u001f\u001a\u0006eAՠW>je7ҫ\n%DpL.cA%IkFe\u001f&y\t:V\u000e-\u0014-nHfڦUF8{;\u0001D_\u0007j޶^Gn\\(l5=\u0007-(́zb\u0005@o5XQGn+\"\u0005.P3ؖ5556AJ\u0000ͥhPTW׆B{Y]Ohs!޴\u0010\\rkd\u0000\u0003$[K\u0006+v\rV,\u0014wvfMwdMFG܎eeceX3;x\n\u0016\u0014NvMtu`2KL\u0002=-W\u000bIE\u00025\n\"Kz\u000e\u0018`bX2J-\u0019\nt[-u\u000bƞUmǪcUڱ\u0016 .\u0007+xܘ-Dk\u0019;_-D\u0019;f\u000b\u001abOJw0uĸ}\r\u001dr[g䶖,\u00160N1\bE\u0014\u0014\t*\"K\u0002;#5m0{-+\u0018\u0012Z+\nX^dT\u0019U\u001a&\u001aH-\u0016\u001dXzhX95:vUedHi9\u0001\u0003\u0007z\u000e\u001a\u001fQ\u0010V\u0014Q\u0018\u000e7h\u0003cU\u0018d\u0010Oo+'VEHl\u0019_mI{[\u001a+X\b\u0003\u0012яJ\u0005VqOh\u0001U5U\u000fGHo[J5DpV\"8.\u0017xd5>cO͊^U\u0007[,A-Xĭ]l\u0001*Ub[nh\u000e\u0000c emA0u\f\\-#KCǣl\r\u0018 W\u0000\u0017+дm\"fȩY\nZVc婱R2M\u0015nͰz4\u0001\u001f\u0002Rn\u0010d6\u0017\u0017:_\u001cnoND#lNF\u001b\u000bV\b/)Ι̚\u00005Ɂ5ŉ3ӝ?CGt\u0000)\u0017y\u0016z{\t%\u0000;S0݃7͍7՝7V0ˬ\u00185_#\u001dX\u0011Iac#5vl\u0015vLKR\u0017\u0013:_%\u0010\u001bh9Ct竅h9Ctl!ZcVb!z WN)\rEumL-Jlx,-\u0016#FsN<\u0012Z,\u00038=2dXQe\u00152P)\u0015JF1\u0012W-1zX\u0003k5\u001e\u0003\rh`O4\u00028\u0013M\tF\u0018='_\u0018\u0013\u0011cS'N)\u001e3i[v{AHO\u0014mA\\}_)x*P9\u001dV[>-H(ꘜc@bpmҋ*->t[E3⡾&pQ+)ķkR%TxL,8 o\u0017+Dev\u001bҊڭ\bl1B\u001d\u0013Pբ'*ЯfA-~PY{mFemm35,4Ȇ`\u001a,[\rQ\u0006KR\u0015t\u00055S\u000e\u0002-+SF+qo(un[\u0011aJ\u0000I.\u000e\\W 0؅K\\o8th(pj,t+pltO|l7\u0007w\u000b{;ohYo~\u001dm\u0001\nM~uUH\u0016H\u0016{\u0017x\u000by\t\u0001%Ӌ?`\u0007\u001f0݃?Ճ?ޅ\u000bܶ\u0004f0-1K\u0018eVt\u0012m\u001eRǻF\u0001m-ӄ֖J \u001e7f\u000b\u001asW\u000bzsBƬ\u0017\u0016ge\u0006\u0018p::Վ˴aэ\fZ\fr8E,\u0013÷g-\u001a8E\u0004\u0017@\u000bX\f\u001cೕJzQaӱ!z\u0004a!Ɉ)F40r\u001aL\u0019&tK\u0014Kht\u001aaK\ns̞q`yپ}\u0012z&v|q\u001aaYjd#*M/ܖ\u001bn!\u0012[\u0016\u0018zF%\u0013z!X_,:!\\Tnju.3>Z\u0007i\tٯ=xӽQwN.\u0001Cs\by]\\vTWEj\u0001\u0005m;Bjӟ\u0002xn\u000b\u0016^\u001d;!;Z\u0016\u001eׂ_}5t-=SVe!@,5\u0004-s\u0018me*9Jz$&_r/so(so,uo.xXQcඕ+Q\u0005\\(HuݚP\u000bkC\\{\r΍N\u0005SlIw\u000fo\u0011,/\u0012\u001c\u000b\u001e7X/H\r\u0006;\u0006)nmm\u0018(CtQo\"\u001f\u0002/xtۋ̞Plg\u000bzƖ[3ʭb\u0013=-+v:Dl\u0014B5:,P\t \u001e7f\u000b\u001asW\u000bzsBƬݶ-\u001d\u001di\t\u0016֚3\u0006:\rl\u001c\u000f\u001dY#mՒ\u0001\t\u0002\bƖ\u000e%\n\t|2P\u0014\u0011J˜`LM6ra&$#g3ęaL\u0007Ւ3Ӓ3Ê3ӊ;ˊ;Ӓ;ۚ?ǚ?ۊ?ۚ;ˆ?Ê[cM\u001c2uxyYkˊ\u0016dT\u0004%{{\u0015N-.\u001b&\u0003\u0007DȪ@\u00002\ntBDA;::E۪-Y\u0004\"~E/}_\u000fz\u00136m^\u0002{\u0005\t;\u0001+b#\u001e\u000e\u000fm.[[<l\u0012\u000bW\u000b\u0004Jd\\iϢ\u0007.\u0013Y\u0015\u0006V9t4\t\u0019\u001e\u0017?\f\u0017-GV\u0001(34\f5]l!jZ\u001a[\u001dS((i\n,]h\u0018rj\u0002\"\u0003m{#\\rT\u001a-*\u001c\u0015\u0000m\u001f=\u00045\u0019ˍr\u001c;54\u0015C/\u0015(+Y-Xԓȓw:p$T{h@joj vM~5m{K.\u0016\u0016V\bs۞Y0!/YmQl^\u0006Xҋ-hZ4'\u0019lgI\u0013s9ǍBƜ!Bޜ!c\u00101+uQKx;\u0015\u0005\u0003`8'\rG5^\u0000\r\u0017&\"r\u0012:6SLˑX\n6]BSP'\u0002]\u0011̷\u0013\u0001iv%g\u0015w\u0015\u0007\u001c\u001b0~oßgÛg_`+o+g+k\u0007:<VǮ\u000e\t\u001a\u0015\u001129>zưSGׄ\u0006b\u001aeFp+)j\u0016\u001fС\u0019Fk\u0005.Nלl<\u001c=mŹ+bV\u000f[W5bȔ\u001bk6LY[,~IA3\u0003\u001f\u001b5>娕iɰV.]T\u001b>\u001c6\u0005o\n\u0016Ifmxծ_Z-^\r,|6rA\u0012Hd\u0003\u000b\u0006\u0006+\u0003E\u001645=]k4(\u0018\u0018VFȀҒT\u0005=]\u0001,r{pz4\u0002-sk*\u0007C*<\u001fx<T|\\Q%\u001d\u0005@l=\u001eV\u0000\u00057#u+p{,\u00174\u00149_O\u0015\u0019 +Y-X]WchP!jT;\u0002\u0015[\u0003\u0014Qt\u000bvy?ɲ\u0012\u000b 0\u0003$C)\tĖ\u000f\fwfODW^5Ya,\u000b\fXgĲQvj;v\u0015\u0002\u0011@%OA<n\u00165\fѝ\u0016\f\u001dhY_\u0018Gp\u0015_NQ\u001e\u0006O\u001e'zK\u0019.,:뇔$$ɩbJ\u0018CbK+R+\u0015pmV\u0015*l[\u0016\u001f2GR\u00076y\u0000k|0η-#\u0004K\u0005KK\u000b\u0004\u000b$x\u0003|+\u0002\f*\u000e+-Ni{zN\u0005\u0002U\u001em\u000e\u0013VmbmתwX\u001b\u0006\u0002\u00180/'|Ei)[gRwFɁ9\u0015\u0007V\u001dWsh~͡yVQ}rƱ\u0016\u0017\f2|p\u0000u6֛33\u000b|\u0016\bu[z_\u0002o\n#Fp\u0019:!\u0017\u0016!-@ngۦ!̦\u0001@!jZ\u0005VEKRKqd\r3O\u0000z[_\n7V[\u001b+Ojz>\u0019\u00137\bj=+=\u0014eM%m\u0001˭LCC5\u0003d\u001b\u0007Hy\u0017zr도j\bգVu0X'Hk\u0010r[F_\u0001U$KH\u0016!ŷK8pNO,O\u0018N\u0000^鞂\"\u0013\bs|\u0014xYhH\n\u001d\u0004\u0016F\u0007+xܘ-Dk\u0019;_-D\u0019;f\u000b\u001aS9+9\u0005<+|kV\u001d\u0002]~\u001e.#Dp\u0011\u0000m\u0002M\u0011S$L\t5K\nLɨR1j5qZd\u0003\u001b\fՌJ5sAx`n`\ro\u001do-\u001fb\u0007`\u0019^A\u001c(\\$\u0017,k4\u0013'o@\\߾js\u0014/bm߂\u0018nT\nOE\u0007\u0018V\u0002go7|\u001dqK\u0000&)\r\u001c\u001b;`FZ𢂨5I[g^|`nE-\u001bIVO9v\u001aU/px}s*wL-\u0004bi)D-\u000etM\u001f~`T->\u001dX\fPu|ʶĶ-b?\u001fm/b\u000b[|vEn\u000b6\u000fmqUSTX\u001a\u0002Vpr\u0016/&Hi)*F\u0001fdg\u0000\u0001\u0000z\u000b\u00027\\G՞m5Z[\u0003R\t!E\u0019-u\u0002\u0012\u00029\u000eb\f\u0006Hz\u0017xpO\u0018ۆ\u000ej\u000e\u000fU\u001f\u001c;X\u0005W\u0006*\u0004(p]v!\"۶E`n%\u0014)\u0001\u0012+̊Qd\u0002zK\u001f\u001e\u0019\u001dȅ\u00133Y\u00068!\u001e\u0012ǍBƜ!Bޜ!c\u00101+\u0017YdW-L\u0014+[8Ph\u0012s'{\u001dxU]+V\u0007]\u001ajrm\u0002d6Q\u0004!'*$)bJ\u0006\u0010[)-W\u0015%Jz9R\u001ccO2pfsM&$\u0003k\f!9^(Z*&Yˬ`\u001d```p\u0013dhhh\bl+~>}\u0000Ptt\u001b䶥-wa\u00026/T\u00169H؎O>dQa̚ή8\u0010X@i8qֹMs.l{qۼK_:9M;|\u0005fn\u001cbܜI#\u0002k\"\u0014\u000e=kl_&B\u0017~UJ#~>\u001fb[ն\u001d\u0005m'm!զ\u0002Td *,YEKQ\u0003nhbJ\u001a'\u000e481%#=A[]+<½½\u0011InS\u0019ZQ%Z\u0004\u0014[HCޢKۺu/tn(qm(q/rxaVٺ%m=ybLGtGtGB6X+HcrkblMU>\u000eĶ`&NJB[Ѭ^B0&cEF\u0006Nr\u00029q:A\u001de'و\u0016҃p\bqc\u00101g|\u00107g-Dk̊Ke\u001f~Z\u0005d\u0001@1^x1\u0012/=&#\u001dy!Aq\")R\fOoETib\u0000-CeK1x⏂^\u000eaѰ&93\u00056E\u0019܉\u0006x4\u0013gpddhhhpphhhhhhxh`0w]2vŏ-ѷOKp涥pKɅn;u|܀\u0019C\u0014ǮM6pܪKƞX9Ժg6:q֙Mnsq˻\u0016]۳%Wv-}MNrxј]3֎ZP\u001c?=}8 QKģ\u0015eHlwu.7'\u001dV['e\u0015jh;7\u001fZ4\u0015\u0019\u0000~M*zC[Z\nKBz\u000b\r\u0017\\%-JB\u0012ScX15^BMVB`v!!Ws\u001c66W\u0003m=\u001aK\u0014e\u0014\\ZZO0@+m=+<vRͥPq/q/v+px1vdU_5$#?n><Ts`j_\u0010\\r=\u0010r@\u0001}JۊyBlmab;K4h`\u001b\u001309ٕxg.ێBm\u001a\t \u001e7f\u000b\u001asW\u000bzsBƬ%;Ttd!/|V\u0002]\u0002k\u0007K_\u0017/d|4o)T5'\u0005&T(\f)%Ȱ<\u00182*U\u001a&W#{;ϒZFV^\u001eV S)\u0006L\u0013ghxtdpxxhhhhx\u0013@\u0004v\u0010Ŕt\u0013\u000b;[D)>-жTBqpmW]L>3R\u0016\u0015A1+&Z;̆jOour38Α5w\u0005֡UK/Xpn\u001fWO=x\u0019ek3fD\u0019\u0016P<W 飪`\u0007HH~2S\u001a*ڲ\u000eڭm8}m>OEEncVHR\u0002m#YM\r7YI\u0010S\"Ŕ(1%Z\u0004\n`V VwPQ\u001f\u0014֕46U5ח՗<\u0017ê(mqhm\u0019<\u0016Իyu\u0005u.m^H+YG{\u0018.\u001c\r\u001dn=\u001c\u0002V?X{0m\u0004*6JW.kw[xĭp[`mg\u0012\u0010Lz˛\u0002:م;\u0011m[n\u0019An\u000b7\nXْHmS\u0010\u001bh9Ct竅h9Ctl!ZcVj9Cc\"\u0006~_Tt\u0011pA]\u001f\u001bnGz;G\u0006V\u0002\u0016.Rz^ \u0018j(-{3ěc_h\u0007nF\u000e7^X \\m/\\hÝcɝnβt\u0011ot).\"\u0002lr\u0011o@s\u0016z+\u0002|DA\u0019EztX-r[<[Ku-6ʈ>S,H9q'N=i-sm{zk_߿Ǘ<}/i>F 7/kх-sO\u000ewգ3g\u0015\u000eN82?\u0010͋n[\u001eCl\u0016\u001dVK:\u0015a\u0005m^;9\u0000-#[GOFAm\u001aU%\u0018\u0000n\u001b&(\u0011\"J$p[9=\\H\t`v\u000f`v\u000bdv\u001bĄ{\u0001Ե̵̭Ľԭ\r\u0019[s'\fOEb+C-sk*sTWRW~<\u0007k\u0007\u0016䞊2\u001d\t\u0010n\u001b\u0000v @@Ŧr޶tY_E9(\u0012΄Jxf4wmTw>[$\u0017\u0004.1NюZඎ|\u0004]8.cI\u0013\u0010nA<n\u00165\fѝ\u0016\f\u001dhYdO\u0014\u000bra=v\fCu\u001e$~_\n\u0019.:\u0016-ަKfHiR,[\u0002UK*5k=i~o)Xl-\u0000nN\u001e7v\u0014w\u0014\u00016:699YfXr׹I{)x+{6J6I6H6Hۮv\u0016i0\u0018鹸3jZp\r\f\u0018k\"-FV[b`\u0000stm|\u0011sܖcS\u001e{~A̶)G?aօ_ޱ\u0005g79z\u001d\u000b^\u001f_7o\u00174[G\u001e][\u0007W\\ۻg6aݳ+W4(|@QR|CE󑞃AՆ\u0001m\u0001RE-iWZضŵn\u0007i\f\"ҁBU!\nTXA\u001b.)a\"\nnqJf ݏ͏͟\u0001\rvBgd\\\u001e\u0014:?(\u0004\u0015\"x-\\\\Xֈj[\u0000u}ܐ\u0016}vq@p\u000b\u0004]!8$!D\u0013'\t\u0011\u0002q\u0018qO\u001am\u001aצ[{s%}>}3t~sa\u0003\u000b՝3?}݈\r\u001e{=\u001ap\u0006ݯ\u0014\u000e,du؞\u0004؟HGx\u0003q{Um,6Ewup\u0014p[jh\u0014R/G\u000bJ\u0019\u0003\u0016 1v\u000ev[wm\u0013eSe.Ɇ.\u000e]з\u001bB\u0019Х2tu(\u000b]\u001aJ\u00016\u001a\u0012mM\\Đ\u0011m\f\u0006\u0012,݈M*k ġ\f(3jƾؠF\u0011;2WLoZ|h\n\u0005\"e!4ܶZo\u001cGECeKaC1pn\u0017[ؚܱx\u00025\u0003.;=\u0014\u001b]Mָ\u0018\u001aaxŁQV\u0005Zn[^c/\u0013Cmpb%HBޒ\tj \\'Z;Iή_l\u000ez\u0007رܘ迲&uܚ\u0013f]ٵ\u001c(u\u000e~zsk_%ͭYnע\u001b\u0007ֽw\u0017~~}g?wم\u000fNmh\u00170b\f@_;!I]^Ǽ6*CD'&\r`O\u0004t;1geGxX:AIǞ\u0016(m\u0015\u0011b-B\u0014X\n\u0001PlS̠ۦ\"-p=V\u0014\u0019%a\u000b̸'G\u0015fvi&>\u0000;\u0007hϳ~O'>x\u0012U\u0006>Dȣ&OA}8x\u0007\u001e<nlPt2٭q-jH>b\u001cds4\u00016c\u0002\u0019m%\u001cJ\u000e5_\u001f\bmG)\u000epۃV\u0005\u001c-_1l)\u001a*6x?tV\u001fE\u000bfUW**\u0014x:C9:8:qR'S5p\u001f\u000f\u0012\reKCe\fZS\u0019:.\r dVm$Xi;\t\u001d`\u001bcd:j0CBr'w3܁pj̛М''\u0012ט%\u001fd\u001bL{KV\u000eq1&Lxn\u0007niKS\u001bv\u001dCz=^=>#;\\\u00023\u001bh?Ȫ|Y9(Jd8GZGƠp++ڂڨѢb\\Z;1>`@o\u0005\u0019J6x,.QnRxh\u000f6/o\u001c켾ֶCkf9-\u000fxpn'X?:f#k[>|q_]'6[{i{ۡ\u0013'/+]P~,<ĸ\u001eZSlQܟN@_d\u0002\u0019v,\u0012~MBm\u0007\u0003j%Hipbk\u0005\u0013B\u0004p|ZdSA\n\"M!L4\u0013¤0\t$\\2rs\u0011yfOwz 73\nr~Ϧ?ny4\u0004G\u0000߇M>Ply>hzQJ=\u0001&G@#=hs8P<r8\u0018 6rK\u0004L܆\u0006+\u0006ׄɫ`C|yٜQy^!\u001eAG\be/\u000f.Μo2Q\u0011[\bR\u000e8qw\feJR\f]\r]S\rGoA\u0002},ti\f]A\u000b]z*CWХ\u00145|Vm\u0016[Zi\u0001bf:8\u001c\u001bQHn$Vmh̔\u0015\u001c\u001fNqo\u0003ܾ\u001d(\u0005n;?!`8+8Kid5tۅKd+G8\u001bo\u0018\tGmq7nl'k廽\u0000=^p_m7Z>?~_A_~?mf\u001bL]׸lSl\u001fe\u001eT@X\u001aâ.\u0006W:Nc\u0013.\u0005n[\u0003\u0016p\u0000b\u0019\u0004\u0004;\u001e>wΘ\\z{G6[wq׊\u001b>\u0001>}{>w;G_<\u0007gv\\i߳d\u000fO|O}zmߓs?9}gI;\u0017MX\\\u0010:(c4 ::H+V\u000f\u001e\u0012[F'N(Żk\u001d\u0006[xрC[wx\u001d/EjZBCbo\t6L\u00006\tn.4`\u0007KY!\u0012\u0006 X\b03L,\u0013n\u0019w\u001d\u001esֺM\\:nkCdi!\u001f7C^4\u0007>lX\u0007@lz\u0000}Punۉt&糇\u001dOs<\u00016hd#pC!f\u001ft[\u0018J䶑`zk!L\u0019X\u0014gprAHP\u0017H\u0010!#+#+-Z&VD@\u000e#=G{zC\f]di\u001b@n(\u000b]\u001a*CWgBա,ti(ſ\u0014\rbkQi\u0005؄ج7,a\u0019\u000e؈z1\u000e\u001a\u0015%<mgy\u0019oSm\u0011We̛`0FVpۡFÌ:tA5f\nv\u0007p[/|\u001c-\u0014[/^\u001fs }~\u0007,\u000f7\u0001ϴE3~%R\rIV)\u000ea\t%JLs\u00047m8HfxGnypAٵwn{}ߚ[Nml=~/}s\u000fO/\u0005?:o\u001e{u۶kxyO~y뫽ONogَIlnLY=&zaN`Knڅ\u0012Nm/QXlfa')RZ)Z'\u0016:,Z!cI\u001a\u0001\u0006RlUm'ZXh%V\u000b֒p[pJ\u0000\u0017i\u0016\u0010)+H\u001c-a\u0004\u0019`U\u001aSM&4f%|o}b۸n+\\j8W,\u001cV:DaМYKFf|:#7mQo\u0016D\u001alq\u000f\u001bz~X~.{xәm8\u001cI?lw8H\u0014{`gҝΦ;Is:bjNS%Y,Ne&0*ekL\fe\u0006vn\u001evnv\u001eޞBCc:nĝ6-\u001a,j\u0015ՊPW\u0001o\u0018\u0017NEv\u0004\tI3=:\u000bt7 P\u00164TΠ.=CYP\n͠j\u0010\u000e\u0010[Vf9\u0004ؓq\u001a\\\u001c#=\u0017\u0018MdE4'Rmazk6j\r\u00197z{ sHk\u0011Hoeh#N\toPL;%Ce+vlt3fC\u000ev\u0007ZnOy\bm}\u0015|\u000f\u0000nk~\u001c/]=clE6R+a5\\U#=\u001a\tZr\u0014epN\\dJSl$SW\u0014<6~̼m\u0017;oXxw;\u0007:lj\u001aT\u0018Z\u0016U\f<qѧ\u000fڏ.C?૏O}ݻ\u0017Oxz;얏.²挍\rJ\u0017dlW Fbu\\\u00163\u000eZ-p[\u0001|\bZ)qHo#`fn\u0006\rF\u0002ZKa\u0005t|D.D\b\u0010%\t%\u0003%@1c\u0014@\u0000\u0017d\u0013n)7\u0004e7\u0017,\u001cӣe\rnMu+F,wj\u001d^hh\u001c\u0019N-v5c7/KVNH\f\u000f*7!ѯg\u0007\u0011prK\u0005W\n\u0017Z|9oĥ\u00113J[XLb\u001e˙?h2w\u0014I9\u0013ǲ԰Ǖj\nX%9\u001eklOh\u001e\u000e^C=C\"G'nKfm\u001a\u001dcSid\u0011S\bmCсø^yF޹2\u0011\u0002?\u001f$з\u001bB\u0019Х2tu(\u000b]\u001aJѩDVl@\u0010bV[\u0016%`RCiO\u0012ؑ\u0017\u000fbUf%[ˍdo:UZ`5Q6\u001dh@F\n+\u0012g㶡\u0015#ۇ\u001bw4톹-r[O\u0016(B8o\t8okq|yOe\bvBJU0$\u0016ܶ\f (D\r\nendstream\rendobj\r27 0 obj\r<</Length 65536>>stream\r\n[\u0005V\\Ez1f5\u000eyi51Sҏ+<jה;;ݻ6g֐\u0011\fmpvCCZ\\[˛[szvg>s\u0007{\u00167Zϋ3\u001f̿~c\u000e뙒><\u00125\u000b[=WhDǍc'q8u\u001b v:-\fj0Ecp\\)Um\u000b-\u0016h\u0015ypw-P\u0004$)\nq\u0011\u000fX'b\u0018>B\u0004cn\u0012\u0002J1\u000fm\\0.ϊK>\u0007\u0016wvDc\u0017X2z}l5yEs%+*りTY1YQJeIA1>\u00195w\u000f\u0013sXިhamM官m]56|d\\Y\f\u0013Ə\u0011%3#\u0011>Cx9z{:{\u000e\r\u001c\u0011\u001e\u0013\u001bUؓܒYj6RۈjEh\"lti@oo\b>\u0013톲Х2tu\u0006-t\f]\u001dBR`bMF\u0004j(\u0002)-z\n*\u001dXOeh\u0000\u001e 7\\c\u0019\u000e@7\u0010<Jv JE\u0002q@o\t&&{\u000e7v\u0017#M]M7ns'섛m\u0015\u0000`}\u0014{|YY\u0001=\u0007%b`\u001b\u0016Q\u0000%\u0016\u000fG+:GB\u001e\u000bݶN^\u001085ei樂#sr-)Qw{㤏vϹoH{\u001e<]\u001f!O\u0013\f_Sͪ)틏~>\u0000\\ٝ^\\77\u000f[wg\u001eYq׬]/>VzdNީ\u0019'^\u001d0,Q۱\u0004\u001eK\u001d\f\\'\u0006')Qۏ\tIkJas-Y5@l+$0\u0010[\n\u001ff[\u0000fPlަKGKY~b\b\u0011e\u0006n\u001b/&\t2$c\u001emVu?*ȹg\u001aVʩ;zuv\u00117+ginAGvԴI\t╍iMYu\u0015Q\u0001YQ2\u0013#R\u000byj\u000e9zD{qڦA];۰~Gyys95E\ffZ\u0014kpPϐ\u0010ϰ\u0000pO0\u001fwef`\u0011cg&;32aE4zHؙl\u001e6F\u001e\\&\u001f]n2dTo\bm6\reKCe\fZS\u0019:.\r𧸶[SlUV8ݮ8\u0001\u001644 t\u0006^5!$@M\fݖ\bp,]+z{ s\u0000K-z\u001bc̍5橌q\u000ew\rf]M6m{(vzAvy\u00165\u0007d\u0017`yp!x~KXi\u000bZµ\u0010\u0015J[mIkȣ]kuı8Pu\u001dж\u0002-^wV\u00176XKҫtޖʄ\u0013gOr\u0010:*{F\u0012`Ί\n}y }/م/\u001dwh\\h߂=3>2Vg\u0003x\u000fZPtdV־)\u001bk{-\u001bus%Zh3l?M\u0000'\"z\u000b\u0016-\u0016[u\\ﶶ\u0012\u0016\u0006js,Y\u0016\u0000QB\b6tds(\t\u0007#bx\ntdX\u00197\u0004Hn)?ل`̋\u0001\t2vm^YIF|rmEFv[NުeecV\u0016\u0016/k\u0019\rPg&f\u001e\t>\u0013;|N̛]6f!oR]k\u000et;u.\u0014$*b\u000b\u0003R|FF8z\u000f\u000f\u001e1:W\u0019\u001f\u0017\u001e\u0019\u001f\u0010\u0013\u0011Y1!#h)co\u001ess*&6uL\u0006FEL<F\u001eZk\u0012Vi\u001c\\l<ʉ;vۿ\u000bvCYP\u0019:\u0016T\u000eeKC)4ݖ\u0014[b-NlAܡ@b3\u00046g\t=\u0005\u001dPo3C\u000e\u0006v&\u000efj\u0016m\u0013:\u0018q\u0004S^)CKu\t|^?~?~\u0015^X\u0016G\u0004\noj+H\u0003\\@\u0003q\u000fV؊+\u0016<2ϵ\u0016]kYkÞ)OL{~`zuy<{Y\bxGX{i8J\u001fӇ_{~/onWw\u000fܳ|McމUOyoilx{5՗[T|%uQ]\u0015uݵjE\u001dDV[O*-j?b#j,ga\u0003\u0019c#)\u0011\rXm\u0005\u001c\u000ba\u0005Ir\";mEJ\u0013-fx\u0019|]\u000fnqb\r9*C\u00001*\u0001\u0006\b}U892Ґ\u0015g3$\u0000\"\u001coIM-\u0018S9~Øem\u000bR榦T}.^r!\u00173;2dQ3wU\u000bwC+j5=\n7\u000bWsNNILLP\u0014z)}F\u0007$DfFG\u0015\u0004\u0005\u0015EDVGD\u001e+99F#&ʪ&M<˔ي6󴙊&z\b'\u000eÉC\u0006},ti\f]A\u000b]z*CWХ\u0014:Ub\"vʂj3\u001a{6l\u0000\u0000HE2\\(?$hwCo5v8\u0018hEy\u0007r[ug2[n1'ƈ4řfmm\n^ފ\u001d\u001en].&k]\u0001k\\}\u001d;\u0018Z\b\t\u0011H.P1 í ݶڎ[o_J\u0017ڊǠܶfaGUff]\\Rz^XO4??E̗}ӟi2.,>6?`/ڪ\u001fox[뿿_ت}j{U|kC^\u001d=͟lpڪʋK-,\u0002zwbR\b\u0015MU\r(Ԋ\f?3N\u000bW=\u001e,ZYؖp[\"Uc+)؈FX-C\u0016f6\u0013@d\u000bi\u0001G\u0004\u0013[ \u0002(C6\u0010[!\u0007(-p(}v\u0001'\u0000\u001a\\p#1\u0011N\u0001+\u001a2\u0002b10$\u0018\u0001iCG崥,]d'\u001eo\u0003gbj]վ}%s\u00145̕s]m\u001d]]s\u0007vvI&'7&6%5%'*Nf\u0004gU%'5DEEf1鞮9Z;ٝjd/\u000b.\u000b\u0017\u00140VZd.Hw8B\u0017yMз\u001bB\u0019Х2tu(\u000b]\u001aJѥ\u0006tlRYo&ت\bݥ2W\u0001Vk9G\\hHnڝ K\u0001d8\u0000=x(ӑ<z6t0\u001e*\u001d\u0018r\u001a\u0001ݖ\u000b\u0016XU`\u000e\u001fNWu\u001e˂<l\rro\u001d>/c[\u0018ad昣!`-\u0003bk\u0016\rc\fW\n`\rč@\u000f؈\u0017\"\u0003T\u000f5?!nxUOcbw\u001flt\u0017g|ߴG;.(ҠuKu\\T\u0015lyyx\u0016\u001fN,84Є\u0011`X36ܪknnzw#s>=2U߬=\u000f5p\u000bO^\\Q\u0018!ԆYj5TZ)Xh-p?m9JlVv\u001dͰ\u0010\u0002Cb\u000b$\u000b%fx \u0016dO1#B\u0013eԇn\u001ba\u0004b\u000b\u0016}\b\f\u0017<\u001eiЇD\u0001qcd(ؕqc>$\u0013^)/MO7\u0013;{}>8Jh4k97i]>\u0011u|,żk=N\u001f۶N//o\\zyI\rKC*#k2'gL[ؓ8Z8SsJgJgC,cM4kE(gY\u0018ߙ\u0018u8bkv(>\u0003oP\u00164TΠ.=CYP.M7[BEj\nZ\u0000%;˰9|A\u0018.\u0003\u0017\r\"[\u0000\\m\u0001bmj%\n\u001dQs\u0002m\r9QF\bC\u000e\\p\u0011cSbMxЙ\u0014#13M6--5nj\\dCLxeXPQE\u0001e!YvC-Xˬ%\u0018,m\u001b.٥,X\u000fAJ줫3|;Ҳқ\u001dU:\u001b>o櫃rk}\b[gw/ᵢq\t\u0019іo..}ueNMI^S=\n\u001fܟp`N\rvOy7-/f<E\u001b.\u001fsCͩe\u001fkk3\u0010[dHik\tV0N\u0018K\u0011\tY-8...\u0011\u0017X\u0016%Y\u0002\u0019Pl̠ҪIPEPfU&X\u0013~1\u0017#aAm#c\u0003F\u0002\fXJry(7kBoIT3n퓪!瓴\u0003>\u0013}=KF\rඹZc/D`gurwaJNz'uX,Jɞ[h̒\u0019ӔqMIʄ\u0019ɩ\u000b&Z\u001bߓږӛ6dwڐ.c!?Y^mG\u0019@i\u0001vp}\u001f\u0004vCYP\u0019:\u0016T\u000eeKC)ԡF\u001c\"݊C[%\u0016*^9!m\u000eku~ Ҭ\u0019)t\u0006fg2ۃ໫;nہvLnCՆ\u001brQt\u000b\t2\u0002I0\u0015$\u0005#{g6\u001f[okgWFKJ\u001eaBLb(2\\2-~ZQK.r[=1\tYc$2\fs؈`Im\u0019Lo.&ۊngǛ\u001b4??\u0019lprA^\u0019W\u0006p%C\u0002s\r{s|%\u001e,+[CqS#G\u0017\u001egʋ\u00033^x\u0014\u001fvQ}u\u0005p\u000b+:ҎXfQV=ۓ\u001aS\u0018\u001aQ\u0012\"Vm\u0012kq\u001eZ\u001c\u0000sH&*2+f*\u001f\u001f\u00043Q\t_#\u0002L aj\rX\u0011l4(epWu\u001c\"\u001e\u0016\u001b\u000b/ޚ\u00132x\u0019\u0013\\\u001br`\bkY\u0017㵀׾}5Mtuwv7ln\\5Űkt\nn38d\u0016-+^\u0010\u001c0%6~rLI\u0016۴5[ƲT\u000bX\u001b9!CvR{`e\u0000uB-Z;Ro7 P\u00164TΠ.=CYPwv\u0013\u0012D\u0003);HQQ*p+\f\u00036\r`Ay\fadr8uG\u001et\u0002\u001cp\u001boj\u001cw\u000bh\u001dmo\u0013v۶9ᆜP\u0003N\u0018H#n\u0011WiBm)?E.Ȳ1g\u000b*&feTũ\nC2\u0003,\f64\\6bp4$E93\nm5>Q\b6\u00181Nr/\u0015\u0002nѦ\u000fw4=m~ku{$\u0005|o\u001b2\ff<[Gi\u0014ӽS꥾)5,5O\u001fG\u001b\u001c택\u001eLyc-:\u001bnb%\u0016U^ܲFT5$HfaD[MdDh$\u0015db[Nd\u0015\u0004c-.\u0012\u0016Z-\"C\u00016\\jN4$Ǒ\r\u0001z,\u000f\u0011\u0003\u0005m1\u000fa$Q.5取GAÅ;\n\u0011n\u0016m2\u0013Ô\\\u0015ݿ\u0002FX#`ܝ]yfِeCn\u0015k\u0003ei]MҺu-UR֩0\u0006\u001f[<QL꣔bRX^\u0019u96lLa[fY&J\u0016O6ieйa\u0011oZ5sKqgOaM(cm\u001dئ>c\u0017l`rgs8mt\u001cceoς?\u001f$з\u001bB\u0019Х2tu(\u000b]\u001aJ\u0016l\u0013َ'\u0001Y\u000eOg\u0003ݣRU)ΐI>@ޞLo3l\u0006Ε\"V\u001d\u001e\u0006n!ƚLFV9Tj_mҶ\u00038\r6\u0013z\u001bečA:WIfT9?]!X4drVZCb\\itD^X0pd E!H3\u0017C`\b3\\R\u000b1\u0017\u0002\u0005X\u000f02sQLaɅ\u0017b\u0000v\u0012+XrmjսZxcuս6~Ɔ\u000f\u00160g\u001fkD'x_$ё[#S\u000fwOo\u0006E:\u0002\u0011K}ug\u001fj<[]\r\u001fnnhs\u001b\u001bt]o\\keg7\b\u0001\u0018zG-NRl,,q}a\\\u000b|\nR(\u0014ݵjئ\u0013ʅ\rɉ\u0016R\u001eBPl\u0001J\u0004\npymŉ\u0010C5pL_1\u0013-J\u000bwUvUFД㍹\u0013/\u0017w~ݪ!˵o\u0017iӺu#[z֕\u0004ZGk}hdtē'y*\u0005߰~q\u0011\u000b>8+smZ\"ؼLxcC+l\tu\t>pÉ)51U<\u0017\bp#r[{v\u0000\u0016\u0004vCYP\u0019:\u0016T\u000eeKC)4C9@l\u0002%L\u001dr[>\u001cZl\u00003['P)ԙxp[e:\u000fLFn\u000bu5zynD(-9X\u0013d\u0019p\u0003؟\f\bFXMf\u0000\u0001J\u0015]\u001c\u0019\u0017\u0016\u0002De9\u0001v4UaNdb\u00006\\,%\u001a[NBH.\f]%b+Q\u0011Z\r\nD_^^~ÍȞ\u0005'&&}򓟿z1޻|:)9\u0002>(QXΛ[_<&輼ˮvZ_s}uu:j.,-;pK᱕3ʬV\u000b7ьk(gێmŨ\u000f\u0019a\u0001\u000f\"D!Rb6\u001dBb\u000eI$'$\u0003\u0005\\-f\u0006賡ےz\u001bC-x\u0004\u001b+<\fW.5\u0013\u0005qL\b\u00151\f\nZic0FOO\u0019܋yC>!h*Ѿ}PN<YZ\u0012Nk=\r\f{2|̲ؓ'y5O\u0007߶bku☕#{\u001d\u00164\u0001]\u0007byfy\u0005SkXJX\rTr6i9\\#>:,n\u000bpDbƎvۿ\u000bvCYP\u0019:\u0016T\u000eeKC)nDbQ@l`L\u0019@l#Wbk\u0001\u0001-lFP\u0001m,#YNm\u000f\"%ڒ\u0002cnGծ.-\u001e'2Rig\u0016h\u000eDn\u001bb\tq#F\u001bP\u000fm)A<`U\u0000\u0018n\u0012[8x*U.H\u0010[ܶ\u0006m\u0011Do\u00180\\q\u001ax\u0006(-2܁4j;zGU\u0015\u0017\u0017MO묎\u0007~?p7O?R:H^\u000fW\u0017\u001e囷_=\u0017hޔxbac\u000fn-9֒oZٵ%Vb$EjӋq\u0013-y\\\u0011\u0016s[BZw\u0011#7\u001f\u0002\u0004lBF>dsm\u001346\\\u00126\u0002\u0005n\u001bm̋+r[2!`d \u000bt8^.T\b\u0002lފ\u0018$\u0010}v17ʘo\u0014:\u0018-\u0007^)~fŐeh\u0003Wu\u0004LSJO\u001c\u001e\u000f\u001b$$_G\u000ewlZ8w|tT_@\u0011.mS\n7\u0014\u001fչDbhn\u0013oR%UƜ\u0011:8;Nhή,FW<{U(\u0003p.r\u001fҹ\u0006},ti\f]A\u000b]z*CWХ\u0014m{۪\u001b\u0007-v\u0003mӠ~\u0017jүɄڝP\u001fwK%g%w\u0012m\u0003%\u0003ic\u001f[ܓے\u0006\u0002YA\u0006`28TJ\u001d\u0011\u0000\u0017\u001b._m\u001a,;s\u0001p\u0014p\u0006W\nzn\u0011zj-!-\u0012\u0015X\n\u000b\u0001V\b$6\"\u001bapgSseЎ}-.\tcxݛ>ӏB̹vMz}p\u0007+g/||^mڪss/(kkj/,/?pԌ\r5SIۚKR=\u0002YR<-\n\r΂>[JD0-\u001chXl,t9l?\u0006\u0000M\u0000m8\u0007m\fn\u00152\r`n\u001brhcbpcNcQ[AH#.lT\u00163}DK\u0019\bCxS\u0014a\rУq\tvL@A\u001c9roi)׺[uXjxɏ\u001d\u001e;>v}h{u\u001b\u000fl,\u0005?\u001c\u0014j0J6>_MndZ33r\u001bY\"q}vZ=yMUs&{t8jnwAn(\u000b]\u001a*CWgBա,ti(\u0005vc9Cչf3\u0003ݶOev߉m\u0000%ےg!Ear\u0014v'9?9\fGm=KYzmY\u0006PC6[\u001c\u0018AR\"ThpM@r\u0013LBHon\nK\u0015Y\u0011@oa#r\u0010q?b\u0016Z-\t\u000b0\u0010ix\u0010L\u0015\u0001İII_Y9I\u001bJ\u0007IwfƥՕO{_d{ӎ))X1A\n^9.Ă+\u00157\u001a{kC\u000bK\u000e靜r9W\u0007[\u0017娠\\[\t`s|*nj%\u00108$\u0018\"<*x\u0002[\u0017C#Yr-DXl\u0014p\u001eu2\u0002\\$\u001fk\u001b\u000b\u0017ne\"\u0018h7tF\u0019F#KE.E\u0019r#\u00155\u0007HX0e!1#dpu\u00117\u0012'?hp\fxI&KZ7Ki.ѺVAZo\b\t_\u00161\u001ezz?\n$$^@u\u0007{w\u0001#P\u0013Xa\bgFXg7\u0016LCV+bz\u0018^bƁ\n\t\u0007t7'0\u0016z\u0016\u0003\u0007*\u001d0?Ho7.\r3hKOeP\u00164{@C@ʹ\rLC5\u0003n{2/B[vۦ'#Y8uV\u001aѭ-y_m\u0005PoG鳂YP\u0019;̈\u001daĎ\f\u0007Igƚ@\u0019n\u0002٫`c)΅\u0019_rqviկ~\u0002%(,Dsr5?#Uz\u000bන\\]umU入egZ?XRzuueD\u0013\u0005w7{g}ӟNwZd\u0017SUn;c=VzdN^ߌu\u0015\u0011]2+\u0015\u000bsT\u0005Vr\r8_&V\u001e}VZjE\u0005B`\u00013\u0017\u000b/e\u0016VL\u0014Nnl!Um\u0019B\u0006\u0010}\u0016 RFHn\u0014pb5DQ17\b峆\u001apFI)?1c9Zʂ@ɸF\b%!D\u0013~)R|+\u0005Z\u0017,\u0000b\u0016\u0003\u001e(Se܋J\u001b.\u0010\u0002i\u0005>\u0007.~R&ps\u001f\u0017{2=E*f\u001985V`)cRg\u000e\u0012g\u0000d:۠o7.\r3hKOeP\u00164\u0002\u0001\u0006Lj=2vے\u0007\u0013[n[n)\u001bbԹ-Yi(?\u001c\u0006cd!DAF\u0010\u0019;Ԉ\u001d\u000eE\u001b@\u0012F\u001bAZoAe˲\u0010g[\u0010z\u0002B~~Ʌ\t/>90\u0014YN0UVdqϕabB<0=s+*Ǆ%9\u001b&\f\u000f\u0018h\u0007g:OO\f1GڈTNz\u0019N\u0000\u00001\u0007\\Pthf\u0005}ͩ{\u0016Oyz my\u0015\u0013k}t@P+AAZTd%j\u0016X\nɊ\u0000k\t̡\u0000,D\u0016,sa\u0012ǅ|\u0016$\u0019\u001ar=L\u0019j\u000eg\u0001 P)=\u0016(G\u0014\u0000\u000f\u0011({5Ex2\u001e\nHh35($1&\u0004Kx8L\u000e3d\u001bIb\u0013J#n)/\u0014\u001e}f.\u0001O\u0004\u0003_?R!Gȼ\u001b\u0014y+Ty#LU\tt݄@\tHP\u0017D\u001d2=Lw\u0011C׌cU\u0018*\u0018so8\u0000\u0007\u000eZ6\u0011oA\u0002},ti\f]A\u000b]z*CWХ\u0014?ǀؒ=ɧ\u0006^b?ٓ\f\u0010&Xl*=I-\u0014[mqR\f 1dqRQU[2\u001ce\u0012>G-x\u000bɀ=\u001a뭌\u001aV9@\"\u001dXrXxT\u0010\u000f\u001f\u0018\u0014\u000f\\рeY\n14\\8\u001bm\u000e\u00193\\bؗ\u0007\u0005^,AJVtJOsS_%HV>z|\u001e\u001bqsuՎƄǱa\u0017\u0015]ZYei2RX^`Ǥ\u0017\u0007fo[ǧ\u001aexOر|\u0016\u0010\u000f7䂼=3\n\u000f̸~萋K./)92-m?-\u0000nv|ٙ6~Hp[5Zr#-T\u0002\u000bP\u0016yPc\u0002Fb\u000b,\u000bQ(Bd*c\u0006\u0012k*\rɉ\u0016RP\u0011`P\u0006Ŭh#n\u001e;\u0018)-\u0019\u0015j\tj\"5Be[.'\u001a2\u0015&Z\u001a\u0002E\u0007\u0006B\u0018r\fs\u0002}N0%&E\u0006\\_Ìz\u0019\u0002]\u000f.XպuGu\u0004:B\u0017Y)Y\u0012p\u0006_H&m=Bu\u00172{S;Y:4>P{+K\u0012[\bO\u001e-l~ߚvۿ\u000bvCYP\u0019:\u0016T\u000eeKC)s7o{4\u001a\u001fnۚ\u001d\"¿iK\u0017n\u0002S&6\u000b綎Q]1ր\r1VcG%mjZrwz˭\u0017\fX\u0000?\u0014\u0006dv!;X\tqF\b\t/Jӄ0\\E\u0017gc\\ \u0004\u0013A\u0002J\\&[9$[\u0001ɱ1n>Eᩯ\u0002@\u0005o˾\u001cS0uvԸ\u0017I1\u0013bd^]^~=72£sεnl2hӸO5=9\u0019ɶ\t&\u001b>\r\rT\u0003\u001d>q\u0003}\f}x܋\r\u000b3ގjGC\u0004OiVl\u0001j9&@2V\u0004L6\u001c\u0003M6\u001b-Y\u0000~A&$\u0014\u0006l\u0010-\u0011&($b\u0016\u000em=\b#h}h)PZ&X\u0003\u0001\u0000)RXPC\u000epg\bClŅ+y.iv&ɶF\"Ԁ+f\u0000\t0\u0016Y0`\u0016oO\u0004\n\"d|\u001f\u0001!>B0\u00052+\u001d)\u0019C@\u000b\u0011\u0004DbAX-M\u0004a1rt\u000fe/N&'3\"uQXlmoP\u00164TΠ.=CYP\n|&䶀*\u001dqV{lvZVY̱30$UϒBn:hT.\u0006\u0003rqRdn;=iCգ=0edQ(\r\rء2n\u0011[#^\u0011O\u000fWs\u0014nT%\\A\u001a:\u0015\u001es#\u0017fE\"\u0001Cr\u0001\u0016Dr\u001e2lx+b\u0002 WWWXuM\u0017yo3>Jz\u0016*5aE\u001a8]*>e\u0015읚yzQ[jn{]\r^먺^uye\u0015\u0015\u0017Y\\rtnޱ\u0015mx\b6&*i|Գg\u0017rR>-ૺonh2Cp>\u0006\u00050n\u000b,dY\u0001r\u0002:!R\"l*Bo*cAYE&B\u000f!\u001d-p\u0019{\u001e3\u0010Y-`\u001e\u001f^҆\u0018\u0010\u0004\u001b&F\u0010\u0018^e.dkL7B/\u0018t\f\u00009\u0005\u001b\u001f)\u0001\u0011oW\bL\u0017\u0002\u0018+j]:.\u00003W\u0007}\b3\\(\u0012\u0005W\tLa\\+\u0005t\u001b\u0001vq9-\fݞx\u0006ml.h(O\u00173\u0007֞C\r\u0017톲Х2tu\u0006-t\f]\u001dBR`H\u0016*˝*]m{5V\u0010gqzKƸ!mOa\"HFU\u001a$ےա\u001arTr_%e\u000en\u0003\u000b\n\b\fڈV\u001d\u0000֐\u001dd\u0006\u0014*\u0001\u001b:]4i*΄\u000f\u0007&˅h5\u0003z\u0001'T`2Jrb\u0005\u000b\u0000V\u0010K?\u0015_U\u0017^Y~p\u0013^ƿ;pcvTj-;-sԲ\\YYqmuՍ\u0017o+9Z۔31ofv¢ӭ%'\u0016\u0014\u001e]pu驪1aO#%F=KR>K}*//\u001e[mSΉ\u0005V;:גA2Y\u0011Za\u0016\u0010,\u0016e\u000b3\u0014BB\u0005\\\u0010*\u0005J\u0013\u00000G>O\u0014涸K9\\\u0012A#\u0015\u001bq\r\u0001@ij$LD\u001e[\u0018}v>\u001b$ b\u001a\u0018r[\u0016l\f~wf:fڛ\u0000\u001d\tiQ,\u0014ģ>s\u0013~\\#bb\u0005\u0000Q\u001d)u\u0002u8u!fxz\u000b--\u0007%a:lpj\u0011\r?Ho7.\r3hKOeP\u00164Bݓۭ\u0010*\u001dmwC5W%\u001fO\u0002j}*\u0002:=2@#U\u001af[2En7nҪ{۾V=*yUv[ԓ*\u0003%kpa#ad SHo[N\u0011\u0004HV1pF\u001aC\u0005N\u0000q2T]ˊ\u0007&#̄\u0004Hҡ\t\u0003\u0002E\u0010\u0001bx\n>HH\u0001w0e䟦5~?\u0015_U\u0016}Q0M^ڧYɯǿHQ]_Ss\u001a\bԌ\u0015.L17;j.왖%+\u0001'\u0017m+\u0005z{l^Ʌ-\u001eG?x\u0000\u0013gq/3\u0013^禠/kK\u0019?ɵ\u000f\u001aK\u001ceD2\u000bV\u0005q\u0001~l\u0010q-PL#M\u0005~\u0014\u0014Sa\u0012\u0002*\tnF\u001b-BͶ@\fq\bn\u001d¬\u0016[\u001f\"XY\u0006/\u0012j\u0003a\u0002\u001a&6ƈ$OZ-mM\u0006\"\u0005x#3\u00161?A.S@e\n\u0018@l\u000e'\u0005-\u001dne\u0003<D,Ԋ\fWw\u0000F\u0015h{Tz$Y{\u001d=׮\u0012K\u0018CI\u00058pulĖ?Ho7.\r3hKOeP\u00164\u001dŹ60U%㓀\u0001ҭC\u001e\"\u0003C\u001a\u0003>@)gUh{\"q\nFmqO:\u001cg\u001e\u0006CD\u000b\u001b魟\u0007-\t\u0012V5\u0016\u000f/\nq\"F Í !\f2#B%\u0001T\u0017\u001bL\u0000`ɦ\u0010dĂue.3qM/r?/0M^\u0002=pws΁s-E\n~B!f{cp3x\u0010\u0001sK.,\u001fszQٵ-Wz6<|\u0014<\u001dm⫝̸d8E4¯\u001bʿP}s3\u001b?nàv`d\u0003 \u00166c\tO1>l\u0006I2J\u00043\u0001č2D\u001aCTf[d\u0002B\u0002&\u001a'R\u0018>\u000e\u0005k r@@cף\u0000)\u000b\u0005o\u0014\u001c[^a\fm\u0000\u0001R@)t[ojqg_ߓ\tE\u0019\u0019^ێ\u00140ܐzXp\u001e2\u000bO ֕t[7!\u0010OrL%SJR\n\u0011\rGmN\reKCe\fZS\u0019:.\rR٨\u0016v[ut{8\u001aOKz\u0003\\\r\\OD7;-p6*-7nEm?]\u001aw[\u0018\u000e2P(j(oas=\n\u0012lpE{9e`C(xQ\u0011ڊkL\u00106\u0012\u0019.\u001cFdJ\u001cۚ\u000e\u0006J$U7ٌP4\u0000Kn\u001a\"\u0003\u0017MGx\u000bϬ?N\u001d}S7\rc.<췅orR4_]]ut^AϬu-*ST\u0005\u001f=Whk\u001d5WWל]Z{IY\n<Un\u0002؍yeWu4V~?~=FL2fL\u0014==\u0002,\tMA>1k\u0002y\u000fpXc\u0001λd\\x\u0013k&B\u0013ᚉBd\u00027\u0001c*`\u000685þzW\t\u000b[-QxY\u0018K\t\u0006bZ_*\u0002\u0010R\fY`؂\u0003lݣ$\u0004\u0013!\b3\u001f*0\u0000\u0017\u0002>t\b\u0018(J!\u0015\u0002 \u0010\u0002C]\u0005\r)\u0015ф:\"m6\reKCe\fZS\u0019:.\rPՌnI\u001dky\u001a\u001e\u0006\u0004\u000e-[kM\u0003>>tq\u0000\u0002U(\u0015{T\u001enN\u000evV\u0016fv\u0003Bv-9z)\u000bM՟JjQܜNrAÓQ2+P\u001f惣\r8A\u001887DSre0\u0019\u000f'W9\u000em3L\"&\u0018W\u000eSXr\u0005r8\u001f\b՘rA\u001f\nv~3~}S5LoK($Ma㝓.\u001cs`vIYraB\b\u0004}\u000b>\u0005(B\u0015\\_іU\u0017\u0017|mճ\f8?uagٟW\u0011ȓ6\u0013~;Ip#0!ь, ȨwZc\u000b\bgϪ/ԣc㍅ldcA\fxd0a\u001am[ʆ&(`\u0000[\f\u001c4F?>?CՀ\u0001\u0005_/aJ\u000b\\`\u00052Ɵ\\lO\u0011K򓰰V.\u0004?ۺ\u0018B\b \u001cؓ<\u001c\u000b!T\u001fbK*-CDt#\u0013\b\u001e\u0002\u0001`_)k[ζlX\u001e<lKqu7 P\u00164TΠ.=CYPT=>\fH#=G-6\\\rJv\u001f\u0016[WEb\u0014ہ51Ht[\"\u0019ۮvfn[h\"h-<hNFh4jmE3\u0006V.nW\u000e5\u001aTx\u0014?\u0016J\u0000Kn\t4\\\nT7\u0005McU\u0004\u001a\u0017)Ăm__[g2gO30ƪo˿)|LO6i+;d܉xb\u0015ā \u001dp\u0001dO5]nڳYY7řpmM˿k~jO\u001a3M5\u0001;l*X\u0003\u000b41\u0013&~\u00043\t$\u001eƐ8c!PZ1\u001f4EV\u001b*Ý<r-lH3ab\u000b\u001cW\u0002@4\u0007\u0003\u001f?l?f\t` ',\u0010z\u0014\njklb\u001dF\u0017l\u000f8\u0000\nf6΄\u0017a&\u0013)\u0015x7_w8Og8\u0007#x#\u001ed\u001a+i\u0000\u0017ĩ(\u0013R\u0013T&(wԇn]\r3-8\u0005z\u0007\t톲Х2tu\u0006-t\f]\u001dBRtl\u0000\u001amɤZ$Xv8倣[\u000e4\\Zi\u0002%[EL\u0003@l\"\u0005Ͽt[ٶOnK%G\rۿv^Xl'\u0017\u0015\b\u0002lm\r;pI\u001d\r\u0016K.\\\u0005XPre\u0018x 4?\u0019\u001a\u0010%\u0004S8o\n\n)Y\u0013Q\u001ao\u0006?Mifl\u000b2kOS0qԕ~Qbԛj+3\u001e%0T'ט\u0011k\u00020\u000eq>mmҵW{^\u0017e|VEUWc˾o\u0019˼),a\u0004b,d&\u0012\u001ao&8hxcA,4Y\u001aY<1\u0004#d\u0003/i+5\u0011Fn\"\u0016\u0005[\u001c˂]\u001dCc\u0013>:ĩi[M\u001d%\u001dI\u0018w\u0000ViF|U\bsۑ|\b\u0010gp@V\u0006K:^b;1YO\u0014yja\b<ek\u001e}2ǀv(O\u0001\u0004dO\u0005},ti\f]A\u000b]z*CWХ\u0014Xlft{\"\u0011,0ʹGo(HEqZBlaFH\u0001J3%\u0016-]?m:\u0005V\u001c)+#Eg\u0003\"{\"RB\n(=׀[\u0004;Đ\u0013\u000eTFp\t\u0005Ƈ\\A\u001c\u0011\u0012&,\u0015<\u0012m\f&Jȟѱs~k\u00014癍?67T/*\u000b4_XYq%=\u000259\u000bS͈gNRL\u000f?4򋾙\u000fwMk婮+r)5?\u0001m@lm\u00048\u0001r\u0002i\u0013̋E2D2R\u001f/++:5\u001b\u0002}\u001d$#NY{f\r&\u0002`*SQ!\u0015\u0005\u0000\u001c΢dC`J+nY\u001fgSB\u001er\u0001b\u000b>M)#ޔ\u0017gJJ.\u0016\u0011b\u000bp\u0001b+d8\u000b\u0019\u0005\u001a.MCl\u0006[WjIu0\u000e.\\rb~\u0005\u0017T=&K\u001c\u0000%[=ݓwAn(\u000b]\u001a*CWgBա,ti(:}3y3j\u001fa{Œ\u0017\u001d\u0012\u0007q0\u0012\u0002dhk3\u0000\bEOInhm׽\u001azn;ϯ-\u0013g\u0000) Xr]R\u001f\u0000J@o}v\u0014b\b\u0011F(|\u0012.\\Xb\b4ƾ\t\u0014k\u0014\"\u0012K^Ǻ?Vm_Oarw|^Qpoת\u0001c\u0006\u0001\u00179NƯ}oގϛj+溟fe_\u00175xom3u\u0011\u0019j\n56\u001eF\u0000(`U\u0019!\f,Z\u0001/\b7҈\u0016b$O\u0004\u001cB!f\u001fl_}\u0016GB+&6b|\t`^5[r?$4x\u001edlථ\"+N\u0016+ľ.h#3\t~mϏv@\u0005<\u0002}U5eYU\u0002'`\bGruoA\u0002},ti\f]A\u000b]z*CWХ\u0014nљ\f#:dp\u0007HT^\u0002aޣ2?MXiWW-੎g9nb\u0011\u000em5{Utn8@A~&:T\u0017\u001b.X0pn.dޒ\rl\u001f)\u001b\u001e\u000f$I?\u0001\u0002KqÍ\u00110\\Rr\u0007\u001bc\f\u0014\u0002!4h`2 t!?6jfs~ÔoU;R{UߜT+=B<Ѫ6\u0018A0&Oώ/xyxU_OvB\u000fn:%3~_2nXBf\u001a\u00112Y@\u00142YF+ \f\tqK\u0014(\u0003?^n$&\u0016\u0012!ه,ZO\rns;5\\\u0018\u000f\b6\u000b#f~c7!#p[HB\u001c a#zKXiqs`\u0000Τb\u001dHco\u0017lcKc-U\u001dh\u0004vCYP\u0019:\u0016T\u000eeKC)n@zuDSzK-adg Fb\u000bV)\u0002\u0007B͆n\t]\u0005z\u0000]v\u0005;\u000btGI\u0000K.\u000epYnB8Y\b\u001f\r-ў/\u0006I/\\}zf/\r2dU\u000fUWt\tፀӃ\b\u000eVǻ\u000e--\u0001|\u0013%Omfr[\u001aO.*7X\u0005[E\u0014)j_\u001f\u0006=!jS\u000b_\u001f]tgwkoyv/\u000b6%3_>Jd=j\fg\u0019aȋ4+x!PiCfd(<\u0006\n\u001b\u000b\u001a!Żh}*WZcuV\u000b\u0003}L\u00160(t.w[+)Pi=zBX\u0018@lcMH5\u0013\u0004sz \u0006qF\r\u0000%\u001aÐQBv\u0002`\u001d\u0001ah\u000bVw\tc\u0001d3~1w\u001e\u0007\t톲Х2tu\u0006-t\f]\u001dBRtbv[\u0000x޾k=V1jҾc\bY>k$dCM'\u0004ߙnۗ9LmҎ@\u0010\u0019\u0000Ƹ#J88]@ӥ~LlC(zAR\u0006{h⽷G\u0005ADȸ\u0011rá\u0012\u001f|Ӑ\u0017m\u000b7d\u0019Cj\u0000/\f\u000fvL%]Ǌnӌq\u000e̸j<Iv\u000eg`0#n!\u0017\\\u0007E؟@\u000fr\u000b\u001c_Qo\u000f~5S~kYhv\u001c\u0014XC\bil\bHCpd`E\fx2\u001e$dCn0\u0006\u000e\u0001e'^+?Ri\u0001z,\u0018\u0018-KUY&\u0006\b;X Yw1.~Wi}\u0007\b2\u001b=\u001bC\u001eb6E+`\u001d*\u0010S~!\u000fJ}ŤҪvp[W֮\u0011׎ Qǵ\u0016ΡjcsYLZPRl\u001dyp\u0003\u001f\u000f\u0012\reKCe\fZS\u0019:.\rx'[Ro5\r؄{(v\u0002X-fcVx<\t<\u000ffK<9.](%v}͟\u00162;n+ \u0016\u000ep\b`\u0007[KgRh^hU{.im\rHE`\rF)C)\u001b@\u0004L69Ax߮\u0001;Ā\u001dmS\u001f\u000f%/˂O̿q֊hd\u0010rX\u0013\u0000I1\u0000\u0012\u000e\u000bP\u0003g\u0016=wǛ\u0017뢩/ǊWM\u0005%\u0000*-\nd\u0006\\\u0018\u001a\u000b\u0000vP\u0012'I!H`\u0019\u001c\u001e\u0005WC6\u0016\"ZBi\u0011^\u0005\u0007%iZfLb\u0006\ng(a\tt\u0004\u000fGҢ.e/1\u000b\b>\u0003X=El|\rp\u00139Qc\u001cF\u0018Lj\u0005\fG \u001d&\u0016#\u0007$\u001ab.x:Yl\".g,KI#u\u0010?\u001f$з\u001bB\u0019Х2tu(\u000b]\u001aJ\u0001톁04\\,x?\u0001\u001ek\u0001m5\u0016-Nl1hN;mɚ\rmw&9\u0016g\u0018$x;R\n@\u001b0!/ȭȃV%jE(\u0002\r8\u0011A\n\bF@`n@\u001e\u0006OU\".>G?,c_}=S϶I22C!7\u0004>;\u0004\u0018?@_\u0005:<\u00134A\u0012&@\u0012\u0004H|\u0003$qq_ \b\u0010\u000f\u0000\u0005>D\u0016eI\u001b\r\u0012\u0012\bxAPM&\u001b'Xc9sl\u001fˉǏ7qd2xc+v=^gd9qr&+e_u\u001f}F7A4+'vUݪ뿷*Z&_?k/{쯈<>D\u0002}y\u0012+\u0016먱9ǜ]\u0002gmO\r賍>* Y\u0001Á|P\u0016\u0003[V+?\u000eȿRmrN1vW\u001fy\u0005\u0000Y|cX*q߮vŇ&7\u001d\u000bk\u001cKz\u0005\u0018hmM[~=ؓV-rerTo\fj\u0001\u001beԨ\fdfԫ\fdGY 5Jm}\rm\u000f\u001f\u001fpj\u000f觟|9!HBhǿs<\u0007]V*\u000eZm@=\u001cPo\u001dpn뫷>IJ趮b;ug\u000fom.빰v\u0007r\u0006\u0017csN-rݭBu7h:`S#\u0012yznk\u0018r7*\u0003a\t@ɣ}ݯ}]_{o~S;&JɮVb\u000b,\u0011\\\u0014+5\"\u001d\u000fo͟>on-[zfgձa\u0017q_\u0001g'd\u00172\tOi_u\u0004\u001dM\u00020\u000bUR`'4\u0014(Sf}\rT:ڮDk\u0010\u0017;\u0017/ε)\u00012\t}\u0001jiO\u0013n[6o\u001dn\u0003ԦM\u001fj\nobZ\u001a\\{[Ңn[ep,\u001a,z(\u000bF)8lm\u00006\u0007rI8^xs\u001fc\u000e^Z'rM?w\u001e>X\\\u0005Wt[i\u000b!9y@\u0016$\u0013O\u0002\u00029 p\u000e0u\u000e\t:\u0017ޞ\u0016]eXt大xznP=o_\u0002\u001f?_>ԩ.T|<tM\u0007`G#vvpvV1M\u001fQ;\u000blk\u001ew>4eҐfG\u001a%?oJ]jR=q8ۚ\u0000f@5pX\u0013)\u001dG\u000b\u0006nn\u000b\"u[ى0#tPo\tĳEZع\b=&\u0003mn\u0003+CW[wSǯ5ir\u0011򱘷\u001a1mA{\u0001\u001beԨ\fdfԫ\fdGY 5J!6rqGP\u000e*=iZ{\u001b}#n{mzm\u0005Ɏn|}3:dUrm]YH@f\u001bb/%\u000b\\Olm\u001e4$O\u000b\u001a\u000eu5Mq}\n\u0015hr0uw=p!L\u0017t/ٻ\u001dMnr\u001dMÁx]5V:J4e|Fp\u0001vwyɎ\u0006خ\u0007\u0011o蓁-͐1\u000ea?knTڭ!\u000fR\u001db/\\l(_\u0007TBhd\u000bV/1m@m\u0001lm\"\u0000`\u001drcVŠyg_\u001f6y\u001b~\u0000\u001beԨ\fdfԫ\fdGY 5JhK}oؾGZ,V\u000fgYő\r\u0002-oOˆf\nmM{9\u001c&c\u001bϯVi0+\u001bޠ;;ʓYs\bV\u001d2:\u0013\u001cf*\u0015[\u0007g\\5\u000bT4աyZvHl\u0003Uey[\u0006;\u00065\u001e(9ˉmRF\"EΒ׹\u0006Ih؃nP%߫ih[.\t\u0017\u0001q1}u\u00160\u001d=\u0016쫱'\u0017gGG\u001en(m2,YV먙B*\r<8ReV~%@\u0016XT`\u0006\u001fgW/7:g\u0019s\u0019\u0016ϵ>\u0007\u0005\u0017!\u001f?\u001aV\r8(\u000bFe ;5\u000b^e ;\u0002Q\nۆ[.\u0013Z_\rR\u000fm{[\u0013n#u[q!\"p\u00146o8&\r9V~Jn}o\u0014[\u0007Թp7\u0015\u0012DR\u0015A\u001dH6\u0019QJN2eRuN>ur\u001a_Gw%:8#Sۺ\u0003e}R~-\u0015\u0018\u0014m\u0000\u001a\u0007r.҂uSՎV-t\u0014\u001f[!ؠdf*m+p\u001c\"\u001aY儼qйqp\u000b\u001a-rZyI;ɂ,\u000fjlsqoHnkIY x};Z\u000b\u0006G\u0006C\u001dmu\u0019jvbvN\u0001$\r'\u0016궭nmjt\u0006\u0007*X\u001cmzGj>n[Ep,\u001a,z(\u000bFY 5ӟ=\u0003\u0018(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2j\u001dx^\u0004\u0002@ \u0010\b\u0004\u0002@ E+\u0000KCe ;\u0002Q\u0016H*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2\u0005R2\u001de(\u000bFYn2(\u000bFY 5*\u0003٩Y *\u0003Q\u0016H@j\u0005*\u0003\u001b@j\u0005R2jCN-dS˩XՉXI}\u001a\\.n.gbidiy|.<Zz*> ܴn\u0018ZLgExsg\u001cn_X6\u0000өloO33c̐lHY'8Kk\u0014c\tg,\u0011Φ3+\u000bsLµx$\u001bkK'E~\\\u001cd,k$Y\u0006\"I%ffFV\u0006,KE92pşXX\u001d_}0<5+S٥Du\u0018³JX3;i\u001fӸiǩ.\u001cfb=#7ofoƧ\u0016bZ|Tzn\n2\u0015\u001f\u001c\u0017'4e\"GBjiy2\u0014sI\u0002Ijum0\u0018qs\u0019N\u0018r\u000170ֈmr5%Ru\n\u0004u\u0016\u001e\u0003'D?\u0016R9\u001eh\u0006\\sƓ30MӠ-=%f1frjY\u001a\u001e\t]IsˆMʈjh$I5N\tLmJ10-xJ\u0010] v\u001ea&ubmn\u0015\te$r\u0004d3=\u001e\u000e©4yehn d\u0016㐌\u000eQiqN&\u0018|YPd\u0011AL\u001aHˍm̢\u0016df#\\*\t\b.\nѰuMf\u0012Y\u0016mZ\u00169T\u0007\bW[N\u001dfej\u0006a\u0013\\\u0010I^\u001eq-x'ࡢ5%TN)k,PbG\u0017\u0017\u0015]\u001cy`bz}#\u0017/L]Sn\n4Ti].(mnX\u000b-Iu\u0010\rEv.\u0003럡[`gb'KgFW~}\u0012t)<<\u0013q_^$ppCXq&2S\u0006E\u0010!\u000b_\u000e\u0019\u0004_Ԥ\u0001\u0005\u0005\n8\u0014{%PP`CA`CA'\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005\u000e\u0005|AAy/Brspæ\u0012nq((((((W#0Q֭Cu\u0002T~cCc\u0013JH\u001a\u001b6Jj\u001d(\u0005~[PuaZ(yb\u001aogk}[;\u000f\u000f{hz&'3\u000f\u001b<TuOmϼ\u000fs}mo9^S]CG߹=Q/?vA6.3K\u000eJ|/ꙇhWSNM;3/}?Fɓ\u001f~ϼ-Ǝ&^\u000f_}\r%O^_|nΕS\u0003Ώ_׺jڏ\u000fV\u0012,\u0004˩<r*O\u0013,\u0004˩<r*O\u0013,$\\NEI~\u000b}\u0001*\"\u0005}f\u0011ǋIqRLb\u000e\u0007\u0017/*%$^\u0005\u0005nɡC\u00162TDȤ>\r.R7K4?<>^[\\H-=\u0015\u001f\u0010n$)8!\u0010$~ai\u00028^N泽>\u0011gX\tJlj,a)fm!lb&{yyinZgdԵԓ\"WL{Q:S3H\u001avgi*1cZ4\u001bi4ӳz(Gz=\u0015\u0013k#X-qq\u0001$frt\t5MFZR\u00171m\u001ap1LFi[\u001akӸ\u0006n\u0005wQ\u0013b\u001a\u0014\u001a\u0004`6%a\u0019Ԋp\u0012\u0012q?wXsF2\u001a\u00010'S޵\f\u0013vƚĚxOo:Clzq)8\u0005U\u0000x-\u0016g\u0007\u0006F?nRR$Dve/E\u0004{p.|ݫ\u0000\u000bO2a\u000bnxk!\u0003\u001e\u000f<VE+}lqi!t7ۡ\u0014F\u0017\u0017Ï76~ɹ%CzK3<ѥTf\\h\u0016\\X\u000e\u0005\\[K+YJ-,W\u0014f+\u0004ҊBWsP<LIXf\u000b\u001b?\u0005%Xsr\u0002^z>j)RM/y7G:pDj!3]:-\u0012\u0017/tR J/ёt֍K)!\u001azR|fڜ\u001f\u0017=;Ѧ_u6=d5\u0013k6t_t^_^ȅzH\u0007C\u000f>\u00145CGRno\u0003]f|bܙϽ-Km$8\u001e/.=Lߗ}j\tutLc&pB\fIn2_\\\u0012rm\u0019\u0006\u0018̥91k\f\u0006\u0013tpѹ[q\bc\u0011\u0004\u0017b64JL1\"0\u001c\u0001x\u001dn\u0015\u0013x\u0016ruDd,\u001f\u0013GO``\u000e\u000f\u0006\u0013y)7)\u0011\u0001CEDjr|zҴJ&d\nSHRA9/)^i2Kf0Mb34!mR,SL\u0010\u0018\u0014d\n<*̔U<SzL\u0015WrIL\u0017\u0017iK$+u\u000b\u001c&6L4\u0002qӰ8\u0017j.3Tqupf3\u000e\u0019*.\u000b\u001eq7\u0013RbZ\u000fFed\u0011F7ڭKwKܑ\u0015\u000eFi~W?5\u0010)\tSمk\t\u001a\u0001IDh\rN0'\u000fU0\b=MeB\u0017ջzR6{ɹ兢Us\u0003E\nRc1\u001c\fˮ쵹\u0005u\u0017D\u0001AĚǳO̥ΌƯ5?쾒!\u0001=%q\u0018C%N\"!\u0013Ǌ3\bBL\u0019\u0010\u00042rHB\u001a\u0013hA<|u^\u0003AAAAAy=HO^kդxW\"rD*\u001aXHkY+OQ~ҕ&jf-w\\\u0015IVj>\u001d$z.Vmr\n\temDU)^_\t(\u0005\u0001%(X\u0019P|ʀ\u0012\u0014\f(`e@\u0005+\u0003/X\u0019P|ʀ\u000bV\u0006\u0014_PD\u0005+\u0003/R\u001aŗpeP\u0012Y\u0013>Ԧ\fŪDc8|u+xWdV1#&P,\n--y\u0014eRB&RB&\u0014\bV\u0003\u0014\u0014H9\fZuܽ\u0017ABS]Ti.&փ.\u001d5e.\u00027_aƍ\u001b\u001d8\u0018nƜ)\u0010EoC޶nzHyƆƍ\u001b6l\u001ajc=\u00150~*676b\ro=Cf\u001b[7mjmڸ)Z\tw4447n\\_S$u\u001b\u001ab͍\u0010Q{{X[Xƍ2FSM6oھsKk\u0006Ს9\fOVܾ}][Z\u001a6@9nG'lR~]\u0005ί/z_֭ohܹySc]mn߲}箽\u0007twvvTQ\u0014\nZQJC\u001d{\u001d>rx-r]݆\u001d[Z\u001a[6w\u001f9wm!oұ\u001dr\u000fҶ;~zP<+\u001ck5ꤛ(\rɫ\r\u001b_yK]]۶ǓD]ݻ\u000fi\u0016M\u001c9ͱM[v\u0013\timݴuWO\u000e\fͭ\r\u001b6o\u001fݿs[֝O\u000e[\u001d\u001d[:޿w\u0003\u000elkngw`/\u001d\u001cwĚ[ZoKS\u0013\u0014m{\u0002W֖&5\u0016ki\u0000W-n\u0013uack{z`\u001eBF\u0007\u0006FNݝ]ݻvڳ}۶\u001d;wmӣ[GOC;;ZZ7<\u0018 w\u001eFN};Gmڟ$\u0003\u001dw\u000e8qlm:lܶukGWC\t~,\u0005\u001d*\rյuSlӖ]684շ<{=?6:zZOi9xwKCɃ\u000f\u001fM$\u001d={(!]۶tt\u000fL\u000eÇgN\u001c愰3N؃\u0013\u0003g]1g8\u001fۿ?{7\u0014=}\u0018:m\u001cۼ#\u0007ڹ\u0007:\u0014ս $q{g^tĹA\u0019\u0003։7]}\u001b\u001f|Co gi?=18tbf񓃦v\u0013gxԠ΍M\u001c\u001f\u001a;{\u0003<59jޞcĠЅ+\u000f?\u0011ɱc԰\ff\u000e\f\u0019@gGak61rРI{\u000f\u001fMyuݣv\u001e~v#\u0007\u0006,CoJ?(°}b|ꁫ\u0017.\f\u000f\f\u0019\u001f\u001d\u00199=|r8gm鬿_?z\u0013CCx~rlѳ\u001f>{S\u000f\u0018;1ĩnT?y7^\u00195=`\u001e\u001c\u001e\u001e>s/\\zp\u001e\u001f\u001f\u001f\u001d\u001a\u0010\u0005vjtx\u0010n3\u0013cmΞuzǌɉ.>s7-\u000f=|y|\u001bg\u001f~әÓ'OL}԰00<05u'FO:5'-\u0018=Ps/?=:<tjp`f>ror54|f虳S\u000f>Շ\u0011-ca}\fTcƇO\f:qɱ\u00134=~S\u0011$[gNM^>36b~Թ\u001f~+\u0017.^<5~cC-\f9108vp\u0003G5cpthԀ50zG.\u0019\u001d9=>y =v?0sf/\u001e?\u000e7A\u0005\u001e9yԒ|\u0007.ɱ!\u0018>s\u00073.L\u001fL=p\u001e\u001aȩa:~zxx-A\u0004\u001b[;\u0013i\u001c\u0019\u001e;jd\u001dՆGO_ّѩˏd\u001f\u0011\u0000C\u0017G?FC'Nyū瀗ѳǵ\u000e$N8{#\t\u0013;ɓ2#u\u001c0O\f\u000f\f̥+ӏ^tn\t\f]:\u0003ќ\u0018\u001a7G\u0007\u0007GGwN?ew}]G)cP\u0013ǭc\u000e\u001a=\u0004]\u00157SW\u001eI]4\u0013XoD\u000e\u000f\u0003'N\bp5q.\u001d\u001b\u001auc0y`g\u0003g.?r`8v_TǾÇ\u0012J\u001978\u001f}<pab6ӾC7^\u001c9n3f\u001d9rƉS\u0017\u001b^B\u0011(ԇ>h;w=s4A\u001f\u0006x(=z\u0017\u0001\u001d޽k\u0001M?[PO\u0018\u001b:n\u00147mݫ\rMM\u001c۷g!گ߳{\u001d<\u0017\u001e;FO<a'QȮ>rSכ0&Ν?K[7vw`ߞ;v8cw\u0014p]{\u000f\u001f#\\O\u001cwou`k\u000f\u001c>gρýǎ%zzzܹ}{XScֽ=C\u0006킞ykm[lֽgC\u0007A\u000b졞#\u0007ڻgwC}!3-[s i>5|;q?khiֹmKۦ6\rŖئM֖-b갷{nmo&F\u001d۷m\fCN\u0018~w`\u0016m\u0012S-wӽcs{{k\u000b\u001e6o\u0011\f\n\"\u0005^[:::0ֵ\r(@MzvCD--{\u0013Ãt֦ܦb\u0004w\u0003Le\u001a\u001ḇ\u0001\u0006\u0006҈I\u0015b-\r\u000ebS*&ͭ1K\u001er&M0lm\bE4M0#\u0015n\u0014\u0013Vw\u0000\u0013@9s{n\u000f\u0018EZ\u001b\u001bZ:mK;\u0015Jp\u001bOn^;#s\fQNϝi$\u0011tFgU(7fd޼\ffmMΙ]\u0007\u000e\u001f\u0019kț#\u0007fo7\u000bpq'뢥 9kgם8\u0006(0\u000b\u0015\u0010O-\u001d\u0000d7\u0011\u0012R\u0004s괻jНQʓ?+aϤDJtN\tmִ3fj&*;+@s\u001d\u001b| %ZƌfFbv\"\tn -DL\u0019e\f)V\bL\u0012@EY@I^f,d\u0016EhMLN.d$\u001c\b\u0013[-.=xydA\"<n\n\u0014+\u001e6fuCK't:;)KODK%fMfYfӼ؁\u000b\")~\n\u001e&P\u0002a+\u00144\n\u0002j\u0010gSs\u0002uN\u001ffZZ\u0005{\fn1K3yf&6Hevb&b\u0019;m\f1m8<x4C6yl\u0017u\b2l9EHi\u0006\u000e&aJq\u0019Lav̻8;\u001e\u0012{r\"X\\;&\f-\u000f\u000fק3nws(3ݐ\u001e*vԵaqp{f|L\u0003ik#i:gD'\u0016B<\"ff<\u001bN\u001cܹva&\r͵ơ\u0005[u(fny\u00059\u0005{|\taOx9\u001b\\\\d\u0007ؕw?t#5g\u001ba\u0015x\u0017ݱ}[\u0017f,\u0004ҊBU<jģJM\u000bKfs\u0013CJ4H8-ܔ\u000e.#]/69̹&nC78}3hّAxڍ\u000bb^n7ns6\f\u0012ȑ3P\u0015>\u0002<8xɹC\u0002\u001a\u001b\u0012\u00153\u0011\u000eb\u0015z\u0017\n\u0015[(G\u0017ALn\u000f!\b \u001cjq\b&!(p\u001cV\u001cX\u0003$;oթ̰ǼeCV5p\\\u000b'97MS]#&\f\";(\u000fOw\tyx\u0015\t{WtU\u0015RL\u000f\u0015)QgJRK'\u0017.\u0016E*ujKԑ\u000f\u001fh\u000fȑ՟`8hBa4\u0007?ppCq\u0003r\u000f((Z\u0007\u0017\u0014כ`[CA`sCA`CA`sCA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CA`CAv^((U\u0013ܯ\u0012\u0005|AAy=/Ƚ\u0017\nM5\u0014\u0014*Ƚ\u0000\u0005ɺuu(n_Fu7646a:֭onэR ;:ڛboG\rB\u0013Ӡ};[dUj<<x4JL?tnpgLx۞ys\u001f@ɓrb{=R]CG߹=Q/?v\u0001\\]c\u0017}O}o\u0007%Oҗ?CQR\u000e-KQ3}IR5܋᫯ɫ?X^)?{,&;@\u001aK`)#XJ\bR9T`)#XJ\bR9T\u0014\u0012j(Q\u001b-y.9)\"yoN-\\\u0011\t7$F\u0017\u000e\u0014\u0001TL_eQ\t~/E%\u0005\u001cWSj\n\u0015СS\u000br*|u\"|hdR\u0006K٥Xyp\u001fYZ\u001eK/-.\u000f\b7\u0012ￔM{q\b\u00124wmn\u0001\u001c/Sx\bCS3Jpfk\tH\u0019\t{NꩬnP7ea.^^^[\u0016\u0019<>y#u-{)ߕ+^\u001a1,Ė2\u0004fTjFKd\"hf(Gz=\u0015\u0013k#X-qq\u0001$frt\t5MFZR\u00171m\u001ap1LFi[\u001akӸ\u0006n\u0005wQ\u0013b\u001a\u0014\u001a\u0004`6%aSG\\Md\u001fT9l#u\u001a\u00010)te\u0013f6|%l{zW\u001fd\u0007\u001d\u0017/eӋKl)52\u0006\u0006k9pm>;00\"q\u000b\u0016\u000b4v}\u000be\"\u001e,_*\u0013L゛.-ZȀ\u0003O\u0015~Jo\u001f[\\Z.i3vh7\u001b_L?!\u0019qR*3wf.4O.,\u0002O.-ϥￕ,\u0016+Z[MY\u0015VQNiE+ZVU(\u001eY&zf\u0017/~\u000bHx\u0004{\u0013S\"ԍ^nnsމBf>t>u#[$~\u001bOjR J/ёt֍K)!n\u001aR|fژ\u001f\u0017:ѦWu6=d5\u0013k6~t_nez\u0002]m>k5\u0001{PA\u0007\u001etzБ@\u0019\u001f\u0018wsonR\u001b,dG&\u000b37KOd3evB,-;\tܲ\u00105Kse-C5f\u001bb0Ġ\u00163\u0018LEn\u0011`Z\f\u0013\\m\\(1uƈ\u0013Ls\u0006+㑓uULY'&}3Y9JRӀ\f\u0011]\u000f0)Z\u0006\\{'2HҴm\u0014\u0013-\ti\u0015P'\rnp?\rݢ\u001a#n\bӲuQ\u0000N*\u0010@g9\u0007n\u0018PS@:\u0003@6\u001c\u0003y3<Jo\n%I;l%i?s\u0007\u001aD̏&?\u0019M<YR\u0013Oq\u000e\neF=@c~\u0012\u00196\u00049bW!<ۯ\u0015X^=r5\u001f+><P7`F\u0017!u'iѤ}7Ӊ[5s\n\u0010e;iD\u0002ݐl!CؔYp\u0001\u000e\u00165lRs+;!I(w\u0018܍GlhMʶ\u0019јF\u0011]W6mɪ\u001b$Z2\f\u0002*e6\u0014)Y-CC4-\u000e3Pd,}M \noi:(\u0001\u0003\u00153A31F.9ϻ\r#c恖ϋePy4ͰlCFDA1\u0006R\ttbͣ[bcj\u0016-΋&r4h66tnDf\u0006Jtf\u0007q[\u00025ΫZuxn:t\u0004\u0012\u0016\u001eS@\u0005\u0010+h&\u001c+\u0016D\u001d㮮Y\u00065PF^^EzA5r\u0011FpRXd]YFrrL_oҠIP\n#\u0018nO1\rxe\u001a3|\u0006\ttCݒ/Xp\u0016Y,ޯQ\u0002\u000fFWGD6\u001eAAong'9;Wנͱd\u001crjn!4+W؜\u0010Sمk\u0016\u0006\u001f2\u001b\b\u0003&v87\u000b`\u000fU0\u001f\u0015ũ,)ol-/.M\u001bE[i\u0013s%1\r}s룷\u0017\u0017JMGYJ5M>S V\u001bF+\u000bⰇ\u000f\u0002V\u001c\u0002\u0018ohH&\u0003h.M3,D\u000f;I\u0018lT\u0001\u001b_Ð\t0˶m\u001aJЊ̟\u0017~\u001c\u0019<T\n\u0005D\u001fwαx\u001cx2&3^X.\u0003nYӊfMKd6(zihX_A\u0015(aÝ/-DN/eW\u00162\"\tB&KRѯ,.=sG\u0016\u001bMW}T/)K/\f=3\u0019\u00042\u0013Y-J3\tF\u0019SOoL\"[2OL0$k\u0013\u001d9G\\L-diqj<pC4avf[:%i1ވ\u0000a^xpS,a I!^x$@9H(M-\u001dCfr\u0004\u00046eq\u001c\t\u000e_\u0001\tMו1\b\u000b\r\u001ahNԞ\nZ\u000bİ4;\u001bZ?r\u0014\u0011ZNCa8/\"x85,\u0015\u0019<t\u001f5ȩ߹۟;oy\u001c.+rvO۟?+z8\u001f\u000e\u00130E gD5N\u0017/\u000e\u000b4 -P(\u0017\u0004\u0007\u001cȋXt\u0010P%\f\u000b&\u0006\u001bL\b\u0011\u0004\u0014@\u0012\nC\u000b\u0013:r\u0013\u0011*\u0011v)+5!gT!\u001e4a\\9\u001fp\u0001ϖ泍gc\u0016DB\u0007483\r\nʢI\u0018@q\u0003J\u0006lRg\u001a\u001d-c#%z\u0000d\u000f$'0>*)\u0014\u0000m1TI\u0002\u000b\u0012\u0019|`5@Wѓʹ;Lx\fۀI\u0011\u001a\u0016D]Dyd\u001e\u0006.9K hRe$hڔd!IAu.\u00064N]$-ӻC4i\u001b8p\u0001McP@Lj|I^\t\u001f4IM/\u0015c˧\u001b'\u000bb\u0012^j -fU6~\u0018?,#D4g\u0013<\u0013f&(<\u0015[Qr,5g\u000fZ\u001bd\r.Yt\u0006\u0002R.;ˤF\nLtӢ&\u001a\u001a\rS׸\\Q&_\r\u001b\u00060c\u0019^\u0005/rbQ\u0018\u001b4%y-ԡPdZ$:|\u00120\u0017S\u0011\u001eH+q;\u001e\u001fϏ]x0#ܩ=dZ\u0017<\b\u001f\u001bp\u0010M2V*P~\u000e=?]4wW\u0011A,w*\u0014d\u001c\u0017\\zHׂ\b\fìG\u0006q9\u000fyx=eBKm\u00111#,V\"\u001bp@4Cch+f \u001c:q\u001d\b\u0015U(7*³U[*\n(?G󷖋Y+ť\u001b;iW\u000e\u0005\u0017E*\u000bA(l\u0015ϵ2R|l\n&+\u0004\u0016!?EJn\u0016P\"u5S׼\u00060\nۮ\u0012\u0006\r\u0017g0\u001f@\u0003\fb\u0019\u001bge\u0004+rzrC|N<\u001e#g,|\u0004\u000b=}\u001fF\u0005A_O7*h+f\"\u001c+\u0007/\u0015*P|+t5weE\u001958XScM\u000fnvvݻH;_o\u0012\"@w}\u001e^S[T,`\u0015v\rPt$2~h\nyxډ-G\u0010i$<P9ޖ\u0005\u0007\u0012+\u000eY\u0017\u001c톖x?XU\u0017yw}&\u0004r*\u0018M\r92\u0003h:h}J¬ۆmGr\u0016\u0010Gd\t\rP\u0007 \u0016TE\u0010\u00063E\u0010e`A(=Q@㢜ʴBف`QŪ/\u0013ˋ \r\u0000\u0006s\"\u00111Z);\u0011A\"+\u001c*\\@섋yEƤ]Ƣ5ֲK}[R'd\u0012n2\u000bBd2FZ̭A$\t3A\u000e\u0016\u000e$\u0017Vh ^cZP\u0007 !N NA\u0017h688\u0011s#\u0011\u0005\u0017KA\u0010\u0002G\u001b\u001aX|\u0013\u001d\"BvBA+\"Ta\u0001SX+oʮ>E?[vނPf\u0003n\u0004ZlO\u0011\nȂ6Y&%ba\u0002(QA\"K0\t݁\tU\u0004\u0001M<\"7YXsxT!IF\f\u0014H\u0018+d'\u001c$EB\n(P)DV\u001cF*띊.R_\u0011,F$Qt\u0001ZkN6bB`xn>5\f݄*@ˣaA\u0015`81%T\f`\u0006\u000170PN lݦňiýr\u0002:\u0005ŝ?\\zJ-L[cq1rr9u\u0016aƩ\u0006\u001d\u0010izuhd⓰cϿ=\t@S;P\u0004/R_\u001f\u0003OFI D2\n\u001e\f@І\u0003/\u0001l湊~UR\u0010i-c7cK7oN⩔Rʰ\u000e?QJb~UE\rZsxgNڡA/c0\u001b\u0000\u001f\u001b\u0005\u0004*\u000f\u0017\u0019\u0012,\u0001\u0003\u0005J\u000bt,FGLLPł\u0010\u0011\u0016{0 r\b\fFHS\u0015bvBA\nI+\u0014J\u000el0=fPX\u0014ʎ3\"\u0010ʀ\u000eE=Wa\u0010grPX@\u0011\u0011\begEҕ0-^{Ki4-Pq;p9uMci\t\u000b&9\u001fI\u001bJ\u0017\nGKy\u001aYNRP3e(Q\u0019JM+oURԤ:Uj'ޟD\u0016gSiR K\t<į>-)uS` WCr\u0016QԲ|\u001evEĶ+0g7\u0007P. `4ai|g9Sj>#\rKF\bz\u0013yrH?,,nd3kK\\va9Ό^\u0001X¸X!Z\u001aDopg\u0019h<&7!2a+A\u0013\u0005\u001bd!\fF\u0006Wp\u0001\u0007Dº\u000e0\u0003a\u0005\u0014\u0013#\fT<I(A\u00037\u0010\u0014\u0006Ox\u0006Bӂ\u000ftU`R-\u0016Zb]\u001b\u000fz\\3\u0019\u0017'naahȻ[6z01\nzb\u0019ICs4ŲI^\u0011#4\u000e\u00154\u0010\rڔ$!b\u00040a\u0006\u0004ý\u0003bf|䔔-Z>Y\u0016ob\u001f#t\u000b\u0018YDW_a\\0%K\\\n\"%\u0007\u0019w0|`\u0016J-s\u0005UN\u000b-\u0018M\u001fW^xCItMFAY\u0001Mę6u\u0010Q>Uг\u0006~rĜF\u0016 F\bz&?}b.tf4~|a?}l6.'=\u001a'\u0010W\u0017\t \u001c@_+΄ՉH<.\u000e!\u0005{ .VƚN6M+উ0ҢB\u001e4?wUfneoq\u0007\u0019ZNJ({ܫ39)̽\u0006\u0004sR`N9\t\u000b$,`N¢ZNyf\u0014aN\u0014=/BNNIf\"Q̔F53b6p3ʤ/xu<h<izyn\n@\r\u001b67oܰTuu\u001b\u001b[cm \r%\u000eFZ~ccK֮]w(Κr$\u001cƦM\u001d\u0013wdm-\r\u001b7\u0017\u0012z\r:M\u000f}\u0007vvljijlxuu-\u001d{\u0006&9;77znD?{ۖBohl\u001d87__5!vо={ssB7o&o=\u000fxb#M,sԴэnckב+O\u0017>o\u000bOM\r޽\u001a79c}co_۟O;xk魋\u000b7\u001e21з^FmW;>o7_>goϾx\r2tw~s\u001f}믿_?\u001f5=mmBao_x?o/_\u0017\u0017ӋW\u0006tn˅^x\u0013_ϯO߿wo۟}}o\u001eB_Xx_+?k\u000f\u001fW^7nwNjk[/,?~^٫O?\u0005O~>ǦQ.nxgB^\u001f\u0017>\u001bٞТܕ^+'](\u0019ړ'|KϿ{By\u0003\u0011z\u0002{\u0003%XFN<v^ɫ< O1՟\u0005$\u0004Z~\u0012N~W^/\u0011絆o\u0005$\\Z/\u0005$\\c#\u001f'\u000fH5\u0004{w]Ͼ; \u0016}g\u001fB\u0015lS_\bHD\u000f\u00115)c#+,ٳח=\u0011=[^o^ ^\t$\u00129xT\u0018EHddϩf\u001a7LB3&ID3\u0012Ff4f\"K<.c[Y41;Y5L\u0019NeX(+;dTlFt\u001d\u0002_)70!ߣFf[ܣ\u0010훆&\u0013\\wEܵ/pjs\fp_\u001b\u0015zqn;!7㷸)쩩YtnBFn[a\u000fX2(\u0018\u00140̑+g \"TȃI\u0015xBs=TkNR\u0006r\u000b<dRJ\u0012bSQB\fס\u0005Xb1\u0019\u0019r7=\f{I\"磽L\u0012g^p0#ǵ\u0001(s쵰ǼȲ!o\n{#\u0019O2\u0010]\u000f\u0005\u0007nM\r\u001bL\u0000ܰt\"\u0012V>ݦإS=bOZ,\u0003EAl,7\u001ahu<hQ`\u0007pg@ݩ7r\u0010\u0007?\\5י_#)<Wgk3y\u0010)I)\u0014nU\u0013\u0003nU\u0017c^풿\u0002U\nΆ`~k\u0011ti2m'~q2\u0003F\"bvs~M\u0005*ؼe9*v94.,I#T6N\"/\u0002\u001cM\u0005\u0004tܒͣslab:ȅgsI˶+IρPlnȥ>:2T\u0010J\u0013~\t_\u0001\u001d\u0007[!HuO\u0005\u001cĠ\"j^Щ~YB%rVyQNRP7\f\u0018\u0015\u0001\u000f~|4\u0002e3 +GZ|꧂\u0007l/8F.^\u001c\u001er鍧\u001952\u0011UƨÊ\rӑ@]kUC`-p\u00195`G{n\u0016q\u0016\u0019]\u001fe\u0006h\r\u000ehQ\u0017\u001dKlVNZ\u0013\u0016\u000b\u0019:,zO(\u001anTy\u0006\u0015%_\\>\\{C9{vz;?g_y\u0017\u0017Ξ\u0005uok[\u0007|@\u0018+δx#\u0018\u0014O&H܄](\u0005VޝYn.!\bE-&Ԭ<\u0017`2b\u0012L\u0019Խ\u001e*L(J\nl\\L*Yػ`(UfJlXf^iZҝM@->b{0+1\\l\u0016&k}0E8\u0016XTc\u0011Mw6\u0016\u0005[NN\u000344#Z\u001eΤSZ:Ip&,i\tehk8ӌgd.g˖Ӌ\u0001(/wo1\u001c\u0013[\u001esh\\~?9\u0003\b\u0007'\fcn6ǥ?zuw1$Tiw+r\u0012iNqLqҪ~r\u0014_gɽ\u0016&F)br\u001c&ar=I=5nrk/BR.ȴ(\u0012iDIh5qk'\u0015J\u0015F])\r\b~<#F \u0010dcCSKlSgWIڕ_\u0017BY_\u0014ۼmNa☪lh5\u0007\"[sބFTK\u001e\u001b\bcSg\tӚSgO\r[vnmm\r7:kCSWS\u001fpczf-nu\u001b6\u001b?}w\tgէ\u001fowg{geAc*3\u001f'>?{<\u0015sm\u001dz\u000f/\u0017ſg_\u000f[nw7LJ?WoJ~?|ց\u000eFmvo|_^~\u0005\u001f穇{\u0007Lǟ\u0017=a\u001f7_}C>\u0014;]Wpm^?>O_?\u0005\fYΌWKg cX\to\u001f6Vk\u000eg\bWVuJ\u0004\n\u001b(\u0014ĥ^غ/\bx^-y\u0017>\tͯ~\u0001`[\u000bB5[׿'˩S=˽:%/~\u001f~U^^k\u0011w\u0007\u001f}3OZ<;v\u0007g~o\u001f۽5oSW1\u0002\rAo`[\u0015*W\u000elo{ivn߶9*Dg)԰1%L5\\_`e,>EF&13c\u0013<2\u0004K1:f\f-\nl-zf\u0018IpL',\u0013Lt6g}\\uf&uqa%L\u0014 \u0001f%u\u0002N2\u001b\u0006,]\u001b-\"֣;\u0006.\u000e0l57Ըt#-ȡ!m=i\u0010|)EN<4Ie\u000bs?B\u000bK#6Mr(X<\u000e\u0001k,pJT\fLY̚({5kJ\u0004u\f?\"\u0002薝\fdԂVqh&\u000e)'\"S\u001fs\u0014\\\u001cy%.5hFu\u0003sK\u0017vj95E\f\u0010֡D'\u0018Qj\bsQp2a4\u0018\u00128\t8\u0017.V5c&*)ı\u0011K\u0003\u001eh:PvItq8ݩw\u0006Ї;mͯtej?-س\fsj\u001c<m3crFbCC7\u0011u\u0011\u0006A\u0014\u001d@o2\n\u000f\u0011Sx8rn#\u0002cŊ&h>&\u0002pP&&-Y;1TD9?\u000b4\u0019\u001c?\r\t\u001dۉG\u000b3}zٌY̔6r\u0011ycaz|\u000b\bN}c4Q\t(cq`dwE{x\u001cLB^\u0005W7\t}LCDvn(=I8N&,PQ\\Wت\u0016?B,}BVQ1G\u0013Z8[,eA\tٺm\u0005\u0017-cF\u0019Z/\u001b\t\u00038.2\b-\fy<_i\u0014^nr3\u001e`=\u0006gwZ'mkb\u001f|iK\u001d\u0018-Esٌ,,\u00034,}dҋ@+Hձ*qD\\\u0019XLƽKrG\u0004\u0002\u0019F?q-NAKjơˆ\u0002'Жh&\u000eȆ\"\u0012&LVp\u000enw˓\u000fP\u0019<CA\u0017QX\u00118lK\u0010YEK\u001c\u0019X\u001c&\u000e\u001b,FYU\\\u0014]Yh9hLf\u0012<f\u0012F\u0012\u0019;;+\u001el1\u001dBԡpN\u000f\u0013J,.4:\u0011.|((\f ж8\u0012E4K\u001a\fFjhҚ#\rk Ιv\u0001\u0012ܹr?D\r5\u000fZ<\u0003V#&(\u00165ZNZC6ZP\u000e&\u000e\u0011\u0017yМ\u0005?\u0005υX4t\f{ضT\u0007\t|0wrOx87\\j)\u00172\u0015\u001e\").\fC\u001c\u0007/\u0011+d \u0014Dd>\u0018zHPQrq\u0014WR'R\u0015#\u000bZ|#EC#AK\u0003+иbM+tf٫Gqhb`s5R0dtg$|co\u000f'y~'_ÏLӣ\u0010eYI^$R^H{\n\u000fۆqx)DeSek\rʺQ\bjp-18LgR\rX\"4\u0015d3Lʥ\rp<y㭋KEY(e\u0013'W\u000b_\u000b\u0015,Zz`R,Mh,K\u0012<=IR0RnjYb_JRPykfןr\u0001N.\u0017S_MB&z*'ѻV\u0014(\u0014.'\u0017Nu\u001b*ɭQ\u001c&ar\u001c&wO{}O0ZT9K125JDZw7r\u0012ZMw\u001cIevJhvJhvJhvJi3--0N\u0012|6m$RfYC˦\rRlx\u0019ARZB7ZϤy\"L;1fIVfufNI7XQ;%vJG)<eos)S*LͳS\n0hvJ,nE|GV\u0012)\u0015+j)A\tddġ\u001aMˈ\u0004zVgT(;r\u0012Th;%nEuYQvJPvJN\u000b)5.l$\u001aUN\t$*E7\b;P!\u0015N)htRN)f%\"Ŝ\u001fS\u0012P\u0011|P(1Ϭ(LON)iN\t*A\u0012tWvJ{zfq;%+N\t(N\b+UNN\\\u001evJ\u001e\u0011vJ^\u000bʷS# )\t\u0007)=\u0003vJ\u0011vJ\\\u0005\u001bv:씠\n\u0017$Gz\u00052p\u0002;\b\u001ee)zq3`DkN)|@;\u0002=\\;*Z\u0012tf\u0019+e%\u001cB\u0001A'\u000b\u0012\u0006\u000eݰ\u000e}&ML\rnaV\u001c)U.\u0011KX\u0010Q\u0001\u0014*\u000f.\u0005)\"D[\u0018niaJk\u0017\u001a\u001bL2e\u0014˔QY`,RMQ2+\u0014-102}\u0014-)ZiIJ\u0013\u0007\u0005\u0012\u0012\u001a\u000b!%@a0Kbr\u0001\u0019t4QEG\u0013̺V[\"d5d'\u0010U\fZb*,\u0006F\u0017CE\u0011Ś\u0016i\u0019Z\\RhP8w\u001aa\u0004`j\u000b@rCAZRRA\u001dnz|ӻ\u0015a&W\u001bZ1J\u001b3+QEK-l᳾\u0016\u000bI~Z)HCKp{&He8\u0013;\u0010i+u\u0007\u000b\u000b\u001f\u0003pQgS[b<K`V\u0007\u0012\u00138Ũ^jEQb4z1{'7Yc\bO랬\r\u001aD(x\u0011A\u0003\u001e\u001e\u0005s#tp\u001d%qcu\u0012<\u0007腆\fD\u0004q*Oj\nFq\u0014Wh):\u0014%kg)Z^*XSZQh\u0014R*>K)pM5+\u001e6\u0003j,\t\tN\fL2,a[Y(YJHj\u000eW\n[cHS*g1vq>\n-1u'Nb\u000fkIu\bih0\u0006-\\~1\n;'\u0018\u0011{\u000e2\u001bb3bIyM`noGaqӂ\t#\u0018\\c6\u0016k\u0019\u001bx'\u0017\u001eE#W&\u001fydֲ^7-$ߺp-\"\u000b[4z]p\u0013#nɿC?>zO\u0019c<\u001bQ\u0001|M<kԵldJ)ɫ4\u0004-v\r\u001aMf,(!llFKmLwbҠ1nI[K΢1\u0000\t\fcL]׉ƘRJU*\u0014V~z\u0015ecMS_1\u000fUHD\u001ez<\fT9p\u001e0\u00035{z0\u000f\u0001\u0000f\u00003\u0019\f`\u00060\u0003|F\u0019\fܓ<\"$<\u0003CdUCԫ\u0015S_l*Si+b\u0006r͔!؆\r\u001b\u0006w9c<cuu\u001b\u001b[cm9\u000b>d9&MV|76m%,\u0002:\u0018.wmmkiܸ>g\u0015iSG#}\u0011afwd_w&\u0014\ru\u001b\u001a7uec\u0013S\u001dEix~jbl\u001a\u001eo70qez\u001b\u000b\u0002RfL\fhq,3߰nCc[wŷzݞ<w\u0006z\u001a]\r[[O#\u001f0t\u0013\u001fG\toc]G\u0006,>_\u0017#_^xO/^\u0019<\u0018$\u000b鷿Kԑo۟}}o\u001ev,DAw|˯\bT!wqcv?gܶN=Ώ}kߕ\u0006\b3~s\u001f{c\u0005&o_x5uD;\u0017Ͳ\u000b\fp\u001dqp]8\u001f}Kz1uDZ6d\u0005-Ö\u0006VP\u0015Un\u001d(f__+h\u0005\nZl%@K\u0005}V%=a\u0005k%v%cA%#L.|\u0019V\u0019FYF23:牙\u0019B\u0013$aLbF33lV\n5Jet{6Au\u0011eֲ\u00133\u0016Ip[5Y饣(;\u0019qNr)4C\u0013+\r&V\u0018%:5,ÿƝ5\\)W<2Өة\u00158\u0005ߔ$5\u000bJ\u0014\u0012\f3\t8v\u0001\u000fݳ=\\8L'}\u0017=/prͷF\u0002.S\u001b7sr\u000by07TKY\u0012<\\\\#{h앝ñ8fTݻv~x`в4S3LiJ+)ü\"byn\u0019q&Se&mY\u001dF.]\u00035-E<A8viկo8\u001aٯI+T_jSMgT\u001aČz<X;k.\u0011yV~myM%gP,n^dޭӨ|\u000f=PhM\u000e\u0018N+`y\u0015\u0016pfyK\u0017/eӋKl]\u0010?|Vn3MkUX\\n^iq\u0005t;\u0006W+c\"Ln#n;\u0011\u001eh\u0016Ȑ\u001c0-1C)\u0016D\u0018\u0010|1Ogl%0iÙ\bGwoWn@ĄǛ |b\u000bʟD\u0018l\u0000Mqp@\u0001\t\u0007J\u0007<b\u0012v>Ow\u001e!\u0006Ut\tM\u0012&_I,1 6z+\b\u0001L*Oݸ{pNv\u0012HK!\u001dEV0;isҴ^s\u000f\u0017\u001aLD6\u0017\nP89fښeſA؇rrѸ\u0017u}\u0005\u0019b[\u0011*[F\r3\u0018\u0006mo)\u001b\u001et-b't(\n#gIn\u0013ow19\u0002Y\u00020\b>\u0012b\u001an\u0004\u0005vUr\u001dx8w9^/*Qމn\u0013۴rS$\u001a=tPG ~ņ\u0002\u0010E\u0004-b3۰+A\u0019İ4-\u0006rk&\u0019v\u0013\u001flan\")t9l[r\u0012ُΝre Pf\u0012\u001aĤXҠ3\u0002-6}\rs\u0010\u0006z.\n@2\u0014\f\u0014;yH\u0005W\u001e\rh;\u0010\u0005A\\J}QYd dN43IʦO\b@r{-4&\u0001I/iҁyt)\u001a-i\u001e\u001cN=]AeE.{<Wk\u0001ʂ\u001cE\u001elPI\u0006^\u00114az>!w*\rEǉ\u0019p-,&x`|\u000fSTDJ)\u0000\u0004Y\"Q\u0015$iEIGFD框E\f7Ax\u0002mA\u0011\u0018l\u00132\u001c\u0017cA@2L6\u0016h<Fs=9\u0014:\nՐ۠Py>*$Y\u00064N+\u001e.h\u001e{|C\\&0 \r3\u0000h\u0010&X/FN\u0015kX_\nh@l+5\n\"3Bv[x\u0002:\\\u001f\u001d(\f6+m\u0006Lo$}RZ#̳h\u0011NHK\u001d{XSO=U%K$$}(-a\u001er,1\\R&_)~\u0015\b\u0005\u0017$!\u0012y\u0013\u0003\u0001 :w>\u001f|1\u0002$:Hi\u001b\u0000Nh[1E١(WUfwg\u000f%r?TTN\u0010\u0019\u001aXK$a>A\u001f裷w>\u001bx>;4\u001dO<4@4>ϧ\u0003\u0019$\u001eЯX\u001fO=.ތ+U,n\u0015-&,jHSUD'\u001f\u000b#\u0006SGǚ@ZQʏf\u001fvwvb\u0019E%2c;UF\u0002@&_g4QLTYd-4P~~ˋ\u001aq/i=ImJE\u001a=0}bc\tNJyA`\t\u001f\u0004\u0014AJ{ŋUFո[_Z=:갿\u0015㭗@\u0005.\n֧@\u0005\u0000\u0015\u0002T\nP\u0001*\u0011\u0011\u0015\u0002R\u001f{\u0005\u000e[߳:,\u001ea/]5VŪ\u0005nqv 0\u000f\u0002 [\u0007y\u0010\u0007/&rIq72q|t\u001d\u0006i3ø֥{\u0010XN/4O\u0007\nl7&\u000e6}\u0014[\u001e\u0007}\u0010\u001f?\b쓹Y0g\u0016\fqdI:d\\\u00105\u001b5\u0007v$[k8dY/ģd?5dmnk~_Aˏ˟n64^з'%{6_:[̞ߒGuKk\u000fq>gO\\Gu/2(=[:f[Y;_{nGkm<\b<iqŃF9j~\u0017})\u000bTgghA<lnicھ츯\u0014MN`SfV60{bc\u0017ҩbghA-olS\u001d;\u0007yx]\u000f\u0002'_\u0016~o}٨7:f#K=ix֌'\u001c͘gY+\u0007e/fٺ\u0017pKL3)K\u0007o^_*6f\u001eaJēwXz1{g^,ZM\u0003ţLILILIG\u0005vpz\u00148'fgf._m\u000eb955\u001baàn3٭p\u0017g\u0016}-b饀D\u0014\"}R[\u000b?VN\"\u001f(qI\u000f~\u0019&ơ\tkCAh$\n4+\t\u0015\u0002ꅠau\u001fMw8ui\u0016;eV)M=1O@\u001f\r\u0002C\t~=X85'@V\u001ez}0ȟR\u0012 H!cٺ\"O(4z\u0019 c++\u0012z|eIL\u0017Fa\u001a\u0005&\u0003ykFIq^Ɏ>rJd\u0016\u0019EIE612'ɺ\u0010zّEĥ.^\tT6=ڒ8I\u001aWI\u0014%\u001992Q4zxI\"}IvgVJ\u001fMR/A>^\u0015Q(uNC\u0017\u001bKp\u0007\u000f\\R$JXޫɊ\u001f$z{\u000fb=\u001aY&=[:+޿^x\f}$Rv]^\u000f*nHGn\u001aer\u0004]wdQq\u0012N^\u0014hM\u001aT\u001f\tEǉ\u000bsE)9`$\u0016Q(Y:[\nm)-ٱO׭4\fk\u000b\\\u0017DZ\u000bٕy\u0011i\u001br(\u0002'Z\u0015\u0019\u0007rdB3^\u000fbT.HSNa\nCyCF~]ktMO\u0017\"F\u000eP>z\\\u000bAOj\u0011+إzt$IJe\u0010h)HCȞ\n\n&&M\u0002Μ./\u0012I!^u8vtaSlIbz'-* yA\u001cʎ\u0015ŵ\u001d)sDo\u0014R\u000eʛs(\u0016\u0013iu\u0017\u0007dYC}4\bAhD\u0013z(=ȭ '#}h>wdTj={~(2Cah\u001d`\u0013+c)߁j&&\u0002_c\u001d&\u00039za&M\"E:&:\u0014\r4\u0007<\u0011z+/j#\u001a[7*}g,Z\u001c(\u000el]w GdE| m[0/b)\u0013J%eEBMB2Em\u0019\u0013\u001fd\u001dCZ4H'Bɺ>\u001cؠ^}\u0012e#˨(@}V\"A6Kā>䩏fE\u0018'24qT/E[mU=\u0019\u0005\u0003g$\ncB\u000f.֩\u000f\\y\t\u001dYe\u0010ץY\u0011z2ht8֯]\u000fz|ē\u0011TF\t!fQٲBk|tPdaX\u0005)e͆\u001ah@\u001a\f`^*)]:\u0019lH\re/\u001b7n={(s~\u000fF\rʉ^\u00031\u0019Ru>`ީ\u001cH2d\u0016tI^yoDt\u0019NУlK \u0013qU,\u0004iQ\u001f*#dʗ9QL\beWNá)\u0006\\ٷң\u0012ґCӬi'5J{͊1Vˎ{OjdXyF޿Z:wP\u001a]T<蟭*Ht@ver2\u0001좽\u0014_&H\u001dHb\u00122\u001b\"cJ\u0018GAv:2\u0011-!Ֆ!$j^\u0018L5y\u0019Vtdv\u00130b/L\u0014\"2~dA\u0014\t4H\u0003hS>]T\u000eu&Ȕ@vqhɸ*k\u000e4s2\"=i2Y<I\"B\u0007>S\u0014Ϧˠ(\"S\u0003|4SC:+ťχY\u0013d m,pTQJ\u000e\u001d&keV\u0017\u0003\u0015yU\u0016{:5~)\u0014Ӯ4Dÿ8\r\u0003*C\u0001ioxf\u000e\bK\u0003IO\">=IWZB{[f$+$gnA>K\u0011\u0019 tMy)j-HiY(3L;'G;?F!ռ\u001a\u0012ۢJր/uϖdq\u0004a\u001eJ`!LDv4_P\"W(\u001d\tí|\u0018KbZ9\f2X,0SH7\u00197\u001b\nepi1>tCzO\u0012\b\u001a䁔z'\u0001q\u0001ͺFI%0q\u0011IӖ@fK7>\u0012Tʛ4D><^5O~RmVhsYb\u0013\u0019\reFemGv0a\u001ekӑC\f?n\u0012\bJp,\u00135.PF4.,34mYWYhV\"\u0019\\V8\\\u001aO7E_H^\"..2od\u0017\u0015F}`<W҃dT\u0013\t-%dp\u001a\u0014Ht/\u0003\r\u0012rH C漑I)/\"L:I\u001a\\\u0011L<J\u0007,)V4MJ1XQuf\u0012lנ\b[g|Ae%0\u0006\rs\u00159͟١\faUmKTR򮙯K\u000e^v\u0006\u000biҜt\u0011n\\(IQj\u0002zadf\u0001OgǊR2\u0019jd6+%S>\u0002Y.\u0019dИS\"3k$\fru26D/å4\f,\u0012+IeR\u0012\u0004ޕ)g\u0014˪$pVN\u0010m\u0007\u0016r^\u001a\u000ek\\H[0r7dӴ~ 5Ҹ`\\IL1\u000eY)L\u000bH} 7սP\u001a좎8\nE4J)עwDC\u0010?\u001au\u0010Nu6R\u0010yƖEMF6#EYP)gv\u0012?\fq)$?r\u0012ˡ}7.%þ\u001c|7+\u0011l\u001a)ਔTȩR%\u0013g}̝\u0004\u0002RQ,c%8bU\u001e\u0001\u001764rN8*%Q^XJY$!3La\u00165SrR0.%'j^&@bwȧ\u001d\txH'FwLh4\u00197\u00069\u0005٥\u0012y\u0017PktJ2\u0007Kz&%\\\u00158ɋ聒shR4)\u0015˹\u0017j@5\u00173tz&'4F\u00029\u0018S\u0017N\u000fe@ω\u0012QitjqԖ_\u001d1\nqE\u0012I)iة\u0006avU.2DkԺdM\u0012=QqA3H\u001eNUK;d8ۻE;HSE9O\r)\"fГUm3..9]}d4\u000er?\u0011YM䗵dWX7\u001eXSXf zKYT\\铎HNiLo\u000bH&\bk+}Av.$o)>LV*NYTG'#ʑ^ӿ.]1NfWbrSif\u0004syb\u001d\u0003Ƥ\u001dPf\")#U2Yrm֧:$}wzwt,xz\u0017ϭkSMԸ\"=56\u0012\u001557.4pjh|~w%1h(Wfd'j\u001eJnx\u0000R5˜/Ny^O\u00182fi3Z/a%b$6' ^)ʪe*vbJ\u0012RŚ:1oDr,ő%\b]ߐ-\u001a2\u0013P).\u001a̋Ԥ'#}(L9\u001eԲTWF aq;[Pd\fX,\u0003eVɻ\f1J'cZ\\*oա0\u0015+R\u0006\r95Ef{̖ҳ}u:l4\u0004z\u001d\u0001eNZm͕\u0018:\f\u0005w|]Xv]\u00134k*kS*R*J:2VN+򒣵(,7\u001d_\u0004-JvN܂sEVɂ\u000b;í^beA3\u001dLhvY&4K&~\u0017>\u0017}ӍqI\u000e{\u0005uسa+[/ׁ\n\\\u0015ؗOׁ\nP\u0001*@\u0005\u0000\u0015\u0002T`#\"*@\u0005\u000e?*\ne\u001d*guX=ҭ_jU\u000b\u001e%\u0013\u001aȄv\u0016%\u0013\u001aȄvI3ŮoTo\u0001]7\u001cFݾnh {\u0006ALh[þ-Jͮی6i\u0014\r.<0ЂR&4S\teB3Lh\teB3uЂLhQ:\t-Jj2EIM&\u000bDT%LT%sot~s]l&\u0013ZЮLh}iZ\t-J2K'{+SUJkRQ<Le&4S\tٖ6ʪ2ͯ=O\u0012LgBSS&-n\t-τf2Lhf>\u0013τf2ol,˄6ivS*3ic̄6~!(3\u000bbic2?ȄF\u0019ΐvU\u0007]fBFLhA}&4S\t,τV.2\tt&$dLՙJo~\tm\u00148fBdI%*L2_ʄV+j\u0012ΐ\t)))\u0000dBKw;]h&4{\t26} \u001ctrrunl^d.2\u00072\u0013Z\t-JWɄdB\"K2iдLhZbI&4-4\u0013Z\t-+8\u0013ZVdq&LhYfBLh^\t-;K3i+Z\tMK-΄\u0016K3iдLhZjI&4-,\u0013ZR&`Y&`y&`LhJЂЂЂ2\u0005+eB\u000bgB\u000bdB\u000bVɄ\u0016\t-X\t-X\t-X%\u0013ZR&`y&`i&`LhLhLhJЂ2\u00053\u0005K3\u0005+eB\u000bVʄ\u0016,τ\u0016,̈́\u0016\t-X)\u0013Z<\u0013Z4\u0013ZJ&`LhLhLh\nЂЂЂ2\u0005+eB\u000bgB\u000bgB\u000bVʄ\u0016\t-X\t-X\t-veBeдВLhZdI&qkdV\u0012՟\u001c\t-X)\u0013Z<\u0013Z<\u0013ZJ&`y&`y&`LhzdB\"ř4\u0013Z<\u0013Z<\u0013լDQ}كLhv귿8\u0013ZR&`y&`y&rrְRRR]\tJo2\u0013Z<\u0013Z4\u0013ZD{Z\tT\u001dgФ7&+2i*U\t-JWɄ\u0016+dBU-̈́gBRK2i%дLhQJ&49[!\u0013Z\tMK-τ&ojLhZji&4$<\u0013Z\t-\u001e4\u0013ZvYfi&4-$\u0013΃K2it[3itK3<\u0013ZVji&|]2Z\t-{K3wLh_\t-?\u000b3-aa&I-ɄeЊ$\u0013ZkeB;LhEg.gBǂeqeI&|Z\t-\u001bfBˇe1xa&|$_\t-\u0012eBgejY&|[\tmd|I+ALh\u0016(\u0013Z\u0018\u0017gBZLhEJ)*J\u001e\u001bW>\u0013ZmUdB:LhZdI&\"oki&qu3-=Z2E\u000bz0܃Lh\u0012o\"eBfWʄf(\u0013ŋ3M\n\u001cLh}\u0004b\u000f9z\u0017>h+n}i\u001d`\u000bg[\u001eo\\\u0007*pW`_>]\u0007*@\u0005\u0000\u0015\u0002T\nP˶\u0002\tY\u001f{\u0005\u000e[߳:,\u001ea/]\u001dVEυlq/r\u0012TLSS+#\u0015o]WTeB{lJk.̄\u000f8UϲLh΍\u0013\u0000\u001cd\u0015:yjT{9urU(UtLs#3h\u0001𻋼J_[3y~_\u0017Jfy/TfkBHov佣\u001cPߚ\u0001Q\u000e\u001e\u00197o;忍\u0012K_/-,uR3KR[e~+Ww#yUUe\u001f?\u001fՙ-rk\u0013?(rkl~?|\th֛\u0014w6߿_/47ݿ'\f&?\u001f|i?O}=?:~5G\u0016_w\u000f\u0014ݰ~/?~3'\u001fřо?S\u000f?:\u001a2G~\btգf̒!?uvd4\u0014V2\u0010\u0006?믕ՙf\u001bGQ[\u0006Ƞ=?W\u0005T07oT0VVr3hL8\u001ft]2́\u0019`+t2\u0005w8S\u001f\u001fׇ\u0017i\u001cu\u0007VO\u0015n{REλ\u001f\u0014iRE>N&[N6yaMidNid>g&YβͤHs|4\u0017դHs&EqүђI7:ɮj6\"mv\u0014i}\u001fcr4Ѱ\"=\u0015UH_{SG)n?\"EdͶw0ݎlۚM6nqsD3)[\"M\u001b|e\u000bTgI6^PZ6qqk]e:E~ee4jR^H:lт[xL;w)R|4iSόO4cSDM)q\bqzoi\rv\u0019tΨ\r\u0019FlF5[\u0004+\u0017dT+8QR2ZM⚌jo~*Z\u0011g\u00148YZrj\u00173_,ZM\u001f2111\u001dj&\u000bM\u0016^jD9ն\u0006ahi7'Ro0MnjB\u000f]Tȩ=^|s}S\u001dyc,ZȚz@Q!\u0015Mz\u0016r\u0007\u000fGQ0gRba8UU\u0014'Q\u0014YB4z\u0014\u0019l&\u0012q{P֦5`vmK`A5We~Vp\"مVTm52fFtN<>\u0018%f*k\u0014z\u000fpa\u0014H,[uA袹e\u0005OJG;6;䲯2@q\u0010}\u001e>t(=4\u000bK\u0019YnTФI+\bha8ZiCEJώ\u0017ͭj3ٵ8UbQ:SOft>E+wWJ\u001ffC¼ī\u0004ćft/YXl\u000e;&bx(|wD()@X\u001f\u000e%b{pTTSP,*xzQR\u001d9JAdKL\u0015AFLW\u000fEA<P6\r4\u001fL׺XK*,^i3.)\u0007Ţ [4J[0\u000f\u000f\u000f\u000f\u000f\u0003[?Z5\u001fDn<%\u000f+F@d|%;?\b\u0014\f3\u0007 K\u001bQ\n7:q\u0019fRk7fFÖ́W\u0018Nx+m%[>JWf\t&N\u0000KǍ*lwG?[HxU2Ĝ\u001c.>Qq/06&\u00146Ҍf>\bhAJ1T;\u001fpmVJPf8'Gfd8fEN~t|;ÝnTlQ~S\u0019g;qڱQ\t:.:%SS\u001esj;|\n!+_Yy.(:*O~Ror3h:똠sw\u0017?\u001bt6Z+$яbg;3TRLQָпs\u0012\u0000\u0000\u0000\\v\u0013\u0000\u0000\u0000v\f\u0000\u0000\b\u0000\u0000\u0000Z\b\r\u0000\u0000m\b\u0000\u0000\u0000Z\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m\u0000\u0000\u0000چ\b\r\u0000\u0000m~4\u0015\u0001\u0000\u0000є\u000b\u0000\u0000\u0000ԏfwu\u0000\u0000\u0000.w?\u0002\u0000\u0000\u001cf\u0000\u0000\u0000h\u000e\u0018wC\u000e\u0003XСq9|Żj\u0000\u000b]u廯8CW\u001cY\u001bnz?\u0005nk׎\\uG[\u0013\u0000book\u001cΦ?\u001f\u000f\u0000o<xG>xN6\\{G\u001fz\u0001@{>zG\u001c[~\u0017_\u0000j}\u0017[RBW`\u001f|ok\u0000j7^|A{Uk?Kƛ\u0000j+/=׼??Wxm\u0000zկ=O?5\u0017^~ͷ\u001e~_\u0018kk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r\u0014\u0006h^\u00034E\u0001\u0000Mk5@S\u001a)z\r|?Wxm\u0000zկ=\u001fCϽo\t\u001bs\u000f^s\rg_+\u0006֫|g\u001f7\\n_|/\u0003^|oJ5\\{G\u001fz\u0001@{>zG\u000eIb\u000f~\u00077\u0003\u0000\u001b\u000f\u000f^vp5|q\u0002V7_\u0011\tt9vu7~\u0000\u000btu׮\u001dɦ\u001a6xW]\r`|\u0015Na\u0000K\u001d\u001a\u0019\u0000\u001c;v杽k?qt؉ц,ѵ{dm'vyfp̹ӝ\u000f2ӹalx^#E:y̶,;;s\u0016<mn\u000eVX\u0015nA6qtn{`;g\u001f\u001c?qҺz\u000f\u000f}N\u0003'\u001c2Lq@V\u00198p>H8J`*O}^y?:\u0016tN\f=?+Z\u000fEKcC: >raȄa\u0012Y&.4al#\u0006&+-9ӭ\u001a{Gל\u001d\u001bcG$Z1q\u00120I<Ѻ\tL\u0018\u0005Q\u0018a))u';7$:B\u001b\u0007O\u0013Y5&[&&X70\\7\t\"\u0017(Kw\t05M\u0013#9[:8ֵ6Y\u000f$q\u0010Y\u001bGEqg\u0013oMb$\bh%[7;e\t\u001f$L]ή[dh(71YC\u0017hEz|idC?A,Øp48N\u00038l(u^ڞT7.\b\u001d$R\u0011]IbM*KcK\bx`4ɮs^^0~\noQ$I*;i\u00128\u001ct\u001d\u001a9\nz$G&z\u0014\u000e\f4[\u001e\u00056\u001cĦEi946\tt 5r#\u0019F>M0[)iı0g\u0005\u001b$뉋HQ\nq{\u0017R/ǱX\u001c\u001aه>~\u0018JyH+\u001dHZDQui\u0018\u0006i:DAw\u001b]]/ُs-_6*\u001fl\u0017\u001fl|Ⱥ|\u0003\u0016V4|\\\u0016η|l\u001fL\u0006SG׶=pt-\u001cs3m>%#[Ý\u0006[:?\t6d\u000bx4vΟܜ\u001f\fe\u001c<G[<15$_>(I\u0006ұ10\u001d۸(Cfjp\u001aV\u001eƯ\\\u00005Z\u0005\rQJ.t\u001af0E\u001a\rTzT.|6{6\u000b\u001dd\u001dK\u0006׬:d\u0015/`*pAV/d\f\u0016NYΉ'ϟg$IFsƉƽ';O\r77~~F^b\u0004\u001f\u0002\u0010hOmO|\f4\bqC.OGKmY 3g\u001f.~}((T}mw\u000e:3\u0018;%\"\u0001\u00052$N\"ak>HM\t]P\u001a\u0013J\u0011\u0013gj\u0011ȱ\u0016\u001a~:O\r\u0000\u0000\u0000\u0000\u0000\u0000;~\u000f\u0000\u0000p9\"B\u0003\u0000\u0000h34\u0000\u0000\"N\u0003\u0000\u0000h'4\u0000\u0000\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000v\"N\u0003\u0000\u0000h'4\u0000\u0000vѬ\u000e\u0000\u0000\u0000ԏJF\u0000\u0000\u0000P8P\r\u0000\u0000`U\u0006iDk\u0000\u0000\u0000hq\u0006\u0000\u0000\u0000\u0000\u0000\u0000`\u0007\u0000\u001c:t\u0018R\u000eMWʫ\u0006UWãs#k^wM\u0007M7\\wڑ+s5|q\u0002V7_͑tv\u0007?r\u001b\u0001Z\u0007\u0007_'CG\u000f=sϿ\u0000=C\u001f#Y9|u/\u0001K/>ݷ^we\u0016\u001d\u0006/~W_\u0003PW\u000f\u001b7{x\u0013@7^\u001e7]]'\u001bo\r[o'f˯~+\u0007o\u000b\u0003\r\u0004\u0006h~\u00034G\u0001\u0000o7@s\u001b9\r\u001c\u0006ho?\rXf4\u0006\u001fo\u0015=\nf$\u0000\u0002\u0001V1φi*f󧑯\u0013XlNC\u0003+\u000f\u0011\u0000+>\u0002\u0000\u0000.c޼wwt'\u001d;q2ڐ%8?9v,ڸ;\fΟ9ya]f:7\u001cKvHޝ3\u000fٖ\u000fzgtnՂx\u0010ICoG\u0006aפ\u000f]aԿs\u0003g\u000669puN>{xx_sZ\u0007\u001e8yh64l& qҭ\nn?NA:Vy\u0019ѵsbxtI^׺\tbg8c84`=p&\r7\u0013^86N@N ˒DʦΘػX.\r@Z\u0013ۤbn?>v\u001e;\rS|js\u0014Y\u001f\u0012[G\u001e8v9#ym;ppngse\u0007;\u000fK{\u000f\u001d~'?Ş'g\u001e~|Q*1u̙󏌎zgl\u000f\u001fwMySO?.٦~ǹ.xva\u0017n?w8{n˟;6cnY|Dwt_o̓OLJNn/\u0015>}No|U\u0007\u0017\u000b\tAF\u001bWm}]N\u0019\u001d8n=p[\u0007GE}ZG^3O\r[N'FZO'zۛg;\u001e\u001b֬^\u001953Ѻn`c;!(yO(-{_0-\u0001\u0004\u001b2MFЇ㷼s.C5?\u001a\u0013mL6oZ\u0014eTn{r\u0001C'C'C'C%\u001c:OFΉ'ϟ!g?\u001fmpt\u0013Ý\u001b??|z#/DxݍFdv'7\u001f$C<Q\u001a>HN,B\teXA\u0014IXTD.\u0012\u0013:)\u0018\u001f\u00129H]\u0010X\u0013Gah4(7&m$Om,b?\b>Xaz7ӎuQ\u001eg?<2Oٟø9y\\&9./?Lw͝e>fV֏n=\f{y?6Afk}esGw֟u؆F\u001fN՚NXG2g_ZG<0]px?򚳥ql߄:udw\u0018?_O^yͣ9?U\u000f_}E^$?sǦ/q&\u0016qLLd\"g\u0003XK//QX%Y襤K%i\u001f4^a:8$үɅ;|jJ=\u001etqV\u001dy\u001fW>1t\u000eq6`me\u001al$n㓭>Bnl{\u0016Ѷe o3:%ŮSK4sRlG?OlYZ#~.n~&Iu\u0016\u001c--\u0006?mKiQhq]\b6k6q=yMeKka\u001dSf7sCdvv;7\u0002?\u001bJ/%㑷ԉ\u0016/Ulx,\u0018\u0017턩:]vEb[]\u0014/\u0016\"\u0017%VO\u0013'd]^J\u0012\u001b;4t6/%\u001d[.\u0019`luIq1[L\u0005ڥPN{Ɨ+\u0019\u0005q\u0018DgSlΏf/^%N\r\u001f\u001e_0Q\u001cĩ\u000f,-\u001eL_\u0012)Mo\u0006fw\u0017ln\\ѺT\r_;\u0014i\u0006{ao՚j1M&0\u001ay݊\u0010lg8|`{Y쑓ۛ_\u0005\u0006MyzD\u0016\u001f֋!gzO\u0014癲;MӺ}r<'lFۗ\u0001;A\u0003iC VVg@:i,\u001aI\u001f=Z\u001aM9<80\r]*Ѯ-S@\u001c8+g:~C@?;]4)~*\\nzg2'd\u0012姪bzٺ7k[\\&W76C%\f7ah|4\u001f9r\u001f,\u0010gE\u000bb\u001dYE\u001e>D\u0013VJev\u0017j% \nڳ[\u001f\u000e6~u[V7I0I[\".\u0014-\nM\u000bd[Yҙ8֭WB%^U\tzSܐ$Ҿ\u001cO]\t-K©'͋K˖Z>\nSЋЋ^޼cC/^xTUvᡗ\u000bBB\u001bz-f3n{\u000e\u0016]\u0006+\u00041Q7]?6fk5L\u0006]\u0017\f+{i\u0006~Pw+Jv\u0017{iД8mʁD)8\f%\u0018s>rL\u001elL$LAC:\u000b\u000f+-\u0019<*\"*n9\u0016\u0016ց\u000b\tޱV\u0018~VE\b\"Kuq[t\u001a\u0004[w۩\rEWpʡV'fIe/A$?qQw0\b]׹Agfw\f\u000606^0j~KA~n\u0010&MB\u001dԴʏ(n(\u0007?r6N\u0005<\u001dO㾴׍\\N\"D\u000b$[2BحDo)\u0010O\u001dlR>łc+=\u001f]woۨcA1&H܇-\u0013kg[fm^*d8*^ȖVje\u0013cwm\u00159\u001e6YmD \n#\u0013yݞw2LR\u0014%\u0007D\u0003H(,K8/q\u0001Mj\\ǿ\fF5GCL1{ʞ,꤯K\u001ff߲*K\u0011q2~O_R\u000e0Zf$Htl-{6u\u0005A8^cyGi\u0005vvOoU\u001e|q6V1v\\My\u001ci\u001dl\rٟGe\u0003Q,77\u001fˊ3Ƭl<iW;laSd$N6u\u0019QJRX^6\u000b\u0003)'it\u0015mݚuu؛8ZHHRl*MC\u0013\u0004fwk\n8\u000ejQ 6A\u001ce9+bSıo}8߯qvТDI'cI7==j0w3c%goÏ;\u0003U<WA\r?+*:`Tޗ\u000f7*\u0015\u0004>I.|Վ\nR9(2\u0000\u0006U[\" M|\u0018\u001c7Q\u0018H;nq^&Jb\u0019ml6vT{\u001b5I\u001b\u001c\rzܝhd\f<]0*4sBe_zP\u0007\u001aAwS}Je/-^_/%K\u0015V0{iE`ƩB!ܩ\u0013\u000fk#n[ecw/g7\u001f\rXsUWf\u000e\u0019\u0013b+;yOB\u0004JKl$1D-\tK*\u001bLU=;L$SLG&K0{\u001e)\u000b>_S\u0006tY\u001eM=0Ri}V3\u000bϧF?}.+2{p-]}$7b\u001e\u0017󸘷b\u0004c?;ܹg`eg{8C\u001f㴜iB\"S^\u001cr\u0016)qH\u0012ØD*\u0013+RYoƺ˄:އsgН]l*#6I'u>zyRNIc\r%\u0012\u00052H&qn4\b\u000eI\u0002H%ӓ\u0004\u0012M/\u001d}ԲOʓ]͚ߑ'=z[Np#H4[\u0003˔\u0016\u0006aSG˟?N\u0005q1cqz{iX\u0003I9KO0hG|ɟyĜNp\u0013^\t\u000fVKܾBzq\u0019q -\u0017~Z\u001e\u0003/p+vEȮ\u001fl\rIE]zI-\u0015U%nq쓖Z>l~=u[\u0014-'\u0012Ң`-M\u001a[\u0013~\u0016V枍\u0005n\bf¥\u0000ɦq]T\u000e\u0001RR)@\u0017\u0002|qU2\u001f K\u0005H\u000f\u001f  n\u001d`I\u0005a\u000eM\u001fixϬ.\u001fyG,r+#\"]^\u0019\u0011M\u0018X\u000f\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011Q#eQ߅ED\u001d8xv++& \u0018Z9\u0018\u0000j\u000eW\\e0/._-ruPJjk\u001e\f-;l\u0017Pm-\u0007 ٔ8n\r.\u001a&Vҍf\u001c˼v\u0013\f-(W\\ul43<;b#b#b#bFI3\u0005EoAFr\u0004nyK\u0011\u001a12^\u0010\u001aO\u0002[xoMwF6]vUt\u0017\u0006p(69MM<5D5L5|//+OVJgf˒t5<\u000f[nڮ맛]g&Qv\u0013c\"7\u0018\u0006&\u0003Ha8)xj]tq\u001fwvQ}\u0016Al\u00050\u000e~_N\u0003Qr\nmкx\u0017o\u0006ʸv'Ɨ6?\fWz\u0014MnrmqO[d/|ar\u0007-$\t*\u0013\u0012\u0012.}3wק\u001a\u000f\u0017}dN\\Wg3ߙuw;s]坹n\u0017w.Z8x5%\bj#V* l0:nu{nwӭ^\u001dnϘ&h,lil㜩\u0017cSS?5J668%h[0/z$TqTqTqTqTqTqTqTqmY\u0006D\"ᢏB\"^\u001f̲ws\u001b%\u0016\\iE=c|7\u001cڮ󮧹|7D\u0011[?^\f4N\"S'A_\tY\tY\tY\u0017\u0011!a]\u0015ĬbV[\u001f\u0019ٚGF:2Ցleddw\u0011\u0019-O<2*gȨ7\u0019^`6\u001c3f텽؆Q'{e7.if\u001fp\u0007܃8~I%>\u0016D#£w]ܶ>^h\u0017}\u0016\t\u0005\u0017J_챛2ٕ>!ZyI\u00161}(ɧQ:\u0017d?695\u00174w\u001b\u001f\u0012tepHDR\\D\u001f\"ԇ&Xd9#ے )+e4LWbז\fO[\r7\u000e\\X-ͪn\u001e\u0013\u0002aV($Q\u0018To(tfI\u0018\u001c<\u001dET%NS']裊\u0012>Z7\u0004+޴n(׍-w8_j~~8ˉY^,/o^\u0016>׳+KW\u0017,:vy-\u001f<QWQ\"⥦--5b%\r8G\u001f踟eoot>7W^ojGF\f\u0014\nѵI9}\u001c^\u001a\u001eb[<RG\\(D^\u0002Ũɉt\nl\u0016'ob\u00155޾YF>\u0019yK\u0010<{\t%N\u001c0p\\\u0014y9UJ0{^'sS/SA\u00188i%EaLF=]\u0019\u001ets\u00145S@z\u0014\u0005\u001f}CVNᤵKcuM\u0010Yjrɚ4zNR_.f]O\u0002ve&r\u001cMjzX$'aDQd5i裯r)+gE\u001fI\u0015[\nm.G\"RF\u001aRd0\u0012GI\u0018ɸQH\u0012%Ȼ7\u001ePN+\nͬǦ\u0018Wf\u000b/\"4O\f{[7;q6\u000fم\u000f/\u0007Y2~馑)b\u0010ET1o\u000b\u001d5.ohǬG\u001dhK'\u001dⅳ킢?̢\u00076**V,RRij\u0017fѕJIkT4T}5{\u0012\u001cpwfQ?\u000eY_\u001b\u000f\u001f>1\nlm<5yB\u000f3GnΞ~Bh\u0006Cq9Y\u0013N}í|q#㨁s;ݓӟ_.H\u001b>qpgw~8\u0007_Rg?\n9FI).YZk,ߺ~Ť\u001f}.s\u001a\fJ>a8\u001bIݡ2&\u0000/e@D[\tfV$.J?Рn\u0013k&XCbsTUf ww,t\\cF4:ULZ4;~ti\u001e\u0004F>\u0002͟ 'GOMJ_X!u㶐E,%vVgv\\wA(KB/e\t'i.2Uwoe%sʎ%\fwYk\\\u0010.\u00027m<۬dJ\u001cECY#\u001bV|\b\u0003އ-\u0003i\u001d\"\rSoCxW/qFa,btd9+&!?h~?M(Lp\u001cΒsDpj?ΒM(ŋ'WEWr&&\u001e7jHl,g\u0001žЦ\u001f'ϲ\u0006^;O^@QsO<Q|ӕ+&)\u001cpkw\u0015XIR:\u0004ʵW]߅H{_\u00028Y\u0002|\fEK]N\u00123kiIܲ7\u0005\u0015_ʰ\u001b\nq\f0y9\u001dMVO\u0015{aoGu;g6Gbnk{s>ܜ̻uoG˲'TٯC_+fSy\u0013E}<wLй\r:G\u001aߧ\u0005fvBv\u0005\rgc\u001b9Լ\u001b^ژ>o1K(/m\\\u0006s.[4O\u0005]vPfc\u001bdY흴p\u001fM$f<\u0006i\u001bkQ\u001cP>*S_ߺΩs\u0003پlsn3y\u0017![3nM;].ý\u0010\u001dq!\u001b\u0011l\u0010\u001c\rZ\"\u0001D\u001dUG\u0015$N4\u0012l2\u0007뉯X.LlG>\u000f:W\\^S\u00141/${=XS\u0006+^`y+<\\\u000e\u0001Do\u001fQ<E-aj&ġ\u0006#i~zhʿW\u001c\u000bV\u000bᾟ\u001f\u0017\u0014\\WҖ^F\\Qt?|\u0019C+9cSֽ5[ɞ\u001d|hq[?hӘEC>kLrl%s\u001eq:\u0019E\u001b{:tf֞\u000e5ˎg.Eɰc}^&Aי4]\u0006qoSۊ\u0012{o\"9QӄMWry,܈48{z\u0016\u000blff5ۉӎD\u0003\u0013S2\u001ds\u000fwΟ\u0019>qKvvVy\nodϪ?O\u0016?R:nYXy%ћ9 \b\\\u0018IaXD#d恣@+\u000f/QEv&Bg\u0013\u001b=q&2ȴ}U&u2\u0017H\nyl5\u001b%ՄFz~{i5aeƻ(( oH\u001fMF.a\u0010FavdD3d;q%$0|.J\u001cH\u0010*V\u0013ym\u0003#,۫ڐ{acW\b\u001dU\\nrc]uI$#-$z|\toד0үjЖ+Jv\u0004\u0012\u0018y\u000fuU\u000eS\u0001a$GW&J7$Ɵ%įG\u0012;_PJ\u0014,-1ʫ%g\u000fz3^&A{NM.i_7ZYEQ~g+L'-Ky\u000bMڃ&0\\BI\u0014\u0012HJ)G%R0(,Ĩ}fbfR\tyY7c8(=M^\u001d7%V>N:R\\\u0015z\u001bA\u000e{>\u001dJ/󚲥hpqzSP\u001cO\u0011Z}b5C]1,\u0017m\b\u001aSUo\u0012f].Q;JJTbF\u0012U\\h~(\u001fz%G\r͏\u000b֛{8\u0002N_~<\u00065xj^\u001a\u0015%+v|\u001bw;P\u001fʵ\\Lb0te\u001dy#̺zR\u0012\u001bY\u001fZ~1j;u[/Ca3OmJ\u000b\u000b\fm\u001e6H\u0003ZȀN\u00164{/`A&*Fr~쌼szOד^9Cb\u001f?v۝ç\f}{xvPA\"vdF'vTe%P8+*q\u0016:\u001c*\u000e>\t\u001e];}rG-\u000fV\u0007(\u001b݆nBh\u0017kCK7wq7xs{K]\r7w u749Ŷ\u0016j\u000e8\u0018mrC{\u0005\u001b[շrņn\u00027q5E\u000e\u001d.\u001c:TSw\u001dUW\u001ey\u0015\u0015\u000e]qdƛn}];r\\Cu\u001f2N\u001c\u000f?v\u000e\u001f)\\w{NR{~|{=UH\\s-?鳟\u0017_O-7^3UH>_~_<\u001f$Fy{n|/_w^{;~叿g\u001f=ٽ=:T▏=O\u000f/|{o|/\u000f>[~\u001d:c7泿\u001f_\u000f߼\u001f͟ǎdeX|W\u0001_/͍kWdyOg3.\u0015?g'߫5:t}\u001f_\u0016_W>ާ\u001b;|\u0017O\u000f\u000f\u0017O믔\u001b_~\u001f6\u001f/E7^e)}k۳ew^|Y'\u0017^~2o\u000bYa[y>\\XrLWj\u001bUJm~J\u001f\\/4&6ŖQ\u000b\u001c;v^S<v\u0013}F9<gD)/\"vΙl\u0007G6Ƿ0N]ߏ빭nnuÁp\u0010l%5L||TP|pǉeWGJ\u0003o`\u0018wm\u000e.6Q7\u0019nlӡKq7u\u0016|=1U?ܻ?OXL]\u0013;4\u0012\t\f[F\u0018\u0004\u000f|7\u000f4\t]\u001d\u0010Gq곅wT\u0018},BN(\u001aU%OKn7\u001e̿\u0011-\\zmTUnz\u0016OQ`8\u001d\u001b>0E>HEޭ.n\u0000K\u001cƚ;/-\r؆DA(ѽ li]*\u001e؟\u001b4M'zEjzi9yF\u001ccj!.wI\u001c\u0006\u000bәBi;Z\"\u0013ǡsY\tmDYF3%|\u001fDnQ\u001ayӜ\u0014&қ2т쟼6~\u0010B`\u000bţ\u001bl!o-$-+PI+Q2]\"\r\u0012}.\u001dDW׸T(\u0019[L\nYͱg]\u001a5ŻLU9Y 2%ڛ:lu%rB\u001b\u001d͹BzʡU54wdjy\u001d3(\"MI%L7(}X\\4jN\u001bMņe'[,.**P.1V\u0006\nU\u0014\u001f\u00154L\u0019MWq\rL!M.uZO\u001b@9q G6)\u0011dlZd/3nv>0)-N^\u00024YTeexs]Ih]&o\u001akgJH\fw^U\u0014qS}CvP,\u0010Q M.0ٛZ:-z|\u000e\u0017(X#-1\u000bLTN\u000fdP\u0016D>6汴U&\u0013.$#P꡵UΧn)C'P[XXhn\u000b\u001euǛꂵWv\u001f.f&!\u0006mCtM%\u0013K\u000e$qj\u0003؃\"\u0013u>\u001129\u0010!45\u0010\u000e.U;^\tH7M\"\u001as\u001d\tUm6뺦<ZܜjK<\u000eJ\u0001\u0016[!Db{\u0014Z\u001ak\u0015\u0002IE[Z!X-vI=Y\u0011V\u0016+.4hma2p׿4tb˃|h߃]7<)uiCX_W\tg]@~o8s;˾Y8EOD'vvzgOvN<y\\'{$\u0013Í\u0013'Ӎ{O\fw\u001ann鍼\u0013\u001brWxB\u0011]u\u0017f{9}dݺ\u0002{Q\nJ\ry.\u0007~.\u0005=Z5\u000e6Z5\u000e6\u001a6\u000e0\u001a6\u000e06\u000e*\u001a6\u000e06\u000e*\u001a6\u000e06\u000e*6\u000e*6\u000e*6\u000e*6\u000e*6\u000e*6\u000e*6\u000e*6\u000e*6\u000e*>vǁĽR8\u0015\u0007\u0012&*m7\u000eʆM;݂M\u000b;*\u0016w\u001a8\u0000ɷr\u001dL\u001a;txme\u0007~\u0007;\u001f\t\u0016\u001bǯ]s߁\u000f\u001c\u0001\u0015ێ}S\rxO''?^p {o|ۡ~gw=/p@}_\u000fu[ \u000f=73_yk/\u001fP_{w~\u000bg>q\rŷc\u001e}?}י/~\u000f/\u0001?\u0017B|\u0007҇?7\u000f|\u0003_?owo}`w\u001fӟ<\u0017_?yPo;F_`>_}\u0000eg/d>h`K_\u001e}мk_˰\u000f/e8n_\u0018]ey^u9?_I.au9eر7KꎮDydy}q\u001d)ҹwgeam~\u0007Q\u0012\u000f⭴\u001blu=vu$\u00037\u001cIпs\u0003g\u00066\r\u001e?qҺz\u000f\u000f}N{\u0003m'wqz\u000f\n7\u0013O6{iAء-\u0019AEqoѶN}^y7\u0012t_D8wi8č\b=YH\u0000C1)h@\u0012\u0010\u0007$\u001e\u001aMQlM\u0001\u0015\u001f5it\u001a\rRim\u000f{Yy\u0000;.vlw\u000fƋě\f\u0000<xԍƋ{DdV>UG\t\u0019\u0011\u0019\u000f\u000f\u000fw?f\u0004~BH\u0010>\u0012⿷ᖩ>\u00014u̴.]0ʈrVh!>n%[J)g2,SM*ͷ\u0017甐2r\r>]Iެ<$\u001do+\u0013Zt׋U\t@\u0007V\t1P\u001fS1ɹAjw\"2B ;nr4H*-\u0002Z1e\u0013|\bM\fStivB\u00188\u0017y%\u0018\u0004JZBqN\u0010\bW84\u0004\u00046\"WfI.A\u000bAв\u0018(\n\u0001'\u000e\u00170pJp邵T\u0013C޹f]0B\t**M+qvj\u0019k97\u0013m\rѶjTG(K\u00198\u001cstENV\r׬KЈR\u0006S\u0012l\u0018\u0004LqJf>\u0012\\.\u0018xԋe\u0011xs'%cK׮-\fwoNlivZ>D\u0014QjWZz2OR\u0019!ȕ\u000eE+[=O-^\u0010CmT2Z?h0VB\u0003s3\u0012!N%6ӎϽrKˌ^3ӐWCT_\\\u0019kLأGjX.\b\u0019GlK\t{3N0{1cP/=\u001aq|pOf,\u0001ׁz\r:'ty/F7(=\u0019v|pO,\u0006ɼʫ7(\u001b\u0005>%\u0014kWBvqk=zu\u0001\u0004Hep#\u0004\u001bl~#dk\u000e0f\u001cyY3Z\u001bm\u0007\u000b;wf`]{ݍ\u0011d`~*˟usv>ͭl\u001e湈+67[\\\u001ckw}C>ׂv)Iu\u000fF:Z{g0\u000f۝Z᥍ttc֒\u0000\u0006>%\u0014\u0011Hh\f;8\u001ad\\aQGbԗZ^{/{\u0014s1JoɫTBWҍzUGy\u0007\u0010]\u0012\"D)cZka\u000f;\u0005\u0017ù\u001c\u0011aZiQ\u001b\u001a3\u001f_%\u001dGpl\\()Ʈ.T\b\u0006\n,.9\\ -\u0010;dF\u0015%\nQ-\u0006AsI\u0018\r\nendstream\rendobj\r28 0 obj\r<</Length 65536>>stream\r\np\n\u0006\u0014х\r\n'%y,\u0016<-d@7\n`GUPbIc₯\u001b\u0010%Ф<>Ɲ\u001bR!\u001a\u000b\bbiʼ5XK:\f=\u000f:I#ab\u001c\u001dxq/r/R\u0012UD\u0014=j+)JCJŔ-\u0005J j\r~:tYl)(g:#/ܚ\u0010lF?,\u0013S&܍͍REM7\u001c\u000b[[i~´,Lڽl|L\u000bAdW^\u001bɶF+}Kݙi\u001eo󓣅hey͍lc{t#[hҒ^om/:ΉH\u001c\nTF~y+\u0018m\u0016\u00061~\t\u0014\u0014Hms\"\t\f9>&c-\u0013\u0004\n\r`p\nt\t\u0012S|zUi{B[\u0003\u0001W\u0012T\n\\g\u0007\u001c/\u001bO\u0012W$6q>#\bk\u0012Fa\u0012<\u000e~\u0001R~){omŵs\u001c>ƀ0\u0007\u0006O\u0011،[l\u0002x\u001f\n?&PjWXP\u0004q\u0001G|\u00152ds7\u000e\u00058\u001cG\u0011'\u0001Q\"\u001e\rE<\u0002D\u001d5E<\u0002D\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5E\u001au눙\"~g$bֈ_)܁WI@vED\b\u0007}1x'<%zM\u0013Μ=lg=ܩ'<g]1%\u000fҊ]pSWs[+ǔi=n\tǗ{oM7{ox={\u000f>a\r{/[\u001f>g\u001f\u0016g[|UogI\n/'\u001fJ|c^/?g93c˭W_|0!h\"h>_N?I\tO$+O~DÜ\u0013unyb0{݁D\u000e2\u00134\u001bR72%\u000eRٵ\u001916Þ\u001er\u00136\u0013=+Ggh0+b\u0000xv\u0004Չ2,pZWJ\bwL.CXԆWTXootk#ʑ;խ\u0015\u001a\u001en\b|\u0012U\u0014Z*S=A1\njnawXȡszy8]4%%g\f4At\u001c&Ja(\tX)Zs!fN\u000e$S鞥 4TT.lK>1H\u0013-]mV\n\n\u001aQ҇\n׮K^Y\fBj\u001bzA\r]\n)AzE\u0011\u0012U\\::\u0014tлj%A9eJ3jV\u0013\\:RW\nǿ8\u0016Eqw\u0007\\q'$Qv\u0015yv\u000bEf\u000eb:zDP;)UHs'\u00149\u0007#\u0005%AMJ\u0010\tur\u0003\u0012\u001d\u000eH|\fy\u001e<oap?Hi\"#i\u001bה\u0015*Œf%6,:6n8<O\u001b8\u000eߩ\r^qɿ?\u001a\u0007\u001f~/\u000f̘9=9k»X}$SCU{;F`\u0012-\bX~H6O\u0018\tR9\u0000S/l0it\u0014a7\u0015YtLT\u00114`>GJ\u000b\u001e4is0緰\u0004Rbq)-ya\u00102<\t¸o\tkw\u0010.#}\\9]J\u001bl$<!\u001b?FGF\u0015v.[FQK%q&ƉZ!{<JƉUrYø\u00066APUQ`.3\u0005]\u0016#,Hy\u0000%0\u0004.M!P#S(>]-\u0015y0aRR\u000bPKPLI-\u00057o1hj!E5HQ\u0015N{\f&.W;FT\u0002_hM?>}a\u0012\u0002;q\u0015J*\u0015Dq \u001bn\u0013q\u0013\u00076\u0006F\u0006\u0013m\\\n&YZ\n^cE뗂\u0015KI0B\u001b5R3C`\u00050KH4\u001aVN\r\u000f+y`\u0006/\u0019{l_~@Q\bT\u0006\u000b4В+i\r.\u001ar\u0016\u0011M\n--@\tc`)\u0004\u001dm(\u0004DJ\u0004ɵ:Z\u0010pRb\u0015_\u0011\u00172^\u00032\u000fde\u001e \u000f\f\"Y\u001a2øaIRHH%,urCѰ\u0017aJ0\u001cL9\u0012Vۉ\b\u0003KA>DPF%,xս\u0017\u0011|{\u0011T^$_,!~e\\l}r`V%%\u001aNP|!Ý\u0006cQ\u0011TW0\u0011'U W3GV؊r\u0019.\u0007WYr\rk*\\mّ\u001a\u0007Zx# \u00118\u0014(Q%upW}p7B\u001d/^/kg5V\u001bY/֤Re\u0006PΕUyלy}*k\u0001)B\u0004wx\u0004|\u0015\u000b;}a˱/%Nz\u001bw\u00194\u001fHt+01脬v\u0016x'(\u00017F1~\u001f\u0017\\\u001c\u0014Bifr]HC\tQ\u0013V\u001c,\u000b$Ā<Y\b!\u001f\nS*\u0018^4\u0001Sp>UkQm\u0013:\u0015bRt\u001aφ(\u001bNm>\u001a1\u0010$,uh\u0010idS\u0003\u0003\fr\n\u0001\u000b\u0001s.`\u001c֐n\u000b]x<\u0019B\u0013\u000eb%_HwN޾\u000e쵳!8N8wҘnG\u001b~l\u0006;\u0019N\u0015g\u0018xO@g7B̩X5D\u0011ߡS]H\u001eqpo\u001fE\u0004Dx4\n\u0016\b\u0010u,bֈ\n\u0016\b\u0010u,bֈ:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161k׭#fY#~-bs\u0007\u000e_\u0011'\u0001]\u0015\u00111#\u001c\u001f8N\u000e\t:Ic'\n$Q$ēDiyFO\u0012\u0005쉢=Yq,G\u0003q,G\u0013q,G\u0013h\"R\u001fMDH~D\u0011ߏ,\"\u001e\t\u001bQJC{¬\u000e{\u0018JWy6HՁQjj)ՑЖR=á-ARm\u0018\u001f']\u0013N3<&]\u00131~4'v7j\":P@fo>s+S\u001d{<a~aB(P[1\u001d\u0019PP\u001a\r0JpL\u000e%,X\u0012\u001dӑQO\u00149{\u0013-]mV\n\n\u001aQ҇:&~6wLG>wlA\u001e.t%B\u000eJ\u0004(zGh+;#{IR(r \u001dP/E\u0011#oG\u001d'\u0011~BHK%\u0014Spa\fr\tJDS\u0002\u0014\"\u0001\u0011;z\u001do9ΫxG\u0003>QS8\u000exǛv\u0013pc\u0005;vj}|æp\u001dyx\u0006?\u001ah/J'߱sה*\u0015,ucd>w,)sn>wM$>w̞ٞ_5܋\u0012e\nF\u0015J\u001a|4뢨rXm\nne\na\r\u000bWe\u00059\u001a| ל\u001ds旡@\u001d#6>wLo\u0010u;MsY|\u0002;Jy2i|Xh2;H´\fx9`-ԩd[;ZmFh\u0014W\r,:{yܛ3\\u\u0011\u0014gqC{E\u0006J~^2fyyP4l;T .\u0002_cDA܎7\u0005Y-r]Ղ\u000bڹ;:\u00041i%huG\u0004M\u000eKd\u0012A;fw\u0013kb&\u0010cDv,AЎY_\u000b4\tC(^s6-=9j&,KA^&A{c*k\u001e\u0014>]\u001d\rv\u0010VNЮ,\u001b19A{,\u0013kbsvl#hLЎ%\u0010c\u0004n\u000e;\t1\u001de\u0012A;O&h30í\u0004!\u001c\u001aV\\KSu`Z\bڛ9Ć(\u001b^m>\u001aι1\r\u0010\u0014gqCpn\u0014z\u0004L+ӊKAm`ngA\u001e\u0006V\u0005>c\\ݹP0ع\u00119fb/rv\u00183;wn{b\\G=Ϋ+:\u0005Q'C5R\u0010&2+Gڞ\u0006,\u0019cã.\u0014\u001euW G\u001c/\u001c<\u0011'\u0001Q\"\u001e\rE<\u0002D\u001d5E<\u0002D\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5E\u001au눙\"~g$bֈ_)܁WI@vED\b\u0007GtxN\u0012\tU;I|w'$C(ΓħzxnO\u0016p\u001c@\u001cD\u001cDQ?<G\u0013Gh\"\u001fQD\u001e#ȣ\u0007\u001e\u000e\u0018!'@\u0006(!UR,CrP<Ꙡ\u001a&z\u0006j\t:R=fǤ\u001dh*`$32\u0002/:m<ꌗxyJnd\u001eur\u001euw3C\u0006K\r赊TQQ^yk\u001dVHΣHG3\u001d\u0002:W<<P4<0Jp£h\u0005\u001dK3YgD^:f\\\u001aQ҇\u0006:\u0005:<\\{thɣE/4\u001euF\u001cE\u0018iQgS+QQwY)I>ű(\"zՍVHC,\u0005Ppz!\b\u0018k9xe\u0002Q\u00170B3ZQgG漪<`<\\xԃ\u0003^r`c\u001euQ9*:\u0017%\u001euԘGf%G\u001eyԣ\u0006?\u001ac̣\fw<xԙmQw5VHQ)<Pb\u0002:'\u0013x!s\u0002:\u0013y!{\u0012:d\u0007NUw£0kҼQ/\u000fG&\u001a5mM5jۖi▧Ƣg\u001cY*bYA\b:\\<\u0014T2\u0014sΣ\u000eM~V\t<\t]<0kxq'񨃔<LQBSxԙM´\u0016D̶3£h\u001amlcuن*%Y7xKsʣޘ\u0006.\u000f\f9\u0015OBF5KDt\\D*.\u00194\u0000!B<\u000bBkḅ\u000e7cYK<y.x%;<ꌷn\u001euȝD\u001euȞ$\u001euȝ̣\u000e\u0005x!+𨻫bv\u001eu_0t'zKJOQI$\u0012mgG>5\nﮎ\b:\u0005:\u0013scQ\u0015\u001euf\n\u001eufyԙiQ£T\u001eu(2G\u001d簛G\u001dr;ya^&C\u0014\u001eu\u0019nQ5ШZJj\u0006ƣސD!E-timt䊳8֡;7f5\u001aXG< pza(7\b-<H)?\u001eu<\u000bscģƹMsQ=*ʣNf:}ZYҞH\u0007'T{L^6\u0018UEZ]ǆG])<@Q8^8Wy\"N\u0002vE<\u001aD\u0005x\u0004:\u00161kD\u0005x\u0004:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5\u00113EHĬ\u0011\u00161S\u0003ݯ.튈\u0011\u000e[\u000f\u001c'\u0004D$\u0013īvN\u0012\u000fI<Q'ODܞ,888ȣ~4\u0011yԏ&\"DQ?<G\u0016G}\u000f<|uT8\u001e\u001f\u0019\u0013H\u000ez21\u0018X.As\na2\u001b\u000e\u0005鉑\u0010tԄJ\u0006'G\u000e\u001eu\u0011x\u0005iQ\u0017ģ.sVjw#&K󨻫\u00194x]jEU\u0012:j̣^x<ܖxy;!KΣ.g[G\u0010FI\u0014N\u0010Sx\u0005\u0010 <xz>\u0015<NtY,4\u000f\r\u001eu\n\u001euy]5QQd\u001a:$׎ym;:2^Od\u0005\u0005zJ~cQD\u001eH\u001biu#mQai4RB\u001c2(\u0004o\u0016_Zbf<ꂔx\u0005Q9*:1%\u001eu)\u001cؘG\u001dn:xkNʣ.yG\u001d:5QwYqɑG\u001eh\u0006\u0018ͣ.L;K1BZ\u0017:dMQ\u0012\u0013xԅ\u000e\u0013x%ȣ.D\u001eu\u000eG=/QajZy-wɣ^\u001eN\u000bzM\u00145jښ\u0018kԶ-P-OaE8TŲ\u001c\u0011\u001eu\n\u001eua\u000bp\u0019\ny%oQG]I<\t]<0kxq'񨃔<LQBSxԅI´\u0016D´\u000b£h\u001amlcuن*%Y7xKsʣޘ\u0006î\f\f9\u0015OBF5K`\u000eXP\u001c\rL+z2Pɣ\u000e\u000bạ\u000e7cYJ<ynfm}&`<.(0G\u001dr'\u000b9G\u001d'\u000b5G\u001dr'C.\u001eu\n<XG\u00179\fɣҳRxkR9I9G<\u001b-<ytQ|wuDxԅ*x\u0005\u001f;7U\n\u0005<'4\u001eu(1G\u001dLQ9QN\u001eu&C\u0014\u001eu\u0019nQ5ШZJj\u0006ƣސD!E-timt䊳8֡;7\u0002\u000bBj\u00160\u0010,87P4Aaq0Ә呻0Urnx8]lƣ>B~\u000f<;m\u001f\u0016\u001e$u8)1\u0014ar8iR\u0017\u0005\u001cu/\u0014:InD\u000e%\u000e=ㄸ\"\"\u000e\u0016q)ED\u001c j8(ĥ\u0014\u0011q)\"\u0010WSDA!B\\M\u0011\u0011\u0007\"\"\u000e\nq5ED\u001c\u0014j8(\u0014\u0011qP)\"\u0010WSDA!B\\M\u0011\u0011\u0007\"\"\u000e\nq5ED\u001c\u0014j8(\u0014\u0011qP)\"\u0010WSDA!Bi\u0003A͢BI\u0003;p8NZG\u0011\u0011\u0011a/#\u001e{<c\u0015ry':t駞|q/Ǟ85wg\u0000<{왹SO8<~s\u0017.3Mъ]pS;;Ϯ2\u0018F\f\u0007+o]Pi\u001e;uo\u001fG||\u000f3@2?u{\u001f|O#>'\u000f߻~S\u001e?}\u0017\u0011_|\u001f|\u0016;\u001a%>_~\u0015՗쓏V>$\u0019_눯翽?0\u0019~\u0017_}}\u001bӏQ2MDt!J\u000bQ2]BL\u0017dPLrT#;\u0018;;\u0012*;x\nQB\u0014\"\\Q>eO;\ty\u0019\u0013J\u0005OU'q\u0015>06\u0015\u0017/|cR|e~\\\u001blk~UHZp{ms# i4r#KדKd\u0002E׶nm@t={!\u0005/ZU\u001eQT\u00043g\u00195JUBr͍({}{kmVriadvz+{ͥB$\\Z\\Xz#\u0007\u0016mI6z$Io8 RZz\u001a\u000eR̤\u0016}'m6Sg~$\u000b9w?4!\u001f)\u0016&DKܞ\u0013\t\u0002\fVt0YOW\u0000t{\u001e?ׇ'\u001e<|n\u001f?\u0017\\{B\u0010 ݂\u0004/7%^[\u001bf\u0004J.YK/`K\u0005R\u0012Y\u0004HYRS);h'\u0019}e\u0010*bh\u0002-)э\fTZD+Sn\\:^6?M.n_W\tɕW7odͭQ6:?-\u0006 ]z\u0015Ӎ[ի\u000b'\u001b\u0018^{W[lRLY'~#Ҏg~6~'_K\u001bkZ=tc\b2H\\vFǇm\\&ɕk-o\u000e;/L\u001e?\u001bhqi\u001e,jZOwV~d'\u0004]uڗPDtv5\u0000gV(h\u0018g\u0013\u000b_^{/{\u0014t+}'m>}%\u0018g[z~ +y]׮-\fwoNWn^_\u0006w\f+Y:Z1j\bրMdK\u0018uHe5R-Z\u000bOS\u0002ưŵ\u0007\u001fŕ.g~q˝xV[wN^ƎlwkB:G\u001c\u000b[[i0<`bۛ\u0017Ə-6\u0007]ymp'z/\u001bC/u)\u0016\u001c?\u000b\u001b\u001b\t\u0018QM\u0015(K~=9yy+\u0018mc\u0016D1~\tX\u0007E\u0012\u000e>l-\u0013\u0000uqj\u0015iW/j*c{\u0002\tErڳ)\u0019\u001dɔd^\u0015:aZg޵tAT-\u001f^5Pp}-|~\u0012\u0000@_X_[\u001bf7~q-?\u0017FI\rO~bs;xMq\u0013]Q\u0001A\u0001E\u0001\u001cՄs%n.\u001d'\u0002'53@L+a\u0013|j\u0013|r\u00133*jX7cǷY۟\u0013P\u00016Z#@PZ~a{he5ﰡ}V{,lc\u001e\u00132g-e\\\u0013\u001eL-\u001brO:\u0013O!\u001brOw<N~ԓPTezgyf駪\u0005\\g7ogN\u001d\tx\u001cj̷gN?\u0002z7Ϟw;s,9sow?p\u0007ݿ={晧O}#:cO|㩹$?|G?zw\u001bO8\u0017~\u001fߜy\u0003.oNr~9t):\u000b?I+/{\u0003{+\u000b__%==\u000fqʕO~t{+K?|'/\\Ls p߻p\u000b/\\z=[\u001e߹/^\u000bsN~O<X!o\u001f w3\u000bww\u001d|u:\u0002(\u0000gj<e\u00014g\u0005\n_jQPӭ7~h\u001f_%5\u00057UäJ)LzJ\u000fGz\\\u000b#4IA0\"\u000eF=\tjW{p4\u0011eB\u001c\u000b#xuOJsK$\\c>08\bm\\eT*\u0016Xd}[KE\u0015@*a\u0005ڵf]\u0014\u0005\u0017\u001a[VY.\n+ޗFY\rujx\u00143Ts\u0003D\bZQɡz!9p]-c4,\u001bƸ\u0011Jp)}PULAi_PNq!B.]sM\rS\u00145I9\u0018z\u0010\\-v\b\u0007{9ۃC\b6\u0003sa {5+\u0006(74ILDlό!FZ|g':G:f\u0002Y_Sj *jMb*T\u001b?}41Z|qӬt̂\u001dn\bt\u0005(\u0011NAK\u0002\u0015\rb}b8Ė\u001eV}A\u0014\u0002ɣ;bB*,7w\u0012̞>Gf)\u0004#kQ`fI\bh`ms8\u0000e9h'Ά\\\\qcU?F\r \u0005ܒJ\u001c]q\tݭDm,d̔WTjHBmQ\u0011p\u0015\u0011@8M-拱AH\f\u0015#_36\\&~rj]]/g\u0006m`M,jr8CWHnޛ\u0015\u001f)KOn8\u0007E\f\u0018w\u0001_q*;\u0011Δ\u0014(#)m)`R\u0001\tFZ\u000b޺Jp\\2T]V#\u0006UVN}\u001fqmm\u0000\u0004\u0001vd7nciB'\u0010Ѐm\u0018o\u0016!`֯$'vf\u0006@dTX ]ND2}R`\u0006ȍ9z\u0010&t+>R@\u0004U`icbo<ZÍQ:4\u000e\u000f\"7}-ahn\u00107HÈlfsC&<Sk\u001c\u0001DKju3\n\u0006\u0007JCmoÒ\twH\u0004%yvmѼfMH8\u000fMe87֢\f>\u0006,\u000fBZ+bx\u00115\u000fxS2i\bSDC=.r\rh_\u001c5oQ-4\b\u000b\u001fuڥ)pa.\u0014l?0>u%@\nL9\u001fA\u0011\f$YЁ&\u0001vԊ\u0004xA0\t\u001azG\u0019%\u0018<Z\u000164^-ī}!H\t_(\u0004%\u0018rNZfz\u0003z\u0007s(\f \u0001䠟\u0005\u000b&AH\u0014K4F.T\nhj!Pn\u001cU\u0006y\b\u001f\u0002&O\u00182P*S\u0003\\[Ӧ\u001dY\tT:t#\u0011ƣ\f,AXf\u0002GQ\u00026d`a\u0017\u0004r`kyp+\u0001xi$\u001d8\u0000\u0011\u0002|qq>zqb\nTX8,\u00007\bugimO~+!ΐΐ\u000eㇲڿmlm݁Vnm_ŷT箼Ɲtca\u0007.-oIȻ\u0017,h{\u001a\u001b[ƝͭS\b~^)\r/CLngym/\u0000\u0014'Xi\bM!A3cX\u000b\u001bB·Dapc\u00072\u001aEd\u001cw|0\u00146IJ(.Vaa;vynPZZ3o*U>\u000b4\u001e^{{m|N\rj\u0012\u00137`֌D\u000f%51OE\u000b\u0013`%,5epl-E\u0010*0\u0012\u0001s(.\u0014\u0001\u001a&\t!H](A\u0015aiL;\r҂E @xiH9VBpa:M~yJ\u0004))\u0000\u001e-YB0\u0001'`-4BV1\u000e\u0013cK=\u0007Cέ*O8Iq݃tḵ4\u001cn%\\\u0016/yg`\u001f&\u0010\u0016DiP)Ɂ2\"\u0018\n\u000b4AQ[(]'YRpp8mz\u001eQZ\u0016\fU)>)R/nm޹\u0013:\\j2\u0017q0CA\u001cw\u0010!K,i$Si\u0014`_~Z\b\u0007\f\u00043\u00105`\u0001p\r-rXS/\u0018?߈\rv4 \u0001|;ZܼoA_/\u0015{,¶^\u00036ʺg~\u0010\u001cGӳv\r>2Zn\u001fn3{qC9?\u0007y?\u000bP\\O$\u0019ͻ\u001ep\u001e{vُow..=ŕ\u001bu+ѣ{,O\u0017W\u0002|~Id~Yd\u0013$\u0014qX+c?\u001cA;1\u0000\r\b\u0001Y)\t%˛Ch\u001fK\\M|x\u0014\u0010y;;_x.`&}\u0018Vw!\u0006>+ѥ}<\u0012)HI\u00021F0!\u0002[zpr\u001f\u0012qPZp!\u0012\u0004CO@ՕnR\"3j\u0007JD\u000f3*&C\u0014\u0015^qؽp[i6B\u000e?*(H16<Rs\u0017A\u000b}jʔB?ҪS<.\u0014󅦵\u0001\u0006N?}\u0015*\u001d\u001c\u001fGI! ua@\u0010@1S,\u0014ҒDvHKR:]Zۘ\u0010ވ\u0018\rBȥ|\u0006F\u0018G\n|\u0002,>\u0013j(\u0004t;@\\S\tx\u001dr9D|imL\u0016S\u0001!2ߣ`Y\u0001´\u000ep\u001b-\b\u0005Ĺ\u0018l\rջh o\u0005B0Fk\u0017:s\"\u0005\u0013\u0010 BR]=\u001a,q|!\u0018JbHtc2\u0015\u000eik,\u0015}b!(Aa-_Z\"1q{'L\u00107\n\u0003\u001bN\u001el\u0002ŏ3\u0010MYhMit\r\u0013P0\u001d5Bj.q՛󉵾uc(yrm؍P@R\u001e>$~[\u001dC]\u001aJ6F\u0012[\u0007>@T0\u0016;e,yu]_?kQ\u000eUYJXNEYnۖ|ٺ&0\u0007\\*B\f4L\u0017x @x\u001f\u0016'\u0018r\byyɤZy5ils6TLw3=t\u0019|bcn0mn|zm؍P@Rn\u001d_\u0016c/w\u001f<0/\u0004R\u0014\u0019=\r\u001bb?kE\u001a\u000f/kԃ^&>R{Qɬ\u001f>\u0012;1\u0016U+\u000b;w;~\u000bbﯼu;]ϯ]\u001e--9_aEd\u001fb\u0014\u0007}w\u001f\u0018~S$\u000b;I\u0016jQIR2H\u0000\u00186\u000bEU\u0019\u0006\u001b*|5$\u001cC\u0011B2h1{y#ćś!]ŕ\u0015s\u0019b\u0015!l eP!Ŝ\u0006XGk(g'E\u0014\u001dStL11;zs2~\u001fH\u001e\u0012V¾m\u0005w\fy6\u001a\t;\n<!\u0011\r?\u0013!㘚r\"KW&\u0005ө\tn\u000e5cFs\fBS\u001b$\u000eܱu\u0005fs>7Wne=O\r\u001cUΓ\u000e_r4>m$\u001d#Y$?)5\u000e}Y.Kq$RS-ڲء-5m)WkKW\u0016;[>~iuW\t/\f\u0017I\u0005\u0013[fƥ̌O׵FsD\u0012q\"\u0012<n4\u0013[fǥ\u0007l\u0016}bc~\u000f`tp\u0000\u001a\u00070R;\t\u000f\u000f`Jɥ\u0003\u0018'\u0013\u0011\u000e`J\u0017\u0019\u0000&ƹ1Ks;sqsW6o`(yK(D\u000e\u0016K9;D\u0006W\u000eA+1;y\u0011LG\u0010>\u0016b~\u0003Y=s\u0013̶\u0017\u001fb\u001d!m6\u001e@Th(3vS>\u001f?\nS\ta/'F{Bc)(\fR G~Zڣp,)-NqG\u0001x_q]ҥ/ՀGiډɎ|\u001aO/OcvWO>L?:v\u0006TM}\u0011ѽ\u0000KN\u0010h\u0012Bj#8Ķĺ/W\u0012ZrB(-\u001a3\u000ek}=#r\u000e\u0007> \u001b\u0004=~Pw@\u000f|ǚeJ \u0015e^$3<\u001aݖQM\u0014\u0002܎/h\u0016a\u0013p+4\n5eK\u00103\u00032\u0010\u0007G\u001dp`lt\u001fșB\u001a?+IEj`{J'2tz2efd3!VHEv);=+ف\nF\u0018&A\u0015\u0014\u00036\u000e_p¡\b\t\u0010)b\u001bNӞ1F#V.NL\u0014~\u0005Ji\u0001aiF_L\u0014.׊\f~H*~a4!\u0019O7*Q*{՞\u0018|h\u001ev͖ײ)Qː\u001cO7pEz\f\u000fs\u0001X~r\u0013)g\b9>˅\u0002J b\u000eS*\f\u001c\u001feF/\u0016zȑa`?q*e\u000fY1\u001c\u0004M͸Ճ+]f%\u0002\u000f\bJ~P6و\u0002\u0017\nvGߪ1D\u0011A8sĉ@T= jKn\u0011\u0015&bW\u0012[D\u0015D\nQa\"v0\u0011BT]!*LĮ\u0010\u0015&bW\n\u0013+D\u0015D\nQa\"v0\u0011BT]!*LĮ\u0010\u0015&bW\n\u0013+D\u0015D\n-͈#\u0004\u001e+oD\u001ca+ȡKU\"\"v\u001e?Nx챢?S>.8ԓO<;\u0013Μ=s\u0003Ϟ?{f\u0013z܅Lis\u001c\u0015|3\u001ewB;Ϯ2\u0018\u001e\u0007\fV޺͡\u001f;uo\u001f\u001f\u0007{ox)O|\u0007}>\u0005\u001a\u000f\u001fϿ8\u000e?-v4vg\u001f}\u001f8?~Gogv]\f/q\u0007湼Ï?⫯\u000f;&\u0011O?\u001eƮ?ZĮ\u001f\u0006b\u000f\u0003\u001f[~|1aoxcK:{|\"paqŋ?\u0018\u000f|%*?j/\u0016\u001dd\u0002E׶nm@ô`A\r\u0019\u000elzR򞰖\u0019Af*e\u0003Ɏߓ]ʚ%K¯/.,ۢFd6KU0\u0013R 5GC6\u001aiA';\u001fR>r֋\u000f[(Dt?ne_1*\r#\"o\u0010VZTTG\u0018n'\b7ϵ\u0011TN\u001auK\nj_7xy\t4]R<U*LjnawXreO\u001fOIΑ\u0019\u0012\u0011PvS\u0005c [.\u0017$\u0010|\u00140E抹\nNC[rL[\t0>'jK̅Q\u0012\u0013Ri$\u001bD҄g)\b\r\u0015եCbR\u0018\u0013f0\u0011%}($Ejw\u0019zK\f.\u001d5\t\u0006l8\u0005\u0011\u0012u\\:R:\u0014tлj'A9eJ3mV\u0013񗵮6+A_\u001ckiQP`v\tV(k4c\u0019!a\u0012\u001du1\nIYeaL)zȼ50A\u0005k\u0016ûolnht\f7}0ZI821ŀi%VK\u0017j,继\f,\u0003\u001b8f}`axB\u0014\u0014K\u0015\u0014ܬ\u001b]~6b<\u0016\buh`}|SvR<H)߈~#77\u0016`o'\u000bw7\u0013v/\u001b?0\u001cd+\u000bKvl=4}Kݙ(7\u0012 \u0011\u0004\u0013\u000bK\u0015xE1\u0006;\u0006Y\r8\u0017kkt6$7\u001c\u001bSѳAH~Z\f7 \u0012H\u000e\u0012ip\u0003i\u0019l\"`\fϺ\rxHse$7\u0017IX<\fy\u000e܇j;\u0011E^NQ@.]!\u001f<Ѡ\u000bqRe@H6J}F\u001bS\u0014.r_ԈJ}\u001e/\u0019>z΍\u0007S_ܠ=7\u00156U\u0016Bˢ \u00065\u0003f\u0003*PA\u0016H\u000e6J[MSɾ|R\u0015N$*KH\u0004&\u001b\tA\u00110\u0017NHE\u0001\u000f\u001dp#1ɍH\u0011\u0011ax\u0010\u0011q\u0010QD\".\u0003D\\M\u0011\u0011\u0007\"\"\u000e\u0010q5ED\u001c\u0014j8(\u0014\u0011qP)\"\u0010WSDA!B\\M\u0011\u0011\u0007\"\"\u000e\nq5ED\u001c\u0014j8(\u0014\u0011qP)\"\u0010WSDA!B\\M\u0011\u0011\u0007\"\"\u000e\nq5ED\u001c\u0014j8(\u0014\u0011qP?\r\u0011\u0011q Y\u0014\u0011qP?\u0017\u0011q s\u0007\u000e_\u0011\u0011\t](\"\"b8}q8g11#1J<ǌ}(?~s\u0017.3Mъ]pS;;Ϯ2\u0018F\f\u0007+o]Pi\u001e;uo\u001fG||\u000f3@2?u{\u001f|O#>'\u000f߻~S\u001e?}\u0017\u0011_|\u001f|\u0016;\u001a%>_~\u0015՗쓏V>$\u0019_눯翽?0\u0019~\u0017_}}\u001bӏQ2MDt!J\u000bQ2]BL\u0017dPLrT#;\u0018;;\u0012*;x\nQB\u0014\"\\Q>eO;\ty\u0019\u0013J\u0005OU'q\u0015>06\u0015\u0017/|cR|e~\\\u001blk~UHZp{ms# i4r#KדKd\u0002E׶nm@t={!\u0005/)jJIodS\u0013F^\u0007Pez\u0014/$WX\u001bn׷6n%\u0016Hn\u001bؿ7\\z)TI+K\u001bɥŅ7[o|nրCeҞ\u001cqhkUMP\u000f4M';i?s$Y%{\r\tq`~N\u0019ݷ\b5QD%JO\u0010`-ҥ/\u001bz}=\u0006اK\u000f>?\t\\?=?\u0003w?\u001f??\u0013\u0012\u0007{\u0016T'x)RT0#\u0015VrZR\u0014}A\u0005\\*x'*@j\u0004HYRS);h'\u0019}e\u0010*bh1}ɔQ\\HEurm\bv\u0006*m\u0013\u0005TZǑB^6?M.n_W\tɕW7odͭQ6Z?-& ]z\u0015Ӎ[ի\u000b'\u001cj:\nzg;b:\u001b\u0005ev<;R_x/]_\u001b5Ws\u001bw7FfU\u001776=>\\m2I\\l\u000eoq}s\f}a\u0011HGkwK`Sk6ֶҍ]UM#k?!]V\u001e׾O\\uu5\u0000wV(h\u0018g\u0013\u000b=_^{/{\u0014t+}'m>}%\u0018g[z +y]׮-\fwoNWn^_\u0006\f+Y:ZqOQ.\u0018\u0017\tJ\u0014LXäPJX-TKn!ҕ\u0017d\u0005as\u0007\u001f>\u0002\u001f͋+]JCo񮻭\u001dքhu9ZGc\u0017`x&\u000bw7\u00133\\\u001f[[\u0018m\u000e%N^6Z\u0015_NɧL8l\u0016667\u0012+Pf\u001b\u0006V1-`ic\u0006\u0013(\u0011ͭ\u000f$\u001e|za\u0003Zz'\u00014NK\rۗx6\\5@RaY\u001bpzUf0\u0010wlW[\u0013v5F+\u001b\u000fL\u0011TS`\u0002D\u0019I9oK4p\u0006rͤZ\u000b؇_\u0006_aG_ [d\u001dn\u001b\n<\u0000rH\u0013\\89\u000fT\u0018\u00030\r\u001b\"eȩVz~\u0003\u001d#ɏA\u0013-7J1՚\u0013\u001esCY{7̥\n#SS$cyD\u0011sK$\u0003q\u0006}BaVq&%\u0011uJ¨7B\u0012%ŤZ\u0014k%\u0014\u0007`\u0011a&\n6`*\u0004V\n64OM2Tjυ$X9AI\u0004!/bO|M+>qPB+A\u0015\u000b\u0010k4֗\\k1p\u001b9Tנn\u0018Z'Jv`\u001c\f#\u001ee\u0010\u0011>5\u0011p^.[A\u001d\t@\\qE B\",f/FG9DPgƉ\u001b͋nքT]n\u000el\u00179ZxW_aۧ(|os\u0015g1n\u0017l\u0007@Q6`vYtmter\rh_\u0007_\u000eg-ܷӨ\u0017fUz]N4eE\\(\u0016\u0018f+!qc\nL9j\u0003IV3&\u0001\u0016\n\u0004x7a;\bu%\u0018<Z\u001d\u0003X.\u0004\u0014Z \t*&\u0010\u001ar۲ѹހ^\f\u0018\u0019C\u0002yEnpJZZ`\u0012d)h](\u0017\u000fy\u0017\ra\f,.\u0016A\tXeiA-*8rchB(`}ک\u0001@\n7էM\u0003\u0017;4s-\u001f3o߼\u000b\u0011c\u0016M()\b\\g\u0010.!r\n(\u0001w.2Mt\u0004\u001aοV@`\u0002D؄狋=T(@Gb\u00048n^ugimOސ7w\u001e0~(We6V\u00167a\u0003^u\u0007Z}BT\u0007\u0007K\u001bw \u001ff؁K=ŭi\u0012nd.g8fa\u0006\u0014nnݾB<\u001b\u0017\u0017!\\H/>i,\\\u0004T\u0010t\u001eR^pT \u000e\u00027d\u0013ωʨb&Vu\u00100,,A<#[jp-\u0019ҷJn\u0004~tM+%H{A\")n\u0004P\u001b%:5L~\u0011\u0016-8\u0016\u0006Vz%u}\b\u0001\tt\u0012.dZPX\b0e\u000e-90\u0014Ep\u0002n\bR$+P\u0011\u0006Ɓ24J\u000b\u0016\u0000Y!\u0012Kf\u0005,R%b\u0003q*q\u0012,\f\\*h!F[XN`\u00022Q\u0016\u001aSdE\u0018\u00103wDsk˓&\u000eh\fxh,\rD<\u0004\u00123~\u00140d\u000eF\u0004=2i J3m\u0018r9*\bƪR(jK\u0012\u0005\u000b*4YX{\u0015? Y,\u0014b\u000b:Ю\u0012\u0001#\u0010\r\td\u0006+vW~}Yŭ;wB):!¹\u0015V2Ews`\u00184za-LNl;\u001a\u0005=\u0018\u0013!:\n0{8\bS?\u001c\u00021\u001bx\t0ly`G\u0003\"\u001dPqN7Zܼ\u0007p3Rw-l5[k{&kg\u000e>=\u001b}m\u0000o#\u00056ÿw\u001b7sn\u001ak.n\u0013\u000f'$ד5IF7Ǟ\u001do]zwe?\u001dߥr\\}|Cnx%zԾ\u001e{{1S\u001e_/l/lߟ$/\u001ckqegv6#sG\u001c>\u0006@7\u001d89+?dys\b[:\u0019\u001a\"=o^wQTie\u0007oktG\u000ek\u001b\u0011ﮁ?\u0002`\fZ\u000fj\u0004\u0007\u0007\u000byz\u0012,`P_A>O\u0006`ck\u000bљ\u00027,3e`\u0005\u0005\u000b6Dpv\u0019̰@\u001d\u0019=AFYjA\"\u0010q.Wp:9bA|jv\u0007Z\u000b8\u0014\u0005LK{k/%7_SaS\u0011:\u0001'0-^\u0000C$\u001c_gծH\\\u0001ݸû\n\u0017n.\u001d4#pدG\u0004Dx4\n\u0016\b\u0010u,bֈ\n\u0016\b\u0010u,bֈ:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161k׭#fY#~-bs\u0007\u000e_\u0011'\u0001]\u0015\u00111#\u001c\u001f8;\u0001xn;7r3`9;yٗ\u001f?w\u001eK\u0007]|)POgo}}űoq,O?W\u0012_O>z[=\u001bsfp%翽?0c\u0019~\u0017_}}W_|0!h\"h>_N?I\tO$+O~DÜ\u0013unybp7F#s7_\t?\u000e)O4g'%\u001dKk[k6 a^\u0010vs\\\u0019DzdgR=\u0003:H\u0007Zft\u000eV\rx\u0012\u0017\u0017H\u001d}{@I6\u0018Z t8Yh/|H95vd\u0016}'^]\u0019|<id\u0001MQʾbc>]!,\u0012J+yyuTF\u0011D\rsm\u0004\r\u0015qмZD6\u001enFS\u001eT\u0018|Ky*UЫM㕊\baXrr\u0002*!U\r\u0004\u0011B@\\RВ\u0016Tp\u0005Seʓ@9#4\u00193\u00051Lѥb13!ò3\u0006\\m\u0002iT3LY\u0018%Q8A\u0018+P\u001fW$JD\u001eKB9Y\nBCEuج'\u0006(DKW\u001b⠂FF<\u0001+q!\rp順I\u0015\u0012Y\\D.\u001d\fՑ\u0013>'JA)\u001cy2j\u0019LWF5+?rZW\u001b/EQa\u0001yI9!l5F\bgJ>-vv*dm\u001bֳW\u0017ON&#;\nzg;/ehYipgsv\u000bM\u001bw7FU?t}Ӌ[\u001bV=:7ڝlм\u001d$*C~7;ypK\u001bkOwV\u0019Qd\u001f\tUOٮJ}k?2ɧꧾ{落VzN^u\u0016JϾnֳWYGyE4h%\" ə\u0019m\u0006O\u0001{3\u0019\b\u0012H\u001a&;2k\u0013h\u0007DB \u0005~y\rc@o\u0003SVX\u0007YҨyf߈ċs'^3b7n7*.;rWG7Ԅh\u0006?\u001av\u00164Ke\u0016Fleaɮ6m\u0007.\u001f\u000fV|;\u0012%,\u0010a\b\u000fDp-3\u001fd\u0010iS#x\u0011\ny\u001b\u001b\tׄ7HjsI`#;IJc}e)\b)тXx`5͞0\u0006\u001c\u0014Ķ\n)a\u00176zR4'+~\u001c6\u001e}Ca\u000fw>\u001d\u0013P\u0002\u001e\finkቁ\u0012\u0012tؽCVPhB-O\u000e\u000bCQ?\t¸\b}\u0015>m\u0011nDJ\u001d.\\0\u001b%\t\u000f{6\u001cfsr\u0012\u0006J!\u000bѥ\u0012}8\u0013J=\u001e}K\u0013\u001d\\I!,\u0011APUQ`.3\u0005]\u0016#,HyӀʒ˼\u0014B\u000eoy\n]bZ,+Hx⑲\u0018\u0003\n7E\u0002wîac\u000bTvą6V($\u0015Hm]:&lNM\u001c\u0018\u0018\u0019Lq%J*\f\u0010fi+x)O\u0015y_\nV\u001c\u001f\u000bm\u0014\nP\bǰ\u0010{\u001afUӰ\\𰂬\u0007fp\u0012\u0007v'T\\a\u0001s<CrϮD\u00125h\fjȡZ\u0004\tIR\u0005(a uqJ\tkau!\u001a\u0016+\".le\u0006Te\u001e\f)<@\u001e\u00180E4eqaR$H)FPű\u000eU>vCM\n6Y)a\u001a\u0013\u001c2E6_`\u0011r\b\u0019et\u001f;\u0012&\u0002/_\u0015!b\\l}r8\u0007\u00059SX\u0004̐\btXD,Ѩ\u001f;w\u0014\u000f\u0017}aG_1\t\t+\u0010W\u0012jw\n[QvYl\u001c\\e\u0019k<,\\mőZх'j8b/\f.\u001cqى~[\u0007/\u0007/,Dap0*T{75{VmՑbU*5ʪl\u0004Pv\u0005\u0000\b\u0011\u0011nV/Mƾ/Ǿ\u0010Wo.HZ\n\u0013Yt8Q\f?t8ާBifd\u001eB}$!XA\u0018'\u00029X&@B\f8΃yB\u0004Xu\u0015H\r'h\u0000<\fSq\n!K\u001aV<QS!\u0006,i:t꒨Ϻ(Ne>>\u0010@$,uhPs%Vrd-5~,\u0003ZϨx4\u0017p{x\u0017c^|!\"n\u0014*t4*\u00159\bA\u0000H5LiN\u000b\u0017߁x4%\u001905GU)Q>؅́ҿfwڪQa٣:W\u000e^\u001bv4hSi\u0011BчV\u0002]γYC\ba`\u0010bP(`\u000bj\u0002!=râh51\u00109t\u000fdÁ\u001aFL{\"լgW\u0005o\u0006P*Hoϼs)@䜏8^8מ\"N\u0002vE<\u001aD\u0005x\u0004:\u00161kD\u0005x\u0004:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5E\u001aQ\"fc\u0011FԱY#XĬ\u0011u,bֈ:\u00161kD\u001d5\u00113EHĬ\u0011\u00161S\u0003ݯ.튈\u0011\u000e[\u000f\u001c'\u0004qj$\u0013Aw\u0001O\u0012gI<Q\u001c'{Dq\u0002,88894\u00119&\"D?G\u0016s~\u000f\u0003%F\u0003jF=aSѳD=U6Xe#\u0000\u00079E\b\u0013bHz\fUo骰#2\\ yEd;9U\u000b<29i7Lg4wW9ipλ._8R;^-oT7\u001fgcys$8\u0019mg329_\b$\n'ɜP\"B%Z91&|\u0015%hjR\u0018TЈ>48\u0019+8\u0019kgCMy/\u001dO?ory\u001cdyP@(<VRj\u001e^&H^59tܥwY)cI>ű(\"| \u0014đHP\u0010\u0005\u0013(89(%Z\u0015\"p[*n\u0018\u0006]F{4s\u001eR97uUG<朧9\u001f\u001c\u0004\u0003\u001bsM\u0007|͉W9s\u001e;>QS8ˎ<rG\u001f\r~4Ǟss\b%W!q&(I\u0019\u0005/c$\u0013\u0002)!\u0011\u001dmy𖭜>JWi\u001d5s\u001eKts+*91s^Q3s\u001e'pc'WMDQkҥ\u0006|e8M(u1Vy}ۦ\t\\*pqbYA\u0006<5\u0007)<e(P眧s&<N\\7ӄ\u000ey\tn'pΣ'sλy9&sC$Lk\"mhBUhkMq\u0019{˲sΗ稍s9\ryj\\q\u0016:g]\u0010V\u0015\u0015H\u000bR28\u0019\u0002AIa݊}rB(8u^.7y\r\u0018\u0012tAh9\u000evA|hTV#9\u000f\u001bVy^+9ݜI9\u000f\"9\u00139@\u0007<f`\u001dؘs49Ca]m=66s.O\u00138+oLe-\u0000 Eஎ\u0006<\b+眇n}!9es^Qse\u001b\n5¦pc)Xd\"缛Nyy99#p+|ȯF\u0015OTTs<\u0016$.ʦ\u0013n/Ok3\u0004I8c\u001dڻ/\u0018)$'d(Yƙf+{Gay\u001e|!c\"gZc\u0000-(XFhM@@\u0013\u001c˸VJq-\u001e\t<I%,%*$ew45G\u0002\\\u0006:)\u0005g4s\u001e00{\u001a\u001f~|\f1M``\u00075ފ*XTV;C\u0011\u0018gΊg\u0007\u0012\u0004B\u0005'i_Y\u0003Epq3\u000f;\u0001I\re\u0001L\u0010|\u0003 U0:\u00073\tϼ$~h\f\u001d:X\u00153[O\u0010@\u001f\u0004#\u0006\u0001Q>ނ\u00056\u0013#h6SO`\u0017\u0003\u0006RB\u001c\u001c΃\tg\nxll}K.9\u0010*\reS\r\u0018?Ub\u00110&\u00155K!$)B\"Y\u000fo\u001d>%㸫\u0012\u0003;,Wp\u0004\u000e\tOCH<tuy\\S@o\u0001φ\tj\\\u001dw!`BƲ``I\u000bo\u0004$wz><R\u0015CP\u001fTS4FX8s)\u001e\u0005yЄqRd\u000f F\br\u001a}JЅ\u0001%Y?d?ו0 @ї\u0000\r\u001a\u001fM\u0004S\\P\u000b\u0000\u0017\n[WM>\fJZVZxt\u0006%\bQ\u0016-i\u0004%$\u000b\u0010\u000ec\t[V:4U\u001d7\u0016\"\u0016z$Ma)ak0\u001bPC\u0015lp}\u001aGc\u00048Ap~Q\u0012\n_d!\tJ^-\u0004\nY)\u0014\u0014\u001e\u0019`6{+!k)\u0001\u000b\u0006H8fhi\bb-2AJ\u0018j\u0016\n\u0001F\u000eb4lҐX-:ة;.>!X|Z;Y \u001c`GANx<,RP.3\u0018<hp\u0010EOr{-H\u000b60:\u0016#\bVٗ\u001c\u001ebS\u001cgW&\u0010Wم5\f{Pؑ\u0010\u0017BHpad\u0019\u0002RН'\u0016\u001dʆWA\ng3m\u0005t\u001b\u0013\nA\u00139\tjY\b>4hBCV\u0012lk%\u001b5Ė\u0007U\u001fI$2\u0014Iw(\u0016w!\u0014\u0005\u0013\r\u00130\u000bt,\u001c5\u0016pƣ~Ut\u0001\txh?א\u0011`υEÚzsE\b8\t\u0011nT\u0013\u0011\u0019|K0C`\u001eT0OhKhb.\u0013S\u001dDo4,|L\u001d>\u0007\u0005n\r\fM\u000eݦ\t9\u0003&)>u}Ny^0<]\u0005/P5Z\u0006\b\u0015\u0018%LN\u0013jy/\u001e\"ȨJ\u00146K͒.`b\u0011quS\u0012\u00126\u0017l5I#\u001d&R%6\u0019F\u0007\u0005\u0010+4\u0004\u0011>0)!\u0017\n\\]i6&\u000b\u001ekb!utQۅv~\u0016L㷳Eb\\Y\u001aTАϚ\u0000&<⥯Y\u000b\f+ {U\u001e2Kc\u0017~נ Tp\u0005lP\fv8|Bh-S~D\u001d5Z$wKZюʽnmWޢ+U\u0014l-k'/\u0006*\u000ea$\u00154xf.\t0!\"&\u0010(\r\u0002\u0003\u0016=N\u001d\ra$aî1\n~C~\u0016\u001c\u001cs_ \u0010\u0006Zذv\u001eFU#@\u001ch\u0013#\u001dު#,\u001d0\u0012\u0003Igб$]ǒ>~NR'\u001cKbcI,r,Il$%cIFǒ\tǒ?X\u0012'\u001fKbIǒ\u001fcɢDPt\u001dKZ%UcIȜx,oRu\u001dK\u000b*ǒ8%ǒ8\u001dǒ\u0014z,\ts\u001fKRYER2>$%AR\u001dǒ.xL;\u0012S%P˱$#cIJJǒN\u0013%ĔcI,1X\u0012\u000bM>\u0012-f.X2\u001fKbcI(1X\u0012ۛz,Z;Xҽ[8X\u0012JL?įEN=Dx,Yd\u000e\u001eK\u001fK\u001f)ē2\u0001cV\u00146\u0014\b\u001d+\u0018\u0011&鴳]\u001cK=j?\u0004\rɱ$m/6\u001eKJ\u0010`_\u0014f\u000fXd\u0018tDO\u000b&\u001eK\u001eH\u0005 J\u000f\u0004/GI'\t\u001bBJz5\u00161s\u0011\t` aBH7\n>\u001f\u0010\u001e\u0015|-j|yu먕\u00189\u0005k[SU\r~\u0001zrW%ZF(\u0010L+MNݟe@6\u0015\u0006\f\u0006Æ\u000f0x`A0-E\u001e\n`NbP\u0015~}-?\u001a\u0018\u001a\u0018Y\b_\u001a2j$\f̤(\u0012N9KzBw:Ի\u0002-/Q+1Cl\u001f\u0003Y^4Q]\u000b\u0004H\u0013 KӉ@\u0002U~ߛz\u0002[~\u0002<\u0002\u0013p4UբZD\u0005,f3Y\u000foy13`cs?\u0015;s̼ͬUխn|\u000fB_~<*\u0001F]Bj\u0004U\t:uv6\u00157i\u0002s'\u0010K0)Žgo\n\u0019Ԑ_帧Ԫ,2R\u001a2\u0016]P̶H0{r\u0003:*(UQQU$br.@O\u0002\f|P\u0015\"[\u0019I\u0006[fl \u0003*\u0001Fh\u0004HՎ\t\u0012vn\u0018'\u0019k.0cxk\tOX\rG\u00044?\u0003k\u0017\u0013\u000fTn1\u0001{`\u001a\u0004\r\u0017\u0015b\u0006\u0010fò\"h]pX\t&$帟\t#A]Shx-vҲq}w~\u001d1{'ݥ[䲓B\u0007\u0005rՕc`bzy)\u001b힂I\u000b`n`q\u0004ߎ39̒aM\b\r!<rA.Ȃ\u000eq\u0004\u0011\u0004w\u001cs=BR^U\u000eIЯۙ\u0017\u000bM\u0003s\u000b\b`h{&\u0000\u0007,\u0000kn<\u0000\u0002Ql,9\u00049sɗŰˀ\u0019(2\u00003)ίiO\u001fl+2:ͅ\u0007Ɣx\u0002uV9q\u001f\u0000\f\u001fί6\u0012\b\u0002*\u0018\u0016ܚ)G\u000fɍЄu-*GG!P\u0018\u00147\rO|/ӮE\u000egѧ\u0005%Y\u0016v3#/((\u0013D\f߃\".qҒ`o0'V&\"\u0014Q\u0019</_pe݉pW.\u0018U\u001fiHȜU\f ˮs\u0018~\u0001V]º\u0016\b\re\u001cHߝt2߿\u0004d\u0019\n]OB\fx)f8b\u001d\u0013\u000bor\u001bK_/,-u_N~5(M5 \u001f\u0005]\u0019\u0000v=R}vv\u001dݾ\rB힁>{7\n\nd-\u0011\n\u0011v\u001bz>\u001c5_\u0010\u0005QW`\u0005L&$:`لǠ\u0001\u0013ĺ,{%@hZd4Hh=x.\u001c\b$莥\u0005Kn+oɺGP\u0011~O\u001a!\"ͷ\u0010E7N[\u0017\u0010EkQ,\u0016\u0011R2i^fZ\u001eZۻ.\u00049.?1-\u001e6ēNrD~\u001aD{2\u001eq;\u0000s*\\Rnn~Ux%auXI(c*\u0017+r8*\u00077+f-vž]A\fȡK;,\u001c=\u00147@QXq\r%z'vr\u0005\u0005.U(Z `QiÍ<\u0010Oh;~\u000ey\u0007\u001d\u0001K\u000eL;}\"C7\bS;\u0004+@j\u0019Vj?j?_\u001e\\]>\u000bD\u0000\u00170\nWq9o\\a>J%M\tKw\u0011C\u0003\u0006\u0016\u0019#@5:`#/%Td~չ\u001d:!\b\u000e\"D\u0006Dn0-D0\u0015Dn0-D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015D0\u0015[\u0011&x\t<T\u0010=M\"L\u000ek]\b\u000eX%BI~NС\u0007\t\u000e\u001d+~\u001e{\u000f=pU\u0003GN<\u0013\u0007\u0003\u001e?}ܑ\u0007l\u000f\u001f9~\u00059\b\u0015p#mϝzg?\b?{\u001cv#'>\u0007\u0001~G̉#PGO^x}/\u000e\u0002~ꅓGc\u000e\u001f;?}\u0007\u0001O}6;}\fO>/|{\u0010|'\u001fU,W\u0000?]6OdU~w$\u0013w~ŧXX\u0001\u0003U?zZ\u0003<93\u0003<_?\u00036=;\u0002\u0007x\u001f ~\u001dT8{\u0001~t~/V!%kc>30\u0013@I^\\\u000eo{WVAgd#JwU_u2\r\u0007D\u0004k[xq꛽o~1\\\u001fô\u0010IG\u0018!;)\u0003:\u0010\u0003BԀ+kaw{c>c[\u000erܗk<O\u0018Ƈuu\u0019\"\u001f\u0016*\u001b=Hmc\u0007\b\u0005ҖKXaFmtp\r\u001f46U)SC8KՎ6z(WLض\u0016l-\u0016{Z%l-FB2&9oS\"2B`TE%v\u0002c\u001ac;\\@\t8T8\b\u00043/Sхb.Ң\u000f\u001bR\u0007*%A]:F9&fQ\n\u0011\u0018^(#IH&\u0010nL}B!tH\fD\u0015\u0005aUC(\u0011\u0005~(F\u0001I@DEq!uka\u0005L\"18,|<),,zu\u0012\u0012\u0015<̑NWK`RiH%*~YjH\u0014\u001aq\u0015\u0018\u0013|⼘\\|mc9\u0018\u000e|P҇!k߂tIxـTh=\u0005yG+~퍵;[\r_/u}\u00002P_Ĳ_ؼ[k}{qcs}YywejljY\u0002-YC?6]\rV\u001ea\u0007\u000b쟌4Ag\u001dv\u0002l*lvO`pMT\t8\u0014iA1E\u0018\u0005bV\u001c;r\u000f@d,e\u0018X\u0019cti\u001fԌ$\n咤DK\u001eԬ)Tuf\\Djo\u0001]tiol\u00124U\u001bgd6_z~m\u000baX\u0012\u0012.~^):\u001a`.\u0013\u0002\r\u001e*\u000e\t\u0017\u0003Fc*nD\u0011F\u001bj7\u001667{Y\b,~4\u001c0X\u001e.-\\M^_=|\u001f,?\r?\\rX\u001a#\u0018\u0012j\f#T\u001b)\u0005$mf5~k+Am\u000fjc\u0003lP6\u0017Z\u0010AR#qReap1\u0019a$9<\u0015$&\u0005)M%XMXRF\u00104\u0013#j^\u0011|\u0018rЮ23\"6-\u0014u6]n\u0006Ō,ѸSJٵ+\fWh0}@\u0014k1ɝ1ŠwC8\u0001QXO￑\fpT0\u0018)7.|ya:\\\u0018ϼ\u0013gNd\u0007(\u0018\u0015F\u000bh\nM}`)\"R\u0005P΀un\u001b\u0006*BL$\u0002\u00034w\u001c\u001bh\u0000#6a0.r\u0004|H\tb#1ɍ\"DM߇\u0007\u0011\"\u001c$r\u0014!l!R\b3(M\u0011\"\n(E0C\u0014!¬ JS\b(M\u0011\"\n4E0+\u0014!¬ JS\b(M\u0011\"\n4E0+\u0014!¬ JS\b(M\u0011\"\n4E0+\u0014!¬ JS\b(M\u0011\"\n4E0+\u0014!¬ JS\b(M\u0011\"\n!\"D\to\u0016E0+ԋ\u0010a&\u0006\u0010 A\u001cE\u0010ap{\u0001\t0\n9}\u0002}2\u0014\u001f\f\u001c?u\u0002SD0Z\u000bgN\u001d?rزܩK\b奷_i\u000e\u001d9q|'w?O>蝟9q\u0004zѓ\u0017^g\b_~ꅓGA\u000e\u001f;?}\u0011?}1왇\u001fW|\b~/?\u001dög0w7.w?]6Od=􋯿~/T\u0003|_|ڏ=\u0013B&=\u0004g L\u0013Ği3MP8ˠ<Ӌ\u0011V\u0007qEYҊ2B\u0014\u000b\u0011wPܹE(v\u001d\"\u0014wJ\t*$\u0004xz[mZ8{Vo~/.\\Krw{k9?\u001a$-]\\ܺZXm~\\4\\>%\u001cf\u0002(뛫7W!~omx>x\u0007\u001ew\u0014!\u0018aaX7`瓋o7\u000676Wo&\u00162\\ջ9\u0000[Wx$xu}+9p7?|//K~ړ\u00033\u0011lYuz$+\u0003BWƕ޻ĿH03?G+:E\u0013b2\"0\"*Q%\u00045]\u0000\n>婴\rNSsy\u0019t?{'\u001f޿_%}[jw&Fd_\t\u0004/\u0016%N]\u001af\u0004ME*d5)RQ.\u0015\u0013CM 2,&\u0001#f]JZ2NӤ\u0013LPXG2*5BT\u0011C\u0013%JB*=l5\r\u001aU&\nJǖ C^<?\\;\u0017^/\u0016\u0013ml]\u001f76\u0007Á|K[6ti\u0001CM\u0003/7XLЂ2J\u001bֻ_]:\b;\u0003@5q\u0012ō6_.ͳ>I.^\b\u000fVo\u000fwV\f=?~x\\\u0006wnש\u0015[x7oME줯:LUS6\u0015U+kG\r\\5Uu\u000emh\u0018gc\u0011od\u0016_[}ƻ=,׽ޭYmK/׹/{냵k[\u0006\u0019]\u001fŌ\u000b[7z}<\u001b^\u0003\f/}\u001a\u0004S\\\u0014%\u0003Q\u0002TBARM!r|h)Y\u0002eXc\u000ffzR9?dr鮣֜Q[Hw&D\u001csQ;v^y\u0003*6YGYi\u000bt\u001a~nUT\u0010\r7JP)~WG\u0004ц1*52U[T>,\u00167\u0013кK\u001c~\u000b\u0002p`\u0003_gW\u0007cBj]\u001b\u001f)0:Jjo2\u0014רGm_WF\nZ\"M\tpo$,\n4X\tI`Rz\u0004\f`tV\u0006tD/:˰R\u0001}\u0002Vdb\u0018[a6f-\\14[\u001c\u00138\u000e\u0001\u0018!HR\u0004\u00138,|\u0004'Hy]\nk&EJh&Ju\u0015,_7\u000f˿.d\r=I&k(DP\u001d\u000fC\u001coG9<a]0\u0018XiXn)-}N\u001b\u0001}\u0003\u0015\"ANVנ\bQmYZi*M1٦j$^k^L\u0018jc1\u000bMj`f#a*$qv|&B![THX\u0016a׳dh[\u001e8$<%\u0001=.\f\rK\u0015g\u0012e*P\r(\u001a*I\u001b=+@\u0007\u001ebis\u0015,3T)X,\u0011@h\u000bI\u0007\u0003L\u0004-</\"Mѥyk.\u0011uJPE`cn\nZ\u000fW8A,u\u0006ƵO}_:QBdYk1\u0013٠[A2:oL~c\u000b8\u001fGM@7#\u000eK9\"T*\bSH\u0004w=\u001bTCK\u0004%Yv<fp\u001d\u0018]spڥ(\\m3\u0018g x\u0017hw`TMJR4te2\u000e\b5ЁWdM>w\u0004xiFW.X6a,\u0014,R\bQ!Aqt40D[\u0013wyWP4T4L)7z4@5\u0014J\u0000B\\=\f\u001aj\u0007K\u000fZ\f\u0006('ܕc`\u0014H%k\u000e\t0\u0001Hj\u0010Ai8'5#3\u0001\u000e3d\f͑D!)!\u0005 $#h0p\u000bEj9$X|\u000744\u0003\f2tk:\u001fIp\u0001\u0007VͶn\b\u0001\t\u001cPN\u000fP\u0002a.ا\u0003\u0017\u001b8\u0015\u0017ߚ̺`\u00062\u0004\u00170\u00070\u0004\nM(O\u0011\u0004F+P>0d>c\u0002o(*=\r:\u000efKnK \u0013.h0ւ\u0002Z\u0003\u001cҺ\u0011̵\u0003E)0~a.\u0003XMD)57bɳ\u001d\u0006z\u0006_ַVW\u001fnކ-ܺDuBaƇ7֮߆\u0005K5>\u0007k\\Y'>p\u0005\u000bs\u0007\u0012\u001d$+Xz\u0013\u0016W66oڃ\t\u0015\u00060+4UOnvu`\u0001'*Պ/8jML\nSz0ۆ[v\u0012\b\u0013-[)\u0007K\u0017]N`\u000fl\u0000+\u0000IjŽ`\u0018\"K!\u001a\n68#kV\"i[ZZ=睃Z\u001en.-lV\u00194lp\u0005V~ኯ\u001aFJ\u000e!h\u0001\u001a\u0016{/\u001aTTo\u0017(\u0006̒ԠI10\u0014\u00005\u0004\u0016H\u000eE\u0018 (rH*aJ\u000b\u001dSxr\u0004ᒥ\u0002\u001a\u0004ɽW|\u000fq(q\u0010̇\fl0p!HNA-\u000b\u0000\u0010\u0018;P)\u0014\b\u0013挌O\u001bFCA\u0013.ߋ&f3h\u0004f\u0013\u0002l-L%\u0005(l\u000fcF0`~2A;KᎯ]d@aUX4\n=\nv\u001aLV_\u0019120)\u0001ކ\n\u001ef2~On\u00028#\u0000ln4z\u001dj͍۷\u0006\u0014F\u0003%9\u001dhHI\u0018N\rjIx\u0013J\u0011&409\u0016(\u0002_J00W\u0019\u00130Lc[[<~0\u001fL&&j\u0010A6(jq\u000e\u001fV\u000bh7mbY}\\\u001d\fG\"0ggӇmjԂ\u0007q\t\u001eh9uϬ4R.g\u000f\u0012JW$y[붫G\u001d\u001fvb);\u0011ľSZK\u0007\u0007u1^zdfg\u001dǴ{7ʭ\u0016߁/t8_1v\\}_,٥\u0003m.d-ه?3$\u001fX\u0000hk>\u0007Rx\u0012k\u001b}(\u001f/n$t2jEyT\rvYgQ\rG`@\u000b\u0006*VZ~`\u00055\u0012Os$\u0015SJ5M<3-T;ō[\u0004i}K\n6\u0007nRJ\u0012&IT\u0006#AR&B򶓐\t`U1JqYn\"ҍژ-U\u0015\\Tۻʩ\u0019)\\K\"emTweyG\u0015٘;bS\u0014/6M\u000f.6W\u001e^lL,hq\u0006ޅ\u001bDh\u0012D%\u0005`\u0019\f+`TSICI \u0003S\u001a3\u0012E\u0006+\u0019=>ʼ\u000e\u0002z/.'7^M>\t\u0010$2o\u00138o[\u000em\u0012S\nmQEb\u0017P\u0002K\tJݸ:w\u0017P\u001dKdgRvExk\u0011;'>]?+ME\u001ch%\u001e\u0016\u0011G{@E\u0012\u00033)b\f\u0017J|'ELH|\u001bLKyvH@\u001e\u000e9\u0018Qc\u001epp*ِC\u000f=tC\u000f=\u0003@6\u001eߕ9v葇\u0000`\u001c}xs\u000f\u001f-#csxG\u001f}\u000f\u001d;,:d`c?:u\u001f=vb~C\u000f\u0004'm\u001f9y~'N|d~a\u0017|'N<{̳?y'O\u001cȃY\bC\u000f<xt~2y\u0017^xӏphV\u0000?83Ͻp^|ṟ<\u0013?8\u0015`?r\u000bn}#\u000f\u0017<<ϼR\u0017=\u001f+`7菟~܅>~8WxM}ѯ_\\}3O.^pg'O=\u0002\u001dTl\u001f3gϝ?3<~~xOϞ陟<y\u0003\u000e?<vɧgMyc'\u001f?\u001b\u0013zɧz\u0012?WT\u001e?K\u0000\u0010\u001e=y\n8GF_\u001fF\u0003`?\u0000;Ràȿj7\u0007,?\u000f0\u000ee\u001fiCc\u0005x{\u001fѺ{Bvм#DwRvl\r\tI>R\u0018L\u001avNoȗ;=+\f\b#5#\u00132\\콥BȮ\u0002J\u0002uiw)K6nTԞ,tڕF\u001ah{C1)f\u001c\u001ajnC%İB\u0002A5\u00187B\ttj\u001e\u0011a-\u001c9HOrDJ\u0018\u0017SkjIBks^;\u0014\u001e\u001cFX\u0012ȧ\u0006\u0003*Rʤ?C\"\u0016edlRMra$0t5մ(T*Ʋ˙&F\u000bWC7!Y0\nw\\!PƗ\u0007\\2\u001c\\#gL\"vSn,ƤW&ºÇ}\u0015\u0006\b«J,K7\u0004}{\u0016A㩀nQzN/CES\u0014\u001fCMrV\f-&\t\u001cW\u00159mR!(Tx\".5Ţሣ|3*\u001aNLJ\u0015DO݉R\u0006\bbHCA\u0004U)WuQiSRq-R*s%\u0015P\u0003q\u000e@*Uٕ볶8\u000bN\u001d\u0016_lL5:keCTLo\u001d\u0018tn*44oMW.Ϡ\t6Ϊ\nutL4qgh9U\u0010Ɯs,\u001e\u001dQwE\u001ay\u001fcK\u0005,v5貂qP\bq)\nސF\"I\u00190LF1u,\u0001\u0005DwNQ膘Ò\u0015\u0018z\\r_\u0013['Lr#k.J\u000e3aJ\r[\r#}ѵOF\u001e\\~e82%#'J?\u001aI;4\u0013mg9~|Z\u001b~WG8±\u0004&U\u0015\u0004*\\Emm&\t\u000f:5H\u0015l.($h\u001d\u0017|MG<m&r\u0013E\u0002*T{wK\u001e*tyu!FFt.2z\u0002\f\u0006\u001f>; j\u001a\u0007\u0018DIN\u0015\n`\u001fev@\u0002:v:u\\\u001a>&KN8\\U\fϭ\f씁Ng\u001d\u0019ElUT6:\u0018x9\b\u001c\u001b\u0000c\u0019G\b$Co.2c\u0019&bIu\u0018P\u0013s\u0007\u0014$,G_8\b\u0016\"r\u0001\tl\u0005&S9$3xyYD&>\u0007J̩if%pJ*\"\r*_g3AX\u000b\u000fTTNh1L%eV%KZx)\\gh\u0006;N\u0018\u001fwfHK\f^;۶{O޸C\u000f;8h\u001d\u001c\u0007\f!p\u0019C}R\u000ef1i|\u0018\u001a<\u001cR08v\u001b,ZZ\u00044&\u0012̣u\u0002I\u001c@.F\u0003\u000f;8\u000eU;8\u000eAq\u0007A\u000f15})\"t:~\u001d*ﺵ1l\u000fcG=\tO)N\f̐i\u001dY_\u0001\u0015s\u0002\u0018|](UXH\b\f\u0000`\u0006\u001b\u0001CAξt\u0007I'CSXp`\u0018\"2O\u001d\u0001\u0003\t~(\u000fH\u0010\u000ew\u000e-{\u001d|j\u0015ws\u0007;,mp\u00075u\u0016׸Y\u001aw:_gi;,ms\u0007\u001dN|2\tɑkwѬ=\u0016Sy^7yd\u0013O\u0005ф\u0015njlj\t\u0005MU_mi\u001d}AՖU{ntj7|\rAX:!g\u001c\u0018tMt\u001bj]\u001bmx$KdgR}*\t\t\"vN||\u0011JVě8gK<,\"ҏ#K\f%\u0007gR\u0018;/N6J\u0005쁀\re=D_\u001d}v\u0011vW;\u001dj:\u0014iޠ#ʰ*\f꧴Y_Yjc,!\u001ea\u001d\f:)aΐ\u0015E\t{킛[\u00179E}%Ն\u0016_m3_m\u000bڒjK\u001d\u0012a-2_mE}!W\u001b+\u0004j}\u0015\u001bn׼\u000bCՁZq瘭X]mS];\u0012j˼\u0015|%ն&$k\u001aF4KoՆjC7κ>}O}1P<\u0018\u0011p\u001dF\fG'0աFQ\u000e\u0016a\u001a_mɛ|%o.\\W\u000fvWI8_LJ\u0015\u0006_m'sYvkŌ\u0016_m<`ڴnXY}6^w賝٠ rפOmH\u0011&fmg{-Y/duܘˍ-܀\u0012r\b}%/r;y\u001frC~/7dr#J/bcU˝=8_n8_nrCv/7dܱ8j|qr˼$Υ\u0019\u001d=YG\t5\u0018lqf7e+\fBk1LVFӷZl\u0018I0Ụ̃x⊝#gZ庪ǺP\u0002`X\u0017*\n\u0018\r>ܷ;\u001a\u001fkŷ\u0006\fZc]*\u001aqJ\tȠ1\u0007*Я\\Z\u001fk\u0018\u001cb}-Fu\u0011I5yYTeu^e:/bAͺSZ?b\u0001)xMnLu=Id/h\u0001s\n`\u0005P\u0018=fZTbS\u001dgb\u0006#AfmwuYm甜[(/u\\aCkC\u000f//tQqC+}a8JqC_j̳*\u0005)έyZl\u0014螇f6\u001c\u0019X\u0012eN*0~^93k`5M~\u000f\u0007֗Z\t|%?0Ԃ\u0011\tF\u0000 T\u001b$nh0)y(^Uy?{tR3\\mb]Q[k@#\r%ZQ0uQm}u_kڀi\u0006GSz$``QSRh\u0001/5R\u0002S\u0000XC_q\u0010FR-0\u0000uk@*-&c_jI|ޗz\u001a^־{_i,\u001e֞?\u00185Η__\u0019:_\u001a_K]c/\f-}\n=+|gi/>n;3٦/utndB\u001d{3Qfv0\u0012NBw\u001c\u0001=g\u0002&PRǣ)B\u0002\u0016!\u001d\u001cE0[\u0014!\f!JS\b(J\u0011\"\u00104E0+\u0014!¬ JS\b(M\u0011\"\n4E0+\u0014!¬ JS\b(M\u0011\"\n4E0+\u0014!¬ JS\b(M\u0011\"\n4E0+\u0014!¬ JS\b(M\u0011\"\n4E0+\u0014!¬ JS\bi\b\u0011f\u0002E\u0011\"\n'\"D\t\u0001w\"D8H$G\u0011\"D!op\b9\u001c:\u0007\u001e:z\b\u0016\u001d}îo\u000e=pdӏ?\u0011\u0001'O\u001dyv#O6\u0011VSǏ\u001c,3wr?ByW9dCGN;\u001f}O#|z?zgN\u001c9|W?\"\u0017\u001fzQ\u0010N?O_~uO}6;}\f{;|_6·?yG='?|__\u000fw\u0013Y?o\u000b\u0000}\u0017cτ\u0010{\tb4A&=\u0004g L\u0013T{&2(`\u0004A\\Q\u0016\u0010\u0005(Bĝ\"\u0014wng\u0011q\b\u001dxRJ<+A$.V`tz\u001b\u0016Ξ}y}p՛\u000bW\u0012\\\u001anϽ\u0006IK\u0017\u00176V7{\u001f&0&\u0017\u000f{k9\u0000JuH|[\u001bO. 9\"9ф\ngiG\u0010\u0018igLU\u000b6瓋o7\u000676Wo&\u00162\\ջ9\u0000[Wx$xu}+9p7?|//K0XONڣ+P\u0016\u001dB\u0006\u001d2\u001c\u000e\fʊ\u0019W{\u0002\u0011#p~\u001cM\u0017MƇsn&\u0004ܚ\u0013t\t\u0002(Ҧ_K\u0017\u0006C:Meӹ{?_\u0004~?{v?go\t?o\u0011\u0012\u001a}&\u0013\\T.Eu\r3\"\\Қ\u0014)EWP(\nc2.\u0014A\r\u001f5RʔԒq&0e:QU\u0011\u0018\u0000d(\u000eN.ig4hT\u0006 ұe+Ȑ/Ͻ5?&'7\u0017ńk\u001b[ׇp฾-d*z\u0012dmo\r/]ZPӀw<\u0016S#҆weun&Wﭭ\u000eBit}\u00002PM\\Ħ}}qcs}͗eO76-mÝ\u0015CϏ\u001f\u001eע#luj\u0005jo?\r6{[S&;kN SՔM=uՊQdA5Uu\u000emh\u0018gc\u0011od\u0016_[}ƻ=,׽ޭYmK/׹/{냵k[\u0006?蕋\u0019˗\u0017;olPx̋7^\u0006\u0006\u0019\u0014ѹ_\u000e{%Qv(\u0004RJ02\u0014hT'iKD[O\u0012(\u001a\u000e6|\u000066ӛg٥&^Lw\u001d朌D6!j稝vyof+\u001ePĭ\fW?\u001a^J[\u0018l,\u000f\u0016K/\u001en?\u001c,%uA3Ңa\tp-;\u001d~\u0011poaՀ^\u001c\u000eZ\u001flk\u0011`{L\u0000e\r0O\u0017QV{}\u0013F<3z\u0005Ƹ\u001bJtx\"`jtG:j\u0015mѴUjŞ\u000fҥ/pjW\u0002\u0003ߗ\u0002\u000e\u0002z/.'7^Mp\u0014`o\u0013`lo[\u000em\u0012PmQ\u0005\u0007\bP\u0002K\tJݸ:wV\u0002jjvLӮ\u0012\u0010o-b\u0017gE\u0003M\"\"H??w[|\u000fϰZ{@&E!\"Z龜\toi)OX\u000e\u001e\bP!\u0007c2){\r{édC\u000f=Б#\u000f=\u000fT!\u001br[\u001eǎ\u001d=\u0010`\u0014\u0010l\u000f\u001d?~|e\u0004}l\u000fO<裏cG\u001e\u001cݒ!\u0007'\u001eѩӧO\u0013s\u001ez0'`/?r\u0013O=SO>\\\u0005\u0013'O=sٟ<'?|!\u0003\u000f\u001eᣧL{\u0017.y?;\u0015\u001fN>s/\u0017_x'O\u000fe\u0005㏜z29{Byg:Å#\u000f?z3/%s=G\n?㧟;w\"s\u001fU)?^ow+z\u0017;\u0017/v_zӧKg鹗.\\xS@\u0007\u0015ۇsϟ{3,ߩ'9ӳgz'OCy\u001f;\u000f~gg<؉c\u001e򩧞C\u0004\u0000ѓ\u0000N>d4E\u0001\bg?\u0000\u0006<\u0003#5\f{3@(?\u000ePvͥAF\u000f\u0015_\u0019\u0019\u0015>\\aΐ3\u0011\u0003;pY\u0019VL9]&2&a\">\u001ftDo\u0011:+i\fzYi&gpex/t4Ti\u0012$\u0017vK1,UII66-eT*\u0016\u00067ɺi%Fz\u001bE\bU\u0000RTP.Q\u0004^\u001f`]RuR{\u001b\u0005ӹJR\r45YLg\u0019y\"j(d((#M\"F5\u00187B\t.#\b贎0\rkAyWPE\u0018\\\u001bka&\t\u0003d_!9@\u0015\u0007B\u0011\b\u0003ca _\u000b\u001b(G\u000f\u000b|R&]1\u001d\u0012.3\u0018r%Ud+G\u001aF\u0002EWSRA\u0014$*E\u0013Se3M\u00164nBa\u0014L\u0003tC*Z\u0018\"r\u00020\u0005,껑w4%ie\u0015L^nRG\u001abL\n\b[\u0013^\twQR]\u0019LhM\u0006$e\\( \u0002\u001fN\u0004m%C\bh\u001cjd-A\u0019\u001a\u0006\u00148*rڤCP\u00149\u0012HDΟ8(_9L\u0018%U$,1R\u0005EN݉R\u0006\bbHCab\n9\u00153*\rsJJЈ\\I\u0005}\u001f{ھ\u000e²C6V*\u001c纵8Ā\u0016 ЊS\u0006$Hy]\nZ\u001b\u0010F\nc-AKTMrcK\tK\u0006\r\n+ýV6T78}c-\u001d|;nDjc}\u0016JiAn\u0018yД\u0011ST\u0010\u0001>\u001d\u0013ȀA$TJ`\u0014l6c0ƨm&\u0004m\u0011UxP*b<e}Sf5vFuds܃VMg\u000f]FJ\u0010)ZkUSITB`!dbR&\u0017;F%(WPL\u0003zX\u0019+W/0̼f3bۄ-紜Md\\\u0014\u0014\u0007u\u0001KW:2\u001f\u001aWZ=|\u0018,/\f\u0007^\u0005.\u0016l\u001e;r!:Y9lã\u0014U8.i`k\u0010gnmEy0\n̦\u0010\t1d%.Pn\u0016\u0017z`N>\u0016S\u0006v\u0013!FSgӌ\bJ|A\u0004J(n\u0012=Qk*pc\u0006%\u0000\u0006Y\u000bK5\u0015\u0005\f\u00014|Eܷ;$cq\\Bb0{m\u0014RrW1<\u0017AE`\u001a\u0006@\u0005YJmU@\u001bbh\u00013L\tI\u0016B\u0001Vs\f9\u0004AR\nHVZ\u0018\u0016A\"tі\u0018\u0005Ed\\@Yu\u0018P\u0017V\u001f*)(\u0005\u0011J[\f2@) y\t*\u001c@\u0013L렌]9\r1;\u0017'\u0011,a\u0002D\u0013if/zv\u0012\u00150`\u0004,W$50rs8EA\nI-\u0003D1S[N~&f@8=,\u0012iS*n\u001a\u0006\u0001!ysp-Q^\u001b?Aщ*A\tC\u0000W\u000b7K\u001b[Օ[v7>vuVo?ĺ[\\{ϻ>\\^@&`\u0004铋^ؼj\u000fZ{{\u0015\u0006S0+\u0010ݙ\u001dq\u0010\u0016\u0006=$*ԛz\\h7(+`\b(.!Ѵt8r\\i\u0012ܰ8,-Nع2\u0016Y\u0004KŹUn%\u0005uΎ6\u001cvpsiIfC\\DS\u0006W`0v\n\tKH)<lݑɺh`\u0006\u001d2Z8\u001fI9(\u0001T0CN ]]Հ\u0002L`n\tPC\u001a\"\u0012iб:w-\u0014\u0002Jh^\u0011j&JX<\u000e%\u000e\u0015\u0000.f\u0014ԃe!\u0018\u0000\u0002c\u0007BnR(1:.%u\b\u00117\t[Ŀ8hbFST\u000b\tB$a&n\u0003\u0014`\u000b\u0005s#谴eR6\u000f\u0004;KN\u001e\u000e:W|F}\u0005\u001a\u0004\b& q M\f$\u0003\u0013@f\u001a٘\u0016vPo\u001777n\u0007\u0007\u0002$\u0011f>03`\u0001\u0017j\u001d2']N\n:\u0007@dQ\b8Gq-)P\n<;M`8x\u0013\u0010`0Qȴ\rRy(jq\u000e޾:\u0004\u0014{oĲ^\u0007:\u00186DٗavΦ\u000f\u0007#[\u001b?wS\u0005ύ\u000f\u0010\u0013<rYi\\<gg\u001cA\u0007\t%ɫo~Ku#ˎ\u000f;\u001d=lvb)-٥j\u0003hm=2cZ\u001bVv\u0017l/v\u0018?˾/ҁgFvfC\u0019\u000fps\u000045l\u001f\u0003Q)<x\tFrɵ>!6V\u0012G:\u0019<E*Z\u0006䳨Uz\u0002\u0005߸\u001eLvַdvg>nSTސS#\u0005).F5n>1!s<6)#8Un1<ͲZ$i2pǾ\u0016~5\"\btWpR7UA2ժH\u0005M]mA\u0016U1\u0007\u000f̄L\u0013\u0019۪\u0012bԴ(DvLPshܮLXNS$P48j.L(PpAI-A*t$Y@ni\u00044q\u000fa0릅\u0017iPO\u0012\u0019U+[\u00194ghqh\u0016\u0004\u0019\fs\u001d_\u0000\u0001\u0014I\u001a&\u001a-Jdl\u0005fؒKLI0Z p\u0010\f4\u001b[\u0016E&*uU.\u0011\u000eY;^6m8\u0001d\u0017\u001c]SY\u0015=Pѻ_8F\u001b]\u0018pgO^Pw]6\u000e\u0007V\u0014Ǭ'&i\u0013\u000ej2V\u0000j\u00025L\t N\u0018\b\u000eu71\u001eEvNJaLpHxn5 \u001a\u0018@\u0001{\u00065\u001345dO)ǫ|5}\t)&Z+++ƫ\u0013~}EO\u0012X\u0013~Ԃ\u001bw)εOT\u000ffF%BRwP\u001ahԂ0\u0019\u0013;#-(auIJhkD\u001bOej\"j標f\u001e儚Ҵ+q|#+۾Puٺ\u001e؅aqٸ'p?\u001chu7#\u0006ZueCf\u000fz,Mk8oò+\u0010*~8\u0018\"p~E\u0012\u001eay=cD)\b'B\t\u0012EF\u001e8w.YE$32\fA)\u0019:Lͣ'?p&\u00152Je'S9u7\bIA0aȑRF\u0001\tJQ\u0012\"\u0016\u0007H3]j[?-Z=|VM`\u0003▘H)S<\u0011\u0012\u0002&5\u0007\u0012H\u001b\n6߶LwN\u0007MdT4JvîZ\u000bo\u0002*y[;F\u0003/wf60\u0017\u0015\bxLS^Te5&o\u0016%\\\u001e׫×\u0007\u0013ά*}v0k\u0011,X5Obv6w=@g?7'(N(\b2\u0015l)<P,MYZå\u0016?p`I\t\u000eH\u001dՖ?.[\u000e@[\u000e Q{\u0017\tN킪\u0004\u0018u-\n\u001d\u0013T%ܶ1O\u000epϼ\u000fϪJ\u0017\u000e3\u000f\u00149w&\u001d/Ҡ0\u000bVi\u0006\r\u000eDEvy_\u0015\u001fuY1j5@Z\u000e^POօÿ%a;kzk\u001dӂi\u000e\f\u000fZFj0h<\u000b\u000en?\u001foO{~6zvƛt4(Augw]\n,\u000b\n&_Ⱥ\u000bRIŰ.,G\rh\u001cԑ%y]x\u0004PRHPQ]\u000b\bZ7\u000b)l}'YJ\u0011҂-l3ږSHqA5݂ʺhW'|~inYXD׺-\u0007\"\u0012\u0019Eɒ\u0002>\u0012BakM\u0016#kg@\u0001OpD{\u0010QlVlE6gYf\u001a\u000b#dbspI\u001deRؙ\u000f5t}/$+=ך\u001c7, ^}k\u0017M>̮B%\u0004\u001d\u0018L\u0012)L`j2\u0004\\v\u0003ڙLZ\u0014'o0]&?G\nYV9kt9-|`k7)\u00015\u0017[\u001a^.\u001a\f}3\u001eӷ%\\j\u001e\t3hj\u000ed -YR򦹊\rF\u0016H@/(\bM\u0014w@ً&\u001a\u0015\u0010.w\u0013hcLmxewsnp,UKpgDMGp\u0015\u001d\u0013+.\fGV(c#B\\RA\u001cOk)w35SʶIs4\u0010M\u001373]MM`&m\u000b.Ҿ\u0003\r<N<ŗL)ꭥMSsH(k:\u0014_JƟOJP\u0010v1o@ qn<uc=_ {]j?qu?\u0010D5xe\f\u001bD\u0013OqE\fD\u001cr㴲iB\u001a*\u0013\b:n\u00199L|Gv:\u0007\u0010\u000b\u000e \"m\\+e\u000e(Y!r\u0011++N'XGOzT\u000f\u0003.:Գ1F,b$v\u000e *GJ_q\u001d\u0019\u000b|D\n[\u001bَկlA\u0010\u0003i\u0007\u0006\u0002p\u0019+ɦJ\u001f\u001b?\u0007RWM@%o˞Smq\u0000w('\u0000?2\u000f`k#L9Ӥ8\u000fS9\u001cvXA7Gky@q\u0005\u00145mn-+Wp!\u000fn/\u0006n|e\u0015fQ\r>q\u0001\u0017ЛWq9o\u0017\bi\"=3L~P=0P\b!LE\u00064Dju]J(7n\\\u0011u#\u001c\u0000e\b\u0007\u0007\"?Dh\u0012\u0011j!rE\u0010\"KD\u0015\u0011B\\\u0011!\u0015\u0011B\\\u0011!\u0015\u0011B\\\u0011!\u0015\u0011B\\\u0011!\u0015\u0011B\\\u0011!\u0015\u0011B\\\u0011!\u0015\u0011B\\\u0011!\u0015\u0011B\\\u0011!\u0015\u0011B\\\u0011!xI/B\u0005m\b!\u0011*\u0006p\u001f\"D~36С\u0007\u0000\u000e\u001d{\u001e{xñ\u000f=p\u0003GN<\u0013\u001a\u001e?}ܑ\u0007l\u000f\u001f9~\u0005Ǡ\u0015p#m\u0017ϝzgǰ?{\u001cv#'>\u0018~G̉#PGO^x}/1~ꅓG-\u000e\u001f;?}\u0018O}6;}\fkO>/|᛿|'\u001f5~,W}\f?]6Od5~w'\fo~nBCC\u0007M\u001f\u001f8w\u0015\u0007nv\u0007o\rry\u0007p-}+\u000e\u0001g_^\u001f\u000bnT\u0011RO*H}:a&zsu\u001d\u0012F\u001f={×\u0019\b\u001ftz=/@\bEr\u0017\u001cߍ$c\u000bWO\u0016]Vly`Dg\f\u0007\u001dcɰ3`!t8\u000fSiZX{ޘ\u000fUߥ|\u0004{)Lx}W2?%\rgS%Ï\na4p\f1d\u0011߲\u000fԆ\u001eDk#N\u0015\u0006\b+\u0011\u0016TZZ 3ك8c_N\tFr\u001aY*w$ҵC%®yXX\u000b\u0017b\rԋ6R\u000fO52&9MS\"4\u0010\u0014\u0018}]((IC%y\u0005`c\u001e\u0015{\u0014:\u0002?emta\u001d#\u001f6\u0011T\u001aʒ3\u0006<l:\u0006f\u0018\\Ĭ3\n]a;¤RPh8Y\u0012\u0012%\u0005{\u0002^s<\nBtH\fD\u0012t\u00104jH\u001cQ\u0007|\u0015\u001c,I96u?}8\u0010f\u0012:Ѧ\u0003\u000f\"Ab\u0018qM\u0012gجwO4tk\u0004D)\u0012\u001cYU(jaPI\u0016\u000fDWY︟\u0006DQY\u0017G]ŷ&p1!acs0\u001cO\u001296)}*1I\u001bkw\u001a\u001e.䵍[E\u000bfS\u000bf9YP\u0010;\u00172\u0019i;\u00042UMT|\u0007IXC4Y\fa\u0010:`ɽ'@6`.`\u0002Lp\u0019\u001aM5NМJB\u0005iTH8+6~!k\u0019+N$0@\u0002\f[jу*\u0019R,\t\t\u0017`?\u0014Ff4\t䄳\u0002kJCـՈV#Zh5i5\u001667{Yx'~4\u001c0X\u001e.-\\M^_=|\u001f?\r?\\rXLQ[)`7\u00130,qy/\tF\u0003\u0004#St\t#L`l]JLsvF\by\t0\u001c\bS\u0007\\Oդ%\u00041>|bpkh\n+\u0014\u0012ɘ#e*[BcƠK>\b\nM\u001e\u0011L`\u001fØ\tOE d\u001bf]\f)l\u001fpb.ek.W ̆zI\u001e\rнy6ZKa\rJSF.`t9L\u0012KT!{R\u0015s͹r%5R\nQ\\f8\u001but\u001b Q\u000e\u0003`peVva\b!\f06Z,2Ha`E*\u0000\n\u001bLR\u001c0h\u0001$3\u001e(\u0010˽L\u0019\f\u001e\u00151N\u001c\u0000ڽWgam}`\u001d:/\u001dBiooyPR\t(F\u0010\f\u0016\u0005\b}Sn;؁6\u0006Z\u0006\u0003m,ƈ\u0013(-:\u0006/wz)8>ڮ1\u0017\u001a\u0018m\u001e$\u0016A\beb| N\r\u0012q`\u0018\u0003\u0011\u001c\u0006,s\u0006\u000b4F\u0019ԕBX\u0001;%\rd1\u0012?3Oφ\u001cEC\n,kJ\u0000\fc@\u0014<WpPnR)A2.,\u0016\u001am\u0005\u0006e\\Y\u0014B^a\u001cS\u0002SDYMkF\u0018\u0005\u001bDM1L),mL\u0018(_21LBkcb\u001874>AD{\u0007\u0014'\u0013vI;X+W\u001b\u00029S/ݼ̺MZ\nL\u0004\u0003Z3B%3\u0003n\\r{\u001by]TxLꂞlK`ZU7\u0017q֢YV,3ʶ_īnnzJ&@9\u0013P\u0018\u0005Uk\u0013֬j-ZrT,w\u0016Gy<WbIn}`8#He?G\rcoczΫh|\u0018\nթ& \u0006l\u00147\ny\u0014N\u0019&,zV4ZKAN!B'Ճ1\fznYz\u0014^v3\u0001B\u001el!\u001f)\u0015\fי}',\u001b}jWC@d[\nB,U80h՞ZjWff<B\\\u001dШ$c\u0011\u000fH\u0005\bqJ$L[E޺18\u001c\\\n\u001bܶ[7/\bF6L\u0015\u001bi\u0019֭-(|u\u0016߅\u0006Ym:U\u0014WVkIn7\f$ٍ0q+\u001c̋V\u000f:e):1˪\r\u00180z`@0$\u0017p\u0000E?\u0010!B\u0013DP\u000b+\"\u0010Y\"B-D\u0010B\b!D\u0010B\b!D\u0010B\b!D\u0010B\b!D\u0010B\b!D\u0010B\b!D\u0010B\b!D\u0010B\b!D\u0010B\b!Kz\u0011*\u0010oF\b!^P5W\u0003M\u0010!B\u000eI\t\u0007\u0007.\u000b]q\u001c\u0010,\u0007/\u000b%t\u00005\u001dX\u00070A\f\u0016k<{5}5}a w\u001fb\u0018݇\u0018\u0006r!\u0003a \u0004b\u00180\u0015\r\b\u0018ң\u001dA듕\u0018Va|HjVa )~\u0000\u001dM\u0015\u0001\u0011eTG\u000e4=!\u001cS\u0018H]\u001b\u0006R@rS\u0017\u0006B\u0018H\u0016@tL\u0018Hfa ݯ<^]\u0018H:Vf0Xkqa u\u001e\u0006R\u0017@\u0012\u0006\u0012Z^\u001b\u0006\u00121\u0013F\u0010\u0006r\u0019\u001d1>\f$`0y\u0018HY\u0017\u0006\u00121U@%a saUCi\u0011\u0005~i\u001e\u0006\u0012օtE\u0006a }؟&\u000f\u0003\ri\t\u0003}\u0018H=\n\u0003\u001b@j\u0017\u00062 \u00120w϶0بa c@\u0018{\u001aKпÀ^a t\u0000J\u0019&_\u001216\u000b\u0003\t6S+.\u0014S\u0014#,Z(\f$<\f$>ԇZR\u0018Hy\u0018Hk0E+ć0ՙ@)\f$\u0016J\u001e@\u0016g\u00031\fd\u001ajDƞ\u0004ڇq \u0003\u00010!\u000e$f\u0003\u0018q \u0019\u0013\u0007\u00123@tl\u001cH\u001e\u0013\u0007\u0012]H(+\u0003c\u0014\u0003M\u0005TKQJU\n@\u0013ƁvE9V\u001bˑꆡ\u0014ի4 `~Aݯ\"8ЯY\u001cH,RV#T@℧.\u000e$\u0007p@ZNh\u00036&\u000e\u001d1q ǁ\u0016\u0007\u0012ǁŁ\u0017\u0003iQ\u0012\u0001j+Zz\u0015\u00126+b̭b_W@\u0016Ǩ.\u000ed8\u0000a1L+Y\u001cH*\t\u0011(\u0015\u000b\u0013)0P\u0010N@ q !rVD2Rm5۟q \u0003ҫ\u0003q \u0019\u001b\u0007\u0012@r3.\u000e$掍\u0003\b\rq 1Kzy/āt\u000fa\u001cH^\u0018q jVV@V{b%Ł,F\u0018\u00072\u0018ʊI77'\u000e$tV\u0016\u0007\u001b>ny\u001cH\u0018\u0007<\u000e$\u00035-\u000e$bāDq \u00186Ɓܦ8܌\u0003@ކ\u001f8>b\u001d\u0002%b@\u0016\u001bS\u0013\u00072쉪El\u0003Y;\u001eun\u0003i3∇o@\u0000@A\b\u0002\bfZ7!\u000f<'\u001a\u0012;\u0003#a8(-kE[clŁl8\u0013,\u0018@N1\u0019$\"P\t8G0\u001d\b\u0018A a\u001c\u0013$Cl lthdJf\u0019-\u0014`\r0\t\u0003\u00047\u00163w\tK>\"`9\u000318\u0013\b.@\u0010|\u0004nvݣ&Wy\u0015I+Ż\u0002w.4\r@ֺ\u0013H\u0005K\u0010K\u000e\u0001*W\u0000kpKsU0B'DPa`*U\u0010\u0002b_)MS\u0000\u0003\"Q)\u0016تT\u0017R&$0\u0005R\u0016iޘX䔐-;\u0011gL^\u0010m^Q4\u00048\u0018Ll!8ri\u0000t)\u0013q\u000bg8\u0000\u001c]e\u0010^Qf3ƿ\ri\u0016q=f\u0003\tkP\u001440=\u0007'j:ZI\u0001f&p<z\u000e1lmdXumj\u0016`컬\u0015}\t+PW*7v*\u0006\u0005\u0005R䆒^iy\u0004\u0014*Y\u000e\u0016\\\u0015*`X*)n\u0004\f\u000fAqѵ\u0012TV@\n+H+xwA),\r\u000399\u0003Ff\u0015h.Pvh\u0016X\u0004T%\u0003\u000b\u001b\u0006p5;\u000b1\u001c\u0007|\u000581V$0KaraU8Lwa\u0004$a\u0018~\u000fHQ\u0018\fNW%ĨiQ\u0014tLPs-j&\u001576\u0005\u001ah+Q\u001aSfn\u0002s^:.\u0007\u0003\u001csz\u0007I4_<::ZqVhJ?}ǞҠ\u0002\\A5/Ҡ0+\u001f\f\u001aX3}bt\u001cdyl\bt8\u0004PCAIV=]\u001eMT\u00031Eq%%f\u0013-%`9qK2a`A\u0010 \u0018\\U\u00021+%g,k\\\"\u001cw\rvm*1m\u0002\u0018AS\u0004\u0014{*X+./B\u0002DtHz\u0018\r$Ώb]6\u000e\u0007f\u0016j[\\\u001c$\u0005,m\u001e.nnܾpSB-%Z\u0019\u000fg\u00165W뼗s\\.\u001fC]oP\u0001\u0007)k`\t`\"S{\u0006S{S*9I\u0018VC./c8ijIȒt[0+\u0014\u00124r{1I\u0004\u0004KӋ\t++/w\n\b\u0013-\\8\u0018!%P҆LͨC+\u0007jD*-\"(\u0016*czu`\"7z[O59bIbx\u0012\u001b\nLUZa\u0006P\\d,,`aZ\u001b\n\u000bX-, 4YR\u0001qMPM'b\u0001OpD7\u0013\u001bm\u0001eL+\u0019p:Wd2&W>\u001dezS\u0005\u000b\u001dG23^\u00102i\\h\u0003\rI\u0005\tAُvN\u0010x@;\tW\u00040\u0016\u0006}'Z(=N2c[0]Q.gzw8\u001a\u000b,\rK\u0005\u0004nиZ;a\u0004K#A1v&\u0018M\u0001\u0016\u0016^Ғ%\u0005\f^ULg*>\u0013!`zdGBzYFAh\u0003^\u001c\\#\tF\u0005\u001d\u0004'ژ'6l\u001b^\\j;\\6\t\ry ەt\u0019\u0015\u001a\bw2(G^c\u0014<.ۏ\u000b\u0010-fTPt\u0017[\"hw\r)\u0003+eۤ9c\u001aj\b}]rKi\tԤ؝-qaEC\u0013IOP~\u0015m5ꭥ#q{bX\u0000/-Yi\u0001ҵ:$%\u0003$[BSz\r\u001dID\u0019I\u0018]Ncv\u001dF'}ct{eO0bhdN\u0013T5eSaO]Z{:chp\u0000knc,0\"]u\u0007t,w\n؟ײy\rvSzՇ(t,Um\"onͪiS]$?5ů?mwdF'_\u0004\u0014[H\u0006\u0006bGh\u0000k$hy\n$\u000b(]3\u0004P\u0004\u0015\u0006Ѧʞ\u001b`)\f -wV\u0013fC\nI^w\nZc>S\u0018\\\u000fv慀<kR0B|Q\u0004~j7#$t[yhd]\u0016\u0014\u0005H:Dj-m'4N]N4b\u0016m7!\u000b_e;%vJ~aDʣ\u0012KnDN$:nkwa]wp\u000f <PR\u0006\u0011$x]\u0013\u0019s\u000fpK/d@&Ik\u001f22\u0015ŲRuϪ曀Jޖa5d)o]o@{\u0007;?js+E\u0002ĜPO\u00070\u0007F(k&<H}ZivE.8B7\u0018Mc&1.{jtKi=Қ\u0003\u0014\u0012i\u0010z\u0001Vu3 \nZP!ƕ̀s7mEZER]\t\u0001`EƲ|}Y)~&I\u0011\nF9KG\u0012U$9\u0014\"`RC$MeNo\u00016\u0005\u001a\u00157D\u001a|q+Hqkd]3ll\u0000p\nF9\u001dr\u0007\rZʹV$E\u0003'(n\u0012wk\u001b\u001b-5%¹~rK\u0014f\u0002*RO6q[R%%\u0002\u001f%V1j\u0012\u00032?aP\u0010E!Rc6FS%r]RrKT-\u000eϪnrM\u001b'_n\"&ֹ%/Ҡ0$\u000bnVi\u0006\r뙩\u0012n\u0010#DtX*w9&չ%f&[Ƹ%\u0002\fiqK\f2(,\u000bnAKvN͇v=[\"gm\u000b)<ߛw[tn8?ksK[\"X\u0019%1v\u0012?6tP\u0012eZuKĹxD(k\u0019&#Kҳ8W\u001ds\\EZ\u001cז`{K\"ttK<ػ%բdI\u0001_W/fB ea^ܐp\u0006n!W[5ĦZM\u001b\u0015+w\u0013xw?׶z\u001c\\3\u000f,(%z\u001b#Fn!eRv\u000f*%ZS\u0005\u000b\u001d϶䣩٧2i\\h\u0003C#nE\tL(%\\v\u0003ڪX\u0018.~hqxKn2\t\ft9)|`k7)\u00015\u0017[0Jnΰ[bH=\u0012\u0014\u0019\u0012\u000fd\u0006n!\u0007ʛ*4\u0018\u0019R#\u0001,\u0006n!{\u0007Y- 6A\u001dY-1$\\'8?-iz\u001f6Xݭ= q\u0002\u000b0^Q\u0005ɖД^C4zE/\u0005Ď^\n\u0013c\u0007/\u00056y\u0007\u001cj=ȴvP\u0007t=Ȕ=ȔD{\rvS/\u001edB\u0016usQ7͢\fӣ\u0019vvtR\u000foGOAFwL4{\u0013H6\u001c\u000e1=\u0011IWVdg \u0019K1\u001eYA[\u001edZOA\u0004\u001edLAV-nmW<\u0014\u001ed&wѦnvѹSfu?o[,\u0002\u001f[Jc8\u001f\u001a\u001fo\u0002*y[f\u0017s0&sӰG돖;qb/kq?ZNSEZs\"8\u0018}s6\u0013T\nx\u001fC\\\u0018?e\u0006ן*R;\u0007S\u0006ן`\u001c\u0002ן`,\u0003ן*FO\u001d\u0004^=Pv\u001f0L?5M3žst\u0002ן*R賃4\u001eB-?-?FT1j]\u00022NP\u0000E!Rc6FE$k_\u0007S=gU\u001fm\n?\u0019ͮ?xT\u0013\\\u0017iPOٮZ*͠u=3]D2Ҷ\u001d\u0000ww\"x\u001eCk]f\u0013-c\\kj\u0006\u0004o9(J]KvNn߁i֙'m[MC+F$\u000fmZ]*8k\u0015l\u0016\u001beEן{ן8\u001d\\\u001f0G\u0015\u001f`\u0016\u001f*+k\\IȒ\u001c(\u0016\u001f#\n{rft\u0019.$Xj\u001e품swK;bEiɒ\u0002^@˄@vRЖ\u001bp!,\u0005?!\u0007E^\u0003QO\u0014\u001d\u0004'^ۏbm=6\u001f(Z\u001b:ʤn\u001f6\u001f(ZS\u0005\u000b\u001d϶䣩٧25Hh\u001a<\u00042S\u00069\u001f!,#,!`vZt)JOPߴ\u0013.~hqx+?}:\u0007K#\u001bl\r&%FBsK#\\\u0000dhdO\u0012P.zo\u0004sЅ%S\"p\t\u0019<P<W\u001d\te\u0019\"p\t;,\u000b?\u0005\t(K?!r\u0007?6fĮ?;ψd(L\u000e+\n=,|Yw]\u0017e!\u0002UG$#&\"g\u0011ɪ^d5.a\u0001o)h'>\u000b\u001d}\u0016&\u000f>\u000bDE2zB\u0017$Lt*@Ǧ?Is\u0010)rD7/TQ7G\u001cu8L+\"Y\u00145;Zz\u0016_Ƚ\u0015g2\u001bdΩPQ.wt \n^_2f4\u0017C\u0011Ñ3\u0019<LLD\u001a:I۝ɂvǙ=Rk3$Lqdi:g2Gg\n\u0015\ttL&\u001cL\u0006\u0014\u0015:|\u0013P۲7DFg#:3Yj2g2`̙1\bemd#O2\u0010vO*Z'Y\u0015)J\u0016O2Td\u0001Z-\u0012k$'YQIVA$\u000b\u0002ﮬ͞dmdi$\u000b!$\u000b2$bzM$\u0006i$K\u0004d5MIv R1\u001bY\u0015)n\u001bFgApKd\u001b$ō,s#\u000bTª\u00185-\nȂ\tm\u001bvo\u001b$Ս,qnbg\u0015720\u000572\u0014F7Tx0U\u0013\u0017iP\u0007F\u00166gs#Kr72αnd\u0001s\u0011&ո&[Ƹ\u0001\fhq#\u000br.bAQ69g\t^[\"vN\u0006\u001ag\n723\u0005hTэl272UqvǍLYGKS/\u001eP72:e72]w#C\u001dXw2$udI^y\u0018\u0014Uw.\u001doK@=\u001faэ`d\rKҒ%\u0005|]̘\u000b얅r92s)k\bg\u0019FV\u0001q@޹t\u0018Y\u0002z\u000e\u0013/\\GږҴ͍\f0JndjK(\u0013_|nbh\u001b\u0019b\u0014ȲzSCnd5\u000b\u001dG2&܌fLiswCޮޚ%^/L\u001e~o3ÒN\u0010x`ih$=š%7\u001ažo\u0013-~\u001eoaTՍ,mndi4ٚ\u0004H^hF672(Z7\fӷ%\\j\b\n%э\u000bKfYTF\u00162x`lF\u0014\rL@/P\u001bY\u0001e]p#+MPG]r#\u000b\t;`\tN1Ol&u#I@줢CʒXQ\u0017}\u001c7\u001f4-j;>d3ض>dm硵LΔЍ\u000fG>^g\u0017ʥWV׆X\"<~w\u001b\u0014\u001c\u0003_]2|?ɍ~PO\u000bF&\\&Ma\t;#G%mA#\nT㬭\u0003\u001a0\u001e1?w\"D;\u001f\"D01D9\u0010a\u0010E)B\u0019B\b\u0011f\u0005Q\"D!Di\u0010aV\u0010)BYA\b\u0011f\u0005Q\"D\u0015Di\u0010aV\u0010)BYgc8\u0003O(ޕǲ4{Բ3&)\r{8Ӻ9]+*qZlJCⰻ\u0007\f`[P\u000f\u0003\u001fq7\u000b\u001a\r\u000e\u00025Fڃ=0k{\u0011YUY]]\"[\u0019vfDd|x\u0011/\"?^hBi\tA\u0005&\u0004\u00168\u0010dZhBi\tA\u0005&\u0004\u00168\u0010dZhBi\tA\u0005&\u0004\u00168\u0010dZhBi!\u0010d*\"\u0004\u0016R\u000fA'\u0015̺^\br+Q5\u0010\u0004#\u001e79\u0007\u000e\u001cD\u001c8З]wv0m\u0007\u001fB\u0007\u001f޹Cy\u001c<t\u000f\u001fgJ\u001bhŎ?|=\u000ez/{vFڭg}\u001c8tÏ=ʫ]{\u001dykc\u000f{\b$s{\u001bo~mƵW\u001dN\u0018N\u0007\u000f?}{{7^}=pI\u0007\u001f||d\u001e2koG\u001f#\u001fo]k2ɴ_\u000f?Ff\u000f{6J\bJ\nL\u0015(*P2Ud@T1*\u0019\\e\fpw0`hw;\u001cC;J\u000b#\u0017\u0002\\߹»yw;\u000ey\u001dr|2D\n>\u001b\"$\u000eގ0xzrx+[93?wdqIBr|y+ٜ{\u0012V\u0017\u00167N6z\u000br\u0012GGC\bDOm]\\Av\u001cG\";\u001dm\u001a0\u0010]\u00157\u0012F\t\u001dfEbE\u000b\u0017zkNr~ksw1:Dt),/]t:͒D\u000bKťg\\}_QqȎh0aYC$i11q(\f+kq\u0017bwϑh12?G)\u000fo2i\u001dk$eѥ9AM8`J\u001f~,\u0013\u0017^̧*<st_\u0007r#8\u001f}_^\u000f\u0019]ß\u0007oGvCHhBhDɋd(\u000bQMÌVX%+\tR4\u0005\u0015r:\u001e)|\u00003M\u0002Z&LI-\u00196j\u0014C&(!\u0019Me\u0010*bh\u00047MɔQ\\HEut]cNNiШ|6\rZu\ny܅9\u001b\u001d=\u0016|\u001f\u000f|@r$œl\nNwq=9qbIG\u000e5\u0015$k\u0017_JS1eЂ2J+Zgl/^:<rƕ^\u0007\"4q\u000466{./\u001e.g2\u0016Nnl\u0014wj}/]NV\f=6{Bڕ˃<SG\u0012/ֶ_\u0012w6֎&{5ߛ\u0010ȎjvzU˷kOB:K3\u001c?&4\tW2\u000b\u0017Ϯ!ve=\u001doƗ.g\u001dιkĽzd|)?˗\u0004\u0007RY:yrݾriyc+vOraY00\u0011\u001d=ĝp\u0016\u0012D\tf,ʆpB%B\u001b-B@Z=\u0016}zJVa2,1`;`cyj9?Zeb.˭:&˭7]\u001a38;\\켸\u0019\u0013\u000fL╭(\f^I\u0006g-v6Z]}u9|)~9\u001aR]f\n-bo\u0017lh\u0017 1}&Ɩ\u001b(\u0013IrpS\u0010R|\u0005\u0018*y\u001f\u0002.^a\u0016_N\u0000UÑJUhU;vK&at,\u001aĬ\u0011)kĚ2f-7\u001d+Zcv#\u0006}%kHCH\u0006\u0000V*ΤtFԇYF%l\u0016X㶊`\u0013Vb2ؚYq^fP.-.\f\fM\r\rAM\u0002\u001chcV\u0013\u0017\u0007$\u0011\u001cO\u001cEa\u0003?\u001b\t\u001d\u000e) \u0001U\u001ap\u0015\u0010\fvyؐo\f7Fp3M ^i?kCAFSi\u0018.Y&\f\u0011i\u000f\u000bG'gÉ&Z~]!5\u0019`\u0011\u0006\u000e\u0015\u0000V\"Cs\u0015I\f.7ACqQz&Ǐ\u0010Y=kak\u001443\bBPS)W\u0006rb量F5=ŝ\u001dN\nOwfr\u0010LK\f*b\u0018\u001d0@\b\u001f@\ne\u0017>&hMlz!\u0010t\u0017^kD\u0013}9l\u0005Y|.0r&\bpy\r+65\\X\n\u0004c\u000f%z8ِ\bB,4\u0006\u0014,8H\u001dwi-\u001diR\u0001ӄ6,s\u000bYpYBC\u001bD=\u001b\u0012AYJ]\"4H\u0001Cא?/w\u0005d\t\u0013+!\u0015e\u0007\u0018\f\\9J\u0011qKLړSS\u001ax\u0017܉9>o\b<\tIa5H\t\r B>(Z\u0018t;\ty\u0001\u001b\u0016\u001b  J\u0011\u0006߈q\u0003\u0005tw\u0004#Ld0x:BC2ʬd \u0018#lem\u000b]\u001fUړp\u000e\u001c<\u0016$֫'kS\u001bmuW_J6/CI\u0017NP\u001dQXzԻ\fv*{\u00146\u0019n\u0011qIו\u00166h?\u0001{\u0006\u001bТo%I(xq\u001d\u0016]x+\n\u001f2\u001b\u001b\n~AT0G1\taP\u0007 P\tpB s9-\u0014X;\u0016Ed\u0006$HDY2%\\`K,ө\u0017,\u0007\u0014\u000bu\u001bҷ .\u0018\n'\\j%2ⲥ\u001c\u001a\u0005pQ\r\u001a2/tPP/jCC`}\u0018\"\u0018a07\u0011.\u0002Bǉmx]\u001b0>Эn3n3h\u001c)9\u001c0aXi\u0004j\u0006\u0010i܈gn\\hu.OK\u0011^w]:A~q\u0006-$h\u000b\u0010t\u0000\u0003`E\u0016J0M\u0000\rm*mĔ:\u0011\u001cCa^\u0013.\u0010!\u0002VIni}a@{rr\bƆQ~IT+?\u001d/]ɊOIVz\u0006t2܉L6\f# FKA\b\u0018^\r6z=ԧ67._N+a$\ff\u0010\n\u0014z\u001aV\u0016Un\r\u001a\u0016$\\n;:to\u0005a'\"8q\bo\nթ\nüNAq\u0005L0R)\u0015YE\u0002Û.$&j\u0010iw[\u0006ѡV6(wr^|17]YO}\\$=?\u000evqX\u001d|%3U\r\\y,\u0016ßR81O?6.kw:\u0010rDIt.s$\u001a/{Q\u000f,;ًmwк[{\u001dZ#/rPmS`lkC/ok~\nl~Nd~^dc8\u0017dGV\u0007vf܄?3$/{\u0011\u0000La7:+uEg7P{\u0017n\u001bA+Hy[aw-qkэ4W\b>z5%t{*}rS\u0011S\u0006+\u001d\u001aRvf\u0014\u001f&B\u0017$\u0019-\u001f\u001enZI% {I8\u001aHB{'!4ZW4Z=Ps\u001dX&B٪\u0018ò\be\u001al:\u0006@Idˍ+F,T۽疩s݂نv9mb)B\f'!\t\u001c&on<:\u0010\u0016`\\\u0011\u0003+3`\u00013K\u0005)4\u001e9vP\u0017¡Mhg\f֦~\u0014L6PYnS\u000fuȟ\u0013>*78\f'wl(A\u000eJ;-a\u0001Kd\u0012\u001d\u0006\u00045(A\u0004@\u001bU?l\u001c\b%A\t;\u0006/!\u0007~ۍPBna?0\u001dnW\t\u001d}b;\u001dQK~pjҋ\u001bĽT{F)\u001bIG\u001an\"\u0006\u000b\u0018`wk*g<\fO'?>n \u0017\u0016N'//VZMxAYd\f\"X\u0004zPg&z퓋o&G|5k\u001b'`[YG\b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \b \u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004A\u0010\u0004Ȃ#:x~nܑ%\n!ds~I\bZ]X:ZśW\u0013.F\u000bI\u001e\u001d\r)#H\u0012=vq\u0007zr,:\u0012\u001e\u0006]\u0010-.\u001bRӰ]\u0013#X-cZ{\\]..1\u0011-]/&ˮ~\u0017.,N$Ro+:zjq3W_%ۭDh\u0014i\bJUaI\u0011\u0015\tcZ\\X?s\u0017\u000f\u0016ZN\u001b\u0013.dNwq=9qbI@Hu&YV̾z!\u0013Rx}SE\u001bWz\u001dpB>qS\u001bds\u0017\u000f39D\u000b'76;ŗ.'{+\u001e\u001b%EqgAjjHZ\u000bWfQd/{\u0013\u0002QMَRjvI(Yg}>:Rr<\u001doƗ.'|\u0016%=\u0013:\",_$\u001e2vʥ卭\u000fiʅsgaɸ2\"$F\u0011֔[\u000fZY.%J3#\rWVcݼF*LWPͭF\"\u001a\u0011Uw\u0006;s*:z,ZK\tmЊYne.\u0018AKbΖ\u0018-BL!~n\u0000dqI\u0016'l]܌ө\u0001fhF\u0014\u0016k$˳\u0016;\u001bduqɮ>պltV\\]\r.W|31Kz\u001b1\"t}I]qq\u0001៦R\u0018XG\u001b5\u0011i\n8S\u000eS'X\f\b\u0011\"\b%\u0018\u0010E\u0015\u0018\u000e%ڸ$Z\tM +%ec\th#`9H!5[FW\u0016]u>/\u0018o\u001aj\"Qcё\u0011I?g$VM`\\CMT1ѺKT)\r\u0017M\u0015\u0010b˕\u0016dwpt\u001afy+\u000f_} P.A#m3W\u000fQȷ\u00024zzłx\u0001De9\u00156Q\u0012ɞ߉d\u0007\u0006\u001970`2\u001bU)\u000b\u0010c\nj?\u0016 \u000bL-W\u0010LOl&Ʌ^g]OaRZuo\u0000J966X^9+\u0016_N'\u0015(o\u0007򢦪9Ga\u0003\"\u0006p\u0010\u001d7쒆ְĴъ=lq˫-\u001dR|a}H\u0006\u0013\u0013//$_J\nOHO&\u0017z=\u0006\u001c}\u0011$}:yi,d( \u0011,m\"\nf֕By\u0002\u001e\u0012L!\u0005> \tT㈯k\u0012m'Ȭ\u001d\tJ{Vg\u0002ʼ~P3\u0001e^?(A\u000fʼ~P2\u001fy\u0007e^?(A\u000fʼ~P2\u001fy\u0007e^?(s5Ϡ\u0007_O*u'UFjc*S\u0007\u000e\u001c\u0003\u0007%\u001f;\u000fU\u001b㶃\u0003\u001d\u0007\u001e|&\u001e|{\u000e\u000b?x\u001f>Δ6\u0015;\u001c:=w#_8j]\u000bg}\\\u000f\u001cǞ׮^\u000b^{\u001f{CP;;~koݷkoqs\u0013~\u0003W;W\u000b7^}=pؕ}׃|\u000f>\u000fמW\u000f~ȴ\u0007\u001f}\\\u000b\u001f}[Z桬oL\u001fۯl,U\fY3c߳\\r6u,3ݗ̌\u001b>\u0012]\u00117x\u001a)h)M\u001a\tHИunt:\r\u0011m$HZvH\"dr߇>>\\'\bɅJq>8'3%\u0005'HyY\b=:BVQ&BpKMŨ4pd\u001a!jc5\u0014蔻П@^g'}Ko\u0004V\u0019ҏ-ۦGYYw~b)uIi(di\u000eN+>o/\u001fK\u0004fh=/\u0014\f%k8p\u000e\u00034\u001b\u0001C4M_m<*\u0000,;\u0000}J&\u001c%g\f^phoP\u000f7?xtc%t֚\u000b\u0011\u00153*m\u001a]^Z\nbr!i\bL@\u000fL%t \u0001'ܧ秳)'dYڦP%_$t\u0005\u0010\tA:0H'\u001c*aZ\t$*fS\r\u0003}\u001c*ƅKi@\u00137thUB\u001a\"\u0017\u001b&'\u0017DD\u0016[7֯lUCaГ\u001b\u000be;v\u0018r22y\f,k\u0007a=\n쨦lG\u001eڵ\u0017:Fr8\u0011k\u0002Qk`1SomR3J HR%1`*ɀY\u001dk8\u0003qdUJ1)F؄)Ƭ`\u00183Pk!R\n}*N$4\u0014&j\fGc͊\u001aI͢ZXT7uvy{!f=\u0004(d\u0004tѰ]\u0014Pva\u00151#*V/6J]K;PhB}\u001a,\rhEUZk!;6Kwwy\u0003t\u001b⤋J']Mm\u001blȄ4t'݊MW]82T.M\u0018\u0007]\u0004Vg\\'(Y\u0002\t(A\u0004y\u0007e^?(A\u000fʼ~P2\u001fy\u0007e^?(A\u000fʼ~P2\u001fy\u0007\u001f\f>\u001f|ݢf>`ڟTI\u001bY\u0000:\u0001:\u0007:蚁#\u001btЅecltU|\u000ej_\u0019g/\u00197A\u0017'ݵiĉa\rڴ\u0011Y\fUL\u0005.Vmb9khBdCHmĭ6\u0012QD\u0012զO\u001ctI\u0006\u000e\u0016Η\u00154]}Wi^*\r\r~Iy(:\u001a8xjK\u00196pͥ\f\u001fuͥ(5\r\rޗғ);\u0019pƾy5@\u0016\u0005\\Mm\u0018\u0015wE4T(kTA0J\u0013Tj\u0017rSrQK\u0011nV(\fR\u0001Np,x\u0006\u0015]~sm/:*fUx5h\n=(~5tI!0\u00011Ѐ\u00163uC\n\u0014 +\u0004*L2\u001arXi^\u0005~a\u001f:*dS\u0005\u0003},xQY4\u0004p}|Ѫ\u00163Fe?5\u0010\u0005zB'\u0004Df\u0002\fR\u000esk.Rn5\u00110ҡ\tLy\u0005k\n\\R\n\\%JaԼM\u0015S1gbL3V2,=Ulo+C\\)2\\Ř3WÏ񋍒B\\hB<s\u00193%\\ok\\N\u0013\u0007~zrEu)lRrw,\u0007nW\u001b#M\u000b\u0001\u0001`8Sa\u0017dwM͈\t\f\u001be*A\u0015l]\u0012=e3nMvm)$uV\u0016\u0004\u001b5E,s5HY\f\u0018;4W,Z\u0011\u001c\u0005CPpNw\\Jg\u001a64/+>jw#+%w&+^.+Fv\\'U]'1vԬ;\u000e\u0012\u0018η+ă6P.H\u0017\u001f\bT\u0005\u000bw׺8pFנ%ħٕĸ\bF%ũn#\r\t+nuG\u0010Q:|L2!\"\u0014c;˨o_FQIx,\u0015\rަ!ڝam6h\u001b\u0006ekn2k(\u0004Ve\u001c$@:~Զ?Ai\n\u0014L@\u000f\n|&\u0007e^?(A\u000fʼ~P2\u001fy\u0007e^?(A\u000fʼ~P2\u001fy\u0007e^?xf\u0019t\u00165I\u0005JHmZ\u0005/cn/c~/\f_F,\u001be_ƚsX\u00052`}>}̸~\u0019\ten6in0ƍVұ\u0012jHl嗑n%,iy\u00172h1I\u001atIK\u000bPO2\na#CUC\fC\u0010_CP.=ĹN\u0013Bޜmz,9Г*DхJK2BIB:;8\u0019.x8cB_?:H;c3\nO-q3>ל+n\u0004t\u000f\u00117}o!U5{T\u0002\u0017!Tsē\"sm\u001fy\u0003\u001a>I)i:bjp\b,f\u001a\u0002S=\u0003-(j1ShT\u00039\rȻg\fAUOȳq!MkáJ!\u0017!ZI'\u001caOLRu׎L;=)R\u0011i\b\f!aN8\u001cj1SΣ\u0006@\n_=#ZX\u0010瘑Ò\u0010ZZn45F\t0Վ8B\u0019\u0014#XTyB:#\u0010\u001e\u0011EjF=r$EȰ\u0018IVT!\u000eG,VƛѺC`\u0010\u0013<A=\u0011y2\u0014$+\u00151#*V/6J\n3B\u000b\u0016r\b\u0019=#\u0019ǹڳ.u\u0003\u001ctQL.ʻ@`ItHNHw{EVXJ;A85:q5H\u000enuf}uҞ\u0015(2\u001f\u0014L@\u000fʼ~P2\u001fy\u0007e^?(A\u000fʼ~P2\u001fy\u0007e^?(A\u000fʼ~\\3-j\nf]Iژ\n\u001d\u001f\u001d|\u00198A\u0007]X6F\u0007]5蠫u\u000b:|q\u001dt\u0014]\rZ!,׍%dCL8kuδ\u001ct̊\u0014l\u0010D\u00151mt\tļE-}Kj5p%p\b\bJ2'Wih;\u0014NRCɈ\u0013-\u0006a\u0003\\Q\\ʈ\\P\u0012\u0010\u0003\\p3\u0005g\u0006(jj(e0\\y[DsKI%\u0018\u0004\b4Z*My!7U/\u0017u\u001e\u0014\u0016jbZ+\u0015\u0004W˂g.hPU\bZk{щV1SAuA1|K2\r\u000e\u0006T\u001c\u0012T \u0000y\\!\u0007Tg*ѐ\u0003,J\u0012wW>\u001a[\u000fGh\u00152u6k\u0017<s9A\u0016<s,f\u001a\u0002m?>HUr\u001ee?5\u0010\u0005zB'\u0004D\b\\J+JF\u001a\u00183`pe\tʫ\u001d]y*<sI-+<se(u%SƷ6ULz*dJbF=c\u0015*h3\\f2>\u0005/$\u0005Ɋ*izË񋍒B\\hB<s%۝\u001d\u001csYƹ`?k/mlUTRب\u0001X`mͭ\u0011\bvq\u00026(\u0011\u00053>᰹;e*A\u0015]\u0012=e3poMvm)$wV\u0016H>\u000f\u0005PE\r\u0006X؉ـK|;3ԃDh%\u001a͉hS\u000e\u0012\ts,\u0011m8i\u001aDI\u0007tHF+>ANڢ\b&=1CtRv0iMyimnaEdZAR(J)W\"%cD륉h3󫮴\u001a;P{U\u0004VGBB.\u0006\u0016O3\u0018\u001e>X7|1*`EHǌNF\u001fRHP.\u0004*MV\u0014֑EV$v3]Ngyl7L3u\u000f\u0002\u0006{!Iݞ\nҰ*&Z/M4\r\u0005Zjƍ\u0016bζ{ \u0015!~%\byܭ\u0016\u0005M d{U[=Fmǵ>rr\u001bVo8{)oOmes**4L%\r!\u0011\u000b4tۉ5zD3P> a \u0001zՙ\tJ{Vg\u0002ʼ~P3\u0001e^?(A\u000fʼ~P2\u001fy\u0007e^?(A\u000fʼ~P2\u001fy\u0007e^?(s5Ϡ\u0007_O*u'UFjc*>>k\u0014>g\u0011\u000f=}bX.\u001b=}<-s\u0006KfƍIhSbHq!l4Z\u0012.HaE\"ٶц\u0014\u00042]ްFG'Dv\u0013OB\b$\u0017<}\n1\u001a3D\b_jkB!ޕbzBsF!y\u001b}6=r\u000e\u0019e\u0016\\2JwB%\u0019g4dZNF+>qh+8\u001cK3r\u001e?\u0005̧0}9W\b\u001e\"$o\"{\u0001yw\u0000?wg*\u0001\u00129⛓\u000f{YsM\u001f9)H[o\u0006m7\u0017.\nbr!\u000b\u001ehAIU\u000bF:Ӏ\u0010$zZ֎\u000b\u0018i-|8T\u0017943\u0004TK3Cא!ߜLA\rT\u001dڹT;qRb.0?\f\t#U-d\u001a@\u0014\u0013ݩ;5tv\u00139ŰsF,b,\u0007,C`\u0015\u0012l%\u000eMF\u001d]9R\f;t*xz\u0011\u0018\u0013()R\nɇX\u0016R\u001d2\u001cb\f\u001bvYL0f2\u0016\u001dm\tESɽY\u0019_~I\n\u0015UҘ\n\tBhB\u001c~2\fY̋`{|A!\u000edmՉҤaj7\u0004l\u0004.&ӵKn\u001ctћAt&wA\u0002tu3{\u0013@\u0004yg\u0002ʼ~P2\u001fy\u0007e^?(A\u000fʼ~P2\u001fy\u0007e^?(A\u000fʼ~Pj\u0006A\u000fnQ3T0zOƬU\u0000\u001dt\u0000\u001dt\u0003\u001dt\r:²}]6:y>G\u0007][A\f3ݗ̌\u001b+MJ\u0006kw;\rъ;\r#ڢѦ-Mh\u0011[9\u001ctk\u0013i(ۍ\u001b\rKZ݆0kOk.A\"*˜\\P8I=\u000f'#N\u0019޶\u001aR\r\\s)G]s)#JrBiB\f\\sZ\u000fe\u001c\n\u001aȢ\rp]n\u0011A\u0013L* @\u0018\tRi*5T\u000b~\bP+e\u0014B\u0006\\\u0000\\'Z\u0016<sAB`\\ۋN\n:\u0018ft\u0013zP\f_jL]`_\u0007@\u0003JZ{\u000e\t*Sg\u0010$^3h\u0001wby+\u001fHS\r-â\u0013L\rYR\\N\u0005\\0*T:0H'\u001cTkTS\u0003Qg.{~OPbP\t#3\u0010#}du#|!ڡ\tٕg.ehg.eg\u0012ΰdjvަFS=s\u0015c2\\%1F+\u0013̢Uho3Wf߇<s嗤YQ%]/)ȪP(+̅\u0016\n-\u0014Z[3\u0017X1\u00193%lKM♫z?vz\u001b;ځ\u0007\u0017+\u0005[#m\u000b\u0011m\u0019\u0004N9}Q95#\n|awDQU*ؐ$zȁfߚr6R\u00127ʢ\u0013\"\u001a}}^0մ\u0011\re@\u000e\u0011lAk$HSߙ&Sj˭\u0010B\"ڄZS\f\u0012W<Ce\u00066D\u0014\u0002\n}i]\u001beY\nՔN8\u000bΜI+Id\u0003`ܝg\n\u0010\u001cZk\"ZNЀBF\u0013r8H\u0012XVHmlI.6DkiJAΖraO\u0001NIQ o'9\u00070X\u0006٦U@O@MIuWBN oP\u0001\u0006ݨ8W!\u0011V\u0001\u0015|ҜΏ\u0018ӋϜY]:ŧ^\\=ua+*Ǵ\u001em\u0001觩VoW\u00172n(\u001b#\b\f\u0004\u0002\u0003a. ԣ.\u0006\tܭά\u001aOPڳ\u0002\u0005>\u0013P\u0002\t(A\u000fʼ~P2\u001fy\u0007e^?(A\u000fʼ~P2\u001fy\u0007e^?(A\u000f>\u0019|\u0006]?E|R?6R\u001bV\u0001t1W\u000et1W\u001at17\u0003WLb\u000eƲub\u001c]վnA\u0017s3Xt_23n96\u001d0\u00106ZI'it[TX1-\u0017snW$24H\"\u0019%;EC2ˈ\bt9!l\t.@C>B\u0010kv(.\r5އWzb󂕝!pyy\u0002Y\u0005&U\u001f\u000bRdNku2R}\u000b}T^\"EGsTJ!IK8O*Z\u0019!\be:|\bO\fZP-\u0017;k|'\u0010wPOWFJᝬAG\\\tr/agn>0\u0013FN\u0014^\u0010.\nj\u000e$aCj-\u00059E\u0010X\u0007fZ\u0007:QRbVd\u001aӇ߹\u0010*i6C|CB Ku6?\f+fM*Gvd:w\u000e¥4L}`?\f\t#U-fjSM\"\u001czA>;ǥ\\ji(:\t+\u0010rJk4sY)7`ën]\u0003\u0013=\f2~0Ř\u0010DjT!/b\nzh+L^\u0011Ç\u0015+h!]^\t.Rs\u0016KRǌʪX\u0019(+;\u0016\n-\u0014Z[\u001c3llwN\u0005U~$\u000ehT\u001b7j\u001ev:c \u0001zՙM\tJ{Vg\u0002ʼ~P3\u0001e^?(A\u000fʼ~P2\u001fy\u0007e^?(A\u000fʼ~P2\u001fy\u0007e^?(s5Ϡ\u0007_O*u'UFjc*\u001e\u0004\u001ejx\u001ef\u0005=VaX.\u001b=V<Ǫ-j\u0006KfƍXEd+Rt\u001aM\u001bBa:\fN$Mش<VŖ\\wD\u0003\r!V\u0003eC\u0012mZ]tIO<VI\u0006\u001e\u0016ι\u0013̙e^Bhz'wғ\u0011RC\u0019\u0007SZ\r|U)\u0006᣾\u0011%f,d!\u0006ғZ\u000fg\u000b|U\rd1k_U<\\J\u0017|UAE\u0007P!0\u0013FN\u0014ERLMea\u0007Cӄ.\u0007f*!\u0006\nQRbΗFЈ>}UTMUe4\u0012ʻuҼ\u0001\u000fd=yÂ[B\u0001UP~킯*'Ȃ*\u0018L}`?\f\t#y\u00143hA_U\t\u0004='W\u0015!j\n{\u0001!U`e!\\)\u000b=<\u0006\u000b\u0018aVW2WԲWUfRP25o|;K\u0014bL櫪$fWT2,=UUlo*C\\KRǌʪX\u0019(+U\u0016\n-\u0014Z[Wrw,J\u0004K69iznc\"ؘ2^t\u001cՏw!Mw\u0012Q\u001b5jPSd\fwOUnj\u0014sy9Ŭ~jbV3fSi\rik\u0019f\f3yd;Ɨ{ܒ{4\f(kTӲsB\bk̝\u0013o?ZQ\u001eI1\u001bg>\u0019I_7]\u000e\u0007?_}_{q勏_oO77j?\u000f'x97G??\u001fsⳇ\u001bwwdصs\u001b_;V#sW?/=Suҽ3s_{>?{>s4\u001ao\u0016dG8\u001co߷{v㟀%\u0019kw\u001bm1\rAn-\n#l͈i=\u00012I\u0018k\u0018\rі\u0011it:Vǚ<\u0001+\u001egbi\u0005J\nb\rJ\u0011bUVqI`-\u0014\\RjR㞣09$\\\u0013c3F\u001f@QL{Sp\\\bWCAFoU\u0018\u001fC(V\f?[\u001a\u001e~עOU8MO6)Y95\u0014zN9ׂ\u0012H?F\u0019)(\u0017\u0019Rivsu?pjis7'>;|mɓ>\nJcy\u0004\u0013qtIvre\u0018Xx\u001ckFaBmw\u001f*}\u0002\u0018ڡﮤ\u0004F\nC*\u000eࢉI]>sSdc(v\u000f!\u001fE\f\u001fa\u001e68\u001c<ڑ\u0006S\u0001vr\u0016{\u0006%&D\bk@3kA\u0011PN5x)\u0004O\u0006u<\u001b_M6//7zPs!TB\n\u000e\u0003Ϥ7F\b\u000b<\u001b݊F#WJNN?O?3\u001efw\t1\u0015fiIc*Ίr|L3Ӈz;vK\u0012>mI//ϼw|ywcc\nw'˚E|oB ;)Q\u001dW6n.}\n$L\bXhYXo[I\fӾP0\u001ck0\u000bcq?(z&LGVsS'\u001b`\u000egK-q/%Fv\u001eqX}V|oU.\u001fm<\u0014\\\u001em>\u0018,\\>\u001a\u001a\\W3ۗ'aNȉ\u001b;8y\"d\u0011.5K׳$FOh_`ǚՆ*?dDNY|\r'\u001f\u001e\b4h\u00180Nu\u001bAaIɥ\fl\u000bرI6\u0016\u0002v\u0013r07j3*v~S\u0000\u0011\u0003\u000bV9[\u001e3\u000b?Y\u0019冻\t4qIsD\u000fBn3\rv\u0013:\u0005s7c\u0004\u0002\u001ed\u0018#3>C\u0010\b\u0005\u00108Jn0\u0002;$E8\u0011J0JnIPŵ>w\u0002\u000b5Mx-I\r>\"}f<Z,:|}\u001er\n6\u0007PP\tgsT\u0001.\u0019\u0017\u0000E\u001e2DzH\u0018\"=\\=&\u0011!ѶAV\u001dm\u000b@V.\rR]VOI~U\u0002wWWLU؞rRxyu\u001a\u0012&x}Z\nS\u0004}\nA<8\u0010dPB)\tA\u0005\u000e%\u0004\"8\u0010dZhBi\tA\u0005&\u0004\u00168\u0010dZhBi\tA\u0005&\u0004\u00168\u0010dZhBi\tA\u0005&\u0004\u00168\u0010dZhBi\tA\u0005&\u0004\u00168\u0010dZhBi\tA\u0005@>\u0010dZK=\u0004\nT0z!ȭD8B\u0010dzp\u001c8p\u0010s@_.\u0007ow!wq \u0003\u001d\u0007\u001e|\b\u0001\u001e|{\u000eEs=?|)m\u0010\u0015;\u001c:UfGpV\u001biV=GsJsн\u000f?+vuk=|!;;~koݷ\u001b^9w;a8\u001d<\u0000{7λ!xYa'\u001eTϿ;!\u0007kϫ\u0007yȴ\u0007\u001f}|\u0007ue\u001e$~>x\u001b?|(\"(*P2Ud@T\u0002%SŨdp1\u0001(s\f(.D]\bs'\nv;yw\u0010*$nܓ8|z;-Rʑ#:x~nܑ%\n!ds~I\bZ]X:ZśW\u0013.F\u000bI\u001e\u001d\r)#H\u0012=vq\u0007zr,:\u0012\u001eN-i\u0018\rAnq52Ў;Xp$6z\u0017KLDKr߅\u000bK,IۊZ\\z&\u0017e\tұ\\E#\u0016,nn\u001bHR8i+kq\u0017bwϑh1;iwFru~N\u0019ݴ\u000e5QDEFI\u001c0[n\u000f?[\u0016\u000b/S\u0015\u001e9ru:zׯ_\u0011\u001c\u000f߾/\u0007ߌOu׿|#~W\u001b\u0003\u0010\u001a{\"d'pQ\u00104\bj\\\u0010)ESP(\n\u0011%\u0010\"-gD+ \u001f5kRʔԒqjF1d\u001aQT\b\"FMɔQ\\HEut]cNNiШ\\FF]˺N!O\u001aGI6\u0002c!\u001b\u0004'O.W.-ol.m\u000b+8NDG$qg5\\\u0006JJ)\u0005ULs\u0015\"Z\u0018. R+-nQ\n5)\u0005$r5I$lDĝƗ^'\u000b`wc $Zp\u0017/k\n\u0004CUmϵ\bNMQ\u0002̀pk%\b$p))rMU\u001a\u0005-~T[TI\u001aV݆]\"qR1V}`n؏\u001eV:4\u001d-?M\"\rUCՙ&08\bm|eT@`ZH\u0002I]Hʢ댯\u000bAbx!Mg2nb!x\rbפ1w֏n \b$)d МT35\u0007HIʕ&t\u001b\u0014b/d\r\rQ\u0017a1J,1PZݑD\u0006\bʋ\u0010)\u0007*\u000e\u0010L@b\u001bGQ@NU?cOՔ\u001a\u0006\u0004d\\dj\u0005\u0012P)U\u0013&FQ\u001b^\u0001s7)\u000f0X\u0000\u0019R`l`ME\u0018\u00000\u0011N}F\\@u5LwJ&\u0010DP\bi`'!\u0004\\A\u001a`Pm\\iņ\u0011^LRP)`Ҡ!\u0005i7\u0010i5Tj\u0012j\f)(\f\u0007\u0019X\t\u0019\nт\t?!\u0001\u0011,%tR*7h4Q0\u0001Zn|\rT\u0016~Lk\"\u0010KA\u0013RmB\nC\u0012fQ %\u0018Ѭ2\t\"pT|7\u0003\u0019\u0013\u001a\u0012*Û\u001a\u0016:J)\f\u0013\u0018\u0013;\u0003E\\oBGiڗ\u001d \\))\u0018T\u0000yPm\u00017\n-)fAGTP\n\u000eU#9Q4\u0011L,\n4iO\u0001/\u0014\u0001!3\u0016R&+\u0018<n\u000e)$HQ\u001c쎠0!1SkX\u0012\n\u0015\u000f\u0003$. [\t\u0001J\u0016Rx%ж~)։@Yx .ܭhm\u0013\u0001\u0017A\".ES\u0002\fU\u0000)[%|{@-k\u000e)Q\u0002\u0016\"ZxH\u001cX\u001d@hV\u0019\u0004PQA\u0006قƻ1\u0016-k|\u000e*\u00021a2Am#\u0006\u0017\u00038c\u001d*+`\u0006\u001f\u0014wِ\b\u0014*\nC\u0015\u0006\t0\u0019\\\u0003\u0018HôZP:\u0014ǏS\f~\u000bclD,ن\f#,`\t:\bs2!\u0012&A0)\u0005\u0010XGU`%?Y0C8C&}Ag\u0005Y\u00059\bfRbӪB]pcB:\bl2ƍP\u00020˹QS1\u0002A\u0013Nܥy$/\u0015e=-3\r)TY^*_*h^:\u001aTA*u|\u00013\u0000A1a\u0000e\f\u001a\u0001s\u001aL*0?H\u000e\u0010\u000bZjojAg\nl=L\"\b\u001a\u000f\u0011\u001aF4\u0018`&U˖(X\"]9c\u0006f\r\u001cd\u001aBui\u0016\b:gtU0\u001d\r\rI&\u001dī!>CL0\u0013\u000b\u001756\u000f 7Wp3ME\u0016&F\rfם\t,\u001a,e\u0006)@Q!4;v-z6\u0004fAp\r\u001a\u0006W? \u001a4\u0019ISɎVCKB;F氐\\<-jTƾ\u000f2\rY\u000f\\#=\fvʃTA+29nڳ۶0iƜ9\u001f\n\u0006\u0014ҟ'&-ƛPN!?״\u0012Ņ:%\u0017|Cg~\u0017n\u0014\u0012wf\u0007\n\f#z˛\u00021\u0004Yw_!^}\u001e07J\u0010SvY05*E\u001eʁ]p\"6lH\u0004A1\u0001K\u0013Aa\btS\u0018QIϰLo@/@`&-\u00014bʲ\u0012,L\tB2y\u001a慡D\u001aH\u0004+\u0003ktP\u001cQ&\u0018,@%wYp\u0016J\u000b[[k+gT\u000f\b0%\u0007)S\u00159J)gU\u001eƋqӿ)\nStk\u0012tA~\u0007-'`MSsw\u0004ՓŵꩍVZ]뮾l^^:AuD\u0016_X_]ފ{Uɱ(J㖓++܂m;^g6s1,\u0000r\u0017׷^d߫.[M\u0010\u00127ڏ\u000f\u0002\raڴT9S\u0004P\u0006Jw\u0015bKaL\u001e­ֺ\u001c&\u001a_m_wa\u0019Y\u000f,)Ȓ\re[\u0010Z\u0017u:=yR+\\]Y?6Յ_N_+8\u001d\u0011(tٽI\u0018`܍_!a\u000b(:zT\u000b5->ЭԉN\u0003?j!Drw\u00006dm\u000f\u0010+-\fK\u000e\u0002kHP\u001a\u0018^V<M/E,zyu\u0004)u'LdH\u000eЧ>3Lf\u0016\n\f]dD\u000b\r6]\u0000mLN\u00134\u001bF.T\u001cƯ}5تph(,ܞ{N\u000b\u000b*\u0006ړ\u0003e$\n\u0007xaJV|J\nN\u0012\t\u0018\u0010ޜ\n \u0015v/(e(,\u0016h@6@Po?]ܸ|y5{!h\u0002n'J5\u0018\u001aI\u0018%&L>H5~eV)j\u0014CT6}\u0003\u0016la\u0003\u0019Lv˗`2xyl?}N\u001bЃPS\u001bW\u000enhprcc8ً/&+)0қk'\r\nendstream\rendobj\r29 0 obj\r<</Length 65536>>stream\r\n\u001cV\u0014_\t=\f\fnU\u0003W\u001e\u000b\u0017ßR81O?6.jw:\u0010rDIt.s$\u001a/{Q\u000f,;ًmwк%{\u001dZ#/rPmS`lkC/ok~\nl~Nd~^dc8\u0017dGV\u0007vf܄?3$/{\u0011\u0000La7:+uEg7P{\tn\u001bA+Hy[aw^a\u0014F\u0015U0pK\"h\u0002S=\"wR\u000b\u000b\rR0r\u0000ƛ[K\u0005_T5wd꽹p7,,7Tߠ\f|joؼldoҥqo-l\u001b@#eĉ\rĉE'\u001bP\"љd\u000b[i*\u001ed\u0003`,+Zgl/^:te,;\u0010^=qS\u001bds\u0017\u000fG'Ѣ7ڿdoĥR\f-Z;kW.\u000fRK5\u000e/\\;`Ov5ًބ@vTS;Z]{\u0012JY`ȩ-\rM\u0013M\u0019\u0010v\u000b+iX@\\v:=\u0013:\",]˪Lb\u0005ws]\\sӀ빐\u0019}A\u0017Wt\n\u0005&*LG;ED[ʆiwHCntT\u00136\u001e(U\u0018yP6V>\u000b_u3a]z.U[z\u001d\u001dU[YE]&*\u0011\"~%4nPrKcch0\r\u00045\u000bLV]b͒\u001bg5\r\u0018t\\\u0017;˹.T\u0013;F>~d\u0017uC:^\rrۗuC:^u%MnHV+AUjxi7\u0014t_\rs϶/duN7]W\u0004d;ɄpU|ߍ%\u000f\u0016؂f'˷mN\u0007x6da3\u0016C;M1t\u0011ĝ&4w\u0017\u0000\u0002T%\u0001\u0003S@\r\u0012$\u0001#rOYWf7; W0KC\u0007+Aj\u0011`LW`K`j+AH\tf\u001f\u001bZ\nٵ⃕ \u0012δ\u001dZ\tB\u000bPNW~\u000e6,vUz\u0013M\u00018d9N{̙LF/UNRu8aW8ŧ]²\u000f+ϻ)6\u001fx<_3/4\u0001\u0003\u00032ة\u0018MRUq\u000f4l$m*{7۱6oͺ8'BBᰵ~wqS~Ai[2/$^f\u0019Ĺ\n\t\u001aJ\neӃ4'$߮U9\n\u0013lb\u0005\u000eJw;-#_\u0004V[OZR5[C\u001f\u0000\u0002r\u001d\u0011`Hq>\u0003Lk\u000f\u0001ݓO\u0001C?\u0006t\u0001} 0'\u000f7>\r\f}\u001c\u0018z3܊w+>\u0013,\u0006|*rc0\\0$\u0007}!\faG!Y\u001d\r`N~\u0003Bz+0\u0001sm[/R\u000f\nΟqﰺ\u0007 g\tޓ\u001csK$S\f1\"#\u0011\u0000\u0010C\f<Ai2'{\u0014ɂte\\t\u0011d]sk\u000bo(Ww*ҕbUR\u0004k\u00177\u000b\u0000\u000b\u00060ch^\b~\u000b'\u0003pS\u0010TPN`/5;,>а}wo\fu\n\u0005pn{\u0011_\"r7PWdN\u000f\tL1,=\u0017~\u0013?/\u0004s_YH)\\\u0018L^ٳ\u000bX\u00145\u0006,aʵ\u0006y?pAS\u0019\"M\u0017nA\b,5d\u001fcVWcz\u0000\u0003\u001e\u0000\u0007p=\u0003\u001cUc⁰͸/hF\u0014~\tad0tVdWj]N6_\nk5\\\u0007Fene\n=B\u001a5D\u000f\nk,:BNsn)\u0018?~2V@OOQ<\u000f?Ko\re?L\u0001E@/-N^Zk'_<\u0019<9?\n\u0012=\u00171\"W^(OD\u001f\u0013q-E,T㈯ND\u0004CCܬ\u000fA-\u001c\u0004q \u0005\u0012L\u0011\u001cM\b2-p(!\u0014ф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴф \u0002G\u0013L\u000b\u001cM\b2-p4!ȴ$c\u0015A[Or̺.\brk0\u000eܪ|R \u0012U\bA=2}sAρ\u0003}\u001c;\u000f߅x\u000eym\u0007l\u000evh\u001ex!\u0004x;t\u0017CqAVsW\u001f¹gW[mZ}\u0017\u001e)́C>ڵבׯ+?@2\u0007WwFo\\{t\u0003W;ﾇ;g\u0003dzP=ڛȇ\u001fΛ=\u001eK!Ӻֻ\u001f|1G\u001fֵy(LYoTn\u0006>_odd@T\u0002%S\u0005J\nL\u0015(*P2Ud@T\u0002%S\u0005J\nL\u0015(*P2Ud@T\u0002%S\u0005J\nL\u0015(*P2Ud@T\u0002%S\u0005J\nL\u0015(*P2Ud@T\u0002%S\u0005J\nL\u0015(*P2Ud@T\u0002%S\u0005J\nL\u0015(*F%e\f\u0013Q\u000e\u0018\u00121-~#6~'?ȓ\u000bD}!gg\u00109Ej+#G\u001euN[ʙ#Kr\u0015B[ܓ\u0010uzы7F'\\\u0018\u0016x=:\u001aRF$zjsZ\u000f\u0002ϷXt%<vZB7b%UCh(\u001c\u0015%\u001dnȱhBoIom.FG\u0017.\u0017eW\u000b\u0017NYha\u0015\u001d=L|/Ҍ\u000b\bon܂\fo:`ƪRj\\Y/\u0010\u0017\u000bg~D\u0015wFru~N\u0019$\u000e-22ZF\u0004-\t?[\u0012np||NhtB\u0017_J:͸p<f]5CEO^ʇHڈi\u00115Fb\u0004UŢW.f\"!\u0013ø\u001c\u0015\u0013\bi4W$\u0014xru\f\u001du]܅9\u001b\u001d=\u0016|\u001f|@r@_\u001d$d,^;q\u0002ĉE'UO\u0010Ky3\u0017TLWյ\u000b\u0010Z\u0014ud+\u000eDw\u000466{./\u001e.ÔtrcؼS\u001b_|yrb=\u0012Z\fAjU#zk[k/\\;qokGYȚM\bdG5e;J۵'dK\u0017b\u0017t\u0019_=Ey\tkĽz$L\u0015gf\u000fdub}V즇4ʹ``8z2njH+%pka'e%,&dp\tZ%Ǣ;G*V\u0003\u0013'wRg\u0015;7V^v\f\u001fdYaJbR#W[uL?Dsoi\u0000ή8슳k:.nn\u0000Sdxek#\nWYiVdWj]N6_J:_NT+l.w7\u0005\"ы\u0015I)xdWTJ\u001ac\u000430c\u0012a#\u0014q\u0002\u0011(\b\u0011\"\b%\u0018\u0010EVVkh%4`ɐ\r\u00186S9H!5[\u0006\u001b:x%v\u001b\u0015\u0006)]TP\u001eVQ挃\"\td^lY\"\\`%J,RS+\u0012\u00154Q:ulZ֟H^|//>\u000b_y3ptzjcF˳VEK\t(A`'\u000ekb\u0007\\J\u0013\tƹT\u0012V4\u0002\u0012A\u0007F[\u0000\"KS\u001aJÄp\u0003f4^pN$i\n\u0019gIkLvئ!Rh\u0003ZD\u0004.cC96R6\u001eFI&N9,\f)\f\u0018\u000b4\b\n:?nTT\u001c\u0002{A\u0019g/7zc\u0016bL\u00190\u001d)i\n\u001f\u00125\u0014Z/\u0004YA/-N^Zk'_<\u0019<9?-\f\u0005S&z.b4bʭN_(w!MD\u0010> \u0001ሯs\"s+Ks7|\u000eܮ/<In\u000419ɯ-aԞp/s[َ]Pp&̤1\u0003᠃~\u001dGwu݇m\u001cCwͻ=xG΃u4s\u001dvϋ?wC҃w\u0017NYz<\u001cmG\u0017Wo3чFɋ;^\u0007W7/~\u0007_{̱3/o\u001b߷<\u0017\u001f|gG\f\u001c\u001f}FWS[]QB\u000fXU\u0006G\\Bs\u0007\u001fYW<\u001dgt\t,yK5(M:\rh$n5`M$&V\u00136gtm#5ICtax7n\u0002pjw[];gtb%\u001c\u0018mT`C\u000bW\\P.\\@\u001a\u0003;\u001fj\u0015=\u0001\u0005ԅ6Cs\"^\u0012ţ\u000bq<]rm8cFX\n{>\u0001\u001dk@BHBV\u0011:Tmv73Ut,\u0019њ1\"\t\u001d\u0003\rLW\u0014=8tC\u001a݄*lzpG^\u0007\u0018\u0005,a\u000b\u001bY\u0002[~sjos)\\\u001e4r%)Ąݳn\u0006Ba\u0015.\u0011Y(;rkKd\u001e2غs\u0003xd\b\b\u0015$Z\u000b[MA\u0014l橸q*\u0004B\u0006&\u0012\"\u0007*2w_@kAAQ\u0013<0\u001eTɍ<}c[\u0012?c\t66<=Qܨ<d#?x\u0013f#WI\u00163y=\u0019`.d̦eJfl\u0019n\u0013&+>V7M'˶FC2jJh2\u0005!zMx\u001f']9t0=Fa)\n\u0015fB8)\u000b\u001d$BC\u0004wC\u0019裸aC\u0011&g\u0019\u00049@F7\u0006\u0015\u001bǠb#\u0018mdcP\n*6AF+~\u0005u\u001bٯn#\u0015mdWP\n6_AF+~\u0005\u001f#\u0012|W\nٯkȾ\u0004M@+EFF\u0001Qlp\u0016e\u0012F\rGn-v\b MˬML>;\"\u0007\u000e~>n?x`Ň~)\u000f~g?s|\u000f\u001c\u000bB}\u0016\u000bGg\u001e\u00114\u0007>g\\jKZs_Y2{~\u000f\u001eϾ>[엯>\u0007ѡog~7ͷާ/9\u000e\u001e=O{?zo??]{s?s}~\u000f}_\u001fo=L/]~?o^d\u0002_?~'\u001f\u00177'W\u0016~_{O>n24\u001f雿l7֏YW_o:\u0013}{⧯?S8o\u001aq\u001di\\o*U>ɧ~ا9\u0006Ϲ?sev\u0015\r!\u0014U\u0016[\rUb\";Fi}K\u0010۶ۈue\u0011҈I4XHa:\"\u0013bj޻\u0004Irw\u001bhI\u0002 \b\u00012h\t2\u000bpoGM\u0004\bZ-U\u0005Ԩu7@bNk{XfsH7hw\u000fF\u0019unCQG\u001edL?GeWeE?ݝ\u001e>\bOY:Z\u00185\u000fN\u0019v\u0005b\u0011aw+u\u001b\u0012m NZ6\n._PN~oM~\u00137\u001c\u0016X\u001d\\Ԧp\u000b\u0019Uˍ`uY\u001a|Fډ܍jK4v3\u0017S%ʽ\u001bQ)et*އ\u0017'\nZ]\u001edcPh\u0016EAw^z~C9g]JkgFV-}P4et.&\u001aLC;\u000b]\u0018EO*-WFuA\",V+W7\u0013)$92\n\u0014FfsBj:\u001d\r\u00187;$4_lol>\u0011\u0019PFo 7z\"5-\u0005H\u0017'/NTj:E\u0018/j[H\\+MCM]N\u0015D)S1\u0018\u0013H\u0001EÆRB,T\u0005\u0014t\u00057\u0015\u001cvPi̹\r\u0015|\bې[ގul.@8-6qRӹ5D[^no<왙1\u000f\f<=xwS\t\u001e\n{\t-\u001e\u001d\u0006i`ƘN1QhfƩ\u001eY\u000bmTw>~\u0001I?-|p(ս\u0002ZJ\u0005Žۻ\u001b[UmmfuUB8vZcT{\u0012%=(җ\u00116ʗx~K\u0002&n7;.t\u001f0\u001c-W\u0016\u000ffXZE\u001cC;t8\u000b>\u0014,V C8EyQJCW\u0007of\"waN(QU\u0011;q{-\u001f俾Z:\u000b\u00119\f\\sg8\r\u0011\r\u00119\u000eӔ(م8h\t'\"7摸\u00111ʑh6g\u001co#s&DX̝hoTWʸL!X\u0017GZyTŨ&|qD\u000edud.F{\u001fam]\u0017z/v`,\u0018\u0019\u000b\u0017;7\u0017.\\*[\u00021V\u0019f\u0016f!kw~|q#V`wkC~qn\u000fįoo\u001b_|\u0005]\u000en,{Û\u0013]ަn\u000bwot\u000eߗ\u001bVZ\u0014;\u00055=Ys\u0015\u0018lwǦZH|uoW7ؾ9ػ=q'\u001bSq\u0007]a&%<\\z0yN\u001bԏ\u001dNZ\u0017sk\u000f@\u0000\u001e:,k\u001bÛȿ\bf9uDx\t\u0006n*Bv5_[X~ax\u001c\u0002b\u000b,:.PMw\u00068M]\u0016\u0005\u0003+Xʗc]07\u001e\u00001q/A`F+Q)W#p\f8l,\b\u000b}ͶE\u0014Ti֫O'\n\u0007>؊4\u0012£\u0005z͊\u0017poM6#\n9n\bo'\u00170\u0013[d\n\u0017וֹ\\\u0005n\u0014\u0019\u0015c\t\u0003˱;\u0018ϭЎ/dP\u0018\u001f\u0010\u001e\u0015n\\@\u0016P*R&\u0002444tX*hoIk;꘴Zsݱ\\y<w=kZ/\u0002\u0001g)b3xwfBC,b8\noocڷuś7\u0007ūgjxߵx\\\u001c^x5^׿9zNuk\u0014\u0016\u001fk\u0019[rm\r+\u001c\u00102i/lDb)L\u001b\u000bXx_B\u0001z#p&JY2\u0010%ejKJﬃPy\u001f^g*f|D\u0010>Mr\r\rB\u0014\u0005\u000f(JYwC%&~T`U`kSI):y+V.5U\tI<]\u001b\u0017\\b̿7ؼ1;Ps7\u0006FC\u0010TӅ\n(NAYg=ǟP\rdP%9B\u0019Jx:t\u0011֍JսOA\f^νc#iҨ\fҕ{3P'\u001el~#?LI\u0019JU\u001b\u0011\\~\u0012탖\rat懘]\u001fZrTc.F~ȏ\n\u00035JstV\u001f&K6\u001f\u000f}f\u001boPomgc\\\u0015Vŕ\f .'r,FE)\u0006)B)H-4FX]]l*rtײkaǮ\u000f\u00191V\n\u0012SEMTzȨt_`\u00160\fFa>ijǛ\u0005\u0002\u0006\u00024P&9ۡ\u0006Dvح\u0010%3,w>aC,+%1r;Bs,\u001dA\u001eI>wFy[\f\u0018\u000bP\u0001n\u0019`p(#D0fX~p(C,\u001d}(Sx$2hhshp\\4?>\u001d3йP+hF:wĊf:\tƪ\u0004?l7e(4(˨,A\u0005U\u0019lt\r/e\u001alW~&q1&\u000bX\u00172HdUt&wm:W.oɯ+e*b;NS\u001fox+\u0015Jz-7e\u0007ehtϻS[;.X\u000boYY\u001b\u000fvj\f'mUs5m>`mJoK7_ٽ1PݽwH'z\u000bWn\rxR=\u001b*+S\u00180\u0010\u001f'Hs3Hʔ?$A1Υ2Յy3?z璣礷}\u0010\u001e\u001d|ajk\u0017\u001dwJa^q\u0014\u001dwJaǝRq\u0014v)\u001dwJaǝRq\u0014v)\u001dwJaǝRu\u001a\")OvN#|zJ8]i5]ǙknL:atyp\u0018E[^0\u000e*^(.F` \u000e`\u0018.F`\u0010.hb\b\u000eF8`\u0000\u0007^\u000eF^\u000eƦ`\u000eFv^.E`.F\u0015dn\\Cm?,vBY\u0010lV?lI)eʭ:;jgV_Aٷ&~ۃ>lء\u0019>R\u0015)$V#K\u0012\u0003HSiӑY$\u001du\u0003T\u0007IwyB\u000e-Wfŏ\fe}x|=\u0007t\nahĉ\f!6&M\u0016F\u001dN&3Λkl搯RMg^_\nP\u001cdn:\u001dF\u000btQcH_H&uT35\u0017\u001a4}\u0006,\n$t^e\u00185Dh6Ch(%TbuapyEs \u0004c\"ЌX_\u00071\u0017C[ŐQb<,PxP8~*T:\u001a\br\u001bIDp3A;dKtJTr\t\u0014\tQ\u000eM\u0007aZ\tsq`Jb\u0012)$zm5\u001d\u0000ϑ;\\H;x~8&z/0><߉h\u00157W\u000e[xCIgBNTP\r6Gh An-龎+\revK0on\u0001\fq[#W0]WF+x\u0017\u000bK'g\u0006QV\u001cIx\u0003SNoS\"M.\u0018\n3*WX/Ԙ\\ʴUjӴ\\:So\u0000ɔ}PK\u0018vfCGKi[&]F\u0019K-˻D~Ci1D\tR\",ҋ2%\u0016ld>Z؛\u000e\u0006b7\f`\u0004&liS^\u0002+֖PӉnDх\u00171CB[Unp!E)\u001e/\u0016m\u0012)\u0017vv!@_9.\u0013w#P\u0006\u0016̈́*\u0011N٦RõH)J)^J:nQtuk:yH\u0014,נt?[((񃤗\n\u0019M*<Z8ǼuOZ\u0015t\u00189}8\u0016p!|5ܕ\u0015M\n\u001b\u0004w@GD\u0001Pw\u001e:x~g\u001dpkN\u0005\u001d]۬o>qʅ\u0015}NtUs5\u0013$t\u0003M\u000f\u001af\u0015/YPy9\nh\u0005Bwf%Lr~i\u000eʹg:*OMJީtJiA\u0015F``%\"t|Y\u0018k\b]\u0016*\n~Z\"t9\t\u0017N].xiլp\u000b\"t\u0005X\u0000x\fuQ444\u0004\fZ\u00191ٱ!\u001bqB1)p=4eI&Wiג\u0003u8?\u0015ESһf2'/hZ\u000f7|,c!2%R\u0002I\u00077R\u00041S0+I$1Ӻ%(U*Ot\u0014(\r\tZ\u0007,p\n\u0010\u001eU_4hb\u0012f\u0012\u0018Sl6cIa3p\u000frjEBR\u00162l&s&*)$f\u000eo)\u000e\u0017JvА\n4H&=\u0012=׽F\u0012㸄(zeh-a4iiiiHώ\\\u001eD\u0011u\u0011e\"Z\"G\u0015RtV\u0011C]\f~\u00181ۃ&L_jy]\u0004\u0011K)$\foQ;Dbz\u0015,E\u0016~fPcZƶ\u001cZ%t?Щv惖\u0013jz@\u0019ˍ\nI?\u0019\u0010mg\u0003HӁl-\u0007K<! ˋ\u0012TxNP4\u001dY%\u001a\"jUB\u001e1ّP{\u000eSȃfD\u001f^P\nR)\\&R\u0012@3\t\"j%T=՚Sy\u000f\u001a\u0005O<Cg\u001501*BZFǅ\u0010(\u000bU\u0010z8\\\u0016\u0006\u0013DZ2PxkE&%PB,M\u001eeI`\tb\rb`6v,)Np9('\u0013aP\u00065#aȢ}\u000e6L\u0014H|:y#pA\u0018l*\u0014I\b\u001b\u0012 A&ܨچ6ez:\r\u0014t&*=ýWm)tQZ=9-r\u0017M'r\u001bpUR)DùCw-'\u0013\u0015-塌60\f21\u0004w\rw_9R\u0012\"FZQ\u000e\u0018,7h{X0'[1GAL=b.\u001ala4ʍ\u00189\u001aFd\u000e:hLV)Tʍ\u0018Ɏgd\b\u000bf\u0015hG7\u000b9o5\u001c=Nw1%%LzYDV\u001a\\v:\u0011\\O)\n>r\u000ex\u000bxU IHe#!6\u0018Kc_md-(tFS\u0006$\u0017\u001b0;QFaF\r3tN\u0016ea\u001feΉx 0-K|~\r˼Lu|D\u001d\u001c*(]K4у\u0004sNTD4QؚDރs\u0004؝F[\u00196ʰV2l`\fm5nv[\rjV\u001al`\u0006m5n\np^\u001a\\JZ\u0001[t\u0016hli4^+˴\u0018[a[,d}x\u001cҮ'ʚ¥+\u0006ʚ\u0002-ZɺB+Ⱥ-\u0002Ⱥz-V\u0002p+ƺBe)ŚZ+RŚO+ĺ\u0002E+ÚB:-Nú/-$@\u000fhPl\r6A\u001dowvk臁M`S6\u001cU@\u0003\u0015}\u0006ETͭ\u000f.\u000e7\u0006(̺觏uQZ]\tT\u001f-\u0014[ݱ>`֗\u0007^qpY\u001ftŪ\u0000ǱBN斪Sݱ>Z\u0002N81/Sr|:48u:2\u001a\"4!\u001d$+\u001d7tll8_\u000f-KQ\u000b\b4\u0003\u001a\u0017ur\u000bƏgM'ƶ3Yc3@l;u*$Q|h\u000f>\u001d7O]b\u000b7Wꧺ֗MpmM\u0001\r \u000eZY\u0005*\u0016\u001f\u000e}\u001a֠HfnE;ڀ\u0006<\u0006ٝb]5ǿ6VvPՏZ9r\u0006&)m\u0011&tuTQ\u0005\u0017hRr\b3\u000f5R\nnw۰\u0012\thەqK[.h \u0004T*ĶsN2\u001b\n\u0014ujl\u0004t#jY1\r3Jb$+\u0007з\u0015\u0000_EدВ͍ļ4(ۖHR86SH\u00024Fq\u0018_HPH\u001bا6\u000eZ\u0014B>\u001d=yHLRVJ:$fq7\u0014@~(9F\u0011tdC\u001a@\u0004\b=C^\u001cE\u0011͉\u0006\u0010}\u000b\r\u001a1.\r\u0018,\u0017Fh\u00019Q\u0001-\u0012w2_c\u001aL箯pOWt9QqS.v⧫:qp\"I4\u0018sBsӬY\u0011=h*Ψp%w\u0002\u0000͘\u0006cn騨+IWqNGc\u001a\u000fWrQ\rr i\u00108\u001e\u001c\u001cge\u0003W< 9\u001dW]:w\b\u000fHN\u001a͙\u0019\u0001ds9\ff\u0003K\u0012n|Db%!25^BO2g*\u001aAM\"\u0016r+1HJ6'Bd\u001c\u000fNv/0\u00066Tn1<|;ĬLD\u0005&L&\u0013#i\u000e\u000er 6&XՖ5%.ZKݘ\n\u0000|\u0017h\u00062\u0010le\u0017r\"AFˑ\u0005Jom((d,RV\u001f8Sɪ\n3\u0017M\tDS\u0015F-\u0019\u0019\u0019\u0019^\flU\u001b#\u000bT0&r\u0002r\u001dq'nm7g_m\u0001R\u0003I\u0002|ZNj]M\u00059;CN\u001dxV\tT1P3Obi\u000fѡ@\u0005K-K%\u0016%ٚVK,got\rKr%\u0016s{cH\u00058\u000f\tYUnpiSܒR9v\u001d^P\fV1\\>Ts\u0017HTdu\nƟV9\u0003vçFX\u0005A\u00180\"\u0013\u0011%\u000b\"H>o \u001c\bB0!\t\u0006Fy:PY\u0017/p%x]\u0013\u0014`R2 .4\u0002'3\u0013ui%Y׋\u001d\u0013]\u0014/~/3>ܟU'uڽ\u000f=^64kVw\u001cd{;iksgP\u001cP\u000f]\t*?>\u0019y\u001a)CiD/À/0=\rcEa`j}^\f\b\u0013\u0014\u0004\\mWԁg\u00196@\u001fɺ%5%5%5ݢ)\u000bgG:F\u001bS.m\u0017n&5ɮ~z.T>|RASASA\u001f+[8پ\u0018c\u001a\n0В*\u0016ЧA\u0013Ww:\u0017 ՕmWⰶжobP3CW03\u001aO!1Z\u0014\u0019l^\u00045D\u0006܋*BL1\u0015\u0019 |\u0012U-\u0011\u0019L\u0005\u0015,CcɩrE\u001b\u00159n(ZXhcE\u000f\u00169V(]hcE\u000fJ\u00179>(]tE\u000fJ\u00179>(]tE\u000fJ\u00179>0\u001c\u0013|M\u000fC\t=Hi颀#U(`Ι#Z12\u0015e\u001c\u0015!tV={\n瞩z{\u000f=)\u001e{&cO<?q3O=ͺs\u0003>\u0017l\u0019N\u0015}O>*cO1\\ۃͭS_\r_|QUP\u001f}{SG/J\u001f}+\u001f韝*O\u000fw<S}/\u0017S/WGz/>K\u001e{6w?TwO?>&rσO\u0007_\u001f_oAއ>WO]\u001f~W{c\u000f+\u0019_?*}F\u0006ʽ|\u001c餋\nw\u001f\u001f$\u0013a\u000fG>{]\u001e{rﺋ|g~r\u0017\u0019y]r\u0017wMkC;޶\u001cb\u000f_\u000eǕhgE\u0000\u0018\u001dS훻[QtfPn+*oPC`K\u00174nsF\u000e\u0019N\u0007*/\u0018/^ \u00055ԅ\u001e\u000e]\fN9ж\u0013\u000e;[⍟x0}Qp`㱾\"Xg$Ȣ7Jbt\u0015YST\nI;u\u0005b#H~+\u0012۫\u0017\u0014)HnCH|{[x$PjBO&įbj\\t[Ȩ\u001e6UeDhS&.^>{ƫ0}\u001ak\u0011RF\u0007)D\u0002ke75D;\"M\\<Us|Ko(\u000b(vH6U\u0007k%vVx\u0017ti5Xd\"=\u001f}ZB3ʛPpa<t|~j#uT[\\\u001fO&As%\"\\..JW%`ȩ\nEۛ_%5bшq\u0011Ez`@d\u0012*D8Y|ujSOG-j\"QR47N\f57}=\u0013ݨLQF\t\u0017d\u0012,\u0014>n(UzeKTϲ%Z)n\u0007GCt84\u000e͆\n>:h\u0013In)\\lM?\u001e{yF[s՜/\u0007_tqkwؿ=t$+\u001bU ]-\u000f^\u0005DQJ\u0017UXB\u0018\u0018/\u0019gV\u0017T}oR^Wn\u000eom˯\n\\\u001eL.x\u000fF\u0017t\u0005=\u000b;U\u0005z͖\b\f\u0002Ԑ5QKhI\u0015c^(\u0010l:o83Ai;?fr\u000f\\6lm2RT96xԸ-~37q#!`=\u0017zUf\u0003M삋1JzQ\u001f\u000e\u0013\u0006\u001fHD\"\u0011j\u0014ZNcK]\u001f;Y\u0012a\u0010X_\n=I,FG\u0019\u001c¥\u0014,q[\nT7Fe!i&T%OF\u00126I\u0001N`\u001e@n92Y7\u0015\"<Qpo0\f:C`ԸlgP(Vr(r\u0011\u0006%u6X(0k!\u001b\u001fu1g\rDb\u0005`\u0002cHr(\u001e\u0004S~4\"jt\u0018eJ\u0011B70\u0014\u0002@0\u001e\u001b'C]lC\u001152D\fh[\u0003-hC\tF\u0013\u0007\u0018m\u0016\u00120RhS!v>&F3hN)\u00071 Re(x\"x\u000b|B=l6\u001aE8mtH\u0005\r'\u0002zۺm\n_IJTl_\u00175A?|\u0010S-%t\u0018\rL) j\u0010}\u001f\u0014d\u0018\u00184Ad0&5Iq\u00100ˢ(d\u0012\u0002\u0003DKD\u00102\u0011CO[\u0002٨jJ\u00016^9qV\u001a\u000em\b%\buY2\n2m\u000e0H\u001ep\r)\u0002{sR*@\u0017\"Ez@1$z\u0011UtSR\"\u001bh4U$hn4F<kEj\u0010B\rD%27P\u0016mOR@\u001a \u0011\u001aݗ\u0015@\u0017I,\u0006\u0002[ԨW8\u0012U=\u0002*\u0010>PE.P0\u0005R(WZ\u001d\u001deaፆDVJ\u0001uA\u0012x\u0005$\u000bmK(Z\u0004P5\u0006@wP\u0015MU\u0011WcHyp \r4f\u0001!Z6ÀFR*(O%\"\u0015\u0007A+r\n8pɡ\u0002s!(\u000f\u0006\fr5R\u0016Fנ\u0017~D\u0010f\nD{\b6\u000fThK(\r(o\u0016RCC\u0014\">96-\u0012v\u0014C\u0017퓇2\u001c\u0019\f\u0018Q0^\u0010\r%6g#\u00182\b@\u0015V\u0014\u0018Yg@L&8S(i\u0019\u0019#9\n\u0003\"R\u001b\u0019xX\u0010qh,$!뢡\u001ckD\u0012J8QJs‛\"mP<w\u0010<\bF\tqccJۊ\u000flJВ\u0018h\u000bgj3CJ\u0014\u0017\r4\u0003\u0006-\u001a'{\u00180\u000e\u00134zl)@@\u000b5M)dhL\u0004fDF0Oe-E(`\u000bx49|b\u0018\u0016O-\u001f\u0003\u0001Q섕CfFS>9`uJ!\u0005\u0013\u0006&\u0016\u0014V\u0016.\u0002z.8\u000f\"k\u0014\u000f>\b\u001d-?*\r<.H!bN\u0000\u0003j (a\u0011\u001c\\\u0007i\u0019h\u000b\u0005\u001aI\u0002U\u00043&\u0010'G<p/S\r\f\u001c.}\b~\u0005J\u001bi\b\u0018:\u0016E\u0016:\u000e\u0014ō:J;\u001aFh\u0001\u00078|\u0012*\u001b\u0012+>@%FX\u00038,h\"\nyqD9J[&\u0007ц-\u0003\u0001rPX\u001e\u000bK-\u0011ˑt\bRQ1ǤaeFᝆ{F\nVp\".\u0010\u0012C\u0007·P\u001b,t\bxt=%y\u0010\u001d\u0007\t62G@TaR]NVjo}\u001a\u0005E­\r\u0017=\u0005\u001c\u001a10P!MU\u0016 R\u00151\u000fRղ%Gp\u0012 !h6+}YD{\u001dity5 Pzi!\u000b\n4\u0010\u0011\u0004\u0015\u0015US+Y\u001c1+/e̋T\rT8D?y2-\u0004>jHI\rQu\u0018;6i2R𥘱\u0014B|\rvg&z\u0012ٕILd\n\t~\u0003\n)e\f9u7T\u0013#\u000f*&aކJ-u6{\u001ah\u0018ļ\u0000\u0002j4eҧП\u0018R\u0016\u0001{!bzQde\u0018w{\u0018[^6\f(nW\f#Q}@wF\u0003b\u000bt}\u001fh;EQFj޴4jR\ndeVd)1\u0014\u001dV#M9{\u0016\u000bPxs\u0018\"\u001a*\u0014Z\u001e~^Or\u001b+3ʕF\u0012\u0014&\u0006\u000fz\u000fCH~\u001d|JQ\u0010$\\ҲP\r0wy\u0000.cKwbxï\u0010\r6(.L\u0002y4\u00174+*b[\n'\rZ\u0016\u001a\u0007._ZmK$F!?\u0007k)\n,\u000e_-uV\u0013\u0015\u001aO+!\u001e ī0-8q\u0001d\"ЩrTV*T.꠭9\u000e/\\2̠ej\u0005\u000f+j\b[fzbޡVq82$\u0006<\u00170@Vi 4yQnd\u0019d\r\u0014`\nS\u0019<I8A%ɱuc <2q②5V:F\u001aX1\u0005բIY\u0015^r\"\u001fE:&\u0000Pnt;\u0011oHg\u00050AKySu\"V*$f+z\u0004^\u0015%\u001aU)PdΠ6mJ!\u0014\u0001~@}(30+]ݨ\u0017T\u0003,8p.\u0006e3uQ\u0016\u0005\u0013\u001eQrģ$ڔu\"L)i=$Y\u0013@ CWK|\u0010xH\u0001\u001d\u00013\u001a i};%wHNzye[N\u000b[``D\u00054!s\u0010\tqѭ[LhRrSQ\"0Ȯ\u001c\u0012\u001d\u000bD\u000e>)e\u001d(ت0\u0015\u00137+0̏1B(r)KsE\u0013)eC\u0014o.ed곭%6Z\u0012SNèjI\b%5\u0015ԩJ y\u0010|h\u00075Z~Hu0bA%\"cd`[\tȴ,a\u001cWd\u0006\nG0zt`\u0013AG]x0ha``cGd/ny*\u0007,9\u0018*\u000fr¼H\u0013\u0013?\u001a2ֲ1*\u00134l\u0014\u0012Y\u0019\u0018?kAդ\u000fQՃ'Oϻ\nSj#k#aӃ *e\u001a\u0010u\"y\tG<!Jn\u0000\u001f\u0012j&=\u001bh\tn)e\u0015-\u0006G\fn\u0013\u0012`B{W8e#S4\u0019ǌ(\u0013$\u0018Ru\u0019\b\u0015¨tr\u0017\"!\u0015)Q.LAvJ\u0019Q$Fqzp\u0018e,,`\u001a,D3)+\u0012\u0005AzC\nORf.'*e\f\u0005p0KeI5:'Y4\f\u001eׁ\u000eŴʌJ$+uSj'Ӛ\\7o\u001d׉Цpce-誕<ƐXXG1\u0017\u000eY:PQ<4vE/պ1d\u000b=_\u0013!tl)d1R@LZ~\u0015!\u001a\u0018x4D\\P5\bs\u001be\u00019?\u0007\u001b\u0012!9+$W\u0003#.ݨZ-\u0015fS&-\u001bbb-S\u0016Y\u0015Ce\u001e,\u0013@l+-Jj\"Br\"\u0011\"t$(Q5hr\n؈2#Ř+UD\u0018\u001bh,I6UQQSs\n')jz-5HU\u0012\u001271H(S5V\u0014m5jI40UQd ]G\u0019\u0004V?Mz\u0013BYrppdy<Ѯq:%Od]\u0000m!E+\\(\u0011<^%\u000b5X[_ukx^,\u0016\r&\u000fɪ\u0007h\u0006%Y\bG\u0002EcƢI?S8hr~B0\u000bbIL^o\u0007\\X6]@4\\AA\u0007@bt<4o26=yV]'\u0016^LFych:*o$hm{T9Y2g\u001c9ޥ\u001b߹׮_}7/~;\u0017_~<_QD)(sK8bT#U\u0016-\u0016\u0011\u0017\u000bH&p@ͭa\u001a\u0016\u0017\u0018012H\u000e2\u0000`U\u0002\"'\u001cp\u001cx&f݁\u001bܼ}u{pdz{\u001f0r~z\u0016|sD!#{QY#{YN:fp*NS\u0014da/\u001ds=Ԡ#{}٨qQ\u0015:\u0011#|nF[Rq\tY7GB]\u001aGJ]]D(:\b_\u000b\u00076OBo1ڿ=ܮQٽp\u0001_\u001escxE1Hikw~|M\b<ZI\u000fvo~\u001b\u001eN67\u0017\u0010_߿soxs+խ={\u001a}T{y%$Y_Յ\u0019͚`{[\u0007?6Մb\"ս]y}\ro\u000enOb\u0012.STAW;lb9aR\u0005ד?VN^.]\u000ej}'-V9յixw\u00067\u0007\u001a\u0017̢\u000e߾6۾1)/ȿ\b-/eRbQ=öQ^\u0016\u0019]\u0002ykl9*tmM>2pJ#+dJ&-\u0007\u0006*$\u0007Ļ׺w\u0013wD\fɔ,XJ/K& \nLW7\u000fR2Y\u00069\u000byvug$\u0003\nY]F2\fyzKԻ(3Ay\rr\u001b\u0002eQF)y~\u0000sk+OђVޘh$$\"\u0017vŁh5F2y29˹`&EVpT3O\u000f.\u0007u[*G\u0019uy\u000eRXf\u0018,qz_dLD\u0002XR2\u0017hiiiog..\n?ɂtmtv$oS]h9w\u001d\u0013M7vӸRk(<s3ͦm\u0017mU~o\rm9\fi`\u000f直\u0015S\u001bY97R\u001b% \u0012\u001bprlɷZ&D\u000bTֱ\u0011'W~Vl-qr\u0017nֲ!GnxKNNM9Nkٖ#Zbc$[֜ljsNf\rsF7Tآ#wZbNl\rtֲQGnV*Y:\u000bdkٰ%qᖝl-v\u0016n۩\u0006oɪc-[w\\y''[\u0017nFg\u001d[x*C`\u0013ONm<ճeg\u00193cӁ+$.ܵSu۩:v>]ޝ|9\"O\u0011[\"|\rxn\u0011ڕZTw䪯coNcw\u001c=\u001cH\u0017[\u0013[\u0016@ڐ#ɖؒӚԦj\u001cIƜ­9999Z-ܠ-ܢ-ܤ#ɖئ-ܨ-ܪ;\u0016m֩\u0016O\u0016m\u0016n+\u001a\u000bdkٴSC-ڶS\u0015|Ɲf֝l\u0017nީ-ھS`\u0003O]\u0005[xjhyxr\u001bya+O-\u000b6\u001c<Yg4\u001ao9\u0018s7ԚbZS\u0005[{j`sO\u000bTa\r\u001b|j\u0013`Om\u0016l\u0019|\u0007-0|[l2edkS\ru\u0006:vTn\u001d{\u000e)?y,gU.[ۙSS56c\u001b\u000eH\u001ec1z8kԾSG\u0007j߫M\u0011g/E\u001d׎\u001dhT#ݷ1>\u0005kZ0[/޼9\u001exw|P\u001a\u001e\u0000Q/qq{sxxۛ7\u001fn_9խO=~nשߍ%z4ͼc\u0006\\A\f}s<\u000fAio.!+\u0018\u0005\u0017\u00025\u00065[;nVc\"/szL\u0006!f\u001d\u001e\u0016Js8d\u0000Fa:\u001b\tP\u001an\u000b~-34,\rJbI\nlye\u0014\u001cF(~8^fDH7Ĝs *i\u001a/p,\u0012p\u001d\u00141d)Y\u001eQȂ!\f\u000e\n!'2\u001fSE.<h-\u000eg;?(x%fDFDYl\u0014\u00077RG\u0011)`\u001b&\u0014^4n$kL!fԕ^BRT<c\u001b\u0006JM7\u001em)Ys@\u001c \r+è\u000b\u0005[,3(ͭg[\u001biRDY+kk(\u000fdCbΗx+Q^R@\u001c&\\foJ|cxcp{\u0013y+q{\u001f\u0015S^A\u0000WXf5\u0011Xɉ\u0003/\u000bN{+q&*&\b\u000egy+3r/}})1ü8r\u001cl;y}㬨\\>-\u001czL\u000b1u\u000eY50)l=.鋃MH\u000e9KYforXyG\u001d\u0016\"*G)/\n5{\u000b~C\b\"y\u000f*^]?z~\u0004=@Zf6smwdfy\u0014\u001aG\r|05JS\u0002\"t6Gk4|gwׂ,ճg^2|wkƫz?|߬$@6\u0005=$Iʏۿ9M_\u0019|\u000fGLG\u0004(ùT\u0000yBO\u001e=ëg\u0016Dpa#jlWӞʹh3ܦ<\f$f̐\u00192e2r8\u0015\n\u000elmlgul\u000eYZȊ\nG#'#2\u001eȜ\f;y\u0010\b)N\u000bWz{9xṧH\u0012WKH?(ׯ|\u000ezO>wewRZ\t\u0005;;W1m%p;\u0017_/\u0003V?K\u0004_?v\u0012f\u001frFy\u00048\u00131|v\bm%S91\rsdcD͕V?tјؾ\u000f\u0003߷[z؏6Na띭\nݸ9|8\u0016NY펶XAmJ֖\u001el\u0017G\u001b1\u0005\n{_(bp2W}񑓗\t&ɇ$Ed8Ddwפ%d`o̗֬tV7E\u001foeW[w\u001btH3ܩB~'p!;#w^ʖ&BI\rӥdUROޣ\u000e*|z.?\u0013l#4F>xt[\u001cݠ\u0016u\u001frέSsT/\u0017'<_QkU͗\u000e \u000e+ֲmj\b>>?y)<YL\u0005\u0018!\t¤;ۢ*\u0018\u0006Nʚ\r9\nRի޲24\u001ar\r7\u0012(%\u0004u8ٴ\u000e\n-eAlS!M1\u0017n^tVʘwR@[\u000221rpӋ8\u0007M%\u001b\fu0iۧ<a\u000bU5]\u0014Π.SD^](It̟\u0017\u0004\u0004\u001b\u000b20TUe6A^\u0018e\u0012.3&=jR8̤pLU\"V:O~^f\u0011ntT(-j:hr)ySgV;9ۿ}v}Tl\u0001̐HX\u001f\u0018)0\u0005y4m+k6{\u0015c^u[sg[V{h-dxO*|p/\u0019oE/왞\u000b\f^#AqFOn\u0017\u001a,\u001d0}r%$[[l\u0000s\u0003\u0004\nc7>)tF6;@\u0015\f-:\fʠ_ts*mۙ\u000ftzf\b\u0007)\u0007A:i\u000b<k?\u000e^󣣍Ny\u0011qZDEO\tC\u0004|=Zʹh3ܦ<\f$f̐\u00192e2r8\u0015\n\u000elmlgul\u000eYZ|\u0002'|\u0002>\u0004|G~AG]mرR}L<,Q=\u0001\u001f:kˡo\u001d;}5\u001c89\u001a\u0016;w\u0013pog=\u0001f|\u0017-O\u0002o}\u0012e/s\u00009i'LO0-O~\u0002>Yxho\u0015\u0002\tz94<䄳fRZY3g<99tc\u0017Ӟl\u0012\u000e\\L:<\ruyB6\u000b\n\"G6˺Ocn,tJ,e*\u001f(>79M\u000e&lI`\u0015\u000eM3*H$'Ϲ\bJD6by/'\u001994B!\u0007\u000f!s'H-\u0007[&\u000bm\r\u001b|\u0018|hlU-FNXkIac>\u0014YRlI)\\.u\u0007DN~C!NN\u001c&'\u0002R$T\u0004Lݮ=D7l\u0015Y=\u001fَ\u001a.guVK\u0012JA6\u0006_εÝ<)~c탧rԊ셖#\u0014\u001cx.%\n\u0005DYҰ>{B-\u0019Ouiq}\u0010ohnufȲZ\r\u0011ۍ=;VsV{\u001f0:afBPH\u0017/a*$zE5\u000bz\fi\tGB!ɖ0\u001bM\u001bs׏t`@yGI\u001cكy8ԣ1]~qpyqF1\u001e*ٮ۬<6;m:ϣHrk\f!3\\&+S`0Vv~Vv%8|8ӏq6\u001e_\u0014Z*ј~N\u001d[#ȸ-\\\r7֪a?o\u000f-ޑ 6G\u0018Ss<g2ΕyNZ|X7}<g5\u001bs&\u0012O\u001em'eR\u001dY.\u0001TH'\u001d0\u000f\u00011\r\u001esfg~\u0014uouDN~\u0003\u001f\u0017Dסy'mV\u000bEr\u0003Ń{!G)3\u0010G\bK[i* ?&R0'u\u0012%i\r0ܒ\u0018{y\u0006EB[\rX4_\u0017e\u0002a\u0000-\t\u0002\u001b\u0003G6\u0017\u0016M/*_45]R\u0001F\u0001J5rX\n?}-A:Y)83Sx\ng\u0016\ng\u0010kMD\u0001D\u0001,A\u0007kl6Qr\u0010\u0000o\u000e)\u0019u\u000bM\tx艓'L6T\u001ah5u K(_h#\u0011%\u0017VbH8y`e\u0004`\u000eجzpد*\u0018U>\u0019WX\u001dj-\u0014e<*]A;jo~n<~ɑKGH\tYq[,HK59XW\u0007r\t\u0014\u0007nX.\n׶ppTs..9zfr6\u0012{\"kw,<r9<\u000612\u001c+ws_IpoV4s<`I\u001e\u001f\u001e\u00025\u000f,xR\rʕ?h\u001eq\u0016W\u0012JK\u0014\"J\u00013P=VÓ\bNBώO'mTTTT_\u001eʉ\u001a|-p݉F0ZSy\u0010-o-\u0015l\f7fu^\bӳm7\u000b{yp93y\u001f\u001e4O)B%nӥ\u0013=A2gQ麳nઑpJ0ϞqB@,91rИ\u001f\u0005#\u000b\\!'v:WS\t>\t硡\u0004WH\u0014$S!\u00112DO\u0017MyDY3\u0018\u0017f\u0000\u0000cbY\u000ew1C^U\\e\"SJ#A\fJ\r&H!ϠeUO\u0017Ch\u001bm\u0018rG\\|?\u001f8V:I;Utq9\u0014t\u0003I⩦v9Lw$N8U8)AZ~Ki/?=_O\u001f_?=oY\u000emv0\u001a\u0013n\u000b\rj\no\u001fRJ\u001fz\bq\u0010cdmDB(O_Yf}%\u0010VEo|Z6\"j]Zc.\u001d] k\u0012?\u001c*hr!/\u0000&lGTΥK1Tߵ.潯\\O; VMkn(#\u0006?c\u0000V\u0000+.\u001fXU]MUᴺi.G6]e/W#]!\u001b\tb\\]ul\u0014#F+R5\u0014L\u001c(JUxGTT\u000e&@s~\u0000m#\nɉ˕\u0018\u0012j +\u00016Պ\u001f\u0006\u0010׆+?ݻ7\u0013\\x|\u0007\u0013ISv=o\u001f|/s\u0012ozh'P\u001cv҅#\u0016v\"w?lj}%5as\u000fˑTܭك\u0005XS\u0007u`N\u0017⮬Jݕ]PYZCnaaf}\u001a-Ycڸ++EȝPۜj{YjW\\\u0007\u001f|&7\u001e/qF6\u000f<؇>\u001eyy\u0019w<g?\u0013>$Ii0*\u00042\u0007\u001eB\u001f|XvL'I{#_~3O}aT.\u0012\u0007\u0003\u000f9>G\u001ez~Wt\u0003g9_z)pˇ\u001f9#g\u001e{Gqk\u0014B>>ǟdS\u001fG?9s摇\u001f~G\u001f\u0019m\u000f?ۿxʥZc\u001f><я~?\u001e?{\u0006SO=g>s}g>|I\\zq\u001bWzCԫ_,O}泟/\u0017}ɏ~}_҆+_O?ϝ;O'8SmV'>gyW^˯^(sϿmp\u0017q~^ŗ._7/z}\u0013^Pa'?Pؽ\u000f=yo^}^E\u000bSxիo^\nҫ+yoR^_}\u001bHbڋ˟A>_\by\u001bW~o~mlK~^K_~_/-W/_}\u0007_҅\u0017>U<YڥJ J?\u0017\u001b{W/K\u001f\rk]z(_|k~㻗vKs\u001f}#T\u0016_zK/|U=/Yᥫ[߸ŗ^/]q/l\u0007ok|^9\u000b_Sg\u001a\u001eϙ/O~g?W^Go}ҋ\u001bߺ\u000b>~s_Z\u0017׿v߹\u000buy'?ܧy}ܳ|=_\u000bWP_|kR~S/}\u000bůU\u0015eh*\u001ezH\u0012\u0013\u001f:>;e՗ʯ|O/~\u000bԧ>\u001fĳFn~\u000bϝ~짞x>\u001fzD\f\u00063\u000f?\u001f3ϞG< O?'?\u0011G?ē䉏@~\u001aRS\u001f}\u0007k%!#e|eT93/}O>rG1\u001eHC\u0011!8\\CykbI!%='ygd􋾐}0Fx+0Oaݏ2y(\u001f0~ZO{NUUTcUlN?څ6apىV\rB\u0018\u0016GvŶ\u001b\u001al\u001dU\u000f\u0006hE]\u001ei\u0017/\\?-mxp.ս\t\u000fFWt\u0005Žۻ\u001b[իˬ>\u001f7C0KFBz6w-f>[Ϭq\u001eP\u0018/o͸қt&q\u001aXFo\u0004|̭\u0011\u0019n\u0016Aߊ1bY\b\u001dحbS\u0015ie'L*$}.4{\u001cwsgzx5zͅ\u001fHo<U?de~z7osp\u0007n߸w`ok(-w[h^\u001b\u001dYl,\u001e 󽛃[;7\u0000Y\u001a\u0017o\u0006μQ'lNvm\u0014\u0012W9JKv֞l2'\u0011'U'dĻ\u0001\u001f-S4{\u000e\\!\u0006vE#\u0000K=Uq\u000e^n\u00189^\u001f#\u00143ƳtEn\u0016-?\bZ\u0012h;yv*tvdƲL5ȵ<'`y\\{w77_wu\u0017ɞ\u0018\\?]yW\u00162B\u0015F\u000e2_\u0014~@ǠhA\u001c#/㽱Ï\u0003)\u0000R:}L(%\u000ey>\u0001IV\u00117]\u00142zmriF)9Á\u000e:ŭ}c@\u0012\nih:FAhyB\u001fU{읋*B\\[A/:bX^a\u001dJ7wK`QW6Jme\r(ؤ9\t7\u0017Ʊ\u0018:h2ؙ |⁩IS_VX\u0013c@\u0014\u00122*<)z@r!\u0000RE_4kmY\u0002B\t\"aKU[\u001drA3$ԋW}M9\n\u0015hG׹T߃\tY%\u001b\u001dNH\f\u00077^߆}=\\v\u0016s6\u001dΪ\u000f=\u001f8㤖(\u0012Gl%K9\u00164޷zv>JFw7y\u0007=<uMwbsB;tOW\u0015;bݶ>\u0007\u0002G,cs//s\u0010=6d~yMvX9gO?wqi!\u0019D6?`W\u001aeS]eq\u001dbbNV\u001cQ#\u0010wܞ [NRCnOv94@9\u0018\u0014\t\nv=U\u000e1\u0004?H߻ВSX\u000bhf<'rjib$ɹ)Zr4/\"-(W\fN\u0013Z\"H& ⌨:ԦJr陾l~h\r\\CĬ^¸7c\\-rp=-bIuN^\u001d'뛼lE֢\u001dxX{!V\u0018r\u0015lƒSuXI)98'8\u001d\u0005LiC仆\u0015I]>q%9w#d\r3eI̞\u0016[\u0014\u0011Zt,K\u0007C*Ym\u001eޕx\u0012`z\u0005\u0012Wc\r\u001d\\ɿ>\u0012cC8МFօ\u0002e0\u0004llGtN%giUYN\u001c{\u000bg\n͉N\u0013B\u0011} #$Pmi\n9\"-bڏ4nb44f}7'GI:\u001cJזd@cM\u0013}J[\u001as\"E\u0019%ʲñ\u0011`\u000bt\u0000\u0012\u0012\u000eɅL\tdǈRV,f؀>\"(-\u000br#5\u000e]u.tF^\n*i\\([\u0018ʭFN\"W\u0007eU⤖)#\u001fT 6U$k0&8nq:\u0018lR\"s2\u001d\u0017J4)MkQH\u001ca~=A3*_'R0ƙRR\u000eS\u0017J-@J6B\u0019JtoLۤX\\0׽4|\"j\u0019+gR,]lXGI}\bI\f >\u0004Ha\u00192UGY$+\u001c|سZo@X٢iry,XIʔ -ܡLJbеba\u001di60)䊗,g\u001cאַ˂\u001aAe$iS˰.X\u0006:N<\u001al0\u0018Zr\"!J\nr\u0000N\u001eVA$\u001a(M\u0000\u0018Q\"\u0013b2\u0019<\u0015F\u000e$)mLfۋ\b!YrNҗ-'2AIԉR3|v4\u0016\u0011/BYNJ9йnD\n`\\X'*(vSrn7D\u0004-hli4\\K\tt'\u0010^\u0016BCBK\u0017r\u001cQ1]0\u00129w,\u0004\u0011Z\u0000,tVRؐ92dE\u0002-I#\u001a$#|DbQQ$qc0\u0000\u0017\")C\u001d\f2\u0006\u0017\u0012\rƘF鼪dU!'Uh4\u0015 \u000fXt:[\u000eߠ{=$\u0003]\u000e,\u000eUA&j@\u000e\u0014rpJ W'\n^Q/\fӺq\u001c\u001cR#z5VFsj;!\u0014cN[Hɽ\u0004yi^Я26t\t#K\u0014\u000e]\u0002{\u0012\u001b9B\u0013pH\"QL\b\u0012ۃRx`kD\u0001Z\u0012\u0012KtZrՂMQ\u0005te@Ǡ\u0014Te&,9bm/\\F}Jy9Ka12s坘\\09t.u<@ˑy.0B,[-Z\u000bC\u0006V\u0004vI\u0012\u001c*\fB{2 0Z%\bOH[bX|NSD\u0010\u001ad\u0011\u0012¨=)J\u0001M\tAM(F6R\u0004\u0019#.\u001b%\u0007a%,nF\"薢6\u00132\\t:x\n\u0010xH\u001cfE᣸&\u0016\u0018>3#yCS*\u001b>ҏ\u0012;+\u0016h&k\\OLAס|>A1\u001dl\u0006eS\u000bK6HV&?\n,HA]4o\u001dM`f\u001e~*GG\u0016ge\u001e?\u001edx\u0015\u00003Seބf\u001f\u0006wNnժ~9\u0000>(\u001dVMF\u0000Oc\u0004\u0010`@2d9S\u00001$V8\u00117d9l?3|hd\u0003.=I-L\u001d|\fRg/\r\u0014f\u001c~aj\f\u0018\u0014ZI(H%F\r|2\u0014\nYCO\ff*$*KG|^|Rؐ\bsR\n8Ox)\u0005!^\u0016\u0018zbEӊ(\u0007.\u000e\f\u0017U/]`TA24Te\u0010'\u0013:ݦ1&\u0007.\u000e,d`\u0016rWU(B˙Z\u001fdn*M hz#\u0001uJa`\u001dl:AZʟ\u001cT\u0001\u001dTV&.\u0006\u0016.G\"+\re$;JxH0\u0014ѺBPK]}\u001cf~X]\u001a)\u0011\tr$\u001a|\u0001Wc\u0016{l:\u0015R\u0019\u0005!E\\\u001f1Jf~\u0011ZHGWV>ᕦ,ȲO_SO]!|?e/UOsMQ\u0006c!GI\u00128\n96\u001cħ^\u000b\u000f-Tw?I\u001f\u001aNFw9PRT<˨.ɭjт`oɭ\u000booOwozU\u001cSǒ\u000ee7p{n\u001f\u001e,\u001fMp\u001f>\u0012Ғ~;();|yo{toކ\u000eoT\u0019\u001aKxuoW{훃/Tv\u001f&\f\u00077\u00077^k\u001bÛ\u000f\u001d}4ֵ\u000fMi5j\\t^9Hʾ蘴|\u0004T.]O҇1iŌb껌Bӹ胻C2\n|d6eΕy;F*\u0012\\\u001az0O.U].wPS;&ES\u0017S\u001azҫ#C6rd&si<ƌbZ}\u001bӫ:tPӷ/3EUhnK8sMvC_\u001b|0m.dB5>^\u0019{99xm\u0017v߭!//Qѯf\u00174:E\nM\u0019?\t\u001e(\u001c'\u0003aFvSg7ȅ:%\u000eײƣ\t!\u0010BN\t'}\u001c\u0012!\u0010BȿP\u0011B\b!t\u0016zh\u0010B\b!݄N\u001a!\u0010BH\u0007F\b!\u0010M\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t\u0010:i\u0010B\b!\u001dN\u001a!\u0010BH\u0007F\b!\u0010A\u0011B\b!t9\u0010B\b!npe!\u0010B\b!\u0015<I\u0017\u0010B\b!Lzht\b!\u0010BNY\u0019!\u0010B\b\u000e'3\u0012rZ{\t!Ѡ\u0007\u001ez\u0011B|\u001e~\u0003\u001e{\u0013*s:1\u0004(C\u0018\u000f@\u0004y\u0000.\u0010\u0000a0\fa\f@H \b2\fQ@\u0010%\u000e(\u001cpFQZ[P.km{k{oWo￷ϳ\u0013\u0012\u001aOW\u001cN?<{oV7wH$\bBm$uUB\u001bx\\ߨyn (\bB|\u0002~w\u001b]&}A\n\u0005AOQA'PQ\u001d\u0007\u001c\u0015\u0004!>G\u000eќOn\b7ёs/ \bysG~Үo=mǹw?kA\u00101ݡ\t-I9\u0007_\u000f \b\u001f>\u001cRS^6EG.~C\u0010/_]<R\u0014d,o||\b7\u0016˲\u0011\u0004\u001bȲ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004Ȳ\u0011\u0004D/#\u0017!\bB|.\u001e)2M>_*\bB|_:8ǟ˦I\u0007\u001d\u0005AW{n4w&l\u001a?GGν\u001b \u001dQn\u001bc\\רUюG\n\u0010#\u0007whο'jt\u001d\r\t{\u000fʝVPT,\bB|\n\u000e>\u0006,Q@P\u0010\u00047BFQB;$u\u0012\u00046:*\u0011\u0017\u001boq N7pZ5p^\u0010sh\u0004AGJĄQ\t)9\u0002<rkҪĄqx #:jc\u0000=rdZZXHUt)Ues*`^qay-Ԑ/\u0010(-Ұ\ny\u0003ⴢ`+-9E\u0012_\u0016G䊲ʒҼꪲ\u001cבpn魅Mm|Hbm4҂NҐ}E}E\nk~܁GbӑY2\u001e;A\r\u0005~\u0007<nq>\u0013\u0011<\u0016\nz=.O󆜮N\u0017gu+\u0013\u0013q;\u0016&&xt\u0013+Yqߟ೺!o0\u0007^o'^'\u0003@\n|S}\u0004|\u0012˕~\u001f\u0004gL\tPȫ>DI\u000fϏĄ4;rz]Ps\u0005B^W?\u0002^m~\u00107LaPxB^{w;ݍOK\b?Ox!O\u0005.z\u0017r9\\.h \u001d\u001b\bn3\u0010\f7!\u001fPO:龠ϯ\u001f\u000b\u000f\u0012t!z\u0007zC\u00018o]\u0007y0\u001c~ӏi0B>'-\u0017 `\u001b\u0013\u0013t\u0005PP?;)O\u000b\u000f\u00060\u000f!!/ď.y\u0011>\u001a\u0017'qb\u0004\u0002P0Տ\u001aw\u0007\u0017N\u0010x@\u0010˭\fB\u000fԧ4`7`|\b\u000f^7u\u0000^z2^\u001bk\u0005t\u0007ACa\u0017V6?Br\u00039iG\u0007\u001a5p걨Q^\u001b='`\u0007kN6?\u001e\u0006h\u0018Ωǣ\f\u0007eV\u000fF_\u001c΂\t%&LNL\b9RoqOǎܱ\b8\u0000GjVa\u0002\u0016@B\u0000\u000f\u00174\":$:\u0013\u0011G%\t~3\u0014X)V6v\t*SJUI(|\u0018KF\u0019oL)_SƇgR\u000fS߬2>L-iEOW4/W!;H\u0016>erK-&~vKz^ɯpf7*VfUU;ʑҡ̲\u001f\u001d\n(YIeQiAfN`|ђҪe%\u0005cJW\u0016g-AV#\tW.KEew9]*\u000b-\rˑH^n4Wo|w\u0012bz\u0019YE&WT\u0014.,-q̭*,)+vxBpwNQƟYsaBn\u0013G@LB>7Lč1\u0018p\u0010!wb\u0015>\u0007\\\u001e\u00132bp\u0002P3'`XIiX~\u0001f/\u0015k\u0011\u000b.,'\u0005\u0003\r\u0013;\u000e\u0004=\u0010n#_e]ƒ(9XN\u0017\u0016\u0007\u0005\u0013\u0017e,YYE=Uz\u0000\u000f\u000b\u0013i\u0015wRLs^~ĉ{o*.>ħG`*\n!m\u001aK\u0016ìJ,e\u0015\u000bJ\u0015R\n7\u0016y9tVV)6>\u0014Ap\u000b\u001fɟ(tYYqH\n|ޡ0W\u0000\u0004\u001f^,\u000f\u001b*K_O\u0007'\u001a\rZV\u0015\b_U\n$4\u000ep`d 69\t\u0016^\u0010\u0004\\'\bQÞ47F{$|\u001f3e5<e4(Ji4V4E\tED͵(+Ò0I\u001b\u00146P\u0019ќHTд4i\u0015Ek{\u0011ꁝ's\u0002幦I\u001e)Ŵ[ګ(\fK#H1\u001cߖhh`1]çn\u001c9=yTJkxc1jbV\u0011RiH(D6K$\u0012i\u000e?Z\u001b-\t\t.LWE78L\u000fJFΊ9[jTjCsl\u001a;֚\\P\u000bf+J\u001b\"QO&24bX\u001fa\t}1DOE/EJ\u0011\u0003g!<AzT\u001a*4v\u0004r!ZX͔VU8LH(H&vL\"H\"6Huכ\n24\u000b\u0010=beNyR\u0013HS\u0015dX32]p\u000bjuPbd\u0015GUS\u00142O&\t2%e҈\u0014R(k\f3Ե\u0015ƭx]E\r3FQo΋(4?m=#/\u0005V7N\u0015UU9NQ#\u0012Q$\u0014:M\b%\u0012D\u001aC\u001f% @\u0011\u000bi\u0006X\u0018\u0018AU!\u0000[\u001a|arE#H0\u0005\u0016\t+\u0015[ռYS$%TLR\u0013\rH(IDD.)\\\u0011K\u0002)u,\u0015\r&0C5ab1L\u001a<QSmTg\u0018\u0005 \u0017Rf^V\u001d;kۺ*کJ6mwBO\t2%eR,b\u001f#\u0018ΌP\f3*\u001c#zgg'L[Ⱥfd\u0018Eߒ'`\u0016RJCZ!tNꈨT\tTn8E1մYbmڵF)'\n'D6!%2D\"X!G\u001bC_hb\f3Vk2\u0006o\u001a#mN\u0015!,-,#Ô^$\u0017\u00150bV\b+d\u0015E\u0015I\n7T]1ՌR\u001d^l\u0014%\u0014\t|Nl\u0013dR*)\"VЗ3Hi&Lfm\u0010=\u0019P33&J\u000bd#0\u000bvA.Rk \n`gh7rt)C-\u0013YJ\u001fby\u000bR*\u0013B\u0007\u001b\"O\tєID.A%%\u0012i\n>Z\u0019\u00124t\u0019)\\%b\fnxd$ik$\u0019\u0019Fz.r\u000bje\u000f\u001a2x i姻03ت^(];FPYBK@k\u001e)\r!BF!P,Ԡ\u0013\t6!%VIyD\u0012)8 Lfx\u0014\tWF񴌹1\u000f<)<?A%\u001b[FMb[0\u000bU\"\u0006A+ꇾg(ڴLLhbu\ni\u0016\f\u0010R})t\u00033\u0012J\u000b>A'dKR>i\u000e?\u001b\fiM%R\u0011̻\u0002ʮM\u000eS8ïfC\u001c--\"Ɩ`\u0017[.bq^qZ\u0005\u001fTݺ$u@P5\u00146}-[)(.6\n%\u000fBY|Ny\u0014LH%rM\u001aA\u001d\n\u000f|bda\f*@q\r\u0006\u0013R\u001bkF)H.brIó2*׭BOչc6-QNQCL%uڝBՃQC\"HOЉm\"X%\u00124bX\u001f\f\"fAU\u0004KlP-Ty\"F\u0018{5\u0015<+\u001aKF^$\u0017RfXJk5r\u0004jA\u0003C\u0014U\u0019W2Z\u000em[%&I7\u0016Y\u000bT.hY)T 6\nF\r\u001f\"L\u0013D2%D\"EǐGa)L<̊\u0014\u0019\u001en=\u0001<\u001bK\r;nl\u0019\u0019zA.EUbWJcȪ諴T{@Pguq-۴ع\u0003V*>*\u0013\u0019E\u0011\"L\u0013D2%e\u0012y\u000e>2bnW6XS;BCp]c/e\u0017Y\u0010K{\u0005LΛ\u001aNQ5 \bu\u0017MQL%B{n(54\u000bU\"\fH'\t2%Ri)y\u0012)55%)\u001bl`crC\u00129Ơ90c1\u000bzA.\u0005*H,+h5c:\u0015Y5z\u0014E\u0015KLׇ\nů9SM\u0012P8z='\u0006!PPبiH(\u0012\t:MJ&D\"F쐖G£I`K\u0004[D\u000e1j\u000eL[ml\u0019\t\"\u0010\\0kq+h5j*eU.\n\u0019\u0014Tݻtl*i\u001b\u000f;լEI\u001cSҜnC)T.\u001e>\u0003%O\u000b}Nl\u0013rID&F,ǰd;`g\u0004c\u00141Ƙ)0\rUd\u0017\u0005\u0016ZIb^A\u0012\nө\u0002N0\n\u0005t\u0004\u0015\u0015-\u0012\u001aG8ղMN]92\\^\u0014>S(f͞SX\\b\b|Zٴ\u001aD2%2<b>.< {\u0014{\rE_ZD\u000e9jM9l,\u0019EvA.\u0005XaՂ\b+X5k\u0006EՄqcI!\u0003C~T?\u0004\u0015_(ܭ\u0007b\n\u001f\u001c8\u0018JCH\u0010|:G0LpL\"X\"m!\u0001.AC\u001c\u0016Ic\u0007\u0010OyF^,\u0017܂Z\u001b!V+h\u0012aEVᨚ\u001c<wO\u0014-QV: P\u0006\f\u001e21*_\u0010%\u0014tOw* \u0013\u0004#vHcr7sDa]\"P7⌟(x\n\fh\u0018r-6ks+hBXU\u001cU$՘\u0011P\u001etT\u001c]ڵjĸ8s=9պ}\u0012i)4SY(|P\nuB\n}<6je$\u001aO\u0013tB4)X%\u0012-R\u0002igK?87W}\r+\u001b5[)2\u0015#`\u0017܂Zd\u00162VH\nYJK5j8_Jң+j&ө\u0015b*_1Z)Tܲ\u0005(DJ('\"G6A&rI\u0016)\f_\u0018\u001f<(ԙ#h\u0019c=ꦦ5VRrZl\u001e+jZ\n+JIF}4\u001fʝѯwr74QNA;cj\u0011NȃRT(*P`\u0014E\u0014\u0012R>)Ȧ%2=b<\"\u000f)N\u001b<\u001c#B\u001aRcț\u0006*08\u0005X+hZjKP\u0000\u0017A)y@P\u0005}zvܡubS-vܽg~.op쑣sMVJqHZxU(\t:) \u0013D\")?-gG\rZy\u001e_{\u00185\u0007NiƂ]\u0016u\"V;\bU+UWQTfO8n\f\u0007ϕF\rU6MN5i\u00068\u0019;~TJRKSՃQmIOP6M,\u0013\u001eC;a\u000fМd<%Ģ11⦙4VbY\u0010\"\u000e@+\n+j\u001dj\u0011%UќYӧNA5Nc\u0016MřȩVN9e\r7i괙**\u0016UQHں\r\u0011b'JM$R5R\n\u0019֨8y3\u0010Z2z\"j0KzP\"P\u0004&6mBWR\u0014\u0015̜6j\u001aIN5gRСʛ2mlS)\u0014\u0006T=\u0018\u0011e\n>Nl\u0013D&FJ!\u001a5\u0014ip᲼ Dp\u000e\u001eﰇ3\u0016b\u0016E^iVT\u0003)rT^R͟WRjx`\u0014?4TݒڵL0Isl%G\u000fQcMfjNq)+Euo\rBj\u0013(6ꮃ(yZ(#\u0014MID*GJ!\u001a5\u001c/\u001a\u0014\u0006E=\u0006\"rX\u000e=c.r\u000bj\u0014Y+Ҋ\nV\u0002RRU.?\u0017-\u0015~F\u001cF/-gNpQShNy\u0002\u0003d阚YPT:oB\u0014\u0014\u001e\u001e\u001bB)NM,\u0013\")<։h.\nWN4\"\u0016\rc\u0016ԂY$\u0016yBZi\u000eߋ\u0002\u001fB^^VZDA5~(.~}{uܾթ\u001d:wv*8h(6}\u0014S|%s/§BHE#\u0010Q(yP\u0013\t6K$%\u000eݯkRm)ģQ\u001ev1֋fXOR)|LiڪCw)6SR\\^b<\u000e(~ތ~)\u000e8T\u000e|(}GQLW^Pj\u000b\u0014!T'D!B'\u0013l\"X%[\u0006oGP/\u0018hZ3KEjQh=GŐzʴ\b\n]\u000e\n%h(\u001f32kp׻G\u000eV&؅ZtK_\u0004\u0015S\u0016T,^ڤBH\u001d9z2\u0007\u0011QJ(O\u0019:)H%%V(,̻SQ\u000e1ަs1֋b\u0010ZXWЊ(T}\u0005Z*̜6y\u0002ߐ\u0001hɩ\u001ajѶc\u001eh=\u0001F\u0019n\n1ʷh\u0015Q)Bޓl\u0014\"\u0013Jt\u0001>Nd\"HJ7zh~b@\u000bqF/<V\u001d\r/\u000bj,E֊B_u\u0004K.֭AKj:\u0017\u0003ѤIڱusé\u001bȩQ;]RLʷjZR\b)tT(.y_P*\u0013t\"%6I[dga>G-b\u000e9VdJ/rbX\u001aZ!ȪG<Ѓ\u0014U\u001cQRmٴa(\u000bfO\u001a7zD栀;=g׎mܧ\u0013T܉S1l;߹P:S\u000f<tB\u0013J\u001e\u0004^tN&rId(ducObs611<\u0016\f.r͂X+\u0015\u0015Yv\u001dQeHom[DK6}aYi,\u0014?j\u001e8-TBv\u0016}a#F\u000e\u001dTye\u0015*\u001d6n޺c\u0017)EuC(`*yJ7)\\R\"\u0019\u000eEiPG\f`xiŔ]J-%;W\u0015\u0015e\u0015*\u0014\u001fBSR޹\r-\n\\Ǝ\u001a6$\u000bN%6p{4jѳG\u0019?)FA\u0011Unشu=a8=yi6\"\u0014\u0004M\u0012P(/,|)Dr\u0001U=1݂Y\u0010\u000b\u001e\u0015BҊJYusR};nZT^V2\u0007;q9C\u0007zuOjFT;u7ZtS\u0013P`ӧbj={qJ=\u0004u=2|\"Nd\u00135c\u000e/J\u001aDjb.R21\u0015\u0015[u\u0001\u0005)H{\u001f Z*\u0015TK*O\u001a?\u001aM:J)©V;;RfxТS;5e25\\v;z\u001e:ԙa!\u0014\u0004M,\u00164Hٿ\nu\\~-ԕ8#\u0018\u001eenZ0\"WZ+e/qT=\bIuaT?\u0004\u0006\u0004\u0012UP\u001cwOqD8Ռ\r\u000e΢vj*\u0005\u0015uLmG3uR\u0014uRQgbO\u0013D6KH\u0016}̑M\u0014\u0015\u0006Q\u001a%a\u0018j,Շ_V]|JIı#~SPX.`\u0006\u001aYܮթ\u000e]zm0nWbG1ʷG@SJ=M!+]42B>'҉lR*\u0019\u001aEz\u001fV~goi>N\u0001Mn)W(\u0015\nV&G!\u0015zO\u001fwTQ3sj^a=j:ջ}N͢ҷbj\u0013*\u0003OD/e(NBJU=6B@)H'IdJ\u0014C\u001fZujh\u001a\"H,2BV\u0016z:{R\u001dj*~hI\u001f\u0012r5;\u000f\u0018)*}UKW1E)R\u0010Ro\u001da\u0014\u000b}\"%$?!c-I#ǰ|`\u0016b+S+\u001fsT]D\u0002%g\u001f9꧃ukV.]T>hIFg\u000f\ty$wi\u001fv1'\u001f\u0016۩b*}WQ7\u0006*\u001f<j*G!>R%OJ'%6) p2P+\u0019\u001aޙ~)X\"UT\u0000UqSE?j\u001bt\u0014?jO_ț\nZj޺#;\u0015\u0018\u0016)Un1E\u001f}\tC)ԽߡFP_B(ɰI\u0014)PĨ\u0015\u0016W2D13RjX+\n\u0015\n믽B=SR\u001dCPޱ_93o/#S=S=AY#ƌvj>5hӇ\u00145SO<y^+(ꩈℂP'&C(j\f_I<#z)H,\u0015\u000b *zgFKޝ(~WT/ZPZ8s*6~\u0003}\u0019}{vpMnTppHNҷi)|g\u001f3)J~GG)P'IduVGAm#\u0019m)\u0016K{EieXQFgQPڷk\rw\\|n\u0011ܑY\u0003N8աeSSIp*\u001b\u001am\u001fZtj\u0016QC\u000b>nQ=s\u0017^4'TQ\u0014QH(\b}6M߄N<LYX\nZ\"\u0010U,\u0007Tԧ?\u001f\u0005ՑCQW<{Z^A~g?8*ҩ^}ԐQ\u0013vv}ܡ'~/cR;)\n)2\nM)\u0014l2U^-\u0018\u0018nY*(\u0006U\u0014UTLB:q\u000ft*~P\u0015o԰A\u0001W^ݬN%I\u000e|\u0003dcۇ\u0016کep;p\b>ϝ\u0017L>`̐bP\fX'S\u000eeH.\t;nZRbZQX};\u001dUT\fB\u000bSPQGu\b\u0015M׬_B\u001bN5Il\u000b9}\u0003\u000e\u000f-:SS\u001d:\u0014\u001a~\u0002)397BBDPOZ'Ju+ޅRbZQXi})\u0016U\u000bqP=pN\r\u00155\u001f=8߫[\b:uOQN\u001e?i,hVۈ҇\u000e]\u0014^|w{TB(3'æ\u001a\u001em!\u0019[ƅR^Z\u0019V\nRQC\n]\u0003PݱS&\u001e>\u0004NXQ;\u000f̤鳩E\u0004.}ǦhχʧX+eԟTD)OVDvi+֊QeHzi\u0014?P}\ngN0f\u0010ޱU)GJ\u0004QN'\tu:t=n>(3\u001be\ne\u0014O\n\"b\u0015JiEV'[eJwMB~\u001fP[\u001c\u001bYS'\u001914IS\u0013n:ջ+0(k؉ShG-\u001dhhw^3^~\u0015O+V\fQ,-P?+ʰʔJTAsaw\u0000\r\u0015tezwO[95}ܢڳJ\u001f:̘TRQa,>8\u0003bV\u0002FJ\u0017\u001ftlKGw&r>\u001dP\u001d9auEΎiarΤm\u001fh\u001e\u001dM~*\u001f)\u0017R:G!(-TN\n\u0006b)\fYO%\u0015䖊~\\\u001e8y;ncEK\nM%k8\u0003N\u0005٩Ys\u0017U\\CԾhקJFLq3ŗTB*lŧz\bDjQeJ\u001f\u0005՛\u001cTϝ}N\u001c=o\u0017UK\u0017-(->)wT@oz\u001aNI\u0004\u0007g猣y勗vj#ҧcJW_kjMQ\u0011B}\u0003'Ԏa\u0015wUJ*:R:\u001cTo].\u001f\u001a*:B_y)_\u001cS-\\\u0016hx$u\u001cS?1\u0015K}R2K\u0013\u0016HBKe\u0006\u0015~s{Q4TܤoZ_93S\u0019}\u001cD9\t\r\u001eSe\u000b\u0016کS\u000fR\u000e\"m(>\u00021JŨz\u0004\u001b\u0018V!A*4?~5BP?~g?q\u0016\r\u00157ɩs\u000bgL\u00193l\u0010\u0011T>\u0010\u001dO^PRVm\u001fwI\u0002>|)|_}fʪ\u0014BJVY\u000f-\u00158m*~=}G^l֬Xp^Lvʟ\nj%9U;5eFA%Q~ȱ\u000f]\u001f]ywtLqf*Z)1?\rTt@Տt~F]:ྜྷ[[RQV4sq\u000e\u0018:|̄)3Q\u0002mv?t8$]Et\u0006\u001d{>n\fn(]pe\nW?nQ.\u001d³:z\b\u001bt@UV<\u000bNe\u000f;#jK3\u0014\u001d%Qn;tl('J5\u00142\n[?Q4G\u001f&\u001d\u001b;׮CڜS\u0013Τ):JP-zw}ܡcӧc+_dE\u000f,ߕT~tl\u0001\u0013d\u000f\u000e8S;tj`戱ʩKWѶO<.}ԡ\u0014wS\u0014STx\u0007$~(H!\u001cTtF'\u001flI?v=7}\u0005%p87s[S]{%FGt}'\u001fv(}?HM2*T\u0000R/\u001cT\\\u00133\u000faG\tt\t!\u0001W\fY#L<:ZwVQ~\tSƮOw\u001cS\u0019͔( gXpP⇆N\u001f\u001d&l^\u001aN\u0016L\u001b\u001bé\u000e_;U\f\u0004=H\u0017+D\u0006~FP;\u001fs+ܤу{wnYzrvjĐ`l\u0006e͛6<Wߤ}ht)P\u0011SL}ף!\\\u0015̠R\u001dYTCtusˆ5˫_\fZZziۧ[tn~\u0013K1*\r\u0005KPﳟ\nM:o][7YQprG\fS=\u0007\u001a7i:F_a:J?ES|@etĔT\u0006%\u001b*jy{\u000eC\u0015KLTsS\u0002tr<cl?kS|]-1]p0,~P&\u0002\u001f&<Ftqf\u0019rGS]b93nv<QYNYKT\u0003D\u0007YR'TtN\u001b?>ڽN\u0007&éPS:t#\u0006\u000fˡ\u0012J\u00171-;Q\u0002otT'J5(\n\u0017?4TIYu@N]YN\u001b\u0019ϩl8ŗ\u0018}})qnSf铘jPP\u0019ŏ=UCEM:o?Cs;]\u0014\u001fyQ)N(}T\"Jm^:}\u00049.\"\u00154j\u0017)}j\\4s]xq2cN'>9jGǞ/>U\u001b?up~:H߾iݪԔq2CNw\u0007SԺ;)>JS-j\u001e\u0003b\u0014?&7~t@\u0007T{\u001dt\u00119T^\u0011Nudd0evSS|`t:픔\u0006KDCtu%$\u001dzSɩt\u00015J!+>>F'?\u0002}|\u0001Zt]_E\u0015?j*t\u000fȩCvl^EgZ:/!ߴ}ρx\u0012ԶҢS;%lұ3t\u000e=\u001f8yϡ};\u00188U\fg(\u0013OvJbai\"6~\u000eɩ-WSS)4QET#I\u000f\u001f&:\u001fzSƄHF8];5qꬢy\u0015KVS{[\u001dy:JЧҢ7p\tUIׇ\tt@qq]\u00059\u0015Nѭ.kr>FWS|09\u0015nѥj\u0018MӇ\t\u000bJfM\u0010)OhH\u000e\u001e9<u'-z&ܤ\u0018v\u000e= C\rkȩ씷SiʩY)S\u001dOY}N5d\"7~\u0001\u0015\u001dz3t\u00119©a\u000395V9ŷ4.=<\n29%-zlaq@EN|[7ZJ2}oKS\u0018]\u001dyZ\u0012\r\u0004:t8\u0013TyZʳ:u\t4C>Jm\u001f_@|[ Sߣ٩m\u001b׬bFpuSSXr_\u0018]\u001fOOkƏ\u000e\u0013耊\u000e=\u000e*8\u0013\u001dpp*%ʩ52nKN7\u000e\u0015d9JhNГz\u0002rđZJ85m6ݎNy*W_<<Jva\u0012y@eq.\u001b\u001bɩSq<S德ĩk\nPY\u000fҍ\u000b~ap}S\u00032GF:nuaK3摧\u001c%4l5z×w*))\u001doN>}G8uM\u0010o_\u001dj\u0014\u0017Nѷ!N\u001d8/׿#k\u0000Scةw\rTʩ\r~\u000b\u0002\u0014ߒnKxM;E):\u0006K\u0019\u001f9\u000bԽGNMթIQN=h8\u0015g=򔣄J\u0019Sty }TZguBة_S\u0006\u0007|\u0011ov\\vj2NpwةKSK3rـ8c:\u001d\rJ\u0017,Zf8o[];\u001cĩkڜzGo)e-4#۾=D9uթS{b:\u0015,G\t\r\u001a#=ҩ>S\rvtuvoKЗũ\u0006\r]B71Swfԭ-y5Cf\u0018N=~K\u0004zNS\u0018N}e:8%\\\u0011\u0016\u0014ϩ\u001dSyʩnWW5aSo\u0018NSw攖p\u001aNm\t\rZz:y\u00158uM`ߩt[No>:\"N]PSzq\u001aj95v~.N];K@\u00126WGSO]C\\)qZ>G\u0017=>9G\u0017y_\\\u0013Sr_µ·w?uRS\u001f]V}3}3r?LŪ\b>d\u001b8uPKxJ\u0004;N]{\u001b>Wgpy\t{j\f?/A~\u0006G\u0003ϟ\u001a\u0014Ou\u0011,D\u0012#SWsO]\u0017<Omsg/^#Fu?8?S~Fl\u0003|?wa\u0015ۯϲ0~Ur*ܷ?Inj j l\u001e&\u001b!0ҿ\u0017K\u000e#b\u001dF1~LaTWlS\rӧ]kzN~/5\u0018n\u001d3\u0010;!4|W~'5D~wVө\u000f9\u0019ݵ\u001f|dݵrِ{k\u0005q!/jm\u0001\u0012yiF(\u000f\u0002^}p>8pjj}bNߌu\u001f\u000e=jDQ2z3\u000fw][7Ne\rԬ\nrj}\u00078Уa%|.\t\rȣ\u0004rV?n:tj'ScSKVٰeރGӼL\u0007J6~\r\u0017s8kӼ}̃\u0016Ԭ/Tũ\u0014/E\u001cPIP1Ztu<octu\u00149u\u0012NS\u0016/T85|ĩS;\u000fLx1.X\u000eIoDo15}\u000fо[G:%)whrj\u001e;Y;nL0~q;\u001fP7~R\u001a&Q>:Rf޼2I?\u0005Nm^;;5e\u0018NuSAéUW߼c]FO\u000e0I`1Zt!]ѿb{Ԅ3\r\u00057\u0004YHC\bSzۧ\u0018]~\u000bZZ9h&ʌh8Uor8tuiQjXکȣ\u0004u~,ݎNNSepjܨP|,KN\rf\u0017u~q.\rU\u0003F>SԢ]\t(<m\t8B?~j*SzF9ՋVN\u001f\u00167Pݫ\u000fҍ\u0003*E5T\"U\u0003|:eG᠎<x)\u001d\u001dNUSǍ\fN\r\u001e=~\f\u0014@.COs㧚tIP5<\")nնS٩+\u00150j\u001bT?W@95肟>ԇ\tIPIP58K_2}xꌺ-a۝kW^ީg)UuwF\u001dP\u001ftnT㝟\u0004UÂc.pStQ:FO9u%Tȡ95]97&\u001cTtwPE4T'R5 ̘gSzۧ\u0012\u001e{.+,ST0SrM\u001f¡nLP\u0007|`lTCe\u0016?եKP5$tλ>]R۾^b\u001e8ɷ%lc\u0005rGS-NЕ\u001a⛇\u000b~Sm'\u0004U#\u001cS/>\u00168Jct}jE锫/j\u0016аQ&)\u001f\u001fza\u00026~t\u0015]>\u0013*3Jj@\u00181\u000e]tJGt\tyÚUs\u001d1\u0004N%G9ճS95mjf>ӴMjtS]T\u0006EdLhE\u0005>уK\u000bpT֨\\)8{!&\u001b*UAT\u0006V)U\u001f\u0016]\u001f%1-^N\r\u001f\u0012M\u000ee\u0015|q\u000f=OsFC'\n*QT\r\u0003Vʌ)t\\\u0002jE;ȓ.-[M\u001c\u0013é\u0016.\u0003*CN\r\u0015P_8RU?lJqLKj^}Q\u0007K\u0017/\u000f\u0006\u0007\r\u001cI\u0000 }֝z&]5T}\u001f\u0005՟-H\u0003T\u001btTLaקN.\u0016\u0012\u0018}\u0015*&Tjr6V$f(Ed:\u0004դ\nŏw~ROOC)q7ҥOSܢ{ȩʲYS'\u001ewTө\u0001#S\u0001\u001ez(P.Ϩ˟XC埑JQæOŔ*}B۾Cs%ݖN\rw\u0011c&L\u000b~+lج6~=jKATb\u000f\u0014eU)T?w:xקکg|LmB\u0015fN0z FS-\f+s=6~ܤ\u0013*\u0014?>4׿\u001d\u001fH.\u000fQKR|h͘GSO\u0016\u001d۾;lX.͜2>g _FN{CC\u001e\u0017g*,_\u001b?jP=$\u0017|\u0007]\n*~aRQ%Zi\u0014\u0014~pLak/_@;-t~s\u000bgS\u0003S\tau\u0007N\rQN\u0001k懶jΞw\u001cT\u0018\u000f-J?\fī94b1\tbv}TB~`7\u001d%,[\\>wΌFe\rq$E8\u0019NyBCsřUVHM:7T4ŗ鈊\u001f\ftXez%b}\u001f1&\u001fV(RUMT2Jj\u001em\u001f\u001fyΙNyɩQNyکy|M:\u001a\u000fp\u000e*nT6J[EZEz%r}?\u000f'\b2RRc)t/G\u0014Z\u001bxjAII#3\u0007x{p7\u001a<l\u0014\u001fajP{?\u001f\u0007+\u001cTg\u001fZ*Tb\fWje*\r1-g\n!e*ŕ)Wtvj/mVVW/)\u0017)G4w@95p\u0002lI߹{=N]:\u0005\u0015~\u0019R}RQT\u0019ViWajK΂[b,J#zw}g\u001ev\n-:m*ʊg\u001d1t'wwS:9zw\u0007\u0006eA:\u001d&,AN\rCK7~\u0017A)\u0015\u001aotTU2̊+6p#<\u0015<3'\be1wRUæψ).}NEǶ\u000fN\u0015ʟ\bB\u001dN%\\ʩ)3`L5T\u000ezFP\u0016W>1-KЊfEe.!$P9\u0015<1k\u0011!eQJ5o_R1$>jE_^p^̩\u0013\fS٩\u001bNw\u0007fA:\u001d&,\\\u001bw\u001dO\u0005\u0015m^}!է,կ *V\u0015eeB^\u001f<i\u001bd\b3\\3jPl\n1sg\u001fG\u0014tPHÇ\u0004TVSN<6~TCI).\nW?TTצU*S+xEbY[V+'(s2M\t>)Q*~\"zW_R1J\u001fSwĶtΌ)Gg\u000f&\u0001N%)o\u0000\u001dO\u0002PqG\u0007SϨg/\u0011U_*\u000e+\u0015yEbY\\\u0011$`\buaM_N\u0010Je8~/=R\u001fО믽n<w'q۴~\nM<>'{pկW\u000eV$u՗\u0019G\u001bڴv~GSPamE_\u0018QV\u0019ZW$\u0016jvJm\u0010\u001b\u0002\u001f\u0019\nO$-\u0013\u0004'\u0016\n\u0011e\u0018/\"T^𬊩S'9Luܢ\u0014L4.gؠh\u001a7oԭW\f/\u001daW\u001b*.~FP}⩧\u0010?c4U:~\u0015Pk\u0005Xd\u0016\u001afG9j2mR?\u001aBFQ(|JѦѡ\u001fڿgǖko_\u0016xQYξ=F;Փ\u001a66~\u0005ŪZqv\u0011T\u000f>(W\u000b/DR\u000f>DV2whXd/WX䪍\b\u00131z\u0006%\n'\u0013DBQDFQH}!z)\u0014|T8Сmv\n-zѬܑY\u0003S-Nu35\u000eGojmi\u0004\u0015qI*e\u0015\u0015BZi \u0016Ej)L῅:R8e\u001c|mN'%i\u0014ԇ\u001f=JaOЦqtZPZ8sı#2\u00072TMNؕ\u001aE\u001biB[w!茊ߓO[＇b>b8XZJ./dp\u0019?Oj\u000ex>~6N[<%a'\u001f}Hu\u000f;>\u0014x\u00078N\u000f\u0012l&\u00191t7#5KS}܁A#F\u001a\u0015.ߙX*S]z\n]a\u0015iEX,\u0016{C0e5p%\u001bA\u0000\u0006M\u000bDD>\u0019B\u0019F}\u0013Խw޺z=G1u\u00181]\u001d-^XVL۾ÇQN5k݁\u000fTn*,[.\u001dA#NwChLz\u0007]UV\u0016\u000bfZ䖲\u0010LZP'j\u001bC-7F$v\t2&\u0013d\n1\u0019Nw~믱R<f\n\u0013\u001cS;p[T>h6m<}ztit\u0011ңwQ\u0013.}f\u0004~hRqS\u0015gV\u0016\u000bfA-r~\u0019|\u0000\u0018\u0018\u0018\u0003\u0012d/PHQM!\u001av|襠GN?p߽ǎڵ\r\u001d:J\u001fShG\r\u001b\u001c9©VӇ\u001ftjP\u0016UKWAwЧ+}(\u0000.UJ++-\u0016\"-K\u000bMM~+ԏ\u0018c\u001a\u001ep5\u0001<\u00174)$N\u0013\u0012J\t\u0013eԛoPHY\u000f}\u001cSk[Xv\n-ȬA\u0001wZoGS;;R9Y#ǌOoA%t\u0004զ;vQK\u0005\u001e>SO?QVVb]A,6\u000bj\\d\u0016̔+\u0000W84:\u0006ưIU\"ئ>5|2z+/:y*ߞs+=\u001d-:vtj\u0018v*ꛁ\u001f5yTJsPY\u0011o\u000e\u001dHQ\u0015JT\u0004+%\u0016\"Kv)b_+n\u001fBeF=\u0003M\b\u0004}\u0011B).Q/zO<({mr5UU,[8kڤGd\u000ette{M\u0004Iϥ7\u0004]::۹QKERQOu\u001fE\u0017\rW$\u0016\u0005\u0016Ev_i\u0014_\u0017mb\u0017csVID6N\u0013\"\u0012U=6g\u0010RJS\u0014U8\u001a3|\u0000_I\u0016nJhٮS^nnUC]{k#'dU/bhb,\u0005H.D;4\u0016\tW@̡4<zy\u001e>b\u0012d\"H'%H}\u0014\u0019\bϞy\u0007X)4ST6Z\u000e}nq)\u0013Ѣ\u000f\ty3&\rV&]\u0015?t:P\f>z\u0004׿G\u001eVzЊB^2\u000bj-Ev^,\u0018QP'\u000eǖQH\u000f<\u0007l\u0012dz\"EK/\\:$:){{B3E\u000f>RNaۗڳ[6\u001bN5m6[rԤgr˟jɲ~\u001b7oݱ\u001fIEQȪ֟WZW+\u0016bH.bØ\u000f|xmSqRޘ\u00183\u0013\u000b\t\u0004&E\u0012YT=\u0018أ\u0014RJCP\n\u0014*˪*\u0017+.?i\u001c)lSpkr~\u0019@.~ySFP-X\\lj\nIè*\u0014@*UJ+\u0015\".[^*Ôdk\u0013\u001e\u001cͱc\u000e\u0004қ&։|2:>BH\u001d;z7z)(EԚU˗,M\u000f\u0014Z>];6\u001eNص\u0007m\u0002\u0003M<\rAUZꇖjZj\\UU\u001cV\u0015\nbqb\u001aԂ[K&\u000b\u001c{[{fn]yڦnm\u0000Kdrkd҉|RBQD)\u001d<^\nJZ|\n\u0014:\u0013ƢB޿w.\u001dZ7\u000b;$M.n_hp'M>kN1\u001fZ*Hڴeێ\u001cU(l\u0015,k^=ÁEfZp\u000br.\u0004cP\u0019\u0019\u0013޴\f%=<\u00074\u0019\u0010\t&AW^&&\t\u0012#\u001fFQH߻\u001b\u0014)uUe\u0014SSPNy38:oլũ\u001d:;zACGAPpj\u001dK\nx\u001f\u0015i(yEy\u0005Xd\u0016b \u0017łbj\u0014\u0017c`\u0003\u0019\u001e,tд\\<لtN)\u0014'(\u000e];\"Qæo&:t>S\u001elȩ\u0004S[ܽ't*~Y#\u0010TySiШp歰j=\u0014V\u0001+%\u0016Ej=r.\u000b=Ӽ\u001cW\u0004;\u001eD%F<\u0005L\"!&\u0013|zX\u000buc(\u000e4B+)\u001a?f$Jߝڳ{v-#jվS74n?v~#ꇖTkTm:p#G\u0015bZ(d\u0017\"ȰgY20\u0017p9\u000fFc\f;\u0001$\u0012$6)OH(DԑÇ(\u000eўCŬ\u0019\u001cSYC>W>=%\fnS풨I7\u0010]:\u0005\u0015\u001fZ*J*4VPjv\u0010V\u0006B{Or^A,63ʭ`\u0017_l\u0018),S<\u001d3\u0006@G\u001c٧\u0011W\u0013@S\u0001\u0011cʥ3M\t\tuC\u0007ڿ\u000f\u0019\u0005(XR\boJ޸1#\u000e\fz2NԶESԿf-%uAC\u001fA;\u0001ol\n%T`\u0006ʪm;(qZݍ2\"\u0016]\u000b~aJǕhs1xR\u0002b@&\u0004\u0002XOL\bONOH\u000eۻgl\u0014B˗V)M06gD\u0016)=tlcuqm;vACCPe\r\u001f5&w$d\nԿeʪ\u001bLas\u0017v\u000f X,J'X-vr\"X1r\u0011\u0019h\u0014gCԸ\u001a}F?M4'\u000fH%}'\u0011N'NOY\u001d۷n٤Zzq\u0005X\u0013ǍFL\r\n\\i\u001c]:IlrS\t-t-\u0019ŏjPT1X*T%sTUVEXVۨ\bἺ %G8ح\u0013.\u00050rxPuaAQ:\u001d1\u000f\u001a\u0014lдG\"!KA8&I\u001bBmۊڸa\u001dB'U*?\u0004J ƌ\u001a®\u000fT[G9պ}=zAAE/g,I\u001fZ\\UtUQZmR^b,Ra%Q֋\u0004c\u0018qRsS~!\u000f)\bg\f\u0004\u000eXt{(}7ˤlb(mݼc5g\u0012\n%\u0005RyQQLN֩}\u0016\u001a5MlM\rU\u001cTACTySDV-Z\u0014ajłYݻ܂\\l\u0017_d\u0011=S\u001cp.\u0010\f4^ǭ#|\u0018v5\t<\u001fwF1K\u0007Y\u0003I&DD:maֳPV,_Z]EF͟WZ\\8{R\n/s0b?WIZ5krv:8_ݓSRg\u0001T?\n/oT?J-(@XV+VZMqfmAn\\{X/Ecd\u0019qp$w\u000bW=l\u0002\r\u0016}$=Ү,\u0013l\"Ok(SD-F\u0015̚1m䉬T֐ٽKǶ-57}\u0011Im;tꪂ3\u001d?\u0011OYU\\:\faZU+nXX0ڼ]\u000b~A0R%#͘}&cq@Bb\u000egx繠IEЈEN*K7!&*i)\tU\u001cU\u000fF͡2i8(fjPquh\"!©f-ڴOBA/\u0005Y\u0011F)f.(DXV\u000b+\u0016WJ,\"H;\u0017`0\u001cƚ)\u0014;#U_v7 =\u0018D4]M\u0003\bM\u0016\b\u001e!H\r\u0011MkM\t%7\u0004\u0019\u0005\u0010Ry\u0013ƍɡR^TIhћ6:&\u001dů\u001b*\u001a9l8ISN>\u0013aUHi5OyU\tYP\"Ȯ\u000b0r-S1lV\u001fD6\u0018~5\u00194-4=%Z6T}ժ\b'tZ>/W\n\u0014BFQcG\u001aJ\u0005;k<©\tP\u0010TEK\u0005B\u0003\u0007STU'MFXV\u0005U!\u0016j[$\n~aPl\rYv\u0007Ƭ3Y\u001f\r\u0011{8ׇ{1\u0005<\u001f<3\"DI˗K\t6\u0019:ͅOEy\u0010jZ\u0014\u00185>\u0017!5|X&+H\u001b1թCۖ#O8uc[i߱sWGr)\u0015E\u0015[5zlxSOaxbY\u000b\u0011Z\u0015$\u0017\"!\u0018\f#ǖf,JX\u0016EA\r*=\u000b<#r$U5TE*K\u000b&։}BɛBM8a\u001c\u0019\u001a:x \n\u001f)էW]ڵn76BCպm.~$U#ت#G!rYWX,6\u000bURng\u0010]\u0010\fA15cӘj\u000bKL\u0002RYPSBCG$҂\u0005٥\u0014NdS\u0001|:eR\u001e\t5v2jȠ\u0001AR\u0019iQLJLhlu\n\rUb6:`\u0010U^\u001a9\u001aME\u0010^i,V\u000bn\\\u000b`\u0018\u0014OgJ5JeX$\u0006d`L\u0012\u00054K-\\\u0016]b&i24\u001e\t5:gԈÔQ\u0001E)ֹc6-7m|)\u0014?\u0004Uvܫwj?D\u0015Y\n8p0BZP^3͂Z\u0019d\u0017U0g\u000e\fb$\u0019kF1sMEQ&\\ux^x|\u0014B\u0010\u001ad\u0019\u0012d\"Ncɧ$T\u0003QJ.I)FƑ'F\u0014TT:%J/-=XA0-\u0016;n<\"&M&\u0017`0\fd3@3Ba|\u00042a7BM\f\u0011M\fh:\u000f\"M%%\u0004N);+s\u0006~LOڻ\u0017)թC-'4\u0014\u001aZjӮ\u0003_7*\n\u0015r{UP{bYP\u001a3\"&`0\u001c#3\"_1dzMf\bW\u0018C<=<\u0001zFDфG\u0013$R\t.ΡpMòOP~H/OJ\u001eY6\u00125A;e:M$4T(IvsUSB+J+׫\"\u0010YY\u0011d\u0017_\u0010\fA14\u001bϦM`4yL\u0012e\u0006<Ϝ\t=3<K4]4m=h\u0016riJ&\t:'\u000f\tֿojɎ];'R-\u0010Sn8ůi3Hպ-E\u0015H\thW0GfA-rk`\u001a\u0006`\u00189FgX\u001cbL$c\u001e\r8,LԨggn8Y=l\u0018I*KlR:932ڧw/6KRoBnqF-Uֈ*\u000biĂYJ-r\u001f B\u0017\u0004aP$\u001bJejY\";`5G}FKybŘajxx0FhD\u001e\r \u0001r\t2&蔞}JPz];wJоmkRiFTSPqk<j2\"`\u0016?\"H/\u000f\u0004aP$#X4v\u0019h2(¿\u001a\u001e\u0012=Gjhh\ni*1^xqIH&\u0004`\t>9 TNIȨmZLTJhu\nIEQ\u0005Zi( \u0016bz\\d\u0017_\u0010\fA14siG\r㋅_699ѳg34J\u000f%L\b':uLBoj٢y&QJS\n1JPZW\u0010KEյ\u001bEv%/\b\u0006à\u0018\u001c#RIZ?\"-!ԕ:)kb#=g<44ޘ_xԓL\"wֵkΰtOmHD61)\u0015锖\nV)+\u0016\u000bfZ\u0016J\u0004\u0017\u0004aP$sg=X5e\u001b+LJ\fz\u000b:bM@Jx~)S\u0013sIJۍ4B*IR\u000e$\u0013lN\u0013jFiLT7V+Ef5O$ \u0017\u0006~A0\u0018Fe\u0019FtVt\t5nwK\u0019\tOj2iZi~!\u0011,F005ԲED\u0013t\"X(2*B)\nV)X0jҴ)^\u000bb$\u0019kF\u0011m4mMEۣC[\u001c1\"zSR,O26:&\u001f\u000e\u0004vmN\tB)\"bW$R庉\u0005c1MS&AB$\n7b̒e\u000eyU\u001cu\u0011\\bn iaTWa7\u0015\u0018Mu\u0016=\u0016\u0013\f;,\u0014*\u0016\tB|& \b\u0015%مՅ\t)\u0005ϔ\u001c_\u0001\u001epIui\u0015=2Ȭ.+.(Z\u0018@\u001c\u0019\u0016;Rs\u001dxc|Uܲ\n<W\\X^z?=1s\u0014<i0\u001bpyӊ<>oZ}m.oő14b#53u,,[zkrz'd\u001b\u001f2yozi@i0{\nE޴BElE}E\nk~܁\u00072\u0011rȟʣӏGOu:2*+g-),*/-~|Xy٢EqxNŲҪj\u0003e\nr\u000b,|\u0011N3=s8\u001dnˑ\u001e\u0018\u000eӑ1(It:og;K\u0012\u0013k\u001co2\u000f82UVZZ\\YURZ>i{aـ\u0001\u0003\u0006d{֨Ҳ1q6z1\u0018򲒚\u0019NV.(?LZ\boʪҪ+|퉞OU^Y`yْ}\u001a-On-,)[$l##Ɠs*ʪ\n'.-,*\u0019kO\u0006i땺m=K~]\u001a\u0014c\u0010tx/\u0002;xb \u0014\u001f[4o^!}\tU\u000b\u00186cf*()/\u001aW47>3C\u001a\u001f+++x[+\u000b)q33s\"\u0011>ٕJ+-*,^P)qr\u0016 ±\u0005/:f\u001cNѨuu\u001dn۱Hs\u0005[cͷ\u0001\u0016=1\ry\u0015uݘ\u000fHJJJ~{ɚYUU\u00061\\Z]P{ُJn6%E\u0005Ԟ/ZRZ`L\u0002%+j\u0017ޥ\u0011\b\u0006*Ą\u0007\u0001\u000e\u0006ΐ'\nI\bx^;\u0002N\u00043\u000eyn\u000fo\u0005΀ˀӇ\u000frQ#?ހ0_\b\u000ez=.O\u001c\u0017\u0010\u0013s\t\u0013\"wot󇼡=<O'z>lO0\u0017\u0016^wx\u0019Qk~\u001ely\\|x7MWr9ݱ>~_\u000b,RoF}E5>\u001a\u0000ce\u0015O%U\b\u0007(\u000f\u0006p?&&~~+q#Cc*\u0002>W0\u0017?U\\f|_c<ŋu;\u00175\u0011坾:̢%KdʪWVޯsۮWy*\u0010M\n\u0005n\u001fYs\u0010^ֳ=3&\u001fL1\u000eͼbOqj=\u0018c\u0016#OUb*F\u0017#\u0018\"/n1YQ'\u000f{#z7/W\u0000Xǭ\u001d.(Xm\u0016#_b\u0014m\u0016#߿\u0018\u0018K+=\u0014&MߛT櫥<ſ\u0010\u0011듸\u0012o-ļTc.\u001aI\u000f\u0001P\r\\^\u000f\u0015!ݡ+\u0014G<\u0001<\u0007;Š׏EP u:]@\u001d\u0006hw\u0007PBA'vѺQtҦ\u0019\u00074\u001eG~>Yv|xPvyױHrh<\u0017{\u0011\u00019XE9X`~NG\u001fb8'W,]BĸK5t\u001dF\u001f!^ \u000bxN\u0015A\u000ba\n \u001e\u0006<\u0001ۉ\u001eG<A\u000b<A:\u001atx6r\u0019áG)oYzœ\u0007.KOds^\u001d\u001c]z8w=\u001a*V\u0011u\u0018},2\u0005:Ω:iRc{TRRIU{\u0014W'!;p.]_`s[嘟r\"!oӭ\u0016\tϾE\u0010 \u0010Ԃw$k~\u001c~;Wˤv4{\u001ft8/,YW\u001ax:?b+\u001e1_WSiD\u001dո㿚ڎ-jh\u001e%Jy\u0015]2=\u000fxq[75?\u000f\u001eQƓYs*0xĄeeťrKLa\u001e@yq\u000fԟA\u0003\\/'UK\u001by\u00078)'&$\u001f8\u001b]#~e\u0015}^1ޱ\u0015򎵼~\u001e\\]7{Ww\bV2Q{o\u0014 M?\u001eiԬe6-5\noԭ[76~Mnv:nnvIMZwz]}nOf>NnF~Ď)\u0003)\u001d\u0013oPwcX/5\u0017\u0014ˎ58-I\rIQߎOv\u001cם(\t\u0002hƾM\u0010;P\u0017/\u0000\t\n\u0004I E\u0001Dɒ\u0000\rؖ)\u001e\u0017ҌG~~aCo=z\u00171_зo\n}q(2k̺uoߋd\u0010}Tɥ9'G\u0004z\u001a1d8\u000eH\u0017uV\u00006H꡶e)Y\u0004bHaҕ\u0017<)\u000b6dR6\u001e݀`\t$@RƬC eU{)9\u0017Bēw\u000f@_\u0015[\r;h~-l\u001e[R\\}:\u001e\nzX\u0017:u H16aGtQazɜ\u000bT\u0006X;E@-HZ\u0012Zb\u0018=\u000bcRP\u0001\u001c\u0003|\u0012a\u0002\t& \u0003!\u000fd\u0007T[\u0014*H\u0015[D-\n\u000eG_\u001b\u001e?vr;^Y[{\u0016Q\u0017B%,\u0019\n&\u0017[б\u0004\u001b\f_.\u0010ŊJE,+*\b\u0002\u0015\u00017\u0000ϽU\u0000` \u000b p`E\u0006pL:'U@8L\fbK%Ɲy\u0011n^@12\u0018Ƙ\u000b\u0012vP&%7\"\u001a\fB\bPf)T'i\u0019Vg;t<\u0017+ۑ\f}礌gkpV9\\\u0019V\\]&\"\r=&\u0014*s\u000f?VYU\u000fY^\u001fn\u0002Skl߱i}\fa\u001d~xu\t\u000fں}skbR\u0010̡={\u000e\u0007\u0003a9c\u0007͞\u0017C[g\tD)#\u0007\u000e\u0017[KG\u001b\u000f\u001d>~C(O¹S\u000f=r؟\u0017B9g\u0007\u000f\u001fk\u001c=T0C\u0003;{=\u000e\u001eݷmzu\u0001=<{=۶lݾ{k\u0006uFm}Ƕ-6m0>={>i릦`@>\"\u001f2e\u001dmi^k\u0005I\u001a\u0010A\u0005\u0001\u0005K9E\u001c\u0011pi#ڒvL\u0003ݠ\u0016\u0000u\u0010n\u0016\u0018\u0006\"4\u0002\u0014xIzj5!\u000fdԯnvf\nuSI1B\u0000#!\u0001\u0013\u0012R\u0016a\u0010BL\u0019\u0011S*\u0000\r*fE\u0001e\u0018\u0006\u0004S\u00144e\u0015 m(n5[@\f*q\u0006^S'ư$}2<vZa\u0007u\u0006i\u001fS;^4;CÓnK;\\mvTO)wotx܆Zj\u0003  \u000exjP\rǤ۶\rWm\u001b\u0004bx\u0016s+*8<@Nf̸m\u0010Q\u0015=^TAO\u0007Oǐ\u0003\u001e<ug\fǔ\u0003ښ<WR\u0018Kc\u001a֚\"u9t\u0015\u0019\u000es|ZiS+%\t>Loxs57lXgܸ~݆;vj1ܹe=<|p\"\u0018\u0004'ݵ\b9X[fipcZ@\u001f\u0019\u0019gf)'\u001c>z\u00063ztY\n^\bN<r,\rgc(8y\u0016\t.䩁Uϑ\u000b\u0017σۊBewҥ[VmS\u001b\\,&=1!,\u0005O\u000f\u001dz\u00198u85\u001dM۶}\u0006J\u0016lٴ!T'>@Z%#\f\u0013W]\u001ei)\u0004^nf\u0017\u0010k\u0007R\u0003@Juy\u000fڣ\u0002OA\u0005{-\u0019A\u000bV\u0001@N\u0010$\u0018o\u0014\u000b1]&4g\tI;$h\u0003;%\u0005O!#sm\u0007˸LrcSA\u0015@\u0004j\n\u0014W\u001896\t T#\bZґ\u0010\bz-ȇ\u0000P\u0018S<itK)@Ovͣ\u0003\u0018j8/.\u000e,cNmh\rxT\u0005ƈ\u0010\u0012+[\u0006p,NQ~\u0001DւC$tۜ*\u0014\u001cXAó69EՎ\bLUM*1LG\n\u0003\u001e3ug\fǔ\u0003<G8Ҙ⳵湘l]\u0019\u000emu\\37a\u001abML\u001fzh\u001bmukmܺc\r3ݱi\u0003\u000f[1Ӈwmq\u0014\"m\u0006fz]\u0007O\u000b2f\u001a\u001a\u001e>{a}goZSLϟyQ+kʘ)8u\u0004z3O[֖1S8u\\<8a\u0010\u0005={\u0012\f3=sAy\u0001\u000eo[P\u00193=\u0013'\u001da[wܳwmL7l)9TO^L'P\u000f8.K\u001a?f\u0016.g< ?\u0005^\u0007\u0005^PʉgTi\u000b4\u0005ڋYh\u0000.a\u000b,L!G\u0000\n!Z\u0004\u0001\u0014fGKP\u0010p\bQG@do(g\u0010R~\u0001D\u0010G\u0002GX* P\u0012>f \u0011BbDHNvDב\u0017@Gv@jpnDIB\u000eUY\\\u000524g}\u0006;S\u0016\u0001VUٺyt`T\u0014 S1<d67\u0016.\fϛ\u0014Va\u0004Z2cmj\n6\t64U7wg=\u000fj1BjT!c\u000f0f͹i\f뤑ghs\u0019Z\u001dy#9qyN\u001cUf֚bȰ::/4)i\u0011C_rciؗe3,T\"ZvjMfy~hԆ[6Ks\u001eo޵MC\u001f޵yӶ\u0003H⢟\u0001g\u000fs\f|-|ѣ{8}],\u0001L\u001c\u0007>OZPg\u000f}sgL?˓\u0017ŅG|\u001f=\u001b\u001e\u001eJ°xlɧ#;<s3'N9AH\u000f\u001e>={\u001fݳe}\u001fyoݼefƙ[g֭5hC?y\u000f})2J4~Tn\u000b\f\u0004%4 \f$\u0000Q&\u0000nGtX\u000bNÀ ]j\u0003\u0002u\u0017C侇7\u00151%\bAA\n\u0019\u0010p h\u0006R\b5(\u0001S\t\u0000\u000e0K\u001c\u0003H #\u0018U/\u0012\u0013\u001f9\u0019iR\u0004A\u000fCUM6\\\u00066vGv\u0010\u001c>`\f)4\ru,I,\u00020l<`:0`\nFpx+S2\u0006%T79<on+SX\"\u001cj7,\u0013\rǢ\u0014Vm\u0012@vmg\no44[b)v<\u0018#lʪaSa1o>[4\f+]L<\u0017|`2a>h\u001cX\u001aӘ_|<\u0017+ápМk2LC\f`gZ\u0004rv%#Ƽoƙ|dt݆-{)Uo޼S\u000fL9tы9\u001clccP,3&/<ڧf\u0006ӗ\u001f9m;\u001e'RT\u001e$2;Saq^G\u0012)hhg /P3=z#9\u001b[t3\u001do~IQ'`\u0010@#\u0001[0]!ې;P,i\u0007i\u0003\u0012t;\u001bN\u0007[\u001eӔ\u0014(hoԀІM\u0007\u00006\u0011\bH\u0013@4v✵mu\\x\u001a\u0000\u0001\"X|&\u0014a:n\u0010\fC\u0005\u0002\u0016H'hӎ!h\u0002\u0012-U%[t\b\u000eT[\u00036%\u0006TaSڒt\"`S\"2ui\u0014\u000eoi+:(\u0004B)\u001c\u0014mMA%O\u0000eXtۚ\u000246[b\u0005<\tin\n7u\u0007A`\fN8R^\u001di5}4\f+]L<\u0017|`2Qr)-2[kɶ\"!rO0\r7xj\fUsBP6U\u000f^n\u000fYӵS\u001b6mݶe\r:ټs\fԑ}{\u001f\u000b\u0010:sp>j\u001c;vF<>\u0011?b5\u0015\u001036-Z\\>ċ\u001f\u0007.Gf\u0016s\u0017>%\u0007'K\u0017x/<;xЩps^|$)8נE#\u00175\u000bkȩ3gN\u001f;a\ttu\u001d{WOu!vq}\u001e;MS\u001dN\u001f\\}N\u0019.4\fd0h^'\u0000]٢\u001d\u0016s\u0006N%$(\u000eDK-{\"PEKaxτ#N;\fP0ɀp&&ڼnw\tK\fRB\u0000\u0002\n.L@RS)\u0011b\u0000ӊ\u0000]\b\u000fzTa\u001449A\rYOt(؅Wtr\u001e:8\u000f}\"S'\u0005eGN\u0007FNQ\u0014\rop\u0006j\u0003!NS8)vBY\u0005:&\u0006p,:MNUWV49EÛ\")`+b\u000eόS@Y0N䴏)FHyuJ73te\f<\u0017\u001cUuШ\u000f\u0003~\u001c_u9t\u0015\u0019\u000em\f\u0007ʹ~n>-4xrFZt59X.\u0017tjM\u001b3Bp{߽e꼿z\u0012g\u001c9_]dGc\u000b|p];\u001c\u0017.c(g\u0018;\u0018>5{!Ym@8hQptW\u0012\u001b 5:\u0000\u001c}\u0014@\u000el)\u001f\bƉgهwncfFgO:vc6Pc\u000e<s[۷mZl}qPyTYU9}`\u000399\u000e\u0001c\u0013\u0010Y Y\u00194\u0019\u0004j\u0004;]\u001d\u00189Z2 -)\u00025^e ?`\u0012BʍPцN9iZ\u0007\u001dAT#\u0002\u0003\u0019\u000b:\u0016\u00029\u0004~5Jg}\t9\bs*dX\")D|RP\u001dM\u0005B!\n\u0018\u0003\u0004ozvS\u0007D\u0013j8\f\u0018qGC!νH1XNځPȍw,I,\u0002;uAYeӢ)\u001a:{(M\u0003K)rZNi\u0005\u001c_\u0001X\u001aDñ\u001ej\u00009NViu\nE\u0015\u0012VhxSQ\u001aRa)VHyŷ:L#ϰ:ۡ3te\fǔ\u0003\u0013MP\u000fL\bn4\u00165d[\u00109ͧe\u001b<R\u000f\u0005<M\u001eeVkE\u0001OGIӵS\u001bl߾z0M;\u000e\u001e9b=\u0018jݳ\rJC[>|pO0\u000fO?})8P:\u0017`\u0003eq,|3WL$\u00168\u0017柾\u001c{dtTg\u0017=c8dͰs\u0001B/\"?{`TTӧ\u001e6m:ݽo[鈰SL9'6hp\u0003\u0006\"XJDj\u001eE#:ma\u0013u\u0010҇tl\u0001\u0006MW\u0019Su\u001c)\u001cESŢم+\t\bm\u0002*:\u0012nj/1v*\u0018@@\b#\u0000s\u0001H\u0002*z\n0Dݑ\u0003O6\u0011$j\u0005]у\u0001r\u00114;Vڭfkf{C>{\fNan%E`m'<x:0xxxS6<\u0015ցeix7<nSQ\u0003\u0018\u001aDñX1꫶\f\u0014\u000foxJ܆\n\nNS<)q\u001bjwq}\fO7<\u001dGk\u0015̧}sFaEК3\u001cS\u000fL \u001cmy|۴~֕Vg8h5si\u0019!\u0006OT\u0000O\u001d.\u001eZ\u001a4\u0004O7l̇,[wޙ\u0001EG3<xp玤ρ\u0007\u000e\u0010=\u001ce\u0003OO\u001e=zgykS'\u001a\u0017zRhѧ?p92em\u0011<\u0000'ctv̚\u0002xYѣg\u000bȎ\u0012xzÇ\u0006 8gfm鐨\u0003{ر;grV͛7nܴu,Ak֭E;]Ъ0vj\u0018\"$\t\u0010F\u0003\u0002z8\f\u0019owZ]\u0006nm`I\u000f1\u0001\u00103i \u0012\u0005*Auxq\u00066\u0004v*\tkvB5_6\u000e\u00146V\u00170GK|H\u0014P;CH%\u0018\u0013}\\Thw* C(\u0002(Aqw0DPI\u0001A\u001a,\u0012\u0007\"\u000b\u00100\u001d>{\f)8\u0014\bԍ*7\u000f\u000e\u000e\u0016Nvmwʫ\u0003K)vڝNWm\u0000:v\u0006p,NyՆ\u0001vڝNW\u0001iw;%nS^0F\u0014#@\u0006fC4\u0001BʂNpo\rC<|unw뼾ޭ~Ez΋>)\u001dKf<h\u001f\u0011l2U<Q{;_ovo\u000e?g\fVYvfshrJyxoj\u0003צ/?ffiz18\u0014{3Gm}\u001c]\f\u0012+;4.92z$=?*xӞ##g\n\fNowt߶ymj][7N塠Uhb^k\u0019/A\u001a?]\u0006\u0012\u0006\u001c#t\u0015\bk\u0005\u001eǌ\u0011g\u0006:\u001f\\v\u0001\u0014\u0004mi\u0007t:hA\u001e\u0002~\r\u001eEFQ:,h3\u0001\u001eV\u0015\u0000\u0004P´SF\u0016B\u00173&6|p0PjɩJۊЀ\u001d\tZ\u0003P1=V\u0000\tZ\u001dZ\n\b\"U\fՇ\f\u0001A\u0013}S\u0016dx͎~a?~6jxx\u001b5QUfNA4\u001cn\u001b5V\u0005h\u0012\u001a\u0019FNdG`>fa؛#\u0015V3<lpLyy.<\u0017sVd8<ȶo̭}Z\u0001i\u0001Y+]Ԯ2|jVk\u0012ao\r\u0010.ඬ.q\t\u0016g2(\u0017crg\u000enZ\u0006bl1}%.\u001e?wd֭N\u0002X\u0017au6\u001eٻsc犠NG\u000fݹiV\u00004v\b8ȡC{\u001e>V\u00044Ç\u001fصk\"\u0017by{vؾc-w\u0017AU7l83Ϻ.{\u000fF^\u001a _\u0000\u001e_>^\u000f\u0000\r\u0018j4)\bZ\b n\u0003B$k\u0014A\bd\tH2hi\"\r\u0011@\u0018Jz\u0017tڭ^@hv0\u0017#UZKR\u0019RBB\u0011R\u0010A\u00029bT9K\u0001'4i\t\u0001ST\u0001!n X\u0017\u0000ZBR9YߐC\r8xCU~K)qucKlSE\t\u0017\u00041.\u0001hg7u\u0007c\u0005a!Ui\b]K`5u\u00073\u0001\u0015B{$P[s\u0018n\u001ae\u000b\"#\r\u0014\u0005)vufzzx՛zW\u001e<{\u0004\u0007\u001do]\u0011\u0014h.)\t^R\u001c\u0011A\u0010}oduw^^?II#\u000b:|1\u0015v\u0010}f+\u0007s֛\u000bǥ~VG=\u0002y4\u0019b8\u0013so՛_Խw\u0017W\f̊bTk7^Ϩq,KWn3\u0007hv4o\u001d(kƋk\u00040\u0010h YkQtօ7_i'jRnz*LYKȽtVg{y%]\u001d'Fd\u0012ܥvWݾԳK\u0011vgUu$׊[֞\u0018^(\u0011~SL\u0013t3HXp`%.p,92\u001d~\u0017с\\D\u0005! \\\u0003z{Fx5۟R_[tTc\u0017\u000f~F\u0010+/,ԛj\\\u0016mu:\u0010\u0007\u0016\u0001i^@N\u0000I5E\u0015\u0002jG\u0017ᚕȒJh-!\u0018\u00003\u0006\u001d\u00064*)\u0016,D),T@L\u0014+NЀxB+W3\r\bH\u0002Kx9-wu3O΢{3\u0001\u0014J\u0002Iε\t]e8:A߇ჅhB\u0010\u0011=Pwe<\u0016U\"RꮒDeT\fI]`ai\u0018`\bl;QI5A\u0006Bl\u000et`܄P-9\u0015F0*\u0006\u0004`!\u0012D\u000fqEs\r>dz}\u0018V\u0002C\u0002s\u0019\u0006\u0011juY`bP\"Q]]\u0015`JWJϨQh!\u0006k\u000be*\bau\u001ef󬪥+I}}KR\u001a)F$\u0015.@mขJwÌQ9u\u0017$cFs<ΫͅT!\u001eX\u0018D2x0! IIV\u00037\u0017OJ2DWE6\u00110H\u000fWGCIkL\tD),Cz1-6J֥\u0015'kКdP-\u0018a\\PQVBBcZ,bY\u0018\u0001I6\u000bw܍£\u0005\u0000\u0012Q2Tw%\u0001\u001d\tPb܌D\u0019焅K\u001e`.\u0013Z\u0007mݎ\nV\u0018Q|\u0006`P&R2wxfEV(\u0018SbX/K$wYU \rϙF0Cb\u001b(#\u0003\u0014K6Y5.0\f$s\u0004FD\u0014[Bp&Br4\u0011LӤ\u0019I3JR3R+yVǑ<Hq$8gu\u001cɳ:Y\u001dG8V?\nXܖ)K\u0018frEֽrQ\u001e,D]vj:ịfꩍ[wٻڻg֍v\u001c[G*\u001eOf/\u001f{I\u001c{<z\u0001|퟾Ͽv\u001d\u001fب|p\u0013OۿQ~\u0013[u\u0004US;Ͻӿ?~\u0017ԼZ|O'?~?oqg~q^Ogӿ_[Mw}>~ӟ\u0018?ݶ_1\u0000\u0018v\r=ȇ:\u001eJX.c\u001cS\u0014Pj\u0005ՁASi\u0000Z\u0014rlB!\\\u001d\u001ek'qW2\t:\"h8\u000e\bj'^7hB{7\u0011`\u0004iq8\u001b\u0000\u0004H\u0018\u000e\rw\u0001QޥvG{uk;n|+@X\u0007\nƜD5o\b.j;&xD\u000ek\u001a\fA*\u0010\u00107|\u0006Ao[4p.\u001f3c!\u000b\u000f\"\u001a^\u0006\u0015\u001akc\u0014\u0011q>,jļqTѸb>uru\u0007j'B\bikE\u000e\bg\u0010\u0000\u0011׶ڠZ\u0015\t$Xb\u0012Ekn.~O\u0014\u001cr(]\u001a'}V5R\r\u000bH4z+\u001b\b\u000b\u0015s0\u0013V+m6\u000f2DhsMTl \u001aw=o0Uj\u0003\u0001\t@XXO'CH\u001c^]ak\u000e 9=\r\u0010J\u0010\u000ft\u0016_%AJ\u0010\u0018!X@\u000f\u0007O~-+rIA\u001b\u0011\u00128͆Wou\u0011\u0001%O2*,A:kBE\u0007o̞{k;n'6x՝`gG\\&J\u0005˺Ko/qwI,,{`˺!Iz\reJW/\r\b` NEph\u0016b,*\u000f9؍{5$B|\u001dK\"Id\fd\u001d\u0006T)oJ5ɺvv\"\u0016\nבĳRU]/ױNʷ\u0006Y\u0019nh\u0007\u000brRAۭ1\u001b^{\u0011E\u0017\u0001=\u0011p_mhr%\t`\u0019̏l\u00041M!)ֿ'X\u0003m\u0007MAa@h\u000b\u0005-n\u0006\u001c5Yj\u000e\u001b,3H\u0003=do\u001d+^{㮳K:OQ43M/\u0011~]0_\u0015WKHƵHkc\\\u0013B6r'CD6\bF@pLA\u0017\u0015\u0015^FNe\u00127\u0011\u0005D\u0016]l\u0017\u0016nEq\u001a77f[jRHJa%K\t&/)\nz\u0007$SY^Sp{V\u0016j\u00174M\tl\u001fg1>QϿ&\u000b8dh\u000fSb\u0003TQ}\u001d\u0004\u0010R@\tO\u0005@1AD\b\u000eX\u0012\u0004\u0007\u0017C\nq\f\u001du\u000b\u001d\u00030/N:\u0013@\u0014.8B\u0010fW\u0012WԼ([c֐E\u001d\r\u0003\u001e\u0007>}ՈsW+|\u0018\u0004)\"rTt\u0011K\u0011YQ~sQn\u001fSRy0Φ(\b'\u001dI\u0011M'?=՟ܧ2ʰ\nK\u001eGA\u0007/(?K4$ED688~3)WLGBԁ\\ݼ\u001d\u001dϽsO\u0006\u0001> j!J^\u0018dVG!\baOȨ:>#O$1n?w{Q{T\u0005\u001ahG\u0018' 2 \f\u0012\u00078\n\u001c V\u0002C}lR\u0015j\u0005FFȨ\u0015\u0019UZ#JkdTY'2*\u0001u\"\u001272&FF\u001fX#\u0016lQ\fKQ8\"kU\u0011\u0019U֊*GFȨGFQ}dT\u001f\u0019uRԕ\u0004,Xq\f\bШVh2 FU=mXegF=uBńFes \u001eEhT\u0006\u0003!B,\u000bWmM\u0018MT\u001c*PN\b7fPWW+zWԸ)\u001eG7<э\u001aȴs\u000b (R0K,\u0005qg)?KYR\u0003UhyՇ\u000f<%ӔK|(?G9Q\u0003Qn$\u0005W/\u0017\u0000%9\u0000D/%g\t@\u0002\u0014h@&>\u001b腼>#\u001864:\n(\u0004\n\f\u0011x\u001b\u0003HZOrB(\"<ꡝa)[\rb9@$9:1txҋO߸rƳ^xҍ\u000f^e.cU\u0002jNk0\u0016\u0002\u001a`%Wm)\u0015\u0007\u001fܪ\u0011Z큻 cLLKw,Co/ֽXb݋\u0001ĺ3\\\u0005\u000ff,\u001b\u0019&{3\u0013\"<\u001c2ǹivy'\u0016{~SEe^\u0013,s9r=IV\u0007;=\u0000\u0002:$Pr'\u0010N'h\u0012-\u001ab\u000f2.=V=lõ2'2'2'IY,s:˜?˜Բõ,p=lb[y=o7)Jl\u0007{AVa渖^ja\u0010#8Ոn\u000f\rv9c\u0017cuh4Ǚ2F{hC@~2hy\u001ehN\u001dhNK&|\u0014>4)|Fi\u0012Y]jFj%8gu\u001cɳ:Y\u001dG#yVǑ<H\u0013v\u0012W\u0001˜۟R3eIV>\u001bL.Ⱥ\u0003@e?\u001fh\u000e4\u0004hY/ ˂fC\u0002\u00066tA\u000e4{\u0003cL3 ]\u000e&ju]\n\u000b˴jR\u000f4\u0003qv9\u001dhs\u0007܁߁$9)\u001dhN\u0007@r\u0011܁8wyy#c?\u001c\u000e4@s:Мd\u0012ǁp9.\u001ch\u001fhsMTl ׁ8;?_8М\u0014\u000e47a@dn\u0018\u0015\u0007@sZ8М\u000e4فq9)\u001ch\u000b\u0007\u0007@s\\8\u001c\u000e4\u001d\\n/\u001chN\n\u0007\u001b0Kفp9\u0007ѼΟfO\u0016s9Мó\u001dhK\u0007c榬3\u000e4ǥ\u0003I@s@+\u001chN\u0007q9)\u001dhK\u0007\u001bu2K)\u0007@s/\u0002\b\"`r\u000f4\u0000\u000f)X\u0016yZ;Ds'i6i\u0006ME@z\u0019\u0016k\u0007%^\nD\u001e7T\nvZ\u0006}w;\u0007\u0002%ة69lK}öw\u000ea{\u000e\u001dV9(\u000f&b\u0018\u001c$uAj\u0005\u0010^@\u0012\u0004M$E\u0000mK\u001e\u001aBjw\u0015M]\u000eM\u000eMk9lZ\u000e۬6s9l\nmV\\\u000e۬6Mk9l\u000eMöw\u000ea{Rԕ\u0004~v;*WIצT\u000bx@#>\u0004V9@ش6]6pЇU\u001d\u0011q#O\r\nendstream\rendobj\r30 0 obj\r<</Length 65536>>stream\r\n e]a\u00155,RQ\\\u0015`\u0014w,<$3h\u0005\u001c\u00023<%\u001eZЊV\u0005r*|0he\u001c.Mz'(\u000bH\u000bӠ\u0014@.PB PJ\u0015\u0015:\u0016NEkZTZ\\ZZ:\u0016W^+NŮkqkqkQkQkZOЊV<21Jb!\nV;\u0011\nuzA5\u0010\\\u001b\\\u0001է\u0000p\u0013TZk\u0015Gm\u00156Hx:ጭ\fA\u00154T,<\u0006<@{~bA\u001f\u000boD0Og&(M\"KHY\u001dG#yVǑ<Hq$8gu\u001ciX]N*`ss[Zj,rce\u0016Yw\u001f\u000bɋ>\u0016bf\tfA\u000fp@\f\u0004MޡA\u0011P ܲXUA\u0000\u0011\u0011^lvDnQXq뭬XxHbEOvz;ֈd.\u0016\u001e\u0003b|,<P\u0007@\u0016\u000b\\Dt3y\u0013\u000b/hT~t1_j$\u0016\u001ep\u0003Y\u001b\u0007r\r\u0014^\u0017YYMTl G,(Ώr\u0010\u000b\u000f\u0014b\u00190c\u0001\u001bFAd\u0007\u000b+\u0016\u001eb\u0001G,<er7\u0016lxWI\u0014\"ՅoDqXx\u0010\u000bϨ\u0019\u000b\u000ff`!\u0016\u001e| $\u001f\b6>\u0010uF$\u0015\u0006sUc}c\u0016i,0\u0016\u000b\"ʱ\\\u0007J@XxEyW\u0007ܱL\u00074\u000b뾱JE\u0017\u0001^\u0004Lr,<VaD\\%X\u0016\u0019\u000bO-G\u001f\u000b\u000f\u0002;)\u0019U<*RK\u0000@D4D-\t\"V9C\u0019\u0018(\u0012m`x\u0015ŵ\u0007tvZv9\u0018\u001e\u0005Ã9myl\u001ec{lc\fA`\u001el\f\u001eNAq\u0011\u0016ɂ\u001eoj\u0001l\"\u0018\u0004vGt`\bmY\u000e\u001c1tXx\u001a\u000b\u000fZcZ\u000eۨ6ﰍ\\\u000eۨa\u001bU8l#6ﰍjb-\u0016\u001e\u000ea;l{IV ̩X\u0013ᮭ\u001aT\u000b8@&r6:b1pjyʍR?%\u001e \u000e\u001eu:ˑ!)j\u0005[~@JE\u0014\u0001\u0003(w\u0000N\u0015\u0007\fxLc*\u001eS\u0019\u0013\u0007\f*|0H\u0001Rqv9\rd\u00170\tM\u0003\u0006Q\u0003\u001c! *DA*u\u0000r\u001d/\u000b \u0002\u0002\u0002\u0002u\u00008^\u0000U\u001c/\\\u000b\u000bZ\u000bZ\u000b\u000b \u0002\u001f/!\u0015\u000fxHebVAI?R\u001dv\"0\u0015Tx\u0001j B\u0013T\u0011UFfp:\u000bE\u001d/ut*\u0010mtJ!q\u0016Q\u00052\r\u0013\u000e\u0003Zw;\b|M\u0013d>M\nQ\u0014>4.5#gu\u001cɳ:Y\u001dG#yVǑ<Hqcus;emi$+ˍj&yZd};\u001f·[&/w>\nP*)l\u0006`@\u0010A\u0013DB.j)n-P\u000bwe\t\u00104 @t)\rX\u0006&h^a3\u001dQ[;C,\u000bXwE\u0017\b`\u0015.~-hW.\"\u000bGs\u001b\u0019|;Z\nGQ;\u0004wA\u0012'V!\u001d$YJ&*6+\u001dB\u0002\u0019'A$0K`27\u0012\u000e|;}V\fNw\u0007[-+Z\bGY;Z\bG]h\u0016?\u000fer7]X묝\u000bvՇ|#\u001fh\u0019\u001a˩YikT.?\u001d-Ew\u0016QW~G\u0004P\u001b$B|]Kg\u0006wB;Z~g,\u001ew^\u0002x\t%\u0004G\u0019VR,2\u001d\u0019m`Puw;M[04A+h u[\u001d\u000e;\u001d@gǾsPZ.\u0003:l͘k\u0005[~\u000eۥw\u0005;9/mf˲ö^K{iK-qܒ\u0007Fcv\u001df\u0019\u0010Δp\u0007C\u0010\u0016C=J\t#ҵGQ%\\V6wyis6zis6-jyi^-*Epyi^ڢ6{is6^K{i{/IQVN]^\u001dv2y-/2@\u001dW9>\u000eؼ6_6tʅz\u0000iTkyN\u000fR\u0016rB|dr`\u001f׊B;\u0003Up\u000eTxw\t\u0007U<A\u0015\u000f\u0005Tqˬ*|M\u000b8\u0006PŽcd=\u0002u;V\u0001\bKZ=:m%\u0011:C\u001cë \u0015\b`\u0017]\n*\nZ\n\u0005\nq*\u0002T!\u0015\nq*?Bj*\u0016*\u0006`\u000fxPŃ*\u001eT\u0014e%1\u0000ΐ:6d*\u0016R\u001a\u0010pGU;G&^*xq\ns*\u0014m\u00109,`U P\nsldarka\u0007\u0014 c\u001aIF͘iU<2.\\9Va*=\b9U66':;\u0006aO\u0014AnБMP\u0019\u0010U\u001bUB\u0018\u0015B\u0010-q\u001a\\&\u0004!\f%ƒ*M`JocL)\u0018(C\u0013g\u0011\u0004V\u0000\u0012tٔDcREHf-5\u0017>ə@Ҡ1E9A}t\u001e\u0002G\u0002RȄ\nK**p\u0016t**\u001cS+QQ\\d0u}\r\u0018dUe\u00028z/ĆP\r\u00001\r\u0019EB\u0010L.R\u0013\"4̢ɐZ\u0011\u000eT\u0012f\u0004DL\u001bmz\u001c~^aim&\u00047\u0013L+)~\u00143\f\u001fQ\b\nJRQ<z\u0014ޗYү`\\Q\u0011\u0002u$\u0002h\u0004KQwRP\u00048\u000f\u0019sPb!X\u0012%&\bFL&I\u0001~\u001aGQT)iMX\u001b51\"\u001d$ \u0000e\u0013gDT\u000b.\\\u000b\u0012ecv2\"LNHQ^\f9A\u001c$5(\n9\u0018Q\u0012BU`\\\u0001QeY=ѣpEsמ\u0012U;d\u0001Dn\r9\u001b/l$\u0005j\t7_!pCn\r9\u001b/l$pC$ܐCٻ\u000b7/ܼpmy\u000b7\u000b)`\n\bwZeM=ʋ7oD\u001bNs/ɷ\"\t5\u001b\u0005aoE*F,$\"\"Hi\"\u0019\u0006s-m\rC\u0011Vn0͌Y-\"\tavF]2V2\u001b\u0018\u00169\f}ci/޼x͋e.{U{z&Z\u00023fz\"3\u0006ay\u000fۥ,ڊ\u0014Đl\u0010n`+\u0012a˺\u001f(Diu\u00126B*\u0013+(+la ӊ\u0014Ծb\u001eD+\u0012͊f\u000bLTpt\u0017g^yq2\u0017gN1Zc8\u0005**R`\t\u0019'pXB\fj\u000bT\u0004JXM\u0016,\u000b\"\u0002 Qi^\u0012\nTKo\u00156\u0019-\nT\u001b!P\u0011qG&PmDEZ`\u0012?]{\u001f@\u0002\u000bT/P\u0017#Pִ\u0016:2Z\u0016f5\u0001\u0004Fi\u0004FF\u0013N#\b\u001c;\b;\b4HbVQiQv\u001ac~E\u0017^.sQB\\\u0002iFiw\u001aaFXk\u0011iFiΝFiw\u001a$%j4;бi/޼x͋e.ޜ^ƴ\bLI\u0017.*\u001bFcB\u001b\u0014\u0005(n4JFtҹ(>(9Ry&3J>c0\u000b3/̖0s*:\u001aj\u0014\"\u001c4\u0006f\u0014d\u0019k(zơ\u001ar!0I.\u0004&^\u0010>T\u000fC5~r\u000fC5#\fё\fj\u0003\u0005\u0006&h\u0007DM灠]\u001at[\u0012]\u001d\u000e\u001e.\"\u0002fwo%La.\u0007\u000e`.SkOl_OgI?i'?sIOj_ҾOZg?q'?__rVQ3\u001fJ4t\b)ӽB#\fv)K4;INYBXd%LYYBPGH\u0019\u0015\u001a!ehYhIr+\u001bE,,b,N/L9֮7/߼|[\r:\u0012iuLb#H&23`GX\u0019SH\n\u0002\b+c\u0015pFX\u0019S\u0019ae#L&23$\u0017p6\u0012S\u0019\u0001c\u0002F/L9^y\u0001\u0005\u0017p\u0013)qeH%H*̸23`G\\\u0019Cqep26\u0001gƕ1\u0004\u0019W:ʤ\u0002Έ+73\fuĕ1\u0019W&̸26fƕ1\u0019W\u0006;x囗o^M|sZȐ*A3H\"2t3\u0003`{`l3\u0003>e,\f,S\u0016lf`\u0019j\u000f,CS?x׆\u0019X\u0003˔\u0019X\"2\u0016f\u0006)K43\f\u00073/ϼ<\byt_ Uy1L&Q]\u0016,fd\u0019l,cHT\u001bE^\u001ael\u0012Ո,cHT#\fG$j9L*Q2\u001eYƐ6\nC\u001aAcl\u0012F'\fGI$,%^.k4X%U\u000e;Lhv\u001b2\u0011Zm%u\b-c6\u001ae#Lhv\u001b2Inw\u001bm$e9k\t\u001acmQ\u000b-tmZ/k'R:$U#s6e#)6e\u0002n\u0019[:bd\u0002ιhƖ2|3bE6eLmto^y2o)ު\u001c~۷Bw|W\u0011U^y_ז\u001c\u000e\u000ejJ\u0012}j1KU1f\fRJ8\\\u0000\u001cQ\u00034bBh|5\\\u0015+\u0005\u001c\u0001!ĚowGzL\u000bg!;J\u001af\u0002b/KX8嘫\u0005,(*\u0015H˳\u001as\u001awoqNj\u0001pn]w\"Rq#s\u001ei,3\u001a\u0018I8c\u001bOTz_|ֵwwfU^sOt߼^{jng!nRm\u0005jL9Y5Tf1B߈?b\u0016kDJk$c!\u0017T\u0003bf+?ɧM\u000frJ~4qɏU&+\u0004%?V}䇫O\u0013pi\u001f>MPէ\tJ~4A\u000fW&(\u0004%?\\}䇫O\u0013pi\u001f>MPէ\tJ~4A\u000fW&(\u0004%?\\}䇫O\u0013pi\u001f>MPէ\tJ~4A\u000fW&(ym&%\u0018>MPy1-5;>L?w'\n5P}iz_zU+3=`ZU\u000fZ~uSk\u001eZ\u0015UNoٱ{ﾕޱezCa-WݸYĸXY3tȮkW\u001d9}FRG{iݕ\u000frO|wWV7O<vdZUUS;>G++\u001f;y)5^Wۍ>\u001f\u001f?~叠t%e\u000f++\u000f\tw}X}ןVV?|%%lG?ϖZ\u001cqO}%'?J+RJI+%+\u001e]\u000bz\f'0\u0004Z]\u001b\b{b/佱ӱcouA3/=\u001d\u001fa$\u0007>:p7=C7U$s囷BvJ46\u0003n B\u00142h!>)Zԗ 2{k{\u000ff\u0007\u0004\u00123I'\rHG@v!\tp\u001dB\u0000,/-J7>\u00028=\u0017FG@Ͼ_\f\u0001'\bSH \u001cӚ\u0001\u0012+%@L\f\u0018\bq)+>!z+=fY'\u0011\fZ\u0016;S>s\u0001\u0011\r]ƒWk!mwF\u000bPN\u000f9v1{wu۷tD>ρK\u0011!\r\u0002!Wv§7_~%9\u001eA Waq֛ͅ\u0001ύG?}e''ǫ暻}r|b^)\u001egPsWn5ܺyfs\u0003o4;w\u000e5XL[5\u0002\u0018S4\u0010뵨FI:cB\u001a\u0012s4߽鏤\u00127I_J&՛ovEм|vs>ݼYyjב:7@TI^ss7^vnS=1efS7 ߑ\u0015Gsmgf%\u001biW)MɝhM(^o՚q7T?9~̩iӎGg/qlL7{=)Rv{\u0015y׻wvn<}FDkFPrY.$&jh د\u001a;*\u001a\u0016\u001aX\u0010\u0010\u0004!Zi\u001c\n;\u0015\u0013HT\u00115o\n;#Jn/\u0019\t\u0001MxpAR24%'g\u0002\u001a\u0002z\u000fu芇\u0013?ǀ\u0016G՛AIq{t.\r\u0001\f#%&u2\b\u0002E}\u0003Β?2pp$'u\u0019D;}Mu\u001b\\F^y\t\u0018/\u0004\u00125'AG\u000e\f\u0001\n\fuC\u001a$P5\u0017U\u0018Mv\u0006@IZ5\u0000^\"'\\\u0017\u000b[ \u001cϨ-\u001eЌ7E(\u0017\u001e\u000bZpZZEz姮[Kξ%^ʚ\u0019\u0005\t%nuy6oߺAD\\ceysnK\nIxy\\\u0010\u000eJ?N+s\u0007sgUӃ\t\u00036TC1\u00028\u001eR)uB\n\u001cCx<۪9E]Pcz_II\\4KX(WZSrv>D\u0013a \u0016XQvrB}IJeU;\u001fIЍ\u0004h\u0005e\u000b^|ƕ7\u000bnڇ.D\f°bA\u0003\u00197\u00145Rtu$]\nv.m\u0012DLŬ9\u001as0rd$Wnx\u0011[.\u0002\u001cA\\8;\nf\u0016Xj.~yʬ#\u0019ƈs3<\u001d@L:%Մ\\M\r=U<\f\u0004smǛs7\u0015\u0014hv9NO0쿼p-~=\u0016C0\u0011\u0005JR\u0014\u0005P\u0006XIl2N[Zt瘟U\u0012栉\u000eL\u0011>q\u0016?W]GU#r\u0018;7ov݀u3G%h(uF+\u0005\u0000a~2-\u00158VbE(u\u0000Ba\u00196d^r\u0010-)0+F\u000e*)3pI'W\u001c2\f\u001aDF\tq\n3M@f2\u0014`D\u0012P\u0002\u000f!\"}x\u0002i&$I@%\u000eWYb%pl\u0019R\u00192EVXphT6cqf-ܨՈRMZev,RcfdvNjx T+\u001bW\\?k\r>{%\u0014\u001fuKMٗ\u0013!dL\u0013nfF#PnnnũdnTnGm[`ҍkۀ\u000f\u000boC>,\r-x\u0003Q4<n1\u001a\u0018\u0006뇶ՙ\u001a#Cc\u0017WT\u0001#[́j\u0011 (xr\\\"\u0002,\u0001CɃ.\u00059#cE2vXi@\u0000\u0018\ts\t\u000b\u0018P-e^\u0005c5TJ=׋h()B\u00028:#TS\u0011Ux^&\u0010BdPs\u000b\u0006q\u0015\u001a@ͲWY\u0012y=\"0\\?V⊗;DЎKPK\u0016.S\u001e-)3%.R\u0002&x \u0010:\np\u0003$*5$\u0002\u0004\u0007k\u0012\fa\u000e\u00121ɱ8\u001f\u0017Q\"n}ӑQfL=U>D@<|+4O8\u0001HƄهa~H^ocE,֔2V\u0014\u0010\t~{Ej\u0000\u0002\u0004\u0002)\u0001'c\\\u0010\u0000\u0010EmO$Ԫh\u0016j\u0010DU\u0002d\u0015%I5E$XP\u0012ZID\")%\u0011 %\b+UDU(!L\u00054WF\u001f\u0001UAj@m!T'E\u0019R70\fǢh\u0018)7UFJQRF\b+IE#,TX\r$&\"gm@(}Jp\nKoS4\u0017wՓ)FzH2U3\nnlW\n\u0012R\fՠ\u0004jG.|4+W6P\u0012=QB>pLwUS\u0000\u0010aEߤj\u001c%i8dXS6+2\u0011q\u000eX\n\u001eR IQ5LJC^U\u0010T4(D{nR#U$UY\u000bjtPԀOԦ1\u000eUK\n&ò\u0012h'ֶ~O\u001f|j8\t`}%y$\u001eDzaVc6\u0003zKdҋ\u000eH\u0015\u0000'+<VH\u0017j\u0005wf5]<Ar@u笿h%\u0013~.T.u\u0016^\u001f0e<<\u0016y)R\u0017iT,:\u00055[6J\u001a\u001ep$Z\u0001'R8Ca̸\u0019Dprh\u000f\u0016S\u0011TjF%FŶj(\u0014ݫɃ|̸N\nBH`\u0010\u0018=Q\u001fR+\u0019E\u0016\\\u0002\u0016$kyA2DaBp6B'\u0019\u001ctLD2^Rpq$cWbk\r˅Y󮎨1\u000f\u0011%d<\"I\u0010e\u001c[?FIm\f7^K\u0000Z!ZACm\ncd.S\u001c3\u0016g\u0010\u0010֧y\u000fE$ۊG<+P?9ϡΡ\"\tSKnQRFR\u001b+Ys-{7ouv{u'e B_3\u0010?Nz\u0005\u0015\u001bm\u001c\u00146c\nN3gD\u001f\u001c\u0011\u0016z>tG<#\"1=v{vYOf\u0014R'+siZ'+TyԺ\u0006ZS\u0017>W\u0007\t\"\\c\u0005}2ڍsi쓩g~4FqOVf'+'+7OVn\u001b0\u0019s,\"Eۡ\u000eˠJ/\u001c[c}-`]@^X@L)@kPp\u0014\tS1\tb\u0019S$BTܽر3GA2t)*mWDޔ1\"maD:\u0007-/\u001ccdضeT޺\u0015\">NҖ\u0017\u001e9b\u0000\u0006*l\u001a6ԗ\u0001ӻ\u001d/ui(\u0016n\u0003aˎ Oj;زHJeR4NU24wZwF3wֶ~'|r]̫\tHM\\-;\t6j\b\u0016=M63ju\u000b,,j\\|\u0005lra沎RO,Qnu~:J6UQz\n5+uT\n(dCC\rPWJMn(lβi}:J\u0011TYG}0Rϫ,\rL=Wfʵ3r\u0018Z_\u000fu\u0014g*P\u001d먾\u0014T~QzR$\u0014I\r(*U\u001f(b\u0018\na?{#\u000bUYU41UE^6Uh#\u00187vuegt7ʵXGa:JQu\"c\u001deR4\u001aQ6hiF]hh{a\u001d՗jbzU}dUQ\u0004:_T\u001c!Xĵ\f0hGW#@\t(D\u0005\u0017h?wn\u0005$\u0018G$P؁\u001a;̏L\\pbB$\t5XY&L/SDC=*Q\u0014\u000fwPC/Un@qѠ(\fVb_&R\u0006^\u0018\u0004;\u001e\u001cgq9`iP[%bX;X\u0015\u001bGQ^5~XXm\u0016{8ʝ4\u0006ĳ\u000eK\u0016\u001cIv4Y=W\"ۊ|A^X\u0015b$\u00116\u001fd`1Qr\u0013\u0000,{\u0006cY\u0016Vr'J\u0019a\u0016\u0004=r\u000fxJz|F±\u001dI\u00164-szYi\u001cx+&ῃ\u001a\u0019\f\u0012'f5d˟\u001415'a|aa*\u001aB)PiR$\u0004?Mr5mDb\u00106Vkx0*-5\u00105XZH\u0015AeoQ\u000b6TwUjEI\f\"t]-W$L`@\tG\u0019%Aj\u001cn@(*U6M\u0019u%ϴW$\u000f ##%P\feF!Ԫ@33\u0016\u000eԷ\u001b.B\u0012PLx%f֏0\u0000f,\u0015\u0015\u00029D!׫j\u001bJhR0\u000e\u0000%ƶL\u0018TKo\\/\u0018B ́\u000eޤ1d2e\bV\u0013H\u0005OڴFa$n]BEF\u001fD\u0011\u0016Hc}y>Z\u001fz\u001dq\u001bԩQ\u0006VHt\u001b\u000bs\u0017B&K_.\u0011RxI\u000bs\u000e?I\u0006\nLV}3\\ \u0001B!RrBRp`\u000f0J\u0017Wy\u001buY)\u0000i˕n,Zxz^\u0000sX{Q<\u0001\u0016nڼ\u0004yELyW!mO\u0006=BvS\u0000hHuAǖ\"\u0010\u0014L+m\u0000\u001d\u0004dvD4ne.t5$!e\u0005%\u00175➖yySF\u0019\u001cJ6F̷AiOjLRhFcc\u0011/}\u001fF\u001a\u0014{˖EIjvV\u0014ш\u001aR\u0018вj:U*\t\u0014\t@\u001b#\u0016Yq\u001eI;\u0010k\u0010Z\u000eB\u001d\u0002}\u0003c\u0000m$6F4\u001e\u0000\f6͍\u0004nh斆^mI8|\u0002\u0004b'['.˳o٢Q$D*'C彞,ic}dJ]bhـ$ /ncYI0\u000bUycNy{R>_Ҹ6*\u0019&3jl\u0007GS9_\u001dVtA9xbmPidO%\u001a31BHX-jp\u001dA&\u0006Fa\u0019T4\u0006z.YJ\u0017:\u001dE\u0015;)\u0016Ŏ7L.r属>)(o\u0002\r-ϮUUCu\u001ayKҋ\u001aˠ,Su+\u0015`W=Eu\u000b盬LkP/ʛ̑,\r{&\u000bM\u001cAْʨ\u0015TJ\u001dnfO5UI9UQ\u0015!\u0000DX\n֣\u0013s3\nZ@\u000f@%YFRVB[/$\u0019I\u0006襚D1_VńU\u0012.K\u001aDԪr\u0016̻V\u001bV1ғ]Ujh\u0001A\r%LM<+2ZzG}\u00060\u0012]\nΈE\n\u000f*plf=\u0018% \u001biedR\u0019J&;ѓQ-RUn!R\u001555\u0010\u000eeS}d2?Z\u001fJS=妏s:R23̪:%\"8\t ]\bb.\u0003\u00135s\u0003\bl\u0007\u001d\u0018@?v'\"_s.wl74\\Ыl\u0011E\\\u0004\u0015\u0000j\u0011\u0017\u0001ɽh\u0011\u0010_Y\u0016\u0001ٓ\"\\`i\u0011Pdײ\b(T\b(MY\u000fѲ\bPz\u0011\t\u0016\u0001{\u0011g*\u0017\u0001JV.\u0002EZhrm2~kT\b(e\u0011`4cy\u0011`tD:]KMV\u0011\u0010,Upp]\u0004Dr\u0011\u0010~\u0000Ջ\u0000M\u0011,\u0002%w\r*|6\u0017,X\u0004\u0017\u0001f\u0003\u0018\u0000\u0019VovA\b\b\bw,\u00024IE@[\u0004h>\u0000Mg\u0011`%1UʀVMv\fhըe\u0011`m\u00114u\"#\u0011П1{0z\f^\b$\tJ>BDJkNx98\u0015o}\u0017d£N\u0000\u001e\u0003Wl<\u001fQɠ)Rl.;ɒl/9%Q\u0014G6\u0015BS\bieh7:Y\u0002UIs5Q\u001aKK_>\u0006M\u0016|Tn\u0012i\u000f^y<\u0001ˣ\u001exTy\u0000lKy(h3&M1KD6\r GH(1u*j2+\u0006\u0001Ao'Y9Nj\u001c\u001fgɠs5ؾ0VbtVky>P̠s\u0005{+,Aإ\n1\u0018\u0003\b.$\u001c\u0001\u0004}\u0000\u0005\u0010Q\u0001j`<<TK`E(\u0003\u0002G\u001bL^3&d\u00125v#:\\\u0003Id<\u001d\r\u0004\u0012<Q)+\u00162;oWw#<e>/ైgt-O\u0002\u001cg?ۂc6=ݻKY4{OG-\u0016\u0014G'ˊAD#Yji\u0003m\u001bBHE\u001az߁: \u0018:\u0014Z\rg\u0010\u0019E\u0000\u0002\u001an ;-&\u000eѣUֆ\u0017Y_\u0005;\u0015р\"RyX\\4ei#\fVi\u0003>˥D\u0012rDY~ۈ\u0006%ZTDG-J3\u0012)ӚŘiD^r8QempdP\u0019]0\r\u0019Vl`[YGHđ^6#ˀ*ޔa}h#\u0017j螛]\rL\u0003@/+R\u001b}@&\u0002pd.EU>#\u001f &\u000e\u0007\u0012\u000ez\u000fG|6\u001c=4]\u001cUrQ-,B\u0003\u0013Ae\u0006;|\u0018\u0019\u0007Q!QawJSCT;S{2\u001a[\t\nv@@\u0012ΦJQP\u0012P`iwg$\u0016T\u0019\u0019\u0017\u000ei\\\u001c\u0001*L\u001d&EL]jwP}ȹ\u0014~XFIۉBT\u001e41\u0016\u0005i(ZHoş\u0001\b?\u0003m\nAaf<b\u000fWifG8\n\u0013D⇃A\u0007ˊ5I\u0011CHcu\u0015pT\u001a\u00184QlD\tFcQ*\u000e3X޾Ző|0rrH35\u001dj+\u0001Z[b\u001cRq}\u0007rMEMPc`X\u0018L\u0002BL*E\"\u001bJ\bH\u001c2\u0004h\u0014B\u001dYHb\u001aEe4j*h\u0002,tX!\u0015\f\f sP\u0018q(ԆC9\u0017EsevD$&UđxXT]\u0003m-.;\u000b1 \nLs*a\u0004\"XRP\u0011M%\u001eڠ\u001aR`b2*%'iG\u000e2[`Z\u000f?k\u001bFׇ$\u001c\u001f\u0006\u0014T\u0010\u0002j\ntLxaoy0\u001cj<d\u0003\u001f6d90\u0015F`@2\u001cNp0rR@l\u000f*\u000f\u0015xM\u0004&R|C㰃i\u0007*2\u0010<D\u0017bp\u0000Eb\u001cH0l>\f\nj\u00075-mCIKR|@˱p$y'\u0004\u0006RiE\"^9\u0018Qi\u0011\u0012z\u001b5\nXɠ\u0012w\u0010\u001f֏bAI\nhI\u0001ʪpU\u0018RuHE,ΉF\t뜑sY\u0019:go9\u0007Q}\n&?r\u0011\u001c\u0019oҾ\f7Pm!O\u0016!o\b\u0004ysT\u0003~ҋO߸rƳ^xҍ\u000f^\u0004\flxV\\T\u0006\u0005\u0014\u0001e\u001bwԨwn\t\bBSjnF0AH'QN\u0010Zf\u0013\u0004d<IPWeM\u0018Dh8@yX?wfU\u000e\u0001\"p.ܨŎ~\u0005\u0010\b\\pH\b\u001cK'0,u^:\u001dp;D>\nE'\u0000\rag`wr\r[[z:oF\r/Q!]GWSz\u0015\u001a<=߽7ԝf禚fkz̢Sz@\u0015\fßɿs/\u001d\u0014\u0012U*\" \u0014ej],W1\u001d\u000ek\u000fܰlM\u000e݁NA(@J\bQߠ\u0004%kJmȅTOLPΩPLI]\n\u0000Xϝyi;\r\"YƂM$K[\\_\u000514\u000f;{/-Ki;+G2ߢ3\u001esfgR\u000bZv\u0019H\u0016d'\n1:\u001e{cot<\u0010\\\u001b\u001dpUCTi1F- \u000e ZJ\u001b\u001fų-ÊGip\u00130'L鶚0\u0013\u000b\u000fs\b\tfҭq I`8ŁYt0p \u001b]h{$\u001eAr\u0017\u0015i\u0006G3n`HJ\rU\\(\\\\k+$b&8\u0010HNQ\u000eY|\b<h'\u001c\b\u0012\u001fG\u001f((O\u0014I?΅ϣϨn$\nYX1򔼡kpM\u0018!X\u0011&X\u0002$nYMA\u0014pE\u0004\fm[l\u0012AmX*4_B?\u000bj9D|\u0000/%E\\;\u001d\u001fWs\u0014{\u001e1!M\u000bA6TssT!\u0013:ðC\u0014'#F[\\=+:R mDa]\tif\u0018ax4R[R6E+E\u0019I\fAt\u0003\t;0q8\u001b!Kuu+$A\u0012\tΡ䈱,\u0010v\u001aUS3k\b\u0016\u000b먩\f'ITd6騸ӢI\u0017ޏ5gA5 uu$\":d~\t\u0015\u0000LHQfk(\u001fTO)P\r5Eu\u0005b@\n4G\u0018F0+S\u001f\u0015\u0010CѰ|n%<\u001d@[{|Ɠ>2K?#*\u001e k**Sc\u001e\u000e\rЯGB\b\u001a}գ4C\u001b\u000bʾd\u0003?,j\u00007wwگ\u0015soܽ{ '6AN\u0000TC`#\b>ә\u0010\th\u0000@1AD}K\u0010lH\\HNNo\u001f3hd\u0017Z]CG1R\u0000k\u001c8[\u0006olX\u0002\u001c쇴mw\u001e\u001a4F\u001asb^~wV\u000eMaĨ<\u001ci ]ph\u0001D\u0011\u0001T^h\u0015\"ɛ݅\rxJp#5\bLIG-x\u001c(\u000723xG?YϢ+\u0016\u001dn\u0012M1IFdd4\u0013 h|@28 DxƬ48\u000bp\u001cdA\u0004 }br\u0006b\u0012>|\u00039T8\u0003F\u0010Sw\u0014DF+K_i>UKVxj\u001a+w\u0018\u0004\u001czJxݬU9YGXdY.oöf襷2\u001bc\u001bOTszU|ֵwwfU6sOt߼^{jng!5_R\u0017r\u0002PCzAoDDXCV-;5X\u0013ͻ\u001c\u000123ҕJO\u000f\u0018i\u001c9g`T-h̳N鮧\\]TfuJd\u001dgR{\u000f\fլ뻲N+;뻲{+fe߃]UvUv\u001e41O>O',=\u0018E>Zv5\u000f=իgt͚\u0007WZN/ڰeM2|p՚&ݴy&\u0005%mG\u000el۠\u000b),/jƭwo8zg\u000fl߰U\u000frfTA׮۠^\u0015jjcqhۆuk֬Z\u001bZaGΞ=w5\u000f^P \u0004<kf\u001b7o߳mӆ\rڷ}F\u0017q_㩏|'\u001avm߶eM[m߶umwܹ{Qp.{x̺\u000fg>?zrȩ}{\u001e:z*ݹau-<۷/3Ǐ\u001f?vG<~ᇏ:s9سgĩ۶9d\u001b7?p\u0001\u0004g\u001b\u0010N\u000eȅ/\u0005\u00077]\u0015|׻/]xlc?6\u000bzgG^/~\u0017\u001d0}\u0017>/_s?_x\u0017>ҋ趩8'uo\u000f~S\u0017:\u001f\u0017>u\u0013\u001fۿtϼ?y\u0015xc7û[~cK7nvN\u0012\u001e{_w^}ƿ¯gwޯwϿ߹;׸\u001f{oƽ\u0016^{W~Wo?\u0013J[xgҗޟo\u001f|+_ܻ_;\u001b/?Eŏ\u0017?_ޟ}/wמmN[q?|So;~ko}|_|W'ї>?\u001f?ܗ~~NozOwO7yS_xw|W_\n;'7~~ӯ}/W\u001bo,53\u0007\u0007^}\u001fޟKxW_'~_|\u0002!W|_|?o/~+_/=o~s_淾o|[G{_}}ss_?p`u}\u001b\u001fg^\u0003c=h~ْ[GOϨޖ%#ɶ$Ke!Ҍ@\u0014Yq\u001c#\na\u000b\n06Ie\u000b,$\u0004? E ؂\u001d?~\u0000Ea.tF=\u001ek+!wnw\u000f\u001f\u001f}OC.[;٧cǾ=#ǎ\u001dy>gw~;ew\u0015.GG˶l~I\u0017{=7\u001f=|rۯqջwozgrΔZ}L1/\u0017\\t饛\n.bw}\\t\\Pb[\u000bWްvr۶oW^9oȗRZ)3篸`\u0005sy\u0017^޾zCg>\\{޲yms\u0017h_am{n颅K\u0016ϙ5u9+W_zkVlVopʅ/gM6W濙3[̝;g\u000b\u0017/^8dF;m3[ZfL:eֶ6u^۬-2,X8NIsLSd~<i)Jfebt*N\u001b\u000f\rS̝VIim~ g&?jpʽG\\QD{e{gZ[}TLnUC}z{.\u001dzru\u00077^DBoG\u0007:r\u0014v{&ITN|ӯ];8^[l>$}\nz[νG?R{0_\u000e\u000fD\u001diy\"U(O\u000b\u001d\u0007ި7HB~O82~\u001bv\u0006\u000f\u001c7Bz{?s;oޝ{z?`nx#n?uKn]͇\u000fo1\u001b!7˳\f/\u001e\f\nqБM㎸QNBG\u0018\u001dH|\u001a\u0010<y\rۛnsI~]\u0010b1,\u0006A\u0012־\u0007M\u001e8)$0Q>\u0018ӏkr\u000e{;r\u0011\u001fL\u001d#ͧ\u0007\u000fà\u00144pWd[ɺ_\u00059m+G0pۻo^>\u0015G;]ǎ\u0013Ǐ5wOzO}Ļ\u0013]=Gvw,u_ct_{{w^vtKo˘<.\u0016G8V?`{Mp}vT\u0012\u001f=rdC=SaKx\f\u001dQ)^\u0014oFIA)\u0018x7U~\u0018\u0006\u0017vR^\u00114E\u0019KI1/^w[+\u001f\u000e;ͥ1ӂFua\u0019ǁ<[1\u001f\u0012D\u0014|>N\u0006U⯰\u0004fv(350țo\u001eL\u000b\u0018*Rț\t\u001c\u00144|(\u000e:(-FBZ\b\u001a휨\u0010ɦ$R,&7xX\u001fDq*Z1nQd\u0019\u0016|Nm\u0007)\u000e\u001a<?ۓ?^rW;knSI\u001bp CИ\u001bG5}N\u0011Q{ݡT0=H!\\ِFuqC9O~C'w?/w|O~wN~\u001f_<_:~䃹zΎ𲝲/\u0019$AISd\u001c)B[SB1_,\u0014\\*\u0003wK/E|\u0016R\u0019q!5W\\G-x2Wi3\rQ\u0012%yoZ|\u001di\u001aaQ\u001c\u0019Kmإ\u0016R(Oo8BfK^<ukT#94\u0000\\\u0001FQI23\u0015a(;HzؔHxPLQр\f 9\tQrеk\u000eW;ӿSv\u0001\u0005S? /\u0007D\u001a\u0017\nIJ\u0005Rk=ҎEid\u001ftʆKeSҴH=ttEq|\tP,˖WoV\u000bADlf.\u0017O+\u0017?O娔i'\u001cI촒QIfS\u000f\u0014ŒL]I!\n\u0012P0/Ql.\u0012\u0014n\u0016KxTfQ*\u000brt}sjn\u001f/\b-l?ras񡻋h\u001c_\u0006<_wTQ*,]D>}o^(H\u0001ՋjTǼv\t3Kɨ~[UMoHEivp\u0014A)9׾@:*\u0007Ow^\u000e}Mh+TKf%?(4]Q0/E]\u0006o%I\u001e\u000b̥NmY\u0019ȢC|;i_Ż~ܤMM\u001fmS4w.E~R6%!)bho=+]q!\u001a\u0015s\u0014\u0014ôz\u0014\u0006|jFP-*|@EÞG%\u0007eWDu}{Ŧ)\u0018`\u001cɀgN,9\u001cz\u000f-ƕg\u000e\u0006<s`C+\u000fU9IO=s>_.6ZbfS㜼q.\fi#?s2my/\b[\u001aj\u001c\fxfq\u001e!\u0011&\u0001㜼q\u001ekS\u000f\u000b嶿Nthe]1KPf2L\u000b\u0017=\u001d|\u0014\u0014\u000bI6O\u000f\u0006=HRi<zaϺ;Ȳ\u0018?-\u000e?^\u001d>q\bYیjV\u0007g\u0019;TN:e\u0013\u000b!\u001e$\u0006<\"GlTO\u0006oI^\u001dahU4G\fÿ$w\u0001\fxݨ:D4.]]z{\u001cTldI\u000f+;$'b͕\u001dVIʹSԮ\u001f\\Bn\u001aYqz\b/\n]϶\u0004gIݣQ\u001aw\u001a\u000b6F@:|\u001eߡ'څe\u001a<}W2\u0002\r=S4\u0017$M8}\u001bݣў\u001a|'ʥKgO\u0011>\u001fWw\tʱ777<X}zuT]\r!n\u001es\u0018O[?Ӣhȳ`\u0019^z[k\u001bd\u0003\u0016>\u001e\u0016D\u0006=/-u\u0001K#RO_s&\u00056\f\"sŖZ*Bs-Τ$\u00059\u000bVk\u000e\"\u000b4\u0006h.֛/훳\u0017|[e%q$\u0011]\u000esт,\u001c\r}r\u0011\fJ+-4^TZl^q`rSX\u0018>f\u001ar\rkG]e7\u001fw۱#2k}p]x\u001f=\u001at(\u0018MWK\u000b\u00142}3k\u0016\u000b\u0003Hz)\u0017PS_0\u0013䢒[2LZ7R\u001bRZ/\u000f\u0011'uw0/JY5,.\u0005mc\u0001QyQwTNյ$k<V\u0010Ym\u0013.MW\\W\u0007?ň6\u0001|x\u0014\f\f\u0013\u000fOe\u0005c)\u000b%\u0019mΘ%\u000bz(M$q\b9Ni\u001b\u000b'Zg\u0003m7Q}Qjo\u001cF\u0007]mL.\u0016%aN0L/v\u000eꝪn0si7xh\u0007c{[P\u001f\u001d̓͝4|g\u001b\u0004GtM3o\u0005ٽm\u0002\\\bAqjoӞ۴_uFqjo#;S\u0013gS`}j#jG|5q\u000fO\u0003XǼ5UF8\u0003TSǭ^c^i _@ziI~tSZ,Z8gIL<uzO]sd)Ӧ\nQ'}W&\u0019lg;}S'O<e\u00193[EVL:wvY3U.bq)mSݰf̜5m\u001fj0i6wܹK\u0017-X4ufKˌQr;EL+?gK9wsW,Ype,[lE\u000b\u0017-Yvnбs]8o޼ţ\u0016/]lܙׁ9k%뻮zGt\u0015nc݆s֭\u000bׯ_fk7tF%Wl_zŹ8su] ;eJ\n5\n?ν]]p텛.Ү/\u000e7[.ں-7mJ6]]W[xú\u000b;6npCe\u0017\u0015:ϝQۨ]U\u001d_wI/lߺm\u0015W}-;wڵv]mǕW]]&-8MŤny֋7\u0015/X<zU&Xؾ믿nk\u0012_z֝_set޹sm\\uk{޳\u001d7\\qqn߲R[/ݶg%fW/cvӺ-W]w۷o*.ۼinߎKl]\u00176]z7ܸڻwE\\.x{׶ݗEέ]9쩭Kצn}\u0016aᒷ_}Pі͛\nAtў=\u00077۽$NmnSז'|G}ch~5\u0013ٟ+.۵\u0010m ٰv}k{;vnݚF\u001b(1|5n\\uJf-\\q+_n͚\r+[.)nڸnMǚ\u0015Յt]vl.\u00147]݆5ׯ\\eZ\u0019;{\u0017Ο7oeKpej_lK\u0016/^`%.Йw^*w޹Xdr9-30v\u0005&M>sfˌ\u0019-mmmsf͜ն`¹mH+\u001a_Ts\u0016-X`9RGms1:\\\u0006IvmΚT)D\u0001U/6M\u001euԩ̅f̚={vLYm:}]S\u0006\\52E2qmLBZ*SBI&ߡOo\u0015_+$tq>!oJ@o@\u0007\u000etĽaԱ[\u0003:\t=A9\u0019rB6.$s`#c9,t\u000eiЛAtX\\(N(*:\u0011MP`P0\u001fEA!/E,p%9|\u001aI\u00074.\u000byËw0\u001dwO=\\۪\u0011\u001f,;{\u001d\u0003=RS.\u0017\u001ccݢBuh\u001a\u0011j\u000fEsa?d<ǳ[OM˷\u001e\u0018ѰMf\u0001;\tsI)\u0017\u0016\n򹂹q֖\u001d/\u001fXyH\u000ev\u001f6QR_~\u000f4w?6p/:B].\\Okk7\u0011R+\u0005SK)aCrw|in?\u0007d'_\u000er\u0000\u0000\u0000\u0000\u0000\u0000@s*\u0000\u0000\u0000Џ\u0001\u0000\u0000\f\u0000\u0000)d\u0000\u0000\u0000N+\u0003\u0000\u0000p\u0007]\u0019\u0000\u0000;\u0000\u0000\u0000Ac\u0006\u0000\u0000\b2\u0000\u0000\u0000wИ\u0001\u0000\u00008\f\u0000\u0000\u001d4f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004]\u0019\u0000\u0000;h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p\u0004\u0019\u0000\u0000#h\u0000\u0000\u0000\u001cAc\u0006\u0000\u0000\b\u001a3\u0000\u0000\u0000GИ\u0001\u0000\u00008\f\u0000\u0000\u00114f\u0000\u0000\u00001\u0003\u0000\u0000p;xo\u000e\u0000\u0000\u0004\u0016\u0001\u0000\u0000LP4f\u0000\u0000\u0000o\u0000\u0000\u0000μ]\u0019\u0019\u0000\u0000Gc\u0006\u0000\u0000\u001a3z3\u0000\u00003i\f\u0000\u0000\u0019+1\u0003\u0000\u000083FӘћ\u0001\u0000\u0000Fٕћ\u0001\u0000\u000023\u0000\u0000kh\u0000\u0000\u0000P-\u0019\u0019\u0000\u0000@ƶ%I\u0003\u0000\u0000V7c\u0000\u0000\u0000\u0000\u0000\u0000D0ޯ\u0001\u0000&\u0000nz9\u001b@հUSIb2ɓM1ar<yʔ)S4`b3e `\nR5\r*F\nfiӧhii\tLtR\u00073O6u)5SYb&O&2uv[ۜ9s\u0002\u0013@[YR6ӤhB3bL.6w\u0017/Yd)0qI\u0005,^pmR5ӧN\u0019T3+2ms/ZlU\u0007&UVV,_d9gΘ6eU̬y-_yu\u001b::;7\u0002\u0013Yggǆuk.X|٢ym\u0006ՌTR1,_zƨnڼb`\"۲ySZ6nXjR3S|欁mh\u0010$/ݾc=W]\rL\\WٽkK7'\u0015K͜>`9I̞dmٻ7v\u001f^kB\u0015Kn6yRɘEf֜E;x\rݽ7\u001d>z\u0013'n\u0005&\"9\u001f;z\u001b޾bGEsfULdZ/[pɮ7\u001fλ^`ヷ\u001e}ߍ{w]RذjV9ufd-Z:ؼco[/?O|>\rLLO|y\u001d\\޻csz6Kesܐl{7~G>\u000f< 0\u0011=_#w~oߖlXd\u0006e\u0017lܼzW\u001fyGGկ|?ynصy\u0005ҙ*\u001991{5ѥt\u001f#}\u000b_7=㏟\u0004&\u001a9\u001f{_ͯ\u000b#w\u001ch\u0005gKLmi[b]q[}o~{O<3\u0002\u00133O?͇w\u001f޽ۋV,lk_2d\u00166;͓O>\u0017_zK/'O~_~};\rR2\u0007̜+;6z;>7_w|\u0002^~sO~_qݻ6u\\<紒9gɪͻo<z+޳/\u0017ի\u0001\u0013ӫ/~ҳWcw\u001eqUK\u001cP2*%eO>~\u001f\u0017zׯ\u0006^kOķOu{ϖJL\u001bX2ssO}kԋ?kw\u0007&~\u0017ׯ}Sw\u001fU\u0017o<A%TJ{Ǟ~o\u001b\u0001LDoW?\u001e{NYڰd\u0007\u001ey왗_yI_`\"믾3=}?l|G\u001eǿx7C*f\u0018\r\u00037~~g\u001fO\u000f_2\u0007JD%5W2\u000f~[G*GKf7\u001c\u0018'%J$%\tdNR2hP2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001P2\u0015J\u0006B\u0000V(\u0019\n%\u0003Xd\u0000+\f`\u0001ؕ#S2JGF*\u0013~S%C`bJO{byǿx7$\u0015/~̈%S>q}?3/{?f\t?߽+/?wωrd-W?^~߿!E\u0003L@oW?<Os|Ֆ\u0019X2SMtn}]\u001f'_/_{=01˟|[l4%3u@ɴYs\u001bΏ\u001f\u0007گ_\r01+?y\u0007|͝+i9d\u0016pӮ?8o?|_kD꫿+?}?ص\u0007̤-mr\u001b\u001d7g\u001e|?x篼\u000b`\"z啟'/<o?g>\u001dܢŇ\u000bW+^v\u000f'?\u000b/򏁉_|o|?pˊV,=c@L1{kk>W\u001f򩧟y\u0016y'[?W\u001f>V+Zs3YLo삍|Mr_~yq$0TǾ燾|rӻܼeZOtVd*e.Y!~]_zGģb\u000e\u001f҃CGmO6\\R}'Tɴ-\\&زk_\u000fW}\u0007\u001exA`_?W|X][5\u0017LuU\u001b]{n=rG?Owߧ>}#~#7*nXl~k9oLyg\u001f;쮻\u0017?ヷ;lK7/_4g)JƼ9uޒӮ]ޛ-O8q+0qcGS{nvWW_sޒye}Lۂe5-v]w߻=~`\"*޷]۶\u0014;-h\u001b-3,Xz^xѥۯy垫\u001ajϕ;~E`CyK\u0017̙u\"cJfҔifrΰ.ڼb`ڲRR\b;ׯ^y\u0012S1\"_256oss^΍Dqϝtἶ1g3R3S[x9˭\\j$GyYx֖Sb\u001eX1f9{f̜5{μ\u000b\u0017-^dɒ$Gŋ\u0016Ο7g3Ml*洒lӦKմnk#\u0002\u00139fJL6udӕ^1՚1U#e3e&0qI\u0005̐r1R]b\u0006WLј2e1\r*\u0015  2TԊFFf\u001c`Bٕz\u0019`Z7\u0000j0tV6\u0000F.\u0017\u0000\u0000R{e{[[hmiY[-rXkUrSƮcǷ\u001f:pБc6ۂk{7V>v轇\u000eˍ\u001d(ܻ.wڨ\u0014\u0006IG1 \u0011\u00074Nz:\nP\b n\u0003Gzz;~v\f{m6}_s{!;\u000f\u001fϭֵso{o?\\\u0007IZ.Ž\u001dt/\u0017\u001d\u0007B`x'*\u000f\\]7\u001f}_\t/2s]-'_?:4.Dq))\u0016 Ι\u001bX|1-\u0004Q\u0016Q\u0010%a!.RqT+g\r̿%\u0017s|3L\nq\u001a\u0016Cg}Gq\u0018Q!0\u0017\u001bJqTJJ=̍8\u001fBߣʍ\u0007Z[RI\u001e5´\u0018\u001as֖t\u001ba\u0014\u001dQؙFA)\r\n4'\u001a\u0014 *\u0004ibVn\u0011%II8ɇb\u00077\u001fyI>NB1kF\u000f<z1,5ˠr\u0015\u0004A\u000f\ni\u0012'Q15\u00196\u0011\u0018I\u0006.\rCɨ\u0010\u00178\u000eJwI\u000bi\u0014rxiPlEi)LR)$H\u0003\nBR]3w< pŅTWᨻ˭f$ \u0007Q1,RP\fQd\u0018\u0006;x!GBg1\u001fʣ8\u001a\u001cō>h?Un\u001coyTcVn\u001c|@l\u001bh=r}kK)v]n;+\u001frz̒tѽ+{׾ܲqߞ26n-\u001fxK0\tX(\u0011I\u0016\nۃ|Zȗ$ \b${]\"3\u0005nل\u0006L\u0018=-žm\u001ejI3G{P1AڻC̏Y\u0004G\u001a-I\u001a=ۛKj61[u7?TQ)75\fQ#p3SIױce>u8~$W\u000ej\rOuv){ޞ+{o! _\u001ca\tg\u001c΅A!8\u0003\u001a\u001d\u001cagI6\u0019S\rU\n(\u000bAR?+\u0003 }<l&0IJE\u0019$W\nl\"\u0011(ȟ[\u0002m\u000e$z\nXea!G\n´Tڤ4\tR\u000e\bs[$S\u0014H$PʑuSgYs9TR8h/\u001c[\u001e\u0007Û͂[>R*j\u001c'wF5=8n4=\u0006F\u0005]4_,3I5z\u0011\u001d)+O|_~\u000f/}/T'rK'\u000f|0'ǬY2;bj\u001dwߟ[kvqS \u0002\u000fBp\rnI+\b\na\u001c\u00192jpK\u0010uF,`BP(I/7\u0004L\u001fE\u0019ROB({\\\fL\u000fr\u001d__)TzP*8W,ʼ\u0014Er`\u0005Ũ\u0010\u0007`j[.5c9n`\f0\r8W,\\S.R%fٺuu\u0014'۹փ\u0015\u0013b\u001c=&Փy҃I\u0003#WX\u0017|!\u001d\u0007֜0\u0016e]HXֲ4ˎi@FDcvJ2\u00193?Y,尗':МC\u0016\u0003YQ̔%%5wICҾ̉g,1T\u001a͉g!&1͛oY\u0004)G3\td\n?T\u0007P.ePw\u000e@ԜeD\u0018Sٴ W_3]i6\u001a<U\u001fĲ\u0004]\u0013r dީSxڍr\u0016}(\u001dGn;ڡ!\u0007WdVt)\fYA´o\\_\u0010yJaiCc$yeXo{;߻pO\u0007\r\u001e\"~nm4C\u000foGN-GXI(.iRAdNBJ2\u001cd\u000fD{\u001d=\u0007XFc@Q.\u000f\u0007狽!^1YTR\u001bA'2\u0003JyIIHD$%ʤ-L\u0014BZ}\u0001Z\u0013RF.+鷙r\trrAg!w[\b)\u001cyTN\u001bd!kM\u001eQuL\u0013~e/a\u0015\u0006%NKJ<CaI6\u0019Ic(C(Ǩ4\u0011A8Ķof[x¢J_/C\u0002Cr\u0014\nH&a\u0015F\u0015e[N)G\u0019h&Rm̶>(\f5%ӭ׶5!#2Gy^k8Ķ\u00161 mlQ\u001a\u0001 \u000f\u0012YKK(r \u0013\b:\u0011\u0003z#kX(YȚ\u00132\u0013S}t_\u0005\u0014,C#PjP^3\u001d\u001a&*5*\u0015\u001a$\u0003OR93GRܙO\u000bƲSǖլS\u000e\u0002<DN]\u001f)~fkB{\u0004 \u0017j2\u001d}e=S)=4\u0005X+O4xSf\u0012WhpFQyR١;x8\u001f)\rQQwM߹#ѶJfS62oȂ\u0016KH\u000bԚ4RQn\flEN\n#6iP]V23 i[͡7Kգ$MmAҏ\u000f#'xIR\fM\u001e}s=*~IT/>LȞ-\u001ec=*GS)mtIbB\u001b=L~M\u0019|\u0006\u00195Ӡ\u001dS)wc$OtaMP\u0016\fk01!*߼\u00165T\u00187<\u0006\u000742\u0011H\u0007N)TL\u0005q!\u001bݣn\u0014a!\bb~Sш\u0007R@*u\u0013\fzB;dMGҨ\u001dS)u;w1:0m?w\u0005Q$,2w6_\u0016\u0013ӏ$,bmh-'Rb^wv?Hjg0ql\u0005H\u001bgc:npIfgH;[\fd'⾓'I8J%DKkX\u001cN\u000b\u001d򸱜;\u0014\b9Md\u0016\u0007\u0002s2.gt\u0014Js\u001b&ΤTcRN?Jg-gLr\u001e^w\u0003\u001akYJ?$y\u001d:g^J4P\f̋+\u0015Lέ%3\tIe6dc195/\u001d\u000e\u000eʛzey֭]\u0007\u000exG͝_C>\u000f2\u0006yH:ځ\u0010s\b9:B\u001bH|bT(\rDΞ-6\u0018OdVK6m޼N)2}\u0014PR#wC *%'-K)*$#䍦|mǎrK_/Rd9f1\u001bɱ\u001fm?\r\u0003o\u0011\\Hr&&椯\r\u0016ͫ%9NG<y4HzTN;Ĭ?f2os\u0005}d\u0015tؕNյNf|93oPFi,TP2~AJo>Ĭi`\u000fq\u001d\u0012$v&a\"N$HQwTN57J6o귤XÓ\u0002*\u0005\r\u0019|J2x?L\u001f)#\u000e\u0001u[yU8-H6Pze\u0005I*6=J\u0014];\u0003Yc\u001f\u001baI\u001a8\u0018Lw\"[,Ik\u0006\u0015&ΉlT]6e\u0018~Ŝj}#:&h\u001b<ܾ|*\u001d2Ȭ)\u000fn\u0016b\b\u0011a\u0003ږJcݤNh<MP\u001cĩ'I\u000b^UEvX\u0016W\u001f=޷V$fEMSBo\nJi\\4)쀑׊\u001a\u0015\u0010Ϡ\u0002j'{\u001fJfMMQ\u001b\u0014eYEN\u000edxFG\u001bMwwok|c\u0014o7_\u001b߯71x˼Y47\u001fhIo}\nsْ1y3yc<c\u0006z{cpLD7\f}fH?m\u001dFfz{d񆺜@G6yտQ~ڇ{ԇ7\u0007|Xn7Gz<ڀw+\u001f\u001ex톁t\u0014\f~\u001f{wO{Q\u001d\u001fp[[\u001f{'ŎpF(!+q zK+r`M8dKP1~}vW>anxa\u0011!n\t&<\u001d\rtM?m\t\u001f\u0018n/CnBv\u0013Ql¨K\u001e\f{@&j>\rklX\u0011m\u001e]GOBJ\t={}m\ri}\u001b*Y6n;rRהIim\u001aI?;ް?H;zrS葎|ߙ\u001ay8:|d_I\u0015i4oߛ7SS7M[zƯ5]qGD˩\u0003rS\boW\u0019y3&\fM_3F}{ߪ7\bxT~oxԿ\u0001_X[TgMFކN,g\fn'\u0019EwF\u0002j\u0010\u001bMWѬO[\u0003`kSFxF|-y\\}_\u001ao{\u000fLc7K,F~\u0001`\u000fv1\u0007\u001fĪo8j8z\u0013ޒ\u001b[f7VH-Y4#K`b.17-1Clo&W\u000f~\rQ<'j,\u000f\u0015{F\u0007M~\u000bw\u0017 O\ns)\u001cʜks{̓o}}̑\trhmٸC\u0007zbknU-&\u0003\u0010D\u001c`2\u0014s{\f\\fȠXe}\u0019|\u000fs(ͥY\u0017M>Ctە7\"\u0014*Ǹ^üj)'3u \n-v<c\u0012?x'ñzA\u000b/SO=d4$q\f2\u001a>Ogٸo\t\u0019\r\u0013$%Us}\u0013%c\u001b&s2\"4-Oc\u0012>ch.\u0004\u0019y\u00115AFÇL5rK/0!HRc.{<e<%c\u001b&s2\"4-O?O$\u0014\u001fh\u001eͅ #/B2}3hx\u0017x_~yܷ\tIG}K*}G\u001f}TZqߒ\r}9\u0019y\u0011?\u001dx,{\u001eͅ #/B2}3hK/=r=[BFÄ#IIj%c\u0015?|Gui}K6MdE\\^@\u0017a}3hx+$$\u001dI9MK/}]en2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋд<I.c\u0012\u001f>sch.\u0004\u0019y\u00115AF?/mոo\u0006\u0019\u0018ӕU[GH.mȋд<0&!s쓱z4\u0017\bɨ^\t}\u0019{N:{3ht$)ImܷdBryM\u001a-\u00197\u0017iy\u001aאOF^3ވњQs\u00022?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"4-OO<{O<1VB\u0017!\u0019I^\u0019d4|ۿ\u000fzjܷ\tIG}K*'\u001fyǾqߒ\r}9\u0019y\u0011o\u00119X=\u001b\u000b_5[1eJRJ_FИ\u000f?*'CdNF^д<=c\u0012OO=X=\u000bAF^d$yfLK%d4LH:6[2V!H\u001a-\u00197\u0017iy\u001aOP\u000b\u0019y\u0011>5Lde_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242~\t}9\u0019y\u0011*&C@\u0017\u0018ei\u0015e\u0013&s2\"T.OM&#/B_1(+('MdE\\\f}\u0003MF^bԗQWԗQFOȋP<5\u0019\u0006\b}Ũ/Lc/ן7\u0017ryj2\r4\u0019y\u0011Q_F^Q_F\u0019ݯ?o2'#/Bd\u001bh2\"\u001522_BdNF^7dE+F}\u0019e\u001a{E}\u0019etɜ\bSoȋW242?;o\u0017c}N>Ɛ\u001a@\u0011U)L^ \t\u0001s2\t!'F`IC;jw`rf$.\u00025wpM2d\u0006!́㱻~p\u0013\u0014>\u00048ڻU]߳Ovծ׳oڶӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\tH)Zx_7uo\u00026 OFǓ33cۧ~&6:۷S*NLDL~&7m$\u0001i=\u0016^q#QF\u0012,)Ѿk}OF'HH).+)ug^xF\u0012Ϳz](`#\tV9Ӱ-?'oFǐ:\u001b機ɺػ}ٟe=3Y/an#\tHi]}F\u0012>D5\ndyF\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002zڻ}{-~\u001b뺷G\u0001\u001bIFuaəi'uR*NLEL~&7m$\u0001i=\u0016^q#QF\u0012,)Ѿk}OF'HH).ԩz\rs\u001bI@ZO7oMuۣ$X\"OFǳ7S?\u0013\u001b\u001dCT۷YS?\u001b6\t\nG\\l$\u0001cHT ~Jg\u0014ܯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004o{-_uۣ$H:Ӱܸ}{U֩!uR*NLō[_{g^xF\u00127n^Y׽=\nH\u0002\u0014\u0014ɋgz*&e#\t@Rb-ˁWo\\׽=\nHW/EO4lt<7n\u001b{機aoqT;3Y\u0017~5z\rs\u001bI@ZO\u0004\u0005#.61$Q\u0010?%3\nW\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u00127^7uo\u00026 OFs9V}[~&6:IT;3Y\u00177n/9著z\rs\u001bI@ZO9\u00161\u0018$_{S?\u0007c̣F_\u000br՛7uo\u00026KS?\r\u001b\u001dύ[VR?3q,?Αj&k\"]կq=\"$ u}\u0011\u0017\u001bI@\u0018\u0012(\u0019?\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$ W^}-Luo\u00026'3\u0004raN4*ś\u00126$uC&_\u0011\u001e\u0005l$A\u001aש՛7sf޸uFqVJɚHd$ u{F\u0012~\u0011C5\n\u0004xFO>\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI@ZOZș\u001e\u0005l$\u0001Og4\tOF'1Kize^xSF\u0012nܾ\u0016r+uۣ$H:Ӱvf\u001bn8nJT;3Y\u0013޼/3\u00170\u0004yoH\u0002/bFA\u0000(\u0007\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001i=zZ+{{\u0014\u0004i^~\u001a6:\u001c/߸qa\u0013IT;X\u0017}__>3Y/an#\t\u0010^m$\u0001\u0019yF\u0012\"h\u0005,~W\u0004\u001bI@ZOz\u000f&$ \"j\u0014\t|Ё7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6^ys-|}o__׽=\nH4JS?\r\u001b\u001dO\u000e̗o8ӰщTil/~˧~&k\rs\u001bI\\O\nm#\tx3z\u0015yF+`\u0015_\u0011l$\u0001i==dޛ6\u0018Q\u0010?'3\nA\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI@ZO7n^\u000bs{{\u0014\u0004i^~\u001a6:nXu֭S?\u0013\u001b\u001dǭ[)j&k\"__ʩz\rs\u001bI@ZOZș\u001e\u0005l$\u0001Og4ki$fS?5|_\u001f\u0017ޔ\u0004$u{F\u0012~\u0011C5\n\u0004xFO>\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002z*Wh\u001bIkFQ\u0010\"(~u\rs\u001bI\\O\nm#\tx3\nbV\u0019ӯ\u000ean#\t\u0010^m$\u0001\u0019yFÅ<pՁ7m$\u0001r=\u0015+$5#(Yg\u0014N:$@Bx\u0004f\u0019\u00051+W\u00070\u0004T\b6׌< fEQ8\u001b6\u0000\n\u0015F\u0012g\u0014Ĭ3\n_\u001dxF\u0012 S!BH\u0002^3򌂘\u0015yF\u0003oH\u0002zzr;wΞyϞy3gw^{왏嗞\u001ftWv}akf\u001e|vw\u0013\u001fKt%\u000b;w?\u001f|bww\u001ai\u0018wεpn\u0019w^\u001cv/\\.c'?y҅\u0017w?qڥ+z3ugw>oO>჻\u0016/xs\u0017ǋvvϽ[M熋C;mT\u001fw/3;G󟶞z\u000bb>\u001e>m;5\u001b,,n\u0016Ͱ誦\u001b\u0017\u001fܽ矚ݳg>?=U]ݴS;[jaW?bkڪ\u001avX\u0016ӸKi\u00176U3dyΟ=nsu]oOc<nȺ\ruOTC[WSټ尽h\u0019qzQMi7ݺ|'\u001eti<Qm\\Ń_>{|4\u0018ۺ\u001fEY雱vvU42y\u001a+J3?\u00058?%z驖\u000fg}$qY&ywS5o|uk[\\Ο\u0018Y,C\u0017ۘrڵI\u0018)1L]\u000fً[}nwJl\u001a.nUSO|fk<q\u0018sc=.ڼd궙]dXSUg\u001dl&y}\u000e45Vy4V[\u0017Zlwݘ'<vyV|!Ϩk&mZQK.uS5\u000fv\u00128Oc>\\{NөL&0e^i9M\u0019'\u0019c?{Mjs4w3\u001f\u001enW',Ɯ6u>ū\u0013ʧ;z[vyf1_YS=en77MNn1M*gXW\u0015z\tk\\?n}W3MKO\u000bE&~kt1tӢ.l9![\r\\6cδ>g k1v}~\\>ue񫼎jZ$&/yu˛ٳY<z,&oxp\u0005?Lێ\\ۼ~֝o4-\u0004k~sVTMyj:-拭ϫmr\u0000OU:o2n`1u&V.Oᙥ~yB͢!]gٲWOwWC3_$]SvۚoKgʚ,{$XDΊ|ʷ\u001ef^#YƇF>{gaҵ+/]Zq+pzC[}]l\\ٖm<蚦\u001c}\\y5Y>*.b\u001e\u001b<'xlyFFr޻;X\\\\y2CΧ|6gP>\u0018r4*ι\u0015Zr.\f<x<B9-yl3vzs;t{wJ5l\u0010jr\u0010d_Sg;t^]Nմe921ΰy\u001e\u0003|{ه\"\"ǭ׳Ӗ/3WS6n\u000e[\u0004w\u001c@c\u0018\u0016sC>ݐ+'C\u000f7x\\\tٟ9\u0003<lw7[C\u000e>oUW\u0013|I\u0017@X,g0ϔ:Et侨`_\u0019\u0005M\u000e\t=M@\u0019!aXc,|.j\\djlT\u001f\u0000yFs\u001a\u0019sz\u000fE')W\u001cRf躼\u0018+a.|G8o硛\u0013q;KX\u0011csX\u00136ʛbUVeUry>oeE=,/\\Xy~bl[eVH;z>:HU\u000e\u001cyw2uso4\u0019\u0006\"o?P>;|\u0001.\u001f+\u000bCvU1%:\u0002ɶg)\u0017z>oz//{\u001cb.\u0005<wҞˤ-]E\u000fds&g啜un1\u000f2兴\u0018\u00045kl /y4i7KZ}dTe>l,rZ&\\M7\u00187?WSfjy樨ZJf\u000e'\u0017m7_=d\"lQ9\u001d23Qz\u0011/ȡW4]^J'\b;b\u0003!}\u00190k4/z$tc%Aε\u001cVz.\fyy\u001e?ŧw#6s\u0012͑6_\u0016ov_u9=;YE5w\\&l:\u0013Ք,9g\\fż\f|ugYuH_k1\u0007|Fn\u000e#\u0017\u0001\u0019³s\u000fSðA󋟜ev~.(:o?a~\u0019\u000b?[d\fM/\u0001\u0016FռB\u0016\u0019\n3zmU99\u0018\u0012\u001cȄ [+-&#SZ^t6T\u000bJSz\u0018Ka\u0007UpZΘ\\:\u0019jT/lWF\u00153MWb˨B\nMw:\u001do2N\u000b1<\u0017^B\u0004?_\"\u0017Sn\u001cs86ܝYR\u0016yXբWLy!gtfy92A34 X̫'8ﻬ0qlEƴ9:dH\u001f&9mp3wOiW+U>vS\u000f%]^YvW>J+,C\u001cd*'vI\u00163s:Ϸd?k\u0007W'k~e|K>\u0001yFcf\u0016l/\\m/̜g\u0016sl-1xY\\R&h:\u001d{]eWC|K~~ᕓ<3|R&i55*/\u001cx\u000b~\u000f'Y羰Z\u0002UN;\u001ftywG+\u0007'?\u001b.>sOo=g~eԭlŭg+\u0017VXl=\u0007b6n5y[m7\u0013y|y\u0016OmyMg<̙ǡh\u001f}lK\u0006\u001e}lK\u0006\u001e}lǦ\u001d}l\u000bF\u001d}l\u000bF\u001d}lǦ\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l\u000bF\u001d}l/\u0007i\u000f\u001fo/\u001c}.>|/x\u001f\u001bu\u001b>\u001d\u001f>_\u000e\u001d}F>|\u000b׼\u000fqk\u00078j\u0005w\u001c9\u001eR5qݗ\u000f]}h\u001dk}ÇqڋQ9wwzc?\u001e?\u0003]Gٿz\u000f~\u001f`\u001e\u000fy]_\u001dz?\u000fd\r#\u0018'?\u001fycz\u001bK\u0007\u001eo_y\u0002xaW\u000f{}ooc\u001fl>+W~wyo]4\u001fw-O}w\u001f闾\u0015/\u001fܧ~'wN~\u0017~\u000f+_ۻo1oW\u000fs|?/?˷g\u001eݿ헿G酟\u000f?\u0003ͧ~w?Q\u001f׿G\u0003]\u001d\u001f\u001f~iO;X?}\u000f?䱥μ\u000f'?\u001fί?x\u000frߣ{+\u000f<؏\u001f;O}b\n?wǿ\u0015\u001fx_˿{\u0001E{\\\u0007rƿ\u0007ҭ~O_wo}~\u001fa\t{^?Y`\u0007_o+paխ~grXV:խnuau[Vխnu\u000f[V\u001fVխ\u000e?nu[\u001d~XVDW\u00016_\u0000ge\rW6_w%\rW7?ذMlgCL\u001b7\u001b\u001f]۷?\u001az<\u001c?W.~x33{>Kw=Ov×.\\tε/l=5zݝ[On7Kt%\u000b;w?\u001b>Q_xZTЌS?;\u0017.T֓rՋ~ҕOo=qz;}v7'].|'~3_<VXw/^8wnws;}s\\bѶ\u000bn5\u001dX/3;\u001f;{fu~ϟ=Sm\u001f^,ƶkij/4uߵ͢\u001fiJ~m\u001aۦjkE5\u000fvGϿ3窪nƭ?7\f<sSoO}?b\u0017MF~uE5MUb*_ܑJ_oG\u001aapyjo/=O\u0005sc}l\u0019_+\u001dz3q\u0004?;b{\u0018ۺ\u001fE\fqJy\u0011g)\u0017mWU:)\"`vӷâ\u001bǺ[m\u0007^g<ꭷz/=ɳg'>ܧ>zx=y\u0017^zU۹S;W>}y۟\u0019\u001bO|^٧.]v^ó뾟z\\oCꃟkݹ|OkWvoEի~\u000b^-|q\u0016k's%K4{\u001b?sK;\\sE\u0014>\u001d79ܰ\u0018\u0007L$|pӶNs\u0007k~^O|fg~_ܹٗ\u000eN\r?|y?sk\u001f\u0003O>\u001f>Y#'\u0013O\\\u0017QSV͘ۦ\u001bM5ԍص0e\u000fm\u001cc9\u000e*W20\\<{?\u0018?ɯܷ比m=ܷ~m{|\u000f_)D{o\u0017󵷴\u001eC-#\u0015\u0015\u0015\u0015\u0015sڵɒ{b_ZrΏ\u0000\u0007q\u0017v?_xio^|[tZ\fCS/>/qvT5]tN[Or~K?7\u001fu|\u001b!_-rQ+jϧY\fՔ_Ɂ\u0018|uW5\u001eWMu7涝g[t[ܽ5yNf{ht\u001bWF5\u0019\u0017Wwy\u001f°iѷʛLQTmE\n;&q\u0018zozvz?\u001d:U=US7u[WǺ\u001ek3\u0005~\u001d-\u0013OM:|Os|R~f^\u0003\u000b?̇Rf*1cY=Nha1c7ԋv8).zJ1$B\u0017b{F\u001aR}č\u001aߨW_)X=wx{v|:\u001f\u0016Mv͡'o.~{\u0018<.A\u000f<=lwX;<ͻț-\u0017[9\u0001\u0004Wq)seZzV\u0011pu{\u0006f:ת\u0017gdC6EWC5ƑOLuCp\u001e[=V\u0003\n^\u001fU\u001cZ9G>׏4\u0007\u000e?%\u000fx6/\u001cL͏uݴ9\n\u0016?\u0002:Okk!\u001d\u0017'\\\u0005?w\u001eS_\u00196XyI\u001e{\\m@}=g/'\u0013\u001e>tWtyg)ڜ\rh\u001bW4uƁOzQU\u001f>ݟ~,zNl/i\u001ebQM>0\u0006bnU}A}b>\u001b\bx\u0017.|^3p:\u00182uΗ]7ɘzϢ絑;\rx)_iq|16 {n\u0016n\u0006i͗Vi]\u000eabOe\u001fct9\u001fK?sK/?~O|qᛡM\u0016!'\rx\u00139xj̒uə3\u001c9p\u001cj}b_\u001d\u0003\tPw}K9w/h2\u000fM[wu#iǹDSa\u000enًr-GҢ:̠6/\u001fy\u0002T>i\u0017\u0017\u001c7MG]\u001fx7wZ4\u001f=K&UMy\u001bH\\˗.\u001eǏ|\u0003=~=;\n\u000f\u001a9z^<MٓxSgZ[S;򽢷w,ۇ}ۮڪ<l~4*\u0003\u0019ba~;B\u0005[ϯC/\u0013=l'\u000em#3\u00072CCCM\r)2OQڠߴ8xŞ/\u0016\u0016BYX̀.O\\0\u001by}\u001csN}hk\u000f*vl~\u001eyb~=pE˓yvqjȵO^xu\u001f|8al/J_{K\bGyory..[f~e덱O\u0013\u000b\u001c,^8Pk\u0017s;\u0017B]8,.0\u0016Kc>xT~g~[G|lk/~άWL;HZU?Y*_m\u0019ްj绹Jqw߫{[9ͳXkgsۏ۫7Pn@if?\u001f4[5uj\u001a~vwo5?xj8V'>bꅵ̅W\u000e|}^52\u0016C?\b|\u0011=UcP9`4\rT'{6Q\u001bM^\u000b\u0007_ɐ5:\u001f\u001b\u0005\u001bˏ<֋e\rGp<a\u000fq߹u{՝~\u000fW\u000f8D\u0003\u001e\u0001녢0/_KG$zſ{\u0016i\u001a\r`V͑77>&o\b#or\bfovŇ'\\~-{\u001b\u001e\u0004\u001f&52]z\u001b_\u000b\u001a\u000f\u001a>ܳ\u0005-\u0007Y\u001eyM^>>//ׇ\u001f~\u00015Tcޱv\rȦ]\u001a\u0017S?\u001f:O<*\u0017\"ο܏J͸|&\u00177mo}x./o5l/UWMuVy,\u001b\u001fΗ؋|Oݑ7i75_םtGߨ\u001e\u0017cަˤ4,\u001fl|Eڤpp3W_p\u0016q9\u001fx/ήm[MasGӝSOp\u000f$՛{euFG\u0013t\u000eP9\u000eN:/<樢woMV%7>G^CyawoUW'ުC<'\u001eb,|폅Lc\r~_?[vr/rƱsΘ={o$\u0017\"áOd\u0003>at`P\t\u0007h2\u001e|\u0012gz'M\u001f陎Q~O?at\u000e}0\u001cQ^ou\ttxO[Q-<υE\u00023\u0004_\u0011xҫ#>aM\u000e>\u001e\totBl\r_pl\u0007}\u000e~g;\u001e#?atOO\u000fzg{C?g\u0001QͿ3jjrEOHqBUf\\\by7\t~qTa|F;\u001féQPO}'A\u0005\u001f*9\u0016:\u00078\u001cv{c\u001d~J\u001el^8~0|>Ezیo\baw\u0018)dOʛQ75WM㘃&|%{\u000bn޸ˎ~(Cat\u001bE;leƃes,f+w'*'c١z'\t};嚛Ok*__\u000eO[nx8̟{I烯/\u000bs!3s\u0010\u001eO\u001ao37lE0;\u0016qfN9Ke?\rO̍ >|\u0015P0\u001d~gj﬐C\u001dwy\u0013-\u0003eqE>ir<gn\u001cFFi\u001en}|&Gh:@^\u0004I#,׿#i͗l\u001dŹr\u0013\u001f\r\rI%!!\t'\t4\u000e!\t(oc'ɡα_\t7Uu\u0005\u0015*\u0004*\u0004\u001foU\u0015U\u0005$Z\u0012jiU\tPU$\\U(E\u00056\u0001gv\u001c\u001f1^Oxvvg\u0018\u0011^<g~U\u0007ݐ\t!uj_x8\u001d\u0016\u0016'a\t~YW\\x4\u0002iQ(#Lt\u0002@\fEд9r\u001a%ݹc$}u~7*ǎi\u0019(t^\bNB\u0006r쐾􍉤o(\u00079v{2i4:_ZR\u0006@\u0016!~mH{5j\u0013ȱ&0\u0014U-* VvX'<Q\\F;\riDS^٥\\KkКK۩˚(\r5my\u0012d3B'1mWƽPLYh3#t]hxA\u001fZ)1\u0015mdbrT+8J\u0013VVPղzVZ\u0005!N!E\u0013L\u0013l<)zL\u0013xRj[\u0014=!]ad\u0014\\:+7o-[Q\u0018d3Os|oS\u0004\u001b=E?v\u001eGI{\u0010WsmWlx)zn'FK'\u0010\u0017q9JIsl\u0014=^)zƪSjuwgN6EtoIh:E\nmYmq\u0015=夸1SHHѫ\u0015W[+\"k\rSh\u001bTN\u0013a\u001eɣA^M\u0014\u0011FMѫ\u00153\u0017vy\u0014==)z#\u00044j^tԥOj]^m\u0014h\u001dM\u001e#EE8\u0014=a6٦mפ;c\u001dc=\u001e\tTu@2SH'ƑW[+\"4Q^\u00106J#3iGv(EJt^2S_%j\\u\"\u0004T۝\b17\u0018)zQ?\\Cl\\NTI\u0017\u0015]c_ץ\t9\u0014Jl;vtnJ6SHj\u0019[\u0017\"S\"vGk\u001dkuCm^:6/\u00013]\u0014@\b\u0004OᚩHZ\u001a\u0014=2\u0006)z5*v:*Jыbxi\u0014=n6V\u0014[l&\u000bѺDmD[\"\u0019E1$\u001d/EOW\u00122\nqx\u0018R:Rhw\u001f)G5ܯO4EO\u00029$\tY\u0016vr\u0005\u001dw(9m&-yr\u0013\u000eT:-\\O\u000f\u000f߀gQN/:\u001dߑ)7\u0014:\u001a֚\u0014=\u00026`\u001c\u001aG9$iòt#\r{qRt\n4B@a,Ü:@:Jm6)k5ؿ\u0016K\nj\"\\EƯ3V\fHm=I:\u0007]CTg\u001f5EOD|YKty-*o0EGeL)z^<1Rt\u001dŗz\u001d>ZK\u001f\u00107Q[S'(Fjޅ\"AV|$9}֥*&3qe|{h.L4jLj\u00115T9#R-MR\u0011F_nδm)\u001c/\u000bќ9`ժAa\u0015̐\u001bv\u001e\u000e+(COǯl\u0019n}\rˡltvd?\f@\u0012 \u0000\rt\u0002U\u0007)\u0004\u000e\u0006T\u001d\u0010(<H\u0015v6 m@A\u0001\u0007\u0002\n\u000fR\u0005\u001d\r(<H\u0015Px* U@AT\u0001\u0007\u0002\n\u000fR\u0005\u0014\u001e\n(<H\u0015Px* U@AT\u0001\u0007\u0002\n\u000fR\u0005\u0014\u001e\n(<H\u0015Px* U@AT\u0001\u0007\u0002\n\u000fR\u0005\u0014\u001e\n(<H\u0015Px* U@AT\u0001\u0007\u0002\n\u000fR\u0005\u0014\u001e\n(<H\u0015Px* U@Atw\u0004)*/\u0000L9Px*>\u001etw\u0007):G\u0000L!\n\u000f\u00073Hm΃\u0019\u0018\u000e\u00073\u0015\u001ej\u000ff\fQu<\u0019LHۡK<UO\u0017E\u0001aL]&Yfdf\u001aus6_p`~9Q5{NSf\u0015+WZbLӜٵ5iѲUkgf&ͮ_j٢9FN܅KWX\u0007L;ع3g^pnϞʵ\u0003{\u001f|葓3G\u001ezҁ[+\u0017͛=<s\u0017;\u001fO?wS=\u001fV,;b\u000bnS7\u001e陗^}3sҙ>M]lﳛ'N|[\u0017}ofΟ}\u0013wߴvip\u0017\u0016w|\u000b\u001f\\L\u000f.?;EjZrKc^}\u001f~4݁\u0014ч\u0017SҲ\u001f*/k>\u0003֪\u001cy_6Wz\u000b\u0017gi\u0017/=x)v^g5-߰ާ_:ݱO\u000f?8ܰ\\k+\u0007{\u0014L^}l|Zg/Xi\u001f|k\u0017.Mw>\u0011.]xC\u0007\u000b\u0017rG~q4;i~Z\u000f}ʟ<{)\u0019{9W1t\f}{c\u0018:>1t\f\u001dC`\u0018:p0t\f\u001dCg8\u0018:⡧[ߴz*RK\f4ͥ8[29iΌNq>|\u0005ﾤ\u001bOJ\u001b\r\nendstream\rendobj\r31 0 obj\r<</Length 65536>>stream\r\nONQǝ:ZZn.lLLKPa9r\u0003C[b_\u001b8a2f.xƺAU\u0003\u0012\u0015{\u0017tu=v;VmڭV'[Us[ŕU0-\u001dZo+\u0015}==C\u0003ac][FQpaw߾}\u001d[GF[GiX9ױ;D3KvVqy%vV涫\u001f\u001bA՜1\\9s9Ì\\q'5Mer\u001d)\u0005\f] -aJe3!JU`̕*tLO:OPO,\u0015mخ͙VGT\u0015\u0002uTJ.7KJdu5;k\ntMǥA4ͬ䶑\u0002V\n\u0018X\u001d)n'PS~AA.pF>*l\u001eNX\u001cG?/(\b{[.\u001bY]3\u001cFJwHxYaIOɵ\u001cNt\u001cGR8\u0010\u00035+lZ9rL=oe2˙-?44:s\u0019a݌7؜לqu;+X[uѶohw!7S\tu\u0002zv4\u000e\u0016sp(\u0016\f8\r&\u001dŞ#-={l(b\u0001kw߱R\u000f]+c{;/߿o}\u0003@ͽ1\u0016-6Տoso_w\u0017\u0007\u000bl!\u001b%%\u0016f0^O-\"t&5;Jš{1g+\rM$.&)\u000es\u0013ELbNy\u001cb\u0016J\u0014/WuhPۋ\u000b{x]ހwt\u00117Gޭ^0;Z\u0018aq[m)ࠕf&/.Ӈ\u000b}\tB1ť~(Ҋ*q0\r:af\u0017vu\u000b#oG\r=\u0019Y^\u001cik\u001dPKW\u000bEsBZ7T)툆;_qEhRΈ\u001ePE\u001dRKWi\\>(\u0000^\u0006^\u0006^\u0006^2y\u0017,*ܱ>#\u0017\t\u001b(?#]u];\u0007\u000b\u0003\u000b=]\u0016Nt\u0005\u0006r]̲\u001dq1)+vNiUQrJ2\u001auR_tk/omߍMG\u001eߕ1wfR$7\u0015\u000e\u0017K\rT͙-|a7\u0019;3\u00073Zi'-a|6#\nR2\u0004`_٢?TA\u001f0\u001bcY9ّ\u0000$>\u001e\u0005\u0001sN @Aڀ\u0014\u0002\u0007\u0002\u000e\u0006\u001d\r(<H\u0015v6 U@A\u0001\u0007\u0002\n\u000fR\u0005\u0014\u001e\n(<H\u0015Px* U@AT\u0001\u0007\u0002\n\u000fR\u0005\u0014\u001e\n(<H\u0015Px* U@AT\u0001\u0007\u0002\n\u000fR\u0005\u0014\u001e\n(<H\u0015Px* U@AT\u0001\u0007\u0002\n\u000fR\u0005\u0014\u001e\n(<H\u0015Px* U@AT\u0001\u0007\u0002\n\u000fR\u0005\u0014\u001e\n(<H\u0015\u001f\u00000|\\t\u0005)\u0007\n\u000fR#\u00000|\\t\b)^`\u0012y0#\u0019Cۡ`1Ca<\u000e\u00073\ti;\u001e|z|9\u00003ˤ0k̬Y{ܦ\u000b\u0016T\u0016o;'jfi,^b3U+W,_i3v4-ZjvıkW-[4g)p\u0016+םt{\u0007;w欖K\u0017έ\u0016]Vrt\u000f=rrfC\u000f[:pX{y'}\u0015tGN>339}깧wt݊EsgU|mc?=ҫ{}frW_:Ǿѽ+\u0017}vҵ7uĩϞ»L޽/z.m\u001dNo<>჋>\\'qX(YMZnԫoÏ;B>oz[Z5CYe\u001dO_><pG?O}Z/J9{L\u001f9ⅳg\u001e/.֋\u001bvK?p;\t\u0007_zޝ\u001bk=\u0005sI֫=Ok\u0005+\u000fz¥'¥\u000bz蠽r\u001eU/ν\u0006}'/\u001eU\u000bVg^/%C3'j5Ow>\u00110t\f\u001dCg8\u0018:c3\u001c\f\u001dC1\u0019\u000ec\u0018\f\u0007CS<sK_OqVEsiRA漹\u0014gK8G6͙)·O ݗ\u0014)s_)vc82SGKͥ-ސלڜiu]T\u001b\u001c*\f4gvPQW[n`hK1?T+y\u0003'v]ƌ\u0005X\u00174sxX=y.o\u0016\u000bil[Cf\u000ezC\u0005;\u001drEZo+\u0015}==C\u0003ac][FQpaw߾}\u001d[GF[GiX9ױ;D-u[HPA\u001c\u0006)i1=\u001e:ԣz\u001a\\o\u0011\u001b_\u0019\u00153ǚ3\u001fw_Ym9umc1Sk\u0019f'kڦLrfK%\u00054\u001dE\nۖktz,\u00045eplvͬm\u001cmδ:W\u0017+Rt)\u0015^jU\"YS\bƤk:.]\fif%<\u001f\u0014p?R Ĉ\u001aHt;a]\u000e\nzu3Q\u0015fv?yAArA\t0RCZƻ\t4Mz\\4\u001fLI1-N$p$\u00176w-\u001ci93lʨ5gqw3`sf_s5֭7:?G/Qm\u0005Fێ݅|@O'F\u0012\u0015ҐW:[hoRTZ(\u001e>2\u00144jw\u0014{W\\`_ﱡB\nUsc\u001ev^GQݛ\u0006J{c-\u001dl\u001f޾W.\u000e\u0016&\u000e+C6JJ\u0014-``[D-j*wCEc^πW\u001aI]LR\u001cĻ'~\b'#9\u000b(]-(_0Ѡjgٙ\u0007׷\u0017\u0017\u001ct{\u0001`%9UnJ=\u001d(\u000f:oN\u0011\u000546yv>I.&ocB9˙X\u0013#cIɭ\r:Xaf\u0017v\u0011\tlu@ӜŒ!tչ$]49DOuK؎i\u0015פ&\u0001\\\u0014At\"\u000buuuu.\r\fxB\u001d\u001b3-{k3r=}݅\\۵{0pukDWPkpLW\u001c\u0007v,a[J\\\u0002mLʢkK\u001a2FJ}%\u001dwr}U\u001f\\J۱\u001cjg.J(\u0017mY*_pM΄ɸޯ̵]n+hT/Ƚ6yj>igb2k3EB\tJvѕj\u001ff\u0005E49I]8.wu\r$ik4no+$OvL7T;\u001a~%\u001c5cd׈\u0018Qmzv^\rhB0\u001e|Ա%P}&lI\u001du$\u0005\u00111W\u001d\u00045GR=\u00108h\u0018iXY|aZA̖!\u001a&Wa\u0016؉,;٠[.1\\\u000bB \\\u0016K)2-u`$Z_]t4Ѡ<KCi+B&g2Z\nK\u0017\\Vp\u001a\b-$kmj~FIc(u\u0002s$m\u0014hc\u000eSQ\u0013e۴\u0018ю9sL[V\u001bedkAq\u001e!US/Q$\u001f]'n%s\u0004Sd.)G.&\\BzP\u0003\rя&Gh\u001fHҲorɛ\baJ}۠6-\u0014\u0014\u0014)\u001a=-X*\fVorbe7\\\"6U|Kŕla\u00124\\ mR\u0012}\u000e;|\u0006Kn]$?Vs\u0019\\\u0012\u0005V\u0011\u000e\u000b,\u0018jqUcVv\u0019`\u000e\u0007}6mǎ\u001btz#}X\"3\u0015i\u0000q3?2m\\\\\u001d-\"?tLLqiD\u001dv%h\u0018{,k;z\u001es?E@s\u0016XtRzAȡh:X<78XM,l\u001a\u0001\u0005\u0014:S\u0016\u001e\u000bU^J%A8'H(\u0003j\u0015\"\u0019ʨ\u0003<82\u001dvxGY.Ŏ\u00145Ij>%~nz9ptn+\u001dS%,n\u001aÃ^)\u001d[\u0007]\u0014vX^&K\u0012mq\u0002\u001dA\u000f#u\u0014\u001b\u0016\u0000\r?n/cDʭ]e9\u0011:\u00102͑}\u001bPG[{84#O=áx͔\u000bFp,4G\u0010\tO\u0016y\u0010\u0014ꓠq\u0003ѦHZю]\u0013q\"48&G^|\u0006[P \u001c:\fKG\b3A1ko\u0018+\u000b\"\\:L\\ꕞ\u001c+\u00054NHAUT\"S\u001aC/m'6_[\b=ڤe\u000fA\u001cjJک\u000f\u0017=Q^H̚opG&|X'>mg\u00123yͧ}\rtAvy>Rrhnv26y\u0003\u0013\u0017t8\u000emt˛NDޕtmN=*\u001b6\u0016eHKzy@ӧk?<;J=\u0005\"\u001b8Q)!7Jz`Z)i[=hOU>Vq\u001dS\u0002>>\nSƶP\u000f\u0015ZUZZ)\u0002)R)d'ϭ(\u0019z\u0014Hxۯ3x}\u0004@\u0013C`*\u0016mLQo\u0018\u0012R\b<xR]Z;z1.5;vsWscegew\u0010Au%FA\f\u0012G%*\\%e\u00078\\\u0016YnD-Rz2ґ+:K]N27\u0011\u0000\u0005h7P(2TG\u001fӎ#ɦ%q/V\beX$Lub@Z)\u0002\u001e\u001aom?-׉R'ʶӢnu,dpIZU2)!{Y[\u001fY3[C59,KG\u0004X7\u0016\u0007#+6\u0002ّxQv\u001afu2\u0011Y:p\u001dʈx،R:bRϸ\u0019\u0006k@R1:\f\u001cO\u0010>\tY~\u001ea\u001fS%aZ3\r/\u001a[+4#\u0015w\u0007:djvD9'1p\u001f\"7Q>ԉ\u0002)ksr6Epάa\u001f\fﳍf\u0001s\nw$H\r\u0017f\u0007Le\u0005\neѕzu%:t+1W>-+k\u0005nٵj,\u000bZ\u0007/\u001a鍬d\u0015+Zv]G\u000e9Άc\u000e\u001e!*pQr)KQtE^εJ,7+a-V\u001a4fQ\f7Q*)R\u001cb'b\u001e\u0000Ha{ÃƇe\u00133T&\u0011d\r+HMq4g\u001c+p\u0003\nN\u0013[J8\u000ffr ~0eŔ\u001fb\u0005O2\u0014u\u00199ܬ~F\u0018UO\u000e\"٫T\u001a~Yqs.pb\u001bc$~\u000f_N\u000er#rjkD\u0018?6+5\"FT_V0u]\u0013n9cDY84$/ءa0\\2kv\t\u0018\t\u0013ʹ\u0011VdQmr.\u0011\n\u0012qliWe],[$$-5mz֗G\u0018+F\u0011,_\u001dZm[2s\u0018=ʦEPҾ,\u001f\u000bj@'X\nZ'\u001a\u001d1\"\u00119F\u0015ʹD$\fÇ\u0017^Y{8量1\u0014DqmymQč29K2rL#ک\u0013(\u0012̏.\u00189Fh5r\u001c2\"'b!+\u0015\tKgBH(l9FP)Z\u001423)+t:%GEcqP\u0000hw?ѦiY3\u001dN-+<TR()(V\u0007)K\u0019BD\u0001CQ]Qh\u0018Ab9F4ǈI>ҪHΟ\r@_\"wϡMAզ q\n\u001d>\\ʌݦ߸>vL&m$\u0014*aRȤ\u0014Ω\u000b\"hrVtFޤnp[l3<`u'\u0014}G9d\n2Z\u001f]3#HCd\u0016Л\u0007Z]\u0006\"R¡;4TW?\u0019\u0017\u0016bвQ-\u000b\"JYd[\rӊ0^6grÇ:\u000ecdP\u0005b\u0001Io,a)\u000b#s\u000b6^\u0015\u001e6&\u001cKq>Rv\u0017l\u0013\u001eZ\u000b7A$$h\u000b{\u0005kˤ\u001d+\u001bm݈y.M_\t7o\u001e[]ԟ7\u0015\u000e\u0017KCB_nδm)\u001c/\u000bќ9`Enr\rW\f߉#a\u001fe\b}u-\u0002\u0010u~3n\"LgGf\u0013!\u0000\tb\u0011\u0000\r\u0001%\u0007\u0002z\u000e\u0003\u001c\u00079H\u000fs\u001e %@Az\u0000U\u0007)\u0001z\u000e\u0003T\u001d\u0004:H\tPu\u0012 %@AJ\u0000U\u0007)\u0001\u000eR\u0002T\u001d\u0004:H\tPu\u0012 %@AJ\u0000U\u0007)\u0001\u000eR\u0002T\u001d\u0004:H\tPu\u0012 %@AJ\u0000U\u0007)\u0001\u000eR\u0002T\u001d\u0004:H\tPu\u0012 %@AJ\u0000U\u0007)\u0001\u000eR\u0002T\u001d\u0004:H\tPu\u0012 %|\\f;\u0002\u0014q\u0015\u0017\u0000\u0010:H\t\u001fd\u0003q\u001d#\u0000zUGC\fc\f=\u0019CC=\u00198\u001c\n\u000f>LTɡ$5\u001ctc\"5kLf֬QF=gn\u0005\u000bg*\u000b7͝S?Y4e\u0016/_rɪ+/4͙=r4-ZjvıkW-[4z.X<ug\"Ν9eՒ\u0005sg\u000f܅˯7\u001f(C<Ѓ\u000e̯Yp/X}}\u000f<sN>ӏ?зs\u0017}vӒkn?Oϼk^{՗?7\\iv8V}.\u000bo?_Ջ)մG\u001b|p҇3K\u0017?x?<h-˚ɬ\u000e<x\u001fMw\u0004=|x'\u000f\u001cVeK⵹gξsq&\u000f[wΞy[X/쳚oy/ؔ\u0007_zޝ\u001bk]=\u0005s5'\\O[>~b>\u0017\u000f>t\u000b[\u0000.vꡃ\u0005z\u000bW9#8tw\u0011Y\u001fj?yR1^?s2Vc\u0018\f\u0007\u00031\r\u0006c3\u001b\f\u001c\u0003g6\u00188\u0006l0p\f\u001c\u0003`\u0018x*\u0007wg}[͈Hm\u000eLjқ沦7{9Bzo!{gاˀS(N\u001b--7zxC^ssks%awQnop0МAE]m-P\r0u\u00193v\u0017^c]PӠ*΁b\nz\u000b:yʲm1PV*\u0014Tkù7b鰱.-wۻ[o߾-#M4dۜ\u001d{V6#E\u0014\u0005Vc'yd\u000f\\\u001f\u001bA՜1\\9s9Ì\\q'5M\u001a\\GJ,C\u0017\b.mKRL\u0012*s%pm&sJ:=*ӟ\u0013\u0019:Y\u00069k\u001bG3e%/ۜqd\u00141階+\f8L%UE+,u<ݬV&,J\tĚ&\u0014\u0005=\t~\u000fw5(\t|PpENT+3y}SJA\t$0RrCZ\u0019\u0015pMΚL)NmZ\n3[*\u001d6]%֔u0Gq\u000633ny9zuj.0v\r.\u0006z\n=A7nW7NB{{N\u0013.\n\u001aB𑡰\u0016DW3tp\u0007z\r\u0015\u0017v\u001d+\u0005굷;\u0006z\r7P*\f\u001bm\u0011O`S__6zwq0vX\u001d3H\u0019\flS<68|\b\u001dEMRq~\u0019JC\u00139\tIÜxwo\u0011\u0018dS9]vԮ\u0016J\u0014r/WU]ǃۋ\u000b{x]ހwt\u00117Gޭ^0;Z\u0018aq[m)f&/.S\u0018\u001d\u0017g2\u0005S4\u000b&ED\u000eˢcnT]\u001bt.Z\"\u0002\u0013\u0006z30ҺStZj\u000en2nq=xg\u0015C&<9\u0007\u001fP*EqPKWi\\~'\u0000\u0005\u0005\u00052y\u0017,\u001eܱ>#ؑ\u0017\t\u001b(?#]u];\u0007\u000b\u0003\u000b=]\u0016Nt\u0005\u0006tW\u0016WVQSIRq+cat-\u0006H4pWJ\u0006˫n\u0019ڗ1[\u001dv᭶R\u000ebZi\\&P\\/\u000esĦ\u001budn.V*ol\t\u0016cj6w,MnY2\u0003I\u0014\u0007J;V,=G&\u001aY+1\u000e\nf1m\u001cNT\r;X.Iܥ]'ЛJn)ۥߺu\u0015\u0013\\p3P݈jk@R{p(!6JD\u0011ET\u0015L]Wp6{Q\u001cӧ-K۵HnF:\\uB+\u0010EaZTǲ\u001d\u001e\u001afZ?V&_e&\btHeϢ\u001e;\u0011uifuA\u0011p/\npK]K\"`Ե\u001b\u0012/5g9su\u0017%\u001dl\\^ʥյU+Iϼebm~j>fr\n\u000b&\r-MKeSpqR5<b)fyL5\u0015h!\u000bf-\t9L\rGOEn\nn*Ccd;d\u0013s\\[\u001eZ\u0012n\u001c\u0015FV)C\u0016=\u0011\tb\u0014\tG\u0017\t۹IL(2r)&{\u000f\u0014mpB\u0006~Qk\f\u000ey%bi\u0015/І\u001c\u0016\r-S{\\\rڞp֪L\tS\\eMӒ\u0016\u0013U^ٴ\f6RwӸnY彷L9O՜m\u0006'h\u000bgS9\u0014\u001c\u0005A\u0013Il\nD<՘hi]g\u0006-a޺Mr<]>V~frږcP\u000b\u0019ZmWI2\u0005\u0016NznIs\u001a\bGƵ6\ta\u0007\u001dc\t2ߠa\u00151Xqޥ\u001dr~ɸ$MRsGH:: ~\u0019v\u0003}]flR]9\u0006j\u0013^ \u0019\u0015\u001cE0d=V\\8\u0006#I\u001d,8&u\u0001[q۱sLo3ƶ|6\u0004mIBkmCwIJoѲG\u0016$\bIJAok\u0014Z\u0010*d.(ϴ\r*$\u001cutIJY~rW\u0007V}t.؇ԇ:N\u001d4\u0005\u001b\u0011G@\u001d^o'\txo<\u0002O5S>\u0013\u0018mv.\u001emNFbrB0'S>\u0013ZiO{{#\u0014[uАcɺ~2W\u001d\u0003\f.،3_<E|\u001c\u001et\\_^\u001di*ӲY\nݭJ#\u00003+<*G1^ڪeX[Vu<cbqۭ^ٸc\u001d:h\u001d 3+R\u0016m`6;<>wtx8xv\u0013p?C>\u001bq)MO\u0004\r\u0014K\u000ey\u0000lgڨ\n[!.-\u0003¾ROH(\u0014E\u0017(SoD]}s\r=\t\u001f\nӻ#\u0014\u00066\u0000'\u0005vWm6u.me>\u001f\u0012ݭVv\u001f*[=#0PwhYz\u0014HDv,)ə/V\u0003MK\rW6J\b\u00164>'\u0017ӆХ}\u0014:-+\u0011~Y?fm.NnfcVu2`jV\u0003\u001aE;Zf8.`R\nu08Õ$\bUJO\u001bDHf(Uj\u001cU꾬\u001b\u001dR\b&\u0019bB,\n¸\u001b^pk);Ml\u0013h\u0011pY-\u00019q~_Ke6Yg3-CƼF78\r-Γ\u0014UՃk(;rqM+\u001dU7hFD7r`7F_~Raxb`D4EK\u001dZ~ntE,{J&\"+UǩT\u0019\u0011U^\u001dMGU,\\\u0019W=CPuMV\u0015U*FG}\u000bG\\\u0016˯?[,\u001b\u0004L#\"Z;z}=\u001d_kwդ\\0`b\u0014\u00150liEUVUam<H!)f\u001b]yceǒ\u0017\u0019ôSyCk\u0003w;%\u0016]WWbY\u000fI\u0012Zw\u001cі[,SvT\r7˂9֨NoD\u001d\nIqtKao-A#}\u0018\u0006~Je#D]\u0005\r>\r\u001eN(\u0017Ų\u0014ԓ{v+~:cXt\u0015?fQ\f7Q*)R\u001c\u001beۉG=l=\u00004u5ir˲\u0019ֈJNV,\u001dxT\u001aGs{Ʊ\u0002l\u000fij9JMH/YiBL\u0012$\t'կ\u0017\f*xqW8P%\u001b\u0015T[>_\"kae9ƍ\nv!Sq Zlr:[CSW#*+R]:O]W\u0013~\"F\u0014QV0uYAum8G\u0013\n2h%\u001dU:)\u000e\u0016Ԏ~Iz%\u0019YD6tU9\n\u0013h1[A;r\u0005K2\u001bH\tn\n\"y\u0012/\n7Lk\\^Rj۪h\u0015Dޢśo:'.\u001frضE\u0013\bEl萣:+HMTWeU\bS|^NᕤH=kHs#:[B9ǧJy\"1US/Q$\u001f]189#[f\u0012\u0013RYe;\u0017\u0014M*X;+6o˙`.aVŅK?pW:=Ѻ\u001c'zM3r\u000f%h)\\Ps}#UW~:\"7!+.+(4 G謠JS\u0015Lm+Z%V)|5hT!Z\u0002?QO)Ȕozg&~]򻒢jZ\u0019Ӯij2vy\u0019\\\u0018 s)\fWzґ>]t\fn~m\u0011UwH;j1̆K\bNti\u0007g\u00106\n-B\u001fa\u0001ӻ\u0011)}86A4ZG]\u0006\u001c*ğO\\HRp6ϱM\\\u001dGkFaA\u001cG+ ltY-?W*\u001e-'So\u0015]\u001d^rZ(QH3&Il%\tua\u000f̅rI4%ŗb\u0001!h+\f\u0015eeQr\u0016P4Tv\u0003$QZOv@SdbDC RQ_E|?u\f5\b![нԟ7\u0015\u000e\u0017KJBϣ_nδm)\u001c/\u000bќ9\u0010n\ffR,cc|E\u001f\u001aB(5tAX!1׶\f;Cԑ\u0016\u0017\\A\u000eQYgGf\t!\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000eM1\u0000\u0000\u0000\u0000\u0012X\u0000\u0000\u0000\u0000\u0000S\n,\u0000\u0000\u0000\u0000\u0003\u0016\u0000\u0000\u0000\u0000\u0014(\u000b\u0000\u0000\u0000\u0000`@\u0005\u0000\u0000\u0000\u00000E \u0002\u0000\u0000\u0000\u0000\"\u0010h\u0001\u0000\u0000\u0000\u0000L\u0011\b\u0000\u0000\u0000\u0000\u0000\b\u0004Z\u0000\u0000\u0000\u0000\u0000S\u0004\u0002-\u0000\u0000\u0000\u0000)\u0002\u0016\u0000\u0000\u0000\u0000\u0014@\u000b\u0000\u0000\u0000\u0000`@\u0005\u0000\u0000\u0000\u00000E \u0002\u0000\u0000\u0000\u0000\"\u0010h\u0001\u0000\u0000\u0000\u0000L\u0011\b\u0000\u0000\u0000\u0000\u0000\b\u0004Z\u0000\u0000\u0000\u0000\u0000S\u0004\u0002-\u0000\u0000\u0000\u0000)\u0002\u0016\u0000\u0000\u0000\u0000\u0014@\u000b\u0000\u0000\u0000\u0000`@\u0005\u0000\u0000\u0000\u00000E \u0002\u0000\u0000\u0000\u0000\"\u0010h\u0001\u0000\u0000\u0000\u0000L\u0011\b\u0000\u0000\u0000\u0000\u0000\b\u0004Z\u0000\u0000\u0000\u0000\u0000S#\u0000\u0000\u0000\u0000\u0000\u0010>c{\u0004\u0000\u0000\u0000\u00000C\u000f\u0010k\u0001\u0000\u0000\u0000\u0000L(\u000b\u0016\u0000\u0000\u0000\u0000d\u0018;\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000 L\u0019\u001b\u0000\u0000O?f\u0006\u0000T3kV̞3o\u00002\u000bϛ3l$4e^yժ\u0000UW]44'MWX\u0005.\u001d\u0005\u00008a+fN$ڍ\u0003\u00004]oxLFf5-]{_\u001f=\t\u0000<}\u001b.mMd+p\u001e}g\u0000\u0000/<nHk{WϾ\u000e\u0000М}gm?jA`\"\u000bW;\u001f~տ]x\u000f\u0000W_xNjah\"U8{\u0000\u0000\u000bghZ=l\"g^\u0017\u0003 !|gNa\"\u0000\u0002L\u00041\u00000&0\u0011\u0000\u0004&\u0002D\u0000\u0018\u0013\b\u0000c\u0002\u0013\u0001`L`\"\u0000I \u0001\u0005*j\u0013P\b\bj\u0018\f\u000fHj*\u0000F2+Ub.\u00005b.~\u0003\u00005\u000e%A\u00000\u0004W\u0001P_5_X\n@-#~a)~5\u0000Tk\u0000\u0000\u0000 \u001e--7zxC^ssks%awQnop0МAE]m-P\r0u\u00193v\u0017^c]PӠ*΁b\nz\u000b:C=^U9Nղ\u001dժDk-ݮ\u001c\u001fZo+\u0015}==C\u0003ac][FQpaw߾}\u001d[GF[GiX9ױ;D-9XW2q\u0002wT\u000fwj+īo\u0006Ws4r1a'e&]bq\u00043̬i1פ\\J]\"\u001d*uaRRt\u0017w-\u001ci9>פ\n̖Jr\u0015QfthX42͙Vy{5ϺJǰơ̾k[ot\u0002mGBo\u0013Hu\"^.\ryý',\u001fB𑡰QQ\u0019:RqS?57;V\u000bZsDo7P*\fļyd\"iS__6zwq0fg$\u0018nxlp\bͬrG8Tzo?\fx\t=ڜ`N|B'ܵqMJ(ɒ.sFjD+-IcV,/{=G<.o;:XYmouս[ROoa`w0ϥUӇ\u001eY~֦M|}C^rmmUVu{\n@-BoO3əC$\u0013d&\u000f\u001e+\\\u0016_䋸R\r\u000f0\u0016ܞ,-]UoKW\u001b\u0014.A\u0011?TƵF\u0016`iҊ\u0015K\u0014.\u0001/\\mha4rǆ /~0|{\\O_w+v\u001e,\f\u001c/tZ8\u0015\u001a\u001czM9-r\u001dQ*)dpA\tK_JRLm\rkFJ}%Ə}\u0013n\f\u0016\u0010~\u001f\u00058q73-G*Qp\u001fۊ;\u0016+,n\u0007\u0011 m}W>e9]\t.qUƍΜ]ͭBTm(\n\u000f+nPH\u001ebO|@\u0011'+\u0018\u001fۋ:=\u001c$\u001a\u000bÕemt\\!Y_7ծG[LV\tX2\u001a@y<\u0013-[C}\u00032MQ`q\u001d\u0012\u001b\\_3%\u00188ad1rK$=KHǶmɔV?^^HAK*-4&,tҺ47\u000ewHPjt\u001c\u0019*(\u0003Fi\u001bQesb#\\^]a\u0012UΘpamCT=-{OH9Bvx\"Mc\u001d\u0012\fIG\u0014ZI]tF\nj\u0016m&C\u000bB\u001ekZ6siB\u0006\u00162s*K\u001786ly\u000fӮܸtߦ=\u001bX1A80Qp\u0016ge羉ά gHUe\u0014\u000br\u001c%N\nF3;\u001b6m\u0006Em\u0011Rx\\PpS:\u0005\\\u0014A.y ZR.\ntܵh?\u001eC<P&W;yaf+>8AL6gΘK\u0016,.7M[d\u0005\u0015\u0016$B3Krf\\R-ӥgA\u0015v,SdTEg7%X7\u0012̯ENLiEOa/h`o\u0013~LB^[\t\u0012c;W\u0016)k_CwnQ')DoP\u0010^UeR%ᇉlIfP`˪bV-_'lÿD!PUKVWTߴ\n\u0004>VX\u001evb#Z~\u0018\u0015G5\u001d\u0016t6\u001f>fDKU\u001a6]VH-qs:B6-tbv2\u000eދ\u000bS-;G{i\u001a3;d\u001ae&J\b?_)L~vۜ[4F\u0004-0ELDX\u000e\"#&2D|+w#l2i\u0003-\u001d!9e3r\u00126-G\u001bjMk\u0015wiI\u001d葅աIWn\u0016Jlh{>^zq_U\nZ94\u0006״ti͓u͚'\u000b͚'\u000716Қ\u0007\u0005O\bfά<=\b\\\fOr9YK\u001d\u001fC(CS<0R\u0010FR\u001c+\u0005a-\n\u001dOhS\u001aQ@U\u001cK$]ZKePJQ\"\\rp/ۭ\u0013\u001b=u?ǟ+њsC\u0014x\u0007x_%\tDLD\\t\u001dG09rx1ILU\u0016퀶͹UuYz|S\\g3𑣿\u00107u7NR~V]\u001awK}CKiQ\r\u001e1/US_\u000bTW<xysڍ:\u0016ɵ\u001c\u001baH$K\u000bKqTÐhgç/xDL1\nKq\u000f.\fm(l\u0013^\fo\u0010c?ٝB+ID\\E6e\u001bmSIYLv;Mr:\u001e\r0U#Hd\u0016\u0001\u0011!*~\u000b.R6\u001e.^rk\\x퓃稨-(\u000bQ[M ~U\u001ao\\'~ӵ\u001ao\\Eo42~\u0017s\u0018ϊ\u001c7*~\u0004oU/s9^㮈\u001cU?\u0005:2J(,+GD\n\u001aܯ*7GD\u001eܿ[\u0007cִx]>1XCA\u0000\u0013\u0014gH\u001dhX3/ga'ӡ\n\u001e\u0006'\u0013Zl\u0015\u0011T\n/Obq\u0013QԝmZB\u0002܅D:HRRmۍ$34\u0006\u001aK\u0016M\u001e\ntSoy\u0004]}毱Ф{aJbK\rݶtM4\u000b*qNhL{%W8iQg\u0007YڬPAcG+L\u0006C\u000fTFDkm9f$m<A\u000etզoA:R\u0014>pIrB2aZm1r$\rf*\u0012[?~g\u0018IRhL\u0011ֲ\u001bXo*ֻr{vu5kWkz3J}X[\u0014X\u0012osaB\tKq\u0012,o\u001cʾp00t\u0019]ž]^;'n\\vDa5,T8\\,Eڐ?I\u0005p\u000b^kR,\fn)z}\u001bK~0rx\\v\rvDλGll࿨Ki:*:`qq+L\u000exK^=W\rI:/7gڶ\u0014\u0017_dth\u001c\bBr\u0015W\frE\u0006ٞ>:\u0012YAXTW\u0019B\u000bk[*Q?ZN/\u0000LgGf>\u0000\u0000\u0000:\"\u00000sy\u0002)\u0002\u0016\n\u0005X(\u0000\u0016`\u0000|*\u0002\u0000F\n\u0002)\u0000\u0007F\n\u0002)\u0000\u0007F\n\u0002)\u0000\u0007v\n@\u0002\u0000v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$\u001f)\u0000\u0007v\n@\u0002|`\u0000$G2\u0001\u0000q\u001d#\u0000@-S\u0000OT\u0001H\u0014F\n;\u0005 Qf0U\u0000\u0012\u0018F\n;\u0005 !m0U\u0000F\nS\u0005`z\u0019T\u0001.&dV\u0000>aY(\u0015O[(\f\u0016)ⲛ'\u0000\u0000\u0000\u0000f?H5(4\u0016lPØ\u000bE6\u000b\u0012\t\u0017)5-s͛D\u0007>Z\u0016$\u0012-=_t\u0011b#k`L&\b0\u0016.X0i\\|e;o>K,]t\u0019 H\u0010K,nd7$UVl\u0016Ж,[~gjʕ*\u0012UW}˖\u00164ͫ\u00116y\u0017.Zt\\m\\v\u0000v5kV\\|E\u000bϛS-PlW,̊ku7fmf[7׬Y3K\u0011\u001cmn\u0013m5k&jxMqcmõk׬\\Nk5nV-Xd[60g㗶lݶ\u001d;\u001dm߶u˗6:lCի/YJf͚3w~fgV^}mq]{;\u000f\u001cN=ޝ]\u0007\u000ftݵmFګW~fqf9\u0015iub5-[oU?0tر㩆\u000404_е_-kV,Wּ|\r\u0017=xy=_?m_7]VPgXs-۸u{\u001fC{Rɓ~>x={[7k׬XBZ6e+l`~SO=jz\u001fw훝\r׬\\\rJndo۸m\u001f<=_xJ14~\u000fN}Ǐ߶dr#pk\u0013_wN>̳NW/淩\u0006⋿S>ߵK5W.^Xv\f$̒^^n[8~?x?Ow/z%xw>\u0017nLSEnsInW\u0019\u001bλO>{/gϽ?)sg{'\u001fwunU\u001bHnskZ۷\u001d(ԯs}L9;_>ҁm\\t\u0016-]6q\u001eNso߹ryoqߝ\u000f\u001fٵ+.|_n75_ ޅ_^?7\u0007nїj-[v9t?p_x\u001fr/Cws+m\u0015mw['|?;{x҇ҥxO1o'mUܺ=p\u0017^{>J5$^Ӌ/<ucc^+\u000f.^\"MwtBt\u000bo+yƖ\u0007\u001e{,\u0017\\YnO?FrܦMEn5.\u0016r\u000b(ۄ\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[< x@n\u0001\u0003r\u0007\u0016\u000f-\u001e[<&(@n\u0001ef\\r{\"\u000b^h$c\u000f<TYnR.8\u0012ۥܞzccS/!\t.|^Ӌ/<urLyǾu_oHriҥxO1/Rn+In;\u001c\u001fW8/^L9\u0017??~;wVmʵ\u001bo\u001a~/__|{ro//\u001f}\u0003]ݘ]riܚ|m~~ӿ{\u001bow.wo{wÇ?}/*e^uMk\u0003{|oۛ)o?ק~S:fFmU\u0006?Ϟ_sOyٿߞ~\u001f][\u0006%UrCr喽?g\u001fWRΟ\u000f\u001exa\u0016ϒT6o+\\'|gO^|7oS\u000b\r\u0017ӧ}打߹kחuk\\p^Yn[м|6n}~\u0007Og\u0017^xR\f\r?<~#ml\u000b͙5,+f'Ï?O=ty'\u001f~s߉ރov6\\r\u0015Ur\u0000.dŚkƭ{w\u001fޣ'O>rN|{\u000f}9ݺ]fŒ\u000e*rkZHvm{\u000f\u001e?{z |ow׏\u001f9w\u0017\rkL\u00176;\u0005W,]U~q\nw\u0007\u001d;v<Ր\u0000\u0006Kw\u0015߾e͊L\u0003/pd?k[퍛y`ם^w:xsm7ڭ^3L7TREKe\u0003s6~imo۱\u0013qm[|i6\\jErӆJ+\u0015K\\\rmB7\u0004\u001b7+)6\\vKխb'}f5|\u001bZ6@d\u001b_k֬^\u0019\u0012ju\bnW\\j㚵k?\u0007k1^zK\u0017/\u0015\u001b\tiA%˖_٫Zr*pUr%Wd\u00164F-\u0010y\u0017,$-^dҥ\u0000AXd1\tm֊M\u000bL$4\u0001.Y\u0004BH\u0018\u000b\u0017,DRF:RlΛ7\u000f|,H$s\"\u0016HDG\u0003h\u0016!\u0002\u0011Z@\u001dc\b\rR\u0016oktnmδ:.*\r\u000e\u0015\u00063;-70\u001f*\u0013F.cFk\u000bj\u001aT9P<\\,Qូ[Xo|AW\\gdnjhzBW0d=c*+ϼF۾R1S34P,\u001d6:et\u001c\u000e\u0017v{wױ%|iuus\u001d{{OW*ThuZη*Szʒ\u0018\\o\u0011\u001b_\u0019\u00153W֤r\u001d)\u0005\f] -aJe3!JU`̕*tLO:O4ge\u001a4(TV%\u0014\u00102Ӳk\\0\u0005on2YVْ\tιp\u0004˷7gYet0:~9S\"lesGAk;JqL\u0017nnnX.@H/4&f\u0007S_y@kpi\u0000\u0011\"kK.Rwl4\u001ch,\n\u0010Y)4.\u001aP$u[\u0016Sdo,κe\n\u0002h\n#j(csFY9$\u0015n:/.<ޜ\u0013!LRlN\u000f\rJ1iڮºՅz9ͮdbܥ1\u0006\u0013v&XfʵVȁLa%&8Ԝלqu;ϣ.<hٕۻcO׭]r]7yv2^X0Ʌ\b\u0015)6iMB/\u0016cv\u0015qK'ݮ\rz]`f\u0017u!b! \u001biro[1a\u0006Ib-]7ʖ̒\\^ä\u00074MqF45nl隐NDI\u000f\u001a\u0018i`6Ӱ\fuX})M:s\u0003\u0003^XL\u001d\u001b3(5m[\u000e\fЕpvv\u000f\u0016\u0006\u0017zn-\nj\re&\u0019WIib@\u0019\\Kr\u0006&ZdpZB\u0002\u0006*\u001f,}\u000f|\u001fGS\u0004X<\u0013\u0015բ\u0011 B\u0018^!BTF,-ZZ+v\bԭ[Wjqu[\u0012\u0016\u0019\u0007lb0\u001a\u0000\u000bL8 \f\u00038da\u0018a\u0003\u0016\u0005!< l#a=\u0018}9Uެ[C\u001e?gKË;\u0010R\n\u0003`/ںK\u001f\fy>\b\\/K<ht^\u0011^u sCsL`0a\u0000m\f\"\u0010 -`@E\u001dp\u0010vo\u0010涴'l\u0016ؖv-_֖siW\\[ڲ]nmi:vŵ-Y\u0015זgiW\\[ڲ]qmizvŵ-Y\u0015זgiW\\[ڲ]qmizvŵ-Y\u0015זgiW\\[ڲ]qmizvŵ-Y\u0015זgiW\\[ڲ]qmizvŵ-Y\u0015זgiW\\[ڲ]qmizvŵ-Yt^mi˺6_e[ڲ|htҖ\u001fhMhҖ\u001fRҖCh\u0002p\f2>\n1ǟp)֖R9N8>cN8ytOiK{\u001e\u0013B7\u001dc:9Xז\\F<缳\u001e{a*m9\u0017_ҹA[re~W\\̳dzɏ?﹯|ͯq]mɕ;׼=d<9W\u000f齟jK\u001f5W<I`\u001d⥿}hK|+T}*iW_yGڒ+\u000f??B/=ɯ?\u001f%W~?y{JK>G~f+?z\u001bkʥIJK&)m/MR^4Ii{i$KRU\u001aJVZNjJrZjJ\nZtJ֢z\u0007J;zJz-kKkzkK\u0003FSP\u0014mi,۶py-.ۺeێz\u000ew\u001f:<<u^ܚp×\u001f\u001c`Etw.f_l\u001dt<˸y4<\u001c\u0002ܮm_3rU\fVn\u000b4\u0017\u0003^\u0003\u000bk\u000f\u001fܿ|}gBuvԿ~xMՄK^䓬sÝv쾮u<kިfwck-v|w.:@T׎o+Og\u00161ܺ\u0016q%8JH\u0015\u0017Ja=g3a\f1V\na=\u000e=sk<\u0003kp\u0015wZNnۺE*Qunں\u0005מˆ_qg|uKnwl]=\u0017fot.{5\u000bÅ#MY:=/\b\u000e_\u001a^t\u000e'UQ\u0007tp7\u001cN\u0001\u000boHG~\u000b-t́[\u0017fE\u0017i_u/XI;\u000f\u001c(7oҁ^<\"E\u0017rh\f-%V\u0000޽շ\u0017\u000e\u000fOiv4}-\u0013TF-ۮt\u000e2KS@\u0007\u0012ྔ{:>uU`C)qμ{Yyaixpoa^Oڹs`pM\u001c8'@^=Ϡ=ۯ\u001d\u000f\u000entpia.̕G\u0018Ok-7\u001eL&~\u000b\u0014yν;8\u0000gs \u0015$\u001fva\u0016RL,167M~gp<\u0011ɭ\u0012ՖD%kFTw\u001c<Oh\rHbg-\u000ft|5im;\u0016\u000e\u000fvsW\u001f\u001a\u001eu0ms\u0011\u0004iH(.-1S\u0012:>p*\u001cSZ9N\b@9-\u001fXxX$\u0019q\u001a\u0012םўIcֆ;\t![q#\u0018\u0005';Z1TqXzŘVKIX@Wh\u0005A\u001b\u001b\u0013$yJo\u0007axV\u000bɞ4\nL\u0011')7\u0007%\u0019N1'0'R\u001b<7\u001dcJ/\u0000JW\\iiD\u0004\u0016\r5\u00033X8\u0015reVU`R3pOr5T\u0019>v\u001c~$\u0011\u000b445-\u0002]\u0014h.^:4it[њRTS\",P3 OʣTJ%Ju$V\u0006\u0015=8/7\u001c+BA\"jt`\u0010$iG\u001a\u0000\r0U\u000f^p%\u000b\u0007\b:\\^^\u0018\u001cph΁@lw,\u0013?#2]2!\u001e2#0!\f7iRʃ\u0001j`$J3\u0003\u001dmۍY\u0018\bDW\r*?T>wn\u001eS\u000f\\X17P+BV6\\\u000e}[K\"cyUy\u000e\u000223`\u001cMD*:Ag1Ѥ|\\`(,YFZ0Cm\u0010ougq\u0010~\rV\u000e\u0000bj\u000e\b1%\u0000C,t\u0000o0>*\u0001a9q\u000f\u001a}atOz\\㶳Lp\"< \u0011x%.\u0018z)ax\"\u000e'\u001a\u0001/tr\u0006\u0003\u0016zqV\u0012_n\u000e,\u001d7Qs=/PS@\u0005\u000e[\u000fȻ|wG\u001fwk?<s#G>zsn\u0007\u0012\u0013ѮҘBy=>@&9xw\u001cSw\u0015w\u001b鸐`\u0015w@zzZ6g\u0014\u0018t=GsLsCC\u0019:\u0003\u000b\u001a.ߙ\u0007e2\u00158\u001aG\tA\\B\u0003Nwv\u000eֱi;WiRC:1Fy=\u0001\u0003\"A-[s\f\u000b\u0001\u0013J\u000eKrXalSU֨x\u0007̀4\u0013Erƅy\u000e!\nBhqXZ:2B`\u0012L\\`t\u0006ET<\bh2#\t3\u0006\u000e\u000b&\u001dD?\u0006Mے1\u001aP\u001fX/ʨ\tAA04\u0000\u0001?RH\u001a\u0013Zݐ-%ے\u001eX\u0012Y=\u0003Jn\u000f\"\u0007\n\u0016uB.udre%\u0007^g0a\u001at0JY<1\t\u001f$\"QCH#b0č\u001c\r\\\u001en<)\u000ef\u0005\u0013Xx1\u0014\u000e\u0011Cu\\\u001e}7\u000e]e\u0017mw\u001eT+P)](|\u0017\u0016\u0016\u0014\u0011IӀĒ@`P8D\u0002\u001bq'x\u0015\n\u0012%HAvš؈D^O/Bt\u0006VX\u0010\u0016H<NZ `M\u001cHa\u001a\u0013\u0016\tV'^%.\fF\u0015g\u0010XA9$\u0016\u0011\u0018j;}PE5\u00165֜i[ƁEb\u0018i8 %ըYP\\p*NPF12Id1E*4dWhAUΤ@2(i A\u0002R,`6D[W&s\u0012w\u0004!0I\u0001Au2phQ\n<\u0003U#%+˺E/j.X엒\u0004\u0011bc\u0007(p:FZ4`f4Tha\u000fl\u000e\f[%\u0010gTyC\u0019\u001e]\ta{\"p\u0004<`\\\u0016\u000b\u000bYx\u00036nԢ\"D\u0010!ĢCѝM ZT\u0006*vL\tR6Ѯ JMG\u001c\u0019x;d\bX f\nC \u001f\u0002\u0000J0״T}-ZTXI\u000f\b*\u0005\t\u0011qS{%i `4=\bailBH\u0013U@Ğʀ\u0004J\u0010K@G\u000e3ELЯo\u0014 ¤NұPgH\u0013[\u00192DEJ@)Rۆ\u0001B5NɁj8.\u0004 ?V\u0005\u0001/G1|.2pѺzI$RI\u00042\u0000\u000e\"\u000f\u0019\n\u0006ķWX3\f\u0001's\u001fb\u0019K@\u0013V\r}v2&5N\"VD&dgl\u0013*eeQ\u0004*uL\tb6\r`A3=2P\u000e\bO\u0005(hm\tޒa\u000e˓⣚\fϞL\u0005\u001a\r\u0012\rvNf+1\u0016\u001d\u0007ccU2UC\u0002sV3\u0001Aˠm:!<\u0006^!4\u0019З4.\u0019\u001b.\u0006\u0019˙\u000e\u001e\nnxыM\u0012@iH]֓͝\u0004\u0012CeK\"\\&z 1\b'Di,u6V\rAAu8\u0017d=K\t@5\u0016he\u0016du5flXqӄ\u001dd?pA \u0013\\Y~,U @]H.DD\u0018\u0019}%(o.-yO.U{e\n\u0018Yt6jW\"\u00130O\u001cbmEA^\u0015kᮃ\u0007\u000e\u001dJ\r$\u000f _\u001a\f\u0019&IB¬\"\u001e\bn\u0011IFzLN#\u0019BDuHoZkq\u0004mC\bb>\u001c8\u0014S\u000eg\u0019G^\u0002\nDQoX=F,%\u000e\u001f\u0003!F\u0001x\u0014\u0017`^Nk@^\fM!\n-J@z\u0012\u0013SF%KOEEТbǔ>S\u0012*c4u3\u000f\r]A@G%&\u0007\u0012\u0005)8\u0019`5+Xfc\u001c X%d5FD`$lDl+,ycq^b|\u0005\u0018s.Cj\u0015\u0010<\r%e\n$vMހ\u001cR\u0013\u00005U\u00078ha:&%\u0018e\u0013\u000e`c5\n\u000fkR{`a*\u0014\u0012֓I\f4f5̕7\u001f\u001e\u000bT\u0007CjX<\u0000\u001e2\u0005TT\u000eN('pXb&\u0005{\rR.l\n,@0+}\u00124N\u000e6ĭ\u0014\"01\u0017=Zn?aҽWoJrŃ(T=8\n2Шq-Q;et1y\u001ct\u001a1yѻMh6s>\u000e:t7cy\u001ds57yb\\:)8J\u0003ϐVJJ)P\nsؑb\u0000Y\u0018Qׄ6ޯu?cM逎dj5\\Б49&}\u0012sLP\u0010񖄇y9HA`\u001a\t݊F%UqD+:uFoEo4c?:Wb/\u0014t\f\u0002f\u0018H\tmV\u0018\u0002kF\u0015\u001c\u000f\"\u0006\u000f\r\u0017.3\u0018\u001ac\u0003gISDAa\\f\u0003d8BF5>msu^ɦ]M \u0002h\u0006ɨHFA\u0005qy\u0010\u0011 {\u0006UCc\u001eԹJMbh^ uJl\b0\u0019&\u001cmMV!\u0018*D4\u0019K*{X\",g\u0012\n\u0013b?榃D{G\u0013XP-V,ȐjtcX)}$<v\b|4,ee\u0019\u0004;!cS\u0004Ѳ[\u0016WݮD_lh'f\u0013cY'vaѦƯOZ'v\"Mci2\u0014I[\u0012x ځAB\u000e\u000b\f\u0013ٷV7{0jZ'\u000f7Muq'\u001a{M\u000e\n*\u0016\u0012#I,EZ(d]JMCjՐqI͔*#Z\u000fo7մNN\u001d:'\u0018=4R 1jG*\u001fCB%4D\u0001Ś\u0016%qM&SK)(N=#l@@Ypxo44`\u0015MH\u0002\u0003\u0013%9\u0019\u001e8EG\u00130qIN`Yo~FYo~ԋD\u0014&u\u00156~q\u001e\u0012Z \u0005׈\u0001\u000bPm\u001fq]lWs+[\u0006\u0019§mƴPP9'\rsBMBb\u0005:m\u0007BTK!\u0014Bo\u0010\u0004\u00199aFG\u000ee\t\u0005x\u0002\b\u0002\u0000\u0007\u0002\u001c;@?\u000eJϛK>\u0019X\u0017&l&W\u001cU\u001cUZN\u001e\u0000P\u001f\nB(IV@\u001c=\u0004`E4Oi\u0019\"*\u0014\u0011\u001d)8<\u000e\\\bʖ\u00079\u0014eWO&\u00071\tl\u0002z\u0013Ma67\u00020H\u0011\u0002d]L\u0005\bH=1\u001eK^S\u0007\u000fYEU\u0012\u000e\u0004k\u001f͆)YJ\u000fbdq\u0014\u0005\u0003eM\u0004^zPA\u0000\u0017\u0005\u001fJc0i<((\u0006x\u0004\u0019ЖEĆWoX8pfoډ\u001bOtP\u000e\bmO\u0005\u0010`\bQL$L\n0zo|=\u0010S\u0011<խ\u0014GC2{|}\u001a5uc\r@D4FT\u0006+;2CRhΝ̪vo\u0006>p\u000574;_d]5?\\͠\u0005\u0013/lvM\u00151SA\u0000\u0014\u0010cCIFI\u001a\u0011Q*\u001cCkv7܀A\u000e\u0016jahX\f+!-@\u0017\u001dn\u001bAB3yQ][7*Vrdݣ\u0014K1Q˱ZڬyM^ig\b.0|EE)'4\u0002bf\u000b$M\u0015M*Cۋ7n%\u000fH\u001aǿ\u0018:҂RO\u0015&\u0007x\u000e5H\u001edJҹ!\u000fTn\u000e\u000eђW\u0006\u001bqj,y` \u001f+{\u0017HKL+R\"mL$E\n̪ \ne蓐-6鮐^*tt\u0017#{$L&XZ!4\u001b,i6X,=I^Y\\./ZE\"&\u0017E8;W*DM;[HsJ0 5\u0017ľɇ<t\n颖\u000b\u0010}(pE/\u000br.R7\t\b_x\bPPvӍ tS\u001e]bjXYϻ{\u0002_\u001cng\u000fL߹\u0010Ny魆XJ::\u0018yO~@ګ\u0010v$gr\u001d-N^!o-{,;[oc\u001f9mIT\nj\u0011Q0X)F\u001b)n\u001aBT5\u0010-\u0014>C\u0011JR[\u0005\u0011\"o)\bKPt\u001e\bA>h>TTDQ\u0010 \u0002+Ԣ\" À.Hњ&TJ\u0010U-*\u0003\u0015;Js\u001bh\u0014\u00186@qW$[y2)\u0016\u0002|A=\u0002\u0003${Xya@Jiu\u0019yb\u0017sCwNoQ>w7J\u0014'\nV9H\u0013PB\"^\u0017*Knfi\u00117\rMа)Ү\u0014~Qѣ\u0014=\u0007\u0010\u00065kܘ\bs4bh,mM\u0001\"eb\u000fXn1\u0005\u0013\u0016\u0011\u0017}hʖD;\u001d;\u000fc\"W\u0019/YH޲U%G\u000b\n܇KAM͐A`\u0001Qd\f\u0000Nlŭ\tUN\u0010RG@\u0006Ӱ<ȇ}f|\"BGԁC7w2\u0018\\$\u001cA稔br)q3\"&O@$X`ǠCX\u0012#1Uw\u001d1Rpo&`zLePmx0\u0004\u001b3mt⑭K\u0013+48^9Uic\u0014\u0016+\u0003\u000b\u0013!< D\u0015zXyiM_*a!ɴ\u0002퐡l`\u001dc\u0018%zEh{\u0002Vn+i5\u00029qYLz4Im\u00051\u000f[#\n'nmp\u0015L|G\u00190\u000f\rqPhw\u0016(r\u0006\u001df\u001c\u000fH\u0002\u0017\u0014i(@n_:'Ӵ;\u0014Va\u0012.]:O1JhGN73ڨŌ\u001a\u001fF5\nAU+כ\u0000TY.C\tGF9+H-||xUg|֖KZ.[ek\\\u0005˥2JҘ\u001eS\u000eR:} rYH\u000fJ\u000e<\u001cf\u001cqfqs֋;\u0013Ǟ\u001e]-\u00132\b\u000bI\u0011rCKX\u0019LazF_\"P=3Ί;s\"\u000e'g%:j\"\t<q}\u0015ɇ\bU\rχ\u0006gh\u0003MVչ\u0010r<\u000e(v\u001f:t\u001e8xSi66cS\u0019I\t_d\n<mOlyTL\u0005-]G's4W\u0006`6&7\u0007L\u0014%(ZJcյf&\u0006xOqoK&gaJEVdީՈ-\u0003f;7.\u0010\u0017bW\u000b\u0015\u000bf\u0011;((\u0012rйjʤ\u00163\n~W\u0014ʅva;(Kp8\nH\u0019\u0019/j5/\u001acfoZN\u0015VVǉg\u001a*^9l3)S&\u0000\u001bbCIIԋ'+D\u0000QN\u0018L*#i)2SҨg\u000fS2YѐbD$SK!&'\u00157HX\r><'ၬ5(~e\u001f^\u0011҇WLVB\u0004Qբ2PcJ:qQ2XJ\u001b6t\u0014$\u0014NǐQXt><}xEG..8w><*AśU>ҋG,JI.\n>r\u0003+zf\u0006\u001f\u001e\u0012\\o3\u001cַ88WMz؇\u000f\b\u0003U>Tҋ+0+L6oʪt\u0006Js\u001f.w\u000656\u000f^\u0018:\u0005\u001b\"(\u0016\u0019)~\u000e)L4)\u0002Ċ\f\u0005K\"=Fc\u0012F\u0003\u000eSB\u0001hV\u0018t#I%mte\u0014(^P\u00124[\u00119ϫ|xnK\\.<Κ]x\u00055u9\u0005:%訳\u0000\f\rS2\u000fR~;\u0005*\u0006n-ʆ/S>g 8'<0 ȥ<oZz\u0018D<\buJJt3 BxMNtb)d­E\u00164\u001d#Y!RnѡP*q\u0016Ţ\u0013{xEf;\u0005<IN\u000eφ>\u0010aY\b͠<n:l,Mi\u0019\u001dn-y\t%;hwAٗ^&\u0000\u0013؊B\u0003_:/\b#zH>JrP\u0015Hh\u0004sn\u0012\u0004m·v\u0010\u0007Et\u0011.̵\u0016\"W,זSbbe\u000b^szxx\u001d\t\u0002ܙ\f~t_Wr:*\u000fCA\u0007\u0013ז\u001dwlq+\u001eʘ4ѩ+t\u000b3\u001d.A\b҈!\u000e\u0014\u000b\u0013̥S[|(\u0016t\u0012(O\u0003\u0012!NDͤZj\u001dA\u0001'lm72L j\u001f~\t\u0014[ͳ?e:햛q:7㚒'O^yoαf\u0010LEI#ɦe\b`]\u001b:d5\u001e8:^h`'S;p|\u000bvLw\u0007\u0001ymh\u000fO\u0007B1?%Kld\u0014dHO\u0012 [B]y\u0011J\u001b\u0015ZZ`\u0017.\u0018\u0002_\u000b^=7n`J;\u0012ά\u0006\u0012i\u0018\u0006%<9$nB\u0003ژ^-﹩Ra6Ǟ\u001b(\u0012P\u001e\u0014\u0015(4!57w\r\u0012D3\t2DEJ@)R1a\r%!\u001d܈\"\u0003C.tAדd/D{<uq^O\u001a^O}Wk'Ud-ݬח_\f|eVLr\u0015\r\u0019x\"K\u0007m\nJ\u0011$G_cpuYJ;\u0012@S\u000fTG^D\u00183-[YU [råvVΠfӞր{N'@@ \u0012Ƴ/׃PdYI\u001dsI\"\u000e)Bml\r2C&\u000eTK\u001b\\\u0012\u0014ڍ%MB2Usm\u000f\u001e\b;\u0018ˬfh:\u0016(\u001d,z\u0000\u001eD[Ealz\r[n \nߖ\u001bF)4ZImɾ\u0018 V\u0000h@\n\u0004UGw-\u001d$AAsK\u000fp\u0010\u0010\b\u00051\u0011Z&ѨCX\"(tL4gaNZ1\u001b\u0017\u001eobׁ\u0003\u0007Se\b\u0011\u0002J\u0016\u001enז\u0006(\u000eVm)\u0006H6ªk<BIud\u0005)1`\u0013<ScGxTN\u0006\u001f\u001f#HmXӖ΃>E\u001bmͮDG>\u00137\nzg\u001d˚)wK=܆؊$R<\u0016\f:7t#ӘmZ\u001d\u0007\u000f\u001exu*b\u0000iK\u000f|$U3Ltb;\u0006kf$\u000bbV\u0007f\u001eo\u0018m\u0010TRX\t:+WgȫBpjD)ږ\u000ek\u0004\u0011tbz\\\u0018\b\b)0lޙ>\u0014Ҽe?'r\"\u0019Z'JD9\u0016( \u0019?\u0016\f`އc\u001d(\u000esșFA\u0001/\u0001i39Q*8QpAͻ~WyUCɺk/Bj|vNp\u000eDsGsS!\u0017@8\u0019^Uwq8\u0010ݡd\u001b4Mܵ(eZP)c\u0007Mz$WJ\u001b\u001da\t)cʋb\u0004^\"PA^\u0014i^\u0014H\r^\u0014ǚ(EJ/J3EG\t2DE@Ŏ)R1\u0012\u0002XбrH1\b\f\tp\r츤cd\t*G^\u0014뛽(EK..zQ0^\u0014]\u0017Ÿ\n|f\u0017Хʒ[*E![f\u0015=3\u0017E0,t:n\u000e/hw\u0014\u0012Gahʇ-]&%kEqR\u0004H<$\u0014XEI{I%\u0017\u0005\u0013bl\u0017*2^\u0012yLU3(\u0014G\u0002-H:9h:\u0010t:5\fj<\u001aMpC(*H\u0015$<h\u0014\u001b\u0005\u0004!2J\t5ڤ|(ЁЁD<=\u0019\u001aE\u0016vѯ^沟p/U^\u0002̚zQ\u0014kOebUtYpBh3\u0019ا\u0018En\u001d\u00139NV]N\u0014h\n8֣7\u0019~ɸIհɕvxY\nAhQ)XvCbS:L}k\u0003\u0014R;\f5%H%)JqLdf\u0018o\u0003`Es\ft\u001b\u0005\u0007cHpvΑN2G\u0012\u0011\u00122t\u0016%\u0001G5sf\u000b\u0006O3I|5e*2\u001e\u001b0?6 ecyk\f]3 \\965\fY^M:9 <I`ۤ6\u000b\"Zp^jgOfhs\u001a}@>4\bu\u0016i\u000fZp\rǟ\u000e\u001d\u00028\u0005%Lbr:Tc~\\\u001fV+G2m\u001cp]33Q\u0017.-P\u0005}'^m\u00187\bbS\te\u00109*AՐW\u001fpya\"k\u000f\u000f\u001eI\b\u0019.4\u0002AP\u0013GO\u0012>\u001c54YRJBuƢ\nk(\u0013\u001aڦF.)\u0006}ЀnY݅zƻt\u0002iwp\b\u001a g?cs\n\u0006/\u0015F&W\u0013s\u0018E`Z:O:@\u0016[k\u000f\u0002]~\u000f\u0016\u0007\u000b\u0016rzZ\u00008\nGx\"\nK!˥\n9A)\u0011\u0000ֶ3';\u0001&\u001a$\u0014'\u0014n\u0010-)ZOM\u0001sk\u0018M)BTzSʟ)AJ!*ZT\u0006*vL\tR6,\u0014B*C\u000e^f\u0010<.\u0002:Jk@\u0014;:7foJ\u0011&񖠋\u0014m2\u0014]7\u0005G2_YM)\u0018%ʒ[&M![Д\u001aX33xS\u0012Ô!Ms=͒S1Mi[\u0013{S0W\u0014\u0001\u0012O\tzʛJzq\u0005o\n&rẙ7Kޔ[xSJ(4vVΠצ07i@+\u0015?T#IT\u001f,)vejodᕌr>LbV!;\bu׎&KB0Ʒ+&\\|([\"=јb3ZoD\u0014m)\u00055at\f\u0010\u0014\f\u0005iתI+F\u0018\u0018y7Űupa,rXnk,\u0007FOKkM1^\u0019\u0006xK9=˅= 5!6)t3{S\u0014\u001d\"\u000f'Ю4;Xc\"ӹ'\u0003ZzS<|`LC\u0015(\u0005\u0004 HIKJ=\fprgdb\u000f\u000fh8h\u0007\u001b\u0015\u0007Ƙ\u0001E\t>\u00150Ƌ\u000e$w\u0016Cyn==ۆ\u0007ݚ-\"!Իc;\\YG=[luCw,\u0007rIZ\u001d^DY\u001f\u0019U\u000e\u001e޽P\u00120ϾW6Hjb:8\nL<.iFn+\u0010K6#\u001d\t`w\u001dvgV9t$&,2:f.s\u00014IΟ\u000eg+:/{9,`\u0003LvӢQ\n\u0001HO;H&\u0007-+\u001c\\\n\u0007[A'{6v\u0007e[?#|s\u001eΑ\u000f#{#G>'-\u001dOwd]\u0013\\}r_H}|vDx潝\u0012v\u0012;WQ];\\\u001aό^rciG\bK\u001a˦\u0012x'V(\u0004\u0018\t\u0005]{5\u001bWϛx_9Q_,s-FW J\u0016BxD\u0000*̴n2H\u000f\u0019I\n3y\u0011\u0007\u001c\u0011=Z\n\u0006\u001dIJT~r79#\\EFW6>\u001f\u001b՝r<M.\u001aOf?>Y\\I\u001fӺurZ|||c+]`\\paig=Po)\\W$\u0011P5Ab5\u0014\u0004ԘUezIH\u0016\u0014d斘+9mԴ\u0010 BU^VQ*S\u0016\\\by\u001dSX\u001f6u^\u0004],t06V\u001e/1*q/0x{UI?\u001fdL\u001e\u0017{\t>#\u0007&\u00122, \u001eǼ\u0014QJ\u0018F\u0010i_l\u000e=R;K!\u0006,M\u001c8eŽȊ{m^$JVJ&S^rUjG+\u0002_p$Az\u0012$ \b|j$%WEL/mI\u001f\u0010&\u00102/,A+\u0002_+\u0002z\t|o(\u00122\u0016qbtjwtA/+V_c*J\u000f9[b2sN}\f\t`\u0012(L\u0006\"B)4r$R\u0012F\u0017Q\\H{\u0010\\H.\u001b^q'xzZq$\u0007\u0014(ЖB78 C\u0004$͑\u0019%I\u001c\u0007DCAa*\u0015-C\u0018\n\u001eEP.^ vEN\b\u0006!2^\u0012%CIxՕFv*+\u00192,J\u000b:\u0002`J*&D^jy+*N?6Ɨ눭EPLe-mn=嫑p\u0019H\u000fA牁-+\u0004G]&HQ[A:\u0013wi8\u001a\u0012\u000b@}z/k'Q>$H&Dd\u0018P.ҭ\fGF*\f#/Y^ƀ/t?I=\u0013E\u001b-@uHaNJrBs\u0015K\u0002͆[J\f]5擛G!Fs\ne\"\u0019;! )L2\u0019&N6\t_yYB6#\u000b&z\u001aBcÉdH,'z\u001d\u001bB#IYNI-v^\u0016yYԜ,d3P2:\u001a=ؑ\u0015Wʤ;+\u0014\u0019Yk0ieVvke!pbi#OS\u000eS`\u0003Y\u0001n\u0011W4p॓(7tOs8NB\u001c1m=rYe'\r]咔r)\tG{*\u001fQ+<J?\u0018\u0006L\f7H\f\n|hR1p\u0019\u001es\u0014F\u0001\u0014\r\u000bɛi\n\u001d5\u001a\\33\u001fzUa˯\u001a|\u001b)uҶ[O=t?*D\"^?tB\u00110{Q[\u000f/:ؿo/yH@K\u001dZ:/\bKn\u0005\u001b\u0011,2\u0004Oog[@6v]ԱRnݲo֠<Y\u0005xUW_r{.auf|\u0017_\u001b.w_}V|/~\u000bGU6>zmg_|_\u0017vG\u000f\u001f>W}w|7\u0018?\u0007?\u001bWG{\u000f=-;z翛{/;^_zϵѵw}Go^>L\n\u001f|/ߓ<Gh|KNи{JڵgCco|tٯ#_/vW\u001f\u001f~G\u001e\u001e?]K?\u000fm9\u0019g}/\u001b|{~7=7nљϲ;v_q\u001dʵW|Xs\u0005a^6Z;^{(C\u0000sX@y?\u0012y'}q\u0010\u001aɺJ)z[\u000bf\u000f˛->vx,0UP\u000f\u001aew\u000fd^\u000fOX~&msf}\u0017_Je\u001ei%\u000fFTotoFEIyÃG-9\"\u0018h:ɗ(\u0017QĦ\u0000)B7:\u0017=p\u0018Ձ\u000bP3I#Q\u0007OS\u0007iyr2Mxt*Sϓ\b=-\u001fYs\u001a\u001aC Yal]Ў\u001fukkjIqK[Rܒ';\u000e&\u001e\u001dN;vwvr@'_3\u001c>j\u0017\u000e\u000fHrÅ\u0017\u000foPjjrU6d\u0015c\u0014<sBrN4qBowr8kt܊=VrlDR=b,?S\u0007zMS\u001bhRt\u0017_Aj\f\u0012\fRr$\u0006)=A\u0016\u0011]}t5\fgRYt]5\u001f.[\u0014N\u000f\u001coEj\u0010:|zh!g\f9O=BC=1!\u0017\r-9\u001a\r-5r\"=\u0014+\u001fE+<c^i\tdK [\u0002@ dΘ?tCI(k#:\u0011jdLF\u001d\u000e\u001dwok\u0005a8\u0016xó޲N4\u0013T҃@F\u001fTV\bn5ۯ]d\u00135xSZHE\u000b,YH4We!\u0019\u0004\u000b\u001e7\b?s\u0013۝j\nɹ/~\u0010v}o{ǝz׻uםw/_Lz`_\u000f/}qwPӃ\u0003Ӄn站0\u001f~.\u0007{\u0007'?'{/\u001dˇ|\u001a\"tJ6߾W\u0007*D|s#\u0004\\/\u0015\u001e|>y/=\\ЛowG;C\u001eB\b;?'߲\u001e\u001f!H?_\u001f\u0010_\u001d-\u0007\u000f~^w\t=x~'o};(~\u001f{\u0003}\u0007>Oc`\u001fy\u0007\u001do{˯ea\u0004LK/ʫPܻg%ϓ|,g,0V˾]\u001cdAtAry\u0017t4y\u0016ٔ\u0016a%\u001b󦫴\u000blh\"\u0006buʶ\u00166U0Z\u0005XP0\n-ZxvM`ᩕxa[0\u001b-b\n\u0011:m(MK[RܒMOŖ|ȖFod6 t04,ZCi\nyΏ\u0014)\u0013\u000esNx\u0019wd(\u001f\u0000eΥ!#S.ƺ\u0006\u001c2:nЕ6\"\t$\u0005o\u001cZ[0ᙰ-OhyB\u00136?C465#\u001ap9@4rf(̈́\b\u001bc\u0013@~,7R\u0010xhKɭ\r\tSmz\rsxїfy/\f%cJH\u0011-%l)aK\t[J81%lYc\u0000%4t)2 \u0015EFI\u0007) Yo\u0017.Rr\u000bMՁ,p\u0012\f%\u0014\u0019J2/[-%l)䔰ya.hS7!-~Hh%JWF+\u0006E9U{\u0018aD-Ep~yLB#*̽O#B\u0007e(\u0013OMJ;\u0003\u0001c\u0004BP\u001aĮ\u00115郐\u0005\u0003O'L%#2$+*\u0000)`>H2DZ1F检\bT <\bM_*T\u001e\u001f((1Ħ\u001d8Vَ%,w¯\u000e7MLWYl#B>0Y(a$Yv\u000f\u000e,U\u0006=d[\u0018SLl\fݲr%gVa2C\"3^_\u000e\u001a\u001cEogXdd\u0005{\u0002R(z`\u0005\u0018\r\u0007^p\u000b=m\u0005k.}\u00182X\u0013#,\rq;DYcN.>\u000f\u000f1\b\f}6\u001fp6t1\u0000\u000f/cǬ\u0013\u0004\b$<:m3dW=\u001dB\u001276.9=}?S-=w:v4\u0017EĒ\f\u0019&Cy|{Yf\u0013~WE3:=ǝ\u0000{~Sr\u0019\u0000qh=-Fh\fU􄗢\u0013sl\u000b\u00149-\t9h%9ƥS\u0004`\u0013)\\ \b`]U§GW6!+L'BNؓd;2G\u0004h*\n_1v%!\u0017[\u0012M\u0000\u0004~#'c\u001e\u001bXG\u00132[<:F\u000fF8( gےܲ7&\u000e+R<s[L+\u0010:0\bS\u0002j\u0002\bDvO2Z\u0016\u000e$N1\u000ePX7\r\u001ft\u0017bZ\u001atT]\u0003krKL@\u0011WO Vq\u0016\u001ceһ\u0011\u000f&\u00193l\u000b8;\u0004NK0㓕P!AJH/\u0012 \u0018*\t\u001bA\u0014E[\u0006F69\u000e2\u000f\u001f\"'B\u0005(村tDwX\u0013&ӱ䲵\u001c|<\u0003\u0013t,6\bW\\*!:\rԫ\u0006\"7SJP\u00007`\u000326X=%\b\\\u0013r\bDivs\u0013&,V?u3\"\u0013g\"> e4Xh\"P.h*ٮ%'g$\b3}R ?&B|dD\u001eH\fJCAg($%9J:Rd\u0011n$S\b\u0007*pɰG85ֻ4\f5ꇦw3b+QDR\"\u0005W*z6.<n%cL\u0005\u000fP\f``\u0001\f\u001d*)C\u0005\u0010^K)\u0014\u0010**= \u0001C\u0017ȶsP\u0002W\u0001ԍ0*A\"sIucU>cZ˷ޕA\u0006Te\u0011^]\u00002FZ\"Ү\u0004\u000b\"[?I\u001b\u001c\u000eNG-t$`\u001eE\u001bǚ\u001ay'kC&\u001eŤ~px\u001b}}ƺ6Xƞ[5gr/;Ī0א.g\u000eP}uk%s6&R8\u001a@\\TڄFrS\nX!'u\u0019*1\u0005E\rH!K`)c܍Йj\\객,WE1\u0004\u0019dAE\u000bAuNgE}\t\u0014Z\u000f~ԥ\u000b}\u0006ʒY_\u0004\r?\u0016j\\\u00106͘uuz\u000e)l9\u001apHek\u0003WC\u001ao'cƛC(8\u001cr\u0006\u000e)Vᴒ\u001c\u001aF\f\\t)\u0002\u001e<*D88$kz-:\u0016l<3љ]B\u0000%Y\u0006\u0002\u001cݱF't\u0002\u001b٠*!X#[\u000b$cM\t6y`3JPrN}OX\u0004\u000f\u000e\u0011\u0019590g\u0003UU\u0000\u0014z\u0010N-Ԩ\u0004k'qi\bxdd*\u001bUTa\u0000\u000bi\u0012]\u000e5\u0018B\u000f[.5](4\u0019I\\*f\u0000)L(&6C-UCŕ4yQTLH3/dT8@dOK4N2HHCgʡk\"}l^\u000f\\'d4%ٚz5N?&>dtD㖢 z/!\u0004ρx#kec5eeq\u0003\u0014Ԝf\u0000i\u0004yєZ\u0002R\u0006^о&\u0007,\u000f\u0013$\f\u00148%2PE3s\n#dP\u0006\b/\u0007%$\u0010r\f\bp6t`X\u001c63j\u0017\u001c\u0004Ht2E()c(ph\u0004)d]\u0001\n:r<\u0011R9ʑ28-1ΎAC\bD8$mx\tBc([\b%-QPs\u001d\u000fKnY%\u0007Aw&C$I#|}1qA\u0011\f\u001e\rOt:ոVC=\u0013\u0001Ì^\u0003\"G51Z\u001e.{[.2pQW[V;\u0010>;Y7Zۢs\u0017{>\u000b\u0010ԭ\u001ecH\r=-\"\tU\u001e\u00126y$3q\u0010`,h5suҰh^)V2@M'(,$e\\\b@I&A\u0004ezh\u0010[\rxu㩾ڴwNLu\u0001\u0015C\u001db\u0019-0y!쌅\b$'0Sʔ9\u0013>\t,\u001c@\u001auԤG|\\\t+)\nǸHtF\u0010Ed1\u0012&F\u0002d*Guy(\u000bz\u001cd\u000f\u0013\u0003\u001a\"#,\u0011b0\u0011UA12\u0015CBU94D0\b(\u0012=\u001dKQ]'4\u0004F.ur\u0001&'\rb\"S\u0016\u0004pA\u0018@2[\u0016(]\u0010\u00061\u0012\\xg$zgT\u0016e\u0010ɋ 4\u001a㶣/\b\bl?B\u0005a\u0010Pt@gf@\f̡\fF\u0004h]A\u0010\u00179}$\r\nFEuV\u001aQ\u001a\u0005i2QhA\u000f53IP[٤Acdǆ݂' 34\u0018B~<A)\u001b\u000f\u0005L\u001a\u0004N<(Z\u001a,BM%t\u0001&B36\u0006\u0015,OY\u0010\u0013~kXSƞ\u0019A|,\r:)hRBǔ\u0014\nS+{C~hI\f\u0012\u0015,fFHf'\n\u0016\u0000L$DVܩ\u0014\u0017!O@ZRه*U\u0014\u0017-\u0005f5EӡS+H͊ovo\u0002\"TIE\u0001\u0005\u0010ȡ\\\u0016/EEY\u00117ԥPZ\u0017eŰ=N-H\u00077O\u0006c2\u000185?'*:\\e\u0000WҗDEO堜rEI\u00111=\u0003DL#/\u00072N1Ɔ\f{\u0005\b-\u001bh6k\u00129ǝq()\u0002`\u0018\u0011\u0019\u0019P^t&?\\R4\u0018\r\u0012x4\"_@8H\u0004Ew\u0014MPԩQδ\\!>\u0017\u0014uo2AQMd6,BM)(&\u0011B\u0004T\u0013\rј\rX\u00146H\u0007\u0006lL\u00189*\u001afp\bCa& 4(\u0016Y%!'\u0005\u00194\u0015ri~ɦ\u0002J_g, e\u0012DLHr\u00135m26\u0019P\fh֗7W2FV\b}+G\u0002\u001f\u0006]W@\u00021)\"br. `A1\u0019\u0014k06\u000b)@Y9n\u0001\fю\u001c\"'\u0014J̣\u000bG\u0018F&4\u001dȎN\u0016~ӑ%\u000f+텳b\u001a6IH2\t)Y&!%Sߺ-m)oKy'\u000e)f2nP.+1BZZǂD)p\u0010fC\u001dl\n+\u001c% \".s\u0011\fw{#H?\"CE\u0016\f\u0016--niqK[Z<9-n\n*(\nk0DFÞ\u001b-\u001cn8(2kLid\u0004!m'Z\u001cXf1T\":aHřKwyLI\u0004\u000b'\u0016kgGg0VҸ\f@(\"U\u0019\n &ǔ>{§5\u0006$W\u0006.3\u0003M02=&AQ:\u0003V) \u001dRz\u0012iuZW\u0001$bd\u001dR\u0002\u0015+\u0004&\u0004\u0015\u0000ɴ'\u0018\u0015{'\u0018U@$\fH\u0016e[1E&Eg\u0013\u001d?kЧp\u001d\u000e,rxC\\I3=5+I_Pp%DsyUVŗ4c\u0017*%,\\T@\t_ұṢs`M\tb:ɸL(Adj\u0018h\u0011\u0016*N5Edжj\u0004Ef\"R\u0014#T%\u0003%\u0004EB\u0002\u0012\u0003WB@K \f\u0004U@e5 ֛\u001a\u0006I[@+B+\u0006i\u001e,e-\u000bmY&g[n\t+\b\u0018'h\ne\u0019h\u0011\u0016*H5%eu )gS\u0011\u00035SWOeK8\u0017g\u0011\u0016gEuECJ7~P1Q԰*Y1Me-lg>7;l܋\u0011\u0017]P/n\u0011r薮\\L\u0011Gk@\u0012\u0012Y5\u000f\u0012\fj\u0001%l\ndڕuW\u0018&WXjM6&7\u0006`\\WkM2x\u0011u\u0015F_ݩ\u001bu72ז̵eGem.wKN׳6]t\rkͬM7r\u0005ֱ֖6VxGmzcl\u001dk\u001bhE֦'bm\u001a֦[ֲX`mM\u001bf\u0012\u0013M36QD3c\u0013MMMT3cS5M36UT\rcS͌MMDM436QDZ2\u001d\u000bm=a\u00175\nP[)[0Z\rSNvh0\u00160%N\u0019\u001e\f6\u0007anvW\u0015rte+u.ƭ]\u0011]qI<-\u001dIOWv\bJ ؔu\u001dP1ݘnL8hKo94\\k:t\tɧ\u0012SluEHRPFnt\u0013\u0016\b(\"TK\u0012[ؒc$6{\nbk6G>o\u0010\u001atǿ2\u0014\u001fq\u0019ړ\u0001MA\nS0s2n\u001ei?!C13K>\bV[f2l\u0004&1339\u0006>0*M7ARA\u001f\u0018MB\u0011\u0015tr#%<:.%(%)\u000by!\u0002$6I/1\t3㶞陙V&Fi(13af\"Te̬ef-3[#f'?f\u001bIR'afɩf5\u001d=Ijo,m\"1ZЋt\u001cDs5tcgd\u0004:\r-\u00129ׅL'|I7nB\u001b?oL\fz'4ܳyxps>\r,%\u001c\u0014)mlL)\u0005,*!(BAќ\u0000>\u0006\u0001)WaLu!K!`?(q\n.ȴ$W{FWܳJ\u0012M0i2I0ȈS\"H{+PV\u00004\f\fCGɐR@\u0019GÀEZ 8)\u0014ijAxO\u001fcb\\:҅ӱ)*,)\u0017j]$W\u0019ver*e[vղ]jM\u0015̮\u0016j1îT]dWMY2sKƕ\u0006wұ\u000b ^:-h6ON%\u001eciI/Ğǯ\u0015ٓʱ'cO2ǐWeO-{jS˞FbN̞>Tɞ@=\u0010\u000e\u000b$\u000e=48`\u0013D䷿dy\u0019\u001dй \u0010KFukb*9y-Ʌ{\fw\\\u001a;]zJ5WY\r:PYo\u0012l@$`\u0014=pT<\u0014R\u0011h܍a:(0]\u0013Q{Tig\u00105nNVt^&%\u000e4-OY\npulUl\u001agG_&Y8\t\u0015ƤдE5;wiYe$\u000bVpn\u0001ځã\u00015jT4C(\u0007A\b2吇L\"zfJWş#W\u001bW\r\u0017E﹑Q˶ݒ\\Ln۱[]\u001fThtsxk\u000e\u000f\u000f\u0006p>e\u0004Q\u0007\u001f\f_t[g^2@#\\׾L,ŝ}7ԂЍ\b\u0016̢R\u001f~\u0007|\u0005d.\u001f_\u0011覭[r܏My̸L\b/SVg\u001f\u001d:\u0012W\u0013Ғ/A o\u0014S\u0004Xy\u0014lIK\t|\u0004AOGbɀS%\u000bJN\u0001/B\u0003x\u00111c蓊%\u0017SD\"T\u001a\tx#'<OBO+\u0014c9<m\u000eN3k\u0011hIWqyYV15hW\u0013*z2\u0006/W\u0002R!+r\\L\u0005\u000bU?օ$\u0017./\u001c\u0012F\u0012Eu\u0012\u001aO\b\u0001Hʃ!浃x}(`f~QwwPqoR,@-k{;vCR}S5W\u0013/\u0019kL\u0015aW/\fDWI\u0001:ƥwL\f>c\u001b&ض g\u0005\u0017_8xh\rdH.\u001dߵQm1`\f\n\u0011|\b\u001cX\u001a2%Bj\u0014$&'ǰ΍tzL\u0015u\u0016B&&\u001evoa\u0016|nF½\u0007\u000eC>pp\u0001s&y>Lՙ˷'m\u0006`cb0C7\fw\u0007j܌ʂ$W@hD}>kc!Jl\u000b\tdj\u0004.$%y?\t$oA\u0015\u0006\u0000q\u0003(\u0003pH[80?#\u0019CÃ\u000e\u0017(J:DG_X>ܑJwSmkEa;N\u00146\nc\b6\u000f\u0005\n\u000f$\u000f\\\u0001TwCk \u0016u@|[uZR\u001f\u0013L\u0003}\u0013d+H1a\u0014\u0013jֆ; \u0002\u0012LpJ#\u0015'wVL;r\u0017jcH\u0005 B2\u0002\u000e\u001c-+p\u001a\u001dA'*fAֹ\u0012N[# \nz2\u0011\u00153gtZ\u0001*\u001eͦp\u0013y#\u0004\u0010e @\u001dklVj\u0005g\u0010,ǣVkd)&\u000fĽ\tx_\u0017\u0011\u001aݬ\u0000\u0011\u001959\u0006e\u0019$z&WU\u0001(SiB(;P\u000f\u0013\nؔ\u000bf0''SUٴݩ8\u0006P\u001b(Zl^\\\u0015ƷӹykP\u001dF1\u001a?R'\u0019)N!M\u0014Y\u0001Rpfj\u0006Ns,JH3Ha^yTu\u001b\u0019/8 \u0006mT|I\u0002cF\u001fk\"U1}[s!\u0000\u0000?q_qk\u001a|:/h:W\u0002Ѝ\b\u0014\u001a[pg^(\u0015eCj9S63nkZc*خ'\u0018΀\"\u0019ˏ\r\u001b\u001c\u0013HrLHU\u0016-(\u001bJsuK\u0016--[Z<Wxni\\⹺suK\u0016-FS]\u001e-ƨxn)\tQD\u0018sS\u0002\u0007F$!<7\u001c\t@lpCP\u0019u1\\;\u0002L^Vk\u001cg-l.3Q*[u3=\\\u0002\nI\u0002**N\u0002e˖ӓv*p\u0012Yޓ֩myǝqQBq>viқ*5zg<'=A9\\{YO~ҙO8c&N[?sSO<i\u0014~)u)'p|.@xg<<x\u0017t{\u000bC\u0017g<O9g<\"^;dv9O=\u0017\\(>y(}\u00179#/=3hc՝z\u0019gg\\/\\JWK^p\u0017<iyf*|cO<iw]~u^WQ^9w]|9OJ\u0015\u000b=>k/\u001b޸|Ço7/8{՗=tԳ\u001e\u001f+Lߣ|y\u0017_~+n֟/\rk֛oxu?__pSΤ\nм\u0013OrYO}&^t/o};y]wwo|/ܺ.?g\u0013\u0006y''\u000b̮_t/w?;\u001fD\u000f{}Ǜ~鶥W\\\\sX\fS3.p/}#\u001f?A~-t\r/\u000b\u0001DO\u001dn9qOg\u0017\\5w/\u001fӟsﳟwz/<w\u000b~I;-\u0018wig<iK\u001b;{\u000b77\r\u000eĜ'qə-\u000ben7w\u0003\u0003_{\u0007Ɵqe\u000e:fމ'oyO^t˖_~W\u001f\u0007Cz\u001e_]~\u0017u~㷤\u0003\u0011;{^q/?z\u0017o>|o>w__\u0015{.wN^1wݟǇ#?#\u000f\u001fx\u000f]\\z{\u0017>w+\u000f᝿sgk\u000f~\u001fۿ<=7\u001c~^XxӟpO_+\u000f~/?????>;p]<Srw\u0007便}[{{{zo\u000fޕwn꛵}37|u~μ\u001ef[llV9;?ȏf3YˬRZq3˃*tY2)zBBzUH%ヾRˮ\u0012w=׾;\u000f<_\u0010}I\u001bJcVi׵zv[\\w\u0017\u0003O[yId6\\Y:NT6\t򮓜J?9\u00137 #H$[?#|s\u001eΑ\u000f#{#G>\u00121sN*YO\n-Je۞fNJ&(S5\u001ds\u0010S\fhtG3s\u0019=hcV\u001b'BT#-(\u001d=y|2%mB.c=\u0019mc\u001c0KʈjwL\u001b\u001erWvZÔE;\u00069W=t\u001cLIBv䯚\u0013͛KI2,.FL/HX]\u0002J\u000183RKZb\u0012\u0004bƙ@!yӦ4\u001fVl\u0018\rGI\\i\u0001\u001d}yGC>=ax'\"!`\u001f[H'l\u001c%中3J\u0013XF#Ee\"v控m4\"Ųi\u0011;.m(-bӖ\u0016iKشElڲ\u0011lm~b3#yp{l4RwE\u001db\u001b\nXm\u0014zM:`83>\u001b^ݕ\u0012,'x2ETSOI8-;s}J{Yg>n'\u0014O<sl+\u0017~\u0019=z'\u000b{E~P,W\u0002~ޓN?i\u001cU|I=kwU.|\u001b_3~cO:>y\u0005o۽tuw~Or\u0013w-\\z٧xϹ_'\u0015\n\f,\u0007/~p'\u0016S|\u000b>\u0007<R.w\u001fg>t;ǄJ\u001eT_\u001fTU?>\f?g\tO~m}~\u001f5?~o'\\z\u001fG9._y_kߠw~\u0017?\\y񧞣^?\r~OE?\u001fڹO>/?Zq|1rZx)npקʯpSO?aW~=\u0011\u000f]zbh~?-\u000f|])bnC}9\u0013|\u0017\u001f__S\u0013\u001f\u0017,~qoy\u0019'$;a9g^|a}u?+\rs\fq\u0016ng&ɠ\u0014=y7KXc\u0017L*J>{Tk\u0006\n3\u000b\u001dZD[Q)ڇ\u0013@.(*kt-ZU}7z(S\u0013E3w\u0005=+9.p-\fnqQZ8a\tcUV1ż!>7N:d6%=\u0013\\24\u000e?^{p5Ƭ'Y{ْ\u001c\u000f`;J(Jz|[qbT\u0000= wJ]M\u0010!w4<~&~0\u001a~J2'!LkJa\u0018pY´UV5Bb\u0013{\u0018=\u001agcY8\u0018A\u0001\u0004ZЃ\u0003\u001d\u0014Z3E'\"\u0002x\u001a/\u000b'-V!G\brOr˳\u001e*\u0011^;BוdՍ\"\u001ef]tD?\u00142CA\t\n\u0003\u0013J`VI\u001fڌT/!>\t\b0KQ72$܂B\u00112􎬪C*n-+~O򠢳\bTr%%]#/KӻbKu\u0014$R8ot\u0010I(A\u0006G_RxzJ\u0001VL\u0018!hmN\u001aJR\u001a\"ȸOJҵ\u001dj5KxU\u001dLWt͸3]b5\u0015=V=*\u0007,gd\u0013\u0005r\u0017Oy@/A-v7i\u0000\u001bp\u0010Dqp;\u000f\u001dXpMOs \u0003\u0007o/\u0016\u00077cS\u0007XO\u001a.\u0015#!I/tuA\u0010\u0018֤pJ\u0001a(Qv\u0011+v\u0011\t\u0011\u0017VKMGL<V\u001fM\u001d;1t\u0002*B\u0019q9\taR?bZ{?遪)\u0013\u00015L,\u001cD%,\u001f:&E\u001eͥ[c\\J\u001dR\b\t$%\u0002\u0003\u0017wVh\u0012\u001fI\fҜ\u001c\u0006\u000eқPi\"T2\u0012-Ɖ(7Іć%Zx\u0007p\"\u0003\r(\u0012b\u001a9`k\u001c\u001a$\f\u001c8\u00173Q`H\u000b\b\u0010HC&\u000f\u000fe\u001ao\u001c\u0013\bUt\u001eM\u0011BA\u001e\u000faTcF$Qg\u0006\u0016\u001avWKu\b%ok^[ڲ\u001bN<[77\u000eR7r̓%B\fR\u0017A!H=Ŀ\u0004s- Gҷ\tQ:J$\u0013[&pc\u0011e\"v\u001a4*\u0004n\u001bHE̸\u001d,kqVZf+-n͏&DC69n\nGF#E\u0012Mۆ\u0002b\u001b$Xm\bzS!>HΌf(G\u0015!!\u0014~X\u0019g%\u001c~xY\u0002g)$~g%,~Y\u0002g!4~\u0019g!<~Y\u0002g!D~\u0018Yg-L#/bsJ.\u000e\u0003al捕ܭ\u0018^\u0011(?\u001f\u000e\u0017@tÅ\u0012l}ص|`\u001dۅ\n1\u001a(/\u0006K*\u0002S\u0015(F=^\u0016\u0003ً\u001fAQԹ@y\u0002奪\nwH@\u0007V\\|'>P>iqh\u001a0!Ձc('\rO\u0003Er>\u001b\u001cW[\u0019[F M0\u001e`SF Q\"3\u0010Q7\u001f꬯~ة**7`Ws&I\u001eTP\u00113xWeCG\u0013bX)_/X#Uq~I-\u001c2\u0016z[=n\u0014knQ0VN\u001eUqK\u0005[\u0015\u0018)]3z*:z\u0004v\u000ff\u000e\u0007܉\t|lUηy\u001b\r*F灱\t_;88\u000fQB\u0018-8)c\u001cmpZľ8\u0015beJ11Pf\u001fBm\u001a\u001e\u0006\u0005~Cruf\u001c\u000e^\u0003\u0015g\u0014=IXLȘ\u00047\u0000O\u0001:F\u0010Ƃ\u00184\u0002(0IŘN\u0011\u00190Fէ\u0012\u0010F(l'1䑱)14\u001d!\u0018Bs\u00011(t$m\u001bG\u0003+ɟ6\u0018{p#0\u0004x|\u0010QR5G;d\"\t ee\u0004\u000f1\u0019T\u0006\u000b(*OL(xό\t'Pb\r\u001e.Dl:3i]\u0003[2֖uES\u001bQ!]QkU6!JGz\"69zՄ\u0018n,blZĎܸ\u001dÒb9&phD*fc!r.-n\u0016Jlmi1!lr6\u0015zVFJ%b\u001c\rGo\u00056\u0010I\u0010Bl}\u0019Pm{\u001bFQmqm{c:}~a(\u0011]8yݝ_p\rw<Y\\1D\"}q8}UrwU_\u000e}.}W\u0002_pzQ\tn\u0004w^9ihj+=Ez\u0012([m,^MýL;Lf\"ye;\u0007 wQ\u0019.A2]T\u0006\\ w᪂܅\nrwGH\"\u000fVZA|\u001dܓ\u0016W\u0005\u000b\u0018.\\U;ݭ\fyN\u001eÃRHy\tr,*By};o\u000er\u0017A.]\u0005 \"\u0002\u0015A6Ƚf̲A\\\u001eє\u0017\u001c.*E]\f)/S\u0011kܓ1\nr\u0010.*\tr\u0017Az\u001dU3\u0002\u0007\rrocX6\u0016'\u0016,\u001eN4s w>Y;o\fr\u0017Ab 2Peh\frA| qG\u001c\n_A苦 \fJA\u0015`UA\u0019 \fuA3\rro\u0019kX[ƺ\u0019\u00047qL;_ waW\u000er\u001f=oWlB\u0012Dlr\u001f\u000f\nn\u0007\r$cB\u0005${\u001f\bFCc7N26^C'\u0014J',E揔L\u0010ˌŐTB:֔:1LE\u0001Xd%j/ssl8;\u0004g^{ٻ%k/\u0016s7n,$_\n\u001aDYϸs6$Z5\u00166]ptMW:ܦ+Vm\u0015v:m]TYk$\u0011[縭9zc\u0010[C\f`&M 95J,q]{%wI]9]{鵳:ɝ\u001a>e܂[\"eXdN99?a|kB/aþgP0ʄ;IFIK\u0012w1\r&\u000b\u0018\u0018G\u000b̺\u0002`0\u001d Q-9\\M)L\nKU\u0004s\u0007\n\u00135,xh\u0005T*\u000bT\u0016\u001d%T\u0016|.Y\u0005ϒY,\u0005Y,\u0005ϒY\u0005_*d,H\u000bdZ\u0010ϛ\u0013Y2!%ĳxL\"H$\u001bb@?M3٘&\u000f\\Sդɇ\u0007q<>HЭ@Ց3\u001b緔<\u001fA㞓4T)@TI\u0007\u0004j?h[*hϚ\u0013퓩%'?,Iq\u001cХwY]`%\u0012ߛ%V\u0019~{\u000b\u0010\tT}\u0001&qMhy{^L'6ϚY\u0018,Ϛys}\u0013+uf4kYױf]{>DwD\u0004|\u0010\u001f\u0003b@\u0019R\u0016j]\u0015UP\bށ\u000037&ft\t\u0005l\u0002E8_VB[\u0001H {jM|V}b)f?\u0006piy~yx\u0006ޥ\u000bŸChgeCGL\u0004x_]PHgC\u001a\u00195\u001e?*B\u0012\u0003܊:V0\u001a7`Sv`\u000b\u0010\u0002\u0004/2\u001a\u0002aC\f=JFj\u0003O\tX+\u0019㖩f\b\u0013\t'\u0010\b\u0001P\u0017 \u0004r̤9d\u00120\fsք\u0001\u0018z\u0006@nrء``AG=1Gsڀu\u0003*LP\u0018`Kx\u0000Q\u0003d@AXbփ\b\u00013\b\" \u0018p20\u0006`\u0019\u0003\u0001\ry\u0018Bif\u00160;\u0002\f4\u0006H6FcVnh\tcx\u001aJ\u0000\b\u0003t9:c\u0012\u0000\u0002\u001eL4QIrlK\u0006(@JdD\u0018ģ4\u0018C1ĳ\u0010d<\u0005f2pdCb\u0018a2\t\u000b;t\n\fă\b\u0010\u0014\f0\u0014t\u001aX䋯\fe`\u0019\u0015\u0005\b.\u000fs02\u0003 \u00115\u0014ܭ\u0014xUStX?ACWnrbJ\\6i[\u0001\tHu|6F\u0011 84\tA\u0013\f\\W#l1\"݈.wP \u001f\r^v\u0004^\u0003\u0017ӞVK\u0014q\u0011FŹ\u000e\u001fetzw$=\u000f\u001d\u0011d\b8ށI`GEk]/m'\u0006ԇ\u001aJ*P\u0013t\u0005x %9Oՠ.l]*\u0002*\u0005\u0018[@\u0005x[@Ŷ*\u0002h\u000b\u0016Pm\u00015\u0016Pcl\u0001\u0015\u0002h\u000b-\u001al\u0001h\u000bF[@\u0005d\u0016e[@&m-\u0010\u0016\u0002\u0016P\rJ\u0002\u0016P#[@\u0016m\u00015\u0005Tl\u000bVj\u0005T-Z\u0002\u0016PI[@l\u00015\u0005T\u0016v\u0005ئm\u0013@x\t\u0015^-m\u0001l\u000bVle\u000bF[@&m\u0001Y\u0005d\u00166\u001d\u0002U\u0014Ӷ@ui[@5\u0002U@\u000b[\u0011jZ[,\u0016\u0018j~kN\tU82\\0\u0019d\u0015·l\"~:x{ä\u000e8\u0014\u0003\u001b@\u0002M\n\u000f\t\t\"\u0007l\u0006\fQ>\f0CF\u0003\"`W]c+X+xlW]v\u0005\n>ޮc\n>Ʈ]v\u0005O\u0015v\u0005k+x%\nV+XҮ[.\u0015\u0011j]\u001b\n`W]k\n>+XѮ#v\u0005oeWf7\u0015]\n+Ȯ#'j'\tmڮ\u000e;aWT0\u0007+x]\nʮ`\nhW]v\u0005K\u0015զcbڮ\u000e7mWfJ\u001ahaW4BMiWЦka\u0015<\\\u0000En0\u0000o2\n7+\u0002\\\u0017X\u0015.+pNaW4]f?+X\u000b\u0002\"\u0015\nk\u0015D\u0000v]^\u0012kA\u0018jc\u0000$&:,\u0014\u0010@P0\u0010\u0012D\u0012So/\u000b\u0018@\u0016g&J\u0007tb(\u001ei\u00042ƶ0ؐ[[\u000b\u001a\f\u0013D\u0016\u0003\u0010\u001e\f\u0012M\u0001\bhl\nΊAF@wP\u0011Jt\u000eP\u0004\u0014C\u0013VA95\r3t\"cES\u0016X ۤ,@\u000eJX\u0014m\u0016\u000e,,Ν<rjM\u0016{⤅)6IqR\u0001>Ίe-2Z_)DRKL$q6G\\Xޜ@kﭳT<>\bwz\"\u001f1{ʝ+o6N+,\u0006\u0018c\u0010q0Rc 0AfA+Ҳh\u0004HCo(B\\P\u001a2t0A\rD></èjʰ#a\u0011b\u0012y\u0007t\u0017\u0015Q& \n*g\u0004l*G\nT\t+\u0018'u:jU\u001cQխbr*N\r.R\u0014'iv8PM\u0007s\u000f=vOFoo\u0006Ia@\u00159\u0006z\u000e$1Rmc\u0000\u0017xKT\u0004 2MisV[w*~\f\u0011\u0018\u0003\bn+\u0001قJ\u0004 csd*0ABWQA\u0016u86za\b`\"`\u0015h1\u0000ypDbX\u0011\u0001JzD\u00101[\u00032E VA\u0006'\u0001ZF+.KNd\u0013tV\n}>\u0000d\u0005yAPQt[TFRPP\u0001\\\u0011y\u0002\n@25TV\nb$)\u000b.k\tHҒ\u00061DO\fk\"\nʲ̂v\u000e=\u0002\u0019TL@-\u0006(?\\\u001ek鬻zU\u000f\u0003ImF2P&O\u0004T\fܜ,#`ftUwv\u001etAͺS7}>\u0007\u0014Ny˟E\u0010A洴,2g\u0011F*k\\d\u0000r t\u0005{D\u000f툔\u001cCj#j\u0004PK.a,\u0013ki*v\u0011\tcOz18SJX&\u0006\u0002s\r^r\f+@i/\u0004mM.#&TUwnr&Ū^s&q\u001a\\g[DsR'RDS\u0000\u0011<WP\u0013 \u0005\u0017/sKPOnr\tct\\KCg5nri7\u0007\t,2L\u0003HQ٫\u001cC$d^\u0019~r\u0002(QNNi\u0013\u0003uժ>;Ojٴ;<WryS9ͼ\u001dI)n\u001bJ<BYxuO=Ux\u0018j1@yIٵ\n@\u000e\"\beY\u0014_\u0010AQI\u000bPJPE\u0011\u0000) \u001d\u0002/tV@\u001d\u0003z#a\u0011b\u0000\n\u001bJ\u001b,s_\u0019N+(4Da2`S\u0004b%\u0012*M\u0004T\t/KLz3tժ;ObUoLs>6w\u0004e%N\bҏ1U'ɷUMa\n@\u0001(\u0010\u001c.\u0003\u0001DkJ\u0001f\u0014Բ$HS\u0019\u0012,\u000f\u0010\u00196\u0011Pae|eI\u0005P\u0019v\u00041(hc\u0000*b%uVS\t)\u000bz\fU!#: \u0014\u0001`&4UsvNr$՚sy\u0013ZCgW=+Qs }jS<k\u0006\u000f\u0012D\fIcE\u0007\u0007\u0000ZG\u0011\u0003qQ\u0002\u0010$`\u0018\",\u0001h\nIW7cO,G\n\u0014Ь\bc^<\u0017'(\u000f<\u0018\u0017=_\f\u000b\rd?\bz\u0015d%O\u0006\tp,y\u0007\u0005r\u00031j9U句[\u001dΊNY^R=uvr{'_w\u001eJ;̓u~=\u001e\u0004Ԩ3\u0013fʝtWN*\u00014\\:\u0015\u001e*?\u001a\n\u001f̽8\u0011R,\u001eӟ\\\u0005\u0000VE?kTks\u0014\rwn\u001f\u0003jF]Fs.\u0002\fD8,C0F|\\zH\u001d3/:\u001eE\u00132\u0010<\u0007L\u0011>¥b;\u001e0|N Nڞ`Hn\u0016cŌOZ\u0017@ӫ\u0013\nGS\u0001dܪT\\\u0005\u0012\fCӥhEJT\u0006&xJ8mOYq\u001d|tdھ\u0000R$ pC6\n#-D甅9tt\u0018\u000fT\nOh\u001f\u0002\u0012Kbh-YG5\u0003v,?WVT]\n\u0014a%\bieI\u0015\u0010M+.<˳2\u000fa(\u0005\u0010qy\u0010a\u0018:\u00187Dp& &_^Jm!\u0017\u000eJ\u0013\u0004kKl\n5\u0000M)ז[Tuq\u000fƫ8Z\u0017#\u0000 a̰\u0013\u0003AcJ\t\u0006XhJ| %g0\u0000߹ɪ_HD,\u0019h*\b\u0013\u0019'\u0004G!1A\u0000\u0006@m(Qi\u000f\"`\u001aoTR>\u0007\\\u0003n\u0014?\u0017\u0004L'@\u0019(<\u00001Cr\u0004Y\u0000o\u000b\u00143\u001eơ/X\u001fX Uֆ\u0000m@\u0000/MO\n\u0005RX\n\n\u0012:xp\u001aUJbOHJ_8^oQD#a#E\u0005B&.\nzZLO\u0019hp[rI_{Z}SPS##X\n\u0016<& TZeG\rrU#m\u0007\u001dt|Ut\\xU\"6G3\u0010\u0010m\"\u00149B!\u001a#\u00141D\"B!D(\u0012@\bhP6\u0011\n\u0010\u0010\u0011\n\u001cH$\"\u0014.B!\u0011*j9\"\u0014]Pt\u0011WN6\u0017\"\u00142\u0015c#\u0014r\\BPȆ\bLF(d:B!\u0011\nPȆ\bP1\u0011\nPbB&#\u0014!B!#\u00149B!F(ĸ\bEa5BQ}^P\u0016\"\u00141QB6G(dCBPTY=PȺ\bh\u0015u\u0011T\bO}D(PPԵ)oJ6\u0007(-D`\u000ef:@!}|AK\\z\u0001\n\fPȺ\u0000\u000bPd@\u001c\u000e$\u001d\b\u0014J\\)\bP\u0000Euz\u0001\n\u001c\u0001\n*@!Z\u0005(DsB4\u0007(\u0012 \u0000E\u0002\u001a\bPTǕ\u000ePTi\u000ePxb+\rwC*@!\u0003\u0014KsO\u0005<mq\u0001\nY\u0017\u0001\n2@\u0011=E>BBN\u0011h\u0006(|\u0000\u001b\u001fmB\u00109\u0004A\u001bC\u00101D\"\u0004Aۄ \u0012@\u0010\u0004m\fA6!\b\u0010!\b\u001cH$B\u0010.\u0004A!*j9B\u0010]\b\u000bAt!WN\b6_{ \u0011r\\\b\u000bA1!\b\u0010`\u0010\u0004K X1\u0004!\b\u0010`!\b6&\u0004!\bV\fAd\b5 Xs\b6 \u0010\u0004\u001d\u0017> K!B\b\";\nA\u0010\u0004k\bA!*'!\bV\u0017B\u0010.\u0004j\u0014`B\u00101\u0004C\u0010U\b5 X2\u0004B\u0010.\u0004!*\u0002q\b:t\b5 Xs\b:=\u0010\u0004k\u000eA\u0010\u0004k\u0015B\u00109\u0004AC\u0010\tD\b\"\u0001U\rATI J 4J Xs\b5 \u001aV\u000bx\u0010\u0004oM\u000fA\u0010\u0004\u000fAЖ!C\u0010Mql\b\u0014\u001d=t\u0004Jc\u000b='i~O\nֻEWqzB5JkxtQv\\\nddqx\tʝ9Ta\u000eb\u0004U<l^Xr^̓\u0014y\f1\u0012ǟT\u0006Z\f@\u001c f@\u0000a\u00150,\r2\u001a,S*ܒ9=\u0001\b0\u0019xtB\t|\u0012\u0013>,\u0003/uA\u0015\b20ZA\u0006u\u0006\u00194=K\u0012/\f+\u0012e\u0010vHȥRjUvF\u0000\\CWA\u0002XN\u0005(Dh#c\u0011KZ\bktx\u0004SU%\u0004K}[\u0000ɇIB\u000f#\u0004bceI^\u0011@B\u0017a4Tx\u0002K\bk?\t\u001eTx;\u0015ީNۦ\u001cT\u0014;+O8Yy\\5͕4X\u0003A\u001dCx6% Yc.aRZ46UK\u0011\t\u0018\nȤ[\u0018!\u0012j\u0004hN@Ut\t01\u0017tZҝYAR/&(m.d\\X\u0007I*\u001c(8ZkHo\u0006\bE\u0001\u0011\f\u0018'\u0000bԘbGwܘV\u0001\f\u001cg0\bó'\u0003lV\u0011c@8\u0017O\u0000\u0003hra\u0010F\u0000~3\u0016\u0007t\u0013eq\u000f\u0011nH#\u0019$\u0003K\r#,{\u0014.\u0014\u0015\u0004ט'Q\u001e\r\rnm\u0004\u0018u\u0019HYJ\u0005\u001f0\u001a\n08ǣ\u0007\u0006c\bF\u0018Pa\u000e\u0015A~\u001e\u0007Ad\\1-kJ\u000f(h\u0002H\n\u0013@%#\u0010\nN㑅؎`da\rVZ#Τ\u000et\u0005.)f\u0019\u0018GMP`, #\u0018S\u001b2>PK0,^\r4p\u000e0\nO\u001bj@)$\u0001S\"\u001d\u001d\fp\u0004t\u0016\u0017f\tDKt\u0019R\u0000sy~\u00010=C\u001b\u001d\b\"]x\u0004A\u001ee\r\b\\2F}yL,\t7b\tL`6\u0004A\u001bt\u000fP\u0000-ފ0,W\u0003\u0001_\u001bRY`q1\u0016k$4!F\u0018G\u0016\u0018ER\"vC\u001cV\u0001\u0002#\u0018\u0018̑S^`b\u0006b\u0007\u0018\u0000ꄂf\u0012~Q\b7\u0018x8u\t˘s\u0001'\n\u0013TM\u0001і!\u000b(ib)qz\u0018a] Z^Qy\u0006.0̯\u000f F>n\u0004(\"8$#\u0002\u001bc-qWO\r\u0003Bp|ǵE`Q\r\u001cG(L$\bM-批Q\f\u000fC<8̣`q|\u0010,V\u0003\u0010\n1p\u0015z\u0003w4g PAL|\u0004~\u0003)c\u001d`\u0011(\u0002\u0005\u0002[I31\b\u0005ѮC;\u0004\u0000X\u0019\f9\u0018i\u0006N\f'A(B+\u001eF\u0001'W0 c\u0004\u001d\u000e\u00106'a%0h`\u000b,\u0003f\u0003Ìg(\u0010zA/)\u001f+3&\u0001ֳ\u0001H @n\u0002,Nh*\u001d h\u0001EѪPR)\u001f\u0000~\n\u0004>\u0007lt\n.\u0002\u0015\u0003\r^,\b1{L\tFhp\u001d<\u0010i\u0016\u000b\b\u0016DkĢj6jZ<Xh\u001f8\u000b.(~ΝV\t\n\u001d\u0006\t\u000ff\u00045\u001cg\fΊJ~\u0006f\u001c\u0006\u0000\u0007\u0011!)x`Yлz\u0014\u0002>\u0018\f\u0001%y\u0001\u0007-R\f\u0010h$M\u0019\u0019e7Q\u0014>\u0016\u0011ʤW\bx\u0011\u001a( \tք7@B\rL :נnE*P7zbZ\u001d\u0018\u0003\u0005D/ @0F@L*S\u0001!$`r\u0002\f\u001d.\u0005\u0000ƌ\\\u0001hBRy\u000e(l!\u00060%PXd\u0002\fD[\u0005\u0018*`a\u0003l\"5+0t)b\u0006L<\u0002\u0003\u0006Tfn@\u0019QكJSE@\u001ao_sun\u0004h03`n\u0000kQV|:R\u001a76g\u0006MtI\u0017E\u0013p\u000fa|f\u001f\u0007\u0006$(0\u0000\u0002Y\u0018\u0000\u0004l\t .M+=\u0002R\u0002\b[;[\u001c`PK\u001a\f#\u0000mj@!\rG[O/Q)dԛ\r%\u001bBw\u001c\u000eJ\u001b\u0002IyKF\u0002\u0012\u001c\f-pbUᨑ\u0016\u0001C(jC\u0013qyׇԚ;d[\\˽\u0003\u0004^\u0003Πbg\u001b4\u0006⤦+!`\u0015\u0018Nyax˘MLd\u0007Fu/,ɒ{\u0013=\u000fa0\u000e\u001e[a\u0005K2@d\u0019G`\u000e\u0006e;\u0018+h8\n\u0010.*ŉ\u001a\u0004\u000bUh\u0014\u000bwf:(dm\fT3\u0003\u0018\u0006TcRB]Q\u001c\u001aaW)U\u0003\u0000,\u0000^ܡN9\u0018.S(G\u0004U\u0002\t|F\u0019X\u0013TK\u000ec0\u0001\u0007lA42u\u000bށGE+\u0017\u0016!ELՌ;\u0001R\u0001SjN'\u0018\b\u0002\u000b\fkC'hLV\u0006(&\u000e|\u00150\u0010Yy\u0005OX\u0014\u001c\u0017y\u0018{mM'8%f\r3]\bFd\u000e\u0007;0\u0000M\u0014\u001d\f\u00167Ư\u0017܋D\u0017hwrf Vв\u001aWY֙\u0006]\u0004R\u0012!5~>\u0006\u000b\t\u000bsK\u0002\u0019\u001dG\u001f\u000ezR^~\u0001\u000e\u0012Ë\u00169\u0019\f\fr;Sgz\u0001\"d&{id>4H5a0\u0000\u001f<jE\u0004=!Нa)0Ǔ\b&wڗG\t\u0002\nAz3\u0012. XG\u0015\u001c\fy\u0014\"W2&0\u001d\u0014\f\u0017\u00190\u000e\ft\"Zl˭;\u0002X.~#]7uk\u0006\u0004S?r62\u00144,\u001es\u0002\u001e<Ym25&TPc\u0018E}s+\bq@\u0015q0< v\u0016|qsQH3@'yP\u0001\u0015:\u0017wWR0aN\u0003q=\f=N\u0015>>\b\u0000\u0001\u000b \u0005$A6\u0003֞\u000e.>f@7\u0007<XDЂ&`6o\u0013T\u001a]\u0002\fa\u0012·\u0004^3X._zCC\u0003\r\u0000O\u000e8}\u001dLaXR0XS?\b\u001f<j+(fXFeՑ\u0015QtO\u0002\u0019\u0000+\u0018^+0N\u0004F-i/5z\u0014\u0000\u0005\u000b\f%A\u001cᙳ>e&ƾ\u0000\u0006R\u001c\u0005pt%4\u0010tsc)E֨\u0013S-ܻ|\u001f]mvgt]w\u0003\u0000\u0018\u001e\u0005A r\u0002*\u00041\u0018&dv\u0003\u001a\u00154?0!.p\u0003#\u000b\rZ\n\u001bNx-\\\u0005~n\u0018\u001fx\u0017+^A(с\b\u001b\u00180H\f63;}H_\u0015X`ă\u0019/_/\u0018͂`C\u0005c\u0017xX\u0018\u0014C<\u0007\u000f8py3^Vq\u0016of)U`k\\J`ãbeFs;i\u0005\u0003\u0006>m4v*\u0018@\bh\u0006>\u0006h\u0007\u0019hapEc*$\u0018->\u0018\u00190OxZ]n\u0012/ F=Ëxʭ{\fт?s\u0005\u001eś4A(Lۑ}\u000f3aGqhʢyA(\u0011\u0002\u0014r4sǹh}\u000f4\u0002Ç2\u001e?|dAyp@Fl=X6\u0001z76\u001a1\u0000\u0015\u0011ɳ8\\q`[݅\u000e޽\u000f\u001c1\u0014pQh7^?b\u0016\b\u000bx\u0016`]\u0004\flE\b`m\u0005\u0005ll\u0016\u0002SS{NSJ>Fp\u0016no\u0002W\u0005tc@[\u0006zFhtlKJɚ)S\u0011\bj\u0006:\u0005T =\u0005⁶\u0004K\fv\nr\u000fMyj]\u000b+\ns\f*B\b7%Y\fʚd#\u0015I^y\u000e\u001ef\f%-$ؚD\u0000*SeG3\u0005ƭIU&.\t\tB%\u001f&\t\u0016\u0018;S`HiDM$+\u001c^\u001d\u0002\u0006/FP)\u0000og@'\u0007_\u0004TEJ\u001a)\u0018/͔l\fU\u00022SX\u0002Vo\u0012^Cـj\u001e\u001c\u001b\u001db&\u0018\u0011`xp$*B+N\u00059kP \u0012k$\nl'gT9;\fV\u0000Maܕth\u0002.`\t#\u001d.\u0001\u001b\u001e\r\u001fYuP\u0011bdP\u0001_n㮝BKz1\u0006\u0006S҃83\u0019\"\"~I`,\u0001I \tE\u0007\u0016m%^g\u0003\u0018+Ӳe[\t/\u0001'6H}`Y0yns\u0002QTN54c0m#\u0002TH{\u0005.\u0018ů6\u000e\n]\"Boj\n(\u0013\u000bP4@\n-\u001b%bEbuz^!غx\u001dҒ<otrB\u0007V\b)2;PI6(iph66\tu!$\">+Gzݞ\b\u001bk1$\\b1DNp\u0001Wcr\u000b\u0014\b\fSig\u0003ka՘ui+\t$2pNM\u0004I\u0015Z6\tT1:l3\bL\u001b\\\u00030N.\u0016az4\u0006\bC \fܲ`ߋi\u0005\u0015u\u001df}\u0018\\$\u0007\u0012u\u001ey\u001cwZ]6\u00152V\u0004\u00060&j\u0006\u0000\u0006R\u0012D㺫\t\u0017A\u0012\u0016n\u001a\u0011TU$JMS\u0015fOzΫ`~74\"#զbc\n\r<RU\u001a橂%&B<1\\&U\u001aO)Vn\u0003\u000b'\u0017Q͇:u_Ta<¬{[<2?9m_O~3]\u00133]7w9+\u001dd\u001fLCk4\"0e\u0013AOZ˚i^>{?mu\u001b\\!\u000bZ\u0019\u0006+S3*\u0014%1ܾ\u001a8U\u00027*~%?kY\u0004m'h;A\u0017F4\tڂG2oevX@$oeU<\u0002\u00188hQޑT#̿6x\u0012,CG\u0014^l\u0007wOk\u001aAj:+'j\u0017!\b!00\u0010LT3U\"i/\tYd;Gk1rHJ;\u0018\u0003e)\u0006\u0018\u0006'\u000bS5\\\u0013涪O\u0013AUJLKNbz\u0003K3JDTKUJ0j\u0018ň\u0012]R\u0019قiF>MP\nD;UKJ2\tIIhbT\"UD\ttkB\u0006i\u0003H9\u0001)\u0006IA5*xbKB9\u001dUɞlWS0ɾ\u001a'$'R\u0011\u0013&n$E4Ԅ*\u0006L\u0016\u000f*\u001b\u000b\u0005U}\u0015+0\u001c\r\"Ih\u0017A\rO\tnJ`l{hB4\u0006Ҟ'jB\u0019E\u0010Dvo\u0019јߣ~}Qwf(eM9Ю\u001ddI(\u001dGE㣢СxM95m6\u001fM{0?ȀI\u000bE>l/]{\u001c\u0001?\u0005^ǿw/w؁\u0007O.>\u0003M+o>s\u000b\f\u0017\u000euw\u001dg\u0015ЄC\u000ek{8V\u001f\u0006\u0000+<q\u0000\n\u001f\u0000\u0000\u00168\u0014n;9wSY\u0003U\u0007|ou9K.+^\u0015m%\u001a/vѵߵߵߵߵߵߵJt񽚲r-Piӆ\r\u001baCtlV*[iذiŗ^vŕre^<y\u0003ظ\u001d;o`Jhnع\u001b3;yݳy94{1\rl|[}\u001e\"/?#޲|KoO>\u0017SO>\u001b.\u0002\u001dlz\u0019'y\u0017ܳ<청|\u0015Ǟz3/̋>ؽmܙ＜yO\u001e?d̞\u000f\u000b/<\"/'vk5\u00134_\u00136i\\c5y\u001b-\n&\u000b\u0014fGz\u001e<q\u0004\u001c||p.O3\u000eO\u0013B>\u0011\u0007\u001eo\u001ck\u000f\u001f£\"-aN讽L\u001eo{\u0011w\"\"\u000fK\u000e?7ڟcO&!{hn^qMZ|8ei8'Mb\u0014\u000f$j\fj$Di\u0001\u0002m{{v\n$\u0000n\u00125brq\u001f#Q0C]\u001cv\u0001<ry}N\u0005uMu\u0019&]Ia\u0002/k#@!p\f\u0019(?\u0001\u001e<\u000bV޾0wbx\u001cYX__d\u0014;22//G3\frs:a\tNXvr:aĉ;]{{\u001e:y#,^z5쮽vC\u000f.80?\u000b\u000fz\u0007KB?:\\\u0017;\"τܗ&V%\u000b\u001fG`\u0002n\u0014\u001b,A\u0002O&x!\u0016\u00054\u0017V۩\fqbu\u0003^\u0012O#6\u001bQ`\rÉ\u00150釂|(*Pyt\u0011.\"Tx^bn\u0010t\u0002\u0014<A*iix\u0015LU&:y\u000en\u001dqx=a;!7\u000b\t<R*p˴TJ}\u0002~B\u001eq*R@̯J$pvOURL\u001e\u0000\"@{\u0002G`\u0012\\4n_#ٔ4\"\bZi\t\u00166Sql˲\u0015\t$\t#\u0018E0ᰒ\nXX\u0001ĺ\u0002\b%ΛG\u0017tJ\u0014JQM\u0011\u001b)\u0016%51S<ë`\u00026T˼(\\Ԣ4 \u0019<\rƅ\b\u0005=w\u000f\\\u0004D]21&1G\u0013wOǥܽ8N䫖V6\u0006\bٴjmj@Uma6\u0001\u0016\u0018xţKڈNY1jVݪժfW rQhNs\u001a\u0005o\\\u0012}40#\u001dwd\u0007\r$*>\\Jw/edq4Ӊx\u0012kg7\u0000ςd\u0003S{F\u0014\u0006\u0014IxL\u000ea\u0011x\b'WY6!Y줇9\r\rw\u0006/*߲P/UB߲\u001c\u000b\\V^\u000f\u000bSBua.LՅΊH\u001bg-\u0016)l0|7`N\u0006MN$\u001aLUm\u000bw]\u0000t\u0013h}E\t>\u0017r}\u00129_G]UA\u001dAKA)\u001b߸vP\u001e\u000f\u0011E\u0006R\tNwr_\u0006\"s&[\u0001s\u0007үE_\u00182+\u001a\u000f\u0013\u0007)s<%sSp)\t-\\\u00157;a\tNw|nPMg7>\t^_{o\u001dtwWo}\f\u0018gѢɨ\r{^MG߶п\u001d-+9~GQ:e\u001e\u0011fQ\t\u0002Uw/\u0017U}i8M~Co[t+_t\"\u0013HDjt$G\u0005\u0013\bB\\Xϥ bJ\nNT\r4\u0014{Ujn\u0004d4J\u0006\u0013I\u001ee4\u0019MB\n9M_d,_$rH!\u0014rX!j,gJD\nDVyi6;%ԳN5&i\"\u001ej834\u0004J0\u0004\u0006pT\u0006n\rKlk'_;SFE|8\u0012\u001c)zBTG``Q\u0004)iKTkTI9֝D'\nWi]\b\u0005^*|}\"O\u001a)\u0004L\td׭\u0001]\tNw\u0002\u0013諶x\u0018mXo)o?v\u0003SC}>S\u0000V\u0018^*\u001d\u0002Lś\u0001L6\u0003XCf^FBT\u000b}r7/sY\f\u0014\\^\u0019\nS;j\t\u000bJC\u0001(\u001b\u0000\u0000[\u0003v\u0001|k'_Wi3}Zì$f9\u0000#tn7Ke\u0010D>H5\u0002S';މ5\u000f\t\u0012C Ռ\u0019\u001b\u001f[v<ixn\u0012Ћdgc\u001e_ՠ~';\tNhnJ,X<m\u0001={wѩ.蝇MVTq\u001eUK\u0017G`&9\u0001Mw33C\u0000i)R3F0Ó#Ij:@7ƋR6W\u00044)^Mv=*\u001ap\u0017MMΧU\u001a#Q\u0010,\u00180-s+QnF\"p\"7D\u0001+`)p˼бӝ_*ůMC\tp;\u0018!~\"qJH&8KU\u0004\u00063<\u0019c\fǄ\u0019H\t\u0019SL\u0012)UJ\u0015\u0004f2\rK!шN\u0004R\u001d\u0002\u0015\u0000Q\u00108\n:\r\u001d+\u0002q}U\thJ\u0004:5tFX\u0013Hame`\rj\u00075\u0003,G\\}R\u0007T%\u0003PM=M$\u0000a\u0000}#4e\u0012\rR\u0010'Oӽk)l\u000eÓ\rW@-jF\u0003S:U@\u0010\u000barUF&#XbC\u0010#\u0012Kã \u0015ыpqPyZ: %$jQ7\u001a\u0016m9\u0018Bb\u0004Eq\u0014QiX,d\u0003\u0000qA%\u000bI)x־Px3R1LbQ\u000e\t\u0001\u0011!3\bS\u0012ˑJDc\u0011\u0013H5p\u000b\u001cT*X6\u001d[^s=Kp\u0007,5\u0019&F\u0017P\u0011COᧀin-K2&YY3)eLmh\\Zv$\u0010o'\u0002I)\b*\b\u001dq%qLDKUB'iaC~׷-\u001e\u000eJYZ\u0016\u000eNžZR\u0012n\t[=vr\u001aC9R\u001eK\u0005@Xu),`fޙ\u0010:sָ\u0016&頗@\u0012@\f\u0002\u0010\u001bp\u000e8*;^\u0007UA\u0015P\nZ}%e޵\u001d}]{yp\u001cnk:X.Ddrw\u0018Kh?t`\r, \nh\t\u000b\u0010z\"ra\fC\u0000\u0004\u001aU$Fg0<\u0001\u000e\u0010TV/\u0002-c\nD\u0001\u000e\u0014$V;\u0000\"\u0010Z\u0000\u0011\u0001-q/\u0010<F2d^\u0013@ƍk8&\u00041Ռ/}Ǉqr)\t\\µ0/J((̓\u001c\t\nΡsy0F\"\u00042\u0001T[LP`F7^++.,[B\\U\fr<\u0016=\u0007\u000f*yI탬Z=1rid8\u001d|\u00159WD0G\u0019L5\u001aE\u0010`L^4L\u0013\u0017')\t\u001b\u0006)-R1!9`LOI`\"Xj\u0013.\u0014%07/sIj84\u0002`\u0005]+ne.J\u0018R#>F,-\u000f\u0000u*\u0001\u001by\b \u0002\u000bjJ y'\u0002ZHC#\u0005\u001b\u0001SıQN4_k)B\u0015!\u0019ea\n1&&;PG\u001atXB_\u0007J`\u0015Y`l7\u0005'҃_\u000b~ɐ\u0000\u0018dE\f2sS\n\u0001\u0018\u0013>K8eޢ\u0003\u0003f5gB`kI\u0003\t'K|pu`VT+ɹ-P!\n\u0019,,u̬\u0000Q\"PC)\u000b\u001d0\u0010\u0001)>0ظZJ]p\u0016䕰\u0014X»\u0012\f\u0004\u001fDɀ|Ro\"v`!F3<R\fĆ\u000f\u001a\u0003x{KXVn\u0018\u00151\f\n#4.3., ;\u0000K\u000023\u0004VD1]!(\u001f\u00110\u0016'\t)8`\u0016p'\u0019\u0004\u0019\u0018V*\u0018\u0001'5\u0018d\u0003\u000fWcV\u000f8\u0012ŀ\u0002\u0002+G\u001c\u0004GF0 U@x\u0003%x\u0011z\u001a{gs\t.I_Q\u000b=Bv\u00070B00\u0006hvb0<A\fE\u0012ʁE\u0010\njvP8~tI(S=q\u0016ʔd\nt\u0000*\u00188ஹ\u0015g\u0019.=+%R\u0014uYD5I*SL\u0005_\"HD\"`ČdJ] omTM\u0006\u0014^\n>܋IJ2k۷;\u00116\f\u001a;z`~\u0001kł\u0016\u0001W&\u0007\u001a\u0006\u0007)R\bIxfl\u0016\u0012ơMc\u0007兤\n\\\b#\u0011`\u0019\nX0A\u0011\u0002\u0014\u001e&zSL\u0002|A41#&&\u0001\u0004[s񙪽L՝?l\u001d|ե..-Ց\u0016\u0007pu\nhh\u0001:/j\u0015VXZa\u0013+MXPX6)Ɔ&GWSqU!@Mg?1wN\u0018v°\u0013MЯj\u0006\u000eiK(:\buX$\u0005H\nbԊER+\u0016I'\u0016;؉WXgXlM[ҭv%j,\u0018CkZ|\tNv\u0002t\u0005=\u0004iMG\u0002v\u0013=IIU+@j\u0013\u0013\u0000\u0004z\u0010)^N\u000eA19nc.|\t>9A5K\u0004XӖ`Nw\u001fri֧?tNׯփ?~;p'ݏO?ӟ\u0001/h\u0006/pv\u0006(\u001c\u0004hŨՒ)AG\rh\tK>˾}7N\u0019Rx#E\u001bci0{*GV\u0007TR\u000eӇ>ΣzOC@\u000b\u0019\u0015\n+0fK\u0006J[j\u00050\u0010xX\u0018+uW9S!5DRq#m\u0016\u00164~bje\u0018\u001csn9.Sp\tE\u001dT\u0015Y:܉N,,mEifoS'ZM\u0010W\u001a\u0010|ElڗJ\bD:1ډNvbt\u0004w\u0013AezͮrG\u0000!߻\u0017;r܃'\u0017NlM\b37޺pp[w\u000eޱ}]y/$O{B?`_\u00075\u001ecz\u001c\u0005vP\u00005\u000e[Nԓ3\u0007|osVmc0Y}\u0004*h\u0015\u0002\u0004\u001c5am\u0011pXo89\u001a\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000e\u001d\u000eT\u001c\u0010\u0015zaM^MYװL<\r\u001b6-\u001b6\u001b7eڲuy6z\r6]qeMK/ټi\u0003rW&Yb7q\b{+ox]Cd94{1\ro7_{\"]\u001eGeś7\u000b2#_HzGp閍E߷>?\u000bܳ<청\u000e/=~)YμSݫ\u0006^\u00137_3̕\u0000{Φ\u000bzo9//^\u0013\u0000{U7_m`7\u0016>6ۮ4'B\u0007v\u001ezO;5q\u0015Ǟz3䜍[/cw?3>(ٸ\u001b?O5˾s6lx->c7T3;yݳ-d9\u001b7_c\r\u000e@2RL&҅5yS>s\r5V\u001du9Q\u001e\u0007 ;O\u001c1|p.ON\u001bB??7gp?GCqΛἎ\u0005ve}\u000b\u0007ދs}\u0015\u000bF\u001fs}v\u001e\u000bAT\f9\u000f\u000eS`t\\\u0016\u001f.n7N\u000bp'*\u0012bj8ŜWKI2r<aԪV5>K#\u0017\u0016o] $z.\u001dpm\u0004V%\u0015+m}O`bT\u001aF8ŷ.\u0003Wo5YsYi&{'%g3?É\bcw)/|?ߪc\u0006\"i\u000e7\u0016og\u0012?jOP\u001d~d?,.\rׂ0<>n\u001e0N6\t|Ad:g\u0012#%\u0007\u00105H\u0002\u0013k\u000bC2\n\f.\u0018\u0019#3>rw> V(ǘ(\u0004\n\u001f\u0005\u0002\u0006\u0011#cr\u0005wQAܘ6\u0019Ï(\u0018~DE5n9}˰|\u0013J~*lYŊލw\u001c?y`ax|ȥjx&6r]\u001e<59|ʾ'μ,?\\e)@&M\u0004=|\u0003\u000b=8wbcf@eg\u0007\u0010jd\u0010!o2)e(\tds\u0013b\u0000HY%A\u0014_\u0012\u0018S0܎0\u0001i\n\u0014W@Ɗ^\u0002yUE>A*̰U@\u001c\rIXO\u0002\u0004\fMHZ4EG݂\u001a.\\o\u0013:\u0015٩NE\u001aT\u0013'%vz\u000f\u001cydazۮ\u0016fww\u001ezpĩ\u001f]xxC=8VﶾF\u000fM\u000b((rÕp斂bR6{Q\u001a/k̴\u000ew#Ǭ>NY 3\u001a6 V\u0012s\u001be\u0001o3\u000f\u0014%\u000b%s3k\u001bõÃ^1P!\u0017Dy\u0011Pp툀ܾяh\u0000Q~\u0002H+!\u001e<\u0002MVNx\u0002\bP@ٛ\fՁ#\u001bx?\u000b%^\u001cFG\u00180\u0013Uܽy%Ձ#\u0011\r j\u000f7Ϟ\"5_\u00159ŝ4~W)n$)\u0006IVqYP&bM\u0001WFp\u0012m\u0014L)\u0001M:)g\u0019!/L|D\bfXC\b0 FˎeO\u0002\u0004L)\u0001#.\u0002FT=1\u001c9ŝTd\"WPE\u0007^J#\u0007v\rnA\u000b^ޤMz>-JlgPlWȶyy7i&=٤'MzRޤ'Mj\u0017iyn\u0007Ms4=gZ4Ms4洸i΋<i.DyAJS[\u0000pyqӜ6iqӜ\u00177#\"y\u000e\u0014\u0014M#\n0!\u0007\u0007΋洸i\u001e;\u00054'MsR4'My?\\Z4M.&*1x\u0013YS=yG\u0018\u0006ow;Ci*Cq\u001b4O^\u0017Q3\u000f\t\rKM٠4n\"\u0003\u0019b7\"\u0013Jz,*P\u0006o{\u0017#uHuL\u00110M\b.`BKH$idij|Y),\u0016E\"y\u001cNuwP5Zخ\u000br.?R`t`D` O3x?ϪG_g\u0000\u0000\u0000*݋(\u0005\u0006U\u0013\"\u0011\u0018.K\u0002ŪU\u000fx\"@\u0004\bD@uʏ\u000fՁ<\u0010\b?\"7?j\u00152h@\u0004EyCJTb\u0000pu!\u0010ӧ\u00188+0|!\u0010M&\u0002\u0011$\u0003\u0011:P\u0014\u0002\u0011GXԼ\u001f\u0000\u0014\u0002\u00114gD \u00027ټ(\u0004\"\"\u0019Õ@Dc\u0004\"hZXG̴\u0001άfkk +GS\b\\g[ݶ\fv[A̵q\n\u0010of\t(b6e\u0004TS/IZ`/\u0006l[\\\u0006-3\u001a5\n\tFF0:\tpy;\u00193b̗\u0007ZKal-*TA\t-XL\u0001/\f@*\u0003\u0019I\"\u0015\bqTՀb\u001d\\a\n֔Cۘ*;hjb\bt\u001aӸ4j*\f\nNH\t\u0019\fr\u0011\u001fQ\":q\u001d\b\u0004-Dvz\u0013+]j9{JGe)\u001dіX:-tD[b趔ґnm)RJGKGtStStSnK)\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.\u001d.+F)ߋZct֔tStSt\u001dڔ$:ҵ)u7[G1n\u001dJ\u001buԋKKu\u0004,IQϗj&҉\"J+]Y޲֫dˆ*-:ٸ2&,.\u0016Bo~s=6e_6?+1\u001c<h~m333O[m۶BaWA@7[\\.\u0018k)E\u0017]m[꠰\u001f\u0017K_ˡ\\1y.K/yEǮ6\u0005\u001d_7޸s{oW^㒋-m*\u000e)sEqUot}0q2\u0018_ƫڋ.\u0004\u0019v^{\\n\u001fr7\u0019oڝW]~\t\u0019iCq@[Ͽ+pT[o};ܱ\u00157\\qEo-\fi\u0006\u001c^k=g޹C{gywue7\\8#7w\\uu_mo{v\u001e8q!(&)\u0013\u000f\u001c{oTv\\쇔u\u0003ʝ\u001f\u001dxO\u0003?s}?qy?$y%8\u0011Lѹ[f.qյq⩟/o<ć&-O<\u001b\u001fS㶛Whf˹a`rk.jY|g~\u000f䣿\u001f?I\nw\u001fc3\u000f/=7^\u000bG\u001dm\u0005]}ͷ}\u0013O~ӟSP>׾ g?O}c\u0007w~W\u0003\u001d\u0001/l?]\u000f/='?/?\u0015(\u0016\u0004~_ӟ\u001f}~ٻ¿^-\u0006h^7[߱p\u0003擟yg/\u0017_~3Oc\u001f8[՛𺋶m.t\u0004лv?\u001fاʟ\u001b\u000b3iy+Oc\u001fşx=QGn7o]\u001fo߿\u000f\u0017/\u001f\u001d{7x3\u0019.9y=\u000f~SOן/~\u001f̤[/Oꣿ3}7\u000fv^~Ŏǎn?{;}/3/}_&-~}/~w~\u000f{-75QG7rǽ'?\u001b/_ݷ|_;o=?GϞ\u0007o+^sQG[w\u000f9>~k?w_|ח3\u0013?С;\u001d]\u001d\u001dzS\u000b/ӷ\r&+տ}^|/?:t׸>3b?\u0013Xw/go}\u0002:\u001aBGW剺];:O|x|G~CX;|[踎>w4a?So\u0012;[|\nvjuZ#*ѕ+8Gn:jXGQ=;;\u0013Q>\u001b;S\u0014Qf:::::::::::zvXWZu\fѭ<20\u0002v\u001d-%\u0002٢e>\u000fޮx˟\u0013?\u000bG_^hy\u0017_\u0007N\u0000GO%2X~ MT6Aus5-z;bǷj\u000fJ;˫WϰZ\u0019\u001aszY4\u0017zNjh٠V>\u0018<gr KlV+\\s\u000f\u001fumf^9\u000b5\u0007\u001e<pb\u001dP5{\u0013'o=2<y\u0013\u000fn:ڻb:\u000f\u0003ޝ'w\u0018T}8\r\bx-\u0013'0\u000b94}3'L^r\"8,,ocG\u0017~đc۵ޣs-\u001c{/w5k򰆗9\u0013};h/b}K9aI\u0016䐏kr\u0003\u0000k\fZ>P;_\u0003B\\X\u0014\u0015))8QFRS5Pgk&aԪV5\u0007W\u000e>}\u0006+\u0006Zsέd^s;\u000f\u001aP\u0003D\r@p9%+j\u0003)\u0004WdPA\u000bZ\f\u0012\\*1y\u0019P+JK#|\u0010[1v\u0000\u0011\u001fX5`L)E\u0004<\b\u000e{\u0007@1\u0000ci]G\u000e\fK(a%W\u00013jn\u0013604`$*\u0019a\u000b\f`\u0012V~\u0001\u0005xbaHf\u0002<| \u0010s,\u000eW\u001b50Biae\u000e\f5\u0006^^6\f\f0T\u001b$'#\u00122Fe2k\u0001̇q~,X\u001ejR'Ck[\u001aЉ2\u0006PV4\u0003g\u0011c+=\u0010\u0007\u0013e\u000ff\u0012+腈\u001f\u0018\u001fh\u000bO$7yR\u000b\u0002=}uƃԻn=7~\u0000\u0004%BB,>z׽wǪR!Ƃ)\\XXX^\fee\u0012k2\u0006F\u0012%a$g,\u0003KB\u000b\u0003m,X\u0007\u0001,D#2'Oj\u0001݇u?tNׯփ?~;p'ݏO?ӟ7\u0005\u0019O3Z\u001f}DΓ\u0018\u0006|\u0010KS\u00110\u0006v\u000fk^\u001dG\u001c9ܼ{wUsTMfS ]!\u00130\u0004~\"@v@\rWz\n\u0013X\f'2JPŵA\u0010\r\u0004a\\2:+HD+$\u0010nt\u0001\u0002ށyc\u0006\u001a\u0000ԮO\u0005\u000bCj3<\u0006+\r\u0018\u001b\u0010.\rHK\u0003\u0000Ca'C%CiΙΐ\u001d5Z\u0018f GkVI\u0005,d* u'j)\"\r\nendstream\rendobj\r32 0 obj\r<</Length 65536>>stream\r\nxeU@jYԐ_sjXm\u0019=ȱY&\u001b\u0018,Ԓ;n\n{,yήه\u001fmp^3[kd⣉L|a9\fMlg2S\u0013X\u0016c54d3ki&RƲ[\u0010M\n1dgRϬ\t+K3@=jm&ل[̪VkZպzBqc=1I3vߘX=ڝwLݱcjN?{gBIxgK%EozhOYċ%2hI|KΚZ{8\u0003\u001e0GK'1kT^f\n[1?3\u0010[{|&5e{kgƶ\n\u001e`}N\u000bC[]\u000f<\u001b/G\u001eYxSư[\u001fZݵy\u0013\u0016gtY\u000f` Vi2?32Q\f4c>Ԍ@n\u000fˤU\u0005nNp4uy&\u001cÏ\u0012+Vͩ\u000bU3W'v8cWv8CV\tTrɎN\u001eMW%YJ#1I5T'v8>4ix#0a4[n#<!c'ۿЍ\u0005\b\u0013\u001d|a9V\u000fӼ~\u0010j\u00154z\u001aX*Z\u001a\u001cD+\tX䦻i5e,2z_Y\u001ag55zeܪkZT#'䦠E\b/g+\bWBmF`<|fbG%TW|\\d|]\u0019y8Wx\u0013\u00130s.G&^%tx\u0014\u0004W\u000e~\rW\u0004\u0001\u001an`\u0011C\u0005:%\u0015h,\u0018~BRU\u0002\u0002A\u0005\u000eM7@\r+\u0019t\u0014*\u0006.Zz{FlKX\u0010MZJ,\b&^7M\"\u001a˵'k\u000f\tZՁri&2?a\u0004y\u0007\u0018Y\u0018xYz4{AV5j\u0016\u001e\"ux\u0013%pQǡ:'Ui\u0007UUSSA|Nx=I\u000bʆT\u00179>\u0019\u0011([XpեEuj^YXP5qs܏\u0018{_z>bj\tL\u0018͖Nx=I\u000f\u00193OJ)\u001c9\u0017c`;\u0007&\\AWڮ%AMeYKnVS\"\u0013\u0011{^SWƭIa@z)1\u0012ڪYiWZr\u001e8K\u001e\f4Hp]uO-9̝\u0005SQ\nmQ&4p\t\u0010\rE\u0002\u000bKޙ$`j\u0010-hT\u001at\nsT\u0012\u0000D\u0012qC\u0002pSMI=X\"\u0000\u0007ϦF6\r|\u001e;WXc¦Ǘ\u0002ǲ!Uүkf\u001cE`9\u00194e\u0004\u0016P\u0002~\u0003\u0014HTEd%\u0017?,P-pS2\u00051z\n`\u0004\f\u0010]\fQn\u0005RF\u0012lW\u0005y8͜ej.qpiZZ0yG x\u0000>_:\u0019EZqO{{S%\fT\u001a\u0007D\u0001\u001b\u0013<'\u00106 p)M\n&AH\nz/i\u0006^\u0018\u0007u\u0007\u0004\rK\ny0Y\u001aEEgzF@elh\u0017\ba`r5S9\u0012\u0007\u001e`,\u0001L:wx\u0006{\u0006\u0006_\u0014Z\u0010ڂ!4~>kZud]bz?%*`)YW\u0001uՖR\nu\u0015\u001aYWJɺ\nTY\u0016\u0000hL\u00051iC\u00147IV\u00040-̎\u0002Cq<6I0=P\u0003RÒ\u00030P\u0015,\u000e8#:\u0005\u0002-\u0001s`\\\u000fQ\u001e|\u0001N\u0004[]Q25$+\r\u001aIC^\n$E\u0012@\tSD\u0001T( 6DkЖ-\u00110\r\u0006dM}\u000eTF\u0006Qt(S\u0010\u0019$,N`ܻ\u0019\u0012sZ\fIcl$l4B+i\bУ\n\u0010\u0005@ejl\u0011M\u0018V\u001c\u001c}Kʠc*\u001b<6 [K[\u0004\u0018N1\u0001\u001a\n(g\u0014!L\u0000\"ڽ\\â`̀S0D\u0004m-\r@$]l$]\u0005*%* )I\u0017\u001b!)IW5B\u0012n\u0019\u0010|VHH\u0004\u0010/\f\tF\n\u000f\u000eK\u0003\f\t)D\fqM\u000bQ\u0010$*KQM45|u1\t\u001e./|T94\u000f\u0017W6_eȼv\u0003^\n0dCaR)\u0011\f/rPjZ\u001bj7,^\f\u0010`\u0010\u001bST0&pFx9LIy<Ms\u000b0e\u0005T>H\u000f\u000f\u0000F\\]ʁL[aWއH#DQqk@4ad\u0002TkdmdAs00\u0014\u0017 3;iɦҝy^As5)O-h9S[剥]m*Ϋ0E\u001f$@\u0005^\u001dw\u001e;6wtaw߉#\u000bN\u0004o/\"hܰK\u001d\u00013#\u0011\u001cr\u0019\u0019ߔK(inw;?D_q9zi{<'\u00034\u0001\n2L)#\u000b7w/wXv\u000e\u000e`o>s\u000b\f\u0017\u000euw\u001dgޕE_H\u0004\u001fKA`\u001eGF\u000eXL\u0002\u001e8$,z\u0014{g&<Ht2DȘ\u0006n\u0012Yަ֖eiUbS(e5X~Kg#=\u000fOte\r6]q%+.͛6-\u0017^~u+\r?k7qWýٻ|\u0019|eӶ׽?\u0013P\u001eGeś7\u000b2#_\u0017~\u001få[6BK\u0017}ߞ\u001f/s>w˶\u0007׼o}oK/tgz^u6xp;o=[|%<e;g\u000f+9.Go\f\u0004z\u00170<8/_ƙw߼\u0014=v\u0019>sgSc+Խ=gXqeG|8gKoO>U\u00199\u001b6_{\u001fy˴\u0002wV{\u0017y\u0003\u0003gp&5s^%g;΃1oa!i_p>I;\u001ffC5O5S\u000bj³\u001d\u00028\u000ea_ᾝþ<D\r8C!Ͳ\u001eNr\u0014\u0000>'A\t\u0001\u000e\u0011\u0014\u0004w,<z%>DbqL\u0015ʁby暋g·ϳ겟).\ri\u0018\u0015\u0002;\"ԡ)!40j{OVB\u0004.\u001aRb[P\"\u001b\u0016P}\u0002oL\u000b*9Nd`J|\u0014\u001d\u0014C\"F\u0017k\u001chmU00\u0018c%gЎ'n\u000b\b((\u0000/\r3b\tFe\t\f^xN*DJ`\tl/\u001fTjtU҄Ĉ\u0000Ap-\bsĝ\bO\u0002;I¸c6Ss\u0007\b-n\u0010a\u0012\u0002#\u0018eʯ\u0019LyԸش0Gr\u000e\u0013-s`]$f&:(OT\f\n-t@Z&Z*N8KX\u0005\u0004LjBclv\u0013O\"z:'nE\u0010%o~g\u0013ފ\u0015\u001b8~M}siֹ#7\u0004N\u001doqᦛvъtTHWn[8r''{ǎ̟?S\u000e=x|\u000b2uC;\u001e~\u0000~;8:'-;e<\u001bnǏ۳x|\u001eypa>\u001fӁ#\u000f=8\u001b\u001e;\u0019\u0001=v䑹ŷ=47bɉ&K 6_\"\u0011D\u0012Ƶ\u0014dS\u0003\u001ejߑS\u000bo\u000e5wbhv4Ft\u000fwo;6p⎹\u000b5gf3#;۽{p\u0003OΡ\u000f6>g.\u0004uY8<\u0005\u001eXG4Ŕ0k\u00011G9*`8((Ye1D$\u001cHq۞H\u0011vy\u0015@B\rE\u0001*\u00108<\u0010$3Qn+E*̰UWƔ./i\nmE *V\u0015J:hbn䯆\u001a+:)NivJYi1YG1Lz(\r\u0003ו\u001a+\fW.7\u000f|H|\fa\u0006\u0005\u0000n\u000e:lГ*(\\ʳ/T8\u001aґ#}\u0002j\u0014%( .v\n;'*Q\u0004~\u001a@H\nOz'\u000e\u0011\u0013\u0005\u000bNL\u0013N\"uA&I\u0018w02\u001035w(E\nB(\u00129\u0014\"Q+{ա:LC'R\u0000BD\"5(\u0005F;Q\u0000!F6\u0001\u0018,ē1ɹJLtFVgduFL4ڍLdn9s\f\\d\u001dKh\"\n\u0018\u0000}\u0015΁T\u0010%2\r#\f*2|/\u0002bU̽\u0007_+K \u000f R\fk([\u000bxȿ;0Az\fhUt](<F\"\u0013f4WYi\u0007P:Vt\u0013\u001eD\u0012UT)QE\u0012UT9QE\u0013UD\u0015YHTD\u0015Y\"K*2\"ˉ*'B*'TJj\u0013ZzӀ\u001b䨺,*X*+fn$0NM~WDQ)~d&EMfT\bU\u0012\u001dcD4\u0013!\t\u0018(JQIL\u0018x2Mм\u0013\u001arR$O0\u0006\u0011ǁxm!(Ĺ\u0012Yc\u001cxE\"D\u001b!\u0011c7\u001aUjXN\u0014\u0018\u0004Lqb$\u0017%\"JǘǓ\tu\u0015E\u0017U\f@\fuf 7\u001e*\u0005bH\tF\u0017xVq\u0011x\tM\u0000-\f&0&=2<D\u0019:Ke)\u0018Bh<sR2ă]x)a%$\te+#&\u0002VTFG O12j+7\u0001҈EUUTF\u0011#j.\u001ciNun]+D[WL\b&iܽ\u0014\ne\tݹ\u001dQ\r~TF)ăl}<ȖA6\u0015\u000fx)ǃx)ăL9\u001edA\u0014\u000f2x)ǃl9\u001edǃl!\u001ed ^?\\2\u001f.KŇK%%%å*LiBbDN܉I|uKRL¸c3\u000fLK\u0018\u00172 GL%Sp)9I\u000flåju͐`5\u00018\u0012#iᒩp)gIuLm$tΜΜ]l\u0013\u0005o*J\u000bZ\nT\u0006oe-n@T9t1x\u0003\u00181Y.$\u001d 輤k2F\u0006bXj\t\u0018]\u001fn\u000e6\u0012)B1&pLvN?uO&H\u0011Y\u001djX|\u000e>\u001atу\u0003\rW\\PB\u0005/}/?JCo5.Ũ3OqZ9o\u001cۡsVy\u0006T{\u001ew3нQ\u001b,ח\fc\u0005S35Ó\u0011\u0018w` ݩ(%\u0006\u0015\u0002\u0005.j\u0000[XPo\u0015#a[\u000e$0F\u0002c0ƥ\u001f\u001a\u000fd6-ڜ1MNۉ[[M-bk]S]S+\\82ʫ[K3Ekcif\u0016R\u001aG\u0011NBaæs7oٺun*<۰m\u0017vW\\\u0017n;oӆ~˅ތߓ7.pKv\u0004-\u0017\u001f{~l-_\u0014l8׳\u0017~~\u0017~~\u000bs\u000f6mǉ\u000f\u001f~?\u0013w/۶\t_8-?䗾W׾\u0007\u000fһ\\<2r%oϙ>o7_gInܲ\u001e??w_\u0017\u000e\u001d[y{~u@=\t;\u0013_O{ZjQ;zZRv>g~$UVaJ%ᶿp\u0018:\u000f&s}B\u000f\u0002\u0013&ܣe!\u000b\u000bz?;b~\u000f\u0015\fYX_x\u001cI ?\u001d6\r\f^geR\u0016e;jhvZ\u0000ݠ[n/r\u0019zuܫD\u0015ɠxP95(Vn/8=kk\f؈r\u0012rv% /\u00145D6ʖ\u0015P\u0006\u0013\u0014I\u0018$T]\u0000\u0003*r\u0002J9RXMcH\u001ej\t<l\bcj@)*XPY7\u0006*\u0014b2?rϛ\b\u0014{#Fw*\"͎\u0000[:qvn\u0011\u0018\u0006\u0018j>>!2A.!\fX:\u0012`\u0007IQJ$(>R2\"G#^{jaz>RRPb\b,\n>.\n>Y\u0014\\:\u0014\u0016/Z\u0003\u0011r1#A@]\u0017\"/RrXPḐ\u001au\u0017@l\u0002q\u001bȴ`CiL0\u001e-IMd1\\ح\f:T@\u0001Ő\u0000tƞ\u001f3hAyE\u0019ޠ\tj\u0004P\u000b\u0018Qk\u0001edO\u001f\u0003\u0006\u000b@jmM\u0014,E\rF{\tJTA5\u00052cI\u0011f\u0014>=`%Q@dЪX\u0007\u0017Qy<׍Νmo;};],N.۵?2LveA}'`lqLU=\u0004\u0016Qxb\ft<gM*\u0003a$\u0002\u0012HB`౯U\u0002ȸ,\u0012n\u0003\u0016قׯ얄@x\u0004cLl\u000f\u001c\bI|3|\u0010/wb;\t\u001f'\u0013b1ɏM\f8v6fkK[u߽[\bUչUN-N9rg\u0002~QF\u001f& h\u0002~]x!j\u000ff\\O\u0010\u0001HJm\u0018z\u0019a?P\u001d\"tɬ\u001f(*\u000fE)\u0000\u0013\u001cFfG\u000e\u001f%C \u0007\u000bai{z\u000fT=Є\u001cUʺeBX\fڋ$%m\u0005']\u0013\u0004ʪ1T%GR\u0006\u001cJ \u001165X'\u001eH8.Bd\u000e\u0002ْ1\u0019E\f_\u001aI}M\u0014[g\u0014j=\u001d\u001aa\u0005DEh{#J\u0000,T\u0011!y\u0010u\u000f$O\u001c\\LԱ\"0{|^.\u001dYiCikN[sڹia\u000f'\u00039e,\n\u0014CXF1\u0014CX^1vQ\f\u0019\u0010Z\u0018B3!4\u0018!b\b(bHB\u0016*jа\u0006)j\n\u001aޓ\u001b6\b(OEA\u001a\u0002Ң6@\u001a_\u0017\r+jRE\rZA\u0013E\r\u001aV\bc\u001c{`,S\u001e\b\u0011F2E0\nzS,SԠaE\rZ1\u001b_ըo޾۷\t\u001dP@\u0000ryT\u0001J\u0002\u00043\u0014!z\u0006\u0016X\u0000'\u0001 \u0011T\"jȴa\u0010&\u001d\u0000k\u0004ig\u0001/\";0\\)jjF2.,#萇+g$\u00033(eZ\u0013\u000b}!\bȐWȁ%d+g$p^\u0017]]>\ffs%|xo\u000e\u0011d\u001cЁ\u001f.\u0007&\"s`\"\n\u000eLDD\u000eLdDv90\u0003\u00139[-iD\u0001\b\u001fxz\u001c\u0001\nB\b\u0001\u0000oCˢh\u0017\u0005,Qr\u0001O\u0001.\u0011>\u0011\u00074F$\u00074M\u000ec\u001cd\t\u0014,\f\u0010\u0001MrM\u0010L\u0003\u001a\u001c>J\"|@#\n\u000fhjMzX\u0017m\bŤ\u001eD<\u0015HC\u0014\u001f\u0001\u000ehpccv6f\u000eD\u0019k&\u0002T\\R@Ohb\u0010\n5[A\u0013X\u0007FH\u001b\u001e<\u0014\u0001\u000bOh\u0002K|=<\u001dh-:;\u0011V\u001f,f5˝C,\u0011\rh.qXS1\u0016\u0013e-bKȤ!:;P?\u0011\u0018\"PpBO\bP(\u0001\u0011F\u0017&S\u001c\u0003\bn^ @\u000fTj.\u00041\u0018.H\u0001\u001clr\u0001L\u0003E\"&6\u001dj\u0004j \u0015P΃\"4)틶WK}d_*,\bNTd72\u0019zBBn@rEds\u0015ҋeX0\u0014\u0017\u0002pFVÖ!)B5\fb%fm\u0013c0`ڥ6\u0001\u0018;E\u0001j0\u0003\u001b3`\u0000\u001aՈ+C<\u0000)\u0000X\u0018*\n[\u0000'\u0000\u0014\"'\u0014|\u000e#^>Θ\u0004O9\nEԊa%aU6z+٣\u0007Z\u0000½dRDTEK$R<Ž%VC4}<{Ix[ae}Y\u0011G\u0012Ԭww\u0015ѥ3k^vv\u0000AKM%\u001d٭^f\u0011A9!\u0000e}\u001cNcNT`\n:\n\u000e$a\u0018CBˋ< ̈ C`e4<ޘA\u000f\u001c\u0005<v\u001e召>T\u0001o\u001fx\u001c2\u0000#X\u0001/yC[6&ƴ\u001cT\u0001!Tlͥ'KSl\u0003E]1\\Zפ\u0010s\\R&5+xvceϹ҉\u0004i\u001b%7G\u0017Z\rj\u001aJ\u0001gZ\f8UB4\u001a\u0011v\u000e\u0010h%\u0001D\u001bC=\u000f\u001a\u000e<'qK\u0010$W\u0012\u0012&qP߇)V\u0004Z6\u0007q1md`\u0000,#n#*!կ\u0015&o1\u0001\u0010o3\u0011)\u0016SBaPvMNiMvzP.ƻ|$M\u0005,\u0014&uwj&>L\u001cѤ\u001f$z&J\u0001cj)&P(CvgHBBܸQk\"\\\u0014\u0015\u001eqQ[2&\u0006<,i'Y\u0011Y\u0013L\u0019\u0012Ē\u0014\u001a\tt>/gab\u000fI\u001e\u00017dX\u0006.g\u0005r=\n>!yCZ6j\tk\t箄Me\u0019\u0017ό\u0011\u0005X\tZ2\u000f\u0010Z9L\u000b\"Oֲ\u0010jr W~O\u0018\u001be\u0004lesZ\u0016VHsMgH΍3\u0004\nF\u0002\u0019D[=.\u0010զ4AQkd M\u0002qm'V\u0006p@sBp8!y8@gFE\u001e;-s-:֪\u0006-\u0012St\"\u0001\",f@ϐj\u000f_L\u0012>7ާ\u001e؋Ia渨\u000b!)UFe]Bʺj/\u0013\u0002 \u001e`n\u0000*/48Q2(\"Q.\u001c*\u0007\u0015u\u00030~˺㨖u \fukYwʺT\u0011k6&\u001b\"YW\u0004e]Be]e<L\u0007+u\u001a#kIXS#u\t.uw\u001chN;@\tw^<d}=;e]WZ+NDVSr\u0004uj1Gթ1\u001a\u001dQF\u0015g\nLa-:.e\u001e\u0011U\u0012vY%aU\u0010vYn\u001e&,P\u001c\u0010>\u000f\u000byJ]VAe®\u000f\u0012\u0012vP!aׇ;[:ja\rka\u0016v簰+xkK\u000bCmlsKoP\u0003s+bD7v޾Ӿ]邏5y֟ݹ~{弍K/XwJe4\u0011}\u0006!\u000fh\\\bBX(G4\u0000\u0014\r8 qvkO\u0006\u0015\u0010-tsk/7-afk#Cc\u0010%8$h8\u000e3@laѨqqqqqqqqqqqqqx0hـÌZAg0܆yw\r%\u0017\u001ch°x\u0001\u000b[y\u000b\u0016.=萵\u000e+\b\u001erP\u0005\f\u0015\u001ej(pN;fͲ5\u0001\u000f;-\u0017]~p;\u0018^3OXӧ\u000b^d)mOÝƫ6\u001csy\u0011ݿ}G/=xo;E\u0015\n\u0007\u001e;\u000fg{O}/Ck\u0017\u001bϻ\u0017~R0غ%\nv\u0015ǜK~5\u0018^y{{8L`Y-;>g_~5<\b^}G?َ`\u001eq?\u000f;]KU`\u001c&ڟ|\u001aa\u000f;|~W%US?zt-o\u001fS+]v\u000f~|opՍ5U}kN8mmV75ǜ\u0000[*xVOr8sv;}n.UJ|}AO`!\u001b\nqWoߩ\u0012/n\u0012UZ\u001cn7GG\u0005ol5%I{\u0018A:2\u001a\u0016fD\u001awli3?\t\" :rI\u0001DM!M\u001e\u000e\"\u0011:\r\u001590vͶ_\u0016<g=O's\u0010)\u000b\u0000D\u0015́U\u0013I'\u0014\n}[\u001cl~<ȐV\u0004cI22و\u0014a8\"uK?\u0001V)+\u0000S<L9\u0015`\bE\f\u0001\tI> I)D\r\u0011\u0001^\u001a\u0005kХϐ4Md\u0001W\u0018cF\t\u0002Tk9JtB\u0000Z\u00040\\\u0012vQrDA\u0013)h#ֳ\u0006Su$\\\u0003 䈂@:\u0014\u0011\u0001^1}\u0006]b\r%O֙7\u000e \u0014\u0013\u0019Ze_'`0@;B8,>S\r\b&%bR\u0004\u000e\u0010Q2LR\u00182 ~I#)`DaxvT[\u000e0Ryhw\n\u00151\u001b\u0001ęG<L;L<ؘ ɹy\u0003*P!w\u0000\u0006\u0006\u0004\u001d+\u0000C1e\u0015[հe3d#.\u0002h\u0016Bz=NlM]dՍ{\n\u0015y\u00065\r4ͨrY\u00008e3L\u00004?u}8h\u0001)Xf5c\u0019\u001b1\u000e݊\u0016\u0006\r\u001b\u0003հ'No줟ǵ\r\u001al\u001d,^8|mgoܰB][me\u0015_V,:\"\u0002AD`f\u001c!\u0000~{O\"ʈ>!\u0017(rnN@?sO@f\"0a$@+\u0019CF;Q9:پ=D\u0019h?Ci2\u0004{@\u0007)2#˔\u001b\u001c?\u001fp\"B#\"҈\u0000x\\n\u001f\u0014\u0015=\u0005\u0002Yp!\u0013s4*G!\u0000-\u0002#(9\u000e\u0005m\u0016gH\u001frMh0XGi?9PM(HCA\"\r͍3\u0012+=\u0005̾f+\u0005CP  \u0006\u0003k%U,W3 \r\fp,\u0002܇+H}\u00015\n\u0014\u0015B0Aq\u0007$2(\u000e\u0000\"Z{`\u0005\u0000#̒\u001d`\u0002\u0001<\u0003z\u001d+\u0004:*|GY-\u000f,f5\u001d\u0015NQ=P|Ϡ\"\fJ\u0000\b\u0006B\u0014I\r7C)\bI$\u0002T\u0013a\bt1NqT\u0000'H\\\u0013ha97`\u0018\u0014\u0000nIIJ@8\u0000UW\tȯnu$ny}klxlσv|ugWM\u001a\u0017Qq\u0012lDh'F\u0004\u0013'Q\u000b|<g\u0019㺑-_e5Xu6\b/J+*CrKiΑTr\u000b+7\t\u001b7;BHt|J)BWP&?B\bG$H#ieй2h1\u001b$bcr_o>5sC\u001c\bseZ]}d\\+a\u0003\u0005\u0010e\u0000\u000f7T\u0000Gd\bί*\\z]/Z/w~8>0Vhqe\u0003\u000b@\u0014\u000beTL0fMc\u0015\u0012;.t:C\u001dP:ԡ\u000euC\u001dP:a6ʧ䡢\u000bW:KXb-:E|y\u000bV?g\u0017?7y\u000f\u000bsOsŭbIp?凿\t3.~xE_t/P\n`%\u000f{+\u0014j!o\u0015.j\u001ajBP\u0017s\u0005&\u0015`yd\nL\u0016KWj+fw}.R@F\u0001\u001cMI\u0019o\u0012XS\u0016nR\t\u0011A\u0011Fq>\u0017%\u001a\u0018B䂴EaSBnrPFZ]8I\u0016:\u001b'xwY\u0018%;(Rnmo\\(ZslX>\u0017\u0003 \u000f\u0014/\u001c6\u001dk@\u0003mss1P>hYqBh}QcmPP\u0004}.\u0006Alm\u001f\\Ydmo? AQcmP\u0004}.Rb\u0012\u0019ڄ8b]K\nFL21gp?$\u0004昑E!P0\fϖӶC*\u000f\u0016;0`\u0015\u0000|\u0010\t \u0018\u0010CܧA\u001e\u001dh\u001el,3\t5!P!-;\u0000\u0002C8s\u0000\u001a\u000foT\u0002l-[k֙TPgf>t\u0019\u000f73\u001cq\u0002)a\u0006gό'n\u001c\u0000pxR\u0019c\u0018k8[\u0019t@\u0014^(e~$[CѤ\u0018\u001bL$rː|9 \u001f\t\u000b\u00119n&\u0011ĥ\n0NqH/\u0002\bv#q$G\"\bx\u0010:x`Ca0\u0014\u0002+\b\u0016vP[FԖ\u0011e˛d\\f6(\u00160``1\rW]\u00190X\u001cWꅵ^Xu,V\u0017-蔛R3TUt:C\u001dP:ԡ\u000euC\u001dP:a6ʧ69Mj\u001ajB&gEM8nFG:\t8M\u00028m\u000e2D\u0003\u0001m<>,`rցpdqфm&\u0004ѦX4)\u0016\fpޢ-0\u0015&g2\n\b$\u0002\u0011\"`\u0012 \u0010\u0004IU\u0014R!\u0002\b1\u0002\u0013'\u0010r,ؓ4\u0002`S\u0002lΤcr&3&aG6X1؊lHjͥco&\u001d{09\u0001\b\u001b|zLfе6ak3\u0014,=Jlkm[k3Xɀtm͠kk\u0016\n055CaS3䚚!\fM[1XI,zUp@\u0004VE\"hg&\u001c33X_itld\f\u00039\u001c\b1#\u0016@\u0019\u0000C.$\u0014PfXJ)֕zFw\u001aAg\u0000GqGu\u0016`cΐL=0ǁo^C5S\u0001a\u0018-mG\u0002X\u0005T\u001c6\u0002k\u001c\u001e\r<v\u001eؘhv C`oLQ\u0019C (\u000f'X\u0001Xo|>0jZ{ޯgZ\u001bFq\u0019VZׯ\u0012493~\u0002)Aچ?}\u001c})+\u000f-\u0000:.:\u0014EkXƚ5V8-mej),}hl\rۤc&]K6E\u0018\u000e;wǐ\u0018r\u001aDXZkӆ\u001c36\u00162yk\f;\tbJE|<Q<0\u0018\u000e\u0005*\b\u0016<j3c\u0005۲\u0017=m6(\u0015\u00160``1\rW]\u00190X\u001c\u0012ꅵ^Xu,yGܢd\r8*foVd\u0018Q\u0018aj[oe.l0e~j*\u000f~\u001d2%D9&\u0019!\b%$ I'\f\u000b,\u000b\u001e\u0001`\u0018(4Ԡ)\u0019P\u0019CQB\u0016(q`\u001e#ʅ\u0001ֹ@3S췊\u000ejos̈Ȥ.\u001d\u0017\u0004\u0018A\r0b`\u0011D\u001b\u00006=mI i?WI\"D_t*\u0002\u0001Q6\u0004F\u0000'y\u0015H\u0001\"!bS\u0000\u001c%\u0015R,S He(\\\b <ءJ\u0015\u0011A|A#uL+\u0011\u000f$\u0003\u0018\u0019r\\6sm\u0014I\t\"L \u0006\u0015nd%)yO\rzn*S4E\nH\n\u00150`\tQ(\t\u00134݅\u0011x?\u0010jq\u0004H=ahT'c(0$*\u0016%U4C\b)LV6A\u001a\u0001\r\u0010v$:\u0007S̀\rE` \u0015\u0016`\u0012jdZ\u0002,ATओp2\u0004TOK\u0006Z9\bL`@?\\\"ͨ\r\u0017\u000fUcFy\f7H\u001cX\u0001DﻴA\u0012r/\u0005\b\u00006io\u0018L\u0000W\u0015\u0018T`\u0010\u00197@RC\u0001V<\u0018\u0015SzkV^Dg׏5\rP\"\u0010\u00112\u001e\u000ehƂ&ٻ\u0005Jp\u0015u$@r==\\O\b\u001eP\u001etjH@5PM}z\u00162\"\u0015zjq$\u0016fBhe\u001c5\u0014\u001c\u0014#\u001c8c ŲI{Ie6$gؤNϬ(f:]Q&\tʲIc:?]QMLi,$:(&5Hq\u001c\u00006=mЇI \rsl2\nf٤W\u001b̲\u00100&s-96\u0016٤CdKM:2\u0014edؤߡY6\u000e&-D<\f`6g\u0005˰ɈѷQ$\u0019'\u00196sLrMjVAg_N0tD<4Wk*1Q3Eeؤɭ(&5UPMjz\\\u0005٤\u00061gD_F\u0010Ȳ\b&&C٤`4rs`vs'&\u0003$y6\u0019\ng^y6\u0019\u0018 0&؊\u0007\u0002MB4\u000e\u0007\tDyv\u001f(\f\u0002\u000fV+7>˨\u0010I\u0002>\t9Dq\u0018f\u0006'̥V\u0016P\u0019\u001d\u0003'1\b\u0002\u0014ӗV\fj'Rȏ,èJR#H|\"-㋴/\"HEڕ/rHK\"-4\u0017I/\u0002HJ\")狤+_$]\")⋴/2H|v$\u0017\u0017\u0017i/\n|V㋴\u0002_\u0015\"\u0017i5H+E\u001a4\u0017i\u0005HER/\n|T\u001a_$\u0015\"\tEE2\u00118\u000e\rÄ/Ҫ|Vw\"\\yŽEEQ\u00140F@\r\u001e\u001a늝בzC-.R\u000fWU39cSi\u0002\u0000R\u0003\u0013+aS\u001fx2\u0012\f\u0014 (UrwFdR\u0002F20JۅQo3J\rҍQ \u0014&(9\t3JޕQ\u0012F@0JS@!TaF_\n2JѝQ*\u0010LK:2\u0002a<8aQ\u001f$(Ur)'P\u0015\u0018`R\u0017U(\u0015L\u0015FϾ+0J\u0005V(\u0018=N@QRF`0J50J\u0005V(9.g\nR2J=\u00022\u001e\n0>F\t'((\u0005\u0000yUҊ{\u0014 ˶\u000b\"E$*K\\\u0010q&\f5DYr҉\u0019@@\u0005z\u001f\u0013􄀒KL\u0011\u00100Bh\u001ba,q/.E)\u0000Di$r(|\u0016\u0018L5\u0004%\"22\u00006Ҏ2S)\u0014\u0017jpX5_MJ32!on,8;T.]|;S4Һ\"\"g-wӽI\u0002J\">#DF&\u0011\u0006x\u0018r24z:H\u0014\u0019]M?gSZ.\u001f\u0018\b~Hd$`\u0011[ZN\u001cu@i\u0010 UKj:\"\u0004k=hFj\u0015@qNhJ:]\u00043J'#\u001d4j\u0006޽FNdvja@\u0012EB>2H\u0001,I9Jh0\u0007p#DF\u0005\u0013ϊ,MF2(\u0004Ě\u00037_qD\u0002WW+B!\u0018jzNK\u000b\u0006-\\7/&\u001ay0\u0005\t7ژ^1\u001a!b'\u001a!\u0018=ո-۱\u001bm2LG;\u000290\u0005\u0003J)3n\u0014 i\u000eИ\u001f2\u001f*p\u001c\u00005{ѧ1\f\u001fu7Oxʥ)z1⾌\"a4\u001a\u0015A\u0001fFkO0Ru(!Pm\u0010C(6ό$R(6(\u0015*\fh[\tW9jwI\u001e&#s󧡷e-R\u0010V<jһm)\f@-\u0001\u0014:9P-\u0005-\u0005%[\n\rmKan)\fD-\u0005Xe\u0014\u0014)T\r-i^xK\u001f貥0ZtR\u0018݂-+R~*R-R8*\u0014-El1\u0013DhٖBӏe\"aQ\u0003\u000bW\rS00\u001b\r\u0003JUң\u0012L\u0013v(\u00046\u001aFáBB\u001b\r\r7\u001aPr%GJ\u0018DUh\u0018+bY;<#TR~'b0*ىh\u0018 (i\u0017Ȃ\u001e\u0019NL\u0011Rv\u000fCN$v'8B\u001e\u0018\u0019N\f;P/5\u00076[\u0015:7[Jw*\u000e򍊙\u0015v*lR_mT|[OQTp,V mL\u000f>CbFsp\u000f2\u0015F\u0012f\u000e3T<|a2\u001cf\u0019\u001aa\u000f\u001df8f'0#gw\u001e~}\f\u001fe0ku0'WtLa\u001ef \t\u0002\u0019:a\u000f\u001ff ,\u001c<Y\u000e3aFaF\u0016aߖaF\u0002*>̈\u0018LÌ3';0=Sp\u0011aFLa)?`e\u0019\u001a&xd\u0003f\u001b>\b\u001df\u0004\u000f\u001df\u0004(\u001df\u0004h\u000f&\u0002O\u000e30\u000f3tzapo\f\rVv\u0011\u000e3\u0002Յ\u000e3\u0002ȇ\u000e3\":t=i\u000eߢÌ=̘\u000eAaYX\u001cfd\u0000\u001cfTy\bXV#\u001e\u0005@\b\u001a!J\u0000FP\u0010L_ԮI\u00169\u0002\u0001\u0011d\u001cCIF F\u0007\u0000;ȸ2H4\u0004̑QsN2Q,Cv9ː\u0005g\u0019,CeY,8ː\f;\u0010eg\u0019,Ce\fe\fQt!e\f,Ce.g\u0019,Cv?ː2{!e\b,Cg\u0019=\u0010g\u0019YF\u001e,$\ng\u0019Y(:\u0010Eg\u0019\"{!g\u0019Yp!e\ng\u0019YF\u001e&|\u0011(;ː\u00152d\fY,CV8\u0010\u00152D\fQ,Ce\u0004zɬ)8ȃMNe\"jޑx!eg\u0019jR[SpZ<3j\u0013\f\u001aR\u0018RJwR\u00126P\u0006*Q@j\u001bDm\u0003\u0015m\u0006ʩm\u0002\rچou^m#Wrj\u001b(J6P\u0006,Vۀ%j\u001b^~Nm\u0003\u0016mb\r-9\r\u0014T@6\u0001]\rm\u0006ꢶ6P\u0005\rTMm\u0003UP@Ej\u001b(j\u001bHmïW\u000fm6|2F*\u0018>S\rT*mjj\u001b\u0006j\u001b~uA\r\u001f\u00060\u001dj\u001b\u0005yS/\u001f`U\rTUm\u0003UT(yN:z\r!\u001d44mzzJ\u001ayn\u001cP3\u0006*P@9%\rS@\u0005J\u001a^}\u0006\"ou^I#\u0017u6\u0010\u0006\n*in^I\u0003\u0015+ib%\u0006!\rDNI\u0003\u0015+ixma]6\u0010ΰꢤ\\%\r*i WI\u00034\u000531͵L\u0003J\u001a\u001e_\u000e+ix,>4PVI\u0003e4P_\u001fT)+i\u0014U+\t*i\u0019e\nJ\u001a\u001e\u000e+ix\u001b\b(i0_]PIG>;\u0002J\u001a\u001e9CF9*i(TޘtQ@\u00154PU%Ҋ`ٖl4hJ3؝}sz{c;G\u0014\u0015y֟ݹ~{弍K/XwEޚjM@jj[\u0011NPh`\u0005\u0001\u0001&\r{ZqAB9wz\u00032K7\u0015?B:\fԅk:n\ro4\"S\u0015Pnus7ԭn\run[7wCݺ\u001bPnus7ԭn\run[7wCݺ\u001bPnus7ԭn\run[7wCݺ\u001bPnus7ԭn\run[7w\u001bu\u0006愙ek0Lfx 4^\u0013\rEz]Iݼy'\u0010KʙE3,^ty\u000b\u0016\u001dtu+[{A}\u000b\u0017/\\\u0010b\u001c3t1k-oP[solp{\u001caxeo;5}\u001ay\u000b\u000f:fU7;?9p'n\r\u001cP4!;\u001f##<\u0007m\u001dH5o\u001fS{f\u001c{O}/Ck\u0017뒖cW}KOŗ\u0011^S_Ul\u0012Sabοދ:ʋ;aqIO>Kg3~]TTTTTTTTTTTTT4J,zҤ;yӐ;S;ɚӵ;SI\n\u001f\u0011uyߥ\"*%\u001d{A[X\u001akd!\u001b\nqWoߩ\u0012/n:;ۓ$#pڔmn\u0012bM9LG\u0002:\u0011\u001e᭓\u001b߹s{{H';\u0019\u001d;[Z{5~L=4ZHAp\u0018DyS\u0002j\n<*:|IDG\u001590vͶ_nxF\u001f\u0010\u0002]`\\6\u0011\u0007!\n\fGem\u0002b?z\u0015`d(_Ɛ-\u0004ڿ/\u0002E_C7pmFZ&\u0011ĥHZ@\u0017\u0013VDsl\u0004\u0018|$-cԅޱ׻\t\u0017ڳ޵{3\u00129y.\u0007im?t\u000fAȊ6u_mO\u0019%Gl׷ƶS!і]\u001cQ\u0019\u001a\u0015C~>kq~\u001bGe]~\u0006v߻wU\u0003O!E[Z#ۯ6ƍw7ܾg{k׵Fvvh0\u0011Z\u0011\u0001)\tgvM(qga_߹x[K\\qm\\vp\rηZ;G:/h\u0014\u001f\u001b#{s\u0001xɎ)v\u00168\u001a1p.\u0000\u0017__P/mV/mvZnOd\fln\f\\gW\n\no줟ǵ\r\u001al\u001d,^8|mgoܰB]\u001b\\/˞Qπ\f\u0017\u0003N\u0004\u0018\u0000B&\u001c2(c%\\7~\u0013VJ\u0006_\nV\u0017q\u0006A]n)7z%v^la*W0-\u001cI\rGK2\u0019c:Ca-)A\u0002wl:\u000fP栱~*yKJ`\u0010\u0004闯\u0002\u0019\\\u0002\u0019ԍ\u0001U2\u000e\u0016\r\u001f\u0019\u001a\u0001Uj;Xk\"\"\u0011 Y@]\f)>\u0000\"lMƎ3\u0004\u000eS\b\fS$$q%&90|\u0014\u0001\\]w$Yw\\rk):6Yh0\u0001b\t\u0012\u0001)\t\u001aO]\u0013a)?31+VR&\u0006+\u001e\b?a\u0006>gN@AD3IZ8\u0011P\u001b'\u0014\u0014,T\nTMiJ\u0006~R*s\u0016\u0005W\u0003<g1˄!\u0010-RJa\u0004\fd%YD<D\u0012d\u0001\u000bu\u0000r4?#h<KѼG޲@s-Kӧn\u0006[AQN,?\u0004\"lM֎3rQ\u0014\u000eTjVM\u0015K+?2͏,\u000f/Y`M\u0005a\u001ek\u00154ha\"M\u0018Zwq*6\u001a%{vP\f<.\rtKUK\"j$b\n2\u0011\u000b6B\t\u0015\u0005O\tSpq\u000bg1T6U-ceoݦ73.4 !6Ƒ8\u0002\b\"\u0011h6\u001b[n\u00183pPE]\u001c(L$\u0010M{r24y\u0018aV|at\nJ]\u0006-i\u0005,\"v\u001b%@\u001c1\b\u0010\u000f%Ö^\fNO'~'o_O|/_o<>\u0003O<T\u0017_\u001bP\f\u0007\u001b^Gt-:$\u0011B664)6nt)ԈUZ\b\u0004\u0013\u0002\u0010G,B\u0018(ƒǞ\u001a\u0001\u00060  !L2\u0002\u0016\u0000\u0015sX.&\u001dn\r\u0001H\u0001`\b\u0017T \u0012-Ƴ\u0015/\u0017sŐ!\nSqd((\re/sLj4'~[\u0007\u0018M\u001b\u0018\u001bJ`8$+\\b<#=3l\u00063\u0010\u0005y\u000f%Lhў\u0019\u0006xͬbK\u0014&J!NLDC\r9_\"}:t$W8#wj\u0002*\u00071>TKfV\u0012c\thipu\u0005Ŗ^\u0007[;+lE1\u0004ʓv\u000b%8-k?s\"=BA5U0*\u0001f\fA_\u0018a\u0002!\u0016D\bEK,I.\t\u0000\br%B.'O{4b\f\u001bMJԕTu\u000e6cd@5dy'ə9sVDTQK\u0017H\u0019I\u0001\u0011h\u0019CTMS\u0019|̝#*\b`&9\u00076x+6\u000bԟ%*g\u0003>Id\u000e\u001f&\u001d\u0016p<.D>OB[&+&hU\rvzg\f\"ݮ\u0011عz<Bm\u0014y֟ݹ~{弍K/XwEEH4]@RQ[m|\u001d0h`O\u0006\u0014x\\8(.7\u001eøL&.OJ'̩+v)37\u0015e&έP\u0017[\u0017[\u0017;w\"\u00169uN>a\u0017\u00158\u001c\u000fϢ¬\u0019hyނE+\u000e=\u00133쌏\u0003\u001fv[.\u0001%O9o\u0007~\u0007\bo>\u0003\u001d\u0007o2??_o\\?o\u0015ǜK\u000e/XxˎO}ٗc\u0002\u0005K8s\u001f~\u0007}޹{)wW0M\u0019\u0006]}\u0015tu?գ@W'\u0001]wnp_bC_,~-G\t\u0018\u000el\u000eh7p&\u001a\u0005AÔў,;mZ\b\u000e7\u0001l&\u0019\u0019n5\u0005\u0018n*w\b$|\u0004\u0004d9i#\u0004;´!H\u0005\u0002\u0018\"\u001a Lٶ\u000b\u0002d14\u0011w\u001c\u0016\u0015.)Gt)DD\u0011]\n\u0017\u001b3(RlDK8=_vP]9P|_w\\M3\t\u0014\u0018ъZ*\u0005c\u0005Q=\u0005\bv\u00123\u001aH\u001eſͩ;4dIa{$j\u0002\u0012bZ[l`!R£Ԙ\n\u000e\r\f\u0005Bp/V5!K\u0000ۧbhLC%cg\\80\u0015p\u0004uQb\u0007\u0019=1P.\tcbґf\b\u000eQ*mB%SC\u0010I\n\u0019\u0003\u0017\u000b\u0001lD\t^:k\u0001\b!\"hlR-ψJ槇Wn\\DtF\n^ XX\u001ez\u001e\u0006@+\u0011%l(;$hƨk#\u0003(ȑ\t+jG\u001fev,dJ\u0012vBHB5%G\u0016\u001214a\u0015a\u001ccBT/]/o{]GX~@@[Q0\u0004d_\u0012KbV_\u0012O,LE'̩+vxn\u0016;FB]l]l]-vX\u0015;E\u0017^Tr<K$.\rSILm\u0001\u0019k\u00020\f\u0004\n\u001c4%\u001a\u001e\u0016\u0014\u001c\u001e/EGai\u000egM2\"xS\bnb1jN%1\\\u0012%1\u000f^\u0012s<xI/^rX\"xI,ҽ$%\f^\u0012ˎ\u001a*2ļ\u000b\u0004\u0015\u0006B\u0012\u0005\u001cKHZ7\"\u0018\u0007S!<2\"g\r1g\u001bXw\u0016\u000b\tn=uC7\u00128DpH\u00105¹#\u001d1u6S=R#h\u001e#ΰp\u0006E+Wc\u0019\u0011;b\u0011􎘇yw<#;bXs˝;b\u0011\u001d\f\u0011Xw2xG앫\u001b';bQ\u0011\u0017\rEC}0͟\u000bE掘gy\u0007{G;b\u001e#vQ;,#\u0016;b\u0019#\u001dte+:Þ;z鮗zKwD-sa\u0018N\u0015Z\u0011l\\i.{y87qpE,8\rq\u001ev9s?)*\u000bnEUW$Xd|\u0014U/\u001eM_b\n{\u0000j\u0017\u001b麅2hY=Ŗ\t>~QZ삵l?g\u0002U\u001bZ\u001bVylm8d\u000b\u0016-ǯ\nCV=!SgM\u001b6IWvjm\u000f\u000f4\u0007k\u001bL!Tc\\*-#>Mjq`\u0013XDâݔ\u001d0$È6%IIZ@\u001f %\u001d\b:#\u00047\t!)9\"\u0011,Fd\u0007\u0013q&?fs\u0013,G\u001c\u0013j#\u0003_YG\u0000H*.d\u0014(E,\u00005h?>8\u0006#~iU\n@][(x.M(sȅ\u0017\u00078&D;꧜3\u001d>뷄,%<(\u0012j+k,X\u0016Ṯ9-\n'X5\u0010Y; Sd-˝\u0013V83L+޵s,A½no\nU2\u00050+g\u000fr%\u0012Zj\f \\`k*C=X^`W¯|Ud>cd.\u001eS,\n9#\u000eb9H\u0000K e!5.(Ҳh@\u0016|\u001370*\u0010\u0013!Y]`\u0010?\t~X\u0013_7^=}_\u00066#az88\u0014o,\b?Xrd0AGga}6iCyroGؤ\u0005\u0007gsΗ\u0019EG\u001b瞰5'{\u0015Z,Y]o=a\u0017\u001e~9oZ<_2ʷ_\u001ew\u0019pyI22ҿl^Ղw>[:Ŕ|A\u0016\u001f>+\u0007\u000eW=E}v}-^p֑\u0017,\\\u00168\u0015yeZl¬FJtAè\u0012QҔn\u0012\u0000`sx&\bN\u0011^\u0015*a\u0004tT\tQM\")H\u0013\"\u0010\u001c\u0019\u0016]= >\u001bV\u0016\"\u0000D\u0003\u0011U \u0011\u0002\u001dv\u000fM\u0005L͆\u0014@=~@mPL&\u0006q5\b'\u0018S\u001d\\<\u0002 T?\u0011Ɖ\u000f!_F0\u000fP2T#\u0000k\u0001eJ\u001c\"M&\n(h.\u000fmT\u001d1\u0014#\u0004^sLb6]\u0010\u0015X\u0010.\u0005\u0007\u0010\u0011B\u0015\u0003o2U'-\u0017T\u001bb \u0011!\u0011\u0005ژ҃$\\YjgM\rk,}[Mw!4\u0014\f\u0018.+\u0000U\tLh.\u001axǦ/ց.\u001a:-:8\u001a\u0002Xv\u001c=\u0011\u001cw6ٹ[@2\u0016zFm\u001aǼQok+\u001fV\b*\u001fz\u000f\u001721d\u0006tzj&+e~\\δuxܨ\u0000\rD6?\u0001:\\gB\u0016:p6\u001cX@CQ>TֈIz\u0019,\u0016&\u001aE;3$Y-~4,F\u0005͢O,Tc(jfDfGiCQ\u0000UPݨ))*0\u001djoCRNԺ\u0013\\֝U\u001a%^D;.^\\\r돗D1ͬB\u001d?\u001c/3\u0011檕_^W#fNae8}\u0018,(PpGe؅~,\n6LÒ`Z\u0015^\u0015bW~\u0011*.\u001a֌\u0011\u0003FG\u001a{Փ\u0016[QD1\u001dp%+V:Y\u0001nRkڭ\u0019I\"\u0006òӏ\u0017ͬ49G \u0001\u0015X\u0002zL;O\u0000\u0015a%ÈR@t\u001fh\u0003.\u000bH%e.͊sQy{8\u0007E\"Ωe8H9(<q\u000eD\",tˡ\bsP$\\\\Y&)E4\u0011ϐ8g@\u0015\u000f\u000b584\u0014\u0005P\n\u0015V\"\u0011\\97\u0007`ĹǶszL9\u001d\tsfMu\u0017jWkj\"AsɺZ(Ιu5b&8\u0007E8ga\u0014(8Z\u0013qN#5F94,\tjq^\u0015^hF͌\u0000̈s)\u0016xҙ\u000f\u0013LG\u0002ҙN2דΠHxgm~&ҙٓtFKvVxYr\u0015ge7\u0006\u0010D#\u0014\u0006p?G~${\u0011\u0013o'+N4RO\u001c\\\"YD@\u0018\u0011\u0004sN,V=!\u0001C6W?\fי\u0001i$jR\u0010,\tq\u001e\u0002\bdC\t)\u001dU\u0006\u0010&qDr\u0005U\u0016l\u0018\u00102QdD\u0016Ii\u001a\\cA8Kpkй%\u00184iueS4;K\u0012S+\t.9\r4\u0007q*s#Zq<eJGP\u001dLD*;r4N &d~\u0000\u0011}iMczl;]\u0011\u0003\u00015\u0015LNYRPS-\u001e[\u0006\u0002p\u0006I\u0014B`Լz\u0012\u000f\tB/mjc\u0002Ө\u0018\u0000g̺k1Gخպ)izϢ5FElEX'\bn\u0010Ј\u0010\u0015[\"!Cq:KR\n\"\u0014#3T\u0002Sqhiƙw0xj\u0003\u000eU݀E,T(K/+K&DL\u0018Q\u0011\u0018\u0002\fPtN\rK`Ȉ+O_S\u0006RIȀ&\rj{\r̲?@RJ `:q6lGd'jTˮI\u001fJA?Kg׃K\u0004\u0003\u0012\u0001цD\u0019\u0004\u0017}+dYԻY0\u0007\u00038\u000b\u0015TZұGo\\Fog?P\u0015hXS\u00032ܸAp>|\u001d0\nF\u0007z6>'1T)\u001aKL;)Lb0UƔ\"PT\u001d}6 Pt\"0͵\b8\u0011k\u0004f\u0003\u0002MFFFFFF`r\u0011\u001dQ@\u0017j\u0004\u0013`ӆCg\u0003\u0002SF\u000ejDL]\u001a:LP\u0005*~\u0003\u000b@UF\u001f\u0004 \u0015\u0007\u001cp\"\u001b\u0016.<@}?\u0010\u0001?`%}K-[òK,^\u0000\u000fXC.\\ܷlA\u000e>d\u000e\u001c\u0015\u0016k`\u0017ּZdA\u0007Y#j\u001cQGiݚ\u000fZ޷w-QߊUk\u000fo\u001cwҩ~崓O8C\u000f9p;o\u001d\u0015\u0007;Ӑ8o }Ӛ\u0016;\"[pe\u001d}2:c\u000b/~ץ]v;>tY|G]l\u00011\n\nӅ}\u0007=drrd]\\W.y\u001bIG9oaL\u0017-;\u0013YC^s\u0007nC\u001f޿weCg\u0013t\u0007$\u0007,Yq\u0019_}\u001fww߽i{\u0018ڰC\u0003O\"T\u000eZw\u001cѽ|?y\u0007\u001f{?\u001bsy#\u000e^(\"~l՛N\u0012?W\u001eyG\u000f}\u000f\u001dyY^b\u0005UT]#O=\u001b>rϟg?v]~.=aAK,\u0000\u001drTY\u0017o\u000b{g/O>\u000f{[C7Z\u001a\b|ucv|\u0003_־gя٧\u0017\u001bN;\f`k>tC~_ً?;nz;!\u0016\u0019\u0012\u00185/߇W|?{\u0017/GG\u001f]l\u0004G^tB\u0004ιbm~k\u000b/W?Ά\u001at,起{'/_³φǬAo\u0001}'+AEO=ӗJ\u0015Kup-\u0001u(˗^nm\u0003\u000e]_|\u0017/gT<\n{g/<w\u001e}\u000f]s 5?\u0006~3\u0007yǻ\u00067Rz|}~\u000b\u000fl,;\u0006\f7^O~[՟\u001bF.<#\u000f^\u0016\u0018o\u0016<W\u001f+_񛯹r8)\u0019z3C\u000f=\u001fe;6\u001dw@\u0004ws=wܼwqZc͊hn\u001f\u00037\\3zZ\bN8ܙ~5;\\\"'\u001f gyɯY_~\u001b@'\u001fn^bZ\u001e\u001c8LN;u\u0007X.\n!XI5\u000e_jEߢ\u0017$q~>cnD%w`͚5\u000e7߅\fp\u0018c-[x\u000b<&Ϸ\fRpy0\u0010c\u00136\u001bW`]{8\u0003B[5p\u001b50hN6ek\u0014\u0011Ң\f^\u0013-\b$m5ttI\u0004\u001ai\u000eQ\u0014\u001c\u0001\u001a]G^Ư\u0018C\\j]DV(\nP\u0013b\u001c\u0017\"px$Foǥ\tbb5|E\u0014\u0002EɺdѸ2t\r\u0004~D*KY8&Nȷ~\u001a!D R\u0007\u000b)8l޹sgkGgq=\rO6oJ\u0017{5D7F\u0013~T\u000f\u001f\u001f\u0011\u0012\u001db(`#6Q?6'\u0005\u0013'F(mܘ}\u0010QJM\u001dB\u0004ՊPP8Cj$cFs\u000b.\b ie.U)\"ԏ\u001cG!t!Ef\u0010G_42͌4\nE\u0010faFS*\u001eg\nKi\u000eMb:ʘ\u0005X\u000fYʰj(4u\u0019\u0005*ӉddfNb\u001ajTCᕫ\u0012\u0007\u000b|Zb3*]d\u0002G9P[WP>3q^a\u0005heP\ftgiBZ\u0010\u0015͐Z\u0005(f3iWl=j\u0018\"\u001a MEg\u0018PHr:k+\u0012PQziQ<\u0019^Q_U\u001eDZ,Eo$V0@\u0014\u0012Ʉ\u0002\u0003ƞX\u0013'\nZOW0\u0000\u0013Y8\u0001\u0003\u0017)ơ@\u001b$Ɲ\u0014\u00053ilԱ6paQ順SLz#T7'\u001d}\u00184j*\t\u0011ɖB#߃ɔ1!CY\u0013EpZ\u0000Ed\u0001RQ;\f3+K%D@!N%\u00101Q׎%w6Tk(\b#\u000f%\bw$\u001bXsկis)2ft3\u0001n/ն>X&lK$b<ύ\u0015WWWU\u0016ZAE[5MTMj]}+z\u0011i:na\u0015Դ9hniw\u000fV\u001ei,PEt(M?j\u001a\u0014Ħ\u0002)BlN\u001bb@rFp\f\"VLlmY%fi-ma\"_xC۸CBBBm\u00167'o5n=۬B5/4Fi[\u0012rf\u001c.,z\u0014z\u0015\u0011f\f{j\u001a J\u0014!3SaR:Gyj:]Tgs_̏Utf5*\u0000^xIR\u0015u-FSUXt+W223ѕ\u0015jыXt\u0011o:\\-XjԌnp}FzՇ\u001dy\t'r)'\u001d\u0011V:pBr5YZҋ\\{q\u0000*8tA֟r|($n_NY/]\u0013x˹o·[N\u00139uk׬>\u0007.W\u001e|e\u0001KV>Dἷ_=z;i'p1G\u001fuᇮ^b1I\u0017,Z/isk.h\rayʉ\u001eu\\\u0005/^SKF|֏[ޝ+=p\u0019\fzܑk]\u0003\u001b,-nOGt\u001f|woOzxo\\/4 Y\u001akk6]\u001f??{\u000f\u001b\u001dۆزi\u0003:+ĊZ#N9ίg_ǿ|3=w߿>t\u001c\rV-\u0004Z]\u001b\u001d4߼e????7\u001f\u0017'tw|\u000f^w%G^\u001e[hC\u0005c0v\u001d}_~_}㱿_~s\u000f?׍l\u0019\u001ez`b6\u0013L\u0007\u001f?|\u0007?\u0013_~>Wlb'\u001e1\u0016\u0019{??~\u000f}'\u001e\u0007}\u0005grDƐF\u001b|\\n\f>~\u0017?ßmys3oQؓ◿껟\u000ff\u0013_ƌƲi͵[\u001b~\n2\u001fmA\u001e8-H7ʯ_}_Ccjg75ٺot+Զ<\u0006:F/7֟}X\u0015\u001b~.}#\fŗ^~\u0017*\\L\u0003w|}<\u0017~S\u0013~RD\u0018}o{\u001f<\t ܧp\u0003\u0013y=¾}}28vs\u0007\u001e#0_{\u0018uuѻ?}C\u001f6lp.k}q=)\u0013Bs.Vnn7nvM[\u00186}\u001a\u000b!+\u00076]E\\\u0011\u0005m`%V9kIك\u0003o\u000e\u000e/9\u0013Oi\u0007Q\u00047ó\u000e?$Fh&\tüd\f\u000fNp\\c\u001cgE\u001f\u0019^Xf9\u001eoT1\ftd7=\u00136Iԛ`[\f&%xID6%m@E\u0007\u000f;=H!)clKZa4p\u0004\u000ejpONP; U\u001b\u0015@sj\f\n$yL9Z\u0014\u000b\b `4^\u0005\u0007\u0002^*%>Q5RW2)7\u0018髺C\u0006:7\u0011\n?du)Bp\"\u0005\rq毟[W\u0018}-s>ԀP6~bUg\u000e\u0010ڵ\u001boͿKÑ0B\u0000\u000e\u0015\b\u0002\u0017\u000e\bu3D\u001fy\u0017\u00115/\u0016C\u0004iInJѳ\bV\\?|o-\u0005'\u001ddW#0F\u0018\u0017Z\u001b\b\u0004żP#BL4ǜ! =-\u0018ү\u000f\bc\u001e\r}W1j\u0016qs\u000f!\u0013w쎤c\u001do乎ZT$\u001d;vPc\u0015\u0002=xCwvڡk1ǀ0!\u0005R\u0018k\u0007ݮ\u001dvH7\u000563];vPڵ\f1\u001e{]\u0016t`:ǆs,%\u001bdi_\fAk/\u0013Mb\u001cl\u001d\u0000Sk\u0006\"΢\u001c4\u0011I\u00015/,8\u0016Y\u001bK\u0016ő\"/7t-,&&XlY\u0013S36k }</N؜&[O\u00103\u0013l~=j\b#o\u00121\u0017N\rK5ZA\u0005\u0002z\u0011\u0012M6UN?VhЛXI,Go5t\u0002U$]`{IMh\u001dnx[\u0007.h`;B\u001c^J\\~\u0012E-GI\"=\u0014WU3_=e/YHOE}r\u0017\u001d\u001d\u0017\u001f:\u001c&c4-\u001d.3]\f\fi\u0004RD(Kq,Xmv;&?xuW0r8+E\u0016HX\u000b\u0006jӁo\u0000}A3k7A|\u0014\u0010\u0002\u0013\u001aC&˥5jglgVQ?&TO\u0018S\u0000`g\u0013\u0015qE=\u0000l%Q۱\f˛BўYNM\u001b\"^/\"\u0006^ĵ_R\f/\u0003ЊpDhi~$~h$+\u000e^uhL)\u00028Luqg\u0003\u0002E8L'\u0002>\u000e\\{\u001b\u001c\u0019F`6 P#P#P#P#P#P#0\bFF`Fpx\u000b5\u0002ӉCiáK\u0001)EJSCOO\"&wLzS\u001d&@IIIIIIIIɷ\u0000\u000fZ$&i\tڔX6\u0005!\u0014\u0012\u0004TiUb5F\u0004\u0019aM.XK]%hRnqj\u001145OI^$'$\u000f?/$\tKiBI|E+Zy'Ѥ(x\u0012M'ђ\u0019$!\u000e\u0019|\u0012Mʢ'\n(8OIY$\u001aV\bƺ?A\u0016#\u0004Гhy|\u0002\u0005=3۞DC0$\u001aU\u000162=OE{\u0012-\u001aeޓhzDSi8s&seI4\\>\u001f\u0007$Z\u0018٥/x\u0012-id\u0017-\n?WГhI4Od~=2\u0019fb\u001bNݡ'J\u0014z\u0012-NO:MO1I4U$&|ٓhE=kDح2$Ic'y\u0012͝gɓh<kG\u001fOs-y\u0012/ܙlޓhɔDs\u0016(>.@ɓh\u0002y\u0012-D$\u001aA\r$\u001aH\t\u0012ɓh I4JJ(^wt~s.\u00024֟yΑ]\u001aD\u001eiΑo\u0004HPص$\u00055\u0007vjCkQ\n\u0001I<G&\u0002`Xm;9,GMVD\u0011C\u001d e\u0003w\u001aNt\u0011JY鯱4T$+\u000e^uhL)\u00028Luqg\u0003\u0002E8L'\u0002>\u000e\\{\u001b\u001c\u0019F`6 P#P#P#P#P#P#0\bFF`Fpx\u000b5\u0002ӉCiáK\u0001)EJSCOO\"&wLzS\u001d&@Zo[kZo[k)x\u000f\br(jG\u0004k\u000e\u001bn\u000e\u0012drr\bG\bd\u001e[\u0007t#\u0018mR\u0002FDf\u000bv֨`͆!\u001auVz@oY^o\u0015+TzHo\u0015뭳:+[gauV^@[gz\u00105\u0002\b:1<>\u0001mz@o[g!u\u0016[g\u0005z@o\u0005YHoz[g!u\\>\u001f\u0007\u001e$ΊCFϡڒ:+[g9u[g\u0005z~=V<\u0019zbuV\nYNoeY:*\u0017[i[j\u0016[q\u0015)\"u\u0016R\\g!uU\\gYu\u0016R\\\u000bwf\n\u0015יβ,B!-uZqTq,U\\gQ\\t2S$)P^!\u001aAJ\tX-ؤH:\u001cQ\bf\u00060\u0000L\tRXw\bM\u0013Ҥ4CZ5lu\u00197/:Xv\rϡJ,fl\r(\u0001Z\u0003T\u0003Hk\u0000 X&A\u0006,z\u0011\u0001h+\u0015\u0003ÜY\u0003,Pi.\b\u001e\u0011\u0001^\u0000cD-w\u0000P=Jp*{&&\\N!\u001d[ǱYiEB5(+65T\u0001bw|jPі+\tHM\u0010\tT,?z&I.RzHNEPjh=f\u0016lZ(\u0002\u0016^<N\u0012uxl\u0000o\u0012<<ܔ\u0012\u0004PB(\u00130iyOcf-Dmբ5U\fYƪE*Xܴj\t\u000ef\u0003\u000eS$b2qܦ\u0014q 6mTj)jFlCi\u0006)j1\u0003(4:QQ\u0012jن\r5JUBRPT%(U\t5JUBRPT%̶l(u\t\u001cـk^i\u0006J3U\u0010ىLa\u0005\u0019\u0014iƪ\">ӃXL\u001dn\u0013dR0\"\u001c9L/eC\u0005nlZVPڙ-̬\u0011Ů\u0011@b\bxg\bWK.?ped_`2XyK\u0019km\"\u0016/]j\u001fam\u0017l8q\u0011\u001fzՊƘ,kMlÎ:S\u0001\u0015)'\u001e{aW.s(qe+\u001eyܩϱ7\u001d6cD\\{ԉ@\u000el`B\u0007mձM\u0003\u0012hSRS\u0005\u0007,Y\u0013цM[\u00186}avm\u001bb˦\r#WX\u0012h\u000e;\u000el8{-v~mr\u001c\rV-] 1\\Y|QM\\}\u0007o\u001dws}ԧ\u001fK6SZ|qbr\u0003\u000f=\u0016\u000el\u0019?z賟\u000f?}?}G-\u0003C\u000fLLc\u0016,[yl\u0015;?\u001exˏ<\u001b\u001e\u000f?pG?MW%\u0016:\u000b\u001e|)g\\0\u001fǞΓݷ}wx/\u001f\u0017q\u0011]<cS|mا\u001f~~\u0007>s}?oc]>0Jc7q?~'?Of\u0013_ƌ2B宇\u001eѶP/\u000e/-\u001eFiE>n~\u000e2VkӴ\rׯ~\u000eUbuywW^?:J5۳\u000f\u0002?sn/ks?x샞j\r=R~譧{\u001dK֞8f\\sUuo\u001ckkww\u000e3띋Χy'\u0010^#dEaP Hֈh\u0012psJ0fVwӸ]\u000bK۴92ZM\"h%GXsC9`H\"'ڮ\u001f0\f9DT2b31\u0000\fhL\u0005FF\"&$QR@rw;nuB3Cښy?cէ0闐\u001ac\u001bǎ#XIH\u0014\u0016-I\u001a$\tDZۙ$~ (!\u001d\\\u0010,B(5\u0004gT{UAD5+c\u000e\t,r\u0006!S``P\u001er\u0012mU\u0014\"\u001aei8\u0014\u0019͘YB0ӝ\u000b\u00018X\u001b!Lj19\u0019qcYi\u0013\u001d\u001aec\fE HbM\u001fa/\u0018Ʉ4%\u0019b*-8Mb2;p\u0000m`x\u0010e\u0006kr*\u001e\r{m]\u001cpI\u0018\u0016n$ң9\u001aH\"\u00107%\t\u0001xB(XX\u001ek)΂VL\f\u0002wj,P=QzB(6{o0G\u001eֻ\t\u0017ڳ޵{3\u0012䃘W~yX\u0007?ګN\u0018hSgA]}d϶=\f\f_k=r_mu\u0011\u001bQ1\u0014;Zc_\u000fڽ;8nܵoخ{n3z`LH5\u0018\u001a~ݵ){<;k_\u001aڹ\u0004\b'H\b#Gx<M.qa_߹x[K\\\u0011[e\b|sd֎NAl\u001c4k\b4lc6jYл\u0006\u0019x[\u001dֶ\u001fm,F\r\u000b735GeH秅'<?*'ci4\u0004\fn\u00074^뵼^|F^3+K!\f.\tY\u000f~zʁX\u0012\b\u00040y\u0005\u0000D\u0011\u00007=Ĥ\u001fEn<\u0014گ\u0004aU\r5pzo38 \t\u00154\u000bȱ66\u0005g%&ȚĶ.\u0001# \u00139;\u0002VRX\n\u001c f\n\b\u0012<\u0007\u0016C\u000f8\u0010URͥ\u0004$\r*\u001f_\u0006@4&@l,L=\f&8\b)\u0002\t\u0013AC\u0016mr&hA\u0002^Ƀ\b\u000e\u0014yvX\f\u0000\u0001Ib:\u00015>],\u0016Dp񈰬_oP@\u0010(\u0000\\%iiPA0!\u0015W^UhiU\u001aT\u001c\rHCk=B\n(1.H\fAUsS\u0012HpU>Ǎ \u0004TU4\\cHu\u0000jC#&>{&\u001c\u0002 2B({G\\\u0010&\u0001̠qS1\u0010jJ\u0003]Nç{\u001ebv'c\\ \u00020K\nU:\u0012͔™$Jgj\u001cE0hLϨ홤̌J֝\u0002V\u0013%8p\u0006#\u0013>\u0003`K\u000e\b\u0001È^\u0018\u0004`<=Q\u0003NU5fƎB)&P#\u0016'\u001ae\u0017 \bCq:V%\u0002k$\u001a~ݺJ\u000b\u0007\u000b-MQ\u0013M4X&`X\rM\u0014Z]v2 T\"dբ\u0016v,U*.\u0010\u0011\fݱmZ*բ\u0004\b!z\u0016a\u000b$\u001f+cCcLhQïG\u0001Hg<H\u001e-\u0006;PR`pJ\u001aQkT<e\rW@\u0015\u0003D`,r\u001dx\u0010)\u00012G[D4h`peΑ*(uP,i\u0015\u0005̤\rh\u000fHQԎ0X2\\n}\u0000LHf\"&$\u0001\u000e\u0000\"v2`05m\u0005\u0001}dLJj͍\u0004h%T;\u0003\u0006!sV\\B\u000b\u0018!\u0012=xj^jQk\u0004zfb\\(]oZ喙\u00128^o%PR\u0002lBl15\u001e\u0011l\u0004:C\u000fKNtʻD\u001a\r\u0000\u0005ҷJaP\u000fCD]/\u0012\u000bvn:g\u0003\u000eS$b2qܦ\u0014q 6mTj)jFlCi\u0006)j1\u0003(4:QQ\u0012jن\r5JUBRPT%(U\t5JUBRPT%̶l(u\t\u001cـk^i\u0006J3U\u0010ىLa\u0005\u0019\u0014iƪ\">ӃXL\u001dn\u0013dR0\"\u001c9L/j\u000bBzvP^]/Ԯ\u0017j\u000b0\u0017(ÀHH\u0010R$\u0012\u0018&\u00111B;##lG\u000b\u0004\u0016\u001fE[\u00107CSal\u0011  m6D\u000bZ\t0\u0018\u0004^@\u00001\u000e8\u0001Ҽ\u00059Dksh]/L\bxZP)\u000bdD\u0006\\/'\u001c\u000b\u0002i\u001d\u001b񺀜7t\fH],hY'ϝ735D^\u0013\f\u0012\u0005A2\u0016TGo$'_8~\u00162鶤\u0002%>\u00162-qk[M2\u0015\\:͸s@\u0014\"\fǠM N.}5N>.M8WC[\u0007\u001b~HF\u0004)1fe>m\u0005B-\u001e\u0004\u0007P\nՍ\u0019 +xh\u0018\u0013\r.\u000e`\n\u0012(Kn\u0014$#\u0002T\u000evq!PE\u0012I\u001b\u0016l\u001d\u0015B<nP:\u0013\t̺bF\u0019\rNI'd'xlt\u0013mڞk0Cm\u001b\u0016Nmgm5LQOеm\u0012hSv4z2\u001bɉ\u0004${\u0019c6ð\u001dVB!%1/C@Tʠ\u000fv\\\\&´\\j'R\u0011/Uxkh!b\\!)\u0006%u\u0000q5kX0ãP\u001e\u000f:vP󒚗Լd\u000ekJn\u0007ڮ\u000e\u0012:\u0007lY7YƤ7L\u0010i'\rXM3>X\b>]A|i\u0000J3N\u0014jٌL#\t5JUBRPT%(U\t5JUBRPT%(U\t5Ja6kنk^ijƃbU\fb\u001dǪ\u0014Ī\"2ӆUL\u001dn\u0013d\u0012ћt4?L'\u0004x~>\u0014}dsB}\u001b\u0003-떻вn:8(`up:X[PaAR<rԜĩxm3z./mY`\u0015*\u0018Q _@!T_\u001d\u0014)\u0013(<V8׆V\u0016\u001d\u0011*\u0004\u0011[6\u0014B\t\u0012F5T:6\n\u001bEHC^zUs<c~>914r{\u001as5/oPˡ嗏\n\u001a_z\u001a\u0019\u0019я|*\u001fњ\u0017|~iڮPkPIg%ooD?**yԪw~yWC}~o~ʺ_CEojEo׾uB/SY\u001f]\u001f?Xe?_ߘַî׿/T/w4^Z~?_W/|\f~_Ϳ~O~?_go_\u001a?'\u000f\u0006z_wt3G~\u0017~__\u001fCoU/+w~O؏`8f:?[\u0017؏\u0019y'?'~89[\u001f#?QeO_\u000bn?7'\u001f\u001f\u0012\u001bH.?'\u001f\u001f?q\u000f~?.ǭ-?\u0003\u001f77ikzO\u0013xW\u0011EjoGW֥~v}9qͯs\u001bڷYYwiO~ueIR\u0016d}|+ܾ\u001bߪG\u001dXfc\r\u0007RыEq\\^gc˛}o7>\u001fؔ¶|1y9W{)޽\u0010֯_\\ڪ\u0019L]\u0018Gb\u000fj5F'ׇW܄\u0002:7\ryO?V;d\u0010T*kuv\u001f[Ċ֚aTVO\u0013/il?4?\"\u001f^_)3h|S2>uMwYւF\u001er-_\u0017n!,fIm%eQ]\u001cz\\\u0019O÷J\u0003VmkcVSKY\u0013w6*~\u0003a_.̯=&\u000e.ڷ\u0004_ߙU?R\u001b\fE\u0013-_~o2g\u0001B`ft3^(\u001cFkp\\[7*\u001b-d\u0018}G\u001cwa<֨k.\u000bG=\u0019{8F\u001e\u0001C^\u000fG4/!}\u0007riH_OC2|\u001aҗӐ?e4/ϧ!}>\riH_fӐ>mC_^Ӑ~+ގ|\u000fGC\u000b\u001c՗\u001cwmTx~\u0019wpxa|~Oe\u0006?\r~*\u001bT6lS৲Oe~\u0006~}\u001bjg%׾Y_mߨߚsK;}sk}o|VfI#H`,\u001aA;\u000f3?<jO\u0007}>\u0005|XϷk\u0005ײ?^|f\u000e\u00049W\tڄ9c\u0019R)y[\fstk\u0011iS3̽\n\u0002G[M97J\u0003_\u001f\u00172#\u0014\u0006ϲ@γnVU n\u0013Ϛ@NU.5u]`\u0005Xg՞wz@&vՀz0Z?\u0002~*Tpw_)`BDv\u0016Me;\"rK\u0001aV%:*\u0004-ew״\u0002\f'\u0002|Y:\u0018^o\u0000,K\u0000!삻kR\u0002O\u0017\u0000?=e0TW>U}>]F.E(yfv=9{\u0016\u001b^.W+\bvYQ(U<s\u0015Wb|v:JEǜӵ\\\u001a2ƒeDb\u0001\u0006k_\u001c_5}#\u0007ƭ\u001e>G{\"\\\u0007Պ\u0007(\u001bXw\u0011\rF\u0007rW^V`./rA4Lm\u0012H\u0010by^b*\u000e@nrc\u0001䑢U\u0000cR:$d\u0002\f&\u0019rS\u0014Vb\u00191\t\f:\u0005N\".WB27z\u0004\u0001OB\u0016\u0011a*Jxܟ\r\u000e\u0005\u0016:;;\u0003exIfe̖Rr\u0003!Z\u001c%\u0015Z\nUh\u0005 U7B˻|&ϐqW\u001fŊOI*J\u0018\u001f\u0012ykYKpO2K\u001dife,(eJ\\3^\u00041ge\nzm\u000f}ż.c\r#ۥ]\u0006{(P0du7^KRXfy*\u0017s؋h\u001c2{?\u0001S\u001e;B\u0014y`q\u00115O}\u000fFԬ!_m|\u0002P(Hc-{\u000f~][vz+x+Y2+5/c\u0012Q\\\bYI\r_gs$\u001f7-Wwڃ)\u001feʓ7&Q\bk^ϐ\u000f4.]ި\u0014*\n\u0015\u00107\\qMM`7\u001eM4%8eȋ} 3/O=! /d@$$M^b~\u0000Nri&V\u0016s\u0018m(bʪW\u001e*g^\u0003\u000b\u0006#,X5e\u001b&\u001fn\u000fET囕\u000fԷ\u000f/S\t}zoH8_tѸzRlNy=9X'\t\u0002CSVe_SN\u001dl{o\u0010\u0001]X'XKw4*R.WLڕ1Q@'\u0017#gee\u0002%6\u001aH(GW[\u0006˶2iE>jI\u0011\bD_qY\u0004,;:\r?WI#8Ɍ_u\u0001.rAG\u000b \u001c\u000fC>?d;\u0014\u0015\u0014\"ߪ9}\u001dT\u0004+ddrլ$\\{r(VeȼVfQ6m2\u001b.|&g{w\u001a}\u001dYL.L,\u0016Ȱpl\u0011\u0005VKև\u0005bVaE\u0011YfA^륏\u001d\u00172O{\b%\u0005:ٗ\u001e>\u0012r!_E\u00102{/4O/ް~p\u000bUqEc\u0001|'9`\u0000{N\u0016<Sԑ\u0015\u0005ccpF޲#c]N\u00198hysݪf\u0002Zn.\u0016\\P\n\u0016B6i\u0016o6fʾFEqaʭ \u001d\u000fi\u001f}K;pst42>`D\u001b\u0012\bwr\u001d$\\\r?rǌ\u001bF\u000et-+83<\u0002H8φ295 g\\R!W.\fq^\nqK\u0019c_\u0014c!\u0016P\tds̍\u0013ڑL6yY=rq/\u001f{))\r\u001bfA*E\u0013irw,r7zڗ\u000f \u0007B\u000fEqʃ\u0019rzm.K\u0016\u0003D\u0018ȔMlMlкͷ\u001e\r$(\u0006\u001c\rP6\n.Lỳ\u0006d\\ru%R&@v\u0005\u0015k&eLԝx]6٣\"i\u0010\tD(ϵ%u*\u0000q`O-;.*\u0017f6E\u001b\u001f\nT$9p\u0004ۮUu}#r&(nOv\u0019,Vr@;ג\u0005~c.MsL8D6Pf,{\u001dIrה\u0011}/ɡqB6d~\u000eT(g=\u0010\u0004r*ƞVRMH(\u001brgd2\r\"\nV#\f=$9\u0004(/[8g\u0003b\u0000s\u0002o.#EZ<oU\u0016(\u0007DS\u001dpwLlfS3N̾\faQPH̓-|\rz|\u0017a!\u001bC\u00005\u0000q!|,Y\\\u0005_wC3]]!?s/.7\u0019r\u001e6ٷbmʤ\u001e0\u0007A^_19ˋȥ5ƶ\u0011Lh\u0005+pqYw9HdE\u0001@,k^\u00009\u0004Z\t\u0016¹\b+\"!\u0010u\fEʷ&N\u0017y\u00007\u0018POzK\u0010o{<\u0011/S\u001cd~\u0017,[XL2;\r\u0018b䔔\u0016\u0004\u0014\u001bַ(!_xJ\u001e\u000b~ؐd'Br|#*hӲ\u0017j.2ݧ \u0019mi;t$9䄁)V\u0017\\E6E!\u0002\u0006@r.4\u0011dcD7rj|L\u001cc.\u001a*+>ڄ :\u0015F\u0006@_ H:De*\bf輥\u0017\u0005\u000e~x2\u0002wRٚ\u00001IN\u000e\u0013\bh\u001b{QGLU\u0012\u0000v\\X>\u0019J\n\u0006eY+\u0019\n\u001e\f\\=ɇm\u0018\u0015:7&Q\u0015\n\u0001aK\u0012\u0010AU.^\bZȯ[u\u000eBXgv\u0007.\u0005U/E!/ł'g<t:$\u0015QeQ.\u001fw:'DK\f.\u0011\u0019n:K9:,$-q/GuD)\u0011DfDYue)cE{\u0015\u000bgG\u0013l\u0015&n\u0001C\u0006\u0000T?c\u0017U},\u001c(\u000bo];M\fD\fZt$Aw˨̺\u0006qEM\"MVZrB\u0010>\u0015\u001frY\u0016S\u0004\\ft7ذ,\u001b5[Ћo0xgr:%nΐ;hRio]F\u000f\u0011=Η.yQt~Ii؋uQE-\u0011\u0011>&\f%\u001a\u0014\u001d縜%)㾶V#\u0002-*\b\u000f\u0006;Hm&\u00108Yb܁2/\u00005\u0003`{dU^\"]\ns'Y=5:{CW^KY6\u0011LRWNG@{\u0017P|K!\r}~=\\RW\u000f׍\n\u001fP.U9!n1|%F\u001caޛu\rw\u0019\u0006bgsB\u0010Tu\f`E^e\nxb\\1\f$\"Ήh2y\nF\u0001yɽq';1X\u0019ܧG\tڴʔ\u0013pŲ\u0012bH:7\u001c~2AИ>#\u001d\u000fH=^\u0005-u{- Oe\u0017kN\u000e]Y\u0003Sv%(?+pjֺDa\u0002\u001bܟ|o$[\u000e6\u001crZĲ޿\\y:i-˙Dk%ȋ\u0015UBvȎɯ(kSvVD|֢\u0016cE^\u0014o$W\u0017գ88ArW\u0007'`Yv\u000eEV\u0004z\u001cr7B\u000fu`W612x>D\u0000r\u0002\u0001Gxc\u001c/7\r9'\u001cFWyy;4rL(78\u0018EBLM\u0004cG.-pJ \u001c\u000b[+Aۃ?UK+T)]<;Vq\u001c\"_\u0007\u0006h8\u0013ؿ ~#\u001f\u000fYNSrƟYFt`g2=\tZAW@^˟E\u0019G3hPc\u0011px\u001d\\/\u0003޹-/3[?gvvzxky\n~M|2^rZ\u00052\bL\u001bt\u001dn$YB܃!UTm)gro4L{<\u001eYG/sfx-Y]~EK8EY_i\u0010\u0018ZmWؗW[i=\u0002',t\\O)+ktg+.i9\u001f9\u0004\u0018|\u0001\\\u001f\u0002\u0012L|Q\u00104\u0006\"WAac` \u001e2k\u0017b_;UZ\u0010\"\u0004![\u001c\rL5*A26!18C#'\u000bH>?茉dRE\u000e\u0004Թ,\u0007++\u0004\t|T#\u0013L\rFV\u001c_\u0004q0uirνD\u0014ۯ]%s;\u0007\u0017G\u0014_+_\u0011rDh1pĮ\u0015*H\u0014bg\tfٳVEdw.Ȭu8\u0018 d&tBbwm^bEc\\!o'YI\u0011{V\u0014$ _\u001bShb}B/!'vO\u0018D˕凾\u0006unȷb\u001arh\u0002\u001c\t\u001aħ`\u0005Tn\u0006|\u001eif\f9\u00105x\u001dw\u0010\bZ&⊔Z\\ʐ3\r@ ߦ!ce\u001b{ʜH8Ca!`Y\u00162`\u001a\"M\u0014\b\u0002\u001aSrX3l|\u0006:Zh)Fҳf-#\"VS\bэ_GF\u0014y{\\Ș`crE;> jp:N\u0010[\rV\u000b\u0012\u000f\u0018;\u0013\u001a2k\u0012\u000e5pe!Ku+K Yxm&\r**$σ!\u0014^;\u0014?sE\u001e\tbK_V\u000e\u0016Kg_,>@\u0016\u001f\"wB1\u0013Fۚ\u000518\u001b,\u001eh\u001b!.;ٿ\u0014B\u001d\u001f#LP=\u0001CĪF@dW/ku\u0007N)@}\u0014(\u001e^W\u0001A1T>&vʞ~\u0010\"ֲ!B\u00149Ep\u0015EHI\u0011\u001bRD/r[]-='HF\u000f\u001dH\u0019X\u0004}.+\u0004Ŋ$\u0003&O\u0011\u001dK\u001b8nF&\u0000.j\u001fy!G3q\u000f/R\u0010S\u00106}\"d\tk\u00194|;^S\bo׶e{\u0018Eͤs_w/_(6wlA9ϡfj\u0012mϑ\"eCIe.'Z\b\u0014\u000eSĐr(\t9\u00122\u000bs}={#d$(.\b\u0006y]0PK\u0015\u0000C\b@>a<4\u0004g8\r\u0015t\u001b\n\u0002i!NnH-\u001c:I\" \u0002\u0017$f*i\u0006Ẻ\u0013\u001b8\u0014\"Gٰ\u0013ˍ3\f*(uR-1.Y?|.\u0005xVU\rEX.@rfq\u0014g/]gaGVؾ\u0014\")D?$8^ن0\u0007p4\tAC1yD\r][/r=C|c\u0014JF*XA>FtX0u@F.\u000e\\Vw\u000b]s{1'V!W DUKj_8p\u0016Ut\u000e\u0018c 4|F\u000fֈSrF\"gE콥`GN*\u0014dV=\u0006\u000bQՎm[5O\";gH%cvd'\t(cW\"h['\u0001_Y}oDPt|!\u000b}\t(%\u0015ߺíͣ[\u0000f\u0019<)B4\u001b#\u0007vu\u0007\u0006W\u0011ct\u0003{!FY\u001b*}B\u0013Y\u0006rT[\n}\u000b!V\u0007uVAb\\\u001fw\u0000d;\u0004Fȣzq\u0005 \u000fr9\u0007\u0012UV}u\u0005<IԿNO\fs\u0004\u0014̅\u0018˧>\u001c5DhV=A9+\t\u00191u/k8'\u0003=\u0001@\f\u000be 39W;y\u0000:/V9.U\bnDI\bZpW~*!Q7?w\u00102HAcD\u001f*e_\u000fyn\u001b\b[>\u0007\nѯ\u0011|i\u00155؏\u0003]f[\u0010$ݺ<1r;e7\"!\u00052\u001c\u0006A'/ߤ9&UqɐFyp#E(5#P*y\u001feF\u0004\f\\Y`DL\r2Fz\u000e{ՔoS,\u0014d`~\bB,\u0006\u0011D\r\r.Z\u0016#blǇZw^Ft󬬲\n\u001ap\u0013b[Wv1\u0017\nVC\u0011\u0005ՎP\u0004r\u0006jpG\b#7ՇO\u001b|q\u000fsRn\u000eBNC7]!揉K\u0005$Z\u0004|L=n~(Tz<\u0010h\b\u0002=g0tQShX)\u0017F%?\u001e\rw9O*;lɩ%\u0007(\u0005c?>\u0006!;G\bL\u0006\u0011RHؒu9\u0019LP[۶*)\u000bK\u0006r\u00102Ѣ`jcXu\u0007 uDUf\u00144\bBn\u0012wm!\u0013\u000eoAtӸ)HPx{v\r\u0014Kʚ-u)\u0003;u JEUeJ ǮF\u0003r]U\u001d!\bayG\u0015\u0002\u0015ɢ\u0000|DCgzI\u0012z \fg2ߥmEP,%!\u0005\u00115Ava\u001aM7\fu>󯌞Ab$6^\u001e8\u0017\u000bm5\u001bȂ\u0007X\"*P.c^\u0011\u0016[0Aw\u001dt;\u0014ԭq܎?btR\u001d.H;\u000e)ٝRyhENZ@\u0015\u000e\u0014QRR\\@\u0015Q tWvd#M\u0019\u0011b#\u00137\u0004-m+=̛2\u00055\u0006>ElOjI\u0011<ۇ!X(\u0013$\u0007 FPt%e\u0007,\u0011(P}!uWp\u0006\u00192j)gU\u001f\u0003M\u0012l#j'd\u0016\u0006w\u0018be¨0A7dd\u0015F\u000b2V\u0002=ŉ2|G2r\u0016ˑ:V˴X\u0007\u001f3\u0000  !^g\u0000%\"LP\u0000puk\u0003dxO*@oEjte\u00054]\u000eB۞='u\nR/\r\u001e۾\nohO@!\u001a׏\"deыsE}F\u0001\rfڐQm,6}BdLٲD\u0006؍|jrh V\u0016a\u0013 \u0007-F\u0014d11f\u001ex9PXZ=E>\u0007)\u000e\u0019r\u000eÒEQ.\b\t\u000217,`\u001bWSDG@o#ksR\u0014\u0010DQ\u001c#\u0003=B\u0015˳\u0001g\\\tv٩D\u0015\"=\u0013&@`\u0014?`Jz0.H5\t!$n=Q\u001fU`\u0017\u0010\u0002ޏ\u001cg6ՕRCԄjq(w}\u001e9z\n0/\u001bB+6l~Z\u0017Jm$hW\u0014R\u00113A8\u0011e ghʡ25MV\u0013\b^\u0012j0\u001b\u0011X\u0006\u0003Šz4bD/m\u0007+xgD'\u001bnJU=\u0006.EN\u001ahF-<c\f:ztֽcGm\u000b*;\u001aMKiYY\u0002rLc\u001b4Tb#]\u001c\u0014(@4\u000bչ\b\u0010\u000f~\u0001arp4 1~9@Ԅɮ/$\u0016'}DlK>xQ! ^m嫻\u0015QH^A\r5\u000f\u000fYM\u0018\u0005\u001aN\\F=HtW$rmOы>h60AEmvڨ;4ǜl-75_\":2\u0017/ !'_\b0\u0006*A=pFشFtjXPH\u001c\u0012zF<ꯠrRB\u0005zR\u001b\ro!sA\u0017\fE \u001b \b\u001bÔ#@\fgO{˳\u000f\u0019iiEn.m[K6\"g*&\r\rg\u0003=,(5X\u0004мͻ{9Oͨ[e\u0019.N\u001f\u0003\u000bh#Ԟ\u000fY\u00148\u00046BǴ\u001c53\u0004=\u0002J\u001eWS]G\u00041\u0010W,h]⚶w\u0013Pϊ06 ?Ȝf؈r]\r=\u000b\u0003 >mjvt\u0012s;\u0007\u0011#0\u0006\u000bMupp\u0010ق;8@N\u0002Iܺ\u001b1]\u0011\"aN\\\u0010L\u0002I^[V{fDN\u0012s\u000e ceVK\u001c\u0006&p\u0014\u0003\u0014\u00034*\u0018Bff^D*L>di\u0015\u001c\u0014\u0012=ea3bʊ[.x=kF#d\u00115_]\u0010QR{3\u000f\u001a\"J:m_ Wg3nD2\u001eY7̝8\u0014\\*1&p%]y욁b\u000f\u001114}N\u0011\u000b\u000em๐U\u0017\u0002q\u0001nI\u000e~fhtr\u0003ά3d\u001dG\u0005}\u001eH\u0011\u000fxD\u001c\u001fSQBt\u0007e1.WzPڡ\u00147LԸc\u001350\u0010\u0013)\u0007Bd o\u001cq=.q{F\u0002R4#c\u0006crd͞\u0007쪻skbjm(:q\u0015@\u001b \u0005=x\u0006h-PfPp&To0\\\u0017\u001b{m`\u001aGZI0I\u0019fU6<hx&.\u000ecd\u0012&\u0014b\u0016qZo\u0003#h\u0010SplB?\u0012\u0000\u0010LC,NKEc9|]q\u001cBf\u0003˞\u000e\u0001^P\"䭧c[ q:ĎQ'\u0012h\u0017\"[\u0010\u0004\u001f\t\u000e;c 6je1E\u0011s\bm\u0007\u0017\u0018?}k\u0013\f'?\\9s\u0011` <{G\u0003A<\u000f7\u0000uǭ\u0001$)B~EC\u0004\u0018,Zbr\u0012G|@\u0010V{\u0011ΉCc煙\u0013 >lވp\u001e1\u0005\u0013ڰ@j\u0003T'qU\u0005p\u0000ჿ7E\u0011\u001d\u000e\u0004>(?\fX\u0018z\u0016\"\"\u001fU\u000fg\u001evǹGD;sIղ}\u0014PI\u001d\u001e+\u0019fJcVe<\bwdj9v2O%hבW>\r_2x^my\u0014\u001c6R\u0011{oIiHE\u0002nVݸY\u0013P\u001a\u001b\u00134*+q\fB\u00029\u0007\u0005m(2\u0014| gH#\u0012\u0001~zd\u0015#=x,ؚ3c]q'\u001c\u0017\u001c\n\b)~&p/\u001eRwA2qkeMp#526\u00140mF\u0010}s\u001b=f|#I\u001f#`\u001c\u00067m9\u00189\b}NV`@Wׁ;lgUb=E\f\\&(?3lksG,WH\u0006Z<2@8\"\u0010&Xh We1A\u0011:\u001bt*\u001dN˯ EL? \u001epW\u001a\u000e\u0013+'HCND&N|\"@.0)sx\u0015\u0001X~1<\"\u0001\u0013\u000f Ko]hͺh\u000bH\u00051!\u0019K'Y|\u0016g\u0011|4I\u0011x\u001c4ix\u0004hcļ0A*\u0006\u0012iR\u0013`69\u0015[\u000e^l\u0017Ē\u000e;VdGh\u0000Q\u001fsZ?\bagb\u001e\u0006{\u001dscP0vU ʞ=\u0017]LazN\u0001\u0011Gݝ?j@\u001bl5\u0016̝S_UՌF=\u0006\u0002<υoC39Q@\u0018&O@;\u001c>t\u0017\"8M\t:)s\u000faЭ\bsֱ?\u0002\u001fS E<\u001c\u001e$a#Dѳ \"(舄$x\u001f\u0004UK/Ә/#\n:s\u0004\"\u0018j!\u0002\n8Xل;2{G%=?x\u001a\u0019\u0001Z.-22j\u001cAj\u000bm`Q?Wܗt'\"L@wH}1Pb@h\u0014!g}@K\u0004y~|y\u0005)=C\u000bжǭ&Hޘ/x$Zx\u0019tW\u0013S\nR`8\u0010pUĳR5\"LP(~!H2>\u0006b<LE\u0004;\u0004=\"H\u0011+V\u0011\u001cOD,iP\u00045\u0010_sN\u0005\u0011b\\\u001e%JU\u0019_\u0010&R\tQ!G\u000e*\b\u00130cڣsC#V LP8ѥ+7^\u0010u0AL\u0005\u000b\u0013s>F4Yq=\u0011M[M\n\b*r^\u0010] \u0006/7F\u0011%64|\u0013\u0011Z)n\u0010l*\u0015\f\u0007(v\t`z)eG\bxOcPVv\u00020WM+GWO卟Gw\u001bw\u0007\u0006\u00047\u001f9|;Oq`)=Q:_T\u001cHj<\u0007H\u001b\"E[\\P\u0014\u00164\u0004}\u001e=O8Tg(k\u0002\b|]YS`P(eWY-5/DHhyɜ\u0014\n;{e.1S\u0015A\u000f\"|&}ng\t{\u001bd\u0015ʣ@o\u0004́\u0017] \u000f\rpɩk\u0003\u0014V\u0004\u001fSCF7g\n\"LSY\u0011ƨ4YB-3u#\u001e0Q\u0018drHRЌ\u001dM\u0000&\u001b1\b fe\u001b\u00050MN\ng\u000bs[wT}J-\u001b\f%\u0005\u001b\u0001\u0012\u0013\u0004\u0006F.7Hs=H~l\u001d0f=,k6A%?L\u001bnN\u000bmPc\u0006kl(\u0001`!,ɐ\u0001]^f{\u0007LY\u001c%0\u001a\u000b[W\u0010-i#\bc\u00043\u001a\u00127\u0017\u0002kjj^\u0017Yw\\\u0012\u0014U[\u0004>F֣e\n)B˻\th\u0017}\nh7\u0010f\rm#f\u0016q<ұ)G\bΨ@1.1{ֶ\u0016Ub\u0019V\u001baЊ`\u000f3\u0005]!WxXA\u0001xTn<ٙL@\u000f\u0006ܤ tCrӑ\u0017`'\u0016mX\u0011\u001a76⾘ib\u0018\u0005gu|{?T![|#\u0000\u0014~\u001f\u0017ԩC\u0007qО\u000bјuI'?\u0011&(dnӻlU,9u#XǼ~=\u0004dK`#f>xɬ\"8V\u001fˈ\u0001\u0005AqJ3tV+Bu)m\u0005t4fa\u0011J\u0016f$/\u00057͍\u00153\u0014\u0014ar.(w7 IbiSFu2l#6F4\r(Lt4]0&\u0018(V\u0011C\u0016|\u0014*w\u0014\u0012\u0017\u0014YX6h\\`٢6\u0014%F$HBAN?H\rboxY1#TFmDN1J\u00109[\"X^&EJ1n\u001f\n\t9\u0014\u001b\fQ\u000fZ>\rN@M\\\u0011\u000bC\u001e\u0011\n\b߈fab^]|\u0018{^\bN[g~vdܚ\u000b;SWsk\u001c\u001d6B\u000e⻠<*\u0016\u0018\u001e\u001b+\u0013ZbfLkVg/fPG\u001c-$!${\u0013\u0014\u0001RbL!gÍP\n\u000f폙jf11cb!BFt\u000bfzC\b\u0006yF\f@\nOhhd>E\u0017\u0005Ҷ%11ce#*m\u0016EPL4&/\u0004Zih\"3!F}\u001b\u0011oD榱7\u0002O\u0017RA^\u0019Zb%\b5iHIe$\u0015Js눠\u0011V'nj\u0000鐌ޯ435q!qj\u0015^&9'e^|ɶ\u0011^\u000b*y\u001a\b=0\u001f帀QmOG2VA6\b\"^o)\u0011P1/sk{D[Yq4KXf,W\u001c9\u0007&qf\"if/\u00153A\u0011j8R󦅷TB=Yw[!\u00176\bLNpAbqmi=\u0014\u0001Ӛ^rtF\u0005um\u0018d>ٌv\u0014\u0016\u0017\"<92; ֵc@\u0011Y.ze,2A\u0005$3.iЊȰ\"b\"4ȯl\t\u0006u}\f\u001c&d|V\u0004wȇI@(5̗Qo\u0004+]T޿2kh#qhvc{`#FzeZ\u000f\u0007\u001a\u0019^BDJ}I\u0010ьQ\u0011)\u001fWo^-OEݠq;R㚃=;\u0012{\u0005JV\u0016Q\u00108CCmeCtMY&]\u0014!tA\u0013\u0014\fD\u0010{F<C`#\u0016\u001eqB6'CK\u001f4J'㝼hA\u001121E\u00188M\u0013\u00110\u0005~\u00077E1\u0015+/\\\u0000\u0005Y~\"Q\u0011r2u\u001a^Ik\u0005\rB\u0005\u0011\u0019'd2UCL&\t\u001e@%u釹Si\u0002q$o#i#E_GS\u0014\u0002\b\u0015T\u001ba\\Cr#ԁlr|\u0018r\u0003RwszO#\u001e=&k]\t&r\u0016$\f|,,)\u0016uhTR\u0017]N\u0015B-I1Ael;hF}zxF\f\\HjhxN|\u0005\u0015%Y64Q~>'\u0010G\u0007f#\u0018O4\bMõO喎vŒ\u0005B^O5x\u000fƄ\"\u001bM~Bk>\u001c㢳Q܁&p#JgN.YlVDh{\u0006~qŀ\\iC\u0015\u0011:6z\\VRd\r&\n܉\u001bĲSm0-iC\u0011h]W6\u0014d^(4\u0005k:\u0014\tX5\rUD&\u0011>\u0005Ey\u001aŪ)\u000b!gDnN/M\n|(N\u0011u~W$\u001d\u0004ڝ\u0015<ҧT\f 2\"W%mBR̰QP\u0011,ǐ\u0013\u0011ʠ7\"r\u0016%\u0015\u00136\u0002/֘)\"=bb)urA 1b\u000e$68\u0013F\u001bI=_h\u001a+\u00059gnt+F7*G\u000e##\b\n\u001c͌G1Q(\rY\u0010\u000b\u001eR\u000f7>y[k(%,\u0010\u000f!\u0002U\u000e\u0015\u0010sk!\t*h\tR\u0016i\u000f\u0014TFD\u00040A\u0011/SpB\u0003<\u0005VBxoscB\u0011MPj\u0002vȉ\u001fz\u001bᕇ\u001a|TncRe\\P=\u001b_rZ5/:\bY߈\u0011R7H\nb\u0018\u0006JK,7}Jj[ڢ%\u000eZx\u0001M\u000b\u0001fZ\u00115df/D \u001b395Jo\u0010ZT9\u0016ub8-7\u0005\u001feD\u001dV\u0018 \u0018cq9doDE=z\u0005\u0019\u000b᩠~P\n\";YFp\u001bi]:v.11$_P\u001d6W(\u0016\bY!v\u0001X?F.\u001a>Vt]|f\u001b|U72\u001d۔xH\u001fCF\fegK(\u000bS\u000b7o\u001e`H\u0011`\u0013'3=\u001f\u0016\u001e-h)).qq{y$c?\u0010=\u001d|\u0003\u0010C\b\u000f)\u0010\b:G\b \biX-Ɏ\fy?*:\u001f\u000e\u0002\u000e@\u0011ao\u001b\u001a\u0011\u001d/)\u001c׶\u0001M71RxPw#F(\b(p(\u000bD]\u001buquf7\u0012W(\u001bѹ\u0015Nsz+K^\"ܬ:~beh\u0017\u0015\u0005&g|#r:\u0006kjV\r.$\u0019\u001f\tAAE]\u001cn{(jύ\u00180AQl&:!ڢ:PZlD[\u0006U;\u0015zA$c{W\u00103t\u0003\bIWMSN\b\u001e3.\u000e\u001b$`\u0006Q6D\u001d\u0003n>rd\u0019&(\u0018\u0011\nRo\n\u0010ۡȑu#1\nD\u000bP\u0012wmM6N:*ݾ\n\u0014\u001d\u0014\u00172W\",nlrfΡiL>\u0016\u0004̪*21V8O//gщ\b/݈\u0010PD\u001a\n\u0011\u0006}T$5\fhX-!_?\u0019\rk\fmPqM\u000b\u001bVgNדM>\u001b\u0001-+j81\\Z)\u0007\u001f\\ED\u0005P\u00006P[\b\u000bF`\u000eYY\u001c\b4`\u000e:ɋbre8qN\\ɧ\u0004\u0016E\u0018[FD2uE(\u001fo<رӐ\u0013\u001d\u00163O=Ŕ\u0005!X\u001fPEM\u0015I\u0015drRL<a#\"Fx>\t\u001a\u00151\tUr{BØCA췅\u0007\u001aN\u000bY!\u0006i\u0011\u000flL@\u0013Q-#P\u0007gvm?\u001f\u0015Xa\u0019EM$\u000b]h*I\u0013v-{_\u00148>\n\u0010夈\u0015\u0011C+VQSAh.,!Ҵ0\u0013a|~.*g(RNsZWo7{ \u001c\u000e%V+.\fa#BR\rE\u0004V!Et\u0006\\灾BP8@rw\u0015\u0016#]9*\r5)1/dn@V'\u0003u%HcҙU\u001a6\"ґd\u001f˦\u000b\u0010=Tz@έ\bQ\u0017`\u0014X\u001dMITPm\u0004\u001e\u0003۬)\\Du)#/}$!@^M\"\u001fF\u0007_6\fPq\"~B& 7=XF(HN2 \u0002ӓ%q$|.\u000f1\bב^dqÞ)u0\u0002\boQ\u000b\u0014\u0012>ٞC>>S\u0000@xk\rK=\u001dò\u0003o\u0006\u001a6>:\u0018\u0018qrn`\u0005N\u0019\u00041\u00125/VN}#-<[7@(%<ro\u0004y=\tkGSS?$2j\u0014[ۂ.#Fw%t\u0019S?)?@BG\r5\u0007*e\u0019S΍\u001cv\u0010I3裉 \u001b\u0004Kv\u001bcm7TTb\u001dqj\u0005\u001f}L>\u0018Y-{戣\u0005D\u000f[.\u000em՘32dN(I\u0019cb\u000e\u001d!_1HűAu7\u0012У9n\u00133l\u001fQ|\f7+l\u0013gh\u0001\u0007 \u0010s߇1t\u000eϑ?jp\u001d8\u00107@\u0016Hi\b\u0013TF\f\u0006 kG&t\u0015p&X^1Fv\u0019\":aH!%w:\u0017\"Y\"d\u001bӏ>aI\u0011\u0012}0\u001e9\u0003o.k%\u0011g\u0011\u0007%ع3lF\u0006715\u001cV\u0004H,.8Lc\tz\u000b4\u0019Z.\u0001Z6 n/WJKu#L~qN(.ʔcy\u000bz/<7\u0001\u0002(5\u000fng;m-\u0016l*\u0018d?\u001c]N6Ȩvm4^\u0015$_s\u0017z0*gEX,\u0011F|\u0019F8@6Zx\u0014oD\\\u0012ȟ!\u0017\u001fIp7*̑\u0005g~\u0006B<uf\u00156b-$n\bh_{z(L\u001f\u0003mI;\u0004!#\u0017 j_|\u001fT\u0013j.AB)=ݒ\"Y.(\u0014,\u0015lf\u0006Zu +Թzu!:8VLk\r&*A\u001ff7Mj\u0004t\u0016\"\u0001\"\u0011}?:\u0013hbc\u0005*}Yb\u0002-)4&<K%~C\b/)9\u0007F\u001d0@\u001b佖7W$ze)\u000b$;8z!.D!\u0013j%rF\f-;>:3n\u001cM\u0004-@S\u0000e\")|EuYec\u001ey#tx!;\u0011y\u0016-P\u000f\u001bd\u001e?󾂈\b\u001b苹@'YUw/\u0007)ڈH^\r\u0004;sA}A8uu\u0011;eel;6\"SwALw@JYz\u0002\bkB\u00122\u0017\fy1u)\u001eBWU\u000e.7Z\u0016R\u0007\u0002!Dz+\r\b\u0011͚:\u001f\u0003F\u0011$x2N|\u0007aDo&(\u001b\u0017\bdơ*b<`?\u0004\u0015TBg\u0018^IAo\u001d~J\u0015c U9tbs[f\bﺲ\u0011*;}4h\u0010\u0018c\u0011jI\u001bԻxB\"hp=8/\"pT\u0013$\u000bڴ\u0005*C!Bx>\u001bRFh\u0011^Bz\u0006Y+\"}Lhh\u0011!iD\u0011\u0002\u001b!\r\u001b4 $ֲu\u0007=\u0004k\t]\u0000p9\u000bQ\u001fC][6fx(\"4^)~ \u001do2w͝\u0011NM\u0011FKpF㍨\u0016B\u0005*N\fP\u0005k@aB\\N_\u00113R\u0005BVFXAh\u001b2BCЍ\u0018BD\u0004E\u0006[s\u001b\u0005AF\u0018jɺrh\u0011G$|!BqB\u0014VK7\n݇\tC!Ѥm)\u0000\rL\u001f\u000e\u0010o!Ĝ\u0019\u0011,o#XQ{\u0011m\u0000\u0014OX \\D[\t\u001adWG5\u0000#kO\u001b ^܍1d}\u000e\u0011eg9R9k,\u000bz\\\u0010\rı\f(zgX\u001e~j;OSj$\u001f\u0013((7m$ٔ\u001bcӚ,PTDh\u0010r\u0016J9Ss#u\t7Al4m\u0003.\u001a/\u0016%1,XN\u0010G\u0019,AP( 2\u0014b׊r\u0018Bh},[X5I7~\u001bXǄ:\u0010bQFxg#\u001a\u0014\u0001tH\u0018\u0010DX\u001e\u001d,ڠW\u0005\u0005}\u000e\r\"b\u000e\u0002 QD݈JFBjsc4D\u0011XC6w\u0015a[\u0007qAlOo$/\u001cjF\u0017\u0011wQ!\u001dFxU\u000bJDACv\b9Z<\u0007C\u0003E\"BGA`T\u0013\u001br_\u0018\u0016@QbE]\u001al\u0013\u0000iZ\r7LLam\u0010.\u00182\u0010Vlq*1A)b0k\u0005٭\u000f\u0006S\u000el>\u0015P\u000f4\u001b!/e/LRܘyj۲}jT;S,ۈ\u0010\bM\b\u001b:ApkQ>k#5\u0004\u0018vB@R\u0011,r!v.w{P\u0011rT\u0004|ڧ\u0000ɇ\u001e\u000b\u001bq\\\tʮV_\u001836%\u0000(/\u0010w!4ӟ:!\u0005k\u001a\u001a\u0000$22\u0000C%\u001bMNgWP֜W,\u001d5x\u001fU.'\u0012P.%},Po,^!gF3N\u0011A@\f;ms޿H\u0002p\u0012P\u0003t\u001d>,tX5g\u0007\\\u0007A\\\u001b\u001b\u0004+\b/Q\u0004xi\u0006[]\u0005)eadzi!WHp\\ӷhrM`wAUtc)ޟn#da\u0007\u001f\u0010N\u0011rAf\u001f(\b\u001fK:\u0006B9LN\u001a!se\u0001\"7M׉f1Q*⾢芐fo#X\u0016\u0001\u0010\npe'Ҵ4\u0003Xȅ\b;\u0015!ȲK\u0013\u001467\u0003\u0011\u000f8\"Fi\u0005`]ރreW$mr\u001b]\u0002l{a#J(&Z\bk\u0018&._l\u0018V֐mDC)\u0017_\u0004̵\u0012Zõ`\n˹V8i\u0007mU'\u0016ݱvxW\u001b \u0018\u0010Pw\u0001\u000e\r 7e\\ hg=}\u001eHE4\u001b\b/rA-\u0004|7H.c45s[C^\"BFyFZY7Hp/4\u001bBs=s!BABtV2A583\u0012Jiw\u0018\u001fQk\u0002\u0002k\u0006\u0016\u0000qs\u0019925%\u000b\u001byfMɌl9\u000b\u0011I\u0001k\u0014iƌl.gQ\u0004C\u0012\b\u0006j@ϝ\u0001Ό.\u0014\t@\u0014\u0014fJ\u0007\u0017v`\u0004\u0000RA\f\u000b\u0012s<<C\u0016\u001cI\u0016`;\u001a5@ \u0006_\u0005*.{q`fM+N\u0011,);\u0017WZu\u0001\"\u000ey\u0002/H\u0011т)\u0001z}\r\u0014f\"{^Ndfˑcy\u0016b\u001c\u0004YiS&ȋM\u0014\u0011[\u0015a\"!df\n\u00012\u001a\u0006\u0018QxS\"B@G\\F|'\"\u0010.~`\u0005*FX\"p&مf#z\\\u0007\u0002!P\u0017\"-xǑcc!9dcn趛m\u0001\u000e\u0006\rt\u0015\n)-\u0007'\"\fNØ94RڈN.?sDeVAS1\tB:\u0011Qng#rQB\u0002\u0014\bo#.ݿ{\u0012*S\u00155\u0017)\u0015tf\u0010\u000b!7\u0002\u0015|ʩ\u001b\rN\u001c\"be\u0019\u0005A^z*\">#D\u001c*\u001a2b,q&Srd\u0003x#PuN\u0003\u001bq\u001fv\u0018KI[\u0004,\u000e\u001bdywZK\u0010,\u00144\u0007괤>\u00177M\\\u001bqO&my\u0014\u0011=\u0018XBd1!FM!%=GGⰗ6#<bK\u0001\u0013d\u0004˜62]\u000b+b*,O֜E\u0011wL9a\u001f׉m\t\t%T.\u0004nވ\u000e\u0007\r϶%b{\u0005UtcQpܮw~?&\u0002Y1i>é\u0014\u0011M`J2\u0004\u000fF\u001cw\u001d1y#dZX^b\u001e\t\u001aׁ1*7$SR0o8ųq1\u00141\u000e\u001fr:x\u0017BV\u000e\u001bJ8\u0004\rN}x\u0017\n\u0011\r*6&4\u001crnQwH\u001aH՛\u0013\u0019\f\u0007\\I\u0014Dji\u0019>&0D/\u0004\u001d9Dݍ04\b\b؁_q\u0016;[X_څ %\u0007\u0015[@.P&\u001b䊃\"fmZ7b\u0006'Ic7h%+6^\n\u0011T;[\u0015~ǣ`\bOB\u0005Jd\u000f7Icy!F?2Ħ3\u001dc6HJq\u0013(>\u0011`Cx\u0002Y\u0001l\u0018'ޠrézuZn}ة2\u0011!\u0013TPHArgl.U~!9>q#P\u0010!\u0016k\"\u000f\u0006Yڞ>F\u0005M\u0007a_ͧ3ĦC[=%P|u^P(_\b?\u00147@vG\u0013q*\u0010A3iO\u0000\u0005:\u0006`pT&eWu\u0004\u0014?QGF*|xA\u0002\u0019\u001dW\b\u0011\u0013}J\n\u0007\u0007\u001bP˞l!_Trʢ\r*ZgHKAٞl!\u0015؞wTp7'TD>\"s7<\u0003ZNDH#_\b5\u0005y\u0004\u0004UH\u0006D\u0014\u0004Nf'鍰R)E\u0010P\b^AǤ#\u0006,\u0006\u0006\u0001я\u000e$1y0pmy#\u0012b\u0002\u001bhS~\u0005ю\u0018]\u000fv\u0010]6(<^r#\u0018B9F\u0000\u0016\u001eL9K@1ʹBA]>!Ӿ\u0016.(Po\u000f|oT\u0010r{ \u0016'.\u000b7A\u0005\u0013A%Wcj\rC{>xt\\c\u0000 z\u0016k\b6Vˆ\b`d\u00006\u0005\u001bd7\u0005X%\u0001e\u001cJ\u0000Y-mޫq9V\u000fD9mk)\u001c=QNc\u0007\u0015\r\"s92Q\u000eaS\u0003FhMڎr&-/lvQ+@yumf#ٹ\nH5D\rikozLg\u001bm@ӎh.^+\fPCuW\u0012\u0004m5\u0006`j\u00127潺7[,>΂0\r\u0011ڳu!b=\u0001\b\u001a˧\\ާp\u0001w+*6wv \rd\u0013N~#\u001d\"\u000b\u000161kA0fcβSh\u001d\u0010\u0002ፑ\u000e1\u0003;5]\u0017.#>Rڋ|p}\u0010qϘ[X>[\u0004A\u0011\nu#a'l\u000f͊8ЋJO%?\f^\u0017\u000bT͜c\bPDrɍhfvI\u0014_o\u0011Fe FE\bM5\u0016\"42A%\u0002mTu\u0014diUAV b\u0004wRDz\u001aᱭ~4\u000fZ\b݈\u0011H\\БQ=%9Fx\u0003%\"\u00130\u001d=󙑠4g%\u001cM~7\u0011\u0011iG\r\u0004sA鈣{7\u000e{#R;gg\r;(L\u0010t(=\u0012Z\\\t\u0012]]\r]g9\u0016ځC\nƱKf\u0016\u0003[v#|P\u0004LZ%[z^Tڗ^\n^:'ר҈~@n\u0015 ;\"9\u0019~T_X\u00039>б\\!!6\u001dO6\\>\u0010\u0000ID\u001e\u000bB;\u0005r\r3=oV\r\u0004Ф\u001d p!,B\u0005\u001c\u00019љc\u0005F-\u001bA\u0013!|A\u0014)\u0014r6'lW1\u0018m񎣕BX\u001d?YB\u0017ATS5n\u0017 \u001fy\u001bH\u0006G8zl\u0010iCdQ_\"\u0010r{\u001bՅ\b-e\u0016/vm\u001cn]x=am\u001dA,T\u0019OɈ\u0019\u0005{5o\u0010-\u00141XqC&)\u0018肳@bq`4u5\u0004ThϙN\u0013tsT\u0007\u0011hJ\u00060\u000f\u001av\rfdN^×!\u0000Ɩ:Tq$֖G)gvv\u000eвg#^KA#8\u001d,{5B)\u000b\u0013A\u001d\u001b.Dn1Z\u000f2#;j7\u0006S@9&\u0018\f*ǳ\u00145)D\u0012ֳg? 'x!f\u001cūhW\u0010}y!fdUh\u0012T\u001e\u001b\b~CJ~\u001aDkJʞC|+Dg\u0013T?\u0001;\u00068$b\b*\b\bL/|\"kX\b\u001afg+,\u0003}e \b1\u0007;\u001bYVv\"fk!{Y=\"zE\u0019Qi2NeUvhإ\u0014@_GO+|FA\u0005IhD@?\u0002UV:)gaf\u0010bRQ2*\u0013:\u000bgNV]H\u0010Ż9/D`pRD4\b\u0011H::E-\u0010sLK\u001d͙s\u001eCb\u0001m.\u000f\\%Gf\u000e\u0017䊠s:\u0011q\u001f@'=ckBl},E\u0011\u0017oLD>&BX ΋Y|D\u0011n\bG'!pv6t4Z\b9+ٝt!9죌\u001azB 3\u001ay)J\u0019K1Ho{!\u0017td\u0015djTN~_\u001b1DOAodAPl\nA86F\\\b5ud(H葺rc\u0004%wB^t+\u000eZ\u001b!9:Јm\"Tξ骠j\u0000|\u0005\u001e6D\u001cY?hXq@?=\u00025KX\u0005߹&\"-}\u000f\u0017s7\u000bdوw\u0004,kAQܜ\u0015TOn-\u0002\u0003=)gq3<&\u0017I\u0004\u0015\u0011P\u0017Bm \u0006^&\u0001\u0011Jƽ\u0001(N\u000eY\u0016X9\u001c\u000b5T.kO9K\u0016ID\u0004Rօ\u0000fy\u000brB۷\r2;\u001fsQ#\u001a\rxwẃ WQ\u0003\u0018\u001a\t\u001ako3>E\u0013u<툈\u0018\u001bKt:bl(\u001eKQqxc+G162J(\u000e3#ڗho^91t\b\t2rn\u0001id6\u00159\u0013%_B\u000f\u001f6P<u{0}\u0014\u0011\u00131w\u0016gk\u0000\f|\u001c$\u0006F@CeE(=2Ю*\u001b\u0014\u0011hy7\"WZ\u0014t1̏\u001e\u001f\u0014\t\u001eט\u001a\u0004\n#W\ro?\u001ay/Y3 Qp\u0007Q3\u000e\u000fHϸS0ϻ\f6Ac\u001e\u0019mY:\u000bɢ>~]l%w\u001d\u0007\u0017BA@]%#/,we9 #*)^;c\u0002ಀsa\u0000\u000b2ėA4=\u0004\u000b\u0006\f\u0011-n \u001bc\u0010\u0006F\f\tFȝUf\u001e\u001c\u0006\"&Rhb Z0z*\u001fYv\u0010)µCr\u0016E 1\u000fF/G?p|'|\u0016\u001b1\u0019#&B(\u0007H7]\u0010Z\u0006g\u001ba|#c5C-\u001d}e[\u000b\u0004\u000bT8rűYB^\u001b1iB\u0011Tu =^APJ_\u0016\n&c]v2:Epg\u0014D4L{|]G̍\u0018U\u0010\"Z\u0007Z\u0011  ρPĕb\\(sy6\tR,\u001bo5\u0017\u0014\ty7Hj\u0005\u001c\u00020JB\u0002|\u001d=\u0017\"dԸ#;&CϋIhA@\u0011b&OZ\b38q\u00198\u000e>1P\u0018zP%C+^֒ %\rm1w~_|\u001bAVęǌyV]u5Ɋ\t5.[\u001c)n.\u000b\u000b+fXD\u0016,W*O2P\u001a\u001b*)0\n4.c՟db\u000b:eP\u0004ㅨyG\u0011'I\u001a7o\u00119ސ8\be/ج\u0014\b%˜_QIxRg')f\u0011'96Dh{\u0005F\t\u0015\u0018\u001ck\u0010\fdsF?\"WAR\u0002t9'/\nhpM \b\u0016jZ<wh\u0011Ws@&B:\\Di|#Z<9\u001ce@\u00114s\u0006*{\u001f4E\u0005H-3x߀P\u001aG&l&(*7\bA;Mڦר'uh\u0017(\n+|I\u0019AN\u0000\u0013GLW\u00106YPEa\t¹\u0003]\f\n2R\u001d>&6\u0005\b~n\u000b\u0010o\u001bL\u001e\u0004H7\u0015-=\u0000\u0012iC6\"μ\u001d\u0007\u0001#A HIGeqx\u000fc,\u0002I\u0003B#\u0012AnX\n[\"`\tj|Lu \u0003{6D9R8tD\u0011ln?ydp\u0016kO\u0012\u00176,Su\u0010-/󺘉G \u0004E\u001cev􌡬;\u000fe\u000f]Fn/\u0014H\u0017Bw\u001epNgp2\nn\n}N*t\u0006@'t\u0010\u001d\\7f\u0016\f\u0005M-܈P\bfz}\u0004\\\u001f#H1fLcM2đpq~u\u000f[I\u001cM\r\u0016FMA\u001bX\b\u0011T\u0002?&rع\u001fYn\u00121єf\u0016[^\u0015~\u0016\u0004a@B}PD;\u0012R\u000bΆ\u0019(\u0004\u000eX$epAA]f\u00188rY\u000b\u0011Og\"|8٥x\t\u001a\u000bN|̣F\u0017~Gv,\\%O&7AG.\u0010\u0007 _hFm\u0018A;z6\u000bIYHA߱\u0000!{_\u001d\u000f0[no\u0002:s6\b\b7b9a2oR`|vdt\u0012}!nu)$\u0013!=\b\u001fIh[@r=\u0018q\u0016Z\u000b#SbkJ&[l\u0010\u001a\u0005U<Ưf6L\u0007\\m\u0013唓X+-VK\u0010~&r\u0010g\u0015p@u٬\u0019{\u0013q\u0012k!\u0006aϸb\u00169mdk\f\u0015D\u0005_Q=\u0002|{ַ\n8x-\"Nj.\u001cjKF9';Wi\u001e5c\\g|\u0010q)i\r\u0013|{\u0004\u001c\u0010+\u0017niv$8\u0017(ܓ\u001bx\\\u0016\u0001-r7 EtR\u0011^\u0007%}\u001ca\u001cNg{\u001bc69I\t\u0014\u0017Q\u000f|4\\S{e6!b唣\u0004\u001aq[1i\u001c<\u001d]i\nf[\u0013s\\eY26&\"\u000e2my\u00141\\mtX\n=\u0006!zb.\u0004=\u0014tZ\u0011 tO Ff[\u0003\u0017\u0002-E/ nkʸ\u0010N|MIr:Q\u001e*I\u0007~`E\\9\u0012\u0006mǒ\u0006],m#A\u001aצW\u0016Ʋ=hj\u0001lK-D%s\u0010dLH\u001b4\u0012+U`GZ\"F\\B~ĵ\u001em\u0010;\u001fS\u001aI\t\f\b3\u000bM\u001bn~\b\u0017lD\u001aw.zv\u0005D\u0005eJ\u0001\u001e#I>\u0012/&N\u000eA\"#&I\u001ezXe<V\u0000+'\u001bɾIG;\u0002\u001eQ/R!I<\r@sbi@ף\u0000l\u0017o\u001cgc Q \u0015GE\"\u000e\u0010\u0003.^!\u0019ʁ\u0015qr\u000b.\u0006a?-s@N>\\@+\b*@IW+NK\u0019/rp-MhӐa-[\u0019k\u0000\u001di}V\u0010\u001f&DˎVP\u001eʹ\"\u0004*^{\u000f:Pn\u0013#n+>\u001f\f_\"XO2\"ENW\u0018\u0015\u001b]5ߐYU\u0005\\\tV>C1\u001fĜ\u0014\u0002zDY\u0002K\u0004&¬`ѵ@g1~yu\u0006\u0011Dh\u0002^avAt\bR]El]Ft^\b\"%,\u0004--\nBY\u0016\u001fI;\u0017'UDtWDW\b=w\u001a~#\u001a\u0010^^\u0011ΐb\u0006;%y,\u0013\u0014\u0018Y`\u0010ЎFFrx\u0015y\u0003$3WW\ftbV\u001cCY\u0014Ǆҍ\u0000%W\fĂ*\u001f\u0005\u00185#0GY87v\u000b 'yW|IYA*M]C̚l\u0014\u0014ĸpP\n\n>p\n\u00114{B)wF\u0018{\\:_\u0017s3\u0007>\"j<A\fUh[\u0010d{\u0005\rcr>t1ͨo\u0018=\u0005k`\u000br\u0004ZAWZ\\)2\u0018\\vI\u001cp^\u000eO\u00104$\u0019hd1sސ_\u0000qz\rP67A\u0006I\t\u001e\u000e,]\u000e-AUe\u0018{\u00069f\b(H\u0011wAѽ\\G\u0005|Eym`\"l9}.>\tht4c<\u0011=&$Oo\u0006uA~h(HԎc \u0012\u0004\u0014\u0017cNdB4\u0014Ĵ+TD#lQ;xW!h\u0015\f\u0013W\u0019KB΁{iY\bQ,o\u0018j٘\u0011}|7w\u0010\u00108:\u0011\u0007s{\u0005QĔGнƆ\u000ba\u0010<h\bh\u0005A4&CyEv\u0011Uym9Y\u00066#U\u001d\bQ+rk)\u0001\u001a>c\u0013\nm\u0014Q-\bθ\u001b\bFAՆTW#r74}8cM\u0017\u001aVwr.,\\K12\u0019GVݞ{H\u0006ۊX-F?<;c%39˹0rb41\u00078UJץr,q6IVį\u0013BuOwt\u0018\u000e8\u001e*<^\u001b\b\u0007\u0015uu]:9P>Ԉ>\u001571A݊4lDv&b<:9jŘ\f&+\u0012:95!OAL=jǼ\r\u001ckP:X\u0011LD3\u0002JlsRbנT\u0010p0ba5ĕbPFMhֈ\u001dRX8meE\"JDD\u000ew.ZO\u0005j\"Q%f\u0005@\u00119WUt;K\u000fb\u000e\u001azliSMG1d\u00047AG\n!' Jl b=A'OG-\u001eXHw<܅l4bq8ڜ\u0018h\u000bNpDrZ\u000e>\u001bOK\u0010$1A4\u00078X\u0004Xک3Q\u0007[4ڋ%\u0018L#[\n\"^@I\bT\u000f\u000f\u000b.4\u001ay\u000bQյ\u0017&\nu=(`~\u000e\u0005T;\u001ane\\\u0006u7+\u000em6s!A=2%II.~ZAI~^cT\u0011$\u001fQ\u001d>UsXwxVVq4r<Ş3둜\u001e\u0005\u001f\\\t\u0000D\u0011g|\u0019)dy\u0015\u001fӎ\u001fG끜b'ya(\fk\u001c\\5f(%z\"Ɗ#\u000e.wT>\u000b$Ƴ\u0011Rnb`#B\u0006\u001f\bp)\u0017Ow\u0001uKW%\u0011\u0011U\u0010G#19x<NS3ﲫf\\*r~G]QR徹k ,\\qX\u0007<\u000f_q{\u001eb\u0015+pdGLG\bN\u001f\u0011\u000bBYG(wA'ꎎS\u000ex]a|\u0001e)r\u0012\u0018܅J\u0015Rnk\u0011b?PvT\n\b)A\\\u0013\rqpG埀QW+ ԣp%E\b1[r\u0005\u0019W\u0017AɴRX\u0011';\u0013NU2\u0011[$M\u000e3\n1ѯ#3X\u0014ǫ퉭\u0016xf,\u00112KG{i.rgL\u0011(߭8Gd\u0003\u001dr\neܫW&1\"<K}\nb>\t.9GkG4ˮ[(y\u0014\n^\u001b2[YyƝ\"`1(\u0003nϦ(\u001e9z8P\br^1<%,H\n0\u000bs\u0017vP\u0014=f|'8\u0019;^#\u0002>яᆘ\u0019\u000b\u0014 \u000eŊ+QPܐY\b\u0011\b\u0007\u00079r|J>L\u0018!8,\u001fh PB\u0005/B\u0012M.\u0005\u0013r@}N7nr\u00151l\u00053AD\u001fѧZV6\f'\u0017QwAd$ǝ\u0018\u0016\"\u000f\"*So\rq\u00147\u000bB.Mr\r#39m\u0006\nR\u0016ـ\u0014q6\u0010\u001c\u000679d(\u0018\u001c-B1\u0004 V[b0\u001c5vv\u0010\u0003cZ,e`Bs\u001eE7&i\b򯔉E3U4_:\t\")\u001f9<\u0005E.g~`\u0012\n\u000e;+n$X.B\u0004_\u001e\u0015w\u001c\rLxQ\r\u0004qEĴ}\u0017t61AZԛeYTLAԛo\")#}ϰ\u0007\u0005䳦=5lMt8߲mu\u0018ݛ\u000b!E\u00019\u00167\u001e;rr9{4\u001cXZr\u001atc\"X\u000fa\u0001(\u0011(:\u0017DgdSpG*7\u0001Gaz'Q~=Qb\u000f%]Ζ.HԠ=}W|Vast2SBr0X\"Q,B!\u000bz\u0005aU\u0018M\u0018n,Knrb,2tY^kRk\u000bl\u0014oF8J\u001b\fgzz&\u0006W%ʖЙ*m;F\u0017NL+D4V\u00059;Ni{\u001d\u001b)VwfㄟDtPƖ1\u00067\u0006 \u001bh\"?g6A\u001chUa\u0005<8O\u001a66W){F$^T\u00024'HMeruhy#d\u0018X.*^o_3\u0007\u0005W*uv\u0011<x\u001e<@\r\u0019~\u001d?@C\u0000l!w\t&Y\fn\u0001A.zQp,\u001cvS{ۨ8h>\u0015ħ\u0011\u0000\tCl\"<\b\b\u0007AgO\u001f\u001c\u001dd#crm~[}ւH\f$er\u0011\u0017\u000en\u0001\u0001\u001d\u0015==C\u0012\u0007\u0012B\u000et߾C}ii6Hu\u0016\u0007>T\u0016\u001eg\u0006a\u00079g!\u0001\u001eS\u000f\u000e\u0003\u0016NV^mE\u001d[\u0007\tEVНv\u000fx\u0007\u000bL\u000bE]##x\rݿy-r\u001ftt@\u001cd\tH`z;\u0010b\u0014J\bu\u0000Q_ϮL\rN*BB&HN\u0018!\u0012rm&_.\u0013Z\u0012\u001buz.ؐU\u0011g?\u0013\b\u0007*Kor^0ֶɞrp%oW\u00114\u00157#t(܍-:K[j%\u001av`aQz\n\u0006\u0019/\bM=\u001e\u001cs\rｶHǂ\u001e?F;\u0018:_c\"\u000eo\u0001ԃATGs1eY\u0001Z`tE!NM·lW!pi6\u0017dK\u0013sBG3M.g/jE|܍\u0004w\u0006\u00054~⹨J\u0017\fr\u0006\boNE\u0014RK+\u0002\u0001#18L\u000f Y\u0013\u00109&5J)\u0002D\r\u000f\u0015\\YH2/g\f׍lЁH\u0012'\u0019\u001aOF;;='_{DAȽUe\u00109\n;:\u001d\u0013qdsO>9\u001f\f$夌)7˥\u0005p\u0015b\u001b\f[\u0014 D\"/TPc\u001e\u001aJ\fVo\b\u001aG\u0013\u0006[t>#\u0003q43\u001fZ8fkA6Ag+>r\u0002R4\u0006\u0003Nѫ\n0r\"d\u001ews\u0010Ăm\u0011ܒ\u000fi\u00129U`\f*lWס>k\u0000mvf{\n&\nn\u0013ʞ'm\u001enH\bɊ@7uS\u0011\t=\u0015BGy\u0002jw:[ud\u0019\u0018=\u001d>\u0017 =n u\u0015̚| P*&\u0010\u0002\"U3򅇑\u0013q\u001d\u001c2ll&:;\u0001v0cǳ xJ+\t\u0004lDl\u001dAE\u000fs\fPr\u0010|;Y6\u001dS,\u0005a (zyX\u0012D!b2LGٔ{[|tc?TMM\u0017 |2\f&u6?t[)`q\u0001i\u001as9Q\u0011\u001dbޫ/-QJBӶ\u001f7\u0000/rحP\u0011OeXMs2\u0012\u0011^\u0017JcOBpK7Άq{U8\u001f]#\u0005̌\u001brÂOg! Z\n!LA\u00153Бθ\\7`}%\u0005UDܱ/B2e\u001fC + >\u001fs?Ls9s\u001dD \u001dDHw5{L;\u00179\u0012Jy]+GAlM_8`\"@~\u0010\u0002}\u0003OIRD4\u0010/mŦ>mv\u0019$V@kww\u001dy7;,\u0017\u0010\";A\u001ebjG\bO\u0006\u0011gN\u001da\u0014\u0017tTv`W'#~azӹbHEA$?\u001d|u\u0013JLtv|S\u0011:\u001c9hٯB\rZC\\B@\"\u000f*\u0018(W\u0012\u001b`\u0010R\u000e\u0016'd^\u0014<\u0010Q\u001e\u001e]d\u0000[I[\u0005V\u000bɸ\u0002VDA\u0017՟ݗ-^l\u001d\u001brxgKV\u0006L\b\u0004\u0005Փ/?/\u0003qŔ^YɊ6\u0015A._\u0014\u000e6*۶\f\u0018\u0017Z7\u001cK`4ZnDsSn\u0007\u0011ҍ Ч~#!\b#\u001a\u000b\u0002tvcص/\u0013!fJ01A\u0017(]G'^tRJJ8P ),d+liW;T_\bA\u0000\u0007\u0018hf{\u0014Go\u001ajFrkEDG\u0016\u0017w\u0010CbDܣ\u0005J`_d<\f\u0010\u000f\u001d5O9\u000fvZKjN\u0004\u0007J\u0007o\u0013\u00192rńn*m#]\u000fuoSH \u0010/A\u0014\u0015\u000e̬O\u0015$F3A\u001b=_GN\u000bgl&\rD=ġ{\u0010\u001d=g\\T1\"\u001cqfWb$_n6\u001bd+wYZ\u0015|v^`k92җ9*\u0006ևU߸\u00073Ŝ{p\tcHįe\u001c(w\u0001͕\u00051G_\u0007{\bw\u0016)ט.\u0013+zɐzaO8\u0003+F;?>{y\u000b\u0002Ai\u001d\u001a*^G&6elAN5:/;8˂\\Pb2=pƦm$+\u001d\u0006d\u00079g_q$\u001c\"OZH[Ms\u00028]\t\u0012en#?O,\b\u0001{\"\u000e\u001de};3,7\"\u0017\u0013\u0011n~ATO\u001b¿\u0005B\u0013:7nWHkg \u000eB\u001dK\u0005$&Ҍ\u001d\u0015\u0012mr+#+\u0019׎W5\u000f\u001a-\u0014\u001fs6ugꇭ3(ҵ\\,\u000e^\u000eL\u001b~x\u000f\tDh5ά\u0017\u0003;p(\u0007>Ѻ\u00061dH7ވ2>¼\u0010Xm<s\"\u000eGc{`044^A${E )>\u0002$\\BC%zpIOZ\u0002Nd@:q\u0013\u0016@?i>\u0012CNЮ7\u001fAT\u0019\"\rAx\u000b:b%\u001fD\u001b+<2\t{\u001fpЍUc\rH\u0007{s;\u0005\u0006m(s\twj'\u001c<w׃4Y\u0016\u001a{^&>s\u000f)0Flw\u000e*0_C\tR<\u001f|\f\u0002\r\"do'Ļff|z\u001ed~Tky\u001f`P,WSUA\u0013\u0014\b7ȱbe.vE\u001cl\u0010AX2-\u0011p\"ڄ,)\bzF:}\u0003$\u001b!^t_J`z@U\u001fHf$\u0010a\u001d8N\u0000APL\n~\u0012\u001cALߡ\rs\u0018UԹ.m&{L##\"\u0010\f8Qɨ\\P98YH{\b\f$`m\u0015m+9,\u0005XT4DD}\u001fpqm\u0002\u0003l1CDJ5\u0000\u0004-۫cwFG\u0014hDAK?3\u0003?Ag=)ЀSQI\u001c8PV9BXr齽{\bt\u000b\fN<^\u0011y~4ɗeFLݑ]c\u001d@\u000b\u001cRwv2{;xշx\u00019\u00015\u0011\u0007anH\u0000J!\u001eܓ\\\u0000S<u`\u0013\flk~9[8TLm Si\tWLo <+\u0002U,^DTF\u0019\\\u0004\u0013A2\u000f\u0010}Bh;.h4v5\u0011\u0001uA\u00069p\u0007ArLS\u001b*\u0017\u0002OW8NE:\u00138\u000039'\"\u000f|)-ۻlYc.确;\u001bIK\t)*\u0012yn>YYّ\u0018\u0012trvC\u0011h\u0015F\u001a@\"XC7`%+\u000b(e,1B;d\"$|#\u001di\\\n/ 2nkt\nI\u0012:m\u000be\"f伀D_$c\u000e6\u0013?QD\u000f0S<9ǟ\b6\u0000aHn\u000e\u001cM.brA\nI\u0001q::{gM\u0016A=WP[דtV\n\u001e\u00066ď#Z]\u0003\u001b\bY\u000fR윭\u0017\u001d&\u001c43#\u001ch\u0016\n\u000e,;\u0003nm:E\u0005W\u0007K9^km\u0003\u00198nhlҎ\u0016ڧNkR]A&@\"\\\u0010.(pA&\u0017(\u0017HQ4r\u0001i,0\u0017(\u0017!$\u001alzgkUC\u0001z]k0S\n0xX-uγ0S5\r2N#\u0011\u001c5\u000e\"-<ц\u0011\u0003LN\u001aD^:ٲ/iĚTA\u0014'Aj\r\u0000#\u0013`~5\bIG(\u000f\u0015!\u0018Zx\u001dvByC\bq9EPxee\bCgwa1~Š]\u0013\n\u0019j|$%1\u0002dC\u0003wX\u0018h\u000f%4h!渡G:b\u0007\u0005IًUC\u0012\u0010\u00170\u0003\nA\ruYG\u0000\"\t\u001e\u0002vmPw$<f,\u0010U(פ*~LfJ]\u000eܑA`\u0019ֈ \u0001G\u0004Z۪I\u0015C+P\u0011/Ř\u000b\n:6h\u001a9M$G\tw{\u001566\nT4N\u000ehb\u0015bhLZo+5\u0002co^\u0010@^m.X\u0010! NКӉO\r@S\u001eΕ\bXw\u0005\bPG0\u00191\u0001-\u0019g#&\u0004ꆙr䁬\u00011p1\u0013&dk\u0010?C`jmT!$J\b=64\u0016\u0018\u0013t\u000eػ\u0000UV;~P~hxIG{\bXg&\r=\u0000LiT\u001d\u0011\u0001}9\u0003ǎ\u0004d\u0013yۼwlD\u0002az@#>,6H]\u00189]1D\n\u00170pk1\u0004Ѩ\"\u001c=\u000b+1\u0001`pJ\u0011\u001a5vV:F$.\u00130:^4:\u00191hwU`\u0006H\u001d{\b\rA\u001e[$}:܄C\u001cƈAFȕ'Đ]*М\rf,1\n\u001e\u0019l?\u0012¼EJ)\u0019\\J\u001c4OLO{jH<\f\\=\u0004\u0003\u0015\u0002>ݫg\u0006E\u0006\u0012Rި\u0006\u0011J/\u0000!耢T\u0002\u0012$Ǟ{T+!c\r\u00145\u0006\u0018R؞\u0007v\u00110{\u000f\u000b\u0015\u0002^\u000bR첆  \b\u001b\u001b\u001f۾d11\"\u001a\u00181!l\bNL_( \u0016[!`IieM\u0019-\u0017s\u00100e\u0007\u000bFQf2r\u0018)Yh\u000fiy\u0017\u0001\u0003Ҭhp-G\u0019ֈƪ~\u0017!zP\u001ed\u0001>p\\\u001e>bXZk\u00036;(`\u0012\b@yq\u0018;c\"a!9t%SdwÖ%ƌA\t@G;${\u0000%V;qspze\u001e$\u00167#A`\f\u0010JK\u0004\n\u00026e\u000fa\r,æ\u0000ki\u000f1\ts3fpq1~٘ЭA*ԩ5el M~m\u0017ɜlj\u0005\u0001TP{\u000f\u0001\u0000Qc,A$7=&`\u0004:^)ai̾\u0012`\rDN.I\u001d2GnX#Kj `\u001ce\u0017m\u0018jD\u0019@QzG{\u0000<(4Uh@d\u0019Uנ /&\u0017!\u001ev\u00115-y6 Θ޹\fQUA\fS\u00147{&\u0002eq\u0015Yl\"&̱\u0019T\rեF/iµ\u0015_!0Y\u001f\u001a\tjc\u001a`Kq\u0003\u0001p0'N\u001fz1\u0010%Hz\u0001F\u001fn\u0017\u0011\"uNM<\u0001\u0002l\u0012!V Id+&\"0(,\u0011ɉ\\\u001a\u001aNb%\u00002\u0013}#,:\u0007\u0018i=(G[+KP\u0013b4Pu\u0011-&ʧ>ǐA\b\fq\u0010OD+b*2vV2-F%\u0002w3s_ElxW <\u0005\"-=ĂۜS\u0011\u0002`I\u0018Z6䆭\u0011\u000fC_X!{PBDAA\bAV\u0013\u0012҂\u001f47\u0010E8\rMAh\b\u0011H\u0011zO\u001ac\u000f5 \u0019^1в\u0002LogN\u0014\u000eF g>\u0010( }C\"9\u0012!l\r/\u0018D\u0019R\u0012\u0004\u0003a]Z\u0003\u0001\u001b:\r\u0004\u000e%\bl5z7\u0010C,}CL\u0012wIT>Bɸw\r\naR*\t32\u000fW\u001eBs;b\r&NLA\u0005\u001f\u001a\u001c7\u0004\u0007;=\u0004\u000bs\fe\u000e5D?C_\u001cC0`\u000eb!\u0001(\"o\u0011St۽x\t\bru~}\u0001I엕\u0013m\u0001xCHE\"]ӗ!X\u0002jU[\u0002,`c%&hأ2\u001e\u001b`^͆ښj.\u000e\u0010}\t\u001ccV&|\u001d{X\u0015;Aї_z};|\f'Hoå\u0016N$wx^!-I[\u0004͢ι4=Vlr\u0015keb}]9+\u0006ܞ\u0019)\t*5_Z\u001a/\u0011\u001f$t\bGxZ\u001b(P{\r=!LL\u0012oh\u00122k\u0018l%_\" \u0012:uKE\\g\u0018}\u0011ˑPA\u001a^o˗\u001e*hCׅRMm\u0004ɸ.C\u0001m2j\u0003S2EٌsQt\u00110°D\\&0~+ő懷U~ \t\u0018+\u0005w=\u0012b\u0017\u0011\u001aۉ8/w\u0010\u0001\u0004Tl`\u0011^;\b\u0014a\u001do\u001co\b5=2`vD\u000f\u000b\u0012\u001fOs&o\u0007!ʹ\u0002T'Q)\u0006<=Der!X}\b;\u0000=h)y\"\b#\b_\f#\u0007\u001a4\u0018Zd #\r#(. \u0015\"7\u0003\u001bȘDxMF({9Oyv\u0001Ľb(1\u00012)R\u00183\u001aF]#\t\u00102=\u0004B;PS¥\u001dDJI\u0012\bo\bJU\\Rfo#80q{\u0005\u0000[\u00136\"hھ9\u000fC\u001f,E\n\u0013C\u0012V\u0000';\b4b\u000eHtc\u001dqq\u001c/\bU1\u0019; \u0013EH \u0012Yl#`\r@$\u0018P\u0000\u0010\u0018\u0000Ofa\"M\u00006IdT\u001b\u0001a.զ\u0003Fb\u0019D\bCPRs\f\ta4ih\u0016\u0013\fgch\u0005B\u001aqȱ6\u0016WcV\t\u0014\u0005zYrDk`7:X?\f2JλhY?b&<q@X\u0004X5\u0016\u0013H\u00175\"8aî\u0013\u0018\tD\u001eZbϽF\n6\u0012\u0011|Ia֐\u0017\u000eS|Py=\u0004u'$=\u0010hbP3\u0002\u0017S\n\u001d^%zw\u0010(1L+D\u0018(\bdҎphӡ\u0005ߕNyهbD\u0017f\bd\u0018V.XY\u0019\u001dD&R@\u0012Ml\u0006AorJ\bg\u0005_&T#\u001dD/\u001aYB..爉O;\u0006οx\u000f\u0004\n1tx-O\u0000U\u0001d\u001b\u0011p|S Tqݑh\u0016-L¼\f`乷AJW\f+H'\u0012a\u000bC\u0011Ӻ٦[GflX1v\u00100h<Ym\u001f\u0014*\u001dU M!X\u0002Xr\u001cƻ\u0000޶\u0019+,E_0\u0013:\u000e\u0012X\u0010\n\u0015nu3\bk\u0010O\u0004v\u0001Pډj\"I\u0001\t.ˠDԤp3x$.U\u000e3AQ=;\bfA\u0012k\rQ\u001fOfbxȁ)v\u000e\u0002q~v\u0015(@%'\u000e3i \u0015H[Q!2\u0016 B0B\u0013SϜ(bĦ00y*t\u0003\u0014/&F\u000eV\nq>\u000eBJ<}8L\u0019wgWpVM\u0019t._5\bV\fj-\u0006YOw\u0010~p\u0013h\u0010_\u001b!`F31Quۼ`fZ\u001d:3<K0\u001dǺdExJϨ0\u001cPŜb\u001f\u0001=\n#\u0003\t\u0016j,1&Ec\u0007@y\u000f \u0018J\"\u0018g\\O&\u001a6CE\u00110m2\u0019CB Xb䢣\u001d3C$\t1\u0015I/kZ\u0012!iь\b\u0011\u0007\u000fV \u00183\u0002ųo#lSG()2!b]\r-A\u001b|nPy͎ȮHט\u0019!&lzeJϝʫlL8+\u001a\u001e>t=*6oG4b\u00199%侪5HhwQ]\u0015!$Lu0lJr\u000eF\u0017;j\b/Wbd\u0004\u0005paR35\u0002EW5\u0002YƗ\u0002Z#)C=P\f\"Z\r{H\r\u0010@\u001ds'6\u001a\u0013\u001e p.\n0r\u001a=\\Ʃ9ilt5\u000e\u00105o\u0019\u0011\u0007\u001e1X\u0000R\r-A%Cw Ml\u0017]\bu\u0004jND\bU4ta\u0012\u001d\u00101tl+1qUkԀ\u0005L\nr\u0017\u001c\"\t쁣К\u0007\u0016V3d\u0005!\"&wfsԋG[Aj\bg`2ip\u0005@$:d1\u0015\u0002wX^\u0014\u0017\t\u0013$&\u0006AX6£\u001b\u0003ԿTC)Vi~>]sv,\u000bdI&V\b_Yi\u000f!$&{GBj(i(>\u001f o\u0013\u0013bTo\u0018)\u0006a^~I# p!\u0010lmf5\f\u001d\u0004;C&w$$0e\u000eR~vf, &m:tIIf^!&_iЭ:HSLհ\u0004n[qpKe75fI\tv\u0000ȉ\u0017tX]g(rL\u001b\u0016\u000ei)\u0013\u0007\u0004{\u0015&u D4\u0018\"J\n\\j\u001dko̚If`F\u0001dx;\rn\u000b\u0005[h\bZ!\u0004<\u001e&\tPC+\u0010\u0012r\u0005R<\u000b\u0010O\u000f\\jy+X*Q\u000eIvQ)l:B6ObJ\"/\u001be`ӊ\u0018q7 \u0015\u00004}v\u0000IՊJtPBΈh\u0005MqR\u001d\u0001n\u0019[#qW\u0001BXW`{g\u0003;\u0000h~\u0001{x{b\bV\u00147T#<I\u001d#Asr3\u0004gv\u0004g5\u0018\u0018,\u0007jT&}\u0004e0>\u001d֝I%'/M}ҡF+\n\u0001.\u0017RՐ$\f﷙S\u0005\r\u0010nkZ!_RX^Bh)\u000f\u0013By\tRH\u0014Lř\u0002\u0013[\r@6\u001e\u0002e:\u0006\rΜ)~\u0012p\u0007??9(tj63\u0018AEf_S\u0010vucxD\u0018\nh8L=f\u000e\u001b\u001e\r\nendstream\rendobj\r33 0 obj\r<</Length 65536>>stream\r\n\u0019\u0017c]t\u000eȰv\u0004\n\u0018Rx5|\u001c\u0017ֈAM$MɈ*2 ZX$\b\u000em\u0011DfzBpT;x\u000f\\=\u0010U\u0015^\u0012F\u0018V\u001cs+tf?lOV,\u0016lCc2\u000fƸ8)^|\u001ccV\b+}\u0011zefq\u0014,\u0013\u0010\b\bx8\u0011V\u000e\u000b\u001f\u0006lCV2S\u0014dreA&/\u001e\u0002iXY U\u000b</r1[&#\u001aby\u000bn9;VSCq\"Æ\u001f=A)f5[tKA\u0018@J\u0019 \u000bV\u0002>ژ:\r\u0011m%GbӦ\u0000\u0015\u0015\u0019A\u00015YY+@,1Zଡ.5\u001b\b\u0004\b7\bb\u000eE>?FHr\u001e=RT\u001aZ`!}T\u0002AI\u0017#Xj\u00070eۅjf\u001d#F\u001apK,u\u0011\u000eJJgk7@L[_\f\u001b\u001dEVd'k\f\rkx2HS3F,$\u00058\u001a9\ngE<\u001d$yq\nLܶL,!\u001a0\u0012U\u0001\rj0reqW-E%ש]D\u0016\"^5\u0001\"p\u0002-1,\u001b\u0013\u0011\r0T#සa\u0002)%A\u0017\u0018aA\u0014ۈ,\u0019j(Aٷ1\u001eu\u0017kPR o2v\u0016:\u0019֬\u001d\u0010\t!\")r\u0005KJvʒBr|v\n(aUd\u0002;\u001a\u001d\u0019vs#,\u0003b˺[\t\rHo;(\u000f\u0015CLD\u0016#R\u0018\u0012O\u001ebe\u0010\u0007\u0005\u001cZn\u0010[d2[:ھ\u001ea\r^4\u0007W\f2\b\u001dD9\"\u0016Q\b>&Q\u0011\u000f`\u0018Z`ԧ\u0003)&\u000e\u001a\u0015~'\u0013p\u0018-<l\f1\u000b+pG\u0010e\u0012\u0016x\u0002\u0011\u001c*\t\u001a\u0018\n\"C ]A)\u000e\u0002TU^H\rK\u0000bv\u0004$\u001d\u0005<m<\u001e5\u000erE\u001a\u0003k0\u001b\bOq\u0010Z\u000fO|\u0017UjE\u0014y'S:a^O\u001a*`/Vۄ:5\u00064Ak\u0019h\u0017UCm\b\u0012NV(#\u0016`\u00198\u001aFͬ@P\u001benO\\\u001dp\\\u0010Z\u001a`)@J\\]\u000e\u0005g̩hʬA$\"\b\u001ba\u0004|]\n瑱*S7\u0002i)ȯO>\"6i\u001d }\u00117@\r.OG1bhhAɲ\b)\u001b\u000e\"_\u00116>Ŏ-\f\u0002Hۃ*\u0012F\u0017\u0016\u0013U\u001a\u0004\u000b*\u001b轁p\u0007\"E\u001bim=3Kezxㆮ\b`V\u0019.'ǔla̬@T&\u0004iD\u001dcTڤn\rĠ>c\u0002=E\u001dV)S?R\u0002'OX.ݤR\u001aZpX]bWFH\u000fI\rҼ\u00113~]?H#\u001dPtYE\b:\u0002\u0006F=_@Q\b\u0012zx>BhΐҺ3E~\u0002a\u0013N9قf@eOVBLG{\b\u0018)\u0019l\u000fHƴ\u001ci&R3{3\u0007(5(\u001b5$L \u000b\u0016\u001dٸ*\\\u001dq\u000e\\^\u0016\u0006u\u00116&h7\f֝L%It\u0000KRC5ɴH\u0000\u0005V-\u0006%H\u0010aP&HJ\r%7hz|\u0005m$_؛lJFA\u0015OŬO\u0007QZ\u0004'\u0003Y\u0001-\u0005\u0006UW\f(1\u0016V𴏤J+OGߥ\u000b#h1\u001d\u0001@\n\u0011gLcA,\u0015J\u00107?Z\u0017$\u000f\bi!\\f\trϺW|w\u00119ц,0θ1pG\f\u001a\u0014\u0000p*;P\tu\u0004\u000e\u0010J\u0000s\u0018d]\u0006:>!\u0004QwJM`$\u000eis?\u0012C\u0003*\u0005\rs1vh&ڏKuH^AI\u000e\u0014\u0018:IJ\u0017\u0001ƧG੝!\u0019\u001bT~\u0003-*\r\u0003\u0012\u0014N\u001dnV\u0012LSp>{RyeMդ,8\u000b\u00010KҘPˢ\u0011\u0011\fqU2I(@\f\u001b\u0018x\u001dH)<bQ]\u001d$\u001aC)YI2\u0005\u0019\u0018V祪`\\\u0005\u000e\u001dp\u0007߷:n4m\u000f!q@H\u0015Tx549q\u0012I\u001f\t<'39\u0006*P֏\u00065hl\u0011Ӡ8ڜdf\u00021\u0014p\u001d&\ts \u0018`p\b\u0015==@\u0002`\u0005ng~$\\a-\u0002c_\u00108A0=\u0004C7\u0002:&ב\u0016\u0006WV-\u000b]L\b}\b\br\u0010\u001a;Wf8ݸl\u0018w\u00100RvZ\u0006\u001b6:\"jUt\t倀\u0010\tTh\u0007%jk\u000fy\u0002\bVN\u0006\u0000xf\u0003sa^.Fc:\u00029\\B\u0014CH=PU\f㠭=\u0004Y&{\u000f\u00115K\u0007zD\u0019Fb\\-V\u0001R\u0019\u0011'˵\u0014\fY\u000e\b\u0016\u0014\"07(rc7)T\u0010h\u0019QYrs|\u0016KցHg\f\n\u000fc\u001a9\u0012(\u0018CJ\u0000:8xEF4\f`=l\u0016A(\u0018f3'h\u000fA\u0005~7\u00102\u0019CʹAl2v\u001am\"8ؚ.%Á\u0007\u0001jh\rRO.S\u001e\u000e\u001d\u0014z\u0011\u0016%ua``QRHM\u0010xנv \u0015\u0001'DlBZFk\u000f\nE\u00123A\t B'@\n>2،S]Rdp\u000f\u0015\u0006\"\u001ez\u0011$7nޝ83\b&\u000e\u001eX\u000b3JT\u0012sRSPҳWCk\"a\u0003\u0011\u0007\r@ a#*\u0019&rCqql\u000bkNoh\u001d!h[Qd\f@tDы\u0011̪\u0010m\u00179S\u0018b\u000er\u001aN\bf\u000ev\u0011\u0013\u00041Hy^ \u001a\t5@{<ݵFԳzD\\\u001bTrņ+J\rEHePJ]B6\u0016u\teCqJM\u00073to\u0006BY\u0017\"M᪕Q*]\f%w}Bd&guw\u0004<P-\u0010|R\u0017\u0017\r\u0007\"-˦_(ljg\u0011BExLeV s̈e\u0001| \\]n\u000e\u0016Ճ\u0003\u0005Oɫ4\u0018Rm|\u0018MŲBb:D\u0011кkb7V Rccd\u0006e>EbV\fa\b\tD\u0003\u001c*iö2\u0006aء\u001ceq=;9S;+L\u0012L\u001c\u0016ņ0e\fRl6x\u0003QV9ؒlE/Hf\b\t14#\u001a:&!ʸ\b-\u0003t{Je\u0017Q؇i\f9S\f\u0013O6ů`\u001aD#|a $Ql\u0018\u0000a\f弶W9gN_bI倎lp\u0005Rc#|?\u0015f\u0015}ט\u0005\u0018\u0000H;1\"OSi\u0003XA}\bO\u001d\u0006DC\u0004c((\n,\u001e\fMv\n\u000e\u0000q\\\u0005l8\u0011(jrZ!`b\u001c#'\u0005%\u0014\u001f\u001eL\u0012\u0004ɷ.r\u0003i\u001f!j(\u001aR\u001aSYy.(LYbX:\u0002\u001fZ\fAQh'a)\u0013\u0017\u0019᜼M\bʘn\ro\u0019M%\nXeV3qn\u0006%9-&I\u001c#\u001ef`s\u00007Ĝf]\u001fp4\u0000e\u001bФp\u001d$Nle\u00033ew\u0014ap\u0019\u0019^Hx\u000bj\u0003\n.%:링7$`\u001f^CK\u001a!&~)\u0004\n5$>9\u0006v$q2\u0000N4lAS#2{]!ި\u0006(2Sk#W/\u0003r\"Š\u0007GaR1(4#\"Иo81Ԇ´6\r^yb+9w\u001c`̆]\u0011Bygk\u0001;44\u0000\fo\bÉ\u0006\u0002hиoRv\u001d\u0001\u0005w\rc40u\u0019Vi\u001b\u0018\u001d`\u0015=¢.4#<\u0011Pܲ\u0005C\u001d<к̻\r\u0014)qinn~W\u0012\u000e@řS8\u001e\r\u001dHra\u001aC0A\u0016NW2\u001b \u000e\bŐGd@\u001bpy]\b)u\u0010#);\rfTy's\u0018\u000f\u0001Z\u0002bH@DHC:ڧ!:>ab\u0006E\u0015\u000bO\u0018$2Lico\u0006\u000f\u001b\bId\u0005pډQ2J\u0006P1A\u0004\bQd\"\u0004]s%=G\fA0S\u0010\u0000Ou\u0018EևC\u001a|\u000e\u0016\u001b6.G\u001e\u001dIM\"\u0012\u0011ȉ+G*D7p\\as\u0018~l1f$v\u0003%21\u0000US'L\u001d2#0s[MX%˧Dv&\u0010Ӊ\u001a:]l\u0007\tp(i yF~^O5\\\u0007\tMcB\u001eR8\u000fQ0FqXHHGW5fDT\u0017Zpm6@e n\r\u0003*\u0007\u00180hHh(07Xi\u0010#X.Z踂:\u0014@\b\u001d\"D\u0003l$]Zu6ss^f7\u001al\u001d!\u0001,TYس#$E\u001bBt6\u0014\u0014@\u001a\fč\u001b\u0005\u0016<M\\t0FÜ\u0004$ù\u0004\u001aMS\rNtf1\u001f:B\u001c\u0010\u000bZ[N~=JJjMG\\ʄ,Za\u001d\u0003(\bc99j\"\u0017\u001fDG=Z1a\u0013āR\u001b\t\u001d|x\u0005:Я\u0010 \u0011l6\u001eO{hTU\u000e@nᵫT2[x޲\u0015Ti-@4o\u0017\u001a\u0007Ȇ\"nxMP`m!\u0006\t?0S+Q[Ä?{4$\u0012@;\u0000etQ\u000f\fI3ν\u001a\u0012Ǝp(k#\u001a:|2\u0013Rm\u0007qmz\u0002%V(odK8\u0011\u001a!\u0002'&BQ*|ʀI up5X\u001e;\u000b\u000f@&n\u001eF\u001c,O\u0018;[Bd\tȸ\u001ac6\u001cIe6\u0000\u0016\u0014\u0010MLR&Y\u001dp\b]n]^jyR\u0010\u001a\b\u000e!$f\u000e&:)t\u00051qdG{C';\u0000\u0018cB7HѼcI\u000bt*\u0007?5xf\u0005L\u0011L1R)V4\r)F\u0010D%aBcg![.@#\u0002l4Ь#\u0013#jĸ,$\"Ÿm\u001a\u001bGd$\u0016C,\u001b@H\u0012\u001ab\u0001P/\u0006Xdb12,F\u0013.\bFUr\u001aCmM\f\u0011Ӂtȼ\n@z\u001e\"ۨj\u00004\u0016;<Ju=Fa@o=ev\ra|Ƶ\u0016X3H΅\u0010B2$\bgz\u001d\u000en$ >\\]a4-y\t\u001bA\b\u0014BR(9!\u0017\u0013C\u0018\u001cnA\u0010\u0014)h\u0007!=;GmP/A\f+\u001b\u00008Ejnw\t4<\u0002&OLzL  P_\f3HU<\t\r'fמ\u0000aM2;GЫ'\u000e3u}\fEJB\u001bA%b\n,xe\u0019^.\b͆!1H\nݼsIuuJ,\u001d\u0006\u001bL\u000bX\u0002n\u000ecoR\f<\u0019\u001dDynʏ\"\u000fh\t0k6\th#H\u0002gsoI`\u0019r\u0001\u001ct|N#=7H\u001a\u0011CD\u001a@\bϘ\u001a\u001aiRpM\f-:aΔtF|!qBp10u\u0015p;\u0014ǎ\u0018\u0018!\u0001QTP\rI\u0010\u0012P1y}wnKCu1d\u0012\u0016\t|\u0019\u001f\u0000tj\u000f\u00111\u00069\u001aڭ\u001f@#\u000e``3\t<Ui*X\u001a\u0017)\n)s2\u001b\u000b\u0014\u0004\r5.<Xԓd\u000b\u0004bhA\u0001{\u000eb\u0016\f\tx3Y>\u0013e?\u0010\u0004\nDK\u0018\"\u0004m\u0004\u0016\u0002f\u001eQ\\d#\u0006x .F:b\u000e\u000f,Ǌ\u0011c~s$ne\u0015C&#\u0016\u0019\u000e|Έ0\u00169|\u001bw`QJ\u001d\u0014\nu\u00066w\u0003\f\u001cw#\u0012\u000f \u0010%6@CY3|\u0010\u0002h0#0\u0018\u0010f\bC-ag\u0007!by\u0015s\u0013j_Gp`fLF\r\u000b/;YZ\u0010 \u0019U264Sc̰\u0006@Fb@kC\u0019a\u0006U1SJ\u0004\u0019d;¦\b\u0018(x\u0010g\u0004\f\u0016C\u001b \u0010\u0003WGJH\u001a$\u000b$B$\u001dT^\f\u0013\u0010F0-\u001d#<&S\b\t5Y\bfJCƌ!\u0007mSa\b!,\u001fp}M\u001dᦅ`\r\fB5.\u00195\u001bO\bg\bP6t\u001e\u0011T\u0017}kZ 2y.hݯDN\u0015t\u0011mT\u0019NgP\u001d\u0019a\u0016ތXd+\u000bY\r,\f4i\u0011\u0018\r_xTU\u000f:8-x\u0012\u0013\u0002ڲ\u0011x\f39o`\u0000im@ZוZj\u000b!aVjȆ<#h\u0011[\r4\b(ǛŠ23B\u000fՐ\u0010 moB\"N?9\u001e\u0019A\u001bV\u0005\\!\u0013CMMA\u001aw\u0001&\u0003jA\u0019\u0007U}^h5g.\u0019a[Hjԓ~y$\u0005c3w\u001b\u0011A^Y\ta|\u000f\u001d\u0011ƥM\u001a\b::\u001bVA17u\u000eYN\u0005+\u001cFT\r\b#\u001a\u0013iَ,\b\u001c2\t\f\u0011\u0006\bVN\u001c\u001cޢo\u0007/dễ\u0011\"x, N'\u0004[0YnΈ$^yB :\u001d\u0001>:\u0005(Km^$$\u0003i\u0012#\u0012\b\u0019^ܝ`\"\u0014\u001d\u0011\rA\u000eM+h\r~uc\u0017y8A\u001a0\u0007&&\u0010O<s8\u00130#pavV\u0004B\u0005.\u001f$*rC\tW\u0018NMQrz6W8'C f/\b\u0016WC/oeln\u0010<.XfEfMAr\u0010\u0007ssL0rZ+!Ɨ\u0003\u0016DZ\u0015\u0018P\u0014#'А\u0003ӓ\u0006\u0003=q2\u0000l`@\\b\\{.!QU5\b/\t_`֗T3\u001aM \u00116VFxYIR\u00112 Y5\u0001\u0012\u0004dDfPQ7kG0\t\u0014\u0019\u001aU\foG$!\u0000HWd\u0010lÔ&\u0004\u0001\u0015\u000f\b Jc(\u0002\u0012\u001d\u001d\u0014[l#e\u0012e\u0002\t=,!<\\F\u000b\u001b{ȠHI|G]m\u0002ߐײ\nI3\bRD\u0016}b=#p>dB\u0010\u0017<e(Q\u0018il\u0011Y.\u0005\u0003fI\u0014+8\u0005\u0006E+4\u0011\r&\u0010o?U\u001c~FP`<\u0007\"TQUyF$a\u0016SC\u001aà\t^\u00040\u0011\u0005\u001d\u0000+IJ*\u0011|DNڇ\u0012~١'@rq0'@U\bgr\u001c\u0019+N:&Ja&\u0003\u001eI(<\u001aF\u000ey,\fMp:\rT\u0006\u0011\u001ewII4Kc<|\"$sFȰɏE\u00185\u0013#ZNMҀHz\u0011lVmt\u001bHp~V}\u0019q11i7\u0001BQݧ%f\u0013Hg@-\u0006$\u001e\u0018\u0004\u0011&Ys\u00164u&\u0013n >Z*F\bA\u001ceC]=u[C\"fM\\\u0004ϵI\u0010~\b%\rm\u0019\u001cv~JFň7\u0011u<&Q=}lVf\u0010\u00129)!\\\u001a,dL4)nGdWCTi\u001c$\u0018zఝ~]ϓzZ\u0011\u001e㉒'wPDM F\u0010B\u0013:@\u0013\u0010Ď&\u0010ؙ;RauJ'\u0004(2\f\u0015ϰ\t_؎}F2\"B\u0013\tY]A\rI.Sv7\u0018\u0015rJv\u00126\u0001\u0019\u0013! \u0002E\u001aV1n\"2B7f*q̗T)\nS\b\t\u001bMMO\f\u0003e+&#hTCI\u0018jY:\u0002=p1\u001aT\u0001C\u0019\u0010)\u0010\u0016u\b.gtg\u0005\u0016\u0011%E33ד\u0011m\u0011\u001f5\f:\u001a\u0018[1\u000bph|?([Ze1\u0018eb3ڣXvb,\"C6#\u001a;\u0002\u0007YXc,!$\u0019ξQeD%j\u0010sx!H'+^\u0000֪\u0013O7\u001e\u0017\ncUC6l~\u0006\u0015^=H1m8\u0006D\u000b\u0014\b\u000e7䖓e:!nَL\u0000e|x\u0001sz+\u00031%zT4\u00107\u0003i\u0014R\u0006\u000e\r<o4f gD\u0010P\u000e\u0000\u001aӲƠ x\u0001(jK\tJ0\u0011\"%\u000eG&sHO\u001c`tBAV\u0000\u0011\u0007Ch=f^\"Ik@\u0004ʖP\u0010\u001a2+\u0001\u0002lJV:-\u0002\u00123؆4-gD;\bU&}+\b֟\u0015`5D\u0007822-f{\u0019@b\u0001حo;\u0007\u0017\u001c\u0005\u001d\u0013Π,BUTL#\u0002\u00140\"+G͌Ѐ\u0002\u0011e\u001dA\u000eZ$\u0016#dy\b\r(=5\u0013t\u0010pa:)-̌\bLȆ8\u001f{-\\#Y\u0002j\u0011\u0018Y\u0010s2{U \u0004\u0007Wc\r.\u0012e\u0015\bg\";\"R*=WiHЌ>ӵ\u001d`M\fREMF\fnV#x\u0013#T9\r%FdPK\u0003C q\u0011UN\u0019|ߌ(Bԧ,s\u0007՚M\u001c E\bQM+\u000ezvLb3\u0013:\b\rrPp){mU#\\dPOd\u001aE$D\u001a:\u001ctD\u001b%*\r\u0018%<\u0000xX3\u001b͗\u0014ͱ\\dh\fQx&RО\u0012\u0002\u0006PU\"$\u0016ɐ\u0016YK\u001a\u0002'\u0006(]\u0019\u0012\u0005OI\"D\u0007\u0014-\t\n U\u001dCZ\u0011з\u001d\u0007x4`u2|T%Ìf7;ifu\u0002p1!fs@e\u0013YFW9Լb΄wF\u0010\u0007v\u0019 %\u0011iElq\u00121G Z5.E\u0004\u001c\b,&%d\u001a49]ġA\u00147J\nW4HZќI(/\u0001``M4E\"\u0011B\u000e\u001b4੝q{\u0004mRAǯ6^\nE%:\u0010AY$\u0010Pݭ\f3\u0000򤥓\u0018t)!\u0006\u000f\u001eR\u0017\u0013\"0`V}1j2\u0007\u0018£8\u0017\u0007'\u0014\u0019J/rX\"O\u001eV6Y\fi<#\u0018iYK93\u0002vzEH9*~1\n8āAȒ6\na6\fTsi:hFL\u001fb(\u001a#\u0017#UPuk\b7wd\b\f\t\u0001#\\\u0019D'\u0001dbgPkb8EP@h\u001d\u0002VLCþ\\Evq](\u001d\u0016\u0014\u0015\u0006RM#\u0012/z76h\u0013_\u0016\u0011\u0001(\u0012-͐Ђ\r\u0012̎@t5Jѫ\u0019\u0019\u00010\u000eNOL]\u0012 _c\u001a\u00119M5+K0:rCC\\\u0010a6j\u000e\u001c8P\fS\u0002 ?JS\u0000\u0012G,ՓMѼ*~b8c3\u0007\u0013<\u000330M\u001e\u0014oWbg<H\u000eu\u001at#Iz\u0007kأª\u0019`Xu+\u001b\"#6IeD./yubHc\u00101Fn#<g'3*0Le,\u0012:.M'\u00124\u001e\u0007qwsvX\bZMBĶ\\U\f9Ub`j0\u0001\rL\u0011ddt\u0004Qu\u0018G\u00187\u001e+\u0006M\u001d1j\u0004`p\u00047!G%jg\u0001x1\u000f!\u001bc@\\(\u001aB('!2\u0000V1HΔ\u0018\u0010\u0011\u0019!20yW:\u00194J#g1]dn\u0016\td\fG*˜e5\fj4X\u0012whӨ!V\u0010w\u0004\u0016\bˑR_\u000b\u0017\u0000\u001e%T\u0003fe=z\u001e+o=\u001c\u0016R1tDYI\u0017 `bIԄjlL\tD/\u0010F#\u0002is%3\b?r\u0005D%DTf\u000e\u0018J\u0000`a;\u000fHK9*3NC\u0006v\u0004s\b钇O\u0005){\u001c\u001f\"a\u00160*b Ϻ4\u0012\u0011F]<x\u001dPVfbB\u0005\u0013\u001b\u0007di\u001d\u0004D?\u001da Y\u0001iz£a\\J\u0014C\u0012\u0001zcJ!\u0018াfy^b,\u00185\u000er6\tM\r;l\u001e}J[͛\u0014Ll\u00015ohDZA\"#D5q\u001dLb`A\u000eOz&3;s\u0018@$3ZG&\u0013MSGMg'H\n&\\2x\tϑ\u0011KĢ`I<\u0011f4=L\u00136\u0010kUqTw\nڣǸmxjɏ8l|$ \"\u0005h8\u0000\u0002V \u0014!fQCAt\u0004\u0017SaH^C31\u0005\"*H߬xqqaLi}яfx3B\b1\u001fa]zq-sdXjܯ\u0000ExQ}'Dvv\u0012~\"\n-b\u0007jM=[9ܬP\u000fض\u0002^\nRHdk\u0000T\f\bMM\u00001B%\u0011rbEɯ\u0018l\u0019dxLx\u000fj]{\u0018\u001a\u0016OR\u0005\b''Щ\u0004d26Յ@\u001d1$YJɔ]\u0010њ\u0010~^\r\u0015\"P j\u0013.ER<\bXkRhJGdy\u0014;\u000enM\u0000A\u001c\u0012\u0010-\fb\u0000S\u001dD\u001d*1L\u0005O:\u0005\u0004\u0004J\\]17\u001c٣!e\u0010ĭfMf\n\u0004\u0004_6\u0012ItP\u0006$V0\u0007\u0007\u00171QT&z]|GЗ\tGn\u0011;)N\u00012W2\bb\u0013?&! \"Z\u0015A \u0006%D\nnRxwՄ5ǹS\u000eՐ\u001bӺ`?m\u0012\u0019\u0006$\u0011\"}\u0018!^\u000eC12f4:0s͝\fH'hF\u0018#츝φ@\u0015P?\u0012Ӂ(z\u0011\u000e\u0019H\u001bґ`E_\u000f\u0016R@:m!|}L\u0002\bS\u001d9\u001cs11#\u0012i_Z,\u0017aVqQn<NѲM*j\fJ՘\u0006\u001d#s9\"\u0018I#\u0004sU:\u0011\u001dVCMFk>.wI0\u0019J\u001bK2\rp\u0006C>/\u000ernگK\n..b?'Ę\u0017\u0006}\nA5\u0016s\n w\u0004s5)F\u001d(a5e\u0013 /9\u001d1\u001eWkf\u001f?Z\u001fF,?Qۍ{RTO8!\f5(\u0011f16\u0018oTpv\u001bҮvWr\u000b=#\"#\u001bKz*T\u0007E}\u001dQ\r\u0010Y`ĘVqTFDl6P\\aG\u0011$1\"-E3.l\u0004jXC\u0007Dj磉oݭ^\u0018ah;Bb(w&8p\u001e-\u001d\u0010J\b9sߙ\u001dsApb\u0005\\Fk$\u0002{\u0016P+\u0016\u0013lB0bLd\f\u0013\u0002\u0005{Ƙy\rwZv4j22\u001dm\u0014ϩ9\u0000%p[\u0004\u0003~FA\u0016;2lb3B);V%`\u0000.e&v$@mƙĮ\u0003KR\"#XL\u0001upY\f\u001d\u001a!P\u001bP\u001aC)gD57[D\\/:-:{\u000e1zp%NQƤ/4,?8fH jB6\t\u0004D\u0017a#Btp\t !\u001b5B1f\u0018=\tp\b\u0014;(_|\u0006S\u0018rv`\u0010\nNO `(ĥhk/\f\u001b*u\u0004}V/Tc\u000ec\bd.D`\u0002/~5=@Q`fI(\u0010,b~%\u0005P\bC3_\u0017jNm6+FB X\u0019g@92Bhs\u0018\b4jY*\u0003R\u0011ANAwSemNTB2\u0004u\u0015hz$!X\u0018$wކ$V<Sv\u0014jx`b\u0012\u001fs\r ϙ)r\u0019p\\s\u001e*&.{ }\u0000z\u0016%o2b\u001c؝{\u0014y8iL\u0002\u000en7\u0014f\rۗJ\\\b\u001d\u0010karliŶ\u000f(P#gsH\u0007\u0010S0̴\u0011U(^kdPj\u0013RBG8h3\u000f8f~ҹUJHZ\\ʐiĵ'r?B;J\bCףf\u0014t7́{DK\r*\u0005\u0002baaXg+N\u0000\u0015m\u001b,\u001a\u0011Е\ri\u000308\u0006Rhcr\u0018n\u001b/rB/\t\u001a/1 |p Q \bQ8\u0005^1bJFPdV8v=KeL\u0010Cڰ\f\u0017J\u000f\u001a\f\u000b4!+A\u0012[CŌg|gZ^\r\u0015\u0011jb\u000b^1;\f'#xU\u0003\u000f`,,\u00029N\u001a\u0013Đ-qK\u0007\u0011k_K&5$r5tf\u0014m;Pv@֣pcV\rz,fܘU֪-\u000b\r\u000b1hcB\u0005\b>þn-dϥH\b,!`\\ℏhH/gt\b[\f=J\u000e\u000e\f%q\u0005F!u\u000bÜ\"1u\u000b\u0010r\nv4Ж\u0001(Z\u000b2qꔋz'XB\b7z84W⸂\u0000\u0005>bʘ\u0002\u0006\b߬\u0017\u0011\u0003\u0019\"\\\fe>\"\"C\u0019bl㎐lI~D\u00004\u0010\u00113[fi\bU|F$\u000b\u0012\b1O\t\u0010z(+vDZ\rKc\u0011,q0\u000ff\u00180:P6vXS\u000b?crَdn\u0010R\u001fF\f4\u0015]+\u001d,RoV\u0000@Y\u0018\u0007u٭Oiȓ8jGI\t\u0004\u001eqW\u0018Nf\u0018Q\u0018i\u001a\u001ftxchL\u0001L^,\u0010^\u0014\u0010b̥\u0014h!P\u0003@c.\r\u00158\nJ1c\f!\nRx1\u0019\"(wK<#mOG#\u0003O((|/.K\u001ewZ'3#_\u001fu\u0006V*1\u0003ҚU$$Qq\u0019pW\u0011$$n)\u0013/\u001egÆ\u0000\u00128⼹b\u0011B(=#TF\u0010rp$Ya\u0016]dR@\u0018w\u0016FN#\u0004\u0013Bz\u0019\u0001-!p\\aDc\f1\u001e\u0011v@4rA3 $9\b˶?#\\s\u0001c\u0019;GV\u001d\"Ę,/\u001e\u0005a\u000f4\u0011\u0010z\u000fsK]\u0019ĲbyK(*C\u000f$G0\u0006y\u00153y\f\u001d/\"}\u0016%\u0005l\u00002)\rU>sGhAwb()\u0000\u001aM\u0001aHg\u001fmr'<V\u001f\u0007 `;6s*\u000f\u0018'6\u0014\u000bqLOBQ\u0018qi:7\tgLT\u001b#KE\u0004n\u0007n!*\tuZ\fIh^ؐB4.f.Qw\u001e[n\u0013<]M/\u000eS1n\u0001Mƥ%\u0019VVBi\n\u00114\\\u0015,s?xXm6\fst.\u0017\u0006z}'\bf\u0004\u0006u4Y\u0019'Jc\u001bck1|\u001cr\u0010D%s\u0016\u0001\bx]t兡uዮ8٘&WUcr\u00066\u001c\fXTq\u001e)R$\u0010g'\u0005u\u001f\u00173\u000e\u0019̶\u0000Q\f\u000bdc\u001c\u0011\u001d!\u000e\u0015F\u0006:\u0010qX3\u0016HtD\f1J\u0012AC\u000e2z\u0003b&\u000e\u0002x\u0019,Bb\b2\u0016JmH-JBuc\u0018gK27\u001ep\\n6t.5\u0006I/\u0014*;;C_\u001dxx)\tǰ%\u0014+unk(I^O6l/bG:|E44WCn<\u0018)xt܋)\u0018؄\"ΔS\u0019=\u0010.׭ \f\u001b\u0017#\f8\u0010w\u0004!-\u0007<4s\u000f\u0007\u0001V-\n\u0011hc\u0002]yd\u0012RNfNЦ\u001c͕)'\u001e6\u0005\u001e^DN$s\u001cԿ\r\"+KG#1s^Mn|ik},/mwVTmW/}C\\,m\\=\u0018(r@[tb\u0007_?/xco\n~\u001fMU|g\u0016M)`\u001d6eq\"G\u0005\u0005\u001c8+c\u0004\u0011\"9&C\u0018]Cn\u0017Â>\b<l\u0004\"A\u0013j\u0018?<m\u0004\u0011lલn\u0017leL\u001c\r#}C'\b-\"\u0017brE\u00111ȶw\u00103)h\u0010v1\u0014i\u001e'u@qJ\u000bD\u001dsS\"Ch\u0014Ѯ\u001dtG}8ia\u001baT\b0\u0018\u0012\u0002\u0011\"h\u000e0%\u0019\n#.mSgӛf\\6V\u0010m+\u0012du\u000e\u001c\b#۸kjiC ;B\u0014\u0014(\u0010Fj\u0010CЬȩEHC\u0003,z\\\u0016\u001bVȒ0[\t4w\u001b\u0001/'B@GO6Ԑ\t\\:\u0010K\u0012\n74!B\u0014)%\rEg(\bT\u001d\u0011ܙ\u0010\u0012\u0011Li\u0010N=\u001c/A0G;\u001bva0#PPND$2e\u0004Gl4;شE+M\u0004\u0011x1v\u0010\u001fe9<b\bCdԣ4z@\u0011<D%6C5H\bI\u0015\u0017Cp,A\u001d19MA\u0018\u0019!|Njh2܊\u0004gۋ\u00115dJf\tBX#!XA\f%\u0019eJ%#\u0002s\u00030\u0017F$/%K\u00182\f\u0013\u0010*f9sg\u0016GI?\u00181\u0010͘qd*3@ߛ\u0015]<#&\u0012.\u0011bDX\u0011ᤦ舨\u0013w\u0004U\u0005\u0011fn7Ŝ\u0018jɉ-\u0012\u001fN3T;I\bFһ\u00104I^>h\r\u0011X6<\u0002`Lԙ\u0006gd\u0012A0ɄH=\u0000(\u0010/\u0000b\u0010\"\u0013uCD7\u0010emx\u001c\"&\u0004X7oFp^S\\#Đ\"\u0011K٪mG29SWTCiNbA\u001d\u0002\fq\u0017T\b\u0010\t\u0013C!\u0018\u0012ȥYa/v)D܎\u0010z̆wzf\u0004\u0011\"մH*gJ\baV\u0014CA$\u0018!\u0014T$Dc5.\u001bKnqgpC\f*jW䆳\b!<TCBe\"XT@DчtwVbzGCz\u0012\u0018'w\u0003+\u001eŔvO\u0015\u0018a2\b1d#\t$Z\u0006\u001dA\f:7L\u000egtxP~\u00176mk:l޴F0\u001a\u0019nJ\u0006I?&\u0004Ki1: \u0016e\u0014B\u001dԉ'(gMG$֯\u0011>LY3竡30+\u0019\u0015\"\n\u0011\u0012BNrfȮU{W\u0018\u0002,7063\r|Ք0Ilv\u0010!< 0\u0007oz\n-&\rA\\@FsFŦ\u001eiDbF\u001aL꠆q0(kV\u001c\"`چe|ı\u0002e8JeVC&c\u0000W\u0012w\u0011\b\n!(L'\u0006<\u0006)]\u000b\u0012\u0011d\u0012\u0011,ʷ\\r\u001an%\u0014QC놵\u0011aQ#D\u0018(\u0010$lRI٩(W&Ĕ\u0010\u0014q+ƽ\u0014C\u000b6zΓ3\"\b;2zlf!\u0013&k%\u0002\u001cPƯ\nǦ\u0012\"ʛȈFQj&F\"i\u0011BdaဗXO\u00048Πsd\u0012OQ3Shڰ\u000e)\\]ᕗ)\u0006߫a.v\u0011;*\u0018aUWzG0G޲dXq(X\u001cL\u0000&$ѕ\u0011\u0014q'\u001d\u0000ٌT;,\u0010\u001c-sV\ba\u0019A\b\u0001wYP\\\u00062XGX\u0006(\u0002B\u0018\u0014B0\u001f\u001at,\u0004243°tD4\u0018\u0011yyYY$!KRC̬\u0000\u001dQT&\u0011*t6\u0003C\u0000KՎF2W`A\u0007\"P\u0011Huw\u0004tS1d_-\u0012!(\f\u000f|^B\u0014\u0012xl\u001bc6t\u0018\u001aƌ(=)2]\u0011\u0002G\u0010kL1Ng@4\u000ehMY7g\u0004\u0007EATbS;Q%\u0019dH\u0011a:\u0002s;evGX4B\b׻\u0018\u0012\u00011@>D-\b\u0017Jɂ,\u000e?#XW: s\bd\u001cE4#P\\_Q\n;ʒ\tG\bV;Z\u0003((3E\t\fd \u000el\u0002h\u001d\u0000\u0013'\u001c\u001d_\u0017zeLTvKEH8#LVG)\u0018dP\u0002\u001c\u0004\u0010NIBŎ\u001d\u001e/\u0011\u001eUnG\rl\u0011Yu\u0000\t\u0018\u0018ݫŤseCJiIi@UV&!D%\u0018!bGN~2$\u0017`\u0006CqE7)\u00178hi<J)&\u0013IAB%ҋ\"\u0018\u0005A{\u0003jՁ#*1;!(biskz\u00032!\u0012\b\u001e\u0019j\u0006\u0017h1\u0015\u0013l\u0010`\u0004m\bg^rf\f\u001f\u000f\u0010%\u0015\u0011;,D;r\u0007p\u00021\u0005\u0015Sz%\u00131DTyQ\u0019\u0011ˠ56k\nӚ'n9\u001eDCLL?\u0003$Y`\u0004z{(m팘\u0016;2\u0000\"A\u000b/K\u0018JLo/\u00114i\u000e\u0001\u001dG:\u0011F'\u00109P0a\u0004$ᎈ&}F$\u0019\u00193\u0004.{\u00133ф\u0013Ȅ=#\"?5 D\u0010Rا\u0018=C@Tа\u0003`,[\u0006D\n$\u0004\u000bNJe8\u000b׉:.[Wp!Vf1:\"\u00045,>ܟ|#ª\u0010B\u0012\ta^:\"\u00002Q\u0002\u0010K~2F\u001a\u001c|\tҝĐWV\u001f\u00066qQ}ERN \u0014sUBO\baPCԻ\u000f\u0018dN׬jSD UL Q\u0004.:;Y\u001d\u0019VGC?N,ICA\"\u0011z\f+\b%{dF,N-adB#Ә[4I'ҡo\t1-bʬ\u0011Ȥ\u001e\u0000Rv@\u0011\u000eJF\\3Z\n37\u0012(\u001d\u0004=j2\u0013̈hy1dU\b\u0014hkAD\u00110&α|).\u001dQ\u0017bH\u00048S\u001b)vD0<Ȝu,~ڹM@<4\u0010W:Y4:d 㠇9#ĩjf2\u0019K\u0010#7H1&\tK\u001a!%\bp\u0018\u0001C\u0010}#dZAՔ@H{?M[ۮ\b}90w*`;\u0014J@Dtq<\u000fJN~Ω{` cH\u0015hsݾ<\"(:NA]\u0016b\"\"P\u0004{PCu\u0004Y`$\nv`W\\q*\u0014bB\u0013ȫ\u0014,\"J/5\u000f\u0012քt\u000e*Fqb\u001arc\u0010m\u0019/#߰\u0015X&\u000beG\u0018\\\u0004$9\u0013f\u0000\u0013jwSE( QRs=]\"Đ\u0000d\u001ctDY\u0007\u0005\u0019a;b(7&ar \u0001*(\u0005BDdHi30#&V7\u0017\u0004#R~\u0016J{\u0015+\u0013E\u0005\u0013^\u001dudԝ.{1A\u001aV\u0005N2܈\u001d'n\u001d<S\u0018ڨD@,\u001d\u0018O\u001abH(5#2縘h+\"X\u001fDTa;\\\u0004?ʊ\u0007+cɊ0+\\7\\\u000423󝩘&F$P\by B>n\u000b9.%\u0019\n\u000e<J\u001d,|CIឮr7P\u0004~\u0018'U=\u000fĈ&\\K\u0004{CT;{V\u0010ꚵ/\u001etk\u0006\u0018\"0\u001a7W\u001d҆\u0014\u001dSaM\u000b\"8%+\u0011b\u0019R\u000eSg̱(D\u0007R0wr (S\\\u0010I\u000301\nC3^Ͱy\"\u0002:MI\u0019зDjuM\u0002\u0003\u001efGb\u0002\bL'\u000bQA{Zjԍz~'\u000b/ɗ\u001f<̝\u000fܿwG_\u001c}\u001f~v[g~\"'_?;{;\u0014\\zxzkw>~c`g\rٝ\u0010z&>}!\u0014/ݻs/>|pVz;n_\u0005?x_r\u0007߾Gۑ~>7/y\u0011xnȝv;ＭhhW=\\_wӻ[\u000fN=T\u0011\u001a;>b#K4\\\n\u001d\u001f\u001eMQXGvξ)^\u0007oE\u000fEl[0[w\u001e|\\Y\u0007ErY7o\u001f@O~g^ҫϼ\u00017~\b}Uހ\u00071ϋ/#w[/P>#G_>|\u0006\u0007Gn\u0017}s.7gW\u0017\u000b\u0004\u0014\u001dRG#rf\u0010|\u00137\u0000Ѹ\r\u0017S;\u0005\u0006\u00190h]\u0011̿XV\u001bypۙ2q{1j|\u0015ѻ\u0017VMHxcܻ\\lr=\\&׳lG\u001a\u0007\u0013\u000fݿwTaS\u0013w\u0005I\u0005@\u0004\u000fh|T\u0013*na.\u0005}\u001a\u001cg\u0017UM(3-i\u000b17Ĉ^ثc\u000f~Ps&\u0007/_~i\u001c ?\u0007-$\u0000e+w7)jk.gr\u001b.$m\u0016!ot{.h\u001c\u0017w'\u000e.4^>{wV\u001f>N\u001f\tȴ\u0000Cxɗ\u001e}\u0013KL\u001e3\u0017}a06\u000eP\u0005{t\u0004Lrl\u0007\u001b`_\n\u0016؆\u001e?$\u0014\u0005ϻǾ+x\u001aj>2\u001fc8ϢWrG\u0004\"\nl\t\u0001/H\u001cz\riKn~\u000f\u001f=\"\u001fhPԍ·G\u0013\u0016n{\"S}?jFMVl\u0015n\nO\r=V5JI\u001b\\4պPTKj?]h^^\u001f\u001a\u000fmޒܗ\u001f-??\"-!0_\u001a.o\rV.8C:\u001e_/X:G\f;/^\r6(0ꒉK\u000e[=U=^n@>W?s;/\b4c\u001f\u000bA\u0016k\u0007xXa<\b1\u00076<,ƳU\u001b\\\u0015\rr<Bh* UFVUWM}E=\rr\u0017I\\yQxX*$G\\j:tֱ\u001e.\n\u0018to߼Yu,\fG_:^~5;#ϟ>ڝ{/\u0001^|ᓟ9;7^[>_|\u0017^\u0006\u001ex\u0003?G!C}\u001d1\u00114*(34\u0001\u0000\\Ϝ><\u0014,ry/»W]G\n\u000by\u0012E\ny\u0012.\u000by\u0012.B\u001e|]#~n\u000by%<\u001fK!vx\\=QzgygY|\u0007>}\u000f<;\"h}\u0007s7?o~s\u0016\u001f~[\u001f\u0001??/\u000f~'?o߽c\u0000G_/\u001f#\u0005\u0013w\u00070A}ׂ\u0005:\u0005j\u0006j}3N\u0019A\u0007~ƿos~Oō\u001fw=ݟx_o۟g\u0000֟)ɷ~ߦOza\u0017~S\u0018>\"@^z'9\u001af\u0001e0A;\b G_xp\u0007&|7OD\fCZR=ng\u001d4vl:n\"V=>|Ր^}kg2K$kӳz#Tqsj>M)n\u001cjj/7Os4o]fҊ,![&\u0014h(~J'Ӱ3Ix8\u001c+>~ik2pg\t\u001dl&cf\u0019\u0013n.\u000fS]@A\u0004):uȆ\u0007)\u001egＭ\u0017qChU伵\rMwL\u0018\u001e!N0\u0012Cn00{zҫ=R\u001cM\u00059a\u0013W+fW\\c#(#p[PҔO\u001a\fͩ\u001c)aS03=C\u001d\u0011K('q쉌?BS\u00111\u0006w\u0013~&|8#\u000b\u0002W\t0,\r\u0000\u0007\u0018\u0014UM'5TnǤ\u001b\u0006bCM\u0018ŉ\\RU)D\r8.7.~V\nІ\u0004SApdP~QZ\u0004\u0017A~٩\nu*>{\u0006Y)fSxZn\u001b0\u001c6=.s?58/\u000b\r~0\u0007\u0004]\u00076ᕉ(N\u001e]??]a\t\n<\u0006\u00061r'Xb\u00143V\u0019\u0000(\u001a`ߍ}pFL\u0018\u0013\u0010~[O(l!CΠwk\rc\u001e\u0004wנf<\u0017Q\rp7\u0011h\u0018Lo\u0018\bVuPv\u0006,Ķ\u000bHeh\u0017n\u0015\u001e\fV0VPznрS=\u001aPG\u0015&:Lެan6L>cw&v\u001eǣΧ7˰-\u001a0k45$^B\u0000\u000eh]\u0006#\u0004`ս,\u00017\u000b*d٢z\u001cz,\u0007NdN\u0016/j$v%<^eKo3W='{\u0017_zB\u000b\u001d]`ak\u0003m/w,xKz\u0012޸[\u0012y\u0007:8vyuxo\u0016j\u0000F]\u0012[:\b/\u0013X\u0006uC\u0016BۨX\n9o1aO`9tWeݐ[KMc_\u00146e庢yitit>qh\u001bˠ\u001f<8P<ԏ|L#8[o\u001b_ك_:O}z{/n\rxh\u0001g\u0001'\u001e{\u001f3˫׮<b\t\"<b\t\u0017<b\t\u0017^!Xe.\u0011Kxo?<\u0012\u001e珥I;<\u001e(|ص+ڕw\u0011W^\u001b,\u001dr\u001e\u001a1\u001fNqcn$w^ҕW\u0003ls8\rƭv\f%\u001d(7n&7\u001b7pel;<\b\u001b\u0017<prs\"\u000bvq=K!q\u0001dx>\u001a\u001b{\u0014$\u0007gI)\\̳W.\u0017qȩκYWvM^^s.ιVUp-`˯W\u0003:\u0004җ=%zɭW\u000e{pږW\fCx\u0010GZ+ĖWo\u0005\u0003Yڮ\u0001-o8-+áP\u0007YAVOo\u0005@\u001b}aQ\u0003/!/˲\u0005\\zU>pz*6̺\u0012kA^>xr\u000f\\\u0000\u001b.u!\u0016=tnu3\u0007I\u000e\b\u0007M>ϮocZl8\u001eaѳ;\u000eǵY;6>\u001bY\\\u001c\u0018Eۯ{X\u0006m6\u0016B+Y\nmx\u0016C\u001b޽+Y\u000eH\u001b\u000bMЕ,6|{[\rޕ,.\u001eZ\u0018qkiz싣\rޕ,o\u0015-֮Y\"]O\u001cZ$=u\u001er\u0019>k/_o/I^t!Qo^ĻCb\u001e,S\u00059\u0014r\\yB.U^9z\u001c\u001eUw=\u000eu!\u0014\u001e걏\u001c>A8Ƈv}'/\u001f\u001a]~\u000f?|Ã?O\u0006 \u0016ʯ!Hλ?\by{\u001d[\u0017>+i݂רƅ\u000e߽\u0012y%!?\u0010~'}/\u0003cw~C?\u000f?f\u001f\u000by+\u001e_f|\u001fO\u000b?-\u001f\f?h\u001a\u0007z^\u001be*S\u001daESmxntgPn^kxnܺnO7\u000fǰ߾y<ݎgݸ\u001dr>\u0011^\u0011yCEȄ-&Fp\u0011\u0005 '<j\u0001amCu\n1\u00174\u0007YX7ƶ\u000f^D_3*\u0007F,\u0002+[K@2GƃM\u0014J/x|\n?Yg>7[EχDa>[\u0015?ɨBFsC)e!*\"yx\u0018\u0010ԝ.A\u001dJ\bmޔ0vkGXH\u0011u\u0013\u0011\"\u0014N\r\u0013T5\u0000ϋ3B#\u0017<4\u00049.1X\u001cOrE\nk\u0001Mn\u0012 (0\u0005xe\u0019)WBDm\\\u0015؛7T!nQdtB56D'\u0014\u001e(ޠ\r8\\t;CO$ͮHxSxEC4&\ncw5ϳ\u001aCc\u0017!\u000f&>\bx\"\u001aq\u0019Pl\u00143wG\u0002A\u0001\u0006\u0004E˺U5`͛\u0011h\u00189hY=\u0013>\u001c\u0010ա)V z3f_zXC]ANE\u0003\u0010mT\u0018\u001e5O|\u0001idr0\u001fj|onB\f\\5`\u001ba#ѧXʰ\u001ex^^Zw\ti:源ECq/XO±xm\u001c] a\u0015H<D\b\baOb]\u0004v.2B\u0013Y\u001bë#l'>TJu\u001dO`\u0017X)mkmUz;^#լzهLۨX5&9oaO`tɷC\"M{\\?ٖz+{r5k(r\u0015uG}8[i\u0015ª$}|c<\u0012.[9\\KH!\u0007KH9^\u0005K8G/R%\u001e\nkH<Gz주;מk{\u001e7n3w\u001cNtn\u0007|iNF籡xnǷ˭\u001b)߸qܦp|#sx\u0012'p4{\u001as=Xs\bkQMo`\u000f0Դ|]\r\u0015=\u001da\u0011\bX׼:]ˋ]X.ḣ\u001dZ\u001eVi\u001bn%d˸28H[Wtq\r'6|e<!K3M9\u000fnrP\u001f=ó-\u0017c9a,9Rk[\u001e2\u001cF>3+IWX\u0010[\u001e\u0015hXe\u001b\u0015\\\u0001ƻp0.\u001bkÿX\u000e\u001d\u0007e\"\u0015h˽\u0002m<sȖ7|Y$e\u000b8\u0017ñ>\u001c˛żnukAb>t0\u000f\u001d\u0000\u001bōB\u0016\ruXl^.x\u000fy-\u001esξs\t^\u00008\u00137=\u001bĭʗx%K'qcHڏ\u0000Z\u0011b\tt\u0004\u000e*O݃>\"n,6@\u001bˡMԕ,6[K\r'Z\u0014U\u001bˢMU,6<[K\r\u000fU,.6\u001dp[\u0002i\u0013\u001eHkZ$_Y&WP>?}CX\\Tpxf89JyXAM%Cu\t%71*Xu<knޫd\u0014A.\"P-j߿v\u0019IR\u000ft[6\u0005/n|r7Fiyh}태3\u0010ٶ\u000fELl<pz\u0016!6_\u001c\u0015\\\f}g\f\u001d-\u001d߽m|NVEqv\u0007f.\u0007|{0m7Ӎh#\u0014V\u0006xa^8G\u001c!2A;\u00021\r\u0011'\u0012]X9h*\f{bܵk[׶m]ۺumUۺRs+2i[<_bo$\u001f#\bs\u000f~e3}\u000fG\u001f|\u000b\u001fx@~{c?\u001aJm毖\u001faс^\u001f\u001b7n\u001bo|g~^3\u001fޏW4_Wc\u0019\u001fџ7{ȍ~\f>\u001f\b_w?6;\u0003\u001fo?sg[\u001b_-?݄hG\u00171gy}T17Ͽcw7o^c.9\u0017x^\u0017y\u0017?\u0017\u0017\u0017y/.~]=8@퍒BrgǷӭTo\u001ei.]2V75\u001dH)|<\t?tʏ%v\u000eE*\u0010O>\u001aѱᒟ\u001cɅ9ĕ\u001aCSs,vb2KCdm\u001b[\u001bZ?|l&ZÏx|o_4,~q\u000fn\"gҁ;O}\n.=<g?Ԩ~\u0001}|H\u0010vP?7zN޹~\u001f~{/¿e\u0007\u001e\u001f#'?}^{;o=\u0019#?~G޺ۊG|\u0015{w\u001e99K\u0015\u001e5TMåЗGj\u0014~Xr*{v\u000f\u0006\u0010źuy_Kg_|\u0014ӷؗ<x淟;wكϟuS>n(qӟ~wzS\u001cq/>gݽ?$9\u000f`\u0018B\u001dG_zCG\u0006\u000e\u001a{\u0017\u001aB7\u001e$\u0007AzA㈆P\u0013\u0012\u0010\u000fr\u0011<\u000e}e}tWOߋKjmQ>\u0019+\u0007-^=sO\u0019Zumֵk[׶m]dJͽ{ܦn|+\u001eW؀؀J\u0001>\u0007g7[n!\u001e\ng7ө\u000fSmطPJ}kj\\\u0002 :;=N.q8kgeʩvnHo\u0003q@v\u001c?P%f@?聰\u0007v];Ʈ\u001dcp?[lǃu(t'v=^ ;\u001d&Z~f\u0015G\u000e\\\u000f\u0003\u0000y=@\u0006\u000eqS\n\u001bWѭRs\u0005\t*I\u001bj%;\tJb\u0002\f T\\5q\r\u0017QX\u001b\u0018&ܧZ\t_\u0018f(7\u001d6ONk;iP?w))MS*5o\u0006?\r\u0007_^zeZr\u001bzu=U{,hKq\"\u0006xn\u0007{0<\u0018?<x\u0012\u000fIb2^͗6Jy\u0019^\u0016!\u001aaXPH%\"Maܗ\u001asj\u000ePOԪG\u0010tR$D\u0001\u000ehsw\u0019Fsx\u0002dhˬN\u000f\\}ݳ\u0010ɚf~`L-ٛŅԫfnWYs@ӨY\u0001ɶ+\u0012\u0003\"c\u00066nm|0l\u0003f\fQ!XVp._&8+\u0015Tk?\u001f$\u0017{6\u001ffh\u000e\f_mx\u0019\u001cַ\u001cV_υl\r\n\u0003Zk kD\r6\u0002_\u000b۾uF+!8$\u0015\"\u0015;\t\\L+\u000eO8\n#`Ѡ\tRB\u0017NxL\b`?8\u0013;m<ͬ\u001ez΀\r\u0013fxkTH[Wͬ_r!c.\u001b\r7m5\u0016.6m≠U\u001fFWYW;d?ė.O<C\u00131W7*M\u0001]I.9\u0012U\u000bs\t{b@\u0017E--\u0012{s\u0019&y\u0017:pw?\u0015Yg!L\u0013\u0016ź?Y\u0002Ǻ哛4^f!\u0016)߅޺C+aXmy=Z_\u0007כ![q=f\u0018e&빰b\b\u001dWU\u0007uౘVp\nWM.\u0000֭BlϞ\rVnae`y^n6\u001cڳ7%+qk.]\b\u0013ˆ\u000fns=_\u0011\b|\u001e\u0000p+\u0002۵B\u0002.#}-.cZLx\u001cGm2\u00164):\u0014b+\nމ\u0014s\n\u0013kW\u0014!NAǌsI\u0012sJ\u000ecSgP\u0017wB\riBxRR\u0011>fNG\u0019Vz\u0019?n2âR~հQ\f|\rͿ\t]ؖ(\b\u0006\u0000Gˊ̈V7JE9H;>>/\\Q06۔^cb[A\u001a\u0001L0<<\r\u0005m's\u001eB̝nR۳PZ\u001b1l\u001b:,9j-\u0006,Eט5\u0016f _n-U[mo|\u0005z\u001e\u001e}7\u000f--ͷ%\u0019Y&\u000b\u000eQ.趶PD\u0002ߑ-o\u00028W%Q~U\rՍn\u001524պ\u001e\u0007\u000f\u0012\nB6Ƽ\u0002}\u00181\u001cJ\n\u0004\u001bii5\u0014Rk\u0015{:}\u001cՔo}`<I\u0015\f\u001f9?󜟷u16S~\u0019y\u001a)<\t~]\fϥztP\fzߟ7dsV\rќ\r̨FyVJ7\tlK2g9\u0013n,Ӳ7\u0002rVSRvfYNdrV\r%j\u0015hɟ;?~`[l-y\r|^y{\u0016(}\u000588ϯ\u0004i֖\u000f[8\u001b=4o@{_\u0001?\u000eG\u0014vsk.\u0014\u0013̕[sǖ\u0006;4\u0017`!v:lx\u0019ݲ\u0005eo\u0018h\u000f\u000f\u00157\\\u001f̀\u0018=\u001chAJۉ\u0016)\u0003\u0003x0䷉*23mC«Pŷ\u001eXD!?\"\u0006\u0002TϿ^l?9\u0013?>U'Enwt\u0013|ῇXI>}o\u001cһ?C.v. e\u001f\u0017W^+uJ=vi1zL\u001e\u0013*\u0017⏃°2.v>KS]K\u0016bIk}(xzMiVS]k}\u0005OSOiO|_5Okyz^מʼvЅևI\u001b.n=\u0004{m\u0013_\u001a zp=^\u000f׃\u0019T/I?mo\u0016\t\u001aB\u0017o\u000fZHnY\\%4B0B{ 'W\u0017n\u0017w@\u001eDy\u000eXÄӼl\u0000\u0001H\t\u001a\u0006;\u000f1uc\u0000\u0003~\u000b짾d'<i0_O~r)˧=_ЧD@kɏ7\u000f<w==y=\u0001Fjɗ\u001c\u0001gam¶w\u0005+\u0017]o\u001e\u0007AzP}2a.\u000e<\u0004ǛyPB51|8\u001c9\u0011q6A\\\u0018\"$\u0001kwdeot6\u001a%@\u000e\u0018(E2\u001e΁KHn\u000e^>7#%l.\u001e\u000eݍgmc-;@Σ8C96M2\u001aQkyPeh%[\u0018r޻\u001aqF\u0018$F~\u0001[\u0000A\u0002\u0005\u0017F\u0006#(km5]\b\u0001dO\f\u001f1\"ǖD\u0010\u0002H\u001c@`U}ssc$]]]U]]]ب \u0004\u001e)jJ\u001b\u0015Q>9Bh̻r>\u001fgV_ka\u00061kաr`U\u0018]ٯPC\u0002N\u001cbBCZX2.KL\u0013~Ú\u0011%$L\u001fMPj+\u0004u7(`\"\u0018E%\u0013\u001cV_8I1`\u0017O8z+@\u0016j\u0015S\u001a\u0015\u0011LjCd1tA\u001b\t)F\u00037\u0007 \u0007TYcbsٚH>8-3ǕTs\u001dV\u00059u|sP\u0000b\u0005\u001d8\u0010\u0000\u0004\u0015\u0002\u00020\rw\u0004d)7\rV0\u0007qī\u0014Fs\u001eÈڍy\u0018>\u001e\u0001[<|Ct\"ayY|\u001d`M$:\u0015\u00115\u001fIPc\u000bY!PcR\u00020@RDE\u0014\u000f2j1\f\f)L>0v+<a2l\\m\\r|@51WB3Sw\u000b\u0003\u0012@Ir%\u001c\u0000Z\u0010\u001e\f/\u0018^%(cxwTg\u0015\u0017pA\u001ead˄_V$LuԙcΆ7\u0013 E\u0018\u0001\u0004I\u0010FkP\\\u0015(,a<\u0016%Ƣ2x\u0012/X{^PR6\\If$v\u001aP\u0005}g\u001f\u000eX\u0016? S'\u0013\u0019\f\u000b`l\r\u001fdd'U?j'R=\u0019[aW=IFO\u0017ukƠ~Z!\u001cIB\u0002c\u0015-jIK`' <\u0006Q\t޲޴ʻN{y.V\u0005+e\u001a\u0001\rd\u000b&M\u000f=']UQeS8ϊٛ\u0011-Eª_\u0019Q1\u001d-+<\u0019Q3\teWFV_\u0006f9ѓt]EVB$'Yl\".bCN\u0011p`*dbC\u001d(ߏ_\u0010+`e/,XAU*㮾R#9W@\u0005Ld=\\ҰXOe(N5\u0003\u0002]\u001fu\u0002\u0010D\u0013\t7\"!a\u0012\n$\u0007#d@.\u001aB8\u0004l]2jU_:&tKU'\u001d\u0010ѓ_\u000b\u0001.Z*ݻ\u0006t$']iQU\u0010IVO.3ª,I\u00123v\"cdWe\u0002UJ$ \r^ϯJ?޹Xl~٥\u0012\u0007\u0010,\u0014Op%\u0010\u001c\u0010*^\npWOD\u0012C5hY\u0019Ӝ\u00126Ɂ PrA\u0003g͇eLY,0z12&;\u0002\u0013P&\u0004e,z\n\u000bu\u0005&E4Y%0\u001d|ITO.\u000bIO2~Փˌl?4WP\fO)(sf\u0017^ZqLH]J\u0012.ˮS#\u0010\u0014jU;sKH\u0002ڙGu5\u000bl\u0013D\\\u0013L%\u0000t\u0014p~\u001a><O~\u0017؍H-m-m-m-b\u0005[5\u0006\n}u\"?ȹy#%%1Lt7\u0005ٽy3%~<|\u0016eW;\u001dfKzJ\u00072nW?;V:aJR4zkT2Yesl\r\u001fdd'U?ZGO\u0000l\u001fZ\u0014/X\u0001[JW>p_ X\t\bu(oiLuxCM~w[y\u0004Ff@\u001d/5䴀u,\u000e5'\\\u0005{ǳ=TL\u0004^M\u0006݅\u0003\u001b1=\u0005*M\reD.In\u001f^\u0000V<J!l\u00029M\u00033\u001c\u000e\u0007Áp{\u0003\u001e:z\u0007\u001eZF\u0012ͯ# ʖå3#\u0002\\`\u0017'-RSP\u001c-:sȣq\u000e]zEVbtarҠV\u001fAb\f\u0012c\u0018XYb([t\u0011h䷒HE-\u001dčV\u0004\u0018r\u001b\u0002ǍC3޽ԜwdEW\u000f)]\\ܱ\u000bC3V\u001fL[\u0003\u001de\u0007.ۋre\u0017=p\u00042\u0015]6u09m\u000fu\u0007;p݁uM9[I\u0007z]\u001c\u0007f`\u0003\u0013\u001eWg¦\u000f\\{mT;\u0011;F\b̻#lTp\u001f|N/hv\u0013Fz\u000e+\u0002#\u0017jPJ*-4q4\u0016Șe9mϩ9;4=99-fKĹ2h\u0002d\u000b\f5G_D{ā,a*\u0014.5L/8\n*3!`e:=+qN]E-G}faX.\u0007R?\u001f,]\u0015UG鼍99ܳZU@jĐzR>籯\u0012\u001bq9yi4#Diΰ]sZ> \u0000Ì4a.;%ck\u0012>=\u000ec\u0019\u0006]~1&f\u0013\u0013V\u001aP\u0012LDm\u0012ߊ\u0004:O\u001cܮVЪ\u0018\u0007:W[g,<qG q1Q=_v\\\r\u0004\u0014Xj.À\u0011{\u0002zRr\u001co|mʉGX CA%匃^arrl%B\u000bحVЪr\u000ev+Ym9\u0017]M+.P\u0013\u00120Ρ0UV\f!rIA\\\b3L\u0018r\u000e 0'Dk\\8=c0oh\u0015\u0002Z\tob\r3\u001fi^\u00120\r3\r3Y\u0011V\u0012 %\bROXI\fx\u00033\r3Yi\n`\u00114sl'lGl'l\b\bϱ\u0011\u0011\u001e\u0011\u0011c#|%6{\\تҗB\u00162G.wKp]\u0017b}4]\r\u0000@U\u0007OG\u0000i<59PH\u00150o\b:z\no\u0010{0q:}fQ:E\u0007fQ[ \u0004o\bǶ[L\u001b<I\b\u0010r\u0006H,P^@8!\u0007\u000e9pW\u000bgɞ\u0012]\u0013xk\u000f췯kv\nHb\u00016\u0012l@j[kz5#>Lw~X\u001f~%\u001e'Ziѓqf8>Y'Rѓm?\r m\u0006i3H5\u001c1>j\u000f*E-g\"'@9},P^@\u0006}|\u0003\u001c8d?G.\b2+[3mx}|x\u000e\u0011Z.[;\u001eW[qڲl㴶\u0006֖qXim\u0019e6\u000fT\u0006=|2\u0019:C\u0004{o뼕\trA24'@9='\u0011*v/|s\u001e>pȁC\u000e\u001c\u001e΋\"=\\\u0003\u0005\u0017\r_\u001d\u0006y\u0017\u0013u(j|}B\u001f\\pXD\u00142h\b\bCuB\u001dCZtOqڷ\u001c\u0014ue`\n;JZI<-FrlDV\u0003i2\u000e؊t*Gd\u0014sӲПg-]<\u0017%-6w~s\u0016CY\\|\u0007I\u0015^݊W*\u0001q\u001d}Z\"\n~!\"A\u001dc~^\u001ffnżUܹjcp6\u0007\u0019*-Lr\u0007'\u001aì.`6\u0005kyQUS/xCmD(J\u0004Fkňj;a\u0006JA\u0015.'&\t*9cjDC2Sђ;<\u0007`4U\u0012\u0001\bkc'ʠ:E\u0018\u0010U0\"93L,\u0015\u0006@\u0014E\u00050QR3z\u0012p\u000eH\b\u0004b\u0013``G\bZqݡ\u001f\u0014C\nNk.\u0016\r+CZL\u0004ޤ#8 '\u0011@pf\u0001#\u0007\u0019-\u0005lad\rA\u0010i\u0001\u001aNpl`9v]HJh\u000b\u00130u&h\u0014Ģ\u001e\u0017\u0005\u001dI\u0000a \u001a*>\u0000pIB\u00076H0Z0raH]1\b&BZ*%0ҡ\"/3\u0001m\rk\u001dPb\u0006#P\u00031\u0003USM\u00003_c=M\u0003ajk\u0012na>V@\u001cGb$\t\u0003B_Ä$b\u0000M-ԄA\u0012\u0018d@q@׀\u0004L\r\r'Z#\u0013\u001eCe\u0012\f\u00106\u0018\r\\\u0011\u00020tE\u0005-a\u0004\u0003͡Hja\u0015\u0000\u0019\u0000)h,\u000fc5+?t/\t\u0014\u00061P!L3\u001b\u001e\u0017:EB\\|H**rfZ\u0013+\b\u0005A\nq\u0014\u0005\u0010\u0015Bp\tU\u0014\u0000k][ny\u0019\u00062˔3^pcqykGYwj\t̏\rF\nGH!-Pj\u0018tU0Za\u00020r\u0015\t78H@3\b7q\u0012\u0006b5@)uCm?Hc\u0018C]*b\fe2\u00042\u0000\u0002\fÔ@~a!\u001e\u0000@\u001aL(\u0007(35\u0012H0s?@\u0002%5׾\u0019X\u0006\u0015\u0006\u0019G8#V\u0013\u001c;\u0010ͪ\u0004iP\u0011N2W=Y_\u001c98\u001a\u0000,\u001fV%fp\fQJ\u00054)R\u0018\u0005\"=e7\r@\u0019b⨪ءr\u0018\u0002+\u001aIuMRwu0Z\u0012\bI;VUsU\u0002F\u001e\b1\f5N1)U@8\u0014\u0001,D_b\n\\\t3g2aHs\u0014J`(sXsM$Ca\u0003`.e9h?Z\u0013A\u0018nAF \u0007ڰ4\u0010\rL\u0015ʀq:\u001a4\u001a\u001a脥)\\6\u001c.цFpB0a%vQ6ىp$H9[\u0000Q V\u0015#\u0013b\npӕP\b@\\\u0018HPw/8ty\u001b\u0018\u00045L\u001dC\u0017 \u0011]\u0018\f\u0005ڑvxBqbъܣ%\u001d6?\u001f\u0016:||A\u000e\u000f\bH!\u0005_\u0019΁R(\fx\u0004u~\u0011L~\bS:\f\u001c\u0019TY}I\u00100\u0014\u0017t0\u0007p-1'E\u000e\u000f/\u0015+DM\u000f;\t\u001aQR#ڎW@7?\n\u001f_MH'#\u000fJ/L:\u0014F%O*v\u0007q}\np!c_\u0004o5_&\u0015\u001e\u0014kӝއ?\u0003\"3\u0010ԟ\u00149$p|\u0014`l*I\t}6d\u0012\u001fB!\u0011x\r\u0016N2C\u000f*(H6FrX@\u0002\nن\u0012~\u001b\u001c,\u0001q\u0007̾Et\u0003i\u0000\u0015bS9`1>֭jw&Y7k\u0017eyU4\u001b辮H*-oG)GE]*zv\u0001\u0003j 7^+\u0011c!\u001d;\u0004\u0013*\u0000\\\u0001X\b>\u0004s\u000bzʀ'\u0015'woH.&D\u001cY\u000e#=Wu\u000e\u0012\u0003_\u000b\u001b\u000e)*i\n7+\u0010C\t\u000f\\h P\u0016\\''N\u0003\u001a-\u000e1*;Q\u001c\u0019UuŨ\u0016\u001f6xO\u00176p\u000eH6s\u0012mx]\u0002\u0007ivM\u0010&Z,fvo\u0003\u0002\u0000ƣ\u001fn)$l\u001f(&(Z3E)k\u0001͢M\u0016\u0017\bN\u0013,Ņᾮ\u0015@\"T\u0004@{a}ܠ\u0005\u0015ޚ3[\u001f8^\u0013\u0005?63\u0010\u0012͔î\u0006mV\u001c6;$sM&8bb\u0018x+\t\u001fbK\tD0)Oz48jc\u00060Hs\u0010JKT#\u001b)캸Xk+\u000eir\u0010\u0017I9\u0014\u0018e^jmPL%lM)@\nwI&p̾HѩC\\i\f;\u000er*0\u0014ʀy\"5\u0006\u0018\u0004&,\u0007R\u00153㊪\u001eGut v}Sf%\u0017r`\u0015/B&*4\u0005Dh\u000e|AF\u0017{J'(\u0019\u0004\\.\u0012$Š'\u0004\u0010JqI*g\t+_eJ\u0007AA\u0014g\n\u0017oZi٧8VҁtE9B\n/mRqJ\u0014\u000e◑\u000e\\g\n\u0011zwyv$\u000e059W\u0016B\nn&M\u001eJ:߬&\u001dVOE\\yI:`]\u001c\u0002\u0010z\\\u000ef\u0017H\u0007^\u0014U)DV:`]\"ei!\u001d*ՒҁKtt *\n\u0012S\u001fܼ${`왫מ>svy <\u0000{߅\u000f?:ٓ{d\u0007.:?\u0016\n\u001fڛd=0߰{AvbLÃ\u000eG7\u0018O]:K>)L\u001c3&\u000b9\u0011L &\u001d|N\u001awz0\u0019o\u001bNH#+O\u0016qzӣy.3\u001bΜj8ݿ\u001f?QC~ϼ+\u001fwwݷ\u000f}s_/}c\u000f\u0005~/E[\u001d\u000fwʢ\u001f~\u001b\u001f{3~cRWϜ;s[\u0006w\u001e\b\u001fo}\u001b\u001b|\\9T\u0011=|\u001cK,9K4,E.Kˮe\u0012\u0007sm\u000f\u001e\u0017?`\u0014y\u0006\u001c\u0001ʍ\\\u0006\u001fڝ\u001e2DNɮc1ݧ=.a\u001aټsgfON?}7=Ot\u001dOwwؒ鮜\nEUn\u001e|Ӵ$?8vǶ!\u001a\u0012ޤоm0_\u0004~r\u0002Sz\u0015\n5\u00047DSM,mN;\u0019\u001fuѵ螷{L?/\u0003\u0018k\b\\庍!٩wǷ螷#p\u0003@&SC\u001aK\u00192s\rM\bVO<D4:޼9w\u0012ϢL;B>M=\u0018ߏL\u0014^L!\u0000i= v\u0003/TPC7MS$»U~d\u001b\u001e\u0017\u0004\u0018>JP\u0000;;p.3\u0015jni媼ۙ\rvE4-cTв5\u0013s<rƽ>5*Dҧ*\u0014f\u0011˕Jb|VĨ&\bOiń5֩\u0015Ce\u0006Ϥ.Q=\u0000[hNqlurh}TuԮSܴ\u001eA\u001a!pZxdנ떤 \u001a`ok\u0015Rrń\u0010K]nƗ\u0012\u0006Bh\u0006kX{\u000eiawɳزVx\u0011ˢX\u000b\u001c\"\u001c<#oܕ\u0018\n>w!\u0001_\u0014\u0006ݮjVǻ$x3\u0012\fá\u0004H thket5\u000ba\u0002\u001c0/r\"V\"9\u0003\u001a]]l\u000e21\u0004\u0003H\u0003F@J\u001a0Ў\u000e\u0018\u0005[b)WRԠp]-\bg\u000e|J\u0018\u0002F\u0000:\u000b\u0015F\u0012`\n\u001aL\u0013kH7i\rZqJճ\u0017]DD\u0013D\u0011\u0019D Z\u0007:E\u001b*Wo^\u001fy\u001b\u0017gUk{wfۛg7>3~|¶z~c\u0002v\u0018}]^\u000f>G1c\u0000\u0013$\tb\u0011\t\u0007o\u001bdND8=h\u0011G:=\u0002L\u0019yM\u000f>\u0013C\u000f>'c\fRBbXLd|gO\u0012fBϜւ*aƻ\\\f}S>3#w\u0016ktD\u000b4(0^'wY\u0004LB%L)P9\u001e\u001d\u0019\u0002>i5Ih\u00177LdYg\u001fWx\u0014O]}=}4]A\u0015+{\u001d\u0012zxxWZ\u00195>Vϧý'J<o\u0016\u000e;LXY9(]\u001f-Yn{Te\u0004(\"k?\u001f\u0015PFG0L4H\u0007aTeApI0\u000e>itbI}}j\\}zhӣY.#}avLy?\u001f \u0000/SG\u001fiG\u0015Q5\u00188g\u000e\u0002Ҫ\n\u001d;\\>\u001e]g\u0014F\u0001Nj~Uc\u00153H\u000e'ÉD2wxVO\u001a@\u0016\r\u0013\u0002zۇG`rz\u0018\f#?3\u000fѕ\u001c\u0000\u0006\u00145\b\u0004Ureȹx0\u0011r>\u0000\u0015$.\u0007u\bBDۇ\u0000뮷!Ʋ>\u0011!ڬ\u000f,v}}dtק8ԠF\b\u001fu\u0011tHh;>фB,O\u001c}2\u00044x\fru\\=r<}\u0011\u0003#W4z]}@,Ӽ\u001f}\u001acd\u0001>'I\u0016\u0013ĤI#\u0012N\u000f&7\r\u001epzd\"N~uz4\u0005\u001c3>\u001e}\u0006g'\u001e}NGNݽ1g\u0015zlfd6]9AӾZه\u0018\u0014c\u0014\u0005c{c+tg\t!\n6g4[X\u0019cJ&\u000e7<\rõMڄ*M\u0015\u001d[\u0013ZB\bJ;4􎠙ʫ@F[Nh\n\u0013@#\u0004>\b#]FaGK'r\nI0\u001d]r@.\r\\\n\u001bw\u0018|\u000e\f\u001ddIN;\tV=<8;؝$\u00186_\u000bY5Ķrn\u0016\u0014׮\u001b3'mC5C\u001a07\\8=&3W\u0001bWUG@G3i\u001b\u0000UQb\u0007zM,\u001anX\u001aǧE\u0004U\n\rօy\u0013*\u0011x\u0004Ui\u0004\u001eHZ+̌/x\u0012a\t\u001dwZQ3\u0000[h\f99p8#\u00119}Rs\u001cĨ)a:l\u0003l\f0@\u0006r*&d%NH`R愣*h\u0017\u0005DAA\u001a0A}dȫ\u0003\"\u0001`\u000eX\u0010PiAhp\u00040.{\u0018\u0001Z3\u0006*\u0010kAH\u000bJ<T\u0016A\u0003\u000f\u000e%o*M\u0018e-\u0005\b\bBZQ\u0005\n\f\u001fIf\u0018LdQ\r&\u0014xJ\u0005Q3vWJGe2\u001at\u0006:HAnz|^:%KG[.\u0012/\u001d\u001f\u0018\\(ʴq7\b\u0003b\u0003nN5\t\u001cEy\u000fKY\u0018K7!*_g!.1\\huEWh4&ʪj\n\\庍!٩5WV{\u0004R\u0003QF\u0007+\u0016>\u0013<\rVĄ?\u0011_Kyu\t{L\u000eL\\XTq\u001dRڙ\r\u0011QIF2Et\t0a?,X&Xq=G\u001cŪK w\u001c8~R3^n}$VTi+\u001e=RN\u000e6Ak\u001bAk;Z[VlfD{;M\u0006m\"Ъl\"\rԗj\u001bE%2+H\u0006Bgl\"Y&U48W6\u0011!6M$hl\"PzH\u0003D*UDP&R#m\"\r&\u0012A\u0004cG&\u0005l\"\u0010ŵM\u0012o\u0013p\u000e6HMLFMdt\u001d-(]uKFfx\u00131\u0018g^bM%ɻ[iKI$Z9D>h2.L¥e]\u0013k-V%vzr-|%3-pa\u0005\u0017h \bT\u0002 \u001d\u0007\u0001# +;\u00063`,\u001ex\u0019OVeAa$\u0018\u0007sFڽnkԤ\u0013\u0013Nj\u0010Q%O$|%3Xcy'|\u001dr\r#n*\u0012r.|%M\u0017Lgd9[ysѠ*K\"J$`\u0018ԭA\u001aԭW֑m\t-\"u0e7\u0000d\u0006-\u0000m\u000eэB8(\rQeΔSl\u0017Noʠ)\u0004owN:2RؔQ[ꂵ;\u0002\u001009\fX\u0006\u0006\u001f\u0003\u001enw %&7-\u000e\b,!\u0018\n-\u00194\u000e2G\u0018%C)\u0000\nruoɨ-`%4`\u0012\u001ek{w&\u0006\u001e[c\u0012AK\u0006\u001fh0e\fuld+\u001a)o8]{ټ\u00116F\fK\u001eMɣ4J\u001eMɣ4J\u001eMrɣI˘a\u0017\u00193lc̰-c\u00193\u0002b$\u00103(\u0005r\u000f$Iׄ\u0014)(Sk\u0015^\u001e\u0012i\\f2ż Uj.3\u0003xZ$i[5w6R\f dj~WtW\u0006ѭhΌ\r3#\u0015[\u001d[?/⺫ɛ5$\u0015lh1\\$8f̕뒯G2$ޚ;\u0005\u0015e\u0006Mo^\u001e#kp#%0J\u0000\u000b+\u0004_ݵ(K*0`21\u0002$0\u0006^\u0004F1vjc0xGT]:\u00052\u0010\u0000U\u00136\u0003:\u0002\u001c\u0010p`{\u001fYQ0έ\u0014B \u0016\u0002Z}\u0017\u0004Q-\bPy׌Q\u0018**lA՞Jb\\8u\f\u0001ҨQCh׎\u0012V\u0000J];(9\u0011\f,\";\nn%DR\u001ch\fut+-]B\\B1\"ro+\u0019wL%mMY`Ki.䯱DXR\u000bʸe@`ծ'Z\u001a\u0006y\u001bJ\u0010GZQi(F\u0017YHB\u0014yA\fJrW8#\u0013\u0018uAj{8x 0\u00155Bʠ2VRko N\u00190\u001eU\u001c:J'@9J\u00009ĸ#WҞWd\u0012/dxGxk%\u0016\u0019 GԒəZ\u0012 ,\r-\u0013tGs&\u001c_2Ħv1aOgS\u001c&5\r:\u000f\u000e2 _\b@+)\tF3I5(A\fV~\nN`\u0019AM\u001cWhal#e\u0014u-+\f\r$\u0007\u000ek7sDHT>\u001a8!Cc\u0018\u0001\u0001dT\u0006PI\rnן\u0004\u0001p.0)sXJ\u0007'B\u001d1( NV\u0016@4\u001f:\u001dP\u0014j\u0000A\u0001%HMIG\tdXb\u00187`\nv\u0016\u0005\u0015TÕnYbP}>Iu%\u001a.`Ŝb`\nL\u000b-\u0018C\f\"b1\u0012\u0015fԃ\u0006s g\u00079;[PΪ\u00187(`-\b̛g`\u0001,\u0018 tp&\u001d G\u0011ݘPU*\u0018ëȟ\u001cմYGV@}\u000bg\u001aGTYp6V嗫r+54\u0015\u0006DC\u000e76<mlL?m5S߿}Cۏo~[\u001fyIg\u0016.=\u0013Rԟ<A\u0013\b|\u000b5XiЯDN\u0014W\u0010\n(霁\u0003\u0015@`ZD\u0010r\u0002;(\u0003@\u0017[LAЃrg1Dke*8\u00133k'\u0013*P\u001b\u0006\u0013\u0003\u000eq%\u0007\u001dj\u0001u\u0010sM\u0015&3\u001a `O\u0019\u0001\u0005R@ٵC,c\u0018\u0000\u00170lC\u000bhB1\u0005QD6|;B:߼\fk%w:ic\u0019\\T\npZ\u0014N\u0000L-1(@'\u0004\u001a\n\u0015%3y\u0014^@\tB'n0-n8\u0003Ղa^P7аa\u0004+]1g\u001e8vU\t-\u0014\u0006lT\u0007\u0000&\u0000\u000f[\u0019Õ_L\u0002Gas\"tyE`@\u0003Cɒ\u0014x\u0011)6.oY-\fZp06`\u0013BI-\u0014n\r\u0000߬8եd}HBGN\u000fwA\rʤ\u0016N!q\\ۺ؅<b\u000f\u0014\u0001yڊFPWR ר_}q?zA)/Y\u0019J;t\u0004=\nc6\u001c\\MZ\bt9\u000bǩ=\rLC<.Zrx5R\u001c\b?\u0014$u$S!3L\u0019\u001cخ\u0011ҍ~\"3L\u0019ⱳב\u0019&\faר̰<炢Ate\r2\u0003P̧D\r\"\u0003@Ӓ\u0019\u0015n\u0019\u0016ɌSAQO$L\u001c\u0001}\u0012\u0019O\u001cZBiM\u00001׽0F\u001aG\u001aح)<h\u0002\u0014\fg\r\u0016\u0003-\u0006j\u0011\u0004[7O>c\ft\u000e[P^lB?\u0012@V\u001efhиIe܂\u001d)\u0001y B\u0016[b>\u0003D5\u0006\u00166fI\u0018+\fkoa4\u0005Efr;5S\u0013RU`@]\u0013P\u001fu;5Í;@)y\u0004\u0001բdC\b\f[\u0005=C-\u0004\tQ\u001e\fZ'W@XЙǦn\u001c\bApظpUa\u0006\u0002?V.n\u0000\u000f6U&\u0019@C\u0018'H\f\t+\u00122\u0006i\u0001\u0006\u0007]~X!0H[Qs\u0007b\u0003\u001e\u0006'g\u0007 ~>s\"\u0006\u0015^ b;N4\u0002P=+\u0019CK ,aj1D\b\f+\u000e\u0011\u000e\u0011,\u0018\tbw)t1G+\u00148\u0006{#=+Y\u001e\u001d\\\u000bAR\u001dxk\u0019\u0017*͔7\u0010\u00106\u0001dgW|\u0010\u0006O\u0012//ĭ\tR\n)l}_\u0006c:fIpC˨D\t\u000bܘ\u001a/O}@w*u\u001d(m{ikWymM\u0014.埊=)\u0002\t-(5w\u0013M4hڀ\u000e\u0006$ 5\u000b\u001cA\u000eh:\u0000\u0002o\np\u0000r\u0010\u0019\u0001y*8ss\na'}@\u0002\n\u0016.TҐmcL\u0003\u0004N\u000b\u0003&B`v7qs@\b\u0012(TQ\u0000Bs\u0011CIpѽOB&+\u0006}\u000fp\u001d͈\t\u0013\u001b3M\u001a*\u0011]`\u0018:a,o&)\t7Tqc|0\u0007M\u001b^%]Dy\u001dC\u000e4ِ@3ӝTٝT \u0016t\u0014䰀Bp\u0019a,fRڝgl&\u0002X\r\bvL\u0001\"<\u001a\u0004V_\u0015fWX\\\u0019sbmX\u001d\bvLcNb\u0000W\"_V\u0006s6XW*\u0002]PE1Y\u0003P#``\u0017Wv.\"(\u0003&|,$3\u0005$3+`o=)\u0018~ \u0014ɨ\u001c\u0010BnOЄqg\u000b\u0016\u000fL'eӇV\u001d\u001dpȁ\u001eY]%WCd r\ruhY\u0000̣\f*#i(\u0019dp\u0013TJs4/G%w\u001fa3Ne+'B\u0011a\u001a\u0003\u0006ІN\u0019$X\b\u00168`rI퀞\u0005\u0000Yq%)\u0006.+#݅✰9}U\u00155or.M}!HG[\\.<@]\u000f߼]gF(rg\u0007WV<k\u0014Ym\"5SmM\u001al &\u0019k~A Kaʖ^\u001aacOز9壈)U\u001ed<Crxi\u001c@\u0001\u0016n#v1\u00079pW\u000bTl[sw\u001fe\u0005֏\n/f\f,j`Q\u0003z(PJ'\u0016y&@dnt\u001eSr!hE$\u001e1\u0013^>i˹r.[\u001eQ=q\u0006\u0010b9\u0019\u001cT#Ā\u0017\u0001ts=S%\u0015#\u001b/\u0002Fu\\r\fAD۪jWH.\u0004cdp#p,!;eI`h\u0014-z\u0001n^\n+.<?2{5y -\u0000{߅\u000f?:ٓ{d\u0007.\u0011\ru0g\\\u001d}|5'\u00076#\u000ev\u0002\u0007\u0000G7\u00181O]:cm\u001dGZ^Q7qDǭ\fM\fM\fM\fM\fM\fMi!XG\u0003YoC*?~x99S޸sw\u001dox3=\u0017\u001fx}9v\u0007q׾\u0005O+7\u001b};xz{g~w籊3gy>o7/}s/~]o,\u0000lOWG_o_y'~9hc΋}O⯾_W>4x'\u0002\u0017\u0017\u001f4\u0017>\u001e\u0001\u001fok/W\u0000oh\u0002^ۻ\u000bЋ8\u0014G4\u0017,C4YXﹶ??lIڐ~`ٛ<\b@FWn\\$\u0014~hwZ[b\u001fB%tc!,\u0019۽\u001d+wv533R%&F>3{rY#&!vLCArg\u000bu)͝N\u0017UyONz;Zxޚ;,κ0\u0006ap\u001bVsYeBWh糷t\u0005m\u001dg\f{{^\u0011<_/ۗ寸\u001fOv:8Ƌg)gFr0\u001eSRй\b9\u0006|4Se,\u0015X-4M\u0014TNR\u0019X\u0011qZң\\N\u0014ElAGRI;\u0011B\"EGvkkQ_Y3(7W\u001c\u0000]\\G\u001eqf:\tǤs&YM}3\u001c\fG4\u0011\u001dѬ\u0014[5[!\u0016@?\u000bcrb5SyO9\r\u001dy\u000e|t\u001b&o^\u001f\u0017gUk{wfۛg7>3~|¶z~\u001es\u0016\u0018J:ig\u0007D\u001a.Av(\b5Y#\u0012wk\"\\p\u0007ܸ\u0000.sgݢ\tw32c6ъ ,\u0006\u0011.\u000e͟pqw%upv z*m}CmeP\n\u0018u\u0007nӪӡZ@roAe]}n/\u000ep\u0000\u0011!b\u0018p\u0005e\u0004\u0012\u001d\u0017\u0000\u0016v`0\u0004\u0014\u0003\u0015R-\u001a\u001cq\u0017\u001d.y_y\u0005숺;E.\u0010@t\u0019]}R&2+\r\u000b\u001e\u0000\u001e*\u0018\u0002b\u0003Ob\u0018\u0016rBP\u0000f\u0007Q8w\u001bUrXXvw\u001dpSO|mV\u000eD\u001d~H\b\u0001.9u\bgJ°àSw&)A^\u0018ݶ\u0001ZUDw#\u0010\u001eF-m\r%\u0004O\bu*a\u0013.\n3|s\u0013$<\u000b\fMYlRr\u0014\u0004$ծwv`e\u0011\u0018\u0006ݨĨKP-\u000e%\u0010?InGiZuD\f++E\u001e\u0018\f\\%\fJ;S v\u00188\u0017\u001a}0t-\u0007\u0004;\f<\u000bUho)\u00065yL\u0002+1TX#\u0006@\u000b\u001c\u0007\u00153'R0i\u0018\u001a؂G+\u0019\u00125\u0006âS-2X-hSf\tHEwRh\u0017n,;0\tP2\t\u001e}iI\u0016]\u001a*6\u001eX\n,`Ѷ\u0017XteX\\'.^\\E}8QX\u001a7[h\bILW*m\b!@z34\u0007M>?TĹk@M\u0013\u001a>`zH\u0014\u000eDҩ\u0010\r\u0019,KG).ا\u0004m\bc֓CMyGַt\u00008` &V\n\u0006&֤\r\u000f\u0013\u001en}Hw?%:BىHg̓in]=`p]I\u000f\u001bjP\u0016֕\u001fdAefhuRV:ll[L\u00015\u0018ѮſCEʔvm\u001d^iO%FI\u0006aW#9Kܱcx#x\u0016Ǥ4_ܷX&\u0018{I\u001elh\"|`%&R\u001d\u0005\u0006s6kי`=9\u0016_D]\u001a#\fA\u0016\u00161\u000f\u000e9\u0005J\u0007խb\tUsWC\u0014F\u001f:kj%lQCuʏD2C23:)k5\u000f^\u0001\u0003<akKy\u0010)MRWoa%\u0001gqzj1Ӗ%\u0014Vdq\n\u0004&ʲd2\u0015%S4\t[\u001b4޷:%!r\u000eJK\u001b)TؐO<ԕsI]=rײՠ-v\u00065\u000fԭ*?\u0010\u0005t(\u0016-Il\u0018gxs\u0005F+r3\u0011[ToEކ\u001aAleiE3\u0010\u000ejA\u0016\u0015s\u0003sg\u0016峃yl\"nDj\u000b[\"J\u0015A\u0002K}v\u0012j&:C\b\f\rmBAp1Y\b$<\u0011\b\u0003\r\fۈ%ۑQ6Qan\u0011\t\u001aa\u0016#\r\u001e&9V\u0006Hf)M\u0016LC-X\u0007(Lb\u0018B\u0010*\fzbq.\u0000\u0002mr\ruY)&-\u0004ޘb9\u0000hU*\u0018}X0\u0001[-\t(&\u001b33Z\u0001a1L#,\u0004\u0018\u0002\u001a$1(\u000e\u0004\u0002j\u0006F\u0006l \u0002v 5@W\n!Zl%!\u000e\u0004EUZQp\n!0%acġ(`:\u0004B\u0006\u0019'b\u001e\nVSj17B\u0019\t\u001bfLB\btLe\u0018FV5\u001e\u0004|\u0001\u001d\b\u0003I+s\b\u0002\"\u0000!\t\u001b-O,(2f\u0000C\\\u0014{\\8?\u0000d)7~\u0014H\u000eM\u0013c\u001d0\nz!n\u0018\u0015A?1\nDY/O\u001d\u0006'Lմ\u0006+0\u0004b˳\r\n\u0016\u0017\u0015(`2АdJ\"\u000bLdf\u0010\u00141r\u0007\u0012,H5G@CЖ\u001e0/\u0003.\t8\u0010AauŸHOp\rQ\t-%+\u000b\u000451\u0002u\u000eo~0\u0010\n0;.\u000eV\u0000͙P\u0016\toP@0;\u0013Q+Xc\u0007\bc\u0004kY\u0019m\u0006@\u0012*\u0014c^\u001d\u0007P\u0019U1YEՋ5\\.;%\u0016`ph\u0002*м\u0014ױ36\u001ef}\\[畸\u001c\u0006՛\u0019\\\u0007#sv@/Ř8/eQ&#-\u0011\bA\u0017k=e\u001f(S\u0010n4.{wa}L*\t<6:(s\u0001\u000fA\u0015\\\u0011?\u0007w[0\u0003#\u001e\u0018\u0007F|hF\f\u001b奺\u0001):\tSԙD\u001c 6\u0007\t{9\bv%kh[D\u001a$\u0006\u001eѶ\u00065HA]\u0018tAH2\u001e^#x$\u0018h#x$#Q4\u001e>#x$#Q6\u001e^#x$#Q6\u001e^#Q6\u001eH2\u001eHGH2\u001eHGH2\u001eHGHGl<*/^a0\u001e\r{a2Yn=\u000bՍGH4\u001e#xTo0\u001e\rx`\u0003#>yF̊P(T/i;%(N*Μ\u0012\u0018}|dG\u0012[\u0010O|\u0012qI̋3</0i}Zj\u001e>\u0019\u0017{@Nq7=#o.i`>L\u001e)ߙ.}nTSIc2iax\u001d\u0003]?\u0016ڱ1l%xg0ʹ5k\tz\u001alvb1\u001b,xKb a칝F!sIx\u0002K)Z⁛-1Ӑu9^\u0016x,s\u001a[<\\3wy\u0019h龳gGz{SP\u0018@\u0007G4ݝ$\u0019h\u001a(;\u001d#Q\u000bS\u001c];\u0016\nvfL\u0005UdʅUwnx;\u0010Ȕq\u001e`3.]8-\u0014X9X5o\u0007\u0014vB\u001d;cXLwx'xffz\u0003ѳ}$#jw(.d̀8\u0015;l\u000b\\d&ZNhNصvz鄒ax\u001a8\u0012;B\u000e.zwc!\u001a;K*\"Kr>UR>39\u001d\u0016ؒSvv\u0017VyKsY^vr\u001cs˾95eq:\nҌ\u0010$ſPJN%Kc\\\t\u001a\u000f\u0011@\u0011x%L۩TjˌЎV07HO\u0015Q;:\u0012\u0005:aę'3ot\u001c\u0018UW\u00021!\u0007JF\u0019Zᗡkx%u(wyZJd@| \u001b֊6\n&S\u0015\u0004\u001e1\u0013\u0019&ҽ\u001f\u0010+mr5\u001b1Ĕd ة'fm\u0011dS#߶|T(Uo(\t}8\u001f0B\u001f޶P}x[i_lxGVjamIV\rP7%w]wegξ>s?uLnkʟ<w\u001d٨/ڣo{/;so\\\u0007M7kǷ_|ߍ\u001ex;|}Kz\u001f?]\u0017ݻy/<7\u0011~7\u001f}у?}\u001b~/<m;e\u0017>v~?u\u0016@?+|\u001b?x\\|Pm{}\u0017\u001fχ\u000eԆp\\{ռ\u0014ǐҐ쐙r,\u0018)cccfc\u0007p&\u0014KR\u001eF%jGX\u000b=\u0011{lLLL23])ޮT\u0012\u0014\u001a^bHZ\u0012Q7:VWPf.9QAq;[\u000bJI@42\u0013MV\u0002=2V7\"*-H«\tD\b\u0016JGĀC1\u0016J[X.\"\u0010 &\u0012cڠ­X\u0006 \u0007$)=i޷Juۤ\u00171\u0016\u0005=\u001d\u0011,,H3\u0014\u0006ꌟ\u0005\fM\u0000R\f:Ac\u001e\u0001бy,epr\u0001C\u0019\u000e.[8\u000fnxg\u001f߳\u0017E\u000f\u0003F>,8[_\t\u0003\\/6\u000b9p9f]RL/\u000ba\u0000׋!g˰-\u0011݈\u0017a&4a~x{\u001a\u0017\u0019t\u000e,\u001aB'8X\u001bmuUP\u0007#y33%nOSΐ\u0002)fQep}R\u000en-'ITw<^\t-Z'\u001f#һ\u0014jڐӷmȔku壱#J1qȭo\u000fǒ\t\u000b1g\\_~K\u001e\u001d>-UɂV'jJҪ\u000eSm\u001dE=j0\u001cY3G:ֵZW*[ϲUͫm\u001aV[fzgt;y]wy7\u001ags\u0007\u001ex?{{bݯ}\u0019h?{¹_w>t+?7Dxq=o~'^\u0017/_}18w۟x|k\u000fg\u001fo,\u001bw^dO_z]<\u001fl:Kw_}so?ү]yhڗ/\u001bE4\u0003>?wx+ŷ=o}?<<\u001a@\u001f_~\u0017\u0007~O\u0017\u0017?7;|7篸xoyz]aڻn\u0014z̝\u0018|tǌwg\u0012rlvt<cdM{h},\ny|jС{c݈۱]\u0014[]iA\u000e\u0000\u00131\u0018]CqR\t.)SL``u\u001b*P`eaDvYRXL\u0014ƬU\u0014\\@ZA\u0018nC90\u0001Lp`iP\u000e[z2\u001e\u000bN8\u0006\u000fǰ\u001d%̬M/r\u001b3<Sϲ\\F\u000b\u001b(Zvo+Z?xɮ\u0007.tn˯&Bmdk_>l\u001eu{v8f8\b+JF9˓g\t'2\r|\u0011?\u0016dҠ\u0003Yi~\u0002;&\bmD\u0007\u000e=pCC\u001b[\tDO\u0015\u000e\u0006>7𹾚hQ/1'O\u0013uK\u0006\u0007\u000b\u0019\u0015BQ\u0002\u0003\bS\u001aJ V\fcTjc4>?,i+Xb\u00137ػx\"d M\f\u0018\u0014hYR%-9\u0018F1\u0004T\u0000Z\u0019hQ6\u000ea(tAV\r\t6\n[͘ՋkҼ_wg=;\u001e'.y\u001eJG\u0003IR1g1̄\u001b%f%ԡFۯy\u0007o=fI\u001a5*\u001aC\u001b\u001e|kTz\u0018\u001az23zs[\u0011OP#\\Z\u0003\u0016Q\u001eZa\u0010\u0013`C\u0005mu.\u0011\r7\u0018r\u0014c\u0002QF9\u0001wme& \u000e:>\u0013E\u001dԓGӏ$\u0003&B5;X%-\u001f\u001e_`)\bN\t\u0004M`HX܁ Cp\n\u0007\u0011B\u000bk\u0000\bK\u001e6\u00131\u0002z #0?T\u0000ejk\u0003\bBaTH\u0005@0\r2w.\u0002.\u0002\u001ePj\u0002|p\u001e\u001agt@\u0010}\u001f!]?&\u0001\u0015h\u001f6' Uu3\u000f_\u0003Q\u0000d;\u000e \\)LwаASZ\u0014ܠ=\u0001[~w\u0001H{$pB\u0005a\\d\u0000x\u0002+4>\r@a[\u0011]\u0011?\u000e\u0010j'\u0004̮GW\n\u0005yXONVInވpbG.\u0001]\u001dRI0wDte6\u0012\b^;_a\u0004n^_\u000e-\u0002a\u0016\u001d&dDhՈ ;2\\MWzIդ^mHIH\"2X&\"D$vF#Qug\u001e8[<\u0012 \u001bE=n\u0002\tf\u00075\fE\u0012P\u001b\tg\"ͮ\u0010PP\u0013XV3\u0010\b׌DI[Au䙚\u0018\u001c\u0011Fp\u0014(#\u0014aR\u0005\bg2@rUu-GfA?\u0000t\u0005!v;\u0000\u0000\u0015\u001a\u00030C@F-{Z\u0011W{HNN^\u0013bIOD_2FL\u0006:\u0015Ĺ\u0019K%z2*F5EdE\tX:_\u0002zyRN\u0012\u0010A\u000bri\tK\u0019-\"\tD\u0012\u000e(/>>)7xO\u0015bcl\u0005\u000b\ni\u0002t\t\u0004m\u0000\u0016\u001c\b8\\\u0016J'JUuЂ?G\u0005U0\r\"SwIk3\"CxN\u0006\n>6cA*1b\u0006+\be\u0006S튀!uk邠a@\u001aa5T\u0003 ʟ7.\u0003E,\u0006]\u0016-V\ne\u00150\u0012I\bx\u000eY\u0001R: _ 8e\u0006kXhiEv\u0004v\u0004؀W `aq1G\u0019iU`.\u0012\u0001chLwEQ\u0005aB0SagJ\u0004-\u0004|e?\u0013 [6`g\u00021R5\tdC9fD\u0003r\u0002ő\u0011+2 _!\u0000\u0003F\b#_Q˰ab\u000eH_^U5썺\u001f/}h\u000f~ps{#O~=g\r\u0007\u000f`Qp\b(\ni0\u0016x\u0003&-\u0013\u00024n ${Q+U\u0011c>e\f\u0007-Yk\u001c(*ng\u000fj\u0011\f\u00064\u000br-Z+\u0005V\u0005AR\u0002(q\n(&Z΂K\u001f\u0017,PX Nv8\u000f\u0019uxV\u0007uO5QE\"W>\u001aAcn'J\u0014|Ps&Kt(l+[ߖ1\tW|\u0010\u001cTX\\\u0004W>\u000bA+i/֯|4\u0010i\u0006dS[\u001aD,52WQʇ\u0016\f\u0003W>++D@\u0000\r\u001b#lE@@3\u0003Õ\u000f\n\u0002hV|E\u001dTmp7\f\u001c:o0\b\u0019W\u0004ƨPW\t^<T\t8\u001cqUi\u0001DYiܚ트Z H[\u0002$\u0013ي\u0012t\u001aV@,H\n@\u0006J\u000248T\"\u000bA\u000eק(\u0003Ui\u00010`ꝫ(h\u0001\nsV \u0017\r4}\u001cf\u0005\u001eJ\u001a\u0002\u001c\u0018\u0016\u0000\u000fN\u000b\u0017a[\u0019Q\u000b惈t2P5/\bEڨ\u0000:\u0003#h*-3\u0014u+(\u0001\u001aJ֓Rj\n\u000bу\n(q$|[\u0004[\u0004C`\"K\u001b\u0012\u0011\u000b\f\u000bL\u0003FkFPޓ`\tPF+L\f%R߳\u0004򥘎'`,4T\u0004;{S^^\u00004}aό/\u0010V\u0001#\u001f}Jv--CZbP`&\u0016@\u001a\u001e\rX\u000f\u0002S\f\u0005%@tA=\bp\u000b߼0 QXط\u000bP@B^.<b՞\u001dA;\"_h.KbbԎ\u001d\u00145XoV  ;n?]F\u0000\u0005s\u000f(g&\u0011^E\u00046(*L/͘ޢ%\u001eT\u0015\u0019<4h;\u001cMq4TWCE4\u0016i\u000bP؛\n\u0004\u0014\u0003\r;0@\u001c\u000f\u001a\u001cfh\u0013Wzyi9~\u0011\u0007\u00070\"\bl?\u0010nj0*2P=>H;,\u000f(\u0019r\u001cu\tT\u0007*G`\u0004\u0015[BigYfq]^8([3\tprɌ̴^qɬtC\u001b@Kk@h[䀰bzպ2;لSF2Zf \u0003+K҈\f\u0018\u001a\u000e4'\t4' gA\rviCˀ\u0007~7\u0011\u000e<\u0010\u0001R/\u001b( tPcb\"*\u0003F`<n~:O4OQ]*\u0007\u001alo\u0017\rcӠ'&cG[G@\"TA@Z\u00134' ^\u00059\u0001i\u001c\u0001i\u001c\u0001ilN@BiI@\"HY@\"TA@\u001a[\u0014\u0011V\u0011\bU\u0010V\u0016\u0005dJb\u0001K\u0002\u0012J\u0002\u0012@J\u0002Ҋ>\u0002>\u0002Ҙ4&' 3䦫9\u000bHr\u00022/\u0005dE$/2\u0002꜀6K\u0002<s[w5\u0001y\u0017+\nHK\nHcr\u0002Ҙ4( \tȘ\u0002:\u00022\u0012V\u0004dvT\u0016oV#ദ$ O\u0004tP\u0005\u001d/\b\"\u0015|D\u0004R\bLA(\u0005( 0\u001dHQ`:\u0002\u0013A\n\u0002!Y\u0014tP\u0005&\u0014\u0004f\u000f*\u0004f.\bL*\bL\u0004)\bLA(qD\u0002S\u0012AR#7]QV`\u0002g\u0004&\bP\n\"\u0015EW`b\u0005czJ\u0002\u0018&r\u0006:#0\bj6\u0002&\u0002st+p\fS\u0011-\nh\u000b\u0016մ\u0004fʂ-0󣺬d\u0019\tcGn^8تwvtu:]E\u001f\u0014Ϙw'3u|FJ㻌׌\\kb6\u001dʻ-?U\t'T%xFJƕSˑ7Suّ;pƌVii~\u001fEv~\u0013U6ὌkKުɒT\u0003JIIfӒCVrǌﲪO\u001b17\u0002\u0016í1vު\fx!Bln\fDxyRR(\\K^ל kdNs1tC\u0013О+i\u000f={)\u0002/8+>Kχ&+qt݁r75`a\b6 QXOHQ=C\u0019\u0007\u0003LRA\u0001mT\u000f\u0019,0AKPs \n\u0004%dmI\u0011\r\u0018F\u0018\u0006o\bvK\u00140,t\bAH&\b% b\u000eBuS\u000e!1\u0007\u001am\u0010\"t?H0mIgA\u001ely-[0T*\u0001\u00019\u0005TPJP\u0011JdB\u0016\u0006NfAoKvl2&ey\\Qt\u0002Y̹-a|\u0002$ly/{\u001em\tX\u0018\u0011S D`\n\u0006`\u0017,:)c\u0017\u00101Eբ\u001cTa.n\u0015`/y\t}x/cE\u0000%@ށv/8zXI\f\u000el%A\u001fGwY\u001c\u0006r'Ak\u001c\u0003\u0010|aA!w9\\\u001ds@\u0000C\fp\u0015\b[\f@hY؄PgFdK\u001a\u000b60xE\b^\u0006AupbM{a~Sir^'P]8^cHBn\t \u0006\t\u0001ޡ\n7\u0014l1;0jkQEf\u0010P\u0004\u0005\u0016\u0010Lnh\b<\tɍ'\u001b4\t8t9\t\tי]$qϺ~md:u᎙\u0014#,/\u0015\u0001T04\u0004D<\bt6\u0016D\fz\"\u0005suЩ.\u0010b\f(\b\\0 \u0012\u0017&.S:Ҕ[\u0011 Y\u0000\u0006i\u001d\bZWIn$\u0001;j52xiʦPl+_\u0011z\u0007\u0012tB\u0011YJvcg&\f%^Ej\u000e\f7\u0018\u00113͠\u0005TZRE\u000b8\r]V\u0015u:n'pAx\u001dd\u0006\\\u0002\"O5@$5\u001bߠ7Y L\nw\u000fyEI\"\u001a\\ZWo\u00167UK[\u0012~/\u001aA7A\u0001\u0019.qٶ~\u001aQoWHG=^+u[(#2Ń\u000eXoAi*\u0015RTebawGCk)k\u001f]\u00185\rl9H%EQezU1XJŤg\u000b΢ޒ/\u000e2bCa3sZoW*PRqK\u0015L\u0003QĶ\rNV\u001a#q\t\u00117(\u000fۡZQ,6\u0015\u001d\u0015d\u000ey2\u0015fx\u0016J{t\u0005gɰ(\u001fcDp\u0012vl]&\u001dg\u0007IMԬ`\u0006~\fvP}ΣᔭE\u0011Z3-5+ₓ&FNdf\u0018?3fRmb\u0002$7vQ*y\u001aDSMRẾ\u001a4%4i`4f42:Wͨ\u001b%\u001au>2K-n{h\u000e*꣱\u0005/O}H\\Kb\u0019-^f\u0014\u0005\u0014&ży3\u0011v`nW\"yկ%5be\u0010UqCt\u001cL\nR$;\u0002iM\\B1ߪJFp*qu\u00125s\"\u0010o>\u001c,5\u0015|l!Ydx\\YjHXc+ia\u00177\u000bv\u0001h\u000fx\u000fc3\u000eWd_ů\u0015.EKl{\u0007c\tI40[{R\u0004%\u0003\u0014\u0017+-y(<נfBI1YJ&C\u001d'sw-̎\u001cfƋ;9x\u0007?ʅ;#ěsVqƪ?8\u0015V/\tgl\u001b\u0015\u0016h[VTg EX\u0006ct:wlh<.\u001d:_Jy#1:\u001a2`ndF3s\u001d\u001a?Շ{T{_K]^$FSx\u0002$1\u00054v\rnXՒ\u00120̡ 棰¶DnGVW/\u0016\u001bp2uJbzyF\f]]iSXKg2dfҽZ\u0016\u0012L\u0018sfS.\\VE\t/3&(2Q\u0000wTXAEvoNVc}lAr>UBY/:iXAW]Yi\u0018MLZ$\u0014y\u001fRbMV\u000fb=fA#D\u0011\u00054UA.*n~\u000eׇlXa\u0017דTo0\u000f~&VDF\u000flk{\u0011>7tmoX\u0000[\u0012\u00187^Kax\u001af:}>\nV\u000e<\u0011f:TBѽx)bN霔ؔkAg/1~dk[ׯݜ]}u3\u001b\u0003f|\u0007)(Ň^xnkߜ^۝!\u000f]ͷF͓}l'M\u001fcQ\u0002\u0015\u001c|o<\u0014PU7\u0006̓\u001bצ7gUnwC\u0015FLbyB^\u001b\u000fIJ\"\u0014\u0005\"`>픡It,\u001a\u0013b\\OЦDF뮰j]%\u0007\u0010\u001f:\u0019\u0003~$_y\u00181\u0014)`625\u0015ݷʜcs\u000e3Hj vCPO?3-)\u001d,\u001e}|<Ď8\u001d<Hp\u0007oT֬\u001a\u0003b\u0004E\u0019g\u001fz\u0018N?}\tvL,?:FA|\u0006[\u0003}$NYH\u0018cT<\u0003^<\t?!Y\u0016CY%\u0013k^{\u001aWt\u0004Oͦ7+ \u0013n\\ݛ\u001fZ\u0016*ﹶQ/Gf{\rޅ\u0006Vg8Mlf\u0013ȮY4`^\u0001B/\u0019o(\u0019=1ŏ\u0005\bВ&\u0015\t|Dq\u001f*S\u001cګJ4ȕ.\u001ctA\u0004<7\n2Ƒ\\),\u0012,nu`ypH\u0005[`\u001c$F/ud|dO:ކFBW=jz\u00161=O$\\An\u001dbSup\u001dV\t}lten[\u0001)1|KgघЕ\u0014#\bTR(v\f\u0007\u001c0tt%АsZ#\fǋv\u0006I/B'^lMJkZ,}B\u0017\u0005g\u0017<\u000f|Y\u0010v\bW\u001c'\u0012#8\u001b\u0016r\u0019ib\u0014#ߔC=Hw\u001d\\\bL\u0002j\u0013\u001aZ\u0012\fj\\a\u000bȕkQO\u0015\u0001B&\\À͎LP1E{z5\u0018?q\u000613\n\u0003\u0018JV//攒x\tXb̀a;0\u0012\u0004({=`ݥf\\\u0019\n+aTx0\u0000\u0014Rd\u001a\u000bYk17!RETNE/#\u0018\u001c7ߺq\u0003x\rcm8L\u001c\u0000ǯR\u0007fDY\u0001SF\u0006nb\u0002\u0000QX1\nR0\u0000q%'d6j\u0004\u001f&8硥e\u0015\u001f\u001e^\u0003p\u0003\u000eB- !\u0013>Vdi\u0004a:\u000fx\u0016\u0005a[\u0019,\u001aWnp\f\u000eN\u0006v\r\u00125l8:MUis\u000e`A\f\u0006\"\nR\b \u0014JJPi\u0012x^%9ωU\u000fj9I8>'=l˹Ĳ'5}=sbZ\"\u0011\u001d\u0014+i-\u001a$v3=Pf϶&»,Q:FK|\u0012z\u000bG}+GrQ:֣#\u001fNǽ+e7uJ\nweY\u001dI#np0s\u0003g?R,͏\u0013O\u0005ˏW^~xڇ׫\buO1W\u001f^\"=Eݱ\u001d^\u0010vE^_+??˅ϟ\"Ο{\b\u0010\tw\u0002 2'ԪQZ=\u0005\u000b-2{B-ktZ\u0012V\"kjU[ձPS6\fɵ\nC8`\u0019 ՂQ!%7 G@\u0014o\u0011uO`6\bZ;V\u001147B8\u0000A)\u000b[+p`iL\fsJ'gjVr\u0004M1A\u0013\f\fհꔅQ0mPLq;箑\u0019T\u0004^\u0007\\TF\u0015f'2\u0004uZt<#hLyO8taay+\u0016\u0016\t\u0000\u0011@n\u0018z8^mk\u000f5_ywk^\u000e;E'jΉ*N}\"ȯ'<{\"Ngމl\u0017\u001dg4{F\u0007:GԂG\u0019=(фN:u\u00138r_6tbGԈ#[F\u001ef&`}q`\u0006;P֧\rI8>T7=\u001aL}`\u001e!\u001d%L)kiț\u0005'x/_o\u0011\u0018,m\u0004\u0018f8_a\u000f۔%vǳ>\u0003Վm|\u0015\u0011?2)#UXȼ ;#(\u001b{?ov=o7\u000bq.\tc;o/p~+\"{9\u001dY<\u0016f0۹`_6}dMm]NkRb^JdqmWmk۲=\u001b\u0014ŋ`\u001a\u0013\u0002V\t˙2Xή\u0014Ʒwnov\u001d^jfx%3L(fF\u001ā,\u001333~9ng!-\u0019zM\u0014\u0010d\u001ch10\u001b9DІ|\u0012Y4\u0014Ȁ\t<f\u000b]xsm \u0007\u000f\u000f8\u0004\u0005\u001b3\u0007@h>mI4\u001cy}2\u0007ާc\u001d\u001b*\nG}ʑ\u001eitG˪\u001d||ǭr<O3jȩ=^\"?Ψ\"\u00132rjOרĉ\u001a\u0015;^R2x\u001f$e\u0002?B%ޫ\u0007wggLyr<\fąP\u0013\u001f}=2z\u0003\u0017b@0\u0019+j\u0011\u0001\u0014\u0005>=\u0019qx\u0019x!FNf\u0000\u000e\u000f:\u00040;F\fDυO]:ƪWTUjWm^𐵥uµ\u00169T8T8Tا\u001cn\t\u0006{:V⪖Uѭ3g6ߙ3\u0017\u001b9{λsg_qλ\u0007{\u000f\u001f{3\u001bw}o|a\u0016\u000f?~\u001dw_|Ow\u001f%w߱?z͏]|ۣ/K_\u0017ocqmy[\u001e~_o?p\u001fF\u001bͿ_Ͼcۼn{\u001fz;c\u000f{\u0016^m{\u001f\u000f_y\u001fw\u000f\u00066:o~\u0003{?x\u001d6q\u0003zů_qck_\u0007r^ov^o \u001d\n_-hk>\u000b`4\u0016ᢑ_0_fy\u0001m,t{\\C\u001b4\u0000T[\u000fۋj;!ݶʍC`Smi\u001eڙ5b,x:\u000e\u001a\b%f7qL.=7}f&X\"/]\t[K\u001f>\u0017>U%>Szg<ۧv,wf}\u000e-jkS.蔦r2PHM\tf¥6J`\u000eqkH\b5Qx?@=#W_.|ģ/\\2S\r\u00147So\"\nU\u000e>G]D\u001cÿ[SݩEλn0(\b|ü`1\\).$P\f\u0003rE|L\b\u001dr+1\u0013\u0011\u0012i\u0003r߻L~pGk(ż\\M\u0010\b3Ӹ\u00024 \u0005QJi]\u000f+ejxW\u001ey-L \u0010\u0001Ck),\u0005\u001a\u0014\u0000<g`\u0014l]\u0013\u00130#?^\n\u0017Zag-\u0005\u0007&\t\u001eV܎\u00076\u001f~Bs\u001e\b\u0007&5XU^c+d\fؘe\u0014XYF\u0019\u0003kO9\u0013<rp*bZ\u0002\u000b؋q3V9E0ݘFKO߼>\u0017g͡E}bw}gyn_y~v3g/l{SKgMK\u0011ʢ{\u0006Xf\u0016\u001b`\u0001vjXʵͫs\u0015\u001eV:\n\n\nTx-`\u000fYgժ]\\R=5\u0018`\u0007\u0003`M\rrjw؞cl,v\u0018OTqg1%Łvyt\u0006\u0018^a5Xv\u001f`]U\r\u0006zvp~/h*T]\rF\u001ay,y<V3F\u0016ҬV^\u0003\u001202\u001edfm36J<c hv#2󜓯{\u001eW5tߓ'NDfddddFfı5]m89\"|iؑ^#!\u0007\u001e-\u0007\u0000-z=\u0001\u000bq|+vqp`\u0015]vO?dx3D;\u001d\"\u000eVoFM߀%R\u0000d\u0017G\u0002+\u0001L\u0016A/\u0010>!Y\u0005o0l8F\r\u0012b|\u0003#ܤx\u0012O$c\u0006(P\u000b\u0010\u0002dMSa\b8\\\u0015\bQm؏\u0012'WhC-r\u0019j\u000bl2\u001eH\u0010\u0002,\u000e\u0013#TiQ\u0000[#\bJ\u0000\u0011`,¡\u001d!\thU\u000b\f!\bld,76\rs\u0018T;\u0018h[%\r\u000e\u001bix\u001b^,Z:\u00148Ąʀr\u0018\u0002\u000fG37\u0000O\f]Y#@`:\u000b̵tÓg\u001aUJ\u0004\u0019!Pb\b\u0010\":jh\u001f\fDTT.\b4\u0017\u0002\u0005:qבʃZC\u0015=܁͈e cLr\u0019\u0004;\u0015m{j`\u0015*i\u0005\f\u0006&1A3h\u0002\r{\u0002l\u001f''o͌_m1@\u001dUx\u0005-p\u000e\u001a\u001aT\u0019C'2\u001cW\u0006AL9\u0006\u0015;D8W\u0019w1ؕ,#\u0019/\u0000\u00172 \u0011s\r]lF7\u00171drE39Y'\f3\u000f\f9\b#\u0002/1i1!#L\u0012`\u000b|0\u0017Qa y\u0003\u001ah7e\u0004_/&\u0001\u0006M*P\bP0'{m\u0003Tf!JJ=I0֠(\bb\u00030ȗ\u000b$z}ٗ5I\u0006nm\u0013\"<#\u0012n\u0011\u0004[sF8#\u0011APgYŶ\u001d~TЎGuƿ\u0011͚}/w喾\\Nɱ=fV/ŉ<YOdI\u000e(\u0014\u001dޕ/wMdO\u000eR\u001cs\\\u001fHt-,/W4\u001br]rv\u001df;P\n\u001a\u001e|<E\u001dƗWA\u000e~ר-|\u0014LYjaUpD\u001f2$\u001a\u0017\u0018\\h?n\bv\u0004E\u0006j\u00169cm5\u0006q\u0006Rn'x1u\u0018`%\u0010j|8ØZe\u0014t\u0002\u0016IQ\u0003\u0000S--nJ(T\u0000Y2\u00006\u001e+\u0002P1\u0017(E\u0011)[\u0000=\u0005.^L\u0013˫hJ\u0018x\f\f\u000b,`p͵e5\b\u0016v0<\u000fa\u0010r\u00018qRҲW0\u0015\u00031W\u0018K\b؊BU-\u0005\u00113ʖ2\u0018m'/\u001dןx.=W\u0006\u0018\u0001cMC/q\f\u0015\b3\n<`0\u0018/g8>֮k\u001f>u\u0002ڠ X\u0013\u0017\u0002_cܦ:pkT@\u0017r\f\u001eGXY\u001a>BaW[lVJ{\u00051!]׳օN\u001fk\u0017}\\NƦ_VFR#\u001f\b\u0019F*R;\u0004F?}\u0004vUtz7z5!ugh'\u001aD5M8wJE\u0013l1\u0019pF8\u0006+B\u0011g\u0015vhQMB;\u001e\u0019F4kvM̮5QuGd4ҥX+\\\u001fY<\u001f\u001c[ztBzcoMfɥ (]Zqp䌲C\nC[^(L|t~\u0007?R3\u0015mA|Jw\u0003t|,037z`\u0000xcVx[\u0005\u0010JR!b\b^:\u0003&ʻ\n \u0013ۃ9ў^nazeFM\"\u0010\u0010p[ բCOݠ\u001d-Vf\u0015\"+p[->*\n99\u0010JjT5\u001bQ\u000b\u0004u8LZ]@f5(!DT|hx`\u0006魐C\u0015RvBVH\u0006)\\\rb|:c9,R\benVEK5wW\u0002cH\"%]:*+$s\u0014fQH\n\u0012D\u0004fD%4\u001b7cQ\u0003IW1\u0004GɈ[-\"\nX!\u001a\u0010\u001baJME!\u0015J\u0012nAj!\u001d7x^6/`\u001eS\u001a\u0003)j\u0003\u001c)\"\u0006^uNc1i,p\u0015<.`(\u0006hI$gZ\u001bKГo0el/^\u0015\u0014϶0\u0006-\u0001l;`E(9`\u0012o\u0004,CLJA$Rsݢ.\u0018\u0004k$߱|737\u001a\\UW\u0017dt!ʪEu\u001eW±\u0000n~!\u0000Â^\u0013\fй\u001ba~ta\bpAH*9Z;6<\u0001\"LNdD'2\u001b2/fmy{\u0016\u0004\t\fxMaf\u0003\u001az\u0018v\u0012O$iaY2Z\fge8+Y\u0019^2\u001cokbk;~e]S@ighoB?z>5I\u0006nm\u0013\"<#\u0012n\u0011\u0004[sF8#\u0011APgYŶ\u001d~TЎGuƿ\u0011͚|s>99YS!'٥ ,89ZZ\u001f\u001fS+Z\u0019srLZ\u001c%XZz^\u00035\u0011'p\u0005\u0019\rJZ\u000bTnv\u0004N}+J`lAp˨TF1-$,V\u0006;\u001d\u000bD}Jw\u0014suYTKJ>|e\u0005\r\u0016.]N\u0011Mj1-=TDӴg\u0018n\u0001F)A5&D\u0003Yalpm#=\u0014kWaf\u0019^\u0018Ƙc\nm\u0013f\u0016\u0004\u0002\rPE\u0016\n3s\u001a)\u000bOSH.7F|nV,7F&]\u001cLgx\rUpoaz1nf\u001fs\"\u0013=fivE\u000eQME;\u0012H[`5*3b+q9`q\bg$\u001fp\n8ضكm*1F,c\u0016\u0016+=q}\u000e}\u000fU#>&x\u001fWv_W\u0007w={]oy\u000f\u0015\u001d\u001f<W~W?|'\t{٫_/gk^2\u0007_|χS7_/}W?\u001f|\u0000?W/|_\u001fW׾O/}\u001bַ/O׆)??|\u0003^\u001f=K)3\u001f̿ʷ\u001cO\u001cޙ~ڈps5z*\u001eFSzO\u0000ĦOzEw;SF\u001c\u0003yp\u0014dҚ%9`\n>b'\u0007v\u001e=>\u0003\u000bj<Gl)\u000e\u000fJ@i\u0014k}t@\u000eݷ\u0001YXijgQxL|q?ˌe\u0018\u0014\\i\u0012ij>ãeK,0P\u0002Yh\u0016P\u0018G\n;Fr\t\u0006fvDK\u000e4U\"nHXWi2U9yUP\"E\u0005F5(h\u0017J\u000b0y\u000b<]\u000bQai]T\u0012^\u0010>E%ECP,:1.h-Y{0LvѲжLv20\f\u001caX\\Ot\u0011\u0003\u0013]tt9̔MBB*J`ny\u001djA5L\r#D$\bFq\u0018s\u0011\u0012pN3SܡjL\u0000};}3nP)\n8\u0011 k/V]Fs7'EƲ13OXŜRIY6fVL@% @9\n/г`LQ\"`@1G\tjKM6Tr*~i2+5L%RmV:Z6הkV7J4㤢Vs*\tv?ly\u0010\u0018)\tk\"%Ӡ/Pw?TjT\u000ff!\u001ag6y\u001cpb3\n37UF '\u0014Ț$6\t\u001b9\u0001P!`\u0014\u0002\u0013`g\tL\u001f-гĉ\u0017wܾ}gA;\u0012H[`5*3b+q9`q\bg$\u001fp\n8ضكm*1F,c6g;;&\u001c\u001dqO\u0018Y\nyDf}`'\n=u\u0013}hMAO\u0001Kqx\f(2C}`=>0?}B6cQٜ/~\u0004ϲ\u00047;ܘO\u001d|G\u001d04\b;\u0006F\r\u0012ݻgt\u0016Ω<+8\u001aJ\u001deVK2Cl5癒+ޛ_\u0007B) j9*h4P\u0013\u0013%\u0015\b\u000f\u0013jγյLeʮtX\u0007\nj9\nrUL9Юs\u000f\u001dyM\u0016a?\u0016Ij{\u001b\u001dX\u001d\u001b\u0005}ֱ-`%\u0018M8z\u001a\fYj*u켔b%9JڱRc5XI\u0014VSc5XVQ;N;\u0006Zcu\n^i\\\u0004r^6CT#n\u0007ت8ψĹ\bw-9#\u0011ޓ\b,\u0007+3b\u001ag\u000fhǠ\u001av*i\"]\u0004`\u001a\u000b$x)\u0003)r-\u000e\u000e.\u0002)\u000f\u0014?6jIh)\u000erm\f_\u001e%8:8<f+0=3S\u0013Q=0\u001d\u000bYx\bUtSͮ\u0015*7TNN0f{f\u0007SBݛz\f@i\u00022M6Ks+\u000b\u0002\u000f@\"\u0001O xP\u0001gA5AY\f$A`\u0014\u00024y\u0001!:e\u0011]ʕ4\u0013\u0019i\u0006Y\\l\u0000k֮@\u000b\u0012m)4dAKZy\nM\u0017`W-\rYj\u0001ߓgኟ\u000b\u001eS\"P:L.z\tA+\\iH#GV\fZV2(('\u0010\"{B\u001d:N\t,%YJX&\u0004D\u0002YlO\u000e6O±\u001fv\u001e*\u0013]v\n.S}v-J~1\u0013:F\r=\u0019Sx:\u0005yM\n\u0019jvNSfT\u0012ޜ$XRSy{'a`ʨٽ$0vOfCIrԬJ7@775,F|-$P󷇦OkrDpY\u0003\u001apր\u0006\u0013\r8\b\u001dvy4g\u0017+Rs*NB5vklp\u0016\u00198wp'b3\u0019p\fW\u000ew=#*v<3h֜\nlN\u00056\u0002+O\u001c)\rk:v$lQ\u00187w鑑'X\u001e]\u0002S\u0007k)!]\u001e\u001d\u0018\u0014kƗH\u001d,`m9ܦ5Jb\u0000%ܝRԠAPň$p\u0005P\"am(\u0017\u0000cҸ\u001e\nB\u0018ŵ7E\u001f\u001d|\u000ez\u0018RR\u001cY9Nɳd%s\u0018J4Pa\\gs\u0012M(A=V@Ӵgzfqpj4Wi7!0`\u0013>Q@Wb&\\sAT\f\u00054gJ'\u0006\f#Hx\u0005ԧ\u0016k?M\u0016\"\u0018&f%\u0018r\u0013\u0012X\u000ej&\u0018f\u0012ًj_{Q[j\u00106-3b+q\u0016N8g3\u0019\u0018\u001c\n\u0005{FUlۡG5\txTg\u001bѬy/jދʽck/]\u0003f\u0003{T\u001b{B\u00113W*JzxH\u0007,\tK#Z\u001e\u001f\u001c\u001c#uLt}o9afu%yI5VX-S\u0018\t\\\n4Xج|9UE-=li\u0018S\u000b%!xE\u0001\u0018)0Uݐ%\f\u001eGJq^)2G\u0000Pz\u001cQh3G\u0014$,aVsq?\u0011\u0006@?cD\u000b1cDC7G\u0018\u0017-\u00037\b\u0003\u0018џ-el\u0011-r\"9\u001847SD\fP\u0014ѩ\b&5Y\u000e\b\u0000e\"`1>.G0J\u0019%D\u0018\nƍ\u0006\bډ1I'G\u0018\u0016\u0013\u0001b$A`W\u0018Ӡ\u0004\rjG\u0011l(]\u001cO:iS$\u0014\u001b3b\u0013J21db\u0004jµ\u000b\u0002@6\u000fOa(\fpʡ\fy<*Xm\u001aJ\u0018&J\u0012OEM\u0012#f\u0002\u001a1\u001dUR\u0018ׄTIaT\u0014F5)UR\u0018զJ\nsRALM\u0014FM%@\u0016\u00048\u0004\u00018M8RKa\u001aInd\u000fO%6y\u0014pb\"1}\u00006\u0016LD\u0000\u0005\u001a\u000bK\u000bR0b0\u001cx1^%\u0012DR\u0019haa\u00141aWC\fX\u0005\u0006ݥx\u0017z|75I\u0006nm\u0013\"<#\u0012n\u0011\u0004[sF8#\u0011APgYŶ\u001d~TЎGuƿ\u0011͚}óox\rW\"w\u001e\u0013},@\u001a嚈\u0011X\u001c\u000bX\u001eazptd\u000e]Z͏B\u001d,r}1?\u0007;7,d\u001b\u0016\"\fk2ӰZ&0ݔhxm~\u0017)\u001e~wTo8\u0005\u0017}=S\r-0\u000b\u00184^\u000ff\u0001+<5.Ko\u001bd`\u00160fW7\r\u0004OwS@ԲUdb8?\rn;],`Ek#6\u0005 WŔ\u0003C\u0016N\u00026\"\u000b؝V>QXFY\u0016)ƨK2l¬\u000b\u001b2'\u000bC;8]XMwV҅\u000b;'YI\u0017v^\u001a.C+\tjZ.Gk*t찳`\u000f҅50\u001fX#@ΗĆvj\u00106-3b+q\u0016N8g3\u0019\u0018\u001c\n\u0005{FUlۡG5\txTg\u001bѬ\u00110;\u0002fG@\b\u0010:F,\u0010Sx\t\\\u001d#r(\u000eNho\u0010#q}`͉\\ZR\u001cKD)Re5'K\u001e\u0001\u0013\u00163<\u0011\u0005kUZ/_hT~\u0017R8by-퓙؄4TM\u0012?x\u0012U\u0014JzS/\u0004~Eqjw.$ח4\u0017'C\u0019Jw;O#3%L\u0006Y\u0000l\u001adA+\u0010\"AJMI\u0011[<{I-^0\u0002\u0017\fJ8^\u001eZ={IVRZ%b)W\"H梅ދ!f*\u0006X-\u0017%\u001a=EyO$\u0019\u0007YίjrLHV#W 6+z_]6Boc$WdVcfmj]Id5f\"9Pw$\u00079!#\u0019fdGvӂL$L($9/ILwi*Q%-5s\u0016g\u0006Rפ18\u001bjufR~f(U\u0012㜗$Ɖ\\ٽƩY'8d4\"$:\u00115*qvo:MQ`&5\tgMgpQ:|[~?ӄ[\u0017K&}!M\u0007\u0005\u001eo\u001bn,ؓ7#F82\u000b\u001cCb'D#4YL+BvK܅:\u000fBUrG$wO:oB1ʹ\u0016Z\u001c۴U=.\u00068?rUB\u0017Lkz\b P\u001cO 4\u0019Io*3z\u000ew\u0003ሟ;@\u0005\u0007^Ы_\u0007~\r|k_\u001f(\u000f>G~TjcoG^`z^\u0010 ~ߏџ|?>8X̳Ic\u0017Ct zMo}gc\u001f_~gOy\u001eyU\u0004\u0004 oX>\u001bg3\u001b/Оu3,/~3/}O\u0007X>\u001c\u0007_s\u0017~k_ş|7o\u001e\u001eo׿[_/\u001e^r\u0007Cg~K\u001d헾OO7<ͫ'O??\u0016\u0001~מek?w \bׅc_oX\u001eͿCC;*c|+\u0015zҏ>\f\u000ev_';ވ\u00153l\u0007Oǿ=^/Ǐ\u000f>\u0015{+_o7C\u001bO>ӟW;g#OG\u0018\u0019\u001b#d~\u00193\u0006GQ:an`\u0003:O\u0015#LHJ\u0014.\u000fGz\u000f\u000f\u000eN4SO\u0015#\u0004QKyR\u001c\u0002JOR#)>SbB\u000b\"\bL\u0011U\u001bf\f6\u0003J\u001c~qK\u0018\u0005\u0015VZ&\r·\u0014?vl8俋\u0001F\u000f\u001aCb4*\u0017j\u0016TYL\u001f\rG_ǒ\u0019M\\VL[KL\u001c2B5Ix\u0019\u001bR\u0001\u0007\u0017{\n\u001cE$)MҴAL\u0006!xɇN11tavn<\u0010*x\u000fw4uT\bDhc\u00192|xf\u000ey\u001f\u0015\u0017*Q3\\\u0005hN6\u0014\u0003U\u001cњ\u000bYiK^0<J@\u0014\u001cAJ\u0010X\u001d\"tP\u0010\n\u0003\u001fQC\u0015')Aft\nE-l($gHM\u0006\u0005\u0015\u0005c/<,CXKP\u0005,\u0006ۆ\u0014G\u0017P45LP\u000e\n\"\u0014mX|Pgh\u001e@\u0002G/]D\u001ah\u0004\u000etm\u000e%\u0003v]\u001bTSMЌJ,b\u0019\u0001\u0019\u0004+h)\u000f1i\u001a\u0011\u0015W>~\u0005.\u0019\u0013QH\t(\u0004vʡ*a\u0011PL\u0006$\u000fz2\b)R\u0018A7b@1G\u0002\bG\fB<ZqJ;\u0007$\u001b\u001a\u001d\u0010\u0010EZcN\u0011j1Az:T\u0017c=\u00017p6X;()@\t\u0003[M\u000ea\u0006\u0001!H\\%z\u0012״a7-v\u0016\u0013\u0019V\u0011͇HL<]=}v\u0012ƀ`\u001b_:\u0002;\u0010-\u0010h6\u0003vIR;`7wEtSB\u000eq\u00109|JL\u0014G\nFJ̝;\u0016OCX1&\u000f!5l\u0004#řڰ!z\r^X/\u0018Fbc\u0014\r*K+F_\u001d4pg7S\fc\u001f\u0010\\McOb8F:<b\fd5DNH>G\u0019)ySb&2=<_ܱ3\u001e3'h\u0003W;Iv;\u000bI\u0014wEhn\t0ZAJ\bIZM(&7:;B^{ֽ/E\u0000GJi\\\u000fݒ\u001b$\u0013㩜\u0016\u0012=#Me||u>:\u001f_\u001d:8YsĒZ̎']Xbf\u0018\u0011QtUL~\u0007\u0013ˏ\u001d\u001e.\u000f\u000e\u0014Yr\u0004;X3z\"zQ*EZ͍ɉ\u0014.\fY\u000bFȠYb@=\fS\u0018\u00184r>UCԕnueoɆF\u001c\fP\u0000\u0000ŋ^D{Yp>l\u0010!Sr(Χ\u000eGݯM?OtT\u0006\u001d\u00002䘏@zΧFP=S\u001as>\u0015Dr%o͠K\u0003;ZBΧFP]7O-\u0019Y;YO@HF\u0012G|$aHD֝P>䄯TΧV*1rTГ\u0003w\u0007\u0011\u0005P|j\u0007x=jyԒAO69#t\u001fV{Sϧ\u000e\u00050ԡN;8sC7\u001a?Wg10n\r \fJk\u0013\bp\b~\u0000\u000f\u00077\u001e'Bs\u0001T1\u00000uIº\u0007PGٸ\b7Es=Q\u0007PGٺ^X/Ebc\u0014-*K\u0007+GYu۽\u0007P$F\u001d@\u001dcze~1\u00160\u001aa\u0003'`n\u0005WY\u001fʣ,\u0014m)\u0007PAi\u0001ԡ#{s\u0000U\u0011|\u0000u$vBt;BSɝ$\"4Hn]\u0018 T%w~Jr$&\u0014iLnuM^\u0017L\"m#W%tvNn\r\u0012\tTHn\u000bBSh>:\u001f@\u000f\u0007Pǎ\u0000j~\u0000jB!KyR\u001e\u001e,&\buEo\u0001ԣcrp\"cIR\u001c*\u000e(OkA)Tb\u0004yU!TEy\u0017\u0016bJ\r!\u0004\u0005\u0012|\u001cA\rx|>$:\u001az~A\b^S\u0016U'G}\u000fgU~\u000b1&\u0010\u0010d\u001flPB\t\"\"\u0017r0T\u0004@U1\u0006}TM=\n#+>\u001aT鹯AeXFb},a>\u0016k/D=h\u0014\u000fk Ͼ\u0006U\u000e\u001f\u00110\nd^pQ1Fo}\tTG@<Q7yoWX\u001bbL\u0018j>\r>\u0011joyU9thl\u0007U\"\u001dx}Tu\u0016k\t0^Bݻ&\u001forsw^DwN8*ٔb㭃p3\u0011n\\|Ջ4=1[Ǚ^X/8Fb^\\ei8#\u000ewv39\u0015x빛ʞĘ㭣e/`FZ^\\g}(2S6'\u001do\u001du珷\u000e]=zm8c[\"\u0019Ljnwp\u0005\u0006VLJd{`\u001aF\u0004ve^7\u0018i81j'fAb\u0019P`\u0005^\u0019̈\u000f=5f\u0011PM\u0010*56ڐU<X\u0006Ө!{SSujj*\u0003c'\u000eo޸>vA@\r\u0007=|\f]4\u00144T`?rQ\u0015da\u0019\u001aʕ\u00045\n\f*JNNz䨡\u001e([\u001dĨ =UԈ.H\rf,ň\u0004\u001b\u0003B%f|\u0003U{W\u0010\u0014P4vhX\ro\n5P.H/\u00036\u001c0r-7lh9k`B,\u0001֊\u0007GSA\u001b$UP>=/bڒqq+Z\u0005?F\u000f\u001e\u0004~\u001eLh⠿jeR\u0002\u0016rRs\u00055T\u001a\u0017۰2\t\u00180zq+O\t\u0016c\t7mh\u0018Y\u00133\u001b\u0002W,Y#;xm\u0000m\u000b6m<C\u001b\u001e(ȩ\u0014\u0006M\u0013\u001fmi\n!)HA\u000f\u000f\u001f6r\u000ff~C\u0003Q\b`\u00075h\u0016\u001f6F\u0004\u00189\u000fIe;*^\u0005:\u0003\u0016\u0018ؠcXt}\u0013\u001e^l-\n̽^%1Fܣ\nT\u0014\bo6b|E\nKZ+EHKN\u001f}&J6\u0004\u0000_;X\u001c|\u0002շFzѝ\u0002ꚁZ\u0005k\u000fݚqeî\u0002SI\u0004Ђ\r;\u0001eK\u0001\u0016[%\u0014'x\u0001\u0002&\t)K\u001d썳2]<vţO^z;?w]zKׯ<}홷\u0004%9\u001aH,Ern\b>]e\u001dDjb\u0000\u0007lĈ\u00151pd(veT\t\u0010PpL:\u0010aj\u0003EP{|\u0018~\u0013>ڀM`4$2\u00120\u0013+\u0011!QP- Ֆژ^W]x\t[\u001bTm,Ýێ7.\"\u0015zP\u0004!Ԃ\u0012!inr\u0012\u001e{a\u0012lʱ\u0007Ly06PPC J9\u00035\u001d\u0010\u0002\u0003o\u0014֜ƴ(5\u0003A\f\u0000F\u000e#Q[\nq\r%F \u0000\t__\tLyrfl\u0010\\\r \t\u001bv5*;\u0017,xaGp=\u00164Y1XPQ%\tVa\t\u000b\u00064|:)\t\u0015x;Φ7\u0003\u000fg\u0001J8V\u0010EN \u000f2\u0018*\u0003A+\t@8z\u0007aţ9\u0000\u0010Dz\u0010#\u0005\u0006\u00072n%\u000evi\u001dcAQ$&\f(!PK4<\u0012\t@Z)iWc\u0011C6\u001c\u0016\u0003\u0014\u0016\b2\f&0+%\u000bJZ\u00012\u000b\b\u000bmS.\u0000\u0014\u0011r\u0017\u0015^f'@;\u00114\u0004\u0016X\u0003ڇ\u0000Ԉёύ&z\u0007\u00015N&\u0006ʀHq\f\u0003Sy#\u0006\u0006!\u0000Q-5#Y\b(%0Mh\u000e\u0011pY\u001bv\u0003)DE\u0001(܉\u0000HoS\u0014U-ho\u000e6\u000f\n\u0000\bE/h\u0002sN,\u0000\tLK\n̶M9\u0004\u0006'Wռ\u001dj\u0002Z`xZ\u0014\u0006p\u0011Z\u001ffWF\rƫNW\u001e+e*˗\u000e\u000f_|k\u0004.}\u000bO?Bɞ?^5\u0006\rM?\u0005\u0007gR@kOe'1\u00057QFup\u001b\u000f&eC#@a\u00156^fnpV\u0007neXu\u001ef~6'6j̫UѠ8;\u0003%Wam\u0000|Md/\u0000\u0003Vz\rPUK\u0000QDu*tVdSl鉶-(pivaCŕ\u0013Ul\u0011uH,\u0012fєKUeP3fl\u0004j**\u0007\u0004Lr\\l\u0000)\u0001\u0015x\u0007&\fwsoT&L3\noc鯼kN+1u=X4B(+SDc?W\nTּ\u0019:\u0017v\u001f\u000b\u0016kǇ7o\u001d\u001d\u001fc=\u0007\u001bJ˔R\bթsoy\u000b@^x[r\t\u0013f\u0017\r\u0013@3YԆOq?p;|D\u0017xo~\u001fhnR=qRGnx\b^\u001f'6+7o8)m\u001e>'\u0006JNs/\u001c\fT[tm}܋/t|\u00137n\u0017OxsѭۓP𚟍\tdRM$Uu&4aA2x-7U[e\t'\f2@ͦ?z\u0014}\u000f\u0006OooN\u0001\u001f[\u0012}[^?\u00017\u001d>hn҇U@3^ʿbY\u00054j\fi(nc!2i\u000bc A\nXnW{W\n\r\u0016z|\u001erKbȅJ~ov+\f\u0012u;어N$@B{rۊMQ>yh5>\u001ca:ұ(~\u0007eKJ'\u001e\u001e&s(\r0\u0015gRtʾkJSoPQS]Y\u001aWH=7fs8\u0006]iM\u001a\f9%3deJB\u001flܓē\u0011+2GR#\u0015 \u001b).r/RV}9҇3d.IB\u0010o\u000e\bF\u000b[\u001eBgP/O[QMqm*i&\u0007\u001d/B\u0001-[\u0013`hQ~r \\\u0013[\u001b\t\u0003\u0012pہD&\u000eQ\u0003L+\u0006@6iDL\u001d$C5<I\nV\u001e*ck%z#Վ\tɢs\u0015ogD\u0014zD4P\t>rOQA5P=K\t:;{\u001d\u001b-Sʶ\u0001\b0nآ\u0004)\u0007q.Aq(*SN4f?%Z֦,*\u001ek\u00017i'\nĢG?0\u001acj>z=n'?!ڱVTƘ$e!Ǒ#:?\u0013@\u000eAJjgQ\u0019*T-)V[c*>WSZcx/3\\Qc\u0015^$\u0016WJ+z֌\u001530T2295R~&c'i+Xl\u0016JqtfoLioMao\u0015K{\u0000zno\u0015{+g^noox6XV8Ƈ\u00196XV3\u0004*RIG\u00046O*=cR*=RTzeҳ35IWM&J\u001d?t\u0016IVlu[(gB\u0016YI\u0016^ %'A<LTl!\u0000INllre)d15S\u0016RYB%H\u0014ʡJS(M\u0014ZU\n\u0006U-N\u0012*z:2ؕQ\u0003qKKH\f&鵄fGENKxF\u00027;\u0015|[8Cw!F#\u001d\u001f㧬5$M\u0018\nyGb}Aѵ\u0007ӹɝ\u00043D3Tj`[4]\rO\u000e\u0004\u0016G3n[VLd/\u0016B^ĸ\u0012\u0018Q12&nn\u001d\u0015R$TР[JtV\u001d&Nt}a\u0013\nd`\n쎅g6H |\u001f\u001bű\u0002&̜Eyb$\u0017\u0015\rue^'7\u000b\u0006c\u001c3M%I~\u000e4\u0015aAf\u00184򜝎\u001eě[Eem\u0012\u0002L\u001bJDQB9\u0010\u0010\u000e\u0004&T@\f~a@4j31aaK\u0000VrQ\u0002V@K\u0005uP\tYMkKyDwz#eyz¸\u0006YIzX;4OqpoJ#G5\u0005\\K\u0016\u0001\"\u00106<4P\u0000XՖ:PHoX!|kF*\u0001\no@E\t\u0007\u001d+\u0017<\u001dN/A:\\BSB\"P6<h\u001aN?_6V\nᕷXX^\u001b,ʘ9hYP\u001bP$;b3ˊj$_6Zp\"\u0007NG\u001a8\u001c}6&\r\u0006)\u000bv\bV\u001e\u0001ސT\u0012\u0018-L<|mnofլ<z\u0006+V\u001eUnW\u00179\u0016sc/{U|\u0019@j\u000b/zi\u0015\fHM}闳<ڊΪ~\u0002oԲˑP)AKkZ3\u0004ȋX32\"ܤW5xv$<3ץ4_^~yrӯh]a\u0015M(\u0007Rio+h;6\u0012gZ\u000e\u001c$؁VRcU$)m\u0006 .ҧcf\b\u0002V1\u0004Qk\u0018F\fAz$P.8!HsvVa\u0001R5\u0011+PXT\u0017vŒG5{10\u001bCrkD^,,jMZ8lº5<DOmia0B+9ԙOaU\fF\u0003I:n\u001b\u0006#4\u0018\u000b\u000eסrgi0\u0016\r\u001a\u0005\ndymP+\u0013>D&|Tf\u001cbDX#47Y2\u0013\u0011f\u0006nyZ|(]q(қY\r\u0000/\"PYD6`o#sʊ9IcܚMg{>8%7)O-ɔ*%y$ӦSSK2\u001bL-Ʉuj\u0004fH%ʂSCJ$Atc[TBC``#Yl\t\u000e$idҒLajOJilGղyiё!>2vc\u00189\u0015\u00132Ej\u0016sݹ%cmm;H# e6ڵD\u001cɡ\u001cHjA\u0012QX2Y4\bY43Hq^#ŕ\u001cਯQ\t;&X[7vYI\u001bՑqbAZ\u0018INJ޶J\u0019ی\b2\u001e5AlMYYsg1\u001beV\u0016~|ce]/@\"iHPY(YNK1cʬǌ\u0001?2\u001ao=\u000e\u0005\u001eej\u0011^\u001eej=Z\u0018\u00039h GY\u0003duq(ݰ(эW\u00198>\u001bR\u0018f1\u0001|aw=M\u001a UZ6R\u0014A\u0017DB\u0005+h\u001aRv\n-=lH\u001cc畄WK/$`: Ȟ꺱-u7V\u0014-Z\u0002<X{dvz{>V\u001c+)Se]wr6\u0006$ʸ{Bd\u001b%V)Dx&j2R5TJl1GyxE蔋t(:_\u0014=EQMȑWE7\u000eƽ\u001e:~;5\u000eh\u0011+\u0010M\ry.|@*By\u0002\u0015@g\u0005z\ntp'Rg/9\u001d6{+<&G8,p7:\u0003ۋe\fWxAP1\u001b\bQbre!n4BzZ}A`sLm\u000e\u000e\u0016$*m}腊BӰ\u0000Y%ځf*M/`#\n\u0013\u0013ud!Uf#O>w\u001bGu;m\u0001Jw̰\f(v7(=+/񕛧7o]\u001fi\"YLhJ\u0015\"2\b\u0011q\u0002[\u001fȊ+;̊n`8|\u0015U /JA\b\u0012mܠm\u0003h\"0`&¬*,+!\u0007\u001f!\u0017.\u001f(\u00182\fۅ7B8y;pnS&![h\u0016\u001a$}>u|\n7P+(Hx\u0012\u0015mr\u001dTFx\u0013=\u0018ԇ\u0006/\u0015\r>ՠȒ\u000eYO=v\u0015t\u0002\u001f\"\u0001\u0017מ\u0014&Q!\u0012\u000b7O_at\u000eyv\u0016떴'[i\f\u001bv~68\fgd\u0002TS6\t]g\tV\u000f\u001d\u001fV*\trHI\u001a;9s\u0011!!N,^ib\f[)\u0013\u001d%C3]hAWjw;\u0011a\\F\u0019\u0007-U`\\\t;&\nP[Q\u0004}\u0014gd1\u0018*C\u0007X$|I\f\u00067\u0006E\u0010'78|)\u001eqMh+\u0013J\u0012,0 \u0014sk\u0015\fh\u001a腋\u0015$\u0016l\u0013lČ*\u0000\u0012.uY+\u0000KLZeਜ਼F\u000b%plk\u0004 \u001acEȍ̈́y+N_2\u0013\u0012mG&;bJ2Fk\f|\u0006s\u001a\u0000\u0013\u0011ĀHi<\u0019[Vy3I+ˊ毺fV:|3U\u000e6\u0000\u0013\u001bɣk\u001f,\u0019\nK\tt\u0004\rl!\u0011KnH2&\u0015U0:D\t34H<DҚj9>\u0019\t\"lZ\u0005{M\nen^1{r}\u0003\u0012UXQ\u0014CR\u0010\u0005i\u0004\r\"\u0004EC6J\u0016\u001aV=hXRY+\f\r\nendstream\rendobj\r34 0 obj\r<</Length 20982>>stream\r\np,l\u000bX҃K\u0018\b\u0016\u0018Ih@ȃwrv]ƒI?\u00142bX\u0001wEvpLtC'\u0016l@hYy\u0010EDtMmZ7I_\r!nN湫M\u0018M\u0018F&\u001a܄C̛07aT?\u0014jcpѕa0Ђ\b\u0018z.Q+Nxf`wچ/\rp\u001aLVZ&\rpgjw_HḨײGP̅\u001aƏt\u0014A\f\u0007Cԡ\u0000D`bT\u0002|<Z\u0007y)`\u0015P\u0014OCW\u0007X7$U+\u0007qZ)\u001b\u000e|nB\u0007STUB\u0015\f*Sym\u0017\u0006L\u0004֝\u0007bT)\r#.aŭ,\u0000\u0001Dܢ*\u001cnHOΚO\u0005^<ɛ\u001d)K\u000f\u0012ts\u001e,\tJBMqНs\u001a+CK̰,pTCM\u0015UQE\u0015\u001a\u0006a\u0011QS4_\u0005\u00061$(\u0018w|z!\u0007u\tt\tǸ)9;8OĄ׫ ©M,:q\f\r\u0019o\u001ecI؆B MB6\u0010ɈhnzNy\":;\u0017.i.Kƅ+ûy\rfVz\u000fy\u001fiOGI`f\u0016=ؼP5\u001ea\u0005\u0014\u001a\u00019o$4\u0011\u0007cUØQԟ\r\u0001[7_x:\u001b\u0000kWT\u0011_\u001f\u00191oI\u000fT +i-Z;I\u0004W\u001c' Kh]\f7\u0000mp\u0006K&Gp\fpdRl\u00024ꔦWѮ\rG\rG`u\njJAEuJ6\u000fD\u001bN\u000e]\u0014m8ZY\u000f|\u001cq\u001c\nearOI-\r1Z)=\f\";`58b\u0005iEtljK\u0013m89\u001cCj6\u001c:{l8FP(oOFUh\u0019m}6\u001c1ur\u0015\u0013SzlqSX8цC\u0016$\u001bN\u000eMG\rZm\rG\b\u001b\u000e\r'\ff\u0018\"\u000bд3Ն\u001bW\u001do\rόSm;})Ι|Ԍٶvpێm\nH4*\n\u001bNa|\fnQ3mWTUB\u0015\f*Sy&|v8cDkQa\u000e+oQSn5e$ܶ+\u0016vRC\u00197-BYS%[n\u0015x˦ָ43<ɇ1@STi~}.E^nK*&\u001ffGM}.bR߶KWZaۮbgvmgvmO&_vĶ\u001d5wjN\u000ef7b\u000b5ٱ7F\u001bGS\u000fތ`Jc\u0014\r?n\u001c\u00057\u0002\u0004\b\u0006\u001dJfl\tNc'-ckFxgOB\b1\u0010\ng\u0001U:PagADl\u0010E%M(-+XKcCv\u0015 UOl\r\u0011\u001fN\u0001RmW\u0001U2(N̓5ͤe4O%d\u0013[\u0000\u0005?+.wĚ;\u001fM'̑憭}*\u000bz¼\u0019J#kf1:d\u001et>X\u0010JWn\u0002\"xW]AOI3'x\u0005uG^Z`+9j/O1Z{+|:i\u001cCn)\u001c#C$dQe.)Wx`j4m7`\u000b2\u0018\u0010-mƐ$\\\u0012(\u000eN2\fC0W\rƐĚ\rL.ͺ1\u0010+t\u0005Hh(J#NņU7r\u001fb\u0005QT\u0000*\u0019Wh\f\u0011\u0017Ycf\u0018\\\u0015;9,S\u00175ܱq!X4RZgV>uʔ/0o\u001a&\u001aCl8E̬\u001bCb\u001c87eŦMi:qW\u001aZ)-|BΗwçZ\u0018w5>\u001dnbTchd\f]r-3514ʕY7r_\u0019Cth{14$[\u0018CtHm\u0006kh\u0005k4p\u0004ZD(\u0010`\u0006\u00117m\u0014e\u001eC0TI\r\u0004K0PC,Q\r\u001c\u0000W\n[9q\u0017nr/AjvD\tU\u0018$EuJhW>*\u001cn5DE%H]\u0005Tɠ:\u00156\u000fDOWRr?]i:x^bo;fQ4r>U(w>-6BQ'y}fQ?\u0013#>>rjQ+\u0005+͌P4Y.\u001c\u001d5(U3͢P\rjMfQO\u00188>\u001aZ&G;9\"l\u001f~}T8.>bp\u000f6qh\u001f.(#딏!\u000f]A\u0016tQ,$\u001a\u0013LQ.qaߞxӯ_s/\b\u00024S\u000f\u0018Z\u0001q\b\f6\u0003]\n@N>xI`+ha\u0005eԕL}0Jv%7PB?;ȣNqt\u0001.?~@lB\u0010M\u0003ZXW\u0015ʣ\u0003|E~\u0007}\u000f~ow\u0016\f)*%\u001eY8Ozǚ-]\b\u0016F\u00037.8@[gSP9R[9\u0018).oIayl\u0018iYMQ҄\u0003\u001c\u000fk0\u0013\u001b\u001bl\u001aO\u0015)횏u-\u0019\u0018/'Mr>WG\u0005fICX\u0007H'{ll)\u000e'/\u001dןx.=Wj\u0011ߚ&`nJ\u0003\u0006\u0012W\u00152uIG\u0006b7\u001f\r\r:\u0015\"\u0015,1ќ%ԁ`\nn\u001d\u000b\u0019+c;a-܀R÷\u0018a.3zSFtemQ;\u000f713\u0003\u001d\u0019A8\b5.,p\u0004\u001d6\u0018A\u000e1GЙ\u001c1C#\u000fb04,\u0010qۈF\u00175ydFkiq\u0011.MA*8k\u0015\u0006&\u000f\u0002\u001fO:TnIwTq,U\u000e/3Vn\u001f9B'*/\u001fZțMd\u001db\u0004T8Q\u0012Tys9@6Fc\u000bu:%^\u0014Ƿ\u001a5\u0006hL+;\u00185P\u0011\r5ư8\u001a6a\u0018<|jЖCA\"\u001aSc0a\"\u001aSC\f\u0012\u001bݦ?vс3\u00045i\u001b?z{\u0005w(\u0014B$W\u001dp|KxJ1\u0006\u0003\u0012SPd)EQPo}/]GW`\u0013'\u0003&P%C\u0019\u0001H:\tE)S!\t\u0012]P)E^P.s`j\u001fEg=+1GjF1\u000eJ\u0014]\u0018I?\u0011.(7i?)4\u00176RsE\f\u0007S|\u001bI\f\u0015n\u0007\\s\u0018\u0001o\u000f޺agX\u001c(eC\by=S\u0005,[|\u0003Y\u000f\u0011\b+hm\u001aF(\u0003<R\u0019}\u0000ТBZ`\"ԋ\u0012\r%\u001f\u0015uq\u0010ԶBpF-pnxy\u0005sj\u0003ȼ.Y\u0005&9\u0000C\u0005^m~j\u0001D?Y}'\u001b֣7eVwy7nV\u001b6᭶VgPQ<9kY[VjS\u000e}Vcv\u0003驄\u0011\u0015\\\u001aYl;dāRc(xj\rqxޙºAir[>8(\u0013.p|~讹\u000fZio8*\u0016-C\u0001\\Hp\u0012䊚{H?\u0005\u001e\\&yJa!U\u0005!\\SLml!n\u000b^HIٚ&<Oo8l̦ls\twi鴕괕TIjV\u000b)B\u000e_WuGC\u001cR<vHC\u000e)\u0016;X**\u000e.\u000etH=uH!(9Xb9IsLfdL9˄\u0015\u000e)9xC笭fm5k{N[{!5: w')8k}\u0018dy;'l8ƗarE;'\t=هI=%U;!tm,Oݭ\u000b4x(\u001fCt\u0017\u0005!\u0019'`\u001dȩ'F\u000fqc0\\v91ph=~6j\u0007f\u000epD0\"9QqQjG^\u0017\u0007\u0001u1m31;:!E?h\u0007Z\u0011@΢?n#m\u001f۪\u000f^\u001f)*\u0007\u001e\u001f\r\u0019&\u0016\u001f4?r<N9!J1uu\u0007\u000f\u001e\u001f[uM8;hl^Zkh\u0004Bw\u00193nzE4\u0000pK@ΐ+\u0001tJM\u0012\b\u0015hA/\b\u0013A\u0014\n\u0005(c\u001b\u0016?\u0003@5 o}\u0000#\u0015S[_\fj\u0002\b\u0006ڻ]pd\u0010nUA@\"\u0007{m\u0016lF8[@\u001a/}\u0016\rm\u000b\b_\u0002\u0002m\"\u001c6576\u0005P\u000fM}b]Kl66\u0000*tB\u0006j\u00030&7j¨A 2\u0005G\u001bs͛\u001f>\u0018\u000f.\u001e.F]\u0000\u001a\u001e\f][BT i\r\u0018M}7ݦٽcW\u0011c\u0017]En\u0001Q\u001bU|@y?4<vكc\u0017~cW\u0011c\u00041FݡwpǡLl̴\u0006]68\u0010;\btZ\u0003*.\u001bv٘iv\u0007\u00026t@-~.\u001f31.\u001f3@;;.\u0015\u0012ˀ<\u0015M\tfVۗ\u0018\u0007î\u0010j\u0001\n!\u0003ҍ}\bZ)\u0001B\u0012\bm\u0002a\u0006b\t\u001c`O\u0000D\u001b,\b\u001a\n}Yc\u001c0v\u0019 %\u0005Zh*5\u001f\u0017MqxJ\f^@\u0015Od0UUĔM@C偆\u000fɢЊodL 8\u0018g\u0006\u00173ϏiM\f\u001b\u0005\u0013f\u0015\u0018h\u000b\u00050:\u0017\u0010^H\u0006\r\u0002V\u000b1[2s\u000bFK4(K0Bh)_\u0000\u00128\u000b\\_WP\u001cdI\r\u0012@['\"X\f*B}P<\ne\u0006%os\u000efiFf0\u0007T\u0003\u0000M0j.`r\u001cY5\u0016fUsߊj.*y\u0004\toQ1\u001eT͒\f!fUܯ\u0019R%DE5\u000f\u0002Vr\f\u001dP`k\u000ffgN5A,&Ռгfv\u0014ˮ\u001e\\Ka\u0018|hCFs\u0001P̛`b\\䚙\u000f\u0019|G\u0018%+\u0004h\u0011Ԧ\bЦ(ɘBph\u0007\u0017\"\u00065\u0010Lѯ٠\\BT4 i\u0015(lhfcf[Y\u000f5h4\u001d\u0018̓YX&hf5\u0014|t㑂Hg\u0014\u0002\u0017,u-\u0017UH\u0019זPL[/\u0012\u0016XNJX5yE\u0004n (<|ds@SA\u001aZR#_q\u0013Q \u0014\u0011]?,'\u0016m[\nI/(\u0002wa\u00045\u0000چ_m\u0000K\"o\u0002$LV&\u001b-mQ.I[\u000e\u0017aQ1.)\u0007\u000bw\\k\u0017ݠir9/\u0006~ؔ\u0014Q\u0005\u0001{7p(\u0019ug\u001e6\u0017:l6\u00047nu,\u0019\u0006!h44ϵ9U5*\u000fS\f6\u0015\n>DkSM\u0007\u001b\u001aV \u0018pAcƌ=6O5{9f\u0006M[vۑ|<f٠G\u0005w\u0019;mA.%0&B-SַlZXyggqq4\n[\u000ec5_sx)ZL#S\u0002\u0015lrL4>\u0004Ж\u0002s\u0019([Ts\u000eVv-\u0005T޼U|$ãy׼\u0006M[w\u000f@\u001d6e\u001d\u0003\\Ө\u0002qʀ\u001b8\u001cf~&\u0014oD\\ond\u000bxE1*Τ$\u0002\u00011\u000brLrY\u0019I/#nK\u000b4\f7\u0013\t\u0000BZ\u0019\u0005\u0002z`\u000brʩ-FFEƱ6\ba\"\u0000\u0015\u0011\u0016sr2\\\u0010\u001f$|\u0001vEJ\u0019M5c\u0000V\u0004\b\u0018\u000b\u0013\u001f&GW(h\u0018Zc\fis5(\u0011\u0018Ƹv\u0019\u0004Vkja\u0005p:t\u0004)h\u0006@\t_Y\r*D\u001am,QP;0|]~M`\u000e\u0011uB\u000e\u0004t\u0004S\u0019@Ƙ\u0014y'A\u0001kB!mP\u0004\u0018) Rs+a\u0012\u001a\t\u001cBIhUR%\u001c%Th9\u0005`q,7r\u000fa\u0015\u001aw{E\u000e\u001dt\u0013A\nx\r\u001c\u0006i`\u0014L腃\u0010{\u0014bW`L\u0006 :5\u0016D\u0015V\u0012\fȞt\u0006\u0000\u000e\u0005z\u001cs?6mL\u00179rߐ5vn\u0005E7ȝ\u001eH+$^\u0005\u001cN,(mp\u0007\u0006r$50:I\u00008\u001f@rH_A\"%P񟸇\bmTXC%\u0005[4uMT?Sj;13.*\u001d\u00107m\u001a62\u001f\u0012i5\u0011\u0000rh\u0012i+X\u0002\u0015{H5\u0002G\u0002\u0002D-؎E\u00032\u0007dЦ&%Ц&bT2_2c=K\rJ=b=J=*Xb=J\rJ=b=J=K,zOl̏Y\u0014 \u0019w8\u0005\u0014K\u0010INXԟ@u\u0015c ֮\u001c#(N\u0017*\u00146R',\u001c\u0017|R,J\u0002S(_w4g/e_\u0005/&߹XBQ1l+!a1P\u0004AtoL'\u000e+_XZ\u001b\u0007'\u0012\u000f\u0014V2\u001d\u0010\\*P9n9\u0018\u001a\u000e}I/p]+}~&Dɶ\u0002)2\u0018t\u0017TB\nR_v/m\tzl_\u0018\u0002Oh\u0010/Y\f\u0007f8~\u0015\u0017h2vL\u001aNa5\u0010\u001c]绊tÆtÆԆ\r\r\u001b\r\u001b\r\u001bR\u001b6\u0005R?\r\r\r\u001bZ\u001b6\u001b62lȆaCaCaC\u0007M+N#ḡY\u0004ŷR\nJX\u0017qX#\f\n\u0016\u0002R\u000b\"Cux\u0012*q'p\u0018z=~OʿS\u0015\fXX#%(X4@O\n2t2\u0019n\u0018\u000f*\u0003\"#p\u0004or^+Npk\u0017M\u0015׀=r܆p37Xݕ+JTVXs\u0016NЁ\u001339\u001e,f\u0019U\u0012\u000beAXs+{\n<-[0dE˳#N1hu!fsչ\t[g5\u001eY2Vt+(F,/h\u0012u-\u001e\u0006&ÂV0`a%(U9]\u000f\u001b\n߉zV\u000fLrUÎ\tQaK<g?\u000b,\u0005b\u0015R\u000fgxaZנ\u001e;=|FM\\&Lj2`.Lrsv2eZ3\u0006set\u000bs\u0019lYM\u0017jv2-eZ3ig.LJst2)\u0002\u000baڙE-\\g.s3w;\u001d.Ԧ2\u0017ڐrCb.4g\u0003\u001a֤|ÿS\u0015\fBΕuKPjNSt(FԓwDb\\LF\u00101\u0000,5䶡+\u001f]p{\u0007%\bhDK/>ߌrS\f^o\nT\u0016\u0016|P7_e\u000e?USmC\u0006yZ]\u0000[7_x:\u001f\u001do޸ٹ\u00153q!\u0019\u0012׍\n\fA]\u001dWX\u0019h<\u001f\tJ\u001c\\:^wV0\n9W-Am8f\\s֎k̸f0\u001cgqG-/h\\GS(cN\u000b^Þv9ɧsRɆԦsO紛i>tN7L6|:L烁gؓn:wh:qȆ^t\u0007cL\u001dCB2ni\u001d?N\u0017\u001f|x)\b[R[\u0001>u\u0011\u001d\u0017\u0012DGI*&\u0007h3\u0010m\u0002QC@\u0005,r\u0014'VzD`\u0011YT\u0005\u0000\u000bq~*Unq\u00163\u0014,De\u0001\u0015(\u001b\u0005=D\u000e\nn{qғO^~kϼ\u0015:|)ܡ1_\r5\n\u0007X\u0006Ju\f3ou7\u0001AWԹї6oYyD=o5P1j!\u0001w\u001fdSG\u001dJo\u001f~`\u0014%W~@\u0012f\t%\u000f\u001dRiV+C\u001dI\u0004|˕/kL\u0001^ϸQNv\u001auH\u000fj;.7\u001aC??\u001c\u001eЛ9p/v.u9~ 8\r%\u001cP\u0005D|4\u0011S7 jD\u000bGA!i<\u0006KlL\u0001Iv!`9´5`S3˜Ea\u001caJF/⥖IW\u001c8IrG=i&\u001a\u0010\t,C@\u001c\u0018%!\u000e>1\u001a+\u0003`1ٓ؝;]K]\fFy3E|\t\u000bL\u000beX6<2\u001a\u001e#T9\u0002\u001fXx\u0013gɺG2]\u0016Y\u0013|}Ln\u0012\u0011V$\u0011aI\u0013\u0015؊p;H=Z\u0011b{\u0011\u001dO9\u000fyOR-lR-S-E\u0015a\u001du\u00196!w\u00195\"\\_\u0002*X\\K^f\u0004%K1x\u0003`\b\u0005߂\u0014j\f\u00000\u0016j\u0014\u0003cf:\r$\u00000L\u000b[\u0014 k],\u0019|\u000eZ[\u0014\u000e\u0015e0/\t\u0006f94aiWVCC\f\u001e+c\u0002?\u001a3c]od\bZ-\u0006[S\b`\t0JT%}a\b\re\u001d\u000e\u000b\u001f`\u0013\buqoy\u001d\u0013\u000fRljQn\u0003k\u001d(mGHr\u00039\u00117\u0017Aah/Lf!T\u001d+\u000e\u001foJO6\u0014økԨ\u001a2л!깡! ǜ\n\rNggg5ʟuʟՕM\u0004jARgGG%IGK=#,͛wx)CxX\u001b\u0000M\fE\bWB\by\u001e\nP\u00012]d\u000e(\f\u0017\u0006Z\\pF\bT\u001b`!\u0004S@X-\u0000!\u0002~?+%9ػ\u0012*\u0015Y4\u0018\u0002|}\r-Ɵ\u0015\u0000!a\u0007<0\u0010,g\u0015\fxW9f)\u0002Q\\%\u0007X;\n50p\u0003Y-R\t\u0011?)oG\u0000ww\b'r\u000b\u000fweki\u0000%t5x5HF\u0016| &R\u000e Brw\nŮza\tZk\rhN\u001bSN\u001b\"{\u001aґ5ljЈ%\u0013\u001a蒮T\u001fcQ'os\b@{з\u0000P:=\u0000c\u0018S\u0015EGV\u0000\u001abp\bcpSג;حA`I?i|ZWG\u0015\u001e\u0003p\u0018`a$kIxB\u0015\u001b`\u0019_n\u0000\rGsG4\u0017o\u001c~\u0014gV6+7o8)muN*Ŷ$CkVNѢk^|摥\u0013\u0001mqYx\u00042l\u0012:\u0013SJզQ]Q\u0002>¬ٯ;`\u00063*`QY\u00018{5جf\rv\u000fj0e\u0006\rfe\u001b\rFǫͣ<6Ԭf\r6k>\rx\r\u0007@C>N\u0003Df`\u0001!~y\u001b\u0005\u0003\n\u001dǂ`\u0001j-\u001ex2e-1T\u0012e\u0004m\u0014CU\u00106'u£K<\u0019n;##Ӟ2)㞒+a\u0006Xa.їw[Vɏ7wgvD\u0004wʗR8O`U-u[\u001e\u001a~\u001d\u001eoG7ELIW\\\u0010Z3\u001a~d\"\u001aMPvQL\u0007\u001b\b\u0007\u0015f\u001en<*jW,\u0002\u00125U]&^\u0018s]{}[qw߼\r\n正#/!Cǘt\fĤ|fn6twz+ӯRʆrg\u001e~H5\n?fI5\u000f\u0010}nZuVlb\u0015wbC1f(qB(\u0013+`u\fD\u0019ÕSaR\u0017˰</Û\"퉰t7;Ś\u0012R8[C\u0004\u001bG\u000f-ЍMoV\u0007^e\u001b\u0005+x%x+\u001bxN\rOw<\u0019e\u001b3\\\"P\n!\u0016͚öЁf1mVIpE\u001b~PӖ\f\rheY\r\u0015kMa\u001a\u0019\n\u0013h4VZ\u0002\fGZ\u001f\u00195Tc_\u0016-ͱ5C$m\u0006e\rނif\"a߻\b\u001bos\u001b;\u0014\u0019\u0014\u0011\u0006\u0018U{+Ն\u0004Et\u0017].\u0018\u0012\u0010=ː\u0017\u001e\u001ey]\u000b#6a\u0014\re{\u001d\u0015n-q,*\"ʢ8]!0E67e1\u0011Pw\u0002?~;m\u0012U\u000eݹs@\n\u00067oQYk-ӄ5h\u0018U\u0018\u0016AR\u0019.hC(Y~͈\u0015\bEXh5R)\u001fVCaqL0篛uV\f\u0002@Ï\u0006kc:h8A\u0000NQ\u0000H(7\u0004Hx\u0000\u0003\u0018\"x\u0016S2Q&q\u00060x\u0019\u0000pfZ\u00127\u0011!H_l\r=\f`a\u0000\u0011i[Y\fE0qa\bCMǚ11x\u000fa8>cB\u0013\u0003?\u00060\u0000$5\r\u001e\u001aBʆZ)\u001b=;\bI\u0002zx(jbاfM\u0018\b6\\ԊjZ\u000b\\k\u001b\u0004F\u0001\u000bL@\u0017\b!-6P'Tx\\\b1T#y\"\u000f\u001dcܡ`h\u001dQ\u0001v\fI\u0019Dj\u0011D\u0010dL\u0002t\f\u000bqnB~p\u0012W\tx\bb)S\u0001\u0006&wn\u0013\u0000% \n\u0016/^\t\u0003\"h\u0010)\u0000\u0011q0=_ŭ\u0015\u000b\u000bRW)ȭ(~X\u0000\f\u0018&b \u0014jI\u0003\u001e\u0007B07̛x5T:i\t,Px \u00153u#\u000b?ӎi-VSt\u0010\u0017\u000eP扦xO\u0019O\u0000\")8~(\u000f\u001e0C\t\rx\u0011)<O \"\u0016\u0006\u0001\u0003K3Ǟ{2\u000e\u0015D'(v\u001b\u0006>2Nm\u0000R{vAJ\u0006\"VJT8qo\u001ex3\u0003omz\u0014\fF\u001b\u000f\u0001&\n28\b\u0014J`\u001a\u0000\u00065\u000fC\u000eF6`\b\u0016p9\u0016m\u0006y~6\u0017j0`o<\r\u0006\u001ct\u00130\u0000\u0013U>$\u001c%N\u0012\n1J`@\u0001\fč\u0007\u001d0)\u0011䰝V\u000b\u0015\u001d°L\u0010Xt6*cj4~|NCp\u0014#,v7L@GВ\u0002̉\u001fL\u0004XfÌR\u0007i\u0019a`.\u0004\u0011뮓0\u0018\fu>q<$W\\C\rv:@\u000bQ^\n\f\r\u0002\u0003JHzb\\n/B=4\u0000B660Sw\u0003k\u0018\u0018\r\u0004F\r,$8^]\nnC%)vz\u0002t=&s x!CQ?%jBJu\u000b@F\u0003\u000b\u0011M\"\u0018\u0004\u0013#S{\u0018+Y0ꇨ)\u0002\u00189\u001c0\u001eڻG\u0001\n\u0003,~+G0`\"n&0h3Il\u0011$\u0010s+A\u0003y\\X\u0001uT\u0013\u0006\u0006ؐ\u0003>Q\u001dr\u000300p1.b\u0000H\rʨ}E$\u0001\f<\u001f\u0002q\u0004\u0003h\u001b ZD;߱\u001d`\u0011\u0018\u0010(\u0006\u0006E\u0017\u001b0\t\rh6\u0001ʜ\u0006lU\u00065g6Ð/n\u0002e-32\u0010\n\u001f@\u0014#a\u0005\u0000\f}\t\n0\u001d\u001d\f\u0006\u0016x\u0000V{\u001bn`h3A[w5\u0013$&\u0015eB\u0003\u000bt\r`\u0012C2~\u0007Uq\u001ac\fQ<,]LA*\nrӟ`9]\u0002õ \n\u0005K\u0005\rZA9N\u0017\u001aM{C%\u0018\u00167\u000e\u0005]\u0000\u001a\u0007iK\u0019\u0015<D\u00170\u0016ck\u0018n\u0003Tv\u00057_\u0018\u0015}X=׭x0l@u~\u0017\rך\u0012t >\u0017\u000f\fL'P\u001b01\fX\u0018t#\u0014\u0011>T5Os\u0005W{V]bv\u0018з\u001aTy7Y\n@\u0002\nr`qʦ;\r\u001a\r\u0006\u001d/wbȢ\u0007\u0003Fae\fx\u001d'i\u0018Rd\u0001mZW+:`\u000b\u0018i~\u001e{H&#\u0015D\u001dη]\\\u0011w\u0015Cg?\no/=!㷄ߗ܍k\u0017n\u001fz!\u0004\u000f=;<S\u0017Ͼ6H-ǀ0o4\u000f4\u0007\u0005ǐځ\r\u000fux,`J\u001f~'\u001e.?\u0019!h'\u001aD5M8wJE\u0013l1\u0019pF8\u0006+B\u0011g\u0015vhQMB;\u001e\u0019F4ݗ^W>|˿\u0017|7\u001b\u001eyw\u001f}Lhckeͻ_y\u000f{\t\u001f}w'\u001e_\u000b\u001fO}v+_㏟ӿ~O\u001e׾~ѫ~\\O~/}\u000bOuï{>Ώgկ}}9\u00153?^>\u000b<\u001fI=\"O>/o_?yx\u0004\u001bůxW\u001f_7<^9}k׾{80?W=6װ]=a\u001f{{dOz7\u0011`q#,\u0006Y\ng\u0015\u001er\u0001 z\u000ex(|pz\u001f=8`Hq<a'b\t\u001d9T\u0015''X87G~OwK6\u0012\u000e\u0012\\{gCK\u001f|iOX|ER\u001c!9kqdh]:\u0007%?w(K\u0016\rCp1'h\u0014p\u001f\u001fYqic&\u0018LT'\n\u001d\u0012.54 B\u0006\n=!\r>\u0014oR\u0012P]p1:$4\u0001\b(B5P\u0011XZ\u001f9.zK\u0000\b\n=\u0015b&\"x>A]1\u001b!1sp\u0007F*X]\u0007pC\u0010CБCۧ7\u001aS]<K\f\u0015:\u0019\u0013R:jP\u0002k\r2\u001b\u001fsob:scV$%t\"?\u0006\u0012\u001b0\u0004M̚\u00175@JID}e;e\u0014!y(SH_\"@nЦC\u0017\u0004y\bji{ok\u0004m\u0010ǏQ\u0010n\u0000yI\u0014y0\u001253{s\u001d}'Ҟe:{f5kϬoڳgN_\fp9۶1xm\f_q[\u0003則Q(\u0003ǌ^wS,\u001d(*?=KZ7v\u0003LZ0O_!\t3-O\u0016{\u0012:!\nZU/8\u001bwr,)*\f\u00164\u0018.\u001d\u001f*C\u0016WYYcv\u000f\u001b\u000fx\u0018C'-Q'w$\u0015\u0001\u0001<{&\u0007lZ\u0016?\u001cn\u0017\u000bN/\u000f/OϺO\u0018vx/R\u0011\u0010\tccRJ\u001ab\u001f^Nk\u001fI*;\u0019\u0005<\u0016\u0001NG,\u0005\u0005Ÿ\u0010ҝy\u000ed[e\u001cg0Nj,ms\u001bsw\u0019[2\u0015neab\u0018vaxá0;m{lf5\u0011vH\u001d)0tb\u0000K\u000b\u0007\\ʞ4\u000b.K%ᖡIREX\u001cjdlO\u0001\f\\/hk\u00172|\u000f4㎾rGIӇH\u0012$_Y\u000b\u0013G)Jh}ۜC\u0000\u0011qjm6Zu<YK\u00166h6Ԧz\u00115ZcԔ6<BM\u000b)r\u0003\f1^-h(jNaq]rŴ洘pA2\u0006\r\u0013R\th\u001dt.Ÿ#:\\wǅ(jդ\u0011SBHu¾\u0012P&\u000fJZ-UZ\u0019!1Jm\u0000PdY̎\u0012\u001e\u001a\\j:P\u0019D\u001f$~,\f\u001d`L\u0006(¦\u000eK`j.\u00199,4,{<?`\u0014f^\n1\u0003y\u00184b_frş2\u0011ۉXemnx.\u001drk]­31L\f\u0013.\f\u000fq8\u0014\u0006v<[m֬&b۝\u000eCR,\u0005RЬ\u00194j[zvpЛ\u001faπ\u0010p9kk?\u0007\u000bC\"7t\u000f\u0015.ދ4\u0016(ZbciJH0Ō\u0015ZȰlLǳBb\u0019/-3N2\u0006(!8E4xi6Փ\u0004EKJ{MdG$m)( G\r&JP{<\"ׁʰ&o6V\u0004h#\u0002Ā\f/\ẗ́`tذ\u0000Ё(\u000eS\u0004a?)4v\t`\r\u0000k\u001d4\u0004Deݲ\u00111CHn®\u00129'\u000eq\u0018+(%ߑI\u0013\u00171*p#bf\u001a\u0003\u0012\u00125͠\u0015Jnqծt23+r\u000eq~{DMֱA-l\u000f~{7p&.dѴKX&H\u0018L\u0001\u001b\u001c\u0012/'wyY7s.uQHA\u001fc'\u0016Y\u0012Z\u0010\u0012\u0017Zt,y+D&RO9Cфxhf\u0016GF\u0004]~a\r7E7Vnnr\u0017֯\u000fV6xm֓C'ٳ]'vvCua6Ѩc\u0001wl&\b\u001bމƊ3\f]l\u001d3ۤ9i\u0013\u001c\u0011h=B*B\u0001M{=2\u0010b]0}dBz*-v8\n\thiKH\u0007\u0004:5\u0007PX\\*pn@+٘\u001a꒦\u000eO}L{\u000f{hۻWp0{wya\u001b\u001c*S\u000e͆GE\u001f7o]rZpWrTc\u001bhz\u001bh=\u0007h\u00128ћυ|Au\u0016\u001d\u0014\u001b7?.|<\u0004q.!s۟{mo\ro^˪7f̓-.Ȫ{s}.ankG1כ\u0012D?0-ͨq-dԓ\u001f=6ՏX=!-V\u000fXP\u0015?^q~hЋ\u0000hϋ\u0010oVEC5*lP7Dj\u001fC\u001fy\u001bG\u0016<<E\u0016\u0017xQɋZH^GE\bȷ0כ\u0012D?\u001ejfԸC9\u001el|2ʏ\u0018\u000e};\u0013XCЗq>Wm\u00071wLҊ8\t \u0018^\nA :rN-dt\u001e\u001fL6Z\u0005q\r\u001cN*E/#PXAk<\u000b\u0013\u0019Qz\u0002.Hp4\\!<\u0016p\u0003\u000b`\u001ait\u0017\u0019˭Fq\u001e\u0006X|1\"LJE(>~\u0016mߍ\u0012;SVZ\u0018\fI')\u0017xZ1g8h%}[\\\n\u0015C\u001e\t.U;[p\u0001D[\u0004wVpNK̸\u001d\r\u0016滤n\fh\tWN\u001f:5,ƛ.\u001e\u0005К\r\u0001\fp\u0017\u001a\u001f\\ԴSg\u0014]ҙZ'\u0017\"mD33\n:82T1}nƹ\u001bɈ\u000fa\"@Щ\u0007peq,YˢOcV+C̚\u000b8ɴZR\u0017}D\n\u0003MnѳZj]\u0006%N+K=үF\u001b\u0000AGI=\u0018XZem\u0001ɉly$0ʊSҽR~YAng&Ot\"\u0013_N{R>̫hd)\u0019\u0005[\u0004V\u0005V\u0013@\u0017ei\u0003@`h=znNq@\u0014ܕ\bණapVJЖNp,\u0017N\u0016\u001d\u000bG\u000b/0:\bf1Kt&o\u0019N#AQ}(@N8\u0004@54`C\u001fv\u0013XcFik\u0014|6\u0017-\u0002\u0002o\u000f3p#\u000f!\"Q\u001cK\u0004\fNgO,p\u000f7a'9БL92w\u00074]t\u0015\u0017>c\u001c߇\u001b\u0002ovm\u000f\u0019C\u0018p׮t`-lȐm\b\nMG?z-q\u0002wgva-\u001cB\u0002\u0003퓓\u00061@jy\u0000tK&PPF:-\\s97X\u0001\t\u0005ip>\u0018it\u001c@\\C6ә\b\\8\tTcRtLYD\r\u0000\u000e\tD4\u0016\u0010[c{;}\u001d\u0019Ç)D)\u0005&I\u000bS\u001cL\u0018\u0010%[D[\u000f^΀<\u0015r\u000eO=\\M\u001c,>϶Kj>Iy^8i)\u0010\fUDc/\u0011?\r\u0000S'h:a@\u0014>\u0012G5#$APgHլ\u0014IḒ8\u000ejG#ea\"yU@K%>\u0010&+ERiJ<\u0016rBw%9*`Yj\u0014ܥf\u0014{\u0018֜\u0011Μ@`Mw<h5iu\u0007(\u001bV\u001eѪn\u0011ӚV^6Sh\u001aV>&Oj\u0018z%Tۆ/\u001c<\"fG*J|bǤI5*x'+\u000e|Իe.\u0010CaX(|\u0013bZTV^Ϊȯ$.P+j*ea\u0002?[\u0016yHj4^WBE\u0007ʏZӓ|ʏ\u0006[ñ8H_\f\u0018.\u0017\u0016\rܚ\u0002N\u000b4z;\u0005%\u0016W\u001dlft6&b\u0000\u0015T\t\u0003,h\u001d<|7\u0004,c\u00021g60*x\u001fH)gE{J4yp,(:B\u00113*+42\\\u0004hսymS\u0001T\bH\u0014emCR\bc\u0011\u00168K\u0016C\\r\u0019\bY\u001dU:\u0007t(|\u0012R\u0007)VB8_(_̉BX2TKI`%\u0015)^\\EFq\u0003]-m\u0012( s+J)PЎ\bԂ\u0005*J\u0019M\u001do%~\u001d,\rx4bbFfJ\u0011O@%5r˥\f׌ \u00106\u0016%UR\u0019\u0004Kl)\u000b͹\u0011\u000eE\u0017\u001bwDH2KT\u0012ܔ\u001fV^)6\u000eB\u0007B(΍uPA[\u001f\u0013a(XWf˙Qn=}}apV8\u001c {\u0014UY0:ɇơٔYz3:rl\rt;8֖\u0004G;FoA8;\b0&[=@n=-l\rRm\u001bb*\u0006b*:KxHmZ.!նAj\u0014Am@jI\u0000\u0001\u0007H\n5H\n5HMH\u001a&B\rRm+B\rRm+B\rRm\u0003R\u0006\u0001~C(\u0013\u0010u\u0011uT0&\u0001n\u0001\u001d\u0007T\u00034y=\\\n\u0003Lf<bqJә\u0001\\b4K\u0006rv@-<\nPKm\u0002Pj\u001c\r\u0002*Z.2\u001aP+F\u0002jT;Vdn\u0005Ա]0\u0000(s\u0000uGo:M\u0007T;&(@u\u0001j90/J}\\VɅX}k4B~A\u00064C_\n\u001f?\n8߄Kim\t\t-\u0006\u0005G\"\\Q7)zZbr(Jq]oP\u0012\u0001:F\nZ@ZgKo`Yo߿v\u0010`\u0002qa[7\u001d\\'So=o^Kn\f\u0016\u001f>z~EkIqtڇO^3P\n}PsLTqO\u000b$:SX\u000f\u0007\u0013\f\u000f7H.ёy\u0004-\u0001>:Ú\u0015\u0010>\u0004@Fb\u00191>\u0018p2Nae}F\u0000\u0018n\u001e?hP\u0003lKJ6Z\n(JW\u0001EY\u0007\n\fk`HH-@_nbU\u0000(E\u0001Q\u0002\u00135ÞѪZ \u0004pY\u0017QowYW{\u001c)a\u0004\u0007\u0000\u000eŸ\u0007\u0011\u000e9doJ\u0006\n\u0010\u0004S5!i\tѸT\tu%H)sh@KVJ魑ɮ\u00158+_*RJ\u001dB\u001cT@\u0007\u0015c/L6d\b\u0005M\u000bu\u0004jV\u0010\n(gk\u0013?\nr~Ssg>[I_0M\u00180.a;\u000bpRs\b15Cӥ\u0004XD\nc:0-I\u001eՖt\u0010~|\u0019\u0011\f,gyɳ營]^\u0018^l/x\u001c\u00105 s.s\u000e&|5.Cf\u000e\u001b_\u0012gKT\u0000%83o\u001fZ.Nܷ͞\u0013%J(QD\u0012%J(QD\u0012%J(QD\u0012%J(QDՁw(\u001d蝣[WBEoKu%EuCWîҡURT\u0017-\u001dR]%Eu\u0014Յ\u000e:RRTGJHIQ\u001d))#%Eu\u0014ՑSRGJHIQ\u001d));%-uԝSRGJSRwJZAI9\u0012%J(QD\u0012%J(QD\u0012%J(QD\u0012%J(QD\n\nD\u0012%J(QD\u000e\u0019UaѣGF\u001cjѻ9O \u001d?c}nVB\u0015\u001c;{;u~ԩzcTp\u0013S\u000f?`\u0003\u001fM8v.q]G9S\u001f|3=&RRޙ\u001e\u001e(뮣NG^\u0013\u0017/̞TO\u00038vt\u0017\u001aNCG͹sYz}uե]<g>}}'ws}?\u001e}Wo???Ͽp\u001f=tNܳO\u001fz<t\u000b_~k_/3\u000f{|\u001c\u000fdlS^W_y[/_zڧfXPU؈\u0013>GWnWwo]{я~ԉ5\u0003\u001b1\u0017\u0017Ϋ?_\u001f\u0007~\u0017\u001e7?8fu\u001e/~~?k?/}֧\u001f;=yC/|_{\u0017o/^7\u0017C=GvЈ#Ǧ?/W˷~/~+͹G?ul\u0007\u000f㮣ýyŗo৯\u0015P\u0004+y/\u000f\u001d<`Kڷ~_屙_\u0017{f\u0019>UqAp\u000f?{*zg?z\u0001\u001e<*pT<(\u001e?xk3\u001b?ɿӟ}A\u001c\u0019\u0007}P~<{?\u0019\u000fc\u000f\u001f>89ù\u001fn>8ڏ)~L޵\u000fɢ\u0014'J(QD\u0012%JNӧ?x~1:9ӳ2\\\u001a\u0018OINo_^X^[\u001d?=Bi<;{i8X΄\u0019\u0016ɞX_O-\fV\u000fgA\u0005,1d{V\u001f\tnгlQs#\u0016`Ϭ./-\u000eX_^\u0005^\u001f\\\u0019^\u001a\"yf|dɲ\u001bٙsӳO\u000f<sE]bQ\u000fd\u0015V#\"%'{K9C1\u001coUs\u000e\u0015&:(e-'dg/m\\\u001a./\u000e\u0017Y#``G(\u0003dz-\r<3,/n<+mz͍aS1.\\]\f#@~ŵ냕w[[_\u001df\"ޏpfmپs+k\u000bn-\u0018\u001eý?\u0011Z\r-4X\\yc^\u0011{k`\u001c,\u000fV7\u0015Y'T\u0013\u0010;\u0010k\u0010$75Zn\u0016;hN\u0014?Vc4Q\u000eW(n^T\u000b;\\niB\u000ezv@=9X\u001f\\\u000b\\]ҽ\rV\u0017W\u0017\u0007ׇ#s_@s`eFĥb\u0019+\u0003&\r&\u0019rͅq̂P\\1\u001f~,)g@6L'Xg7\u0016N<\u001c\u0013/󮄤3!Q{}}\u0017ɐ\u0012l\u00000@\u0012\u0017yZ\u0003\n\u001f\u001a8I*$K]jsUljU\u0015=>y>/\"&o`\u0007rܐ7ԒUZkQyPdsvBք}\t\u0012%;`\u001cU\u001aa3KL\u0019\u0000T`\u0004\u001a#5q[][.<vOk7+\u001e˞?}dj8X\u0004Rk\u0010*Qk\u001a\u001a\u0007\u00118Y)\u001c\f+mx6\u00137\u0017F\u0015(\t}\r\u001eFa\u0005C\u0010\u0017Z<Z~&\u00041Ɛ*gv=\\\u0006+\u0012Of\n<T\u0005)r\u000b<r|u\u001e>6>5ʀep%^6\\\u00122ZcĒ\t\u0013лVf\u0017;\u0003\u0001HŅo9TcaD\u001f2\u001c-RiάŉX1)m\u0006m\fhW1+bZpI(\u0004hZPB`R\u001c\u000ft%Јe|\nF8\u0000+\u00018B\u001dhP\n\u0001φj\u0002ᄆ\r\u0011\rjisĵ<}\t!y=)u\u0004U\u0018U\b9a]\u0006{!\u0015篝(/\\Y6+LI_3\\-lJ\u001b\u0012!ΰj\u0015\u0013fE!Y \u0018+uYZ\u0012ʺCn\t\t\u0013\u0012&$<H{\u001eP\u0003ř\u000fA\r\u0019rLk̖L#PH=6\u00069=:yP+1\u001e\u0004S\u00122h\rRL\u000137Z\u001a\u00049ApW\u001a(&\ni,dЮKa\u0005@3ҧP:fǱN9Ȅ\ro-#$F.(6 n.\u0010\u0003LֱRAR\u0002cJ7},\u001die֬M)\u001a&.5\u0005Ӊ3qLk'd])+yrٍHAmZ\u000ep\u001c2)KMcђڐs\rPkU{$F5܈rY\"F_j*Ft\u000b^ըrnv)q-߰1A>\u000eA\u0004fh}a\f>\u000eL'5Bʘ\\(\u001afm4\u0015\u0013[ȼ&g\u0002mAS4b\f--כݨ\u0014ԦVg}D___}{o_~_f\b\u000b Ճ\\\fdsPdp\"\u0006>kf!0s\u000f%Ra3½M\fg\u000b{>*T^q|GJd/Cw\u0002\u0007@\\;oJ*n/\tw3\u0014{!B9酅/m\f\u00065\u00071X$U8AIm|SA\r\u0018̈́P\bE %h75 4b\bWrv\u0012vw7ى֨RN^\u0019;q|{\u0002\u0007QA݂;2qpmR\rU\u0011\bqDqu\u000b똵\u001b\fp؃c\u0016C\u0019\u0005(e\u001d(-I_[;t~ڭ|\u001e(\u0004Bj_in魉\u001agxBN\u000bᔏ^{\u0007-zs8_cP<^0z\t/\u0005@(ђBo@x\tq] 5C08G(4mƲ&#\u001e;\u00075\u001a\u001fҴZ\tp 9\u0018h`xzVa2Xfqv\\H<qǟƀFx\nTmA\u0019\u0017a`\u0016N\tr.m濾R\u00003t\\JFA(A䒑x(\u0002,E2[\u0005:\u000bğit\u0001!)l8'A9RY\u0012\u001dNRؾmA7>\nTQe\b\u001b\u001c,}\t/[Z\"A\u0010CˊbVU\f\u0018%d\u0002ǰC,.%~Mg*$:(KVjjV\rQPe\u0011}\u001d\u0007\u000bӓ\"jL֪crM؅HgSi%kJW\u001d;N{/^n3#i\t/S|\u0016\u000e+\u0017\f4e\b\u0000\u001cАq?\u00120i[^\u0004%XP8ټ}K5W#[P\u00114\u0016=zUF\u001cVK\u0010\u0017Xv\u0015đYa2\u000bPV9|:\u00024\f%\r{m\f{vp*BʙR}?Vʙ2<we\u0003\u001fe5\u0011\u0003w\u0003\u0019!h\u001dz=,G<\u0018X5\u0004p\u0005FUIE\u0003W±j\u0010,\u0012Q\u000e,\tc\ry\u0017XJU\u0013Vb)|3i1\u0019/UI@1٤IcJ#!\u0015-\u00020HT_oC\"ڄS\t|\u0013Zvgb7C~\tQ\tuV4o.PtJ\u0007C[(k*dA7h\u00177)\u00062\u000f(S^\u001a\u0013\u0016\u001f\u001d\u0005џ\u0015_\u0013y+[%j3\u0017'7\rwH*\u000fצ\u0016E\u0003Gµ*_UB\u000b9Dy\u0000(\u0018\u0014\u001f\u0003~\u00079\r<E*wz\u0004jQF+j9݆ N#P˪\u0011ee\u001bjYVOmC-hEQC-s\u001cja\u000eeu\u0017RP˚6vj9GS|\rj\t\tʨE/V.Pʉ\u0002JOZ6:xx\u001aq\\e_%\u0000K<o\fo\u001e?9ͱahs\u0004\u001c\u001c8clE\u0013\u0004\u001c`B!\u001cO81\n@5c2Z(\u0002\u0011QВRqMD8\u0010Q-\u001fR\u001c\u0001\u0000LM8A㣷;\u0005>94(Y\n04J3E\u0004EInudo[d2usD\bFY\n\"Oa\u0014\u0007붆;縵\u001e\rP~4h\u00178j]\".J\u0007fQRd\u00110\u001a4(@m+TdLE+g80>ip\u0003}u&(O1Sx\u001c{\u0006\b\u0011\u0003WxAӏ]}'|rg.}c͠nϑ\n\u001cD\u00192&=FR(K\u0010co\\TŅ^\u000f\u0013N?92|z}BY\\10\u001bRy\u001cfeWև76ևٍgnQ\nTpǞ@7\u00039\r\nendstream\rendobj\r49 0 obj\r<</Intent 175 0 R/Name(Editor)/Type/OCG/Usage 176 0 R>>\rendobj\r50 0 obj\r<</Intent 177 0 R/Name(Cuts)/Type/OCG/Usage 178 0 R>>\rendobj\r177 0 obj\r[/View/Design]\rendobj\r178 0 obj\r<</CreatorInfo<</Creator(Adobe Illustrator 29.5)/Subtype/Artwork>>>>\rendobj\r175 0 obj\r[/View/Design]\rendobj\r176 0 obj\r<</CreatorInfo<</Creator(Adobe Illustrator 29.5)/Subtype/Artwork>>>>\rendobj\r151 0 obj\r<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 1.0/op false>>\rendobj\r171 0 obj\r<</Filter/FlateDecode/Length 289>>stream\r\nHRN0\f+\u0003u,i\niBc\u0007>`!46_9ɶ\u0013ͳgVǧx03=n\u0001cQgr;\\^酿ȉj`'A}ˑά(\u0007 ȇO2p(9e\nӊ\u0007u*[t\\\u0013*J4Dh6d\fX\u0010E1['h )}RLB!.>\u0016ΒJVFR>T\u0010\u0014-R[8\u001b1Z]\u001b`]\r*+\f\u0013{[z\u0004rj\u00036^\u001b)5ƙr\u000f]!KQx@e\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000ySzg\r\nendstream\rendobj\r172 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r169 0 obj\r<</Filter/FlateDecode/Length 284>>stream\r\nH\\QN0\u0010W\u000fvl_\u001bPO\u0015*=\u0001\u0015\u0014\u0012vZ\u0010J<ޝs2>\u0018a<\tcS\u0017\b\u001dx/N5»aY-\u0017(<\u001fEFjH8}QCuZ\u0012n*L\u001b\f-\u0014/w$q#\u0016Qu\u001b\u001enUeD;8lu3Wj^ѼT\u0013sRej$\u0016TQ\\XAy٥\u001dm\u001drMɁ\u001fKiյ\u0003O=8Kh0L\b&BM{\f\bj:\u0012&6}gu\u0007n.ye\u0019H,#\u0007k ?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\\ c\r\nendstream\rendobj\r170 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r167 0 obj\r<</Filter/FlateDecode/Length 288>>stream\r\nHSN0\f+\u0003M$m+\u0005B\u001e\bvH}\u001bW֞;Rۧ(|w?2=\u0011J+\t{{\u001aWz\u000f\u0012\u001aY\\TۉQIWV\u0016\u001c\u0014\u0002+2\u000b\u000by\u00004\u0001]E\t\u001aq>x\u0010}%]\\(^\u0007nEQ\u0004A>A^\u0007zcPvu\"D \b\fw1u\u001b\u0014вdixvZ\rT-5Od&#ت\n.}+U\u000b|NvZdN7:#wt4S\u0006g\u0003LLUl]T{w9\u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0007\r\nendstream\rendobj\r168 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r165 0 obj\r<</Filter/FlateDecode/Length 118>>stream\r\nHL\t@\fDb\u001a,ڀ\bZ\u0007A \u001elC\t0wk\u0002\\\u001d\u0014Y\u001e Emn\u001biL&8+c\u00071V旽bd6D\n*Eζ\b3K/O1s\u0014\u0011_z\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\fO\u001d\r\nendstream\rendobj\r166 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r161 0 obj\r<</Filter/FlateDecode/Length 88>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\t\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015)n\b\u0011\u0007\u001b\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0007\u0017\r\nendstream\rendobj\r162 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r163 0 obj\r<</BBox[-76.0 70.0 23.0 -27.0]/Group 179 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 181 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 182 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n99 0 0 97 -76 -27 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r164 0 obj\r<</BBox[6.5 33.5 32.5 9.5]/Group 183 0 R/Length 249/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0 0.051 1 rg\n/GS0 gs\nq 1 0 0 1 22.375 9.5 cm\n0 0 m\n-5.75 0 l\n-11.342 0 -15.875 4.533 -15.875 10.125 c\n-15.875 13.875 l\n-15.875 19.467 -11.342 24 -5.75 24 c\n0 24 l\n5.592 24 10.125 19.467 10.125 13.875 c\n10.125 10.125 l\n10.125 4.533 5.592 0 0 0 c\nf\nQ\n\r\nendstream\rendobj\r183 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r179 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r182 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 97/Intent/RelativeColorimetric/Length 134/Name/X/SMask 184 0 R/Subtype/Image/Type/XObject/Width 99>>stream\r\nHA\u000e \b\u0005QmR\u0011\u0013>4\u0003vc\u0010\u0011\u0011\u0011\u0011]|<>Y\u0001Z\u0012t-\u001d B\tO\u001b\u00105NO\t!\u0003B+\u0004\f\b\b_\u001e;\t8r*N&7H\u0012*>b\u0006\"\u0005Lx\"\"\"\"{\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000V\u0005e\r\nendstream\rendobj\r180 0 obj\r[/Indexed/DeviceRGB 1 185 0 R]\rendobj\r184 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 99>>/Filter/FlateDecode/Height 97/Intent/RelativeColorimetric/Length 755/Name/X/Subtype/Image/Type/XObject/Width 99>>stream\r\nH?H2a\u001cǽ;KOP\u0013T\u0014D\u0010ĸvC\bjCIm(\u0004!!\u0017hA?I\u0015 )>oCﻟ\u001e/|۞\u000f=\u0012\t\u0004\u0002@ \u0010\b\u0004c@a2ˣ(aR\u00005`}L\u0013S$I\u0001Hr\u0018:N\u001f\u0001Ahaff\u0018Fe$G2>hZ7\u0000QShɁ \u0018N\u0019bsKKf1j\u00199cci\u0016\u0011Bc99_[{=n9g5h\u0014\u0014A\u0001\fYݵ\u000f&\u001f\u000e\u0005.yV9=\u0006\u0007Rga9\u0006\u001f\u001d\u001c\u001e\u001eģc-:%\u000b\u0003$M*f-+p,<>Mg3d\"\u0016\u000e[f\u0015A\u001a3\u001e\u001fdsR檐˞\u001c#+Y#\u0017*P\u0004\u0018\\ KJZ)v$\r\f%\fP\u0004|xx[7Z헗vQ\u0016/Re@8\u0011;\u0014jN^f9m\u0019UT\u0002ej'NV>\u0018\u0002\u0006nv?I~E-Q\u0001E\u0004qh2[6oÏ/cmVKd4t4! \f\u0004R\u001dP8WwC \u0004\u0000ɰߩsۡWL\t\b\u0003@\u0014'sZ4\u001f_/{Q)=,\bC1-x`W1\u001a>_wy\u0011\u0000´]?{7Ap}\u001f-\u0015\"4J'N~pq\fqOJ\u0012b\u0015c<\u0010a\u0011cT\u0013c\u0014cl\u0016a\u0011!&\u00119f\u0002C \u0010\b\u0004\u0002@ ?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000f\u0012\u0003\r\nendstream\rendobj\r185 0 obj\r<</Length 6>>stream\r\n\u0000\u0000\u0000\r\nendstream\rendobj\r181 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 186 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r186 0 obj\r<</BC 187 0 R/G 188 0 R/S/Luminosity/Type/Mask>>\rendobj\r187 0 obj\r[0.0 0.0 0.0]\rendobj\r188 0 obj\r<</BBox[-76.0 70.0 23.0 -27.0]/Group 189 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 191 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n99 0 0 97 -76 -27 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r189 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r191 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 99>>/Filter/FlateDecode/Height 97/Intent/RelativeColorimetric/Length 755/Name/X/Subtype/Image/Type/XObject/Width 99>>stream\r\nH?H2a\u001cǽ;KOP\u0013T\u0014D\u0010ĸvC\bjCIm(\u0004!!\u0017hA?I\u0015 )>oCﻟ\u001e/|۞\u000f=\u0012\t\u0004\u0002@ \u0010\b\u0004c@a2ˣ(aR\u00005`}L\u0013S$I\u0001Hr\u0018:N\u001f\u0001Ahaff\u0018Fe$G2>hZ7\u0000QShɁ \u0018N\u0019bsKKf1j\u00199cci\u0016\u0011Bc99_[{=n9g5h\u0014\u0014A\u0001\fYݵ\u000f&\u001f\u000e\u0005.yV9=\u0006\u0007Rga9\u0006\u001f\u001d\u001c\u001e\u001eģc-:%\u000b\u0003$M*f-+p,<>Mg3d\"\u0016\u000e[f\u0015A\u001a3\u001e\u001fdsR檐˞\u001c#+Y#\u0017*P\u0004\u0018\\ KJZ)v$\r\f%\fP\u0004|xx[7Z헗vQ\u0016/Re@8\u0011;\u0014jN^f9m\u0019UT\u0002ej'NV>\u0018\u0002\u0006nv?I~E-Q\u0001E\u0004qh2[6oÏ/cmVKd4t4! \f\u0004R\u001dP8WwC \u0004\u0000ɰߩsۡWL\t\b\u0003@\u0014'sZ4\u001f_/{Q)=,\bC1-x`W1\u001a>_wy\u0011\u0000´]?{7Ap}\u001f-\u0015\"4J'N~pq\fqOJ\u0012b\u0015c<\u0010a\u0011cT\u0013c\u0014cl\u0016a\u0011!&\u00119f\u0002C \u0010\b\u0004\u0002@ ?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000f\u0012\u0003\r\nendstream\rendobj\r190 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 1.0/op false>>\rendobj\r156 0 obj\r<</AIS false/BM/Normal/CA 0.100006/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.100006/op false>>\rendobj\r158 0 obj\r<</Filter/FlateDecode/Length 339>>stream\r\nHL;n0\fw\u0017LJ~qNA\u0011dhvM\u0006%\u0003%E*d[\u001fi'h\u0016lO\u000bcA8Ӛ͵\u0001OO#\u0007\t0#Iޱ\u000fAy!aCFȃ\u0007\u000b\u000fP\u0003\u001a\u000eE\u0018;׍\u001apȎf-/5F\\akS4c\t*\u0015e.tM%)\u001b&V1f˺tJc_8 HKbw^Q빮\u0014tz0!ˋ3طUtmi\t/HU+fTz-T9\u001d8kbfivA\u0002QSc`{Qr]0a.SJ\u0014VYrtB)\\F!z;2z;Ǝ\"\u001e^;\u001ex+?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000Q1\r\nendstream\rendobj\r159 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r160 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 192 0 R/ShadingType 2>>\rendobj\r192 0 obj\r<</Bounds[0.0 1.0]/Domain[0.0 1.0]/Encode[0.0 1.0 0.0 1.0 0.0 1.0]/FunctionType 3/Functions[193 0 R 194 0 R 195 0 R]>>\rendobj\r193 0 obj\r<</C0[0.0 0.588235 0.533333]/C1[0.0 0.588235 0.533333]/Domain[0.0 1.0]/FunctionType 2/N 3.70042>>\rendobj\r194 0 obj\r<</C0[0.0 0.588235 0.533333]/C1[0.0 0.611765 0.552941]/Domain[0.0 1.0]/FunctionType 2/N 1.77907>>\rendobj\r195 0 obj\r<</C0[0.0 0.611765 0.552941]/C1[0.0941176 0.623529 0.596078]/Domain[0.0 1.0]/FunctionType 2/N 3.70042>>\rendobj\r154 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\t\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00038\u0012'\r\nendstream\rendobj\r155 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r157 0 obj\r<</BBox[-30.0 70.0 69.0 -27.0]/Group 196 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 197 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 182 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n99 0 0 97 -30 -27 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r196 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r197 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 198 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r198 0 obj\r<</BC 199 0 R/G 200 0 R/S/Luminosity/Type/Mask>>\rendobj\r199 0 obj\r[0.0 0.0 0.0]\rendobj\r200 0 obj\r<</BBox[-30.0 70.0 69.0 -27.0]/Group 201 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 191 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n99 0 0 97 -30 -27 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r201 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r152 0 obj\r<</Filter/FlateDecode/Length 190>>stream\r\nHD=\u000e0\fw\u0017\u001b\u0007JA*T:p\b\"\u0015\u0006\u001b7ENbK`5\u0016\u0006Q)bE3X\fy\u0019;\u0005K\\[\bv,J0:G~\u001fiM`\"\t8a&\u001fԆ#\u001d\u0006o-I؀in\u0005Tw)\\'iHέn)J-\u0013\u0014i,Z_\u001e6G'\f\u001f\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000<<\r\nendstream\rendobj\r153 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r149 0 obj\r<</Filter/FlateDecode/Length 212>>stream\r\nHRI\u000e0\f\u0015\u0000Nki\tUC\u001f\u001cB%\u0004\u001f*'c{,O(RjkSpn\u0005T8S\u0013hti\u0015;\r*(\u0005\n'R\u0012c4l1a\u001b$\b\u00053Yg$.؋GG=cMl\u0013v&\u0017D w(q\u00132\u000e\u0004\u001c'.'\u001fRi[{,K\u000e-7\u001a:\u0000\u000f\u0007\u0019ߏ^\u0006O?/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001b+lg\r\nendstream\rendobj\r150 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r134 0 obj\r<</ArtBox[2.0 2.0 4.5 38.0]/BleedBox[0.0 0.0 10.0 40.0]/Contents 202 0 R/CropBox[0.0 0.0 10.0 40.0]/Group 203 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 40.0]/Parent 102 0 R/Resources<</ExtGState<</GS0 204 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 205 0 R>>>>/TrimBox[0.0 0.0 10.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r135 0 obj\r<</ArtBox[0.0 0.0 40.0 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 206 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 207 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 102 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 209 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r136 0 obj\r<</ArtBox[2.5 2.99998 16.5 16.0869]/BleedBox[0.0 0.0 20.0 20.0]/Contents 210 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 211 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 102 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r137 0 obj\r<</ArtBox[0.0 0.0 40.0 34.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 212 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 213 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 102 0 R/Resources<</ExtGState<</GS0 156 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 214 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r138 0 obj\r<</ArtBox[0.0 0.0 33.0 34.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 215 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 216 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 102 0 R/Resources<</ExtGState<</GS0 151 0 R/GS1 156 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 217 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r215 0 obj\r<</Filter/FlateDecode/Length 231>>stream\r\nHRIn0\f\u0015\u0001S&i}IPd\u0001\u0000u\u000fv\u0007BIv6\u0004G$\u001d:\u0003\u001c̸\ni$e5\u000fz7\t٨`+\f4Qxar0Sfj\u0012\u001b$Q\u0010ō&\u001a\u001a9TXu\u0003\bM@iGTv\u000b\u0006DS[J\u000bҳfr5nZz!E\u0006c\u0000QʩCΟa4ck~le^g\u001c\u000e\u0000\u0000\u0000\u0000\u0000\u0003\u0000*xs\u0012\r\nendstream\rendobj\r216 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r217 0 obj\r<</BBox[-76.0 25.0 23.0 -72.0]/Group 218 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 219 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 182 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n99 0 0 97 -76 -72 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r218 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r219 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 220 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r220 0 obj\r<</BC 221 0 R/G 222 0 R/S/Luminosity/Type/Mask>>\rendobj\r221 0 obj\r[0.0 0.0 0.0]\rendobj\r222 0 obj\r<</BBox[-76.0 25.0 23.0 -72.0]/Group 223 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 191 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n99 0 0 97 -76 -72 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r223 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r212 0 obj\r<</Filter/FlateDecode/Length 222>>stream\r\nHRI\u000e0\f\u0015@\u001d;\u000b+\u0005z\u0001!\u0016\u0007TP\u000e-\t7\u001b\u0013/c{\u0012G1\u0012ͦd/JFɐd\u0001>Bw\u0013\u00144Ձyj6qq\u001d0ř_7C\f\u000f\u0014d\u0015AkM\u0003F\nXw0`\u001d\u0014\u0014bl\u0010!\u0004))8Iv\u0007pɴ_ Lq$\u001e3:\u001e@!ԛ3F1Φ\u001d|Ij\u0007vf\u000f}\u000e^\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0007dq\r\nendstream\rendobj\r213 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r214 0 obj\r<</BBox[-30.0 25.0 69.0 -72.0]/Group 224 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 225 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 182 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n99 0 0 97 -30 -72 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r224 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r225 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 226 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r226 0 obj\r<</BC 227 0 R/G 228 0 R/S/Luminosity/Type/Mask>>\rendobj\r227 0 obj\r[0.0 0.0 0.0]\rendobj\r228 0 obj\r<</BBox[-30.0 25.0 69.0 -72.0]/Group 229 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 191 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n99 0 0 97 -30 -72 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r229 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r210 0 obj\r<</Filter/FlateDecode/Length 273>>stream\r\nHSKN0\f\u0014@\\;RЬFh\u0005\u0007\u0010,\nc;wQ\u001a~#eqό73^Џ\u001f1\u0017t?#\u001d\f#\u0007.F\u0005G\\^YP\u001910M`Ҡ\u0010-\u0015B\"gL9/4ZPƪ!G8%bEwt\tesUZѤM\u0013z\u0003\u0017Mm\u001b(\f\u0002)雴RQB,pˏ.v\u0018қuў}ƪN]/k?#>\\RuF\u0007\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r211 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r206 0 obj\r<</Filter/FlateDecode/Length 578>>stream\r\nHVn0\u0010}W\u000f{W\u0012BH|@ԋP\u0001\u001b\u0007ޑXeq3s|\u001e>\u001dp{4H\u0016AL*C&o\u000f+`pso\u0007^~xx2t])s<BoOWdpYFG:HIIMV\u001c\u0011NN9ծXEuhc=cCF༞FeXH\u000eLKq`-@FưgX\u0001@\u001cX&e\bV\tf\u0002\u0000\\\\U\f\u0005cݰ&8,\u000b)r\u0016eZ\u0004\n?~\u0007E-ڀTd[\n\u0007/\u0012}\r]T$l׸.\nmwm궉f\u001c\u001bM\f\f\u001dپOFo7$\u0005ij5l8'ؗ\u00027i\u0013\u0016~FO1\fv`/\u0013z\u0000\u0019}ąP\u001f('ԷN\n\u0004'\u001c\n,G\u0019\u0014y_J8b\u001f%\u000f'j\u0014r\u000e!\u000b\u001c۵p\tC+z\u001dKn\f8nL\u0004s}t-6ǵC>I\u001aFkx\u001b\u0012ca\u0012\u000b\u0011jC<\rI\u0001mo=6\u0015\u0003WޕKg\u001b_)%+\u001f4MS)5Ž8j]SW.]\"qS\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r207 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r209 0 obj\r<</BBox[-3.0 43.0 46.0 -6.0]/Group 230 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 231 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 232 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n49 0 0 49 -3 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r230 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r232 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 49/Intent/RelativeColorimetric/Length 111/Name/X/SMask 233 0 R/Subtype/Image/Type/XObject/Width 49>>stream\r\nHA\u000e \bDQ\u001bcT0Sa\u0001ڕ@F=5n\u0004w\u0002_\u0002\u001f\u0001\u000exH 1\u0010kP f\u0017+\b5нmf'2b.\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000)\u0007\r\nendstream\rendobj\r233 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 49>>/Filter/FlateDecode/Height 49/Intent/RelativeColorimetric/Length 1156/Name/X/Subtype/Image/Type/XObject/Width 49>>stream\r\nHoHZ{\u0018ǻ79zwiibl8\"\u001bp#\bf-z3+m鋱z1bM\u0014,e\u0017k\u0005w\u000bB{ҟ\u0017\u0011)n,X}yx><{_N_\bJ\u0006b\"\u000bNc$\u0012\u0000\u0002A\u0000px|.\t S4\b\u000bhT\n\u0019#D2\nљ,\u000e\u0017AxB\u0010.ŤC$\\\u0012H\u0018l$OX .\u0014\u001dJR(.\u0010!l\u0006D\u0001I5|H \u0015f!\u0002qL^PIJE\\V,\u0016 ,\nRYa\t\u0001\u0014\u0017IhEeFNJTUVrς)@*)l\u00012eJFo0Ԛ\u0016\\fsmѠר21\u0005I\u0007\u0000V\u0001@e \"YZo765ZZqؚ\u001a-F\\&B\u0018Tࠊ\u0005\u0002R}`mwt:].r9;;\u0006uR*`\u0000\n\u001d\u0011Uzӽ6w|^@oOvϤW\br\b`\u00191QIW<\u0010\bF\u00075\u00185hq\u001e\u0013)Y\u0002Hc\te\u0015z\u001d\tLLN\u0006ٙɉa+dB\u0016\r/\u0002T\u0010\u0014+\r\u000fSs\u000bb80?7a^o\u0017p pc1\fsťUF{``[x)\u001cY\n\n\fv\u001bUb.L>\u0000Hd:R4u\fO̅#kF,\u0016\tM\ft4h\u0014\b=MI@6wN/E7D<\u0019][\u001cl*%G\u0000^\u00113ۜ\u0003c\u000b\u000ezdazli3\"QgBѭퟻ~noEC3~\\]~\u0012X|g\u001f\\;Jxvjd\u0006ܾ@pqu\u0003\u0007p`c5\u001c\fܧ\u0000\u00148\u001bB\f\u0007S5\u0010\fۚ\u001c9|y\u001d-*9IݛVӵqbx/\u001dqeiGܭ?B}}+rQZ{g\u000fB\u000b߿~sQݍ%B6tpoܗO\u001fC/\u000fL1i+N7?lu\u0006uǠ\u0000YnTρLr=у[.H̃\u0019m=޿[g2TeR\u0001~Qzt\r\u0005i>A\u0003ӆq^zŲ\u0012<\u0004\b\u0001E\u0015e|>\u00014\u000b\"r ̀Ds<\u000eN;\u0012Oqű\f\u001b1W$pQ\u0018h\u00142\bd݌>4s^\u0002\u000f\u0014sq$k&K/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\\'h\r\nendstream\rendobj\r231 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 234 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r234 0 obj\r<</BC 235 0 R/G 236 0 R/S/Luminosity/Type/Mask>>\rendobj\r235 0 obj\r[0.0 0.0 0.0]\rendobj\r236 0 obj\r<</BBox[-3.0 43.0 46.0 -6.0]/Group 237 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 238 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n49 0 0 49 -3 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r237 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r238 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 49>>/Filter/FlateDecode/Height 49/Intent/RelativeColorimetric/Length 1156/Name/X/Subtype/Image/Type/XObject/Width 49>>stream\r\nHoHZ{\u0018ǻ79zwiibl8\"\u001bp#\bf-z3+m鋱z1bM\u0014,e\u0017k\u0005w\u000bB{ҟ\u0017\u0011)n,X}yx><{_N_\bJ\u0006b\"\u000bNc$\u0012\u0000\u0002A\u0000px|.\t S4\b\u000bhT\n\u0019#D2\nљ,\u000e\u0017AxB\u0010.ŤC$\\\u0012H\u0018l$OX .\u0014\u001dJR(.\u0010!l\u0006D\u0001I5|H \u0015f!\u0002qL^PIJE\\V,\u0016 ,\nRYa\t\u0001\u0014\u0017IhEeFNJTUVrς)@*)l\u00012eJFo0Ԛ\u0016\\fsmѠר21\u0005I\u0007\u0000V\u0001@e \"YZo765ZZqؚ\u001a-F\\&B\u0018Tࠊ\u0005\u0002R}`mwt:].r9;;\u0006uR*`\u0000\n\u001d\u0011Uzӽ6w|^@oOvϤW\br\b`\u00191QIW<\u0010\bF\u00075\u00185hq\u001e\u0013)Y\u0002Hc\te\u0015z\u001d\tLLN\u0006ٙɉa+dB\u0016\r/\u0002T\u0010\u0014+\r\u000fSs\u000bb80?7a^o\u0017p pc1\fsťUF{``[x)\u001cY\n\n\fv\u001bUb.L>\u0000Hd:R4u\fO̅#kF,\u0016\tM\ft4h\u0014\b=MI@6wN/E7D<\u0019][\u001cl*%G\u0000^\u00113ۜ\u0003c\u000b\u000ezdazli3\"QgBѭퟻ~noEC3~\\]~\u0012X|g\u001f\\;Jxvjd\u0006ܾ@pqu\u0003\u0007p`c5\u001c\fܧ\u0000\u00148\u001bB\f\u0007S5\u0010\fۚ\u001c9|y\u001d-*9IݛVӵqbx/\u001dqeiGܭ?B}}+rQZ{g\u000fB\u000b߿~sQݍ%B6tpoܗO\u001fC/\u000fL1i+N7?lu\u0006uǠ\u0000YnTρLr=у[.H̃\u0019m=޿[g2TeR\u0001~Qzt\r\u0005i>A\u0003ӆq^zŲ\u0012<\u0004\b\u0001E\u0015e|>\u00014\u000b\"r ̀Ds<\u000eN;\u0012Oqű\f\u001b1W$pQ\u0018h\u00142\bd݌>4s^\u0002\u000f\u0014sq$k&K/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\\'h\r\nendstream\rendobj\r208 0 obj\r<</AIS true/BM/Normal/CA 0.149994/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.149994/op false>>\rendobj\r202 0 obj\r<</Filter/FlateDecode/Length 87>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW\u0003\n\u0007\u001b(\u0017\u0003%C|r\r\u0014\\\u0002!\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\u0012$\r\nendstream\rendobj\r203 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r205 0 obj\r<</BBox[2.0 38.0 4.5 2.0]/Group 239 0 R/Length 285/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 240 0 R/GS1 151 0 R>>/Shading<</Sh0 241 0 R>>>>/Subtype/Form>>stream\r\nq\n4.5 2.5 m\n3.395 2.5 2.5 3.395 2.5 4.5 c\n2.5 35.5 l\n2.5 36.605 3.395 37.5 4.5 37.5 c\nW n\nq\n0 g\n/GS0 gs\n2 0 0 -2 2.5 20 cm\nBX /Sh0 sh EX Q\nQ\n0.078 0.522 0.431 RG\n1 w 10 M 0 j 0 J []0 d \n/GS1 gs\nq 1 0 0 1 4.5 2.5 cm\n0 0 m\n-1.105 0 -2 0.895 -2 2 c\n-2 33 l\n-2 34.105 -1.105 35 0 35 c\nS\nQ\n\r\nendstream\rendobj\r239 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r241 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 242 0 R/ShadingType 2>>\rendobj\r242 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[243 0 R]>>\rendobj\r243 0 obj\r<</C0[0.0627451 0.431373 0.368627]/C1[0.0627451 0.341176 0.278431]/Domain[0.0 1.0]/FunctionType 2/N 1.85328>>\rendobj\r240 0 obj\r<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 244 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r244 0 obj\r<</G 245 0 R/S/Luminosity/Type/Mask>>\rendobj\r245 0 obj\r<</BBox[-32768.0 32767.0 32767.0 -32768.0]/Group 246 0 R/Length 49/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Shading<</Sh0 247 0 R>>>>/Subtype/Form>>stream\r\nq\n0 g\n/GS0 gs\n2 0 0 -2 2.5 20 cm\nBX /Sh0 sh EX Q\n\r\nendstream\rendobj\r246 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r247 0 obj\r<</AntiAlias false/ColorSpace/DeviceGray/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 248 0 R/ShadingType 2>>\rendobj\r248 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[249 0 R]>>\rendobj\r249 0 obj\r<</C0[0.4]/C1[0.4]/Domain[0.0 1.0]/FunctionType 2/N 1.85328>>\rendobj\r204 0 obj\r<</AIS false/BM/Normal/CA 0.699997/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.699997/op false>>\rendobj\r129 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 250 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 251 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 101 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r130 0 obj\r<</ArtBox[2.81248 4.5 16.3125 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 253 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 254 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 101 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r131 0 obj\r<</ArtBox[2.0 2.0 38.0 38.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 255 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 256 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 101 0 R/Resources<</ExtGState<</GS0 204 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 257 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r132 0 obj\r<</ArtBox[2.0 2.0 4.5 38.0]/BleedBox[0.0 0.0 10.0 40.0]/Contents 258 0 R/CropBox[0.0 0.0 10.0 40.0]/Group 259 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 40.0]/Parent 101 0 R/Resources<</ExtGState<</GS0 204 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 260 0 R>>>>/TrimBox[0.0 0.0 10.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r133 0 obj\r<</ArtBox[2.0 2.0 4.5 38.0]/BleedBox[0.0 0.0 10.0 40.0]/Contents 261 0 R/CropBox[0.0 0.0 10.0 40.0]/Group 262 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 40.0]/Parent 101 0 R/Resources<</ExtGState<</GS0 204 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 263 0 R>>>>/TrimBox[0.0 0.0 10.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r261 0 obj\r<</Filter/FlateDecode/Length 87>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW\u0003\n\u0007\u001b(\u0017\u0003%C|r\r\u0014\\\u0002!\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\u0012$\r\nendstream\rendobj\r262 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r263 0 obj\r<</BBox[2.0 38.0 4.5 2.0]/Group 264 0 R/Length 284/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 240 0 R/GS1 151 0 R>>/Shading<</Sh0 265 0 R>>>>/Subtype/Form>>stream\r\nq\n4.5 2.5 m\n3.395 2.5 2.5 3.395 2.5 4.5 c\n2.5 35.5 l\n2.5 36.605 3.395 37.5 4.5 37.5 c\nW n\nq\n0 g\n/GS0 gs\n2 0 0 -2 2.5 20 cm\nBX /Sh0 sh EX Q\nQ\n0.122 0.82 0.682 RG\n1 w 10 M 0 j 0 J []0 d \n/GS1 gs\nq 1 0 0 1 4.5 2.5 cm\n0 0 m\n-1.105 0 -2 0.895 -2 2 c\n-2 33 l\n-2 34.105 -1.105 35 0 35 c\nS\nQ\n\r\nendstream\rendobj\r264 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r265 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 266 0 R/ShadingType 2>>\rendobj\r266 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[267 0 R]>>\rendobj\r267 0 obj\r<</C0[0.129412 0.878431 0.729412]/C1[0.156863 0.839216 0.690196]/Domain[0.0 1.0]/FunctionType 2/N 1.85328>>\rendobj\r258 0 obj\r<</Filter/FlateDecode/Length 87>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW\u0003\n\u0007\u001b(\u0017\u0003%C|r\r\u0014\\\u0002!\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\u0012$\r\nendstream\rendobj\r259 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r260 0 obj\r<</BBox[2.0 38.0 4.5 2.0]/Group 268 0 R/Length 285/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 240 0 R/GS1 151 0 R>>/Shading<</Sh0 269 0 R>>>>/Subtype/Form>>stream\r\nq\n4.5 2.5 m\n3.395 2.5 2.5 3.395 2.5 4.5 c\n2.5 35.5 l\n2.5 36.605 3.395 37.5 4.5 37.5 c\nW n\nq\n0 g\n/GS0 gs\n2 0 0 -2 2.5 20 cm\nBX /Sh0 sh EX Q\nQ\n0.106 0.718 0.596 RG\n1 w 10 M 0 j 0 J []0 d \n/GS1 gs\nq 1 0 0 1 4.5 2.5 cm\n0 0 m\n-1.105 0 -2 0.895 -2 2 c\n-2 33 l\n-2 34.105 -1.105 35 0 35 c\nS\nQ\n\r\nendstream\rendobj\r268 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r269 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 270 0 R/ShadingType 2>>\rendobj\r270 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[271 0 R]>>\rendobj\r271 0 obj\r<</C0[0.105882 0.717647 0.596078]/C1[0.117647 0.635294 0.521569]/Domain[0.0 1.0]/FunctionType 2/N 1.85328>>\rendobj\r255 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\t\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00038\u0012'\r\nendstream\rendobj\r256 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r257 0 obj\r<</BBox[2.0 38.0 38.0 2.0]/Group 272 0 R/Length 412/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.745 0.769 0.769 rg\n/GS0 gs\nq 1 0 0 1 35.5 2.5 cm\n0 0 m\n-31 0 l\n-32.105 0 -33 0.895 -33 2 c\n-33 33 l\n-33 34.105 -32.105 35 -31 35 c\n0 35 l\n1.105 35 2 34.105 2 33 c\n2 2 l\n2 0.895 1.105 0 0 0 c\nf\nQ\n0.494 0.584 0.627 RG\n1 w 10 M 0 j 0 J []0 d \nq 1 0 0 1 35.5 2.5 cm\n0 0 m\n-31 0 l\n-32.105 0 -33 0.895 -33 2 c\n-33 33 l\n-33 34.105 -32.105 35 -31 35 c\n0 35 l\n1.105 35 2 34.105 2 33 c\n2 2 l\n2 0.895 1.105 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r272 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r253 0 obj\r<</Filter/FlateDecode/Length 287>>stream\r\nHJ0\u0010\u0014\u0002s&?5VY\u0010\u0016}\u0004aw\u000bwn\u0011\u000e4\t{\u001a\u000eLw\u0003n<x%@/\u001b\u0003\u001b@o>`c:|wd}@Ά(\u0010׳ɧ\u0000t2;l Z^\u00123\t!pSFz5kFI$7۔>\u000e3L8UB\u0017>ٗ]J\u0003z\u000ek\u001fT'ڐ/P,3.}tR\u0019ҙ!\u001avhe\u0014XVS+95\u001d\u0017(X\u00136Ǎ'z{hN|bG\u001b\u0000\u0000\u0000\u0000\u0000\u0003\u00001\r\nendstream\rendobj\r254 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r250 0 obj\r<</Filter/FlateDecode/Length 323>>stream\r\nH\\RN0\u0010+\u0007\u0011;WRB*\bzIA-/\u000fPg;ҿN\u001f'\u0004[tu\b!˯>\u001b7_\u000bǝ\u001cz\u0004\u0013^\u0000!\b\fg/N\n]\u0002t\\+:\"?Ⱦ(yaX}\t\u0010l_j{b{C%C-\u0019fC\u001fH-|F&\u001eϵ|+\u0010wJҪ\u0017#4qaO%\b\u0017zmm23fg,60\u0014˿0jݬ0X62Օ<X\u001cEqY)[\u001aG\u00044\u0003\rq@bݶ6!\t$pi\f>~'\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000C\r\nendstream\rendobj\r251 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r252 0 obj\r<</BBox[-1.0 26.0 26.0 -1.0]/Group 273 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 274 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 275 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 27 -1 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r273 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r275 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 27/Intent/RelativeColorimetric/Length 68/Name/X/SMask 276 0 R/Subtype/Image/Type/XObject/Width 27>>stream\r\nHb` \b\u0018\u0011\u0000\u0004$#&-\u0003-U\u0006\"[\n\fHnT\nY%3*\r|)\no:\n\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0006_\u0002\u001e\r\nendstream\rendobj\r276 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 27>>/Filter/FlateDecode/Height 27/Intent/RelativeColorimetric/Length 324/Name/X/Subtype/Image/Type/XObject/Width 27>>stream\r\nH@\u001c\r\n\t-!!\u0007^;B\u001dx\u0002\u0012jmA\u001eR\n,\bZ\u0010\u0003r:/ٝL&o\u0005\u0000|\t_\u0000b\u0004I4M\u0004\u0006\u000f@T8X\u001b\u00023ja\u0018<1b.׶uT\u0004\u0016/\u0013\b\u000bCx\f\u000fX\u000bF\u001bxQYđ\u0014M?eyQ^\"Nc`\u0003\u0004(TuskEJ\u000f\u0004ə\t⼺]׵*6#\u0010%>)do\u0010\u0006ipôl~Pהi\u001a\u0012==Ot[sNq!!_6\u0010\u001dG\u000bue6PBO=\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000C4\r\nendstream\rendobj\r274 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 277 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r277 0 obj\r<</BC 278 0 R/G 279 0 R/S/Luminosity/Type/Mask>>\rendobj\r278 0 obj\r[0.0 0.0 0.0]\rendobj\r279 0 obj\r<</BBox[-1.0 26.0 26.0 -1.0]/Group 280 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 281 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 27 -1 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r280 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r281 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 27>>/Filter/FlateDecode/Height 27/Intent/RelativeColorimetric/Length 324/Name/X/Subtype/Image/Type/XObject/Width 27>>stream\r\nH@\u001c\r\n\t-!!\u0007^;B\u001dx\u0002\u0012jmA\u001eR\n,\bZ\u0010\u0003r:/ٝL&o\u0005\u0000|\t_\u0000b\u0004I4M\u0004\u0006\u000f@T8X\u001b\u00023ja\u0018<1b.׶uT\u0004\u0016/\u0013\b\u000bCx\f\u000fX\u000bF\u001bxQYđ\u0014M?eyQ^\"Nc`\u0003\u0004(TuskEJ\u000f\u0004ə\t⼺]׵*6#\u0010%>)do\u0010\u0006ipôl~Pהi\u001a\u0012==Ot[sNq!!_6\u0010\u001dG\u000bue6PBO=\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000C4\r\nendstream\rendobj\r124 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 282 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 283 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 100 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r125 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 284 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 285 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 100 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r126 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 286 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 287 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 100 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r127 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 288 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 289 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 100 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r128 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 290 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 291 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 100 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r290 0 obj\r<</Filter/FlateDecode/Length 325>>stream\r\nH\\RN0\f+\u0003I<J\u0017B+\n\u0005\u0012vn+8Lu8#<\u001cf0G.H[Wܖۧon\u000eo\b_|\u0019.\b\u001fs2b\u0000]'\u0000\u0010IW @\b<\u0017\u0012,\u0017#\r6:\u001elp!\u0015w\u0018KFo=Jw>/'X;ʼ\u000fw\u0001\u0015\u0016m򫙞J}eۛ]B7l-ENb\u0012RV@.o\u001a̭\u0015\u0016\u0017I\u0004]pb6r){\u0011:W*\u0018EzFHY%܅ĐiZ)QF\u0002vF#0ZW\u0016K#\u0002-\u0003gL]EٺV!\t$HkH\r>POO\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000efI\r\nendstream\rendobj\r291 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r288 0 obj\r<</Filter/FlateDecode/Length 320>>stream\r\nH\\RN0\u0010+\u0007_s%\u0005.T\u0002\u000f\u0017\u0017\u0012p\bz\fqFx8`\u001e\u0004^y\u001ac{4\u001fM\u001b/\u0005cNZ\u0019cۙeeW@C@\u0010\\j`\u0014F\u0017s\u0005[hbn|\u0011eaQ}\u001b1\u0013J/즚`\u0014{эd[`.\u0016jhB!Qމw\u0007I'\bV<\tDj$l\u0004\u0011Vj\u0018ey\u0017w\rwe)e$Fa:5ȾQ0-m\u0014J\u001d6Bl/4I\nF\\bL\u0003KO\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000M\r\nendstream\rendobj\r289 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r286 0 obj\r<</Filter/FlateDecode/Length 197>>stream\r\nHDPA\u000e \u0010\u0000KW[bc\u001aM|@XM\u0013w\u0000\u0003.\u0013\u00015\b\u0001u\u0018l(QBpA<\u001dL\u0015ax;~T\u0010y@ɭb%@<\b\u001c3\u0001I\t!!@\u0017\b\u0015\fDf'z(l~>b\u0003܊\u0006\\pub|u%3r\u001c\u0018\u001c\u0003$u͛t\u001f׫\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000A\r\nendstream\rendobj\r287 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r284 0 obj\r<</Filter/FlateDecode/Length 198>>stream\r\nHLPA\u000e0\u0010\u0015󁶻@\u0005z\u0018\u000f0E4\u0013w\u000bi;mgfS\u0005Tm]\u001a\u0001?Q<Q!$A5\u0015/!L>\"^~\u0013i\r,-A\u0014cFV\u0000\u0006`$\u0002\u000bF\tE9\u0012ԥE]f,ۨ\u001e9\u000e_\u0014\u001f39X/4;)V>b\u0012{\u0002\u001a6\u0003M;ok\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000~A4\r\nendstream\rendobj\r285 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r282 0 obj\r<</Filter/FlateDecode/Length 195>>stream\r\nHLP\u000e0\u0010+\u0007Rz\u0018\u001f@hOm\u0011Liwfv;>WMe+}C3e35\n\u0003\u0017xI]\"R\u001f/\u0006I\u001f\u0006-Z\n12zge\b\u000b\u0012\t\u001dS\u0001n0BAzC,I]\u0013Za=q6,~\u0007\\\u0001y0\u0017fvj\u001b\u000b#^Zr\r[\u0001ON'Ok\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000@\r\nendstream\rendobj\r283 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r119 0 obj\r<</ArtBox[2.99994 7.0 15.0 13.0]/BleedBox[0.0 0.0 19.0 20.0]/Contents 292 0 R/CropBox[0.0 0.0 19.0 20.0]/Group 293 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 19.0 20.0]/Parent 99 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 19.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r120 0 obj\r<</ArtBox[0.0 0.0 40.0 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 294 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 295 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 99 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Font<</TT0 296 0 R>>/ProcSet[/PDF/Text]/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 297 0 R>>/XObject<</Fm0 298 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r121 0 obj\r<</ArtBox[0.0 3.0 19.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 299 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 300 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 99 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r122 0 obj\r<</ArtBox[3.84512 2.42943 16.9049 18.3206]/BleedBox[0.0 0.0 20.0 20.0]/Contents 301 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 302 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 99 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r123 0 obj\r<</ArtBox[2.33333 4.54666 17.3333 17.12]/BleedBox[0.0 0.0 20.0 20.0]/Contents 303 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 304 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 99 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r303 0 obj\r<</Filter/FlateDecode/Length 190>>stream\r\nH\\P\u000e@\f+\u0003v\u001fWp\"\u00069\u0001h\f\u0007a!ƸNXqTʻ}th\u000be\u000b5K'}^\u000fR:ư[ǧ\u001cQ\\w\u0017Ms\u0014؋(1\u0014%#􈊒\u0007\nRb<C\u0019F\u001d?Rf٢hDWLEAg\u000e&.C\u0004\u0010$og~혾\u000f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000X74\r\nendstream\rendobj\r304 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r301 0 obj\r<</Filter/FlateDecode/Length 525>>stream\r\nHLS͎1\b)\u0002\u0003\u0018csmZV=\u0001v{VK\u001dpc\u0001\u00033\\OOg>k>}VJ~\u000f\u001fO\"+VRN_S}[\u0010\u001fܛ\u0011܆K\u0012rPbccXDVc5Q\u000fmD^Gi+\u000527Zi4\u001a#b\u0019{=i\u0011m\u0019'2qxϸi,P#.ͼ3\u001atpb\u00192\u000b\u001cy\u001eV[$қo6R˒F\u001b}%VYvҸAt\u000bd\u0014$N;\"\fW\u001c\u0002_\u0002:`ㆎ`p` 2\u0004\u0013\u0018' n\u001d(\u0002]~\u000f\"϶\u0010 I\u000f\u0012\u0014u\t\u00025Fy<!rξxa\u001aM+&R\u0014\u0005qP\n8H\u0002N6yZ\u0007\u0004G06_1Ehs\u001b\u001dG#\u000e.%t\u001dw﹠I\tFRns\u0007ěPN\u0012i\u0018\u0018ۀb*9c\b{Te=^6\u001eX_Ɓס@M>\u001e\u001e\u001fD5\u0010#MGs\\\u0000\u001f.\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00001A\r\nendstream\rendobj\r302 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r299 0 obj\r<</Filter/FlateDecode/Length 309>>stream\r\nHSN0\f)\u0002Mc'JA;Mh\u0003T0:m>IK\u0005Kbi\u0007lCć\u0001i+֏ȏN\u0010\u001ayo_\u0010Cό=\u0000f\u001fp\u001eCHwj\u0011t{$\u0003\"\n61t}%\b \u0015Y\u0010(\u0010\r'K\u0006\u001b\b\u0017Z[\u001fgicFRUg\tEXTRDΝUnAbb+P\u0006a9bR?`/V\u001f\"n!^\u0002%d2p\u001dd\u0016\u0017h1ZAf1 +DFrl\u0012]z#]c,]䟙-7\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000o\r\nendstream\rendobj\r300 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r294 0 obj\r<</Filter/FlateDecode/Length 537>>stream\r\nHMo0\f\u0015<n\u0007Ӥ>l4+0\u0018\u0018Xڠp6=\u0012d\u0018$\u001eJ~%bem\u0011v\u000f9$9t\u0006F~w~Ӊ\u0017<\fbɈ֐\u001d=@*\u000b`<Z!oJL\u001e\u000fpIK%0`\fyA/\u0001p\u00013\u000fH~4\u0005MHGʚ\u0005$\u001f咖Jډ\";ה\u001686S$\u0019K:U;Fh}p\u0013#\u0011wOL\u0013֏\r\u000e^]ΨS\u0011x~\u0013tLX\u001d.Щ-ոq'4hOSCC)\\\u0004,I*u\u0000XȤ\u001e\u0012Ph\u0001KƚBnUTv-(Y&b\u001c\u001a\u001bgQA.xv.^})T3hǀ爵:\u0001ZR6\u000b$ZajX\u0003±\rrnw?³\u0006SPemN:Up[\u001a!=\u001bJCDbvte7묟4?à9Q\f50\u0011פ|\u000f\u001fW[znW\u0004ѻ\u0019oڠ%\u0012EL\u001bj%,ζ{Ea5}f\u0019Yx.\u0013>\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000xo\r\nendstream\rendobj\r295 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r298 0 obj\r<</BBox[0.0 43.0 43.0 -6.0]/Group 305 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 306 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 307 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 0 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r305 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r307 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 49/Intent/RelativeColorimetric/Length 104/Name/X/SMask 308 0 R/Subtype/Image/Type/XObject/Width 43>>stream\r\nH1\u000e\u0000 \bCQzKhHKBX[f0\u0016\u001c>\u0003\n^.\u001bKBe\u0011E\u0019%e?ŧJ𳊨c+\u00011ٍ]CE\r\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0006\r\nendstream\rendobj\r308 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 43>>/Filter/FlateDecode/Height 49/Intent/RelativeColorimetric/Length 1115/Name/X/Subtype/Image/Type/XObject/Width 43>>stream\r\nHoL\u0013w\u0018ڻkGrP\u001fImC?\u0017\u0018 j M\b\u0001\u001eI⋆0$4ɻ\u0004\u0012Xq&\u00121dȒ\u0011\u001dŌ\td`\u0015FŮ\u000e\u001dͽ~sor:\bEF;ؤ8܁}H\u0012\u0000\u0000\bBY @HL\u0003\u0010\u000f#H~Z\bB $ȅ\u0011P\u000b\u0012\"\u0000iʒ$\u0000\u0010!I2X*Pa>\f\u0001\u001c\nb9\u0010,\u0010\u0015\u0016Kԥ:h0\u001a\u0011!\u000b\u001c'@%2\u0016/0UY,\u0016'cR0Mװ\u0001.\"(4xnxvtJ\\Vx\u0018\u0012JAXX(Ӝ048m.חW/_\"Wj\u0019v\b\u0006%\u000f!h\n7وVWgaRq>\u0017A\u0001\u0000kk\b\u001f\u0018\u001cvxh psV?vDH^,\u0015\u0016JJpsC'\u0010\u001c\rݻ^MWWOi\bk\u0002\rERuYu\u001b=61ӧ;\u0003~ΤW`\u0002n\u0016%\n\"hqiE?8$:W/L߹N;\byb\u0006@X3;\u0002\u0013\u0017\u0016\u00124\u0015\u001ed;d\u0006\u0017Uml<|lubt\u000f0X\\pdn~9қS\u0017db\u0004ʴ bJpӱZjscmee$<~lP\u0014CC\u001d}#\u000f~׻?~\u001e\u000fVc\u001aEz4\u0013_|{k#\u0011\u0007a5*1&w\u0018_ʠG5?!ρ\u0003J?PJ\u0007>n$ߦ?c\u001ffj}5\u0011#w3:@[kHxj\u0018>\u0003+ˉdhXɚ_H,_D'F\u0003]zSv\u00062(c^blXQ[QZ\"alA$:\u001dLN\u000ex]-eyeVph4\u00186\u0012\u0010\u0006r(}c`q\u00125Z9&-\f\u0007|^JF*l,]\\\u000ehi1\n\u0014{{\u0016A\u0010Mr\\\u0006\u0013ZVK\fתd\u0012T۵M\u001a\u0006T]\"/*\u0014\t`1ck+J<\b\u000f+#\u000b0\f\u0001J0d |Gf\fM\u0018zne`\u001e=\r\u0004b\u001eSԌ݉}\u0001\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000[|\r\nendstream\rendobj\r306 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 309 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r309 0 obj\r<</BC 310 0 R/G 311 0 R/S/Luminosity/Type/Mask>>\rendobj\r310 0 obj\r[0.0 0.0 0.0]\rendobj\r311 0 obj\r<</BBox[0.0 43.0 43.0 -6.0]/Group 312 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 313 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 0 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r312 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r313 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 43>>/Filter/FlateDecode/Height 49/Intent/RelativeColorimetric/Length 1115/Name/X/Subtype/Image/Type/XObject/Width 43>>stream\r\nHoL\u0013w\u0018ڻkGrP\u001fImC?\u0017\u0018 j M\b\u0001\u001eI⋆0$4ɻ\u0004\u0012Xq&\u00121dȒ\u0011\u001dŌ\td`\u0015FŮ\u000e\u001dͽ~sor:\bEF;ؤ8܁}H\u0012\u0000\u0000\bBY @HL\u0003\u0010\u000f#H~Z\bB $ȅ\u0011P\u000b\u0012\"\u0000iʒ$\u0000\u0010!I2X*Pa>\f\u0001\u001c\nb9\u0010,\u0010\u0015\u0016Kԥ:h0\u001a\u0011!\u000b\u001c'@%2\u0016/0UY,\u0016'cR0Mװ\u0001.\"(4xnxvtJ\\Vx\u0018\u0012JAXX(Ӝ048m.חW/_\"Wj\u0019v\b\u0006%\u000f!h\n7وVWgaRq>\u0017A\u0001\u0000kk\b\u001f\u0018\u001cvxh psV?vDH^,\u0015\u0016JJpsC'\u0010\u001c\rݻ^MWWOi\bk\u0002\rERuYu\u001b=61ӧ;\u0003~ΤW`\u0002n\u0016%\n\"hqiE?8$:W/L߹N;\byb\u0006@X3;\u0002\u0013\u0017\u0016\u00124\u0015\u001ed;d\u0006\u0017Uml<|lubt\u000f0X\\pdn~9қS\u0017db\u0004ʴ bJpӱZjscmee$<~lP\u0014CC\u001d}#\u000f~׻?~\u001e\u000fVc\u001aEz4\u0013_|{k#\u0011\u0007a5*1&w\u0018_ʠG5?!ρ\u0003J?PJ\u0007>n$ߦ?c\u001ffj}5\u0011#w3:@[kHxj\u0018>\u0003+ˉdhXɚ_H,_D'F\u0003]zSv\u00062(c^blXQ[QZ\"alA$:\u001dLN\u000ex]-eyeVph4\u00186\u0012\u0010\u0006r(}c`q\u00125Z9&-\f\u0007|^JF*l,]\\\u000ehi1\n\u0014{{\u0016A\u0010Mr\\\u0006\u0013ZVK\fתd\u0012T۵M\u001a\u0006T]\"/*\u0014\t`1ck+J<\b\u000f+#\u000b0\f\u0001J0d |Gf\fM\u0018zne`\u001e=\r\u0004b\u001eSԌ݉}\u0001\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000[|\r\nendstream\rendobj\r297 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 314 0 R/ShadingType 2>>\rendobj\r314 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[315 0 R]>>\rendobj\r315 0 obj\r<</C0[0.921569 0.937255 0.94902]/C1[1.0 1.0 1.0]/Domain[0.0 1.0]/FunctionType 2/N 1.06087>>\rendobj\r296 0 obj\r<</BaseFont/PVTDDE+ArialMT/Encoding/WinAnsiEncoding/FirstChar 74/FontDescriptor 316 0 R/LastChar 88/Subtype/TrueType/Type/Font/Widths[500 0 0 0 0 0 0 0 0 667 611 0 0 0 667]>>\rendobj\r316 0 obj\r<</Ascent 1040/CapHeight 716/Descent -325/Flags 32/FontBBox[-665 -325 2000 1040]/FontFamily(Arial)/FontFile2 317 0 R/FontName/PVTDDE+ArialMT/FontStretch/Normal/FontWeight 400/ItalicAngle 0/StemV 88/Type/FontDescriptor/XHeight 519>>\rendobj\r317 0 obj\r<</Filter/FlateDecode/Length 20324/Length1 54597>>stream\r\nH|yTTG\u0016_\u0006\u0005\u0011ܺqaЈ!=\u0013#\u0019\u001d\u0013uTvEQ[K\u0010\u00117TU\u0005\u0015\u0014NLh8G\rL\u001a\u001asnݺUn^խ\u0007\u00024\b\b\u001f1[\u000fayKDtRdr=\u0005@aY)r,/\b`S'%\nt\u0005<\u000eNJ\u001b7mEB[0=}rldLܨ@<^ɼ'}&\u0010v䤔9\u0004|M\u0016\u001dcy=*)rN>7S#bF\u0014\u0018mU).\u0001.t'ψM/z\u0018\u0007hA\u0010R6Dh\\1+-@G#<Z*:\u0004;b8\u001e\u0016\u00185|~\rb\u0013\nqKE@N\u0013P\u0013І*q8\u001foQ{.\f͝\\T.7\u000b\u001f\u0014\"sӴpzzlڷv;t%`\f\bTLtܥkПuGH?Kh>~\u0007\f\u001c4xȇC:o\u001f\rxD'\u001f9\u001f?lq\u001c?abD$cb&M\u00124uZ\u00193S>5{y_|9AjW_/L_xo2e.Zr5ks֭ߐMl߶}]{\u0016\b\n\u001f8x%ǎ8ypBK+\\v\n7nVߺ}_z\u0016wFa\u0018\u0016S%ƨ\n\u0000a0[H\u00152L!_\u0014^=#nh1B\\\"f+ċc\u0005Ȝn#S\u001a.^;96N\u001a,\r>H|T&UK\u0016Br-el=>r_y<ANʩ\u001a \u001aZ\u001b\rF\u0010l00nXkmT\u0019(\u0019;\u001b\u001a\u001a#\u0001V\u0001\u0006\u0005J*\u0014_Q\tTJ)R%SY+\"T9)WJ\u0014fg\u001a`0EL\tiAfy|\\mkv\u0016\u0016$Lvf\u0007ٝ\r\r/\u001a?ho|\bp8R\u001d\r\u0006.O\u0005A5V_\b\u0014yB:g%l\u0017_^p]q\u0018).\u0015+*\u0019\u0003ӻk4Ś[:p2C\u000f}>O_/di\u0014r&\u0015K\u001dT/!p]\u001ero9eYfy,Y\u000e74,_,\u0019,#1M,巰\f2[SfYY~Yy2\u0014YFpfym/^\u0010Yڮr\u0003C\r\u0013\u001a\u001bÚX\u001dɎY4\u0017K\u0003~q\t￺)Z][]x\u0006ͅW\u0002\rUo^⧽gg\u0001[*3[kӦym-ln6f\u0013mMecחCݢ׺O%Oz\u0003O>˨\u000fέ+]{\u0010Te[_6&f[2f˻ֿfzDnuW\u0013R\u0013h\u001db\u001dl\rX[;[\u000eV_+YZlG\u001f-],3Ӗ\u0012޺`i9`\u0019l\u0019`o\t\u0018-\u0006\r<\u001egSRNr\u000fm\u001b\t#~}7mtuj>\u000bc7\u001b覼7S\f3xXqXIBD\u0001\u001a=\u0017T_\u000eM\u000e?߹!{\u0004kWl\u0005R?,\u001e<6գ\r҆6龯<s6W\u001b\u0012mL\u0015+13Tu[|\u0002_hҞ^^^\u0001,Tj\u001e\u0014\u001dX$LC,F\u0016a3`\u0007Z!^x\u001c바ϰ\u0005{3\u0002۰\u000fPBD!\u001aوA\u0005bq\u0011q\u001dWp\u0015\u001f\u0006*QX[jLa7\u0014$ \t<Lt$c\u0006fs`\u0016f\u0011`\u001e\u000bǗ(A>R=|xCHE\u0002I\u001d\r6P.mD#\u001cȍ4p&L[h+Q> w -mx_h\u0007]dݴR\u0001BO\u0007 \u001d\":_q2h\u0019\u001dTL%t<ɋS)VM>ÿ5\t:Imȏ2\u00143tѷOmq\u0000\u0007\u001dTF\u001d#HO\u0017\u001co\u0007$L\u00062EDUF)\u0002I!\u0013UR\u0015ݠTMPJP'L]\u0003~,-cl9b+X6[Vl\r[r:^\fd\u001bX.vl\u0013̶,ml;v]̬W'l\u000f\n>V\u0003 ;ĊavDNbGY1+aqVN\u0014;ΰ\u001cge\u0002+g\u0017%vU+*ƮJVnP7\u001dj\bD(jQ\u00143\\}]y BvIRjDľoj:\u0018\f:u־W,ؗ.hVϙvڞN^\u0012D\u0004AD\u001eD{Μ\u0001/\u000fz+$dqyBiyF\u0016ɳX%T\\^\u0015$/JyE^d.\ru:c\u0015YgbHSTjT\u0013T\b\\PRTk\u0015Cuc\u001d.u+E}I_֕}׾g߷\u001fuCخ\rϱ\u001cP1*Vũx\u0012U\u001b1N7M|@-TbD-UrBToU*OVkZN\u0002^\u0015N\u0006\u0019QmR˶5p\u000eSVw._אָW;+Q\u001ez_U~u@\u001dTa:>T\u001fQ\u001d#t3\\Б\nnZk\u001dct:A'\u0014PflIYԋwȫC}/4\u0006 \u001aLCh(\r4F(\u001aMc(8z4!PI:Y趺nSU}MWZtAyZZGT@0\u001bi\u0013m-\u001eYizvaL/\b'A_KuƺiZ[muϺo=꬇Vzl[O|\u0010$-\b\b\u0001\u0004\t\n\b\u0018V[`\u0003\u00010\u0007 \u0014\u001a[ \fXTh\n\u0010\u0001͠9Hh\tQA\r\n\u001a&J!ʀXxHDh\u0003Ilu\u0007Q\u0017sD5o!\u0005B;h\u000f\u0006\u0001\u001d#<\u0005\u001d̆9:\u0001sa\u001ė\u0005\u0010\u0016bXBRXF?Џ\u0013LЯt\tN):MgR1\u0012*2:Ot*\"]TIW\u001aUu\u001bTC7n9t]G\u0001CX\u000e+E\u001eclTOO1a\u0013lJ\rc\u00011\u00050d~lc3l-0\u0012[b\u0014;\u001c`.\u00181q#\u000e\u001cM)s\u00047܂#%Gq+n\u001cHxNDnI)\u0018qܖq{N4N\f\u001d)ĝi]\u001b3܃LY܋-}{s\u001cr;ڱ\u000f~ܟ\u0007@\u001eăy\b\u000fa<GH\u001eţ\u001d\t8qM?\f0\u0003 3d9l3\f5p34h3osy|w].vSܶn;ꦹFo1cy\u001c?y\u0017O<'d3O\u000eOt/KW~_*_<X\rk`-|(P\b\u001b]\b`3l\r\u000eɳ=}_?6gO\u001c/\u001derɁ\u0002\t|\u001d&𭮃zޭzޯ\u000f`61&ęxv'p$@X \u0016%bX!\u001aQ \nf=<^_\u001c\u0014\u0011qTC|.%\u0016߉Lio2L'\u0015nc(\u0012%\\\\\u0012WE\u0011P\u000b6܁p\u000f\u0003Oc\u0017}P\u001f҇#X'g\u000e\u001e#x\f\u0004\u001aOX\u0002\u0010!O &b\nvn\u001d{\u000431\u000b1\u0007@\u001c\u001a\\\u0011\u0005E|\u0005_\u0013\t8\u001b|\\qi*V*\\k1\u001f\u0006܄[pH\u001d\u0016\n\u0000~\u001f')~_W\u0001c-XeX!Ұ\u0012\u0006o}|\rRH%4ғ\u00112RFV2^&$\"TQ\u000e\"\u001e2Sf\td-sd\u001fW\u00009P\u000e\u00109T\u000e\b9R\u0018ȱ\b89ANST}\u0006[~;`7͂ҌD;)TCP\u001evc\u00078{=ўbO\u0007\u0002\u0015@U:P\u001b\u001d\u001b\u000b\u001b\bF\u00196LN1!|j06ߘ͏gw;}ɝrITo7ӛyKero{[y5Zo\u0015xB9f\u00137sҜ2\u0019SdΚbsΔRSfΛrsT撹l*\u0015s\\sR'܉JR:o[\u0017[~\u000b\u001fү?<+skMbɂĖ\u001a\u000f\u0006\tb\u0016a$P\u0014iK*E5\u001d\u0013ZB\u0005\u001dX\u0012T晢9?wy{=]Ͷm\u000e]ok;`\u001b]îփݮz\b\u0013T,s=Taz\u001eaײku0;܎v\u0003;Ҏ\u0018nlMv\u001d8Ns޹\\t.9su.;W⮸'\u001f\"3\u0015\u000b\"|\u0005~\u001a@\u0001tNL8\u000eԓzQ\u001fMe(Ÿ9mtWCi\u0000\rAԗ\u001f\u001f\u000b\u0019v\u001cX#C\u0014r*\u001cv=r|N1%eu7Ms\u0003s\u0002s\u0003Ef\u0017\u000bk\u001a\u001e\t\ny:,N\u0007\\y1N\u0003Ts\rH7ʍvc܆n#\u001b6qqn73;nwƻ\tn3#u\u001eGw\u0018mr\u0013Tw\u00007r{\u0007^\u0004^\"\u0006\u0001πA#\f\u0019iτj6|\b\u001a&`njm0\u0013n\"L]n֘zi`\"M61Yk֙fl4fl5v4n1_\u00039d2Lc\u0013k&ě\u0004,\u000bǠ00/0? \u001aoM&SAs9\u001cu9qqZ\u0011߈(\u0016%T₸(\u001b⦸%m^\u0011\u0015̱ט[}U?՟\"))5B\f&Z/[205\u0019C%\u0014IUN1ΩbU\u001bƫ\t̻}MM)Q<sC03r|\u000b(1QsjA-\u0015%R\u0012Wg?\tz~d\u0005iիd5F1F[\u000ft\u0003&X'fX\u0017=_5\u000bT\u000bPԋT+X%%zJ\u001fe:ySR8a\u0013azje%2\u001d\u001b3\u00193\u000f[\u001dT\nRW:_k:^oПzެԆ^Oԕ~Kݨ;p\u0007Iz2\u0014@G9:ZO\f=Sҳ\u001c=Wy\u0010P!\\B\u0018Wn\u001cV_5d\u000fo\u00001518P\u000er:\u001bX*r9\u0005oЇM\u0018\u0015@K֗ģ\u001d:\u00100\u001ek9t\u0003.@'Ju1&{\u0013`0ܐ-$~}\u001f{%^ ^\u0003\u00110Q]\u0001\u0015\\70>52\\ǚ7H2gA4+b\u0002X(\u0012x\f0̡.f\u000b$U\u000fHgM\u0006h5K61W]\r{T9&G\u001aJoW\t\fy\n\u0004\u000b)rFu(A;g,\u001cP\u0018BU\u0012]\b\u001d|]/tJu\u0006?eYU\bnmp\u0000cz\u0000BxDtxկsR,wVMo$\u0016:8.4\nLVzE\u0017ƽS9-;\u0005p>P\u0018\u0003a7<+Lŷq$`.so5\u0016c\u0019\u0015D?1{MGdgrUк\u001b\u001c\u0014<\u0019<\u001f|%ys!a\u0006{\u0002\u000eB)kp\u0003Q~(!T&܁;w)r1>g\u0002NV)\f\u00031̒*<\u0010P\u001d:nC\u001dw4ʥ-\u0019!KqNf\u0003w4\tUif@ȹ\u0017_ƿ\u001e`w\u000bj;(DB\u0007~8(~+9\u0004\u00171c\u0017\u001192i8\nq\u0012Gr6\u0007\u000fs.#e}Ts\u000b5E/\"Cds\u000f'\nķ\u0019cTvP\u0006ɴs+\u0013zI[F\u0018\u0019+\u0013dW&'BVL-\u001ac͵\u000eXK\r-]\n\u0019V%?ɝ\u001b\u000f2y\\\u0006\"8S\u000e'`h&YE{\t2c}Jl.=`\u000f\u000bDWj]<u_CyV+OBqxd^\u0004ю,V25>\u0011.m\u000fvYpDvT \u001e)O\u0001`?\u000fYy\u0013w1\u0017a\u0012L\u001eYԖn,\u0018-y\"̃O0]f\u0012h9P\u0001۸*{LZȒ\u000bD\r,\u0000!wa#$U\u0013f\u0010ʷ\u001e0\u0001J\r3T\u0014YH)0\u0017\u00190Y\r\u00170\u0001XdPy\u001aSe03m?W!@'J+a9ɜ\u0017\u0010l\u00133(k| S\u0004\n~\u0000d*?2u\u0000`\u001fx\u00063^uq\u001dU_O|7Nwd݄\\;?5I\u001c7^&i8&M&\b\u0005bnx[^\u0010\u0011\u000f0h\u001d\u0011B\u0002!\n\u000fF\nA\u00154˙]\u0004ݻs7sΜ9sf\u0016.\u0007]X\u000fn\u0011\u001f-Gn<\u000e+\u000bw\u0007˾\u000b_ԥ8oIh'H+|\u001f#3\u00198$\fn~ٽ\u0017+\u001dS\u000bZ8لB)Y\u001eK?,&!X*]3. l@58W&JW=\u00170\u000eoa\u0014\fX\u001fp\u001bXo\u0011\u001c\u001bWvyK\\93\u001b\u0003_=s\u0017_<tN}\u0017I&^`]uhm-;w4mۢp!\u0018\u001e@gelʓ6&ɓ]gY\u0014dk\u00046(c8%#\rD.\u001bpF\u0015IT\u000f]4(\"\u001d70(,$]IGǱ\u0003M.\rSNl7=\u0015¡\u0014KC]P\b\f#[J\f\u0010I(-ނ\u0002(:pa\u0001$\u0005>6nx$c\u001c\u0010o%\u0004R\fx@\u0017l\u0016-tn:*zd-dϙܓvy׷Z8yVyt\u0005*XǹIqV\u001b\u0017e\u0018WIdl'oc\u0010G')ZSnX&'7$\u00153\u0011rgi!)o`ClYqi\u001d\u000e\u0013ۍ\u001f=M)ƬpGa\u00078\u0013\u001e\u0019^YPcn`\u000b\u001aD$ZK:IIF'%#6\ti'&9&\u0003N\u0007a\b\u000b\"\u0017xCv^!\u0017/2|\n\u0001%ٲğP?\u0005A<\u001a+4uoH@\n\u0014}\u001c7\nc+*\u0017\u000f0Y\u0000?\u001e\u0017\u000b|h<2|uty\n}0\u000e\u0016Wl٬hvN\u000bjESn3u Xfv`4M^N:G'Iӎ]T\u001d{2śRGSʔy\u0016\\\u0015,\u00183½\t|2\u0017 f\u0010}mP<v**z׳ne7y^uE\u001c\u000f:Ԭtj\u000b3\u001e8MqƝX\u0011?K\u0006,%\u0000\u00012mGdgWg\u0006\u000bd\u00188-V\u0019U<R\u001e9+i8[\u001aܶ0VK\t,\u0014@3V 8e3\\\n\u0010O)\u0014\u0018*06^0䬹\u0002е)B=d\u0015^@A\u0001\f)UT\b\u0005C\u0005\u0003\u0004Cs_\tJa\u0000JW\n$+\u0012`EF WT\\\u001aJJC\u0006^+sE1*h/ʂlE-Q!\u0003R~\nLFk\u0019\u0003ʠ\u0011\u0011(y>\u0002\u000f\u0006 \n8\u0014\u0017j6H\u0013e*\"l*C\u0005f N|\fg\u0007\u0003\u0016\u0011C#*-:Qda\u0012ynF\u0014gt\u00123P(C=ZFMEGN\u0018\nZ\\̎ϰkq\u00142NZ#\u0000':,ǡe\u0018܌BE:;p$WZ\u000736]e^=\u00105jzkhM\u0010N\u001cGk='gE+\u001f~\b0>ҮQ3\u0018\te?a\u0011ГKO<rx'X\u0014{\"e*(u&b\u0005D\u001f\u001eqt\u0012(&6H\n\"5 q\u001d2n_glF\tܲq^dŜ\u001d۽b'c\u0004_eE<oFr\f\u0005P@y7v)n\"eK^7$\u0004%\n\u0007\u0012cԶ5c5}x}bYQ7aW֙ľ M\u0001g<\u0013ŕ|w/|w0ir\u001ca\u000e\fq$'G\u000b\u0015ef(.vyʁѴ4[\bQ\u00122\u00188h98g\u0018ݡ\u001csX܌u4CRg50\b#p \u0017ؐ\u0010@/$E/\u0005\u0012$yUwA9D\n$ \u001f$.\\iA<\u0002.\b/1504\u001bwTpZen(*\u0007\u0000{!Aj+9}t⬆E\u000e|\u0005\u000f\u0004`h]![@Qc4ϻPE-m)w/a\u0003CC~yio/}\u000fHO9t0\u001e\u0012\u0010,Og\u0002n\u00168ZГ=\u0018i7tPyUuZt-oP\b]\u0014IwWcCq\u0014\"\u0010!\u0006@C\u0013\bCL(1ޙiHB:`\u0006\u0018\u0000\u001f\u0004buUU%\u0011Jz$\"a\u0018\u0011t#<G\bm2ƚ&o\u0013I\b0\u0002P4Z\"0?V.7RWE\u000b\u001f냇\u000e\u000e\u0010-z/\u001c\u0015h\u001d\u001cc\u000et\u001f<d5\u001dmn~ȑñ\u000e=I`%77{mf7<<i+|\u0003\u0011s\u000f\n\u000ez\u001e!*&\u0001HЉ\n>ӪF\"EAUv$hj\u0000#5t\n>i\rpJ .ayr+^obq^M\\W}iJʒl\u000b\u001b\t[*\f\u00180\"N!\u0010bbbl\u001eJH \u0004LJCxJ\n\u0006R\neZ\u000ft\u0012\u001aHyL\bOi\u0013ef\u0000Gi\u0000!%\u00192`Y\u000b\u001fߞs9;\u0012\u0013fsl\u0016\u001c]_6I\\lk-^X*0TS\"9%Ss\n:<g;gHN\u0014tEZ\u001e-\u0013\u0014̪%\u001amz&EZY_\u001e\u0012k\u001d-ezWb~\u0007Q#\u0018-G+\u0015Ȑ&N\u0015 \u001e1-(\u0004#~=^R\u001e\u0011/e\u0006NJ\u0017$n/)H<#\u0002,yF Qu=\u0017L#e.]ãKMDAᑲ1)rI0^DYċY4!ވ\u001f\u0013]\\\u0001$;\u0016V>NԢ\u0004\u0010\u0006\u000bŬd9\tJ^IIr\t͕t\u001e\u0016,\u0018vZ\u0013vY\u000eG#\u001e52_\f3\u001c|tpcA\b[8'\nb(&K&y.H\u0006R\u0007]1{RKt\u001b$O\u0005s\t\u000eu1j]l#\u001b1\u0006\u0004O \u0007qd]\\@9\u0006(\u0011DUɿ\u0012ߤhy<\u001a<iʔ~\u0016Q|\u0001\u0014}&9ˢظ@Sc\u00035W|_%v\u001f¢M\u001d]߾:z/?g,\r,ռbWqn~궊\u0007NpG/|N\u001eiTK\u001b\u000f\u0010)h[NQlmP\u001e2gn\r\u0007ttz+f+ғ\u0016Y(A1,c!K}RB\\\u0012\b\u0004\u0014:äF4dm\u001bw3P\neY'iF^TJ\"K+Z\u000f^'u櫄ߍ`8S\u0015Q0#&RMC\u001c\u0004oXڞ\u000e÷&V\u0003yEfEԘ\u0007_9xKS5.2\u001aF5s;g\u0015Sn\u0016Jarl\u000bPPiTz\u001aq:>Ulx\u001d7d'\u0019ts uK-\u0012m@H\r|&DJ[6\u00155Hi\u001a8[] VmkVm*\ncԡRy`lvIm\u001dS\u0007҇y/\u000593zu\u0002'y'~k*Qe9FU\u00055'{\n\u001cyJB\"ͣ0AgC\u0010aPWK\u001c\u0005#I\u0004)Ŧ\u001c%\u001bۥ\fWC\u0004]\u0013^\u0015;\u0010kK\u0014t=\u0014Na xudj\u00023\u0014@B]~}'\n/LhIr<i|\u0011=tXaw',@\u0019,*l\u0018J\u0015\\.2o+)l1{\u001bź7\u001eW@i\u0012\t婭Uό\u0014t?sb S,53Z\u0017wŤVc\n\u0013`\u0002`\u0015\u0012x2P\u0004\u0013}Q\t*Q\torTB\u0004t?P5\u0007U;4QOq\u00064\u00128 gZA@\u001b\u001b4\u0001Z?\u0011d--ST;I*uDjΫ?0\u0006hbv&;J'\u001e\u001a\u0012b_w\u000eOw\tww[5.[\u001a\u0012ƒ4g\tj\u0013v>4q_jPet~Z>_~u\u001eGβ#\u0000w\f\u000f\u000ei\u0019y^LBb\u0018G{R;\u0001sll\u0016nD8~D\u0010YR:~\u0007~\b4Efo@-\u0002\u0014Y\u0006`\u0019Dm}bi\u001eS%hVn\fa\u001ey=\u0003+}T\u00129$j\u000f(\u0007\u001e_a\u0007\b[1nm;X!I@\u0012l\\|M3,1#@\u0017h\u0005E\u001f/t\u000f| Ӌ琬\u0013w\u001dl̳\u00050\fNE؇\u0002\u0006@p%|\u001b*a\u0000{<|&qH`\u0002B\"s\u0019>bo\u001e\u0011&6 \b\u0017Ğ\u001ee\u001c+_f\"\u0001yG~\b<(-gg|@̐\n{M\u001cdSC9\u0013Jŕ\b1\u001eo\u0006aΫf>,g\u000b8j鲙C]O?s~\"ߠ\u0019q}\u001ck!>`|\u00130\tXCUs;oI'\u0012\u0012`\u000f)'i\f\\\u0011+\u000f{J֋>;׏!%G{3\u000bx\u0001)\u0004\u0014\u0018\u0018\u0007\\\u0006z6`\u001a0\u0017\ff\"g(7@n\u0003!fl\fxf9ߚ\t+X0I|^MI3̼I95,=\u001a{`r\u0010;Ѓ<:)gi9I~\\3}\u0002NXvYǛ\u001c\u0014\u0019+r3's\u0018ϲ70S)\u000bl3\u0015\u0017+8y<l8\u000f\u001e\u0011~VX>{\u001e,_-\u0007ϳUttV\u0018#|0A%SO\u000bޟ}F0j \u000ff\u001eC><\u0013k|<\u0010I؏\u0002jQx{\r\u0002k$&'YԏP\u0005؛O{\u000el\u00026\tc˄\u001e4%cs_U\u0015W\u0000?}\u0005I\u0002 bk\u0014\u0014\u0001\t\u0003JM\u0010!(HB\u0003chT+U,JcE(Rp\u0010hw괴\u0015\u00110u\nj\u001d\u0007\u001dN)јw;M\u001e\u001bB\u0000?}39wݳ334sm)R}~hS=\t߾!$v4\u0012즱A\u000fh\u001b&+/\"\u0017D\u0014>/rҕ6ߣ{\\T\u001f>R+3coIex\u001cRû\u001f+ Q\u001aMl\tuB߅xx)\u000bRa<*z\u0010@\u001e\u001cm\u001c-KlG\r;>2'zO5\u0013岐utk\u0004\u0013{\u0016\"]5.hL\u001a\u0016\u001c}\u0005;Prm(\ntk눩*.^!/$I\u0019%zV\u000eG>~\u0005?q@\u0006ӦJ\u0007Ųڅ뇽HN$6;6:*ۧX:O.6{.r'c;*9[Vv\u0013:x~e\u000bm^\"_Z|X\f\u001a\u0001:٣5>=j>Ԥ}l\u001fNT\u001bI,\u000fk>D>2,1U\u0016Q(d\u0005=ݝG\u0016G-\\Fs\u0004/b霘m\u0000:hG/Z%W\u00171\u0012`#?B~\u001b(o3C\u000754wL\u0014\u0003<gKyC5;dMgob[-~ܡ۔I\u0019BZa>elL\u0017\u0002;)q\r\u001dJ5Osl\tF(f2F8:{#YU\u0019g}ڤg\u0019qm̳2}:\u0004WejHJOr<\u0018[\u0017Գɥ\u000e3fP!g\u0006vxk2 y\u001f\u001eg].P\u0012\u0019\u0015\fތD9S}&Ai\u001a\b\u0015=<\u0006\u0005\nX$\u001e,{Q)r;i\u0014\u0012-\u0006\u0001\u0019X<\u0017\u00032e*p](o.\\k\u001f%mC9v0x\u0007Y\u001e;( PGs9Q;\u0004)s-V,UDvd\u000fOɍ)=嬽r[6\u00136ثe9qR\u0002t>9h*G;-]{\r\u001f$Ô}D\u000f\r0&d/Wce̼u\"_r6\u0018ژOpwހ=z`\u0003C!E\u0007O\u001cF|ga\r~.;\u0011SWAGs\u0016y|K4g0FݶoV8ޘtE>=\u0001\u001b\u001b`\n\u0002yßA.{\fUg+Q\u0006~\u0012\u0005y\rtN_h>\u001d3?ULBϞzC\u001betmH\u0011[2\u001e%Z>f:L޷)s7N$9T&flHNyњjlPcW$/NW͝5E5g,zMzq#ӷN\nȁJO^>|O6}j26&iĮlbݯ'oQ<\u0019ŴȷmĴ/|1\u0002bjaHCk\u0011ׅPX|\u0015/8\u00123-Gq>ݍR$zK[\u0001msϷ\u001d]v|&_po\u000b9tpq}\u000bѰL\u0003\u0018\u0002\u001b\u0003QS\u001fL\n6H!Z .\u0006EP!\u0007\u0016xF?c޲mǅTeϮj~nC'U\u000f7@'x\u0019GgoH#;T\u0006'>pr6 \u001elM9\u001b_o\u0017Z\"#Gd|\u001d=Ac\u0007M\u0019p\fs1\u0004ӧd'/\u001ab\u001cbhO_JZ]]jA\u0005\u001a\u0003\u0012ǉ\u0015v\u001a;\\VTn~\u0007\u00198\u0005x|CUḥ*do+\u001bOPxC4뱑\u000fK\u0015b^{\u0019oS:YnȪҬGdiN\u001cK>!%H\u0011U7T,CY\u0012\t~\u0013V\u000bFJY?sm6P:\f;W\u0017>-a\u0014e\u0002z\u0016ڽ yiL \u000ff.{\u0012ž4\u000bE\t\u00150\\BVfl#{^#\u001dzN\u001f\u0003'`C}u\n=گ`f19S<\u0016B`7\u001b\u0018\u0003E5~ufff̷_z~^^\u0013y&s]/vCrH>$>꺻ԫ}\u0005?<H=v-#\u001aɩ~\"ߠ\u0015\u0016Mnd1AJ㛥..|%]\u0019-srN&RJ}cH2u?\\#;r75\u001b|`y\\\u0001/3CQؗ/Ge%\u001aNd@04xO3wT{;c%0s7Czb*cs\u000b}Uw^\u0015.a}\u000b*K\\/9\u001ekMt/@ƽ܅ϢH\u0017G\u001es\u000b\u0005gc\u000b\\=OcS6}\tn\u0018?BފR\"\u001c\r\u00143p\u0002JByA\u0015mj50^%b<b\u001asi/s[9S\u001b7 _w\u0017_ٹ#/jy7uO-nn$FoS3\u000fwҿ'rL3i!\u0001`O~_\u001ay\u0017S\u001c1QXKKCŪ\u001f\u001eu\u0005!RH\u001ehޠ><~m ^Ml\u0012\u0013r\u0005/| q[?*3Cȋo2Y\"ulۚs6Cc\u0018~ScH|nM-6ɡM\u001b>_\u0006}/@(\t\nMPm\u0011Q\t\f\u0014BC(TjH(#O\u0016+\u0012\u0003Vä\u0016*@hL)H'2@-%vT@LA\u0007Ml^\u0002\u0019}39ow{~?ԂmN\u0011w\u0011~\u0016y}\u0013H<LK\u000b=\u0007_[i\u000eU;ƈǩԯm݅\u0014\u0013=\u000b6lo\u0018o\u0001)J\u001e\bU`ξZG>^@G!(W>_0)\u001efR{\u001a$Ο6reDC4؋A{\u0015l~pS\u000bi`N\u0000{;{Q|Q5*n~\u000f<|&OTvhM\\\u00173&V\u0001+\u0018۩A,\u0013#u\u0002M!\u001aW\b\u0007gƆw/sPda@wt'/*_z-Tٰ[h$Uoa^2G\u0019][9Z|\u0002-ZIX\t\u00005\u0007p\fs\u0013X8w{\\*\u0017僺PmL>eO06ۦ=ǃˆw5\u000e\u0019\u0010֩Jjm\u0006^xJ?f\fcd\u0006zד]Zع5t޻8ϡ\u0000::٢:h*mȶؗxK~\rX}|uu]|__d4^OeQLNc\u0011\u000fA}k\u000eYK\u0014jM6:{\u0019}\u0011Z\u001acǱ\u0007:3\u000fE&a\u00051:?E?\u0010KFgc\u001apKƎ\u00101Κdy\u0005nྀpwH5\u001cL\u001aP\\xM2\u0018C*\u001f)\u0019y\u0005v\n=7\u0019]/껯{\u0018ɓ.ӭX\u001fy\r'4W@\u0013xհYs}/\u0013\b\u000fFmʘk>\u000bees\u001a錆ft7?޽zy\u0005zD;cI|G/}b\u0015IłiǱ\u0005y(O4擕79|6'\u0005\u0011\u000fP|I,AL8'\"\u001e\u0016\u0000xr!FN؛<= eΓmֱ5+~׾h\u001c\r픣K-Ճ\u001c,C/\u001bVx\u0019MV\u001f\u0017Y tށ¼T[C绐;U'H\u0001\u0000n@g`~=\u001fq-ʳ΢\u001d\n\u001eC%lT\u0014b2\u0014\"_\u001b`K\r\u0017\u000f4p{\u000e\u0015[Gwp~\ba{\u0019`\u0003xvO\u001e\u000e\u0006+\u0006\u0014[\u0018VkyjT\u0003M\\tVGRM]5v\tC;\u000b\rEag.ס_\u000b\u001bƋcg~ؕ6#\u0014OCq\tؑ\u0011es4TS\u001fi/p#\u001fnz\r`䋸~\u001dbTx^6\u0005Xk\u0015h\u0004}p\u001c\u0004\">6\u001aV \u00149\tف}WiÑ%;b.!EV\u0013T|D\u0014AEMzL\u001d9kJzw\u00138qcZסo\u001a=rl#H.c$JĆ4b\u0014M\u0016dzZO6[\u0015k~Wץr)\u0019(ø\u001bPD.uL躙&F0\u000euz\u0016\u001b:\u001c8\u001dSMC繯^Td*`AxGn\u001fE]\u0010jCE\u0003\u0019\n^dNu\u000b{\u000b-Wd\u001cG^iqV\\\f nf\u001c\u0012\u0018\u0000jЉ4Hp\u0004\"~:xT±\u0011qs\u0018uϱ\fZьuR)g7c:Uq嘪r\u0006(i75\u001c[C41(Ҫ Ev\u001fĎ\u0012Xo\r51bh|Z[\u001eR1)],0\u001f8!xuT \u001d\u0000P1^Ͷ*\u0016\"N]Lԛ Tzh˦$oSBӧھ*'\u001bv\u000f\u00101z\u0004u\u0017hqJ+x\u001ayR\u0013֨\n,E\u0002*ym\u000bt\u0000\u001c\rY\u001ay\u001e۠Ґw;\u00100~\u0016\u0005''9اϯZh\"m\u0016\u001aE&\rշ\u0019g\u00105r\u0016v:o\u001c\u001f\u001c\u0001\u000f8ѥaM\u0004/#c\u000eP,ZN9n+2Z\u001cj\u0006\u0006l\u001c8\u0018\u000b4p4Q\u0004;A3\f\n8u\u0011s\u001eV/\u0004i*lyH 7&.{R\u001bM`\u001f*lqh\u000b\u0006ۢb<m7~YLqӠ+4k\t\u000eSǾ(Оs{?rJjpY\u001b\"\u0010E\u001e\u001bs\u00109C\rv\u00026^?-ƾ{\u000b\u0011\u001fvo\u001ag.E\u00199(,\u0000碦B1>E=mȉYCwOO\u0019y\u0001>=\u0003\u001b\u001c}IF\u0011H\u001e;L'}\fE\u0018\u00174\u0002_\u0007\b§[Ay°\u0001\u001fu[͡\u000fe2<>f=\u0005W!\u0000sk\u00017x76紏\u0007\u001e&_r)o5|{D\u001c\u0000k6\u000e\u0019ՏZCy'\rQ>\u001cT{y>\u000bݍ6h3\u0006wOjTZ0N<䪓ϔ\u0002yw)ziߡ%\u001bpF\u0018+\u0017\u0002]{\n\u001cSU=\u001a\u0010\u000fn\u00009./{#D0\u00146loPrQń0\u001bR {N_#|\u0003Lja\u001b/8\u001c8>\u0002yW~J~\u00072\u0006\u001a =ka6wB\u0000\u0002i:o\u00111n>\r\u0003`6\u0018\u0005\u0007\rC̳|s\u001d\u0005{xzO\u00019\reY{DI1r}*\r|\r\u000e:q_M9\u000b4l\u001eywNqm?5\b\u0001{gT~uѤp&\tAN'fB\u0013\u001eb/\u001d6x0'\u001d3\u001f$~\u0000Guq{\u0006#$6$5*\u00144!Bc\u0012:e67ɚM6@CB!b-3L\u0001\u000bTH\u0001Pt\f(*c8hE\u0019u\u0006j\u0015kٻ!\u00043vIwޏsO/߮M\u0014?M\\\u001bͣEzG\u0002uK+(`:/*X\u0018aݏ\u0019B6\n<_e]Ƴ\u000e\fň́|gO\u000f\"\u001dbU\u0012AF<{%I_j)ߕ-R\u0007ߡ\u000f<}WHW鞒~+{HE+bDjwȀ0vVqMz\u0016~\u001e{xfT\u001eF\u001f`\u001c\u0007Uyr'J\u0015[I\u000etJxzo\u0013c\u001e=\u0017\u0019D\u001fzĘ]\"f\u0018ObD72^}-8c7\tқ\u0017WnyF\u000eI\u0019\u0012P~ʿ\u001f(\u0017P^<HjȽtiR\u001dKƑ%\u001e/c\u001a\u000eR\u0015Ō\u0006\f\u001bq(ds6nTGsrX_L=XaU(d\u001f+\u0007k\u0013r\u0004JCʓ$`y\f8IB;t\u000bϨvdfgs\u0013ϖEtZKX\u0002x_iތa\u0011Xh>Yo1C4[v6/\u000bP{}\u0018r\u000bWv\u001a;GwQFT7xe\u0019\u0013vZ0T9J?L\u001dsw\u0018-q\u0011o!G1\u0016ˍ5\u001co\u001b\u0011s/;U5\u001b\u00171&Ï<ʌ3X8\u0003r.\u0019H\u0003?和\u001faz6\u000bw=Ujp\u001a\u001d@z'x9V5}J\f\u0014})/adYG~w،mE\u001d2q\u001d.2MfMi}\u001e\u0019)6sa`\u001eW(:c\u0012e\u0001\u0003\u0007x7^\u0007<ލC(t؛\u0013\u001b1M`\bǲ\u000eE?YTd\tKP\u0013\u0018la\u0016磼Wtlx\u0016\u000f\u001ffva[li]:v4)\u001dJk\f_N<\u0016J\f<8_b__\u001fÚ>#nw!Ȼ(5W܅\u001eYf\u001cf,(٦b¹\\\u001a$}X(XaX|߬Oەe4qݫo2joYǷv|2L9|q]l~圤~lzs}`ߋa\u0018i3ͰPo\u0012ҥb#}<!ݴw0,\"ӓ\u0018\u001b݋;&wD½l\"K\t/Qw_-XO.u\r\u0006~\u001aR7\u0018\u000emWO_kXX+\u0007&ŏ\r7<~H\u0019)&c\u0012~\u000bQrq\u0005O\u0019g\b\\_(\u0006#5\u0001aeiDۖ}.q\u000bM3y˽\u0017^/M\u001d\u000f]ǳǝE}4ytRBrR|\u0014ud\ruu)\u000f޼+MF\u0012\u0012ޕ\u000e\u0015&Pk|Ewq(E#Xg_UH;\u0001oy\u0013hH;Էҳٴ:0\u001c\u001b\u0018v\u001a/6,\u0017NWqOF%9\u000f\u0001_uZ6ލ\u0015^uޥ\u001b;~k\u0012:{-YOi4\u001aFh4\u001aFh4\u001aFh4\u001aFh4\u001aFh4\u001aFh4\u001aFh4\u001aFh4\u001a\u0010\u001f0\u0007\b\u001c܍u9i0\u0006\u0006U\n\u0002(\u0000LT\u001al\u0013.0P|\r<ݢ\u0003(\u0016\u0007Ygd|{Oaex\u001f\u0003-\u0005\u000b=ݠ^\u0016\u0006O\u000fZ.ؘ\"\u0014Z-PG\f$\u000e{SAGTB!\u001b5kd$\u0012*P:aU3UL3J,Pr8{\u0007ng?6\bBCX\u0016\u001d}\u0011JMbC=q\u001cG\u0011BW&v1ѻ&\u000f\u0011\rӠF9,A\u0013׮1O[FigiHW\u001aJv\n\u001es9';\u0011ծU\fQ5\u001cpLak{3J׵U~9rzu$g\u0011a\u0004wLL(\u001aQιYXO=ԮmrXͱb`2\u0012k-ˢQ&ؔL5NpvvvS\u001fwV\u000bڜZf^#֞H\u000e:ⲍ-/*KQ:ծ\tFۚ`k(\u0016jfnuծj\u000f'HM\u001dOC,nG꣑P0j{#NډX{<P4$W\u0006\u001avvRcn=/\u0012rZ\u0013\f;8RN؎r\b#mrj\fFk+*L)G7K)!\u0012`i\tƛXÍc>Y\n}?)'}!\u0016s\n>~>s\u0017nLj7Q3[&\u0012\u0003\u0004lWl*c\u00021EL^ &\n\u000e\u0007Ə(8=1\t_L?%\r1AQpa1>#l>ԯ\u0018y\u0010\u0003E>se$yĢ\u001fJm\u0012#9Y\"vAN\u00041mG\u001f$\"q<sX@mfzc8\u0003\n6^jX5\u0018_\u0017.S\tأ5A\u0002l\u0002\tEJJd\bҤ%\u0017i\u0016u\rU'e[&\u001fU\\1\u0003`bV-eRv~ha]>y=C\u0016-v=?\u000e:\u00119\r\u0007dT\u0017bγJq9-,}\u000fyܕu\u000ft9\u0010[\u001a+\u0012E\u00063(%\\S\u001e 6jT\u0002\u000e=>x\bUB\u0003xeENCS<U*l\u0004\bg`\u0019i)>\u001a\u0006,\u0003\n\u0018G#r&Y`\u0019\u000el\u00005l\u001d8?`\u001f\u0010\u001f{Ā$0\n\u0002\u0006e{uLZ'\u0001ރwqYMx7M,ON@|A:Fhin:`ށ\u001dNcG-)Uڝ~-x\u00146\u001e\u000e\u0001h00\u0000\u0001g\u001ax7 \u0016<p\r\u00012X?\u0010fk\r\u00070\u0001@ep0M]w4O\u0005ٯI3*;\u001bo7%J[\u0010x8I#O\u000fc~Q\bJ-v\u001c6\u0006$~`\u0014\u0001j2kw\u0001\fDT\u0002C>3JS\u000fa\u0003ѻ\u001f\u00073\u001bՙ_1_'\u0013F\u0005xϜ')xãO\u0010O?M)\u001fFQiTixش8mXONTi\"ޠ\u0011jH\tj\u0005j\u001d1j\u0019Ҩ\u0015I%\u001f]\u0003f\u000b֨*ҩ\u0015V\u00074aY^IYIс\u001fP66<\u0013a\u0003\u00152!\n/\u0004:n{ww4~>踊۰J>\u0004<AF\u0018d\u0015\u0003`(\u0002l\u0000\u0015\u0006v,|FZ\u001fl\fH\u0002y`\u0003\u0000\u00189]]krabѱ\u0001\u000f[َ?h\u0017J%H0GvIm*ӆ/\u001aE\u0003MղlF<UqnMK<\u0000!\ty\u0001(x?)>^\u0001\u001d(\u001c}'_<\u0019ܿkK/ᲇ:ψ2.be\u001572\u0005-tA_]\u000bH\\u9A;Z\u001fZ\t7qGa\u0018h'YĘ<\u001d\u0007]>g\u0012\fbwhrH\b'HIs7>{wzۼܻݦ\u0006Tڨޯ֩ZzT\u0012u[n\u001a&%jI\t둾\t+jţ\fR\u001c\ri^\u0019'\u0013a2;<l\u0017IS;#ȕ#vށo(\\@f+S2/ӊ\b]l\u0003\u000bҦϵ\n\n\u0005\u0012<lI\u0006z\u000e|5s\u000f3VƝ.{ھ\u001b;^~y{`ǥ_?\u0018\f\u0017lf\u0012T/(\u0011\u0011Wz3BLJ\u001d\t[aܒ:\u0015Ր\u000f] jkITꢵRB7Wf::\u0019/vRSl\u000ef-\nM4*5AIZ\u0012\u001aWJ4\r&%AIF\u001fw$Җ䒜Iw4iX4CcD0h0>d\"\t`~\u0016:\u0011\u000eύ\u0017D\"l+؉񓂏O؅D\u001eds=#HtO$3GFC\u0011s\"=L7ЕkK[su\rc\u00011X/qtB\\\t1WBgɹ\u00039\u000bF\\.:l۱ֶB:?+pO[˹EDꍂ}$m7\u0000\"++%RiT#¾j\\O[\"}#\u0014I\u0013cr8EZOeܿ\"\u000e&D]k\u0014ׁ\\6g<<z\u0011\u001d\u0013dwoʊ\u001b܍`\b*ʖP\u000eXmmUʇįbK%j(>\u0011\u000b\u001d\r1<\u0011q#EX\u0015\u0002.H\rZ\u001cl nkTիbnOt)nd\u00102*6)4FF\u0011%O\u000f\u0001\u0002\u0002q%f\u0006t\u0004U\u0013.ý5\u00199j7\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000lrfn\r\nendstream\rendobj\r292 0 obj\r<</Filter/FlateDecode/Length 313>>stream\r\nH\\n0\b<\u0005/\u0010\u0007lijv\u0003D[wH+{iʝ\"A~1m~GCx٫{{\u0002\u0017]?\u0003@ZA\n\u001ea~}'<\u00055\u000f5d\\O`x\u0002[J}vR1H\u001c\u0015\u0016\\aʎ\u0019JmQ\"*d1(\n~N\u0015[)ĊВf7\u0005&cq\u0015Ɓ7\u0018wϞ\u00150H\u0006)f>H&5J.Nia).\fJ\u0001us1\\\u001cQ\u001cٹ\u0015\\bu}tɔ2\u0012j]<\"!v꽏>\\c\u000fC\u001ba]&\u0004X`o\u0017\u0003\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r293 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r114 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 318 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 319 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 98 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r115 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 320 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 321 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 98 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r116 0 obj\r<</ArtBox[3.0 2.0 18.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 322 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 323 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 98 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r117 0 obj\r<</ArtBox[4.875 4.9567 16.375 15.7933]/BleedBox[0.0 0.0 20.0 20.0]/Contents 324 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 325 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 98 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r118 0 obj\r<</ArtBox[2.99994 7.0 15.0 13.0]/BleedBox[0.0 0.0 19.0 20.0]/Contents 326 0 R/CropBox[0.0 0.0 19.0 20.0]/Group 327 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 19.0 20.0]/Parent 98 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 19.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r326 0 obj\r<</Filter/FlateDecode/Length 314>>stream\r\nH\\n0\b<\u0005/\u0010\u0018;uNT\u0007Vj\u0000;E\u0002@0yCx٫{z\u0002\u0011SDZpRw\u000f<k(\u0006#̯\u0011?pABM]j\u0004S\fd))!,\u0006ٻP\\p8fȵ)&NPr,\u0005=c \n\u001eGRl\"KĊВf7\u0005&cq\u0015Ɓ7\u0018wϞ\u00150HA\u0007)f>p*&Z.4ǅPą!\ni@]\"FQbmp.]ǮCOYP\u0011\u001cr݇klaq?v۸d \\\u0010\u000bl\u0002x_\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ҳ4\r\nendstream\rendobj\r327 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r324 0 obj\r<</Filter/FlateDecode/Length 234>>stream\r\nHdQKnB1\f\u0014sVHH\bQ\u0016=\u0000\u0002\tJE|&38\u000b\"X-mpp]I\u0010\fn_\u000b\tV!gJ.PݸP\rF^\u0002p:\u0014k[!\b4%E:$\u0004ŉB朣\u0007;$gU\r\nB;]7G圪VG:b\u0007Ee\b'ALS`5jsá\u000e5#1\\7I<3I8/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000 O\r\nendstream\rendobj\r325 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r322 0 obj\r<</Filter/FlateDecode/Length 217>>stream\r\nHRA\n\u00021\f\u0015&iݽ \u0007\u001f\"(\u0007o\u0015\u0015? M\u00132Lzգ^ɴ\u0007͖\u0011\u0011\u0012CUo{B:U\b,v͜\u0014\u000fKO\u0017&02\u000ewf-ADpɻ$\u0001qQ\u0005\u0015%r\"\u0018(\u001aBkZƵ3\u00192\u0002\u001baK/iI\u00111Ũ9Т\rTXT,EU,tQ\u001cV*\\ǟ!g=C4kz\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000:l\r\nendstream\rendobj\r323 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r320 0 obj\r<</Filter/FlateDecode/Length 167>>stream\r\nHM\n@\f9Żd3N \u0014\u001eA\"v\u001f,,N\u0002/\u0011Gb\tfH\u0016m@A\u0014e57\u001eV*\nL?ZLoza\u0018u\rE.3ek&\u0007 @1!n(FW:\u0000{b%?\ty-sƕ\u0013\u0013B\"rƷ%\u000fo'y(/idZ\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001c<\r\nendstream\rendobj\r321 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r318 0 obj\r<</Filter/FlateDecode/Length 167>>stream\r\nHM\n@\f9Żdl[ \u0014\u001eA\"B?,,N\u0002/\u0011Gb\u001dY\u000e\u001fDLXVW!f]D\u001f-\u0017=R\f:el-\u001cfR\r\u0014s\u001efHot\u000f']B\u000f2g\\91:!$.\"g|[\u0002j!-CyIk%k\u001b\u0000\u0000\u0000\u0000\u0000\u0003\u0000A=\f\r\nendstream\rendobj\r319 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r109 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 328 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 329 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 97 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r110 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 330 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 331 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 97 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r111 0 obj\r<</ArtBox[2.25 5.93744 18.75 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 332 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 333 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 97 0 R/Resources<</ColorSpace<</CS0 334 0 R>>/ExtGState<</GS0 151 0 R>>/Pattern<</P0 335 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r112 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 336 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 337 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 97 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r113 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 338 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 339 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 97 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r338 0 obj\r<</Filter/FlateDecode/Length 167>>stream\r\nHM\n@\f9Żdv\u001d \u0014\u001eA\"B?,,Kxc\u0019EK bŲ75H\u0002\u0013~^\u0000J1\u0000\u000e\"rI5Py!JѕN\u0018w<O@^˘qŴ\u0013B\"rŷ%\u000f\u0016Ry(/id_z\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000<\r\nendstream\rendobj\r339 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r336 0 obj\r<</Filter/FlateDecode/Length 164>>stream\r\nH\n@\fDt[^JA(\u0004؃`+Xě\u0004&a\bH>ѡDȶWb\\AVpEQl78OpZ\u0004}QidMRYÐih\u0016C\"g9\u0000\u001c;!\u001aß8\t!\u0011\u001af3-\u0005x+%%xMk5k\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000e<\r\nendstream\rendobj\r337 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r332 0 obj\r<</Filter/FlateDecode/Length 250>>stream\r\nHRKN\u00031\f\u0014$v~36E\nYp\u0011\u0014!Zey@Yp\u0000ɳ(>e&3`lsisI9`]O$F5\u000fDd7[\u000f:\u0003\nNbˑH7\"#\u000fM\u001d`VBR\u00068;}ScŽL\u0007ԙ\u000bi[LȈW\r\u0014K?C)':\u0016\u0000L?,\u0012w85*\u0011\u0017Ȱ\u0019og\u000fs#Ń\u0007m4C]\u0012{\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000hX\r\nendstream\rendobj\r333 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r335 0 obj\r<</Matrix[7.0 0.0 0.0 -7.0 7.0 10.5]/PatternType 2/Shading 340 0 R/Type/Pattern>>\rendobj\r340 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 341 0 R/ShadingType 2>>\rendobj\r341 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[342 0 R]>>\rendobj\r342 0 obj\r<</C0[0.917647 0.933333 0.972549]/C1[0.85098 0.862745 0.901961]/Domain[0.0 1.0]/FunctionType 2/N 3.42443>>\rendobj\r334 0 obj\r[/Pattern]\rendobj\r330 0 obj\r<</Filter/FlateDecode/Length 187>>stream\r\nHLP\u000e0\u0010W\u000fv\u000b\u0016Ą\u0018\u00074EL\u0016mL\u0015tS\u0019\u001cO\u0015\bKk$\u0003;D;d\u0014s\u00062+N=3?4a$\u0018l\u000f\u0014T4qʕ6$\u000e)eT`e\u0004\u0000ud,\u000bq?\nVE0&V\u0007|\u0005;o98ݼEH)\u0011\t'\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000<W\r\nendstream\rendobj\r331 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r328 0 obj\r<</Filter/FlateDecode/Length 189>>stream\r\nHLPK\u000e0\u0010)\u0005h-\u0014؊Ą\u0018d\u0001\u0011\u0013pf:7y\u0019}j7C'Ao-fbe˕.x\u0012`Ur'\u000ef\u0018a\u0018'\nDS*_ېx$_-\n_me#b#D~\\\u0018l\u001b\"rܒQ\u0005\"D[\t|AV2EDz>\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000Y\u0002<\n\r\nendstream\rendobj\r329 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r104 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 343 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 344 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 96 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r105 0 obj\r<</ArtBox[3.0 4.0 16.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 345 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 346 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 96 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r106 0 obj\r<</ArtBox[3.0 4.0 16.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 347 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 348 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 96 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r107 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 349 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 350 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 96 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r108 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 351 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 352 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 96 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r351 0 obj\r<</Filter/FlateDecode/Length 217>>stream\r\nHđ;\u000e0\fw@S;\rURP\n\u0001\u0003\u0007x, \f\\\u001f'i\u000b\u0013+㷝OJkQ-ciA^USS\u00031lBx\u0013\u001eFā\u0013;Jewd\\4@z\u0004p\bwѝT-jXS{\u001b\u001ax-5:Ҩ\u0002-ܑ\u0007ya<.W0DV/ \u001b\u0016\"E\u0011#Bj$!¦nr\u001d5S{D[\u0012}:t$f\u0017w\u0002\u001b\u0000\u0000\u0000\u0000\u0000\u0003\u0000\bb\r\nendstream\rendobj\r352 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r349 0 obj\r<</Filter/FlateDecode/Length 221>>stream\r\nHđ\u000e0\f}\u0005\u0018\u0018ȮD\fr\u0001\u0005\u0013m@8y5u}K\u0018S\u0005:7Hǣ\u0018&D|\u001b^f\u000eJ<<PZwM\u00134XLC3,|4REQ3~S'qNR%\nmHf׊(XkCo==\u0015,WZW\u0001\u0001\u0019ϴ\u0011\tVs$\u0010',!!ݪlG\u0012ǚ\b%Ї/kMZxO\u00040{K_\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000&(bN\r\nendstream\rendobj\r350 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r347 0 obj\r<</Filter/FlateDecode/Length 189>>stream\r\nHTM\u000e0\u0010sw\u0001Liي\u00151\u0003\u0010cb\u0004]x}\u0005\u0015vF֌ݾ\u0006\u001dZ\rR4\u0013Ɲy\\;\u0011q`ĮԐ\u000b\u000ehzI^Y0QLdQa*Whxab E\u0015X\"8\u000b\u0018}Tj7WS5`\nυ7/e㕿t\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000g:\r\nendstream\rendobj\r348 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r345 0 obj\r<</Filter/FlateDecode/Length 188>>stream\r\nHTPA\u000e0\u0010+\u0003@D\fr\u0001Ę\u00180A\u000f~)bٝn&M\u0015Ҧ+ȡaJ\u0017,$\u001av\tq3\u0002*\u0019p\u0005\u001bם)\u0013[c\u0010я\u0012Q0\u0010Tp\u0005(\u001d,,z!8'̊Uh\f{q\u0011\u0006q\u001f>_DNs [\u00038\u001bP\\xUb64vUw\u001f\u001b\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005:6\r\nendstream\rendobj\r346 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r343 0 obj\r<</Filter/FlateDecode/Length 186>>stream\r\nHLP\u000e0\u0010W\u000f'*\u001a\u0012\u0013b\u001f@ԋ\u0007-XmN3I婁\u001aݾ\u0001\u001d:\u0006QzfR0.,Wɔ\u0012\u0011r'\u000e\n\u0017`Q+\u0018hD\u0015V\u0005.\u000b\u0007#\\0p\u0018סM6ɱ540nԓ\u0012ܒ\u0016\u0015\u001c,[\rm\\G:w$A=}\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001a;\r\nendstream\rendobj\r344 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r91 0 obj\r<</Count 5/Kids[353 0 R 354 0 R 355 0 R 356 0 R 357 0 R]/Parent 64 0 R/Type/Pages>>\rendobj\r92 0 obj\r<</Count 5/Kids[358 0 R 359 0 R 360 0 R 361 0 R 362 0 R]/Parent 64 0 R/Type/Pages>>\rendobj\r93 0 obj\r<</Count 5/Kids[363 0 R 364 0 R 365 0 R 366 0 R 367 0 R]/Parent 64 0 R/Type/Pages>>\rendobj\r94 0 obj\r<</Count 5/Kids[368 0 R 369 0 R 370 0 R 371 0 R 372 0 R]/Parent 64 0 R/Type/Pages>>\rendobj\r95 0 obj\r<</Count 5/Kids[373 0 R 374 0 R 375 0 R 376 0 R 377 0 R]/Parent 64 0 R/Type/Pages>>\rendobj\r373 0 obj\r<</ArtBox[6.0 4.0 12.875 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 378 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 379 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 95 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r374 0 obj\r<</ArtBox[3.0 4.0 17.0 17.0]/BleedBox[0.0 0.0 19.0 20.0]/Contents 380 0 R/CropBox[0.0 0.0 19.0 20.0]/Group 381 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 19.0 20.0]/Parent 95 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 19.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r375 0 obj\r<</ArtBox[2.28181 4.24777 16.6476 15.4505]/BleedBox[0.0 0.0 19.0 20.0]/Contents 382 0 R/CropBox[0.0 0.0 19.0 20.0]/Group 383 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 19.0 20.0]/Parent 95 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 19.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r376 0 obj\r<</ArtBox[3.0 4.0 16.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 384 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 385 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 95 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r377 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 386 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 387 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 95 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r386 0 obj\r<</Filter/FlateDecode/Length 219>>stream\r\nHđ1\u000e0\fEw_$bB\u0015e\u0001PKV\u000e~\u0004\u0010S׊`ɓkm8\u001ckЩN\u0018&LFWŪt.Dk17=c|\u0004\r\u0011%jF\u0019xRfe/۬Q7aSa I^$šM6lH\u0003z`\u0006SG+\u0002\u00032i#\u0012\u00144X9/,k\bQ\\EGR'O3H\u001f_\\*\u001e\u000b`|\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000V7a\r\nendstream\rendobj\r387 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r384 0 obj\r<</Filter/FlateDecode/Length 183>>stream\r\nHTPA\u000e0\u0010+\u0003PD\fr\u0001Ę\u00180A\u000f~)blgg7\niSi\u0015\u0010E24O\u0019wJZ\u0010\"f\u0019NX`ppi\\2I\u0017G?\u0011dJWL<>E/2Ic5\u001a*b/. 竓nN\u001ev\u001b@\u0019gK_\n/ NcYw-\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r385 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r382 0 obj\r<</Filter/FlateDecode/Length 347>>stream\r\nHTn\u00021\f+\u0003ε*ʡ\u001fj\u0001*A\u000ft\u000b\u0002\u0014{df\u000e+\u001e7+\u000f+\rq\u001e<:cX\u001b\u000f(7zOrҼgeqs\rS\u000ex:}\u001ciP\t\u0011\u000bR}I\u0006\\㉂8\u0010h̬*.(\b\r|N5/\n8\u0003^\u0000\u000bmV2Jr\u0015j3lT\u0000y\u0015=dN\u0004%`\r$Ne\u0018(\u0015×!\r<)pABpQ\u00002\u0015)\u0018&z-R\u0005Z\"˚<U\\Ub@;laX0p\u0001-\u001bP/@\u001dB˽.8]\u001d\u0013\r=_Fmeo5>\u0000g\u001f\f v2,?a-\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001d\u0002Ƥ\r\nendstream\rendobj\r383 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r380 0 obj\r<</Filter/FlateDecode/Length 222>>stream\r\nHlQ1\u000e0\f@R;m(])B\u0003*@B\u0005\t\u0018>v\u0002\u000389\u0014\u0016E2\u0016\u00164\u0015$t'F`H\u00038\u00017b/R}%ȁ3\u0015=;\u0004!\b_ɎWrb8(\u0017ʝN:&f\u001aS\"\"XHӌ\u0012cSƁw߉S\u001dhm\u0015$)6fD?vk\u001d\u000b~ͼ?l1\u0006s\u0014yD؅2uy-\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000dM\u0007\r\nendstream\rendobj\r381 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r378 0 obj\r<</Filter/FlateDecode/Length 201>>stream\r\nHTK\u000e0\u0010)\u0002\u0014Z`\u000b\u001aW\u0010\u0017\u001e(+M'\u0003D=Mۙ-\u001dcl\u000f\u001d±E'H\u00124\u0003SO`**Le--.\u0013Ӆqz`ME)\u0019\u0003\u0002\u0018b79qkٟ62$E&Hmxt)64\u0010dvT:J(qñ\u0018s\u001cSn(\u0017k\u0018[\u0000o\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005=\r\nendstream\rendobj\r379 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r368 0 obj\r<</ArtBox[2.49998 3.5 17.8571 16.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 388 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 389 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 94 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r369 0 obj\r<</ArtBox[3.03999 3.81999 17.96 13.42]/BleedBox[0.0 0.0 20.0 20.0]/Contents 390 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 391 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 94 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r370 0 obj\r<</ArtBox[2.49998 3.5 17.8571 16.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 392 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 393 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 94 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r371 0 obj\r<</ArtBox[3.03999 3.81999 17.96 13.42]/BleedBox[0.0 0.0 20.0 20.0]/Contents 394 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 395 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 94 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r372 0 obj\r<</ArtBox[2.49998 3.5 17.8571 16.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 396 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 397 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 94 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r396 0 obj\r<</Filter/FlateDecode/Length 253>>stream\r\nHlQN0\u0010W\u000fd#\u0012RJ\u000f|@P@*=\u001f\u0005\u001bzvv\u0019\u001fgn7\u000f\u001aƖ:A%:\u0018D'\u001eO{M׃O\u0006\u0017:+4\bri8\u0016o3w*\u0007\u001a9j`%\u0016Sf M@rX\u0017\\79ŌV?L\\4\u000e\u0016R\u0010\u000eWEQm\u0014nNt\u0019!\u0014`j\u0000ռ&W/%&+v*&`fy0\u0003n\u001do$Es\u001d<7\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000m\\\r\nendstream\rendobj\r397 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r394 0 obj\r<</Filter/FlateDecode/Length 210>>stream\r\nHDAj\u00031\fE:ſ5g@ 4\u001e B\u0014.zh,Ŗ$\u0005q\u0011<=/-֍\u0004`No\"a\t1o9i\"~8ؐYC7+ŖQ8e\\\u0014k1Z)Di6\f'(\f8s\u0019]ZX&\u0017jGK+Uc̬[\u001b:n\u0014d{b汘h\u000f\u000eS?x;\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\fA\r\nendstream\rendobj\r395 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r392 0 obj\r<</Filter/FlateDecode/Length 253>>stream\r\nHlQN0\f|W\u000fԍI^$\t=\u0001\u0015BB\u0005iiZ6\u0010j#p\u001bA\u0007\u000b}KIKAB ǡ\u00048A\u0013փO\u000e\u0017:\u001bt\bDh\u001e %hN\"'K;̤\u001cҽ1\u000b:\u0006jD9\u0015nڧɮ`\"SpV$m\u001cmNt\u0019!V`h\u0000y+[[M\t\tVMfs\\\"n\u001dod֪\u00158^]\u001de%/H\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000e\\\r\nendstream\rendobj\r393 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r390 0 obj\r<</Filter/FlateDecode/Length 206>>stream\r\nHD\n0\f\u0014yfv\u0014A\u0010]\u0000C\u0004\u00047k&\u0012IKC;g\\{^R-\u00070\u0002g\u0003S\u00022ve<m\u001b-$v2d;0^_eY$D>8Қ0$4q\u0014|'h<h'\u0000\u0003ea&\u0016u@\u0011Q\u0004rւu'eTV\u0016],O\f\u0014O1Q\b\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0015\u0011A\r\nendstream\rendobj\r391 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r388 0 obj\r<</Filter/FlateDecode/Length 253>>stream\r\nHlQj0\u0010W\u000fxÒuJ\u0010BC?Bq\u000bi\u000e,9IK֬fgg~?ߍ\u0006O\u0011הԉ\fv~\rd\u0001}\u0010|,.\u0010|zQL'F\u001fX6\r\u0010mE@#GM\u001bd9Bw脽+(U\u000e\u0013\n=Q뻁K*D\u0016pZ\u0014m\u0014ntx\u0018!\u0014`\u0000y-Mi[\u001b^\u0015;\u0015\u00134N`\u0019\u0001WF\u0012ۢ9]˟<\u0015\u0000\u0000\u0000\u0000\u0000\u0003\u0000\\i\r\nendstream\rendobj\r389 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r363 0 obj\r<</ArtBox[4.0 3.0 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 398 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 399 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 93 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r364 0 obj\r<</ArtBox[4.0 3.0 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 400 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 401 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 93 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r365 0 obj\r<</ArtBox[4.0 3.0 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 402 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 403 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 93 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r366 0 obj\r<</ArtBox[4.0 3.0 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 404 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 405 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 93 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r367 0 obj\r<</ArtBox[3.03999 3.81999 17.96 13.42]/BleedBox[0.0 0.0 20.0 20.0]/Contents 406 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 407 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 93 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r406 0 obj\r<</Filter/FlateDecode/Length 208>>stream\r\nHDPj\u00031\f+\u0007߻lK\u0010JC> @\r=\u0016[h\u0019\u001b\u000f3,ؽ̠׃(oԓ\u0004my3\u001e$\u001ckp񱧀oxܵ4c\u0012ܾ詣<&\u0014\t6j%'`!\u00178E͂<s,`dQ\u00035\t]ZXFX@\u0017jGk\u000bUk&[\u001bx1lQ*k퉉sQQ\u000eOq}~\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000%A\r\nendstream\rendobj\r407 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r404 0 obj\r<</Filter/FlateDecode/Length 175>>stream\r\nHLOI\u000e0\f\u0015$6\\V=\n\u0007©K\u0003]ddg\u001c;\\3B\u0019S\u0006;QQ31rAw\u00110Jep1f\bX@Z$`x.&i'\u0004\u001f\f=\u0011kĥ\u001a\u0013E5bd\\\\#$6M(V?Gc{\rӲ|Oo\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00005\t\r\nendstream\rendobj\r405 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r402 0 obj\r<</Filter/FlateDecode/Length 175>>stream\r\nHLOI\u000e0\f\u0015$6\u0010hЪ'T\u001e\u0000T8\u0012R@\u0017%\u0019\u0019\u000e\u000e\u0018\u0003zQQ\u000b1|N7<}*\u0007úh\u0014W\u0005\u0002#\u0006G\u000fЕ>&ZHNs))?b8WKD}97\u0019gD\u0003b\u0013\n\u0011m\u001f\r\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0001\b5\u001e\r\nendstream\rendobj\r403 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r400 0 obj\r<</Filter/FlateDecode/Length 175>>stream\r\nHLOI\u000e \f\u0015\u0001.!kiSTE=\u0001QS+%TCE\u001e\u0018]3\\\u0019S\u0006;\u0005QQ31\u000e\u001a}˃x\u0011[\u001f[mBh\u0002ƘV!`=\u0002H6`xR\u000b\u001aoCF6\tL\u001f\fd-\u0012\u0011kĵ\u0013U5ڳļɸFI(eBaD\u001c16O=\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000Ǫ4\r\nendstream\rendobj\r401 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r398 0 obj\r<</Filter/FlateDecode/Length 178>>stream\r\nHLPA\u000e0\u0010+\u0003mw)Hz\u0015'b\u0007\u001f@\u0014\u000fJ\u0002?qfpn\u0010چ?4c\u0010\u0016J\u0016j\"F3芑K\u001d(\r\u0007\n\u000bcx\u0004\u0001\u0012H+/J:'ioR\u0012b8w#V\"~՜gZ͋N\u001dE[2Ǫlz?'DG\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000f7Y\r\nendstream\rendobj\r399 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r358 0 obj\r<</ArtBox[3.0 4.0 17.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 408 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 409 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 92 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r359 0 obj\r<</ArtBox[2.0 3.0 18.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 410 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 411 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 92 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r360 0 obj\r<</ArtBox[3.24998 4.25 16.75 16.75]/BleedBox[0.0 0.0 20.0 20.0]/Contents 412 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 413 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 92 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r361 0 obj\r<</ArtBox[4.0 3.0 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 414 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 415 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 92 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r362 0 obj\r<</ArtBox[4.0 3.0 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 416 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 417 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 92 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r416 0 obj\r<</Filter/FlateDecode/Length 178>>stream\r\nHLP\u000e0\f+\u0003m=镁8Mh\u0007L0\u000e\fi%l0M\u001d;\u001a\rB0\u0006tl\u0015BBMl;=x\u0011\"\u0016`_\u0012VYyp07M\u0010.ԈD?Rz't/NQ*mГ\u0013\u001cWJX+n0ϸmfyԑ()Lj<H6\u001f江\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000m7n\r\nendstream\rendobj\r417 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r414 0 obj\r<</Filter/FlateDecode/Length 178>>stream\r\nHLP\u000e0\f+\u0003m\u0013nꕁ8Mh\u0007L<\u000e\u0012i6\u0018j릎\u001dY\r\u0016k\u0019]\u000bw\nadFbll;=Ӆx\u0011`_eT%L7\n\u0013\u0011\u0002%\u0006'\fO*.u\u0002WkoP\u0012bغ\u0011\u000baq1R,cs]')QJ5c5xPUlzc\u001f\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000`78\r\nendstream\rendobj\r415 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r412 0 obj\r<</Filter/FlateDecode/Length 192>>stream\r\nHA\u000e0\u0010Es_hHLQBcpa\\p}a\u0001*P33y\u001cK5u\u0019vWk&30>Ε ʴu U5^_d\u00193!y\u0003h+\u0004tTZD{\tLOY$+#+ґq̿D>\u0007 J>\r\u000b,!g_{ܾBv<agId!\b\u0001n\u001d@x\f@p\u0010,L7\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000RFx\r\nendstream\rendobj\r413 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r410 0 obj\r<</Filter/FlateDecode/Length 207>>stream\r\nH\n@\u0010)\u00056wv6\u000b!0/z\u0000 0\u001f:\u0013:\u000e7\u0007L.\u0005'Uap,N\u0015J2dhdم}/\u0012u-qxpl,?>b\tŢ\u001diGc#x\u001aG\\~7\u000e\u001b`[\u0002\"\"`\u0001\u0016\fEx֡jBO ;^\"\u0004F(k3\u0004/#2YT\u0004%#\u0002sr\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000\n|d\r\nendstream\rendobj\r411 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r408 0 obj\r<</Filter/FlateDecode/Length 207>>stream\r\nHLP[\n0\u0010)\u0002MykP\u0003\u0014Q\n&jc&;ICG\u0019l;R\u0001[BBLq\u001c{\u001b\u001ez?\u0019\u0013G\u0001ҁ<ּ\u0018YT\u000ex\u0017lt\u001bق/ČԸrmyD\u001e\u0015qfl1SG6SBY`DU\u001a\rح/DC\u0011o<g9\t8_E\u0015$@\u0016\u0005Bj\u0013H~z>\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000HeG \r\nendstream\rendobj\r409 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r353 0 obj\r<</ArtBox[3.5 3.26892 16.5 16.7311]/BleedBox[0.0 0.0 20.0 20.0]/Contents 418 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 419 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 91 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r354 0 obj\r<</ArtBox[3.5 3.26892 16.5 16.7311]/BleedBox[0.0 0.0 20.0 20.0]/Contents 420 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 421 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 91 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r355 0 obj\r<</ArtBox[3.5 3.26892 16.5 16.7311]/BleedBox[0.0 0.0 20.0 20.0]/Contents 422 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 423 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 91 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r356 0 obj\r<</ArtBox[3.5 3.26892 16.5 16.7311]/BleedBox[0.0 0.0 20.0 20.0]/Contents 424 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 425 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 91 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r357 0 obj\r<</ArtBox[1.0 1.0 49.0 4.5]/BleedBox[0.0 0.0 50.0 5.0]/Contents 426 0 R/CropBox[0.0 0.0 50.0 5.0]/Group 427 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 5.0]/Parent 91 0 R/Resources<</ExtGState<</GS0 428 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 429 0 R>>>>/TrimBox[0.0 0.0 50.0 5.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r426 0 obj\r<</Filter/FlateDecode/Length 108>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!BQ*WB\u001ePL=@!@A\u0017$\u000e!\f\u0014L\u0015L\\.\b\u0005\f\u0003\f\u0005\b@Ɂ\\\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0014M\u0017z\r\nendstream\rendobj\r427 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r429 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 430 0 R/ShadingType 2>>\rendobj\r430 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[431 0 R]>>\rendobj\r431 0 obj\r<</C0[0.494118 0.584314 0.627451]/C1[1.0 1.0 1.0]/Domain[0.0 1.0]/FunctionType 2/N 1.00008>>\rendobj\r428 0 obj\r<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 432 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r432 0 obj\r<</G 433 0 R/S/Luminosity/Type/Mask>>\rendobj\r433 0 obj\r<</BBox[-32768.0 32767.0 32767.0 -32768.0]/Group 434 0 R/Length 55/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Shading<</Sh0 435 0 R>>>>/Subtype/Form>>stream\r\nq\n0 g\n/GS0 gs\n0 -3.5 -3.5 -0 25 4.5 cm\nBX /Sh0 sh EX Q\n\r\nendstream\rendobj\r434 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r435 0 obj\r<</AntiAlias false/ColorSpace/DeviceGray/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 436 0 R/ShadingType 2>>\rendobj\r436 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[437 0 R]>>\rendobj\r437 0 obj\r<</C0[1.0]/C1[0.0]/Domain[0.0 1.0]/FunctionType 2/N 1.00008>>\rendobj\r424 0 obj\r<</Filter/FlateDecode/Length 292>>stream\r\nHdRN0\f+\u0003qI\u0016\u0012\n-\u001c\n\"rɳ$Bi3\u001eON+N\"<bJJJ\u0006:?*wx/`r\u0001\u0011\u0017o %(L̬ѐwK\n)\u0005epCP\u000f6\u0001G\bn\u0010a <VhNz\u0005l0\u001bOi&im\u0001\u0019#oD\u0006W\"\u0015gfv9`+1^C_wЗ\fb]ڸ\u0018MJM<1&A[xW&\u0012\u0004\u001bWVڨx\"5^2c\u001fO\u001cAO\u0013vm>%vcCT\u0019~\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000zZ\r\nendstream\rendobj\r425 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r422 0 obj\r<</Filter/FlateDecode/Length 302>>stream\r\nHdRn\u0003!\f+\u0003xmX`&\"U~ͥ/\rb\u0017\rf<\u001e\f\u001eqGx<i*!)+0\rIdFYtog\u000eo !(L̬ѐwK\u0002)~\u0001epP9M6+D\u00189%f^\u0001+\fƾ\u000b4V$\u0015>48Cq\u0016SdSqG,83瀅T{\r%F2uUjb4)E7qǘ\u0004mY_aϋ@K\u0010l\\YiRԠ2[Rc\nK\u001c\u0000\u001abk%oSϷ^/\u001a'Jfn4D,6O\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u000049\r\nendstream\rendobj\r423 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r420 0 obj\r<</Filter/FlateDecode/Length 294>>stream\r\nHdRN0\f+\u0003qws݂VBZ\u0003\u001fP^X]\u000e>ND(5q왩y0\u001e\u001e\u0016ǓtI݀l\u000eo\u0005L)Zd</0\u001d_\u0019/pC,Kfbfb\u0013W+(K@\u0015PL>@j\\A`\u0010\"*m\u0005\nXaȷ?DZ\u0003΃3ԁzp)Yxܬ|s\tKҶk(\u000eShf\u00127rbmXa6椱՚J\u001b\u001aTפ\u00066M\u001bU\\찏r/G0#\u0013~nܞ3g=\u001a'\u001cy\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000*fz\r\nendstream\rendobj\r421 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r418 0 obj\r<</Filter/FlateDecode/Length 302>>stream\r\nHdRN\u00031\f+\u0003:\\[P%\n\u0015\u000e|\nziZ\u000e>kI@D\u0013g<u2=q:\u0019w\u000f{ǣ,S\t\u0012\u0001ɟy7\u0004&g#2-2go~x\u001bjd\u0019\u001a5\u00133\u001b4%z\u0014dYQ\u000544G@ c5 0R\b3V6Iz\u00050\u001bWi\"i\u0001\u0019@zp)8kWqffki'\\BWV{\r%A2uUjb4)\u001b96A_x~M%jl\\YiRԠ2[Rc~+\u001f|9o\u0013vFRϷ^/R\u0002\u001b1\u0011\u000b-\u0013\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000_V\r\nendstream\rendobj\r419 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r86 0 obj\r<</Count 5/Kids[438 0 R 439 0 R 440 0 R 441 0 R 442 0 R]/Parent 63 0 R/Type/Pages>>\rendobj\r87 0 obj\r<</Count 5/Kids[443 0 R 444 0 R 445 0 R 446 0 R 447 0 R]/Parent 63 0 R/Type/Pages>>\rendobj\r88 0 obj\r<</Count 5/Kids[448 0 R 449 0 R 450 0 R 451 0 R 452 0 R]/Parent 63 0 R/Type/Pages>>\rendobj\r89 0 obj\r<</Count 5/Kids[453 0 R 454 0 R 455 0 R 456 0 R 457 0 R]/Parent 63 0 R/Type/Pages>>\rendobj\r90 0 obj\r<</Count 5/Kids[458 0 R 459 0 R 460 0 R 461 0 R 462 0 R]/Parent 63 0 R/Type/Pages>>\rendobj\r458 0 obj\r<</ArtBox[4.72841 4.72841 17.985 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 463 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 464 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 90 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r459 0 obj\r<</ArtBox[3.99998 5.0 15.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 465 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 466 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 90 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r460 0 obj\r<</ArtBox[6.0 7.0 13.0 14.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 467 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 468 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 90 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r461 0 obj\r<</ArtBox[3.5 3.26892 16.5 16.7311]/BleedBox[0.0 0.0 20.0 20.0]/Contents 469 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 470 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 90 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r462 0 obj\r<</ArtBox[3.5 3.26892 16.5 16.7311]/BleedBox[0.0 0.0 20.0 20.0]/Contents 471 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 472 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 90 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r471 0 obj\r<</Filter/FlateDecode/Length 296>>stream\r\nHdRN0\f+\u0003qI\u0016\u0012\n-\u001c\n\"rq^%\u0011JkM\u001c{ftz^q:\u0015$a*)]R7`4Q\r)\u0006L;f1xt|e|\r5,\rZ\n~]!寠,Y\u0002GC!\u0004<\u0019q\u0003\u000fXٛW\u0006CU\u00114&\u0006\u001fp\u001e\u0014փ+WLKsevU\u001c+mo\u0019:*\\&&q#'&J\u000b\u0015DVڨx&5NfoTuvrˌ}+|9\u001f\u0013vv\u0014\\>E\u0018? ;/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000!Az\r\nendstream\rendobj\r472 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r469 0 obj\r<</Filter/FlateDecode/Length 301>>stream\r\nHdRN0\f}W\u0007:I4\u001bh\u0012҄\u0006\u000f|@\u0005{ِ6\u001e}[I@mS>=g=\u0011\u001e\u0012%u\u0003Fo%\u001dSRLnYR\u0016g\u000e/F)JLlRK\nʒ(Py4\u0014K\u001aW\u0010\u0018\rޤy\u00050\u001bw@ٖk\u000f8\rP{\nVA+ȥ33KKoU\u001cЕU^CI_W[aݖ\bMDTV\\HKظfҬRcIuMj5[S\u001eUcˌ}#|9oq\t;\u001d\u0005<߼^d\u001b\u0005vO%37\u001ac\"\u0016Z/O\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000O{\r\nendstream\rendobj\r470 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r467 0 obj\r<</Filter/FlateDecode/Length 174>>stream\r\nHPI\u000e0\f\u0015$NT\\\t\n\u001ex@\u0005EH _I\u000b\u001f@q&glb\u000e\tO.%[K\u000b1\u0012Jz\u0013\u001eڵ\u0011F u&ӍI\u000b,Xmt\u0015\u0001;RFeu\fm~wPHJH\u001a*Yw^5).+\f\u0017_ǎ,n\u0007W\u001aa^\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000V^H\r\nendstream\rendobj\r468 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r465 0 obj\r<</Filter/FlateDecode/Length 164>>stream\r\nH\\OA\n0\u0010+\u0003I64j\u001e|@\u0011EڂpR\tffg `8\u001c\u0013\t+z\u001f\u001avQ;KK\u0016OYk\u0007C/X\u001e\t3ef&86g|@}e-Ϫo_\u0011\u0016 Qv(\u001b]T98BI1X\u0012{\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001c4'\r\nendstream\rendobj\r466 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r463 0 obj\r<</Filter/FlateDecode/Length 231>>stream\r\nHdP۪\u00021\f|W\u000f۴M뾺\u0007,^\u0010\u0015?4Hۄɤj@\u001c\u0002?\u0003wZ<\u0014\u0010:}=pS-\b>\u001a$\u000b6\u000bb\u0006\u001c\u000eF\u0005(Wj+\baF!\u001f\u000b9\ta\u0006>gC5\u001f\nji93\\o0>\u0018'&\u0005\u0017\u0013QvVFRyJ$1|\\dV\u001cm_Ι(&\u0016\u0018<}\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\\=K4\r\nendstream\rendobj\r464 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r453 0 obj\r<</ArtBox[5.0 5.0 15.68 14.44]/BleedBox[0.0 0.0 20.0 20.0]/Contents 473 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 474 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 89 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r454 0 obj\r<</ArtBox[3.0 5.0 16.68 14.44]/BleedBox[0.0 0.0 20.0 20.0]/Contents 475 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 476 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 89 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r455 0 obj\r<</ArtBox[6.0 6.0 13.0 13.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 477 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 478 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 89 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r456 0 obj\r<</ArtBox[5.0 5.0 15.8535 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 479 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 480 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 89 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r457 0 obj\r<</ArtBox[4.60683 6.97926 15.9341 12.0207]/BleedBox[0.0 0.0 20.0 20.0]/Contents 481 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 482 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 89 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r481 0 obj\r<</Filter/FlateDecode/Length 130>>stream\r\nH$\n@\fD\u0015\u0003&ָxZ<I\u001e\u0001R\u0004i$\u00130\u0019,. -耰ow\u001b\u0012.s\u0018<;JQ\u001a`\\v\u000esS%\u0012N\u0017̘J/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000V\u001c\r\nendstream\rendobj\r482 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r479 0 obj\r<</Filter/FlateDecode/Length 191>>stream\r\nHLP\n0\f+\u000f&ժ\rO2}@\u0019\u001bC\u0007n\u000fK\u0007I\u0012^^ڡ\u0018:܁.BSS+1F;>Ķlj<n=\t:OV\bXM zxPb\u00162^L©4.iOC$MM7h7E\u0016\u0006\u0004Q\u0004mK&]V9\u001d4ϊB/$e\u001e%|)u< a\u0012o1\u001f\u0000\u0000\u0000\u0000\u0000\u0003\u0000f7\r\nendstream\rendobj\r480 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r477 0 obj\r<</Filter/FlateDecode/Length 153>>stream\r\nHLOK\n0\u0010)\u0005LƘQ\\\u0015).<@Ѯ\u0014Z\u000f|\u001b\u0018sK0Cb\tt\u0019\u0004Ll\u0016bt*y\u001e\u0010xLzg_Z`r,C\u001eӛ2Ϩ\u001f\u0002\u0013\u0007\u0013)l\u0017) m1\u0003\u001a׺uf&܂\\z/\u001ab#m\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0011-\r\nendstream\rendobj\r478 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r475 0 obj\r<</Filter/FlateDecode/Length 433>>stream\r\nHNc1\fy\n@8sNA\u0010B,\u0001\u0001\u0016H\u001c@\u0011\u001bt\u0013_Hgw!ß\u0003[\u001bDtI\u0019JvH PYS<dxzM\u0017 \u0010\f\u001c@QxNn:]\tLP\u0018.]W1lI}OM2M<p\bHayv,=jGncx\u0012[^i`NG{<tِ<\u0010,Oz\u00101*\bVO\\,JöJ030\u0003\u0014=\u0017E\u00167;\u0006\u001c1=/tk\u0007(\u0013\u001a,J⣴\u0016B\f#2v2}iɞ;5#,olu\u001d0͈\u001cgWo/J\u0013ήZ|M\fa6Bl\nbr2\nh{*\"X6OJΎl-rr\u001d{ѿ颳?yp\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000g)l\r\nendstream\rendobj\r476 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r473 0 obj\r<</Filter/FlateDecode/Length 536>>stream\r\nHdTKn\u001b1\f\u0014\"\t\n\u001e`Цq$\u0007HIv`\u0011)#53\u001eρ~ܝ?u\u001a[<^] ߆o\u0013\u0005Xŝ\u001e~\u0006zyw\u00140q\u00053\u0017\u0017\u0005\u001fz\b;܃T*VhL۲P-0\u001dn+cSG\"\u0012)b|N\u001fxH'\b|]-2\"䠠N\u0019\u0010\u00105W\u0001>@j7\u0015D(\u0002#\u0013\u0003$zL)r\u0004&\u001cB\u00156kЈ\u001e\u001f`[5(Vf\u001a`jM9S6\"\u0014\u0002HYh\u0003(}\u0015\u0005@8iu\u0001h9fPh83-l\u0007m9u\u001c\u0001(FXWsG1s\u001bZ͓\u0007㵛/\f0,u\b\u0002Ig5H\u000b\u0007Ͻ,,DAE\u0001Qŋ-(V\u0003>t8od\u001c\u0014{<R6^$-1O~0#eNK)4h-!\u001cNnru\u0005\u000454u6CjĚrLK\u001a\u0012g\u0015bk[@\u0012l\u0006xB}n[{1vi\u0007+GZ}\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0004\r\nendstream\rendobj\r474 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r448 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 483 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 484 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 88 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r449 0 obj\r<</ArtBox[3.99983 4.0 15.9998 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 485 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 486 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 88 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r450 0 obj\r<</ArtBox[3.0 3.5 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 487 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 488 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 88 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r451 0 obj\r<</ArtBox[3.0 5.0 16.68 14.44]/BleedBox[0.0 0.0 20.0 20.0]/Contents 489 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 490 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 88 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r452 0 obj\r<</ArtBox[5.0 5.0 15.68 14.44]/BleedBox[0.0 0.0 20.0 20.0]/Contents 491 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 492 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 88 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r491 0 obj\r<</Filter/FlateDecode/Length 537>>stream\r\nHlTn\u001b1\f+\u0003E}\u0013\u0014\u0014A\u000eE\u001e\u0001?!%n\u0013\u001aI|\u001ex\ntw\"q,Xzs~\u0007_gN\u0014|b\u0017w\u001cý\u0011ST(L\u000e\u0006\u0007\u0002A\u0014Kl\u000bӦ6wL95ˀ˂yd'\u0007n%l^%j\tO,`\f\u001b\u000e\u0014zk5J\b(U-c ^(gO>J\u000b'@\u00118IȐo=\b\u0004\u001cRk\u0012%ňkUJSgsӍ\u001a\u0002do\u00046]M\u000b1BwD)qJ\u0004\u001a\u0007VTb4d\u0018M}\u0016ۜ:\ns\rQ>*6*})}-h\u0015-i:چd\u0005{hLE&HX\u0019z5I\u0018m\"*;{)4\u0003B&)E1P)Ϻ/JqFɯYv]\u001c,443weCW$}ǥ>FO\u0017tj\r\u0001v'M\n\u0004\u0019~Hsʤ!v/K'-hi\u0013Jz'쒨j\u0018\u0001ޭa]b/`ra\u001bn\fx\f9k\u0016fKUڌ\\uHb_'\t\u0000\u0000\u0000\u0000\u0000\u0003\u0000T\r\nendstream\rendobj\r492 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r489 0 obj\r<</Filter/FlateDecode/Length 436>>stream\r\nHMN\u00031\f9/08R\u0010\nU,8\bbrg'\"X#6մ\u0013;/f~Ѽ9ߑy5)Sgoj^8\u001c~/G3?>;:~319<L\u0016\u001fM̝k\t&\fnvHʴ)2\u0005[\u001djl9Tq[ 8\u0007%:KF#&\u0014!QdՆD]8EQ\u001c\u001c\u000f\f\tR>DJ=o\"\nJ*u:z\u00104c\u001drHYwK\u001eaC=g1o/G-\u001ba\u0001+\u001c)E\u0019RL\n=o2V\u0001\u00158%O\u0013,,^+#T\u0004J[`\u0002H,\u001ckZ6 \u001dΣ\u0003(>ng\u001f6xݮVFr\u0007^2\u0011*ztCU`I$AB\u0003s˛\u00162N[\u0000v\u001bɉIG\u0015^70VJ8\\qmoMM\u001f\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000,\r\nendstream\rendobj\r490 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r487 0 obj\r<</Filter/FlateDecode/Length 143>>stream\r\nHd\n@\fD\u0015\u0003,U\nR\u001e\"Pz[\u0005$0\u0003/$!\u0013$,.\fa,lgxxDIG\nO*6\u001d\u0006٬X)\u0013p\u0013v[Xfx#\u0006t\u0000%\u000fR\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u00003'{\r\nendstream\rendobj\r488 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r485 0 obj\r<</Filter/FlateDecode/Length 144>>stream\r\nHt\n@\fDlU\nB\u0011'xb\u000fwkz\u0004&dx\u0019p*\b}1\u0005r諄l\u000eSgK'\r^ \u0006)zZ\u001d5PL(]\u00069pQS\u001bA.XT\u000fIH'҂6i\u001aڮe~\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000/\u001e\r\nendstream\rendobj\r486 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r483 0 obj\r<</Filter/FlateDecode/Length 165>>stream\r\nHlA\n\u00021\fE=ſIi*\u0003 :Gp!.#Xu\by$P/pc!7\u0005f;99b:\u000ej.jv\u001f&a$-Ft35*v\u0015\u0003&*3^bY]V\u0001&sh&1\u0018\u0014gi\u0019\u000e.cH\u0004]qo\u0003enwb37'\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000x\b;\r\nendstream\rendobj\r484 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r443 0 obj\r<</ArtBox[0.0 0.0 100.0 100.0]/BleedBox[0.0 0.0 100.0 100.0]/Contents 493 0 R/CropBox[0.0 0.0 100.0 100.0]/Group 494 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 100.0]/Parent 87 0 R/Resources<</ExtGState<</GS0 495 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 496 0 R>>>>/TrimBox[0.0 0.0 100.0 100.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r444 0 obj\r<</ArtBox[1.0 2.0 47.0 7.0]/BleedBox[0.0 0.0 48.0 9.0]/Contents 497 0 R/CropBox[0.0 0.0 48.0 9.0]/Group 498 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 48.0 9.0]/Parent 87 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 48.0 9.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r445 0 obj\r<</ArtBox[1.0 2.0 47.0 7.0]/BleedBox[0.0 0.0 48.0 8.99998]/Contents 499 0 R/CropBox[0.0 0.0 48.0 8.99998]/Group 500 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 48.0 8.99998]/Parent 87 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 48.0 8.99998]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r446 0 obj\r<</ArtBox[1.0 2.0 47.0 7.0]/BleedBox[0.0 0.0 48.0 9.0]/Contents 501 0 R/CropBox[0.0 0.0 48.0 9.0]/Group 502 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 48.0 9.0]/Parent 87 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 48.0 9.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r447 0 obj\r<</ArtBox[1.0 2.0 47.0 7.0]/BleedBox[0.0 0.0 48.0 9.0]/Contents 503 0 R/CropBox[0.0 0.0 48.0 9.0]/Group 504 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 48.0 9.0]/Parent 87 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 48.0 9.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r503 0 obj\r<</Filter/FlateDecode/Length 176>>stream\r\nHDP\u000e0\f+\u0003m-+\u0003qā\u000f`\u0017@>6P%'NmGpC8\u001c{iHh!FzN7\u0006\u0005'l\u000eL|e\u001fZ \u0004AmE\u0017|F4bk/\u0004*j0z'H$\u0002mr\u0016958!EmFqٜ\bo.i\u000f\u001a\tF\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000V5\r\nendstream\rendobj\r504 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r501 0 obj\r<</Filter/FlateDecode/Length 175>>stream\r\nHDPI\u000e0\f\u0015$vc\\\tS*\u000e<^\nR%Hc33\u0001\u000f)}\u0004WFRF\u000b1:h\u000ba}\u001dob+\u0007J\u0013zQ\u0013ˍ1}h\u0013h\u0003\u0007/J\u001cш\"TQ󇑌̑m8\u000bcY\\T(\u0014V[\u001bes\"8=i('\u0018\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000D5\r\nendstream\rendobj\r502 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r499 0 obj\r<</Filter/FlateDecode/Length 176>>stream\r\nHDP\u000e0\f+\u0003m-+\u0003qā\u000f`\u0017@>6P%'NmGpC8\u001c{iHh!FzN7\u0006\u0005'l\u000eL|e\u001fZ \u0004AmE\u0017|F4bk/\u0004*j0z'H$\u0002mr\u0016958!EmFqٜ\bo.i\u000f\u001a\tF\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000V5\r\nendstream\rendobj\r500 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r497 0 obj\r<</Filter/FlateDecode/Length 174>>stream\r\nHDPA\u000e0\f\u0015@d-[we N\u00138\tv\u0019H\u001bH\rTɉ\u0013ۑ\u001d\\1\u000et\u0015\\\u0019I\u0019-h\u0011\"LAwm\u0002$l\"։Ƙ>@W\u0004\rE\u0017\u0015X\u001f%\u0015\u0016R\u001fF2dV\u0012lL,\bϬ-gqSS7Q\f)jVr\"8=i(_0\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000Z5\r\nendstream\rendobj\r498 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r493 0 obj\r<</Filter/FlateDecode/Length 128>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\u0001\u0004낈Tp<{Bz1P>G-@%+\u0010\b\r\u0014\fL,BQ:H!D-4A\u0010F..\u0010\u0003 \u000e\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\t \r\nendstream\rendobj\r494 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r496 0 obj\r<</BBox[0.5 99.5 99.5 0.5]/Group 505 0 R/Length 81/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Shading<</Sh0 506 0 R>>>>/Subtype/Form>>stream\r\nq\n0.5 99.5 99 -99 re\nW n\nq\n0 g\n/GS0 gs\n49.5 0 0 -49.5 50 50 cm\nBX /Sh0 sh EX Q\nQ\n\r\nendstream\rendobj\r505 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r506 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 0.0 0.0 0.0 1.0]/Domain[0.0 1.0]/Extend[true true]/Function 507 0 R/ShadingType 3>>\rendobj\r507 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[508 0 R]>>\rendobj\r508 0 obj\r<</C0[0.392157 0.466667 0.54902]/C1[0.356863 0.427451 0.501961]/Domain[0.0 1.0]/FunctionType 2/N 1.85328>>\rendobj\r495 0 obj\r<</AIS false/BM/Normal/CA 0.149994/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.149994/op false>>\rendobj\r438 0 obj\r<</ArtBox[2.99994 7.0 15.0 13.0]/BleedBox[0.0 0.0 19.0 20.0]/Contents 509 0 R/CropBox[0.0 0.0 19.0 20.0]/Group 510 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 19.0 20.0]/Parent 86 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 19.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r439 0 obj\r<</ArtBox[7.5 4.5 12.5 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 511 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 512 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 86 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r440 0 obj\r<</ArtBox[7.5 4.5 12.5 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 513 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 514 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 86 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r441 0 obj\r<</ArtBox[8.5 4.5 13.5 15.5]/BleedBox[0.0 0.0 21.0 20.0]/Contents 515 0 R/CropBox[0.0 0.0 21.0 20.0]/Group 516 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 21.0 20.0]/Parent 86 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 21.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r442 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 517 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 518 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 86 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r517 0 obj\r<</Filter/FlateDecode/Length 362>>stream\r\nH\\Rj\u00031\f+\u0003Hڴ\u0014JC? AI\nM\u001f:IXZ\u001eI\u001a<oi2=<n)<lKP%!ء\u000bB_\u001d>~ÏE\bXH2%\u0012\u0016\u000b\u0005ᶷ3\u001caEuZYS5Iè .oᕾ~I,mj9tlIpsSQFvX'ZRTLIR\u000e\u0002\u0012n$\u0019nZKfj8J\rǚ`4R\rt$CjsD͐qCȕ8ܣ\u0012:3b\u0014\"Wc삻B^\u001bAD}uh#P\u0012lРCh||(\u0007\u0006yǄ\u0019_.^3:GUo\u00058|&\n=?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000v\r\nendstream\rendobj\r518 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r515 0 obj\r<</Filter/FlateDecode/Length 366>>stream\r\nH\\KN0\u0010>\\ɌR\u0010\nU,8@\u0004eTj?$E$==\u000foG\u001aOG#\u0013/I_9&O>x\u0011\u000f\u0015\u0002/n|}g\u001b\t1^F\u00114-Nyq\u0007\u001e#H\u0019ɠ\u0006\u00054tM|-16\u0006,6\u000f\nȺ&\u0000$[v{Vn6N\u0004Jzb&h\u00125T.朋B*5S4LF3\n\n\u0010ق\u0017hhv=;(^\u0014e{'X$\rRoH\u00171ɻ0\u001b5[|}k;a\u0001E<m~OXz]Z]\u0017Z?E}=YoRW\u0006\u000fjCU8\u0019jCS(9ncݤV\u001ezYEm)Sb\u0017\u00175Z.:n\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000f\r\nendstream\rendobj\r516 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r513 0 obj\r<</Filter/FlateDecode/Length 362>>stream\r\nH\\N0\fy\nZ;se N\u00138\u0000\u0015C\u0012h;ǿı9\u001bߎ4LOGr/'5c>uuL޾n~\u001c\u000fFz\u001b_ߙ.JBP8D;\u000b'eʜ\fj\u0000H\tA16ĸj,JG1;)h5RLe\u000774z\"\u0013cT\u001dib\u0000UL0\u0019J>W\"6_\u0016-Zj\u0010\u001bͮgW\nWr>CL7S\u000be]\rٚ­b5_NM|\"\u001eXz]OÚf$f\u0006-\u00147VOdP9äV\u001ezY Zj%\u0014´Sb\u0017\u0017\u001bBym\u001d\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000-\r\nendstream\rendobj\r514 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r511 0 obj\r<</Filter/FlateDecode/Length 364>>stream\r\nH\\Kn0\fD:\u0005/\u0010_ۦEWA\u0011t\u0003\u0018m\u0003$?P\u000ee;ED)R3vtdzz>{90%K7w}м'!ōL\u001fwâ>BP\u0012M\u0003/\u0003!u+s2\u0001 &$I'%=t\u0016\u001b\u0007\u0005\u0016PIꠚF\u0006[OpbL*\u00125\\,9\u0017@.Q)\u001a&Y\u0014T\u0016vܲE+\rbJjSgr_Ǣ\u0016Ff\u0014B\u001c\u000b3!)*&{#^$\u000f(iۯůׅXh\u0014\tqv\u00197nK5šUi\fah\n\u0005\u0003{jCo\u000bBO/L;or\u0017\u0010ʻos>\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000VER\r\nendstream\rendobj\r512 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r509 0 obj\r<</Filter/FlateDecode/Length 313>>stream\r\nH\\Kn\u00031\b\u000b0mZu\u0015UQ\u0017=M\u0017HI/\u0015p\u00139%3\u001f`\fx~E|z!u\u0002\u00119\"5\\?\u0003\u0010CcFBz=\u0007.Eذ\t\fO0@\u0016Rl\u0007\r\u0016b\u0005\rW8nR\"\u000bB\u0012IN\u0011$bbE,\t-h\u00067Xd?^<\u0006,Z\u000b\u000e\u0014$H \u0005\u0006dWc\u00131م!\nCMᔍ\u0012eǬe\u0014K.sr:v\u0005\u001b\u0017GL)5_B)=\u0012RL\tKױهkl?vd \\\u0010sl\u0002c</\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000@\r\nendstream\rendobj\r510 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r81 0 obj\r<</Count 5/Kids[519 0 R 520 0 R 521 0 R 522 0 R 523 0 R]/Parent 62 0 R/Type/Pages>>\rendobj\r82 0 obj\r<</Count 5/Kids[524 0 R 525 0 R 526 0 R 527 0 R 528 0 R]/Parent 62 0 R/Type/Pages>>\rendobj\r83 0 obj\r<</Count 5/Kids[529 0 R 530 0 R 531 0 R 532 0 R 533 0 R]/Parent 62 0 R/Type/Pages>>\rendobj\r84 0 obj\r<</Count 5/Kids[534 0 R 535 0 R 536 0 R 537 0 R 538 0 R]/Parent 62 0 R/Type/Pages>>\rendobj\r85 0 obj\r<</Count 5/Kids[539 0 R 540 0 R 541 0 R 542 0 R 543 0 R]/Parent 62 0 R/Type/Pages>>\rendobj\r539 0 obj\r<</ArtBox[3.0 2.99998 21.0 21.0]/BleedBox[0.0 0.0 24.0 24.0]/Contents 544 0 R/CropBox[0.0 0.0 24.0 24.0]/Group 545 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 24.0 24.0]/Parent 85 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 24.0 24.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r540 0 obj\r<</ArtBox[3.0 3.0 21.0 21.0]/BleedBox[0.0 0.0 24.0 24.0]/Contents 546 0 R/CropBox[0.0 0.0 24.0 24.0]/Group 547 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 24.0 24.0]/Parent 85 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 24.0 24.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r541 0 obj\r<</ArtBox[3.99983 5.0 15.9998 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 548 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 549 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 85 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r542 0 obj\r<</ArtBox[3.99983 5.0 15.9998 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 550 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 551 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 85 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r543 0 obj\r<</ArtBox[3.24998 4.25 16.75 16.75]/BleedBox[0.0 0.0 20.0 20.0]/Contents 552 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 553 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 85 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r552 0 obj\r<</Filter/FlateDecode/Length 276>>stream\r\nHъ0\u0010E+\u0007$iJ^ Ȳ',>{S4m#\u0013:93s\u000b-\u001a.7Eô SZ0ngERT|Eg\rjxO\u0011,\u0014B\u0010\u0013m\u0004Ё4*mDb\b3b&/Yb_\u001a8T)Aߑ}Tq\u0006\u0015Pb\u0013\u001dh׮eNTSjچh0y(\u001e\u0006Iu<0nH:%\u0015\u0018d2,ϣ,{c>7M\u0014\u001bX6c'&>\u0003\u0017G3\u0016vā9\t֌\u001dj\u0018/i_ϸ\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000nқ\r\nendstream\rendobj\r553 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r550 0 obj\r<</Filter/FlateDecode/Length 120>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\u00024R\br2R(\u0007r܃\r\u0014ҋ\nA@h`\u0002Tci`h\u0005\u00122\u0004Q9\\\\HL\u0015\f\b*$\f\n\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000)\r\nendstream\rendobj\r551 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r548 0 obj\r<</Filter/FlateDecode/Length 144>>stream\r\nHt\u000e0\fDw}A3i\u0004T\tBO``\u0003bqP\u0006*K>$s\u001fkP!і_\".QpE\u0015iQ\\\u0007Q͞\u001bKjCDcJ\u0006;fi,lI.?\\rKXr?$KDY4V\u000f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000.r\r\nendstream\rendobj\r549 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r546 0 obj\r<</Filter/FlateDecode/Length 128>>stream\r\nHL1\u000e@\f\u0004}~\u0000vRPs *\u0014\u0001E\u001e4\u0004\u0014|?+lXrxE6\n*\u0012u\u0012Z!癙\u000b$75޵o`<\u0019\u001d+|s\t\u0003\u001b\u0011f%\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0001j \r\nendstream\rendobj\r547 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r544 0 obj\r<</Filter/FlateDecode/Length 129>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\t\b\u0002qQ*WB\u001e\u00022\u0019eP\u000e\u001el^U\u0000\u0001BC\u0005c\u0005C#\\.\u0010/\u0002Hp\u0005s\u0005\")\u0001*02D1P\u0005*(\u0002(\u000b\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\fw!\u0001\r\nendstream\rendobj\r545 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r534 0 obj\r<</ArtBox[1.0 0.9375 11.0 11.0]/BleedBox[0.0 0.0 12.0 12.0]/Contents 554 0 R/CropBox[0.0 0.0 12.0 12.0]/Group 555 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 12.0 12.0]/Parent 84 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 12.0 12.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r535 0 obj\r<</ArtBox[3.82236 0.0 12.0 8.17764]/BleedBox[0.0 0.0 12.0 12.0]/Contents 556 0 R/CropBox[0.0 0.0 12.0 12.0]/Group 557 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 12.0 12.0]/Parent 84 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 12.0 12.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r536 0 obj\r<</ArtBox[3.82236 0.0 12.0 8.17764]/BleedBox[0.0 0.0 12.0 12.0]/Contents 558 0 R/CropBox[0.0 0.0 12.0 12.0]/Group 559 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 12.0 12.0]/Parent 84 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 12.0 12.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r537 0 obj\r<</ArtBox[3.82236 0.0 12.0 8.17764]/BleedBox[0.0 0.0 12.0 12.0]/Contents 560 0 R/CropBox[0.0 0.0 12.0 12.0]/Group 561 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 12.0 12.0]/Parent 84 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 12.0 12.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r538 0 obj\r<</ArtBox[1.99998 4.0 8.0 15.0]/BleedBox[0.0 0.0 10.0 20.0]/Contents 562 0 R/CropBox[0.0 0.0 10.0 20.0]/Group 563 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 20.0]/Parent 84 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r562 0 obj\r<</Filter/FlateDecode/Length 518>>stream\r\nHTKn[1\f\u0014eQ>o[*(.z\u0000M\u0017N\u00072m)(P\u00184\u0012Eqf|~)ї\u0013\u0018c[H\u0013q\u0003_'\u00147\u0011¨9\u001cH7\u0011SIp-\u0016:\u0004/\"%\u0016R\u0014W9e\u0003\u0012sU:[P\u001dPs\u0006jV\u000f\nZC ҕ\u0005bq#\u001d)e9rmd#g=Ny/@'uE2ub;-`\tÓ1F}v\u0016s\u0010\u0010Sz1u)&K\u001eX\u001c_\u0002\u0016IV|;J\u0007Tb)\u0010۳!mym\u001bnJP\u0011\nt\t%S塥sX꿄ܕrr@!=by_6K\u001b{e&c\u0018\u001boҪicK,M\f`'u3%ۙy7\u0019+865ɜ~xɴ\u0017lݹ\\\t\u000ehI\u001b\u0013\u001ct]NnW\u0018r\u0007e\f\u0017\u000bN0cVo\f\u0016\u001f`[S\u001dghp;\f\u0016 ׯyn\u001d{Zk๼֞fbiڵ0\u0000_{\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000_\r\nendstream\rendobj\r563 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r560 0 obj\r<</Filter/FlateDecode/Length 297>>stream\r\nHL;n0\fw\u00170MEi[t\nC\u000f`Y\u0000I\u000flLd\u001f\u000bΧuAx;K\u0001\u0012|Mv?\u000b\u0014\f\u0005O/<P\u0012\u0014&eXIT\u000b7p\r&(\u0013ۢ܊Tߚm\u0015\\a*25xI-\fͫ-f<wuM\u0007 sj!(d5x(TZD\u0007Т;0e6^)Þ466GO\u0001JDR75[\f5m`*]\u0003r\u0016꥜e\u001c\u0018~B-;is(5Zh7]{\u001588OdnV+\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u00009i\r\nendstream\rendobj\r561 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r558 0 obj\r<</Filter/FlateDecode/Length 298>>stream\r\nHLn0\f~\n\u0000Ɔ$vcNT\u0007@[/mv/N\u0000M\u0004+0~,8\u0016Ɨ\u0005f.\u00070\u0014k\r_x\u0007&˂\u0002'\u0017\u001eN\u0004Ig4\u0012Ղ\ri\u0016Ł}QIaE,xk+\fRuY\u00190{լms!r[h\u001dzuǫNӎB^CBf\u0011\r:\u0001S2y8\u0007Q4oQ\u0018\tAHJ\rF&uyA5\u001dd!\nnQ*Xqj'TsրbSHZZ֪8ϝ\tXS,\n?p\u0019\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000mi\r\nendstream\rendobj\r559 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r556 0 obj\r<</Filter/FlateDecode/Length 297>>stream\r\nHL;n0\fw\u00170MEi[t\nC\u000f`Y\u0000I\u000flLd\u001f\u000bΧuAx;K\u0001\u0012|Mv?\u000bTby\u000b\u000f\u0014d\u0004I#V\u0012Ղ\r)Ķ$\"շfj[\u0005W\nfLM3^aR\u000bCj}\u0019']]A5v\u001aj\b;\nY\r2\u001e\nժ\u0016A(h\u000eLYWb=il\u0000KEm\u00119폞\u001f\u000384\u0007odkR\u0019tkXFU\u0007^-K980NZvPjpJo*qp蟀5ܬ\u0003W\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000i\r\nendstream\rendobj\r557 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r554 0 obj\r<</Filter/FlateDecode/Length 216>>stream\r\nHLPAn\u00031\b\n>`\u00160l*!\u000fX%9&\nk%l\f\f\u0006{Zp:-\u0005xr3\u0006\u0015.\u000bL}af?aCA%(\u000f\u0004\u000bkԛ`2b1Y!uj&q̺FŞޱX匕JL\u0011\u001cZiؼc5dTgd~X2 G>@b\"UqI/{p3\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000iA:\r\nendstream\rendobj\r555 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r529 0 obj\r<</ArtBox[2.0 1.99998 38.0 38.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 564 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 565 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 83 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 566 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r530 0 obj\r<</ArtBox[3.0 1.99998 39.0 38.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 567 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 568 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 83 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 569 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r531 0 obj\r<</ArtBox[2.0 2.0 38.0 38.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 570 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 571 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 83 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 566 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r532 0 obj\r<</ArtBox[1.0 0.937485 11.0 11.0]/BleedBox[0.0 0.0 12.0 12.0]/Contents 572 0 R/CropBox[0.0 0.0 12.0 12.0]/Group 573 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 12.0 12.0]/Parent 83 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 12.0 12.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r533 0 obj\r<</ArtBox[0.999985 0.937485 11.0 11.0]/BleedBox[0.0 0.0 12.0 12.0]/Contents 574 0 R/CropBox[0.0 0.0 12.0 12.0]/Group 575 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 12.0 12.0]/Parent 83 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 12.0 12.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r574 0 obj\r<</Filter/FlateDecode/Length 216>>stream\r\nHLPˮ\u00021\b\u0015@\u0019hkh\\\u0019c\\\u000fJOi1m\u000f\u00078\u0014<t\u0019w\u0019p2FHFh\u0005F/\u0003Z\u0016\r\u0015-hKP\u0004#.wpQWıc@TU\u0017F*U\u0013[z㢮\u0012\u0016^Ʋr#V(\u00165z\u0013e\u0017%a\"ˣjσ\u0004&\u001fS\r\u0017Z<\u00132V\u000be\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0006AU\r\nendstream\rendobj\r575 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r572 0 obj\r<</Filter/FlateDecode/Length 217>>stream\r\nHLPAN\u00031\f\u0015xI6WS*\u000e<`\u0005=\t{#*\u001e{Ʊur\u0004O\u001btv̔ԍ\u0004c'?\u000fz7\t2ޯ\t?tB|)TQDaGW$c\u0003\u0003)Nip7X\u0005+\u0017\u0007]BϽ\u00144Q\u001aٕk387shG\u0013\u0013u\u0015yEa˳\u0013J\u0001p\u0017T\u000b'-&֏ȅu\u000b(ܝ>2B\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\u0017Aa\r\nendstream\rendobj\r573 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r570 0 obj\r<</Filter/FlateDecode/Length 322>>stream\r\nHTRKN0\f\u0014];e\u00060B\b$\u000ePl:\u0019/aIۨM\u001cy=Bs>2<\u0010\u001eϺ5n\u00127\u0002C~u\n\u001f/ӕ\u001b\u0002H\u0007Lļ/*z\u0003\u0001O\u0010\u0019k0h;\u0001@\u0002j\\Ys@\u0019,[}Ue;V-1Gzg4:ًSw\";FvەFR\u0019Ɓ&\u0012Ah\f8L\u0005C\u0007m!.WS\u001b@\u001dd5U\f:R\u001c\u00148hZRDR͂[:h\n\u0001#\u001c\u001c:ͧ.\u00153\u0015mq2.\u0005۪V\\-VذO\t7\u001e[\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000AX\r\nendstream\rendobj\r571 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r566 0 obj\r<</BBox[2.0 38.0 38.0 2.0]/Group 576 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 577 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 578 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 36 2 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r576 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r578 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 36/Intent/RelativeColorimetric/Length 96/Name/X/SMask 579 0 R/Subtype/Image/Type/XObject/Width 36>>stream\r\nHK\n\u0000 \b\u0004P#\n\n3~+/|%\u0004\u0006{D\u0010\"\u0017AF>Y(Dd:Lv\u0003j.\rB[~\u0002[$S\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000I\u0003\r\nendstream\rendobj\r579 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 36>>/Filter/FlateDecode/Height 36/Intent/RelativeColorimetric/Length 563/Name/X/Subtype/Image/Type/XObject/Width 36>>stream\r\nHb` \r022A\u0001##\u000e\u0005,l\u001c@E\u0019#3\u001b\u00170\u001f\u0017\u001b3\"F&\u0016N~\tE-CSs\u000b\u000bsSC-E\t~N\u0016&F\u0014%\"J\u000e~\u0011qIIq\u0011~\u000eJ\"ܬHJx$4r\u001a͚3gִ0;M\t\u001e$E@%n)M>tcvݔ+\tT\u00043[B3gw\u001f=yɣ\u000fԕfaST-{>~/\u001f_;?MS\u0013;F6~%\u001f_ 7)0sI\u00185>Ͽ??=>)H\u0019\u001a>Eه}+\u0001+pМ\\'e~VFUZ\r/P\u0002RM-!z\u001c@1\u0019F7\u0012ߟ\u001e\u001cl)\rC4nڡG_G\u0001=;(Q\u0017}&NIYG|ߏ\u0017WWx\u001c)e<oj~SM\u0000\u001fί(vQcO/ʱ?_\u001f\u001fb)ͅ\u001f2\u0012\u0007\u000f0|uy}0(pŽCs\u001c\u0014\u0003O\u0019J㔨AL\u001a#&\u0012;A2Qe\u0002qe\u000bD\u00192\n\u000f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00003'\r\nendstream\rendobj\r577 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 580 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r580 0 obj\r<</BC 581 0 R/G 582 0 R/S/Luminosity/Type/Mask>>\rendobj\r581 0 obj\r[0.0 0.0 0.0]\rendobj\r582 0 obj\r<</BBox[2.0 38.0 38.0 2.0]/Group 583 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 584 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 36 2 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r583 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r584 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 36>>/Filter/FlateDecode/Height 36/Intent/RelativeColorimetric/Length 563/Name/X/Subtype/Image/Type/XObject/Width 36>>stream\r\nHb` \r022A\u0001##\u000e\u0005,l\u001c@E\u0019#3\u001b\u00170\u001f\u0017\u001b3\"F&\u0016N~\tE-CSs\u000b\u000bsSC-E\t~N\u0016&F\u0014%\"J\u000e~\u0011qIIq\u0011~\u000eJ\"ܬHJx$4r\u001a͚3gִ0;M\t\u001e$E@%n)M>tcvݔ+\tT\u00043[B3gw\u001f=yɣ\u000fԕfaST-{>~/\u001f_;?MS\u0013;F6~%\u001f_ 7)0sI\u00185>Ͽ??=>)H\u0019\u001a>Eه}+\u0001+pМ\\'e~VFUZ\r/P\u0002RM-!z\u001c@1\u0019F7\u0012ߟ\u001e\u001cl)\rC4nڡG_G\u0001=;(Q\u0017}&NIYG|ߏ\u0017WWx\u001c)e<oj~SM\u0000\u001fί(vQcO/ʱ?_\u001f\u001fb)ͅ\u001f2\u0012\u0007\u000f0|uy}0(pŽCs\u001c\u0014\u0003O\u0019J㔨AL\u001a#&\u0012;A2Qe\u0002qe\u000bD\u00192\n\u000f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00003'\r\nendstream\rendobj\r567 0 obj\r<</Filter/FlateDecode/Length 322>>stream\r\nHTRN0\f}W\u0007Iۀ\u0017&4\u0007T\u000e\u0012N>o'Nv|d8κ5f\u00123\u001dC~r\u001f.\r\u00130.\u001a\u001d%:A\u0013\b\u0001<|s\u0011\u001d{\u0000Q\u0018\u0002m\u000eeh*cْ\u001ds\u0005[F9{qNN(vmvo?/dX\u0010G\u0010zmF\u000e\nL.Î|5\u0006{\n;XA\u0019d5Ut:\u001f#\u00148hVB::Ma\u001cPZLLn\u0016\u0001XSԥLq6\u0016|`\u0005e,.\u0005۪^{Z\u0006c\u0012@z\u0017\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000Rag\r\nendstream\rendobj\r568 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r569 0 obj\r<</BBox[3.0 38.0 39.0 2.0]/Group 585 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 586 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 578 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 36 3 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r585 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r586 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 587 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r587 0 obj\r<</BC 588 0 R/G 589 0 R/S/Luminosity/Type/Mask>>\rendobj\r588 0 obj\r[0.0 0.0 0.0]\rendobj\r589 0 obj\r<</BBox[3.0 38.0 39.0 2.0]/Group 590 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 584 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 36 3 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r590 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r564 0 obj\r<</Filter/FlateDecode/Length 319>>stream\r\nHTRN0\f}W\u0007I/6\tM \u0001\u0015\u0003mKH%\u0011t\u0004t\u0016%\u0015'X?'{yp\u0013k|p5\u0017A\u0010z\u000f݁AB\u0003ga/(őF7\u0001\u000e'\u000fn\u0017\u001cQ5|Ej\u001651GQdlFi\u000eޤt&ru\u0016Vd\u001fQ\u0014\u0016@Ώ\u0012\u0006G\u000b\n2\u0011s\u0016cEk\u0012\u0003cX\tl%\u0013\\\u000bdG}YAR\u0019{I\u0012_LVYym,>mil:\u0013ܴ<XMX-\u0005ml]V!vv\u001bb\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001a\r\nendstream\rendobj\r565 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r524 0 obj\r<</ArtBox[5.0 4.5 15.9955 15.35]/BleedBox[0.0 0.0 20.0 20.0]/Contents 591 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 592 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 82 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r525 0 obj\r<</ArtBox[4.0 3.0 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 593 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 594 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 82 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r526 0 obj\r<</ArtBox[4.0 3.0 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 595 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 596 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 82 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r527 0 obj\r<</ArtBox[4.0 2.99998 17.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 597 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 598 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 82 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r528 0 obj\r<</ArtBox[4.99998 4.99998 14.0 14.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 599 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 600 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 82 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r599 0 obj\r<</Filter/FlateDecode/Length 292>>stream\r\nHlRN0\f}W\u0007Is{=Mh\u000f`h6_8D\u0010(icn片$81=q\fKWו]\u001d\u001b'ISdǂ#o'\u001avG\u0017]YYٞ/dB]\u0000,~L\t&\u0013wxJVcYF+\u000f#-\u000b-%\u001b\rFq\u0006)U\u0016\u001br9F\u0003\u0010vΤ\u0006\u000b6TG[\u0011k[܌y4/Mck\u000b)fV\r\u001b\u0006s/At;ݗ\u001d\u0012܌\u0016\u0015dź0]\u0014]FVL}ڇBǺ[v3\u001f\bV]\u0010\u000bHm\u0015n\u000bс\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000nr\r\nendstream\rendobj\r600 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r597 0 obj\r<</Filter/FlateDecode/Length 204>>stream\r\nHA\n0\u0010Esi*\u0005\b.\u0004i\u0017Iڴ\r\u0012\u001b2$?7ȻFch@N<D\u001c\"٪Ί,pxq\u00125/zQ`ԙNm$\u001fl\u0003)\u0003x.3-q,5\t|UYM`\u001aV0\u001f\u0004^b9}\u0013bp!\u001eo\u000f\u001cȽ~\\\u001dԲ%c!\\M\u001f\r\u0000\u0000\u0000\u0000\u0000\u0003\u0000vn}\r\nendstream\rendobj\r598 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r595 0 obj\r<</Filter/FlateDecode/Length 197>>stream\r\nHt\n0\u0014xo`n9ͿY\bDy\tQBsa\\6P\u0014;E<E.E\u000ed\u0005\u001dٺu\u001e\u0004mdxlw^kb<8^28\u0018Y\u0012PJ\r@^jOeI{j25m\u00181\r8yM\u001a\u0001X\u0002\u000esŬ;҅[8f\u0015+G/B\u000f~\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000v\\\r\nendstream\rendobj\r596 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r593 0 obj\r<</Filter/FlateDecode/Length 159>>stream\r\nHA\n0\u0010Es&3&iT*=\u000bAB?8m\u0017*T\u0012\u0002\u001f2<}\u0018{ʰCf\u001c\f:\u000e\u001av\u001d:bb\u000b6>i\u0004\u001fpIpW\u001f\u0019\u0017=!`}\u0004\u0011\u0013phO4\u001f4\t%FT\u0007b4nc+b+\u0016T\u000bIj(RV+_i_\u0005-~\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000a\r\nendstream\rendobj\r594 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r591 0 obj\r<</Filter/FlateDecode/Length 283>>stream\r\nHRj0\f|W\u000fر\"N^ \u000f2\u0006#\u001dt~da6\u0018IN|:L\u0005a\t-RRW\n\u0018xgS\u0013 jӞ\u0018oV?\u0005~\u0015`\u000fy\u0002W\u0013\u0017*\u0007\u00173Vb\u001f\u001eGjt\bTpn%#m6\u001at\u0015\rײ:@Ţ<2Emwc7OAT,䜥ƧL\u0002Q\u0005Qƭ\n0\u001eЩd[TX\f\u0004\u0006290k.ZREVω{s\u001bsw,Fǟ66V#}\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000fysA\r\nendstream\rendobj\r592 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r519 0 obj\r<</ArtBox[0.0 0.0 30.0 30.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 601 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 602 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 81 0 R/Resources<</ExtGState<</GS0 603 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 604 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r520 0 obj\r<</ArtBox[1.0 2.0 12.0 13.0]/BleedBox[0.0 0.0 14.0 14.0]/Contents 605 0 R/CropBox[0.0 0.0 14.0 14.0]/Group 606 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 14.0 14.0]/Parent 81 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 14.0 14.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r521 0 obj\r<</ArtBox[1.0 2.0 12.0 13.0]/BleedBox[0.0 0.0 14.0 14.0]/Contents 607 0 R/CropBox[0.0 0.0 14.0 14.0]/Group 608 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 14.0 14.0]/Parent 81 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 14.0 14.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r522 0 obj\r<</ArtBox[1.0 2.0 12.0 13.0]/BleedBox[0.0 0.0 14.0 14.0]/Contents 609 0 R/CropBox[0.0 0.0 14.0 14.0]/Group 610 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 14.0 14.0]/Parent 81 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 14.0 14.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r523 0 obj\r<</ArtBox[4.5 3.5 16.5 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 611 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 612 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 81 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r611 0 obj\r<</Filter/FlateDecode/Length 155>>stream\r\nHL\n0\u0010D\u0015\u0003m\u0012ljh? ApIK\t\u00197\u0013\u0019n\u001ekF+(\u0014ӹoD]s\u000fc\u0017\u0001' \u0011E\u001asf\u000eM e\u001b*\t]T\u0003[<\u000e=}=v\u001b}퍽[\u001aI5%P,^\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000l0\r\nendstream\rendobj\r612 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r609 0 obj\r<</Filter/FlateDecode/Length 268>>stream\r\nHRIn0\f\u0015eҋd]\u00169\u0005C\u001f\u0010!\t@R%ACmk\b!RsWO=\u0006PfJ3%\u0007>@z'|\u000b+\u000b^x8&\u0013\u0019}\u001ax\u000fz.റ+!u@VUl\u0003v+\u000ej,[׎ca\u0016ܣʽ}M\".M\u001e̩\u00168\u0011\f.n?\u0004$1K:I,,\u0007\u0018B)Tv\u0006{B\by\u001b&M'j\u001aZL-QRKWs/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ی\r\nendstream\rendobj\r610 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r607 0 obj\r<</Filter/FlateDecode/Length 198>>stream\r\nHQ\u000e \u0010W\u000f(Ɠi~iT\u0013']Q<41LXfv [\u0001U\u0015\u0000]+\u00015\\\u001a37#Yӓ\u001e\u0018c\t\u0004M^*\u001bF\u0011\u001a,C#\rڞܶHxSCuE'b>\u001asK1aH\u001c|\u0005>PqS92\u0001$dc)Mɡvͷy]O_X}/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000W\u001a\r\nendstream\rendobj\r608 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r605 0 obj\r<</Filter/FlateDecode/Length 206>>stream\r\nHQ\u000e \u0010W\u000f\b(^k\u001bO\u001e\u0001Rh?邏\u0001f2;\u0003A_\u000bUAx:\u0017\bJ@O%J\u0003\u0010rg\"k|\u001d@S\u0004x+A\ra\u0001\u0019I\u0006cNYl{\u001eT\u0005\rԑ&\u0017\u0005ODΚߘ6f/!ɒ>F;x<Efn'f\u0003̓\u0005!7\u001dKWC۫־{,\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000X V\r\nendstream\rendobj\r606 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r601 0 obj\r<</Filter/FlateDecode/Length 115>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!1\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u0006z\u0016\u0016F\n\u0006z\u0010(\u001d\u0010LTAH\blN\u001a6\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001bV\r\nendstream\rendobj\r602 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r604 0 obj\r<</BBox[-3.0 32.0 33.0 -2.0]/Group 613 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 614 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 615 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 34 -3 -2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r613 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r615 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 34/Intent/RelativeColorimetric/Length 59/Name/X/SMask 616 0 R/Subtype/Image/Type/XObject/Width 36>>stream\r\nHb`&`\u0001\b@RO\tL\u0011\u0011j+(\u001aU3fV\"*/\u0013U&P\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\r\nendstream\rendobj\r616 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 36>>/Filter/FlateDecode/Height 34/Intent/RelativeColorimetric/Length 273/Name/X/Subtype/Image/Type/XObject/Width 36>>stream\r\nH=\u000e@\u0010F%.? \u0010()(B\u0001$p\u000b@O܂\u000b(7\"v\u0010M\u0014hLW\u0014}X\t!\u000b\u0000\nKQ?ĥ@\u0016\u0011jia\u001a0a([z\u001b\u001f\\WNc\u0014}\r}\u0000}\u0018l׺\u0018Dj4y\u0001yF;[ew\u00135X<\r\u001cM/Yyj\u000e62\u000b]Cz8Ey՜\u0001П*<S\u001cˏ/#ҷ\u0007\u001eI\u001b+`\u001cHμ[ n\u0006\"cb2\u000e.~\u001c\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000tX\r\nendstream\rendobj\r614 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 617 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r617 0 obj\r<</BC 618 0 R/G 619 0 R/S/Luminosity/Type/Mask>>\rendobj\r618 0 obj\r[0.0 0.0 0.0]\rendobj\r619 0 obj\r<</BBox[-3.0 32.0 33.0 -2.0]/Group 620 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 621 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 34 -3 -2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r620 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r621 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 36>>/Filter/FlateDecode/Height 34/Intent/RelativeColorimetric/Length 273/Name/X/Subtype/Image/Type/XObject/Width 36>>stream\r\nH=\u000e@\u0010F%.? \u0010()(B\u0001$p\u000b@O܂\u000b(7\"v\u0010M\u0014hLW\u0014}X\t!\u000b\u0000\nKQ?ĥ@\u0016\u0011jia\u001a0a([z\u001b\u001f\\WNc\u0014}\r}\u0000}\u0018l׺\u0018Dj4y\u0001yF;[ew\u00135X<\r\u001cM/Yyj\u000e62\u000b]Cz8Ey՜\u0001П*<S\u001cˏ/#ҷ\u0007\u001eI\u001b+`\u001cHμ[ n\u0006\"cb2\u000e.~\u001c\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000tX\r\nendstream\rendobj\r603 0 obj\r<</AIS true/BM/Normal/CA 0.25/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.25/op false>>\rendobj\r76 0 obj\r<</Count 5/Kids[622 0 R 623 0 R 624 0 R 625 0 R 626 0 R]/Parent 61 0 R/Type/Pages>>\rendobj\r77 0 obj\r<</Count 5/Kids[627 0 R 628 0 R 629 0 R 630 0 R 631 0 R]/Parent 61 0 R/Type/Pages>>\rendobj\r78 0 obj\r<</Count 5/Kids[632 0 R 633 0 R 634 0 R 635 0 R 636 0 R]/Parent 61 0 R/Type/Pages>>\rendobj\r79 0 obj\r<</Count 5/Kids[637 0 R 638 0 R 639 0 R 640 0 R 641 0 R]/Parent 61 0 R/Type/Pages>>\rendobj\r80 0 obj\r<</Count 5/Kids[642 0 R 643 0 R 644 0 R 645 0 R 646 0 R]/Parent 61 0 R/Type/Pages>>\rendobj\r642 0 obj\r<</ArtBox[0.0 6.0 30.0 30.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 647 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 648 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 80 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 603 0 R/GS2 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 649 0 R/Fm1 650 0 R/Fm2 651 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r643 0 obj\r<</ArtBox[0.0 0.0 30.0 30.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 652 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 653 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 80 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 603 0 R/GS2 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 654 0 R/Fm1 655 0 R/Fm2 656 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r644 0 obj\r<</ArtBox[6.5 8.5 22.5 24.5]/BleedBox[0.0 0.0 30.0 30.0]/Contents 657 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 658 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 80 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r645 0 obj\r<</ArtBox[4.0 6.0 26.0 28.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 659 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 660 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 80 0 R/Resources<</ExtGState<</GS0 661 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 662 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r646 0 obj\r<</ArtBox[4.0 5.99998 27.0 28.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 663 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 664 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 80 0 R/Resources<</ExtGState<</GS0 603 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 651 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r663 0 obj\r<</Filter/FlateDecode/Length 385>>stream\r\nHTmN0\fS\u0002I|/\u001bLBLh\f\u0003T0:%݀i:jf2x^!o45D5t\u0002<wxo\u000e6/\u001f>5\u000fG\u001f؁\u0013\rIlx>H*I\t\u0014u)uǐ;\u001c\u001c!j\u001c*\"f=[V1jk\"#\u0018\u000f4\u000eTҖ.ǽ\u0004tP\u000bԌi4I\u0018F/Y\u0014Eec\u0015\b\u000e>`\u0018=&|\u0000\u0017ސO\u0017Db\u001dDz<#F^g/\u0004\rk-\u0006'#ck\u00079ꁴIa@B0\fկM;Ȕ|>Ūvv\u0000\u00012-3f\u0005_.\u000b~\u001b^}Z7\u00179ԩy7u5X-X\u0005a5\n`tǸ,:Mʰ!˗w\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000E\u0007\u000e\r\nendstream\rendobj\r664 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r651 0 obj\r<</BBox[4.0 28.0 27.0 6.0]/Group 665 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 666 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 667 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n23 0 0 22 4 6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r665 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r667 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 22/Intent/RelativeColorimetric/Length 66/Name/X/SMask 668 0 R/Subtype/Image/Type/XObject/Width 23>>stream\r\nHС\u0011\u00000\f@k{\\\u0016GqL:(3;sW\u0018Ƹ.s;\u001c\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\nF\u0001I\r\nendstream\rendobj\r668 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 23>>/Filter/FlateDecode/Height 22/Intent/RelativeColorimetric/Length 275/Name/X/Subtype/Image/Type/XObject/Width 23>>stream\r\nHb`\u000f\u0018\u0019\u0018\u00191D\u0004ؙղKZ+p3\u000b\nUdG1G7g\u0013QP^r˫]j\u001cF8O\\3rez7(ʙ]?r\u0011fdo\u000fT'O\tU~]\u0012\u0004q$B?_\bu$B1Ș׻2UA\u0019Uኁ|1і\u000f$g;:L-\u0016\u0002Z$020#uשan\u001b!슡nh02q+X{\u0007@7<ЙE`@\u0018\u0011EhD\u0000H\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000j\r\nendstream\rendobj\r666 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 669 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r669 0 obj\r<</BC 670 0 R/G 671 0 R/S/Luminosity/Type/Mask>>\rendobj\r670 0 obj\r[0.0 0.0 0.0]\rendobj\r671 0 obj\r<</BBox[4.0 28.0 27.0 6.0]/Group 672 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 673 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n23 0 0 22 4 6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r672 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r673 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 23>>/Filter/FlateDecode/Height 22/Intent/RelativeColorimetric/Length 275/Name/X/Subtype/Image/Type/XObject/Width 23>>stream\r\nHb`\u000f\u0018\u0019\u0018\u00191D\u0004ؙղKZ+p3\u000b\nUdG1G7g\u0013QP^r˫]j\u001cF8O\\3rez7(ʙ]?r\u0011fdo\u000fT'O\tU~]\u0012\u0004q$B?_\bu$B1Ș׻2UA\u0019Uኁ|1і\u000f$g;:L-\u0016\u0002Z$020#uשan\u001b!슡nh02q+X{\u0007@7<ЙE`@\u0018\u0011EhD\u0000H\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000j\r\nendstream\rendobj\r659 0 obj\r<</Filter/FlateDecode/Length 386>>stream\r\nHTmN0\fS\u0002I|/\u001bLBLh\f\u0003T0:%݀i:jf2x^!o45D5t\u0002\u0014\u001cl6{_>|}j\u001e\u0006?\u0003s\u0017|T\u0013\u0012\u001a\u0011R9[i\u001fC\brp\u001d+\"]Ŏq̅1xښH\"\u0006\u0003M\u0005q'.\u0019*s14%Otit⺜YA\"h\u0000f\u000b\u001fI!\u001e_6@7\u0013RJT:ԙHm6IH\"Ҡ\u000bC\"-}5X0G\u001d6)\fH\u0018i\u000b\u0015>_<\u0002k\u001d\u001d8fLK茙c|׺\r?⭋k_\\\u0018Jɍ*E\u000eujM]\rV\u000bVjAXBZ\u00181.5NS~zkv}w\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000f\u0017\r\nendstream\rendobj\r660 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r662 0 obj\r<</BBox[4.0 28.0 26.0 6.0]/Group 674 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 675 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 676 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n22 0 0 22 4 6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r674 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r676 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 22/Intent/RelativeColorimetric/Length 69/Name/X/SMask 677 0 R/Subtype/Image/Type/XObject/Width 22>>stream\r\nHϱ\r\u00000\b@QHG\f\u0012_^r4rX\u0015UX\u0015U+>VB\r\u001b޽5\u0015V|\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002B\u0001K\r\nendstream\rendobj\r677 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 22>>/Filter/FlateDecode/Height 22/Intent/RelativeColorimetric/Length 233/Name/X/Subtype/Image/Type/XObject/Width 22>>stream\r\nH|/\u0012@\u0014qO1,&\u001b\u0005h$\tR\b\fI2c\u0001Ca\bT.\u0001a/ ̘\u001c\n\u0006\u0017~O,#s\u0015!+E^JucF]hLrv\b\u0016=槭&`lqxԱk`eXW\u0002\u001eh<$_\f\u0005\u0006ʹg3\u0015@\u0005]\ftnĊ\u0019\u0014-\u0001E`*\u0012ҭ\u0017Udh~Fo-t?ikA38w8B\u0007\u000fF\u001e߰\u001f27\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000jtq\r\nendstream\rendobj\r675 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 678 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r678 0 obj\r<</BC 679 0 R/G 680 0 R/S/Luminosity/Type/Mask>>\rendobj\r679 0 obj\r[0.0 0.0 0.0]\rendobj\r680 0 obj\r<</BBox[4.0 28.0 26.0 6.0]/Group 681 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 682 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n22 0 0 22 4 6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r681 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r682 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 22>>/Filter/FlateDecode/Height 22/Intent/RelativeColorimetric/Length 233/Name/X/Subtype/Image/Type/XObject/Width 22>>stream\r\nH|/\u0012@\u0014qO1,&\u001b\u0005h$\tR\b\fI2c\u0001Ca\bT.\u0001a/ ̘\u001c\n\u0006\u0017~O,#s\u0015!+E^JucF]hLrv\b\u0016=槭&`lqxԱk`eXW\u0002\u001eh<$_\f\u0005\u0006ʹg3\u0015@\u0005]\ftnĊ\u0019\u0014-\u0001E`*\u0012ҭ\u0017Udh~Fo-t?ikA38w8B\u0007\u000fF\u001e߰\u001f27\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000jtq\r\nendstream\rendobj\r661 0 obj\r<</AIS true/BM/Normal/CA 0.199997/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.199997/op false>>\rendobj\r657 0 obj\r<</Filter/FlateDecode/Length 337>>stream\r\nHTKN@\f\u0014LM\u0004T\tB\u000b\u000e\u0010A\u0011*H-&9\u00014ֳ~lGF\u0011aϦ+!*\u000b\u0018t\u000b~уs\u000fb#\u0004h\r\u0017$4\u0010Z\u0014u\u0013$ VyM2vGf&PD:yQ\u0019|\u001eEJ\\\\\t\n8f\\\u0006\u0007<k)$/\u000e,z&\u0014<RОR׽xf\u0014Cf\u0018\\0\u000e\t\u0019H\u0014G\u0017\\H'(\u0014<\\\nciTeꗋ͋\"\u001f\u000f~d@V_f)QK\"S\u0004Vzi\u0019Ԭf|Y\u0013]R\\\u000e\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000d\r\nendstream\rendobj\r658 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r652 0 obj\r<</Filter/FlateDecode/Length 127>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!1\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015)n$n$n\u0004\u0011\u000f2г0R0г4\u0010E F Ff\nf\nFF\n { \u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000v&\r\nendstream\rendobj\r653 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r654 0 obj\r<</BBox[-20.0 78.0 23.0 29.0]/Group 683 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 684 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 307 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 -20 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r655 0 obj\r<</BBox[27.0 78.0 76.0 29.0]/Group 685 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 686 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 687 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n49 0 0 49 27 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r656 0 obj\r<</BBox[-3.0 32.0 33.0 -1.0]/Group 688 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 689 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 690 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 33 -3 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r688 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r690 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 59/Name/X/SMask 691 0 R/Subtype/Image/Type/XObject/Width 36>>stream\r\nHb`&`\u0001\b@RO\tL\u0011\u0011j+(\u001aU3f8V!*\u0012ߩ\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000%\u0003\r\nendstream\rendobj\r691 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 36>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 272/Name/X/Subtype/Image/Type/XObject/Width 36>>stream\r\nH=\u000e@\u0010F%.? \u0010()(B\u0001$p\u000b@O܂\u000b(7\"v\u0010M\u0014hLW$3߷X\t!\u000b\u0000\nKQ?ĥ@\u0016\u0011jia\u001a0a([z\u001b\u001f\\WNc\u0014}\r}\u0000}\u0018l׺\u0018Dj4y\u0001yF;[ew\u00135X<\r\u001cM/Yyj\u000e62\u000b]Cz8Ey՜\u0001П*<S\u001cˏ/#ҷ\u0007\u001eI\u001b+`\u001cH\u000e}gĿ0G\u0007CL1@\u000bST\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000'n\r\nendstream\rendobj\r689 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 692 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r692 0 obj\r<</BC 693 0 R/G 694 0 R/S/Luminosity/Type/Mask>>\rendobj\r693 0 obj\r[0.0 0.0 0.0]\rendobj\r694 0 obj\r<</BBox[-3.0 32.0 33.0 -1.0]/Group 695 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 696 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 33 -3 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r695 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r696 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 36>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 272/Name/X/Subtype/Image/Type/XObject/Width 36>>stream\r\nH=\u000e@\u0010F%.? \u0010()(B\u0001$p\u000b@O܂\u000b(7\"v\u0010M\u0014hLW$3߷X\t!\u000b\u0000\nKQ?ĥ@\u0016\u0011jia\u001a0a([z\u001b\u001f\\WNc\u0014}\r}\u0000}\u0018l׺\u0018Dj4y\u0001yF;[ew\u00135X<\r\u001cM/Yyj\u000e62\u000b]Cz8Ey՜\u0001П*<S\u001cˏ/#ҷ\u0007\u001eI\u001b+`\u001cH\u000e}gĿ0G\u0007CL1@\u000bST\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000'n\r\nendstream\rendobj\r685 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r687 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 49/Intent/RelativeColorimetric/Length 109/Name/X/SMask 697 0 R/Subtype/Image/Type/XObject/Width 49>>stream\r\nH\n\u0000\u0010\u0010Q%3%cYyLn6J^\u0011\u0017\u00023\u0001I\u0000X\u000e>\u0007\u0000{\u0007\u0003_\u0006pߺaPWi4\u001a9\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000s\u0007\r\nendstream\rendobj\r697 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 49>>/Filter/FlateDecode/Height 49/Intent/RelativeColorimetric/Length 855/Name/X/Subtype/Image/Type/XObject/Width 49>>stream\r\nHMH*Q\u0014:3\u0016cNIa)\b\bB\u0012D\u0003i\"x.\u0010wHH8Z(Y˅\"p#F\t-BM 0\u0004כyfe=z޷\u001b8ߜ;=vu/N\u0010-XP\n>s|P\bw\"\u0014\nNahXQ\fa\u0018\u0011ig\u0011T҃\b\rAz\u001e\t\nB\u0011-%\nrX9F9L*\u0006儴\u001b\u0015\torp\b\u0013\u0003J3\r\u0016\u0006N;Q\u0003\u0004!\u0012\u000f\tD\u0018?\u001e3\u0016mj1\rc~\u001c\u0013\t&Q',\u0019srs\\sNǌ2א8\nA\u0002\u0018\u0018'\u000egq[y\u0017=n}Ҩ\u0019\"\u0011\u0001k\bF\u0003jR`5\u0014^D(Dá^= E5+\u0012I\brl>\u001f6[x\"L&Ɑ&\u0015ODo\u000b\u0002G2X\u001c\u000b^f^zwg{cͿ\u0018T\u001eD,@B1>\u0019\u001b\u0014\u001d\u001e\u001d\u0017\n\\N%6Knf\u0010\u0017\u000b*FM3\u0001j;u?)\u0018aJœAj\nϘF\u0015hK \u0018ZóCOUR,_0yzgs0kI\u0019\u0006C\\MaŹ\u0018fOrvSoj2sݍ\u0016\u00160+PstxQ58nkՋb.\u0015^ꕄU?B߈\u000eKFٸ.\u000eb^0)\u0018\\H<stvYk><r<4jgGx2~\u0014+1suӸx߸b\u0013\u0015\u0005*I\u0017J\u00138^a\ntL8'K\u0000\u0000\r\u0004X\u0007JK+yƉ\u0003>]\u0003/\u0001woV\r<\u001f'\u0010\u0003s\u000b&v\u0000\u001an3_7\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000bmi\r\nendstream\rendobj\r686 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 698 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r698 0 obj\r<</BC 699 0 R/G 700 0 R/S/Luminosity/Type/Mask>>\rendobj\r699 0 obj\r[0.0 0.0 0.0]\rendobj\r700 0 obj\r<</BBox[27.0 78.0 76.0 29.0]/Group 701 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 702 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n49 0 0 49 27 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r701 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r702 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 49>>/Filter/FlateDecode/Height 49/Intent/RelativeColorimetric/Length 855/Name/X/Subtype/Image/Type/XObject/Width 49>>stream\r\nHMH*Q\u0014:3\u0016cNIa)\b\bB\u0012D\u0003i\"x.\u0010wHH8Z(Y˅\"p#F\t-BM 0\u0004כyfe=z޷\u001b8ߜ;=vu/N\u0010-XP\n>s|P\bw\"\u0014\nNahXQ\fa\u0018\u0011ig\u0011T҃\b\rAz\u001e\t\nB\u0011-%\nrX9F9L*\u0006儴\u001b\u0015\torp\b\u0013\u0003J3\r\u0016\u0006N;Q\u0003\u0004!\u0012\u000f\tD\u0018?\u001e3\u0016mj1\rc~\u001c\u0013\t&Q',\u0019srs\\sNǌ2א8\nA\u0002\u0018\u0018'\u000egq[y\u0017=n}Ҩ\u0019\"\u0011\u0001k\bF\u0003jR`5\u0014^D(Dá^= E5+\u0012I\brl>\u001f6[x\"L&Ɑ&\u0015ODo\u000b\u0002G2X\u001c\u000b^f^zwg{cͿ\u0018T\u001eD,@B1>\u0019\u001b\u0014\u001d\u001e\u001d\u0017\n\\N%6Knf\u0010\u0017\u000b*FM3\u0001j;u?)\u0018aJœAj\nϘF\u0015hK \u0018ZóCOUR,_0yzgs0kI\u0019\u0006C\\MaŹ\u0018fOrvSoj2sݍ\u0016\u00160+PstxQ58nkՋb.\u0015^ꕄU?B߈\u000eKFٸ.\u000eb^0)\u0018\\H<stvYk><r<4jgGx2~\u0014+1suӸx߸b\u0013\u0015\u0005*I\u0017J\u00138^a\ntL8'K\u0000\u0000\r\u0004X\u0007JK+yƉ\u0003>]\u0003/\u0001woV\r<\u001f'\u0010\u0003s\u000b&v\u0000\u001an3_7\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000bmi\r\nendstream\rendobj\r683 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r684 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 703 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r703 0 obj\r<</BC 704 0 R/G 705 0 R/S/Luminosity/Type/Mask>>\rendobj\r704 0 obj\r[0.0 0.0 0.0]\rendobj\r705 0 obj\r<</BBox[-20.0 78.0 23.0 29.0]/Group 706 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 313 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 -20 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r706 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r647 0 obj\r<</Filter/FlateDecode/Length 396>>stream\r\nHTmN0\fS\u0002q|6`\u0012bBcH\u001c!ԁ6/a'֍\u0013Y~?ޫv\u000b\u000b\u00037\u00055\u000eʀ+U'\u0007\u000f\u001f,NqD0hs/\u00058$J\u0001\b\f\b(b)uca+9ث9D{\u000b#g\u0016c\u0010rwMR\u0015!\u000ftB\t-G\tt=\u0017S3YY\\Ob`\u001a\u0017\u0005,h.\t\bA\u0015HV\u00143<\u0014\u0007#j[R*JXG^:\u00131\b<#F\u0003\u001e{/\u0004\rk6bv1\u001f\u001cФ0!!\u0018צȔ|>źvv\u0002m\u0004i~keϵץ_\\b>}ENuzM_\r\u0017\u0005a݄\f-.5\u0017Nʰziv}KQ?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000]\u001a\u0002\r\nendstream\rendobj\r648 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r649 0 obj\r<</BBox[-30.0 78.0 13.0 29.0]/Group 707 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 708 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 307 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 -30 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r650 0 obj\r<</BBox[20.0 78.0 63.0 29.0]/Group 709 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 710 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 307 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 20 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r709 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r710 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 711 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r711 0 obj\r<</BC 712 0 R/G 713 0 R/S/Luminosity/Type/Mask>>\rendobj\r712 0 obj\r[0.0 0.0 0.0]\rendobj\r713 0 obj\r<</BBox[20.0 78.0 63.0 29.0]/Group 714 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 313 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 20 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r714 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r707 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r708 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 715 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r715 0 obj\r<</BC 716 0 R/G 717 0 R/S/Luminosity/Type/Mask>>\rendobj\r716 0 obj\r[0.0 0.0 0.0]\rendobj\r717 0 obj\r<</BBox[-30.0 78.0 13.0 29.0]/Group 718 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 313 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 -30 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r718 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r637 0 obj\r<</ArtBox[0.0 0.0 40.0 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 719 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 720 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 79 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 721 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r638 0 obj\r<</ArtBox[7.25 8.25 31.75 32.75]/BleedBox[0.0 0.0 41.0 40.0]/Contents 722 0 R/CropBox[0.0 0.0 41.0 40.0]/Group 723 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 41.0 40.0]/Parent 79 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 41.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r639 0 obj\r<</ArtBox[5.0 4.99998 35.0 35.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 724 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 725 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 79 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r640 0 obj\r<</ArtBox[0.0 8.5 30.0 30.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 726 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 727 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 79 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 728 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r641 0 obj\r<</ArtBox[0.0 5.99998 30.0 30.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 729 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 730 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 79 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 661 0 R/GS2 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 731 0 R/Fm1 732 0 R/Fm2 662 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r729 0 obj\r<</Filter/FlateDecode/Length 394>>stream\r\nHTmN0\fS\u0002Ic/\u001bLBLh\f\u0003T0:%ٺq\u0002кϟQ\u0005t녅\u0002횏\u000eʂ\u001b\u001fzOvv7\u0007\u001f̏3?U5%&§-\u0019;I%I=\u0000\u001f\u0002\u00063y g|\f\u0019^E\u0003hJ&\u0018\u0018\\\u0018C4d##\u0010\u000fxB\u0010Ã8J:g\u0005Ԍk\u001ev`\u001a.gс\u0004\u001a\u0004fުTfMD!\u0005xZ)\u000fG:vTIӡDzC&\u0011#H\u000bd/\f- *c5Xh{5GBcS0\fSyk^Ud|?\u000bźv\u0004ژ\t2-2[|׺\r\u0017_~qc+%7\u001a/X\u000bº\tU3_j.:\u001aA}\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001ay\r\nendstream\rendobj\r730 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r731 0 obj\r<</BBox[10.0 78.0 53.0 29.0]/Group 733 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 734 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 307 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 10 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r732 0 obj\r<</BBox[-44.0 77.0 8.0 29.0]/Group 735 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 736 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 737 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n52 0 0 48 -44 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r735 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r737 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 48/Intent/RelativeColorimetric/Length 113/Name/X/SMask 738 0 R/Subtype/Image/Type/XObject/Width 52>>stream\r\nH1\u000e0\fCfm|\u0001B\u0011ĭ\u0010)Y?\u0006\u001e\u001bŖ-H\u0004C2\u0006\u0019ize\u000e%\u0011 F3MECnyq\u0007k\u0002\u000ec~b˦`\rú\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000Bx\u0007\r\nendstream\rendobj\r738 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 52>>/Filter/FlateDecode/Height 48/Intent/RelativeColorimetric/Length 1263/Name/X/Subtype/Image/Type/XObject/Width 52>>stream\r\nHb`\u0002`d$Q9\u0002\u0010\u0019\f\f\"403\u0001\u0001++\u000b\u000b3Am@-@\r\u001c\\@\nԆϙ@K:8y\u0005@P\u0003\u000bJ,\u001aqp\tJHHK\t\u000bqs,\u0003\u0012@Z8y\u0004E44T\u0015e%Ey`gg\u0003\b\u001f\u0016fV\u000e\u001eAq9\u0015-\u0003SKkk+\u000b\u0013}-U\u0005iq\u0011#yyyx\u000f\u001avnAqyu\u0003\u000b\u00077o?_/7\u0007+c]u%9iIq1Q\u0011aA~^CYYV0rʩ\u001bٺ\u0007F'$Gښ\u0019h()JK\nqsm\u0002:[HJ+<9 31\"P_WK]Y^JT\u0013\t4\u000e^QymK𴒆ξ\u0013zRc\u0002}<\\\u001c\fU\u0005y8X\u0018X9%\r\u001dK[&Yl٢S{[sӓc\"Â<\u001c-\r\u0005a\u001612q\tJyD5N^vΝ6Z4kRWK]UYqAnFRt(\u001f'+3\\\u000f_Ryϼu<um/=mR_wGK]y^J\u00107;q<\"vA\u0019uSV<vϝ8{5+-?kJOciz(/\u0007q`\u0011Uw\fi\u001f=zp'\u001cط{ǖ+On-M\tr4Tdaa\u0015U4poؕ^~7^p6,ܘ\u0017a.-\f#d\u0012Uعp\u001b_Wϟ<zpέk\u0017N0<ZKV\u001bEkTQ\u001do={뷯_>}x\u0017O\u001fݹrb׊)u\u0019Av\"<̠\u0000\u0013]ܽx;?|@}\u001a_=sY9a\n<C\u0003㷟\u0017X\u000f\u001e];e^{~(/$VQ\u0005߿\u0003˻7On[Y\u0018b$\u001bb\u000fD\u000f\bgNXUU\u000f$\fn?\u0000t\u001f@zɛO}7\u0004m8rڣW\u001f|\u0007\u0010|\u001d\u0006i;O_\u0013\u0018|\u0015(it׉+w\u001e=}%\u0018x=NQ\rN\\v;wΝ7\u001d<xîN>s\u0016\fΜ>y\f[\u001aE)Xe`X\u0002r\u0019^3eּ\u0016/\u0001ŋ\u0016ÖPʪ\u001e0loƒD褌¢b((*V \u001e~Aa\u0011QQP\u0010\u0015\u0015\u0011\u0016B*\rͬ\u001c]\\\u000eKT+k\u001b\u0018\u001a\u0001ֲ\u0017ΒWPTB\u0002\nxԺQXDTT\f\tbK\u0018P`\u001e\u001e^\u0014΂j\u0002ll\u0018\u0000[\b\u0005kS\u0000\u0002m\fH΄\u0006h0b\u0000ʉ\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000mW\r\nendstream\rendobj\r736 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 739 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r739 0 obj\r<</BC 740 0 R/G 741 0 R/S/Luminosity/Type/Mask>>\rendobj\r740 0 obj\r[0.0 0.0 0.0]\rendobj\r741 0 obj\r<</BBox[-44.0 77.0 8.0 29.0]/Group 742 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 743 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n52 0 0 48 -44 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r742 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r743 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 52>>/Filter/FlateDecode/Height 48/Intent/RelativeColorimetric/Length 1263/Name/X/Subtype/Image/Type/XObject/Width 52>>stream\r\nHb`\u0002`d$Q9\u0002\u0010\u0019\f\f\"403\u0001\u0001++\u000b\u000b3Am@-@\r\u001c\\@\nԆϙ@K:8y\u0005@P\u0003\u000bJ,\u001aqp\tJHHK\t\u000bqs,\u0003\u0012@Z8y\u0004E44T\u0015e%Ey`gg\u0003\b\u001f\u0016fV\u000e\u001eAq9\u0015-\u0003SKkk+\u000b\u0013}-U\u0005iq\u0011#yyyx\u000f\u001avnAqyu\u0003\u000b\u00077o?_/7\u0007+c]u%9iIq1Q\u0011aA~^CYYV0rʩ\u001bٺ\u0007F'$Gښ\u0019h()JK\nqsm\u0002:[HJ+<9 31\"P_WK]Y^JT\u0013\t4\u000e^QymK𴒆ξ\u0013zRc\u0002}<\\\u001c\fU\u0005y8X\u0018X9%\r\u001dK[&Yl٢S{[sӓc\"Â<\u001c-\r\u0005a\u001612q\tJyD5N^vΝ6Z4kRWK]UYqAnFRt(\u001f'+3\\\u000f_Ryϼu<um/=mR_wGK]y^J\u00107;q<\"vA\u0019uSV<vϝ8{5+-?kJOciz(/\u0007q`\u0011Uw\fi\u001f=zp'\u001cط{ǖ+On-M\tr4Tdaa\u0015U4poؕ^~7^p6,ܘ\u0017a.-\f#d\u0012Uعp\u001b_Wϟ<zpέk\u0017N0<ZKV\u001bEkTQ\u001do={뷯_>}x\u0017O\u001fݹrb׊)u\u0019Av\"<̠\u0000\u0013]ܽx;?|@}\u001a_=sY9a\n<C\u0003㷟\u0017X\u000f\u001e];e^{~(/$VQ\u0005߿\u0003˻7On[Y\u0018b$\u001bb\u000fD\u000f\bgNXUU\u000f$\fn?\u0000t\u001f@zɛO}7\u0004m8rڣW\u001f|\u0007\u0010|\u001d\u0006i;O_\u0013\u0018|\u0015(it׉+w\u001e=}%\u0018x=NQ\rN\\v;wΝ7\u001d<xîN>s\u0016\fΜ>y\f[\u001aE)Xe`X\u0002r\u0019^3eּ\u0016/\u0001ŋ\u0016ÖPʪ\u001e0loƒD褌¢b((*V \u001e~Aa\u0011QQP\u0010\u0015\u0015\u0011\u0016B*\rͬ\u001c]\\\u000eKT+k\u001b\u0018\u001a\u0001ֲ\u0017ΒWPTB\u0002\nxԺQXDTT\f\tbK\u0018P`\u001e\u001e^\u0014΂j\u0002ll\u0018\u0000[\b\u0005kS\u0000\u0002m\fH΄\u0006h0b\u0000ʉ\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000mW\r\nendstream\rendobj\r733 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r734 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 744 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r744 0 obj\r<</BC 745 0 R/G 746 0 R/S/Luminosity/Type/Mask>>\rendobj\r745 0 obj\r[0.0 0.0 0.0]\rendobj\r746 0 obj\r<</BBox[10.0 78.0 53.0 29.0]/Group 747 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 313 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 49 10 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r747 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r726 0 obj\r<</Filter/FlateDecode/Length 351>>stream\r\nHTkN0\fS\u0002II\t!q\n\u0006ڸ$]\u0013\u0000jlWk\u001e{hu\u000fvK.̮齼\u0017$g[8|S;YX&\bִaEs\u0001.\u0007\"Cπ`Ap\u000e0\bI\u000e\u0006\u001e\u000etKѫ\u0018F48I\u0012P=\u00199&\u00020\u001b d\t<0yd򾅧/B\u0018[&\u0002K+a&a\f\u0006\u0019`HZ4έ$;>uThl\u001bwg=\u0017\u001dTYTI\u0015,FmSLt*O\u000f\u000eA3_@>d\b\u0018g_fNBzS\b\u0019W]g\u00109Jc=iVI/\u0018-\u001fN\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000}\r\nendstream\rendobj\r727 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r728 0 obj\r<</BBox[-4.0 77.0 48.0 29.0]/Group 748 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 749 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 737 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n52 0 0 48 -4 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r748 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r749 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 750 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r750 0 obj\r<</BC 751 0 R/G 752 0 R/S/Luminosity/Type/Mask>>\rendobj\r751 0 obj\r[0.0 0.0 0.0]\rendobj\r752 0 obj\r<</BBox[-4.0 77.0 48.0 29.0]/Group 753 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 743 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n52 0 0 48 -4 29 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r753 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r724 0 obj\r<</Filter/FlateDecode/Length 163>>stream\r\nH4OA\u000e0\f\u0015f\u0018g\n4\u0003\u000f`\ri%*i줎G$7FOk$F-6x\n9\u001b=\u001b/bOOM[$\u001dVXط~Pt\u0003q+A2\u0013J0\\\n9g]Ջ-\u0004bV\\/\u0013Dɢ=\u000f\t?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000!.\r\nendstream\rendobj\r725 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r722 0 obj\r<</Filter/FlateDecode/Length 10649>>stream\r\nH͎޸\u0011ES\u0005\u00166N \b\u00034&<8@?\u0012(KS\u001apNIUH˷o|_6'_?~}\u0018ݏ^_\u001fλm]h﯃]vח}-/a7?jK}\u0014]\u0007{\u000f\u001d|W_~\u0004Ñ`Wv?\r\u00149]R9r4@ǰ\u0007b\u000f{mHt\u0013?U(!+i1>PB\u0004m5\u001c(Ca\n;I\\0nC\u0004ƁRh\u0006\u0003\u0016@t7V\u000bJ\u000ePr\"\u0015H5Ǵc\u0017c\u001e\u0016wmO\u0016L4\u000bMIwc\u0011n\"+\u001c\fe\u0015bX[B\u0017\u001ff< ,A\"\u0004KNi\u0019[[\u00122\u0010oze-D3E\"EPX\tu\t*bӘT◱M\u0017lpE\u0013RM\u0017.AEk:\u0019\u0018wb/A1bĘ,AńPX,\u0001S/L[B\u00171\u001cѰ-7l\u0012TĖ\u001928\u001d,AElVVîq3;\u0011c\u0004¢`,-AŌ5\u0006\u0019wq\u0010\u0001w2v@d1Q\u001d\u001eKf(W0V\"u\u0002Q1\f:~\tH\u0010Y\u0018\u0013bX^\u0014+\bź\u001dMc4#=G,AE\u0005$\u0013\u0003\u0012T\u0018#h,6\t=y㴥gE\u0003\"p,c\u0007pk\u0017\u001e}\n&ض%H!حz'\u001dc\u0004\u0002\b\"1y`q\u0018Sr^X[B\u00173_z̀!\u000eP1bLb\u001aT,\u0018\b\u0013da\u001a=e]x@X\u00146\u000bwVd\u0019[hP\u0007X VWQ/AXL؟rP\u0006X 6N\nq(jzs\u00042\u001eZ1\u000e6:iNw\u0000\u0019'iN\u0002;\u0001ubO󆪶q\u001bh\u000fY_Ex>I/6v<Vݳ\u001e(\u0017t$=\u001clX\rI\n\u001fZk\u0015~jM \n\b_\bc1\u0005\u001a\u0018st9pyphӨ\\+P5\u0013<]iq\u001d쩆\u00125\u001aOqUt_cTatPr0:\u0006%vРv<kю\u00159;BtÌ&Bns0Rs#Ee\"vtLv!Snu4Vj{V}<59?S\\jS~jWDRT|Z\r=\u0011|%0MC\u0010};ECrVcmvPC:sj\f$ǉ8WDv&*SnqO.\u0013\u001dauH<ԛLȜKL\\UDR7B$VB/͠@4dr(OnvT&P\u0012m+]8S9pjS*D\\*9׉8w5u'\u001a%_̩l!JSnh]rur+ED'֋إY4\u000busm$ctP!\u001a^D62xVwOnh\"*[ՆUXlyFv#v\u0003ED{\"v3E+Tw0h<\u0016$SnhE\n\u0006w\u000f,z\n\u001a'7'bW6\u0018%/~\u0013\u0017+Qr\u001bF'\njǅAq\"vRv';bT\b\u0002v\u0002#v\u000es\u0013ikP\u0010*\u0003\rb\tǞ<;\"\u0018\u0004\u0006\u0012\u0003aQ0\u0018HĦ\u0015 рD6eg5Y@v$)W\u0013gVL4Zح\u0014mHZ=)\u0018FD\u001c%\u0002\u0005F*\u0013[=m\u0018\fd깣f#!\u001a^D\u0016V6=\u0011\u0014ԏa\u0000ӟp\u0015:]RMt:£m2D\nE3Q\\;!h\u001ayQOnh$\u0015.\n\tFhĕ\u001485[)\u0018$)ZFw\u000f*\u001ai\u0006\u0001a\u0012\u0007\u0012\u0005c\t!hǪ}fTlA\u0000\u0005eDS`rCqr#E.V8\u0000?\u0011+Ei\u001c:DFwO2B4X\u001fQD®~'J;8Q4\u0013-\u0019\u001dL?'g|\u0013+\u0014MDyr{\"um\u0003ӏm\u001dB?'gq1RBQ}\r\"\u0013_͓t\fF'\u00113\u0005r^uŬ'r5\u0002ح\u0014mHU;\u001ab؟IBdO\bcFE\u0017#U6=\u0011(\u0012<쓵&1\u0013i:&\"7bPQ'ICZ:tJ(7qC[\b<xXK\u001eƓXs\rub\f\u001aAwc<lu$πDܓ-dO\u000f\u0018OIS9\u0015]lR\u0005ov!ߖ\u001b\u001a%ZѯGVU\u001b4*\u001ah/W'#\u0005.FԵX?\u001f'Uƪ\tH]C-Ƞ?\u0007W.8\u0013)Hl\u0000N\u0018Y\u0019H6\u0004\\}AVFz%<qߋ5װ\u001a3Iv['R\u001a!&#\u0015$^R\fj\u001b\u001e2s\u001ac@F{bz1\u001c\u0007!'RמaOs\u0019왴Q`8H\u0016\u0019u/z\rxsǯ8\u00197\u0001}6fd\u0007pOݴè[f=vF[pkUkc|ܧABJm\u0015d\u0019k+'Rmݤj\u0004'Qt\u001aS\u001a\u001cOHJ\u0002%E+\u001a@\\M9Z\u0019Is\u0013^7ɱH\u0014^6p\u001dox\u0011o\u0007m9 \u0011\u0013*Hd\t\n\u0006m{\u0005J\u001f-{\u001e}y\u0013}\u0015U(`ʻ\u0016.\u0001}36&Z4ծǻ^o*Z[Z\u001ax\u0015.VջV\u001aA\u001fTb3\u001a\u0014b}p\f\u0012H+ї?+˟\u0007Sd?\u0018w\u0006y\u00164>ZV3YΪG.\u001e\b<\u0016\u000bĕG369j+?\"\u0006ao\u0007\rr*z\u000bwo|I0MsVVW\u0013x\u0013qmY|h#:#>\u000fVcWt'HĿQ\t:$Z.oB\u00167`U\u000eI\r%1>BF9؎=4׃YK_\u0016M5~do.kSΊ۵KȖ,ǟu|AI{e\u0017s<\u0007u\t]\u001c7!˕;çpow=_&dYO}ҙq#x=\u001d&dYٰx9  7\r\"'և\u001bѺց\u0015<ܲ\u0000\u0007iX\u0004\u001cl߄,ˇ\u0017$?fb\u0014-7:Vn\u0005/A\u001a5O\u000e\bΧNى5?9oB+G\u0014MN]=ӄ\u0007ѣӜE+ˌ3eI3R(j\u001b;zCx~Ӝ(qB܎7!k#<Ux\u000bv1\u0007X8)1{G|b^=J&YMB\u0005un͠n4\u00044guM\u001e*\f\u000ec\u0013ϭZ\u0005K\u001aO߄,\ta\u0013&UeyjD;\u0010}j343SMQ\u0015k\u001by#\u000f~\u0013uj5jgeiut8Yr\u001dt4\nY3\u0010\u001f\u001d&dJ\u0019\u00150  \u0015=4hc\r)~\u0011;:8nj*\u0014j^'{P1%u#Vy\\\u0019󎏲~\u0013\\!ݴBM\b\u001bn\u001e\u001a䡴U6j.\u0001֋\u001d|'3|l\u000bNr\n5MrqE\u000bU^t9GYqoR\u0015 D3\u000f-a2W\u0016/G'dc\u0006]V\u000bx\fB֬u#dr\u0006߄,\u0017[]@2 iqt%.\u0019'Y\u0005C,*H\u0019H>i٥zu!knǛ\n܄ϕk'8MI\u0016*Nb\u0006_\u001b!k֪(u^V=\n\r]Ț&dIlD,\u0011^s\u0014Nέ\\ِ5k5c}\u0014k;Mr}q,܅\u001doB\f,s9چGY'Xe;\u0011|8itXW55c\u0015\u00173GiaCB>Nr91gAeȏbe\u0007_J\u001b!kƏ8\fB֌r5cU\u0007\u001c\u001e\u001f_be\u0007~ZVG#\u0013\\?\u001c6}J^6=8Yr\u0001q\u001as+\u001b\tY\u0013P5\u001fb㱪u!kNǛ|i\u0016m\u001b!kZ\u001e%^ŵ!n%\u001eӺ*\u0017\u0013Wq\u0015*j9 `\u001a\u0013mj5U'd`zj\u0002\f7z4g\u0005\u0019HNm\\;=ÍBtn\u0019n\u0014t]Ț&dP\u000eDI9<dw;V.d&dG\u0004J\bYۊpQViH~ӜE£\nW\u0011VNB3؉sY\f>%WF|\u001f\u001e7M-]ȖlZM4gњ\u001ez\u0006DazJ%&xTrhmTvBvn\u00158!ܪEeɺx\u0013\u001bdtB\u001a\b\u0004h\u001b!kǛ*\u0005\u0014wV\u0007d>`9d.nX/FȚ۱v!k>7!k6@\u0007id]OK7=V'\u0007_j\u001b!k$y\u0012{ \u001aɨ$<!2zUtYs=VM_\u0006I҃IV2˚ӱ7\u0017\u001e߄,\u000bgx&dYP=m\"y\u0004\n߄,\u000bFut\tY\u0005`\u001e8zN\u001e\u001apl\b{7Y\u001d'?oBk\u001d퇓\u001dm>9\u0017<GL.n{l,|r]\u0000\u000e%Fo)K\u0019H>Y\u001617.7V\f̦n^pt۪߬,\b7GYPmO,*L~\u0013$~rD=)}G\u001bK[x\u000fx\u0007?1W}H;\u001doE!׿_wd\rO\u0013¶I:{f\u0017~\u000bg\u0002zJ*:xtu%r%ڕB\u000b #k2oʳ#+?˕ٍ.\u001d%,=dh.qn\u001eij߉ُI[[\u0012{[\u0012ekQ]bo!.aU\u0012{G\u0003ao\u0010]bo\\JYz9\u0011\u001d:\fWവ\\\u001eeңM+-\u001e%ϥ9'Ҏ[\u0002q\u0011]¾3.\u001e%ңDzKxGs\t\\X\u001ey\u000ex%\u001f\\\"nm=Km=(̤\u0015r||N\u001d\n\u001cN:u\u001b+K\u0012řc\n\u0019?\\y,=%t\tePn\f5lܟ5+NK\u0012ykQ\\».=KXb\\\\zۄz\t7\u0006\tq`Wm=Kd(\u0004\\\u001e%*\tÕg\u000bx%\u001f\t8.=R|6t[MuQ]Bm^5\\y8Ė\u000e\u0007#U.,\u001e%ңDzKx[z~\u0001<7D<3loޣ\u00050nhqs\u001e#D]\u0012\bgs_mR@j\tJY 2Qűg&8POw-=#\u0011VC3\u0003Q\u001c;nH<Kc`*\u001b3ѷoWG\u0014\f\u001a(HP.QD\u0015\u000791\u0013M\u001c}L\u0010N\u001aHr=l8Y K\u0012\f\u000fp2P]:8k0v7kLr2fb(\u0018H<76\u00121¤`\u0004\u001cG&/\u001cl\u001dD\u0015G۰\u000b8~*oĽ:`1\u0013,\u001eD\u0016Ǟ(<c&8D\u0017ǽ\u000bPlƧ\u001a\fz\u000e\u001ca\bg\u001d'ڭM(PP͎Fgp3杇1dP\u001c?c:8SZ\u0012`^F3+ϜJ\f\u0007܌JLp\u0014\u0017\u0015Yk\u001bmo}\u0017ўUi$0\u0013vI\u0018s{kZix\u001bvS{\u001bslhn\f*\u0001.|\u001bs`\f\u0014,(_kW+?1WkB\bWc1cX\u0002?S\u0004;b?kV\u001f(7do\u0006\u000e\u001ccR~DA?YlQnS~D\u0018;V0\u0004\fP1c<R\t@\\Ή#L\n+?%|\u001d\u001d7\u0012Ƙ\u001fQP\u001b\u000f\u001a\ra\u0002GP=xUsR1\u000eRs׿?n'\u0017u\u0015cTE8\u0010\\9Y\u0011\u0005g܎9P8D§ 1np1H\u00041$<uF%/c\u0012~V\u00010p\u0000Cyc&\"\u0014>\u001399Ds2fJ3e\u0001\u0013Hn\u00170s\u0017n.ќc=mL#;f\u0002\rB\u0016\u00146\u0005\u000e0&\u0005\rSਬ\"\u001ecbR]\u0002>MV1\u0013X\u001f8;f\u0002G\u000e\tT~G\u0010\u000ehfk\u001bGā\u0004~\u00144\u000b>{$Vn\rh\u000by\bg\u001d\u0018xvkpt\t*ΘtW3)g.b\u001b֍\u001b'\u0005Ɓr\u000f3f1Ǡ\u00127f\u00029;GC\u0015IycM`!vL\u0003ƙ\u00127f\u0002\u00133l<\u0014lIy\u0018]غbRޘ\u001b\nK.57F\u0002tƚ@qob\u00057)o\u0004z'\fI+gY\u000f礼&[Ė\u001c<S\u0014\u0013A\u0005p=nv\b^\rf&*\u001cx!8fbȎ2\u000eꖣKD%vp/\u0014+7\u0004oUJ5)oDb\u001a'ǚL˖\u0012\\\u00160;\u001d\r܅\u000b'5wp\u0011.7F\u0002\u001b\u0007\u001ei\u0011ug\u001a\u0019^Հ#P/3Q7X\u0013tl\u000f\u000e32uSVN%s\u00127\u0014g'\u000eЯ\u0018VIY:D3ڭXa'5'#\n\u0007K\f\u0007\n6̹2\u0013\rm\u000b2%^o\t7l\u0001\u0013\u0016Lc\u0006nqps\u001c+\u001b&,XVj\u001cr2\u0003T8c&\u0013x`M\\_\u0011\u0011rw\t1\r\u000e%X{l<\u0019[N\u001b3uӞq\u0010v\u0001cMt<e8WMʏSVƬ0ql\u001aAQ\u001cǚeRlR)+7\u00129v\t4\u0007b\u001dk\"]o\u0004\u001aOX\u0013\u0000~8uQjʙK4q\r<j(o,\u000eVG\u000e卙x\u0016Aq\u0014ɱ\u0006Iyc&\"\u0014<qp+&\"\u0010x\u0016ݲOp\fn9X(T7)g.4{{ƚ\b\u00006\"\u0010x\u000e?&8x\u000b`=gRX\u0013%쉙90\u0005jњr\b\u0018y\u000enhSY\u001bl|&卙@3bb5~Z2\u0013T8cMe&\u0014qdL\u0019`MvSVV\u0014?[}ݦD\u0013\u0007j[633=QՎ\u001eIyc&\fxbq\u0013\u001c=rQ\u0001e7gÉ9cMmãCY9;\u00047<f>3\u0007@w8N\u001bk\u0002%\u0015m/\u0018\u0019Ŏ7Gm\u001f7\u0004xy$\u000ftxiјs1PX\u0013E\u0001GLP\t\u001bk\u0002g\r;\u0004mx\\\u001ck\u001b\u001e\r03G`qo\u0005L8a3 q\u001a|[O9O0۔|&8\"8%ƚX\r8ޟd\u0000~&8P\u000fd\u001d\u001aʏ(Y2I8\u0018Ŕ7D\u0010\u000bkU\u0004~Ds3fJΜ]\"LPיK\u0004q(ҏY\u001dwαrs\t%V\u0017N\u0013O\\'jGU\u000399fJX\u0013A\u001c@,d\r8)o\t\u0016\to.`19D\u0014\u00076na\tx\u000b[ojʙKTq\u0014ǚw:cCY9:Dޘ\t,E\u000e\t\fc\t~&X{ãCY8D2:Xm`T\u0014{Nh@/0~}gc\r;)+Wǚ`E?Ix\u0002u\"z5\u001coqw\tu4ǚ\u001cˆ+&eX\u0013g茡\u001c\u001ck\u0012}tPV5&\\]:\u001d<j;pr\u001c+ަ\u001c]@[\u000fh\u0002:p\bg\u0014;*\u0002\u0018M\u0011l1)gv:]\u0003<\u001b\b\u0016\u0005[..Qđ\u001dk\u001bΘcM\u0003?Nr\u0012]\u001cM>\u0005\u0019{C\u0019\u001dٱ&uQf&3{c\u0016\u001b3A]o*\"]\u0004$(\u001c\\\"W\u0017m{x@'Z\u001d`S\u0014;jÆLٱ&ufk\u001cMY98ք:V\u001c\u0000rQdMDuK\u0014qx]\u000f`R\u001c]\"#\b\u0000\r\u000e?\b]Ds\u0004+\u001dфCycMp؂ C9F7e*\\\\#;\u0004\u001bxCY98ĵp\u000e\u0013\u001fed=k\u0003}\u001b[G端*&T3g21`,bgT\u0005Z8aeyż0\\\u000b(q{Dcvpfg|zH\u000fgnќ\u0002:5+\u000byșsdR$\u001cVʲiЀ5cv\u001bCTR\u0019cv\u001b#\"96GՈf@};<\fp`v=rul\u000eHQH\u001dÊٷl\u000eDR0\u001e`2ؗc=Te\u0015A!9\n)cum\u001f\u000e\u001b,'B}3\u0018j\u001e\u0003\u0011H%\u0010\u00177Fq\n\u001cU\u0004ij>\u0002y\b,znwa\u001a,!(ّ;Ѻ\f\u001e\u0011\u001d\u0011Aa\r\u0007mFd+\\\u001b#1t[:f<\fz,ک5يgҪ\f׍\u0002k'7hN\\֠'5ԓ&]3gȤH9S\u0000^\u000b\u001f\u001epY;mQ|Y(,\u0017\u0003j8#1;R8stH\nFw\u00128^%M3܈sT@\u0016d:V9:)l\u001dEycE,!(ّÙs$RDPjm\u001f\u0011\u001d<&suJ\nq\u000eezV\u000499fG\fgv\u0006[o`2X/XO>\"1;$8G!E&NΑ\u0002y®\u0000h\u001d\u0006kj\u000f̎FJ,2WV\u00049;fG\ng\u0011Io6XS\u001cZL]ȆsO\tY9\u000fX0\u001f\u0019M4\u001b\u001dW[ w\u001c)sTR\bqq\u0014\u001d\u0019I9\")\u0018I\u001f;\nkk\u0015+r\u001c\u00148:G$\u0005#i|zz\u0011\u001d5YCHQ\u001c#3'a5\"\u0017{=%+\u001d3W稤\u0010(92)lu9,\u0012Ù\u00013\u0019rsF\u001dB\nTS^Z\u0011\u001d1\ro;:)cvpfq\u000e+UW.a\u001cΜ#\":fG8j\u001f\u0011\u001d<&su\u000e,a\u0012Μ#\"9fG\fgv\u0006[[`2X\u001b\u001cZKʨz\u000bH8aay|FL,O$uַo\n\u0013+B\brq̎\u001cΜ#\":fG8\u001f\u0011\u001dT)k\u0013\u0019A\u0016(92)cvpfg\u000f&u[nHQ\u001d#kX/5#6=\u0018\u0011\u0015&n찎\u0010R\u0014y9F?7\u0011Nxݬ\u001e}rw̎\u0016\\B\u001c3JY>*wJ]T\u001b\"Sn[\u001c\u00141;j888fG\u000egNΑH\u0011\u001d\u0003\u0005/L\"\\4W\u00049:fG8aYXܜ:f3\u0017X`vP\u001cJ5-k}ȏșstR=sT@\u0016\u0010R\u0014\u001c\u00141;b83`^nd\u0010\u001cTK{I\tUJcv\b[j5<w\"ȝ1j!(ّ<\u0013yc\u001e#Ԯ\b2U\"J&vǮ\u0012j2U\"󼙳sdRP岫TZ\u0000OT)g\u00049fG\rg\u0016\u0010R\u00149bف%\u001bR\b\u0015+R)+E0;h\u0016\u00164qJ/ҫ;\u0005\u0014\u0017UJ\\\u0012Wi^RO\u0016\u0017knFc\u001e\u0011'k\u001ed~\u0012\u001c\u001f㧍\u0011<f\u001f3&(1-qj?-\u0012k\b\u0019<P0/\r׏*X*\u0014\u0016D#\\?F\u0017#\u0004%v{\t3\rO<w'\u0012\u0017\u001f>v|\nsH]Ms}w'/?Ϸ߰~o;TO{\fsg=1mp\u001d:h5.{&ի!.?K<r\u001f2&\buZIӺQ6>\u001713q\u00040||Ǉ\u001d\u0006^q{h@&u4\fu\u00158Ly@A,ϛ4+#_;,p+X6|\u0012Ynnj'RoѱGt v,c\u001aK\u0005t\r9[`\u000e;/GCM]nȧXӝ\u0012>m\u00158;+\\6\\׮ҵλʯ\u001d<a^o;`}[K\u0003)OzzUS_WԕM\u000eY\u0001*-wm|fXS\u0015W&\u0017\u0017Qڧ|\u0006hy = z\u0005hr\u0016FOĉF~Ͼj*6C7\r\\0_\u001033\u0006U^tt=\u0002\u0003\u0006͟1\u0010\u000f-S>\u0003\u0003Iz([:woxs=8)NG\u0015;\u001b+\\^zXeI2\u0013bd\f蟬G\u0019Hσm\u0005hy&\n\u001d\u0015Q+7'2ml\u00025֊>Q#F\rOdڱ85-\u0019;4y|D$u!Ew7D]I\u00198\u000b3bby\u000eM\u000ei}N\u000fߡ+q mg&O&\n\u001d\r\\0C\u0017R#Dñ\u0002\u0003\u0006M\u000ei}gO֗4 f\u0006G{t:~\u0017|C,\r`>#FC:s'uƹn:zJ釘pF'GDVCV\u001eUM7DaRRA\u0003=\u001fj\u0015c\u000eM^1/\u0005y&O\u0007nRh\\8-\u001crZr;Z6\u0003\u0015\u0013;/\u001eڼ\u00073\u0014o\t4YRw<#7\u0013V\u000bwhrDǕr\\\u0016M\u000eF+~\u00118+\u00051<o\u0003\u0013#I\rDo+0\u0010\u001fEOw\u0019c'\f\u0003A)t\u0001iג\f5/%\u0005H\u001e\u0005\u0014Ȗl\u0002|`˃%+K8G}`\u0003N\u001c$i\u001dU{uN\"K;\f*\u0012\u0007WC\u001f\u001c-eĪpUŮ\u0002İBnO4\u0012F5m4\u001av%7w\u0015XJP\u000bX2\u000evUa)\u0019/*\u0019(\u0014M))EU`C\u001a)EӞhЄ\u0019P2]\u0005\t%\u001334\u00062(\u0018`f\u0002|C\u0006>Ph=n'?.\u0018\u001eۋ\u001e\u0017_\\w\u001crtfĹ@@[|9~\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u00007o\f\r\nendstream\rendobj\r723 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r719 0 obj\r<</Filter/FlateDecode/Length 332>>stream\r\nHLRN0\f+\u0003M]+\u001bpaB\u0013H|@\u0005Ђ6_\u001a~##x-\u001b\u0010v{\u000f'\u001f_ڧ\u000b\u00170v\u0007USYSoH0N8Cq^A7Vh(\f(ᐆ^\u0007\u001e\nu\u00061T\u0002KS/!L\u001egp\u0011*..,z+\u0007읜T^FZ\u0019+;\u001f:iu8\u0011'|(\u0007#71gG\u0016\u001bhU؅\u001c@\u0016{1*[ŉMD>'ed'.N(}tƪi4`9L\u00145嶚r]6y*\u001ey&epgS\u0007v#T9\u001d+\u000b\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000ox7\r\nendstream\rendobj\r720 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r721 0 obj\r<</BBox[-3.0 43.0 46.0 -6.0]/Group 754 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 755 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 687 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n49 0 0 49 -3 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r754 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r755 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 756 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r756 0 obj\r<</BC 757 0 R/G 758 0 R/S/Luminosity/Type/Mask>>\rendobj\r757 0 obj\r[0.0 0.0 0.0]\rendobj\r758 0 obj\r<</BBox[-3.0 43.0 46.0 -6.0]/Group 759 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 702 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n49 0 0 49 -3 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r759 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r632 0 obj\r<</ArtBox[0.0 0.0 40.0 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 760 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 761 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 78 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 762 0 R>>/XObject<</Fm0 763 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r633 0 obj\r<</ArtBox[0.0 0.0 40.0 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 764 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 765 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 78 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 297 0 R>>/XObject<</Fm0 298 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r634 0 obj\r<</ArtBox[0.0 0.0 40.0 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 766 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 767 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 78 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Font<</TT0 296 0 R>>/ProcSet[/PDF/Text]/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 297 0 R>>/XObject<</Fm0 298 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r635 0 obj\r<</ArtBox[0.0 0.0 40.0 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 768 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 769 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 78 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 721 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r636 0 obj\r<</ArtBox[0.0 0.0 40.0 40.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 770 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 771 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 78 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 209 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r770 0 obj\r<</Filter/FlateDecode/Length 1326>>stream\r\nH\\WKF\f\u00145m$\u0018\u00009 \u0017%s UEL`[\"n6Y,/~_>}\u000f\u001f?ۏpyG\u0016myo{??_󖓗Z'_Ըn{\u001f-4Joo\u001bm:̣5ne]n/\fPj\f\u0013f4_7\u0015g{9<sNW)AP}R᳡:\u0004fs5\u0016~/,\u0014\\2\u0017\u0000(\u0002\u0011\u0017U\u0013:\u000bi}{W\u001en^~Mr\u0018bm˧\u001fV!mc_O'23Ϭ\u0011\u0012Ku\u00150e_SҨB콺v\\m\nƱeG\u000f\u0011..rz{\u0018e\u0013rv5ρ&nMr&Di퉺cJ:P<ʹ}\r3kWՔ} չ쌏[K\u0005:6u\\se*vD\b6uwDɘH<ӓe=m)g[j\u0001.3Y\f&\u001e2}s]q^NMgLR\btƢ|,eX5-:!\u001fJs\fTTZEVe#\u0003dMG]ht\u0019j-P\u000ff@{\u0006rN\u001e\u0017F,%Y\t&VhRd\u0007+M\u00015j\r\fV\u001cx݄\u000e\n\u0017\u0005k(ĄlA\u0006\\4Y\u0013GW/lbAn\u001eo\u0019\u001c\u00143yj)Ir?G\u0019\u0002R'IC\u0004qea2$\u0005\u0003@KB\u0019b`\u001bD\u000ft{!`Ҁ>\u001d8V\u0002\u001e\u001cm>;g/lt\u0018\u001dH\u001cU\b\u000e9d2Wvj uzE\u0014E&\u000e}cw'YíK3g&vt7\u0019@}\u0011ؘĀ<­r\rn`\u0012Y'O\u0013\u001fTA\u0017~A\n9Z. 4Gc\u0001d_\u000bZk\u0004\u0002MHNa\u0006p*zҀ4A8h\u0010\u0001h`ʻT\u0011J\u000b\u0018kr\u0014\u0005\u0013~\u0011jwq<n9\u0017x:2\b%{N\u001b_0U\u0000͓\nc}}V1h\u001d^\u0013\rOpG}^><}X\u001c\u0017xECN\n\u001a/\u00105}\u0004\u001c\fp\u001e[\u0000z\u0013RshY[\u000fBC`Pb\u00066\u0007S+\u0000N1k &\u0005ADЧV^X\u0013\u0012P>1RՋ\u001bpY\u001dV)g~$9vWyw}8hpB\u000f\u0013b#\u0014\u0003|y<C}7/W.\n+bX=_V'T\u0006\u0011S6\\N\t\n搚@?ָ@\fa\b$ƚ\t_L-ٖ\u0000hg\nW?ϰSjCujEͤ\\.WvEI\u001f}}f5p!\u001ejjO\u0010A`\u0017>o\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000ߜR\r\nendstream\rendobj\r771 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r768 0 obj\r<</Filter/FlateDecode/Length 645>>stream\r\nHlUˎ\u00141\f+\u0003qɕ]\n@\u0003F\u001cz@DNz\u001a\tLڕv.\\>?\u0003w\u000f޽r`[}w\u0017/ˇ\u001b1\u0018=dÿk\u0010W\u001f<\u0013|`*S_oNnn\u000bTzE@q,֫[\u001f8R~\u0012DMhyuOswa<&]gg\t5I\u0002\u0019\u001dt?TxP\u0007b\u0011z\u0016wCp]\u0010@\u0004\u0018ۈ\u001c\u0011\bɥ\u001f(*\rcD_,[$\u0014}ZWӂG:\u001fN'K\u0004Qy\n\u0007腒@F^3{W\u0006\"ՄQkj)\u0013q'-atO\"KL5\u0002[4ki@\u001b\u0013!Q\u0019OM'\u0019=-+YS7\u0018)\u00150Rm\u0004\u0018<$\u0019('}jA$S5Z\u0016ձP\u0004['\u0006ځ\u001a'(ͮ%*`\u000bJ.\u0014S`La4j9@'48\u001e(\u0012B(F%mdd/O\u0001\u0012Jj\u0014\u0013/\u0014Ef\u0019Z\u0015EP\nRҩ\u0003RY BNPͯ\u0012\u000f)dA\u0007\u0001nh\bƁ-*&\u0006xYLFU-*2R\u0013L\u001d\u0011\t2wB\f\u0000w?\u001d;1*&Y\u0004UhЌZcLnV\u0018O:\u0016\u0007\u0005\u0010s\"?\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000<*\r\nendstream\rendobj\r769 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r766 0 obj\r<</Filter/FlateDecode/Length 553>>stream\r\nHn0\fz\n\u001eil4er\u000f\u0006a?Ғ\u0004\ri߶m\t67[p;m\u001c\u001czq\u0004a5~/\r\u000f\u0004Oo:9~m\bn~{^\u001c\u000b\u0006\u000b>1c2\u0013v\u00123F\u0017\"pp4U\u000b\u001a0t\u001d\u0014ɔ\u00172\u001c\u0005NN:ɯc쥠HY\u0000磜TI;\u000eq@bMir\u0014Φ4QjG\u0003.7\u001cNnHv\u001eqW|&\u00036\u0005x}Zvy\u0001ҋA\u0013CO!u8Fma,ƃ\u001b\u000e(C=\u0012\r+\nV<\u000700T\u000e\u0000uL!O&Q\u0014R\u0015\nJk\u000b(6\u0014o3\"*H\u00055U<:j&\u0015=R@0I}V3\u001cܚB\u0016\u0018G\u0016-R+/&@հ\"GYFy{ L`Z\u0005Ko\u0003\u0017UUWQ,\u001eIT!F?0<\u000b7Es]\u001a\u001a\u001aNWא=)m\u001d6lI_}@z\u001efp0A_wswoj;&1>NV4Pe]ze\u0011Ɠ4ۍ\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000e\u00186\r\nendstream\rendobj\r767 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r764 0 obj\r<</Filter/FlateDecode/Length 440>>stream\r\nHlr0\fE\n \u0000$%qki3F\u000b\u001d'~iG\u0012\u0003Z\u0017\u0015<~=td<\u001d\u0011,%%%u\u0001F\u0003[r||a|_Ƈ3\u001fx\u0002eFg\u0010!0M\u001a\t\u0005:1\u0005<5m\"i*\u001fz\u0005Np\u001bDaq;\u0014fKRѬ e+״5A|L-\u001diu7E):60J\fW\u001c_VƏ\u0015_\u0018\u001ff/h1).\u001ez\u000bڒ]C/)}ɩ\u0006\"fY;{\u000fId#1\u001d;vp`S\u001a\u0006(d\u001e\u0012\u0006i%SaU\u001aժ\u0015=ek;\tT]ZaR5A\u000e.;]R;ICG</hVm\u0019N\u001f\u0015\"Ӛ\u0005O]jnbK4\u000f+\u001eVr\\j5.WeŘbu[#>5+HUm`/\f\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000)g\r\nendstream\rendobj\r765 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r760 0 obj\r<</Filter/FlateDecode/Length 535>>stream\r\nHLTn0\f+\u0003Eu&AHn4كE\u0007ʇ]WH\u001cI^p}>y|x<!<=\u0014\u0007xL,\u0003/O_<\u001f뷫p\u0006B]Lc\u001d?ŕ\u0003y\u0015\\\ne|\u0017НAS\u0013]\u0006\u000e<-\u001e\u00114l d\u001a\tĐ\rB\u00147$X\t\u0005)TP\u0014b\u0016\u0005s_K\u001aE8!\u0011u#~I\u001bTT#`2FJ\"M\"*\u0018;%,\u0019,/Ֆ'\b\u0018,pv)d|\n\tBgcU\u00177p \\}sza2MaFlRn8$I\u0014\u0012#b+\u001fYv`n-X~(`bzr\\\u0018#\fXy\u0017\u0013=\u0015Lx:\f;uH7F+*\u0015MjJԓd'$hi\u001b\u0006\u001bK?R(\u001c*\u000b\u001eZ\u0018x/o-\u00011Eؙ\\PYa M\u00030\u0002>\u0001-<\u0006!\tH+\u0018\b\u0011w\u001b&\u00057\bҗ@.Gs`?>2d\u001f\u0019j,\u001eJ\u0005^l_3\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000\b\u0002\r\nendstream\rendobj\r761 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r763 0 obj\r<</BBox[-4.0 42.0 48.0 -6.0]/Group 772 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 773 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 737 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n52 0 0 48 -4 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r772 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r773 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 774 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r774 0 obj\r<</BC 775 0 R/G 776 0 R/S/Luminosity/Type/Mask>>\rendobj\r775 0 obj\r[0.0 0.0 0.0]\rendobj\r776 0 obj\r<</BBox[-4.0 42.0 48.0 -6.0]/Group 777 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 743 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n52 0 0 48 -4 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r777 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r762 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 778 0 R/ShadingType 2>>\rendobj\r778 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[779 0 R]>>\rendobj\r779 0 obj\r<</C0[0.454902 0.639216 0.819608]/C1[0.392157 0.537255 0.690196]/Domain[0.0 1.0]/FunctionType 2/N 1.39031>>\rendobj\r627 0 obj\r<</ArtBox[3.25 2.25 17.75 16.75]/BleedBox[0.0 0.0 20.0 20.0]/Contents 780 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 781 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 77 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r628 0 obj\r<</ArtBox[6.0 5.0 14.0 14.3333]/BleedBox[0.0 0.0 20.0 20.0]/Contents 782 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 783 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 77 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r629 0 obj\r<</ArtBox[4.68993 7.49998 15.3101 12.4925]/BleedBox[0.0 0.0 20.0 20.0]/Contents 784 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 785 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 77 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r630 0 obj\r<</ArtBox[4.71126 7.49998 15.3101 10.4007]/BleedBox[0.0 0.0 20.0 20.0]/Contents 786 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 787 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 77 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r631 0 obj\r<</ArtBox[3.5 3.5 16.5 16.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 788 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 789 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 77 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r788 0 obj\r<</Filter/FlateDecode/Length 459>>stream\r\nHLMn\u001b1\f:\u0005/ Yl\u0004]\u0005EE\u000f`4\")@#e'\u0018gHQ'YN\u000f,?\u0012\u001fwr#d)?7t\"*x\u001eE>_SN\\*e=\u001eR\u0017MZ%kMku\u0004ҿ׎[%\u0006:J\u001d5\u0015Z\u001a1!j:KC*2\u001a5`g\u0011d˖찎r Պ\u0016ˬxσfj?\u00104G\u0016MTXMY\u0017DZN\u0013\u0015W:\u0010\u0016b\u0016\u0007j\bێ\u0016p0J\"d@&u\u00147[US%R:u\u001cpEv [.4F$BR\u0004\"J#1~}5+\u0014'fNڈ%:ft眣MQ2\u0002lN!mD:\r\b\u000f\u0007N|\u00100GntPual~\u0012`NA7涧#)ٙ1FMN1)urȜ]@3g{\u0000+lrՈ\u001fc\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000fO\b\r\nendstream\rendobj\r789 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r786 0 obj\r<</Filter/FlateDecode/Length 134>>stream\r\nH,\n0\u0010D\u0015\u0003ƦQz*R{\u0003x`bdv\u0006,o~%\u0013ױo\u001aڠ\fq\u0013\u000fbQ\u0000?\u0007\u001bZd$)eEE+A/b_%:7\u000bfLɄ/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r787 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r784 0 obj\r<</Filter/FlateDecode/Length 217>>stream\r\nHQAn\u00021\f\u0015\u0001gl\u0002ʂ*ʁ\u0007\u0002\u0017~\u001f'^Qz8=\u001eOc@\u0019\u0004\u0000ZouROH\u0010\u0017q%\t\t\u0012Oԍ;nP-UpP\rg\r*\u0019,aQ숓\u001d{/X(PK\tSz%Q\"\r\u001f>G\u001b\u0016ww%MH\u001fB\u0011C.\tyf\f\u0011\u0019%\u0012o?;\u0001;\u0003;\u0005;\u0007\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u00002`\u0005\r\nendstream\rendobj\r785 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r782 0 obj\r<</Filter/FlateDecode/Length 326>>stream\r\nHSj0\f)\u0002v$qQ\u0018\u0007\b[H\u0006\u001f&vf\u000e|\u001cI_\u0011H4\"<\u001f-[W tz\u001byn\u001f@9 og'\u000f\\d1Gv˅\u0002io\u0001\u0013\u0005f\u0001bf@#.N%\t\u0014mCR\u0013Y&b08X\u0018%¢\u0014ann\u0017\u0019gLlI*|N<%W8=e\u0002jb5q\rk.\u0013$QK\u0002iuQ|M$]\u001f7\u0005>O\u0012חDM\u001e0507\r;48lG\u0011pu\u0004:\u000260\u001b\u0018_^%-/p56UO5_\b\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r783 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r780 0 obj\r<</Filter/FlateDecode/Length 161>>stream\r\nH\n0\u0010D\u0015\u0003m\u0001s5JA(\u0004\u000f\u0007wEJ{0&$\u000bB[\"\u0002:*+*Y\u0004\f,6u[M\u0017q\u001fe.F\u000e,\fU{2\u0003X։\u0004DK74\u0007.=\u0003zcm\f;v&Tr;?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ѝC\r\nendstream\rendobj\r781 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r622 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 790 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 791 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 76 0 R/Resources<</ExtGState<</GS0 792 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 793 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r623 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 794 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 795 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 76 0 R/Resources<</ExtGState<</GS0 792 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 793 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r624 0 obj\r<</ArtBox[3.0 4.0 17.0 17.0]/BleedBox[0.0 0.0 19.0 20.0]/Contents 796 0 R/CropBox[0.0 0.0 19.0 20.0]/Group 797 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 19.0 20.0]/Parent 76 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 19.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r625 0 obj\r<</ArtBox[3.99995 5.0 15.0 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 798 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 799 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 76 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r626 0 obj\r<</ArtBox[4.0 4.0 15.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 800 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 801 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 76 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r800 0 obj\r<</Filter/FlateDecode/Length 287>>stream\r\nHRN0\f)\u0002m$J&!Mh\u0003T0:m/NI\u000f\u001c:7_ҽOۑy\u000fօ\u0002G\u0006AC\u0015\u001c,뉺1F\u0017\u0016\u000e\u0011\u0003Τgj6\u0019=\u0011,M̈\u001aeE&R=i%A2\u0003aI~\u0005g\u001ct\u001ak\te\u00194d,[XWFh\r\u0015cvA-Et˷\u001d}c\u0017^9p_\f\u0002Gؖ;\"qu\u001f#-6cX(r0\u0007q+YK\u000b\u001e\u0006Jԧt\u0013</\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000{\r\nendstream\rendobj\r801 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r798 0 obj\r<</Filter/FlateDecode/Length 348>>stream\r\nHTRIn0\f\u0015@dR\u0012-ڴ)(\u001e\u0000M\u000eM\u0007:Zcr(.\u001aN<y8셟L/\u0007a9J±vxo?$A5q\u0013\r§_Qlx\u0017Ie\u0004\u00040Ř\u0010U`\u000e&]\u000e2OA󸄹\bce`K\u0015${ǈ`36\u0019©L\u0012;`f2oкJ{\u0018b|Lڑu;tյL_t씁z6e$\u0011\u0003.kUw\r\u0019,\"\u0003bjуڮHS\u0015œ\"%\n|J\u000b\u0014T[%z\u0013죁\u00073art\u001a4e#ILnh#\u001dCy`/bn\u001a \u0003.E|m\u001cM8W}G\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000˱\r\nendstream\rendobj\r799 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r796 0 obj\r<</Filter/FlateDecode/Length 221>>stream\r\nH\\PI\u000e0\f\u0015󁤱K(R\u0010'\u0003\u000f\u0000\t\u0015$ʁc'e\u0011\u0019;8jӢZ\u0001E\u000bZJKN\u0001\u0012\tNa8\u00017\n>\u0004Ù>\u00155\u0018\u001c\r+Yz%ǆ\"{\u000eQc\u000b~b2a}$g\u001c0\u001dÎ\nN\u0014lOE\u0016Eb2c'\u0019ۭt\u0005Φ^\u001foM\u0018Ŝ)QdV$\u0013\u0019Pgad{]~K/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001dK\r\nendstream\rendobj\r797 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r794 0 obj\r<</Filter/FlateDecode/Length 310>>stream\r\nHLRn@\f+\u0003IJ6^*J\u0015R=M@`gg\"i?2\u001dzt%u!>sOf|k8щ\\\u001b\"?3\u0002ꅅ~{mi!\\6k[Z@<\u0013nc8dhf%$~\u001dV\u0017\u001cLҊ7Ҷ;랪D?L$Y{\u000e\u0019c\u000e\fԤ\n\u0014\u0011Hٌ8֋\u0003J]w\u001a\u0019:\u00139jrm#D\u00013JH2@Ai@\u0000=h.\u0001^邴RX\fd봑\u0014\u001c[]uߪѶwk\u0013\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000Yz2\r\nendstream\rendobj\r795 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r793 0 obj\r<</BBox[-2.0 27.0 27.0 -2.0]/Group 802 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 803 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 804 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n29 0 0 29 -2 -2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r802 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r804 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 64/Name/X/SMask 805 0 R/Subtype/Image/Type/XObject/Width 29>>stream\r\nHb` \u0004\u00181\u0001\u001e)4\u000e9,N9%L|׎JR&7ěnx\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r805 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 29>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 382/Name/X/Subtype/Image/Type/XObject/Width 29>>stream\r\nHb` \u0004\u0018\u0019P\u0001##\\\u0013\u00018Y Ҍl\u0002\"R0 ).\"\bcP563\u0000s3#\u001d%1\u001e6&$+C@TBR2\u0004$Gڨq2sjg4L1\u0007\nfOJU\u0012`cd`dᑵk[б\u0010pU:\"L@SS\bx|H#q\u000e{3O>|\u0006\u0001_=0=L\u0013(§R܋oB/N\u0002J20(8.9\u0010sܲ6\u0019\u000bN=*%m:ĳoX%9,\u001cJoɤG\u001fşLf\t\u000f}\u00053\u00188č\"{6\u00183l\u0019Et|fo>%V\u0018\u0018\u0004l\u0013zƌO`2\u0012Sǖ\u0012\u0018xĔt!P[)\u001e7\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000'!\r\nendstream\rendobj\r803 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 806 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r806 0 obj\r<</BC 807 0 R/G 808 0 R/S/Luminosity/Type/Mask>>\rendobj\r807 0 obj\r[0.0 0.0 0.0]\rendobj\r808 0 obj\r<</BBox[-2.0 27.0 27.0 -2.0]/Group 809 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 810 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n29 0 0 29 -2 -2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r809 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r810 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 29>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 382/Name/X/Subtype/Image/Type/XObject/Width 29>>stream\r\nHb` \u0004\u0018\u0019P\u0001##\\\u0013\u00018Y Ҍl\u0002\"R0 ).\"\bcP563\u0000s3#\u001d%1\u001e6&$+C@TBR2\u0004$Gڨq2sjg4L1\u0007\nfOJU\u0012`cd`dᑵk[б\u0010pU:\"L@SS\bx|H#q\u000e{3O>|\u0006\u0001_=0=L\u0013(§R܋oB/N\u0002J20(8.9\u0010sܲ6\u0019\u000bN=*%m:ĳoX%9,\u001cJoɤG\u001fşLf\t\u000f}\u00053\u00188č\"{6\u00183l\u0019Et|fo>%V\u0018\u0018\u0004l\u0013zƌO`2\u0012Sǖ\u0012\u0018xĔt!P[)\u001e7\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000'!\r\nendstream\rendobj\r792 0 obj\r<</AIS true/BM/Normal/CA 0.0700073/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.0700073/op false>>\rendobj\r790 0 obj\r<</Filter/FlateDecode/Length 313>>stream\r\nHLRN@\f+\u0003IGWZB*\b!\u0001\u001fjٙ\u001e>axc\u0016y\u0002\u00019뷓\t\u001f#-O/\u0012\u000b'\b&?gR/H\u0018C8b3N\u000b\u0005:X\u0005v,m١>\u0013x717*FE5\u0010@\u000el\u001dG¦m퉚\u001a\u001b<\u0018%M,YNnY\"}\u0016\u001dQ\u0011+9i(Jf5\u0015Q#Y/\u0019OQ6шu`UnmDS /vw\u001c $d\nYiu\u0015\u001bn^tR/\fyuQv\u001c'6?޲n[-~?w\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000d{\u0005\r\nendstream\rendobj\r791 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r71 0 obj\r<</Count 5/Kids[811 0 R 812 0 R 813 0 R 814 0 R 815 0 R]/Parent 60 0 R/Type/Pages>>\rendobj\r72 0 obj\r<</Count 5/Kids[816 0 R 817 0 R 818 0 R 819 0 R 820 0 R]/Parent 60 0 R/Type/Pages>>\rendobj\r73 0 obj\r<</Count 5/Kids[821 0 R 822 0 R 823 0 R 824 0 R 825 0 R]/Parent 60 0 R/Type/Pages>>\rendobj\r74 0 obj\r<</Count 5/Kids[826 0 R 827 0 R 828 0 R 829 0 R 830 0 R]/Parent 60 0 R/Type/Pages>>\rendobj\r75 0 obj\r<</Count 5/Kids[831 0 R 832 0 R 833 0 R 834 0 R 835 0 R]/Parent 60 0 R/Type/Pages>>\rendobj\r831 0 obj\r<</ArtBox[5.0 5.0 15.0 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 836 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 837 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 75 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r832 0 obj\r<</ArtBox[4.99998 5.0 15.0 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 838 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 839 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 75 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r833 0 obj\r<</ArtBox[0.0 0.0 19.0 18.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 840 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 841 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 75 0 R/Resources<</ExtGState<</GS0 842 0 R/GS1 151 0 R/GS2 843 0 R/GS3 844 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 845 0 R/Fm1 846 0 R/Fm2 847 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r834 0 obj\r<</ArtBox[1.0 2.0 19.0 18.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 848 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 849 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 75 0 R/Resources<</ExtGState<</GS0 842 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 850 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r835 0 obj\r<</ArtBox[0.0 0.0 20.0 20.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 851 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 852 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 75 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 853 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r851 0 obj\r<</Filter/FlateDecode/Length 136>>stream\r\nHL1\u000e0\fE_i4YI\n!8\u0001t\u0002Dw o~,\n\u0019b;TH\u001a58EtÙ\u0017C9\\\u0014ӗQOvgnZ s\"C*'>!)΃n\n\u0011h\u000f\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000(;\"t\r\nendstream\rendobj\r852 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r853 0 obj\r<</BBox[-2.0 21.0 22.0 -1.0]/Group 854 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 855 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 856 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n24 0 0 22 -2 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r854 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r856 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 22/Intent/RelativeColorimetric/Length 65/Name/X/SMask 857 0 R/Subtype/Image/Type/XObject/Width 24>>stream\r\nHb`\u0003\u0018\u0011\u0000(\f#:%ΈC\u0018\"MTqƁ\u0013'\u00038C\u0002W\u000ej\\Q3*1\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0001{\r\nendstream\rendobj\r857 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 24>>/Filter/FlateDecode/Height 22/Intent/RelativeColorimetric/Length 352/Name/X/Subtype/Image/Type/XObject/Width 24>>stream\r\nHb`\u0003\u0018\u0019 \u0011Y\t.% \".))).\"\f`b\u0011S12373Q\u0016eJ02sF'GkKC%\u0018\u0004l\u0013zϚߐe(\u000b`b\u0017񭚽C;ey\u001bJ19č\"7\u0013뻳Ź@\u001a8$Lb&ӧ\u000fϭtP\u0016`c~\u001f?<_G\tb\u0013\u000f}F\u001cL`(;d?On\u0014c\"\u0001\u0016g\u0012^ƃGwnꎀ\u0007W;oCG\u000fl]\u000b1\u001f_+Ƭ=U\tJ`@$Ak&\u0005\u000f\"v^qeh)/qE\rΨ\u0004\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005e\r\nendstream\rendobj\r855 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 858 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r858 0 obj\r<</BC 859 0 R/G 860 0 R/S/Luminosity/Type/Mask>>\rendobj\r859 0 obj\r[0.0 0.0 0.0]\rendobj\r860 0 obj\r<</BBox[-2.0 21.0 22.0 -1.0]/Group 861 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 862 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n24 0 0 22 -2 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r861 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r862 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 24>>/Filter/FlateDecode/Height 22/Intent/RelativeColorimetric/Length 352/Name/X/Subtype/Image/Type/XObject/Width 24>>stream\r\nHb`\u0003\u0018\u0019 \u0011Y\t.% \".))).\"\f`b\u0011S12373Q\u0016eJ02sF'GkKC%\u0018\u0004l\u0013zϚߐe(\u000b`b\u0017񭚽C;ey\u001bJ19č\"7\u0013뻳Ź@\u001a8$Lb&ӧ\u000fϭtP\u0016`c~\u001f?<_G\tb\u0013\u000f}F\u001cL`(;d?On\u0014c\"\u0001\u0016g\u0012^ƃGwnꎀ\u0007W;oCG\u000fl]\u000b1\u001f_+Ƭ=U\tJ`@$Ak&\u0005\u000f\"v^qeh)/qE\rΨ\u0004\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005e\r\nendstream\rendobj\r848 0 obj\r<</Filter/FlateDecode/Length 219>>stream\r\nH\\PJ\u00041\f\u00174in==\u0010\u000f9O\u0001\u0016\u0011V9}0G&$3i\u001b\u0007 ;\fRR7\u0012ew~~\r_NEק0\t\u000et&\u0017\bHO(\u001e1Kt\u001c/E%\u0014D3=Q\u0017XC'e6,Ew}B6X+f\u0012膲\u001b'o7_\\.ImCWGFRaڎ.\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000Z A\r\nendstream\rendobj\r849 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r850 0 obj\r<</BBox[1.0 18.0 19.0 2.0]/Group 863 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 864 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 865 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n18 0 0 16 1 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r863 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r865 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 16/Intent/RelativeColorimetric/Length 61/Name/X/SMask 866 0 R/Subtype/Image/Type/XObject/Width 18>>stream\r\nHb`\u0000\u0002F\b`\u0001F8\u0010\n12\u000b1\u000b1\u0012\u0014ad@1e\u0004-p\"\u0018\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000}\u0004\r\nendstream\rendobj\r866 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 18>>/Filter/FlateDecode/Height 16/Intent/RelativeColorimetric/Length 224/Name/X/Subtype/Image/Type/XObject/Width 18>>stream\r\nHb`\u0000\u0002FF&&&FF\u0006\u0018`df\u0015\u0014\u0012ec\n0\t[Z[JqA\u0018$Ccc\u0003-e!B\u0002Q16v^Rl@\u0018cĄ݂\u0018yüxXؤ\\e8\u0018\u0004-b\u001dXjUl%\u0018\"<ƅSx\u0018xS\u001bj\u0013A\"`U\u00059\u001db\u001dmw\u0011fё\u0006\bB7?{9\u000ef6\u001e\u001eG@R\u0013be\u0004\u0001Oy\u0010>\u0006RP\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000.\u001c\r\nendstream\rendobj\r864 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 867 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r867 0 obj\r<</BC 868 0 R/G 869 0 R/S/Luminosity/Type/Mask>>\rendobj\r868 0 obj\r[0.0 0.0 0.0]\rendobj\r869 0 obj\r<</BBox[1.0 18.0 19.0 2.0]/Group 870 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 871 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n18 0 0 16 1 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r870 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r871 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 18>>/Filter/FlateDecode/Height 16/Intent/RelativeColorimetric/Length 224/Name/X/Subtype/Image/Type/XObject/Width 18>>stream\r\nHb`\u0000\u0002FF&&&FF\u0006\u0018`df\u0015\u0014\u0012ec\n0\t[Z[JqA\u0018$Ccc\u0003-e!B\u0002Q16v^Rl@\u0018cĄ݂\u0018yüxXؤ\\e8\u0018\u0004-b\u001dXjUl%\u0018\"<ƅSx\u0018xS\u001bj\u0013A\"`U\u00059\u001db\u001dmw\u0011fё\u0006\bB7?{9\u000ef6\u001e\u001eG@R\u0013be\u0004\u0001Oy\u0010>\u0006RP\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000.\u001c\r\nendstream\rendobj\r842 0 obj\r<</AIS true/BM/Normal/CA 0.100006/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.100006/op false>>\rendobj\r840 0 obj\r<</Filter/FlateDecode/Length 194>>stream\r\nHtPA\n0\u0010\u0015ni6W[\"\u000f\u0010\u0011*\u0006*$3M\u0005V\u0006Z\u0002:J\u001cQ\u0019i%GUD\u0006^\r\u0006MuR\"\u000ba(\u0019!!0a\u00182`KOK\u001c\u0006\u0015A1\u0017\u0017aLKV\"&%`L')\u0003\fOOgЄlF3tMש'\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000CE\r\nendstream\rendobj\r841 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r845 0 obj\r<</BBox[0.0 18.0 19.0 -1.0]/Group 872 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 873 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 874 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n19 0 0 19 0 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r846 0 obj\r<</BBox[5.6489 9.02022 10.0313 4.63786]/Group 875 0 R/Length 114/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.376 0.49 0.545 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 5.6489 8.5202 cm\n0 0 m\n3.882 0 l\n3.882 -3.882 l\nS\nQ\n\r\nendstream\rendobj\r847 0 obj\r<</BBox[5.6489 12.2555 13.2665 4.63786]/Group 876 0 R/Length 115/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.376 0.49 0.545 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 5.6489 11.7555 cm\n0 0 m\n7.118 0 l\n7.118 -7.118 l\nS\nQ\n\r\nendstream\rendobj\r876 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r875 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r872 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r874 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 19/Intent/RelativeColorimetric/Length 64/Name/X/SMask 877 0 R/Subtype/Image/Type/XObject/Width 19>>stream\r\nHb`\u0000\u0002F\u00064\b\u0002\"(b\bE\b&Ȉ)HPl!F,B\t1bUEر\u0001\u001e\u0010\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\n\r\nendstream\rendobj\r877 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 19>>/Filter/FlateDecode/Height 19/Intent/RelativeColorimetric/Length 253/Name/X/Subtype/Image/Type/XObject/Width 19>>stream\r\nHb`\u0000\u0002F\u00064ʄ*)(Ή,&m\u0017`'\bcVe*\u0004\u00132)^\"',$\u000e\u0011cdWmϷWSghf\u0016w/4RS\u0010b\b1\t;KIÅ\u001cK2\u0003\u001cդ٘B.^\nB\u001cL\u0010!@s@[#\u0007\u000fk\u0005.\u0018MvR`TfLdqo\f\u001b\u0015\t\u0019%E}k\u0017s0|$nhcgT\u000bQ+($$$,jn&\u0005\u0000#\u0013\b0򲣆\u0012P\u0011#0!\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000$x\r\nendstream\rendobj\r873 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 878 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r878 0 obj\r<</BC 879 0 R/G 880 0 R/S/Luminosity/Type/Mask>>\rendobj\r879 0 obj\r[0.0 0.0 0.0]\rendobj\r880 0 obj\r<</BBox[0.0 18.0 19.0 -1.0]/Group 881 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 882 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n19 0 0 19 0 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r881 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r882 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 19>>/Filter/FlateDecode/Height 19/Intent/RelativeColorimetric/Length 253/Name/X/Subtype/Image/Type/XObject/Width 19>>stream\r\nHb`\u0000\u0002F\u00064ʄ*)(Ή,&m\u0017`'\bcVe*\u0004\u00132)^\"',$\u000e\u0011cdWmϷWSghf\u0016w/4RS\u0010b\b1\t;KIÅ\u001cK2\u0003\u001cդ٘B.^\nB\u001cL\u0010!@s@[#\u0007\u000fk\u0005.\u0018MvR`TfLdqo\f\u001b\u0015\t\u0019%E}k\u0017s0|$nhcgT\u000bQ+($$$,jn&\u0005\u0000#\u0013\b0򲣆\u0012P\u0011#0!\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000$x\r\nendstream\rendobj\r843 0 obj\r<</AIS false/BM/Normal/CA 0.669998/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.669998/op false>>\rendobj\r844 0 obj\r<</AIS false/BM/Normal/CA 0.300003/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.300003/op false>>\rendobj\r838 0 obj\r<</Filter/FlateDecode/Length 216>>stream\r\nH\\QI\u000e0\f\u0015@R;K+\u0005qPŁ\u0007TP\u000e\u0005\u0012R$gIFJqiZñE8u\u0012Dqf 4q+9\u001dn\u00066HSy\bJ8~`FF\u001epxA!*C2V>\u0001T\u001a\u0002y\u001b㠓̤(tu \t\u001eЋAf'\u001c\u001cf\\\u00158yd\u001dh)W\u0017`v\u0005%Mb:Oc)%\u00043\u001f\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000&NO\r\nendstream\rendobj\r839 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r836 0 obj\r<</Filter/FlateDecode/Length 213>>stream\r\nH\\QI\u000e0\f\u0015@\u0012;I+\u0005qPŁ\u0007TP\u000e\u0005\u0012R$=NFhpl\u0011N\u0004JJ3\u0010ڸ\u000e7|\u0003\b|%\u001c?0##b\u0002pxA!*CAU=RC(o2\u000esҔ+I\u0016XU\u0006\u001eЋE`γQ,n\u001aMsNSuYVBNԙή:;)%\u0004\u0019ǯ\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000VO\r\nendstream\rendobj\r837 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r826 0 obj\r<</ArtBox[4.99998 4.64449 15.0 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 883 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 884 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 74 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r827 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 885 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 886 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 74 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r828 0 obj\r<</ArtBox[2.0 2.0 19.0 19.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 887 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 888 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 74 0 R/Resources<</ExtGState<</GS0 842 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 889 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r829 0 obj\r<</ArtBox[1.0 2.0 18.0 19.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 890 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 891 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 74 0 R/Resources<</ExtGState<</GS0 842 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 892 0 R/Fm1 893 0 R/Fm2 894 0 R/Fm3 895 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r830 0 obj\r<</ArtBox[5.0 5.0 15.0 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 896 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 897 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 74 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r896 0 obj\r<</Filter/FlateDecode/Length 215>>stream\r\nH\\QI\u000e0\f\u0015@R;KK\u0014ĩB\u0015\u0007\u001ePA9\u0000R%jAI<bյCp$TY,M@hVr\u001b\\\r1(\u0018\f#T\u000b)\u0018#\u0013\u000e/4FetSs\u0004c\u0003*_\u0000\u0005q`Qr[\u001aJc\"KC\u001eC/slJ\u0014\u001bd)8zd\u001deg\u0005/jkBJeoS\u0013x%\f\tZG򟾡/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0018O!\r\nendstream\rendobj\r897 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r890 0 obj\r<</Filter/FlateDecode/Length 250>>stream\r\nHRn0\u0010W\u000f޵\u0013L6\u0017\u0010!\u0001Ա#\u000f\tN\u001dyvwvd*Jx4^\b$җah m\u0014}\"FxAs,1>\fXL^\"\u0014y:j=`)\u0007VdyP<7y\u0010epݟ7\u0012oaY]V]3vv]ٟv\u0000a%v]3^1\u000e\u0011\u0011N\u0010 iPzH\u0002.!=\u001b5\u0013q.Էaj.5s\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000j\r\nendstream\rendobj\r891 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r892 0 obj\r<</BBox[1.0 14.0 10.0 7.0]/Group 898 0 R/Length 35/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 899 0 R>>/ProcSet[/PDF/ImageC]/XObject<</Im0 900 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n9 0 0 7 1 7 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r893 0 obj\r<</BBox[6.0 19.0 13.0 10.0]/Group 901 0 R/Length 36/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 902 0 R>>/ProcSet[/PDF/ImageC]/XObject<</Im0 903 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n7 0 0 9 6 10 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r894 0 obj\r<</BBox[9.0 14.0 18.0 7.0]/Group 904 0 R/Length 35/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 905 0 R>>/ProcSet[/PDF/ImageC]/XObject<</Im0 900 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n9 0 0 7 9 7 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r895 0 obj\r<</BBox[6.0 11.0 13.0 2.0]/Group 906 0 R/Length 35/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 907 0 R>>/ProcSet[/PDF/ImageC]/XObject<</Im0 903 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n7 0 0 9 6 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r906 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r903 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceRGB/DecodeParms<</BitsPerComponent 4/Colors 3/Columns 7>>/Filter/FlateDecode/Height 9/Intent/RelativeColorimetric/Length 38/Name/X/SMask 908 0 R/Subtype/Image/Type/XObject/Width 7>>stream\r\nH\u001f\n\u0018\u0018\u0018#\u0001\u0006T)BgI\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000}!\u001d\r\nendstream\rendobj\r908 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 7>>/Filter/FlateDecode/Height 9/Intent/RelativeColorimetric/Length 60/Name/X/Subtype/Image/Type/XObject/Width 7>>stream\r\nHb```d\u0000\u0002FV\u000eVF\u0006F6a9a6FF\u001eM'M\u001eF&\u0001\bs\u0001&(\u0005\u0015*j\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000r\t\u0003\r\nendstream\rendobj\r907 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 909 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r909 0 obj\r<</BC 910 0 R/G 911 0 R/S/Luminosity/Type/Mask>>\rendobj\r910 0 obj\r[0.0 0.0 0.0]\rendobj\r911 0 obj\r<</BBox[6.0 11.0 13.0 2.0]/Group 912 0 R/Length 35/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 913 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n7 0 0 9 6 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r912 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r913 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 7>>/Filter/FlateDecode/Height 9/Intent/RelativeColorimetric/Length 60/Name/X/Subtype/Image/Type/XObject/Width 7>>stream\r\nHb```d\u0000\u0002FV\u000eVF\u0006F6a9a6FF\u001eM'M\u001eF&\u0001\bs\u0001&(\u0005\u0015*j\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000r\t\u0003\r\nendstream\rendobj\r904 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r900 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceRGB/DecodeParms<</BitsPerComponent 4/Colors 3/Columns 9>>/Filter/FlateDecode/Height 7/Intent/RelativeColorimetric/Length 41/Name/X/SMask 914 0 R/Subtype/Image/Type/XObject/Width 9>>stream\r\nH\u001f\u0004\u00180\u001cpY\\Rx\u0000y\u0006r\tP\u0010\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000z\u001d\r\nendstream\rendobj\r914 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 9>>/Filter/FlateDecode/Height 7/Intent/RelativeColorimetric/Length 61/Name/X/Subtype/Image/Type/XObject/Width 9>>stream\r\nHb``ddbbdd``d\u0011\u0010acd`\u001547\u0014fes\n\u000fw》 t\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000}\u0003\r\nendstream\rendobj\r905 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 915 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r915 0 obj\r<</BC 916 0 R/G 917 0 R/S/Luminosity/Type/Mask>>\rendobj\r916 0 obj\r[0.0 0.0 0.0]\rendobj\r917 0 obj\r<</BBox[9.0 14.0 18.0 7.0]/Group 918 0 R/Length 35/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 919 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n9 0 0 7 9 7 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r918 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r919 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 9>>/Filter/FlateDecode/Height 7/Intent/RelativeColorimetric/Length 61/Name/X/Subtype/Image/Type/XObject/Width 9>>stream\r\nHb``ddbbdd``d\u0011\u0010acd`\u001547\u0014fes\n\u000fw》 t\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000}\u0003\r\nendstream\rendobj\r901 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r902 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 920 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r920 0 obj\r<</BC 921 0 R/G 922 0 R/S/Luminosity/Type/Mask>>\rendobj\r921 0 obj\r[0.0 0.0 0.0]\rendobj\r922 0 obj\r<</BBox[6.0 19.0 13.0 10.0]/Group 923 0 R/Length 36/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 913 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n7 0 0 9 6 10 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r923 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r898 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r899 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 924 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r924 0 obj\r<</BC 925 0 R/G 926 0 R/S/Luminosity/Type/Mask>>\rendobj\r925 0 obj\r[0.0 0.0 0.0]\rendobj\r926 0 obj\r<</BBox[1.0 14.0 10.0 7.0]/Group 927 0 R/Length 35/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 919 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n9 0 0 7 1 7 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r927 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r887 0 obj\r<</Filter/FlateDecode/Length 185>>stream\r\nHlM\n0\u0010sw&ukXD+x\u0000\u0011EZzp\"B&yL̼\t\n\u0018\u0002mZ\u0011=!3\u00186LJg<\u0005c>ry_t`\u0000V~%\u001cǆ\f\u001e\r&60`\t|,0N\u0015ee\u0007X -:\u00196{\u0014i-~,B}\u001a\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000:\r\nendstream\rendobj\r888 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r889 0 obj\r<</BBox[2.0 19.0 19.0 2.0]/Group 928 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 929 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 930 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n17 0 0 17 2 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r928 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r930 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 17/Intent/RelativeColorimetric/Length 56/Name/X/SMask 931 0 R/Subtype/Image/Type/XObject/Width 17>>stream\r\nHb`\u0000 G\u0012adD\u0013!C\u0000P\u0000L\u0011\u0005`\b0%i*\u0003:\u001fA@\n\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000T\u000b\r\nendstream\rendobj\r931 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 17>>/Filter/FlateDecode/Height 17/Intent/RelativeColorimetric/Length 181/Name/X/Subtype/Image/Type/XObject/Width 17>>stream\r\nHb`\u0000LH|&6>A>6&<$\u001b\\\r#Q^w\u0011\u000fB׬fa\u0019/B]5%N\u001da,k83-BBL !3\t$ڊ01m\u0007HP\u0012\u0011\u0012W53\u0002$hak\u001aWg\b0!;5!1ya ,6qC\u001b[\u001b\ngx\u0005\u0010f\u000b\u0004p[\u0001\u000e\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\u0018\r\nendstream\rendobj\r929 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 932 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r932 0 obj\r<</BC 933 0 R/G 934 0 R/S/Luminosity/Type/Mask>>\rendobj\r933 0 obj\r[0.0 0.0 0.0]\rendobj\r934 0 obj\r<</BBox[2.0 19.0 19.0 2.0]/Group 935 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 936 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n17 0 0 17 2 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r935 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r936 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 17>>/Filter/FlateDecode/Height 17/Intent/RelativeColorimetric/Length 181/Name/X/Subtype/Image/Type/XObject/Width 17>>stream\r\nHb`\u0000LH|&6>A>6&<$\u001b\\\r#Q^w\u0011\u000fB׬fa\u0019/B]5%N\u001da,k83-BBL !3\t$ڊ01m\u0007HP\u0012\u0011\u0012W53\u0002$hak\u001aWg\b0!;5!1ya ,6qC\u001b[\u001b\ngx\u0005\u0010f\u000b\u0004p[\u0001\u000e\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\u0018\r\nendstream\rendobj\r885 0 obj\r<</Filter/FlateDecode/Length 366>>stream\r\nHdRKN%1\f\u0014@7#Vh\u0004,\u0000h\u0011!\r_C-t)\u0015~tw\u0016q\u000eiw\u0012I.L6z-J/\b}\u0014z(II0\u001a7ҊRs)[l|-uc?P֎TH/궮f1ر6ozOr}\u001c\u0005\u000bN,adØ l;6g\u0016b\u001aY\u0017\u0001\fB4cx=ƫU\u0006(\u001e\\\u0012\u0018\u0003@<PsĚ&uG#uEU^Uv%\u000b\\SCqAYݬ 7RTúyG\u0011\u0016)\u000e\u001e\u0014Pњpl\u001f\u0015\u0001J̵\b̈\u001cO_-z\u0002FvV<\u001f_|\u0013\u0000\u0000\u0000\u0000\u0000\u0003\u0000Ŕ\r\nendstream\rendobj\r886 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r883 0 obj\r<</Filter/FlateDecode/Length 211>>stream\r\nHQI\u000e0\f\u0015v6JA*\u0004\u001cx@\"\u0004HK8\r\u00148pB6\u001e)ŲA6\u0001[\"$zb\u001aێ\u0012O6vba\u001cCz\u0004Rabs\u001e݅R*q6\t\u0012J^L\"$\u0006ω82\u0004:<\n\u0017)Ut)*C2[f\u000e˷j\u001cL\u0007zA\u0013#O-iFW\f\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ST\r\nendstream\rendobj\r884 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r821 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 937 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 938 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 73 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r822 0 obj\r<</ArtBox[4.0 3.99998 45.0 21.0]/BleedBox[0.0 0.0 50.0 25.0]/Contents 939 0 R/CropBox[0.0 0.0 50.0 25.0]/Group 940 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 25.0]/Parent 73 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r823 0 obj\r<</ArtBox[0.0 0.0 25.0 20.0]/BleedBox[0.0 0.0 25.0 20.0]/Contents 941 0 R/CropBox[0.0 0.0 25.0 20.0]/Group 942 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 20.0]/Parent 73 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 943 0 R>>/XObject<</Fm0 944 0 R>>>>/TrimBox[0.0 0.0 25.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r824 0 obj\r<</ArtBox[4.99998 5.0 15.0 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 945 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 946 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 73 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r825 0 obj\r<</ArtBox[4.99998 4.64449 15.0 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 947 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 948 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 73 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r947 0 obj\r<</Filter/FlateDecode/Length 207>>stream\r\nHQA\u000e0\u0010+\u0003݂PDr\u0001D1FM'nV=x2mgInjmXjкUH\u0003%\u001aa\u000eǍT.'N\u0003M\u00184B\u0004@e\u0019+ycb+<ڬB0R:\r[OIiBbFbx\u0005k\fD(\nQ H6\u001eiE\\\u0013e6\\\u0019߮U2c\u0017~~\u001a\u0012/#:\u001d1Ζ\u001e\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000NS\r\nendstream\rendobj\r948 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r945 0 obj\r<</Filter/FlateDecode/Length 204>>stream\r\nHQA\u000e@\f\u0015\u0001ضU4A\u000f>(ƨ\t.A\u000fv۴dݮk*zS%\u0017F\u0012F\u00031tx#\u001eq\nR1\u0003v\u0004A\u0018ݝ|sq\u0012_4)\u0011est\u0014aa,0<[Z'\u00016&Z\u0010\u0006\u0004Z'Ttf\u001a̜5/ţ)&\\j\u001b}w\u001f\u0004W+!=2BK/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00006oN\r\nendstream\rendobj\r946 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r941 0 obj\r<</Filter/FlateDecode/Length 144>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\u0011\u0010*\u0002Tp<{Bz1P2G-@%+\u0010\b\u000b\u0015j\r\u0015\fMQ\u001b\u001bY.\u0011lc=\u0013\u0010\u0002h%\u0014\u001faP\u001a\u0010\bqw \u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000+\r\nendstream\rendobj\r942 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r944 0 obj\r<</BBox[-4.0 23.0 29.0 -4.0]/Group 949 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 950 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 951 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n33 0 0 27 -4 -4 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r949 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r951 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 27/Intent/RelativeColorimetric/Length 57/Name/X/SMask 952 0 R/Subtype/Image/Type/XObject/Width 33>>stream\r\nHb` \u00060b\u0007\u0004JCT\u0010RW\u001ebT\u0002d\u0005'9©p\u000f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00128\u0002\r\nendstream\rendobj\r952 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 33>>/Filter/FlateDecode/Height 27/Intent/RelativeColorimetric/Length 269/Name/X/Subtype/Image/Type/XObject/Width 33>>stream\r\nH̓;\u000e@\u0010ݸ<bAA PRPQQ \u001e\u0003PI\u0016b\u0005\u0017A:o@E(\b!>0\u001a\u0013ү/\u0016_@\b\u0019 Jໂ\b\u0015U7W\f]UdJf\u0003ӕf99ku,mE\\@M\u0010\u0013`ck\u0004,g\u0005Y\u001am-^\u0005,N7}U4pT\u0007\u0016u7C=YM\f/ʫ8Vy\u0019,~n8M,͇\u0014M?Ng4M\u0000t\u0001\u0001$\u000bp`\u001eD\u0004S\rw.\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ȯ9\r\nendstream\rendobj\r950 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 953 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r953 0 obj\r<</BC 954 0 R/G 955 0 R/S/Luminosity/Type/Mask>>\rendobj\r954 0 obj\r[0.0 0.0 0.0]\rendobj\r955 0 obj\r<</BBox[-4.0 23.0 29.0 -4.0]/Group 956 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 957 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n33 0 0 27 -4 -4 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r956 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r957 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 33>>/Filter/FlateDecode/Height 27/Intent/RelativeColorimetric/Length 269/Name/X/Subtype/Image/Type/XObject/Width 33>>stream\r\nH̓;\u000e@\u0010ݸ<bAA PRPQQ \u001e\u0003PI\u0016b\u0005\u0017A:o@E(\b!>0\u001a\u0013ү/\u0016_@\b\u0019 Jໂ\b\u0015U7W\f]UdJf\u0003ӕf99ku,mE\\@M\u0010\u0013`ck\u0004,g\u0005Y\u001am-^\u0005,N7}U4pT\u0007\u0016u7C=YM\f/ʫ8Vy\u0019,~n8M,͇\u0014M?Ng4M\u0000t\u0001\u0001$\u000bp`\u001eD\u0004S\rw.\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ȯ9\r\nendstream\rendobj\r943 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 958 0 R/ShadingType 2>>\rendobj\r958 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[0.0 1.0]/FunctionType 3/Functions[959 0 R]>>\rendobj\r959 0 obj\r<</C0[0.0 0.611765 0.552941]/C1[0.0 0.670588 0.603922]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>\rendobj\r939 0 obj\r<</Filter/FlateDecode/Length 285>>stream\r\nHLRKn0\bs\n.`ġfF]Q\u0017=@N\u0017J3T'<\u0003yxq\u0001_O3fGT\u001e\u001008\u0006t\n/_\b^\u0012ZN\u001b\fo\u001f\u0001o@MGHя/w;8Lvɏb\u0002\nʶ\\P\u0016YS\rW\u0013)vzVP5Jf5\u000b7\\\u000fRV5\u000e\nqU\u0014e2eTR\u000ff\u0016P^|.hW\u0015xɡFf_P$[\u0007\u0015ƞ8;\u0019}\u001a|s>{-ϕUiس.ѡE}J{^7h\u0003o\u000b.\n\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000b@o\t\r\nendstream\rendobj\r940 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r937 0 obj\r<</Filter/FlateDecode/Length 292>>stream\r\nHln \f<_\u0000bS 캴eTm\u001ezi7{6HU`q \u0004~BxN`v{ACAQn|/\u0007\u000f?'?߆\u000b\u001c\f:\u0000\u0002$\u0015\b/\u0002]H@\u0006GݸM`G.r4%ɗ\u0018řW,\b-l\u0005LX?,m/m/RbWa3b\u0015u\u0013r!dZ/r \b\b6-|2Mhs_ͼ\\dQOZyƕ'WOC(l\u00126i2gLkT\u000f!]icrSP1\u000f\u000e\u0000\u0000\u0000\u0000\u0000\u0003\u0000h[\r\nendstream\rendobj\r938 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r816 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 960 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 961 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 72 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 962 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r817 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 963 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 964 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 72 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 962 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r818 0 obj\r<</ArtBox[4.0 4.0 45.0 21.0]/BleedBox[0.0 0.0 50.0 25.0]/Contents 965 0 R/CropBox[0.0 0.0 50.0 25.0]/Group 966 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 25.0]/Parent 72 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r819 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 967 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 968 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 72 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r820 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 969 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 970 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 72 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r969 0 obj\r<</Filter/FlateDecode/Length 277>>stream\r\nHLQ[N\u00031\f)|x<6/[P)\u0012\u0007J%DA-\u001f\\\u001f;$N3v&\u0004n\"L`w\u00129sj\b\\ieN\r$9l\u000f\u0004\u001f!_\u000b\r!s\u0000Y+0\f\u0006'ahB\rc\u0006]Xf\u001c9^T\b=3+`nj{]^8\u0015\u001f\u001ew1G\u0011S*a}js7\r,\u001d48b!\u000f\u000eC`3X\u001dĪ|\\:Z&İ R\u0005҂XqF|;>?ߛ?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000d\r\nendstream\rendobj\r970 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r967 0 obj\r<</Filter/FlateDecode/Length 271>>stream\r\nHTRN0\f}W\u0007عu\tM \u0001\u0015e\u0003m\tڡ'}|rb5M\u0010\u0013f;\u0005BKqK]\u001cA,z_\u0013~$\u0019^\t7)~3\u001d\u001c!s\u0006̱TV\u0005\u0018H\u001e(\u0010|vP\u00199G\tS<3\u000eZ\u001c/[z{1.Є5$6cU+ծ6qztKpR9׾&e\\B`\nQ۞eµ$˃\u0016oV\u000bRzqϘ\u0007\t\u000bT!\u0019 \u001a\u0013g&\u0001~\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000^\u0017f\r\nendstream\rendobj\r968 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r965 0 obj\r<</Filter/FlateDecode/Length 292>>stream\r\nHLRIn0\f\u0015dQeZ)(\u001e\u0000M\u000fN\u0007Jj\r2\u001cjHhq8\u0001_^g\u001eCMQM= `\u001cq\f<\u000b\u0010I\u0018\ng\u001f<0GHя/7\r\u001c{&`\u0011\\@V\u001bJ([Pd+D@X=cZJVa\n\u000f\\T$MzIL.3e\u0018頲WL&7(.y\u0003\u0005<ieg82]\u0015xp99\ncO\u001c͝}\u001akuuIY;6JFKt`OI{\u0016\u0006mm1]\u001f\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005sU\r\nendstream\rendobj\r966 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r963 0 obj\r<</Filter/FlateDecode/Length 293>>stream\r\nHln \f<_\u0000b\u0013 ڴeTm\u001ezi7}i6&\t\u0004\u0013o\f{\u001f;\b\bf`i4t3\b>kyܿ\u0017r{@8?8ֽ\\\u0011vhЅ~\u00032!p?\u000bH\u0002ހ\u0000!lz8]bmp\u0014<1\u001d\\lX\"$_b\u0014g?#L\u0011%gq-JbQ79@kYJm\u0017ª\u0018y=C.\u00048Ɂ  ش凉̗bjEے\u0015庥&\u001bդfXir>&a.o4fF\nr9iKO6\u000bWZ=~/y4\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ʁJ\r\nendstream\rendobj\r964 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r962 0 obj\r<</BBox[-1.0 27.0 26.0 -1.0]/Group 971 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 972 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 973 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 28 -1 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r971 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r973 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 71/Name/X/SMask 974 0 R/Subtype/Image/Type/XObject/Width 27>>stream\r\nHb` \f\u0018a\u0000\u0004$#:-\u0003\"\u0003*\u0003#K\n\fHn\u0004JQ=xE%\u0004/Klx(6\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000*f\u0002#\r\nendstream\rendobj\r974 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 27>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 333/Name/X/Subtype/Image/Type/XObject/Width 27>>stream\r\nHb` \f\u0018\u0019@\u0011C\u0011MWHTBRBT\u0003YGDNCD_CN\u0011./i\u001d\u0016\u001b\u001f\u001bm)\u000e\u0003\b\u0019{%WwO1:XN\u0000*'c\u001cTз|\u0007/+\b2c\u0005K1svG\u000fn6_W\u0019O.}KO}K&)\u00001\tk֭>?:_-a6\u0014\u0013aDߟo0\u0014cg\u0002JqHM;˟ CL%8@R扳>\u0017,듣\u0012%9\tH1\u001038\u001e\u0004\u0014\u0013)x\u0012_\u0002l%6I\u0014\u001b\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000p7'\r\nendstream\rendobj\r972 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 975 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r975 0 obj\r<</BC 976 0 R/G 977 0 R/S/Luminosity/Type/Mask>>\rendobj\r976 0 obj\r[0.0 0.0 0.0]\rendobj\r977 0 obj\r<</BBox[-1.0 27.0 26.0 -1.0]/Group 978 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 979 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 28 -1 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r978 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r979 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 27>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 333/Name/X/Subtype/Image/Type/XObject/Width 27>>stream\r\nHb` \f\u0018\u0019@\u0011C\u0011MWHTBRBT\u0003YGDNCD_CN\u0011./i\u001d\u0016\u001b\u001f\u001bm)\u000e\u0003\b\u0019{%WwO1:XN\u0000*'c\u001cTз|\u0007/+\b2c\u0005K1svG\u000fn6_W\u0019O.}KO}K&)\u00001\tk֭>?:_-a6\u0014\u0013aDߟo0\u0014cg\u0002JqHM;˟ CL%8@R扳>\u0017,듣\u0012%9\tH1\u001038\u001e\u0004\u0014\u0013)x\u0012_\u0002l%6I\u0014\u001b\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000p7'\r\nendstream\rendobj\r960 0 obj\r<</Filter/FlateDecode/Length 277>>stream\r\nHLQN0\f}W\u0007ڹ4+\u001dLBLh\f\u000f`\u0012b\u0007~\u001f;i*s|I:<O0&\u0004~'nh!n!pQ\u00157=\u0010~|}\u001a\u001e\u0004\u001f7\u0017 b)zT*\u0000\u0003bp<\u001cFz\u001b\u0003\f6a\\8*_c\u001c\u0017\u001c\u0011z)@+f%̏:r\u0001ek\u001cɠb\u001d&\u00118K%j[-F\u001d\u0003\u000bs\u0007s43\u001c\u0007!{\u0019c\u0007\u0019ḁcuIsB\f\u000b\nڼit^J\u0010+8\"\u001d\u001f?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0014c\r\nendstream\rendobj\r961 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r811 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 980 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 981 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 71 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r812 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 982 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 983 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 71 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r813 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 984 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 985 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 71 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 252 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r814 0 obj\r<</ArtBox[1.0 0.999985 48.0 24.0]/BleedBox[0.0 0.0 50.0 25.0]/Contents 986 0 R/CropBox[0.0 0.0 50.0 25.0]/Group 987 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 25.0]/Parent 71 0 R/Resources<</ExtGState<</GS0 842 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 988 0 R>>>>/TrimBox[0.0 0.0 50.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r815 0 obj\r<</ArtBox[0.0 0.0 25.0 25.0]/BleedBox[0.0 0.0 25.0 25.0]/Contents 989 0 R/CropBox[0.0 0.0 25.0 25.0]/Group 990 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 25.0 25.0]/Parent 71 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 962 0 R>>>>/TrimBox[0.0 0.0 25.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r989 0 obj\r<</Filter/FlateDecode/Length 272>>stream\r\nHTRKn\u0003!\fs\n_\u0000\u0001Om'i7zQM*؆Lbx0ķ\t~BxNv{BB\u0017X?/>G\u001d'ɏ|FP\b\u0018\rg\u001eHJ\u0000\u0001\"H\u0002\u0019SWї@%!s\u0005\ty0hb\u000b_L<=ҘKq\u0017h`gU~[c-FiѬ\u0016QVG\b')c\u0016\u0019C\nn'\u0013.2,!U0l\tѨ&\u0019p8ɱҢY\u000e}\u001cK(\u001c8WȆIYv,Ӱ\u001fn\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000df\r\nendstream\rendobj\r990 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r986 0 obj\r<</Filter/FlateDecode/Length 307>>stream\r\nHLRN0\f}W\u0007Ɖzt\u000b\u0013@\u0003*\u0018\u000f-h%&ii>\u001c;V\u0011\u00188\"<t%E%u>S}\u0007h{~\u000bxK\u0004<\u0019\u0017\u0018]HFGH\u0016\u0002=`\u001c\u0011@AV\u00146\"k)\fQZ!FVϺ\u0015ʴEX\u0004U&)<\u001d2SVTݳ,MK^(@l1\u0001%Ol\u001d\u0015'j8\u0003o5}p}9{\u0004\u0015ƞ8;\u0018}ꥸ}sꑲ[]ԭ'-r]U]\u001a-i]>.]}\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000|x\r\nendstream\rendobj\r987 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r988 0 obj\r<</BBox[1.0 24.0 48.0 1.0]/Group 991 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 992 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 993 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n47 0 0 23 1 1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r991 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r993 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 23/Intent/RelativeColorimetric/Length 73/Name/X/SMask 994 0 R/Subtype/Image/Type/XObject/Width 47>>stream\r\nHb`\u0000\u0001F\u0001\u0001P(pD'Z5X=\tIR=\n' 1͐\"IM&R*\t%\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000?\u0003\r\nendstream\rendobj\r994 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 47>>/Filter/FlateDecode/Height 23/Intent/RelativeColorimetric/Length 208/Name/X/Subtype/Image/Type/XObject/Width 47>>stream\r\nH1\u000e \u0010E\u0005\u000b\u001bB\u0017;p\u0003D܁XU8\u0002\u001dƸٸN~LfLU  T}\rem\tF\u001b|5R=<䤾lJxۯIg\\Hs\u0014^>&\f1[5\b+pe%:\u001b!ه\u0014a|Zo}_W\f\u001fGyS~ԧa\u0001\u001dU`f\u001dzM[\u0005|'\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000w\r\nendstream\rendobj\r992 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 995 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r995 0 obj\r<</BC 996 0 R/G 997 0 R/S/Luminosity/Type/Mask>>\rendobj\r996 0 obj\r[0.0 0.0 0.0]\rendobj\r997 0 obj\r<</BBox[1.0 24.0 48.0 1.0]/Group 998 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 999 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n47 0 0 23 1 1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r998 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r999 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 47>>/Filter/FlateDecode/Height 23/Intent/RelativeColorimetric/Length 208/Name/X/Subtype/Image/Type/XObject/Width 47>>stream\r\nH1\u000e \u0010E\u0005\u000b\u001bB\u0017;p\u0003D܁XU8\u0002\u001dƸٸN~LfLU  T}\rem\tF\u001b|5R=<䤾lJxۯIg\\Hs\u0014^>&\f1[5\b+pe%:\u001b!ه\u0014a|Zo}_W\f\u001fGyS~ԧa\u0001\u001dU`f\u001dzM[\u0005|'\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000w\r\nendstream\rendobj\r984 0 obj\r<</Filter/FlateDecode/Length 291>>stream\r\nHlMN0\u0010>\\\u001d%\u00056T\u0002\u0003TM\u000bj\u001b8R%3؎}'G\u001eb%%uUBK}OAҾ;:j/vșT\n0ĘgJP\u0006H0\u0017UGc =!\u0015#\u001cdלO\u000bWW挐5\u001cFC+^\u0019*/ʣ\u0005ĈcHD\u0006I=?|\u0001_\u001fg:ҷ (֞\u0010gxJޅffq<aA\u0010JݕyIw\u0016e\u0010|\t՟\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r985 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r982 0 obj\r<</Filter/FlateDecode/Length 275>>stream\r\nHLQN0\f|W\u0007I$tc\u0012bBcH|@\u0005\u0010cxۤ\\rsm\u0001a3\u0005Dsj\u001cxʺ}wb;:8=\u001dl. !\u0018\u0002Nj#]@DA/a<\u001b\u0014mD\u001el\u0019l\u0012uX\"Ujċ_n\u0019Zev.u<XN7u~jd,9=?%\tKDzL\u001dt\u000eBȼ\u001e\u000b1\u00006#sziri\\{}Ҟqa\u001c\u0005ߦ2r*}\u001b?O`\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0013c\r\nendstream\rendobj\r983 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r980 0 obj\r<</Filter/FlateDecode/Length 268>>stream\r\nHTQIn0\f\u0015\u0016J+_㤽4(\u0016\u00036E\u00038.`HpDm\u0012l\u0013ݞ!Z\ttq\t2~Ob|yOp1\u001a\tY\nԚ`)p=\fEv\u0001\u0004&\u00193C\u000e\u0004Y kPb\u0001a\u0010^kHä<bʥ\u001b$+v~al\u0015c?ƕ&,i\u0013(!Z[V^\u0015\u001a(\u001a8b䵲V\u0013\u001f+/goRH%˗Cc}\rux\rbO*p튿73o\u0017ܳ~ϲ\u000b\u0007\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000ܡf9\r\nendstream\rendobj\r981 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r66 0 obj\r<</Count 5/Kids[1000 0 R 1001 0 R 1002 0 R 1003 0 R 1004 0 R]/Parent 59 0 R/Type/Pages>>\rendobj\r67 0 obj\r<</Count 5/Kids[1005 0 R 1006 0 R 1007 0 R 1008 0 R 1009 0 R]/Parent 59 0 R/Type/Pages>>\rendobj\r68 0 obj\r<</Count 5/Kids[1010 0 R 1011 0 R 1012 0 R 1013 0 R 1014 0 R]/Parent 59 0 R/Type/Pages>>\rendobj\r69 0 obj\r<</Count 5/Kids[1015 0 R 1016 0 R 1017 0 R 1018 0 R 1019 0 R]/Parent 59 0 R/Type/Pages>>\rendobj\r70 0 obj\r<</Count 5/Kids[1020 0 R 1021 0 R 1022 0 R 1023 0 R 1024 0 R]/Parent 59 0 R/Type/Pages>>\rendobj\r1020 0 obj\r<</ArtBox[3.5 3.49998 15.7426 15.7426]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1025 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1026 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 70 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1021 0 obj\r<</ArtBox[4.99998 5.4142 14.5858 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1027 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1028 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 70 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1022 0 obj\r<</ArtBox[5.0 5.0 17.0 15.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1029 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1030 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 70 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1023 0 obj\r<</ArtBox[6.0 5.0 14.0 16.5005]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1031 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1032 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 70 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1024 0 obj\r<</ArtBox[4.0 3.99998 45.0 21.0]/BleedBox[0.0 0.0 50.0 25.0]/Contents 1033 0 R/CropBox[0.0 0.0 50.0 25.0]/Group 1034 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 25.0]/Parent 70 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1033 0 obj\r<</Filter/FlateDecode/Length 285>>stream\r\nHLRKn0\bs\n.`ġfF]Q\u0017=@N\u0017J3T'<\u0003yxq\u0001_O3fGT\u001e\u001008\u0006t\n/_\b^\u0012ZN\u001b\fo\u001f\u0001o@MGHя/w;8Lvɏb\u0002\nʶ\\P\u0016YS\rW\u0013)vzVP5Jf5\u000b7\\\u000fRV5\u000e\nqU\u0014e2eTR\u000ff\u0016P^|.hW\u0015xɡFf_P$[\u0007\u0015ƞ8;\u0019}\u001a|s>{-ϕUiس.ѡE}J{^7h\u0003o\u000b.\n\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000b@o\t\r\nendstream\rendobj\r1034 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1031 0 obj\r<</Filter/FlateDecode/Length 201>>stream\r\nHdP\n\u00021\f+\u0007mU<\u0007?`qPt\u0017Q0\tCmn[,=hQfIfɲ\tCU!bP>X\\^\u0011HxԂNM,\f72L~ȕ@\u0011&!i\u001bOt\u001d=2zU<eɐ9HJ->}sXC8qN1\u0016߸\u000e\rJn \b\\si\u0013ʣ\u0018蠑\u001b\u0000\u0000\u0000\u0000\u0000\u0003\u0000x\u0005;\r\nendstream\rendobj\r1032 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1029 0 obj\r<</Filter/FlateDecode/Length 106>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\u00020\u0003f\nE\\\u0006\n\\\n\n\n\nE\\i@ U&@\u0014D\u0002I\t\u0006\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0018\u001a\r\nendstream\rendobj\r1030 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1027 0 obj\r<</Filter/FlateDecode/Length 281>>stream\r\nHDQ;n0\fy\n^2Iǵn)(\u000e=fq\n$?PRbH&|Z\t_^Wn@(~'@a)\u0019)D5b\u0005O\u001fܐ0PK-B¸]0IH5c{Z\u001alr%dR\u001c\u00117\u00109ZXHP\u0003j55eE\u0017+aao3\u0007!\u0007I:PH\rն~ؽ^?Qbymf7Inr 8\u0019+j\u0001l\u0003gȰ`&UqvpŋuSE6\u0002(ƃ-jRb8\u001bL\u0003\u0006%>\u0011t\u0015^ӻX\u001c\u001b\u001f\u0000\u0000\u0000\u0000\u0000\u0003\u0000eu\r\nendstream\rendobj\r1028 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1025 0 obj\r<</Filter/FlateDecode/Length 245>>stream\r\nH|QAN0\f\u0015@\\;JA+!в\u0007\u001eP!8t\u0016/4'dIf\"\u0019^f\u001c3tt\u0018ږ+0m\u0004_ӈL8X2|=p83~\u0015\u0005CPLP\\ȥrzp(bO+\u0004#Q=\u0014ޱm.\u0010&2\u0018r\u0014T.\"ХB\u001as\r\u001b3zY4XENQ\u0016p\r8\u0017Ԗ\u001d=\u00163@\u0019{ 4fM|\n6\\7)N\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u00005T\r\nendstream\rendobj\r1026 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1015 0 obj\r<</ArtBox[6.0 5.0 14.0 17.753]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1035 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1036 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 69 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1016 0 obj\r<</ArtBox[6.0 5.0 14.0 16.5005]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1037 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1038 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 69 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1017 0 obj\r<</ArtBox[5.0 3.0 9.87605 11.0]/BleedBox[0.0 0.0 15.0 15.0]/Contents 1039 0 R/CropBox[0.0 0.0 15.0 15.0]/Group 1040 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 15.0 15.0]/Parent 69 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 15.0 15.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1018 0 obj\r<</ArtBox[1.0 1.0 48.0 24.0]/BleedBox[0.0 0.0 50.0 25.0]/Contents 1041 0 R/CropBox[0.0 0.0 50.0 25.0]/Group 1042 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 25.0]/Parent 69 0 R/Resources<</ExtGState<</GS0 842 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 988 0 R>>>>/TrimBox[0.0 0.0 50.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1019 0 obj\r<</ArtBox[4.0 4.0 45.0 21.0]/BleedBox[0.0 0.0 50.0 25.0]/Contents 1043 0 R/CropBox[0.0 0.0 50.0 25.0]/Group 1044 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 25.0]/Parent 69 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1043 0 obj\r<</Filter/FlateDecode/Length 293>>stream\r\nHLRn0\b\u0015\u001dc\u0013\\N;US> ںCZKN0xt\u0013v)iBx?\u0013\u0007\u0004=\u0001\u000f|\u001d\u001fSB<̈́+t\u001f_\u0001@ ?BG|\u0003{cdi'|/\u0001\u0019ij\teȚl~(-b+Vd\n[Qɬf?y M.1e\u0017p\\ԋ2dkR\u000bĖ\u001aP򤕭Ña^\u0017-'\u001ed\u001furXw0\u0006\u0015ƞ8\u001a\u001c}Ҿ@=Pet9\\WlYU%5(wvC\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000ro\r\nendstream\rendobj\r1044 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1041 0 obj\r<</Filter/FlateDecode/Length 301>>stream\r\nHLRN@\f+\u00033\u0019\u0016s%\u0005.T\u0002\u000f=$gIQ=/V\t0!<\u001dE\f5D5t\u0005>arhDݾ\u0013$8;<\t:<\u000e\u000fp\u0002B}¤U\\'O&+hd\u0005\u0013m$\rc\u001f`Ad+R(k,\u0017܁{XZ-vk9B?\u0002B<LQ4C\u0016XE4̣\r\t)tu1h\u000e\u0005K+\f\u001d\u0005]\rx\u001f\u0012dW\u000eB,Z^Q\u0013\rY7s\u001c)K~ҋrJ-\u0015;j\u0002U5oI{{vc\u001f\u0000\u0000\u0000\u0000\u0000\u0003\u0000wv\r\nendstream\rendobj\r1042 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1039 0 obj\r<</Filter/FlateDecode/Length 170>>stream\r\nH$M\n@\b]`\u001cu~26-]\u0012\u0001B\u0016M!>C\u0019/\u00038\b\u000e\u0001t\u001a]tG+\tl\u0019wC©\u0010νKΟ\u0014WG+\u0014(ܺPżІ\u0016ʮoא%M \\\u0010\n[o0V\r3\u0005c\u001eIs/aܜϾ\u0007M\u000f\u0013\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000*n\r\nendstream\rendobj\r1040 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1037 0 obj\r<</Filter/FlateDecode/Length 189>>stream\r\nHdP\n0\f)\u0002Kꔝ\u001d|\u0007m M@s5\u001e5©\u0015P[&\u001b\u0003jrY;\b5oQad\u001e\tJBB|\u0011y7z\u0007ܡYYK\u0015q\bȖᛪI\u001bL!FAc\u0018\rl\u0004}E\u00002\u001c\u001cS\u0010e\u0000<i\u000e>\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0007r7\u000f\r\nendstream\rendobj\r1038 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1035 0 obj\r<</Filter/FlateDecode/Length 192>>stream\r\nHdP\n\u00021\f+\u0007&}lx\u0012Q\u000f~8?\u001e\u0014df\bn3[\u000fb\u0000-\u000edd\tC8CN\u0019\u000bu'\u0014G\t\u0019;5uYvkVXUG*#^L[z\ncNtnp\u000eRK>ak>\u00073Ȗ\u0010YxH_ԹՀ#\u0019\u0012WyT\f\u001eJ{\u0011[\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000{7\r\nendstream\rendobj\r1036 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1010 0 obj\r<</ArtBox[4.49998 4.5 15.5 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1045 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1046 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 68 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1011 0 obj\r<</ArtBox[1.50664 1.5 8.50664 8.5]/BleedBox[0.0 0.0 10.0 10.0]/Contents 1047 0 R/CropBox[0.0 0.0 10.0 10.0]/Group 1048 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 10.0]/Parent 68 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 10.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1012 0 obj\r<</ArtBox[1.50665 1.5 8.50665 8.5]/BleedBox[0.0 0.0 10.0 10.0]/Contents 1049 0 R/CropBox[0.0 0.0 10.0 10.0]/Group 1050 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 10.0]/Parent 68 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 10.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1013 0 obj\r<</ArtBox[4.49998 4.5 15.5 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1051 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1052 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 68 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1014 0 obj\r<</ArtBox[1.0 1.0 48.0 24.0]/BleedBox[0.0 0.0 50.0 25.0]/Contents 1053 0 R/CropBox[0.0 0.0 50.0 25.0]/Group 1054 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 25.0]/Parent 68 0 R/Resources<</ExtGState<</GS0 842 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 988 0 R>>>>/TrimBox[0.0 0.0 50.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1053 0 obj\r<</Filter/FlateDecode/Length 306>>stream\r\nHLRKN0\f\u0014@8q[ϖ\u000eaF q\u0011\f\u00164%|ڪjyγu4\u0005|8N\b'=Ac\u001fЩ\u0007h{~\u000bxS{Z\u0002\u001e\f\u001fqޯF%ސ0GH_\u0016\u0002=N0^\u000e\b^@\r\u0014\u001aŠPd3Di@U)*GGQa\n|W+I^xs\u0014LJSg\u0007\u0019MnQ\\B\u0005bA\r(yRfpd>g{Ѯfg\u0015]ld!a\u001dT\u0018{hhD՝K\u001aߪl.H\u001b\ruvU5jSֻ\u0006A\u001dxz~dg\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000\ty\b\r\nendstream\rendobj\r1054 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1051 0 obj\r<</Filter/FlateDecode/Length 163>>stream\r\nHP\r0\f{[ M\\H#\u0004WJ\u001f\fPAPe\t;.b\u0005d,\u0012+\u001cp<eй\u0013FQ\u000b\u0005%N7X'\u00100i6H\b\u001d\u0001㋴Utu\u001aR\u000epqˑ\\d(ucLVLf\u0017E|\u0005fxPOVMbŰǵ4b_{\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000A@D\r\nendstream\rendobj\r1052 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1049 0 obj\r<</Filter/FlateDecode/Length 201>>stream\r\nHLPI\u000e0\f\u0015@LL6V=\n\u0007D-V_M( 'x2Xn\u001dV}gt\u0010.P\\\t,r\t\u000f%\"Z\u0003#T׻\u000b\u00132Z\t@Ƅ\r\u0005oP\ru\u0013VV)Câ4II8\u001a\u0019ti1er\r+UV\u0013s[`i^F42i}6\u001cTl\u000e3f\u0018gxPt\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000HC\r\nendstream\rendobj\r1050 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1047 0 obj\r<</Filter/FlateDecode/Length 243>>stream\r\nH\\Qn \f+\u0003vp\\N;ESC? zꤶ/IMy6~\u0006\u0011i\fx8\b\u001fC\u001b\u0004:I\f't\u00188\rjrx@\u001d\u001b\n\u0006\u001dCzlqE@]N\n)pL\u000b\u0016ؼ[V\u0002?0\u0017/s#?ĪQurY\u0019kp\u0014љT\\j\u001f\u0019wc/j/\u0006[,28\n\u0013Yvw+@;\u0016iW^BUߣ~\fO\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000FZ\r\nendstream\rendobj\r1048 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1045 0 obj\r<</Filter/FlateDecode/Length 168>>stream\r\nHPA\u000e0\u0010+\u0003mwBZ\r'b\u000f \u0017I'n[\u0007?`4s\u0003p\fS2%ZQ2z\u001b]\u0010۲j\u0015|云1h\bC\u0018ӓ\u0018\u0014%la^\u0013&/tLOw&˒)C\u001e\u001fA6iMx كF͖~y7\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ToG\r\nendstream\rendobj\r1046 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1005 0 obj\r<</ArtBox[9.99998 16.0 40.0 34.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1055 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1056 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 67 0 R/Resources<</ExtGState<</GS0 156 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1057 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1006 0 obj\r<</ArtBox[9.99998 16.0 40.0 34.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1058 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1059 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 67 0 R/Resources<</ExtGState<</GS0 1060 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1061 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1007 0 obj\r<</ArtBox[2.0 2.0 7.0 48.0]/BleedBox[0.0 0.0 10.0 50.0]/Contents 1062 0 R/CropBox[0.0 0.0 10.0 50.0]/Group 1063 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 50.0]/Parent 67 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1008 0 obj\r<</ArtBox[4.5 4.5 15.5 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1064 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1065 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 67 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1009 0 obj\r<</ArtBox[4.49998 4.5 15.5 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1066 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1067 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 67 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1066 0 obj\r<</Filter/FlateDecode/Length 170>>stream\r\nHPA\u000e \u0010+\u0003\u0014\u0016H1\u0007\u001fhؤ\u000b\u0013\flvvL\bG1N.\u0014\u0017j%\u0003KntBj}_fh0h\u0005a\u0003\u001bLOJcBe95[PnT(\u000b\u0019+䓥)lʶGP\fw\u001a$b\u001dkRB8\\?HQo\u001e\r\u0000\u0000\u0000\u0000\u0000\u0003\u0000G\r\nendstream\rendobj\r1067 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1064 0 obj\r<</Filter/FlateDecode/Length 170>>stream\r\nHPA\u000e \u0010+\u0003\u0014\u0016KhzjL\u00074Z/5i\u00025\u00042!\u00139BwpS'\u000bŅZRr\u001b]$S}_\\'`0h\u0001a\u0003\u001b31o85\u000bPn/\u000b\u0019+䓥)lʶGP\fw%b\u001dR8#6A\u0007\r\u0012.sOo\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0001G\r\nendstream\rendobj\r1065 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1062 0 obj\r<</Filter/FlateDecode/Length 171>>stream\r\nHLO\u000e \u0010W\u000f\u0014v\u000bz\u00154\u001e\u0000I'.f0>@\u000bLS ;\u0005[$)\bI*M\u0003wz\u001d}F'\u0001rc\u001a>\u0018I5iB\u0016Lĸ6;Zň\u001c\n'b){Ӫ);TS&y\u0016\u0011kߴu\u001c\u0011O=\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00003\r\nendstream\rendobj\r1063 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1058 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!)\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\u0012*\r\nendstream\rendobj\r1059 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1061 0 obj\r<</BBox[10.0 34.0 40.0 16.0]/Group 1068 0 R/Length 194/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.173 0.243 0.314 rg\n/GS0 gs\nq 1 0 0 1 38 16 cm\n0 0 m\n-26 0 l\n-27.105 0 -28 0.895 -28 2 c\n-28 16 l\n-28 17.105 -27.105 18 -26 18 c\n0 18 l\n1.105 18 2 17.105 2 16 c\n2 2 l\n2 0.895 1.105 0 0 0 c\nf\nQ\n\r\nendstream\rendobj\r1068 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1060 0 obj\r<</AIS false/BM/Normal/CA 0.0800018/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.0800018/op false>>\rendobj\r1055 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!)\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\u0012*\r\nendstream\rendobj\r1056 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1057 0 obj\r<</BBox[10.0 34.0 40.0 16.0]/Group 1069 0 R/Length 190/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0 0.612 0.553 rg\n/GS0 gs\nq 1 0 0 1 38 16 cm\n0 0 m\n-26 0 l\n-27.105 0 -28 0.895 -28 2 c\n-28 16 l\n-28 17.105 -27.105 18 -26 18 c\n0 18 l\n1.105 18 2 17.105 2 16 c\n2 2 l\n2 0.895 1.105 0 0 0 c\nf\nQ\n\r\nendstream\rendobj\r1069 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1000 0 obj\r<</ArtBox[9.0 9.0 41.0 41.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1070 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1071 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 66 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1001 0 obj\r<</ArtBox[9.0 9.0 41.0 41.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1072 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1073 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 66 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1002 0 obj\r<</ArtBox[9.0 9.0 41.0 41.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1074 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1075 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 66 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1003 0 obj\r<</ArtBox[9.0 9.0 41.0 41.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1076 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1077 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 66 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1004 0 obj\r<</ArtBox[9.0 9.0 41.0 41.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1078 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1079 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 66 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1078 0 obj\r<</Filter/FlateDecode/Length 129>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C!40Q(Jw\u000f6PH/*T\u0000\n\u0002\t\u0018%*rsta\u0011\u0006JA\u0019\b\u0011T1\u0005c\u0018 ц\u0010\u001aDe@T\u0002\u0010\u0015rq\u0005B\\\u000e\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000K'\r\nendstream\rendobj\r1079 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1076 0 obj\r<</Filter/FlateDecode/Length 227>>stream\r\nH<QI\u000e0\f\u0015@ ki\u0013P\u000f}@\u0003T_\u0000\nG\u0016ò</\u001dµPf2>'w}\u0013BnHP\u001e\u001e\u001f,(\u001cBn1\u0012Y8\u000bIrSU\u0014\t\u001d\u0015\u001c\f\u0019\u0013\u0018;e޴{9\tx㣂%2\"\u0011m\u0003hT\u0014\u0006JN\u0013Yh.1AW\u0017ڣưMY{j7\f_\f\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000GN\r\nendstream\rendobj\r1077 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1074 0 obj\r<</Filter/FlateDecode/Length 227>>stream\r\nH<QI\u000e0\f\u0015@ ki\u0013P\u000f}@\u0003T_\u0000\nG\u0016ò</\u001dµPf2>'w}\u0013BnHP\u001e\u001e\u001f,(\u001cBn1\u0012Y8\u000bIrSU\u0014\t\u001d\u0015\u001c\f\u0019\u0013\u0018;e޴{9\tx㣂%2\"\u0011m\u0003hT\u0014\u0006JN\u0013Yh.1AW\u0017ڣưMY{j7\f_\f\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000GN\r\nendstream\rendobj\r1075 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1072 0 obj\r<</Filter/FlateDecode/Length 147>>stream\r\nHTO1\u000e0\u0010\u0015@ɥh\u0012\u0010S\u0010O@P\u0006:P/kR(v|\u001e\u001cwJp}R\tr\t.[>[i\u000716Mi\u0010w(\u0015G:=GJ\u0015\u0016U\u0011\u0012.j\u0011b\u0013v\u0015&w9jFVl\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u000090p\r\nendstream\rendobj\r1073 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1070 0 obj\r<</Filter/FlateDecode/Length 139>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\u000241\u0007\u0016\nE\\\u0006\n\\\n@) 4T0\u0001\\.\u00107K\u0017$åk\f4P\n0F,\u0018\u00006 *\u0003\u0002\r\u0014(++\u0004\u0010\u0003\u00141\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000,\u001b\r\nendstream\rendobj\r1071 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r54 0 obj\r<</Count 25/Kids[1080 0 R 1081 0 R 1082 0 R 1083 0 R 1084 0 R]/Parent 52 0 R/Type/Pages>>\rendobj\r55 0 obj\r<</Count 25/Kids[1085 0 R 1086 0 R 1087 0 R 1088 0 R 1089 0 R]/Parent 52 0 R/Type/Pages>>\rendobj\r56 0 obj\r<</Count 25/Kids[1090 0 R 1091 0 R 1092 0 R 1093 0 R 1094 0 R]/Parent 52 0 R/Type/Pages>>\rendobj\r57 0 obj\r<</Count 25/Kids[1095 0 R 1096 0 R 1097 0 R 1098 0 R 1099 0 R]/Parent 52 0 R/Type/Pages>>\rendobj\r58 0 obj\r<</Count 25/Kids[1100 0 R 1101 0 R 1102 0 R 1103 0 R 1104 0 R]/Parent 52 0 R/Type/Pages>>\rendobj\r1100 0 obj\r<</Count 5/Kids[1105 0 R 1106 0 R 1107 0 R 1108 0 R 1109 0 R]/Parent 58 0 R/Type/Pages>>\rendobj\r1101 0 obj\r<</Count 5/Kids[1110 0 R 1111 0 R 1112 0 R 1113 0 R 1114 0 R]/Parent 58 0 R/Type/Pages>>\rendobj\r1102 0 obj\r<</Count 5/Kids[1115 0 R 1116 0 R 1117 0 R 1118 0 R 1119 0 R]/Parent 58 0 R/Type/Pages>>\rendobj\r1103 0 obj\r<</Count 5/Kids[1120 0 R 1121 0 R 1122 0 R 1123 0 R 1124 0 R]/Parent 58 0 R/Type/Pages>>\rendobj\r1104 0 obj\r<</Count 5/Kids[1125 0 R 1126 0 R 1127 0 R 1128 0 R 1129 0 R]/Parent 58 0 R/Type/Pages>>\rendobj\r1125 0 obj\r<</ArtBox[8.5 4.49997 13.5 15.5]/BleedBox[0.0 0.0 21.0 20.0]/Contents 1130 0 R/CropBox[0.0 0.0 21.0 20.0]/Group 1131 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 21.0 20.0]/Parent 1104 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 21.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1126 0 obj\r<</ArtBox[4.58313 5.93767 15.4169 14.0623]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1132 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1133 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1104 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1127 0 obj\r<</ArtBox[7.0 5.93529 14.0647 13.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1134 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1135 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1104 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1128 0 obj\r<</ArtBox[8.0 8.0 13.0 11.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1136 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1137 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1104 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1129 0 obj\r<</ArtBox[9.0 9.0 41.0 41.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1138 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1139 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1104 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1138 0 obj\r<</Filter/FlateDecode/Length 146>>stream\r\nHTO1\u000e0\u0010\u0015@ɥ԰\u0012\u0010S\u0010O@P\u0006:P/kR(v|\u001e\u001cwp}V\u0019r\tXXI\u0018;.a\u001a\u001d/-/p\u0011繎bQ\u001a҄/sUEZ\u00176z]\u0005g]άM\u0011kdv\u0017?\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r0g\r\nendstream\rendobj\r1139 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1136 0 obj\r<</Filter/FlateDecode/Length 182>>stream\r\nH4\u000e \f}J\u000bi<-f\u0003\u0010݅lb\u0007M`#id<_FbjIji\u0003F[Nw\u0013?$#S/龀=\u0018/l(\u001a\"\u0014C<aQZ\u0014sݠ\u0010mc!\u0016LOTrK,>`\u001bu6j֗y\u001fCm.XL\u00124Vɕ:%\u0012a?1\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000G7X\r\nendstream\rendobj\r1137 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1134 0 obj\r<</Filter/FlateDecode/Length 167>>stream\r\nH\\OI\n0\f\u0015@dK\\㖞B\t=\u0001ͩڑ\tX\u0006\bkB3&\u0010c\u0006\u0002ݫw{\u001d$ɋ-`.7\u0003+\nr>[\u001f'ƈ\u000b^\u0011\u0014\n]&G?\t;w1é\u001d1}V]=?IGnӖ'L\t\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001b4\r\nendstream\rendobj\r1135 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1132 0 obj\r<</Filter/FlateDecode/Length 129>>stream\r\nH,\n0\u0010D\u0015\u0003nvIMR\u0010h?CCw%2<\u0006&+T\u0005åGhH\u001b\u0012VM\u0010N\u001a\u001c)bu|?΂CWq)2b{;wxm\u001b\u0019p2p\u0004cLv\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000C\u001c&\r\nendstream\rendobj\r1133 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1130 0 obj\r<</Filter/FlateDecode/Length 368>>stream\r\nH\\N0\fy\n\u0000Mre N\u00138\u0000\u0015C\u0012C/qN\u0003\u0003Ӂ\u0011fSҧ)\u0013zp\b\u001dxHe\"\u001erѬt;\u0013$x\u001a(͗`|\t\u000f<ppQϬ\u000e5\u0019Hق#\u0003w\u001fƣ0N\tY\u0004e7Sh[\u0013Nl\fq\\:ŃbмJf˔\u001di\u0001ũ\u0012Dl\u0016-{j#vZB\u000eJ\u0017E9|ӟ>֡!_3U{3EPɴ\u000bsipU_N.yCH~`㸧7,q.n\u0013Bmn5M\u0010C]qj}ctVGkb8%}=Lj쩗5z\t_kOlM(/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000/u\r\nendstream\rendobj\r1131 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1120 0 obj\r<</ArtBox[4.0 2.99988 17.0001 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1140 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1141 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1121 0 obj\r<</ArtBox[2.0 2.0 48.0 3.0]/BleedBox[0.0 0.0 50.0 5.0]/Contents 1142 0 R/CropBox[0.0 0.0 50.0 5.0]/Group 1143 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 5.0]/Parent 1103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 5.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1122 0 obj\r<</ArtBox[2.0 2.0 3.0 48.0]/BleedBox[0.0 0.0 5.0 50.0]/Contents 1144 0 R/CropBox[0.0 0.0 5.0 50.0]/Group 1145 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 5.0 50.0]/Parent 1103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 5.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1123 0 obj\r<</ArtBox[7.5 4.49997 12.5 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1146 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1147 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1124 0 obj\r<</ArtBox[7.5 4.49997 12.5 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1148 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1149 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1103 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1148 0 obj\r<</Filter/FlateDecode/Length 366>>stream\r\nH\\MN\u00031\f9/l)U*\u0016\u001c`\u0004e1Ejĳ3\":_yN\u0003\u0003Ӂ\u0011fKҗ\u0001ۇ{oS\rB-ng71ܕ\u0010#T)N%rq\u0017\u0013\nW9\u0019Ԡ \u0016Mi'\u0012a,\u000bo1)V\u0000\u0014Օj\u001brq\"P\u0013k:.q[CbYJ.R4LF+\n\n\u0010{\u0016hhu:(^4e{\u0016NX\u000fI\r3>L.mb0\u001b\rE-k\u001d6N&yC\u0011O~`c?+\u0016]vׅO4gWk&uem8y\u001a'C\u001dh\nE1\u0007\u001a>HZzm\u0015u\u0002\u0017LU(\u000f_6q/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003%\r\nendstream\rendobj\r1149 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1146 0 obj\r<</Filter/FlateDecode/Length 366>>stream\r\nH\\KN\u00031\f9/@;[\nbU\u0005\u0007\u0018AYLZ/ߙ\":_G~끦@f\u001aK2)A\u000fNߎ}\u0006[BM/oL\u001fw%!GQ5|q{`ϡ\u000b'\u0017Me\u0006-\u0002$ь \u0019:BV_R}5\u0016o1)jյRʲU\u00072\u0012\u001aGo=RƉU\u001d״ij\u0002uIJ0\u001b-J4\"6_\u0016=Yi\u0010\u001b-nTWW=t?s$y\fSd\be]ņvm/87\u001d\u0004\u0015;<\u001d\u000b}\"c\u001fg5͸I-\u0014>\u0012\u0004q6@s\u0012iaҚU-\u0010#\u0016zqay)\u000f\u0017\rK~\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000  \r\nendstream\rendobj\r1147 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1144 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\u000241\u0007\u0016\nE\\\u0006\n\\F\nF\n\n&f\nE\\i\u0010\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001d\u0010\r\nendstream\rendobj\r1145 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1142 0 obj\r<</Filter/FlateDecode/Length 101>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\u000241\u0007\u0016\nA\\\n^@u\u0006\n\\\n@y 4T03\u0005\\.@.)\n\n\u0018\r\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000˲\u0015\r\nendstream\rendobj\r1143 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1140 0 obj\r<</Filter/FlateDecode/Length 199>>stream\r\nHLPA\u000e \u0010+\u0003,\u000b\u0014lVɘƃ\u000fh?q\u0017%\u000bd\u00196[3\u001eO=*\u0016\u0015j\u0001F>oi\u0006\t8}`A!\u001c:,gqV\u0003`\u0002Ŷ\u0011h\u0012EɣNn\u000b6Bbe\u0005uH\u001fagja\u0015Pnoi\t2A \u000e¨@M\u0005\u0016{\u001dElJ\u001f:NJh*b\u001c /\u0018\u0007\u000f\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000}F\r\nendstream\rendobj\r1141 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1115 0 obj\r<</ArtBox[4.0 2.99994 17.0001 16.0001]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1150 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1151 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1102 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1116 0 obj\r<</ArtBox[4.0 2.99988 17.0001 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1152 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1153 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1102 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1117 0 obj\r<</ArtBox[4.0 2.99988 17.0001 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1154 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1155 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1102 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1118 0 obj\r<</ArtBox[4.0 2.99988 17.0001 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1156 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1157 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1102 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1119 0 obj\r<</ArtBox[4.0 2.99988 17.0001 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1158 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1159 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1102 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1158 0 obj\r<</Filter/FlateDecode/Length 224>>stream\r\nH<QI\u000e0\f\u0015@Ҫ'T\u001e\u0000\u0003T_\u0000\nɌ&c{\"{E\u0012/-µ\u0012gi\u0001`_W5I\t\u0011ۃp\"bHa\u0002\u0002\u0013We\u0012X4\u0000Y316V84Q\u0018\f'*\u001eh=\u0006tRcx+wXJAmͩT\u0013$X_5`歍ث;w:\n,%\u001a\u0004\u001br\u0014'\u0003oO\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003?L\r\nendstream\rendobj\r1159 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1156 0 obj\r<</Filter/FlateDecode/Length 251>>stream\r\nHTQA \f\u0015\u001d\u0003\tkӪhUa\u001f\u0010ԕ6`&ff\u00181̂ӌp^\fj\u0001|\r_\u000b9f\u0006S\u0007\u000ft(:\u001c:\t\u000eֹ\u0003\u0005\u000e\u001acv\u0006\"K.[\u001bys7F\u00154}3\u000f\\5\\\nxzH\u0016=-֔\u0012KӒ笻\u0015[xU*J)Z鉝AΪA\u0013\u0004\fNF\f<F_a\u0017yRNcr\u0010Z\u0011SgӋvi\u000f\u0000\u0000\u0000\u0000\u0000\u0003\u0000]cH\r\nendstream\rendobj\r1157 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1154 0 obj\r<</Filter/FlateDecode/Length 245>>stream\r\nH\\QAn\u0003!\f\u0015Y\u0003df[\u0014UQ\u000e})_\u0018F,f\u001eG0|.<\u001c\u0016~@\u0018jԕC\u0004M_K\u0019qY|;qR>(ay&,s!.j\u0006\r$^\tG.)\u0004TQ\u001bZ\u0013\u000f\u001d_L\u001cLX\u001c\u0004Q؂91V\u0005mcցh~Z'v\u0002nU͙\u0002\u001cDq68\u001911\nk{M4f(2/%\u001dQ~d\"Oy#=\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000^\r\nendstream\rendobj\r1155 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1152 0 obj\r<</Filter/FlateDecode/Length 298>>stream\r\nHLRn \f+\u0003!6$\u0001Ka\u001f@+!i_\u001ex\\\t\u000e+Qn@\u001dd\u001b@./\u0019_\u0019Ə/?ܐa\u0018܌\u0002y]\tIs\n\u0018̲jL.ŌRz\u001a*-3\u0014ȝ\u001ajR\u001f\u001fe\u0015_8\u0014DKS]\u0001O$./6_4&̓a2`P/#2p@!P,V(8\n\u0004%\u001a\u0018Ɍ(\u00124+Z@'\u001b\u0016m띚\u001c\\mgC\u001b\f,\u0005*\u00126doh_\u0004\u000f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000r)\r\nendstream\rendobj\r1153 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1150 0 obj\r<</Filter/FlateDecode/Length 289>>stream\r\nHLRn \f+\u0003!\u0018kӪU\u001f\u0010\u0003[i/c\b[%\u00133\u001e\u000f(i14$t#A>KQX\"\u0017\u001a_=_~ƺͼ_\tW\u001aEBI$HX;\u0019̺J\u0002̭K\u0002$VB(\u000777r-ƫge|\u0017y5/5?l[\tśi0»ziHZ\u0006\"H;y˅oΏShAcMf\u001c\njKg\u0000Z3\u0000&$.H\u00075{ܡ\tTސ{A\u0002\u0015+ؐP/~3\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000zn\r\nendstream\rendobj\r1151 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1110 0 obj\r<</ArtBox[2.99994 7.0 15.0 13.0]/BleedBox[0.0 0.0 19.0 20.0]/Contents 1160 0 R/CropBox[0.0 0.0 19.0 20.0]/Group 1161 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 19.0 20.0]/Parent 1101 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 19.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1111 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1162 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1163 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1101 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1112 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1164 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1165 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1101 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1113 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1166 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1167 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1101 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1114 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1168 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1169 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1101 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1168 0 obj\r<</Filter/FlateDecode/Length 198>>stream\r\nH\\P\u000e0\f+\u000fu\u001b\fv\u0015\r\t1\u000f ELo\u0007tmeTB%c/AZ^ZfiİIħ+] V\u000b`UԓZF\u0011\u0006,f`\u0018)b5Pc \u0007\u0013/\u001e\u001dI\n06LX\b+]\u0018\u001b5%\u0015QT\u001c\u0015YD\u0011\u001bU9SiI󊣚\u0018ʞ-ګ\u00102\u0007`/k\r\u0000\u0000\u0000\u0000\u0000\u0003\u0000)\u000f?\u0007\r\nendstream\rendobj\r1169 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1166 0 obj\r<</Filter/FlateDecode/Length 195>>stream\r\nH\\PK\u000e@\f\u0014\u0002\f\u000f\u0003\u0015\r\t1\u0003\u0010e#&\u0001Qb:6/JuKС.^\u0018f~t\u000b\u001e*\u0014\u000e8V-\b\r\u0016\fn\rXe9Hx\u0018僎GG<0F&~e,\u000bz0ZG7jDB<,\u0015\u0019D\u0011\u001b]9U.yQOwjҖU\b#o5\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000A\u0014?\r\nendstream\rendobj\r1167 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1164 0 obj\r<</Filter/FlateDecode/Length 200>>stream\r\nHP1\u000e0\f@R!iRP\n\u000e<\"\u0004H-\u0003I*``@q|wjdmXojж%$h\"F\u001eCɞtXl\u0005֥Y#eM\u0018\u001f4e\u0019\u0018\u000f\u0018n\u0014ʐXѾ,\u0012\u0003*54&W\u000eM9\u0017$Ѣ(ʒ\u0017Z\"p\u0014\u000bOjW}(̥,,zP(/&@\u0017\u001d\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\nEa\r\nendstream\rendobj\r1165 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1162 0 obj\r<</Filter/FlateDecode/Length 198>>stream\r\nHP\u000e0\f\u0015\u0003Iϕ:Ut\u0003*(B28I\u0005\u001d\u0018Pl'>N}\r֌Ͷ\u0006Z)&B6B\u00131\u0010Jr>\u0011\u000fb])u\u001e4=c|\u0004\u000bcasXp'v։\u0002*_b UŁ6ɓP\u0005k\u0014hQ(pN,\u0012sd9opeQL98(O\u0004/^񯐇\\/rg;z\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000yjF\r\nendstream\rendobj\r1163 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1160 0 obj\r<</Filter/FlateDecode/Length 314>>stream\r\nH\\Kn\u00031\b\u000b\u0007<mZu\u0015UQ\u0017=M\u0017JI/\u0015p\u00129%\u00076f~\u0011>=\u0010^j\u001e\u001e:\u0003a$䆓'|\u000fP`\u0016 \u001cr\u000bgd$]\rKH\u0004]ӝ\u0018u\u0013h\u0006Waj\u001cq3R\u0015DTHb9\t=c\u0015\u0010+֜-\u0017\u001dBK\u0016\u001cO>\u0016\u0019\u000f=068u>[+|aBeodD\fsva\u0003U\r+=Q옵bpN]Ǯ`Ѧ'SʬPJ󈄔36߿\u001fFMeM\u0010X.\u00056v\u0001<\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ȼ\r\nendstream\rendobj\r1161 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1105 0 obj\r<</ArtBox[9.99998 15.0 40.0 35.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1170 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1171 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1100 0 R/Resources<</ExtGState<</GS0 156 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1172 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1106 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1173 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1174 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1100 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1107 0 obj\r<</ArtBox[4.0 4.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1175 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1176 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1100 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1108 0 obj\r<</ArtBox[0.0 0.0 20.0 20.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1177 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1178 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1100 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1179 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1109 0 obj\r<</ArtBox[0.0 0.0 20.0 20.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1180 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1181 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1100 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1182 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1180 0 obj\r<</Filter/FlateDecode/Length 266>>stream\r\nHTRAn \u0010+\u0003\u0002\u0003:i/\u0000ɭ_,\b\fÀfvYi?3\u001d\b|M]H8`^t/?\u0014?^*\u0013i>^JJgŎ\u001c146J\u00064\u0013\u0007;e`ⅰR\u0018>B@o\u0014aqܣ)\u0011ӃQ\u00027pkͨVA)Fځ&['v\u0002n;:V\u00058VbR8*1a\n\u0015\u0002\u001diP\u000e\u00172)\u0011Mo:;\blV\u0013\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000Jh\r\nendstream\rendobj\r1181 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1182 0 obj\r<</BBox[-2.0 22.0 23.0 -3.0]/Group 1183 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1184 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1185 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n25 0 0 25 -2 -3 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1183 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1185 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 25/Intent/RelativeColorimetric/Length 64/Name/X/SMask 1186 0 R/Subtype/Image/Type/XObject/Width 25>>stream\r\nHb` \u0000\u0018a\u0000(\u001c#:%\u000e\"\u000e!Y\u00028HfHP1p\u0007\u0018\u001dS\t6\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000,l\u0001\r\nendstream\rendobj\r1186 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 25>>/Filter/FlateDecode/Height 25/Intent/RelativeColorimetric/Length 292/Name/X/Subtype/Image/Type/XObject/Width 25>>stream\r\nH?@\u00183:N3\u0004\u0003\u0016ւ#Lڤ\u0012+\u000f\u0003x\u0003\u000b\u000b3ئ\u0014KO`'IBq%,˲1}[\u0011\u0000\"\u0000~P(H\u00167\u0006F\r]\u0010,A#Y\u001ew\u0011&_G/~_7\u0001\u00121\u000f44K(\u0007H\u0000b9ߒ(ȓ0\\\u0002\"0M۵M}OB\"\"\u0000yk(g?Ϯ#joe\u0006\u0004q<^4\u001eM\u0011_*\u0012\u0018Pm?<m']Y\u00006 ab`\u001a*\u000b\\\u0003\u0015w\u000e]q s\u000f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00005r\r\nendstream\rendobj\r1184 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1187 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1187 0 obj\r<</BC 1188 0 R/G 1189 0 R/S/Luminosity/Type/Mask>>\rendobj\r1188 0 obj\r[0.0 0.0 0.0]\rendobj\r1189 0 obj\r<</BBox[-2.0 22.0 23.0 -3.0]/Group 1190 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1191 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n25 0 0 25 -2 -3 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1190 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1191 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 25>>/Filter/FlateDecode/Height 25/Intent/RelativeColorimetric/Length 292/Name/X/Subtype/Image/Type/XObject/Width 25>>stream\r\nH?@\u00183:N3\u0004\u0003\u0016ւ#Lڤ\u0012+\u000f\u0003x\u0003\u000b\u000b3ئ\u0014KO`'IBq%,˲1}[\u0011\u0000\"\u0000~P(H\u00167\u0006F\r]\u0010,A#Y\u001ew\u0011&_G/~_7\u0001\u00121\u000f44K(\u0007H\u0000b9ߒ(ȓ0\\\u0002\"0M۵M}OB\"\"\u0000yk(g?Ϯ#joe\u0006\u0004q<^4\u001eM\u0011_*\u0012\u0018Pm?<m']Y\u00006 ab`\u001a*\u000b\\\u0003\u0015w\u000e]q s\u000f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00005r\r\nendstream\rendobj\r1177 0 obj\r<</Filter/FlateDecode/Length 312>>stream\r\nHLRKN0\f\u0014@S;idK\u00070B#8@\u0005\"\u0005p\tI;yQ\u0019Lp\u0011\u001er55t\u0001Boo'v\u000f`FxK\u0012\u001e~\u0004r\u001aJ #\u00181\u0011\u0015s]\tuٱ\n\u00160JL.Ō\n-o:,[bJm|\u0014[\u001bLI\nKCS䦀\u0007GD;\u0019Z/;&7a% ZKClVq@in\u00012_Tz,\u0010iQWpL&D;ZF^i)\ntox뫤m{S[WU[{A@W\r\u000bb\u0017;?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00006-w\r\nendstream\rendobj\r1178 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1179 0 obj\r<</BBox[-2.0 22.0 23.0 -3.0]/Group 1192 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1193 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1194 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n25 0 0 25 -2 -3 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1192 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1194 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 25/Intent/RelativeColorimetric/Length 62/Name/X/SMask 1195 0 R/Subtype/Image/Type/XObject/Width 25>>stream\r\nHb`\u0007\u0018Q\u0001\u000ea\u0014\u0016q\fVq\u0012%pSUtW\r5\t\u0011[\u0002gN%\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000j\u0001\r\nendstream\rendobj\r1195 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 25>>/Filter/FlateDecode/Height 25/Intent/RelativeColorimetric/Length 378/Name/X/Subtype/Image/Type/XObject/Width 25>>stream\r\nHb`\u0007\u0018\u0019\u0010\u0011.\t\u0001\u001cL\u0010)Ff6n\u0001\u0011qI)\u0010\u0014\u0017\u0011bcf\u0004I\u001a[XX\u0019(1$Xyt\u001c\u0002\u0012#}mĸ@Z9E3\u001a&̘\u0003\u0004T%*\t120Zĵ-qǏ\u001d<WG\th\u0012sW\u001e<y6D\u001as%T˖yo߾{`z$'POɥh\u0017Gg'YH\u0001%\u0018y\u0014\u001cr}~{z|N2T[&c\u0018\u0012L\\VN<!)e</`4K~/b`\u00107|cT00V|\u0000\fl\u0002J\tU=g\u00150عl|#CGLI\b#>@1ȅ-\u0006q9T\u001d\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0015\u0013[\r\nendstream\rendobj\r1193 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1196 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1196 0 obj\r<</BC 1197 0 R/G 1198 0 R/S/Luminosity/Type/Mask>>\rendobj\r1197 0 obj\r[0.0 0.0 0.0]\rendobj\r1198 0 obj\r<</BBox[-2.0 22.0 23.0 -3.0]/Group 1199 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1200 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n25 0 0 25 -2 -3 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1199 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1200 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 25>>/Filter/FlateDecode/Height 25/Intent/RelativeColorimetric/Length 378/Name/X/Subtype/Image/Type/XObject/Width 25>>stream\r\nHb`\u0007\u0018\u0019\u0010\u0011.\t\u0001\u001cL\u0010)Ff6n\u0001\u0011qI)\u0010\u0014\u0017\u0011bcf\u0004I\u001a[XX\u0019(1$Xyt\u001c\u0002\u0012#}mĸ@Z9E3\u001a&̘\u0003\u0004T%*\t120Zĵ-qǏ\u001d<WG\th\u0012sW\u001e<y6D\u001as%T˖yo߾{`z$'POɥh\u0017Gg'YH\u0001%\u0018y\u0014\u001cr}~{z|N2T[&c\u0018\u0012L\\VN<!)e</`4K~/b`\u00107|cT00V|\u0000\fl\u0002J\tU=g\u00150عl|#CGLI\b#>@1ȅ-\u0006q9T\u001d\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0015\u0013[\r\nendstream\rendobj\r1175 0 obj\r<</Filter/FlateDecode/Length 195>>stream\r\nH\\P\u000e0\f)\u0017`t\u001bLv\u0015\r\t1\u0007 ELo\u000bt[c.\u0019]\tע9e@\f7Dx3\u001e&:\u0007\u000baQZۓ\u0006MXXF'zJ\u001cM\u0002\tѪ\u0013Б8>\bI\u001b/a_\u0006ttF_2yQ\u001e\u001c^B\u0015\r7YQ\u000b;2g\u000eWia\r\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001b>\r\nendstream\rendobj\r1176 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1173 0 obj\r<</Filter/FlateDecode/Length 197>>stream\r\nHP\u000e0\f\u0015\u0003yiRP\n\u0015\u0006>\"\u0004H-\u0003T✓bl\u001bX\u001bЦc0r§P#\u001dp'kG2b|$$/\u0007\u0017,\u001bUP\u0005\u001d\\`\u0017\u001d\u0012*.1sοhyar[\u0012%Y6ܖ\u001bl\u0012'uQU!x_cY̥\u0002\u0002Ck\u000b\u0011Jl~\u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000*bD\r\nendstream\rendobj\r1174 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1170 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!)\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\u0012*\r\nendstream\rendobj\r1171 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1172 0 obj\r<</BBox[10.0 35.0 40.0 15.0]/Group 1201 0 R/Length 35/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\n40 15 -30 20 re\nf\n\r\nendstream\rendobj\r1201 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1095 0 obj\r<</Count 5/Kids[1202 0 R 1203 0 R 1204 0 R 1205 0 R 1206 0 R]/Parent 57 0 R/Type/Pages>>\rendobj\r1096 0 obj\r<</Count 5/Kids[1207 0 R 1208 0 R 1209 0 R 1210 0 R 1211 0 R]/Parent 57 0 R/Type/Pages>>\rendobj\r1097 0 obj\r<</Count 5/Kids[1212 0 R 1213 0 R 1214 0 R 1215 0 R 1216 0 R]/Parent 57 0 R/Type/Pages>>\rendobj\r1098 0 obj\r<</Count 5/Kids[1217 0 R 1218 0 R 1219 0 R 1220 0 R 1221 0 R]/Parent 57 0 R/Type/Pages>>\rendobj\r1099 0 obj\r<</Count 5/Kids[1222 0 R 1223 0 R 1224 0 R 1225 0 R 1226 0 R]/Parent 57 0 R/Type/Pages>>\rendobj\r1222 0 obj\r<</ArtBox[12.0 11.0 87.0 30.0]/BleedBox[0.0 0.0 100.0 40.0]/Contents 1227 0 R/CropBox[0.0 0.0 100.0 40.0]/Group 1228 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 40.0]/Parent 1099 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 1229 0 R>>>>/TrimBox[0.0 0.0 100.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1223 0 obj\r<</ArtBox[12.0 11.0 87.0 30.0]/BleedBox[0.0 0.0 100.0 40.0]/Contents 1230 0 R/CropBox[0.0 0.0 100.0 40.0]/Group 1231 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 40.0]/Parent 1099 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 1232 0 R>>>>/TrimBox[0.0 0.0 100.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1224 0 obj\r<</ArtBox[12.0 11.0 87.0 30.0]/BleedBox[0.0 0.0 100.0 40.0]/Contents 1233 0 R/CropBox[0.0 0.0 100.0 40.0]/Group 1234 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 40.0]/Parent 1099 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 1235 0 R/Sh1 1236 0 R>>>>/TrimBox[0.0 0.0 100.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1225 0 obj\r<</ArtBox[9.99998 15.0 40.0 35.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1237 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1238 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1099 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 160 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1226 0 obj\r<</ArtBox[9.99998 15.0 40.0 35.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1239 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1240 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1099 0 R/Resources<</ExtGState<</GS0 156 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1241 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1239 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!)\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\u0012*\r\nendstream\rendobj\r1240 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1241 0 obj\r<</BBox[10.0 35.0 40.0 15.0]/Group 1242 0 R/Length 35/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0 0 0 rg\n/GS0 gs\n40 15 -30 20 re\nf\n\r\nendstream\rendobj\r1242 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1237 0 obj\r<</Filter/FlateDecode/Length 111>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!BQ*WB\u001ePT=@!\u000b(\f iK=K\u001007T02UHrP\u000f0P(PpP\b\u001e\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000rL\u0018g\r\nendstream\rendobj\r1238 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1233 0 obj\r<</Filter/FlateDecode/Length 257>>stream\r\nHtQn\u0003!\f\u0015\u0000iF9EUCЭ\u0014\u001aC6(Q3y&\u000b\těi\u00146(\u00184RƆmՑƆ\u0010\u001f]Z0O׮X'9\u0016o*\u0005\u001drv\u0001#kb\u000eG\u001b:>\u0017D:kU\u000byp[p: 1\u0016\u0016Q=z\u00129z\u00109\u001e8Zs\u0002C-\b\u001fm\u0015PF0NܪH\u000bV\u001b3+\rr-a6-E.?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0017j\r\nendstream\rendobj\r1234 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1235 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 1243 0 R/ShadingType 2>>\rendobj\r1236 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 1244 0 R/ShadingType 2>>\rendobj\r1244 0 obj\r<</Bounds[0.0]/Domain[0.0 1.0]/Encode[1.0 0.0 0.0 1.0]/FunctionType 3/Functions[1245 0 R 1246 0 R]>>\rendobj\r1245 0 obj\r<</C0[0.65098 0.662745 0.690196]/C1[0.647059 0.72549 0.729412]/Domain[0.0 1.0]/FunctionType 2/N 4.97729>>\rendobj\r1246 0 obj\r<</C0[0.65098 0.662745 0.690196]/C1[0.572549 0.647059 0.65098]/Domain[0.0 1.0]/FunctionType 2/N 2.5855>>\rendobj\r1243 0 obj\r<</Bounds[1.0]/Domain[0.0 1.0]/Encode[1.0 0.0 0.0 1.0]/FunctionType 3/Functions[1247 0 R 1248 0 R]>>\rendobj\r1247 0 obj\r<</C0[0.0 0.54902 0.494118]/C1[0.0 0.458824 0.415686]/Domain[0.0 1.0]/FunctionType 2/N 1.62716>>\rendobj\r1248 0 obj\r<</C0[0.0 0.54902 0.494118]/C1[0.0 0.54902 0.494118]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>\rendobj\r1230 0 obj\r<</Filter/FlateDecode/Length 249>>stream\r\nHL=n0\fw\u00170ER^\u0006\"\u0005\u001a\u000fq4\u0007JIib\b\u001e({\u0014'tǉq6!\u0016\\OIOݠd+@%U_\u000b\u0015]>w-$]n5nڈbO1/w\u0019/wHB\u001a<21l尹!N1ͰdVk\u0019ݼ0\u0017ܟ\u0004'`IC^\u0002^7\u0014d[R\u001b\u0018IcՃ\u0015\u0006j!h{Q\u001bxmrfs2`\u0014CďÆS兖ͪ\"63!\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\rU\r\nendstream\rendobj\r1231 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1232 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 1249 0 R/ShadingType 2>>\rendobj\r1249 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[1250 0 R]>>\rendobj\r1250 0 obj\r<</C0[0.0 0.670588 0.603922]/C1[0.0 0.611765 0.552941]/Domain[0.0 1.0]/FunctionType 2/N 1.62716>>\rendobj\r1227 0 obj\r<</Filter/FlateDecode/Length 241>>stream\r\nHl;n0\fw\u00170EROqLAzh\u0002@\u00034P\b~PǇ81^&ь.+q\u0018/Bcע[\u000bIW\"ϨM\u001bg,V\u001df\rR\u0006\u001aT\u0018UrDbJɬ>\n3ya-?\tNsB0!QlGuZaB1Z\u000f+\fꉓ:\u0010Ӗ$^\\:o\rm\u0013-cTEl{fC\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000^$U\r\nendstream\rendobj\r1228 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1229 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 1251 0 R/ShadingType 2>>\rendobj\r1251 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[1252 0 R]>>\rendobj\r1252 0 obj\r<</C0[0.0 0.45098 0.403922]/C1[0.0 0.411765 0.368627]/Domain[0.0 1.0]/FunctionType 2/N 1.62716>>\rendobj\r1217 0 obj\r<</ArtBox[2.0 2.0 7.0 48.0]/BleedBox[0.0 0.0 10.0 50.0]/Contents 1253 0 R/CropBox[0.0 0.0 10.0 50.0]/Group 1254 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 50.0]/Parent 1098 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1218 0 obj\r<</ArtBox[3.0 3.0 47.0 47.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1255 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1256 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1098 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1257 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1219 0 obj\r<</ArtBox[6.0 6.0 44.0 44.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1258 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1259 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1098 0 R/Resources<</ExtGState<</GS0 842 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1260 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1220 0 obj\r<</ArtBox[6.0 6.0 44.0 44.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1261 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1262 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1098 0 R/Resources<</ExtGState<</GS0 842 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1260 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1221 0 obj\r<</ArtBox[0.0 0.0 100.0 100.0]/BleedBox[0.0 0.0 100.0 100.0]/Contents 1263 0 R/CropBox[0.0 0.0 100.0 100.0]/Group 1264 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 100.0]/Parent 1098 0 R/Resources<</ExtGState<</GS0 495 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1265 0 R>>>>/TrimBox[0.0 0.0 100.0 100.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1263 0 obj\r<</Filter/FlateDecode/Length 120>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\u0001\u0004낈Tp<{Bz1P>G-@%+\u0010\b\r,-L\u0014ɢtbCbq@ \\.C\u0005KK\u0005K\u000b\u0005] \u0006\nA\\\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000.p \r\nendstream\rendobj\r1264 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1265 0 obj\r<</BBox[0.5 99.5 99.5 0.5]/Group 1266 0 R/Length 81/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Shading<</Sh0 1267 0 R>>>>/Subtype/Form>>stream\r\nq\n0.5 99.5 99 -99 re\nW n\nq\n0 g\n/GS0 gs\n49.5 0 0 -49.5 50 50 cm\nBX /Sh0 sh EX Q\nQ\n\r\nendstream\rendobj\r1266 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1267 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 0.0 0.0 0.0 1.0]/Domain[0.0 1.0]/Extend[true true]/Function 1268 0 R/ShadingType 3>>\rendobj\r1268 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[0.0 1.0]/FunctionType 3/Functions[1269 0 R]>>\rendobj\r1269 0 obj\r<</C0[1.0 1.0 1.0]/C1[0.882353 0.909804 0.909804]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>\rendobj\r1261 0 obj\r<</Filter/FlateDecode/Length 305>>stream\r\nHlRKN0\f\u0014@'\u00016\b$\u000eP̢\u0005p\t\n$qg?qJxw\u0010j\bQ]鹽\u001b~jy|IxS&<|\tR=jlnv6(\u0019E(\u0019\u00156`+T=}ת_\u0015\n%<Ij*a>v\u0005h^!e\u0006(D6\"*ܶ\u0003hTSe3Ǧ2\u000b{_\u0003\u0015#\u0010Pyٖ854\u0011uhި*Y\u000b|c?o:їZ伩pd¯;y,\u0005^K\"Ʌ-\tl\u000b*ѝ\n_hj\u001fv\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001cLw\r\nendstream\rendobj\r1262 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1260 0 obj\r<</BBox[6.0 44.0 44.0 6.0]/Group 1270 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1271 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1272 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n38 0 0 38 6 6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1270 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1272 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 38/Intent/RelativeColorimetric/Length 49/Name/X/SMask 1273 0 R/Subtype/Image/Type/XObject/Width 38>>stream\r\nHb``$\b\u0018\u0018P\u0004TFQ0\nF(\u0018\u0012\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0001\u0005\r\nendstream\rendobj\r1273 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 38>>/Filter/FlateDecode/Height 38/Intent/RelativeColorimetric/Length 192/Name/X/Subtype/Image/Type/XObject/Width 38>>stream\r\nHb``dd\u000b\u0018\u0019\u0019\u0018\u0018D\u0000!>6&\u0006Fv)s/\u0000\\YȮv8E\u0015|[z\u0013Kעҗ?q/0Zv]?N\u0000\u0011&v܃\u001f\bb\f/!UL\"_\u0013*`TըQU\u0014_7\u0012Ik͗J\u0013F>E\u0004K&F6IsO\u001cq%&\u0003Q/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000&\r\nendstream\rendobj\r1271 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1274 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1274 0 obj\r<</BC 1275 0 R/G 1276 0 R/S/Luminosity/Type/Mask>>\rendobj\r1275 0 obj\r[0.0 0.0 0.0]\rendobj\r1276 0 obj\r<</BBox[6.0 44.0 44.0 6.0]/Group 1277 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1278 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n38 0 0 38 6 6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1277 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1278 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 38>>/Filter/FlateDecode/Height 38/Intent/RelativeColorimetric/Length 192/Name/X/Subtype/Image/Type/XObject/Width 38>>stream\r\nHb``dd\u000b\u0018\u0019\u0019\u0018\u0018D\u0000!>6&\u0006Fv)s/\u0000\\YȮv8E\u0015|[z\u0013Kעҗ?q/0Zv]?N\u0000\u0011&v܃\u001f\bb\f/!UL\"_\u0013*`TըQU\u0014_7\u0012Ik͗J\u0013F>E\u0004K&F6IsO\u001cq%&\u0003Q/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000&\r\nendstream\rendobj\r1258 0 obj\r<</Filter/FlateDecode/Length 298>>stream\r\nHlRKN0\f\u0014@Zi\u0003l\u0018\u0011H\u001caтfP\u0012ǵ\u00138!ܟ̴%%t\u0005>vs{7`BxS\u0012\u001e\fde4\rnC١W-F1+\nI\u000ev/v\u000f͡O2bFCq\u0015g\bR<n5I\u0005߳{\u0001sWht#\u0006э+6\u001a7L<4Rg\ne[6IkiJ4yګ<{~GJR\n\n2J]d\u0014RPi@)4\t.\u0000;W\"\u000f\u0019?\u0019~\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000/ sr\r\nendstream\rendobj\r1259 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1255 0 obj\r<</Filter/FlateDecode/Length 305>>stream\r\nHlRKN0\f\u0014@[It\r#4\u0002\u0003T0hA3_v\n$qg?q\";L\bG3M\u000eq\u000e]]ٹ\u001b~Zy|!<[yX\t\u000f_p\u00022m\u0007C١+Z\u0016&l\u0019\u0015sJz\u0017Z+\u0019Z>3cgɞR`J\u0005߳{\u0001sWht#\u0006э\u000b6\u001aL4v4Rf\u0002!e[ׄ\u001fh@FWq~G<&5ޏ\nGB)3eW\n~ͺ(%!\u001bXuP%w5\u000f;\u000f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001eJw\r\nendstream\rendobj\r1256 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1257 0 obj\r<</BBox[3.0 47.0 47.0 3.0]/Group 1279 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1280 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1281 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n44 0 0 44 3 3 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1279 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1281 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 44/Intent/RelativeColorimetric/Length 75/Name/X/SMask 1282 0 R/Subtype/Image/Type/XObject/Width 44>>stream\r\nHb` \u00110\u0012\u0004ī&N)X1JIRHZ\u000e\u000e\nQjGՎZR\u000bԒRgT\u0017\u0012\r\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0006\r\nendstream\rendobj\r1282 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 44>>/Filter/FlateDecode/Height 44/Intent/RelativeColorimetric/Length 396/Name/X/Subtype/Image/Type/XObject/Width 44>>stream\r\nHb` \u0011022\u0005pL̬\u001c8\u0001\u0007;+3\u0013D5#3\u001b\u0014\u000e ).\"\bV'klfn\u0015\u0019(1ԲJ8\u0004D%$%c\u0005I6jb\\ 9E3\u001a&̘\u001d̞S`$#k\u0011׶dǡcǱc\u00076Ϯ\u0011ag\u0002:_9+\u000f<\n\u001e='H\u0003Vսl'\u001f~\n{`z$'P-\u000bKs/\u0015$\u000b)Z\u0006f\u001e\u0005%g_|\u001f+9Pܲ6\u0019\u000bN='F-\u0013U\u0013Ͼ\u0011S\"yjGՎ%_m죏&8%\u0012\u001f\u000bC(g󹻏\tQ\fL\":U7\u001f \\10\t(&TLML\u0005\\bj6D\fLl<bJ:F\u0001Ⱥ:h\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000/\r\nendstream\rendobj\r1280 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1283 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1283 0 obj\r<</BC 1284 0 R/G 1285 0 R/S/Luminosity/Type/Mask>>\rendobj\r1284 0 obj\r[0.0 0.0 0.0]\rendobj\r1285 0 obj\r<</BBox[3.0 47.0 47.0 3.0]/Group 1286 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1287 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n44 0 0 44 3 3 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1286 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1287 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 44>>/Filter/FlateDecode/Height 44/Intent/RelativeColorimetric/Length 396/Name/X/Subtype/Image/Type/XObject/Width 44>>stream\r\nHb` \u0011022\u0005pL̬\u001c8\u0001\u0007;+3\u0013D5#3\u001b\u0014\u000e ).\"\bV'klfn\u0015\u0019(1ԲJ8\u0004D%$%c\u0005I6jb\\ 9E3\u001a&̘\u001d̞S`$#k\u0011׶dǡcǱc\u00076Ϯ\u0011ag\u0002:_9+\u000f<\n\u001e='H\u0003Vսl'\u001f~\n{`z$'P-\u000bKs/\u0015$\u000b)Z\u0006f\u001e\u0005%g_|\u001f+9Pܲ6\u0019\u000bN='F-\u0013U\u0013Ͼ\u0011S\"yjGՎ%_m죏&8%\u0012\u001f\u000bC(g󹻏\tQ\fL\":U7\u001f \\10\t(&TLML\u0005\\bj6D\fLl<bJ:F\u0001Ⱥ:h\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000/\r\nendstream\rendobj\r1253 0 obj\r<</Filter/FlateDecode/Length 167>>stream\r\nHLO\u000e0\u0010W\u000fp\u0015'b\u0007?Q.\u0004-\u00054NkGp\u0015l$K\u0013*&a*4\u000f\r6Ħj\u0012@\b{1\u001fL$\u001aBT(\u0019#\n1e\u001cg1\"m\u0004,ԗ\nq4_|\n\u0001K?\"`k\u001c-\"!{\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r1254 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1212 0 obj\r<</ArtBox[3.0 3.0 47.0 47.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1288 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1289 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1097 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1257 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1213 0 obj\r<</ArtBox[9.0 9.0 41.0 41.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1290 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1291 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1097 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1214 0 obj\r<</ArtBox[9.0 9.0 41.0 41.0]/BleedBox[0.0 0.0 50.0 50.0]/Contents 1292 0 R/CropBox[0.0 0.0 50.0 50.0]/Group 1293 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 50.0]/Parent 1097 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 50.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1215 0 obj\r<</ArtBox[2.0 2.0 7.0 48.0]/BleedBox[0.0 0.0 10.0 50.0]/Contents 1294 0 R/CropBox[0.0 0.0 10.0 50.0]/Group 1295 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 50.0]/Parent 1097 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1216 0 obj\r<</ArtBox[2.0 2.0 7.0 48.0]/BleedBox[0.0 0.0 10.0 50.0]/Contents 1296 0 R/CropBox[0.0 0.0 10.0 50.0]/Group 1297 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 50.0]/Parent 1097 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 50.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1296 0 obj\r<</Filter/FlateDecode/Length 167>>stream\r\nHLO\u000e0\u0010W\u000fp\u0015'b\u0007?Q.\u0004-\u00054NkGp\u0015l$K\u0013*&a*4\u000f\r6Ħj\u0012@\b{1\u001fL$\u001aBT(\u0019#\n1e\u001cg1\"m\u0004,ԗ\nq4_|\n\u0001K?\"`k\u001c-\"!{\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r1297 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1294 0 obj\r<</Filter/FlateDecode/Length 170>>stream\r\nHLOA\u000e0\u0010+\u0003](RD\f\u0003\u001a&\u0013\u0014lvv:;mZñ%N͒dic(\u001bp&TBE$l\u0002'`4,\u0019_Hǌ\u0003\n1UHԶ\u0018})#f+a\u0004/c~\n\u0011s\u0019mEĺx\u0001)\"\u001e{|\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0004B3\r\nendstream\rendobj\r1295 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1292 0 obj\r<</Filter/FlateDecode/Length 300>>stream\r\nHLRN0\f+\u0003I\u000fJAVhŁ\u000f`9tv\t?jL\u0013ux[q8\tWS\u001b$\r?\u0003 #>\u0005_!a28v\u0005_!P,\u000b\u000b\fY\u0014)C6p\u0012kdᷲ\u00126ȳ;\u001fXU;ftl\u0006gK(BIX\u0005g1\"h\u00147S\u0018Gzb:\u0012i4SF\u001dg,UJ2n\t%躉;qVb*\u001bhF(7;\u000fQ \u0019MLIaV\u001aIN,tԨv欟GaƳF\"Fu?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000k2v\u0018\r\nendstream\rendobj\r1293 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1290 0 obj\r<</Filter/FlateDecode/Length 290>>stream\r\nHLRAn0\f\u0015\u0000\u0010'\u0004µiUz\u0003P=+RqV3IpZ\u0003Lo'\rSw\nv=o\u00145ŹBg\u001fYK\bKϼ]WOUi%C6rX4\u0015/Юm6Fqu8\u0002*qc(\u0002\u0017X~OSQlf~#/p5N\u000e\u0013/R\u0000t)غ;QKGGFQJj\u000e\n<!\u001bF+K6`nb\u0012kJ-vF#dr\u0000ÍgA-m%~49\u0012љ\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000J2q\r\nendstream\rendobj\r1291 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1288 0 obj\r<</Filter/FlateDecode/Length 314>>stream\r\nHLRN0\f+\u0003I㤏J\u0017B+\nv\u000f-h#)\u0019=Q\u0019\u001c0#<\u001e9t\"K]!࠯\t\u001f-\u000f_-\u0007N\u0010|=Y$+\u0012\u0006~\b)b\u0003.\u001b~\u0003G>M&O\fʷaZD\u0002qu8\u0003tY%\rBY\u0002P`\u0005T\u0016>D&3)cOw^V\u00068jh0P\nm5.E\u0014\u001dY\u0017֕u\u0005^Te\u00010%FT{\u0007\nģ0\bBe\u0010 :KT]!U^ӻy:k.FNcYj\"FOw?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000|\u0006{\r\nendstream\rendobj\r1289 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1207 0 obj\r<</ArtBox[0.0 0.0 100.0 100.0]/BleedBox[0.0 0.0 100.0 100.0]/Contents 1298 0 R/CropBox[0.0 0.0 100.0 100.0]/Group 1299 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 100.0]/Parent 1096 0 R/Resources<</ExtGState<</GS0 603 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 1232 0 R>>/XObject<</Fm0 1300 0 R>>>>/TrimBox[0.0 0.0 100.0 100.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1208 0 obj\r<</ArtBox[12.0 13.0 87.0 90.0]/BleedBox[0.0 0.0 100.0 100.0]/Contents 1301 0 R/CropBox[0.0 0.0 100.0 100.0]/Group 1302 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 100.0]/Parent 1096 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 1232 0 R>>>>/TrimBox[0.0 0.0 100.0 100.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1209 0 obj\r<</ArtBox[10.0 6.99998 60.9746 59.1763]/BleedBox[0.0 0.0 70.0 70.0]/Contents 1303 0 R/CropBox[0.0 0.0 70.0 70.0]/Group 1304 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 70.0 70.0]/Parent 1096 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Font<</T1_0 1305 0 R>>/ProcSet[/PDF/Text]/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 70.0 70.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1210 0 obj\r<</ArtBox[12.0 13.0 87.0 71.0]/BleedBox[0.0 0.0 100.0 100.0]/Contents 1306 0 R/CropBox[0.0 0.0 100.0 100.0]/Group 1307 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 100.0]/Parent 1096 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 100.0 100.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1211 0 obj\r<</ArtBox[13.0 13.0 87.0 87.0]/BleedBox[0.0 0.0 100.0 100.0]/Contents 1308 0 R/CropBox[0.0 0.0 100.0 100.0]/Group 1309 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 100.0]/Parent 1096 0 R/Resources<</ExtGState<</GS0 603 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1310 0 R>>>>/TrimBox[0.0 0.0 100.0 100.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1308 0 obj\r<</Filter/FlateDecode/Length 167>>stream\r\nHLPA\n@\f\u0015vj^,R\u0014|h=X`blff'CX6+b\nn\u0014[@\fa`\t\u000f^:?¦gOj8/\u0002s\u001c;\u000b̗H\u0010\u0005\u0000\u0001k\t{kOwsc\u001dM\"U1'\u0015<cq6y\u0011/\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00018\u001d\r\nendstream\rendobj\r1309 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1310 0 obj\r<</BBox[13.0 87.0 87.0 13.0]/Group 1311 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1312 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1313 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n74 0 0 74 13 13 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1311 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1313 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 74/Intent/RelativeColorimetric/Length 79/Name/X/SMask 1314 0 R/Subtype/Image/Type/XObject/Width 74>>stream\r\nH̱\r \u0010\u0000K(\u0011\r%W\u0003x&\\}\u0015WeS\u0013d2L&d2L&tNQ5T\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000jM\u0014!\r\nendstream\rendobj\r1314 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 74>>/Filter/FlateDecode/Height 74/Intent/RelativeColorimetric/Length 416/Name/X/Subtype/Image/Type/XObject/Width 74>>stream\r\nH?΂0\u001cq'\u000e\f\u0004#S'\u0006t#p\u0000&\tނ3tPo\u000bt\u00016oD\u001c݈1\u000b\u0018=wy~\u000f,\u0016\u001aB\u00108,-\u0001f[K_\u0016\"0ZBs))LWA̒t\u0003M\u0013\u0016\u0007+Ing<\u0001*y\u00044\nQ/>\u0014\u0015\u0017\fH\n^\u0015أ-eTi\u00015Z*c5v\\]\n.IhO\u0013m\u0003\u001an\u0016E\u001a9ޕ\u0013ckYotn\u000fڞOF2d$#\u0019HF2d$#'u?<\u001eC_-Ei!tw\u001b[EFdIե므x$Y>*t\u0002jU|k\u0010CQq!πUq=Ff\u0004<~\u0013d\u0016%v\u0007h&,\u000eVt<7\u001aT\u0014KI#Ҳ\u001d`$\u0005M\u0016_>\u001f\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001f\r\nendstream\rendobj\r1312 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1315 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1315 0 obj\r<</BC 1316 0 R/G 1317 0 R/S/Luminosity/Type/Mask>>\rendobj\r1316 0 obj\r[0.0 0.0 0.0]\rendobj\r1317 0 obj\r<</BBox[13.0 87.0 87.0 13.0]/Group 1318 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1319 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n74 0 0 74 13 13 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1318 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1319 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 74>>/Filter/FlateDecode/Height 74/Intent/RelativeColorimetric/Length 416/Name/X/Subtype/Image/Type/XObject/Width 74>>stream\r\nH?΂0\u001cq'\u000e\f\u0004#S'\u0006t#p\u0000&\tނ3tPo\u000bt\u00016oD\u001c݈1\u000b\u0018=wy~\u000f,\u0016\u001aB\u00108,-\u0001f[K_\u0016\"0ZBs))LWA̒t\u0003M\u0013\u0016\u0007+Ing<\u0001*y\u00044\nQ/>\u0014\u0015\u0017\fH\n^\u0015أ-eTi\u00015Z*c5v\\]\n.IhO\u0013m\u0003\u001an\u0016E\u001a9ޕ\u0013ckYotn\u000fڞOF2d$#\u0019HF2d$#'u?<\u001eC_-Ei!tw\u001b[EFdIե므x$Y>*t\u0002jU|k\u0010CQq!πUq=Ff\u0004<~\u0013d\u0016%v\u0007h&,\u000eVt<7\u001aT\u0014KI#Ҳ\u001d`$\u0005M\u0016_>\u001f\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001f\r\nendstream\rendobj\r1306 0 obj\r<</Filter/FlateDecode/Length 146>>stream\r\nHLOA\u000e0\f\u0015҄RR\u0010\t!8\u0003\u0012\u001b\u0014ɱ\u001dQܥEp8\u0016Щf\t\u0016?\u0003M0LBR\bȑ:cE]\b9\u0018\u001cU+O%W\u001e5UM\u001a\u0013ں$-Kڅ'=j}\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000/,\r\nendstream\rendobj\r1307 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1303 0 obj\r<</Filter/FlateDecode/Length 96>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CS\b\u0002\b\u0016s\u0007\u001b(\u0017s\u0018\u001b\u0000BҸL,\u0014\f\u0010H\u0019\u0002E,\u0015Br44C\\C \u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0014\r\nendstream\rendobj\r1304 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1305 0 obj\r<</BaseFont/QUIJRC+MyriadPro-Regular/Encoding 1320 0 R/FirstChar 31/FontDescriptor 1321 0 R/LastChar 146/Subtype/Type1/Type/Font/Widths[523 212 0 0 0 0 0 0 0 0 0 0 0 207 0 207 343 513 513 513 513 513 513 513 513 513 513 207 0 0 0 0 0 0 612 542 580 666 492 487 646 652 239 0 0 0 804 658 689 532 0 0 493 497 647 558 0 571 541 0 0 0 0 0 0 0 482 569 448 564 501 292 559 555 234 243 469 236 834 555 549 569 0 327 396 331 551 481 736 0 471 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 207]>>\rendobj\r1320 0 obj\r<</BaseEncoding/WinAnsiEncoding/Differences[31/f_i]/Type/Encoding>>\rendobj\r1321 0 obj\r<</Ascent 952/CapHeight 674/CharSet(/f_i/space/comma/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/A/B/C/D/E/F/G/H/I/M/N/O/P/S/T/U/V/X/Y/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/r/s/t/u/v/w/y/quoteright)/Descent -250/Flags 32/FontBBox[-157 -250 1126 952]/FontFamily(Myriad Pro)/FontFile3 1322 0 R/FontName/QUIJRC+MyriadPro-Regular/FontStretch/Normal/FontWeight 400/ItalicAngle 0/StemV 88/Type/FontDescriptor/XHeight 484>>\rendobj\r1322 0 obj\r<</Filter/FlateDecode/Length 4551/Subtype/Type1C>>stream\r\nH|TiT\u0014W\u0016F\u0010* ]= \r\u0012T\u0016\u0015$hD[Y\u0006\u0014\b(;I08-\bꈻ\f\u001c ´ \u0004\u0010\u0019eF21j\u001fj2?ǜ9{޽}~\u001f`8\u000f\r\u000f\bƃjU<D\u001dtborL\u00058ok/`\u000b*xm0\t-\u0005\fn\u00118n:b*\u0004^FhQ<+ek\u0015I\u001aEl, .:^\u0010(N511\u0010I2\"IN1\u001aJJ)T\u001aB-\u0012{U}B.Ө(~Y_L\u0015'\u0013bTF-L#\u0018dQqeBW4j\"iٺO\u000e&(d^2b\u000f\u00186\u0017,-0{1D`\u0004ck-0\u0012L\f\u0015~\u0016ۈ`X\u0001Vŭi\u0017&\b+Tl$)&\u001aRG\")\u001cgbB[Q\u000f5fifsN9m\u0001ڹܕsCޣ0/b˝g,_ݼ&>$j\u00055\f!3Y\u0014\u0014v\u0016\"\u0012&)$C-,\u0018\u0019j\u001eV\"AfָCFF/i4mXĤMKtH\u000ei=i[y\u001bXp+Gfl卫@hGdئM%\u0018`79\u0001D:۠=WߐTT\u0013=PHi\u0003h\u0016j\f*r=ߩH:Ǡtb\u0012\u0016.E\u0016(CDH`\u0010А\b+F\u000bcىF{|vٻ,\u0012V\u00068L\n`(7\u001aG\u0006H\u00191HWSL7_\u0006 \u0014\u0011.\u001b\u001d/jIB\u001d\u0002\u000bɐH:(^SZ,?\u000fM\u0001\\Β՞\u0007`\u001b.{\u000f ﵆\tfr\rRݡIyp;K|\u00113RC;}h?z?@VIAdYeY2XcJ}A\\d-\u001c\u0019;qyJ?DJ6ŀ7zJlۙQ̸p\u001b\nr|\u0011Abʲ\u000blUJebg\u0013\u0005p0\u0013Aʢ\u000e*\n= \u000bV\u00156Hug\u001eqWHDYI4y\u0003zNj\u0004~;\u0002mUl$}\u0005W\u000eIȣA{'8㵣\u0015B\u001b>`\u000f%d&r\u0019~#AA;\u0016Њ\t\u0001\u0007A0\u0001>O/\\;FE\u0015MT[^+\u0011#ǙJvYM6WR݉S\u001bgoմH\u0006[\u0005m#\u001d;\u0011mB\u001dk7[f\t\nq]|ߺYSH\u001a\u000e\u001cgơ(yS@귷Ts\u0005\"fs?ܶ\u001b\f#kD/\n\u0010֧erUd\u000f,w^;\u000b{Mo+|6l2\u0003yeV!|kȮ\u0003Ⱥ\u0007vntcy\b\u001e⍣pzxɩ̫>S}閸W`\u0007>ހh+%\"\u001eك披\u0002ʘ-{l:6+9@\u0018*y\u0007\"8vkvąHVE\r>o|\"\n\u000e\u0007/\u001ar4\u0015J\u0011J#\u0002/L\t삞\u0001\u00018]f\u0005%ۇ@\u001fi\u0006\u000fҞB\u0007yϨ\u001eP]l'l%\u001ai<uIO.\u0013E_\u001dӝк\u00146<g|6z\u001d\t\u001aLˮjkW^n\t*\n {+=kIF\u0015K6m>zD\u0005\u0005$cwb|\u0003?]R\u0001}\u0014^l>\u0018u^A\u001aGgTL7_1)#$\u0017\u0006z\u001ai8K2j\"J=%H\u001c\u0017%\u0003-C\u001d%%\u001c\r\u001eJ7?ʛO\u0010BǮ6gݓo~\u0019\u0001!UJ.\bn4=-&g[\u000e\u0002\u0017;MyR:8W\u0007}\t\t~\u0005oˢbPy\f΃\u0014\b2\u000bh\u0003~Qh>T\u0004\u001aҡQ}\u0010\u0003'u1ry\u0011f\u0011ްH\u000f\u000b\u000e*#U~d\u0004,UOuC\u001c3h,}tܦWHP\nю\u001cξޥ=L\u001a9db@{\u001c=%d\u000fuB\u0006\u001f#\r\u001e;Q\u0006=\u001e3x::\u0011Ϥ\u0018<Rg\u0013CDC~!\u000fZ\u001b>f\u0012\fKlF(a\u0010A\t'X5iYTZQ@\b\u0015Lg=J@\u000fϧ{X`s\u001c=\";)CNV\u000ek\u0002x@bo\u001a<37\u0013tz23\u0013Լ\u0004\"D\u0000R\u0017\u00047(DQ\b\u0016PYC\n\u0001-K0\u0001c\u0011\u0010P4dS`\u00057\u000b(!Rk|߻{\u001f\"z`\u000b:\u0001'j\u0003M$\u0015\ts\u0019LFѰm\u0002\bG\u0005\u0018\u001aTGP%v5^Ψ#\u0006C\u0003.@LJB\bb0>?6=\u001f3\u001bDh\u001b^م(\u001c\u0005\u0010\u0003[`=?@\tqF\"\u001f6\u000b\u0011,\u001a2ODa?\u0004\u0011|\u0002#\u0000>aqڒ!\u000b{(\u001c2J/v;㍇3\u001027z\u0007S>ܢzEw^cS\nV#m8\u0012`a\u000f8bÊ^\u001a$\u001f~\u001a\"ZY\u0017[sݵ']\n2Tb/.9\u001aPFVx9\u000fBG}[˷2\u00117w\u001aG\u0010\u000e \u001b37\r[\u001b \u0010>/7f[f\u0018֖Da=\u0010X2kO\"'o/z`)ٓX\\c]`\u0006ұ7\\\bD \u001a+\u0015sķwc&=\b¾\u0010\u0016s[\u0015WZl!x\t0.p >E1A\u0005Yķz.\u0015\\/&@LH\t~'Y\u0006ЊCu&4_$1~\u001bh$A\u00138\u0012Kq\u0007\u0015\u0007\u0017\ty[BSt3H7\u0005\u0014nTd\u0017\b{\u0010<I)56\u0017Mb\"\u000fB;$F0e{\u0004\u0015B\u00032oS\bF]\u001a{od%/mm𲮾\u001a\u001f}Jyz \u0005V(\tuZ\tF\u001c\u0012C\u001f\b\fx%/ԬP5\u0014&< \"zt\nfJ\tl(c=A\u000e\u001a\u0003`\u0003\u000b\u000ehO#\u001a-Ru8\u0018t|\u000fLiGS'%,eD/꽷+Q\u0013\u000b\u0017\rq\u001f\fq;<\u0010bS\u0002襛\u0006aΫ\t_J-g\u0006\u0004\u0005_u\u00112'\u0011\u0016\u0017cgTárnݠePcÌTdC|@\u0006\u001a}4,rx\bVwo4]fxUDօlc %ԬT2z%}\u0017\u0003\n\u001cF\u0012\u000b\u0006\u001by\u000f o@.Ҝ\u0016\u001f\u0006\u0003\\\u001b\"b\u00138ݾR\\X(\u0005a*\u001fZ\u0011f5ݢ\r\u0013\u000f闕+qbqnv71\u0007O\u001b\rՏ䭳}cU\u0019\u0005LtbHZv0%\"*wl\u0015m60F\nsQ ̠-\tUS8S̍\u00025(\u000flQ_V#i\u0011|4vYof\u0004\u0012z_+,*nI\u001a(lmcۚ+\u0006/\u0006\u001dI6hPHNP2~\n7Yj\u001at\u000e?i\t[jRbIg(V7j\u0006?jc\u0006\u0003Q)8\\,64^xy֌'7n\u000fLSF3Q䘹j&!\u0016H\u0003x7d\r*uf(\".6hElm]EOl2\u0011^L>F\u0017w\u0018z\u001b\u001a֢ؖgb[2DRMh<*$k.3\u001dp\\Xy̅򪚷U#\u0018I \u001bZt\n\u0013K7\u0004~\u001f.'%\u001drONL&\u0016\u0011R\u000b\u0011\u0016\u0016f\u0018\u0018GT&8jH\u00135>jc\f\u0015iN\u00150~:\u00162YSϴ\u00145\u0012=saQ\tIpn\u000eH?$(\u0015re\u0014>h\u0001^(6w\u0004눜\u0010,*\u0016Q\u0016UZ-=s\u0018c\u0017vy34־q߁XFMP{\u0002uU}܇}xe\u0011\u001fjDHlVe<ށ\u0015bYu\u001aXޟO\f/^+6a \u001fR?3ӣH*b-x\u000f\rğ&\b\u000e,\u001ec<\u0006j\u0003v\u0002E9\u00059y\f5WI?m_\u0004?w+U\u000bB?J\u001350\u000f.3}m733,Up}Iw%\u001ef\u0012TMs\u000b}\u00074R_\\Ik}\u0001'\rD\t:c\u0015\u001aȾɑUYcb}O\ruIg\u001eAqTPӴo*퍭\u000b\u0016\u001c>\u0018XZ\u0012\r\u001b6\u0002{j?Ehmc=\u0013T\u0015Ė_HiuէN},UbV\u001c-MuP\b\u001aXR\u001aYi=d\u00062p1x%\u0012&di7P.Az\u0012{\u001c\n*Ny\b\u0010WƮ{\u001c\u001f{#N`\u0006М>*X}\u000fQϦ{\tMnH\u00066\u001a7mޮ}\u0004wߏ\u00046\f\u00160\u0017U\r6UN?\nlO\u000f\u0019='jl\rn\u000eh\u0002֬\r{jU\u001eu&f::\u0001$޴noA]\u0012|@\u00072N\u0011<\u0005d ޖ6&ҼҖ\u0012\u000bڶm\u000fN}.\u001e\r\u0019iMyټ~cj$\nar8\u001f\u0015.f̋m\u001bj\u0016-9:(lfo\u0019\u0007\"b~Ox:7-H>q?\u000f\"?\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000kye\r\nendstream\rendobj\r1301 0 obj\r<</Filter/FlateDecode/Length 287>>stream\r\nHLn0\fEw~\u0005 4%qLAfh\u0002$@\u0007JQ~x)Y䵻\u0001\u0018\u0010\u000e']%m\u0006x{\u000b\u0005Y\u001fP<<\u000fyG\u001dv1tZP\u0012teґI!dB[K/\bp\u0017hv\u0017\u0003T}\u0007/96-n94d}t۴\u00128\u0018\u001bZK\u0001\u001bцU$S\u000e]F+3=yuׅz1Wo`)Ʋ1y7Clj3&Wf\u001cbumF%缢ؼ\u0015\u0001O\u001fHS\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000p\r\nendstream\rendobj\r1302 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1298 0 obj\r<</Filter/FlateDecode/Length 359>>stream\r\nHlRn\u00021\f+\u0003qqre)R\u0016\u000e\n3\u0003TFĻ99l1\u0007\\7\u0011xj[jKst\"X#%קg@y(\u0019C\u0018\u0018|ɩH\u0018s\u0011|t]Bh=\u001cG\u001c0E\u001dGq\u0012<s\u0013/X]Ћ\u0007EyȘ\u0011\u000f\u001c4:oEXLժ&KZe(PPV,QLӈ\u0003r5\u0003*q\r\u0014\u0002'π\u001c\u0018\u001e\u001b.|;G\u000bE\f\u0018h\bm\u001evp\u001fM\u0015q˅0f\u001fo\u000f\u0004\u0003,?UHkY{%S\u0010@AX$ꟕ:应j5k)H 7L޸_\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000O0\r\nendstream\rendobj\r1299 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1300 0 obj\r<</BBox[-3.0 105.0 102.0 -2.0]/Group 1323 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1324 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1325 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n105 0 0 107 -3 -2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1323 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1325 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 107/Intent/RelativeColorimetric/Length 144/Name/X/SMask 1326 0 R/Subtype/Image/Type/XObject/Width 105>>stream\r\nH\r0\u0010\u0004KM@\b\u0012'~\u0006UZy\"8\n>+>\u001fSyO]QyMo9D\"H$\u0012D\"H$\u0012D\"H$\u0012D\"H4:\u0012\u0016SUTS\u001d45ITl\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000'\r\nendstream\rendobj\r1326 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 105>>/Filter/FlateDecode/Height 107/Intent/RelativeColorimetric/Length 2219/Name/X/Subtype/Image/Type/XObject/Width 105>>stream\r\nHoHbk\u001e۔YvtĈ\u0011Iq\nH5\u0005(\u0002\u0004\u0011\u0011޶\\\u0006\"k\u0017!(jO\u0010\"^\u0004\u00179rhmn\u001394%9Twnӱ\u0019>{S?\u0017X\u0003y.xXC:{ÅE\u0007\"\t\t\u0014\nz\u0016-Ηw@\u000fZ_\u0018\u00072\u0014z:d2Y\u00062\u0018t@R u{q\u0000Cg0ٜD\u0004x\u0004\u0017\"H\"d!u{(@Ax\u0014A*\nJ#\u001f\\*HI\u0010\u000e\u000bRP9P<\u0006\u0018._\n\u0019\u0012T4:I8]\n\\@(GpH@(20R.Ree$\" \taߒ@\u0005\u000e\u001f\u0015I*Gk4ϢI9*L.\u0015| Q9]\u001fBib\u0019\u000bҲTVZ\u0016\u0017lL&N#,@$T,WEr}ehyA\u001aP]/\u0015\n\u0018M\u0002L.VT\u0019k\u001bM- \u000b&sc}B[VD\u0002H\u0010\u001c/b\u0005:limvj1\u0019\\L*Ñ. pD\t4&\"\u0010ɳq`i\u000f\f\r\u0013\b\bbxhfi0x\\$@C\u0002GDy\u0004S\u0017U\u0018\u001a^v\r&&\u000e5\t`_\u0006CE\u001a<6!:9\nUY:_\u0011\u0019kv\u000eYsf>NUp\f\u001d\n\u0002wSXn4\u0011)3]7wavNو60'3=9qy\u001b\u0000De ),ub\u001d\u001cryK˫k~./y=AV_\u0012 \f5\b܅\f,O[Y;jwz|+;m\u000567+>>Z_2m\f%PT\"_W?6\rl\u0006?-\u001dxX{c._!I2/9Jx1`,\u0003{\u0007!\u001d\u0005\u0007K\u0019@O\u0012\\)E\u0010\u000bBRcSЄs~yc;1t\u0018Dacp{cy91gSF%EyT2Suxҵ\u0017\n\u001f\u001d(\u001c\u00179TOx,gOUϞ״t\u0013YZ`w$\u00129%W$rrt\u001bX[u\u0010=-/\u0017P\u001a^\u0010A\u00180\u000bPֺo1Wˋ\u0011ǜCI\u0004:P|\n}x_\u0003G\u0000\u0001bΩsݐgcA0.}\u0005tt\rס7\u000f~\u0006?.!a\b珂nw<{ߺG;z,?o\u0013A_zP?|*\u0019bP\fA1(\u0006Š\u0018\u0014bP\fA/{0\u00174w\u0005~\u00068\u001e\u0005r\u0017\u0000\f\u0005>\u001f\"\u001cs[q\u0014Jd:=\u001c\u000f[s\u000e \u0014B5-݄}ֻ\u0016?<:\u0000Tn`;k'[j ހ,.*UiLI^(|t|Bphogsu59lm6iTRˢނRcSЄs~yc;1t\u0018Dacp{cy91d,(oCL\b%\u0006sǀmƳ\u000f\u000f\u001fv\u0017|\u001f/yfl\u0003\u001dfC\t\u000e!M(UU7M+o\u0003;\u000fd\u000bl\u0007ޮxcպ|$:\u0014Oe\"\f,O[Y;jwz|+;m\u000567+>>Z_2\u0004\b\u001a\u0019b ),ub\u001d\u001cryK˫k~./y=AV_\u0012 k\u0010SXn4\u0011)3]7wavNو60'3=9A)t\u000e_(SẪ:K+b>=t΁\u000f>>rLǉW*\u001d\t\u001c:%>\ny\u0004S\u0017U\u0018\u001a^v\r&&\u000e5\t`_\u0006CE\u001a<63\u0004>\r6ٸVojY{\u0007\tbl\u00041<4km4Z<[.\u0002w\u0001~\u0018Π\u0000{'r\u000btzCe!_b3u\u0005\u0014\u001cv\u0006:+\u0010\u0014\u0002mE\u0002\t.hn27\u001a*\u0005jL$wHIXŋtjT|5&R_+s\u0015r1\u0004\u00078C#!4\fVZ]Iih*+-i\u000bqu6&\u0013. w`$6GER9Q\u001aͳhh<u\nKE(\u001faÁ.wb$\u001a\u0004BD)JUt)\n,+S&\u0011\t\u0005I]\u001fJbq|\u0001*L\u0017gHRh\u0002$\u0019t!*s9\u000e< QBx\u0014A*\nJ#\u001f\\*HI\u0010Щyr݁#s\u0014ID\u0010.\u0017Mp!$rL$@\u0006\u0004${\f\u0006dE\u001bX`i4}\\\u000e\u0015@PgѢ|)xG\u0002dns5\u0014\u0000\u0016\u000f\u0007t'PsAk\u000fM_fn`\u000f.\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000fx\r\nendstream\rendobj\r1324 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1327 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1327 0 obj\r<</BC 1328 0 R/G 1329 0 R/S/Luminosity/Type/Mask>>\rendobj\r1328 0 obj\r[0.0 0.0 0.0]\rendobj\r1329 0 obj\r<</BBox[-3.0 105.0 102.0 -2.0]/Group 1330 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1331 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n105 0 0 107 -3 -2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1330 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1331 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 105>>/Filter/FlateDecode/Height 107/Intent/RelativeColorimetric/Length 2219/Name/X/Subtype/Image/Type/XObject/Width 105>>stream\r\nHoHbk\u001e۔YvtĈ\u0011Iq\nH5\u0005(\u0002\u0004\u0011\u0011޶\\\u0006\"k\u0017!(jO\u0010\"^\u0004\u00179rhmn\u001394%9Twnӱ\u0019>{S?\u0017X\u0003y.xXC:{ÅE\u0007\"\t\t\u0014\nz\u0016-Ηw@\u000fZ_\u0018\u00072\u0014z:d2Y\u00062\u0018t@R u{q\u0000Cg0ٜD\u0004x\u0004\u0017\"H\"d!u{(@Ax\u0014A*\nJ#\u001f\\*HI\u0010\u000e\u000bRP9P<\u0006\u0018._\n\u0019\u0012T4:I8]\n\\@(GpH@(20R.Ree$\" \taߒ@\u0005\u000e\u001f\u0015I*Gk4ϢI9*L.\u0015| Q9]\u001fBib\u0019\u000bҲTVZ\u0016\u0017lL&N#,@$T,WEr}ehyA\u001aP]/\u0015\n\u0018M\u0002L.VT\u0019k\u001bM- \u000b&sc}B[VD\u0002H\u0010\u001c/b\u0005:limvj1\u0019\\L*Ñ. pD\t4&\"\u0010ɳq`i\u000f\f\r\u0013\b\bbxhfi0x\\$@C\u0002GDy\u0004S\u0017U\u0018\u001a^v\r&&\u000e5\t`_\u0006CE\u001a<6!:9\nUY:_\u0011\u0019kv\u000eYsf>NUp\f\u001d\n\u0002wSXn4\u0011)3]7wavNو60'3=9qy\u001b\u0000De ),ub\u001d\u001cryK˫k~./y=AV_\u0012 \f5\b܅\f,O[Y;jwz|+;m\u000567+>>Z_2m\f%PT\"_W?6\rl\u0006?-\u001dxX{c._!I2/9Jx1`,\u0003{\u0007!\u001d\u0005\u0007K\u0019@O\u0012\\)E\u0010\u000bBRcSЄs~yc;1t\u0018Dacp{cy91gSF%EyT2Suxҵ\u0017\n\u001f\u001d(\u001c\u00179TOx,gOUϞ״t\u0013YZ`w$\u00129%W$rrt\u001bX[u\u0010=-/\u0017P\u001a^\u0010A\u00180\u000bPֺo1Wˋ\u0011ǜCI\u0004:P|\n}x_\u0003G\u0000\u0001bΩsݐgcA0.}\u0005tt\rס7\u000f~\u0006?.!a\b珂nw<{ߺG;z,?o\u0013A_zP?|*\u0019bP\fA1(\u0006Š\u0018\u0014bP\fA/{0\u00174w\u0005~\u00068\u001e\u0005r\u0017\u0000\f\u0005>\u001f\"\u001cs[q\u0014Jd:=\u001c\u000f[s\u000e \u0014B5-݄}ֻ\u0016?<:\u0000Tn`;k'[j ހ,.*UiLI^(|t|Bphogsu59lm6iTRˢނRcSЄs~yc;1t\u0018Dacp{cy91d,(oCL\b%\u0006sǀmƳ\u000f\u000f\u001fv\u0017|\u001f/yfl\u0003\u001dfC\t\u000e!M(UU7M+o\u0003;\u000fd\u000bl\u0007ޮxcպ|$:\u0014Oe\"\f,O[Y;jwz|+;m\u000567+>>Z_2\u0004\b\u001a\u0019b ),ub\u001d\u001cryK˫k~./y=AV_\u0012 k\u0010SXn4\u0011)3]7wavNو60'3=9A)t\u000e_(SẪ:K+b>=t΁\u000f>>rLǉW*\u001d\t\u001c:%>\ny\u0004S\u0017U\u0018\u001a^v\r&&\u000e5\t`_\u0006CE\u001a<63\u0004>\r6ٸVojY{\u0007\tbl\u00041<4km4Z<[.\u0002w\u0001~\u0018Π\u0000{'r\u000btzCe!_b3u\u0005\u0014\u001cv\u0006:+\u0010\u0014\u0002mE\u0002\t.hn27\u001a*\u0005jL$wHIXŋtjT|5&R_+s\u0015r1\u0004\u00078C#!4\fVZ]Iih*+-i\u000bqu6&\u0013. w`$6GER9Q\u001aͳhh<u\nKE(\u001faÁ.wb$\u001a\u0004BD)JUt)\n,+S&\u0011\t\u0005I]\u001fJbq|\u0001*L\u0017gHRh\u0002$\u0019t!*s9\u000e< QBx\u0014A*\nJ#\u001f\\*HI\u0010Щyr݁#s\u0014ID\u0010.\u0017Mp!$rL$@\u0006\u0004${\f\u0006dE\u001bX`i4}\\\u000e\u0015@PgѢ|)xG\u0002dns5\u0014\u0000\u0016\u000f\u0007t'PsAk\u000fM_fn`\u000f.\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000fx\r\nendstream\rendobj\r1202 0 obj\r<</ArtBox[4.0 3.99998 25.0 25.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1332 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1333 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1095 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1203 0 obj\r<</ArtBox[4.0 6.0 25.0 25.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1334 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1335 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1095 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1204 0 obj\r<</ArtBox[4.0 6.0 25.0 25.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1336 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1337 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1095 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1205 0 obj\r<</ArtBox[7.0 6.0 13.0 15.4035]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1338 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1339 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1095 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1206 0 obj\r<</ArtBox[0.0 0.0 100.0 100.0]/BleedBox[0.0 0.0 100.0 100.0]/Contents 1340 0 R/CropBox[0.0 0.0 100.0 100.0]/Group 1341 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 100.0 100.0]/Parent 1095 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 100.0 100.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1340 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\t464Q(Jw\u000f6PH/2P0P04T4\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0011?\r\nendstream\rendobj\r1341 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1338 0 obj\r<</Filter/FlateDecode/Length 198>>stream\r\nHdP\n0\u0010W\u000f$M6MzJO\"\u000f(>\u000e*?m\u0015\u0004fvv&dB]j2V\u0016\u001aT$>\u001a1H0^ꎌ\u0006\bؖ@\"$4>%\u001f\u001ann\u0004.)\u0014.0m\tC\u0013[|ʪ\u0010'}Ŏ\u0017VLC-\b`\u0012`$AoWR\u0010}jkdW\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0011:<\r\nendstream\rendobj\r1339 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1336 0 obj\r<</Filter/FlateDecode/Length 132>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C!40Q(Jw\u000f6PH/*T\u0000\n\u0002)\b%*rst\f!\u0006J\u0018\u0016p%T1\u0005\u00132@-4ʀ\u0000\u001a+\u0014rq\u0005B\\\u000e\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000Q'\r\nendstream\rendobj\r1337 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1334 0 obj\r<</Filter/FlateDecode/Length 98>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\u000241\u0007\u0016\nE\\\u0006\n\\F&\nf\n\n@Tʕ\u0005\u001b\u0019\u0018\u0018EJ\u0010\\\r\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0018\u0011\r\nendstream\rendobj\r1335 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1332 0 obj\r<</Filter/FlateDecode/Length 144>>stream\r\nHLOA\u000e@\f\u0015\u0001vW\u0017\u0018\u0013A\u000e\u0013Z\u0012ݙt\u000em'>1.]\u0002]{e{\u0012(Vab(FƴRUֈ;0\n˓^\tbmL\u001f\u001cÊùYl\tSgh\f~\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000@,\r\nendstream\rendobj\r1333 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1090 0 obj\r<</Count 5/Kids[1342 0 R 1343 0 R 1344 0 R 1345 0 R 1346 0 R]/Parent 56 0 R/Type/Pages>>\rendobj\r1091 0 obj\r<</Count 5/Kids[1347 0 R 1348 0 R 1349 0 R 1350 0 R 1351 0 R]/Parent 56 0 R/Type/Pages>>\rendobj\r1092 0 obj\r<</Count 5/Kids[1352 0 R 1353 0 R 1354 0 R 1355 0 R 1356 0 R]/Parent 56 0 R/Type/Pages>>\rendobj\r1093 0 obj\r<</Count 5/Kids[1357 0 R 1358 0 R 1359 0 R 1360 0 R 1361 0 R]/Parent 56 0 R/Type/Pages>>\rendobj\r1094 0 obj\r<</Count 5/Kids[1362 0 R 1363 0 R 1364 0 R 1365 0 R 1366 0 R]/Parent 56 0 R/Type/Pages>>\rendobj\r1362 0 obj\r<</ArtBox[3.5 3.25 16.75 16.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1367 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1368 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1094 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1363 0 obj\r<</ArtBox[4.0 4.0 25.0 25.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1369 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1370 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1094 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1364 0 obj\r<</ArtBox[4.0 4.0 25.0 25.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1371 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1372 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1094 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1365 0 obj\r<</ArtBox[4.0 6.0 25.0 25.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1373 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1374 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1094 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1366 0 obj\r<</ArtBox[4.0 5.99998 25.0 25.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1375 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1376 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1094 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1375 0 obj\r<</Filter/FlateDecode/Length 106>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\u00022YΥ\u001el^ed`kh\u0000DE\\i@\u0016Ɔ@u\u0016& \u0002\u001aP\u0010\f\u000f\u0005[\u000b\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001c]\r\nendstream\rendobj\r1376 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1373 0 obj\r<</Filter/FlateDecode/Length 108>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C!(Jw\u000f6PH/22Q0S5T\u0000T4Zc2\u000b\u0013s\u0010in\u0001R\rRdg``\bW\u0006և-\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000~\u001b\r\nendstream\rendobj\r1374 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1371 0 obj\r<</Filter/FlateDecode/Length 148>>stream\r\nHLOA\u000e0\f\u0015$ڤJA&x\u0002q`\u0007%LSSq\u001cM4\u0016X@ %aq;\u000e{\\&J\u001bcR\u0015\u0018AOY=+\u0001\u001d^qM\u001b,\u001bۨ\n,\u001ao9W$\u001b`>\u001a\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u000080\r\nendstream\rendobj\r1372 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1369 0 obj\r<</Filter/FlateDecode/Length 152>>stream\r\nHLOA\u000e0\f\u0015ڤlZw N\u0013B<\u00018\u0003\u0012R&Ԏ\u001dGj ?\u0014qTn[\u001crN02Q<]\u0019Ӈ!h.wzX~g}7#Hm&35ȶec\u001d&mV\u001a?fgOO\u001a>\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u00000\u00160\r\nendstream\rendobj\r1370 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1367 0 obj\r<</Filter/FlateDecode/Length 172>>stream\r\nHLOA\n0\u0010+\u0003Iwc[ӫQ\nBڃ\u000f(\u0007\u0015\u00076[T2\u0019)\u000e\tE\u0018m\u0002:Fb\u0018!}\u0007XJ-\tZm\u0007E\u0013#0c,gv\u0007nį\u001b+\u0017j3To*jKE[&7r^)5e\u0001+\rԓ\no\"h~Tp\u0015n9\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000F2\r\nendstream\rendobj\r1368 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1357 0 obj\r<</ArtBox[3.0 1.99992 18.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1377 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1378 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1093 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1358 0 obj\r<</ArtBox[2.99994 2.0 18.0 17.0001]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1379 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1380 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1093 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1359 0 obj\r<</ArtBox[0.0 0.0 30.0 30.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1381 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1382 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1093 0 R/Resources<</ExtGState<</GS0 603 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1383 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1360 0 obj\r<</ArtBox[3.5 3.24998 16.75 16.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1384 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1385 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1093 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1361 0 obj\r<</ArtBox[3.5 3.25 16.75 16.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1386 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1387 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1093 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1386 0 obj\r<</Filter/FlateDecode/Length 172>>stream\r\nHLOK\n0\u0010)\u0005̄~ҭQ\nBڅ\u0007(\u000b\u0015\u000b$)*yy0\u0013&\u0010l#h7(\"I\u0016b\fy\u0013\u001e*mZI\u0015=\tZ'E\u000b#\u00100S\u0001;\u0018m'0ՊLS\f\u001d7\u0015V:LnNyT\tp_ix\u0017A[q>\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00012\r\nendstream\rendobj\r1387 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1384 0 obj\r<</Filter/FlateDecode/Length 172>>stream\r\nHLOA\n0\u0010+\u0003IvC*\u0005H\u0007\u0014у\nՃw\t*\fLCзͶ\u0005zGG31}\u0007\u0017Xؑ`nd\\^4Cz\u0004TLwZ.\tN:\t\\U0[j4\u0006Eg%,_2H\u0003\u0017AUji\u001f\u001f\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u00003K\r\nendstream\rendobj\r1385 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1381 0 obj\r<</Filter/FlateDecode/Length 116>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!1\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u0006z\u0016\u0016F\n\u0006z\u0010(\u001d\u0010DLA@\u0012dN\u001a6\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001b[\r\nendstream\rendobj\r1382 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1383 0 obj\r<</BBox[-2.0 31.0 30.0 0.0]/Group 1388 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1389 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1390 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 31 -2 0 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1388 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1390 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 31/Intent/RelativeColorimetric/Length 57/Name/X/SMask 1391 0 R/Subtype/Image/Type/XObject/Width 32>>stream\r\nHb` \u00020b\u0005e*pKC\u0014\u0010'\rR0*?*?o`\u000b\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000]}\u0003G\r\nendstream\rendobj\r1391 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 32>>/Filter/FlateDecode/Height 31/Intent/RelativeColorimetric/Length 268/Name/X/Subtype/Image/Type/XObject/Width 32>>stream\r\nH;\u000e@\u0010%.XP\u0010\b\u0014VT\u0014HG\u0000T\u0012\u0005gXn\u0005h\u001bP\u0011J;Bc\u000f\u0013\u0001of7g\u0001!\u000bBRa)J\u0007\u0014賂\bLQ5ô0\rMU0\u0015Pm6>\\WN튾\u0006>Nx\u001f\u0006۵<\u001e LwQ\u0000xVSQsձ\u0006U\u0007T20+OM\u0001ms*5M/ʫ\u000f@n<Ly\u001fC_Fҷ\u0007\u001e'E\r\u0015\u0018.7?dc\u0017?v?\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000Kz\r\nendstream\rendobj\r1389 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1392 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1392 0 obj\r<</BC 1393 0 R/G 1394 0 R/S/Luminosity/Type/Mask>>\rendobj\r1393 0 obj\r[0.0 0.0 0.0]\rendobj\r1394 0 obj\r<</BBox[-2.0 31.0 30.0 0.0]/Group 1395 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1396 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 31 -2 0 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1395 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1396 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 32>>/Filter/FlateDecode/Height 31/Intent/RelativeColorimetric/Length 268/Name/X/Subtype/Image/Type/XObject/Width 32>>stream\r\nH;\u000e@\u0010%.XP\u0010\b\u0014VT\u0014HG\u0000T\u0012\u0005gXn\u0005h\u001bP\u0011J;Bc\u000f\u0013\u0001of7g\u0001!\u000bBRa)J\u0007\u0014賂\bLQ5ô0\rMU0\u0015Pm6>\\WN튾\u0006>Nx\u001f\u0006۵<\u001e LwQ\u0000xVSQsձ\u0006U\u0007T20+OM\u0001ms*5M/ʫ\u000f@n<Ly\u001fC_Fҷ\u0007\u001e'E\r\u0015\u0018.7?dc\u0017?v?\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000Kz\r\nendstream\rendobj\r1379 0 obj\r<</Filter/FlateDecode/Length 424>>stream\r\nHLSIn\u001bA\f+i\u001a9I\b\u001c\u0000al\u0001Wu˓@\u0014f\u0015I~t9x8KyLL\u001fA%SxS\u0012\u0013%~Qy\u001b>hǤFUb-\u00166\u0015΢,I\u000bQJTG[\u00006͖aNJ%yA[\u001b\u0005\u0016\u0007=m\"){r4K@^m*9\u0005\u0003\u0015u\u0000\u000f1\u000f\\v!\u0012\u001dn=y2a\u0011U\u001d&\u001c \u0004T4Z-\u00154V\u001dMHm\u001c!4\u0017c;=\f\u0006_Y\u0006yc\u0003#\u0003XF\u000e! Ч(tkĆ\u0019Vl\nZ#l\u0005gkfḎP$w \u0006\u001c \u0000yÒ1\u0003;Pi\u0004@LgUjb\u001c,GE\u00025\u001dʧiz\u001a3~\u000f߃9=p]k\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000iJ\r\nendstream\rendobj\r1380 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1377 0 obj\r<</Filter/FlateDecode/Length 564>>stream\r\nHTTnU1\f+\u000377\u0014ĪB\u0015\u000b>h+NKѹ798=뷛zZpM\u0013gQKo\\l\\_\u001f^\u001f\u0017\u0018J1\rS\\z\u001bo>bmBM\u0004\\v{lv}\u0004^\u000fk~ֹ^Vi\u00012\"Qo\b\u0006\u0015pT\u000f(\u001ch\u0002&d\\=(yP/\u0003P #\u0013](1Ht\u0010lK?gLҶ8h\t+\":Szؔ<{3\u001a\u0000Fcފb\"km\u0018 \u0007Ci\u0007\u0019+T^eA\u001eY\u0001 gr7{\u001b\b\u0003\u00024\u0002u=N@T?4$:5\u000b\u0007e.\u0000'#f9\u0017Օmk\u0000V}\u0003>\t*\u0010Em\r F|/\u000b\u001fOquN\u0012z\"P'! RxI\"5\u0006۲R1\u0005hZ_b\u001dŅd\rBB*і#*|TGr߈{rQ֑^\u001d2oyN\u001a2E,ťi^+\u0012\u0019\\/\u0002\\Cەm1I'\n6\u0018\u001c\u0005]~Vݕ\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000m*%\r\nendstream\rendobj\r1378 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1352 0 obj\r<</ArtBox[4.0 5.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1397 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1398 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1092 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1353 0 obj\r<</ArtBox[1.0 2.99998 19.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1399 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1400 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1092 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1354 0 obj\r<</ArtBox[2.0 1.99998 18.0 18.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1401 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1402 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1092 0 R/Resources<</ExtGState<</GS0 151 0 R/GS1 843 0 R/GS2 844 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1403 0 R/Fm1 1404 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1355 0 obj\r<</ArtBox[3.0 3.0 18.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1405 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1406 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1092 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1356 0 obj\r<</ArtBox[2.5 2.5 17.5 17.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1407 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1408 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1092 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1407 0 obj\r<</Filter/FlateDecode/Length 235>>stream\r\nHĔ\n@\u0010)\u00050kjf!\u0004\u0012#\u0004\u0019\u0017C㮭s\u0011Yu(QեͶDP.D.ea\f\u00120lAU\u0005>7a!kLs\u0007}\u0003iu\u001f,g/D=-|+e9{\",޺\u0005S\u00057v\u001cm\u0007]aQ?蜻},B\b\"t_\u000f\u00079e\u0007D\u001fN\u0005\u000eTދc\u0010\u001fCxĞy\u0011Tx\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000V\r\nendstream\rendobj\r1408 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1405 0 obj\r<</Filter/FlateDecode/Length 201>>stream\r\nH\\A\n\u00021\fE9ſdL:m\"\b\"\u0003\f\"#\u000boji~v7\u000e\u000e\u0000Zmmi \u0007y\u00138,8I6Zlpyѣd\u001cW(;\u000bƉ<Qӱ\u00044}Є\u0004\f5G\u001a\u0015dKs-ac)p\u0019Q!}J\u001bM&*n#\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000`<#\r\nendstream\rendobj\r1406 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1401 0 obj\r<</Filter/FlateDecode/Length 175>>stream\r\nH\\PA\n0\u0010+\u0003Mv*jXV\u0001\"J$\u0007kI$Co+Ʀ@֊ϔdj\"Yz]錑\u0005U\b\fؐcMϸi\rAJH\u0002.\u0003Ef 1\u0017;1,~D[.\u0013CԭĞXXzR&ƒ\u0018qsMgd-}EG_\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000<v9\r\nendstream\rendobj\r1402 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1403 0 obj\r<</BBox[4.64706 10.5882 10.5882 4.64705]/Group 1409 0 R/Length 111/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.922 1 0.992 RG\n2 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 4.6471 9.5882 cm\n0 0 m\n4.941 0 l\n4.941 -4.941 l\nS\nQ\n\r\nendstream\rendobj\r1404 0 obj\r<</BBox[4.64706 14.7059 14.7059 4.64705]/Group 1410 0 R/Length 112/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.922 1 0.992 RG\n2 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 4.6471 13.7059 cm\n0 0 m\n9.059 0 l\n9.059 -9.059 l\nS\nQ\n\r\nendstream\rendobj\r1410 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1409 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1399 0 obj\r<</Filter/FlateDecode/Length 270>>stream\r\nHSKn@\f\u0014\u0000m\u0006\n(J\u0001P*\".rS&QOa?iD:b\u001b\t_FN_uP\u001c\u0005\bJ\u00077P\u001aDQ x=B=\u0010\u001eb^%N#Ng0\f\u0015KU<+nR\u0015V(C{O\u0005'(\tG˒qb\u0012\t\fK&q\t&\u0016bn|%Bjo?aVox^2r{M6m}V\u0016V]CCvd.Sek.ՑQ8\\x/\"\u0011ʾ\u0017/8\u000fүwUw+=\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000;\r\nendstream\rendobj\r1400 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1397 0 obj\r<</Filter/FlateDecode/Length 145>>stream\r\nHt\n@\fD̺ۭWW)\bEA\u0010{\u001e}Vԃ%dB&Cb-]ogP\u0017\u0019z$\u0001j7\u001b\u0014I\u0015(u\u001bud\u000f]2aq\u001f.;\u001frhtmSO\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000/Q\r\nendstream\rendobj\r1398 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1347 0 obj\r<</ArtBox[6.99998 5.99963 13.0 14.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1411 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1412 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1091 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1348 0 obj\r<</ArtBox[6.0 6.0 13.0 13.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1413 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1414 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1091 0 R/Resources<</ExtGState<</GS0 1415 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1416 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1349 0 obj\r<</ArtBox[6.0 6.0 13.0 13.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1417 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1418 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1091 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1350 0 obj\r<</ArtBox[5.99998 6.0 13.0 13.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1419 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1420 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1091 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1351 0 obj\r<</ArtBox[4.0 4.99998 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1421 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1422 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1091 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1421 0 obj\r<</Filter/FlateDecode/Length 117>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\u0011\fr2R(W0T\u0002b/z`\u0003bB \u0000\b\r\u0015L\u0015\fM\u0015s@\\.C\u0010\u0015\u0015Ĉ\u0012K*̰\u0000{\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000_*E\r\nendstream\rendobj\r1422 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1419 0 obj\r<</Filter/FlateDecode/Length 156>>stream\r\nHDOK\n \u0010)\u0005Աjmm*E\u000f\u0010ڬZHr!E}~\u0003c\u0019f̌%imJSJ'\u0001}\u0012\b>`[\u001ee\u0015\u0016,:$\u001d0\\\u0010I\u0005]xŌ輥^ﶙp\u000frij{M\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000G-\r\nendstream\rendobj\r1420 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1417 0 obj\r<</Filter/FlateDecode/Length 200>>stream\r\nHLI\u000e0\fE>/C V\u0015Xp\b\u0002\u0012vS(m?Gѷ\u00018\u0018<\u0007Aג\u0005\fm\u0013\t\u000fQ>'4*\u001cbΠw\u0017\u0016hxYUD뱼A7U,s%\u0014:\u000eS\u0016>s\u001bm*M-?\u0013\u0004t:We\u001ddP\u001d3;8ɫ\u00025\u00145If\\\u0005S\t~\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000uD\r\nendstream\rendobj\r1418 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1413 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\u0011\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002,\u0012!\r\nendstream\rendobj\r1414 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1416 0 obj\r<</BBox[6.0 13.0 13.0 6.0]/Group 1423 0 R/Length 176/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.376 0.49 0.545 rg\n/GS0 gs\nq 1 0 0 1 13 9.5 cm\n0 0 m\n0 -1.933 -1.567 -3.5 -3.5 -3.5 c\n-5.433 -3.5 -7 -1.933 -7 0 c\n-7 1.933 -5.433 3.5 -3.5 3.5 c\n-1.567 3.5 0 1.933 0 0 c\nf\nQ\n\r\nendstream\rendobj\r1423 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1415 0 obj\r<</AIS false/BM/Normal/CA 0.5/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.5/op false>>\rendobj\r1411 0 obj\r<</Filter/FlateDecode/Length 182>>stream\r\nHdA\u000e0\u0010Es\u0001\u0019\u0002݊\u00151\u0003\u0010ŅOѴ}3s\u000b۷ñ\u0005z--6GE\u0001L\u001b\u0019V\bX@\u001c1V\u0016JBNJJ0,9Aw\u001ah[wg\u0015K\u0015@'\rFl\u0017ԉN5&rcꈍS9zxhԗ\u000f\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u00005!\r\nendstream\rendobj\r1412 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1342 0 obj\r<</ArtBox[4.0 2.94736 15.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1424 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1425 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1090 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1343 0 obj\r<</ArtBox[3.0 3.0 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1426 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1427 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1090 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1344 0 obj\r<</ArtBox[3.0 2.99998 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1428 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1429 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1090 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1345 0 obj\r<</ArtBox[3.0 2.99998 16.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1430 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1431 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1090 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1346 0 obj\r<</ArtBox[4.5 5.25735 14.7426 15.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1432 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1433 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1090 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1432 0 obj\r<</Filter/FlateDecode/Length 234>>stream\r\nH|Qj\u00031\f+\u0007V+k7%P\b%͡\u001f\u0014?D^o\u001e\u0014c4%<N\u0018wi3w\u0006cOiOI5w|\t¡\u001a\u0010q{\u0010|\u0019\nPXM\u0005ZDgxlT\u0011Y>\u001c*\u000f5g`/\u000fC)2e\u001fnFKsZ#ѡ9Kg\u0017Cdq+U2Ľ8uE@{RqlASjK>\u0012:\u001e\u0017\u0014a=\u001cS/\u000b\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\bSr\r\nendstream\rendobj\r1433 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1430 0 obj\r<</Filter/FlateDecode/Length 165>>stream\r\nH,OA\u000e \f\u0015\u0000mױijv\u0003K;%P1\u00013#\fqe}\u0012$MZ4\u000f#}Y\"ŘvZ!`\r$Dl\u0013gCR'S%B\u0015j1b,јAi\nr8\rMi]dQKcH\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000.\r\nendstream\rendobj\r1431 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1428 0 obj\r<</Filter/FlateDecode/Length 162>>stream\r\nHLO1\u000e0\f@\u001a;m$X)B\u0015\u0003\u000fK\u0012v\u00019]g'\u001eq\u0019k\u000f\rKJTWн/qs>uDdL;\u0010@2ZP\u0010g&gAvw\u0012AZ0Kk̠4Y\u001cNC*hQ|0E\u0016>4\u0007G\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000m/\b\r\nendstream\rendobj\r1429 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1426 0 obj\r<</Filter/FlateDecode/Length 162>>stream\r\nH,1\u000e \fEw_2d-:EUԡ\u0007@mRKqd- %z+Gt](A\n\u000f\r\"`(\u0007>S|\u00126\u00135\u0018ѣd\u0002\u00185\r,[¨(bN3\u0019vS,:u>F*8 J_s\u0013\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000Z.-\r\nendstream\rendobj\r1427 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1424 0 obj\r<</Filter/FlateDecode/Length 477>>stream\r\nHlSKn[1\f\u0014iRm\u0016]\u0005EE\u000fЦ\u000b@\u0003\u001dR҃\u0003\u0014϶f!9nt}\t}|\t?׹s-\bE\\}\u0019~П  o+_wፔ\u0004fJt\u0006c\u0000\u001cA\u0000\\6V:qNc&Zj@\u0007Q\u0013\"t\u0005ۊXRg\u0012\u0011+<?T[(qc5VSh8l\f+U8\rsA\u0005\u0003&=a!(F٪ܬN0ؐ<YV4#\u001bbAG6@,YGu\u00128kC\\\f\u001e͏e\f;u=\u0002'X½<PI)Uƪ+~\tV9ea&\u0012ia\u00176miHanaW\r`\u000e}\u001c)V)\n:R]h95`nW-N\u000678\u0017>sn_ly3 ݌*R\u000fVX{\u0003)nI\u0015N\u0012z\bR\tm{-6}M6\u001a1wW\u001c\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\f\r\nendstream\rendobj\r1425 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1085 0 obj\r<</Count 5/Kids[1434 0 R 1435 0 R 1436 0 R 1437 0 R 1438 0 R]/Parent 55 0 R/Type/Pages>>\rendobj\r1086 0 obj\r<</Count 5/Kids[1439 0 R 1440 0 R 1441 0 R 1442 0 R 1443 0 R]/Parent 55 0 R/Type/Pages>>\rendobj\r1087 0 obj\r<</Count 5/Kids[1444 0 R 1445 0 R 1446 0 R 1447 0 R 1448 0 R]/Parent 55 0 R/Type/Pages>>\rendobj\r1088 0 obj\r<</Count 5/Kids[1449 0 R 1450 0 R 1451 0 R 1452 0 R 1453 0 R]/Parent 55 0 R/Type/Pages>>\rendobj\r1089 0 obj\r<</Count 5/Kids[1454 0 R 1455 0 R 1456 0 R 1457 0 R 1458 0 R]/Parent 55 0 R/Type/Pages>>\rendobj\r1454 0 obj\r<</ArtBox[5.0 3.0 15.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1459 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1460 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1089 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1455 0 obj\r<</ArtBox[5.0 3.0 15.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1461 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1462 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1089 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1456 0 obj\r<</ArtBox[5.0 3.0 15.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1463 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1464 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1089 0 R/Resources<</ExtGState<</GS0 1415 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1465 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1457 0 obj\r<</ArtBox[4.0 2.94736 15.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1466 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1467 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1089 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1458 0 obj\r<</ArtBox[4.0 2.94736 15.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1468 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1469 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1089 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1468 0 obj\r<</Filter/FlateDecode/Length 474>>stream\r\nHlTKn[1\f\u0014iRm\u0016]\u0005EE\u000fЦ\u000b@\u0003\u001dR҃\u0003\u0014~!9}vM\u001b/Ox]Ω \u0014sgA\u001e/FJGI3%:^p\u0011n\u0001E96\u0000>ǹlt\r㌝FMԀ\u000ec*D\u0000\n\u0011\u00183ǈ?G\u0015\u001f-8b\f\u0014$\u001aږ2T4:Z\u000b\u0007Lz2CP\"UYKf!}+\u001b\u001byhF7l\u0018lYLcͳ$Zq׆\u0019j\u0015=\u001f\u0018`)w\\{\u0004\u0011O,\u001ec{pBSpu=UW\u0010\u0000sjЬng4\t=\u001fvݖNK\u001a6j400\u0006jr0\u000e}\u001c}]S\u0014trjb]8u7:V\nNpf\u0019\u000f|]ݾ8\u0015f@\u0019U\u001eR\u0007R*.څCl)z8k\u0014wB^];n6\u001a1gW\u001f9\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r1469 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1466 0 obj\r<</Filter/FlateDecode/Length 474>>stream\r\nHlSKn[1\f\u0014iQm\u0016]\u0005EE\u000e)@d8@lsFO\u001c#BKo/\u0014~<KK\u001f!R\tDB\u0012\t!Dw׿C\u0017\bIL{P\u001eN{p\u0012N]!q\u001b\u000b\u001da{\u001ds=(\u001a\u0001}+:\u000e Y5-\u0002^\u0017=ў#ǻn+e.8\u000e}\r M\u0015bRrQ\\\u001a9\u0001*:\u0002\u0001`-hFPYܬA+\u0019lƱyZ\u0015l\u0003k3ʠ\u00137\u001cUcf$i[Ǿ\u0005j\r3\u001f`\f\u001aF\u0002\u0016\u001c15QVy4=Vr\f2]C\u0006ԩI.\u0018\u0012zҾm.-ɜyj(͂Hw[:J[X\u0015\u0005-\u001b^\\7)fn3uZS2GՋQ{cMx{\u0013*sځ{1\u0005sUo&RA\u0002kOG#lQEXY8Qh)z8TsB֋^ͱn6_\u0007VWov@\f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000?\u001c\r\nendstream\rendobj\r1467 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1463 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\u0011\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002,\u0012!\r\nendstream\rendobj\r1464 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1465 0 obj\r<</BBox[5.0 16.0 15.0 3.0]/Group 1470 0 R/Length 377/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.922 1 0.992 rg\n/GS0 gs\nq 1 0 0 1 7.3333 3 cm\n0 0 m\n-1.333 0 l\n-1.883 0 -2.333 0.45 -2.333 1 c\n-2.333 12 l\n-2.333 12.55 -1.883 13 -1.333 13 c\n0 13 l\n0.55 13 1 12.55 1 12 c\n1 1 l\n1 0.45 0.55 0 0 0 c\nf\nQ\nq 1 0 0 1 14 3 cm\n0 0 m\n-1.333 0 l\n-1.883 0 -2.333 0.45 -2.333 1 c\n-2.333 12 l\n-2.333 12.55 -1.883 13 -1.333 13 c\n0 13 l\n0.55 13 1 12.55 1 12 c\n1 1 l\n1 0.45 0.55 0 0 0 c\nf\nQ\n\r\nendstream\rendobj\r1470 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1461 0 obj\r<</Filter/FlateDecode/Length 182>>stream\r\nHQA\u000e \u0010+\u0003\u0005iSc\u001a\u000f>h/I\u0013\u0007Oe0l\u0006!8\u001cO\u0001r\u001exBiVqCx3?ٵ\u001e$rs޲B\u0018x.xE\u0012H\"\u0013\u0004piw:iwlZjE\u0011E̜\nM\u000eE*,ljy$k\\(O\u0019&_4\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000HR\r\nendstream\rendobj\r1462 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1459 0 obj\r<</Filter/FlateDecode/Length 179>>stream\r\nHQ\n0\u0010W\u000f4j\u0015OE\u0007? h/lb`6\u001df'[\u0007w\u0001s\u0007L>SE\u0002ʴ\u000b)\u000f%c[cQ\u001e0~d\"0\u0014\u0007WqBŘY\n5p2ض\u00062sn6Ҵ\u001bv\r5V\u0011EL\n5,.\u000b\u001fI\"KZ\u0006\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000cSJ\r\nendstream\rendobj\r1460 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1449 0 obj\r<</ArtBox[0.0 0.0 50.0 30.0]/BleedBox[0.0 0.0 50.0 30.0]/Contents 1471 0 R/CropBox[0.0 0.0 50.0 30.0]/Group 1472 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 30.0]/Parent 1088 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1473 0 R>>>>/TrimBox[0.0 0.0 50.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1450 0 obj\r<</ArtBox[4.0 1.99998 16.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1474 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1475 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1088 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1451 0 obj\r<</ArtBox[4.0 1.99998 16.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1476 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1477 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1088 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1452 0 obj\r<</ArtBox[4.0 1.99998 16.0 17.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1478 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1479 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1088 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1453 0 obj\r<</ArtBox[4.99998 3.0 15.0 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1480 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1481 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1088 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1480 0 obj\r<</Filter/FlateDecode/Length 180>>stream\r\nHQA\u000e0\u0010+\u0003\u0002\u0011D\f\u0003\u001a\u0002&\u0013g$>n3n7v}\u0017p<usgIH@v\\\u001frKkcF-`|b\"Cqp%\u0017JYLPH'McYsUsEFZۍ,?aTtufCV\t,j~d-<eXvA>\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000N\u0013Ro\r\nendstream\rendobj\r1481 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1478 0 obj\r<</Filter/FlateDecode/Length 389>>stream\r\nHTSN\u00031\f+\u0003qW\nT\u0003\u001frhZ_bd3=v&mOa\u001fyOe\u0019!\u001e\u000b\u0014{t\u001fO)f-NJL\u0001\u000fS3\u0017v\u0016\u0001\u0001$T8´jt\u0015t/\u0003\n\r摒\u0005KK4KZu\fjUS\t$t̄]{6^\u00058hU\u0007>&Π\u0012+QѡO83\u0015߄i\u0016_ ;uύ2\u001dj՘Jc`{׳C\u001cg4SRxV\u0014;\u001d\"b?\u0006\u0014+\u001a \t\u001a\"v;u]ǡ,e楢At\u0005\fn+猋<2\u0007R݁Dra77%=o4Xz,Þ<{X煓\u001cF\u0005Ԍo߾\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r1479 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1476 0 obj\r<</Filter/FlateDecode/Length 388>>stream\r\nHTSN\u00031\f+\u0003yJA*Tq\u0003VP\u000e-RKlUci9\u0003==ɽ\u001c,\u0016b\u000b]]\u000e}Џ\u000b~L@_w%P֋\u0013zqC\u0000\\2D1ui4\u0006(.{\u00050q`BbY\n]\u0017laUS\n$ě]Q{V\u0012plQ\t\u0002\u001bo>f.)6bØ\u000bU\u0013̭BvT_:kka2\u0010CU1lǐC3)5u<N\u001b\nŝ\u0001WYPMIo\u0016g\u0015TXk@ۃ$hoZmXfuCif.&%\u0013\u001a\u0010\u0005\u0017yf\u001a\u0012]C\\#m\u001bʛ\u0012ƞW\u001a4U<NfOy,I\u000e\u00011[\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000|\u0014\r\nendstream\rendobj\r1477 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1474 0 obj\r<</Filter/FlateDecode/Length 390>>stream\r\nHTSN\u00031\f+\u0003JA*Tq\u0003VP\u000e-RKlUmvƱDi9\u0003==ɽ\u001c,##tu~;o~\\]B[^\u0003~Ux2ϴ^ҋ\u0005\u001f\u0000\u0002pI\fXbS\\V͉rj\u0001#\r摒#\u001dh|\u0005뱏*܄u\u0012N:f.x=D\u0011X\u0018aUOg3hJsTt\u0013Lŷ4s/:Z\u000ePjL1Sgu_lz]3|qF3%jPp\u0015\u0018\rپ:kbV\u0003Z\u001f$A[ZC\u0004z.w:8\u0005|ym<d\u0010\u001d~i\bn\u0006790ÓTw .B[.\u0004\u0006KU'<y$l\u00015/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ê9\r\nendstream\rendobj\r1475 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1471 0 obj\r<</Filter/FlateDecode/Length 302>>stream\r\nHLRN0\f}W\u0007n5t\u000b\u0013@\u0003&\u0018\u000f-h%l'٪q|oj:cw\t\u001f3A\\q\u0000aO\b'|^vo?\rtO+\u0017@y@\u0003K=gQ/H0r\t;`7+\u0004L\t8L#}O+ML$\u0016lv\u0001\u0019Z@r#\u001b2ڒ4[F\u000b|×E{W\u0001ʸiӕ\u000b\u0004M3\u0018$+%\r3`м1j\u000f,.\u0004vBKxT\u000f`ҮRag+zܶrKŚE\u0015U\fRV\u001d\t[4ȴQ59mWpKQ7;?\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000˭x\r\nendstream\rendobj\r1472 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1473 0 obj\r<</BBox[-1.0 32.0 51.0 -1.0]/Group 1482 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1483 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1484 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n52 0 0 33 -1 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1482 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1484 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 90/Name/X/SMask 1485 0 R/Subtype/Image/Type/XObject/Width 52>>stream\r\nH1\n\u00000\b\u0004AS\b\u0001A\u0012o\u0003~:]q2(Yd\u0013IF\nA\u0001\t\u0004J1ckdȟ C:z}g\u0005P\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000b\u001d\u0005y\r\nendstream\rendobj\r1485 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 52>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 594/Name/X/Subtype/Image/Type/XObject/Width 52>>stream\r\nHb`\b022\u0004X50spb\u0005\u001cl,\u0018\u0018ٸ$$\u0000I\t1a>.6f\u0014ML,\u0012Z\u0016X\u0004?'\u000b\u0013#\u0016Vn\u0011%C\u0007Ĥd\f\u0018\u0017`$\n\u0004#i\u00177m\u001c,`ִ0;\rq\u001eV&\u001e\u0016I]w\u001f:v\u001c\u000b8vhM)n,\u0010\u0018Yu<zV\u001f|ѓXGw/\u001fZ՝!\t\t\b&\u000eaug7,뗏^ߝb\bG2s\u001f\u0017+GW5\u0019Jp1\tixU.9Ͽ\u0000p\u001c\u0007E>úx\u0003\u0016.o\u0016\u00069C$vʁ\u0007\u0002=QF\u001cf4Ou׿#3,8z,\u001cߞa#LO/ʱa&m8$Q\u0005\u001c\u0006q\u000e=\u001c\u000bs\u001baD;\u001f\tۧ{'ǛÀMX˿aW\t+\u001btEAzX\u0014\u001drf\u001fp:uRg\u0005%8f.\tðU\u001f\u0011Jo$\r8~%OST-{\u0015\t\u0007I˧-AZy@NCVFV9J^y\rFb@\n\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ܨ\u0003%\r\nendstream\rendobj\r1483 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1486 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1486 0 obj\r<</BC 1487 0 R/G 1488 0 R/S/Luminosity/Type/Mask>>\rendobj\r1487 0 obj\r[0.0 0.0 0.0]\rendobj\r1488 0 obj\r<</BBox[-1.0 32.0 51.0 -1.0]/Group 1489 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1490 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n52 0 0 33 -1 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1489 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1490 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 52>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 594/Name/X/Subtype/Image/Type/XObject/Width 52>>stream\r\nHb`\b022\u0004X50spb\u0005\u001cl,\u0018\u0018ٸ$$\u0000I\t1a>.6f\u0014ML,\u0012Z\u0016X\u0004?'\u000b\u0013#\u0016Vn\u0011%C\u0007Ĥd\f\u0018\u0017`$\n\u0004#i\u00177m\u001c,`ִ0;\rq\u001eV&\u001e\u0016I]w\u001f:v\u001c\u000b8vhM)n,\u0010\u0018Yu<zV\u001f|ѓXGw/\u001fZ՝!\t\t\b&\u000eaug7,뗏^ߝb\bG2s\u001f\u0017+GW5\u0019Jp1\tixU.9Ͽ\u0000p\u001c\u0007E>úx\u0003\u0016.o\u0016\u00069C$vʁ\u0007\u0002=QF\u001cf4Ou׿#3,8z,\u001cߞa#LO/ʱa&m8$Q\u0005\u001c\u0006q\u000e=\u001c\u000bs\u001baD;\u001f\tۧ{'ǛÀMX˿aW\t+\u001btEAzX\u0014\u001drf\u001fp:uRg\u0005%8f.\tðU\u001f\u0011Jo$\r8~%OST-{\u0015\t\u0007I˧-AZy@NCVFV9J^y\rFb@\n\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ܨ\u0003%\r\nendstream\rendobj\r1444 0 obj\r<</ArtBox[2.0 2.0 38.0 38.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 1491 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 1492 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 1087 0 R/Resources<</ExtGState<</GS0 204 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1493 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1445 0 obj\r<</ArtBox[0.0 0.0 26.0 33.0]/BleedBox[0.0 0.0 26.0 33.0]/Contents 1494 0 R/CropBox[0.0 0.0 26.0 33.0]/Group 1495 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 26.0 33.0]/Parent 1087 0 R/Resources<</ExtGState<</GS0 1496 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 1497 0 R>>/XObject<</Fm0 1498 0 R>>>>/TrimBox[0.0 0.0 26.0 33.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1446 0 obj\r<</ArtBox[0.0 0.0 50.0 30.0]/BleedBox[0.0 0.0 50.0 30.0]/Contents 1499 0 R/CropBox[0.0 0.0 50.0 30.0]/Group 1500 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 30.0]/Parent 1087 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1501 0 R>>>>/TrimBox[0.0 0.0 50.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1447 0 obj\r<</ArtBox[0.0 0.0 50.0 30.0]/BleedBox[0.0 0.0 50.0 30.0]/Contents 1502 0 R/CropBox[0.0 0.0 50.0 30.0]/Group 1503 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 30.0]/Parent 1087 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1473 0 R>>>>/TrimBox[0.0 0.0 50.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1448 0 obj\r<</ArtBox[0.0 0.0 50.0 30.0]/BleedBox[0.0 0.0 50.0 30.0]/Contents 1504 0 R/CropBox[0.0 0.0 50.0 30.0]/Group 1505 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 30.0]/Parent 1087 0 R/Resources<</ExtGState<</GS0 208 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1473 0 R>>>>/TrimBox[0.0 0.0 50.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1504 0 obj\r<</Filter/FlateDecode/Length 302>>stream\r\nHLRKN0\f\u0014@RMfK\u00070B#8@\u0005â\u0005p\t;m^U\u0019Lp\u0011\u001ezt\u0005\b{H\\?\u0003{~#<{\b\u000fpRF~\u0018N\nx=MvAԇh߲\u001c7p8(tL\u0018|] 2 1\u001f'+Hh\u000eIMl4jK*l\t\r_֯O\"֚OI{\u0006\f6s\nNS\u0006$8e0\r\u0006\r^W\u0013Uq\u000bP+ʑ5⒫\\$\u0007uiWK\u0018\rbVxXhDtRV2*\u00136i\u0017X\u001bsepKQ/v\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000x6\r\nendstream\rendobj\r1505 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1502 0 obj\r<</Filter/FlateDecode/Length 303>>stream\r\nHLRN0\f}W\u0007n5t\u000b\u0013@\u0003&\u0018\u000f-h%|IJ[|sc[^g\u000esx+\u000b$\u0013A\u0013>G.緄?!_5\u0017IϾYe\u000b\u0012\n)'QUB\u0006\u0012\u000eqFC;\u0001竌QѸ\u0000\u000fĊT#+VT+7|i0kk\u0014~}b@\u001e7ms v\n\u0003\u0017\u0004ɨaJ:\u0018l~\u0007\u0016\u0015y<A@n9b=d\u0003躤\u001cy)\u0017%=n[b\"m\u0006U\u0017C>ac\u0003O\u001bWژӦzͼ[:4Vn\u0011\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0004x>\r\nendstream\rendobj\r1503 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1499 0 obj\r<</Filter/FlateDecode/Length 307>>stream\r\nHLRN0\f+\u0003I\u00137i+]\n@\u0003*X\u000e-h\u0018[Ǚ;ڽ\u001dg\u000f+W\\]q8:6\bO\u001f\\vo _NȜ)|=̫A\u001c.y#\u0007@\u001d\u0007\u001bҐ\u00112(|\u0016r>i\\IFHjbEA,\u001d\b\u000e7}_;5;M~>\u00002lʕ\fZڕ\u0004\tv\r{Q\u0006+\u0013W\u0011BB.Ǖbre*IH,uy\u0000]\u0017\\E+aT8\fY\u000bwV.uyFʪSFe\u001a\u0019wU-kc5+\u0016n-\u001f\u0000\u0000\u0000\u0000\u0000\u0003\u00009x)\r\nendstream\rendobj\r1500 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1501 0 obj\r<</BBox[0.0 32.0 51.0 -1.0]/Group 1506 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1507 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1508 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n51 0 0 33 0 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1506 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1508 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 92/Name/X/SMask 1509 0 R/Subtype/Image/Type/XObject/Width 51>>stream\r\nH1\n\u0000 \fCv\u0010B\u0017\\4s$^E!ib\u0019A\u0010⺘F' ?yܹdBW \u0004\u0018YK[\f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005Z\r\nendstream\rendobj\r1509 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 51>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 593/Name/X/Subtype/Image/Type/XObject/Width 51>>stream\r\nHb`\u0004022\u0002X3spb\u0003\u001cl,\u0018\u0018ٸ$$00\u001f\u0017\u001b3\u001eF&\u0016N~\tE-CSs\u000bL`nj(Ĉ[D/\".1)\u0019\u001d$%E9\u0018*p\u0000uHhڅ4M5\u0007\u0013̚א\u0013f!\u0004\u0002!4{Cǎccvݔ-\u0002[\\#gw\u001f=y\t<{Ъ\f7\rQNH\u00180q\bfo<s/_a_>wz}w\u0012?\u001b#\u0012\u001eY˄\u001e_l\u001f\u001e^\u0014f(\f&Uģ?\u001dýCs\u001c\u0014@ab\u0017\u000fv\u000f:@z_[\u00182&\u000e\t)\u0007\u001e|[\u0007PwG\u0019s\u0000ÙS<q'_L\u0004kHs7Z~{vr~,73Z??(^h̒<G\u0005^\u0016M\u001dz\u000f\u0001<9>\u00170v1Èw>\u0012\bOO7\u0003{MX˿aW+\u001btEAZX\u0014\u001drf\u001f`:)\u0012\u00193aXӪӏ\bMF4\u0006t\u0019]JDd`I)ѽ\u0002c$JpN\u0016 )QSSZU&CtV\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000S+\r\nendstream\rendobj\r1507 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1510 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1510 0 obj\r<</BC 1511 0 R/G 1512 0 R/S/Luminosity/Type/Mask>>\rendobj\r1511 0 obj\r[0.0 0.0 0.0]\rendobj\r1512 0 obj\r<</BBox[0.0 32.0 51.0 -1.0]/Group 1513 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1514 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n51 0 0 33 0 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1513 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1514 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 51>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 593/Name/X/Subtype/Image/Type/XObject/Width 51>>stream\r\nHb`\u0004022\u0002X3spb\u0003\u001cl,\u0018\u0018ٸ$$00\u001f\u0017\u001b3\u001eF&\u0016N~\tE-CSs\u000bL`nj(Ĉ[D/\".1)\u0019\u001d$%E9\u0018*p\u0000uHhڅ4M5\u0007\u0013̚א\u0013f!\u0004\u0002!4{Cǎccvݔ-\u0002[\\#gw\u001f=y\t<{Ъ\f7\rQNH\u00180q\bfo<s/_a_>wz}w\u0012?\u001b#\u0012\u001eY˄\u001e_l\u001f\u001e^\u0014f(\f&Uģ?\u001dýCs\u001c\u0014@ab\u0017\u000fv\u000f:@z_[\u00182&\u000e\t)\u0007\u001e|[\u0007PwG\u0019s\u0000ÙS<q'_L\u0004kHs7Z~{vr~,73Z??(^h̒<G\u0005^\u0016M\u001dz\u000f\u0001<9>\u00170v1Èw>\u0012\bOO7\u0003{MX˿aW+\u001btEAZX\u0014\u001drf\u001f`:)\u0012\u00193aXӪӏ\bMF4\u0006t\u0019]JDd`I)ѽ\u0002c$JpN\u0016 )QSSZU&CtV\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000S+\r\nendstream\rendobj\r1494 0 obj\r<</Filter/FlateDecode/Length 156>>stream\r\nHTA\n0\u0010E9ſ@I&m\"݋M\u0015n*\u0003b%д\t2\u001b\u001b(\u00023\\nx\u0015hN\u0003Ṕz6ǙоU.NdL\u0015\rZ(;Yi[Zb\u0000%Ϫ\u0019aLF~\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000<*\r\nendstream\rendobj\r1495 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1498 0 obj\r<</BBox[-15.0 33.0 41.0 -22.0]/Group 1515 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1516 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1517 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n56 0 0 55 -15 -22 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1515 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1517 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 55/Intent/RelativeColorimetric/Length 109/Name/X/SMask 1518 0 R/Subtype/Image/Type/XObject/Width 56>>stream\r\nH;\u000e\u0000 \f\u0002P\u001d_)Co\u0005B\tcd{R\u001b\u0019bj8!4:V!鴬GeΝ;wWvֻI\u000f\u0012,G\u0005\u0005\u0003ZV2\u0016I\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000y\ta\r\nendstream\rendobj\r1518 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 56>>/Filter/FlateDecode/Height 55/Intent/RelativeColorimetric/Length 1063/Name/X/Subtype/Image/Type/XObject/Width 56>>stream\r\nHĖMH\u001bM\u001c5_\u000f7qu\u0004\u0013L\f\u0011Y \"QA\u000fa\u0013rP$\u001e\u0004\u0011 i ((ƓR\u0004E\rD\u0002^ T n\u000b\u001eԊ\u0014-m\u0001\u0015G{LmLs\u001cvesr_rptJ\u001eDAFZ\u0006\u001dD*R\u0001\u000fW\u0016ԡ0hI\n\fS*4\u0012\u0014\rRhfGjM>k\u0001:\u0000<xF\u0014̎\u001aT\u001a\\G\u0014\u0016\u0014@b\u001a\u001544.O*\u0007 )ClX\u0000d.5\u0018(\u0002S.\fLkj4\u0018\np8S8\u001cvj6\u001a\u0002\\%\u0002M\"\u0003\u001aA\u0019-6YԲ.W\u001dbkk*'m\u0018)\u000228\n'&+]ɰ\rMn\r̹\u001aX\u0004Rd\u00048M\u0001e٫F{\u0000~5v*^*NK\u001av\u001f\f\f\u0005Ϟ\u0005C^_W[!уqBWs\u001eo_ 4<:6\u0011\u0004'FC>-\u0006\u0002\u0006=<\\F[%\u0007B#ᩙHdqa~vf*<\u0012\u001a{lHJ$@<\\4\u001dx>>=\u001c]]\u0001k她\u0003ގF6S:5\u0018\u001f\u0002|r]}\u0017\u0015~c3\u0016\u0002c\u001bJxcV\u001e\u0016,\u0017\u0018Dcۉ]+aw'\u001d[FG\u0002|c'\"S\u0005\rV\tao\bp'$+sP0\u0015,\u0003RJ׸;Xɩxzr|:\u0011㗦;5t)\u001fD\u0016\\ƶpVpvL}\u0010\u001e\b\u001b3\\\\U>\u000eăGY\u001cl706\u001bL\u001d\u001f\u0017WGx/\u0019\u001d\u000bxYzꩠj\rM̯vO'/onoo/Owb\u0013C\u0016\u0017Tٞ\u000f\u0017⻇g\u0017׷ww\u0017gprfyr*sֵ\u0004'\u0017\u001b/_~|I|#\u0017'=mu2J?i/o\tG=o#a=}>D\u001d?\u0005D\u000fh\u000fu#/h\u0019^\u000f\u0011ߢ\u0004rZ/=Fq}\\\u000f֟O?w\u0006\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000f\t\r\nendstream\rendobj\r1516 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1519 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1519 0 obj\r<</BC 1520 0 R/G 1521 0 R/S/Luminosity/Type/Mask>>\rendobj\r1520 0 obj\r[0.0 0.0 0.0]\rendobj\r1521 0 obj\r<</BBox[-15.0 33.0 41.0 -22.0]/Group 1522 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1523 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n56 0 0 55 -15 -22 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1522 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1523 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 56>>/Filter/FlateDecode/Height 55/Intent/RelativeColorimetric/Length 1063/Name/X/Subtype/Image/Type/XObject/Width 56>>stream\r\nHĖMH\u001bM\u001c5_\u000f7qu\u0004\u0013L\f\u0011Y \"QA\u000fa\u0013rP$\u001e\u0004\u0011 i ((ƓR\u0004E\rD\u0002^ T n\u000b\u001eԊ\u0014-m\u0001\u0015G{LmLs\u001cvesr_rptJ\u001eDAFZ\u0006\u001dD*R\u0001\u000fW\u0016ԡ0hI\n\fS*4\u0012\u0014\rRhfGjM>k\u0001:\u0000<xF\u0014̎\u001aT\u001a\\G\u0014\u0016\u0014@b\u001a\u001544.O*\u0007 )ClX\u0000d.5\u0018(\u0002S.\fLkj4\u0018\np8S8\u001cvj6\u001a\u0002\\%\u0002M\"\u0003\u001aA\u0019-6YԲ.W\u001dbkk*'m\u0018)\u000228\n'&+]ɰ\rMn\r̹\u001aX\u0004Rd\u00048M\u0001e٫F{\u0000~5v*^*NK\u001av\u001f\f\f\u0005Ϟ\u0005C^_W[!уqBWs\u001eo_ 4<:6\u0011\u0004'FC>-\u0006\u0002\u0006=<\\F[%\u0007B#ᩙHdqa~vf*<\u0012\u001a{lHJ$@<\\4\u001dx>>=\u001c]]\u0001k她\u0003ގF6S:5\u0018\u001f\u0002|r]}\u0017\u0015~c3\u0016\u0002c\u001bJxcV\u001e\u0016,\u0017\u0018Dcۉ]+aw'\u001d[FG\u0002|c'\"S\u0005\rV\tao\bp'$+sP0\u0015,\u0003RJ׸;Xɩxzr|:\u0011㗦;5t)\u001fD\u0016\\ƶpVpvL}\u0010\u001e\b\u001b3\\\\U>\u000eăGY\u001cl706\u001bL\u001d\u001f\u0017WGx/\u0019\u001d\u000bxYzꩠj\rM̯vO'/onoo/Owb\u0013C\u0016\u0017Tٞ\u000f\u0017⻇g\u0017׷ww\u0017gprfyr*sֵ\u0004'\u0017\u001b/_~|I|#\u0017'=mu2J?i/o\tG=o#a=}>D\u001d?\u0005D\u000fh\u000fu#/h\u0019^\u000f\u0011ߢ\u0004rZ/=Fq}\\\u000f֟O?w\u0006\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000f\t\r\nendstream\rendobj\r1497 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 1524 0 R/ShadingType 2>>\rendobj\r1524 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[0.0 1.0]/FunctionType 3/Functions[1525 0 R]>>\rendobj\r1525 0 obj\r<</C0[0.0 0.611765 0.552941]/C1[0.0 0.670588 0.603922]/Domain[0.0 1.0]/FunctionType 2/N 1.06584>>\rendobj\r1496 0 obj\r<</AIS true/BM/Normal/CA 0.75/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.75/op false>>\rendobj\r1491 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\t\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00038\u0012'\r\nendstream\rendobj\r1492 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1493 0 obj\r<</BBox[2.0 38.0 38.0 2.0]/Group 1526 0 R/Length 469/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 1527 0 R/GS1 151 0 R>>/Shading<</Sh0 241 0 R>>>>/Subtype/Form>>stream\r\nq\n35.5 2.5 m\n4.5 2.5 l\n3.395 2.5 2.5 3.395 2.5 4.5 c\n2.5 35.5 l\n2.5 36.605 3.395 37.5 4.5 37.5 c\n35.5 37.5 l\n36.605 37.5 37.5 36.605 37.5 35.5 c\n37.5 4.5 l\n37.5 3.395 36.605 2.5 35.5 2.5 c\nW n\nq\n0 g\n/GS0 gs\n35 0 0 -35 2.5 20 cm\nBX /Sh0 sh EX Q\nQ\n0.078 0.522 0.431 RG\n1 w 10 M 0 j 0 J []0 d \n/GS1 gs\nq 1 0 0 1 35.5 2.5 cm\n0 0 m\n-31 0 l\n-32.105 0 -33 0.895 -33 2 c\n-33 33 l\n-33 34.105 -32.105 35 -31 35 c\n0 35 l\n1.105 35 2 34.105 2 33 c\n2 2 l\n2 0.895 1.105 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1526 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1527 0 obj\r<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 1528 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r1528 0 obj\r<</G 1529 0 R/S/Luminosity/Type/Mask>>\rendobj\r1529 0 obj\r<</BBox[-32768.0 32767.0 32767.0 -32768.0]/Group 1530 0 R/Length 51/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Shading<</Sh0 247 0 R>>>>/Subtype/Form>>stream\r\nq\n0 g\n/GS0 gs\n35 0 0 -35 2.5 20 cm\nBX /Sh0 sh EX Q\n\r\nendstream\rendobj\r1530 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r1439 0 obj\r<</ArtBox[5.5 4.5 25.5 24.5]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1531 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1532 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1086 0 R/Resources<</ExtGState<</GS0 151 0 R/GS1 1533 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1534 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1440 0 obj\r<</ArtBox[6.0 5.0 25.0 24.0]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1535 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1536 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1086 0 R/Resources<</ExtGState<</GS0 151 0 R/GS1 1537 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1538 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1441 0 obj\r<</ArtBox[5.5 4.5 25.5 24.5]/BleedBox[0.0 0.0 30.0 30.0]/Contents 1539 0 R/CropBox[0.0 0.0 30.0 30.0]/Group 1540 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 30.0 30.0]/Parent 1086 0 R/Resources<</ExtGState<</GS0 151 0 R/GS1 1541 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1534 0 R>>>>/TrimBox[0.0 0.0 30.0 30.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1442 0 obj\r<</ArtBox[2.0 2.0 38.0 38.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 1542 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 1543 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 1086 0 R/Resources<</ExtGState<</GS0 204 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1544 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1443 0 obj\r<</ArtBox[2.0 2.0 38.0 38.0]/BleedBox[0.0 0.0 40.0 40.0]/Contents 1545 0 R/CropBox[0.0 0.0 40.0 40.0]/Group 1546 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 40.0 40.0]/Parent 1086 0 R/Resources<</ExtGState<</GS0 204 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1547 0 R>>>>/TrimBox[0.0 0.0 40.0 40.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1545 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\t\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00038\u0012'\r\nendstream\rendobj\r1546 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1547 0 obj\r<</BBox[2.0 38.0 38.0 2.0]/Group 1548 0 R/Length 468/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 1527 0 R/GS1 151 0 R>>/Shading<</Sh0 265 0 R>>>>/Subtype/Form>>stream\r\nq\n35.5 2.5 m\n4.5 2.5 l\n3.395 2.5 2.5 3.395 2.5 4.5 c\n2.5 35.5 l\n2.5 36.605 3.395 37.5 4.5 37.5 c\n35.5 37.5 l\n36.605 37.5 37.5 36.605 37.5 35.5 c\n37.5 4.5 l\n37.5 3.395 36.605 2.5 35.5 2.5 c\nW n\nq\n0 g\n/GS0 gs\n35 0 0 -35 2.5 20 cm\nBX /Sh0 sh EX Q\nQ\n0.122 0.82 0.682 RG\n1 w 10 M 0 j 0 J []0 d \n/GS1 gs\nq 1 0 0 1 35.5 2.5 cm\n0 0 m\n-31 0 l\n-32.105 0 -33 0.895 -33 2 c\n-33 33 l\n-33 34.105 -32.105 35 -31 35 c\n0 35 l\n1.105 35 2 34.105 2 33 c\n2 2 l\n2 0.895 1.105 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1548 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1542 0 obj\r<</Filter/FlateDecode/Length 83>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!\t\u0018\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00038\u0012'\r\nendstream\rendobj\r1543 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1544 0 obj\r<</BBox[2.0 38.0 38.0 2.0]/Group 1549 0 R/Length 469/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 1527 0 R/GS1 151 0 R>>/Shading<</Sh0 269 0 R>>>>/Subtype/Form>>stream\r\nq\n35.5 2.5 m\n4.5 2.5 l\n3.395 2.5 2.5 3.395 2.5 4.5 c\n2.5 35.5 l\n2.5 36.605 3.395 37.5 4.5 37.5 c\n35.5 37.5 l\n36.605 37.5 37.5 36.605 37.5 35.5 c\n37.5 4.5 l\n37.5 3.395 36.605 2.5 35.5 2.5 c\nW n\nq\n0 g\n/GS0 gs\n35 0 0 -35 2.5 20 cm\nBX /Sh0 sh EX Q\nQ\n0.106 0.718 0.596 RG\n1 w 10 M 0 j 0 J []0 d \n/GS1 gs\nq 1 0 0 1 35.5 2.5 cm\n0 0 m\n-31 0 l\n-32.105 0 -33 0.895 -33 2 c\n-33 33 l\n-33 34.105 -32.105 35 -31 35 c\n0 35 l\n1.105 35 2 34.105 2 33 c\n2 2 l\n2 0.895 1.105 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1549 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1539 0 obj\r<</Filter/FlateDecode/Length 120>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C!,Jw\u000f6PH/223U0\u0001b]#\u0003\u0005 *JJ*2P0\u0006#]cPB\u001eX\u0010\u0010@!G-@%+\u0010bk \u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001d5\r\nendstream\rendobj\r1540 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1534 0 obj\r<</BBox[5.5 24.5 25.5 4.5]/Group 1550 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0 0 0 rg\n/GS0 gs\n25.5 4.5 -20 20 re\nf\n\r\nendstream\rendobj\r1550 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1541 0 obj\r<</AIS true/BM/Normal/CA 0.0500031/OP false/OPM 1/SA true/SMask 1551 0 R/Type/ExtGState/ca 0.0500031/op false>>\rendobj\r1551 0 obj\r<</BC 1552 0 R/G 1553 0 R/S/Luminosity/TR 1554 0 R/Type/Mask>>\rendobj\r1552 0 obj\r[1.0]\rendobj\r1553 0 obj\r<</BBox[3.0 27.0 28.0 2.0]/Group 1555 0 R/Length 51/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/XObject<</Fm0 1556 0 R>>>>/Subtype/Form>>stream\r\nq\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr /GS0 gs\n0 TL/Fm0 Do\nQ\n\r\nendstream\rendobj\r1554 0 obj\r<</Domain[0.0 1.0]/Filter/FlateDecode/FunctionType 4/Length 36/Range[0.0 1.0]>>stream\r\nH63\u0000\u0003Ԋ\f$Z\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00007\u000f\u0005\r\nendstream\rendobj\r1555 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r1556 0 obj\r<</BBox[2.0 28.0 29.0 1.0]/Group 1557 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1558 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n25 0 0 25 3 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1557 0 obj\r<</CS/DeviceRGB/I true/K false/S/Transparency/Type/Group>>\rendobj\r1558 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 25>>/Filter/FlateDecode/Height 25/Intent/RelativeColorimetric/Length 362/Name/X/Subtype/Image/Type/XObject/Width 25>>stream\r\nHϋ\u0001a\u0018q\u0002\u0003Kn$\u0019@A)\u0007e\u0001!ƞ8(\u0007\u000e2\u001aq\u001c$Q\u000eVv^]v=>zdO\u0019,v \\.\u0017P3U!1_9)0\u001c\u0006\nΗ(۽0\u001a\t>תH\u0016!TNW GQo\u0017\u0013\u0018@ Xv\fՈ\tj̛q\u001b\u0004<\u0003֝\u0003\u0002\u001b\u001c\u0000pi\u0006 >qBp1oߡ0:\u000e?\u0003\u001f>\u0003\\\u0004.Ahn8,ل\u001d\u0002l-\u000fp5bV\bhm\u0002>rZ\t\u0011\u0002\u0012,\u001af9\u0013\u001a~=\u0004,V\u001d<e\u001b\u0017\u0006\u0012\u0004\"T:#ESX6(Wi\u0011́;pn55*?nG\u000e\u0000\u0000\u0000\u0000\u0000\u0003\u0000 UF&\r\nendstream\rendobj\r1535 0 obj\r<</Filter/FlateDecode/Length 117>>stream\r\nH,K\u000e@@\u0010D}\u0000㓰5>\u001b\"B\u0004X!H%ނ;+(J\u000b:\u0005{e0\u00047f\u0014l\u000fE)R\u0004&^h\u0004KU5pm̷\u0011L-׻<i\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000w\u001c\r\nendstream\rendobj\r1536 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1538 0 obj\r<</BBox[6.0 24.0 25.0 5.0]/Group 1559 0 R/Length 34/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0 0 0 rg\n/GS0 gs\n25 5 -19 19 re\nf\n\r\nendstream\rendobj\r1559 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1537 0 obj\r<</AIS true/BM/Normal/CA 0.0500031/OP false/OPM 1/SA true/SMask 1560 0 R/Type/ExtGState/ca 0.0500031/op false>>\rendobj\r1560 0 obj\r<</BC 1561 0 R/G 1562 0 R/S/Luminosity/TR 1563 0 R/Type/Mask>>\rendobj\r1561 0 obj\r[1.0]\rendobj\r1562 0 obj\r<</BBox[4.0 26.0 27.0 3.0]/Group 1564 0 R/Length 51/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/XObject<</Fm0 1565 0 R>>>>/Subtype/Form>>stream\r\nq\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr /GS0 gs\n0 TL/Fm0 Do\nQ\n\r\nendstream\rendobj\r1563 0 obj\r<</Domain[0.0 1.0]/Filter/FlateDecode/FunctionType 4/Length 36/Range[0.0 1.0]>>stream\r\nH63\u0000\u0003Ԋ\f$Z\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00007\u000f\u0005\r\nendstream\rendobj\r1564 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r1565 0 obj\r<</BBox[3.0 27.0 28.0 2.0]/Group 1566 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1567 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n23 0 0 23 4 3 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1566 0 obj\r<</CS/DeviceRGB/I true/K false/S/Transparency/Type/Group>>\rendobj\r1567 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 23>>/Filter/FlateDecode/Height 23/Intent/RelativeColorimetric/Length 46/Name/X/Subtype/Image/Type/XObject/Width 23>>stream\r\nHb` \r\u000e.1D\u001f\u0015\u0005\f\u000b$/\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000f\r\nendstream\rendobj\r1531 0 obj\r<</Filter/FlateDecode/Length 119>>stream\r\nH,K\u000e@@\u0010D}\u0000>Cl`CDH\u0000+\u0004O\u0019I[Rkp\u0005Ѡ`\"$S\u0005ˬyo(\u001eU\u0006^h\u0004K85po'Zw9i\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000g\u001dO\r\nendstream\rendobj\r1532 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1533 0 obj\r<</AIS true/BM/Normal/CA 0.0500031/OP false/OPM 1/SA true/SMask 1568 0 R/Type/ExtGState/ca 0.0500031/op false>>\rendobj\r1568 0 obj\r<</BC 1569 0 R/G 1570 0 R/S/Luminosity/TR 1571 0 R/Type/Mask>>\rendobj\r1569 0 obj\r[1.0]\rendobj\r1570 0 obj\r<</BBox[2.0 28.0 29.0 1.0]/Group 1572 0 R/Length 51/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/XObject<</Fm0 1573 0 R>>>>/Subtype/Form>>stream\r\nq\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr /GS0 gs\n0 TL/Fm0 Do\nQ\n\r\nendstream\rendobj\r1571 0 obj\r<</Domain[0.0 1.0]/Filter/FlateDecode/FunctionType 4/Length 36/Range[0.0 1.0]>>stream\r\nH63\u0000\u0003Ԋ\f$Z\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00007\u000f\u0005\r\nendstream\rendobj\r1572 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r1573 0 obj\r<</BBox[1.0 29.0 30.0 0.0]/Group 1574 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1575 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 27 2 1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1574 0 obj\r<</CS/DeviceRGB/I true/K false/S/Transparency/Type/Group>>\rendobj\r1575 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 27>>/Filter/FlateDecode/Height 27/Intent/RelativeColorimetric/Length 348/Name/X/Subtype/Image/Type/XObject/Width 27>>stream\r\nH?p\u0018B\"\rk\u0012DM\u0010\u00117D\u0010t-\u0012'YDCt\u0014\u0015aih%\b\nRq\u0013~Fyq\u0003?^(\u0010\fQ\f'T\"\u000f\u0010\u0014\u0014*$hv\f]\u0016(\u0004(yF3Q\u0015E^.}z]tN?\u001d6S\u0000\nWzU\u000ejQ@qrm\t\u0004R3Yd0@XCȐ[8 ).2U\u0000D\"kŧ\u001f=h8pf\u001eP\u0018)zqr.^p}6Q@j?fd\f\u0010R\u00140-2\r]ۉr\b\u0010%DՕ*͇_\u0010+(<ϵY,q? \u001f\u0004#Ѥ}\u001ai;\u0002Cc!}/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000dI\r\nendstream\rendobj\r1434 0 obj\r<</ArtBox[2.99998 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1576 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1577 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1085 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1435 0 obj\r<</ArtBox[3.97618 3.0 14.0 22.0]/BleedBox[0.0 0.0 20.0 25.0]/Contents 1578 0 R/CropBox[0.0 0.0 20.0 25.0]/Group 1579 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 25.0]/Parent 1085 0 R/Resources<</ExtGState<</GS0 156 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1580 0 R>>>>/TrimBox[0.0 0.0 20.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1436 0 obj\r<</ArtBox[3.97618 3.0 14.0 22.0]/BleedBox[0.0 0.0 20.0 25.0]/Contents 1581 0 R/CropBox[0.0 0.0 20.0 25.0]/Group 1582 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 25.0]/Parent 1085 0 R/Resources<</ExtGState<</GS0 1583 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1580 0 R>>>>/TrimBox[0.0 0.0 20.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1437 0 obj\r<</ArtBox[3.5 1.0 6.5 24.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1584 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1585 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1085 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1438 0 obj\r<</ArtBox[3.5 1.0 6.5 24.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1586 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1587 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1085 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1586 0 obj\r<</Filter/FlateDecode/Length 147>>stream\r\nH<\n0\fE\u0015\u0007&Zi\u000f\u0010\u001d\n\u001fL-ȅ\u0013rCnN\u0005n,C_@Q%Z#awClw1\u000fq\u0019Hab\u001b-ЉJ\u0010;TJ\u0003^4Y6.+yd&H\u001f/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000$\u0012\r\nendstream\rendobj\r1587 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1584 0 obj\r<</Filter/FlateDecode/Length 147>>stream\r\nH<A\n\u00021\fE9ſ@$vkY\r\u0000\u0003\u0007S\u000bcA\u0018\u000bc/h\b͒f-\u0004a8+.x\u0013M`Qg\u0007\u0012<ly\u0018\u0016$H\u000e\u0017ծiē&:oSUj:\u0013zt\u0011Nr=|o}\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000##\r\nendstream\rendobj\r1585 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1581 0 obj\r<</Filter/FlateDecode/Length 137>>stream\r\nH$K\nP\fEY@_gNVp\u0001\"Ju`r\u0004N.!|I!\t6NwZI\u0010\u000bDAf\u0007&\u001b\u0005ϖϋ\"A\u0003U<yWB!\u0016E\u001e:\u0014x.ҙiL\u001e\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000\b\u0011 \u001a\r\nendstream\rendobj\r1582 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1580 0 obj\r<</BBox[4.0 22.0 14.0 3.0]/Group 1588 0 R/Length 45/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n14 3 -10 19 re\nf\n\r\nendstream\rendobj\r1588 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1583 0 obj\r<</AIS false/BM/Normal/CA 0.199997/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.199997/op false>>\rendobj\r1578 0 obj\r<</Filter/FlateDecode/Length 137>>stream\r\nH$M\n@\f9Ż@'?XN\u001bh\u0005\u000f *\u0017\bc\u0005\u000fU*h78xQ\u0004V`NW\\r?\n\u001e__^\u000e\u0004ݛN\u001eIBR`\u0011ùFyB<r6&\u0015&\n\u0019l?\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000(g L\r\nendstream\rendobj\r1579 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1576 0 obj\r<</Filter/FlateDecode/Length 187>>stream\r\nHQ\u000e0\f}?_\u001f` *\u001aA\u001eE1f1@4kO{ڳ5t[3\u001d5Ԋӱdbi\u0002Sj0%\u0012\u001b`\u0000L\u001b,fR,\u0011!#aU\b*/\bq\u0010W\\L1S\u0005J\u001a౗zw\tM{`\u000ewt\"Y`\u0003grKFzҿ@/,\u001f\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000\\WJ\r\nendstream\rendobj\r1577 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1080 0 obj\r<</Count 5/Kids[5 0 R 41 0 R 42 0 R 43 0 R 44 0 R]/Parent 54 0 R/Type/Pages>>\rendobj\r1081 0 obj\r<</Count 5/Kids[45 0 R 46 0 R 47 0 R 48 0 R 1589 0 R]/Parent 54 0 R/Type/Pages>>\rendobj\r1082 0 obj\r<</Count 5/Kids[1590 0 R 1591 0 R 1592 0 R 1593 0 R 1594 0 R]/Parent 54 0 R/Type/Pages>>\rendobj\r1083 0 obj\r<</Count 5/Kids[1595 0 R 1596 0 R 1597 0 R 1598 0 R 1599 0 R]/Parent 54 0 R/Type/Pages>>\rendobj\r1084 0 obj\r<</Count 5/Kids[1600 0 R 1601 0 R 1602 0 R 1603 0 R 1604 0 R]/Parent 54 0 R/Type/Pages>>\rendobj\r1600 0 obj\r<</ArtBox[3.0 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1605 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1606 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1084 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1601 0 obj\r<</ArtBox[3.0 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1607 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1608 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1084 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1602 0 obj\r<</ArtBox[2.99998 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1609 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1610 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1084 0 R/Resources<</ExtGState<</GS0 1415 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1611 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1603 0 obj\r<</ArtBox[2.99998 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1612 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1613 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1084 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1604 0 obj\r<</ArtBox[2.99998 2.99998 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1614 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1615 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1084 0 R/Resources<</ExtGState<</GS0 1415 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1616 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1614 0 obj\r<</Filter/FlateDecode/Length 87>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW\u0003\n\u0007\u001b(\u0017\u0003%C|r\r\u0014\\\u0002!\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\u0012*\r\nendstream\rendobj\r1615 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1616 0 obj\r<</BBox[3.0 23.0 7.0 3.0]/Group 1617 0 R/Length 420/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 5 3.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0 19 l\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 5 3.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0 19 l\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1617 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1612 0 obj\r<</Filter/FlateDecode/Length 175>>stream\r\nHLOA\u000e0\u0010+\u0003]\nWp\"\u00069\u0000b4\u0006M'n-tv:fݾ&\u000eA\u001a%\u0004aVP\u0005g>!NKOqY\u001ekS\u0003݆^x}cR\u0005+8<\u0010\u0011G$⪬2\u001d۔Ya\r4\u0018g^9oyL!yko\u001b5b\u0012<wP\u0003nw\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000,\u001e4\r\nendstream\rendobj\r1613 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1609 0 obj\r<</Filter/FlateDecode/Length 87>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW\u0003\n\u0007\u001b(\u0017\u0003%C|r\r\u0014\\\u0002!\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\u0012*\r\nendstream\rendobj\r1610 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1611 0 obj\r<</BBox[3.0 23.0 7.0 3.0]/Group 1618 0 R/Length 234/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.173 0.243 0.314 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 5 3.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0 19 l\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1618 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1607 0 obj\r<</Filter/FlateDecode/Length 131>>stream\r\nHT\n@\u0010DvO:\b/P!E gϫ,\u0015\u000ff\u0018wOpcb\u0004F+J⫲Q\u0011F\u0018ۗ\u0002j\\<J\u001fbxIj;\u000f`PL\u0015<{A\f8Lă\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000$\u001f\u001f\r\nendstream\rendobj\r1608 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1605 0 obj\r<</Filter/FlateDecode/Length 133>>stream\r\nHT\n@\u0010}yx6\b\u0001\tj'H\u0014\u0001MU)f\u000fc#Íq2\u001f\\ER\u00117>\u0006p\u0013X\u000bܰ0\u001f\u0005($aћ6bA_\u0013_\u0013(6Mh\u0007R\u001c\u0010|,w[zb\u0013\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001f-\r\nendstream\rendobj\r1606 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1595 0 obj\r<</ArtBox[4.0 4.0 46.0 47.0]/BleedBox[0.0 0.0 50.0 51.0]/Contents 1619 0 R/CropBox[0.0 0.0 50.0 51.0]/Group 1620 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 50.0 51.0]/Parent 1083 0 R/Resources<</ExtGState<</GS0 1621 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1622 0 R>>>>/TrimBox[0.0 0.0 50.0 51.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1596 0 obj\r<</ArtBox[6.49998 2.06 17.0 17.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1623 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1624 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1083 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1597 0 obj\r<</ArtBox[6.49998 2.06 17.0 17.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1625 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1626 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1083 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1598 0 obj\r<</ArtBox[3.0 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1627 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1628 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1083 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1599 0 obj\r<</ArtBox[3.0 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1629 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1630 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1083 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1629 0 obj\r<</Filter/FlateDecode/Length 112>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW2303V\u0000\u0016 R!ȝH\\P!\u000bf\u0007\u001b(\u0017s)\u0000)\u0018Zt\u0006C\u000f\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000}\u0017\r\nendstream\rendobj\r1630 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1627 0 obj\r<</Filter/FlateDecode/Length 114>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW2365W031\u0002\u0006F\nA\\F\n\n\nY@\u00054=@!L\u0004Q\u00025\u0018bA \u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000P\u0017\r\nendstream\rendobj\r1628 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1625 0 obj\r<</Filter/FlateDecode/Length 229>>stream\r\nHLPj@\f+\u0007,kuJ\u0010BC?`)-\t$9]h%Fb4?\u000fe7^\u000f\u001az+9+I\u001f\u001f\u001b\t˘!\u001c<~\u0012IwMEa1\"p\u001aQTKWsTP8\r\tu\u0004\u0007-ӊ\u001d\u000f(bWe]Rj6yc\f-\u00148Uqm\u0016jX}iV6iV.t\"wnR\u0001c+خ\r1r!\n*ՈO\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000qLI\r\nendstream\rendobj\r1626 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1623 0 obj\r<</Filter/FlateDecode/Length 229>>stream\r\nHLPAj0\f\u0015(cɵٲPXv\u000f})-%[Ji%Fbfd^П\u0016\u0002y<1ֺChc|+r:f_x9J\u000f<>\u0019O48^\u001crcI&SĠiBV1Q\u001bV鼦P\u00071mkF\r{\rҭ\n\u0013ie5\u00071Vq:\u000fi\u001blE\u001af\r\u0013L)!\u00179瞻\u00115{\r:*{G:\"h\u0011\u001d*Ո\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001aK\r\nendstream\rendobj\r1624 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1619 0 obj\r<</Filter/FlateDecode/Length 87>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW\u0003\n\u0007\u001b(\u0017\u0003%C|r\r\u0014\\\u0002!\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0004\u0015\u0012,\r\nendstream\rendobj\r1620 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1622 0 obj\r<</BBox[4.0 47.0 46.0 4.0]/Group 1631 0 R/Length 176/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R/GS1 1632 0 R>>/Shading<</Sh0 1633 0 R>>/XObject<</Fm0 1634 0 R>>>>/Subtype/Form>>stream\r\nq\n46 4 -42 43 re\nW n\nq\n0 g\n/GS0 gs\n29.1195469 -50.4365349 -50.4365349 -29.1195469 10.4402266 50.7182655 cm\nBX /Sh0 sh EX Q\nQ\nq\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr /GS1 gs\n0 TL/Fm0 Do\nQ\n\r\nendstream\rendobj\r1631 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1634 0 obj\r<</BBox[4.0 47.0 46.0 4.0]/Group 1635 0 R/Length 34/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0 0 0 rg\n/GS0 gs\n46 4 -42 43 re\nf\n\r\nendstream\rendobj\r1635 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1633 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 1636 0 R/ShadingType 2>>\rendobj\r1636 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[1.0 0.0]/FunctionType 3/Functions[1637 0 R]>>\rendobj\r1637 0 obj\r<</C0[0.137255 0.121569 0.12549]/C1[0.337255 0.341176 0.34902]/Domain[0.0 1.0]/FunctionType 2/N 1.04903>>\rendobj\r1632 0 obj\r<</AIS true/BM/Normal/CA 0.75/OP false/OPM 1/SA true/SMask 1638 0 R/Type/ExtGState/ca 0.75/op false>>\rendobj\r1638 0 obj\r<</BC 1639 0 R/G 1640 0 R/S/Luminosity/TR 1641 0 R/Type/Mask>>\rendobj\r1639 0 obj\r[1.0]\rendobj\r1640 0 obj\r<</BBox[2.0 49.0 48.0 2.0]/Group 1642 0 R/Length 51/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/XObject<</Fm0 1643 0 R>>>>/Subtype/Form>>stream\r\nq\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr /GS0 gs\n0 TL/Fm0 Do\nQ\n\r\nendstream\rendobj\r1641 0 obj\r<</Domain[0.0 1.0]/Filter/FlateDecode/FunctionType 4/Length 36/Range[0.0 1.0]>>stream\r\nH63\u0000\u0003Ԋ\f$Z\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00007\u000f\u0005\r\nendstream\rendobj\r1642 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r1643 0 obj\r<</BBox[1.0 50.0 49.0 1.0]/Group 1644 0 R/Length 37/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 1645 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n46 0 0 47 2 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1644 0 obj\r<</CS/DeviceRGB/I true/K false/S/Transparency/Type/Group>>\rendobj\r1645 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 46>>/Filter/FlateDecode/Height 47/Intent/RelativeColorimetric/Length 195/Name/X/Subtype/Image/Type/XObject/Width 46>>stream\r\nHK\u000e \f\u0004PH1?r\u0018_\b\"S)MK\u0017e\u001d\u0016\"J\u001d\u0013\u001ea4ךp\u0019<\u000e\\i4\n\b5aH]C\r0V;p+ky#H7/Z_uA^`.s7y<;GgCS2Kn'\u0013ևfJS)e%RLRx!G\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000n\u000e\r\nendstream\rendobj\r1621 0 obj\r<</AIS false/BM/Normal/CA 0.0599976/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.0599976/op false>>\rendobj\r1590 0 obj\r<</ArtBox[2.99998 2.99998 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1646 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1647 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1082 0 R/Resources<</ExtGState<</GS0 204 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1616 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1591 0 obj\r<</ArtBox[5.5 3.0 14.5 22.0]/BleedBox[0.0 0.0 20.0 25.0]/Contents 1648 0 R/CropBox[0.0 0.0 20.0 25.0]/Group 1649 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 25.0]/Parent 1082 0 R/Resources<</ExtGState<</GS0 495 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1650 0 R>>>>/TrimBox[0.0 0.0 20.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1592 0 obj\r<</ArtBox[3.97618 3.0 14.0 22.0]/BleedBox[0.0 0.0 20.0 25.0]/Contents 1651 0 R/CropBox[0.0 0.0 20.0 25.0]/Group 1652 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 25.0]/Parent 1082 0 R/Resources<</ExtGState<</GS0 495 0 R/GS1 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1580 0 R>>>>/TrimBox[0.0 0.0 20.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1593 0 obj\r<</ArtBox[3.5 1.0 6.5 24.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1653 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1654 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1082 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1594 0 obj\r<</ArtBox[4.0 6.41666 30.0 26.4167]/BleedBox[0.0 0.0 35.0 35.0]/Contents 1655 0 R/CropBox[0.0 0.0 35.0 35.0]/Group 1656 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 35.0 35.0]/Parent 1082 0 R/Resources<</ExtGState<</GS0 156 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1657 0 R>>>>/TrimBox[0.0 0.0 35.0 35.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1655 0 obj\r<</Filter/FlateDecode/Length 84>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!)\b\u0002qQ*WB\u001ePP=@!\u0018(\u0019k\u0015\b\u001f\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005A\u00123\r\nendstream\rendobj\r1656 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1657 0 obj\r<</BBox[4.0 26.4167 30.0 6.41667]/Group 1658 0 R/Length 49/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n30 6.417 -26 20 re\nf\n\r\nendstream\rendobj\r1658 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1653 0 obj\r<</Filter/FlateDecode/Length 145>>stream\r\nH<NA\n\u00021\f\u0015IjW{ʞ\u0016=\u0000\u0005Y]\u000f\u0016d`B&L© \f?\u0014q0\nM&-\u0004a8\u001b띮x\u0013m`Q˸$x\u001f\u0019Ӈ\u0016 H\rn/[e\u00113t6ߥ\\sj*\u001fE8ɵѾ\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000i\u0003#\r\nendstream\rendobj\r1654 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1651 0 obj\r<</Filter/FlateDecode/Length 137>>stream\r\nH$K\nP\fEY@_>}}N,\u0015\\V\u001fL,\u0017N\u0012§\u0002\u001e`\u0015~ptU\u000b\t\t*\u001f\u0007r(x~}y=a\u0016to:{$i[C`\u0019>\u001a\u0005\n(rƠ>S`F\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000&m E\r\nendstream\rendobj\r1652 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1648 0 obj\r<</Filter/FlateDecode/Length 87>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW\u0003\n\u0007\u001b(\u0017\u0003%C|r\r\u0014\\\u0002!\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\u0012+\r\nendstream\rendobj\r1649 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1650 0 obj\r<</BBox[5.5 22.0 14.5 3.0]/Group 1659 0 R/Length 46/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n14.5 3 -9 19 re\nf\n\r\nendstream\rendobj\r1659 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1646 0 obj\r<</Filter/FlateDecode/Length 87>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW\u0003\n\u0007\u001b(\u0017\u0003%C|r\r\u0014\\\u0002!\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\u0012*\r\nendstream\rendobj\r1647 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r45 0 obj\r<</ArtBox[2.49998 4.5 17.8571 17.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1660 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1661 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1081 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r46 0 obj\r<</ArtBox[6.49998 2.06 17.0 17.5]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1662 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1663 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1081 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r47 0 obj\r<</ArtBox[3.0 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1664 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1665 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1081 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r48 0 obj\r<</ArtBox[3.0 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1666 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1667 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1081 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1589 0 obj\r<</ArtBox[2.99998 3.0 7.0 23.0]/BleedBox[0.0 0.0 10.0 25.0]/Contents 1668 0 R/CropBox[0.0 0.0 10.0 25.0]/Group 1669 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 10.0 25.0]/Parent 1081 0 R/Resources<</ExtGState<</GS0 204 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1611 0 R>>>>/TrimBox[0.0 0.0 10.0 25.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1668 0 obj\r<</Filter/FlateDecode/Length 87>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW\u0003\n\u0007\u001b(\u0017\u0003%C|r\r\u0014\\\u0002!\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\u0012*\r\nendstream\rendobj\r1669 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1666 0 obj\r<</Filter/FlateDecode/Length 123>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!C\u00024\u0004f\nE\\\u0006\n\\f\n&\nF\n\u0016\nE\\i\\\\\u0006\nF\n\u0006@ASPB\u001e\u0002\b\u0006s\u0019)\u0003\u0019Y@쥀3\u0018bq \u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000(\u001c\r\nendstream\rendobj\r1667 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1664 0 obj\r<</Filter/FlateDecode/Length 114>>stream\r\nHwVu6PprqVr\u0005\u0012\u0010!CP!.*J\nW2347V032\u0001Ɔ&\nA\\F\n\n\nY@\u00054=@!L\u0004Q\u00025\u0018bA \u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0017\r\nendstream\rendobj\r1665 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1662 0 obj\r<</Filter/FlateDecode/Length 231>>stream\r\nHLPj\u00031\f+\u0007V+y}\\)B\bI\u000e\u0000SZ&߯lm\"Kh$=h\u000fe7^\u000f\u0016Z/$\b5\u000fzǍU#5\u0014\u0003ŷ/'-\u00153cDiDR)]\u0011M\u0006\u000b5iH(C+CV< ӊC(t\u0002k2Z6\u0005lc\u001c-q[a\u0015TRmR-\u0017]Djwn2\u0001cWc7=\u0002\rQPN_\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0006L\r\nendstream\rendobj\r1663 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1660 0 obj\r<</Filter/FlateDecode/Length 251>>stream\r\nHlQAN0\f\u0015@I6ɕVBZe\u000f<BH -\u001c>&e\u0017ڸ\u0019g<\u001ear|s;1\u001d\u0010ƖҖ:c[\u0001㙞\u0006v\u0012z|ܓ\u0017+bCdrIg@GYM\u001dk\u0010\rVx~z(\ti\u000bDt\u000ffA%\u0001*3\u0006T\u000f;}l\u00073A-\u0005Q0źMc/Dǫ\u0011be)\fGi\u001em-eܕx\b\t:&Y\u001e׎7FXՊ\u0012/.zGW\u001e\u001b\u0000\u0000\u0000\u0000\u0000\u0003\u0000\\\r\nendstream\rendobj\r1661 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r5 0 obj\r<</ArtBox[0.0 0.0 1366.0 768.0]/BleedBox[0.0 0.0 1366.0 768.0]/Contents 1670 0 R/CropBox[0.0 0.0 1366.0 768.0]/Group 1671 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 1366.0 768.0]/Parent 1080 0 R/Resources<</ColorSpace<</CS0 1672 0 R>>/ExtGState<</GS0 151 0 R/GS1 1496 0 R/GS10 1415 0 R/GS11 156 0 R/GS12 204 0 R/GS13 495 0 R/GS14 1673 0 R/GS15 1674 0 R/GS16 1675 0 R/GS17 1676 0 R/GS2 208 0 R/GS3 661 0 R/GS4 843 0 R/GS5 844 0 R/GS6 603 0 R/GS7 1677 0 R/GS8 1678 0 R/GS9 792 0 R>>/Font<</T1_0 1305 0 R/TT0 296 0 R>>/ProcSet[/PDF/Text/ImageC/ImageI]/Properties<</MC0 49 0 R/MC1 50 0 R>>/Shading<</Sh0 160 0 R/Sh1 1497 0 R/Sh2 1232 0 R/Sh3 1679 0 R/Sh4 297 0 R/Sh5 429 0 R/Sh6 943 0 R>>/XObject<</Fm0 1680 0 R/Fm1 1681 0 R/Fm10 1682 0 R/Fm100 1683 0 R/Fm101 1684 0 R/Fm102 1685 0 R/Fm103 1686 0 R/Fm104 1687 0 R/Fm105 1688 0 R/Fm106 1689 0 R/Fm107 1690 0 R/Fm108 1691 0 R/Fm109 1692 0 R/Fm11 1693 0 R/Fm110 1694 0 R/Fm111 1695 0 R/Fm112 1696 0 R/Fm113 1697 0 R/Fm114 1698 0 R/Fm115 1699 0 R/Fm116 1700 0 R/Fm117 1701 0 R/Fm118 1702 0 R/Fm119 1703 0 R/Fm12 1704 0 R/Fm120 1705 0 R/Fm121 1706 0 R/Fm122 1707 0 R/Fm123 1708 0 R/Fm124 1709 0 R/Fm125 1710 0 R/Fm126 1711 0 R/Fm127 1712 0 R/Fm128 1713 0 R/Fm129 1714 0 R/Fm13 1715 0 R/Fm130 1716 0 R/Fm131 1717 0 R/Fm132 1718 0 R/Fm133 1719 0 R/Fm134 1720 0 R/Fm135 1721 0 R/Fm136 1722 0 R/Fm137 1723 0 R/Fm138 1724 0 R/Fm139 1725 0 R/Fm14 1726 0 R/Fm140 1727 0 R/Fm141 1728 0 R/Fm142 1729 0 R/Fm143 1730 0 R/Fm144 1731 0 R/Fm145 1732 0 R/Fm146 1733 0 R/Fm147 1734 0 R/Fm148 1735 0 R/Fm149 1736 0 R/Fm15 1737 0 R/Fm150 1738 0 R/Fm151 1739 0 R/Fm152 1740 0 R/Fm153 1741 0 R/Fm154 1742 0 R/Fm155 1743 0 R/Fm156 1744 0 R/Fm157 1745 0 R/Fm158 1746 0 R/Fm159 1747 0 R/Fm16 1748 0 R/Fm160 1749 0 R/Fm161 1750 0 R/Fm162 1751 0 R/Fm163 1752 0 R/Fm164 1753 0 R/Fm165 1754 0 R/Fm166 1755 0 R/Fm167 1756 0 R/Fm168 1757 0 R/Fm169 1758 0 R/Fm17 1759 0 R/Fm170 1760 0 R/Fm171 1761 0 R/Fm172 1762 0 R/Fm173 1763 0 R/Fm174 1764 0 R/Fm175 1765 0 R/Fm176 1766 0 R/Fm177 1767 0 R/Fm178 1768 0 R/Fm179 1769 0 R/Fm18 1770 0 R/Fm180 1771 0 R/Fm181 1772 0 R/Fm182 1773 0 R/Fm183 1774 0 R/Fm19 1775 0 R/Fm2 1776 0 R/Fm20 1777 0 R/Fm21 1778 0 R/Fm22 1779 0 R/Fm23 1780 0 R/Fm24 1781 0 R/Fm25 1782 0 R/Fm26 1783 0 R/Fm27 1784 0 R/Fm28 1785 0 R/Fm29 1786 0 R/Fm3 1787 0 R/Fm30 1788 0 R/Fm31 1789 0 R/Fm32 1790 0 R/Fm33 1791 0 R/Fm34 1792 0 R/Fm35 1793 0 R/Fm36 1794 0 R/Fm37 1795 0 R/Fm38 1796 0 R/Fm39 1797 0 R/Fm4 1798 0 R/Fm40 1799 0 R/Fm41 1800 0 R/Fm42 1801 0 R/Fm43 1802 0 R/Fm44 1803 0 R/Fm45 1804 0 R/Fm46 1805 0 R/Fm47 1806 0 R/Fm48 1807 0 R/Fm49 1808 0 R/Fm5 1809 0 R/Fm50 1810 0 R/Fm51 1811 0 R/Fm52 1812 0 R/Fm53 1813 0 R/Fm54 1814 0 R/Fm55 1815 0 R/Fm56 1816 0 R/Fm57 1817 0 R/Fm58 1818 0 R/Fm59 1819 0 R/Fm6 1820 0 R/Fm60 1821 0 R/Fm61 1822 0 R/Fm62 1823 0 R/Fm63 1824 0 R/Fm64 1825 0 R/Fm65 1826 0 R/Fm66 1827 0 R/Fm67 1828 0 R/Fm68 1829 0 R/Fm69 1830 0 R/Fm7 1831 0 R/Fm70 1832 0 R/Fm71 1833 0 R/Fm72 1834 0 R/Fm73 1835 0 R/Fm74 1836 0 R/Fm75 1837 0 R/Fm76 1838 0 R/Fm77 1839 0 R/Fm78 1840 0 R/Fm79 1841 0 R/Fm8 1842 0 R/Fm80 1843 0 R/Fm81 1844 0 R/Fm82 1845 0 R/Fm83 1846 0 R/Fm84 1847 0 R/Fm85 1848 0 R/Fm86 1849 0 R/Fm87 1850 0 R/Fm88 1851 0 R/Fm89 1852 0 R/Fm9 1853 0 R/Fm90 1854 0 R/Fm91 1855 0 R/Fm92 1856 0 R/Fm93 1857 0 R/Fm94 1858 0 R/Fm95 1859 0 R/Fm96 1860 0 R/Fm97 1861 0 R/Fm98 1862 0 R/Fm99 1863 0 R/Im0 1864 0 R/Im1 1865 0 R>>>>/TrimBox[0.0 0.0 1366.0 768.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r41 0 obj\r<</ArtBox[5.05998 5.06 14.94 14.94]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1866 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1867 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1080 0 R/Resources<</ExtGState<</GS0 151 0 R/GS1 1868 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>/XObject<</Fm0 1869 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r42 0 obj\r<</ArtBox[6.0 3.62 15.6 15.5]/BleedBox[0.0 0.0 20.0 19.5]/Contents 1870 0 R/CropBox[0.0 0.0 20.0 19.5]/Group 1871 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 19.5]/Parent 1080 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 19.5]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r43 0 obj\r<</ArtBox[5.49998 4.0 14.5 16.0]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1872 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1873 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1080 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r44 0 obj\r<</ArtBox[2.49998 5.28571 17.8571 15.1429]/BleedBox[0.0 0.0 20.0 20.0]/Contents 1874 0 R/CropBox[0.0 0.0 20.0 20.0]/Group 1875 0 R/LastModified(D:20250609193757+05'00')/MediaBox[0.0 0.0 20.0 20.0]/Parent 1080 0 R/Resources<</ExtGState<</GS0 151 0 R>>/Properties<</MC0 49 0 R/MC1 50 0 R>>>>/TrimBox[0.0 0.0 20.0 20.0]/Type/Page/PieceInfo<</Illustrator 9 0 R>>>>\rendobj\r1874 0 obj\r<</Filter/FlateDecode/Length 248>>stream\r\nH\\QN0\f+\u0007n$W\nZ\ti=\u0001\u0015BB\u0005i$-,(cI\u0019q\u0016Π.$;?\u001fw\u0012V\r\u0010\u000ej}<\u000bW?Nr8\u000b^>P|)8[5XF%\u0005+\u0019V\u0007蔃\u001d\f^5`?pa\u00143Z}7qh7'zo/^#1֙NW\u0012&Na+\u0013)V\u0005q*Ob1\u0019\u0010Tl`W67Nz:b\u001f{bI#ǩto\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000XU\t\r\nendstream\rendobj\r1875 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1872 0 obj\r<</Filter/FlateDecode/Length 169>>stream\r\nHPA\u000e0\f\u0015d@&4q\u0001\u0015!m_Yw\t(mډ\u00135:ľS\u001d3JY\u0016Qixק<\u0016\rf\t\u001a{^G׻b\u00022\fǐPf,\u0013!\fh(`.;zE7\u000b]\b\u0013W:G\u0004V=(g);V\u000f\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000H\r\nendstream\rendobj\r1873 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1870 0 obj\r<</Filter/FlateDecode/Length 407>>stream\r\nHLAN\u00031\fE9/Ќq V\u0015Xp\u0011Er\tɔj\u001dv^m\u000far2B4B׀@=2$g\u0000Bio#~\u0015\bP\u001f\u0002\u0012)!z\t\u0016\u001dFl\u0007TP\u0012LLWMܻZ*Xe&$\u0014\u0006pp0|/Q\u001f۬\ns\u00143ͦG[4jU'lVJb\fK]Gh\u0011I\u0015hTUSC&!R2lE0w\u000e6\u0015iImx\u0004H\u001a\u0001qہٸ<Pv#9D,.\u0018)Mv\u0016\u0015\u00079u:\u0014SM-j'd敏l3S|[.uvÅG=j\u0003\u001aE.^\u0014f5t%>hۚ^|Rb#x'09<Pq\u00197\u0011;=4|\u0018\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000jyt\r\nendstream\rendobj\r1871 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1866 0 obj\r<</Filter/FlateDecode/Length 180>>stream\r\nHLPK\u000e0\u0010)\u0005N\u000bB\u0002Fb&\u001e(+4\u0013)\u0018kͧc\rL0\u0001\u001d\u0000&Q6Q31\n{y\u0003ob]\u0019Xg!\u000eH|c_aaY\\W9,c(2\u0011ӥpAb\u0003R\u0017J{\u000f\u0012Fn+\u001c[TC<^,/cҴM3\u0017s\u0018'\u001cz\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000P8a\r\nendstream\rendobj\r1867 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1869 0 obj\r<</BBox[5.06 14.94 14.94 5.06]/Group 1876 0 R/Length 228/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Shading<</Sh0 1877 0 R>>>>/Subtype/Form>>stream\r\nq\n14.94 10 m\n14.94 7.272 12.728 5.06 10 5.06 c\n7.272 5.06 5.06 7.272 5.06 10 c\n5.06 12.728 7.272 14.94 10 14.94 c\n12.728 14.94 14.94 12.728 14.94 10 c\nW n\nq\n0 g\n/GS0 gs\n4.9400001 0 0 -4.9400001 9.9999971 10 cm\nBX /Sh0 sh EX Q\nQ\n\r\nendstream\rendobj\r1876 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1877 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 0.0 0.0 0.0 1.0]/Domain[0.0 1.0]/Extend[true true]/Function 1878 0 R/ShadingType 3>>\rendobj\r1878 0 obj\r<</Bounds[]/Domain[0.0 1.0]/Encode[0.0 1.0]/FunctionType 3/Functions[1879 0 R]>>\rendobj\r1879 0 obj\r<</C0[0.933333 0.94902 0.960784]/C1[0.207843 0.286275 0.368627]/Domain[0.0 1.0]/FunctionType 2/N 4.97729>>\rendobj\r1868 0 obj\r<</AIS false/BM/Normal/CA 0.110001/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.110001/op false>>\rendobj\r1670 0 obj\r<</Filter/FlateDecode/Length 29279>>stream\r\nHWَ\\\u0011}C_U\u0015\u0018\t\u0012g\u0006 \b\fi,hs\u0014yHr\u0010EL.b\u001e{G=|\u001d\"5:$Ã7޽w\u0012Kq4\u000f\u0004\u001e翺7\u0010ǏbYZJK)={/\u001f|ڻ\u001f¿1/\u0005\u0012|`榬\u001f~\u001eܼN\u0019?r=\u0004SK?\u0000M^K\u0019\u0002ؖn_\u001fvu(_\u001e#}']=i27r-z\u0017W;ÓYOuN\u0013D!&*\u0017&1/\u0014Bwץ֣qwJg\u0010\u0014\"sLlH\u0018RmܚQM3\n%jPU\u0018\u0013޽>\u001cA#ӥ%\u0015{vǱI\r8aQ疴0ssX\u0018y\u0010pW^\"z;V6\u0002\u0012.t\u0001#wJ\u0010&*+!^<dY`y\u0018 \u0018\u00198\u001e/;cmC\u001eԄ\u001a\fBR;\u0015\u001b&\u000b9r\\5n8K\u001e\u0012} +j(\u0017\u001az\u001b\b\b\u000b\u0003B\n\u00105|Q. c΋\u00005VlG2\u0015N뺴UP-|A햾4\u0019$\u0016(ImxҋE7܄rJH7(]\u0004d\u0012\u0004\u0012C5\u0007\"e~TlY\n\u000e>\u0005\u0019 \u0002ix}5Lu&q\u000b\u0002\u0019V\u0000־4+-\u0011LK%Jaኛj^BxL\u001a%\u0016^\u001du\u0012dø|\u0010\u001fzE,1q2n\u001fRv\u000e\t\u0007\u0003ll,\u001f\u0012AM3-:Sq\u0015s+)41<9%}*X'\u000f_\u0018P\u000fAq\u0019ݨK\u0015mm_g\u001b<Z}[$f`[\u0006;k%^D-\u001aܰR\"gt=\u000f\u001aiԈ=3\u0007L*R\u0017\t)3!eL<]\u001b\u00132\u00132\u0000\u001cה^fb\f69+LIctC\u0018Vױlwx\b*c0E-\t\ntT\u0000y\u0010e\u0006|Є\u0013`\\{\u0014ZT^P:\u0002ggRĂ'\u0010Z\u001e\tZh)橚~\"Cef(m#s1\u0015ԙRt}5NHƌ@\u0012V {,3I\u0015%Mq݁\u000fr{\u0011ڢ\n\"YbVt\u001dUI\u000bfd\u0010_IA([p\u0003`|p{5D\u0006EXHݶ}wr?a\u0000Q\u0016{6tܹGT\u0000wuWϮ\u0001Z~o[\u001b\f\n!@Ot(Mg)&jW#T\u0003do\u0015d(<b\\;Bii\u001e,\u001cD Mdj؞3ھ}|+z,zTmcnY&aƲ\u0013rUG\"NI֍X\u0006^\u00128]IuDM̥l\u001ade+ӵ! 򱘉AӍ|8EcD\u001aTCF\n\nn~ha\r\u0013QE\r\u00128kPkL`XlM\f\u0019K֠\u001e5H/j\r2n\u001f\u0006oKpYEb\u0000-Qìa\u0015P\u0014z,~x*\u000bM>T6Lv\u001eD\u000ed<Ǳ\u0002q\u0018D\u000edyl?0bQl;\u0007\u001c\u001b6S\u00106$n$Y\\?\u0004\u0006JxQ\u0000o7Ͽ\u001a\u001ezT\u0013\u0014^4E\u000f\u001dҒ\u0019؟Okw\u001f\u000f^AG`O\u001a&\u0004C>lAHׯ xKc?4y*\u001cl\u001a-\u0017\u00188k}\u0001|\u0012\f\u0019\u0003\u0006Pa8M\u00144&\u0017\u0010NjѠ/PvB#Vڊ땳~\u001b4DCVK0+k)@{i4xx\u001anc\u0012٠HY:@+J\u0016HΊnZ_\"B\u00073e%\u0018b\u0004\u0018\b׳\b\u000b\u0011腿LJ#(cۋ5\u0004[\u000f\u001a\u0012|?ç]\n\u000e\u0003K\u0014Eyd\u001c\u001dFulK[hBэ~mGf\u001aK}\u0006L\u0012\r</NdQ9m^'M\u0015W\u0011\u0005>Td[\"0\fT\f\u0002\u001b\u001eQg6]B?(8PRc @\u000e\u0004$5\u0007\u001b=\u0018S\bpΌF7\"3\u001cncSXpodUs*`Iz0\u001d/t\u0013A\u0005IQc{\u0017iT]\r\u0005D\u0007bA\u001dY>+\u0011\u0015։\nۆnKL>՘\u0001\u0012YX\u0005\u001cXu&MV#O:G`e\u001e)\u0019d\u0003\u0004-\t\fBdO\u0006\bv>ʀ`\u0011J\t\u0016y*vRZ[\u0018\u000eG\u001eh]ҠP11\u0015J\u0007m.@B*S14&拐l;V\u001apMA\u000e\u0013(8\u000e7#j:\u0000o%#KX|Z\u001e\u0005\\Rq1\n\"p\rqnP!=Z\u0002N\u0013D\u0000\r\u0002?Q5_I\rq\u000by!PH\tGv\u0013k]k&߾rb=g\bkSbR\f\u001f8|NLhShlł.h-\"&()ɎW8W\u0018\u000fpg!#\u0014\b:\u0016Uy%GoqD\b=9riij\u0014=\u000bi\u0012v\u000b\u0006@\u0014szdQFP\u001bׁ\u0000`SU%V\u0016\u001d\u0006q~fU} &)(n\u0003Q ;_D^\u001eneSqqBy\u001eg\u001f5&e\u0015\u0001d\u00064I8(\u0003d=^)\u001f\u0005DK\u0017`Q\u0013:_v\u0017\u0015`ʊZT6\"hU KbT5ݲ\u0011\u0019>\u0006U%WچD6\u00133-խ}Rh0Hi\u0014P0Fi\u0013e֤%&uAr)\t,\u0014\u0004@oS*\r\u0000-WF~\f(f|D\r-\u00120$\\^Y^y7U\u001bqD\u0015u$\u000f]}9z\u0000A\u0001\u0003\u001e\u0005X>[\u0002g`p{\u0011UYn.\u001e\tC\u0003Ό-xݬa=U\u0016\u00188᱾u&J#*U1^\u00010$O+MMh\u001aQ[A'\u00148B\u0002^{A\u001f4rc\u001en}\u001d\u0018!\u00073z8!CB(i'.t.\u001cC[AN\u0019E\u0015Q\u0017fߞ\r\u001a۳QS\u0000 \u0001*ξ\u00196ހ[(o C}ߢ?bU\u000b\u0005\u0007ѻl$h\u001eb|\u00002,J\u0010/=r©\u0004~\u00181LG\u0006PXr\u0006zO\u000f\u0014;gC\u001dYj(\u000b\u0014Q\u0016\r\b\u0000\u001d/?a\u0003_:JG\u0005h6R~+6ބ6s&\u001eme^pt1L\u001c\f! ;Һ@g\u0004$N\u0002\u001d\rx\u0015J\fo\u0002A\u0001\u000341l\u0013\u0011gަ\u0000ʼ\tN~>G^}w+\u0000*\u0012eU\u001eˑ:β\u0000brBWn\u0005&n\u0001\"t\b:}7\u0004D*\u0019W\u0013\ny\u0005R\bs\u0017+ekJ-S6A0Sת\u0004a\rVΪ\u001a$\"\u0016'q/RkBp6mLJqxEJ^\fn\b|\"Nd\fhsPxPZ>&A\u0019Z\nsI\u0015NW>7\u0012,*kT\b:\u0010؆*-Z:qѶp\u0003c[s-J=\u001b\u0019\u001a{H/b\"]\u00074\u0010C\f'(BWS\\%/.\"6\u0002#\u0016џ^cШE+W\u001f\fPR*4K\"\r@\u0006i\u0017\u001euB%h)1c)qRx\u0010uNK\u0010R\f[-I^\u0002\b59buC ކN\u000bS\u0006UQ%m>\u001f|\u0003#\u0007Fd\u0003D\u0018\u0013ŭ\u0013kG\u001b\u0015T\u0016*p#۽JuGzg\u000bKCSW3\u0018\f%K\u0011K3[9X=2A|\\]/'ඨ\bE-UD\u001aq؎]C}v3¬iP\u0001\r#\u001fQ4\bf\u0005R3C\rt-'\u0014d_\u0003\u001cuF\\Ct,'H0\u0005N\u001cPJYN\u0014\r25Z-\u0017,f%M<:ZtdמQwRG?sUw7't\u0004wb\u001cYA0ͧ//ip\tvq~2>|?.t#?rc*B0\u001a\u0010E!1%f\u0002o&EC</\"\u0012J[%#\u0002\u000e\u0019)ݏM8oˉTD#\u000bgX9\"KçVHV68*W\u001d)\u0004e7\"&}l|WTG\f<*x0\t»glN@7\u000f{\u0014ދ}a1YGϥ~խ9\u0011YTFXG'Z0Rfc\u00038Bܽ\u000e\u0005{(0]8\u0011JM\u000e+\u000eB\u001dz\u0017jjUK7?p+趑2o#+^X9\u0003*L\u000f\u0013b0PKR*'\u001c\u0000v\u000f)ʋK'Y\u0016\u0018%nf[W`EB~miQ^D\u0003s\n\u0016(#S6Zd\u001c\r\u0010)60\u0001\u0001)6Od\u00101zbT7_JBˏpEIGdPmĒ0Y~|`r\u0011\u001eFTd^\u0003í9 Y\u001a[\u001a[}\u001a\rv`\u0011$\u0011\u0016$ĵ\u0006x9o08I\rR᭚G%j`\u001fz\"TeM\\h\u0005|\u000eqrp\u001dP}tO̓V^oWƻn6U(6wl\u0005X8\\\u000b:\u001bZ\u0006\b\u0002\u000e\u0018g\t\u001cYv\b\u0016jI>-\u001f3\u0013C(qpx-,x\u001bXIi\u001cE/2nA)߯XS/%!%\u001a~0\u0018\"W\u0015r=Jn\rl&K983[-X_\u0006J])[xMMmLĦM|njQ|\u0013\u0019b19UDE\fSx\u0015s\u0006#ݡa\u00183gPc\\_1$\u000b05\u001fB\u001f><>L<U\u0019_\u00005읉3hL\"2C\u0011e%p#۽Ju\\ΚRV6'k4}qD\u001d'ʐ\u00052=\u0004?x/Ǟ\u001c'\u001b\u001fD\u0003d1)<Xyx*;sBXO9KE\u0010\rEfFwKZu|\u0004Q\u0013#}Ak\u0005[M\u000fW_?_:\u0012a\u000f5_z駋ߟ?4ټATDȯ\u0002ʛL]K{\u00183'{b#a#BuY[O-\\{[\u001eokv67Vu\u001d57\u001b˰|Y(\r!\u0014\u001bK4\u001ev\u0013,`\u0001hb΅6qd\u0001CCEoBFr\u0001^_i=5BR2\f\u0011Jβ\u0012=\u001d\u0018\u0000\u001e\u0016\u0000 \u001c\u001d\u000f0vQrl\u001f3n.q}5\u000e\u001c$-tVm(mZ񁖱\u0006dd뱕\u0001!uUՈ@L\u00029\u0001\u001a\u0001k&\u0012U\u001eaj<M!l%Q\u0016\"\u001b\u0001*\u000bh\u0003W3(\u000e:@u'Ggu2Be7g;\u001a\u0011;ph6ܛA0Ӥ\u000e\u0018:Ҏ\u0004>u/\u001bQi\u0010&Q(<5}\bN83\u0015-sp-2slڏZ\u0005QfU\u0014앩ѺGN\u0019T7IQ\fcm\u001d\u0016o\u0002Z\u0018\u0007]x\u0004o?<\\o烈Ϸ?i\u0005:bP\u0010R(\u0005/\nя)Q63956Z6\u0001t@/#R\u0018kH\u0019S}}'T%r)\f\u0002U\u0019\u001b*q7s\u0011\ro㥣\u0005\u00025\u0016\u0019t#._A8}ϖtp\u0017t*.߬\rF2h;XEGIxmmݣ^$r?\u000b\u0003y=ÒOt5BmЭW\u0015ŅF\u001c\u0017\u001932\u001c'3>\u000f&\u0010\u000eN\u001akR.X\u0015aw\u0017;#ky\u001c\u0010|r\rsQyl\u0010\u0007:G<5\u000e\u0002\"Q\u001a}F6\u0006+NΎBm\u000bQ`m[X\u001aoárHj*4\u0002tsǣ\u000f\r\u001cA.w\u0013\u0017\u00079Ӑ\u0012'\u000b\u0011NT\n:У46VQ\u0015oCc)hg2k]]\u0011G/ղcmC\u0015^ܲ^f\u0011 ^\u0004`3~\u0004wF\u0010sH\u001e{Ѝ\u0006ldbD(#jd̈D\u001elNԿYg,KR\r|\u0014I5\u0010`^ {Qy穼ST(cuSF:\u0011v@\f\u001aJtxAxџaP \nq'O\u0012\b2\u001dE\u0017(tL\u0016uV'\u0014#GtzTx\u00176\n,) 9TaF\u000eJ\t;\u001f,\u0015Ў\r\u0006\t*\u000b2\r\u0015wn@f\\C,%%Cd.o\u0006¯iҎ\u001ef\u001b\u0007\u000e~:ɋFYӫ (9֯n\u0006\u0006/̪b/2\r̟{r\u0005X3\u000f\u0016;i5Ű1OeIKJ$Jm\u0003yy\u0019\u000b\u001dz/c˅\rq8)ʃ~g2sa\"i\b5x\f\u001cI}\u0018u{\u0010\u0015gnCE߇SAVmX\u0016{`ꗃmxl@61Y\u001a頣U(f[+*1gw>~X~~WYZWSmbf1Y5\u001a\u001a\u001fũ\u0005]ǚ\u0016\b\f%49i2'\u0013%\u0000ݳ}i><uo\u0007E|Ы8ov2ӌe<\u001e\u0001yۣ%\b Z>{;RˤV\u001a\u001bE$\u0005s~B_Z[\tj9\u000e\u001fCIR#qK\u001cJ\u0010`wT\u0001DP頞.Q0\u0012Rw\u000b\u00055\u001b݂7/]t(۬\\u\u0018\u0012/.\n#f0?w\"+ݏ[K\tI:uf\u000eG9\u000e\u0010\u000ej$\u00073n]ԝ턉5J>w=u곚Ve,`Ya<T`A\u0004\nWY\u00146v* D0\u0014\u0006YP54*vkU8\u001dv\u0005,vHU?E'a\u0010uޜσ'Q$eטL؋8'3\u0017,;ϧ6/^\u000b9~_\u000f\u0011!~_\u0007\u0018>;\u0017!&9\"D\u0007_.\f7Ј\u001f/{-Ơ\u0006jִ\u0010h\u001e7\u0010\u001f3\u0002;\u0001\n01΀\u000e?R\u001cF4gٓyvxj46#ؙ\t|~Å\u0013\u0019J\n'6md_7{'DȞΈ\u0002\u001bQ\"c_8ENDqFPׁZJҿM\u0007Wv]\u0016}o\u00154+8+'3W\u0002\u0019/\u0011ӝnqf_鷗\u0017zG.~\u000e\u0011#ʌk}H7^,*F\u001fE}X5Q!ӵ`Lu$J$^\fX\u0016#\u001f:\u00172's@ ]ރvG\u000e\u001d~(C?\u0010\u0000\u0000u Yy\t$\u001f@$Xן?}\u001c\u000e\u001c54CZ?\u0011\\qӯx\u00004Լd\u0003Tv5 (פ\u001fL1SafПf\u000e\fT2W2Wa;\bѴ}\u001f75$w/~x/ፀ\u000b.\bcmOD7+9\u000fi?\u0006odyT7\u001a\r\u001baF:.N\u0007OwiE$\u001emؘR e&\u0003E}uУ\f\f\byn\u0007G\u001ci\u0014iSXݲ67Ε'*=Uj\u0011I\u0014Y<YkO 0d\r\b\u0015n񛍠bMa@A'=_P-)L#Ĳ\u0012j+KLm+\u0000$.6\u000ej!DU\u0013$>? \u001c4{BP2IiY\u0010A3\u0011j#\u0013}f\u001edD\u0016w\u0003|\tې!86\u001bUy*\u0013դXBpHy9\fhJ7*\n༺\u0006{\t\u000eEg\u0002z\u0010kh`>&&\u0015E6\f@aQXM\u000eҠd*ÿ\u001e浍d\u001b$|\u0013M{f ̚y~\u000f\u0007\u000f\u0007tlee[̊x\u0015ې_?#O}\u000bq_A\\\u0001r\"q2Y\u0007\u001e>|\u001f%:fE-\u001a\u0010\u0014\"rkR49e\u000e!r\u0018]{\"7ϵ\u0002\u0001q)+\u0018JVH@g<\u0015\\\t:\u0001%Ae\u0000\u000f\u000e\u001cA\u0006}ğwMy8\tm6DPn༢H=O)jJ޽1\u0011\u000faV](\u0006`͸68\u0010=r1\"@AsMӦ\u0004CD\b(b\u0004\u001cWp\u001c\u0004¿{\u0011?\u00003aEģkq\u0000C*\u001d\u0001A8\u0004Ga|\u0003\fh^k\u001b\u0004e\u0000<:\u000e>1\u0005\u0013]4p5iʟRǡg!]ǅAC&#Ϩb\u0018>m4\u0001\u00188\u001b*dѠ9\u0011?P\u000eYH-\u000bJ2//:LDÕfLX X\u0001\u0013kt`4\f\u0012n5\n\u0003r\u001bʀ'F4\u001c$\u0013JdKFP\u001djt\u00020#K\\\u001e ڿ\r\u000b\u000fJ$@0<\u001fj76)!\u000e\u001aH/v9\u0011JQYg7\f!2\u0016M̠Fl\b\u0011\u0001\u0007i04\u0005'AɹY?GZ\u000b\nZ4ܹ*Q\u001cS#i\u000bIu\u0003>BR'Zlj\u001bhMnXS [ZI45'-\u001aL\u0011\u0015B\r#\u0013\u0006*ň#N\u0000\u0001)\u0003j(Y\u0011J<2\raS!Zp>sa\u0006\u0006wqeFM8Ȏb\u0013\u000epJu=\u0016R\r5-\u0015E\u000bP7\n|~0O0\u0002#ĄaNBTܒX[e'TT\u001b-\u0001\nU$\u0012%56غ.\fȅX\u0017V\u0005`JuMJY(3S۠Uz4Պ$$(,q4UfY_\r5\u0014\rJUl҈]\"Z%ibLd(\u0019w.G\u001d̤\u0001hƪaNKrNe;\u0004_H\nMZ\u0018u\u000e/|\u0013\u001b/q\u0002b.SΆ\u001e\nL:\u0001`r6,Q:h`\u001ckSЂ\"9\u0015u9to~f,^8 Y{@հ5p{\u0011U=0\u0002\u0012-TȌ\u0017\u0006*L\u0004&6KT\u0017)޼T\u0015HˍiۢϕSu_^>\u000e\u000fqZF\rO\u001c3IcF\u0019<fcFcF>\u00191<fǌ\u00072f\u001ft(1<fǌ\u001fdp1\u0003/7gXo΃Ə7hXSuȁux*./\u0003#Oh$]~\u0018 ,g\u0007b^^\"Xk@Pjڹg`iIixųGUz.T[d#(\u001fs\u0013f8JBHf\bj\u000e+A\u001aMd۫4Cd\u000f\u00002^UQȿ\u000evi\u0002QP!KQLXj}WA$EE{hH/{ǎ)\u0006N1GNy\u0010\n^\n\u0000\u0001tSi\u0005\u000eݴ\nVk\u0015GUVk\u0015\u001eN׽6\u0016ΰ#\u0007%\u0018>6\u001d1Jd\rhx\npl/6(p̫\u001dǜUVX\u0002fF\u001dʡ\r4$w>7yM+v*/S\u0004\u001aL\"\u001aDX{dJ?\u0001Y&Ozbu\\>\\/_,j]'VS\u001bRR\u0014q*#A\u0012hmv֭5яVu\u000b\u0012\u001d|_¶S7D>JWmyňBҠysED\u000eDnM2ݔ\\;\u0007c[ CZ|}\u0010]\u001df\u0000mb}=kٻBEec\u0000\u0012&TzC1<\u0001&)ky7\u0002etn\u000ftݠns7(\u001bLl4?Aw7u\r5r\n:\u0006\u0000\u001e;\u0013S!e\u001f\u001a\u001a,\u0017\nTHOlq-,KvS\t\u001br4s+%\":46NOl\u0012t%uLiS\u00012}*YzJApڐhy\u0011|o\u000bsY\u0001Q^d&~,î+A\u001dN5\u0016\u000b{+CR\u0004yTmW)aQ_$njQ^z;p\u000eW\rvְw4haYChk9W.aNi+8\u0011\u0015/T(i*D3\u0005&,Nӈ6{\u001d\u001e$ڶ-XmI\u001a$>[l)ێ\u0006Ut\u000frr\f%'\u0010!Q-̆HxT\u001dR{J\u0017UFYn\u00189ѯ{\bzuF\u0014K|?Ͷ\u001bL1\f\r\u0005,}Ap8kq\"\u0017җ\u000e1\u0017J]C\u00185m\rh\u001f8l*\u000e&U\r*\f|d\u0010Ku%\u001bu\u0003/\nC#\b|w:@ё\u0003\u0019\u0018J\u0006jYx\",\u001b˂qY(Ё.2\u0011o+HMR\u0018lG.ae\u0018\u001fRaǻ\u0015ԇ@)Y\u000fj\u0014Dk^dyZ\t\u000f\u001c9\u0006\u0016߱KqB\u0019lJ\u001f|b[7i\u000e\u0005_]L\u0006~S<E<\u000f:SH<[9n6oCB\u0014h\u0010\u0010j=K\u0002焈=:z\u001e\u001aj2/\u000f\"y~\u001cWN2FhަIWoh=\u00110kh\u000bm#nLL@nCxfᘮ\u0004\u0018\u0018\u0010\rŨ \u0019I0\u001d6&XB\u0018\u0012\u0005-.g$\u000evnFLSw\n\u001ek;(:oJ\u001e\u0014\u0003h8S\\\u0014IF=Sף\u0014}'E|?I~SR\u001e&EG\u0013\u0014)3E#)Q4癢\u0014(:ZM):N\u0007JѨg\u0014\u001dm:S')3E=f<S\u001d\u0014\u001dm<S\u0014=3\u001b4+r\r\u001b%\u000e2ha\u001b<\u0019v\u0001kc]ԣ\u0017OϮzybiM\u0003\u001c4^\u001e\bO\b6k\u0015.Wax\u000ebһcP\u0002\u001cjp\fs1\u000b\u0000K,|\u0010\u0012%ٺ\u0015\u0012w\\\u0011;<HVR);dn;c*\u0001U6\u001e\u0002}I#A[\u001bh\u0014VrWr\u0012!ME\u001f31)\u0003̞%/\u0005ee\u001c4Ua[C])wCzp\u0001$YT\u001biw#m\u001f??YI<j6\u001a9*XgGAdVc'v0Ar#%5\u0003S<\bTC\u0014r.5\u0007!\u0006m|\u000e/m_%QE)\u001cK\u0014擤\u001fճ^\u0012iMVGXX\u0018dσa\u0006*]\u0011|]!]DG\tV\r\u0013͠!h)!P\u0011=:\"%\u001aj\u001c #\u0019\u0005%\u0002A4p\u000b;^7ni<bFEn0!Hl=SeIYDT|bO++,KB7]\u0015h|3A_aH{|ǿv\u0016Ԙ\t`20\u001abl\"ly4E\".\u001d\u0010:]\u00190G\u001dɁ&V4\r[fmN\u0010j$voI]~{>wZu3NcFvySv'hVc\fx_(\f/\u0015U\"\fl%Y7=3\u0015RW}\u001c\u001f\u001c\n:\u0001w2I\u0007,dhڦ\u0006T\u0010{OB{hHoȗ&F\u0016\u001eͅFD#\u00040xA@\u0005\tv\u000e0\u0016\u0011Ɍ\u0004bV1\u001b>5`eW\u0002y.&xp*\u001aeb6W7\u001d\u000eJ\u0003f#~\u0000pbgr`U7iݤe^DN]e\nl>CҌѪ^eݪe2\u0016բ:n2Gc\u001a\u001aʪaóAz\\3mLg`<\u0003q\u0006n|b\u0006:/P %\\\u0016@\u0000\u0002R\t\u001e\u001ay@e`ò lgK#&SA^3p\u0006)lz2z^5*fήro\u001a\u001c&-\u0003]R\u0007-\u0001F-\u0001G-;dWT|\u0006G\tS.\u0013A;X5NZZt\u00174+I\\Mhfg\u0006\u0016\u0002GC\f(lXu6dh\u0014PM\u0019ϝ$O\ryv?Է\u0017\u0019I^[v<z\u000eԲ,T|Կ8ٶ E\u001a7\u0017xw˷on^^wo~y\u0002c\\v \u0012i\u0007K}\u0005U/{;Tk\u0006\u0015d\u0011kϯ\u0015|\r\u0005M%1ary\u000f\u001f^O:\u0004VU\u001a\u0010\nvp\u0015DFZ\u000bѦgZv츍^_KϢ|?J\u0010\u0001F\u0010\u0004v\u0017@v HV\u0004*/ΕF\u000fcF\u0018\u0001jb=)3G\"'c>mfQT9@f:J\u0004iG\u0013U6!'TZ\u0005\u0017{;[<\u0003^\u0002\u0013T7_\u0007ؐ~\u0018M)2N\u0018{c//-\u001at-Q\u001b\u0003}Hy~Em.}?6\u000b\u0017\u0010nl`\u0011\nYQ[\u0011$\u0017\u001a\r\"\u0004okB[G9pگxrC(!k63\u0006\u0000z|.X\u0015m\u0015,Og)V<ҥU,\u001f\u0018nJ\n\u001fhsR*%f\u001707V\n\u00136\u0000րs\u0019N\u000b\t\u0000D^ct\u001a0ZAƛ\u0000;,xpBΟn0\u0002~\u0017 <\u0017_=| \b!fa\u0019̓\raš~ȟ\"`\u001f@^+h\\\u000e\u0006)͏LH`g;K|\u001aD\u001b\f'@\u0019tD\u0010'=R5\u0012\u001f(\b1b-д؁0n\u0001LLʥ\u0003#\u0012C\u001d2zA\\\b\u0013YxxhhmO]\u00023҇c\u001a\u0004-(\rɖq.݄ʄT}PAE\u0000q8Lh\u001dDO-\u0007i݁p9O\u0006\u0012\u0005\u000e\u0018&u\u0002c7NkQ;>uMp\u0010]0XaG\u0003l\u0019fڍ'W[I\u0005i{c3A\u0013O)V\u0002]&J\bu0e\u0005;1|W膾+<\"қ3GhL\u001c\u0013(\u0012\u0006)ZAq\u000eއ/\n\f\u0015H=\u000e}<X=5lGJq{6\u0004K,LXC\u0000'$vE\u0011(\u0010\u00120\u0015u\u0002-R9MfQJ?瑹\u0004GղU*̾ɘUVamjF\"6u?yi:\u0002I]+JݘY\u0019O\u0019,Pe\u001a-}HX]!h\u0011G(Ĝ\u001cf\u0005Gnu(\njg\u00175vwS$\u000fޔ\u001c$e\u001fy8fW/@u%\u0006{9@èKؓ\t:鐄6Va\n\u000e˩`HAE(\u0012@U\tqQB7\b_t\u001c{Upp*-\u0007Y6\u0015%,\u0014 a´B\u0005r\u0019{\u0007i݌QӼ$^MlpV*\u0019\b=vg\u0004Qi/D'\u000fsc7l/Vu8+R\u0018-\u0004E\u000f\bXҲ\u000bβ'AxN*hdr\u001cB30\u0002&\u0013m\u001e)v׋\u0005|\u0000uWIAxݗ\u001fZ!$kd#A%\bK>\u0013/=\"^:]&<n?ypS`\u00175f(Q\u000f\\7E9!Rt7\u000b<A\u0004\t\n;9\u0017%\\=f~9_ݢ^\"\u0011_[#3\u0016六\u00192>̬{\"Mf{\u001f\u0014c%3?Dfk\u0004\u0001gL\fʝ4k\u0014 #lNBi\u0006'/W\u0014tޚCm\u0014C\u0016.\u001aA]8qrq\bu>ĸeR6\u000er\u000b~a\u0018u]m ͥu)[<\u000eI:\u001co\u0012U=\u001d\u0011\u0010R\u0007/]\u000b11\u0007j(Rv\\*\u0004\u0018\u0004̂6\u0005-ů4 {k\u0012\\/ڵX6]\u001ee6>g\u00161ĳV\u0007\t\u0016W˻?ͫ\r΀[?\u0015̑\u0003\u0014ș1?;|OY\u0014\t>lS[溭=\u000f\u0001\u001dXQ'B~fINm\u001fdپm\u0016I\"'揥9\u0007`_r\u001d\u0014\u000b!\b5h\u001f&\u0004\u00045_\u0005j^_ =ŝ`Fܹ\u0004\u0000SԶ\u0017spBZdZx#U?;\u001bE0\u001b&52=JE6hvs\u0011\u001eՏh[\u001fՏlo\u0001To\u000e\u0015|\u0019cПUYxdD\u0005ںᥠں%pl܎MZ#\u0005\u0014\u001aZŚߧ]tKs\u0007ܥ|K;\u000b\u000f=\u001e|\u001b~y\u0013o z\u001f\t\u0013S]~\u000f>y\u000b]97neZAa\u0005K\u0003&Yt躃r=\u001d\u0013Ҷ\u0001\u0001\fn$7\u0018S6\r;E\nNԶ\t9o.\rEϸY%dBݡMuk%Ͱ*S\fU%/^2D\u0006]a\u0012@v\fiG\u0015v\u0018O\u0016L&nl\u0000ee\u0005\"q\u001aq,Mz\u000bZ}\u001eOۚ\u0010tk$(\u0007\u000e[\u0015\u0007WOPR5\u001dkG+)f\u000bK\t\u0003\u000bC\u00108v)(oDT\u0011̩h> x-gn(\u0017\u0018bB2%]T\b[\u0004o+hMS\u0018X#`K\u0018\f]*H+\u001aa1Hb'x\u001f-)ȭiʤni&\u0017\"M|6\nk\t7A\n56r2\u0013 $_I)ܿO\u000f&\u001b&\u0003oM\u0003+O\u0019C\u0004GY\u0011<\u0019ϐ<sl?s^]I@Q\u000bqB]\u0014\u0010x>< nc=H\u0003\u0007Qrml\u001fǕQxh\u0011w2;ݤ_DFW;kP\u000b\u0012m#afq$Z\u0006x#}*\u0001\u000b \u0012bb\u001cS4,N\u0007H)1Ĵ{~_\tI36vv3^̴N)sm\u0015J~-v`szb?\u0013;_f_\u0013;_g`g#@\u0000r\u0011\u000b\u000b.?,{}٪+A'G׌8w\u0000~\u0000\u0007K]H6nXFͪ\tⵘ74B\t\u0018f8\"\u000bϫ~½&-\u0017Rk`N\u0012\n.KHdMv7Q톯\u001bj5Nk<XJnڶ\u0003ʳ\u000620\u0005HOc\u0006\b\u0010\u000b\u001bvY&maE&\nqE%\u0005M\u001f08쇜*s\u000eI\u0012\u0001\u0002NE\u000b\u0017'#:N\\)QQI\f>ĸeR6\u000ex[c_\nLK_vSyj\u001d6u8fߴ>׻:Oþw6\u000fQ\u001dlQr\u001aS\u001aL@'\u0010X9!x#EauQ\u0004XܾräfWGhچ)^\re\bnΞh]nEtcZ]R\u001c\u0019\u000fؕ\u000bimà^@l@>\fe5N?ն\u001bǍD+Qz6o\u001a\r`,\u0016\b,`!0U\u0002F\u0005*3\u001a\u0014AD!٬*\u0016u9EȄ4jG\u0013,ѶѾ-e\u0003FB\u0003\u001c\u0005\u0013y[ \u0000O\u0015p:enjcq\u0000R@%RP|>l.㇟O7Wߠ% Zl9\u000e\u001f\u0017NfY\u001d\u0004zJ\n?Yݲ\u0017N\u001f2{A\u001e5\bF[S55\\T\b\u0011\u001d:ҐX?\bXEf\u0014L0cՖ[i9F-8a\tv\u0013=Cߵ&\u0016qz dV@HAU\u001e\b.$9)8\u000fl(YѺ**q7ѹ\u001ejr\u0013V#\u0018h|\u001c86Lq/l|xݕx)\"i>\u0000t^sS9AfRZ\rRqFw6\u0019}\u0004R\u0013dG\u0007B\u001e&\u001fA<\"Z\r\u0011YUk!>g\u0016q椧zs\u0010\u0005\u00155|3gϞ\u0014i\u0001\fR\nJvnj:'SM}^JWCg\u000ft\u000e\fE\u0007!\u0016\u0006U\u0000M\u001d8\u001etF̘QG\rH~]~ً#\u001fY\buJ'!F#\b5GD<\u001eB=\"\u0018B9#\u0018\u001fP\u0010S)*MWTO\r\u000f@ɝ\u0017Ԯo\tUSgvE)\u000b1>\b@1݂J\t\u0001!cv۷n\u0017̯o\u001f|\u001e\t\u0004$ff\u0000\u0004;(6\bDb\rNZXW ĀF\r^ͻ;s\\(.\u0012~K?\\|Ïa/>^pd|k\u0012\u0005Vj<@O\u0004ǅ4u~\u0005\u001fO\\pYr\u0012NϢi\"q'r'\\J\u0018\u0018!{\tjd\u001a:\u0012TFO\u0014ԟ\u001f~+\rG.y8-&W\u0016Ӷ($-c%L\u0012ؐx\t\u0018f\rD<\nNFgŉ$\u0013AUq$\u0004b&轍jm?͸\u001d-\u0002BD\u0003t\u0007\b$ff\u0017KuZι`\u0001jZ6X\u001bڄ\rz\"\u0006]\u0005vPvh\u0014!,ܔ3q-$Ǆ4Sw\u0000K'e$]_\u0006,\u0019V.!Xze2\u000fL\\\t0`<6J.'5d'Kw1\u000b=\n~uTy1LdzgDS(۲TXi\\&̆5f'0}!jh{ʟBիu*EN˝;I/w^ǢoV\u0011g\u001d\b\u0016d٢pmdL}t!h\u0012i\nh\u001d\u0010Ӿi\u001eOzjhi\nWm`(կK\u0006\u0003t&\r@\u0017x36\u0011[\u001d+ʔ\u0016K%5\u000f2B-Ӫ5\u001bL`T&8B\u000eغ!'7f\b5Q\u0012sE\"GBWb\u000e\t;:_hRdh|L(\u001eb{-\u001aIgƭ%\u00063Q&ZX\u0010g\u001e/7ij(A*i.\u0013'UuȵF#Qn\u0011U(zCRm3`)lu\u0011>R\u001cر+&W?cbM&\u0005.;؞\u000e<a^\\΋AB4/݃=8\u001cC\u0005fQ\u00060\u001bHsQ\u001a;ѥ4{ZRևh\u0005&\u000e.p,I5+и\\f^ʔ\u000fp\\w\u0015\u0006w\u0015^.wz\u0001r\u0016`c_r\nO,k\u0007C\u000e|e;S^|`\u0015NxΣpmxu9u<:nȰ\\@%.XV\u001bgXޮ\u001bDИX\u0010L=\u0004*6<N\u0017Qq8\u0013\u0003+NſK(;\u0007\u000b*;vx3[\u001d0/ޅe\u0000ԙ2\u001eD\u0016\u0001iԺc񁮗qj\u001eKaG#\nMm]\u0005\b\u0006J\u0006S\u0019Տ)d2ͦ\u001d f\u0013Gj\"=*DX!gded\u0011#\u000eT\b$\u0017\u001c_]!nwrD~ٞ\"$lg{dp69d9H\"8\u0002\u0014\u0015\t-C\"\u0002\u0019|\u0003#=w}G\u0016\u0016WΊ\u0014:]7m/ZG;ت&։f\u001e\u000e他ܩ|mhcL~g\"U\u0011Ȳ//G\r\u0001T\u0010Q.]\u0019k\u0017<_)i\u000bkQ\"\u0013\u0001~7z{\u001d/7*UZk\u0010!+>\u0012|\u001f?~m\u0018.>\\p(x]\u001eu\u001eeRk\u001d,\u0003]U\u0017/z!J\u001bJ((\u0002 J[DoK'\u000eL\u0015d&yIh'\u00103\u0013Q-28D\u001f5O\u0017\u0004\u000e:\u0015ϵSx4L\u001dU0Yy\u0019k\\[u*qeV#c\tv޵c\u0002~lSDy\fw\u0015\fgq)3Q\u0015K\u0003\u0007RRXd+TLY\u0001.MJB%jmpHd(-\u001b#cw\u0016\u0018Ӷ-sT+\u0006k\u0004AR\u001d\u0010\u0013yi){O~)\u0015H,>+w\u0011uv޳*\f\u0005oqE\u0015E\u0006\tN@\f\u001e-3A7\\\u0016xy\u0018]\fJ\u0003\u0000(]\u0013\u0013ȇa\u0017OM6\u0003#AnKA\u0019^Ni>;3-\u0012eB3Ltx\u0006;\nL\u00184\u0013cWa:,u\u0000r;I<\u0004޼B\u0004\t!\u0004Zk'X\u0004ŷQ\r\u000f\u0000n5zv\u001e\u0006M\u0012-\u001dD\u0013tZ^ATw3\u000bLj\\у\u0017/jBeAuPJda\u0006\u0018Q(Co\u0002;wg`d\tByprz$\b\u001c\u0014v*~c~>W\u0016\u0006R+.\u0010\u0005\u0013s^,W`dרDS\u000bShD\n!o롄\u0012]M\u0010N!R\u0014\u0005$ZitĤE1\u0010m\u0010D+і\u0017ĖW\u0012fFZ%3z\"H\"\u00010pWIvm\n\nv-\nX9\u0004*љa\bPZŰ@rIZ)!\u0013`rmtF2\u001at\u00192¼;w\u0007z\"r\u001d@\u0003yyڱ\u0014[7ҮPb^%\\ؖ\ro:\"_q\u001fmc\u0002e-\u0012\u0010E\u001a]P9؎7\u0001$dtݩ:ujɧIL\u0019/\u0005\u0003u\u0010|u\u0003~{M|SR\"[O0\u0006wӛ\u001f>c\u001c\b\u0017\u000fAB\u0017WhojWv%|_LM`Xd\nkE_q\u0002l*\u000bnyyCUD\u0014Y/F!cpJisK;7\u0019 \bk\u001dhq\u00060LsS>WaEcwYmAD@\u0017Al$\\&li\u0019Ūa[e򶬹\u001b\r&E\u0013[#G\u001eςu:z@j4j>Tms\u0015%\u001ec#uH\u0016޺V\u0000q\u0001i\u0001!\r\b\u001b\u00049K ͵(6<\u000e>\u00150/ }7\u0018=1\u0019\u0011\u0013>g\u0017\u000b^~Ocpp\u000b^\u000eVx}{\u0003fzW:\u001bbE><Ͽ\bڇ\u000b'j#Kl\u0011+\u0007-xr/6dY\\2)(}\u001d\u0015)=\u0015p'v\"ީ^Bj[߅c܌8\ntI\u0015A8\u001e==\u0010\u0005Dy(&ALu$|\n`׾e2`'Bm1;fѤ\u0007pސ4<cc|إ*3++,\u0002_hJ̲\u0014\u00069}H;\u0014\u0011%c\u0015\u0011.kSj\u0016\u0016<ɮ\u0015\u001e2^9v֗\u0010[Ix\u0002S6\u0001:XqIq9q3J&#\u00109>A:p݉p[yp[ip;ຐqS0v mm~3\u0011zZClŻwo #/\t\f\u0019Јtu\u0004]-\u0017\u0001˓{q\b%򰋚?U-ȯ\b8\bP\u0000պ\u0013 rA0\u0014\u0001{\u00105~\u000e\u0001$/@Gm\u0019\u0004<YP+\u000b2ir\u0004v\u00164f\u0019\u000bJS3]X\u0010 \u0013\u0013\u0005>Ur$+v\u001f>}V2jCn(k\u000b̨*NűoֲvMdb♣)Q3zi\u0006Q)\u0001uR\u0002ʱb+R+\u0016F@)\u0001v\u001cU\u0017)q\u0004\u001db#k?1n!2+9\n{\u001bnpt49W\r\u0005\u00045\u0004)9Xf-uvr?\tg0:\u001c\u001bL&\u000b\u0000qJ~cQ#q.'ܟ\u0014myR@.T\\&yqS\u001cV\u000e\u0003U4eҟiT3x(\r\u0007-\u0003mŦ\ndG\u0002~&&O\n{\u0019\\ۄ@_9\u0016\u001c䨱kvAd\u00032\u001f(f\u0016\u0015.<`C*\nJnV7馄LB@4\u001eL\rABITt\u0016j8o\"\u001cSR\u000f׀w\"\u0004\n\bmΣQ\f;n\u0007!\u0004^%KH֏ދ\"\u0014_}\u0012͍Q٭ZE\u0016*N\rQ\u0018U-\u0015pc4\u0019\u001b1d\u00109\"+U\u0015+\\˺\f\u0000˱>IpuJ.rВ]\u001a)tب$d_|\u0012\"XPFnw\u0018eL&\u0014o5!\u0005R-q\u0016\u0015\u0015\u0002\u0012MF\u0018\f!Ӕ\r.)2w\u0002\u0003\u001f\u0016\n\u0017\u0010\u0018|x\u00054dXz\"\u0005\t;=Gl\u00165Z\u001ac=i\tBL\u0005z?ovXi[\u000b_\u0005-Xy}8n'c\n&:wI\to㐼o\u0017ue鹝\t\u0004A\u0011@\n6a|\u0013P4\u0012\f<칡/]R\u00012#sD#DU\u0003rU:/eU\"{J^\u0000\fsJʪ\u001fQ\u0013ޙ.\u000eQ1HPc:W\u001c\u0005\u001dF2P6.{:Z_e|ݝ؄\u001e\u001b\u0018]ݹK\u00183$TL6dnKdZ`sz\u0006N'8ep\n#\t궆\r\r5O7\u000fGC\u001e6F)\u001fv5\u000f(*\u0016*ǦY\u001eZ%+9\\`\b,'r\t\u0019:\u0012L/u\u0001\u000fk+ .bc\u0012\u0001\u0011\u0005\u0015gCeD6YI\u0011\u0015L\u001a\u0012:\u0006=a}Fﯾ\u001e&G&y\u000f[cDwomb\u0010X\u0001ǀ|aSV]-O]X\u00066NpCYo*\rPʠ2\u0001cP\"dOeRr\u001aIB\u0019}ȯ!s\u0006Ɍꂅ\rstHoNpd0$n;\u0001#\u0013|<\fk@\u0001m\u0005J4M};}^3f\u0019&ç\tc\u0016{\u00066%{Y\u0010gR]U?fZ\u001ak,IO\u001e\u000bĽrCR\nH|dg焠Z-v\u0006$\u0006R\u001b㠥\u0019\u0016P\u0002Zi\u001fRe\u0013.Ea]3\u001dɐڧ,bE\u000b;\u0013402ɷ|-Z?^S\u0015p\u0016\u0018Ѫy\u0001Ga.G\bڕkpx?\u0005{Q\bpԉPҔ.n\u000eo)s.\u000fI9RR\u0016#ǹR\rڗS~9E]z|\u0010/\u001eZg|Nnk\nW*йV ~Y\u001f~l\f\u001aR\u0018:\u0016c\u0013\r*909~,(P1[)\u0007+=\u00181\r4\u0005*0pi\u000b׶\u0002m`8\u0001\u0005;//x\u001aB>b\"*|(|\u0011\u00026)^\u000eC\u0017\u000eJC\u0005L\u0017b_r\u0018j?~\u001a!\u000eT\u0011PNE\u00108?ppӷ#o*So\u001cQ%\"xi\u001fKRsiJ6\u0013Ưբ햺^e\u0006OfK\"\u0011-W\r\u001bT\u0006p_>n?~cq݅VE1w\u0012+Fv|\u0012kg8y.O\r0\u0005\u0017,8Ԝ\u001d'\u0002E+ƹw\u0001f\u000e8\u0012\u001eM\u0001Y=GS>6\u0003yRy\u0005%a/\u0004 si\u0007\u0007t@\u0017v5\u001f\u000687[j\n\u001f[]_\u000f;ǽ`s\u001d\u000b3W$\u000e\u001f\u0006\u0019kP?cUf?u\u0018-'z\u0003v\\gB\u001a\u001eL{6b(pp!*\u0012Z-\u001cJ_\"m2*3'rzX\u0012H\u00125i}$pW+W>$y϶6ie\u0016͒h5_Wn\u0011Whi/$v\u0016\t0 \u0005YL\u0019\\$\u0002sHIZ~\r0\"bo\n|,{\\~y+\n)\u0007+ۛ\u0015\u0005j:AF^!Ih3\u0000pna\u001f$Gj\\ȟ\u0019,\u0017j]uXN\u0007rn9<E!v>dJ&m&|;6;W*\u0013M%\u000f\u0017p \u0013iR3`\u0006P6\u0001EPi.4\u001dI\u0018V-eg\u001bZE+Z3_UݨVY*oS\u0016DKoP4f\u0014f\u0014vv\u0006B6˿F۶@fcsS\u001bܞ\f\u0017\f\u0017)Et\"K=4,ʶ6,x$\"\u0011c\u001eן\u0016L>fuװ|5*ŝA\r&Q|wz\u0002F_ukU\u001dǮt\\z\u001a_&?&]}Rs,,ikUg=흪w=Kd&yk+k>zOꦌVݜѪ\u0007wܞ\u0019 q\u0000}\u001f\u000fu7qf=1g\u0000g\" i\u0000PwGnh݃>MؗD@\u0000!}H\u0004~\u0002Q\u000f\u00005#`:\u0013\u0001^\u0003}H}\u001fR?L?L\u0017\u0004>\b\u0002YN\u001bZ\u000bM߅BB \u000f\rn>x\u001e,\t]\u0015f\u000b=\u001c\u0001E7ɫ\u001e/X%\u001b\u001e]h0$Ǧywbi΍\f6|k6Kc\u0007:-\u0004\u001dG\u001eǯG;򌊸-)P?\u00076\u001e>F\t{Mm\u0004\u00197w \u0000\u0011 K:`ɴI;s%\u0012/PW.O8\u000bO_\u001b5kԲ\u0013ZffݚO\u001azr\u0002SLog\u0014/|[]q\u0005ճ,f\u0002\u000b4k\u00045 K:s,k\b\u0004rLY4\u0013\u001a\u001c\u000f&\u001fZ:u_˝\u001c\u0014?D\be_0V>&[w\u0004C8GE\\@Ւwdev>32\u001f~>q:03\t#\\==#_9b\u0003Dw &\u0011P/\u0013ͤ9\u0011\"+_G\u0006r&v*˓_U멢b\fw\u000b\u0002XW0`'Gu4XMS@fmS\u001dy\"Z2b3\u0003Ě\\\u00035Y^:MGNSg\\9yF\u0015\u001cU``Z0p\u0002ЂOIs EO\u0007o˴r\u0017!\u0018\u0000\u000fQo;Յj\u000fVUڿO7?\u000f s$囈qa:\nR\u001cZ^\u001d4\u0010\u000fS\u0004\u0010\u00062\u0003\t-B\u0001C\u000eٜp.\b:߱Yr&<M\u0010v6V\rJ}znH\fuO\u001fc-}zw}c^Q19:>Ŗ\r\u0012\u001b\u0001oJ\u0014\u000fs֙u|>{\u001bZNG)\u001c[\b\u001fe\u0005ʆ֪\u0002M|\u001d\u0012h@\u0013\u0018#_C\u0015#P1U\fQ1^bгVx\u0016h\u0000}@c\u0007\u001a{mh\u001d:u.xèxOwj׉\u0011n*ۿ~z\u001cY{xV(q16\f\u0019%ww\u0013<{:ǡ\u0014\u001cnbێh=\u0012Lb.$2L\u0012.=\u0012ݐ4II-\u0011.z$~AS鼪;C+h\u00154\n\u001aw\u0005fٶ\u0016\u0007ɠ\u0018\u00013\u001bv\u0012)P\u001fy<|ں\u0001q\u001fc[?\u0018L%Z2 \"\u0001G\u001bxN;\u0006V_6\u0012\f]r\u0002\u001f6sE\u0019!\u0007\u0016T-R\u0005#;ecS._cˎ\u001asPN\u001a*\u00061\b\u0003Ff\u0014*\u0001㦢k\nFEnF7\u001a(\u0006\u0002]\u001f\t{-3I\u0001\u0011TegPpvᇮ2Y,Nƥ\\q!G\u0006f(a@\"\u000f*Ry7qaɲ\u0012IHBc\u00123$q&!L)3q=\\8\u0010xpBm|\\4E\u00182Vd̶e}]\u0006\u000fnso~6\u0017ri4\u0012\u0005bf\u00122´\f~\nP\u0001;.\u0005\u0002\u000eư\u0016^71\\`2a`\u0004\u00016b/o'CB.\u0016!Y\r2BD\u0010.<\u001aqW×x\u0010zX:\u0017C6\u0002CN->\u001acN+:\u0007}hU\u0010'KWlH%\u001e%j\u001fʩ)\u000fdkH\u0011\u0019p\t9Z\"\u0006USj-=\r%})e4XFYI\u001a20Hy!dʴ\"1]X޳ e(s\u0011^Hj\u0004|Eg\u0003^\u0010\u0016\u001b\u0000\u001b\u00020?JKG~G俱\u0006%3\u0001kX4$1V\u001134a6\u0017N:\u0007-~9.\u001b%\u001f,v,r)œ,\no\"-OIRsPg<\u001d\u0002\u0019\u001c>qJIi]LʫTVڼT#{g&t\u0014κ\u0005lf\u0000(5DƟdDXʸ\tq\tQ.bc^k̼r^a\u0015Nȟ%=xǦ.Z.\u0019t=X2L\u0010%\u00067}UY_e !Q:Gf\u0005\u0007(0B\f[}\u0002IKI\u0015\u001b$\u000b{;}\b1=֘>p?V`CU3:<\u001dt<*cM}+_]\u0012jyo܋\u0001{y~\u0006\u0005\u0006\r\u0015MADZRSz#V[\u0011\u001bUM\u0019kK\\Sؔ͛C\u001dkQ9ݡ#ޟ)\u0015\bۈxe7\u0000ȋ\u0017ˋD\u001fy\"%H>QOgp\b\u0013ٝhifDxS1K$\u0003@GZ\b\u0014K˝T n+U<\u0013SC0\u0012B\u00073˹iJ\u00186Hs,sBl2\b|L\u0017VLȷrX8\u0007~~M\u0014ܬeJT~WO\u001c<\\>(v\u0018RbM\u0012L&\u0003\bcL\u0011AD\u0015R4\u001f2\u0003YrܪG<G\u0006rT>u4\u001fT([HHXD \u0007y=B-\u0012\r\f;\u0011y\bhXDm,B9jtbE)iibYwy\fLԌǲI;g>]8ONmErA\u0015z,*ڱ9\u001a%\f\u0010D@.ZOٯ:n\u001ebBc\u001f\u0006M//\u0002E\u0017F`)lHCR}&M$\rܑf$C\u0001Yؒ;i+X?jOK\\S\u0010:,\u0018\u001b\fA\u000bŞ lvIu\u000e>\u001e=cSJT7\u0019faFﻳ\fJw{\u0017;䪧V ϫ\u0003r<&چC\u001cjQ$X$7i#0\u0014\u001c=s:\u000eԙ%ؚG^+dvl\u0016]:-~1d_'h7\u001bo(LԾφ!¢Vg\u000eW7vp?<u\u0010KP|G#\u0000:\t\u0007L\u0010ҎTXMӸ2R\rfUpJ\u001a'kIơm4#- j88(()vf\u000f¼\u000bFeL\u0015\t[HëFh\t1B\n.\u0005%/B\"Yt7]@rOi\u0014vTs&\".݉8%\u0007_wa\\i(xbQ9GrN\u001cA\\\u00195I\u0013aEk:\u0002oqy\rʄ.D1vL\"\u0018IiPR}5\u0006D>m,loHed *\u0011@cD\u0001,U1\u0019\"eʸ\\\u001bv݇~BXwJ=x\u0015ǘ\u0000\u0007Y\u0017R\u001d<\u0001\u0018!Z;\u001cTI-i\u0013\u0004y2ᢗ/tA`xVt\u0007=\u00014t6;m[:\u001av\u00047ug\u000b$PTJ\u00131b\u000bV7\u001bCoM{[g{K;)\u0010/3]Wϡ^\b\u0016uaK\bb\u001f|3\naP\u001e7W7vx\u0001\u0017\u0006\r1<3}Y\u0002N\u000eF(k*(P\u0018.~tK?\\||,Z\u001aIث3w\r?!z\u0010dޟ5KAsc\u0001gCm\u0001Cd7\u0005Bq{<:\rXN\\h̡C\u0003}(\u0014\n~1e۟ٽjͯj܄\u0014\t\u0014hahD=nFr8 $f\u001fȌKE\u0011e87Q\u001ed\u0016\u001e$4Ӌ\rz:S91q2;i\u0006x\u000e\bR\u0003V<oqb@\f`\f6sp/,\u00121򹬂fj\u000eaD\u0004I4I\u0002.\u0001\r$#$pCo>2\u000e\u0017w0\\y29\u000f%-E݉.i˭Jt\u0017\u0004x.(t\u000bD'Z4\br\b#[u\u0015f\u000fWd\u0007qej\u0003ʐ($Ws9˴+\u0001\tY\"\"\u001c$d\u0018q\t\u0014RStrzsOX\b|\tG-\bAʙfpc\u0011eI6\u0011\u000e%\u001dFOtGӈ\u0011F%Af\b \f \u001f\u0017;_!\u001fI0BD$\u0007e8\"D\\\u000b\u000f9(oqM\u0001\u0010\u0012\u001d{|uÒ0\u0002;\u0012n\u0004B\u00168ā\u000eDG\u0000w#yD\u0003P\u001c-TQ\b\u001c<PV\u0001P3?\u000fK\u0018gE\u0000\u0006\u001fa#R\u0019֤|}M[7~U}\"Ȓs\u000e9,]RdFB\u0019b\u00123\n%f4+hء\u0010%j\u0012[T5F5k=b\u0012{\u001cǚEA4}jr\u00053\rj\u000f\u0001m쬵\bN=T\u001f\u000e]dgGbxv2Cn\u000eB=Rk\u0003+M&\"HI\u0012wi0ؘA5\u001d.\u0006\"\u0005? \u0004L\u0015AlfTcy$\u0013F\u0005\u001e/H\u001c[\u0011XbDv~d'\u001a=,\t\u0016Bh\u0018lPbؠ\u0011lF4\u001b\u0018\u0015JPb\u0012C\u0014[\u0014l\u0011STELQb\u0017}X\"'\u0001s!k\btꣲ\u000e)Spo\u0015rތ\n(^4F:G60Q\u0002\u0007u\u001c6P'GV\u000b*\t59@'q\u0017P\\e14f\u0002\u001fˌ6h\t\u000b5@\u0000L\"Hiq\u001ddc6HV{B\u000e\u0013\u001eL[\"X\u0002TG_2Z\u0013;ĤfQ5H@ZaM5Fli%\u0010!VLF(\u0019\n1B\u0015j}C߼\u0011.)uQכ\u001b\u0003&WW/\u001eM\u0004\u001aͿK\t\u0012%E\u0012\u0007&ʢZ8-a̴ۍiJ\u00035YoB&zڥ*B\u001c\u001a\u0007G\u0012 \u000b2:b_o>\u001e\\\u0012\u0019oqz=|Ψdp\u0018p\r(\u001e\u001eQ0o7j\r,(8PnMR\u001f#\u0012BH\u0001E\u00054}*\r\u001eugc\u0016\u0005l\f1:(\u0012Y>rj$:\u0011)},uԃE[\u0004m\u0002Tm?OPQZ;TI-i\u0013\u0017\u0001v_\"%n\\F,D\n͎-J6<{;n&\u0005yJ_(\u0012\u0002e\u0004Қ'vx\u0007w\u0016\u001bg[,v)\u0012u$\u0001\u0007a\u0011B<SҘ^\u0005q}vӥ\u001b.>^wOo_no\u0019W\u0013(\u0011ބ\u0011exuh\u0019؛%](\u0012(@z\u0003+\u0015?8Of\u00037-\\_\u0003\u001d\u0005LP^3 */aXg}˦u3ˌ\u001c\bS\u000eH\u0017B\u0011病q1$\\/\u0004=Tޭ{<\u0010<zF\u0019\u0010R\u0006\u001c&þuHQx&uM\u0001֭<\u0012y,\u0007b-˵j\u0001.\u0004ƪN\u00157{k~@\u000e\u0006'|L\u001dL\u0001\u0000 \u0013\u0010=\u0018n75t[i\u0001\u00130{E♆nPN`N\u0006\u0016#?+\u001cޟiL8BbYy\r\u0004iz@;\u0017Sm}{?rAuǗ%\tqG\u000e/o\u001d\u001f;[ug\u0010^w\u0017Χ\u001e\u0005/P!<zsu}c\u0003&WW/\u001eM\u000e]|F\u0000C}[\tt\u0010p0fi\ftm5Vq\u001f\u000f\u001bONJ@z\u001cԞ@\nAVcYY\u0015zS梗s[ђRKikHK\\\u000fVEE\u001a=\u00149/,#dAp\u0007\f_\u0019rM\u001a\u000f\u0004\u0007\u0010|\u000fɕ\u0003({;1\u000bڔ0\u001d$Y'.\b5f4:Ɇ\u001a\u001a\u0011\u001b\"\u001fo/=~/pq7<>\r\u0000\u0000\u0000\u0000\u0000\u0000W[o\\\u0011~?\u000fK~yU\u00180Z&@\u0007WU\u0006+;\r\u0004fHCEZɕ+ =9p87B\t-2zaƋ˛I\t%n\u0015ғ\u001eOII\u001bPex^MZ\"ߠNUG/I9vF\u0010NVAT,6Ff-6Arh%Um1R\u0015;\u0017l\u0016¬ƪ,S,EՂ}7Pb\u001e\u000eDi\u001c)]e\u0010xݻ&H\u00164\u001ek$stL\u0011\u0006]V*G\u0018\u000bZ\u001aJ(\u000fN\u0011nkԦjq٨,Ve9YNE޴N\u0015\u001c\u001b9\u0005_J躤\u0013|sJR;JA\u0018\u00193]\u00100Vә\u0003\f\u000e!J2 ;ml,\u0017kp\nHZ\u000fb\u0019\rΫ\u001c{a@R̡Wml#2Ћ\fʺ]`$kI\u0013\u0017ki:\u001f$˄nklJf6M,Ī\u0003[\b\u0017W\u0012 FHt\u001dH\u0010\f\u0014)\u0010\u0007Q((7\b\u0015\\!\u0006\u001b;0u0ȦdB\u001a(B\u0018aygeO3Y\u001c\u001b^Ax5xu\u0013&\u0017~퍎NñKYBZl4]`\b8l\u001dG1^&G)W.o\u001c\u0005{\u00146\u0007A\b\u0010d?VUΪ˩cŮm\u0018NƗ\u001aj?+j\u001cRDX\u0013\u000ez`\u0018'G>#\u0001C\u0016\u0001zh޿\u001d\u0012\u0002\u0011\u0019!_\u0018\u0003\u0004F\u0011M\u0002D\nv\u001f\u000f\tI̋}׾.&!\u000eْ`qڊwku\u0010+͕XxzzyH\u001a\u0003R\u0006\u0010\u001a\u001aAw}\u000f>\u001b|\u0013f|8PN\u0018(3\u0003!8{C\u0016\u001f\u0019/\u0010\u001cc-xf_\u00193 8[\u0007\u001f#2n%8[UӟČ@}!ZとWD\u0019Ncr~c*2AZXEf\u001d%5U$鴩 Ū\u000eT3\u001aMv2u[m\u000b:h?Ղ^\u0011}ijF~\u0015P\f,/z\u0003IQ{/S$٠!\r72\u00051\u0002o\u0018\u001dhsf\u0000\fE:t$<1%NFJn@\u0003Lt+_\fۂ4qď<\u0007sӼUnʵ\fM<UʵYJc;\u0015TՌM\t!\u0007p6뉚\u0005?pMv'#흹-[N.?\u0012\u001e3ta:3\u001f\u001a\u0017 ,7MK\u0019j\bK*![\u001ek\u0004\u000eVy朣O\u0013d8tJ8LBP䈰\u001ap\u0016\\JX\u0014\u00188t2Q68)̤FEW\u001b\u00143:M\u0016\u0004 \u0016q\"\u0005M\u001dZqv>ȫ,\u0000?$!G(\u001dP*\u001f9|B\u0014\u000594\u001e\u0014\u001aPh~=pLoq򸮝\u0018$w\u001domӇ^JĄ̻_\u001eqt~H\\V2S\u001cBH+ńOLu\u0012EN\t\u001eFSj#\u0012m撐c5p!,s\u0012-\u0002SgPCin4N\\7@ߡBq%\tR6?bB\u000f=74[Ȁ{n%jnM#k\u0013u\u001aQ,yTI*Y\u001d\u0015'\u0011\u0015\b\u0006\u000biiݻTljVZ\u0003gb^r7\t֏\u0014:dUDCF6~\u0003Q\u0019\f5]-\u0007LӼ*\u0015g`2/kX\u0015NAZ(\"˂=\u0010>Z\u0003=K\u000b\by;]\u001cl\u001a\u0011i\b\u0004q\u00177\u000f50hu\u001a(+V\u001fƫ?^^^9Icä(c4N\u0011i0\n<\u0018OPh[F\"{Ƴ\u0011O\ruC\u0016â\u001bM1)SIC\n\u001a\"e}m*4AUʡ\u0002\u00061j\u0013a/xq~mħk{\u0006\"qZm\u0003F\b*^\u0001\u0002]\u0007nWzG̫A4\u0006|&ؠ\u00043<\u001an;_\u001cչܴ+J\u001dn\u001aZ}]+kՇ_>7Ɖ_}Z\u0001}Ox;\u001fuG\u0017\u0019TV_Nķ\u0007\u0017\u001d\u0006h^IVn(\u000fYdp6P\u0000-#\u0015i\u0007Wkd/\u0016S\b[\u0010Z8vtڀ}[(h:&\u000bسΐG~:_#\u001a>\bw^pV5\t\"\u000eqWof\u0011}E\u0006e.ub0\u000bi:\u001f\u0004\u0003kklJsf6M,Ī\u001a\u001dDC\u0017߈\r/*_\u0018]\t&အ _-#b:X#I%렆\b\u0010ш\"#\u0015\u000fv\u001aWVj\u000bvѶ\u001f<\u001b^i2SuuGpw=X(\u00055,e6kb;-\nF\"I\u0018\u00045\u0000r\bn]QoR}:Tv\b.Ѝ,\u0015\u0011S7rMAYwsu\u0002 \u001f|$.t\u001e\ngMFC\u0007\u001e~ Q(>]w\u0012\u0016h=two׈û5\u0016^Yop}ƨ\u001dq%dSl\\05\rZ?p׺\u001c\\Dzqm8>%6&\u0016ץ|n}a|8\u0000a\u000eHQ\fNp=o$d\u0007F\u001eNea&N2QU`\u0006L*uy\u0018KqT#s3c\u001d\u0011\u0005\u0005D\tI23꧙:$2u,]\u0015\u0012Xʢ\u001cL$Y8\u000ejH2\u000fhVK=d4ˌ%<\nGG\\HQ\u0007\u000e^x4NBDiO)x\u0000<HM(fDyFfP\u0002i\u001c4u\bM\u0005yP\u00191zh4zB\tl#hF\t\u0010~\u001dْ~.5Z}~H<\u0013?yJ\u000e4\"gx48\u0015}V\u0011j7Ê\u0003D,(u\u001eظ#ѳ\b$GnĲPk[\";:J\t\u000e;\u0004\u001a\u0017RF\u0007$O4ќ=ugNu\u0004\u0003|GN͔wa\u0007#=cQ.\u0007KV\u0005+<꼬a\t)Z\u0005K\u001c\u000bo\u0016;\n,:w\u0006\u0012\u001bW\u000f':>Q8\u0019N: N\u001318yo嬠l\u0002䁅\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000&,\u001d\r\nendstream\rendobj\r1671 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency>>\rendobj\r1680 0 obj\r<</BBox[-27.6665 27.6668 27.6668 -27.6665]/Length 634/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.173 0.243 0.314 RG\n5 w 10 M 1 j 1 J []0 d \n/GS0 gs\nq 1 0 0 1 25.1668 25.1668 cm\n0 0 m\n-25.833 0 l\n-39.364 0 -50.333 -10.969 -50.333 -24.5 c\n-50.333 -24.5 l\n-50.333 -38.767 -38.767 -50.333 -24.5 -50.333 c\n-24.5 -50.333 l\n-10.969 -50.333 0 -39.364 0 -25.833 c\n0 0 l\nh\nS\nQ\n3 w \nq 1 0 0 1 17.8335 19.3827 cm\n0 0 m\n-8.694 0 l\n-9.601 0 -10.05 -1.1 -9.403 -1.735 c\n-2.475 -7.548 l\n0 -10 0 -13.172 0 -13.593 c\n0 -16.319 -2.209 -18.528 -4.935 -18.528 c\n-4.935 -18.528 l\n-7.769 -18.528 -10.167 -16.271 -10.167 -13.436 c\n-10.167 -12.593 -9.897 -11.706 y\nS\nQ\n0 j \nq 1 0 0 1 -16.3332 -3.9998 cm\n0 0 m\n1.591 -6.828 6.886 -12.122 13.5 -13.5 c\nS\nQ\n\r\nendstream\rendobj\r1681 0 obj\r<</BBox[-15.0 757.0 1381.0 701.0]/Group 1880 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1881 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1882 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n1396 0 0 56 -15 701 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1682 0 obj\r<</BBox[-141.5 9.99388 141.5 -10.0061]/Length 1274/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R/GS1 1415 0 R>>/Font<</T1_0 1305 0 R>>/ProcSet[/PDF/Text]/XObject<</Fm0 1883 0 R>>>>/Subtype/Form>>stream\r\n0.376 0.49 0.545 rg\n/GS0 gs\nq 1 0 0 1 -133.5 -0.0061 cm\n0 0 m\n-3 3 l\n-3 -3 l\nh\nf\nQ\n0.376 0.49 0.545 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 -133.5 -0.0061 cm\n0 0 m\n-3 3 l\n-3 -3 l\n0 0 l\nh\nS\nQ\nBT\n/T1_0 1 Tf\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr 14 0 0 -14 -130.5 3.9937 Tm\n[(Objec)-12.9 (t name)]TJ\nET\nq\n0 g\n0 G\n/GS1 gs\n0 TL/Fm0 Do\nQ\nq 1 0 0 1 135.5 -0.5061 cm\n0 0 m\n0 1.933 -1.567 3.5 -3.5 3.5 c\n-5.433 3.5 -7 1.933 -7 0 c\n-7 -1.933 -5.433 -3.5 -3.5 -3.5 c\n-1.567 -3.5 0 -1.933 0 0 c\nf\nQ\nq 1 0 0 1 132 -4.0063 cm\n0 0 m\n-1.933 0 -3.5 1.567 -3.5 3.5 c\n-3.5 5.433 -1.933 7 0 7 c\n1.933 7 3.5 5.433 3.5 3.5 c\n3.5 1.567 1.933 0 0 0 c\n0 1 m\n1.378 1 2.5 2.122 2.5 3.5 c\n2.5 4.878 1.378 6 0 6 c\n-1.378 6 -2.5 4.878 -2.5 3.5 c\n-2.5 2.122 -1.378 1 0 1 c\nf\nQ\nq 1 0 0 1 123.5 2.9939 cm\n0 0 m\n-6 0 l\n-6 -6 l\n-5.334 -6 l\n0 -6 l\nh\nf\nQ\n0 j \nq 1 0 0 1 118.5 -3.0061 cm\n0 0 m\n0.018 -1.118 0.941 -2.017 2.031 -2 c\n3.098 -1.983 3.982 -1.094 4 0 c\nS\nQ\nq 1 0 0 1 111.9568 -1.0488 cm\n0 0 m\n-3.19 3.19 l\n-3.892 3.892 -5.041 3.892 -5.743 3.19 c\n-5.743 3.19 l\n-6.445 2.488 -6.445 1.34 -5.743 0.638 c\n-2.552 -2.552 l\n-1.85 -3.254 -0.702 -3.254 0 -2.552 c\n0 -2.552 l\n0.702 -1.85 0.702 -0.702 0 0 c\nh\nS\nQ\n1 J \nq 1 0 0 1 110.6785 -2.3227 cm\n0 0 m\n2.926 -2.926 l\nS\nQ\nq 1 0 0 1 104.3619 3.9939 cm\n0 0 m\n2.926 -2.926 l\nS\nQ\n\r\nendstream\rendobj\r1683 0 obj\r<</BBox[790.0 222.606 791.0 0.0]/Group 1884 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 790.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1684 0 obj\r<</BBox[800.0 222.606 801.0 0.0]/Group 1885 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 800.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1685 0 obj\r<</BBox[746.0 242.0 774.0 216.0]/Group 1886 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 1888 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1889 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 746 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1686 0 obj\r<</BBox[860.0 224.5 861.0 0.0]/Group 1890 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 860.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1687 0 obj\r<</BBox[820.0 222.606 821.0 0.0]/Group 1891 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 820.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1688 0 obj\r<</BBox[830.0 222.606 831.0 0.0]/Group 1892 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 830.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1689 0 obj\r<</BBox[840.0 222.606 841.0 0.0]/Group 1893 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 840.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1690 0 obj\r<</BBox[850.0 222.606 851.0 0.0]/Group 1894 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 850.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1691 0 obj\r<</BBox[796.0 242.0 824.0 216.0]/Group 1895 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 1896 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1897 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 796 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1692 0 obj\r<</BBox[910.0 224.5 911.0 0.0]/Group 1898 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 910.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1693 0 obj\r<</BBox[-7.0 28.0 289.0 -7.0]/Group 1899 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1900 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1901 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n296 0 0 35 -7 -7 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1694 0 obj\r<</BBox[870.0 222.606 871.0 0.0]/Group 1902 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 870.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1695 0 obj\r<</BBox[880.0 222.606 881.0 0.0]/Group 1903 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 880.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1696 0 obj\r<</BBox[890.0 222.606 891.0 0.0]/Group 1904 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 890.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1697 0 obj\r<</BBox[900.0 222.606 901.0 0.0]/Group 1905 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 900.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1698 0 obj\r<</BBox[846.0 242.0 874.0 216.0]/Group 1906 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 1907 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1908 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 846 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1699 0 obj\r<</BBox[960.0 224.5 961.0 0.0]/Group 1909 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 960.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1700 0 obj\r<</BBox[920.0 222.606 921.0 0.0]/Group 1910 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 920.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1701 0 obj\r<</BBox[930.0 222.606 931.0 0.0]/Group 1911 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 930.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1702 0 obj\r<</BBox[940.0 222.606 941.0 0.0]/Group 1912 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 940.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1703 0 obj\r<</BBox[950.0 222.606 951.0 0.0]/Group 1913 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 950.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1704 0 obj\r<</BBox[34.0 23.0 209.0 -5.0]/Group 1914 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 1915 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1916 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n175 0 0 28 34 -5 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1705 0 obj\r<</BBox[896.0 242.0 924.0 216.0]/Group 1917 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 1918 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1919 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 896 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1706 0 obj\r<</BBox[1010.0 224.5 1011.0 0.0]/Group 1920 0 R/Length 119/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1010.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1707 0 obj\r<</BBox[970.0 222.606 971.0 0.0]/Group 1921 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 970.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1708 0 obj\r<</BBox[980.0 222.606 981.0 0.0]/Group 1922 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 980.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1709 0 obj\r<</BBox[990.0 222.606 991.0 0.0]/Group 1923 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 990.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1710 0 obj\r<</BBox[1000.0 222.606 1001.0 0.0]/Group 1924 0 R/Length 124/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1000.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1711 0 obj\r<</BBox[946.0 242.0 974.0 216.0]/Group 1925 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 1926 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1927 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 946 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1712 0 obj\r<</BBox[1060.0 224.5 1061.0 0.0]/Group 1928 0 R/Length 119/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1060.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1713 0 obj\r<</BBox[1020.0 222.606 1021.0 0.0]/Group 1929 0 R/Length 124/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1020.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1714 0 obj\r<</BBox[1030.0 222.606 1031.0 0.0]/Group 1930 0 R/Length 124/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1030.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1715 0 obj\r<</BBox[-6.0 246.0 288.0 214.0]/Group 1931 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1932 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1933 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n294 0 0 32 -6 214 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1716 0 obj\r<</BBox[1040.0 222.606 1041.0 0.0]/Group 1934 0 R/Length 124/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1040.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1717 0 obj\r<</BBox[1050.0 222.606 1051.0 0.0]/Group 1935 0 R/Length 124/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1050.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1718 0 obj\r<</BBox[1000.0 242.0 1020.0 216.0]/Group 1936 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 1937 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1938 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n20 0 0 26 1000 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1719 0 obj\r<</BBox[1070.0 222.606 1071.0 0.0]/Group 1939 0 R/Length 124/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1070.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1720 0 obj\r<</BBox[1080.0 222.606 1081.0 0.0]/Group 1940 0 R/Length 124/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1080.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1721 0 obj\r<</BBox[1090.0 222.606 1091.0 0.0]/Group 1941 0 R/Length 124/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1090.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1722 0 obj\r<</BBox[1046.0 242.0 1074.0 216.0]/Group 1942 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 1943 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1944 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 1046 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1723 0 obj\r<</BBox[284.0 160.0 1095.0 140.0]/Group 1945 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 140 -811 20 re\nf\n\r\nendstream\rendobj\r1724 0 obj\r<</BBox[432.0 164.0 489.0 136.0]/Group 1946 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1947 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1948 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n57 0 0 28 432 136 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1725 0 obj\r<</BBox[289.0 180.0 1100.0 160.0]/Group 1949 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1100 160 -811 20 re\nf\n\r\nendstream\rendobj\r1726 0 obj\r<</BBox[5.0 223.0 51.0 181.0]/Group 1950 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1951 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1952 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n46 0 0 42 5 181 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1727 0 obj\r<</BBox[284.0 120.0 1095.0 100.0]/Group 1953 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 100 -811 20 re\nf\n\r\nendstream\rendobj\r1728 0 obj\r<</BBox[432.0 124.0 489.0 96.0]/Group 1954 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1955 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1948 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n57 0 0 28 432 96 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1729 0 obj\r<</BBox[284.0 140.0 1095.0 120.0]/Group 1956 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 120 -811 20 re\nf\n\r\nendstream\rendobj\r1730 0 obj\r<</BBox[284.0 80.0 1095.0 60.0]/Group 1957 0 R/Length 49/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 60 -811 20 re\nf\n\r\nendstream\rendobj\r1731 0 obj\r<</BBox[432.0 84.0 489.0 56.0]/Group 1958 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1959 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1948 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n57 0 0 28 432 56 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1732 0 obj\r<</BBox[284.0 100.0 1095.0 80.0]/Group 1960 0 R/Length 49/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 80 -811 20 re\nf\n\r\nendstream\rendobj\r1733 0 obj\r<</BBox[284.0 40.0 1095.0 20.0]/Group 1961 0 R/Length 49/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 20 -811 20 re\nf\n\r\nendstream\rendobj\r1734 0 obj\r<</BBox[432.0 44.0 489.0 16.0]/Group 1962 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1963 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1948 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n57 0 0 28 432 16 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1735 0 obj\r<</BBox[284.0 60.0 1095.0 40.0]/Group 1964 0 R/Length 49/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 40 -811 20 re\nf\n\r\nendstream\rendobj\r1736 0 obj\r<</BBox[284.0 20.0 1095.0 0.0]/Group 1965 0 R/Length 48/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 0 -811 20 re\nf\n\r\nendstream\rendobj\r1737 0 obj\r<</BBox[59.0 224.0 96.0 181.0]/Group 1966 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1967 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1968 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n37 0 0 43 59 181 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1738 0 obj\r<</BBox[284.0 200.0 1095.0 180.0]/Group 1969 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 180 -811 20 re\nf\n\r\nendstream\rendobj\r1739 0 obj\r<</BBox[519.5 200.0 523.5 180.0]/Group 1970 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 521.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 521.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1740 0 obj\r<</BBox[549.5 200.0 553.5 180.0]/Group 1971 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 551.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 551.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1741 0 obj\r<</BBox[628.5 200.0 632.5 180.0]/Group 1972 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 630.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 630.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1742 0 obj\r<</BBox[688.5 200.0 692.5 180.0]/Group 1973 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 690.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 690.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1743 0 obj\r<</BBox[798.5 200.0 802.5 180.0]/Group 1974 0 R/Length 233/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.173 0.243 0.314 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 800.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1744 0 obj\r<</BBox[569.5 200.0 573.5 180.0]/Group 1975 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 571.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 571.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1745 0 obj\r<</BBox[658.5 200.0 662.5 180.0]/Group 1976 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 660.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 660.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1746 0 obj\r<</BBox[768.5 200.0 772.5 180.0]/Group 1977 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 770.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 770.5 180.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1747 0 obj\r<</BBox[284.0 220.0 1095.0 200.0]/Group 1978 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1095 200 -811 20 re\nf\n\r\nendstream\rendobj\r1748 0 obj\r<</BBox[103.0 224.0 140.0 181.0]/Group 1979 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1980 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1968 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n37 0 0 43 103 181 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1749 0 obj\r<</BBox[768.5 220.0 772.5 200.0]/Group 1981 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 770.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 770.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1750 0 obj\r<</BBox[519.5 220.0 523.5 200.0]/Group 1982 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 521.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 521.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1751 0 obj\r<</BBox[549.5 220.0 553.5 200.0]/Group 1983 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 551.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 551.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1752 0 obj\r<</BBox[628.5 220.0 632.5 200.0]/Group 1984 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 630.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 630.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1753 0 obj\r<</BBox[688.5 220.0 692.5 200.0]/Group 1985 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 690.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 690.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1754 0 obj\r<</BBox[798.5 220.0 802.5 200.0]/Group 1986 0 R/Length 233/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.173 0.243 0.314 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 800.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1755 0 obj\r<</BBox[569.5 220.0 573.5 200.0]/Group 1987 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 571.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 571.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1756 0 obj\r<</BBox[658.5 220.0 662.5 200.0]/Group 1988 0 R/Length 418/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n1 1 1 rg\n/GS0 gs\nq 1 0 0 1 660.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nf\nQ\n0.035 0.2 0.165 RG\n1 w 10 M 1 j 0 J []0 d \nq 1 0 0 1 660.5 200.5 cm\n0 0 m\n0 0 l\n-0.828 0 -1.5 0.672 -1.5 1.5 c\n-1.5 17.5 l\n-1.5 18.328 -0.828 19 0 19 c\n0.828 19 1.5 18.328 1.5 17.5 c\n1.5 1.5 l\n1.5 0.672 0.828 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1757 0 obj\r<</BBox[278.0 247.0 507.0 214.0]/Group 1989 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1990 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1991 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n229 0 0 33 278 214 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1758 0 obj\r<</BBox[299.0 263.0 373.0 235.0]/Group 1992 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 1993 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1994 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n74 0 0 28 299 235 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1759 0 obj\r<</BBox[146.0 224.0 189.0 181.0]/Group 1995 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1996 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1997 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 43 146 181 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1760 0 obj\r<</BBox[280.0 679.0 1099.0 255.0]/Group 1998 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 1999 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2000 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n819 0 0 424 280 255 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1761 0 obj\r<</BBox[336.0 540.0 587.0 455.0]/Group 2001 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2002 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2003 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n251 0 0 85 336 455 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1762 0 obj\r<</BBox[590.0 411.0 841.0 348.0]/Group 2004 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2005 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2006 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n251 0 0 63 590 348 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1763 0 obj\r<</BBox[590.0 411.0 841.0 348.0]/Group 2007 0 R/Length 629/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 1676 0 R/GS1 151 0 R>>/XObject<</Fm0 1762 0 R>>>>/Subtype/Form>>stream\r\nq\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr 3 w 10 M 0 j 0 J []0 d \n/GS0 gs\n0 TL/Fm0 Do\nQ\n0 0.051 0.996 rg\n/GS1 gs\nq 1 0 0 1 820.375 358.5 cm\n0 0 m\n-215.75 0 l\n-221.342 0 -225.875 4.533 -225.875 10.125 c\n-225.875 37.875 l\n-225.875 43.467 -221.342 48 -215.75 48 c\n0 48 l\n5.592 48 10.125 43.467 10.125 37.875 c\n10.125 10.125 l\n10.125 4.533 5.592 0 0 0 c\nf\nQ\n0.624 0.745 0.996 RG\n3 w 10 M 0 j 0 J []0 d \nq 1 0 0 1 820.375 358.5 cm\n0 0 m\n-215.75 0 l\n-221.342 0 -225.875 4.533 -225.875 10.125 c\n-225.875 37.875 l\n-225.875 43.467 -221.342 48 -215.75 48 c\n0 48 l\n5.592 48 10.125 43.467 10.125 37.875 c\n10.125 10.125 l\n10.125 4.533 5.592 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1764 0 obj\r<</BBox[746.0 583.0 995.0 522.0]/Group 2008 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2009 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2010 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n249 0 0 61 746 522 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1765 0 obj\r<</BBox[288.0 675.0 1091.0 641.0]/Group 2011 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2012 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2013 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n803 0 0 34 288 641 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1766 0 obj\r<</BBox[721.0 261.0 1033.0 -9.0]/Group 2014 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2015 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2016 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n312 0 0 270 721 -9 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1767 0 obj\r<</BBox[730.0 252.0 1024.0 220.0]/Group 2017 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2018 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1933 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n294 0 0 32 730 220 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1768 0 obj\r<</BBox[736.0 205.0 1018.0 187.0]/Group 2019 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1018 187 -282 18 re\nf\n\r\nendstream\rendobj\r1769 0 obj\r<</BBox[736.0 186.0 1018.0 170.0]/Group 2020 0 R/Length 51/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.984 0.984 0.984 rg\n/GS0 gs\n1018 170 -282 16 re\nf\n\r\nendstream\rendobj\r1770 0 obj\r<</BBox[6.0 178.0 49.0 135.0]/Group 2021 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2022 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1997 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 43 6 135 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1771 0 obj\r<</BBox[765.4 184.719 846.024 169.5]/Group 2023 0 R/Length 144/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Font<</T1_0 1305 0 R>>/ProcSet[/PDF/Text]>>/Subtype/Form>>stream\r\nBT\n0.376 0.49 0.545 rg\n/GS0 gs\n/T1_0 1 Tf\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr 14 0 0 14 765.3999 173.0005 Tm\n[(B)-4 (ool pr)10 (oper)-24 (t)-9 (y)]TJ\nET\n\r\nendstream\rendobj\r1772 0 obj\r<</BBox[737.0 169.0 1019.0 151.0]/Group 2024 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1019 151 -282 18 re\nf\n\r\nendstream\rendobj\r1773 0 obj\r<</BBox[736.0 150.0 1018.0 134.0]/Group 2025 0 R/Length 51/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.984 0.984 0.984 rg\n/GS0 gs\n1018 134 -282 16 re\nf\n\r\nendstream\rendobj\r1774 0 obj\r<</BBox[736.0 133.0 1018.0 115.0]/Group 2026 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1018 115 -282 18 re\nf\n\r\nendstream\rendobj\r1775 0 obj\r<</BBox[56.0 178.0 99.0 135.0]/Group 2027 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2028 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 1997 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 43 56 135 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1776 0 obj\r<</BBox[1.0 752.0 206.0 719.0]/Group 2029 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2030 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2031 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n205 0 0 33 1 719 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1777 0 obj\r<</BBox[100.0 178.0 143.0 135.0]/Group 2032 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2033 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2034 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 43 100 135 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1778 0 obj\r<</BBox[1331.0 35.0 1367.0 -1.0]/Group 2035 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2036 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2037 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 36 1331 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1779 0 obj\r<</BBox[1094.0 31.0 1338.0 2.0]/Group 2038 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2039 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2040 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n244 0 0 29 1094 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1780 0 obj\r<</BBox[1166.0 473.0 1370.0 444.0]/Group 2041 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2042 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2043 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n204 0 0 29 1166 444 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1781 0 obj\r<</BBox[1166.0 492.0 1370.0 463.0]/Group 2044 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2045 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2043 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n204 0 0 29 1166 463 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1782 0 obj\r<</BBox[1166.0 511.0 1370.0 482.0]/Group 2046 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2047 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2043 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n204 0 0 29 1166 482 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1783 0 obj\r<</BBox[1166.0 530.0 1370.0 501.0]/Group 2048 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2049 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2043 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n204 0 0 29 1166 501 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1784 0 obj\r<</BBox[1090.0 549.0 1372.0 519.0]/Group 2050 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2051 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2052 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 519 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1785 0 obj\r<</BBox[1108.0 551.0 1140.0 516.0]/Group 2053 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2054 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2055 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 35 1108 516 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1786 0 obj\r<</BBox[1151.0 389.0 1187.0 375.0]/Group 2056 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.984 0.984 0.984 rg\n/GS0 gs\n1187 375 -36 14 re\nf\n\r\nendstream\rendobj\r1787 0 obj\r<</BBox[1264.0 752.0 1370.0 719.0]/Group 2057 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2058 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2059 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n106 0 0 33 1264 719 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1788 0 obj\r<</BBox[1166.0 434.0 1353.0 405.0]/Group 2060 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2061 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2062 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n187 0 0 29 1166 405 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1789 0 obj\r<</BBox[1090.0 453.0 1372.0 423.0]/Group 2063 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2064 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2052 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 423 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1790 0 obj\r<</BBox[1108.0 359.0 1140.0 324.0]/Group 2065 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2066 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2055 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 35 1108 324 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1791 0 obj\r<</BBox[1108.0 341.0 1140.0 306.0]/Group 2067 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2068 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2055 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 35 1108 306 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1792 0 obj\r<</BBox[1090.0 321.0 1372.0 291.0]/Group 2069 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2070 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2052 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 291 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1793 0 obj\r<</BBox[1108.0 323.0 1140.0 288.0]/Group 2071 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2072 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2055 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 35 1108 288 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1794 0 obj\r<</BBox[1192.0 190.0 1370.0 161.0]/Group 2073 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2074 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2075 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n178 0 0 29 1192 161 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1795 0 obj\r<</BBox[1192.0 170.0 1370.0 141.0]/Group 2076 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2077 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2075 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n178 0 0 29 1192 141 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1796 0 obj\r<</BBox[1090.0 303.0 1372.0 273.0]/Group 2078 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2079 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2052 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 273 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1797 0 obj\r<</BBox[1090.0 648.0 1372.0 527.0]/Group 2080 0 R/Length 44/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 2081 0 R>>/ExtGState<</GS0 2082 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2083 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 121 1090 527 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1798 0 obj\r<</BBox[1280.0 749.0 1346.0 721.0]/Group 2084 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2085 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2086 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n66 0 0 28 1280 721 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1799 0 obj\r<</BBox[1118.0 626.0 1242.0 597.0]/Group 2087 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2088 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2089 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1118 597 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1800 0 obj\r<</BBox[1245.0 626.0 1369.0 597.0]/Group 2090 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2091 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2089 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1245 597 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1801 0 obj\r<</BBox[1118.0 607.0 1242.0 578.0]/Group 2092 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2093 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2089 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1118 578 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1802 0 obj\r<</BBox[1245.0 607.0 1369.0 578.0]/Group 2094 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2095 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2089 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1245 578 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1803 0 obj\r<</BBox[1100.79 573.676 1105.18 569.294]/Group 2096 0 R/Length 119/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.376 0.49 0.545 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1100.7943 573.1765 cm\n0 0 m\n3.882 0 l\n3.882 -3.882 l\nS\nQ\n\r\nendstream\rendobj\r1804 0 obj\r<</BBox[1100.79 576.912 1108.41 569.294]/Group 2097 0 R/Length 119/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.376 0.49 0.545 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 1100.7943 576.4117 cm\n0 0 m\n7.118 0 l\n7.118 -7.118 l\nS\nQ\n\r\nendstream\rendobj\r1805 0 obj\r<</BBox[1118.0 588.0 1242.0 559.0]/Group 2098 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2099 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2089 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1118 559 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1806 0 obj\r<</BBox[1245.0 588.0 1369.0 559.0]/Group 2100 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2101 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2089 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1245 559 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1807 0 obj\r<</BBox[1118.0 569.0 1242.0 540.0]/Group 2102 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2103 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2089 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1118 540 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1808 0 obj\r<</BBox[1245.0 569.0 1369.0 540.0]/Group 2104 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2105 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2089 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1245 540 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1809 0 obj\r<</BBox[650.0 752.0 872.0 719.0]/Group 2106 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2107 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2108 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n222 0 0 33 650 719 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1810 0 obj\r<</BBox[1231.0 566.0 1256.0 543.0]/Group 2109 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2110 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2111 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n25 0 0 23 1231 543 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1811 0 obj\r<</BBox[1090.0 648.0 1372.0 618.0]/Group 2112 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2113 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2114 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 618 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1812 0 obj\r<</BBox[1109.0 706.0 1353.0 676.0]/Group 2115 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2116 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2117 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n244 0 0 30 1109 676 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1813 0 obj\r<</BBox[1109.0 668.0 1256.0 639.0]/Group 2118 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2119 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2120 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n147 0 0 29 1109 639 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1814 0 obj\r<</BBox[1264.0 668.0 1368.0 639.0]/Group 2121 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2122 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2123 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n104 0 0 29 1264 639 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1815 0 obj\r<</BBox[1109.0 687.0 1311.0 657.0]/Group 2124 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2125 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2126 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n202 0 0 30 1109 657 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1816 0 obj\r<</BBox[1302.0 686.0 1329.0 659.0]/Group 2127 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2128 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 275 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 27 1302 659 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1817 0 obj\r<</BBox[1321.0 686.0 1348.0 659.0]/Group 2129 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2130 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 275 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 27 1321 659 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1818 0 obj\r<</BBox[1340.0 686.0 1367.0 659.0]/Group 2131 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2132 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 275 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 27 1340 659 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1819 0 obj\r<</BBox[1109.0 725.0 1181.0 697.0]/Group 2133 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2134 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2135 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n72 0 0 28 1109 697 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1820 0 obj\r<</BBox[744.647 735.588 750.588 729.647]/Group 2136 0 R/Length 114/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.922 1 0.992 RG\n2 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 744.647 734.5883 cm\n0 0 m\n4.941 0 l\n4.941 -4.941 l\nS\nQ\n\r\nendstream\rendobj\r1821 0 obj\r<</BBox[278.0 246.0 1101.0 -6.0]/Group 2137 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2138 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2139 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n823 0 0 252 278 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1822 0 obj\r<</BBox[502.0 240.0 1094.0 0.0]/Group 2140 0 R/Length 210/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R/GS1 2141 0 R>>/Shading<</Sh0 1633 0 R>>/XObject<</Fm0 2142 0 R>>>>/Subtype/Form>>stream\r\nq\n1094 0 -592 240 re\nW n\nq\n0 g\n/GS0 gs\n251.9230499 -436.3435059 -436.3435059 -251.9230499 672.0384521 338.1717529 cm\nBX /Sh0 sh EX Q\nQ\nq\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr 1 w 10 M 0 j 0 J []0 d \n/GS1 gs\n0 TL/Fm0 Do\nQ\n\r\nendstream\rendobj\r1823 0 obj\r<</BBox[514.0 200.0 781.0 140.0]/Group 2143 0 R/Length 536/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 2144 0 R/GS1 151 0 R>>/Shading<</Sh0 269 0 R>>>>/Subtype/Form>>stream\r\nq\n778.5 140.5 m\n516.5 140.5 l\n515.395 140.5 514.5 141.395 514.5 142.5 c\n514.5 197.5 l\n514.5 198.605 515.395 199.5 516.5 199.5 c\n778.5 199.5 l\n779.605 199.5 780.5 198.605 780.5 197.5 c\n780.5 142.5 l\n780.5 141.395 779.605 140.5 778.5 140.5 c\nW n\nq\n0 g\n/GS0 gs\n266 0 0 -266 514.5 170 cm\nBX /Sh0 sh EX Q\nQ\n0.106 0.718 0.596 RG\n1 w 10 M 0 j 0 J []0 d \n/GS1 gs\nq 1 0 0 1 778.5 140.5 cm\n0 0 m\n-262 0 l\n-263.105 0 -264 0.895 -264 2 c\n-264 57 l\n-264 58.105 -263.105 59 -262 59 c\n0 59 l\n1.105 59 2 58.105 2 57 c\n2 2 l\n2 0.895 1.105 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1824 0 obj\r<</BBox[514.0 220.0 781.0 200.0]/Group 2145 0 R/Length 536/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 2146 0 R/GS1 151 0 R>>/Shading<</Sh0 269 0 R>>>>/Subtype/Form>>stream\r\nq\n778.5 200.5 m\n516.5 200.5 l\n515.395 200.5 514.5 201.395 514.5 202.5 c\n514.5 217.5 l\n514.5 218.605 515.395 219.5 516.5 219.5 c\n778.5 219.5 l\n779.605 219.5 780.5 218.605 780.5 217.5 c\n780.5 202.5 l\n780.5 201.395 779.605 200.5 778.5 200.5 c\nW n\nq\n0 g\n/GS0 gs\n266 0 0 -266 514.5 210 cm\nBX /Sh0 sh EX Q\nQ\n0.106 0.718 0.596 RG\n1 w 10 M 0 j 0 J []0 d \n/GS1 gs\nq 1 0 0 1 778.5 200.5 cm\n0 0 m\n-262 0 l\n-263.105 0 -264 0.895 -264 2 c\n-264 17 l\n-264 18.105 -263.105 19 -262 19 c\n0 19 l\n1.105 19 2 18.105 2 17 c\n2 2 l\n2 0.895 1.105 0 0 0 c\nh\nS\nQ\n\r\nendstream\rendobj\r1825 0 obj\r<</BBox[822.0 240.0 1094.0 221.0]/Group 2147 0 R/Length 50/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n1094 221 -272 19 re\nf\n\r\nendstream\rendobj\r1826 0 obj\r<</BBox[502.0 240.0 511.0 221.0]/Group 2148 0 R/Length 47/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n/GS0 gs\n511 221 -9 19 re\nf\n\r\nendstream\rendobj\r1827 0 obj\r<</BBox[561.0 224.5 562.0 0.0]/Group 2149 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 561.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1828 0 obj\r<</BBox[521.0 222.606 522.0 0.0]/Group 2150 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 521.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1829 0 obj\r<</BBox[531.0 222.606 532.0 0.0]/Group 2151 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 531.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1830 0 obj\r<</BBox[541.0 222.606 542.0 0.0]/Group 2152 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 541.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1831 0 obj\r<</BBox[744.647 739.706 754.706 729.647]/Group 2153 0 R/Length 114/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.922 1 0.992 RG\n2 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 744.647 738.7059 cm\n0 0 m\n9.059 0 l\n9.059 -9.059 l\nS\nQ\n\r\nendstream\rendobj\r1832 0 obj\r<</BBox[551.0 222.606 552.0 0.0]/Group 2154 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 551.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1833 0 obj\r<</BBox[511.0 224.5 512.0 0.0]/Group 2155 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 511.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1834 0 obj\r<</BBox[502.0 242.0 521.0 216.0]/Group 2156 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2157 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2158 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n19 0 0 26 502 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1835 0 obj\r<</BBox[611.0 224.5 612.0 0.0]/Group 2159 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 611.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1836 0 obj\r<</BBox[571.0 222.606 572.0 0.0]/Group 2160 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 571.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1837 0 obj\r<</BBox[581.0 222.606 582.0 0.0]/Group 2161 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 581.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1838 0 obj\r<</BBox[591.0 222.606 592.0 0.0]/Group 2162 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 591.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1839 0 obj\r<</BBox[601.0 222.606 602.0 0.0]/Group 2163 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 601.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1840 0 obj\r<</BBox[547.0 242.0 575.0 216.0]/Group 2164 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2165 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2166 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 547 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1841 0 obj\r<</BBox[660.0 224.5 661.0 0.0]/Group 2167 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 660.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1842 0 obj\r<</BBox[-7.0 709.0 289.0 675.0]/Group 2168 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 180 0 R>>/ExtGState<</GS0 2169 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2170 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n296 0 0 34 -7 675 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1843 0 obj\r<</BBox[620.0 222.606 621.0 0.0]/Group 2171 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 620.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1844 0 obj\r<</BBox[630.0 222.606 631.0 0.0]/Group 2172 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 630.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1845 0 obj\r<</BBox[640.0 222.606 641.0 0.0]/Group 2173 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 640.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1846 0 obj\r<</BBox[650.0 222.606 651.0 0.0]/Group 2174 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 650.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1847 0 obj\r<</BBox[597.0 242.0 625.0 216.0]/Group 2175 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2176 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2177 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 597 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1848 0 obj\r<</BBox[710.0 224.5 711.0 0.0]/Group 2178 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 710.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1849 0 obj\r<</BBox[670.0 222.606 671.0 0.0]/Group 2179 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 670.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1850 0 obj\r<</BBox[680.0 222.606 681.0 0.0]/Group 2180 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 680.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1851 0 obj\r<</BBox[690.0 222.606 691.0 0.0]/Group 2181 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 690.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1852 0 obj\r<</BBox[700.0 222.606 701.0 0.0]/Group 2182 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 700.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1853 0 obj\r<</BBox[17.0 705.0 97.0 677.0]/Group 2183 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2184 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2185 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n80 0 0 28 17 677 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1854 0 obj\r<</BBox[646.0 242.0 674.0 216.0]/Group 2186 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2187 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2188 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 646 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1855 0 obj\r<</BBox[760.0 224.5 761.0 0.0]/Group 2189 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 760.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1856 0 obj\r<</BBox[720.0 222.606 721.0 0.0]/Group 2190 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 720.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1857 0 obj\r<</BBox[730.0 222.606 731.0 0.0]/Group 2191 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 730.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1858 0 obj\r<</BBox[740.0 222.606 741.0 0.0]/Group 2192 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 740.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1859 0 obj\r<</BBox[750.0 222.606 751.0 0.0]/Group 2193 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 750.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1860 0 obj\r<</BBox[696.0 242.0 724.0 216.0]/Group 2194 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 1887 0 R>>/ExtGState<</GS0 2195 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 2196 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 696 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r1861 0 obj\r<</BBox[810.0 224.5 811.0 0.0]/Group 2197 0 R/Length 118/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 810.5 224.5 cm\n0 0 m\n0 -224.5 l\nB\nQ\n\r\nendstream\rendobj\r1862 0 obj\r<</BBox[770.0 222.606 771.0 0.0]/Group 2198 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 770.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1863 0 obj\r<</BBox[780.0 222.606 781.0 0.0]/Group 2199 0 R/Length 123/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.063 0.078 0.09 rg\n0.063 0.078 0.09 RG\n1 w 10 M 1 j 0 J []0 d \n/GS0 gs\nq 1 0 0 1 780.5 222.6064 cm\n0 0 m\n0 -222.606 l\nB\nQ\n\r\nendstream\rendobj\r1864 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceRGB/DecodeParms<</BitsPerComponent 4/Colors 3/Columns 1268>>/Filter/FlateDecode/Height 667/Intent/RelativeColorimetric/Length 234248/Name/X/Subtype/Image/Type/XObject/Width 1268>>stream\r\nHױ\t\u0000\u0014\u0004\f\u0013#38؁}\n0l;\u001bxN4Yd\u001d\r1,i)SgedI%M߶pɒLYҗ%M4Y~2ɒ&K2ufI_N4Ydm\f'K,iԙ%}:YdI-3,i)SgedI%M߶pɒLYҗ%M4Y~2ɒ&K2ufI_N4Ydm\f'K,iԙ%}:YdI-3,i)SgedI%M߶pɒLYҗ%M4Y~2ɒ&K2ufI_N4Ydm\f'K,iԙ%}:YdI-3,i)SgedI%M߶pɒLYҗ%M4Y~2ɒ&K2ufI_N4Ydm\f'K,iԙ%}:YdI-3,i)SgedI%M߶pɒLYҗ%M4Y~2ɒ&K2ufI_N4Ydm\f'K,iԙ%}:YdI-3,i)SgedI%M߶pɒLYҗ%M4Y~2ɒ&K2ufI_N4Ydm\f'K,iԙ%}:YdI-3,i)SgedI%M߶pɒLYҗ%M4Y~2ɒ&K2ufI_N4Ydm\f'K,iԙ%}:YdI-3,i)SgedI%M߶pɒLYҗ%M4Y~2ɒ&K2ufI_N4Ydm\f'K,iԙ%}:YdI-3,i)SgedI%M߶pɒLYҗ%ML\u001f\u0000\u0000\u0000\u0000\u0000\u0000o\u001d:'\u000eI\u0013\nnVi\f\u00029i8n hK)g9zvl\u0015m)JY\u0012V~/6(\u0010NvH~,\u001eO\u0014S\u0007>ۧ~\u000f\u001f1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:X\u0007\u0016b\u001aXܶxp`1\r,A:%\"\"\u001flۧ~\u000fDDD\u001b~\u001aX\u0007\u0016b\u001aXm=4\u0006\u0019\u0016#c\u001dXL\u0003i`q\"4\u0006\u0019\u0016#c\u001dXL\u0003i`q\"4\u0006\u0019\u0016#c\u001dXL\u0003QR,-VJ\u001dFPhp\u0014\u001b̆g\u0014aϓ\t\u0005\u001cgGoIGYEbVg\u0015/p_\u0017jLܦ>]7sUm\u0006<\u0015aoň`bW)~e߼Z\u0010m7훫Վm\t\tsG:׻׻>w3[ٞx>4,~R_\u001c\u0005s/r͡S-ѓ-}M-ӭѳ/ۣ\u0017:oRRz8\u001ffǳ\u0013́Sδ\u0004ϵηj\u000f_\b_\b_\\+\\LvGnvGovon؝]lիsofV6DGW\u0002>s̪/\u001f4O\r\u001eCy#rdxQmxIPnj0xx\u001d\u0006\u00063``AawyR5[t+sw{cwVfWTܘq+:\u0019ީ=NvF&D{X\\ͻ\u001e,\u001fN[hOmg̲a̶;fSeW\u001c\u0019So{bNOVm':W;\"Z\u0017[C\u0017Z盃g\u0013\u0019Ɍz<;R|)ߑ&@+ƒuΝ\tz׮\u001a\u001aElK(۪Uʖ*es\\Tl;\u00121}}FFZؾ.l[\u001b\tYW\tZ\u001d\u0012\nX^\u000eXV+T2U~\u0017\u0005|MK<a*B\\V,\u0015F}\u0017Qi41\rˇ|0!\u0003~WS?:?7\u0006\u0019\u0016#c\u001dXL\u0003YRȼ-)\u001b\rjm\u0006{a\u001a\r֢g<ߧ\f[p\u001bFe,/5Kfͷ엎2m:\u0016:f-ɖ\u0019\u00136Kݖpf]NGg᧖\u0012y0uP~.Vz e[ھ!*313oyC\u001b/Ν]]u\u000bwjd6z6z>Ky5Cl~fǚCeR#H~.V}Tǚ\u0003)PZ^\u001fi,Z-s-\u000bڴ{#\\ض\u0013]ڰٶ1q'~7~W۶_V\u0013[^\u001f\t.ۓ=9+]C2Bӏ\u00073L~fh#7WxL?\u000eefL\re\u001e\f/IeQRv`F/a\u0006Ip ?%K\n\u0017]yYa;;vkz^m{S[\u0013m{=RX\u0005B\u000b\u0012ϋ<\\'}񞡪Ε5w%7tvEowkV|#rM~-tImkK\u0005Nimգiu<\u001eI\u000ej'vI[\r]\t2(\u0013eƕ-qmʰXȤݐ߶2l_a\u001bak[\u0017ak+\f[Y6lUm.o[\u0019\u0015\u001dhv0?l_\u000eT\u001fڶU,ӘjU;3l\u0007\rhöL;m s\u0003in1=2ց4P\\U[Xmeʆ-6$\u0014G-?:SW\u001e}FyUVc4xE\u001eQRT]Q(m[M\u001d6SwEqoǕNGQ8JSiy\u001b=y>W{adtlRާ/+\\nm\u0017l|=b!K䭘csCFV!%!\u0017-q\u0011뺐嵐ymв6`^\u001d\\\u00130\u000b\u0011ƘmGAkoWftP&xDm+NEO4\u000fg[\"\"b\u0017b;Աz ?gGs3̼y{!./]\f_Lh6z]Ơlۿ_Mw\u0000*;\u0001~n?c;1>N\u0002NBH\u0012BFiBK\u000btc!\u0018mR hʝ$\u0010uݤ8M:n?cce%,G|lYp\u001fʠ\u00156coD[<\u001a;5\"8MG]\u001b1,\n\n\u001a\u0005\"\u000b\u0005\u000b\u001d\b{ (n\n\u000fAil\u000f\u0012/|/̡^@\b>D\u001e\u001e߳n\u000bD&Ì\u001dV\fT; i^\u001aQ^\b)vN$l\u0000\u0005~\u0013/nO:z\u0013\bߖ7;c;B+\u001d/xIQb{l$37\u0011lk\u0007Ab\u001d9'&|y\u0018mSȶj-\u0002غL\u0007\u001dƃj\u000fT\"B\u0005\u0011\u0011B݂}P-\u0016ZnM\u0003VM\b\u0011b\u0003H\u001e\u0007VÑj{͚6ˤY\u0010lG%7\u0010<lAf\bC\u000eۼm\u0010lU\u0005K*\u0014m\u0014s鼱F_̕SFSTUrA$\u0001\u0019\u0016*3#Jz\u001d\u0016Yy!\b[\\)\u0016+5Ku4\u0019ɈbQDg1-\u001a%@\u0011z;\u001f$\u0000\u0007pE\r*\tVK2jI\u0016H4f-jV\\+\u001d2ͪ\r\u0016\bلk\b|\u000b\u001d#\u001b\u0016\u0006zU=k`ۭ\u0014l[\t\u0018\u0019-z\u0017Sq?\n\u001d\fC0s!\\1\u000ex{%j\u001acǹ|:'Ng\u0002ėA\u0002l;\u0011.i\b=\t_`۸v\u00025x΀@0+<\n{<6ow١JZ|\u0019N@\u0000\t4W\u0007\\}Z\u0012=\u0004?>\u001e\u001fd/3Q\u0006\u0001WTmoyۂjŞvE>Mjv<LaCp\r=F`+WL(\u0016\u0015g\u0001Sq@sgtYhS\u0006W.!7;WwV9\rW\u00147\u000fMw\bw\u0012AV\u0011eFdC\u0018\u0000\u0012\u0017|9\u001f\u0016?x\u001e\u0007c=0|Ze<2\u001et\"~\u0004U>\u0014\u0000\u000fx\u0014v7GLU\fa\u001c6iט?6`Vս&uQ\t\u0019`Uu\u0018mzEsEYƲ$K[)(U)\u000f[B\u0002l׉]\u0000\u0016\u0004\u0005j<lM\u001eSɶ?S4b47苹th%R\t,3T&DҊ+,V&!\u0014h-\u001c\u0002oѡ\\Fe\u001aY\\'$\t=*&ōU\\UeU_Z]Y^3\r\u0006i ])Z\by+l#V\u000f\u0007++\u0001<jXM?4P?i:HU;\\\u0015]*Gmt^^oaպŲ\r\r5#fF\u0002;V\tRH\u0001\u0010.3\u0011b.jx\u001e\u000fRWu\u0000Zq\u0001\r\u0012gĹ y>D^\fї\"HQ\u0006x{#f)v*ɂmzn&6sی@QFؼ\u0015p\u000e:9\u0011'qFX<\u0019_Q\f\u0004?\u0007.H\u00162e\u000eזc\u001d{6G_ۧ#3v\u0000,|\u0002o\u0010x`ۅ`\u0018HY?E -\u000b\u0016/{>O\u0005!ۢN$鄸\"ҲSb\u0018{-L\fm\u001c\nn]3r$~Gz+ǹlu.\u000ee\f<6\u000e\u001b+aR\u001d9QC8-~ڋ`{\u0016mi<2}4~@\u001dp\u0018\rh@@+\u0018}tc^^Ll$Z7w\u000f8\u0001\u000e[c3\u000f2AbIE\u0003\u0004޶\u0014\u001aYƪ&L[\u0019\u0013\u0016B%\u0010l㚡`FlAjJ8[\u0017ЈaP6(?7MV\u001aM1W\u001b[i\\i:E[i4E^&],]\u00045˥\u0016\\&5!Jq1 -\n)V\tW$D\u0014/2A`5\u0012YA2HFY$˚Qf2wU\u0011b\u0018X&b8\nwՊ\u001d~O ˚ʐjEvP\u000eZՂ))հc1VXk\u000eB\u0002\u0012\u0016LT\u0006)u\u000f\u001aս:l,\u0004nJ`$an-Y\u001a\u000f[tYڈ\rO\u0018f3\u0015<\u00009\u001e\u0000HAz\"l\u0012&\u0013\u00005\u0019g󷳕kϽ:b\u001c\u001c$υ0u9B]P_\u0001b1۵\u0018{=ތn%ةzv*\r/+V k\u00103biaK\r/Rk\u001fvR;/\u001d\u0013զkQIil!p.\u0000yާb\\Not\u001eK\u001e>\u001d>ۋ\u0005\r\u0001l[\u001b\f\u000b}ڍ0<B\u0003jcg6=l\u0014mx\u0014\nb&Ϧx`L\u0012a\u0016`;,v*QPSVv#|uw'?\u001dml0y+ſ)[Wo_lt%N8S_w?Mq\u0000,-m)}9ssFK)-}\u0016Z\u0007R\u00148C\r\u0013\u00031\u0010Y0Kn\\2X6\u0014\u0003xews8?sl\tMyr>$O~99)\f6~;o\u0001l[;F\u001cAbh=FG\b\u0016c_\\j$5]q[l\u0007u[>X.jX\u000e\u000b40l\u001d{\u00021\u0013s\u00021\u001394ÚY_;\u0013hArs|\bg\u001b-#\"9\u000b԰hrZ\u000e:kǁm_\u0016<,XuQuQmPf\rʮڪ.=lLV\u0019}9WNV\u0019MYeV)#GGT\u0018$\bWU\u00054JJJVZ%\u0016lh\u0014J\u0001J\u0006[-)].mƜW\b\u0005\r.o\u0014\r\u0017\u0002ހZm5EF\u000b\r5IA'q5^Ӹt֥Ob5#\u000e.N5d\u0010JHX\u000b?\u0016YCfN-\u0016S@\u0017\\\\G(z\u0001w\u0019ʋq\u00118\u001e\u0017\u0013Ql\u001er^\t3_GQf5n\u001bqVn#*k\u0001r:\u0019\u0016}u;aZ\u000bDqt3¼6\u0012],\\~3o&\u00030-<J\u000b;8q78(\u00126\u0013tc>\t<t)\u0016\u0004\u0013xBP\u0014~1\u001c~q^\u0019kӾ{?VVgK,ss̵us{o(\u0004۠b6\r\u0006\u001c\f>+6Ql\u001bΧǜO3Ǚ\u0003>Ɉ3n#\"-\u0001i\u001f\u000bp\n\u0001x6\u0001޶\u001f\u0010\u0013gz:R\u0013u~z*u?N*:!W][NRx\b\u000fKv\u001c}\u001f(m^UM\u0010v\\\u000eK\u0001F۲\u0000^\u0006Bn\fyii\u0001~  \f[QV-Or8\fGLsĻi5N\"\u00042L0]dGT^jjo\u00195I>GA.S}N4\u0015qJ7.\u0016\u001aa{\u0006fت\u00190FUgmUV\u00151zuDꐼ\u0017Tܔm\u0001\u0000\u0000\u0000\u0000\u0000OT\u001ar̙}9>\u001b06\u000b0,\n(\"0\u0014kQ\u0006p\u0003DUĥQVEu\u0001,E\ru榷\u0011z}q3`&M'qOrfr29ON&߷oի?),dNJ&dt\u0006f\u0004\\BB\u0012\u0002PVH9T\"\"c\u0014\u0012\u001aZ\u0002P%RJC\u0012^)`C`yY\u0002ҥl\u0019&+\n\\\u001c啬!TژJBQI)E\r2:Ye# CG]6.6u#\u0007k\u001a\u0012&\u001fḪA\u0010K9\\xCfLP7\u0013uڌG\u001c\u0013\u001fsM!4t=gė^<!\u000b\u001dH3\f;(*XE\fV-gH\u000eu1*\u001ec1y\u0001v\"\u0013⯇0?\u001do\u000bBvD0\u0013\u0011\u0016,\u0014\u00147d\u001e;M]\u0013VuOеkѻ3,ڿ\f?̘z_\u00074d\u0001\u0007`u|{\u000f\\\u0015<hMD<{zGf<}(G$܌9Z_^7y\u0001|3_9_㞋j\u0000~?\u001d\u000fK,\u0012\u001e\u0014Y+/\u0012$\u0014\np@\u0017\u000bw޹\r[afX\u0011bڟ~(}_lk87Qgk\u000bXTᨮvT0\u001b<\u0010w#L s-@G_ͥs(.g\u0017}䈇\u0018=9\u000f~\u0016,΍V}:üag7uM}Vnq5nŰb\u0011\u001f\u001e^}\u0001ߚj͌v\u0013Hk60vZFiZ\u0001R\u0013#ys[#\u0012\\I6n}T!-\u0004@>@YQkky*y\u001a'TW\u0005e 7\u0012@\u0005(\u0017=IZ$v['vVj5I,Јː\u0014f22UHi\u0012QHyNk3P3H\u0000W\u0014R\u001a\u0012\u0010\u0000\u0004<\u0004R%\u0014-\u0014RT\\iy\"uAҖ2$ʀ\u001b8x5\\##\u0019mO.w_=sro{7\u000fv\u0007\u0016j\u0000$ kx#MNt\r\b\u0002\\!PQ\u001b\u001f\"C /\rP\u0007\u0015vg o]\u0018PHUva5$n@He\u0007M\u0018\\J\u0011\u001a[\u0000n^L%,BdN9\u0014\u000b9%Ph.3ˎ\r&\u0003\u0000\"w\u001ammo\u0015$fDY 'lzKtON8M\u0004mm[\u0002nACf*<ye;P\r\u0016~whF3nH\u001b\u0015ϐׯ~d.]S\u000fP';VO\u0015id\u00131[;s٨{=[]\u0015\u000b'\u0015[ǉ`~[\u001e\b\u0005\u0015f\u0012a\u000bf<i\u0013ez+_\tDM\b0ϖ9/=)>.>.v\u0016q\u0015\u0017i\fV˜MA#>NAf\"\u001c&3S.\u0017\u000e1qf8l\u001f\u000eZt>Vjv1\u001eJlQ\u0015[q@ق@\fSV\u0002\u00016-luݼu\u0005\u0007^jx\u001a\u0010\u001b@ҋa\u000bx\u0012fBՌ҄:\u0010u\bvo+\u0018\u0012aی+1\u0007fE~1f\u0017zvd]\bDt\u0004r ]\t\bd\u0003g\u0015MJ&J>RI*\\A\u0012\u001cr\t\u0001:W!\u0005IKA\u0012\u001eJ\u0004+R\u0001Z\rz0,\b2\u0016Y\u0010yYR>ai0\u0014˳U\u0015ġ͍O/{Wzw\u0015-VU\u00105\u0016J+\u000fD\"P:TH\u001e,\u000ec\u0018@v:\u0007t\u0013\u001dtb%4\u0017RfA\u0003fBh%0R,f n\n\u00130n\u0002_.\u0013tqu6:MdS#4hۋ̕<v4\u001d\u000brAj\b!ZH\u0000;\u0015\u0016@N\u000ba~,\f{ɣ6>NiLgnN[˚i;\u0004۳l\u001bӘ\f\u001eZU|^\r\n\u0017tw\u000f\r޹:&\u0006ԳAjh\u001b7f*c&em\\{\u0016\u001c=bU|>_z^J/\u000b^a~D\\pLg;\t c\u0017Kvb\u0002\tׂLq\rx\u0014g}Tdy\u0018<X\"\u0015#m\u0005\u0018\u001bz\u001c\u00104\u0007\u000509^NKXM]6Sh,\u0005:θ34\u0006F_G:}j\"\u00038r\\~H'&\u0010A\u0007G8rp!r),:(\"\"\\#3kZeͺ[8;t{TO=K*UWk u>IjI}4!Nh.b\u00128$%uԶQN*\u001dSʝ&e\u0007B]z\u0017\b\r=bjzH\r\f[\u000b5\u001d8DnŶyyyF\u0010ݸ\u0013B&E1+O-<RI1\u000b3VP\n\nH)grNn&eWhWIYդ\u0014Ӧ\fBA2dV\u0006|\u001bLVfZ\u0006VPm2+3-*\u0019\u0011\u00131ٍ\u0006V$eaj8\n?\u0002,(\u0000\u0003otơM+sOL'~෎\u001fk^mt[;sFJ`\f\fmfj0B\t\u0013jQT~|NZ\fgm!pXe\u0000K\b .E\"н\u0002:G$,L)\"\u0004R\u001bᐴcahAT\u0001yG\u0016~jZEAvH\u001cb\u0010\u001afW 3[@\fY\rxݬ\u0013u@Ĭ\u001db\u0017Y\u0001\u001a\u0019Ō\t\u0002рpcAZyRfy^|p{4iK秤J#\tb\u001e\u000f`6=\u000649'I\u001b$=?'aɺ^K^ƝϫO\tJo\u0002^\u0011uۃ9M.~P>m\u0016=G ۪e!f}ɽb\u0000\"IV?GafO')'rf<%I\u001dl*L[ntrH\u0017H\u001bd\u001d,\"M\u0010\fa&I3óE3t\"\u000e1F\u001ab\u001aUJT[i\u000e\u000eը\u0006a9Mn5-Ťä܉:PU'5p!}fn\u000b?+\u000bw\".\\ՅQE\u001bh2fuKZbrRƲ\n\u00193\"\u0019\u001f&eWhWIYդ\u0014D2M\u0019<ʠ y\u0006Sd¶a\u000bjJ\u0006Y\"Z\u0002bH.'~EV\u0005\u0019E7ř\u000f\u0005z?v\u0010y{P1~e+5^FOrx[4t\u0010&U\t^RbUcQfB\u0012eF\npGBW_(/\\~:\bsj\u0018v!=\u0015\u000f6ǡ<|\"\u0011ӅD2S\u0014\u0016eIX4bn\u001f''\u000bwyy?\u0007\u000b\u0001\u0018dn\r2K!\u0016\u0013do|⌠s6lʌ3)LӦ\u0019\u001aN`\nD\u000bG\u001c[l>\u0015`ޞ\b\u001cp3C>nދ_X~:^`Jx_y{LE\u001d\u000b\u0007\u0013\u0012\b,ݢGGȳɩ?k\u001c\u001b1狘s#z\u0010}pw[ׂ`&(_Eƚ\u001afg{Z&k/&\fٯLԳ\u000f%\u000fJoD,&h5\r;A\u001c\u0000b!=S@\f[\r0cظt50b\u000fuA\u0007?\u0017{\u0004GkIC3vOLs?u<~Bvv\u0013챋>\u001e\u0007ѻdh\u0013V3,U \f\"YEZXL6r(b\f\u0000zTK\u0012!Nkp}\u0015b:1x*$'dעFTSoP\u001b\fY\tݤ%{IuCHa-U-ԉ*2-Vr^)㤪J\u00039\u0016\u001f~\u001b#~ܤjRYz;\u001fSYz;)+\"Զ\u001cl\u0006\rOm\u0002&8jdp\u00102w&uU#e\u0001\u0002U\u001bR*6%*E>\u001c\fևJdr\u0006\u0016B1>\u001fj<5\u001e3\fyT:y\r'|A?\n?y9B/(\u0007#%\u0004ܓ>\u0004(\th|<\u001778?\u001b3OW\n0\u0016\u0005We\u0014W}\u0001\u0007\u0013\u0016\\ta'rɅK\u001et4\u000f\u001d&\u0002b2Z'5\u0002hrZ.po;\u0010DI\u001f9OLļf9X\u001b\u0001\"]\f03>0mGq10nR2V\u0001~\u000f+\u0000_n\u0006mba\u0018-Ոxq={L>ef=M\u001fua4jGs#'֘Yqet!7\u0016#_ֿU۞VXU^ȍ6g\u0012\\Y\u001b:>^9Gܑ3\u001f_>wf \u001ew+!\u0016.f`\u0004\u0000$6,PH:\"\u00038ɾX>\u001b\u0012\u0010i: \f* *\"\b\"02\b%\r)(̮;1;\u00178f_\u001f\u001fO\u0017N'O;UI\u0003 \nP\u000b>bƃO9q8il\u001b^qt\b4ʞu.k]\u000b;\"Q@5\u0010q\u0005\u001d\u0003\ff=e\nR!z=HI\u001c,\u0001b\tKؑq\u0017~Ӂ+&'\u0004JO6F<ú[YW\u0010\t\u0003tH\u001fש{\u0004%\"\u001c\rf@',d@\u001c\u001a\u0006=B\u0019*pC9+CrD[k\u001bqM!\u0019S\u0011\u0010yFlZ\bNɰ=CB\u001f\u001dz\u0007[*̀R!A\t\u0018.m\u0004\u001b9\u0007{dmdsrrrɪ\b\u0001ZyW+\u001c(b\u0014:\n)\u0019Ղ\u0013V\u000e˘\u0005uhT\u000eG)%m\u0011 -i\u000frO3'bjQcި[;b/a\u0000T^oFh\u0000\u001d[A6&#\u0017\u0005_\u001b\u0019\u000b\u0019\t \u0011\fm\u0003_\u0000IIq8iM\u00026Z5TyB-JskNvuc\"r\u0000\u0005V\u0005S\u001e\u0004e^\r02\u0017b7cvۉK\t9\u0015喂0\u000b\u000bk\u0011~3&\u0015㦝i;*,\u0005;\"\u0012\u00142&k3~k(ߛ\u0002W(|\u00050&am1XL'K\u0002UI\u0016.\u001b~a:b^\u000fP\u000fC̳82\u0015vз嶯\u000fR\u0017{F`\u0007\u001bWW%WlW:~8b(ᘪ=\\q9v|a/nߌ\u000f\u0002>\u001bt=}ҙƑD`\u0002JlX/9g\\ؤ\u0003\f\u0000S4޲\u001anZ#\u000er^un悃3g\u001dlto\"\u0003!p=\u001c\u0000kTl9\u0018\u001b㿈\b0m\u0010\u0019b6ZNKJZ\u0006\u0013C\u0011o%\u00000\u0001qІgpu+\u000e]m8v6\u0006̛=\u0006Ȑ\u001fժ{Mz\u0010y}\u0017\u0000rY,\u0003w0p;m\u0006\u000eg:\u0016*xЕapQSlb\u0006\tQ6-\u0004>lۀm\t\u0000l2l1\"01\u000fѹ\fZ^A \u000el2+z\u001f}RuF妳oˍ>M'kˍ&\u0007\u0018U\u0007-zتQX4y<\u000bi@J'kv\rzG\u0010QV\u0012#TT\u0012-Tj\u001dd+\u0015&Pm\u0019kU{\u0007i!Y#>dk.CW\u001e,(\u0007HSryk\u001a\u001aǂ\u001dpp\u001b>#0/hB\u0013%m썬טwG2rǬ+5jRi0w-rݬ߂\u000e[\r~˄\u0013܍Oyi\u000f>%|伟\\v9H\u0000Z^=\u0001rO,\u000f\u000bL((K!Y)\\ٹ\\:oDAFLX\u000b~zN\f\u0011\u0000?_]\u001c^{l\u0011>!w=OXLXJX_\u0000Ł\u0012qP\u001fzͽn_%a&$\u0004M\bk>A=̥\u001aGN\tV\fP!Q݋rOb\u001c_?]\u001aޭOV\u0016LU\u001f+Y:Qn_omH-6UM\u001f-,\u001c)\u000e\u0017{$ۘYwωNN|C\u000fyk\u001e\u000fHv;n\u0017|^\tۇbf\u000f`\u0016v<$/\nM/\n\u0005\u0002Iߋɤ}\u001c\u001eE\b\u001d\"솬Zf]jW%*\u001e%?y'r\u000b>bT4:Q<zH\u001a.\n^-w\tN\u001e׀!z$~\u001c-\u0000%т\u0006,L\u0016^GwqNV^-l;h\rؖ4M\u0011U\u001fG5Fj\u00186b\u0004-B4(4(FeQy\u001aWUm\u0006-x[z\u00118JgeBa=~OʽnhtmgsdmdU*T\u001d\u0012\u0018:@+md:J\u0011\u0016A,\n)@<pQ\u0001R:Z\u0005:FiU2S\u001drm֚2K0o\u0019[YqhC\u001dk\to}\u0006FO~46\r?\u001bE~u\u001fu3~\u0016Nw\u0019\u0000u}ȝ0~*x3TR;nMj̩#\u0005\u0000\n~B\u0000=*v\u0015\fV\u0016y.l\rg<Ĵ3^rG\u0002R\u0000\bZ\u0002\rR \u001a\u0011z=Bo(4a\u001f`f%z>H/إ0 \u0004xˁRan5¯Dy@E,_;\r=Jx=c>s\u0018r'EHs'8q.(gن3\u0017@.\u0010B\u0001\u001ajJ\u0017%\u0001B-\u0017#7\u000eXi_w-aG?lG\u0019}m\"l5ns773\u0018VͰVfV\u0001qН\u0011\\\u001fUd|.\u0018B܉m\u001cq\u0019\u000f:\u0007x~>ч\u001cAj\u000e\u000b\u0016c6=mэ8369\u0006\u001ag`NYGö\u0002ho$;=]\u00188W\u0012\u0014\u0016T矏\u0016\u0006\u0007E|}A>ΙbVی[^\u0006g^a~;a4\u001eAx~4h\u001ev&}l'a\u0010I\u00028D\u000e7g\u0013-\u0007\u000f}\u0004\u001fV\u0017_py\u0017zٍ^r\u0017/4\u000f\u001fv\u000eYgCՅǶl]6j\u0011\u0011|'a\u0006\u001bH+\\Ўv!\u0018Z\u0016ڱ\u0016VӪ^RTv\u0001\u0012\u000eMآ\nj:S\\!n6)LV٬7+̊w\u0002XUd\u0014ZeD-˔U\u0015JUZF\fT۠A\u0006HjKyҞ!\u0007ne웪eT*e۟&iK&Km-d.-\n։!\u001e\u001c#%\"`[&lY\u0004\u001cX\br\\\\+^%)EŰT'*\u0003Չ*4\u0000JtR԰\u0014/%x{\r1\u001dh1ڱځp׵m5푶u\rj]\u0003څ\u001fi\u001f\u0005~\u0016@Q@\r뗝U\u000b ~(9WDmb\"\u0007\u0001w]kzʴ\u0018ϗ&[HN\u0013\u0013ۅ\u001a'͙V\b\u0019cӬM;\u000e\u0003jD\u000eA3p/9\u0017\u0010.zك]񂈛9\u000b\u001ebN0Д\u001bv @\u0019\u0017J\u001fMԺ:dY~B\u0010u#\u0011/'(U+YՈb^^\u0002\u000b8<\rfqH6?̓ɠx\u001d1q+\u0011gɘ\u0019\u0007\u001c@\u001cة>>\u000eLw^궑qbNbNpa^c~\u0019\r\u001dF\u000f|c\u0001X~\\6g\u000e{\\Q7%.Os\r\u0000Av\u0015$WĊ(@,de?#{A5/\u0017\u0013]nl΅\tuY\u001et`;Ö̓S\u001e\u001dų-;O\u0005\u000ez,qv[m\u0015w{xa\bvlwƱnB\u0011\u0017\u0012H\u001b\u0015]B mfXV\u000bIkԒZR*[]\u0016eEbU6Z\u0015\rP#hb\u0014UFW..A2u\u0019 e:\"#L)*UT*\rLp䛒e_yY!+\u0007)l\u001e7I[j5\\j;om's$m$UD1\u0016ʤizVB\u0014o11JS\u001e֪8\u0002O\u0016TJ\\RKqI9 -\n\u0012T[\u0013\u00055\u0017lX\u0013X\u00170c\u001b\n\u001a{t#\u0000uc\u001d\u0004|\u0007<4=T7|\u000b+v\u0003Y5辤aE_8b8Ȝ`\u000b%\\\b2i]\u001dsκ|ܰ\u0000[FϕгEt\u00019W0e\u000eCV(\u0003f 1\u001btƦ=k\u0017;\u0013MC7M;\t{\u0011˅yy/\u001c&9\u001e=#\u0002r\u001d\u0013r.t&ѐUj@`$9O>?Jr\u001f9ˊ'\u0017U?觖\u0002R\u0016_\u000fP׃\u0010\u0002]\n\nwwL/wi\u0002<\u0017ی\u001a&\u0001۩07\u001cƷy#3\u0011י\\\u0017cl~8\u001f`\u001b\fۇs8r$,\\\u001fr\ffC=ad~*āP,n41\u001ev2\u000fqifĜȢ9jsȌ\u0003\u000bDW\u0000+~Ջ-z\u00057\n\u0012\u0007@y+\u001e|{97UKNݬ\u0013|nMq(9WF|RƐ8&nLvN\fŐ=XD\tsP\u001f\u001f2\u000e\u001az\u0006\u0007z\u001e4&X\u0002²6\u0004$߅l&N\u001cr<G^Y/](^\u0014\u0015\u001dR|+m.#Jh#\u001cJ/U[4[\u001a \u0011N#g([ze\u001f-)IRIRykK>Km'iK&\n\u0015>\u0002#i\u0006 jTHYH]xL\u000e\u0015ԃczjw\u001aRKHʐ\u0012X\u0014Չu5M؂F\u00020޽A<\u0005=Ϩ\r{{\u0007\u0019ѳAn\u0010\r\"\u0014?%: \u001du]\u001a\bn\u000b0\u0015o5ȪUޗ7u}\u0006p|ؖ]Xi\u000fjWd]o/Y|%6>%\u0007|4\u0014R`:eR2\u0004:$\u0016HW}\u00130M>\f3Vza\u0019Ӟ\u001bP_|)\rE)T\r\u0014B2PDEEpNwŝ\u0000\nB}P헲\f2LFU)\u000eH\u0016ElI'eg\rX(u\u001by\u00191\t[OR\u0004;W\r*,\u0005r#8oZ5Iĺ\u0000Kv-sV\u001bEփ$b/KW<C\u0019~\u0006sN\u001f𓹘\u001cf02=Lg.[\u0001\u0015\b{T\u00175_\u0005\u001d~\u000f*<R|`nd\u00172󙆅,b6o)\n\u00159&^~ZeAιT/Vx;^w[e^5VV?jV=nf'f\u0014N,+Y\u000eӨTrBg\u0012ċ\u001cF|\u001a 0\u0002I\u001d\u000bLZ@\u0012 f]BXm\u000bHZbBl&[\u0016|Ì\r؜Z<ɡc*\\؁\u000e\u00055%։kzce^\u0006i\r3\u001bc4C\u0006^\"\u000b\bܒX8H\u0012[-j2\u0010\u0015v.\u001bʃp\u0003.w*P\u000b\u0010\n+J \r@݌Xp'.\u0000:\u0014\u0002<\u0001#\u0017_[(GDnV4,rwV,r\u00159MXIlqGJxQҌ˝p\u0014\u0012Ex ܴ\u0016m*oT7])\u0004n<U4eM5\u001dz\rN~95\t\u001bn\r7=\u001d|\u001aѠy<\u0017DWDǗ\u0017h3Q334{Bϖ\u0016運=C)\u0014RvE'c\u0007\u001an6Vk/\nR=cvZS,^x\u001bU\u0011pNѢ\t\u000eQgA&H9\n\u0019eD*d6A|F/[3c\u0017\u0014\u0016߹4jɠX6(|Qq֤X1\u0003|箘QV<_X.Yus\u0017dr+L\f(wS[nr'UF)h`?8\u000fM\u001bw+\u00076u\\-v༓\u0003\u000fr;c\u000bߺkq\u000f{\u001bo\u001e75o~<7qcrwFUjm]Tq\u0014Q)mb0\u000f+<\u0000\u0003\u001f\u001f\u001ev'\u001eI\u001bI+7\"hd%Qr\u0006\u0018d&Hh)hf\u0018hQ.%}:YNzN/]K\u001bekFl̈́\u001a&\u0000,U|ՠ\u0000O|I\u0016U\u0005\u0004 .bq`غp Y7xn\u001f7x%mW[qf^*\u0013\u000bjAÊu1\u0015hl\u0005HL9\u0012\r\u0001\b(AHMJP\u00037pS\u0003\b4\u0003¶4Q2+#eEr.z\bA\u001b\u0016t\u0011\u0016,]\u001e\u0003V\u001aa\u001aP8\u0004_DnV4,rwV,r\u00159MXbb8\u0018*\u001c\u0011B(\u001cp\u0014\\0m[RX\u0019\u0005m\u0014TGaH\tZYr:o#է^kF^s?tch\u00007o/\u0017sS?2]\u001f3\u001d\u000f߃e}I\u001f{Iz\u001f-͏OE\u0005m\u000b-0a\u0014&Iw\u001dRZ㋫sE}rϮR}fz5o5i6^}XpJ=D厑JW{FrkRbI3h\u0001R؏\u000bƃ\t\u001fz^Zv*YwT\u00117B\u0016@\u0019\u0015#b&\u0010er BjD\u001e7`\u0006l _0Ȏ+ܔpTI΢#|qߑ7\u0013\\O\"֓ \nذP\u0017@Z]foT,i\u0001a9ZӺkKl,\u001a~=w#\u0017C/C\u001fneYi_T^7ޟ;ó3 l?_>yU^URm%F|Bn?\u0018y`_L_ͣ_!_L\"\u000e'z؍>jx9Ps*dn\u001d/NسS'hhL\tJ8\u0003M0Ф\nbT)V4\"\u001czZ#O,h:\"Z)\u0017c*I\u0011!.ykq\u0007A;p֥Д:'B\u0003+\t'7[@vM.\u0010+&D\u0019<)whL\u0019\u0012S\u0016R\u0011%nA=M\u0019z6]\u0005wwzzޠn\u0013j\n{Aؒq%\nq\u0012ˑ\u0002)ܥ\u0010x\u001e,C\u001eϘF\u0006iT$\n[\u001fyHH\"_7a+rp\u0016;+rp\u0016N؊&XU]\u0018e\u0017\u000f\u0014\tQ$\u001e|sq5t<o5Ú&\u0001Ǘ\u0013\u001f9v8ql'qn\u000eP.!6\tI wr΅\u0004h\u0007\u0014\bRn\u001dl6b]'ҍpK\u0019S?ߦu0sBXak\t[~WGGOF.=N]l\u001cN.]h+zS^ҳdem#\f޳ߵ\r,\u000b}w.fϗt}/7?x\u001bzk\\}1u\"\u001a\u001bKpwW>Wzk/޶,(\u0004r-fE\u001cbmw\u0007Ors~z{\u000f*\u0012~]!\u001a+[b9)\u001bYE\u000bc$:[6Sd05&Ʒ;MݎVV@+*-\u001a!՝\u0010\fQv̊O\nxP b!'P\u0003f׈\rXA+>d\u000eZ:MskhÈ4SY6T\u0018\u0018ژ7j\rڨ)\u001b5mRbA_eA9\u0003L̖m>Tms\u0019;\u0013N\u0006w\u001e~zk\u0019\u000fw&\u0013S\u0004\u0000w\u0016HNda8p\u0000&g[\u001e7=dvIȏf5WYS<%\u0010\u0013\u0016|Ĉ$\u0007ğD$pOt\u0010_gnN,70݅\u000eoT\u0017_շgZ2]M\u0019u)=RXe\u0017tǪb][JH)8E\u0007\u0015Uu]z[cy\f-#\u0001h*p6q\u0001ZYT\fIŤS1\u0019\u0000\u0019\u0003b+-%T($i4Π^V*j\u000bQ\u0005*|UV\u000emhPwua1x[\u0007جjlRWBvnek\u0018Y\u0001m`8\"@KrmT\u0015%v\u0010kjZZ^Am!6&91Ϻ|\"/\bM\u0012^M(\u0013\u000bKxLx;!Kx5!EAD >)3qn]D\u0000HD!/ߪ\u0013ݶDd\u0019x\u0003m\u000e)\u0001Zpr^2v\b\u0003wlCwmCˎ\u001dc\u001dێ?\u001f>zɓ'O\u0016,=MKΥE\u0018~<y__/{\\S\nZzYmAQvy\\\u0013nrCm|sPN\u0006w6\u0019ޯ\u0010~\u0005z\u001d$\u0017;ˬ4RG!\r\f+t\u000ee,,8>+)T$Y\u0013\rIZP-5z\u001c\u0001fȄ\r`#\u0016\u0015`s\tdg|xmQτuI&|,2d-Ĉ\b9\n\bԈ\u001c6r\\ ldFNEL\u00025\u001d\u0012`36rbo0\u001fUn{l3v*+yx\u0003dd2ΜZ\\9sBñy'sbN栃\u0006u}jo\u0011cV\u001c\u001d)@ &%\u0002q==N;3ħKm49)m>Ϟ,wK9\u0017t\u001d 4\u0002tJv\u000ePr6V -\fD#\u0000p:N`>F\u000bz5~3a)<dmDےh:(\u0004mr7\u0016Mӣ^\u0003nT{cU\u0001U_\u0015N\u0011YWH u\u001ayUmt1mǢȵ\u0005\u0006v3Oɘ\u0012,$j{xyAkRu\u0019\u0014L\t\u00076M&j'A\u0007\u0016LzmoJA\b?nBjBv^X«\u000fe\tY«\t)|\b%l8\u000fBɑ\u0000-!vp8}\u001e\u001buHYlvIn\\l\u00140|/at>8~?\tx\u001c|<~^^\u0016\tw,{oG?)\u0013\nZ\"mtٵ\u001f6~\u0001n;۞\\|\u0000w*\u0003ට\u0003:ǞhVK\u0017miH\u0003HN&.ޓұ10xW\"\u0002[c7{\u001c9}Ƙ~f\rAȰE4Qv̢J :@o\u0016fǈ\u0001}&,o\u0006L\u0001vЬ\u001dT\u0017r،X\u0001bԊɎ\tĸ@LH\n9\t%\fOn=J᪒Y_U{І\u001fIb:7\u0000\u001cK>D\u00018I4$L\u0018t8&89ꤏ$@ک\u0019;\u0002\u0019\u0012`\u0016b\f0\u0005.G-\u0018ߓ/\u001d&(\u000fsvsl\f+r\r\u000fmMm{\u0004ݴ=v\u0003s\u0002P\u000fY9\u000e^Hg\u001bE\u0014f^q?YmD\b\u0006cDrh,²E]z+m؊K^\u001a2h:fWzh:d:SP*\u000fra\u00142^*j2\u0001ĚJjF\u000e\u0001:\u0003VհM5jW9Ѓ\u001e|8A\u0011\rM6q\u0006\u0016.[unVV\u0003nbM̺Y71\"\u0015\u0010~܄,Մ2W\u001fʄ\u0013W\u0013R$\"Vp\u0004nPeb\u0000KJ\u0001x\u001e\u001b\u0018'@8ͱIl. '\u0001\fap_2`d7K\u0003I[U\u001f6vjw߶&Gw[Lh<\u0012>?/dò\">1爔sT9&)KMbn\u001em+*Ra *vN?$\u001e=?\t?\t->\r-<ߛU\u0016\f\u0007{х?|5xigC\u000e~ι\u0017NrC\u001a륏;~ڷ\u001e\u0015FV԰\u001e5lD\u001bQͨQ5^U&&\u0018ds[\u0004e+R\"U\u001bRwsS)z?{m\u0011\u000bW\u0016_4\u0012+Q=&\fz#,䈅\u001cb]&oo24=f{&\u0007H\u001c\u0016j \u001a`PC\u0010\u0016\u001aU\u000be@ƌ٘SeɃK?[lط\u00118en.;%\u000e\u0001ïV\u0003N\u001d[rnM\u0006,9E'\u0000\u001cؘ[q+=\u001d0X\u0019lΡ\u001do\u001e~35`uڸ\u001e[\u001b$\u000eմ\u0005#\u0016r^(X\u0016,7\fYQ~&Є\r%l(i\u0017\"\u001cpr9,y[+jzm5Dt\u0005\ttfe\u001cJXx\u0013Y\u0011\u001d-eqކ\u0011Q\by.!*H\u0002dй\u0001JUJ(ʟT\u0013\u0005aknD\u001c4u<Ui\u0016\u0002LzBZnOUzEL,*\r28֫Nf>)*.\u001a\u0016WlܮKav֯}\u001fm\"u2Igl[էvVf5iUXa\u000b\u0011TH\\ QRH\\D2TIA}LT4U\u001c#3ߑv\u000b.<\f?\n->)Z~Zt9ؽ\u0002\u0016Or?pv\u001f]G|oؓ\u001a~O\u001c\u000byN\u0002ͨ\u0001\u0019[/%\n/9\u001eE\u001bQV\rvp\u000b\"ְ^vJQ-\u001eaGc@45g\rdQf$[dL\u0002TDvS~\u00078\u001brG\u0002\u0017,Zee%;_fz~;gg\u0007\u000b!\r;\u0011\u0007?\\8Q'\u001f\u0007.~̅g%I\u000fI0F \u0016DnaF6FI٬[HzDyЬGy\ns\u001e4Ofe3\u001e\u000e\u001f<|Ϻ\u001977'6-τr\n\t\u0017LlR\t'?q \u001c܄\u001bwp\u0002.nX\u00017q?Z<T_\u001a\u0017\u0006)*B]eHw'\to\u0012\u0006h\bP܌&h&NX\u00040m\u0015\u0016\nyPgz&*2Uz\u0012i!l+_m\u001c-VS{ o9Dr䒻ud\u000e\u0016\u001f@NSV\u0003y\u001b\u0006\u001c\u0011\u0011:H\u0003UJm[K*D\u001fIU󞑭\u0015&AgνV\\n\u0014\u001f\u000e%)Ө0i%Šn`U\u0007}\u0003DA\"\b{W\u001d =#ĤKZĭ\u0016oMdnVf5,m+tNʬ&@wӿ3\u000b6D\u0013Ah[,k?U6M̄5\u0018sa\u000b~u0նw-\\y{Yڳ\u0007J?zQd\u001fmz'%\u001e\u0012\u0013\u000f]c:Gp5^u_\u000bНn8t'ж\u0001f\u001cANqJXF!lk_\u001a!o5ު3n@\u001as\u0004j\u0013&\u001dbDuy\u0007hؖ\u0013b{䀅zׁ\u0002v\r\u0014\u001du#\u000en1a\fŃ\t\u0017?\t\rh3\u0011=h+b\u0000-тO\\E)^_\u0014ܜ~\u0014\u0010_\u0017Sw\u0013}\";~8_ŗ\u0017}(e\u0001xy\u001fy\u000fLqދ\\h-&1t\u000bI0F.4\u0016f,K8)0\t?X_:XS|귷f_2<\\[rL\u001e\u0006]\u0003\u0012P$\fa0/\u0019ճz\n15P8oկ\u0015n9Ry\u0004,\u0015aI(b,e(\b[R\\\"\u0010!\u0006\u0000om\u001bz-oCE!-~\\\nP+A=+2{\u0005]-\u0015\u0014j=ĠM)i:&Fum r3,j\u0018i51\u0018r%L-\u0004ɤL\t7\u0010Ҿ\u000f6I[դvYf;i+ߕ\u0015ص#g3l\bU\u001bVdve\u001d14\u0016m\u0016QT4\u0002[m;^\\^re7_W]m\u001f?}S~}a0mpI ?;=1r;m'>A_L8;E\u00174%\b\u0007mRmoq`Y!W(\u00155buS@\u001151Y\u000bs\\̃?\u0016}\u0007peS\bP\u0007_}$8!\u001e[Nt\u0003\\C\u0016\u0010H\b$\u0004\u00128JY[شa\u000f*U[1֕ӦIЀAC[i[MB_x%,}$OP=~\u000e\u0004=V\u0006vo\u0007\u001e+JŎَ2s-Dw.vnAq\u001e͟qsg<\u0019\u000fy\u0005h\u0000\u0003> .\u0001!\u000b)p/4\u000fkBJ\u0013qi\u0001)\u001d2sDҺ\u000e#<_=\u001d\u0010\u001e\u0011G?Χws<N%pxAo&\u0013~~\r܀\u001fßu?{:6TXuit\u0015R[-Ɖ\u0019\u001b\u0014G\u0011q\u0012-,q#\b\u000e:.QG\u0005M7z\u0017u\u0002\t\u0013[9jYGװ\u0018Fn\rKTC\fQI*\u0004LQ\nD(K\u0018\u0010\u001b\"1o3\u000bi1\u0010#ۢt[AVy\u0014xp\u0017\u000bn.'7\u0016؀\nsM7JV<SݎFKNkA\u0013a>D[\u000eI\u0011(0nq!\"aM\u0019(]5_\u0007))u&˝S[賹dmɪ2\u0004R)Q$!rv3Vm\u0011l3}\u0011\u0016\u00166\u0001wƵKݹ|n%vnj..@o,\\'\u001f)87=w=q\u001bFn,=m:}rwGs\u0006\u001b乍2v&UT5=[2ӵl\u000eּ\u0011\u0007U\"^h.v4![֐Nꈓ:J%tG\tsiw/bd\u0019\t-c\\̩2\u0014,wz\u001e\u0013bWg}Y\u0004Xy+\r\u0001CЄ4Iɀ|^#X\u0001y1]\u0019긡\u000eM\u00041C/*\u0013:f(R\u001de\u0007\t\u0014ܒ'\r\u0019!-h\u001c-b\b^\u000f\u0007D\u0010~?bJ\u0017u!\u0019x\u001c\u0017JjBB6UE\u0015PwK\u0012h}&<mc)K\u001e,ͤKk63\u0002.@V6Jzö\u000em\u001dgA\u0010cF\u00114\n\t7\u0002ZNYx\u001bƼm\fQ\u0005\u0001f/\t[@cI\u0003%`<d\"S[\u0015[c\u001de#\u000b./](A|nisغH\u000f2d!,9Qc<}8)Q\\fn\u001bm\u0015Lr_7Y[h<>˝N֖;J\u000bDZQb\u0018D+\u0000[ce^\u0003HVAۮ2m\u0010\u0010l\u000f5+\u0017-ٶb^ܽ\u0017j޸\u001f{~'K.rg_Oo>;ޓ׌@v-o_|߾qgvU!wl/j_|V\u000ea۾VǕ|\u0001N#ҳ5\\-;_ֲ3u\\Y\u0012\u0011/&[אǜ\u0014`\u0016QʀgO\"Zubƺp@Z\u0017\u000br3.\u0007<z=\u0019/zA~&\u0001M\u001cԤ\u0004n(3\u0003R/%u|@IrZu%\u00164G8C\u001e\t)A\u00041\u0004X\u0015ɐ:\u0019BsPBTHSa\u0015au2NGpxrXDLX*\u0011e*\"䉰2\u0011Q\f!e<\u001c\u000b9n:\u0016FCĴ!uإ!\f1\u0019Zk\u0003U=_\u001blܾsSU#Ghk\u000bmiAEEZ}4Py'Z\u0018RzD \u001b\u0004jH\u0013 {\u001dm\u001ax٫\fZ[\u0015\u000er\n\u0015ȍ2\u0005flk\u0019x;\u001eO`4Q^o3i6n7ㄇlPH79{\u001dmV+O8l)b\u000f3$G\u0005(?Z[f\u0016W凤Ug_Vf7q\u0004WJ}dmrԖ;l.w:Y[h*}E\u001e\u0014\\W;˩rY!&*/jY\u0003Vִ]15*Uȶ|\u000b~GI^mՅAuoݯW>]\u0019'݅s;\u0006ۛSǽ\u0007\u000f\u001e,=w^\u000f|uxռ7l_k\u0010\u0000[\u0003?\u000e\u0007Gӕt5=l\u000b1v\u0005㭯HTIKipk\u0017)7wʅzڃK\nf{<i\u000fL,|B;j9M\u0018\b\b8}I]F5RʐSȳ!ChX\u0001-T\u00181N`\u0002$'\u0010`\u0004\n\u0019(T8\u0013Å9\u001b-\\j\u001c͙ˈ:\u00073Fh|\u0014:v\u0014\u001bB3\\\u0018\u001e?u\u001fy\u0007pDZ\n\u0005|y\u0018cl;i0\u0006\u0012HxkPX7 !!Q\b\u0010\u0002=\u0010\u0002@Ru[lݦSu5ݲ%n&mR4l6h\fiH70~#X\tuA`\n;Py\u0001lῠHil\r\u0004\u0000?\u0012<'_]S*(v\u000f\u0007\u0003}\u0006u\u001e%wǑjኣZE\t;e铛n6>..J)}\t\u000bu\u00016jbР\n\fj\u0010\u0014o\"ׯTdG<U`\\VUj$<\u001c\u000e\by42^+\u0013\"\"S҅h}&*\f\u001apAwDM\u0015\u0013f\"Ve\u0013qD4{Iy\u0013h\u0015-\u0016EEȡ\u0016RNI/Ml⧳m\u001f},\u0017?-~41'a'a\u00077Od0t\u0013*w\u0001iL~\u0006VY\u0015\tJl$_j$pD\u0012#UbS\u0002o[Rz\u000f^/g\u0001|ggG}3w\u001f-\u001f\u001a(b\u00055\u00059w\rjiX\n\u0018%5\u0010NcG\u0014T}\u001c06|>42\u000fd\u00020ie\u001c6\ff\u001b\u001c9aQy̹Iq\b0뢦ܐX\u0017=F͸YV\u001e˜\u001b\u0001\u0016<\u000bl\u0014*\u0015q\u0012T\u0000JyE]k]K[\u0014e[a\u001f¢M\u001aذEDv\u0019\rlD.0~\rK\t@]kX\u0006i^Z|vG+l\u0000vr]`mЂ`\u0001Ɬ/v̿o\u000el;~ 8wp@m݅'}\rUC\u0001Rsޤ7`>\".^u\u0002W>\u0013g@\u001d)\u000b|w+>`2P\u001e\fnO*S-i7@)]\u0019/0j[ߖp}\u0004&\u0012*V\u0016opn--<Z(j@.Z]jE\u0014\u000eLT\u001d(\u00132A+\u001bfOyq#E[KD-E\u0004I]\u0019mV\u0018\u0015\u0006J\tU\u001e+ի\u0002D2TB(K\bE\u0019!/'\u0014\u0015z\u000bo_71[hblG\u001fO'f\u001fML%$!\nI;Bf٫Mޜ\u00104\nv\u001a%\u001e\"63\u0016VߒD%^:u;#e\u0004[Ԩ@\u0004y۠Y^ygݍw7>}-'|g#~?s0\u000fWZw;m\u0002۞nS`ۋ^Ϗ\u0015?yp_t8><RbXJQHU\u0007uYGx\r?%\u0016l{A\u000e:CaR#\u000eӈt9m\u001cv/gsQ'y%yMNR.j2\u0002̂jWܖY\u0003̼A*\u00151\u0016E\u0002]oF\nbAD\u0005@\u0006x\u001e\">}o[W|U\u001fZрآ4p0\u0001\u0018|5?̶U\u0011݌܊\b\u000fp\u0011]\u0011\u0005{U\u0004\u0002\fp\u000bC\"sa\u0001K\"\u000e\u0005\u0006ڳV#=\u0001Dj\rM\u001flj\u001b\u001c\b\u0006zę)p_\u0011J;d^0b\u0003&.O<k\u00181p1\\y!fEmƆjӘ4&f\u0019t4ku\nSn%\u0003\"xAOm\u0016+\u0010mKOtx\u000bEI̶K\u0003\u0015y[ubH5G\u0012nJR\u000b\bE^y-`\u0014u\u0013^\u0018VQvȥH'B\u0016=Tg3\u0006P!z3Dkh]&x5W\u0017&ſnbrٶŏ>N\u0016?ʛYǝ8-\u0018lhe3+keem\u0003\f6ْx҅ph'*lm\u000b(z6*^nm_̿X\\x{,L?/#w9~M~Y:ѝ\u000f\u001eZ者&\u001cx\bϒl[I\u000f>\u001ezp-uQGΜ:kH¾Kco0VM7'4p69.\u0001]\u001d䘃\u0004Î吗\u0013\rc1\u0019֩\\zIM# )\u000f=\rг\u001ez\u0016h, 2\u000b\u0002,WJT\u000b\u0016mPg\u000b->,b^vh\r\u0002\n|;~\u000bP\u001a\nl[\u0005mx&vhWpy\u001b\"oC,\u0019Ux;\u001fⷭX4@\u0010\u0011eh\u0002\u000b΅\u000fq7X[tّцݗU\u000f֖}pq\r;uF[M\u0016$\u001ft41F\u0013F\u0000d֜3`d[jȲեs\r\u0019l}:WΆ4\u0016\t\rT&ZIIHڭ\u00011\u000b\u001a^\u001dEnTHҡ\u0012op\u0007Wpe¥+J]2WpFS+\u001cjd[fLL\u0017\u0012\u0012b\\(J\u0011\u000f4&4A\u0006>9>n\u001ch\u000e@9f\u0005\u0014T<aduFeDN\u0011AK@ɚq3d\u0015lv>\u0019u\u0017\u00151Fok'T\u001ez*\u0017N\u001c8hZ<\u0007m\u0001+v)kt\u0012{SE;\u0012$:8I!8/!_+\u0015\u0010ş'&aۙG2l;\u0011\u000b[MDYz|Z\u0018ĶH\u0011]踥z^N\u000fp\u001bxk5&\tv$\u001d+o^f^z}E\u001f_^~{Uз/Clk7[%sg3k\u0013.O?\u000b'DŔꯊenceSm\u001bRĽoQZ[[,SU\u0015\u0000\u0019\u001bmF+ޡKw\u0019\u0014rۆ$aUdQ6Y0+mf\u0018P*`h\u0001\u000e\u0003d\u001dti\\n\u0017qMt\tp؞%({z!Ӵ't'@\u0007qcKa\u0001/9\u0006ÙN\rytjGIμ~jOӣ~z$a$@\u0006X\u0010\u0016\u0000=\u0006\t\u001b\u0002o\bRchhxO2\f\u0014\u001fSa/\t\"C\u0010g\f?mch/o\\9}FT^8TTӴ&??ws$P\u0002OHEAq\\\u0017׭WtjbT`a`xA&T&\u0005q~-ߎ7)fy\u00160A\u001f\u0000fY\u001a\fWO(MQjH义dC^!7AEiZW)sǊrK&rB\u0017>N$`|;a\rKnp-\u0012\u00153ޚ\u0018Ma$@ X%R\rކw;ʶbW|\u001b̒[$cy\u0018\u0007ȕƄ18MıJ\u0005)t[/.{/<D,l5\fμ>aۉXj\"\n/7]ƍq\u0017Z\u0014&fy|\netW\n>KlDn)rl'vc;޳1s [=\u0010v['ګ?ʾ2ݫܫ3k3y!~m'\u001f\u0017w'r[{Ss?Oi6ESH|\u001ddW|\u0017v_e9\u001dp\u000e\u001aTXoؚnTnܨ\u0019ݤt\u000fQx}9\u001eMbW5ە-ve]PɶڕGҪ&{\fM\u001cw\u0011j5=.'MӛF\u0004\u0010\f>ϫ=9\u0006!a\u0018k\u0018\u0019\u0000 a\u0018E֙2,X\u0003Y$gL\u0007ųAz<HM\u0004h\u000e\u0013A\nV&\nK \u0003\u0004si4\u001e ǃ\u0000Ϙ\u001f\u0012n\u000b2\u0019F\u0002sGIxa?r!\u001f5#\u0017\u001d^Zc\u001bW\u0016淖\u0015X[xL7Ɇdhfب9#'tq]D\\Fުx\u0002?\u0018/,V \u0017}\"\u0013\tv8\u001ao\u0004U\u0002\u0013@l\u000b\u0018}\u0003\u0001zG\u0003D\"r\u0019\u0001RCrD(A\u001fJ$h\"C\u001bb%N\\E\u000e\u001cV\u0004\r\u00131\u0015\r|\u0014I.2\\Fo-\u0012\u0005-,2\t\u001bn\u0010\u0019nxRAt :\b)^&Y\u001c9+x\u0002\u0019'\u001f#O\tɸ9f͚b$-I.^\u001b_y\u0002Xj\"\u0019y\u000b[}$ö\u0013D\u0014>^T:\u000fv!p[t6f\"zjQ΀v\u0003H\u000b6|K1U\tTѶ\u0014qI2l \u0007-$r۩3}?w}&Lg\nO\u000fVh~j9\box9-QHYC{[ZZ$]R\u001fpN}pv۝m;5Ֆ[Ֆiܭ֩j-VȩjKC\"/Yv\u0014bUm\u000eu]}ԡnwƪ:NӮ갫9]NYE\u001cw\u0013'D\u0012_.\u0001\u0005ehAc{i\u001fq\u000b2\u000e\u0003> 0N\u000eC>r8\u001d\u0015L\u0016|\u0002E\"N\u001c,'A!'\u0005K͠&3p\u000eq20N\u0006\u0013Zj<\u00174N,g\u00181\u00172h\u0018\u0007r\u001e6\u0004\u0012}!h| \u0015\u0005\u0004\u0004I\u0000u\u0019 'Q\u0000=\u0011ǃL\u001e\u001bGƮV7\u0015t\u0017u\u0016[VV\bt+:&4}ө\u001e\u0015[geGE+}1L%\u0012 \u0003Ttk㺴qV\u000b1\u001e;\u0010'iEu2qLX\tbJ`3&\b\u0013mE\u0015*%Rɯy\n6\u0017@\u00139:Rg!4Y:Te\u001b \bm\u0016E,)=JK.@r޾\u001a\u001e\u0002T`\bb>r[dsz\u000b\n&lILhчE A\u0007Yy2n\u001cܖW$\u0016ʸ\u000587_Y:S\u001dne9ͩ$\u00037MV\u0013ɰ[#\u0019&<\u0010ۅ~½\u0012\u001dw2z:\u0006-,D\u000b@o7\u001aeZΆ;\u000eg2\u001cq9wgCwgg\u000bf~y\u0001\u001c\u0007&%6>1\u0010ǷM0\u000b~l\u0003Ih \u001ci\u0015\u0012ȱ40M[mr)\u000b\u0004B \u0007\t$lZv[\u000bi8\u000264Ɏvn\u0014uTF|&١I\u001fb)Fo}\u0007W*\u0018f7EEm\u0011o_~t/\u001e\u000fV|?x#J?=|D \u000eC=sSvZ-|'ׁl+\u0001-?3gkf\u0010o3\u000feΜz-s\n{8\u000b.Swfkff+q?V'LKi%hB<3\u0012FL^:!+r6y\t6UF]C٩n]э=Pa{ YeCu\u000bPQ\u0003\u001eq>ȥƺ\u0004\"a><\u0007@z\b-\u001aaj\u0006=h>\f1a\u00190P_axʭ\u001eq`GgфhWT\u0003n\u0000#\rVw\"\u0002u\u0018Nuؖʒs\u0015v\u0015jQn;Q\u001flOx-\u0013n8?e!~̠\n\u0018}ZFv]%v(md)%'$)w\u0012N\u001d\u0015rBNsH9'T\t8Y\u0007Ŭפ:\u0019AS:WCr\t.*qR\u001c-KaS\u0011r(\\\u0014flڬ&}J@]:o3xt\u001ec!\u00190r_\u000fp9/\u0000uE\"Va\"P[(dm\u0013\u0002r7+\u0001f&\u0019FC&}Z̿I-v4\\tbG\u001fN'j\u001dMTb0hKTX\u000fK\u0005&\u001e5RŮTw〷5i4n\u0006-IS?mk\u0016lYX*m~)bwmoyyϏ-..=ǇM\u0011՟I/T&\u0002֨`\\IĶcpqfݭ\u0005\"f\u000ea?=7M!erQ4\u001bE0KKh\u0002e$.v3a\u000e+yɊ$\u000bŞ%2,,y\u001dyc@EPDEj{sTn>#Ӑ1a#\r#\"B#<pE;ю086Y\u0011\u001c``Ѡ݋Aï\u0003Ϫ\u0003O_\u00137s\u001dՃ\u001eЮz\b\u0017}0'LUס'wli*kqeOIKe)v??֔/{g<)<2qm\u0019\u001fY~F\u0003\u0006`?MٛJuiNJj%!D'ŉ?(|7\u0019o\u0014ꄼ\u0002A!\u0000\u0014v$4R7U7\t+\u0012\u001a\u0015\u0006\n)]WOJy\"R'\u0017)\u0000\u0018O\u000byh7W%WQ0=ri$ɜ\u0014p\u0010r[!\r\u0007\u0016f*7n+|\u001e⭗\u000el\u0012$vq\u0012H.JD&dgL\u000ec+3dZ3Rӵj3?'~nDsyn\u001d}4\u0017;-v4Q\u0015\u0013ZfNv[N{Pv+5U\u001a4m\u0017S\u0006봠*:ňGzbۓfaX*rɽRRIh4\u001eR!|J՜)Ύ~\u0015\u001d\u0003V\u001a|%7\u0019\fdCP177\u0006\u0002\u0002K\u0012j\u0017,F\u0012j3&/H^4\u0011\u0017M\u000e3i]R,+V겍QW.\u001aТU8\u0014=vM\u0012u\t\u0001fwF<\u00043jAȥ\u0019d !vȃ{ֈa\u0003\b:lX4a\u001b\u001e(\u0004\u000f\u0019+AF7\u001f2\u001eG\u001f`p[я_\u0015|\u001d#9\fC5\u001cɭ0r\u0007]5\u000b@{#=WQ]g|\u001d/$-t}gɵ͵N3;iEhyOM,mA}C/S6*L:\u000bM)cI\t\r\"_;\fk$Z 7iMķԂ7UB\\Q.B\u0000rT\u0005\u0013G\trA\\1+G\f%ny.%KqHt.m:m:7΀y\u000b9q`<z-n \u000eT[\u0012_\u001c\u000fv\u0011\u000bx\u000b<Km]e\u0005Wg\u0017NL^|_M\u0016;h.v:mb\u0013Ŏ&bz Z/\u0007-\fNW=J\u0016vJu\u001eEQ);=\u0013G{p36RCVZ)J\u0017˥Z.{TvoGm\u001f|\u001b\u0019ƽȶ\u001dtmFs\u001e16\u0016s\u0014nFȼ\u0010\tv\u001a[ZMD`\"\u001d<k&:\"Y\u000e\u000bq\"d%!ٕl-ejn;c\u001d\u001e\u001d\r\u0007u3G~+GٛSHT?lK\u0003\rD&H\u0001j\u0010Z5d\u0003\u001eM\u0004=\u0000\u000e?\u0004b^Z@/\u0015\ntA>2ѕ\\ݘ/u̧\u0013-\u0002Ԡ\u0017]\tzu\u000f~\n9W\u0017pyᕇ=\u00114\f|H\u001dx\u001e͠G;Xhq|k\u0001g+)zsOq+cm6qY&\u0019tmڗ=3x\u000fE^u8f{\u0001G=[,\f\u001ai.XPWmtM)J]r-*rJ2Պe\u0015\u001a\u00155ڒ\n]&@$a$j(\f\u0002f @@@@@@^G\u0016ϭӑѕёіҖ\u0005Tm%P\u000f\u0017ر\u0005jA=\\mp?W\u000bUR7tV\u0007vl-A[h\u0016޽\r\u0007m }[\t\u0000i\by\u0018E\u0018X\u0016Ēl\u001d=S\"2\u0013\\m\\-͍M\u0007<\u00104Z\fZ4\u001a5\u0019ΈEQ?h\fZ4\u001a5!\u0000\u0000\u0000\u0000\u0000\u0000\u0000Sw\u001e\u0007EQ\u0012$\u001c1wBO\u001c$!!\u001cJB\b\u00028[J\u0003[z^U\u0015E\u000e9U\u0005QT\bGB]ک\u0004<32c׼|xxxf7+/tV\u0005A\ruC\u000bal(bc\n▬\u0017R|\u0010S41s#pyٱdQ3!mboLog\u0006gl3\u0019[gרy\\\u0010lޣeŽх\u000f\"b3;60\u000e%\u0011=\\OTpTVnL\u0001x@\"=`~\u000b:5VQQ\u001az^\u0005P\u0002*ZV\u000fiu\u001aZ^5h\u0019Z\u0006z-!ј@oL`6\u0019Mz$V٤c:\u0016Ф\u0003`\u000f5\u0019XMf#u!\u001dДnD8Ȁ$\u0007M\u0016㜋@\u0012\u0017hA^4%p<7\u0004f\u0012fĹh$qZй%\u0000lL\fMF\u0013\u00024!C]\u000f^r/rҿYUeN`ө\u000b__7mzyNzE+iJj$5\u001bZI{\u0011JVwU\u000e\bORw\u001aU\rouK2\u00051V\u0010Wͣ}͡\u001ec\u000f1**\u001a]AIo#61\u001b\u001b)rznAL \u001f]!\b\u001d\u001cN\u000en\u0007\u0007\u000f\u0003\u000en\u001b\u000b\u000flaᶲML&Ff\u0006H+cF\u0019R\u0006NI\u0011TBr\u001c%C[ΦA\u000eF\r\u0015a\u0017\u0001\u0002\"/R\"\u0016-ǆ$cCؐ$!),\\\u001d\u001a\u0013\u0019\u0013fEYR\u0016\\wZ\u0004\u0015Zi\u0010bk|[Oo\u000eASh鼵G?\u0005Og\n\u001eͼb\u0005/\r,\rX\u001a\u001e\u0014|w|Bv\u0018ZlA\u0016ʥ;T\u001fbA,Pi$VIǒ\tn\u000b\fX~]̟\u001afFf\u0006^ey^Y\u001f\\2tڍ\u0017_$7\\ty⩟\u0013>\u001eQ\u0007ꩼdOkcH\\\bm e}߲^|{nW\u001f\u000ba3ꗅ\u001e\u001bH{yT4Ye)gbq+o3wV\u000bXDЙ!\u000bX[\u0003\u000f⇙n\u0016K=YR$^Q\u000e!w\u001e;\u0012-0Ry0\b\u0018΅Fa'4\u0007'\nU\u0013\u0005B\bP{]\u001ao[PW\b{]J\u000b\u0016\"P\u000br\u0002\u0000,\"K5.P\u001b\n\u0011\u0012yH\u0011-D\\O!\u0005JZZׅ>ĥ*V\\*\u001f\u000eb[\f ']Dj¥\u001c+Zh$_1\u000fnӥ]3ŭl\u001aj87L6U#\u0011_\u0005a72$jSH6@\u0006#\u0011n+nѪoK3ik$r7r~['bU'XĿ0Utb%\t5f(z_<%F\u0005#@Gj:\u0003J\r\u001a\u001dZR5j\r|BM:$\u001fU@#r\u0001\u0019逜OJ+%\u0010,!TIb1c+E\nbV\tҸt\u0003uY|\u0012\u0011RoC\t\u0015b@.ʉ^\u000f-\u0000\u000b-\u0015I\b+ !ae\u0018'\u0011];3S\fkTcZ\u0017s\u000f[\"f\n\u001e|\u0016<V[WlȐ?bY\"l\n̂mPT!j1%u\u0012~D\u0011\u0007\u001f\u0015e$\u001eO`ĝXEդSt\u000fW\bW?i6\u001ff:ڧI}o\u001b}:tjۿn\\TOcԇ}z\"N\\1%\u0002v8k\bl\u001eO(D\u0017uGv-~\u00056މ\u001eSu#\u0005MCehEs\u001d.qs5Ӗ½{c\u0005f\n\u000f\f7W\"íT-)T~G\u001aN\u001a3MЙ.!k\u0011vY3\u000fn\u000bHQUc\u0015y2x73/K&\u0000cqt.\u001dF\f\u0006\u001dal)\u001bΕᔏøS>\u00062 \u000fɉ\\ńSWL!&W1\u0004{d.ywx>zcn\u0003\u00153.\u0010<٨\u0003^C6$\u000e)\n\fA G<#\u0019Ȗ\\Vj\u000eۥ$ݙf\u0015\"$l-E!\u0016_Jit6M\u001d\r\u0016\u001bFnˤJtou\t6U%9A­3NriGٔ\u0003l_Yq8\u001eQ>F\u0015EUkiM&fS\" \rD\u001avuhEz.VGQpNG;RN3\u001ai5vRM=\u001c\u0003I>\u0002S\u000e)H\u0007!~9i¥-gQ%K@\u0015F,\u0016#6Mx\u001a\u001e\u0019YGĔ07u\u0006pwu[\"WQHH \u0002\u000f\u0012p\u0010\u0002\t\t!^x/^=\\mw׶b]E<cWU\u0003T\u0010\u0014p\u001fZ\u0005]m|>\u0001f\u00033Cḟo2\u0017wm߆ȀOcvBwCwBB2\u0016jt\u0005-k\u00139\u000b:\u0005W}74uyWy3mޓncƣP\u0002?0.oV\u001fk։@UMҠ/4]:w\u0006f\bY\u000f߇\b A\tT6,\"NE*\u0002vb\u001a\u001e~\u001bow588۟\u000f]9֮1ƺ\fIzrUJS/_\u001fz>8(\u0019_/\u001f\n\rl퟿/jc7cu'meGZ󛵺'Sm;y{\u0012`ĘmI\t!BnN\u0016Z\u0010}%-&-[΅y\u0000ron\u0019x2F\u0013\tL\u0016X0oȶm\u0016!\u001d\u0016\u0006\u0015$@.\u0007-C\u0000պ\bOv\r[L\u0001m\u0018س2):\u0017N\u0002v\u0011\u0013g,ɇv\u0019\u0002\u0010/Vm\u001cf9*\u001f5?\u0017\u0007\u001c~\b;$PC\n,uH{\u0014\\H\t;pP*l!\u0003i\n*\u0013\"Ҋ.)U2n\u0002kW'+TMzV\u0012ۘ+jUĜDq^T97Xf)7b \u0018\u0007\u0013\u0004\u0010!eRs\t`\u0004V%$0{Z\u0007e\u0001jYY̓\u001a\tl\\Q\u0015㰊Q\u0011\u0000Ö+\u0019r\u0005{\u0005\u0003aVN/%RZ^,\u0015h{DX\u00026C\u001eJ\u0016\nm\t0\u0003[B]L[\u0018F*(滄6M&eױ|3ְvҒ&+R\"?M~xlxrLۼؼ\u0002>2\u0003m\u0019fm\u00140>UnP6)\u001bUѾA\u0002\u001f'_O\u000b\u0006ꨁ\u0005nB_)FiЕU9\u000ex\u0016cԕؕ30n\u001e3\u001f35ͨPz)_%WJ8oݱ壪\u0011žOD}$!O\u000f8\rn\u001b'bM\u0017mE{Ђ\u0001S\u001ecp\u0016);ܒ݌rn\u0006Z_1%RjLM:突s̀`\u000b6e[\u0003ހyk\u0001o\u001b2\u0006#Yf3\u0000C%f!ZD\u00000}`N;r.\u001c @n\u001em/\u000e\t7_6U?\u0016..-\"'(vh!8\u0017x:Vah0'g\u0004l݆\u001d̃2\f\u0007@\u001c7IZ;$Em>\u0007zm\u0000\u001e\u0014V\u0000J.;\u0011Q'V-~`\u001cd\u0016\u000b| ȶPSઞIƽi5xM*aZ\\\\ʯA:!Yݴ\u0000.AY\u0016U)s\u0012iq1ba\u0001\u001fY\"\f.\u0011%\u000bCJ]L\u0000%FO<\u0010yvJ}XS\u001a\tMq\r㨚qD\u001d~$q(.B\u0015\u000e<qP1|^b^V\"G-T=)~B\u0014濚\u0019\u0007-c\\/v1wyH-e#\u0001OO\\Q0f\u0014!74uyWy3mޓncƣґfiH3>3!\f\r>h>\u001e:k=/Zr\u0016\tT-ϟ$\fI\u0005d-\f]LS[șmE*k9tyey=uGQO]G.\u000bضk6ƛoR||e\u0017\u0013u\u00155\u0007GU\u0007#=O$\u001e\u0013~9d(z@TQ\u001fkcO.:v!@\u0012}\ne)C:ڣ\u001d\tCu\u001d\u0015[0;([Uέ \\\u0013\ts!-BZL1ȹ¬1r\u0018FN[ɭ^^7qofn\u00072ngo[\u0005\r\u0016~c\u00154&+\u0001\u0016\u001eΊ\u0011mD[\u000ej#m6i\u0013uB\u000e\u0013\tQԕ'x̟7_҇\u0002JtkW\n\u001d\u001d,\b&\u000fS|)֫\u0014_[9H(@/\u000f\u0017%\u001f{^\u0017]ғ+EltJ\u00154Q6I'z/bJ[\u0004-V=\"h2̼F3`Bm8UJRsg\u001bzŭ\r))\u001b:\u0015J):+\u0011F\u001f'+lD>A~\u0002\n-@\u0017\u0013٠ZdD\u001f0lH`aF1`ޞg0Oh\u0011\u0011m\\au!\u0015ĀW\u001fTm饐<\u0006+]B\u0003&GKD\u0014d[\u0011\u0010x\u001b%&h}\u0014ee2R\u00124ߥt~+YAE?p@\t4yfiz-~O_7\u001ew5w;6=9v<6j<xL\u001cv&֍\\-i4\u00136clM\u000fߟ$\b \t\u0003&a\u0014X>$^̉r\u0016G/Kpw_Ƴ\u001fg\u000fg\u000fc2]X&W_&UH\u000bŕ(ʊGmy_\fq?\u0019m4ɸCL!L_?mw\u001c\u0003J\n\u0004\u0010\u001ac|\u0003˹\u0018mlc\u0012\u0002z|7LԭSeIHЄ\u0006@\u001an\u0000bwnj%ӦmomZnvDU;j)>{>>?\u000e\u0003\u0007~6m7M\u001b6 =\tOO6N5\u001dnV<h>8ӢnVBδ(Z\u0014\\ε**[\u00156B\nQj]ءZjS-w\u001dzX\"V;.T Y\"%ֽĆ!\u0002䖟x\u0004d\u000e?\nP\u0000\nQ \u000eS\u0010\u0010\rga=\u00133a*GP`\u001d6dT6D\u0003P\u0010!&\u001bAM\u0016\u0001j;@\u00045&\u0013S4wB\u0001\u0012z*Hfa1\u0004AA\u000eKRL8ǽ{MV_A\u001dX\u001cr\u000b\u0012\u001dvW:U1=VM\u0003\f\u001f8\r\u001ftY?t\u000e}Ң0RuV1\u0015\f*/h\u000fT\\`*k+EcIOġ1^|-\u0003w\\N-]z!\u001bKw-kkf\u0015h$l\u0010\r\u001a\u0006%p\u001e{[/\u001c\u0006t9MFF\u0006%\u0004\u000e)橑j\u0016\u0014ۖ!^S{ X5/,.\t`E^\u0015\u0016\u0002(ŁR^+CD\u001e\t/*\"]AIY+\u0005?Q[\ng\nya)>)L'o)&qn\u000b(e/\u000e(z=QnHui\u0011Ή-+qb}J$\t\u0019́3mlX\n*pº&$w&~s\u001f\u001eNq_Ε4,Kԗ։Yƿ0|Qѽ\u0013+-\u0001-2Y}9w\u001bE\u001cTh%vb@F\u0004'4||\fõ3Gδ*f*g[\u0001\u0005\u0000J;ת;|sۣ6|j\u001dVء^\u0002P?\u0006:ՏNbDbMz7M1\u001f%7}V\u0002)g\u001c \u001cR \fЩ&\u001dҤL*Ĥ\u0000\t\u001eʀrdQjB\"E+fv\n\u001dv\bV4(N(\u0012\t\u000e\r\u001c40AS \u0003t\u001a&͕N\u0005h\\O\u0017JxɄ{ybAr-(^\u0003&\u000bKlt\u0013D\u0003:wV\r&MܬMt).0m۔q-̺\u0017\u000e+/*/\u000e\\a\u0013{j&j\tOͽ{껍cn٨[~)\u001bqG[NMdaU<l\u0013_T\u0001C*0wHo\u0007M%\u0003v^x\u001eV'|\u000bVpVFK\u000e)d\u0018%\u001ap[\u0010җɲ\u0007\u0007}`U_XǊ}\u0018pUITZvL伨\u001f{d\u001f\u0002P[\ng\nya)>)L'o)&\u0015\u0016\"\\%v\u0003B\u0000Ή-^V\fػE\u0015\r\u0002dJ~Io\u0003=i\u0018p@oS\u001fOX\r2фNr%\u001co\u0014`8BgM|\u0003{\u0000b\u000bEs1 ٣yΘ4~\u0001b{&\u0019uɧ[\u000eζ(gժ\u001e)\u001f̶ҪZP揪ԏ\u0000PZg:Ke\u0000\u0003_\"V\u0001\u001aKv\u0000@i7|亏[~r346\u0004Mr9\u0016S![Mp\n\t\u0019HKQ\"\u000fe\u0011@\u0016Ndm.Xp\n\u001dAÜrm\b/z\u0004z\u0012>1Ds@uނAaf|TO\u001b!ۥr$|v\u0013&D\u001cn\u0005,\t\u0019c9e\u00118\u0018Q\u001371q\u000b\u0018>04>qY\rn\f\u0019E׍!j^\u0000{\u0002!Փjkl8T3T=y\u001e]|-v\"n6Ho:$6Uz\u001d*fj̢fep[r=v]0\u0001\\\u0000\f\u0017\rFvXYm\u0016Vh\u00059\u0005ۖ\u001fWHU'+\u000bK\u0002\u0000\u0001$(*푖}|^\u0019\u0012ۨ\u001c\u0017\"\u0007\u0005s\u0014F\u0014R\u0018}>SNR\u0018M^(e/(F4_:&\u0007`{+K\u0015\u0011EDY|\u0013p\b\u001b\rS&\u001a9\r拀zٖ@rtP1uX\r\u0017vф9_sott;g{oX~ACմS<(k5Imv\u0003NO~w\u0011|b\u0016d]]=׆/#:.B'\u0003_\u0017.b%Xb\u001er'̒YjKtk>zK41/\u001d1?\u0000\u0000\u0014z#Ho\u00054[\u0001:\u001efBDIFdXJX\f1\\\u0006\u0010\u000ekS\u001c\b{T\u000fѦ#t\u0004.ۃ֡dzu\u0016u٨.\u0013Ae;eO]6\u00026lCjQFa̛Z0\u0005%(Π\u0004!\u0001B\u0012\u0012$d\u0002f\u0001GE\u0014\u0014u%zA\u0016E\\\u0000\u0015$\t! ȒL;_`'P5~\u0002SE~}t˩\u001cQW\u0006\u00020WD\u0001+\b\u000f}BR4\u0005`\u0010\u0003[\bѮ\u001e\u0003\u0003\u0010z\u0004NR8C\u0003Gv6:\u0005*lǚ\u0006\u001cէ\bA\n\u0013\u0015b\bjپ\u0016S\u001c]k\u0000'\u0013dŬ\u0001Rmmʊ4׆,5gd}\u000f\u0018k\u001b\u001bjf\u001aӍ)\u001d-$\\]\u0015褦rB]\u0004*_+&\bK>)+F\u0010r\u0018}XN\u001fOOeOe%n͜Z⢋\u0002*B\u0015P񶿾[.)U\\p\u001cm=T\r0i]'A\u000bU\u00153T~Jd-d3ZrfrZr*ȼ333?ZB\u0005(Ҟ$%\u0017u奚\u0012mY1y\u0017R7BwRX#\u001fb\u001a!jH<7\u0013#VrԢ\u001ei\u001fdBqu-Z*f.}\u0017ll}m\u001c6U f6xs_Ov槮`Xό\u0016bMUqCU\bk+?\u0010G7D;c\u0004xI0&ճ&v\u001a/[l/ikXjK\u001d\u000eJG\na.XM\u0006j\u0017\u0004vĦ]\u0010$\u001cM)J8\u0000q!J:[nQ\np\tS.Q-J{E^1#Iv@\u001d/2{~\tt\u000fH\u0002}x'9\u0018d+\u000fdt\u001es\u0010~E=\f_Jy׀,B\u0015d\u001eI)\u000eO\u0006S0?\u0006-E%^ؤ\u000f\u0010SyE{\u001e\u0011=t.[\u0007\u0011.q\u001ah\u0007)N;E)p!آ4aG&i\u0017\u0000\u0013JIR%I]\rv^\u0019m4LiԌ$㭚9T\u001bpb-\u000b-X\u000bw*7ʙo|rVά\\`\u0001\fuӆ)CTS;}\u001b}k}JÜ2^j^q1BT\u0013U\u0015gx\u00139\u001dx,l=󊤴Pt\u0012o{--Ţ\u0005+\u000b<\u0015<\n0\u0017|W.v1iLZ7\u0016F\u0016*Z,\u001f)!sJsjɕ>U'kɕ&_謵\u00048Zz[p>C}AƊe\u0000YV\u0000\u0017\u0014FʞA\u001d>`I1lT\f\u001b#&ըU3fՎ5[\u001a_\\5[^[⽶\u001eM\\9s|#\u001f盏\u001f\u000b^\n0<{S_\u0017݉݉.\u0001}w\u0019\u0013=\u0015obX\u000b&VZ2-YPiXd혚5eM93f^M!uH\u0016;K6I&\u0001].YI>;+vC!]KW\u001d|q\\ul%]GF撃nx\u001bny+ɓ>y\u0007F#\fʓ\u0001l+\u001fK\u0007\u0000 \u000eb\u0010(\u000e;A\u001cNl;mv;n'\u001b\u0002̀#\rAꄦ\u0002N|S\u00014\u0015,Գ\u0017:\u001ew<\u0018\f;B#CH3 \u001bw\u00026\u0000F\u0019_\u0013o\u0007~\u0000\u0003f'Od)<G\u0004Mz\b,+t6=҄[n\u0002.ĺSnjM\"W&EuB0|a?\\mBڄmX \u0010iA\u001b`Z\u000f--ik;m2׿3q\u001aoI\u0003U\u0013\u0007Ȟ@\f\u0017\u0017:ָ5eY!`\rj\u0006O\u0014'J/s\u0015eR\u0005BZ>Q#PeDt\u0004:Ȱ\u0017}W.@E\t\u000e\n͋\fڍꢮj\u0018P\u0014.\n1ˠ\u000fZrfr9J䪓JU\u0018\u000bj.>k->\\r\\}a>j\n?tRͥ\u0012%ȶEw\n#RX=mT\f\u0019!jD>7\u0011FsDB5\u0011c\u0016xq\r5m\u001a߸n\u001bթ@nm-Wl+oG3\u001fnhѯ\u000b\u0003\u0003}\u001f܏\u000e܏2\u0010{4A7w77/\u000bݞ\u001f̛oGZ\u0016AU\u00186L\u001bya=o\u0004\u001f56LDds6lގxāG\u0013\u0013\u00141Prѭq\u0012[\u0005,\t`\u0019(W<Ċ\fx\u0015?%WA\u000f%@\u0011$BZ\\Ϙ\u0010\u001eRSM5\u0019Bl %)2^\t\"$Bd\u00024C\bVH\u0004<&5G[Ԙ\u0004\u001azu2=C\u0017\th\u0011\u0000\tcPf\u001d\n\u0001HR;LRh qyr\u0003\u0015Po\u0004Y\u000fP'\rZ\u0004\u00027\u0003W\nnXV=\bej\u0019nA,;UNe\u001cp(Nb\u0001\n#6<j\u0003Ţc<H0\u000f|I\u000e8]5\u0006$@y$43\n\b$\u0011#\u0006\u001c\u000bHd2(ϻ{a\u0007쪊zꭷ{Z37\u0017:e\u001a.AC\u0007&~7\u000b&~ύc(/m\u0010\u0003{#\u0003I@R߿ok6-o~NSOOH{WU=d2\u0017\u0005EE\u0012\u0001t-:\u0012fRJz=\u0002EP=Lt\u000eA{{+\u0012~\u001d5\u001bd{W-w]\u001a;!zx\t\u0012.\u0004[#.IpkM-uµSp)Tqz\u001d\u00067qmmlj\u000et\u001c~ZN_$(\n-Yad4H\u001a0\u0004-I0DB#\u0013\u0006:>ٷl̖Mi7l9ƒ̴%\u001f\u0017Þ\u0005?F~_g1h&\u0010Ȇp\u0010\tb|9r\u0010\t\u0017#p\u0010\u0007g33ϒ~+\u0018a8:X4\u000eum-o-S5P(NHsS},\u000f\nXeE+\u001a\u001e!lDN\u0014DFDF\u001c:eЩ8r(\bh(\u0007V?q)N܀ԭ8u+a\bz%\u001eW/V7\f=\u0017/3\u0019}?w~U/2_\u0016|b'YSU_'_G \u001d^Tv\u0003A<\u0014XHtj7y\"O䩓<q\u001c9lrT:!\"D\t\nn!JSEV\u0015B\u000e&e\biaReqIv\u0002\u0010g\u0011)(m\u0016'M\"`(1\nG\u0005\u0006`K/\u0018\u0011l\u0011n\bX\u00054\u0015^\u0012\u001a'-x\u0014\u00039z#\u0011\u0011\f)\\'Q\bN1\u000b7;\\m׭\u000f ^޿fWo{X\u0004v\u001de[O;ʶn_ǿ$pkM-uµSp)7@jl{w=u[M\u00077;͐m\u0001+3WOފC\u000f/e(\u001a\u0002,^#\u0012zU\\Oq`M~14m{&v\u0019[6.D|\u00173Nކ*fO߅?+M\u0005\u0002p8\u001d\tg\"l$Fh.\u0016a\u0005D\u0010f#\\znvwڿ\u001fΌ\n2c¬Q7MQ\u001c\u0011.zڨ89Id\u0014\u00192kWfl\u0015\u0005hΦYT3\u001d}V1\u0007N\u000bT]t8\u0006@٭\u0015*\u001eg\u001cz#̑\u0017QC\u001fc_\u001d\u001e{\u0013<s͉ƆFOA\u000b\u001f~㕬^4_0>\u000e>\\t1\u001e}\u0015<;y=?\u000b\u000b> *E]K]\u0015+sJP[;.u\u0015rFBV2b#Q,\nh\u001f)yjHM@'$0^e,1\u0013[&\u0019in\u001ae\u001bFd N\u0018k\u0006I ^\"\u0017\u0003#\u0013.iK\u001aђF\u0011}\b\u0016\u0019{j\u000358m=3͊Q\t3\"Rk\u0014TT\u0011IkOG\u0000\u00077<h~c\u001dhf\u0013.m4MµsiZ_pݩY\u0014̍v7^jl]\u0017d[\bGww[wewu,n`7wRGВR\u0016%qZ\n\t\u0017횖X+\r561aO\u001aN݆Ͱf7&5Ħײ=mK3!w>/>V~\u00158|\u001d:z\u001b*A}\u001bڙ\t\u0004v\u0003d(\fRP:\u0012IG1(h\u0006r|,\u0013e\u0011,DP0\u0015\fl{Fq(Κy,o&xoTi&)+\u0002\u0019;*]us\u000e*P\u001d\u0014\tX.\u0000N\bjE\u0011\u0007\u0017(xp%lJ^<S\u0006{hвWa*9ixC?(0~ЫAXImu\b10Vע|Ӌ\u000bLS3\u0015?\u0014<\te؝T.\u0018\f!Uz\u0010:\u001fT(\u00176N\\@TA\u0015Hv5CP@ƮН46\u000eRԔ29E&;$`uk2˷&\u0014\r3n&LQ\u0016\u001f#ct\u00111iD\u0013/\u001fu\u0018FA#zO\u000b_u>+m2˵F\u0019cPzR3x\u0017\u0003\u000f\u0017\u0006;o\u001b\u001cm(Z\u000fmG\r\u001d?\u0000f\u000f\u0016Po{_ǿ$pkM-uµSp):\u001bpڍL\u001dUvӢ@ٶlmݻ{\u0005?b\u0002mAȶ*\n%Z%q4H\u0013\u001abmiƕ)SΥv\u0018V\u001d\u0015y9pOnxmS\u0001W:O\u001fl[y\u0013\u0002\u0004s\u001c۝Ph7\u0014H{\bDSH*\u001cNCŁ7\u0015\u000e_fMiy\u0018\b\u0013\bB7ͪqcQ\"j0\"  D%  ;.8&9g\u001c\u0013,#1j\u0012%\\T\\Mo0S3E0h*oկ\u000bo\u00033\u001bSZ0b{kX={6\u0018^\u0019vF\ra]\u000bJXޗ^\t\u0000\u0002\u0018Ϻ\u0007,ov|\u001d?bo\t2\rN\u000eLڀ>u6[\b!;~ȾGc/^؁rȱ\u001fvÌ\u0001M{*HEa*VBT\u000eaǻ\u001d\b\u00132\u0016{\u0010NOR\neǻ\u0018|>\u0005*\\|Npa\u0004m^7a\fOo>NI̽h2$\u001d&\u0000w\u000f\u0002Xm6Eb\u0006|m{\nuF#e,5&q0o0ox\u001b捱\f/h>\u001f5>\u001b1>E\r\u0001ڰaeа<\u0012p]\u000f=r\u0017\u000b\u0003u\u000f\u000f\u001c\u0007\u000en \u000eM{G\u0003\u001e6-NsX~fV0X[L\\D\u001bnD%Wŉxq\u0005\u0011Q9\u0011\u0011Z$m\u001aqXp5L\u0006sf3\u0019\u000ec0\np[Zo/4r/t\nU\u0012\u0010[Z\u0006aYDʊH΅缂<n;ж>з/4]V]֧_s\u0018֜\u0001}iҍ\rh^W\u0003ckg\u0011z̻\u001enNOn\fRfݛ=iǙċ\u0014\u0001:39;9{s[\b0Y\u0010۴բ\flrvf3XFB+ՉW#\u0011(f̸7n\u0004υ>kr\n2BBJkB2kCof\u0007D\u001aa\u000e\u001c7A{Vii{\r\u0016\u001clı\u0017CV<2\u001be~] wFp})\u0015-8ع\u0015HvVT\u0018G23-z\u0002;@\u001bc/h\u000b:PHcKu雹\u001bֆ&خ\u000fm!|-A1X7=i6 ]\u001f7\u0018El\u0014\f\u0017\t6\u000e\u0000+CHo\u0010|4_p\u0019\u0001=H\u0003\u0003ƆCAߘ5jr{\u001c=}zuiUw\\\u001e\u00025e\u0013R_5;P\tx19/.'cඵ< \\KkF\u001bƂa23\u000bv\u0018\u000bQhUs/j\u0004\\s9(!\fbD\\JYrV\u001c9'*pZ}]ۂct\rMĶߴ견غ\u0007\u0016Gg>\u00101+\u0006ȟ{D\u001bwbCq9bra~٪V1^ת~!\"\u000eI_\r_Vm찌\u001bS\u0012\t%\u0019\u0013\t\u0019\u0011\"2\u0002\bqXp5L\u0006sf3\u0019\u000ec0\n$\u001a\u0002\u0005zĤVސFղb@ŹdBT\u00128׮I\u0006ndZӯ\rŶoݿ86\u0019矶`0_\u0010>9llmv6ٛ\u001bm=s3zaPF\u00025\u001c%;P\u000e˹u䔂ɉʰ~%ㆱj\fn̂g2\u001dƂa\u0014j%kzj%ALE<O9#eێK.+X@2+~嗔nk4=Ե=2u.ZvÊ\u0016[E?{\u001fvw)T\"^?D\u0002*\u001f%E\ti\u0010QE\u0010\u0017\u0016\u000b>8Ei\\|BA\u0011\u0017H\"rd4H@CPP8)\u0004Gs]6ץ:\u0019@\u0005P9H9S\u000f\u001aH^>*>Q\"\u0000\u001aD|q%KGԥQRorf\u0006-2ܻkw{;7;ц\n\u0002e*N\u001d$t\u001d1UG$D\u001cVND~-ㆱj\fn̂g2\u001dƂa\u0014\n\u0012HV\u0003aI.\r\t.N\u0001h*X\u0001iI\u001f[\u0016%qe[r\u001fv\u0000>\u0002dP2\u001a\u0015nWZ\u001eG- >\u0011!(\u000em1!CCh\u000fs\u0003=\u001fZ\tV}T\u0016_h_vvrDc?\\).\u0013\u000fVNr\u0014\u0004Gu*-\u0007M\u0012\u0001\u00163\b|?w;ܵuߵtΛ~ЩZk#\rI%?X\rTg6\u0016[J2 br_\ta,\u001a&9\fnj\u0018\u0005\u0012[)\tNHi!)u\u000b/(V?q.Qɚ\u0006XUPAi-AȪ{=\"\u001fO\tyV\"^(\u0013TCR6OcՒ\u0002\n$\b퉐fǠ\u0014r@\u0017xr$\"\u0017Y[\u0011^$8\u0006xH>\n! 8S\"'8W\u0004B\u001eTm\u0002D!Hn\u001eϥ6dhcc\u0019Z\u0012XsU^\u0014R@\r;\\[P\u0012SČH(ȸ+Ȩ?3\u0002~0\u0016\\\rYpL\u0006Xp5\u00024I\b𖗂z^\u0007L\u0015k\u0006-󠷑ˬki;\u0016_QR*\n*Of?T\u001ciTV+=0;?-\u0019ʳ\u0013pEWmA-\u0015\u0002ub|\u0015m?\"_m?'<\u0014 8*\u0001Imz~\u0004D~`\r9\n%wO\u001b\u001d!\u0003sμ1`/\u001e\t\t77Mn.\u0004HHn\u001ej\u0010\b!\u000fnneEE]j\u001ftsE/tQVwf\u001e\u001b\u001cp$\u001f髣\u001f\u000erG3zX`۵/\u001c\\_*\u0017w*cl\u0010\u001eOeL\tEMSj@T~\u000fIvl|5,Ƿ3ճ\u001c\u000e0\u0015.H\u0013\u000frz>$7M1\"Y\u0011/$^\u0016\u0012/&\u0012qT?]o\u00134-\nٶE[e&niEbV~Ϸj-\u0018:˝$%%\u0017\u0006'+pJzN\u001a|'Zgt\u0016ɽB*Ii\u0013g\u001d\"\u0012\u001e$Nj\u001a x\u0012\tTOJ_/+p\u001d0o|y_/\u0017_\u001bvm⩣=\u001eOe\u001fm,%5,-j\u0018`[/!nv6za6\u001a.S؎B{\u001dudPlE8Km+F<\u0013=r\"|95\u000b-O6\u0016M$\u0018mC؇Qp9^+BA\u0005wTt\u001cjTp\u001a\u001d\u000b\rJ\t\runȒ~iR\t\u0002ɒEwR攲.[\u001a\u000e5\u001f\u001a:A}Ciu}y>\u0012J;-WFH:X\u001fm;29!\u0017yc7\bvO\n>n,}\u0016_9\\*?.,ykZ|2ݙ\u0016]ۢm?Wvl|5,Ƿ3ճ\u001c\u000e0eMz\u001b\u0002\u0002lo5\u001c_ήJ\u0015ϾLHJ\u001ayUJ\u000eg\u0014\u0010ɐ\u0004\u0003\u0001l\u000fI d\u000fI\u001bVJC\u0013`6B\u001fW)ʶ{H;c{\u0007obRuLZ%V;l\u0013\nWj\u0000ޏ\u0013\u0003;7\u001a`\u0011rn\u0004um媎`[,@\u0005)\u0016<G%\u0010oٸ\u0013\\\u0002o/\u001e\\=RmＵ[ܲ-CzTn\u0017{4)5\fn\u00140\u001b_\r\fm|,Ƿl|5L\u0005}8?6z_KUF6\u0004\u0018Ftm\u000b\u0005ޢ:U\u0000[`zʆa\u000bR}-P.l\u0007Qm@6@!eL_\u001eٞ\u001dL\u001f\u001c\u0000,u4<S)ggtm\u0014lrZ=\u000bU\u0004>\u0001{j\u0017`k\u0011a\u0000Ю힮mqUCmBj\u001c>cݰ=\u0014K]\u0005ז\u000eZܿ<۸X~6[)瞖Ӣ]\u0014J⾅[\u0012-=ѩ_C\u00120\u001b_\r\fm|,Ƿl|5L`,Mm:I\u0004ҊU -\u0016]E5\u001c['[$~PL~W\u001cyc\u0003VT\fUU\u00025`).iC\u001f\"\u0002\u0001D2<Aڱ^\u001dmZlW&\u0007~5=\u001d1u.5\u001e[JͭJS:\u0000pI2Գ3\u0005\r푨/+p0x\rL)+\t\u0003ձHE,pqǶ!F}]\u000b?q͵\u000b//5\u000bJ~˒ִ[\u0012\u00016nZ\b`m\u001bfa9v<~6Ց[rb\rW\u001eoQ̃\u0006J|c\u0002}EU4\u0002azEa\u0010_\u0018_a@\u0018\t[\u001eo;)w\bt-\u0018hdd\u0012`6vnB\u001f\u0006W!'Gfr\u0011³sHhDi\u000f;ރ\u0001>N&ΔU5\u0005\r3؁agZ\u000e DO\rU[m\u0015WW5k{Ķn\u0019V1cM[j:\u0016ڳS$~a6\u001a\u0019YojA.6M\u0014\u0007̮ U\u0011T\u001b_\u0003պ\u0001{jɇѷ=x\u000bH%S\u001eVmm\u0014iq 0fCɐ\u001bRl?\u001dm?=OX-çj\u0000_=\u000f-|.OR\u000f\rz\u0013W\\b-m#;ԫzysoۨcs!Rr~u\u001a\u001ai\nwQ/}u|R}NY!>)\nۆд\u0016zn㦍`8\u000bH\u001bfa9v;Ȇ+R\fZlb:TǓi\u0019\u001e*dS\u0014\u0004y ۣ/z)L\u0004i#Tt16 tm@Evq*\u0011*\u0004t\u000e\u0003*L˭ap?*y=δl;s\u0004{S\"\u0019G\u0010l\u000bb0.\u00149\\/\u001f\u0019˓126RVND\u001b$ϿZ|lbywSm[\u0018l\u0010\u001a6w\u0010\u0016ڳS$~a6\u001a\u0019Yoj6\u0004`օZ\u0017k8Am%qGM>̏Le\u0007esb\"61V\u0002^J`\u001b\\[t\u0015\u001dl_\u0006\u0007[}>^~;:5\\\u001bW]\u0015y/@kx>mky5d[O~ێWz\u001bۗ}>:[E\u0016\u001c\u000fUrȹ\u0000ՋS\u001aV^wO\u0000lUC,(4\u0018\u001c\"B\u0019$\t_\u001a\u0017˕N5mGEtv\u0014ԶaS$~a6\u001a\u0019Yoj\n`!'V(lϮ؊\u0016H\u0016Da\u0004G\u001e\u0015;TȤ\u0000&\tV9,\u0002\u0011m6\u0017]˶Y\u0013eTv\u0019BDs\u0001\u0014 H4Y\u0006BA_p=У6\u0006gASj;lK~4\f\u0001\u001cDĶive8gv\u000eE<̃7A\u0007\u000etx)&>i7\u001e\u0016hKI#t\u001f>OVR[ȟ5*).H]\u0002[\u0014\u0000IuQ=C\u001bj7ں$$BZH=k\roըv|?ކn@l;aWmՙ-0cb[m\u0017!׍шNc\u001799\u001da\u0011*_?$%=Ix\nZ/z\u000f|&}ͣqp~-mm\f\"E\u001e~Jx[26QΘ=+l9coRn\u001bÆvAm{*\u000e1ۺ\u0016\u0016d9\u0010+V\u0003+|aD\u001aV\u0005\u0016ۛn\u0005{aڶ\u0014r5j8H,oqpu%ضY>ÇthWȶ\fk\u000b\u0007m\u0010`\u0017!׍`\u0003\u0000\u0000\u0000\u0000\u0000o\u001b\u001d񿡖D\u0012\u001f咔%v([\u0014ǖ8NXL\u0019'm\u0014=\u0016\u0013r*\u0010PCE\u000b^rj/\u0005^}.KJ\n\u00018\u0017,Myǻwm\u0017&Fsb:&FU-i\u0011iKz$u[Vw>\u001c\u000fٟ[:rڪּl$;z4CX:XT\\Y\r_4\nY&-D\n6Ѫ:К^#אBK+\u0005-J\u001bUzTժ\u000e\r0eqЎpb\\skD~V\u0019$[m;Hjy\u0017I\u001d]咂\u0017\u0016iv,&hRI+\r\u0002hAxҳWbo)(ڥsG93[\u001bB\u0012\u001bn\u001391MtM\u001ej;[>l\u001f+;ۣ̎5/?uĶ\u0003\u001c4\nf\u001c\u001d\u0006y[֨m;M9v\u0004c\u00186Q>`bX\u0013\u0007.%4Cޫ\u001a`[s(\rC\u000e\u0007Uj[-@w\u001bs.~I\u001a|uh^\n\u001b \u0017\u0002\u000evs\u0013N;h[fy\u001bؖog\u001f\u001f4_Z֫\u000e)-_8I[\u001bB\u0012\u001bn\u001391MtM\u000fK?\u0000+yNo;̎3O\u0001:o\u001foB\u0002lc\u001d\u0001[u\u0017mYci*Q\u001d\u0019ב%f`ۚ\u0019)\u001bjKj[7Ͷc+^\u0016|lBZXmX>u\tyi]\bI6\u0010n\u0004xDxڶ%\u0015mr~t\u0003l[9z\u0011lk\u0014򥫜;+l=%\u001e7&Fsb:\u0013\u0018=ωp\u0018\rW} y$OAm\u0005`;N\u0013ҁ}a\u000e\u0017O[2x}j\u0016V)u\u001cm:l=F=\u001b@It\u001d\u000e[ي1T_5\u0012wzFRC)8\u0004\u001bc(\u001dm1W'`\u000bRضc$n3b^3Q&\u0012&|\u0014#|F\u0019K\u000e\r\u0004o%=\u0002y\f\u000bl%?f!\u000bFnNmS\u000bu\u0013;h[m'?l\u000e:l\u0014_-\u000f\n\u0004=s3[\u001bB\u0012\u001bn\u001391MtM\u001e\u0012n\u0011ۂj]ס\u0003#̾\u001b\u000b[SV\u0018l5\u0014g\bl;laKlmk%6\u0015=;h+v\u001c\u0003\u0004,\u0004wTʌm\u001a-dܶ1i845\u0002[\u0014D\u001a&!u\u0007o\u0000[\u001b|B\u0019me>S)dZE]&]\t1&Pw\u001dHWS\u001eQ[\u001a|(ضt7$\u001e7&Fsb:\u0013\u0018=ωp\u0018\rW=\"V5\u0002[5e虧33\u001d͟差n[۫\u00161kh[#q(V\n۱1˨v9Y\u001d\f\u000b_.ZZjgۅMD\u001dA\u000e\u001cVҥ\u0013hmSkU*\\jXB0\\Թ\u001erI\u0016+0ou[;mpGN\u0014_tm먽Fa%8eGȷ~OHqmb4<'3\u000epc--v\u000f`90f?r/kszXAuPDa\u001bWmBnٳmK-2g&Ͱj!\u001cy\u0016U<Z#\u0016\u001fn.ZRףh]\u001e'v=\u001c jJeiQf\"\u0013\\B\u0003i7n^`\u0018R\u0012⽷\t\u0011jm*QmPc\u001aضX7q.LP.o\fo\u0007m?sw]א\u000e{-Q.\\UnƟhxNLgb\u001391\u001dn\u0013-yj[\u00063{\u001e¶Ű5\u001fWri[~_Fl[\u0003\u0002l\u0003\u0002lul;\u001elQ_\u0006\u0001Tl[vm\u0003b6FښRf=+e$\u001b˭-j\u0012\b\t7d\u0016}\fKj[(\u0015!\\\u001f\u0013y#\u0006{SR\u000b\u001bѮ\u0016ֈmqL%۵\u001eW0\r^7\u0014`AުE'f[\u0001/ߜo:oվ\u001d5^=\u000f[ҩEG\u001bB\u0012\u001bn\u001391MtM\u001eS;ZufWˀm\u0018g33{0o.\u001dsWYm5im}غcVcaKm\u000b%,\u000fQ-\u001aZ&ųC0\u001bs[\u00056\f}cI61mrb\u001b=ayk28ȥ=>i=j\u001er}\u0012F50rIܶ٘mG6ѹؖE\u0018Mm;ɶIwf\t`{T/\u001c7\u000b|᪗\u001do\tI<nMt&61z\u001361\u001aUwUPmf\u001fe虧\u0000[cy9qeh1joUWT\u0002lQ\bDvư-`m`V`j\u0018k*le\\V|\u0014س\u001c5\n\u00006q\"{Al{?&\u0014&-b\u001b\u0017mr(~bR\u0006<ھmmH[&΍\u0016v>\u0001\u0001oa.c\twl\u000eۘm\u0019ގg}l[Y\u0002\u001e=-/\u001do\tI<nMt&61z\u001361\u001a\u00023Zf\u000fa\u001e\u0018\u00033ta(^:OWЗ/m\u000bsmm\u0007a;mcxU[oJܶM^\rD1+\u0001\u001c߳NYX5.x7 `\u001f\fmv\u0017n\u00161Ź\fT\b{\u0018̢DẁsMƪC\u001aZ\u0003ddJ<!\u0017\u001bŰ;`PZ\u0015#y\u001bnnۛ{齻}\u0017\u001d7Kz\u0001:jOv\n~O\r&Fsb:&FUJf\u000fv\u0006`\u000b=3f[OyKr͠Wyl5l;J!l\u001eo#\u001dP-\u001cڨT\u00017!SϺĳ4\u0017+&`V\u000bI˪6x9\u0006u\u0005_jcѳ}X\u0017\u0018]\b{9\f`۵`X:!-r~m\u0001\u001c\u0014u(wJ6mK(#)i&ΰ9\u001dI& 7\u0001\u0006l닾\u0018\u0006dЏs!EN\u0007\u0001 \u000eC\u001328\u001ay5N\u0007/ifQ\u001fk:[\\Q7q.l\u000e\\1t͌m\u0017Ҽ]*];\u0019ꞡ6e[<>\u0016=\u0004lk1N(AşFhDNNgf\u001799\u001da\u0011uou\u000bvә\u0016\u001b-\u000fZH3_o\u0007aʶ\u000bRm\u00161϶\u0019l1\u001bclo\u0018@=h늯U(\u001fWmgMYXY\u000bz/&}:`1>[32\u000e=|t\u0013Nb/\f`YkJ\u0003 `!Zib\u001acCk͛+V޳N\u001bRŀEu2mn\u001fg\u0004vygm_\\\f\u000fAӜmV\u001eT\u000e;n86?#׍ш&G/rr:&G#Tśva)l::QP{\u0016\u001bV7\u0003ہ+㶅!؂\u0002k̶\u0014\u001feL][ojJ\u0001ԦA\n\u0001ƎF<\u000bSŞ\rL\u0012@\u0019S6cU \u0011U0Yv\u0003ۆE\u0000[P\u001f\u001dW\u0017ahQZj-\u000ef\u001a35\u001b&k3϶&\u0007[ζeד&vO\u0013@γΝO˵pkսfe\u0007߮>\rH?/$_7&G#rr:3\u001c\b\u001cP\u001b\u0017os\u001b¦;wQ|\u000f}(^ lO5ζm\u0003\u0013vm-f_W|\u0002]mJP\u00060)\u001am`T1i\u00025A1\u0005 l\u001eUmʶء\u0019ގi7⎹ףE\u0007\u0016vbE\u000bf\"`(M]\u001c-qn\tmC&YbM.&5&j59Ou\bP:\u0016\u0013\u0002pK\u0017XSy[\\mXGl=ն<۾Z\u001dV\u001eEξ6wm\u000fꓮϕ|\b\u001clr\"'#lr4BuӚe\u0017@Na^jR~VW\u0003d`\u001b9ſ^l[̷]\b\u001cۚ8pKۨ9/Ӏ8\u001aflꩨs[j\u0019\u0016쇛\u0015$\u001ah(e[=\u00163\u0016\u0007Y%m<%\u000fL\u0005l;m륜乼mK.ۜ.\u0006ۧȵ98Zi2̎]D!\u0014^\u0006p\u001d8zkt\u001b\u000fT勍\u0006-C`\u0019٧\nv\u00166\u0013lNF+-d~Tv[^[;\nsHu#lr4\"'3ы\b-\u001b)ܩ\u0017\u001b\u0007^Qr\u001ck/Kہ~av\fa6`8r\u0005܃a\u0013\u0012\nb1=GIꥎ\u0006X0ۂ\bO,H\u0018*\u00041-\u0007[Tl86ij\u000fK\u001d\u0013ɱ\u000b\u0017\tmوLvU\u001a֣\u001fytR=]S(Uj[*\\'^)c1p\u0019]MV;M0\u0002n}j\u001df[*\u0004:V-mK-V\n㼅E}~n:w\u0015uȞ\to<Ex\u0004NmֶF5׶~ڶo~{v\u001c\nxӬ']g\u0017F\u001ba\u001199M^tMFns\u001b\u0010-pQY.?/zKƛ~dsn]˫5[\f[j[6tba\u0006\u001baH8\nR\u001eKl[MT1o㤔mCR񂝦=\u001bO.!GLj\u0003%2MlakSr\u001fŒKN=\u0003\u000fG^\b?|\u0004ۇ٬nbXļd=NJ;%sL&[3\u0006h\u0011ooi\n\u001d\u001e\"b\u0014\u0011o/ʤ:\u0004`\u0003\u000f4TNmAaKxm7k[y\u0017c\u0017vYk*-z\u001cKL׍ш&G/rr:&G#Tm\u001dpQ|8Ь<Wƛk\u001f6׾k[_Rjz\u001bIKm\nG\r\u0014l\u0019\u001e9̦b\u001aQ :\u001amض\u0016QކضYBF܏)o\u0019ly(`yƙ#T<󶽴hC\u0012b\t]='-YĪ-^v;{\u0014a/.⭗ wճ\u0003\u0017b6DI!\b\\\n[t%glk$;\u0004FHN.-mǄ2D\u0003u4V+\u000em\u0002m颧\u0014[rZZQJVeŷdLm\"܏m-Ƕw\u000fnK\u0015u4?#׍ш&G/rr:&G#TM(_,=\\</zK~7\u001bWUb\u0012A\u0002۶4\u0005*$$Y\u0016d\u000bB\n\f3#<b\u00023\"BlNᭁ<\u000bm\u000b\"\u0014BWB\"\\[\u001eqO/\u001e3,\u001f٤9X\u0000v1\u0011h:gMUkss;#z\r\u000bvf-ت<f4f\u00119y)i9h=\u0005d\u001d\u000ei\u0006\u001bj\u001d\n\u0017+Z\u00199P\u0017k7\u0011\u00146\tmض5սfuʣN84?#׍ш&G/rr:&G#T\u001dxo`|T#<\u0019XG\u001f.Ýkۖ^]VW\u0004Z\u00058%\u0001@f1N^ :TN.o4ulf\u0015DEm!oc7,m6vtDغ\u001clm=J\u001eH\u0016#A9EN\u001e/Y;loxO0A=E\u0007\u001cEU\u000bj\u0000ѕ\"$euG&DN\u0017.\u0012\u0013۲\bo\u001cxe\u0002娛$թs\u0011u\u0001W##x;n ϶>gw\u001f\u001dm|uU\u0005=\nsHu#lr4\"'3ы\bՖ[ت\u0017/\u001f.tz`_~?^w~ض\\m\u000b`\u000bޛUP`\u0001ϪFD\u0014Վٖy \u001d֞9ȁ\r\u001d\rږO\u001c\u001dqy?fgzf\u0017X9;\u0003$,\u000b[p\u001c\u0013*\u0006gرqk\f8P_?oA9̱`;\u0011~}\u001e=s\r\u001a}mmٜmhf4\u0006)بgLT\u001ef4\\c_\u001ag[c}\u001a\u0004Z^\u0013V\u001b\"5=2bft.LZ\t 7mO^X\u0016=m\u0006z`b&K<\u000bWڵ'm͜\u001a\u000bUHZc+ڶrp9]V\u0017\u000bжɅ|bQ9+m]׍шN&G/rr:&G#Tod^Vԥ!ʰq\u001dv\u0004|17;S̶:mKRR%-Yԓ%=\b\u0000| \u0004lpy2Rպ\u000f\u001b\u0016vo[e8\u0002\u000f=0z\rHПx\u000b\"[i0c>`A3V$H6t\ff\fj^cmgX8^Y|H\u0000`m\u001f\u0019fuj[\\l[6!̢յT7r\u0015=f\u0016r\fr#ڕKvtU[E!6X\u00168ۮ\u001cDE-s.敥<-mUv\u001ba\u001199M^tMF2;{;z|ޫW\u0000_󍿞x\u001a\u001f͌O7n̈́m[ԔA\rB\u0018\u0010\u0011V-\u001e-Dd\u0013\u0012Қ'\\},-&\u0000iCa:jqH\u001elu*-~ϡ HנXtUmzLFZـm\rB.n/(S\u001b\u000bW*Yxjqv*\u000f[5[\u0010.\u0007ٱp\u0019;\\XYO\u0006`\u001buÇ%\f-=4tYtE;UP o\u0017\u000b@dA9cKnSu#lr4\"'Ӷы\b՛=;v.v\u0006\u001a׼\u000f|1׸{|lc}f|uzbu:ƶU]qdm\u0011lXFx[\r\u0016Z@m\u0016b/c\u0003߶t\u001d-T\u001b\u0014.\"t3K[\u001ciX7+ZޙM6!C\u000e\u0011Q\u0019\u0013\u0016\u0019\u0016>e\u001b\"\\LZ\u001e!CS-9Dm\u000b\bRiW\u0016 p6G\u0005*-@\u0012\u001aJ\u000bv\rtwB\u0004ymo\u001cLR^9l\u000b׷˩&׍шN&G/rr:&G#T?YnU2d,\u000f:|/'~s\u0011dԶEl[DB8Fa\u001b\n\u001a6\u00189t\bu[Wl\u000b`WŶ\u0007V+C<kD<K7y-jtOz_vKn\u001elqzC\rfZ^B\r\u0004k\u0019\\l\f-\u0002/-5/Si\u0010I<[4S9AK6\u0004[7M\u001f\u0018w\u001b@\fE.=dέ\u0010\nnjږ6h\u001bH߅TDInsu#lr4\"'Ӷы\bO:\u0017\u0006v˃՚y}/`4\u001bwfצ\u001a\u000flBB9\u001a)ɪ\u0013ۖqf\u000bV5µ1o\u0002p\u0003En\u0000I#Զ_\u0018ղ x\u0006\tl0\u0002[nI$Kʑ֨\u0010Zh\r@\u0015\"j>lTHUZ\u0007i \u0010Ñ6js\u001b\u0019\u0012.un+׽\u001c-\u0007'ʡ'^ɾ꧊B{\b,m)\u001169\u001aiENNGh\nv}ѯ\f\u0019׆:|>\u001dls}\tm:;T3ζJH9\u0000C\u0012)lKIs{]+\u0012\to-u@*\nJԳjȶwRGgt`x0&;/;︗qx|ů~`F*ɺ\u0015{MR^Wyv=\u0006\u001fFN\nmk`Ң\rIًm\u0007\u001a`\u0015\u0006[d[F'6Q}\u0002յ\u0012\u0007[\u0007`\u0000fC\r>S\u000e{JKl\u000bUԶ!nen\u001e}r;ًqZ*(y\u0014mQv\u001ba\u001199M^tMF~u^\u001e4kr\rr4_\u001f33>XjMOLB6\u0005m[4m]L\u0003'm\u001co}Wzּ\u001a%z+]0\u0000Y>łִK7\u000fj\u0007C\u0007É$\u001e\u001e_K۳^\u0016K%\u0014\u0005K6\\6tgƬѓ&I6C}P\u0006\tFŒegpyj>`mKRgTۖKh`\u0004aۦusS6@Ķmd\u0010\u0001/rj\\,\u0012ۦ\u0016KsoFhDNNm\u001799\u001da\u0011S~i\bֺ>l}~Oo}:x>\\E\u000f?9qma\u000ea&<m=r\u0010,b:AVcl\u000b\tlD5SR!ղ\rŬ\u0013+\\FZx?g\u000f$\u001em\u001c8W#Nvl4:ps;\u001em;[;4R=\u001b\u0003E\u0000ýFKf6;\u0019Jm\u001d \u00170RR\r]\u001d\u0016V\u0018y\r\u0014>Cm[6Պ\u0006Y%n%p\u000f4\bʓ\b7\u0016\u000e\u0012П\u001eΜ\f\u0018~-ٓExKl̶ܶ#\u000fm_<\fUS\bɓ\u0005ۢ6%_7&G#rr:m\u001c\b\u001cP\\ʐyf/|>7vO5nO7ohbmzFm[bA\u000e\"G<m)xzkw\u0018QmU,#\u0001\u0002=\u0002y\u000b=e\u00161S-`EB}C\u001d\u001bG:\u001e\u001d\u001f커\u0017`\u001bG_'\u0011x';\u001eM\"n4\u0005K\u0002\nm\u0015H@+~,ߠ\u0018\u001er]cbLsp3vm\u0016M\u000eORZ\u000bJ,Q[6\u0006O&-\ryKl[l囍=WZ\u0017ltQ]**\u000byezm|\b\u001cmr\"'#lr4BW3~4\rq\u0000OϠ\u0010\r%\rm\r) lT.\u0013\u0005\t!1 ^\u0012\tQ\u0013TF \u0011H\f/4|\u0017]H|9֎m$d'yڮ]Y_Hx!\u001dzg+>\u0011Yד\u0003o'f~U޶a\u001bĐTaTk-S\u0012jzۺ\nrض,~[h#\u0016v%eQbl:8d\u00118\u001bS\u001eb\\;ٽQ]E\fm\u0001J\r7\u0015_x\u000b,u;KrUq\u0007lyjq4\n[\u0012\u0005o\u0003n\"x)µ\u0017ˢjۀHH[\u000bu辋7n񀗖UҠι`\tK>\u0003\u000fF`||=,p-ugve\u001dl\nlz\u001c\u001fHܢdփpO_%\u001bӆVcv6z3cjL%\u001cٶas8}w{:!\u0019HD\u0001kxΝʶ\u0004d[\bζ\u0007V;r\u00007\u0014g\u000bCХlh[\u0019l[_\u0003E3iSmk\f\u0000ʟ'1FNg\u0018$VY0lےlX2\u0011&7Rl6KZQ&lv\\\u0003Z\u000ew,ܪ\u0007\n=%ض[$_V\f%sKW8筚FASm!h'\t\u0016c-50(}޶Pɵ8m\u001e\u0007\u0007%\u0010*vu82(y'A6n\u0011`-y\u001f\n}ݘ6\u001a3S՛9\u001dӆVc<m\u0017]hX\u0010܊LG?OE7ѵxt#޷{3\u001e8}e{.m>qmA\n`[\u0005֯m%\u0003ڠ\u0016۪\u0001Y\u0001\rm\u000btr1le\u0001!W6N9F\"Վ3@Z\u0004#L\u0014d df4ĚKYq6\u000b\u001dc\u0011o\u0007\u0019mv\u0014\r\u001fZG!9'Vq\u000bF̖N\u0005\u001a<n\u0006\u0003(\u000edD[\u00184ۂ\u0016aDm\u0017ܙ7,Z5\r[[޶昶}=\u001cZ\u001dB}^R$~\r[՝\u001fJB_7\r̡Tmhf\u000em\u0014\u000b\u0000\u0000\u0000\u0000\u0000o\u0013\u001dqu<&,0v\b)c!!N\u001cr\u0011\u0010Y'$\u0010\u0001\u0002te\r,\"B\u0012\"pM\n\\Z\u000bU/}ԗSՇE*s\\23v V0RFjȶe}^kuz\u001frVO\u0012\u00153tGd*^=\u0011֌ko$bjkkY??ZQ\u0012U|N%/-\u001e\u0016#Xh\u000b|\f\u001e8\u0018u\t\u000fRNxe;<sCmm\n6P\u00054]6x\u0014?\u000f Ϲ7q\u0006TlLE\t\u0011όXɼt\u0001\u001a\u001e&>\u0012$0bL\"FCxSFpMy\u0017m](+_E\u0017\rUBs3Eʀ/\u001c+\t4Ө0-\f0w\u001eߖvš1\u001e43P\"8\u001e'qE\t[vV\u0000\u000f:]͠x\r33(éF(жa\nڹ:;R~j}϶\u0014F,]돏FGvҗj]\b\u0017\r9Om}RGo>\u0017h6}5ZNΒM_ӷh/\nz\u001e&+WNT7\u0018Gb\u0013hkVA\u001e?>Ԫ-mim\u0011oF\u0015ZTHD[\u0019\u0004\"I\u0015<5I+-z\u0012'\u001chlX\bT\u0001m\u001dxk\u000fʆ-lsm5$$\u000e#{&\u0004YY37h\\\rl\u0007\u001d&#$w\u0010Kr]$L!oIv\u0017\u001cTw\u0007Mk%V,B;,T쪔UZMZZEJ1T|\b)v\u000b\u0005[䂰2Ҋ\u0003ަR(V([b\u0015T+6Kȶ~\u0017ʶ\"m{ R=\u0011eӴ=K$Frvl굜\u001dͦFS+s?ݷiWd:\u0019^[}eWꞪіTgLߞG۟\u001dKl`e[\u001av̶Ҷ**`2\u0002oYu\u000f &[C\u001caB\u0014-m-pwV\u0003f`\u0013\u0006.#\fF\u0005^\u0011\u000b`4I#Jr\u0003˸\u0013˸~#w7\r\u0006H\u00100N\u0014m-\u001ay.\u001a/\u001aKl\n-⭄Y\\[TF.-ƕ|JΩ֡\u0012Z\u001eqiWjlslm\u000edݻ-6\u001dQ4i~g;AB~/\u0012Ilj%z-oGTݑǝ{ɚ걶xv\"\u0011Z3\u00114{с>QA-ې[ɶjf\t\u0017a\u0016_1le'E0*zD0l[\u0018a\n6v\rHm7$i\u0004Fp\fF܄\u00055f\u0006ז\fDn\u0000\u0012$h#8\t6^m1\"V\u0013J\"UE\u001bml!\b]s+\u0016|8\u0012\u0019dۜ.\u001cD\u0011l\u0003mU0X3{3ūd[jųqggmɶ\u001f\rԬc͹m11\u001fuG\u001d}O?7M_ӷdWh6}5YwtGv{t2^3\u001aMlHi7g{\u0017e-ض\u0001\u0011*i#<=+[\twxVH\u0001N lABҺY L2&H6IHc\u0004:f\u0001f2s_\u001b\u0016nԒdF\u000fu II\u0010'20\u0007\\d0چm,~*\u0004Q\u001f0{J\u0007\u000e\u001f^ lf\u001f\".9:rVbr\u0017[g\u000e[e`C岨+>t^-?AѶx@\u000bh'l\bۅضy[r}JƋUk*\n0~jGm\u001en4\u001a-ogɦ^lj4Oxd,^;n~\\Q_쁖?\u0016V&mPPEP\f7TH }9.I\u0012:yBۖBlp\n\u0006ŤYm31+eZ2Ӧ̌oVn\r2׬A\u0013wt\u00198m\u0004灯a+\u0018b槶\u0013]DH\u0012\u0015%X5ab-\u001d$2߼x)\u0003`^r޾zp\u00006m[ī!\u0018!9us \u001b\u0005_\u001fP\"Wם߳JJ\u0018#\u0007\u0015vmn=bW\u001am7T\u0015|4M\rm}qݶ+Frvl굜\u001dͦFS=鮙n6ۢmc؍[\u001d\r\u000fz<=\u0012r83=\u001f<-|86r\u0013fYgȫ|\bI\u0016*(\nW[,l\u000b[O\u0015@-T6\u001bl'~b\u0004\\\u0011LYCS\t{h=3\u0007;j|pm9\u0018%+\u0018\u0016i\u001eF\u0010\u0006\"]G,\u0004\u0015j*\u0012<(lԑCT<9o\u001b\u0010Pe\bm+\u001c^t\r)\u0010Ϫ1ID&ۙ{\u00125f\u0019oA<zN\u001bNmۍ\u0002xͶm3m=}5rdJ2ש\u001d\u0004m)K$Frvl굜\u001dͦFS>HFoGo#cm˻buw:\u001b\u001fo~طũ~E\u0016VEe$5(Uȼ37CB4\ryEUu\u0007\u0004\u001c!\u000b(m*\u0018l\u0017\tzA# >2?\u000bṢ̴̓g᦬M+rVp\nX\u00053#6\u001bMD(/BcgVD+?Td=*^+~S\u001e$*\u0000Uz*\u00000\\\u00040\u00033\u0017\u001d\b*s\u0007TW\u0018E\f\u000f[\u0010\u001f\u0003\u0007\u0015\u0007]Uêk\u001bV볭miMig\u0017fyFn2'w=sI#\u001d^--'\u0002#ٖ`+α\u0002v\u0002\u0001_\u0012G\\\u0019l1{OndjR$\u001a\u0011۪`l[Q\u0018^ag ~j!{8ϲ\u000fָ'\bIIFh9\r^ˡh6\u001aMe`uꢾʢ3Jz+K¡๚%ue6Th\b}y`#ώm;m]\"lUꑳH\u0002/f`[qu\u000fc(6[d1r%t\u0000c9\u0019P\bNYʶxG7\u0018.c{I])pp\u0018\u0017\u0000S$G/O^|+?5\u0012N=2\u0018HtCж%\t\u0012Ne\u001a\u00140Kەn̈́|8KY߿\u001c\u0002o\u000eJe!o\u0004\u0016\\m\u0015\\UTw%\bW\u0015|̒m%BqƭZXۺEۚ˶3Fm+8~ra&\tvq\u0012lh5Z\u000em'nCrh;\rFSRmW\u0015\u0004\r,\u000e\u000el(dsk\u001elzߞܥmNmJۂeX|G\u0002oQϬZ\u001e\"V3\u001a\u0012n٘}4@ZSmAmA_\u0005ئ\u001b7Dѝ1\u0003\u001d\u000eg_1\u001cIS==\u0006k\"PJ~\u001c65:05z)3)R\u0012mhdbBf@ 3\u0005f}e0oY3Hdl\u000baJ\u0015x[P\nAډ\u0005\u001b*Va&wEⓩ.\u001bj1\u000bcB%u\u000bu\\cvf]+\u000edw\u0016O/8Vhu\u001a8L\u000ej7\u0014lh5Z\u000em'nCrh;\rFSXSt\u001e6?\u001b*\u0014ضvu˯W\\RŁ?8嫮c\u0011c[\u0010`[/\u0002X \u0007/X\bP^P\u0016\u0004U\u000ecۑx+\u0000\u0002f\u0005E;8rՊ&Gꣻ\r}\u0006.\u0003s'z\u001e\u0006;\u0019\\R)܍Քȹșжպ\te\t\u0005\"W3d\u000b0fњog]0\u0010۲d\u0007 c\u0007\u001d\u0004\u0002a\u0013__\u0015}UۂlE\u0005\u0017\u000bW$e^\\\u0016y;1uDf!ٖJV|\u0002\nb\u001dų,\u001dFqC3\r\u0006Xm\u000byqd\u001f\u0007|E]9\u001deX`;37\u0000la&\u001f'\u001b͆Vv6z-j4\u000b5\u0017ض$\u001c\nY|n\u0015\u0003*6yزٱm/wfmscl\"6/\u0002x\u000b g\u0018\u0003,Y%J;[j-xS4V1`\u0002g8fBۦjC\u001eCk5\u0018\u0014w$H\u001fw\u00002/I-^J%GꆀmW%\f\u0014v~&*l |\f^;\u0019p1rY\u0002,\u001cCw+ڄ'\tl\u000f۾U\u0004\u0011k3{Y\u000bgd3\b\u001emmBĶo\u000eKC\u000e[Mrb5MGUvB-G^<$},`\u0016_Z+ilt\u0018'\u001f'\u001b͆Vv6z-j4̪Pi_UKk^^u?nkCǞ\u0017\u001d{T͉#\u00068>[0rzbVBZ\u0001vn\u0005;Al\fX`ۙ\u0000om\u001d\b/֛aNLe8`#\f\u0001m'l̶=\u0006\u000b~C\u000bo[z!ڟ\u001cY\u001b\rV&\fHX0w6]k,fa \u0002fdś\n۾*lqm7.p(a\u000bV\u0004[0\u0016^pZB嘒\u001dW71r\\p'\u0016+Yj\rɶ(jۊ2_qgp^O \u0013ږ=Nm\u0002ͥ}C\u001b͆Vv6z-j4sU%@J\u0017ʮlX~usƺ_lx}W]߄\u000fN2޺lwm=JV6T2\u0010\u0012\"գ4HJr\u0002̦o\u0003:ҌжFam\u000b$G\u0019\u0007=lہ`#\u0016\u0007\u0000>3_\u0017\u000f\u0012z\u0018iH\rt\t\u0019X\u0012[\u0005\u0015?\u00021\u0016\u0004\t˶'ڼ\u0005՚A\u0019,!\u0017nCZɶrޚ\u0004W\b[+\u0016#\t2mlRGa~wIfGѬS\u000b#\u0005}\u001ed[iq\u0012lh5Z\u000em'nCrh;\rFS\u000b\u0001\u0006V\u0006\u0003k\\^l`󊫛+nϏoSg_>l&:\u0001\n\u0015ySV$\u0016Z$Jn\u0010׈ڵ!`XpqvZM.\tv^;.Z$\\\n\t#-x&X>kI\u0002&\u0019\u00131V\u0005nϵ\u0003\t}]d>R\u0018٨\u001b\rUm3myDl]\tX\u0002a\u0010H˪\u000ecYjuٶy.Y/`[Y\u0000[%oJulۦmvdJU\twU!i5QNжi\u00075u\u0000o'\u001f'\u001b͆Vv6z-j4pU)Lu|M+ߨ_ug/o|GG\u001buocl;meu\th\u0005\"xB\u0011\u0001ʭ$\u0016ϣD͞9\r\u0016\u0001Tn*U+_Ο7mIж@\u001dI|w\u0012߃Vl.d\fw\u001aV&\u0000mU\u001f٨\u001fKǺ\u001f4b[5\u00150\u0016(.\u0015ȑ[ l&y]]%Eų\\E\u0018P2-E\u001eTHhRû*R=ҥY\u0010Yc#c%\u0015\u0007G\u001an5M\u001fm\u001d#vAp\u001ft.,*վ(zЇlKmB_7\rFˡmhZ\u000emGh*@8\u0014\u000e׾uˮm)^Ӛ\u001eĎߝmo\u000flc6l\u001cٶ y\u0019\u0016[jcin\u0012`ejSB*[P\u0014W\u001a\u0017ny˳:Lw\f#PrqA\n\b*UF%F(\\\r\u001a\u0000M\\Vl6Uq+bܸ$*o[1=\r\u0019\u0012JvNտN94\r{\u0019Қ7жPŶ%MŹDfhNXNb0'q*\u00164dNxv?;ޛ\u0015?=y \u0016ݶ2{*\u000b|RpU6\u0000,:!1^26FG\u0013ض\foMa\u0014p\u0003\tS\u0014M)\u0016&ղ+لt҆Rɹ\f*W<*m\u0012om[2mWU,/[:\"8T\u001f\\GmSܶO)qh\u001cNGt\u001c\u001b\u001f\u001am?qhcŭ/XVw^iڱ\u0018h3zl-\u0016v&-SmT[ղDՓ\u0016m)\feqyB\u0013[\u0014\u000b\u0016\u00173\u0013g$\u0006r\u0012'r\u0000c!op\u0011lAȶf{mm3iΜlȕ[pn[)\u001a4T\u001ba\u001b\u0003gj\\\u0004+>\u0018\u0003[P}DEZ<\u001b'2[cb`+snj$dO\u0013iٗL)VbVz\"\tض\u0015\rxu\n\u0016ֶK\u001bV\u0003ۆOX4\nضJ,\u0017m[K9IƱ89>86>\u001aGu~SXcÅ-?\\{eϦ\u000ensWoH\u000e>u!mKl[:m\u0015\u0011\u0014A\u0002\u0007_Mɢ$f0 R\u0018Ҳ_UD\u0002<\u0010\u0000W;R;\u0013\u0010n6 \u0015n6l\u00107>\u001dˉwe;&[&;OB\f[P,_B%\u0015\u0014VѠqB\u0018\u000f\u001b5.At\rR+M\u0003b\u0016#\u0000J2\u0013\u0012N? d}VJ֗\u001as[\rٶ\nKy;TZmJٶk5\re#k\u0002'-U:65`5o486>\u001a'ǧ;9>\u001dG\u001b\u001b6eo^\\CM׺w\u0018h=zlg\u001e<ض85Zx\u000bl[>-oC\u0004\u001a(\u0011(*IM\u000e\u001aȶ܂ȶ(t\u001e2Eay\u000bؕmfbF$@.Q-l 'ޟ\u0013ɉwf\u0007092X*\u0015{\\\u000bK\u0016!bb\u001a)oa@FVuʆy7\u0016do\u001b/m5\u0003Ff؂Ga \u0017\u00155\u00162\u0017mzZX\u0017A H֍W2dJVj\\\u00124\u001dж°.GAz\\,o1lSmÚHMZ=R1\\\u001f\r\fT+=K<ἃeܶO)qh\u001cNGt\u001c\u001b\u001f\u001akww{mֵ󣾗y|#m\u000fuk\u0011x\u0016bZ۪:l$|q\u00127{ؠ=m{\u0001 \f,歡ڤXF<q)#\fx=\u00136\u0003\u001f\u0001o\"d*\u000b\u0014\u0010i\u0004\u00115վ\u0018,f/|\r\u001e\u0002{>qm\u000b4jQm2=):M\")x\bG&\u001b)fS0l+CB\"⭠RMɶњPu]qHMr\u0012oG\u001e\u0012&\u001bGt6>z'ǧh\u001cVNl]\r޷ꡦ\u000f{o>z̡\u0007:\u001fu?\u001e~rbےl\u001bbC\u0005-W\fR\u0011ؚxK6Z}2b[3xm\\e\u0010\u0002-8,\n\t\u0017hP2\u001b+%P\u0001~=\r*\u0001F[\b*BnPjlbֽ \\}#AۂgUͰ\rܔaKa8\t[`\u000buo]mvlcH&`[\u0001\u0016\u0016еD\\\u0000`\u000bEÈ\u00117\u0002ժն5ŕõZ2|}i?n\u001c\u001b\u001fI\u001ccqTol[sys~]\u001b޻G|2ʝ\u0003v|v\u001evw\u0016m\u000bL\u0014*CZmjeK\u0014yD\u0019M\u001bl\"a~!\u000bD+kX\u000biCI\n1cEP\u000e\u0007$\u0013f&ۆm\u0014PBFUa\f\u0017Tb(\u00132\u0016{8\u000fxBeaUY=Z\u0003^cl)I_\rd[);j5ö&Rޒ%Vڶ\u001asRT\\\u0018%=m\u0004L\u001364\u0003ۮ\\\u0013Wk\u0016t.0T\u0017\u0018\\?T錊jޜ$qh\\M\u0007<\u001e;s׆+{7ۺ/\u0007\u0007];?\u000e>h'\u0017Xl[m\r\"mͼ5\u0017\"\u0015M,\"34,!\nEb\u0002\b[+NB^*\\[BZG?T\u0012*%YgU-m\u0001m\u0004\u0015.Qm\u0010;a,Bn,h\u0012.>¥+рTk00#j\u0016Ū΅W\u0017ٶbX\u0011G\u000bׂYM\n\u0017Sn\u0003ض\u0012-T\r5r\u0013Vvu}\u0000S\u0006jZ`ۺŕW\u0004j\u0003'VɽK<ay<\u001e\u0016\u001aNOǱ87w|ZnG\\\u001fhyb߃Ѯ={LJѶ$\u0002D\u001e\f[[ު9b2l)iM'vՒ6BW.d[Ƴ%Q2$&lHPb`+:\u0017\u00164@k2ccȳ&&\u0017˗4GWӯ[UɍUFaj\u001e\u001666ơ5^&6{N\u0001[C2IWKXeȶ:l\top~o9\u0004,-:d\u0006jdEpmTX;p\u001b?M\u001f7m|NOǱ8Ç\u0017?:c-O\u001ewЁCwN=\u0000aBն\u0000)6dg[P'Vd\u0012ڐ֤Z\r)I\u0019_!d\"a>\u0002\u0004[ jX]V\u0015'\"_e=\u000bOT@\u0001VVŒ\u0005')x\u001b7u\u0010ت\b*r(=ٲ9[ծY%+\rgd\u0019»eh%Ԁ-\u0013\u0012dF\u00162\u00134VmSB`\u0016Z3oCɼ%?\u0002Aw\n%md\u00066,Eް\u000efۂmۀll]I:T\u001b8Y\u00138ko\u0014\u001d\u0006\u0011AX\\w\rwwfb\u0006\u0000RZ\t>CU*\u00140%6q\u0012\u000b1؀$\u0014*D\"Uz !nhLV\u000e̙j\"|=ң3gΌwj\u001b0N\u0017m_QFjDln#\u00179\u001da#\u0011*\u0019~o,L\u0013O?v\u0017z!Ks\u0003+sm\u001elڵlx\u001b$\\.\u0015U˩Exg\u0011K-\u0015l\u001a\u001d\u001bBk\u0015,2&<h8Ibذm\u001d2&um\u0011I\u0006\u0016ր\"\u0006O}ϖ]h\u000fԼӆ1\u001b6['\fp\u001dtUE\u0015m\u001bB\u0007+n[\u0016l\u000e\u0016Ս'\u0019-9ՒX*5\u0010o\u001dض\u0006\u001eƶݏm۽uD9uqtObhW}E\u001ba#\u00119^vF\u001b?F^\u0019\\pgsCO.-^}\u000b\u001fOZz\u00076\u0002[b^Ŷj\u0015۪U\u000eհpxZԤ54if-֦|ۚ\nvK\u0006LȳY(us\"ۦL$Y\u001a\u001b5l[\"l\u0003M\u0007\u000b[=]2*\ry6\bjpp\u0015\u001e\u0004<iC~EJ5O/b5ds&+x%\u0016l<֥U\n\t5 ӺcoIm\u000f6.\u000fN\"_7FV#rd;u\u001bYȑ\b\u001bYP7zbavha\u001eN\\7V?tuhkCO/\\<m6\u0003j6HxCqbf]٬ZmeĶ[ȶ\u0004A\u0011R\u00108\u0011\"ؚ\n-z\u0016߶\u000e\u0007[dDUҦ6m\u0007x\u000f\u001eW(+\u001e(I%t?rkT>>ra\u0016E\u0013E.'\\7Ҧ˯#⹯W%x\u0007|\u0019!\u0003\u0002b:\f(T]l[t\tؖyֳ\"Z63^JY%<R\rmνԶcݍ`3uIFjDln#\u00179\u001da#\u0011*_\u001e}|yxñ#.>\u001do_ܹף+ضml[!\u0013j\u001d߶dy2x\u0011Ie1oZ,p\u0004ßP\u0001۶jm)oml\u0019\r`K\bLrpwnI2-0Ɩ?f)r1i\u001bMۥF$0\u0012zhMynnN¢N&B\"SN\\|~H|\tJZ\u0016}aV.ֈg\u0001j)K\r\u0005d\n=ҾH#=˩\u000b$m<ka\"\u001c\u0004[?VHm{\u0004Uiڗ\u001ai<ם|\u0013l\u000fN\"_7FV#rd;u\u001bYȑ\b\u001bYP6/F=\u001c?|^z~{rV?Yt\u001fϮ@\u0006Bm7Ѷ9ζY\u000e$`\u0002H\u00103\u001b'\u0018\u001e\boQ\"*[\r[ԍY\u000ec\u0000r̶Y\u0003ٶ=lKHFp1R!hN\u00148>%\u000e\u0016愱\u0006Ю]\"sh\u0004\u0000\u000b>Q]Enf\u0016ٷ\u001d\u001d\u001dxu6\bi]Z\u0003ߐdsEAk0o\bo-zg[LZ$\\\u001bdBx\u000b`lVL\u0018Qö;\u000fY,\u0006v('ʈw%l7_'\u001ba#\u00119^vF,\f\u001f=`Y2+on\f/_w!^ql\u001bEGo[;ij٢\u001bal,d\u001c\u0017ϳ+̳\u0001f\bE\"%EEc\u0012#Wh\t`K\u001cf\u000bs4gK|\u00061\u001bj>p\u0017:dݱ\n\u0007U/\u0004.\u0015l(ĭpvy-X,pq3ضyZ\u0010.RpM^+&v[CUcQ\u001eub~wwO\u0013l{LKIߕ\u001c_'\u001ba#\u00119^vF<>rk}F~|s~g3+ׇCE\rVɘ\u001cok6\u0010m\u0002\u0005!\u0000y)o#ڭ*\u001cķ-ZAXqIm\t^\f@\u0010<2MmKx3\"ނm\u000bj\u0014,đ\u0018\u0016zű=%|\u0013XOxr\u0006KX\u001a\\DC]j[\u0017\u00159\tkN\u001fmnk\n\u0012\u001a?V\u0005\u0016;`l3J;qSZU2ΥRԶ\r\bHp1loymn\bfi`۶m\u000fw\u001ei|ڟ\u0005i,{Rc{;uIFjDln#\u00179\u001da#\u0011*\u000fΝxreV>cǿ}<;?\u000f~~QȶlSɶaزm\u000bQتZL5Rhq\n9Gl덑\r$YK-LY,\\=G\u001claٜ(`\u0016LpOgpV\u0001K@\u001b,ڃ㝥07<:,np\u000emxKUKLԧ\u001a[|8,2iۆ\u000fiZ`φx\u001b0fj\u0001QrQmshZ3gMn$mп7@r\u0002\\EŰF`Klk\"\u0014\u0012FވGm{\u0004v2vkGwr{]uIFjDln#\u00179\u001da#\u0011*7WnN<\u0019XӋS/~z\u0006wS_\u001f~keUk\u00161cµm}b}[-\u001eR\u0002nr\u0013 mQoOjL:A(\u0014B@u,6GlKyphD8\u0005Yέ0\u0004TtUⶡm\u001eduNEY\u0016EwQ4\u000f\u001er/\u001cC-ha̲\t.T\b%i[\u001ap\u001f\u0014\u0019l[\u0000lx64Z\u001166FNW¶B=\u0003-t\u0000o''ɱ=Ҷ(?\u0000\u0000\u0000\u0000\u0000\u0000S\u0014W\u001e\u0007*\u0005$\u000bL\\\u0010af\u0010\\0\u0001bp5QʇTUfk7\u000f%ޕBP\u0001\b!<lT\u0014\u0006zy\u001fUsN_Nw\u000f^*t՜o=TyYy\u0007ºSawrXw\u001c\u001b\u001aGC;'O<\u00198gz^\\}1|H}xSp\u0005\u0012Zfh=J\rWYuj>OI\u00118=2$1!Q\u0005o&\"\u000b\u001e\u001e\u0014C\u000bK=C<DA~s#\u001e\u0000SI?\u000b\u0019Qxw*C>P\u0001^\u000exqj'\u0003X #\tٰ%#.\f:\u000f:\u0013\u0016Q0>֮B3\u0012\u0004K~9D!\tИgZ-NZ\"\u001agQ!\u0019^E@(x\u001amae&\u001cj˼kx=\u0014dD\u00055&Ѷ\u001bI\u0010$DVTa\riiQk#jke[\u00128#\"\u001aDr>K\u0011<PD+D7UCX\u001bX\u0016]SL9?w[SZ[r5tUͅ4V_ a\u001bǆa)ذ;9;\rkpÏaGN\u001c\\<\u000f?y'\b\u001f={[m\u000bOlM,\u0015\u0004\u001cd:KAi,\u000fh\"RŇ \r~Jfrw\frfrV\u0019ݐZ;-$\u001fb`\u00106\tTy\u000b\u0018e2\u0019\u001bm\u0011QUbŌ\nXDZ؈\u0017\n<Of#rB*Sض:ru6iu\u001am6B'56\nʹ2^|\u0007lX)\rY#\u001a`\u0001&ҚmM¥m'`\u0006o\u0015\u001b\u0004m%\u0015\rT['x\u0011l5G(PL\\\u0007nX\u0016ZallmKR9W\u0019`\"\u001di\u000eAV_ a\u001bǆa)ذ;9;\rkr-z=Y@,<xwO\u0007\u001f\u001e'\u000e>烇k&\u0015#\n,\u0003(el\nU\"J\n^@\u000b,\\$ѝ\u0005\u0002$\t`eK9ǫoD%%`f%\u0011aVs[\fX\\bެv>W)\u0014QgmDC]j\u0019Zc\u0012jVj\u0000\u0018V^H*;S<}xS\t׍\u00137Nn^+YśEO\u0005>\"p4o\nm&ZV\u0010l[˭\u0007bb҂mE\u0014\\{0md:m\u000blۑ\u001aBlLݱV9l\u0013n\u001c\u001b\u001a'u`Z865ٶŎ\u0018Ҏ\u001dU_\u001dRϳ!C\u0006\u0017z;/a-W\u0018\u0014T2f.AZjq\u0002L|]\u0014\u0016tUWtDMKT+S\u0015Ƕm%?R-&p\u000b\u0011!a1\u0016\u0010F\bc5Ş\u0016\u0010cےyYY4`[Fה\u0016Z._\u0015BZ\u001d1\"j\u0006lт3\u000bų\u0019/5Qr\u001b2^mk_\u001ew\u001cuM\u0001x犾\u0007Uq\"k#\u0015\n[pm\u0005m\u0005\n*<ڡGYƶъumkS[G][-5Ɔ\\YiV_ a\u001bǆa)ذ;9;\rkr5r=z36Y5\u0019\u0003^8Uk\u0013Ww%OL'%\u0005.c[me1?iqٶ#\u0017L\u00106\u001bBճ),x4`G-\b\u0006fdG1֛\fjy-^\u001c!$E_\u0006\u00160a,J\u00169W%m\u00166\u001b\u000f\u0005,\\\u0003s3\u0018Fk*Ԥv̆U,\u0012\"-ɖbު\u001b.\u001b=f|'K (8w K\\/3Qz\u000b\u000b-zt-n\u001awei恭=pхn)m=T8\u0012֟Ƕ1Ͷ\u0010ݶ\u001ftjhL-s}-Ro.\u0014\\\u001f~n\u001c\u001b\u001a'u`Z865ʹym\u0007mЎK;6\u000ewՌ\u001d\u0015\u0007ގ'-OoUkZyxˑ\u0011V\u001aX\u0002,Vm:ȧ0hۦCW(\u0004_V\u0011uRW-gDUf$?RmPZ<镃>/\r@FUy`\b&bfu\u0019U\u0011\n\u00147\u0015ٹ\u0016'S)mmbr&\"S\u0002Oj;LZFX6\u0017 Y4ʽ҅{FNu.dr2\u0010c鹢E\u0015x}f*dͶrj`\tö:o9E-q.\u001a7iFv=ض-ۑm\tmiIґЊ\u000b$uذ89;\u0005\u001bz'uǱaqTn{;z3\u0019\u001d|#]5#;k;>^\u001eBi/e[R%mji䪤ꋑm\u0003ؖ\u0003}d@J6\u0010Zl\u000b\u000f\u000b0dktZbFn[T mӒHVF\u0000U&4DE\f[1\u0013*v%\u00013V \u000bT갍gIСd6[-I[-M\u0010ފ\u0006oQp{PxMl\u000b\f\u001b͖-̔ݟ]0W~\\ʀktYEj,ܲyp7ǋg\\He\u001b`_\u0016W~!ض\u0006lax\u0016$yF\u0005\u0016h\u001aڶ|s?mmykk|Kk\\-fg\u001bO\u0014qlXk\u001c֝\rkúذ8*g\"#\u0017ۣ\u001dΪK]]`]k\u0013}^l-Wi'<lUr*o\u0005\u0010hbފݶ\u0010Y=jf[\u000bo\u0004\n\u0016Z%2\u0003\u0016}\u0010I}=e\u0004-\u0014ql$,Y\u000fEi\u0005[qpPmK\u001a1$K\u0019u\u0004'l \u0017\u0015Ogi\u0012n^lM;LUk-gܙ\b7\u0016lW!\u000ewS5S0[\\w7\u001f|ƃU_&]îko~9\\<6T|\u00152zaxϾ\u0006\u0002o'nzm/M7u\u0014Ez\u0007pE\u0007\\L\u0000\f\u0003stp\"ɮ (YQ5U[٭d#&q'\"\u000b+\u0002\u001eXc4ٸ\u0006DD\u0010\br\t躯{\u0003T*U3O5i[gͯ-\\EO`[\u001f\u0010t \naxxE\nۮv7\u0016g_з\u0011l[ e󏛜\u000b\u000f\u001bfF\u0019\tٌ9c:\u0018:}h\u001bl{8Xض\u001dޓ۽};\u0003u\u001f\u0004NW\u0004\u001apڶ\u0000[m\n*y\u0013b:䪥\u0004ά&*\u0003$%EJ%\u00160B`h\u0016\u0002m\tiɫ!\u0004H\u0004(/\u0011\rEhV\u0015kA%zvL,a\r\u0014T+V3!9W9)\u0019&G6S\r|2ժz\u0018T^R]E{\u0007ŋ+'\bW\u0004x\u0016yŕK^^~eyը߄5ֆ5zs\u001b{nDF?>\u0015vdXc?nX|fɭ?7\u0005\u0000\u0005yǶfpeMö\r&l[߉ذXȶD\u0000[Ya[[mނ]řE/\n\u001b\u0002ǒ\u0003ȶ\u000b\u000f\u001bfF\u0019\tٌ9c:\u0018:X\u0005=R>Z9\u001dl^])mJNmܼmJUV\u0015%\u000flL\bi`jULĶjx\u0001UdDRJϊ{N\u0004\u0004ޢ\tt\u0001R6j!h[&U$q5K,9gCՆ%\u001cf$f4\rj3&(]\u0005e\\%7K9\u0004\u0012bsV\u0016o.Eݽ\u0012kG?\u00117N\u001dZ=\u001a{qO;c~oÛ;תjk~~\rKO,Z\u0015~};jl;wA3h\u0000[k\u0011m b\"Rv3)捶}>.$ks\u0011^?1ߗݰ\u0002C$F\u0019stB6czΘn3F\u000emA\u001e/TmO=YfgWӻ]l\u0003-N`\u000b&m-`[\u0006ʰa\u001dU~U\u0019㴃j\u0011<\u001djز\u0014Jؖn9.\u0007B((\\A\u0016CT+H\u0011+$/\u001fM>d[FX՞<\u0013ض.\u0006\u0018\u0018ˈ\u001b@ݙ%:5\\!@ӎ^V4)26P %iKAg`+\u0017+a\u001c\u0005\u001b^,%\u0016b0u\tl\u001dVX\u001b+\u001e~燕}\u001dѣ\u0003xc\u0019f\u001ecݶG\u0003hgp[\u00037\u0016\u0018\t?\u0011v;MKo7.m`mD\u001c33Ay\u0019mmD\"*T\u000fm-jۚⴶÇ_|\\\u0014l\u0017\u00066r\u000bp\u0007\nR,\u0007?D2nt1\u001a=gL'd3F6c4\"ס##%cierߩr_]y.L\u0005X7UG{J|,z[UV\u001e5kİZrx\u0005zi\u00136C-m2-^m\u00196-'v&l\f˘g\u000fy\u0018b\u0002\u0006h\u001f*%$sDQ\bmU3]̳ddU>DŶ\u00119\u0005{\u0006\u0012\u001eB\u0002D\u00065VUW٠򐓟jI*`2\u0014V'-LGԥ\u00077WZ׼juAPԠgq{?s9Ì?pG\r\u0019>9TX\u000bZnX|xy\u000f5lՆ(F6\u001dٖB%+\bN!\n5\u000b]Vau*N|^GK\nm\u000b\u001b7m]_;\u0017\u001f\"\u0019_7\u00183\u0013\u0019stt1\u001a]\u0005\u0016dۣ%NlT֔j\u0002u;\u001f\u0015l\u001eh[>m3Vm[5i嶵mYѶ>9ݚ\u0010\u0016HD\u00075'amč\\\ry\u00185|XoLVb[ѳd[\u0016!d8mA.\u0004,\fUŉS@.2Oa21ia+\u001c:i^V?.᩺*Z\u001b/M{t\u0012\u0014\u0014'#rH5\u000fX۲vm͓Ca!nz\u0010\nL>O>M>N'z'GѮgwc_9mXwQ\"G6-o9AqY1kh[,\u0012\u0005b$Y3y5\u001eK[\u0004ۚbhO~QҬ\"B?6\u0000\t7|\u0005H׍n3Fl1\u001dfFW\u001dڒzxk\u0012\u000fض;ҫ˼uP\u0005ؖ;S6\r\u001fѶ@7VaׄmkI5aۢ4 XHk\b\u0017&\u00166X\u0012i\u0005t\u0002\u0005\u0012\u0006Bbe\u001bZf\u0006\u0004gG\fx#49d$\u001bWVl{\u0015cg-+Z\u0006<K⤕\"x:p\u001d\u001a;p7f#v+vþQH᜗C/~\u001cj\"{?\rgML%w[GLW>k\f?W\u001fvjtŨsw\"̋r۾.\u0001~d8\\h[&O!m!m[j>)eom\"6\u0017\u001b?e|6c4zΘNf^\u0019mht\"᭮#ض%*[ou<P[փmws\u0015J^m[lkjհo)\\ɶ ,\u0015ob`,p(!\n\u001bQvd\u000b\u0016\u0010\u0007V\u0005\"&ќ̶Q\u001c\u0019vIYNdlLW!C0% \u0017V$_}'\ta@%ӼF\\n\n\u0007Ayt֮(\\B][\u000bX\u0004:;\u0003bt\u000ewǏƏ\rG/r\u0000?\u001cY?mhS\u001fd^zN:ƻmcV\u000e]\b\u0018~ȶ+\u001d{6\u0005<ay͉9m+\u001b=6@}T\u0002Uɣ\trq4z[cOwzmn:\u0000\u0013x\u0000u0X׽HZ$˺JZ!wv\u00122!q~~$/:\u0001L:0\u00042N4\u00034\t\u000e`(&`-[֥Lsjd oxg̳Gg}\r8\u0013l\u0017[C[1l[\u0002\u0007\u000f_\"1^71\u001a=ǘΒ1z=ǘncFW9\u0019Lx%`\u0013=\u001e\u001fz\u0003gv?\u0015>Gtxa_mbZgVNm[bx+ֶ6\u0013഼w3Ř%EJRAZYY=\u0002]m\u0010\u001c蘋\rHVV-Pa_ϳ\u001b}\u000e\u0002Xug3ХR@T\u00032Q0K\u000b+q\ruO7x\u001b\u000ez\u0017%qtMKn\u001e\u001e\u001a\u0010ZrPu\\ZFJ ZB\u0004\u0001\u001azu\u000f<\u001a5%T,=!3eajDl+\u0017lQkv\u0014%\u0003IܫK\u0001og7\u001fߩ\u0006~+oe?:i)UmZZH%\rj\u0004ʂB\"Xζ\u0012۾[]omNmF-9)&H׍ncF1dc^1\u0018U\u000eG\u0012c\u000f\u0013]\u0000ۡ>m\u000elg\u0005r6\fҸ?ζ\u001am\u0000a\u0013\u0016\u0011(SR-$f\u001b\u0014b\u0006\u0019h\n\u0005wj\u0002Fmذ\u0002n\buCX_\u0001:$\u001e4(\u000bo39\u00100Z\u0019խ\u00108W-0\u0016*\u0016*G\u0016iBZH4r\">TKGjvDQRg=k`FX\u0002^\u00144%\u00191=m\u001c3OݳΦ\u001a\r\u000bl[&ua7\u001drc,dj}Ah~`v=3ꜾW_Ur+\u0015A\nlb>7*c.\u001e1\u000e0\bW\u0013IІ\u0017\u001d\u0003\u0007\u0011ii\u000fok\u000b\u0012l\u00006\u00056b'm9tl9tt\u001bc4v`;\u001c=QOݩ}᳻\b\u0017ml\u001b$>Uy[V(Q-\t9Z\r*\u0011\u0015B\u0013\u0005Ҫu I@Q|\rBj\tsXHjqB4f\u0018GXİjaKfKBnenm]\u0007\u00018R>\u001bg\u0019\u0019d\u000fj`!/sщr\n%\u000b%4U%*\u0015\tWP\u001e&\u0016WVUn\u0018\u0005Ѩuj6ОJwR-T{v+4e\u001eˮ|]\u001e^q\u000f_zc1=)΍sR?QH\u0017}_W^\u0013GvѨ#<Օ~Ze-:V\\;-Im=el{\u0007n\u0005m\u000b7\u0006\u001bqk2l\u0013x6h\u001cc:K6\u001cc:1\u001a]HhX\u000fr\u001eP/=§{DȅƶUȶ6s]memK`+\u0016b\u0017mXSQaYB\u0000[- +љ\f[=꤀IK˞è]$U\u0015\u0010/s*,Y\u0013\u0015Zf/\u0007nh?cQZ\t(\u001adA\u0006+&-F+\u0002,VxOWs%'ȅ=l\u0007\u0005\u0003ARaQ1\u0004[d[\tr%N\u0012sQZ\u0004\u0013VaT`}̕G%\u001fЩIf>Zʧr\u001d\\\"\fd}\u0013#˯^[>+W}sߖ\u0012ҏd}07^;\u000333R\u0015cn jx[gԳʢY[\u0018+_UQk^[kAMRքmk~qf󫖽X+ض55\u0002K$F1F\u0018Y1F\u0018m*G=G;<\t߇]'m{\u0002z\u0003B\u0015>\u000bl+\u0017/\u00135]Cl\u001b(ȶZتam\u001aҖmل\u0015疷-m!\u0005X\u0001f\u000bu!`[H͠\rR޶l\"0-m\u0001ۆسX@ګUAnC-\u0007qD\u0010\u001b2W6\u0013<\u001f0/\u00136\u00052WSF\"5n\u0019[,i\b΢mn$_\u0014Qgk(YJ-mPu\u0015YsQ!xa\u0016\u001a$;tdfYW.;{#;_ؓoM3\u0013C&eޘڴ0\u0019MO\u0006S߭ϚG*\u001f|U{-Yxdb9\u0015\u0017mj05W-EP*d\u0001&nT>e[om<3m&4\u0000o[=/Dbnt\u001bc4z1%\u001bcz1\u001d\u0018r{;\u001e\u000eTo_\u0000sضil*o[s\u0001żERQU=B\r-Zն\u0001Ŷ\u0011\r@*oQb.;V-\u000e,-[\u000e%\tѤ=C\u0019\u0018VRe\u0010J\u001c-Kgn:\u001fe5\nK\u0019E Y^AlXr1O\u000btEvF\u0010c\u0011\u0014\\$T\t\u000fJfSU\u001eعt=jPI`+(!M7&\\sIna˦ܹ'\u000f>gZB.gg̬ݐMmͦ\u001aӯ/<\n_ʩ\u0013ë_\u0018\u0012ֲjF,>\\DE\u0001\u0000\u0004[k°55Ų\u0006W^5UĶba7\u000ftw\u000bmĶC륗_\"1^71\u001a=ǘΒ1z=ǘncFW9=\u001bLwCCĶ}Ov\u0011lD\u0013kl\u0011ZMŶhm\u001bTmK\u0013*`gb\u0018*o\u0019\u000b\u0015\u001cȶAF,GAQ\u0007\u0015ucNն\bJ\u0002\u0012syN\t\u0011\u0001miK\u0011]T\u0018\u000b\u0011V\u0006][ ,lRf\u0014d\bX\u0012ȀvY#l^YqU\u001c\u001bw;gN{88:y.KR\u0014){V%Q!:)Qc;\r#荢(\u0016}[ :F#im7whW鋦A$Hڮo w<\\)wZ\u000b1\u001d8p\b\u0019pB\u0010\u0019ˑ/G7ӑ@\u001a\u0017\u000eHD8ҡ}.#p>H׭e-%ё\fl\u0018Ǳ\u0003\u0018?|\u001ao[}iUyUU^Sw5ژUKVo\u0014OOJۏǶ;7>x\u0007\u001f\u001e?I:\u001c^V{1V\\zǍtu#R1Xeq'<\u001drCm+\u001a-$\u001b\u001dm#4\u001dжYm\u0006dp O oG'\u0004x<yx\u001f\u0016m9NuZ6N\u001c:S\u001a[|!^\u0017K7g/W߮$\t\u0017w\u0016\u0015m`ֈ[EM䂪F\u0013KՎ/T\u000egw\u000e\u0003\u0002oRci[VoA=A\t\nV\u000f^]\\\u001d\u001dc0+m\u00023.Жn[Ĭ\u001e\u0003\u000eFj[6K%,\rb\u00042HZCA\u0012Rx\u0004I\u001bӈjq2J6B>Rޒ\u0011Hsf*\u0004Qҭ!\u0014>;\u0005\u0012rppp`4455\r!EQֳX}TTSM\\SӔƚZ*KƳr֝:|ö{\u001f\u001c\u001f\u0007>pi\ty3ւܯlU2\rݻm\u0011S^TԹw]m=m\u001bƘ={e;'/ͽ0[MBBn\u001f\u0016m9NuZ6N\u001c:S\u001a[eDl{w\u001csv\u0016l__]\u0012oTҭުlڶ\u001bږ6@\"\u0018%hVo3\u00116\u0012CrZ]\\xqia\u0017l\u0016\u0016\u0005\u0010ph[VWmj\u0003Xf\f\u0016.a\tX\b*M\u000e\u001dL\u000fK\u0013xw$\"  -,\"Q%K\"pM\u000er`L$%e\tcLpQYCz\u001bAR\u001a'AҚEw__,aa&wIY\t#\u0014)Sx}8Ѐ(&u\f\u001b\b3WoyE\u0011U7[M{]~iִ_h\u000f48ה\t\u0017y7t?n϶\b[9h\u0016U+?^bSf\u0002\u0000keVA[\u001eZSSgb*T\u001a4l;!o8\u001b)Teqc8U\u0015b\u0017J\u000br*\t\u0005ڼEDl*jۮ=mӶp\u0000\u0015$(7>KZ\r\truinfze˶&omԶ΄SbwV|`[X*\u0018\u0019%K\u0015h\\\u0018\u0000\u0000wLc\b\u0017\rPmRC}\u0014pB\u001f\u0013#H\u001bq\u0001\u000eES\u0002^Q&u\u0011ħGƸٝ4M\u000eFAmI2n$m3\u0012-#-\u0017X_-5OU1T+Yl\u000b-\u001c/\u0005u;h\b\"jFU\u001aD]д_iO4UM9nǕp)Wl=lum|ElQEElKkJ`[\u0013\u0011}*\u0011s=\u0002OH&a[#n\u0011fmn3]m_Z\u000bk/M飓hۼ4\u0017r}[$ƶqJc8i8s6Nilsz)^]<Cl{e.yu$Xn,KV_g[7ؖmyӶA\u001dIGX\u0014\u0000sey\u00199SLNL\fg&\u0005-jur1w{NzȧA\u0003br~m%\u0005R\u000eDCL~lzr|nf\n\r6`0\u0013\txe^\u001d\u0006Ѷ=A\u0011%hV;$Zc\u0004b[fL\u0000@Zۑ8G19\u0002捇hg\u0017\u0010\u001a\u0000fuEhp@h[\u001cr4&{O\u0004ӑ\u001c\u000eP~94\u001b\u000e\u0001[b[_~D.+u.,\u001di\u001eWD\u0003\u001f@(E!h[ 渦A^״i\n6ԭh\u0019[\u001c~ۼ~y;q/\u001bgC/C\u0017\r%7dV\u0001[륇\u0007m=\u001dMB\u001bp#lm\r2nqKDnްm£մs/<}X~m*S(HGoO\ny\u0010\u0007Enl\u001b4vSSz;ǩmV9\u000f-.,mߞ\u0005&\u0017w?Wś+Ķ\u001dm\u001b8\u0018jt?Ƕ<\f\u001f4`\u0007\u0011'?\u0012*\u0012rZ.\rf2=.Қ5y+`ۨ=^W[!\u0012yER\u0011PL\u0006\u0004\u001anM4,\r\u001bmT#)\fz^\u000bXøAH@@VVK\f#\u0012'\b#N#lXJ\u0010mȴ-.\u0015'@\u0017egѭ,l9\u0018i8bI\u0015!:`d\\&\u0015\b\u0017m+r\u000b\u000fdV2N\"\\\t 7\u0002QR)M\u0011U5\u0003\bàFRѶvOc#T\u001cܺl<Lȗ5\u0013FbKC+[\u0018\u000b}\u0004µvge\\ߕvJDFm=\u0016\u0012b\\Զ-\\\u0010yk#\u0017NϜ9^81-\u0016剂lV\"q^7S\u001a;ǩN)TǶqJc/mKKߚI\\\u000by퍪x&ݬI\u001fKCm\u0007ٖG谵\u00162sj2r4-]Ӷ\u0007lK7\u0003_\u0011̮w\u0018C^{w}@Fj\u0010!j\u001e\n4\u0011yKk!\u0018A\u000b4O\u0017RZU*m\be\u000bTc}u3g?Ɵ`+×\u001b\u0002M0U\u000f-\u0001\r]\u000e/ODɖՃK\b-Pⶭ\u000f#-.]LwyV|>y=\\=&3ļ$K5l3߮e@\u000e%k#o7\u0016fxfTM\u0011)uH\u0017EU+B_g:V[CvPĶOR\u001e'>ȷ\u001f=?39W\u0011c1\u0014e6\nW\u0001\u001b\u0002fVm!n[\u0012\u0002[n[S\td1f( l]{\u001d;8r]\u001e\rA{ggM\u0012sr4m{9~w<\u001b5r)\u0001=?<_N]/g\u0000צ39<6\u0012m{:Zmm\f\b}mU\u0001ձcŉj+\u000fJzjq%ٖ\u0016h[-M|Pk:\u001c@9\u0012m{\u0018|Ew'\u0015ё\t\t,:-V3jѳV+JJj]ۖM|\u0017KT.tX]:\u001ey\u0001T\\sI<Fm\u001bk\u001b\u0019\u000b1=\u001d\u0016\nwEUXQPh[\u001bIKG`+BN6-`rϬg'ɧ&s\u0015{T|.Iˣ`qGOݨ\u0005QՉ4V-MV\u000bZ0lBբm9lmkb)m#7\u000f\u001c9Qra7dm\u000fIn<\u001b5^ߝz/gS9SJ\u0019<[N^\u0000VR3`ەi\u0006Ţsg)Oi7^ݔ\u0005خm3\u0014و\rmY\u000eL.W\u0006\u0007r12'~ɓRp\u0014D\u001f\u001d3\u0010\u0013'c\b&\f$b$!`ձ\u00057'ODgLN4\\딴0,5IkG(f9G0/\"\u00070(\bx<o\u0019BX(\u0013QQn\u0016sB򵜘N\u0004ij[Õ&ܭEK=K'\r\"\u0018TeE^1Z鵹ZmV$Y\u001dVjڳէ\u001e|Z\u001bc%\bBMmkHΕj\u0002^:\u0016`2\u001a*\u0010\t\u0015#\u0016TZm,p\u001eT-8Vm\n\u0007-b\u0000-d9R=vhّp\u000el7d\u0001o7$?7\u001a/Nowǳ[㩀mG;ϕ;/T\u0017O'2W&2+SSf͛\u0017K\u000e+Զ\u0000lDCj\u0001[DIyk98;3]ٷWL7\u001f~\u001ff}?}:6\u0018\u000b++\rA.\\\u0015\rr&Q\u0018A`\fѥyB3\u000e\u001f5|.-ia!`h\u0010FD\nr?%s5]LRm.\\pN:Н'ì{5W:/n5z\u0012Q\u0014.\tv{G^Mgˉ\u0016\u00186\u001aNm6\u0001T(Qs[Y\u0016qd[uA\u001cr\b4JIt\u0017;gf\u001bJ\u0016ND)B4!--n1HAH\u000eCEjm1h[mw\u001b?\\_.\u0003C!=\u001bo\u001bowiTΌ$΍&ύm\u0017+㙫Ķ9֜}{\u001bV\be%RR2غUa|}jlvzjZ\u0019)ʶ\u0005u?J\"lm:ɵk\r\u001f쪷G\rm)\u001a\u0002\fҁ*6(l+`\u000bUت;1j'\u001aP\u0004\u0011YD.kR2J֦>\u0015\\e\u0005Mv\"T(.օ^!-^iy֖փmMy\u0013Yq.Uk\u0018K@-\n\u0017\n*\u001c-nG b~j_,\\U\u0015e3µQֺ|p\u001d#\b!\"v!oCh[\u001a\u0016޶Yl3Km8W8\\>4x5\n\u001d\u000f#o7$?7\u001a/Nowǳ[㩜)%K#ɋ'c+\u0013i}sκhY9\u0012\u0012\u0000\u0012A|D0غ\rq۪\u0016@3gWbGlmO}1TN2\u001f\rӼ5\u000bDa\\-\u001cf\u0001@KG3č޼Q\u0010ȰՃ%EϢX!\u0016&\u00112omW0wPYQca\u0005%ŀ\\[`[d{e)lmqKIl&b\t\u00122Bjzi\u000emXp^Z\n[ZʋeҸnթG\u001aؾt\u0014-d U-A\u0016 |\t۞\tضÕJ087\f\u0000o7$?7\u001a/Nowǳ[,\u0012gG:ώ.TR*ԕ\f\u0019ƬEl`^t~s}%\u0012ok(Am&LlAfuY\u0004\u0014\rÔ4#l\u000b\u0002r~ܻ{^\u0010\\v.\u0001Kr\u000fC8l[9V:vhN6\n\u0010nJmK\u00018\u0006XԊ07m\u000eR!fu\rimyF:m\f*\u0015+NlWό1Rk1b\u001c`kEմ\u00161kӠsi\u0001D\u000fHBykjB,L4\u001atu*qUEm-Tk\u0018\u001b˟Ņ--\u00195\u0016-\u0005Q\boulر\u0003\u001f\nC`ag`(\u0014sr4m{9Cw\u0003\u0000\u0000\u0000\u0000\u0000s\u0014\u001d\u0007\u0002H9pcHFh4^g1K\u0002iaF 11ĕC\u0002\u0004'6l6-\t$$@6`c`Tr\u000f).\tr\u001fH==3\u00129%*uշ~ׯ_kyGaw˃\u00077222ݕ)e滵ݙKm\u000b}~ʐɈ~XC߹\fQvK\u0010m\u00139]Ht\u0018 Ub2\u001b2$F*o(YcSw99\u001f~ǯ__<\u000fV=\u000fޒOݽ\u0013\u000eW~%K+1\u001d۸)\fiXᰦM\n\u0019)*FbF\rkV\u0011{\u000e\u001a*Xh'd;!\u0019qVBESXڕx+\u001e{2IJ\u000e4d=PLvJ\u0015/Jʴ7TP\u0005h1}RXL1\r\u0005\\BtT\u000bPa\r%\tOV\u0004[e绋z8RbK&`\u000f\u0002\u0015XİJ)q\u00185D\u0010\u00104(ϗ&Ƕ߿u~(t{]G\u001fʵwdwwBB\u0012\u00046hp:+6胜p:M8@e\u0005x;]L\u00143\u0017JЧ-W\u0007#Ƶau}ܺYiۖ\r\u001ag[Ëee%zmMl\u000b\u001474\rpf6!2c!ϝ\\]|LWȮ-?l%y#k\u000bd?I=\u000f\u001emn\u0000eŜ\r`\u0010*\u0006\u001b6\"d\u000e!ze\bi%[$-V\u0013܆l\rBUU\\.f-T\u0000\"ŬU>S܆NJz\\@\n\r&cO\u0007OW4\u0004[+4Ɏ{Ũ\nnO\u0015ʍ{Qj\u0005YK\bשRmŊLl\b֦-Öo[Tvz|_\u0018-\u0016:;{/@B\u0012\u00046hp:+6胜p:M8@esdW\\W+v[أ]>F\u0002lOƜ\u001b\u0007\u001dt\u0005\u000f)i]\u001a\n\u0006`\u0011[x֌?ζ\u0000\u0016\nu7DjCK7\u0011Jd+#sk|>FlKxۄ䮒#\u001bI*K^\u0012fU.*2KVஊ=4t\u0005\u0017L%&q\u0019\n^1\u0015.C\u0004XWb]db\u0016#-Y'b\u0015=bUY\u0010Z\b^\u00199\u0000K7\u0010\nϛJpդj\u00152\\\u0016_F@۪\u0007R)e/,Y\u0011wyr\u001f01e+q\nڳ~2ے\b[61\u0012gm9\u0013Vԁ\u001d\u0007͍7b؞Cיak\\/\nIs\u0013؄\tr؄\u000fr\u00046h\u0002ɎLWl13׭hz!ڐq}Ծqйy06q]\u000bV0\".\u0011ʞnmi\u00104mZ.eT9\bjF3_3~c\u0014H<\u0002o\u000f$oNS\"lbs]&ɨKO\u0000ɒF lAz%$\u0016sd\u00034k[\u0015f'nB\\*ʣde\u0011{Υ%\u0019o%C\u0015K\u001cQ۲:mMږ7\tr\r\u0003UQgxYXQYWnE(?U\u0015|°`K\u0012ex`\u0005lkP26B5|\u001e1;H`\u000fۿ_Rʵwft8B\u0012\u00046hp:+6胜p:M8@\u0005l;zB)3W\\m[kܯ_\u0019Я\u000eY׆c`C9϶\u0001j|\u0014l\u000b\u0002Ba\u001bәj,Zӵɉ\tOOAmk&\u0014فw\"Fޫ\u001f|~W\u0015N\"v'^[-\u001c\u000e\u0017mD)Ra\u0007\bc%wh\u000b<{\n)^hs\u0012js\u001c*E&F=ZOJ.J:$jRiMf¥%Ե09NAU\u000bC1MZ=\u0012\u0000bE\u000fz\u0015R2`I\b\u000e\u0015.R5)R'3i/x%瓧ڭER\u001dfU.~\u001c[m6T\u001cKٶQ)mKl{vn4?7lC{m{s{B\u0012\u00046hp:+6胜p:M8@e3=El;/3߭]i[\u0016ƵAaQq֡gm)lm9JZSx˻\to<ֶ4SrmmI\u001ez8\u0004=[y~lWWmŪ\u0013KSd]ú\u0007uޯ\u001b#Uy+274\u001d\u0003[_fmR\u0018`R\b\fl\u001b-^9/gdq'}9\u000e\u0013\nTXiCC\u001fфF\"QGS-m\u001c\"VrlU\n\"ۼNyev{U\u0016.%-=\u0001CKʆ*j\u0012g\"cѶHZT@iiKX4\tlMYS6\u0006\u0002v\u00020\u0011lĩU\u0001ۊK\u001e\u001elk/㌺\u0010g1:p%mud\u0012j\n-E)lmmu\u001amǷώm\u001f\u000fYK`ۗz\u001fW̷w%\tl\u00049tVl\u00079t\u0002p4dGz+=\u0003-m/]kx#\u0001s)噧\r\b[g[C`\u000bM\u0019e*BgBpXm\u0003omg#ّG~S*M^X?5#ݓ҇uݓuG=/x{xf\by;GT%ꄕ\u001celJ)zsn\u0007ҲEޥemse$GAt\u0011xMV,M/~z=(Jfz\u0017*m\buJ\u00023mW\u000b\t]wO\u0006𪢮\n\u0019\u0001\u0001K\u0006D\u001bM\u0004Az\u0010KU(sa88@\u0003dw'6=g\u0007)&\u0015T\u00176>7\\&ML\u0000\u0001\t\u0014\u0014 ))>w}` !4^?=ص\r\tFH_zgޙ\u001a63U-B(##ȕ\n\u0006\u0003\u0013:\u0019ѰԳѼŗm\u0005\u0005r\u0005%lEM\u0017\u000b[j[\u000b-,V-/\t\u0017\u0016ٖ1NiuĶP\u0010lxW׵%m׿?\u0019\u0012shQshWs6hTVd\u0015%YŞ\u001emwww20\u0014\n\fW7/\u001a[\rJۮ0!Z)l%Fe2l\u0001ђ.3lQ\\!^IЪøPoٻ\u0013&4\u000f'Fk;lU\u0019ї!n\u001b]z\u0012\u0007<X{\u001d\u0004ɶ\u000495w\u0014;\u0002,i>1/ڲ9f\"\u00036G\u0017\u0018a_Φ/]楙\u0016c6ӑfY$1:TJ+S\"WyL0U.Ω$-:VـmjI\u00100ecB@\u0001x%\tK@%+B.yINjU3c_\u001e$\u001b6:q\u001f-,7!X [ɶfd۶uHMnOQokKK\n4۾h\u001bF\u001bMgF\u001bMGF\\.XQ(+S\u0001U\u0006+|C+U\u001aZ\u001d^\u0018,6\u0011\u000bb[[b[\u001fҍ[ۀ2T=:spoj\u001b\rmCs\\C#\u000f5G\u0017|\u001e1oϵ~CyX_֩ouW\u0015`\r'W-w?\u0018;\u0007\u000f+\u000e#֎CJĚ\u0004H]\u001a\u0016\u001f#w@\f\u0001Mϰ(DOs[d[H*Y\u0015NYscmvMem൉l\u0005Ve)\u0002\u0014O \u001e--\u0001l[ *\u0010i]VA\\ Wt+P\n-#֩<#.Z\u000bb%cH;p--ŤE5\u0004Y\u00131-tSm\u001br{m%\r\u001bn\\( 7/\u000fDܨ6h\u001cm:36\u001cm:6\u001aU`e{aVWqVW'R-\u0006*Cp\r\u000f j1˼eӉmJۊ%\u0005\u0006l!-NuG\u0006\u0007?}w'\u0001maa\u0007o\u000b޻w%\u001e>ؽD~\u0010{`d~P\"bs=aѸUGm7mzӉg\u0015}}->$n͡Eb%\u0015a\u000b>ujYYzF2-l:-6-'ӑ½\u001e\u0014+Yɰġ8x\u0000(U\f*(+L~&%Imgcp\f\u0016\u001d\f:\u001eR@`4DTB\"\u0006pN\u000b,\u0016~r\n[ZXF\fV-#7a]h[a\u0005W\\\u000bѫ\u0012|LH[`Qxd[3)?ڶk=!\u0007n.Q\u0002l[ϐh\u001bF\u001bMgF\u001bMGF\u0016(t\u0016gK<=er__w\u0010l['^Q/l\u000fEk ƶ2l-\u000eKS6z\u000balÇGϞ#mjo\u000bw\u001a\u0007\frg\u0017\u001cK>}?\u001f$}\u0004h,_\u0012y1\u00164]}5\u000fկ?{h\\\u0005]\bg\t\u001d\u0016\u001e\u000e\u0017!ۺm\u0018X4\"lOHj\u0016\u000bEY&uZT-*2\u001d4\u001fm˴K\u0005渭^\t\u0001e\u0011\u001ah\n\u000eѨ\u0012ʾ\u0010A)\\Myg0cK\u001a\u0001'e^\u000f:\u0019NT-'0/\u0007-,*pm鹙vz\u0016\u000bׅ=\bh\u0015\u0014Eaxl^t \u0006(m\u0019+Log0\u0016\u0015\u0016(x\n[3\u0015.$ƶ$>Qauȶu`O{ަ\u001d~\u0015*~0O\u000bQmѨ9tflѫ9tT\u001bm4J놕EY\u001dEYH_\u001b\u0004\u0006C55m#?\u0014k[ǘ)omj\u0003Ѽ\r &ҫTLɶ\u001e3bhؽE'kG\u001e/GK?m\rx#w\u0017=qxVϰsx/Ņ.\boW\u001fy%ƶ92])li\u0007Ny\u000bMzEDEW6\u000f\u0016\u00166'Ӂ\u000b\u0018\\IfY-*7\u0015fQ\u001fJ\nWil+䓓ZmAN V-+6`9\"rxضfb[P-\u0015!C2N\u0019 61UyMW@za[\u001c\u001eAٶfl[[3\u0011\u0012\u0015菶mǖH}nwUҷykIsڒ\u001b4۾h\u001bF\u001bMgF\u001bMGF\\\u0006\u0016 v\u0015{7yK}`r\u0010p5?\\jrm9Ei[?k\u0006DY(,D8RԶ>!á\u001f%~tɗiZDZ׿'mK>{£sO%}ݢCk\u0007O|\\ԕ\u0016\u0014\u0000K\f!\u0016m)rY\\]F,m\u001eA\b7Þ\ru1\u001eQ'G\n\u0005]\u0005\nW\u0005M\u0010\baqzC$غ*y\t:\u0019d[RY\u0002[Z%\u0005\u0016\u0016Omz5e{m\u0011i%Z\u0014eJ\u000eLѹ\f:mhբJvmig\nɊΥŪTS6ȚVs1\u0005p\u0016\u0013-\n۶7\u000b7Gr{B\\w{پ%7n\\SVWgHύjFѦ3c^ѦhQU\nVt\u0014gAŞH\u000f_\u0002rj\u0006a$ڶ+mXȶ,\u001c\u0010myKUyCy\u001b\u000e\u000efmwGfQ'S'#I)m+?\u000eB~JoZiOZS>}raɱ]tmVaɸKzm'_M]g\u001c5@۩\u00136\u001d_6\u000eoi\u0011aeF\u000b\u0005\u0002y%@x&ƊZҲB!\u0010Hp$4!\u0015J2еh\u0014X\u0001?`9s+J_=z&,)ۙ`[\u000f\u0010\u0015$\bcb:X%AE/a@+\rzlXrضvM孺J\t\u0012yPyÓ%J+h\u0013B;hOm\u0001\u001b>dHKU\u0001lAP\u0005\u0017'`\u0000%m8\u0003>U:<I6\u0015oU\u0019֭!wm\u0015ϲ\u001aسO.,Vs.,jI\u0015o\u0004P\u0005%hQٶzZSENKEvk:'P3sEMኊ_-IO?7>\u001a-GNF\u001fOGG4Nl̝\u00186\u0015x[f\u000e\u0016KJB<k\bzU}lm\b~\u0001ƶ8\u000f*\u001dP4]3t\rgS\u000f}vkC\rCǿMBrۦkc:nn?|Ƌ#jO\u000e:2t?ܗRy\rˆmHȶ\u000et@-yfT\bc۰,\\\tNx\u001cn\u0011TKe\u001a\u0013:2cR\u0007\u000e-ӄط\u0018@Zf\u0019t\u0003n{I\u0015\u0014\u0004]\u001c\t.&\u000e:BZ&\u0017\u0007*̫c$nOZIm\u001f\nO$M&66m\u001b~gl{zZseN[evK\b]WT`YUnMk\u000b'\u0015\f\u0017?Ih6h\u001c}:I\u001b}Z>\u001dF\u001fҐ\u0019)F3\u000b|-EYCvmiXYL쩒\u0018ێ\u0002z\u001amjq\rb\u0006^\u0003\u000ej['m\u0010W\u000156\u0002XAYt^t;n<z?\u001bƎwM'N7g:y{}x;c\rC7?2z\u0011+<3xϏ\u001bm랙+T(reʍ#\u001a\fpäA\u0015\"Np\tx'\u0000Y\u001cĶ`L\"V(.姢WK\fiQ\u0019;T)\u0003\u0014\"\u000fc|\u0006\n[Iy;WHKyɍ^\n\u0002]m.\tl8.Ǫ\u00068xĶ0qKO5|6YpE7'1\u0018+m\fZm\"\u0017\"T\fh[W<lic\u0015yn\u0000Ϫp\u0003Պ1ަ+\u0015\u001d\u0016mض \\ʶ\u000b5U\"\nفhfyKɟ\\8_$sr$mk9t4\u001b}4\u0019\u0013\u0001h7Zk-\u0017;J\u0003G\bybwS)v$m\u001aMl\u001b\r`m:mi0pu\u001aTiwϥn/ӻcL]\r 35}`3铇ЛN7|o<zvpѻ1j\u0011k=g!\u000b\")2oU݂l\u001b\u0006\u0002o=2oqaY\u0005t\u0019=넆\u0018\u0015d\u0004/a\u0013\u001e ]\u0012*YQM-u+p9\u0003tz1Tg%fS!\u001c|mx4$Y u.\u000e'\u000f\th\b)ÆU\u0016.4\u0012>QɊԳ1lLe\f.K`USˆЕ4ʎHI\u001a5ږm\u000b\u0011\u001cmA(~\u0010ڶU9m\u0015٭6mI`\u0015\u000bkK~1pA'I\u001bF\u001fO'i^ѧTOؘ\u00196m\u000bmE\u0012\u001fpiP\u0017S%VmGm!ȶ6l[\u0007m\u00106@l`k\u0002NYL8\u0002\u0004һ\u0006?_t>uk߰m\u0019V}\u000f'\u001aO7{hY|B3[@'\u0018:n\u001a\u0019Sm_,\u0019m¦ꆔʽ`!*nނ|\u001b{Ȓ3k57mw\buP\u0012q\tl;2\u000b\u0007%IZjxƂ*ybż%Ĝ\rS\ncHU\u0003ض YoK\u000baɆjn\u00178pƉȖO\u000f%ų_\u001a.-\u0012\u000bm\fi\u00153Ao>6b܃NNJl\"\\\u0005!uXp\u0002\"--$6Y|4Ŷ\u000b5UT6W\u00046\u0013\u0016ypJѠ$ύfFѧGlh*\r32\u001bgFyhP`q\u0000l\u000b,\u000bu\u0015?\u0010{Ҁ\u0005B@\u0001l[?-C-An\u0010E-'y+#)6r`\u0011n\na;\fok\u0003G\u0000[FHcd\fg\u001e\u0018o8!1{\u00177sh!5)\u001bS*=\u000b{-\"\u0007\u001eG\u0007aZՉz\u0019Su\u0003e-+[\u0016J_`]=lu+\f\u001eUZUݰw_m'8\toX\u0016RgM$gLLC\nQi%'c{ 7$\r>\u001f wmm~EU\u0005\u0006\u0010i]dX\noȶ\u0019\u0019l$\u0012X\u0012ݑ\bH\u0019Ҋ\tP׫\u0003H\u0019HD>\u0000mKx\u001b+΍-Yɰ\rX^ƶE7UVNj/ZKY+s߬5tпI\u0012FGIrh6h4ܗ\u001b&F\nM\u0005ޖ޶b{sB]bw\u0005$:v\u000fؖ\u0016%˼Ťex;\u0010l;y\u0002\u0013U\u0017m\u001c\u000f+Old/>6=1\u0000lm?{d8{p!hd+#6^随.\u0018RӒ0R?՟NJ\u000f\u001aS?hm_\n]R\u0017yn\u0015^ZRg^^V:ʝMٴgoY{[/iu\r=w(ڷ*kYG+$jx2IKx\u0010)\u0001b\f^b\u0019\nD*y >ɋv]%A\u001d\tr\tn\u001b\u0011.0\u0017\u0017-B.֍y\u001b\u0000\u0001\u0018gcE=\u0007ȵ(\u001czG\u0006^\u0019\u00127I\u000f\u0017\u0018Bd\"\u000e$GpU?<(\u0003?}\u00143\u0007{Q]S;#1J\u0004tF9\"!@@T0( YUXX`E<hZk'NK\u0013\u0011kSGL3UgGǾ`ҿ;;g~\u000fw%\nWR\u0014pf+m+m\u001bI򖴭N\u0012\u0019ò(ѱuP~3\u0007\u001f̄T\u0014o*O*N[_\u0005\u0012sp9|;\u000b6|\\\u000e\u000egWét'I\u0000i\u0007Ӵme皦\u0017.ۆmѼu\nJ4o0\u0012|5B\u0016o[t2E\u0002mۡGf\u0000la{D>~\\D\u0016\bo\t\u001fac\r\u0005\u000f:IЮ+h\u0005t\u0004RD\n4\nʶ\u001aԠk\u0014r5\u0016/\u0012vۉ\u001f\u0017\u001c\t߼?dsp^Á\u0017t\t;[\u000e{*hhq未%XYsQcq@΁ru}n=ӑ;l\u001a\u001ca)\u000eJ镶-\\*i(JUCfHrf\u000ef\u001eQxjHZe\u00145P|%\u0012,(ڠ\u0014/S\u0002\u0012%\u0018+#ak&\u000bW\u0013\r^%SOhغltǹ\u001eJ9\u0007K\n\t۹P\u0012\u0013\u001bl$orA&F\u0002=l[ؿu3/a8\"lېeۦkr^@n8\u001b\u001a.oglj8\u001eڶ\u0016mΙ\u001dƬжYT\u001e~qBʶ\u0010,D\bV`[}\u0014\u0005[Ҷzƶ\u0014o\u0019B\u00011y\ti\u0000\r\u0001Ӷ\u0005\u0013X\u0003߃０<'#o; 67a\n\u001dK㰡/^{C*\u0012Z9G\u0016!\u0018V\u001e\u001a'\u0007jz#l\u0011Es\u00023:S[ФFf\bX\u000f!M>]\u0003Jl%g\u0003WU>#>>U`v\bk\u0007\u0017Z\\f\u0013\n\t3-td8˳sK03[hX\r3(h&\u0007\u001asy\u000blERTlKV%%WjJ\u0004mN࿎+\r[j gr\u0000aQR*K\u001eb\f$mMjIJ؀l\u0006ⲭ}l+&lK6\b6F\u001c\u0011#Zضh-P~p.>Dgo\u0017Z\u0013yn8\u001b\u001a.oglj8\r)}D\u0006u\u0000\u0010Vd|By0n-\u001adR\u0006FڶFl\u000b\r%۶#Gga\u00070矱;/D^̇%|\\3nKt눳w\u0016\u0016|p\u0013k]F&Ѳaڱ$N\u0000al\u000bU+P_F\f+Weۻ\u0014\u001c\tIn\nXSԄGAS!\u001bд6$e\u001fbD\u0007N40R|\u0002;\u0014D{jO\u001dq\u0018qz׏9}vx\u0018~v6\u001eZpGS'-Ileskϡ@fFյO\u000b؁\u000e94{?@nPEFEPUE15)ޒ3 -\u0000\u001eEt-v\u0014.\\R\u00188KfZ6ftŉҳta@歊!\u001brMҰp=-\u001b0j\tmE\u0006䭑eۥ0\u0017'\u0017lpKHy(8aK׿c(J-|3\u000b$熳rv\u0016l\u001c\u001dΆSN^ѓ\u0012\u0003`\u0014;sn\u000e[Fs٦y|-+\u000b)C PI!5lcVs%ƶ\u0007\u000f=x$m\u000br'z\u001f`\u0010ÏDƞxg3&\u001e\u0007bg\u0005gۂ_cM\u0005Փh8\u0010$0\u001b\u0003ps\bƶvJ\nA.:\u0016Yj\u0013oK܉kD\u0012w\t\u000fx%5!o7\"ه,\u0003Gه2;Rx«Wݫgh@Ӥodō\u0002\u001a\u00054O\u00054L5OՏy\rV;|k>eg\u0003\u0018Xb51Pe\u000b\u0017\u0019lF\u0013b<\u001bML^V9PBrZm3P\u0016Q\t\u000b\u0005E'ė\u00125\nZy)\\Ox[\tl\u0012?K(׾u$)N\u00012Vb\u0006;׹\fc=UKV\"Ĩ`HH\u001amkQ\rel[\u0016֙0Mض?귥m/XW/\u001bΆYrv8\u001b\u001aN;e\u0005H/Av0]7lՍZ\u0013Y&\\¶\u0017Y\u0005U\u0006q\u0014P-e[9\u0014o\u0012\\V-\u001aFڶnߞ\u0001$m\u001bQ*җA\u0003ж$lG\u001f\u000b\n0/\u001evS\u001f\u0010m.5\u001e\u001b\u0007J\u0007\u0016\u001c<\u0002<\b\u0016h\u00176N#\u0007\u0007֘WYRp4$Ҋo@R[@\"VBimHF\u0007\tl\u0014\u001c?ۑ!tyv\bi\u001c2\u0019u=uZq-JPkA-\u0017\u0003?Zs|w\fj Ay\u000ecM\u001dxDT\u000375,\u0004c5J\f.FÖYYe?ڠR\u0019j*Y`[[\u0003t.ʥQ\b4\"~Ш-\u001bl23P0Ӄijq7lv#pID0Tf[b#9ɰl\u001b}Oy\tCж\u0019FG\u001dMeIE_ ?7\r_\r÷`Wp6|5JԘ\u0001֙\u001dIӏfGLʶ EmUaADr\ti[\u001dm[\u001dc[[6l5ĶIA\u001e>:h\b\u0005[m\u001d\u000f1.s`\u0019㷂}73n⢕&+5r0\u0000z\u00166Z\u0011\u000fD+v&u?\u0003t~$\u0019Y׀݈\u0019҆:\u0000ya\u0000\u0001=\u0019/\u0010{Ƴ=/\u0006KUR\u001eF\u0010BR\u0016\u001b\u0019c\f\u0014c[`\u0006\u001b\u0010\u0010\u0002E-mD\u0015UZ\u001f*R~cOguu}ݑx+<I埠\nOQmvG\u001dξ\u001d}\u0013!{G\u0015'\u0015Ɩ5\u0019P=P\u001ft'\u0012`toOv+\u001b-O\u00152sĘgtV\u001c]]*63\r1 Oq@x5\u0001]mgM\u001el[\u000f\r\t\u0017F\u0000dIЃjU\u000eʮ\tiJs+\u000eMj\u0004U\u0003^IV\u0004^b\nT;!hrE+xkk[~V'\u0010.[չL\u0004m:ZuDlj޶`\r\u0003%EP\u0001ݕܚ]]4\u0017\u000b\u000fH\u001bF\u001a#M'h#^̑#H\u0011U:7%fC9#9<Dw,;Y\\J_.ʒ\u0003lW϶e&el\t\u0017\u0011J͆m\u001b\u0003l\u000bF^?K_\u0014+U|PtQLX_.%\u0016K\u0001ZRa6\u0019֒\u0012\rTEZq(d~{uTA\u0007\u0007YG&9ض\u0004sLVq*m}v#\u0019j\u0013!(SNNGN2|n}:=?Ӏs[n\u00186<<\u00151X\r\u0012%R,͆xӋo!\u0012}T&\u0016jCO̾б\u0016\u0010\u0018\u000b\b\u0013>\u0004m\u001eىm\u001a\u0012ۢ/\u001f}9\u000e\u00060<k\u0000ت\b\u0018lX\u0014#W\u0016ȹ(\u0000O\u001a_\r\u001e\n\\wF\u0006Q@@z\u0005\r\fkXY%\u001c\u0018ENӓuX\u0001u35ؖe\tmЩfٶ޲\r[R\u0007\u0002w_;y('o<\u000b\u000fH\u001bF\u001a#M'h#^̑#H\u0011U`ی\u0004mO/џm\u001fM\u001cs\u0015x\u000b=iԇIʓ\u0002l\u001b ubۺm km!hS2\u0005\u0005\"5\n}k\\q\u001f_\r\u001b}\u0019zBEF!\u0015`KN\u0000\u0006\u0016ׂ5Wm\\~v\u001aFy\u0011j1ब*om=9 OՎ/t\u0000֐#ƛ}KN\tkADsms?h;\u001eam<u/w<Tun\u001cHƄPɰ\u00143\u0006{\u0006V\\Xi@]\u0010Òff\u001fgCn\u001bd7<69\u0015}3fDZaTۉg\rjb[ܔ(b[YDĶ6\u0003[0paI\u001b ـ\u0001\"Ɂt\u0005QspI+a\u001bb֢w\flmm5v:6bZRh۾uE`!moӟUWd~? \u0011mш9t6\u001ci:4\u001aQſ)B:ޛi%\u000en8\u0017\u000b<\"de\u0000ۮ^Z\u0016ŬKTk\u0016VO`(C͘%\n\tP\tD\u0016uGro{\t\u0014\u0002%\u0017:!s~=˶\u0018F4,Am}p@;\u00136]VyEm@\u001a\u001eVH}6 \u0019\u000b94x߸7\u0014V.<|m\u0013'\u0019չ:mL`do=\u0003\u0001)gO\u00101\u0018L-15^Y2\u0011\u001c\u0005\r6]6j)D\u0018c2AE`\u000bu\u0012<H\n\u0013p\rp.\\\r!j3z5BղEr\nj޳\u0000\n{ZaX\u0001 \u0017Dxkz\rv*\\`wz\u0006JSÅ|WWksJ߶\u0005\u0007I׍h#F̑\u0013F/H\u0011mш*M\t]]\u0019\t}ȶ\u000epn\"v;\t)m>L\nmJb[\u0002[\u0010\u000bۖ\u0012֍<k\u0002r\u0001ئZQŗc\u0011mck+\bTcׯ q\u0001\r\\Ꚏa\u0007\u0003\u001ap޶dۨ:֭֔-,i2FYOe\u001dr\u001bjvvS;\u0007S\rQ'\u0019v-;*eӡ\rB\f;|EqZh]]\u0013[sc\u0013*S7fsCc͗90كl\u0010iI\"!\u0014ū\u0007\u0013HJc\"6\u001cgfV4|\b:W2;Bm6ӛ\u001a%a8\u001aveHHK.VVY^x\u0005\u001aÖ @恭^A@j5z\u0005\\WXp5\rr\u0015\u0016h<\u0001U.-ZBۺѩ\"ÑmJζU\r\u001f,]\\\u00052\u0005\u0007I׍h#F̑\u0013F/H\u0011mш*\tݛ=Y\t\u0003\u0013\u001dC9#|\u0004ض\u0004-KZ*&b::lۂ2m$!jD\u0015āS][)4\u0005\u001b?0iJ\f8Ԝ\u001cmٳW##\u001fJ6F#mĶɱ\u0000[d7/X\\#\r`yQih}tNOfj'\u0016\u001f%u\u0013au\u0013K\\\fi+!o/?}o\u0005'WouLiZ0?Xtͣ[g\u000f7N\u001ce\u0000\u0016\u000b7eIK\n4VSPL4A.z\u0004 i&l\u001b6,Mk1fj(\u0011X Y\u0006H\u0007V\r\"%\u000e}.\u000e\u0007\u000bf/ļ4.\u0019:ʫV\u0000ڄF.\\I\u0019\u001ah+Y\u001a.Y\fo^\u000bB}b\u0016\u000b8Wam\u0011غ\u001a\u0017:.bum*-K\u001b(]?T_/pu:!U핾\u000b\u000fH\u001bF\u001a#M'h#^̑#H\u0011U.zi\u0000frQ\u0017A\u000b\u0002ZRJ[K\u000fidd\u0017q+\u0015A\\l:粉,`\u0004D\"\u0005QAO.¶h^^-ysin\t|w;ix\u001c9{(S\u0014k\u0016jB\r!\u0000[a03z8Q\u001dڶ\u0014-m\u0003/ L\u00102Sw\t6kinl\u0016\u000bS\u001fԹ4\u0017LjY\u0005U=u\u001b\b\u0006q|\bjI\r\u0005۶l\u0017mjI\nw;-\u001aY.mWTwF\\Q\u0013Y\u0013q\u001bPWsC-1mOcW5<^y\u001bȫ'Wfֵv<t.g~??\u0007^/\n\u000b?b\u0007ͬ+\u0010\u0002[\"\u0010\u0004Ĺ\fT\u000bh%\rd,EXr%\f\u00196ss\u0012$ȳiR\u001cSmS!\"\"\u0012\u0006!\fDQ&Xt@\u0004\"Ie@R m#4\u0016+\u0019Q\u0015l\u00162|'4j\u0001PȓI8D\u00146i\"41ȶ5`ۼ\u0001;{*t\u0015VǖǊ\u0017D\tۈ[\u0013\u0011wgFp;a\u001bqk*wgm\u000fd{r<%Y{VzF\rvXq4u4mT\u0006q\u0003\u0000ˡ\u0017Ė *x{V^i9\u001c}{e\u0010Y44_\u0002\u00029C\u0006Ty+?su=$fҩQ@\u000b-fԦT\u0014qVU:T4\u0016X]\u0011Ǻ\"#koD|z;ܽ/=|GZW7CVL6MĶLK%c1\t&t'4ǸfF,L^\u0007N>0X[;9?\u001b5?\u0001y:Ķ4\u0012(\u001aj\tQŀsD\u0001\u001aN\u0002x\u00150=\u0015/\u0005i]`[XJMEՒ\"U+O&^H\u0019\u0019V\u0000[\u0006{\u001c@\u0006AU(RĵrqK޶8L%9dm(\u0006VO\"ۦ`ۦғY?$Y\n_8?ZM\u0003vu[oK-ş/2s\u0013\u0011&#β\u001cqw6քU\u000fd\u001cr\u001f\u0003\u0016kԠE7d\u0018\u001eT\u001a\u001e9\u0018X\r3^c\fi[\u0003L\fl\tt\"!\"Ai).ړo}\u0015\u0015\u0014F\u0012T\u0013ؚTr*\u0016r3wT\u0001(a2\u000f=b\u0001\nkbr|{\u001a+|\u0018'f5wG~v'doԩ/@M1͓k\u001b\u001e0\u001aL6\u00178\u001e9/c_\u000bPoh}*1'{22=8ʀyJz֛z\u0011;=w֮j<oi4\u0007O[\"P+yD\u001a\u0016_\"j\u0004~\u001c\u0017y\u0013\u000b\u0017-Bn5{aF\u000edm˒V6xƬ\u0013b\u0002]1i%\u001eiV2#v.Q\u0004{<0r\u0003ʋuHsE/A.\u0013,ZަÉmXm9y%%MM6o&]}Gw\u001f1`|6Ǫ\u000bzʴ%m?7a\u001bqk9,ۈ[\u001f\u0011w'l#nMX\u0005`۽?]{(QV}\u001b=b78UXqִԶ\u0004AY8Ɂ\tlm3d\u0005Y\u0005;\u001c\u000e{eey\u000fzV- \u0011\"Q E,#\u00169I>B0\u000bŌEr\u0005gnt\u001ev8.ƗZi_\u0019\u0003+\u001b\\\u001c]sq,ezkvv8lBBR;%uo\t]ϓn߻u)\u0018\u001b\u001f%f\\O]I3#]\r4`1i\\\u0005[V%3-$`j8\bŰŗx\u0011<2+g(y\nS\fXi(J<l\u0010f,\u000e+\\\u0019FG%\f#As@T\u0016\\\u0001\u001ci\u0000ŷdQ'\u001c\u0016d0\u0010Z&\n=o[\u0014\f[\u0014\u0002[\bO\u0004J\u0013\u0005~WSl\u0005}V]oy./\u0000\u0000\u0000\u0000\u0000\u0000iL\u001c\u0019\u0007@N\u0006k{g=0]؝0\u0013\"e9\fƸR(\u001bcƎm0\u00041ذb\u0003>\u00150\u0006\u001c_O\"U\u001e3BZ\u0013#1_ٙ>3Z^񥔗^X eH\u0011s,H\u0017s6hDخl'ɵ\u000f\u0014'\f\u0017J%H9sqݙ\u000f Q0a*`bQT\u0011I\u0006-W\u0012\u00111h$\u001d\u0012('+-qh2D$HpB\"!`5\u0012F\u00124\u0001+Y=\u000e$3A\u0018Y\u001f\u001bܜR\u000b|\u001d\u001dSo??/\u0007߭a+Ƃ\u0013\u0013!-au\u001aNNMgdfduwz^kk\u00065GāC#Bo\u000eN>3v\u001adf{{~H\u0004k\u0018\u0013$\\\u00027M\u0004\u0005$mFD25>M\u0004:蚌QxM%m\u0006Uch\\\"\u0005k\u0015u\u0012\nƠ\u00066Zڨ\u0004M;mЀ0\u0006߳A\u000b*ҫaG\b\u0018FFR/\u0012\u0012W0v\u0018t\bl\t%PٴJ\u001cF\u0011\u0003\u0005y81a5L_wuZoզ)\u0003e~evں\u0012?-L\"݈6h\u001ci:6\u001ci:4\u001aQc[;3'ғmͳ\u0017$\f\u0014%|Wd?KRzq\rl\u0016V/ޟk\f\u000br+KKJ\nrsӊ2>ذne\rPmPpÖ,\u001f\u000f7#-XbؐR^Q[ZZ\u0002@;\u001f\u0017;Ξ\u000f\f47Ck\u00067\u000fo\n\u0013r?nHxmF}XTD4=Um3))qr9QΫk\u0018\u001d\u001cJ\u0005ц)PO7}\u0019\u000bhIA\u0015r5\"Y\u0015\u001f\u0002}2f\u0012\u001b-Ntlkix\u000bl\u001b\bl\u001b) jO,W!o)\\#-cdyi\u0017u8\u0007\u0000W\u0006\u00173Fk_\u0004[*J\u000b=\u001bm\u000b\u0017\u000bIT\u0017~e|U#-bUQ<f\u0005]`[\u0005\bqb\u0014\u0011\u0017öNTm>[\u000e,Ǚ\u0000l\tl{_e\u0012FF#HYF/H\u0011mш*Xwv\\Wœk͋˳\u000e\u0014ھs\u0002\u0017Krzqu[vp\u0017-NJ1=59?+\f\u0000\f8\u0018x3ccjʚ(NO٭\u0016c$LZ^h[Q\u0003nQr7-++Κ~8鋾>g=>ȵ[!Caûɏ\rk(ZGDQ?Tv=SNGNۦUr`P\u0016tFHXͪӀ3ȶ \u0007yfB\fr06іT\u0004\u001d\u0006<Kq\u001a\u0015\u0016-\b<\u000f\u001ciI?r'p7ՁCX\u0011<l9F!mr4\u0000\u001at\u0000+,.^Y;:0ƀن٣\u0001\u0001_\u0007yU\u001b-\u0010\t|\u001csU=Ϲz\u001fcY٧:޳\u001a|OZڟ~ŪUyBa6\u00126:2g0m{wn\u001a@/z]6L肶l_e\u0012FF#HYF/H\u0011mш*XX\u000bm\u0003\tmK2zT\\rxȶ-\u001f?Fi:l7gg\u0002o\u0002lO$Cے,TIN2IHjA϶ČupMb\u000b\tn\u0001nTr\u0015delݔHƚmMcǊrʚW\f\rm\u001aL\u001a;!khyyjADXHxO~zZ{bBXx/N۫\u000e{'V{/}p6)Po[mȪF\u000fqj&OE<$Հ\u0014@\b\u0004\u00154a\u001f~\u0007h[Z<Vd\"h,i!`\u0002y֨;A\u0005T-+wP@\\_Wm\u0001\u0007\u0003fk\u0002f\u0006\u0015B>Œ\u0015zvs\u0005\u001dyö0ԋD(Y\u0004[\u0018\u0002\t%\u000eg[%\bm+\u000fv\u0017ʔ2G_\t)t\u0015Ż\u000b_\u0015/L\"݈6h\u001ci:6\u001ci:4\u001aQ#+Ν\u0013םeɵ\u0017\u000f\u0014\u000f\u0016ن\\Ԑ\u000bv;3ZḺl\u0005\u00014B\u0013q\u0018u\u001bc\nҶT\u0017\u0017Y0s}2`,V-)\u0016$DhX]V4-$\u0003_\u0004fWٸ\u000e質ߗ:l[Rk\u0006\u0000T\u001b|ƪ;a]ϔ㲦\ty˔T:\u0015ycՙG3Te\u0000OO\u00131#\u000f\u0015-PcNNF\u0018mZ\u001f\\o\u0005\u0015-Nu6\u001f\fX\u001aIZ\nlA5\u0018\u0000(U\u0014\u0016x\u000fTO¾\n\u0005ut( ^K\u0001\u0002ۚ!uhk~s\u0015.Iƨ\fm穖#-P0:Ơ{]ȫs#\u0019EA  /­\txy럝{(\u001cnM\u000b0`TS\b4g[YPUkGS\u0000I\u001d\u001d\t϶:eF\u000e~%\u0017[hުM\u0003.{q{3y%I\u001bF\u001a#MgF\u001a#MGF#tfƹbzr,}yN۹b꼋\u001a.G3*+U\u000eoMlK--\"-ۖ['\u0017\u000e.5$K k,\\Y\u0016аltsͰ\u0002b\u000e\b,6\u0011uz7\u0007>tmUݭЦ_Omg\u001c%$'N_\u0005c]\u001d\b,\u000e\tIfډo\u0010;C/34M\b\u001b\u001b\u0010cs\u001fA8$\u0003Ʈ\u0017N?u߱ɫxgؙ<+1i4kIK3ip\u0013-e\u00066[g֦%ifzWC#\u000fN=M\\յ\\u5'ƄV\u0019\u001f:B`>\nn\u001cD)\bljQ\u0002<\u001e\u0001\u0005$+=L1?oe(`)r\u0019\\-a-vYn>b΄\u0016\u0010Y2\u000bpj\u000bm\u001csabƒ\rRb:Q#I\u0010\u000bE^4L\u0019PQ\rd\u0006\u00048hx?e˿~\u001dv\r{\u0016UDZ~j YGN`m\u0010OݽEeP\u0006\\Vǔ:^@\u0019o\u0007ٶ\u000fH\u001bF[mF[mGVt}9Z\u0018;Vx\u00147\\S]z\u0006v.0q>8\u0003\u000f\u0018muM-\b6\u000bo\u0003`m2]nu,%tu(?<\u000fP׆\u0001ضdB1؋&m?a._g@WY\r\b\r斔itcp}ھim{liOKXǱbrʩT:Rl|+SM&++߀/\u0016\u0005\t\u00150Tq8H},Q;\u001e ws\u001e*\r?ǖ\u0012ݶ-d-\u0005f\u0019k \\kb[RpלYXPr-av/\u0007`\"Rl\u0010(Fq \u001a\u0007Fq(vv6\bi։-(\bc\u0019,\\[ږJ,m#YFF.#\u001fN&@\fxہ-mrm\u0004\u0002q.\n~\u0015\u0017cl\u001bQ\u0007ˆkCCȶվXeI钷? ~nT\u001bm5j\u0003\u001bmj\u001dF[\u0002\u0006\u001e/;^\u0004\u001dߩE\r\u0013\u0002\u0004>\rlkm[\f~\u001fo\u0016\u0016dQǕ{8\u0005aWFd9R-&-KI+7LlVz\u0002H\\$=Ӧ_}u})D6x1\"m[kھ-W\u000el\u0015/^TabqsB\u0007ԭxR\f4q֪w~D\u001f\u001b+-$7\u0016\u0000k-͐X`XyKKK<∳\u001cHT\u000bu\u001c\u0005'\u001b\u0013\u00168d:%{'\rQ榙\u0017Q7,O&fq\rR\u0001z#L0o\u0001a\u0015nF%Ikq\u0006K\u0016<(\u001b\u00058\u0017c:\u0004ItR'u.BnN֋\u0006q\u001c\tŗu\u0017aĶ{H+pIu\u0014#\r9r\f%[\u000e\u0001\u0016$\u0001fQŰ\u0000ov\u000bV\u0016Pۚ2\u0015~!P]hF\u00188SWU+KN\u0016/\u0001shQs\u001chWs6jT\u0015-6vdJHn0zN\u0018\r\u0005'\u0007g/fCoך\u0005\u0015a 㰣8{\u001bG\f\r[\u0003FݘXԶi%Y\f\u001d\u0002N\u0010W,ְ\u001b\u000f\t\bi\u0015\n\u0017+\u0013_̽wu1!a\u0005mY7oZ\u0013;xT\t\u001dH4~\u001d^m/>\u0001.n\u0000o&z\u000f}\u001cI=Xknbǰ\u0010'l-\u0016j\u001e\u001b+ -[=9\u0016a;e\u0018e\u0018Գ\u0004\u001e~\nch\r\t/|Gd䒏\u000b\u0012!Q\\\u0010\"X|\ts\u0016V\u0012]E\u0005>ª\u001b%د\u0013\u0007t#4\u00194k\u0019Җ^z:dvI۱7\u0002>Q\u0002\u0005)V-n\u00060l + 2ȹ\u00010d\u0002Xr\u0004LIvkym/\"\u000e]\u0018\r\u000eԔ\u000e\u0004b{*}]'4D~nT\u001bm5j\u0003\u001bmj\u001dF[}s(vhT`owuY䧡?`[\u000b.D(eBuʤMaW\u001e xy\u0004\\U\u0011Zd+\u0000\u0017AsrIg;}gc\u0011Wnvαז\u001bWח3;6uSՃ\u000f?X<lxԙ7ů%\u001f}mpbOpdۢsu؁-,m\u0004L]7\u0007o.؈?2\u0010\u0017c\u0012\u001cl\u0014\u0016K\u0019-pbb\u001ej9A<H-\u001fMCn$/ǽ\u0000\u001e\u001e?,>\u000b\r9Y\\ Ø!t+\f\u0011ij\u0017!q8\u0013ҚAZ5H)i\u000eI)0PnE=m\u000ev\u0002ң[Ŷ\u0002/>A\u0000\u0004\f\u000e`\u0011\biPڨd\u0000\u0001d[k)k-1{L{mkJGضuZ\u0000Ttl\u0013EQmը9v\u000elի9vT\u001bm5\nxaS%ç}#UgKGk\u0002cO\u0002C`Лm[dG9a\u001bQ\u001a\n[\u000eo\u0003ؼ\u0018,\b\u0017\\\u0014c3LQ*\u0014u8WؖXb\u0011R.]ey+#QUSCԼnm^3XYR{\u001a_zjӳ\u0015F\u0001l\u0001Ĺ06tApq\u0001E2rn<+-biϳ!\u001cK^q*nE\u0014\u0010:0$/,S+̡OӮ#\u000e^ @ b䒞9x\u001c<>\u001f\u0014\u0017\u000eqd\u0014W\u0000Hw-a\u0019}_\u0007ޕ}\u0007\u0017x!ʼ2`fԇܬQ\u0012\\wx\u000bŶ%g2蠰U+:\u0000n;f\u000f|\u0007\u0010\u001b{mήGleR$\u0004}Ф\r46)4H\u0006%6G\u0010`ڻ^/6\u0018\u001bH0\u0001\u0013\u001cJ\u0000\u0005Q*.s\u001c$fv\u0018\u0007\u001d#}yF=4e\u0000l9brK:-&\u0001ۦ̙`[j0ˀmuM%b?4\u0011l\b9tm\u000b9t\u0004\u001bq4J8,[yQV\u0016;\f\u0007L̝զ5Zk\u001fȣl i;4T\u0006\u0004!%\rD.\nF\u0011pSAxmKT+\u000b-6,92\bV\u000e#CYp!iq\u0003Oʹm9;yۆ5\u0019\u001aVt\u000f|m\u001f\u001es=\u0007v֟?=1{\u000eܐ\u0013\u0016@[\u0013\u0002bLhiM\u0016~\u0004lk4x&+]AZ1ƀU\u0012\u0012*\n\u0002Bʽe\u000fXڹM\u00079\u001fQd\u0013UC\u0011N\u001a\u0002¼\u0005(fTB\u000f͠?\u0000ՎJ\u0012f\f\u00160\u0016bZ4{c\u0016{;d<\n;9/\u001d\rC o\u0007m\u000f}n(\u0012\u0016Ǣ7Pj\t~Jr9Xfr\u0004[9-\u000eѮ,\bm\u000elo~mSmYֺ\u001f8|56o]nl)3J2S퓊\u0011l\b9tm\u000b9t\u0004\u001bq4Js\u0017=K:_Qf<Pi\u0002]aYi[e\u001dxm\u000f-l˫\u00165VE&\u0000CP\re֖9\u0014\u0016\u00074\u000b\u0013n6\u0011.~\u0005\u0007\u0016_\u0012ժ8\u0012\u001fɑfSvz\u001aD?z~~zp\u0017PPGlo}]Us˵۽iзd_c\u0016\nwyݾ\u0018<c\u0001i*9.\nږ\u0000\u0016զ;0fd\u0007-yJ%w\u0002?\u001cAP\u0005HC-G\u001cp\u001co\bomjGf0$̇\u0012#\ts>4,\u0012ވabg'IfKfMfA~\u001e\\0aP\u0015\u0002U\u001fx\u001b\u001dE\u0015\u0004B\u0002\"bN-[\u0013\u0015[\u0012hX3,\f,m\u001am>s>`ԶuYZl[m4V\u0018f\u0000\u0012]h'\u0015s#؈\u0011rLۈ\u0017r\b6h\u0004s乗-\u0000m+ֵ\u001a:*\f\u0007L͇WXzkAklSV:m9qLj[X)\u0018KZT+'ŤͲ)d9\u0012Ւ%\u000f[Np\u00070-vnwNݲ\u0017<Ohξ|Ӿ\r26K_75_*640ә9}\u001c~tix#\u0006^lDZ\u0010%m\u000ea\u0003m[\u0001Q\u0010\":g\u0011l)ԡ%bjS\u0003\u001dppUK̋\u0015vd[X՘)\u001db\u0002\u0000\u0000: l\u0015v#\u0012洄9+aI#O%g\u0011(v<\u001dKdI\u0002eg1W@|&9v4v\u0010H8m/mj1\u00051\u0013\u0017n)Ķr\u0000[J7AGгT@89ʤ\bTmʜIl2o۵=uV\u0016U<\u0015ƖRCsU\u0017m\"~n\u0004\u001bq4B8i\u001bqB8\u001dF\u001c\\Z׼\u0014[\r\u001dC.`\u001aKwouj\u001a\u001ej[-Lj\u00150)-\u0005_~\u0012\u0006;W.l\rF0+\u000fm\u0011Ѓ\u0017e\ft[}=~ޕ[WWvyՕ1{\u0013[\u0014zgg;/[\u001f\u000f搧\u0018qljG\u0005\u0004\u0014i:@\u001ayr}`\u00015ŝ`\u0000]&Ƭȹ\bX*$\\\u0015ŌJ1\u0000\bb\u0004L3joFwb;qxz\u001c3\u001e\rs#\u0016\\b~0F2O1B\u0010h8=\u0000l\u001bNA\u0012\u0006\u0019\u000ex\u001b\ft>\u0016\u000f\u000b\u0001\u000b\u001b\f[Bآֈm:wj6Y[-j{JcKLTw}B\u0011?78\u001a!Gδ8z!G`#FPq\u0001۾ۼ4ϳL]+\u0005\u001f0vV\u001a\u000e ۮYئE\u000elk\n-OZ* `*39H\u000byb\u000b,٬\u0000ے\u00036\f`Z\u0001lmp\u001eU\u001ezu~q/\\pmplhukܟ{\u0012Й7u_Ɩ_}%!=I[]\u000bOo\u0001IVfB=\u0005\bH,*\u001dXjP\u0003z^p\u0013?)ZVr8/\u0006n:xN-\u0005H#,sp\u0001qBZ\u001c{\u0016,\u000b8\u0016\u0014d\u0013\u001cS)m\b\u0011ř'̿\"[ i@\u0001x\u001cs2\u0001Ae'ػq(r$3\u0016ƴӃt\u001f-$&򤥂=K6%D7\u0010_H\"L9\"'E%5cr5#b\u00066#5w#lZSuE*0\u0019ZR}ch'\u0014s#؈\u0011rLۈ\u0017r\b6h\u0004&`%\u000b\u0000l=KۊumeƎr`[c\u0017w:X\b(Ua\u000e-\u0016+~*2AU!-P6\u0004O\u001b'P\u001bq_<o\u0003IkKDZ+\n =\u0000v\u0015@x$lúq]\u001b\u001f\u0003޾6V<덃ŽٓǮ\u001dHғ䷎ܞ\u0012;cWlM8vhk ZGzux3Gޝ¶\u001dm2U\u000bl07\u001bRY\u0016GGlYJ*XB#\u0017\u0018V\u001d\u0006\u000bGa\u0017o\u0011i)!u\u000fvT\u001d|\u0004})\fa|\u001eލgL`\u00065\u001b^fN2f07yưٯ\u0012mǰୱp`(=\u0014N\u001f\tm%n(\\ܘ\u0002\u0000\u0014\u0001,\nT-h,j\u000e-g[p\u0001lgצM7mS\u0006Yߪ\"_\u000bl[it#z*\u0000\u001eR@y)  (08ޙ̀\u000ey\\楛k(\u0002\"oQ46u\u0003nY_0\u000b\u0015Vv}mZ\tYt(==\u0018_M87'{9a~gri-b}Ka\u001b͆FaݙarXw4\u001b\u001aMiRZV\f\u0003mk[_tvW\u000bȶڼ\u0016U7ζ\u001c[>@0y<\u0005Y8(M\u000f\u0015+\r,..pZb/)\r&m#u\u0011̪yKHȵw{_|Ǟ\u0019k\u000fŭ?sWk|\u0007{n_ndG[bmQ\u001bG:?篜hzj7gۮ_\u001eGϽ\u0015\u0010\u0000IKlkHm:U\rL5oL\u0000u-KS/\u0000\u0016\u0015nTjzmI\u001bp\u000b\u001b\u0016-YRs\no-#ـT\u000bs=\\\u0019.ފ\u0000I,x\u0012\u0003\u0004\u0003aA(Pw\"p/\u0004\fDh08\u0015܍\u00027ī!\u0010xX_X/H5\u0004`v|mH\u000e$N\u0014J#,GjE\u000eZh[B]km;+AE-m+}핮rGkmg_ۼ텽n4\u001b\u001a-ug^alXk4%VAZݾ,{r2۞r{\u0017-L@гJuۺsO\u00101\t\b^CM!V&-<,O\u0019K(*V4\u001a\u0017\b\u0017#VJJJMkt\rG7'm>9{uG\u0013>=9S6\u001eK˹84\u0019]k\u001f޾\u001eq=95޹?t෗8.gaVxKl>ؖҕ\b\u0017cS-DZ$5PT+UeXz)\u0007nGEԳj!ijȶ\u0016b\u0014a\b#o#\u0011lG\u0018h8\u0012ܛ\f\u001e\"\u000f=\u0017$\t\u00027é`0\nv \\[x\u00066d(-9]Ķh\u0011ʼPۖ`&8\u0010\u0012c:mėvLٶ5ж?mW浗wۡmKrmw\u0014?\t\u0012lXk\u001c֝\t\u001bz-uGaTv,,\u0016e\u0015g\u0015ewv.Sf[nr\u001ev\u001e\\!|2ﵶia\\m;\u0007\u0016ۖm\u0016\u000e%\u0011xYxKqe%\u000bm]\u0012Q%rحpԓKdXyZ\u0018Ϸ7\u001d4ux7HOj8s)g]}v&ӳ\u001aN̪O?7X7\u001dI7s\u001f;n}'\u0007\\\u0019Rrk?#]hyKa\t<`ޝo&`f\u0000k1r$/2B\f\u001e\u0013Nf\nf3sԳm\f*|\bn\u0011'{{d%ؚ9\u000fpppV\u0004x/\u0012`\u0007#1`4\u0016<\nFIV\u0010bx!H\u001a\f5\t܏\u0002Cضp=x:XmWȶ\u0018\u0018ؐ\u0013\\EhL\nPډ=\u000bO\u00131V'!W\u0007=KT\u0003֮O%mmj|_T+\u001c\u001cж\u0012\u001bm![\n{h65Z\u000e΄\rkúٰh*MK¬]ňȶݥ\nGWZ8X#\u001c^)Sl΋u\u001b8Ԕ0(!)oXhؖ\n\u00073h\"wHȰ%\u0016\u0015=Yz@rWm[)p{EYօu}3^Nv%BJC\u0017S^=\u001f{4:2l;\f\u001enc_RݱG\u00136\u001d_}7\u0016\"$d\u0004X\u0013f,/a\u0016lˡxR0w{vWI_AV/C\u0005\u001c<))cQ\u0001\u0016;׫&m&\u001a}sb$Y\t\u0016['p\u0004c{Q\u0004Hq0\u0016eh\u0014<\u0002<\fC\u0010p+\u0004\f\u0005\u0003\u0003\b);8F\u0007\u0000n\u0014*%\rF\t&\u000449ԹrTg!\u001fEXB\u0006ԩɜ.\u0000p\"ʓ)\tob[E5\u000b:*m[ж;6n_'HFarXw&lX\u001c\u001d͆FSQ`/j)j-n[YEmO}\u001d@pp\u0005mOʶ/3 \n@V\"\u0014\u0016h[BZ9حp\b`%Ɏ\u0017.ޥG%*$Ú8ٰJtIxrn]ua})\u001b[N?vnl[lp3q?Y=eaV\u0006\u0004/F\u0001~fd[VBWY=f^ 5͕`Qsж\fXVW\u0004\u0016\u0016#U-Y\u0016\u0016\u0017\u0006I|jf\u0018膻2@&\u0003<\u000e'\u0019\u0016\u0000\u001a<f:4\u0004[\u0007ж@\\x;\u0016\u0005\"h\u0018\u0018\fL\u0002B0\u001c)T}4*\u0006\bbx&T\u000fE=\u00122\u0003Fx 5HUԳj\u001aRpA'hEa\u0019\\H\u0005y)obfh\u001d\u000b:\u0015Ζ2\b[TlVl^7\rkú3aZh65JSuR\u0004[Β\\۽er\u0007mpFYw\u0015jn\u0015*\u0012mI佲mh<\"YZɶz\"S4Ҙ9\u0017!֣\b%Uօ\u000b8.43,CLT-rf\u0000\r\u001d.\u000b!\u000fd$N^m\tr\f<#BB2X=\u0001hȥ5*( Ȫx\r2O*EE\\2\nx\u000b@3-\u0006iT\u0004ۇжQ\u0010\u0004\u001a0\u00162\u001a\u000eg`d\nx\u0016\rŀ8\u000b\fO\u0011M\u0012χCǎSbbң\"֨\u0011X-s4Jȅt%E\u0005-\t'e\u0011\u0016\u0017\u0016Ml_hWm~\nogZjo)al[l^7\rkú3aZh65ʎVavKQ֮9=ж\u0015J;\u001aUod[\u0014hT[o\u0014\u0019\u0007+(\u0010\u0011 K\u0018чwgЫ\u000266CEB?@C؆B@ҦWE/$E4%@hr3}N;6\u0006FH=zîgO6fے-\u001blM\u0018KQm;Rɞ\u0015\u0012Nѭ)Y-^KFY\rMs+\u0004^~\u0014\u0000UX'2i!\ti\u0005R1l[;\tbۤI+0BZG-J\u0016.+e5\u0019\"gZp\u0017}=YlV\u001dp:\u0014\u000fz1\u0015G>TS\u0003WѶw;\u000fжۆT]#ۊP^p~>w}~·;_mmqyU\u001foCz\b޳\n9`e\"fE#=]Oi\u0016#+3imda~072Vx[$M`\u0013&\te\u0013>\t\u0013؄\tT\u001c\u001fl\u001e\u001f\\\u0018-ǇoL!`۷3Jwf.<Ѷ-m\u001bbn[>[DV>x6)ȭXQ-\u001ef\u001fX)juBZ\u0015z~mSbJ`V}\u001a\u0005[[B_5#¥t/XR\u0013mx4@\u0002%ˆeզŶH]}noH\r)!aA*j늱ڶ\u0018[TS$kRcS\u0000[\tYW\u0007Ŷ\u000fѶ۵|qNNul)v:T]Οw:f\u0001g^\bm˯Yq\u0003iy+\u000b֎z%\u0016U-\u0002o\r-.\u001a\u001eo}Χ\u001c3եb\u0013yG?\u0016Is\u0013؄\trlل\u000fr\u00046h\u0002+\u001dzbhq4wTnTnSթL\tll\tm{\u001dl{\u0018Pٶ\u00062i-w\u0001\u00032)SɱF1khb4*>VIk0zzB\u001bl=ҍ\u0004۪֨}M*[ӼEzsm(赤D\u0002i\u0011\tѶF\u0011\u0007lդeX%㝒>Tٶ\u0012i\fͶڳ6jn0lyOܵ΃bG\u0011\u0011׈\u0003\u0017]ΣFm\u001d\u000f~mʳej\u0016\u001b\"FƬ-7\u0004I\u001bcxUlkv\u000f<m]ttyTڙBs07s43Js\u0013؄\trlل\u000fr\u00046h\u0002ѡű\u0013?ߚ*N3Ssξ3kom~m~϶}#c`닾jF$bp+\nZR\u0014{ٳ\b׬$L\"-%<\u0010tj\t4#`բsr&i\u000eC\u0015Hd[l\u0004ض\u001b=2\u0006;F\nl\u0011fʭ@87>⢒oYrnѠC!mZ\u0018ˆm[Ou%٪Y?up\u00051\u001bo'w:\u000f#\u0011Q#\u001fR\u001eD\u0011\u001fO#`G;[\u0003nG[\bUS\u0012+QW`[bx#m1Vb\u0010DR\u0006[JR-6%\u0003U˵h\nlA`[߶\u0003O7-^:t~luy09pZlXhg&\tG\u0013ٲ\tG\u001f\tl\u0004*s`ۓC\u000b'\u0001\u001cdtqUl[zb'\u0017¶I-+12HHD\u0013i\u0012BQVTUxVG2ȳ\nj44irEzZ\"N<\u000f[\u000b\u0001Ғ^i\u0005K\u0015\u0002\u0000щF\",<Plkd1lXAH\u0003%ۊa,͌V-W\u0016k#\u0013goЍ\u001c{-\u0007VWf.0l\u000f[HZʠ=1y\u0007M]n\u0007HZ\u001d-3mHcw>q﷯7(eU[Ԕt|\u000fA2l}\r+UK\n\u0005\u0002l3tlm7\u0015miq01Ҝ(\\93Js\u0013؄\trlل\u000fr\u00046h\u0002\u0003\u0013CWGƐ+\u00137\u0014nM=5rl\tr\\\u000bO%޲m\u00075?ʶ%mkY[h\u001dڳ*M\u0012+!Lɭb[J\u001b\u0002\u0015DSӰ\u0006`44iI*UlxK\u0015ۦ|%ֱ\u0004񲄑3z\bQۊbU\u0005\noo=2\u001bkm\u0011+5^PJ\u0010U\u0012oYY\fg9v|!5\u0004/Wb?Yxk&ȦLwׯ\u000fiH]t>8w_(Y\fRȔZdJ^p.\u001fx\u0005\u0002o=vw\u000f\u001eжmqlѕʌd9Y\u0007۞\u001c~[$M`\u0013&\te\u0013>\t\u0013؄\tT\u0007C!퍉Ӆi;`{\u0017m۱m{lˇʶ%F\"cG-֊bD6)T=\u0016\r\u0018a[j\u0014\u001e8,\u000fm5l\u00114F\u001b$\u0005dF'V\u0005G2\u0019Eɶ\t+\u0002\"&J\u0014kvm31RU\t5fl:o\u001aWe#ӎ\\-%RKVĊ\rtU=OIuS1hWxkxFκAw%wE˽\u0017{G{{.٤Q\"-WtS-iqUUpm|!{\u001b{m}ER=)>Ѷtj_>vѥtyip\u0006R\u001f\u001f\u001bϿ5\u0016\u0019%\tl\u00049tl\u00079t\u0002p4ch\u001cv2L/z5\u000e샘\u0007\u000fud\u000euc7ۖvۖ X\u001a)Z\u0011r\u001fp+WT[Fb*\u0018+y`+=\u0011\u001f4\u0015b\u0005\u0017H[`\u0007gAަ\u001c\u0011H\n\r\u0004i\n\u0001!\u001aN\u0000`d[4i\u0011\u001ar\u0004\u0013jb[Yt+S\u001bo@2q<Em,\u001f\n\u0004skx-wA\u0013Ű'a偦g[I\ro\b8:˛V݃=J/w\u0010bcҊLޒ%/`VU\u0006,+ٯ(\u000e_#\u0010eɖ|\u0017`l+yH^\u0014PH:xRc ^fCs]Ih;\u001fjucҶWM\u0014.V\u0016ȑ\u001d#`^\u0012KSJ\u0006`v')IF3HҶWˏ`q\u001emOěxw'IMf[mt\u001cݝF&Sٛ\u001fnZI{AF\b/?>D^EM#(n=S~X9ݵrHr,\u0019GH\u0016\u001c\u0019%<\u0013UHL&j\u000flK񞲭\r~!o\u0012г\rdEB*~C`v@c۲\u0001\u0002tOĶ%ޒgc\u0012iiD\u00009\u000fvkd>u¡c3d\u0002lP\u0016:R΅q*T]-\u001d\u0016\u001c\u0010`\u0005r\u001f\u001esٳX\u0013fRaS>(P-^񶋹e\u0012oٰ&T\u001ci`*<\u00126yPBd[GFj\u0003U\u0006\u000e\u0005o\u0017`W\u0000innMf{\u0013x\u000bQꢷ<\u000f΂3zҝ\u001d{?\u001fiO?7nMѭrtw2\u001bݚL\u000fwIIi\u0017l{\u000f`{C~m>p0e\"X\u0015\n\u0010\u0001ې\u0005AQ1ms۳r\u0018Vrq\u0003\u0019Ĥ̰ \u001c{Xؽz\tW\u000bmX#o\u000b \\*LD.\n׀[E\fpo\u001bM\"\u0003kFE\r,\u0014oُv\u0002ؖ<[\"ޖȰj\ty+\u001b5\u001c(^jJ\u001d,n!3xl\u0000rGJ.\u0005gc1,I`,Ω\f\\gyILvgG\u0002P \u0015\r;J\u0017\u0007\u001b4_;h\u0012rZ\\\u0001\u001e\bl[\u0004ކtAՒE2lCZ*\u0002i[QWR9Xy&-UIKk\u0016H&\u000fl˰u\fa[G\u0016n,-M\u001b\u001b7|\u0010\f:t!|ڶӃ`y\u001eܾ\u000fnμ)aɿk\u0012sd9;k\u001b,Gw'ѭTfoZhq^Nګ/\u001d?z\u0017!\u0004l*>m}e[\u001fMVضc/h[[\bȤ@V\bQ\u0013E\u0014'2HYú -\u0006W\tA( P_\u0000*>@y\\\n9.XSA:\b\u0006|f,ODEmѳZlU\u00165G^8\"{B^4)\u0002lE!jW۩^)8M\u0019\u0010W\fXg@.\u0005:%pڔ\u000f\u0015\t\u0017dضq?\u0000lI\u0011\u001b\tZaY\u0016\u0015[\rh\u000b\u0005T%ba[YqJUM&%U؂\r_5I^z}7}\u001a}/.3=f:O_蟛F&Yd\u0003\u0000\u0000\u0000\u0000\u0000n\u001c\u0019\u0007p,{,ȰrN1e;,/\u0015\u001c\u001aR%$#\u0010䒋O\u0005\\-U==\u0014$5\u0002(|]]_\u0011J&/~\u000f*WF&WadsܞtV:/W\u001b|\u001c_l'&~}x?O!jz\t\u0012\u0018\"YDVI1Lh|\u0000I\\\u001a'4F\u0006\tmmT\u0007\u0015\u000bҧ\u0011\u000b\u001cT`\u0012FOliAjְJ!ǂ.\u000bӡ\u001ex3\u00010>ܶ\t\u000fX\u0018*\rj\u000edM#͆qXwuqEݰ5\u001bncbL*VRф\u001a\u000fB\u0002\u0013?߭\u001a\u000e\u001dႰ\u000e\u000b4\ftBRO\u0004q\u001b)/|7\u0014gbz#\u0012\u0011&ƚ\u001f\u0019;Swu\t\u0012QH<\u0013zᖀ\"q4<p5$Ys(|ť\u001ah\u0014\u000f\u001d]CyF\u000e%c\u001ex\u0003\u0014c[:@\u001b\u001e=\u0007\u0010t%\\?cz`\u000bqo\u0019O7g\u001bd-8X.u\u001f\rmTk\u001c՝\u001b\u001b<Gu'QU\u000e\u0016[\u000fۓ\brtb\fb7y'+m\u001b^-Z۶˷ض\t$\u0016B!\u0002\u0016銤\u0004]? En\u0012%rea\u0011fS\u0018\u0002i]yE(b\u0017n[\u0004\b#7 f:#H+`&O\u0016\u001a{bD\fjb\u0003Jp\u001a9\u001bp\u0004uℑ9*\u0011\u0015mf\u000eU;{.ٴ\u001c¬=\"\u000e!p(\\~K0pث\u0018)-H֣\u0018ph,F¬+IKUE\u0015Yަ\"l5\u001bٶih\u000fR-݃5?m[d}ٸ]&kp9PlQ?7jMscZ65\"5Yj\u001f?jt\u0010ݗV\b}\u001dmwm9Ρcvo\u0014ѶM\u001c\u000f-{Vk\u000fgK(Yլmm6\u0014a\rT׋YI\u001f:\u0001>\r\u0018p\u000e;᭨Qy5a\u0018!\u0014nW|GUS\u0002rͤj\u000bR\u0018omPR*\u0001V=+ĚM/]N4\u0019uL,FxtUݝi7mNo=\u0015&\u0002o\u0019x\u0005 -\u0007g`ȶF(ĞA5`30o)\f[Vmd0c\u00141ê5N9,lcKl\u001eɶ-mtm}ΜmmwF`[Ft\u001fmW7$&QsTwnlT\u001c՝F&WA.ȶӕjly\u0019oGow޻ޯOm0g[Ε^@\u0012l\u0005d\u0010&dmkg<\u001a\\۞<3ikTN\u0016E\u000e\u0006@5:z]+4-\rl\u000bȅHHȃ!VcB|Ro\u0015\u0003kbO'd:p\u001f\u000e\u001fVvN֠\u000e\u001a\u0018nJ*\tm\u0017\u001aB#Y$#BS\u0014\fا)\u0005\u0017\u001a\u0014\u001dٳތ,\u001e\u0015\u0014.\u0016'g1\u0012(\u0005{\u000beF( l.2(X4CErYHu)'4nL؋\u001bՑ\u0005;1\u0015Q݋+dml\u001b\u0000lbֶ=ۻ?\u001d=\u001fѳx-\u0006?-Om?SMnZب9;jMrdu:Ymֺ\u0017|\u001cݎ.ci[om\u0011F\u0011Bx1\u0018&(\\ge%o3Ƚ$\\+n?Sjid\u0012rMte\u0016I\u0014.\u0007a\u001c-xЋ$-k,uC[6pعe\r\u0001V7K\u00007>a9f\u0003\r]\u000b\u00012oߴȶ\u0019$G[a[,Fs\u0014mb^~;3\u0016/CW#R\u001aR^\u0015[[֮\u001a\u000bWVv@\u0002\u0005BȶYx\u001e1N%i٪\u001a>y%|\t\u0017؍X˝ɉ.Encܴf)6Ym'\u000fN,<\u001fN7\u0013F\b=\u0000>~?\u001b\u0012sۨ9;76yNnZ\u001c,&\u000f[G:Smt\u0015mj\u0003mz+\u0018G\u0017;ɻ`%\u0006Ҷ[W?\u0003۫m.\u0005m\n[\u001aQ.D\f,Ja/\u000f\u0019YȶUk\b\b%ɐ4$ym\r`[\n`\u0016aB&x\u000bz@\u0014xT$Rֶw.!\u0017F\u001dRK\u0000]6{w\u0005*Vu(A*|, \n&<ȕsFHZ\u000fC\u0017l˼ͮ0Զ ֚EO\u0005u\u001dC\"Mbȶ1ؖx%&\u0004tnd\u0002\rHvD\u001cocG51:KM{Im[Jm\u001bŶv\u001a\u0004Ӷ\u000f};]8JoӍx=<\\\u000f\u0015e\u0014sۨ9;76yNnZ\u001c|ߚ,=Zj,w-m/׃\u001bvv\u001c_~M><Il{Om m\u001bZYަLٶ\u000e2\u0016\u0012\bҀB}Y1\n\n䚙\u001d\n\u001fH\"f\u0011(*VEi8\u0015k-vv!\u0000[-Co`p\u0019ut,us.\nVE\"Yx32cnjɼLѦ; Du\u0004ryIẙEҦ:b\u001amٙv\fVx\u0016y+\n\u001bmK.ym\r-6\u0013aDvH\u00165R<lbD\nCkf=q\u0016\u0015\"y[\"\u0012.yۦƶ\u000fNmf\u0004=^\u000eW}%e\u0014sۨ9;76yNnZm[\u001fZ\b\u000e\u0011\n\u0011b'yIJ2lAҶ%r[F\u0004\u0000b\f&m\"Ð\u0001\u0000\bd۪ݯ\u001f\u0001*Ҧ3Z\u0010Ӡ6-x\u0015v\u000bZWR\f\u0011\u0002M\u0019ٯ涍3\u000e_u,Q\u0004\tH⁋\u001a7y\u0013|e\u001d|Fuص\u001d۱߭ϵ\u000bPn_(gb@C\"\r%_Wғ~9ji=j\u0017FRmģ3\u0017H$mݔdlp:Dz\"YS\u0002KLթKi\\-,h0rϓaQi6Y\u0007?FJZa!:C\f\u000ei\u0005e~bFK\u0012.JռMk1Kr.{.\u001d\b\u0012ˆ,lm-~WŶ\u0000[mdCrm|wrwBFGp\u001c\u0018RMncZ٘9;iMrdIdu:nMg&v\u0002\fݻٶ>$Fٛl\u000b5\u0016m_\fl)\u0016\u0000\u0007L$%\u000e$B~F_\u000b{<6UN[bTzҰt*~'c\\-K%vʅ=\u000ba^q\u0003[mV\u0012傠\u0015\u000f\u001b\u001aS\u0012PĳIC.kj7Q]c5tz*\\aJzT\u0011\u000e0.\u000b痡Ah[z4k&m]t*KZ\u0011\n{c5*%\u0015ުWBp`\u0017a_:}\u0010m<Fۮ\u0000HMncZ٘9;iM<\\n\u001dmWZsy}\u001d#o/?}Ŷm\u001b{\u0018ݶ=\u0017q떻\n\nke`\"%Pm_Hkg\n[xr2Db2VP;-\u0017ʳ&-*J|*\u0014xǙDV`\u000bez\u0012.\u0014,ȅ xAIm\\\u00141i\u001f(>(a\u0007.xK\n\u0005OQ\u001bI>\u00172H٧\r1/e\b?\u001f+Sr1Xp2upFE(\nr\u00148w\u0006pmF-S'֣X4\u0018IڂR'\n\u0002[+Sc\\u=\u001eZ8`\u0011gyN6\f\\\u001fm{\u0017?^-]n\r7x->Z\r\u000fbnr\u001bӚ<tƴ>1mLkr4\u000f46OWگ&ZFn3z\u0015\u001dN}Ov^ֶ[m\u0013ef~w&8\u0016tSIaT{E\u0018ETv\bjU\\L#\u0005\"UaY1\tuL#6tK\u001c])\u000b)okxP`Xyجj.F\u0011Y\u0000\u000b_c\u000e\r*ĭnX-d\u001eJ!\u0016GLmtGOyKl^\u0007?OTKR\u00007td[-\bW-CY\bؖ\f+,\u001eB8X\tkM])\"ȰEaVV3G-YKlx-=z=\u001d]lϟGZp\u0006\r~[1ƴ&1ݹ1sLwr\u001bӚ\\e\u001fl<z:YigZ\u0000}˶݊?$v_^nmX\u0016O8mmC{Uow\u0005VM\u0001T\u001b(\t\u00032V)f+<C(8ض'\u0019S\u000bi\u001f&\u0015\u0013yL$Z2,\u0010g\u001f\u0001rxH5V\n\n\u0015\u0014Ǔs!!ޱ\u0004#;Q{y@~(\u001cJzE65)\u00014J\u001dጯ\u001d5\u0018\u001a%xNE]jΈ\u0010JUZx;R5\u0006ЊuΒSC\u001a\u0010aK6<RTJgmկǘUJuSmpcZk1oc+Ɇdru\u0000Xxi}7\u0016˟^bgx=ߌ6xB}fl{K1_7iMcsgcZ65ɳu>\bެo\u0000߷\u000f?n-6\u0019\u0016e&\u0004Y-`\u0001x\u000bA\"4p$N\u001dA>Az-Y۲X`Sb8_aFtHT[\"Z4cŊQG\u0000*DQ$KM=US\u0002{ٶ1ʐ,l* ܇\u0004+\u0005R\u0000i(.vAzs2g\t՚+ԭYҮ\u0016W:T\u000bi)R\fej]nl[C\u000eĶ\b\u0010->+a+A⣶t,\u0011o\u0003O+iR,NdWlUA\u0000Ҭm`˹VmO;\u0002l<:و'jp8bnr\u001bӚ<tƴ>1mLkrɳ֫Il>_\r^\u00056w#퇝v)6m?~9.\u0018\u000eQ\u0000D\u001cǶEX0;\u001ckTw\u0006\n\u0005\n[+}\u001a<ǰ U;}$JKl+\u0005\u000b7k[e^Q\",iA~YÖ)b0ډLRݪ\u001d} r\u0019୶B\u001eh\u000b͸.\u0011BCa)\u0013\u001f6|⭻\u0004E4hӒ\u0015<]dy^mktHP[3˘4Gu}(\u001dp]\u0007<\u000b\u000b\by\u0007A\u001dk\u000bxl\u001e{\\]v+6v/iͽIi%$\u001aFh[⋇3;&Ӽ\r칶5CʶG'{hKfj=:Y\u000f\u000fJ{bnr\u001bӚ<tƴ>1mLkr\u0015ɸu\\\u0007mm\u000fl~j[b\u0002\u0016`۱f\u0000\u0006\u0001D\u0012oٶ\u0018Z\u0002\re$1N%+\u001dj*Ҳs5oAOlӨ\u0010\u0019ƺ ϦRe\"fա)*jϊsmb/\f6Deۆl\u001e <\u0011\u0019+EIt\u001eOf3PHZ\fu\u0014F&\u0005b$9tশyB\u0006Pe0:[\u0017j9r\u000fTO\t\u001f5B<\u0017`[*piZ`%\u001a]-2c'mh\u0017z^Y6Ѷuݶ/\u001fx;J\u0000ۓh\rl9Xiw$&1sLwlL\u001cӝƴ&WmyqYxu6nMIf=\u0000\u0002lo\u001fwO6To-@ ,\u0017\u0000[>(xm\u0013- (-/\nwJzZ/lK\u0017\"f\u001e\u0007Aİ%\u001cfF,\\RnK\u0001\u0015Lکt\u001e7.y-&:mj\u001bI\u0000A&\u0003\u000e[%2Sy#L8LĻp\u001a\u001c;$\u0019[m̛Z_]Z-#ca\u000f%u\u0003\u0017l\u0015\u0001J-D\u0014-9T\u0013y\u0006tkM^E&%˧Um)\b\u0014=\u00180+Oy\u0006PMʹ+'\u0014\u000bw)6ፇBB\u0005&\u001cy\tדbahŢqbeG\u0016>|\u001bl\u001b\bf-!l/7\tb\bm\u000fڧ֣g$&1sLwf6yNncZ[\u001f^m\u0017ۭA0\u001b}ًo\u0007nۥ۶\u0015-P2¼-\u001a\rQP\bKE-@\u000fykpmKUufm\u0001V0vT\u0004_Fےj#1o-F$P`u4v\u0016R\u0018S\u0017mgu\u0019f\u0013z<YQm\nb^܉_QrQ\"f^\u0000oOiG)!\u0017nZr!%l\u0015rEf0Y.-^\u001fil\nla:l}v(ժx\u00189Tw|Z^޶m\u0016\u0019l\u001f-D\u001f/.\u000e~\u001d&hu8z\u001d\u000eǛͣg$&1sLwf6yNncZ\u001c\\>Y[\u0006ێ6\u001a`\u000bq\u00109vc=~gۈm޲-6\u0002\u0016~\u0002\"i\u0000r&I\u0010DDIϮ\u0010ZW71;E][y\u0010:ٶ*\u001emĞ5\u0010\u0016?T@\u0013K\u0003/\u0003\bϢI\u0019:fpeͶE\u0012oE]ڙ-?{\u0003ER\u0014I\u001b\bsI5Xb/Mjū@Q\u001a{<I\u0004U\u001aѪ|*җ˨kV\u001eySe4<+\u001anis]b\u001b\u0013DD\u0016\u000b\u001f:znvxZ\u001dP*I{\u000flo\u0004\u001fT \u0016o۶}\u001d\u001d:}\u0005F\u0017l;<j\u001eC6mPMncZlL\u001cӝƴ&W9zY?^7\u0001fk2h}\u0018\u001fNy/\u0017}~;m^\u00163\u0012\u0013BmIm!dؒ\u0010%6U1k\u0004x\u0003g\\\u0000삼\u0011)\u0012oԓ\"hpL'1\u00101\u0011ubX,gϲ^i^\u0000֑\u0015Z8¶CLV'a\"?kA\u000b]|\u000b|>\u0015\u0016U\u0011U*\b=98(`[l{#=!\\OY$-񶊗\u0015IZI@\r\u0012\u001eٶ\u000e\u001e\u0005o3C]ʶ\f[z\u0005Қ=UȶySxKٶl[k^GȶN<\u0006nNZǛ#c\u001f\u0015sۘ9;3\u001b<t'1UV!gFc՚lm5\f܉_ol6dNmjuB\u0001\u0005\u0002=ZF\u0006.O\u0012ZJ+gb%C.FS-M\u0006HZ-cV\u0013A\u0004I$Ę32i\u0019\u001aoY(܎4IZ\nWQ\u000eB.U\\\"\n\u0016`WUHyE\ryDn*`\u000bd\u0012xqS@e\u001eѹ\u001aixK\u001b+t\no%\u0014ig}v.C0bD/wɸ3-5\u0017m`\u000b\\Ln\tW6,͇\\Wm<mNI-VL޿I&b\u0018\u000fZ\u0003햱\u000fmLk\u001cӝi}cۘ*Vkfr]Nx\u0013\\'\u0007nmۺJ\u0000.m\u000b\u00056Ot꼅t\u0003-\u0001\u001dz\u0005J\u0012NYw\u0016.\u0002Zti\n\u0015\u0015BdB\u0011#W3\u0004\"eۀ;DxhkP*\u0005\u0015Ւ-bہg*nٍFZlgg͐P\u0004t\t5q\u0012ԭ\u0019{e7Zz/$[K\u0017=\t^,RZ\u000f -m\u001an)6`̒^qel[\u0005R-\u00156\u0017'7Da֟:\u0015i=+\r*ކ|˞ÕdۄTmǋ/\t6\u001emm-v_\u0019mLk\u001cӝi}cۘ*VזOk/6\u001a\u0000[\u000fat\u001bދw\u001d>d(mA\nPh\u0014~bFҶ\u00022,\u0012\u000ebY@\u0015xz]P3\u0019luۢdBM5:\u0000\u001cj-AZ\u0011[:W\rz,\u0011j\u000b)jz\u0015$\u001ar\u0001R\u0012ca\u001e\bXBHuy1\u0000uFjKE\u0001[\u0019BGbYJ\n\u0015\bʶKR8Q$ꊕ~_,z\fX\u001dl~W{ZlY\u0016Gx/`[R\fm\u001aۉjJFZn\r\u001b\u0013oA6Sz\u0016HV6\u0017\n+oyVWm\u0017:ƞ\rۺ\u000f\u0014l{l\u001b&r\u0018mOZ`\u001bƴ&ϙ\u001c09r\u001c.\u001fOB^n'A}\u0013~\u0013m&\u0007ll˱ضmgQ|Ҙ\u001etS\u0000ۂpm5\u0012Z\u0003U8ipm)=M:o\u00015\u001c،$ [Ɗs%:\u001d+\u0006Ͱ\u0000c\u0019\u0012HG^\u0015\r\f*UW;BN\u0000|\u000b\u0001\u0005V\bl\u0001rlUFk-\u0010%Bѧ\u0001\n\u0017Z[FǠg}_WjAN]FnJMnm?\u0010lQv\u0017ޚ\u0006[\u00118r\u0007*\u0011\u001a\n~ކ%XΧ¶ŤlcۢnM>\u001f\u001d>\u001boжatJ=l\u001e7\u001e{?+\u0007؏`\u000fӚ<\u001f֝\u0007;k?3\u0017ӝƴ&Wy|\fy\tmAk0\b?\u000eO;\u0015v?{}<l[\r2dfI\u0019\u0018\u001bdo֙\u0007ޢm̳U9*\u0012\u0003\u0016F&m*kmF^1-2\u0011!CU\u0014@Ĥ\nP&)̸jw4ղs!N@N *]e\u0015+\u000br.\u0017,\r\u0004aWPf\u0002!V,\u0015].xg<\u0002-3Z\u00161O3\\ZE\u0012.\u0015\u001a'\f[-[b\u0002^J\u0017OUJu洝\u0014MT)6aRDŊ䥈;xm\töu[\\ZaZ\t^l-۞\u001c>\u001f\u001d<\u001b;\u001dvx}\u001fu6\u0001\u001d\u001a\u0013/ZH$%Z)\rt&wı-/8Vݱ\u0013#8I?ޜ,)F<\u0004\\\"!ؐ\u0013mHnR\u001b=4GOF>ImhR͓MFj}=?Mw~xw\u0010\u000fIl]Rm\u000b2\u001f35蚹v1\u0013ܧ\u001fRU-\u0012u\bP%J \tr\\\u0007\u000e@pP)J\rI@\u00143*:$\"rɳ\u0011\u000b16R\f\n[W$e)Vm\f޾:pn\u0017Q)fv\u0001\u000fTm/$(f)vx[KG\u001evT\u0003\u000e[jY\u000bW%lXuv٭5ga\u001b\u0007Kȅ-<a8Cm4[Y\u0005B5!\u0001\u0016C#2`i.бz'ov\u001cC,RA\u001bgʥb,\u0004\t&t\u0018QIm0kۓ?]\u001db{:O6Mm\u0007Imh\u001c=G\u001b=4GO'ѣIU~o\u001eh_/7Zi\u0007l{\u0013F_ o}8\u001faB[jeۆb$V\u001e\u0002\u001dgcJ&\u0005N$̎gGm%`Y@Zy\u001bq\u001c\u0012BVm\u001c\u0017׈\rEb{\u0002X\u00117Y1T\\z°ۤf-\u0015y[\u0003q\u0006خ\u0018sl~\u0013*Qt6F\u0002ZtV\u0005{1DZ:HՊ\u0007\u0001g,LX\"evZm\u0016\u000ev\u0005V\u0004m\u000bo\u0007lk倷Rx妙\u0014{4&\u001e\\OF`ҁd3cض\u0003$Rl[Cmm\u001ba;kSS^x\u0013ogl\rm\u0007Imh\u001c=G\u001b=4GO'ѣIU'/\u001a'/[gKmz\u001dl\u0007{їA\rm;\u001f_]Ķ\r\u0012&>6;/9Z\u001f -VڶJmUb\u0016 aŊH!\u0016qJ%\u001b`\u0010$UL\\.HS%j\u000f<V-=կa\"ڳg|(\u0015v\u0011۰p٣]x=\u0013\u0002U*\u0000;\u0013Ox\u0016Zحh[⪀-t\u00025F4/m6XcQ;÷ȶ2Aj\u0016v^V\u0011.\u001dwLie$ťoeR\u0001\nض-ދ\\-d\u0004cm5!`[\f87-6\u00077`\u0002l\u0013m#mۇImh\u001c=G\u001b=4GO'ѣIU\u0003lfz4\rnv{_;m݀{\u000blҿkO B`\u001bj\u000bQ@&Xv!\u001bPb6&mb[+϶\u0005A\u0000\u0004WʞEؒy=U\u000bXvg\u00196,\u001bdX-KG-\u0016*3# W\u0016\ni&+ŝJ\u0018'Z\n{m\u0012+ү?\u0013:V}:&(L\u0005zc\u0011)V\\0wB5vČ\u0015\u0014\u0001\"`WQXׅj\n\u0002ZFNfPĻD]gRu\u0000~530\u0006\u0014\u0006\u0016-\u001b\u0012.gYvN\u0016+l53mZ\u0011T(+\u0001X!\u0002fyزm}37(-c\u0004ll\u001bm\u000bQl{ӫw`np=\u0002lαCEݤ6z4iΣ\u001e}Ѥ*`cū3\r>\u0004{\u001dv?v\u0010~\u0017]Z\u0000:O\u0015vuI\u001d̓FvA\u0016mEfC+?gymk20y;Q\\3o=DRF|)UAҢm!\u00026!-\u0016\u0018+:(\\T-P\u00131r1f$m\\6lOR\bbAUJ=Ѵ~\\cb佑 -\u0002\u000e[ Cj\u0013:\u0019\u000b&nہ\tB\u0000+\u000b|e\\\u0019[Qrb\\Er/޳Z0\u001d-\u0016\ni9*11\u000e\u001c(v<b\"f}\nS7nF62k_l\u0016R!*\u0015ȶ}5m\u000b?\u001f.\u000es\u0017\u0004;-+m\u0007Imh\u001c=G\u001b=4GO'ѣIUж/\u001a'/\u001a\u0017\u001b\u000f\u001diNy/:&6-Y̳mkdz\u0006y]X-s\b[B1srbGVh.U֮Tba\f\u0010x\u001bg\r\u0016Tm\u0012d[,L@dR$iITSW/\u0007*v\u001cnJڊv\"wAB#Wɂ\u000em\u0019\u000e\u0003*\u0001\u000b']\u0011*Yu\u0001g\"Ϗ`+%xwlH~\u0018\u000b+|Լrм\u0014,]iL@\u0010E\u0014|+\u0017\u0016${Oˍo8]\u0013sqӧ\u000eluB`\u0016y[,$=|v釃np=[\u001dEݤ6z4iΣ\u001e}Ѥ*>o8]oж\u001bMf;\rnwÿ^whoom+ˋ̒\bm\u0019UնB=\u0000m\u00173Ķ\u001a\"hRK\b׳i+I\fq45-}eۢs\u001e\u0011nD\u0012/s5%-3m#rяW$=RtEQpi\u0003t/n\u0014'U\r*\u0016¶M BsrRw@\u0012aۉD.V܈5%޺XPH.t\u0012#\u0017\bwNIa˪θZ\u001ecW\u000ea+\n#yKB\f]\n\u0016Ҽe5nmIEQ>;lt喯cAm\\\u0002iUlkd!M)dZm>g\u0017]m_;ݳ-\u001fi>TMjG<ѧ9z:\u001eMrq\f}<]om;v/&;\u001fTB&¶Mg\u0016u\t[L\u0006y-SۂV@P[,[)YȐq\u001e%\u000e%WBB]\fXcP\u0017\u0001Óg\u0010\u001cq\u0018T\u000ba\u0004\u001a\u001d\ne\fkI\u0015sm\u0002E)\rݾ\u0011\u000b^D1iI.#\u0017\b\t$@H[o\u001aG\u0014oV\u000e\u001d؋\u00130e\u0017q>v\u000bv+7/$\u0006MoQ9g.kzyKWHf!8\u000f;C,E\u0005ն1zVg+\u000b#S%ù\\ -mF.F:5{\u0012LҶMmD/yKRP\u0010uI@S(dR\u0002{\u0001+6-v6K;6\u0010\u001e~۴^E6<۶7ܾ~}\bm{6\\=nJ\u001bMsyї97FS^}]\u001dϺG7'qv1~:\u001f9a-(Ҷv|\u0004m>3\u0003[Y;e[`\u0004XHɒsl\u001d!ZgF,e0ж~\u001eڶ:zWN\\a6;RY\u001b7ѹ(Y1+)\u0003VLF(\nE݂s\u0005%ƞڹxNUNy\u0001!_n-\"W2y^\"\u001dj0hZ\r^ж;d[\u0012Y̒LMJ*QlX}R|x\u0011ȵ\u001bZ[QcBZWu}2lzMv\rt\u0018\u0017Ez\u0000\u000e4\u001fH릴є97\u0007\u001b}s)mn4Awy][\u001fo\u0017m\u0018`{wyilbl\n\flо\u001f}`l[1k=\u0017~\u000e7aļW\u000bje$d\u000bV\u0012'JڍIDU\u001af\u0013\u0014+x{\u000f|\u001a7'\u00047;rENc\u0005X|}kZ msC(m'fJՆl;G\"l坘\u0000kQ7&\u001av\f]-Ϛ;sey;\u0013ZUڕ}sHD5ڶ*(5ˑ5\u0001,\u0012nf;7Rµlk;wd5n!o!A]=z\u0010W x\u0013z\u0000ӛ\u0017O_eK\u0019:\u0001ۦ\u001d^\u001f;۾Mis)sn:\u000f672ShJaw\t}ֻ>9Iޞ\rG.w_g_X\u0001VRc:\u0004'+\u001dR-zն\u0005V\u0001\u0016V\u0011|\u0019I˶%K\bXP-63ia=\"sr|\u0004!v\u0012*JN\u0015qՒln-\u001c2lKM\u001e\u0013]R%xz|U\u0015\u0005l[yDۢU5oy\u0013]I\u0004\u000e75vC-\t\u0017\u001a΍yy#/(J~.7m}z;6d>\u000eڌ\\,6R_\u0000\u0000\u0000\u0000\u0000\u0000[of\u001a\u0007oQ$c{b{&s=\u0010]\u000b@ChC8F.-@ڈCrXj\u0005V{}mO\u0002RX~=J$\u001ac׈\u001c\u0003kM@\u0012FK\u001af8x#405\u0017\u001a'UNc=Kl\u0015҅j]\u0002JǀT[lKt\u0005U\u000b+O7hh\t9h=Zk]o\b~{S)3)G_)l\u0014*{WëFxc˭˭vvn݄_ڽ\u0014+Qm\u001b*\u0004&,1mx7\u0014p\u000f3aHsld*,g\r<st\\Q\u0007c\f臮1A\u001d\u001b\u0007us\u0019\\\u0018\u0004TS#\u0016Q\u001f;\u001amjP4&NR\u0012GKIh}pFK\\VB]\u000f=FODc+5&8F3\u0013i3\u001eU8F\u0002VsA6\u0016:W-0oF;\f:\u0019\u0006(t&.]ZR\u001f%g\u00102pdQޚ\b|O?w\u0003\\mn9pΆ8>sx\u001efc\ra^Pj/6lxUkR\riU\u0000N4i\f[\"-\\\u0019yFq<\u001b6P\u0011BvsmgSjJf{?߿߿n5/s\u0017\u001c|x\u0013린)GSәؔ/r\u00146h\nZ\u0010m<6õγ󛝟Vz'~w'9i\u0014҇jWfB\u0002XjwIbO6ͼ2oO).\u000bb\u0002\u0003-!7@]@S\u001d\u001b6ll16b*zX\u0004q&M0a6&ƒ௔O%K>Mw)iSϚcd[,\u0005̢C­\u0019y\f^GT\u0011[\ta(+l[Af;\u00026fƲjGsk)xAC\u0000l[!\\+IT\u0016*I\u0018\u0004[,՞\u0004l/WO\u0016+\u001b儛-lmM\u0015\u001b6m̶j5\u000f[\u0017vW\u0007+\u0017FOHʯ¦\u001cMSNgbS)Sؔ)TW\u001bO!`7O?ot\u0013`y\u001dI~3f[rUJ\u0005\u0012\u0000oUR&Vh-S\u0016`4S=ۋ¶\u0016%H+Tg@t\fI˛\u0000:\u001c6\b̶\u0002@T\u0012`+\u0019\u0010o\u001da>WU\u00012I6S\u0017≾\u000b)\f2\u0014\u0005̈́\f Tk\u0010oűD\u0016>\u0007k?>\"\u0018l.^\u0012\u0015\u0003P*\u0002Vw\u0010[G\nmI\\}\u000f\u0000QI?unsp\u0005r0\u000b8<DcGӡ'\u0019^I51P,m=\u0012{\u0014lY8b)KsµH\u0016ak\rCٺ2Pgض\u000f|hFjsbk{xcOHʯ¦\u001cMSNgbS)Sؔ)T\u0007!v\rl;#f秭[W_mwm@\u0006ZfJ̀m;\u0010SjR;\u0016V\u0014U\t|Զ㪕]t\r\bP\u0001[,\u0010Zc|\u001dD.97ٳ:6kX\\Uk r\u0001ìmHۧ\\x\u00074mfz{\u0014%\u0011]΅\u001f\tʆ%r@yg)\u0019ZcRvD%Rπj-ZdlڰmvY0!#l\u000b]е<lQ'r\buvI\u000eګ\tRcDq^鎍?('^>\b[`[lztVض\u0013ՔԶhgV鬒\u0015\u000fl\u0005ͥ໵'ǟ_7M9\"Ħ\u001c}SN)GS]\u00066\u000e6m[h/nvފ^}\u0011ڎN݉m\u0002lLqfz\u0015\n%j\u001d-\u000b#m\u000biI6 y\nk\u0011iQ,d[s@R\bAyK8JȶVCzm*\u0016+\"\u0017a@k?'\u0011 fɳ\u001e6B\u0004\u001cW\r\u0016T-\u001b\u001e\u001a>`.d[\u0000&5LUˆu\t)x>\twKW\u0016:gF(V\u0011$؜J\u0011\\0zJ]-<ޮ%ҶI\u0012uٳ\u0006M-C.1)]ԕMI{Z6\u001aYZ\u00046eV\u0003m\u0016\u0004ϒm;\u001f\u000bG;\u001f_\u0014m΃+Ҷ\u001f)MaS)3)G_)l\u0014*{WUm5<fV\u0017xVf;~\u0013vl;\u0005/\u0006U_^ѳh[$\f۶ciP3j,H+c-fh)aY\f\u0016a\u000b\u0015w\u00196V\u001dj7clT$o\u0013R\u0015z5\u0015Y̾d/䞑gUǛ\n벑WG\u001a2ZC*PNYaXdBެٶB[\u0010,ח;\u001c.Bh\u001de-\u0007[e@K-T˫6gKRuP-\u001a6\u0007ߗx\\\u0011vܶ)lӀj=d[\u000bimK\n۶W[zf^ζ\u0007l/o\u000fWC\u0015\u000b\u000fW\u001b{J~_7M9\"Ħ\u001c}SN)GS]\u000eWÃp\u001dmF΋-ޛ'mUZ1-CA\u000b?w1ղsd6^\bj0Y*Pv(U; \u000er]ti\u001f\u0019kp\u0012o\u0019zְǘ1\u0001˒=\u0013iuNlI*\\G\u00175]:z_ֈ\u001ed:hO0l0i$\u0013.xl'a\u0007>\u0004$\b\u0002G!*uĘ=\n7p\u0005Eq\u001dd]!Y(col+;`\u0006sTgΖ60\u0000?ĶL\u0012\u0000\t\b\"\tx.⹈QdKd'oLZ]{y9Kwe&B\u0015꯮\u001f\u0006mE}\u0003n\\0l\u000bYu\u0017g\u001d*C~\u0015Z\u00007ɉuүZI]\u001bU,\\8\fݧB\u000fm2܀u\nB/r\\\u0000l[hۙL8sӶ'?ӳxR\u001f}\f~ָ\u000f|6f4yƌ>1mhr`<w<\u000eNVqx]xb/lۊ>lG_vh}m\u0014-m[d6ٶ-IK-\tVJJ\tm\u0002s\u001f\u001fmw\u0003\tR\u0001YrC%V-a[ZYpmEje\u0012\t2rZhYbߗi\fŷ{]ͳ=ܞm{t\u0017\u000fCzE\u000e\tXʰKzYN४MWY2KuG\u0002(})y~\u0016I;.suDe$;d\nزm|\u001b\u0004j\u0012l,\u0003\\1\u0015\u0016e$\u0001ˤŹ[)o1tK6mۘm[xtӶ`7O/vz\u001bz`%<\u001a7~Z}2w\u001f)mh\u001c3\u0019}cۘ*\u0007J0YgkskF\u0003mevUu\u001fi'`G¶\u0018\u001bB\\E\u001fEkI[5B\u0002m+vn'juX|,CYEV1GV\u0016[px\u0011oU|\u0011\u0016KR*$\u001d\t[\u0001$k[R;D\u00161\u001bX\u0003\u0016/)xl\u001aHe+-VW0+HKEqGevö&l\u000bژ1˗ak+v<&Ҫ\u0015ȳo2\u0016ꗕR.9E-)@kmm;\\ηjx\u000e\u001be1_7\u0019Mc31str\u001b3\\h~\u001cLVqx:\u000e\u0017\u001b+\u000b\u001fmkm[\u0014-mۚjm\u0001\u0005m\u0003oM|wѶ\u0002IV\u0005\u0018[fRj\u001d-\u0015,{\u0007o;me\fiI\b[\u001fI`Lp}]v\f\u0014Ug\u000b\u0016*շ5̲vѭ$m\u0007\u00030/[EޢpT[ox\u001b\u0002,Tj+\u0019t\u001dhV\t\u00173\"J޺.\u0019}&mVl+a\u000b%Uږ\u0019-\tzXRr;ۑ+a{m]Z+)o϶ߜ~zۿ܎.6[ÕZx\u001f)mh\u001c3\u0019}cۘ*\u0007\u0003d%8\u001eϝ\u0012oѶ`߶Z\u001f^E\u001fw/o:l\u0010lwͶ&Oa+xKUU+\u0017d,m\u0005\u000b8¹\u0000Z\u0005x;Bʂ*Fk%V2U\u0005\u0019 <6zV\u0005yK\u0018\u0018ߖu\"\u00044 -,I\u000f\bBa(ل1*\u000be\r\u000e\u0010rk\u000e\u000eI[G\u000e%iQ\u0003ݶlX_廬]z.B\n޲gGIe\n2iE\u0007*J.H]\u0001_\u001ckeض)l)1\u0002B\u0016\u000b\u00173\u001d\u0012.\u0014\u0005Hmt/#HV%Ar\tðUEig{_m/\u0017zjx0\u000e\u000f\u001aƌ&1әژ9f:\u0019Mr~\u0018\u001c.\u0005+Zx\u001e^n6~y}\f݋|-l\u001b<>\n\"m[ĐmB)\u0002o[YFxȘ\\ZSZQق3My\u0018l%BϵP\n  \\=D\u0002xmN#VUE#-\u001d+(J%KŵЪ6!&\u001eȳ$T\u0011\u001dL׮k\"a2$p\u0013R-J\u0016V&mf/k\u0005\tX\u0000a+I\u0014cSj\u0003WvU\u0019*ֵ\u0017B\u001dIbI\tۡ\f]\u0003mg(y3ӑz\u0019b\u0017b.\bRP(6>ZE\r{]\u001eZ%\u0012+{J%6f:d̼m[_m7[qv)\u0000N7bnr\u001b3<LgjcF6f4bpqhyx\u001cójcj\u0003x|n;*\u001b&m[\u0013}ٶ-ٶ-m˘m\u000bҦ\u0005yK)\u000bc!Br_\u0016\f(Z\t[D+\u0019vn+`+x-\u001d?\rbMT\u0003:tUE~&rXU\u0019th J\u0005o.\u0004>\u001b\u0004ʝ }8UVN2i)­X\u000f\u000bΕ${#ۛ\u000f5<NmK\u0005Aʪ\u0019,\u0012\u0012eX\u0011q\u0015x0(\u0012FZ=\u0011¶1ٖRض6v4ӱ\u0010mƶߜ==\u0019\\/^4'kKs\u0000ۣ8\u000f|6f4yƌ>1mhrr0Y;\u0019덋js\u0017[\u000f[\u000f`ݎmM1\u0016m[Emە\u001bl\u0011n\u0002,Ou\tq@)\u000ej\u0015,𶊶\f\u0006;\u0014\u0015[Tm\"KWn\\dK³pҳɰT>$dD\u0012L\"V1\u001d\u0012(\u0002~\n*v=7,Y \u001dqHT\u001c)YݹvRC(Y\u0011U'\u000bȪ\u0000i)Rɰ3\u0010;|ו\u0007\\T+¤}a^w0+^g\u0011.\u0016;v\u0015.NΌn[%\\\u000ejTؖX)X\u001dF.xֳ#*&܎e\u0014.ٶVMmk|,>JRbt۞=_lUm}\u0000\u001e\u001bƌ&1әژ9f:\u0019Mb}\u001c\u001c̝gk9\u0017WXٶ*l[\u0010uضE-XI}l&ے\u0017$l]K\u0017.GR<Hy+\f\u0010\u000bņUp\u0015yK­\u0014ʹXV\bӜ!\n\u0012i\u0013(ؑQV\u0018\u001a]Ӓ\bJfW\"-Ԝ^M!\u0017WC\u0019\u0011]u\u0002lKe(¶u$rH\u0016\u0007db.E\u0012`\u0003٪M$;/L^i\r6Lf<;3ja6V\u0015]0\u001c(\u0013z-aȶ\u0010n\u001a)_r?$+B\u0015B]vU\u0001m\u001f)*\u0002f\u0010<\u000bU*\u0006[+\u0018\u001b)t\u000e\u0019\u001dm6*Ȃme.Ҷ-=!ʶO^?\u001ew9ޫ߮ƶe&1rt\u00166fYNfcF6J\u001bV\u0019m[ȶ=XrXQ8m)h%2ldS ]\u000b\tfS\u0005\u000b\u000fi\u000f\\۠;4\n\u0014`ۈLѓ\u0015`\\6Ht.ƕ+mˤEB\u0001BX!lyUQ\\\u0015u11,Vږ*]QXT\u0010o\u0013b\u001b\blUTm\u0015=;`@q/\r'G\u0012tn\u0005=.m\u0017\u0005r\u0015L*ʂtȅ\r)ժ\u001aJ+v\"%KU5\u000bw}!G\u0017g۾.\\KQ\u0014\u0002U\u0002%պtH\rҕH+TSI/,op\t$m>\u0004۞}:\u0007\rVE}:ڭ\u000fAb\u001e7\u0019Mc1rt2\u001b3LóFbr]ک~|pa\u0003lq\bߛ\u000e0msh[WV\t\u0017DUaÊg>\u000bM\\:7&\\`\nKP\u0002g\u001dc\u0017msmo\u0016,>V%,\u0014X^\u000fhE\"B]\u0017\"W8 iY`d\u000bjUe̊&\u001bÇ5:\r\u0011ږ\u001aa$V*\u0001OZ\u000ep5<Tt\u0003l$tx4\u0005lI\u0004~\t=\"m:kNl`>XL&ȼ\u0005rm-*j[b!kfaVm(m\u001b)K\u001dmO\u0007t\u0018^\u001f6Gەw}\u0017$q٘d9f:\u000b\u001b3,L'1TFˣx\u000bl[ڭNk\u0017\u0007\u000f_\u000f\u001b7G迯m&mpж\nٖ\u000bĶY\u001dj\u000b\\X-\n}Ю\u0015Rp|\u0003e\u0004 ֋6V`MHV=\u000fU\u00051un#+H#U+Juk/ĩ$*1\u0016mKe³E[n\u000bntm\u000b]`tʤ\u0012ۓ+KJ[i'\u0012ZɧeGV\b\u0015/\\\u000fo+W\u0015k\u001fO:iEV\u0004iEE\u0016x{\u0017lѶŔmAO0k)\u0002\u001f;j@ʼ\u0010`[\u0017dkMm|\u000b3\rM\u001b-!z6m(m\u000bm|z{=\f'ͳڻ\nvuS\u001f<n2\u001b3,LgacFd6f4ʇ祳Vb:٫m_>m:lr\u001cޜDmmli\u0016\u0014i5\f[X\u0002an\"\\Ot+Au ߧ`\u000b\u00059\u001d-S!j+&\r4\u0012oc,\\l۸(+J4+:\u0014rI۶S\u000b\u0001\u000e\u000bOѰ>'\nrD\u001f\u0013B\u0013U!ծ\u0012JB\t\u0017=Kw.+:[)\\W\u0016nO*+\u0005X}5`|l[vj)yħ<Fw0vN\u001fTK(\n\u0014̱m\u0013lki۳7O._czԙ\u000e)v|w|vflW<n2\u001b3,LgacFd6f4\nfbz]&/W?\u001d?\u001fԾ\u000e_ӻlk8\u0010-\u0016$\u0014M9W%\u001a\u0016tiRE(ܖȅ0o[Æ0t\u001egۚ^g9RvV\t#TK\u001dbV,a\u000bdB\u0011RC}Ĭ#I\u0006WTw\u0019<kg\u0016+R@V\u0000AO\u0016km\u0001BҰ\u000b7Q5\u0012T\u0003aYZ,\\XݶR}\u0015w y;\u0003۵^.|m\u001emӧ\u000e\u0016\u001bg\u0011Qx9\u0015\u0013N7'm?mN۞ϋӣU49lv6d\u0017$q٘d9f:\u000b\u001b3,L'1T\u0000\u001f6xr]ڭMW?\u0012o\f\u001b_Z7GNOy5%-m+2l\\\u000bJ0\u0001lj\u000b&\b,m\\j%\u000fxX?\u0010^Gy\u000bqٹdX)j+*\n\u0012xJ\u00164lꎐCE\b\r\\t\u0005r\u0001vq'\n\u0017kgmفW$zm{PW~Uu\u0002n\u001e@\u001as!\u001a\u0014HˈӾ\".٭h[6,\u000f*_aN3lYPkkb-\u0003E>\rXٶ-~\u0002ȗ\u0004h[Im-ַ\u0016.n\u0016w\u0013%lg\u0012m[WGɫ>ک(ٶ;{/H&1rt\u00166fYNfcFYiQ>۬\\lU/kt\u0006\b=lysҺ9\tvY\u00116tr`ۦm3-7:ie\u0016n+\u001f$Y\u0011}Qΰ-\u0007hX\u000f|\"ֳܹ:\u0005k\u0018Eguފ:\u0002X i\u0011\u000e\u0001IKPe:$*LZ¬\u0010m\u001bgAְ?)Jp+ം\u0014\u0010W\u0012huD\nrY2\\=V-K/+1o~)[\u001d\u0005x׬]~l62\u0016f</\u00116y>e\bs\u0001Ke?V2$m$ax\u001b\u0015\u0014omG?<8\u001dLa89lTU\u0001؞F;{/H&1rt\u00166fYNfcF|x^\u001emTη*g5-\u0004l{b\u0013v:l\u0000lo?^߶\u0012^j8\u0016l+a$!K6A. -W$,ɅI\u001d;\u0012za]\b\u0017x\u0019\u001bm%i#X\b\u0016597\u000e0@f\u0004h\u0006\\-͢<[\u0014\u001d\u0012.tHXQX\u0006dq՗\\\u0015g%fgDTMzd[NO\u0014`/xl+;tIIxK5UV`ַk\u0005>\u0004m1:mEh\u0011\u0017\u0010P\bJi~+\u001alcWaBRm$`Y'U8zY\u001fmٶ۵{/H&1rt\u00166fYNfcFV?֜6\u0001kLbn \t\u001b$@ \tSe\u0012[|KbO#Δ/\u001eg23dKdk\u0012UU::j\u001aÑ\u0001o-aۻm~珃G{o(\u0016VVx\u0017XVRT[-j<\u0007\u001efFvkm\"\u000b3W\u0002ءgK\u0014y\u0017+G=\u00108\u0005FS2i;Ci\u0001gt.&}P-dTJh\u0019VKI!\\qK`\u000b\u0006dL\fpM\n6=\"-\u0015w\u0014{$l3b-U@'ZW+K1r*ed\u00072D\"okO\bVqv¤\u000br\u0012fUX\u0014`EiĜm\u0001=\n\u0017m?n\u0003mFsӞ\u000f_蟛FYї9z:\u001eMru\u0011\\LIz3v\u001f\u000f:ضz_OPlk`\u0006\u0016Y3b\u00079\u0010K2fR\u0016.١/oe\rVb\r\u0016:p7ĵ\u001d.\t5GR\u000fk.ʰ\u001d\"fKҶ\u001cxZBJ\u000eY#b\u0017m\r\u0003T\u000em`1Aa⊀u$\u0004c\u0007D\u0001\u001aў\u0011\u0016GG\u0001lkP+L\fĭ1vqs/b[klR-xcQn2]>\u00167x\u001eQ\b6\tTI\u0001l}\u0007xm\n\u0015pMz&v<3QZ\u0017 VWo\u001e5YۦYc\u0006\u0018WV᭑\u0010l)UmAނmӶdb'}Һ$^l\u0005?\u001fAnJ\u001b=2GOgaG_6z4--}\rw;\u000f\u0007]#I$o[-F5mɰe]/1ۗ\u0015EdMOɶ,RPצMMS;)aK]\u0019f,6UI[\u0010.u bs4\trE\u0012lY2k\u0016T\u000f\tC_vS-k8#Y(P2u\u001b\u000eVv\u001cxpǭ<CnDZBeGf\u0016MW赙pXH+.\u0002ogҲpןv-̶jE,R<~\u0006L5\\g\u001473,$`U&D]Söx\u001b\u0017CMxsmѶf?\u0002ҞNNb\u000bl\u001b\u0005)mh\u001c=\u001e}Sє*?7\u0011t\u0012^m7~}}8\u0004F{>tmm`\u000b$u3f?\u0011\\sr!I|V@\n\"\u0017\u0000ңz\u001eY\b\u0002=JɺV7W-%o='\u0012\tT:]V\u001a\u00163@2os\u000eU-\u000b[vV!\r\u0014\u001f\bwV\u0015,\u0005QbM\f$fm~qY\u0016(\r;\u000eܹܵ\u001e:YW`뭯f/w\u0002۵pGzE>!-fmWѶځ8׳j%H%`MY;u;M%oSeצOZNZ7dm$$m`]\f6lkV:fem\u001f^m\u00067`۽.nx\u001do\u0006?\u001fAnJ\u001b=2GOgaG_6z4Fp>\t.7If3\u000et>w>m}9\u001c'slk\u0019۞\u0003\u00012oѶq\u001da۫\u0011Wgc.\u0002g) n܌,>\u0004=/\u0001MP-!wgU'Zl&ܰ6\u0015\u0018\u0002ҶLh[9>\u0012n5}\u0005%\"u[\\X\u0001^\u000b\u0003B\u000bPUX\bL&4F亂MW`ca[֫W`e\u00024̹Yo\u000br_b\u0016\u00186\u000fkZ\u0015>f\"I+ky5L\u0016\u000b+y\u0016:=\u000f\f\u0000f=0\u0005Ҥ\u0012I$oYj\\\u0018)m\u000b3Z`ۥg+ϟ˫a|׽\u000ehNwB(ηmSMiGS,l\u001c=FT9\u0007۾nM)v}\u0019t>\u001dt\u000f\u001eE\u001e<q0[i[\u0003l\u000b!]\"0\u0002mYD(\u0001\u001d\u001aUʌa*E߳1pYm]`ۈ\u0014ł&uE\u0019DY\r\u000b3 b\r+\n5YLZ.\u001d؃@0\u0004*q\u001ap!+l\u000b\u001aIh\u0005Z\u0006jY@Wr>\u001f.o#\u0003*yۤc\u00159\u0007K!@Wi۱\\N\\~ȶ/R\u001e4\u0016 H\u0014.=\u0006bvLNp9U>Q-\u001dhjTmR!`+C]6?<\t,///OGë~\u001cl;\u0001۶[w)mh\u001c=\u001e}Sє*V6$\u0011~(B\u001eE_ڶJrTJۚh[\u0018ԤskyDup\u0013\nV5@B]Mp.3lA}Bfצ\u0016J-lC\u001cs\u0016;w%:C١Έ2D#\u000e\t)V\u0015\u0000+X\u001amI\u0006ySl@\u0016'H ;\u0016/w\u001ek2,YWb6-\u0010um\u001dm@Zm\u00113\u0019ժ,ig\u00020H\t⑨+Ph۹-=\u0004X\u0005f\\\bVm5UJ\u0004+\nlvxCn\u0005zݜn\u0017ڶ1禴ѣ)st\u00166zeNiGSjmd\u0006x\u0015?i8.lR\r\"lY꒴Ҷ1.0˰\u0005`\ni\u0019pgRqMZ\rcQ\u0019r\u001e5\u0019\nY+<\u0019\u0012]id%Za\u00039F\u0006[d\u0000/\u0001J֑zDŢgx\u000b\u001c\u001a\b[IZaU\b3.^kFZ8\u0015++Io5\u001a`[\\~US\u0015|Ϫ\b>{f\u0012_\flq f¼Eک\u001czT3\\jU\u0000&H\u0014fŵ&x+l˼U6*]m\u0018mhts\u0018u/\u0002۶/6ó\u000f_蟛FYї9z:\u001eM\u0002=\u0007N)v3\fo;'m0z|\u001f=εͶ55q%\u0012o\rA_e^v\u00060\u0000?HE\u000e\u0004\u001c\u0013\u0005;xŢ\u0002B(\u0015o\u0005\u0012$iRU%^23\u001eۡ.%F5:3\u001eO\u001cGǰS-hr\u0001Pu2(\f+I˅\nϥٶ22l\nu\u0010mC.n\u0000\u0004f\u00061d\n\"iaŇ)1V:ẘ!6l\u0004 \u0013'\"9Jۂ2`y%Um1K)B\u0015C\u0011X!ިvG\u0016jL\u0017\u0012fw\u0005\u001c\u0005\t<\u001bʳfDmM\u0011Vd^\u0019]xmsӥU%ҲmWk¶ږ\u0017~\u0004&{`$\u000f'\u0006Bb^7iMcbcZ_T65tu7ci֏sUfp\u0015ٶ!v\u001buͶuJ\u0001+@Y\u0018l\u001b6s.e\"ueGO-ٖ\u0003֫D.MC&\\0\u0014\u0006\u00019 o\u001b\"d[U+\nT\u0014ݝ\u0003#lSi\u0011b6\u0002IT_4w%کn\u001ciW\u0018˄N8%2fw\r]³|\u0002zVI+\n%eۂX\u001afXxt/\u0019TD۪\u0011D%u}ͼ%j\nN]+.v;[m\\mlm>_xq[ۼ;j\u001c'l\u0012\u001d\u0019>S릲1rLw^lL\u001cӝƴRhzؚ\u001fm,&`ͯ۷o\u0007EeECWٶٶFu~:o]^hΞ¬9\n\u0014GĵUVa?8\bIYoŞ&V'+y[-\u0007փ̶\u001cTm@e\u0016H;$>0bFyZ\u0010kMmiFZ_\u001bsIHA@ZH\u001aZvn\u000eRpK4\\Vk1\b[)fm\u001d[֫E3>A2ls\u0015O\bZmSsmd.۶Զ<v'\u001b7\u00077k\u0016vllL1ƴ1\u0001\u0000\u0000\u0000\u0000\u0000[s\u0015\u0007ϑؒH`q%\t^\u0004^\u0000&q㦦$+ز~<t:c8M'4i\u001cݬX㋬8(ʴ\u000f}S\u0001k\u0000H퓍v?;\u0007\u0007\u0003\r\u001f?\u0006*{kՃZZo7\u001bnO§[gۭg\u0019Om\u0002OyYXUl\u0018bt\u001cm\nCv\u000bMqi-\u0013|Uqxf䦂(Ve\u001dq\u0018=\u001bprD{fF\\3'ug=ua'_M^wa\u0019]q&Nϖ p\t%/U\u0004~ɺ\u0004\u001b`\u000f{\u0017a\u001bռQ\u001bV]^\u000fk.\u0016.v<UjPvb\u0015OU=_SԒ\u000e3\n@\u0010^xW\u001fE\u0001\u0007\u0006\u00007\u000f#\"ÊIg*oڴ\n}6\u0015Ŀp\f^\u0016%\u0006\rhʱ|Cct:-d\u000bU7b/A\u0014)\u001d\u001eRX!4\u0017Bc.,EV1b\u00107yqzwn\u000f޹VY\t\u0015JZ[\u000b?9mh\u001c=s\u001b=<GO'ѣU\u0003n[C7ܶ\u001bo4l\u001eo'Znm\u0002Oֶ\\\u0001F6\u0012:FhގML-|uM55\ftR\u0014\u001b\u0014o#Y\nb۞*\u0014,G.6B\u0016\u001e$!iUY\u0017\u0013E#ig-lߗO\u0015PM4\nPU2/F4~ќPmL8\u0003\u0007:\bABZZHUV\u001c+U\u000bVUm3%V%\u0015\u0015K\u000bX\u0005o;\u001e\u000ba3Ҳ\u0016Ky\u001b#`c|\u0003ѰB*p7cۂm;\u001f\u0016g\u000f߭_?NO?_\rO?_v>Z3.j۾诛F&9ѣstr\u001b=\\eo\u001c\u001cV\u000fжjGkMnɍxyr}ƶ\u0017mY`۲\u0013UL`\u0001JbREDnuD!\na\u001dB\r4\u0001;mF\"BEB\u0011O6C]`24iQg]BJ\t:=-ږ\u001b\u0016kl\u0017y+Iʢ}\u000e:Є,T:Dnpn:=,c\u0004T=䭍b\n\u0015\u000bQŁO\u0007:\u0000W\bWܶҰӁ\u0019A\u0011ikSl\t]C\\geWm\u000bUI`\nF\u0019\u0016ɶmzl\u0015f%v{d}SqegE5E6z4yι\u001e}*Jppvgvv~Fç[ͧgҶ\u0000e3mk\b*ϪHZT'b\u0016\u0000\u0015mHDZ\u0002\b\u0014\fk&͋\u0005\u000406K\u0007\u000fF@ȕ!\u001ai6\u0006\u001aMI\u0016\u000bބP\u001b2enK\u0002`T!a\u000f\u0015\u0011W\u0015N\u0015]a-Ԛ2lF#qIM+q\u000eJ\u0016_G(V*\u000fevM\u0017\u0019jG3\"\u0012u+\tĿWNȖ]Dxge/\u0018ˈ5Upm\\GcYےj](ȶm;\u0017Bcm_]ت*S}8`\u0018O:.T?9mh\u001c=s\u001b=<GO'ѣUvjpR=\\\u001d^\u001efffm{\u0015\u001ej})ۚi\u0016m!\u0014f\u0015r;\u001aj\u0005q5mǕURpR\u0016w\u0019b\u0004'%\u0002oa%\u0015.SWH1G\u001aЉs\u0012\u0016%]\u0006k\t>_<]ep|R\\\u0012\u000eM4*\rP/I\u000e\u0013պSu6q)pҁBSW>\u0019\u0018;Ȓ6}TGEzt  \b֊oPm!N&Zgcv&l1\u001c1VT^\u0015c!\\#y\u000bж1t2mmMm˘I\u0018ĝ0.-|zr\\jIMnG9z:\u001eM3.Wm\u000fVhzFFF[ͬm/B\u0016[V\u0011m[Tjgd\u0010fQlF\u0014ZIL<M(,3ɶ(SV(\u0014lSV\\\u0010n#\u0017n1N+m\u001f\u0018\u000b!բg^9oQ\\\"FK5AA\u0006K&Pu%rqERnw\u0005x\u0011(QmvXC6QX=PmEÒd=E4o\u001a\u0018R!jp\u0003\u000e\u0016U\u001bP0ӶUU\r[U\r<\u0015^Z\u00034CV\b\u0017H\u0016\n-\u0013m\u000b\u0013}qzQU˾SX)]\u001d]reg5x$&ѣstm\u001c=F&W]\u000emWjwk{\u001bunۇy\u0016\u001f_\u000fnNxӶP@mZd[VS\u0015UkJ\u0015\u001d7k[ZEZ%V\b\u001d\u0012\u0004oǡ>慕unJ*!m\u000f隉k\nغV!\u0013\u000fBa(.0V\nH+ke=]\u001f\u001c\n`,DNnA\u0019I*Ǝf0.%{#xS媕\u0005\u0007\u001dp4`Ϧl\u0011X\bV\u0016\u0019IRx\u001dم`ٰ\u0005,l'\u0002)m\u001b%m\u000b\u0005o\r|P$Šm3m}ђပlb\\j5ն}]_7\u001eMsnG6z4θ7\u001c,\u0007\u0007õ7G'7Z7A)^$۶28*¶d\u0004`%\u0012o=BebUHzD\tWYQ<O\u0013͞K\u00154j$\u0013N7I]\u0017W\u0001X&=\u000bnU>V\u0006E}ٮ@.g)B.7%`R=)=$dC%١p\u0000oF.\u000fX\u0014f\u0003\u0011܆uU7+\u0000UG\u0011AņU-]#FEb\u0001#h[\u000b3m[\u0010a\u000b\u0019\r\u0017ۦUc`kMs&E2'l\u001b$\\e\u0005n*L޸U;\u0007?\u000e?O\u001b\u0019\u0007t\u0017w5`\u0010\u001b%͋_T=_\\i4!\u0001\u001b\b\u0010Eefvl wjc%񳳋\u0019|\n+OJǃl\u001cу$&rt6vYNfcG?l\u0014\u001a\u0016l{s\u0007h[ȿ~\r~Ͷ$\u0012o%l^Sےg]򬛂\u000b\u001am\n٦m$ou3\u001d\u001f\u001b\u0005]N[*M\u0016Tj}}۳>}*4`mde\u0005h[\u0017\u0001K\u0018ݺr\u0011\bU\u0015l۞.\t\u0010vĬ\u0018\u0014!p;\u0018]%~Ȏڰ#ʒUk3TeQd\u001f-IK\u000eNPP7\t\u0012mӶVO>R\bª\u0018봔mc\u0018MV-'\u0017Kۮkq燗w\u000ekxS:|Zz+:N\u0011?K\u0012ud9v:K\u001b;,N'T٠z6\fw$ګ]]\u001fx\u00067\u0013aomswږ0K\u0015\u0003Y\u0013fJ\u0005[U5o۹XlPC1o\t'ʵKqp^\u0001tn\"m1i;\u0002Bn\u0012fV^\"fT-V\"WSk-QJ3S\"\u001b\u0005T\u001bb\u0013[)\r]}\\.jO\rΐ\r#%\u001b)»\n%i\u0015l.=ە|69\fتӰöjmSb]^\u0004\u0015m\u000bmJۮmmu9nX/~R3s6\u0001FSk_*&rt6vYNfcG+Au\u0006\u001dE\u001f~\rlilσI\rr9\u000e\r~\u0018mmU\u0010\u001cѳ\u0002roYU(\nI\u001e\u0001z\u0010|\u000bUu\u0012Mԫs7i\u0003m\\\"z\u001dڠl\u001bp\u0014Pj=\\ǆ2<;o[i\u0012\u0015\u0013\u0005\u0011LTM],\u0000q\u0016y\u001bPp_i\u0017Ylk\u0016T>]YU}̤@M\f&\u0005o@'ƅp[\u000e\u0015}a[`ۆöZ2\u0016a\u00122mlضEmmW\u0016ͷÿ<\u0011o߾\b\"Nj3k_*&rt6vYNfcG\u001c+'/+\u00016\u0018G>`󫍛IlX=W\u0016mj\f:mZM\u0016]~\u001aV\u0014p5r%fJ\u00165;xd:OYڑ\u0004ھ]Tg;.R&\"vHIuBEV$ru\r\u001eA\u0001\u001bPDwγ\bIuU&;'ʷb7,u\u0015{LZyLT~٭\u0002`Mr\u0004\u000eR؞l\u000b?\b~&[ſ'\u0011WJ\tGK\u0016rq!\u0017|̻N. w1\n-9|Z\u000e]\u000e7w.\u0014ojۮJ\u0016\u0017m{8mOߟ^+Gl\u001c&t\u001c=\u0007Ibn2\u001b;,NgicGd6v4\n\u0014:F Y~`\u001drq\u0014N\u0007}öߠm=i[⭴m\\Չ\u0015oIX7Y\f[*mEYS\u001a\u0004\bVbKĬضp4m⛘M\"fMg\u0015lMz[d-!\u0017\u001a(\u0006Y/,\u0017k\u000b}\u0003f$Kw[\u0015cfa5z-!=a?:Dbª!n[C\u0010.\u0012\u0002l\u0012\u0014},v\"6SS\u0005\u001eb~x2\u0002kweMusÝeؖ\u0002n\u0005\"`I\u0004~m[m\u0014rsٶ[\u001co^T\u0007z/\u0003lO$&rt6vYNfcG\u001c,O\u0019v\u0018m/{\u001adlX<xTg[-Vk%=K:p0P o\"&n5V,ir<㒬\u0011SǞb4HJy1i\u001dù?\u0007p\u0002ݪ\u0000J\u0006YZo\u000b=[H\bHQRvRzK9gUה;RЫ0n\u0019\u001eE\\eve=\u001f\u0002m[޶Ϳt|\u0005[_y+vPh\u0005\u000fGG\u0005Ǵ}.\\l4ـ\u0002:M:-X\u0003P'\u001c^7K:cQ\n\bU}\u0004k}D\u0005f\u0013{˶mEJ*\ni[9m!/vuد_~u\u001b\u001dG$Nٸ\u001f%lh\u001c;\u001d}cd*\u001fAu6B8\u0003֮\u000fѶ{kó퓻m(pLۚ\t\"֡\u000eVMQ2y&xV(=Z(%<S4X\u0006ۆ\u000eu\u000e\u001bV\u0001\u0017rB.0\u0005U,IVa˞Uu\r\u0014l\u0005\u0017\u0006i%f5Zw\u0014]wvusG\u0010Ѝ|\u0014WC[\u0006\fc=\"\u0004$*\u000e\u0005/\u001aK2r8`̲jv]\b7,\\?J\u0013+\u0010M\u0007!U\u0016\u001c,J6\n9r\u000e\u001c׺mF]B\u00016̋ɶbgv7yݯ_}Qmv<\nI8\u001bq\u001f%lh\u001c;\u001d}cd*\u001fAe:a?Irv`\u0006m[;\u001dUd[l\"\u0011Ү-E\f\u0014ҶVм$`!puSH-d\u001fP\u000fk\u0014AdH:s\rނ\u001c\u0013w\u0006zh̒m\u0013R>Ċeؚ5yE+p[%4)TI/%Z^'J\"cvÛȰmkn+U\u0005Vu\u0012_<\u0000V-\\\u0005VzlKP\b[\u0013+'\b[U\f8&Qcf)=SuTIo[6.y\\`mKk..\u001a_fyWӽ\u001a]<Dqt2\u001e$_7\u001dMcrt2\u001b;L_\u000eau6\u0005vo\rT{sv6\nO^=\u0017l\u0000J?y\u0014k)?g[\u0005~\u0016 f6m[e\rB\n\u0014^\u000eIZ\u0017\u001fK&JC\u0015iѳR\u0013op.\u0017\u001deX@n\u0004sՒM\u0004\u0017\u001eUIBy\u001bx\u0001m\u000f6r\u0001cċ((ٱDZ%f6>iT`/(Ц8I+f8w\u0017}J\bx?\u0006\u0011\u0019Ca\u0001U\u000b<,REK!g(%\nWӰH\nAQ\u0016A!հ\rn-ge\u001elb\u0016H-?+mm=-mj\u0018zrw޺AXՐ\u0003Du2\"-\u000bW{F\rH\u0005.\rp$:0ȥFkdI;\\#x\\\n6s\u0005[-\u0018\u0016\nW۶_ְ-fa~¶\u001fmwAzm|'O$禲rlwll\u001c۝ƶR9یd۫vv/}{y8CvZ\b\r\u000bs\u001a\u0006m\u000bd|mmʶF.xA\u0002K\tl۞1(%\u0005:\u0017 s]x(v7\"\u000fI\u001dn\u000f\u0014l\u0007`;ل@\f:\u0018\u001bpQ\nhؐ\r:\u0016/ռ74m\u001b9/\u0011J6i\u0016i\u0019\u0018dE-Jd\"-.KWHkz~,!716\u001fHK\u0019\u0012ܗǻC| -r5DۂdsVm(\\\tT\u0000i,}Z` arz^ΐF\b-В\u0014fMfEz`gDں:EDZ\u001c@No.aۮzK?jۿ\u001e\u000eqstw|{\bmَ/m?kMec[S<W9;mMr\u0006ooG\u0017r\u0012_mwSA\u001d\u0016m{߾M.6cöUضfvJ\u0013ڧPڠ)\u001b.\u0001ۗ5J\u0003W\u0006\f°\"(aSx\u001aEm4S\u0016`ҼYω%cy\fK\u000e!!=TK\u0005\"oQΐk\u0018p\u001d\u0001K\u0000db]\nw-r!/1sR13\u001c3EI\u0005_29H\u0004ڭ/fAW\\O(8ɪ\r'\u001eP\u0005ִ|s-\u0016jEH<жXCS&2WCal\u000b\u0005[5EY_\rXG,\\l\u000fIC\u0011nF}\fL͘w|Y]vѶMm§N>Bx|d\fN;vY\u0014ڿ\u001dv'9ي/`3k\u0015sST9;O6UNec[SnE9\bwҺ$7;۽A\u000b}8\u0002ow\u0012m\\ka4m[-`:Y\u001f\u0005T[U/p\rN-J\u0012o\b#r#x\u001b1Pejrmw)䪈d93(k\fjR\u000b\u0003XG\f\u0012xE\f[p.0yٍd\u0016f]RY!w,EP&ڥf\u0012l-4\u0019[E|٠6\u0018|K7ż\u001aYB.q\u0019ΌKPE*:\u0014H i&d7\u0000;YCU\u001fjk\u0015\n\u00105kp3ifbۺi۾l \u001eWOw{m\f\u0001gllk\u001c۝'\u001b*vTζ-m|9I&Iz\u000f<\u001cu\u001eȶ\u001f~ֶM\u0017mkl[#>z\u0012Z@#\"f\u000eji\u001e/\u0010\u0002\u00027\u0017Ÿ=NE4<F\"\u0004(tBbl5<kf8]|\u0010ndY\u0019qA\u0005غ˚u-+f\tOlA\u001dRL#lÂq\u0004R*\u0015&+w\u0018m׵s&ض\u0019\r\u0011#lVl;0m\u001bhۈf\u00116\u0007B\b}KE9fQ\u0011`T\u0005\u0006d^\"-\u001f\u000f\u001bb>;\u0014[}ʹl[\u0004i-يqp\\v0+y\u0005891m[\u0011.\u0016Y1۞f|�;^O'7~rﶿ\u001f\u0013llk\u001c۝'\u001b*vTN7\u0018\u0002۽\u000epyx}yjv\u0016Sŀm{omF+SعҹJ%xV\u0000I%\u000b<\u0002i\u0017\u001b,\u001e\u0012fi\u0014{\u0007n.ÐU[g\nlCgK*Ϣ|\u0003\u0001\u000eDD]\"m\u0019\u0003\u0010lkVR\u0018-Ȟ\\0l<Ͱ[S\u001cղ@/\u0010\nlCyK\"/yv\u000bmI\u001bI\"ۡ\u0012o]-\u00036Aɪl7>zE\u0005BJ\u0014fM᭼\u0005a\u0013\u000fm}8\u001c\u001c\u0004elee[\u001838\u001cmtl[ƶN_\u0017ׯAl\u0012\f/ȶ?؟ƶʱyrlw*\u001bۚJ\u0005l{nmovڷ{\u00016}w}8?~8pmS\u001c\u0016yՔm\u0004\u001a!AȔ^{fliX`d8\u0017\u0007L\u0018WB\u0017}\u0017ۖ\u001dж\u001d1 kjخMtض\u000eer+\u001b(\u001bPV]ʌ\u001eyk_m\r\u0016ɴs\u0013&mX2T-/ԭq;(%wSd\nuSǆaMҚ\u001d'r\u001dT-&6\"/<\u00183D\u000b\u0003i\u0011Z\u0001:<j$+\u0018hީB\u0012\u0012l)l[}Y\u0002vڶ۲Xֺ5-\u0019\u00183\bVŃcV\u0015wmCGöɶb[oֶ_z?\u0001l{9ۉld3k\u0015sST9;O6UNec[Sl`ӭ|\\MZW;nz߹?;<\u001ct?\u001cu?\u001eujֶŶ\b[ \u0003ضU\bh\"\\=5˙y\t\u0007d\"\\\u0017\u0002p\u0019)\u0011\u0000(\u0001kM\u0004(x\u0016\u0006Jh\f>֮Zmp\u0007M-1V7b\u000fzz.\u0017s_B۶=aԉIgl(iX|D-F*j3\u000b\u0004#\u0017\u0018_\b702Uj#A.5t4i\u001fLՐ\u001e\u0016҃^#li&pj4iؚ\tDۮԟeQdD\u001e/.mio~=\u001f{ܽkmO6T65UΓm}cST*'\u0017Nr۾Aۦ`[aa+HG۶\u0003!ۮmk~Io\u001b\u0015\u0007\u000fbK\\zalR\u000b$EX\u000b%k\u000b0\u000e2sa&\u001c/\u0011,j5=9$2o&in@\u0005QxEW\u0006{ʶlRO]k7?\"ZxV6\u0010Bu]R-\u0016\u000b\u0016.H\u001a$\u0005R\u0001\u0019G.\u0016G$!`392:lXBKD\b\u0004=\u0016_ݡyfȘ\u0011\u001e\"u~W\u00108Ҝ\u0002\u0013.\u0014dQDTYm$\u0019|\ncH\u0004vC-v{H<h[ڋ'[ŰQ\u0013HհE*7\u000f[ٮVF=㚢Ka޲pV\u0017|$\"/+l\"JJjV9@]Ȋ.6[<``[$\u0016l_6ϟ?$:S7\u0015ڶ?؟ƶȱy/rlw\n\u001bۚBb'DSqs\u0000m~x\u000b\u0005۶??Cڿm^\u0002lĶu/\u0015ފm\u001d\u001eŧ\u0004ՎaRse\"\fXGj\u0002\u000f+ +C262m\u0017ۂuw\u0018d[\u001c!\r\u0012f΅A֝!\u0003\u0016<\u001dѫ6g$\r]#\u0000rPPy\u0012(Řq}\u0014ώ㌜cmƌܼmcƬ&-^C\u001f1_HM7\u0012W屄Y%`܌|,ۖ[\u001e6\u001egK\u0005\"ҲssI]ǰ\u0017TK'5\u0018,s!ҹ֡֙Wm\u00168kU8Y\\*)9mɶ/'r\u0012kt\u0012$禰)rlwml\u001c۝ƶPy\u001bNw\u001blۃͤyw\u0010߃m\u0011`{rOζˤ\u0002l>c\n\u0011D\u0004y\u0012QA\u001c>¶\u001bl[tͩLTS\\|[[$[2\fvD\u0004ނg4ڹ\bR\u0011\u0016 \u001co>\u000bKu\u0011\fx60%x\u0002~Q~\u0005dz%\u001c\"d.4`s^MB-Jwm1x.\r[x\u001a_\u001d\u00078V\rhSרw٨\u0019Ҳgq԰BiFJ~ɳ\u0017e\u0012Z;AZ<E`[\u001dv.\u001fB`iv\u0014\u0005xମV֪KX\u001dQ-uYl҂mWl{w\u001bӕd:im')llk\u001c۝g\u001b\"v)T.ހmr?4 (\r2c\u0017I嚱\u000fA;q\u00189jΘ\u0017\f]0/MVIe\u001eɶ\b۔ƎVg]i\u001f\u0014ע0fNYꂔG\u0005I7 \u000eGԟC\u0016l.~QUv\b\u001c\u0011'3Qg5B#uFBuBM2]Ƴ\u0012z873se6\u0005n\u001f\u0013\u0007zNa#H\tYm\u001aS\noiK\u001aÀԝN*AW`[wf%yUKٯٶ`۔mK:?翟m߂m7\n`{5ֶ*禰)rlwml\u001c۝ƶP\t;%jqsм>?\u001c6?M\u001e޶~;n}:m>ksf\u0016$o[-o\u001fώl\u0010z\b:\u001cuaqqHi<ö\u0005ݠ#\u0018e\u001abͪ匢Z?p%uT- Ua\u00027\u0000s7\u001b>\u0016a+\u0011q\u00172z\\سP!iVh:*n*\u0010.d#9M$j\u000e\rD[\u001f4Ʌ\\i)=)O^/yY8my\u001b1{ZJy˞S*sm\u0016\"T\u0019X\u0003l\u0003<\r\\]0i\u0018\u0019\u001aҦm׽\u001aU<mWx$ۖm.ǇcYuOvӻt?:!\u0017\u000f\u001465Eγm}cS\u0014*h\u0010l{\u0017]7&A|\u0007=$۞\u001e`۳֜m׍m}HvȤ\u0011!h5\fX0[e~\b<\f՞դ~9ժb@\u000e$z)nι8Zu`q\u0003u!x\u0019dVƹH!.\u0007\f\u0019CZ7\"lk _g5*iDfD5\bMd\u001c7^&U!of6s\u001d'('\\y]\f¥z[߻[m\u001e\u001bT!iM`kvY5\u000br3WRG\u0002y[w:$Vx\u00171\u0015҂:y\u0004jΛ,i\nYL\u0005H~pk\u0015:E( ú;ՔT\u0005Z@\u0001NIlŶ7?\f\u001e>;nm_wŶӉ7)llk\u001c۝g\u001b\"v)T\u0017t\u0007y{\u001f]5n&A6x~8i#oO[s]CVm]\u001f`[\u0004\u001cGRckn\u0010t\u0018/\u0017\u0015b\u0000T\u0017]&\bm^ɳڪ}-\u001eKǰfD\bo5l\u0000Z^%.7W\u0006n\u001b;'U\u0006A\u001d73\nB\u0001M\u0006[y&LZMQ#D3my\u0005C̣by8\u0000c\u00133/`ېldw\u0010l\u001bdHʨ4o\t\fؼs{\u001c{X\u000bt\ng5\u0007ɨ֌%!z!q\u0005r\t\u0015y;Qm*wO݁l\u0004\u000eOxK-[7\u0006\u000f;;n\u001d%\u0017{FmQMac[S<\u00179;mMM\bFhIt\t=\u000e\u001f\u000f$y<M\u001eڟZ3-/m+lێضB|0\u001a؊U*dU\b\u0007ny\r@.\u001206xyѧ%m[p\u0019vz\u0005dgHZ,B\u0011ᆰՈ\u0002H;܆Os}\u0018/`]\rvi\u0004ly70AjQ\u001c)[Fm\"Mj<T\u00160Hqˏiըvkvh2rͦ`\u0003.;aTKaf%զMYu](gιBM'Ay\u001dm'pX\u0004qը\u001dTǐ>rjbUל%\u0003~A\u0006P@p\u0012`,\rqumbh\u001f6>Q~/:/'7)llk_;i\u0004Q\u001c¶\u0011^[aa\nm\"H\u000fmھVM{n3g39;;g\u0012\u00179;mMs/8m\u000f \u001a&Qr=ގw'\u000bȶ;h\u0012ۖy[G>5L\u001bfdp\u000eqI+Mų,u4uָn,\tC2oŶ$ض\u00027j3\u0012.ؖH똱#97D\u0016.d71:\u0017\u000fּ\u0005m'\u001b~y+m\u001b^\u0013\"\u000fAp\ro\u001dT\u000bmG\u00001\u0002VTSW/1iٳ\u001fѹ>?\u000eun\u0013Ke\u001cNԆ_[-\u000eۉ+\u0012l\u0011p\u0010aK3W\u0018+I\u00175셏W[)t.\u0011jզGQ\u0001\u0018qUYl땶Ko\u0019BJw\u0000f\u0000W\b`[)|\u0007y¶\u001f\fm;ٜ\u0007鞚\u000eɶֶ\u0014uS\u00149;/6ENac[Sm#%v\u0010\u000e\b\\7G?ǐIDlެ\u0015m\u0001\u000b8qCۊ>H(\u0016ʶW\u00042;A\u0019+MsM\u0007abMZ\u0014k@\u0002[\u001a`\u0012lɐɆ-\u0016\u0005j`];ʁ4+*mm\u001bz\u001fBa&Ґ\u0016K\u0011\u0012rw5\u0010JVK6M(jl\r۪P_\u0016l˘m+9Qa\u000bC\u0012o1@WD.h\u0014G,zV\f\u0000VibA\u0017\u001e5xF$Ym\u0005xg4]sY\u001dy\u001eT\u001524϶\u0015϶rmV\u0010ppO:\f[j\"\u001d\bo3Xm)^~;d7ߺc <WQk\u0014_\fm)린)rlw^ll\u001c۝ƶP9BȔm;CQ{OjO{ZZ֓!>VKj`\u000b$)HW\u0011.3\u0016fv͈ۂm\u0011\u001aޢ)\\tѶP\u0004 \u0014+\u00169f[\\\t|cf<#\u0013!r)\u0000\u0000\u0000\u0000\u0000\u0000Is\u001b\u0015\u0007!\"W,\u0014\t`0\u0003Z\u0004p\u0003Jd-\u0007r,\"\tP((.\\r)7TyKwO\u0003r]Wozz\u0006\u001b\u0016J;W v)bg@=\u001dB~h#\"\u0018sw-j\u0004Q3\u001cRdV\u000f\b7\u00028Sr\u000f^]D\u001dQH[j>B,*|.k\u0004}D\u0018'\u001dhr#Qd`oCÕ\u001b-BzEN/\\=\u001b\u0002[UlB[-jix\u0016dZo\u001ahW߰W\u001e\u000e\u0006\u001aAc\u000f\"X\u000bH`\u0010%n=s0!ogχ\u001f\u0006o\u001egkvt6I8\u001f|߿{0lh\u001c3k\u001b3*L1T^n';l'>M t6i\\\u001c4\u001c6\u001d?l]>l}7oh.hnu\u001c\u000b\u0014^\u0007!A`\u0000\u0011\u0001\"@P`@\u001faS\u0018\u00074vFwP=4\u001dpS9̭qņxZ\u001aNꃹ\u0015\"6ူΉ-P/P>\u001c\n)^Ε\u0002yB=UPVë\u0000\u00064|mnƞ-0\u000fW\u0003ղm\u0004m\u00112#i\u0011U9wK'nh\u0006dlNUVT--~-x70Ŕ\b2\n\u000f\u001b\u001cA]hȤ\u00195B{\u0016%uٹtU@{\"mO7l$\b.VOdtl\u000bm0wm`Ez=}6=.f͎ڳ^b':\u001d7N驱׊lh\u001c3k\u001b3*L1T^<NɶnrmǐIA}ykO{\u0012\u0004luh[O1l\u0005ؖ\beŐJXC$m`\ngN$7\u000f[\u0006ր\u0014e\u0002`ԃXЕ\u000bj0LWn!5Ǡ˵Z%u9Zm\u0000\rw\t\u0016_%@\u0002\u000by9\"uJQj;U[RSl\n\\o8R^q$oN|\n\u001b \u0007\u000e\u0012ѐm\u0003l\u0016g禿\u0018\u000e\u0005lIHlХ8WWՌm\rlζ\u001a{\u0015fK*2um[-Cn+`޶\u0015\u0000[3P\\7=n\u000eжDg\u0013ɾWlh\u001c3k\u001b3*L1T^>ٶ[m2KglҼ8hzؼ<l~\u0000>\\-\u0016Jآm\t\u0011%Sڶ\u0014B.2\u0016CER\u0004lmkK\u001be!\\Lm\u000fI[\u0017>\u0005h&l\u001b\u0011o#\\\u0002ۂ=\u0005o09{6\u0012]m~ŹU+NBM-H#m5@\u0010Hz֢`OJSRmSM­[\u0001X)YjmΣ\u0016V!\u0017Oaw.T\u001b\t!\u00066#b\"bi,T8Uȕ-I).45\u0012h\u0016<ˇs)*ruk\u0019XW\t\u000bݼygl{=NS~vx6F۾O\u001f5lh\u001c3k\u001b3*L1T^nǯG;12oƍIAupm\u0007h\teD\u00042BP\nau2n[n^V[\rd\b^]=&x\u0013l\u001bIr\u0005o\u0014^GHZ)\\Z\u00019\u00039`޶E\"iEņ\n%\u0006P%E\u0018o<{\u0011\u0019%\u001bVBJ4^Q;U/\u001amۜj=gͨ-\u0016?T\u000f+/cRʶ}+\u001edyE\u000brl/r\u0003׀.\u000f9U{q\u0013gU\u0015~\bpmek\u001f%[\u0016mK̈́m-\u0002l6m\u000e飍q{v<ً\u000eO'l_ƌ1ӹ1rt*\u001b3J\u0003n|\u001bm^:\u001b\u0017Ư\u0001\nskz\u00036\u0015\b%lC\t[6\r\u0018d\u0013b/\u0010vm`[fUˊ۫K,\\ƝL|jJ޺P\u0002\f[HZ\u001cu\n+Һ\r1\u0016*B@W\u001e\u0018\u0016\u000bؒmP;a+$+Y2{)V\\\u0011(\u000e%*/7T{iA\r]yf\u0017%r\u00163\u0016.ٶ\u001bOL\\Gy\u0016F\u0012<\u0010zZl\\'Z\\m.vþ\b<llkom7\u0005oh۾mϮ}6=;\u0003\u001eW{_#-v|?k\u0012sS٘T9f:6fUNecFSz\u0010މO\u0001o3^z1n\\ӷ\u0000a\u0017lK햶e\\X\n\u001dJq\u0016B\u0017BEf\u0004[0H\t \u0014/\rV{eIW8w\tS[¾Ƀz[8+]\u0006/\r:\u0013%\n\u0012lN!\u000eN\u0003\\,\u0016x;څ&O}mNF6Z\\\u0002S(\u0003SiTl J-WZPC%°\"^\u000bU\u0010\"\u000e\u0012\u0007l\u0004X0V\u0017H\n\u0017|b\u00182)\u001c6NKT`[|4\u0015%=+\u001fyۮ[=T`\u001eַm|ɶ\u0010Mݶ\u0017?=8\u0007>D۞m3Wlh\u001c3k\u001b3*L1T>=]ߞwn|Nwͤvx7i^\u001e?\\m\u0017`\u000bq\u0005o5Z\u0014L(I\u000b012g2ێo\u0015X\u0000++P\u0015xJ{\u001eG]YnP>_ Wv+\u001dг|T'³\"\r\nVk1q2\u0010բu2cGJ\nMm\u0015;[\rn˰\rQ\u0012p\b\u001d$=l&\u001b\u0000\"c9hX\f\u0019+\u001a8Tb\u0005Ҳp%\u0002x\u001dm\u0004bBE\u0014U\u0015mk/w\u0001@҆mh\u0003lu\u000e\u0016l\u001b)Zm\u0000[FVi'O6Ύ`t'{ƶ_)禲1rtm\u001c3ƌRiӓ g\u001b~|zu?7\u0003Ȃgg\u000f0kc\fH\u0011+{6U0x3,\u0012lmqHVQ\u0006\u0016sTUWϘ}i*=U]ݞ)տn\u0001yN\u0005V\f=\u0017mK\u001d`\\CtU\u0014o\u0019\u0018\r\u0012@\u0018Z(\u0010Y*Fy1[\u001f\u000b6\u00195LGt\u0007\u0003\u0013Kd[ -\nWʄa\u001bmaX\u0000vx1e\u00060\"]m3\u001e \\mv̊\\kk^i%b\u0005EPUS}/]*?67\u001f0L\u0000\u0001fJ/\n\\XYI>l׫k\u0013Y\u0003^\u0004S\b7Hp\u00168\u0018q¤\u001d+\u0016!\u001a5\u00160\u001brs!b\u0010mܳ\u0013\u0005[-\u0019\u001d>6tgʶ\u00196ҶuMB[זl{ދh'[C˩~nJ\u001bۚ2vƶ̱)mlkJwý+Mm7Qn\r\u000eo\u000fo\r^\u001e\u001e\u001eeoڶ8\u0010ڶC;@G\u0014[\u0016mEm!\u0016UKi\u001f\u0001+\u0014cEQk\f\u001dT\t\\b\n\u0018\u001d\u0004WSX\r\u001ak.;\u0012\u001f=q\u0011\u00180iyݟH2rA9oxiH]I-iV\u0015D߅p%1+ߢM\u0003b(4C\u0013\u0005A\u0012UHǫpM.PF6l̰UA\u0018mUF1Z:\u0019q\u0011Rm\u0003?Ѫ-$\rZ\u000fl\u001b8SC\r\rzn壂mV^@^k|<8z]X۞X禴)slwNml\u001c۝ƶTyl=j\u000fgӯ󕣻[ۃ;Cʨh\u001f$A\u0006L \u000eȶ\b\u0007IZqLb\u0000T!؎#R-\u0016.i*5PX-\u0017Xsjq8X\f1&9fx支N$l=\u0005ۀ\u0001#mK똋dpڌL]CC)\u0016\u0014x\u001b&\t\u0006][\u0004MZb,8(-\u001fH!FU\u000b7\u0003k\u000fb\u001bMNѶ#\u0005J\nc\u0005;bi1\b!p!C{\u0016eȶ\u0002\n-ְ9*۞33m\\mv(}ghՃOfh택擭+ӧֶ'\u0014)mlk\u001c۝S\u001b2v)U݃K_\u001d\u001d\u0002ow\u001d_{{\u000b\u001f\\z9۞}-8t\u0002 -ؖ\nV%\".\u0016l\u0016K-\u0004#Ȉvb\u001dbh\u00151¥BP\u0006k4,\u001aCD4#-\u0001lq\\T\"WV0ڼ4բ-xv*I˶\u0005\u0006ZY\u001dFI\u0011e:\u0014+VP%6^UW\r6~p,\u0011N$xq\f\u0005gj\\\u001b0\u0014W\u00075x\u00012\bU\u000f$;~Z'\nE2fea\b;W\"$i5xp\u0019\u0003\u000e1%ێض\u0003GB6cƆmܶ\u0005ۮ<m_\\\u0005_lD϶Ѷ7mO(sS֔9;6eNic[Sۿ\u0000o\u001c}?\u0001o?;v\u001dCȝHTǢ^\u0016aG|`P8[6\b\u0005V\u001cm'p~%*[\u001c\u0011o#ї%\u0002Qs&T$l5ugy\u0006lCUݾW6\u000b\u001dtް\u001ar1ˑI4\u0005\tց\u0018,\u0013iI=dr&\u001aPe]JlFҡx5{fnn婾]?-EmVd6Zi3x\u0014^PLS\b WRmq3o/[&O}s*ūp rFjGД\u0010^)F@ڹ\\\u0001\tdM\u0003)\u0006_dѶt\u0014\u000bS6\u001d{N\fvP]}\tvpp}x\u0015?\u0014=R>=Mic[S֗9;mM{7x.go~J\u0000]m\rl;1\u0019h\u0014x\u001bYa%=0\u0013w\u0005؎\u0012ыܦpR,\u0010lQR-$E\u0016:ʼZts\u0017<iN˫5DeW3\u0002\u000b6hX\u0002`}s$-\u0015\u00139E:p9\b[D.v\"-y4y[֤\t\u0012ĸ0u||9Fۦ^YwmY%Kb\u0015mM䪂j\u000b1*Xa^G\u0014%{9d޲m=\u0003hyҹ\u001amc:l0-\u00162t1y~bh3m{9}em{Bƶ̱9/slwJ\u001bۚR?_v\u001d>^^`+yY?J_l_^'\u001f턒\u000e6f\tf\u0012/(\u000bkP^eD`Lmex`[Sz\n\u0000$\rnSTYV&d̀mBǤ\f^a\u000bS\u000eN\\\u0000\u0005fum[,`\u0004ۮhN2Qsf^U\u0012!Yk)L{Z\u0012o\u001fPQӯbROSoSלM\u0016=[\u0018DbVjWMdyҎ\u0015i͘U5j}W!2]q]Q%-6\u0017mxb\u0016l{vX\u001e|}q}pl\u0011=NX۞`禴)slwNml\u001c۝ƶTyt)~n\rx݃ypj{`//rqmm\u00000K|\u0014GNqG\n#0\u000eB|;\u001c+#g\u0010I\fC%iM\u0016U+ThJՆ\n\u000b>\u001b\u0014T\u0019\u000ev\r\u001bkS(piq[Wkwj8\u00171HR\u0002-\u0018lt\u0010\u0000ɵvb625M\u001a+\u0004D_WI\u0011\u0004l\"ېH/>K}\\¯ح/7¹\u001a2\u0006i=QTk\bw֡@\u0011iq\n#w\\<6><jŜmhjբD0p;j\rw#*\u0010m_!\\7-~\u000e[i۩˶\u0005*vTL>]}7\u0003\u0017ș޻;thVR\u0014)F\u0011\u001cjo\u0010[%F\u0010\u0015-B\fEE\brJ\u0002ؖk\u000e\u0001l\u0004꽪\u0011 50\u0005Qx]]_\u0011fY?51|a-ﮅϏk~蟛F&\u00199;nMd{\u0012|E\u000bw_v\u0015NM\u0006VÿYF\u001ca[\n(aa\u001e\u0004hS\b0r\bv Y\u001ab҈\u00152(Ez\n1F\u0002m\u0007=\u0016e6\u000f1\fK\u000b\u0010e6\u0016\b[./*\u0018:\u0014\u0002\u0002e#zs8KATų¼\f.\u001f8\u0005Oug\u0003g\u001b\u001aZ`LO\u0007{Rv\u0004[Dn9-`2)C\u0002+k4CO\u001106гZ[ϒUa\f\u0015YJR-bfkoͻYfl\u0006Emj[|n[[oHm..\u0019\u0013`j)c=ҶkGmtk\u001cݝn}*Ӟ\u001c|e\u0017\u001f/ts\u000bߞ?\u0011\\\r\u0018o_m#m\u000b. -[\bWe\u0014v ʤ\u0015AŘ1w)U\u001b)%ۊ5%\u0014Z`e,mc[%b.@\n(UK%L. ƒj[3H!XFGvxqgS{\u0000מvѳfL\r%o%uw#řX\tץi\u00152\u000e\u001f7iXƏ\u0013-zض\u001cf<+\u001b\u0002;\u0019\bUm\u0010h\u0005&¶b\u0016vxdm|\u0019W3/ON=;\u0011\u001a\u0005Gmtk\u001cݝn}*;}xzc݅>u7_\b !A6laKJ\u0000fh\u001f\u0003j*^\u0000&\u0010\u001f\u0010\u001c9lMa[Ĭ`,QW\u0015ز\u0002=\u0002Gb>Ae*h[ِCU\u0014$\\[tnC4vyIl\"\b[\u0010\\\u0014:̶\u0002\u001fBz(I6\u000fw\u001d:\\8rd#Bn`X#Ys뱶Fjիx\rt('Y\u0011ZMm\u0013U\b\\boi\u001d}Kz\"k[@.\u001cV1\u0007l\u001b\r\u00161J¶\u001e-qt0`\u0017g[{\u000b{\u001b{姫N}q\"x\u001a<[ѶH?7nM3ѭstwr\u001bݚ\\~}vv:\u001d\u0002ᕕ\u001f.\u0000o\u001d\u000fVՀmC!61I\u0010lk.Km\u0013lMX|Vvqp2``xl[Jm\u001bZҳ\u0004X\u0003'b@ծ\u0002^ή\flQV#e\u000b\bhe\u001eؽ\u0000`K!Z]TR'\\QI+RdV[)ߖ\u0018Kk\b^^\u0007^m[0iBg͌g}KNF*\u00166yjA@`݉|8\b{\n\u0013.׉IB\u000b?;%f3n\u0016>\u000bk\u000eYક:\nӫQGFҶj-}\u0001[ҷe\u0011Y99¶}lk7wק^;+tv1mtk\u001cݝn}*w\u0012nbkÎbՕ>mQ~!\u0016\u0014\u001amS*Hvg\\\u0018\t7D4\u001d\u0011]0Y%[1\u0004fƶ#`\u001a\u0016aŤ\u0017\u0017\bmqB\b\u0017G9mQȝ+_Rty,\t;\u001bt%r\u0005oy=%\u001c\u0012!\\\"oQЧ|TGCwԹh\u0007\u001b\f\u0003IZMA\u0005cz!X6\u0005ra\u0001o\u0017KG\u001a\u0002xR\u0004wK\u001cn[iuX0mk\f\u0018Ŷ?;O7fO\u000fzs\u001f\\Gc\u0012s9;c\u001b<Gw'ѭU[5saފ;yi\b]>{uů7\u001eGm{ȶEm\u0003lKt-5C=mC<ヰ-\u001d\u0012{*%\u001fa/%#V3\u0016\t\u0014<Q\\jX8v9f%o\u0010\u001b\nrrB:~o6h1\nզ\u0015\u0005EkB#:O\tm\u0007QBMU;1\r-EGmKEZDȈ\u0015͋UyeBRl\u000bW\u001eApyTZ\u0015hf\u0006\u000beA)}2ohC2\u000ehiB`\u001bD\u0011*/m6H%s$N*}t;x:nݖu}i1mtk\u001cݝn}**VTQ+ެ\u0015埮97{m{Dڶ!fx;PblBe)%¶/`n\u0015z\u0015W\u0012d]0)_<%\u001b\u0002̶5)p\b7d>pIC³V\u001c\u0006[`<b\u0001,HK\\F϶\u0004ihLv\u0012X\n\u0005)FrgRva%]\u0003.VD8̞KӮ)\tTQLH]Z&Y&\\;[\u001b\u0012%UaM\u0003>6dԳ\u0003YR-.0ڄep\u0006o\u001dI\tVO#.:Em58l1#l\u0018Um۶P5\nҶw6\u001a|tv7rشn4Za;*݌J7\u001aO?&?7nM3ѭstwr\u001bݚ\\ĕ\u0013_-LB-NnU&}+ˇWW93\u0007=*m[?mk\u0005OY{F\u0019ۦcRm=\u0011>hm\u0003Q&\u0018|8DpHΕh%\n: ---\bZ8tpɶ\u00103\u0005o=¬\u0000\nA\u0017Oq\n᪰򳌷\b\u000f?(yCMBa0%dlM|3\u0016/O$}vvt\u0019f\r\u0003V)\u00013E̺Zh1>ۓ\u001eLULp]{\u001ccќ\u0000M'\u0018lHnsfߎ\u001buZp2U-^\u0015U\u001fLnr\u001bݚ<Gwgl[65٣W&@\t.LlU&>\u0004·#l[ m\u0019o}*\u0018lQ\u0002>\u0016G\u001eW$C\u0007\u000eYsQt[╴\u0015vњ$Ef|D2F!*\u0005:cn\u001b78_\u0015\u0000I\u0000$\u0001joR$\u0001LF\u001aؕ\u0003dmR5(\u001aJ''7\u0005r,b\"\u0007F\u0003Ɠ]F\u0003\u0010~\u001a].Va+ڶ\u0004X&*\u0012,\u0017Y4&le\f~\\Y)mì)\u0015\t˔nNR\u0004\u001bKV@IEڣ[-g3U:\u0011kEڭ\u0005-ӼMzZ\u0018UjU<]u\bӜ\u0006gl\u001bmyE\u0012mêm[\u001f~\u001f?.&v=\u001bY_#X\u001b\u001asq9;Ƶƪ\\ػ\u001d\u0011\b[xn~?Km\u001bTlao2oc[5\u0006o8mJbI\"Dڶg4j\u0005\u0019MsA!&cq1NCd^X®TԵ\u0001ުO\u0001AvXpeC4\u001fo^\u0018_ӏ\t)6i#cٹ<icSE؊jz\\F\u0019m-j7ד\u0011\"\u0019*գ\u000e-e\u0004\u0007+>аm&La[^ -öQٶ\u0007ϣƴUZ>voo\u0017˟w2؞7\u0003/}nkq9ڸ\u001c\u001dkZcU\u00075\u001e\b\u0019׷nZ\u0007~}\u0006xKamYؖTKE\u001cP*Y\f\\\u001a \u0006œGr~d\\\u0002E>^9&\u001a-F)Sbevp\u0011\nx^\u001bx\u000bs\\ ѻar\fJ\r\u000e5?\u0019zdV\u0016TT9M{wK@q\u001aj\u0016ԭz\u0014q)sO@ˣz<Lخբ\\Dp\u000bmQ,Yifm\u0017`_v%\u0016?\n\u001f0-d\u001e\u0000ޅm\u001f]}\u000f`3oͨP$q\u001bkZcs\\w66uڸX\u0015-v\u0003\u001dF!\u0004x=\u0000og\u001eכw\\\u0013ʶm\u000b~޶IB{E^l\u001b(bD1J=-ְ-\u0007d4\u0005&\u00014\u001a\u0011Bn\u0014\u0016\u0012lhae\u001bj|Z\u0012%dp@zWEI1%\u0018kϚ\u0007^\u000e3V-(Rضփ5j2\u0014ժۘBa˛iB(,>`[]\u0019\\]uETS\u001c\u000b>2`\u000b94h7*͕m\u0001/\bTlt5e\u0016l{XOQ\u001d`{^?ύq9;G\u001bzcm\\k>\u0016rr7DލNGd;S_w~믿ܶ\u0002[J6\u000bؒ#\b\u001cm\u0016+vZjF%\u0012\u0007\u0012Wl^miۢЪ2\u0001i$jk4\u000e0rټ\\e۞\u0007^*`^\u0003\u0010n\\ 6D-!\u00172,V9D\u0017=\u001a&;PԹ-k7Ua6-ғ\u001em o[zڮ^\u0010Tja[\rr2:VeiBo\u001ev\u0016cE@瞇\u0019=\u0018|ȻEp?c\u0006^`^?ύq9;G\u001bzcm\\k\nvpr=xۯ\u000eOqm;=L %~ƶ\u00066jUTS\b7AS0Ux\u0010.72K\u000bBn\u001e\u000bi@q.m˶,P\u0003t)h\"]Pt2@VlX\\\fag:W\u001ebg85A,.IyӠ.&613̫90lOM> ZBU&|`[\u0000Vl\u0018'eRkRjTD5U[PW-S|J\u0017\u0012iWƨIO)>'b\u0012ll[|0W;[\u0000[öM-dlh<.[y\u0003l{=:YOx/\u001fIڸ\u001cםkqݱ65V}m{r3ÚvTP ƶִm!\\\u0003ʶ\u001a}ۚX \u001d\u001aQR]mdaz݀\u000f\u0006(XmM\u0002jضYm;GR--B3L]\u001a{\\\u0019ӎ.\"\u0017hiڶK2lIսo%^{p^_Vmoκ)*5ߞ>\u0015IZ\u0018\u0015rHVx+IdʋgA!feަeRBnej1'a\\\u000e?'AVj6E6g`۠^\u001c\u000e<\rxɯv\u0011\u0014}D\u000e\u001efͰ\u000e%_?ύq9;G\u001bzcm\\k!ږ`{r;<YN\b8n\u0010m};z_n[\u0006fٶLl+\f;ȴZf\b\\V\\Hn\u0014`iĶVö\u0017\u0019`V\u0018UĶ@\u000ewE}7\u001d\u0014sy\u000e83z`\b8ȠT_\u000eVk\u00177AZM*D5klArp\u0017J6\u0010$l4:-\u0001\\Fn5=ժU<yL-l[:JlM\u0003/?=`[\u0005]mYm?a\u0011l獻;\u0002\u0014_#X\u001b\u001asq9;Ƶƪ\u000ekZ{\f`LjfZN\u000f:d7fbW'_m\u000fV0Z\r׌\bcFLm3\u0005\fa\u001b\bo\t$2Mᒹ`\u0016xD1\u0016w\u001a\u0019\u0015\u000eb2`4Ϟ-6x5@M\u001e4\u001ec\u000f\u000bW\u0005\"L]hPB\u0001ƳnN.\u001er*5$]\t/;[&\u001b.eJ/\u0002$rң\u0012m˪5aKuXl&ഫxi\u0015e\bo1<m4ZD\u00007moX=nѺ\u00133ol1\u0017$scm\\klƵX\u001b\u001ar? \u001bN\u001ffn?7vs\u0018\u001fΛ\u0010w_!oŶ\r\u0012mԶ-`k6+`\u001b`yYNZތ.,45\u0011󖅛kv\u0003Ӷ9qUkEU?RMq61ZTR\u0014\u001a1lIKWd\u0018q\u0019_*Ҳ=M>\u001c\u0014eA\u0012WKk~q89F\r[[=#ʃ\u001f°pK{\u0013q.\u0015FTUṲ_Dgu5\u0016=˰5\rjsF6GTӱIDm#\u0016z 7g݋~\u0017Tˁ\r`[b[mܷ\u001f&?3)o\u0006ek3oVek\f^?ύq9;G\u001bzcm\\kn؝zi\u0018\u0001\u0000\u001d6ڲح\u0018\u0001$^\u001fҍw؎j\u0012Lb\u0015I4jD\u0019\u001cP/^{\t\u001b\r\n:yg|y6̠k>ɶ\u0016=NLi{mHe8C޲dmJګ6*SVTa\u0014\u0003Ӥk,S\u0015\u0002X\u0015#-\u0019P>\u00151\u000eUzi>Mn6m>\u0006%Z[Y%\u001cEz@t{ټ󐱸#oDE~\u001eF}{a܊ea[]Uۆ-=\u0014-#Wpڗ\u000e\boj#\u000e%fmh\"i\u0001w\u0001|\u0002_daT\u001e*32Mg\u0018\u0013\u0012ۖz~dum\u00197n\u0018\u000fhh)~\u0000\u0000\u0000\u0000\u0000\u0000[o\u0015\u0007\u0011\u001c\u000e+Kdi\u001cro,\u0007\r&\u0001~%Kŉ?HR/}S\u00053WRR\u000ep8,\u000f\u0017Ϳ3&s|wz\u001bߚ^2<+Ӓ*:\"\u0018Et^E5f9ˆf\u000f\u001f<}d\u001c\r\u000eCYA\u0015\u0007\u0002\u0014SL%cM\u0006c$Ӹ[.A܄4SL\u0018\u001dȜZ_ŤJ\u0003Y\u0015.:\u0018B8n\r\u0002gP2\u000bd\u0002\u0011Xcjo8 \u000bʼN\u000e\u0011T(8\u001bV\u0011\\e,@3>\u0014Y 7|*\bO-k\n\u0016\u001b;)V!W⦺[\u0005\u001flԵA.\u00025CL-J1\u000eȚHNB\u0007;\u0011E].#.QypATq\u0012y0\u000e\f e<=赇A\u0019\u0005u?]}=jtzwj\u0017䬉t5Kѿk\u0012s9;k\u001b>wUN+vV1Ĭ`\u000b\u0011]\nm\u0015\u0016)sc/mK\b\u000f\u000e0܄B¶:e]f-:\u0005'rRUk[IL\u0007&㴆x9u\b+jv)|\u0001\u0018\u0000\u0002!Â\u001cg91\rHj\"\u0016oTT-F\u001cm\t\u0018WX䒟e\u0011s^1\u0014e!ɑ]͍\u0013i\u0006t+w6,\u000bS;{'ۉbh\u0000lq\u0006\u001e+\u0017 is]Myp=glk[-\u001ek[57GnQq\u0012\u001e8LZ2l[l\u001btl{˝qq2[\u0013Q\u00065ѿk\u0012s9;k\u001b>wU>TCI\" RgU\u0013l'zƯA\u001eM?6G| yKe6\u0019ty{\u000bZVչ$I7gN\u0014.S͙<[1%\u0015\u0006\u0005\u0000Kq$̪!BRHZ\r^5\u0018Ɲx0\bT{[0jt.G\"uʪ6RD\u00153\th\u0017Nklk.'k\u0014P\f-T%f'C|\u0002\rqy3W=g5i7UT\u00177Mƶu[\u0016\u00116\"Úw\u00001+mۤm'\u0012B-&eL\u0019ٶ%\bd\u001bl8_-ҋYrs]\u001fe$禷s|w6}No[ӫm+v.\u000b\u0011\u0014ѥ`\r\u0007ۮjʯm>-\u0010\u0002?\u000fJڼU-Q\u0001lK\u001a]ֹ-'ryrs\u0015U!ڹ\u00064mF+P:\u0017[EUm\u0019&Bm-\u0017\u000bכɳLI\u0002L#\u0017GX\u0016n\fKԮ\u0004/΀;m'@~F}Rk\u0016WBmt`xN,\f\u0004Of\u001e(sNe[\r[Y%Y&T\u001dGզ4Ok*V)S\\q\u0019#\u001dk^-Nm\u0017Ѧzmo7띏'[?\u001c\u0017W\u0012l{]/<}/65}Ʒm|kzӊAH\u0014e\ra\rvD匯f\u0001\u0012oy @~\u0000wmK꼗@Nqgͦ-.\u0006ئ\u0014.텑åj9-o\u000b^A\f\rF\u0014)$c\u0013ȍ\u001bYؕFv\u001f\r;]\u0018Jض\\\u0011`\u001b\u001a*\u0018\u0002P*\u0012nEy\bgX.x׳\u00190Y,r5_;u˔v\u001dJٔ\u0019J\\Vխ:7zHSe\t6\tж\u001eې/\u0003\u001d omfGqd{<&/,<\u0017Mnz\u001bߚ>wgm[65*|OE\nۋAp\u001b~9V_-\u0017\t?i\blm#>\nun)d)\u001c\u000b\u0005YZ\f\f\u0014d\u00017\tf)\u00131ʭ\u0014;\u0014@׸\u0006[{W[GR.LSAt\u0019K\"T;M\u00049\u0011\u000eukZ\u0000\u001d\u0017\u0004^boE\fv)s\u0011\u0005xE\u0001*g5Cj\u000bֹ86\u0011!=j<k̅mkloI#Y\u0003^EQeX\"k\u0015\fv\u0012\u000f4e$PM\u0014l\u000f~mJۆm\u0006]~;ד_~<ٺ=Η|\u0016,YγGIMo[m|\u001cߝƷW9-%;-\u0019C!\u0002sQ\u0001o#ѱ\u0017]rk[LR%ޤ`5fyG\u0006QCVjmSTdHQ5I3t\u00149\u001cRm\u0007cmGl0\u000b@C9ujH릱Zp\u0000jɺgۙ`2ֶ\u0005ҚBpѹh[(&YJ\u0004&|(Bbpun<osezFxv&^\u000e\u0001%k0ʳ$gv\u0012.Q7kEj-I\n@^WÖTl\u000b\u0005\u0012`=ml\u001f\r,l\u0013kAx_^ݾ޽9\u0019\u001emϦ\tr.\u0017޶SMo[m|\u001cߝƷWy7\nލB\u0018\u001b\u0001r2\u0000WyIέ؅.Wm[S$,c\u0015M`j\\b)\u0015Yk\u0013\u000euAź\"{\u001e\r[YT\u00196\u0018}1$ϊ%+l<Lsǰ4&KZjВ]dN;Aۢ^\"8d7\u000e!\u0000vx[Mj\u0002[\u0014\u0019֎1nr\u0018\u000f`]:\u0000=5vG@ȇi<UFU`\u000bJGҰ̭;piEbJG6ڳnjk`,mh۲\rk7Oev\u0001\u001f\t w9nz\u001bߚ>wgm[65^l}1x{8x{0ap\u0001\u0003\b\u001b\feƶ\u0003Ƕ\u0014m[\u001c\u001e\u001flE\u000fS\u00135{\rl\u000el3]\u0017zm\u001b\u0000\u0012\u001d[.$\u0014Ird(%l.Y\u001fZcs\u0013;v.K&\u0016諴ҧ\u0003\\fC.&\u0001\u00189\u001cR\u0006\u000e\u0005/\u000fg\u001aE15F2i\t\fB\u0004X)\\$g,\f\u0006<K\u0016=2rl\u0016r01E?\u0007\u000bv2\u0003\u0019Kv\u001bl\u001a5[un,!]P.6Qڝ.tf=wZh\u0003B\u0016;!b\u0016⑨[06Ğ\u0002m+\u0005+%gSP6Em+j~$\u001fѤ*eAI\u0002Ǵ%WV\\b_fiwv~\u00170%/\u001c\u0004kHMmcGSl\u001c;ƎVy5lzMy\u0003\u00190q\u001dw~?t>L:enm)6(\u0014@E_p\u0016\b[R˪͹\u0013\u001f\\n`fd^\u0002/m\u0001\u0004[jmY\u0005\u0018yŰdcVoֹ,=\u001bc^\u0015f\u000e#e[6<\u000e?\nQ(n\u0001j+5+UJVYU\u001f \u000e`+N\u001a\u0007\u0016Vz h\u0017`+ykP]\u0007yKE\n\u0019)\\\f]\u0013o\u000bЏT4RmdjVa\u0005ׄm9G\u0014XWta[C\u001amgd[(J5l\u000bEaێi?xa\u0000ؾK)>ڿ+\u0012sS9v:+\u001b;:NU\u0006\u00179ŰqqV%w\bmk\u0019ߌen$nl\"Yϕ1x;\u0007N^m[jZ\nFϘ(ޚ5I\u0003D'\u0001DV^\u0001}\\Bn_jϸO-#W0oo\"\u0017Pm\bQٹh[)\u0004,{Ъ`\"\u001b\u000f4XE$沃\u0005\u0007H6a\"!ę\u0000uSxkD^kb=\u000fmI\u001a\u0004X\\2,v¶ڳ˪&rٳʶ\u0004XSg\fv趦m3E\u0016횶\u000f\u0007чp&I]OoεW$禶stV6vuNmcGS<<olo>x|ӝ頁m\u000f\u0017ebLVx˶\re\u00023Q.s5oEd*\\s\u0015,c\u000f\u0018odUrJq;61ҳh[k.vFkk*\u0002{MV\n\u0015r\u001fm\u001e iK\r8\u001c\u0019\u0010\nh\r\u0002-6\rJ\u0012XV-|xVT[Z#AA\u0016KEҎ\\\\(ZaY.p\u0017a)&cM`-63keL\u0016&+?^m\b=eۄ\f[l7O?\u001e\u0006o\u0012jܾ\u0018mt^MگƭkHMmcGSl\u001c;ƎVy\u0014?q\u001fןן7 '\u001b'1`ۛm\u0006o\u0013ў8[\u0013w\u000b\u000f\u001c[m,\u0005Bj᪐J\u0002\u0019n\u0016y\u0006Zi\u000b\b\u001e+\u0000A)H@\f\u0005d6\u0016X(P܉Y\\<\u0000TR~-Haix7,`\u000bU=&V);!Xc6HUy80$5\n[v\nBj7󂺾:&Yi\u0016D,pFV\u00153\u0002W\f\u001c^!\u0012&m\u0016m\u001bK\u001d/R\\|\u000fL\u0016j\u0017ڶ=i=5~m;ڶ?3\u001f_Ÿs1::zk^ڿ+\u0012sS9v:+\u001b;:NU\u001e\u001eGcNy\u0012|\u0012o<7A\u001b\u0015δmΨۜtSw\u000bamӶuM\u001a\u0015Q\"J-\f+$c\u0015l5RT_[DnD\u001dsɶN\u0012t\u0007FJEp\"UUeۢd\fV\u0015z-˭4\b$ِl\u001b%\u001e\fz\u000bi\u00007jS\nMYq)*k5\f\u000e&ceaCX%F¬Aj^\u001a8\u0013bN(cuw`v\u0001Xc*̺\u0018!\u0016faD+ٶ[ö\u000b-öd>\u001a~OSl>\u001bn\r8ƵW$禶stV6vuNmcGS=ݸ\u001f=D7\u001eDk\u0011\u00117Dfa[i:M\u001dD߁J\u0001 \u0002bӶE\u0012\u000b8\u0016^n[CXyT6[jd[\u0016n\u0016b!o\u000bPvF\n\u0014.mPʹD4.V }c+nE\u0010mxl\u0003 T-<\u0004U]\u0007M-#4R\u001aW)P\u001f=\u001bi\nӪ,\u001dӭFƤ8I5}(`\u0016=[nHgȹE\u0000\u00075\\8\f9\u0001\u0013;q\u000bؚ]T\u0016a_\u00003R\u000e{WVv\u0002j\u0004l\tm96\u0011]iۋ?=tON[\u0013kWMmcGSl\u001c;ƎV\u0017ܸ[O\u0010o\u001fF\u000f\\\u0016.hWv܈6͵Q\u0001\u001dw\t\u0016\b@\t6,`V\n\u0017+\u0012rEȵ,̨aR03i`Hbo\u00149\tD{.\u0016ҰBV6n\u0005ByV\u0002;y?P\u0019Ʒ\u0007=f DzÝk\u0000̔\u0013c\r.i|QzR+Mxܰm%\u0012S&=>@Ur5I$=[\u0011.1+l\"*\"\u0001{]3^,dǛ%uBJA!ZKum֜`[mEί{:<\u001f6v!n>ݼ/6v4uƎαөmhj?\u0007po\u000bo\u0000r\u001fp5ȣp\u0003ڣkhۍ$^;\u0011m-\u001fҿm\u0003[x\u0015\u0005z\u0000[\u0016]2/r5#RΣR%os%\\V؊\\movLZJjؒjZj\u001b|\fѰG;=IZXaK+\bm}ʒUoɛƁJ]lɹqqU\u0015J.H2R%}Uk\u0017\u0005C\u0015\u001bzҶ%ϖU[*TRf\u0005l%r+fϙ,l_l7\u0003Kk_꽻nw۱A \u0006%Ndc;82\u0001\u0011$\r\n.xx\u0002^\u0001ށ\u001bZ:Nf.p>_G_}uWV\u001d\u0004[,Y5ƷY(9؊\u001di\rn[\u0018?`yn[EmWW+O۫OmW?7\u001cM#/stJ\u001b9R\"q.b}|\rkڛ5Uuj:u\u0014x\u0004W}5R`\b\u0016ǺLp@VtVY\f[Vs\"\u0011\u000b~9\u0013D,X\u001d(gÄː!%\u0015ꘞ}\\d[ϚM[\u0014\\\t-gΰ\u0003\u0013>/,EDŌeAgj\u0017{6))F{W\u00046\teo\u0000\u001abiܘ\u00186\fY*5-m\u001e6\u000b\u0005bmތ7[\u0018dvww7\u0006(\f_ȟF̑Yї9r:\u001cMr['c\u0018:\"p^\u0004iY\u001a/#\u0016`[[+F\u0005\u0000\u001b\u000bl;V\u0014J+6i$k[1\u0015&6\u0011#ыȅOCR%.6\u0010m;Md\u0000cČ\u0016Ne\u000e\u0005NphUyJT\u0004\u001b\u00199ERƙCCp(m+iH\\_8U-m:\u0001OèD}b[!u@T\u0005\u0019òm@ZVs^f46>\u000e\u001d\rZb6wV-6awvP\u001f{t~\u0017\fEw/6Q_ȟF̑Yї9r:\u001cMrg@\u000ea<웟YƂpdJ^;ZF%DU\"\u000b%ZcEI\u001coDDh!\b\u0002\tWMDrҊ\u0015BN%9m\u000b\u0017m\nvg&¬\r\\\u0005.u.f\u0016aFN\u0001(FjCk\u0003\u0017\u0007={YsLZ\u001cTO=+Z#S#[\u0017wbga#\u0007\u0005!u\u0005ben-\u0013\u0012\u000b2\u0016\u001fjZ:%\"lqj\rM\u001c@%5\u0016VNڌmXkpfn`Znۑ\u0018*A\n!?Itwz4\u001fOBqN\u00025\u001f%)mh\u001c9\u001c}#Sє*<\u0003r3o{ƞg~j4Ɲq\u0017ҵv;mcwm\u001azg\rmX1*DܶR@^PBSp2C]\n\b\f6mj>V͉mAv\u0014}\u000b\u000eB1a,\u0005\"&$hE۸yIvzMT0K\u000bzhM=23EkoN+l 8\u00151ҏ=iB'l\b*\u001d=7\tNq\u0013m eu4ujYDێF5\bE1\u0006/V#Xt\u000fmY\u001bTE=twױ\u000e\u0006k4}wa\u0007I\"nJ\u001b92GNgi#G_6r4^ڷ](z\u001d=wg}\u0017x{s\u000ez.yiO0B5mGJ=2m#b4#7K@\u0017\u0000IHXUZmԼ\u000eԅĬCmXCt݌a4e%u\u0004b\n\u001b8uyS:u\u0013\u0018KTVT$`[8\u000e 1pՌh\u000f\f\"Hǋg\u00174\tT\u0005j\u0001fik\u001f*\n?%-\u000fĬ3V,=\u001b\b\u001d\b@UcM\u000b|8WRے[1k[ɛcn\u0016\u000emkM\byLqOouл3a\u001dxw+$禴)sm:A߻\u0007\u0019\u0006~[G\u0003\u001c;%/\u0010n[5C>\u001a\u0011\u0012(X\u00056\u0019opJyK$¥Up\n\u0013S9oPk\u0005v\u0015lfhrԈsjzE\u001dGKm6\u001b\"mxNF\b{&\u0001/mF4\u0002?4ŏ\u0018Smĳ:N`\u000bnm\"\\\u0015\"Չg\u0005\u0004i1fzy^/V\u0013\u0016+4NX\bo`lkm5~F\u0000^1Rk#|Pض\u0000h\u0005\u0018!yFQo9A(\u001d\u0006~~Ѕð{\u000f\f%]2GN)U\u001eQ4|\u0012$_8*\u0014OѳY2\u0004>_h[bTV\u001fYkĶ\fmk\u0011v.\u0012nj[\u0014[Á\u000b: \u0016h\u0005G_SjB#\u0001b+΅>$4\u0015\bضl;Y3I1iqt$\\[ԥNv1e/\u0007/'\u0001_cmm\u0019lݢEI\u0005ag\u0011ksm=oX;GZNA\nXjU\u0002'}DZ\n[.Vq'}\u001a\u001d\u00169W,Z@Xs\u0013\u0015GO;z\u0013ۖr5aMh_V-܍\thm:\tvl\u001b[\u0011ߐjd\u0007\u0004l\u0016>\u0005!<>SF\u0004S\u0011\u001cN+$禴)st6reNi#GSYb3:ٌ^l[gfv\u0015^Ob<>ܙnUW~]H[ӪE\u0002m}\u001ej)oqL(os\u0016PEAь1W\u0014j\\-Z|C̋l\u001b`۶R\u001b`lmVM@kW\u0014I\"\u0004Xvb\u00132$\u0014JC3w)؆4b\u0010k{zڵDT\fzΛR\u000f\u0017ŤGZ#bb\u001agH%E!\u001dkuNZH\u001e\u0015Cr\u0013\u0012r=ۙÃ3=ߞ~ͳݍ\u0004+$禴)st6reNi#GSLζ*^ϯO\u001f'[旻Ӌݍv6gft;A^!`[kcuc\u0002MxoQ۶\u0000ۆma\byp\u0015\u0011ez88\u0002°^H\u0012%R\u000b%ڮ\"vkd)mŖ^\u001e\u0014h\"\u0000A\u0014-R_}CF@?Aϙ3;KR\u001a\u0002\u001c%\u0003\u0017\rm?Ep5\u0013W\u00166/M7+y\n6xV\"f\u001521q\u0015ƚdlq2նm{u;t9ouB2+\u001a\u0011-]M/\u0016&vk\u001a^lXeŋW\b\tkjеō\u0015k.˟/nQV}\u0017\u000efz{\u0016q*$nLչlm\u0015h\"WV|!-*t:~~\u0012WѫWz_nڀ#\u0005\u000fDd65YF>ltk2\u0015r|{ѽw[GWz?aY7x\u000bm{_m܅jB[(\u0000dV%\u001fZ02O܊DnZNpj\u001a\u0012rk)/\u0019jUv\u0014R\u0011vN+Tpk\r܊\u001eeը\f䪍y`sgmqϹXQ\u0006h{P_CyWf\u0001E%F{\u0004*ɭ\u001aZO\u0015{-\u0019R-1!uqP\u0016\u0014\fZt\u0015[zLD*K\u001d6uM¶\u0010xt휘سk\u0001\u0014۶[\u0007vjUrۆ<t4 G\\齾g=啗\u001bݷ\u0007o\u001f蟛F&\u0019g9;nMr\u000bu}\u0018\u000f{sZp\u0016*wg^ZғNzrr=b\u000eS,r¶\\\u0000Mx_hJܴp\u0015\"o\u00019ː*6\r\\Bm!u\u0017q\n;9f;dUόhZcTpj\b9ibUv5suzyݘwQ8\u001b\u0010,S2/qʂS\u0014\u0003cN&SJ\u0003>\u0012`AsP\u0017߇g\u0007\u0001{Z\u0004iyVsՈ\u0014ժ 5\u0006x%Yi*bX\u0019U5\u0005i6mt4/\"`,յa\u000bG,q8Xm\u001ft]\u000fDd65YF>ltk2`\u00010l>\f\u0016\u001fAG~\u0011+;MXk\u001f\u0005\r\u0010ӨEC})ضmKQ\u001b\r\"`k\u000b/\\ǐ*s..6\u0017.`Dm \u0001\u0018m\u0018:놲VwQ`[\u0011¥E+\u001ey&\u0016\u000b+jQB\b\"\u001a[̬ƀe2RKP/f)TSX:),eO>Z\nZH|`\u000e\u001d?D-4JI\u0017ҶYI}7\u0001\u0012G`K0B\u001eisԄ\u0004v+7\u000e\u0006{A\u000fDd65YF>ltk2̃NkvUU'f\f5ۚ^,Vwڍ!-\u0013oAުuNFn!.q\u0012$`(6\u0015DmJVj,\u00196kw°Jvq]8WSzło ba\u0015O%F\u0002>\u000bF\u0019܀h4D*BٰX\u0003mZ\tњ\t\f\u0005c0k=\u00103\u0001f(\u0016M\u001dTkpҚIR(_H`ֈ\u0010\u0005j̢ ]\u001dT-9}&/o,A帽T}{j}ݞ;?\"?7nM3ѭrtw2\u001bݚLe0UPR\u001cU,fNqB4q4q϶?|.ly;_\bә4oSexą\u0014\u00022$(Y%\u000e`ĈS߮@\n\u00183Ku/BX<يkҮK#-_Jį❑'ɧ\u0018Pc@ڶv`;<\nߡ:\u000e2BQ c\u001a.9pL\\\u000f>'䷄FP~\u0007\u001f2Q|I+\u0018w\u000f\u001ce\r8}qZf1-18E\u0006\nqjl\n\u0016B\u0001c}@ٖy`M=\u001f.g~G$&ѭrtwF6YNf[̏\f-moX\u0018U\u0018|hLqb\u001dS\u001a]]\u001c\u0007\u0017gI¶yqq\"&O%J4$\u0006ZN.\\\u0018+\tz `6BZ1\fRc\u001dψ\u0010Yǭ\u0007\u0015+VŗDA\"g\bZv-\u0012 ]J|\u001e9!Pa[\tB\u001865\nƊOS#T\n۪\u00051dwiQ})Gg[m\u00193N(JOmR\u001a\u0014\u0010\u0010\u001eZ\"W\nmd\u0016&f\u000b3E1\u001dA:eL~\u0007Dn2\u001bݚ,Gwgd[d65\u0018\u0014\u001f rn>˷P\u0004ބcm\u0017As\u0005,N\u0011n\\k\u0003ȅ)ȅua[\u000e[\f(Qڇ6m(\fp\u0006y6V\u0019[a\\Ft\u0018x\u0000@2,w6)\\)Yq/N\fwж~Z\u001c.KYҍG&7\u001dv2%\u001e\u001b\u00120J5\u0017\u0004(t8rɔ=j\u0011d[AݽyK`֘ĘĘ/sϘӯ~۬}^e\u001f\u0011ltk\u001cݝn}d*7ݘ\u001e17\u0005瀺\u000f\u000bW\u00179um\u0002l\u001c\u0018\to\u001b<6m\u0000M{\u0002r\u001cqq\"r\u0013\u000eCA\t,\u0014n<M⤜{mEZ\u001aUvk;c\u0000xL5\u0003(ܶX;hؐG\bW\"פ,\u001dc[_g\u0002e\u0018!Y|~N\u0013AjbW\u001dG\u0016>i\u0014gmia\u0000\u0005;ųj\u0017\u0002vG?1oW\u0002Fl^yn\tP8>yt\u0007Dn2\u001bݚ,Gwgd[d65g\u0000\u0000\u0000\u0000\u0000\u0000[\u001b\u0019߽3ȺΜV\u0004{Wj/]+itvM6i)\u000e\u0016`\bm!\u0018S\bMS)-yH\u0014BЇ)\u000f\u0005\u0015JsfF#i:{Z\u001dOG0{G.\u0015UhHUc!T\u000e\u001d\u0012'jDfԉ܀\r\u0011LF\u0019s7\u0013Z29C驼9\u0016d>A\nS\r6֐If|\u0018)c1m.MYP\u0019\u000b\u0002\u000b1gy@\u0010)\u0006YZ=6:#o\u001b9o^ȹM\u00022O\u0011k5\u000f\fv;>ن_ɌF;2I;ߵ#ȯ}㹹޼ױ#m;1#mKa\u0017?o\u0000/_\u0003\n*C\u0006\"F3b:\"F\u0015*TQ*90`V*]\u000ez\u0004[%WG%\u0005=&sDE\u001aZ\fh\"\u0010\u0000Y\u0014\u0006\u0017hpy3$\u000b#\u001fF\u0011\u001f[G\u0005E5\u0017PoCO\u0016\u000b$gYl\r\f O\u0005s(\u001e}+w=UC7\f\u001f7|`\u0019-\fhTV׾?^|W^ͤ:rkbBkxpoz+\u0017ᝯ~\\0\r39?s7 \u001e7\"F3b:c\u0018=ψp\u0018\rWQfe\u0014\u0006\u0002\u001e/kh:Q\u0001%RU\"\u0010\\\t<\u0007\u0017Yf2\u000ea֓~H \f2`7YC=q²v$\u000b`.\u0001f8\u00032\u000b',\u0016\u0002\nҊVF{Z@K2s\u0019is1ym}$Y\u000bV\u001f\u0001c}d'<UfM\u0007&\u001fW\f>$onk}s6_<oZ\n,j\u0001\u001a\u001b\nw<\u001c2޺ԍP]\u000f5cxp\u0018\rψ-b<#-b4\\QLIj)I+ڒsQo%[G\nԈo\u001f>\f;\u001auv}\f7\u000b%Fu[\u0018!鹭v\u0015l\u0014EZ\u00045\u0017֜筀Qm\fI\u001d\r)\u000b\u00061J;\u000e}q\nnonPTPV0V&Ȭ\u0019\u001aAn;[%!B\u000e\ro1A<nEgt\u00161z\u0011\u00161\u001aXIJ@V\u0016J2mY(']\u0005\u0005ϭ04Щz;\u000f\\\\Vs}=\b5@?,= \u0012u\u0016.L׎kmY8@C-di\u0005E\u001f\r\u000eCg\u0003}\u001f\u0016,\u001d\\u>m\u0016|\u001d 0G{0߸e\n0Wx|+o|B\u000e\u001cjk_8]dR,C~\tq-b4<#3\u000epJbG2@\nml%n\t(N0uR:jy\n\u0004\u0007<m0zJd\n@x:\u000b䫅;49{Qeo:E8\ncDZo1A<nEgt\u00161z\u0011\u00161\u001aXNL ɞ۲\u000e=.\u0018tBEJ\u001eNSڮ\u000f\u001f~eD w+TfkP5\fw]x/kw_}}k!`%U*jY<{!iΟZ2%ᶟ\u0017q-b4<#3\u000epŕ\u0011Ʋ\u0017z$\u001c?\u0012@\u0012X\u00075\\_xݜ«N8*֊:q淚O>xp\"\u0010?\u000f\u001e|jF\u001c\"W(&W4\b֬fa\u000e[*P \u0014I\u0004Bg\u0004eUZI)ygVRR8ʇ~\tq-b4<#3\u000epo+I*`\tđf\u0016-&61Q\u0016]IU*A**9\u001e@A}\u0001irP4\u000eY\u000bմPj\f=TC\rZ\u0004C3@C\u000f7P\b0V\u0013i>;lPVIs'tڲ\u0015\f6m][a~&[Rځoa\u001e:m\u000bxBz~+0z7\u0007\tJ\fy5ԲB-Z1{tФ-h\u00180\u0002H\u000b*N6ĝ \u000b\r\u0019dozl\u001b޲;}\u0019\u001a\b]b\f\u001fTm\u001bY'r\u001d7諳\u0010\u001c6eita9{mHWlLݶR\"2p\"\r\\k'\u000b\u0010\n:/jo1%*@-jp\u000b\u00161\u001a\u0011\u0019[yFL[hL\u0016.+w*jv\u0012A3*p(G\rR\u0007%ѡ*P\u001b2\u0003\u001dJ\u0005ji(\u001dS\u001a\u0011̮y#ڵ\u001d\u0015fGmZغ\u001d[nLR$%u+M\u00030\u0015ĶiٞmJٚNvhݥ8CθaX|\u0018]wL{-\u0013Xv_q+ne\u001a,\u001aߢ^i^9^\u0003\u0019\u0010~Z|}};g&Nx\fv[7v_p׳˦'??yWoм1`f7ӽ`ؤi,uV#\u0006k\u0016`GV\u0003*\ricY;\tlE;6חrs!tH׎xRcG`sMLܥ]>4|oRPG%cu#\u0002ᮩ\u0010e}1W3t\u0012cxp\u0018\rψ-b<#-b4\\\u0001oݎ\u000e(\u000e\u0004^=Xe#V!+UT\r+5\u001d\u001b[H\u0016}g\u001d?\bGfܚƮ($4\b]n\u0012B\u0012\u001d;\u00193\u001eq⚚q6}4 @Km;S<!<ks\u0004r;WUժu>*Xi\u0005y!Q\"K\u0002ʜW礊 hS\u0005XM\u001cl\u00108ߪM2QU'\u001cc'\u0014NdVQ̤\f&\r\u0015ʆ\u0013K4\ry$bP\u0017F܈Kܤ\u000foq`\u001a\u0011Wމ\u001f)aJ3_Ga\u0012\"1IG:b\u001b4\u0019Ɗ\u0012w\f֘zQ`yQLU6\f\"1\u00065_Q\u0007\u001cOc\u001b6Kl~sի(݊2tP/GdD\u001dx\u000ev/%l=+e\u0016\u001fq)3|x]+mgŽv1\u0017'ꯋׅ7\u0012ҟĒ&ɤӹO2t\u0012K:Dw$Y\u0003ΰ\u00070}}\u0007^t67k\u001d!ɃS\u00012\u0018\u000e\r\u000e\"va{\"Vs\u0003DתdX%Ygx\u0017\u0010`5ʰ\u00144\u0010f)r\"QLd\fHԇ\u00144\u0019gUh\r= 46\u0006\u0019[\u0017\u001e6Q1B[7ySGeaTi\u0007E5hjMa\"\u001f4o2\u0010\u0001eːU,m\u001b/Q_\\ӑ\u00172>,Q6[(.;(ajF\u000fG#⢊'F\u000fψ>A\\秭΢>e?\u0010|\u001e\u0019R\u001b\u0003L\f\u0015s\u0017\u0003&vT^\u0011Cɗ\rkN\u0015bXU.*\n{/O\u001eAU\u0001^<\u001dT\u0014>Ii*r峯lΙ*\u0003SSL㴔=\u00039{͋\u0007^~]A\u000f\u0012ҟĒ&ɤӹO2t\u0012K:Du\u000f<KDc\u000fڥ̛R\u001dq\u0012q\"3,YY\u0004,y(A\u0016R\u0006N3lMA\u0018\u001b1)H#\u0013\u0001\u0016!2\u000f5E\u0001X!K|j\bAS\u0004R\fK[5t-#@>#\"R\\m\u0011ڤj,b^V\u001cCXps\u00048K[\u00108En6\u0017J1Vx\u0019)/\u0017Ø\tc=d\\}QhS2^͕\u0017ħӻ}\u0017\u0007-a\u001a\u0011&hj39\u001b&\u0002\u001e\u0013\u0006mS[>a3S\u001a.\u001bVoTL$|fj>E]\u001d$\u0012M:o\u001eHQcS}\u00059JO\u001aW?\u00175增\u001b\u0010ثJ,_Wz\f\u0019y\u0015du\u0015(gO񂔠ٮS??@\"T\u0012ҟĒ&ɤӹO2t\u0012K:D>\"\u001er]\u000fV4g+j\u0014\n=ک\u0004b,kWrB{\u0011zu_W\u0007DzU/LL2#\u000bC\",\u0002lIC\"6\f\rMcf\u0006F>%\u0002f\u001e#t<\u0005\u0001/\u00182\u000ek\"¬\\(1V\u0011kgWkRo\u001dr/]x\u0015EӸ-\u001dVW.\tGCd~g8;\t\u0017\u0007\u001egGT\u0016M\u0016F\u000bGG\u0005t/\bm!\u001e:zfP}\u001e'^l\u0016[\u000f\u001a\f\u001b\t\u0016E{Y2\b<&ePfMܘؤ\u000b|pdO}?Gȼam{\rLuvuM킪\u001f\u0015[ыP\u000e𴤜[\u0012ҟĒ&ɤӹO2t\u0012K:DqZΞ3OӪH\u001d\u0019\"8b \fX@,\u0000P042umT\u0000qA#44J6\"6\u0018;\u0018+\f\\fX\u0010i\u001eP\u000euHo~+F,ގ_YyWX_.%y+Fš\u001bGB~k<\ncP'\fW<R\f6Ft\u0014p}[\u0005<\\\u001eȬ+\n˷]x\u001bs+]ǹZޞ.꟠\u000bV\u0001;tRG_\\\u0015+_IGm\u0002c d\"c\bOKN\u000bFxL?I6^R\u00123\u0006\b\u0003:҂Vyu̽f#\ruBMl\u0011Ƨ\rI\u001a>\u001d\u001e9O\\~u7QC\u001d\u0003\u000bw5ml\u0001^:prW\u0014ЫЛ2:+ӫd?KHn\u0012K:$N֒>ɤI,h\u0012LǛ\f\u001fU[Eb%Y5\n:\u0019(\u0019Sו\u0001Ԥ\u0018;0s\u0017\u0019\u0001\u0000b,YKXda2\u0007!hj+f-ܺ\u0014D\\s\u0005RI\u000b\u001b6V\u0001\\\n\u001b \u0003Z)!|\u0000ieqsXn\u0015Dut8\u0002\u0013x*:ڣ]{C\u0006\u001fǇPٿeA\u0017w\"͠\u0013\u0014\u000feQ0]ܙ-\u0016\u0000~*l/~\u0014=.K7\u001b\u00107COֳi#^t\u000b+R<\"\u0005-\u0005ԳK\u001aAE+\\/]\u0016_x4w_--a̝%\u001f\u0006XJp\r{|S\u000f\u001aX|\u0007&*/涱+ne'%\u0002H\u0012g\u0010)v{\u0013wUVfQ\u0004GMdIؕM\u0016r/0Sw\u0003i\u0002%5R\bՓj3\u0011꿬6\u0012x\\ё:\u0017FJ'Hr\u0016c\u0011\u00078$\u0017^ضe-G;?6Ax\u0013ڿUύo\tFg<Z`:%\u0018\u0017,n\u00127FM8,+\bϖ\u001d{lv\u0017sXQ\u0007k!\u00014 RX\rf\\jCX\u001e%Ç$\u001aa\u000e\u0015x\u0007;\u000bvR&vJNI]f\u0011K6f\u001e]Vx\u00045f)j\u000faN\u001b47\u000e\u000fsˁ\u0006:yd\r\u0015a^&\u0005:hg\u001c\u001c(Cgr}k\u001d\n^P:\u001chW\u001c\u0012_\u000e']\u0002F4KΓ`\u001avgaT0<U}\b_*\u000fϟ\\k\u00116j\\h\u000f|؄[St?0XsT{t5\u0019Er we]\nj\u0007N7vE΢v3\n=\u0003Q۔\u0017\figVF\u001c\u0016ȭL\u0018\u001c[]/7?8xUi匣T}~\n#\u001c\u0012aJj2sU]\u001e$x\b{|/FK\u000b~&\u0015]޲wvJ\\7הXύo\tFg<Z`:%\u0018،--ElZ1ms-\u0013[&٫\u001a[)\"\u0000v\u0010[\u0002i?\u001e'$l#!3R#.5r3\u0019n$è)&\u0019>N\u0001\u0005\\xA&\u0002:i˵ֺ\f<,\t[g10J~S6QNe4p\u001c\t\u0007d\u0019HESGG ,*5\u000bƤ\u000bOYј\u0015-\u00121\u0006gcJǐ)L攠)oQ.\u0013Nμ9]\u001c\u000bŵ\u000fK!&U)5gQ\u000bx\u0004Lf`&·\u001f=n>Hw\u0012g/\tXc\u001fk)c)#\tt\u001f\nt[\u0010pp!2ü1rtч1\u0002bF\u000f\u00064\u000bqR[thk y\u001aUBXR\u0007;z?\u000f-<\u0018\u00146׬2+\u0002ɪ[,\u0005tJgA۫j\u000bc\rȵqZ\u0006-')%XufJn$lCyW\u0017\u0001o.S/$\u0005M\u0019[mZ$\u0004n|K0\u001a?\u0013L\u0012\u0004-h|\u00028,_\u0012߭0<L\u0001ume/\u001e]\u000b\u001cS0:LV\b5\u0006!5\u0013R3)\u000b=J)\"\u001cbN\u0012\u0002Q:L\r\u001cV\u001d,u[\u001db(\u0014Uh\u000bڨM\u001a\u0019%\u000b\u0001BZЦ \u0014Ogb$\u0016\b,g$%cV\"</g\u0002j,\u0017y!W̋yX^B\nv#8P\"\u0014D..:\u0015⡉\u0003e$\u0007\f}Q-M*qdcrittO\u0012pOJ>ʷ\u001fe\u000fm\u001a~i)2+y\n\u0010(=~=g8P@Ә\u0016i\u0001՘\u00158\u0017ɢ9.\u0018\u0013gA՘qc#'Ƌ0\u0000\u001d;\b˙\u0002j*Mu`\u0006p^x\t>?l\u0003z\u0002վvmlZxفf\nܗVFigmT앓ݫf:tT2MǪ'zFkלRQXۍZЫ\u0014M\u0019;q+$\u0004n|K0\u001a?\u0013L\u0012\u0004-h|\u0005\u0004\u0016쭑R]\riu?\u001f\u000e^z\\jCob*,9!6%\u001d*G)\u0013Xl;v2\u001a~F\u0003',cnN\u001b \u001ae3`+2p!\n\u0010+\u0012\t\u0014LNpuN\u0014`O*1y\u0002+$\rC('^-U\u0012׬yżBEe՜_bf]WQ\t^-M-B[Tt\f\u0012\u00127cʗS\u0000\\GDs^E2u\u0005Kp&DG'Ky\u001c^.|Y,}\u0001\u0017ixNx,̤fŝse\u0005?62%.\u001aA,*\\\f?/E΋P7yZYI41ĒNS.a\u0018>)\u0019\"Ч\u001cy@uB\u0013~<&7F9\u0003\u0010\u001e!gp\u0002.C\u0018l]6\u001eE\u0017y9\\R׳]*y\u0002mV:| \u0019Fmp\u0013RÎSJ=\u0017=)m/[_GBƷ\u00043t\u001e-L0\u001d\u0012W@Z\u000f<{%GR%5\u0012\u0012\u0004\u0016&#rX(-¨Ǆ\fZi\t?\u000b{z\u0005\u0019\u0015z\u0006\u0001\u0000Ʌ\u0003G6`\u0013G\u00172[\u000b\u0019#RQS!S\\\u0001+\u0002\ts\u0012Y*̜\u0010FC <bj1뱛u\u001e\u0013`y~c\u000f\r@\u0017oֆw\u0016C~c*oX){o\t\u0013_-\u001dcyN?\u00128\u001a<\u001aM*GM\u0006q0\f\u0005.~q]a\u001b \u0005\u001a$\u001c-pYi>II\u0006hύc˖lKM\u0016wqH\u0016KݢNw\fm\th\u001f>|\"s\u001asj-Bi\u00035|UTa[4F\u001a+\n3В*b%\u0004J!\u001c*A\u0011XGУ\u0012:`MD\u0007a/X+\u000fd!jz1(酠\u0000dP\u0016\u0002ȓ009\n\u0018\u001ehΫ{ܒ\".\u0001~\u00042\u000f\u001e<g#3f{Ѳo16\u0002\u0019<b/}9\u0011p<rQ}w>p(dMfGlGn'?\u0004fb1Z3\u0018ݹ\u0018dL,Fk&i9\u0000s}^wOku\u0003\u00113l3Og%\u00000`^0Λw\u0016;\u000bZjYw\u0011\"C`\u0005XJТߺ\u0013\u0010])P\n hjmհ]\u0006Uګ\u0011zLC7Lɋ2J44\fJ,\u0018\u0002Y͈\fZ\u0014\u0012VLniJFaFi8i'tb\u0000&&kE21EtA1cw~\\?)wn@A/_5g\\{OQQao>Ν;ۅJ\u001ch\r?roӷ\\kNzsi7\u001dl}+VTDvTjŤ\u0016(QIS\u0014Ø܌~6pgmG#ԝvfm^Y+̗\bJ\u001f1'b)h\u001c`f\u0002\u0017A m~[\u00104O(0{B!+|CA:՜\u0014-zrxw\u0002h\u001d6\u00053NēY}즐xI9Z̮Y\u000f慟\u001e\u001f[s3\u0018dZO2Fw&\u00165\u0013źg}$lXlzf6>7tnF\\6O1\u0016a}\u001a\u0019vw\u0011\u0019֬}\u0001D\u0000Eb[\u0001\u00165(n R\"DJ\u0004meא\u001dq\u0005X(<)Zb*Nt@Lƥ^\u0019F\u000f\u0004+\u001dZG\t\u0018x@Ҕ(I\u001c%>\u0003RSJ?yqg\fR \u0018\b'/\u000eSNԌ$\u001ciWNTFTqK4A\u00060s\u001e.Fi \\\u0014\f]\u001a~ur\rS_;o*|p\np*-sW\u0005wt\u000f=w/=Z#ؠD2\u0005SVϹ_\u0006I=}\u0013ㄣt\u001c%ㄬ\u0015=橒1U:͏\u0006%jV%\u001fvTNT<hi\u001a\u0013\u000f\"&\u0001z\u0018\u001aQqԣR=*\"bU\u0015*fIDU^P\u0012\u0012&_a<\u0012f\u0018\u0016\u000eBփ0\nJAu?\u0007H_\u0004bZ\b\u001a/ߒ\u0005>KKq۲)6\u0019x\u001e=\r*8D\u001bs8\\3\u001b!>tO\u0007`L,Fk&\u0019;\u0016ѝhD1ox\u0010cO\u000f<g\u000b%\u0016\u000bKKZ5y-lg/\u0002?R\u0000_\fX\u0011c\u0003\u0001\u000bed,V\nE\u0000i0 \"6\u0011c#_\u0010jȤQJ=JC\u0016\u0012,~Rg\u0007L)$\fS(\rÖi\u0019e'iZa\t}v8_e\u0018̜fKeV\\\u00199_v-%Lƅ9SxV\u0019\u0019\u001fq.W}x'-I\\\rb\u0005+UB{9\rNWgK/rUSƁB7BMs\u0017`*\u001a#T6C9h}8\u001c}S}S~U~Mo #\u0004/o0_\u0019%\u001däst$\f,\u0013Z:N\u0012\n\u0001\u0013Wqe\u0010\u0007q \u0001C\u001e>UdX50\f`\u0010dNLĥ^B`َmR\u0015*iKah\"Rt\rU$\u0000aDGlՈ\nUV\u000b\u0003ʨeB\u0004\u000fB,\u0006\u0017rWYUK`kzzl/!Z >y⡄KQ3\u000f-XL2Fwn-F'\u0019;\u0013њ\u0002I\u0016#|{7˂0Dxa~+V\u0014B)\b\t\bZt\u0004\u0010Q\u000f\u000fv\u0004&*u\u00104\";\u0017A\fEĚ83Lʔ\u0012(R\nRҫr<т\u0015rq-;3\u000e\u001c\u001d,\u0003jn\u0018bz\u0005\u0004+n*u\u0005K\\d<~sFWܨ{ެ]\\N\u00065[MY\u001d[]eU2Z\u001d{{cv0>xAn\u000fg\u001fg_/+d4LCStti:zm\u001a\\jz+7S:-.\\a\f||Jsw\u0018\\WٞxcW+\u001el v򊩾cK\r|օnd\u001fiy}vAOӮ<:M9Oi\u0006\u001c4\t4\u0000\u000e\u001a\u0006\u001ci$I\u0007B$\u001d\u0014T@\u001f$\u000131(QL1ߋ]BF%NTDЊ[Q\u001d\u0015Q{3bkF\f[#beo{M=Lx!J\u0015$܀ _?6iZc\u00060\u0018_܌`|9sOt[Jִi\u0004\b\u0016\u00126@0\u0017c0\u0006c\rplAIvjMۤ]4u[56QnÞ=ƻ\u0003đ><X<|\u0005}&GףRu\u0002튼v68ekgd!}\u0007d-h\u0019v:\u0016v\f;\u001dMV\u00011C\u000fzA\u0010\u0014P$\u0007{;\u000f^\u0007J\u000b]BOi jJ\u0001\u0005\u0011\u0004\n\u000bc:јN\u0011LT&\u0013BP\u0014Z\u0000Z\u0016OQNE\u00052\u000bҙZA4kd*H2g̣\u0018%GTI`.Ȑ\u0011GETbc&f٢\t &Y\u0004J\u0013-T҈\u0005\u0000bLFETBŬ8\u0003g2%-\u0012M^d-@)0K6i>1=q|\nm9\ri\n<\u00065m\u0014tF1w.Ѳ\u001e8y.WF\u0002\u0007ǃ<s/yÈ\u0010\u000b, \u0002qndq\u0005b,\u0005\u0004=CD\b\u00007\f\u001db4Hx\u000e\u0005sGgs=܁+B'uQ+zDd\u0010\u0016GH?Rj!#4\u0019\u001131\u0016\u00125-p\u0003\\B\u001a5\u00162\f1&tO\u0004{f^\u0011\ft(]IBy>Z\u0003I\u0010N<o\u0012c/\u000e\u001a$\u001c&`ka$\u0001X*%\u001a1R\u0018\u001aX6ɴ^4L\u0006}zdhR/V\u0011âz~\nҊ\u001c\u0016!\u0004^g\u0015\u001e`D\u001fAiCy+\n*>*+R\u0000L\u0019RiE\rW\u0014t\n):\u0014_'?7Y\u000b;lξ\u001d}6N'kaGUhx}\u001a^)lBx3j\u0019oh?-\u001eS_'\u000b=Jţ/8VA\\ ыgj\u0001(P#\tAHf!n\u001aj\u001bPN\t\u0001&\u0000U4\u0017sbLJ\u0018$Ε\f\u0018z\u0011\u0001iŲUd\u0005X\u0013v@):+P:\u0010\u001dT\u0002N\u000ey)O:Ҥ2޹W\"C%]4NyE\\U`L\nAIkN:4\u001d\u00142NT:\u0010\u0019QKn2W+m;p9}W_@[$)\u0004g*/`\"r#\u001b\fDt\u0003p\u0017NGIT\u001eC\\ \u000fL.\u0012\u000b\u0017\b\u0011\u0013CF\u000e\u001f\u0015?LӀ?/eW\u001flX3(\u00076y\u0012\u00142M~F\u0001IP2\u0006i&KwJвV\nLXe4}P\u0012:\u0016\u0012\u0018-\u00162fh[`&X\u001e)h\u0004*\u0018Q\u0007\u0016l(]0\f!҅:|4\u0004j\u0006Z\t(,\\mY4Ԡsj\u0003\"AEL\u0005S5j\u000fbo\u0015BW<W\u0001{*<ڢkڢ\"8Dp\nL\r\u00064%~uK?\u0004&kaGͰٷfd-hhD˷\u0015\u001d/,\u001e!V\u0016t©*tYRxU'*\u0011֊\b\u0014QCu:\t\u0003dE$l\bd\n4f\"8֘I\b#\u00162\u000eK\"\u0015\u0002l/\u0000\n\bG8\u0016)Rv]fW;( \u0006U\u000ePUFם\rjӅpͦ\u001bnd\\-7bӉխF(a.m+{U\u0019n\u0015J\u001de*\u000e&c2l\u0014\u001b.9?1Bl:ޅ\u0003s~pe\u0018\u0007834\u001d\u001b\\c\u001c\u0013X̮pf\u00069)Yd\u0018\u001fX\u0006\ff`ǈi JLGL\u000f]\u001eɽɽ4{q79Vz^ՠnP!\u001aU7\u001aUMH\u0011Mfnff\u0011\rMkn^\u0013|z\u0005ո\rꏛ>iR oQhڭlsg萯2ةU\u0007rSvbHi\u001aX3+\u0000hZ3\\Dn]\u001eG\nKK,ҨHfް\u000bF\fA0X#\f\ngk35B^\u0000LW\u000b\u0004I]WԸ?O`n\u0016v4\f;}\u000b;lN&@\u000e\u0005\u001crgq\"Mn:\u0015\u000e\\(a%w;ny^_0\u00134[ըՠݨӨӤIinVg-_|ުh\u0017GJ|WGK}7f~\u0005~\u0013\u001f?Ug_\t_Q\rN\u001a~;\u001e6?8mó7g\u001e\u001e\u001f\u001ew؞?t<\u0000؟_p\u0000\\/]HYwކ=O{\u0001\rP>~[Mnףn7mn\u0017wo:\u001d\u000f;\u000fc:\u000f:\u000fp|f\u000f@f9LY˽3O;C˷t\u001f}vQqX7o\u001d-=ZqkvfYѤhTϞ\u001b\u0018͹ñW\u0007!\u001fwh\n\fNq@\u001b99HoqVn\u001c\u001bZ=\u0018Lq\u0010I7\u0019#\u00069B3D\n=\u0014L\u0012K-bniSSi\u001a555ۇ霄Ꙛ\u0011\u0010%a\u000f[XB\u0012B@B6;(( kWeQ@\u0001\u0001i\u0014\u0017d\u0011UZ\u0019\\Qyޠ]\u000f:Uꪻ\t\u0003SN]XQ\u001dʂj\u0006+ebgӱt4\u0014J:\u001cġCʡsv\n]~Tw\u0006ĖCR\u001a0(\r%\u0011)*Ð2:RCrt\u001cyjW4QJ\u0006Vb˛Ȣ/м/Т߬G@KvqMs(׽\u0001r\u0007|\u000be\u0017Mt\rm&&(P\u0002W=Mx\\uG걫\u001d&GG]WX;[Xha\u0000X\b\u001dMƗ\u0000\u0017\u0006\u001bꝍjjj*GJGr\u00072{CAR\u001b\u0012m6ۊ_\tύ֢[6Wnڌn;Zn5ZE7(\t(@\u0017o;&LnI\u001fϤK\u001aCq0hsϣ\f\u000e\u0002|Q\u0001uܟ:g6ov+|Bhq'꾘6)OI\u0012ƴ1+?T<R[\b}~\u0007\u001dr\\\fe<|\u0019\\\nwY\u000ewy\u0015:\u0005JJ4iΧ38Z\u001cg=\u0016\u0011L|Ix\u0000OLSBuF\u0000)3\u0003@<[g\u0007y\u000bb@` \u0018/̓ %XK\u0016J/a(E\u0014j(\u001c\u0013(\u0000TJq\u0015\u0014\u0005^U_\n%8Q\u001eܦ]\u001f?4q\u000e#!vəKS\u0015h\u0019hQMf7u\u0011Rr\tyXZ\u0001\u0001H/$\u0016a\u0015f\tk#$i%\\\u001b T\u0012Z\bi%bDz)!Z\u0016\u001cn*\b \u0007\u0003`UF\u0011+ǒs\u0017rlbr.))EL$%d\u0012sTV~D\u0018\tɭ'O28͆,Dx-%6U2\\Y&,C)o\u001bPWqS%E\"6\u001bŒ`T\n\u001bh3_\u001c!~1\u0000\nHH]O\u0016%\u0011q>qX31\u001fNߟbdbz\u001d\u0004k9?]<Q0΋\u001c\u001ft\u0000x\u0003\u000bG!sJ[`Vɘ͘ӧ)\u00196)ߓ&\u0000@qX٘lTh6G\u0005\u0006\u0005\u0001_ji\u001frO!\\r\u0017_\tύ֢[6Wnڌn;Zn5ZE\u0017!{dUF}<%\u0017:'~\u001f \"Y>\u0006'c\u0002S`\u001cAO\u001d@\u0010\u0001\r\u0017d1)\u0002\u001ehS`PJ1\u001e)6\u000bJ\u001f!=`4YaG.;-\u001fsy\u001d&m4]\u001e\u001fc>İ?rVyk\\$D_\u001c6\u0019)-\u001a\u000b\f \u0000xk!H\u0002%2*L\u0012\n\u0013:x&@92/@\tY+4Y[\u001c\u0014\u0018@}kuڍ^D\u001aǱ^<\u001eFf\"XÜ\u001efw\u0018c;)wM\u001fw&I/^l^a\u001fj.\u0013kIĺVbV\t1[ERa9eX]\u001b؀\u001a\u0011]#X0=\u000e,\n˫\"V\u0012*0*b6r\u0012dC;uR~ \t\u001c\u001co%_,%e\u0000\u00173ӋS\nH\u0015zz,\u001fj\u001d~1Ao:̈́E=X\u0016\u0005p\u000fJRC&k/R[\u0011=_A\u0001őJ`H\u0017 <7\u0010\u000e3\u0001$i_.\b֓kyx\u001fc9\u0018hJ(oߜ`\u0001-`-\u001dg\bszq\b2\u001fb>\u0003=\u0004q^=vJGJ95Pi=`(\u0018S\nƤ>)M-,\u0004\u000e2\u0015d>\u001e\bk>o>g6\"0\u001b\u0016\u000e\b(7>>ׇ_\tύ֢[6Wnڌn;Zn5Z\r.CAi%氭Gnt2lq1\u001aSF\u001a\\r2fg\n\u0006\u0007\t4eA\u0016\u000fD\u0016\u000f-%`ڬPJ\u001f\u0019\nƂq͓=6?A\u001c_20G]^!ebr_9ޟbb9kqs<D\"X-\u001f\u0000VWզ\bix:3H}Qg\u000bՠ\u0005AjZpbT\u0006E&gV\u0000\n@]T]@b\u0011RuVk\u0000ͼFbH͔Z%^4:\u001aWL-B\u0010(e==f\"\u001dq8ļ~4nPn}SB\u0013\u001b\u000f\u001aOKH;񻬒o+HEU\u000eb5DK'ڍvb-=X+\b\\~4\u0001\u001ce&&1{yJuvLƃr\u001crhJ\u0011Q\u0010\u0015QA\u001dAQ\u0010[΂TAn\u001e@\u0015PD\u0001\u000fXP\u0011\u0004\u0003vO\u000fϧMouJt].,\u0011\tU\u001b1i\u0007JFOi'&$XE=_+$\u0016\u0012\u0005Dz>q\u0015#r*\u0012/,\u00123*ym((V\u0019geu\\8\u0018\u0019\u001f?YUj!,ύ<f_a\u001ec_wn\u001bڅ\u0003\u001b\u0015@f\u0019[_2\rM^F½蹚ⱜ^|\r>*Kg\u0017\u0013\u0017\u0013?t^8>q8-ܣ?\u001d\u0011X\u001871v\u000fپ<h2zjՔEsճpg1\u001fC#|S\u001e\u0016\u0010ǡF\u0003!;v<\n2\u000b\u000b{k{y(<\u0015^:Z \\9[KּVFiSFSmMzeN\u001dM\u001a.ZY#M&l/\\ec\u000b[Sm{\u000b[K\u0014严S\u000bl~<j}u\r\u0006\u0000@á CP-4\u0012\u001a㳞&\u0004\u00005\u000e7%x\u0013i5\u0013i=\u0013s6f>nX\u001c\u0016v-ZG\u0018２re-3J{P\u0017<>xQ)\u0015O\u001c*ݗ\u0003R  *\u000bl˥rdn\u0010\u000f\r![o C^Pj\u001dYHH%Bb!}\u0011mXtɣ\u000f|\nI\u000fzD<\u000fo#E<&mŜ3#w=90\u0018c\u0017e\u0015n.0m\u0019KF\u0012Êf\u0017]WKv!?\u0014XN)*OUbM\fNha(\u001e0d\u001bZ9h1\u001a\u0019oaVcrF}\u000b dh˱\u001b\u0015XA%VX\u0015\u0013jaur^kZ{qE/=Dt\u0012\")#r!\u0011QRIT\u0013:V\u001d\u000e\u001dfy%3\u001f.oL~%\u000f\u0005FMzY\u0001ނg%|G\u0016'*Bz\u001d\u0016~@\rF\u0001oר\u000b*/\b\t77\u000e 35\u0002o9\u0015o\u0017o\u0017⾚zc3\u001fO;/A\tN\tN\u001fN:}w|\u00171۹s1v/w:h=\u001di5j2rRh1\u0019a1\u0011n\fe\u0006\u001d\u0017&|<P(k(\u0005\u001d\b4z5\u000bԇz\u0003\u001euC~z\u001d>\n\u000e굖v'-\\\u000fQTQTbS^SmGiSF!ekH4dn\u001aOmm/ak+[CSeS]\u000f\u001c\u0002lz\u001ezk\u0001l}t@@ހ`\u0000pk8p8x\b`k`;drTٴ|ZhjH˙(˹C6s\u0007m\u000f۽\u0005\u0010\bZ:帜`{څ<BsκQ<$ȋ\byST\u001f/\u001e@]#\u0007ف\u001f\nH\u0007!\u0016\u0001cj?*J>\u001b\u0016\u000e4^\u0001|\u000eֵ\tw}\u0001%\nOeaT9=r\u0001\t\u0013[-_y4r1h\u0003B\u000b/r\r~\u0006嗨\u0015Jſ6^XV%b6&EU\u000eJ҆u\r`݃X\u000f4<d]\u0013vb0]p\u0011hn6⻘vcRߍK\bI'J뉛u\u000e^;ޤD\u0004s\u0017폘w[Q\nVfc\u000bVlha7_1h0k$MwUMLq\r3Y~ʆK̺BX\u000f&\u0003Bh[RN\r.lq\bLd\u0012DZ8-l\u0001M\u001c\u0002\u001b\u000b/\u0001lCB\u000f\"IX%4K\u0004RYd\u001fuݏJ|T\u000eu$\\$I+I[KNKN .ؽ\u0000=n\u0016nlLLW )υ\u0013B\b}{\bLFLy&OCƈ!\u0010~.֨k\u001bhx\u000fG}-o6-^^ZoBR(m(s|V̩VTI\\K4n2\u0019oM.ʭsآpjs\n]?=+mhܽ\u0001rt|u~?~\u0001?`\u0010\u0014h$hS\u0010Q>k\u001a\u0017\u0018?\u0017L1k:l:e\b\u000bll|Cȶs\u0010{2\b]=z֕LbSɐ;AR<K^\u0015o2ՇL2\f_2\u0013ٖ\"\nmo\u0004\u0003l+I[0$bڳtD4lOkz]lK\u00010R_-}\u000fz}}ӣ\u000eC1v\u000e\u0011Zv\bL\u0015<V|Է¨£8دcO|z}C5\r=9~\u0019\u0017W\u001aV-~\u001e݀W5]xs\u000f҃?\u001aG1f\u001810\u000f^P\u0012rFÙY-cȘm}Lx߂\u0013ܗ\u0006sw\u001cXMt:YK\u0004&3y\u000eߴ[?!u4P2H\u001f<-sśoʞ(s2=*̎\u00032+6,]+x̢\u00152\u000b\u0000;\u0013g\t\\>w>{{5vzo\u0013-N\rf]\tcaY:K\u000bf\u0000P\u0012]\u0006.\u0001p.J\u0010R\u000bwV\u0019q\u0012or̿\tQ7woį_!?;~\u0000\u001ensз/A@}[>\u001f꼁}w\nו\u001e*^(s}V\n\u0016:?.p\u0006m[mӽl;Y3ogȴaw=Z5Pr$ƙ3;\u0013gv*\u0006ط5=\u0019mz\"hH#\u0011}[:f\"ʣ\u0006\u0000\u0000\u0000\u0000\u0000\u0000׉Sw\u001a\u0007Pή}nm*A.ˡ܊\u001c\u0001B \u0017怀DnTDEQ\u000b*ra\"`TF\u0019r\u0010KQ\u0004^M\u000fv̌w<7}'󓍏t?\u0003\u0003\u001f;|\u0014굙\u001dF{l\u0011yn}i,QeioKv}wըۤ׸b\u001c\u0005j1lͨϴE\u001d;pN\u0016\u0007{\u0019f}Lr?lm1Ķ\u0018c|K\u0005J\u001c\tR\u0006[\n~\b\b\n\u00168E9sz\u001d\u00106e1e)q\t$\u001e+I\u001eH'\tx\u0014oJQK\u0005i~/rIS]\u000ePe\u00051Tיl&rd  A9@\u0003-ࢅ\\PEos4\u0003<p\"ڟzb\u0006bMb\"RY?IwK_SOĮ\u0003v\t/YY=a,ΟcXz\u0001l=:G\u001d\u0017l_ֈnh6lh3Wg\u001e_ܰӰ˰ǰMo}o+J\b\u0001%~@iXߊԈԄmR\u000f5\rX\u0012j&%U!+\u0003#\u001e\t\u0019׾8d\u0010ytmx~H\u001e;L#?`ŕa\t5uX%j=x\b\u001e:nHBxL(O!VK,\u000b\u0015\u0011\u000bJyńbĢ\nBQJCv\u000b]B[a#\u001c\u0015@>,\fꙫ~?p@*-L\u0010a9LfJ \u001c\b.\u0005\u000bTNE|9\n:㱂9o\u0014v\u0017[:xmD7G]_'JpOpwsuu=\u0015e?\u0011m?\u0016e?\u0016a\u0014)m\u0015a60[i4v8FI³\u001eY\u000f\u0007V}\\^E/B̶fcf\u001d\fr;ìNn\r0km464PMbE~\u001fDn\u001amk瓥^ZjcO<<3i\t4ne0Mc~SjT\u0005k\u000b\u0004\u001b,([j<69\u0010``P%F\u0012n!\u0015Z\"e\u0011V\b#Q;Gblbmcm&\u000fM\u001d\u001cIMt=4wqק\\0\u000b.o,ݻ⾔\\9ﭺF2%\n\u0005W|@\u000fE\u0005W\u001a\rdѐ\u0000$;\u0010ɡr-*\u0014;\u001c\u000bJ\u0007j|\u0004˻`\u0010P\u0011V\tV\u0007P!\u0000ա:L#\u0014T\tC\u00156}X{\u001b\u0004\u0012\\vq#ΕIF\u0019\u0006i\u0019\u00061Hhp.cSz\f.Ο\u000b\\\u000f\u0017\u0017\r\u001e87O\u000f\u0012\u000b/GkϿ\u0012l\f=@X%\u001eT=Cn\tQ<L\u0011D$ad+'\f\u0013гvI;C=<DmDQ+Q\u000e={\u0001IǉqH>A(\tO:qsP-XCe\u0004\u0002p\u00018 =n~uYY]K\u0018\u001c\u0007\u0015Ѐ\u001c\f*>)/#ä~)$j\"T\u0012>$V>@PI\u0015|\u001cz$kDPca-\\yJbٽ\r'2|\u000bH)\u0007偊`\u0002\f:\u001b`Ch\u0019\\%(\"6\u0006l3<&Do1Л\f\u0006\u001d͡_i:\u0015\u0016?䊯겷*g9t]׻\u0016{MXHs_H*m!u||\\lINS?;Np:8~a\"a,aCC6Uq68\u001bi4F\u0012m#\u001c\u001c싰=h)\u001c0\u000e3\u0012\f\u001eGn}\u0007\u0013ZjOzmkGk*MZ&\f6i;˴m\u001anM2>'wݼ\u001d=|r\u000ff6urZ\fEXc$Ҙ8\u001bY<v\u0004\u0013o<d?z\u0018kx'\u0013wO\u001ewJrIv96LBlbNw7K˹<r>s6KU\u0014\u0014GJ8H)\u000f)՜L\u0007\"\u0010V\n\u0000*\u0004\u0012 \u0002:TU\u0015`\u000f\u001d@0\u0003!\u0010\u001c\u00045\u0011huZ(MFWj\rZ\u0017\u0018:,5\u001brHUy5Zsuy*\fJ*\rJ\ff\u001b\\<'oK\r|EeSq=>5)MЙ\r7&le\u001bV_\u000b\u001b4\n)&!$,' \u0004et\u0002@It\u0002)l\u0003\u000f}^RKXf1ix4$I49O9_\u0006蝎OjQZS\t7\u001c^\nΗ-?w\u001dx\u0004z9\f@\u001aد&4\u000e࿬CpHN\u0000!N\u0004\b$&RAc8\u0005\u00059\u0004\u0004E\u0004E\u0010\u001dU\u0006]\u0000\u001c\u0000\u0004uP\u0011QQ\u0011\u0015\u0001QA\u0001\fH\u0019g/0USz}V=>>{pW\u0017/'{hm#}W?G\u0016_{O\u0017\rO\u0017åe?M\\iqlc*\u0016BI\u0014-hJSWKij\u0004K\u001f7\u0011nL2۠V2[\u000f2yn\u0017o$~w\u00020s}5o\u0006⦫b+cT\u0015'/EO\u0014>Q\u0012<~fXS+?Xǀe\u000e[ҿקown^\u001e࿭|xxCvMs#ݽ#u۫4W_nvmMqy<Y,Ytq%aѣ\u0004W\bFci[ɴݙdh,mk4^\u0001A`'0\u0015s\u001d9\r\u0016\\G=\"d\t96\u000b,\u00169|c{@\u0013c\u0007~17\u0004\u0007C.nD仚\u001e\u001fq'\u0014-\nd=,-y\u0014\u0012ob/K˖YZ]*^n[g{϶h9\u0003\u0016\t;Js\u0005A\u000e%!)\rs*\t\u0013;\u0015\nÜK8\u0015D#%⊵Η׉*DD\u0015bU\u00122FR^R\u0015'\\T\u001288iUTMz%J:NZ\u0013R\u0006&VRpRX\u00048\r)J˩Wo\u000f[Z>a?s\u000e\u001bhˮeTX\u0004GGP&\b;\u001eT\\d\u0011Ң\rS\t\u001f\nxdd;\fT*JQP4:5\u0019\u001d猍\bo\u0007w}^\u0007}׏\r~\f#\u0004l\u0013\n\u0013_`\t\u001d\u0018A\u0007GС\u0011\u0018\u001dz\u000fCho\u001f\\) Vt:lOe֪\u000b9k\u0015/+O[R-D\f#~wa\u0000\u001b䎎qƈ\u0019z\u0006@?\u001e{%ua=X\u0007\u0007|wao\u000f\u001f{x]&zqB2©&fx8IC+PZqq][_ޭ\u0001\u001fzRS3\u0019ѝ\u001d.33Qё oO%6s\u001d\u0017;\u0014\u001d@'\u00159ʎ\u001c\u0005оS:Kޖ){yb\u0016\u0007\t9ݍ\u00116E;ގ\n_x3̶>Ԧ>غ.Ⱥ6j\u001b\u0016hY\u0013hYo\u0001\\YnQg^gNe\u0015L/ʽM.-1Vꅟ˼xxb\u000f<OdGdl'6\u0013sEƻEƻD_#\u001bm&vgҶ^i(y:=4\u000f\u0016ݓXb\u0004\u0006t\u0019BU2r*c@r\u0006\u0014b\u001fhLÐ\f&r\u0006\u0005P\"T\u0005BS2>\u000b^\bdw:Yɤy\u0002\r2:\u0000\u0018\u00013tap\u0014$E\"H&AAs\u0007\u0000[\u0013W\u001e\f_.\u0010K0察\u0014\u0019%\u0001P\u0007\u0007\u00063\n&-\u0018! \tfꆱt燳tCX\u0014d(P^^^\u0001\u0019Xk@4$3uF(69\u0018aS\u001e68\u000e%ÌnFϰg\u000b2u\u0007\u00073>\u0003my¾p\t9\u0011%/IȎ(V^\\}sWHS~|C~r_i\rN?W+==ccc(|G> 'i|f\u0006Nf\u001c')8>:U'><=\u001eR}cǪ\u0007\u0007#\u001fLr[mNo\u0005q\n\u0013\u001bm9y}OTCĘ\u0014O5e22\r\rGx*`:e\n`'(N\u0011'&xCC7]7-:\u001c:m\u000eai|$\t&qlr\f@/P/\u000b\u00110h\u001b\u000e23͑6V\u0007K;V[VUϖx$<6yM)z۔sK({]Q]_\rl\n\u001b\u0002X5X\t&\u000e_aV\u001b`zϤߴ\u001b+pf\u001dqb\u001e\u00162\u000f90\u000f92\u000f:0gG<>W\u0000v\u000bݶ\f ǆcMiM\u0006lYA5ZӶCiP55ӊݒj\u0002m6-[-(i\u0016Ts7NFƝ\u0012&)\u0010\u0012!\u0011W\bFci[ɴݙdh,mk4<O\f\u0011D?\tƎ4=\u0001jpdP\u00040НX\f!D5f`\u0000\u000bhd>l\u000fC\u0002\u0006d\f9\u0006ǧT=[B\u0018d0\u0007I#;tȏ\u000f\u0004\u0000\u0002&\t(z`Ɂ\u0006\u0001B\"fҝ\u0011E\u0018\u0019\"\u0016CR'\ba\u0013\u000f;\u0018,YH>\f*|ʇi\u000e\b\r$?D\u0017ٯ\u001b(3er'y{۽\u0017 r\u001c½qpXmMx;PA@T| o*\u001aFMlj}\u000b\u0004i /Q@o\u0018\u00135\u0016bm+x\u0018g\u0005\f7g~7g\\hL4͖a@e9\n,KH</\u0002ϋ#\tw$QʵRVꨞ\u000e*HJZV:+*=Xֶ\u001fjϹky-\rÛ[\u0017^%6;\\\u0015Z=x}\u000f:F\u0007!}/r8Nzc'}?]s\u0017|}φC}o|sfx4<\u001cڿ|6ǫ\u0015r>V\u000fcoMeަJW\u001d[sk\n\"jjɌ\u0002ĭZGKy4|?HP\u0018QQ*V\u0019=d!PJ \nEJ?qa\u0004\n\u0007r%^+:-YA\u001aB'\u001d\u001dHt\u000eXw\u0001U7\u0014۝Uؙ\u0019gl3IORTb/7_,\\XλMg~gm֟}9:K}ĥ&J7'0o$0\u001b\u001d\u0006;!~ƬltZc\u001b\u0014XeL\u0006zү@Vɕpf\u0006+\u0006+b5^\u001c/%Z5-\\C8|'JNN\t#4R_\t\"\tX\u0004v&\u0003Yp;\u0001+\u0012'[E8g`\u0018\u000f\u000e7I܌p->ـ\b\r.i\nHb\u0006\u00127 ܈\u0006\u00123!\u0019.qHb\t\u0010q\u0013\u0003@\t113׹6\u0012O%CSPh*)HE4$#\u0002\u001e1\u0013[(q\u00049 cx)\u0015N8x)\r\u001c:CFixJ#+CJ\u0004I I\u0012B0ai\b8pH\nS\u0019a\n#LfDRQ\n'M\u0001\u0014Ka\u0019rV\u0002\u0013gr#2-*RYbm\u00195VnZй3/m/nj8srÚ;G\u001a\u001e{+w.}-ş@ͽSo=:4|(#K#C6~\u00122zGc^pG٠m|\u000fG\u0006֩}M:h۶-\rs>(wmrwXַ\u000bz^o^mۋ;TƠ\\\u0015Qs\u0010͚\u001bMFST{980d~4Y\u0010M΋\"\u000b;,\u0004SHO\u0014\u000b\nwa\u0014<\u0005\u0010FжJTC27j%UZWv}Aq0m`o\n\u0019no\u0016\u0016{t&_ǜ/엟%鏥NT_Y`Sd<ӹys<鹆\\,Lտ.ے(\u0014APvI#J\u001a3S5&T/Y\u0006B/3\u0015\u0010\u001a\f,%]\fT8[ZK,U\u0004ЩH\u0004/ş \u0015\\M \u000bng\n>\u0005\u0013\t(\u0016\u0011߂\u0018߄\u0003\u000fX1T'pE\u0013d\u0012=Ԯ\u0018S5l\u0012\u0011\u0011r=\u0012kĘ\u0004;\u0019#0\\\u0003\u0005\u0011\"A2\u0012$qa\u000by\n\u0012ŸA,2lhdAJ\u001c\u0010rp\u0007\u0006ıhi\u001bCdMA;\u0014R\u000fI;åf0\fWZJ%K^àd3d]RaTIBBᎇm4\u0019*c\u0016X\u001cː\u0014xf8++\u0002ω J4h\u0005׶Z\\GU\u001b\u0006\u0013жkl\u0002_/Wٽݲ[oX7pgYϻe=u]oo{\u001f_\u001e\u0019{\u001eru~\u001f׶\u000e|M/\r\by\u00018odGȮ!cg߷ܽp/ٶ\u001de'ۿ:M;C.,>Y6Uh?=\u001cyzKmOSe׾l.fQrr8T6n(Q\u0000RWIE\u00011tnAx޲m\u0015C޺#p@!*P\bKhNV@jQmj-a\u001erZ\u001eMs>^Rϕ?._3Wp5Ƭ,WKzէ.qWg.Y\"K\"`,v.v\u0014.{\u0017\u000bM|㙹YP=M){#8z]\u001ch\u001bmV\nԙ5*#\tj\f\\\u001ay-Ӌ!i%\u001c\u0012\u001d[T\u0000X\u0006b5\u001eG~$\u001bΏ'C\u0013H\u000b'&`\u0005W\u0013Ȃۙ\u000fd\u0004j\u0002I\u0000TyNC<%&|\u0019\u0013N\u0011\tcٶ%\u0014\u0011gh|24A\"\u0006H3REVCԈqHZjvo[=I\u0010aF\f$LFTh\n%0\u0010\fn$qZ`g(g\u0015t\u0002\u001bt<w&\u0003\u0001\u000bmk` ir]!M\f9#ӧ:\u000fjN\u00038>hp}$\u0002p\u0004XZ[E\u00004r\n\u0002^\\}[j\u0019ά3ZE,쮮j\u0001\n;ZEB\b\u0001h̘<Ifd>P\\\u0012+\u0011H0\u0010\u0005fSY~3\btL$:`:͝A\u0003x47N\u0007\u0002ifa;SYJC\u0006#\u0001o˴2=Um\u0014ֆu(a\u001d-r͹7^ys_խoj:\u000fi\\XqUW\u0013\u001f\u0015\u001d0lC\u001fow{cݳȶO\u000fm\r\u001f8?\u001d3w\u0001/^6r\u00062f\u0019wVP-6K}O=m?t^-yjέ \\=?^f ]Ck0B:4ȶ0QWuv\u0015ppӕd\u0004f\u001c%*\r`[S\u0011yr<[\u0014gi\u0010FO.AB˵TOs\u0016<x\u001e\u001b[Zb㳊\r\u0017<\u001b~\n\u000fgE{ɢ`4'Z\u000eaXk(\u001c\f\u0010k8r.t:ttiO(\u0001!>B&FY\u001a\u000bYe\"V\u0015X\\2\u0003L\u0003ؖ%z\u001eTŊY\u0002l\u0017R-jԶm5X8>ΊZ0_+6e\\׶7\u001e4:ol{rxlxT\u0000[\u0003[C E0.Np@\u0014-L\u001dPБ\u0018f2\u000bI-pRz\u000fk\tH\u001e8\u0017Ct\u0004\u0016\n%R~\t\u0004\nl2WYےE@\u0010#\u0011fPD\u0018-t\u0014\u0016&JLjVFnPJ'(e\u0013U\tJ\u0010\b&l)7G͒pŁsDL\u0000v\u0006\b\u0017JdEm\u0018g\u0019e[m\bK\u0011!ۦHTB\u0010ʖPe: 6`KׂmaAW\u0016ȯ4\n*B+t^Vvd]O\u000b;Tu\u001dkxk=k-\u001c1#\f\u001d\u001c7|'|xg>\u0003\f\u001fğ\\ࣶA;]iG[v#r\u000e֦qMZ\u0010\u001flp_xpFu_7j[(oT-\u0016`&3\t娈\\%/O\u0007ۺRZ-Wƫud\\\u0012D.\u0012˴r-KW\u0016Voޢg\t\t=\u0011\u001b6ÿ3pNt8Qu8Qy8Qќ:\u0012|>V\u001c~vZlk]\u0010^\u0014cL\u0019x{,Ӱ\u001dX\u000fvzKps`S`\rٶJV\u0003ld%tDT0\"ۖ\u001bePR=X[\u0016Z\u0004鰅Z\u001c$\u0018/\t\u0002bE\u001a\u001cm\u0011l}\u0001ao\u0018\u0017ߐ7\u001e4:ol{rxlxT@_c1\u00035ykÑmU\\\u0004[-\u0015L{o\u0014ۺXnmbL^d=3PP\u0007ձ\remk$03I|*F.<@F\u0012\n(\u0010n\u001fR\u0018.ab(xh\u0011mb~%\n]!VHhخ*eqjD4N)\r\u0017Y\u0012,WʅeX\f@\u0003fJi\"lLsgс\u0000d\u0011j\u0016`\u0014VlX\u0018K\u0015㰧\u0002\u000e)oq\bm(EEս-A\bt\u0007E=&ym+;lrs·W\u001d\u0003#?r\u000fq?\u0019jyygi5gxon\u001expiAC{\u0017zoo]'vu]CC_g\u001fXsjߟ3,c\u001dnަ2Kx!]ݪeKw/Iֳ.ۦj\u0000sD\u001a6W\u0001\u000b\u0014ȶr<\td˃yUZFG.\f&\u0010eZ,,\u0017=[\\\u0002l;e\u0018\u000bn}f\u001ci~\u0014i\u0019o\u001d+kI&Z\u0012UI\u001axHJй|c{\rv$\u0002{:|\"e!lӛ#\u001b#\u0004kT]\u0018Uc&j3\nx\u000b4-v\u0001xKl\u0014y\u0016gaC \u001d\bT\u001bj\u00108\u0004+\t\u0010lB\r\u0005Q۲Y\u00029\u000f\rwyOy='罎=GŒ\u0004e3]Wi|[afǔ\u001d\u0007m\u00168Q_QO\u0006\u0002芙\b0\u0012O O#L$n\"130\u0012x\u0004͏\u0012\u0001Z)\u001d'')\u0014\u000b\"%h\bT\u001b*1*])Qc\u0015\u0018,\u001aMI\f\u0012.V\u0012/grdZ\u0004yrl\u001c/R\u0010*b\u0000fI\f\u0011B.-\u001dpSElH<\u001a\u0012.,\u0012\u001cJEhs$x(\teZ\"TPm\u0012֘_-+\u0015F\n\u0010f(r\nZ\u0017oo)E\u001f_n}y\u0013\u0000Yu\r=c\u0019ӷgh1}Wwsylygׅ\u000b/}~DO{˝\u0013_}OVg7~ډU\u0013\u000bG\u000b-*B0V\u0006\u001eg\\YZ4:\rn<\u00038>q\u001a@vWuK+\u0007>6mJ1/|`l.߷-\u0018p\u0004BR\u0012@KCSI1!`c\u001b\u00120\u0004\t\r\u0004B \u0010ZS\u0010co}ޕ\u00183iPͰ3yZ,=ɛ9b\u001a\\t*R\u000b\"LC|\u0003\u0013YA\".\u0000j\u0011o\u0017\u0005l)\u000fo\u00116\t\u0012&-YIF[d\u0017\fz^tCa_܌o{o<m􅟥\u001cY}zp0#`ΙC3<\u0016\u0017z/.\\\u0018A>\u0019vs\u0002T楩̚h\u0005/#[![=r\u000fn\tx\n9q?֎B6چ\u0005\u001d,-7ւl[\u001cI$Yjdk\b l9I\u0018'Q%nB6a56aMXMH\u001cUmYm3\"&ܸaB\u000f_<ݸ*!箚fAL\u0006\u0014̑\u0013Vꥈ(Qb\u0014TNP1\t,*\u0005^0/WIO(\u0010cYl٧S\u0014t(K\u0019\u0014y*DEjIFX+Y\nux(1\u0010\u0006@\u0019:<$YJ4,#NKUT4]JSaipY\u0004L\u0016yzBXe\r\u000eŴpV?\bA\u0001f\u001c--\u0016\u0019Ӂ#NoyZ77޿uͳ\f[ȭ)#w\u0018䷧\u001e\b{p$AOطGTC׎\u000f_\u0018qrƩ\u001b\u0001lο\u001f;ʣ/\u0017\u001dX-\u000e޶\u000eщ\f m\u0015Qޮ\u0018GʡZny]LӸ\u001a\u001359[o|5(Y6h\r\u0012-6DTD\u0004lK;:ʈ\u0017rӧzo8hhQ`^ѝ9\u0019'L=>}O2\"mo2dg@,cpg\u0019:\u0011o\u00033\u0007ᙩ3y\u000b]?c7ǃmu\u001a/*j{6\u000eÛ8^NzP\u0003cu6ƎW[QUVҊl[\u0001HxۖjQ%mFF\t\u0003\r\u000fa$nB6a56aMXMH51~nzָ\u001dmw#ՙMP\u0016#\tO>{NԌ_8I>\u0002l;)\u0004H<\f`\u0000҉jQ*:FIy\u00192JAy\u0015T(|\\JRS\u0010l)\u0019\n|([\u0019\u0014|\u0016`+]\u0016j1m\u0000\u0002i+d4U*#QnċxFt8M%NL\u0015bQ4EdYj<Kh*\u000bYg\u0003*uZ\u0013m1u\u000e\u0004[\u001b\u0015.~N9ض{eNƒ\u000b{V\rswډ7t\rz_^}F\u00116\u0013\u000fN<y[\u001d}s\u0007nx\u000b]w/u߻|w?}v]k\u0017y2p\u001buF\u00056G\nؖm@quODmA\u0002lkȶum|\u00016Y\t(+ͼm#d~;ݛZa\nYQ\u0011+\u0002&\u001b\u0007\f.,NF^7H6Y\u0007e3@ag;\u0019xG\u000f\u0002o}\u0019c\u0019َ֓ק6'03c(\u0005+<rhq\u0013M.\u0011rQڱZ\u001bT[۶\u0002% ۖ\u0012\u000b\u001aj-b(\u0002U\u0018!-H+x\fL5an*v\u0013\t\t<\t\u000fljB*om\u0002Nhg\u00055˽XߚDvl;h\u0017^g}sD;ܪ_=,)\u0002zdmi2Z!\u0003Ʃ8U\u00100GH9\u0019^,R!\u00182\u0014hPY4\f(S!Qry*qZ,H\u000b5X\u000e`!\u0012U&\u0006 kM|\u0011(xXm\"\t:|FZŲ4\u0000X)Zi\u000eA\u0019Nm\u001aQ\u001aJ\u001dT\u0002\u0000\u001d!30\u0000\t{UG-yG󕮭/>\u001d׎;\u001fM{7߿ic;a}ܾM\u001f\u001dIϮ\u001b<\u001b8g5wǆf'9.d[7斷y'<\u0004ҶEu˗\u0003lf\u001egݣu\u0006aۀ`K\u0007z;Ui%\u0011om$|?\b\u0000o\t-Tǟ`F+Ql\u0002EXm\u0013>K<Rq,0Ⲙ\u0003\u0019wE\u0005>D5)\u0014\u0003\\\u0010lu`۷ ]Gshi-O_g^kcxzv/!\u0001DжvƆرj+\u0006ζr\u001e`\u0000\u0012\u0018\rX\u0015+\u000e&+m\t\u0018zE\u0014\u001aEqa`Gp\tلՄrv\u001eۄՇrvB6a5!Hەc0usm3\u0013Lc]#R{)2&cT\u0015\u001db\u0012UL\u0002-\u001d-'8\u0016l$ q7Mhq299I6\u0019\\8_#Y.d%9\u0005*q\u0001+Y,Hx1\u000f\n=^e\"@\u0011\u001a \u0013\u0018\u0018depH\u001aЫ\nW,[-E\u0001oyh\\5\u0001\u0002ٯ(;4\u001d\u0013!=?q{O\u001d \u0003(D8\nA\u000e;FD\u0004\u001f>4J\u001a\u0003>Ei6혉hZwVoyg>w00;ya[X!8;-X/D\u0015T;7QN޶vZXb|\u0002ocYޒk;P}]?1/2oߨxMѦ)8n5<.fZ]y*xtow.\u000fq8#p=s@W#G\u001362\u0001eIAPFgӈ4\n`\u000bK\n^:i\u0004[x.P\f\t!O\u001c2,iy=\u0000R\u0011\f`:\u0000[4qm\u0004ݼmct6޶A3Y\b%Åĳw,\u001b8d\u001cM|*\u001d=i/}ZCs\u000f-[<\u000f-dt'mF\u001d\n/\fV/Gyxdjا8T!\u001b,\u0006ʨ=%n7&v\u0002oKē.(_\f&tӨ.\u0010+h\u0000FFK:mX\u001dȈC\u001aFa;\u001eb%\u001f\n $o\"Ѷ/*&g\u0013Oˉיlir*\u0017v\u001cKڟv~F׉:p-\u0003,r/ȉR%QH+[\u0001r=\nTEҸģ$\u0014n#TA|&EF5ī\u0005u-כ\u0005FYjj\nZVMu\u0018\t\u0003Fa\tHDJD&V*MS0{\u0019FhIͰE\u001a2\rXFY\u0003la\u001a\u0012ch]I\u001b,Rs,S\u0000@d@,i\u0011\u000fy\nEbI dH~.x6LdO\nC1=c,efYf\u001cie^8a51>\u001a\u001e;zm'{'z}붳i~t\u000fR\t\u0016\u0016x\n1+,o\u000ed ?\u001aHYX\u00126޶9\"d7C\u0004\u0010[4i$\u0010-\u001f4\u001eq[F\to[0,l%\u0010l9D7M&S\t\u001f*\u000e9~ybNDʟv=F|y/\u001a\u0019/ԏЏ_\\|mDW~\u001a*\u0003d&wy\u001dn\"/*\u000fWTiz\u0003\u0015RYMƝҰ\rd \t\u0010L`\u001d\u000b;K\u001auJ1I]\u0004\"\u001dd[FB)z=TCx<GϜ\u000f<Irums9:9xzMڟ\u0006j\u0013+ w \b7\\E!uQR\u0006/`q\t#\u0004ޠkTo۬\u0007n\u0016S\u000b֐UW\u00104I\u0004:I\u001e\u000b\u001aN\u0013\u001e614a!RV\"M\f\u000e)̹Xj\u0000My\u0018c6\u0003\u0016_\u0015Zr{m\u001dk\u0003ݛ\u0002\u0006_)\u0010\u0019}Tʞ \u000b\u0010\b\u0005%~8\u000f[wLlpކگ-G)k`AӶ\u0019\u00079[8kzj5<\u001e\u001a5o?T_Tύjޫ\u001bh:\u0005\u0005ƅ@\u0012cIA4O,lj`;\u0017<5\u001d\u001d-Ǳ:\u0019\u0006y\u0006i8i;yކ,oXQft\u0005\u000bT\u0015\u001f\u0002\td۩o\u001at\u0002@I?zpi\u0017\nΝ{ǣH_\u0016\\k{{w[U_\u001c ܛ-WM'G\u0015\u0003G[Rjb\u0001p@}F;0\u00002oǪGj>^\u0006\u001eT\u000f\u0005\u001f~ٙ*&\u0013E\u0004L,\"Y\u0007Bn؁G\u001cx)brŎ\u0012Y#\u0003ަ<+\u0015uѶ/(&g\u0013Oˉיlir\u0017\u000f۹νe\u0003\u000eV\u0005Vh\u0014\u0015*[A2ģ$=Jb\rwHM&܌f&e[נ\u000bیxJ$\u0019*j%;xĂ',Ҕ襉\u001d^\u0019]6Tc!\u0016\f\u001a\u0006\u001c|)ɻ-ĮW\u000e\u000e]\u0018s \u0012۰eE嶕zxc\u0015c@|I}\u0014$?T\u001b\u0017``%\u0002*\u0004re\u0011V4ȶ&ýBc\f<7c6\u0005o21Ԭ{l=4kw\f:-NuVT:qkmΪ6{66P?8e?--8Y\n=eIKPd?M\u0014lNK;%i<hEmF}3,i7If,PFX?m\u0013ޙT9Ϥ|3=%a+;\u000bȝI;\u001e>\t>i/\b/\u001e4/0\\4ZgZu,8\\!\u001b+OhO\u001dYRo\f?=tvU3\r]?^?^Z3T3\f]>DuJ?\u0002B\u0001;K\u001auJ\u000e)WD$\u0012le;\u0018IW\u0003\u001esN޶\u000f<Irums9:9x%Vt=\r\u0005\u000e\u0002ob9J%\u001e\u0005YLI~D\u0001\u001cdFyzya\u0019fa8\u0019\u000eQE@>D\u0001QO@z\u0001\u000e\u0002\u0002\u0002֛U+Mllt&VE\u0004i6iZ@M_87Cy\u000b|h>VضF\u0012U-UQU$Q}\u0014E@\u001ak\u0003jGub?\u001eT\u000f5\"Vt5,J|f\u000e&DHO5z\f10Z\u0010j7ao{0\u0010z4:4f=R./0ǭ\u0011,\u0006AB7-2eµ3eSwj\u0001\u0000l{CJޖI\u001fb~ZMbSY)oB?.]eћ\ro6wYJQzϹ_Ӛɿ\u0004{&)L\u0012\u0013RxVֽ`pm\u001dj!\u001bcmRZ-^\b\"7\u0003[[\"«9w-UV;\u0010s8B1:\u0018ضI5+125\u001eoM7ȸ_\u001f^cz1ͺMs\u001eKe>`\u000fZ\u0016~ӂ?\u0007\u000e>@.\u0002/Cݜ9ߵ-=s̖֞MSʝ\u0012[%\u001f-d>\u001dmNB\u0005{%Ŋ\u001f(\u0014'\ncF!d[m.mD^\u0004\u00185F\u00014\u0016<Am\u001a\u00146M\u0004sVV&GGl=\u0015\t\"\t\"yo>l'l&zeڪm\u00002ų5\u0012\u0010\u0018H\u0006\"9u\u0012N-EEBu\u0014w{@mE7b\u0007u$\u0017\u0014\u0013\u001dH\u0014ԋ34q\u0002<\u000bѢӴG/ՋCzY\u0006qA\u001cJ\u0012'\u0011璈~\u00031`$\u0007@\u00129`$%$[#<{Ko}pKG퇯y\u001cc\u0002*\u001a\u000b.-[\"2\u0016\u0001ЦۙlK58LRp[ NbrٟY]Yey){Z;M-^RݫEQy\u001f2i4,FLz\"&)Ʌ\u001b,i\u001dgǱ\u0007A`\te\u0000[:\u0017<H\b[-\u000b۷\u0005:\u0010l\u0005\u000e\u001d\u001fiv-ߚ\u001fRTLKE0-֪U\u0001Et\u0012oVZyj5.N\u0012UGBf9\u001e\u000be\u0010\u00166f^A\u0005d[Ӽ7%͙O߶#+#Y\u0007Meqc/\u0017PcEU3[ԏ*\u0013>H.W\u0005nDqXq\u0015l[(X(\u001f/\u0019)\u0019Η\u000eI\\9\u000buBd곐$ܝwN=\u0019\u0015\u00034 j4Q7-*\bZZi|I-p.ùv¶jªwM1\\ܤ\u0002ۂpg#\u001eۘ\u0006p(N\u001dɩgf-\u000b-6ۀ`˳ʰV9\u0011;$\u0006۶F+O\u0001W\u0018@Y\f$b0ID\f1s0\u0019\u000edr8Y2l$GS\u0014j8\u001aJ%O\u001aQp[]\rݻs{%\u000b۷\t<4\u0016\t׷mjl\u001epd^-O\u000b\u0003z5JUVƯ2R/\u001cSW_2R9޶wS7\u0005\u000e\\N\u001cXS[t|W'IiZ|,^y,߹[x(\u001dVgyDe'lZ\u0004[\u0017j\u0011.\u0010`kסW\u00002D\u001cf\noQZԼf\u0004[\u001eaZ\n-\u0018\u001dT-J\u0000Q\u0011]M\u0012\u0005zr^x!\u0013g4괠\u000bA˫y\u000fm\u0011l/}\u0000[m[S[Ƭ+{ܑ֙Ms2'qSű\nq\u000bqu'uOvh>ߪ~E\u0005HWSU\r`Q|t\u0010lB,\u0000[\u0012۟+=-\u0018\u0005\u0014(\u0018. סiޑDD&q4Mԕ*\u000e\u0002L`[\u001aDl=\u0015\t\"\t\"yo>l'l&ze\u000f\u0018p\u0011o@$G]]/PRNC\u0006\u0019lUc`9_.%fSb8ܟ\u001fH!oL]\\\u0013s>\u0018\u00118\u0010#)\u0014HӤ\u0013҉4Tj4U\n\u0017O\u00036mp\u0016*J\u0003[ʝe%YҲY2\u0005ۺuB?\u0003[vY8\u0013n\u000bw\u0013U<\u001bTstu%wݍ;'|c4z4{<\u0014\u0019\u0019\u0019\u000e>\u001cM\\wئ[\u0004\u001a\u001dUCm=\u001f\u001cۙ.ͼbe\u0017=˷/V^\tCQE_\u0015%Pe0u/O'tj\u0005\u0000[\u0007\u0003[\u001bc\u000e-]l\u0004m\u001dTZT!\u0015v\u0018xɣ,oyJ̪\u0016Ԑ*b\u0015;煏̊\u0015W]p\u0017\u0018ނjs~\u00129ض#\u0003\u000eϑm~kM٪[(, /X';_lOr;3[\u0012\u001eW&<H_vbXqm؋b\u0018ێK#J\u0007򤃹9\u000b\u0005Y\u0010\u001cg-C;iSw<;̓n\u0003\u000eM}At:SET!6uJ\u0003]\u000fuD~\u0007p\tyM I\u0004L3y $A\u0013\u0005\u001fA\u0011OQN\u0014P\u0003$9(\nr\u0002\u00068D<s}\u001ez'W9C\u0004;BLms؝qg\u0000;X۾\rccW|grv\u0018\u001b\u001aF\u001fӭ\u0015U'U\tt$\u0011s'\u0005v*hޖ\u0011\u0012-[ms@\\=,UEQ<BU\nb'48\u001cj\u0005ha\u001a\u0011֪tޤ0J?9\u001c\u0002S\u0007iĀD\u001f\\/1%NT]\rXmѶȹ\u001ad['\ns\ncQ`#=\u0007\u0017.!@7\u000e+]؜ް;ꢑW\u001aj}sw}'\u001dl\u001a>h\u000bS<n\u0019+\bw]rjGKY^lFcYj\u00056\u0015\u0012(Z\\pGCC=z`Z;Uv\u001aER\u0005Vim\u0017x\u001b/SʢQȶ\u0005B`=22eJABCQ\u0011d\u0007daA\u0000o\u0001snZ7om[kyMZP\u001edyia\u0002X\rpxm7NWM\\[/\u001fˑ]\fﶈv\"nSM\u0016L\u0016Dߢ1ʆ(ڶ\u0003mӶ\"$\u001dH\bV\no\u0005f!\t\u0002WЙ \u0003\u0013zQ^\\\u0017ׁm\u0018\u0016|\u0004@b?7]\rcƮɱalj\u0018\u0000&]ڒE_\u0011*z*ٹ:Tԥ\u000b{\tm諅]9Q]-%8}\u0012\u0002TJ9R!<RΫ\u0015|Rx,Fؠ5qθ8q\u0006_P\tbq\u001cIMd\u0003z\u001a\u0014ɀV2\fa\u0003j@\u000e>-٧#\tGrV}\t!֩(\u0001oՔpB[ۢ\\\u001a\u0012\"j\u0001\u0006_\u0002*kt2m㧹[zF]m<\u000fm|\ftgW:_zq]15mƊ>wIg撍G\u0016|k\u000b\u001a4z<+\b \u0005\u0016o\u0010l\u0003ThՖCJ~)V+UE\u0003`m˕\u0003RN[,~&\u000f=\u0010\u0015K9mx6,'iڞ6\u000bug\u0014rg9\u0007\n\u0016IX(ؚ\u001d`[J+k=mn|Uc{ބ#`]q\u000f\u001enS=غhʛ\u001b\u0014W7D]Z\u00171&bhޕm;3)fHή\b/e\u0010pn1IԼX-R\u0015l\u0014C'\r\u0006\u0003qX\n~\u0014lRE-amb?7]\rcƮɱalj\u0018տ:Ok\ra4`\u0003z\u0016\u00158ν\u0014xː{L\u001fv(\u001el\u000b429o\u001f)!8$\u0017{@\n\u001e*#x(K!\u0011`MjQ[3^\u001d\u001fޛ\u0014ޓj\u00177iF5\u0012'7\u0010felTO\u000eZrPGQ\u0003y@\u001a\u0011\u00039#\u0007RA_OOt&\u0013\u0015\u001a܊l\u000b[- NX, \\m%YZ\u0016ȶyi9\nݣu\u0007>7|3<5ddR\u001dϯ͞?pǛ=/{zɞmݶ=\u0007\u000bN\u0014-E\u0017:ZU.h\u0014T-PuҤI6HR-V\u0003S\u0017:BV-DU\u00142J\u001ev-\u0012.\\Eh[$rwK{dhPt3\u001e\u0005\u000bيP\u000789iey\rhu_;pw#Cyr\r\u0002sg\u000b}eO{e3NW\u001bV?:P6ٻ\"|d\u000eo?m\u001b=Y\u0010sonVFbbmHN`6VFVڕIv\"\u0012`v--LIgg%gL'\rax;Ix*-mcAO\u0016GXm\n\u0016m,k\u0015alj\u001c\u000f6vL\u000eccWè-\u0019hK< F\u0005\u0016$G3\u0010}\u0019y鿵&\u000b{{Q-YrmyJ\bCra9\"W\u0015ɷ+\u0004\u001eX\u00105\u0016ŉD?IOk%Z4\u0001gb\u001alhHW,TE\u00031aN\u0018ȉ4r,\u001cM%SC\u0006\u0004\bdC5v\"%\u0005Pk\u000e\ru\b\u0012.BOGrmʺ\u001d+{j\u0010low=\u001ah\u001amy2~\u0016TݸŶ';ro\u0007#?>\u001cׯw.oL9\\wW\rMǽԍ\u0016\u000e\u0014H]\b3nQVmm\u001dASB\u001b\u001aJ\u001a\n\u001aZx\nVm)~\u0005vPZR\u000e)HIrܽQ<,$\u001f\u000bYDpMۍ3Yii~e7r([y\u000fR-vi\u0006yaaJ?]:m3\" >ۗ4+\u001b\\Ev[ē\u00071\u000f?Q=@]>\u0015l\u001b[y\u001b\u0014W6F\u001c͕\u000f-ڶ;\"(J\fd[P-֗AY$aQ0O\u0019M`[\u0000\u0015Ћ(\u0014|(!yR06v5L\u0007\u001bz&naT6_AMy\u0000Xw!\t\u0010r'o\"9DHnPb\nހ]^]#'\tn\u0015ܗ\u0010 \u0004ANU-ֶlw<o\u001f\u001f̘I&y003Tנ\\\u0007݌$\b\u0017\u0004W\u000b[~A,\u0017\rU\u001d\tHc\u0007sL.fa6\u0001\\r0$$?<x>r!\rضFJG#鍨Hc1RJ-O\u000f\u0016.+YN\rs\t]ýdZ\u0016T\u0004y\u0004\u0019\u0018Ȉ2yx+&[`\u0010}V\u0004[+\u0012.LB\u0016!EZ̖\u000enZ~\u0007vw\u0015\u0006jn:;Zt䛶;΢[MSwھ{zGW{rcK'@쏺n\u0007):8bޠ\u0015';dL7KC1\u001b ٜ\u0019!&~,qPb\u0012S\u0018e\f\u0011\u0006I\u000b&?p\u0017\u001f\nw\u0017j'\n6\flR\u0019ى\u0014$j\nDhr\u001cdSMdՓV̈́M=FbU<\u0010=\rU\u001bm\u000em\u0006mٚzI9a[c&sC$mJV2FY4-דE7Rжɢ+k\u0005ݫ\u0005]I$u\u0015i%.S\u001b9Uek1m\u00191sK\u0019\u00001\"m4(Y\r\r6z\u0002VI=*\u001eQ\u000f\u0003ʂ\u000f-\u000eΊHF$HItm|?7^o5ޜo;m{sxmxUF7gu|Y\u001d\u0006D\u0000VǯឺRD$\u001d\"\u001a\\\u001d\u000eB.N\\\tgyZ\u000e>6~\u000e)\u0013\r\u0003☍Oܠ\u0012pj|zB:m]\u0004a1Qh1.Ș *g5X5RZقЂ\u0012)Y{xG4ݪf;\u0016%\u001b֡`\r\u000b\u0004>\u0005\u0013\u0015a&\u0011f\u0016AZ\bJȀYYHV\t\u0019V\u001fe\\yk@E쎕.+7}|yݖ\u000f;+:+\u0006/\u0016t\u001dac_kjo_\u000eyq柳|z[\u0017^ꡎ\u001b=E\u0007\u001dKmfSP\u0014|s\u0003l\u0017J\u0002akl3MZ+\f\u0011Pm[\u0003\u0005[=Hl+\u0000ig\u0005?c\u0016\u0003G\u0013q\u000e\u001e)'OI\n@~\u001fp\u0014#f\u0005\u0012jԢ\u001c7+`\u0002-\u0017ٚ\u00179Q9iM\u0002)3l̬\u00183GM\u0011>ޮE@%/̻\"\u0004\u0006(\u0010:h۞5K|h\u0004n\n=S]\u0015ˮD\u0005\u0001.e\u0014b%1B܂hz\u0006ӄU!۪BO ~N6e۵MdtCTokƛmͷzoη\u001dͷ\u001a\nVǇ\u000e:jgj\u0011\u0013\u0000M\u0010vJ\u0002Ո\u0000V&k\b\u0005B\u0016?f\u0000eg\u0007sI\\\u0000lì|gaQ\u000b©eiv)#-ErX\u0017V\u00158Zd\bz4dAhU\u0004B\u0014+\u001aw,9Uж\u0017t!7)5H l\t$\u001aEd`[\u0004֍\\d[\td t\u0011XfϰE%\"\n\u0010e]TqzXzU\u0010\u0010Qwîҁ3ݥ򳛎\u001cG3-C]U\u001f_{3}߯LS[G7>}Y\u00010P{2k[~\u0002uk\u0014\u0014jm\u001eJ<g9\u000b\bx,$\u0018=`\u0006\u0011\f\u0005a[@8-\u0011AZv\t\u000fa\tm\u00032/\u0000%\u0005ΜsmW\u001f}c6\bЮQ\u0005\u001a3llTz<[=<;iU`cVs\u0013Q>jVe2e\u000fH\u001d+D\u001cz\b«жk\u0004IKIx*#[\u0017϶/T/cǲʵr-@Ye\u0016ǰb\u0005KmiQжgTjIe\u0005\fv>v^}0\u000f?`5YHR#6,R\u0007ߓ|?7^o5ޜo;m{sxmxU.zT ygQm\u000eY<#ѻ\u000f]%^\u0012**[B%<B|`[\u0011\u000fL29жf\u001c\u0011\u000f\u000bNCé\n)FJG\u00173\u001c2F3TrVI&g)X*XC$\"Z4\u0012\bWù\u0014m\u001aNOB&a\bB:1\u0011IB6\"ޢ*\u0004e\u0005\u0002\u0001\u0002ނ\"ȶ NvvG\r\u0007>=gPGpOp\u001d7\u001bz+r؟\\sܼ0r\u0005'\r\u000fT\u001e\u0005ڝ\u001ai{?>\u001bKc7\u001a\rwWi-sۓtrSzd[=y&lgݰEE\u00117\u0002n`\u000bYL1\"؂\u001bd\u0010)2D҅ND\u001dH;q\u000e860y\r\r\f\u0014v:f@\u001c/<+\u000ec0|̘GVG<V5پ!scqb#S\u0007ƭ,xj\u0002RZU0\u001c$\u001f1(F\f'\u0019G\"ړK\u0003[%î\"~Npyw\rj~g\u0012ޖxM+y\u0015ܺ8NrدӠ&\u0004/\u0002!#\u0001\u0012\b9aN΄$C\u0004UEn6b\u0005\u0002\u0004\u0010XU1+\"\u000b#\u0002\u001c HHmAv+ng۷?!Qwo\fw\u001dO~3\u000br6\rʀpO\u0003\r\u0000Ɵ!Aޮ\rrL}\bǗSwSCsrww\b\u0005qxG\u0012A@|/\u0016\t\u0018m4\u001cΖ\rޘC1iW<kPm޶:\u001aH\u000bdL)x_o\n\u0012z\u001aۆp6m\u001dS@2m*g\u00163l2\u0006\tm[#\u0013\u001b݈\u001d\u0000\u001e/r\u0017y@L\u001e\u0007\u0001ld\u0010\b\u001b:KC\u001d^J\u001d\"RcK\u001d\u0000ElnP!P*\u000f3#H \u0004\u0014\u0005\u0000T0\b\nJ\rP\u0018wYsFsڥ֕Ɏ.,\\jQt\u0003`őK?\\ieoǟ,\u000e_\u001cjRW<ZeuݑG_=PLS'Z޳YSvh>\u0006 U!\u0015/\u001aHd\u0016m)߶\u000fI\u000b!-x:x)!q\\\u0000\u001eJ\u001f$-\n\u000eU6\u000em\u001bK\u0004EJ1x3\u0019\u0004\u00143L\u0014\u00126\fX_8(hEfaQ.\u0013w>Z6dZL#ߨH\u001ez%k\u0000j1\u0010Zt@|?W4o\t$JuN\u0000&p9qI`hh=\u0011h[H`\u0014b0zWsgsG\b=zfc3`WOy=`2L\u001c\u0018,\u0005{6a\u001aðԣ%\u0011ym-vl\u001d\u001eh[A\"#(L$\bEB?7F\u001b:1eC7u6t\u001a¶%lQ\fP\u0017Rw\u0014dSӊ\u0015&=\u0002\u0006mˀ!\u000b\u0001ުĶ'{\u0006ކ;`?pk_;vӶ\u0002&\u0017G;3h[ENR\u0010咔-2\u001e\rv̗6K\u001fFhbrIɲV>dZ)A,k8\u0003N\u0001T\u0006rm\u0005W\u0007m\rqqUҦ\ny{\u0003Ǡmjgշo|7Ƿv_|չ\u0017?7`TяwG^ח\u001fu/_o4`DMZ\bm\t@Z\u0015\u0017\u0007ʠaa:ؖxxZ>\u0000,^gX䄩\u0015q@\"=l\u000bcrw\u00012\u0019V:B7m\u000b.TH\u0018$pItfA8@I\t8\b\u0004'l\u0012\td4ܬO}xWyYT_Q- \u0004OQخuMƹaG\u0003=,<,\u0002|E`85\u0001Ns'9\u0013qXd,{:\u0003{3?ĿȟK7\u001c3/;dV4(ti^C\u00196mV\u0012h\u0016^\"-q{\"ۣ/\nc\u0006XzzJs\u001aG\u000b--\\xжۃ(vɎb`[w\u001do\"\u001b\rƘCٲ\u001bs:F\u001b:Qek]d\u000e[Fn&iS3\n\u0010Grwpw.mW$\u000bN\u001dжLm\u0001r\u0019pFk8\u0013x;pi\u000ec\u00026h\u001e`\u001eK\bv<b؈ض݃)r\u0011{\u0014\u0000KbZʠ2$\fy#F\u0001imih>@+~;\fLx\u0004\u0016\u000b\u0010h@\u0007-',m`6UزqG7d\u0007vgL[h?mˣ-7jS.^]\u00032**`̳ߞד;ҵ_44Ï\u0017|7#?q삶lБ΢OSOdF;ڀ9cSW\u000ejmj>\b\u0003<[\u0016\u0010\t<{G\u0005;cZgӭm3aV0g8&l7\u0004L\u0003lLA&\u0012爍#a㝰\t$X\nLe[ƀdCT$,h̯ȭuU\u0011h|u2\u000fqQcB\u000eE\u0007e\u001c\u000eZ\u0004W\u0005==kU%^rUlϯ\u00173JOV:Wbg~=[j11\u001c,\u001c\\ZBBc$P^bT\b$8!VN;39RE\rɧR\u0002,6\u00178;TGiw:Qfi_-\u00121i9t-\u001b:1c\u0007\u0000\u0000\u0000\u0000\u0000}Py\u001e&1\u0001En\u0001\u0011\u0007\nHC(\n\u000fpۓYVdY%FjOXW{]l[ml{uwq\u000fɚۛe&f/\u0001}'O<߳˘v)\u00132f\u001fi$yFG\u001aA2誖sM\u0003b]:,]\u0004p+\u001ae\rg@\u0006K3R\u0003鴔'eس\u0018YSp̓\u0012\u001e\t\u001a\n#_FHº3{\u0012(md\t\u0011EB&\u0006p4ٶ\u0019E$Q\u001c11!Cqa\u001euG\u001d\u0005\u0012\tA蔀>#_\u0014AY\u00114#O\u000bCcɐ32qe\f_3p[ 3\u000b\u0019\u001b_׸[#u \u000e\u0004g[XfV\u0016\u0007-,|}lCh+9,m\u001bۧo?a[eQ(/8oH<c-(\u000f\u0017r\u000fh齹/\u001f\u001dkoo}=o۽\u001d/Ս5\u0017vWf\u001e&U\u0014\u001cl\u0014:M\rܠsrWmg\u001bTd q\u001cp\b\tH\u001a6w\u0006n9\fnK\u0018*\fo (\u0014\u0004\u0000\u0013\u0007A8e\bNIWP̧\u0005JH@(\u0010%\f@\u0002P|CRa!~Tzֆ;?wMǼӻdTCOd]{j;=,]yUxDwP*5Wn(fWjeZI,Aq$oL+RՖ\u0014yѲ\u000bi+.Vt5޶k@۶c:wca\u001emv#v1~sNQexW'\b#\u0011\t<:\u0017*H\fcZ\u0002CmP.eiiUe!)e$#E\u000f\u0016\u0018H\u0002[(?/C~?Y;\u001bgg;ng5nӳN:\\=\u0004T;\u0000Öq\u0016\fz0iY`^W\u0012v$\\\u00155gP\u0006\rH\u0017\u000b6a_-\u0011U\u0004\tD\fQ\u0004cA1u\u001894\u0010P(v\u000f\u001bvF\b\b\u0019@B\u00183B\u0010K\r30q\u0006bF*`[\u00165l\u000b\u000em\tc\u0003#\u0017q.l*\u0016ޙS]\u001d:%7\u000eW̶{\u0017&.zq>\u0000_!ne\u001fJ@!\u0003Z,?\\\u0000Ë}GO>;sޯO9׹0\u000fms{K'+zMY\u0007vWh\u001aƻ\u000fs\t`sWqWY\bcq\b\u0000lE\u0012jYj\u0016-xK8ٗ\u0001ؚXx\u0003 -\u001dW\nᐉ\u0016m1=\u0000$\u000fa+Gx\u001fJH!\u0014\u0006\u0004\u0001m\u00058Wr\"F(_CW_݌?6\u0011!^o4\\m,'a:J΂y\u001drYCqaVY1IDDTg\u0019x^3iˮf/&_ޫٳ\u0015m\u0001~\u00100v}yͿ}'vo\u0013f\u0019m14}\n%Չb^j\u001aoF^zR\u0017Ώ%4l\u00115YPwBt\u000ezn-=&6oVPS*Sʂ\u0013\rdjUǶ?[ǍY;\u001bgg;ng5nӶ}.:`\rl\u000b~M\rH0=:=s\"r.qe\u0000l[\u000e ,DmuvZ\u0013Iu\u0012mG*%odL\u000e\u0019MRݱؐ\u00031\u0014й8p<H<m,\u00016)\b\u0004\u0015DE\u0011}:\u0011\u0012AN\u0001i!x\u001ai\nW/\\\u000b`a\u0013j؄E\u0001l\"ԭ\u0000\r\u00044!u:Pd:JkM[\u0013{?hT[\u001a\u0011ט%ڝ+.Yۘ\"Q\u001cE\u000e'|/vg\u000b?\u0003g\u000fz?{0bh{G\u0007><hlקko~\u0001\\v%kQ|.\u0018ZYV.\u0001\u0011\u0004\u0018/\u0003e;aK@`\u000b\u0016i['lap6\u001c\u0007\u0005\n:D \u000e\n(m.۪B\tx\u001f>m \u001f{\u001219DL+\u0002*\u0018 cD_$\u000extK\u001eOEƀH\u0018`[pP\u00176k]ź#\u0015\u0019KuҺlIuؔ^QՎ$mYvzE+ڶa\u001cw\r\u001b!M;v\u001bA?T\u0019s|:\t?:-!rCBTJ@&\u0016劓<yRLSr9jB3P>\u0014Vh\u000f/an\u001d%\r4aU\u0007WSȉ\\wǶ?WǍY;\u001bgg;ng5nիu\u0001\u0002\u001d1j`Bet\u0004j]_,l~(p.ުW4\u001c\"NӶRF\u0014-\b-뼭\t,:\u0004\u0005 aޒ\u0000R\u0012FF((X\u0005\u001eG폧P\u0006cBhyQ\u001em tB\bO\t\u0013BhR\u0014:\t&|ft\u001cY) \t\u001bPe[86\u0012rANֺ)<\u0010ꕎ\u0016fhn\u001c2骺g]8h\u000b;Yo53\r8\u0000A\u0012 H\u0005H\u0002z)r\u0013((!\u0004\u0012\u0012\u0012 (!rGEEP*\b\nA\u0011PA\u0005WE.\"\u0015wn+nvl\u000f\u000463f?ϼdNf8̙_LPv~o;>K\u0015|wY0C£\t\u0003Y?\u001fǾu/\u001f\u000fW.?\u0018j(ϼZtnv\u000bUOt(l3\u001fzVe_joȴ=d'T\u0005,㣤\rq$\u0016\u0011g\u0018lгip`F\u000ea\r6\rUvIg[ll*e\u001chH\u001a!\u0010Nuy\u0012\u0011OIDR\u000f\u0010Q$IA\u001eh`:#L\u001c\\,e:=Hr%'I$*ՆvciXܙєސ;Wk\u000b5\u0002YLM'toS\u000fVZkI](ms\u001d.c]z\u001c_J*JNOBdpE\u001ai4\u0010n8vmR&Xqc0P(.\rӈ\u001f!:u\u0002;9Y'9\u0001)\u001f)\u001b5~]\nKHXFle{XmXsVoٶcVcUa]\u0004 \u001ed\u001e\u0005\u00106T-\u0002ch9wRm<uQn\u0016\nW\u00172\n_\u0007\u0005ޞ\u0014\u0007@\u0001o2ܶ-mP&ZxK\u0012y\u0011%KR/EVPT>h(?hH(ᾧxB;W\u0002u\u001c7\tV5ҳ],Lӣ\u0005d3rp۶g9- `[p%\"f\u0001rfoYSp:m1A{i\u0007pӡg\u0017TύP噝2\bn\u0015ʯ\u001b_M~;}o\u001e|ǽ_3{u`?_=w/U6Xwǝ%S\u0013\u00069\u001fQ\u001dE\n[*\n0bj9\u0004\u00058Jxtp.W-\"Ŷ\u0005\u001c\b\u000bqy\\6+xh\u0016\u0006@զ\u0007@В|,\u0005،x\u000f絮\u0004\u0010m\u0018At\u00062\"wg\u0007Q\u0001&8\u0003\t|\"\u0010%\u001eNb4I\u0002ɰm=IKA$򕚌&9K\u0017A\u0019\rE.\tp%\u0000vSzT&~<\u0005בxdjSϛhK1L\u0013\f\\Pi*T\u001d\nEDE\u0010\u0002֮\u0017\u0005*eH\\()+X\u0001~4a ݱ;Xs&RS\u0002\u001d*([N\r!%a\u0005f۟(jƚmͶzkζ\u001dͶ\u001aʄ\u0004;\u0004\u0000J\u0003 \u0010\u0005\u0011\u0005j̖\"r\u0016:5m\bU\u001d\u0005m6\"6\u0003mAu+0\u0002\nm\u000b\u0010ږ\u0004x\r(}*_yAٵ\u0001^'B}ƅ7mh\u0010qhcء\raƬ)\u0015D\u001aNtƆ- \u0017L\u0003m\u0010[\u001chy2`0@<p\u0019\r|1\u0017\u001fp9n.d\\a>\u0015=C_|npէ*\u0018ΔIe|7uX@sEA?qj\r7S_O4}~ؑX\u0016a=б#Z4yQOGV\u0017#5UtM\u001f+ל[gJ[nu\u001dg--AϐXH[\u0004\u000e<[\u0004H\u000bl_\r\u001c\u001a\u0000Ws\u0001ll\u0017@Z9\n[0l\u0018I#\u0012i\b\u001aAN\u0014y8'C\n=\u0000@D\u000f';L\u0004lIxLԓ$[JJb,ʛPվ\u000f9]]\\n4\u000ewOc7{iw/\rw#VK\rarˀ16v)[fT].V^T(6m7lޜ/\u0014\u0017kt{S{#J`\u0006a@]Q?d\u000eS&bf*\na\u0005!\u000fm0jdd{XmXsVoٶcVcU\u0010N7SR\bH`\u000f\u0002aۋ\u0004-{\u0010V˽\rt5k9fԳ+p1\u0018&,\u0018\u0016\u0004l;\n\u0016tZl{|mA~mEAu\u0004&Q(d\u0012sAEFXd\u0019M\u0005RۓE\u001a&A-'O,$o޸uú,ATz!>6\ruق2a\u000b!!\u000bmk\u0016`:\u0010n2h[,.ci׎g\u000fdm}^0Y\u0006\u0010tH5C=<Y_\u0010r\u0019?TN̈́'恗8Zm]Qw#9\u000e\u000eo͋ꨐKu\u000fJ?\u001dxonڹm1M\u00158Ѱ/TT_o\u0018\u0016Um)J`K\u0018l\u0001iC\u0001Z4z>5lhy\u001c\u001am.\u001d\u0011\u0000\u001f\u001axti\u0001L?\u0007v$?Z+,¢X\u0014\u0017\t6FXK'\u001c\u0013P\nDssJ\u0000M\u0004y8Ir/,g\u0015,2<[xKQzS>\u0001\u0001&b?č+\u0000cqŸiLi`[ݸ\f7\u0019/5/p<(``;tl'c͡\u0018S[aהj}΁\u001cccֶ\u000fU*B؃(ޕ&ѦW\u0007\u0004r\u001fpS/h\u00074&/|[[\u0004K#D:\u0000ۮ\u0010\u0000iA<8`-#\u001f\u001bu\u001f<3\u000fx8Mp\u0004r\u0002\u0016K]P\u0015Trp\tF!\u0011DG.V\u0005QYQ\u000b*\n\u001e\u0015-U\u0003QΊZwӺ_8{7a!wyx$<o2|\\6h\\9tFmѻrlѸTF\\\u00130Q\u0014`{L\u0013NVrZ#q\u0016vذқ\u001fv#[\n\u0017[,\\u\u001amDӶ`OǼE\r۶\u000ev\u0004y{\u0010Mbr,$!3)1;\u0001h!LOZ('C)7kl;_%M¹I\u000bQ?yJ\u0018d\u0004͓!ȆmR\u000bm\u000bM1`\u00079ykUm\nAiLHvKϮ\r\u000e\rZeës\u001b\u001c[qҼR9jLW\u001b\u0013ȉ_Z7;cR<] \u0011Ig[fKW*\u0017\u000e4.{vs\u001b~nYDW>8^-6fUn\u001f\u0016iKb\u0016T$_)\u001dٝ9Y!Vm!O6LaBy2WI=C\u0012T\bئ@֗<T\tf\u0001o<u\b+Oqx\u0001\r0T\u0014@-\u0004i\u0018@6\u0018`JEe\u00066\u0016J\u000femږm]\t6ytR\u000b=\u001e)m{&~٣*\nyJy\\xp`?4~3|LaƯs̖J]Z]Z.uZ\"˸6e\"E&\u0006u\u0011\u001f߃^>u\u0011^5\"jwI\u0005ނd#U:yɿ$esƕsOg\u001e+瞎\u001eK;\u001e°=.?hvVrF#0(\u00007\fȭ\u001f6\u001b\n\u001d~!\\-Aކlx\u000bu12Ec\u0014t\u0010ِ,\u0005HV'\u001f(Ҷ\u0013$\u000bNH\u00122f\u00050\u00121r\u00041\u0010\u0007oCٙ\"I.m9R[SUTd(J$4eN\u000e㒑5b\u0005Z|\u000b\u0016\u000b:\u0002\u0005r\u001c\u0016nHZe>^V9\u0019\u0010Iܾ\"C˟5\u001c:}ϔϳL_1BX\tK\u0011)_]7\u0003i1\u00010\u0019^~y\u001f6-OUk\u0003>=ũgk\u001e\u001f)\u001blX^mA6mGvY弒\u0011;ØdaS\u0015\u0015\u0000\b\u0000<2\u0019a\u0012X8\u00186[͒pSG6#L0}\f}\u0012\ns\u0001۪Y:\u0010n('MO\u0017\u0011Pvo\u001a\u0012.B4\\\u00106\u000eb\rb$=\u0013x\u001bB .\b\bf\u001eugWsoM{\u0019\u001e#;rGG91J\tY3\u0017=TguN֥3t3/)\u0014-\u0015քs@C%VVޘo;ܴoJ?\u001aMޗzěz8Ne6S\u0019|\u00194f\u0005\u0001\u001d`zHyh_Qq㲹Gʹ3jsޕsOesƥjtږm\u001fG^L\u0011M6\nl{F+>\u0015\u0001r\f[mI0Hzٍ\u0011ŶU^\u001ba+ضPQ\u0017Q\u00072d)\taނm\u0004|\r\u001aE\\\u0019T19t1#1ӟAvn\u0010S\u0003M\ragegz1g5)ɳ͉3DL1'[ѣz,\\\u0004`[\t\u0017`\u000b>\u0010x\u0005\u0000:6\u0004D6OlK\"\"\u000eSvuNwE\u001e\u001f-{rl`[5\u0015i9oۿs>,7#\ncd?;\u0000o6χ\u0011\u00065\u0006zOќ֪E\u000b\u000f.}p\u0007Me?5,SUcQmib8Pms\u0012TmRUKږmKV@\u0016NLN\u001c%سyR\u0005\u001bNŰ͖8\u0012qSF6=L\u0000n\u0005\"B\u001a6\ram3$D)d\u00008\\,AJHB`\u0016IZ\r\"-^I\u0002oYU~]9^<\u0007l\u001e\u0003\u001e}fJ<J|Jr7ґDiM<\u000f%\u001eZP4d.ya*\u0018+ݎ\u00169r\u0007qh}\u001afz-C;8½8@5{W\u0005r\u0005c\u0012|y:\r\u0013ވ\u000e9IWwaŰ}ǳ}پض*?o%DGO\u001f%\u001f7.{4{:6]9t\\6h\\*\u0012Mض\u000b\u0000m\u0001\u000e۶\u001bض\u001f\"ð]?\u0010yۮ\u001b\u0014ضP+-ö\u0017QQضضsd;g\u0003o?n\u000bh3\u0019_\u00050\u0012\u0004\tALm\bSj(;},āɖ9Ię\u0007\u00139\"m\u001d\u000b^\u000bC\b\u0014.ܼ\u0011µ9s \u0017o`,R^.^-2lC$\\1{rN@Ò\u0007Mz;\u0017\\1>߯{V~FWg׽yEXySoO\u0007~}6מ|eN:{ҾtoX۪r/m̹kU͗qC\u0018d*~ó\"ó`(Z[t\u0010t\u0016\b`Tm..\u0007\n'b\u0004[=\u001el+fJPpoSCQ\u0000[\u001d\"d6\u000f[p\u0014k*JD\u001aÈ#hP,:NQc\t\u001aI5LZ5\u0019\u001e4\\\u00010;͞\u000fV{/\u001cXџc\u0018ȡd\f)=&ʝ4J[\u0012e|PgCF>d=\u001fu\u001e\u0007p<\u00037o8\u0004B8\u0012HLn۩\u0015TC#+\u001b\u0005.^UģV\u0007֊#\bʥ\u000e¢ؓZ[;v[jy\u0013W\u0019ޙ<\u000477w>!\u0011WU#*ҧG96U\r\"}c\u0001{o\u0012\u0005ksW\u0016sx\u0014\f:\fw89i\t\u0017#BZ\f۩Ԍm\rmcFCؘ9f:\u0019\r`{\u0014\u0016V;e[mA\r\u001dQ\u0001l۱m\u0004[\u001fh\u00186Ey;cmyl\u001eۨ=klۉm\u000b5\u000ePX/~m$2xo\"A-\u000fwcF]\u0005qz\u001bIR2$\u0017)Z\u0002!ފ3<řl\u001f\"Bl[\u001fm\u0011\u0016c%K-%K|%&_\u0002*\u0003b>ZK.\u0019n\u001a{򾊋;L\u001d\u000e-O\u001e~z\u000f\u000e\u0004vn~xuwxwwN^\u000f]zpxoXKXseCo7\u0016l;b%aư-%\u0001iXxSF-G\u001f۲΂\u0002Y([B\u001c/DZ(\u001bmmmSѮ\u0005\u00126\u0018\u0016lw\u0017\u0015ۖ\u0012n\u0002*\u0016.\u0005UדH\u001dy$'H¶Ɖt\u0005:w|u|\u001b\u001f\u000fM\tF̳+~5^j7o7k\u0007^(Fl`%&\rkՓs~\u001e\f\u000e\\S\u0017>\u000b-uż\u0017v\u00164!:8:\u0016ph--\u001a\u0013ל\u0010e\u000ft讴?nd\u001fIbS'r\u0017kXj\u001e</\fy6f4tΌ\u0019=cCۘ*ʶ'ȶK1l\u001fim\u0016퐍mjmm\"\ro}9m\u0011o{\fn\u0003V\u000b¶=\u0014l\u0002Yl{\u0000vB\u0019)\u0000T\u0002=aNpgb\u0017^\u0004[W\u001e\nd\u0011hJ6M\u0014e`ަcfy\u0012\\!e:%rnzS-\u0014\u0010i׬\u0014*\b\u0013a$E~ɏxUƭ/)8z\u001d%\r\u0005'~R\u0011~_{7oDz\u000b>;^sޝ>޹fuQsUl?]6ּ|\u0003{zN9<,kX\nb\u001cWi\tm\u00124۪m(PٞD&\u000e<\u0005\u0018xH;e,+e\u0013Cq-: \\\f[D]P\n\u0013AqnP)',p\nǹqn|\\w|L.\\\"\nVjvWKYX\u0013%+fe#k05OԨ'5IS#jB7\u0018S\f\u0004/MZo\tu\\'ڿ8Sڲ[AK;6\u0012\u001b\u0004qC8\u0012N[\u001b|šd>w}\u0017Yl^ǪŶU1b\u001e7\u0019\rc3ccFO6f4mOsȶV\u001as\u0003ڶ#Q~6Ŷ\u0017\u001eπlksΈmkvc۞1 m\u001e\u0016\u00160EWbۂB\u001cN`[n\u000b7j6\u000fx&wCJ%uL!\u0002x <1o\u0001Vfњ \u000bp[\u0000\u001d<3^s)\u0002uK1\fK\u0000~RRR\u0003#\n|Q&59R_$Ƃm?LnkOldoy\u0013GW$$h1JqƜKM7[HέΎ_%\u0016ğߖ?bڑ+Wo(ڔz5[kNlޞ\bHI\u0000im06e=|b\u0014\tj}IV\u0012&\u0000S\u0010\nIm8\r ؤ-5\tlv\u000f\"0\u0014[`QE>c`/\u0016aâՅ\u001f\u000frA[\u0012\u0005ƌu\u0004qhvxh\u0017aLt)5^̺VʺZ\u001a5\fv́αR~\u001b(a #\"4s$}axW3/ę\u001b\u000bq^%[r\u001aɶANX\u0012N\u001d@OW\b.]pX\n!`\u0016\u0005[l[\u0007\r\u001fVͳ\bgHㆶ1stfl\u001c3\u001dƌVQQ\u001am\u0001 vd[9ض7ɶiS~ܶ獚s\u0006MQ{\u0016eoMlۢG\u0005\u001eM\u0016l[Tv\u001aQ\u0012,\u000fs\u0005;\"ކ:s\u0017;s#f\\ynX7(hJP\u0012\n\t7Yn\u0015\u001c\t7S&\u0017gxs\u0015dYSNӏ\u0000o͈d/b`\u000f\fX`S\u0006W)_m*\u001bo\u001aW9t<rSeTpk/Z\u0013wpʛ':f?\u001fi[(,\u0005\u001f\u001aW/8bvZk؁%g`l=:kxҿ\u0018Ӿ66V4&\u0016*2٩JIkQm1fj%\ni\b>|o\"ϛ\u00070\u000b+S<ĩ\u001e\u0014Oɔm}\u001c\u0013=$\u0001$e[|\r\u000etBq\u0016hj\u0016ۺuR*K֢\\`\u0012bJ9\u001c1\u00187A,%ҙ*\u0013ex.-e\u0015F\nYK\n\u000b܅$ðO\u00122?Zs]>\u001a\u0014>_l2\u0000h\u0005\u0006#r\u0013\t\u0017\u0002iIP-gĺW}u\u000e%'o\\\u0011\u0006v\u000eF3ϐ\rmcFCؘ9f:\u0019\rl{\f\u001d0ړ~5}q\u001c?[K~|7!!\t\tp)(97.\u000b\t\\\u0018@DT\u0011U[+qvV[˦j\ruj-ssZ(u?I@ז\u001f]{|Η/\u0005'a\u001e1\u0007myv\u0016l\u001bH?\u001d\u0018w*lۇm\u001b\u0018mO&\rv\u0004\r3M\u001dcڶ+_?r30\u0000$\u0002U\nA\u0012ت\u0013!(I+\u00120Qz\u0016\u0011nC9\r#FKDd\u000bZ\u0014u0oG\u001bD\r\u0010r!>bzpn\u0012ט\u001dY?\u0014tu.`uŠ:/\u0006\u000ety%i4\u0012\u000bK_\u001cZyغޮu7YYV\u0019[\u0001\u0001l?}g-ywm]U\u001b_\u0006jCm[V4X\u0011϶\u0016HlIU(Sd\b\u0010l5!r\u0010|o83m=d,\\̂g!YVcB4U#a)R\u001eGYj\u001a*`)\u0015\rsTBh ),J-c2:D]8W+@J\\^JR9RT#.HУ\"ء\u001a\u001810^\u0012~T*M\u0003T>K]/fu|Z/6\u00193LVƆ=KRR\u0005Z%zy\n*9:\u0007]Ǟ\\@w-+YOM\u0016\u001a'A\u0015#B'$&j\u0013u؄9aM&\u0002ŝ\u0004ևm{Q\u001eMضFb\bo\u001f-1m\u000f\u0005\"E\r۶/q<mOA#\"ڐmGy[2m!r\u001b]e?ɏ\u0003\u0019*z&)^\\Hx\u0015\u0015 \\=\u0003µ\u0003o#\u0005Y\u0005%ˠ@mA\"hR \u001a\u0015uIّ\bogs\u001b-lE\u001e1\t1o[/o\u0019\u001dAbo/8uC[\u0003\u0006~d򶖿\u001dk|g_-Ls\fpÁ/\u0003l?yu35\u001e~Z';^i+qΕ_9׻E\u001fl{s;7rdS͈HM%4a҆gYBZx\b :\f[8\u0016.`|\u0016\u0016HޫG2X`\u0011P- %*q1&-*cYuR\u0018(A\u0005pux&\u001d8WRx+%\u000fUh6\u001co`k4`[\u0010T\u0005\u0005Ch$\u001aU#Y]z\u00066rx)(\u0015|UfEr\u0011)2dYL<&\u0005!S\u0005\u0007ߨŶAEb\u000fg=uf1;1GhvL,\u0011cۂj)m\u001fWM&L\u0013\t<\tGs:Q0MT\u0005݃5K'=Cl\u001bL\u001cM\u0011&b&Fx{黼}mȶ\u0002ia\u0006O\u0007Ɲ\n'=\u0011eO`\u001d\u0018|`U1l*v]!7**zbX+j%e:i)\u0018P\u0011\u0012XPu\u0002Bn5BܥM\bq\u0001\u0011UgB[p\u001b1o\u001bmC89\tn`\u0003f9\u0014;5%s1/t)0\\\u001eTߩ\u000f_\u0006\u00066]m(;jS/\u001a/޺g3罝7?+I7?t/{\u001f;n_ؿoӪ;?\u0006o\u001c\u0003o̽rG`^ŭ\u0003:<\u0004\"F<\u001bJBI0f1i9l$[\u0007Ş\u001b\u0002L\u001cKU#a:\u0013Y\f[ eR)m\u0011oY\\'-TӅq@Z\nΙ*j\u0006\u0014\u0007,E\u001bY5\u0012),\u0005Ť\u0018;\u0004_\"kmeĶ4\u0019\u001d\\X%\u0005X@hyD-)\u001f8i\u001a /a泈H1`\f\u000e\u0016Q@Ia*\u0010ijLj7GާwR\u001e&\\FM`D\u0019\u0018\u0002[(MJڄi9a'6ahNX'j\u0013^l[h\u001f|:Hm*!\u0001o&7\u0002oma\u001e\u000f`t1\u0012|Ķضgm=l#]nd\u00146Ԉm\tl\u0001`I1l{;\fVP`<-᭚\u001e/.\u0007ۊVTǄyc*ta\u0002lD<mع\u00007\"ı>#7rabCfT\u0003dA%\u0019A>\u001f\t;/_Esl`9{E.mgMm^\t\u001dY\u001druk>w{giw]\u001dv<m\u000b\u0006Zpe[/mj;qNƓ[\\xo\u0000[Kvq\u001cu9M{>|/\u0011fII,xv6Hȶf\b\u0016 VmЌ02\u00189Z>[\u0019 N\u001cl6Kga\u0002'˴B\u00155\u0013\u0016k\u001aH\u000b %\u0015K\tu$iLȶ:\u0006i!) ם\u00139b\u001aʗP\u0014A*\t\u0014\f)pN̡gX\nŁXD)BL$i\fR\u0004!*\\\u0005N%mY*\u0007\u0016􊠃RIW\u0003gbH20oS\u0005>M&\u0013yb\u0013u6avOĶ!-\u0007m?|ȶGĞm\toϻ͗psFl[l[--vԶgma۞\bH@݉#%%\u0001lU:\u0018\tL$GE\u0000-\u0005aފg\u0000o5\"\u0018dJJuG\u000bJ\u0017\u000f\u000b\n!W1=Fgg\"\u0004c\u0003&.hR@\\-. \u0017\u0002\u0015zMr_$\u001e~cV.ײ\u0007\u000b[imz﫺Y \\k_4\fxHcweI6\t\u0006\u001f\u0006ߒ,Ye c\u001b\u001fI8̀SBH:\u0014Z`\\1\r\u0014\f\u0001\u0012\u00123\u0012L\u0003\u0012Z>+\t4\u001f:C4j%kG\u001e|Vry<{W\u001fڽM͟|znCç뽧罿6~deUM亹'\u001f{¡]_̾dZ8\\V4l7\r,zWk˯{n̽ޒ//\u0013Dch\u001a1[\u0003\u0005\u0012ղ!Y8VTD\u0015\u001c \u0019\u0015n\u0004#F&-cA G\u001aIEZѶHeZ̊xGHsK*t8\u0003QK\u0002\u0017&\u000eZ7ж\"\f0Ӑy$g\u000e`;S-VKB)\fQK`\u000b\u0018i\n1[\b:\u0019 \u001b\u0007M$\u000b\"'M\u001c*J\u0016QJV[HFҎ폔r@\u0015KwJ=l@/:\u0019m\u001b񟓄M\u0018M0'LM\u0018}0'L'h\u0013F\u0013Tv!om\u000f\u0012F\u000e\"oCv\u0010kǎ(~~d֝v,l\u0016a{3\u0001a\u001brm\u000f9wb-EnΏq\u00167\u0017$\u0013ؒ#4%\u0001U\u0003Y\u001a\b\u0012 +_+G\u0016jIExP\u0012zK\u0000tq\u0018\u0018'\b\u0000xn>\u0016\r\b\u0005\u001eBB<y\tđ&s\u0016=|\u000blQ_yJ\b mibk)\u0000슊5'p\u001e9bo۹co\u000eY7\u000bC'ԟY\u0000=\\Y/Y\n.ۊ\u001d\u0000o=\u001aH}ō[޻6_ՎE\u001a4,J\u001dȍT\u0011ز@Z\u000fn+-[vճN=k\biub4X+-Yж\u0000[)R\u0001\f\u0013Y1`gQ\u0019*1\tU1{6\\\u0015NT\u0015Ffy\u001aY%\u00112/8+VcR\u0011N\u0001o\u0011P*ڶT'h\u001bVKی\u00194m\u001a-5\u0011\u0001l l_6V ߢ$PJVP\u0004&@SqMfEGT?9~M,W#bf\u0017&B\u0000maM&&\u0013&>\u0013\u0013\t\t~`~^b\u0003ĶQ\u0003h3\u0015\u0013@OIG|ŧ-\u0016m\u0018NbX޶;\u0018o\u0000o{߶]:q\"#T%MEަ$\u0019j$RN4'\\\nC\u0016 r\u000bP\u0005h\"\\\tt2\u0003mG\u0012\u0003#uy\u0005 u!PCOr?^\u0011+h5ft^k*m\u000b'\u001f\\^}gMM\u0015\u001csrq˂k\u001c\u0003\u000f$Ɣs'wM~3\u001flK+nmjws*n4Th_=\\l_w\u0015\u0001,0 f=OW'm9G\u000e\u0011r\u001ag\u001d\u0006@H[gzf`vɊtB-laˢp\u00193$2*jxi\u0002΀BIifmIOV-TS$\u0015ra|\u00120BV\u0012!wƎwM\u0000oRV\u0011ۦmjuX*#v:B*J$\u000fy1m2\"-JQPI\n\u0012\u0002om\"+:*W\u001e7l?\fze;f\u0013ë\u0016x;v\\V3K\tڄ\u0004stۄ\u0007st6a4A\u000es\\P\bo3G}=?_yYt\u0006\bBغ}#lm?p1Ev߶?nؖ%\u0000I\u0004*)Jt8\u0015\f\"\u0014&r\u0013\"dy\u0011|\u0002m!\nתm8=Sg\u0000e\u0006rSaѵ-*_OC\u000e=}lu^xm?^_p\u0007Kv4iwnFZ\u000b=-ޚ3z֪(ed\\\u001cihU\u000b\\Fx_׊|v̆\u000b\u0003ۿvf\u0002\u001aȜު\u0005u_nhe\u000f_{_\u0018Crxn`,#\u0013=[Ƨ'\rw\u00006\u0004lk2E\u0011d4|bP\u0000i\u0011lA1K$2x\u001a#Haa\u001c<iS\u0003U#-d)I\u0000[2AjLG<\u000bTQY$P\n*Y:\u001asJx\u0007[\f-ShB_B2\u0012<BK`Dĳ)@\u0001NC&19Y!CLV{s$:e/v2\u0016\u0013l\u0012~n6a406a0M\u0018MPgCmb胖S\u0013O\u0011ƣmyƎ\u0011,#xpdl<d6\u000eA37`<h<`ogc7\u0004l\u0007Ŷ\u0007x[1-\u0011ۮ\u0007\u000b$T<Љ\u0016\u0002(e0`tf4gl6/\\,OCldJut)\u0011c1v\u001d\u0016k7r\u0002o\u0013C2n#zf`'Տk?Z᲎\u0007KZu4nn\u001fV_\\:MMW\rvwV\u001aJ7?A;\f\f;.\u0013֋--֞ݻyz9R_qjVM;[޵\u001fXYő1kdFad}\r\u001c\u0001i\rHZ-\u000ba\u0011ؖFiydd\u0016\u0003\u0016mkT$D\b\u000b\u001e&`\"t(`W-\u0016\u0004))xUgyA&z\u0016Vl\f(\n*]IAF\u0016>X&*Dac\u0000žξ\u0002Fʫ-\u0016m7oh(*\"\"\"B\u0011E\u001aGEk\"K.w%w\u0017͵FQ\u0011{73,izI_~NY$1\u0000[T=\u00063La\"T\u00126^ʨI2/Z.m,\u0001WhOZ\u001c}\u001byF\u0013y$F)stm2\u001d٦FVmO\u001d(W̶^-\u0013gL\u0019l=a}>m\b[ID\u0011`./\u001e:\u0011\tbִ`ɶ\u000e(\u0011\u000b\n\u0005\u0000B(}G\u0001܌\u0000.3\u0011ȝ!\nV}M7Ӧ˲\u0006\t6\u0014\u0004\u0005\\#CnI0\nWZ \\@PFE` \u001c\u00178B8_|w}d_pGMCMՃT^_~rUKZ2ɚ+{Wk.{\u0005&\bT[26\rttSu:X|/w¯Vu[wZ5\\sAۖ]̰spæޅ\u001d\u0012`i\b\u0015\u0015Վ\u0015M@ZvCڬ |z3m\u0002d[c\u0004i\u0016M\u0011\rrR-LD\fA\u0000q\u0000[?\u001cS-\u0006\u001egG\u000b}$\u00163\u000b-\u0019|\bd:US\r>Su>}b\fx^%V&⨁ܤ~߀k=gX:2[?3T3`\u000bE\u001bT\u0011:S\u001f')?7M\u0019S3nSF/6e43\u0019\u0016mۉg/-\u001a(\u0002^^\u0018q\u0019ypY\u0012ij\u000fLc+t⅒p-ږ`\u000b?.ڶ\u001dE=aN1qH3&\u001e\t&A\"d&\u0015ddE%eP._KDn&!\u0017\u0017p\u0003\u001e\u001b\u000f6<$\\\u0000%b\u0007\u000fE:Z#E!xԻ\u000b{sȁ7v\f~hMw7]%nKߵ-;۶~^q~i^\u0018/r\bk1,tP\u001a~jӟŲ\u0005_\\|b7\u001bVޫ[;ذۦu\u000f۶<ܽ9!hXV\tIvC`d(YcX5HC6\u000eG\u00025#\b\u001e<4\u000f\u0016\u000b6Z\u0012Z\u0005\u0016\"\nbja(PN?|9Y:\u0015'Rj3Dզ{gXӄ/1j<9TB%mMx^\u001dby4(iK ϲUm_}q0y`Wy|fW#si\u0001jg\r(*R\u0013Jmh2q2z9LG)U\f1Կ(\u001al{\u0014y;|\u001f-\u0011HZ'LT\u0000[8w`a$\\\u0007`{\nl\b[ɶ\b[I\u001fmI\u0015l\u000b5bm͚x3$&Ţe%=!mIP\u0000\u0014b.f\u0003\u0005\u00196&\\ \u0002\u001b\u000b\u001dD.\u00018/\twXw-yC;\u001f\u001f5QG\u00130o\u001b~9XWywC5K?;/~)8747D287\u0002Sh\u0006K;|{ѻ寽\u0007Xek\fn\u001c\u0002ض\u000e\f\u001dhXM1[-vm;Hx)\\g\u000b\bn¬G$m^\u0010E,7#˄5{>\u0000\u000b6p=\u000e+\u0011mM\f\u000ex\u000b<ݏK\u0013\u0015IkEJM\u0013=>^:,\f'\u0014\u0016D\u001cB`[O%,\u0016\u0003ؚԱ&5lP2\u000b,D\u0004Qjc1owm(߹bwjKN/ޜ\u0007ҢmM^ϔs#۔9e:6erNlSF#\u0012o{x`[\u0011\"o#^\u0019rY7%\u0013\u0001t0\u0016΅+@\u0002l=$2\"o%z֋?n۶tǨmyu,$\u0002!7d&[M\u0001o~(\\\u0017!Ee!o\u0003\u0010k\u00146ۦ\u0007\u0010lX\u0019ZY7̛hRk.C+yǝ\u001d=z}\u0007-uCՃݸW{/u8s]I\b?[.Owo\u0016OIߡ\u001bu뾩*SW1P5\\m=\u001emztcQ\b\u000f\u0015gEm\u0010b\u0016V\u0010AYZsG\u0007ϱj\u0013{^,\u0013y¬I\u0016=t\u000erk4?(Nf!FMjR0g%錴\f:ˋuRR\u001c6L̶BmQiA&SqF5\u0014+\u0006'lHl\u001b?Vpp\fs\u0015w+~RS;Pd\u00025Jz$F)stm2\u001d٦FVy۶[-g\u0007\u000bEޢp\u0007F;\u0006\u001fΝ\t&L,6\u0002\u001c(\u001d-\\bi\t\u0006[7ٶ[QѶ?۟f=CqBJ\u0018Q#LLi&m\u0019yx˥r\\\u0006\\\\?\u0015 lAzhMM\u0011K+\u000fͷ@a\r\u0010g3d\u0007\u0019Y6\\5<>@\u001b\u000fZ놶\fnqs<X^kI~\u0002<i'2\u0007ٱ|bə\u0003+V\f6l赦ךvtcY4lMY($+a6G\\lx\u0014bYAz\\^M\u000f2%ZP:I\u0019c\u0014؆\u0000aM-mEx\u0005X\b4pARX\u0016.΄M4\u000b\u0004ba\u0016\u0017\\vm%m\u0019i\u0013g\u001cSh[\u0006\u0018$Yb<\n9OFx\u0017E=qs#۔9e:6erNlSF#\u0000ǈL=\r\u0007/\"6J \\\u0011w(a\u000f\bEIE.B\u001eg<\t[Xdۼd#aPQ\u0015ëb\f\u00146ѤM2kS,XKrN\u0016!ɐMGۺh\u0015\n\u001f\u0016}\u0007pk\u0012Є\u0000q.pq.v\u001bJxX6Mb\u0001\r\u0012Be%@Ўi\u0015ct҆։&u=L[\u0007\"~\bGʑ\u0013Od}$\\O*Lb@E\u0011\u0012#:\u0005sSo?0\tvxq(x`\u0006>wwؿs\u0017څ\u0007\u000b`\f/;LGک\u001f{ݿPߣ#\u000b.M\f.\u001eù\u0003;d.d\rvl=\u001d:N#OBGLV\"ז\"W#\fi\u001b2egu$\u000b.H\"\u001aض1{6!ic\u0018\u00022o\u0001;J~\u0012rmȶ\u0017S~|8\u0006l+1|\u0002ǈK9u<M39]O=Uuc쭱r쭷rX6{k,լa\u000b\u0014\u000bK\u0015&\n\u0017|O{5ǤQ-Uq\rzP\u0017wd`˶=l\u0006CNx;ەmol2\u0016H[IUq>j\u0003ywD\u00033\u0016\u0000\r)BP#)[C¹\u001bJp¹.м%\u0010$إ{RҦ+I\u001a.t[|a\"}dzȑÇ\u001e\u001c߾GtX\tv]m+VS\n\f\u000fҢmYt\r_n9tG',`c\"`u1E),\u0014aM$\u001ed\u0018\u001aƇJ\"\u0011\u0006ϺJB\rE.\u0018[(0+H[\u0014uH\u001c\u00006ŃhP6\u001at\u0005l\u001cu8AAW\fU\"`[\u001fZ\u0015vx}ۦ{\u001aȶ\u0011\u001fIkض'l[CY!-\u0016ݜmfOy/;6Jnw¶lX9{wVm[9{w,5\nH{d[\u0003l[Y\u0017k{\u0012\u0004I3TΞ\n\u000e\\mN^\u001c>eǀ-f\\wrBgR%+Vm}¶\\\u0002Y|Z?\u0016y\u000b\\\u0002I\u0011_(z[\fJm5i[ydQ\u0000\u0016M5%)xzTzC\u000b>\u001aW']{;]\u0000L\u0018]HRV2gA%CJR\u0013868ɥ\u0007}\u000b\u0003K?\u001aLO\u000e~z\u0000>SCv cՔ\u0002f5\\@pSpGpwd\rnRZ\nN<\u001bRPEFT\\\u0000Bc.tk\u0006X\u0010rda/`SȰ3jj$B\rAl.\b3W\u0019\u000b(jNPm&\u001f^;ٳ\u0006i\u0014/H˓0+\".--<yS\u001cU\u0007\\\u0015Ҷ\u0018vm'uc쭱r쭷rX6{k,y\u001cQRp\u0019zJ\\[\u0016\u001cKoųضfزmIe\fl.cm{#ʶ\u0006ö\u0000\u001c'ڗ_\u0003~\u0014\u0013Y\u0015\u00188pn#jTP+$ASCl\u0013Y.\u0018Hό\u001cIc\u000f<כ\u0003\u001f}T՜:t5\u0011RZCJ\u000bB|$s0\u0016cM\u001fw|4<婁ɣ{E\u0010dXL\u0019fXIMw$\u0018IGҶ\u0014\u0005-\u00145yɞ\u0015\u0015nug(\u00179j'\u0016U\u000bET+`\u000bW\u000e\u0018\u001fR\u0011\u00039\fVQk\u0011#&/\u001fl[\u0013H\u0005[|\u0016Ԡ:!5\u0003ln\u0014.r㯒\u001bfowgfowǲ[c\f\u001a5l{AR\u0014SρOs{JP\u00158XzugPKHZάZmLeۖ-*m\u0005\nv(\u0005\u0002oMsj?\u0003\u001c (`n\u0001j7-tCn)m.\u000f\u0017\u000f)ۋ\u0001\u0003agFS-N㿛׵׮E\u0018'\u0016ʊENMGMns\u000fvk\u0001lXVSjBS\u0000IƬ\u000e7ESWf]\u001aBtq,V\u0000'S>\\\u0006H\u0001\u00073\u0016l\u001aYꀣ\u000e\u0007\u0010xe\bB| JH\u001arYҍҧ\u001bٶfFrT\n=\u0015m'<o\u001dHZZ۶O8Ʋ[cY[oݱlX*,e\t\u0001r˲+r^Gv\nes&bxqP$-\u0019ٹ[@m\u0010Αx\t\u001a֋Em+MU1-6EIF\\\\^\u0000oE6Pj\b\nݎK6Imgщh\u0001gE_?\f}<;ݑ?^<ԤL\u0004698Tc\\UP\u0006 16e\u0013\u000fΦ\"Us'd\u0013*Z`,٢I$Y\"m\\z\u0016>nmK,\u0010O\u001fZ4yQflPTk>(\u001e{\u000ec\rVӢ*El\u000b8N\"(\r\u0013DۢCɞ 5\u000em[)&a֗tc[U\u0003>WJ䕫\\S_%Y\u0000\u0000\u0000\u0000\u0000\u0000׽r\u001bU\u001cXIH+@-˖Ĳd;\u000e4\fA\f55=\u0015\u001f!\u0010\u0002p\u00134]?Yl2~JWN$۷כ73.I\u0016QG\u0016i⣪W\u0015x\u0014V:Ňq_V~cիtwܝ/ϥ/\u001e*\u001e\u000f=\u001d~я7_~׭qNYIq\u00107\u000e\u001bƑ7}4G]\u001fG֢\u0007-ȝ`:w\u0017s>ؗ\u000e`\u001e?٨SjX\\ا,\u0006Yq,|\"~zlKAy:j={غ\u001c9v}ua\u0017v\u0006ٲE47['t\u001f]\u001c=\b׍%\u0006i\u001c3xIf\u001a5MӘ\u0010o;6n6vp\u0013ϒ}xIpq<v\u0015vmNw_\bE\u001aeI\u0016QG\u0016il\u001bymsSZ۹q{Y/oؾuqkiq{q_p߹vjmwft\u0007iuk{\rOƆa9\u001fAaw\u0014cv/\r7\u0019a\u001bL+Laeژ\u0016ni\u0016kw6um\u0006ٓiI?;ɳ\u00177\u0018:沸}k\u0016Q/eN\u000b\u0003W7f=\u0019;g\u001d͞l7\u0017f'Lw\u0007ljoىmX?c۳j{M\u000b=^\u000bKpl8À-l+ح5zcV\u0017a\u001b؆^ea;\u001b\u001467lndF\u0019uEzeԑE\u001a)mo[[;6lWVm9l\u001bض\u001bNܶu\u0017Fٴ?.ܕa۩mwjݚۤkpa\u001bLnM䷭;'nv[,\\?oƤ8pMy\u00140u]vb4ہ\u0019+ܙa[7$~ǦŨs1<u\u0016n֮\u0019ڜt_6sK-SOsjݵ\u0017nU~,ΩYƾ{gg\rs[m.\u00062;\u001boذdlflg;gIqfi?1kbKqN=+.q{\u0006\u0016\"1\u0018k͐mV|\u0010o+n{л޶\\NnҶ\u0014vmӽvo\u000b\\٭vmύ,(NH:H#4g]xpdF\u0016iQ'YWF\u001dYE\u001aYl[e<8H#4ʨ,+,\",2\u001e\u001cYE\u001aeI\u0016QG\u0016idF\u0016V\u0019\u000f,\"2$ʨ#4H#m\u0007G\u0016idF\u0019uEzeԑE\u001aYŶUƃ#4H:\"2\",b*E\u001aYQFd^\u0019udF\u0016idm\",(NH:H#4ضxpdF\u0016iQ'YWF\u001dYE\u001aYl[e<8H#4ʨ,+,\",2\u001e\u001cYE\u001aeI\u0016QG\u0016idF\u0016V\u0019\u000f,\"2$ʨ#4H#m\u0007G\u0016idF\u0019uEzeԑE\u001aYŶUƃ#4H:\"2\",b*E\u001aYQFd^\u0019udF\u0016idm\",(NH:H#4ضxpdF\u0016iQ'YWF\u001dYE\u001aYl[e<8H#4Rc_\u0000\u0000\u0000\u0000\u00001{Sß2\",Ⱥ\u0001wE\u001aYQFd^\u0019udF\u0016idm\",(NH:H#4ضxpdF\u0016iQ'YWF\u001dYE\u001aYl[e<8H#4ʨ,+,\",2\u001e\u001cYE\u001aeI\u0016QG\u0016idF\u0016V\u0019\u000f,\"2$ʨ#4H#m\u0007G\u0016idF\u0019uEzeԑE\u001aYŶUƃ#4H:\"2\",b*E\u001aYQFd^\u0019udF\u0016idm\",(NH:H#4ضxpdF\u0016iQ'YWF\u001dYE\u001aYl[e<8H#4ʨ,+\u0013/\u0000\u0000\u0000\u0000\u0000\u0000ױ\t\u0000\u0010\u0004R\u0019N\u0014)S\u0019\rv70\u0005<,\u0017u\u0017^\r|%Mq\u001c/%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[y\u0003\u0000\u0000\u0000\u0000\u00001\r\u0003A\u0010\u0004A\u001e\u001d\f\u0013okJ*\u0000+&>O\u001bJ2ufI_N4Yd]\rb8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ3K2uɒ&o[f8YdIS,ɒ&K,mdI%M:/S'K,ie%M4e̒L,iۖ\u0019N4YҔ\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000u\u000bR\r\nendstream\rendobj\r1865 0 obj\r<</BitsPerComponent 8/ColorSpace 1672 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 818/Intent/RelativeColorimetric/Length 7695/Name/X/Subtype/Image/Type/XObject/Width 938>>stream\r\nHQOg\u0014E\u0001\u0002Lt\u0006q\u0000\u001ak{Pz[VNmNn?Ð7/p\u0007\u000fz\u0007OXzn՛\u000fƬ\\f?\u0016:Aw\nIҤݜӫ1+\u000fx\u0007A\u0016:Aw\u0002ݼ'IVN^Y9<Y99;^.X\u0005+fm-=I^Y\\\u001cNǬlN\u000f\u0017\u000bV~y>.Xu4NK~I+~$p`iIG3^n\u0007\u001dR*TLQJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]Yr4[$MZ^Y\u000esVnゕYG3vᖞ$MZ\u001en1+f\u0005+f^\u001e\u0006=5JR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ(5KR+JR*RJ),RJ,9{Gz4i9+<Y~oX2h\u0006W\u001b=IӜߞW|5+~\u0017:Aw\u0006IҤݜŘ킕ゕYG3xk/\u000b~O-:\u0017AGJ)\u0015SjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR)vWTJ\u0015f)RjwEYJ]QjR\u0001\u0000\u0000\u0000\u0000\u0000j\u001ci\u0016QZX`9]\u0017\rO7/\u000e\u0018~mS\u0004(\u0007*|W}</V<?nm'G^\u001f㘕/\u001bVa嬣9~IQ\u00141RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014ە[-[zt۷笼=cVޯ\r+_\u001bV:N3JONZ~y~\u001cu\u001bzݰr\u001ctz3=i:i8gv}=fza\r+g\u001dA~\u00153\u0005ߩ9ߩ淝\u001eHM\u001a#\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014ە[=[zt笼??Yyzްa嬣9>C?餕9+1+?^w\r+g\u001dA\b}<ӓV\u001eϏsV\u001eocV\u001e_\u001bVyݰr\u001ctzWI?\u000fX\u001ah~IQ\u00141RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RϤ\u0017\u0000\u0000\u0000\u0000\u0000j\u001cW\u0000DQY\u0006\u000bam&x@֮EA\u0017y1n\u001bw邾<^.X\u0005+OO߿n+O߾_2NG=\u001e5H_Ej\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]Hݮ\\rhC\u001foJI+o\u001f<>nǬ<\u001e\u0017~^r֡9\u0011LWNZ9fعf媛O\u0007\u001d[=]i:iqz~\u000bV:4\u0007\u001dV|kA\u001f\u000bSsSc\u0017\u001d_v\u000f=q\"5Fj\u0015)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+\u001c[t9+ϯ1+Ϸ\u0005+\u0017uh\u000e:zEo\u0016xOWNZr?^Y<\u0017CsKo'\u001f;5;5vѡe'У\u001e\u0017)RcV\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uB\u0003\u0000\u0000\u0000\u0000\u0000jcG\u0000DQb\fF !\fY2uه\u0014L+h¹gg\u000fj|f?oǬ||{}`叿\u0017||V:4IQ.RSH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnW.94땞4r<<\u001e\u0005#Ͽy>-'M'sVn_cVn\u000bV~/X9\u001ctwI n9ߘSHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]<BWztY/|x\u0017<mN\u000e:z4r?Y|}\u001er|`\u000eAG/}מty8\ns?\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014\u0015RHM]!\u0014ە\u001d\u0000\u0000\u0000\u0000\u0000\u0000A\u0014A\u0000Dv\u001bh\u0018q\u0011d8/0\bD6\u0004T~<[y|1+/?ްϯ\u001bV:4G\u001d;Az]HZEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj-\n/M'\\osV9+a\u001bV:4G\u001d;Az]^84[{+o7j\u0015)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+v\"uBj\u0017)R+\u001c+zK4rY\\\u001bV:4G\u001d;Az]~ФoI n9ߘUHݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\u001fI\u000b\u0000\u0000\u0000\u0000\u00001j\u001bQ\u0000ap\u000bp*\u0017Hr\u0002b`\u0007^\u0004v>ݾ׻NZ_2m']Q뢛|9f|`ǟ\u000bV:4G\u001d;B]HZEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]HݮEj\n]Hݮ\\rhB{z餕㜕1+oϏ\u000bV]r֡9}NI+g}9+_+F`頣~kOzx8\u0011oo*RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5Ev.RSnWH\"5EvC\u001f\u0000\u0000\u0000\u0000\u0000\u0003\u0000\r\nendstream\rendobj\r1672 0 obj\r[/Indexed/DeviceRGB 53 2200 0 R]\rendobj\r2200 0 obj\r<</Length 162>>stream\r\n\r\nendstream\rendobj\r2199 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2198 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2197 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2194 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2196 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2201 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r1887 0 obj\r[/Indexed/DeviceRGB 0 2202 0 R]\rendobj\r2201 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 326/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nH̑]S@\u0018/\u0017\u0004\\DM\f,PD\u00140,gtFF'\u000fi\u0013k\u0019/\\g=T3\u0001#\u0004\"!\bC\u0010\u001c@2%H\u0000Dʔ`\bQYa\u0014\u0011\nU\t/DU8\rS,9J(_D1[^\u0010x\u0017\u0016\u001au\u0010OU\u00025Eqw9wd\b]7\u0005X.G8'N'O/i.h*Nd:a~l%\"Kxϛ\u0015TLһ4^ݲ\u0015Tq|/Vq=\u000f7\ftp4lFavMlu\u0019BfuӨ1]SU4\u0014\u0002\u0015YWdR\"##,JlWGn\u001f\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000c\"\r\nendstream\rendobj\r2202 0 obj\r<</Length 3>>stream\r\n\u0000\u0000\u0000\r\nendstream\rendobj\r2195 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2203 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2203 0 obj\r<</BC 2204 0 R/G 2205 0 R/S/Luminosity/Type/Mask>>\rendobj\r2204 0 obj\r[0.0 0.0 0.0]\rendobj\r2205 0 obj\r<</BBox[696.0 242.0 724.0 216.0]/Group 2206 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2207 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 696 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2206 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2207 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 326/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nH̑]S@\u0018/\u0017\u0004\\DM\f,PD\u00140,gtFF'\u000fi\u0013k\u0019/\\g=T3\u0001#\u0004\"!\bC\u0010\u001c@2%H\u0000Dʔ`\bQYa\u0014\u0011\nU\t/DU8\rS,9J(_D1[^\u0010x\u0017\u0016\u001au\u0010OU\u00025Eqw9wd\b]7\u0005X.G8'N'O/i.h*Nd:a~l%\"Kxϛ\u0015TLһ4^ݲ\u0015Tq|/Vq=\u000f7\ftp4lFavMlu\u0019BfuӨ1]SU4\u0014\u0002\u0015YWdR\"##,JlWGn\u001f\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000c\"\r\nendstream\rendobj\r2193 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2192 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2191 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2190 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2189 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2186 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2188 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2208 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r2208 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 318/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHko0\u0018\\(\u001d^&\u00056\u0017.\u0002A 6cbКT&~܇|y<ys$vJD\u0006\\'\u001f:\b UU\u0004\u0000Tt\u0010nH#BFXSI\u0016J@\u001d\u0019c3:Ć5}H\u0016LFz8^6u^ČhbQ\u00029dEll;r_1\u0014\fb9ߕ\b\u001bOi\u0004C$(]dsFnb\u001f.t'x?\u0012\u0013o8+\u000f\u001fj2\u0010!IIMSW»`\f\u0018.2EL8Nmru_>6\u0006f-:%\b\u0011B\u001d\u0017}\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000| \r\nendstream\rendobj\r2187 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2209 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2209 0 obj\r<</BC 2210 0 R/G 2211 0 R/S/Luminosity/Type/Mask>>\rendobj\r2210 0 obj\r[0.0 0.0 0.0]\rendobj\r2211 0 obj\r<</BBox[646.0 242.0 674.0 216.0]/Group 2212 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2213 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 646 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2212 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2213 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 318/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHko0\u0018\\(\u001d^&\u00056\u0017.\u0002A 6cbКT&~܇|y<ys$vJD\u0006\\'\u001f:\b UU\u0004\u0000Tt\u0010nH#BFXSI\u0016J@\u001d\u0019c3:Ć5}H\u0016LFz8^6u^ČhbQ\u00029dEll;r_1\u0014\fb9ߕ\b\u001bOi\u0004C$(]dsFnb\u001f.t'x?\u0012\u0013o8+\u000f\u001fj2\u0010!IIMSW»`\f\u0018.2EL8Nmru_>6\u0006f-:%\b\u0011B\u001d\u0017}\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000| \r\nendstream\rendobj\r2183 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2185 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 34/Name/X/SMask 2214 0 R/Subtype/Image/Type/XObject/Width 80>>stream\r\nHb`\u0018\u0005`\u0014Q0\nF(\u0018Z\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\b\r\nendstream\rendobj\r2214 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 80>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 1081/Name/X/Subtype/Image/Type/XObject/Width 80>>stream\r\nHTrV\u0010\u001d\r$ľIB\u0018\f\u0012V\u0010 \u0004\u00180{M<K\u0013rmLyCR*J\u001c6-?\u0016C\u0013V,\u0006A\u001b\u0018`\u0004E\u0011\u0018\"\u0000a1\u0018%(&q$*\t\u0017\u0010<\u0001\u0016\u00111\u0013%q8\u001fv\u001f,(9 `xg\b\u0004\u0018%dI4\n9\t8<\u000fwD\u0003T(+<Gb\b\u0002G QrQ\"! \u0010\u0018%S\u0015vgCE0B^ɧ\u0018*!\u0016|B^\n\u0013\\o\u001alq\u0002'\u0014M8\t\nJfjMU&I<,o~$NPtAg*g=%b\u001f\u001cCܷv-sN%)1# \u0005K畎=w\r0\u0000ÊY/HpbRo;Z \u000fb\u001f-c\\&_Q\u0014W\u0014ɲ&WKj]wot9݅jӵf]ӝɲ[Dy`z\u0015yfuƓcV1rtŚ|jp2'\u0017noΒSo8_M\u001br\u001f\u0017m۶ezf\u0013\u000em*wvew{v\\\\M#Jx'aڮ3MFf]Ncڣ~\u0015aKV·׻f䎷w\u000f|\u001aNg ɨ\u001dk8\u000b6<{n#{`f9\u001ay\u0018|\u001f<X\u0004rP{\u001f\u0006Xbz|~\u0006˯\u000e,1\u0003۝]ݰϪe=u~\u0017\u0006\u001fLrիpqŶ\u001f쮶ˉe\u0007,赚z\u0007ޕih\r].atnϽnẂgSL`Q-ϵt\u001dG;Ӌ7j4RY-HiPzKQ7n{tlUW}@\u0018#V덺\\\u0002Ԣ\u0018VHT*J\u0011@ʱ\fg%),jJXfeE+\u0004_$Ί\\F\u0000HKRB x$\u0019\u000e\u001c\t\u0002KQ\u0014C\u0002),0\tf9A\u0014\u0007H_ ȯ\"R\u0014\u0010.Ͳ,\u0015'0\u0014\b\u0006mq\u0014!\u0011\u00140\f#\u0003} \u0013\u0003\u0003(\fA\u0007g#s\u0015\u001c@N@\u001d5\"\u00169ѩ?}\u001c\u0013򝿱_\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000Ҩ\r\nendstream\rendobj\r2184 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2215 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2215 0 obj\r<</BC 2216 0 R/G 2217 0 R/S/Luminosity/Type/Mask>>\rendobj\r2216 0 obj\r[0.0 0.0 0.0]\rendobj\r2217 0 obj\r<</BBox[17.0 705.0 97.0 677.0]/Group 2218 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2219 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n80 0 0 28 17 677 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2218 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2219 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 80>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 1081/Name/X/Subtype/Image/Type/XObject/Width 80>>stream\r\nHTrV\u0010\u001d\r$ľIB\u0018\f\u0012V\u0010 \u0004\u00180{M<K\u0013rmLyCR*J\u001c6-?\u0016C\u0013V,\u0006A\u001b\u0018`\u0004E\u0011\u0018\"\u0000a1\u0018%(&q$*\t\u0017\u0010<\u0001\u0016\u00111\u0013%q8\u001fv\u001f,(9 `xg\b\u0004\u0018%dI4\n9\t8<\u000fwD\u0003T(+<Gb\b\u0002G QrQ\"! \u0010\u0018%S\u0015vgCE0B^ɧ\u0018*!\u0016|B^\n\u0013\\o\u001alq\u0002'\u0014M8\t\nJfjMU&I<,o~$NPtAg*g=%b\u001f\u001cCܷv-sN%)1# \u0005K畎=w\r0\u0000ÊY/HpbRo;Z \u000fb\u001f-c\\&_Q\u0014W\u0014ɲ&WKj]wot9݅jӵf]ӝɲ[Dy`z\u0015yfuƓcV1rtŚ|jp2'\u0017noΒSo8_M\u001br\u001f\u0017m۶ezf\u0013\u000em*wvew{v\\\\M#Jx'aڮ3MFf]Ncڣ~\u0015aKV·׻f䎷w\u000f|\u001aNg ɨ\u001dk8\u000b6<{n#{`f9\u001ay\u0018|\u001f<X\u0004rP{\u001f\u0006Xbz|~\u0006˯\u000e,1\u0003۝]ݰϪe=u~\u0017\u0006\u001fLrիpqŶ\u001f쮶ˉe\u0007,赚z\u0007ޕih\r].atnϽnẂgSL`Q-ϵt\u001dG;Ӌ7j4RY-HiPzKQ7n{tlUW}@\u0018#V덺\\\u0002Ԣ\u0018VHT*J\u0011@ʱ\fg%),jJXfeE+\u0004_$Ί\\F\u0000HKRB x$\u0019\u000e\u001c\t\u0002KQ\u0014C\u0002),0\tf9A\u0014\u0007H_ ȯ\"R\u0014\u0010.Ͳ,\u0015'0\u0014\b\u0006mq\u0014!\u0011\u00140\f#\u0003} \u0013\u0003\u0003(\fA\u0007g#s\u0015\u001c@N@\u001d5\"\u00169ѩ?}\u001c\u0013򝿱_\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000Ҩ\r\nendstream\rendobj\r2182 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2181 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2180 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2179 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2178 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2175 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2177 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2220 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r2220 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 312/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nH̑ko0\u0018\\,ł\bu\u001576.*\\bM\u00017%;_&O7=L&&>1\u0001\"\u0017\u0010\u0010\u0000HVU\u0019A)\n\u0012\u001f$aݲtMUN\u001c\u001d\n\u0011]ۘ+\u001e\u0005Fc\u0000a\t$d\u000fcJ(~=\u00161aK2c6\u001daYYUU\u00192\u001aDyU\u0006KghUu]7m}\f\u001c<f%a5o\u0019#Mދ|_\u001f\u0003zGyH\u000f4΋\u001d;P\u0006!}{ق,,Y<\fg=U\u0015\u0015ka̱\f\u0007M:%$qI}7\u0001\u0000~?\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000e \r\nendstream\rendobj\r2176 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2221 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2221 0 obj\r<</BC 2222 0 R/G 2223 0 R/S/Luminosity/Type/Mask>>\rendobj\r2222 0 obj\r[0.0 0.0 0.0]\rendobj\r2223 0 obj\r<</BBox[597.0 242.0 625.0 216.0]/Group 2224 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2225 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 597 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2224 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2225 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 312/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nH̑ko0\u0018\\,ł\bu\u001576.*\\bM\u00017%;_&O7=L&&>1\u0001\"\u0017\u0010\u0010\u0000HVU\u0019A)\n\u0012\u001f$aݲtMUN\u001c\u001d\n\u0011]ۘ+\u001e\u0005Fc\u0000a\t$d\u000fcJ(~=\u00161aK2c6\u001daYYUU\u00192\u001aDyU\u0006KghUu]7m}\f\u001c<f%a5o\u0019#Mދ|_\u001f\u0003zGyH\u000f4΋\u001d;P\u0006!}{ق,,Y<\fg=U\u0015\u0015ka̱\f\u0007M:%$qI}7\u0001\u0000~?\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000e \r\nendstream\rendobj\r2174 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2173 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2172 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2171 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2168 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2170 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 34/Intent/RelativeColorimetric/Length 109/Name/X/SMask 2226 0 R/Subtype/Image/Type/XObject/Width 296>>stream\r\nHб\tP\u0000K\t)>hq7A\u0006]r))Q|JfT%68\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000^\"\u0019\r\nendstream\rendobj\r2226 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 296>>/Filter/FlateDecode/Height 34/Intent/RelativeColorimetric/Length 443/Name/X/Subtype/Image/Type/XObject/Width 296>>stream\r\nH1@\u0018ag\u0003\u0012\u000b\n\u0002\u0002-\b\u001c\n\u0002\f\u0014-\u0000y\u0003*biGl]\u0011;j\u0014&\u001c\u0017h\u0004nPx\u001f4\t<QD賂TM7\u0019<L]Sԇlj؎- Xxc\u001bSF9|\u0015Q `57۠\bl?A<}[c]'*N@J\u0005.wG\u0015\rr_7\u0007\u00104CTn&\u0017\u0017U}lO huUĞ5;͖\t4\u0002slx}wJ׻\u0001[\u001bt\u001a\u0006Aai\u0018t\u001a\u0006AaiN[^y[,/.ߴǺ*b;)\u001bn\u000e h}:ɺ\u0013d;\u0010lg]'4ۏk\u0010\"b\u0018:I1_\u0005a H0X\rU:(\u001az%\b\u0016Ɣugw\u001d\u0014S5ݴf2uMeBQi,+\u0013xc3]K\u0011\n/\u001f\u0000\u0013\u0000\u0000\u0000\u0000\u0000\u0003\u00004\r\nendstream\rendobj\r2169 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2227 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2227 0 obj\r<</BC 2228 0 R/G 2229 0 R/S/Luminosity/Type/Mask>>\rendobj\r2228 0 obj\r[0.0 0.0 0.0]\rendobj\r2229 0 obj\r<</BBox[-7.0 709.0 289.0 675.0]/Group 2230 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2231 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n296 0 0 34 -7 675 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2230 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2231 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 296>>/Filter/FlateDecode/Height 34/Intent/RelativeColorimetric/Length 443/Name/X/Subtype/Image/Type/XObject/Width 296>>stream\r\nH1@\u0018ag\u0003\u0012\u000b\n\u0002\u0002-\b\u001c\n\u0002\f\u0014-\u0000y\u0003*biGl]\u0011;j\u0014&\u001c\u0017h\u0004nPx\u001f4\t<QD賂TM7\u0019<L]Sԇlj؎- Xxc\u001bSF9|\u0015Q `57۠\bl?A<}[c]'*N@J\u0005.wG\u0015\rr_7\u0007\u00104CTn&\u0017\u0017U}lO huUĞ5;͖\t4\u0002slx}wJ׻\u0001[\u001bt\u001a\u0006Aai\u0018t\u001a\u0006AaiN[^y[,/.ߴǺ*b;)\u001bn\u000e h}:ɺ\u0013d;\u0010lg]'4ۏk\u0010\"b\u0018:I1_\u0005a H0X\rU:(\u001az%\b\u0016Ɣugw\u001d\u0014S5ݴf2uMeBQi,+\u0013xc3]K\u0011\n/\u001f\u0000\u0013\u0000\u0000\u0000\u0000\u0000\u0003\u00004\r\nendstream\rendobj\r2167 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2164 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2166 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2232 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r2232 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 302/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHĒYs0\u0014%!\u0004¾f\"$j*\u0016Ŗg5N\u0014tzsOF?&X\f\u0004@) \u0005\u0000wT\b[\u0016F\u0010@dZ\u00047AȷI\u0010'0Y\u0012'bbN}\u0013^.\u0002d'uY0f개82\u00184ô~)\u0015e\u0017on\u0017m:lۜJ\u001e\u000bC.ۮ뎟\"\u0015S)'vޭXU\u000fL6\u0014txOt][nD&b^\r*\u000f-_N)˖,\"v]DJi\u0014$tջYDلخ%\u0017kb\u0018#)C\u000fAhs8J\t*\u001b~\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001b\r\nendstream\rendobj\r2165 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2233 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2233 0 obj\r<</BC 2234 0 R/G 2235 0 R/S/Luminosity/Type/Mask>>\rendobj\r2234 0 obj\r[0.0 0.0 0.0]\rendobj\r2235 0 obj\r<</BBox[547.0 242.0 575.0 216.0]/Group 2236 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2237 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 547 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2236 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2237 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 302/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHĒYs0\u0014%!\u0004¾f\"$j*\u0016Ŗg5N\u0014tzsOF?&X\f\u0004@) \u0005\u0000wT\b[\u0016F\u0010@dZ\u00047AȷI\u0010'0Y\u0012'bbN}\u0013^.\u0002d'uY0f개82\u00184ô~)\u0015e\u0017on\u0017m:lۜJ\u001e\u000bC.ۮ뎟\"\u0015S)'vޭXU\u000fL6\u0014txOt][nD&b^\r*\u000f-_N)˖,\"v]DJi\u0014$tջYDلخ%\u0017kb\u0018#)C\u000fAhs8J\t*\u001b~\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001b\r\nendstream\rendobj\r2163 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2162 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2161 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2160 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2159 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2156 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2158 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 23/Name/X/SMask 2238 0 R/Subtype/Image/Type/XObject/Width 19>>stream\r\nHb`\u0018\u0005#\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0001\r\nendstream\rendobj\r2238 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 19>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 153/Name/X/Subtype/Image/Type/XObject/Width 19>>stream\r\nHb`\f0\u0002\u0001\u0000\u00133\u00100!\t22sr23\"Dظ`b<\"RrrR\"<P1&Vn\u0011\u0005\r]]\r\u0005\u0011nV&\"\u000eA\u0019-C\u0013\u0013C-\u0019A\u000e2F\u0016n1%#S33S#%1n\u0016\u0010+9\u0010J\u0012¢\u0011x,T,\u001eml-\bi\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000f\r\nendstream\rendobj\r2157 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2239 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2239 0 obj\r<</BC 2240 0 R/G 2241 0 R/S/Luminosity/Type/Mask>>\rendobj\r2240 0 obj\r[0.0 0.0 0.0]\rendobj\r2241 0 obj\r<</BBox[502.0 242.0 521.0 216.0]/Group 2242 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2243 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n19 0 0 26 502 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2242 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2243 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 19>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 153/Name/X/Subtype/Image/Type/XObject/Width 19>>stream\r\nHb`\f0\u0002\u0001\u0000\u00133\u00100!\t22sr23\"Dظ`b<\"RrrR\"<P1&Vn\u0011\u0005\r]]\r\u0005\u0011nV&\"\u000eA\u0019-C\u0013\u0013C-\u0019A\u000e2F\u0016n1%#S33S#%1n\u0016\u0010+9\u0010J\u0012¢\u0011x,T,\u001eml-\bi\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000f\r\nendstream\rendobj\r2155 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2154 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2153 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2152 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2151 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2150 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2149 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2148 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2147 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2145 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2146 0 obj\r<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2244 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2244 0 obj\r<</G 2245 0 R/S/Luminosity/Type/Mask>>\rendobj\r2245 0 obj\r<</BBox[-32768.0 32767.0 32767.0 -32768.0]/Group 2246 0 R/Length 56/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Shading<</Sh0 247 0 R>>>>/Subtype/Form>>stream\r\nq\n0 g\n/GS0 gs\n266 0 0 -266 514.5 210 cm\nBX /Sh0 sh EX Q\n\r\nendstream\rendobj\r2246 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r2143 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2144 0 obj\r<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2247 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2247 0 obj\r<</G 2248 0 R/S/Luminosity/Type/Mask>>\rendobj\r2248 0 obj\r<</BBox[-32768.0 32767.0 32767.0 -32768.0]/Group 2249 0 R/Length 56/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Shading<</Sh0 247 0 R>>>>/Subtype/Form>>stream\r\nq\n0 g\n/GS0 gs\n266 0 0 -266 514.5 170 cm\nBX /Sh0 sh EX Q\n\r\nendstream\rendobj\r2249 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r2140 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2142 0 obj\r<</BBox[502.0 240.0 1094.0 0.0]/Group 2250 0 R/Length 38/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0 0 0 rg\n/GS0 gs\n1094 0 -592 240 re\nf\n\r\nendstream\rendobj\r2250 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2141 0 obj\r<</AIS true/BM/Normal/CA 0.75/OP false/OPM 1/SA true/SMask 2251 0 R/Type/ExtGState/ca 0.75/op false>>\rendobj\r2251 0 obj\r<</BC 2252 0 R/G 2253 0 R/S/Luminosity/TR 2254 0 R/Type/Mask>>\rendobj\r2252 0 obj\r[1.0]\rendobj\r2253 0 obj\r<</BBox[500.0 242.0 1096.0 -2.0]/Group 2255 0 R/Length 75/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/XObject<</Fm0 2256 0 R>>>>/Subtype/Form>>stream\r\nq\n0 Tc 0 Tw 0 Ts 100 Tz 0 Tr 1 w 10 M 0 j 0 J []0 d \n/GS0 gs\n0 TL/Fm0 Do\nQ\n\r\nendstream\rendobj\r2254 0 obj\r<</Domain[0.0 1.0]/Filter/FlateDecode/FunctionType 4/Length 36/Range[0.0 1.0]>>stream\r\nH63\u0000\u0003Ԋ\f$Z\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00007\u000f\u0005\r\nendstream\rendobj\r2255 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r2256 0 obj\r<</BBox[499.0 243.0 1097.0 -3.0]/Group 2257 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2258 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n596 0 0 244 500 -2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2257 0 obj\r<</CS/DeviceRGB/I true/K false/S/Transparency/Type/Group>>\rendobj\r2258 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 596>>/Filter/FlateDecode/Height 244/Intent/RelativeColorimetric/Length 20445/Name/X/Subtype/Image/Type/XObject/Width 596>>stream\r\nH׉S\u0019\u0005\\v}q\u0001\u0001E6\u0001D\u0001\u0015Q\u0019p\u0003\u001au\u0012%1FeRjƴӴ4iN}zywlNS_py\u000bqĉ5qd\u0005z&gݓYlMRVʓ@Wf\u0011F)dQɰdKVd%ݢ,vmOQ\u0019\"K*%9A\u001cO#0< \u0005))\\Z Ktʞ\u0005~k.9\f\u00191g˹J!=9KH̏F\u0012K,Hy4\u0015Me\u0015fqs'Xۣ-N͜\u0018}F\u0012\b*GdHǱqH\tULRc\r)͋Ζ8\"\u001bJ-۞R[uB͜X!y\u0001\u0017hA\u0016\\֧\")'*<P\u00131\u0015$2!17^\t?f+Sgl\u000bӐq\u0007IB 2\u001fW\u001a9I1\u0002+\u0013.W`%\u0015BSh@\u0014A\u0017I(H߻\u0003iT.Iٕ>-q^N<i'~O5-t\u0004M(\u000b@`Un\u000eUD\n<(xB7I\u00130I2F$dzLʴ)A:Rҹz:3J\u0019\u0017(-Ms\u0012͛\u0018}\u0017pV-kR\nU\u0019j\u0014/\u001fIe'$I\td\bh\u0018\u001cD3fz,{\\&wY,85آ4/\t\u001a\u0011\u0018x\u0001\u0017lV\u001d`ѕD\u0016*H*'׋\"(z2N%Z2Jmd$D\u0002dt\u001c\u0016~Q?3\f\u000b3.~\r:܃یI+s\u001a͛XGx\u0001\u0017l\u0006犬J\u000b\u000b\u001cTS\u0019F\u0015@\u00138\tLR\u000f\u0015ɐ86N\u0001fX\u00199Cq^R\u001dmF[Bq\u00133\n/\u0002.؂,\u0016aNVhꪊrT\u0015PeK2ŚJ\u0017\u0016WH'\u00138Q\u0013J(Hǉ\u001cfƔ# Gȱ8O'OL:Xۊ6e9(x\u0011\u0017iu{XbBYXUD\n\u001fTk֨\u0012l\u0012\u001abC\u0011y\u0002'i\u0002&dHǉ\u001cg&I 'Rs2H\rF\t.\u00014lTFa\u0005\\\u001awPʊ\u0004*4Ӈ#J\u0016BE\u0011\u0004N}%Z\u0002%DF\"$>\f\u0014sZ92\u001dd&]Y\u0019n8{\fmFKr\u001aQt\u0016h\u001d\u001a%.jmz\u001cJB\u0014\u0015_)l\\RT-Jj\u001bEP\u0002/N&hB/ђ(#\"2@\u0006\u0003e^TιOʅRey&AK~A&e\u00146%]f\u000bp\u0015\tS۲\t篤(?7;3\u0014N_V\"BI5wwv\u001c(y\u0002'j\"&X\"d$Ccn\u0002\u0019\u0017K>/G2rR\u0014s0~ۆ6!J\u0011t\u0016\u000bp\u0015\u0005K}\r܍\u000bj+PT\t>LO_~!.bII\u0014N\u001e@%y\u0002I\u0016\u0013Z$1 h\u0010W9W&Bk8u\u0006+5obFaƋ`d\t8Y\u000e\u001f\u0018'U]\u001d\noҢ|\u001cdS<}M\"ŒՃA4\u0014AIfI\bdH|\u0019}u\r\u001b\\BnŹaEgoV<@Y\u00132\u0002\f^\u0005[&ʱ\u001a\u001d\r\u001cêj\u0001xR\u0015\u0017fMCMUVy.R(\u001e< jx\u0004\rEP'p&b%P\"$*\u0012!h\nm;aͽ8Lqv\u000b6N&e\u0014&^\u0005[\u000b%W\u0018U\r\r]P5oAQ%/*-݌#\u0007}(V\u0014\u001a\u0002O$M\u0004K&dH|<\u0019~ʷ,}z\"oY5\u0018[\rʚї-\u0014\u0017d\u0001s\u0005V'OLNaV\u001eڵs\u0007_M%_Ԇ\f>z<=!\\=DC\u0011DN\u0004LDJt$Dǩ7<H\u001e(,{$\u000e\u000fOd\u000b`\u000b\u0011w\u0005V3,+:|U%TMYT8~9x2qTS\r;<'>\u0014\u001eD>\"(\t0\u0012!\f9<\u000e}Dݥ.KOt~趃@i2\u00023]€7BW`u\u001c\u0014j\u001cU%Tݝ-,M%\u0005Y\u001bׯ\rM%J+TSMͭ\u0014Jj\u001cW\u000fgp\u001c(\t\td(x-cCE\u0007m\u0016?tm\u0005P&dE]\u0005[u\u0002W`u\u00124/qjOwG.\u0014\u0015_a^vFT~QYej\u0003/ 51Ŏ}<(tGt\u001fDLDIt$Ds@>G8j%:`6\u0000a\u00132Gh\u000b\u0006\u0015X]EYA\f#D5л\u000b\u000fEWb*\u0007ϩ-)\\~;;\u0013uu΃']\u0014\u00131\u0012%ё\u00109=\u001e'O|YaR'\u001a\r{\u0019p\u0016h=\u0004\u0015X]\u001deEUUUSj_^\u0015UC\u001d_q~\"4~cVnAI9N6\u0014.A'53{\\}5\u0000\u00149#\u0004L\u0004Jr$C'S\u0017Ir,fƮ\u0015xz\u0006MK`K\u000f]\u0015\neEU/j~\\xQo()Hd_k4UXZ،cj\b\u000fpXRxG\"Q7n&\tPMI\bI\f3Os_DWr7`m\u0001B&b\u0005]\u0005Z\u0005X\u0015X@\u0015jʡ:8ܸmK\rLdn\bLeo_ie\rN\u001fkȡ1G\n%u+s&\n\u0015e\r\u0015x\u0002'\u001c9j\u0002&Z2HRd~\u0017ѯ]~\u00138N\t&M=`ꬉ\u0018y\u0019.Ғ+z\u000eJ\f\u0015\u001eqPT-M\r[kHO1Um\u0006\u001c\u001c\u001b?>\tR{,kz\u0010ŊBC\ty2N,Q\u001c\t\u0013\u0010\u000f>Lɟ8)#\u0007\u0002\rW\u0005Z\u000e\u0002+\u0015w\u0001\u0003''\u001d94hݹnSUYanT~qyզ]m\u001d=\u0003C\u0007F\u000f\u001f<aTRxGv\u001e>J\u0006EOd\b\u0014@˟59[Ze\tӉL֏[\u000f\u00193\u0001.ڒ/XY}1 U\u0002޽}\u0006\u001fPΜ>1qtLE\u0007UYQnVh*3\u0001S՛u\u000e\u001d96q\u0014\u000f%Gj\u000e\u001eD>xLP/M$L$G2\u000eϤ83Kx I\u00131-'\u000b芬>\u0006+\u0015U=\u001eP]gSt~vq\u0015ޮ]|P\u0017emX'Skh\u0002ϩ\u001dͭ\u001d747uYkk~}?UyQ\u0000aw\u0013cm,]\u0006\u0014PT\u0010\u0019P@\u0002Klਈ]T\u00046\":W,0\n\"cԍklߝ?9}K\u0011O>Ϝs\f)(fT\u0006D\u0014\u0012J@\"xh\"&$F_\\~׼Wf5\u000fh0R[ȭ\u0013\nK]\u0015JpVQU%fL<a\u0004Հa\u001cT>\u001a.=5F0iM\n!EAD\rJ<\t'$(I\u0018)![>ErU<{\\5rh\t0\u0012[%ʰBZ\u0003U\u0012U+\u0005UT\fA\u0003Q~\u0018T~>-\u001a׷M}^C|u\u001aG_\u001cSRg\n)^\u000eB*\u000f;JDރ33&hRL$Fu7+oԽC?.ƙ\b.\u0002-:2Ȋa\u0005UhM\u0012UjYTK\u001e\u0010\u0011ɿ\rLf\n\u0013\u001ds*,<2&3fΞ;OIIHz\"\n\u0011e@'S15\t&R\u0012Hq\u001fw*W5wv@5D-Ђ,¢+e2v܎\u0002g\u0001\u0015zƜ3\u0018T)\u0013\u0003;miQVmeNED\rG\u001fc\n͗6+}\u0002)>%ڎ֣(D\u0014*\u0002EO\b'F\u00134ђl;W^MW˫9^<\u001a\u0013^Bd\tˬ\u000b1jnEI|sgKPLBEE\u000e\t\u001e\u001a8M5kϾ\u001e=\u0006%22\u0016,HgH\u000e\u0015aD!\\p&Z\u0012Jqo\u0003{W:\u001ea0\u0013_\u0018Ze,CqU̴U\u0015 6\t*|-bP\u001b2,!6_Р\u001dڵrzQ8{K\u001a15{EK\t<%*8PȌ:~\u0002\u00114,N\u0014!\u0002G{\\{_^{1E[B\u000b%ż\u0002+QuP!ʠZ\u0015T6y\u0011(Htjmw퀉\u001e\u0016aXS)4%+єBiH\u001d>\"\u0010QP\u0002\t\u0014\"r1O}}Z=^]s=L|\t.Ђ,bb0\u0018V\nHڹm\u000b7՚\u001cL*\rR~\u0003cwۺiCԷh\u0017}S\u001b2z\u001ccJ/;g\u0014B\n˜'+4>f8\u00135ђH2l:\u0019~gg{\u00117v3Ȕ\u0017m+\naEUΞ>yQu@Q]2k\u0019*u񣓇\u000e\u001e\u0018\u0015+8of\u001e:v\u001e9\u0015;hH1ӘZr\u000fY\u001e?yJDaDi\u0013@e:j%d\u0011rZܾ/\u001fzgt\u0003eLtіzRV\f+\\GTYvlۼaT̜\u001eʏ*\"\f|7nƯS7LȘCб2\u0016,FZM[H'!u\u0005f\u0014Di){L'pRM,CnZ~\u001fp?^\u001d\u0007t=!z(y%\u0018V**\u0014?Eu\u0006L*\rYR~\u0013b\u000e\t\fS깙\u0014Ѓ\u0013=>aXΐZrun^-\\$.].)\u0015Q\u000eP\tTXRH\u0016!7)?uϞ_z`uҳ.\u0005Yz\"$+*rF[7IP-̘6\r_~C\u0007D\t\rӼQo\u001bSooܲ`Nt̩\u0011iӘZ1y\u000e)>CE.r\u0015eb>ѓr&d\u00189s^y;B\"-ʲ\\=bX\n\u0014\u0015*:|=T\u001aT秣ƏN\u0019\u000eS]۸jҲm.!aSc'N>sT4\u001dq\u001eT\t(\u000b\u0014=j\u0012L\u0006-_W5ޯW׫\u0005]f\t.EXƕanݔB;CT\u0007\u0010T\b%Z~\u0018T\u0007۳{n\u001a\u0011ѱSX}s/21\u0011cj\u0003L)!%Ue$\u0004\u0014ȉĒ\u0005~xo:U=Y\u0004Ђ,\u0019DBR}TTX۲A\"\u0013+=u$\fX|uھmwZ%}q2X}\u0019\u000bǘBܽ\bŧJ\u0019RnߩD٠ODNԤ,Fn~缯^~|`7mƗRY\nE(\u0010VPuD\nؑl?YTX~&\u001b\u0018\u0017\u001dѫG\u000eUMu\u001e>S\u0016-eL>/:-ebHi(B@'r\u0012M\u001a\u0016Zǫj\u0016(JXYU\u000f#Ο=ujn\tZ~\u0018T\u001c1\u0011a=yj*z\u001c\u0010sշ83k)6ߑ\u0016),)\u0007n\u0004DNbɒx?r^\u001d7\u0006&D+\u0015U=y,QU~IU|)\t\u000fde.̘=cʄCc\u0005wخ0۱[^}c˜Je-@gq9gB1DV'夘$7As/ޫ|Uپ+*d\u0015\u000b\u0010JF\u0015R1v#\u001aT\u001bQ~\u001cT\u0013ï_\u0000j2հik1\u0015\u001e5\u0010\u0013]V\\\u0013Sl]hB=xȐ2\bKB>'K\u000eU7^扪gRZe\\)+U\u0006T{67ՕKThB\u0004M槧M4\u001f~}B1) 8,<*v\u0014S鬾5CL(%\u0014'\u0018Rl=(I(RO&*OwΫI\",Jʨ\u0002Ī\u0012TTJ1LPھ\u0019r҅sgN<\u000e\u001f~\u0003\t\tfYk?MD9՗obwr2%)ɧO}\u001dXy\u0004DT\u0017^S2V**Jz5\u001f\njǖ\rrWee.ʘ5\u0003#=)!Pj\u001d)\u001f\n/\u001a}S\u000bY}X['\u0003\u001dwղ\u001b\u0016)_T\u0014#\n\t\u0005PƓTy_Ml\\*K\u0012\u000bJÊ\u0010Uꩅ;\n\u0018T\u0005{Q~\u001cTSL\u0018\u0018\u001b74\b\u001c\bS1I#M9ů>Y\u001aSxZō[⻧dI1(\n#\u0006EOɦT-7^T̶%4V@bTlTTh?\tX,?\u000e9K\n\u0019iQ3\u001f\u0013\u0019\u0013>LtΩe9R}⣏1U|juS!eBY<W{\u0011\u000e\\\nfŰ+\u0013U?\u000b}[\u0019T\\T\u0005,9+.HOߐhOS\u001a5>\u0003\u0006\rg\u001f&:\u0014t30ЯU`L)qnBD\t('AX罗:sRX6+Q)\n_\u000fdM25mE\u001d\u0011(\u0001A\u000bH\u001fz\u0007\u0001Ҥ\r]\u0005\u0004)\u0005q#+\u000buU\u000f)&&~y\u0001\u001d:!?owQ\u0001Twnݸ6CAUW]^ZB\u000eD_{׶\r|6OO\u0016.eLXXہNE%Bwn\u0000eڍ[\"R\u0018RbF\tE<\t4Mhv/|\"N\u0016JJ\u001fO*\n\u000f4\u0005\u0015XzQ>\nUL\u0004J&0TO8S50ه\u001e\u001c\u001e\u001dD\u0007^\u000b\u001d7\u001f4\u001fG\u001eGJ\fg,\u0018P')L2.sz`\u0011W\u0015QţJ\bo?\u0016T-\u001a`PF\u0004z8Z\u001ahj\u0000S\u000b}EKW1LqG'+(BC'ejD\u0014'9\u0011%\u0002%:^?RrŰB^\u0010U\"T\u0019T7cPW\u0003\nlgef[cj`\u001fTԲUܣghf\u000f\u0015=\u0006t\nW_Y\u0018S\u0003|\u001c1\u0018RJ\b(\u00115_R\u0010+**\u0011*TׯRPuw@\u0007\u0002IwܐZӘG\u000e:\u0007\"\u0014)\u0015X!QJ$<\u001f܌lq8UЀP=\u0000@aCU\u0015\u0017Py[\u001bimߴz\")She7lݵw->TtЩ|>2NKC|\u0014\u000f)(($\u00035\u0005|©Ű\u0012BY\n\u001f_]Uy\"'3-1&<\bZ3ρmA;'w\u001fhԩ\u0002\\}z\"x0\u0014(\tOsBf<U8U<DXaP]hk>Y_]Q=\u0006\u001e\u0011phߞ\u001d,\u001bolam\u0013\u0010\u001cN:(ǫ\u0014oɇPE(\u0015q\u0004\u0004Ȫ\u0018TOGʠ\u001a\u001e\b\u0007BUZ\u0005\u000e\u0001c`jk$]<|\u0003@\u0005w\u0006\rb6o\u001e}ݓ+;GJ\u0000j%߬NB\u0015B7%TTbPDw\t$=9\u001e\rcjEf\nSk6jhj\u001c8d{$):TM=V\u001f\u001aE\u001c}\u0018S\u0013\u0010SԟHIO\u0016'P\u0005QE\u0007PG\u0000\u0015\u0004;7ww6P SN6&\u0004>Wejk6iA\u001c\\=\u000f#EGm#Crl\nG SR d#P\u0003GAuU,ζ\u0016\u0010*t\u0018~a\u001eζԖ++݂+8S6\u000e^~0P\u0015%eUuzA\r_1E͇25\u0015)^\tT1cQEKBL\u0017xT5Lݴ}_P\u0018ξ\u0013Ml]\u0004Cч\u000edJ@ꥀ\\GP)ۏ4\u001dY:__7\u0013B\u0018~T\u001d0k:U~řL\u0007G+,%⫏\f\u001dF\u001f\u0014l>j>\u0019)u)PA\u0005ӏ,\u001dolOGk\tt\u0018~I\u0011A~^odj32efe\u001f\u001c\u001e\u0014\u0006uV\u001f\u0019:>\u001eS|7\u001cAAE\u000f\n\u001f/?&T$0`/\u0017f\u0006ڻ[xtvh\u001a2\u0002#p1Eo<u\f>4Q0t))l>Z|\u001cR1\u0001P)\n,}blt(T(eqޮȔ\u000e02\u0017_\"Szf\u0007=|\u0002B\"c\u0013쫪#\u0012W_\u0012ON)8Jl?ePQPu+H\f\t\u0000)ͭg`j\u001d{̑)#!qIi8Pћ[A\rb\n6 S2RjqP)\u001f\bՅ4J\u00149\u0019)Q\fL}LmL\u0000SQqG傢WןT\u0014UL1%#&O\b*^~n^\u001bx$T\u001a\u001f\u0015\u001aCLjn{\u0019[ۻx\u001e\u000e\fO\u000f\u0014L')X}P}BL=\u0017bdj!;91QǄIzcmeianfjBt\u0011\u001f7C303\tS\u0016,}\\InޖT\u001f)|I/\u0016ok&T 4*\u0017\u001dKK\u000e;xHw70TV\u0002S{\u0019[X;z\u0005E'dd3NwCݼ3ro>>ILͧF'\t*P:^\u0004L%Ƅ\u0005LmX\tLBԒ\u0012SԌlaut\u000b:(>%15ן\u0018TbPqICʊ&Ƅ\u0007z8X\u0018\u0011S\u000bfbj\u0001T\f0Øjn\u0000E\u0017uJZ}rL\u0012ˏjlI:\u001b~eYG\u0001`Jc\nS\u001f~\u00192k~\u0013`?8<&153GQRg\u001fWtҩ'#V'\u0004@C\u001aˉ bXOuLi\u0003S6TDlbZf.g\ng\u001f)Sb1A%3(?&T(4:Z\u001ajK\nӓb#ފcҊ\u0006aN\u0019\u0019\u001d:%>\u0019):BņߥAb\u0002J\u0006<mE>)}\u0013K\u001bGwؤ\n\u0019S]}NA\u000fRW(?\u0007\u0013cl\rv57V(rғ\")K}Z\u001a\u001b3j6Ɣ\u00131\u0015t4+xemcSk{w\u001f>0tJZ}s\u0003\t'\b\u0015I:\r\u0017\u0013H\tS057L%\u0003SEn>PA\u001eNէ\"TL'Hү\u000e]:|JA)}Zۧ3\u0014aL\u001e\tKN/:^Uw,>PNɫOm\u001f\nՋ$\u001b8\u0000L S\u0019)!^.vԞ70eeL'g\u0017!Sm=γ'Qt)xP\u000eo\u001c$+uU\u000bs3gŔ\u00010̘J\u00019S\u00069S\u0013\u000fI:%ǔDT\u001f0ulw{zb*5>2?;2\u000b˪O\u001f$ξ.3~7EE_LF\u0004U>Uaj!gp`X40SP\\NLu\u0001S)}OdEWCR)>|aԩ겢cTLy\"S\tT\tga}):'H0\u001eN\"Ss=\u001d\u0012B\u0003]L_FݺL)Jk\u001aNn\u001bp*0%})%ų\u001fL\u0018Lj \u0012){bjtV3\u000eڹp2\nb\u001b\u001abL)gS|G\u0013#o\\eL55T\u0017::8ԪZUݤ6Ԥo\u0012Gjq\\q[br\u001c\u0012\u001b%6v\u0018\u0018p\u0000\u001b0\b}_ľ\u000eXf`\u0006f\u0018@:b\u0016V#v>{Y\u0001ŝ\u001b>:\u0019ڽӒێ`?81%ʕ0)z\u000b?HǦF\nL STBtX\u001b6^|\u001dLy\u0012S9\u0005\u0012\\Y\u0007zZv\u0013]\u001f25`SU奅\u0006^:{ª|S!\u00111T\tfM)<VVW9%,R\"Sؔۃ{7\u0003&~i`\n1\u000bb21¦&&\u0013xx-7:<Quw4\u0019r\u0006Sv7LT@H$TSkGwJ\u001bB':5%8S0\u0000jEܬԄp~3u%0J-,)PT#S}`>0E)\u0001M-1%TbLx;6u\u0011-M%!S`AŚ\u001a\u0019bSMu<SOMLԇ\u001a\ncMU1\u00064<}B9\u0017͙J[\rL9`S~zSTs['5e3\u0019\u001a\u000etnԏ\rLm\u0007S\u001c=yg*g\u0001L\rh\u0007')3557UOL)owg[6bʞ1\u0015LJ+\u0019SzS\u000b`ju>75CLT\u001b2%`S\u0011zS'T2k35L\"SLQS\u00021M=R$`*)6\"\u0018LoʕoJ7l#\u001c1æ͙\n똺\u0017\u00187L\rq)fhj3U\u0019Sﰦ\u001d))2EMNLґg\u001eLy]S`WojOmA#SML=5kJ\u0007&%jJȁUCS]`\u0006k*\u001aLe)9cJL=\u0004ڋ\u0017<S:\nj0gM\u0005!S\u0019T\u001d5e[!S+K\u000bfMeoQ05CM\t=sڑW5LI)ؔ3UFM^*IK\u0012S)\r5e#MM\u001bbMEnyfLUZ\u0004\u0015S%T\u0016\u001al͛zgSdT\u0007\u001c5%~ SԔM-ki\u001eRS6VgT75e;_LRS\u0014}h[V똢\rySN\u0015STM\"SaԔ75e`Jx5SRlgj\u0012x<S\u0013Ly\u0010S|ISCԔMdlJ͙l9;{3&\u0016)AgT\u001b2%jSjjFjJDM6ڋybjȚs3L)TOg[s\u000fcj\u0004LMSSB\u000fLlԁ\r\nDҳ󋐩Zl֬J۬)\u0007T\u0014\u0012偩JIdj\u0012pVM\u0011SO-\u0011IK\u001a)\u0017Ԕ0L\"S#CZlԔ\u001d1ԟLMћ\u0004\u001dcj\"0\u0018\u001b\u0011\u0004YSw15u\u000ek**G:)\u0018ϔ\\&ƦbNlĔ_`T\u0015cj@;șZ825\u0000Z))Lݻyu\\܉$d\f2JM\t4#Sځ֦:\u0003S^^35uT(\u0010015\u000f\u0013lV\n\b\u0004SY`3\u0019\u001c\u001e\u001d\u0004\u001ekjȔ\u0012J5oF\u0003S\u001f\u001f=yւnb\u00045%^M\r\u000fj:eT\\ȘræΚ5;\u0003Sױ)_0\u0015KLU(T+\u00025%఩%05\u0003F\nL STBtxԧ\u0019y<}\u0003B\u0018S%zS*ȉ8?735\u001cjoi%2T\u00182\u0000L]bMa\td궣\u001b1[PR&STcS`j\b\u0006S\u0014\u001d~lgj\u0002L̚L76\u0013\u0003S\u0017)g0\u001f\u0012\u00012s֎^Z742619=;GM\t8\u0013Sjl\nLaM}{ޢ7`55NL-O1\u0016g!\u001fL5\u00020\u0015\u000f|YS͘\u0005g\bLL\u0018l\u0018L)~AA%\b2PCLeG\u0006z~ϙo[4 S}#b\u0012R2%R\u0016Lu\u000fh\u0007yjJٷ\fo\u0016fȐ5@9Sq>|ςԭ{\u000f,8\u001cLe)RYFL7Ggjue35\u001dk\u0014dl11g*\u001a*\u0002SUT߀1EcO\u0019dj\u0018Luw6W+dbd*\u000eL\u000eW.Z46#9SO\u0005G'gU5`OaSH\u0017rƳoPÚcSq!>\u001f\u001aww\u001azĘJ\u0007S\u0015U5M\u001dݽ`7'̌f߰NB\u001aRIq(=\tz>6}fL\u000e>`M]w\u000f\u001f=y\u001a\u0014\u0016M\u0015)\u00056ի\u000f?z\u000b6D'o\u0014fN)DiI\u001b73)療aQqIiYe\u0015:\u0018~]j<AD\u000f*A?٧ScSJd*\u000bLE\u0004?{\u0002\\\u00190ˢ\u0003`\u00021\u0001B2\u001c\u000f?t/ЇJ)bJƳ07+-r\u0005Sԡ}vX6\u000b_!S\u001e~TNAD&Wr\u000f\u001f\u0012ps\nh\u0011S5U\u0015TjbL8puz/F@\u0010SWoܽ\u0017\u0010\u001a\u0019SP,V\u0012Sx\u0019\u001dT\u0014B\u0014sNf_g[S} '35!&<7L\u001d;w׎wL\u0016\u0003??͘r\r\b@Jn#C%\f)|T_aS)\tؔop3+CSoyl\u0005LD$dd\u0017+)H\u0007\u0004\u001a)nUe\f0\u0015\u0016⸾>ogp?\u0018\u0012\u0015\u000ft|P\u000f/?P\t+L,1_\u0018SpcSJ\u0014J'\u001doaSȚSĔpxt|r(LL\u0019\u001cTϏ\u0012P3>bfR*.\u0013'G)70u\rL}\u0006>`jCN\u0003S\u001d\u001e<\u000bBҲrÏ\u001cTGtP\t)Bǫ9Ef_e96\u0014?;\u0003\u000fw]ًU^h\n\u0002\f\tȒ%#le(#졀 @![3jm\u0015E\u0011\u0019υzi8^Mx\u0006x\t|TW\u0014e&'Ą\u0005;ْA*S}\u000fASl*$r\u0011-(.[nˎ\u0006>Cj'S\u0018~ڢ})\u0011}ݻ\u0003u*z˙ǿ:aǖU`*7#9^65e<)#S+;gw6_\\ZY]S\u0007^8)(Tm7ns)JCՋFZS:~KTt<T}\u0015\u0005\u0019Iѡ>nf`jd\u0017SOfS\u0011\u000b\u00133rVVVߎ(\\DqKүWM5%&)_\u001f=wV\u0000o\u001d>LY9Is\u0015\u0012\u001ft*T\u001c~E\u0005~f\u0004)jS9n^**:}6o\\8?'=1.L٘Mmr\u0017OJ^LwT*TWˏ\u0017hT\u001a1DJ^S)nCq\u000e6mX8?;\rL{a3)쥅%\n\"\u001f_~ʢRPizIњRo:\u0004gM5k*Ke-\f\u0002SOejlGW2\u0015WB\u001c~PҹPqEJPIQA6k\n6&QѷTW\\4+\u0015L\u0005)k05nOզ\u0006\u001cϦ<}\u0017E-I+(\u0006S\\EO84T=^I6\u0005kJD\u001f)+JE\u0011~s\u001dg\u0019M\u001e7M\u0019[\nSKR2s\u000bKۼM)Tx]-\u001dNGO\u00133)L>8xMqqNg_UyIa^f\n\n\"SM\u0019\u001aΙ1?04*vqJFn>\u001f~BE\u0007-],*8TG4U=tX\u0014$\u001dbMu=|(LNX\u0018\u001e1HO$S6l*r\u001c8C\u0012\n\u0015\u001f\\~Ţ~\u0007\u001f~\n:\u0015\u001f\u0007ƪG\"\u0014䃂.)ƯNaE 7#9!&|4d8eO@Ht:CڳVh鼨(\u0014T\t\u0015*U\u000fW(ZR\u0012):+k\n3N\u001c:E\u0015}ͪ\u0005є\tb\u0011c\u0019\nX\u0018\u0014\u000f?.T\r(Ѣ&\u001fT*TTi>y%\"Q{\n)J>ZS`MՇGu\n*zʢeiqa9YL4vN\u0006)f\u00111YyXҩPؽ\u0017\u000fZXT~xIDTɮ4X\u001fH?g(\\RLɣ|t]~\u0002Ժ*<TTh\u000f2DS}h0C\n\n[I%\u001d\nU\u0016\n*\u0015z**\nYuv0<\u0001(\u0016KJRH\u00144\u001c}X\u0017e.\n\tqwmal8I5Sz`j_PXt\u0014.Pj!hQ5Ңpr5TjTܪHĊ]u)_Mw.2(!J,)\u0014%\u001f)XSM\"NٗxQdH[7M:M.\b\u000fK\u0014~_bKE\u0005H?\t\u0003BJR%X+E\u001byik/?\n\u0014RG`M]k\u0004]}Qg`/7G[sczԦz\u0013N7\u001b\u0018\u001a(\u0001J:\u0016*\u0011~ұQ>{oʨ?\u0010T\u0011+`I=\u0016+ϰ'\u0000\u0012\u001et~\u0007G(NAE\u000fL\u0005y\u0006\u0013\f\u001b6W45My\u000f\f/\u000bUj\b[w6HL\u000bk2JĊ\\\tYum\u001eCrt?KWЏQ\u0005D%\"\u0005\\3\u0014}X'Ǆ\u0007zα\u0001S\u0013oզLbdba;gO\u0000\u001c~qPˏ\u0017\u0015~'O7Kn\u0010;J*J@\u0015\"X\u0012-.t?I\u000b$\u0012;!\u001eu[2\u0005z)XSG\u000ek؉чu\n+zb\\t\u0002_\u000e6f3Amjؘ/ؔ<\u001f<bPQaKEux#\u001fT*Txݹ+]%\u0002W\bdIԼԣy? L\t8'\u0006ŢxIݻ{\u0013榓yMqQL/4p,45T1\u001b05\u0010LMfln\r_(T\u0014~Ţ:pOV;*ZV\u0015BX$K\t1yyó<\u000b\u001b?0'$\u001dAKv@\u0012|ͧO6u\u001az]\rE߲d:|[Ϛ>CM}:pd\u0019\u000fH.T˖n\u0003.*8P]q󖴪HĊ\\!,E\u0014]]\u0011{\u0017z!\u0011zH\u0012P\u0013p\"O\u0004\nV$ꟷo)a\u001d?v1fSE\u000f\tvw2jt\rgY;\u0017\"\n\u0015\u001a\u001e8t䘂+mPĪ\u0012P\u0002W\f\u000be\u0011-K-L=ϵy}\u001f3c\t,\nsz\u001b\u0004\u001fjjãozhU\u0015\u0005yYiPуݜ,M&\u001f5Qd\u000e\u000f`.TYyEaQmݱ7P\u0011Յ@aUGUҲx \\\tX(K}I5G{{\u0011N-\u0000YĜ\u0013\u0015%%v\u0005\u0014\u000f\u00144t\"SPуܜf[>jS\u0003\u001a7`,َps+\\!-*pQOMu\u0002\u001f*VE\nX\u0012\u0000\u0016BZKF|[Λ?4\u0001'ĠdQ\\z.Hwh^<6@C:\u0015\u0015d>G\u0003)SK<PAe/-(*)EUSy+\u001b1ZZC\"U7iY\u0011+ZW\fKŸ$_jd]_ڼtO'CD\u000fǠ$Q׮^܃IA:wϮ[hMU,:\u0015\u0019\u0002g9ƆF\u000ejj؉SZ:8{qZ-\u0016\u0015߮=;Us\u000b*hU*dE!\u0000\u0016b[\u0004LyͻLwϩ<#\u00037&OI\u0002%wȽ֖f&uЁ}{ pMUÚ/351.&\"\u0018>\u0007\u001b󙆓o2edB'\u0015E\taQUVٸ~\u001bT*\u0019\u0015VhUҮX+\u0001\u000bd!-ź$`b\u001ea\u001eiV7\u0014\u001eȌX\u0012Y\u0002L9'\u0019T\u001b&uӧ\u0003P 6m5U\\@\u0017\u001b\u001d\u001egLIcG\flw`j\b\tSͭ\\PaAK͇E\u0007JAE?wSg\u0016\u0006lL\nHm}\u0012\u0015\r\u0001XP# 6\u0010\u0010\u0007!\u0016\u0004C\u0001\u000b\u0012W\u0007X:IV:f6;\u0012{]~}Q\u0018QW|p\\FU?ĕ\u0006\u000b@Ke0#~\u0019Lt;zgU,QWXy\u0004e\u0014!K\u0001~|@r[˅\u001a\\SбEsgy\r05YL\b\u000fG:\u000f*,IUQakhƝPuuaUq\u0001>z̻J]i hKtiTfc2L\u0003W\u000f oG\u0014'R*Q߱LHχwTj*\u0003}q8p,35SVv\u001e>3-\n\t\r[\u001b\u0011\u0017\u0000W:*+'\bۏ'\u0015P]RU_T=Q\u0015+\u0012Y%K\u0003f@__?ht:zGP\"&\u0000ꑈ\u000eTc\u001d7_q\u0001jQY}6DفζS&\u0018M\u0015S\u0003\u001e\u0017G*x&_Q\u001a\u0013TRUFUp\t+\u0005\u000b\u0012]ʗFL/C\f/CPѢ^ށ\u000f\"3$>\u0011u6JkW:@|c9|yOHKI\u001f{/#~|ɂف>\u001eN\u0003MMsr?k\u000e\\~;q:*ۏ'\u0015QjCUu~s\u001bWg\",\u0005ZE\\%^jT^\ry\f>WQkwPRI\u001a\u0015ǭ'DI)RB/'KjJV\u001fΩ5+-\u001f<Ԩ:{ϔ#]-?\\骨\n4T/]\u0017U誻tVʕ\u0012Y\u0005[E]'͘ʋҜȠ|a\u001c6{ygB\t\td\u0011T/(꺉z\u0005!c/\u0013T\n.ݻo޸\u001e'g\u0002;XN\u0018'SSn^~<Õ\u0015\u0015lm쿶\u000eM\u0015\u001e\u0015]\u001e>R@\u000bKI\u0019|dΰ2\u0000L6xy\u001fD\u0012-)LK=zYQwznn\\%%{pLqӇ\u0013շ\u0014}n֖?5\u001a3q/%\":r\u0004/3;'돨XU:P\r\\݊\u0015]\u0004\u0012ZE]KI~0͏>\f{Nʍ!\u0005-&b\tI8\u0019<&.l=R*A\n\u00146_\u0003񱻶oXs\n>oW7L9z\u0004\u0004] /|(\u0014U#\nMUZ^Q\u0002dWR4W+EY}b\u000b\u000b\u001e+a\nʓ7Ԝ\u0011y>1Z#\u0004JGM\fn\u0012Q()ڳո@TFC\u0007YSQ\\}8py:L0\b,\u001d\\3_\r_bpR\u001f\u0013T\u0005E%pUQ\u00156\u0012+ƺ\u0000`\u000b~\u0001=Ԝ\u0019xΰxx\u001fi3(\u000f oGIR\u0003jRIbEa)Q*qK\u0014\tQS7[s\n'4qFS'XZ;{L\u0019<oQȲFlڼm.l?T@:_$U\u0005(\u0005\u0004J\\uJaQ\u0016i\u0016pA\"0!b՜g\fO\u0001\u001f\u0003 \t%&jRk\u0004rI\u0013Œ*+)-ERGS\u0013\u000fcMm\n9\u0015\u0014lg5y'&,9{\u0005\u0006]xih\u0018*rl}\u0007\u0015オUEU܀M,++\u0015`(\u000b\u0016p\u0000\u0013b5f*/s\u0006\u001dq\u000f+9,[Ԅv\u0002'd\u0000;\nsqKT\n7\u001f>}[qc᜚o\u001fM515\rG:_r\u0014UF~\u001a*\u001cO΁b\u001c\n.\u0014,EZ\u000b\u0017ۚ3-w\u0007=s%\u000fQѢM^^8$R$&ѤqV\rTC}\u0012%%}J'\u0017s\u001bjjmX(V~nNS'\r05\u0011G-\rE퇓*\u0003GU\u0016**9\u000bVV\u0015a,E\u000b됺(KI5dzy[\u001ebE\u001fMB\u0012J׉I4)NS3Aj*ET\t  DJM,\u0017\u001ch\u0003StS\u001fT\u001b\u001e\\~\u000bppRpr\u0006,EYUr\u0007UC\u0015`ve\nt\u0017|0\u0012STn\u000eH;ȧ\fM\u0003)\b(\u0015eM4\t\rUS]Yq\u0014\u001d\u0005Q,qb\u0018&,t\u0005sg\u0005x:L8F3\u0007\u001a7i=\u000e*,V\u0012ET8\u0013\u000eqAIvUn>˪Tڪ\u001aue%EZ\u0005\\\u0005^%\u0014\no\u0006us#M\u001b㠵_g] I(\u0010\u0013|39PgKK\u000b\u000bD\u0014Jɉ\u000eluV.\u000fbomijqX\u000bFQ,[\u0011z]*:v)JՉS,B\u0002QW\u0002UW/\u0016{\bLXr&x-m\\ykSM.\u0011\u0012zIYjjD9בL@D$%\u001c\u0017\u001f+\"7_\u0005jj@?owgi\u0013F`jDivX~,\b*TѻqT\u001d0:\"\\.b3\u0015l\u001a,U\u0000]\u0005_\"Ƙ*L22i\f\u0018E=\u0004\u001a|&BB/)KPNDNS\u0011@栢2O\u001e(\\RI({bAj\u000bIX¯\u000f甓k,l\u001d\\ܽ|\u0003XT~+W\u0011\u0015n;*!1)pj\f*K*`A\u0016iUV)\\g\u0017\t1\u0018c\u001a49o}dͦ\u0013nǮ\u001e\u0001Eu|sK5ՂIi\u0012N,ܜ,\u0001ut!TRk>gMay:ZM\u001eob1\u0013,xPyJQ[YB\u00151rV?MC(4i\u0013+\u0005YE%%\u0005\\\u000bj\u00048S5IpRoaͫtµ#{T\u000b*RP*/#&hb;itB@\u001eNNJ=1vFmU,BMvwq:y5S)|\\=}\u0003\u0002`\u0011\u0015_MbbGYUꑴt֕˧-*\u0016^EabʘJ=U\u0003SmoF[ez\u0002y\r>\u000bJI@0A\u00139i2P\u0007\u0000\u0000\u0000\u0000\u0000\tSSi\u001aQ\u0012\u0012\u0002\u0002deMH\u0011\u0012E@V\u0015,\u0016YT@@PP[E\rPٔ.{z9{܄Mv[<~pmu\u00137F\u0006\u0007vw6EBbOQ-;3s\u0017ҳ,B<P\u0015oj~ʵC#7'goߙxoO~y拗^y\u000f\u001f>\u001f\u001c\u001c\u001e~GGG/7o\u001a}e)3ڿk/[p/\u0018\u0007\u001b\u001d}\u000e\u000f\u000f\u000evw?~~g{{7_|\u0019Am<|v\u0019ܚ\u001c1\fR}ݝ\u0017\u001bjAUh1'α\u00178=e`(R*\u000e\f\u000e*U-]\u0012V\u000f\u001e?\u0012W\n\u0016d)ZE\\\u001f\u000b\u0000\fhP)i~=k_~\u0018,}bfE8>\u0019.6\u0003;;[[I8)OO\u001eo\u0013\u0012n\u0014DH\u000e_+\u0005R8S%^gAՔ7es\u0014}8THéɛ3p\u0016xV\rd\u0016m\u0011\u0017um\u0017A\u00182\u0005Mڋb\u0007FG\u00141Ѣϯ,\u0007+a-DJ_zDMH<_\u0007PsqD~!XWS3U.rZ\u0012LePUTVU\u0000UŶ\u000e*Q5rcl\u0002Ǌj)\n\"\u0017%(\fR;&mI{+s{;:!˼\":\"$H|.\t.y\u00005=5\tQ#C8R}=]B&\\\u0015r\u0015,Y\u0017EMe,6{A[R握\u0012U\u0003C#\u0004NLޜ\u0012X\u0000Gk}\u0002\u0018ئ0\u0013h/\u0005[שzctR>j_i+\"$ɑS\u0007$\u0013>y\u0002j0EH]hÇ*+J=NG^N\f/tz#Hm}c3Nr\u0015j\bմ\u0012Y8YKUх\u0005`\u0010\u0006bD&DT׳\u0013zn\u0015O&8\u001c\t[m\u0011!{<N4DO7'\bjp@lԊR5P%|<SVs\u0014~PYmvG\u0011~*SJUz\u0000?p,\u0005[\u0005]\f`\u0010\u0006bT&\u00145i]Ɵ\u0007$\u0016]\u0011$\u001cg+a-l,\u0016\u0017Œ`&4AO#P\u0003׮(Q-M\ruR\u0012n2á*(ryK*\u0002\u0010N\u0015U\u000b\u0001VVpL\u0016h,u\ty\b\u00031\"\u0013f&-ZI7/Wϯ!,\n! Z\u0000#8CIf\u00120Q4HOW\bMT+R\u001e'\u0014>}\u001e3u!=_?\u0017>e\u0015`(\u001col\u0012VGEYC#E[\u0013\u0005^\u0005`\u0010\u0006bDv؜ּk\\?{t\n5lıfh\u0006\u0001MR\u0012K\u0004M\u001a'x~bksSC}m$\u001c\n\u0006*HUȳYYzSAeɵ;\nTQ\u0015u\r`ժ\u0012X\u0005Zu}kTA\u0018Q\u0019)t\u001a}R<L|\u0000m\u00115\u000f`\u001cnL\u001cR\u0012)5\u001e'hVx\u001aj\"ա`XHsY9\u00153?~Yf\u000bPt{}%T\u0015\bV\u0015UCc\u0006pV_?u\u0017|\u0001\u0018\u0018وH\u001b\u0015mZc\u001b}\u001e|,Ĺ8\u001bÆ\u0003\u0002wWa&p(\u001a\b*\\]\u0015\fJn'ILeLϔ\rTy<UPU\\RV\u000eV++j,Т\u000e\u0012^=\u0000\u0006a4FetvU]ST\u0013\u001bv\rD}g^=,8]\u001f\u0015\u0010R\u0017)%`&ũ&\\\u001d\nV\u0006*DU\u0014%:Si\u001a*[\u001eN\u0015UyȪ4抰 KѢ\u0016(\u0000\f@.YP\u0016nP]gy-D_t\u001e%a?\bFttZ[h\t\t\"\u0011͓\u001f]<2eeӧ\u000f*\u0016r(VQW\u0005YB:L\\E^\r\u0000\u0006a Fdd&Ě\u0016=\u000ec\u001eDH\r8!ĢpPOIL\u0004LФ8S\t@y\\Nܨ|{ͪHMɡ¥⩂\\{\u0005X%*E]\u0005_\u0000\u0006a FddVGiA\u0018)UF߳oD[IM&qF\u0019!p5 H2\u0000L8N$<n*pFr,$R4\u0005TeBY\u0012Wdfy}E]e\u0005`\u0010\u0006b0FeAB\u0012k!M\u0015N(rjN۩Tmm&qH.a\u0003\u0017)}>&r';AYET&I%PAbEW\u0002\u000bH\u0002/\u00020\b\u00031\"+RI\u0015)\n\u0018}\u001a\u001f':\u001aP\\GFJDJE\u0004M$\u0000$4R1S\u001a\u000bJ\u0002,ʲXi\u000b\u000e_\u0000\u0006a4FeҘ[MgvlX|n5&g@\u0004E`\u0010GK\u001c+\u00138ѓ\u0004R\n\u0014+\u0005\u000bH+d./\u0000#1\"\u0013fZ\u001cI\u0015|\nξ㋱i[eed1>\f@Y,&p'R\u0012L\t*劰\u0014-.2HLi$V.F?Z)Vm\u0018U\u001c_\b2\u0004$.\u0010͹c\u0012\\u\u0011JK.e\u00188vu\u0012:tbJ9#;\u001d\"###\u001f\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000_DV\r\nendstream\rendobj\r2137 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2139 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 252/Intent/RelativeColorimetric/Length 720/Name/X/SMask 2259 0 R/Subtype/Image/Type/XObject/Width 823>>stream\r\nH1\u0011\u0000 \f\u00004\u0016\\!3\u0001H\u0003\u000b@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd@\rd\u0000\u0000\u0000\u0000\u0000\u0000\t@\u0000@\u00049\nug\u0005;6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003m \rd6\u00062@f\u001bl\u0003|\u0003l\u0003|\u0003\u001e;7\u0006r\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000]!\r\nendstream\rendobj\r2259 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 823>>/Filter/FlateDecode/Height 252/Intent/RelativeColorimetric/Length 1211/Name/X/Subtype/Image/Type/XObject/Width 823>>stream\r\nH=.$\u0000\u0000\u0011'\n\u0010JJ@\u0011\u001c@E3\u0015\u0016.A\u0006*QD#kmvy<\u001d|߷o\u0018\f\r\u0006\u0019NM\u0001_\u001a\ng05_\\ZY]\u00038?f8ZX^\u0005&\\_^\u0018\r?f~yc\u0014`ocy\fFg\u0017K`#\u000ej|v4҆+[W\u000fOd\u000fW[+?[>~x~y\u0005&{y~8^fmd|\u000eLx3>]w`קS@ \u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003\u000f\u0000\u0000\u0000\u0000\u0000\u00001N\u0001\u0014Q\bH,(\b\u0004K\n+*\n%\u0000*\t5S.\u0000ڹ\u0003*biGlqL1&&39+x͗᛽<=.NGG哳ۿ\nkl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bf3]o@n5Mw8Yn\u0017yYNlx~bz1\u001et\u001fZ|?\u00007|o\u000eٔdXnbb>5C6Fj4΀bӛݨ\u001c9*WO۽`xq\t\u0014\u0018\u000ei}MlugWVQ\u001cC7q~\u0002|^;V\u0011N\f]w4@\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ʄ\f\r\nendstream\rendobj\r2138 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2260 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2260 0 obj\r<</BC 2261 0 R/G 2262 0 R/S/Luminosity/Type/Mask>>\rendobj\r2261 0 obj\r[0.0 0.0 0.0]\rendobj\r2262 0 obj\r<</BBox[278.0 246.0 1101.0 -6.0]/Group 2263 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2264 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n823 0 0 252 278 -6 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2263 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2264 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 823>>/Filter/FlateDecode/Height 252/Intent/RelativeColorimetric/Length 1211/Name/X/Subtype/Image/Type/XObject/Width 823>>stream\r\nH=.$\u0000\u0000\u0011'\n\u0010JJ@\u0011\u001c@E3\u0015\u0016.A\u0006*QD#kmvy<\u001d|߷o\u0018\f\r\u0006\u0019NM\u0001_\u001a\ng05_\\ZY]\u00038?f8ZX^\u0005&\\_^\u0018\r?f~yc\u0014`ocy\fFg\u0017K`#\u000ej|v4҆+[W\u000fOd\u000fW[+?[>~x~y\u0005&{y~8^fmd|\u000eLx3>]w`קS@ \u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003l \rdL6\u00062@&\u001bd\u0003\u000f\u0000\u0000\u0000\u0000\u0000\u00001N\u0001\u0014Q\bH,(\b\u0004K\n+*\n%\u0000*\t5S.\u0000ڹ\u0003*biGlqL1&&39+x͗᛽<=.NGG哳ۿ\nkl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bl &\u001b\u0006bf3]o@n5Mw8Yn\u0017yYNlx~bz1\u001et\u001fZ|?\u00007|o\u000eٔdXnbb>5C6Fj4΀bӛݨ\u001c9*WO۽`xq\t\u0014\u0018\u000ei}MlugWVQ\u001cC7q~\u0002|^;V\u0011N\f]w4@\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ʄ\f\r\nendstream\rendobj\r2136 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2133 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2135 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 33/Name/X/SMask 2265 0 R/Subtype/Image/Type/XObject/Width 72>>stream\r\nHb`\u0018\u0005`\u0014Q0\nFp\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0007\r\nendstream\rendobj\r2265 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 72>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 945/Name/X/Subtype/Image/Type/XObject/Width 72>>stream\r\nHܔish\u0010ǣ*\n\"x\u0005\u0015O.\u0005E[&T\u0010@tgjwfE^v\u0015S]?G,\u0016룔x\u0002N&p\"oX\u000f00J)\u0012\u0013?\u0003\u0001\u0002D\u0002A8gX3\u0004\u0012ľ\u0000\u0004\u0004#$K\u0012hlk톔M`$@\u0000l\t8E)0\u0004£('q%`u7\u001eT4\tJ\u0018a8I\u0004(\r\b?1Pq\fE8(F\u0010XXɴ-[1R\u0019ls4&lT\f),˰\u001d\u00148BW\u0006f\\9V[)xAjD劕ZTUO׮ު5ʢrY%\u0006\u0017\u000evٯ6~CizCݞ\u0004\u00035p\\4g\u0017\u001c\u000f\u000bs`hv&V;2j)\u000f\u0016Gتywح#Ylv69\u001c\fƳ\fo ߱\u00162_95_\u0017aft56\u000f?l\u0016S/\u0014x\u0014L&؝_?\u0016Ӆ7I4p\u0018y]cWAGmg~K?^̶tlM/o\u000f\u000f<C+'S<6Ԟ;h5Uݜx/-5p\u0017xK\u001dlS__ϧmL^;'*GXꃦ,).O\u0007߱Mww\u0006\u0013siU}8j:5 \u0015\u001aeerB]s\u0005oLi\rkMǛʂPQ;Z=\r@\u001fp\u0012\bIhLJgz{<J٬I4W\u0014ˀ&JmZ\u0016eE\u0016\u0018?7q\bB\u0000\u0001P8Dź6\u001eR6Musl&\u0003@\u00190\u0019<l$B%'P\u0001)J%#:A\u0012@Lp$5\f!@q\fp\t\u001ck\"c!z<,l\u001a\u000f\u001fE(ҏ\u001c\u0001#̰ \u0013Q?;}eԏ:uԏb'\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000U\r\nendstream\rendobj\r2134 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2266 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2266 0 obj\r<</BC 2267 0 R/G 2268 0 R/S/Luminosity/Type/Mask>>\rendobj\r2267 0 obj\r[0.0 0.0 0.0]\rendobj\r2268 0 obj\r<</BBox[1109.0 725.0 1181.0 697.0]/Group 2269 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2270 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n72 0 0 28 1109 697 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2269 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2270 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 72>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 945/Name/X/Subtype/Image/Type/XObject/Width 72>>stream\r\nHܔish\u0010ǣ*\n\"x\u0005\u0015O.\u0005E[&T\u0010@tgjwfE^v\u0015S]?G,\u0016룔x\u0002N&p\"oX\u000f00J)\u0012\u0013?\u0003\u0001\u0002D\u0002A8gX3\u0004\u0012ľ\u0000\u0004\u0004#$K\u0012hlk톔M`$@\u0000l\t8E)0\u0004£('q%`u7\u001eT4\tJ\u0018a8I\u0004(\r\b?1Pq\fE8(F\u0010XXɴ-[1R\u0019ls4&lT\f),˰\u001d\u00148BW\u0006f\\9V[)xAjD劕ZTUO׮ު5ʢrY%\u0006\u0017\u000evٯ6~CizCݞ\u0004\u00035p\\4g\u0017\u001c\u000f\u000bs`hv&V;2j)\u000f\u0016Gتywح#Ylv69\u001c\fƳ\fo ߱\u00162_95_\u0017aft56\u000f?l\u0016S/\u0014x\u0014L&؝_?\u0016Ӆ7I4p\u0018y]cWAGmg~K?^̶tlM/o\u000f\u000f<C+'S<6Ԟ;h5Uݜx/-5p\u0017xK\u001dlS__ϧmL^;'*GXꃦ,).O\u0007߱Mww\u0006\u0013siU}8j:5 \u0015\u001aeerB]s\u0005oLi\rkMǛʂPQ;Z=\r@\u001fp\u0012\bIhLJgz{<J٬I4W\u0014ˀ&JmZ\u0016eE\u0016\u0018?7q\bB\u0000\u0001P8Dź6\u001eR6Musl&\u0003@\u00190\u0019<l$B%'P\u0001)J%#:A\u0012@Lp$5\f!@q\fp\t\u001ck\"c!z<,l\u001a\u000f\u001fE(ҏ\u001c\u0001#̰ \u0013Q?;}eԏ:uԏb'\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000U\r\nendstream\rendobj\r2131 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2132 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2271 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2271 0 obj\r<</BC 2272 0 R/G 2273 0 R/S/Luminosity/Type/Mask>>\rendobj\r2272 0 obj\r[0.0 0.0 0.0]\rendobj\r2273 0 obj\r<</BBox[1340.0 686.0 1367.0 659.0]/Group 2274 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 281 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 27 1340 659 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2274 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2129 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2130 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2275 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2275 0 obj\r<</BC 2276 0 R/G 2277 0 R/S/Luminosity/Type/Mask>>\rendobj\r2276 0 obj\r[0.0 0.0 0.0]\rendobj\r2277 0 obj\r<</BBox[1321.0 686.0 1348.0 659.0]/Group 2278 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 281 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 27 1321 659 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2278 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2127 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2128 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2279 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2279 0 obj\r<</BC 2280 0 R/G 2281 0 R/S/Luminosity/Type/Mask>>\rendobj\r2280 0 obj\r[0.0 0.0 0.0]\rendobj\r2281 0 obj\r<</BBox[1302.0 686.0 1329.0 659.0]/Group 2282 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 281 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n27 0 0 27 1302 659 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2282 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2124 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2126 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 38/Name/X/SMask 2283 0 R/Subtype/Image/Type/XObject/Width 202>>stream\r\nH1\u0001\u0000\u0000\u0000 Om\f\u001f\u0000\u0000\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0017\r\nendstream\rendobj\r2283 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 202>>/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 435/Name/X/Subtype/Image/Type/XObject/Width 202>>stream\r\nH1@\u0014ag0\u0004*\n&RА\u00070Q\u000f`g\u0002n\u0011<\u0016Vv46`ia.h\u001a}Od2ԅ\u0010\u0006\u0018B/\u000ḛ\u001cE8AD)EPJN\u0012ɣ\u0005 kaZ6,5Y)\tD,z\u0000v[ͺ]*wJ\u0002QU\u001fA5\u001eN&H\u0018PuzSϟj{^V.\bu(ȥjg0[7\u0016Tf\r:ՒLu$VqzU\u000eGP\u001d]&CA7e?c`O`96tM$\u001b;ޝ'.iM#tM\u001457\u0019\u001c$?lJ(W-w<\u000f\u000foO\u000f|Z*\u0014d=\u001cI.ẗ́=EyB\u0019OϽ0=\u0013ތ)E50-\u001bTi,|CR\nCD)EPJN\u0012\t\u0000YX\"\u001cZ\u0010\u0006\u0018zq\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000j5\r\nendstream\rendobj\r2125 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2284 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2284 0 obj\r<</BC 2285 0 R/G 2286 0 R/S/Luminosity/Type/Mask>>\rendobj\r2285 0 obj\r[0.0 0.0 0.0]\rendobj\r2286 0 obj\r<</BBox[1109.0 687.0 1311.0 657.0]/Group 2287 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2288 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n202 0 0 30 1109 657 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2287 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2288 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 202>>/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 435/Name/X/Subtype/Image/Type/XObject/Width 202>>stream\r\nH1@\u0014ag0\u0004*\n&RА\u00070Q\u000f`g\u0002n\u0011<\u0016Vv46`ia.h\u001a}Od2ԅ\u0010\u0006\u0018B/\u000ḛ\u001cE8AD)EPJN\u0012ɣ\u0005 kaZ6,5Y)\tD,z\u0000v[ͺ]*wJ\u0002QU\u001fA5\u001eN&H\u0018PuzSϟj{^V.\bu(ȥjg0[7\u0016Tf\r:ՒLu$VqzU\u000eGP\u001d]&CA7e?c`O`96tM$\u001b;ޝ'.iM#tM\u001457\u0019\u001c$?lJ(W-w<\u000f\u000foO\u000f|Z*\u0014d=\u001cI.ẗ́=EyB\u0019OϽ0=\u0013ތ)E50-\u001bTi,|CR\nCD)EPJN\u0012\t\u0000YX\"\u001cZ\u0010\u0006\u0018zq\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000j5\r\nendstream\rendobj\r2121 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2123 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 35/Name/X/SMask 2289 0 R/Subtype/Image/Type/XObject/Width 104>>stream\r\nH\u0001\r\u0000\u0000\u0000 Om\u000e7\u0000\u00007\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000b\r\nendstream\rendobj\r2289 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 104>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 385/Name/X/Subtype/Image/Type/XObject/Width 104>>stream\r\nH?P\u0018`!\u0006E>P}\u00007AS\u001fCS-v6g\u0017.!6:\u0018X׺\u0010{yÏZ0\u0000\u001d\fg\u00018AR4T(\u0001B1\u001e/\f \".C6aaHQ5h(Kh\u0018NҦi;\u001fplӘj\u0012ǼDFukOkoaЈ~\u001dNm\u0010F_\u0010`'2\u0000J|\ftw˹.\u0014xaı\u000eI\u0017W\u0014y\u001cv5\u0016G \u000egm\\ʪJU^x\rD\u0001ddx1+\u001d*̎g$xWUx+ȚFTpe*c@\u0016TۏҢ\"|[\u0015g9\u000e8ڀF\u0007|\u00107T\u0007>@ߐkT\u0007=E\u000f\u001dd\r]\u001f};\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0012N\r\nendstream\rendobj\r2122 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2290 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2290 0 obj\r<</BC 2291 0 R/G 2292 0 R/S/Luminosity/Type/Mask>>\rendobj\r2291 0 obj\r[0.0 0.0 0.0]\rendobj\r2292 0 obj\r<</BBox[1264.0 668.0 1368.0 639.0]/Group 2293 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2294 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n104 0 0 29 1264 639 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2293 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2294 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 104>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 385/Name/X/Subtype/Image/Type/XObject/Width 104>>stream\r\nH?P\u0018`!\u0006E>P}\u00007AS\u001fCS-v6g\u0017.!6:\u0018X׺\u0010{yÏZ0\u0000\u001d\fg\u00018AR4T(\u0001B1\u001e/\f \".C6aaHQ5h(Kh\u0018NҦi;\u001fplӘj\u0012ǼDFukOkoaЈ~\u001dNm\u0010F_\u0010`'2\u0000J|\ftw˹.\u0014xaı\u000eI\u0017W\u0014y\u001cv5\u0016G \u000egm\\ʪJU^x\rD\u0001ddx1+\u001d*̎g$xWUx+ȚFTpe*c@\u0016TۏҢ\"|[\u0015g9\u000e8ڀF\u0007|\u00107T\u0007>@ߐkT\u0007=E\u000f\u001dd\r]\u001f};\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0012N\r\nendstream\rendobj\r2118 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2120 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 36/Name/X/SMask 2295 0 R/Subtype/Image/Type/XObject/Width 147>>stream\r\nH1\u0001\u0000\u0000\u0000 Om\r\u000f\u0000\u0000\u0000\u0000.\f\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0010\r\nendstream\rendobj\r2295 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 147>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 389/Name/X/Subtype/Image/Type/XObject/Width 147>>stream\r\nH̗=P\u0014F\u0005\tT\u0010\u0005L !\u0001\u0017@.D%\u0004))mtl)\t\u0010\r\tA\u0007Lf\u0016Yɗn.\u0018\u0006`a\u0000N\u0014\r\u000b$p\u0011X'J\u00038HbcR\u00182i4tU۩5b\u0005\u001a;Sw\u0001;uƖ\"oHoO8\u0004\u001bߛٚ:36Z,x~\u0017H\u0013\u0018\u0015\u0013x^cg8irV\u000b[)\netʊzõ,S\re\u0019\u0013Fp\u000b٥\u001bX%;DV\t}㤨\u0003\u0016*w>\t$\u001a.-kxFS]\u0010\u0004ht}~m \u001a=\u001e5\u0007)/5\u001e7Ja;\u00064)!8K8\u0004\u0012\u001b?\u000e&`_BU\"ؽQPP㐼vQ\u001b\u0000\u0000\u0000\u0000\u0000\u0003\u0000Ơ\r\nendstream\rendobj\r2119 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2296 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2296 0 obj\r<</BC 2297 0 R/G 2298 0 R/S/Luminosity/Type/Mask>>\rendobj\r2297 0 obj\r[0.0 0.0 0.0]\rendobj\r2298 0 obj\r<</BBox[1109.0 668.0 1256.0 639.0]/Group 2299 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2300 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n147 0 0 29 1109 639 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2299 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2300 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 147>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 389/Name/X/Subtype/Image/Type/XObject/Width 147>>stream\r\nH̗=P\u0014F\u0005\tT\u0010\u0005L !\u0001\u0017@.D%\u0004))mtl)\t\u0010\r\tA\u0007Lf\u0016Yɗn.\u0018\u0006`a\u0000N\u0014\r\u000b$p\u0011X'J\u00038HbcR\u00182i4tU۩5b\u0005\u001a;Sw\u0001;uƖ\"oHoO8\u0004\u001bߛٚ:36Z,x~\u0017H\u0013\u0018\u0015\u0013x^cg8irV\u000b[)\netʊzõ,S\re\u0019\u0013Fp\u000b٥\u001bX%;DV\t}㤨\u0003\u0016*w>\t$\u001a.-kxFS]\u0010\u0004ht}~m \u001a=\u001e5\u0007)/5\u001e7Ja;\u00064)!8K8\u0004\u0012\u001b?\u000e&`_BU\"ؽQPP㐼vQ\u001b\u0000\u0000\u0000\u0000\u0000\u0003\u0000Ơ\r\nendstream\rendobj\r2115 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2117 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 39/Name/X/SMask 2301 0 R/Subtype/Image/Type/XObject/Width 244>>stream\r\nH1\u0001\u0000\u0000\u0000 Om\n?\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001c\r\nendstream\rendobj\r2301 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 244>>/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 475/Name/X/Subtype/Image/Type/XObject/Width 244>>stream\r\nHױn@\u001cqp \u0016΄\u0019\u0006\u0012\u0016\u0012\u0003>\u0000\u001b\tG\u0011dT\u0017֥1::4FcbhXM?>\u0001rp4\u001a5\u000e!\f:~1\u000bD\u0004\u001b\u0011x\u000eobB@cZKRpSRtv\\\u000fhc\"5LU\u0004a܁,à\u0019*=K2(\u0013~FJifNRno0\u001aO^6\u0019\u0006J\\54&w|\u0002r>\u000e﻾\u0010\\L7|]7\u001dжu؋uz\u001c\u001ay\u000e\u0000a\u000e[SK3\u0016 \u001b\u0003l~=\u001be}%q֜a<\u001c\u0000Ka3\u001f?v<XdnO\u001fw+I\u001eLm/y|^wkuݹ繆:~x\u000f}U\rܤ4[,|f5s9tV\r\u0013qr\u0007$\u000eg%4s\u0014ݴ\u001d\u0003ئH_##Tni\r4dJ\u000bI\u000bD\u0004\u001b\u0011oJ0\u000f\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u0000}\u00191\r\nendstream\rendobj\r2116 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2302 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2302 0 obj\r<</BC 2303 0 R/G 2304 0 R/S/Luminosity/Type/Mask>>\rendobj\r2303 0 obj\r[0.0 0.0 0.0]\rendobj\r2304 0 obj\r<</BBox[1109.0 706.0 1353.0 676.0]/Group 2305 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2306 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n244 0 0 30 1109 676 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2305 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2306 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 244>>/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 475/Name/X/Subtype/Image/Type/XObject/Width 244>>stream\r\nHױn@\u001cqp \u0016΄\u0019\u0006\u0012\u0016\u0012\u0003>\u0000\u001b\tG\u0011dT\u0017֥1::4FcbhXM?>\u0001rp4\u001a5\u000e!\f:~1\u000bD\u0004\u001b\u0011x\u000eobB@cZKRpSRtv\\\u000fhc\"5LU\u0004a܁,à\u0019*=K2(\u0013~FJifNRno0\u001aO^6\u0019\u0006J\\54&w|\u0002r>\u000e﻾\u0010\\L7|]7\u001dжu؋uz\u001c\u001ay\u000e\u0000a\u000e[SK3\u0016 \u001b\u0003l~=\u001be}%q֜a<\u001c\u0000Ka3\u001f?v<XdnO\u001fw+I\u001eLm/y|^wkuݹ繆:~x\u000f}U\rܤ4[,|f5s9tV\r\u0013qr\u0007$\u000eg%4s\u0014ݴ\u001d\u0003ئH_##Tni\r4dJ\u000bI\u000bD\u0004\u001b\u0011oJ0\u000f\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u0000}\u00191\r\nendstream\rendobj\r2112 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2114 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 40/Name/X/SMask 2307 0 R/Subtype/Image/Type/XObject/Width 282>>stream\r\nH\u0001\r\u0000\u0000\u0000 Om\u000f\u0007\u0014\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000!\f\r\nendstream\rendobj\r2307 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 282>>/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 402/Name/X/Subtype/Image/Type/XObject/Width 282>>stream\r\nH1D`\u0014>1P\bTT\n\u0014\u001c\u0001T[8^\u000bhfts&D3ُڝݵ'x#^\u0000\u0010\u0006\u001b.\u0005\bVs\u0006qDRT0\u0001c\"\u0011nMY\u0001\b|u,M&x\u001d\u0019I8I\u0002\u0014yġI XQVV5m@C\"K!\f\u0016T'.i۝{П\nlI^\u0001\f륭\u0012W\u00172Gz\u001f'0kWgq\\˘ANO11N4\u000f2E\u000f\u0004y\u001a2A=Pf\u000f\u0003e@=Pf2p}z;\u001dGG)N\\Ҷ;?w--cG\u0015X\u0019D\u0014+ʪ\rhh]Yd)\u00042ay\u0001<M$9`\"kz~\u0000\u0002s\u001dK\t[eha\u0002UE\"Ȱ4\u0005\bVs\u0015fi0ؠ\u000b\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001e4\u0013\r\nendstream\rendobj\r2113 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2308 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2308 0 obj\r<</BC 2309 0 R/G 2310 0 R/S/Luminosity/Type/Mask>>\rendobj\r2309 0 obj\r[0.0 0.0 0.0]\rendobj\r2310 0 obj\r<</BBox[1090.0 648.0 1372.0 618.0]/Group 2311 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2312 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 618 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2311 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2312 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 282>>/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 402/Name/X/Subtype/Image/Type/XObject/Width 282>>stream\r\nH1D`\u0014>1P\bTT\n\u0014\u001c\u0001T[8^\u000bhfts&D3ُڝݵ'x#^\u0000\u0010\u0006\u001b.\u0005\bVs\u0006qDRT0\u0001c\"\u0011nMY\u0001\b|u,M&x\u001d\u0019I8I\u0002\u0014yġI XQVV5m@C\"K!\f\u0016T'.i۝{П\nlI^\u0001\f륭\u0012W\u00172Gz\u001f'0kWgq\\˘ANO11N4\u000f2E\u000f\u0004y\u001a2A=Pf\u000f\u0003e@=Pf2p}z;\u001dGG)N\\Ҷ;?w--cG\u0015X\u0019D\u0014+ʪ\rhh]Yd)\u00042ay\u0001<M$9`\"kz~\u0000\u0002s\u001dK\t[eha\u0002UE\"Ȱ4\u0005\bVs\u0015fi0ؠ\u000b\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001e4\u0013\r\nendstream\rendobj\r2109 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2111 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 23/Intent/RelativeColorimetric/Length 65/Name/X/SMask 2313 0 R/Subtype/Image/Type/XObject/Width 25>>stream\r\nHb`\u0007\u0018\u0001\u000ea$)\fq\f.\t,\u0010\u0019$\u0018I`\u001c\u0012d\u0010\f(\u00158\u001do`\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000P\u0001\r\nendstream\rendobj\r2313 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 25>>/Filter/FlateDecode/Height 23/Intent/RelativeColorimetric/Length 410/Name/X/Subtype/Image/Type/XObject/Width 25>>stream\r\nHb`\u0007\u0018\u0019`\u0011I\u0013\u00048Y`Rl\\\u0002\"RRR\"\u0002\\lP\u0019&6\u001e1%\u001d#3s\u000bs3#\u001d%1\u001e6&\u0006.15\u001bH_[u1n\u0016\u0016F6\u0001%ۄ̞[&\u000e.[5{cǏ\u001dܺ1L\u0007C(g󹻏>y|\u000fu!\u0016&NI\u0007g6ŚJs\u001c)e8ȣϿщ\u0005jl0\u001d\u0007\u001fonl\u000b\u0013\u0005\u0005wg~\u00139 Yң7\u001f|~skX\u0013\t\u0004\u001fIs6zg7uG\u0018u|\u00106#G\u000fl]#\u0002q/0<bK&͜5*VI\u0000*Pr\u000bɨ\u0005G'$\u0002CFM\u000b\u0012L,<Bjzf\u000b\u0016\u0014\u0005\tj \"J\u001c;#0&\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000)~\r\nendstream\rendobj\r2110 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2314 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2314 0 obj\r<</BC 2315 0 R/G 2316 0 R/S/Luminosity/Type/Mask>>\rendobj\r2315 0 obj\r[0.0 0.0 0.0]\rendobj\r2316 0 obj\r<</BBox[1231.0 566.0 1256.0 543.0]/Group 2317 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2318 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n25 0 0 23 1231 543 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2317 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2318 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 25>>/Filter/FlateDecode/Height 23/Intent/RelativeColorimetric/Length 410/Name/X/Subtype/Image/Type/XObject/Width 25>>stream\r\nHb`\u0007\u0018\u0019`\u0011I\u0013\u00048Y`Rl\\\u0002\"RRR\"\u0002\\lP\u0019&6\u001e1%\u001d#3s\u000bs3#\u001d%1\u001e6&\u0006.15\u001bH_[u1n\u0016\u0016F6\u0001%ۄ̞[&\u000e.[5{cǏ\u001dܺ1L\u0007C(g󹻏>y|\u000fu!\u0016&NI\u0007g6ŚJs\u001c)e8ȣϿщ\u0005jl0\u001d\u0007\u001fonl\u000b\u0013\u0005\u0005wg~\u00139 Yң7\u001f|~skX\u0013\t\u0004\u001fIs6zg7uG\u0018u|\u00106#G\u000fl]#\u0002q/0<bK&͜5*VI\u0000*Pr\u000bɨ\u0005G'$\u0002CFM\u000b\u0012L,<Bjzf\u000b\u0016\u0014\u0005\tj \"J\u001c;#0&\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000)~\r\nendstream\rendobj\r2106 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2108 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 120/Name/X/SMask 2319 0 R/Subtype/Image/Type/XObject/Width 222>>stream\r\nHױ\r0\f\u0003AjS\u0004\u0001b8\f\u001f\u0004N~RA\u0002и7Dl]q=\u0015Bs\u000eθ|η|*`\u001dwX\u0004Id\u001eZW[޴7=\u000f\u001a\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001a\u0007\r\nendstream\rendobj\r2319 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 222>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 692/Name/X/Subtype/Image/Type/XObject/Width 222>>stream\r\nHMo\u0012Q\u0014{\u0019\u0018\u0006:̐\u0018\u001d\u0012C\u0003q1UJ\u0017\u0016i\u0017,i₢&(.Ɵ\u00000\t.Dĸк@\u0017hb4TSwUw4\u001f\u0014\u0003EÇ2V\u001bWM{}~}ry9\u001d\u001d\t\u0000@\u0002\u0000`W5\n1:=9z\u001d\u0004\u0001\u0018f^\u0010mX#\nh`\u001dz\u0000\"$HN\u001a[vJEp\u001f9$\u0002pD\u0019\u0018%\u0012\u000e\u0005|ѿ\u0000xG0\u001aKғXN%cѠIíc-A%\u001c\\6\u0018\u001c,\u001ed\u000eڽ\u0007\u0017\nK+feNOv\u0000\u0018N<|Q(ʕuKĨnbv̡cSjKVo`NV][N\u0004e@ivA<yӷz\u00074\u001b\u0016L'\u0019\u0003h\u001f\u00183\\\u0011 U\u000bˬ&`̮7\u001aY+\u0015f[\u0002LDFZ+˳>\u001b\u0005w\\W\u0015\u000f/:̵b\u0005b[\u0015B\u001aeW8/zH'Ed^\u001f\u001f8z\u00009w+sSI`f~]|vBF\u0010}~ʙ]:Hrin\u0001{p3ɾ\u0011ȾZc-A%?\u000e_\fȫl&1wY9Ԗb\u001dh,JObM:Enk'\r;~\u0001i\"ɾ@(\u001cQF0FC\u0001lp4\u0004[v\u0000\"$HN\u001a[vJE6f1\u0018ͼ ڰF\u0014xP;4=@!Fg1Gc\u0010\u0005k\u000bB\u0002UL~\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000J\r\nendstream\rendobj\r2107 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2320 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2320 0 obj\r<</BC 2321 0 R/G 2322 0 R/S/Luminosity/Type/Mask>>\rendobj\r2321 0 obj\r[0.0 0.0 0.0]\rendobj\r2322 0 obj\r<</BBox[650.0 752.0 872.0 719.0]/Group 2323 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2324 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n222 0 0 33 650 719 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2323 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2324 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 222>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 692/Name/X/Subtype/Image/Type/XObject/Width 222>>stream\r\nHMo\u0012Q\u0014{\u0019\u0018\u0006:̐\u0018\u001d\u0012C\u0003q1UJ\u0017\u0016i\u0017,i₢&(.Ɵ\u00000\t.Dĸк@\u0017hb4TSwUw4\u001f\u0014\u0003EÇ2V\u001bWM{}~}ry9\u001d\u001d\t\u0000@\u0002\u0000`W5\n1:=9z\u001d\u0004\u0001\u0018f^\u0010mX#\nh`\u001dz\u0000\"$HN\u001a[vJEp\u001f9$\u0002pD\u0019\u0018%\u0012\u000e\u0005|ѿ\u0000xG0\u001aKғXN%cѠIíc-A%\u001c\\6\u0018\u001c,\u001ed\u000eڽ\u0007\u0017\nK+feNOv\u0000\u0018N<|Q(ʕuKĨnbv̡cSjKVo`NV][N\u0004e@ivA<yӷz\u00074\u001b\u0016L'\u0019\u0003h\u001f\u00183\\\u0011 U\u000bˬ&`̮7\u001aY+\u0015f[\u0002LDFZ+˳>\u001b\u0005w\\W\u0015\u000f/:̵b\u0005b[\u0015B\u001aeW8/zH'Ed^\u001f\u001f8z\u00009w+sSI`f~]|vBF\u0010}~ʙ]:Hrin\u0001{p3ɾ\u0011ȾZc-A%?\u000e_\fȫl&1wY9Ԗb\u001dh,JObM:Enk'\r;~\u0001i\"ɾ@(\u001cQF0FC\u0001lp4\u0004[v\u0000\"$HN\u001a[vJE6f1\u0018ͼ ڰF\u0014xP;4=@!Fg1Gc\u0010\u0005k\u000bB\u0002UL~\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000J\r\nendstream\rendobj\r2104 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2089 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 72/Name/X/SMask 2325 0 R/Subtype/Image/Type/XObject/Width 124>>stream\r\nH\t\u0000@\b@C\u0004K &\rw7\u0002.ɣ3tMхkkkkkkkkonEt\u0004\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0016\f\r\nendstream\rendobj\r2325 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 124>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 280/Name/X/Subtype/Image/Type/XObject/Width 124>>stream\r\nH엿\rP\u0010}\u0013\n\n\u0002\u0002)d\u0004\u0006\u0016@O؂\u0005h\r\b\u001d1D\u0011#\u0015-.v\u0010BA!k(\n\u0018$\nm'\u0002Suò\u001d lU&lr4\u0010p\b|55FUsS7Wn\u0016ek\u0010xU\u0016iluS7\u00036=CZNeO\u000f#\bCmķ[j40J\u0003[N0\u0017\u0010pY|yݍ\u0000aǮx09\u001düߘ\u00053T|\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u00002h\r\nendstream\rendobj\r2105 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2326 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2326 0 obj\r<</BC 2327 0 R/G 2328 0 R/S/Luminosity/Type/Mask>>\rendobj\r2327 0 obj\r[0.0 0.0 0.0]\rendobj\r2328 0 obj\r<</BBox[1245.0 569.0 1369.0 540.0]/Group 2329 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2330 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1245 540 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2329 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2330 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 124>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 280/Name/X/Subtype/Image/Type/XObject/Width 124>>stream\r\nH엿\rP\u0010}\u0013\n\n\u0002\u0002)d\u0004\u0006\u0016@O؂\u0005h\r\b\u001d1D\u0011#\u0015-.v\u0010BA!k(\n\u0018$\nm'\u0002Suò\u001d lU&lr4\u0010p\b|55FUsS7Wn\u0016ek\u0010xU\u0016iluS7\u00036=CZNeO\u000f#\bCmķ[j40J\u0003[N0\u0017\u0010pY|yݍ\u0000aǮx09\u001düߘ\u00053T|\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u00002h\r\nendstream\rendobj\r2102 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2103 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2331 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2331 0 obj\r<</BC 2332 0 R/G 2333 0 R/S/Luminosity/Type/Mask>>\rendobj\r2332 0 obj\r[0.0 0.0 0.0]\rendobj\r2333 0 obj\r<</BBox[1118.0 569.0 1242.0 540.0]/Group 2334 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2330 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1118 540 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2334 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2100 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2101 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2335 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2335 0 obj\r<</BC 2336 0 R/G 2337 0 R/S/Luminosity/Type/Mask>>\rendobj\r2336 0 obj\r[0.0 0.0 0.0]\rendobj\r2337 0 obj\r<</BBox[1245.0 588.0 1369.0 559.0]/Group 2338 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2330 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1245 559 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2338 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2098 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2099 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2339 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2339 0 obj\r<</BC 2340 0 R/G 2341 0 R/S/Luminosity/Type/Mask>>\rendobj\r2340 0 obj\r[0.0 0.0 0.0]\rendobj\r2341 0 obj\r<</BBox[1118.0 588.0 1242.0 559.0]/Group 2342 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2330 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1118 559 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2342 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2097 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2096 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2094 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2095 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2343 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2343 0 obj\r<</BC 2344 0 R/G 2345 0 R/S/Luminosity/Type/Mask>>\rendobj\r2344 0 obj\r[0.0 0.0 0.0]\rendobj\r2345 0 obj\r<</BBox[1245.0 607.0 1369.0 578.0]/Group 2346 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2330 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1245 578 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2346 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2092 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2093 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2347 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2347 0 obj\r<</BC 2348 0 R/G 2349 0 R/S/Luminosity/Type/Mask>>\rendobj\r2348 0 obj\r[0.0 0.0 0.0]\rendobj\r2349 0 obj\r<</BBox[1118.0 607.0 1242.0 578.0]/Group 2350 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2330 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1118 578 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2350 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2090 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2091 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2351 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2351 0 obj\r<</BC 2352 0 R/G 2353 0 R/S/Luminosity/Type/Mask>>\rendobj\r2352 0 obj\r[0.0 0.0 0.0]\rendobj\r2353 0 obj\r<</BBox[1245.0 626.0 1369.0 597.0]/Group 2354 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2330 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1245 597 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2354 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2087 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2088 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2355 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2355 0 obj\r<</BC 2356 0 R/G 2357 0 R/S/Luminosity/Type/Mask>>\rendobj\r2356 0 obj\r[0.0 0.0 0.0]\rendobj\r2357 0 obj\r<</BBox[1118.0 626.0 1242.0 597.0]/Group 2358 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2330 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n124 0 0 29 1118 597 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2358 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2084 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2086 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 32/Name/X/SMask 2359 0 R/Subtype/Image/Type/XObject/Width 66>>stream\r\nHb`\u0018\u0005`\u0014Q0\nF\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00078\r\nendstream\rendobj\r2359 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 66>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 832/Name/X/Subtype/Image/Type/XObject/Width 66>>stream\r\nHYsZ\u0014#<\u0018\u0005\u000158S48 NĤ<\u001f>\t@\u001bsoߺzU*۰jY\u000fR\"o|\u000f%S0JB\u001f$\u0012\u0010SgH\u0018IS$\u0006>(D\f/\n\\\"иwEo(AXxC\u0001IV\u001br9si\u0012C<d4V4\u00174+f\u0019\u0002`!1d\u0002z\u000eF04E\u00118AQ\fM\bRl.l&\t\u001c'\b\u001ciXU$L\u001cRdN\u001exx}R!/<\u0005et\u001eN{r\u0017xs\\\u0015**0\btr6c\u000el(m%;nQ\u000bZOs\u0002}mGXnU\\kt9Sml>a3cvsc.wǹiXqZ~R˾9$ly\f<n\u0017\u0007zZ:M?{\u000e\u0000u_غaVg\u00074o\r5˟ǵo/O\u000fg;+\\}x\nW\tc\u001a\u0007ۃ&\u001d \u0016\u001b\u0003^-ۥm\u001f_rw\u0019қ\u0007ӗ^\u001f\f86;?SL^+\u000f==~}fꛖz+0\u0005\u0001la \u001cU2\u0013f30y{\u0003Gׇ\u001fx\u001b'k)di\u00193?\u001a\u0013{\u0011ndT/IN\u0005%&<F3Co\b\u0014|:Q\u0010BզҔKW,+pتVx6\u0015\u0004X\\\u0003V\u0000*\u0002\nj4v:\u0017P\ng|Ae.\\.'\u0016%J`\u0010\fM(\u001c'\u0014bL\u0011\u0004ɉ\u0002da\u0014MS\u0004b\u0004IR\f\u0010G\tQ\u000b\u0019#\u0018IQ4ρ\u0007q$\u0001\b\u0012=C'{Vp~J\u0012\u001f\u0017w~O\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u00008\r\nendstream\rendobj\r2085 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2360 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2360 0 obj\r<</BC 2361 0 R/G 2362 0 R/S/Luminosity/Type/Mask>>\rendobj\r2361 0 obj\r[0.0 0.0 0.0]\rendobj\r2362 0 obj\r<</BBox[1280.0 749.0 1346.0 721.0]/Group 2363 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2364 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n66 0 0 28 1280 721 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2363 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2364 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 66>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 832/Name/X/Subtype/Image/Type/XObject/Width 66>>stream\r\nHYsZ\u0014#<\u0018\u0005\u000158S48 NĤ<\u001f>\t@\u001bsoߺzU*۰jY\u000fR\"o|\u000f%S0JB\u001f$\u0012\u0010SgH\u0018IS$\u0006>(D\f/\n\\\"иwEo(AXxC\u0001IV\u001br9si\u0012C<d4V4\u00174+f\u0019\u0002`!1d\u0002z\u000eF04E\u00118AQ\fM\bRl.l&\t\u001c'\b\u001ciXU$L\u001cRdN\u001exx}R!/<\u0005et\u001eN{r\u0017xs\\\u0015**0\btr6c\u000el(m%;nQ\u000bZOs\u0002}mGXnU\\kt9Sml>a3cvsc.wǹiXqZ~R˾9$ly\f<n\u0017\u0007zZ:M?{\u000e\u0000u_غaVg\u00074o\r5˟ǵo/O\u000fg;+\\}x\nW\tc\u001a\u0007ۃ&\u001d \u0016\u001b\u0003^-ۥm\u001f_rw\u0019қ\u0007ӗ^\u001f\f86;?SL^+\u000f==~}fꛖz+0\u0005\u0001la \u001cU2\u0013f30y{\u0003Gׇ\u001fx\u001b'k)di\u00193?\u001a\u0013{\u0011ndT/IN\u0005%&<F3Co\b\u0014|:Q\u0010BզҔKW,+pتVx6\u0015\u0004X\\\u0003V\u0000*\u0002\nj4v:\u0017P\ng|Ae.\\.'\u0016%J`\u0010\fM(\u001c'\u0014bL\u0011\u0004ɉ\u0002da\u0014MS\u0004b\u0004IR\f\u0010G\tQ\u000b\u0019#\u0018IQ4ρ\u0007q$\u0001\b\u0012=C'{Vp~J\u0012\u001f\u0017w~O\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u00008\r\nendstream\rendobj\r2080 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2083 0 obj\r<</BitsPerComponent 8/ColorSpace 2081 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 121/Intent/RelativeColorimetric/Length 65/Name/X/SMask 2365 0 R/Subtype/Image/Type/XObject/Width 282>>stream\r\nH1\u0001\u0000\u0000\u0000 Om\b_\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000^\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000J\r\nendstream\rendobj\r2081 0 obj\r[/Indexed/DeviceRGB 0 2366 0 R]\rendobj\r2365 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 282>>/Filter/FlateDecode/Height 121/Intent/RelativeColorimetric/Length 65/Name/X/Subtype/Image/Type/XObject/Width 282>>stream\r\nH1\u0001\u0000\u0000\u0000 Om\b_\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000^\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000J\r\nendstream\rendobj\r2366 0 obj\r<</Length 3>>stream\r\n\r\nendstream\rendobj\r2082 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2367 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2367 0 obj\r<</BC 2368 0 R/G 2369 0 R/S/Luminosity/Type/Mask>>\rendobj\r2368 0 obj\r[0.0 0.0 0.0]\rendobj\r2369 0 obj\r<</BBox[1090.0 648.0 1372.0 527.0]/Group 2370 0 R/Length 44/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2371 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 121 1090 527 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2370 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2371 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 282>>/Filter/FlateDecode/Height 121/Intent/RelativeColorimetric/Length 65/Name/X/Subtype/Image/Type/XObject/Width 282>>stream\r\nH1\u0001\u0000\u0000\u0000 Om\b_\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000^\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000J\r\nendstream\rendobj\r2078 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2052 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 101/Name/X/SMask 2372 0 R/Subtype/Image/Type/XObject/Width 282>>stream\r\nHС\r\u0000\u0000g1\u0018\u0012\u0005q7AӍ\u0017\u000774c3ŘLq8S)\u0014g3řLq8S)\u0014g3řLq8Sfͳ9\u0013fͳ]\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u0000D\u001e\r\nendstream\rendobj\r2372 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 282>>/Filter/FlateDecode/Height 30/Intent/RelativeColorimetric/Length 402/Name/X/Subtype/Image/Type/XObject/Width 282>>stream\r\nH1D`\u0014>1P\bTT\n\u0014\u001c\u0001T[8^\u000bhfts&D3ُڝݵ'x#^\u0000\u0010\u0006\u001b.\u0005\bVs\u0006qDRT0\u0001c\"\u0011nMY\u0001\b|u,M&x\u001d\u0019I8I\u0002\u0014yġI XQVV5m@C\"K!\f\u0016T'.i۝{П\nlI^\u0001\f륭\u0012W\u00172Gz\u001f'0kWgq\\˘ANO11N4\u000f2E\u000f\u0004y\u001a2A=Pf\u000f\u0003e@=Pf2p}z;\u001dGG)N\\Ҷ;?w--cG\u0015X\u0019D\u0014+ʪ\rhh]Yd)\u00042ay\u0001<M$9`\"kz~\u0000\u0002s\u001dK\t[eha\u0002UE\"Ȱ4\u0005\bVs\u0015fi0ؠ\u000b\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001e4\u0013\r\nendstream\rendobj\r2079 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2373 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2373 0 obj\r<</BC 2374 0 R/G 2375 0 R/S/Luminosity/Type/Mask>>\rendobj\r2374 0 obj\r[0.0 0.0 0.0]\rendobj\r2375 0 obj\r<</BBox[1090.0 303.0 1372.0 273.0]/Group 2376 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2312 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 273 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2376 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2076 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2075 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 92/Name/X/SMask 2377 0 R/Subtype/Image/Type/XObject/Width 178>>stream\r\nH\t\u0000 \fк\":=|J ]SlAyO8%O\u001bz<-8|)Χ8|)G\u00143e5m\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u000bx\u0012q\r\nendstream\rendobj\r2377 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 178>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 322/Name/X/Subtype/Image/Type/XObject/Width 178>>stream\r\nH!0\u0018\r4\u0013\u0006\u0002\u00121B0v\u0004\u000e\u001a[p\u0006<܂\u000b`6n\"9Y\u001ecy\u0013O?6w4}\u0000\u0012\u0000\u000b\u0012MpDU\u00104\u0003L\u0016e2b$C7\u001c:\u001ee8蒤\u0002K.Qx:\u0018=du\u001cgyK\"ⳣ\u0018\r3^շF`Y2u~\u0016^W\u0005ֵ*<5ˏ}\fG[\u0017oiK\u001d$\rI`ϡ$Ӳ%i2݊״\u0015o+^bپ+ۏA!c3w\u0005t\u0011\u0010)*\u0004GT\u0005O\u0019@\tod~\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ii\r\nendstream\rendobj\r2077 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2378 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2378 0 obj\r<</BC 2379 0 R/G 2380 0 R/S/Luminosity/Type/Mask>>\rendobj\r2379 0 obj\r[0.0 0.0 0.0]\rendobj\r2380 0 obj\r<</BBox[1192.0 170.0 1370.0 141.0]/Group 2381 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2382 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n178 0 0 29 1192 141 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2381 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2382 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 178>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 322/Name/X/Subtype/Image/Type/XObject/Width 178>>stream\r\nH!0\u0018\r4\u0013\u0006\u0002\u00121B0v\u0004\u000e\u001a[p\u0006<܂\u000b`6n\"9Y\u001ecy\u0013O?6w4}\u0000\u0012\u0000\u000b\u0012MpDU\u00104\u0003L\u0016e2b$C7\u001c:\u001ee8蒤\u0002K.Qx:\u0018=du\u001cgyK\"ⳣ\u0018\r3^շF`Y2u~\u0016^W\u0005ֵ*<5ˏ}\fG[\u0017oiK\u001d$\rI`ϡ$Ӳ%i2݊״\u0015o+^bپ+ۏA!c3w\u0005t\u0011\u0010)*\u0004GT\u0005O\u0019@\tod~\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ii\r\nendstream\rendobj\r2073 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2074 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2383 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2383 0 obj\r<</BC 2384 0 R/G 2385 0 R/S/Luminosity/Type/Mask>>\rendobj\r2384 0 obj\r[0.0 0.0 0.0]\rendobj\r2385 0 obj\r<</BBox[1192.0 190.0 1370.0 161.0]/Group 2386 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2382 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n178 0 0 29 1192 161 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2386 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2071 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2055 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 35/Intent/RelativeColorimetric/Length 86/Name/X/SMask 2387 0 R/Subtype/Image/Type/XObject/Width 32>>stream\r\nHb`\u001e`\u000080b\u0000\u0002(\nI#).P@@\u001e4L\u0001!\nF)uQ\b_`P.\u0004$\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u00001\u0002\r\nendstream\rendobj\r2387 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 32>>/Filter/FlateDecode/Height 35/Intent/RelativeColorimetric/Length 430/Name/X/Subtype/Image/Type/XObject/Width 32>>stream\r\nHz0\f\u0001mlj\f\u0010-rcL ot\u001fItb7/\u001aŴ)&\u000bT7\f\u0003\u0000umTl\b!\bM`HJ00\u0011&RB02\u0002!&6s8wM0\u0004.E.\u0018\u001aR@\u001b&'\u000eq\u00079\u0014R`LGyA|̋\"?Ɓ\b\u0002vnb(+릩,\u0016`,\u000fO/L˦sS\u001e\u000f{frw(Zq(\u0017I6e\u0012p<@= )ut4pm\u0015\u000fp?ɟy}n׾)\u0012?wU\u0016\u001cj4?ũN1ǂȧ+$,\b\\?~\u0018q\u0014\nm\nH\u0001|\u0019\u001e\u001f\u000f_G7<gI\u0003\u0012K\u000f1_ֿ\u001fL\nu~\u0001E\u0001[\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000&\r\nendstream\rendobj\r2072 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2388 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2388 0 obj\r<</BC 2389 0 R/G 2390 0 R/S/Luminosity/Type/Mask>>\rendobj\r2389 0 obj\r[0.0 0.0 0.0]\rendobj\r2390 0 obj\r<</BBox[1108.0 323.0 1140.0 288.0]/Group 2391 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2392 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 35 1108 288 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2391 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2392 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 32>>/Filter/FlateDecode/Height 35/Intent/RelativeColorimetric/Length 430/Name/X/Subtype/Image/Type/XObject/Width 32>>stream\r\nHz0\f\u0001mlj\f\u0010-rcL ot\u001fItb7/\u001aŴ)&\u000bT7\f\u0003\u0000umTl\b!\bM`HJ00\u0011&RB02\u0002!&6s8wM0\u0004.E.\u0018\u001aR@\u001b&'\u000eq\u00079\u0014R`LGyA|̋\"?Ɓ\b\u0002vnb(+릩,\u0016`,\u000fO/L˦sS\u001e\u000f{frw(Zq(\u0017I6e\u0012p<@= )ut4pm\u0015\u000fp?ɟy}n׾)\u0012?wU\u0016\u001cj4?ũN1ǂȧ+$,\b\\?~\u0018q\u0014\nm\nH\u0001|\u0019\u001e\u001f\u000f_G7<gI\u0003\u0012K\u000f1_ֿ\u001fL\nu~\u0001E\u0001[\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000&\r\nendstream\rendobj\r2069 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2070 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2393 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2393 0 obj\r<</BC 2394 0 R/G 2395 0 R/S/Luminosity/Type/Mask>>\rendobj\r2394 0 obj\r[0.0 0.0 0.0]\rendobj\r2395 0 obj\r<</BBox[1090.0 321.0 1372.0 291.0]/Group 2396 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2312 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 291 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2396 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2067 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2068 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2397 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2397 0 obj\r<</BC 2398 0 R/G 2399 0 R/S/Luminosity/Type/Mask>>\rendobj\r2398 0 obj\r[0.0 0.0 0.0]\rendobj\r2399 0 obj\r<</BBox[1108.0 341.0 1140.0 306.0]/Group 2400 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2392 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 35 1108 306 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2400 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2065 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2066 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2401 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2401 0 obj\r<</BC 2402 0 R/G 2403 0 R/S/Luminosity/Type/Mask>>\rendobj\r2402 0 obj\r[0.0 0.0 0.0]\rendobj\r2403 0 obj\r<</BBox[1108.0 359.0 1140.0 324.0]/Group 2404 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2392 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 35 1108 324 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2404 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2063 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2064 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2405 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2405 0 obj\r<</BC 2406 0 R/G 2407 0 R/S/Luminosity/Type/Mask>>\rendobj\r2406 0 obj\r[0.0 0.0 0.0]\rendobj\r2407 0 obj\r<</BBox[1090.0 453.0 1372.0 423.0]/Group 2408 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2312 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 423 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2408 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2060 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2062 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 86/Name/X/SMask 2409 0 R/Subtype/Image/Type/XObject/Width 187>>stream\r\nH\t\u0000 \u0010\u0003\"ڀY\u00162\u0015Ll;w0䝟;=\u0018k:uB\t\u0013Z'NP׭{\u001e-r\u001b\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0013d\r\nendstream\rendobj\r2409 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 187>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 317/Name/X/Subtype/Image/Type/XObject/Width 187>>stream\r\nHױ0\u0014\u0016A)(\u0010\u0016\u0014(\bE2\u0002\u0003P\u0005\u0016@Oa`\u0001.\u001bP!t&B9 \u00147EOדe?v!!A\u0013¸\n\u0005g\nxD\u001b²akMc\u0000\\S\u000e]3\u000f0$)\u0004%\nO\u0007S[Ǝ,/d\t,,>;:130U}k ՕB`\\xQ^ۮkU\u001ey/E>\u0011E[n\u0007vs9tW\u0004ozZ68 ƾ)-m߰t:\u0014\u000e\u0003ws\u0004\u0003%\u0001cn\bˆ\u0012us;&\n*\u0014)\u0004˗x!Ap~\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0007\r\nendstream\rendobj\r2061 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2410 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2410 0 obj\r<</BC 2411 0 R/G 2412 0 R/S/Luminosity/Type/Mask>>\rendobj\r2411 0 obj\r[0.0 0.0 0.0]\rendobj\r2412 0 obj\r<</BBox[1166.0 434.0 1353.0 405.0]/Group 2413 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2414 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n187 0 0 29 1166 405 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2413 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2414 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 187>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 317/Name/X/Subtype/Image/Type/XObject/Width 187>>stream\r\nHױ0\u0014\u0016A)(\u0010\u0016\u0014(\bE2\u0002\u0003P\u0005\u0016@Oa`\u0001.\u001bP!t&B9 \u00147EOדe?v!!A\u0013¸\n\u0005g\nxD\u001b²akMc\u0000\\S\u000e]3\u000f0$)\u0004%\nO\u0007S[Ǝ,/d\t,,>;:130U}k ՕB`\\xQ^ۮkU\u001ey/E>\u0011E[n\u0007vs9tW\u0004ozZ68 ƾ)-m߰t:\u0014\u000e\u0003ws\u0004\u0003%\u0001cn\bˆ\u0012us;&\n*\u0014)\u0004˗x!Ap~\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0007\r\nendstream\rendobj\r2057 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2059 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 98/Name/X/SMask 2415 0 R/Subtype/Image/Type/XObject/Width 106>>stream\r\nH\t\u0000 \f\u0004\"\u0010[50d#>l\b\u00061%2tIjRzPD@2\u0018hQ-;\u001a'\u0004;²%\\\u0015~\u0013\u0000\u0000\u0000\u0000\u0000\u0003\u0000g\u000b\r\nendstream\rendobj\r2415 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 106>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 488/Name/X/Subtype/Image/Type/XObject/Width 106>>stream\r\nHėK\u0002a\u0018};_=\u000fP;7\u0005\u0011r:첥F۬\bU?A]\u00067#$u\u0016Hw톴@83G?\u000f|>s\u000f\u0000\u00001\u0003\u001aF\u0016+\u0011\u0005/\u0019x\rv\u001b~\u0000\u0005޳$JUl$q/04f\u0011Ñء|\t0\u001b\t\u001e\u0017k_hEi\u001c\u001bl2\u001e]s,\r>{ĸr*_RnkظU*w1\u001f]3jCm=<b㡥6u \u001eu\u0007wz/i'^N\u0004,\u0014@ア>\u0007\u0010#*-\"(r4/O\u0005\u001b5\u001d<w#Q\u0001fX5ڵbbk\u001f@v:-2k\"\u001dpN\u0007-V#MBuY\u0007\u0014)_d\u0018vb\u0012o\u0018aݛCo\u000eV\u0004l&b}\"7{'r;#ɽO\u0004\\rw\u0004ۈG%ydD5\u001b\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ZNc\u0004\r\nendstream\rendobj\r2058 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2416 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2416 0 obj\r<</BC 2417 0 R/G 2418 0 R/S/Luminosity/Type/Mask>>\rendobj\r2417 0 obj\r[0.0 0.0 0.0]\rendobj\r2418 0 obj\r<</BBox[1264.0 752.0 1370.0 719.0]/Group 2419 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2420 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n106 0 0 33 1264 719 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2419 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2420 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 106>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 488/Name/X/Subtype/Image/Type/XObject/Width 106>>stream\r\nHėK\u0002a\u0018};_=\u000fP;7\u0005\u0011r:첥F۬\bU?A]\u00067#$u\u0016Hw톴@83G?\u000f|>s\u000f\u0000\u00001\u0003\u001aF\u0016+\u0011\u0005/\u0019x\rv\u001b~\u0000\u0005޳$JUl$q/04f\u0011Ñء|\t0\u001b\t\u001e\u0017k_hEi\u001c\u001bl2\u001e]s,\r>{ĸr*_RnkظU*w1\u001f]3jCm=<b㡥6u \u001eu\u0007wz/i'^N\u0004,\u0014@ア>\u0007\u0010#*-\"(r4/O\u0005\u001b5\u001d<w#Q\u0001fX5ڵbbk\u001f@v:-2k\"\u001dpN\u0007-V#MBuY\u0007\u0014)_d\u0018vb\u0012o\u0018aݛCo\u000eV\u0004l&b}\"7{'r;#ɽO\u0004\\rw\u0004ۈG%ydD5\u001b\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000ZNc\u0004\r\nendstream\rendobj\r2056 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2053 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2054 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2421 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2421 0 obj\r<</BC 2422 0 R/G 2423 0 R/S/Luminosity/Type/Mask>>\rendobj\r2422 0 obj\r[0.0 0.0 0.0]\rendobj\r2423 0 obj\r<</BBox[1108.0 551.0 1140.0 516.0]/Group 2424 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2392 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n32 0 0 35 1108 516 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2424 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2050 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2051 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2425 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2425 0 obj\r<</BC 2426 0 R/G 2427 0 R/S/Luminosity/Type/Mask>>\rendobj\r2426 0 obj\r[0.0 0.0 0.0]\rendobj\r2427 0 obj\r<</BBox[1090.0 549.0 1372.0 519.0]/Group 2428 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2312 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n282 0 0 30 1090 519 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2428 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2048 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2043 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 92/Name/X/SMask 2429 0 R/Subtype/Image/Type/XObject/Width 204>>stream\r\nHρ\t\u0000 \f\u0003Rt\u0003\u000bO~?\t>\u0002Q\u000ef+\u00100\u0007}Y,Y,Y,Y,,\u0018`\u0016\bFDk\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0015/\r\nendstream\rendobj\r2429 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 204>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 332/Name/X/Subtype/Image/Type/XObject/Width 204>>stream\r\nH1D@\u0018q3b0Q(P*RMb\b\u000eZ\u0016ΠWp\u000b\u0017\u0006*Qn'`\r&\u0013\u0004 ACSEIVT\u0014Y\u0012\u0006e;@ٖS\"1h1?\bA\n|湦F>\u0016jQ|M3k\u001cO&\u0006^(\u001a,dmEyմ\u000e{Ty\u0019Ȱbh\u001e04􏦈l-'e?\u0019ٷeiu\u001b\u0002k\u001anU\u001a:-Yݍ\u00032]\u001d-hNGwѿ>ў])` \u0004)\u001aY6\u0018Buò\u001dl)ǲ`Q\u0015\u0015,EDNj\u0010\u0006\r}J\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u00008N\r\nendstream\rendobj\r2049 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2430 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2430 0 obj\r<</BC 2431 0 R/G 2432 0 R/S/Luminosity/Type/Mask>>\rendobj\r2431 0 obj\r[0.0 0.0 0.0]\rendobj\r2432 0 obj\r<</BBox[1166.0 530.0 1370.0 501.0]/Group 2433 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2434 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n204 0 0 29 1166 501 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2433 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2434 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 204>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 332/Name/X/Subtype/Image/Type/XObject/Width 204>>stream\r\nH1D@\u0018q3b0Q(P*RMb\b\u000eZ\u0016ΠWp\u000b\u0017\u0006*Qn'`\r&\u0013\u0004 ACSEIVT\u0014Y\u0012\u0006e;@ٖS\"1h1?\bA\n|湦F>\u0016jQ|M3k\u001cO&\u0006^(\u001a,dmEyմ\u000e{Ty\u0019Ȱbh\u001e04􏦈l-'e?\u0019ٷeiu\u001b\u0002k\u001anU\u001a:-Yݍ\u00032]\u001d-hNGwѿ>ў])` \u0004)\u001aY6\u0018Buò\u001dl)ǲ`Q\u0015\u0015,EDNj\u0010\u0006\r}J\u000b\u0000\u0000\u0000\u0000\u0000\u0003\u00008N\r\nendstream\rendobj\r2046 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2047 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2435 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2435 0 obj\r<</BC 2436 0 R/G 2437 0 R/S/Luminosity/Type/Mask>>\rendobj\r2436 0 obj\r[0.0 0.0 0.0]\rendobj\r2437 0 obj\r<</BBox[1166.0 511.0 1370.0 482.0]/Group 2438 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2434 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n204 0 0 29 1166 482 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2438 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2044 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2045 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2439 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2439 0 obj\r<</BC 2440 0 R/G 2441 0 R/S/Luminosity/Type/Mask>>\rendobj\r2440 0 obj\r[0.0 0.0 0.0]\rendobj\r2441 0 obj\r<</BBox[1166.0 492.0 1370.0 463.0]/Group 2442 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2434 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n204 0 0 29 1166 463 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2442 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2041 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2042 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2443 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2443 0 obj\r<</BC 2444 0 R/G 2445 0 R/S/Luminosity/Type/Mask>>\rendobj\r2444 0 obj\r[0.0 0.0 0.0]\rendobj\r2445 0 obj\r<</BBox[1166.0 473.0 1370.0 444.0]/Group 2446 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2434 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n204 0 0 29 1166 444 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2446 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2038 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2040 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 104/Name/X/SMask 2447 0 R/Subtype/Image/Type/XObject/Width 244>>stream\r\nHױ\r\u0000 \f\u0003A(\rB%7K$=^q\u0015\u0017`vϘmv\u0006mvOf43!\fif\u0000\u001e\u001f\u0016-l3*ZE2C{{\u0018e\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000%\u0019\u001b\r\nendstream\rendobj\r2447 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 244>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 475/Name/X/Subtype/Image/Type/XObject/Width 244>>stream\r\nH1k@\u001caěT/ଃ\"h_\u0005\tj\u0004_B\u001c:5=[,it\u0018B2f(!!\u0010l\u001fcOiR\u0015jq\u001cB\u0018t\b\u0010cA\f6\"\u0002FĄ\u001duƌJW5mE3m\u0003kDd[A/\u000edY\u001aG'&3'LbX>\u0001\u001c\u0016y\u0012:F_f\u0016\u0014ݹ\u000fF\u0005hd48\"4CcYa~<_,\u001b\u001fZ\u001aԼN\u0006v?\u0000mۮ^ǃڤ硑ڷhz;*o(U6cʍb{?^\u001dI\u0011W\u0012>\u001fgË\u001f\t0FvC\u0019\u0003el~j\r\u0001y~̂<g\u000e<~yx򿪅۔9a\u0017srXI0nfѺ\u00158@q\u000b,&_fnЊfڮ\u0007@=65?\u0016\bU;\u0006\u0002\u0019\u001d\u0012\u000b\u0016%\"H7qF\u0018t臘\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u00005x1\r\nendstream\rendobj\r2039 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2448 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2448 0 obj\r<</BC 2449 0 R/G 2450 0 R/S/Luminosity/Type/Mask>>\rendobj\r2449 0 obj\r[0.0 0.0 0.0]\rendobj\r2450 0 obj\r<</BBox[1094.0 31.0 1338.0 2.0]/Group 2451 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2452 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n244 0 0 29 1094 2 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2451 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2452 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 244>>/Filter/FlateDecode/Height 29/Intent/RelativeColorimetric/Length 475/Name/X/Subtype/Image/Type/XObject/Width 244>>stream\r\nH1k@\u001caěT/ଃ\"h_\u0005\tj\u0004_B\u001c:5=[,it\u0018B2f(!!\u0010l\u001fcOiR\u0015jq\u001cB\u0018t\b\u0010cA\f6\"\u0002FĄ\u001duƌJW5mE3m\u0003kDd[A/\u000edY\u001aG'&3'LbX>\u0001\u001c\u0016y\u0012:F_f\u0016\u0014ݹ\u000fF\u0005hd48\"4CcYa~<_,\u001b\u001fZ\u001aԼN\u0006v?\u0000mۮ^ǃڤ硑ڷhz;*o(U6cʍb{?^\u001dI\u0011W\u0012>\u001fgË\u001f\t0FvC\u0019\u0003el~j\r\u0001y~̂<g\u000e<~yx򿪅۔9a\u0017srXI0nfѺ\u00158@q\u000b,&_fnЊfڮ\u0007@=65?\u0016\bU;\u0006\u0002\u0019\u001d\u0012\u000b\u0016%\"H7qF\u0018t臘\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u00005x1\r\nendstream\rendobj\r2035 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2037 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 36/Intent/RelativeColorimetric/Length 93/Name/X/SMask 2453 0 R/Subtype/Image/Type/XObject/Width 36>>stream\r\nH;\n\u0000 \f\u0003zK(Xj?)\u0014q0\u001b\u0010XB`H\t,M6\u0002G\u0016DE&\"\u0003}\re6\bm\u0019\u0004[$S\u000e\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0003\r\nendstream\rendobj\r2453 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 36>>/Filter/FlateDecode/Height 36/Intent/RelativeColorimetric/Length 474/Name/X/Subtype/Image/Type/XObject/Width 36>>stream\r\nH=P\u0018\u0007p\u0012\u0006/9VI\u000e$&MLMI|\b1\u000b\u0001ߠmM\\\u0015ńxPn{/r_Ͽ<O\u001c\u0001\u0000\u0007\u001f\u0000N\u0016+j!\t\u001b\u0006pv\u0018u9h\u0012A\u0000#('\u0007`(\u001c\u000e\u0005\u001f:)\u0002\u0003OlsB4\u00163lFL'\u0002붙\u001fN쐋\nJlkb!\u0015\u0001cR(oޛi5JRgt\u0019\u0006x,+h2g|6\u0002;<\\,_mǋfm7Ÿ߮cu\u0007H'\u001bt?4=~9\u001dRui(Jr>h狑vXOr)%@\u001a7q2^~\u0012\u0003-J\u0010;\u0015\u0001\u0015H\u0016[bEhP[du=\fxt3\\\u001d\u001fa\u0016\u0016}\nbMlN6\u0013&\u0006j(&wg[hY\t1a|\\7߽ݼ̅}\u0006,\u0011zG(wrH2c(4HH&-7\u001bK\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000E$\r\nendstream\rendobj\r2036 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2454 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2454 0 obj\r<</BC 2455 0 R/G 2456 0 R/S/Luminosity/Type/Mask>>\rendobj\r2455 0 obj\r[0.0 0.0 0.0]\rendobj\r2456 0 obj\r<</BBox[1331.0 35.0 1367.0 -1.0]/Group 2457 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2458 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n36 0 0 36 1331 -1 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2457 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2458 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 36>>/Filter/FlateDecode/Height 36/Intent/RelativeColorimetric/Length 474/Name/X/Subtype/Image/Type/XObject/Width 36>>stream\r\nH=P\u0018\u0007p\u0012\u0006/9VI\u000e$&MLMI|\b1\u000b\u0001ߠmM\\\u0015ńxPn{/r_Ͽ<O\u001c\u0001\u0000\u0007\u001f\u0000N\u0016+j!\t\u001b\u0006pv\u0018u9h\u0012A\u0000#('\u0007`(\u001c\u000e\u0005\u001f:)\u0002\u0003OlsB4\u00163lFL'\u0002붙\u001fN쐋\nJlkb!\u0015\u0001cR(oޛi5JRgt\u0019\u0006x,+h2g|6\u0002;<\\,_mǋfm7Ÿ߮cu\u0007H'\u001bt?4=~9\u001dRui(Jr>h狑vXOr)%@\u001a7q2^~\u0012\u0003-J\u0010;\u0015\u0001\u0015H\u0016[bEhP[du=\fxt3\\\u001d\u001fa\u0016\u0016}\nbMlN6\u0013&\u0006j(&wg[hY\t1a|\\7߽ݼ̅}\u0006,\u0011zG(wrH2c(4HH&-7\u001bK\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000E$\r\nendstream\rendobj\r2032 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2034 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 91/Name/X/SMask 2459 0 R/Subtype/Image/Type/XObject/Width 43>>stream\r\nH\u000e\u0000\u0010\f\u0003\u0016!B@wm+0\u0006S\u000b\u001a\u0016B2ۇ((uszCcSv\t}eV\u0002b5SH\"\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000E\u0005\r\nendstream\rendobj\r2459 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 43>>/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 729/Name/X/Subtype/Image/Type/XObject/Width 43>>stream\r\nHMH\"a\u0018Ǜ\u0019g\u001a?qQ\u000fD\u0016\u0013\u0014É\u000e\"DH`z4POuP\u0007!1T:y2=v\u0010HȌ\u000eBHL;d뚓\u001f,{q<\u0019\u0019+Ч@\u0010\u0006i}\u001b\u0003 Ā\u0011dt\u0010\u0004\u0019\u0010\b%\u0019\b`8\u001f\u001cPѓ\u0005 \u0018e<H,Je\u0014RD,\u0012p6\nCǙ0\u0013JVG\u0010\u0014\u0004Ӫr\u0011\u001fcs[G1LE\u0018fj1\u001b\rJ&\u001d\u0000\baejN:.r:HI\u0015\u0000\u0006T\u0005\u00050E(\u0018y=^%QF;\n,0H4\u0016O$)\u0012X4_'Mǂv\u0014\b\u0006ǿL3Kl&J=vRA\u0010L6H,/\u0014K\u0014B>wxIZ!\u0005@Xkv\\\\(r1\u001cf\u0018\u001fޣ\\\fCLѨ?XiI\u001fQ)au\u0005BR\u00142JH{6w(-V\u001bͷ.FMܶިl\t'/KOst\f{lӲ\u0019mTKD\u0004t_8TX\u001exxws~.txz^\u001elMHۯۛy\rC\fadk:;cH?㣃-F\f0\u000f\u0004w77V\u0016\t`R\u0006]ܮ%\u001cuˤD4Y-eh\u0014\u0013_X\bBz\u0013D8TH\u0004Vð~mu\u001dc\"\u001eb햴-i\u000f\u001av\u0017tVޠ04\u000bfޢK\t\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000Xh\r\nendstream\rendobj\r2033 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2460 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2460 0 obj\r<</BC 2461 0 R/G 2462 0 R/S/Luminosity/Type/Mask>>\rendobj\r2461 0 obj\r[0.0 0.0 0.0]\rendobj\r2462 0 obj\r<</BBox[100.0 178.0 143.0 135.0]/Group 2463 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2464 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 43 100 135 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2463 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2464 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 43>>/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 729/Name/X/Subtype/Image/Type/XObject/Width 43>>stream\r\nHMH\"a\u0018Ǜ\u0019g\u001a?qQ\u000fD\u0016\u0013\u0014É\u000e\"DH`z4POuP\u0007!1T:y2=v\u0010HȌ\u000eBHL;d뚓\u001f,{q<\u0019\u0019+Ч@\u0010\u0006i}\u001b\u0003 Ā\u0011dt\u0010\u0004\u0019\u0010\b%\u0019\b`8\u001f\u001cPѓ\u0005 \u0018e<H,Je\u0014RD,\u0012p6\nCǙ0\u0013JVG\u0010\u0014\u0004Ӫr\u0011\u001fcs[G1LE\u0018fj1\u001b\rJ&\u001d\u0000\baejN:.r:HI\u0015\u0000\u0006T\u0005\u00050E(\u0018y=^%QF;\n,0H4\u0016O$)\u0012X4_'Mǂv\u0014\b\u0006ǿL3Kl&J=vRA\u0010L6H,/\u0014K\u0014B>wxIZ!\u0005@Xkv\\\\(r1\u001cf\u0018\u001fޣ\\\fCLѨ?XiI\u001fQ)au\u0005BR\u00142JH{6w(-V\u001bͷ.FMܶިl\t'/KOst\f{lӲ\u0019mTKD\u0004t_8TX\u001exxws~.txz^\u001elMHۯۛy\rC\fadk:;cH?㣃-F\f0\u000f\u0004w77V\u0016\t`R\u0006]ܮ%\u001cuˤD4Y-eh\u0014\u0013_X\bBz\u0013D8TH\u0004Vð~mu\u001dc\"\u001eb햴-i\u000f\u001av\u0017tVޠ04\u000bfޢK\t\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000Xh\r\nendstream\rendobj\r2029 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2031 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 121/Name/X/SMask 2465 0 R/Subtype/Image/Type/XObject/Width 205>>stream\r\nHA\n0\f\u0003A!\u0010\u0012Scx_Ib\u0016#\u0019,ƽ%!ej3rBad\u0019\u001aH\u0016\u0016&\u001aST1UkL\u001aS5ҟf\u00168\u001a\u00111\u0004[.Ӟ{U:sO؋\u0004\u0003\u0000\u0000\u0000\u0000\u0000\u0003\u0000Ua\u0018\r\nendstream\rendobj\r2465 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 205>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 718/Name/X/Subtype/Image/Type/XObject/Width 205>>stream\r\nHܗo`\u0018\"M,dQz\u0011\"A4\u0018\u000f,P(4ջ7ēbAC\"̘ءL4n\u001a\u0016/xaL\r\u0004\u0014\u000b0f6i/x?y~}L&c\u0002A0x@Ў&\b\u0013$\u0005\u0016$>\u0010 svjƑm6\u0010R\f^\u001f$|^\u0018\n-.\u0018m\u0013`8\u0012!\u001eFAQ_;\u001cd&\u0004\\6a\r\u000b?\u001cJʬ:7\u000f\u0012sꬒO%BC\u000e\u001a]\u001f\rҎ#ߟVK2HT+%\u001e\u000f\u0007\u0014Ik\u00133\u000bZZ\u0001VQ+\u0017t\" 08\u000f2x]Ri+BJ\u001293oM4V{kAcZ/y9j_\rL؏J}\u000b@\u0017ͦ]+)GXm`;vO?; m:\u0013F\u001cd?ar^?kt[K\u001eNJq&W@|~d \u0018AT>u\u0018`z\u000bS7O\u001f܇\u0001fJׯ%Vu\u0011v1\u00006~_<r\\\u000f\u0000\bg=ITk~΅\u0001BAWu\u001b3\u0002i\f1s*\u0014+v\u0011^f=c@\"\u0014\rКM\u0010B\rC\u0011\u0019:\u001b2ȥOgp\u0007$9&A\"$e)vX0x\u0004\u0018m\u0013`8\u0012!\u001eFAQ\u00189\u0018\u0006\u0018\u0011>?H1\u0014EO\u0001le\u001c\u0004\tV3lSl \u0004\t\u0002\u000bQ\u0004e\u0007\u0006\u001dM\f\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000璄L\r\nendstream\rendobj\r2030 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2466 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2466 0 obj\r<</BC 2467 0 R/G 2468 0 R/S/Luminosity/Type/Mask>>\rendobj\r2467 0 obj\r[0.0 0.0 0.0]\rendobj\r2468 0 obj\r<</BBox[1.0 752.0 206.0 719.0]/Group 2469 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2470 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n205 0 0 33 1 719 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2469 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2470 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 205>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 718/Name/X/Subtype/Image/Type/XObject/Width 205>>stream\r\nHܗo`\u0018\"M,dQz\u0011\"A4\u0018\u000f,P(4ջ7ēbAC\"̘ءL4n\u001a\u0016/xaL\r\u0004\u0014\u000b0f6i/x?y~}L&c\u0002A0x@Ў&\b\u0013$\u0005\u0016$>\u0010 svjƑm6\u0010R\f^\u001f$|^\u0018\n-.\u0018m\u0013`8\u0012!\u001eFAQ_;\u001cd&\u0004\\6a\r\u000b?\u001cJʬ:7\u000f\u0012sꬒO%BC\u000e\u001a]\u001f\rҎ#ߟVK2HT+%\u001e\u000f\u0007\u0014Ik\u00133\u000bZZ\u0001VQ+\u0017t\" 08\u000f2x]Ri+BJ\u001293oM4V{kAcZ/y9j_\rL؏J}\u000b@\u0017ͦ]+)GXm`;vO?; m:\u0013F\u001cd?ar^?kt[K\u001eNJq&W@|~d \u0018AT>u\u0018`z\u000bS7O\u001f܇\u0001fJׯ%Vu\u0011v1\u00006~_<r\\\u000f\u0000\bg=ITk~΅\u0001BAWu\u001b3\u0002i\f1s*\u0014+v\u0011^f=c@\"\u0014\rКM\u0010B\rC\u0011\u0019:\u001b2ȥOgp\u0007$9&A\"$e)vX0x\u0004\u0018m\u0013`8\u0012!\u001eFAQ\u00189\u0018\u0006\u0018\u0011>?H1\u0014EO\u0001le\u001c\u0004\tV3lSl \u0004\t\u0002\u000bQ\u0004e\u0007\u0006\u001dM\f\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000璄L\r\nendstream\rendobj\r2027 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1997 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 92/Name/X/SMask 2471 0 R/Subtype/Image/Type/XObject/Width 43>>stream\r\nH\n\u0000 \b\u0003P\"$s\u000b$\u0002w~m\"w):\u0001*źrZ@\u000eSHv\u0011\u0005eIDw+\u001bj3_<\nH\u0005\u0000\u0000\u0000\u0000\u0000\u0003\u0000A\u0005\r\nendstream\rendobj\r2471 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 43>>/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 548/Name/X/Subtype/Image/Type/XObject/Width 43>>stream\r\nH약k`\u0014ԯWP*\u0004Mp\u0012! \u0018'qs`9`2us\u0015\u0004A\u001d:89\u0003 :X\\$vXƦW\\>Kx8M/\u000bEQ\u001a_8AR\u0004[\u0007 x\t\u0000~&\u000b\u0017\b\u000bB\u0011&\u001acYN(\u0013\t\u0001/M`} \u0013|*-\bB:S|\"΄\u0003S\u0017\u0003\u0014ry I$\u0015|NHr\u000f\u0001\u001aG0gŢR*WTUQJ\u0014,υ]\u0016i$V5C٨U51d\u0000P\\\u0010z\u000ftAԟ\u0014Q<\u0012H\"Wp4L\u001d&Pk\\\"#^\u0016%\fW\u001de6_,W\u000e|wJg$u+\nDSb\u001d^\u001b\u0018f:\u001bvk%1\u0015\u0005^\bFXPnF46{[GF\u0001\n +Hf\u000fGn\u0018\u0015I`\u001aLy89|\u001cLc9\u0019\u001bUVteӧh\u001aVKYjrB-=ຳ+\u0014\u0016t,$WԆ\u00050\u001bbo\u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000$i\r\nendstream\rendobj\r2028 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2472 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2472 0 obj\r<</BC 2473 0 R/G 2474 0 R/S/Luminosity/Type/Mask>>\rendobj\r2473 0 obj\r[0.0 0.0 0.0]\rendobj\r2474 0 obj\r<</BBox[56.0 178.0 99.0 135.0]/Group 2475 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2476 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 43 56 135 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2475 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2476 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 43>>/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 548/Name/X/Subtype/Image/Type/XObject/Width 43>>stream\r\nH약k`\u0014ԯWP*\u0004Mp\u0012! \u0018'qs`9`2us\u0015\u0004A\u001d:89\u0003 :X\\$vXƦW\\>Kx8M/\u000bEQ\u001a_8AR\u0004[\u0007 x\t\u0000~&\u000b\u0017\b\u000bB\u0011&\u001acYN(\u0013\t\u0001/M`} \u0013|*-\bB:S|\"΄\u0003S\u0017\u0003\u0014ry I$\u0015|NHr\u000f\u0001\u001aG0gŢR*WTUQJ\u0014,υ]\u0016i$V5C٨U51d\u0000P\\\u0010z\u000ftAԟ\u0014Q<\u0012H\"Wp4L\u001d&Pk\\\"#^\u0016%\fW\u001de6_,W\u000e|wJg$u+\nDSb\u001d^\u001b\u0018f:\u001bvk%1\u0015\u0005^\bFXPnF46{[GF\u0001\n +Hf\u000fGn\u0018\u0015I`\u001aLy89|\u001cLc9\u0019\u001bUVteӧh\u001aVKYjrB-=ຳ+\u0014\u0016t,$WԆ\u00050\u001bbo\u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000$i\r\nendstream\rendobj\r2026 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2025 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2024 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2023 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2021 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2022 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2477 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2477 0 obj\r<</BC 2478 0 R/G 2479 0 R/S/Luminosity/Type/Mask>>\rendobj\r2478 0 obj\r[0.0 0.0 0.0]\rendobj\r2479 0 obj\r<</BBox[6.0 178.0 49.0 135.0]/Group 2480 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2476 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 43 6 135 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2480 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2020 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2019 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2017 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1933 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 32/Intent/RelativeColorimetric/Length 107/Name/X/SMask 2481 0 R/Subtype/Image/Type/XObject/Width 294>>stream\r\nHб\r@\u0000İcihѧ FtʣƤĥ¤ĥ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥b6ͥ`6uǟ\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000z\"\u0019\r\nendstream\rendobj\r2481 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 294>>/Filter/FlateDecode/Height 32/Intent/RelativeColorimetric/Length 425/Name/X/Subtype/Image/Type/XObject/Width 294>>stream\r\nH/@\u0014\u0010?@\u0010\bH\u0004\n\u0015\b\u001c\u0000\u0005[p\u0006<b\u0005\u0017\u0014\\o\"uivfL\u0001\b߼'~\u001d\u0010\u0006\u0010z7(\nED\u0001:!nZ6`\u0012ä́p<?8\u001c\u0001\u0010c\t^OI5S\u0014'Y\u000e\u0018Y\u0012G'PcBDs´(+Z\u0003\u0006\"\r\u001d̕{QA\u0001k\u001bZD./eӏ2W\u0018KSƾ)/\u0014+HvMwnC[cFx\u0002c\u001a4;?ޟ__:JJ<\u0012\u000f\u0003*J<\u0012\u000f\u0003*\u0004\u000be\u000bP`nc֮lq\\\n\u0018pi7奒{QA\u0001k\u001bZD.͕\u0010ќ0-ʊրAHCG#h${$\u0001#K\u001a0Wa7\u001c\u000f\u000eG8\u0004\u0018{2?rLDtӲ\u000754g(\nED\u0001\"-\u0010\u0006л\u00117\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\\4\r\nendstream\rendobj\r2018 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2482 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2482 0 obj\r<</BC 2483 0 R/G 2484 0 R/S/Luminosity/Type/Mask>>\rendobj\r2483 0 obj\r[0.0 0.0 0.0]\rendobj\r2484 0 obj\r<</BBox[730.0 252.0 1024.0 220.0]/Group 2485 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2486 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n294 0 0 32 730 220 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2485 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2486 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 294>>/Filter/FlateDecode/Height 32/Intent/RelativeColorimetric/Length 425/Name/X/Subtype/Image/Type/XObject/Width 294>>stream\r\nH/@\u0014\u0010?@\u0010\bH\u0004\n\u0015\b\u001c\u0000\u0005[p\u0006<b\u0005\u0017\u0014\\o\"uivfL\u0001\b߼'~\u001d\u0010\u0006\u0010z7(\nED\u0001:!nZ6`\u0012ä́p<?8\u001c\u0001\u0010c\t^OI5S\u0014'Y\u000e\u0018Y\u0012G'PcBDs´(+Z\u0003\u0006\"\r\u001d̕{QA\u0001k\u001bZD./eӏ2W\u0018KSƾ)/\u0014+HvMwnC[cFx\u0002c\u001a4;?ޟ__:JJ<\u0012\u000f\u0003*J<\u0012\u000f\u0003*\u0004\u000be\u000bP`nc֮lq\\\n\u0018pi7奒{QA\u0001k\u001bZD.͕\u0010ќ0-ʊրAHCG#h${$\u0001#K\u001a0Wa7\u001c\u000f\u000eG8\u0004\u0018{2?rLDtӲ\u000754g(\nED\u0001\"-\u0010\u0006л\u00117\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\\4\r\nendstream\rendobj\r2014 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2016 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 270/Intent/RelativeColorimetric/Length 592/Name/X/SMask 2487 0 R/Subtype/Image/Type/XObject/Width 312>>stream\r\nHЁ\t\u0000\u0000w;Bp7A\u00069̵ʵʶȶȶȷƶȷƶȷƷƶȷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷƷf\u0015-q|Kf\\1ߒ\u0019Wl\u0005qN.z5}fݥio\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000d?,\r\nendstream\rendobj\r2487 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 312>>/Filter/FlateDecode/Height 270/Intent/RelativeColorimetric/Length 2734/Name/X/Subtype/Image/Type/XObject/Width 312>>stream\r\nHKY\u001f飉5VMHM[Et,\"\tY(\u0016\u0004\u0011 &PpE0QѕEL\n\u00105uh\u0014\u0017/\u0014XDTDE<'Nu\u001c\\.\u0017woîCod\u0011Hv7徭\"#e2\\\u0014\n[\b\u0019w؄L\u001e\u0015\u001d\u001d\u0013\u001b\u001b\u001bǾ%0b䲰UaE\t\t\nRLd\"\u0001P$\\\u0017vQB.<rWdhHLRn[!55fRBEeWK*KP&34;LdNWR\tq1Qn\u00157R\u0019w9yLκNK\u0002'\"-Idj\u0017\u0014==\u001e\u001e\u0016\u0015fjԪ$\u0001'\u0017wܵ\u0016\u001dH~O_{\\7<y9{\u00130_{/V\".]\u0016\u0011\u0019\u0015pC@Wbxa,i2|-*_M/ˍ/\f%\u00079\u001b\tQ\u0011\u0017nqW\u0014\u0014*U5u\u0006jt\u0002RWSe(\u0017\u0017S(\u0006|Mv=)M}Pl0-F\"M\u000e{Rm2\u001a\u001fh5iI\rmQnQ\u0014ufNoٝ\u001d].Ws:[v[mQT(Ģ^4Q-,)3վqu\r\f\u000e=q\u000f\r\u000ev9ԚJ\n\u0019^r\u0013kz7Og9޺#ޱqQ㏏yGG\u000e[uAwW,_nYIκbos\u001bN'\u0002Y&\u000e\u001f\bLM'\\mvY\t1\u000fp*ӳ\u000bJU6gg\u0007[^Z\u0018tڪ\u0005ɊX[pK-җ4مյg\u001e\\[]Y{ݽ5\"T\u0016yM721)#67\u0016'Fu/\r\u000fs2RsS4'&c`?\u0012?x{;9@bzըqܢ\u001e=57u\rz'W7v\u000e\u000eHÃI`WS3n;y?{\u001e\u001aZ\\=8:>9x'G\u0007kScCΆW~ϻJvK=6づi(U҅BǇ{[l|.n}\u0005׷N\u001fNȝ\u001co/\u0007|\u001eW\u000fz<;\u0007_NC\u0012NN\u001c|^yz~fky&q3s=-}p\u001fpfgntW\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰ/fgn3w&q?.|?sxB\u0012\u0013ls7OOn./t\u0012*ׯ[\u001e\u000f,\u0005\u000eOCBNʅBǇ{[lJ={\u001e\u001aZ\\=8:>9x'G\u0007kScCΆWτꊛR}\\5蝜_;8<\"\u000e\u000fv6V']M槏r5*e7\u0018\u0018ϭ\u00047wv\u000f$fpe?:ᰘb\u00199\u000f\r/}#\u0013\u000b\u001b[;\u0012o{ks#iazb^0'#U\u001977Emm.\u0005?K¬mm)\u0017io*.E\bRc??=7\"\u0016\u001f;*ciAvzpp$Tgl\r{'S̬d\u0013\u000f\u0004&\u0013w6,̈́\u0018ٹ۵\bYy:CE\u001e\u0019|\u0012N\u001c|;:wuت+\fiIףe\u0011rOTeh\u000bKLo\u001cm}\u0003Cn罤xC\u0003}m7Bm*1U3uzcelmvz$j+z]~:E\u0011\u001b}pǈEh\u001f\u0014\u001bjhr6HfghT\u0007ZX\u0018\u0010\u001dLQ)(֗Uj,\rV&\u0004@C\\Q/.ȹNQ[@\u0018ecZ:\nJehDt l\t\"E\u0017Aawm۫G1;\u001d8\u0018a7,|]Χaۦ\u001f\u0005.\u0014iq޲nͰ;LE\\7zL\u0017i2Mґ=\f\u0015.tA\rFdN&x4uwdnי\u0016\u000f\u00078Ͱ\u001djQ\u001cwhP\u001cGa\u001cЀ}nW8IQu\u0003ێ[|\u0006Ww\u001d\u001b\u001bHl\r8A˨Wk1h\u00160fWPY\u0016\u0005\u000er8\u0012)\bZA\u0000\u0002h%gG\u0017\u001c\u000b`'\u0012\b0JsFFzϖ\u00119eY\u000eiY\u0002H\u0018-\u0003:#zkDK.ǣU<W\u00174\u001a\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u0000̼fz\r\nendstream\rendobj\r2015 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2488 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2488 0 obj\r<</BC 2489 0 R/G 2490 0 R/S/Luminosity/Type/Mask>>\rendobj\r2489 0 obj\r[0.0 0.0 0.0]\rendobj\r2490 0 obj\r<</BBox[721.0 261.0 1033.0 -9.0]/Group 2491 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2492 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n312 0 0 270 721 -9 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2491 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2492 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 312>>/Filter/FlateDecode/Height 270/Intent/RelativeColorimetric/Length 2734/Name/X/Subtype/Image/Type/XObject/Width 312>>stream\r\nHKY\u001f飉5VMHM[Et,\"\tY(\u0016\u0004\u0011 &PpE0QѕEL\n\u00105uh\u0014\u0017/\u0014XDTDE<'Nu\u001c\\.\u0017woîCod\u0011Hv7徭\"#e2\\\u0014\n[\b\u0019w؄L\u001e\u0015\u001d\u001d\u0013\u001b\u001b\u001bǾ%0b䲰UaE\t\t\nRLd\"\u0001P$\\\u0017vQB.<rWdhHLRn[!55fRBEeWK*KP&34;LdNWR\tq1Qn\u00157R\u0019w9yLκNK\u0002'\"-Idj\u0017\u0014==\u001e\u001e\u0016\u0015fjԪ$\u0001'\u0017wܵ\u0016\u001dH~O_{\\7<y9{\u00130_{/V\".]\u0016\u0011\u0019\u0015pC@Wbxa,i2|-*_M/ˍ/\f%\u00079\u001b\tQ\u0011\u0017nqW\u0014\u0014*U5u\u0006jt\u0002RWSe(\u0017\u0017S(\u0006|Mv=)M}Pl0-F\"M\u000e{Rm2\u001a\u001fh5iI\rmQnQ\u0014ufNoٝ\u001d].Ws:[v[mQT(Ģ^4Q-,)3վqu\r\f\u000e=q\u000f\r\u000ev9ԚJ\n\u0019^r\u0013kz7Og9޺#ޱqQ㏏yGG\u000e[uAwW,_nYIκbos\u001bN'\u0002Y&\u000e\u001f\bLM'\\mvY\t1\u000fp*ӳ\u000bJU6gg\u0007[^Z\u0018tڪ\u0005ɊX[pK-җ4مյg\u001e\\[]Y{ݽ5\"T\u0016yM721)#67\u0016'Fu/\r\u000fs2RsS4'&c`?\u0012?x{;9@bzըqܢ\u001e=57u\rz'W7v\u000e\u000eHÃI`WS3n;y?{\u001e\u001aZ\\=8:>9x'G\u0007kScCΆW~ϻJvK=6づi(U҅BǇ{[l|.n}\u0005׷N\u001fNȝ\u001co/\u0007|\u001eW\u000fz<;\u0007_NC\u0012NN\u001c|^yz~fky&q3s=-}p\u001fpfgntW\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰE7,a\rnXtâ\u001b\u0016ݰ/fgn3w&q?.|?sxB\u0012\u0013ls7OOn./t\u0012*ׯ[\u001e\u000f,\u0005\u000eOCBNʅBǇ{[lJ={\u001e\u001aZ\\=8:>9x'G\u0007kScCΆWτꊛR}\\5蝜_;8<\"\u000e\u000fv6V']M槏r5*e7\u0018\u0018ϭ\u00047wv\u000f$fpe?:ᰘb\u00199\u000f\r/}#\u0013\u000b\u001b[;\u0012o{ks#iazb^0'#U\u001977Emm.\u0005?K¬mm)\u0017io*.E\bRc??=7\"\u0016\u001f;*ciAvzpp$Tgl\r{'S̬d\u0013\u000f\u0004&\u0013w6,̈́\u0018ٹ۵\bYy:CE\u001e\u0019|\u0012N\u001c|;:wuت+\fiIףe\u0011rOTeh\u000bKLo\u001cm}\u0003Cn罤xC\u0003}m7Bm*1U3uzcelmvz$j+z]~:E\u0011\u001b}pǈEh\u001f\u0014\u001bjhr6HfghT\u0007ZX\u0018\u0010\u001dLQ)(֗Uj,\rV&\u0004@C\\Q/.ȹNQ[@\u0018ecZ:\nJehDt l\t\"E\u0017Aawm۫G1;\u001d8\u0018a7,|]Χaۦ\u001f\u0005.\u0014iq޲nͰ;LE\\7zL\u0017i2Mґ=\f\u0015.tA\rFdN&x4uwdnי\u0016\u000f\u00078Ͱ\u001djQ\u001cwhP\u001cGa\u001cЀ}nW8IQu\u0003ێ[|\u0006Ww\u001d\u001b\u001bHl\r8A˨Wk1h\u00160fWPY\u0016\u0005\u000er8\u0012)\bZA\u0000\u0002h%gG\u0017\u001c\u000b`'\u0012\b0JsFFzϖ\u00119eY\u000eiY\u0002H\u0018-\u0003:#zkDK.ǣU<W\u00174\u001a\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u0000̼fz\r\nendstream\rendobj\r2011 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2013 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 34/Intent/RelativeColorimetric/Length 126/Name/X/SMask 2493 0 R/Subtype/Image/Type/XObject/Width 803>>stream\r\nHӡ\u0001\u0000\u0000ð8\u0004\b\u0004䂚n\u0000\u0001\u0019\u0004\u001e8\u0004E 9\u0004E Y\u0004E Y\u0004E Y\u0004E Y\u0004E Y\u0004E Y\u0004E Y\u0004E Y\u0004E Y\u0004E Y\u0004E #\u0010f\u0011(\b].\u001f\u001a\u0000t\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000]\r\nendstream\rendobj\r2493 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 803>>/Filter/FlateDecode/Height 34/Intent/RelativeColorimetric/Length 474/Name/X/Subtype/Image/Type/XObject/Width 803>>stream\r\nH1P\u0000\u0007\u000b\u0012\u000b\n\u0002\u0002-t\t,J`\r\u0014\u000b6@vX\u0011\u001bcfLM{s\u0017\u0000\u0000GQT\u0000\u0014#\u0010U\u0014O4\u001d\tӲ]o\u000esm\u0014ګ\u0011U\u001c?\b\nwfB},qv\u0000lc>gD\u0011I\u0000,t[bHD Ϋ9\u0000HǦ8i\u001b&E}n\u000b\u0000kuLdEiٴ\u0006@mS7}%2_eա\u000f\u0000ҽ\u000eU'۟./\u0000v9w$\u0002\u0003\u0000H\u0004\u0018E\"(\u0012\u0001F\b0DQ$\u0002\"\u0011`߉dա\u000f\u0000ҽ\u000eU\u0017e^\u001b\u0000MF+\u0011\r>\u0005ԵHBx&AWus<\u0001M]q`C\"M\u0017e\u0007 Ue\u001b\u0012ʐf:ul\u001d\u0000)&zڐȗ*f\u001fr\u0005@ZFa;31,9#´lכ\u0003x\\2kD4j\u0013ݘ\u0002x3􉦾\u000b(*OG \u0000\u0000o\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000>0i\r\nendstream\rendobj\r2012 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2494 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2494 0 obj\r<</BC 2495 0 R/G 2496 0 R/S/Luminosity/Type/Mask>>\rendobj\r2495 0 obj\r[0.0 0.0 0.0]\rendobj\r2496 0 obj\r<</BBox[288.0 675.0 1091.0 641.0]/Group 2497 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2498 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n803 0 0 34 288 641 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2497 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2498 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 803>>/Filter/FlateDecode/Height 34/Intent/RelativeColorimetric/Length 474/Name/X/Subtype/Image/Type/XObject/Width 803>>stream\r\nH1P\u0000\u0007\u000b\u0012\u000b\n\u0002\u0002-t\t,J`\r\u0014\u000b6@vX\u0011\u001bcfLM{s\u0017\u0000\u0000GQT\u0000\u0014#\u0010U\u0014O4\u001d\tӲ]o\u000esm\u0014ګ\u0011U\u001c?\b\nwfB},qv\u0000lc>gD\u0011I\u0000,t[bHD Ϋ9\u0000HǦ8i\u001b&E}n\u000b\u0000kuLdEiٴ\u0006@mS7}%2_eա\u000f\u0000ҽ\u000eU'۟./\u0000v9w$\u0002\u0003\u0000H\u0004\u0018E\"(\u0012\u0001F\b0DQ$\u0002\"\u0011`߉dա\u000f\u0000ҽ\u000eU\u0017e^\u001b\u0000MF+\u0011\r>\u0005ԵHBx&AWus<\u0001M]q`C\"M\u0017e\u0007 Ue\u001b\u0012ʐf:ul\u001d\u0000)&zڐȗ*f\u001fr\u0005@ZFa;31,9#´lכ\u0003x\\2kD4j\u0013ݘ\u0002x3􉦾\u000b(*OG \u0000\u0000o\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000>0i\r\nendstream\rendobj\r2008 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2010 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 61/Intent/RelativeColorimetric/Length 145/Name/X/SMask 2499 0 R/Subtype/Image/Type/XObject/Width 249>>stream\r\nH\t@\u0010\u00041\u0010\u0004\u000f.X\u0011t%-3W({\u001f镏Sݷ|zc \u001b>=1RZ{ɧ\u000f*\\pµ\n*\\pµ\n*\\pµ\n*\\pµ\n*\\\u000b\u0014\u0015T\u001e\u001b\u0013SĔgkvaUk\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u00168>\r\nendstream\rendobj\r2499 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 249>>/Filter/FlateDecode/Height 61/Intent/RelativeColorimetric/Length 861/Name/X/Subtype/Image/Type/XObject/Width 249>>stream\r\nH=)Q\u001cq3gr\f\u0012\"L\u001c\u001d\"ĆJVI\b\u001dH\u001a\u0002x\u0003\n:D¼)\u0014\u001a\u000fhC$c;f]c0\f\fBaQ#\u000e\u001by\u0013x#W;\"l\n8aF\u001c`5c~3\b[\u000b#/0\u0003>7[0(g9Fx2/\u0014K\u0010+\u0016d<%6c͙\u0004W0-\u001aV\u0007ffV&.1w\u000bhRG\u0004d+Gb+X70[/\u00174lWs1\r\u00078jo,v\fq[^5\u0015tZvo\u001eϷrUvU.|ܮ$v|#3\te\u0003y{V\u001fT引\u0007lK宴:(z7尒۪\f\u0016Z_]G?S/;_K\u0005}Q\fd\u001a\u001e\u0017F& \u001a\u001d|s<^\u001f_z\\N&\u0012)\u0013k[?BpK#mO\u0001?oNI\u0014\u000e<\np\n\u001dS8Î)aG\u0014Nᰣp\npQ8?%D\n\u0014z*D\u001d;dy>U4a\u0007Íb \u0018-n~1jd\u0002Q3X'k}ywu_\u0006x+\u000eO~S\u000e+[\u00067 3\te\u0003y{VT\r\u00113D=o\u000f\u0017B\\\u000e]Ix588jo,v\fq[^5\u0015tZ\u001dn`\u0015UCI^,\u001b\u000bY\u001aˆٻ[;9/xJ\u001fMf\u0012fQ[\u001e=\u0004W0-\u001aV\u0007ffV&.ĽsxCd:_( V,xKl<\u001ac\u0010؉\u0017\bG^`\u0016\t\u0007|nb`\u0018>ư\b N\u0011(X\u0018:A\u001c6&F!\u000bB\u001b\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000gވ\r\nendstream\rendobj\r2009 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2500 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2500 0 obj\r<</BC 2501 0 R/G 2502 0 R/S/Luminosity/Type/Mask>>\rendobj\r2501 0 obj\r[0.0 0.0 0.0]\rendobj\r2502 0 obj\r<</BBox[746.0 583.0 995.0 522.0]/Group 2503 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2504 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n249 0 0 61 746 522 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2503 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2504 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 249>>/Filter/FlateDecode/Height 61/Intent/RelativeColorimetric/Length 861/Name/X/Subtype/Image/Type/XObject/Width 249>>stream\r\nH=)Q\u001cq3gr\f\u0012\"L\u001c\u001d\"ĆJVI\b\u001dH\u001a\u0002x\u0003\n:D¼)\u0014\u001a\u000fhC$c;f]c0\f\fBaQ#\u000e\u001by\u0013x#W;\"l\n8aF\u001c`5c~3\b[\u000b#/0\u0003>7[0(g9Fx2/\u0014K\u0010+\u0016d<%6c͙\u0004W0-\u001aV\u0007ffV&.1w\u000bhRG\u0004d+Gb+X70[/\u00174lWs1\r\u00078jo,v\fq[^5\u0015tZvo\u001eϷrUvU.|ܮ$v|#3\te\u0003y{V\u001fT引\u0007lK宴:(z7尒۪\f\u0016Z_]G?S/;_K\u0005}Q\fd\u001a\u001e\u0017F& \u001a\u001d|s<^\u001f_z\\N&\u0012)\u0013k[?BpK#mO\u0001?oNI\u0014\u000e<\np\n\u001dS8Î)aG\u0014Nᰣp\npQ8?%D\n\u0014z*D\u001d;dy>U4a\u0007Íb \u0018-n~1jd\u0002Q3X'k}ywu_\u0006x+\u000eO~S\u000e+[\u00067 3\te\u0003y{VT\r\u00113D=o\u000f\u0017B\\\u000e]Ix588jo,v\fq[^5\u0015tZ\u001dn`\u0015UCI^,\u001b\u000bY\u001aˆٻ[;9/xJ\u001fMf\u0012fQ[\u001e=\u0004W0-\u001aV\u0007ffV&.ĽsxCd:_( V,xKl<\u001ac\u0010؉\u0017\bG^`\u0016\t\u0007|nb`\u0018>ư\b N\u0011(X\u0018:A\u001c6&F!\u000bB\u001b\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000gވ\r\nendstream\rendobj\r2007 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1676 0 obj\r<</AIS true/BM/Multiply/CA 0.100006/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.100006/op false>>\rendobj\r2004 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2006 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 63/Intent/RelativeColorimetric/Length 150/Name/X/SMask 2505 0 R/Subtype/Image/Type/XObject/Width 251>>stream\r\nH\t@\u0014б#\bu\u0007LRA^b',|W{xҁިD'JI'ƕ}PK:1Ĥ\u0013NL:1Ĥ\u0013NL:1Ĥ\u0013NL:1Ĥ\u0013NL:14jt`C\u0013\t\u001e8|;\u0007VP;p\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000!:\r\nendstream\rendobj\r2505 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 251>>/Filter/FlateDecode/Height 63/Intent/RelativeColorimetric/Length 927/Name/X/Subtype/Image/Type/XObject/Width 251>>stream\r\nH=kP\u0018q\u001e\u0001Q`2\u0006DIT$E\u0010Lw+\"88:S/[\u001c|ق *$ۗҮ\n\u0004Ϗ9\u0011\u0004r\u0004\u001bPQ\u0014IO\u0000=~6h\u0005Y\r\u0001\u001dO\u00008!\u0012K,E\u0004@@|]9E{P\"/+#r1Ix/Mx\t\b\\Zow=4vj)\u0017\u0017\u0002\u001dtaB<\u001cK/2HsVHY\">9\u001d\bgF$ϔzf2G\r\u0007NB\u0016\u0003iRw\u0015N]ͥASL\u000b^H-`PnfGM]L\u0007BgP֗A7Odꇭ\"k\u000f%J\\=\u0018(NAZ\u0004\u0006#dOJQ[v][OՌ?y\u0002p\u001ek\u000fṿ:\u001bQ}񤓍=\u0006n}\u000f1i+,wf\\{dhKSN\u0006]6Rd{.~t+)>Ǟy\u0011F=מ\"a:c:#\u001ec:c:a:c:#\u001ec:c:a:0KUF[Iqg+,wf\\{dhKSN\u0006]6\u001ece=\u0005:;e~NN@4_\u001f-\\yTgz>ꇄE<B$\u001bXIVS5#x(\u0000n.Qj@~2\u000e|*%87BZ_R\u0007D\u00192V\\g߻E\u0007\f\u001f/4\u0006Ӆ\u001duD5C?jb:h\u0014<\u0003t\u0007\tBZl\u000eJiW4k;u5\u0006M1-x!y[k\u0003䙲\\olTf\u0010\u0000tgpPk=\u000fҋf/xܪ\u0015a1\u0001!+UNfN^-B#?\u000eh/\u001fJdrE|D1R.3\u0010)s\u000e\u0019\u001f'Db=\u0018\bϋ\u0007AG3.=n\br\u001bO\u0000\n:]4\u0002\u000f7=ro\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001d\u0004\r\nendstream\rendobj\r2005 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2506 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2506 0 obj\r<</BC 2507 0 R/G 2508 0 R/S/Luminosity/Type/Mask>>\rendobj\r2507 0 obj\r[0.0 0.0 0.0]\rendobj\r2508 0 obj\r<</BBox[590.0 411.0 841.0 348.0]/Group 2509 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2510 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n251 0 0 63 590 348 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2509 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2510 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 251>>/Filter/FlateDecode/Height 63/Intent/RelativeColorimetric/Length 927/Name/X/Subtype/Image/Type/XObject/Width 251>>stream\r\nH=kP\u0018q\u001e\u0001Q`2\u0006DIT$E\u0010Lw+\"88:S/[\u001c|ق *$ۗҮ\n\u0004Ϗ9\u0011\u0004r\u0004\u001bPQ\u0014IO\u0000=~6h\u0005Y\r\u0001\u001dO\u00008!\u0012K,E\u0004@@|]9E{P\"/+#r1Ix/Mx\t\b\\Zow=4vj)\u0017\u0017\u0002\u001dtaB<\u001cK/2HsVHY\">9\u001d\bgF$ϔzf2G\r\u0007NB\u0016\u0003iRw\u0015N]ͥASL\u000b^H-`PnfGM]L\u0007BgP֗A7Odꇭ\"k\u000f%J\\=\u0018(NAZ\u0004\u0006#dOJQ[v][OՌ?y\u0002p\u001ek\u000fṿ:\u001bQ}񤓍=\u0006n}\u000f1i+,wf\\{dhKSN\u0006]6Rd{.~t+)>Ǟy\u0011F=מ\"a:c:#\u001ec:c:a:c:#\u001ec:c:a:0KUF[Iqg+,wf\\{dhKSN\u0006]6\u001ece=\u0005:;e~NN@4_\u001f-\\yTgz>ꇄE<B$\u001bXIVS5#x(\u0000n.Qj@~2\u000e|*%87BZ_R\u0007D\u00192V\\g߻E\u0007\f\u001f/4\u0006Ӆ\u001duD5C?jb:h\u0014<\u0003t\u0007\tBZl\u000eJiW4k;u5\u0006M1-x!y[k\u0003䙲\\olTf\u0010\u0000tgpPk=\u000fҋf/xܪ\u0015a1\u0001!+UNfN^-B#?\u000eh/\u001fJdrE|D1R.3\u0010)s\u000e\u0019\u001f'Db=\u0018\bϋ\u0007AG3.=n\br\u001bO\u0000\n:]4\u0002\u000f7=ro\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u001d\u0004\r\nendstream\rendobj\r2001 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2003 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 85/Intent/RelativeColorimetric/Length 173/Name/X/SMask 2511 0 R/Subtype/Image/Type/XObject/Width 251>>stream\r\nH\tP\u0010\u0000!\b!\u0003g:=\\վxA׾NߞX*+?탵E\u0017.\u0016],XtbŢE\u0017.\u0016],XtbŢE\u0017.\u0016],XtbŢE\u0017.\u0016]lXD\u0007\u001b>:]Ϩ΃ͭ\r\u000fw9\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000N\r\nendstream\rendobj\r2511 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 251>>/Filter/FlateDecode/Height 85/Intent/RelativeColorimetric/Length 959/Name/X/Subtype/Image/Type/XObject/Width 251>>stream\r\nH=kP\u0018q\u001e\u0001Q`2\u0006Dh'Q-`_Avvsqs\n\u000b\u000el *$ۗҮ\n\t\u001fs\u0003Q\u0014Mr\u0014\u001b1cI\fIO\b\u0003a>*d&Dp\u0011\u001dO!̅\u0004<\\Y&8\u0010\u0011u\f\u001b\u0014c\\RoHLVTL\fϸ,kv{GfNQ+\u0017R;?p|<[\u001e\u0006#Q%Ge4xhK81;g#\rՉ6[,l1&ה\bi\u001cm_~%S+g ߖΉR\u001b[ӲI2o\"o\u0014\u000e\nlL{vyє^\u0010\u000b=\u001dT5\u001bda\u0012h\u0007\\^\u001b&rn\u001as\u0002'OE1[؃\u001d {O\u0006Eؽx'#mu\u0002Kw׾F\u0004ux\u0017MW:̰=Aҩ>\njwX½;\u0017^Ռ͝|=\u0011R\u0014\u000ecOu\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\"]TDŸ[\b{/ta\u001d{d\u00193SIG}.'#me=\u0001ڙ+mԾN^NE1Sx{O\u0006E\u0018S\u000e\tHڽ:7N`;Ә\u0014`\u001c\u0007T5\u001bta\u0012ȑ;\u0017\u001f\u0015=E{٘6mn^4W/B;tĉR\u001b[ӲI2o\"t\u000fRV+ӹ2֯d6V|o\u0014^r7T'l$L^S#OR0\u0018)*=*C^yy;'Ed\\k;;2vڍZ\"\u0019!P4\u0006X*WT\u001b\u0012b.\u0015\u0013,C.}1\u0017\u0012D:sIft\\\u0012B\u001cF_#\u000f \u0010\u0001?Fw\u0010>|^ \u0007&_\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000٠\u000f\r\nendstream\rendobj\r2002 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2512 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2512 0 obj\r<</BC 2513 0 R/G 2514 0 R/S/Luminosity/Type/Mask>>\rendobj\r2513 0 obj\r[0.0 0.0 0.0]\rendobj\r2514 0 obj\r<</BBox[336.0 540.0 587.0 455.0]/Group 2515 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2516 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n251 0 0 85 336 455 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2515 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2516 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 251>>/Filter/FlateDecode/Height 85/Intent/RelativeColorimetric/Length 959/Name/X/Subtype/Image/Type/XObject/Width 251>>stream\r\nH=kP\u0018q\u001e\u0001Q`2\u0006Dh'Q-`_Avvsqs\n\u000b\u000el *$ۗҮ\n\t\u001fs\u0003Q\u0014Mr\u0014\u001b1cI\fIO\b\u0003a>*d&Dp\u0011\u001dO!̅\u0004<\\Y&8\u0010\u0011u\f\u001b\u0014c\\RoHLVTL\fϸ,kv{GfNQ+\u0017R;?p|<[\u001e\u0006#Q%Ge4xhK81;g#\rՉ6[,l1&ה\bi\u001cm_~%S+g ߖΉR\u001b[ӲI2o\"o\u0014\u000e\nlL{vyє^\u0010\u000b=\u001dT5\u001bda\u0012h\u0007\\^\u001b&rn\u001as\u0002'OE1[؃\u001d {O\u0006Eؽx'#mu\u0002Kw׾F\u0004ux\u0017MW:̰=Aҩ>\njwX½;\u0017^Ռ͝|=\u0011R\u0014\u000ecOu\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\u0003\u000et\"]TDŸ[\b{/ta\u001d{d\u00193SIG}.'#me=\u0001ڙ+mԾN^NE1Sx{O\u0006E\u0018S\u000e\tHڽ:7N`;Ә\u0014`\u001c\u0007T5\u001bta\u0012ȑ;\u0017\u001f\u0015=E{٘6mn^4W/B;tĉR\u001b[ӲI2o\"t\u000fRV+ӹ2֯d6V|o\u0014^r7T'l$L^S#OR0\u0018)*=*C^yy;'Ed\\k;;2vڍZ\"\u0019!P4\u0006X*WT\u001b\u0012b.\u0015\u0013,C.}1\u0017\u0012D:sIft\\\u0012B\u001cF_#\u000f \u0010\u0001?Fw\u0010>|^ \u0007&_\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000٠\u000f\r\nendstream\rendobj\r1998 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r2000 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 424/Intent/RelativeColorimetric/Length 1221/Name/X/SMask 2517 0 R/Subtype/Image/Type/XObject/Width 819>>stream\r\nHӡ\u0011\u0000 \f\u0000*\r*!3\u0000\u00016_\u0012\u0006\"a 2\u0006\u001ac1\u0006\u001ae 1\u0006\u001ae 1\u0006\u001ae Q\u0006\u0012cQ\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e Q\u0006\u0012e y\u0000\u0000\u0000\u0000\u0000\u0000ӱ\t\u0000 \u00000i܋\b\u0005]:'pu\u0003|2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e _f\u0001\u0000\u0000\u0000\u0000\u0000\t\u0002\u0001\u0000)\u001a\u0010Nq|r\u001f\rC,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$23\u00102PX\u0006y\u0006Y\u0006\n@2@y\u00067@1@y\u0006޷\u001d1\r<x\u0018Cχ\ry\u000b\u0000|\u0015\u0000\u0000\u0000\u0000\u0000\u0003\u0000L8X\r\nendstream\rendobj\r2517 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 819>>/Filter/FlateDecode/Height 424/Intent/RelativeColorimetric/Length 3801/Name/X/Subtype/Image/Type/XObject/Width 819>>stream\r\nHK{\u001c̹9^flNiĠ\"%B\u00020\u0004/A \"!\u0003\u000b\u0017QBPѕD\u0011j\u000bA,s\"\"$4BRD%K=xc\u0012՗\u0003~\u0005y\u001d\u0003\u0000\u0012\u0004[?8Z\u0015\u001d\u0000.\u0010^7\r&N\r\u0011ж@\u0006@8|\u0018\u0015`4Bfs(u\u0010h\u00079*\bjF\u0002Z\u001aX\"T6F\u0015M\u001c-Fo0^,X\u001e\u0007h* 66:\u0016iQ՘\f#\u0004V\u0018\u0012\u001aa\u001d\tINI@˜Τ\u0004G=f\b\r1\u000f'WLDL#3Դt@R]gNJrǜ\u001diF\u00153blv3ŕ}6םw\u000eв<wtWaf\f&1Zlq\tɮ\u001cw~Abѥˀv]*),wd\u0013lPӡ3\u0013\u0014\u00143#N\u0013RR\u0017<W%e\u0015\u0001(/+-)^\\pg$ODd\u0002G&\u001aHN>_xZٍ5n\u0000-RoU7ʮ]-<숱힙]dmNWyWWp\u0019Ъƻ\ruR|\u0019o\u000bW3{,lqd\u000b\u0015վƖ~\u0017M~z_uН∱evL`Eړ\\9\u0017Vihy\tE}\u001ftw6ܩ.z!Ǖd\f,Cɨ]v*Vk7084|dd\u0005=?\u001f\u001e\u001a\u001c{ૼqRd\u0007C\"\u001c3Է\u001f=\u001d\u001a\u001d{9>99555\rhz/F>ה]<툊\b\u0007\u001fO`D'.5v<xllb76{jfb\u0007\u001d\u001bނ3\t\u0016 \u0019J&6uohlzv\u000f6-.7?;=6RWU\\x֕\u0018\u001dJ\u001a)Y30:1vҧ\u0015@?-}\\x;;1:Vē\u0014k&PݙXZpplf~aieum}\u0003ЦՕ\r5\u0017iN5P2dnݽxw\u001fW6>o~\u0001iw^\u000e=VYQn2DOT~wxՍͯ[ۀ6m}X]zz|vs'GS\\m=[\u001f\u0016lianyJ&\\mLY\\^R\thfks}yH\u000f\u001fe{G\u0015\u0017=/\u001b+\u001fF~~2\u0014\u0003R'd^\u001c$?\u001cM\u000eyKL\f4n?i\u0001~\u0005\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f _\u001b\u0000\u0000\u0000\u0000\u0000ӻ\u0001\u0000\u0000@G$\nRm\u0000\u001bX\u000e!`\u0005\u001b\u0018@T)$V(3m\u0005?߮xﶛjϦh87\u0018ƓlX֛n8Ηx~\u001b2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e 2o\u0000\u0000\u0000\u0000\u0000\u0000Ki\u0018RgƙIg1]\u001d>ȬX,5e\t\fjٶ,kwٍ݊r H2$:\u000f\b- \u0012˃\"R!F*%-4݈\u001b\u0016\u0016~sp_\u001f֖ƺ%\u001dg\u0013\u001dafCP!\u0001A\u0006s#=+{\u000e_IƖή\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f \"K]%sڗT|JfM?%SQr2\r-m]4\u0003mRlkmib2;\rw=J3\u0006th77ܩ./.S2V{ۓ^p|U'/^yխD\u0003hPww7_<yX[uDvoǝ`\u000eLF&dݶ5\u000flx\u000bЦwo;_>ozPs}fz\\j2\u0001ɘv+mњ{\u000bˮܺUN@:޴?}t֕½[,Js9Vdgd\u0017o7=|\u000ehQ[gMu7/>U\u00193;\u0006&\u00137Y\"S|MO[\u0001-_<xЯOM􁟒1F|56e7\u001b~<Ptҍ{\u001e77\u0000ZQ\u001b\u0014\u001dq7sS~\u0015\u0011j\u001c\u0018\u001a\u001e4%}7o+7n{𰾡\u0011Т\u000fݾq<)I1F]_2C\u0003u!+6+<U~歚;wUuNښ[7.*i4h[H.pd\u0002\f03yڜ-\u000e\u0016U^|:-WW]|-ޥs%;afCPdLؤIy\n\u000e\u0017<]v|yEEE%5ܗ?[vd]y3<b#,dό\u00182<:!9%=3'v\u000e\u001d9v\u0004Тǎ\u001cܜ!FǯLo2`52v;uvލ[w۞}\u000b|6\u0015߷_vn6sv{Tlլ|eQ.3eqI\u0013S3mw\u0000Zmy[ߔ.gIFzĤ8MY2wYߚG'R<3-_z:w=E^ﺵW._1ۓJ\u000e\f\\2}kf5\u00117*yR̯[03++\u001bЦ̅\u000bzfʤQqpAKFM&PgP8GsM:m4,@<i3O:5n3Ʈ\u0016cPL2Xl\u0011cƍr\u0001r&\u001f7ftb|#f[1oFiF\u001fl\n£\u001c#b\t\t\t6)\u001d\nYBLzŨk& 0Ho0Zm#\"v\u0003&e\"#۬F>H-fP2J3m\u0016\u001bjBB-\u0016\"\f&u-\u0010`^\u0017^e\u0019ی\u0012Zd2\u0001R\n0*|X1-?\u001a\u001aN2\u0000Z[R\u0018RMZ\u000ei\u001d\u0004`\r=|>A\u0000r.\u0000\u0000\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u0000j\u0010\r\nendstream\rendobj\r1999 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2518 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2518 0 obj\r<</BC 2519 0 R/G 2520 0 R/S/Luminosity/Type/Mask>>\rendobj\r2519 0 obj\r[0.0 0.0 0.0]\rendobj\r2520 0 obj\r<</BBox[280.0 679.0 1099.0 255.0]/Group 2521 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2522 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n819 0 0 424 280 255 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2521 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2522 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 819>>/Filter/FlateDecode/Height 424/Intent/RelativeColorimetric/Length 3801/Name/X/Subtype/Image/Type/XObject/Width 819>>stream\r\nHK{\u001c̹9^flNiĠ\"%B\u00020\u0004/A \"!\u0003\u000b\u0017QBPѕD\u0011j\u000bA,s\"\"$4BRD%K=xc\u0012՗\u0003~\u0005y\u001d\u0003\u0000\u0012\u0004[?8Z\u0015\u001d\u0000.\u0010^7\r&N\r\u0011ж@\u0006@8|\u0018\u0015`4Bfs(u\u0010h\u00079*\bjF\u0002Z\u001aX\"T6F\u0015M\u001c-Fo0^,X\u001e\u0007h* 66:\u0016iQ՘\f#\u0004V\u0018\u0012\u001aa\u001d\tINI@˜Τ\u0004G=f\b\r1\u000f'WLDL#3Դt@R]gNJrǜ\u001diF\u00153blv3ŕ}6םw\u000eв<wtWaf\f&1Zlq\tɮ\u001cw~Abѥˀv]*),wd\u0013lPӡ3\u0013\u0014\u00143#N\u0013RR\u0017<W%e\u0015\u0001(/+-)^\\pg$ODd\u0002G&\u001aHN>_xZٍ5n\u0000-RoU7ʮ]-<숱힙]dmNWyWWp\u0019Ъƻ\ruR|\u0019o\u000bW3{,lqd\u000b\u0015վƖ~\u0017M~z_uН∱evL`Eړ\\9\u0017Vihy\tE}\u001ftw6ܩ.z!Ǖd\f,Cɨ]v*Vk7084|dd\u0005=?\u001f\u001e\u001a\u001c{ૼqRd\u0007C\"\u001c3Է\u001f=\u001d\u001a\u001d{9>99555\rhz/F>ה]<툊\b\u0007\u001fO`D'.5v<xllb76{jfb\u0007\u001d\u001bނ3\t\u0016 \u0019J&6uohlzv\u000f6-.7?;=6RWU\\x֕\u0018\u001dJ\u001a)Y30:1vҧ\u0015@?-}\\x;;1:Vē\u0014k&PݙXZpplf~aieum}\u0003ЦՕ\r5\u0017iN5P2dnݽxw\u001fW6>o~\u0001iw^\u000e=VYQn2DOT~wxՍͯ[ۀ6m}X]zz|vs'GS\\m=[\u001f\u0016lianyJ&\\mLY\\^R\thfks}yH\u000f\u001fe{G\u0015\u0017=/\u001b+\u001fF~~2\u0014\u0003R'd^\u001c$?\u001cM\u000eyKL\f4n?i\u0001~\u0005\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f _\u001b\u0000\u0000\u0000\u0000\u0000ӻ\u0001\u0000\u0000@G$\nRm\u0000\u001bX\u000e!`\u0005\u001b\u0018@T)$V(3m\u0005?߮xﶛjϦh87\u0018ƓlX֛n8Ηx~\u001b2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e \f$2X\u0006\u0012@b\u0019H,\u0003e 2o\u0000\u0000\u0000\u0000\u0000\u0000Ki\u0018RgƙIg1]\u001d>ȬX,5e\t\fjٶ,kwٍ݊r H2$:\u000f\b- \u0012˃\"R!F*%-4݈\u001b\u0016\u0016~sp_\u001f֖ƺ%\u001dg\u0013\u001dafCP!\u0001A\u0006s#=+{\u000e_IƖή\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f B2\b\u0000\"$\u0003\f \"K]%sڗT|JfM?%SQr2\r-m]4\u0003mRlkmib2;\rw=J3\u0006th77ܩ./.S2V{ۓ^p|U'/^yխD\u0003hPww7_<yX[uDvoǝ`\u000eLF&dݶ5\u000flx\u000bЦwo;_>ozPs}fz\\j2\u0001ɘv+mњ{\u000bˮܺUN@:޴?}t֕½[,Js9Vdgd\u0017o7=|\u000ehQ[gMu7/>U\u00193;\u0006&\u00137Y\"S|MO[\u0001-_<xЯOM􁟒1F|56e7\u001b~<Ptҍ{\u001e77\u0000ZQ\u001b\u0014\u001dq7sS~\u0015\u0011j\u001c\u0018\u001a\u001e4%}7o+7n{𰾡\u0011Т\u000fݾq<)I1F]_2C\u0003u!+6+<U~歚;wUuNښ[7.*i4h[H.pd\u0002\f03yڜ-\u000e\u0016U^|:-WW]|-ޥs%;afCPdLؤIy\n\u000e\u0017<]v|yEEE%5ܗ?[vd]y3<b#,dό\u00182<:!9%=3'v\u000e\u001d9v\u0004Тǎ\u001cܜ!FǯLo2`52v;uvލ[w۞}\u000b|6\u0015߷_vn6sv{Tlլ|eQ.3eqI\u0013S3mw\u0000Zmy[ߔ.gIFzĤ8MY2wYߚG'R<3-_z:w=E^ﺵW._1ۓJ\u000e\f\\2}kf5\u00117*yR̯[03++\u001bЦ̅\u000bzfʤQqpAKFM&PgP8GsM:m4,@<i3O:5n3Ʈ\u0016cPL2Xl\u0011cƍr\u0001r&\u001f7ftb|#f[1oFiF\u001fl\n£\u001c#b\t\t\t6)\u001d\nYBLzŨk& 0Ho0Zm#\"v\u0003&e\"#۬F>H-fP2J3m\u0016\u001bjBB-\u0016\"\f&u-\u0010`^\u0017^e\u0019ی\u0012Zd2\u0001R\n0*|X1-?\u001a\u001aN2\u0000Z[R\u0018RMZ\u000ei\u001d\u0004`\r=|>A\u0000r.\u0000\u0000\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u0000j\u0010\r\nendstream\rendobj\r1995 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1996 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2523 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2523 0 obj\r<</BC 2524 0 R/G 2525 0 R/S/Luminosity/Type/Mask>>\rendobj\r2524 0 obj\r[0.0 0.0 0.0]\rendobj\r2525 0 obj\r<</BBox[146.0 224.0 189.0 181.0]/Group 2526 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2476 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n43 0 0 43 146 181 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2526 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1992 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1994 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 34/Name/X/SMask 2527 0 R/Subtype/Image/Type/XObject/Width 74>>stream\r\nHb`\u0018\u0005`\u0014Q0\nF(\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\b\u0018\r\nendstream\rendobj\r2527 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 74>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 949/Name/X/Subtype/Image/Type/XObject/Width 74>>stream\r\nHTisV\u0018l Q\u0011и\"\u0002\u0018hbƘmyt\u001fdC{\u000fy.\u000f\u0002\"\u0000\u000e\u0004#\b\f]\"\u0011[ݰP\u001fBh$q\u0014|~~@\u0000w' 8aOXW*\u001a\u0000\u0000ubn\be\u001cOa\b\u0018NP\fc\u0005ȩJ2\u0018C\f\u0011\u0005\u0015\u0018\u000e;\"E\bce\u001e\n<MPtMp|\u001a\u00114ER4&\u0004(d*P$I(\u000e\f1\u0014\u0000HVѲ<d\\Ng\u0004A\u0014$Ib&%2\\6R\u0002q<`Y.-JR*\u0011\u000eqTF\u001eJ._fSկeUk4\u001a*j]kZ^BN\u0016ꪦVPP謄raب77c:]glۦǷ?hul\r8h\u0012ySP4Q\u001e?\u001f^m\u0004,X/7V֟L\u0017𾞘c-s00=i\u0014\tj\u000eo_\u001dv7ݬVsjymZV'`c2\u0006\u001eXե\u0018\u0006]Ƥ:c`\u000fܾ_<\bО\u001e~\u001fOO`xy;\u001at`I\t\u0018nMf`&1]{|8̝1h>\u001ah}}f}s6>i긁iM%\u0014T[notm\u0013Xcg:\u001dSk`?\u001dWoZQgszaC[4h!].\u0015UQR\u0003*MZՊbͰz\u001c\u001bFFZuE\u000fԴR>WJ\u001c\u001c'\u000e!x\u0017xKf$Q\n ]yI3鴔䓙rEiojr gbFʁ$e\u0000˅vߡ8E\u0004A2,if`cq`\u0018\u00168\u0005\u0011Ϧ$\u0003\u001f3L\f؆\u0002>DsZG#\u0004\u0002\u0000F*\u001e.1,\n\f\u0011$\u001d\u0018\npP\t\u0013b\u001e>&)8\nC\b,ϙt\u00048Ð9?p7wNgDK\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000͏\r\nendstream\rendobj\r1993 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2528 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2528 0 obj\r<</BC 2529 0 R/G 2530 0 R/S/Luminosity/Type/Mask>>\rendobj\r2529 0 obj\r[0.0 0.0 0.0]\rendobj\r2530 0 obj\r<</BBox[299.0 263.0 373.0 235.0]/Group 2531 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2532 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n74 0 0 28 299 235 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2531 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2532 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 74>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 949/Name/X/Subtype/Image/Type/XObject/Width 74>>stream\r\nHTisV\u0018l Q\u0011и\"\u0002\u0018hbƘmyt\u001fdC{\u000fy.\u000f\u0002\"\u0000\u000e\u0004#\b\f]\"\u0011[ݰP\u001fBh$q\u0014|~~@\u0000w' 8aOXW*\u001a\u0000\u0000ubn\be\u001cOa\b\u0018NP\fc\u0005ȩJ2\u0018C\f\u0011\u0005\u0015\u0018\u000e;\"E\bce\u001e\n<MPtMp|\u001a\u00114ER4&\u0004(d*P$I(\u000e\f1\u0014\u0000HVѲ<d\\Ng\u0004A\u0014$Ib&%2\\6R\u0002q<`Y.-JR*\u0011\u000eqTF\u001eJ._fSկeUk4\u001a*j]kZ^BN\u0016ꪦVPP謄raب77c:]glۦǷ?hul\r8h\u0012ySP4Q\u001e?\u001f^m\u0004,X/7V֟L\u0017𾞘c-s00=i\u0014\tj\u000eo_\u001dv7ݬVsjymZV'`c2\u0006\u001eXե\u0018\u0006]Ƥ:c`\u000fܾ_<\bО\u001e~\u001fOO`xy;\u001at`I\t\u0018nMf`&1]{|8̝1h>\u001ah}}f}s6>i긁iM%\u0014T[notm\u0013Xcg:\u001dSk`?\u001dWoZQgszaC[4h!].\u0015UQR\u0003*MZՊbͰz\u001c\u001bFFZuE\u000fԴR>WJ\u001c\u001c'\u000e!x\u0017xKf$Q\n ]yI3鴔䓙rEiojr gbFʁ$e\u0000˅vߡ8E\u0004A2,if`cq`\u0018\u00168\u0005\u0011Ϧ$\u0003\u001f3L\f؆\u0002>DsZG#\u0004\u0002\u0000F*\u001e.1,\n\f\u0011$\u001d\u0018\npP\t\u0013b\u001e>&)8\nC\b,ϙt\u00048Ð9?p7wNgDK\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000͏\r\nendstream\rendobj\r1989 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1991 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 96/Name/X/SMask 2533 0 R/Subtype/Image/Type/XObject/Width 229>>stream\r\nHρ\r \u0010\u0015+K=/iiq+ \u001aG9p\u0006VN\u001f<H$%DR\u0012II$%DR\u0012II$%J|eZte?.>\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000#\b\u001b^\r\nendstream\rendobj\r2533 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 229>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 380/Name/X/Subtype/Image/Type/XObject/Width 229>>stream\r\nH/@\u0018\u0010?A@@\"P(\u0004 \b\u001c\u0000\u0005[p\u0006<b\u0005\u0017\u0014\\o\"uivfW\r\u0006o~\\\u0002!\f\u0013BX\u0010%YGD\u00012@T\fӂ4\u0018UWbA\bK{k\u0004C\u0013%iV\u0014YDnS\"B8ꆷئd\u0012sw02\u001d\u0012IbҺM\u001dyuu\u0019\u0016~cy²<}S#yyay-\u0017\u0013YmyFg$\u0014g$\u0014g$\u0014g$\u0014#\u000fv=/\u0010IIŻ~\u0018a\u0019Wˤ5\u0012\u0011jyU77u6%h\u0014T݉4+JX,M\"GW5򂉦ۮ\u0007!,ﹶZ)JaZИ\u0006*ه\\+ J\u0002,\u00024n\bÄ~\u0013\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000a3\r\nendstream\rendobj\r1990 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2534 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2534 0 obj\r<</BC 2535 0 R/G 2536 0 R/S/Luminosity/Type/Mask>>\rendobj\r2535 0 obj\r[0.0 0.0 0.0]\rendobj\r2536 0 obj\r<</BBox[278.0 247.0 507.0 214.0]/Group 2537 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2538 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n229 0 0 33 278 214 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2537 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2538 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 229>>/Filter/FlateDecode/Height 33/Intent/RelativeColorimetric/Length 380/Name/X/Subtype/Image/Type/XObject/Width 229>>stream\r\nH/@\u0018\u0010?A@@\"P(\u0004 \b\u001c\u0000\u0005[p\u0006<b\u0005\u0017\u0014\\o\"uivfW\r\u0006o~\\\u0002!\f\u0013BX\u0010%YGD\u00012@T\fӂ4\u0018UWbA\bK{k\u0004C\u0013%iV\u0014YDnS\"B8ꆷئd\u0012sw02\u001d\u0012IbҺM\u001dyuu\u0019\u0016~cy²<}S#yyay-\u0017\u0013YmyFg$\u0014g$\u0014g$\u0014g$\u0014#\u000fv=/\u0010IIŻ~\u0018a\u0019Wˤ5\u0012\u0011jyU77u6%h\u0014T݉4+JX,M\"GW5򂉦ۮ\u0007!,ﹶZ)JaZИ\u0006*ه\\+ J\u0002,\u00024n\bÄ~\u0013\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000a3\r\nendstream\rendobj\r1988 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1987 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1986 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1985 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1984 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1983 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1982 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1981 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1979 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1968 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 89/Name/X/SMask 2539 0 R/Subtype/Image/Type/XObject/Width 37>>stream\r\nH9\u000e\u00000\b\u0003AO#Qa$D[eE.\"?\u0002sU\u0018\u000e\u000fEFXF}0ZQ\u0018Ce6\u000e\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000j\u0005\u0003\r\nendstream\rendobj\r2539 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 37>>/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 758/Name/X/Subtype/Image/Type/XObject/Width 37>>stream\r\nH̔MH\"a\u0018klё$\u0002$\u0016\u0016{K^̏\tu\u0011/_\u0007I袇Y!0<)z$ L\u0017m\u001aŏݽ40?^}ff1a~\nB{\u000fx&\u0001A3 9\bĠi1\f \f&F8\\\b˙cBti`\u0017\u0015\"p\u0001E`h0\n\rb\u0002L\"+oQ*5l\u0011e3\u0003BeP,Si:d2\u0019:fgc]4?Ǥ\r \u001a\u0013\u0011\u0015jb;].a\u001enKy6DR\u0014:d\u0003ǃi\u0010\u000fx\u001dG{_\"\u0014S\t`%*Ջx\"_^D\u0002ǖE<\n!BSL._7WG\u001b\u0018:K\u0010\rqDr\u0017NerZ\u0016\"\u0001\u0002\\LbVo\u001fgμ\u001apA}\u001c4XT{lA~\u0017#'V|\u0003\rM3\u0018ϕ뭟^<=\\\u0004l:26w\n%F_%+1.1O\u0012rj뿾{F%\u0017\u000f:+\u0010Z\"\u0010\u0013.ӧPY-$C\u0005M[74='\u0012\u001a0\u0011Lzyjc-ۭZ)\u0013\u0006\u0000Slkb:\u0007-\u0016L5Z)TgEO\u000f:^\u0000-ϤS\f\u0010ܖd2Ǣakի$|6Qߩ\u0003\t~za<X\rv.f1\n\u0000!\u0017}\u0005\u0006\u0006`\u0003L,Da\u0006\tl^`\u0002\u0005\r1UBQ\"!7fIӽɎa&cTS\u0004\u0004\u0004ȸ6K\u0003\u0001TI~\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000OhD\r\nendstream\rendobj\r1980 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2540 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2540 0 obj\r<</BC 2541 0 R/G 2542 0 R/S/Luminosity/Type/Mask>>\rendobj\r2541 0 obj\r[0.0 0.0 0.0]\rendobj\r2542 0 obj\r<</BBox[103.0 224.0 140.0 181.0]/Group 2543 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2544 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n37 0 0 43 103 181 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2543 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2544 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 37>>/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 758/Name/X/Subtype/Image/Type/XObject/Width 37>>stream\r\nH̔MH\"a\u0018klё$\u0002$\u0016\u0016{K^̏\tu\u0011/_\u0007I袇Y!0<)z$ L\u0017m\u001aŏݽ40?^}ff1a~\nB{\u000fx&\u0001A3 9\bĠi1\f \f&F8\\\b˙cBti`\u0017\u0015\"p\u0001E`h0\n\rb\u0002L\"+oQ*5l\u0011e3\u0003BeP,Si:d2\u0019:fgc]4?Ǥ\r \u001a\u0013\u0011\u0015jb;].a\u001enKy6DR\u0014:d\u0003ǃi\u0010\u000fx\u001dG{_\"\u0014S\t`%*Ջx\"_^D\u0002ǖE<\n!BSL._7WG\u001b\u0018:K\u0010\rqDr\u0017NerZ\u0016\"\u0001\u0002\\LbVo\u001fgμ\u001apA}\u001c4XT{lA~\u0017#'V|\u0003\rM3\u0018ϕ뭟^<=\\\u0004l:26w\n%F_%+1.1O\u0012rj뿾{F%\u0017\u000f:+\u0010Z\"\u0010\u0013.ӧPY-$C\u0005M[74='\u0012\u001a0\u0011Lzyjc-ۭZ)\u0013\u0006\u0000Slkb:\u0007-\u0016L5Z)TgEO\u000f:^\u0000-ϤS\f\u0010ܖd2Ǣakի$|6Qߩ\u0003\t~za<X\rv.f1\n\u0000!\u0017}\u0005\u0006\u0006`\u0003L,Da\u0006\tl^`\u0002\u0005\r1UBQ\"!7fIӽɎa&cTS\u0004\u0004\u0004ȸ6K\u0003\u0001TI~\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000OhD\r\nendstream\rendobj\r1978 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1977 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1976 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1975 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1974 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1973 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1972 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1971 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1970 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1969 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1966 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1967 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2545 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2545 0 obj\r<</BC 2546 0 R/G 2547 0 R/S/Luminosity/Type/Mask>>\rendobj\r2546 0 obj\r[0.0 0.0 0.0]\rendobj\r2547 0 obj\r<</BBox[59.0 224.0 96.0 181.0]/Group 2548 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2544 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n37 0 0 43 59 181 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2548 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1965 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1964 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1962 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1948 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 69/Name/X/SMask 2549 0 R/Subtype/Image/Type/XObject/Width 57>>stream\r\nHb`\b0\u0002Ԇd}Pd$W#Y@:G5j\u001cHu/\u0001//\u001e/\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005g\r\nendstream\rendobj\r2549 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 57>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 279/Name/X/Subtype/Image/Type/XObject/Width 57>>stream\r\nH씱\nP\u0014\u000b.w\u0010Ԃ\u001a\u001d\u0014\t|\u001ck0_\u0017\u0019|\u00037A\u0015\u0004Fq\t)4\u0013o\u000fs'\bBȇFU\r*W\u0018}qMi.5+\t9_ٮxKL\tm!6\ft\n\u0016&9\f\u001eHu`\"?%Z*dTC~\u0016!qV\u001a.-[tHw0\\6}wMy<SLY\u0003f*}/\"v\u001d\u0003\u001co~d|u\n_BF\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u00006A[\r\nendstream\rendobj\r1963 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2550 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2550 0 obj\r<</BC 2551 0 R/G 2552 0 R/S/Luminosity/Type/Mask>>\rendobj\r2551 0 obj\r[0.0 0.0 0.0]\rendobj\r2552 0 obj\r<</BBox[432.0 44.0 489.0 16.0]/Group 2553 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2554 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n57 0 0 28 432 16 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2553 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2554 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 57>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 279/Name/X/Subtype/Image/Type/XObject/Width 57>>stream\r\nH씱\nP\u0014\u000b.w\u0010Ԃ\u001a\u001d\u0014\t|\u001ck0_\u0017\u0019|\u00037A\u0015\u0004Fq\t)4\u0013o\u000fs'\bBȇFU\r*W\u0018}qMi.5+\t9_ٮxKL\tm!6\ft\n\u0016&9\f\u001eHu`\"?%Z*dTC~\u0016!qV\u001a.-[tHw0\\6}wMy<SLY\u0003f*}/\"v\u001d\u0003\u001co~d|u\n_BF\u0004\u0000\u0000\u0000\u0000\u0000\u0003\u00006A[\r\nendstream\rendobj\r1961 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1960 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1958 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1959 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2555 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2555 0 obj\r<</BC 2556 0 R/G 2557 0 R/S/Luminosity/Type/Mask>>\rendobj\r2556 0 obj\r[0.0 0.0 0.0]\rendobj\r2557 0 obj\r<</BBox[432.0 84.0 489.0 56.0]/Group 2558 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2554 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n57 0 0 28 432 56 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2558 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1957 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1956 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1954 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1955 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2559 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2559 0 obj\r<</BC 2560 0 R/G 2561 0 R/S/Luminosity/Type/Mask>>\rendobj\r2560 0 obj\r[0.0 0.0 0.0]\rendobj\r2561 0 obj\r<</BBox[432.0 124.0 489.0 96.0]/Group 2562 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2554 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n57 0 0 28 432 96 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2562 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1953 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1950 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1952 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 42/Intent/RelativeColorimetric/Length 98/Name/X/SMask 2563 0 R/Subtype/Image/Type/XObject/Width 46>>stream\r\nH1\u000e\u0000 \bCQ{K$\u0003\u0003Ώok\u0018\rmx\u0013\u001fQ\tSxrRCӸ!\u001a_PV_ʏ6R_J\bu\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000AY\u0005\r\nendstream\rendobj\r2563 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 46>>/Filter/FlateDecode/Height 42/Intent/RelativeColorimetric/Length 856/Name/X/Subtype/Image/Type/XObject/Width 46>>stream\r\nHoH\u0013a\u001cn;[9\u001d\\ӊ\u0010e z`\rAasF/\u001a(Eao\u0012\"p\bn\"\u0010%)QcG\u0004 r\u0016\u00046A]\u0006hԚOݩ7wyq>>\u0007\u000e\u001b\u000e^E\u0000\u0000\\%\t\u0010O@Z\f`\u0018(\u0016\t`\u001e\b{\u000e\u0017H\f+\u0014rTV\"\u0011\u0010!:8\u0000T$rMUuuT\"C \u000e\u0000e\nL߀7Oj\u001dE0\u000e\u000e\u0013JU\u001a\u001d|jKʅJ5ZzD\"ٮ#k0V̶[.\u001a#*r\u000eDHڂ\u00125ۻ\u0006<}~rZ-PuQ\b\u001dDr}k\u0018{y\r˥sgϘF\u0003ޠ*Teb\u0018\u00046m^1i0w\f\u0010d\u0007[ׯ٬m\u0016s3ӨB\u001cȫp}x,03\u00104bt>a37*P\u0004\u00067l.\u001fQ\u0018Z{F<_++Bhrϟ\u001152<n1u kK;X]̇|1b֬/ `۶:ܾz\"cܷPhv:\u0018\u0018'\u0006:\r\u001amN\u001f\"t,EQg\u0002cv\u000b^%GtҚl\u001dM2t:\\_KP㱥p3jQ |.\u0017S4ɵXdm3bJ\t\"E:\u0019'g}nuW;K&\u0015'C~i5NDifҪk3Np\u000f\u000e\u0019O3\fثv>\u0012[K\u0018`V\u0005Kx<;\u001b\u001bd4\u0007K!8=\u001bbPx&\u0019\u0014X\u0014\u000f\u0004i`&dP8i1[Z۬V[\u000ek\u0014%h41`I\bfj`\u0018́O^\"+JU\u000e%K好d\u0007\u0005^,Wj'Z\u001c\u0016XŽ\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005W\r\nendstream\rendobj\r1951 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2564 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2564 0 obj\r<</BC 2565 0 R/G 2566 0 R/S/Luminosity/Type/Mask>>\rendobj\r2565 0 obj\r[0.0 0.0 0.0]\rendobj\r2566 0 obj\r<</BBox[5.0 223.0 51.0 181.0]/Group 2567 0 R/Length 39/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2568 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n46 0 0 42 5 181 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2567 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2568 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 46>>/Filter/FlateDecode/Height 42/Intent/RelativeColorimetric/Length 856/Name/X/Subtype/Image/Type/XObject/Width 46>>stream\r\nHoH\u0013a\u001cn;[9\u001d\\ӊ\u0010e z`\rAasF/\u001a(Eao\u0012\"p\bn\"\u0010%)QcG\u0004 r\u0016\u00046A]\u0006hԚOݩ7wyq>>\u0007\u000e\u001b\u000e^E\u0000\u0000\\%\t\u0010O@Z\f`\u0018(\u0016\t`\u001e\b{\u000e\u0017H\f+\u0014rTV\"\u0011\u0010!:8\u0000T$rMUuuT\"C \u000e\u0000e\nL߀7Oj\u001dE0\u000e\u000e\u0013JU\u001a\u001d|jKʅJ5ZzD\"ٮ#k0V̶[.\u001a#*r\u000eDHڂ\u00125ۻ\u0006<}~rZ-PuQ\b\u001dDr}k\u0018{y\r˥sgϘF\u0003ޠ*Teb\u0018\u00046m^1i0w\f\u0010d\u0007[ׯ٬m\u0016s3ӨB\u001cȫp}x,03\u00104bt>a37*P\u0004\u00067l.\u001fQ\u0018Z{F<_++Bhrϟ\u001152<n1u kK;X]̇|1b֬/ `۶:ܾz\"cܷPhv:\u0018\u0018'\u0006:\r\u001amN\u001f\"t,EQg\u0002cv\u000b^%GtҚl\u001dM2t:\\_KP㱥p3jQ |.\u0017S4ɵXdm3bJ\t\"E:\u0019'g}nuW;K&\u0015'C~i5NDifҪk3Np\u000f\u000e\u0019O3\fثv>\u0012[K\u0018`V\u0005Kx<;\u001b\u001bd4\u0007K!8=\u001bbPx&\u0019\u0014X\u0014\u000f\u0004i`&dP8i1[Z۬V[\u000ek\u0014%h41`I\bfj`\u0018́O^\"+JU\u000e%K好d\u0007\u0005^,Wj'Z\u001c\u0016XŽ\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0005W\r\nendstream\rendobj\r1949 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1946 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1947 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2569 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2569 0 obj\r<</BC 2570 0 R/G 2571 0 R/S/Luminosity/Type/Mask>>\rendobj\r2570 0 obj\r[0.0 0.0 0.0]\rendobj\r2571 0 obj\r<</BBox[432.0 164.0 489.0 136.0]/Group 2572 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2554 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n57 0 0 28 432 136 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2572 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1945 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1942 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1944 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2573 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r2573 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 281/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nH̑ko \u0018+\f*(VlKn\u001ft_5U/IHNx\u0002/X\fG3\u0011\u0000!\u0004@m\fA\u0013\u0013\u0011\u0004w\u0001,x>'&\u001a\r\u0018\"\")7%ތ\u0004ǃb\u001dNLd\u0013Nv8_`tc\u001a&K_{\\\u001c\u000b\u0017O\f-5T\u0010z,fUq/4S\u0003Eqh89C_wuQȸU\u001f\u0014i\u0016q$+t0\u0010B\u0006绎EP'\n\u00106.\u0019Q>`bKTTT93jP\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000_\u0015\r\nendstream\rendobj\r1943 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2574 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2574 0 obj\r<</BC 2575 0 R/G 2576 0 R/S/Luminosity/Type/Mask>>\rendobj\r2575 0 obj\r[0.0 0.0 0.0]\rendobj\r2576 0 obj\r<</BBox[1046.0 242.0 1074.0 216.0]/Group 2577 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2578 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 1046 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2577 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2578 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 281/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nH̑ko \u0018+\f*(VlKn\u001ft_5U/IHNx\u0002/X\fG3\u0011\u0000!\u0004@m\fA\u0013\u0013\u0011\u0004w\u0001,x>'&\u001a\r\u0018\"\")7%ތ\u0004ǃb\u001dNLd\u0013Nv8_`tc\u001a&K_{\\\u001c\u000b\u0017O\f-5T\u0010z,fUq/4S\u0003Eqh89C_wuQȸU\u001f\u0014i\u0016q$+t0\u0010B\u0006绎EP'\n\u00106.\u0019Q>`bKTTT93jP\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000_\u0015\r\nendstream\rendobj\r1941 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1940 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1939 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1936 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1938 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 24/Name/X/SMask 2579 0 R/Subtype/Image/Type/XObject/Width 20>>stream\r\nHb`\u0018\u0005\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\b\r\nendstream\rendobj\r2579 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 20>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 189/Name/X/Subtype/Image/Type/XObject/Width 20>>stream\r\nH\u000e0\u0010Ei\u000f[)HTH\b\u001a\u0014LHXeWPؚx'\u0013\u0004?\u0007\b\u0006\u0000}r!9 Ls\u0012\tWF=\u0007X\u001eb3iHWu\u001e6l\u0019FTvWFi3]i<\u0006\"Ux-4z(*U\u000f6+\u0002<4\u0017\u0013r\u001ac\u0012\u000ba\u00046b>T\f=_\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000q\t\r\nendstream\rendobj\r1937 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2580 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2580 0 obj\r<</BC 2581 0 R/G 2582 0 R/S/Luminosity/Type/Mask>>\rendobj\r2581 0 obj\r[0.0 0.0 0.0]\rendobj\r2582 0 obj\r<</BBox[1000.0 242.0 1020.0 216.0]/Group 2583 0 R/Length 42/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2584 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n20 0 0 26 1000 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2583 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2584 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 20>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 189/Name/X/Subtype/Image/Type/XObject/Width 20>>stream\r\nH\u000e0\u0010Ei\u000f[)HTH\b\u001a\u0014LHXeWPؚx'\u0013\u0004?\u0007\b\u0006\u0000}r!9 Ls\u0012\tWF=\u0007X\u001eb3iHWu\u001e6l\u0019FTvWFi3]i<\u0006\"Ux-4z(*U\u000f6+\u0002<4\u0017\u0013r\u001ac\u0012\u000ba\u00046b>T\f=_\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000q\t\r\nendstream\rendobj\r1935 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1934 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1931 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1932 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2585 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2585 0 obj\r<</BC 2586 0 R/G 2587 0 R/S/Luminosity/Type/Mask>>\rendobj\r2586 0 obj\r[0.0 0.0 0.0]\rendobj\r2587 0 obj\r<</BBox[-6.0 246.0 288.0 214.0]/Group 2588 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2486 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n294 0 0 32 -6 214 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2588 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r1930 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1929 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1928 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1925 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1927 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2589 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r2589 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 338/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHko0\u0018-X\u0010zg\f\"\u0000%ޖmq.3Y\u0018xϋӛ>is[L\\]\u0011\u00003\u0014@ \"H\u0010\u0004\u0010\tT\u0002\u0019ahB\t&Tm*GA\"aXM1vlA\u0011\u0019@Ym2d&\u00179(d>xnוۑPx\u001aL8\"׶v>Spΐ\u0019I\u000ba\u0014lv~f1(t\u000e=_}||ͭ:.e;z{2*%J8l)Z.g\u0003V-\f\u0016\u001ep9i~\u000f;2\u0006%e.cm7er\n-ϬHRMUy\u0016YWE\u0010 Kǎ$\b\u0002ғ#7/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000k\"\r\nendstream\rendobj\r1926 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2590 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2590 0 obj\r<</BC 2591 0 R/G 2592 0 R/S/Luminosity/Type/Mask>>\rendobj\r2591 0 obj\r[0.0 0.0 0.0]\rendobj\r2592 0 obj\r<</BBox[946.0 242.0 974.0 216.0]/Group 2593 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2594 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 946 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2593 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2594 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 338/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHko0\u0018-X\u0010zg\f\"\u0000%ޖmq.3Y\u0018xϋӛ>is[L\\]\u0011\u00003\u0014@ \"H\u0010\u0004\u0010\tT\u0002\u0019ahB\t&Tm*GA\"aXM1vlA\u0011\u0019@Ym2d&\u00179(d>xnוۑPx\u001aL8\"׶v>Spΐ\u0019I\u000ba\u0014lv~f1(t\u000e=_}||ͭ:.e;z{2*%J8l)Z.g\u0003V-\f\u0016\u001ep9i~\u000f;2\u0006%e.cm7er\n-ϬHRMUy\u0016YWE\u0010 Kǎ$\b\u0002ғ#7/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000k\"\r\nendstream\rendobj\r1924 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1923 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1922 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1921 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1920 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1917 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1919 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2595 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r2595 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 326/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHYs0\u0014\u0010\u0002DQ$S:T\u00162\u0012\u0014Nik)kx{snZu]\u0011\u0016b㺸@\u0000\"QD\u0010\u0000\ne\u0011~\u0017#\u001eឪ0@\u00066MS'r[&\u0018*lX=P#=\u000b\u0002T\u00012pr:4l7JH\\8|\u0001A0yY\rd\u001c3\rp\u001b/g(9\u001d}KAWl\u0013Q\u001a&_cbya=3gM\u001cϏ>\u0012~K\u0001i\u001cC\u001a}b>|?%p:Dݲ-3=rɓї\u001aef*Q\u0015\u0010M5\u001cZ$\n$i\u0017a;\u0000\u000eB]-ZY\u001f7/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000#\r\nendstream\rendobj\r1918 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2596 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2596 0 obj\r<</BC 2597 0 R/G 2598 0 R/S/Luminosity/Type/Mask>>\rendobj\r2597 0 obj\r[0.0 0.0 0.0]\rendobj\r2598 0 obj\r<</BBox[896.0 242.0 924.0 216.0]/Group 2599 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2600 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 896 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2599 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2600 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 326/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHYs0\u0014\u0010\u0002DQ$S:T\u00162\u0012\u0014Nik)kx{snZu]\u0011\u0016b㺸@\u0000\"QD\u0010\u0000\ne\u0011~\u0017#\u001eឪ0@\u00066MS'r[&\u0018*lX=P#=\u000b\u0002T\u00012pr:4l7JH\\8|\u0001A0yY\rd\u001c3\rp\u001b/g(9\u001d}KAWl\u0013Q\u001a&_cbya=3gM\u001cϏ>\u0012~K\u0001i\u001cC\u001a}b>|?%p:Dݲ-3=rɓї\u001aef*Q\u0015\u0010M5\u001cZ$\n$i\u0017a;\u0000\u000eB]-ZY\u001f7/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000#\r\nendstream\rendobj\r1914 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1916 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 36/Name/X/SMask 2601 0 R/Subtype/Image/Type/XObject/Width 175>>stream\r\nH\u0001\u0001\u0000\u0000\u0000 nH@\u0001\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0013$\r\nendstream\rendobj\r2601 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 175>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 2363/Name/X/Subtype/Image/Type/XObject/Width 175>>stream\r\nHUF\u0012q\u0002qI\u0012\b\u0004:@-\u0001\u0001>8ljS;lǮrvtQbjf{~/K'\u0017@]ǫ߻\u0005\u0002'J+@#p\tE\u001fx~Fe0\u0014\n\u0005-P8\u001c\u000e}>DYE\u001b\f`(\u001aDC`0\fc\u0011\ndt狗@0\u001c%Rd<4\f\u0001h2I'cOH&\u0002Dbx\u0014~?c\r@0\u0012KţP6X<Bl*Hed4t\u001aݾf0rKF`$l\u0019\\\"\u0012\u0004y<H]P@\\M//ST\\|\u001f@\u0017$Tҩ\f\\Vk\u0005(+\u0006^GE(fb))k8tH\u0002[D\u001c\u001c\b\u0004c|%ID\u0013\u0010ҥ~QH\u0001t.\u000b\n\u0005A(B4\u001a\b\u001a\u0002:OXl*~\u00158\u0012\u0014<\n\u0006\"\u0018!jPn\u000e\u0007\u0003\u0006\"5Y\u001ft\u0003 P*%\u0010It\u001b*q]\u0014JFB\u0018Tn1ͣfb\u00158\u0007kX)Vc \u0016&y]ep*Hc1Mb \u0015P\u0001i yP+\u0000<L@Y\u0012T*\u0011\u0003\u0000VO;q!*a\u0003IMQ\u0001qh.tF%Z˅B R\u0013d5a\u0007sD\u0012Bʑ-\u0004Y\u001cC;XygS8\u0002C\nFS4o.\u0006U+\u0002b%\u0019&3\u0012 Y\u0016\u0006*өtX.\u0015ӱ`\u0015n8vǽV\u0003g<ם\tC$}z?.W\u001c1?\u0018R4HOvStsb\fQG\u001c\u0018uaIC?lkq#sKz-Q#WB6[\u0018֬@fݣ9ќ)4\nJ\u001bU\u0003:J\tr&ڟHFtEsхݛǹ\f\u001c;3߲x7tPf\u0012K\u0011\u001dYk\u0010n0\u0016|8-o_&z*#Gq\"/xQ\u0014/HR-_\\\"^\u0011BV\u0015\u001dPaēD(()%C_!rh*\u000b,Řw;K83˶HQda0BKrlr\\in\u000b44wy|/\u000bwz{9\u0005I\u0005pw{JcE\u0005St˲;MFRL&\u00126u-\u001dINa-\u0013\u000e![%\u0015$(q1_\u001d\u00000R޼8۷\u001f\u001e}Z=@\f/*$[z}x]{:]?\u001d,?\u0001Ķ9U]\u0019sii\u0019hlr}p_;lR%\u000ffb\u0019lfs\tE>M#]\u001bPO\u0017Gsd\u0011j:ܽ\\9owج-YQwMsʪ{\u001dw&L)j4qj\u001aP\u0002\u0004vl[bcx}\u0000;皢h뻟?[oa\u000b[݂&w\u0014YYv\u0018˽½\b%\u0018Ǳ,/9:ֈ;sot>rW0S̉eLwW\u001bP\u0017r\u001aK}\u00010\u0013}9`tتdX1\u001e\u0001\u001cn޾\u001f6=@38\u0019ÜH\u001c;vuu<\u0011p/P\u0011 214IQTL0Ƣ󻛃%p\"E\u000e$J\\3j؊Za陪\"\u0010GK(ǧw7SDK2':Dh,Ǌ)Ș67׻\u001aOw:^-\u001cM\u0019\u0014ۥh8n+~.\u0018\tI<\u0003I\u001cK5Q\u0007\u001ch.C:\\O`Ѫ<\"jU\u0011A\u000b3CA\u0001\r359yhL~*<գZFgX\u001aװ6jC\u0006\u0004\u0019NtvlCf\u0006\u000f\nq5yK[z&\u00079l|#jW\u0018F[xV\u001dBa\b#\nzzKj072\u0002åj,e\u0011x\u0013$E\rz=\u0004\u0012-|*\u0016M\u001b=\u001f\u0003\u0000*yܬ7Pr\u0005hw-0wzd\u0017W\u001b\u001aRВoJ\u0003Z.!p._̦V\u001fI>?×DP70\f\u0001\\ڮ]aݘ\bAM$>A\u0012n7KȲ\u001d;\u0006\\r.4iEUQ\u0018%4\u0012\u001dmCi)*d-ڦ*K[]`\u0018i\n\u000e\u0013]yi\u0014Ci(!(\u0014F]*B~)׭v/KgPHB\\~|f8%Lo\u0006p0\u0019HCдV#\u000b<'\\\u0012 9ϥ%Ah\u0000\f9\nR\f\"cBaY.e4\u0003\u0000aLZ\u000f\f>+avV\u0017\u0006N\u0003.\u001fȚAGƿ1<\u000fL'$\u0002#hI\u0000P7f}d/eP[V\u0010\u0002.Mw\u001d\u0019@<\u000eT:+\u0011qRجgp\u001e)~_8/ dR-7g%h\u0012g_I/\u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000#\u0005|\r\nendstream\rendobj\r1915 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2602 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2602 0 obj\r<</BC 2603 0 R/G 2604 0 R/S/Luminosity/Type/Mask>>\rendobj\r2603 0 obj\r[0.0 0.0 0.0]\rendobj\r2604 0 obj\r<</BBox[34.0 23.0 209.0 -5.0]/Group 2605 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2606 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n175 0 0 28 34 -5 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2605 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2606 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 175>>/Filter/FlateDecode/Height 28/Intent/RelativeColorimetric/Length 2363/Name/X/Subtype/Image/Type/XObject/Width 175>>stream\r\nHUF\u0012q\u0002qI\u0012\b\u0004:@-\u0001\u0001>8ljS;lǮrvtQbjf{~/K'\u0017@]ǫ߻\u0005\u0002'J+@#p\tE\u001fx~Fe0\u0014\n\u0005-P8\u001c\u000e}>DYE\u001b\f`(\u001aDC`0\fc\u0011\ndt狗@0\u001c%Rd<4\f\u0001h2I'cOH&\u0002Dbx\u0014~?c\r@0\u0012KţP6X<Bl*Hed4t\u001aݾf0rKF`$l\u0019\\\"\u0012\u0004y<H]P@\\M//ST\\|\u001f@\u0017$Tҩ\f\\Vk\u0005(+\u0006^GE(fb))k8tH\u0002[D\u001c\u001c\b\u0004c|%ID\u0013\u0010ҥ~QH\u0001t.\u000b\n\u0005A(B4\u001a\b\u001a\u0002:OXl*~\u00158\u0012\u0014<\n\u0006\"\u0018!jPn\u000e\u0007\u0003\u0006\"5Y\u001ft\u0003 P*%\u0010It\u001b*q]\u0014JFB\u0018Tn1ͣfb\u00158\u0007kX)Vc \u0016&y]ep*Hc1Mb \u0015P\u0001i yP+\u0000<L@Y\u0012T*\u0011\u0003\u0000VO;q!*a\u0003IMQ\u0001qh.tF%Z˅B R\u0013d5a\u0007sD\u0012Bʑ-\u0004Y\u001cC;XygS8\u0002C\nFS4o.\u0006U+\u0002b%\u0019&3\u0012 Y\u0016\u0006*өtX.\u0015ӱ`\u0015n8vǽV\u0003g<ם\tC$}z?.W\u001c1?\u0018R4HOvStsb\fQG\u001c\u0018uaIC?lkq#sKz-Q#WB6[\u0018֬@fݣ9ќ)4\nJ\u001bU\u0003:J\tr&ڟHFtEsхݛǹ\f\u001c;3߲x7tPf\u0012K\u0011\u001dYk\u0010n0\u0016|8-o_&z*#Gq\"/xQ\u0014/HR-_\\\"^\u0011BV\u0015\u001dPaēD(()%C_!rh*\u000b,Řw;K83˶HQda0BKrlr\\in\u000b44wy|/\u000bwz{9\u0005I\u0005pw{JcE\u0005St˲;MFRL&\u00126u-\u001dINa-\u0013\u000e![%\u0015$(q1_\u001d\u00000R޼8۷\u001f\u001e}Z=@\f/*$[z}x]{:]?\u001d,?\u0001Ķ9U]\u0019sii\u0019hlr}p_;lR%\u000ffb\u0019lfs\tE>M#]\u001bPO\u0017Gsd\u0011j:ܽ\\9owج-YQwMsʪ{\u001dw&L)j4qj\u001aP\u0002\u0004vl[bcx}\u0000;皢h뻟?[oa\u000b[݂&w\u0014YYv\u0018˽½\b%\u0018Ǳ,/9:ֈ;sot>rW0S̉eLwW\u001bP\u0017r\u001aK}\u00010\u0013}9`tتdX1\u001e\u0001\u001cn޾\u001f6=@38\u0019ÜH\u001c;vuu<\u0011p/P\u0011 214IQTL0Ƣ󻛃%p\"E\u000e$J\\3j؊Za陪\"\u0010GK(ǧw7SDK2':Dh,Ǌ)Ș67׻\u001aOw:^-\u001cM\u0019\u0014ۥh8n+~.\u0018\tI<\u0003I\u001cK5Q\u0007\u001ch.C:\\O`Ѫ<\"jU\u0011A\u000b3CA\u0001\r359yhL~*<գZFgX\u001aװ6jC\u0006\u0004\u0019NtvlCf\u0006\u000f\nq5yK[z&\u00079l|#jW\u0018F[xV\u001dBa\b#\nzzKj072\u0002åj,e\u0011x\u0013$E\rz=\u0004\u0012-|*\u0016M\u001b=\u001f\u0003\u0000*yܬ7Pr\u0005hw-0wzd\u0017W\u001b\u001aRВoJ\u0003Z.!p._̦V\u001fI>?×DP70\f\u0001\\ڮ]aݘ\bAM$>A\u0012n7KȲ\u001d;\u0006\\r.4iEUQ\u0018%4\u0012\u001dmCi)*d-ڦ*K[]`\u0018i\n\u000e\u0013]yi\u0014Ci(!(\u0014F]*B~)׭v/KgPHB\\~|f8%Lo\u0006p0\u0019HCдV#\u000b<'\\\u0012 9ϥ%Ah\u0000\f9\nR\f\"cBaY.e4\u0003\u0000aLZ\u000f\f>+avV\u0017\u0006N\u0003.\u001fȚAGƿ1<\u000fL'$\u0002#hI\u0000P7f}d/eP[V\u0010\u0002.Mw\u001d\u0019@<\u000eT:+\u0011qRجgp\u001e)~_8/ dR-7g%h\u0012g_I/\u0017\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000#\u0005|\r\nendstream\rendobj\r1913 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1912 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1911 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1910 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1909 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1906 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1908 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2607 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r2607 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 321/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHr0\u0010%\u0007\u0012\u0004\u0005\u0001)\u0006\u0004\u000fPA\u0010\nRc5\u0003bwh4I\\\"\u0002\u000e\u0004@.~\t ²y &B0\u0013}Q<@\tʪnJeY\u0018\n\u0002\u0002\u0011fA:>\u0017:]!J\u000ed,/&ԕљ?,pl7:\u001eM\bTgs>ǾؖV\u0012qs\\mѶ ,\u0003k\u001f.\f_˺\u001c\rN=9UYMS\u001b\u001fSReK*_U,Vw(2Ox1\u001b\u001bv\u000fW\u000b\u0002Ne3\u001f˜*BBy \b}#\u0004;!\b~!9O\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0004R\u001e\r\nendstream\rendobj\r1907 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2608 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2608 0 obj\r<</BC 2609 0 R/G 2610 0 R/S/Luminosity/Type/Mask>>\rendobj\r2609 0 obj\r[0.0 0.0 0.0]\rendobj\r2610 0 obj\r<</BBox[846.0 242.0 874.0 216.0]/Group 2611 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2612 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 846 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2611 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2612 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 321/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHr0\u0010%\u0007\u0012\u0004\u0005\u0001)\u0006\u0004\u000fPA\u0010\nRc5\u0003bwh4I\\\"\u0002\u000e\u0004@.~\t ²y &B0\u0013}Q<@\tʪnJeY\u0018\n\u0002\u0002\u0011fA:>\u0017:]!J\u000ed,/&ԕљ?,pl7:\u001eM\bTgs>ǾؖV\u0012qs\\mѶ ,\u0003k\u001f.\f_˺\u001c\rN=9UYMS\u001b\u001fSReK*_U,Vw(2Ox1\u001b\u001bv\u000fW\u000b\u0002Ne3\u001f˜*BBy \b}#\u0004;!\b~!9O\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0004R\u001e\r\nendstream\rendobj\r1905 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1904 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1903 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1902 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1899 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1901 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 35/Intent/RelativeColorimetric/Length 111/Name/X/SMask 2613 0 R/Subtype/Image/Type/XObject/Width 296>>stream\r\nHб\tP\u0000K\t)>hq7A\u0006]r))Q|JfT%68\u0006\u0000\u0000\u0000\u0000\u0000\u0003\u0000U#=\r\nendstream\rendobj\r2613 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 296>>/Filter/FlateDecode/Height 35/Intent/RelativeColorimetric/Length 442/Name/X/Subtype/Image/Type/XObject/Width 296>>stream\r\nH=@\u0018qgG,(\b\u0004K\n+*\n#p\u0000*\tނ3S\u00024b\r\u001d1fwENa\u0016h\u0004iPx?2V5\u001d^hXRDai9\u0014e\u001aL\u0019BQ6=?\b\u000b\u0010\tÜ\f{u\u0001A6\"VI\u0017|\u000b\u0002^YLwG\u0019/z\u000f*y\u0016\u001f\u001e՜ C\u001eA62\u0003Gw0)ԝAНHBW\u001f:M\u0017)ߵ\nKxvl\u000b\u0004qݠI\u000e:A'9$\u0007䠓\u001ctNrIk'w<wn\u0014Us NMU$;tҜ C\u001eA62\u0003GwR-?xY{\u0010UɳȷԾ\u0013aJ[\u0010\"ϒg2wR\f{u\u0001A6ӈA8_`\u001e\u0006gOXvA1ô\u001cw\nO\\2\r6'\u0014Uƪ\u000bM\u001d+VPx\u0004)\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\f8\r\nendstream\rendobj\r1900 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2614 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2614 0 obj\r<</BC 2615 0 R/G 2616 0 R/S/Luminosity/Type/Mask>>\rendobj\r2615 0 obj\r[0.0 0.0 0.0]\rendobj\r2616 0 obj\r<</BBox[-7.0 28.0 289.0 -7.0]/Group 2617 0 R/Length 40/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2618 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n296 0 0 35 -7 -7 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2617 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2618 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 296>>/Filter/FlateDecode/Height 35/Intent/RelativeColorimetric/Length 442/Name/X/Subtype/Image/Type/XObject/Width 296>>stream\r\nH=@\u0018qgG,(\b\u0004K\n+*\n#p\u0000*\tނ3S\u00024b\r\u001d1fwENa\u0016h\u0004iPx?2V5\u001d^hXRDai9\u0014e\u001aL\u0019BQ6=?\b\u000b\u0010\tÜ\f{u\u0001A6\"VI\u0017|\u000b\u0002^YLwG\u0019/z\u000f*y\u0016\u001f\u001e՜ C\u001eA62\u0003Gw0)ԝAНHBW\u001f:M\u0017)ߵ\nKxvl\u000b\u0004qݠI\u000e:A'9$\u0007䠓\u001ctNrIk'w<wn\u0014Us NMU$;tҜ C\u001eA62\u0003GwR-?xY{\u0010UɳȷԾ\u0013aJ[\u0010\"ϒg2wR\f{u\u0001A6ӈA8_`\u001e\u0006gOXvA1ô\u001cw\nO\\2\r6'\u0014Uƪ\u000bM\u001d+VPx\u0004)\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\f8\r\nendstream\rendobj\r1898 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1895 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1897 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2619 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r2619 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 340/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHmo0\u0014R(Vd9\u0003\u0013eJdʴ f\u0010e3nٖ\u0019?2\n>.|퓞Rl*[\u001d\fHd\f-\n\u0004 /\b<\u0004\f`9$ .9Ⱔ(\u0012F\u001ckryp\u0000UͰ,CDI7[mSXk\u000e\u000609MY\u0007\u0000Wx칶\u0004\"꘥7!\u0004#/x>CǨq\u00072\u0014\u001b6}?\u000f}EUjzb,*虲y|}m\u0017e2?eYE$\f\u001d\u000e\t$\u000eܦNMd-v{ӷ-5o03USeY\u001ai\u0015́b+\u0002B\n\u0016kbUW\u0010i2l\u0016\u0013`!l\u0011Ch\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000%\r\nendstream\rendobj\r1896 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2620 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2620 0 obj\r<</BC 2621 0 R/G 2622 0 R/S/Luminosity/Type/Mask>>\rendobj\r2621 0 obj\r[0.0 0.0 0.0]\rendobj\r2622 0 obj\r<</BBox[796.0 242.0 824.0 216.0]/Group 2623 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2624 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 796 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2623 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2624 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 340/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nHmo0\u0014R(Vd9\u0003\u0013eJdʴ f\u0010e3nٖ\u0019?2\n>.|퓞Rl*[\u001d\fHd\f-\n\u0004 /\b<\u0004\f`9$ .9Ⱔ(\u0012F\u001ckryp\u0000UͰ,CDI7[mSXk\u000e\u000609MY\u0007\u0000Wx칶\u0004\"꘥7!\u0004#/x>CǨq\u00072\u0014\u001b6}?\u000f}EUjzb,*虲y|}m\u0017e2?eYE$\f\u001d\u000e\t$\u000eܦNMd-v{ӷ-5o03USeY\u001ai\u0015́b+\u0002B\n\u0016kbUW\u0010i2l\u0016\u0013`!l\u0011Ch\u0007\u0000\u0000\u0000\u0000\u0000\u0003\u0000%\r\nendstream\rendobj\r1894 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1893 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1892 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1891 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1890 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1886 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1889 0 obj\r<</BitsPerComponent 8/ColorSpace 1887 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 25/Name/X/SMask 2625 0 R/Subtype/Image/Type/XObject/Width 28>>stream\r\nHb`\u0018\u0005`\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0002\r\nendstream\rendobj\r2625 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 320/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nH̑ko0\u0014-mG0\u0003# s:d%$hݪK~9'yӞz\u0016r\u0000Y\u0004*\u0018 \u0016%I\ba,\u000e\u0002xG5(!o;\u0010\\X#\u001b\r4\u001c˹oR,p&`jM\u0016Q\b\u001c[\u001d^|(D\u001f6yY\u0007,=51DYQE=A\u0000vKg\u0003\u0019}cUd:kN:|PL\u000e,M\u0017`mmUrv!N9j_D~yw{n0y\né{ݝ̴LC\u0006\fuz\u0007cZ$S^\u0004\u001bK\u0010DPtu\n~/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000y'!\r\nendstream\rendobj\r1888 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2626 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2626 0 obj\r<</BC 2627 0 R/G 2628 0 R/S/Luminosity/Type/Mask>>\rendobj\r2627 0 obj\r[0.0 0.0 0.0]\rendobj\r2628 0 obj\r<</BBox[746.0 242.0 774.0 216.0]/Group 2629 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2630 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n28 0 0 26 746 216 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2629 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2630 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 28>>/Filter/FlateDecode/Height 26/Intent/RelativeColorimetric/Length 320/Name/X/Subtype/Image/Type/XObject/Width 28>>stream\r\nH̑ko0\u0014-mG0\u0003# s:d%$hݪK~9'yӞz\u0016r\u0000Y\u0004*\u0018 \u0016%I\ba,\u000e\u0002xG5(!o;\u0010\\X#\u001b\r4\u001c˹oR,p&`jM\u0016Q\b\u001c[\u001d^|(D\u001f6yY\u0007,=51DYQE=A\u0000vKg\u0003\u0019}cUd:kN:|PL\u000e,M\u0017`mmUrv!N9j_D~yw{n0y\né{ݝ̴LC\u0006\fuz\u0007cZ$S^\u0004\u001bK\u0010DPtu\n~/\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000y'!\r\nendstream\rendobj\r1885 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1884 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1883 0 obj\r<</BBox[128.5 2.99388 135.5 -4.00612]/Group 2631 0 R/Length 183/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>>>/Subtype/Form>>stream\r\n0.376 0.49 0.545 rg\n/GS0 gs\nq 1 0 0 1 135.5 -0.5061 cm\n0 0 m\n0 1.933 -1.567 3.5 -3.5 3.5 c\n-5.433 3.5 -7 1.933 -7 0 c\n-7 -1.933 -5.433 -3.5 -3.5 -3.5 c\n-1.567 -3.5 0 -1.933 0 0 c\nf\nQ\n\r\nendstream\rendobj\r2631 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1880 0 obj\r<</I false/K false/S/Transparency/Type/Group>>\rendobj\r1882 0 obj\r<</BitsPerComponent 8/ColorSpace 180 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 56/Intent/RelativeColorimetric/Length 242/Name/X/SMask 2632 0 R/Subtype/Image/Type/XObject/Width 1396>>stream\r\nHԱ\tP\u0000NoL*[\u0004\u0001\u0000>\u0000<o\u0001Z\u000bP\\\u0002,\u0017 \u0000\u001d\u0005\bY.@s\u0001:\u000b\u0010\\\u0002t<\u0017c\u0000!\u0005x.@s\u0001:\u000b\\\u0002t<\u0017\u0000\u001d\u0005x.@s\u0001:\u000b\\\u0002t<\u0017\u0000\u001d\u0005x.@s\u0001:\u000b\\\u0002t<\u00173\u0005s\u00012\u000b\\L\u00172\u0005t\u0001*\u0002D\u0000.@e\u0017\u00018\u000b.+\u0000O[\u0000\u00008\u0017\u0000\u0000\u0000\u0000\u0000\u0003\u0000y\u0019\r\nendstream\rendobj\r2632 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 1396>>/Filter/FlateDecode/Height 56/Intent/RelativeColorimetric/Length 2235/Name/X/Subtype/Image/Type/XObject/Width 1396>>stream\r\nHK\u0002)ZoIJ:bċJD\u0012SP\u0017\"\u0014xQ\u0004j\u000bAD#\f\u0004\u0005E7\u0010\u00145nW\u0011Bd\u000bu\u0011x\u0011YK\u0017\u0015M\f\u00114KDm͜yj0z\u0006\u000e\u0011\u000fϳg\u0000\u0000\u0000\u0000\u0000\u0000\u0000ަ\u0003\u0000\u000fo{[\u001e'\u0003\u0000\u0000#71\u000b&mF\u0006\u0017\u0010\u0002\u0000@Jn+K/ݿ\\|\"X\"H\u0001\u0000 elFb\u0011[_>Wݧ{3lqEbLI\u0010\nV\u0016\u0000\u0000k(Ade\u0012\u0015W*'Ȝ\\*f\u0003\u0000@\nQ9d\u0016!rxsy|![\\\u0005I\u0002uF>\u0007\u0000\t\u0014\u000b4E*\n>\u0018ݻʈlJ芊\u0019h\u0002\u0000\u0014\u0019\u0006HQ)lB$lr3\u0004lrIZ3Rsyj}\u0001\u0000\u0000)Z-\u0015R\u0013תh \u0015I\t2_cJ̖\u001a%\u0000\u0000nK\u0018:$\u0007m<V\rej{r\u0004\u0000\u0000)hu-M\u0006{̠Wrnt{\nJ3+mͮ.O\u0015\u0007\u0000\u0000Itu\u001bmfNE)nGks%Zp{|=}\u0001\u0000 \u0005C\u001eW1Z%ɍ]s\n%\u0004җXl\u000ew?<:61\u0019\b\u0002\u0000\u0000I\u000b\u0004&'FNf)ѫ(B\"dv\\\u001e_(ˢ5z`d|j:8;\u0017\u0015\u0000\u0000¦347\u001b\u001a\u001f\u0019xl63\u001a:K&5W$':\u001bx\u0013\t-.#˿V\u0000\u0000 \t\\9#L̀n1锤\\tt\u001e_SPTZ\u0004\u000bZl};\u0000\u0000|7뱵Jx!\u0018\u0018\u001aJ\nr2|^\nD\\hg\u0016\"=\u0000\u0000HڻݝX4039j\\B,x\\\tA\u00152嶦P8\u0010?\u0003\u0000\u0000v\u0018?ވCS=\u001dMr\"$ߚ!(4\n{KWJl}$'\u0000\u0000$-qr|\u0014\u001d[Y\u001ejW\u00184y\n asiR\u0005{\u000fӳO\u0000\u0000Og\u000fRp㬵\u0018JZ\\݃\u0013խ˿\u0000\u0000 i\u0017\u001f\u0013G[ىnWkisMz?9\u0017Y98>=\f\u0000\u0000I<?=>YMzIs,Vrl7~rvqu˗\u0000\u0000@Rt^_]wcˡC֗/L,Qsoj(\u0010Z^=L]^})?\u0001\u0000TYpw}9\u0014\u0018zu|4\u0017\u00007\u000e\r-v'g\u0017W \u001c\u0000\u0013뫋nl9v{\\Qs\u0005R\u00055Y^\\dm3\u0000\u0000$`g-27&-\n4hsu\u000fN̆W\u0012\u001f/.\u0002\u0000]^L\u001cog'\u0006]uVJZjRts/!qz\u001c\u0000\u00004!\u0019]\n{\u0016\u0018*-]}Ӌ+ğ\u0000\u0000Qvleqz^a=l.O !B3<\u0015\nG7\u000f\u0000\u0000@\u000e\u0007{\u001bphjV\u0014RD\\1.68|H4n\u000f\u0000\u0000nwgk3\u0016,̌}m\u001as:\u0010?h._SPTZ\u0004\u000bZl};\u0000\u0000|7뱵Jx!\u0018\u0018\u001aJ\nr2MErR3Y7R8\u001bk\u0005\u0000\u0000s9\u0012^Z\f\u0004\fڛ\u0016NIE|^}s,ZØ\u001b\u0007FƧs_\u0001\u0000 )l:Csםj3doM\u0010J\bJ/\u001cN_xtlb2\u0010\u0005\u0000\u0000\u0016\bLN\u000e{}nRWQD~gls\u0005b92ev\u001f\u000f\f\u0000\u0000)\u0018\u000f<N*IX6]sy|TAt\u0006sb\u0000\u0000 )\\;ݞ6WslЩ(T77Ǎn6\u001b,\u0006GSn\t\u0000\u0000Rv9[\u001c\rjKA7ft\t2_cJ̖\u001a%\u0000\u0000nK\u0018:$n7沣+#HZ3Rsyj}\u0001\u0000\u0000)Z-\u0015R\u0013תhq5+dM)U\u001a]Q1c0\u001aM\u0000\u0000\"\u0014\u00174*%&Wps++HV\u0016\u000b5Z9\u0000\u0000MP])R!>M.\u001bt6\u0002\u0011[]\"ɥhV>\u0000\u0000+h\u001eCf\u0011lqE\u00026\u000fˍn:/D&$\b\u0005+\u000b\u0000\u0000R5 22\tW\f.F7-UW(\u0014\u0012D\n\u0000\u0000b^N\u0000\u0000\bI߰/@\u0011\u000fIfX8\u000e(1ꦜK)\u0002Rin=Onj\u00059]\u000ber.\u00055=t\u0017\u000f\u0016\u0000\u0000b\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000:\u000e7\r\nendstream\rendobj\r1881 0 obj\r<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2633 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2633 0 obj\r<</BC 2634 0 R/G 2635 0 R/S/Luminosity/Type/Mask>>\rendobj\r2634 0 obj\r[0.0 0.0 0.0]\rendobj\r2635 0 obj\r<</BBox[-15.0 757.0 1381.0 701.0]/Group 2636 0 R/Length 43/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 190 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 2637 0 R>>>>/Subtype/Form>>stream\r\nq\n/GS0 gs\n1396 0 0 56 -15 701 cm\n/Im0 Do\nQ\n\r\nendstream\rendobj\r2636 0 obj\r<</CS/DeviceRGB/I false/K false/S/Transparency/Type/Group>>\rendobj\r2637 0 obj\r<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 1396>>/Filter/FlateDecode/Height 56/Intent/RelativeColorimetric/Length 2235/Name/X/Subtype/Image/Type/XObject/Width 1396>>stream\r\nHK\u0002)ZoIJ:bċJD\u0012SP\u0017\"\u0014xQ\u0004j\u000bAD#\f\u0004\u0005E7\u0010\u00145nW\u0011Bd\u000bu\u0011x\u0011YK\u0017\u0015M\f\u00114KDm͜yj0z\u0006\u000e\u0011\u000fϳg\u0000\u0000\u0000\u0000\u0000\u0000\u0000ަ\u0003\u0000\u000fo{[\u001e'\u0003\u0000\u0000#71\u000b&mF\u0006\u0017\u0010\u0002\u0000@Jn+K/ݿ\\|\"X\"H\u0001\u0000 elFb\u0011[_>Wݧ{3lqEbLI\u0010\nV\u0016\u0000\u0000k(Ade\u0012\u0015W*'Ȝ\\*f\u0003\u0000@\nQ9d\u0016!rxsy|![\\\u0005I\u0002uF>\u0007\u0000\t\u0014\u000b4E*\n>\u0018ݻʈlJ芊\u0019h\u0002\u0000\u0014\u0019\u0006HQ)lB$lr3\u0004lrIZ3Rsyj}\u0001\u0000\u0000)Z-\u0015R\u0013תh \u0015I\t2_cJ̖\u001a%\u0000\u0000nK\u0018:$\u0007m<V\rej{r\u0004\u0000\u0000)hu-M\u0006{̠Wrnt{\nJ3+mͮ.O\u0015\u0007\u0000\u0000Itu\u001bmfNE)nGks%Zp{|=}\u0001\u0000 \u0005C\u001eW1Z%ɍ]s\n%\u0004җXl\u000ew?<:61\u0019\b\u0002\u0000\u0000I\u000b\u0004&'FNf)ѫ(B\"dv\\\u001e_(ˢ5z`d|j:8;\u0017\u0015\u0000\u0000¦347\u001b\u001a\u001f\u0019xl63\u001a:K&5W$':\u001bx\u0013\t-.#˿V\u0000\u0000 \t\\9#L̀n1锤\\tt\u001e_SPTZ\u0004\u000bZl};\u0000\u0000|7뱵Jx!\u0018\u0018\u001aJ\nr2|^\nD\\hg\u0016\"=\u0000\u0000HڻݝX4039j\\B,x\\\tA\u00152嶦P8\u0010?\u0003\u0000\u0000v\u0018?ވCS=\u001dMr\"$ߚ!(4\n{KWJl}$'\u0000\u0000$-qr|\u0014\u001d[Y\u001ejW\u00184y\n asiR\u0005{\u000fӳO\u0000\u0000Og\u000fRp㬵\u0018JZ\\݃\u0013խ˿\u0000\u0000 i\u0017\u001f\u0013G[ىnWkisMz?9\u0017Y98>=\f\u0000\u0000I<?=>YMzIs,Vrl7~rvqu˗\u0000\u0000@Rt^_]wcˡC֗/L,Qsoj(\u0010Z^=L]^})?\u0001\u0000TYpw}9\u0014\u0018zu|4\u0017\u00007\u000e\r-v'g\u0017W \u001c\u0000\u0013뫋nl9v{\\Qs\u0005R\u00055Y^\\dm3\u0000\u0000$`g-27&-\n4hsu\u000fN̆W\u0012\u001f/.\u0002\u0000]^L\u001cog'\u0006]uVJZjRts/!qz\u001c\u0000\u00004!\u0019]\n{\u0016\u0018*-]}Ӌ+ğ\u0000\u0000Qvleqz^a=l.O !B3<\u0015\nG7\u000f\u0000\u0000@\u000e\u0007{\u001bphjV\u0014RD\\1.68|H4n\u000f\u0000\u0000nwgk3\u0016,̌}m\u001as:\u0010?h._SPTZ\u0004\u000bZl};\u0000\u0000|7뱵Jx!\u0018\u0018\u001aJ\nr2MErR3Y7R8\u001bk\u0005\u0000\u0000s9\u0012^Z\f\u0004\fڛ\u0016NIE|^}s,ZØ\u001b\u0007FƧs_\u0001\u0000 )l:Csםj3doM\u0010J\bJ/\u001cN_xtlb2\u0010\u0005\u0000\u0000\u0016\bLN\u000e{}nRWQD~gls\u0005b92ev\u001f\u000f\f\u0000\u0000)\u0018\u000f<N*IX6]sy|TAt\u0006sb\u0000\u0000 )\\;ݞ6WslЩ(T77Ǎn6\u001b,\u0006GSn\t\u0000\u0000Rv9[\u001c\rjKA7ft\t2_cJ̖\u001a%\u0000\u0000nK\u0018:$n7沣+#HZ3Rsyj}\u0001\u0000\u0000)Z-\u0015R\u0013תhq5+dM)U\u001a]Q1c0\u001aM\u0000\u0000\"\u0014\u00174*%&Wps++HV\u0016\u000b5Z9\u0000\u0000MP])R!>M.\u001bt6\u0002\u0011[]\"ɥhV>\u0000\u0000+h\u001eCf\u0011lqE\u00026\u000fˍn:/D&$\b\u0005+\u000b\u0000\u0000R5 22\tW\f.F7-UW(\u0014\u0012D\n\u0000\u0000b^N\u0000\u0000\bI߰/@\u0011\u000fIfX8\u000e(1ꦜK)\u0002Rin=Onj\u00059]\u000ber.\u00055=t\u0017\u000f\u0016\u0000\u0000b\u0002\u0000\u0000\u0000\u0000\u0000\u0003\u0000:\u000e7\r\nendstream\rendobj\r1679 0 obj\r<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 2638 0 R/ShadingType 2>>\rendobj\r2638 0 obj\r<</Bounds[0.999999]/Domain[0.0 1.0]/Encode[1.0 0.0 0.0 1.0]/FunctionType 3/Functions[2639 0 R 2640 0 R]>>\rendobj\r2639 0 obj\r<</C0[0.388235 0.545098 0.701961]/C1[0.392157 0.537255 0.690196]/Domain[0.0 1.0]/FunctionType 2/N 1.39031>>\rendobj\r2640 0 obj\r<</C0[0.388235 0.545098 0.701961]/C1[0.388235 0.545098 0.701961]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>\rendobj\r1673 0 obj\r<</AIS false/BM/Normal/CA 0.25/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.25/op false>>\rendobj\r1674 0 obj\r<</AIS false/BM/Normal/CA 0.0700073/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.0700073/op false>>\rendobj\r1675 0 obj\r<</AIS false/BM/Normal/CA 0.0/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.0/op false>>\rendobj\r1677 0 obj\r<</AIS true/BM/Normal/CA 0.119995/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.119995/op false>>\rendobj\r1678 0 obj\r<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 2641 0 R/Type/ExtGState/ca 1.0/op false>>\rendobj\r2641 0 obj\r<</G 2642 0 R/S/Luminosity/Type/Mask>>\rendobj\r2642 0 obj\r<</BBox[-32768.0 32767.0 32767.0 -32768.0]/Group 2643 0 R/Length 58/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 151 0 R>>/Shading<</Sh0 435 0 R>>>>/Subtype/Form>>stream\r\nq\n0 g\n/GS0 gs\n0 -3.5 -3.5 -0 1231 37.5 cm\nBX /Sh0 sh EX Q\n\r\nendstream\rendobj\r2643 0 obj\r<</CS/DeviceGray/I false/K false/S/Transparency/Type/Group>>\rendobj\r51 0 obj\r[50 0 R 49 0 R]\rendobj\r2644 0 obj\r<</CreationDate(D:20250609193757+05'00')/Creator(Adobe Illustrator 29.5 \\(Windows\\))/ModDate(D:20250609193758+04'00')/Producer(Adobe PDF library 17.00)/Title(UI4)>>\rendobj\rxref\r\n0 2645\r\n0000000004 65535 f\r\n0000000016 00000 n\r\n0000000161 00000 n\r\n0000038644 00000 n\r\n0000000000 00000 f\r\n0001859543 00000 n\r\n0000000000 00000 f\r\n0000000000 00000 f\r\n0000000000 00000 f\r\n0000044495 00000 n\r\n0000044568 00000 n\r\n0000045219 00000 n\r\n0000046490 00000 n\r\n0000059850 00000 n\r\n0000125439 00000 n\r\n0000191028 00000 n\r\n0000256617 00000 n\r\n0000322206 00000 n\r\n0000387795 00000 n\r\n0000453384 00000 n\r\n0000518973 00000 n\r\n0000584562 00000 n\r\n0000650151 00000 n\r\n0000715740 00000 n\r\n0000781329 00000 n\r\n0000846918 00000 n\r\n0000912507 00000 n\r\n0000978096 00000 n\r\n0001043685 00000 n\r\n0001109274 00000 n\r\n0001174863 00000 n\r\n0001240452 00000 n\r\n0001306041 00000 n\r\n0001371630 00000 n\r\n0001437219 00000 n\r\n0000000000 00000 f\r\n0000000000 00000 f\r\n0000000000 00000 f\r\n0000000000 00000 f\r\n0000000000 00000 f\r\n0000000000 00000 f\r\n0001863023 00000 n\r\n0001863431 00000 n\r\n0001863795 00000 n\r\n0001864162 00000 n\r\n0001856188 00000 n\r\n0001856558 00000 n\r\n0001856926 00000 n\r\n0001857288 00000 n\r\n0001458254 00000 n\r\n0001458326 00000 n\r\n0002397481 00000 n\r\n0000038705 00000 n\r\n0000038801 00000 n\r\n0001716179 00000 n\r\n0001716285 00000 n\r\n0001716391 00000 n\r\n0001716497 00000 n\r\n0001716603 00000 n\r\n0000038911 00000 n\r\n0000039007 00000 n\r\n0000039103 00000 n\r\n0000039199 00000 n\r\n0000039295 00000 n\r\n0000039391 00000 n\r\n0000039487 00000 n\r\n0001697026 00000 n\r\n0001697131 00000 n\r\n0001697236 00000 n\r\n0001697341 00000 n\r\n0001697446 00000 n\r\n0001655067 00000 n\r\n0001655167 00000 n\r\n0001655267 00000 n\r\n0001655367 00000 n\r\n0001655467 00000 n\r\n0001597803 00000 n\r\n0001597903 00000 n\r\n0001598003 00000 n\r\n0001598103 00000 n\r\n0001598203 00000 n\r\n0001572663 00000 n\r\n0001572763 00000 n\r\n0001572863 00000 n\r\n0001572963 00000 n\r\n0001573063 00000 n\r\n0001552158 00000 n\r\n0001552258 00000 n\r\n0001552358 00000 n\r\n0001552458 00000 n\r\n0001552558 00000 n\r\n0001532395 00000 n\r\n0001532495 00000 n\r\n0001532595 00000 n\r\n0001532695 00000 n\r\n0001532795 00000 n\r\n0000039608 00000 n\r\n0000039708 00000 n\r\n0000039808 00000 n\r\n0000039908 00000 n\r\n0000040008 00000 n\r\n0000040109 00000 n\r\n0000040210 00000 n\r\n0000040311 00000 n\r\n0001528909 00000 n\r\n0001529269 00000 n\r\n0001529629 00000 n\r\n0001529989 00000 n\r\n0001530349 00000 n\r\n0001524915 00000 n\r\n0001525275 00000 n\r\n0001525635 00000 n\r\n0001526051 00000 n\r\n0001526411 00000 n\r\n0001521317 00000 n\r\n0001521677 00000 n\r\n0001522037 00000 n\r\n0001522397 00000 n\r\n0001522767 00000 n\r\n0001491664 00000 n\r\n0001492028 00000 n\r\n0001492488 00000 n\r\n0001492848 00000 n\r\n0001493222 00000 n\r\n0001487759 00000 n\r\n0001488156 00000 n\r\n0001488553 00000 n\r\n0001488950 00000 n\r\n0001489347 00000 n\r\n0001479443 00000 n\r\n0001479840 00000 n\r\n0001480208 00000 n\r\n0001480593 00000 n\r\n0001480977 00000 n\r\n0001467526 00000 n\r\n0001467910 00000 n\r\n0001468307 00000 n\r\n0001468675 00000 n\r\n0001469072 00000 n\r\n0000040453 00000 n\r\n0000040814 00000 n\r\n0000041175 00000 n\r\n0000041560 00000 n\r\n0000041945 00000 n\r\n0000042342 00000 n\r\n0000042703 00000 n\r\n0000043064 00000 n\r\n0000043425 00000 n\r\n0000043786 00000 n\r\n0001467177 00000 n\r\n0001467460 00000 n\r\n0001458632 00000 n\r\n0001466850 00000 n\r\n0001467111 00000 n\r\n0001465715 00000 n\r\n0001465868 00000 n\r\n0001464480 00000 n\r\n0001465934 00000 n\r\n0001464604 00000 n\r\n0001465014 00000 n\r\n0001465080 00000 n\r\n0001460273 00000 n\r\n0001460431 00000 n\r\n0001460497 00000 n\r\n0001460795 00000 n\r\n0001460018 00000 n\r\n0001460207 00000 n\r\n0001459593 00000 n\r\n0001459952 00000 n\r\n0001459172 00000 n\r\n0001459527 00000 n\r\n0001458746 00000 n\r\n0001459106 00000 n\r\n0000044160 00000 n\r\n0000044429 00000 n\r\n0001458514 00000 n\r\n0001458546 00000 n\r\n0001458396 00000 n\r\n0001458428 00000 n\r\n0001461283 00000 n\r\n0001461703 00000 n\r\n0001462810 00000 n\r\n0001461347 00000 n\r\n0001461219 00000 n\r\n0001461751 00000 n\r\n0001462754 00000 n\r\n0001462926 00000 n\r\n0001462992 00000 n\r\n0001463023 00000 n\r\n0001463287 00000 n\r\n0001464367 00000 n\r\n0001463364 00000 n\r\n0001465228 00000 n\r\n0001465364 00000 n\r\n0001465479 00000 n\r\n0001465594 00000 n\r\n0001466232 00000 n\r\n0001466296 00000 n\r\n0001466412 00000 n\r\n0001466478 00000 n\r\n0001466509 00000 n\r\n0001466773 00000 n\r\n0001477327 00000 n\r\n0001477484 00000 n\r\n0001479319 00000 n\r\n0001477550 00000 n\r\n0001472438 00000 n\r\n0001473087 00000 n\r\n0001477204 00000 n\r\n0001473153 00000 n\r\n0001472028 00000 n\r\n0001472372 00000 n\r\n0001470753 00000 n\r\n0001471046 00000 n\r\n0001471112 00000 n\r\n0001469469 00000 n\r\n0001469771 00000 n\r\n0001469837 00000 n\r\n0001470135 00000 n\r\n0001470199 00000 n\r\n0001470315 00000 n\r\n0001470381 00000 n\r\n0001470412 00000 n\r\n0001470676 00000 n\r\n0001471410 00000 n\r\n0001471474 00000 n\r\n0001471590 00000 n\r\n0001471656 00000 n\r\n0001471687 00000 n\r\n0001471951 00000 n\r\n0001473447 00000 n\r\n0001475249 00000 n\r\n0001473511 00000 n\r\n0001473844 00000 n\r\n0001475365 00000 n\r\n0001475431 00000 n\r\n0001475462 00000 n\r\n0001475722 00000 n\r\n0001475799 00000 n\r\n0001478045 00000 n\r\n0001478481 00000 n\r\n0001478109 00000 n\r\n0001478257 00000 n\r\n0001478354 00000 n\r\n0001478598 00000 n\r\n0001478653 00000 n\r\n0001478916 00000 n\r\n0001478994 00000 n\r\n0001479143 00000 n\r\n0001479240 00000 n\r\n0001484958 00000 n\r\n0001485352 00000 n\r\n0001485418 00000 n\r\n0001484534 00000 n\r\n0001484892 00000 n\r\n0001483664 00000 n\r\n0001483817 00000 n\r\n0001483883 00000 n\r\n0001482512 00000 n\r\n0001482669 00000 n\r\n0001482735 00000 n\r\n0001481361 00000 n\r\n0001481518 00000 n\r\n0001481584 00000 n\r\n0001482078 00000 n\r\n0001482142 00000 n\r\n0001482290 00000 n\r\n0001482387 00000 n\r\n0001483230 00000 n\r\n0001483294 00000 n\r\n0001483442 00000 n\r\n0001483539 00000 n\r\n0001484470 00000 n\r\n0001485712 00000 n\r\n0001486637 00000 n\r\n0001485776 00000 n\r\n0001486065 00000 n\r\n0001486753 00000 n\r\n0001486819 00000 n\r\n0001486850 00000 n\r\n0001487110 00000 n\r\n0001487187 00000 n\r\n0001491332 00000 n\r\n0001491598 00000 n\r\n0001490997 00000 n\r\n0001491266 00000 n\r\n0001490663 00000 n\r\n0001490931 00000 n\r\n0001490206 00000 n\r\n0001490597 00000 n\r\n0001489744 00000 n\r\n0001490140 00000 n\r\n0001520867 00000 n\r\n0001521251 00000 n\r\n0001495029 00000 n\r\n0001495637 00000 n\r\n0001500015 00000 n\r\n0001499661 00000 n\r\n0001495703 00000 n\r\n0001494583 00000 n\r\n0001494963 00000 n\r\n0001493921 00000 n\r\n0001494517 00000 n\r\n0001493594 00000 n\r\n0001493855 00000 n\r\n0001495995 00000 n\r\n0001497749 00000 n\r\n0001496059 00000 n\r\n0001496385 00000 n\r\n0001497865 00000 n\r\n0001497931 00000 n\r\n0001497962 00000 n\r\n0001498220 00000 n\r\n0001498297 00000 n\r\n0001499809 00000 n\r\n0001499906 00000 n\r\n0001500207 00000 n\r\n0001500456 00000 n\r\n0001524611 00000 n\r\n0001524849 00000 n\r\n0001524307 00000 n\r\n0001524545 00000 n\r\n0001523953 00000 n\r\n0001524241 00000 n\r\n0001523582 00000 n\r\n0001523887 00000 n\r\n0001523131 00000 n\r\n0001523516 00000 n\r\n0001528583 00000 n\r\n0001528843 00000 n\r\n0001528259 00000 n\r\n0001528517 00000 n\r\n0001527376 00000 n\r\n0001527697 00000 n\r\n0001528231 00000 n\r\n0001527763 00000 n\r\n0001527075 00000 n\r\n0001527310 00000 n\r\n0001526771 00000 n\r\n0001527009 00000 n\r\n0001527862 00000 n\r\n0001528010 00000 n\r\n0001528107 00000 n\r\n0001532072 00000 n\r\n0001532329 00000 n\r\n0001531747 00000 n\r\n0001532006 00000 n\r\n0001531421 00000 n\r\n0001531681 00000 n\r\n0001531063 00000 n\r\n0001531355 00000 n\r\n0001530709 00000 n\r\n0001530997 00000 n\r\n0001547129 00000 n\r\n0001547496 00000 n\r\n0001547863 00000 n\r\n0001548230 00000 n\r\n0001548597 00000 n\r\n0001543675 00000 n\r\n0001544035 00000 n\r\n0001544395 00000 n\r\n0001544762 00000 n\r\n0001545122 00000 n\r\n0001540269 00000 n\r\n0001540629 00000 n\r\n0001540989 00000 n\r\n0001541349 00000 n\r\n0001541709 00000 n\r\n0001536568 00000 n\r\n0001536935 00000 n\r\n0001537305 00000 n\r\n0001537672 00000 n\r\n0001538042 00000 n\r\n0001532895 00000 n\r\n0001533257 00000 n\r\n0001533617 00000 n\r\n0001533991 00000 n\r\n0001534351 00000 n\r\n0001536230 00000 n\r\n0001536502 00000 n\r\n0001535871 00000 n\r\n0001536164 00000 n\r\n0001535387 00000 n\r\n0001535805 00000 n\r\n0001535067 00000 n\r\n0001535321 00000 n\r\n0001534711 00000 n\r\n0001535001 00000 n\r\n0001539879 00000 n\r\n0001540203 00000 n\r\n0001539536 00000 n\r\n0001539813 00000 n\r\n0001539146 00000 n\r\n0001539470 00000 n\r\n0001538799 00000 n\r\n0001539080 00000 n\r\n0001538409 00000 n\r\n0001538733 00000 n\r\n0001543360 00000 n\r\n0001543609 00000 n\r\n0001543048 00000 n\r\n0001543294 00000 n\r\n0001542736 00000 n\r\n0001542982 00000 n\r\n0001542424 00000 n\r\n0001542670 00000 n\r\n0001542079 00000 n\r\n0001542358 00000 n\r\n0001546785 00000 n\r\n0001547063 00000 n\r\n0001546441 00000 n\r\n0001546719 00000 n\r\n0001546112 00000 n\r\n0001546375 00000 n\r\n0001545797 00000 n\r\n0001546046 00000 n\r\n0001545482 00000 n\r\n0001545731 00000 n\r\n0001551719 00000 n\r\n0001552092 00000 n\r\n0001551288 00000 n\r\n0001551653 00000 n\r\n0001550849 00000 n\r\n0001551222 00000 n\r\n0001550420 00000 n\r\n0001550783 00000 n\r\n0001548976 00000 n\r\n0001549155 00000 n\r\n0001549576 00000 n\r\n0001549221 00000 n\r\n0001549369 00000 n\r\n0001549466 00000 n\r\n0001549693 00000 n\r\n0001549748 00000 n\r\n0001550017 00000 n\r\n0001550095 00000 n\r\n0001550244 00000 n\r\n0001550341 00000 n\r\n0001568407 00000 n\r\n0001568771 00000 n\r\n0001569131 00000 n\r\n0001569491 00000 n\r\n0001569851 00000 n\r\n0001564207 00000 n\r\n0001564613 00000 n\r\n0001564968 00000 n\r\n0001565339 00000 n\r\n0001565694 00000 n\r\n0001560286 00000 n\r\n0001560646 00000 n\r\n0001561013 00000 n\r\n0001561373 00000 n\r\n0001561735 00000 n\r\n0001556337 00000 n\r\n0001556699 00000 n\r\n0001557061 00000 n\r\n0001557421 00000 n\r\n0001557784 00000 n\r\n0001552658 00000 n\r\n0001553028 00000 n\r\n0001553392 00000 n\r\n0001553752 00000 n\r\n0001554119 00000 n\r\n0001555969 00000 n\r\n0001556271 00000 n\r\n0001555668 00000 n\r\n0001555903 00000 n\r\n0001555357 00000 n\r\n0001555602 00000 n\r\n0001554919 00000 n\r\n0001555291 00000 n\r\n0001554486 00000 n\r\n0001554853 00000 n\r\n0001559613 00000 n\r\n0001560220 00000 n\r\n0001559043 00000 n\r\n0001559547 00000 n\r\n0001558753 00000 n\r\n0001558977 00000 n\r\n0001558425 00000 n\r\n0001558687 00000 n\r\n0001558158 00000 n\r\n0001558359 00000 n\r\n0001563905 00000 n\r\n0001564141 00000 n\r\n0001563624 00000 n\r\n0001563839 00000 n\r\n0001563344 00000 n\r\n0001563558 00000 n\r\n0001562771 00000 n\r\n0001563278 00000 n\r\n0001562097 00000 n\r\n0001562705 00000 n\r\n0001567298 00000 n\r\n0001567497 00000 n\r\n0001568283 00000 n\r\n0001567563 00000 n\r\n0001566987 00000 n\r\n0001567232 00000 n\r\n0001566674 00000 n\r\n0001566921 00000 n\r\n0001566362 00000 n\r\n0001566608 00000 n\r\n0001566049 00000 n\r\n0001566296 00000 n\r\n0001567842 00000 n\r\n0001567906 00000 n\r\n0001568062 00000 n\r\n0001568159 00000 n\r\n0001572213 00000 n\r\n0001572597 00000 n\r\n0001571712 00000 n\r\n0001572147 00000 n\r\n0001571213 00000 n\r\n0001571646 00000 n\r\n0001570710 00000 n\r\n0001571147 00000 n\r\n0001570211 00000 n\r\n0001570644 00000 n\r\n0001591995 00000 n\r\n0001592391 00000 n\r\n0001592751 00000 n\r\n0001593111 00000 n\r\n0001593471 00000 n\r\n0001588359 00000 n\r\n0001588723 00000 n\r\n0001589083 00000 n\r\n0001589443 00000 n\r\n0001589807 00000 n\r\n0001580608 00000 n\r\n0001581008 00000 n\r\n0001581408 00000 n\r\n0001581804 00000 n\r\n0001582169 00000 n\r\n0001576470 00000 n\r\n0001576833 00000 n\r\n0001577200 00000 n\r\n0001577567 00000 n\r\n0001577934 00000 n\r\n0001573163 00000 n\r\n0001573527 00000 n\r\n0001573887 00000 n\r\n0001574254 00000 n\r\n0001574621 00000 n\r\n0001576204 00000 n\r\n0001576404 00000 n\r\n0001575939 00000 n\r\n0001576138 00000 n\r\n0001575658 00000 n\r\n0001575873 00000 n\r\n0001575401 00000 n\r\n0001575592 00000 n\r\n0001574988 00000 n\r\n0001575335 00000 n\r\n0001580255 00000 n\r\n0001580542 00000 n\r\n0001579821 00000 n\r\n0001580189 00000 n\r\n0001579386 00000 n\r\n0001579755 00000 n\r\n0001578952 00000 n\r\n0001579320 00000 n\r\n0001578297 00000 n\r\n0001578886 00000 n\r\n0001587903 00000 n\r\n0001588293 00000 n\r\n0001583705 00000 n\r\n0001586544 00000 n\r\n0001586937 00000 n\r\n0001587003 00000 n\r\n0001583246 00000 n\r\n0001583639 00000 n\r\n0001582892 00000 n\r\n0001583180 00000 n\r\n0001582539 00000 n\r\n0001582826 00000 n\r\n0001583995 00000 n\r\n0001585187 00000 n\r\n0001584059 00000 n\r\n0001584376 00000 n\r\n0001585303 00000 n\r\n0001585369 00000 n\r\n0001585400 00000 n\r\n0001585656 00000 n\r\n0001585733 00000 n\r\n0001587293 00000 n\r\n0001587357 00000 n\r\n0001587473 00000 n\r\n0001587539 00000 n\r\n0001587570 00000 n\r\n0001587826 00000 n\r\n0001591575 00000 n\r\n0001591929 00000 n\r\n0001591279 00000 n\r\n0001591509 00000 n\r\n0001590945 00000 n\r\n0001591213 00000 n\r\n0001590604 00000 n\r\n0001590879 00000 n\r\n0001590175 00000 n\r\n0001590538 00000 n\r\n0001595206 00000 n\r\n0001595392 00000 n\r\n0001597688 00000 n\r\n0001595458 00000 n\r\n0001594863 00000 n\r\n0001595140 00000 n\r\n0001594528 00000 n\r\n0001594797 00000 n\r\n0001594123 00000 n\r\n0001594462 00000 n\r\n0001593831 00000 n\r\n0001594057 00000 n\r\n0001595752 00000 n\r\n0001596617 00000 n\r\n0001595816 00000 n\r\n0001596096 00000 n\r\n0001596733 00000 n\r\n0001596799 00000 n\r\n0001596830 00000 n\r\n0001597090 00000 n\r\n0001597167 00000 n\r\n0001648449 00000 n\r\n0001648845 00000 n\r\n0001649241 00000 n\r\n0001649601 00000 n\r\n0001649965 00000 n\r\n0001644632 00000 n\r\n0001644996 00000 n\r\n0001645359 00000 n\r\n0001645733 00000 n\r\n0001646107 00000 n\r\n0001637077 00000 n\r\n0001637497 00000 n\r\n0001637917 00000 n\r\n0001638377 00000 n\r\n0001638773 00000 n\r\n0001615552 00000 n\r\n0001615948 00000 n\r\n0001616312 00000 n\r\n0001616676 00000 n\r\n0001617072 00000 n\r\n0001598303 00000 n\r\n0001598735 00000 n\r\n0001599167 00000 n\r\n0001599527 00000 n\r\n0001599923 00000 n\r\n0001613199 00000 n\r\n0001613666 00000 n\r\n0001613732 00000 n\r\n0001614028 00000 n\r\n0001600845 00000 n\r\n0001606350 00000 n\r\n0001606548 00000 n\r\n0001606614 00000 n\r\n0001606910 00000 n\r\n0001607204 00000 n\r\n0001605876 00000 n\r\n0001606284 00000 n\r\n0001603078 00000 n\r\n0001603535 00000 n\r\n0001605753 00000 n\r\n0001603601 00000 n\r\n0001600323 00000 n\r\n0001600779 00000 n\r\n0001601135 00000 n\r\n0001602009 00000 n\r\n0001601199 00000 n\r\n0001601486 00000 n\r\n0001602125 00000 n\r\n0001602191 00000 n\r\n0001602222 00000 n\r\n0001602478 00000 n\r\n0001602555 00000 n\r\n0001603891 00000 n\r\n0001604726 00000 n\r\n0001603955 00000 n\r\n0001604245 00000 n\r\n0001604842 00000 n\r\n0001604908 00000 n\r\n0001604939 00000 n\r\n0001605195 00000 n\r\n0001605272 00000 n\r\n0001612583 00000 n\r\n0001612647 00000 n\r\n0001609432 00000 n\r\n0001610930 00000 n\r\n0001609496 00000 n\r\n0001607498 00000 n\r\n0001608362 00000 n\r\n0001607562 00000 n\r\n0001607842 00000 n\r\n0001608478 00000 n\r\n0001608544 00000 n\r\n0001608575 00000 n\r\n0001608835 00000 n\r\n0001608912 00000 n\r\n0001609827 00000 n\r\n0001611046 00000 n\r\n0001611112 00000 n\r\n0001611143 00000 n\r\n0001611403 00000 n\r\n0001611480 00000 n\r\n0001612763 00000 n\r\n0001612829 00000 n\r\n0001612860 00000 n\r\n0001613122 00000 n\r\n0001614936 00000 n\r\n0001615000 00000 n\r\n0001614322 00000 n\r\n0001614386 00000 n\r\n0001614502 00000 n\r\n0001614568 00000 n\r\n0001614599 00000 n\r\n0001614859 00000 n\r\n0001615116 00000 n\r\n0001615182 00000 n\r\n0001615213 00000 n\r\n0001615475 00000 n\r\n0001635700 00000 n\r\n0001636103 00000 n\r\n0001636169 00000 n\r\n0001624912 00000 n\r\n0001635634 00000 n\r\n0001624612 00000 n\r\n0001624846 00000 n\r\n0001623216 00000 n\r\n0001623638 00000 n\r\n0001623704 00000 n\r\n0001617508 00000 n\r\n0001617973 00000 n\r\n0001618039 00000 n\r\n0001618333 00000 n\r\n0001622602 00000 n\r\n0001622666 00000 n\r\n0001618628 00000 n\r\n0001620539 00000 n\r\n0001618692 00000 n\r\n0001619027 00000 n\r\n0001620655 00000 n\r\n0001620721 00000 n\r\n0001620752 00000 n\r\n0001621013 00000 n\r\n0001621090 00000 n\r\n0001622782 00000 n\r\n0001622848 00000 n\r\n0001622879 00000 n\r\n0001623139 00000 n\r\n0001623998 00000 n\r\n0001624062 00000 n\r\n0001624178 00000 n\r\n0001624244 00000 n\r\n0001624275 00000 n\r\n0001624535 00000 n\r\n0001636463 00000 n\r\n0001636527 00000 n\r\n0001636643 00000 n\r\n0001636709 00000 n\r\n0001636740 00000 n\r\n0001637000 00000 n\r\n0001642682 00000 n\r\n0001643288 00000 n\r\n0001644262 00000 n\r\n0001643354 00000 n\r\n0001642105 00000 n\r\n0001642616 00000 n\r\n0001641415 00000 n\r\n0001642039 00000 n\r\n0001640633 00000 n\r\n0001641349 00000 n\r\n0001639169 00000 n\r\n0001640567 00000 n\r\n0001643648 00000 n\r\n0001643712 00000 n\r\n0001643828 00000 n\r\n0001643894 00000 n\r\n0001643925 00000 n\r\n0001644185 00000 n\r\n0001644410 00000 n\r\n0001644507 00000 n\r\n0001648151 00000 n\r\n0001648383 00000 n\r\n0001647688 00000 n\r\n0001648085 00000 n\r\n0001647334 00000 n\r\n0001647622 00000 n\r\n0001647063 00000 n\r\n0001647268 00000 n\r\n0001646467 00000 n\r\n0001646997 00000 n\r\n0001654617 00000 n\r\n0001655001 00000 n\r\n0001654492 00000 n\r\n0001652039 00000 n\r\n0001651592 00000 n\r\n0001651973 00000 n\r\n0001651234 00000 n\r\n0001651526 00000 n\r\n0001650749 00000 n\r\n0001651168 00000 n\r\n0001650325 00000 n\r\n0001650683 00000 n\r\n0001652333 00000 n\r\n0001653312 00000 n\r\n0001652397 00000 n\r\n0001652682 00000 n\r\n0001653428 00000 n\r\n0001653494 00000 n\r\n0001653525 00000 n\r\n0001653785 00000 n\r\n0001653862 00000 n\r\n0001690837 00000 n\r\n0001691233 00000 n\r\n0001691629 00000 n\r\n0001692025 00000 n\r\n0001692426 00000 n\r\n0001684436 00000 n\r\n0001684832 00000 n\r\n0001685228 00000 n\r\n0001685588 00000 n\r\n0001685984 00000 n\r\n0001678131 00000 n\r\n0001678527 00000 n\r\n0001678891 00000 n\r\n0001679311 00000 n\r\n0001679675 00000 n\r\n0001667005 00000 n\r\n0001667373 00000 n\r\n0001667733 00000 n\r\n0001668129 00000 n\r\n0001668561 00000 n\r\n0001655567 00000 n\r\n0001655927 00000 n\r\n0001656291 00000 n\r\n0001656735 00000 n\r\n0001657131 00000 n\r\n0001666655 00000 n\r\n0001666939 00000 n\r\n0001666302 00000 n\r\n0001666589 00000 n\r\n0001662799 00000 n\r\n0001663064 00000 n\r\n0001662676 00000 n\r\n0001666054 00000 n\r\n0001666178 00000 n\r\n0001663130 00000 n\r\n0001663422 00000 n\r\n0001663724 00000 n\r\n0001660194 00000 n\r\n0001660484 00000 n\r\n0001660550 00000 n\r\n0001657527 00000 n\r\n0001657734 00000 n\r\n0001657800 00000 n\r\n0001658094 00000 n\r\n0001659044 00000 n\r\n0001658158 00000 n\r\n0001658444 00000 n\r\n0001659160 00000 n\r\n0001659226 00000 n\r\n0001659257 00000 n\r\n0001659517 00000 n\r\n0001659594 00000 n\r\n0001660840 00000 n\r\n0001661658 00000 n\r\n0001660904 00000 n\r\n0001661186 00000 n\r\n0001661774 00000 n\r\n0001661840 00000 n\r\n0001661871 00000 n\r\n0001662127 00000 n\r\n0001662204 00000 n\r\n0001664155 00000 n\r\n0001665005 00000 n\r\n0001664219 00000 n\r\n0001664091 00000 n\r\n0001664027 00000 n\r\n0001664504 00000 n\r\n0001665121 00000 n\r\n0001665187 00000 n\r\n0001665218 00000 n\r\n0001665476 00000 n\r\n0001665553 00000 n\r\n0001677783 00000 n\r\n0001678065 00000 n\r\n0001677280 00000 n\r\n0001677717 00000 n\r\n0001674923 00000 n\r\n0001675179 00000 n\r\n0001675245 00000 n\r\n0001669273 00000 n\r\n0001669594 00000 n\r\n0001669660 00000 n\r\n0001669914 00000 n\r\n0001670170 00000 n\r\n0001670424 00000 n\r\n0001668921 00000 n\r\n0001669207 00000 n\r\n0001674315 00000 n\r\n0001674379 00000 n\r\n0001672253 00000 n\r\n0001673705 00000 n\r\n0001673769 00000 n\r\n0001670742 00000 n\r\n0001672189 00000 n\r\n0001672856 00000 n\r\n0001670678 00000 n\r\n0001671341 00000 n\r\n0001671037 00000 n\r\n0001671457 00000 n\r\n0001671523 00000 n\r\n0001671554 00000 n\r\n0001671808 00000 n\r\n0001671885 00000 n\r\n0001672551 00000 n\r\n0001672972 00000 n\r\n0001673038 00000 n\r\n0001673069 00000 n\r\n0001673323 00000 n\r\n0001673400 00000 n\r\n0001673885 00000 n\r\n0001673951 00000 n\r\n0001673982 00000 n\r\n0001674238 00000 n\r\n0001674495 00000 n\r\n0001674561 00000 n\r\n0001674592 00000 n\r\n0001674846 00000 n\r\n0001675535 00000 n\r\n0001676305 00000 n\r\n0001675599 00000 n\r\n0001675876 00000 n\r\n0001676421 00000 n\r\n0001676487 00000 n\r\n0001676518 00000 n\r\n0001676774 00000 n\r\n0001676851 00000 n\r\n0001684007 00000 n\r\n0001684370 00000 n\r\n0001683585 00000 n\r\n0001683941 00000 n\r\n0001680728 00000 n\r\n0001680943 00000 n\r\n0001683229 00000 n\r\n0001681009 00000 n\r\n0001680387 00000 n\r\n0001680662 00000 n\r\n0001680043 00000 n\r\n0001680321 00000 n\r\n0001681303 00000 n\r\n0001682162 00000 n\r\n0001681367 00000 n\r\n0001681645 00000 n\r\n0001682278 00000 n\r\n0001682344 00000 n\r\n0001682375 00000 n\r\n0001682635 00000 n\r\n0001682712 00000 n\r\n0001683377 00000 n\r\n0001683474 00000 n\r\n0001690423 00000 n\r\n0001690771 00000 n\r\n0001688061 00000 n\r\n0001687631 00000 n\r\n0001687995 00000 n\r\n0001687202 00000 n\r\n0001687565 00000 n\r\n0001686794 00000 n\r\n0001687136 00000 n\r\n0001686380 00000 n\r\n0001686728 00000 n\r\n0001688355 00000 n\r\n0001689292 00000 n\r\n0001688419 00000 n\r\n0001688711 00000 n\r\n0001689408 00000 n\r\n0001689474 00000 n\r\n0001689505 00000 n\r\n0001689765 00000 n\r\n0001689842 00000 n\r\n0001696621 00000 n\r\n0001696960 00000 n\r\n0001696209 00000 n\r\n0001696555 00000 n\r\n0001695781 00000 n\r\n0001696143 00000 n\r\n0001693231 00000 n\r\n0001693609 00000 n\r\n0001693675 00000 n\r\n0001692822 00000 n\r\n0001693165 00000 n\r\n0001693965 00000 n\r\n0001694779 00000 n\r\n0001694029 00000 n\r\n0001694323 00000 n\r\n0001694895 00000 n\r\n0001694961 00000 n\r\n0001694992 00000 n\r\n0001695248 00000 n\r\n0001695325 00000 n\r\n0001712800 00000 n\r\n0001713163 00000 n\r\n0001713526 00000 n\r\n0001713889 00000 n\r\n0001714252 00000 n\r\n0001708552 00000 n\r\n0001708945 00000 n\r\n0001709339 00000 n\r\n0001709701 00000 n\r\n0001710064 00000 n\r\n0001704905 00000 n\r\n0001705272 00000 n\r\n0001705641 00000 n\r\n0001706010 00000 n\r\n0001706377 00000 n\r\n0001701206 00000 n\r\n0001701571 00000 n\r\n0001701937 00000 n\r\n0001702303 00000 n\r\n0001702702 00000 n\r\n0001697551 00000 n\r\n0001697924 00000 n\r\n0001698297 00000 n\r\n0001698660 00000 n\r\n0001699026 00000 n\r\n0001700822 00000 n\r\n0001701139 00000 n\r\n0001700402 00000 n\r\n0001700755 00000 n\r\n0001700157 00000 n\r\n0001700335 00000 n\r\n0001699817 00000 n\r\n0001700090 00000 n\r\n0001699393 00000 n\r\n0001699750 00000 n\r\n0001704574 00000 n\r\n0001704838 00000 n\r\n0001704246 00000 n\r\n0001704507 00000 n\r\n0001703937 00000 n\r\n0001704179 00000 n\r\n0001703497 00000 n\r\n0001703870 00000 n\r\n0001703065 00000 n\r\n0001703430 00000 n\r\n0001708245 00000 n\r\n0001708485 00000 n\r\n0001707863 00000 n\r\n0001708178 00000 n\r\n0001707523 00000 n\r\n0001707796 00000 n\r\n0001707221 00000 n\r\n0001707456 00000 n\r\n0001706776 00000 n\r\n0001707154 00000 n\r\n0001712145 00000 n\r\n0001712299 00000 n\r\n0001712366 00000 n\r\n0001711359 00000 n\r\n0001711513 00000 n\r\n0001712018 00000 n\r\n0001711580 00000 n\r\n0001711049 00000 n\r\n0001711292 00000 n\r\n0001710740 00000 n\r\n0001710982 00000 n\r\n0001710431 00000 n\r\n0001710673 00000 n\r\n0001711953 00000 n\r\n0001712735 00000 n\r\n0001715901 00000 n\r\n0001716112 00000 n\r\n0001715615 00000 n\r\n0001715834 00000 n\r\n0001715249 00000 n\r\n0001715548 00000 n\r\n0001714883 00000 n\r\n0001715182 00000 n\r\n0001714615 00000 n\r\n0001714816 00000 n\r\n0001841503 00000 n\r\n0001841599 00000 n\r\n0001841698 00000 n\r\n0001841805 00000 n\r\n0001841912 00000 n\r\n0001803142 00000 n\r\n0001803249 00000 n\r\n0001803356 00000 n\r\n0001803463 00000 n\r\n0001803570 00000 n\r\n0001781217 00000 n\r\n0001781324 00000 n\r\n0001781431 00000 n\r\n0001781538 00000 n\r\n0001781645 00000 n\r\n0001740622 00000 n\r\n0001740729 00000 n\r\n0001740836 00000 n\r\n0001740943 00000 n\r\n0001741050 00000 n\r\n0001716709 00000 n\r\n0001716816 00000 n\r\n0001716923 00000 n\r\n0001717030 00000 n\r\n0001717137 00000 n\r\n0001731914 00000 n\r\n0001732309 00000 n\r\n0001732674 00000 n\r\n0001733039 00000 n\r\n0001733441 00000 n\r\n0001728285 00000 n\r\n0001728654 00000 n\r\n0001729019 00000 n\r\n0001729384 00000 n\r\n0001729749 00000 n\r\n0001724420 00000 n\r\n0001724795 00000 n\r\n0001725167 00000 n\r\n0001725539 00000 n\r\n0001725911 00000 n\r\n0001720781 00000 n\r\n0001721153 00000 n\r\n0001721513 00000 n\r\n0001721873 00000 n\r\n0001722242 00000 n\r\n0001717244 00000 n\r\n0001717613 00000 n\r\n0001717992 00000 n\r\n0001718364 00000 n\r\n0001718729 00000 n\r\n0001720274 00000 n\r\n0001720714 00000 n\r\n0001720006 00000 n\r\n0001720207 00000 n\r\n0001719700 00000 n\r\n0001719939 00000 n\r\n0001719379 00000 n\r\n0001719633 00000 n\r\n0001719094 00000 n\r\n0001719312 00000 n\r\n0001724082 00000 n\r\n0001724353 00000 n\r\n0001723842 00000 n\r\n0001724015 00000 n\r\n0001723621 00000 n\r\n0001723775 00000 n\r\n0001723116 00000 n\r\n0001723554 00000 n\r\n0001722611 00000 n\r\n0001723049 00000 n\r\n0001727857 00000 n\r\n0001728218 00000 n\r\n0001727420 00000 n\r\n0001727790 00000 n\r\n0001727036 00000 n\r\n0001727353 00000 n\r\n0001726646 00000 n\r\n0001726969 00000 n\r\n0001726283 00000 n\r\n0001726579 00000 n\r\n0001731461 00000 n\r\n0001731847 00000 n\r\n0001731124 00000 n\r\n0001731394 00000 n\r\n0001730785 00000 n\r\n0001731057 00000 n\r\n0001730451 00000 n\r\n0001730718 00000 n\r\n0001730114 00000 n\r\n0001730384 00000 n\r\n0001740123 00000 n\r\n0001740277 00000 n\r\n0001740344 00000 n\r\n0001739787 00000 n\r\n0001740056 00000 n\r\n0001739453 00000 n\r\n0001739720 00000 n\r\n0001736540 00000 n\r\n0001736924 00000 n\r\n0001736991 00000 n\r\n0001733843 00000 n\r\n0001734181 00000 n\r\n0001734248 00000 n\r\n0001734546 00000 n\r\n0001735439 00000 n\r\n0001734611 00000 n\r\n0001734898 00000 n\r\n0001735557 00000 n\r\n0001735626 00000 n\r\n0001735658 00000 n\r\n0001735921 00000 n\r\n0001735999 00000 n\r\n0001737289 00000 n\r\n0001738266 00000 n\r\n0001737354 00000 n\r\n0001737639 00000 n\r\n0001738384 00000 n\r\n0001738453 00000 n\r\n0001738485 00000 n\r\n0001738748 00000 n\r\n0001738826 00000 n\r\n0001740557 00000 n\r\n0001778027 00000 n\r\n0001778396 00000 n\r\n0001778761 00000 n\r\n0001779126 00000 n\r\n0001779494 00000 n\r\n0001759750 00000 n\r\n0001760187 00000 n\r\n0001760587 00000 n\r\n0001761005 00000 n\r\n0001761380 00000 n\r\n0001755954 00000 n\r\n0001756356 00000 n\r\n0001756721 00000 n\r\n0001757086 00000 n\r\n0001757450 00000 n\r\n0001746799 00000 n\r\n0001747163 00000 n\r\n0001747565 00000 n\r\n0001747967 00000 n\r\n0001748369 00000 n\r\n0001741157 00000 n\r\n0001741553 00000 n\r\n0001741949 00000 n\r\n0001742358 00000 n\r\n0001742752 00000 n\r\n0001746055 00000 n\r\n0001746368 00000 n\r\n0001746435 00000 n\r\n0001745302 00000 n\r\n0001745623 00000 n\r\n0001745690 00000 n\r\n0001743896 00000 n\r\n0001744225 00000 n\r\n0001744292 00000 n\r\n0001744442 00000 n\r\n0001743646 00000 n\r\n0001743829 00000 n\r\n0001743147 00000 n\r\n0001743301 00000 n\r\n0001743368 00000 n\r\n0001743581 00000 n\r\n0001744958 00000 n\r\n0001744592 00000 n\r\n0001744711 00000 n\r\n0001744835 00000 n\r\n0001745077 00000 n\r\n0001745192 00000 n\r\n0001745840 00000 n\r\n0001745939 00000 n\r\n0001746585 00000 n\r\n0001746684 00000 n\r\n0001755648 00000 n\r\n0001755887 00000 n\r\n0001752701 00000 n\r\n0001753078 00000 n\r\n0001753145 00000 n\r\n0001752264 00000 n\r\n0001752634 00000 n\r\n0001750195 00000 n\r\n0001749751 00000 n\r\n0001750128 00000 n\r\n0001748781 00000 n\r\n0001748973 00000 n\r\n0001749040 00000 n\r\n0001749322 00000 n\r\n0001749387 00000 n\r\n0001749545 00000 n\r\n0001749644 00000 n\r\n0001750489 00000 n\r\n0001751267 00000 n\r\n0001750554 00000 n\r\n0001750826 00000 n\r\n0001751385 00000 n\r\n0001751454 00000 n\r\n0001751486 00000 n\r\n0001751745 00000 n\r\n0001751823 00000 n\r\n0001753439 00000 n\r\n0001754447 00000 n\r\n0001753504 00000 n\r\n0001753802 00000 n\r\n0001754565 00000 n\r\n0001754634 00000 n\r\n0001754666 00000 n\r\n0001754925 00000 n\r\n0001755003 00000 n\r\n0001759297 00000 n\r\n0001759683 00000 n\r\n0001758868 00000 n\r\n0001759230 00000 n\r\n0001758429 00000 n\r\n0001758801 00000 n\r\n0001758120 00000 n\r\n0001758362 00000 n\r\n0001757814 00000 n\r\n0001758053 00000 n\r\n0001771284 00000 n\r\n0001771715 00000 n\r\n0001771782 00000 n\r\n0001770858 00000 n\r\n0001771217 00000 n\r\n0001764938 00000 n\r\n0001765105 00000 n\r\n0001765172 00000 n\r\n0001764653 00000 n\r\n0001764871 00000 n\r\n0001761792 00000 n\r\n0001762031 00000 n\r\n0001762098 00000 n\r\n0001762396 00000 n\r\n0001763428 00000 n\r\n0001762461 00000 n\r\n0001762763 00000 n\r\n0001763546 00000 n\r\n0001763615 00000 n\r\n0001763647 00000 n\r\n0001763910 00000 n\r\n0001763988 00000 n\r\n0001765679 00000 n\r\n0001765765 00000 n\r\n0001766219 00000 n\r\n0001772084 00000 n\r\n0001774991 00000 n\r\n0001772149 00000 n\r\n0001772519 00000 n\r\n0001775109 00000 n\r\n0001775178 00000 n\r\n0001775210 00000 n\r\n0001775477 00000 n\r\n0001775555 00000 n\r\n0001780934 00000 n\r\n0001781150 00000 n\r\n0001780698 00000 n\r\n0001780867 00000 n\r\n0001780427 00000 n\r\n0001780631 00000 n\r\n0001780090 00000 n\r\n0001780360 00000 n\r\n0001779869 00000 n\r\n0001780023 00000 n\r\n0001799403 00000 n\r\n0001799772 00000 n\r\n0001800137 00000 n\r\n0001800506 00000 n\r\n0001800875 00000 n\r\n0001795571 00000 n\r\n0001795944 00000 n\r\n0001796335 00000 n\r\n0001796700 00000 n\r\n0001797069 00000 n\r\n0001791220 00000 n\r\n0001791585 00000 n\r\n0001791954 00000 n\r\n0001792385 00000 n\r\n0001792750 00000 n\r\n0001784964 00000 n\r\n0001785333 00000 n\r\n0001785705 00000 n\r\n0001786107 00000 n\r\n0001786477 00000 n\r\n0001781752 00000 n\r\n0001782119 00000 n\r\n0001782484 00000 n\r\n0001782849 00000 n\r\n0001783214 00000 n\r\n0001784653 00000 n\r\n0001784897 00000 n\r\n0001784362 00000 n\r\n0001784586 00000 n\r\n0001784075 00000 n\r\n0001784295 00000 n\r\n0001783828 00000 n\r\n0001784008 00000 n\r\n0001783583 00000 n\r\n0001783761 00000 n\r\n0001790517 00000 n\r\n0001791153 00000 n\r\n0001789954 00000 n\r\n0001790450 00000 n\r\n0001787466 00000 n\r\n0001787654 00000 n\r\n0001787721 00000 n\r\n0001787155 00000 n\r\n0001787399 00000 n\r\n0001786844 00000 n\r\n0001787088 00000 n\r\n0001788017 00000 n\r\n0001788879 00000 n\r\n0001788082 00000 n\r\n0001788362 00000 n\r\n0001788997 00000 n\r\n0001789066 00000 n\r\n0001789098 00000 n\r\n0001789359 00000 n\r\n0001789437 00000 n\r\n0001795287 00000 n\r\n0001795504 00000 n\r\n0001794878 00000 n\r\n0001795220 00000 n\r\n0001793829 00000 n\r\n0001794076 00000 n\r\n0001794143 00000 n\r\n0001794445 00000 n\r\n0001793489 00000 n\r\n0001793762 00000 n\r\n0001793115 00000 n\r\n0001793422 00000 n\r\n0001794813 00000 n\r\n0001794748 00000 n\r\n0001799082 00000 n\r\n0001799336 00000 n\r\n0001798328 00000 n\r\n0001798482 00000 n\r\n0001798967 00000 n\r\n0001798549 00000 n\r\n0001797989 00000 n\r\n0001798261 00000 n\r\n0001797694 00000 n\r\n0001797922 00000 n\r\n0001797438 00000 n\r\n0001797627 00000 n\r\n0001798902 00000 n\r\n0001802526 00000 n\r\n0001803075 00000 n\r\n0001802225 00000 n\r\n0001802459 00000 n\r\n0001801924 00000 n\r\n0001802158 00000 n\r\n0001801620 00000 n\r\n0001801857 00000 n\r\n0001801247 00000 n\r\n0001801553 00000 n\r\n0001837733 00000 n\r\n0001838101 00000 n\r\n0001838507 00000 n\r\n0001838914 00000 n\r\n0001839278 00000 n\r\n0001827813 00000 n\r\n0001828216 00000 n\r\n0001828619 00000 n\r\n0001829022 00000 n\r\n0001829412 00000 n\r\n0001815385 00000 n\r\n0001815775 00000 n\r\n0001816203 00000 n\r\n0001816605 00000 n\r\n0001817007 00000 n\r\n0001808241 00000 n\r\n0001808643 00000 n\r\n0001809012 00000 n\r\n0001809381 00000 n\r\n0001809750 00000 n\r\n0001803677 00000 n\r\n0001804042 00000 n\r\n0001804407 00000 n\r\n0001804798 00000 n\r\n0001805167 00000 n\r\n0001807923 00000 n\r\n0001808174 00000 n\r\n0001807602 00000 n\r\n0001807856 00000 n\r\n0001806762 00000 n\r\n0001806916 00000 n\r\n0001806983 00000 n\r\n0001806149 00000 n\r\n0001806695 00000 n\r\n0001805536 00000 n\r\n0001806082 00000 n\r\n0001807537 00000 n\r\n0001812022 00000 n\r\n0001812396 00000 n\r\n0001812463 00000 n\r\n0001811493 00000 n\r\n0001811955 00000 n\r\n0001810966 00000 n\r\n0001811426 00000 n\r\n0001810438 00000 n\r\n0001810899 00000 n\r\n0001810119 00000 n\r\n0001810371 00000 n\r\n0001812761 00000 n\r\n0001813982 00000 n\r\n0001812826 00000 n\r\n0001813139 00000 n\r\n0001814100 00000 n\r\n0001814169 00000 n\r\n0001814201 00000 n\r\n0001814464 00000 n\r\n0001814542 00000 n\r\n0001826322 00000 n\r\n0001826476 00000 n\r\n0001826543 00000 n\r\n0001821656 00000 n\r\n0001821884 00000 n\r\n0001826206 00000 n\r\n0001825841 00000 n\r\n0001821951 00000 n\r\n0001818292 00000 n\r\n0001818671 00000 n\r\n0001818738 00000 n\r\n0001817850 00000 n\r\n0001818225 00000 n\r\n0001817409 00000 n\r\n0001817783 00000 n\r\n0001819034 00000 n\r\n0001820256 00000 n\r\n0001819099 00000 n\r\n0001819414 00000 n\r\n0001820374 00000 n\r\n0001820443 00000 n\r\n0001820475 00000 n\r\n0001820736 00000 n\r\n0001820814 00000 n\r\n0001822253 00000 n\r\n0001823964 00000 n\r\n0001822318 00000 n\r\n0001822651 00000 n\r\n0001824082 00000 n\r\n0001824151 00000 n\r\n0001824183 00000 n\r\n0001824450 00000 n\r\n0001824528 00000 n\r\n0001825991 00000 n\r\n0001826090 00000 n\r\n0001827226 00000 n\r\n0001827291 00000 n\r\n0001827410 00000 n\r\n0001827467 00000 n\r\n0001827734 00000 n\r\n0001835823 00000 n\r\n0001836014 00000 n\r\n0001836081 00000 n\r\n0001831998 00000 n\r\n0001833943 00000 n\r\n0001834132 00000 n\r\n0001834474 00000 n\r\n0001834199 00000 n\r\n0001831739 00000 n\r\n0001831931 00000 n\r\n0001832277 00000 n\r\n0001830770 00000 n\r\n0001830924 00000 n\r\n0001830991 00000 n\r\n0001829802 00000 n\r\n0001829956 00000 n\r\n0001830023 00000 n\r\n0001830705 00000 n\r\n0001831674 00000 n\r\n0001832212 00000 n\r\n0001832407 00000 n\r\n0001832488 00000 n\r\n0001832512 00000 n\r\n0001832764 00000 n\r\n0001832917 00000 n\r\n0001832996 00000 n\r\n0001833255 00000 n\r\n0001833332 00000 n\r\n0001834409 00000 n\r\n0001834604 00000 n\r\n0001834685 00000 n\r\n0001834709 00000 n\r\n0001834961 00000 n\r\n0001835114 00000 n\r\n0001835193 00000 n\r\n0001835452 00000 n\r\n0001835529 00000 n\r\n0001836211 00000 n\r\n0001836292 00000 n\r\n0001836316 00000 n\r\n0001836568 00000 n\r\n0001836721 00000 n\r\n0001836800 00000 n\r\n0001837059 00000 n\r\n0001837136 00000 n\r\n0001841177 00000 n\r\n0001841436 00000 n\r\n0001840901 00000 n\r\n0001841110 00000 n\r\n0001840490 00000 n\r\n0001840214 00000 n\r\n0001840423 00000 n\r\n0001840776 00000 n\r\n0001839928 00000 n\r\n0001840147 00000 n\r\n0001839642 00000 n\r\n0001839861 00000 n\r\n0001840711 00000 n\r\n0001857650 00000 n\r\n0001852418 00000 n\r\n0001852815 00000 n\r\n0001853205 00000 n\r\n0001853611 00000 n\r\n0001853975 00000 n\r\n0001846349 00000 n\r\n0001846740 00000 n\r\n0001847110 00000 n\r\n0001847480 00000 n\r\n0001847844 00000 n\r\n0001842019 00000 n\r\n0001842383 00000 n\r\n0001842747 00000 n\r\n0001843141 00000 n\r\n0001843509 00000 n\r\n0001846077 00000 n\r\n0001846282 00000 n\r\n0001845807 00000 n\r\n0001846010 00000 n\r\n0001845107 00000 n\r\n0001845265 00000 n\r\n0001845332 00000 n\r\n0001844793 00000 n\r\n0001845040 00000 n\r\n0001843907 00000 n\r\n0001844065 00000 n\r\n0001844132 00000 n\r\n0001844728 00000 n\r\n0001845742 00000 n\r\n0001849448 00000 n\r\n0001849606 00000 n\r\n0001852291 00000 n\r\n0001849673 00000 n\r\n0001849080 00000 n\r\n0001849381 00000 n\r\n0001848712 00000 n\r\n0001849013 00000 n\r\n0001848459 00000 n\r\n0001848645 00000 n\r\n0001848208 00000 n\r\n0001848392 00000 n\r\n0001850089 00000 n\r\n0001850802 00000 n\r\n0001850429 00000 n\r\n0001850154 00000 n\r\n0001850364 00000 n\r\n0001850579 00000 n\r\n0001850678 00000 n\r\n0001850922 00000 n\r\n0001851003 00000 n\r\n0001851027 00000 n\r\n0001851279 00000 n\r\n0001851432 00000 n\r\n0001851511 00000 n\r\n0001851770 00000 n\r\n0001851847 00000 n\r\n0001855963 00000 n\r\n0001856121 00000 n\r\n0001855451 00000 n\r\n0001855609 00000 n\r\n0001855676 00000 n\r\n0001855175 00000 n\r\n0001855384 00000 n\r\n0001854891 00000 n\r\n0001855108 00000 n\r\n0001854372 00000 n\r\n0001854527 00000 n\r\n0001854594 00000 n\r\n0001854826 00000 n\r\n0001855898 00000 n\r\n0001859153 00000 n\r\n0001859476 00000 n\r\n0001858783 00000 n\r\n0001859086 00000 n\r\n0001858530 00000 n\r\n0001858716 00000 n\r\n0001858268 00000 n\r\n0001858463 00000 n\r\n0001858043 00000 n\r\n0001858201 00000 n\r\n0001867105 00000 n\r\n0001896458 00000 n\r\n0002201507 00000 n\r\n0002396469 00000 n\r\n0002396586 00000 n\r\n0002396713 00000 n\r\n0002328883 00000 n\r\n0002396828 00000 n\r\n0002396952 00000 n\r\n0002395947 00000 n\r\n0001896525 00000 n\r\n0001897337 00000 n\r\n0001897644 00000 n\r\n0001899173 00000 n\r\n0001899479 00000 n\r\n0001899785 00000 n\r\n0001900090 00000 n\r\n0001900389 00000 n\r\n0001900695 00000 n\r\n0001901001 00000 n\r\n0001901307 00000 n\r\n0001901613 00000 n\r\n0001901918 00000 n\r\n0001902217 00000 n\r\n0001902517 00000 n\r\n0001902823 00000 n\r\n0001903129 00000 n\r\n0001903435 00000 n\r\n0001903741 00000 n\r\n0001904046 00000 n\r\n0001904345 00000 n\r\n0001904651 00000 n\r\n0001904957 00000 n\r\n0001905263 00000 n\r\n0001905569 00000 n\r\n0001905870 00000 n\r\n0001906175 00000 n\r\n0001906477 00000 n\r\n0001906783 00000 n\r\n0001907089 00000 n\r\n0001907395 00000 n\r\n0001907704 00000 n\r\n0001908009 00000 n\r\n0001908311 00000 n\r\n0001908620 00000 n\r\n0001908929 00000 n\r\n0001909232 00000 n\r\n0001909541 00000 n\r\n0001909850 00000 n\r\n0001910158 00000 n\r\n0001910467 00000 n\r\n0001910776 00000 n\r\n0001911085 00000 n\r\n0001911393 00000 n\r\n0001911626 00000 n\r\n0001911930 00000 n\r\n0001912163 00000 n\r\n0001912462 00000 n\r\n0001912695 00000 n\r\n0001912997 00000 n\r\n0001913230 00000 n\r\n0001913460 00000 n\r\n0001913761 00000 n\r\n0001913992 00000 n\r\n0001914222 00000 n\r\n0001914523 00000 n\r\n0001914753 00000 n\r\n0001914981 00000 n\r\n0001915282 00000 n\r\n0001915515 00000 n\r\n0001916116 00000 n\r\n0001916717 00000 n\r\n0001917318 00000 n\r\n0001917919 00000 n\r\n0001918335 00000 n\r\n0001918936 00000 n\r\n0001919537 00000 n\r\n0001920138 00000 n\r\n0001920371 00000 n\r\n0001920675 00000 n\r\n0001921276 00000 n\r\n0001921877 00000 n\r\n0001922478 00000 n\r\n0001923079 00000 n\r\n0001923680 00000 n\r\n0001924096 00000 n\r\n0001924697 00000 n\r\n0001925298 00000 n\r\n0001925603 00000 n\r\n0001925908 00000 n\r\n0001926212 00000 n\r\n0001926519 00000 n\r\n0001926824 00000 n\r\n0001927129 00000 n\r\n0001927979 00000 n\r\n0001928284 00000 n\r\n0001928590 00000 n\r\n0001928895 00000 n\r\n0001929201 00000 n\r\n0001929434 00000 n\r\n0001929668 00000 n\r\n0001929967 00000 n\r\n0001930340 00000 n\r\n0001930573 00000 n\r\n0001930807 00000 n\r\n0001931040 00000 n\r\n0001931341 00000 n\r\n0001931642 00000 n\r\n0001931946 00000 n\r\n0001932250 00000 n\r\n0001932553 00000 n\r\n0001932861 00000 n\r\n0001933169 00000 n\r\n0001933477 00000 n\r\n0001933785 00000 n\r\n0001934093 00000 n\r\n0001934400 00000 n\r\n0001934634 00000 n\r\n0001934942 00000 n\r\n0001935250 00000 n\r\n0001935558 00000 n\r\n0001935865 00000 n\r\n0001936172 00000 n\r\n0001936480 00000 n\r\n0001936787 00000 n\r\n0001937095 00000 n\r\n0001937403 00000 n\r\n0001937711 00000 n\r\n0001938021 00000 n\r\n0001938329 00000 n\r\n0001938637 00000 n\r\n0001938945 00000 n\r\n0001939253 00000 n\r\n0001939561 00000 n\r\n0001939871 00000 n\r\n0001940181 00000 n\r\n0001940489 00000 n\r\n0001940797 00000 n\r\n0001941105 00000 n\r\n0001941413 00000 n\r\n0001941718 00000 n\r\n0001942025 00000 n\r\n0001942334 00000 n\r\n0001942643 00000 n\r\n0001942952 00000 n\r\n0001943261 00000 n\r\n0001943570 00000 n\r\n0001943876 00000 n\r\n0001944182 00000 n\r\n0001944488 00000 n\r\n0001944796 00000 n\r\n0001945101 00000 n\r\n0001945406 00000 n\r\n0001945861 00000 n\r\n0001946617 00000 n\r\n0001947373 00000 n\r\n0001947606 00000 n\r\n0001947835 00000 n\r\n0001948134 00000 n\r\n0001948440 00000 n\r\n0001948746 00000 n\r\n0001949052 00000 n\r\n0001949357 00000 n\r\n0001949663 00000 n\r\n0001949962 00000 n\r\n0001950267 00000 n\r\n0001950566 00000 n\r\n0001950872 00000 n\r\n0001951178 00000 n\r\n0001951484 00000 n\r\n0001951790 00000 n\r\n0001952095 00000 n\r\n0001952394 00000 n\r\n0001952697 00000 n\r\n0001953003 00000 n\r\n0001953309 00000 n\r\n0001953615 00000 n\r\n0001953921 00000 n\r\n0001954226 00000 n\r\n0001954525 00000 n\r\n0001954831 00000 n\r\n0001955137 00000 n\r\n0001955443 00000 n\r\n0001955749 00000 n\r\n0001956051 00000 n\r\n0001956356 00000 n\r\n0001956655 00000 n\r\n0001956961 00000 n\r\n0001957267 00000 n\r\n0001957573 00000 n\r\n0001957879 00000 n\r\n0001958184 00000 n\r\n0001958483 00000 n\r\n0001958789 00000 n\r\n0001959095 00000 n\r\n0002193599 00000 n\r\n0001865780 00000 n\r\n0001866032 00000 n\r\n0001866980 00000 n\r\n0001866099 00000 n\r\n0001865234 00000 n\r\n0001865713 00000 n\r\n0001864926 00000 n\r\n0001865167 00000 n\r\n0001864539 00000 n\r\n0001864859 00000 n\r\n0001866533 00000 n\r\n0001866598 00000 n\r\n0001866756 00000 n\r\n0001866855 00000 n\r\n0002389867 00000 n\r\n0002392889 00000 n\r\n0002389932 00000 n\r\n0002389431 00000 n\r\n0002389366 00000 n\r\n0002389301 00000 n\r\n0002387283 00000 n\r\n0002202282 00000 n\r\n0002388166 00000 n\r\n0002387348 00000 n\r\n0002387218 00000 n\r\n0002387153 00000 n\r\n0002387088 00000 n\r\n0002387023 00000 n\r\n0002386958 00000 n\r\n0002384900 00000 n\r\n0002385803 00000 n\r\n0002384965 00000 n\r\n0002384835 00000 n\r\n0002382486 00000 n\r\n0002383580 00000 n\r\n0002382551 00000 n\r\n0002382421 00000 n\r\n0002382356 00000 n\r\n0002382291 00000 n\r\n0002382226 00000 n\r\n0002380206 00000 n\r\n0002381090 00000 n\r\n0002380271 00000 n\r\n0002380141 00000 n\r\n0002380076 00000 n\r\n0002380011 00000 n\r\n0002379946 00000 n\r\n0002379881 00000 n\r\n0002373763 00000 n\r\n0002376704 00000 n\r\n0002373828 00000 n\r\n0002371733 00000 n\r\n0002372622 00000 n\r\n0002371798 00000 n\r\n0002371668 00000 n\r\n0002371603 00000 n\r\n0002371538 00000 n\r\n0002371473 00000 n\r\n0002371408 00000 n\r\n0002369354 00000 n\r\n0002370255 00000 n\r\n0002369419 00000 n\r\n0002369289 00000 n\r\n0002369224 00000 n\r\n0002369159 00000 n\r\n0002368529 00000 n\r\n0002368594 00000 n\r\n0002313482 00000 n\r\n0002368464 00000 n\r\n0002368399 00000 n\r\n0002366641 00000 n\r\n0002367392 00000 n\r\n0002366706 00000 n\r\n0002366576 00000 n\r\n0002366511 00000 n\r\n0002366446 00000 n\r\n0002364503 00000 n\r\n0002365347 00000 n\r\n0002364568 00000 n\r\n0002364438 00000 n\r\n0002363807 00000 n\r\n0002363872 00000 n\r\n0002357092 00000 n\r\n0002363742 00000 n\r\n0002360585 00000 n\r\n0002362076 00000 n\r\n0002360650 00000 n\r\n0002360520 00000 n\r\n0002359891 00000 n\r\n0002359956 00000 n\r\n0002359826 00000 n\r\n0002359761 00000 n\r\n0002359133 00000 n\r\n0002359198 00000 n\r\n0002359068 00000 n\r\n0002359003 00000 n\r\n0002357027 00000 n\r\n0002357912 00000 n\r\n0002356962 00000 n\r\n0002356897 00000 n\r\n0002356269 00000 n\r\n0002356334 00000 n\r\n0002352727 00000 n\r\n0002356204 00000 n\r\n0002356139 00000 n\r\n0002356074 00000 n\r\n0002356009 00000 n\r\n0002355944 00000 n\r\n0002355879 00000 n\r\n0002355814 00000 n\r\n0002355749 00000 n\r\n0002355684 00000 n\r\n0002355619 00000 n\r\n0002352662 00000 n\r\n0002354046 00000 n\r\n0002352597 00000 n\r\n0002352532 00000 n\r\n0002352467 00000 n\r\n0002352402 00000 n\r\n0002352337 00000 n\r\n0002352272 00000 n\r\n0002352207 00000 n\r\n0002352142 00000 n\r\n0002349928 00000 n\r\n0002350944 00000 n\r\n0002349993 00000 n\r\n0002346643 00000 n\r\n0002348164 00000 n\r\n0002346708 00000 n\r\n0002346012 00000 n\r\n0002346077 00000 n\r\n0002309929 00000 n\r\n0002335822 00000 n\r\n0002341389 00000 n\r\n0002335887 00000 n\r\n0002332372 00000 n\r\n0002334045 00000 n\r\n0002332437 00000 n\r\n0002329009 00000 n\r\n0002330627 00000 n\r\n0002329074 00000 n\r\n0002328818 00000 n\r\n0002325592 00000 n\r\n0002327139 00000 n\r\n0002325657 00000 n\r\n0002323158 00000 n\r\n0002324299 00000 n\r\n0002323223 00000 n\r\n0002315734 00000 n\r\n0002319604 00000 n\r\n0002315799 00000 n\r\n0002313417 00000 n\r\n0002314490 00000 n\r\n0002313352 00000 n\r\n0002313287 00000 n\r\n0002312661 00000 n\r\n0002312726 00000 n\r\n0002312596 00000 n\r\n0002312531 00000 n\r\n0002312466 00000 n\r\n0002312401 00000 n\r\n0002309864 00000 n\r\n0002311041 00000 n\r\n0002306952 00000 n\r\n0002308332 00000 n\r\n0002307017 00000 n\r\n0002304051 00000 n\r\n0002305408 00000 n\r\n0002304116 00000 n\r\n0002301658 00000 n\r\n0002302762 00000 n\r\n0002301723 00000 n\r\n0002299247 00000 n\r\n0002300367 00000 n\r\n0002299312 00000 n\r\n0002298612 00000 n\r\n0002298677 00000 n\r\n0002295290 00000 n\r\n0002297977 00000 n\r\n0002298042 00000 n\r\n0002297342 00000 n\r\n0002297407 00000 n\r\n0002295225 00000 n\r\n0002296189 00000 n\r\n0002294590 00000 n\r\n0002294655 00000 n\r\n0002280255 00000 n\r\n0002293956 00000 n\r\n0002294021 00000 n\r\n0002284601 00000 n\r\n0002293891 00000 n\r\n0002291456 00000 n\r\n0002292582 00000 n\r\n0002291521 00000 n\r\n0002289375 00000 n\r\n0002290318 00000 n\r\n0002289440 00000 n\r\n0002288740 00000 n\r\n0002288805 00000 n\r\n0002288106 00000 n\r\n0002288171 00000 n\r\n0002287472 00000 n\r\n0002287537 00000 n\r\n0002286837 00000 n\r\n0002286902 00000 n\r\n0002284536 00000 n\r\n0002285589 00000 n\r\n0002283901 00000 n\r\n0002283966 00000 n\r\n0002281869 00000 n\r\n0002281804 00000 n\r\n0002282758 00000 n\r\n0002280190 00000 n\r\n0002281234 00000 n\r\n0002278527 00000 n\r\n0002278883 00000 n\r\n0002279303 00000 n\r\n0002278592 00000 n\r\n0002275475 00000 n\r\n0002276877 00000 n\r\n0002275540 00000 n\r\n0002274840 00000 n\r\n0002274905 00000 n\r\n0002268972 00000 n\r\n0002274205 00000 n\r\n0002274270 00000 n\r\n0002273570 00000 n\r\n0002273635 00000 n\r\n0002272935 00000 n\r\n0002273000 00000 n\r\n0002272870 00000 n\r\n0002272805 00000 n\r\n0002272170 00000 n\r\n0002272235 00000 n\r\n0002271535 00000 n\r\n0002271600 00000 n\r\n0002270900 00000 n\r\n0002270965 00000 n\r\n0002268907 00000 n\r\n0002269799 00000 n\r\n0002266044 00000 n\r\n0002267397 00000 n\r\n0002266109 00000 n\r\n0002263804 00000 n\r\n0002264816 00000 n\r\n0002263869 00000 n\r\n0002261598 00000 n\r\n0002262581 00000 n\r\n0002261663 00000 n\r\n0002259247 00000 n\r\n0002260302 00000 n\r\n0002259312 00000 n\r\n0002257071 00000 n\r\n0002258037 00000 n\r\n0002257136 00000 n\r\n0002254904 00000 n\r\n0002255865 00000 n\r\n0002254969 00000 n\r\n0002252634 00000 n\r\n0002253648 00000 n\r\n0002252699 00000 n\r\n0002252001 00000 n\r\n0002252066 00000 n\r\n0002251368 00000 n\r\n0002251433 00000 n\r\n0002250735 00000 n\r\n0002250800 00000 n\r\n0002247456 00000 n\r\n0002248972 00000 n\r\n0002247521 00000 n\r\n0002247391 00000 n\r\n0002242885 00000 n\r\n0002245360 00000 n\r\n0002242950 00000 n\r\n0002220751 00000 n\r\n0002221100 00000 n\r\n0002220816 00000 n\r\n0002220159 00000 n\r\n0002220224 00000 n\r\n0002219567 00000 n\r\n0002219632 00000 n\r\n0002219502 00000 n\r\n0002219437 00000 n\r\n0002219372 00000 n\r\n0002219307 00000 n\r\n0002219242 00000 n\r\n0002219177 00000 n\r\n0002219112 00000 n\r\n0002219047 00000 n\r\n0002218982 00000 n\r\n0002217300 00000 n\r\n0002218014 00000 n\r\n0002217365 00000 n\r\n0002217235 00000 n\r\n0002217170 00000 n\r\n0002217105 00000 n\r\n0002217040 00000 n\r\n0002216975 00000 n\r\n0002214993 00000 n\r\n0002215858 00000 n\r\n0002215058 00000 n\r\n0002214928 00000 n\r\n0002212576 00000 n\r\n0002213669 00000 n\r\n0002212641 00000 n\r\n0002212511 00000 n\r\n0002212446 00000 n\r\n0002212381 00000 n\r\n0002212316 00000 n\r\n0002210314 00000 n\r\n0002211189 00000 n\r\n0002210379 00000 n\r\n0002210249 00000 n\r\n0002210184 00000 n\r\n0002210119 00000 n\r\n0002210054 00000 n\r\n0002209989 00000 n\r\n0002206441 00000 n\r\n0002208095 00000 n\r\n0002206506 00000 n\r\n0002204427 00000 n\r\n0002205308 00000 n\r\n0002204492 00000 n\r\n0002204362 00000 n\r\n0002204297 00000 n\r\n0002204232 00000 n\r\n0002204167 00000 n\r\n0002204102 00000 n\r\n0002201968 00000 n\r\n0002202961 00000 n\r\n0002202033 00000 n\r\n0002201903 00000 n\r\n0002201838 00000 n\r\n0002201773 00000 n\r\n0002201558 00000 n\r\n0002202332 00000 n\r\n0002202907 00000 n\r\n0002203079 00000 n\r\n0002203148 00000 n\r\n0002203180 00000 n\r\n0002203449 00000 n\r\n0002203527 00000 n\r\n0002204741 00000 n\r\n0002205426 00000 n\r\n0002205495 00000 n\r\n0002205527 00000 n\r\n0002205796 00000 n\r\n0002205874 00000 n\r\n0002206764 00000 n\r\n0002208213 00000 n\r\n0002208282 00000 n\r\n0002208314 00000 n\r\n0002208580 00000 n\r\n0002208658 00000 n\r\n0002210628 00000 n\r\n0002211307 00000 n\r\n0002211376 00000 n\r\n0002211408 00000 n\r\n0002211677 00000 n\r\n0002211755 00000 n\r\n0002212975 00000 n\r\n0002213787 00000 n\r\n0002213856 00000 n\r\n0002213888 00000 n\r\n0002214156 00000 n\r\n0002214234 00000 n\r\n0002215307 00000 n\r\n0002215976 00000 n\r\n0002216045 00000 n\r\n0002216077 00000 n\r\n0002216346 00000 n\r\n0002216424 00000 n\r\n0002217612 00000 n\r\n0002218132 00000 n\r\n0002218201 00000 n\r\n0002218233 00000 n\r\n0002218502 00000 n\r\n0002218580 00000 n\r\n0002219751 00000 n\r\n0002219808 00000 n\r\n0002220080 00000 n\r\n0002220343 00000 n\r\n0002220400 00000 n\r\n0002220672 00000 n\r\n0002221035 00000 n\r\n0002221220 00000 n\r\n0002221301 00000 n\r\n0002221325 00000 n\r\n0002221607 00000 n\r\n0002221760 00000 n\r\n0002221839 00000 n\r\n0002222109 00000 n\r\n0002222186 00000 n\r\n0002243896 00000 n\r\n0002245478 00000 n\r\n0002245547 00000 n\r\n0002245579 00000 n\r\n0002245849 00000 n\r\n0002245927 00000 n\r\n0002247778 00000 n\r\n0002249090 00000 n\r\n0002249159 00000 n\r\n0002249191 00000 n\r\n0002249463 00000 n\r\n0002249541 00000 n\r\n0002250918 00000 n\r\n0002250987 00000 n\r\n0002251019 00000 n\r\n0002251290 00000 n\r\n0002251551 00000 n\r\n0002251620 00000 n\r\n0002251652 00000 n\r\n0002251923 00000 n\r\n0002252184 00000 n\r\n0002252253 00000 n\r\n0002252285 00000 n\r\n0002252556 00000 n\r\n0002252962 00000 n\r\n0002253766 00000 n\r\n0002253835 00000 n\r\n0002253867 00000 n\r\n0002254140 00000 n\r\n0002254218 00000 n\r\n0002255229 00000 n\r\n0002255983 00000 n\r\n0002256052 00000 n\r\n0002256084 00000 n\r\n0002256357 00000 n\r\n0002256435 00000 n\r\n0002257397 00000 n\r\n0002258155 00000 n\r\n0002258224 00000 n\r\n0002258256 00000 n\r\n0002258529 00000 n\r\n0002258607 00000 n\r\n0002259576 00000 n\r\n0002260420 00000 n\r\n0002260489 00000 n\r\n0002260521 00000 n\r\n0002260794 00000 n\r\n0002260872 00000 n\r\n0002261928 00000 n\r\n0002262699 00000 n\r\n0002262768 00000 n\r\n0002262800 00000 n\r\n0002263073 00000 n\r\n0002263151 00000 n\r\n0002264157 00000 n\r\n0002264934 00000 n\r\n0002265003 00000 n\r\n0002265035 00000 n\r\n0002265307 00000 n\r\n0002265385 00000 n\r\n0002266454 00000 n\r\n0002267515 00000 n\r\n0002267584 00000 n\r\n0002267616 00000 n\r\n0002267886 00000 n\r\n0002267964 00000 n\r\n0002269268 00000 n\r\n0002269917 00000 n\r\n0002269986 00000 n\r\n0002270018 00000 n\r\n0002270291 00000 n\r\n0002270369 00000 n\r\n0002271083 00000 n\r\n0002271152 00000 n\r\n0002271184 00000 n\r\n0002271457 00000 n\r\n0002271718 00000 n\r\n0002271787 00000 n\r\n0002271819 00000 n\r\n0002272092 00000 n\r\n0002272353 00000 n\r\n0002272422 00000 n\r\n0002272454 00000 n\r\n0002272727 00000 n\r\n0002273118 00000 n\r\n0002273187 00000 n\r\n0002273219 00000 n\r\n0002273492 00000 n\r\n0002273753 00000 n\r\n0002273822 00000 n\r\n0002273854 00000 n\r\n0002274127 00000 n\r\n0002274388 00000 n\r\n0002274457 00000 n\r\n0002274489 00000 n\r\n0002274762 00000 n\r\n0002275023 00000 n\r\n0002275092 00000 n\r\n0002275124 00000 n\r\n0002275397 00000 n\r\n0002275796 00000 n\r\n0002276995 00000 n\r\n0002277064 00000 n\r\n0002277096 00000 n\r\n0002277368 00000 n\r\n0002277446 00000 n\r\n0002278933 00000 n\r\n0002279249 00000 n\r\n0002279421 00000 n\r\n0002279490 00000 n\r\n0002279522 00000 n\r\n0002279796 00000 n\r\n0002279874 00000 n\r\n0002280581 00000 n\r\n0002281352 00000 n\r\n0002281421 00000 n\r\n0002281453 00000 n\r\n0002281726 00000 n\r\n0002282185 00000 n\r\n0002282876 00000 n\r\n0002282945 00000 n\r\n0002282977 00000 n\r\n0002283250 00000 n\r\n0002283328 00000 n\r\n0002284084 00000 n\r\n0002284153 00000 n\r\n0002284185 00000 n\r\n0002284458 00000 n\r\n0002284910 00000 n\r\n0002285707 00000 n\r\n0002285776 00000 n\r\n0002285808 00000 n\r\n0002286080 00000 n\r\n0002286158 00000 n\r\n0002287020 00000 n\r\n0002287089 00000 n\r\n0002287121 00000 n\r\n0002287394 00000 n\r\n0002287655 00000 n\r\n0002287724 00000 n\r\n0002287756 00000 n\r\n0002288028 00000 n\r\n0002288289 00000 n\r\n0002288358 00000 n\r\n0002288390 00000 n\r\n0002288662 00000 n\r\n0002288923 00000 n\r\n0002288992 00000 n\r\n0002289024 00000 n\r\n0002289297 00000 n\r\n0002289750 00000 n\r\n0002290436 00000 n\r\n0002290505 00000 n\r\n0002290537 00000 n\r\n0002290810 00000 n\r\n0002290888 00000 n\r\n0002291843 00000 n\r\n0002292700 00000 n\r\n0002292769 00000 n\r\n0002292801 00000 n\r\n0002293074 00000 n\r\n0002293152 00000 n\r\n0002294139 00000 n\r\n0002294208 00000 n\r\n0002294240 00000 n\r\n0002294512 00000 n\r\n0002294773 00000 n\r\n0002294842 00000 n\r\n0002294874 00000 n\r\n0002295147 00000 n\r\n0002295606 00000 n\r\n0002296307 00000 n\r\n0002296376 00000 n\r\n0002296408 00000 n\r\n0002296681 00000 n\r\n0002296759 00000 n\r\n0002297525 00000 n\r\n0002297594 00000 n\r\n0002297626 00000 n\r\n0002297899 00000 n\r\n0002298160 00000 n\r\n0002298229 00000 n\r\n0002298261 00000 n\r\n0002298534 00000 n\r\n0002298795 00000 n\r\n0002298864 00000 n\r\n0002298896 00000 n\r\n0002299169 00000 n\r\n0002299641 00000 n\r\n0002300485 00000 n\r\n0002300554 00000 n\r\n0002300586 00000 n\r\n0002300854 00000 n\r\n0002300932 00000 n\r\n0002302039 00000 n\r\n0002302880 00000 n\r\n0002302949 00000 n\r\n0002302981 00000 n\r\n0002303250 00000 n\r\n0002303328 00000 n\r\n0002304430 00000 n\r\n0002305526 00000 n\r\n0002305595 00000 n\r\n0002305627 00000 n\r\n0002305896 00000 n\r\n0002305974 00000 n\r\n0002307363 00000 n\r\n0002308450 00000 n\r\n0002308519 00000 n\r\n0002308551 00000 n\r\n0002308817 00000 n\r\n0002308895 00000 n\r\n0002310244 00000 n\r\n0002311159 00000 n\r\n0002311228 00000 n\r\n0002311260 00000 n\r\n0002311526 00000 n\r\n0002311604 00000 n\r\n0002312844 00000 n\r\n0002312913 00000 n\r\n0002312945 00000 n\r\n0002313209 00000 n\r\n0002313814 00000 n\r\n0002314608 00000 n\r\n0002314677 00000 n\r\n0002314709 00000 n\r\n0002314980 00000 n\r\n0002315058 00000 n\r\n0002316617 00000 n\r\n0002319722 00000 n\r\n0002319791 00000 n\r\n0002319823 00000 n\r\n0002320093 00000 n\r\n0002320171 00000 n\r\n0002323574 00000 n\r\n0002324417 00000 n\r\n0002324486 00000 n\r\n0002324518 00000 n\r\n0002324789 00000 n\r\n0002324867 00000 n\r\n0002326027 00000 n\r\n0002327257 00000 n\r\n0002327326 00000 n\r\n0002327358 00000 n\r\n0002327628 00000 n\r\n0002327706 00000 n\r\n0002329449 00000 n\r\n0002330745 00000 n\r\n0002330814 00000 n\r\n0002330846 00000 n\r\n0002331116 00000 n\r\n0002331194 00000 n\r\n0002332835 00000 n\r\n0002334163 00000 n\r\n0002334232 00000 n\r\n0002334264 00000 n\r\n0002334534 00000 n\r\n0002334612 00000 n\r\n0002337335 00000 n\r\n0002341507 00000 n\r\n0002341576 00000 n\r\n0002341608 00000 n\r\n0002341880 00000 n\r\n0002341958 00000 n\r\n0002346195 00000 n\r\n0002346264 00000 n\r\n0002346296 00000 n\r\n0002346565 00000 n\r\n0002346966 00000 n\r\n0002348282 00000 n\r\n0002348351 00000 n\r\n0002348383 00000 n\r\n0002348652 00000 n\r\n0002348730 00000 n\r\n0002350313 00000 n\r\n0002351062 00000 n\r\n0002351131 00000 n\r\n0002351163 00000 n\r\n0002351433 00000 n\r\n0002351511 00000 n\r\n0002353039 00000 n\r\n0002354164 00000 n\r\n0002354233 00000 n\r\n0002354265 00000 n\r\n0002354534 00000 n\r\n0002354612 00000 n\r\n0002356452 00000 n\r\n0002356521 00000 n\r\n0002356553 00000 n\r\n0002356819 00000 n\r\n0002357384 00000 n\r\n0002358030 00000 n\r\n0002358099 00000 n\r\n0002358131 00000 n\r\n0002358397 00000 n\r\n0002358475 00000 n\r\n0002359316 00000 n\r\n0002359385 00000 n\r\n0002359417 00000 n\r\n0002359683 00000 n\r\n0002360074 00000 n\r\n0002360143 00000 n\r\n0002360175 00000 n\r\n0002360442 00000 n\r\n0002360971 00000 n\r\n0002362194 00000 n\r\n0002362263 00000 n\r\n0002362295 00000 n\r\n0002362559 00000 n\r\n0002362637 00000 n\r\n0002363990 00000 n\r\n0002364059 00000 n\r\n0002364091 00000 n\r\n0002364360 00000 n\r\n0002364817 00000 n\r\n0002365465 00000 n\r\n0002365534 00000 n\r\n0002365566 00000 n\r\n0002365838 00000 n\r\n0002365916 00000 n\r\n0002366954 00000 n\r\n0002367510 00000 n\r\n0002367579 00000 n\r\n0002367611 00000 n\r\n0002367883 00000 n\r\n0002367961 00000 n\r\n0002368712 00000 n\r\n0002368781 00000 n\r\n0002368813 00000 n\r\n0002369081 00000 n\r\n0002369668 00000 n\r\n0002370373 00000 n\r\n0002370442 00000 n\r\n0002370474 00000 n\r\n0002370743 00000 n\r\n0002370821 00000 n\r\n0002372047 00000 n\r\n0002372740 00000 n\r\n0002372809 00000 n\r\n0002372841 00000 n\r\n0002373110 00000 n\r\n0002373188 00000 n\r\n0002374089 00000 n\r\n0002376822 00000 n\r\n0002376891 00000 n\r\n0002376923 00000 n\r\n0002377188 00000 n\r\n0002377266 00000 n\r\n0002380520 00000 n\r\n0002381208 00000 n\r\n0002381277 00000 n\r\n0002381309 00000 n\r\n0002381578 00000 n\r\n0002381656 00000 n\r\n0002382887 00000 n\r\n0002383698 00000 n\r\n0002383767 00000 n\r\n0002383799 00000 n\r\n0002384064 00000 n\r\n0002384142 00000 n\r\n0002385214 00000 n\r\n0002385921 00000 n\r\n0002385990 00000 n\r\n0002386022 00000 n\r\n0002386291 00000 n\r\n0002386369 00000 n\r\n0002387597 00000 n\r\n0002388284 00000 n\r\n0002388353 00000 n\r\n0002388385 00000 n\r\n0002388654 00000 n\r\n0002388732 00000 n\r\n0002389802 00000 n\r\n0002390400 00000 n\r\n0002393007 00000 n\r\n0002393076 00000 n\r\n0002393108 00000 n\r\n0002393380 00000 n\r\n0002393458 00000 n\r\n0002396097 00000 n\r\n0002396221 00000 n\r\n0002396347 00000 n\r\n0002397071 00000 n\r\n0002397128 00000 n\r\n0002397402 00000 n\r\n0002397513 00000 n\r\ntrailer\r\n<</Size 2645/Root 1 0 R/Info 2644 0 R/ID[<FAE53F4C88A5794CA336A25A4DAE42AD><F2987BAE2BC0DA40A5BFB884DAA14278>]>>\r\nstartxref\r\n2397696\r\n%%EOF\r\n"
  },
  {
    "path": "settings.vssettings",
    "content": "<UserSettings><ApplicationIdentity version=\"15.0\"/><ToolsOptions><ToolsOptionsCategory name=\"Environment\" RegisteredName=\"Environment\"><ToolsOptionsSubCategory name=\"Documents\" RegisteredName=\"Documents\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ShowMiscFilesProject\">false</PropertyValue><PropertyValue name=\"AutoloadExternalChanges\">true</PropertyValue><PropertyValue name=\"CheckForConsistentLineEndings\">true</PropertyValue><PropertyValue name=\"SaveDocsAsUnicodeWhenDataLoss\">false</PropertyValue><PropertyValue name=\"InitializeOpenFileFromCurrentDocument\">true</PropertyValue><PropertyValue name=\"ReuseSavedActiveDocWindow\">false</PropertyValue><PropertyValue name=\"DetectFileChangesOutsideIDE\">true</PropertyValue><PropertyValue name=\"DontShowGlobalUndoChangeLossDialog\">true</PropertyValue><PropertyValue name=\"AllowEditingReadOnlyFiles\">true</PropertyValue><PropertyValue name=\"DocumentDockPreference\">0</PropertyValue><PropertyValue name=\"MiscFilesProjectSavesLastNItems\">0</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"FindAndReplace\" RegisteredName=\"FindAndReplace\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ShowWarningMessages\">true</PropertyValue><PropertyValue name=\"InitializeFromEditor\">true</PropertyValue><PropertyValue name=\"ShowMessageBoxes\">true</PropertyValue><PropertyValue name=\"HideWindowAfterMatchFromQuickFindReplace\">false</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"General\" RegisteredName=\"General\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"AnimationSpeed\">5</PropertyValue><PropertyValue name=\"RichClientExperienceOptions\">65535</PropertyValue><PropertyValue name=\"WindowMenuContainsNItems\">10</PropertyValue><PropertyValue name=\"CloseButtonActiveTabOnly\">true</PropertyValue><PropertyValue name=\"UseTitleCaseOnMenu\">true</PropertyValue><PropertyValue name=\"AutoAdjustExperience\">true</PropertyValue><PropertyValue name=\"Animations\">true</PropertyValue><PropertyValue name=\"AutohidePinActiveTabOnly\">false</PropertyValue><PropertyValue name=\"ShowStatusBar\">true</PropertyValue><PropertyValue name=\"MRUListContainsNItems\">10</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"ProjectsAndSolution\" RegisteredName=\"ProjectsAndSolution\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ProjectsLocation\">%vsspv_user_appdata%\\source\\repos</PropertyValue><PropertyValue name=\"PromptForRenameSymbol\">true</PropertyValue><PropertyValue name=\"TrackFileSelectionInExplorer\">false</PropertyValue><PropertyValue name=\"ShowOutputWindowBeforeBuild\">true</PropertyValue><PropertyValue name=\"OnRunWhenErrors\">4</PropertyValue><PropertyValue name=\"OnRunWhenOutOfDate\">1</PropertyValue><PropertyValue name=\"AlwaysShowSolutionNode\">true</PropertyValue><PropertyValue name=\"ProjectItemTemplatesLocation\">%vsspv_visualstudio_dir%\\Templates\\ItemTemplates</PropertyValue><PropertyValue name=\"OnlySaveStartupProjectsAndDependencies\">true</PropertyValue><PropertyValue name=\"ShowAdvancedBuildConfigurations\">true</PropertyValue><PropertyValue name=\"DefaultBehaviorForStartupProjects\">1</PropertyValue><PropertyValue name=\"OnRunOrPreview\">0</PropertyValue><PropertyValue name=\"MSBuildOutputVerbosity\">2</PropertyValue><PropertyValue name=\"ProjectTemplatesLocation\">%vsspv_visualstudio_dir%\\Templates\\ProjectTemplates</PropertyValue><PropertyValue name=\"ShowTaskListAfterBuild\">false</PropertyValue><PropertyValue name=\"ConcurrentBuilds\">8</PropertyValue><PropertyValue name=\"SaveNewProjects\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"RoamingSettings\" RegisteredName=\"RoamingSettings\" PackageName=\"Roaming Manager Package\"><PropertyValue name=\"SyncEditor\">true</PropertyValue><PropertyValue name=\"SyncAppearance\">true</PropertyValue><PropertyValue name=\"RoamingEnabled\">true</PropertyValue><PropertyValue name=\"SyncStartup\">true</PropertyValue><PropertyValue name=\"SyncAliases\">true</PropertyValue><PropertyValue name=\"Providers\"/><PropertyValue name=\"SyncKeyBindings\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"Startup\" RegisteredName=\"Startup\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"OnStartUp\">5</PropertyValue><PropertyValue name=\"StartPageRefreshDownloadedContent\">false</PropertyValue><PropertyValue name=\"StartPageRSSUrl\"/><PropertyValue name=\"StartPageRefreshInterval\">60</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"TaskList\" RegisteredName=\"TaskList\" PackageName=\"ErrorListPackage\"><PropertyValue name=\"ConfirmTaskDeletion\">false</PropertyValue><PropertyValue name=\"CommentTokens\" ArrayType=\"VT_BSTR\" ArrayElementCount=\"4\"><PropertyValue name=\"0\">HACK:2</PropertyValue><PropertyValue name=\"1\">TODO:2</PropertyValue><PropertyValue name=\"2\">UNDONE:2</PropertyValue><PropertyValue name=\"3\">UnresolvedMergeConflict:3</PropertyValue></PropertyValue><PropertyValue name=\"WarnOnAddingHiddenItem\">false</PropertyValue><PropertyValue name=\"DontShowFilePaths\">false</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"WebBrowser\" RegisteredName=\"WebBrowser\" PackageName=\"Visual Studio Web Browser Package\">\n\t\t\t\t<PropertyValue name=\"HomePage\">https://go.microsoft.com/fwlink/?LinkId=36593&amp;clcid=%VSSPV_LCID_HEX%</PropertyValue>\n\t\t\t\t<PropertyValue name=\"SearchPage\">https://go.microsoft.com/fwlink/?LinkId=36593&amp;clcid=%VSSPV_LCID_HEX%</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ViewSourceExternalProgram\">%systemroot%\\system32\\notepad.exe</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ViewSourceIn\">1</PropertyValue>\n\t\t\t</ToolsOptionsSubCategory></ToolsOptionsCategory><ToolsOptionsCategory name=\"Projects\" RegisteredName=\"Projects\"><ToolsOptionsSubCategory name=\"VBDefaults\" RegisteredName=\"VBDefaults\" PackageName=\"Visual Basic Project System\"><PropertyValue name=\"OptionCompare\">0</PropertyValue><PropertyValue name=\"OptionInfer\">1</PropertyValue><PropertyValue name=\"OptionStrict\">0</PropertyValue><PropertyValue name=\"OptionExplicit\">1</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"VCGeneral\" RegisteredName=\"VCGeneral\" PackageName=\"Visual C++ Project System Package\"><PropertyValue name=\"ExtensionsToInclude\">.cpp;.cxx;.cc;.c;.inl;.ipp;.h;.hh;.hpp;.hxx;.hm;.inc;.rc;.resx;.idl;.rc2;.def;.odl;.asm;.asmx;.xsd;.bin;.rgs;.html;.htm;.manifest</PropertyValue><PropertyValue name=\"EnableProjectCaching\">true</PropertyValue><PropertyValue name=\"ToolFileSearchPaths\"/><PropertyValue name=\"ShowEnvironmentInBuildLog\">false</PropertyValue><PropertyValue name=\"ExtensionsToHide\">.suo;.sln;.ncb;.sdf;.vcxproj;.csproj;.user;.vbproj;.scc;.vsscc;.vspscc;.old;.filters</PropertyValue><PropertyValue name=\"DefaultSolutionExplorerMode\">0</PropertyValue><PropertyValue name=\"BuildTiming\">false</PropertyValue><PropertyValue name=\"MaxConcurrentFileCompiles\">0</PropertyValue><PropertyValue name=\"BuildLogging\">true</PropertyValue></ToolsOptionsSubCategory></ToolsOptionsCategory><ToolsOptionsCategory name=\"TextEditor\" RegisteredName=\"TextEditor\"><ToolsOptionsSubCategory name=\"AllLanguages\" RegisteredName=\"AllLanguages\" PackageName=\"Text Management Package\"/><ToolsOptionsSubCategory name=\"Basic\" RegisteredName=\"Basic\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">false</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"Basic-Specific\" RegisteredName=\"Basic-Specific\" PackageName=\"Visual Basic Compiler Package\">\n\t\t\t\t<PropertyValue name=\"AutoComment\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"AutoEndInsert\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"AutoRequiredMemberInsert\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ClosedFileDiagnostics\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"DisplayLineSeparators\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"EnableHighlightReferences\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"EnableHighlightRelatedKeywords\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ExtractMethod_AllowMovingDeclaration\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ExtractMethod_DoNotPutOutOrRefOnStruct\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"Outlining\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"PrettyListing\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"Style_PreferIntrinsicPredefinedTypeKeywordInDeclaration\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"Style_PreferIntrinsicPredefinedTypeKeywordInMemberAccess\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"Style_QualifyMemberAccessWithThisOrMe\">false</PropertyValue>\n\t\t\t</ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"C/C++\" RegisteredName=\"C/C++\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">true</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">true</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"C/C++ Specific\" RegisteredName=\"C/C++ Specific\" PackageName=\"Visual C++ Language Manager Package\"><PropertyValue name=\"SpaceAroundBinaryOperator\">2</PropertyValue><PropertyValue name=\"SpaceAfterSemicolon\">true</PropertyValue><PropertyValue name=\"PreserveInitListSpace\">true</PropertyValue><PropertyValue name=\"SpaceBeforeFunctionParenthesis2\">1</PropertyValue><PropertyValue name=\"NewlineFunctionBrace\">2</PropertyValue><PropertyValue name=\"IndentBlockContents\">true</PropertyValue><PropertyValue name=\"DisableCurrentItemSelection\">true</PropertyValue><PropertyValue name=\"DisableAggressiveMemberList\">false</PropertyValue><PropertyValue name=\"MaximumCachedTranslationUnits\">7</PropertyValue><PropertyValue name=\"ReferencesHideInCommentResults\">true</PropertyValue><PropertyValue name=\"ReferencesHideUnconfirmedResults\">true</PropertyValue><PropertyValue name=\"SpaceBeforeInitListBrace\">false</PropertyValue><PropertyValue name=\"SpaceWithinCastParentheses\">false</PropertyValue><PropertyValue name=\"NewlineInitListBrace\">0</PropertyValue><PropertyValue name=\"IndentCaseContents\">false</PropertyValue><PropertyValue name=\"RefactorScope\">2</PropertyValue><PropertyValue name=\"RecreateDatabase\">false</PropertyValue><PropertyValue name=\"MaximumFindReferencesThreads\">7</PropertyValue><PropertyValue name=\"DisableHLSLIntelliSense\">true</PropertyValue><PropertyValue name=\"MemberListFilterPredictive\">true</PropertyValue><PropertyValue name=\"SpaceAroundConditionalOperator\">2</PropertyValue><PropertyValue name=\"SpaceWithinInitListBraces\">true</PropertyValue><PropertyValue name=\"SpaceBeforeLambdaParenthesis\">false</PropertyValue><PropertyValue name=\"NewlineScopeBrace\">true</PropertyValue><PropertyValue name=\"NewlineEmptyFunctionCloseBrace\">false</PropertyValue><PropertyValue name=\"DefaultFormattingStyle\">0</PropertyValue><PropertyValue name=\"EnterOutliningModeWhenFilesOpen\">true</PropertyValue><PropertyValue name=\"DisablePreLoadNavigateToCache\">false</PropertyValue><PropertyValue name=\"AutoTuneMaximumFindReferencesThreads\">true</PropertyValue><PropertyValue name=\"PreserveBlock\">1</PropertyValue><PropertyValue name=\"SpaceBeforeConstructorColon\">true</PropertyValue><PropertyValue name=\"SpaceBeforeBlockBrace\">true</PropertyValue><PropertyValue name=\"NewlineKeywordWhile\">false</PropertyValue><PropertyValue name=\"NewlineLambdaBrace\">0</PropertyValue><PropertyValue name=\"EnableExpandPrecedence\">false</PropertyValue><PropertyValue name=\"AddSemicolonForClassTypes\">true</PropertyValue><PropertyValue name=\"DisableReferenceHighlighting\">true</PropertyValue><PropertyValue name=\"DoNotWarnIfFallbackLocationUsed\">false</PropertyValue><PropertyValue name=\"DisableDatabaseImplicitAutoCleanup\">false</PropertyValue><PropertyValue name=\"DisableSharedIntelliSense\">false</PropertyValue><PropertyValue name=\"MemberListCommitCharacters\">{}[]().,:;+-*/%&amp;|^!=&lt;&gt;?@#\\ </PropertyValue><PropertyValue name=\"EnableSingleFileISense\">true</PropertyValue><PropertyValue name=\"SpaceBeforeFunctionParenthesis\">false</PropertyValue><PropertyValue name=\"NewlineNamespaceBrace\">2</PropertyValue><PropertyValue name=\"EnableClangFormatSupport\">true</PropertyValue><PropertyValue name=\"AutoFormatOnSemicolon\">true</PropertyValue><PropertyValue name=\"RenameRenameStrings\">false</PropertyValue><PropertyValue name=\"EnableProjectCaching\">false</PropertyValue><PropertyValue name=\"DisableInactiveCodeOpacity\">false</PropertyValue><PropertyValue name=\"DisableDatabaseUpdates\">false</PropertyValue><PropertyValue name=\"UseForwardSlashForIncludeAutoComplete\">true</PropertyValue><PropertyValue name=\"AutoTuneMaximumCachedTranslationUnits\">true</PropertyValue><PropertyValue name=\"DisableIntelliSenseUpdating\">false</PropertyValue><PropertyValue name=\"HideExperimentalAd\">true</PropertyValue><PropertyValue name=\"HighlightMatchingTokens\">true</PropertyValue><PropertyValue name=\"NewlineControlBlockBrace\">2</PropertyValue><PropertyValue name=\"IndentNamespaceContents\">true</PropertyValue><PropertyValue name=\"IndentLambdaBraces\">false</PropertyValue><PropertyValue name=\"CompleteSlashStar\">true</PropertyValue><PropertyValue name=\"FallbackLocation\"/><PropertyValue name=\"DisableErrorReporting\">false</PropertyValue><PropertyValue name=\"ReferencesHideFailedResults\">false</PropertyValue><PropertyValue name=\"SpaceBeforeComma\">false</PropertyValue><PropertyValue name=\"IndentAccessSpecifiers\">false</PropertyValue><PropertyValue name=\"UseCustomClangFormatExe\">false</PropertyValue><PropertyValue name=\"DisableBrowsingUpToDateCheck\">true</PropertyValue><PropertyValue name=\"DisableDatabaseImplicitFiles\">false</PropertyValue><PropertyValue name=\"AutoPchCacheQuota\">5120</PropertyValue><PropertyValue name=\"MemberListDotToArrow\">false</PropertyValue><PropertyValue name=\"SuspendNewSingleFileISenseDuringDebugging\">false</PropertyValue><PropertyValue name=\"SpaceAroundAssignmentOperator\">2</PropertyValue><PropertyValue name=\"ClangFormatExePath\"/><PropertyValue name=\"DontShowClangFormatFileFound\">false</PropertyValue><PropertyValue name=\"RenameRenameUnconfirmed\">false</PropertyValue><PropertyValue name=\"DisableReferencesResolving\">false</PropertyValue><PropertyValue name=\"HideExternalDependenciesFolders\">false</PropertyValue><PropertyValue name=\"DisableExternalDependenciesFolders\">false</PropertyValue><PropertyValue name=\"SmartMemberListCommitOnEnter\">false</PropertyValue><PropertyValue name=\"DisableIntelliSense\">false</PropertyValue><PropertyValue name=\"IncludeHintsSuppressGoogleTest\">false</PropertyValue><PropertyValue name=\"ShowSingleFileISenseErrorsInTaskList\">false</PropertyValue><PropertyValue name=\"RemoveSpaceBeforeSemicolon\">true</PropertyValue><PropertyValue name=\"SpaceBetweenEmptyLambdaBrackets\">false</PropertyValue><PropertyValue name=\"SpaceBeforeControlBlockParenthesis\">true</PropertyValue><PropertyValue name=\"SpaceBetweenEmptyFunctionParentheses\">false</PropertyValue><PropertyValue name=\"PreserveParameterIndentation\">false</PropertyValue><PropertyValue name=\"AutomaticOutliningOfStatementBlocks\">true</PropertyValue><PropertyValue name=\"MemberListFilterHeuristic\">false</PropertyValue><PropertyValue name=\"MemberListFilterInaccessible\">true</PropertyValue><PropertyValue name=\"SpaceBeforeEmptyBracket\">false</PropertyValue><PropertyValue name=\"SpaceWithinExpressionParentheses\">false</PropertyValue><PropertyValue name=\"AutoFormatOnPaste2\">1</PropertyValue><PropertyValue name=\"AutoFormatOnPaste\">true</PropertyValue><PropertyValue name=\"RenameRenameComments\">false</PropertyValue><PropertyValue name=\"LoggingLevel\">5</PropertyValue><PropertyValue name=\"EnableSingleFileISenseSquiggles\">false</PropertyValue><PropertyValue name=\"TrimSpaceUnaryOperator\">true</PropertyValue><PropertyValue name=\"TrimSpaceAroundScope\">true</PropertyValue><PropertyValue name=\"GroupBrackets\">true</PropertyValue><PropertyValue name=\"SpaceBetweenEmptyBrackets\">false</PropertyValue><PropertyValue name=\"SpaceWithinControlBlockParentheses\">false</PropertyValue><PropertyValue name=\"NewlineTypeBrace\">2</PropertyValue><PropertyValue name=\"DisableCreateDeclDefnScan\">false</PropertyValue><PropertyValue name=\"RenameRenameInactive\">false</PropertyValue><PropertyValue name=\"ColorizeInactiveBlocksDifferently\">true</PropertyValue><PropertyValue name=\"MemberListDotToArrow_1\">true</PropertyValue><PropertyValue name=\"MemberListFilterMode\">3</PropertyValue><PropertyValue name=\"SpaceAfterCastParenthesis\">false</PropertyValue><PropertyValue name=\"RenameSkipPreviewIfConfirmed\">false</PropertyValue><PropertyValue name=\"AlwaysUseFallbackLocation\">false</PropertyValue><PropertyValue name=\"RescanSolutionInterval\">60</PropertyValue><PropertyValue name=\"DisableDatabaseAutoUpdates\">false</PropertyValue><PropertyValue name=\"DisableSquiggles\">false</PropertyValue><PropertyValue name=\"EnableQuickInfoToolTips\">true</PropertyValue><PropertyValue name=\"IncludeHintsSuppress\">false</PropertyValue><PropertyValue name=\"IndentBraces\">false</PropertyValue><PropertyValue name=\"PreserveCommentIndentation\">false</PropertyValue><PropertyValue name=\"IndentPreprocessor\">2</PropertyValue><PropertyValue name=\"IndentCaseBraces\">false</PropertyValue><PropertyValue name=\"AlignParameters\">true</PropertyValue><PropertyValue name=\"AutoFormatOnBraceCompletion\">true</PropertyValue><PropertyValue name=\"AutoFormatOnClosingBrace\">true</PropertyValue><PropertyValue name=\"EnableChangeSignature\">false</PropertyValue><PropertyValue name=\"EnableExtractFunction\">false</PropertyValue><PropertyValue name=\"EnableExpandScopes\">false</PropertyValue><PropertyValue name=\"CompleteParensInRawString\">true</PropertyValue><PropertyValue name=\"InactiveCodeOpacityPercent\">55</PropertyValue><PropertyValue name=\"InactivePlatformIntelliSenseLimit\">1</PropertyValue><PropertyValue name=\"DisableSemanticColoring\">false</PropertyValue><PropertyValue name=\"ReferencesHideInStringResults\">true</PropertyValue><PropertyValue name=\"ReferencesHidePPIf0Results\">true</PropertyValue><PropertyValue name=\"SpaceBeforeInheritanceColon\">true</PropertyValue><PropertyValue name=\"NewlineKeywordCatch\">true</PropertyValue><PropertyValue name=\"NewlineKeywordElse\">true</PropertyValue><PropertyValue name=\"AutoIndentOnTab\">true</PropertyValue><PropertyValue name=\"IndentCaseLabels\">false</PropertyValue><PropertyValue name=\"ClangFormatExecution\">1</PropertyValue><PropertyValue name=\"ReferencesHideDisconfirmedResults\">true</PropertyValue><PropertyValue name=\"IncludeHintsSuppressBoostTest\">false</PropertyValue><PropertyValue name=\"SpaceWithinLambdaBrackets\">false</PropertyValue><PropertyValue name=\"SpaceWithinBrackets\">false</PropertyValue><PropertyValue name=\"RenameSearchComments\">true</PropertyValue><PropertyValue name=\"AutomaticOutliningOfPragmaRegions\">true</PropertyValue><PropertyValue name=\"EnableSQLiteStoreEngine\">true</PropertyValue><PropertyValue name=\"DisableAutoPch\">false</PropertyValue><PropertyValue name=\"DisableMemberListKeywords\">false</PropertyValue><PropertyValue name=\"EnumerateCommentTasks\">true</PropertyValue><PropertyValue name=\"SpaceAfterComma\">true</PropertyValue><PropertyValue name=\"SpaceBetweenEmptyBraces\">false</PropertyValue><PropertyValue name=\"IndentGotoLabels\">1</PropertyValue><PropertyValue name=\"RenameSearchStrings\">true</PropertyValue><PropertyValue name=\"RenameShowPreview\">false</PropertyValue><PropertyValue name=\"DisableDatabase\">false</PropertyValue><PropertyValue name=\"DisableIntelliSenseErrorsInErrorList\">false</PropertyValue><PropertyValue name=\"MemberListCommitAggressive\">false</PropertyValue><PropertyValue name=\"DisableMemberListExpansions\">false</PropertyValue><PropertyValue name=\"LoggingFilter\">0</PropertyValue><PropertyValue name=\"SpaceBeforeBracket\">false</PropertyValue><PropertyValue name=\"SpaceWithinFunctionParentheses\">false</PropertyValue><PropertyValue name=\"NewlineEmptyTypeCloseBrace\">false</PropertyValue><PropertyValue name=\"IndentationReference\">2</PropertyValue><PropertyValue name=\"DisableIncludeAutoComplete\">false</PropertyValue><PropertyValue name=\"EnableLogging\">false</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"CSS\" RegisteredName=\"CSS\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"CSharp\" RegisteredName=\"CSharp\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"CSharp-Specific\" RegisteredName=\"CSharp-Specific\" PackageName=\"CSharpPackage\"><PropertyValue name=\"Style_PreferExpressionBodiedConstructors\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_UseVarWhenDeclaringLocals\">0</PropertyValue><PropertyValue name=\"Space_AroundBinaryOperator\">1</PropertyValue><PropertyValue name=\"NewLines_QueryExpression_EachClause\">1</PropertyValue><PropertyValue name=\"Formatting_TriggerOnPaste\">1</PropertyValue><PropertyValue name=\"Style_UseImplicitTypeWhereApparent\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferInferredTupleNames\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_QualifyMethodAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferIntrinsicPredefinedTypeKeywordInDeclaration_CodeStyle\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"ExtractMethod_DoNotPutOutOrRefOnStruct\">1</PropertyValue><PropertyValue name=\"AutoInsertAsteriskForNewLinesOfBlockComments\">0</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedAccessors\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedOperators\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferCoalesceExpression\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"NewLines_Braces_Method\">1</PropertyValue><PropertyValue name=\"HighlightReferences\">0</PropertyValue><PropertyValue name=\"Style_PreferPatternMatchingOverIsWithCastCheck\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"AddImport_SuggestForTypesInReferenceAssemblies\">0</PropertyValue><PropertyValue name=\"InsertNewlineOnEnterWithWholeWord\">0</PropertyValue><PropertyValue name=\"Indent_CaseLabels\">1</PropertyValue><PropertyValue name=\"Formatting_TriggerOnBlockCompletion\">1</PropertyValue><PropertyValue name=\"EnableHighlightRelatedKeywords\">1</PropertyValue><PropertyValue name=\"Style_PreferInlinedVariableDeclaration\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinOtherParentheses\">0</PropertyValue><PropertyValue name=\"NewLines_Braces_ControlFlow\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_AnonymousMethod\">1</PropertyValue><PropertyValue name=\"ExtractMethod_AllowMovingDeclaration\">0</PropertyValue><PropertyValue name=\"HighlightMatchingPortionsOfCompletionListItems\">1</PropertyValue><PropertyValue name=\"BringUpOnIdentifier\">1</PropertyValue><PropertyValue name=\"Wrapping_KeepStatementsOnSingleLine\">1</PropertyValue><PropertyValue name=\"Style_PreferExplicitTupleNames\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Space_AfterBasesColon\">1</PropertyValue><PropertyValue name=\"EnterKeyBehavior\">0</PropertyValue><PropertyValue name=\"Indent_Braces\">0</PropertyValue><PropertyValue name=\"DisplayLineSeparators\">0</PropertyValue><PropertyValue name=\"Wrapping_IgnoreSpacesAroundVariableDeclaration\">0</PropertyValue><PropertyValue name=\"Style_PreferPatternMatchingOverAsWithNullCheck\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferConditionalDelegateCall\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_UseImplicitTypeForIntrinsicTypes\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinMethodCallParentheses\">0</PropertyValue><PropertyValue name=\"Space_AfterCast\">0</PropertyValue><PropertyValue name=\"AddImport_SuggestForTypesInNuGetPackages\">0</PropertyValue><PropertyValue name=\"SortUsings_PlaceSystemFirst\">0</PropertyValue><PropertyValue name=\"WarnOnBuildErrors\">0</PropertyValue><PropertyValue name=\"Style_QualifyEventAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_NamingPreferences\">&lt;NamingPreferencesInfo SerializationVersion=\"4\"&gt;\n  &lt;SymbolSpecifications&gt;\n    &lt;SymbolSpecification ID=\"5c545a62-b14d-460a-88d8-e936c0a39316\" Name=\"Класс\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Class&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"23d856b4-5089-4405-83ce-749aada99153\" Name=\"Интерфейс\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Interface&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"d1796e78-ff66-463f-8576-eb46416060c0\" Name=\"Структура\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Struct&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"d8af8dc6-1ade-441d-9947-8946922e198a\" Name=\"Перечисление\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Enum&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"408a3347-b908-4b54-a954-1355e64c1de3\" Name=\"Делегат\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Delegate&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"830657f6-e7e5-4830-b328-f109d3b6c165\" Name=\"Событие\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Event&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"390caed4-f0a9-42bb-adbb-b44c4a302a22\" Name=\"Метод\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"af410767-f189-47c6-b140-aeccf1ff242e\" Name=\"Частный метод\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"8076757e-6a4a-47f1-9b4b-ae8a3284e987\" Name=\"Абстрактный метод\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList&gt;\n        &lt;ModifierKind&gt;IsAbstract&lt;/ModifierKind&gt;\n      &lt;/RequiredModifierList&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"16133061-a8e7-4392-92c3-1d93cd54c218\" Name=\"Статический метод\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList&gt;\n        &lt;ModifierKind&gt;IsStatic&lt;/ModifierKind&gt;\n      &lt;/RequiredModifierList&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"da6a2919-5aa6-4ad1-a24d-576776ed3974\" Name=\"Свойство\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Property&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"b24a91ce-3501-4799-b6df-baf044156c83\" Name=\"Открытое или защищенное поле\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Field&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"70af42cb-1741-4027-969c-9edc4877d965\" Name=\"Статическое поле\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Field&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList&gt;\n        &lt;ModifierKind&gt;IsStatic&lt;/ModifierKind&gt;\n      &lt;/RequiredModifierList&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"10790aa6-0a0b-432d-a52d-d252ca92302b\" Name=\"Частное или внутреннее поле\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Field&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"ac995be4-88de-4771-9dcc-a456a7c02d89\" Name=\"Частное или внутреннее статическое поле\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Field&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList&gt;\n        &lt;ModifierKind&gt;IsStatic&lt;/ModifierKind&gt;\n      &lt;/RequiredModifierList&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"2c07f5bf-bc81-4c2b-82b4-ae9b3ffd0ba4\" Name=\"Типы\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Class&lt;/TypeKind&gt;\n        &lt;TypeKind&gt;Struct&lt;/TypeKind&gt;\n        &lt;TypeKind&gt;Interface&lt;/TypeKind&gt;\n        &lt;TypeKind&gt;Enum&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"5f3ddba1-279f-486c-801e-5c097c36dd85\" Name=\"Не являющиеся полем члены\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Property&lt;/SymbolKind&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n        &lt;SymbolKind&gt;Event&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n  &lt;/SymbolSpecifications&gt;\n  &lt;NamingStyles&gt;\n    &lt;NamingStyle ID=\"87e7c501-9948-4b53-b1eb-a6cbe918feee\" Name=\"ВсеЧастиСПрописнойБуквы\" Prefix=\"\" Suffix=\"\" WordSeparator=\"\" CapitalizationScheme=\"PascalCase\" /&gt;\n    &lt;NamingStyle ID=\"1ecc5eb6-b5fc-49a5-a9f1-a980f3e48c92\" Name=\"Начинается с I\" Prefix=\"I\" Suffix=\"\" WordSeparator=\"\" CapitalizationScheme=\"PascalCase\" /&gt;\n  &lt;/NamingStyles&gt;\n  &lt;NamingRules&gt;\n    &lt;SerializableNamingRule SymbolSpecificationID=\"23d856b4-5089-4405-83ce-749aada99153\" NamingStyleID=\"1ecc5eb6-b5fc-49a5-a9f1-a980f3e48c92\" EnforcementLevel=\"Info\" /&gt;\n    &lt;SerializableNamingRule SymbolSpecificationID=\"2c07f5bf-bc81-4c2b-82b4-ae9b3ffd0ba4\" NamingStyleID=\"87e7c501-9948-4b53-b1eb-a6cbe918feee\" EnforcementLevel=\"Info\" /&gt;\n    &lt;SerializableNamingRule SymbolSpecificationID=\"5f3ddba1-279f-486c-801e-5c097c36dd85\" NamingStyleID=\"87e7c501-9948-4b53-b1eb-a6cbe918feee\" EnforcementLevel=\"Info\" /&gt;\n  &lt;/NamingRules&gt;\n&lt;/NamingPreferencesInfo&gt;</PropertyValue><PropertyValue name=\"ShowSnippets\">1</PropertyValue><PropertyValue name=\"ShowKeywords\">0</PropertyValue><PropertyValue name=\"Space_WithinExpressionParentheses\">0</PropertyValue><PropertyValue name=\"Space_InControlFlowConstruct\">1</PropertyValue><PropertyValue name=\"NewLines_Keywords_Catch\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_ObjectInitializer\">1</PropertyValue><PropertyValue name=\"NewLines_AnonymousTypeInitializer_EachMember\">1</PropertyValue><PropertyValue name=\"Formatting_TriggerOnStatementCompletion\">1</PropertyValue><PropertyValue name=\"CSharpClosedFileDiagnostics\">-1</PropertyValue><PropertyValue name=\"ClosedFileDiagnostics\">-1</PropertyValue><PropertyValue name=\"Style_PreferBraces\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferIntrinsicPredefinedTypeKeywordInMemberAccess_CodeStyle\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Space_BetweenEmptyMethodDeclarationParentheses\">0</PropertyValue><PropertyValue name=\"NewLines_Keywords_Finally\">1</PropertyValue><PropertyValue name=\"Indent_UnindentLabels\">1</PropertyValue><PropertyValue name=\"Style_PreferReadonly\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferNullPropagation\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"NewLines_ObjectInitializer_EachMember\">1</PropertyValue><PropertyValue name=\"NewLines_Keywords_Else\">1</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedIndexers\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferInferredAnonymousTypeMemberNames\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferObjectInitializer\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinMethodDeclarationParentheses\">0</PropertyValue><PropertyValue name=\"Space_BetweenEmptyMethodCallParentheses\">0</PropertyValue><PropertyValue name=\"Space_BeforeSemicolonsInForStatement\">0</PropertyValue><PropertyValue name=\"Space_BeforeComma\">0</PropertyValue><PropertyValue name=\"Space_AfterMethodCallName\">0</PropertyValue><PropertyValue name=\"Space_AfterComma\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_Property\">1</PropertyValue><PropertyValue name=\"Wrapping_IgnoreSpacesAroundBinaryOperators\">0</PropertyValue><PropertyValue name=\"Style_PreferCollectionInitializer\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Space_BeforeBasesColon\">1</PropertyValue><PropertyValue name=\"Space_AfterMethodDeclarationName\">0</PropertyValue><PropertyValue name=\"Space_AfterDot\">0</PropertyValue><PropertyValue name=\"RenameTrackingPreview\">1</PropertyValue><PropertyValue name=\"AutoComment\">1</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedProperties\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"NewLines_Braces_Type\">1</PropertyValue><PropertyValue name=\"SnippetsBehavior\">2</PropertyValue><PropertyValue name=\"EnterOutliningModeOnOpen\">1</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedMethods\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferThrowExpression\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_QualifyPropertyAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinSquares\">0</PropertyValue><PropertyValue name=\"NewLines_Braces_Accessor\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_LambdaExpressionBody\">1</PropertyValue><PropertyValue name=\"Style_UseImplicitTypeWherePossible\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_QualifyFieldAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinCastParentheses\">0</PropertyValue><PropertyValue name=\"Space_AfterSemicolonsInForStatement\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_AnonymousTypeInitializer\">1</PropertyValue><PropertyValue name=\"Indent_FlushLabelsLeft\">0</PropertyValue><PropertyValue name=\"Indent_CaseContents\">1</PropertyValue><PropertyValue name=\"Wrapping_PreserveSingleLine\">1</PropertyValue><PropertyValue name=\"Space_BetweenEmptySquares\">0</PropertyValue><PropertyValue name=\"Space_BeforeOpenSquare\">0</PropertyValue><PropertyValue name=\"Space_BeforeDot\">0</PropertyValue><PropertyValue name=\"RenameSmartTagEnabled\">1</PropertyValue><PropertyValue name=\"Refactoring_Verification_Enabled\">0</PropertyValue><PropertyValue name=\"Indent_CaseContentsWhenBlock\">1</PropertyValue><PropertyValue name=\"Indent_BlockContents\">1</PropertyValue><PropertyValue name=\"ShowCompletionItemFilters\">1</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"CoffeeScript\" RegisteredName=\"CoffeeScript\" PackageName=\"Text Management Package\">\n\t\t\t\t<PropertyValue name=\"AutoListMembers\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"AutoListParams\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"BraceCompletion\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"IndentSize\">4</PropertyValue>\n\t\t\t\t<PropertyValue name=\"IndentStyle\">2</PropertyValue>\n\t\t\t\t<PropertyValue name=\"InsertTabs\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"OverviewWidth\">58</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowAnnotations\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowCaretPosition\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowChanges\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowErrors\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowLineNumbers\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowMarks\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowNavigationBar\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowPreview\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"TabSize\">4</PropertyValue>\n\t\t\t\t<PropertyValue name=\"UseMapMode\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"VirtualSpace\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"WordWrap\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue>\n\t\t\t</ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"General\" RegisteredName=\"General\" PackageName=\"Text Management Package\"><PropertyValue name=\"DragNDropTextEditing\">false</PropertyValue><PropertyValue name=\"HighlightCurrentLine\">true</PropertyValue><PropertyValue name=\"EditorEmulation\">0</PropertyValue><PropertyValue name=\"DetectUTF8WithoutSignature\">true</PropertyValue><PropertyValue name=\"TrackChanges\">true</PropertyValue><PropertyValue name=\"UndoCaretActions\">false</PropertyValue><PropertyValue name=\"SelectionMargin\">true</PropertyValue><PropertyValue name=\"GoToAnchorAfterEscape\">false</PropertyValue><PropertyValue name=\"AutoDelimiterHighlighting\">true</PropertyValue><PropertyValue name=\"MarginIndicatorBar\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"HTML\" RegisteredName=\"HTML\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"HTML Specific\" RegisteredName=\"HTML Specific\" PackageName=\"Visual Studio HTM Editor Package\"><PropertyValue name=\"StyleApplicationOverlayColor\">16244681</PropertyValue><PropertyValue name=\"LayoutResizeOverlayColor\">0</PropertyValue><PropertyValue name=\"LayoutVisibleBorderColor\">13027014</PropertyValue><PropertyValue name=\"LayoutUiActivatedBorderColor\">13003057</PropertyValue><PropertyValue name=\"LayoutOffsetColor\">16487691</PropertyValue><PropertyValue name=\"SpacerCellToolColor\">14413810</PropertyValue><PropertyValue name=\"ShowTagToolbar\">0</PropertyValue><PropertyValue name=\"RulerAndGridShowRuler\">0</PropertyValue><PropertyValue name=\"LayoutTableToolColor\">3575607</PropertyValue><PropertyValue name=\"HtmlIndent\">2</PropertyValue><PropertyValue name=\"DisableDesignView\">0</PropertyValue><PropertyValue name=\"MarkupValidationWarningLevel\">2</PropertyValue><PropertyValue name=\"ClientAttrCasing\">2</PropertyValue><PropertyValue name=\"AttrValueNotQuoted\">0</PropertyValue><PropertyValue name=\"CssPositionDesignMode\">2</PropertyValue><PropertyValue name=\"LayerBackgroundLabelColor\">15724527</PropertyValue><PropertyValue name=\"AutoThumbnailBorder\">1</PropertyValue><PropertyValue name=\"JsEditorTimeout\">50</PropertyValue><PropertyValue name=\"ManualDtp\">243</PropertyValue><PropertyValue name=\"StyleApplicationOverlayBackgroundColor\">15577469</PropertyValue><PropertyValue name=\"LayoutSiteSelectedBorderColor\">0</PropertyValue><PropertyValue name=\"CssUseHtmlForImageSize\">0</PropertyValue><PropertyValue name=\"CssBackgroundDesignMode\">2</PropertyValue><PropertyValue name=\"HtmlGifInterlaced\">0</PropertyValue><PropertyValue name=\"JsExternalTimeout\">2000</PropertyValue><PropertyValue name=\"AutoInsertCloseTag\">-1</PropertyValue><PropertyValue name=\"InsertAttrValueQuotesFormatting\">-1</PropertyValue><PropertyValue name=\"WebPartColor\">7257087</PropertyValue><PropertyValue name=\"TemplateColor\">12383999</PropertyValue><PropertyValue name=\"RulerAndGridShowGrid\">0</PropertyValue><PropertyValue name=\"ParentRegionColor\">128</PropertyValue><PropertyValue name=\"LargePictureFileType\">jpg</PropertyValue><PropertyValue name=\"FormatHTMLOnPaste\">0</PropertyValue><PropertyValue name=\"WrapTagLength\">80</PropertyValue><PropertyValue name=\"SmallPictureFileType\">gif</PropertyValue><PropertyValue name=\"HtmlMargin\">80</PropertyValue><PropertyValue name=\"JsFailsafeTimeout\">15000</PropertyValue><PropertyValue name=\"RequireAngleBracketForTagIntellisense\">-1</PropertyValue><PropertyValue name=\"RulerAndGridGridSpacing\">20</PropertyValue><PropertyValue name=\"EditorOptionFlags\">8388616</PropertyValue><PropertyValue name=\"JsMaxCacheFiles\">5</PropertyValue><PropertyValue name=\"IdleYield\">-1</PropertyValue><PropertyValue name=\"IdleParseDelay\">750</PropertyValue><PropertyValue name=\"InsertAttrValueQuotesTyping\">-1</PropertyValue><PropertyValue name=\"LayoutResizeOverlayBackgroundColor\">13172735</PropertyValue><PropertyValue name=\"LayoutPaddingOverlayColor\">16765887</PropertyValue><PropertyValue name=\"CssBorderDesignMode\">2</PropertyValue><PropertyValue name=\"RulerAndGridSnapToGrid\">0</PropertyValue><PropertyValue name=\"LayerLabelTextColor\">0</PropertyValue><PropertyValue name=\"HtmlDoctypeValidation\">-1</PropertyValue><PropertyValue name=\"LoadToolboxOnIdle\">-1</PropertyValue><PropertyValue name=\"ClientTagNotLowerCase\">0</PropertyValue><PropertyValue name=\"RestrictionsBOMFlag\">4294967295</PropertyValue><PropertyValue name=\"HtmlRightMarginRule\">2</PropertyValue><PropertyValue name=\"HtmlBreakInTags\">255</PropertyValue><PropertyValue name=\"AutoThumbnailSize\">100</PropertyValue><PropertyValue name=\"HTMLSortAttributes\">1</PropertyValue><PropertyValue name=\"LayoutMarginOverlayColor\">12895452</PropertyValue><PropertyValue name=\"CssPageDesignMode\">1</PropertyValue><PropertyValue name=\"RulerAndGridSnapDistance\">5</PropertyValue><PropertyValue name=\"RulerAndGridGridLine\">2</PropertyValue><PropertyValue name=\"MasterPageDesignOutlineColor\">16760311</PropertyValue><PropertyValue name=\"LayoutCellToolColor\">16750848</PropertyValue><PropertyValue name=\"AutoThumbnailBorderSize\">2</PropertyValue><PropertyValue name=\"MarkupValidationErrorLevel\">1</PropertyValue><PropertyValue name=\"VerticalSplitView\">0</PropertyValue><PropertyValue name=\"WrapTag\">0</PropertyValue><PropertyValue name=\"ServerAttrCasing\">3</PropertyValue><PropertyValue name=\"ServerTagCasing\">3</PropertyValue><PropertyValue name=\"TagNotWellFormed\">0</PropertyValue><PropertyValue name=\"CssUseShorthands\">1</PropertyValue><PropertyValue name=\"CssListDesignMode\">2</PropertyValue><PropertyValue name=\"MasterPageParentRegionColor\">8650752</PropertyValue><PropertyValue name=\"HtmlJpegCompressions\">0</PropertyValue><PropertyValue name=\"IdleOutlineDelay\">1800</PropertyValue><PropertyValue name=\"InCSS\">-1</PropertyValue><PropertyValue name=\"LayoutMarginOverlayBackgroundColor\">14145511</PropertyValue><PropertyValue name=\"CssMarginsDesignMode\">2</PropertyValue><PropertyValue name=\"LayoutPaddingOverlayBackgroundColor\">16768975</PropertyValue><PropertyValue name=\"HtmlGifTransparent\">0</PropertyValue><PropertyValue name=\"EditableColor\">7257087</PropertyValue><PropertyValue name=\"AutoThumbnailChisel\">0</PropertyValue><PropertyValue name=\"JsJQueryTemplateTypeNames\">text/html;text/x-jquery-tmpl;text/template;text/x-handlebars;text/x-handlebars-template;text/x-jsrender</PropertyValue><PropertyValue name=\"MasterPageContentRegionColor\">16739258</PropertyValue><PropertyValue name=\"LayerHandleBackgroundColor\">16777215</PropertyValue><PropertyValue name=\"LayerHandleColor\">0</PropertyValue><PropertyValue name=\"HtmlJpegQuality\">90</PropertyValue><PropertyValue name=\"TargetFriendlyName\">HTML5</PropertyValue><PropertyValue name=\"ValidateDeprecated\">0</PropertyValue><PropertyValue name=\"ShowAspNonVisualElements\">1</PropertyValue><PropertyValue name=\"CssReuseUserClasses\">0</PropertyValue><PropertyValue name=\"IdleSelectionSyncDelay\">500</PropertyValue><PropertyValue name=\"ShowErrors\">-1</PropertyValue><PropertyValue name=\"ClientTagCasing\">2</PropertyValue><PropertyValue name=\"RulerAndGridUnit\">0</PropertyValue><PropertyValue name=\"RulerAndGridGridColor\">11119017</PropertyValue><PropertyValue name=\"HtmlIndentTabs\">0</PropertyValue><PropertyValue name=\"StartPageView\">1</PropertyValue><PropertyValue name=\"CssIndentTabs\">0</PropertyValue><PropertyValue name=\"AutoThumbnailType\">0</PropertyValue><PropertyValue name=\"AutoFormAroundControls\">1</PropertyValue><PropertyValue name=\"ShowVisualAids\">1</PropertyValue><PropertyValue name=\"CssTextDesignMode\">2</PropertyValue><PropertyValue name=\"WebPartZoneColor\">16750848</PropertyValue><PropertyValue name=\"IdleMainLoopDelay\">1200</PropertyValue><PropertyValue name=\"OutlineHTMLOnFileOpen\">-1</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"HTMLX\" RegisteredName=\"HTMLX\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"JSON\" RegisteredName=\"JSON\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">2</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">2</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"JavaScript\" RegisteredName=\"JavaScript\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"JavaScript Specific\" RegisteredName=\"JavaScript Specific\" PackageName=\"Microsoft.VisualStudio.JSLS.JavaScriptLanguageServicePackage, Microsoft.VisualStudio.JSLS, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n\t\t\t\t<PropertyValue name=\"DownloadRemoteReferences\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"FormatCompletedBlockOnRightCurlyBrace\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"FormatCompletedLineOnEnter\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"FormatCompletedStatementOnSemicolon\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"FormatOnPaste\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ImplicitReferencesString\"></PropertyValue>\n\t\t\t\t<PropertyValue name=\"InsertSpaceAfterCommaDelimiter\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"InsertSpaceAfterFunctionKeywordForAnonymousFunctions\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"InsertSpaceAfterKeywordsInControlFlowStatements\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"InsertSpaceAfterSemicolonInForStatements\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"InsertSpaceBeforeAndAfterBinaryOperators\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"OnlyUseTaborEnterToCommit\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"PlaceOpenBraceOnNewLineForControlBlocks\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"PlaceOpenBraceOnNewLineForFunctions\">false</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowErrorsAsWarnings\">true</PropertyValue>\n\t\t\t\t<PropertyValue name=\"ShowSyntaxErrors\">true</PropertyValue>\n\t\t\t</ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"LESS\" RegisteredName=\"LESS\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"PlainText\" RegisteredName=\"PlainText\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">1</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">true</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"ResJSON Resource\" RegisteredName=\"ResJSON Resource\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">1</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">true</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"SCSS\" RegisteredName=\"SCSS\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"T-SQL90\" RegisteredName=\"T-SQL90\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">1</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">true</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"XAML\" RegisteredName=\"XAML\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">false</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"XML\" RegisteredName=\"XML\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">2</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">2</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory></ToolsOptionsCategory><ToolsOptionsCategory name=\"XAML Designer\" RegisteredName=\"XAML Designer\"><ToolsOptionsSubCategory name=\"Artboard\" RegisteredName=\"Artboard\" PackageName=\"XamlDesignerPackage\"/><ToolsOptionsSubCategory name=\"General\" RegisteredName=\"General\" PackageName=\"XamlDesignerPackage\"/></ToolsOptionsCategory></ToolsOptions><Category name=\"Browser Link_BrowserLinkOptions\" Category=\"{046530f6-3404-372b-9710-73bcc3284607}\" Package=\"{8c28e535-abc9-4f92-b5c9-6c16617c8884}\" RegisteredName=\"Browser Link_BrowserLinkOptions\" PackageName=\"EurekaPackage\">\n\t\t<PropertyValue name=\"Enabled\">True</PropertyValue>\n\t</Category><Category name=\"CSS_Advanced\" Category=\"{978df9f7-5f7c-46c1-afe6-3e4335e93514}\" Package=\"{5330c67f-305c-4b17-a3dc-fbb7aee69c09}\" RegisteredName=\"CSS_Advanced\" PackageName=\"CssPackage\"/><Category name=\"CoffeeScript_Advanced\" Category=\"{9a5ed2f4-b737-4876-9b7f-7a94e634e74f}\" Package=\"{52244c9d-db46-4905-bda0-b3406c46d2a4}\" RegisteredName=\"CoffeeScript_Advanced\" PackageName=\"CoffeeScriptPackage\"/><Category name=\"Debugger\" Category=\"{EEDBF29A-5C8B-4E01-827C-263382C18CFE}\" Package=\"{C9DD4A57-47FB-11D2-83E7-00C04F9902C1}\" RegisteredName=\"Debugger\" PackageName=\"Visual Studio Debugger\"><PropertyValue name=\"ConfirmDeleteAllBreakpoints\">1</PropertyValue><PropertyValue name=\"StopAllProcesses\">1</PropertyValue><PropertyValue name=\"StopOnExceptionCrossingManagedBoundary\">0</PropertyValue><PropertyValue name=\"EnableAddressLevelDebugging\">1</PropertyValue><PropertyValue name=\"ShowDisassemblyWhenNoSource\">0</PropertyValue><PropertyValue name=\"EnableBreakpointConstraints\">1</PropertyValue><PropertyValue name=\"UseExceptionHelper\">0</PropertyValue><PropertyValue name=\"AutoUnwindOnException\">1</PropertyValue><PropertyValue name=\"JustMyCode\">1</PropertyValue><PropertyValue name=\"ShowNonPublicMembers\">0</PropertyValue><PropertyValue name=\"WarnIfNoUserCodeOnLaunch\">0</PropertyValue><PropertyValue name=\"FrameworkSourceStepping\">0</PropertyValue><PropertyValue name=\"WarnAboutSymbolCacheDuringRemoteManagedDebugging\">1</PropertyValue><PropertyValue name=\"EnableStepFiltering\">1</PropertyValue><PropertyValue name=\"WarnOnStepFilter\">1</PropertyValue><PropertyValue name=\"AllowImplicitFuncEval\">1</PropertyValue><PropertyValue name=\"AllowToString\">1</PropertyValue><PropertyValue name=\"UseSourceServer\">0</PropertyValue><PropertyValue name=\"ShowSourceServerDiagnostics\">0</PropertyValue><PropertyValue name=\"AlwaysColorMarkerText\">0</PropertyValue><PropertyValue name=\"UseDocumentChecksum\">1</PropertyValue><PropertyValue name=\"OutputToImmediate\">0</PropertyValue><PropertyValue name=\"ShowRawStructures\">0</PropertyValue><PropertyValue name=\"DisableJITOptimization\">0</PropertyValue><PropertyValue name=\"ShowNoSymbolsDialog\">1</PropertyValue><PropertyValue name=\"ShowScriptDebuggingDisabledDialog\">0</PropertyValue><PropertyValue name=\"EnableILInterpreterMinidump\">1</PropertyValue><PropertyValue name=\"EnableILInterpreterLive\">0</PropertyValue><PropertyValue name=\"HexDisplay\">0</PropertyValue><PropertyValue name=\"HexInput\">0</PropertyValue><PropertyValue name=\"MapClientBreakpoints\">1</PropertyValue><PropertyValue name=\"AddUnmappedBreakpointAtMappedLocation\">0</PropertyValue><PropertyValue name=\"StepIntoOnRestart\">0</PropertyValue><PropertyValue name=\"ENCEnable\">1</PropertyValue><PropertyValue name=\"ENCApplyChangesOnContinue\">1</PropertyValue><PropertyValue name=\"ENCWelcome\">0</PropertyValue><PropertyValue name=\"ENCStaleCodeWarning\">1</PropertyValue><PropertyValue name=\"ENCPrecompile\">0</PropertyValue><PropertyValue name=\"ENCRelink\">1</PropertyValue><PropertyValue name=\"NOENCAllowEdits\">1</PropertyValue><PropertyValue name=\"NOENCIgnore\">0</PropertyValue><PropertyValue name=\"NOENCRebuild\">0</PropertyValue><PropertyValue name=\"ENCEnableWhenRemoteDebugging\">0</PropertyValue><PropertyValue name=\"ConfirmFoundFiles\">0</PropertyValue><PropertyValue name=\"DisasmLineNumbers\">0</PropertyValue><PropertyValue name=\"ModulesShowAll\">1</PropertyValue><PropertyValue name=\"UseCodeSense\">1</PropertyValue><PropertyValue name=\"DisasmFields\">67577</PropertyValue><PropertyValue name=\"CallStackViewOptions\">3604736</PropertyValue><PropertyValue name=\"ShowExternalCode\">0</PropertyValue><PropertyValue name=\"SourceStepUnit\">0</PropertyValue><PropertyValue name=\"DisasmStepUnit\">2</PropertyValue><PropertyValue name=\"CrossThreadCallStack\">1</PropertyValue><PropertyValue name=\"ShowOnlyFlaggedThreads\">0</PropertyValue><PropertyValue name=\"ConcurrencySupport\">1</PropertyValue><PropertyValue name=\"GuessAtThreadNames\">1</PropertyValue><PropertyValue name=\"ShowOtherThreadIpMarkers\">0</PropertyValue><PropertyValue name=\"ShowThreadCategory\">1</PropertyValue><PropertyValue name=\"SaveRemoteDumps\">1</PropertyValue><PropertyValue name=\"LongEvalTimeout\">10000</PropertyValue><PropertyValue name=\"NormalEvalTimeout\">5000</PropertyValue><PropertyValue name=\"QuickwatchTimeout\">20000</PropertyValue><PropertyValue name=\"DataTipTimeout\">3000</PropertyValue><PropertyValue name=\"AutosReturnValsTimeout\">2000</PropertyValue><PropertyValue name=\"AutosRegistersTimeout\">2000</PropertyValue><PropertyValue name=\"LocalsTimeout\">10000</PropertyValue><PropertyValue name=\"RegistersTimeout\">10000</PropertyValue><PropertyValue name=\"AddressExpressionTimeout\">10000</PropertyValue><PropertyValue name=\"ScriptDocsTimeout\">10000</PropertyValue><PropertyValue name=\"ImmediateWindowTimeout\">5000</PropertyValue><PropertyValue name=\"SetValueTimeout\">15000</PropertyValue><PropertyValue name=\"TreeGridRePaintTimer\">250</PropertyValue><PropertyValue name=\"TreeGridBusyPaintTimer\">1000</PropertyValue><PropertyValue name=\"ModulesWindowUpdateTimer\">500</PropertyValue><PropertyValue name=\"TreeGridDelayOnEnterTimer\">125</PropertyValue><PropertyValue name=\"DelayTreeGridPaintOnBreak\">1</PropertyValue><PropertyValue name=\"ShowNonprintableCharsAsGlyphs\">0</PropertyValue><PropertyValue name=\"ShowSystemProcesses\">0</PropertyValue><PropertyValue name=\"ShowProcessesFromAllSessions\">0</PropertyValue><PropertyValue name=\"EnhancedDataTips\">1</PropertyValue><PropertyValue name=\"DataTipDismissalSensitivity\">1</PropertyValue><PropertyValue name=\"DataTipKeyboardDismissal\">0</PropertyValue><PropertyValue name=\"UserSpecifiedEngines\">0</PropertyValue><PropertyValue name=\"OutputOnException\">1</PropertyValue><PropertyValue name=\"OutputOnStepFilter\">1</PropertyValue><PropertyValue name=\"OutputOnModuleLoad\">1</PropertyValue><PropertyValue name=\"OutputOnModuleUnload\">1</PropertyValue><PropertyValue name=\"OutputOnModuleSymbolSearch\">1</PropertyValue><PropertyValue name=\"OutputOnProcessDestroy\">1</PropertyValue><PropertyValue name=\"OutputOnThreadDestroy\">1</PropertyValue><PropertyValue name=\"OutputOnOutputDebugString\">1</PropertyValue><PropertyValue name=\"OutputOnDebuggerMessage\">1</PropertyValue><PropertyValue name=\"VariableWindowIcons\">1</PropertyValue><PropertyValue name=\"DisableAttachSecurityWarning\">0</PropertyValue><PropertyValue name=\"LoadDllExports\">0</PropertyValue><PropertyValue name=\"NativeRPC\">0</PropertyValue><PropertyValue name=\"AllowSideEffectEval\">0</PropertyValue><PropertyValue name=\"LoadSymbolsWhenSettingsChanged\">1</PropertyValue><PropertyValue name=\"SymbolUseExcludeList\">1</PropertyValue><PropertyValue name=\"SymbolsAlwaysLoadAdjacent\">1</PropertyValue><PropertyValue name=\"DontForceCacheOnManualLoad\">0</PropertyValue><PropertyValue name=\"SymbolUseMSSymbolServers\">0</PropertyValue><PropertyValue name=\"AutoLoadFromSymbolPath\">1</PropertyValue><PropertyValue name=\"OneClickEdit\">0</PropertyValue><PropertyValue name=\"OfferArrayExpansion\">0</PropertyValue><PropertyValue name=\"VariableWindowPromptOnLargeExpansion\">1</PropertyValue><PropertyValue name=\"VariableWindowMaxSupportedChildren\">1000000</PropertyValue><PropertyValue name=\"PromptToAddSourceToIgnoreList\">0</PropertyValue><PropertyValue name=\"OwnerDrawDebugLocationToolbar\">0</PropertyValue><PropertyValue name=\"EnableSelectedBreakpointHighlight\">1</PropertyValue><PropertyValue name=\"DisableUniscribe\">0</PropertyValue><PropertyValue name=\"ShowParallelStacksBottomUp\">1</PropertyValue><PropertyValue name=\"ThreadsWindowGroupingColumn\">2048</PropertyValue><PropertyValue name=\"ThreadsWindowVisibleColumns\">253</PropertyValue><PropertyValue name=\"ThreadsWindowShowTipWhenCallStackExpanded\">0</PropertyValue><PropertyValue name=\"AllowDesignModePinning\">0</PropertyValue><PropertyValue name=\"CallStackParamToString\">0</PropertyValue><PropertyValue name=\"CheckRDTForFilesFirst\">1</PropertyValue><PropertyValue name=\"AllowSourceServerInPartialTrust\">0</PropertyValue><PropertyValue name=\"ENCEnableCrossUser\">0</PropertyValue><PropertyValue name=\"ENCEnableNative\">1</PropertyValue><PropertyValue name=\"OpenNewFilesProvisionally\">1</PropertyValue><PropertyValue name=\"ForceRealFuncEval\">1</PropertyValue><PropertyValue name=\"ShowOnlyCurrentProcess\">0</PropertyValue><PropertyValue name=\"GpuRaceHazardsAllowSame\">0</PropertyValue><PropertyValue name=\"DisasmToolbarIsExpanded\">0</PropertyValue><PropertyValue name=\"AlwaysRunUntrustedSourceServerCommands\">0</PropertyValue><PropertyValue name=\"DebugEngineCompatibilityMode\">0</PropertyValue><PropertyValue name=\"CallStackViewOptionsEx\">1</PropertyValue><PropertyValue name=\"ManagedDebugEngineCompatibilityMode_Normal\">0</PropertyValue><PropertyValue name=\"ManagedDebugEngineCompatibilityMode_ProductInstalled\">1</PropertyValue><PropertyValue name=\"ManagedMemoryViewCollapseSmallObjects\">0</PropertyValue><PropertyValue name=\"NativeDebugEngineCompatibilityMode\">0</PropertyValue><PropertyValue name=\"ManagedMemoryViewHideUndeterminedTypes\">1</PropertyValue><PropertyValue name=\"ManagedMemoryViewJustMyCode\">1</PropertyValue><PropertyValue name=\"UseLegacyManagedEE\">0</PropertyValue><PropertyValue name=\"ShowClrCustomVisualizerSecurityWarning\">1</PropertyValue><PropertyValue name=\"EnableNativeDebugHeap\">0</PropertyValue><PropertyValue name=\"EnableXamlVisualDiagnostics\">1</PropertyValue><PropertyValue name=\"EnableXamlVisualDiagnosticsPreviewSelection\">0</PropertyValue><PropertyValue name=\"EnableDiagnosticToolsWindow\">1</PropertyValue><PropertyValue name=\"EnableIntelliTrace\">1</PropertyValue><PropertyValue name=\"PerformanceTipsEnableSysTime\">1</PropertyValue><PropertyValue name=\"TextVisualizerStringLimit\">32768</PropertyValue><PropertyValue name=\"ExceptionDescriptionMessageLimit\">8192</PropertyValue><PropertyValue name=\"UseNewExceptionHelper\">1</PropertyValue><PropertyValue name=\"UseSourceLink\">1</PropertyValue><PropertyValue name=\"EnableAspNetJavaScriptDebuggingOnLaunch\">0</PropertyValue><PropertyValue name=\"EnableXamlVisualDiagnosticsInAppMenu\">1</PropertyValue><PropertyValue name=\"EnableXamlVisualDiagnosticsEditAndContinue\">1</PropertyValue><PropertyValue name=\"EnableIntelliTraceInstrumentation\">0</PropertyValue><PropertyValue name=\"EnableRunToClick\">1</PropertyValue><PropertyValue name=\"EnableEdgeDevToolsWWAOnLaunch\">0</PropertyValue><PropertyValue name=\"EnableLegacyChromeJavaScriptDebuggerForASPNET\">0</PropertyValue><PropertyValue name=\"CallStackShowFrameType\">0</PropertyValue><PropertyValue name=\"UseVBCSLegacyExpressionEvaluator\">0</PropertyValue><PropertyValue name=\"EnableIntelliTraceSnapshot\">0</PropertyValue><PropertyValue name=\"PromptIntelliTraceSnapshot\">1</PropertyValue><PropertyValue name=\"EnableIntelliTraceSnapshotException\">1</PropertyValue><PropertyValue name=\"MaxIntelliTraceSnapshotOnException\">5</PropertyValue><PropertyValue name=\"DisableForegroundWindowSwitching\">0</PropertyValue><PropertyValue name=\"WarnIfNoAspNetJavaScriptDebuggingOnLaunch\">1</PropertyValue><PropertyValue name=\"SourceServerExtractToDirectory\"/><PropertyValue name=\"FrameworkSourceServerName\">https://referencesource.microsoft.com/symbols</PropertyValue><PropertyValue name=\"PublicSymbolServerName\"/><PropertyValue name=\"PublicSymbolServerName2\">https://msdl.microsoft.com/download/symbols</PropertyValue><PropertyValue name=\"DefaultTracepointMessage\">Function: $FUNCTION, Thread: $TID $TNAME</PropertyValue><PropertyValue name=\"ProgramToDebugPath\"/><PropertyValue name=\"AttachToProcessDefaultEngineList\"/><PropertyValue name=\"SecureSourceLocalDirectory\"/><PropertyValue name=\"SymbolPath\"/><PropertyValue name=\"SymbolPathState\"/><PropertyValue name=\"SymbolCacheDir\"/><PropertyValue name=\"SymbolIncludeList\"/><PropertyValue name=\"SymbolIncludeListState\"/><PropertyValue name=\"SymbolExcludeList\"/><PropertyValue name=\"SymbolExcludeListState\"/></Category><Category name=\"Environment_Group\" RegisteredName=\"Environment_Group\"><Category name=\"Environment_Aliases\" Category=\"{AD334E74-368A-4c46-9AF8-F53ABF0775F2}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_Aliases\" PackageName=\"Visual Studio Environment Package\"><Aliases Version=\"1.0\"><Alias Name=\"immed\" Definition=\"Tools.ImmediateMode\"/><Alias Name=\"props\" Definition=\"View.PropertiesWindow\"/><Alias Name=\"memory1\" Definition=\"Debug.Memory1\"/><Alias Name=\"memory2\" Definition=\"Debug.Memory2\"/><Alias Name=\"memory3\" Definition=\"Debug.Memory3\"/><Alias Name=\"Lcase\" Definition=\"Edit.MakeLowercase\"/><Alias Name=\"memory4\" Definition=\"Debug.Memory4\"/><Alias Name=\"locals\" Definition=\"Debug.Locals\"/><Alias Name=\"kb\" Definition=\"Debug.ListCallStack\"/><Alias Name=\"da\" Definition=\"Debug.ListMemory /Ansi\"/><Alias Name=\"db\" Definition=\"Debug.ListMemory /Format:OneByte\"/><Alias Name=\"DelEOL\" Definition=\"Edit.DeleteToEOL\"/><Alias Name=\"dc\" Definition=\"Debug.ListMemory /Format:FourBytes /Ansi\"/><Alias Name=\"dd\" Definition=\"Debug.ListMemory /Format:FourBytes\"/><Alias Name=\"df\" Definition=\"Debug.ListMemory /Format:Float\"/><Alias Name=\"WordWrap\" Definition=\"Edit.ToggleWordWrap\"/><Alias Name=\"AddProj\" Definition=\"File.AddNewProject\"/><Alias Name=\"dq\" Definition=\"Debug.ListMemory /Format:EightBytes\"/><Alias Name=\"du\" Definition=\"Debug.ListMemory /Unicode\"/><Alias Name=\"designer\" Definition=\"View.ViewDesigner\"/><Alias Name=\"ListMembers\" Definition=\"Edit.ListMembers\"/><Alias Name=\"code\" Definition=\"View.ViewCode\"/><Alias Name=\"ParamInfo\" Definition=\"Edit.ParameterInfo\"/><Alias Name=\"DelHSp\" Definition=\"Edit.DeleteHorizontalWhiteSpace\"/><Alias Name=\"TileH\" Definition=\"Window.TileHorizontally\"/><Alias Name=\"save\" Definition=\"File.SaveSelectedItems\"/><Alias Name=\"?\" Definition=\"Debug.Print\"/><Alias Name=\"callstack\" Definition=\"Debug.CallStack\"/><Alias Name=\"open\" Definition=\"File.OpenFile\"/><Alias Name=\"TileV\" Definition=\"Window.TileVertically\"/><Alias Name=\"OutlineDefs\" Definition=\"Edit.CollapsetoDefinitions\"/><Alias Name=\"CloseAll\" Definition=\"Window.CloseAllDocuments\"/><Alias Name=\"ToggleBook\" Definition=\"Edit.ToggleBookmark\"/><Alias Name=\"InsertFile\" Definition=\"Edit.InsertFileAsText\"/><Alias Name=\"autos\" Definition=\"Debug.Autos\"/><Alias Name=\"SaveAll\" Definition=\"File.SaveAll\"/><Alias Name=\"new\" Definition=\"File.NewFile\"/><Alias Name=\"d\" Definition=\"Debug.ListMemory\"/><Alias Name=\"rtc\" Definition=\"Debug.RunToCursor\"/><Alias Name=\"navigate\" Definition=\"View.WebBrowser\"/><Alias Name=\"g\" Definition=\"Debug.Start\"/><Alias Name=\"k\" Definition=\"Debug.ListCallStack\"/><Alias Name=\"format\" Definition=\"Edit.FormatSelection\"/><Alias Name=\"n\" Definition=\"Debug.SetRadix\"/><Alias Name=\"p\" Definition=\"Debug.StepOver\"/><Alias Name=\"q\" Definition=\"Debug.StopDebugging\"/><Alias Name=\"r\" Definition=\"Debug.ListRegisters\"/><Alias Name=\"t\" Definition=\"Debug.StepInto\"/><Alias Name=\"~*kb\" Definition=\"Debug.ListCallStack /AllThreads\"/><Alias Name=\"u\" Definition=\"Debug.ListDisassembly\"/><Alias Name=\"nf\" Definition=\"File.NewFile\"/><Alias Name=\"registers\" Definition=\"Debug.Registers\"/><Alias Name=\"LineCut\" Definition=\"Edit.LineCut\"/><Alias Name=\"memory\" Definition=\"memory1\"/><Alias Name=\"|\" Definition=\"Debug.ListProcesses\"/><Alias Name=\"~\" Definition=\"Debug.ListThreads\"/><Alias Name=\"np\" Definition=\"File.NewProject\"/><Alias Name=\"DelBOL\" Definition=\"Edit.DeleteToBOL\"/><Alias Name=\"~*k\" Definition=\"Debug.ListCallStack /AllThreads\"/><Alias Name=\"NextBook\" Definition=\"Edit.NextBookmark\"/><Alias Name=\"TaskList\" Definition=\"View.TaskList\"/><Alias Name=\"Ucase\" Definition=\"Edit.MakeUppercase\"/><Alias Name=\"NewProj\" Definition=\"File.NewProject\"/><Alias Name=\"Untabify\" Definition=\"Edit.UntabifySelectedLines\"/><Alias Name=\"GotoBrace\" Definition=\"Edit.GotoBrace\"/><Alias Name=\"cls\" Definition=\"Edit.ClearAll\"/><Alias Name=\"shell\" Definition=\"Tools.Shell\"/><Alias Name=\"of\" Definition=\"File.OpenFile\"/><Alias Name=\"log\" Definition=\"Tools.LogCommandWindowOutput\"/><Alias Name=\"print\" Definition=\"File.Print\"/><Alias Name=\"op\" Definition=\"File.OpenProject\"/><Alias Name=\"eval\" Definition=\"Debug.EvaluateStatement\"/><Alias Name=\"alias\" Definition=\"Tools.Alias\"/><Alias Name=\"watch\" Definition=\"Debug.Watch\"/><Alias Name=\"cmd\" Definition=\"View.CommandWindow\"/><Alias Name=\"help\" Definition=\"Help.F1Help\"/><Alias Name=\"GotoLn\" Definition=\"Edit.GoTo\"/><Alias Name=\"disasm\" Definition=\"Debug.Disassembly\"/><Alias Name=\"redo\" Definition=\"Edit.Redo\"/><Alias Name=\"undo\" Definition=\"Edit.Undo\"/><Alias Name=\"tabify\" Definition=\"Edit.TabifySelectedLines\"/><Alias Name=\"LineDel\" Definition=\"Edit.LineDelete\"/><Alias Name=\"StopOutlining\" Definition=\"Edit.CollapsetoDefinitions\"/><Alias Name=\"pr\" Definition=\"Debug.StepOut\"/><Alias Name=\"SaveAs\" Definition=\"File.SaveSelectedItemsAs\"/><Alias Name=\"FullScreen\" Definition=\"View.FullScreen\"/><Alias Name=\"nav\" Definition=\"navigate\"/><Alias Name=\"SwapAnchor\" Definition=\"Edit.SwapAnchor\"/><Alias Name=\"exit\" Definition=\"File.Exit\"/><Alias Name=\"threads\" Definition=\"Debug.Threads\"/><Alias Name=\"PrevBook\" Definition=\"Edit.PreviousBookmark\"/><Alias Name=\"close\" Definition=\"File.Close\"/><Alias Name=\"toolbox\" Definition=\"View.Toolbox\"/><Alias Name=\"bl\" Definition=\"Debug.Breakpoints\"/><Alias Name=\"bp\" Definition=\"Debug.ToggleBreakpoint\"/><Alias Name=\"??\" Definition=\"Debug.QuickWatch\"/><Alias Name=\"StopFind\" Definition=\"Edit.FindInFiles /stop\"/><Alias Name=\"ClearBook\" Definition=\"Edit.ClearBookmarks\"/></Aliases></Category><Category name=\"Environment_CallBrowser\" Category=\"{50B05A5D-9174-48eb-851A-B1C616A0B43D}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_CallBrowser\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"CallBrowserSortAlphabetically\">true</PropertyValue><PropertyValue name=\"CallBrowserSortByAccess\">false</PropertyValue><PropertyValue name=\"CallBrowserShowFullyQualifiedNames\">true</PropertyValue></Category><Category name=\"Environment_ClassView\" Category=\"{40AF29AB-4C5B-412A-9CE8-465C4FCFE41D}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_ClassView\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ClassViewShowProjectReferences\">false</PropertyValue><PropertyValue name=\"ClassViewShowHiddenTypesAndMembers\">false</PropertyValue><PropertyValue name=\"ClassViewTypesSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ClassViewTypesSortByType\">true</PropertyValue><PropertyValue name=\"ClassViewTypesSortByAccess\">false</PropertyValue><PropertyValue name=\"ClassViewTypesGroupByType\">false</PropertyValue><PropertyValue name=\"ClassViewSearchResultsSortByBestMatch\">true</PropertyValue><PropertyValue name=\"ClassViewSearchResultsSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ClassViewSearchResultsSortByType\">false</PropertyValue><PropertyValue name=\"ClassViewSearchResultsSortByAccess\">false</PropertyValue><PropertyValue name=\"ClassViewSearchResultsGroupByType\">false</PropertyValue><PropertyValue name=\"ClassViewMembersViewPublic\">true</PropertyValue><PropertyValue name=\"ClassViewMembersViewProtected\">true</PropertyValue><PropertyValue name=\"ClassViewMembersViewPrivate\">true</PropertyValue><PropertyValue name=\"ClassViewMembersViewOther\">true</PropertyValue><PropertyValue name=\"ClassViewMembersShowInherited\">false</PropertyValue><PropertyValue name=\"ClassViewShowExtensionMembers\">false</PropertyValue><PropertyValue name=\"ClassViewShowBaseTypes\">true</PropertyValue><PropertyValue name=\"ClassViewShowDerivedTypes\">true</PropertyValue><PropertyValue name=\"ClassViewMembersSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ClassViewMembersSortByType\">true</PropertyValue><PropertyValue name=\"ClassViewMembersSortByAccess\">false</PropertyValue></Category><Category name=\"Environment_CommandBars\" Category=\"{B9D9C123-B500-4202-B887-57C829CBD08F}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_CommandBars\" PackageName=\"Visual Studio Environment Package\"><CommandBars Version=\"05072811\"><DefaultCustomizations><modify_toolbar Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,258,24\" DockRectangle=\"0,0,258,24\"/><modify_toolbar Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000000d\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,93,24\" DockRectangle=\"28,0,93,24\"/><modify_toolbar Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,213,24\" DockRectangle=\"21,0,213,24\"/><modify_toolbar Menu=\"{AA8EB8CD-7A51-11D0-92C3-00A0C9138C45}:00005dc0\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,305,24\" DockRectangle=\"33,0,305,24\"/><modify_toolbar Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000420\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"3\" FloatRectangle=\"0,0,893,24\" DockRectangle=\"0,0,893,24\"/><modify_toolbar Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,213,24\" DockRectangle=\"1,0,213,24\"/><modify_toolbar Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,130,24\" DockRectangle=\"23,0,130,24\"/><modify_toolbar Menu=\"{C7547851-4E3A-4E5B-9173-FA6E9C8BD82C}:0000271a\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,184,24\" DockRectangle=\"35,0,184,24\"/><modify_toolbar Menu=\"{CB26E292-901A-419C-B79D-49BD45C43929}:00002710\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,268,24\" DockRectangle=\"34,0,268,24\"/><modify_toolbar Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,162,24\" DockRectangle=\"27,0,162,24\"/><modify_toolbar Menu=\"{E148F049-C570-4F55-84A6-6DA870AF229E}:00001388\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,363,24\" DockRectangle=\"7,0,363,24\"/><modify_toolbar Menu=\"{E148F049-C570-4F55-84A6-6DA870AF229E}:000013d8\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,415,24\" DockRectangle=\"12,0,415,24\"/><modify_toolbar Menu=\"{E148F049-C570-4F55-84A6-6DA870AF229E}:00001838\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,190,24\" DockRectangle=\"17,0,190,24\"/><modify_toolbar Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,486,24\" DockRectangle=\"10,0,486,24\"/><modify_toolbar Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,234,24\" DockRectangle=\"11,0,234,24\"/><modify_toolbar Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,290,24\" DockRectangle=\"16,0,290,24\"/><modify_toolbar Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000000b\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,203,24\" DockRectangle=\"22,0,203,24\"/><modify_toolbar Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,412,24\" DockRectangle=\"6,0,412,24\"/><modify_toolbar Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,137,24\" DockRectangle=\"20,0,137,24\"/><modify_toolbar Menu=\"{F65C9B12-9CC9-498A-AB19-6CBE3D2C6BC6}:00000002\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,86,24\" DockRectangle=\"30,0,86,24\"/><modify_toolbar Menu=\"{5D4C0442-C0A2-4BE8-9B4D-AB1C28450942}:00001000\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,133,24\" DockRectangle=\"8,0,133,24\"/><modify_toolbar Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,212,24\" DockRectangle=\"19,0,212,24\"/><modify_toolbar Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,130,24\" DockRectangle=\"32,0,130,24\"/><modify_toolbar Menu=\"{2DC8D6BB-916C-4B80-9C52-FD8FC371ACC2}:00000100\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,188,24\" DockRectangle=\"26,0,188,24\"/><modify_toolbar Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,466,24\" DockRectangle=\"13,0,466,24\"/><modify_toolbar Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,276,24\" DockRectangle=\"25,0,276,24\"/><modify_toolbar Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,249,24\" DockRectangle=\"3,0,249,24\"/><modify_toolbar Menu=\"{D709F4D7-0165-472B-B966-105912D13DB8}:00000104\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,130,24\" DockRectangle=\"31,0,130,24\"/><modify_toolbar Menu=\"{5D8847D1-9A8A-431E-907A-62D9963F07FD}:00000104\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,133,24\" DockRectangle=\"37,0,133,24\"/><modify_toolbar Menu=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000050c\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,283,24\" DockRectangle=\"24,0,283,24\"/><modify_toolbar Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,458,24\" DockRectangle=\"2,0,458,24\"/><modify_toolbar Menu=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00003010\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,432,24\" DockRectangle=\"9,0,432,24\"/><modify_toolbar Menu=\"{C9522C54-50B0-48C9-A9B8-339140E0FA20}:00001801\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,268,24\" DockRectangle=\"14,0,268,24\"/><modify_toolbar Menu=\"{6E9EABA0-FDEE-4A1C-8758-E1DCA032A5D3}:00001802\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,297,24\" DockRectangle=\"15,0,297,24\"/><modify_toolbar Menu=\"{068E2583-0872-403B-AF4C-6C2A8F2D8C3E}:00001201\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,71,24\" DockRectangle=\"5,0,71,24\"/><modify_toolbar Menu=\"{068E2583-0872-403B-AF4C-6C2A8F2D8C3E}:00003203\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,203,24\" DockRectangle=\"18,0,203,24\"/><modify_toolbar Menu=\"{481A3758-A6D0-43E0-B1B8-4428BE962F8E}:00007202\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,431,24\" DockRectangle=\"4,0,431,24\"/><modify_toolbar Menu=\"{16BD08C3-403D-4B06-B57B-57B60E572241}:00001001\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,133,24\" DockRectangle=\"4,0,133,24\"/><modify_toolbar Menu=\"{9B3258D9-F00A-4519-9253-7909878E8882}:00001010\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,346,24\" DockRectangle=\"29,0,346,24\"/><add Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000003ff\" CmdPri=\"02800001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000723\" GroupPri=\"08500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\"/><add Cmd=\"{3A3E1789-3E35-47B0-8567-D2FB407CC63D}:00003000\" CmdPri=\"01800001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000131\" GroupPri=\"0c000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\"/><add Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000eb\" CmdPri=\"04804001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\"/><add Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008d5\" CmdPri=\"0540a001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\"/><add Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008d4\" CmdPri=\"06008001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\"/><add Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ec\" CmdPri=\"06010001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\"/><add Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\"/><add Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000005\" CmdPri=\"08010001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\"/><add Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000014e\" CmdPri=\"00108001\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001403\" GroupPri=\"04000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\"/><add Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206d\" CmdPri=\"00080001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\"/><add Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206e\" CmdPri=\"000c0001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\"/><add Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206f\" CmdPri=\"000e0001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\"/><remove Cmd=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000500\" CmdPri=\"00210000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000171\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000010\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000172\" GroupPri=\"03000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000000f\" CmdPri=\"02000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000172\" GroupPri=\"03000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000001a\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000172\" GroupPri=\"03000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000115\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000177\" GroupPri=\"0b000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000151\" CmdPri=\"02000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000177\" GroupPri=\"0b000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ea\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000eb\" CmdPri=\"02000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{23D49123-60AC-4D7E-939A-E01A4E176BEE}:00000001\" CmdPri=\"02000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ee\" CmdPri=\"02500000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000002a\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{E234E66E-BA64-4D71-B304-16F0A4C793F5}:00004010\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008c5\" CmdPri=\"04000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5DD0BB59-7076-4C59-88D3-DE36931F63F0}:00000bb8\" CmdPri=\"50000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000502\" CmdPri=\"ff000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000004d\" CmdPri=\"07040000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000012d\" GroupPri=\"a0000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000081\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000004e\" CmdPri=\"07050000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000012d\" GroupPri=\"a0000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000081\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000238\" CmdPri=\"07060000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000012d\" GroupPri=\"a0000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000081\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000239\" CmdPri=\"07070000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000012d\" GroupPri=\"a0000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000081\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000105\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000133\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000c7\" CmdPri=\"04000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000133\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008d4\" CmdPri=\"05000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000721\" GroupPri=\"07500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008d5\" CmdPri=\"05000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000721\" GroupPri=\"07500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ec\" CmdPri=\"04000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000723\" GroupPri=\"08500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000eb\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000131\" GroupPri=\"0c000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000848\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000035a\" GroupPri=\"00500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\" IsPartialRemoval=\"false\"/><remove Cmd=\"{3A3E1789-3E35-47B0-8567-D2FB407CC63D}:00003000\" CmdPri=\"05000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000003ff\" CmdPri=\"06000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006c\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"01000000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000068\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"01000000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006b\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"01000000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000046\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000551\" GroupPri=\"01010000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000045\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000551\" GroupPri=\"01010000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000239\" CmdPri=\"01260000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"01030000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000238\" CmdPri=\"012b0000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"01030000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000098\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"01030000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000097\" CmdPri=\"01400000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"01030000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000127\" CmdPri=\"01000000\" Group=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:0000011b\" GroupPri=\"01000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{D709F4D7-0165-472B-B966-105912D13DB8}:00002039\" CmdPri=\"00000000\" Group=\"{D709F4D7-0165-472B-B966-105912D13DB8}:00001009\" GroupPri=\"04000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5D8847D1-9A8A-431E-907A-62D9963F07FD}:00002039\" CmdPri=\"00000000\" Group=\"{5D8847D1-9A8A-431E-907A-62D9963F07FD}:00001009\" GroupPri=\"04000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000013a\" CmdPri=\"03000000\" Group=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000025\" GroupPri=\"05000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000409\" CmdPri=\"01000000\" Group=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:0000011a\" GroupPri=\"07000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{E8B06F44-6D01-11D2-AA7D-00C04F990343}:000000ce\" CmdPri=\"00500000\" Group=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000064\" GroupPri=\"00100000\" Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{4A79114A-19E4-11D3-B86B-00C04F79F802}:00000106\" CmdPri=\"00100000\" Group=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000068\" GroupPri=\"00400000\" Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{4A79114A-19E4-11D3-B86B-00C04F79F802}:00000107\" CmdPri=\"00300000\" Group=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000068\" GroupPri=\"00400000\" Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000300d\" CmdPri=\"01000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002316\" GroupPri=\"01000000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000300f\" CmdPri=\"00f10000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000233b\" GroupPri=\"01020000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{F4394F71-4DFC-4268-84C3-7D9150C5C216}:00003007\" CmdPri=\"02000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000233b\" GroupPri=\"01020000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003010\" CmdPri=\"00f00000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000233c\" GroupPri=\"01030000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{F4394F71-4DFC-4268-84C3-7D9150C5C216}:00003008\" CmdPri=\"02000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000233c\" GroupPri=\"01030000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003000\" CmdPri=\"01000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003002\" CmdPri=\"01010000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003001\" CmdPri=\"01020000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003100\" CmdPri=\"01030000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003003\" CmdPri=\"01100000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{F4394F71-4DFC-4268-84C3-7D9150C5C216}:00003000\" CmdPri=\"02000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000012\" CmdPri=\"03000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001070\" GroupPri=\"01000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000011f\" CmdPri=\"0a000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001074\" GroupPri=\"05000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000120\" CmdPri=\"0b000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001074\" GroupPri=\"05000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000014d\" CmdPri=\"0e000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:0000107d\" GroupPri=\"07000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000046\" CmdPri=\"03000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001078\" GroupPri=\"01000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000045\" CmdPri=\"04000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001078\" GroupPri=\"01000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000014b\" CmdPri=\"0c000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:0000107c\" GroupPri=\"05000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000004\" CmdPri=\"02000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001011\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000004\" CmdPri=\"04000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001012\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000000b\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" CmdPri=\"05000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001106\" GroupPri=\"01000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000033\" CmdPri=\"03000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001107\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ad\" CmdPri=\"09000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001118\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000006\" CmdPri=\"03000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001109\" GroupPri=\"07000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000008\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110d\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000009\" CmdPri=\"03000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110d\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000003\" CmdPri=\"03000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110e\" GroupPri=\"0d000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000065\" CmdPri=\"05000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000066\" CmdPri=\"06000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:000002a5\" CmdPri=\"07000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:0000006c\" CmdPri=\"08000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ad\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001108\" GroupPri=\"01000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000065\" CmdPri=\"05000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000066\" CmdPri=\"06000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:000002a5\" CmdPri=\"07000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:0000006c\" CmdPri=\"08000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000014e\" CmdPri=\"00100000\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001402\" GroupPri=\"03000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:000053fc\" CmdPri=\"02000000\" Group=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00002f2f\" GroupPri=\"04000000\" Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005404\" CmdPri=\"06000000\" Group=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00002f2f\" GroupPri=\"04000000\" Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:0000540c\" CmdPri=\"07000000\" Group=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00002f2f\" GroupPri=\"04000000\" Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" IsPartialRemoval=\"true\"/><remove Cmd=\"{34E61A32-1C10-4052-ABE7-264C46302CE4}:00000002\" CmdPri=\"04000000\" Group=\"{4FE997E0-5BDC-41CD-8E02-A212DAD97CDA}:00000700\" GroupPri=\"01000000\" Menu=\"{2DC8D6BB-916C-4B80-9C52-FD8FC371ACC2}:00000100\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000017\" CmdPri=\"02000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055d\" GroupPri=\"06000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000016\" CmdPri=\"03000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055d\" GroupPri=\"06000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000015\" CmdPri=\"04000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055d\" GroupPri=\"06000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000030\" CmdPri=\"02000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000002f\" CmdPri=\"03000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000002e\" CmdPri=\"04000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000000c\" CmdPri=\"00000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055f\" GroupPri=\"08000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000000d\" CmdPri=\"00000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055f\" GroupPri=\"08000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{CB3675B8-701E-4F56-9167-2714E167FF3F}:00003008\" CmdPri=\"01000000\" Group=\"{CB3675B8-701E-4F56-9167-2714E167FF3F}:0000200b\" GroupPri=\"0f000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000029\" CmdPri=\"00000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:00000568\" GroupPri=\"10000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006c\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006c\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000068\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000068\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000074\" CmdPri=\"01200000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006b\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006b\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008ff\" CmdPri=\"01400000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB87333B-16C8-400E-BC8F-F6B890410582}:00000001\" CmdPri=\"00100000\" Group=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00001002\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000046\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000551\" GroupPri=\"00300000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000045\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000551\" GroupPri=\"00300000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000239\" CmdPri=\"01260000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"00500000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000238\" CmdPri=\"012b0000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"00500000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000098\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"00500000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000097\" CmdPri=\"01400000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"00500000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002907\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002908\" CmdPri=\"00200000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002909\" CmdPri=\"00300000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002071\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001088\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206d\" CmdPri=\"00200000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001089\" GroupPri=\"00600000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206e\" CmdPri=\"00300000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001089\" GroupPri=\"00600000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206f\" CmdPri=\"00400000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001089\" GroupPri=\"00600000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002120\" CmdPri=\"02000000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001077\" GroupPri=\"02000000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:00003113\" CmdPri=\"01000000\" Group=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000032a\" GroupPri=\"03000000\" Menu=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000050c\" IsPartialRemoval=\"true\"/><remove Cmd=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:00003114\" CmdPri=\"02000000\" Group=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000032a\" GroupPri=\"03000000\" Menu=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000050c\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B11771F1-F6CB-467E-8B71-428B5CEDCA5F}:00000101\" CmdPri=\"01000000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020003\" GroupPri=\"01300000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" IsPartialRemoval=\"true\"/><remove Cmd=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00002001\" CmdPri=\"01100000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020003\" GroupPri=\"01300000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" IsPartialRemoval=\"true\"/><remove Cmd=\"{14BCA3AF-5E27-4307-8492-84AF8647EA7C}:00002001\" CmdPri=\"01100000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020003\" GroupPri=\"01300000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" IsPartialRemoval=\"true\"/><remove Cmd=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00002001\" CmdPri=\"02030000\" Group=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:0000102b\" GroupPri=\"06000000\" Menu=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00003010\" IsPartialRemoval=\"true\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000002ac\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000174\" GroupPri=\"09000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" Width=\"65\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000007c6\" CmdPri=\"04000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000174\" GroupPri=\"09000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" Width=\"110\"/><modify Cmd=\"{E8B06F44-6D01-11D2-AA7D-00C04F990343}:000000c9\" CmdPri=\"00100000\" Group=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000064\" GroupPri=\"00100000\" Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" Icon=\"{DDFE7DBB-66E4-4954-8A0F-36CFE15EB12E}:00000002\" Style=\"0\"/><modify Cmd=\"{CB26E292-901A-419C-B79D-49BD45C43929}:00000078\" CmdPri=\"01000000\" Group=\"{CB26E292-901A-419C-B79D-49BD45C43929}:00002711\" GroupPri=\"00000000\" Menu=\"{CB26E292-901A-419C-B79D-49BD45C43929}:00002710\" Width=\"115\"/><modify Cmd=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001132\" CmdPri=\"00000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001068\" GroupPri=\"00000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Width=\"105\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000000f5\" CmdPri=\"02000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001070\" GroupPri=\"01000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" BeginGroup=\"false\" Width=\"70\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000034\" CmdPri=\"00000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001071\" GroupPri=\"02000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:0000000a\" BeginGroup=\"false\"/><modify Cmd=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001085\" CmdPri=\"00000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001073\" GroupPri=\"04000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000118\" CmdPri=\"09000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001076\" GroupPri=\"06000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Icon=\"{8328592C-227C-11D3-B870-00C04F79F802}:00000017\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000118\" CmdPri=\"09000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001076\" GroupPri=\"06000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Icon=\"{8328592C-227C-11D3-B870-00C04F79F802}:00000017\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000118\" CmdPri=\"09000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001076\" GroupPri=\"06000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Icon=\"{8328592C-227C-11D3-B870-00C04F79F802}:00000017\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000088\" CmdPri=\"05000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001079\" GroupPri=\"02000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000056\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000088\" CmdPri=\"05000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001079\" GroupPri=\"02000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000056\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000088\" CmdPri=\"05000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001079\" GroupPri=\"02000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000056\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000c9\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000100e\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" Icon=\"{634F8946-FFF0-491F-AF41-B599FC20D561}:00000009\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000079\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001010\" GroupPri=\"09000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" Icon=\"{634F8946-FFF0-491F-AF41-B599FC20D561}:0000000e\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000027\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001011\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:0000000e\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000079\" CmdPri=\"02000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001012\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000000b\" Icon=\"{634F8946-FFF0-491F-AF41-B599FC20D561}:0000000e\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:0000000c\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001107\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Icon=\"{EB28B762-7E54-492B-9336-4853994FE349}:0000000b\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:0000000c\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001107\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Icon=\"{EB28B762-7E54-492B-9336-4853994FE349}:0000000b\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000012\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110b\" GroupPri=\"09000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000012\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110b\" GroupPri=\"09000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000007\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110c\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:0000000a\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000032\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110f\" GroupPri=\"0f000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" BeginGroup=\"false\" Width=\"55\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:000002a4\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000011\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000006d\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110a\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000003\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000006d\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110a\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000003\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:000002a4\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000011\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000005\" CmdPri=\"08010001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000009\" BeginGroup=\"false\"/><modify Cmd=\"{A764E897-518D-11D2-9A89-00C04F79EFC3}:00002101\" CmdPri=\"00200000\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001401\" GroupPri=\"01000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" Icon=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000005\" Style=\"0\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00002c13\" CmdPri=\"00100000\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001403\" GroupPri=\"04000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00002c13\" CmdPri=\"00100000\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001403\" GroupPri=\"04000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000014e\" CmdPri=\"00108001\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001403\" GroupPri=\"04000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" Icon=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000003\" BeginGroup=\"false\"/><modify Cmd=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005212\" CmdPri=\"01000000\" Group=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00002f2f\" GroupPri=\"04000000\" Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" Icon=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:0000000d\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000006\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055a\" GroupPri=\"04000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000008\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206d\" CmdPri=\"00080001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000005\" BeginGroup=\"false\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206e\" CmdPri=\"000c0001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000006\" BeginGroup=\"false\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206f\" CmdPri=\"000e0001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" BeginGroup=\"false\" Width=\"55\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002889\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:0000107a\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002889\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:0000107a\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002889\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:0000107a\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002889\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:0000107a\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002932\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001073\" GroupPri=\"00300000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000013\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002932\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001073\" GroupPri=\"00300000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000013\" BeginGroup=\"true\"/><modify Cmd=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00000012\" CmdPri=\"00400000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020001\" GroupPri=\"01000000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" Width=\"55\"/><modify Cmd=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00000014\" CmdPri=\"00300000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020002\" GroupPri=\"01100000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" Icon=\"{E5FD8797-928D-4720-99C6-D9241615013A}:00000001\" BeginGroup=\"false\"/><modify Cmd=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:0000200d\" CmdPri=\"01000000\" Group=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00001002\" GroupPri=\"00500000\" Menu=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00003010\" Width=\"55\"/><modify Cmd=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00002300\" CmdPri=\"01000000\" Group=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00001009\" GroupPri=\"00900000\" Menu=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00003010\" Icon=\"{AD7818C6-4420-4479-B0CB-CE68EFF9C2C8}:00000006\" BeginGroup=\"false\"/></DefaultCustomizations><UserCustomizations><modify_toolbar Menu=\"{15A7A3F3-845F-4D67-B540-5B232293D9A3}:00000101\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,221,26\" DockRectangle=\"6,0,221,26\"/></UserCustomizations></CommandBars><PropertyValue name=\"ShowLargeButtons\">false</PropertyValue><PropertyValue name=\"ShowScreenTips\">true</PropertyValue><PropertyValue name=\"ShowScreenTipShortcutKeys\">false</PropertyValue></Category><Category name=\"Environment_DefaultEditors\" Category=\"{68161AEE-BCA8-4214-B2E4-7875263E49C5}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_DefaultEditors\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"NumberOfMappings\">0</PropertyValue><PropertyValue name=\"NumberOfDefaultEditors\">0</PropertyValue></Category><Category name=\"Environment_Expansions\" Category=\"{0B9A10B2-C0D0-4a6a-8353-115E9CACF34A}\" Package=\"{F5E7E720-1401-11d1-883B-0000F87579D2}\" RegisteredName=\"Environment_Expansions\" PackageName=\"Text Management Package\"><Expansions Default=\"true\" Version=\"1.0\"/></Category><Category name=\"Environment_ExtensionManager\" Category=\"{539391d7-9414-4715-b033-8669db0abee1}\" Package=\"{e7576c05-1874-450c-9e98-cf3a0897a069}\" RegisteredName=\"Environment_ExtensionManager\" PackageName=\"ExtensionManagerPackage\"><PropertyValue name=\"AutomaticallyCheckForUpdates2\">True</PropertyValue><PropertyValue name=\"CustomRepositories\">&lt;ExtensionRepositoryConfigList Capacity=\"0\" xmlns=\"clr-namespace:Microsoft.VisualStudio.ExtensionManager;assembly=Microsoft.VisualStudio.ExtensionEngine\" /&gt;</PropertyValue><PropertyValue name=\"EnableAdminExtensions\">True</PropertyValue></Category><Category name=\"Environment_ExternalTools\" Category=\"{E8FAE9E8-FBA2-4474-B134-AB0FFCFB291D}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_ExternalTools\" PackageName=\"Visual Studio Environment Package\"><ExternalTools><UserCreatedTool><Arguments></Arguments><CloseOnExit>true</CloseOnExit><Command>%vsspv_windows_sdk_dir%\\bin\\NETFX 4.5.1 Tools\\ildasm.exe</Command><Index>3</Index><InitialDirectory>$(targetdir)</InitialDirectory><IsGUIapp>false</IsGUIapp><NameID>0</NameID><Package>{00000000-0000-0000-0000-000000000000}</Package><PromptForArguments>false</PromptForArguments><SaveAllDocs>true</SaveAllDocs><Title>ILDasm</Title><Unicode>false</Unicode><UseOutputWindow>false</UseOutputWindow><UseTaskList>false</UseTaskList></UserCreatedTool><UserCreatedTool><Arguments>/K \"vsdevcmd.bat -no_logo\"</Arguments><CloseOnExit>true</CloseOnExit><Command>%systemroot%\\system32\\cmd.exe</Command><Index>4</Index><InitialDirectory>%vsspv_vs_install_directory%\\Common7\\Tools</InitialDirectory><IsGUIapp>false</IsGUIapp><NameID>10053</NameID><Package>{F1C25864-3097-11D2-A5C5-00C04F7968B4}</Package><PromptForArguments>false</PromptForArguments><SaveAllDocs>true</SaveAllDocs><Title>Visual Studio &amp;Command Prompt</Title><Unicode>false</Unicode><UseOutputWindow>false</UseOutputWindow><UseTaskList>false</UseTaskList></UserCreatedTool></ExternalTools></Category><Category name=\"Environment_FindSymbol\" Category=\"{C93260BC-0C07-484a-8188-6F4763BD7FD4}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_FindSymbol\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"FindOptionsIsExpanded\">false</PropertyValue><PropertyValue name=\"LookinReferencesIsChecked\">true</PropertyValue><PropertyValue name=\"MatchCaseIsChecked\">false</PropertyValue><PropertyValue name=\"Type\">2</PropertyValue><PropertyValue name=\"SelectedScope\">{B1BA9461-FC54-45B3-A484-CB6DD0B95C94}</PropertyValue><PropertyValue name=\"SelectedScopeSubScope\">0</PropertyValue></Category><Category name=\"Environment_KeyBindings\" Category=\"{F09035F1-80D2-4312-8EC4-4D354A4BCB4C}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_KeyBindings\" PackageName=\"Visual Studio Environment Package\"><Version>15.0.0.0</Version><KeyboardShortcuts><ScopeDefinitions><Scope Name=\"Team Explorer\" ID=\"{7AA20502-9463-47B7-BF43-341BAF51157C}\"/><Scope Name=\"VC Dialog Editor\" ID=\"{543E0C02-8C85-4E43-933A-5EF320E3431F}\"/><Scope Name=\"Find All References Tool Window\" ID=\"{1FA1FD06-3592-4D1D-AC75-0B953320140C}\"/><Scope Name=\"Live Property Explorer\" ID=\"{31FC2115-5126-4A87-B2F7-77EAAB65048B}\"/><Scope Name=\"XML (Text) Editor\" ID=\"{FA3CD31E-987B-443A-9B81-186104E8DAC1}\"/><Scope Name=\"Text Editor\" ID=\"{8B382828-6202-11D1-8870-0000F87579D2}\"/><Scope Name=\"Work Item Results View\" ID=\"{7026002D-01F6-44E7-95CF-A896C00DA3F8}\"/><Scope Name=\"ADO.NET Entity Data Model Designer\" ID=\"{C99AEA30-8E36-4515-B76F-496F5A48A6AA}\"/><Scope Name=\"Solution Explorer\" ID=\"{3AE79031-E1BC-11D0-8F78-00A0C9110057}\"/><Scope Name=\"Query Designer\" ID=\"{B2C40B32-3A37-4CA9-97B9-FA44248B69FF}\"/><Scope Name=\"CSharp Editor with Encoding\" ID=\"{08467B34-B90F-4D91-BDCA-EB8C8CF3033A}\"/><Scope Name=\"WebBrowser\" ID=\"{E8B06F41-6D01-11D2-AA7D-00C04F990343}\"/><Scope Name=\"CSS Editor\" ID=\"{A5401142-F49D-43DB-90B1-F57BA349E55C}\"/><Scope Name=\"Graphics Designers\" ID=\"{58961B49-13E0-48C0-9258-13CBC4D40279}\"/><Scope Name=\"DataSet Editor\" ID=\"{B334A759-F450-40A5-BE2A-65937BCD5415}\"/><Scope Name=\"XAML Designer\" ID=\"{E9B8485C-1217-4277-9ED6-C825A5AC1968}\"/><Scope Name=\"View Designer\" ID=\"{B968E165-98E0-41F0-8FBE-A8ED1D246A90}\"/><Scope Name=\"XAML Editor\" ID=\"{A4F9FF65-A78C-4650-866D-5069CC4127CF}\"/><Scope Name=\"Microsoft Visual Basic Editor\" ID=\"{2C015C70-C72C-11D0-88C3-00A0C9110049}\"/><Scope Name=\"Global\" ID=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}\"/><Scope Name=\"HTML Editor\" ID=\"{40D31677-CBC0-4297-A9EF-89D907823A98}\"/><Scope Name=\"Live Visual Tree\" ID=\"{A2EAF38F-A0AD-4503-91F8-5F004A69A040}\"/><Scope Name=\"Work Item Query View\" ID=\"{B6303490-B828-410C-9216-AE727D0E282D}\"/><Scope Name=\"Team Foundation Build Detail Editor\" ID=\"{86306A97-84F2-4F5A-889B-1318501AEB5F}\"/><Scope Name=\"Database Designer\" ID=\"{CFF78A9B-78A3-45A3-9142-0267AFC261FA}\"/><Scope Name=\"Work Item Editor\" ID=\"{40A91D9D-8076-4D28-87C5-5AF9F0ACFE0F}\"/><Scope Name=\"JSON Editor\" ID=\"{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}\"/><Scope Name=\"CSharp Editor\" ID=\"{A6C744A8-0E4A-4FC6-886A-064283054674}\"/><Scope Name=\"VC String Editor\" ID=\"{58442DA9-10DA-4AA9-A2AF-96E4D481379B}\"/><Scope Name=\"Interactive Window\" ID=\"{2D0A56AA-9527-4B78-B6E6-EBE6E05DA749}\"/><Scope Name=\"Merge Editor Window\" ID=\"{9A9A8AAA-ACD2-4DB6-BD81-8D64176C52B6}\"/><Scope Name=\"Microsoft Visual Basic Code Page Editor\" ID=\"{6C33E1AA-1401-4536-AB67-0E21E6E569DA}\"/><Scope Name=\"Settings Designer\" ID=\"{515231AD-C9DC-4AA3-808F-E1B65E72081C}\"/><Scope Name=\"Windows Forms Designer\" ID=\"{BA09E2AF-9DF2-4068-B2F0-4C7E5CC19E2F}\"/><Scope Name=\"VC Accelerator Editor\" ID=\"{EB56D0B5-BEE7-4D0C-8BE6-88A8ED256695}\"/><Scope Name=\"Managed Resources Editor\" ID=\"{FEA4DCC9-3645-44CD-92E7-84B55A16465C}\"/><Scope Name=\"Difference Viewer\" ID=\"{79D52DDF-52BC-43F1-9663-B3E85CDCA912}\"/><Scope Name=\"Table Designer\" ID=\"{4194FEE5-6777-419F-A5FC-47A536DF1BDB}\"/><Scope Name=\"HTML Editor Design View\" ID=\"{CB3FCFEA-03DF-11D1-81D2-00A0C91BBEE3}\"/><Scope Name=\"HTML Editor Source View\" ID=\"{CB3FCFEB-03DF-11D1-81D2-00A0C91BBEE3}\"/><Scope Name=\"VC Image Editor\" ID=\"{C0BA70ED-069E-412B-9C06-7442E28A11B9}\"/><Scope Name=\"Test Explorer\" ID=\"{E1B7D1F8-9B3C-49B1-8F4F-BFC63A88835D}\"/><Scope Name=\"XML Schema Designer\" ID=\"{DEE6CEF9-3BCA-449A-82A6-FC757D6956FB}\"/></ScopeDefinitions><DefaultShortcuts/><ShortcutsScheme>Visual C++ 6</ShortcutsScheme><UserShortcuts><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Editor\">Shift+Alt+L</RemoveShortcut><RemoveShortcut Command=\"Format.ButtonBottom\" Scope=\"VC Dialog Editor\">Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"Format.ButtonRight\" Scope=\"VC Dialog Editor\">Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"Format.TestDialog\" Scope=\"VC Dialog Editor\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWebAccess\" Scope=\"Global\">Ctrl+0, A</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToBuilds\" Scope=\"Global\">Ctrl+0, B</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToConnect\" Scope=\"Global\">Ctrl+0, C</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWebAccess\" Scope=\"Global\">Ctrl+0, Ctrl+A</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToBuilds\" Scope=\"Global\">Ctrl+0, Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToConnect\" Scope=\"Global\">Ctrl+0, Ctrl+C</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToDocuments\" Scope=\"Global\">Ctrl+0, Ctrl+D</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitActiveRepositories\" Scope=\"Global\">Ctrl+0, Ctrl+E</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitChanges\" Scope=\"Global\">Ctrl+0, Ctrl+G</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToHome\" Scope=\"Global\">Ctrl+0, Ctrl+H</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToMyWork\" Scope=\"Global\">Ctrl+0, Ctrl+M</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToPendingChanges\" Scope=\"Global\">Ctrl+0, Ctrl+P</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToReports\" Scope=\"Global\">Ctrl+0, Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToSettings\" Scope=\"Global\">Ctrl+0, Ctrl+S</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWorkItems\" Scope=\"Global\">Ctrl+0, Ctrl+W</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitSynchronization\" Scope=\"Global\">Ctrl+0, Ctrl+Y</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToDocuments\" Scope=\"Global\">Ctrl+0, D</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitActiveRepositories\" Scope=\"Global\">Ctrl+0, E</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitChanges\" Scope=\"Global\">Ctrl+0, G</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToHome\" Scope=\"Global\">Ctrl+0, H</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToMyWork\" Scope=\"Global\">Ctrl+0, M</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToPendingChanges\" Scope=\"Global\">Ctrl+0, P</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToReports\" Scope=\"Global\">Ctrl+0, R</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToSettings\" Scope=\"Global\">Ctrl+0, S</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWorkItems\" Scope=\"Global\">Ctrl+0, W</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitSynchronization\" Scope=\"Global\">Ctrl+0, Y</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToFile\" Scope=\"Global\">Ctrl+1, Ctrl+F</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToMember\" Scope=\"Global\">Ctrl+1, Ctrl+M</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToSymbol\" Scope=\"Global\">Ctrl+1, Ctrl+S</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToType\" Scope=\"Global\">Ctrl+1, Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToFile\" Scope=\"Global\">Ctrl+1, F</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToMember\" Scope=\"Global\">Ctrl+1, M</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToSymbol\" Scope=\"Global\">Ctrl+1, S</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToType\" Scope=\"Global\">Ctrl+1, T</RemoveShortcut><RemoveShortcut Command=\"Debug.Breakpoints\" Scope=\"Global\">Ctrl+Alt+B</RemoveShortcut><RemoveShortcut Command=\"Debug.Threads\" Scope=\"Global\">Ctrl+Alt+H</RemoveShortcut><RemoveShortcut Command=\"View.SolutionExplorer\" Scope=\"Global\">Ctrl+Alt+L</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory1\" Scope=\"Global\">Ctrl+Alt+M, 1</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory2\" Scope=\"Global\">Ctrl+Alt+M, 2</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory3\" Scope=\"Global\">Ctrl+Alt+M, 3</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory4\" Scope=\"Global\">Ctrl+Alt+M, 4</RemoveShortcut><RemoveShortcut Command=\"Debug.AttachtoProcess\" Scope=\"Global\">Ctrl+Alt+P</RemoveShortcut><RemoveShortcut Command=\"View.WebBrowser\" Scope=\"Global\">Ctrl+Alt+R</RemoveShortcut><RemoveShortcut Command=\"View.ServerExplorer\" Scope=\"Global\">Ctrl+Alt+S</RemoveShortcut><RemoveShortcut Command=\"Debug.Modules\" Scope=\"Global\">Ctrl+Alt+U</RemoveShortcut><RemoveShortcut Command=\"Debug.FunctionBreakpoint\" Scope=\"Global\">Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"File.NewFile\" Scope=\"Global\">Ctrl+N</RemoveShortcut><RemoveShortcut Command=\"Window.ActivateQuickLaunch\" Scope=\"Global\">Ctrl+Q</RemoveShortcut><RemoveShortcut Command=\"Refactor.EncapsulateField\" Scope=\"Global\">Ctrl+R, Ctrl+E</RemoveShortcut><RemoveShortcut Command=\"Project.AddNewItem\" Scope=\"Global\">Ctrl+Shift+A</RemoveShortcut><RemoveShortcut Command=\"View.ResourceView\" Scope=\"Global\">Ctrl+Shift+E</RemoveShortcut><RemoveShortcut Command=\"Edit.OpenFile\" Scope=\"Global\">Ctrl+Shift+G</RemoveShortcut><RemoveShortcut Command=\"File.NewProject\" Scope=\"Global\">Ctrl+Shift+N</RemoveShortcut><RemoveShortcut Command=\"Edit.NavigateTo\" Scope=\"Global\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Results View\">Shift+Alt+L</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.MyWorkPageInProgress.TfsContextMyWorkPageNewLinkedWI\" Scope=\"Team Explorer\">Shift+Alt+L</RemoveShortcut><RemoveShortcut Command=\"Edit.ToggleWordWrap\" Scope=\"Text Editor\">Ctrl+E, Ctrl+W</RemoveShortcut><RemoveShortcut Command=\"Edit.ListMembers\" Scope=\"Text Editor\">Ctrl+J</RemoveShortcut><RemoveShortcut Command=\"Edit.MakeLowercase\" Scope=\"Text Editor\">Ctrl+U</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.ExecuteInInteractive\" Scope=\"CSharp Editor\">Ctrl+E, Ctrl+E</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.ExecuteInInteractive\" Scope=\"CSharp Editor\">Ctrl+E, E</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.ExecuteSQL\" Scope=\"Query Designer\">Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.CancelRetrievingData\" Scope=\"Query Designer\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Query View\">Shift+Alt+L</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.ExecuteSQL\" Scope=\"View Designer\">Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.CancelRetrievingData\" Scope=\"View Designer\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Image.ShowGrid\" Scope=\"VC Image Editor\">Ctrl+Alt+S</RemoveShortcut><RemoveShortcut Command=\"Image.BrushTool\" Scope=\"VC Image Editor\">Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"Image.FilledRectangleTool\" Scope=\"VC Image Editor\">Ctrl+Shift+Alt+R</RemoveShortcut><RemoveShortcut Command=\"Image.TextTool\" Scope=\"VC Image Editor\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Image.UseSelectionasBrush\" Scope=\"VC Image Editor\">Ctrl+U</RemoveShortcut><RemoveShortcut Command=\"Format.Bold\" Scope=\"HTML Editor Design View\">Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"View.ASP.NETNonvisualControls\" Scope=\"HTML Editor Design View\">Ctrl+Shift+N</RemoveShortcut><RemoveShortcut Command=\"Format.Underline\" Scope=\"HTML Editor Design View\">Ctrl+U</RemoveShortcut><RemoveShortcut Command=\"Design.RefreshPage\" Scope=\"XAML Designer\">Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"Format.ResetAll\" Scope=\"XAML Designer\">Ctrl+Shift+R</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToImplementation\" Scope=\"CSharp Editor with Encoding\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToImplementation\" Scope=\"Microsoft Visual Basic Editor\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.SearchHistoryNext\" Scope=\"Interactive Window\">Ctrl+Alt+Down Arrow</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.SearchHistoryPrevious\" Scope=\"Interactive Window\">Ctrl+Alt+Up Arrow</RemoveShortcut><RemoveShortcut Command=\"Debug.Graphics.StartGraphicsDebugging\" Scope=\"Global\">Alt+F5</RemoveShortcut><RemoveShortcut Command=\"View.Backward\" Scope=\"Global\">Alt+Left Arrow</RemoveShortcut><RemoveShortcut Command=\"View.Forward\" Scope=\"Global\">Alt+Right Arrow</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.ProcessCombo\" Scope=\"Global\">Ctrl+5</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.ThreadCombo\" Scope=\"Global\">Ctrl+6</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.StackFrameCombo\" Scope=\"Global\">Ctrl+7</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.ToggleCurrentThreadFlaggedState\" Scope=\"Global\">Ctrl+8</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.ToggleFlaggedThreads\" Scope=\"Global\">Ctrl+9</RemoveShortcut><RemoveShortcut Command=\"View.TaskRunnerExplorer\" Scope=\"Global\">Ctrl+Alt+Bkspce</RemoveShortcut><RemoveShortcut Command=\"Window.ShowEzMDIFileList\" Scope=\"Global\">Ctrl+Alt+Down Arrow</RemoveShortcut><RemoveShortcut Command=\"OtherContextMenus.BrowserLink.RefreshLinkedBrowsers\" Scope=\"Global\">Ctrl+Alt+Enter</RemoveShortcut><RemoveShortcut Command=\"EditorContextMenus.CodeWindow.Execute\" Scope=\"Global\">Ctrl+Alt+F5</RemoveShortcut><RemoveShortcut Command=\"Project.Override\" Scope=\"Global\">Ctrl+Alt+Ins</RemoveShortcut><RemoveShortcut Command=\"Window.NextTab\" Scope=\"Global\">Ctrl+Alt+PgDn</RemoveShortcut><RemoveShortcut Command=\"Window.PreviousTab\" Scope=\"Global\">Ctrl+Alt+PgUp</RemoveShortcut><RemoveShortcut Command=\"Debug.ToggleDisassembly\" Scope=\"Global\">Ctrl+F11</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToDeclaration\" Scope=\"Global\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"Window.NextDocumentWindow\" Scope=\"Global\">Ctrl+F6</RemoveShortcut><RemoveShortcut Command=\"View.BrowseNext\" Scope=\"Global\">Ctrl+Shift+1</RemoveShortcut><RemoveShortcut Command=\"View.BrowsePrevious\" Scope=\"Global\">Ctrl+Shift+2</RemoveShortcut><RemoveShortcut Command=\"View.ForwardBrowseContext\" Scope=\"Global\">Ctrl+Shift+7</RemoveShortcut><RemoveShortcut Command=\"Window.AddTabtoSelection\" Scope=\"Global\">Ctrl+Shift+Alt+Space</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToDefinition\" Scope=\"Global\">F12</RemoveShortcut><RemoveShortcut Command=\"Edit.QuickFindSymbol\" Scope=\"Global\">Shift+Alt+F12</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToImplementation\" Scope=\"Microsoft Visual Basic Code Page Editor\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"Edit.MoveSelectedLinesDown\" Scope=\"Text Editor\">Alt+Down Arrow</RemoveShortcut><RemoveShortcut Command=\"View.QuickActions\" Scope=\"Text Editor\">Alt+Enter</RemoveShortcut><RemoveShortcut Command=\"Edit.PeekDefinition\" Scope=\"Text Editor\">Alt+F12</RemoveShortcut><RemoveShortcut Command=\"Edit.CompleteWord\" Scope=\"Text Editor\">Alt+Right Arrow</RemoveShortcut><RemoveShortcut Command=\"Edit.MoveSelectedLinesUp\" Scope=\"Text Editor\">Alt+Up Arrow</RemoveShortcut><RemoveShortcut Command=\"Edit.ToggleCompletionMode\" Scope=\"Text Editor\">Ctrl+Alt+Space</RemoveShortcut><RemoveShortcut Command=\"Edit.LineOpenAbove\" Scope=\"Text Editor\">Ctrl+Enter</RemoveShortcut><RemoveShortcut Command=\"Edit.WordPreviousExtendColumn\" Scope=\"Text Editor\">Ctrl+Shift+Alt+Left Arrow</RemoveShortcut><RemoveShortcut Command=\"Edit.WordNextExtendColumn\" Scope=\"Text Editor\">Ctrl+Shift+Alt+Right Arrow</RemoveShortcut><RemoveShortcut Command=\"Edit.ParameterInfo\" Scope=\"Text Editor\">Ctrl+Shift+Space</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToImplementation\" Scope=\"CSharp Editor\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Diagram\" Scope=\"Query Designer\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Criteria\" Scope=\"Query Designer\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.SQL\" Scope=\"Query Designer\">Ctrl+3</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Results\" Scope=\"Query Designer\">Ctrl+4</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Diagram\" Scope=\"View Designer\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Criteria\" Scope=\"View Designer\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.SQL\" Scope=\"View Designer\">Ctrl+3</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Results\" Scope=\"View Designer\">Ctrl+4</RemoveShortcut><RemoveShortcut Command=\"View.EntityDataModelBrowser\" Scope=\"ADO.NET Entity Data Model Designer\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"View.EntityDataModelMappingDetails\" Scope=\"ADO.NET Entity Data Model Designer\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"Table.RowBelow\" Scope=\"HTML Editor Design View\">Ctrl+Alt+Down Arrow</RemoveShortcut><RemoveShortcut Command=\"Table.RowAbove\" Scope=\"HTML Editor Design View\">Ctrl+Alt+Up Arrow</RemoveShortcut><RemoveShortcut Command=\"XsdDesigner.ShowStartView\" Scope=\"XML Schema Designer\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"XsdDesigner.ShowContentModelView\" Scope=\"XML Schema Designer\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"XsdDesigner.ShowGraphView\" Scope=\"XML Schema Designer\">Ctrl+3</RemoveShortcut><RemoveShortcut Command=\"TestExplorer.OpenTest\" Scope=\"Test Explorer\">F12</RemoveShortcut><RemoveShortcut Command=\"Design.FitAll\" Scope=\"XAML Designer\">Ctrl+0</RemoveShortcut><RemoveShortcut Command=\"Format.EditText\" Scope=\"XAML Designer\">F2</RemoveShortcut><RemoveShortcut Command=\"XML.StartXSLTDebugging\" Scope=\"XML (Text) Editor\">Alt+F5</RemoveShortcut><RemoveShortcut Command=\"XML.StartXSLTWithoutDebugging\" Scope=\"XML (Text) Editor\">Ctrl+Alt+F5</RemoveShortcut><RemoveShortcut Command=\"Resources.Strings\" Scope=\"Managed Resources Editor\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"Resources.Images\" Scope=\"Managed Resources Editor\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"Resources.Icons\" Scope=\"Managed Resources Editor\">Ctrl+3</RemoveShortcut><RemoveShortcut Command=\"Resources.Audio\" Scope=\"Managed Resources Editor\">Ctrl+4</RemoveShortcut><RemoveShortcut Command=\"Resources.Files\" Scope=\"Managed Resources Editor\">Ctrl+5</RemoveShortcut><RemoveShortcut Command=\"Resources.Other\" Scope=\"Managed Resources Editor\">Ctrl+6</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Editor\">Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Format.ButtonBottom\" Scope=\"VC Dialog Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Format.ButtonRight\" Scope=\"VC Dialog Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Format.TestDialog\" Scope=\"VC Dialog Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWebAccess\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToBuilds\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToConnect\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWebAccess\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToBuilds\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToConnect\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToDocuments\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitActiveRepositories\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitChanges\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToHome\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToMyWork\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToPendingChanges\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToReports\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToSettings\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWorkItems\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitSynchronization\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToDocuments\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitActiveRepositories\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitChanges\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToHome\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToMyWork\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToPendingChanges\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToReports\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToSettings\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWorkItems\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitSynchronization\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToFile\" Scope=\"Global\">Ctrl+1, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToMember\" Scope=\"Global\">Ctrl+1, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToSymbol\" Scope=\"Global\">Ctrl+1, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToType\" Scope=\"Global\">Ctrl+1, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToFile\" Scope=\"Global\">Ctrl+1, ·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToMember\" Scope=\"Global\">Ctrl+1, ·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToSymbol\" Scope=\"Global\">Ctrl+1, ·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToType\" Scope=\"Global\">Ctrl+1, ·</RemoveShortcut><RemoveShortcut Command=\"Debug.Breakpoints\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Debug.Threads\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"View.SolutionExplorer\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory1\" Scope=\"Global\">Ctrl+Alt+·, 1</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory2\" Scope=\"Global\">Ctrl+Alt+·, 2</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory3\" Scope=\"Global\">Ctrl+Alt+·, 3</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory4\" Scope=\"Global\">Ctrl+Alt+·, 4</RemoveShortcut><RemoveShortcut Command=\"Debug.AttachtoProcess\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"View.WebBrowser\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"View.ServerExplorer\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Debug.Modules\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Debug.FunctionBreakpoint\" Scope=\"Global\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"File.NewFile\" Scope=\"Global\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Window.ActivateQuickLaunch\" Scope=\"Global\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Refactor.EncapsulateField\" Scope=\"Global\">Ctrl+·, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Project.AddNewItem\" Scope=\"Global\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"View.ResourceView\" Scope=\"Global\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"Edit.OpenFile\" Scope=\"Global\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"File.NewProject\" Scope=\"Global\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"Edit.NavigateTo\" Scope=\"Global\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Results View\">Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.MyWorkPageInProgress.TfsContextMyWorkPageNewLinkedWI\" Scope=\"Team Explorer\">Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.ExecuteInInteractive\" Scope=\"CSharp Editor\">Ctrl+·, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.ExecuteInInteractive\" Scope=\"CSharp Editor\">Ctrl+·, ·</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.ExecuteSQL\" Scope=\"Query Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.CancelRetrievingData\" Scope=\"Query Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Query View\">Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.ExecuteSQL\" Scope=\"View Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.CancelRetrievingData\" Scope=\"View Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Image.ShowGrid\" Scope=\"VC Image Editor\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Image.BrushTool\" Scope=\"VC Image Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Image.FilledRectangleTool\" Scope=\"VC Image Editor\">Ctrl+Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Image.PreviousRightColor\" Scope=\"VC Image Editor\">Ctrl+Shift+[</RemoveShortcut><RemoveShortcut Command=\"Image.TextTool\" Scope=\"VC Image Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Image.UseSelectionasBrush\" Scope=\"VC Image Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Format.Bold\" Scope=\"HTML Editor Design View\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"View.ASP.NETNonvisualControls\" Scope=\"HTML Editor Design View\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"Format.Underline\" Scope=\"HTML Editor Design View\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Design.RefreshPage\" Scope=\"XAML Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Format.ResetAll\" Scope=\"XAML Designer\">Ctrl+Shift+·</RemoveShortcut><Shortcut Command=\"VisualAssist.RefactorCreateImplementation\" Scope=\"Global\">Shift+Alt+I</Shortcut><Shortcut Command=\"Window.CloseDocumentWindow\" Scope=\"Global\">Ctrl+F4</Shortcut><Shortcut Command=\"Window.CloseDocumentWindow\" Scope=\"Text Editor\">Ctrl+·</Shortcut><Shortcut Command=\"VisualAssist.RefactorCreateImplementation\" Scope=\"Global\">Shift+Alt+·</Shortcut><Shortcut Command=\"VisualAssist.SortSelectedLines\" Scope=\"Global\">Ctrl+Shift+Alt+S</Shortcut></UserShortcuts></KeyboardShortcuts></Category><Category name=\"Environment_NewProjectDialogPreferredLanguage\" Category=\"{77E22C0C-9F4A-4bfb-AD3A-3F3F4711E9ED}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_NewProjectDialogPreferredLanguage\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"HasNewProjectDialogPreferredLanguage\">true</PropertyValue><PropertyValue name=\"NewProjectDialogPreferredLanguage\">VC++</PropertyValue><PropertyValue name=\"DefaultToLargeIconView\">false</PropertyValue></Category><Category name=\"Environment_ObjectBrowser\" Category=\"{D98D784D-88BF-4EBF-B039-C146EC14F472}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_ObjectBrowser\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ObjectBrowserViewNamespaces\">false</PropertyValue><PropertyValue name=\"ObjectBrowserShowHiddenTypesAndMembers\">false</PropertyValue><PropertyValue name=\"ObjectBrowserTypesSortAlphabetically\">true</PropertyValue><PropertyValue name=\"ObjectBrowserTypesSortByType\">false</PropertyValue><PropertyValue name=\"ObjectBrowserTypesSortByAccess\">false</PropertyValue><PropertyValue name=\"ObjectBrowserTypesGroupByType\">false</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsSortByBestMatch\">true</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsSortByType\">false</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsSortByAccess\">false</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsGroupByType\">false</PropertyValue><PropertyValue name=\"ObjectBrowserMembersViewPublic\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersViewProtected\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersViewPrivate\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersViewOther\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersShowInherited\">false</PropertyValue><PropertyValue name=\"ObjectBrowserShowExtensionMembers\">false</PropertyValue><PropertyValue name=\"ObjectBrowserShowBaseTypes\">true</PropertyValue><PropertyValue name=\"ObjectBrowserShowDerivedTypes\">false</PropertyValue><PropertyValue name=\"ObjectBrowserMembersSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ObjectBrowserMembersSortByType\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersSortByAccess\">false</PropertyValue><PropertyValue name=\"ObjectBrowserScope\">{B1BA9461-FC54-45B3-A484-CB6DD0B95C94}</PropertyValue><PropertyValue name=\"ObjectBrowserScopeSubScope\">0</PropertyValue><PropertyValue name=\"DefaultPresentationLanguage\">VC++</PropertyValue></Category><Category name=\"Environment_OutputWindow\" Category=\"{07C6CD04-100B-4f3e-BA93-DD1363E8D8E3}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_OutputWindow\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"OutputWindowWordWrap\">false</PropertyValue></Category><Category name=\"Environment_PropertiesWindow\" Category=\"{731a3cc7-de5e-49ca-9115-9a03e46624b0}\" Package=\"{7494682b-37a0-11d2-a273-00c04f8ef4ff}\" RegisteredName=\"Environment_PropertiesWindow\" PackageName=\"Windows Forms Designer Package\"><PropertyValue name=\"PbrsAlpha\">0</PropertyValue><PropertyValue name=\"PbrsShowDesc\">1</PropertyValue></Category><Category name=\"Environment_QuickLaunch\" Category=\"{dfbffb75-d8ed-47a2-87de-1d246fd06ae5}\" Package=\"{18333854-d2ff-44a3-98d8-40501b914d7d}\" RegisteredName=\"Environment_QuickLaunch\" PackageName=\"Global Search Package\"><PropertyValue name=\"UseGlobalSearch\">true</PropertyValue><PropertyValue name=\"PreserveSearchResults\">false</PropertyValue><SearchProviders><Provider Name=\"Most Recently Used\" Id=\"{3ef528c5-c45a-47e0-b9ee-a212a32a99ec}\" Enabled=\"True\"/><Provider Name=\"Menus\" Id=\"{f7a34a7c-b596-4bfa-b119-321539fc96ed}\" Enabled=\"True\"/><Provider Name=\"Options\" Id=\"{258ebb6f-5c3b-4241-b929-71ec7a18dbf0}\" Enabled=\"True\"/><Provider Name=\"Open Documents\" Id=\"{28a7edd7-524f-4c82-8e1e-1e472357454d}\" Enabled=\"True\"/><Provider Name=\"NuGet Packages\" Id=\"{042c2b4b-c7f7-49db-b7a2-402eb8dc7892}\" Enabled=\"True\"/></SearchProviders></Category><Category name=\"Environment_SimplifiedToolsOptions\" Category=\"{13BEDEE6-9051-4809-B9E3-2EEC749EB15A}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_SimplifiedToolsOptions\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"SupportsSimpleToolsOptions\">false</PropertyValue><PropertyValue name=\"ShowingAllPages\">false</PropertyValue><PropertyValue name=\"ShowFlatList\">false</PropertyValue></Category><Category name=\"Environment_SolutionExplorer\" Category=\"{6FA9062F-82B2-4725-BA6D-58CF7CBA7DEA}\" Package=\"{cf6a5c16-83b0-4d04-b702-195c35c6e887}\" RegisteredName=\"Environment_SolutionExplorer\" PackageName=\"Microsoft.VisualStudio.PlatformUI.SolutionNavigatorPackage\"><PropertyValue name=\"SearchFileContents\">true</PropertyValue><PropertyValue name=\"SearchExternalItems\">true</PropertyValue></Category><Category name=\"Environment_StartPage\" Category=\"{255FE6D3-A0AE-4076-A509-D581B2BE4F9E}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_StartPage\" PackageName=\"Visual Studio Environment Package\"><StartPages Version=\"1.0\"><StartPage Id=\"Default\" Links=\"VC\"/></StartPages></Category><Category name=\"Environment_TabsAndWindows\" Category=\"{CCF27946-63D9-4806-91BA-EEBF5F3DFA4A}\" Package=\"{5E56B3DB-7964-4588-8D49-D3523AB7BDB9}\" RegisteredName=\"Environment_TabsAndWindows\" PackageName=\"Environment Package Window Management\"><PropertyValue name=\"EnableIndependentTabWell\">True</PropertyValue><PropertyValue name=\"EnableIndependentToolWindows\">False</PropertyValue><PropertyValue name=\"EnablePreviewTab\">True</PropertyValue><PropertyValue name=\"EnableSingleClickPreviewInFindResults\">True</PropertyValue><PropertyValue name=\"EnableSingleClickPreviewInNavigateTo\">True</PropertyValue><PropertyValue name=\"EnableSingleClickPreviewInSolutionExplorer\">True</PropertyValue><PropertyValue name=\"MaintainPinStatus\">False</PropertyValue><PropertyValue name=\"ShowAutoHiddenWindowsOnHover\">False</PropertyValue><PropertyValue name=\"ShowPinButtonInUnpinnedTabs\">True</PropertyValue><PropertyValue name=\"ShowPinnedTabsInSeparateRow\">False</PropertyValue></Category><Category name=\"Environment_Toolbox\" Category=\"{481999F2-7479-4e03-83D5-BE808BA142DF}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_Toolbox\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ShowAllTabs\">false</PropertyValue><PropertyValue name=\"Version\">1</PropertyValue><PropertyValue name=\"DeletedTabCount\">0</PropertyValue><PropertyValue name=\"TabCount\">0</PropertyValue><PropertyValue name=\"DeletedItemCount\">0</PropertyValue><PropertyValue name=\"ItemCount\">0</PropertyValue></Category><Category name=\"Environment_UnifiedFind\" Category=\"{DF00ADDF-C14C-4ffd-9325-634FD605850B}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_UnifiedFind\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"Options\">MatchCase=0 WholeWord=0 Hidden=1 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=0 KeepOpen=0 NameOnly=0 Append=0 Plain Document Find</PropertyValue><PropertyValue name=\"DialogOptions\">MatchCase=0 WholeWord=0 Hidden=1 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=1 KeepOpen=0 NameOnly=0 Append=0 Plain Solution FindAll</PropertyValue><PropertyValue name=\"AdornmentOptions\">MatchCase=0 WholeWord=0 Hidden=1 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=0 KeepOpen=0 NameOnly=0 Append=0 Plain Document Find</PropertyValue><PropertyValue name=\"Result list\">1</PropertyValue><PropertyValue name=\"ShowEndOfSearch\">1</PropertyValue><PropertyValue name=\"ShowNoFound\">1</PropertyValue><PropertyValue name=\"ShowAllReplacementsNotAllowed\">1</PropertyValue><PropertyValue name=\"ShowSomeReplacementsNotAllowed\">1</PropertyValue><PropertyValue name=\"ShowNoMore\">1</PropertyValue><PropertyValue name=\"ShowFindStart\">1</PropertyValue><PropertyValue name=\"ShowCancel\">1</PropertyValue><PropertyValue name=\"ShowCancelBeforeReplacementsMade\">1</PropertyValue><PropertyValue name=\"ShowReplaceInFilesWarning\">1</PropertyValue><PropertyValue name=\"ShowCancelEntireReplaceAfterCancellingSCC\">1</PropertyValue><PropertyValue name=\"AutomaticallyLimitSearchToSelection\">1</PropertyValue><PropertyValue name=\"FindTextFromEditor\">1</PropertyValue><PropertyValue name=\"HitReplaced\">1</PropertyValue><PropertyValue name=\"EditableFindInFilesResults\">1</PropertyValue><PropertyValue name=\"Syntax\">Regex</PropertyValue><PropertyValue name=\"In Files Pane Display Options\">0</PropertyValue><PropertyValue name=\"NumberOfScopes\">0</PropertyValue></Category><Category name=\"Environment_WindowLayout\" Category=\"{eb4ba109-a9db-4445-bd09-e7604bcdce84}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_WindowLayout\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"Version\">7</PropertyValue><PropertyValue name=\"WindowProfileNames\">Design|Debug|NoToolWin</PropertyValue><Design><WindowProfile xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:wm=\"clr-namespace:Microsoft.VisualStudio.Platform.WindowManagement;assembly=Microsoft.VisualStudio.Platform.WindowManagement\" Name=\"Design\" xmlns=\"clr-namespace:Microsoft.VisualStudio.PlatformUI.Shell;assembly=Microsoft.VisualStudio.Shell.ViewManager\"><MainSite FloatingTop=\"1.81132075471698\" FloatingLeft=\"1.81132075471698\" FloatingHeight=\"953.660377358491\" FloatingWidth=\"1753.35849056604\" FloatingWindowState=\"Maximized\"><AutoHideRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\" DockRestriction=\"AlwaysFloating\"><AutoHideChannel Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Right\" Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingTop=\"76.8\" FloatingLeft=\"819.2\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/></AutoHideGroup><AutoHideGroup><wm:ToolWindowView OnTopWhenLastInContext=\"False\" ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}\" DockedHeight=\"384\" DockedWidth=\"204.8\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/></AutoHideGroup><AutoHideGroup><wm:ToolWindowView OnTopWhenLastInContext=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6d4078d1-5951-4ed1-ac0e-0a8099c1cce5}\" DockedHeight=\"537.6\" DockedWidth=\"307.2\" AutoHideWidth=\"307.2\" AutoHideHeight=\"537.6\" FloatingHeight=\"537.6\" FloatingWidth=\"307.2\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Top\"/><AutoHideChannel Dock=\"Bottom\" IsVisible=\"True\"><AutoHideGroup IsVisible=\"True\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"1024\" AutoHideHeight=\"448\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{588470cc-84f8-4a57-9ac4-86bca0625ff4}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{b869198c-f673-46d2-83ae-64f515277716}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{b8399b49-7330-487b-9235-7d2e969d0a79}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView Name=\"ST:0:0:{778b5376-ad77-4751-acdc-f3d18343f8dd}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887920-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887921-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{68487888-204a-11d3-87eb-00c04f7971a5}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{be4d7042-ba3f-11d2-840e-00c04f9902c1}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{605322a2-17ae-43f4-b60f-766556e46c87}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f564}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f565}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{905da7d1-18fd-4a46-8d0f-a5ff58ada9de}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{519e8a32-1c95-4a42-956f-2cee2f28eb0f}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{92547016-2bd0-4dfe-bd4f-5b52bdce0037}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ecb7191a-597b-41f5-9843-03a4cf275dde}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{fdffccf2-5f63-404f-86ad-33693f544948}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd5b-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{637792aa-f332-4bb5-be6c-066b0e88eced}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f044f2c2-3d99-4787-a492-6b09a19df7c0}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f16e7758-bfd9-4360-a45f-6deeae786164}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f2c4be33-ca39-41a6-a69a-f4ed439d4178}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"104\" IconResourcePackage=\"8889e051-b7f9-4781-bb33-2a36a9bdb3a5\" Name=\"ST:0:0:{cdbdee54-b399-484b-b763-db2c3393d646}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{9a7cebbb-dc5c-4986-bc49-962da46aa506}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><wm:ToolWindowView ForceCreate=\"DontForceCreate\" IconIndex=\"1\" IconResourceID=\"107\" IconResourcePackage=\"44630d46-96b5-488c-8df9-26e21db8c1a3\" Name=\"ST:0:0:{6bf43c00-192e-4279-9dd1-c19a4c0ab983}\" DockedHeight=\"192\" DockedWidth=\"1024\" FloatingTop=\"200\" FloatingLeft=\"200\" FloatingHeight=\"400\" FloatingWidth=\"1000\"/></AutoHideGroup></AutoHideChannel><DockRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"348.16\"><TabGroup IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"348.16\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"2\" IconResourceID=\"107\" IconResourcePackage=\"44630d46-96b5-488c-8df9-26e21db8c1a3\" Name=\"ST:0:0:{32a6260a-0121-4878-95e5-80d2f08ea4cb}\" IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"600\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"3\" IconResourceID=\"107\" IconResourcePackage=\"44630d46-96b5-488c-8df9-26e21db8c1a3\" Name=\"ST:0:0:{8e5c1d1a-8a91-4406-aa56-5bf27c97d63c}\" IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"600\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}\" IsSelected=\"True\" IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c9c0ae26-aa77-11d2-b3f0-0000f87570ee}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"109\" IconResourcePackage=\"3a3e1789-3e35-47b0-8567-d2fb407cc63d\" Name=\"ST:0:0:{de1fc918-f32e-4dd7-a915-1792a051f26b}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{2d7728c2-de0a-45b5-99aa-89b609dfde73}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView Name=\"ST:0:0:{9f3ec988-1174-4746-a66a-3969715d1fc7}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{131369f2-062d-44a2-8671-91ff31efb4f4}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{3addf8e2-81cc-41a0-9785-dbd2d86064bd}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{0db31cc8-2322-4f59-a610-1fdc8423df77}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{1cba9826-3184-4799-a184-784e41b56398}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{38ed9834-0c97-445b-bd1d-f78f3e08afac}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{402dc223-d700-4029-866f-acee803f3f0c}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a9b00010-7308-415c-95c6-eed62c1b9788}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{9c7d10e9-0147-4363-bf48-917f0426cd03}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{dd1ddd20-d59b-11da-a94d-0800200c9a66}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/></TabGroup><TabGroup DockedHeight=\"768\" DockedWidth=\"348.16\"><ViewBookmark Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"348.16\"/><ViewBookmark Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"348.16\"/></TabGroup></DockGroup><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a2eaf38f-a0ad-4503-91f8-5f004a69a040}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><DocumentGroupContainer Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><wm:WMDocumentGroup IsVisible=\"True\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{46c87f81-5a06-43a8-9e25-85d33bac49f8}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{269a02dc-6af8-11d3-bdc4-00c04f688e50}\" FloatingHeight=\"384\" FloatingWidth=\"512\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{99b8fa2f-ab90-4f57-9c32-949f146f1914}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c79b74ff-f1d7-4c94-aefa-4d22bfe1b1f9}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView Name=\"ST:0:0:{93a69444-e846-4571-9e03-a8433ad9ddf9}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{cb4d394c-6408-4607-8c42-0910d3147a4e}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{e5c2cce5-61d0-4cd8-a946-13ec76cfdb01}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{65d61de1-c41c-4504-8c3d-c97027b25ca8}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMDocumentGroup><wm:WMDocumentGroup><ViewBookmark Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" ViewBookmarkType=\"DocumentWell\"/></wm:WMDocumentGroup></DocumentGroupContainer><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{31fc2115-5126-4a87-b2f7-77eaab65048b}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><ViewBookmark Name=\"ST:0:0:{6d4078d1-5951-4ed1-ac0e-0a8099c1cce5}\" DockedHeight=\"537.6\" DockedWidth=\"307.2\"/></DockGroup><DockGroup DockedHeight=\"192\" DockedWidth=\"1024\"><TabGroup DockedHeight=\"192\"><ViewBookmark Name=\"ST:0:0:{588470cc-84f8-4a57-9ac4-86bca0625ff4}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{b869198c-f673-46d2-83ae-64f515277716}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{b8399b49-7330-487b-9235-7d2e969d0a79}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{778b5376-ad77-4751-acdc-f3d18343f8dd}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{0f887920-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{0f887921-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{68487888-204a-11d3-87eb-00c04f7971a5}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{be4d7042-ba3f-11d2-840e-00c04f9902c1}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{605322a2-17ae-43f4-b60f-766556e46c87}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f564}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f565}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{905da7d1-18fd-4a46-8d0f-a5ff58ada9de}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{519e8a32-1c95-4a42-956f-2cee2f28eb0f}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{92547016-2bd0-4dfe-bd4f-5b52bdce0037}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{ecb7191a-597b-41f5-9843-03a4cf275dde}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{fdffccf2-5f63-404f-86ad-33693f544948}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{73f6dd5b-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{637792aa-f332-4bb5-be6c-066b0e88eced}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{f044f2c2-3d99-4787-a492-6b09a19df7c0}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{f16e7758-bfd9-4360-a45f-6deeae786164}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{f2c4be33-ca39-41a6-a69a-f4ed439d4178}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{cdbdee54-b399-484b-b763-db2c3393d646}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{9a7cebbb-dc5c-4986-bc49-962da46aa506}\" DockedHeight=\"192\"/><ViewBookmark Name=\"ST:0:0:{6bf43c00-192e-4279-9dd1-c19a4c0ab983}\" DockedHeight=\"192\"/></TabGroup><TabGroup DockedHeight=\"192\" DockedWidth=\"100\"><ViewBookmark Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"192\" DockedWidth=\"100\"/></TabGroup></DockGroup></DockGroup><DockGroup Orientation=\"Vertical\" DockedHeight=\"537.6\" DockedWidth=\"204.8\"><TabGroup DockedHeight=\"537.6\" DockedWidth=\"204.8\"><ViewBookmark Name=\"ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{099ca9ea-0ae4-4e31-a7e4-fe09bd1715cc}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><ViewBookmark Name=\"ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{07cd18b4-3ba1-11d2-890a-0060083196c6}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{4a791147-19e4-11d3-b86b-00c04f79f802}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd58-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{57dc5d59-11c2-4955-a7b4-d7699d677e93}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{5b6781c0-e99d-11d0-9954-00a0c91bc8e5}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{47a7d881-d3cf-4036-b57c-0444e12df881}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"105\" IconResourcePackage=\"8889e051-b7f9-4781-bb33-2a36a9bdb3a5\" Name=\"ST:0:0:{a34b1c5d-6d37-4a0c-a8b0-99f8e8158b48}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><ViewBookmark Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\"/></TabGroup><TabGroup DockedHeight=\"384\" DockedWidth=\"204.8\"><ViewBookmark Name=\"ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}\" DockedHeight=\"384\" DockedWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{66dba47c-61df-11d2-aa79-00c04f990343}\" DockedHeight=\"384\" DockedWidth=\"204.8\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/></TabGroup></DockGroup></DockGroup></DockRoot></AutoHideRoot></MainSite><wm:WMFloatSite Id=\"e5b6b996-1556-40af-8b11-39aef7eec003\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"7ab36c61-a40b-4c14-96ad-aa00dc4369b2\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"b12a44b3-2a5f-4c64-8e28-0954a914481f\" FloatingTop=\"79\" FloatingLeft=\"0\" FloatingHeight=\"299\" FloatingWidth=\"379\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" IsSelected=\"True\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingTop=\"79\" FloatingLeft=\"0\" FloatingHeight=\"299\" FloatingWidth=\"379\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"627819c5-448d-4bed-a989-45dd1dff5526\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"ef90a138-4bd6-4c50-8346-93505415edc6\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"14f10035-3279-4175-80fd-9ac5bc1b119b\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"394383af-6c69-4ddf-beb8-41834249f0f7\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"1f2adc80-941f-4fa5-8f21-9570109b5e7d\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"f5924940-f281-48fd-aee6-c562ab71ad80\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"8c13bda8-7176-4b17-a8c8-44ba7fa3d39f\"><wm:ToolWindowView Name=\"ST:0:0:{ed485b08-5acf-4ce9-8e13-699174ea0201}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"7b078ec9-8ae0-4599-b2fd-e1cc021c6744\"><wm:ToolWindowView Name=\"ST:0:0:{ecdd9ee0-ac6b-11d0-89f9-00a0c9110055}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"be3b4a18-5d2a-4f63-85b9-d0c2b8f2c95c\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf577b8c-4134-11d2-83e5-00c04f9902c1}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"eed383a7-dddd-42e1-9096-f28783b82aac\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f2e84780-2af1-11d1-a7fa-00a0c9110051}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"c5be364a-4887-45bf-82e9-d6e5e89c9819\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a18f9d0-b838-11d0-93eb-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"01f49ae7-ec14-4a0e-818b-d0f262f5003b\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"ff665e87-edbc-4da5-858b-ed637107ad8d\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"4124da37-1e41-486a-8455-6cdde4540d95\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"bf5a3c6e-d327-439b-bcb2-f8851ce41698\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"fb0b0a67-0f05-4865-849b-7087eb26184c\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ca4b8ff5-bfc7-11d2-9929-00c04f68fdaf}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"80caf959-e153-4e19-85c7-c34062908585\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{51c76317-9037-4cf2-a20a-6206fd30b4a1}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"ec7ed71e-cf1f-4457-b21b-987d1625f58c\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><TabGroup FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e62ce6a0-b439-11d0-a79d-00a0c9110051}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{8d263989-ff4b-4a78-90c8-b2ba3fa69311}\" FloatingTop=\"400\" FloatingLeft=\"400\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></TabGroup></wm:WMFloatSite><wm:WMFloatSite Id=\"01bec7b8-2dda-4779-9755-616ca98e7af0\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{37aba9be-445a-11d3-9949-00c04f68fd0a}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"9bdee280-7bc3-4fb7-9e32-f10e7d37f6d9\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"460b3a44-a960-437e-896c-93d00decadc3\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"f330d709-aca0-4ffd-8e21-4232be344bff\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"5a653553-7db5-410d-9dda-d5a1778797c3\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"bb471955-afe3-464a-bb56-bc59776df320\"><wm:ToolWindowView Name=\"ST:0:0:{e3369cf0-996f-45ba-881e-2af696fbe27b}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"de3895d9-25ee-4364-b08a-9f3a01445dc3\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{0504ff91-9d61-11d0-a794-00a0c9110051}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite></WindowProfile></Design><Debug><WindowProfile xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:wm=\"clr-namespace:Microsoft.VisualStudio.Platform.WindowManagement;assembly=Microsoft.VisualStudio.Platform.WindowManagement\" Name=\"Debug\" xmlns=\"clr-namespace:Microsoft.VisualStudio.PlatformUI.Shell;assembly=Microsoft.VisualStudio.Shell.ViewManager\"><MainSite FloatingTop=\"52\" FloatingLeft=\"96\" FloatingHeight=\"1056\" FloatingWidth=\"1936\" FloatingWindowState=\"Maximized\"><AutoHideRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\" DockRestriction=\"AlwaysFloating\"><AutoHideChannel Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a2eaf38f-a0ad-4503-91f8-5f004a69a040}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Right\" Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingTop=\"76.8\" FloatingLeft=\"819.2\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{31fc2115-5126-4a87-b2f7-77eaab65048b}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"348.16\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Top\"/><AutoHideChannel Dock=\"Bottom\"/><DockRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"358.4\"><TabGroup IsVisible=\"True\" DockedHeight=\"652.8\" DockedWidth=\"358.4\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{ed485b08-5acf-4ce9-8e13-699174ea0201}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{32a6260a-0121-4878-95e5-80d2f08ea4cb}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"600\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{8e5c1d1a-8a91-4406-aa56-5bf27c97d63c}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"600\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}\" IsSelected=\"True\" IsVisible=\"True\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c9c0ae26-aa77-11d2-b3f0-0000f87570ee}\" IsVisible=\"True\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{de1fc918-f32e-4dd7-a915-1792a051f26b}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{ecdd9ee0-ac6b-11d0-89f9-00a0c9110055}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{2d7728c2-de0a-45b5-99aa-89b609dfde73}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView Name=\"ST:0:0:{9f3ec988-1174-4746-a66a-3969715d1fc7}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{131369f2-062d-44a2-8671-91ff31efb4f4}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{3addf8e2-81cc-41a0-9785-dbd2d86064bd}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{0db31cc8-2322-4f59-a610-1fdc8423df77}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{1cba9826-3184-4799-a184-784e41b56398}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{38ed9834-0c97-445b-bd1d-f78f3e08afac}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{402dc223-d700-4029-866f-acee803f3f0c}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a9b00010-7308-415c-95c6-eed62c1b9788}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{9c7d10e9-0147-4363-bf48-917f0426cd03}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{dd1ddd20-d59b-11da-a94d-0800200c9a66}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><ViewBookmark Name=\"ST:0:0:{a2eaf38f-a0ad-4503-91f8-5f004a69a040}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\"/></TabGroup><TabGroup DockedHeight=\"768\" DockedWidth=\"358.4\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/></TabGroup></DockGroup><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DocumentGroupContainer IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><wm:WMDocumentGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{46c87f81-5a06-43a8-9e25-85d33bac49f8}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{269a02dc-6af8-11d3-bdc4-00c04f688e50}\" FloatingHeight=\"384\" FloatingWidth=\"512\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf577b8c-4134-11d2-83e5-00c04f9902c1}\" FloatingHeight=\"384\" FloatingWidth=\"358.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{99b8fa2f-ab90-4f57-9c32-949f146f1914}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{387cb18d-6153-4156-9257-9ac3f9207bbe}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c79b74ff-f1d7-4c94-aefa-4d22bfe1b1f9}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView Name=\"ST:0:0:{93a69444-e846-4571-9e03-a8433ad9ddf9}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{cb4d394c-6408-4607-8c42-0910d3147a4e}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{e5c2cce5-61d0-4cd8-a946-13ec76cfdb01}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/></wm:WMDocumentGroup></DocumentGroupContainer><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6d4078d1-5951-4ed1-ac0e-0a8099c1cce5}\" IsSelected=\"True\" IsVisible=\"True\" DockedHeight=\"537.6\" DockedWidth=\"307.2\" AutoHideWidth=\"307.2\" AutoHideHeight=\"537.6\" FloatingHeight=\"537.6\" FloatingWidth=\"307.2\"/></DockGroup><DockGroup IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\"><TabGroup IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"5\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{f2e84780-2af1-11d1-a7fa-00a0c9110051}\" IsSelected=\"True\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"4\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{4a18f9d0-b838-11d0-93eb-00a0c90f2734}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ca4b8ff5-bfc7-11d2-9929-00c04f68fdaf}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{51c76317-9037-4cf2-a20a-6206fd30b4a1}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"2001\" IconResourcePackage=\"beb01ddf-9d2b-435b-a9e7-76557e2b6b52\" Name=\"ST:0:0:{e62ce6a0-b439-11d0-a79d-00a0c9110051}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{8d263989-ff4b-4a78-90c8-b2ba3fa69311}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"512\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"10\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{37aba9be-445a-11d3-9949-00c04f68fd0a}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"9\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:1:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887920-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887921-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{68487888-204a-11d3-87eb-00c04f7971a5}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd5b-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{9a7cebbb-dc5c-4986-bc49-962da46aa506}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{e3369cf0-996f-45ba-881e-2af696fbe27b}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cdbdee54-b399-484b-b763-db2c3393d646}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/></TabGroup><TabGroup DockedHeight=\"192\" DockedWidth=\"100\"><ViewBookmark Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"192\" DockedWidth=\"100\"/></TabGroup><TabGroup IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"3\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{0504ff91-9d61-11d0-a794-00a0c9110051}\" IsSelected=\"True\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView Name=\"ST:0:0:{637792aa-f332-4bb5-be6c-066b0e88eced}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"2\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{be4d7042-ba3f-11d2-840e-00c04f9902c1}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{605322a2-17ae-43f4-b60f-766556e46c87}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ecb7191a-597b-41f5-9843-03a4cf275dde}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{588470cc-84f8-4a57-9ac4-86bca0625ff4}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f564}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f565}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{905da7d1-18fd-4a46-8d0f-a5ff58ada9de}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{519e8a32-1c95-4a42-956f-2cee2f28eb0f}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{92547016-2bd0-4dfe-bd4f-5b52bdce0037}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{fdffccf2-5f63-404f-86ad-33693f544948}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f044f2c2-3d99-4787-a492-6b09a19df7c0}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f16e7758-bfd9-4360-a45f-6deeae786164}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f2c4be33-ca39-41a6-a69a-f4ed439d4178}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/></TabGroup></DockGroup></DockGroup><TabGroup DockedHeight=\"652.8\" DockedWidth=\"174.08\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{099ca9ea-0ae4-4e31-a7e4-fe09bd1715cc}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{66dba47c-61df-11d2-aa79-00c04f990343}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{4a791147-19e4-11d3-b86b-00c04f79f802}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd58-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{57dc5d59-11c2-4955-a7b4-d7699d677e93}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{07cd18b4-3ba1-11d2-890a-0060083196c6}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{5b6781c0-e99d-11d0-9954-00a0c91bc8e5}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{47a7d881-d3cf-4036-b57c-0444e12df881}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a34b1c5d-6d37-4a0c-a8b0-99f8e8158b48}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><ViewBookmark Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\"/><ViewBookmark Name=\"ST:0:0:{31fc2115-5126-4a87-b2f7-77eaab65048b}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\"/></TabGroup></DockGroup></DockRoot></AutoHideRoot></MainSite><wm:WMFloatSite Id=\"6c66b445-edf9-4860-a192-7e3846a53ffc\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"35b77d4f-3f09-4c2c-82b5-8e7c9ce9581d\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"11a11074-4a21-4a12-bd90-9a5a31652d03\" FloatingHeight=\"222.72\" FloatingWidth=\"378.88\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"222.72\" FloatingWidth=\"378.88\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"8a3c1d75-6ed2-4e8f-b27d-c54f555a3b28\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"99c2d503-4ae5-4bfa-aa05-7e55402f87b1\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"f96fecf3-7215-4027-80aa-4006db145678\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"01ce5c84-2f62-448a-85b9-b792cf4ba1ba\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"eae1ba4c-99e5-4c70-85e9-f0d93262238a\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"4f46ab70-6c01-40e3-b8d9-b0f8f095b4f6\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"e95ec8b5-211e-48aa-a7d3-8d01ede3f134\"><wm:ToolWindowView Name=\"ST:0:0:{b869198c-f673-46d2-83ae-64f515277716}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"1b7ab59d-c723-4b1b-a885-9acd39f509bc\"><wm:ToolWindowView Name=\"ST:0:0:{b8399b49-7330-487b-9235-7d2e969d0a79}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"620a81b3-1da0-4bbb-8367-bb735196d3d3\"><wm:ToolWindowView Name=\"ST:0:0:{778b5376-ad77-4751-acdc-f3d18343f8dd}\"/></wm:WMFloatSite></WindowProfile></Debug><NoToolWin><WindowProfile xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:wm=\"clr-namespace:Microsoft.VisualStudio.Platform.WindowManagement;assembly=Microsoft.VisualStudio.Platform.WindowManagement\" Name=\"NoToolWin\" xmlns=\"clr-namespace:Microsoft.VisualStudio.PlatformUI.Shell;assembly=Microsoft.VisualStudio.Shell.ViewManager\"><MainSite FloatingTop=\"2\" FloatingLeft=\"2\" FloatingHeight=\"1056\" FloatingWidth=\"1936\" FloatingWindowState=\"Maximized\"><AutoHideRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\" DockRestriction=\"DocumentGroup, Document, OutsideView\"><AutoHideChannel Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Right\" Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingTop=\"76.8\" FloatingLeft=\"819.2\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Top\"/><AutoHideChannel Dock=\"Bottom\"/><DockRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup Orientation=\"Vertical\" DockedHeight=\"768\" DockedWidth=\"348.16\"><TabGroup DockedHeight=\"652.8\" DockedWidth=\"348.16\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{ed485b08-5acf-4ce9-8e13-699174ea0201}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c9c0ae26-aa77-11d2-b3f0-0000f87570ee}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{de1fc918-f32e-4dd7-a915-1792a051f26b}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{2d7728c2-de0a-45b5-99aa-89b609dfde73}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView Name=\"ST:0:0:{9f3ec988-1174-4746-a66a-3969715d1fc7}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{131369f2-062d-44a2-8671-91ff31efb4f4}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{3addf8e2-81cc-41a0-9785-dbd2d86064bd}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{0db31cc8-2322-4f59-a610-1fdc8423df77}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{ecdd9ee0-ac6b-11d0-89f9-00a0c9110055}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{66dba47c-61df-11d2-aa79-00c04f990343}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{4a791147-19e4-11d3-b86b-00c04f79f802}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd58-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{57dc5d59-11c2-4955-a7b4-d7699d677e93}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{07cd18b4-3ba1-11d2-890a-0060083196c6}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{1cba9826-3184-4799-a184-784e41b56398}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{38ed9834-0c97-445b-bd1d-f78f3e08afac}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{402dc223-d700-4029-866f-acee803f3f0c}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a9b00010-7308-415c-95c6-eed62c1b9788}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{9c7d10e9-0147-4363-bf48-917f0426cd03}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{dd1ddd20-d59b-11da-a94d-0800200c9a66}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/></TabGroup><TabGroup DockedHeight=\"768\" DockedWidth=\"348.16\"><ViewBookmark Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"348.16\"/><ViewBookmark Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"348.16\"/></TabGroup></DockGroup><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DocumentGroupContainer IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><wm:WMDocumentGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{46c87f81-5a06-43a8-9e25-85d33bac49f8}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{269a02dc-6af8-11d3-bdc4-00c04f688e50}\" FloatingHeight=\"384\" FloatingWidth=\"512\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf577b8c-4134-11d2-83e5-00c04f9902c1}\" FloatingHeight=\"384\" FloatingWidth=\"358.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{99b8fa2f-ab90-4f57-9c32-949f146f1914}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{387cb18d-6153-4156-9257-9ac3f9207bbe}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c79b74ff-f1d7-4c94-aefa-4d22bfe1b1f9}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView Name=\"ST:0:0:{93a69444-e846-4571-9e03-a8433ad9ddf9}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{cb4d394c-6408-4607-8c42-0910d3147a4e}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{e5c2cce5-61d0-4cd8-a946-13ec76cfdb01}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/></wm:WMDocumentGroup></DocumentGroupContainer><DockGroup DockedHeight=\"192\" DockedWidth=\"512\"><TabGroup DockedHeight=\"192\" DockedWidth=\"512\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f2e84780-2af1-11d1-a7fa-00a0c9110051}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a18f9d0-b838-11d0-93eb-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ca4b8ff5-bfc7-11d2-9929-00c04f68fdaf}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{51c76317-9037-4cf2-a20a-6206fd30b4a1}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e62ce6a0-b439-11d0-a79d-00a0c9110051}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{8d263989-ff4b-4a78-90c8-b2ba3fa69311}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"512\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{37aba9be-445a-11d3-9949-00c04f68fd0a}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887920-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887921-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{68487888-204a-11d3-87eb-00c04f7971a5}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd5b-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{9a7cebbb-dc5c-4986-bc49-962da46aa506}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{e3369cf0-996f-45ba-881e-2af696fbe27b}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cdbdee54-b399-484b-b763-db2c3393d646}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/></TabGroup><TabGroup DockedHeight=\"192\" DockedWidth=\"100\"><ViewBookmark Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"192\" DockedWidth=\"100\"/></TabGroup><TabGroup DockedHeight=\"192\" DockedWidth=\"512\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{0504ff91-9d61-11d0-a794-00a0c9110051}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{637792aa-f332-4bb5-be6c-066b0e88eced}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{be4d7042-ba3f-11d2-840e-00c04f9902c1}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{605322a2-17ae-43f4-b60f-766556e46c87}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ecb7191a-597b-41f5-9843-03a4cf275dde}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{588470cc-84f8-4a57-9ac4-86bca0625ff4}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f564}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f565}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{905da7d1-18fd-4a46-8d0f-a5ff58ada9de}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{519e8a32-1c95-4a42-956f-2cee2f28eb0f}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{92547016-2bd0-4dfe-bd4f-5b52bdce0037}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{fdffccf2-5f63-404f-86ad-33693f544948}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f044f2c2-3d99-4787-a492-6b09a19df7c0}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f16e7758-bfd9-4360-a45f-6deeae786164}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f2c4be33-ca39-41a6-a69a-f4ed439d4178}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/></TabGroup></DockGroup></DockGroup><TabGroup DockedHeight=\"652.8\" DockedWidth=\"174.08\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{099ca9ea-0ae4-4e31-a7e4-fe09bd1715cc}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{5b6781c0-e99d-11d0-9954-00a0c91bc8e5}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{47a7d881-d3cf-4036-b57c-0444e12df881}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a34b1c5d-6d37-4a0c-a8b0-99f8e8158b48}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><ViewBookmark Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\"/></TabGroup></DockGroup></DockRoot></AutoHideRoot></MainSite><wm:WMFloatSite Id=\"c71af5b7-43e8-4973-843e-999ecfdb3723\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"011dc193-3c44-4e8c-996c-aa017ccd87b7\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"6e7cae5c-9105-4199-ae96-9fd6d035ee76\" FloatingHeight=\"222.72\" FloatingWidth=\"378.88\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"222.72\" FloatingWidth=\"378.88\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"90192d0a-3f6f-4904-848e-dc23d1390dbc\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"20ba7bf1-f743-41e1-b931-5a2057bd6985\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"b6b3ca32-ece3-43fa-9c03-fedb062585b5\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"2403415c-2419-4fd2-b791-9e86f77d1fa6\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"635a81fa-1998-4f21-9b30-15e03adf1212\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"c97d2082-b34d-4d43-ade1-0fbd06b1e26f\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite></WindowProfile></NoToolWin></Category><Category name=\"Environment_FontsAndColors\" Category=\"{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_FontsAndColors\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"Version\">2</PropertyValue><FontsAndColors Version=\"2.0\"><Theme Id=\"{0F51B80F-C0E3-40F4-8E25-7FB09B68033B}\"/><Categories><Category GUID=\"{75A05685-00A8-4DED-BAE5-E7A50BFA929A}\" FontIsDefault=\"Yes\"><Items><Item Name=\"MarkerFormatDefinition/ScopeHighlight\" Foreground=\"0x00F7EBE7\" Background=\"0x00808080\" BoldFont=\"No\"/><Item Name=\"MarkerFormatDefinition/FindHighlight\" Foreground=\"0x01000000\" Background=\"0x00808000\" BoldFont=\"No\"/><Item Name=\"CppNewDeleteSemanticTokenFormat\" Foreground=\"0x00808000\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppUDLNumberSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppUDLRawSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppLabelSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppNamespaceSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppFunctionTemplateSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppEventSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppPropertySemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppStaticMemberFieldSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppStaticMemberFunctionSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppMemberFieldSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppMemberFunctionSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppFunctionSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppLocalVariableSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CppGlobalVariableSemanticTokenFormat\" Foreground=\"0x00C0C0C0\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"urlformat\" Foreground=\"0x00F9DA99\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"NavigableSymbolFormat\" Foreground=\"0x0000FF00\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"CurrentLineActiveFormat\" Foreground=\"0x02000000\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"outlining.square\" Foreground=\"0x00555555\" Background=\"0x00C0C0C0\" BoldFont=\"No\"/><Item Name=\"outlining.verticalrule\" Foreground=\"0x006F5C25\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"outlining.collapsehintadornment\" Foreground=\"0x00514E3E\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Inactive Selected Text\" Foreground=\"0x02000000\" Background=\"0x001C1B17\" BoldFont=\"No\"/><Item Name=\"Selected Text\" Foreground=\"0x00FFFFFF\" Background=\"0x00808080\" BoldFont=\"No\"/><Item Name=\"Line Number\" Foreground=\"0x00494E3F\" Background=\"0x00343129\" BoldFont=\"No\"/><Item Name=\"compiler error\" Foreground=\"0x000000FF\" Background=\"0x01000001\" BoldFont=\"No\"/><Item Name=\"Number\" Foreground=\"0x0022CDFF\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"String\" Foreground=\"0x000076EC\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Operator\" Foreground=\"0x00B7E2E8\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Preprocessor Keyword\" Foreground=\"0x00BD82A0\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Keyword\" Foreground=\"0x0063C793\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Identifier\" Foreground=\"0x02000000\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Excluded Code\" Foreground=\"0x00616161\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Comment\" Foreground=\"0x007B7466\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Peek Highlighted Text Unfocused\" Foreground=\"0x01000000\" Background=\"0x00808000\" BoldFont=\"No\"/><Item Name=\"brace matching\" Foreground=\"0x02000000\" Background=\"0x00505050\" BoldFont=\"No\"/><Item Name=\"xml doc comment - text\" Foreground=\"0x008AA399\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"struct name\" Foreground=\"0x00B18C67\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"interface name\" Foreground=\"0x00B48C8C\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"enum name\" Foreground=\"0x00B18C67\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"delegate name\" Foreground=\"0x00B18C67\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"class name\" Foreground=\"0x00B18C67\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"string - verbatim\" Foreground=\"0x0010C2EF\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"RoslynRenameFieldBackgroundAndBorderTag\" Foreground=\"0x01000000\" Background=\"0x00C0C0C0\" BoldFont=\"No\"/><Item Name=\"HTML Tag Delimiter\" Foreground=\"0x02000000\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"HTML Server-Side Script\" Foreground=\"0x00B48C8C\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"HTML Operator\" Foreground=\"0x00E4E2E0\" Background=\"0x00343129\" BoldFont=\"No\"/><Item Name=\"HTML Entity\" Foreground=\"0x00BD82A0\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"HTML Element Name\" Foreground=\"0x0063C793\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"HTML Comment\" Foreground=\"0x007B7466\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"HTML Attribute Value\" Foreground=\"0x000076EC\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"HTML Attribute\" Foreground=\"0x00E4E2E0\" Background=\"0x00343129\" BoldFont=\"No\"/><Item Name=\"RazorCode\" Foreground=\"0x02000000\" Background=\"0x003E3C32\" BoldFont=\"No\"/><Item Name=\"VA Find Result\" Foreground=\"0x00969483\" Background=\"0x00B7FFFF\" BoldFont=\"No\"/><Item Name=\"VA Find Reference (Modified)\" Foreground=\"0x00969483\" Background=\"0x00004080\" BoldFont=\"No\"/><Item Name=\"VA Find Reference\" Foreground=\"0x00969483\" Background=\"0x00404000\" BoldFont=\"No\"/><Item Name=\"VA Brace Matching\" Foreground=\"0x00FFFFFF\" Background=\"0x02000000\" BoldFont=\"Yes\"/><Item Name=\"VA Macro / Enum\" Foreground=\"0x00FF8080\" Background=\"0x002A2822\" BoldFont=\"No\"/><Item Name=\"VA Class\" Foreground=\"0x00C0C000\" Background=\"0x002A2822\" BoldFont=\"No\"/><Item Name=\"VA Method\" Foreground=\"0x0000C0FF\" Background=\"0x002A2822\" BoldFont=\"No\"/><Item Name=\"VA Variable\" Foreground=\"0x00C0C0C0\" Background=\"0x002A2822\" BoldFont=\"No\"/><Item Name=\"Knockout Region\" Foreground=\"0x01000000\" Background=\"0x00808000\" BoldFont=\"No\"/><Item Name=\"CSS String Value\" Foreground=\"0x000076EC\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"CSS Property Value\" Foreground=\"0x000076EC\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"CSS Property Name\" Foreground=\"0x00B48C8C\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"CSS Selector\" Foreground=\"0x00B18C67\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"CSS Keyword\" Foreground=\"0x0022CDFF\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"CSS Comment\" Foreground=\"0x007B7466\" Background=\"0x02000000\" BoldFont=\"No\"/></Items></Category><Category GUID=\"{B36B0228-DBAD-4DB0-B9C7-2AD3E572010F}\" FontName=\"Segoe UI\" FontSize=\"9\" CharSet=\"1\" FontIsDefault=\"No\"><Items><Item Name=\"Odd Row Items\" Foreground=\"0x00000000\" Background=\"0x00FFFFFF\" BoldFont=\"No\"/><Item Name=\"Even Row Items\" Foreground=\"0x00000000\" Background=\"0x00FFFFFF\" BoldFont=\"No\"/><Item Name=\"Not Downloaded\" Foreground=\"0x006A6444\" Background=\"0x00FFFFFF\" BoldFont=\"No\"/><Item Name=\"Target Only\" Foreground=\"0x00000000\" Background=\"0x00FFFFFF\" BoldFont=\"No\"/><Item Name=\"Source Only\" Foreground=\"0x00000000\" Background=\"0x00FFFFFF\" BoldFont=\"No\"/><Item Name=\"Identical content\" Foreground=\"0x00000000\" Background=\"0x00FFFFFF\" BoldFont=\"No\"/><Item Name=\"Different content\" Foreground=\"0x000014E5\" Background=\"0x00FFFFFF\" BoldFont=\"No\"/></Items></Category><Category GUID=\"{FA937F7B-C0D2-46B8-9F10-A7A92642B384}\" FontIsDefault=\"Yes\"><Items><Item Name=\"Artboard Background\" Foreground=\"0x02000000\" Background=\"0x02000000\" BoldFont=\"No\"/></Items></Category><Category GUID=\"{FF349800-EA43-46C1-8C98-878E78F46501}\" FontIsDefault=\"Yes\"><Items><Item Name=\"Breakpoint (Enabled)\" Foreground=\"0x00FFFFFF\" Background=\"0x00463A96\" BoldFont=\"No\"/><Item Name=\"Current Statement\" Foreground=\"0x00000000\" Background=\"0x0055D1D3\" BoldFont=\"No\"/><Item Name=\"Brace Matching (Rectangle)\" Foreground=\"0x02000000\" Background=\"0x00808000\" BoldFont=\"No\"/><Item Name=\"compiler error\" Foreground=\"0x000000FF\" Background=\"0x01000018\" BoldFont=\"No\"/></Items></Category><Category GUID=\"{58E96763-1D3B-4E05-B6BA-FF7115FD0B7B}\" FontIsDefault=\"Yes\"><Items><Item Name=\"Indicator Margin\" Foreground=\"0x02000000\" Background=\"0x00494E3F\" BoldFont=\"No\"/><Item Name=\"Inactive Selected Text\" Foreground=\"0x02000000\" Background=\"0x001C1B17\" BoldFont=\"No\"/><Item Name=\"Selected Text\" Foreground=\"0x00FFFFFF\" Background=\"0x00808080\" BoldFont=\"No\"/><Item Name=\"Plain Text\" Foreground=\"0x00F3F2F1\" Background=\"0x002A2822\" BoldFont=\"No\"/></Items></Category><Category GUID=\"{E0187991-B458-4F7E-8CA9-42C9A573B56C}\" FontIsDefault=\"Yes\"><Items><Item Name=\"XML Attribute Quotes\" Foreground=\"0x02000000\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XML Attribute Value\" Foreground=\"0x000076EC\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XML CData Section\" Foreground=\"0x008AA399\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XML Attribute\" Foreground=\"0x00B18C67\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XML Name\" Foreground=\"0x0063C793\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XML Comment\" Foreground=\"0x007B7466\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XML Delimiter\" Foreground=\"0x02000000\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XML Text\" Foreground=\"0x00FFFFFF\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Markup Extension Parameter Value\" Foreground=\"0x000076EC\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Markup Extension Parameter Name\" Foreground=\"0x00B18C67\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Markup Extension Class\" Foreground=\"0x00B48C8C\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Attribute Quotes\" Foreground=\"0x00000000\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Attribute Value\" Foreground=\"0x000076EC\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML CData Section\" Foreground=\"0x008AA399\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Attribute\" Foreground=\"0x00B18C67\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Name\" Foreground=\"0x0063C793\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Comment\" Foreground=\"0x007B7466\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Delimiter\" Foreground=\"0x02000000\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"XAML Text\" Foreground=\"0x02000000\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Number\" Foreground=\"0x0022CDFF\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"String\" Foreground=\"0x000076EC\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Comment\" Foreground=\"0x007B7466\" Background=\"0x02000000\" BoldFont=\"No\"/><Item Name=\"Keyword\" Foreground=\"0x0063C793\" Background=\"0x02000000\" BoldFont=\"No\"/></Items></Category></Categories></FontsAndColors></Category></Category><Category name=\"Git Version Control_GitSccProvider\" Category=\"{33a4cda9-b7a6-3f4f-9e1f-e4d71f0a9cfa}\" Package=\"{7fe30a77-37f9-4cf2-83dd-96b207028e1b}\" RegisteredName=\"Git Version Control_GitSccProvider\" PackageName=\"SccProviderPackage\"/><Category name=\"HTML Tag Specific\" Category=\"{7583bb73-a453-40e8-8951-b6986ddb1d9b}\" Package=\"{1B437D20-F8FE-11D2-A6AE-00104BCC7269}\" RegisteredName=\"HTML Tag Specific\" PackageName=\"Visual Studio HTM Editor Package\"/><Category name=\"HTMLX_Advanced\" Category=\"{3d9c2439-5c0a-4592-b9e8-42e26dfe636b}\" Package=\"{cf49ec7d-92b1-4bbd-9254-9cc13978e82e}\" RegisteredName=\"HTMLX_Advanced\" PackageName=\"HtmlPackage\"/><Category name=\"JSON_Advanced\" Category=\"{78c48687-be97-424b-a3fa-378de0dac07c}\" Package=\"{0123483c-cced-4712-acd3-c527b71b6145}\" RegisteredName=\"JSON_Advanced\" PackageName=\"JSONPackage\"/><Category name=\"JSON_Schema\" Category=\"{A274BD6E-74E6-4698-B631-1690B1E514BB}\" Package=\"{a6efef5f-be9b-432a-adfe-74a119ab4478}\" RegisteredName=\"JSON_Schema\" PackageName=\"JSONPackage\"/><Category name=\"LESS_Advanced\" Category=\"{1b200b66-f69e-452e-9c6f-d38f9cb0628b}\" Package=\"{f4b61ec8-36d8-4155-b2a0-199587d8ddcc}\" RegisteredName=\"LESS_Advanced\" PackageName=\"LessPackage\"/><Category name=\"Performance\" Category=\"{7A697B67-8D8F-43c2-A11C-57568FE3F513}\" Package=\"{f4a63b2a-49ab-4b2d-aa59-a10f01026c89}\" RegisteredName=\"Performance\" PackageName=\"PerformancePackage\">\n\t\t<PropertyValue name=\"performancereport.hotpathcandidateratio\">3.0</PropertyValue>\n\t\t<PropertyValue name=\"performancereport.noisereductionfold\">0</PropertyValue>\n\t\t<PropertyValue name=\"performancereport.noisereductionfoldthreshold\">3.0</PropertyValue>\n\t\t<PropertyValue name=\"performancereport.noisereductiontrim\">0</PropertyValue>\n\t\t<PropertyValue name=\"performancereport.noisereductiontrimthreshold\">2.0</PropertyValue>\n\t\t<PropertyValue name=\"performancereport.shownoisereductionwarning\">1</PropertyValue>\n\t\t<PropertyValue name=\"performancereport.showquery\">0</PropertyValue>\n\t\t<PropertyValue name=\"tools.options.justmycode\">0</PropertyValue>\n\t\t<PropertyValue name=\"tools.options.justmycode.callee\">0</PropertyValue>\n\t\t<PropertyValue name=\"tools.options.justmycode.caller\">0</PropertyValue>\n\t\t<PropertyValue name=\"tools.options.kernelmodeanalysis\">0</PropertyValue>\n\t\t<PropertyValue name=\"tools.options.rules.actions\"/>\n\t\t<PropertyValue name=\"toolsoptions.exportformat\">csv</PropertyValue>\n\t\t<PropertyValue name=\"toolsoptions.exportpath\"/>\n\t\t<PropertyValue name=\"toolsoptions.formatcounters\">1</PropertyValue>\n\t\t<PropertyValue name=\"toolsoptions.numbuffer\">64</PropertyValue>\n\t\t<PropertyValue name=\"toolsoptions.numfunc\">5</PropertyValue>\n\t\t<PropertyValue name=\"toolsoptions.serialize\">1</PropertyValue>\n\t\t<PropertyValue name=\"toolsoptions.showtimetick\">0</PropertyValue>\n\t\t<PropertyValue name=\"toolsoptions.sizebuffer\">64</PropertyValue>\n\t</Category><Category name=\"SCSS_Advanced\" Category=\"{cea4fb93-f562-4d14-980f-8d9cab6e0a71}\" Package=\"{60116bb0-6f13-49e2-a1ce-a185c783b68b}\" RegisteredName=\"SCSS_Advanced\" PackageName=\"ScssPackage\"/><Category name=\"Source Control_TeamFoundation\" Category=\"{2A718788-A6D9-44C5-90EF-438BF5B06A74}\" Package=\"{4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}\" RegisteredName=\"Source Control_TeamFoundation\" PackageName=\"Microsoft.VisualStudio.TeamFoundation.VersionControl.HatPackage\"><PropertyValue name=\"IsProxyEnabled\">False</PropertyValue><PropertyValue name=\"ProxyUrl\"/><PropertyValue name=\"GetLatestOnCheckOut\">false</PropertyValue><PropertyValue name=\"AttemptToAutoResolveConflicts\">true</PropertyValue><PropertyValue name=\"ShowDeletedItems\">false</PropertyValue><PropertyValue name=\"OpenSceToMostRecentPath\">false</PropertyValue><PropertyValue name=\"PromptToConfirmMergeResult\">-1</PropertyValue></Category><Category name=\"Test Tools_Test Execution\" Category=\"{48d11193-265d-1458-743e-2b88c655b377}\" Package=\"{a9405ae6-9ac6-4f0e-a03f-7afe45f6fcb7}\" RegisteredName=\"Test Tools_Test Execution\" PackageName=\"Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage, Microsoft.VisualStudio.QualityTools.TestCaseManagement, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\"><PropertyValue name=\"IsCodeColoringEnabled\">True</PropertyValue><PropertyValue name=\"IsInPlaceInstrumentationEnabled\">True</PropertyValue><PropertyValue name=\"KeepHostProcessAlive\">True</PropertyValue><PropertyValue name=\"MaxTestRunsPerSolution\">25</PropertyValue><PropertyValue name=\"PathToWebRoot\"/><PropertyValue name=\"UnitTestResultNavigatePointOfFailure\">False</PropertyValue></Category><Category name=\"WebProjects\" Category=\"{C78AFEEB-A722-4cf3-AD3F-8694126C2145}\" Package=\"{39c9c826-8ef8-4079-8c95-428f5b1c323f}\" RegisteredName=\"WebProjects\" PackageName=\"Visual Web Developer Project System Package\">\n\t\t<PropertyValue name=\"Use64BitIISExpress\">false</PropertyValue>\n\t\t<PropertyValue name=\"WarnBeforeRunIfErrors\">false</PropertyValue>\n\t</Category><Category name=\"WindowsFormsDesigner_General\" Category=\"{de03177c-918d-40af-8c17-c9d63670c175}\" Package=\"{7b5d447b-0b12-41ea-a84e-c822034422d4}\" RegisteredName=\"WindowsFormsDesigner_General\" PackageName=\"Windows Forms Designer Resources Package\"><PropertyValue name=\"AutoToolboxPopulate\">False</PropertyValue><PropertyValue name=\"EnableInSituEditing\">True</PropertyValue><PropertyValue name=\"EnableRefactoringOnRename\">True</PropertyValue><PropertyValue name=\"GridSize\">8, 8</PropertyValue><PropertyValue name=\"LayoutMode\">SnapLines</PropertyValue><PropertyValue name=\"ObjectBoundSmartTagAutoShow\">True</PropertyValue><PropertyValue name=\"ShowGrid\">True</PropertyValue><PropertyValue name=\"SnapToGrid\">True</PropertyValue><PropertyValue name=\"UseOptimizedCodeGeneration\">True</PropertyValue></Category><Category name=\"XAML_Formatting\" Category=\"{dac05320-0c3a-4ead-a332-8c23b0cfc130}\" Package=\"{2ef1ec52-c8bf-4fe0-8ece-ba9c0d5d1603}\" RegisteredName=\"XAML_Formatting\" PackageName=\"XamlLanguagePackage\"><PropertyValue name=\"AutoOutlining\">True</PropertyValue><PropertyValue name=\"AutoReformatOnEndTag\">True</PropertyValue><PropertyValue name=\"AutoReformatOnPaste\">True</PropertyValue><PropertyValue name=\"AutoReformatOnStartTag\">True</PropertyValue><PropertyValue name=\"QuoteStyle\">DoubleQuote</PropertyValue><PropertyValue name=\"WrapColumn\">120</PropertyValue><PropertyValue name=\"WrapTags\">False</PropertyValue></Category><Category name=\"XAML_Miscellaneous\" Category=\"{b0906bd5-5690-4437-a380-b2b546175e71}\" Package=\"{2ef1ec52-c8bf-4fe0-8ece-ba9c0d5d1603}\" RegisteredName=\"XAML_Miscellaneous\" PackageName=\"XamlLanguagePackage\"><PropertyValue name=\"AutoInsertAttributeQuotes\">True</PropertyValue><PropertyValue name=\"AutoInsertCommas\">True</PropertyValue><PropertyValue name=\"AutoInsertEndBraces\">True</PropertyValue><PropertyValue name=\"AutoInsertEndTags\">True</PropertyValue><PropertyValue name=\"AutoUpdateTags\">True</PropertyValue><PropertyValue name=\"ShowDesignerErrors\">True</PropertyValue><PropertyValue name=\"WarnMinTargetCompatibility\">True</PropertyValue></Category><Category name=\"XAML_Spacing\" Category=\"{ec45e459-a3f0-490e-8eed-5f7da51dde06}\" Package=\"{2ef1ec52-c8bf-4fe0-8ece-ba9c0d5d1603}\" RegisteredName=\"XAML_Spacing\" PackageName=\"XamlLanguagePackage\"><PropertyValue name=\"AttributeFormat\">Preserve</PropertyValue><PropertyValue name=\"BlankLineOption\">Preserve</PropertyValue><PropertyValue name=\"KeepFirstAttributeOnSameLine\">True</PropertyValue></Category><Category name=\"XmlEditor\" Category=\"{4E1CDE49-B840-4826-8CC6-8FB80D7EF455}\" Package=\"{87569308-4813-40a0-9cd0-d7a30838ca3f}\" RegisteredName=\"XmlEditor\" PackageName=\"Visual Studio XML Editor Package\"><PropertyValue name=\"AttributeFormatting\">None</PropertyValue><PropertyValue name=\"AutoDownload\">False</PropertyValue><PropertyValue name=\"AutoInsertAttributeQuotes\">True</PropertyValue><PropertyValue name=\"AutoInsertEndTags\">True</PropertyValue><PropertyValue name=\"AutoInsertNamespaceDeclarations\">True</PropertyValue><PropertyValue name=\"AutoInsertOther\">True</PropertyValue><PropertyValue name=\"AutoOutlining\">True</PropertyValue><PropertyValue name=\"AutoReformatOnEndTag\">True</PropertyValue><PropertyValue name=\"AutoReformatOnPaste\">True</PropertyValue><PropertyValue name=\"FormatMixedContentByDefault\">True</PropertyValue><PropertyValue name=\"SchemaCacheLocation\">%VsInstallDir%\\xml\\Schemas</PropertyValue></Category><Category name=\"XAML Designer_Artboard\" Category=\"{aad4b8cf-51f9-4a07-80cd-69f8b442072c}\" Package=\"{512be089-83ec-4cc6-8483-cf16565ae209}\" RegisteredName=\"XAML Designer_Artboard\" PackageName=\"XamlDesignerPackage\"><PropertyValue name=\"DefaultMargin\">5</PropertyValue><PropertyValue name=\"DefaultPadding\">10</PropertyValue><PropertyValue name=\"GridLineSpacing\">5</PropertyValue><PropertyValue name=\"RenderEffects\">True</PropertyValue><PropertyValue name=\"ShowSnapGrid\">False</PropertyValue><PropertyValue name=\"SnapToGridLines\">False</PropertyValue><PropertyValue name=\"SnapToSnapLines\">True</PropertyValue><PropertyValue name=\"WarnDependentAnimations\">True</PropertyValue><PropertyValue name=\"ZoomThreshold\">4</PropertyValue></Category><Category name=\"XAML Designer_General\" Category=\"{6c8354c1-fac8-41b7-86dd-d4015488bd81}\" Package=\"{512be089-83ec-4cc6-8483-cf16565ae209}\" RegisteredName=\"XAML Designer_General\" PackageName=\"XamlDesignerPackage\"><PropertyValue name=\"AutoInsertLayout\">True</PropertyValue><PropertyValue name=\"AutoNameElements\">False</PropertyValue><PropertyValue name=\"AutoToolboxPopulate\">True</PropertyValue><PropertyValue name=\"EnableXamlDesigner\">True</PropertyValue><PropertyValue name=\"InitialDisplayMode\">SplitView</PropertyValue><PropertyValue name=\"InitialDisplayOrientation\">Default</PropertyValue><PropertyValue name=\"UnitType\">Pixels</PropertyValue><PropertyValue name=\"UseQuadrantLayout\">False</PropertyValue><PropertyValue name=\"ZoomControlMode\">ControlMouseWheel</PropertyValue></Category><Category name=\"Projects_Web Package Management_External Web Tools\" Category=\"{b521100c-f698-4018-b1cf-6421fc59fa9b}\" Package=\"{cb03d63d-47be-437d-b26b-1ad8aa7ff394}\" RegisteredName=\"Projects_Web Package Management_External Web Tools\" PackageName=\"PackageManagementPackage\"><PropertyValue name=\"ToolPaths\">.\\node_modules\\.bin;$(VSINSTALLDIR)\\Web\\External;$(PATH);$(VSINSTALLDIR)\\Web\\External\\git;$(DevEnvDir)\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\Git\\mingw32\\bin</PropertyValue></Category><Category name=\"Projects_Web Package Management_Package Restore\" Category=\"{03D27F49-12E4-4282-94F3-03A8AEF90B8F}\" Package=\"{cb03d63d-47be-437d-b26b-1ad8aa7ff394}\" RegisteredName=\"Projects_Web Package Management_Package Restore\" PackageName=\"PackageManagementPackage\"><PropertyValue name=\"BowerRestoreOnOpen\">True</PropertyValue><PropertyValue name=\"BowerRestoreOnSave\">True</PropertyValue><PropertyValue name=\"NpmRestoreOnOpen\">True</PropertyValue><PropertyValue name=\"NpmRestoreOnSave\">True</PropertyValue></Category><Category name=\"CoffeeScript_CoffeeLint\" Category=\"{d87c87c9-b788-4c01-9d3c-78cdda5ee60e}\" Package=\"{52244c9d-db46-4905-bda0-b3406c46d2a4}\" RegisteredName=\"CoffeeScript_CoffeeLint\" PackageName=\"CoffeeScriptPackage\"><PropertyValue name=\"IsLinterEnabled\">True</PropertyValue></Category><Category name=\"CSS_CssLint\" Category=\"{4f8c9198-522a-48e6-bfa8-e704f98b88ee}\" Package=\"{5330C67F-305C-4B17-A3DC-FBB7AEE69C09}\" RegisteredName=\"CSS_CssLint\" PackageName=\"CssPackage\"><PropertyValue name=\"IsLinterEnabled\">True</PropertyValue></Category><Category name=\"TypeScript_EsLint\" Category=\"{a9135013-531c-4a70-9782-02836a29dcf2}\" Package=\"{30db8f9b-ec9f-44d6-b377-83c7c27a1a8b}\" RegisteredName=\"TypeScript_EsLint\" PackageName=\"JavaScriptWebExtensionsPackage\"><PropertyValue name=\"IsLinterEnabled\">True</PropertyValue></Category><Category name=\"Web_Code Analysis\" Category=\"{fa109e91-2d0d-4251-bce1-02a4e92cde10}\" Package=\"{72c65c2e-977e-4e9c-a422-f2743d2bdd43}\" RegisteredName=\"Web_Code Analysis\" PackageName=\"WebEditorPackage\"><PropertyValue name=\"CleanErrorsOnBuild\">True</PropertyValue><PropertyValue name=\"IgnoreFolderNames\">\\node_modules\\,\\bower_components\\,\\typings\\,\\lib\\,.min.</PropertyValue><PropertyValue name=\"IgnoreNestedFiles\">True</PropertyValue></Category><Category name=\"Work Items_TeamFoundation\" Category=\"{89E620E1-9593-402C-905A-B1944CED0C38}\" Package=\"{CA39E596-31ED-4B34-AA36-5F0240457A7E}\" RegisteredName=\"Work Items_TeamFoundation\" PackageName=\"Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPackage, Microsoft.VisualStudio.TeamFoundation.WorkItemTracking\"><PropertyValue name=\"WorkItemOpen\">OpenInBrowser</PropertyValue></Category></UserSettings>"
  },
  {
    "path": "settings2.vssettings",
    "content": "<UserSettings><ApplicationIdentity version=\"15.0\"/><ToolsOptions><ToolsOptionsCategory name=\"Environment\" RegisteredName=\"Environment\"><ToolsOptionsSubCategory name=\"Documents\" RegisteredName=\"Documents\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ShowMiscFilesProject\">false</PropertyValue><PropertyValue name=\"AutoloadExternalChanges\">true</PropertyValue><PropertyValue name=\"CheckForConsistentLineEndings\">true</PropertyValue><PropertyValue name=\"SaveDocsAsUnicodeWhenDataLoss\">false</PropertyValue><PropertyValue name=\"InitializeOpenFileFromCurrentDocument\">true</PropertyValue><PropertyValue name=\"ReuseSavedActiveDocWindow\">false</PropertyValue><PropertyValue name=\"DetectFileChangesOutsideIDE\">true</PropertyValue><PropertyValue name=\"DontShowGlobalUndoChangeLossDialog\">true</PropertyValue><PropertyValue name=\"AllowEditingReadOnlyFiles\">true</PropertyValue><PropertyValue name=\"DocumentDockPreference\">0</PropertyValue><PropertyValue name=\"MiscFilesProjectSavesLastNItems\">0</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"FindAndReplace\" RegisteredName=\"FindAndReplace\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ShowWarningMessages\">true</PropertyValue><PropertyValue name=\"InitializeFromEditor\">true</PropertyValue><PropertyValue name=\"ShowMessageBoxes\">true</PropertyValue><PropertyValue name=\"HideWindowAfterMatchFromQuickFindReplace\">false</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"General\" RegisteredName=\"General\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"AnimationSpeed\">5</PropertyValue><PropertyValue name=\"RichClientExperienceOptions\">65535</PropertyValue><PropertyValue name=\"WindowMenuContainsNItems\">10</PropertyValue><PropertyValue name=\"CloseButtonActiveTabOnly\">true</PropertyValue><PropertyValue name=\"UseTitleCaseOnMenu\">true</PropertyValue><PropertyValue name=\"AutoAdjustExperience\">true</PropertyValue><PropertyValue name=\"Animations\">true</PropertyValue><PropertyValue name=\"AutohidePinActiveTabOnly\">false</PropertyValue><PropertyValue name=\"ShowStatusBar\">true</PropertyValue><PropertyValue name=\"MRUListContainsNItems\">10</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"ProjectsAndSolution\" RegisteredName=\"ProjectsAndSolution\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ProjectsLocation\">%vsspv_user_appdata%\\source\\repos</PropertyValue><PropertyValue name=\"PromptForRenameSymbol\">true</PropertyValue><PropertyValue name=\"TrackFileSelectionInExplorer\">false</PropertyValue><PropertyValue name=\"ShowOutputWindowBeforeBuild\">true</PropertyValue><PropertyValue name=\"OnRunWhenErrors\">2</PropertyValue><PropertyValue name=\"OnRunWhenOutOfDate\">1</PropertyValue><PropertyValue name=\"AlwaysShowSolutionNode\">true</PropertyValue><PropertyValue name=\"ProjectItemTemplatesLocation\">%vsspv_visualstudio_dir%\\Templates\\ItemTemplates</PropertyValue><PropertyValue name=\"OnlySaveStartupProjectsAndDependencies\">true</PropertyValue><PropertyValue name=\"ShowAdvancedBuildConfigurations\">true</PropertyValue><PropertyValue name=\"DefaultBehaviorForStartupProjects\">1</PropertyValue><PropertyValue name=\"OnRunOrPreview\">0</PropertyValue><PropertyValue name=\"MSBuildOutputVerbosity\">2</PropertyValue><PropertyValue name=\"ProjectTemplatesLocation\">%vsspv_visualstudio_dir%\\Templates\\ProjectTemplates</PropertyValue><PropertyValue name=\"ShowTaskListAfterBuild\">false</PropertyValue><PropertyValue name=\"ConcurrentBuilds\">8</PropertyValue><PropertyValue name=\"SaveNewProjects\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"RoamingSettings\" RegisteredName=\"RoamingSettings\" PackageName=\"Roaming Manager Package\"><PropertyValue name=\"SyncEditor\">true</PropertyValue><PropertyValue name=\"SyncAppearance\">true</PropertyValue><PropertyValue name=\"RoamingEnabled\">true</PropertyValue><PropertyValue name=\"SyncStartup\">true</PropertyValue><PropertyValue name=\"SyncAliases\">true</PropertyValue><PropertyValue name=\"Providers\"/><PropertyValue name=\"SyncKeyBindings\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"Startup\" RegisteredName=\"Startup\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"OnStartUp\">5</PropertyValue><PropertyValue name=\"StartPageRefreshDownloadedContent\">false</PropertyValue><PropertyValue name=\"StartPageRSSUrl\"/><PropertyValue name=\"StartPageRefreshInterval\">60</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"TaskList\" RegisteredName=\"TaskList\" PackageName=\"ErrorListPackage\"><PropertyValue name=\"ConfirmTaskDeletion\">false</PropertyValue><PropertyValue name=\"CommentTokens\" ArrayType=\"VT_BSTR\" ArrayElementCount=\"4\"><PropertyValue name=\"0\">HACK:2</PropertyValue><PropertyValue name=\"1\">TODO:2</PropertyValue><PropertyValue name=\"2\">UNDONE:2</PropertyValue><PropertyValue name=\"3\">UnresolvedMergeConflict:3</PropertyValue></PropertyValue><PropertyValue name=\"WarnOnAddingHiddenItem\">false</PropertyValue><PropertyValue name=\"DontShowFilePaths\">false</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"WebBrowser\" RegisteredName=\"WebBrowser\" PackageName=\"Visual Studio Web Browser Package\"><PropertyValue name=\"HomePage\">https://go.microsoft.com/fwlink/?LinkId=36593&amp;clcid=%vsspv_lcid_hex%</PropertyValue><PropertyValue name=\"ViewSourceIn\">1</PropertyValue><PropertyValue name=\"ViewSourceExternalProgram\">%systemroot%\\system32\\notepad.exe</PropertyValue><PropertyValue name=\"SearchPage\">https://go.microsoft.com/fwlink/?LinkId=36593&amp;clcid=%vsspv_lcid_hex%</PropertyValue></ToolsOptionsSubCategory></ToolsOptionsCategory><ToolsOptionsCategory name=\"Projects\" RegisteredName=\"Projects\"><ToolsOptionsSubCategory name=\"VBDefaults\" RegisteredName=\"VBDefaults\" PackageName=\"Visual Basic Project System\"><PropertyValue name=\"OptionCompare\">0</PropertyValue><PropertyValue name=\"OptionInfer\">1</PropertyValue><PropertyValue name=\"OptionStrict\">0</PropertyValue><PropertyValue name=\"OptionExplicit\">1</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"VCGeneral\" RegisteredName=\"VCGeneral\" PackageName=\"Visual C++ Project System Package\"><PropertyValue name=\"ExtensionsToInclude\">.cpp;.cxx;.cc;.c;.inl;.ipp;.h;.hh;.hpp;.hxx;.hm;.inc;.rc;.resx;.idl;.rc2;.def;.odl;.asm;.asmx;.xsd;.bin;.rgs;.html;.htm;.manifest</PropertyValue><PropertyValue name=\"EnableProjectCaching\">true</PropertyValue><PropertyValue name=\"ToolFileSearchPaths\"/><PropertyValue name=\"ShowEnvironmentInBuildLog\">false</PropertyValue><PropertyValue name=\"ExtensionsToHide\">.suo;.sln;.ncb;.sdf;.vcxproj;.csproj;.user;.vbproj;.scc;.vsscc;.vspscc;.old;.filters</PropertyValue><PropertyValue name=\"DefaultSolutionExplorerMode\">0</PropertyValue><PropertyValue name=\"BuildTiming\">false</PropertyValue><PropertyValue name=\"MaxConcurrentFileCompiles\">0</PropertyValue><PropertyValue name=\"BuildLogging\">true</PropertyValue></ToolsOptionsSubCategory></ToolsOptionsCategory><ToolsOptionsCategory name=\"TextEditor\" RegisteredName=\"TextEditor\"><ToolsOptionsSubCategory name=\"AllLanguages\" RegisteredName=\"AllLanguages\" PackageName=\"Text Management Package\"/><ToolsOptionsSubCategory name=\"Basic\" RegisteredName=\"Basic\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">false</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"Basic-Specific\" RegisteredName=\"Basic-Specific\" PackageName=\"VisualBasicPackage\"><PropertyValue name=\"Style_PreferInferredTupleNames\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_QualifyMethodAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferIntrinsicPredefinedTypeKeywordInDeclaration_CodeStyle\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"ExtractMethod_DoNotPutOutOrRefOnStruct\">true</PropertyValue><PropertyValue name=\"BasicClosedFileDiagnostics\">-1</PropertyValue><PropertyValue name=\"Style_PreferCoalesceExpression\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Outlining\">true</PropertyValue><PropertyValue name=\"EnableHighlightRelatedKeywords\">true</PropertyValue><PropertyValue name=\"Style_PreferInlinedVariableDeclaration\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"ExtractMethod_AllowMovingDeclaration\">false</PropertyValue><PropertyValue name=\"Option_SuggestImportsForTypesInNuGetPackages\">false</PropertyValue><PropertyValue name=\"Style_PreferExplicitTupleNames\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"EnableHighlightReferences\">true</PropertyValue><PropertyValue name=\"DisplayLineSeparators\">true</PropertyValue><PropertyValue name=\"Style_QualifyEventAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"ClosedFileDiagnostics\">true</PropertyValue><PropertyValue name=\"Style_PreferIntrinsicPredefinedTypeKeywordInMemberAccess_CodeStyle\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferReadonly\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferNullPropagation\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"PrettyListing\">true</PropertyValue><PropertyValue name=\"Option_SuggestImportsForTypesInReferenceAssemblies\">false</PropertyValue><PropertyValue name=\"Style_PreferInferredAnonymousTypeMemberNames\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferObjectInitializer\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferCollectionInitializer\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"RenameTrackingPreview\">true</PropertyValue><PropertyValue name=\"AutoComment\">true</PropertyValue><PropertyValue name=\"AutoRequiredMemberInsert\">true</PropertyValue><PropertyValue name=\"Option_PlaceSystemNamespaceFirst\">true</PropertyValue><PropertyValue name=\"Style_PreferThrowExpression\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_QualifyPropertyAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_QualifyFieldAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"AutoEndInsert\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"C/C++\" RegisteredName=\"C/C++\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">true</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">true</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"C/C++ Specific\" RegisteredName=\"C/C++ Specific\" PackageName=\"Visual C++ Language Manager Package\"><PropertyValue name=\"SpaceAroundBinaryOperator\">0</PropertyValue><PropertyValue name=\"SpaceAfterSemicolon\">true</PropertyValue><PropertyValue name=\"PreserveInitListSpace\">true</PropertyValue><PropertyValue name=\"SpaceBeforeFunctionParenthesis2\">1</PropertyValue><PropertyValue name=\"NewlineFunctionBrace\">2</PropertyValue><PropertyValue name=\"IndentBlockContents\">true</PropertyValue><PropertyValue name=\"DisableCurrentItemSelection\">true</PropertyValue><PropertyValue name=\"DisableAggressiveMemberList\">false</PropertyValue><PropertyValue name=\"MaximumCachedTranslationUnits\">7</PropertyValue><PropertyValue name=\"ReferencesHideInCommentResults\">true</PropertyValue><PropertyValue name=\"ReferencesHideUnconfirmedResults\">true</PropertyValue><PropertyValue name=\"SpaceBeforeInitListBrace\">false</PropertyValue><PropertyValue name=\"SpaceWithinCastParentheses\">false</PropertyValue><PropertyValue name=\"NewlineInitListBrace\">0</PropertyValue><PropertyValue name=\"IndentCaseContents\">false</PropertyValue><PropertyValue name=\"RefactorScope\">2</PropertyValue><PropertyValue name=\"RecreateDatabase\">false</PropertyValue><PropertyValue name=\"MaximumFindReferencesThreads\">7</PropertyValue><PropertyValue name=\"DisableHLSLIntelliSense\">true</PropertyValue><PropertyValue name=\"MemberListFilterPredictive\">true</PropertyValue><PropertyValue name=\"SpaceAroundConditionalOperator\">2</PropertyValue><PropertyValue name=\"SpaceWithinInitListBraces\">true</PropertyValue><PropertyValue name=\"SpaceBeforeLambdaParenthesis\">false</PropertyValue><PropertyValue name=\"NewlineScopeBrace\">true</PropertyValue><PropertyValue name=\"NewlineEmptyFunctionCloseBrace\">false</PropertyValue><PropertyValue name=\"DefaultFormattingStyle\">0</PropertyValue><PropertyValue name=\"EnterOutliningModeWhenFilesOpen\">true</PropertyValue><PropertyValue name=\"DisablePreLoadNavigateToCache\">false</PropertyValue><PropertyValue name=\"AutoTuneMaximumFindReferencesThreads\">true</PropertyValue><PropertyValue name=\"PreserveBlock\">1</PropertyValue><PropertyValue name=\"SpaceBeforeConstructorColon\">true</PropertyValue><PropertyValue name=\"SpaceBeforeBlockBrace\">true</PropertyValue><PropertyValue name=\"NewlineKeywordWhile\">false</PropertyValue><PropertyValue name=\"NewlineLambdaBrace\">0</PropertyValue><PropertyValue name=\"EnableExpandPrecedence\">false</PropertyValue><PropertyValue name=\"AddSemicolonForClassTypes\">true</PropertyValue><PropertyValue name=\"DisableReferenceHighlighting\">true</PropertyValue><PropertyValue name=\"DoNotWarnIfFallbackLocationUsed\">false</PropertyValue><PropertyValue name=\"DisableDatabaseImplicitAutoCleanup\">false</PropertyValue><PropertyValue name=\"DisableSharedIntelliSense\">false</PropertyValue><PropertyValue name=\"MemberListCommitCharacters\">{}[]().,:;+-*/%&amp;|^!=&lt;&gt;?@#\\ </PropertyValue><PropertyValue name=\"EnableSingleFileISense\">true</PropertyValue><PropertyValue name=\"SpaceBeforeFunctionParenthesis\">false</PropertyValue><PropertyValue name=\"NewlineNamespaceBrace\">2</PropertyValue><PropertyValue name=\"EnableClangFormatSupport\">true</PropertyValue><PropertyValue name=\"AutoFormatOnSemicolon\">true</PropertyValue><PropertyValue name=\"RenameRenameStrings\">false</PropertyValue><PropertyValue name=\"EnableProjectCaching\">false</PropertyValue><PropertyValue name=\"DisableInactiveCodeOpacity\">false</PropertyValue><PropertyValue name=\"DisableDatabaseUpdates\">false</PropertyValue><PropertyValue name=\"UseForwardSlashForIncludeAutoComplete\">true</PropertyValue><PropertyValue name=\"AutoTuneMaximumCachedTranslationUnits\">true</PropertyValue><PropertyValue name=\"DisableIntelliSenseUpdating\">false</PropertyValue><PropertyValue name=\"HideExperimentalAd\">true</PropertyValue><PropertyValue name=\"HighlightMatchingTokens\">true</PropertyValue><PropertyValue name=\"NewlineControlBlockBrace\">2</PropertyValue><PropertyValue name=\"IndentNamespaceContents\">true</PropertyValue><PropertyValue name=\"IndentLambdaBraces\">false</PropertyValue><PropertyValue name=\"CompleteSlashStar\">true</PropertyValue><PropertyValue name=\"FallbackLocation\"/><PropertyValue name=\"DisableErrorReporting\">false</PropertyValue><PropertyValue name=\"ReferencesHideFailedResults\">false</PropertyValue><PropertyValue name=\"SpaceBeforeComma\">false</PropertyValue><PropertyValue name=\"IndentAccessSpecifiers\">false</PropertyValue><PropertyValue name=\"UseCustomClangFormatExe\">false</PropertyValue><PropertyValue name=\"DisableBrowsingUpToDateCheck\">true</PropertyValue><PropertyValue name=\"DisableDatabaseImplicitFiles\">false</PropertyValue><PropertyValue name=\"AutoPchCacheQuota\">5120</PropertyValue><PropertyValue name=\"MemberListDotToArrow\">false</PropertyValue><PropertyValue name=\"SuspendNewSingleFileISenseDuringDebugging\">false</PropertyValue><PropertyValue name=\"SpaceAroundAssignmentOperator\">2</PropertyValue><PropertyValue name=\"ClangFormatExePath\"/><PropertyValue name=\"DontShowClangFormatFileFound\">false</PropertyValue><PropertyValue name=\"RenameRenameUnconfirmed\">false</PropertyValue><PropertyValue name=\"DisableReferencesResolving\">false</PropertyValue><PropertyValue name=\"HideExternalDependenciesFolders\">false</PropertyValue><PropertyValue name=\"DisableExternalDependenciesFolders\">false</PropertyValue><PropertyValue name=\"SmartMemberListCommitOnEnter\">false</PropertyValue><PropertyValue name=\"DisableIntelliSense\">false</PropertyValue><PropertyValue name=\"IncludeHintsSuppressGoogleTest\">false</PropertyValue><PropertyValue name=\"ShowSingleFileISenseErrorsInTaskList\">false</PropertyValue><PropertyValue name=\"RemoveSpaceBeforeSemicolon\">true</PropertyValue><PropertyValue name=\"SpaceBetweenEmptyLambdaBrackets\">false</PropertyValue><PropertyValue name=\"SpaceBeforeControlBlockParenthesis\">true</PropertyValue><PropertyValue name=\"SpaceBetweenEmptyFunctionParentheses\">false</PropertyValue><PropertyValue name=\"PreserveParameterIndentation\">false</PropertyValue><PropertyValue name=\"AutomaticOutliningOfStatementBlocks\">true</PropertyValue><PropertyValue name=\"MemberListFilterHeuristic\">false</PropertyValue><PropertyValue name=\"MemberListFilterInaccessible\">true</PropertyValue><PropertyValue name=\"SpaceBeforeEmptyBracket\">false</PropertyValue><PropertyValue name=\"SpaceWithinExpressionParentheses\">false</PropertyValue><PropertyValue name=\"AutoFormatOnPaste2\">1</PropertyValue><PropertyValue name=\"AutoFormatOnPaste\">true</PropertyValue><PropertyValue name=\"RenameRenameComments\">false</PropertyValue><PropertyValue name=\"LoggingLevel\">5</PropertyValue><PropertyValue name=\"EnableSingleFileISenseSquiggles\">false</PropertyValue><PropertyValue name=\"TrimSpaceUnaryOperator\">true</PropertyValue><PropertyValue name=\"TrimSpaceAroundScope\">true</PropertyValue><PropertyValue name=\"GroupBrackets\">true</PropertyValue><PropertyValue name=\"SpaceBetweenEmptyBrackets\">false</PropertyValue><PropertyValue name=\"SpaceWithinControlBlockParentheses\">false</PropertyValue><PropertyValue name=\"NewlineTypeBrace\">2</PropertyValue><PropertyValue name=\"DisableCreateDeclDefnScan\">false</PropertyValue><PropertyValue name=\"RenameRenameInactive\">false</PropertyValue><PropertyValue name=\"ColorizeInactiveBlocksDifferently\">true</PropertyValue><PropertyValue name=\"MemberListDotToArrow_1\">true</PropertyValue><PropertyValue name=\"MemberListFilterMode\">3</PropertyValue><PropertyValue name=\"SpaceAfterCastParenthesis\">false</PropertyValue><PropertyValue name=\"RenameSkipPreviewIfConfirmed\">false</PropertyValue><PropertyValue name=\"AlwaysUseFallbackLocation\">false</PropertyValue><PropertyValue name=\"RescanSolutionInterval\">60</PropertyValue><PropertyValue name=\"DisableDatabaseAutoUpdates\">false</PropertyValue><PropertyValue name=\"DisableSquiggles\">false</PropertyValue><PropertyValue name=\"EnableQuickInfoToolTips\">true</PropertyValue><PropertyValue name=\"IncludeHintsSuppress\">false</PropertyValue><PropertyValue name=\"IndentBraces\">false</PropertyValue><PropertyValue name=\"PreserveCommentIndentation\">false</PropertyValue><PropertyValue name=\"IndentPreprocessor\">2</PropertyValue><PropertyValue name=\"IndentCaseBraces\">false</PropertyValue><PropertyValue name=\"AlignParameters\">true</PropertyValue><PropertyValue name=\"AutoFormatOnBraceCompletion\">true</PropertyValue><PropertyValue name=\"AutoFormatOnClosingBrace\">true</PropertyValue><PropertyValue name=\"EnableChangeSignature\">false</PropertyValue><PropertyValue name=\"EnableExtractFunction\">false</PropertyValue><PropertyValue name=\"EnableExpandScopes\">false</PropertyValue><PropertyValue name=\"CompleteParensInRawString\">true</PropertyValue><PropertyValue name=\"InactiveCodeOpacityPercent\">55</PropertyValue><PropertyValue name=\"InactivePlatformIntelliSenseLimit\">1</PropertyValue><PropertyValue name=\"DisableSemanticColoring\">false</PropertyValue><PropertyValue name=\"ReferencesHideInStringResults\">true</PropertyValue><PropertyValue name=\"ReferencesHidePPIf0Results\">true</PropertyValue><PropertyValue name=\"SpaceBeforeInheritanceColon\">true</PropertyValue><PropertyValue name=\"NewlineKeywordCatch\">true</PropertyValue><PropertyValue name=\"NewlineKeywordElse\">true</PropertyValue><PropertyValue name=\"AutoIndentOnTab\">true</PropertyValue><PropertyValue name=\"IndentCaseLabels\">false</PropertyValue><PropertyValue name=\"ClangFormatExecution\">1</PropertyValue><PropertyValue name=\"ReferencesHideDisconfirmedResults\">true</PropertyValue><PropertyValue name=\"IncludeHintsSuppressBoostTest\">false</PropertyValue><PropertyValue name=\"SpaceWithinLambdaBrackets\">false</PropertyValue><PropertyValue name=\"SpaceWithinBrackets\">false</PropertyValue><PropertyValue name=\"RenameSearchComments\">true</PropertyValue><PropertyValue name=\"AutomaticOutliningOfPragmaRegions\">true</PropertyValue><PropertyValue name=\"EnableSQLiteStoreEngine\">true</PropertyValue><PropertyValue name=\"DisableAutoPch\">false</PropertyValue><PropertyValue name=\"DisableMemberListKeywords\">false</PropertyValue><PropertyValue name=\"EnumerateCommentTasks\">true</PropertyValue><PropertyValue name=\"SpaceAfterComma\">true</PropertyValue><PropertyValue name=\"SpaceBetweenEmptyBraces\">false</PropertyValue><PropertyValue name=\"IndentGotoLabels\">1</PropertyValue><PropertyValue name=\"RenameSearchStrings\">true</PropertyValue><PropertyValue name=\"RenameShowPreview\">false</PropertyValue><PropertyValue name=\"DisableDatabase\">false</PropertyValue><PropertyValue name=\"DisableIntelliSenseErrorsInErrorList\">false</PropertyValue><PropertyValue name=\"MemberListCommitAggressive\">false</PropertyValue><PropertyValue name=\"DisableMemberListExpansions\">false</PropertyValue><PropertyValue name=\"LoggingFilter\">0</PropertyValue><PropertyValue name=\"SpaceBeforeBracket\">false</PropertyValue><PropertyValue name=\"SpaceWithinFunctionParentheses\">false</PropertyValue><PropertyValue name=\"NewlineEmptyTypeCloseBrace\">false</PropertyValue><PropertyValue name=\"IndentationReference\">2</PropertyValue><PropertyValue name=\"DisableIncludeAutoComplete\">false</PropertyValue><PropertyValue name=\"EnableLogging\">false</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"CoffeeScript\" RegisteredName=\"CoffeeScript\" PackageName=\"CoffeeScriptPackage\"/><ToolsOptionsSubCategory name=\"CSharp\" RegisteredName=\"CSharp\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"CSharp-Specific\" RegisteredName=\"CSharp-Specific\" PackageName=\"CSharpPackage\"><PropertyValue name=\"Style_PreferExpressionBodiedConstructors\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_UseVarWhenDeclaringLocals\">0</PropertyValue><PropertyValue name=\"Space_AroundBinaryOperator\">1</PropertyValue><PropertyValue name=\"NewLines_QueryExpression_EachClause\">1</PropertyValue><PropertyValue name=\"Formatting_TriggerOnPaste\">1</PropertyValue><PropertyValue name=\"Style_UseImplicitTypeWhereApparent\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferInferredTupleNames\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_QualifyMethodAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferIntrinsicPredefinedTypeKeywordInDeclaration_CodeStyle\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"ExtractMethod_DoNotPutOutOrRefOnStruct\">1</PropertyValue><PropertyValue name=\"AutoInsertAsteriskForNewLinesOfBlockComments\">0</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedAccessors\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedOperators\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferCoalesceExpression\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"NewLines_Braces_Method\">1</PropertyValue><PropertyValue name=\"HighlightReferences\">0</PropertyValue><PropertyValue name=\"Style_PreferPatternMatchingOverIsWithCastCheck\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"AddImport_SuggestForTypesInReferenceAssemblies\">0</PropertyValue><PropertyValue name=\"InsertNewlineOnEnterWithWholeWord\">0</PropertyValue><PropertyValue name=\"Indent_CaseLabels\">1</PropertyValue><PropertyValue name=\"Formatting_TriggerOnBlockCompletion\">1</PropertyValue><PropertyValue name=\"EnableHighlightRelatedKeywords\">1</PropertyValue><PropertyValue name=\"Style_PreferInlinedVariableDeclaration\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinOtherParentheses\">0</PropertyValue><PropertyValue name=\"NewLines_Braces_ControlFlow\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_AnonymousMethod\">1</PropertyValue><PropertyValue name=\"ExtractMethod_AllowMovingDeclaration\">0</PropertyValue><PropertyValue name=\"HighlightMatchingPortionsOfCompletionListItems\">1</PropertyValue><PropertyValue name=\"BringUpOnIdentifier\">1</PropertyValue><PropertyValue name=\"Wrapping_KeepStatementsOnSingleLine\">1</PropertyValue><PropertyValue name=\"Style_PreferExplicitTupleNames\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Space_AfterBasesColon\">1</PropertyValue><PropertyValue name=\"EnterKeyBehavior\">0</PropertyValue><PropertyValue name=\"Indent_Braces\">0</PropertyValue><PropertyValue name=\"DisplayLineSeparators\">0</PropertyValue><PropertyValue name=\"Wrapping_IgnoreSpacesAroundVariableDeclaration\">0</PropertyValue><PropertyValue name=\"Style_PreferPatternMatchingOverAsWithNullCheck\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferConditionalDelegateCall\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_UseImplicitTypeForIntrinsicTypes\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinMethodCallParentheses\">0</PropertyValue><PropertyValue name=\"Space_AfterCast\">0</PropertyValue><PropertyValue name=\"AddImport_SuggestForTypesInNuGetPackages\">0</PropertyValue><PropertyValue name=\"SortUsings_PlaceSystemFirst\">0</PropertyValue><PropertyValue name=\"WarnOnBuildErrors\">0</PropertyValue><PropertyValue name=\"Style_QualifyEventAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_NamingPreferences\">&lt;NamingPreferencesInfo SerializationVersion=\"4\"&gt;\n  &lt;SymbolSpecifications&gt;\n    &lt;SymbolSpecification ID=\"5c545a62-b14d-460a-88d8-e936c0a39316\" Name=\"Класс\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Class&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"23d856b4-5089-4405-83ce-749aada99153\" Name=\"Интерфейс\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Interface&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"d1796e78-ff66-463f-8576-eb46416060c0\" Name=\"Структура\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Struct&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"d8af8dc6-1ade-441d-9947-8946922e198a\" Name=\"Перечисление\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Enum&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"408a3347-b908-4b54-a954-1355e64c1de3\" Name=\"Делегат\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Delegate&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"830657f6-e7e5-4830-b328-f109d3b6c165\" Name=\"Событие\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Event&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"390caed4-f0a9-42bb-adbb-b44c4a302a22\" Name=\"Метод\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"af410767-f189-47c6-b140-aeccf1ff242e\" Name=\"Частный метод\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"8076757e-6a4a-47f1-9b4b-ae8a3284e987\" Name=\"Абстрактный метод\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList&gt;\n        &lt;ModifierKind&gt;IsAbstract&lt;/ModifierKind&gt;\n      &lt;/RequiredModifierList&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"16133061-a8e7-4392-92c3-1d93cd54c218\" Name=\"Статический метод\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList&gt;\n        &lt;ModifierKind&gt;IsStatic&lt;/ModifierKind&gt;\n      &lt;/RequiredModifierList&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"da6a2919-5aa6-4ad1-a24d-576776ed3974\" Name=\"Свойство\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Property&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"b24a91ce-3501-4799-b6df-baf044156c83\" Name=\"Открытое или защищенное поле\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Field&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"70af42cb-1741-4027-969c-9edc4877d965\" Name=\"Статическое поле\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Field&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList&gt;\n        &lt;ModifierKind&gt;IsStatic&lt;/ModifierKind&gt;\n      &lt;/RequiredModifierList&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"10790aa6-0a0b-432d-a52d-d252ca92302b\" Name=\"Частное или внутреннее поле\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Field&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"ac995be4-88de-4771-9dcc-a456a7c02d89\" Name=\"Частное или внутреннее статическое поле\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Field&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList&gt;\n        &lt;ModifierKind&gt;IsStatic&lt;/ModifierKind&gt;\n      &lt;/RequiredModifierList&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"2c07f5bf-bc81-4c2b-82b4-ae9b3ffd0ba4\" Name=\"Типы\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;TypeKind&gt;Class&lt;/TypeKind&gt;\n        &lt;TypeKind&gt;Struct&lt;/TypeKind&gt;\n        &lt;TypeKind&gt;Interface&lt;/TypeKind&gt;\n        &lt;TypeKind&gt;Enum&lt;/TypeKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n    &lt;SymbolSpecification ID=\"5f3ddba1-279f-486c-801e-5c097c36dd85\" Name=\"Не являющиеся полем члены\"&gt;\n      &lt;ApplicableSymbolKindList&gt;\n        &lt;SymbolKind&gt;Property&lt;/SymbolKind&gt;\n        &lt;SymbolKind&gt;Method&lt;/SymbolKind&gt;\n        &lt;SymbolKind&gt;Event&lt;/SymbolKind&gt;\n      &lt;/ApplicableSymbolKindList&gt;\n      &lt;ApplicableAccessibilityList&gt;\n        &lt;AccessibilityKind&gt;Public&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Internal&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Private&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;Protected&lt;/AccessibilityKind&gt;\n        &lt;AccessibilityKind&gt;ProtectedOrInternal&lt;/AccessibilityKind&gt;\n      &lt;/ApplicableAccessibilityList&gt;\n      &lt;RequiredModifierList /&gt;\n    &lt;/SymbolSpecification&gt;\n  &lt;/SymbolSpecifications&gt;\n  &lt;NamingStyles&gt;\n    &lt;NamingStyle ID=\"87e7c501-9948-4b53-b1eb-a6cbe918feee\" Name=\"ВсеЧастиСПрописнойБуквы\" Prefix=\"\" Suffix=\"\" WordSeparator=\"\" CapitalizationScheme=\"PascalCase\" /&gt;\n    &lt;NamingStyle ID=\"1ecc5eb6-b5fc-49a5-a9f1-a980f3e48c92\" Name=\"Начинается с I\" Prefix=\"I\" Suffix=\"\" WordSeparator=\"\" CapitalizationScheme=\"PascalCase\" /&gt;\n  &lt;/NamingStyles&gt;\n  &lt;NamingRules&gt;\n    &lt;SerializableNamingRule SymbolSpecificationID=\"23d856b4-5089-4405-83ce-749aada99153\" NamingStyleID=\"1ecc5eb6-b5fc-49a5-a9f1-a980f3e48c92\" EnforcementLevel=\"Info\" /&gt;\n    &lt;SerializableNamingRule SymbolSpecificationID=\"2c07f5bf-bc81-4c2b-82b4-ae9b3ffd0ba4\" NamingStyleID=\"87e7c501-9948-4b53-b1eb-a6cbe918feee\" EnforcementLevel=\"Info\" /&gt;\n    &lt;SerializableNamingRule SymbolSpecificationID=\"5f3ddba1-279f-486c-801e-5c097c36dd85\" NamingStyleID=\"87e7c501-9948-4b53-b1eb-a6cbe918feee\" EnforcementLevel=\"Info\" /&gt;\n  &lt;/NamingRules&gt;\n&lt;/NamingPreferencesInfo&gt;</PropertyValue><PropertyValue name=\"ShowSnippets\">1</PropertyValue><PropertyValue name=\"ShowKeywords\">0</PropertyValue><PropertyValue name=\"Space_WithinExpressionParentheses\">0</PropertyValue><PropertyValue name=\"Space_InControlFlowConstruct\">1</PropertyValue><PropertyValue name=\"NewLines_Keywords_Catch\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_ObjectInitializer\">1</PropertyValue><PropertyValue name=\"NewLines_AnonymousTypeInitializer_EachMember\">1</PropertyValue><PropertyValue name=\"Formatting_TriggerOnStatementCompletion\">1</PropertyValue><PropertyValue name=\"CSharpClosedFileDiagnostics\">-1</PropertyValue><PropertyValue name=\"ClosedFileDiagnostics\">-1</PropertyValue><PropertyValue name=\"Style_PreferBraces\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferIntrinsicPredefinedTypeKeywordInMemberAccess_CodeStyle\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Space_BetweenEmptyMethodDeclarationParentheses\">0</PropertyValue><PropertyValue name=\"NewLines_Keywords_Finally\">1</PropertyValue><PropertyValue name=\"Indent_UnindentLabels\">2</PropertyValue><PropertyValue name=\"Style_PreferReadonly\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferNullPropagation\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"NewLines_ObjectInitializer_EachMember\">1</PropertyValue><PropertyValue name=\"NewLines_Keywords_Else\">1</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedIndexers\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferInferredAnonymousTypeMemberNames\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferObjectInitializer\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinMethodDeclarationParentheses\">0</PropertyValue><PropertyValue name=\"Space_BetweenEmptyMethodCallParentheses\">0</PropertyValue><PropertyValue name=\"Space_BeforeSemicolonsInForStatement\">0</PropertyValue><PropertyValue name=\"Space_BeforeComma\">0</PropertyValue><PropertyValue name=\"Space_AfterMethodCallName\">0</PropertyValue><PropertyValue name=\"Space_AfterComma\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_Property\">1</PropertyValue><PropertyValue name=\"Wrapping_IgnoreSpacesAroundBinaryOperators\">0</PropertyValue><PropertyValue name=\"Style_PreferCollectionInitializer\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Space_BeforeBasesColon\">1</PropertyValue><PropertyValue name=\"Space_AfterMethodDeclarationName\">0</PropertyValue><PropertyValue name=\"Space_AfterDot\">0</PropertyValue><PropertyValue name=\"RenameTrackingPreview\">1</PropertyValue><PropertyValue name=\"AutoComment\">1</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedProperties\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"NewLines_Braces_Type\">1</PropertyValue><PropertyValue name=\"SnippetsBehavior\">2</PropertyValue><PropertyValue name=\"EnterOutliningModeOnOpen\">1</PropertyValue><PropertyValue name=\"Style_PreferExpressionBodiedMethods\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_PreferThrowExpression\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"true\" DiagnosticSeverity=\"Info\" /&gt;</PropertyValue><PropertyValue name=\"Style_QualifyPropertyAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinSquares\">0</PropertyValue><PropertyValue name=\"NewLines_Braces_Accessor\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_LambdaExpressionBody\">1</PropertyValue><PropertyValue name=\"Style_UseImplicitTypeWherePossible\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Style_QualifyFieldAccess\">&lt;CodeStyleOption SerializationVersion=\"1\" Type=\"Boolean\" Value=\"false\" DiagnosticSeverity=\"Hidden\" /&gt;</PropertyValue><PropertyValue name=\"Space_WithinCastParentheses\">0</PropertyValue><PropertyValue name=\"Space_AfterSemicolonsInForStatement\">1</PropertyValue><PropertyValue name=\"NewLines_Braces_AnonymousTypeInitializer\">1</PropertyValue><PropertyValue name=\"Indent_FlushLabelsLeft\">0</PropertyValue><PropertyValue name=\"Indent_CaseContents\">1</PropertyValue><PropertyValue name=\"Wrapping_PreserveSingleLine\">1</PropertyValue><PropertyValue name=\"Space_BetweenEmptySquares\">0</PropertyValue><PropertyValue name=\"Space_BeforeOpenSquare\">0</PropertyValue><PropertyValue name=\"Space_BeforeDot\">0</PropertyValue><PropertyValue name=\"RenameSmartTagEnabled\">1</PropertyValue><PropertyValue name=\"Refactoring_Verification_Enabled\">0</PropertyValue><PropertyValue name=\"Indent_CaseContentsWhenBlock\">1</PropertyValue><PropertyValue name=\"Indent_BlockContents\">1</PropertyValue><PropertyValue name=\"ShowCompletionItemFilters\">1</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"CSS\" RegisteredName=\"CSS\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"General\" RegisteredName=\"General\" PackageName=\"Text Management Package\"><PropertyValue name=\"DragNDropTextEditing\">false</PropertyValue><PropertyValue name=\"HighlightCurrentLine\">true</PropertyValue><PropertyValue name=\"EditorEmulation\">0</PropertyValue><PropertyValue name=\"DetectUTF8WithoutSignature\">true</PropertyValue><PropertyValue name=\"TrackChanges\">true</PropertyValue><PropertyValue name=\"UndoCaretActions\">false</PropertyValue><PropertyValue name=\"SelectionMargin\">true</PropertyValue><PropertyValue name=\"GoToAnchorAfterEscape\">false</PropertyValue><PropertyValue name=\"AutoDelimiterHighlighting\">true</PropertyValue><PropertyValue name=\"MarginIndicatorBar\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"HTML\" RegisteredName=\"HTML\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"HTML Specific\" RegisteredName=\"HTML Specific\" PackageName=\"Visual Studio HTM Editor Package\"><PropertyValue name=\"StyleApplicationOverlayColor\">16244681</PropertyValue><PropertyValue name=\"LayoutResizeOverlayColor\">0</PropertyValue><PropertyValue name=\"LayoutVisibleBorderColor\">13027014</PropertyValue><PropertyValue name=\"LayoutUiActivatedBorderColor\">13003057</PropertyValue><PropertyValue name=\"LayoutOffsetColor\">16487691</PropertyValue><PropertyValue name=\"SpacerCellToolColor\">14413810</PropertyValue><PropertyValue name=\"ShowTagToolbar\">0</PropertyValue><PropertyValue name=\"RulerAndGridShowRuler\">0</PropertyValue><PropertyValue name=\"LayoutTableToolColor\">3575607</PropertyValue><PropertyValue name=\"HtmlIndent\">2</PropertyValue><PropertyValue name=\"DisableDesignView\">0</PropertyValue><PropertyValue name=\"MarkupValidationWarningLevel\">2</PropertyValue><PropertyValue name=\"ClientAttrCasing\">2</PropertyValue><PropertyValue name=\"AttrValueNotQuoted\">0</PropertyValue><PropertyValue name=\"CssPositionDesignMode\">2</PropertyValue><PropertyValue name=\"LayerBackgroundLabelColor\">15724527</PropertyValue><PropertyValue name=\"AutoThumbnailBorder\">1</PropertyValue><PropertyValue name=\"JsEditorTimeout\">50</PropertyValue><PropertyValue name=\"ManualDtp\">243</PropertyValue><PropertyValue name=\"StyleApplicationOverlayBackgroundColor\">15577469</PropertyValue><PropertyValue name=\"LayoutSiteSelectedBorderColor\">0</PropertyValue><PropertyValue name=\"CssUseHtmlForImageSize\">0</PropertyValue><PropertyValue name=\"CssBackgroundDesignMode\">2</PropertyValue><PropertyValue name=\"HtmlGifInterlaced\">0</PropertyValue><PropertyValue name=\"JsExternalTimeout\">2000</PropertyValue><PropertyValue name=\"AutoInsertCloseTag\">-1</PropertyValue><PropertyValue name=\"InsertAttrValueQuotesFormatting\">-1</PropertyValue><PropertyValue name=\"WebPartColor\">7257087</PropertyValue><PropertyValue name=\"TemplateColor\">12383999</PropertyValue><PropertyValue name=\"RulerAndGridShowGrid\">0</PropertyValue><PropertyValue name=\"ParentRegionColor\">128</PropertyValue><PropertyValue name=\"LargePictureFileType\">jpg</PropertyValue><PropertyValue name=\"FormatHTMLOnPaste\">0</PropertyValue><PropertyValue name=\"WrapTagLength\">80</PropertyValue><PropertyValue name=\"SmallPictureFileType\">gif</PropertyValue><PropertyValue name=\"HtmlMargin\">80</PropertyValue><PropertyValue name=\"JsFailsafeTimeout\">15000</PropertyValue><PropertyValue name=\"RequireAngleBracketForTagIntellisense\">-1</PropertyValue><PropertyValue name=\"RulerAndGridGridSpacing\">20</PropertyValue><PropertyValue name=\"EditorOptionFlags\">8388616</PropertyValue><PropertyValue name=\"JsMaxCacheFiles\">5</PropertyValue><PropertyValue name=\"IdleYield\">-1</PropertyValue><PropertyValue name=\"IdleParseDelay\">750</PropertyValue><PropertyValue name=\"InsertAttrValueQuotesTyping\">-1</PropertyValue><PropertyValue name=\"LayoutResizeOverlayBackgroundColor\">13172735</PropertyValue><PropertyValue name=\"LayoutPaddingOverlayColor\">16765887</PropertyValue><PropertyValue name=\"CssBorderDesignMode\">2</PropertyValue><PropertyValue name=\"RulerAndGridSnapToGrid\">0</PropertyValue><PropertyValue name=\"LayerLabelTextColor\">0</PropertyValue><PropertyValue name=\"HtmlDoctypeValidation\">-1</PropertyValue><PropertyValue name=\"LoadToolboxOnIdle\">-1</PropertyValue><PropertyValue name=\"ClientTagNotLowerCase\">0</PropertyValue><PropertyValue name=\"RestrictionsBOMFlag\">4294967295</PropertyValue><PropertyValue name=\"HtmlRightMarginRule\">2</PropertyValue><PropertyValue name=\"HtmlBreakInTags\">255</PropertyValue><PropertyValue name=\"AutoThumbnailSize\">100</PropertyValue><PropertyValue name=\"HTMLSortAttributes\">1</PropertyValue><PropertyValue name=\"LayoutMarginOverlayColor\">12895452</PropertyValue><PropertyValue name=\"CssPageDesignMode\">1</PropertyValue><PropertyValue name=\"RulerAndGridSnapDistance\">5</PropertyValue><PropertyValue name=\"RulerAndGridGridLine\">2</PropertyValue><PropertyValue name=\"MasterPageDesignOutlineColor\">16760311</PropertyValue><PropertyValue name=\"LayoutCellToolColor\">16750848</PropertyValue><PropertyValue name=\"AutoThumbnailBorderSize\">2</PropertyValue><PropertyValue name=\"MarkupValidationErrorLevel\">1</PropertyValue><PropertyValue name=\"VerticalSplitView\">0</PropertyValue><PropertyValue name=\"WrapTag\">0</PropertyValue><PropertyValue name=\"ServerAttrCasing\">3</PropertyValue><PropertyValue name=\"ServerTagCasing\">3</PropertyValue><PropertyValue name=\"TagNotWellFormed\">0</PropertyValue><PropertyValue name=\"CssUseShorthands\">1</PropertyValue><PropertyValue name=\"CssListDesignMode\">2</PropertyValue><PropertyValue name=\"MasterPageParentRegionColor\">8650752</PropertyValue><PropertyValue name=\"HtmlJpegCompressions\">0</PropertyValue><PropertyValue name=\"IdleOutlineDelay\">1800</PropertyValue><PropertyValue name=\"InCSS\">-1</PropertyValue><PropertyValue name=\"LayoutMarginOverlayBackgroundColor\">14145511</PropertyValue><PropertyValue name=\"CssMarginsDesignMode\">2</PropertyValue><PropertyValue name=\"LayoutPaddingOverlayBackgroundColor\">16768975</PropertyValue><PropertyValue name=\"HtmlGifTransparent\">0</PropertyValue><PropertyValue name=\"EditableColor\">7257087</PropertyValue><PropertyValue name=\"AutoThumbnailChisel\">0</PropertyValue><PropertyValue name=\"JsJQueryTemplateTypeNames\">text/html;text/x-jquery-tmpl;text/template;text/x-handlebars;text/x-handlebars-template;text/x-jsrender</PropertyValue><PropertyValue name=\"MasterPageContentRegionColor\">16739258</PropertyValue><PropertyValue name=\"LayerHandleBackgroundColor\">16777215</PropertyValue><PropertyValue name=\"LayerHandleColor\">0</PropertyValue><PropertyValue name=\"HtmlJpegQuality\">90</PropertyValue><PropertyValue name=\"TargetFriendlyName\">HTML5</PropertyValue><PropertyValue name=\"ValidateDeprecated\">0</PropertyValue><PropertyValue name=\"ShowAspNonVisualElements\">1</PropertyValue><PropertyValue name=\"CssReuseUserClasses\">0</PropertyValue><PropertyValue name=\"IdleSelectionSyncDelay\">500</PropertyValue><PropertyValue name=\"ShowErrors\">-1</PropertyValue><PropertyValue name=\"ClientTagCasing\">2</PropertyValue><PropertyValue name=\"RulerAndGridUnit\">0</PropertyValue><PropertyValue name=\"RulerAndGridGridColor\">11119017</PropertyValue><PropertyValue name=\"HtmlIndentTabs\">0</PropertyValue><PropertyValue name=\"StartPageView\">1</PropertyValue><PropertyValue name=\"CssIndentTabs\">0</PropertyValue><PropertyValue name=\"AutoThumbnailType\">0</PropertyValue><PropertyValue name=\"AutoFormAroundControls\">1</PropertyValue><PropertyValue name=\"ShowVisualAids\">1</PropertyValue><PropertyValue name=\"CssTextDesignMode\">2</PropertyValue><PropertyValue name=\"WebPartZoneColor\">16750848</PropertyValue><PropertyValue name=\"IdleMainLoopDelay\">1200</PropertyValue><PropertyValue name=\"OutlineHTMLOnFileOpen\">-1</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"HTMLX\" RegisteredName=\"HTMLX\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"JavaScript\" RegisteredName=\"JavaScript\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"JavaScript Specific\" RegisteredName=\"JavaScript Specific\" PackageName=\"Microsoft.VisualStudio.JSLS.JavaScriptLanguageServicePackage, Microsoft.VisualStudio.JSLS, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\"><PropertyValue name=\"ImplicitReferencesString\">Implicit (Windows)|$(VSInstallDir)\\JavaScript\\References\\libhelp.js|$(VSInstallDir)\\JavaScript\\References\\domWindows.js|$(VSInstallDir)\\JavaScript\\References\\underscorefilter.js|$(VSInstallDir)\\JavaScript\\References\\showPlainComments.js;Implicit (Windows 8.1)|$(VSInstallDir)\\JavaScript\\References\\libhelp.js|$(VSInstallDir)\\JavaScript\\References\\sitetypesWindows.js|$(VSInstallDir)\\JavaScript\\References\\domWindows_8.1.js|$(VSInstallDir)\\JavaScript\\References\\underscorefilter.js|$(VSInstallDir)\\JavaScript\\References\\showPlainComments.js;Implicit (Windows Phone 8.1)|$(VSInstallDir)\\JavaScript\\References\\libhelp.js|$(VSInstallDir)\\JavaScript\\References\\sitetypesWindows.js|$(VSInstallDir)\\JavaScript\\References\\domWindowsPhone_8.1.js|$(VSInstallDir)\\JavaScript\\References\\underscorefilter.js|$(VSInstallDir)\\JavaScript\\References\\showPlainComments.js;Implicit (Web)|$(VSInstallDir)\\JavaScript\\References\\libhelp.js|$(VSInstallDir)\\JavaScript\\References\\sitetypesWeb.js|$(VSInstallDir)\\JavaScript\\References\\domWeb.js|$(VSInstallDir)\\JavaScript\\References\\underscorefilter.js|$(VSInstallDir)\\JavaScript\\References\\showPlainComments.js;Dedicated Worker|$(VSInstallDir)\\JavaScript\\References\\libhelp.js|$(VSInstallDir)\\JavaScript\\References\\dedicatedworker.js|$(VSInstallDir)\\JavaScript\\References\\underscorefilter.js|$(VSInstallDir)\\JavaScript\\References\\showPlainComments.js;Generic|$(VSInstallDir)\\JavaScript\\References\\libhelp.js|$(VSInstallDir)\\JavaScript\\References\\underscorefilter.js|$(VSInstallDir)\\JavaScript\\References\\showPlainComments.js;</PropertyValue><PropertyValue name=\"InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis\">false</PropertyValue><PropertyValue name=\"FormatOnPaste\">true</PropertyValue><PropertyValue name=\"InsertSpaceAfterCommaDelimiter\">true</PropertyValue><PropertyValue name=\"PlaceOpenBraceOnNewLineForFunctionsAndClasses\">false</PropertyValue><PropertyValue name=\"FormatCompletedLineOnEnter\">true</PropertyValue><PropertyValue name=\"InsertSpaceAfterKeywordsInControlFlowStatements\">true</PropertyValue><PropertyValue name=\"FormatCompletedBlockOnRightCurlyBrace\">true</PropertyValue><PropertyValue name=\"InsertSpaceBeforeAndAfterBinaryOperators\">true</PropertyValue><PropertyValue name=\"DownloadRemoteReferences\">false</PropertyValue><PropertyValue name=\"FormatCompletedStatementOnSemicolon\">true</PropertyValue><PropertyValue name=\"OnlyUseTaborEnterToCommit\">true</PropertyValue><PropertyValue name=\"ShowErrorsAsWarnings\">true</PropertyValue><PropertyValue name=\"InsertSpaceAfterFunctionKeywordForAnonymousFunctions\">true</PropertyValue><PropertyValue name=\"PlaceOpenBraceOnNewLineForControlBlocks\">false</PropertyValue><PropertyValue name=\"ShowSyntaxErrors\">true</PropertyValue><PropertyValue name=\"InsertSpaceAfterSemicolonInForStatements\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"JSON\" RegisteredName=\"JSON\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">2</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">2</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"LESS\" RegisteredName=\"LESS\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"PlainText\" RegisteredName=\"PlainText\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">1</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">true</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"ResJSON Resource\" RegisteredName=\"ResJSON Resource\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">1</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">true</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"SCSS\" RegisteredName=\"SCSS\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">true</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"T-SQL90\" RegisteredName=\"T-SQL90\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">1</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">true</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"XAML\" RegisteredName=\"XAML\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">4</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">true</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">false</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">4</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name=\"XML\" RegisteredName=\"XML\" PackageName=\"Text Management Package\"><PropertyValue name=\"TabSize\">2</PropertyValue><PropertyValue name=\"ShowChanges\">true</PropertyValue><PropertyValue name=\"AutoListMembers\">true</PropertyValue><PropertyValue name=\"ShowPreview\">true</PropertyValue><PropertyValue name=\"ShowMarks\">true</PropertyValue><PropertyValue name=\"IndentStyle\">2</PropertyValue><PropertyValue name=\"ShowCaretPosition\">true</PropertyValue><PropertyValue name=\"HideAdvancedMembers\">true</PropertyValue><PropertyValue name=\"ShowNavigationBar\">false</PropertyValue><PropertyValue name=\"UseMapMode\">false</PropertyValue><PropertyValue name=\"VirtualSpace\">false</PropertyValue><PropertyValue name=\"ShowAnnotations\">true</PropertyValue><PropertyValue name=\"ShowVerticalScrollBar\">true</PropertyValue><PropertyValue name=\"InsertTabs\">false</PropertyValue><PropertyValue name=\"WordWrapGlyphs\">true</PropertyValue><PropertyValue name=\"EnableLeftClickForURLs\">true</PropertyValue><PropertyValue name=\"ShowErrors\">true</PropertyValue><PropertyValue name=\"OverviewWidth\">58</PropertyValue><PropertyValue name=\"ShowLineNumbers\">true</PropertyValue><PropertyValue name=\"WordWrap\">false</PropertyValue><PropertyValue name=\"IndentSize\">2</PropertyValue><PropertyValue name=\"BraceCompletion\">false</PropertyValue><PropertyValue name=\"ShowHorizontalScrollBar\">true</PropertyValue><PropertyValue name=\"CutCopyBlankLines\">true</PropertyValue><PropertyValue name=\"AutoListParams\">true</PropertyValue></ToolsOptionsSubCategory></ToolsOptionsCategory><ToolsOptionsCategory name=\"XAML Designer\" RegisteredName=\"XAML Designer\"><ToolsOptionsSubCategory name=\"Artboard\" RegisteredName=\"Artboard\" PackageName=\"XamlDesignerPackage\"/><ToolsOptionsSubCategory name=\"General\" RegisteredName=\"General\" PackageName=\"XamlDesignerPackage\"/></ToolsOptionsCategory></ToolsOptions><Category name=\"Debugger\" Category=\"{EEDBF29A-5C8B-4E01-827C-263382C18CFE}\" Package=\"{C9DD4A57-47FB-11D2-83E7-00C04F9902C1}\" RegisteredName=\"Debugger\" PackageName=\"Visual Studio Debugger\"><PropertyValue name=\"ConfirmDeleteAllBreakpoints\">1</PropertyValue><PropertyValue name=\"StopAllProcesses\">1</PropertyValue><PropertyValue name=\"StopOnExceptionCrossingManagedBoundary\">0</PropertyValue><PropertyValue name=\"EnableAddressLevelDebugging\">1</PropertyValue><PropertyValue name=\"ShowDisassemblyWhenNoSource\">0</PropertyValue><PropertyValue name=\"EnableBreakpointConstraints\">1</PropertyValue><PropertyValue name=\"UseExceptionHelper\">0</PropertyValue><PropertyValue name=\"AutoUnwindOnException\">1</PropertyValue><PropertyValue name=\"JustMyCode\">1</PropertyValue><PropertyValue name=\"ShowNonPublicMembers\">0</PropertyValue><PropertyValue name=\"WarnIfNoUserCodeOnLaunch\">0</PropertyValue><PropertyValue name=\"FrameworkSourceStepping\">0</PropertyValue><PropertyValue name=\"WarnAboutSymbolCacheDuringRemoteManagedDebugging\">1</PropertyValue><PropertyValue name=\"EnableStepFiltering\">1</PropertyValue><PropertyValue name=\"WarnOnStepFilter\">1</PropertyValue><PropertyValue name=\"AllowImplicitFuncEval\">1</PropertyValue><PropertyValue name=\"AllowToString\">1</PropertyValue><PropertyValue name=\"UseSourceServer\">0</PropertyValue><PropertyValue name=\"ShowSourceServerDiagnostics\">0</PropertyValue><PropertyValue name=\"AlwaysColorMarkerText\">0</PropertyValue><PropertyValue name=\"UseDocumentChecksum\">1</PropertyValue><PropertyValue name=\"OutputToImmediate\">0</PropertyValue><PropertyValue name=\"ShowRawStructures\">0</PropertyValue><PropertyValue name=\"DisableJITOptimization\">0</PropertyValue><PropertyValue name=\"ShowNoSymbolsDialog\">1</PropertyValue><PropertyValue name=\"ShowScriptDebuggingDisabledDialog\">0</PropertyValue><PropertyValue name=\"EnableILInterpreterMinidump\">1</PropertyValue><PropertyValue name=\"EnableILInterpreterLive\">0</PropertyValue><PropertyValue name=\"HexDisplay\">0</PropertyValue><PropertyValue name=\"HexInput\">0</PropertyValue><PropertyValue name=\"MapClientBreakpoints\">1</PropertyValue><PropertyValue name=\"AddUnmappedBreakpointAtMappedLocation\">0</PropertyValue><PropertyValue name=\"StepIntoOnRestart\">0</PropertyValue><PropertyValue name=\"ENCEnable\">1</PropertyValue><PropertyValue name=\"ENCApplyChangesOnContinue\">1</PropertyValue><PropertyValue name=\"ENCWelcome\">0</PropertyValue><PropertyValue name=\"ENCStaleCodeWarning\">1</PropertyValue><PropertyValue name=\"ENCPrecompile\">0</PropertyValue><PropertyValue name=\"ENCRelink\">1</PropertyValue><PropertyValue name=\"NOENCAllowEdits\">1</PropertyValue><PropertyValue name=\"NOENCIgnore\">0</PropertyValue><PropertyValue name=\"NOENCRebuild\">0</PropertyValue><PropertyValue name=\"ENCEnableWhenRemoteDebugging\">0</PropertyValue><PropertyValue name=\"ConfirmFoundFiles\">0</PropertyValue><PropertyValue name=\"DisasmLineNumbers\">0</PropertyValue><PropertyValue name=\"ModulesShowAll\">1</PropertyValue><PropertyValue name=\"UseCodeSense\">1</PropertyValue><PropertyValue name=\"DisasmFields\">67577</PropertyValue><PropertyValue name=\"CallStackViewOptions\">3604736</PropertyValue><PropertyValue name=\"ShowExternalCode\">0</PropertyValue><PropertyValue name=\"SourceStepUnit\">0</PropertyValue><PropertyValue name=\"DisasmStepUnit\">2</PropertyValue><PropertyValue name=\"CrossThreadCallStack\">1</PropertyValue><PropertyValue name=\"ShowOnlyFlaggedThreads\">0</PropertyValue><PropertyValue name=\"ConcurrencySupport\">1</PropertyValue><PropertyValue name=\"GuessAtThreadNames\">1</PropertyValue><PropertyValue name=\"ShowOtherThreadIpMarkers\">0</PropertyValue><PropertyValue name=\"ShowThreadCategory\">1</PropertyValue><PropertyValue name=\"SaveRemoteDumps\">1</PropertyValue><PropertyValue name=\"LongEvalTimeout\">10000</PropertyValue><PropertyValue name=\"NormalEvalTimeout\">5000</PropertyValue><PropertyValue name=\"QuickwatchTimeout\">20000</PropertyValue><PropertyValue name=\"DataTipTimeout\">3000</PropertyValue><PropertyValue name=\"AutosReturnValsTimeout\">2000</PropertyValue><PropertyValue name=\"AutosRegistersTimeout\">2000</PropertyValue><PropertyValue name=\"LocalsTimeout\">10000</PropertyValue><PropertyValue name=\"RegistersTimeout\">10000</PropertyValue><PropertyValue name=\"AddressExpressionTimeout\">10000</PropertyValue><PropertyValue name=\"ScriptDocsTimeout\">10000</PropertyValue><PropertyValue name=\"ImmediateWindowTimeout\">5000</PropertyValue><PropertyValue name=\"SetValueTimeout\">15000</PropertyValue><PropertyValue name=\"TreeGridRePaintTimer\">250</PropertyValue><PropertyValue name=\"TreeGridBusyPaintTimer\">1000</PropertyValue><PropertyValue name=\"ModulesWindowUpdateTimer\">500</PropertyValue><PropertyValue name=\"TreeGridDelayOnEnterTimer\">125</PropertyValue><PropertyValue name=\"DelayTreeGridPaintOnBreak\">1</PropertyValue><PropertyValue name=\"ShowNonprintableCharsAsGlyphs\">0</PropertyValue><PropertyValue name=\"ShowSystemProcesses\">0</PropertyValue><PropertyValue name=\"ShowProcessesFromAllSessions\">0</PropertyValue><PropertyValue name=\"EnhancedDataTips\">1</PropertyValue><PropertyValue name=\"DataTipDismissalSensitivity\">1</PropertyValue><PropertyValue name=\"DataTipKeyboardDismissal\">0</PropertyValue><PropertyValue name=\"UserSpecifiedEngines\">0</PropertyValue><PropertyValue name=\"OutputOnException\">1</PropertyValue><PropertyValue name=\"OutputOnStepFilter\">1</PropertyValue><PropertyValue name=\"OutputOnModuleLoad\">1</PropertyValue><PropertyValue name=\"OutputOnModuleUnload\">1</PropertyValue><PropertyValue name=\"OutputOnModuleSymbolSearch\">1</PropertyValue><PropertyValue name=\"OutputOnProcessDestroy\">1</PropertyValue><PropertyValue name=\"OutputOnThreadDestroy\">1</PropertyValue><PropertyValue name=\"OutputOnOutputDebugString\">1</PropertyValue><PropertyValue name=\"OutputOnDebuggerMessage\">1</PropertyValue><PropertyValue name=\"VariableWindowIcons\">1</PropertyValue><PropertyValue name=\"DisableAttachSecurityWarning\">0</PropertyValue><PropertyValue name=\"LoadDllExports\">0</PropertyValue><PropertyValue name=\"NativeRPC\">0</PropertyValue><PropertyValue name=\"AllowSideEffectEval\">0</PropertyValue><PropertyValue name=\"LoadSymbolsWhenSettingsChanged\">1</PropertyValue><PropertyValue name=\"SymbolUseExcludeList\">1</PropertyValue><PropertyValue name=\"SymbolsAlwaysLoadAdjacent\">1</PropertyValue><PropertyValue name=\"DontForceCacheOnManualLoad\">0</PropertyValue><PropertyValue name=\"SymbolUseMSSymbolServers\">0</PropertyValue><PropertyValue name=\"AutoLoadFromSymbolPath\">1</PropertyValue><PropertyValue name=\"OneClickEdit\">0</PropertyValue><PropertyValue name=\"OfferArrayExpansion\">0</PropertyValue><PropertyValue name=\"VariableWindowPromptOnLargeExpansion\">1</PropertyValue><PropertyValue name=\"VariableWindowMaxSupportedChildren\">1000000</PropertyValue><PropertyValue name=\"PromptToAddSourceToIgnoreList\">0</PropertyValue><PropertyValue name=\"OwnerDrawDebugLocationToolbar\">0</PropertyValue><PropertyValue name=\"EnableSelectedBreakpointHighlight\">1</PropertyValue><PropertyValue name=\"DisableUniscribe\">0</PropertyValue><PropertyValue name=\"ShowParallelStacksBottomUp\">1</PropertyValue><PropertyValue name=\"ThreadsWindowGroupingColumn\">2048</PropertyValue><PropertyValue name=\"ThreadsWindowVisibleColumns\">253</PropertyValue><PropertyValue name=\"ThreadsWindowShowTipWhenCallStackExpanded\">0</PropertyValue><PropertyValue name=\"AllowDesignModePinning\">0</PropertyValue><PropertyValue name=\"CallStackParamToString\">0</PropertyValue><PropertyValue name=\"CheckRDTForFilesFirst\">1</PropertyValue><PropertyValue name=\"AllowSourceServerInPartialTrust\">0</PropertyValue><PropertyValue name=\"ENCEnableCrossUser\">0</PropertyValue><PropertyValue name=\"ENCEnableNative\">1</PropertyValue><PropertyValue name=\"OpenNewFilesProvisionally\">1</PropertyValue><PropertyValue name=\"ForceRealFuncEval\">1</PropertyValue><PropertyValue name=\"ShowOnlyCurrentProcess\">0</PropertyValue><PropertyValue name=\"GpuRaceHazardsAllowSame\">0</PropertyValue><PropertyValue name=\"DisasmToolbarIsExpanded\">0</PropertyValue><PropertyValue name=\"AlwaysRunUntrustedSourceServerCommands\">0</PropertyValue><PropertyValue name=\"DebugEngineCompatibilityMode\">0</PropertyValue><PropertyValue name=\"CallStackViewOptionsEx\">1</PropertyValue><PropertyValue name=\"ManagedDebugEngineCompatibilityMode_Normal\">0</PropertyValue><PropertyValue name=\"ManagedDebugEngineCompatibilityMode_ProductInstalled\">1</PropertyValue><PropertyValue name=\"ManagedMemoryViewCollapseSmallObjects\">0</PropertyValue><PropertyValue name=\"NativeDebugEngineCompatibilityMode\">0</PropertyValue><PropertyValue name=\"ManagedMemoryViewHideUndeterminedTypes\">1</PropertyValue><PropertyValue name=\"ManagedMemoryViewJustMyCode\">1</PropertyValue><PropertyValue name=\"UseLegacyManagedEE\">0</PropertyValue><PropertyValue name=\"ShowClrCustomVisualizerSecurityWarning\">1</PropertyValue><PropertyValue name=\"EnableNativeDebugHeap\">0</PropertyValue><PropertyValue name=\"EnableXamlVisualDiagnostics\">1</PropertyValue><PropertyValue name=\"EnableXamlVisualDiagnosticsPreviewSelection\">0</PropertyValue><PropertyValue name=\"EnableDiagnosticToolsWindow\">1</PropertyValue><PropertyValue name=\"EnableIntelliTrace\">1</PropertyValue><PropertyValue name=\"PerformanceTipsEnableSysTime\">1</PropertyValue><PropertyValue name=\"TextVisualizerStringLimit\">32768</PropertyValue><PropertyValue name=\"ExceptionDescriptionMessageLimit\">8192</PropertyValue><PropertyValue name=\"UseNewExceptionHelper\">1</PropertyValue><PropertyValue name=\"UseSourceLink\">1</PropertyValue><PropertyValue name=\"EnableAspNetJavaScriptDebuggingOnLaunch\">0</PropertyValue><PropertyValue name=\"EnableXamlVisualDiagnosticsInAppMenu\">1</PropertyValue><PropertyValue name=\"EnableXamlVisualDiagnosticsEditAndContinue\">1</PropertyValue><PropertyValue name=\"EnableIntelliTraceInstrumentation\">0</PropertyValue><PropertyValue name=\"EnableRunToClick\">1</PropertyValue><PropertyValue name=\"EnableEdgeDevToolsWWAOnLaunch\">0</PropertyValue><PropertyValue name=\"EnableLegacyChromeJavaScriptDebuggerForASPNET\">0</PropertyValue><PropertyValue name=\"CallStackShowFrameType\">0</PropertyValue><PropertyValue name=\"UseVBCSLegacyExpressionEvaluator\">0</PropertyValue><PropertyValue name=\"EnableIntelliTraceSnapshot\">0</PropertyValue><PropertyValue name=\"PromptIntelliTraceSnapshot\">1</PropertyValue><PropertyValue name=\"EnableIntelliTraceSnapshotException\">1</PropertyValue><PropertyValue name=\"MaxIntelliTraceSnapshotOnException\">5</PropertyValue><PropertyValue name=\"DisableForegroundWindowSwitching\">0</PropertyValue><PropertyValue name=\"WarnIfNoAspNetJavaScriptDebuggingOnLaunch\">1</PropertyValue><PropertyValue name=\"SourceServerExtractToDirectory\"/><PropertyValue name=\"FrameworkSourceServerName\">https://referencesource.microsoft.com/symbols</PropertyValue><PropertyValue name=\"PublicSymbolServerName\"/><PropertyValue name=\"PublicSymbolServerName2\">https://msdl.microsoft.com/download/symbols</PropertyValue><PropertyValue name=\"DefaultTracepointMessage\">Function: $FUNCTION, Thread: $TID $TNAME</PropertyValue><PropertyValue name=\"ProgramToDebugPath\"/><PropertyValue name=\"AttachToProcessDefaultEngineList\"/><PropertyValue name=\"SecureSourceLocalDirectory\"/><PropertyValue name=\"SymbolPath\"/><PropertyValue name=\"SymbolPathState\"/><PropertyValue name=\"SymbolCacheDir\">C:\\Users\\123\\AppData\\Local\\Temp\\SymbolCache</PropertyValue><PropertyValue name=\"SymbolIncludeList\"/><PropertyValue name=\"SymbolIncludeListState\"/><PropertyValue name=\"SymbolExcludeList\"/><PropertyValue name=\"SymbolExcludeListState\"/></Category><Category name=\"Environment_Group\" RegisteredName=\"Environment_Group\"><Category name=\"Environment_Aliases\" Category=\"{AD334E74-368A-4c46-9AF8-F53ABF0775F2}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_Aliases\" PackageName=\"Visual Studio Environment Package\"><Aliases Version=\"1.0\"><Alias Name=\"immed\" Definition=\"Tools.ImmediateMode\"/><Alias Name=\"props\" Definition=\"View.PropertiesWindow\"/><Alias Name=\"memory1\" Definition=\"Debug.Memory1\"/><Alias Name=\"memory2\" Definition=\"Debug.Memory2\"/><Alias Name=\"memory3\" Definition=\"Debug.Memory3\"/><Alias Name=\"Lcase\" Definition=\"Edit.MakeLowercase\"/><Alias Name=\"memory4\" Definition=\"Debug.Memory4\"/><Alias Name=\"locals\" Definition=\"Debug.Locals\"/><Alias Name=\"kb\" Definition=\"Debug.ListCallStack\"/><Alias Name=\"da\" Definition=\"Debug.ListMemory /Ansi\"/><Alias Name=\"db\" Definition=\"Debug.ListMemory /Format:OneByte\"/><Alias Name=\"DelEOL\" Definition=\"Edit.DeleteToEOL\"/><Alias Name=\"dc\" Definition=\"Debug.ListMemory /Format:FourBytes /Ansi\"/><Alias Name=\"dd\" Definition=\"Debug.ListMemory /Format:FourBytes\"/><Alias Name=\"df\" Definition=\"Debug.ListMemory /Format:Float\"/><Alias Name=\"WordWrap\" Definition=\"Edit.ToggleWordWrap\"/><Alias Name=\"AddProj\" Definition=\"File.AddNewProject\"/><Alias Name=\"dq\" Definition=\"Debug.ListMemory /Format:EightBytes\"/><Alias Name=\"du\" Definition=\"Debug.ListMemory /Unicode\"/><Alias Name=\"designer\" Definition=\"View.ViewDesigner\"/><Alias Name=\"ListMembers\" Definition=\"Edit.ListMembers\"/><Alias Name=\"code\" Definition=\"View.ViewCode\"/><Alias Name=\"ParamInfo\" Definition=\"Edit.ParameterInfo\"/><Alias Name=\"DelHSp\" Definition=\"Edit.DeleteHorizontalWhiteSpace\"/><Alias Name=\"TileH\" Definition=\"Window.TileHorizontally\"/><Alias Name=\"save\" Definition=\"File.SaveSelectedItems\"/><Alias Name=\"?\" Definition=\"Debug.Print\"/><Alias Name=\"callstack\" Definition=\"Debug.CallStack\"/><Alias Name=\"open\" Definition=\"File.OpenFile\"/><Alias Name=\"TileV\" Definition=\"Window.TileVertically\"/><Alias Name=\"OutlineDefs\" Definition=\"Edit.CollapsetoDefinitions\"/><Alias Name=\"CloseAll\" Definition=\"Window.CloseAllDocuments\"/><Alias Name=\"ToggleBook\" Definition=\"Edit.ToggleBookmark\"/><Alias Name=\"InsertFile\" Definition=\"Edit.InsertFileAsText\"/><Alias Name=\"autos\" Definition=\"Debug.Autos\"/><Alias Name=\"SaveAll\" Definition=\"File.SaveAll\"/><Alias Name=\"new\" Definition=\"File.NewFile\"/><Alias Name=\"d\" Definition=\"Debug.ListMemory\"/><Alias Name=\"rtc\" Definition=\"Debug.RunToCursor\"/><Alias Name=\"navigate\" Definition=\"View.WebBrowser\"/><Alias Name=\"g\" Definition=\"Debug.Start\"/><Alias Name=\"k\" Definition=\"Debug.ListCallStack\"/><Alias Name=\"format\" Definition=\"Edit.FormatSelection\"/><Alias Name=\"n\" Definition=\"Debug.SetRadix\"/><Alias Name=\"p\" Definition=\"Debug.StepOver\"/><Alias Name=\"q\" Definition=\"Debug.StopDebugging\"/><Alias Name=\"r\" Definition=\"Debug.ListRegisters\"/><Alias Name=\"t\" Definition=\"Debug.StepInto\"/><Alias Name=\"~*kb\" Definition=\"Debug.ListCallStack /AllThreads\"/><Alias Name=\"u\" Definition=\"Debug.ListDisassembly\"/><Alias Name=\"nf\" Definition=\"File.NewFile\"/><Alias Name=\"registers\" Definition=\"Debug.Registers\"/><Alias Name=\"LineCut\" Definition=\"Edit.LineCut\"/><Alias Name=\"memory\" Definition=\"memory1\"/><Alias Name=\"|\" Definition=\"Debug.ListProcesses\"/><Alias Name=\"~\" Definition=\"Debug.ListThreads\"/><Alias Name=\"np\" Definition=\"File.NewProject\"/><Alias Name=\"DelBOL\" Definition=\"Edit.DeleteToBOL\"/><Alias Name=\"~*k\" Definition=\"Debug.ListCallStack /AllThreads\"/><Alias Name=\"NextBook\" Definition=\"Edit.NextBookmark\"/><Alias Name=\"TaskList\" Definition=\"View.TaskList\"/><Alias Name=\"Ucase\" Definition=\"Edit.MakeUppercase\"/><Alias Name=\"NewProj\" Definition=\"File.NewProject\"/><Alias Name=\"Untabify\" Definition=\"Edit.UntabifySelectedLines\"/><Alias Name=\"GotoBrace\" Definition=\"Edit.GotoBrace\"/><Alias Name=\"cls\" Definition=\"Edit.ClearAll\"/><Alias Name=\"shell\" Definition=\"Tools.Shell\"/><Alias Name=\"of\" Definition=\"File.OpenFile\"/><Alias Name=\"log\" Definition=\"Tools.LogCommandWindowOutput\"/><Alias Name=\"print\" Definition=\"File.Print\"/><Alias Name=\"op\" Definition=\"File.OpenProject\"/><Alias Name=\"eval\" Definition=\"Debug.EvaluateStatement\"/><Alias Name=\"alias\" Definition=\"Tools.Alias\"/><Alias Name=\"watch\" Definition=\"Debug.Watch\"/><Alias Name=\"cmd\" Definition=\"View.CommandWindow\"/><Alias Name=\"help\" Definition=\"Help.F1Help\"/><Alias Name=\"GotoLn\" Definition=\"Edit.GoTo\"/><Alias Name=\"disasm\" Definition=\"Debug.Disassembly\"/><Alias Name=\"redo\" Definition=\"Edit.Redo\"/><Alias Name=\"undo\" Definition=\"Edit.Undo\"/><Alias Name=\"tabify\" Definition=\"Edit.TabifySelectedLines\"/><Alias Name=\"LineDel\" Definition=\"Edit.LineDelete\"/><Alias Name=\"StopOutlining\" Definition=\"Edit.CollapsetoDefinitions\"/><Alias Name=\"pr\" Definition=\"Debug.StepOut\"/><Alias Name=\"SaveAs\" Definition=\"File.SaveSelectedItemsAs\"/><Alias Name=\"FullScreen\" Definition=\"View.FullScreen\"/><Alias Name=\"nav\" Definition=\"navigate\"/><Alias Name=\"SwapAnchor\" Definition=\"Edit.SwapAnchor\"/><Alias Name=\"exit\" Definition=\"File.Exit\"/><Alias Name=\"threads\" Definition=\"Debug.Threads\"/><Alias Name=\"PrevBook\" Definition=\"Edit.PreviousBookmark\"/><Alias Name=\"close\" Definition=\"File.Close\"/><Alias Name=\"toolbox\" Definition=\"View.Toolbox\"/><Alias Name=\"bl\" Definition=\"Debug.Breakpoints\"/><Alias Name=\"bp\" Definition=\"Debug.ToggleBreakpoint\"/><Alias Name=\"??\" Definition=\"Debug.QuickWatch\"/><Alias Name=\"StopFind\" Definition=\"Edit.FindInFiles /stop\"/><Alias Name=\"ClearBook\" Definition=\"Edit.ClearBookmarks\"/></Aliases></Category><Category name=\"Environment_CallBrowser\" Category=\"{50B05A5D-9174-48eb-851A-B1C616A0B43D}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_CallBrowser\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"CallBrowserSortAlphabetically\">true</PropertyValue><PropertyValue name=\"CallBrowserSortByAccess\">false</PropertyValue><PropertyValue name=\"CallBrowserShowFullyQualifiedNames\">true</PropertyValue></Category><Category name=\"Environment_ClassView\" Category=\"{40AF29AB-4C5B-412A-9CE8-465C4FCFE41D}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_ClassView\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ClassViewShowProjectReferences\">false</PropertyValue><PropertyValue name=\"ClassViewShowHiddenTypesAndMembers\">false</PropertyValue><PropertyValue name=\"ClassViewTypesSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ClassViewTypesSortByType\">true</PropertyValue><PropertyValue name=\"ClassViewTypesSortByAccess\">false</PropertyValue><PropertyValue name=\"ClassViewTypesGroupByType\">false</PropertyValue><PropertyValue name=\"ClassViewSearchResultsSortByBestMatch\">true</PropertyValue><PropertyValue name=\"ClassViewSearchResultsSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ClassViewSearchResultsSortByType\">false</PropertyValue><PropertyValue name=\"ClassViewSearchResultsSortByAccess\">false</PropertyValue><PropertyValue name=\"ClassViewSearchResultsGroupByType\">false</PropertyValue><PropertyValue name=\"ClassViewMembersViewPublic\">true</PropertyValue><PropertyValue name=\"ClassViewMembersViewProtected\">true</PropertyValue><PropertyValue name=\"ClassViewMembersViewPrivate\">true</PropertyValue><PropertyValue name=\"ClassViewMembersViewOther\">true</PropertyValue><PropertyValue name=\"ClassViewMembersShowInherited\">false</PropertyValue><PropertyValue name=\"ClassViewShowExtensionMembers\">false</PropertyValue><PropertyValue name=\"ClassViewShowBaseTypes\">true</PropertyValue><PropertyValue name=\"ClassViewShowDerivedTypes\">true</PropertyValue><PropertyValue name=\"ClassViewMembersSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ClassViewMembersSortByType\">true</PropertyValue><PropertyValue name=\"ClassViewMembersSortByAccess\">false</PropertyValue></Category><Category name=\"Environment_CommandBars\" Category=\"{B9D9C123-B500-4202-B887-57C829CBD08F}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_CommandBars\" PackageName=\"Visual Studio Environment Package\"><CommandBars Version=\"05072811\"><DefaultCustomizations><modify_toolbar Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,258,24\" DockRectangle=\"0,0,258,24\"/><modify_toolbar Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000000d\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,93,24\" DockRectangle=\"28,0,93,24\"/><modify_toolbar Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,213,24\" DockRectangle=\"21,0,213,24\"/><modify_toolbar Menu=\"{AA8EB8CD-7A51-11D0-92C3-00A0C9138C45}:00005dc0\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,305,24\" DockRectangle=\"33,0,305,24\"/><modify_toolbar Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000420\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"3\" FloatRectangle=\"0,0,893,24\" DockRectangle=\"0,0,893,24\"/><modify_toolbar Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,213,24\" DockRectangle=\"1,0,213,24\"/><modify_toolbar Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,130,24\" DockRectangle=\"23,0,130,24\"/><modify_toolbar Menu=\"{C7547851-4E3A-4E5B-9173-FA6E9C8BD82C}:0000271a\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,184,24\" DockRectangle=\"35,0,184,24\"/><modify_toolbar Menu=\"{CB26E292-901A-419C-B79D-49BD45C43929}:00002710\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,268,24\" DockRectangle=\"34,0,268,24\"/><modify_toolbar Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,162,24\" DockRectangle=\"27,0,162,24\"/><modify_toolbar Menu=\"{E148F049-C570-4F55-84A6-6DA870AF229E}:00001388\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,363,24\" DockRectangle=\"7,0,363,24\"/><modify_toolbar Menu=\"{E148F049-C570-4F55-84A6-6DA870AF229E}:000013d8\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,415,24\" DockRectangle=\"12,0,415,24\"/><modify_toolbar Menu=\"{E148F049-C570-4F55-84A6-6DA870AF229E}:00001838\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,190,24\" DockRectangle=\"17,0,190,24\"/><modify_toolbar Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,486,24\" DockRectangle=\"10,0,486,24\"/><modify_toolbar Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,234,24\" DockRectangle=\"11,0,234,24\"/><modify_toolbar Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,290,24\" DockRectangle=\"16,0,290,24\"/><modify_toolbar Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000000b\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,203,24\" DockRectangle=\"22,0,203,24\"/><modify_toolbar Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,412,24\" DockRectangle=\"6,0,412,24\"/><modify_toolbar Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,137,24\" DockRectangle=\"20,0,137,24\"/><modify_toolbar Menu=\"{F65C9B12-9CC9-498A-AB19-6CBE3D2C6BC6}:00000002\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,86,24\" DockRectangle=\"30,0,86,24\"/><modify_toolbar Menu=\"{5D4C0442-C0A2-4BE8-9B4D-AB1C28450942}:00001000\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,133,24\" DockRectangle=\"8,0,133,24\"/><modify_toolbar Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,212,24\" DockRectangle=\"19,0,212,24\"/><modify_toolbar Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,130,24\" DockRectangle=\"32,0,130,24\"/><modify_toolbar Menu=\"{2DC8D6BB-916C-4B80-9C52-FD8FC371ACC2}:00000100\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,188,24\" DockRectangle=\"26,0,188,24\"/><modify_toolbar Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,466,24\" DockRectangle=\"13,0,466,24\"/><modify_toolbar Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,276,24\" DockRectangle=\"25,0,276,24\"/><modify_toolbar Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,249,24\" DockRectangle=\"3,0,249,24\"/><modify_toolbar Menu=\"{D709F4D7-0165-472B-B966-105912D13DB8}:00000104\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,130,24\" DockRectangle=\"31,0,130,24\"/><modify_toolbar Menu=\"{5D8847D1-9A8A-431E-907A-62D9963F07FD}:00000104\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,133,24\" DockRectangle=\"37,0,133,24\"/><modify_toolbar Menu=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000050c\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,283,24\" DockRectangle=\"24,0,283,24\"/><modify_toolbar Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,458,24\" DockRectangle=\"2,0,458,24\"/><modify_toolbar Menu=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00003010\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,432,24\" DockRectangle=\"9,0,432,24\"/><modify_toolbar Menu=\"{C9522C54-50B0-48C9-A9B8-339140E0FA20}:00001801\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,268,24\" DockRectangle=\"14,0,268,24\"/><modify_toolbar Menu=\"{6E9EABA0-FDEE-4A1C-8758-E1DCA032A5D3}:00001802\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,297,24\" DockRectangle=\"15,0,297,24\"/><modify_toolbar Menu=\"{068E2583-0872-403B-AF4C-6C2A8F2D8C3E}:00001201\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,71,24\" DockRectangle=\"5,0,71,24\"/><modify_toolbar Menu=\"{068E2583-0872-403B-AF4C-6C2A8F2D8C3E}:00003203\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,203,24\" DockRectangle=\"18,0,203,24\"/><modify_toolbar Menu=\"{481A3758-A6D0-43E0-B1B8-4428BE962F8E}:00007202\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,431,24\" DockRectangle=\"4,0,431,24\"/><modify_toolbar Menu=\"{16BD08C3-403D-4B06-B57B-57B60E572241}:00001001\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,133,24\" DockRectangle=\"4,0,133,24\"/><modify_toolbar Menu=\"{9B3258D9-F00A-4519-9253-7909878E8882}:00001010\" Visibility=\"hide\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,346,24\" DockRectangle=\"29,0,346,24\"/><add Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000003ff\" CmdPri=\"02800001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000723\" GroupPri=\"08500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\"/><add Cmd=\"{3A3E1789-3E35-47B0-8567-D2FB407CC63D}:00003000\" CmdPri=\"01800001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000131\" GroupPri=\"0c000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\"/><add Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000eb\" CmdPri=\"04804001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\"/><add Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008d5\" CmdPri=\"0540a001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\"/><add Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008d4\" CmdPri=\"06008001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\"/><add Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ec\" CmdPri=\"06010001\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\"/><add Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\"/><add Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000005\" CmdPri=\"08010001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\"/><add Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000014e\" CmdPri=\"00108001\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001403\" GroupPri=\"04000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\"/><add Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206d\" CmdPri=\"00080001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\"/><add Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206e\" CmdPri=\"000c0001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\"/><add Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206f\" CmdPri=\"000e0001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\"/><remove Cmd=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000500\" CmdPri=\"00210000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000171\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000010\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000172\" GroupPri=\"03000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000000f\" CmdPri=\"02000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000172\" GroupPri=\"03000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000001a\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000172\" GroupPri=\"03000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000115\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000177\" GroupPri=\"0b000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000151\" CmdPri=\"02000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000177\" GroupPri=\"0b000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ea\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000eb\" CmdPri=\"02000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{23D49123-60AC-4D7E-939A-E01A4E176BEE}:00000001\" CmdPri=\"02000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ee\" CmdPri=\"02500000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000002a\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{E234E66E-BA64-4D71-B304-16F0A4C793F5}:00004010\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008c5\" CmdPri=\"04000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5DD0BB59-7076-4C59-88D3-DE36931F63F0}:00000bb8\" CmdPri=\"50000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000502\" CmdPri=\"ff000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000178\" GroupPri=\"0d000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000004d\" CmdPri=\"07040000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000012d\" GroupPri=\"a0000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000081\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000004e\" CmdPri=\"07050000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000012d\" GroupPri=\"a0000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000081\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000238\" CmdPri=\"07060000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000012d\" GroupPri=\"a0000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000081\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000239\" CmdPri=\"07070000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000012d\" GroupPri=\"a0000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000081\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000105\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000133\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000c7\" CmdPri=\"04000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000133\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008d4\" CmdPri=\"05000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000721\" GroupPri=\"07500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008d5\" CmdPri=\"05000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000721\" GroupPri=\"07500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ec\" CmdPri=\"04000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000723\" GroupPri=\"08500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000eb\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000131\" GroupPri=\"0c000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000082\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000848\" CmdPri=\"01000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000035a\" GroupPri=\"00500000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\" IsPartialRemoval=\"false\"/><remove Cmd=\"{3A3E1789-3E35-47B0-8567-D2FB407CC63D}:00003000\" CmdPri=\"05000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\" IsPartialRemoval=\"false\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000003ff\" CmdPri=\"06000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:0000019f\" GroupPri=\"01000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000300\" IsPartialRemoval=\"false\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006c\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"01000000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000068\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"01000000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006b\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"01000000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000046\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000551\" GroupPri=\"01010000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000045\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000551\" GroupPri=\"01010000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000239\" CmdPri=\"01260000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"01030000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000238\" CmdPri=\"012b0000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"01030000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000098\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"01030000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000097\" CmdPri=\"01400000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"01030000\" Menu=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000127\" CmdPri=\"01000000\" Group=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:0000011b\" GroupPri=\"01000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{D709F4D7-0165-472B-B966-105912D13DB8}:00002039\" CmdPri=\"00000000\" Group=\"{D709F4D7-0165-472B-B966-105912D13DB8}:00001009\" GroupPri=\"04000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5D8847D1-9A8A-431E-907A-62D9963F07FD}:00002039\" CmdPri=\"00000000\" Group=\"{5D8847D1-9A8A-431E-907A-62D9963F07FD}:00001009\" GroupPri=\"04000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000013a\" CmdPri=\"03000000\" Group=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000025\" GroupPri=\"05000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000409\" CmdPri=\"01000000\" Group=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:0000011a\" GroupPri=\"07000000\" Menu=\"{C9DD4A58-47FB-11D2-83E7-00C04F9902C1}:00000421\" IsPartialRemoval=\"true\"/><remove Cmd=\"{E8B06F44-6D01-11D2-AA7D-00C04F990343}:000000ce\" CmdPri=\"00500000\" Group=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000064\" GroupPri=\"00100000\" Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{4A79114A-19E4-11D3-B86B-00C04F79F802}:00000106\" CmdPri=\"00100000\" Group=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000068\" GroupPri=\"00400000\" Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{4A79114A-19E4-11D3-B86B-00C04F79F802}:00000107\" CmdPri=\"00300000\" Group=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000068\" GroupPri=\"00400000\" Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000300d\" CmdPri=\"01000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002316\" GroupPri=\"01000000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000300f\" CmdPri=\"00f10000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000233b\" GroupPri=\"01020000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{F4394F71-4DFC-4268-84C3-7D9150C5C216}:00003007\" CmdPri=\"02000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000233b\" GroupPri=\"01020000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003010\" CmdPri=\"00f00000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000233c\" GroupPri=\"01030000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{F4394F71-4DFC-4268-84C3-7D9150C5C216}:00003008\" CmdPri=\"02000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:0000233c\" GroupPri=\"01030000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003000\" CmdPri=\"01000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003002\" CmdPri=\"01010000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003001\" CmdPri=\"01020000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003100\" CmdPri=\"01030000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00003003\" CmdPri=\"01100000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{F4394F71-4DFC-4268-84C3-7D9150C5C216}:00003000\" CmdPri=\"02000000\" Group=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00002000\" GroupPri=\"01040000\" Menu=\"{B85579AA-8BE0-4C4F-A850-90902B317571}:00004000\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000012\" CmdPri=\"03000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001070\" GroupPri=\"01000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000011f\" CmdPri=\"0a000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001074\" GroupPri=\"05000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000120\" CmdPri=\"0b000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001074\" GroupPri=\"05000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000014d\" CmdPri=\"0e000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:0000107d\" GroupPri=\"07000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000046\" CmdPri=\"03000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001078\" GroupPri=\"01000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000045\" CmdPri=\"04000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001078\" GroupPri=\"01000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000014b\" CmdPri=\"0c000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:0000107c\" GroupPri=\"05000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000004\" CmdPri=\"02000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001011\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000004\" CmdPri=\"04000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001012\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000000b\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" CmdPri=\"05000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001106\" GroupPri=\"01000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000033\" CmdPri=\"03000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001107\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ad\" CmdPri=\"09000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001118\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000006\" CmdPri=\"03000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001109\" GroupPri=\"07000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000008\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110d\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000009\" CmdPri=\"03000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110d\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000003\" CmdPri=\"03000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110e\" GroupPri=\"0d000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000065\" CmdPri=\"05000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000066\" CmdPri=\"06000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:000002a5\" CmdPri=\"07000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:0000006c\" CmdPri=\"08000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000ad\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001108\" GroupPri=\"01000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000065\" CmdPri=\"05000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:00000066\" CmdPri=\"06000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:000002a5\" CmdPri=\"07000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{748813A7-657C-499D-81A0-2FFDF790711A}:0000006c\" CmdPri=\"08000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000014e\" CmdPri=\"00100000\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001402\" GroupPri=\"03000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:000053fc\" CmdPri=\"02000000\" Group=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00002f2f\" GroupPri=\"04000000\" Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005404\" CmdPri=\"06000000\" Group=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00002f2f\" GroupPri=\"04000000\" Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:0000540c\" CmdPri=\"07000000\" Group=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00002f2f\" GroupPri=\"04000000\" Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" IsPartialRemoval=\"true\"/><remove Cmd=\"{34E61A32-1C10-4052-ABE7-264C46302CE4}:00000002\" CmdPri=\"04000000\" Group=\"{4FE997E0-5BDC-41CD-8E02-A212DAD97CDA}:00000700\" GroupPri=\"01000000\" Menu=\"{2DC8D6BB-916C-4B80-9C52-FD8FC371ACC2}:00000100\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000017\" CmdPri=\"02000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055d\" GroupPri=\"06000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000016\" CmdPri=\"03000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055d\" GroupPri=\"06000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000015\" CmdPri=\"04000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055d\" GroupPri=\"06000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000030\" CmdPri=\"02000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000002f\" CmdPri=\"03000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000002e\" CmdPri=\"04000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000000c\" CmdPri=\"00000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055f\" GroupPri=\"08000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000000d\" CmdPri=\"00000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055f\" GroupPri=\"08000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{CB3675B8-701E-4F56-9167-2714E167FF3F}:00003008\" CmdPri=\"01000000\" Group=\"{CB3675B8-701E-4F56-9167-2714E167FF3F}:0000200b\" GroupPri=\"0f000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000029\" CmdPri=\"00000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:00000568\" GroupPri=\"10000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006c\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006c\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000068\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000068\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000074\" CmdPri=\"01200000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006b\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000006b\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000008ff\" CmdPri=\"01400000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000550\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB87333B-16C8-400E-BC8F-F6B890410582}:00000001\" CmdPri=\"00100000\" Group=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00001002\" GroupPri=\"00200000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000046\" CmdPri=\"01000000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000551\" GroupPri=\"00300000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000045\" CmdPri=\"01100000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000551\" GroupPri=\"00300000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000239\" CmdPri=\"01260000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"00500000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000238\" CmdPri=\"012b0000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"00500000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000098\" CmdPri=\"01300000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"00500000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000097\" CmdPri=\"01400000\" Group=\"{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553\" GroupPri=\"00500000\" Menu=\"{061317B2-F992-435E-A23D-9EAD4B972ED5}:00000102\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002907\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002908\" CmdPri=\"00200000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002909\" CmdPri=\"00300000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002071\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001088\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206d\" CmdPri=\"00200000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001089\" GroupPri=\"00600000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206e\" CmdPri=\"00300000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001089\" GroupPri=\"00600000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206f\" CmdPri=\"00400000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001089\" GroupPri=\"00600000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002120\" CmdPri=\"02000000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001077\" GroupPri=\"02000000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" IsPartialRemoval=\"true\"/><remove Cmd=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:00003113\" CmdPri=\"01000000\" Group=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000032a\" GroupPri=\"03000000\" Menu=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000050c\" IsPartialRemoval=\"true\"/><remove Cmd=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:00003114\" CmdPri=\"02000000\" Group=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000032a\" GroupPri=\"03000000\" Menu=\"{9AEB9524-82C6-40B9-9285-8D85D3DBD4C4}:0000050c\" IsPartialRemoval=\"true\"/><remove Cmd=\"{B11771F1-F6CB-467E-8B71-428B5CEDCA5F}:00000101\" CmdPri=\"01000000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020003\" GroupPri=\"01300000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" IsPartialRemoval=\"true\"/><remove Cmd=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00002001\" CmdPri=\"01100000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020003\" GroupPri=\"01300000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" IsPartialRemoval=\"true\"/><remove Cmd=\"{14BCA3AF-5E27-4307-8492-84AF8647EA7C}:00002001\" CmdPri=\"01100000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020003\" GroupPri=\"01300000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" IsPartialRemoval=\"true\"/><remove Cmd=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00002001\" CmdPri=\"02030000\" Group=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:0000102b\" GroupPri=\"06000000\" Menu=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00003010\" IsPartialRemoval=\"true\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000002ac\" CmdPri=\"03000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000174\" GroupPri=\"09000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" Width=\"65\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000007c6\" CmdPri=\"04000000\" Group=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000174\" GroupPri=\"09000000\" Menu=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001\" Width=\"110\"/><modify Cmd=\"{E8B06F44-6D01-11D2-AA7D-00C04F990343}:000000c9\" CmdPri=\"00100000\" Group=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000064\" GroupPri=\"00100000\" Menu=\"{E8B06F42-6D01-11D2-AA7D-00C04F990343}:00000001\" Icon=\"{DDFE7DBB-66E4-4954-8A0F-36CFE15EB12E}:00000002\" Style=\"0\"/><modify Cmd=\"{CB26E292-901A-419C-B79D-49BD45C43929}:00000078\" CmdPri=\"01000000\" Group=\"{CB26E292-901A-419C-B79D-49BD45C43929}:00002711\" GroupPri=\"00000000\" Menu=\"{CB26E292-901A-419C-B79D-49BD45C43929}:00002710\" Width=\"115\"/><modify Cmd=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001132\" CmdPri=\"00000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001068\" GroupPri=\"00000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Width=\"105\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:000000f5\" CmdPri=\"02000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001070\" GroupPri=\"01000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" BeginGroup=\"false\" Width=\"70\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000034\" CmdPri=\"00000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001071\" GroupPri=\"02000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:0000000a\" BeginGroup=\"false\"/><modify Cmd=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001085\" CmdPri=\"00000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001073\" GroupPri=\"04000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000118\" CmdPri=\"09000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001076\" GroupPri=\"06000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Icon=\"{8328592C-227C-11D3-B870-00C04F79F802}:00000017\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000118\" CmdPri=\"09000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001076\" GroupPri=\"06000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Icon=\"{8328592C-227C-11D3-B870-00C04F79F802}:00000017\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000118\" CmdPri=\"09000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001076\" GroupPri=\"06000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00000010\" Icon=\"{8328592C-227C-11D3-B870-00C04F79F802}:00000017\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000088\" CmdPri=\"05000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001079\" GroupPri=\"02000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000056\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000088\" CmdPri=\"05000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001079\" GroupPri=\"02000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000056\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000088\" CmdPri=\"05000000\" Group=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001079\" GroupPri=\"02000000\" Menu=\"{D7E8C5E1-BDB8-11D0-9C88-0000F8040A53}:00001077\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000056\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:000000c9\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000100e\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" Icon=\"{634F8946-FFF0-491F-AF41-B599FC20D561}:00000009\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000079\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001010\" GroupPri=\"09000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" Icon=\"{634F8946-FFF0-491F-AF41-B599FC20D561}:0000000e\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000027\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001011\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000001\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:0000000e\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000079\" CmdPri=\"02000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001012\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000000b\" Icon=\"{634F8946-FFF0-491F-AF41-B599FC20D561}:0000000e\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:0000000c\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001107\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Icon=\"{EB28B762-7E54-492B-9336-4853994FE349}:0000000b\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:0000000c\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001107\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Icon=\"{EB28B762-7E54-492B-9336-4853994FE349}:0000000b\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000012\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110b\" GroupPri=\"09000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000012\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110b\" GroupPri=\"09000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000007\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110c\" GroupPri=\"0b000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:0000000a\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000032\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110f\" GroupPri=\"0f000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" BeginGroup=\"false\" Width=\"55\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:000002a4\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"10000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000101\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000011\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000006d\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110a\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000003\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000006d\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:0000110a\" GroupPri=\"03000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000003\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:000002a4\" CmdPri=\"01000000\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000011\" BeginGroup=\"false\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000004\" CmdPri=\"08008001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{732ABE75-CD80-11D0-A2DB-00AA00A3EFFF}:00000005\" CmdPri=\"08010001\" Group=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00001110\" GroupPri=\"05000000\" Menu=\"{732ABE74-CD80-11D0-A2DB-00AA00A3EFFF}:00000107\" Icon=\"{2B671D3D-AB51-434A-8D38-CBF1728530BB}:00000009\" BeginGroup=\"false\"/><modify Cmd=\"{A764E897-518D-11D2-9A89-00C04F79EFC3}:00002101\" CmdPri=\"00200000\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001401\" GroupPri=\"01000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" Icon=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000005\" Style=\"0\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00002c13\" CmdPri=\"00100000\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001403\" GroupPri=\"04000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" BeginGroup=\"false\"/><modify Cmd=\"{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00002c13\" CmdPri=\"00100000\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001403\" GroupPri=\"04000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000014e\" CmdPri=\"00108001\" Group=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00001403\" GroupPri=\"04000000\" Menu=\"{A764E896-518D-11D2-9A89-00C04F79EFC3}:00000103\" Icon=\"{D309F791-903F-11D0-9EFC-00A0C911004F}:00000003\" BeginGroup=\"false\"/><modify Cmd=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005212\" CmdPri=\"01000000\" Group=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00002f2f\" GroupPri=\"04000000\" Menu=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:00005dc0\" Icon=\"{5BF14E63-E267-4787-B20B-B814FD043B38}:0000000d\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000006\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055a\" GroupPri=\"04000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000008\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}:00000031\" CmdPri=\"01000000\" Group=\"{234A7FC1-CFE9-4335-9E82-061F86E402C1}:0000055e\" GroupPri=\"07000000\" Menu=\"{74D21312-2AEE-11D1-8BFB-00A0C90F26F7}:00000601\" Icon=\"{9CD93C42-CEEF-45AB-B1B5-6040880C9543}:00000083\" BeginGroup=\"false\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206d\" CmdPri=\"00080001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000005\" BeginGroup=\"false\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206e\" CmdPri=\"000c0001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000006\" BeginGroup=\"false\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:0000206f\" CmdPri=\"000e0001\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001094\" GroupPri=\"00100000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" BeginGroup=\"false\" Width=\"55\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002889\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:0000107a\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002889\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:0000107a\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002889\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:0000107a\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002889\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:0000107a\" GroupPri=\"00200000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000008\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002932\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001073\" GroupPri=\"00300000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000013\" BeginGroup=\"true\"/><modify Cmd=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00002932\" CmdPri=\"00100000\" Group=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00001073\" GroupPri=\"00300000\" Menu=\"{F5EAC013-F209-453B-A2F3-CDF43821C24E}:00000302\" Icon=\"{FB41A027-57C5-4F83-9508-C326DCE6D943}:00000013\" BeginGroup=\"true\"/><modify Cmd=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00000012\" CmdPri=\"00400000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020001\" GroupPri=\"01000000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" Width=\"55\"/><modify Cmd=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00000014\" CmdPri=\"00300000\" Group=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00020002\" GroupPri=\"01100000\" Menu=\"{4BCF92C9-7FEA-4913-AF26-F93582BA9C7A}:00010002\" Icon=\"{E5FD8797-928D-4720-99C6-D9241615013A}:00000001\" BeginGroup=\"false\"/><modify Cmd=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:0000200d\" CmdPri=\"01000000\" Group=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00001002\" GroupPri=\"00500000\" Menu=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00003010\" Width=\"55\"/><modify Cmd=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00002300\" CmdPri=\"01000000\" Group=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00001009\" GroupPri=\"00900000\" Menu=\"{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00003010\" Icon=\"{AD7818C6-4420-4479-B0CB-CE68EFF9C2C8}:00000006\" BeginGroup=\"false\"/></DefaultCustomizations><UserCustomizations><modify_toolbar Menu=\"{15A7A3F3-845F-4D67-B540-5B232293D9A3}:00000101\" Visibility=\"auto\" FullScreen=\"hide\" Dock=\"top\" Row=\"1\" FloatRectangle=\"0,0,221,26\" DockRectangle=\"6,0,221,26\"/></UserCustomizations></CommandBars><PropertyValue name=\"ShowLargeButtons\">false</PropertyValue><PropertyValue name=\"ShowScreenTips\">true</PropertyValue><PropertyValue name=\"ShowScreenTipShortcutKeys\">false</PropertyValue></Category><Category name=\"Environment_DefaultEditors\" Category=\"{68161AEE-BCA8-4214-B2E4-7875263E49C5}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_DefaultEditors\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"NumberOfMappings\">0</PropertyValue><PropertyValue name=\"NumberOfDefaultEditors\">0</PropertyValue></Category><Category name=\"Environment_Expansions\" Category=\"{0B9A10B2-C0D0-4a6a-8353-115E9CACF34A}\" Package=\"{F5E7E720-1401-11d1-883B-0000F87579D2}\" RegisteredName=\"Environment_Expansions\" PackageName=\"Text Management Package\"><Expansions Default=\"true\" Version=\"1.0\"/></Category><Category name=\"Environment_ExtensionManager\" Category=\"{539391d7-9414-4715-b033-8669db0abee1}\" Package=\"{e7576c05-1874-450c-9e98-cf3a0897a069}\" RegisteredName=\"Environment_ExtensionManager\" PackageName=\"ExtensionManagerPackage\"><PropertyValue name=\"AutomaticallyCheckForUpdates2\">True</PropertyValue><PropertyValue name=\"CustomRepositories\">&lt;ExtensionRepositoryConfigList Capacity=\"0\" xmlns=\"clr-namespace:Microsoft.VisualStudio.ExtensionManager;assembly=Microsoft.VisualStudio.ExtensionEngine\" /&gt;</PropertyValue><PropertyValue name=\"EnableAdminExtensions\">True</PropertyValue></Category><Category name=\"Environment_ExternalTools\" Category=\"{E8FAE9E8-FBA2-4474-B134-AB0FFCFB291D}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_ExternalTools\" PackageName=\"Visual Studio Environment Package\"><ExternalTools><UserCreatedTool><Arguments></Arguments><CloseOnExit>true</CloseOnExit><Command>c:\\program files (x86)\\windows kits\\10\\bin\\NETFX 4.5.1 Tools\\ildasm.exe</Command><Index>3</Index><InitialDirectory>$(targetdir)</InitialDirectory><IsGUIapp>false</IsGUIapp><NameID>0</NameID><Package>{00000000-0000-0000-0000-000000000000}</Package><PromptForArguments>false</PromptForArguments><SaveAllDocs>true</SaveAllDocs><Title>ILDasm</Title><Unicode>false</Unicode><UseOutputWindow>false</UseOutputWindow><UseTaskList>false</UseTaskList></UserCreatedTool><UserCreatedTool><Arguments>/K \"vsdevcmd.bat -no_logo\"</Arguments><CloseOnExit>true</CloseOnExit><Command>%systemroot%\\system32\\cmd.exe</Command><Index>4</Index><InitialDirectory>%vsspv_vs_install_directory%\\Common7\\Tools</InitialDirectory><IsGUIapp>false</IsGUIapp><NameID>10053</NameID><Package>{F1C25864-3097-11D2-A5C5-00C04F7968B4}</Package><PromptForArguments>false</PromptForArguments><SaveAllDocs>true</SaveAllDocs><Title>Visual Studio &amp;Command Prompt</Title><Unicode>false</Unicode><UseOutputWindow>false</UseOutputWindow><UseTaskList>false</UseTaskList></UserCreatedTool></ExternalTools></Category><Category name=\"Environment_FindSymbol\" Category=\"{C93260BC-0C07-484a-8188-6F4763BD7FD4}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_FindSymbol\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"FindOptionsIsExpanded\">false</PropertyValue><PropertyValue name=\"LookinReferencesIsChecked\">true</PropertyValue><PropertyValue name=\"MatchCaseIsChecked\">false</PropertyValue><PropertyValue name=\"Type\">2</PropertyValue><PropertyValue name=\"SelectedScope\">{B1BA9461-FC54-45B3-A484-CB6DD0B95C94}</PropertyValue><PropertyValue name=\"SelectedScopeSubScope\">0</PropertyValue></Category><Category name=\"Environment_FontsAndColors\" Category=\"{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_FontsAndColors\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"Version\">2</PropertyValue><FontsAndColors Version=\"2.0\"><Theme Id=\"{1DED0138-47CE-435E-84EF-9EC1F439B749}\"/><Categories><Category GUID=\"{75A05685-00A8-4DED-BAE5-E7A50BFA929A}\" FontIsDefault=\"Yes\"><Items><Item Name=\"VA Class\" Foreground=\"0x00008080\" Background=\"0x001E1E1E\" BoldFont=\"No\"/><Item Name=\"VA Find Result\" Foreground=\"0x02000000\" Background=\"0x00B7FFFF\" BoldFont=\"No\"/><Item Name=\"VA Find Reference (Modified)\" Foreground=\"0x02000000\" Background=\"0x00004080\" BoldFont=\"No\"/><Item Name=\"VA Find Reference\" Foreground=\"0x02000000\" Background=\"0x00808000\" BoldFont=\"No\"/><Item Name=\"VA Macro / Enum\" Foreground=\"0x0000C0FF\" Background=\"0x001E1E1E\" BoldFont=\"No\"/><Item Name=\"VA Variable\" Foreground=\"0x00C0C0C0\" Background=\"0x001E1E1E\" BoldFont=\"No\"/><Item Name=\"VA Column Indicator\" Foreground=\"0x00000000\" Background=\"0x00252925\" BoldFont=\"No\"/><Item Name=\"VA Current Line\" Foreground=\"0x00C0C0C0\" Background=\"0x00EBEBEB\" BoldFont=\"No\"/><Item Name=\"VA Brace Error\" Foreground=\"0x000000FF\" Background=\"0x02000000\" BoldFont=\"Yes\"/></Items></Category></Categories></FontsAndColors></Category><Category name=\"Environment_KeyBindings\" Category=\"{F09035F1-80D2-4312-8EC4-4D354A4BCB4C}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_KeyBindings\" PackageName=\"Visual Studio Environment Package\"><Version>15.0.0.0</Version><KeyboardShortcuts><ScopeDefinitions><Scope Name=\"Team Explorer\" ID=\"{7AA20502-9463-47B7-BF43-341BAF51157C}\"/><Scope Name=\"VC Dialog Editor\" ID=\"{543E0C02-8C85-4E43-933A-5EF320E3431F}\"/><Scope Name=\"Find All References Tool Window\" ID=\"{1FA1FD06-3592-4D1D-AC75-0B953320140C}\"/><Scope Name=\"Live Property Explorer\" ID=\"{31FC2115-5126-4A87-B2F7-77EAAB65048B}\"/><Scope Name=\"XML (Text) Editor\" ID=\"{FA3CD31E-987B-443A-9B81-186104E8DAC1}\"/><Scope Name=\"Text Editor\" ID=\"{8B382828-6202-11D1-8870-0000F87579D2}\"/><Scope Name=\"Work Item Results View\" ID=\"{7026002D-01F6-44E7-95CF-A896C00DA3F8}\"/><Scope Name=\"ADO.NET Entity Data Model Designer\" ID=\"{C99AEA30-8E36-4515-B76F-496F5A48A6AA}\"/><Scope Name=\"Solution Explorer\" ID=\"{3AE79031-E1BC-11D0-8F78-00A0C9110057}\"/><Scope Name=\"Query Designer\" ID=\"{B2C40B32-3A37-4CA9-97B9-FA44248B69FF}\"/><Scope Name=\"CSharp Editor with Encoding\" ID=\"{08467B34-B90F-4D91-BDCA-EB8C8CF3033A}\"/><Scope Name=\"WebBrowser\" ID=\"{E8B06F41-6D01-11D2-AA7D-00C04F990343}\"/><Scope Name=\"CSS Editor\" ID=\"{A5401142-F49D-43DB-90B1-F57BA349E55C}\"/><Scope Name=\"Graphics Designers\" ID=\"{58961B49-13E0-48C0-9258-13CBC4D40279}\"/><Scope Name=\"DataSet Editor\" ID=\"{B334A759-F450-40A5-BE2A-65937BCD5415}\"/><Scope Name=\"XAML Designer\" ID=\"{E9B8485C-1217-4277-9ED6-C825A5AC1968}\"/><Scope Name=\"View Designer\" ID=\"{B968E165-98E0-41F0-8FBE-A8ED1D246A90}\"/><Scope Name=\"XAML Editor\" ID=\"{A4F9FF65-A78C-4650-866D-5069CC4127CF}\"/><Scope Name=\"Microsoft Visual Basic Editor\" ID=\"{2C015C70-C72C-11D0-88C3-00A0C9110049}\"/><Scope Name=\"Global\" ID=\"{5EFC7975-14BC-11CF-9B2B-00AA00573819}\"/><Scope Name=\"HTML Editor\" ID=\"{40D31677-CBC0-4297-A9EF-89D907823A98}\"/><Scope Name=\"Live Visual Tree\" ID=\"{A2EAF38F-A0AD-4503-91F8-5F004A69A040}\"/><Scope Name=\"Work Item Query View\" ID=\"{B6303490-B828-410C-9216-AE727D0E282D}\"/><Scope Name=\"Team Foundation Build Detail Editor\" ID=\"{86306A97-84F2-4F5A-889B-1318501AEB5F}\"/><Scope Name=\"Database Designer\" ID=\"{CFF78A9B-78A3-45A3-9142-0267AFC261FA}\"/><Scope Name=\"Work Item Editor\" ID=\"{40A91D9D-8076-4D28-87C5-5AF9F0ACFE0F}\"/><Scope Name=\"JSON Editor\" ID=\"{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}\"/><Scope Name=\"CSharp Editor\" ID=\"{A6C744A8-0E4A-4FC6-886A-064283054674}\"/><Scope Name=\"VC String Editor\" ID=\"{58442DA9-10DA-4AA9-A2AF-96E4D481379B}\"/><Scope Name=\"Interactive Window\" ID=\"{2D0A56AA-9527-4B78-B6E6-EBE6E05DA749}\"/><Scope Name=\"Merge Editor Window\" ID=\"{9A9A8AAA-ACD2-4DB6-BD81-8D64176C52B6}\"/><Scope Name=\"Microsoft Visual Basic Code Page Editor\" ID=\"{6C33E1AA-1401-4536-AB67-0E21E6E569DA}\"/><Scope Name=\"Settings Designer\" ID=\"{515231AD-C9DC-4AA3-808F-E1B65E72081C}\"/><Scope Name=\"Windows Forms Designer\" ID=\"{BA09E2AF-9DF2-4068-B2F0-4C7E5CC19E2F}\"/><Scope Name=\"VC Accelerator Editor\" ID=\"{EB56D0B5-BEE7-4D0C-8BE6-88A8ED256695}\"/><Scope Name=\"Managed Resources Editor\" ID=\"{FEA4DCC9-3645-44CD-92E7-84B55A16465C}\"/><Scope Name=\"Difference Viewer\" ID=\"{79D52DDF-52BC-43F1-9663-B3E85CDCA912}\"/><Scope Name=\"Table Designer\" ID=\"{4194FEE5-6777-419F-A5FC-47A536DF1BDB}\"/><Scope Name=\"HTML Editor Design View\" ID=\"{CB3FCFEA-03DF-11D1-81D2-00A0C91BBEE3}\"/><Scope Name=\"HTML Editor Source View\" ID=\"{CB3FCFEB-03DF-11D1-81D2-00A0C91BBEE3}\"/><Scope Name=\"VC Image Editor\" ID=\"{C0BA70ED-069E-412B-9C06-7442E28A11B9}\"/><Scope Name=\"Test Explorer\" ID=\"{E1B7D1F8-9B3C-49B1-8F4F-BFC63A88835D}\"/><Scope Name=\"XML Schema Designer\" ID=\"{DEE6CEF9-3BCA-449A-82A6-FC757D6956FB}\"/></ScopeDefinitions><DefaultShortcuts/><ShortcutsScheme>Visual C++ 6</ShortcutsScheme><UserShortcuts><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Editor\">Shift+Alt+L</RemoveShortcut><RemoveShortcut Command=\"Format.ButtonBottom\" Scope=\"VC Dialog Editor\">Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"Format.ButtonRight\" Scope=\"VC Dialog Editor\">Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"Format.TestDialog\" Scope=\"VC Dialog Editor\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWebAccess\" Scope=\"Global\">Ctrl+0, A</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToBuilds\" Scope=\"Global\">Ctrl+0, B</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToConnect\" Scope=\"Global\">Ctrl+0, C</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWebAccess\" Scope=\"Global\">Ctrl+0, Ctrl+A</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToBuilds\" Scope=\"Global\">Ctrl+0, Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToConnect\" Scope=\"Global\">Ctrl+0, Ctrl+C</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToDocuments\" Scope=\"Global\">Ctrl+0, Ctrl+D</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitActiveRepositories\" Scope=\"Global\">Ctrl+0, Ctrl+E</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitChanges\" Scope=\"Global\">Ctrl+0, Ctrl+G</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToHome\" Scope=\"Global\">Ctrl+0, Ctrl+H</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToMyWork\" Scope=\"Global\">Ctrl+0, Ctrl+M</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToPendingChanges\" Scope=\"Global\">Ctrl+0, Ctrl+P</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToReports\" Scope=\"Global\">Ctrl+0, Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToSettings\" Scope=\"Global\">Ctrl+0, Ctrl+S</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWorkItems\" Scope=\"Global\">Ctrl+0, Ctrl+W</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitSynchronization\" Scope=\"Global\">Ctrl+0, Ctrl+Y</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToDocuments\" Scope=\"Global\">Ctrl+0, D</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitActiveRepositories\" Scope=\"Global\">Ctrl+0, E</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitChanges\" Scope=\"Global\">Ctrl+0, G</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToHome\" Scope=\"Global\">Ctrl+0, H</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToMyWork\" Scope=\"Global\">Ctrl+0, M</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToPendingChanges\" Scope=\"Global\">Ctrl+0, P</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToReports\" Scope=\"Global\">Ctrl+0, R</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToSettings\" Scope=\"Global\">Ctrl+0, S</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWorkItems\" Scope=\"Global\">Ctrl+0, W</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitSynchronization\" Scope=\"Global\">Ctrl+0, Y</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToFile\" Scope=\"Global\">Ctrl+1, Ctrl+F</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToMember\" Scope=\"Global\">Ctrl+1, Ctrl+M</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToSymbol\" Scope=\"Global\">Ctrl+1, Ctrl+S</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToType\" Scope=\"Global\">Ctrl+1, Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToFile\" Scope=\"Global\">Ctrl+1, F</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToMember\" Scope=\"Global\">Ctrl+1, M</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToSymbol\" Scope=\"Global\">Ctrl+1, S</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToType\" Scope=\"Global\">Ctrl+1, T</RemoveShortcut><RemoveShortcut Command=\"Debug.Breakpoints\" Scope=\"Global\">Ctrl+Alt+B</RemoveShortcut><RemoveShortcut Command=\"Debug.Threads\" Scope=\"Global\">Ctrl+Alt+H</RemoveShortcut><RemoveShortcut Command=\"View.SolutionExplorer\" Scope=\"Global\">Ctrl+Alt+L</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory1\" Scope=\"Global\">Ctrl+Alt+M, 1</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory2\" Scope=\"Global\">Ctrl+Alt+M, 2</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory3\" Scope=\"Global\">Ctrl+Alt+M, 3</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory4\" Scope=\"Global\">Ctrl+Alt+M, 4</RemoveShortcut><RemoveShortcut Command=\"Debug.AttachtoProcess\" Scope=\"Global\">Ctrl+Alt+P</RemoveShortcut><RemoveShortcut Command=\"View.WebBrowser\" Scope=\"Global\">Ctrl+Alt+R</RemoveShortcut><RemoveShortcut Command=\"View.ServerExplorer\" Scope=\"Global\">Ctrl+Alt+S</RemoveShortcut><RemoveShortcut Command=\"Debug.Modules\" Scope=\"Global\">Ctrl+Alt+U</RemoveShortcut><RemoveShortcut Command=\"Debug.FunctionBreakpoint\" Scope=\"Global\">Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"File.NewFile\" Scope=\"Global\">Ctrl+N</RemoveShortcut><RemoveShortcut Command=\"Window.ActivateQuickLaunch\" Scope=\"Global\">Ctrl+Q</RemoveShortcut><RemoveShortcut Command=\"Refactor.EncapsulateField\" Scope=\"Global\">Ctrl+R, Ctrl+E</RemoveShortcut><RemoveShortcut Command=\"Project.AddNewItem\" Scope=\"Global\">Ctrl+Shift+A</RemoveShortcut><RemoveShortcut Command=\"View.ResourceView\" Scope=\"Global\">Ctrl+Shift+E</RemoveShortcut><RemoveShortcut Command=\"Edit.OpenFile\" Scope=\"Global\">Ctrl+Shift+G</RemoveShortcut><RemoveShortcut Command=\"File.NewProject\" Scope=\"Global\">Ctrl+Shift+N</RemoveShortcut><RemoveShortcut Command=\"Edit.NavigateTo\" Scope=\"Global\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Results View\">Shift+Alt+L</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.MyWorkPageInProgress.TfsContextMyWorkPageNewLinkedWI\" Scope=\"Team Explorer\">Shift+Alt+L</RemoveShortcut><RemoveShortcut Command=\"Edit.ToggleWordWrap\" Scope=\"Text Editor\">Ctrl+E, Ctrl+W</RemoveShortcut><RemoveShortcut Command=\"Edit.ListMembers\" Scope=\"Text Editor\">Ctrl+J</RemoveShortcut><RemoveShortcut Command=\"Edit.MakeLowercase\" Scope=\"Text Editor\">Ctrl+U</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.ExecuteInInteractive\" Scope=\"CSharp Editor\">Ctrl+E, Ctrl+E</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.ExecuteInInteractive\" Scope=\"CSharp Editor\">Ctrl+E, E</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.ExecuteSQL\" Scope=\"Query Designer\">Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.CancelRetrievingData\" Scope=\"Query Designer\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Query View\">Shift+Alt+L</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.ExecuteSQL\" Scope=\"View Designer\">Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.CancelRetrievingData\" Scope=\"View Designer\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Image.ShowGrid\" Scope=\"VC Image Editor\">Ctrl+Alt+S</RemoveShortcut><RemoveShortcut Command=\"Image.BrushTool\" Scope=\"VC Image Editor\">Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"Image.FilledRectangleTool\" Scope=\"VC Image Editor\">Ctrl+Shift+Alt+R</RemoveShortcut><RemoveShortcut Command=\"Image.TextTool\" Scope=\"VC Image Editor\">Ctrl+T</RemoveShortcut><RemoveShortcut Command=\"Image.UseSelectionasBrush\" Scope=\"VC Image Editor\">Ctrl+U</RemoveShortcut><RemoveShortcut Command=\"Format.Bold\" Scope=\"HTML Editor Design View\">Ctrl+B</RemoveShortcut><RemoveShortcut Command=\"View.ASP.NETNonvisualControls\" Scope=\"HTML Editor Design View\">Ctrl+Shift+N</RemoveShortcut><RemoveShortcut Command=\"Format.Underline\" Scope=\"HTML Editor Design View\">Ctrl+U</RemoveShortcut><RemoveShortcut Command=\"Design.RefreshPage\" Scope=\"XAML Designer\">Ctrl+R</RemoveShortcut><RemoveShortcut Command=\"Format.ResetAll\" Scope=\"XAML Designer\">Ctrl+Shift+R</RemoveShortcut><RemoveShortcut Command=\"Image.PreviousRightColor\" Scope=\"VC Image Editor\">Ctrl+Shift+[</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToImplementation\" Scope=\"CSharp Editor with Encoding\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToImplementation\" Scope=\"Microsoft Visual Basic Editor\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.SearchHistoryNext\" Scope=\"Interactive Window\">Ctrl+Alt+Down Arrow</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.SearchHistoryPrevious\" Scope=\"Interactive Window\">Ctrl+Alt+Up Arrow</RemoveShortcut><RemoveShortcut Command=\"Debug.Graphics.StartGraphicsDebugging\" Scope=\"Global\">Alt+F5</RemoveShortcut><RemoveShortcut Command=\"View.Backward\" Scope=\"Global\">Alt+Left Arrow</RemoveShortcut><RemoveShortcut Command=\"View.Forward\" Scope=\"Global\">Alt+Right Arrow</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.ProcessCombo\" Scope=\"Global\">Ctrl+5</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.ThreadCombo\" Scope=\"Global\">Ctrl+6</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.StackFrameCombo\" Scope=\"Global\">Ctrl+7</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.ToggleCurrentThreadFlaggedState\" Scope=\"Global\">Ctrl+8</RemoveShortcut><RemoveShortcut Command=\"Debug.LocationToolbar.ToggleFlaggedThreads\" Scope=\"Global\">Ctrl+9</RemoveShortcut><RemoveShortcut Command=\"View.TaskRunnerExplorer\" Scope=\"Global\">Ctrl+Alt+Bkspce</RemoveShortcut><RemoveShortcut Command=\"Window.ShowEzMDIFileList\" Scope=\"Global\">Ctrl+Alt+Down Arrow</RemoveShortcut><RemoveShortcut Command=\"OtherContextMenus.BrowserLink.RefreshLinkedBrowsers\" Scope=\"Global\">Ctrl+Alt+Enter</RemoveShortcut><RemoveShortcut Command=\"EditorContextMenus.CodeWindow.Execute\" Scope=\"Global\">Ctrl+Alt+F5</RemoveShortcut><RemoveShortcut Command=\"Project.Override\" Scope=\"Global\">Ctrl+Alt+Ins</RemoveShortcut><RemoveShortcut Command=\"Window.NextTab\" Scope=\"Global\">Ctrl+Alt+PgDn</RemoveShortcut><RemoveShortcut Command=\"Window.PreviousTab\" Scope=\"Global\">Ctrl+Alt+PgUp</RemoveShortcut><RemoveShortcut Command=\"Debug.ToggleDisassembly\" Scope=\"Global\">Ctrl+F11</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToDeclaration\" Scope=\"Global\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"Window.NextDocumentWindow\" Scope=\"Global\">Ctrl+F6</RemoveShortcut><RemoveShortcut Command=\"View.BrowseNext\" Scope=\"Global\">Ctrl+Shift+1</RemoveShortcut><RemoveShortcut Command=\"View.BrowsePrevious\" Scope=\"Global\">Ctrl+Shift+2</RemoveShortcut><RemoveShortcut Command=\"View.ForwardBrowseContext\" Scope=\"Global\">Ctrl+Shift+7</RemoveShortcut><RemoveShortcut Command=\"Window.AddTabtoSelection\" Scope=\"Global\">Ctrl+Shift+Alt+Space</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToDefinition\" Scope=\"Global\">F12</RemoveShortcut><RemoveShortcut Command=\"Edit.QuickFindSymbol\" Scope=\"Global\">Shift+Alt+F12</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToImplementation\" Scope=\"Microsoft Visual Basic Code Page Editor\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"Edit.MoveSelectedLinesDown\" Scope=\"Text Editor\">Alt+Down Arrow</RemoveShortcut><RemoveShortcut Command=\"View.QuickActions\" Scope=\"Text Editor\">Alt+Enter</RemoveShortcut><RemoveShortcut Command=\"Edit.PeekDefinition\" Scope=\"Text Editor\">Alt+F12</RemoveShortcut><RemoveShortcut Command=\"Edit.CompleteWord\" Scope=\"Text Editor\">Alt+Right Arrow</RemoveShortcut><RemoveShortcut Command=\"Edit.MoveSelectedLinesUp\" Scope=\"Text Editor\">Alt+Up Arrow</RemoveShortcut><RemoveShortcut Command=\"Edit.ToggleCompletionMode\" Scope=\"Text Editor\">Ctrl+Alt+Space</RemoveShortcut><RemoveShortcut Command=\"Edit.LineOpenAbove\" Scope=\"Text Editor\">Ctrl+Enter</RemoveShortcut><RemoveShortcut Command=\"Edit.WordPreviousExtendColumn\" Scope=\"Text Editor\">Ctrl+Shift+Alt+Left Arrow</RemoveShortcut><RemoveShortcut Command=\"Edit.WordNextExtendColumn\" Scope=\"Text Editor\">Ctrl+Shift+Alt+Right Arrow</RemoveShortcut><RemoveShortcut Command=\"Edit.ParameterInfo\" Scope=\"Text Editor\">Ctrl+Shift+Space</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToImplementation\" Scope=\"CSharp Editor\">Ctrl+F12</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Diagram\" Scope=\"Query Designer\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Criteria\" Scope=\"Query Designer\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.SQL\" Scope=\"Query Designer\">Ctrl+3</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Results\" Scope=\"Query Designer\">Ctrl+4</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Diagram\" Scope=\"View Designer\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Criteria\" Scope=\"View Designer\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.SQL\" Scope=\"View Designer\">Ctrl+3</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.Results\" Scope=\"View Designer\">Ctrl+4</RemoveShortcut><RemoveShortcut Command=\"View.EntityDataModelBrowser\" Scope=\"ADO.NET Entity Data Model Designer\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"View.EntityDataModelMappingDetails\" Scope=\"ADO.NET Entity Data Model Designer\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"Table.RowBelow\" Scope=\"HTML Editor Design View\">Ctrl+Alt+Down Arrow</RemoveShortcut><RemoveShortcut Command=\"Table.RowAbove\" Scope=\"HTML Editor Design View\">Ctrl+Alt+Up Arrow</RemoveShortcut><RemoveShortcut Command=\"XsdDesigner.ShowStartView\" Scope=\"XML Schema Designer\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"XsdDesigner.ShowContentModelView\" Scope=\"XML Schema Designer\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"XsdDesigner.ShowGraphView\" Scope=\"XML Schema Designer\">Ctrl+3</RemoveShortcut><RemoveShortcut Command=\"TestExplorer.OpenTest\" Scope=\"Test Explorer\">F12</RemoveShortcut><RemoveShortcut Command=\"Design.FitAll\" Scope=\"XAML Designer\">Ctrl+0</RemoveShortcut><RemoveShortcut Command=\"Format.EditText\" Scope=\"XAML Designer\">F2</RemoveShortcut><RemoveShortcut Command=\"XML.StartXSLTDebugging\" Scope=\"XML (Text) Editor\">Alt+F5</RemoveShortcut><RemoveShortcut Command=\"XML.StartXSLTWithoutDebugging\" Scope=\"XML (Text) Editor\">Ctrl+Alt+F5</RemoveShortcut><RemoveShortcut Command=\"Resources.Strings\" Scope=\"Managed Resources Editor\">Ctrl+1</RemoveShortcut><RemoveShortcut Command=\"Resources.Images\" Scope=\"Managed Resources Editor\">Ctrl+2</RemoveShortcut><RemoveShortcut Command=\"Resources.Icons\" Scope=\"Managed Resources Editor\">Ctrl+3</RemoveShortcut><RemoveShortcut Command=\"Resources.Audio\" Scope=\"Managed Resources Editor\">Ctrl+4</RemoveShortcut><RemoveShortcut Command=\"Resources.Files\" Scope=\"Managed Resources Editor\">Ctrl+5</RemoveShortcut><RemoveShortcut Command=\"Resources.Other\" Scope=\"Managed Resources Editor\">Ctrl+6</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Editor\">Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Format.ButtonBottom\" Scope=\"VC Dialog Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Format.ButtonRight\" Scope=\"VC Dialog Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Format.TestDialog\" Scope=\"VC Dialog Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWebAccess\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToBuilds\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToConnect\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWebAccess\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToBuilds\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToConnect\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToDocuments\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitActiveRepositories\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitChanges\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToHome\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToMyWork\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToPendingChanges\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToReports\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToSettings\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWorkItems\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitSynchronization\" Scope=\"Global\">Ctrl+0, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToDocuments\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitActiveRepositories\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitChanges\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToHome\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToMyWork\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToPendingChanges\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToReports\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToSettings\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.Commands.GoToWorkItems\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"Team.Git.GoToGitSynchronization\" Scope=\"Global\">Ctrl+0, ·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToFile\" Scope=\"Global\">Ctrl+1, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToMember\" Scope=\"Global\">Ctrl+1, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToSymbol\" Scope=\"Global\">Ctrl+1, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToType\" Scope=\"Global\">Ctrl+1, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToFile\" Scope=\"Global\">Ctrl+1, ·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToMember\" Scope=\"Global\">Ctrl+1, ·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToSymbol\" Scope=\"Global\">Ctrl+1, ·</RemoveShortcut><RemoveShortcut Command=\"Edit.GoToType\" Scope=\"Global\">Ctrl+1, ·</RemoveShortcut><RemoveShortcut Command=\"Debug.Breakpoints\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Debug.Threads\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"View.SolutionExplorer\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory1\" Scope=\"Global\">Ctrl+Alt+·, 1</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory2\" Scope=\"Global\">Ctrl+Alt+·, 2</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory3\" Scope=\"Global\">Ctrl+Alt+·, 3</RemoveShortcut><RemoveShortcut Command=\"Debug.Memory4\" Scope=\"Global\">Ctrl+Alt+·, 4</RemoveShortcut><RemoveShortcut Command=\"Debug.AttachtoProcess\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"View.WebBrowser\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"View.ServerExplorer\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Debug.Modules\" Scope=\"Global\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Debug.FunctionBreakpoint\" Scope=\"Global\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"File.NewFile\" Scope=\"Global\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Window.ActivateQuickLaunch\" Scope=\"Global\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Refactor.EncapsulateField\" Scope=\"Global\">Ctrl+·, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Project.AddNewItem\" Scope=\"Global\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"View.ResourceView\" Scope=\"Global\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"Edit.OpenFile\" Scope=\"Global\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"File.NewProject\" Scope=\"Global\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"Edit.NavigateTo\" Scope=\"Global\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Results View\">Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"TeamFoundationContextMenus.MyWorkPageInProgress.TfsContextMyWorkPageNewLinkedWI\" Scope=\"Team Explorer\">Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.ExecuteInInteractive\" Scope=\"CSharp Editor\">Ctrl+·, Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"InteractiveConsole.ExecuteInInteractive\" Scope=\"CSharp Editor\">Ctrl+·, ·</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.ExecuteSQL\" Scope=\"Query Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.CancelRetrievingData\" Scope=\"Query Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Team.NewLinkedWorkItem\" Scope=\"Work Item Query View\">Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.ExecuteSQL\" Scope=\"View Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"QueryDesigner.CancelRetrievingData\" Scope=\"View Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Image.ShowGrid\" Scope=\"VC Image Editor\">Ctrl+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Image.BrushTool\" Scope=\"VC Image Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Image.FilledRectangleTool\" Scope=\"VC Image Editor\">Ctrl+Shift+Alt+·</RemoveShortcut><RemoveShortcut Command=\"Image.PreviousRightColor\" Scope=\"VC Image Editor\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"Image.TextTool\" Scope=\"VC Image Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Image.UseSelectionasBrush\" Scope=\"VC Image Editor\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Format.Bold\" Scope=\"HTML Editor Design View\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"View.ASP.NETNonvisualControls\" Scope=\"HTML Editor Design View\">Ctrl+Shift+·</RemoveShortcut><RemoveShortcut Command=\"Format.Underline\" Scope=\"HTML Editor Design View\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Design.RefreshPage\" Scope=\"XAML Designer\">Ctrl+·</RemoveShortcut><RemoveShortcut Command=\"Format.ResetAll\" Scope=\"XAML Designer\">Ctrl+Shift+·</RemoveShortcut><Shortcut Command=\"VisualAssist.RefactorCreateImplementation\" Scope=\"Global\">Shift+Alt+I</Shortcut><Shortcut Command=\"VisualAssist.SortSelectedLines\" Scope=\"Global\">Ctrl+Shift+Alt+S</Shortcut><Shortcut Command=\"VisualAssist.RefactorCreateImplementation\" Scope=\"Global\">Shift+Alt+·</Shortcut><Shortcut Command=\"VisualAssist.SortSelectedLines\" Scope=\"Global\">Ctrl+Shift+Alt+·</Shortcut><Shortcut Command=\"Window.CloseDocumentWindow\" Scope=\"Global\">Ctrl+F4</Shortcut><Shortcut Command=\"Window.CloseDocumentWindow\" Scope=\"Text Editor\">Ctrl+·</Shortcut></UserShortcuts></KeyboardShortcuts></Category><Category name=\"Environment_NewProjectDialogPreferredLanguage\" Category=\"{77E22C0C-9F4A-4bfb-AD3A-3F3F4711E9ED}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_NewProjectDialogPreferredLanguage\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"HasNewProjectDialogPreferredLanguage\">true</PropertyValue><PropertyValue name=\"NewProjectDialogPreferredLanguage\">VC++</PropertyValue><PropertyValue name=\"DefaultToLargeIconView\">false</PropertyValue></Category><Category name=\"Environment_ObjectBrowser\" Category=\"{D98D784D-88BF-4EBF-B039-C146EC14F472}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_ObjectBrowser\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ObjectBrowserViewNamespaces\">false</PropertyValue><PropertyValue name=\"ObjectBrowserShowHiddenTypesAndMembers\">false</PropertyValue><PropertyValue name=\"ObjectBrowserTypesSortAlphabetically\">true</PropertyValue><PropertyValue name=\"ObjectBrowserTypesSortByType\">false</PropertyValue><PropertyValue name=\"ObjectBrowserTypesSortByAccess\">false</PropertyValue><PropertyValue name=\"ObjectBrowserTypesGroupByType\">false</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsSortByBestMatch\">true</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsSortByType\">false</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsSortByAccess\">false</PropertyValue><PropertyValue name=\"ObjectBrowserSearchResultsGroupByType\">false</PropertyValue><PropertyValue name=\"ObjectBrowserMembersViewPublic\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersViewProtected\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersViewPrivate\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersViewOther\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersShowInherited\">false</PropertyValue><PropertyValue name=\"ObjectBrowserShowExtensionMembers\">false</PropertyValue><PropertyValue name=\"ObjectBrowserShowBaseTypes\">true</PropertyValue><PropertyValue name=\"ObjectBrowserShowDerivedTypes\">false</PropertyValue><PropertyValue name=\"ObjectBrowserMembersSortAlphabetically\">false</PropertyValue><PropertyValue name=\"ObjectBrowserMembersSortByType\">true</PropertyValue><PropertyValue name=\"ObjectBrowserMembersSortByAccess\">false</PropertyValue><PropertyValue name=\"ObjectBrowserScope\">{B1BA9461-FC54-45B3-A484-CB6DD0B95C94}</PropertyValue><PropertyValue name=\"ObjectBrowserScopeSubScope\">0</PropertyValue><PropertyValue name=\"DefaultPresentationLanguage\">VC++</PropertyValue></Category><Category name=\"Environment_OutputWindow\" Category=\"{07C6CD04-100B-4f3e-BA93-DD1363E8D8E3}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_OutputWindow\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"OutputWindowWordWrap\">false</PropertyValue></Category><Category name=\"Environment_QuickLaunch\" Category=\"{dfbffb75-d8ed-47a2-87de-1d246fd06ae5}\" Package=\"{18333854-d2ff-44a3-98d8-40501b914d7d}\" RegisteredName=\"Environment_QuickLaunch\" PackageName=\"Global Search Package\"><PropertyValue name=\"UseGlobalSearch\">true</PropertyValue><PropertyValue name=\"PreserveSearchResults\">false</PropertyValue><SearchProviders><Provider Name=\"Most Recently Used\" Id=\"{3ef528c5-c45a-47e0-b9ee-a212a32a99ec}\" Enabled=\"True\"/><Provider Name=\"Menus\" Id=\"{f7a34a7c-b596-4bfa-b119-321539fc96ed}\" Enabled=\"True\"/><Provider Name=\"Options\" Id=\"{258ebb6f-5c3b-4241-b929-71ec7a18dbf0}\" Enabled=\"True\"/><Provider Name=\"Open Documents\" Id=\"{28a7edd7-524f-4c82-8e1e-1e472357454d}\" Enabled=\"True\"/><Provider Name=\"Install\" Id=\"{caf11422-9334-422c-91d9-656307e3b552}\" Enabled=\"True\"/><Provider Name=\"NuGet Packages\" Id=\"{042c2b4b-c7f7-49db-b7a2-402eb8dc7892}\" Enabled=\"True\"/></SearchProviders></Category><Category name=\"Environment_SimplifiedToolsOptions\" Category=\"{13BEDEE6-9051-4809-B9E3-2EEC749EB15A}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_SimplifiedToolsOptions\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"SupportsSimpleToolsOptions\">false</PropertyValue><PropertyValue name=\"ShowingAllPages\">false</PropertyValue><PropertyValue name=\"ShowFlatList\">false</PropertyValue></Category><Category name=\"Environment_SolutionExplorer\" Category=\"{6FA9062F-82B2-4725-BA6D-58CF7CBA7DEA}\" Package=\"{cf6a5c16-83b0-4d04-b702-195c35c6e887}\" RegisteredName=\"Environment_SolutionExplorer\" PackageName=\"Microsoft.VisualStudio.PlatformUI.SolutionNavigatorPackage\"><PropertyValue name=\"SearchFileContents\">true</PropertyValue><PropertyValue name=\"SearchExternalItems\">true</PropertyValue></Category><Category name=\"Environment_StartPage\" Category=\"{255FE6D3-A0AE-4076-A509-D581B2BE4F9E}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_StartPage\" PackageName=\"Visual Studio Environment Package\"><StartPages Version=\"1.0\"><StartPage Id=\"Default\" Links=\"VC\"/></StartPages></Category><Category name=\"Environment_TabsAndWindows\" Category=\"{CCF27946-63D9-4806-91BA-EEBF5F3DFA4A}\" Package=\"{5E56B3DB-7964-4588-8D49-D3523AB7BDB9}\" RegisteredName=\"Environment_TabsAndWindows\" PackageName=\"Environment Package Window Management\"><PropertyValue name=\"EnableIndependentTabWell\">True</PropertyValue><PropertyValue name=\"EnableIndependentToolWindows\">False</PropertyValue><PropertyValue name=\"EnablePreviewTab\">True</PropertyValue><PropertyValue name=\"EnableSingleClickPreviewInFindResults\">True</PropertyValue><PropertyValue name=\"EnableSingleClickPreviewInNavigateTo\">True</PropertyValue><PropertyValue name=\"EnableSingleClickPreviewInSolutionExplorer\">False</PropertyValue><PropertyValue name=\"MaintainPinStatus\">False</PropertyValue><PropertyValue name=\"ShowAutoHiddenWindowsOnHover\">False</PropertyValue><PropertyValue name=\"ShowPinButtonInUnpinnedTabs\">True</PropertyValue><PropertyValue name=\"ShowPinnedTabsInSeparateRow\">False</PropertyValue></Category><Category name=\"Environment_Toolbox\" Category=\"{481999F2-7479-4e03-83D5-BE808BA142DF}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_Toolbox\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"ShowAllTabs\">false</PropertyValue><PropertyValue name=\"Version\">1</PropertyValue><PropertyValue name=\"DeletedTabCount\">0</PropertyValue><PropertyValue name=\"TabCount\">0</PropertyValue><PropertyValue name=\"DeletedItemCount\">0</PropertyValue><PropertyValue name=\"ItemCount\">0</PropertyValue></Category><Category name=\"Environment_UnifiedFind\" Category=\"{DF00ADDF-C14C-4ffd-9325-634FD605850B}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_UnifiedFind\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"Options\">MatchCase=0 WholeWord=0 Hidden=1 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=0 KeepOpen=0 NameOnly=0 Append=0 Plain Document Find</PropertyValue><PropertyValue name=\"DialogOptions\">MatchCase=1 WholeWord=0 Hidden=1 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=1 KeepOpen=1 NameOnly=0 Append=0 Plain Solution FindAll</PropertyValue><PropertyValue name=\"AdornmentOptions\">MatchCase=0 WholeWord=0 Hidden=1 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=0 KeepOpen=0 NameOnly=0 Append=0 Plain Document Find</PropertyValue><PropertyValue name=\"Result list\">1</PropertyValue><PropertyValue name=\"ShowEndOfSearch\">1</PropertyValue><PropertyValue name=\"ShowNoFound\">1</PropertyValue><PropertyValue name=\"ShowAllReplacementsNotAllowed\">1</PropertyValue><PropertyValue name=\"ShowSomeReplacementsNotAllowed\">1</PropertyValue><PropertyValue name=\"ShowNoMore\">1</PropertyValue><PropertyValue name=\"ShowFindStart\">1</PropertyValue><PropertyValue name=\"ShowCancel\">1</PropertyValue><PropertyValue name=\"ShowCancelBeforeReplacementsMade\">1</PropertyValue><PropertyValue name=\"ShowReplaceInFilesWarning\">1</PropertyValue><PropertyValue name=\"ShowCancelEntireReplaceAfterCancellingSCC\">1</PropertyValue><PropertyValue name=\"AutomaticallyLimitSearchToSelection\">1</PropertyValue><PropertyValue name=\"FindTextFromEditor\">1</PropertyValue><PropertyValue name=\"HitReplaced\">1</PropertyValue><PropertyValue name=\"EditableFindInFilesResults\">1</PropertyValue><PropertyValue name=\"Syntax\">Regex</PropertyValue><PropertyValue name=\"In Files Pane Display Options\">0</PropertyValue><PropertyValue name=\"NumberOfScopes\">0</PropertyValue></Category><Category name=\"Environment_WindowLayout\" Category=\"{eb4ba109-a9db-4445-bd09-e7604bcdce84}\" Package=\"{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}\" RegisteredName=\"Environment_WindowLayout\" PackageName=\"Visual Studio Environment Package\"><PropertyValue name=\"Version\">7</PropertyValue><PropertyValue name=\"WindowProfileNames\">Design|Debug|NoToolWin</PropertyValue><Design><WindowProfile xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:wm=\"clr-namespace:Microsoft.VisualStudio.Platform.WindowManagement;assembly=Microsoft.VisualStudio.Platform.WindowManagement\" Name=\"Design\" xmlns=\"clr-namespace:Microsoft.VisualStudio.PlatformUI.Shell;assembly=Microsoft.VisualStudio.Shell.ViewManager\"><MainSite FloatingTop=\"0\" FloatingLeft=\"0.8\" FloatingHeight=\"848\" FloatingWidth=\"1550.4\" FloatingWindowState=\"Maximized\"><AutoHideRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\" DockRestriction=\"AlwaysFloating\"><AutoHideChannel Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Right\" Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingTop=\"76.8\" FloatingLeft=\"819.2\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/></AutoHideGroup><AutoHideGroup><wm:ToolWindowView OnTopWhenLastInContext=\"False\" ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}\" DockedHeight=\"384\" DockedWidth=\"204.8\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/></AutoHideGroup><AutoHideGroup><wm:ToolWindowView OnTopWhenLastInContext=\"False\" ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6d4078d1-5951-4ed1-ac0e-0a8099c1cce5}\" DockedHeight=\"537.6\" DockedWidth=\"307.2\" AutoHideWidth=\"307.2\" AutoHideHeight=\"537.6\" FloatingHeight=\"537.6\" FloatingWidth=\"307.2\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Top\"/><AutoHideChannel Dock=\"Bottom\" IsVisible=\"True\"><AutoHideGroup IsVisible=\"True\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{588470cc-84f8-4a57-9ac4-86bca0625ff4}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{b869198c-f673-46d2-83ae-64f515277716}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{b8399b49-7330-487b-9235-7d2e969d0a79}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView Name=\"ST:0:0:{778b5376-ad77-4751-acdc-f3d18343f8dd}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887920-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887921-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{68487888-204a-11d3-87eb-00c04f7971a5}\" IsVisible=\"True\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView OnTopWhenLastInContext=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"2\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{be4d7042-ba3f-11d2-840e-00c04f9902c1}\" IsVisible=\"True\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{605322a2-17ae-43f4-b60f-766556e46c87}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f564}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f565}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{905da7d1-18fd-4a46-8d0f-a5ff58ada9de}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{519e8a32-1c95-4a42-956f-2cee2f28eb0f}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{92547016-2bd0-4dfe-bd4f-5b52bdce0037}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}\" IsVisible=\"True\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ecb7191a-597b-41f5-9843-03a4cf275dde}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{fdffccf2-5f63-404f-86ad-33693f544948}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd5b-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"307.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{637792aa-f332-4bb5-be6c-066b0e88eced}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f044f2c2-3d99-4787-a492-6b09a19df7c0}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f16e7758-bfd9-4360-a45f-6deeae786164}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f2c4be33-ca39-41a6-a69a-f4ed439d4178}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"104\" IconResourcePackage=\"8889e051-b7f9-4781-bb33-2a36a9bdb3a5\" Name=\"ST:0:0:{cdbdee54-b399-484b-b763-db2c3393d646}\" DockedHeight=\"342.339622641509\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{9a7cebbb-dc5c-4986-bc49-962da46aa506}\" DockedHeight=\"342.339622641509\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><wm:ToolWindowView ForceCreate=\"DontForceCreate\" IconIndex=\"1\" IconResourceID=\"107\" IconResourcePackage=\"44630d46-96b5-488c-8df9-26e21db8c1a3\" Name=\"ST:0:0:{6bf43c00-192e-4279-9dd1-c19a4c0ab983}\" DockedHeight=\"342.339622641509\" FloatingTop=\"200\" FloatingLeft=\"200\" FloatingHeight=\"400\" FloatingWidth=\"1000\"/></AutoHideGroup><AutoHideGroup IsVisible=\"True\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" IsVisible=\"True\" DockedHeight=\"352.8\" DockedWidth=\"1524\" AutoHideHeight=\"448\" FloatingTop=\"744.8\" FloatingLeft=\"26.4\" FloatingHeight=\"444.8\" FloatingWidth=\"1524\"/></AutoHideGroup></AutoHideChannel><DockRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"355.36\"><TabGroup IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"355.36\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"2\" IconResourceID=\"107\" IconResourcePackage=\"44630d46-96b5-488c-8df9-26e21db8c1a3\" Name=\"ST:0:0:{32a6260a-0121-4878-95e5-80d2f08ea4cb}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"600\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"3\" IconResourceID=\"107\" IconResourcePackage=\"44630d46-96b5-488c-8df9-26e21db8c1a3\" Name=\"ST:0:0:{8e5c1d1a-8a91-4406-aa56-5bf27c97d63c}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"600\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}\" IsSelected=\"True\" IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c9c0ae26-aa77-11d2-b3f0-0000f87570ee}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"109\" IconResourcePackage=\"3a3e1789-3e35-47b0-8567-d2fb407cc63d\" Name=\"ST:0:0:{de1fc918-f32e-4dd7-a915-1792a051f26b}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{2d7728c2-de0a-45b5-99aa-89b609dfde73}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView Name=\"ST:0:0:{9f3ec988-1174-4746-a66a-3969715d1fc7}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{131369f2-062d-44a2-8671-91ff31efb4f4}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{3addf8e2-81cc-41a0-9785-dbd2d86064bd}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{0db31cc8-2322-4f59-a610-1fdc8423df77}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{1cba9826-3184-4799-a184-784e41b56398}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{38ed9834-0c97-445b-bd1d-f78f3e08afac}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{402dc223-d700-4029-866f-acee803f3f0c}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a9b00010-7308-415c-95c6-eed62c1b9788}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{9c7d10e9-0147-4363-bf48-917f0426cd03}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{dd1ddd20-d59b-11da-a94d-0800200c9a66}\" DockedHeight=\"768\" DockedWidth=\"355.36\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/></TabGroup><TabGroup DockedHeight=\"768\" DockedWidth=\"355.36\"><ViewBookmark Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"355.36\"/><ViewBookmark Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"355.36\"/></TabGroup></DockGroup><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a2eaf38f-a0ad-4503-91f8-5f004a69a040}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><DocumentGroupContainer IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><wm:WMDocumentGroup IsVisible=\"True\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{46c87f81-5a06-43a8-9e25-85d33bac49f8}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{269a02dc-6af8-11d3-bdc4-00c04f688e50}\" FloatingHeight=\"384\" FloatingWidth=\"512\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{99b8fa2f-ab90-4f57-9c32-949f146f1914}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c79b74ff-f1d7-4c94-aefa-4d22bfe1b1f9}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView Name=\"ST:0:0:{93a69444-e846-4571-9e03-a8433ad9ddf9}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{cb4d394c-6408-4607-8c42-0910d3147a4e}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{e5c2cce5-61d0-4cd8-a946-13ec76cfdb01}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{1820bae5-c385-4492-9de5-e35c9cf17b18}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><ViewBookmark Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" AccessOrder=\"1\" ViewBookmarkType=\"DocumentWell\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{65d61de1-c41c-4504-8c3d-c97027b25ca8}\" IsVisible=\"True\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMDocumentGroup></DocumentGroupContainer><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{31fc2115-5126-4a87-b2f7-77eaab65048b}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><ViewBookmark Name=\"ST:0:0:{6d4078d1-5951-4ed1-ac0e-0a8099c1cce5}\" DockedHeight=\"537.6\" DockedWidth=\"307.2\"/></DockGroup><DockGroup DockedHeight=\"342.339622641509\" DockedWidth=\"1024\"><TabGroup DockedHeight=\"342.339622641509\"><ViewBookmark Name=\"ST:0:0:{588470cc-84f8-4a57-9ac4-86bca0625ff4}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{b869198c-f673-46d2-83ae-64f515277716}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{b8399b49-7330-487b-9235-7d2e969d0a79}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{778b5376-ad77-4751-acdc-f3d18343f8dd}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{0f887920-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{0f887921-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{68487888-204a-11d3-87eb-00c04f7971a5}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{be4d7042-ba3f-11d2-840e-00c04f9902c1}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{605322a2-17ae-43f4-b60f-766556e46c87}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f564}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f565}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{905da7d1-18fd-4a46-8d0f-a5ff58ada9de}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{519e8a32-1c95-4a42-956f-2cee2f28eb0f}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{92547016-2bd0-4dfe-bd4f-5b52bdce0037}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{ecb7191a-597b-41f5-9843-03a4cf275dde}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{fdffccf2-5f63-404f-86ad-33693f544948}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{73f6dd5b-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{637792aa-f332-4bb5-be6c-066b0e88eced}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{f044f2c2-3d99-4787-a492-6b09a19df7c0}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{f16e7758-bfd9-4360-a45f-6deeae786164}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{f2c4be33-ca39-41a6-a69a-f4ed439d4178}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{cdbdee54-b399-484b-b763-db2c3393d646}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{9a7cebbb-dc5c-4986-bc49-962da46aa506}\" DockedHeight=\"342.339622641509\"/><ViewBookmark Name=\"ST:0:0:{6bf43c00-192e-4279-9dd1-c19a4c0ab983}\" DockedHeight=\"342.339622641509\"/></TabGroup><TabGroup DockedHeight=\"342.339622641509\" DockedWidth=\"100\"><ViewBookmark Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"342.339622641509\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"342.339622641509\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" DockedHeight=\"342.339622641509\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"342.339622641509\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"342.339622641509\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"342.339622641509\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"342.339622641509\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"342.339622641509\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"342.339622641509\" DockedWidth=\"100\"/></TabGroup></DockGroup></DockGroup><DockGroup Orientation=\"Vertical\" DockedHeight=\"537.6\" DockedWidth=\"204.8\"><TabGroup DockedHeight=\"537.6\" DockedWidth=\"204.8\"><ViewBookmark Name=\"ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{099ca9ea-0ae4-4e31-a7e4-fe09bd1715cc}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><ViewBookmark Name=\"ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{07cd18b4-3ba1-11d2-890a-0060083196c6}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{4a791147-19e4-11d3-b86b-00c04f79f802}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd58-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{57dc5d59-11c2-4955-a7b4-d7699d677e93}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{5b6781c0-e99d-11d0-9954-00a0c91bc8e5}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{47a7d881-d3cf-4036-b57c-0444e12df881}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"105\" IconResourcePackage=\"8889e051-b7f9-4781-bb33-2a36a9bdb3a5\" Name=\"ST:0:0:{a34b1c5d-6d37-4a0c-a8b0-99f8e8158b48}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><ViewBookmark Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"537.6\" DockedWidth=\"204.8\"/></TabGroup><TabGroup DockedHeight=\"384\" DockedWidth=\"204.8\"><ViewBookmark Name=\"ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}\" DockedHeight=\"384\" DockedWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{66dba47c-61df-11d2-aa79-00c04f990343}\" DockedHeight=\"384\" DockedWidth=\"204.8\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/></TabGroup></DockGroup></DockGroup><ViewBookmark Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\"/></DockGroup></DockRoot></AutoHideRoot></MainSite><wm:WMFloatSite Id=\"e5b6b996-1556-40af-8b11-39aef7eec003\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"7ab36c61-a40b-4c14-96ad-aa00dc4369b2\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"b12a44b3-2a5f-4c64-8e28-0954a914481f\" FloatingTop=\"272\" FloatingLeft=\"980.8\" FloatingHeight=\"312\" FloatingWidth=\"374.4\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" IsSelected=\"True\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingTop=\"272\" FloatingLeft=\"980.8\" FloatingHeight=\"312\" FloatingWidth=\"374.4\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"627819c5-448d-4bed-a989-45dd1dff5526\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"ef90a138-4bd6-4c50-8346-93505415edc6\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"14f10035-3279-4175-80fd-9ac5bc1b119b\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"394383af-6c69-4ddf-beb8-41834249f0f7\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"1f2adc80-941f-4fa5-8f21-9570109b5e7d\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"f5924940-f281-48fd-aee6-c562ab71ad80\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"8c13bda8-7176-4b17-a8c8-44ba7fa3d39f\"><wm:ToolWindowView Name=\"ST:0:0:{ed485b08-5acf-4ce9-8e13-699174ea0201}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"7b078ec9-8ae0-4599-b2fd-e1cc021c6744\"><wm:ToolWindowView Name=\"ST:0:0:{ecdd9ee0-ac6b-11d0-89f9-00a0c9110055}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"be3b4a18-5d2a-4f63-85b9-d0c2b8f2c95c\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf577b8c-4134-11d2-83e5-00c04f9902c1}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"eed383a7-dddd-42e1-9096-f28783b82aac\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f2e84780-2af1-11d1-a7fa-00a0c9110051}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"c5be364a-4887-45bf-82e9-d6e5e89c9819\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a18f9d0-b838-11d0-93eb-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"01f49ae7-ec14-4a0e-818b-d0f262f5003b\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"ff665e87-edbc-4da5-858b-ed637107ad8d\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"4124da37-1e41-486a-8455-6cdde4540d95\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"bf5a3c6e-d327-439b-bcb2-f8851ce41698\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"fb0b0a67-0f05-4865-849b-7087eb26184c\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ca4b8ff5-bfc7-11d2-9929-00c04f68fdaf}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"80caf959-e153-4e19-85c7-c34062908585\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{51c76317-9037-4cf2-a20a-6206fd30b4a1}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"ec7ed71e-cf1f-4457-b21b-987d1625f58c\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><TabGroup FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e62ce6a0-b439-11d0-a79d-00a0c9110051}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{8d263989-ff4b-4a78-90c8-b2ba3fa69311}\" FloatingTop=\"400\" FloatingLeft=\"400\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></TabGroup></wm:WMFloatSite><wm:WMFloatSite Id=\"01bec7b8-2dda-4779-9755-616ca98e7af0\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{37aba9be-445a-11d3-9949-00c04f68fd0a}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"9bdee280-7bc3-4fb7-9e32-f10e7d37f6d9\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"460b3a44-a960-437e-896c-93d00decadc3\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"f330d709-aca0-4ffd-8e21-4232be344bff\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"5a653553-7db5-410d-9dda-d5a1778797c3\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"bb471955-afe3-464a-bb56-bc59776df320\"><wm:ToolWindowView Name=\"ST:0:0:{e3369cf0-996f-45ba-881e-2af696fbe27b}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"de3895d9-25ee-4364-b08a-9f3a01445dc3\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><TabGroup FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{0504ff91-9d61-11d0-a794-00a0c9110051}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4193beee-0a23-4619-bf2f-6d609ceacc01}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></TabGroup></wm:WMFloatSite><wm:WMFloatSite Id=\"bea350e6-0262-4387-b79f-a8efdc319d9b\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{6f0b3bcf-f1c8-49f5-a0b5-e3c29762d9a5}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"ff62c891-6429-48cb-aca8-cbf6f2474330\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"666\" IconResourcePackage=\"b6546c9c-e5fe-4095-8d39-c080d9bd6a85\" Name=\"ST:0:0:{93c5e7ad-af06-49e6-a756-b8f3eaca790d}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite></WindowProfile></Design><Debug><WindowProfile xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:wm=\"clr-namespace:Microsoft.VisualStudio.Platform.WindowManagement;assembly=Microsoft.VisualStudio.Platform.WindowManagement\" Name=\"Debug\" xmlns=\"clr-namespace:Microsoft.VisualStudio.PlatformUI.Shell;assembly=Microsoft.VisualStudio.Shell.ViewManager\"><MainSite FloatingTop=\"0.8\" FloatingLeft=\"0.8\" FloatingHeight=\"848\" FloatingWidth=\"1550.4\" FloatingWindowState=\"Maximized\"><AutoHideRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\" DockRestriction=\"AlwaysFloating\"><AutoHideChannel Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a2eaf38f-a0ad-4503-91f8-5f004a69a040}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Right\" Orientation=\"Vertical\" IsVisible=\"True\"><AutoHideGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingTop=\"76.8\" FloatingLeft=\"819.2\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{31fc2115-5126-4a87-b2f7-77eaab65048b}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"348.16\"/></AutoHideGroup><AutoHideGroup IsVisible=\"True\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6d4078d1-5951-4ed1-ac0e-0a8099c1cce5}\" IsVisible=\"True\" DockedHeight=\"537.6\" DockedWidth=\"307.2\" AutoHideWidth=\"307.2\" AutoHideHeight=\"537.6\" FloatingHeight=\"537.6\" FloatingWidth=\"307.2\"/></AutoHideGroup><AutoHideGroup IsVisible=\"True\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"301\" IconResourcePackage=\"66d044cf-265f-4beb-a428-3d37a0835dd5\" Name=\"ST:0:0:{4193beee-0a23-4619-bf2f-6d609ceacc01}\" IsVisible=\"True\" DockedHeight=\"241.811320754717\" DockedWidth=\"512\" AutoHideWidth=\"421.6\" FloatingTop=\"489.056603773585\" FloatingLeft=\"1726.18867924528\" FloatingHeight=\"241.811320754717\" FloatingWidth=\"686.490566037736\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Top\"/><AutoHideChannel Dock=\"Bottom\"/><DockRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"768\" DockedWidth=\"358.4\"><TabGroup IsVisible=\"True\" DockedHeight=\"652.8\" DockedWidth=\"358.4\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{ed485b08-5acf-4ce9-8e13-699174ea0201}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{32a6260a-0121-4878-95e5-80d2f08ea4cb}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"600\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{8e5c1d1a-8a91-4406-aa56-5bf27c97d63c}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"600\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}\" IsSelected=\"True\" IsVisible=\"True\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c9c0ae26-aa77-11d2-b3f0-0000f87570ee}\" IsVisible=\"True\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{de1fc918-f32e-4dd7-a915-1792a051f26b}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{ecdd9ee0-ac6b-11d0-89f9-00a0c9110055}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{2d7728c2-de0a-45b5-99aa-89b609dfde73}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView Name=\"ST:0:0:{9f3ec988-1174-4746-a66a-3969715d1fc7}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{131369f2-062d-44a2-8671-91ff31efb4f4}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{3addf8e2-81cc-41a0-9785-dbd2d86064bd}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{0db31cc8-2322-4f59-a610-1fdc8423df77}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{1cba9826-3184-4799-a184-784e41b56398}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{38ed9834-0c97-445b-bd1d-f78f3e08afac}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{402dc223-d700-4029-866f-acee803f3f0c}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a9b00010-7308-415c-95c6-eed62c1b9788}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{9c7d10e9-0147-4363-bf48-917f0426cd03}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{dd1ddd20-d59b-11da-a94d-0800200c9a66}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><ViewBookmark Name=\"ST:0:0:{a2eaf38f-a0ad-4503-91f8-5f004a69a040}\" DockedHeight=\"652.8\" DockedWidth=\"358.4\"/></TabGroup><TabGroup DockedHeight=\"768\" DockedWidth=\"358.4\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"358.4\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/></TabGroup></DockGroup><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DocumentGroupContainer IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><wm:WMDocumentGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{46c87f81-5a06-43a8-9e25-85d33bac49f8}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{269a02dc-6af8-11d3-bdc4-00c04f688e50}\" FloatingHeight=\"384\" FloatingWidth=\"512\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf577b8c-4134-11d2-83e5-00c04f9902c1}\" FloatingHeight=\"384\" FloatingWidth=\"358.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{99b8fa2f-ab90-4f57-9c32-949f146f1914}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{387cb18d-6153-4156-9257-9ac3f9207bbe}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c79b74ff-f1d7-4c94-aefa-4d22bfe1b1f9}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView Name=\"ST:0:0:{93a69444-e846-4571-9e03-a8433ad9ddf9}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{cb4d394c-6408-4607-8c42-0910d3147a4e}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{e5c2cce5-61d0-4cd8-a946-13ec76cfdb01}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{65d61de1-c41c-4504-8c3d-c97027b25ca8}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/><wm:ToolWindowView ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{1820bae5-c385-4492-9de5-e35c9cf17b18}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMDocumentGroup></DocumentGroupContainer><ViewBookmark Name=\"ST:0:0:{6d4078d1-5951-4ed1-ac0e-0a8099c1cce5}\"/></DockGroup><DockGroup IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"512\"><TabGroup IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"5\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{f2e84780-2af1-11d1-a7fa-00a0c9110051}\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"4\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{4a18f9d0-b838-11d0-93eb-00a0c90f2734}\" IsSelected=\"True\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ca4b8ff5-bfc7-11d2-9929-00c04f68fdaf}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{51c76317-9037-4cf2-a20a-6206fd30b4a1}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"0\" IconResourceID=\"2001\" IconResourcePackage=\"beb01ddf-9d2b-435b-a9e7-76557e2b6b52\" Name=\"ST:0:0:{e62ce6a0-b439-11d0-a79d-00a0c9110051}\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{8d263989-ff4b-4a78-90c8-b2ba3fa69311}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"199.68\" FloatingWidth=\"512\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"10\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{37aba9be-445a-11d3-9949-00c04f68fd0a}\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"9\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:1:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887920-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887921-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{68487888-204a-11d3-87eb-00c04f7971a5}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd5b-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{9a7cebbb-dc5c-4986-bc49-962da46aa506}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{e3369cf0-996f-45ba-881e-2af696fbe27b}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cdbdee54-b399-484b-b763-db2c3393d646}\" DockedHeight=\"242.716981132075\" DockedWidth=\"459.302759575672\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/></TabGroup><TabGroup IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingTop=\"781.584905660377\" FloatingLeft=\"1068.67924528302\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"><wm:ToolWindowView ForceCreate=\"DontForceCreate\" IconIndex=\"1\" IconResourceID=\"107\" IconResourcePackage=\"44630d46-96b5-488c-8df9-26e21db8c1a3\" Name=\"ST:0:0:{6bf43c00-192e-4279-9dd1-c19a4c0ab983}\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingTop=\"200\" FloatingLeft=\"200\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" IconIndex=\"3\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{0504ff91-9d61-11d0-a794-00a0c9110051}\" IsSelected=\"True\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingTop=\"781.584905660377\" FloatingLeft=\"1068.67924528302\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView Name=\"ST:0:0:{637792aa-f332-4bb5-be6c-066b0e88eced}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" IconIndex=\"2\" IconResourceID=\"5123\" IconResourcePackage=\"c9dd4a57-47fb-11d2-83e7-00c04f9902c1\" Name=\"ST:0:0:{be4d7042-ba3f-11d2-840e-00c04f9902c1}\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingTop=\"781.584905660377\" FloatingLeft=\"1068.67924528302\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{605322a2-17ae-43f4-b60f-766556e46c87}\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingTop=\"781.584905660377\" FloatingLeft=\"1068.67924528302\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ecb7191a-597b-41f5-9843-03a4cf275dde}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" IsVisible=\"True\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingTop=\"781.584905660377\" FloatingLeft=\"1068.67924528302\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{588470cc-84f8-4a57-9ac4-86bca0625ff4}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f564}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f565}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{905da7d1-18fd-4a46-8d0f-a5ff58ada9de}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{519e8a32-1c95-4a42-956f-2cee2f28eb0f}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{92547016-2bd0-4dfe-bd4f-5b52bdce0037}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{fdffccf2-5f63-404f-86ad-33693f544948}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f044f2c2-3d99-4787-a492-6b09a19df7c0}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f16e7758-bfd9-4360-a45f-6deeae786164}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f2c4be33-ca39-41a6-a69a-f4ed439d4178}\" DockedHeight=\"242.716981132075\" DockedWidth=\"564.697240424328\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/></TabGroup><TabGroup DockedHeight=\"242.716981132075\" DockedWidth=\"100\"><ViewBookmark Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"242.716981132075\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"242.716981132075\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" DockedHeight=\"242.716981132075\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"242.716981132075\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"242.716981132075\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"242.716981132075\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"242.716981132075\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"242.716981132075\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"242.716981132075\" DockedWidth=\"100\"/></TabGroup></DockGroup></DockGroup><TabGroup DockedHeight=\"652.8\" DockedWidth=\"174.08\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{099ca9ea-0ae4-4e31-a7e4-fe09bd1715cc}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{66dba47c-61df-11d2-aa79-00c04f990343}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{4a791147-19e4-11d3-b86b-00c04f79f802}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd58-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{57dc5d59-11c2-4955-a7b4-d7699d677e93}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{07cd18b4-3ba1-11d2-890a-0060083196c6}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{5b6781c0-e99d-11d0-9954-00a0c91bc8e5}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{47a7d881-d3cf-4036-b57c-0444e12df881}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a34b1c5d-6d37-4a0c-a8b0-99f8e8158b48}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><ViewBookmark Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\"/><ViewBookmark Name=\"ST:0:0:{31fc2115-5126-4a87-b2f7-77eaab65048b}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\"/></TabGroup><ViewBookmark Name=\"ST:0:0:{4193beee-0a23-4619-bf2f-6d609ceacc01}\"/></DockGroup></DockRoot></AutoHideRoot></MainSite><wm:WMFloatSite Id=\"6c66b445-edf9-4860-a192-7e3846a53ffc\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"35b77d4f-3f09-4c2c-82b5-8e7c9ce9581d\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"11a11074-4a21-4a12-bd90-9a5a31652d03\" FloatingTop=\"103.245283018868\" FloatingLeft=\"0\" FloatingHeight=\"499.924528301887\" FloatingWidth=\"375.849056603774\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" IsSelected=\"True\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingTop=\"103.245283018868\" FloatingLeft=\"0\" FloatingHeight=\"499.924528301887\" FloatingWidth=\"375.849056603774\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"8a3c1d75-6ed2-4e8f-b27d-c54f555a3b28\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"99c2d503-4ae5-4bfa-aa05-7e55402f87b1\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"f96fecf3-7215-4027-80aa-4006db145678\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"01ce5c84-2f62-448a-85b9-b792cf4ba1ba\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"eae1ba4c-99e5-4c70-85e9-f0d93262238a\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"4f46ab70-6c01-40e3-b8d9-b0f8f095b4f6\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"e95ec8b5-211e-48aa-a7d3-8d01ede3f134\"><wm:ToolWindowView Name=\"ST:0:0:{b869198c-f673-46d2-83ae-64f515277716}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"1b7ab59d-c723-4b1b-a885-9acd39f509bc\"><wm:ToolWindowView Name=\"ST:0:0:{b8399b49-7330-487b-9235-7d2e969d0a79}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"620a81b3-1da0-4bbb-8367-bb735196d3d3\"><wm:ToolWindowView Name=\"ST:0:0:{778b5376-ad77-4751-acdc-f3d18343f8dd}\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"f9c42f24-0e2b-4adb-858c-9444e4a4b43c\" FloatingTop=\"781.584905660377\" FloatingLeft=\"1068.67924528302\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"><TabGroup FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"><ViewBookmark Name=\"ST:0:0:{6bf43c00-192e-4279-9dd1-c19a4c0ab983}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{0504ff91-9d61-11d0-a794-00a0c9110051}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{637792aa-f332-4bb5-be6c-066b0e88eced}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{be4d7042-ba3f-11d2-840e-00c04f9902c1}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{605322a2-17ae-43f4-b60f-766556e46c87}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{ecb7191a-597b-41f5-9843-03a4cf275dde}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{588470cc-84f8-4a57-9ac4-86bca0625ff4}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f564}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f565}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{905da7d1-18fd-4a46-8d0f-a5ff58ada9de}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{519e8a32-1c95-4a42-956f-2cee2f28eb0f}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{92547016-2bd0-4dfe-bd4f-5b52bdce0037}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{fdffccf2-5f63-404f-86ad-33693f544948}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{f044f2c2-3d99-4787-a492-6b09a19df7c0}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{f16e7758-bfd9-4360-a45f-6deeae786164}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/><ViewBookmark Name=\"ST:0:0:{f2c4be33-ca39-41a6-a69a-f4ed439d4178}\" ViewBookmarkType=\"Raft\" FloatingHeight=\"242.716981132075\" FloatingWidth=\"684.679245283019\"/></TabGroup></wm:WMFloatSite><wm:WMFloatSite Id=\"49492494-9e8a-4f03-bfc2-21c8401a9441\" FloatingTop=\"489.056603773585\" FloatingLeft=\"1726.18867924528\" FloatingHeight=\"241.811320754717\" FloatingWidth=\"686.490566037736\"><ViewBookmark Name=\"ST:0:0:{4193beee-0a23-4619-bf2f-6d609ceacc01}\" AccessOrder=\"1\" ViewBookmarkType=\"Raft\" FloatingHeight=\"241.811320754717\" FloatingWidth=\"686.490566037736\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"c90ca2c3-4566-4cd8-ae9e-e2f5e82ac96b\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{6f0b3bcf-f1c8-49f5-a0b5-e3c29762d9a5}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"191e3b1c-e081-4141-a783-ee890ca1d331\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{93c5e7ad-af06-49e6-a756-b8f3eaca790d}\" FloatingTop=\"100\" FloatingLeft=\"100\" FloatingHeight=\"450\" FloatingWidth=\"450\"/></wm:WMFloatSite></WindowProfile></Debug><NoToolWin><WindowProfile xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:wm=\"clr-namespace:Microsoft.VisualStudio.Platform.WindowManagement;assembly=Microsoft.VisualStudio.Platform.WindowManagement\" Name=\"NoToolWin\" xmlns=\"clr-namespace:Microsoft.VisualStudio.PlatformUI.Shell;assembly=Microsoft.VisualStudio.Shell.ViewManager\"><MainSite FloatingTop=\"0\" FloatingLeft=\"0\" FloatingHeight=\"848\" FloatingWidth=\"1550.4\" FloatingWindowState=\"Maximized\"><AutoHideRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\" DockRestriction=\"AlwaysFloating\"><AutoHideChannel Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"256\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Right\" Orientation=\"Vertical\"><AutoHideGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingTop=\"76.8\" FloatingLeft=\"819.2\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/></AutoHideGroup></AutoHideChannel><AutoHideChannel Dock=\"Top\"/><AutoHideChannel Dock=\"Bottom\" IsVisible=\"True\"><AutoHideGroup IsVisible=\"True\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" IsVisible=\"True\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/></AutoHideGroup></AutoHideChannel><DockRoot IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DockGroup Orientation=\"Vertical\" DockedHeight=\"768\" DockedWidth=\"348.16\"><TabGroup DockedHeight=\"652.8\" DockedWidth=\"348.16\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{ed485b08-5acf-4ce9-8e13-699174ea0201}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c9c0ae26-aa77-11d2-b3f0-0000f87570ee}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{de1fc918-f32e-4dd7-a915-1792a051f26b}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{2d7728c2-de0a-45b5-99aa-89b609dfde73}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView Name=\"ST:0:0:{9f3ec988-1174-4746-a66a-3969715d1fc7}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{131369f2-062d-44a2-8671-91ff31efb4f4}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"348.16\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{3addf8e2-81cc-41a0-9785-dbd2d86064bd}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{0db31cc8-2322-4f59-a610-1fdc8423df77}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{ecdd9ee0-ac6b-11d0-89f9-00a0c9110055}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{66dba47c-61df-11d2-aa79-00c04f990343}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{4a791147-19e4-11d3-b86b-00c04f79f802}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd58-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{57dc5d59-11c2-4955-a7b4-d7699d677e93}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{07cd18b4-3ba1-11d2-890a-0060083196c6}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{1cba9826-3184-4799-a184-784e41b56398}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{38ed9834-0c97-445b-bd1d-f78f3e08afac}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{402dc223-d700-4029-866f-acee803f3f0c}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"384\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a9b00010-7308-415c-95c6-eed62c1b9788}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{9c7d10e9-0147-4363-bf48-917f0426cd03}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{dd1ddd20-d59b-11da-a94d-0800200c9a66}\" DockedHeight=\"652.8\" DockedWidth=\"348.16\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/></TabGroup><TabGroup DockedHeight=\"768\" DockedWidth=\"348.16\"><ViewBookmark Name=\"ST:0:0:{25f7e850-ffa1-11d0-b63f-00a0c922e851}\" DockedHeight=\"768\" DockedWidth=\"348.16\"/><ViewBookmark Name=\"ST:0:0:{873151d0-cf2e-48cc-b4bf-ad0394f6a3c3}\" DockedHeight=\"768\" DockedWidth=\"348.16\"/></TabGroup></DockGroup><DockGroup Orientation=\"Vertical\" IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><DocumentGroupContainer IsVisible=\"True\" DockedHeight=\"*\" DockedWidth=\"*\"><wm:WMDocumentGroup><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{46c87f81-5a06-43a8-9e25-85d33bac49f8}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{269a02dc-6af8-11d3-bdc4-00c04f688e50}\" FloatingHeight=\"384\" FloatingWidth=\"512\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf577b8c-4134-11d2-83e5-00c04f9902c1}\" FloatingHeight=\"384\" FloatingWidth=\"358.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{99b8fa2f-ab90-4f57-9c32-949f146f1914}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{c79b74ff-f1d7-4c94-aefa-4d22bfe1b1f9}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><wm:ToolWindowView Name=\"ST:0:0:{93a69444-e846-4571-9e03-a8433ad9ddf9}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{cb4d394c-6408-4607-8c42-0910d3147a4e}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView Name=\"ST:0:0:{e5c2cce5-61d0-4cd8-a946-13ec76cfdb01}\" FloatingHeight=\"614.4\" FloatingWidth=\"819.2\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{387cb18d-6153-4156-9257-9ac3f9207bbe}\" FloatingHeight=\"537.6\" FloatingWidth=\"716.8\"/><ViewBookmark Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" AccessOrder=\"1\" ViewBookmarkType=\"DocumentWell\"/></wm:WMDocumentGroup></DocumentGroupContainer><DockGroup DockedHeight=\"192\" DockedWidth=\"512\"><TabGroup DockedHeight=\"192\" DockedWidth=\"512\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f2e84780-2af1-11d1-a7fa-00a0c9110051}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a18f9d0-b838-11d0-93eb-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{350f9856-a72b-11d2-8ad0-00c04f79e479}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ca4b8ff5-bfc7-11d2-9929-00c04f68fdaf}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{51c76317-9037-4cf2-a20a-6206fd30b4a1}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e62ce6a0-b439-11d0-a79d-00a0c9110051}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{8d263989-ff4b-4a78-90c8-b2ba3fa69311}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"512\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{37aba9be-445a-11d3-9949-00c04f68fd0a}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"153.6\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:1:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:2:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:3:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:4:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887920-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{0f887921-c2b6-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{68487888-204a-11d3-87eb-00c04f7971a5}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{73f6dd5b-437e-11d3-b88e-00c04f79f802}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"614.4\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{9a7cebbb-dc5c-4986-bc49-962da46aa506}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{e3369cf0-996f-45ba-881e-2af696fbe27b}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cdbdee54-b399-484b-b763-db2c3393d646}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/></TabGroup><TabGroup DockedHeight=\"192\" DockedWidth=\"100\"><ViewBookmark Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"192\" DockedWidth=\"100\"/><ViewBookmark Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"192\" DockedWidth=\"100\"/></TabGroup><TabGroup DockedHeight=\"192\" DockedWidth=\"512\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{0504ff91-9d61-11d0-a794-00a0c9110051}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{637792aa-f332-4bb5-be6c-066b0e88eced}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{be4d7042-ba3f-11d2-840e-00c04f9902c1}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{605322a2-17ae-43f4-b60f-766556e46c87}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{ecb7191a-597b-41f5-9843-03a4cf275dde}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><ViewBookmark Name=\"ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}\" DockedHeight=\"192\" DockedWidth=\"512\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{588470cc-84f8-4a57-9ac4-86bca0625ff4}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f564}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"DontForceCreate\" Name=\"ST:0:0:{2456bd12-ecf7-4988-a4a6-67d49173f565}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{905da7d1-18fd-4a46-8d0f-a5ff58ada9de}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{519e8a32-1c95-4a42-956f-2cee2f28eb0f}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{92547016-2bd0-4dfe-bd4f-5b52bdce0037}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{fdffccf2-5f63-404f-86ad-33693f544948}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"192\" FloatingWidth=\"460.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f044f2c2-3d99-4787-a492-6b09a19df7c0}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f16e7758-bfd9-4360-a45f-6deeae786164}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{f2c4be33-ca39-41a6-a69a-f4ed439d4178}\" DockedHeight=\"192\" DockedWidth=\"512\" FloatingHeight=\"199.68\" FloatingWidth=\"747.52\"/></TabGroup></DockGroup></DockGroup><TabGroup DockedHeight=\"652.8\" DockedWidth=\"174.08\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{099ca9ea-0ae4-4e31-a7e4-fe09bd1715cc}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{5b6781c0-e99d-11d0-9954-00a0c91bc8e5}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"537.6\" FloatingWidth=\"204.8\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" Name=\"ST:0:0:{47a7d881-d3cf-4036-b57c-0444e12df881}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a34b1c5d-6d37-4a0c-a8b0-99f8e8158b48}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\" FloatingHeight=\"614.4\" FloatingWidth=\"256\"/><ViewBookmark Name=\"ST:0:0:{c93a910a-0fa6-4307-93a4-f2bd61ec7828}\" DockedHeight=\"652.8\" DockedWidth=\"174.08\"/></TabGroup></DockGroup></DockRoot></AutoHideRoot></MainSite><wm:WMFloatSite Id=\"c71af5b7-43e8-4973-843e-999ecfdb3723\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{53024d34-0ef5-11d3-87e0-00c04f7971a5}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"011dc193-3c44-4e8c-996c-aa017ccd87b7\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{e830ec50-c2b5-11d2-9375-0080c747d9a0}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"76.8\" FloatingWidth=\"337.92\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"6e7cae5c-9105-4199-ae96-9fd6d035ee76\" FloatingHeight=\"222.72\" FloatingWidth=\"378.88\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{cf2ddc32-8cad-11d2-9302-005345000000}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"222.72\" FloatingWidth=\"378.88\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"90192d0a-3f6f-4904-848e-dc23d1390dbc\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{56b32054-de4d-4de3-8396-bcb6f98bd246}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"20ba7bf1-f743-41e1-b931-5a2057bd6985\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{58875c41-862b-4d6f-b046-03e8a333907e}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"b6b3ca32-ece3-43fa-9c03-fedb062585b5\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{6fb4a4d9-0c08-4663-af7b-2ecbdf7a20ec}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"2403415c-2419-4fd2-b791-9e86f77d1fa6\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{7b8c4981-13ec-4c56-9f24-abe5faaa9440}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"635a81fa-1998-4f21-9b30-15e03adf1212\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{a693a243-4743-4034-aed4-bec4e79e0b3b}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite><wm:WMFloatSite Id=\"c97d2082-b34d-4d43-ade1-0fbd06b1e26f\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"><wm:ToolWindowView ContextVisibilityEnabled=\"False\" ForceCreate=\"ForceCreate\" Name=\"ST:0:0:{f62af5ad-1276-46dd-ae7b-d07ab54d1081}\" DockedHeight=\"100\" DockedWidth=\"100\" FloatingHeight=\"614.4\" FloatingWidth=\"276.48\"/></wm:WMFloatSite></WindowProfile></NoToolWin></Category><Category name=\"Environment_PropertiesWindow\" Category=\"{731a3cc7-de5e-49ca-9115-9a03e46624b0}\" Package=\"{7494682b-37a0-11d2-a273-00c04f8ef4ff}\" RegisteredName=\"Environment_PropertiesWindow\" PackageName=\"Windows Forms Designer Package\"><PropertyValue name=\"PbrsAlpha\">0</PropertyValue><PropertyValue name=\"PbrsShowDesc\">1</PropertyValue></Category></Category><Category name=\"Git Version Control_GitSccProvider\" Category=\"{33a4cda9-b7a6-3f4f-9e1f-e4d71f0a9cfa}\" Package=\"{7fe30a77-37f9-4cf2-83dd-96b207028e1b}\" RegisteredName=\"Git Version Control_GitSccProvider\" PackageName=\"SccProviderPackage\"/><Category name=\"Source Control_TeamFoundation\" Category=\"{2A718788-A6D9-44C5-90EF-438BF5B06A74}\" Package=\"{4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}\" RegisteredName=\"Source Control_TeamFoundation\" PackageName=\"Microsoft.VisualStudio.TeamFoundation.VersionControl.HatPackage\"><PropertyValue name=\"IsProxyEnabled\">False</PropertyValue><PropertyValue name=\"ProxyUrl\"/><PropertyValue name=\"GetLatestOnCheckOut\">false</PropertyValue><PropertyValue name=\"AttemptToAutoResolveConflicts\">true</PropertyValue><PropertyValue name=\"ShowDeletedItems\">false</PropertyValue><PropertyValue name=\"OpenSceToMostRecentPath\">false</PropertyValue><PropertyValue name=\"PromptToConfirmMergeResult\">-1</PropertyValue></Category><Category name=\"Test Tools_Test Execution\" Category=\"{48d11193-265d-1458-743e-2b88c655b377}\" Package=\"{a9405ae6-9ac6-4f0e-a03f-7afe45f6fcb7}\" RegisteredName=\"Test Tools_Test Execution\" PackageName=\"Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage, Microsoft.VisualStudio.QualityTools.TestCaseManagement, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\"><PropertyValue name=\"IsCodeColoringEnabled\">True</PropertyValue><PropertyValue name=\"IsInPlaceInstrumentationEnabled\">True</PropertyValue><PropertyValue name=\"KeepHostProcessAlive\">True</PropertyValue><PropertyValue name=\"MaxTestRunsPerSolution\">25</PropertyValue><PropertyValue name=\"PathToWebRoot\"/><PropertyValue name=\"UnitTestResultNavigatePointOfFailure\">False</PropertyValue></Category><Category name=\"XAML Designer_Artboard\" Category=\"{aad4b8cf-51f9-4a07-80cd-69f8b442072c}\" Package=\"{512be089-83ec-4cc6-8483-cf16565ae209}\" RegisteredName=\"XAML Designer_Artboard\" PackageName=\"XamlDesignerPackage\"><PropertyValue name=\"DefaultMargin\">5</PropertyValue><PropertyValue name=\"DefaultPadding\">10</PropertyValue><PropertyValue name=\"GridLineSpacing\">5</PropertyValue><PropertyValue name=\"RenderEffects\">True</PropertyValue><PropertyValue name=\"ShowSnapGrid\">False</PropertyValue><PropertyValue name=\"SnapToGridLines\">False</PropertyValue><PropertyValue name=\"SnapToSnapLines\">True</PropertyValue><PropertyValue name=\"WarnDependentAnimations\">True</PropertyValue><PropertyValue name=\"ZoomThreshold\">4</PropertyValue></Category><Category name=\"XAML Designer_General\" Category=\"{6c8354c1-fac8-41b7-86dd-d4015488bd81}\" Package=\"{512be089-83ec-4cc6-8483-cf16565ae209}\" RegisteredName=\"XAML Designer_General\" PackageName=\"XamlDesignerPackage\"><PropertyValue name=\"AutoInsertLayout\">True</PropertyValue><PropertyValue name=\"AutoNameElements\">False</PropertyValue><PropertyValue name=\"AutoToolboxPopulate\">True</PropertyValue><PropertyValue name=\"EnableXamlDesigner\">True</PropertyValue><PropertyValue name=\"InitialDisplayMode\">SplitView</PropertyValue><PropertyValue name=\"InitialDisplayOrientation\">Default</PropertyValue><PropertyValue name=\"UnitType\">Pixels</PropertyValue><PropertyValue name=\"UseQuadrantLayout\">False</PropertyValue><PropertyValue name=\"ZoomControlMode\">ControlMouseWheel</PropertyValue></Category><Category name=\"XAML_Formatting\" Category=\"{dac05320-0c3a-4ead-a332-8c23b0cfc130}\" Package=\"{2ef1ec52-c8bf-4fe0-8ece-ba9c0d5d1603}\" RegisteredName=\"XAML_Formatting\" PackageName=\"XamlLanguagePackage\"><PropertyValue name=\"AutoOutlining\">True</PropertyValue><PropertyValue name=\"AutoReformatOnEndTag\">True</PropertyValue><PropertyValue name=\"AutoReformatOnPaste\">True</PropertyValue><PropertyValue name=\"AutoReformatOnStartTag\">True</PropertyValue><PropertyValue name=\"QuoteStyle\">DoubleQuote</PropertyValue><PropertyValue name=\"WrapColumn\">120</PropertyValue><PropertyValue name=\"WrapTags\">False</PropertyValue></Category><Category name=\"XAML_Miscellaneous\" Category=\"{b0906bd5-5690-4437-a380-b2b546175e71}\" Package=\"{2ef1ec52-c8bf-4fe0-8ece-ba9c0d5d1603}\" RegisteredName=\"XAML_Miscellaneous\" PackageName=\"XamlLanguagePackage\"><PropertyValue name=\"AutoInsertAttributeQuotes\">True</PropertyValue><PropertyValue name=\"AutoInsertCommas\">True</PropertyValue><PropertyValue name=\"AutoInsertEndBraces\">True</PropertyValue><PropertyValue name=\"AutoInsertEndTags\">True</PropertyValue><PropertyValue name=\"AutoUpdateTags\">True</PropertyValue><PropertyValue name=\"ShowDesignerErrors\">True</PropertyValue><PropertyValue name=\"WarnMinTargetCompatibility\">True</PropertyValue></Category><Category name=\"XAML_Spacing\" Category=\"{ec45e459-a3f0-490e-8eed-5f7da51dde06}\" Package=\"{2ef1ec52-c8bf-4fe0-8ece-ba9c0d5d1603}\" RegisteredName=\"XAML_Spacing\" PackageName=\"XamlLanguagePackage\"><PropertyValue name=\"AttributeFormat\">Preserve</PropertyValue><PropertyValue name=\"BlankLineOption\">Preserve</PropertyValue><PropertyValue name=\"KeepFirstAttributeOnSameLine\">True</PropertyValue></Category><Category name=\"XmlEditor\" Category=\"{4E1CDE49-B840-4826-8CC6-8FB80D7EF455}\" Package=\"{87569308-4813-40a0-9cd0-d7a30838ca3f}\" RegisteredName=\"XmlEditor\" PackageName=\"Visual Studio XML Editor Package\"><PropertyValue name=\"AttributeFormatting\">None</PropertyValue><PropertyValue name=\"AutoDownload\">False</PropertyValue><PropertyValue name=\"AutoInsertAttributeQuotes\">True</PropertyValue><PropertyValue name=\"AutoInsertEndTags\">True</PropertyValue><PropertyValue name=\"AutoInsertNamespaceDeclarations\">True</PropertyValue><PropertyValue name=\"AutoInsertOther\">True</PropertyValue><PropertyValue name=\"AutoOutlining\">True</PropertyValue><PropertyValue name=\"AutoReformatOnEndTag\">True</PropertyValue><PropertyValue name=\"AutoReformatOnPaste\">True</PropertyValue><PropertyValue name=\"FormatMixedContentByDefault\">True</PropertyValue><PropertyValue name=\"SchemaCacheLocation\">%VsInstallDir%\\xml\\Schemas</PropertyValue></Category><Category name=\"CoffeeScript_Advanced\" Category=\"{9a5ed2f4-b737-4876-9b7f-7a94e634e74f}\" Package=\"{52244c9d-db46-4905-bda0-b3406c46d2a4}\" RegisteredName=\"CoffeeScript_Advanced\" PackageName=\"CoffeeScriptPackage\"/><Category name=\"CoffeeScript_CoffeeLint\" Category=\"{d87c87c9-b788-4c01-9d3c-78cdda5ee60e}\" Package=\"{52244c9d-db46-4905-bda0-b3406c46d2a4}\" RegisteredName=\"CoffeeScript_CoffeeLint\" PackageName=\"CoffeeScriptPackage\"><PropertyValue name=\"IsLinterEnabled\">True</PropertyValue></Category><Category name=\"HTML Tag Specific\" Category=\"{7583bb73-a453-40e8-8951-b6986ddb1d9b}\" Package=\"{1B437D20-F8FE-11D2-A6AE-00104BCC7269}\" RegisteredName=\"HTML Tag Specific\" PackageName=\"Visual Studio HTM Editor Package\"/><Category name=\"JSON_Advanced\" Category=\"{78c48687-be97-424b-a3fa-378de0dac07c}\" Package=\"{a6efef5f-be9b-432a-adfe-74a119ab4478}\" RegisteredName=\"JSON_Advanced\" PackageName=\"JSONPackage\"/><Category name=\"JSON_Schema\" Category=\"{A274BD6E-74E6-4698-B631-1690B1E514BB}\" Package=\"{a6efef5f-be9b-432a-adfe-74a119ab4478}\" RegisteredName=\"JSON_Schema\" PackageName=\"JSONPackage\"/><Category name=\"WebProjects\" Category=\"{C78AFEEB-A722-4cf3-AD3F-8694126C2145}\" Package=\"{39c9c826-8ef8-4079-8c95-428f5b1c323f}\" RegisteredName=\"WebProjects\" PackageName=\"Visual Web Developer Project System Package\"><PropertyValue name=\"WarnBeforeRunIfErrors\">false</PropertyValue><PropertyValue name=\"Use64BitIISExpress\">false</PropertyValue><PropertyValue name=\"DisableLocalApplicationInsights\">false</PropertyValue><PropertyValue name=\"EnableDebugTargetsObserver\">true</PropertyValue></Category><Category name=\"Performance\" Category=\"{7A697B67-8D8F-43c2-A11C-57568FE3F513}\" Package=\"{f4a63b2a-49ab-4b2d-aa59-a10f01026c89}\" RegisteredName=\"Performance\" PackageName=\"PerformancePackage\"><PropertyValue name=\"toolsoptions.numfunc\">5</PropertyValue><PropertyValue name=\"toolsoptions.showtimetick\">0</PropertyValue><PropertyValue name=\"toolsoptions.numbuffer\">64</PropertyValue><PropertyValue name=\"toolsoptions.sizebuffer\">64</PropertyValue><PropertyValue name=\"toolsoptions.serialize\">1</PropertyValue><PropertyValue name=\"performancereport.showquery\">0</PropertyValue><PropertyValue name=\"toolsoptions.formatcounters\">1</PropertyValue><PropertyValue name=\"toolsoptions.exportpath\"/><PropertyValue name=\"toolsoptions.exportformat\">csv</PropertyValue><PropertyValue name=\"performancereport.hotpathcandidateratio\">3.0</PropertyValue><PropertyValue name=\"performancereport.shownoisereductionwarning\">1</PropertyValue><PropertyValue name=\"performancereport.noisereductiontrim\">0</PropertyValue><PropertyValue name=\"performancereport.noisereductionfold\">0</PropertyValue><PropertyValue name=\"performancereport.noisereductiontrimthreshold\">2.0</PropertyValue><PropertyValue name=\"performancereport.noisereductionfoldthreshold\">3.0</PropertyValue><PropertyValue name=\"tools.options.justmycode\">0</PropertyValue><PropertyValue name=\"tools.options.justmycode.callee\">0</PropertyValue><PropertyValue name=\"tools.options.justmycode.caller\">0</PropertyValue><PropertyValue name=\"tools.options.kernelmodeanalysis\">0</PropertyValue><PropertyValue name=\"tools.options.rules.actions\"/></Category><Category name=\"Projects_Web Package Management_External Web Tools\" Category=\"{b521100c-f698-4018-b1cf-6421fc59fa9b}\" Package=\"{cb03d63d-47be-437d-b26b-1ad8aa7ff394}\" RegisteredName=\"Projects_Web Package Management_External Web Tools\" PackageName=\"PackageManagementPackage\"><PropertyValue name=\"ToolPaths\">.\\node_modules\\.bin;$(VSINSTALLDIR)\\Web\\External;$(PATH);$(VSINSTALLDIR)\\Web\\External\\git;$(DevEnvDir)\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\Git\\mingw32\\bin</PropertyValue></Category><Category name=\"Projects_Web Package Management_Package Restore\" Category=\"{03D27F49-12E4-4282-94F3-03A8AEF90B8F}\" Package=\"{cb03d63d-47be-437d-b26b-1ad8aa7ff394}\" RegisteredName=\"Projects_Web Package Management_Package Restore\" PackageName=\"PackageManagementPackage\"><PropertyValue name=\"BowerRestoreOnOpen\">True</PropertyValue><PropertyValue name=\"BowerRestoreOnSave\">True</PropertyValue><PropertyValue name=\"NpmRestoreOnOpen\">True</PropertyValue><PropertyValue name=\"NpmRestoreOnSave\">True</PropertyValue></Category><Category name=\"Browser Link_BrowserLinkOptions\" Category=\"{ecf15adb-ab46-38d6-9d69-060f7552fb26}\" Package=\"{8c28e535-abc9-4f92-b5c9-6c16617c8884}\" RegisteredName=\"Browser Link_BrowserLinkOptions\" PackageName=\"EurekaPackage\"><PropertyValue name=\"AutoSyncEnabled\">True</PropertyValue><PropertyValue name=\"BrowserLinkEnabled\">False</PropertyValue></Category><Category name=\"CSS_Advanced\" Category=\"{978df9f7-5f7c-46c1-afe6-3e4335e93514}\" Package=\"{5330c67f-305c-4b17-a3dc-fbb7aee69c09}\" RegisteredName=\"CSS_Advanced\" PackageName=\"CssPackage\"/><Category name=\"CSS_CssLint\" Category=\"{4f8c9198-522a-48e6-bfa8-e704f98b88ee}\" Package=\"{5330C67F-305C-4B17-A3DC-FBB7AEE69C09}\" RegisteredName=\"CSS_CssLint\" PackageName=\"CssPackage\"><PropertyValue name=\"IsLinterEnabled\">True</PropertyValue></Category><Category name=\"HTMLX_Advanced\" Category=\"{3d9c2439-5c0a-4592-b9e8-42e26dfe636b}\" Package=\"{cf49ec7d-92b1-4bbd-9254-9cc13978e82e}\" RegisteredName=\"HTMLX_Advanced\" PackageName=\"HtmlPackage\"/><Category name=\"LESS_Advanced\" Category=\"{1b200b66-f69e-452e-9c6f-d38f9cb0628b}\" Package=\"{f4b61ec8-36d8-4155-b2a0-199587d8ddcc}\" RegisteredName=\"LESS_Advanced\" PackageName=\"LessPackage\"/><Category name=\"SCSS_Advanced\" Category=\"{cea4fb93-f562-4d14-980f-8d9cab6e0a71}\" Package=\"{60116bb0-6f13-49e2-a1ce-a185c783b68b}\" RegisteredName=\"SCSS_Advanced\" PackageName=\"ScssPackage\"/><Category name=\"TypeScript_EsLint\" Category=\"{a9135013-531c-4a70-9782-02836a29dcf2}\" Package=\"{30db8f9b-ec9f-44d6-b377-83c7c27a1a8b}\" RegisteredName=\"TypeScript_EsLint\" PackageName=\"JavaScriptWebExtensionsPackage\"><PropertyValue name=\"IsLinterEnabled\">True</PropertyValue></Category><Category name=\"Web_Code Analysis\" Category=\"{fa109e91-2d0d-4251-bce1-02a4e92cde10}\" Package=\"{72c65c2e-977e-4e9c-a422-f2743d2bdd43}\" RegisteredName=\"Web_Code Analysis\" PackageName=\"WebEditorPackage\"><PropertyValue name=\"CleanErrorsOnBuild\">True</PropertyValue><PropertyValue name=\"IgnoreFolderNames\">\\node_modules\\,\\bower_components\\,\\typings\\,\\lib\\,.min.</PropertyValue><PropertyValue name=\"IgnoreNestedFiles\">True</PropertyValue></Category><Category name=\"WindowsFormsDesigner_General\" Category=\"{de03177c-918d-40af-8c17-c9d63670c175}\" Package=\"{7b5d447b-0b12-41ea-a84e-c822034422d4}\" RegisteredName=\"WindowsFormsDesigner_General\" PackageName=\"Windows Forms Designer Resources Package\"><PropertyValue name=\"AutoToolboxPopulate\">False</PropertyValue><PropertyValue name=\"EnableInSituEditing\">True</PropertyValue><PropertyValue name=\"EnableRefactoringOnRename\">True</PropertyValue><PropertyValue name=\"GridSize\">8, 8</PropertyValue><PropertyValue name=\"LayoutMode\">SnapLines</PropertyValue><PropertyValue name=\"ObjectBoundSmartTagAutoShow\">True</PropertyValue><PropertyValue name=\"ShowGrid\">True</PropertyValue><PropertyValue name=\"SnapToGrid\">True</PropertyValue><PropertyValue name=\"UseOptimizedCodeGeneration\">True</PropertyValue></Category><Category name=\"Work Items_TeamFoundation\" Category=\"{89E620E1-9593-402C-905A-B1944CED0C38}\" Package=\"{CA39E596-31ED-4B34-AA36-5F0240457A7E}\" RegisteredName=\"Work Items_TeamFoundation\" PackageName=\"Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPackage, Microsoft.VisualStudio.TeamFoundation.WorkItemTracking\"><PropertyValue name=\"WorkItemOpen\">OpenInBrowser</PropertyValue></Category></UserSettings>"
  }
]